@mlightcad/mtext-renderer 0.7.6 → 0.8.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.md +524 -0
- package/dist/index.js +306 -255
- package/dist/index.umd.cjs +5 -5
- package/dist/mtext-renderer-worker.js +395 -372
- package/lib/renderer/defaultStyleManager.d.ts +18 -0
- package/lib/renderer/styleManager.d.ts +15 -6
- package/lib/renderer/types.d.ts +17 -3
- package/lib/worker/baseRenderer.d.ts +6 -0
- package/lib/worker/mainThreadRenderer.d.ts +7 -1
- package/lib/worker/unifiedRenderer.d.ts +6 -0
- package/lib/worker/webWorkerRenderer.d.ts +8 -2
- package/package.json +2 -2
|
@@ -344,8 +344,8 @@ var Jd = Zh((O) => {
|
|
|
344
344
|
return this.multiplyMatrices(e, this);
|
|
345
345
|
}
|
|
346
346
|
multiplyMatrices(e, t) {
|
|
347
|
-
const r = e.elements, i = t.elements, s = this.elements, a = r[0], o = r[3], h = r[6], c = r[1], u = r[4], f = r[7], l = r[2], p = r[5], g = r[8], m = i[0], x = i[3], v = i[6], w = i[1], b = i[4], F = i[7],
|
|
348
|
-
return s[0] = a * m + o * w + h *
|
|
347
|
+
const r = e.elements, i = t.elements, s = this.elements, a = r[0], o = r[3], h = r[6], c = r[1], u = r[4], f = r[7], l = r[2], p = r[5], g = r[8], m = i[0], x = i[3], v = i[6], w = i[1], b = i[4], F = i[7], k = i[2], _ = i[5], E = i[8];
|
|
348
|
+
return s[0] = a * m + o * w + h * k, s[3] = a * x + o * b + h * _, s[6] = a * v + o * F + h * E, s[1] = c * m + u * w + f * k, s[4] = c * x + u * b + f * _, s[7] = c * v + u * F + f * E, s[2] = l * m + p * w + g * k, s[5] = l * x + p * b + g * _, s[8] = l * v + p * F + g * E, this;
|
|
349
349
|
}
|
|
350
350
|
multiplyScalar(e) {
|
|
351
351
|
const t = this.elements;
|
|
@@ -874,8 +874,8 @@ var Jd = Zh((O) => {
|
|
|
874
874
|
if (Math.abs(u + l) < 0.1 && Math.abs(f + m) < 0.1 && Math.abs(g + x) < 0.1 && Math.abs(c + p + v - 3) < 0.1)
|
|
875
875
|
return this.set(1, 0, 0, 0), this;
|
|
876
876
|
t = Math.PI;
|
|
877
|
-
const b = (c + 1) / 2, F = (p + 1) / 2,
|
|
878
|
-
return b > F && b >
|
|
877
|
+
const b = (c + 1) / 2, F = (p + 1) / 2, k = (v + 1) / 2, _ = (u + l) / 4, E = (f + m) / 4, B = (g + x) / 4;
|
|
878
|
+
return b > F && b > k ? b < 0.01 ? (r = 0, i = 0.707106781, s = 0.707106781) : (r = Math.sqrt(b), i = _ / r, s = E / r) : F > k ? F < 0.01 ? (r = 0.707106781, i = 0, s = 0.707106781) : (i = Math.sqrt(F), r = _ / i, s = B / i) : k < 0.01 ? (r = 0.707106781, i = 0.707106781, s = 0) : (s = Math.sqrt(k), r = E / s, i = B / s), this.set(r, i, s, t), this;
|
|
879
879
|
}
|
|
880
880
|
let w = Math.sqrt((x - g) * (x - g) + (f - m) * (f - m) + (l - u) * (l - u));
|
|
881
881
|
return Math.abs(w) < 1e-3 && (w = 1), this.x = (x - g) / w, this.y = (f - m) / w, this.z = (l - u) / w, this.w = Math.acos((c + p + v - 1) / 2), this;
|
|
@@ -977,13 +977,13 @@ var Jd = Zh((O) => {
|
|
|
977
977
|
let x = 1 - o;
|
|
978
978
|
const v = h * l + c * p + u * g + f * m, w = v >= 0 ? 1 : -1, b = 1 - v * v;
|
|
979
979
|
if (b > Number.EPSILON) {
|
|
980
|
-
const
|
|
981
|
-
x = Math.sin(x * _) /
|
|
980
|
+
const k = Math.sqrt(b), _ = Math.atan2(k, v * w);
|
|
981
|
+
x = Math.sin(x * _) / k, o = Math.sin(o * _) / k;
|
|
982
982
|
}
|
|
983
983
|
const F = o * w;
|
|
984
984
|
if (h = h * x + l * F, c = c * x + p * F, u = u * x + g * F, f = f * x + m * F, x === 1 - o) {
|
|
985
|
-
const
|
|
986
|
-
h *=
|
|
985
|
+
const k = 1 / Math.sqrt(h * h + c * c + u * u + f * f);
|
|
986
|
+
h *= k, c *= k, u *= k, f *= k;
|
|
987
987
|
}
|
|
988
988
|
}
|
|
989
989
|
e[t] = h, e[t + 1] = c, e[t + 2] = u, e[t + 3] = f;
|
|
@@ -1944,8 +1944,8 @@ var Jd = Zh((O) => {
|
|
|
1944
1944
|
return this.multiplyMatrices(e, this);
|
|
1945
1945
|
}
|
|
1946
1946
|
multiplyMatrices(e, t) {
|
|
1947
|
-
const r = e.elements, i = t.elements, s = this.elements, a = r[0], o = r[4], h = r[8], c = r[12], u = r[1], f = r[5], l = r[9], p = r[13], g = r[2], m = r[6], x = r[10], v = r[14], w = r[3], b = r[7], F = r[11],
|
|
1948
|
-
return s[0] = a * _ + o * N + h * Z + c * ie, s[4] = a * E + o * q + h * j + c * ne, s[8] = a * B + o * re + h * Q + c * ae, s[12] = a * I + o * Y + h * te + c * H, s[1] = u * _ + f * N + l * Z + p * ie, s[5] = u * E + f * q + l * j + p * ne, s[9] = u * B + f * re + l * Q + p * ae, s[13] = u * I + f * Y + l * te + p * H, s[2] = g * _ + m * N + x * Z + v * ie, s[6] = g * E + m * q + x * j + v * ne, s[10] = g * B + m * re + x * Q + v * ae, s[14] = g * I + m * Y + x * te + v * H, s[3] = w * _ + b * N + F * Z +
|
|
1947
|
+
const r = e.elements, i = t.elements, s = this.elements, a = r[0], o = r[4], h = r[8], c = r[12], u = r[1], f = r[5], l = r[9], p = r[13], g = r[2], m = r[6], x = r[10], v = r[14], w = r[3], b = r[7], F = r[11], k = r[15], _ = i[0], E = i[4], B = i[8], I = i[12], N = i[1], q = i[5], re = i[9], Y = i[13], Z = i[2], j = i[6], Q = i[10], te = i[14], ie = i[3], ne = i[7], ae = i[11], H = i[15];
|
|
1948
|
+
return s[0] = a * _ + o * N + h * Z + c * ie, s[4] = a * E + o * q + h * j + c * ne, s[8] = a * B + o * re + h * Q + c * ae, s[12] = a * I + o * Y + h * te + c * H, s[1] = u * _ + f * N + l * Z + p * ie, s[5] = u * E + f * q + l * j + p * ne, s[9] = u * B + f * re + l * Q + p * ae, s[13] = u * I + f * Y + l * te + p * H, s[2] = g * _ + m * N + x * Z + v * ie, s[6] = g * E + m * q + x * j + v * ne, s[10] = g * B + m * re + x * Q + v * ae, s[14] = g * I + m * Y + x * te + v * H, s[3] = w * _ + b * N + F * Z + k * ie, s[7] = w * E + b * q + F * j + k * ne, s[11] = w * B + b * re + F * Q + k * ae, s[15] = w * I + b * Y + F * te + k * H, this;
|
|
1949
1949
|
}
|
|
1950
1950
|
multiplyScalar(e) {
|
|
1951
1951
|
const t = this.elements;
|
|
@@ -1965,10 +1965,10 @@ var Jd = Zh((O) => {
|
|
|
1965
1965
|
return e.isVector3 ? (i[12] = e.x, i[13] = e.y, i[14] = e.z) : (i[12] = e, i[13] = t, i[14] = r), this;
|
|
1966
1966
|
}
|
|
1967
1967
|
invert() {
|
|
1968
|
-
const e = this.elements, t = e[0], r = e[1], i = e[2], s = e[3], a = e[4], o = e[5], h = e[6], c = e[7], u = e[8], f = e[9], l = e[10], p = e[11], g = e[12], m = e[13], x = e[14], v = e[15], w = f * x * c - m * l * c + m * h * p - o * x * p - f * h * v + o * l * v, b = g * l * c - u * x * c - g * h * p + a * x * p + u * h * v - a * l * v, F = u * m * c - g * f * c + g * o * p - a * m * p - u * o * v + a * f * v,
|
|
1968
|
+
const e = this.elements, t = e[0], r = e[1], i = e[2], s = e[3], a = e[4], o = e[5], h = e[6], c = e[7], u = e[8], f = e[9], l = e[10], p = e[11], g = e[12], m = e[13], x = e[14], v = e[15], w = f * x * c - m * l * c + m * h * p - o * x * p - f * h * v + o * l * v, b = g * l * c - u * x * c - g * h * p + a * x * p + u * h * v - a * l * v, F = u * m * c - g * f * c + g * o * p - a * m * p - u * o * v + a * f * v, k = g * f * h - u * m * h - g * o * l + a * m * l + u * o * x - a * f * x, _ = t * w + r * b + i * F + s * k;
|
|
1969
1969
|
if (_ === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
|
1970
1970
|
const E = 1 / _;
|
|
1971
|
-
return e[0] = w * E, e[1] = (m * l * s - f * x * s - m * i * p + r * x * p + f * i * v - r * l * v) * E, e[2] = (o * x * s - m * h * s + m * i * c - r * x * c - o * i * v + r * h * v) * E, e[3] = (f * h * s - o * l * s - f * i * c + r * l * c + o * i * p - r * h * p) * E, e[4] = b * E, e[5] = (u * x * s - g * l * s + g * i * p - t * x * p - u * i * v + t * l * v) * E, e[6] = (g * h * s - a * x * s - g * i * c + t * x * c + a * i * v - t * h * v) * E, e[7] = (a * l * s - u * h * s + u * i * c - t * l * c - a * i * p + t * h * p) * E, e[8] = F * E, e[9] = (g * f * s - u * m * s - g * r * p + t * m * p + u * r * v - t * f * v) * E, e[10] = (a * m * s - g * o * s + g * r * c - t * m * c - a * r * v + t * o * v) * E, e[11] = (u * o * s - a * f * s - u * r * c + t * f * c + a * r * p - t * o * p) * E, e[12] =
|
|
1971
|
+
return e[0] = w * E, e[1] = (m * l * s - f * x * s - m * i * p + r * x * p + f * i * v - r * l * v) * E, e[2] = (o * x * s - m * h * s + m * i * c - r * x * c - o * i * v + r * h * v) * E, e[3] = (f * h * s - o * l * s - f * i * c + r * l * c + o * i * p - r * h * p) * E, e[4] = b * E, e[5] = (u * x * s - g * l * s + g * i * p - t * x * p - u * i * v + t * l * v) * E, e[6] = (g * h * s - a * x * s - g * i * c + t * x * c + a * i * v - t * h * v) * E, e[7] = (a * l * s - u * h * s + u * i * c - t * l * c - a * i * p + t * h * p) * E, e[8] = F * E, e[9] = (g * f * s - u * m * s - g * r * p + t * m * p + u * r * v - t * f * v) * E, e[10] = (a * m * s - g * o * s + g * r * c - t * m * c - a * r * v + t * o * v) * E, e[11] = (u * o * s - a * f * s - u * r * c + t * f * c + a * r * p - t * o * p) * E, e[12] = k * E, e[13] = (u * m * i - g * f * i + g * r * l - t * m * l - u * r * x + t * f * x) * E, e[14] = (g * o * i - a * m * i - g * r * h + t * m * h + a * r * x - t * o * x) * E, e[15] = (a * f * i - u * o * i + u * r * h - t * f * h - a * r * l + t * o * l) * E, this;
|
|
1972
1972
|
}
|
|
1973
1973
|
scale(e) {
|
|
1974
1974
|
const t = this.elements, r = e.x, i = e.y, s = e.z;
|
|
@@ -2140,8 +2140,8 @@ var Jd = Zh((O) => {
|
|
|
2140
2140
|
), this;
|
|
2141
2141
|
}
|
|
2142
2142
|
compose(e, t, r) {
|
|
2143
|
-
const i = this.elements, s = t._x, a = t._y, o = t._z, h = t._w, c = s + s, u = a + a, f = o + o, l = s * c, p = s * u, g = s * f, m = a * u, x = a * f, v = o * f, w = h * c, b = h * u, F = h * f,
|
|
2144
|
-
return i[0] = (1 - (m + v)) *
|
|
2143
|
+
const i = this.elements, s = t._x, a = t._y, o = t._z, h = t._w, c = s + s, u = a + a, f = o + o, l = s * c, p = s * u, g = s * f, m = a * u, x = a * f, v = o * f, w = h * c, b = h * u, F = h * f, k = r.x, _ = r.y, E = r.z;
|
|
2144
|
+
return i[0] = (1 - (m + v)) * k, i[1] = (p + F) * k, i[2] = (g - b) * k, i[3] = 0, i[4] = (p - F) * _, i[5] = (1 - (l + v)) * _, i[6] = (x + w) * _, i[7] = 0, i[8] = (g + b) * E, i[9] = (x - w) * E, i[10] = (1 - (l + m)) * E, i[11] = 0, i[12] = e.x, i[13] = e.y, i[14] = e.z, i[15] = 1, this;
|
|
2145
2145
|
}
|
|
2146
2146
|
decompose(e, t, r) {
|
|
2147
2147
|
const i = this.elements;
|
|
@@ -3481,11 +3481,11 @@ var Jd = Zh((O) => {
|
|
|
3481
3481
|
e.getX(Y + 2)
|
|
3482
3482
|
);
|
|
3483
3483
|
}
|
|
3484
|
-
const b = new A(), F = new A(),
|
|
3484
|
+
const b = new A(), F = new A(), k = new A(), _ = new A();
|
|
3485
3485
|
function E(B) {
|
|
3486
|
-
|
|
3486
|
+
k.fromBufferAttribute(i, B), _.copy(k);
|
|
3487
3487
|
const I = o[B];
|
|
3488
|
-
b.copy(I), b.sub(
|
|
3488
|
+
b.copy(I), b.sub(k.multiplyScalar(k.dot(I))).normalize(), F.crossVectors(_, I);
|
|
3489
3489
|
const q = F.dot(h[B]) < 0 ? -1 : 1;
|
|
3490
3490
|
a.setXYZW(B, b.x, b.y, b.z, q);
|
|
3491
3491
|
}
|
|
@@ -3682,7 +3682,7 @@ var Jd = Zh((O) => {
|
|
|
3682
3682
|
if (Array.isArray(a))
|
|
3683
3683
|
for (let g = 0, m = l.length; g < m; g++) {
|
|
3684
3684
|
const x = l[g], v = a[x.materialIndex], w = Math.max(x.start, p.start), b = Math.min(o.count, Math.min(x.start + x.count, p.start + p.count));
|
|
3685
|
-
for (let F = w,
|
|
3685
|
+
for (let F = w, k = b; F < k; F += 3) {
|
|
3686
3686
|
const _ = o.getX(F), E = o.getX(F + 1), B = o.getX(F + 2);
|
|
3687
3687
|
i = vn(this, v, e, r, c, u, f, _, E, B), i && (i.faceIndex = Math.floor(F / 3), i.face.materialIndex = x.materialIndex, t.push(i));
|
|
3688
3688
|
}
|
|
@@ -3698,7 +3698,7 @@ var Jd = Zh((O) => {
|
|
|
3698
3698
|
if (Array.isArray(a))
|
|
3699
3699
|
for (let g = 0, m = l.length; g < m; g++) {
|
|
3700
3700
|
const x = l[g], v = a[x.materialIndex], w = Math.max(x.start, p.start), b = Math.min(h.count, Math.min(x.start + x.count, p.start + p.count));
|
|
3701
|
-
for (let F = w,
|
|
3701
|
+
for (let F = w, k = b; F < k; F += 3) {
|
|
3702
3702
|
const _ = F, E = F + 1, B = F + 2;
|
|
3703
3703
|
i = vn(this, v, e, r, c, u, f, _, E, B), i && (i.faceIndex = Math.floor(F / 3), i.face.materialIndex = x.materialIndex, t.push(i));
|
|
3704
3704
|
}
|
|
@@ -4100,7 +4100,7 @@ var Jd = Zh((O) => {
|
|
|
4100
4100
|
function bc(n, e) {
|
|
4101
4101
|
return n * n * e;
|
|
4102
4102
|
}
|
|
4103
|
-
function
|
|
4103
|
+
function Cr(n, e, t, r) {
|
|
4104
4104
|
return vc(n, e) + xc(n, t) + bc(n, r);
|
|
4105
4105
|
}
|
|
4106
4106
|
function wc(n, e) {
|
|
@@ -4142,7 +4142,7 @@ var Jd = Zh((O) => {
|
|
|
4142
4142
|
return super.fromJSON(e), this.v0.fromArray(e.v0), this.v1.fromArray(e.v1), this.v2.fromArray(e.v2), this.v3.fromArray(e.v3), this;
|
|
4143
4143
|
}
|
|
4144
4144
|
}
|
|
4145
|
-
class
|
|
4145
|
+
class kc extends tt {
|
|
4146
4146
|
constructor(e = new A(), t = new A(), r = new A(), i = new A()) {
|
|
4147
4147
|
super(), this.isCubicBezierCurve3 = !0, this.type = "CubicBezierCurve3", this.v0 = e, this.v1 = t, this.v2 = r, this.v3 = i;
|
|
4148
4148
|
}
|
|
@@ -4194,7 +4194,7 @@ var Jd = Zh((O) => {
|
|
|
4194
4194
|
return super.fromJSON(e), this.v1.fromArray(e.v1), this.v2.fromArray(e.v2), this;
|
|
4195
4195
|
}
|
|
4196
4196
|
}
|
|
4197
|
-
class
|
|
4197
|
+
class Cc extends tt {
|
|
4198
4198
|
constructor(e = new A(), t = new A()) {
|
|
4199
4199
|
super(), this.isLineCurve3 = !0, this.type = "LineCurve3", this.v1 = e, this.v2 = t;
|
|
4200
4200
|
}
|
|
@@ -4230,8 +4230,8 @@ var Jd = Zh((O) => {
|
|
|
4230
4230
|
getPoint(e, t = new V()) {
|
|
4231
4231
|
const r = t, i = this.v0, s = this.v1, a = this.v2;
|
|
4232
4232
|
return r.set(
|
|
4233
|
-
|
|
4234
|
-
|
|
4233
|
+
Cr(e, i.x, s.x, a.x),
|
|
4234
|
+
Cr(e, i.y, s.y, a.y)
|
|
4235
4235
|
), r;
|
|
4236
4236
|
}
|
|
4237
4237
|
copy(e) {
|
|
@@ -4252,9 +4252,9 @@ var Jd = Zh((O) => {
|
|
|
4252
4252
|
getPoint(e, t = new A()) {
|
|
4253
4253
|
const r = t, i = this.v0, s = this.v1, a = this.v2;
|
|
4254
4254
|
return r.set(
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4255
|
+
Cr(e, i.x, s.x, a.x),
|
|
4256
|
+
Cr(e, i.y, s.y, a.y),
|
|
4257
|
+
Cr(e, i.z, s.z, a.z)
|
|
4258
4258
|
), r;
|
|
4259
4259
|
}
|
|
4260
4260
|
copy(e) {
|
|
@@ -4310,10 +4310,10 @@ var Jd = Zh((O) => {
|
|
|
4310
4310
|
ArcCurve: yc,
|
|
4311
4311
|
CatmullRomCurve3: mc,
|
|
4312
4312
|
CubicBezierCurve: In,
|
|
4313
|
-
CubicBezierCurve3:
|
|
4313
|
+
CubicBezierCurve3: kc,
|
|
4314
4314
|
EllipseCurve: Or,
|
|
4315
4315
|
LineCurve: Ar,
|
|
4316
|
-
LineCurve3:
|
|
4316
|
+
LineCurve3: Cc,
|
|
4317
4317
|
QuadraticBezierCurve: Pn,
|
|
4318
4318
|
QuadraticBezierCurve3: Mc,
|
|
4319
4319
|
SplineCurve: Po
|
|
@@ -4846,8 +4846,8 @@ var Jd = Zh((O) => {
|
|
|
4846
4846
|
i.push(w.x, w.y, 0), s.push(0, 0, 1), a.push(w.x, w.y);
|
|
4847
4847
|
}
|
|
4848
4848
|
for (let x = 0, v = m.length; x < v; x++) {
|
|
4849
|
-
const w = m[x], b = w[0] + f, F = w[1] + f,
|
|
4850
|
-
r.push(b, F,
|
|
4849
|
+
const w = m[x], b = w[0] + f, F = w[1] + f, k = w[2] + f;
|
|
4850
|
+
r.push(b, F, k), h += 3;
|
|
4851
4851
|
}
|
|
4852
4852
|
}
|
|
4853
4853
|
}
|
|
@@ -5006,10 +5006,10 @@ var Jd = Zh((O) => {
|
|
|
5006
5006
|
v.close();
|
|
5007
5007
|
else {
|
|
5008
5008
|
m += F.byteLength;
|
|
5009
|
-
const
|
|
5009
|
+
const k = new ProgressEvent("progress", { lengthComputable: g, loaded: m, total: p });
|
|
5010
5010
|
for (let _ = 0, E = u.length; _ < E; _++) {
|
|
5011
5011
|
const B = u[_];
|
|
5012
|
-
B.onProgress && B.onProgress(
|
|
5012
|
+
B.onProgress && B.onProgress(k);
|
|
5013
5013
|
}
|
|
5014
5014
|
v.enqueue(F), w();
|
|
5015
5015
|
}
|
|
@@ -5092,18 +5092,18 @@ var Jd = Zh((O) => {
|
|
|
5092
5092
|
function t(v) {
|
|
5093
5093
|
const w = [];
|
|
5094
5094
|
for (let b = 0, F = v.length; b < F; b++) {
|
|
5095
|
-
const
|
|
5096
|
-
_.curves =
|
|
5095
|
+
const k = v[b], _ = new or();
|
|
5096
|
+
_.curves = k.curves, w.push(_);
|
|
5097
5097
|
}
|
|
5098
5098
|
return w;
|
|
5099
5099
|
}
|
|
5100
5100
|
function r(v, w) {
|
|
5101
5101
|
const b = w.length;
|
|
5102
5102
|
let F = !1;
|
|
5103
|
-
for (let
|
|
5104
|
-
let E = w[
|
|
5103
|
+
for (let k = b - 1, _ = 0; _ < b; k = _++) {
|
|
5104
|
+
let E = w[k], B = w[_], I = B.x - E.x, N = B.y - E.y;
|
|
5105
5105
|
if (Math.abs(N) > Number.EPSILON) {
|
|
5106
|
-
if (N < 0 && (E = w[_], I = -I, B = w[
|
|
5106
|
+
if (N < 0 && (E = w[_], I = -I, B = w[k], N = -N), v.y < E.y || v.y > B.y) continue;
|
|
5107
5107
|
if (v.y === E.y) {
|
|
5108
5108
|
if (v.x === E.x) return !0;
|
|
5109
5109
|
} else {
|
|
@@ -5138,9 +5138,9 @@ var Jd = Zh((O) => {
|
|
|
5138
5138
|
for (let b = 0, F = l.length; b < F; b++)
|
|
5139
5139
|
f[b] = [];
|
|
5140
5140
|
for (let b = 0, F = l.length; b < F; b++) {
|
|
5141
|
-
const
|
|
5142
|
-
for (let _ = 0; _ <
|
|
5143
|
-
const E =
|
|
5141
|
+
const k = p[b];
|
|
5142
|
+
for (let _ = 0; _ < k.length; _++) {
|
|
5143
|
+
const E = k[_];
|
|
5144
5144
|
let B = !0;
|
|
5145
5145
|
for (let I = 0; I < l.length; I++)
|
|
5146
5146
|
r(E.p, l[I].p) && (b !== I && w++, B ? (B = !1, f[I].push(E)) : v = !0);
|
|
@@ -5396,7 +5396,7 @@ var Jd = Zh((O) => {
|
|
|
5396
5396
|
}));
|
|
5397
5397
|
const Dt = {
|
|
5398
5398
|
fonts: "fonts"
|
|
5399
|
-
},
|
|
5399
|
+
}, ki = [
|
|
5400
5400
|
{
|
|
5401
5401
|
version: 1,
|
|
5402
5402
|
stores: [
|
|
@@ -5415,7 +5415,7 @@ var Jd = Zh((O) => {
|
|
|
5415
5415
|
}
|
|
5416
5416
|
]
|
|
5417
5417
|
}
|
|
5418
|
-
],
|
|
5418
|
+
], ke = class ke {
|
|
5419
5419
|
constructor() {
|
|
5420
5420
|
this.isClosing = !1, typeof window < "u" && window.addEventListener("unload", () => {
|
|
5421
5421
|
this.close();
|
|
@@ -5425,7 +5425,7 @@ var Jd = Zh((O) => {
|
|
|
5425
5425
|
* Returns the singleton instance of the FontCacheManager
|
|
5426
5426
|
*/
|
|
5427
5427
|
static get instance() {
|
|
5428
|
-
return
|
|
5428
|
+
return ke._instance || (ke._instance = new ke()), ke._instance;
|
|
5429
5429
|
}
|
|
5430
5430
|
/**
|
|
5431
5431
|
* Sets a font in the cache
|
|
@@ -5489,15 +5489,15 @@ var Jd = Zh((O) => {
|
|
|
5489
5489
|
* Use with caution as this operation cannot be undone.
|
|
5490
5490
|
*/
|
|
5491
5491
|
async destroy() {
|
|
5492
|
-
this.close(), await indexedDB.deleteDatabase(
|
|
5492
|
+
this.close(), await indexedDB.deleteDatabase(ke.DATABASE_NAME), ke._instance = void 0;
|
|
5493
5493
|
}
|
|
5494
5494
|
// Private methods for database management
|
|
5495
5495
|
async getDatabase() {
|
|
5496
5496
|
if (this.isClosing)
|
|
5497
5497
|
throw new Error("Cannot perform operation while database is closing");
|
|
5498
5498
|
return this.db ? this.db : (this.db = await iu(
|
|
5499
|
-
|
|
5500
|
-
|
|
5499
|
+
ke.DATABASE_NAME,
|
|
5500
|
+
ke.DATABASE_VERSION,
|
|
5501
5501
|
{
|
|
5502
5502
|
upgrade: (e, t, r) => this.handleUpgrade(e, t, r),
|
|
5503
5503
|
blocked() {
|
|
@@ -5506,7 +5506,7 @@ var Jd = Zh((O) => {
|
|
|
5506
5506
|
);
|
|
5507
5507
|
},
|
|
5508
5508
|
blocking() {
|
|
5509
|
-
console.warn("Database blocking newer version - closing connection"),
|
|
5509
|
+
console.warn("Database blocking newer version - closing connection"), ke.instance.close();
|
|
5510
5510
|
}
|
|
5511
5511
|
}
|
|
5512
5512
|
), this.db);
|
|
@@ -5518,7 +5518,7 @@ var Jd = Zh((O) => {
|
|
|
5518
5518
|
* @param newVersion The new version of the database
|
|
5519
5519
|
*/
|
|
5520
5520
|
handleUpgrade(e, t, r) {
|
|
5521
|
-
const i =
|
|
5521
|
+
const i = ki.filter(
|
|
5522
5522
|
(s) => s.version > t && (!r || s.version <= r)
|
|
5523
5523
|
);
|
|
5524
5524
|
for (const s of i)
|
|
@@ -5534,8 +5534,8 @@ var Jd = Zh((O) => {
|
|
|
5534
5534
|
e.objectStoreNames.contains(r.name) || e.createObjectStore(r.name, { keyPath: r.keyPath });
|
|
5535
5535
|
}
|
|
5536
5536
|
};
|
|
5537
|
-
|
|
5538
|
-
let Er =
|
|
5537
|
+
ke.DATABASE_NAME = "mlightcad", ke.DATABASE_VERSION = ki[ki.length - 1].version;
|
|
5538
|
+
let Er = ke;
|
|
5539
5539
|
class wa {
|
|
5540
5540
|
constructor() {
|
|
5541
5541
|
this.listeners = [];
|
|
@@ -5918,7 +5918,7 @@ var Jd = Zh((O) => {
|
|
|
5918
5918
|
e.trans[t] = t;
|
|
5919
5919
|
}
|
|
5920
5920
|
var Ta = new Uint16Array(16);
|
|
5921
|
-
function
|
|
5921
|
+
function Ci(n, e, t, r) {
|
|
5922
5922
|
var i, s;
|
|
5923
5923
|
for (i = 0; i < 16; ++i)
|
|
5924
5924
|
n.table[i] = 0;
|
|
@@ -5959,7 +5959,7 @@ var Jd = Zh((O) => {
|
|
|
5959
5959
|
var c = je(n, 3, 0);
|
|
5960
5960
|
$e[pu[a]] = c;
|
|
5961
5961
|
}
|
|
5962
|
-
for (
|
|
5962
|
+
for (Ci(Fa, $e, 0, 19), o = 0; o < r + i; ) {
|
|
5963
5963
|
var u = os(n, Fa);
|
|
5964
5964
|
switch (u) {
|
|
5965
5965
|
case 16:
|
|
@@ -5980,9 +5980,9 @@ var Jd = Zh((O) => {
|
|
|
5980
5980
|
break;
|
|
5981
5981
|
}
|
|
5982
5982
|
}
|
|
5983
|
-
|
|
5983
|
+
Ci(e, $e, 0, r), Ci(t, $e, r, i);
|
|
5984
5984
|
}
|
|
5985
|
-
function
|
|
5985
|
+
function ka(n, e, t) {
|
|
5986
5986
|
for (; ; ) {
|
|
5987
5987
|
var r = os(n, e);
|
|
5988
5988
|
if (r === 256)
|
|
@@ -6013,10 +6013,10 @@ var Jd = Zh((O) => {
|
|
|
6013
6013
|
s = mu(t);
|
|
6014
6014
|
break;
|
|
6015
6015
|
case 1:
|
|
6016
|
-
s =
|
|
6016
|
+
s = ka(t, $o, jo);
|
|
6017
6017
|
break;
|
|
6018
6018
|
case 2:
|
|
6019
|
-
yu(t, t.ltree, t.dtree), s =
|
|
6019
|
+
yu(t, t.ltree, t.dtree), s = ka(t, t.ltree, t.dtree);
|
|
6020
6020
|
break;
|
|
6021
6021
|
default:
|
|
6022
6022
|
s = Jo;
|
|
@@ -6189,10 +6189,10 @@ var Jd = Zh((O) => {
|
|
|
6189
6189
|
function th(n) {
|
|
6190
6190
|
throw new Error(n);
|
|
6191
6191
|
}
|
|
6192
|
-
function
|
|
6192
|
+
function Ca(n, e) {
|
|
6193
6193
|
n || th(e);
|
|
6194
6194
|
}
|
|
6195
|
-
var G = { fail: th, argument:
|
|
6195
|
+
var G = { fail: th, argument: Ca, assert: Ca }, Ma = 32768, Aa = 2147483648, lr = {}, R = {}, W = {};
|
|
6196
6196
|
function Ye(n) {
|
|
6197
6197
|
return function() {
|
|
6198
6198
|
return n;
|
|
@@ -6370,13 +6370,13 @@ var Jd = Zh((O) => {
|
|
|
6370
6370
|
return s;
|
|
6371
6371
|
}
|
|
6372
6372
|
};
|
|
6373
|
-
var Tn = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap(),
|
|
6374
|
-
if (!
|
|
6375
|
-
|
|
6373
|
+
var Tn = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap(), kn, bu = function(n) {
|
|
6374
|
+
if (!kn) {
|
|
6375
|
+
kn = {};
|
|
6376
6376
|
for (var e in hs)
|
|
6377
|
-
|
|
6377
|
+
kn[e] = new String(e);
|
|
6378
6378
|
}
|
|
6379
|
-
var t =
|
|
6379
|
+
var t = kn[n];
|
|
6380
6380
|
if (t !== void 0) {
|
|
6381
6381
|
if (Tn) {
|
|
6382
6382
|
var r = Tn.get(t);
|
|
@@ -6501,10 +6501,10 @@ var Jd = Zh((O) => {
|
|
|
6501
6501
|
};
|
|
6502
6502
|
R.OP = R.BYTE;
|
|
6503
6503
|
W.OP = W.BYTE;
|
|
6504
|
-
var
|
|
6504
|
+
var Cn = typeof WeakMap == "function" && /* @__PURE__ */ new WeakMap();
|
|
6505
6505
|
R.CHARSTRING = function(n) {
|
|
6506
|
-
if (
|
|
6507
|
-
var e =
|
|
6506
|
+
if (Cn) {
|
|
6507
|
+
var e = Cn.get(n);
|
|
6508
6508
|
if (e !== void 0)
|
|
6509
6509
|
return e;
|
|
6510
6510
|
}
|
|
@@ -6512,7 +6512,7 @@ var Jd = Zh((O) => {
|
|
|
6512
6512
|
var s = n[i];
|
|
6513
6513
|
t = t.concat(R[s.type](s.value));
|
|
6514
6514
|
}
|
|
6515
|
-
return
|
|
6515
|
+
return Cn && Cn.set(n, t), t;
|
|
6516
6516
|
};
|
|
6517
6517
|
W.CHARSTRING = function(n) {
|
|
6518
6518
|
return R.CHARSTRING(n).length;
|
|
@@ -6700,12 +6700,12 @@ var Jd = Zh((O) => {
|
|
|
6700
6700
|
var t = n.getInt16(e, !1), r = n.getUint16(e + 2, !1);
|
|
6701
6701
|
return t + r / 65535;
|
|
6702
6702
|
}
|
|
6703
|
-
function
|
|
6703
|
+
function ku(n, e) {
|
|
6704
6704
|
for (var t = "", r = e; r < e + 4; r += 1)
|
|
6705
6705
|
t += String.fromCharCode(n.getInt8(r));
|
|
6706
6706
|
return t;
|
|
6707
6707
|
}
|
|
6708
|
-
function
|
|
6708
|
+
function Cu(n, e, t) {
|
|
6709
6709
|
for (var r = 0, i = 0; i < t; i += 1)
|
|
6710
6710
|
r <<= 8, r += n.getUint8(e + i);
|
|
6711
6711
|
return r;
|
|
@@ -7025,8 +7025,8 @@ var Jd = Zh((O) => {
|
|
|
7025
7025
|
getShort: Tu,
|
|
7026
7026
|
getULong: Ss,
|
|
7027
7027
|
getFixed: rh,
|
|
7028
|
-
getTag:
|
|
7029
|
-
getOffset:
|
|
7028
|
+
getTag: ku,
|
|
7029
|
+
getOffset: Cu,
|
|
7030
7030
|
getBytes: Mu,
|
|
7031
7031
|
bytesToString: Au,
|
|
7032
7032
|
Parser: M
|
|
@@ -8775,7 +8775,7 @@ var Jd = Zh((O) => {
|
|
|
8775
8775
|
} else
|
|
8776
8776
|
g = n.tables.cff.topDict._subrs, m = n.tables.cff.topDict._subrsBias, x = n.tables.cff.topDict._defaultWidthX, v = n.tables.cff.topDict._nominalWidthX;
|
|
8777
8777
|
var F = x;
|
|
8778
|
-
function
|
|
8778
|
+
function k(B, I) {
|
|
8779
8779
|
f && o.closePath(), o.moveTo(B, I), f = !0;
|
|
8780
8780
|
}
|
|
8781
8781
|
function _() {
|
|
@@ -8793,7 +8793,7 @@ var Jd = Zh((O) => {
|
|
|
8793
8793
|
_();
|
|
8794
8794
|
break;
|
|
8795
8795
|
case 4:
|
|
8796
|
-
h.length > 1 && !u && (F = h.shift() + v, u = !0), p += h.pop(),
|
|
8796
|
+
h.length > 1 && !u && (F = h.shift() + v, u = !0), p += h.pop(), k(l, p);
|
|
8797
8797
|
break;
|
|
8798
8798
|
case 5:
|
|
8799
8799
|
for (; h.length > 0; )
|
|
@@ -8845,10 +8845,10 @@ var Jd = Zh((O) => {
|
|
|
8845
8845
|
_(), H += c + 7 >> 3;
|
|
8846
8846
|
break;
|
|
8847
8847
|
case 21:
|
|
8848
|
-
h.length > 2 && !u && (F = h.shift() + v, u = !0), p += h.pop(), l += h.pop(),
|
|
8848
|
+
h.length > 2 && !u && (F = h.shift() + v, u = !0), p += h.pop(), l += h.pop(), k(l, p);
|
|
8849
8849
|
break;
|
|
8850
8850
|
case 22:
|
|
8851
|
-
h.length > 1 && !u && (F = h.shift() + v, u = !0), l += h.pop(),
|
|
8851
|
+
h.length > 1 && !u && (F = h.shift() + v, u = !0), l += h.pop(), k(l, p);
|
|
8852
8852
|
break;
|
|
8853
8853
|
case 23:
|
|
8854
8854
|
_();
|
|
@@ -8950,9 +8950,9 @@ var Jd = Zh((O) => {
|
|
|
8950
8950
|
t.glyphs.push(E, et.cffGlyphLoader(t, E, Oa, B));
|
|
8951
8951
|
};
|
|
8952
8952
|
else
|
|
8953
|
-
for (var
|
|
8954
|
-
var _ = b.objects[
|
|
8955
|
-
t.glyphs.push(
|
|
8953
|
+
for (var k = 0; k < t.nGlyphs; k += 1) {
|
|
8954
|
+
var _ = b.objects[k];
|
|
8955
|
+
t.glyphs.push(k, et.cffGlyphLoader(t, k, Oa, _));
|
|
8956
8956
|
}
|
|
8957
8957
|
}
|
|
8958
8958
|
function fh(n, e) {
|
|
@@ -9823,7 +9823,7 @@ var Jd = Zh((O) => {
|
|
|
9823
9823
|
1144: "ii",
|
|
9824
9824
|
1130: "yo"
|
|
9825
9825
|
};
|
|
9826
|
-
function
|
|
9826
|
+
function kl(n, e, t) {
|
|
9827
9827
|
switch (n) {
|
|
9828
9828
|
case 0:
|
|
9829
9829
|
if (e === 65535)
|
|
@@ -9837,7 +9837,7 @@ var Jd = Zh((O) => {
|
|
|
9837
9837
|
return Sh[e];
|
|
9838
9838
|
}
|
|
9839
9839
|
}
|
|
9840
|
-
var fs = "utf-16",
|
|
9840
|
+
var fs = "utf-16", Cl = {
|
|
9841
9841
|
0: "macintosh",
|
|
9842
9842
|
// smRoman
|
|
9843
9843
|
1: "x-mac-japanese",
|
|
@@ -9933,7 +9933,7 @@ var Jd = Zh((O) => {
|
|
|
9933
9933
|
case 0:
|
|
9934
9934
|
return fs;
|
|
9935
9935
|
case 1:
|
|
9936
|
-
return Ml[t] ||
|
|
9936
|
+
return Ml[t] || Cl[e];
|
|
9937
9937
|
case 3:
|
|
9938
9938
|
if (e === 1 || e === 10)
|
|
9939
9939
|
return fs;
|
|
@@ -9942,7 +9942,7 @@ var Jd = Zh((O) => {
|
|
|
9942
9942
|
}
|
|
9943
9943
|
function Al(n, e, t) {
|
|
9944
9944
|
for (var r = {}, i = new z.Parser(n, e), s = i.parseUShort(), a = i.parseUShort(), o = i.offset + i.parseUShort(), h = 0; h < a; h++) {
|
|
9945
|
-
var c = i.parseUShort(), u = i.parseUShort(), f = i.parseUShort(), l = i.parseUShort(), p = bh[l] || l, g = i.parseUShort(), m = i.parseUShort(), x =
|
|
9945
|
+
var c = i.parseUShort(), u = i.parseUShort(), f = i.parseUShort(), l = i.parseUShort(), p = bh[l] || l, g = i.parseUShort(), m = i.parseUShort(), x = kl(c, f, t), v = Fh(c, u, f);
|
|
9946
9946
|
if (v !== void 0 && x !== void 0) {
|
|
9947
9947
|
var w = void 0;
|
|
9948
9948
|
if (v === fs ? w = lr.UTF16(n, o + m, g) : w = lr.MACSTRING(n, o + m, g, v), w) {
|
|
@@ -10004,14 +10004,14 @@ var Jd = Zh((O) => {
|
|
|
10004
10004
|
for (var g in p) {
|
|
10005
10005
|
var m = p[g], x = 1, v = h[g], w = Tl[v], b = Fh(x, w, v), F = R.MACSTRING(m, b);
|
|
10006
10006
|
F === void 0 && (x = 0, v = e.indexOf(g), v < 0 && (v = e.length, e.push(g)), w = 4, F = R.UTF16(m));
|
|
10007
|
-
var
|
|
10007
|
+
var k = Da(F, f);
|
|
10008
10008
|
u.push(Ra(
|
|
10009
10009
|
x,
|
|
10010
10010
|
w,
|
|
10011
10011
|
v,
|
|
10012
10012
|
t,
|
|
10013
10013
|
F.length,
|
|
10014
|
-
|
|
10014
|
+
k
|
|
10015
10015
|
));
|
|
10016
10016
|
var _ = c[g];
|
|
10017
10017
|
if (_ !== void 0) {
|
|
@@ -10390,7 +10390,7 @@ var Jd = Zh((O) => {
|
|
|
10390
10390
|
{ name: "maxMemType1", type: "ULONG", value: 0 }
|
|
10391
10391
|
]);
|
|
10392
10392
|
}
|
|
10393
|
-
var
|
|
10393
|
+
var kh = { parse: Ul, make: Rl }, qe = new Array(9);
|
|
10394
10394
|
qe[1] = function() {
|
|
10395
10395
|
var e = this.offset + this.relativeOffset, t = this.parseUShort();
|
|
10396
10396
|
if (t === 1)
|
|
@@ -10636,7 +10636,7 @@ var Jd = Zh((O) => {
|
|
|
10636
10636
|
{ name: "lookups", type: "TABLE", value: new D.LookupList(n.lookups, dr) }
|
|
10637
10637
|
]);
|
|
10638
10638
|
}
|
|
10639
|
-
var
|
|
10639
|
+
var Ch = { parse: Dl, make: Il };
|
|
10640
10640
|
function Pl(n, e) {
|
|
10641
10641
|
var t = new z.Parser(n, e), r = t.parseULong();
|
|
10642
10642
|
G.argument(r === 1, "Unsupported META table version."), t.parseULong(), t.parseULong();
|
|
@@ -10663,7 +10663,7 @@ var Jd = Zh((O) => {
|
|
|
10663
10663
|
function Ia(n) {
|
|
10664
10664
|
return Math.log(n) / Math.log(2) | 0;
|
|
10665
10665
|
}
|
|
10666
|
-
function
|
|
10666
|
+
function ks(n) {
|
|
10667
10667
|
for (; n.length % 4 !== 0; )
|
|
10668
10668
|
n.push(0);
|
|
10669
10669
|
for (var e = 0, t = 0; t < n.length; t += 4)
|
|
@@ -10694,7 +10694,7 @@ var Jd = Zh((O) => {
|
|
|
10694
10694
|
for (var a = 0; a < n.length; a += 1) {
|
|
10695
10695
|
var o = n[a];
|
|
10696
10696
|
G.argument(o.tableName.length === 4, "Table name" + o.tableName + " is invalid.");
|
|
10697
|
-
var h = o.sizeOf(), c = Pa(o.tableName,
|
|
10697
|
+
var h = o.sizeOf(), c = Pa(o.tableName, ks(o.encode()), s, h);
|
|
10698
10698
|
for (r.push({ name: c.tag + " Table Record", type: "RECORD", value: c }), i.push({ name: o.tableName + " table", type: "RECORD", value: o }), s += h, G.argument(!isNaN(s), "Something went wrong calculating the offset."); s % 4 !== 0; )
|
|
10699
10699
|
s += 1, i.push({ name: "padding", type: "BYTE", value: 0 });
|
|
10700
10700
|
}
|
|
@@ -10761,7 +10761,7 @@ var Jd = Zh((O) => {
|
|
|
10761
10761
|
yMax: b.yMax,
|
|
10762
10762
|
lowestRecPPEM: 3,
|
|
10763
10763
|
createdTimestamp: n.createdTimestamp
|
|
10764
|
-
}),
|
|
10764
|
+
}), k = yh.make({
|
|
10765
10765
|
ascender: b.ascender,
|
|
10766
10766
|
descender: b.descender,
|
|
10767
10767
|
advanceWidthMax: b.advanceWidthMax,
|
|
@@ -10800,7 +10800,7 @@ var Jd = Zh((O) => {
|
|
|
10800
10800
|
for (var j in n.names)
|
|
10801
10801
|
Z[j] = n.names[j];
|
|
10802
10802
|
Z.uniqueID || (Z.uniqueID = { en: n.getEnglishName("manufacturer") + ":" + re }), Z.postScriptName || (Z.postScriptName = { en: Y }), Z.preferredFamily || (Z.preferredFamily = n.names.fontFamily), Z.preferredSubfamily || (Z.preferredSubfamily = n.names.fontSubfamily);
|
|
10803
|
-
var Q = [], te = Th.make(Z, Q), ie = Q.length > 0 ? vh.make(Q) : void 0, ne =
|
|
10803
|
+
var Q = [], te = Th.make(Z, Q), ie = Q.length > 0 ? vh.make(Q) : void 0, ne = kh.make(), ae = dh.make(n.glyphs, {
|
|
10804
10804
|
version: n.getEnglishName("version"),
|
|
10805
10805
|
fullName: re,
|
|
10806
10806
|
familyName: N,
|
|
@@ -10808,9 +10808,9 @@ var Jd = Zh((O) => {
|
|
|
10808
10808
|
postScriptName: Y,
|
|
10809
10809
|
unitsPerEm: n.unitsPerEm,
|
|
10810
10810
|
fontBBox: [0, b.yMin, b.ascender, b.advanceWidthMax]
|
|
10811
|
-
}), H = n.metas && Object.keys(n.metas).length > 0 ? Mh.make(n.metas) : void 0, $ = [F,
|
|
10812
|
-
ie && $.push(ie), n.tables.gsub && $.push(
|
|
10813
|
-
for (var Vt = Ah($), jr = Vt.encode(), Qr =
|
|
10811
|
+
}), H = n.metas && Object.keys(n.metas).length > 0 ? Mh.make(n.metas) : void 0, $ = [F, k, _, E, te, I, ne, ae, B];
|
|
10812
|
+
ie && $.push(ie), n.tables.gsub && $.push(Ch.make(n.tables.gsub)), H && $.push(H);
|
|
10813
|
+
for (var Vt = Ah($), jr = Vt.encode(), Qr = ks(jr), yr = Vt.fields, Kr = !1, pt = 0; pt < yr.length; pt += 1)
|
|
10814
10814
|
if (yr[pt].name === "head table") {
|
|
10815
10815
|
yr[pt].value.checkSumAdjustment = 2981146554 - Qr, Kr = !0;
|
|
10816
10816
|
break;
|
|
@@ -10819,7 +10819,7 @@ var Jd = Zh((O) => {
|
|
|
10819
10819
|
throw new Error("Could not find head table with checkSum to adjust.");
|
|
10820
10820
|
return Vt;
|
|
10821
10821
|
}
|
|
10822
|
-
var Hl = { make: Ah, fontToTable: Gl, computeCheckSum:
|
|
10822
|
+
var Hl = { make: Ah, fontToTable: Gl, computeCheckSum: ks };
|
|
10823
10823
|
function Ai(n, e) {
|
|
10824
10824
|
for (var t = 0, r = n.length - 1; t <= r; ) {
|
|
10825
10825
|
var i = t + r >>> 1, s = n[i].tag;
|
|
@@ -11098,7 +11098,7 @@ var Jd = Zh((O) => {
|
|
|
11098
11098
|
if (this.font.tables.gpos)
|
|
11099
11099
|
return this.getLookupTables(n, e, "kern", 2);
|
|
11100
11100
|
};
|
|
11101
|
-
function
|
|
11101
|
+
function Ce(n) {
|
|
11102
11102
|
Vr.call(this, n, "gsub");
|
|
11103
11103
|
}
|
|
11104
11104
|
function Wl(n, e) {
|
|
@@ -11110,7 +11110,7 @@ var Jd = Zh((O) => {
|
|
|
11110
11110
|
return !1;
|
|
11111
11111
|
return !0;
|
|
11112
11112
|
}
|
|
11113
|
-
function
|
|
11113
|
+
function Cs(n, e, t) {
|
|
11114
11114
|
for (var r = n.subtables, i = 0; i < r.length; i++) {
|
|
11115
11115
|
var s = r[i];
|
|
11116
11116
|
if (s.substFormat === e)
|
|
@@ -11119,8 +11119,8 @@ var Jd = Zh((O) => {
|
|
|
11119
11119
|
if (t)
|
|
11120
11120
|
return r.push(t), t;
|
|
11121
11121
|
}
|
|
11122
|
-
|
|
11123
|
-
|
|
11122
|
+
Ce.prototype = Vr.prototype;
|
|
11123
|
+
Ce.prototype.createDefaultTable = function() {
|
|
11124
11124
|
return {
|
|
11125
11125
|
version: 1,
|
|
11126
11126
|
scripts: [{
|
|
@@ -11134,7 +11134,7 @@ var Jd = Zh((O) => {
|
|
|
11134
11134
|
lookups: []
|
|
11135
11135
|
};
|
|
11136
11136
|
};
|
|
11137
|
-
|
|
11137
|
+
Ce.prototype.getSingle = function(n, e, t) {
|
|
11138
11138
|
for (var r = [], i = this.getLookupTables(e, t, n, 1), s = 0; s < i.length; s++)
|
|
11139
11139
|
for (var a = i[s].subtables, o = 0; o < a.length; o++) {
|
|
11140
11140
|
var h = a[o], c = this.expandCoverage(h.coverage), u = void 0;
|
|
@@ -11152,7 +11152,7 @@ var Jd = Zh((O) => {
|
|
|
11152
11152
|
}
|
|
11153
11153
|
return r;
|
|
11154
11154
|
};
|
|
11155
|
-
|
|
11155
|
+
Ce.prototype.getMultiple = function(n, e, t) {
|
|
11156
11156
|
for (var r = [], i = this.getLookupTables(e, t, n, 2), s = 0; s < i.length; s++)
|
|
11157
11157
|
for (var a = i[s].subtables, o = 0; o < a.length; o++) {
|
|
11158
11158
|
var h = a[o], c = this.expandCoverage(h.coverage), u = void 0;
|
|
@@ -11163,14 +11163,14 @@ var Jd = Zh((O) => {
|
|
|
11163
11163
|
}
|
|
11164
11164
|
return r;
|
|
11165
11165
|
};
|
|
11166
|
-
|
|
11166
|
+
Ce.prototype.getAlternates = function(n, e, t) {
|
|
11167
11167
|
for (var r = [], i = this.getLookupTables(e, t, n, 3), s = 0; s < i.length; s++)
|
|
11168
11168
|
for (var a = i[s].subtables, o = 0; o < a.length; o++)
|
|
11169
11169
|
for (var h = a[o], c = this.expandCoverage(h.coverage), u = h.alternateSets, f = 0; f < c.length; f++)
|
|
11170
11170
|
r.push({ sub: c[f], by: u[f] });
|
|
11171
11171
|
return r;
|
|
11172
11172
|
};
|
|
11173
|
-
|
|
11173
|
+
Ce.prototype.getLigatures = function(n, e, t) {
|
|
11174
11174
|
for (var r = [], i = this.getLookupTables(e, t, n, 4), s = 0; s < i.length; s++)
|
|
11175
11175
|
for (var a = i[s].subtables, o = 0; o < a.length; o++)
|
|
11176
11176
|
for (var h = a[o], c = this.expandCoverage(h.coverage), u = h.ligatureSets, f = 0; f < c.length; f++)
|
|
@@ -11183,8 +11183,8 @@ var Jd = Zh((O) => {
|
|
|
11183
11183
|
}
|
|
11184
11184
|
return r;
|
|
11185
11185
|
};
|
|
11186
|
-
|
|
11187
|
-
var i = this.getLookupTables(t, r, n, 1, !0)[0], s =
|
|
11186
|
+
Ce.prototype.addSingle = function(n, e, t, r) {
|
|
11187
|
+
var i = this.getLookupTables(t, r, n, 1, !0)[0], s = Cs(i, 2, {
|
|
11188
11188
|
// lookup type 1 subtable, format 2, coverage format 1
|
|
11189
11189
|
substFormat: 2,
|
|
11190
11190
|
coverage: { format: 1, glyphs: [] },
|
|
@@ -11194,9 +11194,9 @@ var Jd = Zh((O) => {
|
|
|
11194
11194
|
var a = e.sub, o = this.binSearch(s.coverage.glyphs, a);
|
|
11195
11195
|
o < 0 && (o = -1 - o, s.coverage.glyphs.splice(o, 0, a), s.substitute.splice(o, 0, 0)), s.substitute[o] = e.by;
|
|
11196
11196
|
};
|
|
11197
|
-
|
|
11197
|
+
Ce.prototype.addMultiple = function(n, e, t, r) {
|
|
11198
11198
|
G.assert(e.by instanceof Array && e.by.length > 1, 'Multiple: "by" must be an array of two or more ids');
|
|
11199
|
-
var i = this.getLookupTables(t, r, n, 2, !0)[0], s =
|
|
11199
|
+
var i = this.getLookupTables(t, r, n, 2, !0)[0], s = Cs(i, 1, {
|
|
11200
11200
|
// lookup type 2 subtable, format 1, coverage format 1
|
|
11201
11201
|
substFormat: 1,
|
|
11202
11202
|
coverage: { format: 1, glyphs: [] },
|
|
@@ -11206,8 +11206,8 @@ var Jd = Zh((O) => {
|
|
|
11206
11206
|
var a = e.sub, o = this.binSearch(s.coverage.glyphs, a);
|
|
11207
11207
|
o < 0 && (o = -1 - o, s.coverage.glyphs.splice(o, 0, a), s.sequences.splice(o, 0, 0)), s.sequences[o] = e.by;
|
|
11208
11208
|
};
|
|
11209
|
-
|
|
11210
|
-
var i = this.getLookupTables(t, r, n, 3, !0)[0], s =
|
|
11209
|
+
Ce.prototype.addAlternate = function(n, e, t, r) {
|
|
11210
|
+
var i = this.getLookupTables(t, r, n, 3, !0)[0], s = Cs(i, 1, {
|
|
11211
11211
|
// lookup type 3 subtable, format 1, coverage format 1
|
|
11212
11212
|
substFormat: 1,
|
|
11213
11213
|
coverage: { format: 1, glyphs: [] },
|
|
@@ -11217,7 +11217,7 @@ var Jd = Zh((O) => {
|
|
|
11217
11217
|
var a = e.sub, o = this.binSearch(s.coverage.glyphs, a);
|
|
11218
11218
|
o < 0 && (o = -1 - o, s.coverage.glyphs.splice(o, 0, a), s.alternateSets.splice(o, 0, 0)), s.alternateSets[o] = e.by;
|
|
11219
11219
|
};
|
|
11220
|
-
|
|
11220
|
+
Ce.prototype.addLigature = function(n, e, t, r) {
|
|
11221
11221
|
var i = this.getLookupTables(t, r, n, 4, !0)[0], s = i.subtables[0];
|
|
11222
11222
|
s || (s = {
|
|
11223
11223
|
// lookup type 4 subtable, format 1, coverage format 1
|
|
@@ -11237,7 +11237,7 @@ var Jd = Zh((O) => {
|
|
|
11237
11237
|
} else
|
|
11238
11238
|
c = -1 - c, s.coverage.glyphs.splice(c, 0, a), s.ligatureSets.splice(c, 0, [h]);
|
|
11239
11239
|
};
|
|
11240
|
-
|
|
11240
|
+
Ce.prototype.getFeature = function(n, e, t) {
|
|
11241
11241
|
if (/ss\d\d/.test(n))
|
|
11242
11242
|
return this.getSingle(n, e, t);
|
|
11243
11243
|
switch (n) {
|
|
@@ -11254,7 +11254,7 @@ var Jd = Zh((O) => {
|
|
|
11254
11254
|
return this.getMultiple(n, e, t);
|
|
11255
11255
|
}
|
|
11256
11256
|
};
|
|
11257
|
-
|
|
11257
|
+
Ce.prototype.add = function(n, e, t, r) {
|
|
11258
11258
|
if (/ss\d\d/.test(n))
|
|
11259
11259
|
return this.addSingle(n, e, t, r);
|
|
11260
11260
|
switch (n) {
|
|
@@ -11320,7 +11320,7 @@ var Jd = Zh((O) => {
|
|
|
11320
11320
|
n.isComposite = !0, n.points = [], n.components = [];
|
|
11321
11321
|
for (var F = !0; F; ) {
|
|
11322
11322
|
i = r.parseUShort();
|
|
11323
|
-
var
|
|
11323
|
+
var k = {
|
|
11324
11324
|
glyphIndex: r.parseUShort(),
|
|
11325
11325
|
xScale: 1,
|
|
11326
11326
|
scale01: 0,
|
|
@@ -11329,7 +11329,7 @@ var Jd = Zh((O) => {
|
|
|
11329
11329
|
dx: 0,
|
|
11330
11330
|
dy: 0
|
|
11331
11331
|
};
|
|
11332
|
-
(i & 1) > 0 ? (i & 2) > 0 ? (
|
|
11332
|
+
(i & 1) > 0 ? (i & 2) > 0 ? (k.dx = r.parseShort(), k.dy = r.parseShort()) : k.matchedPoints = [r.parseUShort(), r.parseUShort()] : (i & 2) > 0 ? (k.dx = r.parseChar(), k.dy = r.parseChar()) : k.matchedPoints = [r.parseByte(), r.parseByte()], (i & 8) > 0 ? k.xScale = k.yScale = r.parseF2Dot14() : (i & 64) > 0 ? (k.xScale = r.parseF2Dot14(), k.yScale = r.parseF2Dot14()) : (i & 128) > 0 && (k.xScale = r.parseF2Dot14(), k.scale01 = r.parseF2Dot14(), k.scale10 = r.parseF2Dot14(), k.yScale = r.parseF2Dot14()), n.components.push(k), F = !!(i & 32);
|
|
11333
11333
|
}
|
|
11334
11334
|
if (i & 256) {
|
|
11335
11335
|
n.instructionLength = r.parseUShort(), n.instructions = [];
|
|
@@ -11812,8 +11812,8 @@ var Jd = Zh((O) => {
|
|
|
11812
11812
|
function hf(n) {
|
|
11813
11813
|
var e = n.stack, t = e.pop(), r = e.pop(), i = e.pop(), s = e.pop(), a = e.pop(), o = n.z0, h = n.z1, c = o[t], u = o[r], f = h[i], l = h[s], p = n.z2[a];
|
|
11814
11814
|
O.DEBUG && console.log("ISECT[], ", t, r, i, s, a);
|
|
11815
|
-
var g = c.x, m = c.y, x = u.x, v = u.y, w = f.x, b = f.y, F = l.x,
|
|
11816
|
-
p.x = (E * (w - F) - B * (g - x)) / _, p.y = (E * (b -
|
|
11815
|
+
var g = c.x, m = c.y, x = u.x, v = u.y, w = f.x, b = f.y, F = l.x, k = l.y, _ = (g - x) * (b - k) - (m - v) * (w - F), E = g * v - m * x, B = w * k - b * F;
|
|
11816
|
+
p.x = (E * (w - F) - B * (g - x)) / _, p.y = (E * (b - k) - B * (m - v)) / _;
|
|
11817
11817
|
}
|
|
11818
11818
|
function cf(n) {
|
|
11819
11819
|
n.rp0 = n.stack.pop(), O.DEBUG && console.log(n.step, "SRP0[]", n.rp0);
|
|
@@ -11910,11 +11910,11 @@ var Jd = Zh((O) => {
|
|
|
11910
11910
|
function Tf(n) {
|
|
11911
11911
|
O.DEBUG && console.log(n.step, "CLEAR[]"), n.stack.length = 0;
|
|
11912
11912
|
}
|
|
11913
|
-
function
|
|
11913
|
+
function kf(n) {
|
|
11914
11914
|
var e = n.stack, t = e.pop(), r = e.pop();
|
|
11915
11915
|
O.DEBUG && console.log(n.step, "SWAP[]"), e.push(t), e.push(r);
|
|
11916
11916
|
}
|
|
11917
|
-
function
|
|
11917
|
+
function Cf(n) {
|
|
11918
11918
|
var e = n.stack;
|
|
11919
11919
|
O.DEBUG && console.log(n.step, "DEPTH[]"), e.push(e.length);
|
|
11920
11920
|
}
|
|
@@ -12343,7 +12343,7 @@ var Jd = Zh((O) => {
|
|
|
12343
12343
|
var e = n.stack.pop();
|
|
12344
12344
|
O.DEBUG && console.log(n.step, "SCANTYPE[]", e);
|
|
12345
12345
|
}
|
|
12346
|
-
function
|
|
12346
|
+
function k0(n) {
|
|
12347
12347
|
var e = n.stack.pop(), t = n.stack.pop();
|
|
12348
12348
|
switch (O.DEBUG && console.log(n.step, "INSTCTRL[]", e, t), e) {
|
|
12349
12349
|
case 1:
|
|
@@ -12460,9 +12460,9 @@ var Jd = Zh((O) => {
|
|
|
12460
12460
|
/* 0x22 */
|
|
12461
12461
|
Tf,
|
|
12462
12462
|
/* 0x23 */
|
|
12463
|
-
Cf,
|
|
12464
|
-
/* 0x24 */
|
|
12465
12463
|
kf,
|
|
12464
|
+
/* 0x24 */
|
|
12465
|
+
Cf,
|
|
12466
12466
|
/* 0x25 */
|
|
12467
12467
|
Ef,
|
|
12468
12468
|
/* 0x26 */
|
|
@@ -12693,7 +12693,7 @@ var Jd = Zh((O) => {
|
|
|
12693
12693
|
/* 0x8D */
|
|
12694
12694
|
T0,
|
|
12695
12695
|
/* 0x8E */
|
|
12696
|
-
|
|
12696
|
+
k0,
|
|
12697
12697
|
/* 0x8F */
|
|
12698
12698
|
void 0,
|
|
12699
12699
|
/* 0x90 */
|
|
@@ -12927,7 +12927,7 @@ var Jd = Zh((O) => {
|
|
|
12927
12927
|
function Ms(n, e, t) {
|
|
12928
12928
|
this.contextName = t, this.startIndex = n, this.endOffset = e;
|
|
12929
12929
|
}
|
|
12930
|
-
function
|
|
12930
|
+
function C0(n, e, t) {
|
|
12931
12931
|
this.contextName = n, this.openRange = null, this.ranges = [], this.checkStart = e, this.checkEnd = t;
|
|
12932
12932
|
}
|
|
12933
12933
|
function Ve(n, e) {
|
|
@@ -13113,7 +13113,7 @@ var Jd = Zh((O) => {
|
|
|
13113
13113
|
return {
|
|
13114
13114
|
FAIL: "missing context end check."
|
|
13115
13115
|
};
|
|
13116
|
-
var r = new
|
|
13116
|
+
var r = new C0(
|
|
13117
13117
|
n,
|
|
13118
13118
|
e,
|
|
13119
13119
|
t
|
|
@@ -13174,13 +13174,13 @@ var Jd = Zh((O) => {
|
|
|
13174
13174
|
}
|
|
13175
13175
|
return this.dispatch("end", [this.tokens]), this.tokens;
|
|
13176
13176
|
};
|
|
13177
|
-
function
|
|
13177
|
+
function kt(n) {
|
|
13178
13178
|
return /[\u0600-\u065F\u066A-\u06D2\u06FA-\u06FF]/.test(n);
|
|
13179
13179
|
}
|
|
13180
13180
|
function zh(n) {
|
|
13181
13181
|
return /[\u0630\u0690\u0621\u0631\u0661\u0671\u0622\u0632\u0672\u0692\u06C2\u0623\u0673\u0693\u06C3\u0624\u0694\u06C4\u0625\u0675\u0695\u06C5\u06E5\u0676\u0696\u06C6\u0627\u0677\u0697\u06C7\u0648\u0688\u0698\u06C8\u0689\u0699\u06C9\u068A\u06CA\u066B\u068B\u06CB\u068C\u068D\u06CD\u06FD\u068E\u06EE\u06FE\u062F\u068F\u06CF\u06EF]/.test(n);
|
|
13182
13182
|
}
|
|
13183
|
-
function
|
|
13183
|
+
function Ct(n) {
|
|
13184
13184
|
return /[\u0600-\u0605\u060C-\u060E\u0610-\u061B\u061E\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED]/.test(n);
|
|
13185
13185
|
}
|
|
13186
13186
|
function On(n) {
|
|
@@ -13245,13 +13245,13 @@ var Jd = Zh((O) => {
|
|
|
13245
13245
|
var i = e.inputCoverage.length - 1;
|
|
13246
13246
|
if (n.lookahead.length < e.lookaheadCoverage.length)
|
|
13247
13247
|
return [];
|
|
13248
|
-
for (var s = n.lookahead.slice(i); s.length &&
|
|
13248
|
+
for (var s = n.lookahead.slice(i); s.length && Ct(s[0].char); )
|
|
13249
13249
|
s.shift();
|
|
13250
13250
|
var a = new Ve(s, 0), o = Li(
|
|
13251
13251
|
e.lookaheadCoverage,
|
|
13252
13252
|
a
|
|
13253
13253
|
), h = [].concat(n.backtrack);
|
|
13254
|
-
for (h.reverse(); h.length &&
|
|
13254
|
+
for (h.reverse(); h.length && Ct(h[0].char); )
|
|
13255
13255
|
h.shift();
|
|
13256
13256
|
if (h.length < e.backtrackCoverage.length)
|
|
13257
13257
|
return [];
|
|
@@ -13264,8 +13264,8 @@ var Jd = Zh((O) => {
|
|
|
13264
13264
|
for (var g = e.lookupRecords[p], m = g.lookupListIndex, x = this.getLookupByIndex(m), v = 0; v < x.subtables.length; v++) {
|
|
13265
13265
|
var w = x.subtables[v], b = this.getLookupMethod(x, w), F = this.getSubstitutionType(x, w);
|
|
13266
13266
|
if (F === "12")
|
|
13267
|
-
for (var
|
|
13268
|
-
var _ = n.get(
|
|
13267
|
+
for (var k = 0; k < r.length; k++) {
|
|
13268
|
+
var _ = n.get(k), E = b(_);
|
|
13269
13269
|
E && l.push(E);
|
|
13270
13270
|
}
|
|
13271
13271
|
}
|
|
@@ -13474,8 +13474,8 @@ var Jd = Zh((O) => {
|
|
|
13474
13474
|
var e = n.current, t = n.get(-1);
|
|
13475
13475
|
return (
|
|
13476
13476
|
// ? arabic first char
|
|
13477
|
-
t === null &&
|
|
13478
|
-
!
|
|
13477
|
+
t === null && kt(e) || // ? arabic char preceded with a non arabic char
|
|
13478
|
+
!kt(t) && kt(e)
|
|
13479
13479
|
);
|
|
13480
13480
|
}
|
|
13481
13481
|
function R0(n) {
|
|
@@ -13483,7 +13483,7 @@ var Jd = Zh((O) => {
|
|
|
13483
13483
|
return (
|
|
13484
13484
|
// ? last arabic char
|
|
13485
13485
|
e === null || // ? next char is not arabic
|
|
13486
|
-
!
|
|
13486
|
+
!kt(e)
|
|
13487
13487
|
);
|
|
13488
13488
|
}
|
|
13489
13489
|
var D0 = {
|
|
@@ -13494,7 +13494,7 @@ var Jd = Zh((O) => {
|
|
|
13494
13494
|
var e = n.current, t = n.get(-1);
|
|
13495
13495
|
return (
|
|
13496
13496
|
// ? an arabic char preceded with a non arabic char
|
|
13497
|
-
(
|
|
13497
|
+
(kt(e) || Ct(e)) && !kt(t)
|
|
13498
13498
|
);
|
|
13499
13499
|
}
|
|
13500
13500
|
function P0(n) {
|
|
@@ -13502,7 +13502,7 @@ var Jd = Zh((O) => {
|
|
|
13502
13502
|
switch (!0) {
|
|
13503
13503
|
case e === null:
|
|
13504
13504
|
return !0;
|
|
13505
|
-
case (!
|
|
13505
|
+
case (!kt(e) && !Ct(e)):
|
|
13506
13506
|
var t = A0(e);
|
|
13507
13507
|
if (!t)
|
|
13508
13508
|
return !0;
|
|
@@ -13510,7 +13510,7 @@ var Jd = Zh((O) => {
|
|
|
13510
13510
|
var r = !1;
|
|
13511
13511
|
if (r = n.lookahead.some(
|
|
13512
13512
|
function(i) {
|
|
13513
|
-
return
|
|
13513
|
+
return kt(i) || Ct(i);
|
|
13514
13514
|
}
|
|
13515
13515
|
), !r)
|
|
13516
13516
|
return !0;
|
|
@@ -13553,7 +13553,7 @@ var Jd = Zh((O) => {
|
|
|
13553
13553
|
}
|
|
13554
13554
|
function q0(n) {
|
|
13555
13555
|
for (var e = [].concat(n.backtrack), t = e.length - 1; t >= 0; t--) {
|
|
13556
|
-
var r = e[t], i = zh(r), s =
|
|
13556
|
+
var r = e[t], i = zh(r), s = Ct(r);
|
|
13557
13557
|
if (!i && !s)
|
|
13558
13558
|
return !0;
|
|
13559
13559
|
if (i)
|
|
@@ -13565,7 +13565,7 @@ var Jd = Zh((O) => {
|
|
|
13565
13565
|
if (zh(n.current))
|
|
13566
13566
|
return !1;
|
|
13567
13567
|
for (var e = 0; e < n.lookahead.length; e++) {
|
|
13568
|
-
var t = n.lookahead[e], r =
|
|
13568
|
+
var t = n.lookahead[e], r = Ct(t);
|
|
13569
13569
|
if (!r)
|
|
13570
13570
|
return !0;
|
|
13571
13571
|
}
|
|
@@ -13590,7 +13590,7 @@ var Jd = Zh((O) => {
|
|
|
13590
13590
|
0
|
|
13591
13591
|
);
|
|
13592
13592
|
i.forEach(function(o, h) {
|
|
13593
|
-
if (!
|
|
13593
|
+
if (!Ct(o.char)) {
|
|
13594
13594
|
s.setCurrentIndex(h), a.setCurrentIndex(h);
|
|
13595
13595
|
var c = 0;
|
|
13596
13596
|
q0(a) && (c |= 1), V0(a) && (c |= 2);
|
|
@@ -13829,7 +13829,7 @@ var Jd = Zh((O) => {
|
|
|
13829
13829
|
usWidthClass: n.widthClass || this.usWidthClasses.MEDIUM,
|
|
13830
13830
|
fsSelection: n.fsSelection || this.fsSelectionValues.REGULAR
|
|
13831
13831
|
}, n.tables.os2)
|
|
13832
|
-
})), this.supported = !0, this.glyphs = new et.GlyphSet(this, n.glyphs || []), this.encoding = new ih(this), this.position = new Xr(this), this.substitution = new
|
|
13832
|
+
})), this.supported = !0, this.glyphs = new et.GlyphSet(this, n.glyphs || []), this.encoding = new ih(this), this.position = new Xr(this), this.substitution = new Ce(this), this.tables = this.tables || {}, this._push = null, this._hmtxTableData = {}, Object.defineProperty(this, "hinting", {
|
|
13833
13833
|
get: function() {
|
|
13834
13834
|
if (this._hinting)
|
|
13835
13835
|
return this._hinting;
|
|
@@ -14290,14 +14290,14 @@ var Jd = Zh((O) => {
|
|
|
14290
14290
|
throw new Error("Unsupported kern table version (" + r + ").");
|
|
14291
14291
|
}
|
|
14292
14292
|
var Tp = { parse: Fp };
|
|
14293
|
-
function
|
|
14293
|
+
function kp(n, e, t, r) {
|
|
14294
14294
|
for (var i = new z.Parser(n, e), s = r ? i.parseUShort : i.parseULong, a = [], o = 0; o < t + 1; o += 1) {
|
|
14295
14295
|
var h = s.call(i);
|
|
14296
14296
|
r && (h *= 2), a.push(h);
|
|
14297
14297
|
}
|
|
14298
14298
|
return a;
|
|
14299
14299
|
}
|
|
14300
|
-
var
|
|
14300
|
+
var Cp = { parse: kp };
|
|
14301
14301
|
function oo(n, e) {
|
|
14302
14302
|
for (var t = [], r = 12, i = 0; i < e; i += 1) {
|
|
14303
14303
|
var s = z.getTag(n, r), a = z.getULong(n, r + 4), o = z.getULong(n, r + 8), h = z.getULong(n, r + 12);
|
|
@@ -14346,20 +14346,20 @@ var Jd = Zh((O) => {
|
|
|
14346
14346
|
a = z.getUShort(s, 12), o = Mp(s, a);
|
|
14347
14347
|
} else
|
|
14348
14348
|
throw new Error("Unsupported OpenType signature " + h);
|
|
14349
|
-
for (var u, f, l, p, g, m, x, v, w, b, F,
|
|
14349
|
+
for (var u, f, l, p, g, m, x, v, w, b, F, k, _ = 0; _ < a; _ += 1) {
|
|
14350
14350
|
var E = o[_], B = void 0;
|
|
14351
14351
|
switch (E.tag) {
|
|
14352
14352
|
case "cmap":
|
|
14353
14353
|
B = le(s, E), i.tables.cmap = nh.parse(B.data, B.offset), i.encoding = new sh(i.tables.cmap);
|
|
14354
14354
|
break;
|
|
14355
14355
|
case "cvt ":
|
|
14356
|
-
B = le(s, E),
|
|
14356
|
+
B = le(s, E), k = new z.Parser(B.data, B.offset), i.tables.cvt = k.parseShortList(E.length / 2);
|
|
14357
14357
|
break;
|
|
14358
14358
|
case "fvar":
|
|
14359
14359
|
f = E;
|
|
14360
14360
|
break;
|
|
14361
14361
|
case "fpgm":
|
|
14362
|
-
B = le(s, E),
|
|
14362
|
+
B = le(s, E), k = new z.Parser(B.data, B.offset), i.tables.fpgm = k.parseByteList(E.length);
|
|
14363
14363
|
break;
|
|
14364
14364
|
case "head":
|
|
14365
14365
|
B = le(s, E), i.tables.head = gh.parse(B.data, B.offset), i.unitsPerEm = i.tables.head.unitsPerEm, t = i.tables.head.indexToLocFormat;
|
|
@@ -14383,10 +14383,10 @@ var Jd = Zh((O) => {
|
|
|
14383
14383
|
B = le(s, E), i.tables.os2 = ds.parse(B.data, B.offset);
|
|
14384
14384
|
break;
|
|
14385
14385
|
case "post":
|
|
14386
|
-
B = le(s, E), i.tables.post =
|
|
14386
|
+
B = le(s, E), i.tables.post = kh.parse(B.data, B.offset), i.glyphNames = new Fs(i.tables.post);
|
|
14387
14387
|
break;
|
|
14388
14388
|
case "prep":
|
|
14389
|
-
B = le(s, E),
|
|
14389
|
+
B = le(s, E), k = new z.Parser(B.data, B.offset), i.tables.prep = k.parseByteList(E.length);
|
|
14390
14390
|
break;
|
|
14391
14391
|
case "glyf":
|
|
14392
14392
|
l = E;
|
|
@@ -14416,7 +14416,7 @@ var Jd = Zh((O) => {
|
|
|
14416
14416
|
}
|
|
14417
14417
|
var I = le(s, b);
|
|
14418
14418
|
if (i.tables.name = Th.parse(I.data, I.offset, r), i.names = i.tables.name, l && w) {
|
|
14419
|
-
var N = t === 0, q = le(s, w), re =
|
|
14419
|
+
var N = t === 0, q = le(s, w), re = Cp.parse(q.data, q.offset, i.numGlyphs, N), Y = le(s, l);
|
|
14420
14420
|
i.glyphs = Oh.parse(Y.data, Y.offset, re, i, e);
|
|
14421
14421
|
} else if (u) {
|
|
14422
14422
|
var Z = le(s, u);
|
|
@@ -14439,7 +14439,7 @@ var Jd = Zh((O) => {
|
|
|
14439
14439
|
}
|
|
14440
14440
|
if (m) {
|
|
14441
14441
|
var ne = le(s, m);
|
|
14442
|
-
i.tables.gsub =
|
|
14442
|
+
i.tables.gsub = Ch.parse(ne.data, ne.offset);
|
|
14443
14443
|
}
|
|
14444
14444
|
if (f) {
|
|
14445
14445
|
var ae = le(s, f);
|
|
@@ -14554,11 +14554,11 @@ var Jd = Zh((O) => {
|
|
|
14554
14554
|
let a = 0;
|
|
14555
14555
|
const o = Object.keys(n.attributes), h = {}, c = {}, u = [], f = ["getX", "getY", "getZ", "getW"], l = ["setX", "setY", "setZ", "setW"];
|
|
14556
14556
|
for (let w = 0, b = o.length; w < b; w++) {
|
|
14557
|
-
const F = o[w],
|
|
14558
|
-
h[F] = new
|
|
14559
|
-
new
|
|
14560
|
-
|
|
14561
|
-
|
|
14557
|
+
const F = o[w], k = n.attributes[F];
|
|
14558
|
+
h[F] = new k.constructor(
|
|
14559
|
+
new k.array.constructor(k.count * k.itemSize),
|
|
14560
|
+
k.itemSize,
|
|
14561
|
+
k.normalized
|
|
14562
14562
|
);
|
|
14563
14563
|
const _ = n.morphAttributes[F];
|
|
14564
14564
|
_ && (c[F] || (c[F] = []), _.forEach((E, B) => {
|
|
@@ -14570,16 +14570,16 @@ var Jd = Zh((O) => {
|
|
|
14570
14570
|
for (let w = 0; w < s; w++) {
|
|
14571
14571
|
const b = r ? r.getX(w) : w;
|
|
14572
14572
|
let F = "";
|
|
14573
|
-
for (let
|
|
14574
|
-
const E = o[
|
|
14573
|
+
for (let k = 0, _ = o.length; k < _; k++) {
|
|
14574
|
+
const E = o[k], B = n.getAttribute(E), I = B.itemSize;
|
|
14575
14575
|
for (let N = 0; N < I; N++)
|
|
14576
14576
|
F += `${~~(B[f[N]](b) * m + x)},`;
|
|
14577
14577
|
}
|
|
14578
14578
|
if (F in t)
|
|
14579
14579
|
u.push(t[F]);
|
|
14580
14580
|
else {
|
|
14581
|
-
for (let
|
|
14582
|
-
const E = o[
|
|
14581
|
+
for (let k = 0, _ = o.length; k < _; k++) {
|
|
14582
|
+
const E = o[k], B = n.getAttribute(E), I = n.morphAttributes[E], N = B.itemSize, q = h[E], re = c[E];
|
|
14583
14583
|
for (let Y = 0; Y < N; Y++) {
|
|
14584
14584
|
const Z = f[Y], j = l[Y];
|
|
14585
14585
|
if (q[j](a, B[Z](b)), I)
|
|
@@ -14599,11 +14599,11 @@ var Jd = Zh((O) => {
|
|
|
14599
14599
|
b.normalized
|
|
14600
14600
|
)), w in c)
|
|
14601
14601
|
for (let F = 0; F < c[w].length; F++) {
|
|
14602
|
-
const
|
|
14603
|
-
v.morphAttributes[w][F] = new
|
|
14604
|
-
|
|
14605
|
-
|
|
14606
|
-
|
|
14602
|
+
const k = c[w][F];
|
|
14603
|
+
v.morphAttributes[w][F] = new k.constructor(
|
|
14604
|
+
k.array.slice(0, a * k.itemSize),
|
|
14605
|
+
k.itemSize,
|
|
14606
|
+
k.normalized
|
|
14607
14607
|
);
|
|
14608
14608
|
}
|
|
14609
14609
|
}
|
|
@@ -15058,7 +15058,7 @@ var Jd = Zh((O) => {
|
|
|
15058
15058
|
return new uo("?", e, this);
|
|
15059
15059
|
}
|
|
15060
15060
|
}
|
|
15061
|
-
|
|
15061
|
+
class be {
|
|
15062
15062
|
/**
|
|
15063
15063
|
* Converts an unsigned byte to a signed byte as used in SHX format.
|
|
15064
15064
|
* Values > 127 are converted to their signed equivalent (-128 to -1).
|
|
@@ -15213,7 +15213,7 @@ var Jd = Zh((O) => {
|
|
|
15213
15213
|
`Position ${e} is out of range for the data length ${this.data.byteLength}!`
|
|
15214
15214
|
);
|
|
15215
15215
|
}
|
|
15216
|
-
}
|
|
15216
|
+
}
|
|
15217
15217
|
var Se = /* @__PURE__ */ ((n) => (n.SHAPES = "shapes", n.BIGFONT = "bigfont", n.UNIFONT = "unifont", n))(Se || {});
|
|
15218
15218
|
class qp {
|
|
15219
15219
|
parse(e) {
|
|
@@ -15699,8 +15699,8 @@ var Jd = Zh((O) => {
|
|
|
15699
15699
|
a = this.polylines.map((v) => {
|
|
15700
15700
|
let w = "";
|
|
15701
15701
|
return v.forEach((b, F) => {
|
|
15702
|
-
const
|
|
15703
|
-
w += F === 0 ? `M ${
|
|
15702
|
+
const k = b.x, _ = -b.y;
|
|
15703
|
+
w += F === 0 ? `M ${k} ${_} ` : `L ${k} ${_} `;
|
|
15704
15704
|
}), `<path d="${w}" stroke="${r}" stroke-width="${t}" fill="none"/>`;
|
|
15705
15705
|
}).join(""), s = `${p} ${-x} ${g - p} ${x - m}`;
|
|
15706
15706
|
} else
|
|
@@ -15998,20 +15998,20 @@ var Jd = Zh((O) => {
|
|
|
15998
15998
|
const b = r.currentPoint.clone().subtract(new ce(c * Math.cos(v), c * Math.sin(v)));
|
|
15999
15999
|
if (r.currentPoint = b.clone().add(new ce(c * Math.cos(w), c * Math.sin(w))), r.isPenDown) {
|
|
16000
16000
|
let F = v;
|
|
16001
|
-
const
|
|
16002
|
-
if (
|
|
16001
|
+
const k = [];
|
|
16002
|
+
if (k.push(
|
|
16003
16003
|
b.clone().add(new ce(c * Math.cos(F), c * Math.sin(F)))
|
|
16004
16004
|
), m > 0)
|
|
16005
16005
|
for (; F + m < w; )
|
|
16006
|
-
F += m,
|
|
16006
|
+
F += m, k.push(
|
|
16007
16007
|
b.clone().add(new ce(c * Math.cos(F), c * Math.sin(F)))
|
|
16008
16008
|
);
|
|
16009
16009
|
else
|
|
16010
16010
|
for (; F + m > w; )
|
|
16011
|
-
F += m,
|
|
16011
|
+
F += m, k.push(
|
|
16012
16012
|
b.clone().add(new ce(c * Math.cos(F), c * Math.sin(F)))
|
|
16013
16013
|
);
|
|
16014
|
-
|
|
16014
|
+
k.push(b.clone().add(new ce(c * Math.cos(w), c * Math.sin(w)))), r.currentPolyline.push(...k);
|
|
16015
16015
|
}
|
|
16016
16016
|
return i;
|
|
16017
16017
|
}
|
|
@@ -16349,8 +16349,8 @@ var Jd = Zh((O) => {
|
|
|
16349
16349
|
var T = S.valueOf && S.valueOf();
|
|
16350
16350
|
if (T != null && T !== S)
|
|
16351
16351
|
return o.from(T, d, y);
|
|
16352
|
-
var
|
|
16353
|
-
if (
|
|
16352
|
+
var C = x(S);
|
|
16353
|
+
if (C) return C;
|
|
16354
16354
|
if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof S[Symbol.toPrimitive] == "function")
|
|
16355
16355
|
return o.from(
|
|
16356
16356
|
S[Symbol.toPrimitive]("string"),
|
|
@@ -16387,8 +16387,8 @@ var Jd = Zh((O) => {
|
|
|
16387
16387
|
function l(S, d) {
|
|
16388
16388
|
if ((typeof d != "string" || d === "") && (d = "utf8"), !o.isEncoding(d))
|
|
16389
16389
|
throw new TypeError("Unknown encoding: " + d);
|
|
16390
|
-
var y = b(S, d) | 0, T = a(y),
|
|
16391
|
-
return
|
|
16390
|
+
var y = b(S, d) | 0, T = a(y), C = T.write(S, d);
|
|
16391
|
+
return C !== y && (T = T.slice(0, C)), T;
|
|
16392
16392
|
}
|
|
16393
16393
|
function p(S) {
|
|
16394
16394
|
for (var d = S.length < 0 ? 0 : v(S.length) | 0, y = a(d), T = 0; T < d; T += 1)
|
|
@@ -16436,12 +16436,12 @@ var Jd = Zh((O) => {
|
|
|
16436
16436
|
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
|
|
16437
16437
|
);
|
|
16438
16438
|
if (d === y) return 0;
|
|
16439
|
-
for (var T = d.length,
|
|
16439
|
+
for (var T = d.length, C = y.length, L = 0, U = Math.min(T, C); L < U; ++L)
|
|
16440
16440
|
if (d[L] !== y[L]) {
|
|
16441
|
-
T = d[L],
|
|
16441
|
+
T = d[L], C = y[L];
|
|
16442
16442
|
break;
|
|
16443
16443
|
}
|
|
16444
|
-
return T <
|
|
16444
|
+
return T < C ? -1 : C < T ? 1 : 0;
|
|
16445
16445
|
}, o.isEncoding = function(d) {
|
|
16446
16446
|
switch (String(d).toLowerCase()) {
|
|
16447
16447
|
case "hex":
|
|
@@ -16468,22 +16468,22 @@ var Jd = Zh((O) => {
|
|
|
16468
16468
|
if (y === void 0)
|
|
16469
16469
|
for (y = 0, T = 0; T < d.length; ++T)
|
|
16470
16470
|
y += d[T].length;
|
|
16471
|
-
var
|
|
16471
|
+
var C = o.allocUnsafe(y), L = 0;
|
|
16472
16472
|
for (T = 0; T < d.length; ++T) {
|
|
16473
16473
|
var U = d[T];
|
|
16474
16474
|
if (Je(U, Uint8Array))
|
|
16475
|
-
L + U.length >
|
|
16476
|
-
|
|
16475
|
+
L + U.length > C.length ? o.from(U).copy(C, L) : Uint8Array.prototype.set.call(
|
|
16476
|
+
C,
|
|
16477
16477
|
U,
|
|
16478
16478
|
L
|
|
16479
16479
|
);
|
|
16480
16480
|
else if (o.isBuffer(U))
|
|
16481
|
-
U.copy(
|
|
16481
|
+
U.copy(C, L);
|
|
16482
16482
|
else
|
|
16483
16483
|
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
16484
16484
|
L += U.length;
|
|
16485
16485
|
}
|
|
16486
|
-
return
|
|
16486
|
+
return C;
|
|
16487
16487
|
};
|
|
16488
16488
|
function b(S, d) {
|
|
16489
16489
|
if (o.isBuffer(S))
|
|
@@ -16496,7 +16496,7 @@ var Jd = Zh((O) => {
|
|
|
16496
16496
|
);
|
|
16497
16497
|
var y = S.length, T = arguments.length > 2 && arguments[2] === !0;
|
|
16498
16498
|
if (!T && y === 0) return 0;
|
|
16499
|
-
for (var
|
|
16499
|
+
for (var C = !1; ; )
|
|
16500
16500
|
switch (d) {
|
|
16501
16501
|
case "ascii":
|
|
16502
16502
|
case "latin1":
|
|
@@ -16515,9 +16515,9 @@ var Jd = Zh((O) => {
|
|
|
16515
16515
|
case "base64":
|
|
16516
16516
|
return zs(S).length;
|
|
16517
16517
|
default:
|
|
16518
|
-
if (
|
|
16518
|
+
if (C)
|
|
16519
16519
|
return T ? -1 : pt(S).length;
|
|
16520
|
-
d = ("" + d).toLowerCase(),
|
|
16520
|
+
d = ("" + d).toLowerCase(), C = !0;
|
|
16521
16521
|
}
|
|
16522
16522
|
}
|
|
16523
16523
|
o.byteLength = b;
|
|
@@ -16550,7 +16550,7 @@ var Jd = Zh((O) => {
|
|
|
16550
16550
|
}
|
|
16551
16551
|
}
|
|
16552
16552
|
o.prototype._isBuffer = !0;
|
|
16553
|
-
function
|
|
16553
|
+
function k(S, d, y) {
|
|
16554
16554
|
var T = S[d];
|
|
16555
16555
|
S[d] = S[y], S[y] = T;
|
|
16556
16556
|
}
|
|
@@ -16559,21 +16559,21 @@ var Jd = Zh((O) => {
|
|
|
16559
16559
|
if (d % 2 !== 0)
|
|
16560
16560
|
throw new RangeError("Buffer size must be a multiple of 16-bits");
|
|
16561
16561
|
for (var y = 0; y < d; y += 2)
|
|
16562
|
-
|
|
16562
|
+
k(this, y, y + 1);
|
|
16563
16563
|
return this;
|
|
16564
16564
|
}, o.prototype.swap32 = function() {
|
|
16565
16565
|
var d = this.length;
|
|
16566
16566
|
if (d % 4 !== 0)
|
|
16567
16567
|
throw new RangeError("Buffer size must be a multiple of 32-bits");
|
|
16568
16568
|
for (var y = 0; y < d; y += 4)
|
|
16569
|
-
|
|
16569
|
+
k(this, y, y + 3), k(this, y + 1, y + 2);
|
|
16570
16570
|
return this;
|
|
16571
16571
|
}, o.prototype.swap64 = function() {
|
|
16572
16572
|
var d = this.length;
|
|
16573
16573
|
if (d % 8 !== 0)
|
|
16574
16574
|
throw new RangeError("Buffer size must be a multiple of 64-bits");
|
|
16575
16575
|
for (var y = 0; y < d; y += 8)
|
|
16576
|
-
|
|
16576
|
+
k(this, y, y + 7), k(this, y + 1, y + 6), k(this, y + 2, y + 5), k(this, y + 3, y + 4);
|
|
16577
16577
|
return this;
|
|
16578
16578
|
}, o.prototype.toString = function() {
|
|
16579
16579
|
var d = this.length;
|
|
@@ -16584,42 +16584,42 @@ var Jd = Zh((O) => {
|
|
|
16584
16584
|
}, o.prototype.inspect = function() {
|
|
16585
16585
|
var d = "", y = n.INSPECT_MAX_BYTES;
|
|
16586
16586
|
return d = this.toString("hex", 0, y).replace(/(.{2})/g, "$1 ").trim(), this.length > y && (d += " ... "), "<Buffer " + d + ">";
|
|
16587
|
-
}, r && (o.prototype[r] = o.prototype.inspect), o.prototype.compare = function(d, y, T,
|
|
16587
|
+
}, r && (o.prototype[r] = o.prototype.inspect), o.prototype.compare = function(d, y, T, C, L) {
|
|
16588
16588
|
if (Je(d, Uint8Array) && (d = o.from(d, d.offset, d.byteLength)), !o.isBuffer(d))
|
|
16589
16589
|
throw new TypeError(
|
|
16590
16590
|
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof d
|
|
16591
16591
|
);
|
|
16592
|
-
if (y === void 0 && (y = 0), T === void 0 && (T = d ? d.length : 0),
|
|
16592
|
+
if (y === void 0 && (y = 0), T === void 0 && (T = d ? d.length : 0), C === void 0 && (C = 0), L === void 0 && (L = this.length), y < 0 || T > d.length || C < 0 || L > this.length)
|
|
16593
16593
|
throw new RangeError("out of range index");
|
|
16594
|
-
if (
|
|
16594
|
+
if (C >= L && y >= T)
|
|
16595
16595
|
return 0;
|
|
16596
|
-
if (
|
|
16596
|
+
if (C >= L)
|
|
16597
16597
|
return -1;
|
|
16598
16598
|
if (y >= T)
|
|
16599
16599
|
return 1;
|
|
16600
|
-
if (y >>>= 0, T >>>= 0,
|
|
16601
|
-
for (var U = L -
|
|
16600
|
+
if (y >>>= 0, T >>>= 0, C >>>= 0, L >>>= 0, this === d) return 0;
|
|
16601
|
+
for (var U = L - C, J = T - y, K = Math.min(U, J), se = this.slice(C, L), ye = d.slice(y, T), he = 0; he < K; ++he)
|
|
16602
16602
|
if (se[he] !== ye[he]) {
|
|
16603
16603
|
U = se[he], J = ye[he];
|
|
16604
16604
|
break;
|
|
16605
16605
|
}
|
|
16606
16606
|
return U < J ? -1 : J < U ? 1 : 0;
|
|
16607
16607
|
};
|
|
16608
|
-
function _(S, d, y, T,
|
|
16608
|
+
function _(S, d, y, T, C) {
|
|
16609
16609
|
if (S.length === 0) return -1;
|
|
16610
|
-
if (typeof y == "string" ? (T = y, y = 0) : y > 2147483647 ? y = 2147483647 : y < -2147483648 && (y = -2147483648), y = +y, jn(y) && (y =
|
|
16611
|
-
if (
|
|
16610
|
+
if (typeof y == "string" ? (T = y, y = 0) : y > 2147483647 ? y = 2147483647 : y < -2147483648 && (y = -2147483648), y = +y, jn(y) && (y = C ? 0 : S.length - 1), y < 0 && (y = S.length + y), y >= S.length) {
|
|
16611
|
+
if (C) return -1;
|
|
16612
16612
|
y = S.length - 1;
|
|
16613
16613
|
} else if (y < 0)
|
|
16614
|
-
if (
|
|
16614
|
+
if (C) y = 0;
|
|
16615
16615
|
else return -1;
|
|
16616
16616
|
if (typeof d == "string" && (d = o.from(d, T)), o.isBuffer(d))
|
|
16617
|
-
return d.length === 0 ? -1 : E(S, d, y, T,
|
|
16617
|
+
return d.length === 0 ? -1 : E(S, d, y, T, C);
|
|
16618
16618
|
if (typeof d == "number")
|
|
16619
|
-
return d = d & 255, typeof Uint8Array.prototype.indexOf == "function" ?
|
|
16619
|
+
return d = d & 255, typeof Uint8Array.prototype.indexOf == "function" ? C ? Uint8Array.prototype.indexOf.call(S, d, y) : Uint8Array.prototype.lastIndexOf.call(S, d, y) : E(S, [d], y, T, C);
|
|
16620
16620
|
throw new TypeError("val must be string, number or Buffer");
|
|
16621
16621
|
}
|
|
16622
|
-
function E(S, d, y, T,
|
|
16622
|
+
function E(S, d, y, T, C) {
|
|
16623
16623
|
var L = 1, U = S.length, J = d.length;
|
|
16624
16624
|
if (T !== void 0 && (T = String(T).toLowerCase(), T === "ucs2" || T === "ucs-2" || T === "utf16le" || T === "utf-16le")) {
|
|
16625
16625
|
if (S.length < 2 || d.length < 2)
|
|
@@ -16630,7 +16630,7 @@ var Jd = Zh((O) => {
|
|
|
16630
16630
|
return L === 1 ? Ns[Gs] : Ns.readUInt16BE(Gs * L);
|
|
16631
16631
|
}
|
|
16632
16632
|
var se;
|
|
16633
|
-
if (
|
|
16633
|
+
if (C) {
|
|
16634
16634
|
var ye = -1;
|
|
16635
16635
|
for (se = y; se < U; se++)
|
|
16636
16636
|
if (K(S, se) === K(d, ye === -1 ? 0 : se - ye)) {
|
|
@@ -16657,8 +16657,8 @@ var Jd = Zh((O) => {
|
|
|
16657
16657
|
};
|
|
16658
16658
|
function B(S, d, y, T) {
|
|
16659
16659
|
y = Number(y) || 0;
|
|
16660
|
-
var
|
|
16661
|
-
T ? (T = Number(T), T >
|
|
16660
|
+
var C = S.length - y;
|
|
16661
|
+
T ? (T = Number(T), T > C && (T = C)) : T = C;
|
|
16662
16662
|
var L = d.length;
|
|
16663
16663
|
T > L / 2 && (T = L / 2);
|
|
16664
16664
|
for (var U = 0; U < T; ++U) {
|
|
@@ -16680,13 +16680,13 @@ var Jd = Zh((O) => {
|
|
|
16680
16680
|
function re(S, d, y, T) {
|
|
16681
16681
|
return en(Xh(d, S.length - y), S, y, T);
|
|
16682
16682
|
}
|
|
16683
|
-
o.prototype.write = function(d, y, T,
|
|
16683
|
+
o.prototype.write = function(d, y, T, C) {
|
|
16684
16684
|
if (y === void 0)
|
|
16685
|
-
|
|
16685
|
+
C = "utf8", T = this.length, y = 0;
|
|
16686
16686
|
else if (T === void 0 && typeof y == "string")
|
|
16687
|
-
|
|
16687
|
+
C = y, T = this.length, y = 0;
|
|
16688
16688
|
else if (isFinite(y))
|
|
16689
|
-
y = y >>> 0, isFinite(T) ? (T = T >>> 0,
|
|
16689
|
+
y = y >>> 0, isFinite(T) ? (T = T >>> 0, C === void 0 && (C = "utf8")) : (C = T, T = void 0);
|
|
16690
16690
|
else
|
|
16691
16691
|
throw new Error(
|
|
16692
16692
|
"Buffer.write(string, encoding, offset[, length]) is no longer supported"
|
|
@@ -16694,9 +16694,9 @@ var Jd = Zh((O) => {
|
|
|
16694
16694
|
var L = this.length - y;
|
|
16695
16695
|
if ((T === void 0 || T > L) && (T = L), d.length > 0 && (T < 0 || y < 0) || y > this.length)
|
|
16696
16696
|
throw new RangeError("Attempt to write outside buffer bounds");
|
|
16697
|
-
|
|
16697
|
+
C || (C = "utf8");
|
|
16698
16698
|
for (var U = !1; ; )
|
|
16699
|
-
switch (
|
|
16699
|
+
switch (C) {
|
|
16700
16700
|
case "hex":
|
|
16701
16701
|
return B(this, d, y, T);
|
|
16702
16702
|
case "utf8":
|
|
@@ -16714,8 +16714,8 @@ var Jd = Zh((O) => {
|
|
|
16714
16714
|
case "utf-16le":
|
|
16715
16715
|
return re(this, d, y, T);
|
|
16716
16716
|
default:
|
|
16717
|
-
if (U) throw new TypeError("Unknown encoding: " +
|
|
16718
|
-
|
|
16717
|
+
if (U) throw new TypeError("Unknown encoding: " + C);
|
|
16718
|
+
C = ("" + C).toLowerCase(), U = !0;
|
|
16719
16719
|
}
|
|
16720
16720
|
}, o.prototype.toJSON = function() {
|
|
16721
16721
|
return {
|
|
@@ -16728,25 +16728,25 @@ var Jd = Zh((O) => {
|
|
|
16728
16728
|
}
|
|
16729
16729
|
function Z(S, d, y) {
|
|
16730
16730
|
y = Math.min(S.length, y);
|
|
16731
|
-
for (var T = [],
|
|
16732
|
-
var L = S[
|
|
16733
|
-
if (
|
|
16731
|
+
for (var T = [], C = d; C < y; ) {
|
|
16732
|
+
var L = S[C], U = null, J = L > 239 ? 4 : L > 223 ? 3 : L > 191 ? 2 : 1;
|
|
16733
|
+
if (C + J <= y) {
|
|
16734
16734
|
var K, se, ye, he;
|
|
16735
16735
|
switch (J) {
|
|
16736
16736
|
case 1:
|
|
16737
16737
|
L < 128 && (U = L);
|
|
16738
16738
|
break;
|
|
16739
16739
|
case 2:
|
|
16740
|
-
K = S[
|
|
16740
|
+
K = S[C + 1], (K & 192) === 128 && (he = (L & 31) << 6 | K & 63, he > 127 && (U = he));
|
|
16741
16741
|
break;
|
|
16742
16742
|
case 3:
|
|
16743
|
-
K = S[
|
|
16743
|
+
K = S[C + 1], se = S[C + 2], (K & 192) === 128 && (se & 192) === 128 && (he = (L & 15) << 12 | (K & 63) << 6 | se & 63, he > 2047 && (he < 55296 || he > 57343) && (U = he));
|
|
16744
16744
|
break;
|
|
16745
16745
|
case 4:
|
|
16746
|
-
K = S[
|
|
16746
|
+
K = S[C + 1], se = S[C + 2], ye = S[C + 3], (K & 192) === 128 && (se & 192) === 128 && (ye & 192) === 128 && (he = (L & 15) << 18 | (K & 63) << 12 | (se & 63) << 6 | ye & 63, he > 65535 && he < 1114112 && (U = he));
|
|
16747
16747
|
}
|
|
16748
16748
|
}
|
|
16749
|
-
U === null ? (U = 65533, J = 1) : U > 65535 && (U -= 65536, T.push(U >>> 10 & 1023 | 55296), U = 56320 | U & 1023), T.push(U),
|
|
16749
|
+
U === null ? (U = 65533, J = 1) : U > 65535 && (U -= 65536, T.push(U >>> 10 & 1023 | 55296), U = 56320 | U & 1023), T.push(U), C += J;
|
|
16750
16750
|
}
|
|
16751
16751
|
return Q(T);
|
|
16752
16752
|
}
|
|
@@ -16765,34 +16765,34 @@ var Jd = Zh((O) => {
|
|
|
16765
16765
|
function te(S, d, y) {
|
|
16766
16766
|
var T = "";
|
|
16767
16767
|
y = Math.min(S.length, y);
|
|
16768
|
-
for (var
|
|
16769
|
-
T += String.fromCharCode(S[
|
|
16768
|
+
for (var C = d; C < y; ++C)
|
|
16769
|
+
T += String.fromCharCode(S[C] & 127);
|
|
16770
16770
|
return T;
|
|
16771
16771
|
}
|
|
16772
16772
|
function ie(S, d, y) {
|
|
16773
16773
|
var T = "";
|
|
16774
16774
|
y = Math.min(S.length, y);
|
|
16775
|
-
for (var
|
|
16776
|
-
T += String.fromCharCode(S[
|
|
16775
|
+
for (var C = d; C < y; ++C)
|
|
16776
|
+
T += String.fromCharCode(S[C]);
|
|
16777
16777
|
return T;
|
|
16778
16778
|
}
|
|
16779
16779
|
function ne(S, d, y) {
|
|
16780
16780
|
var T = S.length;
|
|
16781
16781
|
(!d || d < 0) && (d = 0), (!y || y < 0 || y > T) && (y = T);
|
|
16782
|
-
for (var
|
|
16783
|
-
|
|
16784
|
-
return
|
|
16782
|
+
for (var C = "", L = d; L < y; ++L)
|
|
16783
|
+
C += Yh[S[L]];
|
|
16784
|
+
return C;
|
|
16785
16785
|
}
|
|
16786
16786
|
function ae(S, d, y) {
|
|
16787
|
-
for (var T = S.slice(d, y),
|
|
16788
|
-
|
|
16789
|
-
return
|
|
16787
|
+
for (var T = S.slice(d, y), C = "", L = 0; L < T.length - 1; L += 2)
|
|
16788
|
+
C += String.fromCharCode(T[L] + T[L + 1] * 256);
|
|
16789
|
+
return C;
|
|
16790
16790
|
}
|
|
16791
16791
|
o.prototype.slice = function(d, y) {
|
|
16792
16792
|
var T = this.length;
|
|
16793
16793
|
d = ~~d, y = y === void 0 ? T : ~~y, d < 0 ? (d += T, d < 0 && (d = 0)) : d > T && (d = T), y < 0 ? (y += T, y < 0 && (y = 0)) : y > T && (y = T), y < d && (y = d);
|
|
16794
|
-
var
|
|
16795
|
-
return Object.setPrototypeOf(
|
|
16794
|
+
var C = this.subarray(d, y);
|
|
16795
|
+
return Object.setPrototypeOf(C, o.prototype), C;
|
|
16796
16796
|
};
|
|
16797
16797
|
function H(S, d, y) {
|
|
16798
16798
|
if (S % 1 !== 0 || S < 0) throw new RangeError("offset is not uint");
|
|
@@ -16800,14 +16800,14 @@ var Jd = Zh((O) => {
|
|
|
16800
16800
|
}
|
|
16801
16801
|
o.prototype.readUintLE = o.prototype.readUIntLE = function(d, y, T) {
|
|
16802
16802
|
d = d >>> 0, y = y >>> 0, T || H(d, y, this.length);
|
|
16803
|
-
for (var
|
|
16804
|
-
|
|
16805
|
-
return
|
|
16803
|
+
for (var C = this[d], L = 1, U = 0; ++U < y && (L *= 256); )
|
|
16804
|
+
C += this[d + U] * L;
|
|
16805
|
+
return C;
|
|
16806
16806
|
}, o.prototype.readUintBE = o.prototype.readUIntBE = function(d, y, T) {
|
|
16807
16807
|
d = d >>> 0, y = y >>> 0, T || H(d, y, this.length);
|
|
16808
|
-
for (var
|
|
16809
|
-
|
|
16810
|
-
return
|
|
16808
|
+
for (var C = this[d + --y], L = 1; y > 0 && (L *= 256); )
|
|
16809
|
+
C += this[d + --y] * L;
|
|
16810
|
+
return C;
|
|
16811
16811
|
}, o.prototype.readUint8 = o.prototype.readUInt8 = function(d, y) {
|
|
16812
16812
|
return d = d >>> 0, y || H(d, 1, this.length), this[d];
|
|
16813
16813
|
}, o.prototype.readUint16LE = o.prototype.readUInt16LE = function(d, y) {
|
|
@@ -16820,13 +16820,13 @@ var Jd = Zh((O) => {
|
|
|
16820
16820
|
return d = d >>> 0, y || H(d, 4, this.length), this[d] * 16777216 + (this[d + 1] << 16 | this[d + 2] << 8 | this[d + 3]);
|
|
16821
16821
|
}, o.prototype.readIntLE = function(d, y, T) {
|
|
16822
16822
|
d = d >>> 0, y = y >>> 0, T || H(d, y, this.length);
|
|
16823
|
-
for (var
|
|
16824
|
-
|
|
16825
|
-
return L *= 128,
|
|
16823
|
+
for (var C = this[d], L = 1, U = 0; ++U < y && (L *= 256); )
|
|
16824
|
+
C += this[d + U] * L;
|
|
16825
|
+
return L *= 128, C >= L && (C -= Math.pow(2, 8 * y)), C;
|
|
16826
16826
|
}, o.prototype.readIntBE = function(d, y, T) {
|
|
16827
16827
|
d = d >>> 0, y = y >>> 0, T || H(d, y, this.length);
|
|
16828
|
-
for (var
|
|
16829
|
-
U += this[d + --
|
|
16828
|
+
for (var C = y, L = 1, U = this[d + --C]; C > 0 && (L *= 256); )
|
|
16829
|
+
U += this[d + --C] * L;
|
|
16830
16830
|
return L *= 128, U >= L && (U -= Math.pow(2, 8 * y)), U;
|
|
16831
16831
|
}, o.prototype.readInt8 = function(d, y) {
|
|
16832
16832
|
return d = d >>> 0, y || H(d, 1, this.length), this[d] & 128 ? (255 - this[d] + 1) * -1 : this[d];
|
|
@@ -16851,13 +16851,13 @@ var Jd = Zh((O) => {
|
|
|
16851
16851
|
}, o.prototype.readDoubleBE = function(d, y) {
|
|
16852
16852
|
return d = d >>> 0, y || H(d, 8, this.length), t.read(this, d, !1, 52, 8);
|
|
16853
16853
|
};
|
|
16854
|
-
function $(S, d, y, T,
|
|
16854
|
+
function $(S, d, y, T, C, L) {
|
|
16855
16855
|
if (!o.isBuffer(S)) throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
16856
|
-
if (d >
|
|
16856
|
+
if (d > C || d < L) throw new RangeError('"value" argument is out of bounds');
|
|
16857
16857
|
if (y + T > S.length) throw new RangeError("Index out of range");
|
|
16858
16858
|
}
|
|
16859
|
-
o.prototype.writeUintLE = o.prototype.writeUIntLE = function(d, y, T,
|
|
16860
|
-
if (d = +d, y = y >>> 0, T = T >>> 0, !
|
|
16859
|
+
o.prototype.writeUintLE = o.prototype.writeUIntLE = function(d, y, T, C) {
|
|
16860
|
+
if (d = +d, y = y >>> 0, T = T >>> 0, !C) {
|
|
16861
16861
|
var L = Math.pow(2, 8 * T) - 1;
|
|
16862
16862
|
$(this, d, y, T, L, 0);
|
|
16863
16863
|
}
|
|
@@ -16865,8 +16865,8 @@ var Jd = Zh((O) => {
|
|
|
16865
16865
|
for (this[y] = d & 255; ++J < T && (U *= 256); )
|
|
16866
16866
|
this[y + J] = d / U & 255;
|
|
16867
16867
|
return y + T;
|
|
16868
|
-
}, o.prototype.writeUintBE = o.prototype.writeUIntBE = function(d, y, T,
|
|
16869
|
-
if (d = +d, y = y >>> 0, T = T >>> 0, !
|
|
16868
|
+
}, o.prototype.writeUintBE = o.prototype.writeUIntBE = function(d, y, T, C) {
|
|
16869
|
+
if (d = +d, y = y >>> 0, T = T >>> 0, !C) {
|
|
16870
16870
|
var L = Math.pow(2, 8 * T) - 1;
|
|
16871
16871
|
$(this, d, y, T, L, 0);
|
|
16872
16872
|
}
|
|
@@ -16884,8 +16884,8 @@ var Jd = Zh((O) => {
|
|
|
16884
16884
|
return d = +d, y = y >>> 0, T || $(this, d, y, 4, 4294967295, 0), this[y + 3] = d >>> 24, this[y + 2] = d >>> 16, this[y + 1] = d >>> 8, this[y] = d & 255, y + 4;
|
|
16885
16885
|
}, o.prototype.writeUint32BE = o.prototype.writeUInt32BE = function(d, y, T) {
|
|
16886
16886
|
return d = +d, y = y >>> 0, T || $(this, d, y, 4, 4294967295, 0), this[y] = d >>> 24, this[y + 1] = d >>> 16, this[y + 2] = d >>> 8, this[y + 3] = d & 255, y + 4;
|
|
16887
|
-
}, o.prototype.writeIntLE = function(d, y, T,
|
|
16888
|
-
if (d = +d, y = y >>> 0, !
|
|
16887
|
+
}, o.prototype.writeIntLE = function(d, y, T, C) {
|
|
16888
|
+
if (d = +d, y = y >>> 0, !C) {
|
|
16889
16889
|
var L = Math.pow(2, 8 * T - 1);
|
|
16890
16890
|
$(this, d, y, T, L - 1, -L);
|
|
16891
16891
|
}
|
|
@@ -16893,8 +16893,8 @@ var Jd = Zh((O) => {
|
|
|
16893
16893
|
for (this[y] = d & 255; ++U < T && (J *= 256); )
|
|
16894
16894
|
d < 0 && K === 0 && this[y + U - 1] !== 0 && (K = 1), this[y + U] = (d / J >> 0) - K & 255;
|
|
16895
16895
|
return y + T;
|
|
16896
|
-
}, o.prototype.writeIntBE = function(d, y, T,
|
|
16897
|
-
if (d = +d, y = y >>> 0, !
|
|
16896
|
+
}, o.prototype.writeIntBE = function(d, y, T, C) {
|
|
16897
|
+
if (d = +d, y = y >>> 0, !C) {
|
|
16898
16898
|
var L = Math.pow(2, 8 * T - 1);
|
|
16899
16899
|
$(this, d, y, T, L - 1, -L);
|
|
16900
16900
|
}
|
|
@@ -16913,48 +16913,48 @@ var Jd = Zh((O) => {
|
|
|
16913
16913
|
}, o.prototype.writeInt32BE = function(d, y, T) {
|
|
16914
16914
|
return d = +d, y = y >>> 0, T || $(this, d, y, 4, 2147483647, -2147483648), d < 0 && (d = 4294967295 + d + 1), this[y] = d >>> 24, this[y + 1] = d >>> 16, this[y + 2] = d >>> 8, this[y + 3] = d & 255, y + 4;
|
|
16915
16915
|
};
|
|
16916
|
-
function Vt(S, d, y, T,
|
|
16916
|
+
function Vt(S, d, y, T, C, L) {
|
|
16917
16917
|
if (y + T > S.length) throw new RangeError("Index out of range");
|
|
16918
16918
|
if (y < 0) throw new RangeError("Index out of range");
|
|
16919
16919
|
}
|
|
16920
|
-
function jr(S, d, y, T,
|
|
16921
|
-
return d = +d, y = y >>> 0,
|
|
16920
|
+
function jr(S, d, y, T, C) {
|
|
16921
|
+
return d = +d, y = y >>> 0, C || Vt(S, d, y, 4), t.write(S, d, y, T, 23, 4), y + 4;
|
|
16922
16922
|
}
|
|
16923
16923
|
o.prototype.writeFloatLE = function(d, y, T) {
|
|
16924
16924
|
return jr(this, d, y, !0, T);
|
|
16925
16925
|
}, o.prototype.writeFloatBE = function(d, y, T) {
|
|
16926
16926
|
return jr(this, d, y, !1, T);
|
|
16927
16927
|
};
|
|
16928
|
-
function Qr(S, d, y, T,
|
|
16929
|
-
return d = +d, y = y >>> 0,
|
|
16928
|
+
function Qr(S, d, y, T, C) {
|
|
16929
|
+
return d = +d, y = y >>> 0, C || Vt(S, d, y, 8), t.write(S, d, y, T, 52, 8), y + 8;
|
|
16930
16930
|
}
|
|
16931
16931
|
o.prototype.writeDoubleLE = function(d, y, T) {
|
|
16932
16932
|
return Qr(this, d, y, !0, T);
|
|
16933
16933
|
}, o.prototype.writeDoubleBE = function(d, y, T) {
|
|
16934
16934
|
return Qr(this, d, y, !1, T);
|
|
16935
|
-
}, o.prototype.copy = function(d, y, T,
|
|
16935
|
+
}, o.prototype.copy = function(d, y, T, C) {
|
|
16936
16936
|
if (!o.isBuffer(d)) throw new TypeError("argument should be a Buffer");
|
|
16937
|
-
if (T || (T = 0), !
|
|
16937
|
+
if (T || (T = 0), !C && C !== 0 && (C = this.length), y >= d.length && (y = d.length), y || (y = 0), C > 0 && C < T && (C = T), C === T || d.length === 0 || this.length === 0) return 0;
|
|
16938
16938
|
if (y < 0)
|
|
16939
16939
|
throw new RangeError("targetStart out of bounds");
|
|
16940
16940
|
if (T < 0 || T >= this.length) throw new RangeError("Index out of range");
|
|
16941
|
-
if (
|
|
16942
|
-
|
|
16943
|
-
var L =
|
|
16944
|
-
return this === d && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(y, T,
|
|
16941
|
+
if (C < 0) throw new RangeError("sourceEnd out of bounds");
|
|
16942
|
+
C > this.length && (C = this.length), d.length - y < C - T && (C = d.length - y + T);
|
|
16943
|
+
var L = C - T;
|
|
16944
|
+
return this === d && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(y, T, C) : Uint8Array.prototype.set.call(
|
|
16945
16945
|
d,
|
|
16946
|
-
this.subarray(T,
|
|
16946
|
+
this.subarray(T, C),
|
|
16947
16947
|
y
|
|
16948
16948
|
), L;
|
|
16949
|
-
}, o.prototype.fill = function(d, y, T,
|
|
16949
|
+
}, o.prototype.fill = function(d, y, T, C) {
|
|
16950
16950
|
if (typeof d == "string") {
|
|
16951
|
-
if (typeof y == "string" ? (
|
|
16951
|
+
if (typeof y == "string" ? (C = y, y = 0, T = this.length) : typeof T == "string" && (C = T, T = this.length), C !== void 0 && typeof C != "string")
|
|
16952
16952
|
throw new TypeError("encoding must be a string");
|
|
16953
|
-
if (typeof
|
|
16954
|
-
throw new TypeError("Unknown encoding: " +
|
|
16953
|
+
if (typeof C == "string" && !o.isEncoding(C))
|
|
16954
|
+
throw new TypeError("Unknown encoding: " + C);
|
|
16955
16955
|
if (d.length === 1) {
|
|
16956
16956
|
var L = d.charCodeAt(0);
|
|
16957
|
-
(
|
|
16957
|
+
(C === "utf8" && L < 128 || C === "latin1") && (d = L);
|
|
16958
16958
|
}
|
|
16959
16959
|
} else typeof d == "number" ? d = d & 255 : typeof d == "boolean" && (d = Number(d));
|
|
16960
16960
|
if (y < 0 || this.length < y || this.length < T)
|
|
@@ -16967,7 +16967,7 @@ var Jd = Zh((O) => {
|
|
|
16967
16967
|
for (U = y; U < T; ++U)
|
|
16968
16968
|
this[U] = d;
|
|
16969
16969
|
else {
|
|
16970
|
-
var J = o.isBuffer(d) ? d : o.from(d,
|
|
16970
|
+
var J = o.isBuffer(d) ? d : o.from(d, C), K = J.length;
|
|
16971
16971
|
if (K === 0)
|
|
16972
16972
|
throw new TypeError('The value "' + d + '" is invalid for argument "value"');
|
|
16973
16973
|
for (U = 0; U < T - y; ++U)
|
|
@@ -16984,9 +16984,9 @@ var Jd = Zh((O) => {
|
|
|
16984
16984
|
}
|
|
16985
16985
|
function pt(S, d) {
|
|
16986
16986
|
d = d || 1 / 0;
|
|
16987
|
-
for (var y, T = S.length,
|
|
16987
|
+
for (var y, T = S.length, C = null, L = [], U = 0; U < T; ++U) {
|
|
16988
16988
|
if (y = S.charCodeAt(U), y > 55295 && y < 57344) {
|
|
16989
|
-
if (!
|
|
16989
|
+
if (!C) {
|
|
16990
16990
|
if (y > 56319) {
|
|
16991
16991
|
(d -= 3) > -1 && L.push(239, 191, 189);
|
|
16992
16992
|
continue;
|
|
@@ -16994,16 +16994,16 @@ var Jd = Zh((O) => {
|
|
|
16994
16994
|
(d -= 3) > -1 && L.push(239, 191, 189);
|
|
16995
16995
|
continue;
|
|
16996
16996
|
}
|
|
16997
|
-
|
|
16997
|
+
C = y;
|
|
16998
16998
|
continue;
|
|
16999
16999
|
}
|
|
17000
17000
|
if (y < 56320) {
|
|
17001
|
-
(d -= 3) > -1 && L.push(239, 191, 189),
|
|
17001
|
+
(d -= 3) > -1 && L.push(239, 191, 189), C = y;
|
|
17002
17002
|
continue;
|
|
17003
17003
|
}
|
|
17004
|
-
y = (
|
|
17005
|
-
} else
|
|
17006
|
-
if (
|
|
17004
|
+
y = (C - 55296 << 10 | y - 56320) + 65536;
|
|
17005
|
+
} else C && (d -= 3) > -1 && L.push(239, 191, 189);
|
|
17006
|
+
if (C = null, y < 128) {
|
|
17007
17007
|
if ((d -= 1) < 0) break;
|
|
17008
17008
|
L.push(y);
|
|
17009
17009
|
} else if (y < 2048) {
|
|
@@ -17038,17 +17038,17 @@ var Jd = Zh((O) => {
|
|
|
17038
17038
|
return d;
|
|
17039
17039
|
}
|
|
17040
17040
|
function Xh(S, d) {
|
|
17041
|
-
for (var y, T,
|
|
17042
|
-
y = S.charCodeAt(U), T = y >> 8,
|
|
17041
|
+
for (var y, T, C, L = [], U = 0; U < S.length && !((d -= 2) < 0); ++U)
|
|
17042
|
+
y = S.charCodeAt(U), T = y >> 8, C = y % 256, L.push(C), L.push(T);
|
|
17043
17043
|
return L;
|
|
17044
17044
|
}
|
|
17045
17045
|
function zs(S) {
|
|
17046
17046
|
return e.toByteArray(Kr(S));
|
|
17047
17047
|
}
|
|
17048
17048
|
function en(S, d, y, T) {
|
|
17049
|
-
for (var
|
|
17050
|
-
d[
|
|
17051
|
-
return
|
|
17049
|
+
for (var C = 0; C < T && !(C + y >= d.length || C >= S.length); ++C)
|
|
17050
|
+
d[C + y] = S[C];
|
|
17051
|
+
return C;
|
|
17052
17052
|
}
|
|
17053
17053
|
function Je(S, d) {
|
|
17054
17054
|
return S instanceof d || S != null && S.constructor != null && S.constructor.name != null && S.constructor.name === d.name;
|
|
@@ -17058,8 +17058,8 @@ var Jd = Zh((O) => {
|
|
|
17058
17058
|
}
|
|
17059
17059
|
var Yh = function() {
|
|
17060
17060
|
for (var S = "0123456789abcdef", d = new Array(256), y = 0; y < 16; ++y)
|
|
17061
|
-
for (var T = y * 16,
|
|
17062
|
-
d[T +
|
|
17061
|
+
for (var T = y * 16, C = 0; C < 16; ++C)
|
|
17062
|
+
d[T + C] = S[y] + S[C];
|
|
17063
17063
|
return d;
|
|
17064
17064
|
}();
|
|
17065
17065
|
})(Bs);
|
|
@@ -17245,8 +17245,8 @@ var Jd = Zh((O) => {
|
|
|
17245
17245
|
function a(v, w, b) {
|
|
17246
17246
|
var F = w.length - 1;
|
|
17247
17247
|
if (F < b) return 0;
|
|
17248
|
-
var
|
|
17249
|
-
return
|
|
17248
|
+
var k = s(w[F]);
|
|
17249
|
+
return k >= 0 ? (k > 0 && (v.lastNeed = k - 1), k) : --F < b || k === -2 ? 0 : (k = s(w[F]), k >= 0 ? (k > 0 && (v.lastNeed = k - 2), k) : --F < b || k === -2 ? 0 : (k = s(w[F]), k >= 0 ? (k > 0 && (k === 2 ? k = 0 : v.lastNeed = k - 3), k) : 0));
|
|
17250
17250
|
}
|
|
17251
17251
|
function o(v, w, b) {
|
|
17252
17252
|
if ((w[0] & 192) !== 128)
|
|
@@ -17638,16 +17638,16 @@ var Jd = Zh((O) => {
|
|
|
17638
17638
|
if (F == v && m[F] == c)
|
|
17639
17639
|
x += "+";
|
|
17640
17640
|
else {
|
|
17641
|
-
var
|
|
17642
|
-
x += this.iconv.decode(n.from(
|
|
17641
|
+
var k = b + this.iconv.decode(m.slice(v, F), "ascii");
|
|
17642
|
+
x += this.iconv.decode(n.from(k, "base64"), "utf16-be");
|
|
17643
17643
|
}
|
|
17644
17644
|
m[F] != c && F--, v = F + 1, w = !1, b = "";
|
|
17645
17645
|
}
|
|
17646
17646
|
if (!w)
|
|
17647
17647
|
x += this.iconv.decode(m.slice(v), "ascii");
|
|
17648
17648
|
else {
|
|
17649
|
-
var
|
|
17650
|
-
b =
|
|
17649
|
+
var k = b + this.iconv.decode(m.slice(v), "ascii"), _ = k.length - k.length % 8;
|
|
17650
|
+
b = k.slice(_), k = k.slice(0, _), x += this.iconv.decode(n.from(k, "base64"), "utf16-be");
|
|
17651
17651
|
}
|
|
17652
17652
|
return this.inBase64 = w, this.base64Accum = b, x;
|
|
17653
17653
|
}, i.prototype.end = function() {
|
|
@@ -17662,8 +17662,8 @@ var Jd = Zh((O) => {
|
|
|
17662
17662
|
this.iconv = x.iconv, this.inBase64 = !1, this.base64Accum = n.alloc(6), this.base64AccumIdx = 0;
|
|
17663
17663
|
}
|
|
17664
17664
|
l.prototype.write = function(m) {
|
|
17665
|
-
for (var x = this.inBase64, v = this.base64Accum, w = this.base64AccumIdx, b = n.alloc(m.length * 5 + 10), F = 0,
|
|
17666
|
-
var _ = m.charCodeAt(
|
|
17665
|
+
for (var x = this.inBase64, v = this.base64Accum, w = this.base64AccumIdx, b = n.alloc(m.length * 5 + 10), F = 0, k = 0; k < m.length; k++) {
|
|
17666
|
+
var _ = m.charCodeAt(k);
|
|
17667
17667
|
_ >= 32 && _ <= 126 ? (x && (w > 0 && (F += b.write(v.slice(0, w).toString("base64").replace(/\//g, ",").replace(/=+$/, ""), F), w = 0), b[F++] = c, x = !1), x || (b[F++] = _, _ === u && (b[F++] = c))) : (x || (b[F++] = u, x = !0), x && (v[w++] = _ >> 8, v[w++] = _ & 255, w == v.length && (F += b.write(v.toString("base64").replace(/\//g, ","), F), w = 0)));
|
|
17668
17668
|
}
|
|
17669
17669
|
return this.inBase64 = x, this.base64AccumIdx = w, b.slice(0, F);
|
|
@@ -17683,16 +17683,16 @@ var Jd = Zh((O) => {
|
|
|
17683
17683
|
if (F == v && m[F] == c)
|
|
17684
17684
|
x += "&";
|
|
17685
17685
|
else {
|
|
17686
|
-
var
|
|
17687
|
-
x += this.iconv.decode(n.from(
|
|
17686
|
+
var k = b + this.iconv.decode(m.slice(v, F), "ascii").replace(/,/g, "/");
|
|
17687
|
+
x += this.iconv.decode(n.from(k, "base64"), "utf16-be");
|
|
17688
17688
|
}
|
|
17689
17689
|
m[F] != c && F--, v = F + 1, w = !1, b = "";
|
|
17690
17690
|
}
|
|
17691
17691
|
if (!w)
|
|
17692
17692
|
x += this.iconv.decode(m.slice(v), "ascii");
|
|
17693
17693
|
else {
|
|
17694
|
-
var
|
|
17695
|
-
b =
|
|
17694
|
+
var k = b + this.iconv.decode(m.slice(v), "ascii").replace(/,/g, "/"), _ = k.length - k.length % 8;
|
|
17695
|
+
b = k.slice(_), k = k.slice(0, _), x += this.iconv.decode(n.from(k, "base64"), "utf16-be");
|
|
17696
17696
|
}
|
|
17697
17697
|
return this.inBase64 = w, this.base64Accum = b, x;
|
|
17698
17698
|
}, p.prototype.end = function() {
|
|
@@ -18375,16 +18375,16 @@ var Jd = Zh((O) => {
|
|
|
18375
18375
|
b[F] = i - x;
|
|
18376
18376
|
else if (b[F] > i)
|
|
18377
18377
|
throw new Error("gb18030 decode tables conflict at byte 2");
|
|
18378
|
-
for (var
|
|
18379
|
-
if (
|
|
18380
|
-
|
|
18378
|
+
for (var k = this.decodeTables[i - b[F]], _ = 129; _ <= 254; _++) {
|
|
18379
|
+
if (k[_] === e)
|
|
18380
|
+
k[_] = i - v;
|
|
18381
18381
|
else {
|
|
18382
|
-
if (
|
|
18382
|
+
if (k[_] === i - v)
|
|
18383
18383
|
continue;
|
|
18384
|
-
if (
|
|
18384
|
+
if (k[_] > i)
|
|
18385
18385
|
throw new Error("gb18030 decode tables conflict at byte 3");
|
|
18386
18386
|
}
|
|
18387
|
-
for (var E = this.decodeTables[i -
|
|
18387
|
+
for (var E = this.decodeTables[i - k[_]], B = 48; B <= 57; B++)
|
|
18388
18388
|
E[B] === e && (E[B] = t);
|
|
18389
18389
|
}
|
|
18390
18390
|
}
|
|
@@ -18434,9 +18434,9 @@ var Jd = Zh((O) => {
|
|
|
18434
18434
|
else
|
|
18435
18435
|
throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + l[0]);
|
|
18436
18436
|
} else if (w > 4080 && w <= 4095) {
|
|
18437
|
-
for (var F = 4095 - w + 2,
|
|
18438
|
-
|
|
18439
|
-
g[p++] = r - this.decodeTableSeq.length, this.decodeTableSeq.push(
|
|
18437
|
+
for (var F = 4095 - w + 2, k = [], _ = 0; _ < F; _++)
|
|
18438
|
+
k.push(x.charCodeAt(v++));
|
|
18439
|
+
g[p++] = r - this.decodeTableSeq.length, this.decodeTableSeq.push(k);
|
|
18440
18440
|
} else
|
|
18441
18441
|
g[p++] = w;
|
|
18442
18442
|
}
|
|
@@ -18469,10 +18469,10 @@ var Jd = Zh((O) => {
|
|
|
18469
18469
|
if (b >= 0)
|
|
18470
18470
|
this._setEncodeChar(b, F), x = !0;
|
|
18471
18471
|
else if (b <= i) {
|
|
18472
|
-
var
|
|
18473
|
-
if (!v[
|
|
18472
|
+
var k = i - b;
|
|
18473
|
+
if (!v[k]) {
|
|
18474
18474
|
var _ = F << 8 >>> 0;
|
|
18475
|
-
this._fillEncodeTable(
|
|
18475
|
+
this._fillEncodeTable(k, _, g) ? x = !0 : v[k] = !0;
|
|
18476
18476
|
}
|
|
18477
18477
|
} else b <= r && (this._setEncodeSequence(this.decodeTableSeq[r - b], F), x = !0);
|
|
18478
18478
|
}
|
|
@@ -18502,11 +18502,11 @@ var Jd = Zh((O) => {
|
|
|
18502
18502
|
else g !== -1 && (x = b, b = e, g = -1);
|
|
18503
18503
|
var F = e;
|
|
18504
18504
|
if (m !== void 0 && b != e) {
|
|
18505
|
-
var
|
|
18506
|
-
if (typeof
|
|
18507
|
-
m =
|
|
18505
|
+
var k = m[b];
|
|
18506
|
+
if (typeof k == "object") {
|
|
18507
|
+
m = k;
|
|
18508
18508
|
continue;
|
|
18509
|
-
} else typeof
|
|
18509
|
+
} else typeof k == "number" ? F = k : k == null && (k = m[a], k !== void 0 && (F = k, x = b));
|
|
18510
18510
|
m = void 0;
|
|
18511
18511
|
} else if (b >= 0) {
|
|
18512
18512
|
var _ = this.encodeTable[b >> 8];
|
|
@@ -18541,14 +18541,14 @@ var Jd = Zh((O) => {
|
|
|
18541
18541
|
}
|
|
18542
18542
|
u.prototype.write = function(l) {
|
|
18543
18543
|
for (var p = n.alloc(l.length * 2), g = this.nodeIdx, m = this.prevBytes, x = this.prevBytes.length, v = -this.prevBytes.length, w, b = 0, F = 0; b < l.length; b++) {
|
|
18544
|
-
var
|
|
18544
|
+
var k = b >= 0 ? l[b] : m[b + x], w = this.decodeTables[g][k];
|
|
18545
18545
|
if (!(w >= 0)) if (w === e)
|
|
18546
18546
|
w = this.defaultCharUnicode.charCodeAt(0), b = v;
|
|
18547
18547
|
else if (w === t) {
|
|
18548
18548
|
if (b >= 3)
|
|
18549
|
-
var _ = (l[b - 3] - 129) * 12600 + (l[b - 2] - 48) * 1260 + (l[b - 1] - 129) * 10 + (
|
|
18549
|
+
var _ = (l[b - 3] - 129) * 12600 + (l[b - 2] - 48) * 1260 + (l[b - 1] - 129) * 10 + (k - 48);
|
|
18550
18550
|
else
|
|
18551
|
-
var _ = (m[b - 3 + x] - 129) * 12600 + ((b - 2 >= 0 ? l[b - 2] : m[b - 2 + x]) - 48) * 1260 + ((b - 1 >= 0 ? l[b - 1] : m[b - 1 + x]) - 129) * 10 + (
|
|
18551
|
+
var _ = (m[b - 3 + x] - 129) * 12600 + ((b - 2 >= 0 ? l[b - 2] : m[b - 2 + x]) - 48) * 1260 + ((b - 1 >= 0 ? l[b - 1] : m[b - 1 + x]) - 129) * 10 + (k - 48);
|
|
18552
18552
|
var E = f(this.gb18030.gbChars, _);
|
|
18553
18553
|
w = this.gb18030.uChars[E] + _ - this.gb18030.gbChars[E];
|
|
18554
18554
|
} else if (w <= i) {
|
|
@@ -18559,7 +18559,7 @@ var Jd = Zh((O) => {
|
|
|
18559
18559
|
w = B[I], p[F++] = w & 255, p[F++] = w >> 8;
|
|
18560
18560
|
w = B[B.length - 1];
|
|
18561
18561
|
} else
|
|
18562
|
-
throw new Error("iconv-lite internal error: invalid decoding table value " + w + " at " + g + "/" +
|
|
18562
|
+
throw new Error("iconv-lite internal error: invalid decoding table value " + w + " at " + g + "/" + k);
|
|
18563
18563
|
if (w >= 65536) {
|
|
18564
18564
|
w -= 65536;
|
|
18565
18565
|
var N = 55296 | w >> 10;
|
|
@@ -23249,7 +23249,7 @@ var Jd = Zh((O) => {
|
|
|
23249
23249
|
], Td = {
|
|
23250
23250
|
uChars: Sd,
|
|
23251
23251
|
gbChars: Fd
|
|
23252
|
-
},
|
|
23252
|
+
}, kd = [
|
|
23253
23253
|
[
|
|
23254
23254
|
"0",
|
|
23255
23255
|
"\0",
|
|
@@ -25626,7 +25626,7 @@ var Jd = Zh((O) => {
|
|
|
25626
25626
|
"fda1",
|
|
25627
25627
|
"爻肴酵驍侯候厚后吼喉嗅帿後朽煦珝逅勛勳塤壎焄熏燻薰訓暈薨喧暄煊萱卉喙毁彙徽揮暉煇諱輝麾休携烋畦虧恤譎鷸兇凶匈洶胸黑昕欣炘痕吃屹紇訖欠欽歆吸恰洽翕興僖凞喜噫囍姬嬉希憙憘戱晞曦熙熹熺犧禧稀羲詰"
|
|
25628
25628
|
]
|
|
25629
|
-
],
|
|
25629
|
+
], ko = [
|
|
25630
25630
|
[
|
|
25631
25631
|
"0",
|
|
25632
25632
|
"\0",
|
|
@@ -26352,7 +26352,7 @@ var Jd = Zh((O) => {
|
|
|
26352
26352
|
"f9a1",
|
|
26353
26353
|
"龤灨灥糷虪蠾蠽蠿讞貜躩軉靋顳顴飌饡馫驤驦驧鬤鸕鸗齈戇欞爧虌躨钂钀钁驩驨鬮鸙爩虋讟钃鱹麷癵驫鱺鸝灩灪麤齾齉龘碁銹裏墻恒粧嫺╔╦╗╠╬╣╚╩╝╒╤╕╞╪╡╘╧╛╓╥╖╟╫╢╙╨╜║═╭╮╰╯▓"
|
|
26354
26354
|
]
|
|
26355
|
-
],
|
|
26355
|
+
], Cd = [
|
|
26356
26356
|
[
|
|
26357
26357
|
"8740",
|
|
26358
26358
|
"䏰䰲䘃䖦䕸𧉧䵷䖳𧲱䳢𧳅㮕䜶䝄䱇䱀𤊿𣘗𧍒𦺋𧃒䱗𪍑䝏䗚䲅𧱬䴇䪤䚡𦬣爥𥩔𡩣𣸆𣽡晍囻"
|
|
@@ -26856,9 +26856,9 @@ var Jd = Zh((O) => {
|
|
|
26856
26856
|
"𤅟𤩹𨮏孆𨰃𡢞瓈𡦈甎瓩甞𨻙𡩋寗𨺬鎅畍畊畧畮𤾂㼄𤴓疎瑝疞疴瘂瘬癑癏癯癶𦏵皐臯㟸𦤑𦤎皡皥皷盌𦾟葢𥂝𥅽𡸜眞眦着撯𥈠睘𣊬瞯𨥤𨥨𡛁矴砉𡍶𤨒棊碯磇磓隥礮𥗠磗礴碱𧘌辸袄𨬫𦂃𢘜禆褀椂禀𥡗禝𧬹礼禩渪𧄦㺨秆𩄍秔"
|
|
26857
26857
|
]
|
|
26858
26858
|
];
|
|
26859
|
-
var qi,
|
|
26859
|
+
var qi, Co;
|
|
26860
26860
|
function Md() {
|
|
26861
|
-
return
|
|
26861
|
+
return Co || (Co = 1, qi = {
|
|
26862
26862
|
// == Japanese/ShiftJIS ====================================================
|
|
26863
26863
|
// All japanese encodings are based on JIS X set of standards:
|
|
26864
26864
|
// JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF.
|
|
@@ -26971,7 +26971,7 @@ var Jd = Zh((O) => {
|
|
|
26971
26971
|
cp949: {
|
|
26972
26972
|
type: "_dbcs",
|
|
26973
26973
|
table: function() {
|
|
26974
|
-
return
|
|
26974
|
+
return kd;
|
|
26975
26975
|
}
|
|
26976
26976
|
},
|
|
26977
26977
|
cseuckr: "cp949",
|
|
@@ -27010,7 +27010,7 @@ var Jd = Zh((O) => {
|
|
|
27010
27010
|
cp950: {
|
|
27011
27011
|
type: "_dbcs",
|
|
27012
27012
|
table: function() {
|
|
27013
|
-
return
|
|
27013
|
+
return ko;
|
|
27014
27014
|
}
|
|
27015
27015
|
},
|
|
27016
27016
|
// Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus.
|
|
@@ -27018,7 +27018,7 @@ var Jd = Zh((O) => {
|
|
|
27018
27018
|
big5hkscs: {
|
|
27019
27019
|
type: "_dbcs",
|
|
27020
27020
|
table: function() {
|
|
27021
|
-
return
|
|
27021
|
+
return ko.concat(Cd);
|
|
27022
27022
|
},
|
|
27023
27023
|
encodeSkipVals: [
|
|
27024
27024
|
// Although Encoding Standard says we should avoid encoding to HKSCS area (See Step 1 of
|
|
@@ -27787,12 +27787,37 @@ var Jd = Zh((O) => {
|
|
|
27787
27787
|
});
|
|
27788
27788
|
}
|
|
27789
27789
|
}
|
|
27790
|
-
|
|
27791
|
-
|
|
27790
|
+
class Id {
|
|
27791
|
+
constructor() {
|
|
27792
|
+
this.lineBasicMaterials = {}, this.meshBasicMaterials = {}, this.unsupportedTextStyles = {};
|
|
27793
|
+
}
|
|
27794
|
+
getMeshBasicMaterial(e) {
|
|
27795
|
+
const t = this.buildKey(e);
|
|
27796
|
+
return this.meshBasicMaterials[t] || (this.meshBasicMaterials[t] = new Do({
|
|
27797
|
+
color: e.color
|
|
27798
|
+
})), this.meshBasicMaterials[t];
|
|
27799
|
+
}
|
|
27800
|
+
getLineBasicMaterial(e) {
|
|
27801
|
+
const t = this.buildKey(e);
|
|
27802
|
+
return this.lineBasicMaterials[t] || (this.lineBasicMaterials[t] = new Io({
|
|
27803
|
+
color: e.color
|
|
27804
|
+
})), this.lineBasicMaterials[t];
|
|
27805
|
+
}
|
|
27806
|
+
/**
|
|
27807
|
+
* Builds a stable material key from traits.
|
|
27808
|
+
* Key differs for shader vs basic, ByLayer vs ByEntity.
|
|
27809
|
+
*/
|
|
27810
|
+
buildKey(e) {
|
|
27811
|
+
return e.isByLayer && e.layer ? `layer_${e.layer}_${e.color}` : `entity_${e.color}`;
|
|
27812
|
+
}
|
|
27813
|
+
}
|
|
27814
|
+
var ir = /* @__PURE__ */ ((n) => (n[n.NONE = 0] = "NONE", n[n.WORD = 1] = "WORD", n[n.STACK = 2] = "STACK", n[n.SPACE = 3] = "SPACE", n[n.NBSP = 4] = "NBSP", n[n.TABULATOR = 5] = "TABULATOR", n[n.NEW_PARAGRAPH = 6] = "NEW_PARAGRAPH", n[n.NEW_COLUMN = 7] = "NEW_COLUMN", n[n.WRAP_AT_DIMLINE = 8] = "WRAP_AT_DIMLINE", n[n.PROPERTIES_CHANGED = 9] = "PROPERTIES_CHANGED", n))(ir || {}), kr = /* @__PURE__ */ ((n) => (n[n.BOTTOM = 0] = "BOTTOM", n[n.MIDDLE = 1] = "MIDDLE", n[n.TOP = 2] = "TOP", n))(kr || {}), Ge = /* @__PURE__ */ ((n) => (n[n.DEFAULT = 0] = "DEFAULT", n[n.LEFT = 1] = "LEFT", n[n.RIGHT = 2] = "RIGHT", n[n.CENTER = 3] = "CENTER", n[n.JUSTIFIED = 4] = "JUSTIFIED", n[n.DISTRIBUTED = 5] = "DISTRIBUTED", n))(Ge || {});
|
|
27815
|
+
const Pd = {
|
|
27792
27816
|
c: "Ø",
|
|
27793
27817
|
d: "°",
|
|
27794
|
-
p: "±"
|
|
27795
|
-
|
|
27818
|
+
p: "±",
|
|
27819
|
+
"%": "%"
|
|
27820
|
+
}, zd = {
|
|
27796
27821
|
l: 1,
|
|
27797
27822
|
r: 2,
|
|
27798
27823
|
c: 3,
|
|
@@ -27800,14 +27825,14 @@ var Jd = Zh((O) => {
|
|
|
27800
27825
|
d: 5
|
|
27801
27826
|
/* DISTRIBUTED */
|
|
27802
27827
|
};
|
|
27803
|
-
function
|
|
27828
|
+
function Nd(n, e = !1) {
|
|
27804
27829
|
const t = /* @__PURE__ */ new Set(), r = /\\[fF](.*?)[;|]/g;
|
|
27805
27830
|
return [...n.matchAll(r)].forEach((i) => {
|
|
27806
27831
|
let s = i[1].toLowerCase();
|
|
27807
27832
|
e && (s = s.replace(/\.(ttf|otf|woff|shx)$/, "")), t.add(s);
|
|
27808
27833
|
}), t;
|
|
27809
27834
|
}
|
|
27810
|
-
class
|
|
27835
|
+
class Gd {
|
|
27811
27836
|
/**
|
|
27812
27837
|
* Creates a new ContextStack with an initial context.
|
|
27813
27838
|
* @param initial The initial MTextContext to use as the base of the stack.
|
|
@@ -27859,7 +27884,7 @@ var Jd = Zh((O) => {
|
|
|
27859
27884
|
this.stack[this.stack.length - 1] = e;
|
|
27860
27885
|
}
|
|
27861
27886
|
}
|
|
27862
|
-
class
|
|
27887
|
+
class Hd {
|
|
27863
27888
|
/**
|
|
27864
27889
|
* Creates a new MTextParser instance
|
|
27865
27890
|
* @param content - The MText content to parse
|
|
@@ -27869,7 +27894,7 @@ var Jd = Zh((O) => {
|
|
|
27869
27894
|
constructor(e, t, r = {}) {
|
|
27870
27895
|
this.continueStroke = !1, this.inStackContext = !1, this.scanner = new Xi(e);
|
|
27871
27896
|
const i = t ?? new $r();
|
|
27872
|
-
this.ctxStack = new
|
|
27897
|
+
this.ctxStack = new Gd(i), this.yieldPropertyCommands = r.yieldPropertyCommands ?? !1, this.resetParagraphParameters = r.resetParagraphParameters ?? !1, this.mifDecoder = r.mifDecoder ?? this.decodeMultiByteChar.bind(this), this.mifCodeLength = r.mifCodeLength ?? "auto";
|
|
27873
27898
|
}
|
|
27874
27899
|
/**
|
|
27875
27900
|
* Decode multi-byte character from hex code
|
|
@@ -28250,7 +28275,7 @@ var Jd = Zh((O) => {
|
|
|
28250
28275
|
break;
|
|
28251
28276
|
case "q": {
|
|
28252
28277
|
const c = t.get();
|
|
28253
|
-
for (a =
|
|
28278
|
+
for (a = zd[c] || 0; t.peek() === ","; )
|
|
28254
28279
|
t.consume(1);
|
|
28255
28280
|
break;
|
|
28256
28281
|
}
|
|
@@ -28387,12 +28412,17 @@ var Jd = Zh((O) => {
|
|
|
28387
28412
|
continue;
|
|
28388
28413
|
}
|
|
28389
28414
|
if (a === "%" && this.scanner.peek(1) === "%") {
|
|
28390
|
-
const h = this.scanner.peek(2).toLowerCase(), c =
|
|
28415
|
+
const h = this.scanner.peek(2).toLowerCase(), c = Pd[h];
|
|
28391
28416
|
if (c) {
|
|
28392
28417
|
this.scanner.consume(3), i += c;
|
|
28393
28418
|
continue;
|
|
28394
28419
|
} else {
|
|
28395
|
-
this.scanner.
|
|
28420
|
+
const u = [h, this.scanner.peek(3), this.scanner.peek(4)];
|
|
28421
|
+
if (u.every((f) => f >= "0" && f <= "9")) {
|
|
28422
|
+
const f = Number.parseInt(u.join(""), 10);
|
|
28423
|
+
this.scanner.consume(5), i += String.fromCharCode(f);
|
|
28424
|
+
} else
|
|
28425
|
+
this.scanner.consume(3);
|
|
28396
28426
|
continue;
|
|
28397
28427
|
}
|
|
28398
28428
|
}
|
|
@@ -28843,7 +28873,7 @@ var Jd = Zh((O) => {
|
|
|
28843
28873
|
}
|
|
28844
28874
|
}
|
|
28845
28875
|
var Hr = /* @__PURE__ */ ((n) => (n[n.LEFT_TO_RIGHT = 1] = "LEFT_TO_RIGHT", n[n.RIGHT_TO_LEFT = 2] = "RIGHT_TO_LEFT", n[n.TOP_TO_BOTTOM = 3] = "TOP_TO_BOTTOM", n[n.BOTTOM_TO_TOP = 4] = "BOTTOM_TO_TOP", n[n.BY_STYLE = 5] = "BY_STYLE", n))(Hr || {});
|
|
28846
|
-
const
|
|
28876
|
+
const Wd = /* @__PURE__ */ new A(), qd = 1.666666;
|
|
28847
28877
|
class Is extends $r {
|
|
28848
28878
|
/**
|
|
28849
28879
|
* Creates a new RenderContext instance with optional initial values.
|
|
@@ -28877,7 +28907,7 @@ var Jd = Zh((O) => {
|
|
|
28877
28907
|
this.color.rgb = [t, r, i];
|
|
28878
28908
|
}
|
|
28879
28909
|
}
|
|
28880
|
-
class
|
|
28910
|
+
class Vd {
|
|
28881
28911
|
/**
|
|
28882
28912
|
* Construct one instance of this class and initialize some properties with default values.
|
|
28883
28913
|
* @param style Input text style
|
|
@@ -28976,7 +29006,7 @@ var Jd = Zh((O) => {
|
|
|
28976
29006
|
* The height of current line of texts
|
|
28977
29007
|
*/
|
|
28978
29008
|
get currentLineHeight() {
|
|
28979
|
-
return this.defaultLineSpaceFactor * this.currentFontSize *
|
|
29009
|
+
return this.defaultLineSpaceFactor * this.currentFontSize * qd + this.currentMaxFontSize;
|
|
28980
29010
|
}
|
|
28981
29011
|
/**
|
|
28982
29012
|
* The maximum font size in current line. Characters in one line may have different font and font
|
|
@@ -29196,23 +29226,23 @@ var Jd = Zh((O) => {
|
|
|
29196
29226
|
} else {
|
|
29197
29227
|
const v = [], w = [];
|
|
29198
29228
|
this._hOffset = o + m, this._vOffset = h + this.currentFontSize * 0.3;
|
|
29199
|
-
for (let
|
|
29229
|
+
for (let k = 0; k < i.length; k++)
|
|
29200
29230
|
this.processChar(
|
|
29201
|
-
i[
|
|
29231
|
+
i[k],
|
|
29202
29232
|
v,
|
|
29203
29233
|
w
|
|
29204
29234
|
);
|
|
29205
29235
|
t.push(...v), r.push(...w);
|
|
29206
29236
|
const b = [], F = [];
|
|
29207
29237
|
this._hOffset = o + x, this._vOffset = h - this.currentFontSize * 0.6;
|
|
29208
|
-
for (let
|
|
29238
|
+
for (let k = 0; k < s.length; k++)
|
|
29209
29239
|
this.processChar(
|
|
29210
|
-
s[
|
|
29240
|
+
s[k],
|
|
29211
29241
|
b,
|
|
29212
29242
|
F
|
|
29213
29243
|
);
|
|
29214
29244
|
if (t.push(...b), r.push(...F), a === "/" || a === "#") {
|
|
29215
|
-
const
|
|
29245
|
+
const k = new Oe(), _ = new Float32Array([
|
|
29216
29246
|
o,
|
|
29217
29247
|
h - this.currentFontSize * 0.8,
|
|
29218
29248
|
0,
|
|
@@ -29220,10 +29250,10 @@ var Jd = Zh((O) => {
|
|
|
29220
29250
|
h - this.currentFontSize * 0.8,
|
|
29221
29251
|
0
|
|
29222
29252
|
]);
|
|
29223
|
-
|
|
29253
|
+
k.setAttribute(
|
|
29224
29254
|
"position",
|
|
29225
29255
|
new We(_, 3)
|
|
29226
|
-
),
|
|
29256
|
+
), k.setIndex(null), r.push(k);
|
|
29227
29257
|
}
|
|
29228
29258
|
this._hOffset = o + g;
|
|
29229
29259
|
}
|
|
@@ -29379,7 +29409,7 @@ var Jd = Zh((O) => {
|
|
|
29379
29409
|
if (e.forEach((r, i) => {
|
|
29380
29410
|
r.boundingBox || r.computeBoundingBox(), i === 0 ? t = r.boundingBox : t.union(r.boundingBox);
|
|
29381
29411
|
}), t) {
|
|
29382
|
-
const r = t.getSize(
|
|
29412
|
+
const r = t.getSize(Wd);
|
|
29383
29413
|
switch (this.currentHorizontalAlignment) {
|
|
29384
29414
|
case Ge.LEFT:
|
|
29385
29415
|
e.forEach(
|
|
@@ -29439,7 +29469,11 @@ var Jd = Zh((O) => {
|
|
|
29439
29469
|
const r = new ca(), i = this._currentContext.getColorAsHex(), s = e.filter((o) => o instanceof Dr);
|
|
29440
29470
|
if (s.length > 0) {
|
|
29441
29471
|
const o = new Un();
|
|
29442
|
-
o.geometry = ho(s), o.material = this.styleManager.getMeshBasicMaterial(
|
|
29472
|
+
o.geometry = ho(s), o.material = this.styleManager.getMeshBasicMaterial({
|
|
29473
|
+
layer: this._style.layer,
|
|
29474
|
+
isByLayer: this._style.isByLayer,
|
|
29475
|
+
color: i
|
|
29476
|
+
}), o.userData.bboxIntersectionCheck = !0, r.add(o);
|
|
29443
29477
|
}
|
|
29444
29478
|
const a = [
|
|
29445
29479
|
...t,
|
|
@@ -29447,7 +29481,11 @@ var Jd = Zh((O) => {
|
|
|
29447
29481
|
];
|
|
29448
29482
|
if (a.length > 0) {
|
|
29449
29483
|
const o = new gc();
|
|
29450
|
-
o.geometry = ho(a), o.material = this.styleManager.getLineBasicMaterial(
|
|
29484
|
+
o.geometry = ho(a), o.material = this.styleManager.getLineBasicMaterial({
|
|
29485
|
+
layer: this._style.layer,
|
|
29486
|
+
isByLayer: this._style.isByLayer,
|
|
29487
|
+
color: i
|
|
29488
|
+
}), o.userData.bboxIntersectionCheck = !0, r.add(o);
|
|
29451
29489
|
}
|
|
29452
29490
|
return r.children.length === 1 ? r.children[0] : r;
|
|
29453
29491
|
}
|
|
@@ -29476,7 +29514,7 @@ var Jd = Zh((O) => {
|
|
|
29476
29514
|
* ```
|
|
29477
29515
|
*/
|
|
29478
29516
|
static getFonts(e, t = !1) {
|
|
29479
|
-
return
|
|
29517
|
+
return Nd(e, t);
|
|
29480
29518
|
}
|
|
29481
29519
|
/**
|
|
29482
29520
|
* Creates a new instance of MText.
|
|
@@ -29627,8 +29665,8 @@ var Jd = Zh((O) => {
|
|
|
29627
29665
|
const r = e.width || 0;
|
|
29628
29666
|
let i = Ge.LEFT;
|
|
29629
29667
|
e.width && e.attachmentPoint && ([1, 4, 7].includes(e.attachmentPoint) ? i = Ge.LEFT : [2, 5, 8].includes(e.attachmentPoint) ? i = Ge.CENTER : [3, 6, 9].includes(e.attachmentPoint) && (i = Ge.RIGHT));
|
|
29630
|
-
let s =
|
|
29631
|
-
e.attachmentPoint && ([1, 2, 3].includes(e.attachmentPoint) ? s =
|
|
29668
|
+
let s = kr.BOTTOM;
|
|
29669
|
+
e.attachmentPoint && ([1, 2, 3].includes(e.attachmentPoint) ? s = kr.TOP : [4, 5, 6].includes(e.attachmentPoint) ? s = kr.MIDDLE : [7, 8, 9].includes(e.attachmentPoint) && (s = kr.BOTTOM));
|
|
29632
29670
|
const a = e.height || 0, o = e.lineSpaceFactor || 0.3, h = e.drawingDirection ?? Hr.LEFT_TO_RIGHT, c = {
|
|
29633
29671
|
fontSize: a,
|
|
29634
29672
|
widthFactor: e.widthFactor ?? 1,
|
|
@@ -29644,12 +29682,12 @@ var Jd = Zh((O) => {
|
|
|
29644
29682
|
value: e.widthFactor ?? 1,
|
|
29645
29683
|
isRelative: !0
|
|
29646
29684
|
}, u.align = s, u.paragraph.align = i;
|
|
29647
|
-
const f = new
|
|
29685
|
+
const f = new Vd(
|
|
29648
29686
|
t,
|
|
29649
29687
|
this.styleManager,
|
|
29650
29688
|
this.fontManager,
|
|
29651
29689
|
c
|
|
29652
|
-
), p = new
|
|
29690
|
+
), p = new Hd(e.text, u, {
|
|
29653
29691
|
resetParagraphParameters: !0,
|
|
29654
29692
|
yieldPropertyCommands: !0
|
|
29655
29693
|
}).parse();
|
|
@@ -29747,22 +29785,7 @@ var Jd = Zh((O) => {
|
|
|
29747
29785
|
}
|
|
29748
29786
|
}
|
|
29749
29787
|
}
|
|
29750
|
-
|
|
29751
|
-
constructor() {
|
|
29752
|
-
this.lineBasicMaterials = {}, this.meshBasicMaterials = {}, this.unsupportedTextStyles = {};
|
|
29753
|
-
}
|
|
29754
|
-
getMeshBasicMaterial(e) {
|
|
29755
|
-
return this.meshBasicMaterials[e] || (this.meshBasicMaterials[e] = new Do({
|
|
29756
|
-
color: e
|
|
29757
|
-
})), this.meshBasicMaterials[e];
|
|
29758
|
-
}
|
|
29759
|
-
getLineBasicMaterial(e) {
|
|
29760
|
-
return this.lineBasicMaterials[e] || (this.lineBasicMaterials[e] = new Io({
|
|
29761
|
-
color: e
|
|
29762
|
-
})), this.lineBasicMaterials[e];
|
|
29763
|
-
}
|
|
29764
|
-
}
|
|
29765
|
-
const Qi = ut.instance, Xd = new Vd();
|
|
29788
|
+
const Qi = ut.instance, Xd = new Id();
|
|
29766
29789
|
self.addEventListener("message", async (n) => {
|
|
29767
29790
|
const { type: e, id: t, data: r } = n.data;
|
|
29768
29791
|
try {
|