@mlightcad/mtext-renderer 0.10.12 → 0.10.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1331 -1208
- package/dist/index.umd.cjs +6 -6
- package/dist/mtext-renderer-worker.js +785 -665
- package/lib/renderer/constants.d.ts +10 -0
- package/lib/renderer/index.d.ts +1 -0
- package/lib/renderer/mtext.d.ts +82 -9
- package/lib/renderer/mtextProcessor.d.ts +3 -0
- package/package.json +1 -1
|
@@ -646,13 +646,13 @@ var P1 = Fc((L) => {
|
|
|
646
646
|
const l = f[0];
|
|
647
647
|
this.scanner.consume(l.length);
|
|
648
648
|
const p = parseInt(l, 16);
|
|
649
|
-
let
|
|
649
|
+
let d = "";
|
|
650
650
|
try {
|
|
651
|
-
|
|
651
|
+
d = String.fromCodePoint(p);
|
|
652
652
|
} catch {
|
|
653
|
-
|
|
653
|
+
d = "▯";
|
|
654
654
|
}
|
|
655
|
-
return a ? [e, a] : [e,
|
|
655
|
+
return a ? [e, a] : [e, d];
|
|
656
656
|
}
|
|
657
657
|
this.scanner.consume(-1);
|
|
658
658
|
}
|
|
@@ -1222,7 +1222,7 @@ var P1 = Fc((L) => {
|
|
|
1222
1222
|
throw new Error("Invalid component type.");
|
|
1223
1223
|
}
|
|
1224
1224
|
}
|
|
1225
|
-
function
|
|
1225
|
+
function Ee(n, e) {
|
|
1226
1226
|
switch (e.constructor) {
|
|
1227
1227
|
case Float32Array:
|
|
1228
1228
|
return n;
|
|
@@ -1495,8 +1495,8 @@ var P1 = Fc((L) => {
|
|
|
1495
1495
|
return this.multiplyMatrices(e, this);
|
|
1496
1496
|
}
|
|
1497
1497
|
multiplyMatrices(e, t) {
|
|
1498
|
-
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],
|
|
1499
|
-
return s[0] = a * m + o * w + h * T, s[3] = a * x + o * b + h * B, s[6] = a * v + o * S + h * M, s[1] = c * m + u * w + f * T, s[4] = c * x + u * b + f * B, s[7] = c * v + u * S + f * M, s[2] = l * m + p * w +
|
|
1498
|
+
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], d = r[8], m = i[0], x = i[3], v = i[6], w = i[1], b = i[4], S = i[7], T = i[2], B = i[5], M = i[8];
|
|
1499
|
+
return s[0] = a * m + o * w + h * T, s[3] = a * x + o * b + h * B, s[6] = a * v + o * S + h * M, s[1] = c * m + u * w + f * T, s[4] = c * x + u * b + f * B, s[7] = c * v + u * S + f * M, s[2] = l * m + p * w + d * T, s[5] = l * x + p * b + d * B, s[8] = l * v + p * S + d * M, this;
|
|
1500
1500
|
}
|
|
1501
1501
|
multiplyScalar(e) {
|
|
1502
1502
|
const t = this.elements;
|
|
@@ -1507,9 +1507,9 @@ var P1 = Fc((L) => {
|
|
|
1507
1507
|
return t * a * u - t * o * c - r * s * u + r * o * h + i * s * c - i * a * h;
|
|
1508
1508
|
}
|
|
1509
1509
|
invert() {
|
|
1510
|
-
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 = u * a - o * c, l = o * h - u * s, p = c * s - a * h,
|
|
1511
|
-
if (
|
|
1512
|
-
const m = 1 /
|
|
1510
|
+
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 = u * a - o * c, l = o * h - u * s, p = c * s - a * h, d = t * f + r * l + i * p;
|
|
1511
|
+
if (d === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0);
|
|
1512
|
+
const m = 1 / d;
|
|
1513
1513
|
return e[0] = f * m, e[1] = (i * c - u * r) * m, e[2] = (o * r - i * a) * m, e[3] = l * m, e[4] = (u * t - i * h) * m, e[5] = (i * s - o * t) * m, e[6] = p * m, e[7] = (r * h - c * t) * m, e[8] = (a * t - r * s) * m, this;
|
|
1514
1514
|
}
|
|
1515
1515
|
transpose() {
|
|
@@ -2020,16 +2020,16 @@ var P1 = Fc((L) => {
|
|
|
2020
2020
|
}
|
|
2021
2021
|
setAxisAngleFromRotationMatrix(e) {
|
|
2022
2022
|
let t, r, i, s;
|
|
2023
|
-
const h = e.elements, c = h[0], u = h[4], f = h[8], l = h[1], p = h[5],
|
|
2024
|
-
if (Math.abs(u - l) < 0.01 && Math.abs(f - m) < 0.01 && Math.abs(
|
|
2025
|
-
if (Math.abs(u + l) < 0.1 && Math.abs(f + m) < 0.1 && Math.abs(
|
|
2023
|
+
const h = e.elements, c = h[0], u = h[4], f = h[8], l = h[1], p = h[5], d = h[9], m = h[2], x = h[6], v = h[10];
|
|
2024
|
+
if (Math.abs(u - l) < 0.01 && Math.abs(f - m) < 0.01 && Math.abs(d - x) < 0.01) {
|
|
2025
|
+
if (Math.abs(u + l) < 0.1 && Math.abs(f + m) < 0.1 && Math.abs(d + x) < 0.1 && Math.abs(c + p + v - 3) < 0.1)
|
|
2026
2026
|
return this.set(1, 0, 0, 0), this;
|
|
2027
2027
|
t = Math.PI;
|
|
2028
|
-
const b = (c + 1) / 2, S = (p + 1) / 2, T = (v + 1) / 2, B = (u + l) / 4, M = (f + m) / 4, _ = (
|
|
2028
|
+
const b = (c + 1) / 2, S = (p + 1) / 2, T = (v + 1) / 2, B = (u + l) / 4, M = (f + m) / 4, _ = (d + x) / 4;
|
|
2029
2029
|
return b > S && b > T ? b < 0.01 ? (r = 0, i = 0.707106781, s = 0.707106781) : (r = Math.sqrt(b), i = B / r, s = M / r) : S > T ? S < 0.01 ? (r = 0.707106781, i = 0, s = 0.707106781) : (i = Math.sqrt(S), r = B / i, s = _ / i) : T < 0.01 ? (r = 0.707106781, i = 0.707106781, s = 0) : (s = Math.sqrt(T), r = M / s, i = _ / s), this.set(r, i, s, t), this;
|
|
2030
2030
|
}
|
|
2031
|
-
let w = Math.sqrt((x -
|
|
2032
|
-
return Math.abs(w) < 1e-3 && (w = 1), this.x = (x -
|
|
2031
|
+
let w = Math.sqrt((x - d) * (x - d) + (f - m) * (f - m) + (l - u) * (l - u));
|
|
2032
|
+
return Math.abs(w) < 1e-3 && (w = 1), this.x = (x - d) / w, this.y = (f - m) / w, this.z = (l - u) / w, this.w = Math.acos((c + p + v - 1) / 2), this;
|
|
2033
2033
|
}
|
|
2034
2034
|
setFromMatrixPosition(e) {
|
|
2035
2035
|
const t = e.elements;
|
|
@@ -2115,24 +2115,24 @@ var P1 = Fc((L) => {
|
|
|
2115
2115
|
}
|
|
2116
2116
|
static slerpFlat(e, t, r, i, s, a, o) {
|
|
2117
2117
|
let h = r[i + 0], c = r[i + 1], u = r[i + 2], f = r[i + 3];
|
|
2118
|
-
const l = s[a + 0], p = s[a + 1],
|
|
2118
|
+
const l = s[a + 0], p = s[a + 1], d = s[a + 2], m = s[a + 3];
|
|
2119
2119
|
if (o === 0) {
|
|
2120
2120
|
e[t + 0] = h, e[t + 1] = c, e[t + 2] = u, e[t + 3] = f;
|
|
2121
2121
|
return;
|
|
2122
2122
|
}
|
|
2123
2123
|
if (o === 1) {
|
|
2124
|
-
e[t + 0] = l, e[t + 1] = p, e[t + 2] =
|
|
2124
|
+
e[t + 0] = l, e[t + 1] = p, e[t + 2] = d, e[t + 3] = m;
|
|
2125
2125
|
return;
|
|
2126
2126
|
}
|
|
2127
|
-
if (f !== m || h !== l || c !== p || u !==
|
|
2127
|
+
if (f !== m || h !== l || c !== p || u !== d) {
|
|
2128
2128
|
let x = 1 - o;
|
|
2129
|
-
const v = h * l + c * p + u *
|
|
2129
|
+
const v = h * l + c * p + u * d + f * m, w = v >= 0 ? 1 : -1, b = 1 - v * v;
|
|
2130
2130
|
if (b > Number.EPSILON) {
|
|
2131
2131
|
const T = Math.sqrt(b), B = Math.atan2(T, v * w);
|
|
2132
2132
|
x = Math.sin(x * B) / T, o = Math.sin(o * B) / T;
|
|
2133
2133
|
}
|
|
2134
2134
|
const S = o * w;
|
|
2135
|
-
if (h = h * x + l * S, c = c * x + p * S, u = u * x +
|
|
2135
|
+
if (h = h * x + l * S, c = c * x + p * S, u = u * x + d * S, f = f * x + m * S, x === 1 - o) {
|
|
2136
2136
|
const T = 1 / Math.sqrt(h * h + c * c + u * u + f * f);
|
|
2137
2137
|
h *= T, c *= T, u *= T, f *= T;
|
|
2138
2138
|
}
|
|
@@ -2140,8 +2140,8 @@ var P1 = Fc((L) => {
|
|
|
2140
2140
|
e[t] = h, e[t + 1] = c, e[t + 2] = u, e[t + 3] = f;
|
|
2141
2141
|
}
|
|
2142
2142
|
static multiplyQuaternionsFlat(e, t, r, i, s, a) {
|
|
2143
|
-
const o = r[i], h = r[i + 1], c = r[i + 2], u = r[i + 3], f = s[a], l = s[a + 1], p = s[a + 2],
|
|
2144
|
-
return e[t] = o *
|
|
2143
|
+
const o = r[i], h = r[i + 1], c = r[i + 2], u = r[i + 3], f = s[a], l = s[a + 1], p = s[a + 2], d = s[a + 3];
|
|
2144
|
+
return e[t] = o * d + u * f + h * p - c * l, e[t + 1] = h * d + u * l + c * f - o * p, e[t + 2] = c * d + u * p + o * l - h * f, e[t + 3] = u * d - o * f - h * l - c * p, e;
|
|
2145
2145
|
}
|
|
2146
2146
|
get x() {
|
|
2147
2147
|
return this._x;
|
|
@@ -2177,25 +2177,25 @@ var P1 = Fc((L) => {
|
|
|
2177
2177
|
return this._x = e.x, this._y = e.y, this._z = e.z, this._w = e.w, this._onChangeCallback(), this;
|
|
2178
2178
|
}
|
|
2179
2179
|
setFromEuler(e, t = !0) {
|
|
2180
|
-
const r = e._x, i = e._y, s = e._z, a = e._order, o = Math.cos, h = Math.sin, c = o(r / 2), u = o(i / 2), f = o(s / 2), l = h(r / 2), p = h(i / 2),
|
|
2180
|
+
const r = e._x, i = e._y, s = e._z, a = e._order, o = Math.cos, h = Math.sin, c = o(r / 2), u = o(i / 2), f = o(s / 2), l = h(r / 2), p = h(i / 2), d = h(s / 2);
|
|
2181
2181
|
switch (a) {
|
|
2182
2182
|
case "XYZ":
|
|
2183
|
-
this._x = l * u * f + c * p *
|
|
2183
|
+
this._x = l * u * f + c * p * d, this._y = c * p * f - l * u * d, this._z = c * u * d + l * p * f, this._w = c * u * f - l * p * d;
|
|
2184
2184
|
break;
|
|
2185
2185
|
case "YXZ":
|
|
2186
|
-
this._x = l * u * f + c * p *
|
|
2186
|
+
this._x = l * u * f + c * p * d, this._y = c * p * f - l * u * d, this._z = c * u * d - l * p * f, this._w = c * u * f + l * p * d;
|
|
2187
2187
|
break;
|
|
2188
2188
|
case "ZXY":
|
|
2189
|
-
this._x = l * u * f - c * p *
|
|
2189
|
+
this._x = l * u * f - c * p * d, this._y = c * p * f + l * u * d, this._z = c * u * d + l * p * f, this._w = c * u * f - l * p * d;
|
|
2190
2190
|
break;
|
|
2191
2191
|
case "ZYX":
|
|
2192
|
-
this._x = l * u * f - c * p *
|
|
2192
|
+
this._x = l * u * f - c * p * d, this._y = c * p * f + l * u * d, this._z = c * u * d - l * p * f, this._w = c * u * f + l * p * d;
|
|
2193
2193
|
break;
|
|
2194
2194
|
case "YZX":
|
|
2195
|
-
this._x = l * u * f + c * p *
|
|
2195
|
+
this._x = l * u * f + c * p * d, this._y = c * p * f + l * u * d, this._z = c * u * d - l * p * f, this._w = c * u * f - l * p * d;
|
|
2196
2196
|
break;
|
|
2197
2197
|
case "XZY":
|
|
2198
|
-
this._x = l * u * f - c * p *
|
|
2198
|
+
this._x = l * u * f - c * p * d, this._y = c * p * f - l * u * d, this._z = c * u * d + l * p * f, this._w = c * u * f + l * p * d;
|
|
2199
2199
|
break;
|
|
2200
2200
|
default:
|
|
2201
2201
|
console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: " + a);
|
|
@@ -2587,7 +2587,7 @@ var P1 = Fc((L) => {
|
|
|
2587
2587
|
}
|
|
2588
2588
|
}
|
|
2589
2589
|
const xi = /* @__PURE__ */ new E(), ma = /* @__PURE__ */ new zt();
|
|
2590
|
-
class
|
|
2590
|
+
class ke {
|
|
2591
2591
|
constructor(e = new E(1 / 0, 1 / 0, 1 / 0), t = new E(-1 / 0, -1 / 0, -1 / 0)) {
|
|
2592
2592
|
this.isBox3 = !0, this.min = e, this.max = t;
|
|
2593
2593
|
}
|
|
@@ -2754,7 +2754,7 @@ var P1 = Fc((L) => {
|
|
|
2754
2754
|
/* @__PURE__ */ new E(),
|
|
2755
2755
|
/* @__PURE__ */ new E(),
|
|
2756
2756
|
/* @__PURE__ */ new E()
|
|
2757
|
-
], He = /* @__PURE__ */ new E(), dn = /* @__PURE__ */ new
|
|
2757
|
+
], He = /* @__PURE__ */ new E(), dn = /* @__PURE__ */ new ke(), nr = /* @__PURE__ */ new E(), ir = /* @__PURE__ */ new E(), sr = /* @__PURE__ */ new E(), bt = /* @__PURE__ */ new E(), wt = /* @__PURE__ */ new E(), Gt = /* @__PURE__ */ new E(), Ar = /* @__PURE__ */ new E(), gn = /* @__PURE__ */ new E(), yn = /* @__PURE__ */ new E(), Ht = /* @__PURE__ */ new E();
|
|
2758
2758
|
function bi(n, e, t, r, i) {
|
|
2759
2759
|
for (let s = 0, a = n.length - 3; s <= a; s += 3) {
|
|
2760
2760
|
Ht.fromArray(n, s);
|
|
@@ -2764,7 +2764,7 @@ var P1 = Fc((L) => {
|
|
|
2764
2764
|
}
|
|
2765
2765
|
return !0;
|
|
2766
2766
|
}
|
|
2767
|
-
const Yc = /* @__PURE__ */ new
|
|
2767
|
+
const Yc = /* @__PURE__ */ new ke(), Mr = /* @__PURE__ */ new E(), wi = /* @__PURE__ */ new E();
|
|
2768
2768
|
class Bs {
|
|
2769
2769
|
constructor(e = new E(), t = -1) {
|
|
2770
2770
|
this.isSphere = !0, this.center = e, this.radius = t;
|
|
@@ -2874,11 +2874,11 @@ var P1 = Fc((L) => {
|
|
|
2874
2874
|
distanceSqToSegment(e, t, r, i) {
|
|
2875
2875
|
Si.copy(e).add(t).multiplyScalar(0.5), mn.copy(t).sub(e).normalize(), St.copy(this.origin).sub(Si);
|
|
2876
2876
|
const s = e.distanceTo(t) * 0.5, a = -this.direction.dot(mn), o = St.dot(this.direction), h = -St.dot(mn), c = St.lengthSq(), u = Math.abs(1 - a * a);
|
|
2877
|
-
let f, l, p,
|
|
2877
|
+
let f, l, p, d;
|
|
2878
2878
|
if (u > 0)
|
|
2879
|
-
if (f = a * h - o, l = a * o - h,
|
|
2880
|
-
if (l >= -
|
|
2881
|
-
if (l <=
|
|
2879
|
+
if (f = a * h - o, l = a * o - h, d = s * u, f >= 0)
|
|
2880
|
+
if (l >= -d)
|
|
2881
|
+
if (l <= d) {
|
|
2882
2882
|
const m = 1 / u;
|
|
2883
2883
|
f *= m, l *= m, p = f * (f + a * l + 2 * o) + l * (a * f + l + 2 * h) + c;
|
|
2884
2884
|
} else
|
|
@@ -2886,7 +2886,7 @@ var P1 = Fc((L) => {
|
|
|
2886
2886
|
else
|
|
2887
2887
|
l = -s, f = Math.max(0, -(a * l + o)), p = -f * f + l * (l + 2 * h) + c;
|
|
2888
2888
|
else
|
|
2889
|
-
l <= -
|
|
2889
|
+
l <= -d ? (f = Math.max(0, -(-a * s + o)), l = f > 0 ? -s : Math.min(Math.max(-s, -h), s), p = -f * f + l * (l + 2 * h) + c) : l <= d ? (f = 0, l = Math.min(Math.max(-s, -h), s), p = l * (l + 2 * h) + c) : (f = Math.max(0, -(a * s + o)), l = f > 0 ? s : Math.min(Math.max(-s, -h), s), p = -f * f + l * (l + 2 * h) + c);
|
|
2890
2890
|
else
|
|
2891
2891
|
l = a > 0 ? -s : s, f = Math.max(0, -(a * l + o)), p = -f * f + l * (l + 2 * h) + c;
|
|
2892
2892
|
return r && r.copy(this.origin).addScaledVector(this.direction, f), i && i.copy(Si).addScaledVector(mn, l), p;
|
|
@@ -2955,7 +2955,7 @@ var P1 = Fc((L) => {
|
|
|
2955
2955
|
}
|
|
2956
2956
|
}
|
|
2957
2957
|
class Fe {
|
|
2958
|
-
constructor(e, t, r, i, s, a, o, h, c, u, f, l, p,
|
|
2958
|
+
constructor(e, t, r, i, s, a, o, h, c, u, f, l, p, d, m, x) {
|
|
2959
2959
|
Fe.prototype.isMatrix4 = !0, this.elements = [
|
|
2960
2960
|
1,
|
|
2961
2961
|
0,
|
|
@@ -2973,11 +2973,11 @@ var P1 = Fc((L) => {
|
|
|
2973
2973
|
0,
|
|
2974
2974
|
0,
|
|
2975
2975
|
1
|
|
2976
|
-
], e !== void 0 && this.set(e, t, r, i, s, a, o, h, c, u, f, l, p,
|
|
2976
|
+
], e !== void 0 && this.set(e, t, r, i, s, a, o, h, c, u, f, l, p, d, m, x);
|
|
2977
2977
|
}
|
|
2978
|
-
set(e, t, r, i, s, a, o, h, c, u, f, l, p,
|
|
2978
|
+
set(e, t, r, i, s, a, o, h, c, u, f, l, p, d, m, x) {
|
|
2979
2979
|
const v = this.elements;
|
|
2980
|
-
return v[0] = e, v[4] = t, v[8] = r, v[12] = i, v[1] = s, v[5] = a, v[9] = o, v[13] = h, v[2] = c, v[6] = u, v[10] = f, v[14] = l, v[3] = p, v[7] =
|
|
2980
|
+
return v[0] = e, v[4] = t, v[8] = r, v[12] = i, v[1] = s, v[5] = a, v[9] = o, v[13] = h, v[2] = c, v[6] = u, v[10] = f, v[14] = l, v[3] = p, v[7] = d, v[11] = m, v[15] = x, this;
|
|
2981
2981
|
}
|
|
2982
2982
|
identity() {
|
|
2983
2983
|
return this.set(
|
|
@@ -3061,23 +3061,23 @@ var P1 = Fc((L) => {
|
|
|
3061
3061
|
makeRotationFromEuler(e) {
|
|
3062
3062
|
const t = this.elements, r = e.x, i = e.y, s = e.z, a = Math.cos(r), o = Math.sin(r), h = Math.cos(i), c = Math.sin(i), u = Math.cos(s), f = Math.sin(s);
|
|
3063
3063
|
if (e.order === "XYZ") {
|
|
3064
|
-
const l = a * u, p = a * f,
|
|
3065
|
-
t[0] = h * u, t[4] = -h * f, t[8] = c, t[1] = p +
|
|
3064
|
+
const l = a * u, p = a * f, d = o * u, m = o * f;
|
|
3065
|
+
t[0] = h * u, t[4] = -h * f, t[8] = c, t[1] = p + d * c, t[5] = l - m * c, t[9] = -o * h, t[2] = m - l * c, t[6] = d + p * c, t[10] = a * h;
|
|
3066
3066
|
} else if (e.order === "YXZ") {
|
|
3067
|
-
const l = h * u, p = h * f,
|
|
3068
|
-
t[0] = l + m * o, t[4] =
|
|
3067
|
+
const l = h * u, p = h * f, d = c * u, m = c * f;
|
|
3068
|
+
t[0] = l + m * o, t[4] = d * o - p, t[8] = a * c, t[1] = a * f, t[5] = a * u, t[9] = -o, t[2] = p * o - d, t[6] = m + l * o, t[10] = a * h;
|
|
3069
3069
|
} else if (e.order === "ZXY") {
|
|
3070
|
-
const l = h * u, p = h * f,
|
|
3071
|
-
t[0] = l - m * o, t[4] = -a * f, t[8] =
|
|
3070
|
+
const l = h * u, p = h * f, d = c * u, m = c * f;
|
|
3071
|
+
t[0] = l - m * o, t[4] = -a * f, t[8] = d + p * o, t[1] = p + d * o, t[5] = a * u, t[9] = m - l * o, t[2] = -a * c, t[6] = o, t[10] = a * h;
|
|
3072
3072
|
} else if (e.order === "ZYX") {
|
|
3073
|
-
const l = a * u, p = a * f,
|
|
3074
|
-
t[0] = h * u, t[4] =
|
|
3073
|
+
const l = a * u, p = a * f, d = o * u, m = o * f;
|
|
3074
|
+
t[0] = h * u, t[4] = d * c - p, t[8] = l * c + m, t[1] = h * f, t[5] = m * c + l, t[9] = p * c - d, t[2] = -c, t[6] = o * h, t[10] = a * h;
|
|
3075
3075
|
} else if (e.order === "YZX") {
|
|
3076
|
-
const l = a * h, p = a * c,
|
|
3077
|
-
t[0] = h * u, t[4] = m - l * f, t[8] =
|
|
3076
|
+
const l = a * h, p = a * c, d = o * h, m = o * c;
|
|
3077
|
+
t[0] = h * u, t[4] = m - l * f, t[8] = d * f + p, t[1] = f, t[5] = a * u, t[9] = -o * u, t[2] = -c * u, t[6] = p * f + d, t[10] = l - m * f;
|
|
3078
3078
|
} else if (e.order === "XZY") {
|
|
3079
|
-
const l = a * h, p = a * c,
|
|
3080
|
-
t[0] = h * u, t[4] = -f, t[8] = c * u, t[1] = l * f + m, t[5] = a * u, t[9] = p * f -
|
|
3079
|
+
const l = a * h, p = a * c, d = o * h, m = o * c;
|
|
3080
|
+
t[0] = h * u, t[4] = -f, t[8] = c * u, t[1] = l * f + m, t[5] = a * u, t[9] = p * f - d, t[2] = d * f - p, t[6] = o * u, t[10] = m * f + l;
|
|
3081
3081
|
}
|
|
3082
3082
|
return t[3] = 0, t[7] = 0, t[11] = 0, t[12] = 0, t[13] = 0, t[14] = 0, t[15] = 1, this;
|
|
3083
3083
|
}
|
|
@@ -3095,16 +3095,16 @@ var P1 = Fc((L) => {
|
|
|
3095
3095
|
return this.multiplyMatrices(e, this);
|
|
3096
3096
|
}
|
|
3097
3097
|
multiplyMatrices(e, t) {
|
|
3098
|
-
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],
|
|
3099
|
-
return s[0] = a * B + o * N + h * Z + c * ae, s[4] = a * M + o * G + h * Q + c * ie, s[8] = a * _ + o * ee + h * K + c * he, s[12] = a * D + o * Y + h * ne + c * W, s[1] = u * B + f * N + l * Z + p * ae, s[5] = u * M + f * G + l * Q + p * ie, s[9] = u * _ + f * ee + l * K + p * he, s[13] = u * D + f * Y + l * ne + p * W, s[2] =
|
|
3098
|
+
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], d = r[2], m = r[6], x = r[10], v = r[14], w = r[3], b = r[7], S = r[11], T = r[15], B = i[0], M = i[4], _ = i[8], D = i[12], N = i[1], G = i[5], ee = i[9], Y = i[13], Z = i[2], Q = i[6], K = i[10], ne = i[14], ae = i[3], ie = i[7], he = i[11], W = i[15];
|
|
3099
|
+
return s[0] = a * B + o * N + h * Z + c * ae, s[4] = a * M + o * G + h * Q + c * ie, s[8] = a * _ + o * ee + h * K + c * he, s[12] = a * D + o * Y + h * ne + c * W, s[1] = u * B + f * N + l * Z + p * ae, s[5] = u * M + f * G + l * Q + p * ie, s[9] = u * _ + f * ee + l * K + p * he, s[13] = u * D + f * Y + l * ne + p * W, s[2] = d * B + m * N + x * Z + v * ae, s[6] = d * M + m * G + x * Q + v * ie, s[10] = d * _ + m * ee + x * K + v * he, s[14] = d * D + m * Y + x * ne + v * W, s[3] = w * B + b * N + S * Z + T * ae, s[7] = w * M + b * G + S * Q + T * ie, s[11] = w * _ + b * ee + S * K + T * he, s[15] = w * D + b * Y + S * ne + T * W, this;
|
|
3100
3100
|
}
|
|
3101
3101
|
multiplyScalar(e) {
|
|
3102
3102
|
const t = this.elements;
|
|
3103
3103
|
return t[0] *= e, t[4] *= e, t[8] *= e, t[12] *= e, t[1] *= e, t[5] *= e, t[9] *= e, t[13] *= e, t[2] *= e, t[6] *= e, t[10] *= e, t[14] *= e, t[3] *= e, t[7] *= e, t[11] *= e, t[15] *= e, this;
|
|
3104
3104
|
}
|
|
3105
3105
|
determinant() {
|
|
3106
|
-
const e = this.elements, t = e[0], r = e[4], i = e[8], s = e[12], a = e[1], o = e[5], h = e[9], c = e[13], u = e[2], f = e[6], l = e[10], p = e[14],
|
|
3107
|
-
return
|
|
3106
|
+
const e = this.elements, t = e[0], r = e[4], i = e[8], s = e[12], a = e[1], o = e[5], h = e[9], c = e[13], u = e[2], f = e[6], l = e[10], p = e[14], d = e[3], m = e[7], x = e[11], v = e[15];
|
|
3107
|
+
return d * (+s * h * f - i * c * f - s * o * l + r * c * l + i * o * p - r * h * p) + m * (+t * h * p - t * c * l + s * a * l - i * a * p + i * c * u - s * h * u) + x * (+t * c * f - t * o * p - s * a * f + r * a * p + s * o * u - r * c * u) + v * (-i * o * u - t * h * f + t * o * l + i * a * f - r * a * l + r * h * u);
|
|
3108
3108
|
}
|
|
3109
3109
|
transpose() {
|
|
3110
3110
|
const e = this.elements;
|
|
@@ -3116,10 +3116,10 @@ var P1 = Fc((L) => {
|
|
|
3116
3116
|
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;
|
|
3117
3117
|
}
|
|
3118
3118
|
invert() {
|
|
3119
|
-
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],
|
|
3119
|
+
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], d = 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 = d * l * c - u * x * c - d * h * p + a * x * p + u * h * v - a * l * v, S = u * m * c - d * f * c + d * o * p - a * m * p - u * o * v + a * f * v, T = d * f * h - u * m * h - d * o * l + a * m * l + u * o * x - a * f * x, B = t * w + r * b + i * S + s * T;
|
|
3120
3120
|
if (B === 0) return this.set(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
|
3121
3121
|
const M = 1 / B;
|
|
3122
|
-
return e[0] = w * M, e[1] = (m * l * s - f * x * s - m * i * p + r * x * p + f * i * v - r * l * v) * M, e[2] = (o * x * s - m * h * s + m * i * c - r * x * c - o * i * v + r * h * v) * M, e[3] = (f * h * s - o * l * s - f * i * c + r * l * c + o * i * p - r * h * p) * M, e[4] = b * M, e[5] = (u * x * s -
|
|
3122
|
+
return e[0] = w * M, e[1] = (m * l * s - f * x * s - m * i * p + r * x * p + f * i * v - r * l * v) * M, e[2] = (o * x * s - m * h * s + m * i * c - r * x * c - o * i * v + r * h * v) * M, e[3] = (f * h * s - o * l * s - f * i * c + r * l * c + o * i * p - r * h * p) * M, e[4] = b * M, e[5] = (u * x * s - d * l * s + d * i * p - t * x * p - u * i * v + t * l * v) * M, e[6] = (d * h * s - a * x * s - d * i * c + t * x * c + a * i * v - t * h * v) * M, e[7] = (a * l * s - u * h * s + u * i * c - t * l * c - a * i * p + t * h * p) * M, e[8] = S * M, e[9] = (d * f * s - u * m * s - d * r * p + t * m * p + u * r * v - t * f * v) * M, e[10] = (a * m * s - d * o * s + d * r * c - t * m * c - a * r * v + t * o * v) * M, e[11] = (u * o * s - a * f * s - u * r * c + t * f * c + a * r * p - t * o * p) * M, e[12] = T * M, e[13] = (u * m * i - d * f * i + d * r * l - t * m * l - u * r * x + t * f * x) * M, e[14] = (d * o * i - a * m * i - d * r * h + t * m * h + a * r * x - t * o * x) * M, e[15] = (a * f * i - u * o * i + u * r * h - t * f * h - a * r * l + t * o * l) * M, this;
|
|
3123
3123
|
}
|
|
3124
3124
|
scale(e) {
|
|
3125
3125
|
const t = this.elements, r = e.x, i = e.y, s = e.z;
|
|
@@ -3291,8 +3291,8 @@ var P1 = Fc((L) => {
|
|
|
3291
3291
|
), this;
|
|
3292
3292
|
}
|
|
3293
3293
|
compose(e, t, r) {
|
|
3294
|
-
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,
|
|
3295
|
-
return i[0] = (1 - (m + v)) * T, i[1] = (p + S) * T, i[2] = (
|
|
3294
|
+
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, d = s * f, m = a * u, x = a * f, v = o * f, w = h * c, b = h * u, S = h * f, T = r.x, B = r.y, M = r.z;
|
|
3295
|
+
return i[0] = (1 - (m + v)) * T, i[1] = (p + S) * T, i[2] = (d - b) * T, i[3] = 0, i[4] = (p - S) * B, i[5] = (1 - (l + v)) * B, i[6] = (x + w) * B, i[7] = 0, i[8] = (d + b) * M, i[9] = (x - w) * M, i[10] = (1 - (l + m)) * M, i[11] = 0, i[12] = e.x, i[13] = e.y, i[14] = e.z, i[15] = 1, this;
|
|
3296
3296
|
}
|
|
3297
3297
|
decompose(e, t, r) {
|
|
3298
3298
|
const i = this.elements;
|
|
@@ -3304,25 +3304,25 @@ var P1 = Fc((L) => {
|
|
|
3304
3304
|
}
|
|
3305
3305
|
makePerspective(e, t, r, i, s, a, o = pn) {
|
|
3306
3306
|
const h = this.elements, c = 2 * s / (t - e), u = 2 * s / (r - i), f = (t + e) / (t - e), l = (r + i) / (r - i);
|
|
3307
|
-
let p,
|
|
3307
|
+
let p, d;
|
|
3308
3308
|
if (o === pn)
|
|
3309
|
-
p = -(a + s) / (a - s),
|
|
3309
|
+
p = -(a + s) / (a - s), d = -2 * a * s / (a - s);
|
|
3310
3310
|
else if (o === pa)
|
|
3311
|
-
p = -a / (a - s),
|
|
3311
|
+
p = -a / (a - s), d = -a * s / (a - s);
|
|
3312
3312
|
else
|
|
3313
3313
|
throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: " + o);
|
|
3314
|
-
return h[0] = c, h[4] = 0, h[8] = f, h[12] = 0, h[1] = 0, h[5] = u, h[9] = l, h[13] = 0, h[2] = 0, h[6] = 0, h[10] = p, h[14] =
|
|
3314
|
+
return h[0] = c, h[4] = 0, h[8] = f, h[12] = 0, h[1] = 0, h[5] = u, h[9] = l, h[13] = 0, h[2] = 0, h[6] = 0, h[10] = p, h[14] = d, h[3] = 0, h[7] = 0, h[11] = -1, h[15] = 0, this;
|
|
3315
3315
|
}
|
|
3316
3316
|
makeOrthographic(e, t, r, i, s, a, o = pn) {
|
|
3317
3317
|
const h = this.elements, c = 1 / (t - e), u = 1 / (r - i), f = 1 / (a - s), l = (t + e) * c, p = (r + i) * u;
|
|
3318
|
-
let
|
|
3318
|
+
let d, m;
|
|
3319
3319
|
if (o === pn)
|
|
3320
|
-
|
|
3320
|
+
d = (a + s) * f, m = -2 * f;
|
|
3321
3321
|
else if (o === pa)
|
|
3322
|
-
|
|
3322
|
+
d = s * f, m = -1 * f;
|
|
3323
3323
|
else
|
|
3324
3324
|
throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: " + o);
|
|
3325
|
-
return h[0] = 2 * c, h[4] = 0, h[8] = 0, h[12] = -l, h[1] = 0, h[5] = 2 * u, h[9] = 0, h[13] = -p, h[2] = 0, h[6] = 0, h[10] = m, h[14] = -
|
|
3325
|
+
return h[0] = 2 * c, h[4] = 0, h[8] = 0, h[12] = -l, h[1] = 0, h[5] = 2 * u, h[9] = 0, h[13] = -p, h[2] = 0, h[6] = 0, h[10] = m, h[14] = -d, h[3] = 0, h[7] = 0, h[11] = 0, h[15] = 1, this;
|
|
3326
3326
|
}
|
|
3327
3327
|
equals(e) {
|
|
3328
3328
|
const t = this.elements, r = e.elements;
|
|
@@ -3735,8 +3735,8 @@ var P1 = Fc((L) => {
|
|
|
3735
3735
|
}
|
|
3736
3736
|
}
|
|
3737
3737
|
if (t) {
|
|
3738
|
-
const o = a(e.geometries), h = a(e.materials), c = a(e.textures), u = a(e.images), f = a(e.shapes), l = a(e.skeletons), p = a(e.animations),
|
|
3739
|
-
o.length > 0 && (r.geometries = o), h.length > 0 && (r.materials = h), c.length > 0 && (r.textures = c), u.length > 0 && (r.images = u), f.length > 0 && (r.shapes = f), l.length > 0 && (r.skeletons = l), p.length > 0 && (r.animations = p),
|
|
3738
|
+
const o = a(e.geometries), h = a(e.materials), c = a(e.textures), u = a(e.images), f = a(e.shapes), l = a(e.skeletons), p = a(e.animations), d = a(e.nodes);
|
|
3739
|
+
o.length > 0 && (r.geometries = o), h.length > 0 && (r.materials = h), c.length > 0 && (r.textures = c), u.length > 0 && (r.images = u), f.length > 0 && (r.shapes = f), l.length > 0 && (r.skeletons = l), p.length > 0 && (r.animations = p), d.length > 0 && (r.nodes = d);
|
|
3740
3740
|
}
|
|
3741
3741
|
return r.object = i, r;
|
|
3742
3742
|
function a(o) {
|
|
@@ -3780,8 +3780,8 @@ var P1 = Fc((L) => {
|
|
|
3780
3780
|
const a = Ve.dot(Ve), o = Ve.dot(ct), h = Ve.dot(ki), c = ct.dot(ct), u = ct.dot(ki), f = a * c - o * o;
|
|
3781
3781
|
if (f === 0)
|
|
3782
3782
|
return s.set(0, 0, 0), null;
|
|
3783
|
-
const l = 1 / f, p = (c * h - o * u) * l,
|
|
3784
|
-
return s.set(1 - p -
|
|
3783
|
+
const l = 1 / f, p = (c * h - o * u) * l, d = (a * u - o * h) * l;
|
|
3784
|
+
return s.set(1 - p - d, d, p);
|
|
3785
3785
|
}
|
|
3786
3786
|
static containsPoint(e, t, r, i) {
|
|
3787
3787
|
return this.getBarycoord(e, t, r, i, ut) === null ? !1 : ut.x >= 0 && ut.y >= 0 && ut.x + ut.y <= 1;
|
|
@@ -3852,15 +3852,15 @@ var P1 = Fc((L) => {
|
|
|
3852
3852
|
if (l <= 0 && h >= 0 && u <= 0)
|
|
3853
3853
|
return a = h / (h - u), t.copy(r).addScaledVector(cr, a);
|
|
3854
3854
|
Mi.subVectors(e, s);
|
|
3855
|
-
const p = cr.dot(Mi),
|
|
3856
|
-
if (
|
|
3855
|
+
const p = cr.dot(Mi), d = ur.dot(Mi);
|
|
3856
|
+
if (d >= 0 && p <= d)
|
|
3857
3857
|
return t.copy(s);
|
|
3858
|
-
const m = p * c - h *
|
|
3859
|
-
if (m <= 0 && c >= 0 &&
|
|
3860
|
-
return o = c / (c -
|
|
3861
|
-
const x = u *
|
|
3862
|
-
if (x <= 0 && f - u >= 0 && p -
|
|
3863
|
-
return Ta.subVectors(s, i), o = (f - u) / (f - u + (p -
|
|
3858
|
+
const m = p * c - h * d;
|
|
3859
|
+
if (m <= 0 && c >= 0 && d <= 0)
|
|
3860
|
+
return o = c / (c - d), t.copy(r).addScaledVector(ur, o);
|
|
3861
|
+
const x = u * d - p * f;
|
|
3862
|
+
if (x <= 0 && f - u >= 0 && p - d >= 0)
|
|
3863
|
+
return Ta.subVectors(s, i), o = (f - u) / (f - u + (p - d)), t.copy(i).addScaledVector(Ta, o);
|
|
3864
3864
|
const v = 1 / (x + m + l);
|
|
3865
3865
|
return a = m * v, o = l * v, t.copy(r).addScaledVector(cr, a).addScaledVector(ur, o);
|
|
3866
3866
|
}
|
|
@@ -4387,44 +4387,44 @@ var P1 = Fc((L) => {
|
|
|
4387
4387
|
return this.normalized && (r = Er(r, this.array)), r;
|
|
4388
4388
|
}
|
|
4389
4389
|
setComponent(e, t, r) {
|
|
4390
|
-
return this.normalized && (r =
|
|
4390
|
+
return this.normalized && (r = Ee(r, this.array)), this.array[e * this.itemSize + t] = r, this;
|
|
4391
4391
|
}
|
|
4392
4392
|
getX(e) {
|
|
4393
4393
|
let t = this.array[e * this.itemSize];
|
|
4394
4394
|
return this.normalized && (t = Er(t, this.array)), t;
|
|
4395
4395
|
}
|
|
4396
4396
|
setX(e, t) {
|
|
4397
|
-
return this.normalized && (t =
|
|
4397
|
+
return this.normalized && (t = Ee(t, this.array)), this.array[e * this.itemSize] = t, this;
|
|
4398
4398
|
}
|
|
4399
4399
|
getY(e) {
|
|
4400
4400
|
let t = this.array[e * this.itemSize + 1];
|
|
4401
4401
|
return this.normalized && (t = Er(t, this.array)), t;
|
|
4402
4402
|
}
|
|
4403
4403
|
setY(e, t) {
|
|
4404
|
-
return this.normalized && (t =
|
|
4404
|
+
return this.normalized && (t = Ee(t, this.array)), this.array[e * this.itemSize + 1] = t, this;
|
|
4405
4405
|
}
|
|
4406
4406
|
getZ(e) {
|
|
4407
4407
|
let t = this.array[e * this.itemSize + 2];
|
|
4408
4408
|
return this.normalized && (t = Er(t, this.array)), t;
|
|
4409
4409
|
}
|
|
4410
4410
|
setZ(e, t) {
|
|
4411
|
-
return this.normalized && (t =
|
|
4411
|
+
return this.normalized && (t = Ee(t, this.array)), this.array[e * this.itemSize + 2] = t, this;
|
|
4412
4412
|
}
|
|
4413
4413
|
getW(e) {
|
|
4414
4414
|
let t = this.array[e * this.itemSize + 3];
|
|
4415
4415
|
return this.normalized && (t = Er(t, this.array)), t;
|
|
4416
4416
|
}
|
|
4417
4417
|
setW(e, t) {
|
|
4418
|
-
return this.normalized && (t =
|
|
4418
|
+
return this.normalized && (t = Ee(t, this.array)), this.array[e * this.itemSize + 3] = t, this;
|
|
4419
4419
|
}
|
|
4420
4420
|
setXY(e, t, r) {
|
|
4421
|
-
return e *= this.itemSize, this.normalized && (t =
|
|
4421
|
+
return e *= this.itemSize, this.normalized && (t = Ee(t, this.array), r = Ee(r, this.array)), this.array[e + 0] = t, this.array[e + 1] = r, this;
|
|
4422
4422
|
}
|
|
4423
4423
|
setXYZ(e, t, r, i) {
|
|
4424
|
-
return e *= this.itemSize, this.normalized && (t =
|
|
4424
|
+
return e *= this.itemSize, this.normalized && (t = Ee(t, this.array), r = Ee(r, this.array), i = Ee(i, this.array)), this.array[e + 0] = t, this.array[e + 1] = r, this.array[e + 2] = i, this;
|
|
4425
4425
|
}
|
|
4426
4426
|
setXYZW(e, t, r, i, s) {
|
|
4427
|
-
return e *= this.itemSize, this.normalized && (t =
|
|
4427
|
+
return e *= this.itemSize, this.normalized && (t = Ee(t, this.array), r = Ee(r, this.array), i = Ee(i, this.array), s = Ee(s, this.array)), this.array[e + 0] = t, this.array[e + 1] = r, this.array[e + 2] = i, this.array[e + 3] = s, this;
|
|
4428
4428
|
}
|
|
4429
4429
|
onUpload(e) {
|
|
4430
4430
|
return this.onUploadCallback = e, this;
|
|
@@ -4458,7 +4458,7 @@ var P1 = Fc((L) => {
|
|
|
4458
4458
|
}
|
|
4459
4459
|
}
|
|
4460
4460
|
let iu = 0;
|
|
4461
|
-
const Re = /* @__PURE__ */ new Fe(), Ri = /* @__PURE__ */ new Be(), lr = /* @__PURE__ */ new E(), Me = /* @__PURE__ */ new
|
|
4461
|
+
const Re = /* @__PURE__ */ new Fe(), Ri = /* @__PURE__ */ new Be(), lr = /* @__PURE__ */ new E(), Me = /* @__PURE__ */ new ke(), Br = /* @__PURE__ */ new ke(), ve = /* @__PURE__ */ new E();
|
|
4462
4462
|
class ze extends ai {
|
|
4463
4463
|
constructor() {
|
|
4464
4464
|
super(), this.isBufferGeometry = !0, Object.defineProperty(this, "id", { value: iu++ }), this.uuid = Sr(), this.name = "", this.type = "BufferGeometry", this.index = null, this.indirect = null, this.attributes = {}, this.morphAttributes = {}, this.morphTargetsRelative = !1, this.groups = [], this.boundingBox = null, this.boundingSphere = null, this.drawRange = { start: 0, count: 1 / 0 }, this.userData = {};
|
|
@@ -4555,7 +4555,7 @@ var P1 = Fc((L) => {
|
|
|
4555
4555
|
return this;
|
|
4556
4556
|
}
|
|
4557
4557
|
computeBoundingBox() {
|
|
4558
|
-
this.boundingBox === null && (this.boundingBox = new
|
|
4558
|
+
this.boundingBox === null && (this.boundingBox = new ke());
|
|
4559
4559
|
const e = this.attributes.position, t = this.morphAttributes.position;
|
|
4560
4560
|
if (e && e.isGLBufferAttribute) {
|
|
4561
4561
|
console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.", this), this.boundingBox.set(
|
|
@@ -4612,11 +4612,11 @@ var P1 = Fc((L) => {
|
|
|
4612
4612
|
const a = this.getAttribute("tangent"), o = [], h = [];
|
|
4613
4613
|
for (let _ = 0; _ < r.count; _++)
|
|
4614
4614
|
o[_] = new E(), h[_] = new E();
|
|
4615
|
-
const c = new E(), u = new E(), f = new E(), l = new q(), p = new q(),
|
|
4615
|
+
const c = new E(), u = new E(), f = new E(), l = new q(), p = new q(), d = new q(), m = new E(), x = new E();
|
|
4616
4616
|
function v(_, D, N) {
|
|
4617
|
-
c.fromBufferAttribute(r, _), u.fromBufferAttribute(r, D), f.fromBufferAttribute(r, N), l.fromBufferAttribute(s, _), p.fromBufferAttribute(s, D),
|
|
4618
|
-
const G = 1 / (p.x *
|
|
4619
|
-
isFinite(G) && (m.copy(u).multiplyScalar(
|
|
4617
|
+
c.fromBufferAttribute(r, _), u.fromBufferAttribute(r, D), f.fromBufferAttribute(r, N), l.fromBufferAttribute(s, _), p.fromBufferAttribute(s, D), d.fromBufferAttribute(s, N), u.sub(c), f.sub(c), p.sub(l), d.sub(l);
|
|
4618
|
+
const G = 1 / (p.x * d.y - d.x * p.y);
|
|
4619
|
+
isFinite(G) && (m.copy(u).multiplyScalar(d.y).addScaledVector(f, -p.y).multiplyScalar(G), x.copy(f).multiplyScalar(p.x).addScaledVector(u, -d.x).multiplyScalar(G), o[_].add(m), o[D].add(m), o[N].add(m), h[_].add(x), h[D].add(x), h[N].add(x));
|
|
4620
4620
|
}
|
|
4621
4621
|
let w = this.groups;
|
|
4622
4622
|
w.length === 0 && (w = [{
|
|
@@ -4658,8 +4658,8 @@ var P1 = Fc((L) => {
|
|
|
4658
4658
|
const i = new E(), s = new E(), a = new E(), o = new E(), h = new E(), c = new E(), u = new E(), f = new E();
|
|
4659
4659
|
if (e)
|
|
4660
4660
|
for (let l = 0, p = e.count; l < p; l += 3) {
|
|
4661
|
-
const
|
|
4662
|
-
i.fromBufferAttribute(t,
|
|
4661
|
+
const d = e.getX(l + 0), m = e.getX(l + 1), x = e.getX(l + 2);
|
|
4662
|
+
i.fromBufferAttribute(t, d), s.fromBufferAttribute(t, m), a.fromBufferAttribute(t, x), u.subVectors(a, s), f.subVectors(i, s), u.cross(f), o.fromBufferAttribute(r, d), h.fromBufferAttribute(r, m), c.fromBufferAttribute(r, x), o.add(u), h.add(u), c.add(u), r.setXYZ(d, o.x, o.y, o.z), r.setXYZ(m, h.x, h.y, h.z), r.setXYZ(x, c.x, c.y, c.z);
|
|
4663
4663
|
}
|
|
4664
4664
|
else
|
|
4665
4665
|
for (let l = 0, p = t.count; l < p; l += 3)
|
|
@@ -4675,11 +4675,11 @@ var P1 = Fc((L) => {
|
|
|
4675
4675
|
toNonIndexed() {
|
|
4676
4676
|
function e(o, h) {
|
|
4677
4677
|
const c = o.array, u = o.itemSize, f = o.normalized, l = new c.constructor(h.length * u);
|
|
4678
|
-
let p = 0,
|
|
4678
|
+
let p = 0, d = 0;
|
|
4679
4679
|
for (let m = 0, x = h.length; m < x; m++) {
|
|
4680
4680
|
o.isInterleavedBufferAttribute ? p = h[m] * o.data.stride + o.offset : p = h[m] * u;
|
|
4681
4681
|
for (let v = 0; v < u; v++)
|
|
4682
|
-
l[
|
|
4682
|
+
l[d++] = c[p++];
|
|
4683
4683
|
}
|
|
4684
4684
|
return new Ye(l, u, f);
|
|
4685
4685
|
}
|
|
@@ -4831,32 +4831,32 @@ var P1 = Fc((L) => {
|
|
|
4831
4831
|
const s = this.geometry, a = this.material, o = s.index, h = s.attributes.position, c = s.attributes.uv, u = s.attributes.uv1, f = s.attributes.normal, l = s.groups, p = s.drawRange;
|
|
4832
4832
|
if (o !== null)
|
|
4833
4833
|
if (Array.isArray(a))
|
|
4834
|
-
for (let
|
|
4835
|
-
const x = l[
|
|
4834
|
+
for (let d = 0, m = l.length; d < m; d++) {
|
|
4835
|
+
const x = l[d], 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));
|
|
4836
4836
|
for (let S = w, T = b; S < T; S += 3) {
|
|
4837
4837
|
const B = o.getX(S), M = o.getX(S + 1), _ = o.getX(S + 2);
|
|
4838
4838
|
i = Mn(this, v, e, r, c, u, f, B, M, _), i && (i.faceIndex = Math.floor(S / 3), i.face.materialIndex = x.materialIndex, t.push(i));
|
|
4839
4839
|
}
|
|
4840
4840
|
}
|
|
4841
4841
|
else {
|
|
4842
|
-
const
|
|
4843
|
-
for (let x =
|
|
4842
|
+
const d = Math.max(0, p.start), m = Math.min(o.count, p.start + p.count);
|
|
4843
|
+
for (let x = d, v = m; x < v; x += 3) {
|
|
4844
4844
|
const w = o.getX(x), b = o.getX(x + 1), S = o.getX(x + 2);
|
|
4845
4845
|
i = Mn(this, a, e, r, c, u, f, w, b, S), i && (i.faceIndex = Math.floor(x / 3), t.push(i));
|
|
4846
4846
|
}
|
|
4847
4847
|
}
|
|
4848
4848
|
else if (h !== void 0)
|
|
4849
4849
|
if (Array.isArray(a))
|
|
4850
|
-
for (let
|
|
4851
|
-
const x = l[
|
|
4850
|
+
for (let d = 0, m = l.length; d < m; d++) {
|
|
4851
|
+
const x = l[d], 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));
|
|
4852
4852
|
for (let S = w, T = b; S < T; S += 3) {
|
|
4853
4853
|
const B = S, M = S + 1, _ = S + 2;
|
|
4854
4854
|
i = Mn(this, v, e, r, c, u, f, B, M, _), i && (i.faceIndex = Math.floor(S / 3), i.face.materialIndex = x.materialIndex, t.push(i));
|
|
4855
4855
|
}
|
|
4856
4856
|
}
|
|
4857
4857
|
else {
|
|
4858
|
-
const
|
|
4859
|
-
for (let x =
|
|
4858
|
+
const d = Math.max(0, p.start), m = Math.min(h.count, p.start + p.count);
|
|
4859
|
+
for (let x = d, v = m; x < v; x += 3) {
|
|
4860
4860
|
const w = x, b = x + 1, S = x + 2;
|
|
4861
4861
|
i = Mn(this, a, e, r, c, u, f, w, b, S), i && (i.faceIndex = Math.floor(x / 3), t.push(i));
|
|
4862
4862
|
}
|
|
@@ -4924,23 +4924,23 @@ var P1 = Fc((L) => {
|
|
|
4924
4924
|
Ma.copy(i).invert(), Lr.copy(e.ray).applyMatrix4(Ma);
|
|
4925
4925
|
const o = s / ((this.scale.x + this.scale.y + this.scale.z) / 3), h = o * o, c = this.isLineSegments ? 2 : 1, u = r.index, l = r.attributes.position;
|
|
4926
4926
|
if (u !== null) {
|
|
4927
|
-
const p = Math.max(0, a.start),
|
|
4928
|
-
for (let m = p, x =
|
|
4927
|
+
const p = Math.max(0, a.start), d = Math.min(u.count, a.start + a.count);
|
|
4928
|
+
for (let m = p, x = d - 1; m < x; m += c) {
|
|
4929
4929
|
const v = u.getX(m), w = u.getX(m + 1), b = Bn(this, e, Lr, h, v, w);
|
|
4930
4930
|
b && t.push(b);
|
|
4931
4931
|
}
|
|
4932
4932
|
if (this.isLineLoop) {
|
|
4933
|
-
const m = u.getX(
|
|
4933
|
+
const m = u.getX(d - 1), x = u.getX(p), v = Bn(this, e, Lr, h, m, x);
|
|
4934
4934
|
v && t.push(v);
|
|
4935
4935
|
}
|
|
4936
4936
|
} else {
|
|
4937
|
-
const p = Math.max(0, a.start),
|
|
4938
|
-
for (let m = p, x =
|
|
4937
|
+
const p = Math.max(0, a.start), d = Math.min(l.count, a.start + a.count);
|
|
4938
|
+
for (let m = p, x = d - 1; m < x; m += c) {
|
|
4939
4939
|
const v = Bn(this, e, Lr, h, m, m + 1);
|
|
4940
4940
|
v && t.push(v);
|
|
4941
4941
|
}
|
|
4942
4942
|
if (this.isLineLoop) {
|
|
4943
|
-
const m = Bn(this, e, Lr, h,
|
|
4943
|
+
const m = Bn(this, e, Lr, h, d - 1, p);
|
|
4944
4944
|
m && t.push(m);
|
|
4945
4945
|
}
|
|
4946
4946
|
}
|
|
@@ -5087,8 +5087,8 @@ var P1 = Fc((L) => {
|
|
|
5087
5087
|
computeFrenetFrames(e, t) {
|
|
5088
5088
|
const r = new E(), i = [], s = [], a = [], o = new E(), h = new Fe();
|
|
5089
5089
|
for (let p = 0; p <= e; p++) {
|
|
5090
|
-
const
|
|
5091
|
-
i[p] = this.getTangentAt(
|
|
5090
|
+
const d = p / e;
|
|
5091
|
+
i[p] = this.getTangentAt(d, new E());
|
|
5092
5092
|
}
|
|
5093
5093
|
s[0] = new E(), a[0] = new E();
|
|
5094
5094
|
let c = Number.MAX_VALUE;
|
|
@@ -5097,16 +5097,16 @@ var P1 = Fc((L) => {
|
|
|
5097
5097
|
for (let p = 1; p <= e; p++) {
|
|
5098
5098
|
if (s[p] = s[p - 1].clone(), a[p] = a[p - 1].clone(), o.crossVectors(i[p - 1], i[p]), o.length() > Number.EPSILON) {
|
|
5099
5099
|
o.normalize();
|
|
5100
|
-
const
|
|
5101
|
-
s[p].applyMatrix4(h.makeRotationAxis(o,
|
|
5100
|
+
const d = Math.acos(X(i[p - 1].dot(i[p]), -1, 1));
|
|
5101
|
+
s[p].applyMatrix4(h.makeRotationAxis(o, d));
|
|
5102
5102
|
}
|
|
5103
5103
|
a[p].crossVectors(i[p], s[p]);
|
|
5104
5104
|
}
|
|
5105
5105
|
if (t === !0) {
|
|
5106
5106
|
let p = Math.acos(X(s[0].dot(s[e]), -1, 1));
|
|
5107
5107
|
p /= e, i[0].dot(o.crossVectors(s[0], s[e])) > 0 && (p = -p);
|
|
5108
|
-
for (let
|
|
5109
|
-
s[
|
|
5108
|
+
for (let d = 1; d <= e; d++)
|
|
5109
|
+
s[d].applyMatrix4(h.makeRotationAxis(i[d], p * d)), a[d].crossVectors(i[d], s[d]);
|
|
5110
5110
|
}
|
|
5111
5111
|
return {
|
|
5112
5112
|
tangents: i,
|
|
@@ -5202,8 +5202,8 @@ var P1 = Fc((L) => {
|
|
|
5202
5202
|
const f = i[o % s], l = i[(o + 1) % s];
|
|
5203
5203
|
if (this.closed || o + 2 < s ? u = i[(o + 2) % s] : (Ln.subVectors(i[s - 1], i[s - 2]).add(i[s - 1]), u = Ln), this.curveType === "centripetal" || this.curveType === "chordal") {
|
|
5204
5204
|
const p = this.curveType === "chordal" ? 0.5 : 0.25;
|
|
5205
|
-
let
|
|
5206
|
-
m < 1e-4 && (m = 1),
|
|
5205
|
+
let d = Math.pow(c.distanceToSquared(f), p), m = Math.pow(f.distanceToSquared(l), p), x = Math.pow(l.distanceToSquared(u), p);
|
|
5206
|
+
m < 1e-4 && (m = 1), d < 1e-4 && (d = m), x < 1e-4 && (x = m), Ii.initNonuniformCatmullRom(c.x, f.x, l.x, u.x, d, m, x), zi.initNonuniformCatmullRom(c.y, f.y, l.y, u.y, d, m, x), Pi.initNonuniformCatmullRom(c.z, f.z, l.z, u.z, d, m, x);
|
|
5207
5207
|
} else this.curveType === "catmullrom" && (Ii.initCatmullRom(c.x, f.x, l.x, u.x, this.tension), zi.initCatmullRom(c.y, f.y, l.y, u.y, this.tension), Pi.initCatmullRom(c.z, f.z, l.z, u.z, this.tension));
|
|
5208
5208
|
return r.set(
|
|
5209
5209
|
Ii.calc(h),
|
|
@@ -5698,8 +5698,8 @@ var P1 = Fc((L) => {
|
|
|
5698
5698
|
let o, h, c, u, f, l, p;
|
|
5699
5699
|
if (r && (s = Tu(n, e, s, t)), n.length > 80 * t) {
|
|
5700
5700
|
o = c = n[0], h = u = n[1];
|
|
5701
|
-
for (let
|
|
5702
|
-
f = n[
|
|
5701
|
+
for (let d = t; d < i; d += t)
|
|
5702
|
+
f = n[d], l = n[d + 1], f < o && (o = f), l < h && (h = l), f > c && (c = f), l > u && (u = l);
|
|
5703
5703
|
p = Math.max(c - o, u - h), p = p !== 0 ? 32767 / p : 0;
|
|
5704
5704
|
}
|
|
5705
5705
|
return Vr(s, a, t, o, h, p, 0), a;
|
|
@@ -5745,28 +5745,28 @@ var P1 = Fc((L) => {
|
|
|
5745
5745
|
const e = n.prev, t = n, r = n.next;
|
|
5746
5746
|
if (ue(e, t, r) >= 0) return !1;
|
|
5747
5747
|
const i = e.x, s = t.x, a = r.x, o = e.y, h = t.y, c = r.y, u = i < s ? i < a ? i : a : s < a ? s : a, f = o < h ? o < c ? o : c : h < c ? h : c, l = i > s ? i > a ? i : a : s > a ? s : a, p = o > h ? o > c ? o : c : h > c ? h : c;
|
|
5748
|
-
let
|
|
5749
|
-
for (;
|
|
5750
|
-
if (
|
|
5751
|
-
|
|
5748
|
+
let d = r.next;
|
|
5749
|
+
for (; d !== e; ) {
|
|
5750
|
+
if (d.x >= u && d.x <= l && d.y >= f && d.y <= p && dr(i, o, s, h, a, c, d.x, d.y) && ue(d.prev, d, d.next) >= 0) return !1;
|
|
5751
|
+
d = d.next;
|
|
5752
5752
|
}
|
|
5753
5753
|
return !0;
|
|
5754
5754
|
}
|
|
5755
5755
|
function Su(n, e, t, r) {
|
|
5756
5756
|
const i = n.prev, s = n, a = n.next;
|
|
5757
5757
|
if (ue(i, s, a) >= 0) return !1;
|
|
5758
|
-
const o = i.x, h = s.x, c = a.x, u = i.y, f = s.y, l = a.y, p = o < h ? o < c ? o : c : h < c ? h : c,
|
|
5758
|
+
const o = i.x, h = s.x, c = a.x, u = i.y, f = s.y, l = a.y, p = o < h ? o < c ? o : c : h < c ? h : c, d = u < f ? u < l ? u : l : f < l ? f : l, m = o > h ? o > c ? o : c : h > c ? h : c, x = u > f ? u > l ? u : l : f > l ? f : l, v = gs(p, d, e, t, r), w = gs(m, x, e, t, r);
|
|
5759
5759
|
let b = n.prevZ, S = n.nextZ;
|
|
5760
5760
|
for (; b && b.z >= v && S && S.z <= w; ) {
|
|
5761
|
-
if (b.x >= p && b.x <= m && b.y >=
|
|
5761
|
+
if (b.x >= p && b.x <= m && b.y >= d && b.y <= x && b !== i && b !== a && dr(o, u, h, f, c, l, b.x, b.y) && ue(b.prev, b, b.next) >= 0 || (b = b.prevZ, S.x >= p && S.x <= m && S.y >= d && S.y <= x && S !== i && S !== a && dr(o, u, h, f, c, l, S.x, S.y) && ue(S.prev, S, S.next) >= 0)) return !1;
|
|
5762
5762
|
S = S.nextZ;
|
|
5763
5763
|
}
|
|
5764
5764
|
for (; b && b.z >= v; ) {
|
|
5765
|
-
if (b.x >= p && b.x <= m && b.y >=
|
|
5765
|
+
if (b.x >= p && b.x <= m && b.y >= d && b.y <= x && b !== i && b !== a && dr(o, u, h, f, c, l, b.x, b.y) && ue(b.prev, b, b.next) >= 0) return !1;
|
|
5766
5766
|
b = b.prevZ;
|
|
5767
5767
|
}
|
|
5768
5768
|
for (; S && S.z <= w; ) {
|
|
5769
|
-
if (S.x >= p && S.x <= m && S.y >=
|
|
5769
|
+
if (S.x >= p && S.x <= m && S.y >= d && S.y <= x && S !== i && S !== a && dr(o, u, h, f, c, l, S.x, S.y) && ue(S.prev, S, S.next) >= 0) return !1;
|
|
5770
5770
|
S = S.nextZ;
|
|
5771
5771
|
}
|
|
5772
5772
|
return !0;
|
|
@@ -5981,15 +5981,15 @@ var P1 = Fc((L) => {
|
|
|
5981
5981
|
function c(u) {
|
|
5982
5982
|
const f = i.length / 3, l = u.extractPoints(t);
|
|
5983
5983
|
let p = l.shape;
|
|
5984
|
-
const
|
|
5984
|
+
const d = l.holes;
|
|
5985
5985
|
Rt.isClockWise(p) === !1 && (p = p.reverse());
|
|
5986
|
-
for (let x = 0, v =
|
|
5987
|
-
const w =
|
|
5988
|
-
Rt.isClockWise(w) === !0 && (
|
|
5986
|
+
for (let x = 0, v = d.length; x < v; x++) {
|
|
5987
|
+
const w = d[x];
|
|
5988
|
+
Rt.isClockWise(w) === !0 && (d[x] = w.reverse());
|
|
5989
5989
|
}
|
|
5990
|
-
const m = Rt.triangulateShape(p,
|
|
5991
|
-
for (let x = 0, v =
|
|
5992
|
-
const w =
|
|
5990
|
+
const m = Rt.triangulateShape(p, d);
|
|
5991
|
+
for (let x = 0, v = d.length; x < v; x++) {
|
|
5992
|
+
const w = d[x];
|
|
5993
5993
|
p = p.concat(w);
|
|
5994
5994
|
}
|
|
5995
5995
|
for (let x = 0, v = p.length; x < v; x++) {
|
|
@@ -6067,9 +6067,9 @@ var P1 = Fc((L) => {
|
|
|
6067
6067
|
return f !== -1 && c.splice(f, 2), this;
|
|
6068
6068
|
}, this.getHandler = function(u) {
|
|
6069
6069
|
for (let f = 0, l = c.length; f < l; f += 2) {
|
|
6070
|
-
const p = c[f],
|
|
6070
|
+
const p = c[f], d = c[f + 1];
|
|
6071
6071
|
if (p.global && (p.lastIndex = 0), p.test(u))
|
|
6072
|
-
return
|
|
6072
|
+
return d;
|
|
6073
6073
|
}
|
|
6074
6074
|
return null;
|
|
6075
6075
|
};
|
|
@@ -6146,7 +6146,7 @@ var P1 = Fc((L) => {
|
|
|
6146
6146
|
if (c.status === 200 || c.status === 0) {
|
|
6147
6147
|
if (c.status === 0 && console.warn("THREE.FileLoader: HTTP Status 0 received."), typeof ReadableStream > "u" || c.body === void 0 || c.body.getReader === void 0)
|
|
6148
6148
|
return c;
|
|
6149
|
-
const u = lt[e], f = c.body.getReader(), l = c.headers.get("X-File-Size") || c.headers.get("Content-Length"), p = l ? parseInt(l) : 0,
|
|
6149
|
+
const u = lt[e], f = c.body.getReader(), l = c.headers.get("X-File-Size") || c.headers.get("Content-Length"), p = l ? parseInt(l) : 0, d = p !== 0;
|
|
6150
6150
|
let m = 0;
|
|
6151
6151
|
const x = new ReadableStream({
|
|
6152
6152
|
start(v) {
|
|
@@ -6157,7 +6157,7 @@ var P1 = Fc((L) => {
|
|
|
6157
6157
|
v.close();
|
|
6158
6158
|
else {
|
|
6159
6159
|
m += S.byteLength;
|
|
6160
|
-
const T = new ProgressEvent("progress", { lengthComputable:
|
|
6160
|
+
const T = new ProgressEvent("progress", { lengthComputable: d, loaded: m, total: p });
|
|
6161
6161
|
for (let B = 0, M = u.length; B < M; B++) {
|
|
6162
6162
|
const _ = u[B];
|
|
6163
6163
|
_.onProgress && _.onProgress(T);
|
|
@@ -6188,7 +6188,7 @@ var P1 = Fc((L) => {
|
|
|
6188
6188
|
return c.text();
|
|
6189
6189
|
{
|
|
6190
6190
|
const f = /charset="?([^;"\s]*)"?/i.exec(o), l = f && f[1] ? f[1].toLowerCase() : void 0, p = new TextDecoder(l);
|
|
6191
|
-
return c.arrayBuffer().then((
|
|
6191
|
+
return c.arrayBuffer().then((d) => p.decode(d));
|
|
6192
6192
|
}
|
|
6193
6193
|
}
|
|
6194
6194
|
}).then((c) => {
|
|
@@ -6279,10 +6279,10 @@ var P1 = Fc((L) => {
|
|
|
6279
6279
|
let u = !i(s[0].getPoints());
|
|
6280
6280
|
u = e ? !u : u;
|
|
6281
6281
|
const f = [], l = [];
|
|
6282
|
-
let p = [],
|
|
6283
|
-
l[
|
|
6282
|
+
let p = [], d = 0, m;
|
|
6283
|
+
l[d] = void 0, p[d] = [];
|
|
6284
6284
|
for (let v = 0, w = s.length; v < w; v++)
|
|
6285
|
-
o = s[v], m = o.getPoints(), a = i(m), a = e ? !a : a, a ? (!u && l[
|
|
6285
|
+
o = s[v], m = o.getPoints(), a = i(m), a = e ? !a : a, a ? (!u && l[d] && d++, l[d] = { s: new yr(), p: m }, l[d].s.curves = o.curves, u && d++, p[d] = []) : p[d].push({ h: o, p: m[0] });
|
|
6286
6286
|
if (!l[0]) return t(s);
|
|
6287
6287
|
if (l.length > 1) {
|
|
6288
6288
|
let v = !1, w = 0;
|
|
@@ -7205,19 +7205,19 @@ var P1 = Fc((L) => {
|
|
|
7205
7205
|
var h = [n, e], c = [t, r], u = [i, s], f = [a, o];
|
|
7206
7206
|
this.addPoint(n, e), this.addPoint(a, o);
|
|
7207
7207
|
for (var l = 0; l <= 1; l++) {
|
|
7208
|
-
var p = 6 * h[l] - 12 * c[l] + 6 * u[l],
|
|
7209
|
-
if (
|
|
7208
|
+
var p = 6 * h[l] - 12 * c[l] + 6 * u[l], d = -3 * h[l] + 9 * c[l] - 9 * u[l] + 3 * f[l], m = 3 * c[l] - 3 * h[l];
|
|
7209
|
+
if (d === 0) {
|
|
7210
7210
|
if (p === 0)
|
|
7211
7211
|
continue;
|
|
7212
7212
|
var x = -m / p;
|
|
7213
7213
|
0 < x && x < 1 && (l === 0 && this.addX(fr(h[l], c[l], u[l], f[l], x)), l === 1 && this.addY(fr(h[l], c[l], u[l], f[l], x)));
|
|
7214
7214
|
continue;
|
|
7215
7215
|
}
|
|
7216
|
-
var v = Math.pow(p, 2) - 4 * m *
|
|
7216
|
+
var v = Math.pow(p, 2) - 4 * m * d;
|
|
7217
7217
|
if (!(v < 0)) {
|
|
7218
|
-
var w = (-p + Math.sqrt(v)) / (2 *
|
|
7218
|
+
var w = (-p + Math.sqrt(v)) / (2 * d);
|
|
7219
7219
|
0 < w && w < 1 && (l === 0 && this.addX(fr(h[l], c[l], u[l], f[l], w)), l === 1 && this.addY(fr(h[l], c[l], u[l], f[l], w)));
|
|
7220
|
-
var b = (-p - Math.sqrt(v)) / (2 *
|
|
7220
|
+
var b = (-p - Math.sqrt(v)) / (2 * d);
|
|
7221
7221
|
0 < b && b < 1 && (l === 0 && this.addX(fr(h[l], c[l], u[l], f[l], b)), l === 1 && this.addY(fr(h[l], c[l], u[l], f[l], b)));
|
|
7222
7222
|
}
|
|
7223
7223
|
}
|
|
@@ -8195,8 +8195,8 @@ var P1 = Fc((L) => {
|
|
|
8195
8195
|
var s;
|
|
8196
8196
|
n.segCount = s = e.parseUShort() >> 1, e.skip("uShort", 3), n.glyphIndexMap = {};
|
|
8197
8197
|
for (var a = new P.Parser(t, r + i + 14), o = new P.Parser(t, r + i + 16 + s * 2), h = new P.Parser(t, r + i + 16 + s * 4), c = new P.Parser(t, r + i + 16 + s * 6), u = r + i + 16 + s * 8, f = 0; f < s - 1; f += 1)
|
|
8198
|
-
for (var l = void 0, p = a.parseUShort(),
|
|
8199
|
-
x !== 0 ? (u = c.offset + c.relativeOffset - 2, u += x, u += (v -
|
|
8198
|
+
for (var l = void 0, p = a.parseUShort(), d = o.parseUShort(), m = h.parseShort(), x = c.parseUShort(), v = d; v <= p; v += 1)
|
|
8199
|
+
x !== 0 ? (u = c.offset + c.relativeOffset - 2, u += x, u += (v - d) * 2, l = P.getUShort(t, u), l !== 0 && (l = l + m & 65535)) : l = v + m & 65535, n.glyphIndexMap[v] = l;
|
|
8200
8200
|
}
|
|
8201
8201
|
function Sl(n, e) {
|
|
8202
8202
|
var t = {};
|
|
@@ -8278,14 +8278,14 @@ var P1 = Fc((L) => {
|
|
|
8278
8278
|
});
|
|
8279
8279
|
}
|
|
8280
8280
|
Cl(s);
|
|
8281
|
-
var h = s.segments.length, c = 0, u = [], f = [], l = [], p = [],
|
|
8281
|
+
var h = s.segments.length, c = 0, u = [], f = [], l = [], p = [], d = [], m = [];
|
|
8282
8282
|
for (t = 0; t < h; t += 1) {
|
|
8283
8283
|
var x = s.segments[t];
|
|
8284
|
-
x.end <= 65535 && x.start <= 65535 ? (u = u.concat({ name: "end_" + t, type: "USHORT", value: x.end }), f = f.concat({ name: "start_" + t, type: "USHORT", value: x.start }), l = l.concat({ name: "idDelta_" + t, type: "SHORT", value: x.delta }), p = p.concat({ name: "idRangeOffset_" + t, type: "USHORT", value: x.offset }), x.glyphId !== void 0 && (
|
|
8284
|
+
x.end <= 65535 && x.start <= 65535 ? (u = u.concat({ name: "end_" + t, type: "USHORT", value: x.end }), f = f.concat({ name: "start_" + t, type: "USHORT", value: x.start }), l = l.concat({ name: "idDelta_" + t, type: "SHORT", value: x.delta }), p = p.concat({ name: "idRangeOffset_" + t, type: "USHORT", value: x.offset }), x.glyphId !== void 0 && (d = d.concat({ name: "glyph_" + t, type: "USHORT", value: x.glyphId }))) : c += 1, !e && x.glyphIndex !== void 0 && (m = m.concat({ name: "cmap12Start_" + t, type: "ULONG", value: x.start }), m = m.concat({ name: "cmap12End_" + t, type: "ULONG", value: x.end }), m = m.concat({ name: "cmap12Glyph_" + t, type: "ULONG", value: x.glyphIndex }));
|
|
8285
8285
|
}
|
|
8286
|
-
if (s.segCountX2 = (h - c) * 2, s.searchRange = Math.pow(2, Math.floor(Math.log(h - c) / Math.log(2))) * 2, s.entrySelector = Math.log(s.searchRange / 2) / Math.log(2), s.rangeShift = s.segCountX2 - s.searchRange, s.fields = s.fields.concat(u), s.fields.push({ name: "reservedPad", type: "USHORT", value: 0 }), s.fields = s.fields.concat(f), s.fields = s.fields.concat(l), s.fields = s.fields.concat(p), s.fields = s.fields.concat(
|
|
8286
|
+
if (s.segCountX2 = (h - c) * 2, s.searchRange = Math.pow(2, Math.floor(Math.log(h - c) / Math.log(2))) * 2, s.entrySelector = Math.log(s.searchRange / 2) / Math.log(2), s.rangeShift = s.segCountX2 - s.searchRange, s.fields = s.fields.concat(u), s.fields.push({ name: "reservedPad", type: "USHORT", value: 0 }), s.fields = s.fields.concat(f), s.fields = s.fields.concat(l), s.fields = s.fields.concat(p), s.fields = s.fields.concat(d), s.cmap4Length = 14 + // Subtable header
|
|
8287
8287
|
u.length * 2 + 2 + // reservedPad
|
|
8288
|
-
f.length * 2 + l.length * 2 + p.length * 2 +
|
|
8288
|
+
f.length * 2 + l.length * 2 + p.length * 2 + d.length * 2, !e) {
|
|
8289
8289
|
var v = 16 + // Subtable header
|
|
8290
8290
|
m.length * 4;
|
|
8291
8291
|
s.cmap12Offset = 12 + 2 * 2 + 4 + s.cmap4Length, s.fields = s.fields.concat([
|
|
@@ -9619,10 +9619,10 @@ var P1 = Fc((L) => {
|
|
|
9619
9619
|
this.getPath(e, t, r, i).draw(n);
|
|
9620
9620
|
};
|
|
9621
9621
|
Ne.prototype.drawPoints = function(n, e, t, r) {
|
|
9622
|
-
function i(f, l, p,
|
|
9622
|
+
function i(f, l, p, d) {
|
|
9623
9623
|
n.beginPath();
|
|
9624
9624
|
for (var m = 0; m < f.length; m += 1)
|
|
9625
|
-
n.moveTo(l + f[m].x *
|
|
9625
|
+
n.moveTo(l + f[m].x * d, p + f[m].y * d), n.arc(l + f[m].x * d, p + f[m].y * d, 2, 0, Math.PI * 2, !1);
|
|
9626
9626
|
n.closePath(), n.fill();
|
|
9627
9627
|
}
|
|
9628
9628
|
e = e !== void 0 ? e : 0, t = t !== void 0 ? t : 0, r = r !== void 0 ? r : 24;
|
|
@@ -9919,12 +9919,12 @@ var P1 = Fc((L) => {
|
|
|
9919
9919
|
return new si(i, t);
|
|
9920
9920
|
}
|
|
9921
9921
|
function ro(n, e, t) {
|
|
9922
|
-
var r, i, s, a, o = new me(), h = [], c = 0, u = !1, f = !1, l = 0, p = 0,
|
|
9922
|
+
var r, i, s, a, o = new me(), h = [], c = 0, u = !1, f = !1, l = 0, p = 0, d, m, x, v;
|
|
9923
9923
|
if (n.isCIDFont) {
|
|
9924
9924
|
var w = n.tables.cff.topDict._fdSelect[e.index], b = n.tables.cff.topDict._fdArray[w];
|
|
9925
|
-
|
|
9925
|
+
d = b._subrs, m = b._subrsBias, x = b._defaultWidthX, v = b._nominalWidthX;
|
|
9926
9926
|
} else
|
|
9927
|
-
|
|
9927
|
+
d = n.tables.cff.topDict._subrs, m = n.tables.cff.topDict._subrsBias, x = n.tables.cff.topDict._defaultWidthX, v = n.tables.cff.topDict._nominalWidthX;
|
|
9928
9928
|
var S = x;
|
|
9929
9929
|
function T(_, D) {
|
|
9930
9930
|
f && o.closePath(), o.moveTo(_, D), f = !0;
|
|
@@ -9963,7 +9963,7 @@ var P1 = Fc((L) => {
|
|
|
9963
9963
|
r = l + h.shift(), i = p + h.shift(), s = r + h.shift(), a = i + h.shift(), l = s + h.shift(), p = a + h.shift(), o.curveTo(r, i, s, a, l, p);
|
|
9964
9964
|
break;
|
|
9965
9965
|
case 10:
|
|
9966
|
-
Y = h.pop() + m, Z =
|
|
9966
|
+
Y = h.pop() + m, Z = d[Y], Z && M(Z);
|
|
9967
9967
|
break;
|
|
9968
9968
|
case 11:
|
|
9969
9969
|
return;
|
|
@@ -10083,8 +10083,8 @@ var P1 = Fc((L) => {
|
|
|
10083
10083
|
if (f === 0 || l === 0)
|
|
10084
10084
|
throw new Error("Font is marked as a CID font, but FDArray and/or FDSelect information is missing");
|
|
10085
10085
|
f += e;
|
|
10086
|
-
var p = Et(n, f),
|
|
10087
|
-
u._fdArray =
|
|
10086
|
+
var p = Et(n, f), d = to(n, e, p.objects, o.objects);
|
|
10087
|
+
u._fdArray = d, l += e, u._fdSelect = ql(n, l, t.numGlyphs, d.length);
|
|
10088
10088
|
}
|
|
10089
10089
|
var m = e + u.private[1], x = Ph(n, m, u.private[0], o.objects);
|
|
10090
10090
|
if (t.defaultWidthX = x.defaultWidthX, t.nominalWidthX = x.nominalWidthX, x.subrs !== 0) {
|
|
@@ -10191,8 +10191,8 @@ var P1 = Fc((L) => {
|
|
|
10191
10191
|
else if (h.type === "L")
|
|
10192
10192
|
a = Math.round(h.x - r), o = Math.round(h.y - i), e.push({ name: "dx", type: "NUMBER", value: a }), e.push({ name: "dy", type: "NUMBER", value: o }), e.push({ name: "rlineto", type: "OP", value: 5 }), r = Math.round(h.x), i = Math.round(h.y);
|
|
10193
10193
|
else if (h.type === "C") {
|
|
10194
|
-
var f = Math.round(h.x1 - r), l = Math.round(h.y1 - i), p = Math.round(h.x2 - h.x1),
|
|
10195
|
-
a = Math.round(h.x - h.x2), o = Math.round(h.y - h.y2), e.push({ name: "dx1", type: "NUMBER", value: f }), e.push({ name: "dy1", type: "NUMBER", value: l }), e.push({ name: "dx2", type: "NUMBER", value: p }), e.push({ name: "dy2", type: "NUMBER", value:
|
|
10194
|
+
var f = Math.round(h.x1 - r), l = Math.round(h.y1 - i), p = Math.round(h.x2 - h.x1), d = Math.round(h.y2 - h.y1);
|
|
10195
|
+
a = Math.round(h.x - h.x2), o = Math.round(h.y - h.y2), e.push({ name: "dx1", type: "NUMBER", value: f }), e.push({ name: "dy1", type: "NUMBER", value: l }), e.push({ name: "dx2", type: "NUMBER", value: p }), e.push({ name: "dy2", type: "NUMBER", value: d }), e.push({ name: "dx", type: "NUMBER", value: a }), e.push({ name: "dy", type: "NUMBER", value: o }), e.push({ name: "rrcurveto", type: "OP", value: 8 }), r = Math.round(h.x), i = Math.round(h.y);
|
|
10196
10196
|
}
|
|
10197
10197
|
}
|
|
10198
10198
|
return e.push({ name: "endchar", type: "OP", value: 14 }), e;
|
|
@@ -11093,10 +11093,10 @@ var P1 = Fc((L) => {
|
|
|
11093
11093
|
}
|
|
11094
11094
|
function xf(n, e, t) {
|
|
11095
11095
|
for (var r = {}, i = new P.Parser(n, e), s = i.parseUShort(), a = i.parseUShort(), o = i.offset + i.parseUShort(), h = 0; h < a; h++) {
|
|
11096
|
-
var c = i.parseUShort(), u = i.parseUShort(), f = i.parseUShort(), l = i.parseUShort(), p = Zh[l] || l,
|
|
11096
|
+
var c = i.parseUShort(), u = i.parseUShort(), f = i.parseUShort(), l = i.parseUShort(), p = Zh[l] || l, d = i.parseUShort(), m = i.parseUShort(), x = yf(c, f, t), v = jh(c, u, f);
|
|
11097
11097
|
if (v !== void 0 && x !== void 0) {
|
|
11098
11098
|
var w = void 0;
|
|
11099
|
-
if (v === Es ? w = wr.UTF16(n, o + m,
|
|
11099
|
+
if (v === Es ? w = wr.UTF16(n, o + m, d) : w = wr.MACSTRING(n, o + m, d, v), w) {
|
|
11100
11100
|
var b = r[p];
|
|
11101
11101
|
b === void 0 && (b = r[p] = {}), b[x] = w;
|
|
11102
11102
|
}
|
|
@@ -11152,9 +11152,9 @@ var P1 = Fc((L) => {
|
|
|
11152
11152
|
for (var h = Vi(Jh), c = Vi($h), u = [], f = [], l = 0; l < r.length; l++) {
|
|
11153
11153
|
t = r[l];
|
|
11154
11154
|
var p = i[t];
|
|
11155
|
-
for (var
|
|
11156
|
-
var m = p[
|
|
11157
|
-
S === void 0 && (x = 0, v = e.indexOf(
|
|
11155
|
+
for (var d in p) {
|
|
11156
|
+
var m = p[d], x = 1, v = h[d], w = gf[v], b = jh(x, w, v), S = U.MACSTRING(m, b);
|
|
11157
|
+
S === void 0 && (x = 0, v = e.indexOf(d), v < 0 && (v = e.length, e.push(d)), w = 4, S = U.UTF16(m));
|
|
11158
11158
|
var T = ao(S, f);
|
|
11159
11159
|
u.push(so(
|
|
11160
11160
|
x,
|
|
@@ -11164,7 +11164,7 @@ var P1 = Fc((L) => {
|
|
|
11164
11164
|
S.length,
|
|
11165
11165
|
T
|
|
11166
11166
|
));
|
|
11167
|
-
var B = c[
|
|
11167
|
+
var B = c[d];
|
|
11168
11168
|
if (B !== void 0) {
|
|
11169
11169
|
var M = U.UTF16(m), _ = ao(M, f);
|
|
11170
11170
|
u.push(so(
|
|
@@ -11869,10 +11869,10 @@ var P1 = Fc((L) => {
|
|
|
11869
11869
|
return e / n.length;
|
|
11870
11870
|
}
|
|
11871
11871
|
function Lf(n) {
|
|
11872
|
-
for (var e = [], t = [], r = [], i = [], s = [], a = [], o = [], h, c = 0, u = 0, f = 0, l = 0, p = 0,
|
|
11873
|
-
var m = n.glyphs.get(
|
|
11872
|
+
for (var e = [], t = [], r = [], i = [], s = [], a = [], o = [], h, c = 0, u = 0, f = 0, l = 0, p = 0, d = 0; d < n.glyphs.length; d += 1) {
|
|
11873
|
+
var m = n.glyphs.get(d), x = m.unicode | 0;
|
|
11874
11874
|
if (isNaN(m.advanceWidth))
|
|
11875
|
-
throw new Error("Glyph " + m.name + " (" +
|
|
11875
|
+
throw new Error("Glyph " + m.name + " (" + d + "): advanceWidth is not a number.");
|
|
11876
11876
|
(h > x || h === void 0) && x > 0 && (h = x), c < x && (c = x);
|
|
11877
11877
|
var v = Ms.getUnicodeRange(x);
|
|
11878
11878
|
if (v < 32)
|
|
@@ -12325,8 +12325,8 @@ var P1 = Fc((L) => {
|
|
|
12325
12325
|
for (var r = [], i = this.getLookupTables(e, t, n, 4), s = 0; s < i.length; s++)
|
|
12326
12326
|
for (var a = i[s].subtables, o = 0; o < a.length; o++)
|
|
12327
12327
|
for (var h = a[o], c = this.expandCoverage(h.coverage), u = h.ligatureSets, f = 0; f < c.length; f++)
|
|
12328
|
-
for (var l = c[f], p = u[f],
|
|
12329
|
-
var m = p[
|
|
12328
|
+
for (var l = c[f], p = u[f], d = 0; d < p.length; d++) {
|
|
12329
|
+
var m = p[d];
|
|
12330
12330
|
r.push({
|
|
12331
12331
|
sub: [l].concat(m.components),
|
|
12332
12332
|
by: m.ligGlyph
|
|
@@ -12453,14 +12453,14 @@ var P1 = Fc((L) => {
|
|
|
12453
12453
|
for (var f = r.parseByte(), l = 0; l < f; l += 1)
|
|
12454
12454
|
i.push(s), u += 1;
|
|
12455
12455
|
if (H.argument(i.length === c, "Bad flags."), a.length > 0) {
|
|
12456
|
-
var p = [],
|
|
12456
|
+
var p = [], d;
|
|
12457
12457
|
if (c > 0) {
|
|
12458
12458
|
for (var m = 0; m < c; m += 1)
|
|
12459
|
-
s = i[m],
|
|
12459
|
+
s = i[m], d = {}, d.onCurve = !!(s & 1), d.lastPointOfContour = a.indexOf(m) >= 0, p.push(d);
|
|
12460
12460
|
for (var x = 0, v = 0; v < c; v += 1)
|
|
12461
|
-
s = i[v],
|
|
12461
|
+
s = i[v], d = p[v], d.x = fo(r, s, x, 2, 16), x = d.x;
|
|
12462
12462
|
for (var w = 0, b = 0; b < c; b += 1)
|
|
12463
|
-
s = i[b],
|
|
12463
|
+
s = i[b], d = p[b], d.y = fo(r, s, w, 4, 32), w = d.y;
|
|
12464
12464
|
}
|
|
12465
12465
|
n.points = p;
|
|
12466
12466
|
} else
|
|
@@ -12841,12 +12841,12 @@ var P1 = Fc((L) => {
|
|
|
12841
12841
|
for (var c = 0; c < i.length; c++) {
|
|
12842
12842
|
var u = i[c], f = h.glyphs.get(u.glyphIndex);
|
|
12843
12843
|
o = new Bt("glyf", f.instructions), L.DEBUG && (console.log("---EXEC COMP " + c + "---"), o.step = -1), _s(f, o, t, r);
|
|
12844
|
-
for (var l = Math.round(u.dx * t), p = Math.round(u.dy * r),
|
|
12845
|
-
var v =
|
|
12844
|
+
for (var l = Math.round(u.dx * t), p = Math.round(u.dy * r), d = o.gZone, m = o.contours, x = 0; x < d.length; x++) {
|
|
12845
|
+
var v = d[x];
|
|
12846
12846
|
v.xTouched = v.yTouched = !1, v.xo = v.x = v.x + l, v.yo = v.y = v.y + p;
|
|
12847
12847
|
}
|
|
12848
12848
|
var w = a.length;
|
|
12849
|
-
a.push.apply(a,
|
|
12849
|
+
a.push.apply(a, d);
|
|
12850
12850
|
for (var b = 0; b < m.length; b++)
|
|
12851
12851
|
s.push(m[b] + w);
|
|
12852
12852
|
}
|
|
@@ -12878,8 +12878,8 @@ var P1 = Fc((L) => {
|
|
|
12878
12878
|
new vt(Math.round(n.advanceWidth * t), 0)
|
|
12879
12879
|
), Kt(e), a.length -= 2, L.DEBUG) {
|
|
12880
12880
|
console.log("FINISHED GLYPH", e.stack);
|
|
12881
|
-
for (var
|
|
12882
|
-
console.log(
|
|
12881
|
+
for (var d = 0; d < s; d++)
|
|
12882
|
+
console.log(d, a[d].x, a[d].y);
|
|
12883
12883
|
}
|
|
12884
12884
|
}
|
|
12885
12885
|
};
|
|
@@ -12963,8 +12963,8 @@ var P1 = Fc((L) => {
|
|
|
12963
12963
|
function Qf(n) {
|
|
12964
12964
|
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];
|
|
12965
12965
|
L.DEBUG && console.log("ISECT[], ", t, r, i, s, a);
|
|
12966
|
-
var
|
|
12967
|
-
p.x = (M * (w - S) - _ * (
|
|
12966
|
+
var d = c.x, m = c.y, x = u.x, v = u.y, w = f.x, b = f.y, S = l.x, T = l.y, B = (d - x) * (b - T) - (m - v) * (w - S), M = d * v - m * x, _ = w * T - b * S;
|
|
12967
|
+
p.x = (M * (w - S) - _ * (d - x)) / B, p.y = (M * (b - T) - _ * (m - v)) / B;
|
|
12968
12968
|
}
|
|
12969
12969
|
function Kf(n) {
|
|
12970
12970
|
n.rp0 = n.stack.pop(), L.DEBUG && console.log(n.step, "SRP0[]", n.rp0);
|
|
@@ -13317,10 +13317,10 @@ var P1 = Fc((L) => {
|
|
|
13317
13317
|
for (var u = 0; u < r; u++) {
|
|
13318
13318
|
var f = t.pop(), l = t.pop(), p = o + ((l & 240) >> 4);
|
|
13319
13319
|
if (p === a) {
|
|
13320
|
-
var
|
|
13321
|
-
|
|
13320
|
+
var d = (l & 15) - 8;
|
|
13321
|
+
d >= 0 && d++, L.DEBUG && console.log(e.step, "DELTAPFIX", f, "by", d * h);
|
|
13322
13322
|
var m = c[f];
|
|
13323
|
-
i.setRelative(m, m,
|
|
13323
|
+
i.setRelative(m, m, d * h, s);
|
|
13324
13324
|
}
|
|
13325
13325
|
}
|
|
13326
13326
|
}
|
|
@@ -13524,8 +13524,8 @@ var P1 = Fc((L) => {
|
|
|
13524
13524
|
e.ip = t;
|
|
13525
13525
|
}
|
|
13526
13526
|
function z(n, e, t, r, i, s) {
|
|
13527
|
-
var a = s.stack, o = n && a.pop(), h = a.pop(), c = s.rp0, u = s.z0[c], f = s.z1[h], l = s.minDis, p = s.fv,
|
|
13528
|
-
x = m =
|
|
13527
|
+
var a = s.stack, o = n && a.pop(), h = a.pop(), c = s.rp0, u = s.z0[c], f = s.z1[h], l = s.minDis, p = s.fv, d = s.dpv, m, x, v, w;
|
|
13528
|
+
x = m = d.distance(f, u, !0, !0), v = x >= 0 ? 1 : -1, x = Math.abs(x), n && (w = s.cvt[o], r && Math.abs(x - w) < s.cvCutIn && (x = w)), t && x < l && (x = l), r && (x = s.round(x)), p.setRelative(f, u, v * x, d), p.touch(f), L.DEBUG && console.log(
|
|
13529
13529
|
s.step,
|
|
13530
13530
|
(n ? "MIRP[" : "MDRP[") + (e ? "M" : "m") + (t ? ">" : "_") + (r ? "R" : "_") + (i === 0 ? "Gr" : i === 1 ? "Bl" : i === 2 ? "Wh" : "") + "]",
|
|
13531
13531
|
n ? o + "(" + s.cvt[o] + "," + w + ")" : "",
|
|
@@ -14412,7 +14412,7 @@ var P1 = Fc((L) => {
|
|
|
14412
14412
|
), f = r.length === e.inputCoverage.length && o.length === e.lookaheadCoverage.length && u.length === e.backtrackCoverage.length, l = [];
|
|
14413
14413
|
if (f)
|
|
14414
14414
|
for (var p = 0; p < e.lookupRecords.length; p++)
|
|
14415
|
-
for (var
|
|
14415
|
+
for (var d = e.lookupRecords[p], m = d.lookupListIndex, x = this.getLookupByIndex(m), v = 0; v < x.subtables.length; v++) {
|
|
14416
14416
|
var w = x.subtables[v], b = this.getLookupMethod(x, w), S = this.getSubstitutionType(x, w);
|
|
14417
14417
|
if (S === "12")
|
|
14418
14418
|
for (var T = 0; T < r.length; T++) {
|
|
@@ -15253,8 +15253,8 @@ var P1 = Fc((L) => {
|
|
|
15253
15253
|
r.skip("uShort", 1);
|
|
15254
15254
|
for (var a = r.parseUShort(), o = r.parseUShort(), h = r.parseUShort(), c = r.parseUShort(), u = [], f = 0; f < a; f++)
|
|
15255
15255
|
u.push(Zp(n, e + s + f * o, t));
|
|
15256
|
-
for (var l = [], p = e + s + a * o,
|
|
15257
|
-
l.push($p(n, p +
|
|
15256
|
+
for (var l = [], p = e + s + a * o, d = 0; d < h; d++)
|
|
15257
|
+
l.push($p(n, p + d * c, u, t));
|
|
15258
15258
|
return { axes: u, instances: l };
|
|
15259
15259
|
}
|
|
15260
15260
|
var Kp = { make: jp, parse: Qp }, ed = function() {
|
|
@@ -15497,7 +15497,7 @@ var P1 = Fc((L) => {
|
|
|
15497
15497
|
a = P.getUShort(s, 12), o = md(s, a);
|
|
15498
15498
|
} else
|
|
15499
15499
|
throw new Error("Unsupported OpenType signature " + h);
|
|
15500
|
-
for (var u, f, l, p,
|
|
15500
|
+
for (var u, f, l, p, d, m, x, v, w, b, S, T, B = 0; B < a; B += 1) {
|
|
15501
15501
|
var M = o[B], _ = void 0;
|
|
15502
15502
|
switch (M.tag) {
|
|
15503
15503
|
case "cmap":
|
|
@@ -15555,7 +15555,7 @@ var P1 = Fc((L) => {
|
|
|
15555
15555
|
p = M;
|
|
15556
15556
|
break;
|
|
15557
15557
|
case "GPOS":
|
|
15558
|
-
|
|
15558
|
+
d = M;
|
|
15559
15559
|
break;
|
|
15560
15560
|
case "GSUB":
|
|
15561
15561
|
m = M;
|
|
@@ -15584,8 +15584,8 @@ var P1 = Fc((L) => {
|
|
|
15584
15584
|
var ne = de(s, p);
|
|
15585
15585
|
i.tables.gdef = ad.parse(ne.data, ne.offset);
|
|
15586
15586
|
}
|
|
15587
|
-
if (
|
|
15588
|
-
var ae = de(s,
|
|
15587
|
+
if (d) {
|
|
15588
|
+
var ae = de(s, d);
|
|
15589
15589
|
i.tables.gpos = ud.parse(ae.data, ae.offset), i.position.init();
|
|
15590
15590
|
}
|
|
15591
15591
|
if (m) {
|
|
@@ -15640,8 +15640,8 @@ var P1 = Fc((L) => {
|
|
|
15640
15640
|
const f = [];
|
|
15641
15641
|
for (let l = 0; l < n.length; ++l) {
|
|
15642
15642
|
const p = n[l].index;
|
|
15643
|
-
for (let
|
|
15644
|
-
f.push(p.getX(
|
|
15643
|
+
for (let d = 0; d < p.count; ++d)
|
|
15644
|
+
f.push(p.getX(d) + u);
|
|
15645
15645
|
u += n[l].attributes.position.count;
|
|
15646
15646
|
}
|
|
15647
15647
|
h.setIndex(f);
|
|
@@ -15660,10 +15660,10 @@ var P1 = Fc((L) => {
|
|
|
15660
15660
|
const p = [];
|
|
15661
15661
|
for (let m = 0; m < a[u].length; ++m)
|
|
15662
15662
|
p.push(a[u][m][l]);
|
|
15663
|
-
const
|
|
15664
|
-
if (!
|
|
15663
|
+
const d = Ro(p);
|
|
15664
|
+
if (!d)
|
|
15665
15665
|
return console.error("THREE.BufferGeometryUtils: .mergeGeometries() failed while trying to merge the " + u + " morphAttribute."), null;
|
|
15666
|
-
h.morphAttributes[u].push(
|
|
15666
|
+
h.morphAttributes[u].push(d);
|
|
15667
15667
|
}
|
|
15668
15668
|
}
|
|
15669
15669
|
return h;
|
|
@@ -15689,9 +15689,9 @@ var P1 = Fc((L) => {
|
|
|
15689
15689
|
if (u.isInterleavedBufferAttribute) {
|
|
15690
15690
|
const f = h / t;
|
|
15691
15691
|
for (let l = 0, p = u.count; l < p; l++)
|
|
15692
|
-
for (let
|
|
15693
|
-
const m = u.getComponent(l,
|
|
15694
|
-
o.setComponent(l + f,
|
|
15692
|
+
for (let d = 0; d < t; d++) {
|
|
15693
|
+
const m = u.getComponent(l, d);
|
|
15694
|
+
o.setComponent(l + f, d, m);
|
|
15695
15695
|
}
|
|
15696
15696
|
} else
|
|
15697
15697
|
a.set(u.array, h);
|
|
@@ -15717,7 +15717,7 @@ var P1 = Fc((L) => {
|
|
|
15717
15717
|
c[S][_] = new M.constructor(D, M.itemSize, M.normalized);
|
|
15718
15718
|
}));
|
|
15719
15719
|
}
|
|
15720
|
-
const p = e * 0.5,
|
|
15720
|
+
const p = e * 0.5, d = Math.log10(1 / e), m = Math.pow(10, d), x = p * m;
|
|
15721
15721
|
for (let w = 0; w < s; w++) {
|
|
15722
15722
|
const b = r ? r.getX(w) : w;
|
|
15723
15723
|
let S = "";
|
|
@@ -15826,7 +15826,7 @@ var P1 = Fc((L) => {
|
|
|
15826
15826
|
return;
|
|
15827
15827
|
}
|
|
15828
15828
|
const a = new yh();
|
|
15829
|
-
let o, h, c, u, f, l, p,
|
|
15829
|
+
let o, h, c, u, f, l, p, d;
|
|
15830
15830
|
if (s.o) {
|
|
15831
15831
|
const m = s._cachedOutline || (s._cachedOutline = s.o.split(" "));
|
|
15832
15832
|
for (let x = 0, v = m.length; x < v; )
|
|
@@ -15841,7 +15841,7 @@ var P1 = Fc((L) => {
|
|
|
15841
15841
|
c = m[x++] * e + t, u = m[x++] * e + r, f = m[x++] * e + t, l = m[x++] * e + r, a.quadraticCurveTo(f, l, c, u);
|
|
15842
15842
|
break;
|
|
15843
15843
|
case "b":
|
|
15844
|
-
c = m[x++] * e + t, u = m[x++] * e + r, f = m[x++] * e + t, l = m[x++] * e + r, p = m[x++] * e + t,
|
|
15844
|
+
c = m[x++] * e + t, u = m[x++] * e + r, f = m[x++] * e + t, l = m[x++] * e + r, p = m[x++] * e + t, d = m[x++] * e + r, a.bezierCurveTo(f, l, p, d, c, u);
|
|
15845
15845
|
break;
|
|
15846
15846
|
}
|
|
15847
15847
|
}
|
|
@@ -15923,7 +15923,7 @@ var P1 = Fc((L) => {
|
|
|
15923
15923
|
let h = 0;
|
|
15924
15924
|
for (; h < o.length; ) {
|
|
15925
15925
|
const c = o[h++];
|
|
15926
|
-
let u, f, l, p,
|
|
15926
|
+
let u, f, l, p, d, m, x, v;
|
|
15927
15927
|
switch (c) {
|
|
15928
15928
|
case "m":
|
|
15929
15929
|
u = parseFloat(o[h++]) * e + t, f = parseFloat(o[h++]) * e + r, a.moveTo(u, f);
|
|
@@ -15932,10 +15932,10 @@ var P1 = Fc((L) => {
|
|
|
15932
15932
|
u = parseFloat(o[h++]) * e + t, f = parseFloat(o[h++]) * e + r, a.lineTo(u, f);
|
|
15933
15933
|
break;
|
|
15934
15934
|
case "q":
|
|
15935
|
-
l = parseFloat(o[h++]) * e + t, p = parseFloat(o[h++]) * e + r,
|
|
15935
|
+
l = parseFloat(o[h++]) * e + t, p = parseFloat(o[h++]) * e + r, d = parseFloat(o[h++]) * e + t, m = parseFloat(o[h++]) * e + r, a.quadraticCurveTo(d, m, l, p);
|
|
15936
15936
|
break;
|
|
15937
15937
|
case "b":
|
|
15938
|
-
l = parseFloat(o[h++]) * e + t, p = parseFloat(o[h++]) * e + r,
|
|
15938
|
+
l = parseFloat(o[h++]) * e + t, p = parseFloat(o[h++]) * e + r, d = parseFloat(o[h++]) * e + t, m = parseFloat(o[h++]) * e + r, x = parseFloat(o[h++]) * e + t, v = parseFloat(o[h++]) * e + r, a.bezierCurveTo(d, m, x, v, l, p);
|
|
15939
15939
|
break;
|
|
15940
15940
|
}
|
|
15941
15941
|
}
|
|
@@ -16024,23 +16024,23 @@ var P1 = Fc((L) => {
|
|
|
16024
16024
|
if (!t || t.length === 0) return [];
|
|
16025
16025
|
const r = t.map((p) => p.getPoints(e)), i = Ed(r), s = Ad(i), a = Md(i), o = t.length, h = Array(o).fill(-1), c = Array(o).fill(-1);
|
|
16026
16026
|
for (const p of a) {
|
|
16027
|
-
const
|
|
16028
|
-
for (;
|
|
16029
|
-
const m =
|
|
16027
|
+
const d = [{ idx: p, d: 0 }];
|
|
16028
|
+
for (; d.length; ) {
|
|
16029
|
+
const m = d.pop();
|
|
16030
16030
|
h[m.idx] = m.d, c[m.idx] = p;
|
|
16031
|
-
for (const x of s[m.idx])
|
|
16031
|
+
for (const x of s[m.idx]) d.push({ idx: x, d: m.d + 1 });
|
|
16032
16032
|
}
|
|
16033
16033
|
}
|
|
16034
16034
|
const u = [], f = /* @__PURE__ */ new Set();
|
|
16035
16035
|
function l(p) {
|
|
16036
|
-
const
|
|
16036
|
+
const d = Do(t[p], !0);
|
|
16037
16037
|
f.add(p);
|
|
16038
16038
|
for (const m of s[p])
|
|
16039
16039
|
if (!f.has(m) && h[m] === h[p] + 1) {
|
|
16040
16040
|
const x = Do(t[m], !1);
|
|
16041
|
-
|
|
16041
|
+
d.holes.push(x), f.add(m);
|
|
16042
16042
|
}
|
|
16043
|
-
u.push(
|
|
16043
|
+
u.push(d);
|
|
16044
16044
|
}
|
|
16045
16045
|
for (const p of a) l(p);
|
|
16046
16046
|
for (let p = 0; p < o; p++)
|
|
@@ -16844,14 +16844,14 @@ var P1 = Fc((L) => {
|
|
|
16844
16844
|
const { strokeWidth: t = "0.5%", strokeColor: r = "black", isAutoFit: i = !1 } = e;
|
|
16845
16845
|
let s, a;
|
|
16846
16846
|
if (i) {
|
|
16847
|
-
const o = this.bbox, h = 0.2, c = o.maxX - o.minX, u = o.maxY - o.minY, f = c === 0 ? u : c, l = u === 0 ? c : u, p = o.minX - f * h,
|
|
16847
|
+
const o = this.bbox, h = 0.2, c = o.maxX - o.minX, u = o.maxY - o.minY, f = c === 0 ? u : c, l = u === 0 ? c : u, p = o.minX - f * h, d = o.maxX + f * h, m = o.minY - l * h, x = o.maxY + l * h;
|
|
16848
16848
|
a = this.polylines.map((v) => {
|
|
16849
16849
|
let w = "";
|
|
16850
16850
|
return v.forEach((b, S) => {
|
|
16851
16851
|
const T = b.x, B = -b.y;
|
|
16852
16852
|
w += S === 0 ? `M ${T} ${B} ` : `L ${T} ${B} `;
|
|
16853
16853
|
}), `<path d="${w}" stroke="${r}" stroke-width="${t}" fill="none"/>`;
|
|
16854
|
-
}).join(""), s = `${p} ${-x} ${
|
|
16854
|
+
}).join(""), s = `${p} ${-x} ${d - p} ${x - m}`;
|
|
16855
16855
|
} else
|
|
16856
16856
|
s = "0 0 20 20", a = this.polylines.map((o) => {
|
|
16857
16857
|
let h = "";
|
|
@@ -16939,8 +16939,8 @@ var P1 = Fc((L) => {
|
|
|
16939
16939
|
u && (u.x *= c, u.y *= h);
|
|
16940
16940
|
const f = e.polylines.map(
|
|
16941
16941
|
(l) => l.map((p) => {
|
|
16942
|
-
const
|
|
16943
|
-
return
|
|
16942
|
+
const d = p.clone();
|
|
16943
|
+
return d.x *= c, d.y *= h, d;
|
|
16944
16944
|
})
|
|
16945
16945
|
);
|
|
16946
16946
|
return new Gr(u, f);
|
|
@@ -17129,8 +17129,8 @@ var P1 = Fc((L) => {
|
|
|
17129
17129
|
let c = o & 7;
|
|
17130
17130
|
const u = o < 0, f = Math.PI / 4 * h, l = r.currentPoint.clone().subtract(new fe(Math.cos(f) * a, Math.sin(f) * a)), p = jr.fromOctant(l, a, h, c, u);
|
|
17131
17131
|
if (r.isPenDown) {
|
|
17132
|
-
const
|
|
17133
|
-
r.currentPolyline.pop(), r.currentPolyline.push(...
|
|
17132
|
+
const d = p.tessellate();
|
|
17133
|
+
r.currentPolyline.pop(), r.currentPolyline.push(...d.slice());
|
|
17134
17134
|
}
|
|
17135
17135
|
return r.currentPoint = (i = p.tessellate().pop()) == null ? void 0 : i.clone(), s;
|
|
17136
17136
|
}
|
|
@@ -17140,9 +17140,9 @@ var P1 = Fc((L) => {
|
|
|
17140
17140
|
let l = u & 7;
|
|
17141
17141
|
l === 0 && (l = 8), a !== 0 && l--;
|
|
17142
17142
|
const p = Math.PI / 4;
|
|
17143
|
-
let
|
|
17144
|
-
u < 0 && (m = -m,
|
|
17145
|
-
let v = p * f, w = v +
|
|
17143
|
+
let d = p * l, m = Nd, x = 1;
|
|
17144
|
+
u < 0 && (m = -m, d = -d, x = -1);
|
|
17145
|
+
let v = p * f, w = v + d;
|
|
17146
17146
|
v += p * s / 256 * x, w += p * a / 256 * x;
|
|
17147
17147
|
const b = r.currentPoint.clone().subtract(new fe(c * Math.cos(v), c * Math.sin(v)));
|
|
17148
17148
|
if (r.currentPoint = b.clone().add(new fe(c * Math.cos(w), c * Math.sin(w))), r.isPenDown) {
|
|
@@ -17420,12 +17420,12 @@ var P1 = Fc((L) => {
|
|
|
17420
17420
|
return (p ? -1 : 1) * a * Math.pow(2, s - r);
|
|
17421
17421
|
};
|
|
17422
17422
|
qs.write = function(n, e, t, r, i, s) {
|
|
17423
|
-
var a, o, h, c = s * 8 - i - 1, u = (1 << c) - 1, f = u >> 1, l = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, p = r ? 0 : s - 1,
|
|
17424
|
-
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (o = isNaN(e) ? 1 : 0, a = u) : (a = Math.floor(Math.log(e) / Math.LN2), e * (h = Math.pow(2, -a)) < 1 && (a--, h *= 2), a + f >= 1 ? e += l / h : e += l * Math.pow(2, 1 - f), e * h >= 2 && (a++, h /= 2), a + f >= u ? (o = 0, a = u) : a + f >= 1 ? (o = (e * h - 1) * Math.pow(2, i), a = a + f) : (o = e * Math.pow(2, f - 1) * Math.pow(2, i), a = 0)); i >= 8; n[t + p] = o & 255, p +=
|
|
17423
|
+
var a, o, h, c = s * 8 - i - 1, u = (1 << c) - 1, f = u >> 1, l = i === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, p = r ? 0 : s - 1, d = r ? 1 : -1, m = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
|
|
17424
|
+
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (o = isNaN(e) ? 1 : 0, a = u) : (a = Math.floor(Math.log(e) / Math.LN2), e * (h = Math.pow(2, -a)) < 1 && (a--, h *= 2), a + f >= 1 ? e += l / h : e += l * Math.pow(2, 1 - f), e * h >= 2 && (a++, h /= 2), a + f >= u ? (o = 0, a = u) : a + f >= 1 ? (o = (e * h - 1) * Math.pow(2, i), a = a + f) : (o = e * Math.pow(2, f - 1) * Math.pow(2, i), a = 0)); i >= 8; n[t + p] = o & 255, p += d, o /= 256, i -= 8)
|
|
17425
17425
|
;
|
|
17426
|
-
for (a = a << i | o, c += i; c > 0; n[t + p] = a & 255, p +=
|
|
17426
|
+
for (a = a << i | o, c += i; c > 0; n[t + p] = a & 255, p += d, a /= 256, c -= 8)
|
|
17427
17427
|
;
|
|
17428
|
-
n[t + p -
|
|
17428
|
+
n[t + p - d] |= m * 128;
|
|
17429
17429
|
};
|
|
17430
17430
|
/*!
|
|
17431
17431
|
* The buffer module from node.js, for the browser.
|
|
@@ -17442,10 +17442,10 @@ var P1 = Fc((L) => {
|
|
|
17442
17442
|
);
|
|
17443
17443
|
function s() {
|
|
17444
17444
|
try {
|
|
17445
|
-
var F = new Uint8Array(1),
|
|
17445
|
+
var F = new Uint8Array(1), g = { foo: function() {
|
|
17446
17446
|
return 42;
|
|
17447
17447
|
} };
|
|
17448
|
-
return Object.setPrototypeOf(
|
|
17448
|
+
return Object.setPrototypeOf(g, Uint8Array.prototype), Object.setPrototypeOf(F, g), F.foo() === 42;
|
|
17449
17449
|
} catch {
|
|
17450
17450
|
return !1;
|
|
17451
17451
|
}
|
|
@@ -17466,52 +17466,52 @@ var P1 = Fc((L) => {
|
|
|
17466
17466
|
function a(F) {
|
|
17467
17467
|
if (F > i)
|
|
17468
17468
|
throw new RangeError('The value "' + F + '" is invalid for option "size"');
|
|
17469
|
-
var
|
|
17470
|
-
return Object.setPrototypeOf(
|
|
17469
|
+
var g = new Uint8Array(F);
|
|
17470
|
+
return Object.setPrototypeOf(g, o.prototype), g;
|
|
17471
17471
|
}
|
|
17472
|
-
function o(F,
|
|
17472
|
+
function o(F, g, y) {
|
|
17473
17473
|
if (typeof F == "number") {
|
|
17474
|
-
if (typeof
|
|
17474
|
+
if (typeof g == "string")
|
|
17475
17475
|
throw new TypeError(
|
|
17476
17476
|
'The "string" argument must be of type string. Received type number'
|
|
17477
17477
|
);
|
|
17478
17478
|
return f(F);
|
|
17479
17479
|
}
|
|
17480
|
-
return h(F,
|
|
17480
|
+
return h(F, g, y);
|
|
17481
17481
|
}
|
|
17482
17482
|
o.poolSize = 8192;
|
|
17483
|
-
function h(F,
|
|
17483
|
+
function h(F, g, y) {
|
|
17484
17484
|
if (typeof F == "string")
|
|
17485
|
-
return l(F,
|
|
17485
|
+
return l(F, g);
|
|
17486
17486
|
if (ArrayBuffer.isView(F))
|
|
17487
|
-
return
|
|
17487
|
+
return d(F);
|
|
17488
17488
|
if (F == null)
|
|
17489
17489
|
throw new TypeError(
|
|
17490
17490
|
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof F
|
|
17491
17491
|
);
|
|
17492
17492
|
if (Ke(F, ArrayBuffer) || F && Ke(F.buffer, ArrayBuffer) || typeof SharedArrayBuffer < "u" && (Ke(F, SharedArrayBuffer) || F && Ke(F.buffer, SharedArrayBuffer)))
|
|
17493
|
-
return m(F,
|
|
17493
|
+
return m(F, g, y);
|
|
17494
17494
|
if (typeof F == "number")
|
|
17495
17495
|
throw new TypeError(
|
|
17496
17496
|
'The "value" argument must not be of type number. Received type number'
|
|
17497
17497
|
);
|
|
17498
17498
|
var C = F.valueOf && F.valueOf();
|
|
17499
17499
|
if (C != null && C !== F)
|
|
17500
|
-
return o.from(C,
|
|
17500
|
+
return o.from(C, g, y);
|
|
17501
17501
|
var k = x(F);
|
|
17502
17502
|
if (k) return k;
|
|
17503
17503
|
if (typeof Symbol < "u" && Symbol.toPrimitive != null && typeof F[Symbol.toPrimitive] == "function")
|
|
17504
17504
|
return o.from(
|
|
17505
17505
|
F[Symbol.toPrimitive]("string"),
|
|
17506
|
-
|
|
17506
|
+
g,
|
|
17507
17507
|
y
|
|
17508
17508
|
);
|
|
17509
17509
|
throw new TypeError(
|
|
17510
17510
|
"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof F
|
|
17511
17511
|
);
|
|
17512
17512
|
}
|
|
17513
|
-
o.from = function(F,
|
|
17514
|
-
return h(F,
|
|
17513
|
+
o.from = function(F, g, y) {
|
|
17514
|
+
return h(F, g, y);
|
|
17515
17515
|
}, Object.setPrototypeOf(o.prototype, Uint8Array.prototype), Object.setPrototypeOf(o, Uint8Array);
|
|
17516
17516
|
function c(F) {
|
|
17517
17517
|
if (typeof F != "number")
|
|
@@ -17519,11 +17519,11 @@ var P1 = Fc((L) => {
|
|
|
17519
17519
|
if (F < 0)
|
|
17520
17520
|
throw new RangeError('The value "' + F + '" is invalid for option "size"');
|
|
17521
17521
|
}
|
|
17522
|
-
function u(F,
|
|
17523
|
-
return c(F), F <= 0 ? a(F) :
|
|
17522
|
+
function u(F, g, y) {
|
|
17523
|
+
return c(F), F <= 0 ? a(F) : g !== void 0 ? typeof y == "string" ? a(F).fill(g, y) : a(F).fill(g) : a(F);
|
|
17524
17524
|
}
|
|
17525
|
-
o.alloc = function(F,
|
|
17526
|
-
return u(F,
|
|
17525
|
+
o.alloc = function(F, g, y) {
|
|
17526
|
+
return u(F, g, y);
|
|
17527
17527
|
};
|
|
17528
17528
|
function f(F) {
|
|
17529
17529
|
return c(F), a(F < 0 ? 0 : v(F) | 0);
|
|
@@ -17533,36 +17533,36 @@ var P1 = Fc((L) => {
|
|
|
17533
17533
|
}, o.allocUnsafeSlow = function(F) {
|
|
17534
17534
|
return f(F);
|
|
17535
17535
|
};
|
|
17536
|
-
function l(F,
|
|
17537
|
-
if ((typeof
|
|
17538
|
-
throw new TypeError("Unknown encoding: " +
|
|
17539
|
-
var y = b(F,
|
|
17536
|
+
function l(F, g) {
|
|
17537
|
+
if ((typeof g != "string" || g === "") && (g = "utf8"), !o.isEncoding(g))
|
|
17538
|
+
throw new TypeError("Unknown encoding: " + g);
|
|
17539
|
+
var y = b(F, g) | 0, C = a(y), k = C.write(F, g);
|
|
17540
17540
|
return k !== y && (C = C.slice(0, k)), C;
|
|
17541
17541
|
}
|
|
17542
17542
|
function p(F) {
|
|
17543
|
-
for (var
|
|
17543
|
+
for (var g = F.length < 0 ? 0 : v(F.length) | 0, y = a(g), C = 0; C < g; C += 1)
|
|
17544
17544
|
y[C] = F[C] & 255;
|
|
17545
17545
|
return y;
|
|
17546
17546
|
}
|
|
17547
|
-
function
|
|
17547
|
+
function d(F) {
|
|
17548
17548
|
if (Ke(F, Uint8Array)) {
|
|
17549
|
-
var
|
|
17550
|
-
return m(
|
|
17549
|
+
var g = new Uint8Array(F);
|
|
17550
|
+
return m(g.buffer, g.byteOffset, g.byteLength);
|
|
17551
17551
|
}
|
|
17552
17552
|
return p(F);
|
|
17553
17553
|
}
|
|
17554
|
-
function m(F,
|
|
17555
|
-
if (
|
|
17554
|
+
function m(F, g, y) {
|
|
17555
|
+
if (g < 0 || F.byteLength < g)
|
|
17556
17556
|
throw new RangeError('"offset" is outside of buffer bounds');
|
|
17557
|
-
if (F.byteLength <
|
|
17557
|
+
if (F.byteLength < g + (y || 0))
|
|
17558
17558
|
throw new RangeError('"length" is outside of buffer bounds');
|
|
17559
17559
|
var C;
|
|
17560
|
-
return
|
|
17560
|
+
return g === void 0 && y === void 0 ? C = new Uint8Array(F) : y === void 0 ? C = new Uint8Array(F, g) : C = new Uint8Array(F, g, y), Object.setPrototypeOf(C, o.prototype), C;
|
|
17561
17561
|
}
|
|
17562
17562
|
function x(F) {
|
|
17563
17563
|
if (o.isBuffer(F)) {
|
|
17564
|
-
var
|
|
17565
|
-
return y.length === 0 || F.copy(y, 0, 0,
|
|
17564
|
+
var g = v(F.length) | 0, y = a(g);
|
|
17565
|
+
return y.length === 0 || F.copy(y, 0, 0, g), y;
|
|
17566
17566
|
}
|
|
17567
17567
|
if (F.length !== void 0)
|
|
17568
17568
|
return typeof F.length != "number" || fi(F.length) ? a(0) : p(F);
|
|
@@ -17577,22 +17577,22 @@ var P1 = Fc((L) => {
|
|
|
17577
17577
|
function w(F) {
|
|
17578
17578
|
return +F != F && (F = 0), o.alloc(+F);
|
|
17579
17579
|
}
|
|
17580
|
-
o.isBuffer = function(
|
|
17581
|
-
return
|
|
17582
|
-
}, o.compare = function(
|
|
17583
|
-
if (Ke(
|
|
17580
|
+
o.isBuffer = function(g) {
|
|
17581
|
+
return g != null && g._isBuffer === !0 && g !== o.prototype;
|
|
17582
|
+
}, o.compare = function(g, y) {
|
|
17583
|
+
if (Ke(g, Uint8Array) && (g = o.from(g, g.offset, g.byteLength)), Ke(y, Uint8Array) && (y = o.from(y, y.offset, y.byteLength)), !o.isBuffer(g) || !o.isBuffer(y))
|
|
17584
17584
|
throw new TypeError(
|
|
17585
17585
|
'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'
|
|
17586
17586
|
);
|
|
17587
|
-
if (
|
|
17588
|
-
for (var C =
|
|
17589
|
-
if (
|
|
17590
|
-
C =
|
|
17587
|
+
if (g === y) return 0;
|
|
17588
|
+
for (var C = g.length, k = y.length, O = 0, R = Math.min(C, k); O < R; ++O)
|
|
17589
|
+
if (g[O] !== y[O]) {
|
|
17590
|
+
C = g[O], k = y[O];
|
|
17591
17591
|
break;
|
|
17592
17592
|
}
|
|
17593
17593
|
return C < k ? -1 : k < C ? 1 : 0;
|
|
17594
|
-
}, o.isEncoding = function(
|
|
17595
|
-
switch (String(
|
|
17594
|
+
}, o.isEncoding = function(g) {
|
|
17595
|
+
switch (String(g).toLowerCase()) {
|
|
17596
17596
|
case "hex":
|
|
17597
17597
|
case "utf8":
|
|
17598
17598
|
case "utf-8":
|
|
@@ -17608,18 +17608,18 @@ var P1 = Fc((L) => {
|
|
|
17608
17608
|
default:
|
|
17609
17609
|
return !1;
|
|
17610
17610
|
}
|
|
17611
|
-
}, o.concat = function(
|
|
17612
|
-
if (!Array.isArray(
|
|
17611
|
+
}, o.concat = function(g, y) {
|
|
17612
|
+
if (!Array.isArray(g))
|
|
17613
17613
|
throw new TypeError('"list" argument must be an Array of Buffers');
|
|
17614
|
-
if (
|
|
17614
|
+
if (g.length === 0)
|
|
17615
17615
|
return o.alloc(0);
|
|
17616
17616
|
var C;
|
|
17617
17617
|
if (y === void 0)
|
|
17618
|
-
for (y = 0, C = 0; C <
|
|
17619
|
-
y +=
|
|
17618
|
+
for (y = 0, C = 0; C < g.length; ++C)
|
|
17619
|
+
y += g[C].length;
|
|
17620
17620
|
var k = o.allocUnsafe(y), O = 0;
|
|
17621
|
-
for (C = 0; C <
|
|
17622
|
-
var R =
|
|
17621
|
+
for (C = 0; C < g.length; ++C) {
|
|
17622
|
+
var R = g[C];
|
|
17623
17623
|
if (Ke(R, Uint8Array))
|
|
17624
17624
|
O + R.length > k.length ? o.from(R).copy(k, O) : Uint8Array.prototype.set.call(
|
|
17625
17625
|
k,
|
|
@@ -17634,7 +17634,7 @@ var P1 = Fc((L) => {
|
|
|
17634
17634
|
}
|
|
17635
17635
|
return k;
|
|
17636
17636
|
};
|
|
17637
|
-
function b(F,
|
|
17637
|
+
function b(F, g) {
|
|
17638
17638
|
if (o.isBuffer(F))
|
|
17639
17639
|
return F.length;
|
|
17640
17640
|
if (ArrayBuffer.isView(F) || Ke(F, ArrayBuffer))
|
|
@@ -17646,7 +17646,7 @@ var P1 = Fc((L) => {
|
|
|
17646
17646
|
var y = F.length, C = arguments.length > 2 && arguments[2] === !0;
|
|
17647
17647
|
if (!C && y === 0) return 0;
|
|
17648
17648
|
for (var k = !1; ; )
|
|
17649
|
-
switch (
|
|
17649
|
+
switch (g) {
|
|
17650
17650
|
case "ascii":
|
|
17651
17651
|
case "latin1":
|
|
17652
17652
|
case "binary":
|
|
@@ -17666,79 +17666,79 @@ var P1 = Fc((L) => {
|
|
|
17666
17666
|
default:
|
|
17667
17667
|
if (k)
|
|
17668
17668
|
return C ? -1 : xt(F).length;
|
|
17669
|
-
|
|
17669
|
+
g = ("" + g).toLowerCase(), k = !0;
|
|
17670
17670
|
}
|
|
17671
17671
|
}
|
|
17672
17672
|
o.byteLength = b;
|
|
17673
|
-
function S(F,
|
|
17673
|
+
function S(F, g, y) {
|
|
17674
17674
|
var C = !1;
|
|
17675
|
-
if ((
|
|
17675
|
+
if ((g === void 0 || g < 0) && (g = 0), g > this.length || ((y === void 0 || y > this.length) && (y = this.length), y <= 0) || (y >>>= 0, g >>>= 0, y <= g))
|
|
17676
17676
|
return "";
|
|
17677
17677
|
for (F || (F = "utf8"); ; )
|
|
17678
17678
|
switch (F) {
|
|
17679
17679
|
case "hex":
|
|
17680
|
-
return ie(this,
|
|
17680
|
+
return ie(this, g, y);
|
|
17681
17681
|
case "utf8":
|
|
17682
17682
|
case "utf-8":
|
|
17683
|
-
return Z(this,
|
|
17683
|
+
return Z(this, g, y);
|
|
17684
17684
|
case "ascii":
|
|
17685
|
-
return ne(this,
|
|
17685
|
+
return ne(this, g, y);
|
|
17686
17686
|
case "latin1":
|
|
17687
17687
|
case "binary":
|
|
17688
|
-
return ae(this,
|
|
17688
|
+
return ae(this, g, y);
|
|
17689
17689
|
case "base64":
|
|
17690
|
-
return Y(this,
|
|
17690
|
+
return Y(this, g, y);
|
|
17691
17691
|
case "ucs2":
|
|
17692
17692
|
case "ucs-2":
|
|
17693
17693
|
case "utf16le":
|
|
17694
17694
|
case "utf-16le":
|
|
17695
|
-
return he(this,
|
|
17695
|
+
return he(this, g, y);
|
|
17696
17696
|
default:
|
|
17697
17697
|
if (C) throw new TypeError("Unknown encoding: " + F);
|
|
17698
17698
|
F = (F + "").toLowerCase(), C = !0;
|
|
17699
17699
|
}
|
|
17700
17700
|
}
|
|
17701
17701
|
o.prototype._isBuffer = !0;
|
|
17702
|
-
function T(F,
|
|
17703
|
-
var C = F[
|
|
17704
|
-
F[
|
|
17702
|
+
function T(F, g, y) {
|
|
17703
|
+
var C = F[g];
|
|
17704
|
+
F[g] = F[y], F[y] = C;
|
|
17705
17705
|
}
|
|
17706
17706
|
o.prototype.swap16 = function() {
|
|
17707
|
-
var
|
|
17708
|
-
if (
|
|
17707
|
+
var g = this.length;
|
|
17708
|
+
if (g % 2 !== 0)
|
|
17709
17709
|
throw new RangeError("Buffer size must be a multiple of 16-bits");
|
|
17710
|
-
for (var y = 0; y <
|
|
17710
|
+
for (var y = 0; y < g; y += 2)
|
|
17711
17711
|
T(this, y, y + 1);
|
|
17712
17712
|
return this;
|
|
17713
17713
|
}, o.prototype.swap32 = function() {
|
|
17714
|
-
var
|
|
17715
|
-
if (
|
|
17714
|
+
var g = this.length;
|
|
17715
|
+
if (g % 4 !== 0)
|
|
17716
17716
|
throw new RangeError("Buffer size must be a multiple of 32-bits");
|
|
17717
|
-
for (var y = 0; y <
|
|
17717
|
+
for (var y = 0; y < g; y += 4)
|
|
17718
17718
|
T(this, y, y + 3), T(this, y + 1, y + 2);
|
|
17719
17719
|
return this;
|
|
17720
17720
|
}, o.prototype.swap64 = function() {
|
|
17721
|
-
var
|
|
17722
|
-
if (
|
|
17721
|
+
var g = this.length;
|
|
17722
|
+
if (g % 8 !== 0)
|
|
17723
17723
|
throw new RangeError("Buffer size must be a multiple of 64-bits");
|
|
17724
|
-
for (var y = 0; y <
|
|
17724
|
+
for (var y = 0; y < g; y += 8)
|
|
17725
17725
|
T(this, y, y + 7), T(this, y + 1, y + 6), T(this, y + 2, y + 5), T(this, y + 3, y + 4);
|
|
17726
17726
|
return this;
|
|
17727
17727
|
}, o.prototype.toString = function() {
|
|
17728
|
-
var
|
|
17729
|
-
return
|
|
17730
|
-
}, o.prototype.toLocaleString = o.prototype.toString, o.prototype.equals = function(
|
|
17731
|
-
if (!o.isBuffer(
|
|
17732
|
-
return this ===
|
|
17728
|
+
var g = this.length;
|
|
17729
|
+
return g === 0 ? "" : arguments.length === 0 ? Z(this, 0, g) : S.apply(this, arguments);
|
|
17730
|
+
}, o.prototype.toLocaleString = o.prototype.toString, o.prototype.equals = function(g) {
|
|
17731
|
+
if (!o.isBuffer(g)) throw new TypeError("Argument must be a Buffer");
|
|
17732
|
+
return this === g ? !0 : o.compare(this, g) === 0;
|
|
17733
17733
|
}, o.prototype.inspect = function() {
|
|
17734
|
-
var
|
|
17735
|
-
return
|
|
17736
|
-
}, r && (o.prototype[r] = o.prototype.inspect), o.prototype.compare = function(
|
|
17737
|
-
if (Ke(
|
|
17734
|
+
var g = "", y = n.INSPECT_MAX_BYTES;
|
|
17735
|
+
return g = this.toString("hex", 0, y).replace(/(.{2})/g, "$1 ").trim(), this.length > y && (g += " ... "), "<Buffer " + g + ">";
|
|
17736
|
+
}, r && (o.prototype[r] = o.prototype.inspect), o.prototype.compare = function(g, y, C, k, O) {
|
|
17737
|
+
if (Ke(g, Uint8Array) && (g = o.from(g, g.offset, g.byteLength)), !o.isBuffer(g))
|
|
17738
17738
|
throw new TypeError(
|
|
17739
|
-
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof
|
|
17739
|
+
'The "target" argument must be one of type Buffer or Uint8Array. Received type ' + typeof g
|
|
17740
17740
|
);
|
|
17741
|
-
if (y === void 0 && (y = 0), C === void 0 && (C =
|
|
17741
|
+
if (y === void 0 && (y = 0), C === void 0 && (C = g ? g.length : 0), k === void 0 && (k = 0), O === void 0 && (O = this.length), y < 0 || C > g.length || k < 0 || O > this.length)
|
|
17742
17742
|
throw new RangeError("out of range index");
|
|
17743
17743
|
if (k >= O && y >= C)
|
|
17744
17744
|
return 0;
|
|
@@ -17746,15 +17746,15 @@ var P1 = Fc((L) => {
|
|
|
17746
17746
|
return -1;
|
|
17747
17747
|
if (y >= C)
|
|
17748
17748
|
return 1;
|
|
17749
|
-
if (y >>>= 0, C >>>= 0, k >>>= 0, O >>>= 0, this ===
|
|
17750
|
-
for (var R = O - k, J = C - y, te = Math.min(R, J), oe = this.slice(k, O), be =
|
|
17749
|
+
if (y >>>= 0, C >>>= 0, k >>>= 0, O >>>= 0, this === g) return 0;
|
|
17750
|
+
for (var R = O - k, J = C - y, te = Math.min(R, J), oe = this.slice(k, O), be = g.slice(y, C), le = 0; le < te; ++le)
|
|
17751
17751
|
if (oe[le] !== be[le]) {
|
|
17752
17752
|
R = oe[le], J = be[le];
|
|
17753
17753
|
break;
|
|
17754
17754
|
}
|
|
17755
17755
|
return R < J ? -1 : J < R ? 1 : 0;
|
|
17756
17756
|
};
|
|
17757
|
-
function B(F,
|
|
17757
|
+
function B(F, g, y, C, k) {
|
|
17758
17758
|
if (F.length === 0) return -1;
|
|
17759
17759
|
if (typeof y == "string" ? (C = y, y = 0) : y > 2147483647 ? y = 2147483647 : y < -2147483648 && (y = -2147483648), y = +y, fi(y) && (y = k ? 0 : F.length - 1), y < 0 && (y = F.length + y), y >= F.length) {
|
|
17760
17760
|
if (k) return -1;
|
|
@@ -17762,16 +17762,16 @@ var P1 = Fc((L) => {
|
|
|
17762
17762
|
} else if (y < 0)
|
|
17763
17763
|
if (k) y = 0;
|
|
17764
17764
|
else return -1;
|
|
17765
|
-
if (typeof
|
|
17766
|
-
return
|
|
17767
|
-
if (typeof
|
|
17768
|
-
return
|
|
17765
|
+
if (typeof g == "string" && (g = o.from(g, C)), o.isBuffer(g))
|
|
17766
|
+
return g.length === 0 ? -1 : M(F, g, y, C, k);
|
|
17767
|
+
if (typeof g == "number")
|
|
17768
|
+
return g = g & 255, typeof Uint8Array.prototype.indexOf == "function" ? k ? Uint8Array.prototype.indexOf.call(F, g, y) : Uint8Array.prototype.lastIndexOf.call(F, g, y) : M(F, [g], y, C, k);
|
|
17769
17769
|
throw new TypeError("val must be string, number or Buffer");
|
|
17770
17770
|
}
|
|
17771
|
-
function M(F,
|
|
17772
|
-
var O = 1, R = F.length, J =
|
|
17771
|
+
function M(F, g, y, C, k) {
|
|
17772
|
+
var O = 1, R = F.length, J = g.length;
|
|
17773
17773
|
if (C !== void 0 && (C = String(C).toLowerCase(), C === "ucs2" || C === "ucs-2" || C === "utf16le" || C === "utf-16le")) {
|
|
17774
|
-
if (F.length < 2 ||
|
|
17774
|
+
if (F.length < 2 || g.length < 2)
|
|
17775
17775
|
return -1;
|
|
17776
17776
|
O = 2, R /= 2, J /= 2, y /= 2;
|
|
17777
17777
|
}
|
|
@@ -17782,14 +17782,14 @@ var P1 = Fc((L) => {
|
|
|
17782
17782
|
if (k) {
|
|
17783
17783
|
var be = -1;
|
|
17784
17784
|
for (oe = y; oe < R; oe++)
|
|
17785
|
-
if (te(F, oe) === te(
|
|
17785
|
+
if (te(F, oe) === te(g, be === -1 ? 0 : oe - be)) {
|
|
17786
17786
|
if (be === -1 && (be = oe), oe - be + 1 === J) return be * O;
|
|
17787
17787
|
} else
|
|
17788
17788
|
be !== -1 && (oe -= oe - be), be = -1;
|
|
17789
17789
|
} else
|
|
17790
17790
|
for (y + J > R && (y = R - J), oe = y; oe >= 0; oe--) {
|
|
17791
17791
|
for (var le = !0, ln = 0; ln < J; ln++)
|
|
17792
|
-
if (te(F, oe + ln) !== te(
|
|
17792
|
+
if (te(F, oe + ln) !== te(g, ln)) {
|
|
17793
17793
|
le = !1;
|
|
17794
17794
|
break;
|
|
17795
17795
|
}
|
|
@@ -17797,39 +17797,39 @@ var P1 = Fc((L) => {
|
|
|
17797
17797
|
}
|
|
17798
17798
|
return -1;
|
|
17799
17799
|
}
|
|
17800
|
-
o.prototype.includes = function(
|
|
17801
|
-
return this.indexOf(
|
|
17802
|
-
}, o.prototype.indexOf = function(
|
|
17803
|
-
return B(this,
|
|
17804
|
-
}, o.prototype.lastIndexOf = function(
|
|
17805
|
-
return B(this,
|
|
17800
|
+
o.prototype.includes = function(g, y, C) {
|
|
17801
|
+
return this.indexOf(g, y, C) !== -1;
|
|
17802
|
+
}, o.prototype.indexOf = function(g, y, C) {
|
|
17803
|
+
return B(this, g, y, C, !0);
|
|
17804
|
+
}, o.prototype.lastIndexOf = function(g, y, C) {
|
|
17805
|
+
return B(this, g, y, C, !1);
|
|
17806
17806
|
};
|
|
17807
|
-
function _(F,
|
|
17807
|
+
function _(F, g, y, C) {
|
|
17808
17808
|
y = Number(y) || 0;
|
|
17809
17809
|
var k = F.length - y;
|
|
17810
17810
|
C ? (C = Number(C), C > k && (C = k)) : C = k;
|
|
17811
|
-
var O =
|
|
17811
|
+
var O = g.length;
|
|
17812
17812
|
C > O / 2 && (C = O / 2);
|
|
17813
17813
|
for (var R = 0; R < C; ++R) {
|
|
17814
|
-
var J = parseInt(
|
|
17814
|
+
var J = parseInt(g.substr(R * 2, 2), 16);
|
|
17815
17815
|
if (fi(J)) return R;
|
|
17816
17816
|
F[y + R] = J;
|
|
17817
17817
|
}
|
|
17818
17818
|
return R;
|
|
17819
17819
|
}
|
|
17820
|
-
function D(F,
|
|
17821
|
-
return un(xt(
|
|
17820
|
+
function D(F, g, y, C) {
|
|
17821
|
+
return un(xt(g, F.length - y), F, y, C);
|
|
17822
17822
|
}
|
|
17823
|
-
function N(F,
|
|
17824
|
-
return un(bc(
|
|
17823
|
+
function N(F, g, y, C) {
|
|
17824
|
+
return un(bc(g), F, y, C);
|
|
17825
17825
|
}
|
|
17826
|
-
function G(F,
|
|
17827
|
-
return un(Qs(
|
|
17826
|
+
function G(F, g, y, C) {
|
|
17827
|
+
return un(Qs(g), F, y, C);
|
|
17828
17828
|
}
|
|
17829
|
-
function ee(F,
|
|
17830
|
-
return un(wc(
|
|
17829
|
+
function ee(F, g, y, C) {
|
|
17830
|
+
return un(wc(g, F.length - y), F, y, C);
|
|
17831
17831
|
}
|
|
17832
|
-
o.prototype.write = function(
|
|
17832
|
+
o.prototype.write = function(g, y, C, k) {
|
|
17833
17833
|
if (y === void 0)
|
|
17834
17834
|
k = "utf8", C = this.length, y = 0;
|
|
17835
17835
|
else if (C === void 0 && typeof y == "string")
|
|
@@ -17841,27 +17841,27 @@ var P1 = Fc((L) => {
|
|
|
17841
17841
|
"Buffer.write(string, encoding, offset[, length]) is no longer supported"
|
|
17842
17842
|
);
|
|
17843
17843
|
var O = this.length - y;
|
|
17844
|
-
if ((C === void 0 || C > O) && (C = O),
|
|
17844
|
+
if ((C === void 0 || C > O) && (C = O), g.length > 0 && (C < 0 || y < 0) || y > this.length)
|
|
17845
17845
|
throw new RangeError("Attempt to write outside buffer bounds");
|
|
17846
17846
|
k || (k = "utf8");
|
|
17847
17847
|
for (var R = !1; ; )
|
|
17848
17848
|
switch (k) {
|
|
17849
17849
|
case "hex":
|
|
17850
|
-
return _(this,
|
|
17850
|
+
return _(this, g, y, C);
|
|
17851
17851
|
case "utf8":
|
|
17852
17852
|
case "utf-8":
|
|
17853
|
-
return D(this,
|
|
17853
|
+
return D(this, g, y, C);
|
|
17854
17854
|
case "ascii":
|
|
17855
17855
|
case "latin1":
|
|
17856
17856
|
case "binary":
|
|
17857
|
-
return N(this,
|
|
17857
|
+
return N(this, g, y, C);
|
|
17858
17858
|
case "base64":
|
|
17859
|
-
return G(this,
|
|
17859
|
+
return G(this, g, y, C);
|
|
17860
17860
|
case "ucs2":
|
|
17861
17861
|
case "ucs-2":
|
|
17862
17862
|
case "utf16le":
|
|
17863
17863
|
case "utf-16le":
|
|
17864
|
-
return ee(this,
|
|
17864
|
+
return ee(this, g, y, C);
|
|
17865
17865
|
default:
|
|
17866
17866
|
if (R) throw new TypeError("Unknown encoding: " + k);
|
|
17867
17867
|
k = ("" + k).toLowerCase(), R = !0;
|
|
@@ -17872,12 +17872,12 @@ var P1 = Fc((L) => {
|
|
|
17872
17872
|
data: Array.prototype.slice.call(this._arr || this, 0)
|
|
17873
17873
|
};
|
|
17874
17874
|
};
|
|
17875
|
-
function Y(F,
|
|
17876
|
-
return
|
|
17875
|
+
function Y(F, g, y) {
|
|
17876
|
+
return g === 0 && y === F.length ? e.fromByteArray(F) : e.fromByteArray(F.slice(g, y));
|
|
17877
17877
|
}
|
|
17878
|
-
function Z(F,
|
|
17878
|
+
function Z(F, g, y) {
|
|
17879
17879
|
y = Math.min(F.length, y);
|
|
17880
|
-
for (var C = [], k =
|
|
17880
|
+
for (var C = [], k = g; k < y; ) {
|
|
17881
17881
|
var O = F[k], R = null, J = O > 239 ? 4 : O > 223 ? 3 : O > 191 ? 2 : 1;
|
|
17882
17882
|
if (k + J <= y) {
|
|
17883
17883
|
var te, oe, be, le;
|
|
@@ -17901,224 +17901,224 @@ var P1 = Fc((L) => {
|
|
|
17901
17901
|
}
|
|
17902
17902
|
var Q = 4096;
|
|
17903
17903
|
function K(F) {
|
|
17904
|
-
var
|
|
17905
|
-
if (
|
|
17904
|
+
var g = F.length;
|
|
17905
|
+
if (g <= Q)
|
|
17906
17906
|
return String.fromCharCode.apply(String, F);
|
|
17907
|
-
for (var y = "", C = 0; C <
|
|
17907
|
+
for (var y = "", C = 0; C < g; )
|
|
17908
17908
|
y += String.fromCharCode.apply(
|
|
17909
17909
|
String,
|
|
17910
17910
|
F.slice(C, C += Q)
|
|
17911
17911
|
);
|
|
17912
17912
|
return y;
|
|
17913
17913
|
}
|
|
17914
|
-
function ne(F,
|
|
17914
|
+
function ne(F, g, y) {
|
|
17915
17915
|
var C = "";
|
|
17916
17916
|
y = Math.min(F.length, y);
|
|
17917
|
-
for (var k =
|
|
17917
|
+
for (var k = g; k < y; ++k)
|
|
17918
17918
|
C += String.fromCharCode(F[k] & 127);
|
|
17919
17919
|
return C;
|
|
17920
17920
|
}
|
|
17921
|
-
function ae(F,
|
|
17921
|
+
function ae(F, g, y) {
|
|
17922
17922
|
var C = "";
|
|
17923
17923
|
y = Math.min(F.length, y);
|
|
17924
|
-
for (var k =
|
|
17924
|
+
for (var k = g; k < y; ++k)
|
|
17925
17925
|
C += String.fromCharCode(F[k]);
|
|
17926
17926
|
return C;
|
|
17927
17927
|
}
|
|
17928
|
-
function ie(F,
|
|
17928
|
+
function ie(F, g, y) {
|
|
17929
17929
|
var C = F.length;
|
|
17930
|
-
(!
|
|
17931
|
-
for (var k = "", O =
|
|
17930
|
+
(!g || g < 0) && (g = 0), (!y || y < 0 || y > C) && (y = C);
|
|
17931
|
+
for (var k = "", O = g; O < y; ++O)
|
|
17932
17932
|
k += Sc[F[O]];
|
|
17933
17933
|
return k;
|
|
17934
17934
|
}
|
|
17935
|
-
function he(F,
|
|
17936
|
-
for (var C = F.slice(
|
|
17935
|
+
function he(F, g, y) {
|
|
17936
|
+
for (var C = F.slice(g, y), k = "", O = 0; O < C.length - 1; O += 2)
|
|
17937
17937
|
k += String.fromCharCode(C[O] + C[O + 1] * 256);
|
|
17938
17938
|
return k;
|
|
17939
17939
|
}
|
|
17940
|
-
o.prototype.slice = function(
|
|
17940
|
+
o.prototype.slice = function(g, y) {
|
|
17941
17941
|
var C = this.length;
|
|
17942
|
-
|
|
17943
|
-
var k = this.subarray(
|
|
17942
|
+
g = ~~g, y = y === void 0 ? C : ~~y, g < 0 ? (g += C, g < 0 && (g = 0)) : g > C && (g = C), y < 0 ? (y += C, y < 0 && (y = 0)) : y > C && (y = C), y < g && (y = g);
|
|
17943
|
+
var k = this.subarray(g, y);
|
|
17944
17944
|
return Object.setPrototypeOf(k, o.prototype), k;
|
|
17945
17945
|
};
|
|
17946
|
-
function W(F,
|
|
17946
|
+
function W(F, g, y) {
|
|
17947
17947
|
if (F % 1 !== 0 || F < 0) throw new RangeError("offset is not uint");
|
|
17948
|
-
if (F +
|
|
17948
|
+
if (F + g > y) throw new RangeError("Trying to access beyond buffer length");
|
|
17949
17949
|
}
|
|
17950
|
-
o.prototype.readUintLE = o.prototype.readUIntLE = function(
|
|
17951
|
-
|
|
17952
|
-
for (var k = this[
|
|
17953
|
-
k += this[
|
|
17950
|
+
o.prototype.readUintLE = o.prototype.readUIntLE = function(g, y, C) {
|
|
17951
|
+
g = g >>> 0, y = y >>> 0, C || W(g, y, this.length);
|
|
17952
|
+
for (var k = this[g], O = 1, R = 0; ++R < y && (O *= 256); )
|
|
17953
|
+
k += this[g + R] * O;
|
|
17954
17954
|
return k;
|
|
17955
|
-
}, o.prototype.readUintBE = o.prototype.readUIntBE = function(
|
|
17956
|
-
|
|
17957
|
-
for (var k = this[
|
|
17958
|
-
k += this[
|
|
17955
|
+
}, o.prototype.readUintBE = o.prototype.readUIntBE = function(g, y, C) {
|
|
17956
|
+
g = g >>> 0, y = y >>> 0, C || W(g, y, this.length);
|
|
17957
|
+
for (var k = this[g + --y], O = 1; y > 0 && (O *= 256); )
|
|
17958
|
+
k += this[g + --y] * O;
|
|
17959
17959
|
return k;
|
|
17960
|
-
}, o.prototype.readUint8 = o.prototype.readUInt8 = function(
|
|
17961
|
-
return
|
|
17962
|
-
}, o.prototype.readUint16LE = o.prototype.readUInt16LE = function(
|
|
17963
|
-
return
|
|
17964
|
-
}, o.prototype.readUint16BE = o.prototype.readUInt16BE = function(
|
|
17965
|
-
return
|
|
17966
|
-
}, o.prototype.readUint32LE = o.prototype.readUInt32LE = function(
|
|
17967
|
-
return
|
|
17968
|
-
}, o.prototype.readUint32BE = o.prototype.readUInt32BE = function(
|
|
17969
|
-
return
|
|
17970
|
-
}, o.prototype.readIntLE = function(
|
|
17971
|
-
|
|
17972
|
-
for (var k = this[
|
|
17973
|
-
k += this[
|
|
17960
|
+
}, o.prototype.readUint8 = o.prototype.readUInt8 = function(g, y) {
|
|
17961
|
+
return g = g >>> 0, y || W(g, 1, this.length), this[g];
|
|
17962
|
+
}, o.prototype.readUint16LE = o.prototype.readUInt16LE = function(g, y) {
|
|
17963
|
+
return g = g >>> 0, y || W(g, 2, this.length), this[g] | this[g + 1] << 8;
|
|
17964
|
+
}, o.prototype.readUint16BE = o.prototype.readUInt16BE = function(g, y) {
|
|
17965
|
+
return g = g >>> 0, y || W(g, 2, this.length), this[g] << 8 | this[g + 1];
|
|
17966
|
+
}, o.prototype.readUint32LE = o.prototype.readUInt32LE = function(g, y) {
|
|
17967
|
+
return g = g >>> 0, y || W(g, 4, this.length), (this[g] | this[g + 1] << 8 | this[g + 2] << 16) + this[g + 3] * 16777216;
|
|
17968
|
+
}, o.prototype.readUint32BE = o.prototype.readUInt32BE = function(g, y) {
|
|
17969
|
+
return g = g >>> 0, y || W(g, 4, this.length), this[g] * 16777216 + (this[g + 1] << 16 | this[g + 2] << 8 | this[g + 3]);
|
|
17970
|
+
}, o.prototype.readIntLE = function(g, y, C) {
|
|
17971
|
+
g = g >>> 0, y = y >>> 0, C || W(g, y, this.length);
|
|
17972
|
+
for (var k = this[g], O = 1, R = 0; ++R < y && (O *= 256); )
|
|
17973
|
+
k += this[g + R] * O;
|
|
17974
17974
|
return O *= 128, k >= O && (k -= Math.pow(2, 8 * y)), k;
|
|
17975
|
-
}, o.prototype.readIntBE = function(
|
|
17976
|
-
|
|
17977
|
-
for (var k = y, O = 1, R = this[
|
|
17978
|
-
R += this[
|
|
17975
|
+
}, o.prototype.readIntBE = function(g, y, C) {
|
|
17976
|
+
g = g >>> 0, y = y >>> 0, C || W(g, y, this.length);
|
|
17977
|
+
for (var k = y, O = 1, R = this[g + --k]; k > 0 && (O *= 256); )
|
|
17978
|
+
R += this[g + --k] * O;
|
|
17979
17979
|
return O *= 128, R >= O && (R -= Math.pow(2, 8 * y)), R;
|
|
17980
|
-
}, o.prototype.readInt8 = function(
|
|
17981
|
-
return
|
|
17982
|
-
}, o.prototype.readInt16LE = function(
|
|
17983
|
-
|
|
17984
|
-
var C = this[
|
|
17980
|
+
}, o.prototype.readInt8 = function(g, y) {
|
|
17981
|
+
return g = g >>> 0, y || W(g, 1, this.length), this[g] & 128 ? (255 - this[g] + 1) * -1 : this[g];
|
|
17982
|
+
}, o.prototype.readInt16LE = function(g, y) {
|
|
17983
|
+
g = g >>> 0, y || W(g, 2, this.length);
|
|
17984
|
+
var C = this[g] | this[g + 1] << 8;
|
|
17985
17985
|
return C & 32768 ? C | 4294901760 : C;
|
|
17986
|
-
}, o.prototype.readInt16BE = function(
|
|
17987
|
-
|
|
17988
|
-
var C = this[
|
|
17986
|
+
}, o.prototype.readInt16BE = function(g, y) {
|
|
17987
|
+
g = g >>> 0, y || W(g, 2, this.length);
|
|
17988
|
+
var C = this[g + 1] | this[g] << 8;
|
|
17989
17989
|
return C & 32768 ? C | 4294901760 : C;
|
|
17990
|
-
}, o.prototype.readInt32LE = function(
|
|
17991
|
-
return
|
|
17992
|
-
}, o.prototype.readInt32BE = function(
|
|
17993
|
-
return
|
|
17994
|
-
}, o.prototype.readFloatLE = function(
|
|
17995
|
-
return
|
|
17996
|
-
}, o.prototype.readFloatBE = function(
|
|
17997
|
-
return
|
|
17998
|
-
}, o.prototype.readDoubleLE = function(
|
|
17999
|
-
return
|
|
18000
|
-
}, o.prototype.readDoubleBE = function(
|
|
18001
|
-
return
|
|
17990
|
+
}, o.prototype.readInt32LE = function(g, y) {
|
|
17991
|
+
return g = g >>> 0, y || W(g, 4, this.length), this[g] | this[g + 1] << 8 | this[g + 2] << 16 | this[g + 3] << 24;
|
|
17992
|
+
}, o.prototype.readInt32BE = function(g, y) {
|
|
17993
|
+
return g = g >>> 0, y || W(g, 4, this.length), this[g] << 24 | this[g + 1] << 16 | this[g + 2] << 8 | this[g + 3];
|
|
17994
|
+
}, o.prototype.readFloatLE = function(g, y) {
|
|
17995
|
+
return g = g >>> 0, y || W(g, 4, this.length), t.read(this, g, !0, 23, 4);
|
|
17996
|
+
}, o.prototype.readFloatBE = function(g, y) {
|
|
17997
|
+
return g = g >>> 0, y || W(g, 4, this.length), t.read(this, g, !1, 23, 4);
|
|
17998
|
+
}, o.prototype.readDoubleLE = function(g, y) {
|
|
17999
|
+
return g = g >>> 0, y || W(g, 8, this.length), t.read(this, g, !0, 52, 8);
|
|
18000
|
+
}, o.prototype.readDoubleBE = function(g, y) {
|
|
18001
|
+
return g = g >>> 0, y || W(g, 8, this.length), t.read(this, g, !1, 52, 8);
|
|
18002
18002
|
};
|
|
18003
|
-
function $(F,
|
|
18003
|
+
function $(F, g, y, C, k, O) {
|
|
18004
18004
|
if (!o.isBuffer(F)) throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
18005
|
-
if (
|
|
18005
|
+
if (g > k || g < O) throw new RangeError('"value" argument is out of bounds');
|
|
18006
18006
|
if (y + C > F.length) throw new RangeError("Index out of range");
|
|
18007
18007
|
}
|
|
18008
|
-
o.prototype.writeUintLE = o.prototype.writeUIntLE = function(
|
|
18009
|
-
if (
|
|
18008
|
+
o.prototype.writeUintLE = o.prototype.writeUIntLE = function(g, y, C, k) {
|
|
18009
|
+
if (g = +g, y = y >>> 0, C = C >>> 0, !k) {
|
|
18010
18010
|
var O = Math.pow(2, 8 * C) - 1;
|
|
18011
|
-
$(this,
|
|
18011
|
+
$(this, g, y, C, O, 0);
|
|
18012
18012
|
}
|
|
18013
18013
|
var R = 1, J = 0;
|
|
18014
|
-
for (this[y] =
|
|
18015
|
-
this[y + J] =
|
|
18014
|
+
for (this[y] = g & 255; ++J < C && (R *= 256); )
|
|
18015
|
+
this[y + J] = g / R & 255;
|
|
18016
18016
|
return y + C;
|
|
18017
|
-
}, o.prototype.writeUintBE = o.prototype.writeUIntBE = function(
|
|
18018
|
-
if (
|
|
18017
|
+
}, o.prototype.writeUintBE = o.prototype.writeUIntBE = function(g, y, C, k) {
|
|
18018
|
+
if (g = +g, y = y >>> 0, C = C >>> 0, !k) {
|
|
18019
18019
|
var O = Math.pow(2, 8 * C) - 1;
|
|
18020
|
-
$(this,
|
|
18020
|
+
$(this, g, y, C, O, 0);
|
|
18021
18021
|
}
|
|
18022
18022
|
var R = C - 1, J = 1;
|
|
18023
|
-
for (this[y + R] =
|
|
18024
|
-
this[y + R] =
|
|
18023
|
+
for (this[y + R] = g & 255; --R >= 0 && (J *= 256); )
|
|
18024
|
+
this[y + R] = g / J & 255;
|
|
18025
18025
|
return y + C;
|
|
18026
|
-
}, o.prototype.writeUint8 = o.prototype.writeUInt8 = function(
|
|
18027
|
-
return
|
|
18028
|
-
}, o.prototype.writeUint16LE = o.prototype.writeUInt16LE = function(
|
|
18029
|
-
return
|
|
18030
|
-
}, o.prototype.writeUint16BE = o.prototype.writeUInt16BE = function(
|
|
18031
|
-
return
|
|
18032
|
-
}, o.prototype.writeUint32LE = o.prototype.writeUInt32LE = function(
|
|
18033
|
-
return
|
|
18034
|
-
}, o.prototype.writeUint32BE = o.prototype.writeUInt32BE = function(
|
|
18035
|
-
return
|
|
18036
|
-
}, o.prototype.writeIntLE = function(
|
|
18037
|
-
if (
|
|
18026
|
+
}, o.prototype.writeUint8 = o.prototype.writeUInt8 = function(g, y, C) {
|
|
18027
|
+
return g = +g, y = y >>> 0, C || $(this, g, y, 1, 255, 0), this[y] = g & 255, y + 1;
|
|
18028
|
+
}, o.prototype.writeUint16LE = o.prototype.writeUInt16LE = function(g, y, C) {
|
|
18029
|
+
return g = +g, y = y >>> 0, C || $(this, g, y, 2, 65535, 0), this[y] = g & 255, this[y + 1] = g >>> 8, y + 2;
|
|
18030
|
+
}, o.prototype.writeUint16BE = o.prototype.writeUInt16BE = function(g, y, C) {
|
|
18031
|
+
return g = +g, y = y >>> 0, C || $(this, g, y, 2, 65535, 0), this[y] = g >>> 8, this[y + 1] = g & 255, y + 2;
|
|
18032
|
+
}, o.prototype.writeUint32LE = o.prototype.writeUInt32LE = function(g, y, C) {
|
|
18033
|
+
return g = +g, y = y >>> 0, C || $(this, g, y, 4, 4294967295, 0), this[y + 3] = g >>> 24, this[y + 2] = g >>> 16, this[y + 1] = g >>> 8, this[y] = g & 255, y + 4;
|
|
18034
|
+
}, o.prototype.writeUint32BE = o.prototype.writeUInt32BE = function(g, y, C) {
|
|
18035
|
+
return g = +g, y = y >>> 0, C || $(this, g, y, 4, 4294967295, 0), this[y] = g >>> 24, this[y + 1] = g >>> 16, this[y + 2] = g >>> 8, this[y + 3] = g & 255, y + 4;
|
|
18036
|
+
}, o.prototype.writeIntLE = function(g, y, C, k) {
|
|
18037
|
+
if (g = +g, y = y >>> 0, !k) {
|
|
18038
18038
|
var O = Math.pow(2, 8 * C - 1);
|
|
18039
|
-
$(this,
|
|
18039
|
+
$(this, g, y, C, O - 1, -O);
|
|
18040
18040
|
}
|
|
18041
18041
|
var R = 0, J = 1, te = 0;
|
|
18042
|
-
for (this[y] =
|
|
18043
|
-
|
|
18042
|
+
for (this[y] = g & 255; ++R < C && (J *= 256); )
|
|
18043
|
+
g < 0 && te === 0 && this[y + R - 1] !== 0 && (te = 1), this[y + R] = (g / J >> 0) - te & 255;
|
|
18044
18044
|
return y + C;
|
|
18045
|
-
}, o.prototype.writeIntBE = function(
|
|
18046
|
-
if (
|
|
18045
|
+
}, o.prototype.writeIntBE = function(g, y, C, k) {
|
|
18046
|
+
if (g = +g, y = y >>> 0, !k) {
|
|
18047
18047
|
var O = Math.pow(2, 8 * C - 1);
|
|
18048
|
-
$(this,
|
|
18048
|
+
$(this, g, y, C, O - 1, -O);
|
|
18049
18049
|
}
|
|
18050
18050
|
var R = C - 1, J = 1, te = 0;
|
|
18051
|
-
for (this[y + R] =
|
|
18052
|
-
|
|
18051
|
+
for (this[y + R] = g & 255; --R >= 0 && (J *= 256); )
|
|
18052
|
+
g < 0 && te === 0 && this[y + R + 1] !== 0 && (te = 1), this[y + R] = (g / J >> 0) - te & 255;
|
|
18053
18053
|
return y + C;
|
|
18054
|
-
}, o.prototype.writeInt8 = function(
|
|
18055
|
-
return
|
|
18056
|
-
}, o.prototype.writeInt16LE = function(
|
|
18057
|
-
return
|
|
18058
|
-
}, o.prototype.writeInt16BE = function(
|
|
18059
|
-
return
|
|
18060
|
-
}, o.prototype.writeInt32LE = function(
|
|
18061
|
-
return
|
|
18062
|
-
}, o.prototype.writeInt32BE = function(
|
|
18063
|
-
return
|
|
18054
|
+
}, o.prototype.writeInt8 = function(g, y, C) {
|
|
18055
|
+
return g = +g, y = y >>> 0, C || $(this, g, y, 1, 127, -128), g < 0 && (g = 255 + g + 1), this[y] = g & 255, y + 1;
|
|
18056
|
+
}, o.prototype.writeInt16LE = function(g, y, C) {
|
|
18057
|
+
return g = +g, y = y >>> 0, C || $(this, g, y, 2, 32767, -32768), this[y] = g & 255, this[y + 1] = g >>> 8, y + 2;
|
|
18058
|
+
}, o.prototype.writeInt16BE = function(g, y, C) {
|
|
18059
|
+
return g = +g, y = y >>> 0, C || $(this, g, y, 2, 32767, -32768), this[y] = g >>> 8, this[y + 1] = g & 255, y + 2;
|
|
18060
|
+
}, o.prototype.writeInt32LE = function(g, y, C) {
|
|
18061
|
+
return g = +g, y = y >>> 0, C || $(this, g, y, 4, 2147483647, -2147483648), this[y] = g & 255, this[y + 1] = g >>> 8, this[y + 2] = g >>> 16, this[y + 3] = g >>> 24, y + 4;
|
|
18062
|
+
}, o.prototype.writeInt32BE = function(g, y, C) {
|
|
18063
|
+
return g = +g, y = y >>> 0, C || $(this, g, y, 4, 2147483647, -2147483648), g < 0 && (g = 4294967295 + g + 1), this[y] = g >>> 24, this[y + 1] = g >>> 16, this[y + 2] = g >>> 8, this[y + 3] = g & 255, y + 4;
|
|
18064
18064
|
};
|
|
18065
|
-
function er(F,
|
|
18065
|
+
function er(F, g, y, C, k, O) {
|
|
18066
18066
|
if (y + C > F.length) throw new RangeError("Index out of range");
|
|
18067
18067
|
if (y < 0) throw new RangeError("Index out of range");
|
|
18068
18068
|
}
|
|
18069
|
-
function on(F,
|
|
18070
|
-
return
|
|
18069
|
+
function on(F, g, y, C, k) {
|
|
18070
|
+
return g = +g, y = y >>> 0, k || er(F, g, y, 4), t.write(F, g, y, C, 23, 4), y + 4;
|
|
18071
18071
|
}
|
|
18072
|
-
o.prototype.writeFloatLE = function(
|
|
18073
|
-
return on(this,
|
|
18074
|
-
}, o.prototype.writeFloatBE = function(
|
|
18075
|
-
return on(this,
|
|
18072
|
+
o.prototype.writeFloatLE = function(g, y, C) {
|
|
18073
|
+
return on(this, g, y, !0, C);
|
|
18074
|
+
}, o.prototype.writeFloatBE = function(g, y, C) {
|
|
18075
|
+
return on(this, g, y, !1, C);
|
|
18076
18076
|
};
|
|
18077
|
-
function hn(F,
|
|
18078
|
-
return
|
|
18079
|
-
}
|
|
18080
|
-
o.prototype.writeDoubleLE = function(
|
|
18081
|
-
return hn(this,
|
|
18082
|
-
}, o.prototype.writeDoubleBE = function(
|
|
18083
|
-
return hn(this,
|
|
18084
|
-
}, o.prototype.copy = function(
|
|
18085
|
-
if (!o.isBuffer(
|
|
18086
|
-
if (C || (C = 0), !k && k !== 0 && (k = this.length), y >=
|
|
18077
|
+
function hn(F, g, y, C, k) {
|
|
18078
|
+
return g = +g, y = y >>> 0, k || er(F, g, y, 8), t.write(F, g, y, C, 52, 8), y + 8;
|
|
18079
|
+
}
|
|
18080
|
+
o.prototype.writeDoubleLE = function(g, y, C) {
|
|
18081
|
+
return hn(this, g, y, !0, C);
|
|
18082
|
+
}, o.prototype.writeDoubleBE = function(g, y, C) {
|
|
18083
|
+
return hn(this, g, y, !1, C);
|
|
18084
|
+
}, o.prototype.copy = function(g, y, C, k) {
|
|
18085
|
+
if (!o.isBuffer(g)) throw new TypeError("argument should be a Buffer");
|
|
18086
|
+
if (C || (C = 0), !k && k !== 0 && (k = this.length), y >= g.length && (y = g.length), y || (y = 0), k > 0 && k < C && (k = C), k === C || g.length === 0 || this.length === 0) return 0;
|
|
18087
18087
|
if (y < 0)
|
|
18088
18088
|
throw new RangeError("targetStart out of bounds");
|
|
18089
18089
|
if (C < 0 || C >= this.length) throw new RangeError("Index out of range");
|
|
18090
18090
|
if (k < 0) throw new RangeError("sourceEnd out of bounds");
|
|
18091
|
-
k > this.length && (k = this.length),
|
|
18091
|
+
k > this.length && (k = this.length), g.length - y < k - C && (k = g.length - y + C);
|
|
18092
18092
|
var O = k - C;
|
|
18093
|
-
return this ===
|
|
18094
|
-
|
|
18093
|
+
return this === g && typeof Uint8Array.prototype.copyWithin == "function" ? this.copyWithin(y, C, k) : Uint8Array.prototype.set.call(
|
|
18094
|
+
g,
|
|
18095
18095
|
this.subarray(C, k),
|
|
18096
18096
|
y
|
|
18097
18097
|
), O;
|
|
18098
|
-
}, o.prototype.fill = function(
|
|
18099
|
-
if (typeof
|
|
18098
|
+
}, o.prototype.fill = function(g, y, C, k) {
|
|
18099
|
+
if (typeof g == "string") {
|
|
18100
18100
|
if (typeof y == "string" ? (k = y, y = 0, C = this.length) : typeof C == "string" && (k = C, C = this.length), k !== void 0 && typeof k != "string")
|
|
18101
18101
|
throw new TypeError("encoding must be a string");
|
|
18102
18102
|
if (typeof k == "string" && !o.isEncoding(k))
|
|
18103
18103
|
throw new TypeError("Unknown encoding: " + k);
|
|
18104
|
-
if (
|
|
18105
|
-
var O =
|
|
18106
|
-
(k === "utf8" && O < 128 || k === "latin1") && (
|
|
18104
|
+
if (g.length === 1) {
|
|
18105
|
+
var O = g.charCodeAt(0);
|
|
18106
|
+
(k === "utf8" && O < 128 || k === "latin1") && (g = O);
|
|
18107
18107
|
}
|
|
18108
|
-
} else typeof
|
|
18108
|
+
} else typeof g == "number" ? g = g & 255 : typeof g == "boolean" && (g = Number(g));
|
|
18109
18109
|
if (y < 0 || this.length < y || this.length < C)
|
|
18110
18110
|
throw new RangeError("Out of range index");
|
|
18111
18111
|
if (C <= y)
|
|
18112
18112
|
return this;
|
|
18113
|
-
y = y >>> 0, C = C === void 0 ? this.length : C >>> 0,
|
|
18113
|
+
y = y >>> 0, C = C === void 0 ? this.length : C >>> 0, g || (g = 0);
|
|
18114
18114
|
var R;
|
|
18115
|
-
if (typeof
|
|
18115
|
+
if (typeof g == "number")
|
|
18116
18116
|
for (R = y; R < C; ++R)
|
|
18117
|
-
this[R] =
|
|
18117
|
+
this[R] = g;
|
|
18118
18118
|
else {
|
|
18119
|
-
var J = o.isBuffer(
|
|
18119
|
+
var J = o.isBuffer(g) ? g : o.from(g, k), te = J.length;
|
|
18120
18120
|
if (te === 0)
|
|
18121
|
-
throw new TypeError('The value "' +
|
|
18121
|
+
throw new TypeError('The value "' + g + '" is invalid for argument "value"');
|
|
18122
18122
|
for (R = 0; R < C - y; ++R)
|
|
18123
18123
|
this[R + y] = J[R % te];
|
|
18124
18124
|
}
|
|
@@ -18131,45 +18131,45 @@ var P1 = Fc((L) => {
|
|
|
18131
18131
|
F = F + "=";
|
|
18132
18132
|
return F;
|
|
18133
18133
|
}
|
|
18134
|
-
function xt(F,
|
|
18135
|
-
|
|
18134
|
+
function xt(F, g) {
|
|
18135
|
+
g = g || 1 / 0;
|
|
18136
18136
|
for (var y, C = F.length, k = null, O = [], R = 0; R < C; ++R) {
|
|
18137
18137
|
if (y = F.charCodeAt(R), y > 55295 && y < 57344) {
|
|
18138
18138
|
if (!k) {
|
|
18139
18139
|
if (y > 56319) {
|
|
18140
|
-
(
|
|
18140
|
+
(g -= 3) > -1 && O.push(239, 191, 189);
|
|
18141
18141
|
continue;
|
|
18142
18142
|
} else if (R + 1 === C) {
|
|
18143
|
-
(
|
|
18143
|
+
(g -= 3) > -1 && O.push(239, 191, 189);
|
|
18144
18144
|
continue;
|
|
18145
18145
|
}
|
|
18146
18146
|
k = y;
|
|
18147
18147
|
continue;
|
|
18148
18148
|
}
|
|
18149
18149
|
if (y < 56320) {
|
|
18150
|
-
(
|
|
18150
|
+
(g -= 3) > -1 && O.push(239, 191, 189), k = y;
|
|
18151
18151
|
continue;
|
|
18152
18152
|
}
|
|
18153
18153
|
y = (k - 55296 << 10 | y - 56320) + 65536;
|
|
18154
|
-
} else k && (
|
|
18154
|
+
} else k && (g -= 3) > -1 && O.push(239, 191, 189);
|
|
18155
18155
|
if (k = null, y < 128) {
|
|
18156
|
-
if ((
|
|
18156
|
+
if ((g -= 1) < 0) break;
|
|
18157
18157
|
O.push(y);
|
|
18158
18158
|
} else if (y < 2048) {
|
|
18159
|
-
if ((
|
|
18159
|
+
if ((g -= 2) < 0) break;
|
|
18160
18160
|
O.push(
|
|
18161
18161
|
y >> 6 | 192,
|
|
18162
18162
|
y & 63 | 128
|
|
18163
18163
|
);
|
|
18164
18164
|
} else if (y < 65536) {
|
|
18165
|
-
if ((
|
|
18165
|
+
if ((g -= 3) < 0) break;
|
|
18166
18166
|
O.push(
|
|
18167
18167
|
y >> 12 | 224,
|
|
18168
18168
|
y >> 6 & 63 | 128,
|
|
18169
18169
|
y & 63 | 128
|
|
18170
18170
|
);
|
|
18171
18171
|
} else if (y < 1114112) {
|
|
18172
|
-
if ((
|
|
18172
|
+
if ((g -= 4) < 0) break;
|
|
18173
18173
|
O.push(
|
|
18174
18174
|
y >> 18 | 240,
|
|
18175
18175
|
y >> 12 & 63 | 128,
|
|
@@ -18182,34 +18182,34 @@ var P1 = Fc((L) => {
|
|
|
18182
18182
|
return O;
|
|
18183
18183
|
}
|
|
18184
18184
|
function bc(F) {
|
|
18185
|
-
for (var
|
|
18186
|
-
|
|
18187
|
-
return
|
|
18185
|
+
for (var g = [], y = 0; y < F.length; ++y)
|
|
18186
|
+
g.push(F.charCodeAt(y) & 255);
|
|
18187
|
+
return g;
|
|
18188
18188
|
}
|
|
18189
|
-
function wc(F,
|
|
18190
|
-
for (var y, C, k, O = [], R = 0; R < F.length && !((
|
|
18189
|
+
function wc(F, g) {
|
|
18190
|
+
for (var y, C, k, O = [], R = 0; R < F.length && !((g -= 2) < 0); ++R)
|
|
18191
18191
|
y = F.charCodeAt(R), C = y >> 8, k = y % 256, O.push(k), O.push(C);
|
|
18192
18192
|
return O;
|
|
18193
18193
|
}
|
|
18194
18194
|
function Qs(F) {
|
|
18195
18195
|
return e.toByteArray(cn(F));
|
|
18196
18196
|
}
|
|
18197
|
-
function un(F,
|
|
18198
|
-
for (var k = 0; k < C && !(k + y >=
|
|
18199
|
-
|
|
18197
|
+
function un(F, g, y, C) {
|
|
18198
|
+
for (var k = 0; k < C && !(k + y >= g.length || k >= F.length); ++k)
|
|
18199
|
+
g[k + y] = F[k];
|
|
18200
18200
|
return k;
|
|
18201
18201
|
}
|
|
18202
|
-
function Ke(F,
|
|
18203
|
-
return F instanceof
|
|
18202
|
+
function Ke(F, g) {
|
|
18203
|
+
return F instanceof g || F != null && F.constructor != null && F.constructor.name != null && F.constructor.name === g.name;
|
|
18204
18204
|
}
|
|
18205
18205
|
function fi(F) {
|
|
18206
18206
|
return F !== F;
|
|
18207
18207
|
}
|
|
18208
18208
|
var Sc = function() {
|
|
18209
|
-
for (var F = "0123456789abcdef",
|
|
18209
|
+
for (var F = "0123456789abcdef", g = new Array(256), y = 0; y < 16; ++y)
|
|
18210
18210
|
for (var C = y * 16, k = 0; k < 16; ++k)
|
|
18211
|
-
|
|
18212
|
-
return
|
|
18211
|
+
g[C + k] = F[y] + F[k];
|
|
18212
|
+
return g;
|
|
18213
18213
|
}();
|
|
18214
18214
|
})(Vs);
|
|
18215
18215
|
var Xn = Vs, xr = Xn.Buffer, De = {}, Ie;
|
|
@@ -18366,7 +18366,7 @@ var P1 = Fc((L) => {
|
|
|
18366
18366
|
this.fillLast = h, w = 4;
|
|
18367
18367
|
break;
|
|
18368
18368
|
case "base64":
|
|
18369
|
-
this.text = p, this.end =
|
|
18369
|
+
this.text = p, this.end = d, w = 3;
|
|
18370
18370
|
break;
|
|
18371
18371
|
default:
|
|
18372
18372
|
this.write = m, this.end = x;
|
|
@@ -18449,7 +18449,7 @@ var P1 = Fc((L) => {
|
|
|
18449
18449
|
var b = (v.length - w) % 3;
|
|
18450
18450
|
return b === 0 ? v.toString("base64", w) : (this.lastNeed = 3 - b, this.lastTotal = 3, b === 1 ? this.lastChar[0] = v[v.length - 1] : (this.lastChar[0] = v[v.length - 2], this.lastChar[1] = v[v.length - 1]), v.toString("base64", w, v.length - b));
|
|
18451
18451
|
}
|
|
18452
|
-
function
|
|
18452
|
+
function d(v) {
|
|
18453
18453
|
var w = v && v.length ? this.write(v) : "";
|
|
18454
18454
|
return this.lastNeed ? w + this.lastChar.toString("base64", 0, 3 - this.lastNeed) : w;
|
|
18455
18455
|
}
|
|
@@ -18523,8 +18523,8 @@ var P1 = Fc((L) => {
|
|
|
18523
18523
|
this.acc = 0, this.contBytes = 0, this.accBytes = 0, this.defaultCharUnicode = u.defaultCharUnicode;
|
|
18524
18524
|
}
|
|
18525
18525
|
o.prototype.write = function(c) {
|
|
18526
|
-
for (var u = this.acc, f = this.contBytes, l = this.accBytes, p = "",
|
|
18527
|
-
var m = c[
|
|
18526
|
+
for (var u = this.acc, f = this.contBytes, l = this.accBytes, p = "", d = 0; d < c.length; d++) {
|
|
18527
|
+
var m = c[d];
|
|
18528
18528
|
(m & 192) !== 128 ? (f > 0 && (p += this.defaultCharUnicode, f = 0), m < 128 ? p += String.fromCharCode(m) : m < 224 ? (u = m & 31, f = 1, l = 1) : m < 240 ? (u = m & 15, f = 2, l = 1) : p += this.defaultCharUnicode) : f > 0 ? (u = u << 6 | m & 63, f--, l++, f === 0 && (l === 2 && u < 128 && u > 0 ? p += this.defaultCharUnicode : l === 3 && u < 2048 ? p += this.defaultCharUnicode : p += String.fromCharCode(u))) : p += this.defaultCharUnicode;
|
|
18529
18529
|
}
|
|
18530
18530
|
return this.acc = u, this.contBytes = f, this.accBytes = l, p;
|
|
@@ -18562,8 +18562,8 @@ var P1 = Fc((L) => {
|
|
|
18562
18562
|
this.isLE = u.isLE, this.highSurrogate = 0;
|
|
18563
18563
|
}
|
|
18564
18564
|
t.prototype.write = function(c) {
|
|
18565
|
-
for (var u = n.from(c, "ucs2"), f = n.alloc(u.length * 2), l = this.isLE ? f.writeUInt32LE : f.writeUInt32BE, p = 0,
|
|
18566
|
-
var m = u.readUInt16LE(
|
|
18565
|
+
for (var u = n.from(c, "ucs2"), f = n.alloc(u.length * 2), l = this.isLE ? f.writeUInt32LE : f.writeUInt32BE, p = 0, d = 0; d < u.length; d += 2) {
|
|
18566
|
+
var m = u.readUInt16LE(d), x = m >= 55296 && m < 56320, v = m >= 56320 && m < 57344;
|
|
18567
18567
|
if (this.highSurrogate)
|
|
18568
18568
|
if (x || !v)
|
|
18569
18569
|
l.call(f, this.highSurrogate, p), p += 4;
|
|
@@ -18587,14 +18587,14 @@ var P1 = Fc((L) => {
|
|
|
18587
18587
|
r.prototype.write = function(c) {
|
|
18588
18588
|
if (c.length === 0)
|
|
18589
18589
|
return "";
|
|
18590
|
-
var u = 0, f = 0, l = n.alloc(c.length + 4), p = 0,
|
|
18590
|
+
var u = 0, f = 0, l = n.alloc(c.length + 4), p = 0, d = this.isLE, m = this.overflow, x = this.badChar;
|
|
18591
18591
|
if (m.length > 0) {
|
|
18592
18592
|
for (; u < c.length && m.length < 4; u++)
|
|
18593
18593
|
m.push(c[u]);
|
|
18594
|
-
m.length === 4 && (
|
|
18594
|
+
m.length === 4 && (d ? f = m[u] | m[u + 1] << 8 | m[u + 2] << 16 | m[u + 3] << 24 : f = m[u + 3] | m[u + 2] << 8 | m[u + 1] << 16 | m[u] << 24, m.length = 0, p = i(l, p, f, x));
|
|
18595
18595
|
}
|
|
18596
18596
|
for (; u < c.length - 3; u += 4)
|
|
18597
|
-
|
|
18597
|
+
d ? f = c[u] | c[u + 1] << 8 | c[u + 2] << 16 | c[u + 3] << 24 : f = c[u + 3] | c[u + 2] << 8 | c[u + 1] << 16 | c[u] << 24, p = i(l, p, f, x);
|
|
18598
18598
|
for (; u < c.length; u++)
|
|
18599
18599
|
m.push(c[u]);
|
|
18600
18600
|
return l.slice(0, p).toString("ucs2");
|
|
@@ -18649,7 +18649,7 @@ var P1 = Fc((L) => {
|
|
|
18649
18649
|
return this.decoder.end();
|
|
18650
18650
|
};
|
|
18651
18651
|
function h(c, u) {
|
|
18652
|
-
var f = [], l = 0, p = 0,
|
|
18652
|
+
var f = [], l = 0, p = 0, d = 0, m = 0, x = 0;
|
|
18653
18653
|
e:
|
|
18654
18654
|
for (var v = 0; v < c.length; v++)
|
|
18655
18655
|
for (var w = c[v], b = 0; b < w.length; b++)
|
|
@@ -18660,10 +18660,10 @@ var P1 = Fc((L) => {
|
|
|
18660
18660
|
if (f[0] === 0 && f[1] === 0 && f[2] === 254 && f[3] === 255)
|
|
18661
18661
|
return "utf-32be";
|
|
18662
18662
|
}
|
|
18663
|
-
if ((f[0] !== 0 || f[1] > 16) &&
|
|
18663
|
+
if ((f[0] !== 0 || f[1] > 16) && d++, (f[3] !== 0 || f[2] > 16) && p++, f[0] === 0 && f[1] === 0 && (f[2] !== 0 || f[3] !== 0) && x++, (f[0] !== 0 || f[1] !== 0) && f[2] === 0 && f[3] === 0 && m++, f.length = 0, l++, l >= 100)
|
|
18664
18664
|
break e;
|
|
18665
18665
|
}
|
|
18666
|
-
return x -
|
|
18666
|
+
return x - d > m - p ? "utf-32be" : x - d < m - p ? "utf-32le" : u || "utf-32le";
|
|
18667
18667
|
}
|
|
18668
18668
|
return ft;
|
|
18669
18669
|
}
|
|
@@ -18739,8 +18739,8 @@ var P1 = Fc((L) => {
|
|
|
18739
18739
|
function o(h, c) {
|
|
18740
18740
|
var u = [], f = 0, l = 0, p = 0;
|
|
18741
18741
|
e:
|
|
18742
|
-
for (var
|
|
18743
|
-
for (var m = h[
|
|
18742
|
+
for (var d = 0; d < h.length; d++)
|
|
18743
|
+
for (var m = h[d], x = 0; x < m.length; x++)
|
|
18744
18744
|
if (u.push(m[x]), u.length === 2) {
|
|
18745
18745
|
if (f === 0) {
|
|
18746
18746
|
if (u[0] === 255 && u[1] === 254) return "utf-16le";
|
|
@@ -18823,12 +18823,12 @@ var P1 = Fc((L) => {
|
|
|
18823
18823
|
function p(m, x) {
|
|
18824
18824
|
this.iconv = x.iconv, this.inBase64 = !1, this.base64Accum = "";
|
|
18825
18825
|
}
|
|
18826
|
-
var
|
|
18827
|
-
return
|
|
18826
|
+
var d = a.slice();
|
|
18827
|
+
return d[44] = !0, p.prototype.write = function(m) {
|
|
18828
18828
|
for (var x = "", v = 0, w = this.inBase64, b = this.base64Accum, S = 0; S < m.length; S++)
|
|
18829
18829
|
if (!w)
|
|
18830
18830
|
m[S] == u && (x += this.iconv.decode(m.slice(v, S), "ascii"), v = S + 1, w = !0);
|
|
18831
|
-
else if (!
|
|
18831
|
+
else if (!d[m[S]]) {
|
|
18832
18832
|
if (S == v && m[S] == c)
|
|
18833
18833
|
x += "&";
|
|
18834
18834
|
else {
|
|
@@ -19508,10 +19508,10 @@ var P1 = Fc((L) => {
|
|
|
19508
19508
|
throw new Error("DBCS codec is called without the data.");
|
|
19509
19509
|
if (!l.table)
|
|
19510
19510
|
throw new Error("Encoding '" + this.encodingName + "' has no data.");
|
|
19511
|
-
var
|
|
19511
|
+
var d = l.table();
|
|
19512
19512
|
this.decodeTables = [], this.decodeTables[0] = s.slice(0), this.decodeTableSeq = [];
|
|
19513
|
-
for (var m = 0; m <
|
|
19514
|
-
this._addDecodeChunk(
|
|
19513
|
+
for (var m = 0; m < d.length; m++)
|
|
19514
|
+
this._addDecodeChunk(d[m]);
|
|
19515
19515
|
if (typeof l.gb18030 == "function") {
|
|
19516
19516
|
this.gb18030 = l.gb18030();
|
|
19517
19517
|
var x = this.decodeTables.length;
|
|
@@ -19558,18 +19558,18 @@ var P1 = Fc((L) => {
|
|
|
19558
19558
|
for (var p = []; l > 0; l >>>= 8)
|
|
19559
19559
|
p.push(l & 255);
|
|
19560
19560
|
p.length == 0 && p.push(0);
|
|
19561
|
-
for (var
|
|
19562
|
-
var x =
|
|
19561
|
+
for (var d = this.decodeTables[0], m = p.length - 1; m > 0; m--) {
|
|
19562
|
+
var x = d[p[m]];
|
|
19563
19563
|
if (x == e)
|
|
19564
|
-
|
|
19564
|
+
d[p[m]] = i - this.decodeTables.length, this.decodeTables.push(d = s.slice(0));
|
|
19565
19565
|
else if (x <= i)
|
|
19566
|
-
|
|
19566
|
+
d = this.decodeTables[i - x];
|
|
19567
19567
|
else
|
|
19568
19568
|
throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + l.toString(16));
|
|
19569
19569
|
}
|
|
19570
|
-
return
|
|
19570
|
+
return d;
|
|
19571
19571
|
}, h.prototype._addDecodeChunk = function(l) {
|
|
19572
|
-
var p = parseInt(l[0], 16),
|
|
19572
|
+
var p = parseInt(l[0], 16), d = this._getDecodeTrieNode(p);
|
|
19573
19573
|
p = p & 255;
|
|
19574
19574
|
for (var m = 1; m < l.length; m++) {
|
|
19575
19575
|
var x = l[m];
|
|
@@ -19579,19 +19579,19 @@ var P1 = Fc((L) => {
|
|
|
19579
19579
|
if (w >= 55296 && w < 56320) {
|
|
19580
19580
|
var b = x.charCodeAt(v++);
|
|
19581
19581
|
if (b >= 56320 && b < 57344)
|
|
19582
|
-
|
|
19582
|
+
d[p++] = 65536 + (w - 55296) * 1024 + (b - 56320);
|
|
19583
19583
|
else
|
|
19584
19584
|
throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + l[0]);
|
|
19585
19585
|
} else if (w > 4080 && w <= 4095) {
|
|
19586
19586
|
for (var S = 4095 - w + 2, T = [], B = 0; B < S; B++)
|
|
19587
19587
|
T.push(x.charCodeAt(v++));
|
|
19588
|
-
|
|
19588
|
+
d[p++] = r - this.decodeTableSeq.length, this.decodeTableSeq.push(T);
|
|
19589
19589
|
} else
|
|
19590
|
-
|
|
19590
|
+
d[p++] = w;
|
|
19591
19591
|
}
|
|
19592
19592
|
else if (typeof x == "number")
|
|
19593
|
-
for (var M =
|
|
19594
|
-
|
|
19593
|
+
for (var M = d[p - 1] + 1, v = 0; v < x; v++)
|
|
19594
|
+
d[p++] = M++;
|
|
19595
19595
|
else
|
|
19596
19596
|
throw new Error("Incorrect type '" + typeof x + "' given in " + this.encodingName + " at chunk " + l[0]);
|
|
19597
19597
|
}
|
|
@@ -19601,27 +19601,27 @@ var P1 = Fc((L) => {
|
|
|
19601
19601
|
var p = l >> 8;
|
|
19602
19602
|
return this.encodeTable[p] === void 0 && (this.encodeTable[p] = s.slice(0)), this.encodeTable[p];
|
|
19603
19603
|
}, h.prototype._setEncodeChar = function(l, p) {
|
|
19604
|
-
var
|
|
19605
|
-
|
|
19604
|
+
var d = this._getEncodeBucket(l), m = l & 255;
|
|
19605
|
+
d[m] <= r ? this.encodeTableSeq[r - d[m]][a] = p : d[m] == e && (d[m] = p);
|
|
19606
19606
|
}, h.prototype._setEncodeSequence = function(l, p) {
|
|
19607
|
-
var
|
|
19607
|
+
var d = l[0], m = this._getEncodeBucket(d), x = d & 255, v;
|
|
19608
19608
|
m[x] <= r ? v = this.encodeTableSeq[r - m[x]] : (v = {}, m[x] !== e && (v[a] = m[x]), m[x] = r - this.encodeTableSeq.length, this.encodeTableSeq.push(v));
|
|
19609
19609
|
for (var w = 1; w < l.length - 1; w++) {
|
|
19610
|
-
var b = v[
|
|
19611
|
-
typeof b == "object" ? v = b : (v = v[
|
|
19610
|
+
var b = v[d];
|
|
19611
|
+
typeof b == "object" ? v = b : (v = v[d] = {}, b !== void 0 && (v[a] = b));
|
|
19612
19612
|
}
|
|
19613
|
-
|
|
19614
|
-
}, h.prototype._fillEncodeTable = function(l, p,
|
|
19613
|
+
d = l[l.length - 1], v[d] = p;
|
|
19614
|
+
}, h.prototype._fillEncodeTable = function(l, p, d) {
|
|
19615
19615
|
for (var m = this.decodeTables[l], x = !1, v = {}, w = 0; w < 256; w++) {
|
|
19616
19616
|
var b = m[w], S = p + w;
|
|
19617
|
-
if (!
|
|
19617
|
+
if (!d[S])
|
|
19618
19618
|
if (b >= 0)
|
|
19619
19619
|
this._setEncodeChar(b, S), x = !0;
|
|
19620
19620
|
else if (b <= i) {
|
|
19621
19621
|
var T = i - b;
|
|
19622
19622
|
if (!v[T]) {
|
|
19623
19623
|
var B = S << 8 >>> 0;
|
|
19624
|
-
this._fillEncodeTable(T, B,
|
|
19624
|
+
this._fillEncodeTable(T, B, d) ? x = !0 : v[T] = !0;
|
|
19625
19625
|
}
|
|
19626
19626
|
} else b <= r && (this._setEncodeSequence(this.decodeTableSeq[r - b], S), x = !0);
|
|
19627
19627
|
}
|
|
@@ -19631,7 +19631,7 @@ var P1 = Fc((L) => {
|
|
|
19631
19631
|
this.leadSurrogate = -1, this.seqObj = void 0, this.encodeTable = p.encodeTable, this.encodeTableSeq = p.encodeTableSeq, this.defaultCharSingleByte = p.defCharSB, this.gb18030 = p.gb18030;
|
|
19632
19632
|
}
|
|
19633
19633
|
c.prototype.write = function(l) {
|
|
19634
|
-
for (var p = n.alloc(l.length * (this.gb18030 ? 4 : 3)),
|
|
19634
|
+
for (var p = n.alloc(l.length * (this.gb18030 ? 4 : 3)), d = this.leadSurrogate, m = this.seqObj, x = -1, v = 0, w = 0; ; ) {
|
|
19635
19635
|
if (x === -1) {
|
|
19636
19636
|
if (v == l.length) break;
|
|
19637
19637
|
var b = l.charCodeAt(v++);
|
|
@@ -19641,14 +19641,14 @@ var P1 = Fc((L) => {
|
|
|
19641
19641
|
}
|
|
19642
19642
|
if (b >= 55296 && b < 57344)
|
|
19643
19643
|
if (b < 56320)
|
|
19644
|
-
if (
|
|
19645
|
-
|
|
19644
|
+
if (d === -1) {
|
|
19645
|
+
d = b;
|
|
19646
19646
|
continue;
|
|
19647
19647
|
} else
|
|
19648
|
-
|
|
19648
|
+
d = b, b = e;
|
|
19649
19649
|
else
|
|
19650
|
-
|
|
19651
|
-
else
|
|
19650
|
+
d !== -1 ? (b = 65536 + (d - 55296) * 1024 + (b - 56320), d = -1) : b = e;
|
|
19651
|
+
else d !== -1 && (x = b, b = e, d = -1);
|
|
19652
19652
|
var S = e;
|
|
19653
19653
|
if (m !== void 0 && b != e) {
|
|
19654
19654
|
var T = m[b];
|
|
@@ -19674,13 +19674,13 @@ var P1 = Fc((L) => {
|
|
|
19674
19674
|
}
|
|
19675
19675
|
S === e && (S = this.defaultCharSingleByte), S < 256 ? p[w++] = S : S < 65536 ? (p[w++] = S >> 8, p[w++] = S & 255) : S < 16777216 ? (p[w++] = S >> 16, p[w++] = S >> 8 & 255, p[w++] = S & 255) : (p[w++] = S >>> 24, p[w++] = S >>> 16 & 255, p[w++] = S >>> 8 & 255, p[w++] = S & 255);
|
|
19676
19676
|
}
|
|
19677
|
-
return this.seqObj = m, this.leadSurrogate =
|
|
19677
|
+
return this.seqObj = m, this.leadSurrogate = d, p.slice(0, w);
|
|
19678
19678
|
}, c.prototype.end = function() {
|
|
19679
19679
|
if (!(this.leadSurrogate === -1 && this.seqObj === void 0)) {
|
|
19680
19680
|
var l = n.alloc(10), p = 0;
|
|
19681
19681
|
if (this.seqObj) {
|
|
19682
|
-
var
|
|
19683
|
-
|
|
19682
|
+
var d = this.seqObj[a];
|
|
19683
|
+
d !== void 0 && (d < 256 ? l[p++] = d : (l[p++] = d >> 8, l[p++] = d & 255)), this.seqObj = void 0;
|
|
19684
19684
|
}
|
|
19685
19685
|
return this.leadSurrogate !== -1 && (l[p++] = this.defaultCharSingleByte, this.leadSurrogate = -1), l.slice(0, p);
|
|
19686
19686
|
}
|
|
@@ -19689,8 +19689,8 @@ var P1 = Fc((L) => {
|
|
|
19689
19689
|
this.nodeIdx = 0, this.prevBytes = [], this.decodeTables = p.decodeTables, this.decodeTableSeq = p.decodeTableSeq, this.defaultCharUnicode = p.defaultCharUnicode, this.gb18030 = p.gb18030;
|
|
19690
19690
|
}
|
|
19691
19691
|
u.prototype.write = function(l) {
|
|
19692
|
-
for (var p = n.alloc(l.length * 2),
|
|
19693
|
-
var T = b >= 0 ? l[b] : m[b + x], w = this.decodeTables[
|
|
19692
|
+
for (var p = n.alloc(l.length * 2), d = this.nodeIdx, m = this.prevBytes, x = this.prevBytes.length, v = -this.prevBytes.length, w, b = 0, S = 0; b < l.length; b++) {
|
|
19693
|
+
var T = b >= 0 ? l[b] : m[b + x], w = this.decodeTables[d][T];
|
|
19694
19694
|
if (!(w >= 0)) if (w === e)
|
|
19695
19695
|
w = this.defaultCharUnicode.charCodeAt(0), b = v;
|
|
19696
19696
|
else if (w === t) {
|
|
@@ -19701,22 +19701,22 @@ var P1 = Fc((L) => {
|
|
|
19701
19701
|
var M = f(this.gb18030.gbChars, B);
|
|
19702
19702
|
w = this.gb18030.uChars[M] + B - this.gb18030.gbChars[M];
|
|
19703
19703
|
} else if (w <= i) {
|
|
19704
|
-
|
|
19704
|
+
d = i - w;
|
|
19705
19705
|
continue;
|
|
19706
19706
|
} else if (w <= r) {
|
|
19707
19707
|
for (var _ = this.decodeTableSeq[r - w], D = 0; D < _.length - 1; D++)
|
|
19708
19708
|
w = _[D], p[S++] = w & 255, p[S++] = w >> 8;
|
|
19709
19709
|
w = _[_.length - 1];
|
|
19710
19710
|
} else
|
|
19711
|
-
throw new Error("iconv-lite internal error: invalid decoding table value " + w + " at " +
|
|
19711
|
+
throw new Error("iconv-lite internal error: invalid decoding table value " + w + " at " + d + "/" + T);
|
|
19712
19712
|
if (w >= 65536) {
|
|
19713
19713
|
w -= 65536;
|
|
19714
19714
|
var N = 55296 | w >> 10;
|
|
19715
19715
|
p[S++] = N & 255, p[S++] = N >> 8, w = 56320 | w & 1023;
|
|
19716
19716
|
}
|
|
19717
|
-
p[S++] = w & 255, p[S++] = w >> 8,
|
|
19717
|
+
p[S++] = w & 255, p[S++] = w >> 8, d = 0, v = b + 1;
|
|
19718
19718
|
}
|
|
19719
|
-
return this.nodeIdx =
|
|
19719
|
+
return this.nodeIdx = d, this.prevBytes = v >= 0 ? Array.prototype.slice.call(l, v) : m.slice(v + x).concat(Array.prototype.slice.call(l)), p.slice(0, S).toString("ucs2");
|
|
19720
19720
|
}, u.prototype.end = function() {
|
|
19721
19721
|
for (var l = ""; this.prevBytes.length > 0; ) {
|
|
19722
19722
|
l += this.defaultCharUnicode;
|
|
@@ -19728,11 +19728,11 @@ var P1 = Fc((L) => {
|
|
|
19728
19728
|
function f(l, p) {
|
|
19729
19729
|
if (l[0] > p)
|
|
19730
19730
|
return -1;
|
|
19731
|
-
for (var
|
|
19732
|
-
var x =
|
|
19733
|
-
l[x] <= p ?
|
|
19731
|
+
for (var d = 0, m = l.length; d < m - 1; ) {
|
|
19732
|
+
var x = d + (m - d + 1 >> 1);
|
|
19733
|
+
l[x] <= p ? d = x : m = x;
|
|
19734
19734
|
}
|
|
19735
|
-
return
|
|
19735
|
+
return d;
|
|
19736
19736
|
}
|
|
19737
19737
|
return ss;
|
|
19738
19738
|
}
|
|
@@ -28999,7 +28999,7 @@ var P1 = Fc((L) => {
|
|
|
28999
28999
|
const r = [];
|
|
29000
29000
|
if (n.filter((l) => l.char !== Zn).forEach((l) => {
|
|
29001
29001
|
const p = _1(
|
|
29002
|
-
new
|
|
29002
|
+
new ke().copy(l.box).applyMatrix4(e)
|
|
29003
29003
|
);
|
|
29004
29004
|
p && r.push({
|
|
29005
29005
|
type: ye.CHAR,
|
|
@@ -29019,7 +29019,7 @@ var P1 = Fc((L) => {
|
|
|
29019
29019
|
}
|
|
29020
29020
|
const h = r.slice(0, a).filter(i), c = r.slice(o + 1).filter(i), u = r.slice(a, o + 1).filter(s);
|
|
29021
29021
|
if (u.length === 0) return [...h, ...c];
|
|
29022
|
-
const f = new
|
|
29022
|
+
const f = new ke().copy(u[0].box);
|
|
29023
29023
|
return u.slice(1).forEach((l) => f.union(l.box)), [
|
|
29024
29024
|
...h,
|
|
29025
29025
|
{
|
|
@@ -29031,7 +29031,7 @@ var P1 = Fc((L) => {
|
|
|
29031
29031
|
...c
|
|
29032
29032
|
];
|
|
29033
29033
|
}
|
|
29034
|
-
const B1 = /* @__PURE__ */ new E()
|
|
29034
|
+
const B1 = 1.666666, Wn = 0.3, L1 = /* @__PURE__ */ new E();
|
|
29035
29035
|
class $s extends Qr {
|
|
29036
29036
|
/**
|
|
29037
29037
|
* Creates a new RenderContext instance with optional initial values.
|
|
@@ -29177,7 +29177,7 @@ var P1 = Fc((L) => {
|
|
|
29177
29177
|
* The height of current line of texts
|
|
29178
29178
|
*/
|
|
29179
29179
|
get currentLineHeight() {
|
|
29180
|
-
const e = this.defaultLineSpaceFactor * this.currentFontSize *
|
|
29180
|
+
const e = this.defaultLineSpaceFactor * this.currentFontSize * B1, t = this.currentMaxFontSize > 0 ? this.currentMaxFontSize : this.currentFontSize;
|
|
29181
29181
|
return e + t;
|
|
29182
29182
|
}
|
|
29183
29183
|
/**
|
|
@@ -29550,10 +29550,10 @@ var P1 = Fc((L) => {
|
|
|
29550
29550
|
processStack(e, t, r, i, s) {
|
|
29551
29551
|
const [a, o, h] = e, c = this._hOffset, u = this._vOffset, f = this._currentContext.charTrackingFactor.value, l = this.currentFontSize, p = this._currentContext.fontSizeScaleFactor;
|
|
29552
29552
|
this._hOffset = c, this._currentContext.charTrackingFactor = { value: 1, isRelative: !1 };
|
|
29553
|
-
let
|
|
29553
|
+
let d = 0;
|
|
29554
29554
|
for (let b = 0; b < a.length; b++) {
|
|
29555
29555
|
const S = this.getCharShape(a[b]);
|
|
29556
|
-
S && (
|
|
29556
|
+
S && (d += S.width * this.currentWidthFactor);
|
|
29557
29557
|
}
|
|
29558
29558
|
this._hOffset = c;
|
|
29559
29559
|
let m = 0;
|
|
@@ -29561,7 +29561,7 @@ var P1 = Fc((L) => {
|
|
|
29561
29561
|
const S = this.getCharShape(o[b]);
|
|
29562
29562
|
S && (m += S.width * this.currentWidthFactor);
|
|
29563
29563
|
}
|
|
29564
|
-
const x = Math.max(
|
|
29564
|
+
const x = Math.max(d, m), v = (x - d) / 2, w = (x - m) / 2;
|
|
29565
29565
|
if (h === "^") {
|
|
29566
29566
|
if (this._currentContext.fontSizeScaleFactor = p * 0.7, this.calcuateLineParams(), a && !o) {
|
|
29567
29567
|
const b = [], S = [], T = [], B = [];
|
|
@@ -29577,7 +29577,7 @@ var P1 = Fc((L) => {
|
|
|
29577
29577
|
T,
|
|
29578
29578
|
B
|
|
29579
29579
|
);
|
|
29580
|
-
t.push(...b), r.push(...S), i.push(...T), s.push(...B), this._hOffset = c +
|
|
29580
|
+
t.push(...b), r.push(...S), i.push(...T), s.push(...B), this._hOffset = c + d;
|
|
29581
29581
|
} else if (!a && o) {
|
|
29582
29582
|
const b = [], S = [], T = [], B = [];
|
|
29583
29583
|
this._hOffset = c, this._vOffset = this.convertTopAlignedVOffset(
|
|
@@ -29652,7 +29652,7 @@ var P1 = Fc((L) => {
|
|
|
29652
29652
|
}
|
|
29653
29653
|
recordStackDivider(e, t, r, i, s) {
|
|
29654
29654
|
if (this._options.collectCharBoxes === !1) return;
|
|
29655
|
-
const a = t - this.currentFontSize * 0.8 + this.defaultFontSize * Wn, o = new
|
|
29655
|
+
const a = t - this.currentFontSize * 0.8 + this.defaultFontSize * Wn, o = new ke(
|
|
29656
29656
|
new E(e, a, 0),
|
|
29657
29657
|
new E(e + r, a, 0)
|
|
29658
29658
|
);
|
|
@@ -29677,7 +29677,7 @@ var P1 = Fc((L) => {
|
|
|
29677
29677
|
}
|
|
29678
29678
|
processBlank(e, t) {
|
|
29679
29679
|
if (this._options.collectCharBoxes !== !1) {
|
|
29680
|
-
const r = this._hOffset, i = this.flowDirection == Mt.BOTTOM_TO_TOP ? this._vOffset : this._vOffset - this.currentLayoutFontSize, s = new
|
|
29680
|
+
const r = this._hOffset, i = this.flowDirection == Mt.BOTTOM_TO_TOP ? this._vOffset : this._vOffset - this.currentLayoutFontSize, s = new ke(
|
|
29681
29681
|
new E(r, i, 0),
|
|
29682
29682
|
new E(
|
|
29683
29683
|
r + this._currentContext.blankWidth,
|
|
@@ -29750,7 +29750,7 @@ var P1 = Fc((L) => {
|
|
|
29750
29750
|
const u = this.hOffset, f = this.flowDirection == Mt.BOTTOM_TO_TOP ? this.vOffset : this.vOffset - this.currentLayoutFontSize, l = a.width * this.currentWidthFactor, p = this.currentLayoutFontSize;
|
|
29751
29751
|
if (o.translate(u, f, 0), this.currentHorizontalAlignment == ce.DISTRIBUTED ? this._hOffset += a.width * this.currentWidthFactor : this._hOffset += a.width * this.currentWordSpace * this.currentWidthFactor, t.push(o), this._lineHasRenderableChar = !0, this._options.collectCharBoxes !== !1) {
|
|
29752
29752
|
o.userData.char = e, o.boundingBox || o.computeBoundingBox();
|
|
29753
|
-
const x = new
|
|
29753
|
+
const x = new ke().copy(o.boundingBox);
|
|
29754
29754
|
o instanceof mr ? (this._lastCharBoxTarget = "mesh", i.push({
|
|
29755
29755
|
type: ye.CHAR,
|
|
29756
29756
|
box: x,
|
|
@@ -29763,9 +29763,9 @@ var P1 = Fc((L) => {
|
|
|
29763
29763
|
children: []
|
|
29764
29764
|
}));
|
|
29765
29765
|
}
|
|
29766
|
-
const
|
|
29766
|
+
const d = p * 0.05, m = 1e-3;
|
|
29767
29767
|
if (this._currentContext.underline) {
|
|
29768
|
-
const x = new ze(), v = f -
|
|
29768
|
+
const x = new ze(), v = f - d;
|
|
29769
29769
|
x.setAttribute(
|
|
29770
29770
|
"position",
|
|
29771
29771
|
new Ye(
|
|
@@ -29782,7 +29782,7 @@ var P1 = Fc((L) => {
|
|
|
29782
29782
|
), x.setIndex(null), x.userData = { isDecoration: !0 }, r.push(x);
|
|
29783
29783
|
}
|
|
29784
29784
|
if (this._currentContext.overline) {
|
|
29785
|
-
const x = new ze(), v = f + p +
|
|
29785
|
+
const x = new ze(), v = f + p + d;
|
|
29786
29786
|
x.setAttribute(
|
|
29787
29787
|
"position",
|
|
29788
29788
|
new Ye(
|
|
@@ -29901,7 +29901,7 @@ var P1 = Fc((L) => {
|
|
|
29901
29901
|
if (e.forEach((a, o) => {
|
|
29902
29902
|
a.geometry.boundingBox || a.geometry.computeBoundingBox(), o === 0 ? t = a.geometry.boundingBox : t.union(a.geometry.boundingBox);
|
|
29903
29903
|
}), !t) return;
|
|
29904
|
-
const r = t, i = r.getSize(
|
|
29904
|
+
const r = t, i = r.getSize(L1), s = (a, o) => {
|
|
29905
29905
|
var c, u;
|
|
29906
29906
|
const h = (u = (c = a.userData) == null ? void 0 : c.layout) == null ? void 0 : u.chars;
|
|
29907
29907
|
if (h && h.length > 0) {
|
|
@@ -29970,16 +29970,16 @@ var P1 = Fc((L) => {
|
|
|
29970
29970
|
o
|
|
29971
29971
|
), u = this._options.collectCharBoxes !== !1, f = e.filter((p) => p instanceof mr);
|
|
29972
29972
|
if (f.length > 0) {
|
|
29973
|
-
const p = f.length > 1 ? Oo(f) : f[0],
|
|
29974
|
-
|
|
29973
|
+
const p = f.length > 1 ? Oo(f) : f[0], d = new Hr(p, h);
|
|
29974
|
+
d.userData.bboxIntersectionCheck = !0, d.userData.charBoxType = s, u && r.length > 0 && (d.userData.layout = { chars: r.slice() }), a.add(d);
|
|
29975
29975
|
}
|
|
29976
29976
|
const l = [
|
|
29977
29977
|
...t,
|
|
29978
29978
|
...e.filter((p) => !(p instanceof mr))
|
|
29979
29979
|
];
|
|
29980
29980
|
if (l.length > 0) {
|
|
29981
|
-
const p = l.length > 1 ? Oo(l) : l[0],
|
|
29982
|
-
|
|
29981
|
+
const p = l.length > 1 ? Oo(l) : l[0], d = new au(p, c);
|
|
29982
|
+
d.userData.bboxIntersectionCheck = !0, d.userData.charBoxType = s, u && i.length > 0 && (d.userData.layout = { chars: i.slice() }), a.add(d);
|
|
29983
29983
|
}
|
|
29984
29984
|
return a.children.length === 1 ? a.children[0] : a;
|
|
29985
29985
|
}
|
|
@@ -30035,7 +30035,7 @@ var P1 = Fc((L) => {
|
|
|
30035
30035
|
byBlockColor: s.byBlockColor,
|
|
30036
30036
|
layer: s.layer,
|
|
30037
30037
|
color: s.color.copy()
|
|
30038
|
-
}, this._box = new
|
|
30038
|
+
}, this._box = new ke(), this._layoutData = void 0, this._mtextData = e, this._fontsInStyleLoaded = !1;
|
|
30039
30039
|
}
|
|
30040
30040
|
/**
|
|
30041
30041
|
* Gets the font manager instance associated with this MText object.
|
|
@@ -30087,9 +30087,10 @@ var P1 = Fc((L) => {
|
|
|
30087
30087
|
minY: 1 / 0,
|
|
30088
30088
|
maxY: -1 / 0,
|
|
30089
30089
|
minZ: 1 / 0,
|
|
30090
|
-
maxZ: -1 / 0
|
|
30090
|
+
maxZ: -1 / 0,
|
|
30091
|
+
hasLogicalBounds: !1
|
|
30091
30092
|
};
|
|
30092
|
-
this.updateBoxFromObject(e, t), t.hasLine && (this.box.isEmpty() ? (this.box.min.set(t.minX, t.minY, t.minZ), this.box.max.set(t.maxX, t.maxY, t.maxZ)) : (this.box.min.y = Math.min(this.box.min.y, t.minY), this.box.max.y = Math.max(this.box.max.y, t.maxY))), this.add(e);
|
|
30093
|
+
this.updateBoxFromObject(e, t), t.hasLine && !t.hasLogicalBounds && (this.box.isEmpty() ? (this.box.min.set(t.minX, t.minY, t.minZ), this.box.max.set(t.maxX, t.maxY, t.maxZ)) : (this.box.min.y = Math.min(this.box.min.y, t.minY), this.box.max.y = Math.max(this.box.max.y, t.maxY))), this.add(e);
|
|
30093
30094
|
}
|
|
30094
30095
|
}
|
|
30095
30096
|
/**
|
|
@@ -30159,45 +30160,52 @@ var P1 = Fc((L) => {
|
|
|
30159
30160
|
if (!r)
|
|
30160
30161
|
return;
|
|
30161
30162
|
r.matrix.decompose(qt, us, cs), e.position && (qt.x += e.position.x, qt.y += e.position.y, r.matrix.compose(qt, us, cs));
|
|
30162
|
-
let s = e.width
|
|
30163
|
+
let s = e.width;
|
|
30163
30164
|
r.updateWorldMatrix(!0, !0);
|
|
30164
|
-
const
|
|
30165
|
-
if (!o.isEmpty()) {
|
|
30166
|
-
const p = o.max.y - o.min.y;
|
|
30167
|
-
Number.isFinite(p) && p > 0 && (a = p);
|
|
30168
|
-
}
|
|
30165
|
+
const a = new ke().setFromObject(r);
|
|
30169
30166
|
if (!Number.isFinite(s)) {
|
|
30170
|
-
const p =
|
|
30167
|
+
const p = a.max.x - a.min.x;
|
|
30171
30168
|
s = Number.isFinite(p) && p > 0 ? p : 0;
|
|
30172
30169
|
}
|
|
30173
|
-
const
|
|
30170
|
+
const o = this.measureAnchorMetrics(
|
|
30171
|
+
r,
|
|
30174
30172
|
s,
|
|
30173
|
+
i,
|
|
30175
30174
|
a,
|
|
30176
|
-
e.attachmentPoint,
|
|
30177
30175
|
e.drawingDirection
|
|
30178
|
-
),
|
|
30176
|
+
), h = this.calculateAnchorPoint(
|
|
30177
|
+
o,
|
|
30178
|
+
e.attachmentPoint
|
|
30179
|
+
);
|
|
30180
|
+
r.userData.logicalBounds = {
|
|
30181
|
+
minX: o.minX + h.x,
|
|
30182
|
+
maxX: o.maxX + h.x,
|
|
30183
|
+
minY: o.minY + h.y,
|
|
30184
|
+
maxY: o.maxY + h.y
|
|
30185
|
+
};
|
|
30186
|
+
const c = (p) => {
|
|
30179
30187
|
if (!p || p.length === 0) return;
|
|
30180
|
-
const
|
|
30188
|
+
const d = new E(h.x, h.y, 0), m = (x) => {
|
|
30181
30189
|
var v;
|
|
30182
|
-
(v = x.box) == null || v.translate(
|
|
30190
|
+
(v = x.box) == null || v.translate(d), x.children && x.children.length > 0 && x.children.forEach(m);
|
|
30183
30191
|
};
|
|
30184
30192
|
p.forEach(m);
|
|
30185
30193
|
}, u = (p) => {
|
|
30186
|
-
!p || p.length === 0 || p.forEach((
|
|
30187
|
-
|
|
30194
|
+
!p || p.length === 0 || p.forEach((d) => {
|
|
30195
|
+
d.y += h.y;
|
|
30188
30196
|
});
|
|
30189
30197
|
};
|
|
30190
30198
|
r.traverse((p) => {
|
|
30191
|
-
var
|
|
30192
|
-
"geometry" in p
|
|
30193
|
-
(m = (
|
|
30199
|
+
var d, m, x;
|
|
30200
|
+
"geometry" in p && p.geometry.translate(h.x, h.y, 0), c(
|
|
30201
|
+
(m = (d = p.userData) == null ? void 0 : d.layout) == null ? void 0 : m.chars
|
|
30194
30202
|
), u(
|
|
30195
30203
|
(x = p.userData) == null ? void 0 : x.lineLayouts
|
|
30196
30204
|
), p.layers.enableAll();
|
|
30197
30205
|
});
|
|
30198
30206
|
let f = e.rotation || 0;
|
|
30199
30207
|
if (e.directionVector) {
|
|
30200
|
-
const p = e.directionVector,
|
|
30208
|
+
const p = e.directionVector, d = new E(p.x, p.y, p.z), m = d.clone().cross(th), x = th.angleTo(d);
|
|
30201
30209
|
f = m.z > 0 ? -x : x;
|
|
30202
30210
|
}
|
|
30203
30211
|
r.matrix.compose(qt, us, cs);
|
|
@@ -30278,54 +30286,128 @@ var P1 = Fc((L) => {
|
|
|
30278
30286
|
};
|
|
30279
30287
|
}
|
|
30280
30288
|
/**
|
|
30281
|
-
*
|
|
30282
|
-
*
|
|
30283
|
-
* @
|
|
30284
|
-
*
|
|
30285
|
-
*
|
|
30286
|
-
*
|
|
30287
|
-
|
|
30288
|
-
|
|
30289
|
+
* Measures the logical text frame used by attachment-point anchoring.
|
|
30290
|
+
*
|
|
30291
|
+
* @remarks
|
|
30292
|
+
* Line-layout boxes include inter-line leading that is useful for hit testing, but
|
|
30293
|
+
* that leading must not become extra padding above the first rendered line when
|
|
30294
|
+
* aligning to top/middle/bottom attachment points. This method therefore prefers the
|
|
30295
|
+
* visible geometry height from `geometryBox` when it is non-empty, and only falls
|
|
30296
|
+
* back to `layoutHeight` when there are no measurable glyphs (e.g. empty or
|
|
30297
|
+
* whitespace-only runs).
|
|
30298
|
+
*
|
|
30299
|
+
* @param object - Root group produced by layout; traversed for {@link LineLayout}
|
|
30300
|
+
* metadata to locate the first line baseline.
|
|
30301
|
+
* @param width - Column width used for horizontal anchoring when finite and
|
|
30302
|
+
* positive; if not, horizontal extents are taken from `geometryBox`.
|
|
30303
|
+
* @param layoutHeight - Total laid-out height from {@link MTextProcessor} when
|
|
30304
|
+
* geometry height is unavailable or zero.
|
|
30305
|
+
* @param geometryBox - Axis-aligned bounds of rendered primitives under `object`,
|
|
30306
|
+
* typically from {@link THREE.Box3.setFromObject}.
|
|
30307
|
+
* @param flowDirection - Optional flow; when {@link MTextFlowDirection.BOTTOM_TO_TOP},
|
|
30308
|
+
* the vertical frame is anchored from the geometry minimum upward.
|
|
30309
|
+
* @returns Metrics consumed by {@link MText.calculateAnchorPoint}.
|
|
30310
|
+
*/
|
|
30311
|
+
measureAnchorMetrics(e, t, r, i, s) {
|
|
30312
|
+
const a = {
|
|
30313
|
+
hasLine: !1,
|
|
30314
|
+
minY: 1 / 0,
|
|
30315
|
+
maxY: -1 / 0,
|
|
30316
|
+
baselineY: 0
|
|
30317
|
+
};
|
|
30318
|
+
let o = !1;
|
|
30319
|
+
e.traverse((m) => {
|
|
30320
|
+
var v;
|
|
30321
|
+
const x = (v = m.userData) == null ? void 0 : v.lineLayouts;
|
|
30322
|
+
!x || x.length === 0 || x.forEach((w) => {
|
|
30323
|
+
const b = w.y - w.height / 2, S = w.y + w.height / 2;
|
|
30324
|
+
a.hasLine = !0, a.minY = Math.min(a.minY, b), a.maxY = Math.max(a.maxY, S), o || (a.baselineY = b, o = !0);
|
|
30325
|
+
});
|
|
30326
|
+
});
|
|
30327
|
+
const h = i.isEmpty() ? 0 : i.max.y - i.min.y, c = Number.isFinite(h) && h > 0 ? h : Number.isFinite(r) && r > 0 ? r : 0;
|
|
30328
|
+
let u = 0, f = Number.isFinite(t) && t > 0 ? t : 0;
|
|
30329
|
+
f <= u && !i.isEmpty() && (u = i.min.x, f = i.max.x);
|
|
30330
|
+
let l = 0, p = 0;
|
|
30331
|
+
s == Mt.BOTTOM_TO_TOP ? (l = i.isEmpty() ? 0 : i.min.y, p = l + c) : (p = i.isEmpty() ? 0 : i.max.y, l = p - c);
|
|
30332
|
+
const d = a.hasLine ? a.baselineY : l;
|
|
30333
|
+
return { minX: u, maxX: f, minY: l, maxY: p, baselineY: d };
|
|
30334
|
+
}
|
|
30335
|
+
/**
|
|
30336
|
+
* Computes the 2D translation that maps the logical frame described by `metrics`
|
|
30337
|
+
* so that the chosen AutoCAD-style attachment point coincides with the insertion
|
|
30338
|
+
* origin (before rotation/insertion-point transforms applied later in
|
|
30339
|
+
* {@link MText.loadMText}).
|
|
30340
|
+
*
|
|
30341
|
+
* @remarks
|
|
30342
|
+
* The returned vector is **added** to vertex positions and char-box metadata via
|
|
30343
|
+
* `geometry.translate` / `CharBox.box.translate` / line `y` offsets. For `undefined`
|
|
30344
|
+
* attachment, behavior matches {@link MTextAttachmentPoint.TopLeft}.
|
|
30345
|
+
*
|
|
30346
|
+
* @param metrics - Pre-anchoring frame from {@link MText.measureAnchorMetrics}.
|
|
30347
|
+
* @param attachmentPoint - DWG attachment constant; determines which corner, edge
|
|
30348
|
+
* center, or baseline of the frame is pinned to `(0,0)` in anchored space.
|
|
30349
|
+
* @returns Translation `(x, y)` in drawing units applied uniformly to the laid-out
|
|
30350
|
+
* group and its layout sidecars.
|
|
30351
|
+
*/
|
|
30352
|
+
calculateAnchorPoint(e, t) {
|
|
30353
|
+
const r = (e.minX + e.maxX) / 2, i = (e.minY + e.maxY) / 2;
|
|
30289
30354
|
let s = 0, a = 0;
|
|
30290
|
-
switch (
|
|
30355
|
+
switch (t) {
|
|
30291
30356
|
case void 0:
|
|
30292
30357
|
case j.TopLeft:
|
|
30293
|
-
s =
|
|
30358
|
+
s = -e.minX, a = -e.maxY;
|
|
30294
30359
|
break;
|
|
30295
30360
|
case j.TopCenter:
|
|
30296
|
-
s
|
|
30361
|
+
s = -r, a = -e.maxY;
|
|
30297
30362
|
break;
|
|
30298
30363
|
case j.TopRight:
|
|
30299
|
-
s
|
|
30364
|
+
s = -e.maxX, a = -e.maxY;
|
|
30300
30365
|
break;
|
|
30301
30366
|
case j.MiddleLeft:
|
|
30302
|
-
s =
|
|
30367
|
+
s = -e.minX, a = -i;
|
|
30303
30368
|
break;
|
|
30304
30369
|
case j.MiddleCenter:
|
|
30305
|
-
s
|
|
30370
|
+
s = -r, a = -i;
|
|
30306
30371
|
break;
|
|
30307
30372
|
case j.MiddleRight:
|
|
30308
|
-
s
|
|
30373
|
+
s = -e.maxX, a = -i;
|
|
30309
30374
|
break;
|
|
30310
30375
|
case j.BottomLeft:
|
|
30311
|
-
|
|
30312
|
-
s = 0, a += t;
|
|
30376
|
+
s = -e.minX, a = -e.minY;
|
|
30313
30377
|
break;
|
|
30314
30378
|
case j.BottomCenter:
|
|
30315
|
-
|
|
30316
|
-
s -= e / 2, a += t;
|
|
30379
|
+
s = -r, a = -e.minY;
|
|
30317
30380
|
break;
|
|
30318
30381
|
case j.BottomRight:
|
|
30382
|
+
s = -e.maxX, a = -e.minY;
|
|
30383
|
+
break;
|
|
30384
|
+
case j.BaselineLeft:
|
|
30385
|
+
s = -e.minX, a = -e.baselineY;
|
|
30386
|
+
break;
|
|
30387
|
+
case j.BaselineCenter:
|
|
30388
|
+
s = -r, a = -e.baselineY;
|
|
30389
|
+
break;
|
|
30319
30390
|
case j.BaselineRight:
|
|
30320
|
-
s
|
|
30391
|
+
s = -e.maxX, a = -e.baselineY;
|
|
30321
30392
|
break;
|
|
30322
30393
|
}
|
|
30323
|
-
return
|
|
30394
|
+
return { x: s, y: a };
|
|
30324
30395
|
}
|
|
30325
30396
|
/**
|
|
30326
|
-
*
|
|
30327
|
-
*
|
|
30328
|
-
*
|
|
30397
|
+
* Walks a laid-out MText subgraph and accumulates world-space character hit boxes and
|
|
30398
|
+
* soft line rectangles for {@link MText.createLayoutData} (raycasting, cursors, debug).
|
|
30399
|
+
*
|
|
30400
|
+
* @remarks
|
|
30401
|
+
* - When `userData.layout.chars` is present, entries are transformed with
|
|
30402
|
+
* {@link buildCharBoxesFromObject} and appended to `chars`, then recursion stops
|
|
30403
|
+
* for that branch (char metadata is authoritative).
|
|
30404
|
+
* - When only mesh/line geometry exists, a single synthetic {@link CharBox} wrapping
|
|
30405
|
+
* the geometry AABB may be emitted.
|
|
30406
|
+
* - `userData.lineLayouts` rows are converted to world-space center `y` and height.
|
|
30407
|
+
*
|
|
30408
|
+
* @param object - Node to traverse (typically the root group from {@link MText.loadMText}).
|
|
30409
|
+
* @param chars - Output collection; receives merged {@link CharBox} entries in world space.
|
|
30410
|
+
* @param lines - Output collection; receives {@link LineLayout} summaries per line break.
|
|
30329
30411
|
*/
|
|
30330
30412
|
getLayout(e, t, r) {
|
|
30331
30413
|
var o, h, c, u, f;
|
|
@@ -30350,7 +30432,7 @@ var P1 = Fc((L) => {
|
|
|
30350
30432
|
const l = e.geometry;
|
|
30351
30433
|
if (!((f = l.userData) != null && f.isDecoration)) {
|
|
30352
30434
|
l.boundingBox === null && l.computeBoundingBox();
|
|
30353
|
-
const p = new
|
|
30435
|
+
const p = new ke().copy(l.boundingBox);
|
|
30354
30436
|
p.applyMatrix4(e.matrixWorld), t.push({
|
|
30355
30437
|
type: ye.CHAR,
|
|
30356
30438
|
box: p,
|
|
@@ -30363,36 +30445,67 @@ var P1 = Fc((L) => {
|
|
|
30363
30445
|
for (let l = 0, p = a.length; l < p; l++)
|
|
30364
30446
|
this.getLayout(a[l], t, r);
|
|
30365
30447
|
}
|
|
30448
|
+
/**
|
|
30449
|
+
* Depth-first union of this MText’s {@link MText.box} from layout metadata and mesh
|
|
30450
|
+
* geometry, while optionally tracking coarse line AABB in `lineBounds`.
|
|
30451
|
+
*
|
|
30452
|
+
* @remarks
|
|
30453
|
+
* Priority order per node:
|
|
30454
|
+
* 1. If `userData.logicalBounds` exists (set in {@link MText.loadMText}), union that
|
|
30455
|
+
* axis-aligned rectangle transformed by `matrixWorld` — this reflects anchored
|
|
30456
|
+
* logical extents even when individual glyphs are expensive to union.
|
|
30457
|
+
* 2. Else if `userData.lineLayouts` exists, expand `lineBounds` from the world-space
|
|
30458
|
+
* top/bottom of each line strip (used as a fallback when no logical bounds were
|
|
30459
|
+
* written, e.g. legacy paths).
|
|
30460
|
+
* 3. Else if `userData.layout.chars` exists, union each transformed char AABB.
|
|
30461
|
+
* 4. Else for mesh/line primitives, union non-decoration geometry bounds.
|
|
30462
|
+
* 5. Always recurse into children.
|
|
30463
|
+
*
|
|
30464
|
+
* @param object - Current scene graph node.
|
|
30465
|
+
* @param lineBounds - Mutable accumulator: `hasLine`/`min*`/`max*` track the union of
|
|
30466
|
+
* line-layout strips in world space; `hasLogicalBounds` flips true when any child
|
|
30467
|
+
* contributed `logicalBounds` so {@link MText.syncDraw} can avoid double-counting
|
|
30468
|
+
* vertical extent from line strips alone.
|
|
30469
|
+
*/
|
|
30366
30470
|
updateBoxFromObject(e, t) {
|
|
30367
|
-
var
|
|
30471
|
+
var o, h, c, u, f, l;
|
|
30368
30472
|
e.updateWorldMatrix(!1, !1);
|
|
30369
|
-
const r = (
|
|
30370
|
-
|
|
30371
|
-
|
|
30473
|
+
const r = (o = e.userData) == null ? void 0 : o.logicalBounds;
|
|
30474
|
+
if (r) {
|
|
30475
|
+
t.hasLogicalBounds = !0;
|
|
30476
|
+
const p = new ke(
|
|
30477
|
+
new E(r.minX, r.minY, 0),
|
|
30478
|
+
new E(r.maxX, r.maxY, 0)
|
|
30479
|
+
);
|
|
30480
|
+
p.applyMatrix4(e.matrixWorld), this.box.union(p);
|
|
30481
|
+
}
|
|
30482
|
+
const i = (h = e.userData) == null ? void 0 : h.lineLayouts;
|
|
30483
|
+
i && i.length > 0 && i.forEach((p) => {
|
|
30484
|
+
pt.set(0, p.y - p.height / 2, 0).applyMatrix4(e.matrixWorld), dt.set(0, p.y + p.height / 2, 0).applyMatrix4(e.matrixWorld), t.hasLine = !0, t.minX = Math.min(t.minX, pt.x, dt.x), t.maxX = Math.max(t.maxX, pt.x, dt.x), t.minY = Math.min(t.minY, pt.y, dt.y), t.maxY = Math.max(t.maxY, pt.y, dt.y), t.minZ = Math.min(t.minZ, pt.z, dt.z), t.maxZ = Math.max(t.maxZ, pt.z, dt.z);
|
|
30372
30485
|
});
|
|
30373
|
-
const
|
|
30374
|
-
if (
|
|
30375
|
-
const
|
|
30486
|
+
const s = (u = (c = e.userData) == null ? void 0 : c.layout) == null ? void 0 : u.chars;
|
|
30487
|
+
if (s && s.length > 0) {
|
|
30488
|
+
const p = (f = e.userData) == null ? void 0 : f.charBoxType;
|
|
30376
30489
|
Ko(
|
|
30377
|
-
|
|
30490
|
+
s,
|
|
30378
30491
|
e.matrixWorld,
|
|
30379
|
-
|
|
30380
|
-
).forEach((
|
|
30381
|
-
|
|
30492
|
+
p
|
|
30493
|
+
).forEach((m) => {
|
|
30494
|
+
m.box && this.box.union(m.box);
|
|
30382
30495
|
});
|
|
30383
30496
|
return;
|
|
30384
30497
|
}
|
|
30385
30498
|
if (e instanceof jn || e instanceof Hr) {
|
|
30386
|
-
const
|
|
30387
|
-
if (!((
|
|
30388
|
-
|
|
30389
|
-
const
|
|
30390
|
-
|
|
30499
|
+
const p = e.geometry;
|
|
30500
|
+
if (!((l = p.userData) != null && l.isDecoration)) {
|
|
30501
|
+
p.boundingBox === null && p.computeBoundingBox();
|
|
30502
|
+
const d = new ke().copy(p.boundingBox);
|
|
30503
|
+
d.applyMatrix4(e.matrixWorld), this.box.union(d);
|
|
30391
30504
|
}
|
|
30392
30505
|
}
|
|
30393
|
-
const
|
|
30394
|
-
for (let
|
|
30395
|
-
this.updateBoxFromObject(
|
|
30506
|
+
const a = e.children;
|
|
30507
|
+
for (let p = 0, d = a.length; p < d; p++)
|
|
30508
|
+
this.updateBoxFromObject(a[p], t);
|
|
30396
30509
|
}
|
|
30397
30510
|
/**
|
|
30398
30511
|
* Remove the specified object from its parent and release geometry and material resource used
|
|
@@ -30418,6 +30531,13 @@ var P1 = Fc((L) => {
|
|
|
30418
30531
|
}
|
|
30419
30532
|
});
|
|
30420
30533
|
}
|
|
30534
|
+
/**
|
|
30535
|
+
* Normalizes a font file reference to the lowercase stem used by
|
|
30536
|
+
* {@link FontManager.loadFontsByNames} (strip extension).
|
|
30537
|
+
*
|
|
30538
|
+
* @param fontFileName - Style font path such as `arial.ttf` or extension-less name.
|
|
30539
|
+
* @returns Lowercase name without the last extension segment, or `undefined` if empty.
|
|
30540
|
+
*/
|
|
30421
30541
|
getFontName(e) {
|
|
30422
30542
|
if (e) {
|
|
30423
30543
|
const t = e.lastIndexOf(".");
|
|
@@ -30568,14 +30688,14 @@ var P1 = Fc((L) => {
|
|
|
30568
30688
|
if (h instanceof ze) {
|
|
30569
30689
|
const u = r.matrixWorld.clone(), f = new E(), l = new zt(), p = new E();
|
|
30570
30690
|
u.decompose(f, l, p);
|
|
30571
|
-
const
|
|
30691
|
+
const d = {};
|
|
30572
30692
|
h.attributes && Object.keys(h.attributes).forEach((w) => {
|
|
30573
30693
|
const b = h.attributes[w], B = new Uint8Array(
|
|
30574
30694
|
b.array.buffer,
|
|
30575
30695
|
b.array.byteOffset,
|
|
30576
30696
|
b.array.byteLength
|
|
30577
30697
|
).slice().buffer;
|
|
30578
|
-
t.push(B),
|
|
30698
|
+
t.push(B), d[w] = {
|
|
30579
30699
|
arrayBuffer: B,
|
|
30580
30700
|
byteOffset: 0,
|
|
30581
30701
|
// Since we copied, offset is 0
|
|
@@ -30624,7 +30744,7 @@ var P1 = Fc((L) => {
|
|
|
30624
30744
|
z: p.z
|
|
30625
30745
|
},
|
|
30626
30746
|
geometry: {
|
|
30627
|
-
attributes:
|
|
30747
|
+
attributes: d,
|
|
30628
30748
|
index: m
|
|
30629
30749
|
},
|
|
30630
30750
|
material: x,
|