@shotstack/shotstack-studio 2.0.0-beta.12 → 2.0.0-beta.13
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/dist/index.d.ts +11 -0
- package/dist/internal.es.js +236 -208
- package/dist/internal.umd.js +14 -14
- package/dist/schema/index.d.ts +11 -0
- package/dist/shotstack-studio.es.js +359 -331
- package/dist/shotstack-studio.umd.js +19 -19
- package/package.json +1 -1
package/dist/internal.es.js
CHANGED
|
@@ -15337,7 +15337,7 @@ const de = {
|
|
|
15337
15337
|
ExtraBold: 800,
|
|
15338
15338
|
Black: 900
|
|
15339
15339
|
};
|
|
15340
|
-
function
|
|
15340
|
+
function oi(e) {
|
|
15341
15341
|
const t = e.toLowerCase();
|
|
15342
15342
|
for (const [i, a] of Object.entries(ah)) {
|
|
15343
15343
|
const s = ` ${i.toLowerCase()}`;
|
|
@@ -15355,7 +15355,7 @@ function Yo(e) {
|
|
|
15355
15355
|
return t.url;
|
|
15356
15356
|
if (ar[e])
|
|
15357
15357
|
return ar[e];
|
|
15358
|
-
const { baseFontFamily: i } =
|
|
15358
|
+
const { baseFontFamily: i } = oi(e), a = ih[i] ?? i;
|
|
15359
15359
|
if (ar[a])
|
|
15360
15360
|
return ar[a];
|
|
15361
15361
|
const s = th.get(e);
|
|
@@ -15400,7 +15400,7 @@ function oh(e) {
|
|
|
15400
15400
|
return typeof e == "object" && e !== null && e.type === "text";
|
|
15401
15401
|
}
|
|
15402
15402
|
function lh(e) {
|
|
15403
|
-
const t = e.font?.family ?? "Open Sans", { fontWeight: i } =
|
|
15403
|
+
const t = e.font?.family ?? "Open Sans", { fontWeight: i } = oi(t), a = {
|
|
15404
15404
|
family: t,
|
|
15405
15405
|
size: e.font?.size ?? 32,
|
|
15406
15406
|
weight: e.font?.weight ?? i,
|
|
@@ -17338,7 +17338,7 @@ class Pr extends ei {
|
|
|
17338
17338
|
}
|
|
17339
17339
|
}
|
|
17340
17340
|
createTextStyle(t) {
|
|
17341
|
-
const i = t.font?.family ?? "Open Sans", { baseFontFamily: a, fontWeight: s } =
|
|
17341
|
+
const i = t.font?.family ?? "Open Sans", { baseFontFamily: a, fontWeight: s } = oi(i), r = t.font?.size ?? 32, { width: n } = this.getSize();
|
|
17342
17342
|
return new ne.TextStyle({
|
|
17343
17343
|
fontFamily: a,
|
|
17344
17344
|
fontSize: r,
|
|
@@ -17384,7 +17384,7 @@ class Pr extends ei {
|
|
|
17384
17384
|
}, s > 0 ? this.background.roundRect(r, n, o, l, s) : this.background.rect(r, n, o, l), this.background.fill();
|
|
17385
17385
|
}
|
|
17386
17386
|
async loadFont(t) {
|
|
17387
|
-
const { baseFontFamily: i, fontWeight: a } =
|
|
17387
|
+
const { baseFontFamily: i, fontWeight: a } = oi(t), s = `${i}-${a}`;
|
|
17388
17388
|
if (Pr.loadedFonts.has(s))
|
|
17389
17389
|
return;
|
|
17390
17390
|
const r = Yo(t);
|
|
@@ -28118,7 +28118,7 @@ const NA = new ya(16, "BE"), AA = NA;
|
|
|
28118
28118
|
new ya(16, "LE");
|
|
28119
28119
|
const CA = new ya(32, "BE"), yt = CA;
|
|
28120
28120
|
new ya(32, "LE");
|
|
28121
|
-
function
|
|
28121
|
+
function wi(e, t, i) {
|
|
28122
28122
|
let a;
|
|
28123
28123
|
if (typeof e == "number" ? a = e : typeof e == "function" ? a = e.call(i, i) : i && typeof e == "string" ? a = i[e] : t && e instanceof Ue && (a = e.decode(t)), isNaN(a))
|
|
28124
28124
|
throw new Error("Not a fixed size");
|
|
@@ -28141,7 +28141,7 @@ class C extends Ii {
|
|
|
28141
28141
|
let a;
|
|
28142
28142
|
const { pos: s } = t, r = [];
|
|
28143
28143
|
let n = i;
|
|
28144
|
-
if (this.length != null && (a =
|
|
28144
|
+
if (this.length != null && (a = wi(this.length, t, i)), this.length instanceof Ue && (Object.defineProperties(r, {
|
|
28145
28145
|
parent: { value: i },
|
|
28146
28146
|
_startOffset: { value: s },
|
|
28147
28147
|
_currentOffset: { value: 0, writable: !0 },
|
|
@@ -28157,7 +28157,7 @@ class C extends Ii {
|
|
|
28157
28157
|
}
|
|
28158
28158
|
size(t, i, a = !0) {
|
|
28159
28159
|
if (!t)
|
|
28160
|
-
return this.type.size(null, i) *
|
|
28160
|
+
return this.type.size(null, i) * wi(this.length, null, i);
|
|
28161
28161
|
let s = 0;
|
|
28162
28162
|
this.length instanceof Ue && (s += this.length.size(), i = { parent: i, pointerSize: 0 });
|
|
28163
28163
|
for (let r of t)
|
|
@@ -28184,7 +28184,7 @@ class C extends Ii {
|
|
|
28184
28184
|
}
|
|
28185
28185
|
class qe extends C {
|
|
28186
28186
|
decode(t, i) {
|
|
28187
|
-
const { pos: a } = t, s =
|
|
28187
|
+
const { pos: a } = t, s = wi(this.length, t, i);
|
|
28188
28188
|
this.length instanceof Ue && (i = {
|
|
28189
28189
|
parent: i,
|
|
28190
28190
|
_startOffset: a,
|
|
@@ -28221,7 +28221,7 @@ class jn {
|
|
|
28221
28221
|
return t;
|
|
28222
28222
|
}
|
|
28223
28223
|
}
|
|
28224
|
-
class
|
|
28224
|
+
class li extends Ii {
|
|
28225
28225
|
constructor(t, i = []) {
|
|
28226
28226
|
super(), this.type = t, this.flags = i;
|
|
28227
28227
|
}
|
|
@@ -28245,17 +28245,17 @@ class oi extends Ii {
|
|
|
28245
28245
|
return this.type.encode(t, a);
|
|
28246
28246
|
}
|
|
28247
28247
|
}
|
|
28248
|
-
class
|
|
28248
|
+
class bi extends Ii {
|
|
28249
28249
|
constructor(t) {
|
|
28250
28250
|
super(), this.length = t;
|
|
28251
28251
|
}
|
|
28252
28252
|
decode(t, i) {
|
|
28253
|
-
const a =
|
|
28253
|
+
const a = wi(this.length, t, i);
|
|
28254
28254
|
return t.readBuffer(a);
|
|
28255
28255
|
}
|
|
28256
28256
|
size(t, i) {
|
|
28257
28257
|
if (!t)
|
|
28258
|
-
return
|
|
28258
|
+
return wi(this.length, null, i);
|
|
28259
28259
|
let a = t.length;
|
|
28260
28260
|
return this.length instanceof Ue && (a += this.length.size()), a;
|
|
28261
28261
|
}
|
|
@@ -28290,7 +28290,7 @@ class at extends Ii {
|
|
|
28290
28290
|
t.pos += this.size(null, i);
|
|
28291
28291
|
}
|
|
28292
28292
|
size(t, i) {
|
|
28293
|
-
const a =
|
|
28293
|
+
const a = wi(this.count, null, i);
|
|
28294
28294
|
return this.type.size() * a;
|
|
28295
28295
|
}
|
|
28296
28296
|
encode(t, i, a) {
|
|
@@ -28306,7 +28306,7 @@ class je extends Ii {
|
|
|
28306
28306
|
typeof r == "function" && (r = r.call(i, i) || "ascii");
|
|
28307
28307
|
let n = Yn(r);
|
|
28308
28308
|
if (this.length != null)
|
|
28309
|
-
a =
|
|
28309
|
+
a = wi(this.length, t, i);
|
|
28310
28310
|
else {
|
|
28311
28311
|
let l;
|
|
28312
28312
|
for ({ buffer: l, length: a, pos: s } = t; s < a - n + 1 && (l[s] !== 0 || n === 2 && l[s + 1] !== 0); )
|
|
@@ -28318,7 +28318,7 @@ class je extends Ii {
|
|
|
28318
28318
|
}
|
|
28319
28319
|
size(t, i) {
|
|
28320
28320
|
if (t == null)
|
|
28321
|
-
return
|
|
28321
|
+
return wi(this.length, null, i);
|
|
28322
28322
|
let { encoding: a } = this;
|
|
28323
28323
|
typeof a == "function" && (a = a.call(i?.val, i?.val) || "ascii"), a === "utf16be" && (a = "utf16le");
|
|
28324
28324
|
let s = Ac(t, a);
|
|
@@ -28639,9 +28639,9 @@ var Gs = {};
|
|
|
28639
28639
|
Gs.byteLength = FA;
|
|
28640
28640
|
Gs.toByteArray = PA;
|
|
28641
28641
|
Gs.fromByteArray = MA;
|
|
28642
|
-
var
|
|
28642
|
+
var gi = [], $t = [], _A = typeof Uint8Array < "u" ? Uint8Array : Array, Hn = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
28643
28643
|
for (var Sa = 0, IA = Hn.length; Sa < IA; ++Sa)
|
|
28644
|
-
|
|
28644
|
+
gi[Sa] = Hn[Sa], $t[Hn.charCodeAt(Sa)] = Sa;
|
|
28645
28645
|
$t[45] = 62;
|
|
28646
28646
|
$t[95] = 63;
|
|
28647
28647
|
function O0(e) {
|
|
@@ -28667,7 +28667,7 @@ function PA(e) {
|
|
|
28667
28667
|
return s === 2 && (t = $t[e.charCodeAt(l)] << 2 | $t[e.charCodeAt(l + 1)] >> 4, r[n++] = t & 255), s === 1 && (t = $t[e.charCodeAt(l)] << 10 | $t[e.charCodeAt(l + 1)] << 4 | $t[e.charCodeAt(l + 2)] >> 2, r[n++] = t >> 8 & 255, r[n++] = t & 255), r;
|
|
28668
28668
|
}
|
|
28669
28669
|
function EA(e) {
|
|
28670
|
-
return
|
|
28670
|
+
return gi[e >> 18 & 63] + gi[e >> 12 & 63] + gi[e >> 6 & 63] + gi[e & 63];
|
|
28671
28671
|
}
|
|
28672
28672
|
function OA(e, t, i) {
|
|
28673
28673
|
for (var a, s = [], r = t; r < i; r += 3)
|
|
@@ -28678,9 +28678,9 @@ function MA(e) {
|
|
|
28678
28678
|
for (var t, i = e.length, a = i % 3, s = [], r = 16383, n = 0, o = i - a; n < o; n += r)
|
|
28679
28679
|
s.push(OA(e, n, n + r > o ? o : n + r));
|
|
28680
28680
|
return a === 1 ? (t = e[i - 1], s.push(
|
|
28681
|
-
|
|
28681
|
+
gi[t >> 2] + gi[t << 4 & 63] + "=="
|
|
28682
28682
|
)) : a === 2 && (t = (e[i - 2] << 8) + e[i - 1], s.push(
|
|
28683
|
-
|
|
28683
|
+
gi[t >> 10] + gi[t >> 4 & 63] + gi[t << 2 & 63] + "="
|
|
28684
28684
|
)), s.join("");
|
|
28685
28685
|
}
|
|
28686
28686
|
var ul = 0, M0 = -3;
|
|
@@ -28710,7 +28710,7 @@ var R0 = new Rs(), D0 = new Rs(), dl = new Uint8Array(30), hl = new Uint16Array(
|
|
|
28710
28710
|
14,
|
|
28711
28711
|
1,
|
|
28712
28712
|
15
|
|
28713
|
-
]), Sc = new Rs(),
|
|
28713
|
+
]), Sc = new Rs(), fi = new Uint8Array(320);
|
|
28714
28714
|
function B0(e, t, i, a) {
|
|
28715
28715
|
var s, r;
|
|
28716
28716
|
for (s = 0; s < i; ++s) e[s] = 0;
|
|
@@ -28743,7 +28743,7 @@ function LA(e) {
|
|
|
28743
28743
|
var t = e.tag & 1;
|
|
28744
28744
|
return e.tag >>>= 1, t;
|
|
28745
28745
|
}
|
|
28746
|
-
function
|
|
28746
|
+
function hi(e, t, i) {
|
|
28747
28747
|
if (!t)
|
|
28748
28748
|
return i;
|
|
28749
28749
|
for (; e.bitcount < 24; )
|
|
@@ -28762,33 +28762,33 @@ function Io(e, t) {
|
|
|
28762
28762
|
}
|
|
28763
28763
|
function BA(e, t, i) {
|
|
28764
28764
|
var a, s, r, n, o, l;
|
|
28765
|
-
for (a =
|
|
28765
|
+
for (a = hi(e, 5, 257), s = hi(e, 5, 1), r = hi(e, 4, 4), n = 0; n < 19; ++n) fi[n] = 0;
|
|
28766
28766
|
for (n = 0; n < r; ++n) {
|
|
28767
|
-
var c =
|
|
28768
|
-
|
|
28767
|
+
var c = hi(e, 3, 0);
|
|
28768
|
+
fi[DA[n]] = c;
|
|
28769
28769
|
}
|
|
28770
|
-
for (Xn(Sc,
|
|
28770
|
+
for (Xn(Sc, fi, 0, 19), o = 0; o < a + s; ) {
|
|
28771
28771
|
var f = Io(e, Sc);
|
|
28772
28772
|
switch (f) {
|
|
28773
28773
|
case 16:
|
|
28774
|
-
var u =
|
|
28775
|
-
for (l =
|
|
28776
|
-
|
|
28774
|
+
var u = fi[o - 1];
|
|
28775
|
+
for (l = hi(e, 2, 3); l; --l)
|
|
28776
|
+
fi[o++] = u;
|
|
28777
28777
|
break;
|
|
28778
28778
|
case 17:
|
|
28779
|
-
for (l =
|
|
28780
|
-
|
|
28779
|
+
for (l = hi(e, 3, 3); l; --l)
|
|
28780
|
+
fi[o++] = 0;
|
|
28781
28781
|
break;
|
|
28782
28782
|
case 18:
|
|
28783
|
-
for (l =
|
|
28784
|
-
|
|
28783
|
+
for (l = hi(e, 7, 11); l; --l)
|
|
28784
|
+
fi[o++] = 0;
|
|
28785
28785
|
break;
|
|
28786
28786
|
default:
|
|
28787
|
-
|
|
28787
|
+
fi[o++] = f;
|
|
28788
28788
|
break;
|
|
28789
28789
|
}
|
|
28790
28790
|
}
|
|
28791
|
-
Xn(t,
|
|
28791
|
+
Xn(t, fi, 0, a), Xn(i, fi, a, s);
|
|
28792
28792
|
}
|
|
28793
28793
|
function _c(e, t, i) {
|
|
28794
28794
|
for (; ; ) {
|
|
@@ -28799,7 +28799,7 @@ function _c(e, t, i) {
|
|
|
28799
28799
|
e.dest[e.destLen++] = a;
|
|
28800
28800
|
else {
|
|
28801
28801
|
var s, r, n, o;
|
|
28802
|
-
for (a -= 257, s =
|
|
28802
|
+
for (a -= 257, s = hi(e, dl[a], hl[a]), r = Io(e, i), n = e.destLen - hi(e, z0[r], L0[r]), o = n; o < n + s; ++o)
|
|
28803
28803
|
e.dest[e.destLen++] = e.dest[o];
|
|
28804
28804
|
}
|
|
28805
28805
|
}
|
|
@@ -28816,7 +28816,7 @@ function UA(e) {
|
|
|
28816
28816
|
function ZA(e, t) {
|
|
28817
28817
|
var i = new RA(e, t), a, s, r;
|
|
28818
28818
|
do {
|
|
28819
|
-
switch (a = LA(i), s =
|
|
28819
|
+
switch (a = LA(i), s = hi(i, 2, 0), s) {
|
|
28820
28820
|
case 0:
|
|
28821
28821
|
r = UA(i);
|
|
28822
28822
|
break;
|
|
@@ -31673,7 +31673,7 @@ function Q0() {
|
|
|
31673
31673
|
for (var va = 0; va < 3 * O; va++)
|
|
31674
31674
|
Mt[va] = new s(0, 0), Zt[va] = new s(0, 0);
|
|
31675
31675
|
for (; !re; ) {
|
|
31676
|
-
var At = 0, ss, Qt = [1 << 28, 1 << 28, 1 << 28], ai = [0], Kt = [1, 1, 1],
|
|
31676
|
+
var At = 0, ss, Qt = [1 << 28, 1 << 28, 1 << 28], ai = [0], Kt = [1, 1, 1], xi = [0, 1, 0, 1, 0, 1], Qi = [0], Fi, qt, Ks, xa, qs = null, Ti = null, Js, Qs = null, rs, $s = 0, ka = null, si = 0, Na = 0, ns = null, A = 0, oe = 0, Re = 0, Ge, Ke;
|
|
31677
31677
|
for (z = 0; z < 3; ++z)
|
|
31678
31678
|
vt[z].codes = null, vt[z].htrees = null;
|
|
31679
31679
|
Fe.readMoreInput();
|
|
@@ -31709,13 +31709,13 @@ function Q0() {
|
|
|
31709
31709
|
for (rs = On.num_htrees, Qs = On.context_map, vt[0] = new q(u, Js), vt[1] = new q(h, Kt[1]), vt[2] = new q(xa, rs), z = 0; z < 3; ++z)
|
|
31710
31710
|
vt[z].decode(Fe);
|
|
31711
31711
|
for (ka = 0, ns = 0, Ge = Ti[ai[0]], oe = n.lookupOffsets[Ge], Re = n.lookupOffsets[Ge + 1], Ke = vt[1].htrees[0]; At > 0; ) {
|
|
31712
|
-
var tr, os, Mn, Rn, Dn, Gt, Jt,
|
|
31712
|
+
var tr, os, Mn, Rn, Dn, Gt, Jt, ki, ls, Ca, cs;
|
|
31713
31713
|
for (Fe.readMoreInput(), Qt[1] === 0 && (xe(
|
|
31714
31714
|
Kt[1],
|
|
31715
31715
|
Mt,
|
|
31716
31716
|
1,
|
|
31717
31717
|
ai,
|
|
31718
|
-
|
|
31718
|
+
xi,
|
|
31719
31719
|
Qi,
|
|
31720
31720
|
Fe
|
|
31721
31721
|
), Qt[1] = Ze(Zt, O, Fe), Ke = vt[1].htrees[ai[1]]), --Qt[1], tr = Ie(vt[1].codes, Ke, Fe), os = tr >> 6, os >= 2 ? (os -= 2, Jt = -1) : Jt = 0, Mn = o.kInsertRangeLut[os] + (tr >> 3 & 7), Rn = o.kCopyRangeLut[os] + (tr & 7), Dn = o.kInsertLengthPrefixCode[Mn].offset + Fe.readBits(o.kInsertLengthPrefixCode[Mn].nbits), Gt = o.kCopyLengthPrefixCode[Rn].offset + Fe.readBits(o.kCopyLengthPrefixCode[Rn].nbits), Qe = te[D - 1 & fe], wt = te[D - 2 & fe], Ca = 0; Ca < Dn; ++Ca)
|
|
@@ -31724,7 +31724,7 @@ function Q0() {
|
|
|
31724
31724
|
Mt,
|
|
31725
31725
|
0,
|
|
31726
31726
|
ai,
|
|
31727
|
-
|
|
31727
|
+
xi,
|
|
31728
31728
|
Qi,
|
|
31729
31729
|
Fe
|
|
31730
31730
|
), Qt[0] = Ze(Zt, 0, Fe), $s = ai[0] << b, ka = $s, Ge = Ti[ai[0]], oe = n.lookupOffsets[Ge], Re = n.lookupOffsets[Ge + 1]), ls = n.lookup[oe + Qe] | n.lookup[Re + wt], si = qs[ka + ls], --Qt[0], wt = Qe, Qe = Ie(vt[0].codes, vt[0].htrees[si], Fe), te[D & fe] = Qe, (D & fe) === fe && B.write(te, Ae), ++D;
|
|
@@ -31736,7 +31736,7 @@ function Q0() {
|
|
|
31736
31736
|
Mt,
|
|
31737
31737
|
2,
|
|
31738
31738
|
ai,
|
|
31739
|
-
|
|
31739
|
+
xi,
|
|
31740
31740
|
Qi,
|
|
31741
31741
|
Fe
|
|
31742
31742
|
), Qt[2] = Ze(Zt, 2 * O, Fe), Na = ai[2] << M, ns = Na), --Qt[2], ls = (Gt > 4 ? 3 : Gt - 2) & 255, A = Qs[ns + ls], Jt = Ie(vt[2].codes, vt[2].htrees[A], Fe), Jt >= qt) {
|
|
@@ -31744,11 +31744,11 @@ function Q0() {
|
|
|
31744
31744
|
Jt -= qt, _l = Jt & Ks, Jt >>= Fi, zn = (Jt >> 1) + 1, fs = (2 + (Jt & 1) << zn) - 4, Jt = qt + (fs + Fe.readBits(zn) << Fi) + _l;
|
|
31745
31745
|
}
|
|
31746
31746
|
}
|
|
31747
|
-
if (
|
|
31747
|
+
if (ki = Ce(Jt, rt, Ft), ki < 0)
|
|
31748
31748
|
throw new Error("[BrotliDecompress] invalid distance");
|
|
31749
|
-
if (D < ce && ue !== ce ? ue = D : ue = ce, cs = D & fe,
|
|
31749
|
+
if (D < ce && ue !== ce ? ue = D : ue = ce, cs = D & fe, ki > ue)
|
|
31750
31750
|
if (Gt >= a.minDictionaryWordLength && Gt <= a.maxDictionaryWordLength) {
|
|
31751
|
-
var fs = a.offsetsByLength[Gt], Il =
|
|
31751
|
+
var fs = a.offsetsByLength[Gt], Il = ki - ue - 1, Fl = a.sizeBitsByLength[Gt], Yd = (1 << Fl) - 1, Hd = Il & Yd, Tl = Il >> Fl;
|
|
31752
31752
|
if (fs += Hd * Gt, Tl < l.kNumTransforms) {
|
|
31753
31753
|
var Ln = l.transformDictionaryWord(te, cs, fs, Gt, Tl);
|
|
31754
31754
|
if (cs += Ln, D += Ln, At -= Ln, cs >= _e) {
|
|
@@ -31757,14 +31757,14 @@ function Q0() {
|
|
|
31757
31757
|
te[ir] = te[_e + ir];
|
|
31758
31758
|
}
|
|
31759
31759
|
} else
|
|
31760
|
-
throw new Error("Invalid backward reference. pos: " + D + " distance: " +
|
|
31760
|
+
throw new Error("Invalid backward reference. pos: " + D + " distance: " + ki + " len: " + Gt + " bytes left: " + At);
|
|
31761
31761
|
} else
|
|
31762
|
-
throw new Error("Invalid backward reference. pos: " + D + " distance: " +
|
|
31762
|
+
throw new Error("Invalid backward reference. pos: " + D + " distance: " + ki + " len: " + Gt + " bytes left: " + At);
|
|
31763
31763
|
else {
|
|
31764
|
-
if (Jt > 0 && (rt[Ft & 3] =
|
|
31765
|
-
throw new Error("Invalid backward reference. pos: " + D + " distance: " +
|
|
31764
|
+
if (Jt > 0 && (rt[Ft & 3] = ki, ++Ft), Gt > At)
|
|
31765
|
+
throw new Error("Invalid backward reference. pos: " + D + " distance: " + ki + " len: " + Gt + " bytes left: " + At);
|
|
31766
31766
|
for (Ca = 0; Ca < Gt; ++Ca)
|
|
31767
|
-
te[D & fe] = te[D -
|
|
31767
|
+
te[D & fe] = te[D - ki & fe], (D & fe) === fe && B.write(te, Ae), ++D, --At;
|
|
31768
31768
|
}
|
|
31769
31769
|
Qe = te[D - 1 & fe], wt = te[D - 2 & fe];
|
|
31770
31770
|
}
|
|
@@ -31953,7 +31953,7 @@ var LC = new E({
|
|
|
31953
31953
|
yMin: H,
|
|
31954
31954
|
xMax: H,
|
|
31955
31955
|
yMax: H,
|
|
31956
|
-
macStyle: new
|
|
31956
|
+
macStyle: new li(d, [
|
|
31957
31957
|
"bold",
|
|
31958
31958
|
"italic",
|
|
31959
31959
|
"underline",
|
|
@@ -32577,7 +32577,7 @@ var td = new Pe(d, {
|
|
|
32577
32577
|
xAvgCharWidth: H,
|
|
32578
32578
|
usWeightClass: d,
|
|
32579
32579
|
usWidthClass: d,
|
|
32580
|
-
fsType: new
|
|
32580
|
+
fsType: new li(d, [
|
|
32581
32581
|
null,
|
|
32582
32582
|
"noEmbedding",
|
|
32583
32583
|
"viewOnly",
|
|
@@ -32603,7 +32603,7 @@ var td = new Pe(d, {
|
|
|
32603
32603
|
panose: new C(ee, 10),
|
|
32604
32604
|
ulCharRange: new C(V, 4),
|
|
32605
32605
|
vendorID: new je(4),
|
|
32606
|
-
fsSelection: new
|
|
32606
|
+
fsSelection: new li(d, [
|
|
32607
32607
|
"italic",
|
|
32608
32608
|
"underscore",
|
|
32609
32609
|
"negative",
|
|
@@ -32714,8 +32714,8 @@ vl.preEncode = function() {
|
|
|
32714
32714
|
};
|
|
32715
32715
|
var iS = vl, aS = new E({
|
|
32716
32716
|
controlValueProgram: new C(ee)
|
|
32717
|
-
}), sS = new C(new
|
|
32718
|
-
class
|
|
32717
|
+
}), sS = new C(new bi());
|
|
32718
|
+
class mi {
|
|
32719
32719
|
getCFFVersion(t) {
|
|
32720
32720
|
for (; t && !t.hdrSize; ) t = t.parent;
|
|
32721
32721
|
return t ? t.version : -1;
|
|
@@ -32746,7 +32746,7 @@ class gi {
|
|
|
32746
32746
|
size(t, i) {
|
|
32747
32747
|
let a = 2;
|
|
32748
32748
|
if (t.length === 0) return a;
|
|
32749
|
-
let s = this.type || new
|
|
32749
|
+
let s = this.type || new bi(), r = 1;
|
|
32750
32750
|
for (let o = 0; o < t.length; o++) {
|
|
32751
32751
|
let l = t[o];
|
|
32752
32752
|
r += s.size(l, i);
|
|
@@ -32761,7 +32761,7 @@ class gi {
|
|
|
32761
32761
|
}
|
|
32762
32762
|
encode(t, i, a) {
|
|
32763
32763
|
if (t.writeUInt16BE(i.length), i.length === 0) return;
|
|
32764
|
-
let s = this.type || new
|
|
32764
|
+
let s = this.type || new bi(), r = [], n = 1;
|
|
32765
32765
|
for (let l of i) {
|
|
32766
32766
|
let c = s.size(l, a);
|
|
32767
32767
|
r.push(c), n += c;
|
|
@@ -33138,7 +33138,7 @@ var Po = new Cn([
|
|
|
33138
33138
|
[
|
|
33139
33139
|
19,
|
|
33140
33140
|
"Subrs",
|
|
33141
|
-
new ni(new
|
|
33141
|
+
new ni(new mi(), {
|
|
33142
33142
|
type: "local"
|
|
33143
33143
|
}),
|
|
33144
33144
|
null
|
|
@@ -34563,7 +34563,7 @@ let id = [
|
|
|
34563
34563
|
})
|
|
34564
34564
|
}), od = new C(hS, d), pS = new E({
|
|
34565
34565
|
markAttachmentType: ee,
|
|
34566
|
-
flags: new
|
|
34566
|
+
flags: new li(ee, [
|
|
34567
34567
|
"rightToLeft",
|
|
34568
34568
|
"ignoreBaseGlyphs",
|
|
34569
34569
|
"ignoreLigatures",
|
|
@@ -34777,7 +34777,7 @@ let dd = new E({
|
|
|
34777
34777
|
}));
|
|
34778
34778
|
class jc extends C {
|
|
34779
34779
|
decode(t, i) {
|
|
34780
|
-
let a =
|
|
34780
|
+
let a = wi(this.length, t, i), s = 0, r = [];
|
|
34781
34781
|
for (; s < a; ) {
|
|
34782
34782
|
let n = this.type.decode(t, i);
|
|
34783
34783
|
n.offset = s, s += n.nLeft + 1, r.push(n);
|
|
@@ -35054,7 +35054,7 @@ let gd = new Cn([
|
|
|
35054
35054
|
[
|
|
35055
35055
|
17,
|
|
35056
35056
|
"CharStrings",
|
|
35057
|
-
new ni(new
|
|
35057
|
+
new ni(new mi()),
|
|
35058
35058
|
null
|
|
35059
35059
|
],
|
|
35060
35060
|
[
|
|
@@ -35160,7 +35160,7 @@ let gd = new Cn([
|
|
|
35160
35160
|
36
|
|
35161
35161
|
],
|
|
35162
35162
|
"FDArray",
|
|
35163
|
-
new ni(new
|
|
35163
|
+
new ni(new mi(gd)),
|
|
35164
35164
|
null
|
|
35165
35165
|
],
|
|
35166
35166
|
[
|
|
@@ -35195,7 +35195,7 @@ let gd = new Cn([
|
|
|
35195
35195
|
[
|
|
35196
35196
|
17,
|
|
35197
35197
|
"CharStrings",
|
|
35198
|
-
new ni(new
|
|
35198
|
+
new ni(new mi()),
|
|
35199
35199
|
null
|
|
35200
35200
|
],
|
|
35201
35201
|
[
|
|
@@ -35213,7 +35213,7 @@ let gd = new Cn([
|
|
|
35213
35213
|
36
|
|
35214
35214
|
],
|
|
35215
35215
|
"FDArray",
|
|
35216
|
-
new ni(new
|
|
35216
|
+
new ni(new mi(gd)),
|
|
35217
35217
|
null
|
|
35218
35218
|
],
|
|
35219
35219
|
[
|
|
@@ -35232,16 +35232,16 @@ let gd = new Cn([
|
|
|
35232
35232
|
1: {
|
|
35233
35233
|
hdrSize: ee,
|
|
35234
35234
|
offSize: ee,
|
|
35235
|
-
nameIndex: new
|
|
35236
|
-
topDictIndex: new
|
|
35237
|
-
stringIndex: new
|
|
35238
|
-
globalSubrIndex: new
|
|
35235
|
+
nameIndex: new mi(new je("length")),
|
|
35236
|
+
topDictIndex: new mi(LS),
|
|
35237
|
+
stringIndex: new mi(new je("length")),
|
|
35238
|
+
globalSubrIndex: new mi()
|
|
35239
35239
|
},
|
|
35240
35240
|
2: {
|
|
35241
35241
|
hdrSize: ee,
|
|
35242
35242
|
length: d,
|
|
35243
35243
|
topDict: US,
|
|
35244
|
-
globalSubrIndex: new
|
|
35244
|
+
globalSubrIndex: new mi()
|
|
35245
35245
|
}
|
|
35246
35246
|
});
|
|
35247
35247
|
var md = ZS;
|
|
@@ -35397,16 +35397,16 @@ new Pe("version", {
|
|
|
35397
35397
|
17: {
|
|
35398
35398
|
metrics: ur,
|
|
35399
35399
|
dataLen: V,
|
|
35400
|
-
data: new
|
|
35400
|
+
data: new bi("dataLen")
|
|
35401
35401
|
},
|
|
35402
35402
|
18: {
|
|
35403
35403
|
metrics: Da,
|
|
35404
35404
|
dataLen: V,
|
|
35405
|
-
data: new
|
|
35405
|
+
data: new bi("dataLen")
|
|
35406
35406
|
},
|
|
35407
35407
|
19: {
|
|
35408
35408
|
dataLen: V,
|
|
35409
|
-
data: new
|
|
35409
|
+
data: new bi("dataLen")
|
|
35410
35410
|
}
|
|
35411
35411
|
});
|
|
35412
35412
|
let Xc = new E({
|
|
@@ -35467,7 +35467,7 @@ let Xc = new E({
|
|
|
35467
35467
|
ppemX: ee,
|
|
35468
35468
|
ppemY: ee,
|
|
35469
35469
|
bitDepth: ee,
|
|
35470
|
-
flags: new
|
|
35470
|
+
flags: new li(ee, [
|
|
35471
35471
|
"horizontal",
|
|
35472
35472
|
"vertical"
|
|
35473
35473
|
])
|
|
@@ -35484,7 +35484,7 @@ let qS = new E({
|
|
|
35484
35484
|
});
|
|
35485
35485
|
var JS = new E({
|
|
35486
35486
|
version: d,
|
|
35487
|
-
flags: new
|
|
35487
|
+
flags: new li(d, [
|
|
35488
35488
|
"renderOutlines"
|
|
35489
35489
|
]),
|
|
35490
35490
|
numImgTables: V,
|
|
@@ -35637,7 +35637,7 @@ var m5 = new Pe(V, {
|
|
|
35637
35637
|
itemVariationStore: new S(V, Sn)
|
|
35638
35638
|
}
|
|
35639
35639
|
});
|
|
35640
|
-
let Va = new
|
|
35640
|
+
let Va = new li(d, [
|
|
35641
35641
|
"xPlacement",
|
|
35642
35642
|
"yPlacement",
|
|
35643
35643
|
"xAdvance",
|
|
@@ -35915,7 +35915,7 @@ class D5 {
|
|
|
35915
35915
|
}
|
|
35916
35916
|
}
|
|
35917
35917
|
size(t, i) {
|
|
35918
|
-
return
|
|
35918
|
+
return wi(this._size, null, i);
|
|
35919
35919
|
}
|
|
35920
35920
|
constructor(t) {
|
|
35921
35921
|
this._size = t;
|
|
@@ -35945,7 +35945,7 @@ let B5 = new E({
|
|
|
35945
35945
|
}), U5 = new E({
|
|
35946
35946
|
reserved: new at(d, 2),
|
|
35947
35947
|
cbSignature: V,
|
|
35948
|
-
signature: new
|
|
35948
|
+
signature: new bi("cbSignature")
|
|
35949
35949
|
});
|
|
35950
35950
|
var Z5 = new E({
|
|
35951
35951
|
ulVersion: V,
|
|
@@ -35956,7 +35956,7 @@ var Z5 = new E({
|
|
|
35956
35956
|
});
|
|
35957
35957
|
let G5 = new E({
|
|
35958
35958
|
rangeMaxPPEM: d,
|
|
35959
|
-
rangeGaspBehavior: new
|
|
35959
|
+
rangeGaspBehavior: new li(d, [
|
|
35960
35960
|
"grayscale",
|
|
35961
35961
|
"gridfit",
|
|
35962
35962
|
"symmetricSmoothing",
|
|
@@ -36030,7 +36030,7 @@ let H5 = new E({
|
|
|
36030
36030
|
subVersion: d,
|
|
36031
36031
|
length: d,
|
|
36032
36032
|
format: ee,
|
|
36033
|
-
coverage: new
|
|
36033
|
+
coverage: new li(ee, [
|
|
36034
36034
|
"horizontal",
|
|
36035
36035
|
"minimum",
|
|
36036
36036
|
"crossStream",
|
|
@@ -36042,7 +36042,7 @@ let H5 = new E({
|
|
|
36042
36042
|
},
|
|
36043
36043
|
1: {
|
|
36044
36044
|
length: V,
|
|
36045
|
-
coverage: new
|
|
36045
|
+
coverage: new li(ee, [
|
|
36046
36046
|
null,
|
|
36047
36047
|
null,
|
|
36048
36048
|
null,
|
|
@@ -36169,7 +36169,7 @@ class l6 {
|
|
|
36169
36169
|
this.type = t, this.stream = i, this.parent = a, this.base = this.stream.pos, this._items = [];
|
|
36170
36170
|
}
|
|
36171
36171
|
}
|
|
36172
|
-
class
|
|
36172
|
+
class yi extends C {
|
|
36173
36173
|
decode(t, i) {
|
|
36174
36174
|
return new l6(this.type, t, i);
|
|
36175
36175
|
}
|
|
@@ -36215,7 +36215,7 @@ let ji = function(e = d) {
|
|
|
36215
36215
|
});
|
|
36216
36216
|
return new Pe(d, {
|
|
36217
36217
|
0: {
|
|
36218
|
-
values: new
|
|
36218
|
+
values: new yi(e)
|
|
36219
36219
|
// length == number of glyphs maybe?
|
|
36220
36220
|
},
|
|
36221
36221
|
2: {
|
|
@@ -36241,12 +36241,12 @@ function dr(e = {}, t = d) {
|
|
|
36241
36241
|
let i = Object.assign({
|
|
36242
36242
|
newState: d,
|
|
36243
36243
|
flags: d
|
|
36244
|
-
}, e), a = new E(i), s = new
|
|
36244
|
+
}, e), a = new E(i), s = new yi(new C(d, (n) => n.nClasses));
|
|
36245
36245
|
return new E({
|
|
36246
36246
|
nClasses: V,
|
|
36247
36247
|
classTable: new S(V, new ji(t)),
|
|
36248
36248
|
stateArray: new S(V, s),
|
|
36249
|
-
entryTable: new S(V, new
|
|
36249
|
+
entryTable: new S(V, new yi(a))
|
|
36250
36250
|
});
|
|
36251
36251
|
}
|
|
36252
36252
|
function c6(e = {}, t = d) {
|
|
@@ -36261,12 +36261,12 @@ function c6(e = {}, t = d) {
|
|
|
36261
36261
|
// convert offset to stateArray index
|
|
36262
36262
|
newState: (o) => (o.newStateOffset - (o.parent.stateArray.base - o.parent._startOffset)) / o.parent.nClasses,
|
|
36263
36263
|
flags: d
|
|
36264
|
-
}, e), s = new E(a), r = new
|
|
36264
|
+
}, e), s = new E(a), r = new yi(new C(ee, (o) => o.nClasses));
|
|
36265
36265
|
return new E({
|
|
36266
36266
|
nClasses: d,
|
|
36267
36267
|
classTable: new S(d, i),
|
|
36268
36268
|
stateArray: new S(d, r),
|
|
36269
|
-
entryTable: new S(d, new
|
|
36269
|
+
entryTable: new S(d, new yi(s))
|
|
36270
36270
|
});
|
|
36271
36271
|
}
|
|
36272
36272
|
let f6 = new Pe("format", {
|
|
@@ -36303,7 +36303,7 @@ let d6 = new E({
|
|
|
36303
36303
|
settingTable: new S(V, new C(d6, "nSettings"), {
|
|
36304
36304
|
type: "parent"
|
|
36305
36305
|
}),
|
|
36306
|
-
featureFlags: new
|
|
36306
|
+
featureFlags: new li(ee, [
|
|
36307
36307
|
null,
|
|
36308
36308
|
null,
|
|
36309
36309
|
null,
|
|
@@ -36446,7 +36446,7 @@ let F6 = {
|
|
|
36446
36446
|
currentInsertIndex: d,
|
|
36447
36447
|
markedInsertIndex: d
|
|
36448
36448
|
}, E6 = new E({
|
|
36449
|
-
items: new
|
|
36449
|
+
items: new yi(new S(V, new ji()))
|
|
36450
36450
|
}), O6 = new Pe("type", {
|
|
36451
36451
|
0: {
|
|
36452
36452
|
stateTable: new dr()
|
|
@@ -36457,16 +36457,16 @@ let F6 = {
|
|
|
36457
36457
|
},
|
|
36458
36458
|
2: {
|
|
36459
36459
|
stateTable: new dr(F6),
|
|
36460
|
-
ligatureActions: new S(V, new
|
|
36461
|
-
components: new S(V, new
|
|
36462
|
-
ligatureList: new S(V, new
|
|
36460
|
+
ligatureActions: new S(V, new yi(V)),
|
|
36461
|
+
components: new S(V, new yi(d)),
|
|
36462
|
+
ligatureList: new S(V, new yi(d))
|
|
36463
36463
|
},
|
|
36464
36464
|
4: {
|
|
36465
36465
|
lookupTable: new ji()
|
|
36466
36466
|
},
|
|
36467
36467
|
5: {
|
|
36468
36468
|
stateTable: new dr(P6),
|
|
36469
|
-
insertionActions: new S(V, new
|
|
36469
|
+
insertionActions: new S(V, new yi(d))
|
|
36470
36470
|
}
|
|
36471
36471
|
}), M6 = new E({
|
|
36472
36472
|
length: V,
|
|
@@ -38815,7 +38815,7 @@ class Xr {
|
|
|
38815
38815
|
this.font = t, this.table = i, this.script = null, this.scriptTag = null, this.language = null, this.languageTag = null, this.features = {}, this.lookups = {}, this.variationsIndex = t._variationProcessor ? this.findVariationsIndex(t._variationProcessor.normalizedCoords) : -1, this.selectScript(), this.glyphs = [], this.positions = [], this.ligatureID = 1, this.currentFeature = null;
|
|
38816
38816
|
}
|
|
38817
38817
|
}
|
|
38818
|
-
class
|
|
38818
|
+
class ci {
|
|
38819
38819
|
get id() {
|
|
38820
38820
|
return this._id;
|
|
38821
38821
|
}
|
|
@@ -38829,7 +38829,7 @@ class li {
|
|
|
38829
38829
|
this.isMark = this.codePoints.length > 0 && this.codePoints.every(j0), this.isBase = !this.isMark, this.isLigature = this.codePoints.length > 1, this.markAttachmentType = 0;
|
|
38830
38830
|
}
|
|
38831
38831
|
copy() {
|
|
38832
|
-
return new
|
|
38832
|
+
return new ci(this._font, this.id, this.codePoints, this.features);
|
|
38833
38833
|
}
|
|
38834
38834
|
constructor(t, i, a = [], s) {
|
|
38835
38835
|
if (this._font = t, this.codePoints = a, this.id = i, this.features = {}, Array.isArray(s)) for (let r = 0; r < s.length; r++) {
|
|
@@ -38853,7 +38853,7 @@ class Ad extends Hi {
|
|
|
38853
38853
|
for (; s < i.length; ) {
|
|
38854
38854
|
let r, o = i[s].codePoints[0], l = Qr(o);
|
|
38855
38855
|
switch ([r, a] = W8[a][l], r) {
|
|
38856
|
-
case
|
|
38856
|
+
case Ai:
|
|
38857
38857
|
t.font.hasGlyphForCodePoint(o) || (s = Vd(i, s, t.font));
|
|
38858
38858
|
break;
|
|
38859
38859
|
case Ro:
|
|
@@ -38875,7 +38875,7 @@ const Ja = 44032, Cd = 55204, V8 = Cd - Ja + 1, _n = 4352, In = 4449, ua = 4519,
|
|
|
38875
38875
|
function Qr(e) {
|
|
38876
38876
|
return P8(e) ? Z8 : E8(e) ? qr : O8(e) ? Cl : D8(e) ? Jr : R8(e) ? Sd : M8(e) ? G8 : U8;
|
|
38877
38877
|
}
|
|
38878
|
-
const Wt = 0,
|
|
38878
|
+
const Wt = 0, Ai = 1, Ro = 2, Do = 4, zo = 5, W8 = [
|
|
38879
38879
|
// X L V T LV LVT M
|
|
38880
38880
|
// State 0: start state
|
|
38881
38881
|
[
|
|
@@ -38896,11 +38896,11 @@ const Wt = 0, Ni = 1, Ro = 2, Do = 4, zo = 5, W8 = [
|
|
|
38896
38896
|
0
|
|
38897
38897
|
],
|
|
38898
38898
|
[
|
|
38899
|
-
|
|
38899
|
+
Ai,
|
|
38900
38900
|
2
|
|
38901
38901
|
],
|
|
38902
38902
|
[
|
|
38903
|
-
|
|
38903
|
+
Ai,
|
|
38904
38904
|
3
|
|
38905
38905
|
],
|
|
38906
38906
|
[
|
|
@@ -38927,11 +38927,11 @@ const Wt = 0, Ni = 1, Ro = 2, Do = 4, zo = 5, W8 = [
|
|
|
38927
38927
|
0
|
|
38928
38928
|
],
|
|
38929
38929
|
[
|
|
38930
|
-
|
|
38930
|
+
Ai,
|
|
38931
38931
|
2
|
|
38932
38932
|
],
|
|
38933
38933
|
[
|
|
38934
|
-
|
|
38934
|
+
Ai,
|
|
38935
38935
|
3
|
|
38936
38936
|
],
|
|
38937
38937
|
[
|
|
@@ -38958,11 +38958,11 @@ const Wt = 0, Ni = 1, Ro = 2, Do = 4, zo = 5, W8 = [
|
|
|
38958
38958
|
3
|
|
38959
38959
|
],
|
|
38960
38960
|
[
|
|
38961
|
-
|
|
38961
|
+
Ai,
|
|
38962
38962
|
2
|
|
38963
38963
|
],
|
|
38964
38964
|
[
|
|
38965
|
-
|
|
38965
|
+
Ai,
|
|
38966
38966
|
3
|
|
38967
38967
|
],
|
|
38968
38968
|
[
|
|
@@ -38989,11 +38989,11 @@ const Wt = 0, Ni = 1, Ro = 2, Do = 4, zo = 5, W8 = [
|
|
|
38989
38989
|
0
|
|
38990
38990
|
],
|
|
38991
38991
|
[
|
|
38992
|
-
|
|
38992
|
+
Ai,
|
|
38993
38993
|
2
|
|
38994
38994
|
],
|
|
38995
38995
|
[
|
|
38996
|
-
|
|
38996
|
+
Ai,
|
|
38997
38997
|
3
|
|
38998
38998
|
],
|
|
38999
38999
|
[
|
|
@@ -39003,7 +39003,7 @@ const Wt = 0, Ni = 1, Ro = 2, Do = 4, zo = 5, W8 = [
|
|
|
39003
39003
|
]
|
|
39004
39004
|
];
|
|
39005
39005
|
function As(e, t, i) {
|
|
39006
|
-
return new
|
|
39006
|
+
return new ci(e, e.glyphForCodePoint(t).id, [
|
|
39007
39007
|
t
|
|
39008
39008
|
], i);
|
|
39009
39009
|
}
|
|
@@ -39256,7 +39256,7 @@ class xt extends Hi {
|
|
|
39256
39256
|
if (r) {
|
|
39257
39257
|
let n = r.map((o) => {
|
|
39258
39258
|
let l = t.font.glyphForCodePoint(o);
|
|
39259
|
-
return new
|
|
39259
|
+
return new ci(t.font, l.id, [
|
|
39260
39260
|
o
|
|
39261
39261
|
], i[a].features);
|
|
39262
39262
|
});
|
|
@@ -39296,13 +39296,13 @@ function $8(e, t) {
|
|
|
39296
39296
|
function ia(e) {
|
|
39297
39297
|
return e.shaperInfo.category & K8;
|
|
39298
39298
|
}
|
|
39299
|
-
function
|
|
39299
|
+
function pi(e) {
|
|
39300
39300
|
return e.shaperInfo.category & Id;
|
|
39301
39301
|
}
|
|
39302
|
-
function
|
|
39302
|
+
function Ni(e) {
|
|
39303
39303
|
return e.shaperInfo.category & Cs;
|
|
39304
39304
|
}
|
|
39305
|
-
function
|
|
39305
|
+
function Si(e, t) {
|
|
39306
39306
|
for (let a of e) a.features = {
|
|
39307
39307
|
[t]: !0
|
|
39308
39308
|
};
|
|
@@ -39316,12 +39316,12 @@ function e9(e, t, i) {
|
|
|
39316
39316
|
t,
|
|
39317
39317
|
i
|
|
39318
39318
|
];
|
|
39319
|
-
return
|
|
39319
|
+
return Si(a.slice(0, 2), "blwf") || Si(a.slice(1, 3), "blwf") ? ye.Below_C : Si(a.slice(0, 2), "pstf") || Si(a.slice(1, 3), "pstf") || Si(a.slice(0, 2), "pref") || Si(a.slice(1, 3), "pref") ? ye.Post_C : ye.Base_C;
|
|
39320
39320
|
}
|
|
39321
39321
|
function t9(e, t, i) {
|
|
39322
39322
|
let a = i.indicConfig, s = e._layoutEngine.engine.GSUBProcessor.features, r = e.glyphForCodePoint(9676).id, n = e.glyphForCodePoint(a.virama).id;
|
|
39323
39323
|
if (n) {
|
|
39324
|
-
let o = new
|
|
39324
|
+
let o = new ci(e, n, [
|
|
39325
39325
|
a.virama
|
|
39326
39326
|
]);
|
|
39327
39327
|
for (let l = 0; l < t.length; l++) t[l].shaperInfo.position === ye.Base_C && (t[l].shaperInfo.position = e9(e, t[l].copy(), o));
|
|
@@ -39330,7 +39330,7 @@ function t9(e, t, i) {
|
|
|
39330
39330
|
let { category: c, syllableType: f } = t[o].shaperInfo;
|
|
39331
39331
|
if (f === "symbol_cluster" || f === "non_indic_cluster") continue;
|
|
39332
39332
|
if (f === "broken_cluster" && r) {
|
|
39333
|
-
let w = new
|
|
39333
|
+
let w = new ci(e, r, [
|
|
39334
39334
|
9676
|
|
39335
39335
|
]);
|
|
39336
39336
|
w.shaperInfo = new Cr(1 << Lo(w), Td(w), t[o].shaperInfo.syllableType, t[o].shaperInfo.syllable);
|
|
@@ -39339,18 +39339,18 @@ function t9(e, t, i) {
|
|
|
39339
39339
|
t.splice(P++, 0, w), l++;
|
|
39340
39340
|
}
|
|
39341
39341
|
let u = l, h = o, m = !1;
|
|
39342
|
-
if (a.rephPos !== ye.Ra_To_Become_Reph && s.rphf && o + 3 <= l && (a.rephMode === "Implicit" && !
|
|
39342
|
+
if (a.rephPos !== ye.Ra_To_Become_Reph && s.rphf && o + 3 <= l && (a.rephMode === "Implicit" && !pi(t[o + 2]) || a.rephMode === "Explicit" && t[o + 2].shaperInfo.category === Ee.ZWJ)) {
|
|
39343
39343
|
let w = [
|
|
39344
39344
|
t[o].copy(),
|
|
39345
39345
|
t[o + 1].copy(),
|
|
39346
39346
|
t[o + 2].copy()
|
|
39347
39347
|
];
|
|
39348
|
-
if (
|
|
39349
|
-
for (h += 2; h < l &&
|
|
39348
|
+
if (Si(w.slice(0, 2), "rphf") || a.rephMode === "Explicit" && Si(w, "rphf")) {
|
|
39349
|
+
for (h += 2; h < l && pi(t[h]); ) h++;
|
|
39350
39350
|
u = o, m = !0;
|
|
39351
39351
|
}
|
|
39352
39352
|
} else if (a.rephMode === "Log_Repha" && t[o].shaperInfo.category === Ee.Repha) {
|
|
39353
|
-
for (h++; h < l &&
|
|
39353
|
+
for (h++; h < l && pi(t[h]); ) h++;
|
|
39354
39354
|
u = o, m = !0;
|
|
39355
39355
|
}
|
|
39356
39356
|
switch (a.basePos) {
|
|
@@ -39437,13 +39437,13 @@ function t9(e, t, i) {
|
|
|
39437
39437
|
t[w].copy(),
|
|
39438
39438
|
t[w + 1].copy()
|
|
39439
39439
|
];
|
|
39440
|
-
if (
|
|
39440
|
+
if (Si(P, "pref")) {
|
|
39441
39441
|
for (let y = 0; y < O; y++) t[w++].features.pref = !0;
|
|
39442
39442
|
if (s.cfar) for (; w < l; w++) t[w].features.cfar = !0;
|
|
39443
39443
|
break;
|
|
39444
39444
|
}
|
|
39445
39445
|
}
|
|
39446
|
-
for (let w = o + 1; w < l; w++) if (
|
|
39446
|
+
for (let w = o + 1; w < l; w++) if (pi(t[w])) {
|
|
39447
39447
|
let P = t[w].shaperInfo.category === Ee.ZWNJ, y = w;
|
|
39448
39448
|
do
|
|
39449
39449
|
y--, P && delete t[y].features.half;
|
|
@@ -39459,16 +39459,16 @@ function i9(e, t, i) {
|
|
|
39459
39459
|
if (o && l + 1 < n) {
|
|
39460
39460
|
for (let c = l + 1; c < n; c++) if (t[c].features.pref) {
|
|
39461
39461
|
if (!(t[c].substituted && t[c].isLigated && !t[c].isMultiplied)) {
|
|
39462
|
-
for (l = c; l < n &&
|
|
39462
|
+
for (l = c; l < n && Ni(t[l]); ) l++;
|
|
39463
39463
|
t[l].shaperInfo.position = ye.BASE_C, o = !1;
|
|
39464
39464
|
}
|
|
39465
39465
|
break;
|
|
39466
39466
|
}
|
|
39467
39467
|
}
|
|
39468
39468
|
if (i.unicodeScript === "Malayalam") for (let c = l + 1; c < n; c++) {
|
|
39469
|
-
for (; c < n &&
|
|
39470
|
-
if (c === n || !
|
|
39471
|
-
for (c++; c < n &&
|
|
39469
|
+
for (; c < n && pi(t[c]); ) c++;
|
|
39470
|
+
if (c === n || !Ni(t[c])) break;
|
|
39471
|
+
for (c++; c < n && pi(t[c]); ) c++;
|
|
39472
39472
|
c < n && ia(t[c]) && t[c].shaperInfo.position === ye.Below_C && (l = c, t[l].shaperInfo.position = ye.Base_C);
|
|
39473
39473
|
}
|
|
39474
39474
|
r < l && t[l].shaperInfo.position > ye.Base_C && l--;
|
|
@@ -39479,7 +39479,7 @@ function i9(e, t, i) {
|
|
|
39479
39479
|
let c = l === n ? l - 2 : l - 1;
|
|
39480
39480
|
if (i.unicodeScript !== "Malayalam" && i.unicodeScript !== "Tamil") {
|
|
39481
39481
|
for (; c > r && !(t[c].shaperInfo.category & (Ee.M | Cs)); ) c--;
|
|
39482
|
-
|
|
39482
|
+
Ni(t[c]) && t[c].shaperInfo.position !== ye.Pre_M ? c + 1 < n && pi(t[c + 1]) && c++ : c = r;
|
|
39483
39483
|
}
|
|
39484
39484
|
if (r < c && t[c].shaperInfo.position !== ye.Pre_M) {
|
|
39485
39485
|
for (let f = c; f > r; f--) if (t[f - 1].shaperInfo.position === ye.Pre_M) {
|
|
@@ -39493,8 +39493,8 @@ function i9(e, t, i) {
|
|
|
39493
39493
|
if (r + 1 < n && t[r].shaperInfo.position === ye.Ra_To_Become_Reph && t[r].shaperInfo.category === Ee.Repha !== (t[r].isLigated && !t[r].isMultiplied)) {
|
|
39494
39494
|
let c, f = a.rephPos, u = !1;
|
|
39495
39495
|
if (f !== ye.After_Post) {
|
|
39496
|
-
for (c = r + 1; c < l && !
|
|
39497
|
-
if (c < l &&
|
|
39496
|
+
for (c = r + 1; c < l && !Ni(t[c]); ) c++;
|
|
39497
|
+
if (c < l && Ni(t[c]) && (c + 1 < l && pi(t[c + 1]) && c++, u = !0), !u && f === ye.After_Main) {
|
|
39498
39498
|
for (c = l; c + 1 < n && t[c + 1].shaperInfo.position <= ye.After_Main; ) c++;
|
|
39499
39499
|
u = c < n;
|
|
39500
39500
|
}
|
|
@@ -39504,12 +39504,12 @@ function i9(e, t, i) {
|
|
|
39504
39504
|
}
|
|
39505
39505
|
}
|
|
39506
39506
|
if (!u) {
|
|
39507
|
-
for (c = r + 1; c < l && !
|
|
39508
|
-
c < l &&
|
|
39507
|
+
for (c = r + 1; c < l && !Ni(t[c]); ) c++;
|
|
39508
|
+
c < l && Ni(t[c]) && (c + 1 < l && pi(t[c + 1]) && c++, u = !0);
|
|
39509
39509
|
}
|
|
39510
39510
|
if (!u) {
|
|
39511
39511
|
for (c = n - 1; c > r && t[c].shaperInfo.position === ye.SMVD; ) c--;
|
|
39512
|
-
if (
|
|
39512
|
+
if (Ni(t[c]))
|
|
39513
39513
|
for (let m = l + 1; m < c; m++) t[m].shaperInfo.category === Ee.M && c--;
|
|
39514
39514
|
}
|
|
39515
39515
|
let h = t[r];
|
|
@@ -39529,7 +39529,7 @@ function i9(e, t, i) {
|
|
|
39529
39529
|
}
|
|
39530
39530
|
}
|
|
39531
39531
|
}
|
|
39532
|
-
f > r &&
|
|
39532
|
+
f > r && Ni(t[f - 1]) && f < n && pi(t[f]) && f++;
|
|
39533
39533
|
let u = c, h = t[u];
|
|
39534
39534
|
t.splice(f + 1, 0, ...t.splice(f, u - f)), t[f] = h, f <= l && l < u && l++;
|
|
39535
39535
|
}
|
|
@@ -39581,7 +39581,7 @@ class Te extends Hi {
|
|
|
39581
39581
|
if (pf[s]) {
|
|
39582
39582
|
let r = pf[s].map((n) => {
|
|
39583
39583
|
let o = t.font.glyphForCodePoint(n);
|
|
39584
|
-
return new
|
|
39584
|
+
return new ci(t.font, o.id, [
|
|
39585
39585
|
n
|
|
39586
39586
|
], i[a].features);
|
|
39587
39587
|
});
|
|
@@ -39623,7 +39623,7 @@ function f9(e, t) {
|
|
|
39623
39623
|
let r, n, o = t[a].shaperInfo, l = o.syllableType;
|
|
39624
39624
|
if (!(l !== "virama_terminated_cluster" && l !== "standard_cluster" && l !== "broken_cluster")) {
|
|
39625
39625
|
if (l === "broken_cluster" && i) {
|
|
39626
|
-
let c = new
|
|
39626
|
+
let c = new ci(e, i, [
|
|
39627
39627
|
9676
|
|
39628
39628
|
]);
|
|
39629
39629
|
for (c.shaperInfo = o, r = a; r < s && t[r].shaperInfo.category === "R"; r++) ;
|
|
@@ -39765,7 +39765,7 @@ class h9 extends Xr {
|
|
|
39765
39765
|
return this.glyphs.splice(this.glyphIterator.index, 1), !0;
|
|
39766
39766
|
this.glyphIterator.cur.id = r[0], this.glyphIterator.cur.ligatureComponent = 0;
|
|
39767
39767
|
let n = this.glyphIterator.cur.features, o = this.glyphIterator.cur, l = r.slice(1).map((c, f) => {
|
|
39768
|
-
let u = new
|
|
39768
|
+
let u = new ci(this.font, c, void 0, n);
|
|
39769
39769
|
return u.shaperInfo = o.shaperInfo, u.isLigated = o.isLigated, u.ligatureComponent = f + 1, u.substituted = !0, u.isMultiplied = !0, u;
|
|
39770
39770
|
});
|
|
39771
39771
|
return this.glyphs.splice(this.glyphIterator.index + 1, 0, ...l), !0;
|
|
@@ -39788,7 +39788,7 @@ class h9 extends Xr {
|
|
|
39788
39788
|
if (!n) continue;
|
|
39789
39789
|
let o = this.glyphIterator.cur, l = o.codePoints.slice();
|
|
39790
39790
|
for (let M of n) l.push(...this.glyphs[M].codePoints);
|
|
39791
|
-
let c = new
|
|
39791
|
+
let c = new ci(this.font, r.glyph, l, o.features);
|
|
39792
39792
|
c.shaperInfo = o.shaperInfo, c.isLigated = !0, c.substituted = !0;
|
|
39793
39793
|
let f = o.isMark;
|
|
39794
39794
|
for (let M = 0; M < n.length && f; M++) f = this.glyphs[n[M]].isMark;
|
|
@@ -39964,7 +39964,7 @@ class p9 extends Xr {
|
|
|
39964
39964
|
}
|
|
39965
39965
|
class g9 {
|
|
39966
39966
|
setup(t) {
|
|
39967
|
-
this.glyphInfos = t.glyphs.map((a) => new
|
|
39967
|
+
this.glyphInfos = t.glyphs.map((a) => new ci(this.font, a.id, [
|
|
39968
39968
|
...a.codePoints
|
|
39969
39969
|
]));
|
|
39970
39970
|
let i = null;
|
|
@@ -40485,7 +40485,7 @@ var ps = [
|
|
|
40485
40485
|
"ccaron",
|
|
40486
40486
|
"dcroat"
|
|
40487
40487
|
];
|
|
40488
|
-
class
|
|
40488
|
+
class vi {
|
|
40489
40489
|
_getPath() {
|
|
40490
40490
|
return new as();
|
|
40491
40491
|
}
|
|
@@ -40615,22 +40615,22 @@ class wi {
|
|
|
40615
40615
|
}
|
|
40616
40616
|
Et([
|
|
40617
40617
|
Ot
|
|
40618
|
-
],
|
|
40618
|
+
], vi.prototype, "cbox", null);
|
|
40619
40619
|
Et([
|
|
40620
40620
|
Ot
|
|
40621
|
-
],
|
|
40621
|
+
], vi.prototype, "bbox", null);
|
|
40622
40622
|
Et([
|
|
40623
40623
|
Ot
|
|
40624
|
-
],
|
|
40624
|
+
], vi.prototype, "path", null);
|
|
40625
40625
|
Et([
|
|
40626
40626
|
Ot
|
|
40627
|
-
],
|
|
40627
|
+
], vi.prototype, "advanceWidth", null);
|
|
40628
40628
|
Et([
|
|
40629
40629
|
Ot
|
|
40630
|
-
],
|
|
40630
|
+
], vi.prototype, "advanceHeight", null);
|
|
40631
40631
|
Et([
|
|
40632
40632
|
Ot
|
|
40633
|
-
],
|
|
40633
|
+
], vi.prototype, "name", null);
|
|
40634
40634
|
let wf = new E({
|
|
40635
40635
|
numberOfContours: H,
|
|
40636
40636
|
xMin: H,
|
|
@@ -40652,7 +40652,7 @@ class I9 {
|
|
|
40652
40652
|
this.glyphID = t, this.dx = i, this.dy = a, this.pos = 0, this.scaleX = this.scaleY = 1, this.scale01 = this.scale10 = 0;
|
|
40653
40653
|
}
|
|
40654
40654
|
}
|
|
40655
|
-
class Tn extends
|
|
40655
|
+
class Tn extends vi {
|
|
40656
40656
|
// Parses just the glyph header and returns the bounding box
|
|
40657
40657
|
_getCBox(t) {
|
|
40658
40658
|
if (this._font._variationProcessor && !t) return this.path.cbox;
|
|
@@ -40741,7 +40741,7 @@ class Tn extends wi {
|
|
|
40741
40741
|
}
|
|
40742
40742
|
_getPhantomPoints(t) {
|
|
40743
40743
|
let i = this._getCBox(!0);
|
|
40744
|
-
this._metrics == null && (this._metrics =
|
|
40744
|
+
this._metrics == null && (this._metrics = vi.prototype._getMetrics.call(this, i));
|
|
40745
40745
|
let { advanceWidth: a, advanceHeight: s, leftBearing: r, topBearing: n } = this._metrics;
|
|
40746
40746
|
return [
|
|
40747
40747
|
new ri(!1, !0, t.xMin - r, 0),
|
|
@@ -40814,7 +40814,7 @@ class Tn extends wi {
|
|
|
40814
40814
|
super(...t), Xt(this, "type", "TTF");
|
|
40815
40815
|
}
|
|
40816
40816
|
}
|
|
40817
|
-
class F9 extends
|
|
40817
|
+
class F9 extends vi {
|
|
40818
40818
|
_getName() {
|
|
40819
40819
|
return this._font.CFF2 ? super._getName() : this._font["CFF "].getGlyphName(this.id);
|
|
40820
40820
|
}
|
|
@@ -41058,7 +41058,7 @@ let T9 = new E({
|
|
|
41058
41058
|
originX: d,
|
|
41059
41059
|
originY: d,
|
|
41060
41060
|
type: new je(4),
|
|
41061
|
-
data: new
|
|
41061
|
+
data: new bi((e) => e.parent.buflen - e._currentOffset)
|
|
41062
41062
|
});
|
|
41063
41063
|
class P9 extends Tn {
|
|
41064
41064
|
/**
|
|
@@ -41100,7 +41100,7 @@ class xf {
|
|
|
41100
41100
|
this.glyph = t, this.color = i;
|
|
41101
41101
|
}
|
|
41102
41102
|
}
|
|
41103
|
-
class E9 extends
|
|
41103
|
+
class E9 extends vi {
|
|
41104
41104
|
_getBBox() {
|
|
41105
41105
|
let t = new Yi();
|
|
41106
41106
|
for (let i = 0; i < this.layers.length; i++) {
|
|
@@ -42205,7 +42205,7 @@ class ea {
|
|
|
42205
42205
|
return new Pt(this._buf.decode(t, i));
|
|
42206
42206
|
}
|
|
42207
42207
|
constructor(t) {
|
|
42208
|
-
this.length = t, this._buf = new
|
|
42208
|
+
this.length = t, this._buf = new bi(t);
|
|
42209
42209
|
}
|
|
42210
42210
|
}
|
|
42211
42211
|
let rV = new E({
|
|
@@ -42232,7 +42232,7 @@ function fo(e) {
|
|
|
42232
42232
|
let t = e.readUInt8();
|
|
42233
42233
|
return t === nV ? e.readUInt16BE() : t === lV ? e.readUInt8() + If : t === oV ? e.readUInt8() + If * 2 : t;
|
|
42234
42234
|
}
|
|
42235
|
-
function
|
|
42235
|
+
function ui(e, t) {
|
|
42236
42236
|
return e & 1 ? t : -t;
|
|
42237
42237
|
}
|
|
42238
42238
|
function cV(e, t, i) {
|
|
@@ -42240,21 +42240,21 @@ function cV(e, t, i) {
|
|
|
42240
42240
|
for (let l = 0; l < i; l++) {
|
|
42241
42241
|
let c = 0, f = 0, u = e.readUInt8(), h = !(u >> 7);
|
|
42242
42242
|
if (u &= 127, u < 10)
|
|
42243
|
-
c = 0, f =
|
|
42243
|
+
c = 0, f = ui(u, ((u & 14) << 7) + t.readUInt8());
|
|
42244
42244
|
else if (u < 20)
|
|
42245
|
-
c =
|
|
42245
|
+
c = ui(u, ((u - 10 & 14) << 7) + t.readUInt8()), f = 0;
|
|
42246
42246
|
else if (u < 84) {
|
|
42247
42247
|
var n = u - 20, o = t.readUInt8();
|
|
42248
|
-
c =
|
|
42248
|
+
c = ui(u, 1 + (n & 48) + (o >> 4)), f = ui(u >> 1, 1 + ((n & 12) << 2) + (o & 15));
|
|
42249
42249
|
} else if (u < 120) {
|
|
42250
42250
|
var n = u - 84;
|
|
42251
|
-
c =
|
|
42251
|
+
c = ui(u, 1 + (n / 12 << 8) + t.readUInt8()), f = ui(u >> 1, 1 + (n % 12 >> 2 << 8) + t.readUInt8());
|
|
42252
42252
|
} else if (u < 124) {
|
|
42253
42253
|
var o = t.readUInt8();
|
|
42254
42254
|
let b = t.readUInt8();
|
|
42255
|
-
c =
|
|
42255
|
+
c = ui(u, (o << 4) + (b >> 4)), f = ui(u >> 1, ((b & 15) << 8) + t.readUInt8());
|
|
42256
42256
|
} else
|
|
42257
|
-
c =
|
|
42257
|
+
c = ui(u, t.readUInt16BE()), f = ui(u >> 1, t.readUInt16BE());
|
|
42258
42258
|
s += c, a += f, r.push(new ri(h, !1, s, a));
|
|
42259
42259
|
}
|
|
42260
42260
|
return r;
|
|
@@ -42301,7 +42301,7 @@ class uV {
|
|
|
42301
42301
|
let dV = new je(ee);
|
|
42302
42302
|
new E({
|
|
42303
42303
|
len: V,
|
|
42304
|
-
buf: new
|
|
42304
|
+
buf: new bi("len")
|
|
42305
42305
|
});
|
|
42306
42306
|
let hV = new E({
|
|
42307
42307
|
id: d,
|
|
@@ -44594,7 +44594,7 @@ class za extends ei {
|
|
|
44594
44594
|
super(t, a, tt.RichText);
|
|
44595
44595
|
}
|
|
44596
44596
|
buildCanvasPayload(t, i) {
|
|
44597
|
-
const a = this.clipConfiguration.width || this.edit.size.width, s = this.clipConfiguration.height || this.edit.size.height, r = t.font?.family, { baseFontFamily: n, fontWeight: o } = i ?? (r ?
|
|
44597
|
+
const a = this.clipConfiguration.width || this.edit.size.width, s = this.clipConfiguration.height || this.edit.size.height, r = t.font?.family, { baseFontFamily: n, fontWeight: o } = i ?? (r ? oi(r) : { baseFontFamily: r, fontWeight: 400 }), l = t.font?.weight;
|
|
44598
44598
|
let c = o;
|
|
44599
44599
|
typeof l == "string" ? c = parseInt(l, 10) || o : typeof l == "number" && (c = l);
|
|
44600
44600
|
const f = this.edit.getTimelineFonts(), u = r ? f.find((m) => {
|
|
@@ -44635,14 +44635,17 @@ class za extends ei {
|
|
|
44635
44635
|
return this.fontSupportsBold;
|
|
44636
44636
|
}
|
|
44637
44637
|
resolveFont(t) {
|
|
44638
|
-
const { baseFontFamily: i, fontWeight: a } =
|
|
44639
|
-
|
|
44640
|
-
return
|
|
44638
|
+
const { baseFontFamily: i, fontWeight: a } = oi(t), s = this.edit.getFontUrlByFamilyAndWeight(i, a);
|
|
44639
|
+
if (s)
|
|
44640
|
+
return { url: s, baseFontFamily: i, fontWeight: a };
|
|
44641
|
+
const o = (this.edit.getEdit()?.timeline?.fonts || []).find((c) => {
|
|
44642
|
+
const { full: f, base: u } = Bf(c.src), h = t.toLowerCase();
|
|
44643
|
+
return f.toLowerCase() === h || u.toLowerCase() === h;
|
|
44641
44644
|
});
|
|
44642
|
-
if (
|
|
44643
|
-
return { url:
|
|
44644
|
-
const
|
|
44645
|
-
return
|
|
44645
|
+
if (o)
|
|
44646
|
+
return { url: o.src, baseFontFamily: i, fontWeight: a };
|
|
44647
|
+
const l = Yo(t);
|
|
44648
|
+
return l ? { url: l, baseFontFamily: i, fontWeight: a } : null;
|
|
44646
44649
|
}
|
|
44647
44650
|
reconfigureAfterRestore() {
|
|
44648
44651
|
super.reconfigureAfterRestore(), this.reconfigure(this.clipConfiguration.asset);
|
|
@@ -44676,7 +44679,7 @@ class za extends ei {
|
|
|
44676
44679
|
this.createFallbackText(t);
|
|
44677
44680
|
return;
|
|
44678
44681
|
}
|
|
44679
|
-
const a = t.font?.family, s = a ?
|
|
44682
|
+
const a = t.font?.family, s = a ? oi(a) : void 0, r = this.buildCanvasPayload(t, s);
|
|
44680
44683
|
this.textEngine = await C_({
|
|
44681
44684
|
width: r.width,
|
|
44682
44685
|
height: r.height,
|
|
@@ -44885,7 +44888,7 @@ class S_ extends ei {
|
|
|
44885
44888
|
}
|
|
44886
44889
|
}
|
|
44887
44890
|
const V_ = "https://unpkg.com/@resvg/resvg-wasm@2.6.2/index_bg.wasm";
|
|
44888
|
-
class
|
|
44891
|
+
class Ci extends ei {
|
|
44889
44892
|
static resvgInitialized = !1;
|
|
44890
44893
|
static resvgInitPromise = null;
|
|
44891
44894
|
texture = null;
|
|
@@ -44896,15 +44899,15 @@ class Ai extends ei {
|
|
|
44896
44899
|
super(t, i, tt.Svg);
|
|
44897
44900
|
}
|
|
44898
44901
|
static async initializeResvg() {
|
|
44899
|
-
if (!
|
|
44900
|
-
if (
|
|
44901
|
-
await
|
|
44902
|
+
if (!Ci.resvgInitialized) {
|
|
44903
|
+
if (Ci.resvgInitPromise) {
|
|
44904
|
+
await Ci.resvgInitPromise;
|
|
44902
44905
|
return;
|
|
44903
44906
|
}
|
|
44904
|
-
|
|
44907
|
+
Ci.resvgInitPromise = (async () => {
|
|
44905
44908
|
const i = await (await fetch(V_)).arrayBuffer();
|
|
44906
|
-
await o_(i),
|
|
44907
|
-
})(), await
|
|
44909
|
+
await o_(i), Ci.resvgInitialized = !0;
|
|
44910
|
+
})(), await Ci.resvgInitPromise;
|
|
44908
44911
|
}
|
|
44909
44912
|
}
|
|
44910
44913
|
async load() {
|
|
@@ -44916,7 +44919,7 @@ class Ai extends ei {
|
|
|
44916
44919
|
console.error("SVG asset validation failed:", i.error), this.createFallbackGraphic();
|
|
44917
44920
|
return;
|
|
44918
44921
|
}
|
|
44919
|
-
await
|
|
44922
|
+
await Ci.initializeResvg();
|
|
44920
44923
|
const a = this.clipConfiguration.width || this.edit.size.width, s = this.clipConfiguration.height || this.edit.size.height, r = await N_(t, {
|
|
44921
44924
|
defaultWidth: a,
|
|
44922
44925
|
defaultHeight: s
|
|
@@ -45266,7 +45269,7 @@ class sn {
|
|
|
45266
45269
|
this.hiddenInput && this.hiddenInput.select();
|
|
45267
45270
|
}
|
|
45268
45271
|
}
|
|
45269
|
-
class
|
|
45272
|
+
class di {
|
|
45270
45273
|
static DOUBLE_CLICK_THRESHOLD_MS = 300;
|
|
45271
45274
|
static EDITING_BG_PADDING_PX = 5;
|
|
45272
45275
|
static EDITING_BG_ALPHA = 0.2;
|
|
@@ -45299,7 +45302,7 @@ class ui {
|
|
|
45299
45302
|
}
|
|
45300
45303
|
checkForDoubleClick = (t) => {
|
|
45301
45304
|
const i = Date.now();
|
|
45302
|
-
i - this.lastClickTime <
|
|
45305
|
+
i - this.lastClickTime < di.DOUBLE_CLICK_THRESHOLD_MS && this.startEditing(), this.lastClickTime = i;
|
|
45303
45306
|
};
|
|
45304
45307
|
setupOutsideClickHandler(t) {
|
|
45305
45308
|
this.outsideClickHandler = (i) => {
|
|
@@ -45307,7 +45310,7 @@ class ui {
|
|
|
45307
45310
|
(r < s.x || r > s.x + s.width || n < s.y || n > s.y + s.height) && (this.stopEditing(!0, t), this.outsideClickHandler && (window.removeEventListener("click", this.outsideClickHandler), this.outsideClickHandler = null));
|
|
45308
45311
|
}, setTimeout(() => {
|
|
45309
45312
|
this.outsideClickHandler && window.addEventListener("click", this.outsideClickHandler);
|
|
45310
|
-
},
|
|
45313
|
+
}, di.CLICK_HANDLER_DELAY_MS);
|
|
45311
45314
|
}
|
|
45312
45315
|
createEditingEnvironment() {
|
|
45313
45316
|
this.setupEditingContainer(), this.editingContainer && this.editableText && (this.textCursor = new Vs(this.editingContainer, this.editableText, this.clipConfig), this.textCursor.updatePosition(this.targetText.text.length), this.textCursor.startBlinking()), this.setupTextInputHandler(), this.updateTextAlignment();
|
|
@@ -45315,11 +45318,11 @@ class ui {
|
|
|
45315
45318
|
setupEditingContainer() {
|
|
45316
45319
|
this.editingContainer = new ne.Container(), this.parent.getContainer().addChild(this.editingContainer);
|
|
45317
45320
|
const t = new ne.Graphics();
|
|
45318
|
-
t.fillStyle = { color: 0, alpha:
|
|
45321
|
+
t.fillStyle = { color: 0, alpha: di.EDITING_BG_ALPHA }, t.rect(
|
|
45319
45322
|
-5,
|
|
45320
45323
|
-5,
|
|
45321
|
-
this.targetText.width + 2 *
|
|
45322
|
-
this.targetText.height + 2 *
|
|
45324
|
+
this.targetText.width + 2 * di.EDITING_BG_PADDING_PX,
|
|
45325
|
+
this.targetText.height + 2 * di.EDITING_BG_PADDING_PX
|
|
45323
45326
|
), t.fill(), this.editingContainer.addChild(t), this.editableText = new ne.Text(this.targetText.text, this.targetText.style), this.editableText.eventMode = "static", this.editableText.cursor = "text", this.editingContainer.addChild(this.editableText);
|
|
45324
45327
|
}
|
|
45325
45328
|
setupTextInputHandler() {
|
|
@@ -45335,11 +45338,11 @@ class ui {
|
|
|
45335
45338
|
const t = this.getContainerDimensions(), i = this.getAlignmentSettings(), a = this.calculateHorizontalPosition({ width: this.editableText.width }, t, i.horizontal), s = this.calculateVerticalPosition({ height: this.editableText.height }, t, i.vertical);
|
|
45336
45339
|
if (this.editingContainer.position.set(a, s), this.editingContainer.children.length > 0) {
|
|
45337
45340
|
const r = this.editingContainer.getChildAt(0);
|
|
45338
|
-
r instanceof ne.Graphics && (r.clear(), r.fillStyle = { color: 0, alpha:
|
|
45341
|
+
r instanceof ne.Graphics && (r.clear(), r.fillStyle = { color: 0, alpha: di.EDITING_BG_ALPHA }, r.rect(
|
|
45339
45342
|
-5,
|
|
45340
45343
|
-5,
|
|
45341
|
-
this.editableText.width + 2 *
|
|
45342
|
-
this.editableText.height + 2 *
|
|
45344
|
+
this.editableText.width + 2 * di.EDITING_BG_PADDING_PX,
|
|
45345
|
+
this.editableText.height + 2 * di.EDITING_BG_PADDING_PX
|
|
45343
45346
|
), r.fill());
|
|
45344
45347
|
}
|
|
45345
45348
|
}
|
|
@@ -45399,7 +45402,7 @@ class Ga extends ei {
|
|
|
45399
45402
|
});
|
|
45400
45403
|
this.text.filters = [a];
|
|
45401
45404
|
}
|
|
45402
|
-
this.contentContainer.addChild(this.background), this.contentContainer.addChild(this.text), this.configureKeyframes(), this.textEditor = new
|
|
45405
|
+
this.contentContainer.addChild(this.background), this.contentContainer.addChild(this.text), this.configureKeyframes(), this.textEditor = new di(this, this.text, this.clipConfiguration);
|
|
45403
45406
|
}
|
|
45404
45407
|
update(t, i) {
|
|
45405
45408
|
super.update(t, i);
|
|
@@ -45450,7 +45453,7 @@ class Ga extends ei {
|
|
|
45450
45453
|
applyFixedDimensions() {
|
|
45451
45454
|
}
|
|
45452
45455
|
createTextStyle(t) {
|
|
45453
|
-
const i = t.font?.family ?? "Open Sans", { baseFontFamily: a, fontWeight: s } =
|
|
45456
|
+
const i = t.font?.family ?? "Open Sans", { baseFontFamily: a, fontWeight: s } = oi(i), { width: r } = this.getSize();
|
|
45454
45457
|
return new ne.TextStyle({
|
|
45455
45458
|
fontFamily: a,
|
|
45456
45459
|
fontSize: t.font?.size ?? 32,
|
|
@@ -45481,7 +45484,7 @@ class Ga extends ei {
|
|
|
45481
45484
|
this.edit.updateTextContent(this, t, i);
|
|
45482
45485
|
}
|
|
45483
45486
|
async loadFont(t) {
|
|
45484
|
-
const { baseFontFamily: i, fontWeight: a } =
|
|
45487
|
+
const { baseFontFamily: i, fontWeight: a } = oi(t), s = `${i}-${a}`;
|
|
45485
45488
|
if (Ga.loadedFonts.has(s))
|
|
45486
45489
|
return;
|
|
45487
45490
|
const r = Yo(t);
|
|
@@ -46954,6 +46957,8 @@ class La extends Kf {
|
|
|
46954
46957
|
lumaMaskController;
|
|
46955
46958
|
// Clip load errors - persisted so Timeline can query them after subscribing
|
|
46956
46959
|
clipErrors = /* @__PURE__ */ new Map();
|
|
46960
|
+
// Font metadata storage - maps URL to normalized base family + weight for rich-text font resolution
|
|
46961
|
+
fontMetadata = /* @__PURE__ */ new Map();
|
|
46957
46962
|
/**
|
|
46958
46963
|
* Create an Edit instance from a template configuration.
|
|
46959
46964
|
*
|
|
@@ -46993,8 +46998,12 @@ class La extends Kf {
|
|
|
46993
46998
|
const s = this.detectMergeFieldBindings(i, a), r = a.length > 0 ? K_(i, a) : i, n = tc.parse(r);
|
|
46994
46999
|
M_(n), this.edit = n, await Promise.all(
|
|
46995
47000
|
(this.edit.timeline.fonts ?? []).map(async (o) => {
|
|
46996
|
-
const l = o.src, c = { src: l, parser: on.Name };
|
|
46997
|
-
|
|
47001
|
+
const l = o.src, c = { src: l, parser: on.Name }, f = await this.assetLoader.load(l, c);
|
|
47002
|
+
if (f?.family) {
|
|
47003
|
+
const { baseFontFamily: u, fontWeight: h } = oi(f.family);
|
|
47004
|
+
this.fontMetadata.set(l, { baseFamilyName: u, weight: h });
|
|
47005
|
+
}
|
|
47006
|
+
return f;
|
|
46998
47007
|
})
|
|
46999
47008
|
), this.isLoadingEdit = !0;
|
|
47000
47009
|
for (const [o, l] of this.edit.timeline.tracks.entries())
|
|
@@ -47775,7 +47784,7 @@ class La extends Kf {
|
|
|
47775
47784
|
break;
|
|
47776
47785
|
}
|
|
47777
47786
|
case "svg": {
|
|
47778
|
-
i = new
|
|
47787
|
+
i = new Ci(this, t);
|
|
47779
47788
|
break;
|
|
47780
47789
|
}
|
|
47781
47790
|
default:
|
|
@@ -47954,6 +47963,25 @@ class La extends Kf {
|
|
|
47954
47963
|
getTimelineFonts() {
|
|
47955
47964
|
return this.edit?.timeline?.fonts ?? [];
|
|
47956
47965
|
}
|
|
47966
|
+
/**
|
|
47967
|
+
* Look up a font URL by family name and weight.
|
|
47968
|
+
* Uses normalized metadata extracted from TTF files during font loading.
|
|
47969
|
+
* This enables rich-text font resolution for template fonts with UUID-based URLs.
|
|
47970
|
+
*
|
|
47971
|
+
* @param familyName - The font family name (e.g., "Lato", "Lato Light")
|
|
47972
|
+
* @param weight - The font weight (e.g., 300 for Light, 900 for Black)
|
|
47973
|
+
* @returns The font URL if found, null otherwise
|
|
47974
|
+
*/
|
|
47975
|
+
getFontUrlByFamilyAndWeight(t, i) {
|
|
47976
|
+
const { baseFontFamily: a } = oi(t), s = a.toLowerCase();
|
|
47977
|
+
for (const [r, n] of this.fontMetadata)
|
|
47978
|
+
if (n.baseFamilyName.toLowerCase() === s && n.weight === i)
|
|
47979
|
+
return r;
|
|
47980
|
+
for (const [r, n] of this.fontMetadata)
|
|
47981
|
+
if (n.baseFamilyName.toLowerCase() === s)
|
|
47982
|
+
return r;
|
|
47983
|
+
return null;
|
|
47984
|
+
}
|
|
47957
47985
|
/**
|
|
47958
47986
|
* Remove any fonts from timeline.fonts that are no longer used by clips.
|
|
47959
47987
|
* Call this after changing a clip's font to clean up the old font.
|
|
@@ -48572,7 +48600,7 @@ var Q_ = zu({
|
|
|
48572
48600
|
}
|
|
48573
48601
|
async function De() {
|
|
48574
48602
|
function A(Ct, Aa) {
|
|
48575
|
-
return si = Ct.exports, n.wasmExports = si, R = si.memory, n.wasmMemory = R, se(),
|
|
48603
|
+
return si = Ct.exports, n.wasmExports = si, R = si.memory, n.wasmMemory = R, se(), xi = si.__indirect_function_table, $s(si), Ce(), si;
|
|
48576
48604
|
}
|
|
48577
48605
|
Ze();
|
|
48578
48606
|
function oe(Ct) {
|
|
@@ -48656,13 +48684,13 @@ var Q_ = zu({
|
|
|
48656
48684
|
})), Kt = (A, oe) => {
|
|
48657
48685
|
var Re = Uint8Array.of(0, 97, 115, 109, 1, 0, 0, 0, 1, ...ss([1, 96, ...ai(oe.slice(1)), ...ai(oe[0] === "v" ? "" : oe[0])]), 2, 7, 1, 1, 101, 1, 102, 0, 0, 7, 5, 1, 1, 102, 0, 0), Ge = new WebAssembly.Module(Re), Ke = new WebAssembly.Instance(Ge, { e: { f: A } }), Ct = Ke.exports.f;
|
|
48658
48686
|
return Ct;
|
|
48659
|
-
},
|
|
48687
|
+
}, xi, Qi = (A) => xi.get(A), Fi = (A, oe) => {
|
|
48660
48688
|
if (qt)
|
|
48661
48689
|
for (var Re = A; Re < A + oe; Re++) {
|
|
48662
48690
|
var Ge = Qi(Re);
|
|
48663
48691
|
Ge && qt.set(Ge, Re);
|
|
48664
48692
|
}
|
|
48665
|
-
}, qt, Ks = (A) => (qt || (qt = /* @__PURE__ */ new WeakMap(), Fi(0,
|
|
48693
|
+
}, qt, Ks = (A) => (qt || (qt = /* @__PURE__ */ new WeakMap(), Fi(0, xi.length)), qt.get(A) || 0), xa = [], qs = () => xa.length ? xa.pop() : xi.grow(1), Ti = (A, oe) => xi.set(A, oe), Js = (A, oe) => {
|
|
48666
48694
|
var Re = Ks(A);
|
|
48667
48695
|
if (Re)
|
|
48668
48696
|
return Re;
|
|
@@ -49085,21 +49113,21 @@ const iI = tI(), aI = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defin
|
|
|
49085
49113
|
__proto__: null,
|
|
49086
49114
|
default: iI
|
|
49087
49115
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
49088
|
-
var me,
|
|
49089
|
-
|
|
49090
|
-
var _s =
|
|
49116
|
+
var me, Vi = new Array(128).fill(void 0);
|
|
49117
|
+
Vi.push(void 0, null, !0, !1);
|
|
49118
|
+
var _s = Vi.length;
|
|
49091
49119
|
function jt(e) {
|
|
49092
|
-
_s ===
|
|
49120
|
+
_s === Vi.length && Vi.push(Vi.length + 1);
|
|
49093
49121
|
const t = _s;
|
|
49094
|
-
return _s =
|
|
49122
|
+
return _s = Vi[t], Vi[t] = e, t;
|
|
49095
49123
|
}
|
|
49096
49124
|
function Ut(e) {
|
|
49097
|
-
return
|
|
49125
|
+
return Vi[e];
|
|
49098
49126
|
}
|
|
49099
49127
|
function sI(e) {
|
|
49100
|
-
e < 132 || (
|
|
49128
|
+
e < 132 || (Vi[e] = _s, _s = e);
|
|
49101
49129
|
}
|
|
49102
|
-
function
|
|
49130
|
+
function _i(e) {
|
|
49103
49131
|
const t = Ut(e);
|
|
49104
49132
|
return sI(e), t;
|
|
49105
49133
|
}
|
|
@@ -49269,8 +49297,8 @@ var Yf = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
|
49269
49297
|
me.renderedimage_asPng(s, this.__wbg_ptr);
|
|
49270
49298
|
var t = Tt()[s / 4 + 0], i = Tt()[s / 4 + 1], a = Tt()[s / 4 + 2];
|
|
49271
49299
|
if (a)
|
|
49272
|
-
throw
|
|
49273
|
-
return
|
|
49300
|
+
throw _i(i);
|
|
49301
|
+
return _i(t);
|
|
49274
49302
|
} finally {
|
|
49275
49303
|
me.__wbindgen_add_to_stack_pointer(16);
|
|
49276
49304
|
}
|
|
@@ -49281,7 +49309,7 @@ var Yf = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
|
49281
49309
|
*/
|
|
49282
49310
|
get pixels() {
|
|
49283
49311
|
const t = me.renderedimage_pixels(this.__wbg_ptr);
|
|
49284
|
-
return
|
|
49312
|
+
return _i(t);
|
|
49285
49313
|
}
|
|
49286
49314
|
}, cI = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
49287
49315
|
}, unregister: () => {
|
|
@@ -49306,7 +49334,7 @@ var Yf = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
|
49306
49334
|
me.resvg_new(l, jt(e), a, s, Wo(i) ? 0 : jt(i));
|
|
49307
49335
|
var r = Tt()[l / 4 + 0], n = Tt()[l / 4 + 1], o = Tt()[l / 4 + 2];
|
|
49308
49336
|
if (o)
|
|
49309
|
-
throw
|
|
49337
|
+
throw _i(n);
|
|
49310
49338
|
return this.__wbg_ptr = r >>> 0, this;
|
|
49311
49339
|
} finally {
|
|
49312
49340
|
me.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -49336,7 +49364,7 @@ var Yf = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
|
49336
49364
|
me.resvg_render(a, this.__wbg_ptr);
|
|
49337
49365
|
var e = Tt()[a / 4 + 0], t = Tt()[a / 4 + 1], i = Tt()[a / 4 + 2];
|
|
49338
49366
|
if (i)
|
|
49339
|
-
throw
|
|
49367
|
+
throw _i(t);
|
|
49340
49368
|
return lI.__wrap(e);
|
|
49341
49369
|
} finally {
|
|
49342
49370
|
me.__wbindgen_add_to_stack_pointer(16);
|
|
@@ -49394,8 +49422,8 @@ var Yf = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
|
49394
49422
|
me.resvg_imagesToResolve(a, this.__wbg_ptr);
|
|
49395
49423
|
var e = Tt()[a / 4 + 0], t = Tt()[a / 4 + 1], i = Tt()[a / 4 + 2];
|
|
49396
49424
|
if (i)
|
|
49397
|
-
throw
|
|
49398
|
-
return
|
|
49425
|
+
throw _i(t);
|
|
49426
|
+
return _i(e);
|
|
49399
49427
|
} finally {
|
|
49400
49428
|
me.__wbindgen_add_to_stack_pointer(16);
|
|
49401
49429
|
}
|
|
@@ -49410,7 +49438,7 @@ var Yf = typeof FinalizationRegistry > "u" ? { register: () => {
|
|
|
49410
49438
|
me.resvg_resolveImage(s, this.__wbg_ptr, r, n, jt(t));
|
|
49411
49439
|
var i = Tt()[s / 4 + 0], a = Tt()[s / 4 + 1];
|
|
49412
49440
|
if (a)
|
|
49413
|
-
throw
|
|
49441
|
+
throw _i(i);
|
|
49414
49442
|
} finally {
|
|
49415
49443
|
me.__wbindgen_add_to_stack_pointer(16);
|
|
49416
49444
|
}
|
|
@@ -49449,7 +49477,7 @@ function dI() {
|
|
|
49449
49477
|
const s = new Uint8Array(Ut(t), i >>> 0, a >>> 0);
|
|
49450
49478
|
return jt(s);
|
|
49451
49479
|
}, e.wbg.__wbindgen_object_drop_ref = function(t) {
|
|
49452
|
-
|
|
49480
|
+
_i(t);
|
|
49453
49481
|
}, e.wbg.__wbg_new_63b92bc8671ed464 = function(t) {
|
|
49454
49482
|
const i = new Uint8Array(Ut(t));
|
|
49455
49483
|
return jt(i);
|