@jdultra/threedtiles 14.0.5 → 14.0.8

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.
@@ -1,5 +1,5 @@
1
1
  import * as P from "three";
2
- import { Matrix3 as EI, Vector3 as bA, Box3 as oC, Matrix4 as Tg, Ray as xe, BufferGeometry as $B, LineBasicMaterial as PE, LineSegments as VE, TrianglesDrawMode as Ke, TriangleFanDrawMode as qQ, TriangleStripDrawMode as zE, BufferAttribute as aI, Loader as nC, LoaderUtils as CB, FileLoader as lI, MeshPhysicalMaterial as Yg, Vector2 as sC, Color as tI, LinearSRGBColorSpace as Gg, SRGBColorSpace as Jg, SpotLight as je, PointLight as qe, DirectionalLight as ve, Quaternion as XE, InstancedMesh as Te, InstancedBufferAttribute as vQ, Object3D as ZE, TextureLoader as Oe, ImageBitmapLoader as We, InterleavedBuffer as Pe, InterleavedBufferAttribute as Ve, LinearMipmapLinearFilter as jB, NearestMipmapLinearFilter as ze, LinearMipmapNearestFilter as Xe, NearestMipmapNearestFilter as _E, LinearFilter as uI, NearestFilter as gg, RepeatWrapping as TQ, MirroredRepeatWrapping as Ze, ClampToEdgeWrapping as _e, PointsMaterial as $e, Material as nQ, MeshStandardMaterial as RC, DoubleSide as Ai, MeshBasicMaterial as IB, PropertyBinding as gi, SkinnedMesh as Ii, Mesh as OQ, Line as Bi, LineLoop as Qi, Points as Ci, Group as sQ, PerspectiveCamera as Ei, MathUtils as ai, OrthographicCamera as $E, Skeleton as ei, AnimationClip as ii, Bone as ti, InterpolateDiscrete as oi, InterpolateLinear as Aa, Texture as NC, VectorKeyframeTrack as kC, NumberKeyframeTrack as pC, QuaternionKeyframeTrack as UC, ColorManagement as qB, FrontSide as UB, Interpolant as ni, Sphere as si, CompressedCubeTexture as ri, CompressedArrayTexture as ci, CompressedTexture as mC, NoColorSpace as hi, RGBA_PVRTC_2BPPV1_Format as SC, RGBA_PVRTC_4BPPV1_Format as WQ, RGBA_BPTC_Format as PQ, RED_GREEN_RGTC2_Format as Di, SIGNED_RED_GREEN_RGTC2_Format as di, RED_RGTC1_Format as bi, SIGNED_RED_RGTC1_Format as wi, RGBA_S3TC_DXT3_Format as LC, RGB_S3TC_DXT1_Format as JC, RGBA_S3TC_DXT1_Format as VQ, RGBA_ASTC_6x6_Format as rQ, RGBA_ASTC_4x4_Format as mB, RGB_ETC2_Format as ga, RGBA_ETC2_EAC_Format as Ia, RGBFormat as zQ, RedFormat as BB, RGFormat as QB, RGBAFormat as YI, UnsignedByteType as GA, HalfFloatType as dI, UnsignedInt101111Type as Ba, UnsignedInt5999Type as Qa, FloatType as EB, DataTexture as XQ, Data3DTexture as ui, RGB_PVRTC_4BPPV1_Format as li, RGB_ETC1_Format as fi, RGBA_S3TC_DXT5_Format as Fi, RGB_BPTC_UNSIGNED_Format as yi, WebGL3DRenderTarget as uB, RGBAIntegerFormat as Ng, UnsignedIntType as kg, ShaderMaterial as cQ, NormalBlending as Mi, GLSL3 as hQ, InstancedBufferGeometry as YC, DynamicDrawUsage as HC, Scene as Gi, PlaneGeometry as Ri, DataUtils as xC } from "three";
2
+ import { Matrix3 as aI, Vector3 as bA, Box3 as oC, Matrix4 as Tg, Ray as xe, BufferGeometry as $B, LineBasicMaterial as PE, LineSegments as VE, TrianglesDrawMode as Ke, TriangleFanDrawMode as qQ, TriangleStripDrawMode as zE, BufferAttribute as eI, Loader as nC, LoaderUtils as CB, FileLoader as lI, MeshPhysicalMaterial as Yg, Vector2 as sC, Color as oI, LinearSRGBColorSpace as Gg, SRGBColorSpace as Jg, SpotLight as je, PointLight as qe, DirectionalLight as ve, Quaternion as XE, InstancedMesh as Te, InstancedBufferAttribute as vQ, Object3D as ZE, TextureLoader as Oe, ImageBitmapLoader as We, InterleavedBuffer as Pe, InterleavedBufferAttribute as Ve, LinearMipmapLinearFilter as jB, NearestMipmapLinearFilter as ze, LinearMipmapNearestFilter as Xe, NearestMipmapNearestFilter as _E, LinearFilter as uI, NearestFilter as gg, RepeatWrapping as TQ, MirroredRepeatWrapping as Ze, ClampToEdgeWrapping as _e, PointsMaterial as $e, Material as nQ, MeshStandardMaterial as RC, DoubleSide as Ai, MeshBasicMaterial as IB, PropertyBinding as gi, SkinnedMesh as Ii, Mesh as OQ, Line as Bi, LineLoop as Qi, Points as Ci, Group as sQ, PerspectiveCamera as Ei, MathUtils as ai, OrthographicCamera as $E, Skeleton as ei, AnimationClip as ii, Bone as ti, InterpolateDiscrete as oi, InterpolateLinear as Aa, Texture as NC, VectorKeyframeTrack as kC, NumberKeyframeTrack as pC, QuaternionKeyframeTrack as UC, ColorManagement as qB, FrontSide as UB, Interpolant as ni, Sphere as si, CompressedCubeTexture as ri, CompressedArrayTexture as ci, CompressedTexture as mC, NoColorSpace as hi, RGBA_PVRTC_2BPPV1_Format as SC, RGBA_PVRTC_4BPPV1_Format as WQ, RGBA_BPTC_Format as PQ, RED_GREEN_RGTC2_Format as Di, SIGNED_RED_GREEN_RGTC2_Format as di, RED_RGTC1_Format as bi, SIGNED_RED_RGTC1_Format as wi, RGBA_S3TC_DXT3_Format as LC, RGB_S3TC_DXT1_Format as JC, RGBA_S3TC_DXT1_Format as VQ, RGBA_ASTC_6x6_Format as rQ, RGBA_ASTC_4x4_Format as mB, RGB_ETC2_Format as ga, RGBA_ETC2_EAC_Format as Ia, RGBFormat as zQ, RedFormat as BB, RGFormat as QB, RGBAFormat as YI, UnsignedByteType as GA, HalfFloatType as dI, UnsignedInt101111Type as Ba, UnsignedInt5999Type as Qa, FloatType as EB, DataTexture as XQ, Data3DTexture as ui, RGB_PVRTC_4BPPV1_Format as li, RGB_ETC1_Format as fi, RGBA_S3TC_DXT5_Format as Fi, RGB_BPTC_UNSIGNED_Format as yi, WebGL3DRenderTarget as uB, RGBAIntegerFormat as Ng, UnsignedIntType as kg, ShaderMaterial as cQ, NormalBlending as Mi, GLSL3 as hQ, InstancedBufferGeometry as YC, DynamicDrawUsage as HC, Scene as Gi, PlaneGeometry as Ri, DataUtils as xC } from "three";
3
3
  class as {
4
4
  constructor() {
5
5
  this.cullMap = [], this.cullMaterial = new P.MeshBasicMaterial({ vertexColors: !0 }), this.cullMaterial.side = P.FrontSide, this.cullTarget = this._createCullTarget(), this.cullPixels = new Uint8Array(4 * this.cullTarget.width * this.cullTarget.height);
@@ -23,14 +23,14 @@ class as {
23
23
  return this.cullMap[A];
24
24
  }
25
25
  }
26
- const hg = new EI(), UA = new bA(), KC = new bA(), jC = new oC();
26
+ const hg = new aI(), UA = new bA(), KC = new bA(), jC = new oC();
27
27
  new Tg(), new Tg();
28
28
  const DQ = new xe();
29
29
  class lg {
30
30
  constructor(A) {
31
31
  this.isOBB = !0, this.center = new bA(A[0], A[1], A[2]), this.e1 = new bA(A[3], A[4], A[5]), this.e2 = new bA(A[6], A[7], A[8]), this.e3 = new bA(A[9], A[10], A[11]), this.halfSize = new bA(this.e1.length(), this.e2.length(), this.e3.length()), this.e1.normalize();
32
32
  const g = this.e2.dot(this.e1);
33
- this.e2.addScaledVector(this.e1, -g).normalize(), this.e3.copy(this.e1).cross(this.e2), this.e3.lengthSq() === 0 ? (this.e2.set(0, 1, 0), Math.abs(this.e1.y) > 0.999 && this.e2.set(1, 0, 0), this.e2.addScaledVector(this.e1, -this.e2.dot(this.e1)).normalize(), this.e3.copy(this.e1).cross(this.e2)) : this.e3.normalize(), this.rotationMatrix = new EI(), this.rotationMatrix.set(this.e1.x, this.e2.x, this.e3.x, this.e1.y, this.e2.y, this.e3.y, this.e1.z, this.e2.z, this.e3.z);
33
+ this.e2.addScaledVector(this.e1, -g).normalize(), this.e3.copy(this.e1).cross(this.e2), this.e3.lengthSq() === 0 ? (this.e2.set(0, 1, 0), Math.abs(this.e1.y) > 0.999 && this.e2.set(1, 0, 0), this.e2.addScaledVector(this.e1, -this.e2.dot(this.e1)).normalize(), this.e3.copy(this.e1).cross(this.e2)) : this.e3.normalize(), this.rotationMatrix = new aI(), this.rotationMatrix.set(this.e1.x, this.e2.x, this.e3.x, this.e1.y, this.e2.y, this.e3.y, this.e1.z, this.e2.z, this.e3.z);
34
34
  }
35
35
  copy(A) {
36
36
  this.center.copy(A.center), this.rotationMatrix.copy(A.rotationMatrix), this.halfSize.copy(A.halfSize), this.e1.copy(A.e1), this.e2.copy(A.e2), this.e3.copy(A.e3);
@@ -287,7 +287,7 @@ function qC(B) {
287
287
  if (Q === -1 && (Q = e.gpuType), Q !== e.gpuType) return console.error("THREE.BufferGeometryUtils: .mergeAttributes() failed. BufferAttribute.gpuType must be consistent across matching attributes."), null;
288
288
  C += e.count * g;
289
289
  }
290
- const E = new A(C), a = new aI(E, g, I);
290
+ const E = new A(C), a = new eI(E, g, I);
291
291
  let i = 0;
292
292
  for (let t = 0; t < B.length; ++t) {
293
293
  const e = B[t];
@@ -648,7 +648,7 @@ async function pi(B = {}) {
648
648
  if (w.L.P.fa) throw new sA(`Cannot convert argument of type ${w.L.P.name} to parameter type ${this.name}`);
649
649
  return VA(w.L.O, w.L.P.M, this.M);
650
650
  }
651
- var oI = (u, w, F) => w === F ? u : F.U === void 0 || (u = oI(u, w, F.U)) === null ? null : F.pa(u), IQ = {}, yI = (u, w) => {
651
+ var nI = (u, w, F) => w === F ? u : F.U === void 0 || (u = nI(u, w, F.U)) === null ? null : F.pa(u), IQ = {}, yI = (u, w) => {
652
652
  if (!w.P || !w.O) throw new jA("makeClassHandle requires ptr and ptrType");
653
653
  if (!!w.W != !!w.S) throw new jA("Both smartPtrType and smartPtr must be specified");
654
654
  return w.count = { value: 1 }, V(Object.create(u, { L: { value: w, writable: !0 } }));
@@ -810,7 +810,7 @@ return ret;
810
810
  if (F = w + F, f) return F;
811
811
  for (; u[w] && !(w >= F); ) ++w;
812
812
  return w;
813
- }, nI = new TextDecoder("utf-16le"), rA = (u, w, F) => (u >>= 1, nI.decode(b.subarray(u, ZI(b, u, w / 2, F)))), rg = (u, w, F) => {
813
+ }, sI = new TextDecoder("utf-16le"), rA = (u, w, F) => (u >>= 1, sI.decode(b.subarray(u, ZI(b, u, w / 2, F)))), rg = (u, w, F) => {
814
814
  if (F ?? (F = 2147483647), 2 > F) return 0;
815
815
  var f = w;
816
816
  F = (F -= 2) < 2 * u.length ? F / 2 : u.length;
@@ -825,7 +825,7 @@ return ret;
825
825
  f += String.fromCodePoint(q);
826
826
  }
827
827
  return f;
828
- }, sI = (u, w, F) => {
828
+ }, rI = (u, w, F) => {
829
829
  if (F ?? (F = 2147483647), 4 > F) return 0;
830
830
  var f = w;
831
831
  F = f + F - 4;
@@ -899,7 +899,7 @@ return ret;
899
899
  if (f !== void 0) return f.L.count.value === 0 ? (f.L.O = F, f.L.S = u, f.clone()) : (f = f.clone(), this.ka(u), f);
900
900
  if (f = this.M.ra(F), !(f = W[f])) return w.call(this);
901
901
  f = this.fa ? f.oa : f.pointerType;
902
- var m = oI(F, this.M, f.M);
902
+ var m = nI(F, this.M, f.M);
903
903
  return m === null ? w.call(this) : this.ga ? yI(f.M.$, { P: f, O: m, W: this, S: u }) : yI(f.M.$, { P: f, O: m });
904
904
  } }), I.print && (L = I.print), I.printErr && (U = I.printErr), I.wasmBinary && (s = I.wasmBinary), I.thisProgram && (t = I.thisProgram);
905
905
  var MC, tQ, Xg, He = { x: () => oA(""), q: (u) => {
@@ -1032,7 +1032,7 @@ return ret;
1032
1032
  } });
1033
1033
  }, f: (u, w, F) => {
1034
1034
  if (F = TA(F), w === 2) var f = rA, m = rg, q = _I;
1035
- else f = Vg, m = sI, q = aQ;
1035
+ else f = Vg, m = rI, q = aQ;
1036
1036
  N(u, { name: F, N: (H) => {
1037
1037
  var O = f(H + 4, R[H >> 2] * w, !0);
1038
1038
  return Xg(H), O;
@@ -2371,7 +2371,7 @@ class xi {
2371
2371
  if (Q) return Q;
2372
2372
  const C = g.json, E = ((C.extensions && C.extensions[this.name] || {}).lights || [])[A];
2373
2373
  let a;
2374
- const i = new tI(16777215);
2374
+ const i = new oI(16777215);
2375
2375
  E.color !== void 0 && i.setRGB(E.color[0], E.color[1], E.color[2], Gg);
2376
2376
  const t = E.range !== void 0 ? E.range : 0;
2377
2377
  switch (E.type) {
@@ -2408,7 +2408,7 @@ class Ki {
2408
2408
  }
2409
2409
  extendParams(A, g, I) {
2410
2410
  const Q = [];
2411
- A.color = new tI(1, 1, 1), A.opacity = 1;
2411
+ A.color = new oI(1, 1, 1), A.opacity = 1;
2412
2412
  const C = g.pbrMetallicRoughness;
2413
2413
  if (C) {
2414
2414
  if (Array.isArray(C.baseColorFactor)) {
@@ -2492,7 +2492,7 @@ class Oi {
2492
2492
  const I = this.parser, Q = I.json.materials[A];
2493
2493
  if (!Q.extensions || !Q.extensions[this.name]) return Promise.resolve();
2494
2494
  const C = [];
2495
- g.sheenColor = new tI(0, 0, 0), g.sheenRoughness = 0, g.sheen = 1;
2495
+ g.sheenColor = new oI(0, 0, 0), g.sheenRoughness = 0, g.sheen = 1;
2496
2496
  const E = Q.extensions[this.name];
2497
2497
  if (E.sheenColorFactor !== void 0) {
2498
2498
  const a = E.sheenColorFactor;
@@ -2530,7 +2530,7 @@ class Pi {
2530
2530
  const C = [], E = Q.extensions[this.name];
2531
2531
  g.thickness = E.thicknessFactor !== void 0 ? E.thicknessFactor : 0, E.thicknessTexture !== void 0 && C.push(I.assignTexture(g, "thicknessMap", E.thicknessTexture)), g.attenuationDistance = E.attenuationDistance || 1 / 0;
2532
2532
  const a = E.attenuationColor || [1, 1, 1];
2533
- return g.attenuationColor = new tI().setRGB(a[0], a[1], a[2], Gg), Promise.all(C);
2533
+ return g.attenuationColor = new oI().setRGB(a[0], a[1], a[2], Gg), Promise.all(C);
2534
2534
  }
2535
2535
  }
2536
2536
  class Vi {
@@ -2562,7 +2562,7 @@ class zi {
2562
2562
  const C = [], E = Q.extensions[this.name];
2563
2563
  g.specularIntensity = E.specularFactor !== void 0 ? E.specularFactor : 1, E.specularTexture !== void 0 && C.push(I.assignTexture(g, "specularIntensityMap", E.specularTexture));
2564
2564
  const a = E.specularColorFactor || [1, 1, 1];
2565
- return g.specularColor = new tI().setRGB(a[0], a[1], a[2], Gg), E.specularColorTexture !== void 0 && C.push(I.assignTexture(g, "specularColorMap", E.specularColorTexture, Jg)), Promise.all(C);
2565
+ return g.specularColor = new oI().setRGB(a[0], a[1], a[2], Gg), E.specularColorTexture !== void 0 && C.push(I.assignTexture(g, "specularColorMap", E.specularColorTexture, Jg)), Promise.all(C);
2566
2566
  }
2567
2567
  }
2568
2568
  class Xi {
@@ -2788,7 +2788,7 @@ class tt extends oa {
2788
2788
  }
2789
2789
  }
2790
2790
  const wg = { POINTS: 0, LINES: 1, LINE_LOOP: 2, LINE_STRIP: 3, TRIANGLES: 4, TRIANGLE_STRIP: 5, TRIANGLE_FAN: 6 }, KI = { 5120: Int8Array, 5121: Uint8Array, 5122: Int16Array, 5123: Uint16Array, 5125: Uint32Array, 5126: Float32Array }, OC = { 9728: gg, 9729: uI, 9984: _E, 9985: Xe, 9986: ze, 9987: jB }, WC = { 33071: _e, 33648: Ze, 10497: TQ }, dQ = { SCALAR: 1, VEC2: 2, VEC3: 3, VEC4: 4, MAT2: 4, MAT3: 9, MAT4: 16 }, ZQ = { POSITION: "position", NORMAL: "normal", TANGENT: "tangent", TEXCOORD_0: "uv", TEXCOORD_1: "uv1", TEXCOORD_2: "uv2", TEXCOORD_3: "uv3", COLOR_0: "color", WEIGHTS_0: "skinWeight", JOINTS_0: "skinIndex" }, _g = { scale: "scale", translation: "position", rotation: "quaternion", weights: "morphTargetInfluences" }, ot = { CUBICSPLINE: void 0, LINEAR: Aa, STEP: oi }, nt = "OPAQUE", st = "MASK", rt = "BLEND";
2791
- function rI(B, A, g) {
2791
+ function cI(B, A, g) {
2792
2792
  for (const I in g.extensions) B[I] === void 0 && (A.userData.gltfExtensions = A.userData.gltfExtensions || {}, A.userData.gltfExtensions[I] = g.extensions[I]);
2793
2793
  }
2794
2794
  function pg(B, A) {
@@ -2859,7 +2859,7 @@ class dt {
2859
2859
  return Promise.all([I.getDependencies("scene"), I.getDependencies("animation"), I.getDependencies("camera")]);
2860
2860
  }).then(function(E) {
2861
2861
  const a = { scene: E[0][Q.scene || 0], scenes: E[0], animations: E[1], cameras: E[2], asset: Q.asset, parser: I, userData: {} };
2862
- return rI(C, a, Q), pg(a, Q), Promise.all(I._invokeAll(function(i) {
2862
+ return cI(C, a, Q), pg(a, Q), Promise.all(I._invokeAll(function(i) {
2863
2863
  return i.afterRoot && i.afterRoot(a);
2864
2864
  })).then(function() {
2865
2865
  for (const i of a.scenes) i.updateMatrixWorld();
@@ -3000,7 +3000,7 @@ class dt {
3000
3000
  const g = this, I = this.json, Q = this.json.accessors[A];
3001
3001
  if (Q.bufferView === void 0 && Q.sparse === void 0) {
3002
3002
  const E = dQ[Q.type], a = KI[Q.componentType], i = Q.normalized === !0, t = new a(Q.count * E);
3003
- return Promise.resolve(new aI(t, E, i));
3003
+ return Promise.resolve(new eI(t, E, i));
3004
3004
  }
3005
3005
  const C = [];
3006
3006
  return Q.bufferView !== void 0 ? C.push(this.getDependency("bufferView", Q.bufferView)) : C.push(null), Q.sparse !== void 0 && (C.push(this.getDependency("bufferView", Q.sparse.indices.bufferView)), C.push(this.getDependency("bufferView", Q.sparse.values.bufferView))), Promise.all(C).then(function(E) {
@@ -3010,10 +3010,10 @@ class dt {
3010
3010
  const d = Math.floor(s / n), h = "InterleavedBuffer:" + Q.bufferView + ":" + Q.componentType + ":" + d + ":" + Q.count;
3011
3011
  let b = g.cache.get(h);
3012
3012
  b || (c = new t(a, d * n, Q.count * n / e), b = new Pe(c, n / e), g.cache.add(h, b)), D = new Ve(b, i, s % n / e, r);
3013
- } else c = a === null ? new t(Q.count * i) : new t(a, s, Q.count * i), D = new aI(c, i, r);
3013
+ } else c = a === null ? new t(Q.count * i) : new t(a, s, Q.count * i), D = new eI(c, i, r);
3014
3014
  if (Q.sparse !== void 0) {
3015
3015
  const d = dQ.SCALAR, h = KI[Q.sparse.indices.componentType], b = Q.sparse.indices.byteOffset || 0, l = Q.sparse.values.byteOffset || 0, R = new h(E[1], b, Q.sparse.count * d), G = new t(E[2], l, Q.sparse.count * i);
3016
- a !== null && (D = new aI(D.array.slice(), D.itemSize, D.normalized)), D.normalized = !1;
3016
+ a !== null && (D = new eI(D.array.slice(), D.itemSize, D.normalized)), D.normalized = !1;
3017
3017
  for (let p = 0, M = R.length; p < M; p++) {
3018
3018
  const k = R[p];
3019
3019
  if (D.setX(k, G[p * i]), i >= 2 && D.setY(k, G[p * i + 1]), i >= 3 && D.setZ(k, G[p * i + 2]), i >= 4 && D.setW(k, G[p * i + 3]), i >= 5) throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
@@ -3118,7 +3118,7 @@ class dt {
3118
3118
  E = e.getMaterialType(), i.push(e.extendParams(a, C, g));
3119
3119
  } else {
3120
3120
  const e = C.pbrMetallicRoughness || {};
3121
- if (a.color = new tI(1, 1, 1), a.opacity = 1, Array.isArray(e.baseColorFactor)) {
3121
+ if (a.color = new oI(1, 1, 1), a.opacity = 1, Array.isArray(e.baseColorFactor)) {
3122
3122
  const o = e.baseColorFactor;
3123
3123
  a.color.setRGB(o[0], o[1], o[2], Gg), a.opacity = o[3];
3124
3124
  }
@@ -3136,11 +3136,11 @@ class dt {
3136
3136
  }
3137
3137
  if (C.occlusionTexture !== void 0 && E !== IB && (i.push(g.assignTexture(a, "aoMap", C.occlusionTexture)), C.occlusionTexture.strength !== void 0 && (a.aoMapIntensity = C.occlusionTexture.strength)), C.emissiveFactor !== void 0 && E !== IB) {
3138
3138
  const e = C.emissiveFactor;
3139
- a.emissive = new tI().setRGB(e[0], e[1], e[2], Gg);
3139
+ a.emissive = new oI().setRGB(e[0], e[1], e[2], Gg);
3140
3140
  }
3141
3141
  return C.emissiveTexture !== void 0 && E !== IB && i.push(g.assignTexture(a, "emissiveMap", C.emissiveTexture, Jg)), Promise.all(i).then(function() {
3142
3142
  const e = new E(a);
3143
- return C.name && (e.name = C.name), pg(e, C), g.associations.set(e, { materials: A }), C.extensions && rI(Q, e, C), e;
3143
+ return C.name && (e.name = C.name), pg(e, C), g.associations.set(e, { materials: A }), C.extensions && cI(Q, e, C), e;
3144
3144
  });
3145
3145
  }
3146
3146
  createUniqueName(A) {
@@ -3186,12 +3186,12 @@ class dt {
3186
3186
  if (d.mode !== wg.POINTS) throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + d.mode);
3187
3187
  h = new Ci(D, b);
3188
3188
  }
3189
- Object.keys(h.geometry.morphAttributes).length > 0 && ct(h, C), h.name = g.createUniqueName(C.name || "mesh_" + A), pg(h, C), d.extensions && rI(Q, h, d), g.assignFinalMaterial(h), s.push(h);
3189
+ Object.keys(h.geometry.morphAttributes).length > 0 && ct(h, C), h.name = g.createUniqueName(C.name || "mesh_" + A), pg(h, C), d.extensions && cI(Q, h, d), g.assignFinalMaterial(h), s.push(h);
3190
3190
  }
3191
3191
  for (let r = 0, c = s.length; r < c; r++) g.associations.set(s[r], { meshes: A, primitives: r });
3192
- if (s.length === 1) return C.extensions && rI(Q, s[0], C), s[0];
3192
+ if (s.length === 1) return C.extensions && cI(Q, s[0], C), s[0];
3193
3193
  const n = new sQ();
3194
- C.extensions && rI(Q, n, C), g.associations.set(n, { meshes: A });
3194
+ C.extensions && cI(Q, n, C), g.associations.set(n, { meshes: A });
3195
3195
  for (let r = 0, c = s.length; r < c; r++) n.add(s[r]);
3196
3196
  return n;
3197
3197
  });
@@ -3274,7 +3274,7 @@ class dt {
3274
3274
  }), this.nodeCache[A] = Promise.all(a).then(function(t) {
3275
3275
  let e;
3276
3276
  if (e = C.isBone === !0 ? new ti() : t.length > 1 ? new sQ() : t.length === 1 ? t[0] : new ZE(), e !== t[0]) for (let o = 0, s = t.length; o < s; o++) e.add(t[o]);
3277
- if (C.name && (e.userData.name = C.name, e.name = E), pg(e, C), C.extensions && rI(I, e, C), C.matrix !== void 0) {
3277
+ if (C.name && (e.userData.name = C.name, e.name = E), pg(e, C), C.extensions && cI(I, e, C), C.matrix !== void 0) {
3278
3278
  const o = new Tg();
3279
3279
  o.fromArray(C.matrix), e.applyMatrix4(o);
3280
3280
  } else C.translation !== void 0 && e.position.fromArray(C.translation), C.rotation !== void 0 && e.quaternion.fromArray(C.rotation), C.scale !== void 0 && e.scale.fromArray(C.scale);
@@ -3289,7 +3289,7 @@ class dt {
3289
3289
  }
3290
3290
  loadScene(A) {
3291
3291
  const g = this.extensions, I = this.json.scenes[A], Q = this, C = new sQ();
3292
- I.name && (C.name = Q.createUniqueName(I.name)), pg(C, I), I.extensions && rI(g, C, I);
3292
+ I.name && (C.name = Q.createUniqueName(I.name)), pg(C, I), I.extensions && cI(g, C, I);
3293
3293
  const E = I.nodes || [], a = [];
3294
3294
  for (let i = 0, t = E.length; i < t; i++) a.push(Q.getDependency("node", E[i]));
3295
3295
  return Promise.all(a).then(function(i) {
@@ -3471,16 +3471,16 @@ class na extends nC {
3471
3471
  }
3472
3472
  _createGeometry(A) {
3473
3473
  const g = new $B();
3474
- A.index && g.setIndex(new aI(A.index.array, 1));
3474
+ A.index && g.setIndex(new eI(A.index.array, 1));
3475
3475
  for (let I = 0; I < A.attributes.length; I++) {
3476
- const Q = A.attributes[I], C = Q.name, E = Q.array, a = Q.itemSize, i = new aI(E, a);
3476
+ const Q = A.attributes[I], C = Q.name, E = Q.array, a = Q.itemSize, i = new eI(E, a);
3477
3477
  C === "color" && (this._assignVertexColorSpace(i, Q.vertexColorSpace), i.normalized = !(E instanceof Float32Array)), g.setAttribute(C, i);
3478
3478
  }
3479
3479
  return g;
3480
3480
  }
3481
3481
  _assignVertexColorSpace(A, g) {
3482
3482
  if (g !== Jg) return;
3483
- const I = new tI();
3483
+ const I = new oI();
3484
3484
  for (let Q = 0, C = A.count; Q < C; Q++) I.fromBufferAttribute(A, Q), qB.colorSpaceToWorking(I, Jg), A.setXYZ(Q, I.r, I.g, I.b);
3485
3485
  }
3486
3486
  _loadLibrary(A, g) {
@@ -4261,7 +4261,7 @@ var Xa = function() {
4261
4261
  return { centerX: a[0], centerY: a[1], centerZ: a[2], radius: a[3], coneApexX: a[4], coneApexY: a[5], coneApexZ: a[6], coneAxisX: a[7], coneAxisY: a[8], coneAxisZ: a[9], coneCutoff: a[10] };
4262
4262
  }
4263
4263
  }();
4264
- let cI = 0;
4264
+ let $g = 0;
4265
4265
  class Ft {
4266
4266
  constructor(A) {
4267
4267
  if (this.downloadParallelism = A.downloadParallelism == null ? 8 : A.downloadParallelism, this.timeout = A.timeout != null ? A.timeout : 5e3, this.renderer = A.renderer, this.zUpToYUpMatrix = new P.Matrix4(), this.zUpToYUpMatrix.set(1, 0, 0, 0, 0, 0, -1, 0, 0, 1, 0, 0, 0, 0, 0, 1), this.maxCachedItems = 100, this.proxy = A.proxy, A && (this.meshCallback = A.meshCallback, this.pointsCallback = A.pointsCallback, A.maxCachedItems != null && (this.maxCachedItems = A.maxCachedItems)), this.gltfLoader = new ia(), this.gltfLoader.register((g) => ({ name: "KHR_spz_gaussian_splats_compression" })), A && A.dracoLoader) this.gltfLoader.setDRACOLoader(A.dracoLoader), this.hasDracoLoader = !0;
@@ -4278,7 +4278,7 @@ class Ft {
4278
4278
  }
4279
4279
  update() {
4280
4280
  const A = this;
4281
- cI < A.downloadParallelism && A._download(), A._loadBatch();
4281
+ $g < A.downloadParallelism && A._download(), A._loadBatch();
4282
4282
  }
4283
4283
  _scheduleDownload(A) {
4284
4284
  this.downloads.unshift(A);
@@ -4290,7 +4290,7 @@ class Ft {
4290
4290
  const A = this.nextDownloads.shift();
4291
4291
  A && A.shouldDoDownload() && A.doDownload();
4292
4292
  }
4293
- } while (this.concurrentDownloads < this.downloadParallelism);
4293
+ } while ($g < this.downloadParallelism);
4294
4294
  }
4295
4295
  _meshReceived(A, g, I, Q, C, E, a) {
4296
4296
  this.ready.unshift([A, g, I, Q, C, E, a]);
@@ -4347,7 +4347,7 @@ class Ft {
4347
4347
  let D;
4348
4348
  I.includes(".b3dm") ? D = () => {
4349
4349
  var d;
4350
- d = n.proxy ? () => fetch(n.proxy, { method: "POST", body: I, signal: c.signal }) : () => fetch(I, { signal: c.signal }), cI++, d().then((h) => {
4350
+ d = n.proxy ? () => fetch(n.proxy, { method: "POST", body: I, signal: c.signal }) : () => fetch(I, { signal: c.signal }), $g++, d().then((h) => {
4351
4351
  if (!h.ok) throw console.error("could not load tile with path : " + I), new Error(`couldn't load "${I}". Request failed with status ${h.status} : ${h.statusText}`);
4352
4352
  return h.arrayBuffer();
4353
4353
  }).then((h) => this.b3dmDecoder.parseB3DM(h, (b) => {
@@ -4356,11 +4356,11 @@ class Ft {
4356
4356
  n.cache.put(r, h), this._meshReceived(n.cache, n.register, r, C, E, a, g), n._checkSize();
4357
4357
  }).catch((h) => {
4358
4358
  }).finally(() => {
4359
- cI--;
4359
+ $g--;
4360
4360
  });
4361
4361
  } : I.includes(".glb") || I.includes(".gltf") ? D = () => {
4362
4362
  var d;
4363
- d = n.proxy ? () => fetch(n.proxy, { method: "POST", body: I, signal: c.signal }) : () => fetch(I, { signal: c.signal }), cI++, d().then((h) => {
4363
+ d = n.proxy ? () => fetch(n.proxy, { method: "POST", body: I, signal: c.signal }) : () => fetch(I, { signal: c.signal }), $g++, d().then((h) => {
4364
4364
  if (!h.ok) throw console.error("could not load tile with path : " + I), new Error(`couldn't load "${I}". Request failed with status ${h.status} : ${h.statusText}`);
4365
4365
  return h.arrayBuffer();
4366
4366
  }).then((h) => this.GLTFTileDecoder.parseSplats(h, t, e, s)).then((h) => {
@@ -4369,11 +4369,11 @@ class Ft {
4369
4369
  })), n.cache.put(r, h), n._meshReceived(n.cache, n.register, r, C, E, a, g), n._checkSize();
4370
4370
  }).catch((h) => {
4371
4371
  }).finally(() => {
4372
- cI--;
4372
+ $g--;
4373
4373
  });
4374
4374
  } : I.includes(".json") && (D = () => {
4375
4375
  var d;
4376
- d = n.proxy ? () => fetch(n.proxy, { method: "POST", body: I, signal: c.signal }) : () => fetch(I, { signal: c.signal }), cI++, d().then((h) => {
4376
+ d = n.proxy ? () => fetch(n.proxy, { method: "POST", body: I, signal: c.signal }) : () => fetch(I, { signal: c.signal }), $g++, d().then((h) => {
4377
4377
  if (!h.ok) throw console.error("could not load tile with path : " + I), new Error(`couldn't load "${I}". Request failed with status ${h.status} : ${h.statusText}`);
4378
4378
  return h.json();
4379
4379
  }).then((h) => cC(h, I)).then((h) => {
@@ -4381,7 +4381,7 @@ class Ft {
4381
4381
  }).catch((h) => {
4382
4382
  console.error(h);
4383
4383
  }).finally(() => {
4384
- cI--;
4384
+ $g--;
4385
4385
  });
4386
4386
  }), this._scheduleDownload({ shouldDoDownload: () => !A.signal.aborted && !!n.register[r] && Object.keys(n.register[r]).length > 0 && !n.cache.get(r), doDownload: D, distanceFunction: C, getSiblings: E, level: a, loadingStrategy: i, uuid: g });
4387
4387
  }
@@ -4446,7 +4446,7 @@ function Za(B, A, g) {
4446
4446
  return (_A[Q[C + 0]] + _A[Q[C + 1]] + _A[Q[C + 2]] + _A[Q[C + 3]] + "-" + _A[Q[C + 4]] + _A[Q[C + 5]] + "-" + _A[Q[C + 6]] + _A[Q[C + 7]] + "-" + _A[Q[C + 8]] + _A[Q[C + 9]] + "-" + _A[Q[C + 10]] + _A[Q[C + 11]] + _A[Q[C + 12]] + _A[Q[C + 13]] + _A[Q[C + 14]] + _A[Q[C + 15]]).toLowerCase();
4447
4447
  }(I);
4448
4448
  }
4449
- var BE, QE, CI = function() {
4449
+ var BE, QE, EI = function() {
4450
4450
  if (QE) return BE;
4451
4451
  function B(I) {
4452
4452
  if (typeof I != "string") throw new TypeError("Path must be a string. Received " + JSON.stringify(I));
@@ -4769,7 +4769,7 @@ function Qo(B) {
4769
4769
  function Co(B) {
4770
4770
  return B && B.constructor.prototype.isChain === !0 || !1;
4771
4771
  }
4772
- function eI(B) {
4772
+ function iI(B) {
4773
4773
  var A = typeof B;
4774
4774
  return A === "object" ? B === null ? "null" : PA(B) ? "BigNumber" : B.constructor && B.constructor.name ? B.constructor.name : "Object" : A;
4775
4775
  }
@@ -5111,8 +5111,8 @@ const EE = "Argument is not a typed-function.", WB = function B() {
5111
5111
  const ag = [];
5112
5112
  let ng, fg = 0;
5113
5113
  for (let Og = 0; Og < S.length; ++Og) {
5114
- const oI = z(S[Og], Y[Og]);
5115
- ag.push(oI), fg += oI;
5114
+ const nI = z(S[Og], Y[Og]);
5115
+ ag.push(nI), fg += nI;
5116
5116
  }
5117
5117
  if (fg !== 0) return fg;
5118
5118
  for (ng of ag) if (ng !== 0) return ng;
@@ -5242,40 +5242,40 @@ const EE = "Argument is not a typed-function.", WB = function B() {
5242
5242
  if (!Object.prototype.hasOwnProperty.call(N, V)) continue;
5243
5243
  const rA = h(V);
5244
5244
  if (!rA) continue;
5245
- S.forEach(function(sI) {
5246
- if (uA(sI, rA)) throw new TypeError('Conflicting signatures "' + r(sI) + '" and "' + r(rA) + '".');
5245
+ S.forEach(function(rI) {
5246
+ if (uA(rI, rA)) throw new TypeError('Conflicting signatures "' + r(rI) + '" and "' + r(rA) + '".');
5247
5247
  }), S.push(rA);
5248
5248
  const rg = Y.length;
5249
5249
  Y.push(N[V]);
5250
5250
  const _I = rA.map(D);
5251
5251
  let Vg;
5252
5252
  for (Vg of EA(_I)) {
5253
- const sI = r(Vg);
5254
- v.push({ params: Vg, name: sI, fn: rg }), Vg.every((aQ) => !aQ.hasConversion) && (x[sI] = rg);
5253
+ const rI = r(Vg);
5254
+ v.push({ params: Vg, name: rI, fn: rg }), Vg.every((aQ) => !aQ.hasConversion) && (x[rI] = rg);
5255
5255
  }
5256
5256
  }
5257
5257
  v.sort(gA);
5258
- const j = MA(Y, x, nI);
5258
+ const j = MA(Y, x, sI);
5259
5259
  let _;
5260
5260
  for (_ in x) Object.prototype.hasOwnProperty.call(x, _) && (x[_] = j[x[_]]);
5261
5261
  const W = [], FA = /* @__PURE__ */ new Map();
5262
5262
  for (_ of v) FA.has(_.name) || (_.fn = j[_.fn], W.push(_), FA.set(_.name, _));
5263
5263
  const hA = W[0] && W[0].params.length <= 2 && !b(W[0].params), YA = W[1] && W[1].params.length <= 2 && !b(W[1].params), VA = W[2] && W[2].params.length <= 2 && !b(W[2].params), ag = W[3] && W[3].params.length <= 2 && !b(W[3].params), ng = W[4] && W[4].params.length <= 2 && !b(W[4].params), fg = W[5] && W[5].params.length <= 2 && !b(W[5].params), Og = hA && YA && VA && ag && ng && fg;
5264
5264
  for (let rA = 0; rA < W.length; ++rA) W[rA].test = R(W[rA].params);
5265
- const oI = hA ? l(W[0].params[0]) : dg, IQ = YA ? l(W[1].params[0]) : dg, yI = VA ? l(W[2].params[0]) : dg, MI = ag ? l(W[3].params[0]) : dg, oB = ng ? l(W[4].params[0]) : dg, nB = fg ? l(W[5].params[0]) : dg, sg = hA ? l(W[0].params[1]) : dg, BQ = YA ? l(W[1].params[1]) : dg, sB = VA ? l(W[2].params[1]) : dg, GI = ag ? l(W[3].params[1]) : dg, OI = ng ? l(W[4].params[1]) : dg, rB = fg ? l(W[5].params[1]) : dg;
5265
+ const nI = hA ? l(W[0].params[0]) : dg, IQ = YA ? l(W[1].params[0]) : dg, yI = VA ? l(W[2].params[0]) : dg, MI = ag ? l(W[3].params[0]) : dg, oB = ng ? l(W[4].params[0]) : dg, nB = fg ? l(W[5].params[0]) : dg, sg = hA ? l(W[0].params[1]) : dg, BQ = YA ? l(W[1].params[1]) : dg, sB = VA ? l(W[2].params[1]) : dg, GI = ag ? l(W[3].params[1]) : dg, OI = ng ? l(W[4].params[1]) : dg, rB = fg ? l(W[5].params[1]) : dg;
5266
5266
  for (let rA = 0; rA < W.length; ++rA) W[rA].implementation = $(W[rA].params, W[rA].fn);
5267
5267
  const WI = hA ? W[0].implementation : pI, PI = YA ? W[1].implementation : pI, cB = VA ? W[2].implementation : pI, hB = ag ? W[3].implementation : pI, Wg = ng ? W[4].implementation : pI, VI = fg ? W[5].implementation : pI, zI = hA ? W[0].params.length : -1, XI = YA ? W[1].params.length : -1, DB = VA ? W[2].params.length : -1, QQ = ag ? W[3].params.length : -1, dB = ng ? W[4].params.length : -1, CQ = fg ? W[5].params.length : -1, EQ = Og ? 6 : 0, Pg = W.length, bB = W.map((rA) => rA.test), wB = W.map((rA) => rA.implementation), ZI = function() {
5268
5268
  for (let rA = EQ; rA < Pg; rA++) if (bB[rA](arguments)) return wB[rA].apply(this, arguments);
5269
5269
  return a.onMismatch(y, arguments, W);
5270
5270
  };
5271
- function nI(rA, rg) {
5272
- return arguments.length === zI && oI(rA) && sg(rg) ? WI.apply(this, arguments) : arguments.length === XI && IQ(rA) && BQ(rg) ? PI.apply(this, arguments) : arguments.length === DB && yI(rA) && sB(rg) ? cB.apply(this, arguments) : arguments.length === QQ && MI(rA) && GI(rg) ? hB.apply(this, arguments) : arguments.length === dB && oB(rA) && OI(rg) ? Wg.apply(this, arguments) : arguments.length === CQ && nB(rA) && rB(rg) ? VI.apply(this, arguments) : ZI.apply(this, arguments);
5271
+ function sI(rA, rg) {
5272
+ return arguments.length === zI && nI(rA) && sg(rg) ? WI.apply(this, arguments) : arguments.length === XI && IQ(rA) && BQ(rg) ? PI.apply(this, arguments) : arguments.length === DB && yI(rA) && sB(rg) ? cB.apply(this, arguments) : arguments.length === QQ && MI(rA) && GI(rg) ? hB.apply(this, arguments) : arguments.length === dB && oB(rA) && OI(rg) ? Wg.apply(this, arguments) : arguments.length === CQ && nB(rA) && rB(rg) ? VI.apply(this, arguments) : ZI.apply(this, arguments);
5273
5273
  }
5274
5274
  try {
5275
- Object.defineProperty(nI, "name", { value: y });
5275
+ Object.defineProperty(sI, "name", { value: y });
5276
5276
  } catch {
5277
5277
  }
5278
- return nI.signatures = x, nI._typedFunctionData = { signatures: W, signatureMap: FA }, nI;
5278
+ return sI.signatures = x, sI._typedFunctionData = { signatures: W, signatureMap: FA }, sI;
5279
5279
  }
5280
5280
  function aA(y, N, S) {
5281
5281
  throw L(y, N, S);
@@ -5643,18 +5643,18 @@ function yB(B) {
5643
5643
  * Copyright (c) 2025 Michael Mclaughlin <M8ch88l@gmail.com>
5644
5644
  * MIT Licence
5645
5645
  */
5646
- var Qe, vg, HI = 9e15, QI = 1e9, gC = "0123456789abcdef", PB = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", VB = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", IC = { precision: 20, rounding: 4, modulo: 1, toExpNeg: -7, toExpPos: 21, minE: -HI, maxE: HI, crypto: !1 }, eA = !0, AQ = "[DecimalError] ", iI = AQ + "Invalid argument: ", Ce = AQ + "Precision limit exceeded", Ee = AQ + "crypto unavailable", ae = "[object Decimal]", Ig = Math.floor, XA = Math.pow, eo = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, io = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, to = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, ee = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, Mg = 1e7, oo = PB.length - 1, BC = VB.length - 1, K = { toStringTag: ae };
5646
+ var Qe, vg, HI = 9e15, CI = 1e9, gC = "0123456789abcdef", PB = "2.3025850929940456840179914546843642076011014886287729760333279009675726096773524802359972050895982983419677840422862486334095254650828067566662873690987816894829072083255546808437998948262331985283935053089653777326288461633662222876982198867465436674744042432743651550489343149393914796194044002221051017141748003688084012647080685567743216228355220114804663715659121373450747856947683463616792101806445070648000277502684916746550586856935673420670581136429224554405758925724208241314695689016758940256776311356919292033376587141660230105703089634572075440370847469940168269282808481184289314848524948644871927809676271275775397027668605952496716674183485704422507197965004714951050492214776567636938662976979522110718264549734772662425709429322582798502585509785265383207606726317164309505995087807523710333101197857547331541421808427543863591778117054309827482385045648019095610299291824318237525357709750539565187697510374970888692180205189339507238539205144634197265287286965110862571492198849978748873771345686209167058", VB = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989380952572010654858632789", IC = { precision: 20, rounding: 4, modulo: 1, toExpNeg: -7, toExpPos: 21, minE: -HI, maxE: HI, crypto: !1 }, eA = !0, AQ = "[DecimalError] ", tI = AQ + "Invalid argument: ", Ce = AQ + "Precision limit exceeded", Ee = AQ + "crypto unavailable", ae = "[object Decimal]", Ig = Math.floor, XA = Math.pow, eo = /^0b([01]+(\.[01]*)?|\.[01]+)(p[+-]?\d+)?$/i, io = /^0x([0-9a-f]+(\.[0-9a-f]*)?|\.[0-9a-f]+)(p[+-]?\d+)?$/i, to = /^0o([0-7]+(\.[0-7]*)?|\.[0-7]+)(p[+-]?\d+)?$/i, ee = /^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i, Mg = 1e7, oo = PB.length - 1, BC = VB.length - 1, K = { toStringTag: ae };
5647
5647
  function $A(B) {
5648
5648
  var A, g, I, Q = B.length - 1, C = "", E = B[0];
5649
5649
  if (Q > 0) {
5650
- for (C += E, A = 1; A < Q; A++) (g = 7 - (I = B[A] + "").length) && (C += BI(g)), C += I;
5651
- (g = 7 - (I = (E = B[A]) + "").length) && (C += BI(g));
5650
+ for (C += E, A = 1; A < Q; A++) (g = 7 - (I = B[A] + "").length) && (C += QI(g)), C += I;
5651
+ (g = 7 - (I = (E = B[A]) + "").length) && (C += QI(g));
5652
5652
  } else if (E === 0) return "0";
5653
5653
  for (; E % 10 == 0; ) E /= 10;
5654
5654
  return C + E;
5655
5655
  }
5656
5656
  function ig(B, A, g) {
5657
- if (B !== ~~B || B < A || B > g) throw Error(iI + B);
5657
+ if (B !== ~~B || B < A || B > g) throw Error(tI + B);
5658
5658
  }
5659
5659
  function aB(B, A, g, I) {
5660
5660
  var Q, C, E, a;
@@ -5676,7 +5676,7 @@ K.absoluteValue = K.abs = function() {
5676
5676
  }, K.clampedTo = K.clamp = function(B, A) {
5677
5677
  var g = this, I = g.constructor;
5678
5678
  if (B = new I(B), A = new I(A), !B.s || !A.s) return new I(NaN);
5679
- if (B.gt(A)) throw Error(iI + A);
5679
+ if (B.gt(A)) throw Error(tI + A);
5680
5680
  return g.cmp(B) < 0 ? B : g.cmp(A) > 0 ? A : new I(g);
5681
5681
  }, K.comparedTo = K.cmp = function(B) {
5682
5682
  var A, g, I, Q, C = this, E = C.d, a = (B = new C.constructor(B)).d, i = C.s, t = B.s;
@@ -5809,8 +5809,8 @@ K.absoluteValue = K.abs = function() {
5809
5809
  for (Q = g[0]; Q % 10 == 0; ) Q /= 10;
5810
5810
  C = Q !== 1;
5811
5811
  }
5812
- if (eA = !1, E = gI(t, a = o + 5), I = A ? zB(e, a + 10) : gI(B, a), aB((i = pA(E, I, a, 1)).d, Q = o, s)) do
5813
- if (E = gI(t, a += 10), I = A ? zB(e, a + 10) : gI(B, a), i = pA(E, I, a, 1), !C) {
5812
+ if (eA = !1, E = II(t, a = o + 5), I = A ? zB(e, a + 10) : II(B, a), aB((i = pA(E, I, a, 1)).d, Q = o, s)) do
5813
+ if (E = II(t, a += 10), I = A ? zB(e, a + 10) : II(B, a), i = pA(E, I, a, 1), !C) {
5814
5814
  +$A(i.d).slice(Q + 1, Q + 15) + 1 == 1e14 && (i = QA(i, o + 1, 0));
5815
5815
  break;
5816
5816
  }
@@ -5855,7 +5855,7 @@ K.absoluteValue = K.abs = function() {
5855
5855
  }, K.naturalExponential = K.exp = function() {
5856
5856
  return UQ(this);
5857
5857
  }, K.naturalLogarithm = K.ln = function() {
5858
- return gI(this);
5858
+ return II(this);
5859
5859
  }, K.negated = K.neg = function() {
5860
5860
  var B = new this.constructor(this);
5861
5861
  return B.s = -B.s, QA(B);
@@ -5873,7 +5873,7 @@ K.absoluteValue = K.abs = function() {
5873
5873
  return B.d = t, B.e = xB(t, I), eA ? QA(B, a, i) : B;
5874
5874
  }, K.precision = K.sd = function(B) {
5875
5875
  var A, g = this;
5876
- if (B !== void 0 && B !== !!B && B !== 1 && B !== 0) throw Error(iI + B);
5876
+ if (B !== void 0 && B !== !!B && B !== 1 && B !== 0) throw Error(tI + B);
5877
5877
  return g.d ? (A = tE(g.d), B && g.e + 1 > A && (A = g.e + 1)) : A = NaN, A;
5878
5878
  }, K.round = function() {
5879
5879
  var B = this, A = B.constructor;
@@ -5919,19 +5919,19 @@ K.absoluteValue = K.abs = function() {
5919
5919
  return mQ(this, 2, B, A);
5920
5920
  }, K.toDecimalPlaces = K.toDP = function(B, A) {
5921
5921
  var g = this, I = g.constructor;
5922
- return g = new I(g), B === void 0 ? g : (ig(B, 0, QI), A === void 0 ? A = I.rounding : ig(A, 0, 8), QA(g, B + g.e + 1, A));
5922
+ return g = new I(g), B === void 0 ? g : (ig(B, 0, CI), A === void 0 ? A = I.rounding : ig(A, 0, 8), QA(g, B + g.e + 1, A));
5923
5923
  }, K.toExponential = function(B, A) {
5924
5924
  var g, I = this, Q = I.constructor;
5925
- return B === void 0 ? g = Ug(I, !0) : (ig(B, 0, QI), A === void 0 ? A = Q.rounding : ig(A, 0, 8), g = Ug(I = QA(new Q(I), B + 1, A), !0, B + 1)), I.isNeg() && !I.isZero() ? "-" + g : g;
5925
+ return B === void 0 ? g = Ug(I, !0) : (ig(B, 0, CI), A === void 0 ? A = Q.rounding : ig(A, 0, 8), g = Ug(I = QA(new Q(I), B + 1, A), !0, B + 1)), I.isNeg() && !I.isZero() ? "-" + g : g;
5926
5926
  }, K.toFixed = function(B, A) {
5927
5927
  var g, I, Q = this, C = Q.constructor;
5928
- return B === void 0 ? g = Ug(Q) : (ig(B, 0, QI), A === void 0 ? A = C.rounding : ig(A, 0, 8), g = Ug(I = QA(new C(Q), B + Q.e + 1, A), !1, B + I.e + 1)), Q.isNeg() && !Q.isZero() ? "-" + g : g;
5928
+ return B === void 0 ? g = Ug(Q) : (ig(B, 0, CI), A === void 0 ? A = C.rounding : ig(A, 0, 8), g = Ug(I = QA(new C(Q), B + Q.e + 1, A), !1, B + I.e + 1)), Q.isNeg() && !Q.isZero() ? "-" + g : g;
5929
5929
  }, K.toFraction = function(B) {
5930
5930
  var A, g, I, Q, C, E, a, i, t, e, o, s, n = this, r = n.d, c = n.constructor;
5931
5931
  if (!r) return new c(n);
5932
5932
  if (t = g = new c(1), I = i = new c(0), E = (C = (A = new c(I)).e = tE(r) - n.e - 1) % 7, A.d[0] = XA(10, E < 0 ? 7 + E : E), B == null) B = C > 0 ? A : t;
5933
5933
  else {
5934
- if (!(a = new c(B)).isInt() || a.lt(t)) throw Error(iI + a);
5934
+ if (!(a = new c(B)).isInt() || a.lt(t)) throw Error(tI + a);
5935
5935
  B = a.gt(A) ? C > 0 ? A : t : a;
5936
5936
  }
5937
5937
  for (eA = !1, a = new c($A(r)), e = c.precision, c.precision = C = 7 * r.length * 2; o = pA(a, A, 0, 1, 1), (Q = g.plus(o.times(I))).cmp(B) != 1; ) g = I, I = Q, Q = t, t = i.plus(o.times(Q)), i = Q, Q = A, A = a.minus(o.times(Q)), a = Q;
@@ -5962,13 +5962,13 @@ K.absoluteValue = K.abs = function() {
5962
5962
  if (A < B.d.length - 1) return new i(NaN);
5963
5963
  if (1 & B.d[A] || (E = 1), a.e == 0 && a.d[0] == 1 && a.d.length == 1) return a.s = E, a;
5964
5964
  }
5965
- return (A = (g = XA(+a, t)) != 0 && isFinite(g) ? new i(g + "").e : Ig(t * (Math.log("0." + $A(a.d)) / Math.LN10 + a.e + 1))) > i.maxE + 1 || A < i.minE - 1 ? new i(A > 0 ? E / 0 : 0) : (eA = !1, i.rounding = a.s = 1, g = Math.min(12, (A + "").length), (Q = UQ(B.times(gI(a, I + g)), I)).d && aB((Q = QA(Q, I + 5, 1)).d, I, C) && (A = I + 10, +$A((Q = QA(UQ(B.times(gI(a, A + g)), A), A + 5, 1)).d).slice(I + 1, I + 15) + 1 == 1e14 && (Q = QA(Q, I + 1, 0))), Q.s = E, eA = !0, i.rounding = C, QA(Q, I, C));
5965
+ return (A = (g = XA(+a, t)) != 0 && isFinite(g) ? new i(g + "").e : Ig(t * (Math.log("0." + $A(a.d)) / Math.LN10 + a.e + 1))) > i.maxE + 1 || A < i.minE - 1 ? new i(A > 0 ? E / 0 : 0) : (eA = !1, i.rounding = a.s = 1, g = Math.min(12, (A + "").length), (Q = UQ(B.times(II(a, I + g)), I)).d && aB((Q = QA(Q, I + 5, 1)).d, I, C) && (A = I + 10, +$A((Q = QA(UQ(B.times(II(a, A + g)), A), A + 5, 1)).d).slice(I + 1, I + 15) + 1 == 1e14 && (Q = QA(Q, I + 1, 0))), Q.s = E, eA = !0, i.rounding = C, QA(Q, I, C));
5966
5966
  }, K.toPrecision = function(B, A) {
5967
5967
  var g, I = this, Q = I.constructor;
5968
- return B === void 0 ? g = Ug(I, I.e <= Q.toExpNeg || I.e >= Q.toExpPos) : (ig(B, 1, QI), A === void 0 ? A = Q.rounding : ig(A, 0, 8), g = Ug(I = QA(new Q(I), B, A), B <= I.e || I.e <= Q.toExpNeg, B)), I.isNeg() && !I.isZero() ? "-" + g : g;
5968
+ return B === void 0 ? g = Ug(I, I.e <= Q.toExpNeg || I.e >= Q.toExpPos) : (ig(B, 1, CI), A === void 0 ? A = Q.rounding : ig(A, 0, 8), g = Ug(I = QA(new Q(I), B, A), B <= I.e || I.e <= Q.toExpNeg, B)), I.isNeg() && !I.isZero() ? "-" + g : g;
5969
5969
  }, K.toSignificantDigits = K.toSD = function(B, A) {
5970
5970
  var g = this.constructor;
5971
- return B === void 0 ? (B = g.precision, A = g.rounding) : (ig(B, 1, QI), A === void 0 ? A = g.rounding : ig(A, 0, 8)), QA(new g(this), B, A);
5971
+ return B === void 0 ? (B = g.precision, A = g.rounding) : (ig(B, 1, CI), A === void 0 ? A = g.rounding : ig(A, 0, 8)), QA(new g(this), B, A);
5972
5972
  }, K.toString = function() {
5973
5973
  var B = this, A = B.constructor, g = Ug(B, B.e <= A.toExpNeg || B.e >= A.toExpPos);
5974
5974
  return B.isNeg() && !B.isZero() ? "-" + g : g;
@@ -6056,7 +6056,7 @@ function QA(B, A, g, I) {
6056
6056
  function Ug(B, A, g) {
6057
6057
  if (!B.isFinite()) return oe(B);
6058
6058
  var I, Q = B.e, C = $A(B.d), E = C.length;
6059
- return A ? (g && (I = g - E) > 0 ? C = C.charAt(0) + "." + C.slice(1) + BI(I) : E > 1 && (C = C.charAt(0) + "." + C.slice(1)), C = C + (B.e < 0 ? "e" : "e+") + B.e) : Q < 0 ? (C = "0." + BI(-Q - 1) + C, g && (I = g - E) > 0 && (C += BI(I))) : Q >= E ? (C += BI(Q + 1 - E), g && (I = g - Q - 1) > 0 && (C = C + "." + BI(I))) : ((I = Q + 1) < E && (C = C.slice(0, I) + "." + C.slice(I)), g && (I = g - E) > 0 && (Q + 1 === E && (C += "."), C += BI(I))), C;
6059
+ return A ? (g && (I = g - E) > 0 ? C = C.charAt(0) + "." + C.slice(1) + QI(I) : E > 1 && (C = C.charAt(0) + "." + C.slice(1)), C = C + (B.e < 0 ? "e" : "e+") + B.e) : Q < 0 ? (C = "0." + QI(-Q - 1) + C, g && (I = g - E) > 0 && (C += QI(I))) : Q >= E ? (C += QI(Q + 1 - E), g && (I = g - Q - 1) > 0 && (C = C + "." + QI(I))) : ((I = Q + 1) < E && (C = C.slice(0, I) + "." + C.slice(I)), g && (I = g - E) > 0 && (Q + 1 === E && (C += "."), C += QI(I))), C;
6060
6060
  }
6061
6061
  function xB(B, A) {
6062
6062
  var g = B[0];
@@ -6079,7 +6079,7 @@ function tE(B) {
6079
6079
  }
6080
6080
  return g;
6081
6081
  }
6082
- function BI(B) {
6082
+ function QI(B) {
6083
6083
  for (var A = ""; B--; ) A += "0";
6084
6084
  return A;
6085
6085
  }
@@ -6121,10 +6121,10 @@ function UQ(B, A) {
6121
6121
  E = a;
6122
6122
  }
6123
6123
  }
6124
- function gI(B, A) {
6124
+ function II(B, A) {
6125
6125
  var g, I, Q, C, E, a, i, t, e, o, s, n = 1, r = B, c = r.d, D = r.constructor, d = D.rounding, h = D.precision;
6126
6126
  if (r.s < 0 || !c || !c[0] || !r.e && c[0] == 1 && c.length == 1) return new D(c && !c[0] ? -1 / 0 : r.s != 1 ? NaN : c ? 0 : r);
6127
- if (A == null ? (eA = !1, e = h) : e = A, D.precision = e += 10, I = (g = $A(c)).charAt(0), !(Math.abs(C = r.e) < 15e14)) return t = zB(D, e + 2, h).times(C + ""), r = gI(new D(I + "." + g.slice(1)), e - 10).plus(t), D.precision = h, A == null ? QA(r, h, d, eA = !0) : r;
6127
+ if (A == null ? (eA = !1, e = h) : e = A, D.precision = e += 10, I = (g = $A(c)).charAt(0), !(Math.abs(C = r.e) < 15e14)) return t = zB(D, e + 2, h).times(C + ""), r = II(new D(I + "." + g.slice(1)), e - 10).plus(t), D.precision = h, A == null ? QA(r, h, d, eA = !0) : r;
6128
6128
  for (; I < 7 && I != 1 || I == 1 && g.charAt(1) > 3; ) I = (g = $A((r = r.times(B)).d)).charAt(0), n++;
6129
6129
  for (C = r.e, I > 1 ? (r = new D("0." + g), C++) : r = new D(I + "." + g.slice(1)), o = r, i = E = r = pA(r.minus(1), r.plus(1), e, 1), s = QA(r.times(r), e, 1), Q = 3; ; ) {
6130
6130
  if (E = QA(E.times(s), e, 1), $A((t = i.plus(pA(E, new D(Q), e, 1))).d).slice(0, e) === $A(i.d).slice(0, e)) {
@@ -6160,7 +6160,7 @@ function no(B, A) {
6160
6160
  if (io.test(A)) g = 16, A = A.toLowerCase();
6161
6161
  else if (eo.test(A)) g = 2;
6162
6162
  else {
6163
- if (!to.test(A)) throw Error(iI + A);
6163
+ if (!to.test(A)) throw Error(tI + A);
6164
6164
  g = 8;
6165
6165
  }
6166
6166
  for ((C = A.search(/p/i)) > 0 ? (i = +A.slice(C + 1), A = A.substring(2, C)) : A = A.slice(2), E = (C = A.indexOf(".")) >= 0, I = B.constructor, E && (C = (a = (A = A.replace(".", "")).length) - C, Q = ie(I, new I(g), C, 2 * C)), C = e = (t = HB(A, g, Mg)).length - 1; t[C] === 0; --C) t.pop();
@@ -6193,7 +6193,7 @@ function nE(B, A) {
6193
6193
  }
6194
6194
  function mQ(B, A, g, I) {
6195
6195
  var Q, C, E, a, i, t, e, o, s, n = B.constructor, r = g !== void 0;
6196
- if (r ? (ig(g, 1, QI), I === void 0 ? I = n.rounding : ig(I, 0, 8)) : (g = n.precision, I = n.rounding), B.isFinite()) {
6196
+ if (r ? (ig(g, 1, CI), I === void 0 ? I = n.rounding : ig(I, 0, 8)) : (g = n.precision, I = n.rounding), B.isFinite()) {
6197
6197
  for (r ? (Q = 2, A == 16 ? g = 4 * g - 3 : A == 8 && (g = 3 * g - 2)) : Q = A, (E = (e = Ug(B)).indexOf(".")) >= 0 && (e = e.replace(".", ""), (s = new n(1)).e = e.length - E, s.d = HB(Ug(s), 10, Q), s.e = s.d.length), C = i = (o = HB(e, 10, Q)).length; o[--i] == 0; ) o.pop();
6198
6198
  if (o[0]) {
6199
6199
  if (E < 0 ? C-- : ((B = new n(B)).d = o, B.e = C, o = (B = pA(B, s, g, I, 0, Q)).d, C = B.e, t = Qe), E = o[g], a = Q / 2, t = t || o[g + 1] !== void 0, t = I < 4 ? (E !== void 0 || t) && (I === 0 || I === (B.s < 0 ? 3 : 2)) : E > a || E === a && (I === 4 || t || I === 6 && 1 & o[g - 1] || I === (B.s < 0 ? 8 : 7)), o.length = g, t) for (; ++o[--g] > Q - 1; ) o[g] = 0, g || (++C, o.unshift(1));
@@ -6259,13 +6259,13 @@ function yo(B, A, g) {
6259
6259
  }
6260
6260
  function Mo(B) {
6261
6261
  if (!B || typeof B != "object") throw Error(AQ + "Object expected");
6262
- var A, g, I, Q = B.defaults === !0, C = ["precision", 1, QI, "rounding", 0, 8, "toExpNeg", -HI, 0, "toExpPos", 0, HI, "maxE", 0, HI, "minE", -HI, 0, "modulo", 0, 9];
6262
+ var A, g, I, Q = B.defaults === !0, C = ["precision", 1, CI, "rounding", 0, 8, "toExpNeg", -HI, 0, "toExpPos", 0, HI, "maxE", 0, HI, "minE", -HI, 0, "modulo", 0, 9];
6263
6263
  for (A = 0; A < C.length; A += 3) if (g = C[A], Q && (this[g] = IC[g]), (I = B[g]) !== void 0) {
6264
- if (!(Ig(I) === I && I >= C[A + 1] && I <= C[A + 2])) throw Error(iI + g + ": " + I);
6264
+ if (!(Ig(I) === I && I >= C[A + 1] && I <= C[A + 2])) throw Error(tI + g + ": " + I);
6265
6265
  this[g] = I;
6266
6266
  }
6267
6267
  if (g = "crypto", Q && (this[g] = IC[g]), (I = B[g]) !== void 0) {
6268
- if (I !== !0 && I !== !1 && I !== 0 && I !== 1) throw Error(iI + g + ": " + I);
6268
+ if (I !== !0 && I !== !1 && I !== 0 && I !== 1) throw Error(tI + g + ": " + I);
6269
6269
  if (I) {
6270
6270
  if (typeof crypto > "u" || !crypto || !crypto.getRandomValues && !crypto.randomBytes) throw Error(Ee);
6271
6271
  this[g] = !0;
@@ -6329,7 +6329,7 @@ function jo(B, A) {
6329
6329
  }
6330
6330
  function qo(B) {
6331
6331
  var A, g, I, Q, C = 0, E = new this(1), a = [];
6332
- if (B === void 0 ? B = this.precision : ig(B, 1, QI), I = Math.ceil(B / 7), this.crypto) if (crypto.getRandomValues) for (A = crypto.getRandomValues(new Uint32Array(I)); C < I; ) (Q = A[C]) >= 429e7 ? A[C] = crypto.getRandomValues(new Uint32Array(1))[0] : a[C++] = Q % 1e7;
6332
+ if (B === void 0 ? B = this.precision : ig(B, 1, CI), I = Math.ceil(B / 7), this.crypto) if (crypto.getRandomValues) for (A = crypto.getRandomValues(new Uint32Array(I)); C < I; ) (Q = A[C]) >= 429e7 ? A[C] = crypto.getRandomValues(new Uint32Array(1))[0] : a[C++] = Q % 1e7;
6333
6333
  else {
6334
6334
  if (!crypto.randomBytes) throw Error(Ee);
6335
6335
  for (A = crypto.randomBytes(I *= 4); C < I; ) (Q = A[C] + (A[C + 1] << 8) + (A[C + 2] << 16) + ((127 & A[C + 3]) << 24)) >= 214e7 ? crypto.randomBytes(4).copy(A, C) : (a.push(Q % 1e7), C += 4);
@@ -6394,7 +6394,7 @@ var TI = K.constructor = function B(A) {
6394
6394
  }
6395
6395
  if (t === "string") return (i = E.charCodeAt(0)) === 45 ? (E = E.slice(1), e.s = -1) : (i === 43 && (E = E.slice(1)), e.s = 1), ee.test(E) ? KB(e, E) : no(e, E);
6396
6396
  if (t === "bigint") return E < 0 ? (E = -E, e.s = -1) : e.s = 1, KB(e, E.toString());
6397
- throw Error(iI + E);
6397
+ throw Error(tI + E);
6398
6398
  }
6399
6399
  if (C.prototype = K, C.ROUND_UP = 0, C.ROUND_DOWN = 1, C.ROUND_CEIL = 2, C.ROUND_FLOOR = 3, C.ROUND_HALF_UP = 4, C.ROUND_HALF_DOWN = 5, C.ROUND_HALF_EVEN = 6, C.ROUND_HALF_CEIL = 7, C.ROUND_HALF_FLOOR = 8, C.EUCLID = 9, C.config = C.set = Mo, C.clone = B, C.isDecimal = rE, C.abs = so, C.acos = ro, C.acosh = co, C.add = ho, C.asin = Do, C.asinh = bo, C.atan = wo, C.atanh = uo, C.atan2 = lo, C.cbrt = fo, C.ceil = Fo, C.clamp = yo, C.cos = Go, C.cosh = Ro, C.div = No, C.exp = ko, C.floor = po, C.hypot = Uo, C.ln = mo, C.log = So, C.log10 = Jo, C.log2 = Lo, C.max = Yo, C.min = Ho, C.mod = xo, C.mul = Ko, C.pow = jo, C.random = qo, C.round = vo, C.sign = To, C.sin = Oo, C.sinh = Wo, C.sqrt = Po, C.sub = Vo, C.sum = zo, C.tan = Xo, C.tanh = Zo, C.trunc = _o, A === void 0 && (A = {}), A && A.defaults !== !0) for (Q = ["precision", "rounding", "toExpNeg", "toExpPos", "maxE", "minE", "modulo", "crypto"], g = 0; g < Q.length; ) A.hasOwnProperty(I = Q[g++]) || (A[I] = this[I]);
6400
6400
  return C.config(A), C;
@@ -6708,7 +6708,7 @@ function Kg(B, A) {
6708
6708
  try {
6709
6709
  B = BigInt(B);
6710
6710
  } catch {
6711
- throw II();
6711
+ throw BI();
6712
6712
  }
6713
6713
  return B * A;
6714
6714
  }
@@ -6736,13 +6736,13 @@ const ZA = function(B, A) {
6736
6736
  if (B != null) if (A !== void 0) {
6737
6737
  if (typeof B == "bigint") g = B;
6738
6738
  else {
6739
- if (isNaN(B)) throw II();
6739
+ if (isNaN(B)) throw BI();
6740
6740
  if (B % 1 != 0) throw cE();
6741
6741
  g = BigInt(B);
6742
6742
  }
6743
6743
  if (typeof A == "bigint") I = A;
6744
6744
  else {
6745
- if (isNaN(A)) throw II();
6745
+ if (isNaN(A)) throw BI();
6746
6746
  if (A % 1 != 0) throw cE();
6747
6747
  I = BigInt(A);
6748
6748
  }
@@ -6751,12 +6751,12 @@ const ZA = function(B, A) {
6751
6751
  if ("d" in B && "n" in B) g = BigInt(B.n), I = BigInt(B.d), "s" in B && (g *= BigInt(B.s));
6752
6752
  else if (0 in B) g = BigInt(B[0]), 1 in B && (I = BigInt(B[1]));
6753
6753
  else {
6754
- if (typeof B != "bigint") throw II();
6754
+ if (typeof B != "bigint") throw BI();
6755
6755
  g = B;
6756
6756
  }
6757
6757
  Q = g * I;
6758
6758
  } else if (typeof B == "number") {
6759
- if (isNaN(B)) throw II();
6759
+ if (isNaN(B)) throw BI();
6760
6760
  if (B < 0 && (Q = -tA, B = -B), B % 1 == 0) g = BigInt(B);
6761
6761
  else {
6762
6762
  let C = 1, E = 0, a = 1, i = 1, t = 1, e = 1e7;
@@ -6772,10 +6772,10 @@ const ZA = function(B, A) {
6772
6772
  }
6773
6773
  } else if (typeof B == "string") {
6774
6774
  let C = 0, E = CA, a = CA, i = CA, t = tA, e = tA, o = B.replace(/_/g, "").match(/\d+|./g);
6775
- if (o === null || (o[C] === "-" ? (Q = -tA, C++) : o[C] === "+" && C++, o.length === C + 1 ? a = Kg(o[C++], Q) : o[C + 1] === "." || o[C] === "." ? (o[C] !== "." && (E = Kg(o[C++], Q)), C++, (C + 1 === o.length || o[C + 1] === "(" && o[C + 3] === ")" || o[C + 1] === "'" && o[C + 3] === "'") && (a = Kg(o[C], Q), t = tg ** BigInt(o[C].length), C++), (o[C] === "(" && o[C + 2] === ")" || o[C] === "'" && o[C + 2] === "'") && (i = Kg(o[C + 1], Q), e = tg ** BigInt(o[C + 1].length) - tA, C += 3)) : o[C + 1] === "/" || o[C + 1] === ":" ? (a = Kg(o[C], Q), t = Kg(o[C + 2], tA), C += 3) : o[C + 3] === "/" && o[C + 1] === " " && (E = Kg(o[C], Q), a = Kg(o[C + 2], Q), t = Kg(o[C + 4], tA), C += 5), !(o.length <= C))) throw II();
6775
+ if (o === null || (o[C] === "-" ? (Q = -tA, C++) : o[C] === "+" && C++, o.length === C + 1 ? a = Kg(o[C++], Q) : o[C + 1] === "." || o[C] === "." ? (o[C] !== "." && (E = Kg(o[C++], Q)), C++, (C + 1 === o.length || o[C + 1] === "(" && o[C + 3] === ")" || o[C + 1] === "'" && o[C + 3] === "'") && (a = Kg(o[C], Q), t = tg ** BigInt(o[C].length), C++), (o[C] === "(" && o[C + 2] === ")" || o[C] === "'" && o[C + 2] === "'") && (i = Kg(o[C + 1], Q), e = tg ** BigInt(o[C + 1].length) - tA, C += 3)) : o[C + 1] === "/" || o[C + 1] === ":" ? (a = Kg(o[C], Q), t = Kg(o[C + 2], tA), C += 3) : o[C + 3] === "/" && o[C + 1] === " " && (E = Kg(o[C], Q), a = Kg(o[C + 2], Q), t = Kg(o[C + 4], tA), C += 5), !(o.length <= C))) throw BI();
6776
6776
  I = t * e, Q = g = i + I * E + e * a;
6777
6777
  } else {
6778
- if (typeof B != "bigint") throw II();
6778
+ if (typeof B != "bigint") throw BI();
6779
6779
  g = B, Q = B, I = tA;
6780
6780
  }
6781
6781
  if (I === CA) throw dC();
@@ -6807,7 +6807,7 @@ function ug(B, A) {
6807
6807
  }
6808
6808
  var dC = function() {
6809
6809
  return new Error("Division by Zero");
6810
- }, II = function() {
6810
+ }, BI = function() {
6811
6811
  return new Error("Invalid argument");
6812
6812
  }, cE = function() {
6813
6813
  return new Error("Parameters must be integer");
@@ -7322,7 +7322,7 @@ function FE(B, A, g, I) {
7322
7322
  var t;
7323
7323
  if (C instanceof TypeError && ((t = C.data) === null || t === void 0 ? void 0 : t.category) === "wrongType") {
7324
7324
  var e = [];
7325
- throw e.push("value: ".concat(eI(E[0]))), E.length >= 2 && e.push("index: ".concat(eI(E[1]))), E.length >= 3 && e.push("array: ".concat(eI(E[2]))), new TypeError("Function ".concat(a, " cannot apply callback arguments ") + "".concat(i, "(").concat(e.join(", "), ") at index ").concat(JSON.stringify(E[1])));
7325
+ throw e.push("value: ".concat(iI(E[0]))), E.length >= 2 && e.push("index: ".concat(iI(E[1]))), E.length >= 3 && e.push("array: ".concat(iI(E[2]))), new TypeError("Function ".concat(a, " cannot apply callback arguments ") + "".concat(i, "(").concat(e.join(", "), ") at index ").concat(JSON.stringify(E[1])));
7326
7326
  }
7327
7327
  throw new TypeError("Function ".concat(a, " cannot apply callback arguments ") + "to function ".concat(i, ": ").concat(C.message));
7328
7328
  })(Q, A, g, I);
@@ -7338,7 +7338,7 @@ var en = wA("DenseMatrix", ["Matrix"], (B) => {
7338
7338
  else if (E && zA(E.data) && zA(E.size)) this._data = E.data, this._size = E.size, wE(this._data, this._size), this._datatype = a || E.datatype;
7339
7339
  else if (zA(E)) this._data = C(E), this._size = Eg(this._data), wE(this._data, this._size), this._datatype = a;
7340
7340
  else {
7341
- if (E) throw new TypeError("Unsupported type of data (" + eI(E) + ")");
7341
+ if (E) throw new TypeError("Unsupported type of data (" + iI(E) + ")");
7342
7342
  this._data = [], this._size = [0], this._datatype = a;
7343
7343
  }
7344
7344
  }
@@ -7360,7 +7360,7 @@ var en = wA("DenseMatrix", ["Matrix"], (B) => {
7360
7360
  return g.prototype = new A(), g.prototype.createDenseMatrix = function(E, a) {
7361
7361
  return new g(E, a);
7362
7362
  }, Object.defineProperty(g, "name", { value: "DenseMatrix" }), g.prototype.constructor = g, g.prototype.type = "DenseMatrix", g.prototype.isDenseMatrix = !0, g.prototype.getDataType = function() {
7363
- return wC(this._data, eI);
7363
+ return wC(this._data, iI);
7364
7364
  }, g.prototype.storage = function() {
7365
7365
  return "dense";
7366
7366
  }, g.prototype.datatype = function() {
@@ -7666,7 +7666,7 @@ var sn = wA("SparseMatrix", ["typed", "equalScalar", "Matrix"], (B) => {
7666
7666
  else if (e && zA(e.index) && zA(e.ptr) && zA(e.size)) this._values = e.values, this._index = e.index, this._ptr = e.ptr, this._size = e.size, this._datatype = o || e.datatype;
7667
7667
  else if (zA(e)) C(this, e, o);
7668
7668
  else {
7669
- if (e) throw new TypeError("Unsupported type of data (" + eI(e) + ")");
7669
+ if (e) throw new TypeError("Unsupported type of data (" + iI(e) + ")");
7670
7670
  this._values = [], this._index = [], this._ptr = [0], this._size = [0, 0], this._datatype = o;
7671
7671
  }
7672
7672
  }
@@ -7738,7 +7738,7 @@ var sn = wA("SparseMatrix", ["typed", "equalScalar", "Matrix"], (B) => {
7738
7738
  return Q.prototype = new I(), Q.prototype.createSparseMatrix = function(e, o) {
7739
7739
  return new Q(e, o);
7740
7740
  }, Object.defineProperty(Q, "name", { value: "SparseMatrix" }), Q.prototype.constructor = Q, Q.prototype.type = "SparseMatrix", Q.prototype.isSparseMatrix = !0, Q.prototype.getDataType = function() {
7741
- return wC(this._values, eI);
7741
+ return wC(this._values, iI);
7742
7742
  }, Q.prototype.storage = function() {
7743
7743
  return "sparse";
7744
7744
  }, Q.prototype.datatype = function() {
@@ -8421,7 +8421,7 @@ var SE, LE = "size", kn = wA(LE, ["typed", "config", "?matrix"], (B) => {
8421
8421
  return function(E) {
8422
8422
  var a = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "number";
8423
8423
  if ((arguments.length > 2 ? arguments[2] : void 0) !== void 0) throw new SyntaxError("numeric() takes one or two arguments");
8424
- var i = eI(E);
8424
+ var i = iI(E);
8425
8425
  if (!(i in Q)) throw new TypeError("Cannot convert " + E + ' of type "' + i + '"; valid input types are ' + Object.keys(Q).join(", "));
8426
8426
  if (!(a in C)) throw new TypeError("Cannot convert " + E + ' to type "' + a + '"; valid output types are ' + Object.keys(C).join(", "));
8427
8427
  return a === i ? E : C[a](E);
@@ -9098,7 +9098,7 @@ function Pn(B) {
9098
9098
  }
9099
9099
  }
9100
9100
  new bA(), new bA();
9101
- const Ue = new EI();
9101
+ const Ue = new aI();
9102
9102
  Ue.set(1, 0, 0, 0, 0, 1, 0, -1, 0);
9103
9103
  const Vn = new Tg().set(1, 0, 0, 0, 0, 0, -1, 0, 0, 1, 0, 0, 0, 0, 0, 1);
9104
9104
  function HQ(B, A) {
@@ -9114,7 +9114,7 @@ class zn extends OQ {
9114
9114
  const i = new uB(1024, 1024, 1, { magFilter: gg, minFilter: gg, anisotropy: 0, type: kg, format: Ng, depthBuffer: !1, resolveDepthBuffer: !1 });
9115
9115
  i.texture.type = kg, i.texture.format = Ng, i.texture.internalFormat = "RGBA32UI", A.initRenderTarget(i);
9116
9116
  const t = new cQ({ glslVersion: hQ, uniforms: { textureSize: { value: 1024 }, numSlices: { value: 1 }, covarianceTexture: { value: i.texture }, positionColorTexture: { value: a.texture }, zUpToYUpMatrix3x3: { value: Ue }, sizeMultiplier: { value: 1 }, cropRadius: { value: Number.MAX_VALUE }, viewportPixelSize: { value: new sC() }, k: { value: 2 }, beta_k: { value: 2 }, minSplatPixelSize: { value: 0 }, minOpacity: { value: 0.01 }, culling: { value: !1 }, antialiasingFactor: { value: 2 }, depthBias: { value: 0 } }, vertexShader: Xn(), fragmentShader: I || Zn(), transparent: !0, side: UB, depthTest: !0, depthWrite: !1, blending: Mi }), e = new YC(), o = new Float32Array([-0.5, 0.5, 0, 0.5, 0.5, 0, -0.5, -0.5, 0, 0.5, -0.5, 0]);
9117
- e.setIndex([0, 2, 1, 2, 3, 1]), e.setAttribute("position", new aI(o, 3));
9117
+ e.setIndex([0, 2, 1, 2, 3, 1]), e.setAttribute("position", new eI(o, 3));
9118
9118
  const s = new Uint32Array(E), n = new vQ(s, 1, !1);
9119
9119
  n.needsUpdate = !0, n.setUsage(HC), e.setAttribute("order", n), e.instanceCount = 0, super(e, t), this.matrixAutoUpdate = !1, this.numBatches = 0, this.numVisibleBatches = 0, this.orderAttribute = n, this.textureSize = 1024, this.numTextures = 1, this.batchSize = C, this.maxSplats = E, this.numSplatsRendered = 0, this.positionColorRenderTarget = a, this.covarianceRenderTarget = i, this.renderer = A, this.sortID = 0, this.freeAddresses = new tB();
9120
9120
  for (let c = 0; c < this.maxSplats; c += C) this.freeAddresses.add(c);
@@ -9122,7 +9122,7 @@ class zn extends OQ {
9122
9122
  const D = new Uint32Array(c.data.order);
9123
9123
  if (this.numSplatsRendered = D.length, D.length > this.orderAttribute.count) {
9124
9124
  const d = new YC(), h = new Float32Array([-0.5, 0.5, 0, 0.5, 0.5, 0, -0.5, -0.5, 0, 0.5, -0.5, 0]), b = [0, 2, 1, 2, 3, 1];
9125
- d.setIndex(b), d.setAttribute("position", new aI(h, 3));
9125
+ d.setIndex(b), d.setAttribute("position", new eI(h, 3));
9126
9126
  const l = new Uint32Array(this.maxSplats), R = new vQ(l, 1, !1);
9127
9127
  R.needsUpdate = !0, R.setUsage(HC), d.setAttribute("order", R), d.instanceCount = 0, this.geometry.dispose(), this.geometry = d, this.orderAttribute = R;
9128
9128
  }
@@ -9209,7 +9209,7 @@ void main() {
9209
9209
  const n = new Float32Array(E.length / a * 3), r = new Uint32Array(n.buffer, n.byteOffset, n.length);
9210
9210
  for (let D = 0; D < E.length / 3; D++) n[3 * D] = E[D * a + i], n[3 * D + 1] = E[D * a + i + 1], n[3 * D + 2] = E[D * a + i + 2];
9211
9211
  s = (D, d, h) => {
9212
- const b = h * h, l = Math.pow(C.material.uniforms.cropRadius.value, 2), R = new EI(), G = new bA(), p = new bA(), M = new bA(), k = new bA(), L = n.length / 3;
9212
+ const b = h * h, l = Math.pow(C.material.uniforms.cropRadius.value, 2), R = new aI(), G = new bA(), p = new bA(), M = new bA(), k = new bA(), L = n.length / 3;
9213
9213
  for (let U = 0; U < L; U++) {
9214
9214
  if (G.set(n[3 * U], -n[3 * U + 2], n[3 * U + 1]), G.lengthSq() > l || D.distanceSqToPoint(G) > b) continue;
9215
9215
  _n(I, Q, U, R);
@@ -9285,6 +9285,7 @@ out vec2 vUv;
9285
9285
  out vec3 splatPositionWorld;
9286
9286
  out vec3 splatPositionModel;
9287
9287
  out float splatDepth;
9288
+ out float splatDepthWithBias;
9288
9289
  out float stds;
9289
9290
  out vec2 viewZW;
9290
9291
  uniform highp usampler3D positionColorTexture;
@@ -9463,9 +9464,11 @@ void main() {
9463
9464
 
9464
9465
  #if defined( USE_LOGARITHMIC_DEPTH_BUFFER )
9465
9466
  float isPerspective = float( isPerspectiveMatrix( projectionMatrix ) );
9466
- splatDepth = isPerspective == 0.0 ? splatPositionProjectedWithBias.z : log2( 1.0 + splatPositionProjectedWithBias.w ) * logDepthBufFC * 0.5;
9467
+ splatDepthWithBias = isPerspective == 0.0 ? splatPositionProjectedWithBias.z : log2( 1.0 + splatPositionProjectedWithBias.w ) * logDepthBufFC * 0.5;
9468
+ splatDepth = isPerspective == 0.0 ? splatPositionProjected.z : log2( 1.0 + splatPositionProjected.w ) * logDepthBufFC * 0.5;
9467
9469
  #else
9468
- splatDepth = (splatPositionProjectedWithBias.z / splatPositionProjectedWithBias.w)* 0.5 + 0.5;
9470
+ splatDepthWithBias = (splatPositionProjectedWithBias.z / splatPositionProjectedWithBias.w)* 0.5 + 0.5;
9471
+ splatDepth = (splatPositionProjected.z / splatPositionProjected.w)* 0.5 + 0.5;
9469
9472
  #endif
9470
9473
 
9471
9474
 
@@ -9483,6 +9486,7 @@ in vec2 vUv;
9483
9486
  in vec3 splatPositionModel;
9484
9487
  in vec3 splatPositionWorld;
9485
9488
  in float splatDepth;
9489
+ in float splatDepthWithBias;
9486
9490
 
9487
9491
  layout(location = 0) out vec4 fragColor;
9488
9492
 
@@ -9500,7 +9504,7 @@ void main() {
9500
9504
  float alpha = color.w * exp(-beta_k * rk);
9501
9505
 
9502
9506
  fragColor = vec4(pow(color.xyz,vec3(1.0/2.2)), alpha);
9503
- gl_FragDepth = splatDepth;
9507
+ gl_FragDepth = splatDepthWithBias;
9504
9508
 
9505
9509
  }`;
9506
9510
  }
@@ -9524,19 +9528,19 @@ function _n(B, A, g, I) {
9524
9528
  function $n(B, A, g) {
9525
9529
  const I = B.determinant();
9526
9530
  if (Math.abs(I) < 1e-12) return void g.set(0, 0, 0);
9527
- const Q = 1 / I, C = new EI().copy(B);
9531
+ const Q = 1 / I, C = new aI().copy(B);
9528
9532
  C.elements[0] = A.x, C.elements[3] = A.y, C.elements[6] = A.z;
9529
- const E = new EI().copy(B);
9533
+ const E = new aI().copy(B);
9530
9534
  E.elements[1] = A.x, E.elements[4] = A.y, E.elements[7] = A.z;
9531
- const a = new EI().copy(B);
9535
+ const a = new aI().copy(B);
9532
9536
  a.elements[2] = A.x, a.elements[5] = A.y, a.elements[8] = A.z, g.set(C.determinant() * Q, E.determinant() * Q, a.determinant() * Q);
9533
9537
  }
9534
9538
  new bA(), new bA();
9535
9539
  var yA;
9536
- new EI().set(1, 0, 0, 0, 0, 1, 0, -1, 0), new Tg().set(1, 0, 0, 0, 0, 0, -1, 0, 0, 1, 0, 0, 0, 0, 0, 1);
9540
+ new aI().set(1, 0, 0, 0, 0, 1, 0, -1, 0), new Tg().set(1, 0, 0, 0, 0, 0, -1, 0, 0, 1, 0, 0, 0, 0, 0, 1);
9537
9541
  const yg = new P.Sphere(new P.Vector3(0, 0, 0), 1), jg = new lg([0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1]);
9538
9542
  new P.Box3();
9539
- const $g = new P.Vector3(0, 0, 0), LI = new P.Vector3(0, 0, 0), As = new P.Vector3(0, 1, 0), RB = new P.Ray(), NB = new P.Matrix4();
9543
+ const AI = new P.Vector3(0, 0, 0), LI = new P.Vector3(0, 0, 0), As = new P.Vector3(0, 1, 0), RB = new P.Ray(), NB = new P.Matrix4();
9540
9544
  new P.Matrix4(), new P.Frustum();
9541
9545
  const kB = new P.Vector3(), pB = [], vE = new P.Quaternion(), mg = {};
9542
9546
  function gs() {
@@ -9572,7 +9576,7 @@ class me extends P.Object3D {
9572
9576
  (g.proxy ? () => fetch(g.proxy, { method: "POST", body: I, signal: g.abortController.signal }) : () => fetch(I, { signal: g.abortController.signal }))().then((C) => {
9573
9577
  if (!C.ok) throw new Error(`couldn't load "${A.url}". Request failed with status ${C.status} : ${C.statusText}`);
9574
9578
  C.json().then((E) => cC(E, I)).then((E) => {
9575
- g._setup({ rootPath: CI.dirname(A.url), json: E });
9579
+ g._setup({ rootPath: EI.dirname(A.url), json: E });
9576
9580
  });
9577
9581
  }).catch((C) => {
9578
9582
  g.displayErrors && TE(C);
@@ -9628,7 +9632,7 @@ class me extends P.Object3D {
9628
9632
  if (g.json.boundingVolume) if (g.json.boundingVolume.box) g.boundingVolume = new lg(g.json.boundingVolume.box);
9629
9633
  else if (g.json.boundingVolume.region) {
9630
9634
  const Q = g.json.boundingVolume.region;
9631
- g._transformWGS84ToCartesian(Q[0], Q[1], Q[4], $g), g._transformWGS84ToCartesian(Q[2], Q[3], Q[5], LI), $g.lerp(LI, 0.5), g.boundingVolume = new P.Sphere(new P.Vector3($g.x, $g.y, $g.z), $g.distanceTo(LI));
9635
+ g._transformWGS84ToCartesian(Q[0], Q[1], Q[4], AI), g._transformWGS84ToCartesian(Q[2], Q[3], Q[5], LI), AI.lerp(LI, 0.5), g.boundingVolume = new P.Sphere(new P.Vector3(AI.x, AI.y, AI.z), AI.distanceTo(LI));
9632
9636
  } else if (g.json.boundingVolume.sphere) {
9633
9637
  const Q = g.json.boundingVolume.sphere;
9634
9638
  g.boundingVolume = new P.Sphere(new P.Vector3(Q[0], Q[1], Q[2]), Q[3]);
@@ -9637,7 +9641,7 @@ class me extends P.Object3D {
9637
9641
  function I(Q) {
9638
9642
  Q.uri && Q.uri.includes("json") || Q.url && Q.url.includes("json") ? g.hasUnloadedJSONContent++ : g.hasMeshContent++;
9639
9643
  }
9640
- if (g.json.content ? (I(g.json.content), g.hasMeshContent == 0 && (g.level = Math.max(0, g.parentTile ? g.parentTile.level + 0.01 : 0)), g._load()) : g.json.contents && (g.json.contents.forEach((Q) => I(Q)), g.hasMeshContent == 0 && (g.level = Math.max(0, g.parentTile ? g.parentTile.level + 0.01 : 0))), g.centerModel && (LI.copy(g.boundingVolume.center), this.json.boundingVolume.region && (this._transformWGS84ToCartesian(0.5 * (this.json.boundingVolume.region[0] + this.json.boundingVolume.region[2]), 0.5 * (this.json.boundingVolume.region[1] + this.json.boundingVolume.region[3]), 0.5 * (this.json.boundingVolume.region[4] + this.json.boundingVolume.region[5]), $g), vE.setFromUnitVectors($g.normalize(), As.normalize()), g.applyQuaternion(vE)), LI.applyMatrix4(g.matrix), g.position.sub(LI), g.updateMatrices()), g.onLoadCallback && g.onLoadCallback(g), g.isSetup = !0, g.level > 0 && g.drawBoundingVolume) if (g.bbox && console.log("double setup"), this.boundingVolume.aabb) {
9644
+ if (g.json.content ? (I(g.json.content), g.hasMeshContent == 0 && (g.level = Math.max(0, g.parentTile ? g.parentTile.level + 0.01 : 0)), g._load()) : g.json.contents && (g.json.contents.forEach((Q) => I(Q)), g.hasMeshContent == 0 && (g.level = Math.max(0, g.parentTile ? g.parentTile.level + 0.01 : 0))), g.centerModel && (LI.copy(g.boundingVolume.center), this.json.boundingVolume.region && (this._transformWGS84ToCartesian(0.5 * (this.json.boundingVolume.region[0] + this.json.boundingVolume.region[2]), 0.5 * (this.json.boundingVolume.region[1] + this.json.boundingVolume.region[3]), 0.5 * (this.json.boundingVolume.region[4] + this.json.boundingVolume.region[5]), AI), vE.setFromUnitVectors(AI.normalize(), As.normalize()), g.applyQuaternion(vE)), LI.applyMatrix4(g.matrix), g.position.sub(LI), g.updateMatrices()), g.onLoadCallback && g.onLoadCallback(g), g.isSetup = !0, g.level > 0 && g.drawBoundingVolume) if (g.bbox && console.log("double setup"), this.boundingVolume.aabb) {
9641
9645
  let Q = this.boundingVolume.aabb.clone();
9642
9646
  Q.applyMatrix4(this.matrixWorld), g.bbox = new P.Box3Helper(Q, new P.Color(Math.random(), Math.random(), Math.random())), g.add(g.bbox), g.bbox.material.visible = !1;
9643
9647
  } else g.boundingVolume instanceof lg && (g.bbox = g.boundingVolume.helper(), g.add(g.bbox), g.bbox.material.visible = !1);
@@ -9672,7 +9676,7 @@ class me extends P.Object3D {
9672
9676
  let t;
9673
9677
  C.uri ? t = C.uri : C.url && (t = C.url);
9674
9678
  const e = /^(?:http|https|ftp|tcp|udp):\/\/\S+/;
9675
- if (e.test(I.rootPath) ? e.test(t) || (t = I._assembleURL(I.rootPath, t)) : CI.isAbsolute(I.rootPath) && (t = I.rootPath + CI.sep + t), t.startsWith("/local-tiles") || (t = I._extractQueryParams(t, I.queryParams)), I.queryParams) {
9679
+ if (e.test(I.rootPath) ? e.test(t) || (t = I._assembleURL(I.rootPath, t)) : EI.isAbsolute(I.rootPath) && (t = I.rootPath + EI.sep + t), t.startsWith("/local-tiles") || (t = I._extractQueryParams(t, I.queryParams)), I.queryParams) {
9676
9680
  var o = "";
9677
9681
  for (let s in I.queryParams) I.queryParams.hasOwnProperty(s) && (o += "&" + s + "=" + I.queryParams[s]);
9678
9682
  t.includes("?") ? t += o : t += "?" + o.substring(1);
@@ -9693,7 +9697,7 @@ class me extends P.Object3D {
9693
9697
  I.displayErrors && TE(s);
9694
9698
  }
9695
9699
  else a && t.includes(".json") && (I.jsonRequested = t, I.tileLoader.get(I.abortController, I.uuid, t, async (s) => {
9696
- I.jsonReceived = !0, s.rootPath = CI.dirname(t), I.json.children.push(s), E == null ? delete I.json.content : I.json.contents.splice(E, 1), I.hasUnloadedJSONContent--;
9700
+ I.jsonReceived = !0, s.rootPath = EI.dirname(t), I.json.children.push(s), E == null ? delete I.json.content : I.json.contents.splice(E, 1), I.hasUnloadedJSONContent--;
9697
9701
  }));
9698
9702
  }
9699
9703
  }
@@ -9770,11 +9774,12 @@ class me extends P.Object3D {
9770
9774
  });
9771
9775
  }
9772
9776
  _trimTreeImmediate() {
9773
- if (this.metric != null) if (this.hasMeshContent && this.shouldBeVisible && this.materialVisibility) {
9774
- if (self.splatsMesh && !self.splatsReady) return;
9775
- this._disposeChildren();
9776
- } else this.childrenTiles.forEach((A) => {
9777
- A._trimTreeImmediate();
9777
+ const A = this;
9778
+ if (A.metric != null) if (A.hasMeshContent && A.shouldBeVisible && A.materialVisibility) {
9779
+ if (A.splatsMesh && !A.splatsReady) return;
9780
+ A._disposeChildren();
9781
+ } else A.childrenTiles.forEach((g) => {
9782
+ g._trimTreeImmediate();
9778
9783
  });
9779
9784
  }
9780
9785
  _updateNodeVisibilityImmediate(A = !1) {
@@ -9860,7 +9865,7 @@ class me extends P.Object3D {
9860
9865
  if (I.hasMeshContent) {
9861
9866
  if (!I.inFrustum) return void I._disposeChildren();
9862
9867
  if (I.occlusionCullingService && !E && I.hasMeshContent && I.meshContent.length > 0 && I.materialVisibility && I._areAllChildrenLoadedAndHidden())
9863
- return I.splatsMesh && this.materialVisibility && !I.splatsReady ? void 0 : void I._disposeChildren();
9868
+ return I.splatsMesh && I.materialVisibility && !I.splatsReady ? void 0 : void I._disposeChildren();
9864
9869
  if (C >= I.geometricErrorMultiplier * I.geometricError) {
9865
9870
  if (I.splatsMesh && I.materialVisibility && !I.splatsReady) return;
9866
9871
  I._disposeChildren();
@@ -9882,7 +9887,7 @@ class me extends P.Object3D {
9882
9887
  return this.childrenTiles.every((I) => {
9883
9888
  if (I.hasMeshContent) {
9884
9889
  if (I.childrenTiles.length > 0) return A = !1, !1;
9885
- if (!I.metric < 0) return !0;
9890
+ if (I.metric < 0) return !0;
9886
9891
  if (I.materialVisibility && (!g.splatsMesh || g.splatsReady) || g.occlusionCullingService.hasID(I.colorID)) return A = !1, !1;
9887
9892
  } else if (!I._areAllChildrenLoadedAndHidden()) return A = !1, !1;
9888
9893
  return !0;
@@ -9998,7 +10003,7 @@ function xQ() {
9998
10003
  A += g + ", ";
9999
10004
  }), A = A.slice(0, -2), yA.textContent = A;
10000
10005
  }
10001
- const eg = new P.Sphere(new P.Vector3(0, 0, 0), 1), AI = new P.Vector3(0, 0, 0), KQ = new P.Vector3(0, 0, 0), Is = new P.Vector3(0, 1, 0), jQ = new P.Vector2(), OE = new P.Quaternion(), WE = new P.Matrix4();
10006
+ const eg = new P.Sphere(new P.Vector3(0, 0, 0), 1), gI = new P.Vector3(0, 0, 0), KQ = new P.Vector3(0, 0, 0), Is = new P.Vector3(0, 1, 0), jQ = new P.Vector2(), OE = new P.Quaternion(), WE = new P.Matrix4();
10002
10007
  class FC extends P.Object3D {
10003
10008
  constructor(A) {
10004
10009
  super();
@@ -10006,7 +10011,7 @@ class FC extends P.Object3D {
10006
10011
  if (A.queryParams && (this.queryParams = { ...A.queryParams }), this.uuid = Za(), A.tileLoader ? this.tileLoader = A.tileLoader : console.error("an instanced tileset must be provided an InstancedTilesetLoader"), this.master = A.master, this.loadOutsideView = A.loadOutsideView, this.cameraOnLoad = A.cameraOnLoad, this.parentTile = A.parentTile, this.distanceBias = Math.max(1e-4, A.distanceBias ? A.distanceBias : 1), this.childrenTiles = [], this.jsonChildren = [], this.meshContent = /* @__PURE__ */ new Set(), this.static = A.static, this.static && (this.matrixAutoUpdate = !1, this.matrixWorldAutoUpdate = !1), this.tileContent, this.refinement, this.rootPath, this.geometricError, this.boundingVolume, this.json, this.materialVisibility = !1, this.inFrustum = !0, this.level = A.level ? A.level : 0, this.hasMeshContent = 0, this.hasUnloadedJSONContent = 0, this.centerModel = A.centerModel, this.deleted = !1, this.abortController = new AbortController(), A.json) this.rootPath = A.json.rootPath ? A.json.rootPath : A.rootPath, A.json.children && (this.jsonChildren = A.json.children), g.setup(A);
10007
10012
  else if (A.url) {
10008
10013
  this.loadJson = (C, E) => {
10009
- const a = CI.dirname(E);
10014
+ const a = EI.dirname(E);
10010
10015
  g.setup({ rootPath: a, json: C, onLoadCallback: A.onLoadCallback });
10011
10016
  };
10012
10017
  var I = A.url;
@@ -10025,7 +10030,7 @@ class FC extends P.Object3D {
10025
10030
  if (g.json.transform && !g.centerModel && (I.elements = g.json.transform), g.applyMatrix4(I), g.parentTile && g.parentTile.matrix && (g.matrix.premultiply(g.parentTile.matrix), g.matrix.decompose(g.position, g.quaternion, g.scale)), g.matrixWorldNeedsUpdate = !0, g.updateWorldMatrix(!0, !0), g.json.boundingVolume) if (g.json.boundingVolume.box) g.boundingVolume = new lg(g.json.boundingVolume.box);
10026
10031
  else if (g.json.boundingVolume.region) {
10027
10032
  const C = g.json.boundingVolume.region;
10028
- g.transformWGS84ToCartesian(C[0], C[1], C[4], AI), g.transformWGS84ToCartesian(C[2], C[3], C[5], KQ), AI.lerp(KQ, 0.5), g.boundingVolume = new P.Sphere(new P.Vector3(AI.x, AI.y, AI.z), AI.distanceTo(KQ));
10033
+ g.transformWGS84ToCartesian(C[0], C[1], C[4], gI), g.transformWGS84ToCartesian(C[2], C[3], C[5], KQ), gI.lerp(KQ, 0.5), g.boundingVolume = new P.Sphere(new P.Vector3(gI.x, gI.y, gI.z), gI.distanceTo(KQ));
10029
10034
  } else if (g.json.boundingVolume.sphere) {
10030
10035
  const C = g.json.boundingVolume.sphere;
10031
10036
  g.boundingVolume = new P.Sphere(new P.Vector3(C[0], C[1], C[2]), C[3]);
@@ -10036,7 +10041,7 @@ class FC extends P.Object3D {
10036
10041
  }
10037
10042
  if (g.json.content ? (Q(g.json.content), g.load()) : g.json.contents && (g.json.contents.forEach((C) => Q(C)), g.load()), g.centerModel) {
10038
10043
  const C = new P.Sphere();
10039
- g.boundingVolume instanceof lg ? C.copy(g.boundingVolume.sphere) : g.boundingVolume instanceof P.Sphere && C.copy(g.boundingVolume), this.json.boundingVolume.region && (g.transformWGS84ToCartesian(0.5 * (g.json.boundingVolume.region[0] + g.json.boundingVolume.region[2]), 0.5 * (g.json.boundingVolume.region[1] + g.json.boundingVolume.region[3]), 0.5 * (g.json.boundingVolume.region[4] + g.json.boundingVolume.region[5]), AI), OE.setFromUnitVectors(AI.normalize(), Is.normalize()), g.master.applyQuaternion(OE), g.master.updateWorldMatrix(!1, !1)), WE.makeTranslation(-C.center.x * g.scale.x, -C.center.y * g.scale.y, -C.center.z * g.scale.z), g.master.matrix.multiply(WE), g.master.matrix.decompose(g.master.position, g.master.quaternion, g.master.scale);
10044
+ g.boundingVolume instanceof lg ? C.copy(g.boundingVolume.sphere) : g.boundingVolume instanceof P.Sphere && C.copy(g.boundingVolume), this.json.boundingVolume.region && (g.transformWGS84ToCartesian(0.5 * (g.json.boundingVolume.region[0] + g.json.boundingVolume.region[2]), 0.5 * (g.json.boundingVolume.region[1] + g.json.boundingVolume.region[3]), 0.5 * (g.json.boundingVolume.region[4] + g.json.boundingVolume.region[5]), gI), OE.setFromUnitVectors(gI.normalize(), Is.normalize()), g.master.applyQuaternion(OE), g.master.updateWorldMatrix(!1, !1)), WE.makeTranslation(-C.center.x * g.scale.x, -C.center.y * g.scale.y, -C.center.z * g.scale.z), g.master.matrix.multiply(WE), g.master.matrix.decompose(g.master.position, g.master.quaternion, g.master.scale);
10040
10045
  }
10041
10046
  g.isSetup = !0, A.onLoadCallback && A.onLoadCallback(g);
10042
10047
  }
@@ -10067,7 +10072,7 @@ class FC extends P.Object3D {
10067
10072
  let Q;
10068
10073
  I.uri ? Q = I.uri : I.url && (Q = I.url);
10069
10074
  const C = /^(?:http|https|ftp|tcp|udp):\/\/\S+/;
10070
- if (C.test(A.rootPath) ? C.test(Q) || (Q = A.assembleURL(A.rootPath, Q)) : CI.isAbsolute(A.rootPath) && (Q = A.rootPath + CI.sep + Q), Q = A.extractQueryParams(Q, A.queryParams), A.queryParams) {
10075
+ if (C.test(A.rootPath) ? C.test(Q) || (Q = A.assembleURL(A.rootPath, Q)) : EI.isAbsolute(A.rootPath) && (Q = A.rootPath + EI.sep + Q), Q = A.extractQueryParams(Q, A.queryParams), A.queryParams) {
10071
10076
  var E = "";
10072
10077
  for (let a in A.queryParams) A.queryParams.hasOwnProperty(a) && (E += "&" + a + "=" + A.queryParams[a]);
10073
10078
  Q.includes("?") ? Q += E : Q += "?" + E.substring(1);
@@ -10080,7 +10085,7 @@ class FC extends P.Object3D {
10080
10085
  this.deleted || this.meshContent.add(A);
10081
10086
  }
10082
10087
  loadJson(A, g) {
10083
- this.deleted || (this.json.children && (this.jsonChildren = this.json.children), A.rootPath = CI.dirname(g), this.jsonChildren.push(A), this.hasUnloadedJSONContent--);
10088
+ this.deleted || (this.json.children && (this.jsonChildren = this.json.children), A.rootPath = EI.dirname(g), this.jsonChildren.push(A), this.hasUnloadedJSONContent--);
10084
10089
  }
10085
10090
  dispose() {
10086
10091
  const A = this;