iflow-engine-base 1.0.4 → 1.0.6
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/bim-engine-sdk.es.js +714 -649
- package/dist/bim-engine-sdk.es.js.map +1 -1
- package/dist/bim-engine-sdk.umd.js +15 -15
- package/dist/bim-engine-sdk.umd.js.map +1 -1
- package/dist/iflow-engine-base.css +1 -1
- package/dist/index.d.ts +29 -13
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as E from "three";
|
|
2
|
-
import { Controls as Na, Vector3 as Z, MOUSE as fn, TOUCH as cn, Quaternion as ki, Spherical as fr, Vector2 as ce, Ray as Js, Plane as Ui, MathUtils as Lo, Mesh as Qs, OrthographicCamera as Bo, BufferGeometry as Fi, Float32BufferAttribute as dr, ShaderMaterial as et, UniformsUtils as yt, WebGLRenderTarget as dn, HalfFloatType as pn, NoBlending as pt, Clock as Oa, Color as je, Matrix4 as Me, DataTexture as Io, RepeatWrapping as Zt, MeshNormalMaterial as Ua, AddEquation as Hn, ZeroFactor as Gn, DstAlphaFactor as pr, DstColorFactor as mr, CustomBlending as Fa, DepthTexture as Va, DepthStencilFormat as ja, UnsignedInt248Type as Ha, NearestFilter as Ri, RGBAFormat as Ga, UnsignedByteType as Wa, AdditiveBlending as Xa, MeshBasicMaterial as hn, RawShaderMaterial as qa, ColorManagement as Li, SRGBTransfer as Ka, LinearToneMapping as Za, ReinhardToneMapping as Ya, CineonToneMapping as $a, ACESFilmicToneMapping as Ja, AgXToneMapping as Qa, NeutralToneMapping as el, CustomToneMapping as tl, Loader as zo, FileLoader as Bi, SRGBColorSpace as kt, LinearSRGBColorSpace as lt, BufferAttribute as at, InterleavedBuffer as No, InterleavedBufferAttribute as Oo, TrianglesDrawMode as nl, TriangleFanDrawMode as ks, TriangleStripDrawMode as Uo, LoaderUtils as
|
|
2
|
+
import { Controls as Na, Vector3 as Z, MOUSE as fn, TOUCH as cn, Quaternion as ki, Spherical as fr, Vector2 as ce, Ray as Js, Plane as Ui, MathUtils as Lo, Mesh as Qs, OrthographicCamera as Bo, BufferGeometry as Fi, Float32BufferAttribute as dr, ShaderMaterial as et, UniformsUtils as yt, WebGLRenderTarget as dn, HalfFloatType as pn, NoBlending as pt, Clock as Oa, Color as je, Matrix4 as Me, DataTexture as Io, RepeatWrapping as Zt, MeshNormalMaterial as Ua, AddEquation as Hn, ZeroFactor as Gn, DstAlphaFactor as pr, DstColorFactor as mr, CustomBlending as Fa, DepthTexture as Va, DepthStencilFormat as ja, UnsignedInt248Type as Ha, NearestFilter as Ri, RGBAFormat as Ga, UnsignedByteType as Wa, AdditiveBlending as Xa, MeshBasicMaterial as hn, RawShaderMaterial as qa, ColorManagement as Li, SRGBTransfer as Ka, LinearToneMapping as Za, ReinhardToneMapping as Ya, CineonToneMapping as $a, ACESFilmicToneMapping as Ja, AgXToneMapping as Qa, NeutralToneMapping as el, CustomToneMapping as tl, Loader as zo, FileLoader as Bi, SRGBColorSpace as kt, LinearSRGBColorSpace as lt, BufferAttribute as at, InterleavedBuffer as No, InterleavedBufferAttribute as Oo, TrianglesDrawMode as nl, TriangleFanDrawMode as ks, TriangleStripDrawMode as Uo, LoaderUtils as In, MeshPhysicalMaterial as ht, SpotLight as il, PointLight as sl, DirectionalLight as rl, InstancedMesh as ol, InstancedBufferAttribute as al, Object3D as Fo, TextureLoader as ll, ImageBitmapLoader as cl, LinearMipmapLinearFilter as Vo, NearestMipmapLinearFilter as hl, LinearMipmapNearestFilter as ul, NearestMipmapNearestFilter as fl, LinearFilter as Rs, MirroredRepeatWrapping as dl, ClampToEdgeWrapping as pl, PointsMaterial as ml, Material as Zi, LineBasicMaterial as gl, MeshStandardMaterial as jo, DoubleSide as Vi, PropertyBinding as yl, SkinnedMesh as _l, LineSegments as wl, Line as xl, LineLoop as bl, Points as vl, Group as Yi, PerspectiveCamera as Sl, Skeleton as Tl, AnimationClip as El, Bone as Al, InterpolateDiscrete as Ml, InterpolateLinear as Ho, Texture as gr, VectorKeyframeTrack as yr, NumberKeyframeTrack as _r, QuaternionKeyframeTrack as wr, FrontSide as Ls, Interpolant as Cl, Box3 as nt, Sphere as Pl, Line3 as Ze, Triangle as Oe, BackSide as Dl, REVISION as Go, Vector4 as $t, Matrix3 as kl } from "three";
|
|
3
3
|
class Rl {
|
|
4
4
|
engine;
|
|
5
5
|
scene;
|
|
@@ -876,7 +876,7 @@ function tr(s) {
|
|
|
876
876
|
}
|
|
877
877
|
function i(f) {
|
|
878
878
|
const d = new E.Vector2(), p = s.renderer.domElement.clientWidth, u = s.renderer.domElement.clientHeight;
|
|
879
|
-
return d.x = f.
|
|
879
|
+
return d.x = f.offsetX / p * 2 - 1, d.y = -(f.offsetY / u) * 2 + 1, d;
|
|
880
880
|
}
|
|
881
881
|
function o(f) {
|
|
882
882
|
const d = new E.Raycaster(), p = i(f);
|
|
@@ -914,16 +914,16 @@ function tr(s) {
|
|
|
914
914
|
g || (g = [0, 0, []]);
|
|
915
915
|
let y = "face", _ = [], w = [], x = 5;
|
|
916
916
|
if (g[2].map((C) => C[0]).forEach((C) => {
|
|
917
|
-
let P = new E.Vector3(C.X, C.Z, -C.Y), D = s.worldToScreen.worldToScreen(P), B = Math.sqrt(Math.pow(D.x - d.
|
|
917
|
+
let P = new E.Vector3(C.X, C.Z, -C.Y), D = s.worldToScreen.worldToScreen(P), B = Math.sqrt(Math.pow(D.x - d.offsetX, 2) + Math.pow(D.y - d.offsetY, 2));
|
|
918
918
|
B < x && (x = B, _.push({
|
|
919
919
|
point: P,
|
|
920
920
|
distance: B,
|
|
921
921
|
pointxy: D
|
|
922
922
|
}));
|
|
923
923
|
}), _.length > 0 ? (_.sort((C, P) => C.distance - P.distance), y = "point") : (g[2].forEach((C) => {
|
|
924
|
-
let P = new E.Vector3(C[0].X, C[0].Z, -C[0].Y), D = new E.Vector3(C[1].X, C[1].Z, -C[1].Y), B = s.worldToScreen.worldToScreen(P), T = s.worldToScreen.worldToScreen(D), R =
|
|
924
|
+
let P = new E.Vector3(C[0].X, C[0].Z, -C[0].Y), D = new E.Vector3(C[1].X, C[1].Z, -C[1].Y), B = s.worldToScreen.worldToScreen(P), T = s.worldToScreen.worldToScreen(D), R = b(new E.Vector2(d.offsetX, d.offsetY), B, T);
|
|
925
925
|
if (R < x) {
|
|
926
|
-
let
|
|
926
|
+
let v = M(new E.Vector2(d.offsetX, d.offsetY), B, T), I = A(v, P, D);
|
|
927
927
|
w.push({
|
|
928
928
|
distance: R,
|
|
929
929
|
point: I,
|
|
@@ -936,30 +936,30 @@ function tr(s) {
|
|
|
936
936
|
const C = s.worldToScreen.worldToScreen(_[0].point);
|
|
937
937
|
console.log("捕捉点屏幕坐标:", C.x, C.y), console.log("Canvas尺寸:", s.renderer.domElement.width, s.renderer.domElement.height), console.log("SVG尺寸:", s.catchSvg.clientWidth, s.catchSvg.clientHeight), s.catchSvg.innerHTML = "";
|
|
938
938
|
const P = document.createElementNS("http://www.w3.org/2000/svg", "circle");
|
|
939
|
-
P.setAttribute("class", "catchPoint"), P.setAttribute("cx", C.x.toString()), P.setAttribute("cy", C.y.toString()), P.setAttribute("r", "5"), P.setAttribute("fill", "rgb(0, 255, 247)"), s.catchSvg.appendChild(P);
|
|
939
|
+
P.setAttribute("class", "catchPoint"), P.setAttribute("cx", (C.x + s.reactBoundingClientRect.left).toString()), P.setAttribute("cy", (C.y + s.reactBoundingClientRect.top).toString()), P.setAttribute("r", "5"), P.setAttribute("fill", "rgb(0, 255, 247)"), s.catchSvg.appendChild(P);
|
|
940
940
|
} else if (y == "line" && e.options.showCatch) {
|
|
941
941
|
const C = s.worldToScreen.worldToScreen(w[0].point), P = w[0].start, D = w[0].end;
|
|
942
942
|
console.log("捕捉点屏幕坐标:", C.x, C.y), console.log("Canvas尺寸:", s.renderer.domElement.width, s.renderer.domElement.height), console.log("SVG尺寸:", s.catchSvg.clientWidth, s.catchSvg.clientHeight), s.catchSvg.innerHTML = "";
|
|
943
943
|
const B = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
944
|
-
B.setAttribute("class", "catchLine"), B.setAttribute("x1", P.x.toString()), B.setAttribute("y1", P.y.toString()), B.setAttribute("x2", D.x.toString()), B.setAttribute("y2", D.y.toString()), B.setAttribute("stroke", "rgb(0, 255, 247)"), B.setAttribute("stroke-width", "2"), s.catchSvg.appendChild(B);
|
|
944
|
+
B.setAttribute("class", "catchLine"), B.setAttribute("x1", (P.x + s.reactBoundingClientRect.left).toString()), B.setAttribute("y1", (P.y + s.reactBoundingClientRect.top).toString()), B.setAttribute("x2", (D.x + s.reactBoundingClientRect.left).toString()), B.setAttribute("y2", (D.y + s.reactBoundingClientRect.top).toString()), B.setAttribute("stroke", "rgb(0, 255, 247)"), B.setAttribute("stroke-width", "2"), s.catchSvg.appendChild(B);
|
|
945
945
|
} else if (y == "face" && e.options.showCatch) {
|
|
946
946
|
let C = p[0].point.clone(), P = p[0].normal || (p[0].face ? p[0].face.normal : null);
|
|
947
|
-
const D = (P ? P.clone() : new E.Vector3(0, 0, 1)).normalize(), B = Math.abs(D.y) < 0.9 ? new E.Vector3(0, 1, 0) : new E.Vector3(1, 0, 0), T = new E.Vector3().crossVectors(D, B).normalize(), R = new E.Vector3().crossVectors(D, T).normalize(),
|
|
948
|
-
new E.Vector3().copy(T).add(R).multiplyScalar(
|
|
949
|
-
new E.Vector3().copy(T).sub(R).multiplyScalar(
|
|
950
|
-
new E.Vector3().copy(T).multiplyScalar(-1).sub(R).multiplyScalar(
|
|
951
|
-
new E.Vector3().copy(T).multiplyScalar(-1).add(R).multiplyScalar(
|
|
947
|
+
const D = (P ? P.clone() : new E.Vector3(0, 0, 1)).normalize(), B = Math.abs(D.y) < 0.9 ? new E.Vector3(0, 1, 0) : new E.Vector3(1, 0, 0), T = new E.Vector3().crossVectors(D, B).normalize(), R = new E.Vector3().crossVectors(D, T).normalize(), v = 0.05, H = [
|
|
948
|
+
new E.Vector3().copy(T).add(R).multiplyScalar(v),
|
|
949
|
+
new E.Vector3().copy(T).sub(R).multiplyScalar(v),
|
|
950
|
+
new E.Vector3().copy(T).multiplyScalar(-1).sub(R).multiplyScalar(v),
|
|
951
|
+
new E.Vector3().copy(T).multiplyScalar(-1).add(R).multiplyScalar(v)
|
|
952
952
|
].map((j) => new E.Vector3().copy(C).add(j)).map((j) => s.worldToScreen.worldToScreen(j));
|
|
953
953
|
s.catchSvg.innerHTML = "";
|
|
954
954
|
const ee = document.createElementNS("http://www.w3.org/2000/svg", "polygon");
|
|
955
|
-
ee.setAttribute("class", "catchFace"), ee.setAttribute("points", H.map((j) => `${j.x},${j.y}`).join(" ")), ee.setAttribute("fill", "rgba(1, 238, 255, 0.2)"), ee.setAttribute("stroke", "rgb(0, 255, 247)"), ee.setAttribute("stroke-width", "1"), s.catchSvg.appendChild(ee);
|
|
955
|
+
ee.setAttribute("class", "catchFace"), ee.setAttribute("points", H.map((j) => `${j.x + s.reactBoundingClientRect.left},${j.y + s.reactBoundingClientRect.top}`).join(" ")), ee.setAttribute("fill", "rgba(1, 238, 255, 0.2)"), ee.setAttribute("stroke", "rgb(0, 255, 247)"), ee.setAttribute("stroke-width", "1"), s.catchSvg.appendChild(ee);
|
|
956
956
|
}
|
|
957
957
|
return p[0];
|
|
958
|
-
function
|
|
958
|
+
function b(C, P, D) {
|
|
959
959
|
const B = new E.Vector2().subVectors(D, P), T = B.lengthSq();
|
|
960
960
|
if (T < 1e-10)
|
|
961
961
|
return C.distanceTo(P);
|
|
962
|
-
const R = new E.Vector2().subVectors(C, P),
|
|
962
|
+
const R = new E.Vector2().subVectors(C, P), v = E.MathUtils.clamp(R.dot(B) / T, 0, 1), I = new E.Vector2().copy(B).multiplyScalar(v).add(P);
|
|
963
963
|
return C.distanceTo(I);
|
|
964
964
|
}
|
|
965
965
|
function M(C, P, D) {
|
|
@@ -985,13 +985,14 @@ class Yl {
|
|
|
985
985
|
handelBehaved;
|
|
986
986
|
isDragging = !1;
|
|
987
987
|
isDown = !1;
|
|
988
|
+
containerOffset = { left: 0, top: 0 };
|
|
988
989
|
constructor(e) {
|
|
989
990
|
this.engine = e, this.init(), this.handelBehaved = tr(this.engine), this.handelBehaved.init(this, null), this.handelBehaved.active();
|
|
990
991
|
}
|
|
991
992
|
init() {
|
|
992
993
|
this.orbitControls = new Nl(this.engine, this.engine.camera, this.engine.renderer.domElement), this.orbitControls.showOriginIcon = !0, this.firstPersonControls = new vr(this.engine, this.engine.camera, this.engine.renderer.domElement);
|
|
993
994
|
const e = document.createElement("div");
|
|
994
|
-
this.originDiv = e, e.className = "originDiv", e.style.position = "absolute", e.style.top = "
|
|
995
|
+
this.originDiv = e, e.className = "originDiv", e.style.position = "absolute", e.style.top = "0px", e.style.left = "0px", e.style.width = "30px", e.style.height = "30px", e.style.borderRadius = "50%", e.style.pointerEvents = "none", e.style.backgroundImage = "url(./assets/svg/rotate-orbit.svg)", this.engine.container.appendChild(this.originDiv);
|
|
995
996
|
}
|
|
996
997
|
active() {
|
|
997
998
|
this.isActive = !0, this.orbitControls.enabled = !0;
|
|
@@ -1029,7 +1030,7 @@ class Yl {
|
|
|
1029
1030
|
update() {
|
|
1030
1031
|
if (this.firstPersonControls.enabled && this.firstPersonControls.update(), this.orbitControls.enabled) {
|
|
1031
1032
|
const e = this.engine.controlModule.orbitControls.origin, n = this.engine.worldToScreen.worldToScreen(e);
|
|
1032
|
-
this.originDiv && this.isDragging ? (this.originDiv.style.left = n.x - 15 + "px", this.originDiv.style.top = n.y - 15 + "px", this.originDiv.style.display = "block") : this.originDiv && (this.originDiv.style.display = "none");
|
|
1033
|
+
this.originDiv && this.isDragging ? (this.originDiv.style.left = n.x - 15 + this.engine.reactBoundingClientRect.left + "px", this.originDiv.style.top = n.y - 15 + this.engine.reactBoundingClientRect.top + "px", this.originDiv.style.display = "block") : this.originDiv && (this.originDiv.style.display = "none");
|
|
1033
1034
|
}
|
|
1034
1035
|
}
|
|
1035
1036
|
}
|
|
@@ -2059,13 +2060,13 @@ class oc {
|
|
|
2059
2060
|
const r = 0.5 * (Math.sqrt(3) - 1), a = (e + t) * r, l = Math.floor(e + a), h = Math.floor(t + a), c = (3 - Math.sqrt(3)) / 6, f = (l + h) * c, d = l - f, p = h - f, u = e - d, m = t - p;
|
|
2060
2061
|
let g, y;
|
|
2061
2062
|
u > m ? (g = 1, y = 0) : (g = 0, y = 1);
|
|
2062
|
-
const _ = u - g + c, w = m - y + c, x = u - 1 + 2 * c,
|
|
2063
|
+
const _ = u - g + c, w = m - y + c, x = u - 1 + 2 * c, b = m - 1 + 2 * c, M = l & 255, A = h & 255, C = this.perm[M + this.perm[A]] % 12, P = this.perm[M + g + this.perm[A + y]] % 12, D = this.perm[M + 1 + this.perm[A + 1]] % 12;
|
|
2063
2064
|
let B = 0.5 - u * u - m * m;
|
|
2064
2065
|
B < 0 ? n = 0 : (B *= B, n = B * B * this._dot(this.grad3[C], u, m));
|
|
2065
2066
|
let T = 0.5 - _ * _ - w * w;
|
|
2066
2067
|
T < 0 ? i = 0 : (T *= T, i = T * T * this._dot(this.grad3[P], _, w));
|
|
2067
|
-
let R = 0.5 - x * x -
|
|
2068
|
-
return R < 0 ? o = 0 : (R *= R, o = R * R * this._dot(this.grad3[D], x,
|
|
2068
|
+
let R = 0.5 - x * x - b * b;
|
|
2069
|
+
return R < 0 ? o = 0 : (R *= R, o = R * R * this._dot(this.grad3[D], x, b)), 70 * (n + i + o);
|
|
2069
2070
|
}
|
|
2070
2071
|
/**
|
|
2071
2072
|
* A 3D simplex noise method.
|
|
@@ -2078,15 +2079,15 @@ class oc {
|
|
|
2078
2079
|
noise3d(e, t, n) {
|
|
2079
2080
|
let i, o, r, a;
|
|
2080
2081
|
const h = (e + t + n) * 0.3333333333333333, c = Math.floor(e + h), f = Math.floor(t + h), d = Math.floor(n + h), p = 1 / 6, u = (c + f + d) * p, m = c - u, g = f - u, y = d - u, _ = e - m, w = t - g, x = n - y;
|
|
2081
|
-
let
|
|
2082
|
-
_ >= w ? w >= x ? (
|
|
2083
|
-
const B = _ -
|
|
2082
|
+
let b, M, A, C, P, D;
|
|
2083
|
+
_ >= w ? w >= x ? (b = 1, M = 0, A = 0, C = 1, P = 1, D = 0) : _ >= x ? (b = 1, M = 0, A = 0, C = 1, P = 0, D = 1) : (b = 0, M = 0, A = 1, C = 1, P = 0, D = 1) : w < x ? (b = 0, M = 0, A = 1, C = 0, P = 1, D = 1) : _ < x ? (b = 0, M = 1, A = 0, C = 0, P = 1, D = 1) : (b = 0, M = 1, A = 0, C = 1, P = 1, D = 0);
|
|
2084
|
+
const B = _ - b + p, T = w - M + p, R = x - A + p, v = _ - C + 2 * p, I = w - P + 2 * p, q = x - D + 2 * p, H = _ - 1 + 3 * p, ee = w - 1 + 3 * p, j = x - 1 + 3 * p, ne = c & 255, O = f & 255, N = d & 255, te = this.perm[ne + this.perm[O + this.perm[N]]] % 12, J = this.perm[ne + b + this.perm[O + M + this.perm[N + A]]] % 12, K = this.perm[ne + C + this.perm[O + P + this.perm[N + D]]] % 12, fe = this.perm[ne + 1 + this.perm[O + 1 + this.perm[N + 1]]] % 12;
|
|
2084
2085
|
let pe = 0.6 - _ * _ - w * w - x * x;
|
|
2085
2086
|
pe < 0 ? i = 0 : (pe *= pe, i = pe * pe * this._dot3(this.grad3[te], _, w, x));
|
|
2086
2087
|
let se = 0.6 - B * B - T * T - R * R;
|
|
2087
2088
|
se < 0 ? o = 0 : (se *= se, o = se * se * this._dot3(this.grad3[J], B, T, R));
|
|
2088
|
-
let oe = 0.6 -
|
|
2089
|
-
oe < 0 ? r = 0 : (oe *= oe, r = oe * oe * this._dot3(this.grad3[K],
|
|
2089
|
+
let oe = 0.6 - v * v - I * I - q * q;
|
|
2090
|
+
oe < 0 ? r = 0 : (oe *= oe, r = oe * oe * this._dot3(this.grad3[K], v, I, q));
|
|
2090
2091
|
let ue = 0.6 - H * H - ee * ee - j * j;
|
|
2091
2092
|
return ue < 0 ? a = 0 : (ue *= ue, a = ue * ue * this._dot3(this.grad3[fe], H, ee, j)), 32 * (i + o + r + a);
|
|
2092
2093
|
}
|
|
@@ -2102,7 +2103,7 @@ class oc {
|
|
|
2102
2103
|
noise4d(e, t, n, i) {
|
|
2103
2104
|
const o = this.grad4, r = this.simplex, a = this.perm, l = (Math.sqrt(5) - 1) / 4, h = (5 - Math.sqrt(5)) / 20;
|
|
2104
2105
|
let c, f, d, p, u;
|
|
2105
|
-
const m = (e + t + n + i) * l, g = Math.floor(e + m), y = Math.floor(t + m), _ = Math.floor(n + m), w = Math.floor(i + m), x = (g + y + _ + w) * h,
|
|
2106
|
+
const m = (e + t + n + i) * l, g = Math.floor(e + m), y = Math.floor(t + m), _ = Math.floor(n + m), w = Math.floor(i + m), x = (g + y + _ + w) * h, b = g - x, M = y - x, A = _ - x, C = w - x, P = e - b, D = t - M, B = n - A, T = i - C, R = P > D ? 32 : 0, v = P > B ? 16 : 0, I = D > B ? 8 : 0, q = P > T ? 4 : 0, H = D > T ? 2 : 0, ee = B > T ? 1 : 0, j = R + v + I + q + H + ee, ne = r[j][0] >= 3 ? 1 : 0, O = r[j][1] >= 3 ? 1 : 0, N = r[j][2] >= 3 ? 1 : 0, te = r[j][3] >= 3 ? 1 : 0, J = r[j][0] >= 2 ? 1 : 0, K = r[j][1] >= 2 ? 1 : 0, fe = r[j][2] >= 2 ? 1 : 0, pe = r[j][3] >= 2 ? 1 : 0, se = r[j][0] >= 1 ? 1 : 0, oe = r[j][1] >= 1 ? 1 : 0, ue = r[j][2] >= 1 ? 1 : 0, me = r[j][3] >= 1 ? 1 : 0, Se = P - ne + h, Re = D - O + h, S = B - N + h, G = T - te + h, V = P - J + 2 * h, L = D - K + 2 * h, k = B - fe + 2 * h, z = T - pe + 2 * h, W = P - se + 3 * h, X = D - oe + 3 * h, U = B - ue + 3 * h, Y = T - me + 3 * h, Q = P - 1 + 4 * h, $ = D - 1 + 4 * h, ie = B - 1 + 4 * h, he = T - 1 + 4 * h, ae = g & 255, Te = y & 255, $e = _ & 255, De = w & 255, Lt = a[ae + a[Te + a[$e + a[De]]]] % 32, ye = a[ae + ne + a[Te + O + a[$e + N + a[De + te]]]] % 32, en = a[ae + J + a[Te + K + a[$e + fe + a[De + pe]]]] % 32, vn = a[ae + se + a[Te + oe + a[$e + ue + a[De + me]]]] % 32, Je = a[ae + 1 + a[Te + 1 + a[$e + 1 + a[De + 1]]]] % 32;
|
|
2106
2107
|
let vt = 0.6 - P * P - D * D - B * B - T * T;
|
|
2107
2108
|
vt < 0 ? c = 0 : (vt *= vt, c = vt * vt * this._dot4(o[Lt], P, D, B, T));
|
|
2108
2109
|
let Bt = 0.6 - Se * Se - Re * Re - S * S - G * G;
|
|
@@ -2110,7 +2111,7 @@ class oc {
|
|
|
2110
2111
|
let It = 0.6 - V * V - L * L - k * k - z * z;
|
|
2111
2112
|
It < 0 ? d = 0 : (It *= It, d = It * It * this._dot4(o[en], V, L, k, z));
|
|
2112
2113
|
let zt = 0.6 - W * W - X * X - U * U - Y * Y;
|
|
2113
|
-
zt < 0 ? p = 0 : (zt *= zt, p = zt * zt * this._dot4(o[
|
|
2114
|
+
zt < 0 ? p = 0 : (zt *= zt, p = zt * zt * this._dot4(o[vn], W, X, U, Y));
|
|
2114
2115
|
let St = 0.6 - Q * Q - $ * $ - ie * ie - he * he;
|
|
2115
2116
|
return St < 0 ? u = 0 : (St *= St, u = St * St * this._dot4(o[Je], Q, $, ie, he)), 27 * (c + f + d + p + u);
|
|
2116
2117
|
}
|
|
@@ -3177,17 +3178,17 @@ function fc() {
|
|
|
3177
3178
|
return g;
|
|
3178
3179
|
}
|
|
3179
3180
|
function r(p, u, m, g, y, _) {
|
|
3180
|
-
var w, x,
|
|
3181
|
+
var w, x, b = p.file, M = p.compression, A = _ !== h.utf8encode, C = a.transformTo("string", _(b.name)), P = a.transformTo("string", h.utf8encode(b.name)), D = b.comment, B = a.transformTo("string", _(D)), T = a.transformTo("string", h.utf8encode(D)), R = P.length !== b.name.length, v = T.length !== D.length, I = "", q = "", H = "", ee = b.dir, j = b.date, ne = { crc32: 0, compressedSize: 0, uncompressedSize: 0 };
|
|
3181
3182
|
u && !m || (ne.crc32 = p.crc32, ne.compressedSize = p.compressedSize, ne.uncompressedSize = p.uncompressedSize);
|
|
3182
3183
|
var O = 0;
|
|
3183
|
-
u && (O |= 8), A || !R && !
|
|
3184
|
+
u && (O |= 8), A || !R && !v || (O |= 2048);
|
|
3184
3185
|
var N = 0, te = 0;
|
|
3185
3186
|
ee && (N |= 16), y === "UNIX" ? (te = 798, N |= (function(K, fe) {
|
|
3186
3187
|
var pe = K;
|
|
3187
3188
|
return K || (pe = fe ? 16893 : 33204), (65535 & pe) << 16;
|
|
3188
|
-
})(
|
|
3189
|
+
})(b.unixPermissions, ee)) : (te = 20, N |= (function(K) {
|
|
3189
3190
|
return 63 & (K || 0);
|
|
3190
|
-
})(
|
|
3191
|
+
})(b.dosPermissions)), w = j.getUTCHours(), w <<= 6, w |= j.getUTCMinutes(), w <<= 5, w |= j.getUTCSeconds() / 2, x = j.getUTCFullYear() - 1980, x <<= 4, x |= j.getUTCMonth() + 1, x <<= 5, x |= j.getUTCDate(), R && (q = o(1, 1) + o(c(C), 4) + P, I += "up" + o(q.length, 2) + q), v && (H = o(1, 1) + o(c(B), 4) + T, I += "uc" + o(H.length, 2) + H);
|
|
3191
3192
|
var J = "";
|
|
3192
3193
|
return J += `
|
|
3193
3194
|
\0`, J += o(O, 2), J += M.magic, J += o(w, 2), J += o(x, 2), J += o(ne.crc32, 4), J += o(ne.compressedSize, 4), J += o(ne.uncompressedSize, 4), J += o(C.length, 2), J += o(I.length, 2), { fileRecord: f.LOCAL_FILE_HEADER + J + C + I, dirRecord: f.CENTRAL_FILE_HEADER + o(te, 2) + J + o(B.length, 2) + "\0\0\0\0" + o(N, 4) + o(g, 4) + C + I + B };
|
|
@@ -3216,8 +3217,8 @@ function fc() {
|
|
|
3216
3217
|
this.currentFile = null;
|
|
3217
3218
|
}, d.prototype.flush = function() {
|
|
3218
3219
|
for (var p = this.bytesWritten, u = 0; u < this.dirRecords.length; u++) this.push({ data: this.dirRecords[u], meta: { percent: 100 } });
|
|
3219
|
-
var m = this.bytesWritten - p, g = (function(y, _, w, x,
|
|
3220
|
-
var M = a.transformTo("string",
|
|
3220
|
+
var m = this.bytesWritten - p, g = (function(y, _, w, x, b) {
|
|
3221
|
+
var M = a.transformTo("string", b(x));
|
|
3221
3222
|
return f.CENTRAL_DIRECTORY_END + "\0\0\0\0" + o(y, 2) + o(y, 2) + o(_, 4) + o(w, 4) + o(M.length, 2) + M;
|
|
3222
3223
|
})(this.dirRecords.length, m, p, this.zipComment, this.encodeFileName);
|
|
3223
3224
|
this.push({ data: g, meta: { percent: 100 } });
|
|
@@ -3255,9 +3256,9 @@ function fc() {
|
|
|
3255
3256
|
a.forEach(function(d, p) {
|
|
3256
3257
|
f++;
|
|
3257
3258
|
var u = (function(_, w) {
|
|
3258
|
-
var x = _ || w,
|
|
3259
|
-
if (!
|
|
3260
|
-
return
|
|
3259
|
+
var x = _ || w, b = o[x];
|
|
3260
|
+
if (!b) throw new Error(x + " is not a valid compression method !");
|
|
3261
|
+
return b;
|
|
3261
3262
|
})(p.options.compression, l.compression), m = p.options.compressionOptions || l.compressionOptions || {}, g = p.dir, y = p.date;
|
|
3262
3263
|
p._compressWorker(u, m).withStreamInfo("file", { name: d, dir: g, date: y, comment: p.comment || "", unixPermissions: p.unixPermissions, dosPermissions: p.dosPermissions }).pipe(c);
|
|
3263
3264
|
}), c.entriesCount = f;
|
|
@@ -3302,8 +3303,8 @@ function fc() {
|
|
|
3302
3303
|
return r.Promise.all(g);
|
|
3303
3304
|
}).then(function(m) {
|
|
3304
3305
|
for (var g = m.shift(), y = g.files, _ = 0; _ < y.length; _++) {
|
|
3305
|
-
var w = y[_], x = w.fileNameStr,
|
|
3306
|
-
u.file(
|
|
3306
|
+
var w = y[_], x = w.fileNameStr, b = o.resolve(w.fileNameStr);
|
|
3307
|
+
u.file(b, w.decompressed, { binary: !0, optimizedBinaryString: !0, date: w.date, dir: w.dir, comment: w.fileCommentStr.length ? w.fileCommentStr : null, unixPermissions: w.unixPermissions, dosPermissions: w.dosPermissions, createFolders: p.createFolders }), w.dir || (u.file(b).unsafeOriginalName = x);
|
|
3307
3308
|
}
|
|
3308
3309
|
return g.zipComment.length && (u.comment = g.zipComment), u;
|
|
3309
3310
|
});
|
|
@@ -3358,69 +3359,69 @@ function fc() {
|
|
|
3358
3359
|
return o && typeof o.on == "function" && typeof o.pause == "function" && typeof o.resume == "function";
|
|
3359
3360
|
} };
|
|
3360
3361
|
}, {}], 15: [function(t, n, i) {
|
|
3361
|
-
function o(
|
|
3362
|
+
function o(b, M, A) {
|
|
3362
3363
|
var C, P = a.getTypeOf(M), D = a.extend(A || {}, c);
|
|
3363
|
-
D.date = D.date || /* @__PURE__ */ new Date(), D.compression !== null && (D.compression = D.compression.toUpperCase()), typeof D.unixPermissions == "string" && (D.unixPermissions = parseInt(D.unixPermissions, 8)), D.unixPermissions && 16384 & D.unixPermissions && (D.dir = !0), D.dosPermissions && 16 & D.dosPermissions && (D.dir = !0), D.dir && (
|
|
3364
|
+
D.date = D.date || /* @__PURE__ */ new Date(), D.compression !== null && (D.compression = D.compression.toUpperCase()), typeof D.unixPermissions == "string" && (D.unixPermissions = parseInt(D.unixPermissions, 8)), D.unixPermissions && 16384 & D.unixPermissions && (D.dir = !0), D.dosPermissions && 16 & D.dosPermissions && (D.dir = !0), D.dir && (b = y(b)), D.createFolders && (C = g(b)) && _.call(this, C, !0);
|
|
3364
3365
|
var B = P === "string" && D.binary === !1 && D.base64 === !1;
|
|
3365
3366
|
A && A.binary !== void 0 || (D.binary = !B), (M instanceof f && M.uncompressedSize === 0 || D.dir || !M || M.length === 0) && (D.base64 = !1, D.binary = !0, M = "", D.compression = "STORE", P = "string");
|
|
3366
3367
|
var T = null;
|
|
3367
|
-
T = M instanceof f || M instanceof l ? M : u.isNode && u.isStream(M) ? new m(
|
|
3368
|
-
var R = new d(
|
|
3369
|
-
this.files[
|
|
3370
|
-
}
|
|
3371
|
-
var r = t("./utf8"), a = t("./utils"), l = t("./stream/GenericWorker"), h = t("./stream/StreamHelper"), c = t("./defaults"), f = t("./compressedObject"), d = t("./zipObject"), p = t("./generate"), u = t("./nodejsUtils"), m = t("./nodejs/NodejsStreamInputAdapter"), g = function(
|
|
3372
|
-
|
|
3373
|
-
var M =
|
|
3374
|
-
return 0 < M ?
|
|
3375
|
-
}, y = function(
|
|
3376
|
-
return
|
|
3377
|
-
}, _ = function(
|
|
3378
|
-
return M = M !== void 0 ? M : c.createFolders,
|
|
3368
|
+
T = M instanceof f || M instanceof l ? M : u.isNode && u.isStream(M) ? new m(b, M) : a.prepareContent(b, M, D.binary, D.optimizedBinaryString, D.base64);
|
|
3369
|
+
var R = new d(b, T, D);
|
|
3370
|
+
this.files[b] = R;
|
|
3371
|
+
}
|
|
3372
|
+
var r = t("./utf8"), a = t("./utils"), l = t("./stream/GenericWorker"), h = t("./stream/StreamHelper"), c = t("./defaults"), f = t("./compressedObject"), d = t("./zipObject"), p = t("./generate"), u = t("./nodejsUtils"), m = t("./nodejs/NodejsStreamInputAdapter"), g = function(b) {
|
|
3373
|
+
b.slice(-1) === "/" && (b = b.substring(0, b.length - 1));
|
|
3374
|
+
var M = b.lastIndexOf("/");
|
|
3375
|
+
return 0 < M ? b.substring(0, M) : "";
|
|
3376
|
+
}, y = function(b) {
|
|
3377
|
+
return b.slice(-1) !== "/" && (b += "/"), b;
|
|
3378
|
+
}, _ = function(b, M) {
|
|
3379
|
+
return M = M !== void 0 ? M : c.createFolders, b = y(b), this.files[b] || o.call(this, b, null, { dir: !0, createFolders: M }), this.files[b];
|
|
3379
3380
|
};
|
|
3380
|
-
function w(
|
|
3381
|
-
return Object.prototype.toString.call(
|
|
3381
|
+
function w(b) {
|
|
3382
|
+
return Object.prototype.toString.call(b) === "[object RegExp]";
|
|
3382
3383
|
}
|
|
3383
3384
|
var x = { load: function() {
|
|
3384
3385
|
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
3385
|
-
}, forEach: function(
|
|
3386
|
+
}, forEach: function(b) {
|
|
3386
3387
|
var M, A, C;
|
|
3387
|
-
for (M in this.files) C = this.files[M], (A = M.slice(this.root.length, M.length)) && M.slice(0, this.root.length) === this.root &&
|
|
3388
|
-
}, filter: function(
|
|
3388
|
+
for (M in this.files) C = this.files[M], (A = M.slice(this.root.length, M.length)) && M.slice(0, this.root.length) === this.root && b(A, C);
|
|
3389
|
+
}, filter: function(b) {
|
|
3389
3390
|
var M = [];
|
|
3390
3391
|
return this.forEach(function(A, C) {
|
|
3391
|
-
|
|
3392
|
+
b(A, C) && M.push(C);
|
|
3392
3393
|
}), M;
|
|
3393
|
-
}, file: function(
|
|
3394
|
-
if (arguments.length !== 1) return
|
|
3395
|
-
if (w(
|
|
3396
|
-
var C =
|
|
3394
|
+
}, file: function(b, M, A) {
|
|
3395
|
+
if (arguments.length !== 1) return b = this.root + b, o.call(this, b, M, A), this;
|
|
3396
|
+
if (w(b)) {
|
|
3397
|
+
var C = b;
|
|
3397
3398
|
return this.filter(function(D, B) {
|
|
3398
3399
|
return !B.dir && C.test(D);
|
|
3399
3400
|
});
|
|
3400
3401
|
}
|
|
3401
|
-
var P = this.files[this.root +
|
|
3402
|
+
var P = this.files[this.root + b];
|
|
3402
3403
|
return P && !P.dir ? P : null;
|
|
3403
|
-
}, folder: function(
|
|
3404
|
-
if (!
|
|
3405
|
-
if (w(
|
|
3406
|
-
return D.dir &&
|
|
3404
|
+
}, folder: function(b) {
|
|
3405
|
+
if (!b) return this;
|
|
3406
|
+
if (w(b)) return this.filter(function(P, D) {
|
|
3407
|
+
return D.dir && b.test(P);
|
|
3407
3408
|
});
|
|
3408
|
-
var M = this.root +
|
|
3409
|
+
var M = this.root + b, A = _.call(this, M), C = this.clone();
|
|
3409
3410
|
return C.root = A.name, C;
|
|
3410
|
-
}, remove: function(
|
|
3411
|
-
|
|
3412
|
-
var M = this.files[
|
|
3413
|
-
if (M || (
|
|
3411
|
+
}, remove: function(b) {
|
|
3412
|
+
b = this.root + b;
|
|
3413
|
+
var M = this.files[b];
|
|
3414
|
+
if (M || (b.slice(-1) !== "/" && (b += "/"), M = this.files[b]), M && !M.dir) delete this.files[b];
|
|
3414
3415
|
else for (var A = this.filter(function(P, D) {
|
|
3415
|
-
return D.name.slice(0,
|
|
3416
|
+
return D.name.slice(0, b.length) === b;
|
|
3416
3417
|
}), C = 0; C < A.length; C++) delete this.files[A[C].name];
|
|
3417
3418
|
return this;
|
|
3418
3419
|
}, generate: function() {
|
|
3419
3420
|
throw new Error("This method has been removed in JSZip 3.0, please check the upgrade guide.");
|
|
3420
|
-
}, generateInternalStream: function(
|
|
3421
|
+
}, generateInternalStream: function(b) {
|
|
3421
3422
|
var M, A = {};
|
|
3422
3423
|
try {
|
|
3423
|
-
if ((A = a.extend(
|
|
3424
|
+
if ((A = a.extend(b || {}, { streamFiles: !1, compression: "STORE", compressionOptions: null, type: "", platform: "DOS", comment: null, mimeType: "application/zip", encodeFileName: r.utf8encode })).type = A.type.toLowerCase(), A.compression = A.compression.toUpperCase(), A.type === "binarystring" && (A.type = "string"), !A.type) throw new Error("No output type specified.");
|
|
3424
3425
|
a.checkSupport(A.type), A.platform !== "darwin" && A.platform !== "freebsd" && A.platform !== "linux" && A.platform !== "sunos" || (A.platform = "UNIX"), A.platform === "win32" && (A.platform = "DOS");
|
|
3425
3426
|
var C = A.comment || this.comment || "";
|
|
3426
3427
|
M = p.generateWorker(this, A, C);
|
|
@@ -3428,10 +3429,10 @@ function fc() {
|
|
|
3428
3429
|
(M = new l("error")).error(P);
|
|
3429
3430
|
}
|
|
3430
3431
|
return new h(M, A.type || "string", A.mimeType);
|
|
3431
|
-
}, generateAsync: function(
|
|
3432
|
-
return this.generateInternalStream(
|
|
3433
|
-
}, generateNodeStream: function(
|
|
3434
|
-
return (
|
|
3432
|
+
}, generateAsync: function(b, M) {
|
|
3433
|
+
return this.generateInternalStream(b).accumulate(M);
|
|
3434
|
+
}, generateNodeStream: function(b, M) {
|
|
3435
|
+
return (b = b || {}).type || (b.type = "nodebuffer"), this.generateInternalStream(b).toNodejsStream(M);
|
|
3435
3436
|
} };
|
|
3436
3437
|
n.exports = x;
|
|
3437
3438
|
}, { "./compressedObject": 2, "./defaults": 5, "./generate": 9, "./nodejs/NodejsStreamInputAdapter": 12, "./nodejsUtils": 14, "./stream/GenericWorker": 28, "./stream/StreamHelper": 29, "./utf8": 31, "./utils": 32, "./zipObject": 35 }], 16: [function(t, n, i) {
|
|
@@ -3652,7 +3653,7 @@ function fc() {
|
|
|
3652
3653
|
}
|
|
3653
3654
|
function d(u, m) {
|
|
3654
3655
|
return new c.Promise(function(g, y) {
|
|
3655
|
-
var _ = [], w = u._internalType, x = u._outputType,
|
|
3656
|
+
var _ = [], w = u._internalType, x = u._outputType, b = u._mimeType;
|
|
3656
3657
|
u.on("data", function(M, A) {
|
|
3657
3658
|
_.push(M), m && m(A);
|
|
3658
3659
|
}).on("error", function(M) {
|
|
@@ -3684,7 +3685,7 @@ function fc() {
|
|
|
3684
3685
|
default:
|
|
3685
3686
|
throw new Error("concat : unsupported type '" + A + "'");
|
|
3686
3687
|
}
|
|
3687
|
-
})(w, _),
|
|
3688
|
+
})(w, _), b);
|
|
3688
3689
|
g(M);
|
|
3689
3690
|
} catch (A) {
|
|
3690
3691
|
y(A);
|
|
@@ -3757,9 +3758,9 @@ function fc() {
|
|
|
3757
3758
|
}
|
|
3758
3759
|
i.utf8encode = function(p) {
|
|
3759
3760
|
return r.nodebuffer ? a.newBufferFrom(p, "utf-8") : (function(u) {
|
|
3760
|
-
var m, g, y, _, w, x = u.length,
|
|
3761
|
-
for (_ = 0; _ < x; _++) (64512 & (g = u.charCodeAt(_))) == 55296 && _ + 1 < x && (64512 & (y = u.charCodeAt(_ + 1))) == 56320 && (g = 65536 + (g - 55296 << 10) + (y - 56320), _++),
|
|
3762
|
-
for (m = r.uint8array ? new Uint8Array(
|
|
3761
|
+
var m, g, y, _, w, x = u.length, b = 0;
|
|
3762
|
+
for (_ = 0; _ < x; _++) (64512 & (g = u.charCodeAt(_))) == 55296 && _ + 1 < x && (64512 & (y = u.charCodeAt(_ + 1))) == 56320 && (g = 65536 + (g - 55296 << 10) + (y - 56320), _++), b += g < 128 ? 1 : g < 2048 ? 2 : g < 65536 ? 3 : 4;
|
|
3763
|
+
for (m = r.uint8array ? new Uint8Array(b) : new Array(b), _ = w = 0; w < b; _++) (64512 & (g = u.charCodeAt(_))) == 55296 && _ + 1 < x && (64512 & (y = u.charCodeAt(_ + 1))) == 56320 && (g = 65536 + (g - 55296 << 10) + (y - 56320), _++), g < 128 ? m[w++] = g : (g < 2048 ? m[w++] = 192 | g >>> 6 : (g < 65536 ? m[w++] = 224 | g >>> 12 : (m[w++] = 240 | g >>> 18, m[w++] = 128 | g >>> 12 & 63), m[w++] = 128 | g >>> 6 & 63), m[w++] = 128 | 63 & g);
|
|
3763
3764
|
return m;
|
|
3764
3765
|
})(p);
|
|
3765
3766
|
}, i.utf8decode = function(p) {
|
|
@@ -3918,17 +3919,17 @@ function fc() {
|
|
|
3918
3919
|
return y;
|
|
3919
3920
|
}, i.prepareContent = function(m, g, y, _, w) {
|
|
3920
3921
|
return l.Promise.resolve(g).then(function(x) {
|
|
3921
|
-
return o.blob && (x instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(x)) !== -1) && typeof FileReader < "u" ? new l.Promise(function(
|
|
3922
|
+
return o.blob && (x instanceof Blob || ["[object File]", "[object Blob]"].indexOf(Object.prototype.toString.call(x)) !== -1) && typeof FileReader < "u" ? new l.Promise(function(b, M) {
|
|
3922
3923
|
var A = new FileReader();
|
|
3923
3924
|
A.onload = function(C) {
|
|
3924
|
-
|
|
3925
|
+
b(C.target.result);
|
|
3925
3926
|
}, A.onerror = function(C) {
|
|
3926
3927
|
M(C.target.error);
|
|
3927
3928
|
}, A.readAsArrayBuffer(x);
|
|
3928
3929
|
}) : x;
|
|
3929
3930
|
}).then(function(x) {
|
|
3930
|
-
var
|
|
3931
|
-
return
|
|
3931
|
+
var b = i.getTypeOf(x);
|
|
3932
|
+
return b ? (b === "arraybuffer" ? x = i.transformTo("uint8array", x) : b === "string" && (w ? x = r.decode(x) : y && _ !== !0 && (x = (function(M) {
|
|
3932
3933
|
return c(M, o.uint8array ? new Uint8Array(M.length) : new Array(M.length));
|
|
3933
3934
|
})(x))), x) : l.Promise.reject(new Error("Can't read the data of '" + m + "'. Is it in a supported JavaScript type (String, Blob, ArrayBuffer, etc) ?"));
|
|
3934
3935
|
});
|
|
@@ -4137,8 +4138,8 @@ function fc() {
|
|
|
4137
4138
|
var x;
|
|
4138
4139
|
try {
|
|
4139
4140
|
x = _(w);
|
|
4140
|
-
} catch (
|
|
4141
|
-
return a.reject(y,
|
|
4141
|
+
} catch (b) {
|
|
4142
|
+
return a.reject(y, b);
|
|
4142
4143
|
}
|
|
4143
4144
|
x === y ? a.reject(y, new TypeError("Cannot resolve promise with itself")) : a.resolve(y, x);
|
|
4144
4145
|
});
|
|
@@ -4154,11 +4155,11 @@ function fc() {
|
|
|
4154
4155
|
function x(A) {
|
|
4155
4156
|
w || (w = !0, a.reject(y, A));
|
|
4156
4157
|
}
|
|
4157
|
-
function
|
|
4158
|
+
function b(A) {
|
|
4158
4159
|
w || (w = !0, a.resolve(y, A));
|
|
4159
4160
|
}
|
|
4160
4161
|
var M = g(function() {
|
|
4161
|
-
_(
|
|
4162
|
+
_(b, x);
|
|
4162
4163
|
});
|
|
4163
4164
|
M.status === "error" && x(M.value);
|
|
4164
4165
|
}
|
|
@@ -4204,7 +4205,7 @@ function fc() {
|
|
|
4204
4205
|
if (x) m(y, x);
|
|
4205
4206
|
else {
|
|
4206
4207
|
y.state = h, y.outcome = _;
|
|
4207
|
-
for (var
|
|
4208
|
+
for (var b = -1, M = y.queue.length; ++b < M; ) y.queue[b].callFulfilled(_);
|
|
4208
4209
|
}
|
|
4209
4210
|
return y;
|
|
4210
4211
|
}, a.reject = function(y, _) {
|
|
@@ -4221,11 +4222,11 @@ function fc() {
|
|
|
4221
4222
|
if (Object.prototype.toString.call(y) !== "[object Array]") return this.reject(new TypeError("must be an array"));
|
|
4222
4223
|
var w = y.length, x = !1;
|
|
4223
4224
|
if (!w) return this.resolve([]);
|
|
4224
|
-
for (var
|
|
4225
|
+
for (var b = new Array(w), M = 0, A = -1, C = new this(r); ++A < w; ) P(y[A], A);
|
|
4225
4226
|
return C;
|
|
4226
4227
|
function P(D, B) {
|
|
4227
4228
|
_.resolve(D).then(function(T) {
|
|
4228
|
-
|
|
4229
|
+
b[B] = T, ++M !== w || x || (x = !0, a.resolve(C, b));
|
|
4229
4230
|
}, function(T) {
|
|
4230
4231
|
x || (x = !0, a.reject(C, T));
|
|
4231
4232
|
});
|
|
@@ -4235,7 +4236,7 @@ function fc() {
|
|
|
4235
4236
|
if (Object.prototype.toString.call(y) !== "[object Array]") return this.reject(new TypeError("must be an array"));
|
|
4236
4237
|
var w = y.length, x = !1;
|
|
4237
4238
|
if (!w) return this.resolve([]);
|
|
4238
|
-
for (var
|
|
4239
|
+
for (var b = -1, M = new this(r); ++b < w; ) A = y[b], _.resolve(A).then(function(C) {
|
|
4239
4240
|
x || (x = !0, a.resolve(M, C));
|
|
4240
4241
|
}, function(C) {
|
|
4241
4242
|
x || (x = !0, a.reject(M, C));
|
|
@@ -4267,14 +4268,14 @@ function fc() {
|
|
|
4267
4268
|
return w.result;
|
|
4268
4269
|
}
|
|
4269
4270
|
m.prototype.push = function(y, _) {
|
|
4270
|
-
var w, x,
|
|
4271
|
+
var w, x, b = this.strm, M = this.options.chunkSize;
|
|
4271
4272
|
if (this.ended) return !1;
|
|
4272
|
-
x = _ === ~~_ ? _ : _ === !0 ? 4 : 0, typeof y == "string" ?
|
|
4273
|
+
x = _ === ~~_ ? _ : _ === !0 ? 4 : 0, typeof y == "string" ? b.input = a.string2buf(y) : c.call(y) === "[object ArrayBuffer]" ? b.input = new Uint8Array(y) : b.input = y, b.next_in = 0, b.avail_in = b.input.length;
|
|
4273
4274
|
do {
|
|
4274
|
-
if (
|
|
4275
|
-
|
|
4276
|
-
} while ((0 <
|
|
4277
|
-
return x === 4 ? (w = o.deflateEnd(this.strm), this.onEnd(w), this.ended = !0, w === f) : x !== 2 || (this.onEnd(f), !(
|
|
4275
|
+
if (b.avail_out === 0 && (b.output = new r.Buf8(M), b.next_out = 0, b.avail_out = M), (w = o.deflate(b, x)) !== 1 && w !== f) return this.onEnd(w), !(this.ended = !0);
|
|
4276
|
+
b.avail_out !== 0 && (b.avail_in !== 0 || x !== 4 && x !== 2) || (this.options.to === "string" ? this.onData(a.buf2binstring(r.shrinkBuf(b.output, b.next_out))) : this.onData(r.shrinkBuf(b.output, b.next_out)));
|
|
4277
|
+
} while ((0 < b.avail_in || b.avail_out === 0) && w !== 1);
|
|
4278
|
+
return x === 4 ? (w = o.deflateEnd(this.strm), this.onEnd(w), this.ended = !0, w === f) : x !== 2 || (this.onEnd(f), !(b.avail_out = 0));
|
|
4278
4279
|
}, m.prototype.onData = function(y) {
|
|
4279
4280
|
this.chunks.push(y);
|
|
4280
4281
|
}, m.prototype.onEnd = function(y) {
|
|
@@ -4301,12 +4302,12 @@ function fc() {
|
|
|
4301
4302
|
return y.result;
|
|
4302
4303
|
}
|
|
4303
4304
|
p.prototype.push = function(m, g) {
|
|
4304
|
-
var y, _, w, x,
|
|
4305
|
+
var y, _, w, x, b, M, A = this.strm, C = this.options.chunkSize, P = this.options.dictionary, D = !1;
|
|
4305
4306
|
if (this.ended) return !1;
|
|
4306
4307
|
_ = g === ~~g ? g : g === !0 ? l.Z_FINISH : l.Z_NO_FLUSH, typeof m == "string" ? A.input = a.binstring2buf(m) : d.call(m) === "[object ArrayBuffer]" ? A.input = new Uint8Array(m) : A.input = m, A.next_in = 0, A.avail_in = A.input.length;
|
|
4307
4308
|
do {
|
|
4308
4309
|
if (A.avail_out === 0 && (A.output = new r.Buf8(C), A.next_out = 0, A.avail_out = C), (y = o.inflate(A, l.Z_NO_FLUSH)) === l.Z_NEED_DICT && P && (M = typeof P == "string" ? a.string2buf(P) : d.call(P) === "[object ArrayBuffer]" ? new Uint8Array(P) : P, y = o.inflateSetDictionary(this.strm, M)), y === l.Z_BUF_ERROR && D === !0 && (y = l.Z_OK, D = !1), y !== l.Z_STREAM_END && y !== l.Z_OK) return this.onEnd(y), !(this.ended = !0);
|
|
4309
|
-
A.next_out && (A.avail_out !== 0 && y !== l.Z_STREAM_END && (A.avail_in !== 0 || _ !== l.Z_FINISH && _ !== l.Z_SYNC_FLUSH) || (this.options.to === "string" ? (w = a.utf8border(A.output, A.next_out), x = A.next_out - w,
|
|
4310
|
+
A.next_out && (A.avail_out !== 0 && y !== l.Z_STREAM_END && (A.avail_in !== 0 || _ !== l.Z_FINISH && _ !== l.Z_SYNC_FLUSH) || (this.options.to === "string" ? (w = a.utf8border(A.output, A.next_out), x = A.next_out - w, b = a.buf2string(A.output, w), A.next_out = x, A.avail_out = C - x, x && r.arraySet(A.output, A.output, w, x, 0), this.onData(b)) : this.onData(r.shrinkBuf(A.output, A.next_out)))), A.avail_in === 0 && A.avail_out === 0 && (D = !0);
|
|
4310
4311
|
} while ((0 < A.avail_in || A.avail_out === 0) && y !== l.Z_STREAM_END);
|
|
4311
4312
|
return y === l.Z_STREAM_END && (_ = l.Z_FINISH), _ === l.Z_FINISH ? (y = o.inflateEnd(this.strm), this.onEnd(y), this.ended = !0, y === l.Z_OK) : _ !== l.Z_SYNC_FLUSH || (this.onEnd(l.Z_OK), !(A.avail_out = 0));
|
|
4312
4313
|
}, p.prototype.onData = function(m) {
|
|
@@ -4414,7 +4415,7 @@ function fc() {
|
|
|
4414
4415
|
return -1 ^ r;
|
|
4415
4416
|
};
|
|
4416
4417
|
}, {}], 46: [function(t, n, i) {
|
|
4417
|
-
var o, r = t("../utils/common"), a = t("./trees"), l = t("./adler32"), h = t("./crc32"), c = t("./messages"), f = 0, d = 4, p = 0, u = -2, m = -1, g = 4, y = 2, _ = 8, w = 9, x = 286,
|
|
4418
|
+
var o, r = t("../utils/common"), a = t("./trees"), l = t("./adler32"), h = t("./crc32"), c = t("./messages"), f = 0, d = 4, p = 0, u = -2, m = -1, g = 4, y = 2, _ = 8, w = 9, x = 286, b = 30, M = 19, A = 2 * x + 1, C = 15, P = 3, D = 258, B = D + P + 1, T = 42, R = 113, v = 1, I = 2, q = 3, H = 4;
|
|
4418
4419
|
function ee(S, G) {
|
|
4419
4420
|
return S.msg = c[G], G;
|
|
4420
4421
|
}
|
|
@@ -4469,7 +4470,7 @@ function fc() {
|
|
|
4469
4470
|
function pe(S, G) {
|
|
4470
4471
|
for (var V, L; ; ) {
|
|
4471
4472
|
if (S.lookahead < B) {
|
|
4472
|
-
if (fe(S), S.lookahead < B && G === f) return
|
|
4473
|
+
if (fe(S), S.lookahead < B && G === f) return v;
|
|
4473
4474
|
if (S.lookahead === 0) break;
|
|
4474
4475
|
}
|
|
4475
4476
|
if (V = 0, S.lookahead >= P && (S.ins_h = (S.ins_h << S.hash_shift ^ S.window[S.strstart + P - 1]) & S.hash_mask, V = S.prev[S.strstart & S.w_mask] = S.head[S.ins_h], S.head[S.ins_h] = S.strstart), V !== 0 && S.strstart - V <= S.w_size - B && (S.match_length = K(S, V)), S.match_length >= P) if (L = a._tr_tally(S, S.strstart - S.match_start, S.match_length - P), S.lookahead -= S.match_length, S.match_length <= S.max_lazy_match && S.lookahead >= P) {
|
|
@@ -4477,30 +4478,30 @@ function fc() {
|
|
|
4477
4478
|
S.strstart++;
|
|
4478
4479
|
} else S.strstart += S.match_length, S.match_length = 0, S.ins_h = S.window[S.strstart], S.ins_h = (S.ins_h << S.hash_shift ^ S.window[S.strstart + 1]) & S.hash_mask;
|
|
4479
4480
|
else L = a._tr_tally(S, 0, S.window[S.strstart]), S.lookahead--, S.strstart++;
|
|
4480
|
-
if (L && (N(S, !1), S.strm.avail_out === 0)) return
|
|
4481
|
+
if (L && (N(S, !1), S.strm.avail_out === 0)) return v;
|
|
4481
4482
|
}
|
|
4482
|
-
return S.insert = S.strstart < P - 1 ? S.strstart : P - 1, G === d ? (N(S, !0), S.strm.avail_out === 0 ? q : H) : S.last_lit && (N(S, !1), S.strm.avail_out === 0) ?
|
|
4483
|
+
return S.insert = S.strstart < P - 1 ? S.strstart : P - 1, G === d ? (N(S, !0), S.strm.avail_out === 0 ? q : H) : S.last_lit && (N(S, !1), S.strm.avail_out === 0) ? v : I;
|
|
4483
4484
|
}
|
|
4484
4485
|
function se(S, G) {
|
|
4485
4486
|
for (var V, L, k; ; ) {
|
|
4486
4487
|
if (S.lookahead < B) {
|
|
4487
|
-
if (fe(S), S.lookahead < B && G === f) return
|
|
4488
|
+
if (fe(S), S.lookahead < B && G === f) return v;
|
|
4488
4489
|
if (S.lookahead === 0) break;
|
|
4489
4490
|
}
|
|
4490
4491
|
if (V = 0, S.lookahead >= P && (S.ins_h = (S.ins_h << S.hash_shift ^ S.window[S.strstart + P - 1]) & S.hash_mask, V = S.prev[S.strstart & S.w_mask] = S.head[S.ins_h], S.head[S.ins_h] = S.strstart), S.prev_length = S.match_length, S.prev_match = S.match_start, S.match_length = P - 1, V !== 0 && S.prev_length < S.max_lazy_match && S.strstart - V <= S.w_size - B && (S.match_length = K(S, V), S.match_length <= 5 && (S.strategy === 1 || S.match_length === P && 4096 < S.strstart - S.match_start) && (S.match_length = P - 1)), S.prev_length >= P && S.match_length <= S.prev_length) {
|
|
4491
4492
|
for (k = S.strstart + S.lookahead - P, L = a._tr_tally(S, S.strstart - 1 - S.prev_match, S.prev_length - P), S.lookahead -= S.prev_length - 1, S.prev_length -= 2; ++S.strstart <= k && (S.ins_h = (S.ins_h << S.hash_shift ^ S.window[S.strstart + P - 1]) & S.hash_mask, V = S.prev[S.strstart & S.w_mask] = S.head[S.ins_h], S.head[S.ins_h] = S.strstart), --S.prev_length != 0; ) ;
|
|
4492
|
-
if (S.match_available = 0, S.match_length = P - 1, S.strstart++, L && (N(S, !1), S.strm.avail_out === 0)) return
|
|
4493
|
+
if (S.match_available = 0, S.match_length = P - 1, S.strstart++, L && (N(S, !1), S.strm.avail_out === 0)) return v;
|
|
4493
4494
|
} else if (S.match_available) {
|
|
4494
|
-
if ((L = a._tr_tally(S, 0, S.window[S.strstart - 1])) && N(S, !1), S.strstart++, S.lookahead--, S.strm.avail_out === 0) return
|
|
4495
|
+
if ((L = a._tr_tally(S, 0, S.window[S.strstart - 1])) && N(S, !1), S.strstart++, S.lookahead--, S.strm.avail_out === 0) return v;
|
|
4495
4496
|
} else S.match_available = 1, S.strstart++, S.lookahead--;
|
|
4496
4497
|
}
|
|
4497
|
-
return S.match_available && (L = a._tr_tally(S, 0, S.window[S.strstart - 1]), S.match_available = 0), S.insert = S.strstart < P - 1 ? S.strstart : P - 1, G === d ? (N(S, !0), S.strm.avail_out === 0 ? q : H) : S.last_lit && (N(S, !1), S.strm.avail_out === 0) ?
|
|
4498
|
+
return S.match_available && (L = a._tr_tally(S, 0, S.window[S.strstart - 1]), S.match_available = 0), S.insert = S.strstart < P - 1 ? S.strstart : P - 1, G === d ? (N(S, !0), S.strm.avail_out === 0 ? q : H) : S.last_lit && (N(S, !1), S.strm.avail_out === 0) ? v : I;
|
|
4498
4499
|
}
|
|
4499
4500
|
function oe(S, G, V, L, k) {
|
|
4500
4501
|
this.good_length = S, this.max_lazy = G, this.nice_length = V, this.max_chain = L, this.func = k;
|
|
4501
4502
|
}
|
|
4502
4503
|
function ue() {
|
|
4503
|
-
this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = _, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new r.Buf16(2 * A), this.dyn_dtree = new r.Buf16(2 * (2 *
|
|
4504
|
+
this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = _, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new r.Buf16(2 * A), this.dyn_dtree = new r.Buf16(2 * (2 * b + 1)), this.bl_tree = new r.Buf16(2 * (2 * M + 1)), ne(this.dyn_ltree), ne(this.dyn_dtree), ne(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new r.Buf16(C + 1), this.heap = new r.Buf16(2 * x + 1), ne(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new r.Buf16(2 * x + 1), ne(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
|
|
4504
4505
|
}
|
|
4505
4506
|
function me(S) {
|
|
4506
4507
|
var G;
|
|
@@ -4524,14 +4525,14 @@ function fc() {
|
|
|
4524
4525
|
var V = 65535;
|
|
4525
4526
|
for (V > S.pending_buf_size - 5 && (V = S.pending_buf_size - 5); ; ) {
|
|
4526
4527
|
if (S.lookahead <= 1) {
|
|
4527
|
-
if (fe(S), S.lookahead === 0 && G === f) return
|
|
4528
|
+
if (fe(S), S.lookahead === 0 && G === f) return v;
|
|
4528
4529
|
if (S.lookahead === 0) break;
|
|
4529
4530
|
}
|
|
4530
4531
|
S.strstart += S.lookahead, S.lookahead = 0;
|
|
4531
4532
|
var L = S.block_start + V;
|
|
4532
|
-
if ((S.strstart === 0 || S.strstart >= L) && (S.lookahead = S.strstart - L, S.strstart = L, N(S, !1), S.strm.avail_out === 0) || S.strstart - S.block_start >= S.w_size - B && (N(S, !1), S.strm.avail_out === 0)) return
|
|
4533
|
+
if ((S.strstart === 0 || S.strstart >= L) && (S.lookahead = S.strstart - L, S.strstart = L, N(S, !1), S.strm.avail_out === 0) || S.strstart - S.block_start >= S.w_size - B && (N(S, !1), S.strm.avail_out === 0)) return v;
|
|
4533
4534
|
}
|
|
4534
|
-
return S.insert = 0, G === d ? (N(S, !0), S.strm.avail_out === 0 ? q : H) : (S.strstart > S.block_start && (N(S, !1), S.strm.avail_out),
|
|
4535
|
+
return S.insert = 0, G === d ? (N(S, !0), S.strm.avail_out === 0 ? q : H) : (S.strstart > S.block_start && (N(S, !1), S.strm.avail_out), v);
|
|
4535
4536
|
}), new oe(4, 4, 8, 4, pe), new oe(4, 5, 16, 8, pe), new oe(4, 6, 32, 32, pe), new oe(4, 4, 16, 16, se), new oe(8, 16, 32, 32, se), new oe(8, 16, 128, 128, se), new oe(8, 32, 128, 256, se), new oe(32, 128, 258, 1024, se), new oe(32, 258, 258, 4096, se)], i.deflateInit = function(S, G) {
|
|
4536
4537
|
return Re(S, G, _, 15, 8, 0);
|
|
4537
4538
|
}, i.deflateInit2 = Re, i.deflateReset = Se, i.deflateResetKeep = me, i.deflateSetHeader = function(S, G) {
|
|
@@ -4579,16 +4580,16 @@ function fc() {
|
|
|
4579
4580
|
var X = L.strategy === 2 ? (function(U, Y) {
|
|
4580
4581
|
for (var Q; ; ) {
|
|
4581
4582
|
if (U.lookahead === 0 && (fe(U), U.lookahead === 0)) {
|
|
4582
|
-
if (Y === f) return
|
|
4583
|
+
if (Y === f) return v;
|
|
4583
4584
|
break;
|
|
4584
4585
|
}
|
|
4585
|
-
if (U.match_length = 0, Q = a._tr_tally(U, 0, U.window[U.strstart]), U.lookahead--, U.strstart++, Q && (N(U, !1), U.strm.avail_out === 0)) return
|
|
4586
|
+
if (U.match_length = 0, Q = a._tr_tally(U, 0, U.window[U.strstart]), U.lookahead--, U.strstart++, Q && (N(U, !1), U.strm.avail_out === 0)) return v;
|
|
4586
4587
|
}
|
|
4587
|
-
return U.insert = 0, Y === d ? (N(U, !0), U.strm.avail_out === 0 ? q : H) : U.last_lit && (N(U, !1), U.strm.avail_out === 0) ?
|
|
4588
|
+
return U.insert = 0, Y === d ? (N(U, !0), U.strm.avail_out === 0 ? q : H) : U.last_lit && (N(U, !1), U.strm.avail_out === 0) ? v : I;
|
|
4588
4589
|
})(L, G) : L.strategy === 3 ? (function(U, Y) {
|
|
4589
4590
|
for (var Q, $, ie, he, ae = U.window; ; ) {
|
|
4590
4591
|
if (U.lookahead <= D) {
|
|
4591
|
-
if (fe(U), U.lookahead <= D && Y === f) return
|
|
4592
|
+
if (fe(U), U.lookahead <= D && Y === f) return v;
|
|
4592
4593
|
if (U.lookahead === 0) break;
|
|
4593
4594
|
}
|
|
4594
4595
|
if (U.match_length = 0, U.lookahead >= P && 0 < U.strstart && ($ = ae[ie = U.strstart - 1]) === ae[++ie] && $ === ae[++ie] && $ === ae[++ie]) {
|
|
@@ -4598,11 +4599,11 @@ function fc() {
|
|
|
4598
4599
|
while ($ === ae[++ie] && $ === ae[++ie] && $ === ae[++ie] && $ === ae[++ie] && $ === ae[++ie] && $ === ae[++ie] && $ === ae[++ie] && $ === ae[++ie] && ie < he);
|
|
4599
4600
|
U.match_length = D - (he - ie), U.match_length > U.lookahead && (U.match_length = U.lookahead);
|
|
4600
4601
|
}
|
|
4601
|
-
if (U.match_length >= P ? (Q = a._tr_tally(U, 1, U.match_length - P), U.lookahead -= U.match_length, U.strstart += U.match_length, U.match_length = 0) : (Q = a._tr_tally(U, 0, U.window[U.strstart]), U.lookahead--, U.strstart++), Q && (N(U, !1), U.strm.avail_out === 0)) return
|
|
4602
|
+
if (U.match_length >= P ? (Q = a._tr_tally(U, 1, U.match_length - P), U.lookahead -= U.match_length, U.strstart += U.match_length, U.match_length = 0) : (Q = a._tr_tally(U, 0, U.window[U.strstart]), U.lookahead--, U.strstart++), Q && (N(U, !1), U.strm.avail_out === 0)) return v;
|
|
4602
4603
|
}
|
|
4603
|
-
return U.insert = 0, Y === d ? (N(U, !0), U.strm.avail_out === 0 ? q : H) : U.last_lit && (N(U, !1), U.strm.avail_out === 0) ?
|
|
4604
|
+
return U.insert = 0, Y === d ? (N(U, !0), U.strm.avail_out === 0 ? q : H) : U.last_lit && (N(U, !1), U.strm.avail_out === 0) ? v : I;
|
|
4604
4605
|
})(L, G) : o[L.level].func(L, G);
|
|
4605
|
-
if (X !== q && X !== H || (L.status = 666), X ===
|
|
4606
|
+
if (X !== q && X !== H || (L.status = 666), X === v || X === q) return S.avail_out === 0 && (L.last_flush = -1), p;
|
|
4606
4607
|
if (X === I && (G === 1 ? a._tr_align(L) : G !== 5 && (a._tr_stored_block(L, 0, 0, !1), G === 3 && (ne(L.head), L.lookahead === 0 && (L.strstart = 0, L.block_start = 0, L.insert = 0))), O(S), S.avail_out === 0)) return L.last_flush = -1, p;
|
|
4607
4608
|
}
|
|
4608
4609
|
return G !== d ? p : L.wrap <= 0 ? 1 : (L.wrap === 2 ? (te(L, 255 & S.adler), te(L, S.adler >> 8 & 255), te(L, S.adler >> 16 & 255), te(L, S.adler >> 24 & 255), te(L, 255 & S.total_in), te(L, S.total_in >> 8 & 255), te(L, S.total_in >> 16 & 255), te(L, S.total_in >> 24 & 255)) : (J(L, S.adler >>> 16), J(L, 65535 & S.adler)), O(S), 0 < L.wrap && (L.wrap = -L.wrap), L.pending !== 0 ? p : 1);
|
|
@@ -4624,10 +4625,10 @@ function fc() {
|
|
|
4624
4625
|
};
|
|
4625
4626
|
}, {}], 48: [function(t, n, i) {
|
|
4626
4627
|
n.exports = function(o, r) {
|
|
4627
|
-
var a, l, h, c, f, d, p, u, m, g, y, _, w, x,
|
|
4628
|
-
a = o.state, l = o.next_in,
|
|
4628
|
+
var a, l, h, c, f, d, p, u, m, g, y, _, w, x, b, M, A, C, P, D, B, T, R, v, I;
|
|
4629
|
+
a = o.state, l = o.next_in, v = o.input, h = l + (o.avail_in - 5), c = o.next_out, I = o.output, f = c - (r - o.avail_out), d = c + (o.avail_out - 257), p = a.dmax, u = a.wsize, m = a.whave, g = a.wnext, y = a.window, _ = a.hold, w = a.bits, x = a.lencode, b = a.distcode, M = (1 << a.lenbits) - 1, A = (1 << a.distbits) - 1;
|
|
4629
4630
|
e: do {
|
|
4630
|
-
w < 15 && (_ +=
|
|
4631
|
+
w < 15 && (_ += v[l++] << w, w += 8, _ += v[l++] << w, w += 8), C = x[_ & M];
|
|
4631
4632
|
t: for (; ; ) {
|
|
4632
4633
|
if (_ >>>= P = C >>> 24, w -= P, (P = C >>> 16 & 255) === 0) I[c++] = 65535 & C;
|
|
4633
4634
|
else {
|
|
@@ -4643,17 +4644,17 @@ function fc() {
|
|
|
4643
4644
|
o.msg = "invalid literal/length code", a.mode = 30;
|
|
4644
4645
|
break e;
|
|
4645
4646
|
}
|
|
4646
|
-
D = 65535 & C, (P &= 15) && (w < P && (_ +=
|
|
4647
|
+
D = 65535 & C, (P &= 15) && (w < P && (_ += v[l++] << w, w += 8), D += _ & (1 << P) - 1, _ >>>= P, w -= P), w < 15 && (_ += v[l++] << w, w += 8, _ += v[l++] << w, w += 8), C = b[_ & A];
|
|
4647
4648
|
n: for (; ; ) {
|
|
4648
4649
|
if (_ >>>= P = C >>> 24, w -= P, !(16 & (P = C >>> 16 & 255))) {
|
|
4649
4650
|
if ((64 & P) == 0) {
|
|
4650
|
-
C =
|
|
4651
|
+
C = b[(65535 & C) + (_ & (1 << P) - 1)];
|
|
4651
4652
|
continue n;
|
|
4652
4653
|
}
|
|
4653
4654
|
o.msg = "invalid distance code", a.mode = 30;
|
|
4654
4655
|
break e;
|
|
4655
4656
|
}
|
|
4656
|
-
if (B = 65535 & C, w < (P &= 15) && (_ +=
|
|
4657
|
+
if (B = 65535 & C, w < (P &= 15) && (_ += v[l++] << w, (w += 8) < P && (_ += v[l++] << w, w += 8)), p < (B += _ & (1 << P) - 1)) {
|
|
4657
4658
|
o.msg = "invalid distance too far back", a.mode = 30;
|
|
4658
4659
|
break e;
|
|
4659
4660
|
}
|
|
@@ -4709,13 +4710,13 @@ function fc() {
|
|
|
4709
4710
|
var R;
|
|
4710
4711
|
return T && T.state ? ((R = T.state).wsize = 0, R.whave = 0, R.wnext = 0, w(T)) : p;
|
|
4711
4712
|
}
|
|
4712
|
-
function
|
|
4713
|
-
var
|
|
4714
|
-
return T && T.state ? (I = T.state, R < 0 ? (
|
|
4713
|
+
function b(T, R) {
|
|
4714
|
+
var v, I;
|
|
4715
|
+
return T && T.state ? (I = T.state, R < 0 ? (v = 0, R = -R) : (v = 1 + (R >> 4), R < 48 && (R &= 15)), R && (R < 8 || 15 < R) ? p : (I.window !== null && I.wbits !== R && (I.window = null), I.wrap = v, I.wbits = R, x(T))) : p;
|
|
4715
4716
|
}
|
|
4716
4717
|
function M(T, R) {
|
|
4717
|
-
var
|
|
4718
|
-
return T ? (I = new _(), (T.state = I).window = null, (
|
|
4718
|
+
var v, I;
|
|
4719
|
+
return T ? (I = new _(), (T.state = I).window = null, (v = b(T, R)) !== d && (T.state = null), v) : p;
|
|
4719
4720
|
}
|
|
4720
4721
|
var A, C, P = !0;
|
|
4721
4722
|
function D(T) {
|
|
@@ -4730,144 +4731,144 @@ function fc() {
|
|
|
4730
4731
|
}
|
|
4731
4732
|
T.lencode = A, T.lenbits = 9, T.distcode = C, T.distbits = 5;
|
|
4732
4733
|
}
|
|
4733
|
-
function B(T, R,
|
|
4734
|
+
function B(T, R, v, I) {
|
|
4734
4735
|
var q, H = T.state;
|
|
4735
|
-
return H.window === null && (H.wsize = 1 << H.wbits, H.wnext = 0, H.whave = 0, H.window = new o.Buf8(H.wsize)), I >= H.wsize ? (o.arraySet(H.window, R,
|
|
4736
|
+
return H.window === null && (H.wsize = 1 << H.wbits, H.wnext = 0, H.whave = 0, H.window = new o.Buf8(H.wsize)), I >= H.wsize ? (o.arraySet(H.window, R, v - H.wsize, H.wsize, 0), H.wnext = 0, H.whave = H.wsize) : (I < (q = H.wsize - H.wnext) && (q = I), o.arraySet(H.window, R, v - I, q, H.wnext), (I -= q) ? (o.arraySet(H.window, R, v - I, I, 0), H.wnext = I, H.whave = H.wsize) : (H.wnext += q, H.wnext === H.wsize && (H.wnext = 0), H.whave < H.wsize && (H.whave += q))), 0;
|
|
4736
4737
|
}
|
|
4737
|
-
i.inflateReset = x, i.inflateReset2 =
|
|
4738
|
+
i.inflateReset = x, i.inflateReset2 = b, i.inflateResetKeep = w, i.inflateInit = function(T) {
|
|
4738
4739
|
return M(T, 15);
|
|
4739
4740
|
}, i.inflateInit2 = M, i.inflate = function(T, R) {
|
|
4740
|
-
var
|
|
4741
|
+
var v, I, q, H, ee, j, ne, O, N, te, J, K, fe, pe, se, oe, ue, me, Se, Re, S, G, V, L, k = 0, z = new o.Buf8(4), W = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
|
|
4741
4742
|
if (!T || !T.state || !T.output || !T.input && T.avail_in !== 0) return p;
|
|
4742
|
-
(
|
|
4743
|
-
e: for (; ; ) switch (
|
|
4743
|
+
(v = T.state).mode === 12 && (v.mode = 13), ee = T.next_out, q = T.output, ne = T.avail_out, H = T.next_in, I = T.input, j = T.avail_in, O = v.hold, N = v.bits, te = j, J = ne, G = d;
|
|
4744
|
+
e: for (; ; ) switch (v.mode) {
|
|
4744
4745
|
case u:
|
|
4745
|
-
if (
|
|
4746
|
-
|
|
4746
|
+
if (v.wrap === 0) {
|
|
4747
|
+
v.mode = 13;
|
|
4747
4748
|
break;
|
|
4748
4749
|
}
|
|
4749
4750
|
for (; N < 16; ) {
|
|
4750
4751
|
if (j === 0) break e;
|
|
4751
4752
|
j--, O += I[H++] << N, N += 8;
|
|
4752
4753
|
}
|
|
4753
|
-
if (2 &
|
|
4754
|
-
z[
|
|
4754
|
+
if (2 & v.wrap && O === 35615) {
|
|
4755
|
+
z[v.check = 0] = 255 & O, z[1] = O >>> 8 & 255, v.check = a(v.check, z, 2, 0), N = O = 0, v.mode = 2;
|
|
4755
4756
|
break;
|
|
4756
4757
|
}
|
|
4757
|
-
if (
|
|
4758
|
-
T.msg = "incorrect header check",
|
|
4758
|
+
if (v.flags = 0, v.head && (v.head.done = !1), !(1 & v.wrap) || (((255 & O) << 8) + (O >> 8)) % 31) {
|
|
4759
|
+
T.msg = "incorrect header check", v.mode = 30;
|
|
4759
4760
|
break;
|
|
4760
4761
|
}
|
|
4761
4762
|
if ((15 & O) != 8) {
|
|
4762
|
-
T.msg = "unknown compression method",
|
|
4763
|
+
T.msg = "unknown compression method", v.mode = 30;
|
|
4763
4764
|
break;
|
|
4764
4765
|
}
|
|
4765
|
-
if (N -= 4, S = 8 + (15 & (O >>>= 4)),
|
|
4766
|
-
else if (S >
|
|
4767
|
-
T.msg = "invalid window size",
|
|
4766
|
+
if (N -= 4, S = 8 + (15 & (O >>>= 4)), v.wbits === 0) v.wbits = S;
|
|
4767
|
+
else if (S > v.wbits) {
|
|
4768
|
+
T.msg = "invalid window size", v.mode = 30;
|
|
4768
4769
|
break;
|
|
4769
4770
|
}
|
|
4770
|
-
|
|
4771
|
+
v.dmax = 1 << S, T.adler = v.check = 1, v.mode = 512 & O ? 10 : 12, N = O = 0;
|
|
4771
4772
|
break;
|
|
4772
4773
|
case 2:
|
|
4773
4774
|
for (; N < 16; ) {
|
|
4774
4775
|
if (j === 0) break e;
|
|
4775
4776
|
j--, O += I[H++] << N, N += 8;
|
|
4776
4777
|
}
|
|
4777
|
-
if (
|
|
4778
|
-
T.msg = "unknown compression method",
|
|
4778
|
+
if (v.flags = O, (255 & v.flags) != 8) {
|
|
4779
|
+
T.msg = "unknown compression method", v.mode = 30;
|
|
4779
4780
|
break;
|
|
4780
4781
|
}
|
|
4781
|
-
if (57344 &
|
|
4782
|
-
T.msg = "unknown header flags set",
|
|
4782
|
+
if (57344 & v.flags) {
|
|
4783
|
+
T.msg = "unknown header flags set", v.mode = 30;
|
|
4783
4784
|
break;
|
|
4784
4785
|
}
|
|
4785
|
-
|
|
4786
|
+
v.head && (v.head.text = O >> 8 & 1), 512 & v.flags && (z[0] = 255 & O, z[1] = O >>> 8 & 255, v.check = a(v.check, z, 2, 0)), N = O = 0, v.mode = 3;
|
|
4786
4787
|
case 3:
|
|
4787
4788
|
for (; N < 32; ) {
|
|
4788
4789
|
if (j === 0) break e;
|
|
4789
4790
|
j--, O += I[H++] << N, N += 8;
|
|
4790
4791
|
}
|
|
4791
|
-
|
|
4792
|
+
v.head && (v.head.time = O), 512 & v.flags && (z[0] = 255 & O, z[1] = O >>> 8 & 255, z[2] = O >>> 16 & 255, z[3] = O >>> 24 & 255, v.check = a(v.check, z, 4, 0)), N = O = 0, v.mode = 4;
|
|
4792
4793
|
case 4:
|
|
4793
4794
|
for (; N < 16; ) {
|
|
4794
4795
|
if (j === 0) break e;
|
|
4795
4796
|
j--, O += I[H++] << N, N += 8;
|
|
4796
4797
|
}
|
|
4797
|
-
|
|
4798
|
+
v.head && (v.head.xflags = 255 & O, v.head.os = O >> 8), 512 & v.flags && (z[0] = 255 & O, z[1] = O >>> 8 & 255, v.check = a(v.check, z, 2, 0)), N = O = 0, v.mode = 5;
|
|
4798
4799
|
case 5:
|
|
4799
|
-
if (1024 &
|
|
4800
|
+
if (1024 & v.flags) {
|
|
4800
4801
|
for (; N < 16; ) {
|
|
4801
4802
|
if (j === 0) break e;
|
|
4802
4803
|
j--, O += I[H++] << N, N += 8;
|
|
4803
4804
|
}
|
|
4804
|
-
|
|
4805
|
-
} else
|
|
4806
|
-
|
|
4805
|
+
v.length = O, v.head && (v.head.extra_len = O), 512 & v.flags && (z[0] = 255 & O, z[1] = O >>> 8 & 255, v.check = a(v.check, z, 2, 0)), N = O = 0;
|
|
4806
|
+
} else v.head && (v.head.extra = null);
|
|
4807
|
+
v.mode = 6;
|
|
4807
4808
|
case 6:
|
|
4808
|
-
if (1024 &
|
|
4809
|
-
|
|
4809
|
+
if (1024 & v.flags && (j < (K = v.length) && (K = j), K && (v.head && (S = v.head.extra_len - v.length, v.head.extra || (v.head.extra = new Array(v.head.extra_len)), o.arraySet(v.head.extra, I, H, K, S)), 512 & v.flags && (v.check = a(v.check, I, K, H)), j -= K, H += K, v.length -= K), v.length)) break e;
|
|
4810
|
+
v.length = 0, v.mode = 7;
|
|
4810
4811
|
case 7:
|
|
4811
|
-
if (2048 &
|
|
4812
|
+
if (2048 & v.flags) {
|
|
4812
4813
|
if (j === 0) break e;
|
|
4813
|
-
for (K = 0; S = I[H + K++],
|
|
4814
|
-
if (512 &
|
|
4815
|
-
} else
|
|
4816
|
-
|
|
4814
|
+
for (K = 0; S = I[H + K++], v.head && S && v.length < 65536 && (v.head.name += String.fromCharCode(S)), S && K < j; ) ;
|
|
4815
|
+
if (512 & v.flags && (v.check = a(v.check, I, K, H)), j -= K, H += K, S) break e;
|
|
4816
|
+
} else v.head && (v.head.name = null);
|
|
4817
|
+
v.length = 0, v.mode = 8;
|
|
4817
4818
|
case 8:
|
|
4818
|
-
if (4096 &
|
|
4819
|
+
if (4096 & v.flags) {
|
|
4819
4820
|
if (j === 0) break e;
|
|
4820
|
-
for (K = 0; S = I[H + K++],
|
|
4821
|
-
if (512 &
|
|
4822
|
-
} else
|
|
4823
|
-
|
|
4821
|
+
for (K = 0; S = I[H + K++], v.head && S && v.length < 65536 && (v.head.comment += String.fromCharCode(S)), S && K < j; ) ;
|
|
4822
|
+
if (512 & v.flags && (v.check = a(v.check, I, K, H)), j -= K, H += K, S) break e;
|
|
4823
|
+
} else v.head && (v.head.comment = null);
|
|
4824
|
+
v.mode = 9;
|
|
4824
4825
|
case 9:
|
|
4825
|
-
if (512 &
|
|
4826
|
+
if (512 & v.flags) {
|
|
4826
4827
|
for (; N < 16; ) {
|
|
4827
4828
|
if (j === 0) break e;
|
|
4828
4829
|
j--, O += I[H++] << N, N += 8;
|
|
4829
4830
|
}
|
|
4830
|
-
if (O !== (65535 &
|
|
4831
|
-
T.msg = "header crc mismatch",
|
|
4831
|
+
if (O !== (65535 & v.check)) {
|
|
4832
|
+
T.msg = "header crc mismatch", v.mode = 30;
|
|
4832
4833
|
break;
|
|
4833
4834
|
}
|
|
4834
4835
|
N = O = 0;
|
|
4835
4836
|
}
|
|
4836
|
-
|
|
4837
|
+
v.head && (v.head.hcrc = v.flags >> 9 & 1, v.head.done = !0), T.adler = v.check = 0, v.mode = 12;
|
|
4837
4838
|
break;
|
|
4838
4839
|
case 10:
|
|
4839
4840
|
for (; N < 32; ) {
|
|
4840
4841
|
if (j === 0) break e;
|
|
4841
4842
|
j--, O += I[H++] << N, N += 8;
|
|
4842
4843
|
}
|
|
4843
|
-
T.adler =
|
|
4844
|
+
T.adler = v.check = y(O), N = O = 0, v.mode = 11;
|
|
4844
4845
|
case 11:
|
|
4845
|
-
if (
|
|
4846
|
-
T.adler =
|
|
4846
|
+
if (v.havedict === 0) return T.next_out = ee, T.avail_out = ne, T.next_in = H, T.avail_in = j, v.hold = O, v.bits = N, 2;
|
|
4847
|
+
T.adler = v.check = 1, v.mode = 12;
|
|
4847
4848
|
case 12:
|
|
4848
4849
|
if (R === 5 || R === 6) break e;
|
|
4849
4850
|
case 13:
|
|
4850
|
-
if (
|
|
4851
|
-
O >>>= 7 & N, N -= 7 & N,
|
|
4851
|
+
if (v.last) {
|
|
4852
|
+
O >>>= 7 & N, N -= 7 & N, v.mode = 27;
|
|
4852
4853
|
break;
|
|
4853
4854
|
}
|
|
4854
4855
|
for (; N < 3; ) {
|
|
4855
4856
|
if (j === 0) break e;
|
|
4856
4857
|
j--, O += I[H++] << N, N += 8;
|
|
4857
4858
|
}
|
|
4858
|
-
switch (
|
|
4859
|
+
switch (v.last = 1 & O, N -= 1, 3 & (O >>>= 1)) {
|
|
4859
4860
|
case 0:
|
|
4860
|
-
|
|
4861
|
+
v.mode = 14;
|
|
4861
4862
|
break;
|
|
4862
4863
|
case 1:
|
|
4863
|
-
if (D(
|
|
4864
|
+
if (D(v), v.mode = 20, R !== 6) break;
|
|
4864
4865
|
O >>>= 2, N -= 2;
|
|
4865
4866
|
break e;
|
|
4866
4867
|
case 2:
|
|
4867
|
-
|
|
4868
|
+
v.mode = 17;
|
|
4868
4869
|
break;
|
|
4869
4870
|
case 3:
|
|
4870
|
-
T.msg = "invalid block type",
|
|
4871
|
+
T.msg = "invalid block type", v.mode = 30;
|
|
4871
4872
|
}
|
|
4872
4873
|
O >>>= 2, N -= 2;
|
|
4873
4874
|
break;
|
|
@@ -4877,62 +4878,62 @@ function fc() {
|
|
|
4877
4878
|
j--, O += I[H++] << N, N += 8;
|
|
4878
4879
|
}
|
|
4879
4880
|
if ((65535 & O) != (O >>> 16 ^ 65535)) {
|
|
4880
|
-
T.msg = "invalid stored block lengths",
|
|
4881
|
+
T.msg = "invalid stored block lengths", v.mode = 30;
|
|
4881
4882
|
break;
|
|
4882
4883
|
}
|
|
4883
|
-
if (
|
|
4884
|
+
if (v.length = 65535 & O, N = O = 0, v.mode = 15, R === 6) break e;
|
|
4884
4885
|
case 15:
|
|
4885
|
-
|
|
4886
|
+
v.mode = 16;
|
|
4886
4887
|
case 16:
|
|
4887
|
-
if (K =
|
|
4888
|
+
if (K = v.length) {
|
|
4888
4889
|
if (j < K && (K = j), ne < K && (K = ne), K === 0) break e;
|
|
4889
|
-
o.arraySet(q, I, H, K, ee), j -= K, H += K, ne -= K, ee += K,
|
|
4890
|
+
o.arraySet(q, I, H, K, ee), j -= K, H += K, ne -= K, ee += K, v.length -= K;
|
|
4890
4891
|
break;
|
|
4891
4892
|
}
|
|
4892
|
-
|
|
4893
|
+
v.mode = 12;
|
|
4893
4894
|
break;
|
|
4894
4895
|
case 17:
|
|
4895
4896
|
for (; N < 14; ) {
|
|
4896
4897
|
if (j === 0) break e;
|
|
4897
4898
|
j--, O += I[H++] << N, N += 8;
|
|
4898
4899
|
}
|
|
4899
|
-
if (
|
|
4900
|
-
T.msg = "too many length or distance symbols",
|
|
4900
|
+
if (v.nlen = 257 + (31 & O), O >>>= 5, N -= 5, v.ndist = 1 + (31 & O), O >>>= 5, N -= 5, v.ncode = 4 + (15 & O), O >>>= 4, N -= 4, 286 < v.nlen || 30 < v.ndist) {
|
|
4901
|
+
T.msg = "too many length or distance symbols", v.mode = 30;
|
|
4901
4902
|
break;
|
|
4902
4903
|
}
|
|
4903
|
-
|
|
4904
|
+
v.have = 0, v.mode = 18;
|
|
4904
4905
|
case 18:
|
|
4905
|
-
for (;
|
|
4906
|
+
for (; v.have < v.ncode; ) {
|
|
4906
4907
|
for (; N < 3; ) {
|
|
4907
4908
|
if (j === 0) break e;
|
|
4908
4909
|
j--, O += I[H++] << N, N += 8;
|
|
4909
4910
|
}
|
|
4910
|
-
|
|
4911
|
+
v.lens[W[v.have++]] = 7 & O, O >>>= 3, N -= 3;
|
|
4911
4912
|
}
|
|
4912
|
-
for (;
|
|
4913
|
-
if (
|
|
4914
|
-
T.msg = "invalid code lengths set",
|
|
4913
|
+
for (; v.have < 19; ) v.lens[W[v.have++]] = 0;
|
|
4914
|
+
if (v.lencode = v.lendyn, v.lenbits = 7, V = { bits: v.lenbits }, G = h(0, v.lens, 0, 19, v.lencode, 0, v.work, V), v.lenbits = V.bits, G) {
|
|
4915
|
+
T.msg = "invalid code lengths set", v.mode = 30;
|
|
4915
4916
|
break;
|
|
4916
4917
|
}
|
|
4917
|
-
|
|
4918
|
+
v.have = 0, v.mode = 19;
|
|
4918
4919
|
case 19:
|
|
4919
|
-
for (;
|
|
4920
|
-
for (; oe = (k =
|
|
4920
|
+
for (; v.have < v.nlen + v.ndist; ) {
|
|
4921
|
+
for (; oe = (k = v.lencode[O & (1 << v.lenbits) - 1]) >>> 16 & 255, ue = 65535 & k, !((se = k >>> 24) <= N); ) {
|
|
4921
4922
|
if (j === 0) break e;
|
|
4922
4923
|
j--, O += I[H++] << N, N += 8;
|
|
4923
4924
|
}
|
|
4924
|
-
if (ue < 16) O >>>= se, N -= se,
|
|
4925
|
+
if (ue < 16) O >>>= se, N -= se, v.lens[v.have++] = ue;
|
|
4925
4926
|
else {
|
|
4926
4927
|
if (ue === 16) {
|
|
4927
4928
|
for (L = se + 2; N < L; ) {
|
|
4928
4929
|
if (j === 0) break e;
|
|
4929
4930
|
j--, O += I[H++] << N, N += 8;
|
|
4930
4931
|
}
|
|
4931
|
-
if (O >>>= se, N -= se,
|
|
4932
|
-
T.msg = "invalid bit length repeat",
|
|
4932
|
+
if (O >>>= se, N -= se, v.have === 0) {
|
|
4933
|
+
T.msg = "invalid bit length repeat", v.mode = 30;
|
|
4933
4934
|
break;
|
|
4934
4935
|
}
|
|
4935
|
-
S =
|
|
4936
|
+
S = v.lens[v.have - 1], K = 3 + (3 & O), O >>>= 2, N -= 2;
|
|
4936
4937
|
} else if (ue === 17) {
|
|
4937
4938
|
for (L = se + 3; N < L; ) {
|
|
4938
4939
|
if (j === 0) break e;
|
|
@@ -4946,139 +4947,139 @@ function fc() {
|
|
|
4946
4947
|
}
|
|
4947
4948
|
N -= se, S = 0, K = 11 + (127 & (O >>>= se)), O >>>= 7, N -= 7;
|
|
4948
4949
|
}
|
|
4949
|
-
if (
|
|
4950
|
-
T.msg = "invalid bit length repeat",
|
|
4950
|
+
if (v.have + K > v.nlen + v.ndist) {
|
|
4951
|
+
T.msg = "invalid bit length repeat", v.mode = 30;
|
|
4951
4952
|
break;
|
|
4952
4953
|
}
|
|
4953
|
-
for (; K--; )
|
|
4954
|
+
for (; K--; ) v.lens[v.have++] = S;
|
|
4954
4955
|
}
|
|
4955
4956
|
}
|
|
4956
|
-
if (
|
|
4957
|
-
if (
|
|
4958
|
-
T.msg = "invalid code -- missing end-of-block",
|
|
4957
|
+
if (v.mode === 30) break;
|
|
4958
|
+
if (v.lens[256] === 0) {
|
|
4959
|
+
T.msg = "invalid code -- missing end-of-block", v.mode = 30;
|
|
4959
4960
|
break;
|
|
4960
4961
|
}
|
|
4961
|
-
if (
|
|
4962
|
-
T.msg = "invalid literal/lengths set",
|
|
4962
|
+
if (v.lenbits = 9, V = { bits: v.lenbits }, G = h(c, v.lens, 0, v.nlen, v.lencode, 0, v.work, V), v.lenbits = V.bits, G) {
|
|
4963
|
+
T.msg = "invalid literal/lengths set", v.mode = 30;
|
|
4963
4964
|
break;
|
|
4964
4965
|
}
|
|
4965
|
-
if (
|
|
4966
|
-
T.msg = "invalid distances set",
|
|
4966
|
+
if (v.distbits = 6, v.distcode = v.distdyn, V = { bits: v.distbits }, G = h(f, v.lens, v.nlen, v.ndist, v.distcode, 0, v.work, V), v.distbits = V.bits, G) {
|
|
4967
|
+
T.msg = "invalid distances set", v.mode = 30;
|
|
4967
4968
|
break;
|
|
4968
4969
|
}
|
|
4969
|
-
if (
|
|
4970
|
+
if (v.mode = 20, R === 6) break e;
|
|
4970
4971
|
case 20:
|
|
4971
|
-
|
|
4972
|
+
v.mode = 21;
|
|
4972
4973
|
case 21:
|
|
4973
4974
|
if (6 <= j && 258 <= ne) {
|
|
4974
|
-
T.next_out = ee, T.avail_out = ne, T.next_in = H, T.avail_in = j,
|
|
4975
|
+
T.next_out = ee, T.avail_out = ne, T.next_in = H, T.avail_in = j, v.hold = O, v.bits = N, l(T, J), ee = T.next_out, q = T.output, ne = T.avail_out, H = T.next_in, I = T.input, j = T.avail_in, O = v.hold, N = v.bits, v.mode === 12 && (v.back = -1);
|
|
4975
4976
|
break;
|
|
4976
4977
|
}
|
|
4977
|
-
for (
|
|
4978
|
+
for (v.back = 0; oe = (k = v.lencode[O & (1 << v.lenbits) - 1]) >>> 16 & 255, ue = 65535 & k, !((se = k >>> 24) <= N); ) {
|
|
4978
4979
|
if (j === 0) break e;
|
|
4979
4980
|
j--, O += I[H++] << N, N += 8;
|
|
4980
4981
|
}
|
|
4981
4982
|
if (oe && (240 & oe) == 0) {
|
|
4982
|
-
for (me = se, Se = oe, Re = ue; oe = (k =
|
|
4983
|
+
for (me = se, Se = oe, Re = ue; oe = (k = v.lencode[Re + ((O & (1 << me + Se) - 1) >> me)]) >>> 16 & 255, ue = 65535 & k, !(me + (se = k >>> 24) <= N); ) {
|
|
4983
4984
|
if (j === 0) break e;
|
|
4984
4985
|
j--, O += I[H++] << N, N += 8;
|
|
4985
4986
|
}
|
|
4986
|
-
O >>>= me, N -= me,
|
|
4987
|
+
O >>>= me, N -= me, v.back += me;
|
|
4987
4988
|
}
|
|
4988
|
-
if (O >>>= se, N -= se,
|
|
4989
|
-
|
|
4989
|
+
if (O >>>= se, N -= se, v.back += se, v.length = ue, oe === 0) {
|
|
4990
|
+
v.mode = 26;
|
|
4990
4991
|
break;
|
|
4991
4992
|
}
|
|
4992
4993
|
if (32 & oe) {
|
|
4993
|
-
|
|
4994
|
+
v.back = -1, v.mode = 12;
|
|
4994
4995
|
break;
|
|
4995
4996
|
}
|
|
4996
4997
|
if (64 & oe) {
|
|
4997
|
-
T.msg = "invalid literal/length code",
|
|
4998
|
+
T.msg = "invalid literal/length code", v.mode = 30;
|
|
4998
4999
|
break;
|
|
4999
5000
|
}
|
|
5000
|
-
|
|
5001
|
+
v.extra = 15 & oe, v.mode = 22;
|
|
5001
5002
|
case 22:
|
|
5002
|
-
if (
|
|
5003
|
-
for (L =
|
|
5003
|
+
if (v.extra) {
|
|
5004
|
+
for (L = v.extra; N < L; ) {
|
|
5004
5005
|
if (j === 0) break e;
|
|
5005
5006
|
j--, O += I[H++] << N, N += 8;
|
|
5006
5007
|
}
|
|
5007
|
-
|
|
5008
|
+
v.length += O & (1 << v.extra) - 1, O >>>= v.extra, N -= v.extra, v.back += v.extra;
|
|
5008
5009
|
}
|
|
5009
|
-
|
|
5010
|
+
v.was = v.length, v.mode = 23;
|
|
5010
5011
|
case 23:
|
|
5011
|
-
for (; oe = (k =
|
|
5012
|
+
for (; oe = (k = v.distcode[O & (1 << v.distbits) - 1]) >>> 16 & 255, ue = 65535 & k, !((se = k >>> 24) <= N); ) {
|
|
5012
5013
|
if (j === 0) break e;
|
|
5013
5014
|
j--, O += I[H++] << N, N += 8;
|
|
5014
5015
|
}
|
|
5015
5016
|
if ((240 & oe) == 0) {
|
|
5016
|
-
for (me = se, Se = oe, Re = ue; oe = (k =
|
|
5017
|
+
for (me = se, Se = oe, Re = ue; oe = (k = v.distcode[Re + ((O & (1 << me + Se) - 1) >> me)]) >>> 16 & 255, ue = 65535 & k, !(me + (se = k >>> 24) <= N); ) {
|
|
5017
5018
|
if (j === 0) break e;
|
|
5018
5019
|
j--, O += I[H++] << N, N += 8;
|
|
5019
5020
|
}
|
|
5020
|
-
O >>>= me, N -= me,
|
|
5021
|
+
O >>>= me, N -= me, v.back += me;
|
|
5021
5022
|
}
|
|
5022
|
-
if (O >>>= se, N -= se,
|
|
5023
|
-
T.msg = "invalid distance code",
|
|
5023
|
+
if (O >>>= se, N -= se, v.back += se, 64 & oe) {
|
|
5024
|
+
T.msg = "invalid distance code", v.mode = 30;
|
|
5024
5025
|
break;
|
|
5025
5026
|
}
|
|
5026
|
-
|
|
5027
|
+
v.offset = ue, v.extra = 15 & oe, v.mode = 24;
|
|
5027
5028
|
case 24:
|
|
5028
|
-
if (
|
|
5029
|
-
for (L =
|
|
5029
|
+
if (v.extra) {
|
|
5030
|
+
for (L = v.extra; N < L; ) {
|
|
5030
5031
|
if (j === 0) break e;
|
|
5031
5032
|
j--, O += I[H++] << N, N += 8;
|
|
5032
5033
|
}
|
|
5033
|
-
|
|
5034
|
+
v.offset += O & (1 << v.extra) - 1, O >>>= v.extra, N -= v.extra, v.back += v.extra;
|
|
5034
5035
|
}
|
|
5035
|
-
if (
|
|
5036
|
-
T.msg = "invalid distance too far back",
|
|
5036
|
+
if (v.offset > v.dmax) {
|
|
5037
|
+
T.msg = "invalid distance too far back", v.mode = 30;
|
|
5037
5038
|
break;
|
|
5038
5039
|
}
|
|
5039
|
-
|
|
5040
|
+
v.mode = 25;
|
|
5040
5041
|
case 25:
|
|
5041
5042
|
if (ne === 0) break e;
|
|
5042
|
-
if (K = J - ne,
|
|
5043
|
-
if ((K =
|
|
5044
|
-
T.msg = "invalid distance too far back",
|
|
5043
|
+
if (K = J - ne, v.offset > K) {
|
|
5044
|
+
if ((K = v.offset - K) > v.whave && v.sane) {
|
|
5045
|
+
T.msg = "invalid distance too far back", v.mode = 30;
|
|
5045
5046
|
break;
|
|
5046
5047
|
}
|
|
5047
|
-
fe = K >
|
|
5048
|
-
} else pe = q, fe = ee -
|
|
5049
|
-
for (ne < K && (K = ne), ne -= K,
|
|
5050
|
-
|
|
5048
|
+
fe = K > v.wnext ? (K -= v.wnext, v.wsize - K) : v.wnext - K, K > v.length && (K = v.length), pe = v.window;
|
|
5049
|
+
} else pe = q, fe = ee - v.offset, K = v.length;
|
|
5050
|
+
for (ne < K && (K = ne), ne -= K, v.length -= K; q[ee++] = pe[fe++], --K; ) ;
|
|
5051
|
+
v.length === 0 && (v.mode = 21);
|
|
5051
5052
|
break;
|
|
5052
5053
|
case 26:
|
|
5053
5054
|
if (ne === 0) break e;
|
|
5054
|
-
q[ee++] =
|
|
5055
|
+
q[ee++] = v.length, ne--, v.mode = 21;
|
|
5055
5056
|
break;
|
|
5056
5057
|
case 27:
|
|
5057
|
-
if (
|
|
5058
|
+
if (v.wrap) {
|
|
5058
5059
|
for (; N < 32; ) {
|
|
5059
5060
|
if (j === 0) break e;
|
|
5060
5061
|
j--, O |= I[H++] << N, N += 8;
|
|
5061
5062
|
}
|
|
5062
|
-
if (J -= ne, T.total_out += J,
|
|
5063
|
-
T.msg = "incorrect data check",
|
|
5063
|
+
if (J -= ne, T.total_out += J, v.total += J, J && (T.adler = v.check = v.flags ? a(v.check, q, J, ee - J) : r(v.check, q, J, ee - J)), J = ne, (v.flags ? O : y(O)) !== v.check) {
|
|
5064
|
+
T.msg = "incorrect data check", v.mode = 30;
|
|
5064
5065
|
break;
|
|
5065
5066
|
}
|
|
5066
5067
|
N = O = 0;
|
|
5067
5068
|
}
|
|
5068
|
-
|
|
5069
|
+
v.mode = 28;
|
|
5069
5070
|
case 28:
|
|
5070
|
-
if (
|
|
5071
|
+
if (v.wrap && v.flags) {
|
|
5071
5072
|
for (; N < 32; ) {
|
|
5072
5073
|
if (j === 0) break e;
|
|
5073
5074
|
j--, O += I[H++] << N, N += 8;
|
|
5074
5075
|
}
|
|
5075
|
-
if (O !== (4294967295 &
|
|
5076
|
-
T.msg = "incorrect length check",
|
|
5076
|
+
if (O !== (4294967295 & v.total)) {
|
|
5077
|
+
T.msg = "incorrect length check", v.mode = 30;
|
|
5077
5078
|
break;
|
|
5078
5079
|
}
|
|
5079
5080
|
N = O = 0;
|
|
5080
5081
|
}
|
|
5081
|
-
|
|
5082
|
+
v.mode = 29;
|
|
5082
5083
|
case 29:
|
|
5083
5084
|
G = 1;
|
|
5084
5085
|
break e;
|
|
@@ -5091,43 +5092,43 @@ function fc() {
|
|
|
5091
5092
|
default:
|
|
5092
5093
|
return p;
|
|
5093
5094
|
}
|
|
5094
|
-
return T.next_out = ee, T.avail_out = ne, T.next_in = H, T.avail_in = j,
|
|
5095
|
+
return T.next_out = ee, T.avail_out = ne, T.next_in = H, T.avail_in = j, v.hold = O, v.bits = N, (v.wsize || J !== T.avail_out && v.mode < 30 && (v.mode < 27 || R !== 4)) && B(T, T.output, T.next_out, J - T.avail_out) ? (v.mode = 31, -4) : (te -= T.avail_in, J -= T.avail_out, T.total_in += te, T.total_out += J, v.total += J, v.wrap && J && (T.adler = v.check = v.flags ? a(v.check, q, J, T.next_out - J) : r(v.check, q, J, T.next_out - J)), T.data_type = v.bits + (v.last ? 64 : 0) + (v.mode === 12 ? 128 : 0) + (v.mode === 20 || v.mode === 15 ? 256 : 0), (te == 0 && J === 0 || R === 4) && G === d && (G = -5), G);
|
|
5095
5096
|
}, i.inflateEnd = function(T) {
|
|
5096
5097
|
if (!T || !T.state) return p;
|
|
5097
5098
|
var R = T.state;
|
|
5098
5099
|
return R.window && (R.window = null), T.state = null, d;
|
|
5099
5100
|
}, i.inflateGetHeader = function(T, R) {
|
|
5100
|
-
var
|
|
5101
|
-
return T && T.state ? (2 & (
|
|
5101
|
+
var v;
|
|
5102
|
+
return T && T.state ? (2 & (v = T.state).wrap) == 0 ? p : ((v.head = R).done = !1, d) : p;
|
|
5102
5103
|
}, i.inflateSetDictionary = function(T, R) {
|
|
5103
|
-
var
|
|
5104
|
-
return T && T.state ? (
|
|
5104
|
+
var v, I = R.length;
|
|
5105
|
+
return T && T.state ? (v = T.state).wrap !== 0 && v.mode !== 11 ? p : v.mode === 11 && r(1, R, I, 0) !== v.check ? -3 : B(T, R, I, I) ? (v.mode = 31, -4) : (v.havedict = 1, d) : p;
|
|
5105
5106
|
}, i.inflateInfo = "pako inflate (from Nodeca project)";
|
|
5106
5107
|
}, { "../utils/common": 41, "./adler32": 43, "./crc32": 45, "./inffast": 48, "./inftrees": 50 }], 50: [function(t, n, i) {
|
|
5107
5108
|
var o = t("../utils/common"), r = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], a = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], l = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0], h = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64];
|
|
5108
5109
|
n.exports = function(c, f, d, p, u, m, g, y) {
|
|
5109
|
-
var _, w, x,
|
|
5110
|
+
var _, w, x, b, M, A, C, P, D, B = y.bits, T = 0, R = 0, v = 0, I = 0, q = 0, H = 0, ee = 0, j = 0, ne = 0, O = 0, N = null, te = 0, J = new o.Buf16(16), K = new o.Buf16(16), fe = null, pe = 0;
|
|
5110
5111
|
for (T = 0; T <= 15; T++) J[T] = 0;
|
|
5111
5112
|
for (R = 0; R < p; R++) J[f[d + R]]++;
|
|
5112
5113
|
for (q = B, I = 15; 1 <= I && J[I] === 0; I--) ;
|
|
5113
5114
|
if (I < q && (q = I), I === 0) return u[m++] = 20971520, u[m++] = 20971520, y.bits = 1, 0;
|
|
5114
|
-
for (
|
|
5115
|
-
for (q <
|
|
5115
|
+
for (v = 1; v < I && J[v] === 0; v++) ;
|
|
5116
|
+
for (q < v && (q = v), T = j = 1; T <= 15; T++) if (j <<= 1, (j -= J[T]) < 0) return -1;
|
|
5116
5117
|
if (0 < j && (c === 0 || I !== 1)) return -1;
|
|
5117
5118
|
for (K[1] = 0, T = 1; T < 15; T++) K[T + 1] = K[T] + J[T];
|
|
5118
5119
|
for (R = 0; R < p; R++) f[d + R] !== 0 && (g[K[f[d + R]]++] = R);
|
|
5119
|
-
if (A = c === 0 ? (N = fe = g, 19) : c === 1 ? (N = r, te -= 257, fe = a, pe -= 257, 256) : (N = l, fe = h, -1), T =
|
|
5120
|
+
if (A = c === 0 ? (N = fe = g, 19) : c === 1 ? (N = r, te -= 257, fe = a, pe -= 257, 256) : (N = l, fe = h, -1), T = v, M = m, ee = R = O = 0, x = -1, b = (ne = 1 << (H = q)) - 1, c === 1 && 852 < ne || c === 2 && 592 < ne) return 1;
|
|
5120
5121
|
for (; ; ) {
|
|
5121
|
-
for (C = T - ee, D = g[R] < A ? (P = 0, g[R]) : g[R] > A ? (P = fe[pe + g[R]], N[te + g[R]]) : (P = 96, 0), _ = 1 << T - ee,
|
|
5122
|
+
for (C = T - ee, D = g[R] < A ? (P = 0, g[R]) : g[R] > A ? (P = fe[pe + g[R]], N[te + g[R]]) : (P = 96, 0), _ = 1 << T - ee, v = w = 1 << H; u[M + (O >> ee) + (w -= _)] = C << 24 | P << 16 | D | 0, w !== 0; ) ;
|
|
5122
5123
|
for (_ = 1 << T - 1; O & _; ) _ >>= 1;
|
|
5123
5124
|
if (_ !== 0 ? (O &= _ - 1, O += _) : O = 0, R++, --J[T] == 0) {
|
|
5124
5125
|
if (T === I) break;
|
|
5125
5126
|
T = f[d + g[R]];
|
|
5126
5127
|
}
|
|
5127
|
-
if (q < T && (O &
|
|
5128
|
-
for (ee === 0 && (ee = q), M +=
|
|
5128
|
+
if (q < T && (O & b) !== x) {
|
|
5129
|
+
for (ee === 0 && (ee = q), M += v, j = 1 << (H = T - ee); H + ee < I && !((j -= J[H + ee]) <= 0); ) H++, j <<= 1;
|
|
5129
5130
|
if (ne += 1 << H, c === 1 && 852 < ne || c === 2 && 592 < ne) return 1;
|
|
5130
|
-
u[x = O &
|
|
5131
|
+
u[x = O & b] = q << 24 | H << 16 | M - m | 0;
|
|
5131
5132
|
}
|
|
5132
5133
|
}
|
|
5133
5134
|
return O !== 0 && (u[M + O] = T - ee << 24 | 64 << 16 | 0), y.bits = q, 0;
|
|
@@ -5139,14 +5140,14 @@ function fc() {
|
|
|
5139
5140
|
function l(k) {
|
|
5140
5141
|
for (var z = k.length; 0 <= --z; ) k[z] = 0;
|
|
5141
5142
|
}
|
|
5142
|
-
var h = 0, c = 29, f = 256, d = f + 1 + c, p = 30, u = 19, m = 2 * d + 1, g = 15, y = 16, _ = 7, w = 256, x = 16,
|
|
5143
|
+
var h = 0, c = 29, f = 256, d = f + 1 + c, p = 30, u = 19, m = 2 * d + 1, g = 15, y = 16, _ = 7, w = 256, x = 16, b = 17, M = 18, A = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], C = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], P = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], D = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], B = new Array(2 * (d + 2));
|
|
5143
5144
|
l(B);
|
|
5144
5145
|
var T = new Array(2 * p);
|
|
5145
5146
|
l(T);
|
|
5146
5147
|
var R = new Array(512);
|
|
5147
5148
|
l(R);
|
|
5148
|
-
var
|
|
5149
|
-
l(
|
|
5149
|
+
var v = new Array(256);
|
|
5150
|
+
l(v);
|
|
5150
5151
|
var I = new Array(c);
|
|
5151
5152
|
l(I);
|
|
5152
5153
|
var q, H, ee, j = new Array(p);
|
|
@@ -5200,7 +5201,7 @@ function fc() {
|
|
|
5200
5201
|
}
|
|
5201
5202
|
function Se(k, z, W) {
|
|
5202
5203
|
var X, U, Y, Q, $ = 0;
|
|
5203
|
-
if (k.last_lit !== 0) for (; X = k.pending_buf[k.d_buf + 2 * $] << 8 | k.pending_buf[k.d_buf + 2 * $ + 1], U = k.pending_buf[k.l_buf + $], $++, X === 0 ? K(k, U, z) : (K(k, (Y =
|
|
5204
|
+
if (k.last_lit !== 0) for (; X = k.pending_buf[k.d_buf + 2 * $] << 8 | k.pending_buf[k.d_buf + 2 * $ + 1], U = k.pending_buf[k.l_buf + $], $++, X === 0 ? K(k, U, z) : (K(k, (Y = v[U]) + f + 1, z), (Q = A[Y]) !== 0 && J(k, U -= I[Y], Q), K(k, Y = N(--X), W), (Q = C[Y]) !== 0 && J(k, X -= j[Y], Q)), $ < k.last_lit; ) ;
|
|
5204
5205
|
K(k, w, z);
|
|
5205
5206
|
}
|
|
5206
5207
|
function Re(k, z) {
|
|
@@ -5210,27 +5211,27 @@ function fc() {
|
|
|
5210
5211
|
for (z.max_code = he, W = k.heap_len >> 1; 1 <= W; W--) me(k, Y, W);
|
|
5211
5212
|
for (U = ie; W = k.heap[1], k.heap[1] = k.heap[k.heap_len--], me(k, Y, 1), X = k.heap[1], k.heap[--k.heap_max] = W, k.heap[--k.heap_max] = X, Y[2 * U] = Y[2 * W] + Y[2 * X], k.depth[U] = (k.depth[W] >= k.depth[X] ? k.depth[W] : k.depth[X]) + 1, Y[2 * W + 1] = Y[2 * X + 1] = U, k.heap[1] = U++, me(k, Y, 1), 2 <= k.heap_len; ) ;
|
|
5212
5213
|
k.heap[--k.heap_max] = k.heap[1], (function(ae, Te) {
|
|
5213
|
-
var $e, De, Lt, ye, en,
|
|
5214
|
+
var $e, De, Lt, ye, en, vn, Je = Te.dyn_tree, vt = Te.max_code, Bt = Te.stat_desc.static_tree, It = Te.stat_desc.has_stree, zt = Te.stat_desc.extra_bits, St = Te.stat_desc.extra_base, Sn = Te.stat_desc.max_length, jn = 0;
|
|
5214
5215
|
for (ye = 0; ye <= g; ye++) ae.bl_count[ye] = 0;
|
|
5215
|
-
for (Je[2 * ae.heap[ae.heap_max] + 1] = 0, $e = ae.heap_max + 1; $e < m; $e++)
|
|
5216
|
+
for (Je[2 * ae.heap[ae.heap_max] + 1] = 0, $e = ae.heap_max + 1; $e < m; $e++) Sn < (ye = Je[2 * Je[2 * (De = ae.heap[$e]) + 1] + 1] + 1) && (ye = Sn, jn++), Je[2 * De + 1] = ye, vt < De || (ae.bl_count[ye]++, en = 0, St <= De && (en = zt[De - St]), vn = Je[2 * De], ae.opt_len += vn * (ye + en), It && (ae.static_len += vn * (Bt[2 * De + 1] + en)));
|
|
5216
5217
|
if (jn !== 0) {
|
|
5217
5218
|
do {
|
|
5218
|
-
for (ye =
|
|
5219
|
-
ae.bl_count[ye]--, ae.bl_count[ye + 1] += 2, ae.bl_count[
|
|
5219
|
+
for (ye = Sn - 1; ae.bl_count[ye] === 0; ) ye--;
|
|
5220
|
+
ae.bl_count[ye]--, ae.bl_count[ye + 1] += 2, ae.bl_count[Sn]--, jn -= 2;
|
|
5220
5221
|
} while (0 < jn);
|
|
5221
|
-
for (ye =
|
|
5222
|
+
for (ye = Sn; ye !== 0; ye--) for (De = ae.bl_count[ye]; De !== 0; ) vt < (Lt = ae.heap[--$e]) || (Je[2 * Lt + 1] !== ye && (ae.opt_len += (ye - Je[2 * Lt + 1]) * Je[2 * Lt], Je[2 * Lt + 1] = ye), De--);
|
|
5222
5223
|
}
|
|
5223
5224
|
})(k, z), pe(Y, he, k.bl_count);
|
|
5224
5225
|
}
|
|
5225
5226
|
function S(k, z, W) {
|
|
5226
5227
|
var X, U, Y = -1, Q = z[1], $ = 0, ie = 7, he = 4;
|
|
5227
|
-
for (Q === 0 && (ie = 138, he = 3), z[2 * (W + 1) + 1] = 65535, X = 0; X <= W; X++) U = Q, Q = z[2 * (X + 1) + 1], ++$ < ie && U === Q || ($ < he ? k.bl_tree[2 * U] += $ : U !== 0 ? (U !== Y && k.bl_tree[2 * U]++, k.bl_tree[2 * x]++) : $ <= 10 ? k.bl_tree[2 *
|
|
5228
|
+
for (Q === 0 && (ie = 138, he = 3), z[2 * (W + 1) + 1] = 65535, X = 0; X <= W; X++) U = Q, Q = z[2 * (X + 1) + 1], ++$ < ie && U === Q || ($ < he ? k.bl_tree[2 * U] += $ : U !== 0 ? (U !== Y && k.bl_tree[2 * U]++, k.bl_tree[2 * x]++) : $ <= 10 ? k.bl_tree[2 * b]++ : k.bl_tree[2 * M]++, Y = U, he = ($ = 0) === Q ? (ie = 138, 3) : U === Q ? (ie = 6, 3) : (ie = 7, 4));
|
|
5228
5229
|
}
|
|
5229
5230
|
function G(k, z, W) {
|
|
5230
5231
|
var X, U, Y = -1, Q = z[1], $ = 0, ie = 7, he = 4;
|
|
5231
5232
|
for (Q === 0 && (ie = 138, he = 3), X = 0; X <= W; X++) if (U = Q, Q = z[2 * (X + 1) + 1], !(++$ < ie && U === Q)) {
|
|
5232
5233
|
if ($ < he) for (; K(k, U, k.bl_tree), --$ != 0; ) ;
|
|
5233
|
-
else U !== 0 ? (U !== Y && (K(k, U, k.bl_tree), $--), K(k, x, k.bl_tree), J(k, $ - 3, 2)) : $ <= 10 ? (K(k,
|
|
5234
|
+
else U !== 0 ? (U !== Y && (K(k, U, k.bl_tree), $--), K(k, x, k.bl_tree), J(k, $ - 3, 2)) : $ <= 10 ? (K(k, b, k.bl_tree), J(k, $ - 3, 3)) : (K(k, M, k.bl_tree), J(k, $ - 11, 7));
|
|
5234
5235
|
Y = U, he = ($ = 0) === Q ? (ie = 138, 3) : U === Q ? (ie = 6, 3) : (ie = 7, 4);
|
|
5235
5236
|
}
|
|
5236
5237
|
}
|
|
@@ -5244,8 +5245,8 @@ function fc() {
|
|
|
5244
5245
|
i._tr_init = function(k) {
|
|
5245
5246
|
V || ((function() {
|
|
5246
5247
|
var z, W, X, U, Y, Q = new Array(g + 1);
|
|
5247
|
-
for (U = X = 0; U < c - 1; U++) for (I[U] = X, z = 0; z < 1 << A[U]; z++)
|
|
5248
|
-
for (
|
|
5248
|
+
for (U = X = 0; U < c - 1; U++) for (I[U] = X, z = 0; z < 1 << A[U]; z++) v[X++] = U;
|
|
5249
|
+
for (v[X - 1] = U, U = Y = 0; U < 16; U++) for (j[U] = Y, z = 0; z < 1 << C[U]; z++) R[Y++] = U;
|
|
5249
5250
|
for (Y >>= 7; U < p; U++) for (j[U] = Y << 7, z = 0; z < 1 << C[U] - 7; z++) R[256 + Y++] = U;
|
|
5250
5251
|
for (W = 0; W <= g; W++) Q[W] = 0;
|
|
5251
5252
|
for (z = 0; z <= 143; ) B[2 * z + 1] = 8, z++, Q[8]++;
|
|
@@ -5273,7 +5274,7 @@ function fc() {
|
|
|
5273
5274
|
G($, $.dyn_ltree, ie - 1), G($, $.dyn_dtree, he - 1);
|
|
5274
5275
|
})(k, k.l_desc.max_code + 1, k.d_desc.max_code + 1, Q + 1), Se(k, k.dyn_ltree, k.dyn_dtree)), se(k), X && oe(k);
|
|
5275
5276
|
}, i._tr_tally = function(k, z, W) {
|
|
5276
|
-
return k.pending_buf[k.d_buf + 2 * k.last_lit] = z >>> 8 & 255, k.pending_buf[k.d_buf + 2 * k.last_lit + 1] = 255 & z, k.pending_buf[k.l_buf + k.last_lit] = 255 & W, k.last_lit++, z === 0 ? k.dyn_ltree[2 * W]++ : (k.matches++, z--, k.dyn_ltree[2 * (
|
|
5277
|
+
return k.pending_buf[k.d_buf + 2 * k.last_lit] = z >>> 8 & 255, k.pending_buf[k.d_buf + 2 * k.last_lit + 1] = 255 & z, k.pending_buf[k.l_buf + k.last_lit] = 255 & W, k.last_lit++, z === 0 ? k.dyn_ltree[2 * W]++ : (k.matches++, z--, k.dyn_ltree[2 * (v[W] + f + 1)]++, k.dyn_dtree[2 * N(z)]++), k.last_lit === k.lit_bufsize - 1;
|
|
5277
5278
|
}, i._tr_align = function(k) {
|
|
5278
5279
|
J(k, 2, 3), K(k, w, B), (function(z) {
|
|
5279
5280
|
z.bi_valid === 16 ? (te(z, z.bi_buf), z.bi_buf = 0, z.bi_valid = 0) : 8 <= z.bi_valid && (z.pending_buf[z.pending++] = 255 & z.bi_buf, z.bi_buf >>= 8, z.bi_valid -= 8);
|
|
@@ -5294,10 +5295,10 @@ function fc() {
|
|
|
5294
5295
|
});
|
|
5295
5296
|
} : (function() {
|
|
5296
5297
|
if (r.postMessage && !r.importScripts) {
|
|
5297
|
-
var x = !0,
|
|
5298
|
+
var x = !0, b = r.onmessage;
|
|
5298
5299
|
return r.onmessage = function() {
|
|
5299
5300
|
x = !1;
|
|
5300
|
-
}, r.postMessage("", "*"), r.onmessage =
|
|
5301
|
+
}, r.postMessage("", "*"), r.onmessage = b, x;
|
|
5301
5302
|
}
|
|
5302
5303
|
})() ? (f = "setImmediate$" + Math.random() + "$", r.addEventListener ? r.addEventListener("message", w, !1) : r.attachEvent("onmessage", w), function(x) {
|
|
5303
5304
|
r.postMessage(f + x, "*");
|
|
@@ -5306,16 +5307,16 @@ function fc() {
|
|
|
5306
5307
|
}, function(x) {
|
|
5307
5308
|
c.port2.postMessage(x);
|
|
5308
5309
|
}) : m && "onreadystatechange" in m.createElement("script") ? (h = m.documentElement, function(x) {
|
|
5309
|
-
var
|
|
5310
|
-
|
|
5311
|
-
_(x),
|
|
5312
|
-
}, h.appendChild(
|
|
5310
|
+
var b = m.createElement("script");
|
|
5311
|
+
b.onreadystatechange = function() {
|
|
5312
|
+
_(x), b.onreadystatechange = null, h.removeChild(b), b = null;
|
|
5313
|
+
}, h.appendChild(b);
|
|
5313
5314
|
}) : function(x) {
|
|
5314
5315
|
setTimeout(_, 0, x);
|
|
5315
5316
|
}, g.setImmediate = function(x) {
|
|
5316
5317
|
typeof x != "function" && (x = new Function("" + x));
|
|
5317
|
-
for (var
|
|
5318
|
-
var A = { callback: x, args:
|
|
5318
|
+
for (var b = new Array(arguments.length - 1), M = 0; M < b.length; M++) b[M] = arguments[M + 1];
|
|
5319
|
+
var A = { callback: x, args: b };
|
|
5319
5320
|
return p[d] = A, l(d), d++;
|
|
5320
5321
|
}, g.clearImmediate = y;
|
|
5321
5322
|
}
|
|
@@ -5325,8 +5326,8 @@ function fc() {
|
|
|
5325
5326
|
function _(x) {
|
|
5326
5327
|
if (u) setTimeout(_, 0, x);
|
|
5327
5328
|
else {
|
|
5328
|
-
var
|
|
5329
|
-
if (
|
|
5329
|
+
var b = p[x];
|
|
5330
|
+
if (b) {
|
|
5330
5331
|
u = !0;
|
|
5331
5332
|
try {
|
|
5332
5333
|
(function(M) {
|
|
@@ -5347,7 +5348,7 @@ function fc() {
|
|
|
5347
5348
|
default:
|
|
5348
5349
|
A.apply(a, C);
|
|
5349
5350
|
}
|
|
5350
|
-
})(
|
|
5351
|
+
})(b);
|
|
5351
5352
|
} finally {
|
|
5352
5353
|
y(x), u = !1;
|
|
5353
5354
|
}
|
|
@@ -5373,7 +5374,7 @@ function Zo(s, e) {
|
|
|
5373
5374
|
const { toString: pc } = Object.prototype, { getPrototypeOf: nr } = Object, { iterator: Hi, toStringTag: Yo } = Symbol, Gi = /* @__PURE__ */ ((s) => (e) => {
|
|
5374
5375
|
const t = pc.call(e);
|
|
5375
5376
|
return s[t] || (s[t] = t.slice(8, -1).toLowerCase());
|
|
5376
|
-
})(/* @__PURE__ */ Object.create(null)), it = (s) => (s = s.toLowerCase(), (e) => Gi(e) === s), Wi = (s) => (e) => typeof e === s, { isArray:
|
|
5377
|
+
})(/* @__PURE__ */ Object.create(null)), it = (s) => (s = s.toLowerCase(), (e) => Gi(e) === s), Wi = (s) => (e) => typeof e === s, { isArray: xn } = Array, _n = Wi("undefined");
|
|
5377
5378
|
function On(s) {
|
|
5378
5379
|
return s !== null && !_n(s) && s.constructor !== null && !_n(s.constructor) && Ue(s.constructor.isBuffer) && s.constructor.isBuffer(s);
|
|
5379
5380
|
}
|
|
@@ -5404,7 +5405,7 @@ function Fn(s, e, { allOwnKeys: t = !1 } = {}) {
|
|
|
5404
5405
|
if (s === null || typeof s > "u")
|
|
5405
5406
|
return;
|
|
5406
5407
|
let n, i;
|
|
5407
|
-
if (typeof s != "object" && (s = [s]),
|
|
5408
|
+
if (typeof s != "object" && (s = [s]), xn(s))
|
|
5408
5409
|
for (n = 0, i = s.length; n < i; n++)
|
|
5409
5410
|
e.call(null, s[n], n, s);
|
|
5410
5411
|
else {
|
|
@@ -5431,7 +5432,7 @@ const Wt = typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typ
|
|
|
5431
5432
|
function Bs() {
|
|
5432
5433
|
const { caseless: s, skipUndefined: e } = ea(this) && this || {}, t = {}, n = (i, o) => {
|
|
5433
5434
|
const r = s && Qo(t, o) || o;
|
|
5434
|
-
Si(t[r]) && Si(i) ? t[r] = Bs(t[r], i) : Si(i) ? t[r] = Bs({}, i) :
|
|
5435
|
+
Si(t[r]) && Si(i) ? t[r] = Bs(t[r], i) : Si(i) ? t[r] = Bs({}, i) : xn(i) ? t[r] = i.slice() : (!e || !_n(i)) && (t[r] = i);
|
|
5435
5436
|
};
|
|
5436
5437
|
for (let i = 0, o = arguments.length; i < o; i++)
|
|
5437
5438
|
arguments[i] && Fn(arguments[i], n);
|
|
@@ -5459,7 +5460,7 @@ const kc = (s, e, t, { allOwnKeys: n } = {}) => (Fn(e, (i, o) => {
|
|
|
5459
5460
|
return n !== -1 && n === t;
|
|
5460
5461
|
}, zc = (s) => {
|
|
5461
5462
|
if (!s) return null;
|
|
5462
|
-
if (
|
|
5463
|
+
if (xn(s)) return s;
|
|
5463
5464
|
let e = s.length;
|
|
5464
5465
|
if (!Jo(e)) return null;
|
|
5465
5466
|
const t = new Array(e);
|
|
@@ -5511,7 +5512,7 @@ const kc = (s, e, t, { allOwnKeys: n } = {}) => (Fn(e, (i, o) => {
|
|
|
5511
5512
|
t[o] = !0;
|
|
5512
5513
|
});
|
|
5513
5514
|
};
|
|
5514
|
-
return
|
|
5515
|
+
return xn(s) ? n(s) : n(String(s).split(e)), t;
|
|
5515
5516
|
}, Wc = () => {
|
|
5516
5517
|
}, Xc = (s, e) => s != null && Number.isFinite(s = +s) ? s : e;
|
|
5517
5518
|
function qc(s) {
|
|
@@ -5526,7 +5527,7 @@ const Kc = (s) => {
|
|
|
5526
5527
|
return n;
|
|
5527
5528
|
if (!("toJSON" in n)) {
|
|
5528
5529
|
e[i] = n;
|
|
5529
|
-
const o =
|
|
5530
|
+
const o = xn(n) ? [] : {};
|
|
5530
5531
|
return Fn(n, (r, a) => {
|
|
5531
5532
|
const l = t(r, i + 1);
|
|
5532
5533
|
!_n(l) && (o[a] = l);
|
|
@@ -5544,7 +5545,7 @@ const Kc = (s) => {
|
|
|
5544
5545
|
typeof setImmediate == "function",
|
|
5545
5546
|
Ue(Wt.postMessage)
|
|
5546
5547
|
), $c = typeof queueMicrotask < "u" ? queueMicrotask.bind(Wt) : typeof process < "u" && process.nextTick || na, Jc = (s) => s != null && Ue(s[Hi]), F = {
|
|
5547
|
-
isArray:
|
|
5548
|
+
isArray: xn,
|
|
5548
5549
|
isArrayBuffer: $o,
|
|
5549
5550
|
isBuffer: On,
|
|
5550
5551
|
isFormData: Tc,
|
|
@@ -6001,7 +6002,7 @@ const mh = F.toObjectSet([
|
|
|
6001
6002
|
i = r.indexOf(":"), t = r.substring(0, i).trim().toLowerCase(), n = r.substring(i + 1).trim(), !(!t || e[t] && mh[t]) && (t === "set-cookie" ? e[t] ? e[t].push(n) : e[t] = [n] : e[t] = e[t] ? e[t] + ", " + n : n);
|
|
6002
6003
|
}), e;
|
|
6003
6004
|
}, Pr = Symbol("internals");
|
|
6004
|
-
function
|
|
6005
|
+
function Tn(s) {
|
|
6005
6006
|
return s && String(s).trim().toLowerCase();
|
|
6006
6007
|
}
|
|
6007
6008
|
function Ti(s) {
|
|
@@ -6046,7 +6047,7 @@ let Fe = class {
|
|
|
6046
6047
|
set(e, t, n) {
|
|
6047
6048
|
const i = this;
|
|
6048
6049
|
function o(a, l, h) {
|
|
6049
|
-
const c =
|
|
6050
|
+
const c = Tn(l);
|
|
6050
6051
|
if (!c)
|
|
6051
6052
|
throw new Error("header name must be a non-empty string");
|
|
6052
6053
|
const f = F.findKey(i, c);
|
|
@@ -6070,7 +6071,7 @@ let Fe = class {
|
|
|
6070
6071
|
return this;
|
|
6071
6072
|
}
|
|
6072
6073
|
get(e, t) {
|
|
6073
|
-
if (e =
|
|
6074
|
+
if (e = Tn(e), e) {
|
|
6074
6075
|
const n = F.findKey(this, e);
|
|
6075
6076
|
if (n) {
|
|
6076
6077
|
const i = this[n];
|
|
@@ -6087,7 +6088,7 @@ let Fe = class {
|
|
|
6087
6088
|
}
|
|
6088
6089
|
}
|
|
6089
6090
|
has(e, t) {
|
|
6090
|
-
if (e =
|
|
6091
|
+
if (e = Tn(e), e) {
|
|
6091
6092
|
const n = F.findKey(this, e);
|
|
6092
6093
|
return !!(n && this[n] !== void 0 && (!t || es(this, this[n], n, t)));
|
|
6093
6094
|
}
|
|
@@ -6097,7 +6098,7 @@ let Fe = class {
|
|
|
6097
6098
|
const n = this;
|
|
6098
6099
|
let i = !1;
|
|
6099
6100
|
function o(r) {
|
|
6100
|
-
if (r =
|
|
6101
|
+
if (r = Tn(r), r) {
|
|
6101
6102
|
const a = F.findKey(n, r);
|
|
6102
6103
|
a && (!t || es(n, n[a], a, t)) && (delete n[a], i = !0);
|
|
6103
6104
|
}
|
|
@@ -6159,7 +6160,7 @@ let Fe = class {
|
|
|
6159
6160
|
accessors: {}
|
|
6160
6161
|
}).accessors, i = this.prototype;
|
|
6161
6162
|
function o(r) {
|
|
6162
|
-
const a =
|
|
6163
|
+
const a = Tn(r);
|
|
6163
6164
|
n[a] || (xh(i, r), n[a] = !0);
|
|
6164
6165
|
}
|
|
6165
6166
|
return F.isArray(e) ? e.forEach(o) : o(e), this;
|
|
@@ -6186,10 +6187,10 @@ function ts(s, e) {
|
|
|
6186
6187
|
function ha(s) {
|
|
6187
6188
|
return !!(s && s.__CANCEL__);
|
|
6188
6189
|
}
|
|
6189
|
-
function
|
|
6190
|
+
function bn(s, e, t) {
|
|
6190
6191
|
re.call(this, s ?? "canceled", re.ERR_CANCELED, e, t), this.name = "CanceledError";
|
|
6191
6192
|
}
|
|
6192
|
-
F.inherits(
|
|
6193
|
+
F.inherits(bn, re, {
|
|
6193
6194
|
__CANCEL__: !0
|
|
6194
6195
|
});
|
|
6195
6196
|
function ua(s, e, t) {
|
|
@@ -6404,7 +6405,7 @@ const da = (s) => {
|
|
|
6404
6405
|
return;
|
|
6405
6406
|
const w = Fe.from(
|
|
6406
6407
|
"getAllResponseHeaders" in g && g.getAllResponseHeaders()
|
|
6407
|
-
),
|
|
6408
|
+
), b = {
|
|
6408
6409
|
data: !a || a === "text" || a === "json" ? g.responseText : g.response,
|
|
6409
6410
|
status: g.status,
|
|
6410
6411
|
statusText: g.statusText,
|
|
@@ -6416,28 +6417,28 @@ const da = (s) => {
|
|
|
6416
6417
|
t(A), m();
|
|
6417
6418
|
}, function(A) {
|
|
6418
6419
|
n(A), m();
|
|
6419
|
-
},
|
|
6420
|
+
}, b), g = null;
|
|
6420
6421
|
}
|
|
6421
6422
|
"onloadend" in g ? g.onloadend = y : g.onreadystatechange = function() {
|
|
6422
6423
|
!g || g.readyState !== 4 || g.status === 0 && !(g.responseURL && g.responseURL.indexOf("file:") === 0) || setTimeout(y);
|
|
6423
6424
|
}, g.onabort = function() {
|
|
6424
6425
|
g && (n(new re("Request aborted", re.ECONNABORTED, s, g)), g = null);
|
|
6425
6426
|
}, g.onerror = function(x) {
|
|
6426
|
-
const
|
|
6427
|
+
const b = x && x.message ? x.message : "Network Error", M = new re(b, re.ERR_NETWORK, s, g);
|
|
6427
6428
|
M.event = x || null, n(M), g = null;
|
|
6428
6429
|
}, g.ontimeout = function() {
|
|
6429
6430
|
let x = i.timeout ? "timeout of " + i.timeout + "ms exceeded" : "timeout exceeded";
|
|
6430
|
-
const
|
|
6431
|
+
const b = i.transitional || la;
|
|
6431
6432
|
i.timeoutErrorMessage && (x = i.timeoutErrorMessage), n(new re(
|
|
6432
6433
|
x,
|
|
6433
|
-
|
|
6434
|
+
b.clarifyTimeoutError ? re.ETIMEDOUT : re.ECONNABORTED,
|
|
6434
6435
|
s,
|
|
6435
6436
|
g
|
|
6436
6437
|
)), g = null;
|
|
6437
|
-
}, o === void 0 && r.setContentType(null), "setRequestHeader" in g && F.forEach(r.toJSON(), function(x,
|
|
6438
|
-
g.setRequestHeader(
|
|
6438
|
+
}, o === void 0 && r.setContentType(null), "setRequestHeader" in g && F.forEach(r.toJSON(), function(x, b) {
|
|
6439
|
+
g.setRequestHeader(b, x);
|
|
6439
6440
|
}), F.isUndefined(i.withCredentials) || (g.withCredentials = !!i.withCredentials), a && a !== "json" && (g.responseType = i.responseType), h && ([d, u] = Ii(h, !0), g.addEventListener("progress", d)), l && g.upload && ([f, p] = Ii(l), g.upload.addEventListener("progress", f), g.upload.addEventListener("loadend", p)), (i.cancelToken || i.signal) && (c = (w) => {
|
|
6440
|
-
g && (n(!w || w.type ? new
|
|
6441
|
+
g && (n(!w || w.type ? new bn(null, s, g) : w), g.abort(), g = null);
|
|
6441
6442
|
}, i.cancelToken && i.cancelToken.subscribe(c), i.signal && (i.signal.aborted ? c() : i.signal.addEventListener("abort", c)));
|
|
6442
6443
|
const _ = bh(i.url);
|
|
6443
6444
|
if (_ && ke.protocols.indexOf(_) === -1) {
|
|
@@ -6454,7 +6455,7 @@ const da = (s) => {
|
|
|
6454
6455
|
if (!i) {
|
|
6455
6456
|
i = !0, a();
|
|
6456
6457
|
const c = h instanceof Error ? h : this.reason;
|
|
6457
|
-
n.abort(c instanceof re ? c : new
|
|
6458
|
+
n.abort(c instanceof re ? c : new bn(c instanceof Error ? c.message : c));
|
|
6458
6459
|
}
|
|
6459
6460
|
};
|
|
6460
6461
|
let r = e && setTimeout(() => {
|
|
@@ -6592,7 +6593,7 @@ const da = (s) => {
|
|
|
6592
6593
|
signal: _,
|
|
6593
6594
|
cancelToken: w,
|
|
6594
6595
|
timeout: x,
|
|
6595
|
-
onDownloadProgress:
|
|
6596
|
+
onDownloadProgress: b,
|
|
6596
6597
|
onUploadProgress: M,
|
|
6597
6598
|
responseType: A,
|
|
6598
6599
|
headers: C,
|
|
@@ -6601,7 +6602,7 @@ const da = (s) => {
|
|
|
6601
6602
|
} = da(u), B = e || fetch;
|
|
6602
6603
|
A = A ? (A + "").toLowerCase() : "text";
|
|
6603
6604
|
let T = Dh([_, w && w.toAbortSignal()], x), R = null;
|
|
6604
|
-
const
|
|
6605
|
+
const v = T && T.unsubscribe && (() => {
|
|
6605
6606
|
T.unsubscribe();
|
|
6606
6607
|
});
|
|
6607
6608
|
let I;
|
|
@@ -6633,25 +6634,25 @@ const da = (s) => {
|
|
|
6633
6634
|
R = o && new t(m, H);
|
|
6634
6635
|
let ee = await (o ? B(R, D) : B(m, H));
|
|
6635
6636
|
const j = c && (A === "stream" || A === "response");
|
|
6636
|
-
if (c && (
|
|
6637
|
+
if (c && (b || j && v)) {
|
|
6637
6638
|
const O = {};
|
|
6638
6639
|
["status", "statusText", "headers"].forEach((K) => {
|
|
6639
6640
|
O[K] = ee[K];
|
|
6640
6641
|
});
|
|
6641
|
-
const N = F.toFiniteNumber(ee.headers.get("content-length")), [te, J] =
|
|
6642
|
+
const N = F.toFiniteNumber(ee.headers.get("content-length")), [te, J] = b && Dr(
|
|
6642
6643
|
N,
|
|
6643
|
-
Ii(kr(
|
|
6644
|
+
Ii(kr(b), !0)
|
|
6644
6645
|
) || [];
|
|
6645
6646
|
ee = new n(
|
|
6646
6647
|
Lr(ee.body, Br, te, () => {
|
|
6647
|
-
J && J(),
|
|
6648
|
+
J && J(), v && v();
|
|
6648
6649
|
}),
|
|
6649
6650
|
O
|
|
6650
6651
|
);
|
|
6651
6652
|
}
|
|
6652
6653
|
A = A || "text";
|
|
6653
6654
|
let ne = await f[F.findKey(f, A) || "text"](ee, u);
|
|
6654
|
-
return !j &&
|
|
6655
|
+
return !j && v && v(), await new Promise((O, N) => {
|
|
6655
6656
|
ua(O, N, {
|
|
6656
6657
|
data: ne,
|
|
6657
6658
|
headers: Fe.from(ee.headers),
|
|
@@ -6662,7 +6663,7 @@ const da = (s) => {
|
|
|
6662
6663
|
});
|
|
6663
6664
|
});
|
|
6664
6665
|
} catch (q) {
|
|
6665
|
-
throw
|
|
6666
|
+
throw v && v(), q && q.name === "TypeError" && /Load failed|fetch/i.test(q.message) ? Object.assign(
|
|
6666
6667
|
new re("Network Error", re.ERR_NETWORK, u, R),
|
|
6667
6668
|
{
|
|
6668
6669
|
cause: q.cause || q
|
|
@@ -6742,7 +6743,7 @@ const ma = {
|
|
|
6742
6743
|
};
|
|
6743
6744
|
function ns(s) {
|
|
6744
6745
|
if (s.cancelToken && s.cancelToken.throwIfRequested(), s.signal && s.signal.aborted)
|
|
6745
|
-
throw new
|
|
6746
|
+
throw new bn(null, s);
|
|
6746
6747
|
}
|
|
6747
6748
|
function Ur(s) {
|
|
6748
6749
|
return ns(s), s.headers = Fe.from(s.headers), s.data = ts.call(
|
|
@@ -6959,7 +6960,7 @@ let Fh = class ya {
|
|
|
6959
6960
|
n.unsubscribe(o);
|
|
6960
6961
|
}, r;
|
|
6961
6962
|
}, e(function(o, r, a) {
|
|
6962
|
-
n.reason || (n.reason = new
|
|
6963
|
+
n.reason || (n.reason = new bn(o, r, a), t(n.reason));
|
|
6963
6964
|
});
|
|
6964
6965
|
}
|
|
6965
6966
|
/**
|
|
@@ -7098,7 +7099,7 @@ function _a(s) {
|
|
|
7098
7099
|
}
|
|
7099
7100
|
const we = _a(Vn);
|
|
7100
7101
|
we.Axios = qt;
|
|
7101
|
-
we.CanceledError =
|
|
7102
|
+
we.CanceledError = bn;
|
|
7102
7103
|
we.CancelToken = Fh;
|
|
7103
7104
|
we.isCancel = ha;
|
|
7104
7105
|
we.VERSION = ga;
|
|
@@ -7463,16 +7464,16 @@ function Xh() {
|
|
|
7463
7464
|
function i(r, a, l, h, c, f) {
|
|
7464
7465
|
const d = l.num_points(), p = f.num_components(), u = o(r, c), m = p * c.BYTES_PER_ELEMENT, g = Math.ceil(m / 4) * 4, y = g / c.BYTES_PER_ELEMENT, _ = d * m, w = d * g, x = r._malloc(_);
|
|
7465
7466
|
a.GetAttributeDataArrayForAllPoints(l, f, u, _, x);
|
|
7466
|
-
const
|
|
7467
|
+
const b = new c(r.HEAPF32.buffer, x, _ / c.BYTES_PER_ELEMENT);
|
|
7467
7468
|
let M;
|
|
7468
7469
|
if (m === g)
|
|
7469
|
-
M =
|
|
7470
|
+
M = b.slice();
|
|
7470
7471
|
else {
|
|
7471
7472
|
M = new c(w / c.BYTES_PER_ELEMENT);
|
|
7472
7473
|
let A = 0;
|
|
7473
|
-
for (let C = 0, P =
|
|
7474
|
+
for (let C = 0, P = b.length; C < P; C++) {
|
|
7474
7475
|
for (let D = 0; D < p; D++)
|
|
7475
|
-
M[A + D] =
|
|
7476
|
+
M[A + D] = b[C * p + D];
|
|
7476
7477
|
A += y;
|
|
7477
7478
|
}
|
|
7478
7479
|
}
|
|
@@ -7503,7 +7504,7 @@ function Xh() {
|
|
|
7503
7504
|
}
|
|
7504
7505
|
}
|
|
7505
7506
|
}
|
|
7506
|
-
var
|
|
7507
|
+
var wn = /* @__PURE__ */ ((s) => (s.ModelLoadStart = "model-load-start", s.ModelLoadProgress = "model-load-progress", s.ModelLoaded = "model-loaded", s.ModelError = "model-error", s.SelectionChanged = "selection-changed", s.HoverChanged = "hover-changed", s.Click = "click", s.MouseMove = "mouse-move", s.CameraChanged = "camera-changed", s.CameraIdle = "camera-idle", s.ViewportResize = "viewport-resize", s.EngineFree = "engine-free", s.EngineBusy = "engine-busy", s))(wn || {});
|
|
7507
7508
|
function qh(s, e, t, n) {
|
|
7508
7509
|
let i = 0, o = 0, r = 0, a = s.models.find((p) => p.url == t), l = e.circularMeps, h = e.rectMeps.filter((p) => p.type === "风管"), c = e.rectMeps.filter((p) => p.type === "桥架"), f = e.ellipseMeps, d = s.scene;
|
|
7509
7510
|
if (new E.MeshBasicMaterial(), new E.BufferGeometry(), Qn(d, "InstancedMesh"), l && l.length) {
|
|
@@ -7611,16 +7612,16 @@ function ei(s, e, t, n, i) {
|
|
|
7611
7612
|
} else
|
|
7612
7613
|
_ = (u.clone().sub(p.clone()).cross(new E.Vector3(0, 0, 1)).y > 0 ? -1 : 1) * u.clone().sub(p.clone()).angleTo(new E.Vector3(0, 0, 1)), y = (d.startPoint.Z > d.endPoint.Z ? 1 : -1) * u.clone().sub(p.clone()).angleTo(g.clone().sub(m.clone()));
|
|
7613
7614
|
let x = new E.Matrix4();
|
|
7614
|
-
const
|
|
7615
|
-
let M = x.clone().makeRotationFromEuler(
|
|
7615
|
+
const b = new E.Euler(y, _, w, "YXZ");
|
|
7616
|
+
let M = x.clone().makeRotationFromEuler(b), A, C;
|
|
7616
7617
|
s === "Circle" ? (A = d.diameter, C = d.diameter) : (A = d.width, C = d.height);
|
|
7617
7618
|
let P = x.clone().makeScale(A, C, d.length);
|
|
7618
7619
|
x.multiplyMatrices(M, P), x.setPosition(d.position.x, d.position.y, d.position.z), o.setMatrixAt(h, x.clone()), o.setColorAt(h, d.color), o.geometry.computeBoundingBox();
|
|
7619
|
-
let D = o.geometry.boundingBox.min.clone().applyMatrix4(x.clone()), B = o.geometry.boundingBox.max.clone().applyMatrix4(x.clone()), T = new E.Vector3(Math.min(D.x, B.x), Math.min(D.y, B.y), Math.min(D.z, B.z)), R = new E.Vector3(Math.max(D.x, B.x), Math.max(D.y, B.y), Math.max(D.z, B.z)),
|
|
7620
|
+
let D = o.geometry.boundingBox.min.clone().applyMatrix4(x.clone()), B = o.geometry.boundingBox.max.clone().applyMatrix4(x.clone()), T = new E.Vector3(Math.min(D.x, B.x), Math.min(D.y, B.y), Math.min(D.z, B.z)), R = new E.Vector3(Math.max(D.x, B.x), Math.max(D.y, B.y), Math.max(D.z, B.z)), v = T.clone().add(R.clone()).multiplyScalar(0.5), I = {
|
|
7620
7621
|
name: d.name,
|
|
7621
7622
|
min: T,
|
|
7622
7623
|
max: R,
|
|
7623
|
-
center:
|
|
7624
|
+
center: v,
|
|
7624
7625
|
dbid: h,
|
|
7625
7626
|
// url: path + "/" + type,
|
|
7626
7627
|
// basePath: url,
|
|
@@ -7860,10 +7861,10 @@ class Zh extends zo {
|
|
|
7860
7861
|
if (this.resourcePath !== "")
|
|
7861
7862
|
r = this.resourcePath;
|
|
7862
7863
|
else if (this.path !== "") {
|
|
7863
|
-
const h =
|
|
7864
|
-
r =
|
|
7864
|
+
const h = In.extractUrlBase(e);
|
|
7865
|
+
r = In.resolveURL(h, this.path);
|
|
7865
7866
|
} else
|
|
7866
|
-
r =
|
|
7867
|
+
r = In.extractUrlBase(e);
|
|
7867
7868
|
this.manager.itemStart(e);
|
|
7868
7869
|
const a = function(h) {
|
|
7869
7870
|
i ? i(h) : console.error(h), o.manager.itemError(e), o.manager.itemEnd(e);
|
|
@@ -8402,8 +8403,8 @@ class pu {
|
|
|
8402
8403
|
l.TRANSLATION && g.fromBufferAttribute(l.TRANSLATION, x), l.ROTATION && y.fromBufferAttribute(l.ROTATION, x), l.SCALE && _.fromBufferAttribute(l.SCALE, x), w.setMatrixAt(x, m.compose(g, y, _));
|
|
8403
8404
|
for (const x in l)
|
|
8404
8405
|
if (x === "_COLOR_0") {
|
|
8405
|
-
const
|
|
8406
|
-
w.instanceColor = new al(
|
|
8406
|
+
const b = l[x];
|
|
8407
|
+
w.instanceColor = new al(b.array, b.itemSize, b.normalized);
|
|
8407
8408
|
} else x !== "TRANSLATION" && x !== "ROTATION" && x !== "SCALE" && u.geometry.setAttribute(x, l[x]);
|
|
8408
8409
|
Fo.prototype.copy.call(w, u), this.parser.assignFinalMaterial(w), p.push(w);
|
|
8409
8410
|
}
|
|
@@ -8411,11 +8412,11 @@ class pu {
|
|
|
8411
8412
|
}));
|
|
8412
8413
|
}
|
|
8413
8414
|
}
|
|
8414
|
-
const xa = "glTF",
|
|
8415
|
+
const xa = "glTF", En = 12, Hr = { JSON: 1313821514, BIN: 5130562 };
|
|
8415
8416
|
class mu {
|
|
8416
8417
|
constructor(e) {
|
|
8417
8418
|
this.name = le.KHR_BINARY_GLTF, this.content = null, this.body = null;
|
|
8418
|
-
const t = new DataView(e, 0,
|
|
8419
|
+
const t = new DataView(e, 0, En), n = new TextDecoder();
|
|
8419
8420
|
if (this.header = {
|
|
8420
8421
|
magic: n.decode(new Uint8Array(e.slice(0, 4))),
|
|
8421
8422
|
version: t.getUint32(4, !0),
|
|
@@ -8424,17 +8425,17 @@ class mu {
|
|
|
8424
8425
|
throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");
|
|
8425
8426
|
if (this.header.version < 2)
|
|
8426
8427
|
throw new Error("THREE.GLTFLoader: Legacy binary file detected.");
|
|
8427
|
-
const i = this.header.length -
|
|
8428
|
+
const i = this.header.length - En, o = new DataView(e, En);
|
|
8428
8429
|
let r = 0;
|
|
8429
8430
|
for (; r < i; ) {
|
|
8430
8431
|
const a = o.getUint32(r, !0);
|
|
8431
8432
|
r += 4;
|
|
8432
8433
|
const l = o.getUint32(r, !0);
|
|
8433
8434
|
if (r += 4, l === Hr.JSON) {
|
|
8434
|
-
const h = new Uint8Array(e,
|
|
8435
|
+
const h = new Uint8Array(e, En + r, a);
|
|
8435
8436
|
this.content = n.decode(h);
|
|
8436
8437
|
} else if (l === Hr.BIN) {
|
|
8437
|
-
const h =
|
|
8438
|
+
const h = En + r;
|
|
8438
8439
|
this.body = e.slice(h, h + a);
|
|
8439
8440
|
}
|
|
8440
8441
|
r += a;
|
|
@@ -8501,8 +8502,8 @@ class ba extends Cl {
|
|
|
8501
8502
|
interpolate_(e, t, n, i) {
|
|
8502
8503
|
const o = this.resultBuffer, r = this.sampleValues, a = this.valueSize, l = a * 2, h = a * 3, c = i - t, f = (n - t) / c, d = f * f, p = d * f, u = e * h, m = u - h, g = -2 * p + 3 * d, y = p - d, _ = 1 - g, w = y - d + f;
|
|
8503
8504
|
for (let x = 0; x !== a; x++) {
|
|
8504
|
-
const
|
|
8505
|
-
o[x] = _ *
|
|
8505
|
+
const b = r[m + x + a], M = r[m + x + l] * c, A = r[u + x + a], C = r[u + x] * c;
|
|
8506
|
+
o[x] = _ * b + w * M + g * A + y * C;
|
|
8506
8507
|
}
|
|
8507
8508
|
return o;
|
|
8508
8509
|
}
|
|
@@ -8893,7 +8894,7 @@ class Cu {
|
|
|
8893
8894
|
return Promise.resolve(this.extensions[le.KHR_BINARY_GLTF].body);
|
|
8894
8895
|
const i = this.options;
|
|
8895
8896
|
return new Promise(function(o, r) {
|
|
8896
|
-
n.load(
|
|
8897
|
+
n.load(In.resolveURL(t.uri, i.path), o, void 0, function() {
|
|
8897
8898
|
r(new Error('THREE.GLTFLoader: Failed to load buffer "' + t.uri + '".'));
|
|
8898
8899
|
});
|
|
8899
8900
|
});
|
|
@@ -8936,10 +8937,10 @@ class Cu {
|
|
|
8936
8937
|
} else
|
|
8937
8938
|
a === null ? m = new h(i.count * l) : m = new h(a, d, i.count * l), g = new at(m, l, u);
|
|
8938
8939
|
if (i.sparse !== void 0) {
|
|
8939
|
-
const y = ss.SCALAR, _ = mn[i.sparse.indices.componentType], w = i.sparse.indices.byteOffset || 0, x = i.sparse.values.byteOffset || 0,
|
|
8940
|
+
const y = ss.SCALAR, _ = mn[i.sparse.indices.componentType], w = i.sparse.indices.byteOffset || 0, x = i.sparse.values.byteOffset || 0, b = new _(r[1], w, i.sparse.count * y), M = new h(r[2], x, i.sparse.count * l);
|
|
8940
8941
|
a !== null && (g = new at(g.array.slice(), g.itemSize, g.normalized)), g.normalized = !1;
|
|
8941
|
-
for (let A = 0, C =
|
|
8942
|
-
const P =
|
|
8942
|
+
for (let A = 0, C = b.length; A < C; A++) {
|
|
8943
|
+
const P = b[A];
|
|
8943
8944
|
if (g.setX(P, M[A * l]), l >= 2 && g.setY(P, M[A * l + 1]), l >= 3 && g.setZ(P, M[A * l + 2]), l >= 4 && g.setW(P, M[A * l + 3]), l >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
|
|
8944
8945
|
}
|
|
8945
8946
|
g.normalized = u;
|
|
@@ -8996,7 +8997,7 @@ class Cu {
|
|
|
8996
8997
|
t.isImageBitmapLoader === !0 && (u = function(m) {
|
|
8997
8998
|
const g = new gr(m);
|
|
8998
8999
|
g.needsUpdate = !0, d(g);
|
|
8999
|
-
}), t.load(
|
|
9000
|
+
}), t.load(In.resolveURL(f, o.path), u, void 0, p);
|
|
9000
9001
|
});
|
|
9001
9002
|
}).then(function(f) {
|
|
9002
9003
|
return h === !0 && a.revokeObjectURL(l), rt(f, r), f.userData.mimeType = r.mimeType || Au(r.uri), f;
|
|
@@ -9253,10 +9254,10 @@ class Cu {
|
|
|
9253
9254
|
]).then(function(f) {
|
|
9254
9255
|
const d = f[0], p = f[1], u = f[2], m = f[3], g = f[4], y = [];
|
|
9255
9256
|
for (let w = 0, x = d.length; w < x; w++) {
|
|
9256
|
-
const
|
|
9257
|
-
if (
|
|
9258
|
-
|
|
9259
|
-
const D = n._createAnimationTracks(
|
|
9257
|
+
const b = d[w], M = p[w], A = u[w], C = m[w], P = g[w];
|
|
9258
|
+
if (b === void 0) continue;
|
|
9259
|
+
b.updateMatrix && b.updateMatrix();
|
|
9260
|
+
const D = n._createAnimationTracks(b, M, A, C, P);
|
|
9260
9261
|
if (D)
|
|
9261
9262
|
for (let B = 0; B < D.length; B++)
|
|
9262
9263
|
y.push(D[B]);
|
|
@@ -9503,7 +9504,7 @@ function Du(s, e, t) {
|
|
|
9503
9504
|
min: new E.Vector3(o.baseInfo.min.X * 0.3048, o.baseInfo.min.Z * 0.3048, -o.baseInfo.min.Y * 0.3048),
|
|
9504
9505
|
max: new E.Vector3(o.baseInfo.max.X * 0.3048, o.baseInfo.max.Z * 0.3048, -o.baseInfo.max.Y * 0.3048)
|
|
9505
9506
|
}
|
|
9506
|
-
}), s.events.trigger(
|
|
9507
|
+
}), s.events.trigger(wn.EngineFree, null);
|
|
9507
9508
|
});
|
|
9508
9509
|
}
|
|
9509
9510
|
function ku(s) {
|
|
@@ -9533,7 +9534,7 @@ function Ru(s, e) {
|
|
|
9533
9534
|
let f = new Zh();
|
|
9534
9535
|
const d = new Wh();
|
|
9535
9536
|
d.setDecoderPath("/static/js/draco/"), d.preload(), f.setDRACOLoader(d), f.load(o.get(c + ".glb"), (p) => {
|
|
9536
|
-
i.glbs[c] = p.scene.children, h++, h == Object.keys(a).length && s.engineStatus.isFree && (s.events.trigger(
|
|
9537
|
+
i.glbs[c] = p.scene.children, h++, h == Object.keys(a).length && s.engineStatus.isFree && (s.events.trigger(wn.EngineFree, null), s.viewCube.CameraGoHome());
|
|
9537
9538
|
});
|
|
9538
9539
|
}
|
|
9539
9540
|
});
|
|
@@ -9632,9 +9633,9 @@ class Iu {
|
|
|
9632
9633
|
this.engine = e, this.isFree = !0, this.highlightModels = [], this.hideModels = [], this.models = [];
|
|
9633
9634
|
}
|
|
9634
9635
|
init() {
|
|
9635
|
-
this.engine.events.on(
|
|
9636
|
+
this.engine.events.on(wn.EngineFree, () => {
|
|
9636
9637
|
this.updateFree(!0), console.log("引擎空闲"), ku(this.engine);
|
|
9637
|
-
}), this.engine.events.on(
|
|
9638
|
+
}), this.engine.events.on(wn.EngineBusy, () => {
|
|
9638
9639
|
this.updateFree(!1), console.log("引擎繁忙");
|
|
9639
9640
|
});
|
|
9640
9641
|
}
|
|
@@ -10018,8 +10019,8 @@ function Vu() {
|
|
|
10018
10019
|
var r = 1 / 0, a = 0, l = Math.round, h = l(window.devicePixelRatio || 1), c = 80 * h, f = 48 * h, d = 3 * h, p = 2 * h, u = 3 * h, m = 15 * h, g = 74 * h, y = 30 * h, _ = document.createElement("canvas");
|
|
10019
10020
|
_.width = c, _.height = f, _.style.cssText = "width:80px;height:48px";
|
|
10020
10021
|
var w = _.getContext("2d");
|
|
10021
|
-
return w.font = "bold " + 9 * h + "px Helvetica,Arial,sans-serif", w.textBaseline = "top", w.fillStyle = o, w.fillRect(0, 0, c, f), w.fillStyle = i, w.fillText(n, d, p), w.fillRect(u, m, g, y), w.fillStyle = o, w.globalAlpha = 0.9, w.fillRect(u, m, g, y), { dom: _, update: function(x,
|
|
10022
|
-
r = Math.min(r, x), a = Math.max(a, x), w.fillStyle = o, w.globalAlpha = 1, w.fillRect(0, 0, c, m), w.fillStyle = i, w.fillText(l(x) + " " + n + " (" + l(r) + "-" + l(a) + ")", d, p), w.drawImage(_, u + h, m, g - h, y, u, m, g - h, y), w.fillRect(u + g - h, m, h, y), w.fillStyle = o, w.globalAlpha = 0.9, w.fillRect(u + g - h, m, h, l((1 - x /
|
|
10022
|
+
return w.font = "bold " + 9 * h + "px Helvetica,Arial,sans-serif", w.textBaseline = "top", w.fillStyle = o, w.fillRect(0, 0, c, f), w.fillStyle = i, w.fillText(n, d, p), w.fillRect(u, m, g, y), w.fillStyle = o, w.globalAlpha = 0.9, w.fillRect(u, m, g, y), { dom: _, update: function(x, b) {
|
|
10023
|
+
r = Math.min(r, x), a = Math.max(a, x), w.fillStyle = o, w.globalAlpha = 1, w.fillRect(0, 0, c, m), w.fillStyle = i, w.fillText(l(x) + " " + n + " (" + l(r) + "-" + l(a) + ")", d, p), w.drawImage(_, u + h, m, g - h, y, u, m, g - h, y), w.fillRect(u + g - h, m, h, y), w.fillStyle = o, w.globalAlpha = 0.9, w.fillRect(u + g - h, m, h, l((1 - x / b) * y));
|
|
10023
10024
|
} };
|
|
10024
10025
|
}, t;
|
|
10025
10026
|
});
|
|
@@ -10168,7 +10169,7 @@ var gn = Object.freeze({
|
|
|
10168
10169
|
}
|
|
10169
10170
|
};
|
|
10170
10171
|
}
|
|
10171
|
-
}),
|
|
10172
|
+
}), Bn = function() {
|
|
10172
10173
|
return performance.now();
|
|
10173
10174
|
}, Gu = (
|
|
10174
10175
|
/** @class */
|
|
@@ -10188,7 +10189,7 @@ var gn = Object.freeze({
|
|
|
10188
10189
|
}, s.prototype.remove = function(e) {
|
|
10189
10190
|
delete this._tweens[e.getId()], delete this._tweensAddedDuringUpdate[e.getId()];
|
|
10190
10191
|
}, s.prototype.update = function(e, t) {
|
|
10191
|
-
e === void 0 && (e =
|
|
10192
|
+
e === void 0 && (e = Bn()), t === void 0 && (t = !1);
|
|
10192
10193
|
var n = Object.keys(this._tweens);
|
|
10193
10194
|
if (n.length === 0)
|
|
10194
10195
|
return !1;
|
|
@@ -10245,7 +10246,7 @@ var gn = Object.freeze({
|
|
|
10245
10246
|
}, s.prototype.dynamic = function(e) {
|
|
10246
10247
|
return e === void 0 && (e = !1), this._isDynamic = e, this;
|
|
10247
10248
|
}, s.prototype.start = function(e, t) {
|
|
10248
|
-
if (e === void 0 && (e =
|
|
10249
|
+
if (e === void 0 && (e = Bn()), t === void 0 && (t = !1), this._isPlaying)
|
|
10249
10250
|
return this;
|
|
10250
10251
|
if (this._group && this._group.add(this), this._repeat = this._initialRepeat, this._reversed) {
|
|
10251
10252
|
this._reversed = !1;
|
|
@@ -10305,9 +10306,9 @@ var gn = Object.freeze({
|
|
|
10305
10306
|
}, s.prototype.end = function() {
|
|
10306
10307
|
return this._goToEnd = !0, this.update(1 / 0), this;
|
|
10307
10308
|
}, s.prototype.pause = function(e) {
|
|
10308
|
-
return e === void 0 && (e =
|
|
10309
|
+
return e === void 0 && (e = Bn()), this._isPaused || !this._isPlaying ? this : (this._isPaused = !0, this._pauseStart = e, this._group && this._group.remove(this), this);
|
|
10309
10310
|
}, s.prototype.resume = function(e) {
|
|
10310
|
-
return e === void 0 && (e =
|
|
10311
|
+
return e === void 0 && (e = Bn()), !this._isPaused || !this._isPlaying ? this : (this._isPaused = !1, this._startTime += e - this._pauseStart, this._pauseStart = 0, this._group && this._group.add(this), this);
|
|
10311
10312
|
}, s.prototype.stopChainedTweens = function() {
|
|
10312
10313
|
for (var e = 0, t = this._chainedTweens.length; e < t; e++)
|
|
10313
10314
|
this._chainedTweens[e].stop();
|
|
@@ -10344,7 +10345,7 @@ var gn = Object.freeze({
|
|
|
10344
10345
|
return this._onStopCallback = e, this;
|
|
10345
10346
|
}, s.prototype.update = function(e, t) {
|
|
10346
10347
|
var n = this, i;
|
|
10347
|
-
if (e === void 0 && (e =
|
|
10348
|
+
if (e === void 0 && (e = Bn()), t === void 0 && (t = !0), this._isPaused)
|
|
10348
10349
|
return !0;
|
|
10349
10350
|
var o, r = this._startTime + this._duration;
|
|
10350
10351
|
if (!this._goToEnd && !this._isPlaying) {
|
|
@@ -10451,8 +10452,8 @@ function Ku(s, e, t) {
|
|
|
10451
10452
|
e.camera.quaternion,
|
|
10452
10453
|
y,
|
|
10453
10454
|
m,
|
|
10454
|
-
(
|
|
10455
|
-
g && (x || (g(
|
|
10455
|
+
(b) => {
|
|
10456
|
+
g && (x || (g(b), x = !0));
|
|
10456
10457
|
}
|
|
10457
10458
|
), g && setTimeout(() => {
|
|
10458
10459
|
x || (g(!0), x = !0);
|
|
@@ -10470,7 +10471,7 @@ function Ku(s, e, t) {
|
|
|
10470
10471
|
var _ = m.clone().add(y.multiplyScalar(1 * u.max.distanceTo(u.min)));
|
|
10471
10472
|
l(e.camera.position, _, s.controls.target.clone(), m);
|
|
10472
10473
|
};
|
|
10473
|
-
function l(u, m, g, y, _, w, x = 1e3,
|
|
10474
|
+
function l(u, m, g, y, _, w, x = 1e3, b) {
|
|
10474
10475
|
var M;
|
|
10475
10476
|
_ && w ? (M = new as.Tween({
|
|
10476
10477
|
x1: u.x,
|
|
@@ -10549,7 +10550,7 @@ function Ku(s, e, t) {
|
|
|
10549
10550
|
)), M.onUpdate(function(C) {
|
|
10550
10551
|
_ && w ? (e.camera.quaternion._x = C._x, e.camera.quaternion._y = C._y, e.camera.quaternion._z = C._z, e.camera.quaternion._w = C._w) : s.controls.auto = !0, e.camera.position.x = C.x1, e.camera.position.y = C.y1, e.camera.position.z = C.z1, s.controls.target.x = C.x2, s.controls.target.y = C.y2, s.controls.target.z = C.z2, s.controls.update(), n.RenderScene();
|
|
10551
10552
|
}), M.onComplete(function(C) {
|
|
10552
|
-
s.controls.auto = !1, n.RenderScene(),
|
|
10553
|
+
s.controls.auto = !1, n.RenderScene(), b && b(!0), cancelAnimationFrame(i), i = null;
|
|
10553
10554
|
}), M.easing(as.Easing.Cubic.InOut);
|
|
10554
10555
|
function A(C) {
|
|
10555
10556
|
i = requestAnimationFrame(A), M.update();
|
|
@@ -10646,17 +10647,17 @@ function Ku(s, e, t) {
|
|
|
10646
10647
|
w.x = _.offsetX / o.clientWidth * 2 - 1, w.y = -(_.offsetY / o.clientHeight) * 2 + 1;
|
|
10647
10648
|
var x = new E.Raycaster();
|
|
10648
10649
|
x.setFromCamera(w, n.camera);
|
|
10649
|
-
const
|
|
10650
|
-
|
|
10650
|
+
const b = x.intersectObjects(a, !1);
|
|
10651
|
+
b.length > 0 && n.ToggleDirectionView(b[0].object.name);
|
|
10651
10652
|
}), o.addEventListener("mousemove", (_) => {
|
|
10652
10653
|
var w = {};
|
|
10653
10654
|
w.x = _.offsetX / o.clientWidth * 2 - 1, w.y = -(_.offsetY / o.clientHeight) * 2 + 1;
|
|
10654
10655
|
var x = new E.Raycaster();
|
|
10655
10656
|
x.setFromCamera(w, n.camera);
|
|
10656
|
-
const
|
|
10657
|
+
const b = x.intersectObjects(a, !1);
|
|
10657
10658
|
for (var M of a)
|
|
10658
10659
|
M.material.opacity = 0.01;
|
|
10659
|
-
|
|
10660
|
+
b.length > 0 && (b[0].object.material.opacity = 0.2);
|
|
10660
10661
|
});
|
|
10661
10662
|
}
|
|
10662
10663
|
function d(u) {
|
|
@@ -10942,8 +10943,8 @@ function Yu(s) {
|
|
|
10942
10943
|
if (y != null && y.includes(m))
|
|
10943
10944
|
continue;
|
|
10944
10945
|
let w = s.models.find((x) => x.url == l.url).nodesMap.get(m);
|
|
10945
|
-
w?.infos.map((
|
|
10946
|
-
n.push(
|
|
10946
|
+
w?.infos.map((b) => b.mesh).forEach((b) => {
|
|
10947
|
+
n.push(b);
|
|
10947
10948
|
});
|
|
10948
10949
|
}
|
|
10949
10950
|
for (let g of a.children)
|
|
@@ -11017,7 +11018,7 @@ class $u {
|
|
|
11017
11018
|
const t = this.engine.renderer?.domElement;
|
|
11018
11019
|
if (!t) return;
|
|
11019
11020
|
const n = t.getBoundingClientRect();
|
|
11020
|
-
this.startPoint.set(e.
|
|
11021
|
+
this.startPoint.set(e.offsetX - n.left, e.offsetY - n.top), this.endPoint.copy(this.startPoint), this.isDrawing = !0, this.selectionBox && (this.selectionBox.style.display = "block", this.updateSelectionBoxUI()), e.preventDefault(), e.stopPropagation();
|
|
11021
11022
|
}
|
|
11022
11023
|
/**
|
|
11023
11024
|
* 鼠标移动事件处理
|
|
@@ -11028,7 +11029,7 @@ class $u {
|
|
|
11028
11029
|
const t = this.engine.renderer?.domElement;
|
|
11029
11030
|
if (!t) return;
|
|
11030
11031
|
const n = t.getBoundingClientRect();
|
|
11031
|
-
this.endPoint.set(e.
|
|
11032
|
+
this.endPoint.set(e.offsetX - n.left, e.offsetY - n.top), this.updateSelectionBoxUI(), e.preventDefault(), e.stopPropagation();
|
|
11032
11033
|
}
|
|
11033
11034
|
/**
|
|
11034
11035
|
* 鼠标释放事件处理
|
|
@@ -11057,8 +11058,8 @@ class $u {
|
|
|
11057
11058
|
*/
|
|
11058
11059
|
updateSelectionBoxUI() {
|
|
11059
11060
|
if (!this.selectionBox) return;
|
|
11060
|
-
const e = Math.min(this.startPoint.x, this.endPoint.x), t = Math.min(this.startPoint.y, this.endPoint.y), n = Math.abs(this.endPoint.x - this.startPoint.x), i = Math.abs(this.endPoint.y - this.startPoint.y);
|
|
11061
|
-
this.selectionBox.style.left = `${e}px`, this.selectionBox.style.top = `${t}px`, this.selectionBox.style.width = `${n}px`, this.selectionBox.style.height = `${i}px`;
|
|
11061
|
+
const e = Math.min(this.startPoint.x, this.endPoint.x), t = Math.min(this.startPoint.y, this.endPoint.y), n = Math.abs(this.endPoint.x - this.startPoint.x), i = Math.abs(this.endPoint.y - this.startPoint.y), o = this.engine.reactBoundingClientRect?.left || 0, r = this.engine.reactBoundingClientRect?.top || 0;
|
|
11062
|
+
this.selectionBox.style.left = `${e + o}px`, this.selectionBox.style.top = `${t + r}px`, this.selectionBox.style.width = `${n}px`, this.selectionBox.style.height = `${i}px`;
|
|
11062
11063
|
}
|
|
11063
11064
|
/**
|
|
11064
11065
|
* 执行缩放操作
|
|
@@ -11393,7 +11394,7 @@ class bt {
|
|
|
11393
11394
|
});
|
|
11394
11395
|
function l(u) {
|
|
11395
11396
|
if (u.container == null) {
|
|
11396
|
-
let
|
|
11397
|
+
let A = [
|
|
11397
11398
|
'<svg class="measureSvg">',
|
|
11398
11399
|
'<circle cx="50" cy="50" r="5" fill="#f99d0b" />',
|
|
11399
11400
|
// 起点
|
|
@@ -11409,18 +11410,20 @@ class bt {
|
|
|
11409
11410
|
'<text x="40" y="16" text-anchor="middle" class="measureLabel">' + u.text + "</text>",
|
|
11410
11411
|
"</svg>"
|
|
11411
11412
|
].join("");
|
|
11412
|
-
u.container = document.createElement("div"), u.container.className = "angle-annotation", u.container.id = u.id, u.container.style.pointerEvents = "none", u.container.innerHTML =
|
|
11413
|
+
u.container = document.createElement("div"), u.container.className = "angle-annotation", u.container.id = u.id, u.container.style.pointerEvents = "none", u.container.innerHTML = A, e.engine.measure.annotationContainer.appendChild(u.container), u.container.getElementsByTagName("svg")[0].addEventListener("click", function() {
|
|
11413
11414
|
e.clearHighlight(), u.container.getElementsByTagName("svg")[0].classList.add("Hight"), u.highlight = !0;
|
|
11414
11415
|
});
|
|
11415
11416
|
}
|
|
11416
|
-
let m = new Ge(e.engine.camera, e.engine.renderer, e.engine.scene).worldToScreen(u.point1), g = new Ge(e.engine.camera, e.engine.renderer, e.engine.scene).worldToScreen(u.point2), y = new Ge(e.engine.camera, e.engine.renderer, e.engine.scene).worldToScreen(u.point3), _ =
|
|
11417
|
-
|
|
11418
|
-
let
|
|
11419
|
-
|
|
11417
|
+
let m = new Ge(e.engine.camera, e.engine.renderer, e.engine.scene).worldToScreen(u.point1), g = new Ge(e.engine.camera, e.engine.renderer, e.engine.scene).worldToScreen(u.point2), y = new Ge(e.engine.camera, e.engine.renderer, e.engine.scene).worldToScreen(u.point3), _ = e.engine.reactBoundingClientRect.left, w = e.engine.reactBoundingClientRect.top;
|
|
11418
|
+
m.x += _, m.y += w, g.x += _, g.y += w, y.x += _, y.y += w;
|
|
11419
|
+
let x = u.container;
|
|
11420
|
+
x.getElementsByTagName("circle")[0].setAttribute("cx", m.x), x.getElementsByTagName("circle")[0].setAttribute("cy", m.y), x.getElementsByTagName("circle")[1].setAttribute("cx", g.x), x.getElementsByTagName("circle")[1].setAttribute("cy", g.y), x.getElementsByTagName("circle")[2].setAttribute("cx", y.x), x.getElementsByTagName("circle")[2].setAttribute("cy", y.y), x.getElementsByTagName("polyline")[0].setAttribute("points", m.x + "," + m.y + " " + g.x + "," + g.y), x.getElementsByTagName("polyline")[1].setAttribute("points", g.x + "," + g.y + " " + y.x + "," + y.y);
|
|
11421
|
+
let b = g.x, M = g.y - 30;
|
|
11422
|
+
x.getElementsByTagName("rect")[0].setAttribute("x", b - 40), x.getElementsByTagName("rect")[0].setAttribute("y", M - 12.5), x.getElementsByTagName("text")[0].setAttribute("x", b), x.getElementsByTagName("text")[0].setAttribute("y", M + 4), x.getElementsByTagName("text")[0].innerHTML = u.text, x.style.top = "0px", x.style.left = "0px";
|
|
11420
11423
|
}
|
|
11421
11424
|
function h(u) {
|
|
11422
11425
|
if (u.container == null) {
|
|
11423
|
-
let
|
|
11426
|
+
let C = [
|
|
11424
11427
|
'<svg class="measureSvg">',
|
|
11425
11428
|
'<polygon fill="rgba(255, 165, 0, 0.3)" stroke="orange" stroke-width="2" points="" style="opacity: 0.3;"/>',
|
|
11426
11429
|
// 填充区域
|
|
@@ -11430,26 +11433,26 @@ class bt {
|
|
|
11430
11433
|
'<text x="40" y="16" text-anchor="middle" class="measureLabel">' + u.text + "</text>",
|
|
11431
11434
|
"</svg>"
|
|
11432
11435
|
].join("");
|
|
11433
|
-
u.container = document.createElement("div"), u.container.className = "area-annotation", u.container.id = u.id, u.container.innerHTML =
|
|
11436
|
+
u.container = document.createElement("div"), u.container.className = "area-annotation", u.container.id = u.id, u.container.innerHTML = C, e.engine.measure.annotationContainer.appendChild(u.container), u.container.getElementsByTagName("svg")[0].addEventListener("click", function() {
|
|
11434
11437
|
e.clearHighlight(), u.container.getElementsByTagName("svg")[0].classList.add("Hight"), u.highlight = !0;
|
|
11435
11438
|
});
|
|
11436
11439
|
}
|
|
11437
11440
|
if (!u.points || u.points.length < 3)
|
|
11438
11441
|
return;
|
|
11439
|
-
let m = [],
|
|
11440
|
-
for (let
|
|
11441
|
-
let
|
|
11442
|
-
m.push(
|
|
11442
|
+
let m = e.engine.reactBoundingClientRect.left, g = e.engine.reactBoundingClientRect.top, y = [], _ = 0, w = 0;
|
|
11443
|
+
for (let C = 0; C < u.points.length; C++) {
|
|
11444
|
+
let P = new Ge(e.engine.camera, e.engine.renderer, e.engine.scene).worldToScreen(u.points[C]);
|
|
11445
|
+
P.x += m, P.y += g, y.push(P), _ += P.x, w += P.y;
|
|
11443
11446
|
}
|
|
11444
|
-
|
|
11445
|
-
let
|
|
11446
|
-
|
|
11447
|
-
let
|
|
11448
|
-
|
|
11447
|
+
_ = _ / y.length, w = w / y.length;
|
|
11448
|
+
let x = y.map((C) => C.x + "," + C.y).join(" "), b = u.container;
|
|
11449
|
+
b.getElementsByTagName("polygon")[0].setAttribute("points", x), b.getElementsByTagName("polyline")[0].setAttribute("points", x);
|
|
11450
|
+
let M = _, A = w;
|
|
11451
|
+
b.getElementsByTagName("rect")[0].setAttribute("x", M - 40), b.getElementsByTagName("rect")[0].setAttribute("y", A - 12.5), b.getElementsByTagName("text")[0].setAttribute("x", M), b.getElementsByTagName("text")[0].setAttribute("y", A + 4), b.getElementsByTagName("text")[0].innerHTML = u.text, b.style.top = "0px", b.style.left = "0px";
|
|
11449
11452
|
}
|
|
11450
11453
|
function c(u) {
|
|
11451
11454
|
if (u.container == null) {
|
|
11452
|
-
let
|
|
11455
|
+
let M = [
|
|
11453
11456
|
'<svg class="measureSvg">',
|
|
11454
11457
|
"<defs>",
|
|
11455
11458
|
'<marker id="slope-arrow-' + u.id + '" markerWidth="10" markerHeight="10" refX="9" refY="3" orient="auto" markerUnits="strokeWidth">',
|
|
@@ -11463,18 +11466,20 @@ class bt {
|
|
|
11463
11466
|
'<text x="50" y="16" text-anchor="middle" class="measureLabel">' + u.text + "</text>",
|
|
11464
11467
|
"</svg>"
|
|
11465
11468
|
].join("");
|
|
11466
|
-
u.container = document.createElement("div"), u.container.className = "slope-annotation", u.container.id = u.id, u.container.innerHTML =
|
|
11469
|
+
u.container = document.createElement("div"), u.container.className = "slope-annotation", u.container.id = u.id, u.container.innerHTML = M, e.engine.measure.annotationContainer.appendChild(u.container), u.container.getElementsByTagName("svg")[0].addEventListener("click", function() {
|
|
11467
11470
|
e.clearHighlight(), u.container.getElementsByTagName("svg")[0].classList.add("Hight"), u.highlight = !0;
|
|
11468
11471
|
});
|
|
11469
11472
|
}
|
|
11470
|
-
let m = new Ge(e.engine.camera, e.engine.renderer, e.engine.scene).worldToScreen(u.point1), g = new Ge(e.engine.camera, e.engine.renderer, e.engine.scene).worldToScreen(u.point2), y =
|
|
11471
|
-
|
|
11472
|
-
let
|
|
11473
|
-
|
|
11473
|
+
let m = new Ge(e.engine.camera, e.engine.renderer, e.engine.scene).worldToScreen(u.point1), g = new Ge(e.engine.camera, e.engine.renderer, e.engine.scene).worldToScreen(u.point2), y = e.engine.reactBoundingClientRect.left, _ = e.engine.reactBoundingClientRect.top;
|
|
11474
|
+
m.x += y, m.y += _, g.x += y, g.y += _;
|
|
11475
|
+
let w = u.container;
|
|
11476
|
+
w.getElementsByTagName("polyline")[0].setAttribute("points", m.x + "," + m.y + " " + g.x + "," + g.y);
|
|
11477
|
+
let x = (m.x + g.x) / 2, b = (m.y + g.y) / 2 - 30;
|
|
11478
|
+
w.getElementsByTagName("rect")[0].setAttribute("x", x - 50), w.getElementsByTagName("rect")[0].setAttribute("y", b - 12.5), w.getElementsByTagName("text")[0].setAttribute("x", x), w.getElementsByTagName("text")[0].setAttribute("y", b + 4), w.getElementsByTagName("text")[0].innerHTML = u.text, w.style.top = "0px", w.style.left = "0px";
|
|
11474
11479
|
}
|
|
11475
11480
|
function f(u) {
|
|
11476
11481
|
if (u.container == null) {
|
|
11477
|
-
let
|
|
11482
|
+
let A = [
|
|
11478
11483
|
'<svg class="measureSvg">',
|
|
11479
11484
|
'<circle cx="0" cy="0" r="5" fill="#f99d0b" />',
|
|
11480
11485
|
'<rect x="0" y="-25" width="100" height="25" class="measureBack" />',
|
|
@@ -11485,36 +11490,36 @@ class bt {
|
|
|
11485
11490
|
'<text x="40" y="51" text-anchor="middle" class="measureLabel">' + u.textZ + "</text>",
|
|
11486
11491
|
"</svg>"
|
|
11487
11492
|
].join("");
|
|
11488
|
-
u.container = document.createElement("div"), u.container.className = "coordinate-annotation", u.container.id = u.id, u.container.style.position = "absolute", u.container.style.pointerEvents = "none", u.container.innerHTML =
|
|
11493
|
+
u.container = document.createElement("div"), u.container.className = "coordinate-annotation", u.container.id = u.id, u.container.style.position = "absolute", u.container.style.pointerEvents = "none", u.container.innerHTML = A, e.engine.measure.annotationContainer.appendChild(u.container), u.container.getElementsByTagName("svg")[0].addEventListener("click", function() {
|
|
11489
11494
|
e.clearHighlight(), u.container.getElementsByTagName("svg")[0].classList.add("Hight"), u.highlight = !0;
|
|
11490
11495
|
});
|
|
11491
11496
|
}
|
|
11492
|
-
let m = u.container, g = new Ge(e.engine.camera, e.engine.renderer, e.engine.scene).worldToScreen(u.point);
|
|
11493
|
-
m.style.top = "0px", m.style.left = "0px";
|
|
11494
|
-
let
|
|
11495
|
-
|
|
11496
|
-
let
|
|
11497
|
-
|
|
11497
|
+
let m = u.container, g = new Ge(e.engine.camera, e.engine.renderer, e.engine.scene).worldToScreen(u.point), y = e.engine.reactBoundingClientRect.left, _ = e.engine.reactBoundingClientRect.top;
|
|
11498
|
+
g.x += y, g.y += _, m.style.top = "0px", m.style.left = "0px";
|
|
11499
|
+
let w = m.getElementsByTagName("circle")[0];
|
|
11500
|
+
w && (w.setAttribute("cx", g.x), w.setAttribute("cy", g.y));
|
|
11501
|
+
let x = m.getElementsByTagName("rect"), b = m.getElementsByTagName("text"), M = -55;
|
|
11502
|
+
x[0] && (x[0].setAttribute("x", g.x + 10), x[0].setAttribute("y", g.y + 10 + M)), b[0] && (b[0].setAttribute("x", g.x + 10 + 40), b[0].setAttribute("y", g.y + 10 + 16 + M)), x[1] && (x[1].setAttribute("x", g.x + 10), x[1].setAttribute("y", g.y + 10 + 30 + M)), b[1] && (b[1].setAttribute("x", g.x + 10 + 40), b[1].setAttribute("y", g.y + 10 + 46 + M)), x[2] && (x[2].setAttribute("x", g.x + 10), x[2].setAttribute("y", g.y + 10 + 60 + M)), b[2] && (b[2].setAttribute("x", g.x + 10 + 40), b[2].setAttribute("y", g.y + 10 + 76 + M)), b[0] && (b[0].innerHTML = u.textX), b[1] && (b[1].innerHTML = u.textY), b[2] && (b[2].innerHTML = u.textZ);
|
|
11498
11503
|
}
|
|
11499
11504
|
function d(u) {
|
|
11500
11505
|
if (u.container == null) {
|
|
11501
|
-
let
|
|
11506
|
+
let w = [
|
|
11502
11507
|
'<svg width="100" height="50" class="measureSvg">',
|
|
11503
11508
|
'<rect x="0" y="0" width="80" height="25" class="measureBack" />',
|
|
11504
11509
|
'<text x="40" y="16" text-anchor="middle" class="measureLabel">' + u.text + "</text>",
|
|
11505
11510
|
'<polyline stroke="#f99d0b" stroke-width="2" points="80,32 0,32 16,48 32,32" style="fill: none; opacity: 1;"/>',
|
|
11506
11511
|
"</svg>"
|
|
11507
11512
|
].join("");
|
|
11508
|
-
u.container = document.createElement("div"), u.container.className = "elevation-annotation", u.container.id = u.id, u.container.style.position = "absolute", u.container.style.pointerEvents = "none", u.container.innerHTML =
|
|
11513
|
+
u.container = document.createElement("div"), u.container.className = "elevation-annotation", u.container.id = u.id, u.container.style.position = "absolute", u.container.style.pointerEvents = "none", u.container.innerHTML = w, e.engine.measure.annotationContainer.appendChild(u.container), u.container.getElementsByTagName("svg")[0].addEventListener("click", function() {
|
|
11509
11514
|
e.clearHighlight(), u.container.getElementsByTagName("svg")[0].classList.add("Hight"), u.highlight = !0;
|
|
11510
11515
|
});
|
|
11511
11516
|
}
|
|
11512
|
-
let m = u.container, g = new Ge(e.engine.camera, e.engine.renderer, e.engine.scene).worldToScreen(u.point);
|
|
11513
|
-
m.style.top = g.y - 48 + "px", m.style.left = g.x - 16 + "px", m.getElementsByTagName("text")[0].innerHTML = u.text;
|
|
11517
|
+
let m = u.container, g = new Ge(e.engine.camera, e.engine.renderer, e.engine.scene).worldToScreen(u.point), y = e.engine.reactBoundingClientRect.left, _ = e.engine.reactBoundingClientRect.top;
|
|
11518
|
+
m.style.top = g.y + _ - 48 + "px", m.style.left = g.x + y - 16 + "px", m.getElementsByTagName("text")[0].innerHTML = u.text;
|
|
11514
11519
|
}
|
|
11515
11520
|
function p(u) {
|
|
11516
11521
|
if (u.container == null) {
|
|
11517
|
-
let
|
|
11522
|
+
let x = [
|
|
11518
11523
|
'<svg class="measureSvg">',
|
|
11519
11524
|
'<circle cx="50" cy="50" r="5" fill="#f99d0b" />',
|
|
11520
11525
|
'<circle cx="50" cy="50" r="5" fill="#f99d0b" />',
|
|
@@ -11523,7 +11528,7 @@ class bt {
|
|
|
11523
11528
|
'<text x="40" y="16" text-anchor="middle" class="measureLabel">' + u.text + "</text>",
|
|
11524
11529
|
"</svg>"
|
|
11525
11530
|
].join("");
|
|
11526
|
-
u.container = document.createElement("div"), u.container.className = "normal-annotation", u.container.id = u.id, u.container.innerHTML =
|
|
11531
|
+
u.container = document.createElement("div"), u.container.className = "normal-annotation", u.container.id = u.id, u.container.innerHTML = x, e.engine.measure.annotationContainer.appendChild(u.container), u.container.getElementsByTagName("svg")[0].addEventListener("click", function() {
|
|
11527
11532
|
e.clearHighlight(), u.container.getElementsByTagName("svg")[0].classList.add("Hight"), u.highlight = !0;
|
|
11528
11533
|
});
|
|
11529
11534
|
}
|
|
@@ -11533,8 +11538,8 @@ class bt {
|
|
|
11533
11538
|
return;
|
|
11534
11539
|
} else
|
|
11535
11540
|
m.style.display = "block";
|
|
11536
|
-
let g = new Ge(e.engine.camera, e.engine.renderer, e.engine.scene).worldToScreen(u.point1), y = new Ge(e.engine.camera, e.engine.renderer, e.engine.scene).worldToScreen(u.point2);
|
|
11537
|
-
m.getElementsByTagName("polyline")[0].setAttribute("points", g.x + "," + g.y + " " + y.x + "," + y.y), m.getElementsByTagName("circle")[0].setAttribute("cx", g.x), m.getElementsByTagName("circle")[0].setAttribute("cy", g.y), m.getElementsByTagName("circle")[1].setAttribute("cx", y.x), m.getElementsByTagName("circle")[1].setAttribute("cy", y.y), m.getElementsByTagName("rect")[0].setAttribute("x", g.x * 0.5 + y.x * 0.5 - 40), m.getElementsByTagName("rect")[0].setAttribute("y", g.y * 0.5 + y.y * 0.5 - 12.5), m.getElementsByTagName("text")[0].setAttribute("x", g.x * 0.5 + y.x * 0.5 + 40 - 40), m.getElementsByTagName("text")[0].setAttribute("y", g.y * 0.5 + y.y * 0.5 + 16 - 12.5), m.getElementsByTagName("text")[0].innerHTML = u.text, m.style.top = "0px", m.style.left = "0px";
|
|
11541
|
+
let g = new Ge(e.engine.camera, e.engine.renderer, e.engine.scene).worldToScreen(u.point1), y = new Ge(e.engine.camera, e.engine.renderer, e.engine.scene).worldToScreen(u.point2), _ = e.engine.reactBoundingClientRect.left, w = e.engine.reactBoundingClientRect.top;
|
|
11542
|
+
g.x += _, g.y += w, y.x += _, y.y += w, m.getElementsByTagName("polyline")[0].setAttribute("points", g.x + "," + g.y + " " + y.x + "," + y.y), m.getElementsByTagName("circle")[0].setAttribute("cx", g.x), m.getElementsByTagName("circle")[0].setAttribute("cy", g.y), m.getElementsByTagName("circle")[1].setAttribute("cx", y.x), m.getElementsByTagName("circle")[1].setAttribute("cy", y.y), m.getElementsByTagName("rect")[0].setAttribute("x", g.x * 0.5 + y.x * 0.5 - 40), m.getElementsByTagName("rect")[0].setAttribute("y", g.y * 0.5 + y.y * 0.5 - 12.5), m.getElementsByTagName("text")[0].setAttribute("x", g.x * 0.5 + y.x * 0.5 + 40 - 40), m.getElementsByTagName("text")[0].setAttribute("y", g.y * 0.5 + y.y * 0.5 + 16 - 12.5), m.getElementsByTagName("text")[0].innerHTML = u.text, m.style.top = "0px", m.style.left = "0px";
|
|
11538
11543
|
}
|
|
11539
11544
|
}
|
|
11540
11545
|
}
|
|
@@ -12251,12 +12256,12 @@ function hs(s, e, t, n, i) {
|
|
|
12251
12256
|
let o = 1 / 0, r = 1 / 0, a = 1 / 0, l = -1 / 0, h = -1 / 0, c = -1 / 0, f = 1 / 0, d = 1 / 0, p = 1 / 0, u = -1 / 0, m = -1 / 0, g = -1 / 0;
|
|
12252
12257
|
const y = s.offset || 0;
|
|
12253
12258
|
for (let _ = (e - y) * 6, w = (e + t - y) * 6; _ < w; _ += 6) {
|
|
12254
|
-
const x = s[_ + 0],
|
|
12259
|
+
const x = s[_ + 0], b = s[_ + 1], M = x - b, A = x + b;
|
|
12255
12260
|
M < o && (o = M), A > l && (l = A), x < f && (f = x), x > u && (u = x);
|
|
12256
12261
|
const C = s[_ + 2], P = s[_ + 3], D = C - P, B = C + P;
|
|
12257
12262
|
D < r && (r = D), B > h && (h = B), C < d && (d = C), C > m && (m = C);
|
|
12258
|
-
const T = s[_ + 4], R = s[_ + 5],
|
|
12259
|
-
|
|
12263
|
+
const T = s[_ + 4], R = s[_ + 5], v = T - R, I = T + R;
|
|
12264
|
+
v < a && (a = v), I > c && (c = I), T < p && (p = T), T > g && (g = T);
|
|
12260
12265
|
}
|
|
12261
12266
|
n[0] = o, n[1] = r, n[2] = a, n[3] = l, n[4] = h, n[5] = c, i[0] = f, i[1] = d, i[2] = p, i[3] = u, i[4] = m, i[5] = g;
|
|
12262
12267
|
}
|
|
@@ -12274,14 +12279,14 @@ function Qr(s, e, t = null, n = null, i = null) {
|
|
|
12274
12279
|
const g = (n ? n[p] : p) * 3, y = (p - d) * 6;
|
|
12275
12280
|
let _ = g + 0, w = g + 1, x = g + 2;
|
|
12276
12281
|
r && (_ = r[_], w = r[w], x = r[x]), a || (_ = _ * c + h, w = w * c + h, x = x * c + h);
|
|
12277
|
-
for (let
|
|
12282
|
+
for (let b = 0; b < 3; b++) {
|
|
12278
12283
|
let M, A, C;
|
|
12279
|
-
a ? (M = o[f[
|
|
12284
|
+
a ? (M = o[f[b]](_), A = o[f[b]](w), C = o[f[b]](x)) : (M = l[_ + b], A = l[w + b], C = l[x + b]);
|
|
12280
12285
|
let P = M;
|
|
12281
12286
|
A < P && (P = A), C < P && (P = C);
|
|
12282
12287
|
let D = M;
|
|
12283
12288
|
A > D && (D = A), C > D && (D = C);
|
|
12284
|
-
const B = (D - P) / 2, T =
|
|
12289
|
+
const B = (D - P) / 2, T = b * 2;
|
|
12285
12290
|
i[y + T + 0] = P + B, i[y + T + 1] = B + (Math.abs(P) + B) * ff;
|
|
12286
12291
|
}
|
|
12287
12292
|
}
|
|
@@ -12314,7 +12319,7 @@ function ni(s, e, t) {
|
|
|
12314
12319
|
r < t[n] && (t[n] = r), a > t[n + 3] && (t[n + 3] = a);
|
|
12315
12320
|
}
|
|
12316
12321
|
}
|
|
12317
|
-
function
|
|
12322
|
+
function An(s) {
|
|
12318
12323
|
const e = s[3] - s[0], t = s[4] - s[1], n = s[5] - s[2];
|
|
12319
12324
|
return 2 * (e * t + t * n + n * e);
|
|
12320
12325
|
}
|
|
@@ -12332,7 +12337,7 @@ function yf(s, e, t, n, i, o) {
|
|
|
12332
12337
|
else if (o === hf)
|
|
12333
12338
|
r = eo(s), r !== -1 && (a = _f(t, n, i, r));
|
|
12334
12339
|
else if (o === uf) {
|
|
12335
|
-
const l =
|
|
12340
|
+
const l = An(s);
|
|
12336
12341
|
let h = ls * i;
|
|
12337
12342
|
const c = t.offset || 0, f = (n - c) * 6, d = (n + i - c) * 6;
|
|
12338
12343
|
for (let p = 0; p < 3; p++) {
|
|
@@ -12341,9 +12346,9 @@ function yf(s, e, t, n, i, o) {
|
|
|
12341
12346
|
const _ = [...Et];
|
|
12342
12347
|
_.length = i;
|
|
12343
12348
|
let w = 0;
|
|
12344
|
-
for (let
|
|
12349
|
+
for (let b = f; b < d; b += 6, w++) {
|
|
12345
12350
|
const M = _[w];
|
|
12346
|
-
M.candidate = t[
|
|
12351
|
+
M.candidate = t[b + 2 * p], M.count = 0;
|
|
12347
12352
|
const {
|
|
12348
12353
|
bounds: A,
|
|
12349
12354
|
leftCacheBounds: C,
|
|
@@ -12351,36 +12356,36 @@ function yf(s, e, t, n, i, o) {
|
|
|
12351
12356
|
} = M;
|
|
12352
12357
|
for (let D = 0; D < 3; D++)
|
|
12353
12358
|
P[D] = 1 / 0, P[D + 3] = -1 / 0, C[D] = 1 / 0, C[D + 3] = -1 / 0, A[D] = 1 / 0, A[D + 3] = -1 / 0;
|
|
12354
|
-
ni(
|
|
12359
|
+
ni(b, t, A);
|
|
12355
12360
|
}
|
|
12356
12361
|
_.sort(gf);
|
|
12357
12362
|
let x = i;
|
|
12358
|
-
for (let
|
|
12359
|
-
const M = _[
|
|
12360
|
-
for (;
|
|
12361
|
-
_.splice(
|
|
12363
|
+
for (let b = 0; b < x; b++) {
|
|
12364
|
+
const M = _[b];
|
|
12365
|
+
for (; b + 1 < x && _[b + 1].candidate === M.candidate; )
|
|
12366
|
+
_.splice(b + 1, 1), x--;
|
|
12362
12367
|
}
|
|
12363
|
-
for (let
|
|
12364
|
-
const M = t[
|
|
12368
|
+
for (let b = f; b < d; b += 6) {
|
|
12369
|
+
const M = t[b + 2 * p];
|
|
12365
12370
|
for (let A = 0; A < x; A++) {
|
|
12366
12371
|
const C = _[A];
|
|
12367
|
-
M >= C.candidate ? ni(
|
|
12372
|
+
M >= C.candidate ? ni(b, t, C.rightCacheBounds) : (ni(b, t, C.leftCacheBounds), C.count++);
|
|
12368
12373
|
}
|
|
12369
12374
|
}
|
|
12370
|
-
for (let
|
|
12371
|
-
const M = _[
|
|
12375
|
+
for (let b = 0; b < x; b++) {
|
|
12376
|
+
const M = _[b], A = M.count, C = i - M.count, P = M.leftCacheBounds, D = M.rightCacheBounds;
|
|
12372
12377
|
let B = 0;
|
|
12373
|
-
A !== 0 && (B =
|
|
12378
|
+
A !== 0 && (B = An(P) / l);
|
|
12374
12379
|
let T = 0;
|
|
12375
|
-
C !== 0 && (T =
|
|
12380
|
+
C !== 0 && (T = An(D) / l);
|
|
12376
12381
|
const R = $r + ls * (B * A + T * C);
|
|
12377
12382
|
R < h && (r = p, h = R, a = M.candidate);
|
|
12378
12383
|
}
|
|
12379
12384
|
} else {
|
|
12380
12385
|
for (let x = 0; x < mt; x++) {
|
|
12381
|
-
const
|
|
12382
|
-
|
|
12383
|
-
const M =
|
|
12386
|
+
const b = Et[x];
|
|
12387
|
+
b.count = 0, b.candidate = u + y + x * y;
|
|
12388
|
+
const M = b.bounds;
|
|
12384
12389
|
for (let A = 0; A < 3; A++)
|
|
12385
12390
|
M[A] = 1 / 0, M[A + 3] = -1 / 0;
|
|
12386
12391
|
}
|
|
@@ -12393,19 +12398,19 @@ function yf(s, e, t, n, i, o) {
|
|
|
12393
12398
|
const _ = Et[mt - 1];
|
|
12394
12399
|
to(_.bounds, _.rightCacheBounds);
|
|
12395
12400
|
for (let x = mt - 2; x >= 0; x--) {
|
|
12396
|
-
const
|
|
12397
|
-
no(
|
|
12401
|
+
const b = Et[x], M = Et[x + 1];
|
|
12402
|
+
no(b.bounds, M.rightCacheBounds, b.rightCacheBounds);
|
|
12398
12403
|
}
|
|
12399
12404
|
let w = 0;
|
|
12400
12405
|
for (let x = 0; x < mt - 1; x++) {
|
|
12401
|
-
const
|
|
12406
|
+
const b = Et[x], M = b.count, A = b.bounds, P = Et[x + 1].rightCacheBounds;
|
|
12402
12407
|
M !== 0 && (w === 0 ? to(A, ii) : no(A, ii, ii)), w += M;
|
|
12403
12408
|
let D = 0, B = 0;
|
|
12404
|
-
w !== 0 && (D =
|
|
12409
|
+
w !== 0 && (D = An(ii) / l);
|
|
12405
12410
|
const T = i - w;
|
|
12406
|
-
T !== 0 && (B =
|
|
12411
|
+
T !== 0 && (B = An(P) / l);
|
|
12407
12412
|
const R = $r + ls * (D * w + B * T);
|
|
12408
|
-
R < h && (r = p, h = R, a =
|
|
12413
|
+
R < h && (r = p, h = R, a = b.candidate);
|
|
12409
12414
|
}
|
|
12410
12415
|
}
|
|
12411
12416
|
}
|
|
@@ -12513,26 +12518,26 @@ function Tf(s, e, t, n, i) {
|
|
|
12513
12518
|
let y = !1;
|
|
12514
12519
|
const _ = new us();
|
|
12515
12520
|
return hs(e, t, n, _.boundingData, g), x(_, t, n, g), _;
|
|
12516
|
-
function w(
|
|
12517
|
-
h && h(
|
|
12521
|
+
function w(b) {
|
|
12522
|
+
h && h(b / m);
|
|
12518
12523
|
}
|
|
12519
|
-
function x(
|
|
12524
|
+
function x(b, M, A, C = null, P = 0) {
|
|
12520
12525
|
if (!y && P >= o && (y = !0, r && (console.warn(`MeshBVH: Max depth of ${o} reached when generating BVH. Consider increasing maxDepth.`), console.warn(d))), A <= a || P >= o)
|
|
12521
|
-
return w(M + A),
|
|
12522
|
-
const D = yf(
|
|
12526
|
+
return w(M + A), b.offset = M, b.count = A, b;
|
|
12527
|
+
const D = yf(b.boundingData, C, e, M, A, l);
|
|
12523
12528
|
if (D.axis === -1)
|
|
12524
|
-
return w(M + A),
|
|
12529
|
+
return w(M + A), b.offset = M, b.count = A, b;
|
|
12525
12530
|
const B = u(f, p, e, M, A, D);
|
|
12526
12531
|
if (B === M || B === M + A)
|
|
12527
|
-
w(M + A),
|
|
12532
|
+
w(M + A), b.offset = M, b.count = A;
|
|
12528
12533
|
else {
|
|
12529
|
-
|
|
12530
|
-
const T = new us(), R = M,
|
|
12531
|
-
|
|
12532
|
-
const I = new us(), q = B, H = A -
|
|
12533
|
-
|
|
12534
|
+
b.splitAxis = D.axis;
|
|
12535
|
+
const T = new us(), R = M, v = B - M;
|
|
12536
|
+
b.left = T, hs(e, R, v, T.boundingData, g), x(T, R, v, g, P + 1);
|
|
12537
|
+
const I = new us(), q = B, H = A - v;
|
|
12538
|
+
b.right = I, hs(e, q, H, I.boundingData, g), x(I, q, H, g, P + 1);
|
|
12534
12539
|
}
|
|
12535
|
-
return
|
|
12540
|
+
return b;
|
|
12536
12541
|
}
|
|
12537
12542
|
}
|
|
12538
12543
|
function Ef(s, e) {
|
|
@@ -12678,53 +12683,53 @@ Ye.prototype.closestPointToSegment = /* @__PURE__ */ (function() {
|
|
|
12678
12683
|
})();
|
|
12679
12684
|
Ye.prototype.intersectsTriangle = /* @__PURE__ */ (function() {
|
|
12680
12685
|
const s = /* @__PURE__ */ new Ye(), e = /* @__PURE__ */ new xt(), t = /* @__PURE__ */ new xt(), n = /* @__PURE__ */ new Z(), i = /* @__PURE__ */ new Z(), o = /* @__PURE__ */ new Z(), r = /* @__PURE__ */ new Z(), a = /* @__PURE__ */ new Ze(), l = /* @__PURE__ */ new Ze(), h = /* @__PURE__ */ new Z(), c = /* @__PURE__ */ new ce(), f = /* @__PURE__ */ new ce();
|
|
12681
|
-
function d(w, x,
|
|
12686
|
+
function d(w, x, b, M) {
|
|
12682
12687
|
const A = n;
|
|
12683
12688
|
!w.isDegenerateIntoPoint && !w.isDegenerateIntoSegment ? A.copy(w.plane.normal) : A.copy(x.plane.normal);
|
|
12684
12689
|
const C = w.satBounds, P = w.satAxes;
|
|
12685
12690
|
for (let T = 1; T < 4; T++) {
|
|
12686
|
-
const R = C[T],
|
|
12687
|
-
if (e.setFromPoints(
|
|
12691
|
+
const R = C[T], v = P[T];
|
|
12692
|
+
if (e.setFromPoints(v, x.points), R.isSeparated(e) || (r.copy(A).cross(v), e.setFromPoints(r, w.points), t.setFromPoints(r, x.points), e.isSeparated(t))) return !1;
|
|
12688
12693
|
}
|
|
12689
12694
|
const D = x.satBounds, B = x.satAxes;
|
|
12690
12695
|
for (let T = 1; T < 4; T++) {
|
|
12691
|
-
const R = D[T],
|
|
12692
|
-
if (e.setFromPoints(
|
|
12696
|
+
const R = D[T], v = B[T];
|
|
12697
|
+
if (e.setFromPoints(v, w.points), R.isSeparated(e) || (r.crossVectors(A, v), e.setFromPoints(r, w.points), t.setFromPoints(r, x.points), e.isSeparated(t))) return !1;
|
|
12693
12698
|
}
|
|
12694
|
-
return
|
|
12699
|
+
return b && (M || console.warn("ExtendedTriangle.intersectsTriangle: Triangles are coplanar which does not support an output edge. Setting edge to 0, 0, 0."), b.start.set(0, 0, 0), b.end.set(0, 0, 0)), !0;
|
|
12695
12700
|
}
|
|
12696
|
-
function p(w, x,
|
|
12697
|
-
let
|
|
12698
|
-
T.x = M + (A - M) *
|
|
12701
|
+
function p(w, x, b, M, A, C, P, D, B, T, R) {
|
|
12702
|
+
let v = P / (P - D);
|
|
12703
|
+
T.x = M + (A - M) * v, R.start.subVectors(x, w).multiplyScalar(v).add(w), v = P / (P - B), T.y = M + (C - M) * v, R.end.subVectors(b, w).multiplyScalar(v).add(w);
|
|
12699
12704
|
}
|
|
12700
|
-
function u(w, x,
|
|
12705
|
+
function u(w, x, b, M, A, C, P, D, B, T, R) {
|
|
12701
12706
|
if (A > 0)
|
|
12702
|
-
p(w.c, w.a, w.b, M, x,
|
|
12707
|
+
p(w.c, w.a, w.b, M, x, b, B, P, D, T, R);
|
|
12703
12708
|
else if (C > 0)
|
|
12704
|
-
p(w.b, w.a, w.c,
|
|
12709
|
+
p(w.b, w.a, w.c, b, x, M, D, P, B, T, R);
|
|
12705
12710
|
else if (D * B > 0 || P != 0)
|
|
12706
|
-
p(w.a, w.b, w.c, x,
|
|
12711
|
+
p(w.a, w.b, w.c, x, b, M, P, D, B, T, R);
|
|
12707
12712
|
else if (D != 0)
|
|
12708
|
-
p(w.b, w.a, w.c,
|
|
12713
|
+
p(w.b, w.a, w.c, b, x, M, D, P, B, T, R);
|
|
12709
12714
|
else if (B != 0)
|
|
12710
|
-
p(w.c, w.a, w.b, M, x,
|
|
12715
|
+
p(w.c, w.a, w.b, M, x, b, B, P, D, T, R);
|
|
12711
12716
|
else
|
|
12712
12717
|
return !0;
|
|
12713
12718
|
return !1;
|
|
12714
12719
|
}
|
|
12715
|
-
function m(w, x,
|
|
12720
|
+
function m(w, x, b, M) {
|
|
12716
12721
|
const A = x.degenerateSegment, C = w.plane.distanceToPoint(A.start), P = w.plane.distanceToPoint(A.end);
|
|
12717
|
-
return He(C) ? He(P) ? d(w, x,
|
|
12722
|
+
return He(C) ? He(P) ? d(w, x, b, M) : (b && (b.start.copy(A.start), b.end.copy(A.start)), w.containsPoint(A.start)) : He(P) ? (b && (b.start.copy(A.end), b.end.copy(A.end)), w.containsPoint(A.end)) : w.plane.intersectLine(A, n) != null ? (b && (b.start.copy(n), b.end.copy(n)), w.containsPoint(n)) : !1;
|
|
12718
12723
|
}
|
|
12719
|
-
function g(w, x,
|
|
12724
|
+
function g(w, x, b) {
|
|
12720
12725
|
const M = x.a;
|
|
12721
|
-
return He(w.plane.distanceToPoint(M)) && w.containsPoint(M) ? (
|
|
12726
|
+
return He(w.plane.distanceToPoint(M)) && w.containsPoint(M) ? (b && (b.start.copy(M), b.end.copy(M)), !0) : !1;
|
|
12722
12727
|
}
|
|
12723
|
-
function y(w, x,
|
|
12728
|
+
function y(w, x, b) {
|
|
12724
12729
|
const M = w.degenerateSegment, A = x.a;
|
|
12725
|
-
return M.closestPointToPoint(A, !0, n), A.distanceToSquared(n) < io ? (
|
|
12730
|
+
return M.closestPointToPoint(A, !0, n), A.distanceToSquared(n) < io ? (b && (b.start.copy(A), b.end.copy(A)), !0) : !1;
|
|
12726
12731
|
}
|
|
12727
|
-
function _(w, x,
|
|
12732
|
+
function _(w, x, b, M) {
|
|
12728
12733
|
if (w.isDegenerateIntoSegment)
|
|
12729
12734
|
if (x.isDegenerateIntoSegment) {
|
|
12730
12735
|
const A = w.degenerateSegment, C = x.degenerateSegment, P = i, D = o;
|
|
@@ -12732,31 +12737,31 @@ Ye.prototype.intersectsTriangle = /* @__PURE__ */ (function() {
|
|
|
12732
12737
|
const B = n.subVectors(C.start, A.start), T = P.x * D.y - P.y * D.x;
|
|
12733
12738
|
if (He(T))
|
|
12734
12739
|
return !1;
|
|
12735
|
-
const R = (B.x * D.y - B.y * D.x) / T,
|
|
12736
|
-
if (R < 0 || R > 1 ||
|
|
12740
|
+
const R = (B.x * D.y - B.y * D.x) / T, v = -(P.x * B.y - P.y * B.x) / T;
|
|
12741
|
+
if (R < 0 || R > 1 || v < 0 || v > 1)
|
|
12737
12742
|
return !1;
|
|
12738
|
-
const I = A.start.z + P.z * R, q = C.start.z + D.z *
|
|
12739
|
-
return He(I - q) ? (
|
|
12740
|
-
} else return x.isDegenerateIntoPoint ? y(w, x,
|
|
12743
|
+
const I = A.start.z + P.z * R, q = C.start.z + D.z * v;
|
|
12744
|
+
return He(I - q) ? (b && (b.start.copy(A.start).addScaledVector(P, R), b.end.copy(A.start).addScaledVector(P, R)), !0) : !1;
|
|
12745
|
+
} else return x.isDegenerateIntoPoint ? y(w, x, b) : m(x, w, b, M);
|
|
12741
12746
|
else {
|
|
12742
12747
|
if (w.isDegenerateIntoPoint)
|
|
12743
|
-
return x.isDegenerateIntoPoint ? x.a.distanceToSquared(w.a) < io ? (
|
|
12748
|
+
return x.isDegenerateIntoPoint ? x.a.distanceToSquared(w.a) < io ? (b && (b.start.copy(w.a), b.end.copy(w.a)), !0) : !1 : x.isDegenerateIntoSegment ? y(x, w, b) : g(x, w, b);
|
|
12744
12749
|
if (x.isDegenerateIntoPoint)
|
|
12745
|
-
return g(w, x,
|
|
12750
|
+
return g(w, x, b);
|
|
12746
12751
|
if (x.isDegenerateIntoSegment)
|
|
12747
|
-
return m(w, x,
|
|
12752
|
+
return m(w, x, b, M);
|
|
12748
12753
|
}
|
|
12749
12754
|
}
|
|
12750
|
-
return function(x,
|
|
12755
|
+
return function(x, b = null, M = !1) {
|
|
12751
12756
|
this.needsUpdate && this.update(), x.isExtendedTriangle ? x.needsUpdate && x.update() : (s.copy(x), s.update(), x = s);
|
|
12752
|
-
const A = _(this, x,
|
|
12757
|
+
const A = _(this, x, b, M);
|
|
12753
12758
|
if (A !== void 0)
|
|
12754
12759
|
return A;
|
|
12755
12760
|
const C = this.plane, P = x.plane;
|
|
12756
12761
|
let D = P.distanceToPoint(this.a), B = P.distanceToPoint(this.b), T = P.distanceToPoint(this.c);
|
|
12757
12762
|
He(D) && (D = 0), He(B) && (B = 0), He(T) && (T = 0);
|
|
12758
|
-
const R = D * B,
|
|
12759
|
-
if (R > 0 &&
|
|
12763
|
+
const R = D * B, v = D * T;
|
|
12764
|
+
if (R > 0 && v > 0)
|
|
12760
12765
|
return !1;
|
|
12761
12766
|
let I = C.distanceToPoint(x.a), q = C.distanceToPoint(x.b), H = C.distanceToPoint(x.c);
|
|
12762
12767
|
He(I) && (I = 0), He(q) && (q = 0), He(H) && (H = 0);
|
|
@@ -12769,10 +12774,10 @@ Ye.prototype.intersectsTriangle = /* @__PURE__ */ (function() {
|
|
|
12769
12774
|
const te = Math.abs(ne.y);
|
|
12770
12775
|
te > N && (N = te, O = 1), Math.abs(ne.z) > N && (O = 2);
|
|
12771
12776
|
const K = Cf[O], fe = this.a[K], pe = this.b[K], se = this.c[K], oe = x.a[K], ue = x.b[K], me = x.c[K];
|
|
12772
|
-
if (u(this, fe, pe, se, R,
|
|
12773
|
-
return d(this, x,
|
|
12777
|
+
if (u(this, fe, pe, se, R, v, D, B, T, c, a))
|
|
12778
|
+
return d(this, x, b, M);
|
|
12774
12779
|
if (u(x, oe, ue, me, ee, j, I, q, H, f, l))
|
|
12775
|
-
return d(this, x,
|
|
12780
|
+
return d(this, x, b, M);
|
|
12776
12781
|
if (c.y < c.x) {
|
|
12777
12782
|
const Se = c.y;
|
|
12778
12783
|
c.y = c.x, c.x = Se, h.copy(a.start), a.start.copy(a.end), a.end.copy(h);
|
|
@@ -12781,7 +12786,7 @@ Ye.prototype.intersectsTriangle = /* @__PURE__ */ (function() {
|
|
|
12781
12786
|
const Se = f.y;
|
|
12782
12787
|
f.y = f.x, f.x = Se, h.copy(l.start), l.start.copy(l.end), l.end.copy(h);
|
|
12783
12788
|
}
|
|
12784
|
-
return c.y < f.x || f.y < c.x ? !1 : (
|
|
12789
|
+
return c.y < f.x || f.y < c.x ? !1 : (b && (f.x > c.x ? b.start.copy(l.start) : b.start.copy(a.start), f.y < c.y ? b.end.copy(l.end) : b.end.copy(a.end)), !0);
|
|
12785
12790
|
};
|
|
12786
12791
|
})();
|
|
12787
12792
|
Ye.prototype.distanceToPoint = /* @__PURE__ */ (function() {
|
|
@@ -12913,10 +12918,10 @@ Ie.prototype.distanceToBox = /* @__PURE__ */ (function() {
|
|
|
12913
12918
|
for (let g = 0; g < 3; g++)
|
|
12914
12919
|
for (let y = 0; y <= 1; y++)
|
|
12915
12920
|
for (let _ = 0; _ <= 1; _++) {
|
|
12916
|
-
const w = (g + 1) % 3, x = (g + 2) % 3,
|
|
12921
|
+
const w = (g + 1) % 3, x = (g + 2) % 3, b = y << w | _ << x, M = 1 << g | y << w | _ << x, A = p[b], C = p[M];
|
|
12917
12922
|
e[m].set(A, C);
|
|
12918
|
-
const D = s[g], B = s[w], T = s[x], R = t[m],
|
|
12919
|
-
|
|
12923
|
+
const D = s[g], B = s[w], T = s[x], R = t[m], v = R.start, I = R.end;
|
|
12924
|
+
v[D] = f[D], v[B] = y ? f[B] : d[B], v[T] = _ ? f[T] : d[B], I[D] = d[D], I[B] = y ? f[B] : d[B], I[T] = _ ? f[T] : d[B], m++;
|
|
12920
12925
|
}
|
|
12921
12926
|
for (let g = 0; g <= 1; g++)
|
|
12922
12927
|
for (let y = 0; y <= 1; y++)
|
|
@@ -13006,17 +13011,17 @@ function Ws(s, e, t, n, i = null, o = 0, r = 0) {
|
|
|
13006
13011
|
return _e(s, a, Pt), n(d, p, !1, r, o + s / Ee, Pt);
|
|
13007
13012
|
} else {
|
|
13008
13013
|
let D = function(T) {
|
|
13009
|
-
const { uint16Array: R, uint32Array:
|
|
13014
|
+
const { uint16Array: R, uint32Array: v } = ge;
|
|
13010
13015
|
let I = T * 2;
|
|
13011
13016
|
for (; !Ae(I, R); )
|
|
13012
13017
|
T = Ce(T), I = T * 2;
|
|
13013
|
-
return Ve(T,
|
|
13018
|
+
return Ve(T, v);
|
|
13014
13019
|
}, B = function(T) {
|
|
13015
|
-
const { uint16Array: R, uint32Array:
|
|
13020
|
+
const { uint16Array: R, uint32Array: v } = ge;
|
|
13016
13021
|
let I = T * 2;
|
|
13017
13022
|
for (; !Ae(I, R); )
|
|
13018
|
-
T = Pe(T,
|
|
13019
|
-
return Ve(T,
|
|
13023
|
+
T = Pe(T, v), I = T * 2;
|
|
13024
|
+
return Ve(T, v) + Ke(I, R);
|
|
13020
13025
|
};
|
|
13021
13026
|
const d = Ce(s), p = Pe(s, h);
|
|
13022
13027
|
let u = d, m = p, g, y, _, w;
|
|
@@ -13026,13 +13031,13 @@ function Ws(s, e, t, n, i = null, o = 0, r = 0) {
|
|
|
13026
13031
|
g = y, y = T, _ = w;
|
|
13027
13032
|
}
|
|
13028
13033
|
_ || (_ = Pt, _e(u, a, _));
|
|
13029
|
-
const x = Ae(u * 2, l),
|
|
13034
|
+
const x = Ae(u * 2, l), b = t(_, x, g, r + 1, o + u / Ee);
|
|
13030
13035
|
let M;
|
|
13031
|
-
if (
|
|
13032
|
-
const T = D(u),
|
|
13033
|
-
M = n(T,
|
|
13036
|
+
if (b === Yr) {
|
|
13037
|
+
const T = D(u), v = B(u) - T;
|
|
13038
|
+
M = n(T, v, !0, r + 1, o + u / Ee, _);
|
|
13034
13039
|
} else
|
|
13035
|
-
M =
|
|
13040
|
+
M = b && Ws(
|
|
13036
13041
|
u,
|
|
13037
13042
|
e,
|
|
13038
13043
|
t,
|
|
@@ -13046,8 +13051,8 @@ function Ws(s, e, t, n, i = null, o = 0, r = 0) {
|
|
|
13046
13051
|
const A = Ae(m * 2, l), C = t(w, A, y, r + 1, o + m / Ee);
|
|
13047
13052
|
let P;
|
|
13048
13053
|
if (C === Yr) {
|
|
13049
|
-
const T = D(m),
|
|
13050
|
-
P = n(T,
|
|
13054
|
+
const T = D(m), v = B(m) - T;
|
|
13055
|
+
P = n(T, v, !0, r + 1, o + m / Ee, w);
|
|
13051
13056
|
} else
|
|
13052
13057
|
P = C && Ws(
|
|
13053
13058
|
m,
|
|
@@ -13061,25 +13066,25 @@ function Ws(s, e, t, n, i = null, o = 0, r = 0) {
|
|
|
13061
13066
|
return !!P;
|
|
13062
13067
|
}
|
|
13063
13068
|
}
|
|
13064
|
-
const
|
|
13069
|
+
const Mn = /* @__PURE__ */ new Z(), fs = /* @__PURE__ */ new Z();
|
|
13065
13070
|
function Rf(s, e, t = {}, n = 0, i = 1 / 0) {
|
|
13066
13071
|
const o = n * n, r = i * i;
|
|
13067
13072
|
let a = 1 / 0, l = null;
|
|
13068
13073
|
if (s.shapecast(
|
|
13069
13074
|
{
|
|
13070
|
-
boundsTraverseOrder: (c) => (
|
|
13075
|
+
boundsTraverseOrder: (c) => (Mn.copy(e).clamp(c.min, c.max), Mn.distanceToSquared(e)),
|
|
13071
13076
|
intersectsBounds: (c, f, d) => d < a && d < r,
|
|
13072
13077
|
intersectsTriangle: (c, f) => {
|
|
13073
|
-
c.closestPointToPoint(e,
|
|
13074
|
-
const d = e.distanceToSquared(
|
|
13075
|
-
return d < a && (fs.copy(
|
|
13078
|
+
c.closestPointToPoint(e, Mn);
|
|
13079
|
+
const d = e.distanceToSquared(Mn);
|
|
13080
|
+
return d < a && (fs.copy(Mn), a = d, l = f), d < o;
|
|
13076
13081
|
}
|
|
13077
13082
|
}
|
|
13078
13083
|
), a === 1 / 0) return null;
|
|
13079
13084
|
const h = Math.sqrt(a);
|
|
13080
13085
|
return t.point ? t.point.copy(fs) : t.point = fs.clone(), t.distance = h, t.faceIndex = l, t;
|
|
13081
13086
|
}
|
|
13082
|
-
const ri = parseInt(Go) >= 169, Lf = parseInt(Go) <= 161, Ot = /* @__PURE__ */ new Z(), Ut = /* @__PURE__ */ new Z(), Ft = /* @__PURE__ */ new Z(), oi = /* @__PURE__ */ new ce(), ai = /* @__PURE__ */ new ce(), li = /* @__PURE__ */ new ce(), so = /* @__PURE__ */ new Z(), ro = /* @__PURE__ */ new Z(), oo = /* @__PURE__ */ new Z(),
|
|
13087
|
+
const ri = parseInt(Go) >= 169, Lf = parseInt(Go) <= 161, Ot = /* @__PURE__ */ new Z(), Ut = /* @__PURE__ */ new Z(), Ft = /* @__PURE__ */ new Z(), oi = /* @__PURE__ */ new ce(), ai = /* @__PURE__ */ new ce(), li = /* @__PURE__ */ new ce(), so = /* @__PURE__ */ new Z(), ro = /* @__PURE__ */ new Z(), oo = /* @__PURE__ */ new Z(), Cn = /* @__PURE__ */ new Z();
|
|
13083
13088
|
function Bf(s, e, t, n, i, o, r, a) {
|
|
13084
13089
|
let l;
|
|
13085
13090
|
if (o === Dl ? l = s.intersectTriangle(n, t, e, !0, i) : l = s.intersectTriangle(e, t, n, o !== Vi, i), l === null) return null;
|
|
@@ -13091,21 +13096,21 @@ function Bf(s, e, t, n, i, o, r, a) {
|
|
|
13091
13096
|
}
|
|
13092
13097
|
function ao(s, e, t, n, i, o, r, a, l, h, c) {
|
|
13093
13098
|
Ot.fromBufferAttribute(e, o), Ut.fromBufferAttribute(e, r), Ft.fromBufferAttribute(e, a);
|
|
13094
|
-
const f = Bf(s, Ot, Ut, Ft,
|
|
13099
|
+
const f = Bf(s, Ot, Ut, Ft, Cn, l, h, c);
|
|
13095
13100
|
if (f) {
|
|
13096
13101
|
if (n) {
|
|
13097
13102
|
oi.fromBufferAttribute(n, o), ai.fromBufferAttribute(n, r), li.fromBufferAttribute(n, a), f.uv = new ce();
|
|
13098
|
-
const p = Oe.getInterpolation(
|
|
13103
|
+
const p = Oe.getInterpolation(Cn, Ot, Ut, Ft, oi, ai, li, f.uv);
|
|
13099
13104
|
ri || (f.uv = p);
|
|
13100
13105
|
}
|
|
13101
13106
|
if (i) {
|
|
13102
13107
|
oi.fromBufferAttribute(i, o), ai.fromBufferAttribute(i, r), li.fromBufferAttribute(i, a), f.uv1 = new ce();
|
|
13103
|
-
const p = Oe.getInterpolation(
|
|
13108
|
+
const p = Oe.getInterpolation(Cn, Ot, Ut, Ft, oi, ai, li, f.uv1);
|
|
13104
13109
|
ri || (f.uv1 = p), Lf && (f.uv2 = f.uv1);
|
|
13105
13110
|
}
|
|
13106
13111
|
if (t) {
|
|
13107
13112
|
so.fromBufferAttribute(t, o), ro.fromBufferAttribute(t, r), oo.fromBufferAttribute(t, a), f.normal = new Z();
|
|
13108
|
-
const p = Oe.getInterpolation(
|
|
13113
|
+
const p = Oe.getInterpolation(Cn, Ot, Ut, Ft, so, ro, oo, f.normal);
|
|
13109
13114
|
f.normal.dot(s.direction) > 0 && f.normal.multiplyScalar(-1), ri || (f.normal = p);
|
|
13110
13115
|
}
|
|
13111
13116
|
const d = {
|
|
@@ -13117,7 +13122,7 @@ function ao(s, e, t, n, i, o, r, a, l, h, c) {
|
|
|
13117
13122
|
};
|
|
13118
13123
|
if (Oe.getNormal(Ot, Ut, Ft, d.normal), f.face = d, f.faceIndex = o, ri) {
|
|
13119
13124
|
const p = new Z();
|
|
13120
|
-
Oe.getBarycoord(
|
|
13125
|
+
Oe.getBarycoord(Cn, Ot, Ut, Ft, p), f.barycoord = p;
|
|
13121
13126
|
}
|
|
13122
13127
|
}
|
|
13123
13128
|
return f;
|
|
@@ -13134,8 +13139,8 @@ function Ki(s, e, t, n, i, o, r) {
|
|
|
13134
13139
|
if (Array.isArray(e)) {
|
|
13135
13140
|
const y = n * 3;
|
|
13136
13141
|
for (let _ = 0, w = d.length; _ < w; _++) {
|
|
13137
|
-
const { start: x, count:
|
|
13138
|
-
if (y >= x && y < x +
|
|
13142
|
+
const { start: x, count: b, materialIndex: M } = d[_];
|
|
13143
|
+
if (y >= x && y < x + b) {
|
|
13139
13144
|
const A = lo(e[M]), C = ao(t, p, u, m, g, l, h, c, A, o, r);
|
|
13140
13145
|
if (C)
|
|
13141
13146
|
if (C.faceIndex = n, C.face.materialIndex = M, i)
|
|
@@ -13193,13 +13198,13 @@ function Of(s, e = null) {
|
|
|
13193
13198
|
const m = d * 2;
|
|
13194
13199
|
if (Ae(m, a)) {
|
|
13195
13200
|
const g = r[d + 6], y = a[m + 14];
|
|
13196
|
-
let _ = 1 / 0, w = 1 / 0, x = 1 / 0,
|
|
13201
|
+
let _ = 1 / 0, w = 1 / 0, x = 1 / 0, b = -1 / 0, M = -1 / 0, A = -1 / 0;
|
|
13197
13202
|
for (let C = 3 * g, P = 3 * (g + y); C < P; C++) {
|
|
13198
13203
|
let D = n[C];
|
|
13199
13204
|
const B = i.getX(D), T = i.getY(D), R = i.getZ(D);
|
|
13200
|
-
B < _ && (_ = B), B >
|
|
13205
|
+
B < _ && (_ = B), B > b && (b = B), T < w && (w = T), T > M && (M = T), R < x && (x = R), R > A && (A = R);
|
|
13201
13206
|
}
|
|
13202
|
-
return l[d + 0] !== _ || l[d + 1] !== w || l[d + 2] !== x || l[d + 3] !==
|
|
13207
|
+
return l[d + 0] !== _ || l[d + 1] !== w || l[d + 2] !== x || l[d + 3] !== b || l[d + 4] !== M || l[d + 5] !== A ? (l[d + 0] = _, l[d + 1] = w, l[d + 2] = x, l[d + 3] = b, l[d + 4] = M, l[d + 5] = A, !0) : !1;
|
|
13203
13208
|
} else {
|
|
13204
13209
|
const g = Ce(d), y = Pe(d, r);
|
|
13205
13210
|
let _ = u, w = !1, x = !1;
|
|
@@ -13210,16 +13215,16 @@ function Of(s, e = null) {
|
|
|
13210
13215
|
}
|
|
13211
13216
|
} else
|
|
13212
13217
|
w = !0, x = !0;
|
|
13213
|
-
const
|
|
13218
|
+
const b = _ || w, M = _ || x;
|
|
13214
13219
|
let A = !1;
|
|
13215
|
-
|
|
13220
|
+
b && (A = f(g, p, _));
|
|
13216
13221
|
let C = !1;
|
|
13217
13222
|
M && (C = f(y, p, _));
|
|
13218
13223
|
const P = A || C;
|
|
13219
13224
|
if (P)
|
|
13220
13225
|
for (let D = 0; D < 3; D++) {
|
|
13221
|
-
const B = g + D, T = y + D, R = l[B],
|
|
13222
|
-
l[d + D] = R < I ? R : I, l[d + D + 3] =
|
|
13226
|
+
const B = g + D, T = y + D, R = l[B], v = l[B + 3], I = l[T], q = l[T + 3];
|
|
13227
|
+
l[d + D] = R < I ? R : I, l[d + D + 3] = v > q ? v : q;
|
|
13223
13228
|
}
|
|
13224
13229
|
return P;
|
|
13225
13230
|
}
|
|
@@ -13228,8 +13233,8 @@ function Of(s, e = null) {
|
|
|
13228
13233
|
function Rt(s, e, t, n, i) {
|
|
13229
13234
|
let o, r, a, l, h, c;
|
|
13230
13235
|
const f = 1 / t.direction.x, d = 1 / t.direction.y, p = 1 / t.direction.z, u = t.origin.x, m = t.origin.y, g = t.origin.z;
|
|
13231
|
-
let y = e[s], _ = e[s + 3], w = e[s + 1], x = e[s + 3 + 1],
|
|
13232
|
-
return f >= 0 ? (o = (y - u) * f, r = (_ - u) * f) : (o = (_ - u) * f, r = (y - u) * f), d >= 0 ? (a = (w - m) * d, l = (x - m) * d) : (a = (x - m) * d, l = (w - m) * d), o > l || a > r || ((a > o || isNaN(o)) && (o = a), (l < r || isNaN(r)) && (r = l), p >= 0 ? (h = (
|
|
13236
|
+
let y = e[s], _ = e[s + 3], w = e[s + 1], x = e[s + 3 + 1], b = e[s + 2], M = e[s + 3 + 2];
|
|
13237
|
+
return f >= 0 ? (o = (y - u) * f, r = (_ - u) * f) : (o = (_ - u) * f, r = (y - u) * f), d >= 0 ? (a = (w - m) * d, l = (x - m) * d) : (a = (x - m) * d, l = (w - m) * d), o > l || a > r || ((a > o || isNaN(o)) && (o = a), (l < r || isNaN(r)) && (r = l), p >= 0 ? (h = (b - g) * p, c = (M - g) * p) : (h = (M - g) * p, c = (b - g) * p), o > c || h > r) ? !1 : ((h > o || o !== o) && (o = h), (c < r || r !== r) && (r = c), o <= i && r >= n);
|
|
13233
13238
|
}
|
|
13234
13239
|
function Uf(s, e, t, n, i, o, r, a) {
|
|
13235
13240
|
const { geometry: l, _indirectBuffer: h } = s;
|
|
@@ -13289,10 +13294,10 @@ function qs(s, e, t, n, i, o) {
|
|
|
13289
13294
|
u ? (m = Ce(s), g = Pe(s, l)) : (m = Pe(s, l), g = Ce(s));
|
|
13290
13295
|
const _ = Rt(m, r, n, i, o) ? qs(m, e, t, n, i, o) : null;
|
|
13291
13296
|
if (_) {
|
|
13292
|
-
const
|
|
13293
|
-
if (u ?
|
|
13297
|
+
const b = _.point[d];
|
|
13298
|
+
if (u ? b <= r[g + f] : (
|
|
13294
13299
|
// min bounding data
|
|
13295
|
-
|
|
13300
|
+
b >= r[g + f + 3]
|
|
13296
13301
|
))
|
|
13297
13302
|
return _;
|
|
13298
13303
|
}
|
|
@@ -13300,7 +13305,7 @@ function qs(s, e, t, n, i, o) {
|
|
|
13300
13305
|
return _ && x ? _.distance <= x.distance ? _ : x : _ || x || null;
|
|
13301
13306
|
}
|
|
13302
13307
|
}
|
|
13303
|
-
const ci = /* @__PURE__ */ new nt(), nn = /* @__PURE__ */ new Ye(), sn = /* @__PURE__ */ new Ye(),
|
|
13308
|
+
const ci = /* @__PURE__ */ new nt(), nn = /* @__PURE__ */ new Ye(), sn = /* @__PURE__ */ new Ye(), Pn = /* @__PURE__ */ new Me(), co = /* @__PURE__ */ new Ie(), hi = /* @__PURE__ */ new Ie();
|
|
13304
13309
|
function Wf(s, e, t, n) {
|
|
13305
13310
|
ge.setBuffer(s._roots[e]);
|
|
13306
13311
|
const i = Ks(0, s, t, n);
|
|
@@ -13311,8 +13316,8 @@ function Ks(s, e, t, n, i = null) {
|
|
|
13311
13316
|
let l = s * 2;
|
|
13312
13317
|
if (i === null && (t.boundingBox || t.computeBoundingBox(), co.set(t.boundingBox.min, t.boundingBox.max, n), i = co), Ae(l, r)) {
|
|
13313
13318
|
const c = e.geometry, f = c.index, d = c.attributes.position, p = t.index, u = t.attributes.position, m = Ve(s, a), g = Ke(l, r);
|
|
13314
|
-
if (
|
|
13315
|
-
return _e(s, o, hi), hi.matrix.copy(
|
|
13319
|
+
if (Pn.copy(n).invert(), t.boundsTree)
|
|
13320
|
+
return _e(s, o, hi), hi.matrix.copy(Pn), hi.needsUpdate = !0, t.boundsTree.shapecast({
|
|
13316
13321
|
intersectsBounds: (_) => hi.intersectsBox(_),
|
|
13317
13322
|
intersectsTriangle: (_) => {
|
|
13318
13323
|
_.a.applyMatrix4(n), _.b.applyMatrix4(n), _.c.applyMatrix4(n), _.needsUpdate = !0;
|
|
@@ -13325,8 +13330,8 @@ function Ks(s, e, t, n, i = null) {
|
|
|
13325
13330
|
{
|
|
13326
13331
|
const y = Qt(t);
|
|
13327
13332
|
for (let _ = m * 3, w = (g + m) * 3; _ < w; _ += 3) {
|
|
13328
|
-
ve(nn, _, f, d), nn.a.applyMatrix4(
|
|
13329
|
-
for (let x = 0,
|
|
13333
|
+
ve(nn, _, f, d), nn.a.applyMatrix4(Pn), nn.b.applyMatrix4(Pn), nn.c.applyMatrix4(Pn), nn.needsUpdate = !0;
|
|
13334
|
+
for (let x = 0, b = y * 3; x < b; x += 3)
|
|
13330
13335
|
if (ve(sn, x, p, u), sn.needsUpdate = !0, nn.intersectsTriangle(sn))
|
|
13331
13336
|
return !0;
|
|
13332
13337
|
}
|
|
@@ -13336,29 +13341,29 @@ function Ks(s, e, t, n, i = null) {
|
|
|
13336
13341
|
return _e(c, o, ci), !!(i.intersectsBox(ci) && Ks(c, e, t, n, i) || (_e(f, o, ci), i.intersectsBox(ci) && Ks(f, e, t, n, i)));
|
|
13337
13342
|
}
|
|
13338
13343
|
}
|
|
13339
|
-
const ui = /* @__PURE__ */ new Me(), ds = /* @__PURE__ */ new Ie(),
|
|
13344
|
+
const ui = /* @__PURE__ */ new Me(), ds = /* @__PURE__ */ new Ie(), Dn = /* @__PURE__ */ new Ie(), Xf = /* @__PURE__ */ new Z(), qf = /* @__PURE__ */ new Z(), Kf = /* @__PURE__ */ new Z(), Zf = /* @__PURE__ */ new Z();
|
|
13340
13345
|
function Yf(s, e, t, n = {}, i = {}, o = 0, r = 1 / 0) {
|
|
13341
13346
|
e.boundingBox || e.computeBoundingBox(), ds.set(e.boundingBox.min, e.boundingBox.max, t), ds.needsUpdate = !0;
|
|
13342
13347
|
const a = s.geometry, l = a.attributes.position, h = a.index, c = e.attributes.position, f = e.index, d = qe.getPrimitive(), p = qe.getPrimitive();
|
|
13343
13348
|
let u = Xf, m = qf, g = null, y = null;
|
|
13344
13349
|
i && (g = Kf, y = Zf);
|
|
13345
13350
|
let _ = 1 / 0, w = null, x = null;
|
|
13346
|
-
return ui.copy(t).invert(),
|
|
13351
|
+
return ui.copy(t).invert(), Dn.matrix.copy(ui), s.shapecast(
|
|
13347
13352
|
{
|
|
13348
|
-
boundsTraverseOrder: (
|
|
13349
|
-
intersectsBounds: (
|
|
13350
|
-
intersectsRange: (
|
|
13353
|
+
boundsTraverseOrder: (b) => ds.distanceToBox(b),
|
|
13354
|
+
intersectsBounds: (b, M, A) => A < _ && A < r ? (M && (Dn.min.copy(b.min), Dn.max.copy(b.max), Dn.needsUpdate = !0), !0) : !1,
|
|
13355
|
+
intersectsRange: (b, M) => {
|
|
13351
13356
|
if (e.boundsTree)
|
|
13352
13357
|
return e.boundsTree.shapecast({
|
|
13353
|
-
boundsTraverseOrder: (C) =>
|
|
13358
|
+
boundsTraverseOrder: (C) => Dn.distanceToBox(C),
|
|
13354
13359
|
intersectsBounds: (C, P, D) => D < _ && D < r,
|
|
13355
13360
|
intersectsRange: (C, P) => {
|
|
13356
13361
|
for (let D = C, B = C + P; D < B; D++) {
|
|
13357
13362
|
ve(p, 3 * D, f, c), p.a.applyMatrix4(t), p.b.applyMatrix4(t), p.c.applyMatrix4(t), p.needsUpdate = !0;
|
|
13358
|
-
for (let T =
|
|
13363
|
+
for (let T = b, R = b + M; T < R; T++) {
|
|
13359
13364
|
ve(d, 3 * T, h, l), d.needsUpdate = !0;
|
|
13360
|
-
const
|
|
13361
|
-
if (
|
|
13365
|
+
const v = d.distanceToTriangle(p, u, g);
|
|
13366
|
+
if (v < _ && (m.copy(u), y && y.copy(g), _ = v, w = T, x = D), v < o)
|
|
13362
13367
|
return !0;
|
|
13363
13368
|
}
|
|
13364
13369
|
}
|
|
@@ -13368,7 +13373,7 @@ function Yf(s, e, t, n = {}, i = {}, o = 0, r = 1 / 0) {
|
|
|
13368
13373
|
const A = Qt(e);
|
|
13369
13374
|
for (let C = 0, P = A; C < P; C++) {
|
|
13370
13375
|
ve(p, 3 * C, f, c), p.a.applyMatrix4(t), p.b.applyMatrix4(t), p.c.applyMatrix4(t), p.needsUpdate = !0;
|
|
13371
|
-
for (let D =
|
|
13376
|
+
for (let D = b, B = b + M; D < B; D++) {
|
|
13372
13377
|
ve(d, 3 * D, h, l), d.needsUpdate = !0;
|
|
13373
13378
|
const T = d.distanceToTriangle(p, u, g);
|
|
13374
13379
|
if (T < _ && (m.copy(u), y && y.copy(g), _ = T, w = D, x = C), T < o)
|
|
@@ -13391,17 +13396,17 @@ function $f(s, e = null) {
|
|
|
13391
13396
|
const m = d * 2;
|
|
13392
13397
|
if (Ae(m, a)) {
|
|
13393
13398
|
const g = r[d + 6], y = a[m + 14];
|
|
13394
|
-
let _ = 1 / 0, w = 1 / 0, x = 1 / 0,
|
|
13399
|
+
let _ = 1 / 0, w = 1 / 0, x = 1 / 0, b = -1 / 0, M = -1 / 0, A = -1 / 0;
|
|
13395
13400
|
for (let C = g, P = g + y; C < P; C++) {
|
|
13396
13401
|
const D = 3 * s.resolveTriangleIndex(C);
|
|
13397
13402
|
for (let B = 0; B < 3; B++) {
|
|
13398
13403
|
let T = D + B;
|
|
13399
13404
|
T = n ? n[T] : T;
|
|
13400
|
-
const R = i.getX(T),
|
|
13401
|
-
R < _ && (_ = R), R >
|
|
13405
|
+
const R = i.getX(T), v = i.getY(T), I = i.getZ(T);
|
|
13406
|
+
R < _ && (_ = R), R > b && (b = R), v < w && (w = v), v > M && (M = v), I < x && (x = I), I > A && (A = I);
|
|
13402
13407
|
}
|
|
13403
13408
|
}
|
|
13404
|
-
return l[d + 0] !== _ || l[d + 1] !== w || l[d + 2] !== x || l[d + 3] !==
|
|
13409
|
+
return l[d + 0] !== _ || l[d + 1] !== w || l[d + 2] !== x || l[d + 3] !== b || l[d + 4] !== M || l[d + 5] !== A ? (l[d + 0] = _, l[d + 1] = w, l[d + 2] = x, l[d + 3] = b, l[d + 4] = M, l[d + 5] = A, !0) : !1;
|
|
13405
13410
|
} else {
|
|
13406
13411
|
const g = Ce(d), y = Pe(d, r);
|
|
13407
13412
|
let _ = u, w = !1, x = !1;
|
|
@@ -13412,16 +13417,16 @@ function $f(s, e = null) {
|
|
|
13412
13417
|
}
|
|
13413
13418
|
} else
|
|
13414
13419
|
w = !0, x = !0;
|
|
13415
|
-
const
|
|
13420
|
+
const b = _ || w, M = _ || x;
|
|
13416
13421
|
let A = !1;
|
|
13417
|
-
|
|
13422
|
+
b && (A = f(g, p, _));
|
|
13418
13423
|
let C = !1;
|
|
13419
13424
|
M && (C = f(y, p, _));
|
|
13420
13425
|
const P = A || C;
|
|
13421
13426
|
if (P)
|
|
13422
13427
|
for (let D = 0; D < 3; D++) {
|
|
13423
|
-
const B = g + D, T = y + D, R = l[B],
|
|
13424
|
-
l[d + D] = R < I ? R : I, l[d + D + 3] =
|
|
13428
|
+
const B = g + D, T = y + D, R = l[B], v = l[B + 3], I = l[T], q = l[T + 3];
|
|
13429
|
+
l[d + D] = R < I ? R : I, l[d + D + 3] = v > q ? v : q;
|
|
13425
13430
|
}
|
|
13426
13431
|
return P;
|
|
13427
13432
|
}
|
|
@@ -13460,10 +13465,10 @@ function Ys(s, e, t, n, i, o) {
|
|
|
13460
13465
|
u ? (m = Ce(s), g = Pe(s, l)) : (m = Pe(s, l), g = Ce(s));
|
|
13461
13466
|
const _ = Rt(m, r, n, i, o) ? Ys(m, e, t, n, i, o) : null;
|
|
13462
13467
|
if (_) {
|
|
13463
|
-
const
|
|
13464
|
-
if (u ?
|
|
13468
|
+
const b = _.point[d];
|
|
13469
|
+
if (u ? b <= r[g + f] : (
|
|
13465
13470
|
// min bounding data
|
|
13466
|
-
|
|
13471
|
+
b >= r[g + f + 3]
|
|
13467
13472
|
))
|
|
13468
13473
|
return _;
|
|
13469
13474
|
}
|
|
@@ -13471,7 +13476,7 @@ function Ys(s, e, t, n, i, o) {
|
|
|
13471
13476
|
return _ && x ? _.distance <= x.distance ? _ : x : _ || x || null;
|
|
13472
13477
|
}
|
|
13473
13478
|
}
|
|
13474
|
-
const fi = /* @__PURE__ */ new nt(), rn = /* @__PURE__ */ new Ye(), on = /* @__PURE__ */ new Ye(),
|
|
13479
|
+
const fi = /* @__PURE__ */ new nt(), rn = /* @__PURE__ */ new Ye(), on = /* @__PURE__ */ new Ye(), kn = /* @__PURE__ */ new Me(), ho = /* @__PURE__ */ new Ie(), di = /* @__PURE__ */ new Ie();
|
|
13475
13480
|
function td(s, e, t, n) {
|
|
13476
13481
|
ge.setBuffer(s._roots[e]);
|
|
13477
13482
|
const i = $s(0, s, t, n);
|
|
@@ -13482,8 +13487,8 @@ function $s(s, e, t, n, i = null) {
|
|
|
13482
13487
|
let l = s * 2;
|
|
13483
13488
|
if (i === null && (t.boundingBox || t.computeBoundingBox(), ho.set(t.boundingBox.min, t.boundingBox.max, n), i = ho), Ae(l, r)) {
|
|
13484
13489
|
const c = e.geometry, f = c.index, d = c.attributes.position, p = t.index, u = t.attributes.position, m = Ve(s, a), g = Ke(l, r);
|
|
13485
|
-
if (
|
|
13486
|
-
return _e(s, o, di), di.matrix.copy(
|
|
13490
|
+
if (kn.copy(n).invert(), t.boundsTree)
|
|
13491
|
+
return _e(s, o, di), di.matrix.copy(kn), di.needsUpdate = !0, t.boundsTree.shapecast({
|
|
13487
13492
|
intersectsBounds: (_) => di.intersectsBox(_),
|
|
13488
13493
|
intersectsTriangle: (_) => {
|
|
13489
13494
|
_.a.applyMatrix4(n), _.b.applyMatrix4(n), _.c.applyMatrix4(n), _.needsUpdate = !0;
|
|
@@ -13497,9 +13502,9 @@ function $s(s, e, t, n, i = null) {
|
|
|
13497
13502
|
const y = Qt(t);
|
|
13498
13503
|
for (let _ = m, w = g + m; _ < w; _++) {
|
|
13499
13504
|
const x = e.resolveTriangleIndex(_);
|
|
13500
|
-
ve(rn, 3 * x, f, d), rn.a.applyMatrix4(
|
|
13501
|
-
for (let
|
|
13502
|
-
if (ve(on,
|
|
13505
|
+
ve(rn, 3 * x, f, d), rn.a.applyMatrix4(kn), rn.b.applyMatrix4(kn), rn.c.applyMatrix4(kn), rn.needsUpdate = !0;
|
|
13506
|
+
for (let b = 0, M = y * 3; b < M; b += 3)
|
|
13507
|
+
if (ve(on, b, p, u), on.needsUpdate = !0, rn.intersectsTriangle(on))
|
|
13503
13508
|
return !0;
|
|
13504
13509
|
}
|
|
13505
13510
|
}
|
|
@@ -13508,28 +13513,28 @@ function $s(s, e, t, n, i = null) {
|
|
|
13508
13513
|
return _e(c, o, fi), !!(i.intersectsBox(fi) && $s(c, e, t, n, i) || (_e(f, o, fi), i.intersectsBox(fi) && $s(f, e, t, n, i)));
|
|
13509
13514
|
}
|
|
13510
13515
|
}
|
|
13511
|
-
const pi = /* @__PURE__ */ new Me(), ps = /* @__PURE__ */ new Ie(),
|
|
13516
|
+
const pi = /* @__PURE__ */ new Me(), ps = /* @__PURE__ */ new Ie(), Rn = /* @__PURE__ */ new Ie(), nd = /* @__PURE__ */ new Z(), id = /* @__PURE__ */ new Z(), sd = /* @__PURE__ */ new Z(), rd = /* @__PURE__ */ new Z();
|
|
13512
13517
|
function od(s, e, t, n = {}, i = {}, o = 0, r = 1 / 0) {
|
|
13513
13518
|
e.boundingBox || e.computeBoundingBox(), ps.set(e.boundingBox.min, e.boundingBox.max, t), ps.needsUpdate = !0;
|
|
13514
13519
|
const a = s.geometry, l = a.attributes.position, h = a.index, c = e.attributes.position, f = e.index, d = qe.getPrimitive(), p = qe.getPrimitive();
|
|
13515
13520
|
let u = nd, m = id, g = null, y = null;
|
|
13516
13521
|
i && (g = sd, y = rd);
|
|
13517
13522
|
let _ = 1 / 0, w = null, x = null;
|
|
13518
|
-
return pi.copy(t).invert(),
|
|
13523
|
+
return pi.copy(t).invert(), Rn.matrix.copy(pi), s.shapecast(
|
|
13519
13524
|
{
|
|
13520
|
-
boundsTraverseOrder: (
|
|
13521
|
-
intersectsBounds: (
|
|
13522
|
-
intersectsRange: (
|
|
13525
|
+
boundsTraverseOrder: (b) => ps.distanceToBox(b),
|
|
13526
|
+
intersectsBounds: (b, M, A) => A < _ && A < r ? (M && (Rn.min.copy(b.min), Rn.max.copy(b.max), Rn.needsUpdate = !0), !0) : !1,
|
|
13527
|
+
intersectsRange: (b, M) => {
|
|
13523
13528
|
if (e.boundsTree) {
|
|
13524
13529
|
const A = e.boundsTree;
|
|
13525
13530
|
return A.shapecast({
|
|
13526
|
-
boundsTraverseOrder: (C) =>
|
|
13531
|
+
boundsTraverseOrder: (C) => Rn.distanceToBox(C),
|
|
13527
13532
|
intersectsBounds: (C, P, D) => D < _ && D < r,
|
|
13528
13533
|
intersectsRange: (C, P) => {
|
|
13529
13534
|
for (let D = C, B = C + P; D < B; D++) {
|
|
13530
13535
|
const T = A.resolveTriangleIndex(D);
|
|
13531
13536
|
ve(p, 3 * T, f, c), p.a.applyMatrix4(t), p.b.applyMatrix4(t), p.c.applyMatrix4(t), p.needsUpdate = !0;
|
|
13532
|
-
for (let R =
|
|
13537
|
+
for (let R = b, v = b + M; R < v; R++) {
|
|
13533
13538
|
const I = s.resolveTriangleIndex(R);
|
|
13534
13539
|
ve(d, 3 * I, h, l), d.needsUpdate = !0;
|
|
13535
13540
|
const q = d.distanceToTriangle(p, u, g);
|
|
@@ -13543,7 +13548,7 @@ function od(s, e, t, n = {}, i = {}, o = 0, r = 1 / 0) {
|
|
|
13543
13548
|
const A = Qt(e);
|
|
13544
13549
|
for (let C = 0, P = A; C < P; C++) {
|
|
13545
13550
|
ve(p, 3 * C, f, c), p.a.applyMatrix4(t), p.b.applyMatrix4(t), p.c.applyMatrix4(t), p.needsUpdate = !0;
|
|
13546
|
-
for (let D =
|
|
13551
|
+
for (let D = b, B = b + M; D < B; D++) {
|
|
13547
13552
|
const T = s.resolveTriangleIndex(D);
|
|
13548
13553
|
ve(d, 3 * T, h, l), d.needsUpdate = !0;
|
|
13549
13554
|
const R = d.distanceToTriangle(p, u, g);
|
|
@@ -13559,7 +13564,7 @@ function od(s, e, t, n = {}, i = {}, o = 0, r = 1 / 0) {
|
|
|
13559
13564
|
function ad() {
|
|
13560
13565
|
return typeof SharedArrayBuffer < "u";
|
|
13561
13566
|
}
|
|
13562
|
-
const
|
|
13567
|
+
const zn = /* @__PURE__ */ new ge.constructor(), zi = /* @__PURE__ */ new ge.constructor(), Mt = /* @__PURE__ */ new ar(() => new nt()), an = /* @__PURE__ */ new nt(), ln = /* @__PURE__ */ new nt(), ms = /* @__PURE__ */ new nt(), gs = /* @__PURE__ */ new nt();
|
|
13563
13568
|
let ys = !1;
|
|
13564
13569
|
function ld(s, e, t, n) {
|
|
13565
13570
|
if (ys)
|
|
@@ -13569,9 +13574,9 @@ function ld(s, e, t, n) {
|
|
|
13569
13574
|
let r, a = 0, l = 0;
|
|
13570
13575
|
const h = new Me().copy(t).invert();
|
|
13571
13576
|
for (let c = 0, f = i.length; c < f; c++) {
|
|
13572
|
-
|
|
13577
|
+
zn.setBuffer(i[c]), l = 0;
|
|
13573
13578
|
const d = Mt.getPrimitive();
|
|
13574
|
-
_e(0,
|
|
13579
|
+
_e(0, zn.float32Array, d), d.applyMatrix4(h);
|
|
13575
13580
|
for (let p = 0, u = o.length; p < u && (zi.setBuffer(o[p]), r = Qe(
|
|
13576
13581
|
0,
|
|
13577
13582
|
0,
|
|
@@ -13585,17 +13590,17 @@ function ld(s, e, t, n) {
|
|
|
13585
13590
|
d
|
|
13586
13591
|
), zi.clearBuffer(), l += o[p].byteLength / Be, !r); p++)
|
|
13587
13592
|
;
|
|
13588
|
-
if (Mt.releasePrimitive(d),
|
|
13593
|
+
if (Mt.releasePrimitive(d), zn.clearBuffer(), a += i[c].byteLength / Be, r)
|
|
13589
13594
|
break;
|
|
13590
13595
|
}
|
|
13591
13596
|
return ys = !1, r;
|
|
13592
13597
|
}
|
|
13593
13598
|
function Qe(s, e, t, n, i, o = 0, r = 0, a = 0, l = 0, h = null, c = !1) {
|
|
13594
13599
|
let f, d;
|
|
13595
|
-
c ? (f = zi, d =
|
|
13596
|
-
const p = f.float32Array, u = f.uint32Array, m = f.uint16Array, g = d.float32Array, y = d.uint32Array, _ = d.uint16Array, w = s * 2, x = e * 2,
|
|
13600
|
+
c ? (f = zi, d = zn) : (f = zn, d = zi);
|
|
13601
|
+
const p = f.float32Array, u = f.uint32Array, m = f.uint16Array, g = d.float32Array, y = d.uint32Array, _ = d.uint16Array, w = s * 2, x = e * 2, b = Ae(w, m), M = Ae(x, _);
|
|
13597
13602
|
let A = !1;
|
|
13598
|
-
if (M &&
|
|
13603
|
+
if (M && b)
|
|
13599
13604
|
c ? A = i(
|
|
13600
13605
|
Ve(e, y),
|
|
13601
13606
|
Ke(e * 2, _),
|
|
@@ -13677,7 +13682,7 @@ function Qe(s, e, t, n, i, o = 0, r = 0, a = 0, l = 0, h = null, c = !1) {
|
|
|
13677
13682
|
c
|
|
13678
13683
|
);
|
|
13679
13684
|
else if (D)
|
|
13680
|
-
if (
|
|
13685
|
+
if (b)
|
|
13681
13686
|
A = Qe(
|
|
13682
13687
|
s,
|
|
13683
13688
|
C,
|
|
@@ -13694,8 +13699,8 @@ function Qe(s, e, t, n, i, o = 0, r = 0, a = 0, l = 0, h = null, c = !1) {
|
|
|
13694
13699
|
else {
|
|
13695
13700
|
const T = Mt.getPrimitive();
|
|
13696
13701
|
T.copy(ms).applyMatrix4(t);
|
|
13697
|
-
const R = Ce(s),
|
|
13698
|
-
_e(R, p, an), _e(
|
|
13702
|
+
const R = Ce(s), v = Pe(s, u);
|
|
13703
|
+
_e(R, p, an), _e(v, p, ln);
|
|
13699
13704
|
const I = T.intersectsBox(an), q = T.intersectsBox(ln);
|
|
13700
13705
|
A = I && Qe(
|
|
13701
13706
|
C,
|
|
@@ -13711,7 +13716,7 @@ function Qe(s, e, t, n, i, o = 0, r = 0, a = 0, l = 0, h = null, c = !1) {
|
|
|
13711
13716
|
!c
|
|
13712
13717
|
) || q && Qe(
|
|
13713
13718
|
C,
|
|
13714
|
-
|
|
13719
|
+
v,
|
|
13715
13720
|
n,
|
|
13716
13721
|
t,
|
|
13717
13722
|
i,
|
|
@@ -13724,7 +13729,7 @@ function Qe(s, e, t, n, i, o = 0, r = 0, a = 0, l = 0, h = null, c = !1) {
|
|
|
13724
13729
|
), Mt.releasePrimitive(T);
|
|
13725
13730
|
}
|
|
13726
13731
|
else if (B)
|
|
13727
|
-
if (
|
|
13732
|
+
if (b)
|
|
13728
13733
|
A = Qe(
|
|
13729
13734
|
s,
|
|
13730
13735
|
P,
|
|
@@ -13741,8 +13746,8 @@ function Qe(s, e, t, n, i, o = 0, r = 0, a = 0, l = 0, h = null, c = !1) {
|
|
|
13741
13746
|
else {
|
|
13742
13747
|
const T = Mt.getPrimitive();
|
|
13743
13748
|
T.copy(gs).applyMatrix4(t);
|
|
13744
|
-
const R = Ce(s),
|
|
13745
|
-
_e(R, p, an), _e(
|
|
13749
|
+
const R = Ce(s), v = Pe(s, u);
|
|
13750
|
+
_e(R, p, an), _e(v, p, ln);
|
|
13746
13751
|
const I = T.intersectsBox(an), q = T.intersectsBox(ln);
|
|
13747
13752
|
A = I && Qe(
|
|
13748
13753
|
P,
|
|
@@ -13758,7 +13763,7 @@ function Qe(s, e, t, n, i, o = 0, r = 0, a = 0, l = 0, h = null, c = !1) {
|
|
|
13758
13763
|
!c
|
|
13759
13764
|
) || q && Qe(
|
|
13760
13765
|
P,
|
|
13761
|
-
|
|
13766
|
+
v,
|
|
13762
13767
|
n,
|
|
13763
13768
|
t,
|
|
13764
13769
|
i,
|
|
@@ -13940,19 +13945,19 @@ class cr {
|
|
|
13940
13945
|
ve(c, u * 3, f, d);
|
|
13941
13946
|
};
|
|
13942
13947
|
if (o) {
|
|
13943
|
-
const u = (m, g, y, _, w, x,
|
|
13948
|
+
const u = (m, g, y, _, w, x, b, M) => {
|
|
13944
13949
|
for (let A = y, C = y + _; A < C; A++) {
|
|
13945
13950
|
p(A), c.a.applyMatrix4(t), c.b.applyMatrix4(t), c.c.applyMatrix4(t), c.needsUpdate = !0;
|
|
13946
13951
|
for (let P = m, D = m + g; P < D; P++)
|
|
13947
|
-
if (h(P), r.needsUpdate = !0, o(r, c, P, A, w, x,
|
|
13952
|
+
if (h(P), r.needsUpdate = !0, o(r, c, P, A, w, x, b, M))
|
|
13948
13953
|
return !0;
|
|
13949
13954
|
}
|
|
13950
13955
|
return !1;
|
|
13951
13956
|
};
|
|
13952
13957
|
if (i) {
|
|
13953
13958
|
const m = i;
|
|
13954
|
-
i = function(g, y, _, w, x,
|
|
13955
|
-
return m(g, y, _, w, x,
|
|
13959
|
+
i = function(g, y, _, w, x, b, M, A) {
|
|
13960
|
+
return m(g, y, _, w, x, b, M, A) ? !0 : u(g, y, _, w, x, b, M, A);
|
|
13956
13961
|
};
|
|
13957
13962
|
} else
|
|
13958
13963
|
i = u;
|
|
@@ -14193,7 +14198,7 @@ class Cd {
|
|
|
14193
14198
|
let m = this.data;
|
|
14194
14199
|
(!m || m.length < 3 * p) && (m = new Int32Array(3 * p)), m.fill(-1);
|
|
14195
14200
|
let g = 0, y = /* @__PURE__ */ new Set();
|
|
14196
|
-
for (let x = u,
|
|
14201
|
+
for (let x = u, b = d * 3 + u; x < b; x += 3) {
|
|
14197
14202
|
const M = x;
|
|
14198
14203
|
for (let A = 0; A < 3; A++) {
|
|
14199
14204
|
let C = M + A;
|
|
@@ -14213,18 +14218,18 @@ class Cd {
|
|
|
14213
14218
|
if (i) {
|
|
14214
14219
|
const {
|
|
14215
14220
|
fragmentMap: x,
|
|
14216
|
-
disjointConnectivityMap:
|
|
14221
|
+
disjointConnectivityMap: b
|
|
14217
14222
|
} = Ed(e, y, o);
|
|
14218
14223
|
y.clear(), x.forEach(({ forward: M, reverse: A }) => {
|
|
14219
14224
|
M.forEach(({ index: C }) => y.add(C)), A.forEach(({ index: C }) => y.add(C));
|
|
14220
|
-
}), this.unmatchedDisjointEdges = x, this.disjointConnections =
|
|
14225
|
+
}), this.unmatchedDisjointEdges = x, this.disjointConnections = b, g = d * 3 - y.size;
|
|
14221
14226
|
}
|
|
14222
14227
|
this.matchedEdges = g, this.unmatchedEdges = y.size, this.data = m;
|
|
14223
14228
|
function _(x) {
|
|
14224
14229
|
return xs.fromBufferAttribute(f, x), fo(xs);
|
|
14225
14230
|
}
|
|
14226
14231
|
function w(x) {
|
|
14227
|
-
let
|
|
14232
|
+
let b = "";
|
|
14228
14233
|
for (let M = 0, A = h.length; M < A; M++) {
|
|
14229
14234
|
const C = l[h[M]];
|
|
14230
14235
|
let P;
|
|
@@ -14242,9 +14247,9 @@ class Cd {
|
|
|
14242
14247
|
P = dd(Md.fromBufferAttribute(C, x));
|
|
14243
14248
|
break;
|
|
14244
14249
|
}
|
|
14245
|
-
|
|
14250
|
+
b !== "" && (b += "|"), b += P;
|
|
14246
14251
|
}
|
|
14247
|
-
return
|
|
14252
|
+
return b;
|
|
14248
14253
|
}
|
|
14249
14254
|
}
|
|
14250
14255
|
}
|
|
@@ -14292,7 +14297,7 @@ function Ct(s, e = Pd) {
|
|
|
14292
14297
|
const t = vs.angleTo(_o), n = vs.angleTo(wo), i = Math.PI - t - n;
|
|
14293
14298
|
return Math.abs(t) < e || Math.abs(n) < e || Math.abs(i) < e || s.a.distanceToSquared(s.b) < e || s.a.distanceToSquared(s.c) < e || s.b.distanceToSquared(s.c) < e;
|
|
14294
14299
|
}
|
|
14295
|
-
const Ss = 1e-10,
|
|
14300
|
+
const Ss = 1e-10, Ln = 1e-10, Dd = 1e-10, ut = new Ze(), xe = new Ze(), ft = new Z(), Ts = new Z(), xo = new Z(), yi = new Ui(), Es = new Ye();
|
|
14296
14301
|
class kd {
|
|
14297
14302
|
constructor() {
|
|
14298
14303
|
this._pool = [], this._index = 0;
|
|
@@ -14365,16 +14370,16 @@ class Rd {
|
|
|
14365
14370
|
const _ = (y + 1) % 3;
|
|
14366
14371
|
ut.start.copy(g[y]), ut.end.copy(g[_]);
|
|
14367
14372
|
const w = e.distanceToPoint(ut.start), x = e.distanceToPoint(ut.end);
|
|
14368
|
-
if (Math.abs(w) <
|
|
14373
|
+
if (Math.abs(w) < Ln && Math.abs(x) < Ln) {
|
|
14369
14374
|
p = !0;
|
|
14370
14375
|
break;
|
|
14371
14376
|
}
|
|
14372
|
-
if (w > 0 ? u.push(y) : m.push(y), Math.abs(w) <
|
|
14377
|
+
if (w > 0 ? u.push(y) : m.push(y), Math.abs(w) < Ln)
|
|
14373
14378
|
continue;
|
|
14374
|
-
let
|
|
14375
|
-
!
|
|
14379
|
+
let b = !!e.intersectLine(ut, ft);
|
|
14380
|
+
!b && Math.abs(x) < Ln && (ft.copy(ut.end), b = !0), b && !(ft.distanceTo(ut.start) < Ss) && (ft.distanceTo(ut.end) < Ss && (d = y), f === 0 ? xe.start.copy(ft) : xe.end.copy(ft), f++);
|
|
14376
14381
|
}
|
|
14377
|
-
if (!p && f === 2 && xe.distance() >
|
|
14382
|
+
if (!p && f === 2 && xe.distance() > Ln)
|
|
14378
14383
|
if (d !== -1) {
|
|
14379
14384
|
d = (d + 1) % 3;
|
|
14380
14385
|
let y = 0;
|
|
@@ -14389,8 +14394,8 @@ class Rd {
|
|
|
14389
14394
|
let M = xe.start;
|
|
14390
14395
|
xe.start = xe.end, xe.end = M;
|
|
14391
14396
|
}
|
|
14392
|
-
const _ = (y + 1) % 3, w = (y + 2) % 3, x = i.getTriangle(),
|
|
14393
|
-
g[_].distanceToSquared(xe.start) < g[w].distanceToSquared(xe.end) ? (x.a.copy(g[_]), x.b.copy(xe.start), x.c.copy(xe.end),
|
|
14397
|
+
const _ = (y + 1) % 3, w = (y + 2) % 3, x = i.getTriangle(), b = i.getTriangle();
|
|
14398
|
+
g[_].distanceToSquared(xe.start) < g[w].distanceToSquared(xe.end) ? (x.a.copy(g[_]), x.b.copy(xe.start), x.c.copy(xe.end), b.a.copy(g[_]), b.b.copy(g[w]), b.c.copy(xe.start)) : (x.a.copy(g[w]), x.b.copy(xe.start), x.c.copy(xe.end), b.a.copy(g[_]), b.b.copy(g[w]), b.c.copy(xe.end)), a.a.copy(g[y]), a.b.copy(xe.end), a.c.copy(xe.start), Ct(x) || n.push(x), Ct(b) || n.push(b), Ct(a) && (n.splice(o, 1), o--, r--);
|
|
14394
14399
|
}
|
|
14395
14400
|
else f === 3 && console.warn("TriangleClipper: Coplanar clip not handled");
|
|
14396
14401
|
}
|
|
@@ -14529,7 +14534,7 @@ class vo {
|
|
|
14529
14534
|
n[e] || (n[e] = [], i.push(e)), n[e].push(t);
|
|
14530
14535
|
}
|
|
14531
14536
|
}
|
|
14532
|
-
const Id = 0, zd = 1, Nd = 2, ka = 3, Od = 4, Ra = 5, La = 6, Xe = new Js(), So = new Me(), Le = new Oe(), dt = new Z(), To = new $t(), Eo = new $t(), Ao = new $t(), As = new $t(), _i = new $t(), wi = new $t(), Mo = new Ze(), Ms = new Z(), Cs = 1e-8, Ud = 1e-15, Ht = -1, Gt = 1, Ci = -2, Pi = 2,
|
|
14537
|
+
const Id = 0, zd = 1, Nd = 2, ka = 3, Od = 4, Ra = 5, La = 6, Xe = new Js(), So = new Me(), Le = new Oe(), dt = new Z(), To = new $t(), Eo = new $t(), Ao = new $t(), As = new $t(), _i = new $t(), wi = new $t(), Mo = new Ze(), Ms = new Z(), Cs = 1e-8, Ud = 1e-15, Ht = -1, Gt = 1, Ci = -2, Pi = 2, Nn = 0, Vt = 1, ur = 2, Fd = 1e-14;
|
|
14533
14538
|
let Di = null;
|
|
14534
14539
|
function Co(s) {
|
|
14535
14540
|
Di = s;
|
|
@@ -14597,7 +14602,7 @@ function Ia(s, e, t = !1) {
|
|
|
14597
14602
|
case zd:
|
|
14598
14603
|
if (t) {
|
|
14599
14604
|
if (e === Ht)
|
|
14600
|
-
return
|
|
14605
|
+
return Nn;
|
|
14601
14606
|
} else if (e === Gt || e === Ci)
|
|
14602
14607
|
return Vt;
|
|
14603
14608
|
break;
|
|
@@ -14606,11 +14611,11 @@ function Ia(s, e, t = !1) {
|
|
|
14606
14611
|
if (e === Gt || e === Ci)
|
|
14607
14612
|
return Vt;
|
|
14608
14613
|
} else if (e === Ht)
|
|
14609
|
-
return
|
|
14614
|
+
return Nn;
|
|
14610
14615
|
break;
|
|
14611
14616
|
case Od:
|
|
14612
14617
|
if (e === Ht)
|
|
14613
|
-
return
|
|
14618
|
+
return Nn;
|
|
14614
14619
|
if (e === Gt)
|
|
14615
14620
|
return Vt;
|
|
14616
14621
|
break;
|
|
@@ -14744,25 +14749,25 @@ function Do(s, e, t, n, i, o, r, a = 0) {
|
|
|
14744
14749
|
Dt.copy(e.matrixWorld).invert().multiply(s.matrixWorld), Oi.getNormalMatrix(s.matrixWorld).multiplyScalar(l ? -1 : 1);
|
|
14745
14750
|
const h = s.geometry.groupIndices, c = s.geometry.index, f = s.geometry.attributes.position, d = e.geometry.boundsTree, p = e.geometry.index, u = e.geometry.attributes.position, m = t.ids, g = t.intersectionSet;
|
|
14746
14751
|
for (let y = 0, _ = m.length; y < _; y++) {
|
|
14747
|
-
const w = m[y], x = a === -1 ? 0 : h[w] + a,
|
|
14752
|
+
const w = m[y], x = a === -1 ? 0 : h[w] + a, b = 3 * w, M = c.getX(b + 0), A = c.getX(b + 1), C = c.getX(b + 2);
|
|
14748
14753
|
jt.a.fromBufferAttribute(f, M).applyMatrix4(Dt), jt.b.fromBufferAttribute(f, A).applyMatrix4(Dt), jt.c.fromBufferAttribute(f, C).applyMatrix4(Dt), o.reset(), o.initialize(jt);
|
|
14749
14754
|
const P = g[w];
|
|
14750
14755
|
for (let B = 0, T = P.length; B < T; B++) {
|
|
14751
|
-
const R = 3 * P[B],
|
|
14752
|
-
xi.a.fromBufferAttribute(u,
|
|
14756
|
+
const R = 3 * P[B], v = p.getX(R + 0), I = p.getX(R + 1), q = p.getX(R + 2);
|
|
14757
|
+
xi.a.fromBufferAttribute(u, v), xi.b.fromBufferAttribute(u, I), xi.c.fromBufferAttribute(u, q), o.splitByTriangle(xi);
|
|
14753
14758
|
}
|
|
14754
14759
|
const D = o.triangles;
|
|
14755
14760
|
for (let B = 0, T = D.length; B < T; B++) {
|
|
14756
|
-
const R = D[B],
|
|
14761
|
+
const R = D[B], v = o.coplanarTriangleUsed ? Vd(R, d) : Ba(R, d);
|
|
14757
14762
|
tt.length = 0, Kt.length = 0;
|
|
14758
14763
|
for (let I = 0, q = n.length; I < q; I++) {
|
|
14759
|
-
const H = Ia(n[I],
|
|
14764
|
+
const H = Ia(n[I], v, i);
|
|
14760
14765
|
H !== ur && (Kt.push(H), tt.push(r[I].getGroupAttrSet(x)));
|
|
14761
14766
|
}
|
|
14762
14767
|
if (tt.length !== 0) {
|
|
14763
14768
|
jt.getBarycoord(R.a, bi.a), jt.getBarycoord(R.b, bi.b), jt.getBarycoord(R.c, bi.c);
|
|
14764
14769
|
for (let I = 0, q = tt.length; I < q; I++) {
|
|
14765
|
-
const H = tt[I], j = Kt[I] ===
|
|
14770
|
+
const H = tt[I], j = Kt[I] === Nn;
|
|
14766
14771
|
Hd(w, bi, s.geometry, s.matrixWorld, Oi, H, l !== j);
|
|
14767
14772
|
}
|
|
14768
14773
|
}
|
|
@@ -14779,8 +14784,8 @@ function ko(s, e, t, n, i, o, r = 0) {
|
|
|
14779
14784
|
for (; m.size > 0; ) {
|
|
14780
14785
|
const y = qd(m);
|
|
14781
14786
|
m.delete(y), p.push(y);
|
|
14782
|
-
const _ = 3 * y, w = c.getX(_ + 0), x = c.getX(_ + 1),
|
|
14783
|
-
At.a.fromBufferAttribute(d, w).applyMatrix4(Dt), At.b.fromBufferAttribute(d, x).applyMatrix4(Dt), At.c.fromBufferAttribute(d,
|
|
14787
|
+
const _ = 3 * y, w = c.getX(_ + 0), x = c.getX(_ + 1), b = c.getX(_ + 2);
|
|
14788
|
+
At.a.fromBufferAttribute(d, w).applyMatrix4(Dt), At.b.fromBufferAttribute(d, x).applyMatrix4(Dt), At.c.fromBufferAttribute(d, b).applyMatrix4(Dt);
|
|
14784
14789
|
const M = Ba(At, l);
|
|
14785
14790
|
Kt.length = 0, tt.length = 0;
|
|
14786
14791
|
for (let A = 0, C = n.length; A < C; A++) {
|
|
@@ -14796,8 +14801,8 @@ function ko(s, e, t, n, i, o, r = 0) {
|
|
|
14796
14801
|
if (tt.length !== 0) {
|
|
14797
14802
|
const C = 3 * A, P = c.getX(C + 0), D = c.getX(C + 1), B = c.getX(C + 2), T = r === -1 ? 0 : h[A] + r;
|
|
14798
14803
|
if (At.a.fromBufferAttribute(d, P), At.b.fromBufferAttribute(d, D), At.c.fromBufferAttribute(d, B), !Ct(At))
|
|
14799
|
-
for (let R = 0,
|
|
14800
|
-
const I = Kt[R], q = tt[R].getGroupAttrSet(T), H = I ===
|
|
14804
|
+
for (let R = 0, v = tt.length; R < v; R++) {
|
|
14805
|
+
const I = Kt[R], q = tt[R].getGroupAttrSet(T), H = I === Nn;
|
|
14801
14806
|
Gd(P, D, B, f, s.matrixWorld, Oi, q, H !== a);
|
|
14802
14807
|
}
|
|
14803
14808
|
}
|
|
@@ -14834,8 +14839,8 @@ function $d(s, e, t) {
|
|
|
14834
14839
|
(!p || p.array.length < h) && (p = new at(new c(h), f, d), s.setAttribute(l, p), n = !0);
|
|
14835
14840
|
let u = 0;
|
|
14836
14841
|
for (let m = 0, g = Math.min(t.length, e.groupCount); m < g; m++) {
|
|
14837
|
-
const y = t[m].index, { array: _, type: w, length: x } = e.groupAttributes[y][l],
|
|
14838
|
-
p.array.set(
|
|
14842
|
+
const y = t[m].index, { array: _, type: w, length: x } = e.groupAttributes[y][l], b = new w(_.buffer, 0, x);
|
|
14843
|
+
p.array.set(b, u), u += b.length;
|
|
14839
14844
|
}
|
|
14840
14845
|
p.needsUpdate = !0, i = h / p.itemSize;
|
|
14841
14846
|
}
|
|
@@ -14897,12 +14902,12 @@ class Jd {
|
|
|
14897
14902
|
}).sort((w, x) => w.materialIndex - x.materialIndex));
|
|
14898
14903
|
const _ = [];
|
|
14899
14904
|
for (let w = 0, x = y.length; w < x; w++) {
|
|
14900
|
-
let
|
|
14905
|
+
let b = !1;
|
|
14901
14906
|
for (let M = 0, A = g.length; M < A; M++) {
|
|
14902
14907
|
const C = g[M];
|
|
14903
|
-
C.materialIndex === w && (
|
|
14908
|
+
C.materialIndex === w && (b = !0, C.materialIndex = _.length);
|
|
14904
14909
|
}
|
|
14905
|
-
|
|
14910
|
+
b && _.push(y[w]);
|
|
14906
14911
|
}
|
|
14907
14912
|
i.forEach((w) => {
|
|
14908
14913
|
w.material = _;
|
|
@@ -15871,8 +15876,8 @@ class tp {
|
|
|
15871
15876
|
]);
|
|
15872
15877
|
let w = new E.LineBasicMaterial({ color: 255 }), x = new E.BufferGeometry();
|
|
15873
15878
|
x.setAttribute("position", new E.BufferAttribute(_, 3));
|
|
15874
|
-
let
|
|
15875
|
-
|
|
15879
|
+
let b = t.meshs.find((M) => M.name == d + "Line");
|
|
15880
|
+
b == null && (b = new E.Line(x, w), b.name = d + "Line", g.add(b), t.meshs.push(b)), b.geometry = x, b.material = w, d == "前" || d == "左" || d == "底" ? t.engine.sectionPlane.find((M) => M.name == d).setFromNormalAndCoplanarPoint(f.clone().setLength(-1), e.min) : t.engine.sectionPlane.find((M) => M.name == d).setFromNormalAndCoplanarPoint(f.clone().setLength(-1), e.max), t.engine.scene.children.filter((M) => M.type == "Mesh" && M.url).forEach((M) => {
|
|
15876
15881
|
M.material && Array.isArray(M.material) ? M.material.forEach((A) => {
|
|
15877
15882
|
A.clippingPlanes = t.engine.sectionPlane;
|
|
15878
15883
|
}) : M.material.clippingPlanes = t.engine.sectionPlane;
|
|
@@ -16169,7 +16174,10 @@ class lp {
|
|
|
16169
16174
|
options;
|
|
16170
16175
|
DeviceType;
|
|
16171
16176
|
animationId = null;
|
|
16177
|
+
isRenderingPaused = !1;
|
|
16178
|
+
controlsEnabledBeforePause = !0;
|
|
16172
16179
|
animate;
|
|
16180
|
+
onWindowResize;
|
|
16173
16181
|
// 基础模块
|
|
16174
16182
|
scene;
|
|
16175
16183
|
camera;
|
|
@@ -16205,19 +16213,76 @@ class lp {
|
|
|
16205
16213
|
modelEdge;
|
|
16206
16214
|
// 业务数据
|
|
16207
16215
|
models = [];
|
|
16216
|
+
reactBoundingClientRect = { left: 0, top: 0 };
|
|
16208
16217
|
// 引擎容器
|
|
16209
16218
|
container;
|
|
16210
16219
|
constructor(e) {
|
|
16211
16220
|
if (this.options = e, this.container = document.getElementById(e.containerId), !this.container)
|
|
16212
16221
|
throw new Error(`Container ${e.containerId} not found`);
|
|
16213
|
-
this.deviceModule = new Bl(this), this.DeviceType = this.deviceModule.getDeviceType(), this.cameraModule = new Ll(this), this.sceneModule = new Rl(this), this.scene = this.sceneModule.scene, this.renderModule = new Il(this), this.renderer = this.renderModule.createRenderer(), this.camera = this.cameraModule.orthographicCamera, this.scene.camera = this.camera, this.controlModule = new Yl(this), this.controlModule.switchDefaultMode(), this.controls = this.controlModule.orbitControls, this.composerModule = new uc(this), this.composerModule.init(), this.events = new zu(), this.engineStatus = new Iu(this), this.engineStatus.init(), this.loaderModule = new Bu(this), this.lightModule = new Nu(this), this.lightModule.init(), this.viewCube = new Zu(this), this.viewCube.init(), this.octreeBox = Yu(this), this.rangeScale = new $u(this), this.rangeScale.init(), this.clipping = new np(this), this.clipping.init(), this.setting = new Ju(this), this.setting.init(), this.handelBehaved = tr(this), this.modelMapperBatch = new op(this), this.measure = new lf(this), this.modelToolModule = new Uu(this), this.modelProperties = new rp(this), this.interactionModule = new Ou(this), this.interactionModule.init(), this.interactionModule.active(), this.modelEdge = new ap(this), this.modelTree = new ip(this), this.engineInfo = new sp(this), this.worldToScreen = new Ge(this.camera, this.renderer, this.scene), this.stats = new Hu(), this.stats.showPanel(0), this.stats.dom.style.position = "absolute", this.stats.dom.style.top = "0px", this.stats.dom.style.left = "0px", this.stats.dom.style.zIndex = "1000", this.container.appendChild(this.stats.dom);
|
|
16222
|
+
this.deviceModule = new Bl(this), this.DeviceType = this.deviceModule.getDeviceType(), this.cameraModule = new Ll(this), this.sceneModule = new Rl(this), this.scene = this.sceneModule.scene, this.renderModule = new Il(this), this.renderer = this.renderModule.createRenderer(), this.camera = this.cameraModule.orthographicCamera, this.scene.camera = this.camera, this.controlModule = new Yl(this), this.controlModule.switchDefaultMode(), this.controls = this.controlModule.orbitControls, this.composerModule = new uc(this), this.composerModule.init(), this.events = new zu(), this.engineStatus = new Iu(this), this.engineStatus.init(), this.loaderModule = new Bu(this), this.lightModule = new Nu(this), this.lightModule.init(), this.viewCube = new Zu(this), this.viewCube.init(), this.octreeBox = Yu(this), this.rangeScale = new $u(this), this.rangeScale.init(), this.clipping = new np(this), this.clipping.init(), this.setting = new Ju(this), this.setting.init(), this.handelBehaved = tr(this), this.modelMapperBatch = new op(this), this.measure = new lf(this), this.modelToolModule = new Uu(this), this.modelProperties = new rp(this), this.interactionModule = new Ou(this), this.interactionModule.init(), this.interactionModule.active(), this.modelEdge = new ap(this), this.modelTree = new ip(this), this.engineInfo = new sp(this), this.worldToScreen = new Ge(this.camera, this.renderer, this.scene), this.reactBoundingClientRect = this.container.getBoundingClientRect(), this.stats = new Hu(), this.stats.showPanel(0), this.stats.dom.style.position = "absolute", this.stats.dom.style.top = "0px", this.stats.dom.style.left = "0px", this.stats.dom.style.zIndex = "1000", this.container.appendChild(this.stats.dom);
|
|
16214
16223
|
let t = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
16215
16224
|
t.style.position = "absolute", t.style.width = "100%", t.style.height = "100%", t.style.zIndex = "1000", t.style.left = "0px", t.style.top = "0px", t.style.pointerEvents = "none";
|
|
16216
16225
|
const n = this.renderer?.domElement.width || 1920, i = this.renderer?.domElement.height || 1080;
|
|
16217
|
-
t.setAttribute("viewBox", `0 0 ${n} ${i}`), t.setAttribute("preserveAspectRatio", "none"), this.container.appendChild(t), this.catchSvg = t, this.
|
|
16218
|
-
this.
|
|
16226
|
+
t.setAttribute("viewBox", `0 0 ${n} ${i}`), t.setAttribute("preserveAspectRatio", "none"), this.container.appendChild(t), this.catchSvg = t, this.onWindowResize = () => {
|
|
16227
|
+
this.handleWindowResize();
|
|
16228
|
+
}, window.addEventListener("resize", this.onWindowResize), this.animate = () => {
|
|
16229
|
+
if (!this.isRenderingPaused)
|
|
16230
|
+
this.animationId = requestAnimationFrame(this.animate);
|
|
16231
|
+
else {
|
|
16232
|
+
this.animationId = null;
|
|
16233
|
+
return;
|
|
16234
|
+
}
|
|
16235
|
+
this.stats && this.stats.begin(), this.composerModule && this.composerModule.composer.render(), this.viewCube.cubeTool.RenderScene(), this.measure.update(), this.controlModule.update(), this.stats && this.stats.end();
|
|
16219
16236
|
}, this.animate();
|
|
16220
16237
|
}
|
|
16238
|
+
/**
|
|
16239
|
+
* 暂停渲染循环
|
|
16240
|
+
*/
|
|
16241
|
+
pauseRendering() {
|
|
16242
|
+
if (this.isRenderingPaused) {
|
|
16243
|
+
console.warn("[BimEngine] Rendering is already paused");
|
|
16244
|
+
return;
|
|
16245
|
+
}
|
|
16246
|
+
this.isRenderingPaused = !0, this.controls && (this.controlsEnabledBeforePause = this.controls.enabled, this.controls.enabled = !1);
|
|
16247
|
+
}
|
|
16248
|
+
/**
|
|
16249
|
+
* 恢复渲染循环
|
|
16250
|
+
*/
|
|
16251
|
+
resumeRendering() {
|
|
16252
|
+
if (!this.isRenderingPaused) {
|
|
16253
|
+
console.warn("[BimEngine] Rendering is not paused");
|
|
16254
|
+
return;
|
|
16255
|
+
}
|
|
16256
|
+
this.isRenderingPaused = !1, this.controls && (this.controls.enabled = this.controlsEnabledBeforePause), this.animationId === null && this.animate();
|
|
16257
|
+
}
|
|
16258
|
+
/**
|
|
16259
|
+
* 检查渲染是否暂停
|
|
16260
|
+
*/
|
|
16261
|
+
isRenderingPausedState() {
|
|
16262
|
+
return this.isRenderingPaused;
|
|
16263
|
+
}
|
|
16264
|
+
/**
|
|
16265
|
+
* 处理窗口大小变化
|
|
16266
|
+
*/
|
|
16267
|
+
handleWindowResize() {
|
|
16268
|
+
if (!this.container || !this.renderer || !this.camera)
|
|
16269
|
+
return;
|
|
16270
|
+
this.reactBoundingClientRect = this.container.getBoundingClientRect();
|
|
16271
|
+
const { width: e, height: t } = this.deviceModule.getContainerSize();
|
|
16272
|
+
this.renderer.setSize(e, t);
|
|
16273
|
+
const n = e / t;
|
|
16274
|
+
if (this.camera === this.cameraModule.perspectiveCamera ? (this.cameraModule.perspectiveCamera.aspect = n, this.cameraModule.perspectiveCamera.updateProjectionMatrix()) : this.camera === this.cameraModule.orthographicCamera && (this.cameraModule.orthographicCamera.left = 50 * n / -2, this.cameraModule.orthographicCamera.right = 50 * n / 2, this.cameraModule.orthographicCamera.top = 50 / 2, this.cameraModule.orthographicCamera.bottom = 50 / -2, this.cameraModule.orthographicCamera.updateProjectionMatrix()), this.composerModule && this.composerModule.composer && this.composerModule.composer.setSize(e, t), this.catchSvg) {
|
|
16275
|
+
const i = this.renderer.domElement.width, o = this.renderer.domElement.height;
|
|
16276
|
+
this.catchSvg.setAttribute("viewBox", `0 0 ${i} ${o}`);
|
|
16277
|
+
}
|
|
16278
|
+
this.events && this.events.trigger(wn.ViewportResize, { width: e, height: t });
|
|
16279
|
+
}
|
|
16280
|
+
/**
|
|
16281
|
+
* 销毁引擎,释放资源
|
|
16282
|
+
*/
|
|
16283
|
+
dispose() {
|
|
16284
|
+
window.removeEventListener("resize", this.onWindowResize), this.animationId !== null && (cancelAnimationFrame(this.animationId), this.animationId = null);
|
|
16285
|
+
}
|
|
16221
16286
|
}
|
|
16222
16287
|
function Cp(s) {
|
|
16223
16288
|
return new lp(s);
|