vis-core 0.28.13 → 0.28.15

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,15 +1,15 @@
1
1
  (function(){"use strict";try{if(typeof document!="undefined"){var t=document.createElement("style");t.appendChild(document.createTextNode(".-translate-x-1\\/2,.-translate-y-1\\/2,.transform{--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1 }.shadow{--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000 }.invert,.filter{--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: }.visible{visibility:visible}.static{position:static}.absolute{position:absolute}.left-1\\/2{left:50%}.top-1\\/2{top:50%}.-translate-x-1\\/2{--tw-translate-x: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-translate-y-1\\/2{--tw-translate-y: -50%;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.resize{resize:both}.whitespace-nowrap{white-space:nowrap}.text-center{text-align:center}.text-sm{font-size:14px;line-height:20px}.leading-\\[1\\]{line-height:1}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-opacity-80{--tw-text-opacity: .8 }.shadow{--tw-shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--tw-shadow-colored: 0 1px 3px 0 var(--tw-shadow-color), 0 1px 2px -1px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.invert{--tw-invert: invert(100%);filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}")),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
2
2
  var En = Object.defineProperty, In = Object.defineProperties;
3
3
  var zn = Object.getOwnPropertyDescriptors;
4
- var wn = Object.getOwnPropertySymbols, Nn = Object.getPrototypeOf, Kn = Object.prototype.hasOwnProperty, An = Object.prototype.propertyIsEnumerable, kn = Reflect.get;
4
+ var wn = Object.getOwnPropertySymbols, Nn = Object.getPrototypeOf, An = Object.prototype.hasOwnProperty, Kn = Object.prototype.propertyIsEnumerable, kn = Reflect.get;
5
5
  var Gn = (g, t) => (t = Symbol[g]) ? t : Symbol.for("Symbol." + g), Fn = (g) => {
6
6
  throw TypeError(g);
7
- }, un = Math.pow, Zn = (g, t, r) => t in g ? En(g, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : g[t] = r, ui = (g, t) => {
7
+ }, un = Math.pow, Zn = (g, t, r) => t in g ? En(g, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : g[t] = r, Q0 = (g, t) => {
8
8
  for (var r in t || (t = {}))
9
- Kn.call(t, r) && Zn(g, r, t[r]);
9
+ An.call(t, r) && Zn(g, r, t[r]);
10
10
  if (wn)
11
11
  for (var r of wn(t))
12
- An.call(t, r) && Zn(g, r, t[r]);
12
+ Kn.call(t, r) && Zn(g, r, t[r]);
13
13
  return g;
14
14
  }, Bi = (g, t) => In(g, zn(t));
15
15
  var L0 = (g, t, r) => Zn(g, typeof t != "symbol" ? t + "" : t, r);
@@ -88,7 +88,7 @@ const publicKeyPEM = "LS0tLS1CRUdJTiBQVUJMSUMgS0VZLS0tLS0KTUlJQklqQU5CZ2txaGtpRz
88
88
  ).toString(CryptoJS.enc.Utf8), Ne = JSON.parse(Pe), Ae = Date.now();
89
89
  return !Ne.s || Ne.s > Ae ? (this.token = void 0, "") : Ne.e && Ne.e < Ae ? (this.token = void 0, "") : (Ne.isValid = O, Ne);
90
90
  }
91
- }, version = "0.28.13";
91
+ }, version = "0.28.15";
92
92
  /**
93
93
  * @license
94
94
  * Copyright 2010-2025 Three.js Authors
@@ -6367,10 +6367,10 @@ class Object3D extends EventDispatcher {
6367
6367
  generator: "Object3D.toJSON"
6368
6368
  });
6369
6369
  const v = {};
6370
- v.uuid = this.uuid, v.type = this.type, this.name !== "" && (v.name = this.name), this.castShadow === !0 && (v.castShadow = !0), this.receiveShadow === !0 && (v.receiveShadow = !0), this.visible === !1 && (v.visible = !1), this.frustumCulled === !1 && (v.frustumCulled = !1), this.renderOrder !== 0 && (v.renderOrder = this.renderOrder), Object.keys(this.userData).length > 0 && (v.userData = this.userData), v.layers = this.layers.mask, v.matrix = this.matrix.toArray(), v.up = this.up.toArray(), this.matrixAutoUpdate === !1 && (v.matrixAutoUpdate = !1), this.isInstancedMesh && (v.type = "InstancedMesh", v.count = this.count, v.instanceMatrix = this.instanceMatrix.toJSON(), this.instanceColor !== null && (v.instanceColor = this.instanceColor.toJSON())), this.isBatchedMesh && (v.type = "BatchedMesh", v.perObjectFrustumCulled = this.perObjectFrustumCulled, v.sortObjects = this.sortObjects, v.drawRanges = this._drawRanges, v.reservedRanges = this._reservedRanges, v.geometryInfo = this._geometryInfo.map((w) => Bi(ui({}, w), {
6370
+ v.uuid = this.uuid, v.type = this.type, this.name !== "" && (v.name = this.name), this.castShadow === !0 && (v.castShadow = !0), this.receiveShadow === !0 && (v.receiveShadow = !0), this.visible === !1 && (v.visible = !1), this.frustumCulled === !1 && (v.frustumCulled = !1), this.renderOrder !== 0 && (v.renderOrder = this.renderOrder), Object.keys(this.userData).length > 0 && (v.userData = this.userData), v.layers = this.layers.mask, v.matrix = this.matrix.toArray(), v.up = this.up.toArray(), this.matrixAutoUpdate === !1 && (v.matrixAutoUpdate = !1), this.isInstancedMesh && (v.type = "InstancedMesh", v.count = this.count, v.instanceMatrix = this.instanceMatrix.toJSON(), this.instanceColor !== null && (v.instanceColor = this.instanceColor.toJSON())), this.isBatchedMesh && (v.type = "BatchedMesh", v.perObjectFrustumCulled = this.perObjectFrustumCulled, v.sortObjects = this.sortObjects, v.drawRanges = this._drawRanges, v.reservedRanges = this._reservedRanges, v.geometryInfo = this._geometryInfo.map((w) => Bi(Q0({}, w), {
6371
6371
  boundingBox: w.boundingBox ? w.boundingBox.toJSON() : void 0,
6372
6372
  boundingSphere: w.boundingSphere ? w.boundingSphere.toJSON() : void 0
6373
- })), v.instanceInfo = this._instanceInfo.map((w) => ui({}, w)), v.availableInstanceIds = this._availableInstanceIds.slice(), v.availableGeometryIds = this._availableGeometryIds.slice(), v.nextIndexStart = this._nextIndexStart, v.nextVertexStart = this._nextVertexStart, v.geometryCount = this._geometryCount, v.maxInstanceCount = this._maxInstanceCount, v.maxVertexCount = this._maxVertexCount, v.maxIndexCount = this._maxIndexCount, v.geometryInitialized = this._geometryInitialized, v.matricesTexture = this._matricesTexture.toJSON(t), v.indirectTexture = this._indirectTexture.toJSON(t), this._colorsTexture !== null && (v.colorsTexture = this._colorsTexture.toJSON(t)), this.boundingSphere !== null && (v.boundingSphere = this.boundingSphere.toJSON()), this.boundingBox !== null && (v.boundingBox = this.boundingBox.toJSON()));
6373
+ })), v.instanceInfo = this._instanceInfo.map((w) => Q0({}, w)), v.availableInstanceIds = this._availableInstanceIds.slice(), v.availableGeometryIds = this._availableGeometryIds.slice(), v.nextIndexStart = this._nextIndexStart, v.nextVertexStart = this._nextVertexStart, v.geometryCount = this._geometryCount, v.maxInstanceCount = this._maxInstanceCount, v.maxVertexCount = this._maxVertexCount, v.maxIndexCount = this._maxIndexCount, v.geometryInitialized = this._geometryInitialized, v.matricesTexture = this._matricesTexture.toJSON(t), v.indirectTexture = this._indirectTexture.toJSON(t), this._colorsTexture !== null && (v.colorsTexture = this._colorsTexture.toJSON(t)), this.boundingSphere !== null && (v.boundingSphere = this.boundingSphere.toJSON()), this.boundingBox !== null && (v.boundingBox = this.boundingBox.toJSON()));
6374
6374
  function C(w, E) {
6375
6375
  return w[E.uuid] === void 0 && (w[E.uuid] = E.toJSON(t)), E.uuid;
6376
6376
  }
@@ -8771,14 +8771,14 @@ class BoxGeometry extends BufferGeometry {
8771
8771
  for (let f0 = 0; f0 < Yt; f0++) {
8772
8772
  const m0 = f0 * Kt - n0;
8773
8773
  for (let w0 = 0; w0 < i0; w0++) {
8774
- const Q0 = w0 * Nt - t0;
8775
- r0[ct] = Q0 * je, r0[Oe] = m0 * at, r0[ke] = o0, O.push(r0.x, r0.y, r0.z), r0[ct] = 0, r0[Oe] = 0, r0[ke] = Lt > 0 ? 1 : -1, ve.push(r0.x, r0.y, r0.z), Pe.push(w0 / Wt), Pe.push(1 - f0 / Pt), qt += 1;
8774
+ const $0 = w0 * Nt - t0;
8775
+ r0[ct] = $0 * je, r0[Oe] = m0 * at, r0[ke] = o0, O.push(r0.x, r0.y, r0.z), r0[ct] = 0, r0[Oe] = 0, r0[ke] = Lt > 0 ? 1 : -1, ve.push(r0.x, r0.y, r0.z), Pe.push(w0 / Wt), Pe.push(1 - f0 / Pt), qt += 1;
8776
8776
  }
8777
8777
  }
8778
8778
  for (let f0 = 0; f0 < Pt; f0++)
8779
8779
  for (let m0 = 0; m0 < Wt; m0++) {
8780
- const w0 = Ne + m0 + i0 * f0, Q0 = Ne + m0 + i0 * (f0 + 1), v0 = Ne + (m0 + 1) + i0 * (f0 + 1), I0 = Ne + (m0 + 1) + i0 * f0;
8781
- E.push(w0, Q0, I0), E.push(Q0, v0, I0), kt += 6;
8780
+ const w0 = Ne + m0 + i0 * f0, $0 = Ne + m0 + i0 * (f0 + 1), v0 = Ne + (m0 + 1) + i0 * (f0 + 1), I0 = Ne + (m0 + 1) + i0 * f0;
8781
+ E.push(w0, $0, I0), E.push($0, v0, I0), kt += 6;
8782
8782
  }
8783
8783
  w.addGroup(Ae, kt, zt), Ae += kt, Ne += qt;
8784
8784
  }
@@ -11572,10 +11572,10 @@ class BatchedMesh extends Mesh {
11572
11572
  _mesh.material = null, _mesh.geometry.index = null, _mesh.geometry.attributes = {}, _mesh.geometry.setDrawRange(0, 1 / 0);
11573
11573
  }
11574
11574
  copy(t) {
11575
- return super.copy(t), this.geometry = t.geometry.clone(), this.perObjectFrustumCulled = t.perObjectFrustumCulled, this.sortObjects = t.sortObjects, this.boundingBox = t.boundingBox !== null ? t.boundingBox.clone() : null, this.boundingSphere = t.boundingSphere !== null ? t.boundingSphere.clone() : null, this._geometryInfo = t._geometryInfo.map((r) => Bi(ui({}, r), {
11575
+ return super.copy(t), this.geometry = t.geometry.clone(), this.perObjectFrustumCulled = t.perObjectFrustumCulled, this.sortObjects = t.sortObjects, this.boundingBox = t.boundingBox !== null ? t.boundingBox.clone() : null, this.boundingSphere = t.boundingSphere !== null ? t.boundingSphere.clone() : null, this._geometryInfo = t._geometryInfo.map((r) => Bi(Q0({}, r), {
11576
11576
  boundingBox: r.boundingBox !== null ? r.boundingBox.clone() : null,
11577
11577
  boundingSphere: r.boundingSphere !== null ? r.boundingSphere.clone() : null
11578
- })), this._instanceInfo = t._instanceInfo.map((r) => ui({}, r)), this._availableInstanceIds = t._availableInstanceIds.slice(), this._availableGeometryIds = t._availableGeometryIds.slice(), this._nextIndexStart = t._nextIndexStart, this._nextVertexStart = t._nextVertexStart, this._geometryCount = t._geometryCount, this._maxInstanceCount = t._maxInstanceCount, this._maxVertexCount = t._maxVertexCount, this._maxIndexCount = t._maxIndexCount, this._geometryInitialized = t._geometryInitialized, this._multiDrawCounts = t._multiDrawCounts.slice(), this._multiDrawStarts = t._multiDrawStarts.slice(), this._indirectTexture = t._indirectTexture.clone(), this._indirectTexture.image.data = this._indirectTexture.image.data.slice(), this._matricesTexture = t._matricesTexture.clone(), this._matricesTexture.image.data = this._matricesTexture.image.data.slice(), this._colorsTexture !== null && (this._colorsTexture = t._colorsTexture.clone(), this._colorsTexture.image.data = this._colorsTexture.image.data.slice()), this;
11578
+ })), this._instanceInfo = t._instanceInfo.map((r) => Q0({}, r)), this._availableInstanceIds = t._availableInstanceIds.slice(), this._availableGeometryIds = t._availableGeometryIds.slice(), this._nextIndexStart = t._nextIndexStart, this._nextVertexStart = t._nextVertexStart, this._geometryCount = t._geometryCount, this._maxInstanceCount = t._maxInstanceCount, this._maxVertexCount = t._maxVertexCount, this._maxIndexCount = t._maxIndexCount, this._geometryInitialized = t._geometryInitialized, this._multiDrawCounts = t._multiDrawCounts.slice(), this._multiDrawStarts = t._multiDrawStarts.slice(), this._indirectTexture = t._indirectTexture.clone(), this._indirectTexture.image.data = this._indirectTexture.image.data.slice(), this._matricesTexture = t._matricesTexture.clone(), this._matricesTexture.image.data = this._matricesTexture.image.data.slice(), this._colorsTexture !== null && (this._colorsTexture = t._colorsTexture.clone(), this._colorsTexture.image.data = this._colorsTexture.image.data.slice()), this;
11579
11579
  }
11580
11580
  /**
11581
11581
  * Frees the GPU-related resources allocated by this instance. Call this
@@ -14082,7 +14082,7 @@ class ExtrudeGeometry extends BufferGeometry {
14082
14082
  const j0 = 10000000000000001e-36;
14083
14083
  let gi = l0[0];
14084
14084
  for (let k0 = 1; k0 <= l0.length; k0++) {
14085
- const P0 = k0 % l0.length, C0 = l0[P0], E0 = C0.x - gi.x, $0 = C0.y - gi.y, a0 = E0 * E0 + $0 * $0, s0 = Math.max(
14085
+ const P0 = k0 % l0.length, C0 = l0[P0], E0 = C0.x - gi.x, q0 = C0.y - gi.y, a0 = E0 * E0 + q0 * q0, s0 = Math.max(
14086
14086
  Math.abs(C0.x),
14087
14087
  Math.abs(C0.y),
14088
14088
  Math.abs(gi.x),
@@ -14107,9 +14107,9 @@ class ExtrudeGeometry extends BufferGeometry {
14107
14107
  const qt = Nt.length;
14108
14108
  function kt(l0, Si, j0) {
14109
14109
  let gi, k0, P0;
14110
- const C0 = l0.x - Si.x, E0 = l0.y - Si.y, $0 = j0.x - l0.x, a0 = j0.y - l0.y, s0 = C0 * C0 + E0 * E0, S0 = C0 * a0 - E0 * $0;
14110
+ const C0 = l0.x - Si.x, E0 = l0.y - Si.y, q0 = j0.x - l0.x, a0 = j0.y - l0.y, s0 = C0 * C0 + E0 * E0, S0 = C0 * a0 - E0 * q0;
14111
14111
  if (Math.abs(S0) > Number.EPSILON) {
14112
- const R0 = Math.sqrt(s0), A0 = Math.sqrt($0 * $0 + a0 * a0), V0 = Si.x - E0 / R0, Ri = Si.y + C0 / R0, Ci = j0.x - a0 / A0, _i = j0.y + $0 / A0, Pi = ((Ci - V0) * a0 - (_i - Ri) * $0) / (C0 * a0 - E0 * $0);
14112
+ const R0 = Math.sqrt(s0), K0 = Math.sqrt(q0 * q0 + a0 * a0), V0 = Si.x - E0 / R0, Ri = Si.y + C0 / R0, Ci = j0.x - a0 / K0, _i = j0.y + q0 / K0, Pi = ((Ci - V0) * a0 - (_i - Ri) * q0) / (C0 * a0 - E0 * q0);
14113
14113
  gi = V0 + C0 * Pi - l0.x, k0 = Ri + E0 * Pi - l0.y;
14114
14114
  const U0 = gi * gi + k0 * k0;
14115
14115
  if (U0 <= 2)
@@ -14117,7 +14117,7 @@ class ExtrudeGeometry extends BufferGeometry {
14117
14117
  P0 = Math.sqrt(U0 / 2);
14118
14118
  } else {
14119
14119
  let R0 = !1;
14120
- C0 > Number.EPSILON ? $0 > Number.EPSILON && (R0 = !0) : C0 < -Number.EPSILON ? $0 < -Number.EPSILON && (R0 = !0) : Math.sign(E0) === Math.sign(a0) && (R0 = !0), R0 ? (gi = -E0, k0 = C0, P0 = Math.sqrt(s0)) : (gi = C0, k0 = E0, P0 = Math.sqrt(s0 / 2));
14120
+ C0 > Number.EPSILON ? q0 > Number.EPSILON && (R0 = !0) : C0 < -Number.EPSILON ? q0 < -Number.EPSILON && (R0 = !0) : Math.sign(E0) === Math.sign(a0) && (R0 = !0), R0 ? (gi = -E0, k0 = C0, P0 = Math.sqrt(s0)) : (gi = C0, k0 = E0, P0 = Math.sqrt(s0 / 2));
14121
14121
  }
14122
14122
  return new Vector2(gi / P0, k0 / P0);
14123
14123
  }
@@ -14133,31 +14133,31 @@ class ExtrudeGeometry extends BufferGeometry {
14133
14133
  P0 === k0 && (P0 = 0), C0 === k0 && (C0 = 0), m0[gi] = kt(j0[gi], j0[P0], j0[C0]);
14134
14134
  f0.push(m0), w0 = w0.concat(m0);
14135
14135
  }
14136
- let Q0;
14136
+ let $0;
14137
14137
  if (Oe === 0)
14138
- Q0 = ShapeUtils.triangulateShape(i0, Kt);
14138
+ $0 = ShapeUtils.triangulateShape(i0, Kt);
14139
14139
  else {
14140
14140
  const l0 = [], Si = [];
14141
14141
  for (let j0 = 0; j0 < Oe; j0++) {
14142
14142
  const gi = j0 / Oe, k0 = Ae * Math.cos(gi * Math.PI / 2), P0 = Fe * Math.sin(gi * Math.PI / 2) + ct;
14143
14143
  for (let C0 = 0, E0 = i0.length; C0 < E0; C0++) {
14144
- const $0 = Yt(i0[C0], r0[C0], P0);
14145
- wi($0.x, $0.y, -k0), gi === 0 && l0.push($0);
14144
+ const q0 = Yt(i0[C0], r0[C0], P0);
14145
+ wi(q0.x, q0.y, -k0), gi === 0 && l0.push(q0);
14146
14146
  }
14147
14147
  for (let C0 = 0, E0 = o0; C0 < E0; C0++) {
14148
- const $0 = Kt[C0];
14148
+ const q0 = Kt[C0];
14149
14149
  m0 = f0[C0];
14150
14150
  const a0 = [];
14151
- for (let s0 = 0, S0 = $0.length; s0 < S0; s0++) {
14152
- const R0 = Yt($0[s0], m0[s0], P0);
14151
+ for (let s0 = 0, S0 = q0.length; s0 < S0; s0++) {
14152
+ const R0 = Yt(q0[s0], m0[s0], P0);
14153
14153
  wi(R0.x, R0.y, -k0), gi === 0 && a0.push(R0);
14154
14154
  }
14155
14155
  gi === 0 && Si.push(a0);
14156
14156
  }
14157
14157
  }
14158
- Q0 = ShapeUtils.triangulateShape(l0, Si);
14158
+ $0 = ShapeUtils.triangulateShape(l0, Si);
14159
14159
  }
14160
- const v0 = Q0.length, I0 = Fe + ct;
14160
+ const v0 = $0.length, I0 = Fe + ct;
14161
14161
  for (let l0 = 0; l0 < qt; l0++) {
14162
14162
  const Si = Ne ? Yt(Nt[l0], w0[l0], I0) : Nt[l0];
14163
14163
  xt ? (Wt.copy(Gt.normals[0]).multiplyScalar(Si.x), Lt.copy(Gt.binormals[0]).multiplyScalar(Si.y), Pt.copy(at[0]).add(Wt).add(Lt), wi(Pt.x, Pt.y, Pt.z)) : wi(Si.x, Si.y, 0);
@@ -14176,33 +14176,33 @@ class ExtrudeGeometry extends BufferGeometry {
14176
14176
  for (let k0 = 0, P0 = Kt.length; k0 < P0; k0++) {
14177
14177
  const C0 = Kt[k0];
14178
14178
  m0 = f0[k0];
14179
- for (let E0 = 0, $0 = C0.length; E0 < $0; E0++) {
14179
+ for (let E0 = 0, q0 = C0.length; E0 < q0; E0++) {
14180
14180
  const a0 = Yt(C0[E0], m0[E0], gi);
14181
14181
  xt ? wi(a0.x, a0.y + at[ve - 1].y, at[ve - 1].x + j0) : wi(a0.x, a0.y, Pe + j0);
14182
14182
  }
14183
14183
  }
14184
14184
  }
14185
- K0(), O0();
14186
- function K0() {
14185
+ A0(), O0();
14186
+ function A0() {
14187
14187
  const l0 = v.length / 3;
14188
14188
  if (Ne) {
14189
14189
  let Si = 0, j0 = qt * Si;
14190
14190
  for (let gi = 0; gi < v0; gi++) {
14191
- const k0 = Q0[gi];
14191
+ const k0 = $0[gi];
14192
14192
  Li(k0[2] + j0, k0[1] + j0, k0[0] + j0);
14193
14193
  }
14194
14194
  Si = ve + Oe * 2, j0 = qt * Si;
14195
14195
  for (let gi = 0; gi < v0; gi++) {
14196
- const k0 = Q0[gi];
14196
+ const k0 = $0[gi];
14197
14197
  Li(k0[0] + j0, k0[1] + j0, k0[2] + j0);
14198
14198
  }
14199
14199
  } else {
14200
14200
  for (let Si = 0; Si < v0; Si++) {
14201
- const j0 = Q0[Si];
14201
+ const j0 = $0[Si];
14202
14202
  Li(j0[2], j0[1], j0[0]);
14203
14203
  }
14204
14204
  for (let Si = 0; Si < v0; Si++) {
14205
- const j0 = Q0[Si];
14205
+ const j0 = $0[Si];
14206
14206
  Li(j0[0] + qt * ve, j0[1] + qt * ve, j0[2] + qt * ve);
14207
14207
  }
14208
14208
  }
@@ -14225,7 +14225,7 @@ class ExtrudeGeometry extends BufferGeometry {
14225
14225
  let k0 = j0 - 1;
14226
14226
  k0 < 0 && (k0 = l0.length - 1);
14227
14227
  for (let P0 = 0, C0 = ve + Oe * 2; P0 < C0; P0++) {
14228
- const E0 = qt * P0, $0 = qt * (P0 + 1), a0 = Si + gi + E0, s0 = Si + k0 + E0, S0 = Si + k0 + $0, R0 = Si + gi + $0;
14228
+ const E0 = qt * P0, q0 = qt * (P0 + 1), a0 = Si + gi + E0, s0 = Si + k0 + E0, S0 = Si + k0 + q0, R0 = Si + gi + q0;
14229
14229
  ki(a0, s0, S0, R0);
14230
14230
  }
14231
14231
  }
@@ -14234,16 +14234,16 @@ class ExtrudeGeometry extends BufferGeometry {
14234
14234
  E.push(l0), E.push(Si), E.push(j0);
14235
14235
  }
14236
14236
  function Li(l0, Si, j0) {
14237
- Ai(l0), Ai(Si), Ai(j0);
14237
+ Ki(l0), Ki(Si), Ki(j0);
14238
14238
  const gi = v.length / 3, k0 = je.generateTopUV(m, v, gi - 3, gi - 2, gi - 1);
14239
14239
  B0(k0[0]), B0(k0[1]), B0(k0[2]);
14240
14240
  }
14241
14241
  function ki(l0, Si, j0, gi) {
14242
- Ai(l0), Ai(Si), Ai(gi), Ai(Si), Ai(j0), Ai(gi);
14242
+ Ki(l0), Ki(Si), Ki(gi), Ki(Si), Ki(j0), Ki(gi);
14243
14243
  const k0 = v.length / 3, P0 = je.generateSideWallUV(m, v, k0 - 6, k0 - 3, k0 - 2, k0 - 1);
14244
14244
  B0(P0[0]), B0(P0[1]), B0(P0[3]), B0(P0[1]), B0(P0[2]), B0(P0[3]);
14245
14245
  }
14246
- function Ai(l0) {
14246
+ function Ki(l0) {
14247
14247
  v.push(E[l0 * 3 + 0]), v.push(E[l0 * 3 + 1]), v.push(E[l0 * 3 + 2]);
14248
14248
  }
14249
14249
  function B0(l0) {
@@ -18223,7 +18223,7 @@ class ObjectLoader extends Loader {
18223
18223
  case "BatchedMesh":
18224
18224
  ve = w(t.geometry), Pe = E(t.material), _ = new BatchedMesh(t.maxInstanceCount, t.maxVertexCount, t.maxIndexCount, Pe), _.geometry = ve, _.perObjectFrustumCulled = t.perObjectFrustumCulled, _.sortObjects = t.sortObjects, _._drawRanges = t.drawRanges, _._reservedRanges = t.reservedRanges, _._geometryInfo = t.geometryInfo.map((ct) => {
18225
18225
  let Oe = null, ke = null;
18226
- return ct.boundingBox !== void 0 && (Oe = new Box3().fromJSON(ct.boundingBox)), ct.boundingSphere !== void 0 && (ke = new Sphere$1().fromJSON(ct.boundingSphere)), Bi(ui({}, ct), {
18226
+ return ct.boundingBox !== void 0 && (Oe = new Box3().fromJSON(ct.boundingBox)), ct.boundingSphere !== void 0 && (ke = new Sphere$1().fromJSON(ct.boundingSphere)), Bi(Q0({}, ct), {
18227
18227
  boundingBox: Oe,
18228
18228
  boundingSphere: ke
18229
18229
  });
@@ -26534,7 +26534,7 @@ function WebGLBindingStates(g, t) {
26534
26534
  if (r0 === void 0 && (qt === "instanceMatrix" && Nt.instanceMatrix && (r0 = Nt.instanceMatrix), qt === "instanceColor" && Nt.instanceColor && (r0 = Nt.instanceColor)), r0 !== void 0) {
26535
26535
  const f0 = r0.normalized, m0 = r0.itemSize, w0 = t.get(r0);
26536
26536
  if (w0 === void 0) continue;
26537
- const Q0 = w0.buffer, v0 = w0.type, I0 = w0.bytesPerElement, K0 = v0 === g.INT || v0 === g.UNSIGNED_INT || r0.gpuType === IntType;
26537
+ const $0 = w0.buffer, v0 = w0.type, I0 = w0.bytesPerElement, A0 = v0 === g.INT || v0 === g.UNSIGNED_INT || r0.gpuType === IntType;
26538
26538
  if (r0.isInterleavedBufferAttribute) {
26539
26539
  const O0 = r0.data, xi = O0.stride, wi = r0.offset;
26540
26540
  if (O0.isInstancedInterleavedBuffer) {
@@ -26544,7 +26544,7 @@ function WebGLBindingStates(g, t) {
26544
26544
  } else
26545
26545
  for (let Li = 0; Li < kt.locationSize; Li++)
26546
26546
  Oe(kt.location + Li);
26547
- g.bindBuffer(g.ARRAY_BUFFER, Q0);
26547
+ g.bindBuffer(g.ARRAY_BUFFER, $0);
26548
26548
  for (let Li = 0; Li < kt.locationSize; Li++)
26549
26549
  at(
26550
26550
  kt.location + Li,
@@ -26553,7 +26553,7 @@ function WebGLBindingStates(g, t) {
26553
26553
  f0,
26554
26554
  xi * I0,
26555
26555
  (wi + m0 / kt.locationSize * Li) * I0,
26556
- K0
26556
+ A0
26557
26557
  );
26558
26558
  } else {
26559
26559
  if (r0.isInstancedBufferAttribute) {
@@ -26563,7 +26563,7 @@ function WebGLBindingStates(g, t) {
26563
26563
  } else
26564
26564
  for (let O0 = 0; O0 < kt.locationSize; O0++)
26565
26565
  Oe(kt.location + O0);
26566
- g.bindBuffer(g.ARRAY_BUFFER, Q0);
26566
+ g.bindBuffer(g.ARRAY_BUFFER, $0);
26567
26567
  for (let O0 = 0; O0 < kt.locationSize; O0++)
26568
26568
  at(
26569
26569
  kt.location + O0,
@@ -26572,7 +26572,7 @@ function WebGLBindingStates(g, t) {
26572
26572
  f0,
26573
26573
  m0 * I0,
26574
26574
  m0 / kt.locationSize * O0 * I0,
26575
- K0
26575
+ A0
26576
26576
  );
26577
26577
  }
26578
26578
  } else if (Yt !== void 0) {
@@ -28648,24 +28648,24 @@ function WebGLPrograms(g, t, r, m, v, C, _) {
28648
28648
  const f0 = i0.morphAttributes.position || i0.morphAttributes.normal || i0.morphAttributes.color, m0 = f0 !== void 0 ? f0.length : 0;
28649
28649
  let w0 = 0;
28650
28650
  i0.morphAttributes.position !== void 0 && (w0 = 1), i0.morphAttributes.normal !== void 0 && (w0 = 2), i0.morphAttributes.color !== void 0 && (w0 = 3);
28651
- let Q0, v0, I0, K0;
28651
+ let $0, v0, I0, A0;
28652
28652
  if (r0) {
28653
28653
  const Qi = ShaderLib[r0];
28654
- Q0 = Qi.vertexShader, v0 = Qi.fragmentShader;
28654
+ $0 = Qi.vertexShader, v0 = Qi.fragmentShader;
28655
28655
  } else
28656
- Q0 = zt.vertexShader, v0 = zt.fragmentShader, E.update(zt), I0 = E.getVertexShaderID(zt), K0 = E.getFragmentShaderID(zt);
28657
- const O0 = g.getRenderTarget(), xi = g.state.buffers.depth.getReversed(), wi = n0.isInstancedMesh === !0, Li = n0.isBatchedMesh === !0, ki = !!zt.map, Ai = !!zt.matcap, B0 = !!qt, l0 = !!zt.aoMap, Si = !!zt.lightMap, j0 = !!zt.bumpMap, gi = !!zt.normalMap, k0 = !!zt.displacementMap, P0 = !!zt.emissiveMap, C0 = !!zt.metalnessMap, E0 = !!zt.roughnessMap, $0 = zt.anisotropy > 0, a0 = zt.clearcoat > 0, s0 = zt.dispersion > 0, S0 = zt.iridescence > 0, R0 = zt.sheen > 0, A0 = zt.transmission > 0, V0 = $0 && !!zt.anisotropyMap, Ri = a0 && !!zt.clearcoatMap, Ci = a0 && !!zt.clearcoatNormalMap, _i = a0 && !!zt.clearcoatRoughnessMap, Pi = S0 && !!zt.iridescenceMap, U0 = S0 && !!zt.iridescenceThicknessMap, Zi = R0 && !!zt.sheenColorMap, Hi = R0 && !!zt.sheenRoughnessMap, Ni = !!zt.specularMap, Mi = !!zt.specularColorMap, Vi = !!zt.specularIntensityMap, G0 = A0 && !!zt.transmissionMap, N0 = A0 && !!zt.thicknessMap, yi = !!zt.gradientMap, Ei = !!zt.alphaMap, Ti = zt.alphaTest > 0, q0 = !!zt.alphaHash, Ki = !!zt.extensions;
28656
+ $0 = zt.vertexShader, v0 = zt.fragmentShader, E.update(zt), I0 = E.getVertexShaderID(zt), A0 = E.getFragmentShaderID(zt);
28657
+ const O0 = g.getRenderTarget(), xi = g.state.buffers.depth.getReversed(), wi = n0.isInstancedMesh === !0, Li = n0.isBatchedMesh === !0, ki = !!zt.map, Ki = !!zt.matcap, B0 = !!qt, l0 = !!zt.aoMap, Si = !!zt.lightMap, j0 = !!zt.bumpMap, gi = !!zt.normalMap, k0 = !!zt.displacementMap, P0 = !!zt.emissiveMap, C0 = !!zt.metalnessMap, E0 = !!zt.roughnessMap, q0 = zt.anisotropy > 0, a0 = zt.clearcoat > 0, s0 = zt.dispersion > 0, S0 = zt.iridescence > 0, R0 = zt.sheen > 0, K0 = zt.transmission > 0, V0 = q0 && !!zt.anisotropyMap, Ri = a0 && !!zt.clearcoatMap, Ci = a0 && !!zt.clearcoatNormalMap, _i = a0 && !!zt.clearcoatRoughnessMap, Pi = S0 && !!zt.iridescenceMap, U0 = S0 && !!zt.iridescenceThicknessMap, Zi = R0 && !!zt.sheenColorMap, Hi = R0 && !!zt.sheenRoughnessMap, Ni = !!zt.specularMap, Mi = !!zt.specularColorMap, Vi = !!zt.specularIntensityMap, G0 = K0 && !!zt.transmissionMap, N0 = K0 && !!zt.thicknessMap, yi = !!zt.gradientMap, Ei = !!zt.alphaMap, Ti = zt.alphaTest > 0, ui = !!zt.alphaHash, Ai = !!zt.extensions;
28658
28658
  let Oi = NoToneMapping;
28659
28659
  zt.toneMapped && (O0 === null || O0.isXRRenderTarget === !0) && (Oi = g.toneMapping);
28660
28660
  const qi = {
28661
28661
  shaderID: r0,
28662
28662
  shaderType: zt.type,
28663
28663
  shaderName: zt.name,
28664
- vertexShader: Q0,
28664
+ vertexShader: $0,
28665
28665
  fragmentShader: v0,
28666
28666
  defines: zt.defines,
28667
28667
  customVertexShaderID: I0,
28668
- customFragmentShaderID: K0,
28668
+ customFragmentShaderID: A0,
28669
28669
  isRawShaderMaterial: zt.isRawShaderMaterial === !0,
28670
28670
  glslVersion: zt.glslVersion,
28671
28671
  precision: Ae,
@@ -28678,7 +28678,7 @@ function WebGLPrograms(g, t, r, m, v, C, _) {
28678
28678
  outputColorSpace: O0 === null ? g.outputColorSpace : O0.isXRRenderTarget === !0 ? O0.texture.colorSpace : LinearSRGBColorSpace,
28679
28679
  alphaToCoverage: !!zt.alphaToCoverage,
28680
28680
  map: ki,
28681
- matcap: Ai,
28681
+ matcap: Ki,
28682
28682
  envMap: B0,
28683
28683
  envMapMode: B0 && qt.mapping,
28684
28684
  envMapCubeUVHeight: kt,
@@ -28692,7 +28692,7 @@ function WebGLPrograms(g, t, r, m, v, C, _) {
28692
28692
  normalMapTangentSpace: gi && zt.normalMapType === TangentSpaceNormalMap,
28693
28693
  metalnessMap: C0,
28694
28694
  roughnessMap: E0,
28695
- anisotropy: $0,
28695
+ anisotropy: q0,
28696
28696
  anisotropyMap: V0,
28697
28697
  clearcoat: a0,
28698
28698
  clearcoatMap: Ri,
@@ -28708,14 +28708,14 @@ function WebGLPrograms(g, t, r, m, v, C, _) {
28708
28708
  specularMap: Ni,
28709
28709
  specularColorMap: Mi,
28710
28710
  specularIntensityMap: Vi,
28711
- transmission: A0,
28711
+ transmission: K0,
28712
28712
  transmissionMap: G0,
28713
28713
  thicknessMap: N0,
28714
28714
  gradientMap: yi,
28715
28715
  opaque: zt.transparent === !1 && zt.blending === NormalBlending && zt.alphaToCoverage === !1,
28716
28716
  alphaMap: Ei,
28717
28717
  alphaTest: Ti,
28718
- alphaHash: q0,
28718
+ alphaHash: ui,
28719
28719
  combine: zt.combine,
28720
28720
  //
28721
28721
  mapUv: ki && ct(zt.map.channel),
@@ -28742,7 +28742,7 @@ function WebGLPrograms(g, t, r, m, v, C, _) {
28742
28742
  thicknessMapUv: N0 && ct(zt.thicknessMap.channel),
28743
28743
  alphaMapUv: Ei && ct(zt.alphaMap.channel),
28744
28744
  //
28745
- vertexTangents: !!i0.attributes.tangent && (gi || $0),
28745
+ vertexTangents: !!i0.attributes.tangent && (gi || q0),
28746
28746
  vertexColors: zt.vertexColors,
28747
28747
  vertexAlphas: zt.vertexColors === !0 && !!i0.attributes.color && i0.attributes.color.itemSize === 4,
28748
28748
  pointsUvs: n0.isPoints === !0 && !!i0.attributes.uv && (ki || Ei),
@@ -28784,8 +28784,8 @@ function WebGLPrograms(g, t, r, m, v, C, _) {
28784
28784
  useDepthPacking: zt.depthPacking >= 0,
28785
28785
  depthPacking: zt.depthPacking || 0,
28786
28786
  index0AttributeName: zt.index0AttributeName,
28787
- extensionClipCullDistance: Ki && zt.extensions.clipCullDistance === !0 && m.has("WEBGL_clip_cull_distance"),
28788
- extensionMultiDraw: (Ki && zt.extensions.multiDraw === !0 || Li) && m.has("WEBGL_multi_draw"),
28787
+ extensionClipCullDistance: Ai && zt.extensions.clipCullDistance === !0 && m.has("WEBGL_clip_cull_distance"),
28788
+ extensionMultiDraw: (Ai && zt.extensions.multiDraw === !0 || Li) && m.has("WEBGL_multi_draw"),
28789
28789
  rendererExtensionParallelShaderCompile: m.has("KHR_parallel_shader_compile"),
28790
28790
  customProgramCacheKey: zt.customProgramCacheKey()
28791
28791
  };
@@ -29372,8 +29372,8 @@ function WebGLState(g, t) {
29372
29372
  setLocked: function(Ti) {
29373
29373
  G0 = Ti;
29374
29374
  },
29375
- setClear: function(Ti, q0, Ki, Oi, qi) {
29376
- qi === !0 && (Ti *= Oi, q0 *= Oi, Ki *= Oi), N0.set(Ti, q0, Ki, Oi), Ei.equals(N0) === !1 && (g.clearColor(Ti, q0, Ki, Oi), Ei.copy(N0));
29375
+ setClear: function(Ti, ui, Ai, Oi, qi) {
29376
+ qi === !0 && (Ti *= Oi, ui *= Oi, Ai *= Oi), N0.set(Ti, ui, Ai, Oi), Ei.equals(N0) === !1 && (g.clearColor(Ti, ui, Ai, Oi), Ei.copy(N0));
29377
29377
  },
29378
29378
  reset: function() {
29379
29379
  G0 = !1, yi = null, Ei.set(-1, 0, 0, 0);
@@ -29383,10 +29383,10 @@ function WebGLState(g, t) {
29383
29383
  function m() {
29384
29384
  let G0 = !1, N0 = !1, yi = null, Ei = null, Ti = null;
29385
29385
  return {
29386
- setReversed: function(q0) {
29387
- if (N0 !== q0) {
29388
- const Ki = t.get("EXT_clip_control");
29389
- q0 ? Ki.clipControlEXT(Ki.LOWER_LEFT_EXT, Ki.ZERO_TO_ONE_EXT) : Ki.clipControlEXT(Ki.LOWER_LEFT_EXT, Ki.NEGATIVE_ONE_TO_ONE_EXT), N0 = q0;
29386
+ setReversed: function(ui) {
29387
+ if (N0 !== ui) {
29388
+ const Ai = t.get("EXT_clip_control");
29389
+ ui ? Ai.clipControlEXT(Ai.LOWER_LEFT_EXT, Ai.ZERO_TO_ONE_EXT) : Ai.clipControlEXT(Ai.LOWER_LEFT_EXT, Ai.NEGATIVE_ONE_TO_ONE_EXT), N0 = ui;
29390
29390
  const Oi = Ti;
29391
29391
  Ti = null, this.setClear(Oi);
29392
29392
  }
@@ -29394,15 +29394,15 @@ function WebGLState(g, t) {
29394
29394
  getReversed: function() {
29395
29395
  return N0;
29396
29396
  },
29397
- setTest: function(q0) {
29398
- q0 ? O0(g.DEPTH_TEST) : xi(g.DEPTH_TEST);
29397
+ setTest: function(ui) {
29398
+ ui ? O0(g.DEPTH_TEST) : xi(g.DEPTH_TEST);
29399
29399
  },
29400
- setMask: function(q0) {
29401
- yi !== q0 && !G0 && (g.depthMask(q0), yi = q0);
29400
+ setMask: function(ui) {
29401
+ yi !== ui && !G0 && (g.depthMask(ui), yi = ui);
29402
29402
  },
29403
- setFunc: function(q0) {
29404
- if (N0 && (q0 = reversedFuncs[q0]), Ei !== q0) {
29405
- switch (q0) {
29403
+ setFunc: function(ui) {
29404
+ if (N0 && (ui = reversedFuncs[ui]), Ei !== ui) {
29405
+ switch (ui) {
29406
29406
  case NeverDepth:
29407
29407
  g.depthFunc(g.NEVER);
29408
29408
  break;
@@ -29430,14 +29430,14 @@ function WebGLState(g, t) {
29430
29430
  default:
29431
29431
  g.depthFunc(g.LEQUAL);
29432
29432
  }
29433
- Ei = q0;
29433
+ Ei = ui;
29434
29434
  }
29435
29435
  },
29436
- setLocked: function(q0) {
29437
- G0 = q0;
29436
+ setLocked: function(ui) {
29437
+ G0 = ui;
29438
29438
  },
29439
- setClear: function(q0) {
29440
- Ti !== q0 && (N0 && (q0 = 1 - q0), g.clearDepth(q0), Ti = q0);
29439
+ setClear: function(ui) {
29440
+ Ti !== ui && (N0 && (ui = 1 - ui), g.clearDepth(ui), Ti = ui);
29441
29441
  },
29442
29442
  reset: function() {
29443
29443
  G0 = !1, yi = null, Ei = null, Ti = null, N0 = !1;
@@ -29445,7 +29445,7 @@ function WebGLState(g, t) {
29445
29445
  };
29446
29446
  }
29447
29447
  function v() {
29448
- let G0 = !1, N0 = null, yi = null, Ei = null, Ti = null, q0 = null, Ki = null, Oi = null, qi = null;
29448
+ let G0 = !1, N0 = null, yi = null, Ei = null, Ti = null, ui = null, Ai = null, Oi = null, qi = null;
29449
29449
  return {
29450
29450
  setTest: function(Qi) {
29451
29451
  G0 || (Qi ? O0(g.STENCIL_TEST) : xi(g.STENCIL_TEST));
@@ -29457,7 +29457,7 @@ function WebGLState(g, t) {
29457
29457
  (yi !== Qi || Ei !== on || Ti !== an) && (g.stencilFunc(Qi, on, an), yi = Qi, Ei = on, Ti = an);
29458
29458
  },
29459
29459
  setOp: function(Qi, on, an) {
29460
- (q0 !== Qi || Ki !== on || Oi !== an) && (g.stencilOp(Qi, on, an), q0 = Qi, Ki = on, Oi = an);
29460
+ (ui !== Qi || Ai !== on || Oi !== an) && (g.stencilOp(Qi, on, an), ui = Qi, Ai = on, Oi = an);
29461
29461
  },
29462
29462
  setLocked: function(Qi) {
29463
29463
  G0 = Qi;
@@ -29466,7 +29466,7 @@ function WebGLState(g, t) {
29466
29466
  qi !== Qi && (g.clearStencil(Qi), qi = Qi);
29467
29467
  },
29468
29468
  reset: function() {
29469
- G0 = !1, N0 = null, yi = null, Ei = null, Ti = null, q0 = null, Ki = null, Oi = null, qi = null;
29469
+ G0 = !1, N0 = null, yi = null, Ei = null, Ti = null, ui = null, Ai = null, Oi = null, qi = null;
29470
29470
  }
29471
29471
  };
29472
29472
  }
@@ -29477,16 +29477,16 @@ function WebGLState(g, t) {
29477
29477
  const kt = g.getParameter(g.VERSION);
29478
29478
  kt.indexOf("WebGL") !== -1 ? (qt = parseFloat(/^WebGL (\d)/.exec(kt)[1]), Yt = qt >= 1) : kt.indexOf("OpenGL ES") !== -1 && (qt = parseFloat(/^OpenGL ES (\d)/.exec(kt)[1]), Yt = qt >= 2);
29479
29479
  let r0 = null, f0 = {};
29480
- const m0 = g.getParameter(g.SCISSOR_BOX), w0 = g.getParameter(g.VIEWPORT), Q0 = new Vector4().fromArray(m0), v0 = new Vector4().fromArray(w0);
29480
+ const m0 = g.getParameter(g.SCISSOR_BOX), w0 = g.getParameter(g.VIEWPORT), $0 = new Vector4().fromArray(m0), v0 = new Vector4().fromArray(w0);
29481
29481
  function I0(G0, N0, yi, Ei) {
29482
- const Ti = new Uint8Array(4), q0 = g.createTexture();
29483
- g.bindTexture(G0, q0), g.texParameteri(G0, g.TEXTURE_MIN_FILTER, g.NEAREST), g.texParameteri(G0, g.TEXTURE_MAG_FILTER, g.NEAREST);
29484
- for (let Ki = 0; Ki < yi; Ki++)
29485
- G0 === g.TEXTURE_3D || G0 === g.TEXTURE_2D_ARRAY ? g.texImage3D(N0, 0, g.RGBA, 1, 1, Ei, 0, g.RGBA, g.UNSIGNED_BYTE, Ti) : g.texImage2D(N0 + Ki, 0, g.RGBA, 1, 1, 0, g.RGBA, g.UNSIGNED_BYTE, Ti);
29486
- return q0;
29487
- }
29488
- const K0 = {};
29489
- K0[g.TEXTURE_2D] = I0(g.TEXTURE_2D, g.TEXTURE_2D, 1), K0[g.TEXTURE_CUBE_MAP] = I0(g.TEXTURE_CUBE_MAP, g.TEXTURE_CUBE_MAP_POSITIVE_X, 6), K0[g.TEXTURE_2D_ARRAY] = I0(g.TEXTURE_2D_ARRAY, g.TEXTURE_2D_ARRAY, 1, 1), K0[g.TEXTURE_3D] = I0(g.TEXTURE_3D, g.TEXTURE_3D, 1, 1), C.setClear(0, 0, 0, 1), _.setClear(1), w.setClear(0), O0(g.DEPTH_TEST), _.setFunc(LessEqualDepth), j0(!1), gi(CullFaceBack), O0(g.CULL_FACE), l0(NoBlending);
29482
+ const Ti = new Uint8Array(4), ui = g.createTexture();
29483
+ g.bindTexture(G0, ui), g.texParameteri(G0, g.TEXTURE_MIN_FILTER, g.NEAREST), g.texParameteri(G0, g.TEXTURE_MAG_FILTER, g.NEAREST);
29484
+ for (let Ai = 0; Ai < yi; Ai++)
29485
+ G0 === g.TEXTURE_3D || G0 === g.TEXTURE_2D_ARRAY ? g.texImage3D(N0, 0, g.RGBA, 1, 1, Ei, 0, g.RGBA, g.UNSIGNED_BYTE, Ti) : g.texImage2D(N0 + Ai, 0, g.RGBA, 1, 1, 0, g.RGBA, g.UNSIGNED_BYTE, Ti);
29486
+ return ui;
29487
+ }
29488
+ const A0 = {};
29489
+ A0[g.TEXTURE_2D] = I0(g.TEXTURE_2D, g.TEXTURE_2D, 1), A0[g.TEXTURE_CUBE_MAP] = I0(g.TEXTURE_CUBE_MAP, g.TEXTURE_CUBE_MAP_POSITIVE_X, 6), A0[g.TEXTURE_2D_ARRAY] = I0(g.TEXTURE_2D_ARRAY, g.TEXTURE_2D_ARRAY, 1, 1), A0[g.TEXTURE_3D] = I0(g.TEXTURE_3D, g.TEXTURE_3D, 1, 1), C.setClear(0, 0, 0, 1), _.setClear(1), w.setClear(0), O0(g.DEPTH_TEST), _.setFunc(LessEqualDepth), j0(!1), gi(CullFaceBack), O0(g.CULL_FACE), l0(NoBlending);
29490
29490
  function O0(G0) {
29491
29491
  ve[G0] !== !0 && (g.enable(G0), ve[G0] = !0);
29492
29492
  }
@@ -29502,8 +29502,8 @@ function WebGLState(g, t) {
29502
29502
  yi = Ne.get(N0), yi === void 0 && (yi = [], Ne.set(N0, yi));
29503
29503
  const Ti = G0.textures;
29504
29504
  if (yi.length !== Ti.length || yi[0] !== g.COLOR_ATTACHMENT0) {
29505
- for (let q0 = 0, Ki = Ti.length; q0 < Ki; q0++)
29506
- yi[q0] = g.COLOR_ATTACHMENT0 + q0;
29505
+ for (let ui = 0, Ai = Ti.length; ui < Ai; ui++)
29506
+ yi[ui] = g.COLOR_ATTACHMENT0 + ui;
29507
29507
  yi.length = Ti.length, Ei = !0;
29508
29508
  }
29509
29509
  } else
@@ -29513,12 +29513,12 @@ function WebGLState(g, t) {
29513
29513
  function ki(G0) {
29514
29514
  return Fe !== G0 ? (g.useProgram(G0), Fe = G0, !0) : !1;
29515
29515
  }
29516
- const Ai = {
29516
+ const Ki = {
29517
29517
  [AddEquation]: g.FUNC_ADD,
29518
29518
  [SubtractEquation]: g.FUNC_SUBTRACT,
29519
29519
  [ReverseSubtractEquation]: g.FUNC_REVERSE_SUBTRACT
29520
29520
  };
29521
- Ai[MinEquation] = g.MIN, Ai[MaxEquation] = g.MAX;
29521
+ Ki[MinEquation] = g.MIN, Ki[MaxEquation] = g.MAX;
29522
29522
  const B0 = {
29523
29523
  [ZeroFactor]: g.ZERO,
29524
29524
  [OneFactor]: g.ONE,
@@ -29536,7 +29536,7 @@ function WebGLState(g, t) {
29536
29536
  [ConstantAlphaFactor]: g.CONSTANT_ALPHA,
29537
29537
  [OneMinusConstantAlphaFactor]: g.ONE_MINUS_CONSTANT_ALPHA
29538
29538
  };
29539
- function l0(G0, N0, yi, Ei, Ti, q0, Ki, Oi, qi, Qi) {
29539
+ function l0(G0, N0, yi, Ei, Ti, ui, Ai, Oi, qi, Qi) {
29540
29540
  if (G0 === NoBlending) {
29541
29541
  ct === !0 && (xi(g.BLEND), ct = !1);
29542
29542
  return;
@@ -29583,7 +29583,7 @@ function WebGLState(g, t) {
29583
29583
  }
29584
29584
  return;
29585
29585
  }
29586
- Ti = Ti || N0, q0 = q0 || yi, Ki = Ki || Ei, (N0 !== ke || Ti !== xt) && (g.blendEquationSeparate(Ai[N0], Ai[Ti]), ke = N0, xt = Ti), (yi !== je || Ei !== at || q0 !== Gt || Ki !== Lt) && (g.blendFuncSeparate(B0[yi], B0[Ei], B0[q0], B0[Ki]), je = yi, at = Ei, Gt = q0, Lt = Ki), (Oi.equals(Wt) === !1 || qi !== Pt) && (g.blendColor(Oi.r, Oi.g, Oi.b, qi), Wt.copy(Oi), Pt = qi), Oe = G0, zt = !1;
29586
+ Ti = Ti || N0, ui = ui || yi, Ai = Ai || Ei, (N0 !== ke || Ti !== xt) && (g.blendEquationSeparate(Ki[N0], Ki[Ti]), ke = N0, xt = Ti), (yi !== je || Ei !== at || ui !== Gt || Ai !== Lt) && (g.blendFuncSeparate(B0[yi], B0[Ei], B0[ui], B0[Ai]), je = yi, at = Ei, Gt = ui, Lt = Ai), (Oi.equals(Wt) === !1 || qi !== Pt) && (g.blendColor(Oi.r, Oi.g, Oi.b, qi), Wt.copy(Oi), Pt = qi), Oe = G0, zt = !1;
29587
29587
  }
29588
29588
  function Si(G0, N0) {
29589
29589
  G0.side === DoubleSide ? xi(g.CULL_FACE) : O0(g.CULL_FACE);
@@ -29610,10 +29610,10 @@ function WebGLState(g, t) {
29610
29610
  function E0(G0) {
29611
29611
  G0 === void 0 && (G0 = g.TEXTURE0 + i0 - 1), r0 !== G0 && (g.activeTexture(G0), r0 = G0);
29612
29612
  }
29613
- function $0(G0, N0, yi) {
29613
+ function q0(G0, N0, yi) {
29614
29614
  yi === void 0 && (r0 === null ? yi = g.TEXTURE0 + i0 - 1 : yi = r0);
29615
29615
  let Ei = f0[yi];
29616
- Ei === void 0 && (Ei = { type: void 0, texture: void 0 }, f0[yi] = Ei), (Ei.type !== G0 || Ei.texture !== N0) && (r0 !== yi && (g.activeTexture(yi), r0 = yi), g.bindTexture(G0, N0 || K0[G0]), Ei.type = G0, Ei.texture = N0);
29616
+ Ei === void 0 && (Ei = { type: void 0, texture: void 0 }, f0[yi] = Ei), (Ei.type !== G0 || Ei.texture !== N0) && (r0 !== yi && (g.activeTexture(yi), r0 = yi), g.bindTexture(G0, N0 || A0[G0]), Ei.type = G0, Ei.texture = N0);
29617
29617
  }
29618
29618
  function a0() {
29619
29619
  const G0 = f0[r0];
@@ -29640,7 +29640,7 @@ function WebGLState(g, t) {
29640
29640
  console.error("THREE.WebGLState:", G0);
29641
29641
  }
29642
29642
  }
29643
- function A0() {
29643
+ function K0() {
29644
29644
  try {
29645
29645
  g.texSubImage3D(...arguments);
29646
29646
  } catch (G0) {
@@ -29690,7 +29690,7 @@ function WebGLState(g, t) {
29690
29690
  }
29691
29691
  }
29692
29692
  function Zi(G0) {
29693
- Q0.equals(G0) === !1 && (g.scissor(G0.x, G0.y, G0.z, G0.w), Q0.copy(G0));
29693
+ $0.equals(G0) === !1 && (g.scissor(G0.x, G0.y, G0.z, G0.w), $0.copy(G0));
29694
29694
  }
29695
29695
  function Hi(G0) {
29696
29696
  v0.equals(G0) === !1 && (g.viewport(G0.x, G0.y, G0.z, G0.w), v0.copy(G0));
@@ -29706,7 +29706,7 @@ function WebGLState(g, t) {
29706
29706
  E.get(N0) !== Ei && (g.uniformBlockBinding(N0, Ei, G0.__bindingPointIndex), E.set(N0, Ei));
29707
29707
  }
29708
29708
  function Vi() {
29709
- g.disable(g.BLEND), g.disable(g.CULL_FACE), g.disable(g.DEPTH_TEST), g.disable(g.POLYGON_OFFSET_FILL), g.disable(g.SCISSOR_TEST), g.disable(g.STENCIL_TEST), g.disable(g.SAMPLE_ALPHA_TO_COVERAGE), g.blendEquation(g.FUNC_ADD), g.blendFunc(g.ONE, g.ZERO), g.blendFuncSeparate(g.ONE, g.ZERO, g.ONE, g.ZERO), g.blendColor(0, 0, 0, 0), g.colorMask(!0, !0, !0, !0), g.clearColor(0, 0, 0, 0), g.depthMask(!0), g.depthFunc(g.LESS), _.setReversed(!1), g.clearDepth(1), g.stencilMask(4294967295), g.stencilFunc(g.ALWAYS, 0, 4294967295), g.stencilOp(g.KEEP, g.KEEP, g.KEEP), g.clearStencil(0), g.cullFace(g.BACK), g.frontFace(g.CCW), g.polygonOffset(0, 0), g.activeTexture(g.TEXTURE0), g.bindFramebuffer(g.FRAMEBUFFER, null), g.bindFramebuffer(g.DRAW_FRAMEBUFFER, null), g.bindFramebuffer(g.READ_FRAMEBUFFER, null), g.useProgram(null), g.lineWidth(1), g.scissor(0, 0, g.canvas.width, g.canvas.height), g.viewport(0, 0, g.canvas.width, g.canvas.height), ve = {}, r0 = null, f0 = {}, Pe = {}, Ne = /* @__PURE__ */ new WeakMap(), Ae = [], Fe = null, ct = !1, Oe = null, ke = null, je = null, at = null, xt = null, Gt = null, Lt = null, Wt = new Color$1(0, 0, 0), Pt = 0, zt = !1, Nt = null, Kt = null, t0 = null, n0 = null, o0 = null, Q0.set(0, 0, g.canvas.width, g.canvas.height), v0.set(0, 0, g.canvas.width, g.canvas.height), C.reset(), _.reset(), w.reset();
29709
+ g.disable(g.BLEND), g.disable(g.CULL_FACE), g.disable(g.DEPTH_TEST), g.disable(g.POLYGON_OFFSET_FILL), g.disable(g.SCISSOR_TEST), g.disable(g.STENCIL_TEST), g.disable(g.SAMPLE_ALPHA_TO_COVERAGE), g.blendEquation(g.FUNC_ADD), g.blendFunc(g.ONE, g.ZERO), g.blendFuncSeparate(g.ONE, g.ZERO, g.ONE, g.ZERO), g.blendColor(0, 0, 0, 0), g.colorMask(!0, !0, !0, !0), g.clearColor(0, 0, 0, 0), g.depthMask(!0), g.depthFunc(g.LESS), _.setReversed(!1), g.clearDepth(1), g.stencilMask(4294967295), g.stencilFunc(g.ALWAYS, 0, 4294967295), g.stencilOp(g.KEEP, g.KEEP, g.KEEP), g.clearStencil(0), g.cullFace(g.BACK), g.frontFace(g.CCW), g.polygonOffset(0, 0), g.activeTexture(g.TEXTURE0), g.bindFramebuffer(g.FRAMEBUFFER, null), g.bindFramebuffer(g.DRAW_FRAMEBUFFER, null), g.bindFramebuffer(g.READ_FRAMEBUFFER, null), g.useProgram(null), g.lineWidth(1), g.scissor(0, 0, g.canvas.width, g.canvas.height), g.viewport(0, 0, g.canvas.width, g.canvas.height), ve = {}, r0 = null, f0 = {}, Pe = {}, Ne = /* @__PURE__ */ new WeakMap(), Ae = [], Fe = null, ct = !1, Oe = null, ke = null, je = null, at = null, xt = null, Gt = null, Lt = null, Wt = new Color$1(0, 0, 0), Pt = 0, zt = !1, Nt = null, Kt = null, t0 = null, n0 = null, o0 = null, $0.set(0, 0, g.canvas.width, g.canvas.height), v0.set(0, 0, g.canvas.width, g.canvas.height), C.reset(), _.reset(), w.reset();
29710
29710
  }
29711
29711
  return {
29712
29712
  buffers: {
@@ -29727,7 +29727,7 @@ function WebGLState(g, t) {
29727
29727
  setPolygonOffset: P0,
29728
29728
  setScissorTest: C0,
29729
29729
  activeTexture: E0,
29730
- bindTexture: $0,
29730
+ bindTexture: q0,
29731
29731
  unbindTexture: a0,
29732
29732
  compressedTexImage2D: s0,
29733
29733
  compressedTexImage3D: S0,
@@ -29738,7 +29738,7 @@ function WebGLState(g, t) {
29738
29738
  texStorage2D: Ci,
29739
29739
  texStorage3D: _i,
29740
29740
  texSubImage2D: R0,
29741
- texSubImage3D: A0,
29741
+ texSubImage3D: K0,
29742
29742
  compressedTexSubImage2D: V0,
29743
29743
  compressedTexSubImage3D: Ri,
29744
29744
  scissor: Zi,
@@ -29763,15 +29763,15 @@ function WebGLTextures(g, t, r, m, v, C, _) {
29763
29763
  }
29764
29764
  function ct(a0, s0, S0) {
29765
29765
  let R0 = 1;
29766
- const A0 = $0(a0);
29767
- if ((A0.width > S0 || A0.height > S0) && (R0 = S0 / Math.max(A0.width, A0.height)), R0 < 1)
29766
+ const K0 = q0(a0);
29767
+ if ((K0.width > S0 || K0.height > S0) && (R0 = S0 / Math.max(K0.width, K0.height)), R0 < 1)
29768
29768
  if (typeof HTMLImageElement != "undefined" && a0 instanceof HTMLImageElement || typeof HTMLCanvasElement != "undefined" && a0 instanceof HTMLCanvasElement || typeof ImageBitmap != "undefined" && a0 instanceof ImageBitmap || typeof VideoFrame != "undefined" && a0 instanceof VideoFrame) {
29769
- const V0 = Math.floor(R0 * A0.width), Ri = Math.floor(R0 * A0.height);
29769
+ const V0 = Math.floor(R0 * K0.width), Ri = Math.floor(R0 * K0.height);
29770
29770
  Pe === void 0 && (Pe = Fe(V0, Ri));
29771
29771
  const Ci = s0 ? Fe(V0, Ri) : Pe;
29772
- return Ci.width = V0, Ci.height = Ri, Ci.getContext("2d").drawImage(a0, 0, 0, V0, Ri), console.warn("THREE.WebGLRenderer: Texture has been resized from (" + A0.width + "x" + A0.height + ") to (" + V0 + "x" + Ri + ")."), Ci;
29772
+ return Ci.width = V0, Ci.height = Ri, Ci.getContext("2d").drawImage(a0, 0, 0, V0, Ri), console.warn("THREE.WebGLRenderer: Texture has been resized from (" + K0.width + "x" + K0.height + ") to (" + V0 + "x" + Ri + ")."), Ci;
29773
29773
  } else
29774
- return "data" in a0 && console.warn("THREE.WebGLRenderer: Image in DataTexture is too big (" + A0.width + "x" + A0.height + ")."), a0;
29774
+ return "data" in a0 && console.warn("THREE.WebGLRenderer: Image in DataTexture is too big (" + K0.width + "x" + K0.height + ")."), a0;
29775
29775
  return a0;
29776
29776
  }
29777
29777
  function Oe(a0) {
@@ -29783,14 +29783,14 @@ function WebGLTextures(g, t, r, m, v, C, _) {
29783
29783
  function je(a0) {
29784
29784
  return a0.isWebGLCubeRenderTarget ? g.TEXTURE_CUBE_MAP : a0.isWebGL3DRenderTarget ? g.TEXTURE_3D : a0.isWebGLArrayRenderTarget || a0.isCompressedArrayTexture ? g.TEXTURE_2D_ARRAY : g.TEXTURE_2D;
29785
29785
  }
29786
- function at(a0, s0, S0, R0, A0 = !1) {
29786
+ function at(a0, s0, S0, R0, K0 = !1) {
29787
29787
  if (a0 !== null) {
29788
29788
  if (g[a0] !== void 0) return g[a0];
29789
29789
  console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '" + a0 + "'");
29790
29790
  }
29791
29791
  let V0 = s0;
29792
29792
  if (s0 === g.RED && (S0 === g.FLOAT && (V0 = g.R32F), S0 === g.HALF_FLOAT && (V0 = g.R16F), S0 === g.UNSIGNED_BYTE && (V0 = g.R8)), s0 === g.RED_INTEGER && (S0 === g.UNSIGNED_BYTE && (V0 = g.R8UI), S0 === g.UNSIGNED_SHORT && (V0 = g.R16UI), S0 === g.UNSIGNED_INT && (V0 = g.R32UI), S0 === g.BYTE && (V0 = g.R8I), S0 === g.SHORT && (V0 = g.R16I), S0 === g.INT && (V0 = g.R32I)), s0 === g.RG && (S0 === g.FLOAT && (V0 = g.RG32F), S0 === g.HALF_FLOAT && (V0 = g.RG16F), S0 === g.UNSIGNED_BYTE && (V0 = g.RG8)), s0 === g.RG_INTEGER && (S0 === g.UNSIGNED_BYTE && (V0 = g.RG8UI), S0 === g.UNSIGNED_SHORT && (V0 = g.RG16UI), S0 === g.UNSIGNED_INT && (V0 = g.RG32UI), S0 === g.BYTE && (V0 = g.RG8I), S0 === g.SHORT && (V0 = g.RG16I), S0 === g.INT && (V0 = g.RG32I)), s0 === g.RGB_INTEGER && (S0 === g.UNSIGNED_BYTE && (V0 = g.RGB8UI), S0 === g.UNSIGNED_SHORT && (V0 = g.RGB16UI), S0 === g.UNSIGNED_INT && (V0 = g.RGB32UI), S0 === g.BYTE && (V0 = g.RGB8I), S0 === g.SHORT && (V0 = g.RGB16I), S0 === g.INT && (V0 = g.RGB32I)), s0 === g.RGBA_INTEGER && (S0 === g.UNSIGNED_BYTE && (V0 = g.RGBA8UI), S0 === g.UNSIGNED_SHORT && (V0 = g.RGBA16UI), S0 === g.UNSIGNED_INT && (V0 = g.RGBA32UI), S0 === g.BYTE && (V0 = g.RGBA8I), S0 === g.SHORT && (V0 = g.RGBA16I), S0 === g.INT && (V0 = g.RGBA32I)), s0 === g.RGB && S0 === g.UNSIGNED_INT_5_9_9_9_REV && (V0 = g.RGB9_E5), s0 === g.RGBA) {
29793
- const Ri = A0 ? LinearTransfer : ColorManagement.getTransfer(R0);
29793
+ const Ri = K0 ? LinearTransfer : ColorManagement.getTransfer(R0);
29794
29794
  S0 === g.FLOAT && (V0 = g.RGBA32F), S0 === g.HALF_FLOAT && (V0 = g.RGBA16F), S0 === g.UNSIGNED_BYTE && (V0 = Ri === SRGBTransfer ? g.SRGB8_ALPHA8 : g.RGBA8), S0 === g.UNSIGNED_SHORT_4_4_4_4 && (V0 = g.RGBA4), S0 === g.UNSIGNED_SHORT_5_5_5_1 && (V0 = g.RGB5_A1);
29795
29795
  }
29796
29796
  return (V0 === g.R16F || V0 === g.R32F || V0 === g.RG16F || V0 === g.RG32F || V0 === g.RGBA16F || V0 === g.RGBA32F) && t.get("EXT_color_buffer_float"), V0;
@@ -29815,8 +29815,8 @@ function WebGLTextures(g, t, r, m, v, C, _) {
29815
29815
  if (s0.__webglInit === void 0) return;
29816
29816
  const S0 = a0.source, R0 = Ne.get(S0);
29817
29817
  if (R0) {
29818
- const A0 = R0[s0.__cacheKey];
29819
- A0.usedTimes--, A0.usedTimes === 0 && zt(a0), Object.keys(R0).length === 0 && Ne.delete(S0);
29818
+ const K0 = R0[s0.__cacheKey];
29819
+ K0.usedTimes--, K0.usedTimes === 0 && zt(a0), Object.keys(R0).length === 0 && Ne.delete(S0);
29820
29820
  }
29821
29821
  m.remove(a0);
29822
29822
  }
@@ -29831,7 +29831,7 @@ function WebGLTextures(g, t, r, m, v, C, _) {
29831
29831
  if (a0.depthTexture && (a0.depthTexture.dispose(), m.remove(a0.depthTexture)), a0.isWebGLCubeRenderTarget)
29832
29832
  for (let R0 = 0; R0 < 6; R0++) {
29833
29833
  if (Array.isArray(s0.__webglFramebuffer[R0]))
29834
- for (let A0 = 0; A0 < s0.__webglFramebuffer[R0].length; A0++) g.deleteFramebuffer(s0.__webglFramebuffer[R0][A0]);
29834
+ for (let K0 = 0; K0 < s0.__webglFramebuffer[R0].length; K0++) g.deleteFramebuffer(s0.__webglFramebuffer[R0][K0]);
29835
29835
  else
29836
29836
  g.deleteFramebuffer(s0.__webglFramebuffer[R0]);
29837
29837
  s0.__webglDepthbuffer && g.deleteRenderbuffer(s0.__webglDepthbuffer[R0]);
@@ -29847,7 +29847,7 @@ function WebGLTextures(g, t, r, m, v, C, _) {
29847
29847
  s0.__webglDepthRenderbuffer && g.deleteRenderbuffer(s0.__webglDepthRenderbuffer);
29848
29848
  }
29849
29849
  const S0 = a0.textures;
29850
- for (let R0 = 0, A0 = S0.length; R0 < A0; R0++) {
29850
+ for (let R0 = 0, K0 = S0.length; R0 < K0; R0++) {
29851
29851
  const V0 = m.get(S0[R0]);
29852
29852
  V0.__webglTexture && (g.deleteTexture(V0.__webglTexture), _.memory.textures--), m.remove(S0[R0]);
29853
29853
  }
@@ -29874,7 +29874,7 @@ function WebGLTextures(g, t, r, m, v, C, _) {
29874
29874
  else if (R0.complete === !1)
29875
29875
  console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");
29876
29876
  else {
29877
- K0(S0, a0, s0);
29877
+ A0(S0, a0, s0);
29878
29878
  return;
29879
29879
  }
29880
29880
  }
@@ -29883,7 +29883,7 @@ function WebGLTextures(g, t, r, m, v, C, _) {
29883
29883
  function Yt(a0, s0) {
29884
29884
  const S0 = m.get(a0);
29885
29885
  if (a0.version > 0 && S0.__version !== a0.version) {
29886
- K0(S0, a0, s0);
29886
+ A0(S0, a0, s0);
29887
29887
  return;
29888
29888
  }
29889
29889
  r.bindTexture(g.TEXTURE_2D_ARRAY, S0.__webglTexture, g.TEXTURE0 + s0);
@@ -29891,7 +29891,7 @@ function WebGLTextures(g, t, r, m, v, C, _) {
29891
29891
  function qt(a0, s0) {
29892
29892
  const S0 = m.get(a0);
29893
29893
  if (a0.version > 0 && S0.__version !== a0.version) {
29894
- K0(S0, a0, s0);
29894
+ A0(S0, a0, s0);
29895
29895
  return;
29896
29896
  }
29897
29897
  r.bindTexture(g.TEXTURE_3D, S0.__webglTexture, g.TEXTURE0 + s0);
@@ -29934,20 +29934,20 @@ function WebGLTextures(g, t, r, m, v, C, _) {
29934
29934
  }
29935
29935
  }
29936
29936
  }
29937
- function Q0(a0, s0) {
29937
+ function $0(a0, s0) {
29938
29938
  let S0 = !1;
29939
29939
  a0.__webglInit === void 0 && (a0.__webglInit = !0, s0.addEventListener("dispose", Lt));
29940
29940
  const R0 = s0.source;
29941
- let A0 = Ne.get(R0);
29942
- A0 === void 0 && (A0 = {}, Ne.set(R0, A0));
29941
+ let K0 = Ne.get(R0);
29942
+ K0 === void 0 && (K0 = {}, Ne.set(R0, K0));
29943
29943
  const V0 = o0(s0);
29944
29944
  if (V0 !== a0.__cacheKey) {
29945
- A0[V0] === void 0 && (A0[V0] = {
29945
+ K0[V0] === void 0 && (K0[V0] = {
29946
29946
  texture: g.createTexture(),
29947
29947
  usedTimes: 0
29948
- }, _.memory.textures++, S0 = !0), A0[V0].usedTimes++;
29949
- const Ri = A0[a0.__cacheKey];
29950
- Ri !== void 0 && (A0[a0.__cacheKey].usedTimes--, Ri.usedTimes === 0 && zt(s0)), a0.__cacheKey = V0, a0.__webglTexture = A0[V0].texture;
29948
+ }, _.memory.textures++, S0 = !0), K0[V0].usedTimes++;
29949
+ const Ri = K0[a0.__cacheKey];
29950
+ Ri !== void 0 && (K0[a0.__cacheKey].usedTimes--, Ri.usedTimes === 0 && zt(s0)), a0.__cacheKey = V0, a0.__webglTexture = K0[V0].texture;
29951
29951
  }
29952
29952
  return S0;
29953
29953
  }
@@ -29978,13 +29978,13 @@ function WebGLTextures(g, t, r, m, v, C, _) {
29978
29978
  a0.clearUpdateRanges(), g.pixelStorei(g.UNPACK_ROW_LENGTH, Ci), g.pixelStorei(g.UNPACK_SKIP_PIXELS, _i), g.pixelStorei(g.UNPACK_SKIP_ROWS, Pi);
29979
29979
  }
29980
29980
  }
29981
- function K0(a0, s0, S0) {
29981
+ function A0(a0, s0, S0) {
29982
29982
  let R0 = g.TEXTURE_2D;
29983
29983
  (s0.isDataArrayTexture || s0.isCompressedArrayTexture) && (R0 = g.TEXTURE_2D_ARRAY), s0.isData3DTexture && (R0 = g.TEXTURE_3D);
29984
- const A0 = Q0(a0, s0), V0 = s0.source;
29984
+ const K0 = $0(a0, s0), V0 = s0.source;
29985
29985
  r.bindTexture(R0, a0.__webglTexture, g.TEXTURE0 + S0);
29986
29986
  const Ri = m.get(V0);
29987
- if (V0.version !== Ri.__version || A0 === !0) {
29987
+ if (V0.version !== Ri.__version || K0 === !0) {
29988
29988
  r.activeTexture(g.TEXTURE0 + S0);
29989
29989
  const Ci = ColorManagement.getPrimaries(ColorManagement.workingColorSpace), _i = s0.colorSpace === NoColorSpace ? null : ColorManagement.getPrimaries(s0.colorSpace), Pi = s0.colorSpace === NoColorSpace || Ci === _i ? g.NONE : g.BROWSER_DEFAULT_WEBGL;
29990
29990
  g.pixelStorei(g.UNPACK_FLIP_Y_WEBGL, s0.flipY), g.pixelStorei(g.UNPACK_PREMULTIPLY_ALPHA_WEBGL, s0.premultiplyAlpha), g.pixelStorei(g.UNPACK_ALIGNMENT, s0.unpackAlignment), g.pixelStorei(g.UNPACK_COLORSPACE_CONVERSION_WEBGL, Pi);
@@ -29994,13 +29994,13 @@ function WebGLTextures(g, t, r, m, v, C, _) {
29994
29994
  let Ni = at(s0.internalFormat, Zi, Hi, s0.colorSpace, s0.isVideoTexture);
29995
29995
  w0(R0, s0);
29996
29996
  let Mi;
29997
- const Vi = s0.mipmaps, G0 = s0.isVideoTexture !== !0, N0 = Ri.__version === void 0 || A0 === !0, yi = V0.dataReady, Ei = Gt(s0, U0);
29997
+ const Vi = s0.mipmaps, G0 = s0.isVideoTexture !== !0, N0 = Ri.__version === void 0 || K0 === !0, yi = V0.dataReady, Ei = Gt(s0, U0);
29998
29998
  if (s0.isDepthTexture)
29999
29999
  Ni = xt(s0.format === DepthStencilFormat, s0.type), N0 && (G0 ? r.texStorage2D(g.TEXTURE_2D, 1, Ni, U0.width, U0.height) : r.texImage2D(g.TEXTURE_2D, 0, Ni, U0.width, U0.height, 0, Zi, Hi, null));
30000
30000
  else if (s0.isDataTexture)
30001
30001
  if (Vi.length > 0) {
30002
30002
  G0 && N0 && r.texStorage2D(g.TEXTURE_2D, Ei, Ni, Vi[0].width, Vi[0].height);
30003
- for (let Ti = 0, q0 = Vi.length; Ti < q0; Ti++)
30003
+ for (let Ti = 0, ui = Vi.length; Ti < ui; Ti++)
30004
30004
  Mi = Vi[Ti], G0 ? yi && r.texSubImage2D(g.TEXTURE_2D, Ti, 0, 0, Mi.width, Mi.height, Zi, Hi, Mi.data) : r.texImage2D(g.TEXTURE_2D, Ti, Ni, Mi.width, Mi.height, 0, Zi, Hi, Mi.data);
30005
30005
  s0.generateMipmaps = !1;
30006
30006
  } else
@@ -30008,17 +30008,17 @@ function WebGLTextures(g, t, r, m, v, C, _) {
30008
30008
  else if (s0.isCompressedTexture)
30009
30009
  if (s0.isCompressedArrayTexture) {
30010
30010
  G0 && N0 && r.texStorage3D(g.TEXTURE_2D_ARRAY, Ei, Ni, Vi[0].width, Vi[0].height, U0.depth);
30011
- for (let Ti = 0, q0 = Vi.length; Ti < q0; Ti++)
30011
+ for (let Ti = 0, ui = Vi.length; Ti < ui; Ti++)
30012
30012
  if (Mi = Vi[Ti], s0.format !== RGBAFormat)
30013
30013
  if (Zi !== null)
30014
30014
  if (G0) {
30015
30015
  if (yi)
30016
30016
  if (s0.layerUpdates.size > 0) {
30017
- const Ki = getByteLength(Mi.width, Mi.height, s0.format, s0.type);
30017
+ const Ai = getByteLength(Mi.width, Mi.height, s0.format, s0.type);
30018
30018
  for (const Oi of s0.layerUpdates) {
30019
30019
  const qi = Mi.data.subarray(
30020
- Oi * Ki / Mi.data.BYTES_PER_ELEMENT,
30021
- (Oi + 1) * Ki / Mi.data.BYTES_PER_ELEMENT
30020
+ Oi * Ai / Mi.data.BYTES_PER_ELEMENT,
30021
+ (Oi + 1) * Ai / Mi.data.BYTES_PER_ELEMENT
30022
30022
  );
30023
30023
  r.compressedTexSubImage3D(g.TEXTURE_2D_ARRAY, Ti, 0, 0, Oi, Mi.width, Mi.height, 1, Zi, qi);
30024
30024
  }
@@ -30033,7 +30033,7 @@ function WebGLTextures(g, t, r, m, v, C, _) {
30033
30033
  G0 ? yi && r.texSubImage3D(g.TEXTURE_2D_ARRAY, Ti, 0, 0, 0, Mi.width, Mi.height, U0.depth, Zi, Hi, Mi.data) : r.texImage3D(g.TEXTURE_2D_ARRAY, Ti, Ni, Mi.width, Mi.height, U0.depth, 0, Zi, Hi, Mi.data);
30034
30034
  } else {
30035
30035
  G0 && N0 && r.texStorage2D(g.TEXTURE_2D, Ei, Ni, Vi[0].width, Vi[0].height);
30036
- for (let Ti = 0, q0 = Vi.length; Ti < q0; Ti++)
30036
+ for (let Ti = 0, ui = Vi.length; Ti < ui; Ti++)
30037
30037
  Mi = Vi[Ti], s0.format !== RGBAFormat ? Zi !== null ? G0 ? yi && r.compressedTexSubImage2D(g.TEXTURE_2D, Ti, 0, 0, Mi.width, Mi.height, Zi, Mi.data) : r.compressedTexImage2D(g.TEXTURE_2D, Ti, Ni, Mi.width, Mi.height, 0, Mi.data) : console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()") : G0 ? yi && r.texSubImage2D(g.TEXTURE_2D, Ti, 0, 0, Mi.width, Mi.height, Zi, Hi, Mi.data) : r.texImage2D(g.TEXTURE_2D, Ti, Ni, Mi.width, Mi.height, 0, Zi, Hi, Mi.data);
30038
30038
  }
30039
30039
  else if (s0.isDataArrayTexture)
@@ -30041,12 +30041,12 @@ function WebGLTextures(g, t, r, m, v, C, _) {
30041
30041
  if (N0 && r.texStorage3D(g.TEXTURE_2D_ARRAY, Ei, Ni, U0.width, U0.height, U0.depth), yi)
30042
30042
  if (s0.layerUpdates.size > 0) {
30043
30043
  const Ti = getByteLength(U0.width, U0.height, s0.format, s0.type);
30044
- for (const q0 of s0.layerUpdates) {
30045
- const Ki = U0.data.subarray(
30046
- q0 * Ti / U0.data.BYTES_PER_ELEMENT,
30047
- (q0 + 1) * Ti / U0.data.BYTES_PER_ELEMENT
30044
+ for (const ui of s0.layerUpdates) {
30045
+ const Ai = U0.data.subarray(
30046
+ ui * Ti / U0.data.BYTES_PER_ELEMENT,
30047
+ (ui + 1) * Ti / U0.data.BYTES_PER_ELEMENT
30048
30048
  );
30049
- r.texSubImage3D(g.TEXTURE_2D_ARRAY, 0, 0, 0, q0, U0.width, U0.height, 1, Zi, Hi, Ki);
30049
+ r.texSubImage3D(g.TEXTURE_2D_ARRAY, 0, 0, 0, ui, U0.width, U0.height, 1, Zi, Hi, Ai);
30050
30050
  }
30051
30051
  s0.clearLayerUpdates();
30052
30052
  } else
@@ -30060,21 +30060,21 @@ function WebGLTextures(g, t, r, m, v, C, _) {
30060
30060
  if (G0)
30061
30061
  r.texStorage2D(g.TEXTURE_2D, Ei, Ni, U0.width, U0.height);
30062
30062
  else {
30063
- let Ti = U0.width, q0 = U0.height;
30064
- for (let Ki = 0; Ki < Ei; Ki++)
30065
- r.texImage2D(g.TEXTURE_2D, Ki, Ni, Ti, q0, 0, Zi, Hi, null), Ti >>= 1, q0 >>= 1;
30063
+ let Ti = U0.width, ui = U0.height;
30064
+ for (let Ai = 0; Ai < Ei; Ai++)
30065
+ r.texImage2D(g.TEXTURE_2D, Ai, Ni, Ti, ui, 0, Zi, Hi, null), Ti >>= 1, ui >>= 1;
30066
30066
  }
30067
30067
  } else if (Vi.length > 0) {
30068
30068
  if (G0 && N0) {
30069
- const Ti = $0(Vi[0]);
30069
+ const Ti = q0(Vi[0]);
30070
30070
  r.texStorage2D(g.TEXTURE_2D, Ei, Ni, Ti.width, Ti.height);
30071
30071
  }
30072
- for (let Ti = 0, q0 = Vi.length; Ti < q0; Ti++)
30072
+ for (let Ti = 0, ui = Vi.length; Ti < ui; Ti++)
30073
30073
  Mi = Vi[Ti], G0 ? yi && r.texSubImage2D(g.TEXTURE_2D, Ti, 0, 0, Zi, Hi, Mi) : r.texImage2D(g.TEXTURE_2D, Ti, Ni, Zi, Hi, Mi);
30074
30074
  s0.generateMipmaps = !1;
30075
30075
  } else if (G0) {
30076
30076
  if (N0) {
30077
- const Ti = $0(U0);
30077
+ const Ti = q0(U0);
30078
30078
  r.texStorage2D(g.TEXTURE_2D, Ei, Ni, Ti.width, Ti.height);
30079
30079
  }
30080
30080
  yi && r.texSubImage2D(g.TEXTURE_2D, 0, 0, 0, Zi, Hi, U0);
@@ -30086,70 +30086,70 @@ function WebGLTextures(g, t, r, m, v, C, _) {
30086
30086
  }
30087
30087
  function O0(a0, s0, S0) {
30088
30088
  if (s0.image.length !== 6) return;
30089
- const R0 = Q0(a0, s0), A0 = s0.source;
30089
+ const R0 = $0(a0, s0), K0 = s0.source;
30090
30090
  r.bindTexture(g.TEXTURE_CUBE_MAP, a0.__webglTexture, g.TEXTURE0 + S0);
30091
- const V0 = m.get(A0);
30092
- if (A0.version !== V0.__version || R0 === !0) {
30091
+ const V0 = m.get(K0);
30092
+ if (K0.version !== V0.__version || R0 === !0) {
30093
30093
  r.activeTexture(g.TEXTURE0 + S0);
30094
30094
  const Ri = ColorManagement.getPrimaries(ColorManagement.workingColorSpace), Ci = s0.colorSpace === NoColorSpace ? null : ColorManagement.getPrimaries(s0.colorSpace), _i = s0.colorSpace === NoColorSpace || Ri === Ci ? g.NONE : g.BROWSER_DEFAULT_WEBGL;
30095
30095
  g.pixelStorei(g.UNPACK_FLIP_Y_WEBGL, s0.flipY), g.pixelStorei(g.UNPACK_PREMULTIPLY_ALPHA_WEBGL, s0.premultiplyAlpha), g.pixelStorei(g.UNPACK_ALIGNMENT, s0.unpackAlignment), g.pixelStorei(g.UNPACK_COLORSPACE_CONVERSION_WEBGL, _i);
30096
30096
  const Pi = s0.isCompressedTexture || s0.image[0].isCompressedTexture, U0 = s0.image[0] && s0.image[0].isDataTexture, Zi = [];
30097
- for (let q0 = 0; q0 < 6; q0++)
30098
- !Pi && !U0 ? Zi[q0] = ct(s0.image[q0], !0, v.maxCubemapSize) : Zi[q0] = U0 ? s0.image[q0].image : s0.image[q0], Zi[q0] = E0(s0, Zi[q0]);
30099
- const Hi = Zi[0], Ni = C.convert(s0.format, s0.colorSpace), Mi = C.convert(s0.type), Vi = at(s0.internalFormat, Ni, Mi, s0.colorSpace), G0 = s0.isVideoTexture !== !0, N0 = V0.__version === void 0 || R0 === !0, yi = A0.dataReady;
30097
+ for (let ui = 0; ui < 6; ui++)
30098
+ !Pi && !U0 ? Zi[ui] = ct(s0.image[ui], !0, v.maxCubemapSize) : Zi[ui] = U0 ? s0.image[ui].image : s0.image[ui], Zi[ui] = E0(s0, Zi[ui]);
30099
+ const Hi = Zi[0], Ni = C.convert(s0.format, s0.colorSpace), Mi = C.convert(s0.type), Vi = at(s0.internalFormat, Ni, Mi, s0.colorSpace), G0 = s0.isVideoTexture !== !0, N0 = V0.__version === void 0 || R0 === !0, yi = K0.dataReady;
30100
30100
  let Ei = Gt(s0, Hi);
30101
30101
  w0(g.TEXTURE_CUBE_MAP, s0);
30102
30102
  let Ti;
30103
30103
  if (Pi) {
30104
30104
  G0 && N0 && r.texStorage2D(g.TEXTURE_CUBE_MAP, Ei, Vi, Hi.width, Hi.height);
30105
- for (let q0 = 0; q0 < 6; q0++) {
30106
- Ti = Zi[q0].mipmaps;
30107
- for (let Ki = 0; Ki < Ti.length; Ki++) {
30108
- const Oi = Ti[Ki];
30109
- s0.format !== RGBAFormat ? Ni !== null ? G0 ? yi && r.compressedTexSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + q0, Ki, 0, 0, Oi.width, Oi.height, Ni, Oi.data) : r.compressedTexImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + q0, Ki, Vi, Oi.width, Oi.height, 0, Oi.data) : console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()") : G0 ? yi && r.texSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + q0, Ki, 0, 0, Oi.width, Oi.height, Ni, Mi, Oi.data) : r.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + q0, Ki, Vi, Oi.width, Oi.height, 0, Ni, Mi, Oi.data);
30105
+ for (let ui = 0; ui < 6; ui++) {
30106
+ Ti = Zi[ui].mipmaps;
30107
+ for (let Ai = 0; Ai < Ti.length; Ai++) {
30108
+ const Oi = Ti[Ai];
30109
+ s0.format !== RGBAFormat ? Ni !== null ? G0 ? yi && r.compressedTexSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + ui, Ai, 0, 0, Oi.width, Oi.height, Ni, Oi.data) : r.compressedTexImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + ui, Ai, Vi, Oi.width, Oi.height, 0, Oi.data) : console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()") : G0 ? yi && r.texSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + ui, Ai, 0, 0, Oi.width, Oi.height, Ni, Mi, Oi.data) : r.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + ui, Ai, Vi, Oi.width, Oi.height, 0, Ni, Mi, Oi.data);
30110
30110
  }
30111
30111
  }
30112
30112
  } else {
30113
30113
  if (Ti = s0.mipmaps, G0 && N0) {
30114
30114
  Ti.length > 0 && Ei++;
30115
- const q0 = $0(Zi[0]);
30116
- r.texStorage2D(g.TEXTURE_CUBE_MAP, Ei, Vi, q0.width, q0.height);
30115
+ const ui = q0(Zi[0]);
30116
+ r.texStorage2D(g.TEXTURE_CUBE_MAP, Ei, Vi, ui.width, ui.height);
30117
30117
  }
30118
- for (let q0 = 0; q0 < 6; q0++)
30118
+ for (let ui = 0; ui < 6; ui++)
30119
30119
  if (U0) {
30120
- G0 ? yi && r.texSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + q0, 0, 0, 0, Zi[q0].width, Zi[q0].height, Ni, Mi, Zi[q0].data) : r.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + q0, 0, Vi, Zi[q0].width, Zi[q0].height, 0, Ni, Mi, Zi[q0].data);
30121
- for (let Ki = 0; Ki < Ti.length; Ki++) {
30122
- const qi = Ti[Ki].image[q0].image;
30123
- G0 ? yi && r.texSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + q0, Ki + 1, 0, 0, qi.width, qi.height, Ni, Mi, qi.data) : r.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + q0, Ki + 1, Vi, qi.width, qi.height, 0, Ni, Mi, qi.data);
30120
+ G0 ? yi && r.texSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + ui, 0, 0, 0, Zi[ui].width, Zi[ui].height, Ni, Mi, Zi[ui].data) : r.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + ui, 0, Vi, Zi[ui].width, Zi[ui].height, 0, Ni, Mi, Zi[ui].data);
30121
+ for (let Ai = 0; Ai < Ti.length; Ai++) {
30122
+ const qi = Ti[Ai].image[ui].image;
30123
+ G0 ? yi && r.texSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + ui, Ai + 1, 0, 0, qi.width, qi.height, Ni, Mi, qi.data) : r.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + ui, Ai + 1, Vi, qi.width, qi.height, 0, Ni, Mi, qi.data);
30124
30124
  }
30125
30125
  } else {
30126
- G0 ? yi && r.texSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + q0, 0, 0, 0, Ni, Mi, Zi[q0]) : r.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + q0, 0, Vi, Ni, Mi, Zi[q0]);
30127
- for (let Ki = 0; Ki < Ti.length; Ki++) {
30128
- const Oi = Ti[Ki];
30129
- G0 ? yi && r.texSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + q0, Ki + 1, 0, 0, Ni, Mi, Oi.image[q0]) : r.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + q0, Ki + 1, Vi, Ni, Mi, Oi.image[q0]);
30126
+ G0 ? yi && r.texSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + ui, 0, 0, 0, Ni, Mi, Zi[ui]) : r.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + ui, 0, Vi, Ni, Mi, Zi[ui]);
30127
+ for (let Ai = 0; Ai < Ti.length; Ai++) {
30128
+ const Oi = Ti[Ai];
30129
+ G0 ? yi && r.texSubImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + ui, Ai + 1, 0, 0, Ni, Mi, Oi.image[ui]) : r.texImage2D(g.TEXTURE_CUBE_MAP_POSITIVE_X + ui, Ai + 1, Vi, Ni, Mi, Oi.image[ui]);
30130
30130
  }
30131
30131
  }
30132
30132
  }
30133
- Oe(s0) && ke(g.TEXTURE_CUBE_MAP), V0.__version = A0.version, s0.onUpdate && s0.onUpdate(s0);
30133
+ Oe(s0) && ke(g.TEXTURE_CUBE_MAP), V0.__version = K0.version, s0.onUpdate && s0.onUpdate(s0);
30134
30134
  }
30135
30135
  a0.__version = s0.version;
30136
30136
  }
30137
- function xi(a0, s0, S0, R0, A0, V0) {
30137
+ function xi(a0, s0, S0, R0, K0, V0) {
30138
30138
  const Ri = C.convert(S0.format, S0.colorSpace), Ci = C.convert(S0.type), _i = at(S0.internalFormat, Ri, Ci, S0.colorSpace), Pi = m.get(s0), U0 = m.get(S0);
30139
30139
  if (U0.__renderTarget = s0, !Pi.__hasExternalTextures) {
30140
30140
  const Zi = Math.max(1, s0.width >> V0), Hi = Math.max(1, s0.height >> V0);
30141
- A0 === g.TEXTURE_3D || A0 === g.TEXTURE_2D_ARRAY ? r.texImage3D(A0, V0, _i, Zi, Hi, s0.depth, 0, Ri, Ci, null) : r.texImage2D(A0, V0, _i, Zi, Hi, 0, Ri, Ci, null);
30141
+ K0 === g.TEXTURE_3D || K0 === g.TEXTURE_2D_ARRAY ? r.texImage3D(K0, V0, _i, Zi, Hi, s0.depth, 0, Ri, Ci, null) : r.texImage2D(K0, V0, _i, Zi, Hi, 0, Ri, Ci, null);
30142
30142
  }
30143
- r.bindFramebuffer(g.FRAMEBUFFER, a0), P0(s0) ? w.framebufferTexture2DMultisampleEXT(g.FRAMEBUFFER, R0, A0, U0.__webglTexture, 0, k0(s0)) : (A0 === g.TEXTURE_2D || A0 >= g.TEXTURE_CUBE_MAP_POSITIVE_X && A0 <= g.TEXTURE_CUBE_MAP_NEGATIVE_Z) && g.framebufferTexture2D(g.FRAMEBUFFER, R0, A0, U0.__webglTexture, V0), r.bindFramebuffer(g.FRAMEBUFFER, null);
30143
+ r.bindFramebuffer(g.FRAMEBUFFER, a0), P0(s0) ? w.framebufferTexture2DMultisampleEXT(g.FRAMEBUFFER, R0, K0, U0.__webglTexture, 0, k0(s0)) : (K0 === g.TEXTURE_2D || K0 >= g.TEXTURE_CUBE_MAP_POSITIVE_X && K0 <= g.TEXTURE_CUBE_MAP_NEGATIVE_Z) && g.framebufferTexture2D(g.FRAMEBUFFER, R0, K0, U0.__webglTexture, V0), r.bindFramebuffer(g.FRAMEBUFFER, null);
30144
30144
  }
30145
30145
  function wi(a0, s0, S0) {
30146
30146
  if (g.bindRenderbuffer(g.RENDERBUFFER, a0), s0.depthBuffer) {
30147
- const R0 = s0.depthTexture, A0 = R0 && R0.isDepthTexture ? R0.type : null, V0 = xt(s0.stencilBuffer, A0), Ri = s0.stencilBuffer ? g.DEPTH_STENCIL_ATTACHMENT : g.DEPTH_ATTACHMENT, Ci = k0(s0);
30147
+ const R0 = s0.depthTexture, K0 = R0 && R0.isDepthTexture ? R0.type : null, V0 = xt(s0.stencilBuffer, K0), Ri = s0.stencilBuffer ? g.DEPTH_STENCIL_ATTACHMENT : g.DEPTH_ATTACHMENT, Ci = k0(s0);
30148
30148
  P0(s0) ? w.renderbufferStorageMultisampleEXT(g.RENDERBUFFER, Ci, V0, s0.width, s0.height) : S0 ? g.renderbufferStorageMultisample(g.RENDERBUFFER, Ci, V0, s0.width, s0.height) : g.renderbufferStorage(g.RENDERBUFFER, V0, s0.width, s0.height), g.framebufferRenderbuffer(g.FRAMEBUFFER, Ri, g.RENDERBUFFER, a0);
30149
30149
  } else {
30150
30150
  const R0 = s0.textures;
30151
- for (let A0 = 0; A0 < R0.length; A0++) {
30152
- const V0 = R0[A0], Ri = C.convert(V0.format, V0.colorSpace), Ci = C.convert(V0.type), _i = at(V0.internalFormat, Ri, Ci, V0.colorSpace), Pi = k0(s0);
30151
+ for (let K0 = 0; K0 < R0.length; K0++) {
30152
+ const V0 = R0[K0], Ri = C.convert(V0.format, V0.colorSpace), Ci = C.convert(V0.type), _i = at(V0.internalFormat, Ri, Ci, V0.colorSpace), Pi = k0(s0);
30153
30153
  S0 && P0(s0) === !1 ? g.renderbufferStorageMultisample(g.RENDERBUFFER, Pi, _i, s0.width, s0.height) : P0(s0) ? w.renderbufferStorageMultisampleEXT(g.RENDERBUFFER, Pi, _i, s0.width, s0.height) : g.renderbufferStorage(g.RENDERBUFFER, _i, s0.width, s0.height);
30154
30154
  }
30155
30155
  }
@@ -30161,11 +30161,11 @@ function WebGLTextures(g, t, r, m, v, C, _) {
30161
30161
  throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");
30162
30162
  const R0 = m.get(s0.depthTexture);
30163
30163
  R0.__renderTarget = s0, (!R0.__webglTexture || s0.depthTexture.image.width !== s0.width || s0.depthTexture.image.height !== s0.height) && (s0.depthTexture.image.width = s0.width, s0.depthTexture.image.height = s0.height, s0.depthTexture.needsUpdate = !0), i0(s0.depthTexture, 0);
30164
- const A0 = R0.__webglTexture, V0 = k0(s0);
30164
+ const K0 = R0.__webglTexture, V0 = k0(s0);
30165
30165
  if (s0.depthTexture.format === DepthFormat)
30166
- P0(s0) ? w.framebufferTexture2DMultisampleEXT(g.FRAMEBUFFER, g.DEPTH_ATTACHMENT, g.TEXTURE_2D, A0, 0, V0) : g.framebufferTexture2D(g.FRAMEBUFFER, g.DEPTH_ATTACHMENT, g.TEXTURE_2D, A0, 0);
30166
+ P0(s0) ? w.framebufferTexture2DMultisampleEXT(g.FRAMEBUFFER, g.DEPTH_ATTACHMENT, g.TEXTURE_2D, K0, 0, V0) : g.framebufferTexture2D(g.FRAMEBUFFER, g.DEPTH_ATTACHMENT, g.TEXTURE_2D, K0, 0);
30167
30167
  else if (s0.depthTexture.format === DepthStencilFormat)
30168
- P0(s0) ? w.framebufferTexture2DMultisampleEXT(g.FRAMEBUFFER, g.DEPTH_STENCIL_ATTACHMENT, g.TEXTURE_2D, A0, 0, V0) : g.framebufferTexture2D(g.FRAMEBUFFER, g.DEPTH_STENCIL_ATTACHMENT, g.TEXTURE_2D, A0, 0);
30168
+ P0(s0) ? w.framebufferTexture2DMultisampleEXT(g.FRAMEBUFFER, g.DEPTH_STENCIL_ATTACHMENT, g.TEXTURE_2D, K0, 0, V0) : g.framebufferTexture2D(g.FRAMEBUFFER, g.DEPTH_STENCIL_ATTACHMENT, g.TEXTURE_2D, K0, 0);
30169
30169
  else
30170
30170
  throw new Error("Unknown depthTexture format");
30171
30171
  }
@@ -30174,10 +30174,10 @@ function WebGLTextures(g, t, r, m, v, C, _) {
30174
30174
  if (s0.__boundDepthTexture !== a0.depthTexture) {
30175
30175
  const R0 = a0.depthTexture;
30176
30176
  if (s0.__depthDisposeCallback && s0.__depthDisposeCallback(), R0) {
30177
- const A0 = () => {
30178
- delete s0.__boundDepthTexture, delete s0.__depthDisposeCallback, R0.removeEventListener("dispose", A0);
30177
+ const K0 = () => {
30178
+ delete s0.__boundDepthTexture, delete s0.__depthDisposeCallback, R0.removeEventListener("dispose", K0);
30179
30179
  };
30180
- R0.addEventListener("dispose", A0), s0.__depthDisposeCallback = A0;
30180
+ R0.addEventListener("dispose", K0), s0.__depthDisposeCallback = K0;
30181
30181
  }
30182
30182
  s0.__boundDepthTexture = R0;
30183
30183
  }
@@ -30191,28 +30191,28 @@ function WebGLTextures(g, t, r, m, v, C, _) {
30191
30191
  if (r.bindFramebuffer(g.FRAMEBUFFER, s0.__webglFramebuffer[R0]), s0.__webglDepthbuffer[R0] === void 0)
30192
30192
  s0.__webglDepthbuffer[R0] = g.createRenderbuffer(), wi(s0.__webglDepthbuffer[R0], a0, !1);
30193
30193
  else {
30194
- const A0 = a0.stencilBuffer ? g.DEPTH_STENCIL_ATTACHMENT : g.DEPTH_ATTACHMENT, V0 = s0.__webglDepthbuffer[R0];
30195
- g.bindRenderbuffer(g.RENDERBUFFER, V0), g.framebufferRenderbuffer(g.FRAMEBUFFER, A0, g.RENDERBUFFER, V0);
30194
+ const K0 = a0.stencilBuffer ? g.DEPTH_STENCIL_ATTACHMENT : g.DEPTH_ATTACHMENT, V0 = s0.__webglDepthbuffer[R0];
30195
+ g.bindRenderbuffer(g.RENDERBUFFER, V0), g.framebufferRenderbuffer(g.FRAMEBUFFER, K0, g.RENDERBUFFER, V0);
30196
30196
  }
30197
30197
  } else {
30198
30198
  const R0 = a0.texture.mipmaps;
30199
30199
  if (R0 && R0.length > 0 ? r.bindFramebuffer(g.FRAMEBUFFER, s0.__webglFramebuffer[0]) : r.bindFramebuffer(g.FRAMEBUFFER, s0.__webglFramebuffer), s0.__webglDepthbuffer === void 0)
30200
30200
  s0.__webglDepthbuffer = g.createRenderbuffer(), wi(s0.__webglDepthbuffer, a0, !1);
30201
30201
  else {
30202
- const A0 = a0.stencilBuffer ? g.DEPTH_STENCIL_ATTACHMENT : g.DEPTH_ATTACHMENT, V0 = s0.__webglDepthbuffer;
30203
- g.bindRenderbuffer(g.RENDERBUFFER, V0), g.framebufferRenderbuffer(g.FRAMEBUFFER, A0, g.RENDERBUFFER, V0);
30202
+ const K0 = a0.stencilBuffer ? g.DEPTH_STENCIL_ATTACHMENT : g.DEPTH_ATTACHMENT, V0 = s0.__webglDepthbuffer;
30203
+ g.bindRenderbuffer(g.RENDERBUFFER, V0), g.framebufferRenderbuffer(g.FRAMEBUFFER, K0, g.RENDERBUFFER, V0);
30204
30204
  }
30205
30205
  }
30206
30206
  r.bindFramebuffer(g.FRAMEBUFFER, null);
30207
30207
  }
30208
- function Ai(a0, s0, S0) {
30208
+ function Ki(a0, s0, S0) {
30209
30209
  const R0 = m.get(a0);
30210
30210
  s0 !== void 0 && xi(R0.__webglFramebuffer, a0, a0.texture, g.COLOR_ATTACHMENT0, g.TEXTURE_2D, 0), S0 !== void 0 && ki(a0);
30211
30211
  }
30212
30212
  function B0(a0) {
30213
30213
  const s0 = a0.texture, S0 = m.get(a0), R0 = m.get(s0);
30214
30214
  a0.addEventListener("dispose", Wt);
30215
- const A0 = a0.textures, V0 = a0.isWebGLCubeRenderTarget === !0, Ri = A0.length > 1;
30215
+ const K0 = a0.textures, V0 = a0.isWebGLCubeRenderTarget === !0, Ri = K0.length > 1;
30216
30216
  if (Ri || (R0.__webglTexture === void 0 && (R0.__webglTexture = g.createTexture()), R0.__version = s0.version, _.memory.textures++), V0) {
30217
30217
  S0.__webglFramebuffer = [];
30218
30218
  for (let Ci = 0; Ci < 6; Ci++)
@@ -30230,14 +30230,14 @@ function WebGLTextures(g, t, r, m, v, C, _) {
30230
30230
  } else
30231
30231
  S0.__webglFramebuffer = g.createFramebuffer();
30232
30232
  if (Ri)
30233
- for (let Ci = 0, _i = A0.length; Ci < _i; Ci++) {
30234
- const Pi = m.get(A0[Ci]);
30233
+ for (let Ci = 0, _i = K0.length; Ci < _i; Ci++) {
30234
+ const Pi = m.get(K0[Ci]);
30235
30235
  Pi.__webglTexture === void 0 && (Pi.__webglTexture = g.createTexture(), _.memory.textures++);
30236
30236
  }
30237
30237
  if (a0.samples > 0 && P0(a0) === !1) {
30238
30238
  S0.__webglMultisampledFramebuffer = g.createFramebuffer(), S0.__webglColorRenderbuffer = [], r.bindFramebuffer(g.FRAMEBUFFER, S0.__webglMultisampledFramebuffer);
30239
- for (let Ci = 0; Ci < A0.length; Ci++) {
30240
- const _i = A0[Ci];
30239
+ for (let Ci = 0; Ci < K0.length; Ci++) {
30240
+ const _i = K0[Ci];
30241
30241
  S0.__webglColorRenderbuffer[Ci] = g.createRenderbuffer(), g.bindRenderbuffer(g.RENDERBUFFER, S0.__webglColorRenderbuffer[Ci]);
30242
30242
  const Pi = C.convert(_i.format, _i.colorSpace), U0 = C.convert(_i.type), Zi = at(_i.internalFormat, Pi, U0, _i.colorSpace, a0.isXRRenderTarget === !0), Hi = k0(a0);
30243
30243
  g.renderbufferStorageMultisample(g.RENDERBUFFER, Hi, Zi, a0.width, a0.height), g.framebufferRenderbuffer(g.FRAMEBUFFER, g.COLOR_ATTACHMENT0 + Ci, g.RENDERBUFFER, S0.__webglColorRenderbuffer[Ci]);
@@ -30255,8 +30255,8 @@ function WebGLTextures(g, t, r, m, v, C, _) {
30255
30255
  xi(S0.__webglFramebuffer[Ci], a0, s0, g.COLOR_ATTACHMENT0, g.TEXTURE_CUBE_MAP_POSITIVE_X + Ci, 0);
30256
30256
  Oe(s0) && ke(g.TEXTURE_CUBE_MAP), r.unbindTexture();
30257
30257
  } else if (Ri) {
30258
- for (let Ci = 0, _i = A0.length; Ci < _i; Ci++) {
30259
- const Pi = A0[Ci], U0 = m.get(Pi);
30258
+ for (let Ci = 0, _i = K0.length; Ci < _i; Ci++) {
30259
+ const Pi = K0[Ci], U0 = m.get(Pi);
30260
30260
  r.bindTexture(g.TEXTURE_2D, U0.__webglTexture), w0(g.TEXTURE_2D, Pi), xi(S0.__webglFramebuffer, a0, Pi, g.COLOR_ATTACHMENT0 + Ci, g.TEXTURE_2D, 0), Oe(Pi) && ke(g.TEXTURE_2D);
30261
30261
  }
30262
30262
  r.unbindTexture();
@@ -30274,9 +30274,9 @@ function WebGLTextures(g, t, r, m, v, C, _) {
30274
30274
  function l0(a0) {
30275
30275
  const s0 = a0.textures;
30276
30276
  for (let S0 = 0, R0 = s0.length; S0 < R0; S0++) {
30277
- const A0 = s0[S0];
30278
- if (Oe(A0)) {
30279
- const V0 = je(a0), Ri = m.get(A0).__webglTexture;
30277
+ const K0 = s0[S0];
30278
+ if (Oe(K0)) {
30279
+ const V0 = je(a0), Ri = m.get(K0).__webglTexture;
30280
30280
  r.bindTexture(V0, Ri), ke(V0), r.unbindTexture();
30281
30281
  }
30282
30282
  }
@@ -30286,7 +30286,7 @@ function WebGLTextures(g, t, r, m, v, C, _) {
30286
30286
  if (a0.samples > 0) {
30287
30287
  if (P0(a0) === !1) {
30288
30288
  const s0 = a0.textures, S0 = a0.width, R0 = a0.height;
30289
- let A0 = g.COLOR_BUFFER_BIT;
30289
+ let K0 = g.COLOR_BUFFER_BIT;
30290
30290
  const V0 = a0.stencilBuffer ? g.DEPTH_STENCIL_ATTACHMENT : g.DEPTH_ATTACHMENT, Ri = m.get(a0), Ci = s0.length > 1;
30291
30291
  if (Ci)
30292
30292
  for (let Pi = 0; Pi < s0.length; Pi++)
@@ -30295,12 +30295,12 @@ function WebGLTextures(g, t, r, m, v, C, _) {
30295
30295
  const _i = a0.texture.mipmaps;
30296
30296
  _i && _i.length > 0 ? r.bindFramebuffer(g.DRAW_FRAMEBUFFER, Ri.__webglFramebuffer[0]) : r.bindFramebuffer(g.DRAW_FRAMEBUFFER, Ri.__webglFramebuffer);
30297
30297
  for (let Pi = 0; Pi < s0.length; Pi++) {
30298
- if (a0.resolveDepthBuffer && (a0.depthBuffer && (A0 |= g.DEPTH_BUFFER_BIT), a0.stencilBuffer && a0.resolveStencilBuffer && (A0 |= g.STENCIL_BUFFER_BIT)), Ci) {
30298
+ if (a0.resolveDepthBuffer && (a0.depthBuffer && (K0 |= g.DEPTH_BUFFER_BIT), a0.stencilBuffer && a0.resolveStencilBuffer && (K0 |= g.STENCIL_BUFFER_BIT)), Ci) {
30299
30299
  g.framebufferRenderbuffer(g.READ_FRAMEBUFFER, g.COLOR_ATTACHMENT0, g.RENDERBUFFER, Ri.__webglColorRenderbuffer[Pi]);
30300
30300
  const U0 = m.get(s0[Pi]).__webglTexture;
30301
30301
  g.framebufferTexture2D(g.DRAW_FRAMEBUFFER, g.COLOR_ATTACHMENT0, g.TEXTURE_2D, U0, 0);
30302
30302
  }
30303
- g.blitFramebuffer(0, 0, S0, R0, 0, 0, S0, R0, A0, g.NEAREST), E === !0 && (Si.length = 0, j0.length = 0, Si.push(g.COLOR_ATTACHMENT0 + Pi), a0.depthBuffer && a0.resolveDepthBuffer === !1 && (Si.push(V0), j0.push(V0), g.invalidateFramebuffer(g.DRAW_FRAMEBUFFER, j0)), g.invalidateFramebuffer(g.READ_FRAMEBUFFER, Si));
30303
+ g.blitFramebuffer(0, 0, S0, R0, 0, 0, S0, R0, K0, g.NEAREST), E === !0 && (Si.length = 0, j0.length = 0, Si.push(g.COLOR_ATTACHMENT0 + Pi), a0.depthBuffer && a0.resolveDepthBuffer === !1 && (Si.push(V0), j0.push(V0), g.invalidateFramebuffer(g.DRAW_FRAMEBUFFER, j0)), g.invalidateFramebuffer(g.READ_FRAMEBUFFER, Si));
30304
30304
  }
30305
30305
  if (r.bindFramebuffer(g.READ_FRAMEBUFFER, null), r.bindFramebuffer(g.DRAW_FRAMEBUFFER, null), Ci)
30306
30306
  for (let Pi = 0; Pi < s0.length; Pi++) {
@@ -30327,13 +30327,13 @@ function WebGLTextures(g, t, r, m, v, C, _) {
30327
30327
  ve.get(a0) !== s0 && (ve.set(a0, s0), a0.update());
30328
30328
  }
30329
30329
  function E0(a0, s0) {
30330
- const S0 = a0.colorSpace, R0 = a0.format, A0 = a0.type;
30331
- return a0.isCompressedTexture === !0 || a0.isVideoTexture === !0 || S0 !== LinearSRGBColorSpace && S0 !== NoColorSpace && (ColorManagement.getTransfer(S0) === SRGBTransfer ? (R0 !== RGBAFormat || A0 !== UnsignedByteType) && console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.") : console.error("THREE.WebGLTextures: Unsupported texture color space:", S0)), s0;
30330
+ const S0 = a0.colorSpace, R0 = a0.format, K0 = a0.type;
30331
+ return a0.isCompressedTexture === !0 || a0.isVideoTexture === !0 || S0 !== LinearSRGBColorSpace && S0 !== NoColorSpace && (ColorManagement.getTransfer(S0) === SRGBTransfer ? (R0 !== RGBAFormat || K0 !== UnsignedByteType) && console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType.") : console.error("THREE.WebGLTextures: Unsupported texture color space:", S0)), s0;
30332
30332
  }
30333
- function $0(a0) {
30333
+ function q0(a0) {
30334
30334
  return typeof HTMLImageElement != "undefined" && a0 instanceof HTMLImageElement ? (O.width = a0.naturalWidth || a0.width, O.height = a0.naturalHeight || a0.height) : typeof VideoFrame != "undefined" && a0 instanceof VideoFrame ? (O.width = a0.displayWidth, O.height = a0.displayHeight) : (O.width = a0.width, O.height = a0.height), O;
30335
30335
  }
30336
- this.allocateTextureUnit = n0, this.resetTextureUnits = t0, this.setTexture2D = i0, this.setTexture2DArray = Yt, this.setTexture3D = qt, this.setTextureCube = kt, this.rebindTextures = Ai, this.setupRenderTarget = B0, this.updateRenderTargetMipmap = l0, this.updateMultisampleRenderTarget = gi, this.setupDepthRenderbuffer = ki, this.setupFrameBufferTexture = xi, this.useMultisampledRTT = P0;
30336
+ this.allocateTextureUnit = n0, this.resetTextureUnits = t0, this.setTexture2D = i0, this.setTexture2DArray = Yt, this.setTexture3D = qt, this.setTextureCube = kt, this.rebindTextures = Ki, this.setupRenderTarget = B0, this.updateRenderTargetMipmap = l0, this.updateMultisampleRenderTarget = gi, this.setupDepthRenderbuffer = ki, this.setupFrameBufferTexture = xi, this.useMultisampledRTT = P0;
30337
30337
  }
30338
30338
  function WebGLUtils(g, t) {
30339
30339
  function r(m, v = NoColorSpace) {
@@ -30543,8 +30543,8 @@ class WebXRManager extends EventDispatcher {
30543
30543
  const I0 = xt.indexOf(v0.inputSource);
30544
30544
  if (I0 === -1)
30545
30545
  return;
30546
- const K0 = at[I0];
30547
- K0 !== void 0 && (K0.update(v0.inputSource, v0.frame, O || _), K0.dispatchEvent({ type: v0.type, data: v0.inputSource }));
30546
+ const A0 = at[I0];
30547
+ A0 !== void 0 && (A0.update(v0.inputSource, v0.frame, O || _), A0.dispatchEvent({ type: v0.type, data: v0.inputSource }));
30548
30548
  }
30549
30549
  function o0() {
30550
30550
  v.removeEventListener("select", n0), v.removeEventListener("selectstart", n0), v.removeEventListener("selectend", n0), v.removeEventListener("squeeze", n0), v.removeEventListener("squeezestart", n0), v.removeEventListener("squeezeend", n0), v.removeEventListener("end", o0), v.removeEventListener("inputsourceschange", i0);
@@ -30552,7 +30552,7 @@ class WebXRManager extends EventDispatcher {
30552
30552
  const I0 = xt[v0];
30553
30553
  I0 !== null && (xt[v0] = null, at[v0].disconnect(I0));
30554
30554
  }
30555
- Kt = null, t0 = null, ct.reset(), t.setRenderTarget(ke), Ae = null, Ne = null, Pe = null, v = null, je = null, Q0.stop(), m.isPresenting = !1, t.setPixelRatio(Lt), t.setSize(Gt.width, Gt.height, !1), m.dispatchEvent({ type: "sessionend" });
30555
+ Kt = null, t0 = null, ct.reset(), t.setRenderTarget(ke), Ae = null, Ne = null, Pe = null, v = null, je = null, $0.stop(), m.isPresenting = !1, t.setPixelRatio(Lt), t.setSize(Gt.width, Gt.height, !1), m.dispatchEvent({ type: "sessionend" });
30556
30556
  }
30557
30557
  this.setFramebufferScaleFactor = function(v0) {
30558
30558
  C = v0, m.isPresenting === !0 && console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.");
@@ -30574,8 +30574,8 @@ class WebXRManager extends EventDispatcher {
30574
30574
  return H0(this, null, function* () {
30575
30575
  if (v = v0, v !== null) {
30576
30576
  if (ke = t.getRenderTarget(), v.addEventListener("select", n0), v.addEventListener("selectstart", n0), v.addEventListener("selectend", n0), v.addEventListener("squeeze", n0), v.addEventListener("squeezestart", n0), v.addEventListener("squeezeend", n0), v.addEventListener("end", o0), v.addEventListener("inputsourceschange", i0), Oe.xrCompatible !== !0 && (yield r.makeXRCompatible()), Lt = t.getPixelRatio(), t.getSize(Gt), typeof XRWebGLBinding != "undefined" && "createProjectionLayer" in XRWebGLBinding.prototype) {
30577
- let K0 = null, O0 = null, xi = null;
30578
- Oe.depth && (xi = Oe.stencil ? r.DEPTH24_STENCIL8 : r.DEPTH_COMPONENT24, K0 = Oe.stencil ? DepthStencilFormat : DepthFormat, O0 = Oe.stencil ? UnsignedInt248Type : UnsignedIntType);
30577
+ let A0 = null, O0 = null, xi = null;
30578
+ Oe.depth && (xi = Oe.stencil ? r.DEPTH24_STENCIL8 : r.DEPTH_COMPONENT24, A0 = Oe.stencil ? DepthStencilFormat : DepthFormat, O0 = Oe.stencil ? UnsignedInt248Type : UnsignedIntType);
30579
30579
  const wi = {
30580
30580
  colorFormat: r.RGBA8,
30581
30581
  depthFormat: xi,
@@ -30587,7 +30587,7 @@ class WebXRManager extends EventDispatcher {
30587
30587
  {
30588
30588
  format: RGBAFormat,
30589
30589
  type: UnsignedByteType,
30590
- depthTexture: new DepthTexture(Ne.textureWidth, Ne.textureHeight, O0, void 0, void 0, void 0, void 0, void 0, void 0, K0),
30590
+ depthTexture: new DepthTexture(Ne.textureWidth, Ne.textureHeight, O0, void 0, void 0, void 0, void 0, void 0, void 0, A0),
30591
30591
  stencilBuffer: Oe.stencil,
30592
30592
  colorSpace: t.outputColorSpace,
30593
30593
  samples: Oe.antialias ? 4 : 0,
@@ -30596,14 +30596,14 @@ class WebXRManager extends EventDispatcher {
30596
30596
  }
30597
30597
  );
30598
30598
  } else {
30599
- const K0 = {
30599
+ const A0 = {
30600
30600
  antialias: Oe.antialias,
30601
30601
  alpha: !0,
30602
30602
  depth: Oe.depth,
30603
30603
  stencil: Oe.stencil,
30604
30604
  framebufferScaleFactor: C
30605
30605
  };
30606
- Ae = new XRWebGLLayer(v, r, K0), v.updateRenderState({ baseLayer: Ae }), t.setPixelRatio(1), t.setSize(Ae.framebufferWidth, Ae.framebufferHeight, !1), je = new WebGLRenderTarget(
30606
+ Ae = new XRWebGLLayer(v, r, A0), v.updateRenderState({ baseLayer: Ae }), t.setPixelRatio(1), t.setSize(Ae.framebufferWidth, Ae.framebufferHeight, !1), je = new WebGLRenderTarget(
30607
30607
  Ae.framebufferWidth,
30608
30608
  Ae.framebufferHeight,
30609
30609
  {
@@ -30616,7 +30616,7 @@ class WebXRManager extends EventDispatcher {
30616
30616
  }
30617
30617
  );
30618
30618
  }
30619
- je.isXRRenderTarget = !0, this.setFoveation(E), O = null, _ = yield v.requestReferenceSpace(w), Q0.setContext(v), Q0.start(), m.isPresenting = !0, m.dispatchEvent({ type: "sessionstart" });
30619
+ je.isXRRenderTarget = !0, this.setFoveation(E), O = null, _ = yield v.requestReferenceSpace(w), $0.setContext(v), $0.start(), m.isPresenting = !0, m.dispatchEvent({ type: "sessionstart" });
30620
30620
  }
30621
30621
  });
30622
30622
  }, this.getEnvironmentBlendMode = function() {
@@ -30627,36 +30627,36 @@ class WebXRManager extends EventDispatcher {
30627
30627
  };
30628
30628
  function i0(v0) {
30629
30629
  for (let I0 = 0; I0 < v0.removed.length; I0++) {
30630
- const K0 = v0.removed[I0], O0 = xt.indexOf(K0);
30631
- O0 >= 0 && (xt[O0] = null, at[O0].disconnect(K0));
30630
+ const A0 = v0.removed[I0], O0 = xt.indexOf(A0);
30631
+ O0 >= 0 && (xt[O0] = null, at[O0].disconnect(A0));
30632
30632
  }
30633
30633
  for (let I0 = 0; I0 < v0.added.length; I0++) {
30634
- const K0 = v0.added[I0];
30635
- let O0 = xt.indexOf(K0);
30634
+ const A0 = v0.added[I0];
30635
+ let O0 = xt.indexOf(A0);
30636
30636
  if (O0 === -1) {
30637
30637
  for (let wi = 0; wi < at.length; wi++)
30638
30638
  if (wi >= xt.length) {
30639
- xt.push(K0), O0 = wi;
30639
+ xt.push(A0), O0 = wi;
30640
30640
  break;
30641
30641
  } else if (xt[wi] === null) {
30642
- xt[wi] = K0, O0 = wi;
30642
+ xt[wi] = A0, O0 = wi;
30643
30643
  break;
30644
30644
  }
30645
30645
  if (O0 === -1) break;
30646
30646
  }
30647
30647
  const xi = at[O0];
30648
- xi && xi.connect(K0);
30648
+ xi && xi.connect(A0);
30649
30649
  }
30650
30650
  }
30651
30651
  const Yt = new Vector3(), qt = new Vector3();
30652
- function kt(v0, I0, K0) {
30653
- Yt.setFromMatrixPosition(I0.matrixWorld), qt.setFromMatrixPosition(K0.matrixWorld);
30654
- const O0 = Yt.distanceTo(qt), xi = I0.projectionMatrix.elements, wi = K0.projectionMatrix.elements, Li = xi[14] / (xi[10] - 1), ki = xi[14] / (xi[10] + 1), Ai = (xi[9] + 1) / xi[5], B0 = (xi[9] - 1) / xi[5], l0 = (xi[8] - 1) / xi[0], Si = (wi[8] + 1) / wi[0], j0 = Li * l0, gi = Li * Si, k0 = O0 / (-l0 + Si), P0 = k0 * -l0;
30652
+ function kt(v0, I0, A0) {
30653
+ Yt.setFromMatrixPosition(I0.matrixWorld), qt.setFromMatrixPosition(A0.matrixWorld);
30654
+ const O0 = Yt.distanceTo(qt), xi = I0.projectionMatrix.elements, wi = A0.projectionMatrix.elements, Li = xi[14] / (xi[10] - 1), ki = xi[14] / (xi[10] + 1), Ki = (xi[9] + 1) / xi[5], B0 = (xi[9] - 1) / xi[5], l0 = (xi[8] - 1) / xi[0], Si = (wi[8] + 1) / wi[0], j0 = Li * l0, gi = Li * Si, k0 = O0 / (-l0 + Si), P0 = k0 * -l0;
30655
30655
  if (I0.matrixWorld.decompose(v0.position, v0.quaternion, v0.scale), v0.translateX(P0), v0.translateZ(k0), v0.matrixWorld.compose(v0.position, v0.quaternion, v0.scale), v0.matrixWorldInverse.copy(v0.matrixWorld).invert(), xi[10] === -1)
30656
30656
  v0.projectionMatrix.copy(I0.projectionMatrix), v0.projectionMatrixInverse.copy(I0.projectionMatrixInverse);
30657
30657
  else {
30658
- const C0 = Li + k0, E0 = ki + k0, $0 = j0 - P0, a0 = gi + (O0 - P0), s0 = Ai * ki / E0 * C0, S0 = B0 * ki / E0 * C0;
30659
- v0.projectionMatrix.makePerspective($0, a0, s0, S0, C0, E0), v0.projectionMatrixInverse.copy(v0.projectionMatrix).invert();
30658
+ const C0 = Li + k0, E0 = ki + k0, q0 = j0 - P0, a0 = gi + (O0 - P0), s0 = Ki * ki / E0 * C0, S0 = B0 * ki / E0 * C0;
30659
+ v0.projectionMatrix.makePerspective(q0, a0, s0, S0, C0, E0), v0.projectionMatrixInverse.copy(v0.projectionMatrix).invert();
30660
30660
  }
30661
30661
  }
30662
30662
  function r0(v0, I0) {
@@ -30664,8 +30664,8 @@ class WebXRManager extends EventDispatcher {
30664
30664
  }
30665
30665
  this.updateCamera = function(v0) {
30666
30666
  if (v === null) return;
30667
- let I0 = v0.near, K0 = v0.far;
30668
- ct.texture !== null && (ct.depthNear > 0 && (I0 = ct.depthNear), ct.depthFar > 0 && (K0 = ct.depthFar)), Nt.near = Pt.near = Wt.near = I0, Nt.far = Pt.far = Wt.far = K0, (Kt !== Nt.near || t0 !== Nt.far) && (v.updateRenderState({
30667
+ let I0 = v0.near, A0 = v0.far;
30668
+ ct.texture !== null && (ct.depthNear > 0 && (I0 = ct.depthNear), ct.depthFar > 0 && (A0 = ct.depthFar)), Nt.near = Pt.near = Wt.near = I0, Nt.far = Pt.far = Wt.far = A0, (Kt !== Nt.near || t0 !== Nt.far) && (v.updateRenderState({
30669
30669
  depthNear: Nt.near,
30670
30670
  depthFar: Nt.far
30671
30671
  }), Kt = Nt.near, t0 = Nt.far), Wt.layers.mask = v0.layers.mask | 2, Pt.layers.mask = v0.layers.mask | 4, Nt.layers.mask = Wt.layers.mask | Pt.layers.mask;
@@ -30675,8 +30675,8 @@ class WebXRManager extends EventDispatcher {
30675
30675
  r0(xi[wi], O0);
30676
30676
  xi.length === 2 ? kt(Nt, Wt, Pt) : Nt.projectionMatrix.copy(Wt.projectionMatrix), f0(v0, Nt, O0);
30677
30677
  };
30678
- function f0(v0, I0, K0) {
30679
- K0 === null ? v0.matrix.copy(I0.matrixWorld) : (v0.matrix.copy(K0.matrixWorld), v0.matrix.invert(), v0.matrix.multiply(I0.matrixWorld)), v0.matrix.decompose(v0.position, v0.quaternion, v0.scale), v0.updateMatrixWorld(!0), v0.projectionMatrix.copy(I0.projectionMatrix), v0.projectionMatrixInverse.copy(I0.projectionMatrixInverse), v0.isPerspectiveCamera && (v0.fov = RAD2DEG * 2 * Math.atan(1 / v0.projectionMatrix.elements[5]), v0.zoom = 1);
30678
+ function f0(v0, I0, A0) {
30679
+ A0 === null ? v0.matrix.copy(I0.matrixWorld) : (v0.matrix.copy(A0.matrixWorld), v0.matrix.invert(), v0.matrix.multiply(I0.matrixWorld)), v0.matrix.decompose(v0.position, v0.quaternion, v0.scale), v0.updateMatrixWorld(!0), v0.projectionMatrix.copy(I0.projectionMatrix), v0.projectionMatrixInverse.copy(I0.projectionMatrixInverse), v0.isPerspectiveCamera && (v0.fov = RAD2DEG * 2 * Math.atan(1 / v0.projectionMatrix.elements[5]), v0.zoom = 1);
30680
30680
  }
30681
30681
  this.getCamera = function() {
30682
30682
  return Nt;
@@ -30693,40 +30693,40 @@ class WebXRManager extends EventDispatcher {
30693
30693
  let m0 = null;
30694
30694
  function w0(v0, I0) {
30695
30695
  if (ve = I0.getViewerPose(O || _), Fe = I0, ve !== null) {
30696
- const K0 = ve.views;
30696
+ const A0 = ve.views;
30697
30697
  Ae !== null && (t.setRenderTargetFramebuffer(je, Ae.framebuffer), t.setRenderTarget(je));
30698
30698
  let O0 = !1;
30699
- K0.length !== Nt.cameras.length && (Nt.cameras.length = 0, O0 = !0);
30700
- for (let Li = 0; Li < K0.length; Li++) {
30701
- const ki = K0[Li];
30702
- let Ai = null;
30699
+ A0.length !== Nt.cameras.length && (Nt.cameras.length = 0, O0 = !0);
30700
+ for (let Li = 0; Li < A0.length; Li++) {
30701
+ const ki = A0[Li];
30702
+ let Ki = null;
30703
30703
  if (Ae !== null)
30704
- Ai = Ae.getViewport(ki);
30704
+ Ki = Ae.getViewport(ki);
30705
30705
  else {
30706
30706
  const l0 = Pe.getViewSubImage(Ne, ki);
30707
- Ai = l0.viewport, Li === 0 && (t.setRenderTargetTextures(
30707
+ Ki = l0.viewport, Li === 0 && (t.setRenderTargetTextures(
30708
30708
  je,
30709
30709
  l0.colorTexture,
30710
30710
  l0.depthStencilTexture
30711
30711
  ), t.setRenderTarget(je));
30712
30712
  }
30713
30713
  let B0 = zt[Li];
30714
- B0 === void 0 && (B0 = new PerspectiveCamera(), B0.layers.enable(Li), B0.viewport = new Vector4(), zt[Li] = B0), B0.matrix.fromArray(ki.transform.matrix), B0.matrix.decompose(B0.position, B0.quaternion, B0.scale), B0.projectionMatrix.fromArray(ki.projectionMatrix), B0.projectionMatrixInverse.copy(B0.projectionMatrix).invert(), B0.viewport.set(Ai.x, Ai.y, Ai.width, Ai.height), Li === 0 && (Nt.matrix.copy(B0.matrix), Nt.matrix.decompose(Nt.position, Nt.quaternion, Nt.scale)), O0 === !0 && Nt.cameras.push(B0);
30714
+ B0 === void 0 && (B0 = new PerspectiveCamera(), B0.layers.enable(Li), B0.viewport = new Vector4(), zt[Li] = B0), B0.matrix.fromArray(ki.transform.matrix), B0.matrix.decompose(B0.position, B0.quaternion, B0.scale), B0.projectionMatrix.fromArray(ki.projectionMatrix), B0.projectionMatrixInverse.copy(B0.projectionMatrix).invert(), B0.viewport.set(Ki.x, Ki.y, Ki.width, Ki.height), Li === 0 && (Nt.matrix.copy(B0.matrix), Nt.matrix.decompose(Nt.position, Nt.quaternion, Nt.scale)), O0 === !0 && Nt.cameras.push(B0);
30715
30715
  }
30716
30716
  const xi = v.enabledFeatures;
30717
30717
  if (xi && xi.includes("depth-sensing") && v.depthUsage == "gpu-optimized" && Pe) {
30718
- const Li = Pe.getDepthInformation(K0[0]);
30718
+ const Li = Pe.getDepthInformation(A0[0]);
30719
30719
  Li && Li.isValid && Li.texture && ct.init(t, Li, v.renderState);
30720
30720
  }
30721
30721
  }
30722
- for (let K0 = 0; K0 < at.length; K0++) {
30723
- const O0 = xt[K0], xi = at[K0];
30722
+ for (let A0 = 0; A0 < at.length; A0++) {
30723
+ const O0 = xt[A0], xi = at[A0];
30724
30724
  O0 !== null && xi !== void 0 && xi.update(O0, I0, O || _);
30725
30725
  }
30726
30726
  m0 && m0(v0, I0), I0.detectedPlanes && m.dispatchEvent({ type: "planesdetected", data: I0 }), Fe = null;
30727
30727
  }
30728
- const Q0 = new WebGLAnimation();
30729
- Q0.setAnimationLoop(w0), this.setAnimationLoop = function(v0) {
30728
+ const $0 = new WebGLAnimation();
30729
+ $0.setAnimationLoop(w0), this.setAnimationLoop = function(v0) {
30730
30730
  m0 = v0;
30731
30731
  }, this.dispose = function() {
30732
30732
  };
@@ -30940,11 +30940,11 @@ class WebGLRenderer {
30940
30940
  const o0 = new Color$1(0);
30941
30941
  let i0 = 0, Yt = r.width, qt = r.height, kt = 1, r0 = null, f0 = null;
30942
30942
  const m0 = new Vector4(0, 0, Yt, qt), w0 = new Vector4(0, 0, Yt, qt);
30943
- let Q0 = !1;
30943
+ let $0 = !1;
30944
30944
  const v0 = new Frustum();
30945
- let I0 = !1, K0 = !1;
30945
+ let I0 = !1, A0 = !1;
30946
30946
  const O0 = new Matrix4(), xi = new Matrix4(), wi = new Vector3(), Li = new Vector4(), ki = { background: null, fog: null, environment: null, overrideMaterial: null, isScene: !0 };
30947
- let Ai = !1;
30947
+ let Ki = !1;
30948
30948
  function B0() {
30949
30949
  return Pt === null ? kt : 1;
30950
30950
  }
@@ -30963,7 +30963,7 @@ class WebGLRenderer {
30963
30963
  powerPreference: ve,
30964
30964
  failIfMajorPerformanceCaveat: Pe
30965
30965
  };
30966
- if ("setAttribute" in r && r.setAttribute("data-engine", `three.js r${REVISION}`), r.addEventListener("webglcontextlost", Ei, !1), r.addEventListener("webglcontextrestored", Ti, !1), r.addEventListener("webglcontextcreationerror", q0, !1), l0 === null) {
30966
+ if ("setAttribute" in r && r.setAttribute("data-engine", `three.js r${REVISION}`), r.addEventListener("webglcontextlost", Ei, !1), r.addEventListener("webglcontextrestored", Ti, !1), r.addEventListener("webglcontextcreationerror", ui, !1), l0 === null) {
30967
30967
  const h0 = "webgl2";
30968
30968
  if (l0 = Si(h0, e0), l0 === null)
30969
30969
  throw Si(h0) ? new Error("Error creating WebGL context with your selected attributes.") : new Error("Error creating WebGL context.");
@@ -30971,9 +30971,9 @@ class WebGLRenderer {
30971
30971
  } catch (e0) {
30972
30972
  throw console.error("THREE.WebGLRenderer: " + e0.message), e0;
30973
30973
  }
30974
- let j0, gi, k0, P0, C0, E0, $0, a0, s0, S0, R0, A0, V0, Ri, Ci, _i, Pi, U0, Zi, Hi, Ni, Mi, Vi, G0;
30974
+ let j0, gi, k0, P0, C0, E0, q0, a0, s0, S0, R0, K0, V0, Ri, Ci, _i, Pi, U0, Zi, Hi, Ni, Mi, Vi, G0;
30975
30975
  function N0() {
30976
- j0 = new WebGLExtensions(l0), j0.init(), Mi = new WebGLUtils(l0, j0), gi = new WebGLCapabilities(l0, j0, t, Mi), k0 = new WebGLState(l0, j0), gi.reverseDepthBuffer && Ne && k0.buffers.depth.setReversed(!0), P0 = new WebGLInfo(l0), C0 = new WebGLProperties(), E0 = new WebGLTextures(l0, j0, k0, C0, gi, Mi, P0), $0 = new WebGLCubeMaps(xt), a0 = new WebGLCubeUVMaps(xt), s0 = new WebGLAttributes(l0), Vi = new WebGLBindingStates(l0, s0), S0 = new WebGLGeometries(l0, s0, P0, Vi), R0 = new WebGLObjects(l0, S0, s0, P0), Zi = new WebGLMorphtargets(l0, gi, E0), _i = new WebGLClipping(C0), A0 = new WebGLPrograms(xt, $0, a0, j0, gi, Vi, _i), V0 = new WebGLMaterials(xt, C0), Ri = new WebGLRenderLists(), Ci = new WebGLRenderStates(j0), U0 = new WebGLBackground(xt, $0, a0, k0, R0, Ae, E), Pi = new WebGLShadowMap(xt, R0, gi), G0 = new WebGLUniformsGroups(l0, P0, gi, k0), Hi = new WebGLBufferRenderer(l0, j0, P0), Ni = new WebGLIndexedBufferRenderer(l0, j0, P0), P0.programs = A0.programs, xt.capabilities = gi, xt.extensions = j0, xt.properties = C0, xt.renderLists = Ri, xt.shadowMap = Pi, xt.state = k0, xt.info = P0;
30976
+ j0 = new WebGLExtensions(l0), j0.init(), Mi = new WebGLUtils(l0, j0), gi = new WebGLCapabilities(l0, j0, t, Mi), k0 = new WebGLState(l0, j0), gi.reverseDepthBuffer && Ne && k0.buffers.depth.setReversed(!0), P0 = new WebGLInfo(l0), C0 = new WebGLProperties(), E0 = new WebGLTextures(l0, j0, k0, C0, gi, Mi, P0), q0 = new WebGLCubeMaps(xt), a0 = new WebGLCubeUVMaps(xt), s0 = new WebGLAttributes(l0), Vi = new WebGLBindingStates(l0, s0), S0 = new WebGLGeometries(l0, s0, P0, Vi), R0 = new WebGLObjects(l0, S0, s0, P0), Zi = new WebGLMorphtargets(l0, gi, E0), _i = new WebGLClipping(C0), K0 = new WebGLPrograms(xt, q0, a0, j0, gi, Vi, _i), V0 = new WebGLMaterials(xt, C0), Ri = new WebGLRenderLists(), Ci = new WebGLRenderStates(j0), U0 = new WebGLBackground(xt, q0, a0, k0, R0, Ae, E), Pi = new WebGLShadowMap(xt, R0, gi), G0 = new WebGLUniformsGroups(l0, P0, gi, k0), Hi = new WebGLBufferRenderer(l0, j0, P0), Ni = new WebGLIndexedBufferRenderer(l0, j0, P0), P0.programs = K0.programs, xt.capabilities = gi, xt.extensions = j0, xt.properties = C0, xt.renderLists = Ri, xt.shadowMap = Pi, xt.state = k0, xt.info = P0;
30977
30977
  }
30978
30978
  N0();
30979
30979
  const yi = new WebXRManager(xt, l0);
@@ -31014,9 +31014,9 @@ class WebGLRenderer {
31014
31014
  }, this.setScissor = function(e0, h0, d0, g0) {
31015
31015
  e0.isVector4 ? w0.set(e0.x, e0.y, e0.z, e0.w) : w0.set(e0, h0, d0, g0), k0.scissor(t0.copy(w0).multiplyScalar(kt).round());
31016
31016
  }, this.getScissorTest = function() {
31017
- return Q0;
31017
+ return $0;
31018
31018
  }, this.setScissorTest = function(e0) {
31019
- k0.setScissorTest(Q0 = e0);
31019
+ k0.setScissorTest($0 = e0);
31020
31020
  }, this.setOpaqueSort = function(e0) {
31021
31021
  r0 = e0;
31022
31022
  }, this.setTransparentSort = function(e0) {
@@ -31051,7 +31051,7 @@ class WebGLRenderer {
31051
31051
  }, this.clearStencil = function() {
31052
31052
  this.clear(!1, !1, !0);
31053
31053
  }, this.dispose = function() {
31054
- r.removeEventListener("webglcontextlost", Ei, !1), r.removeEventListener("webglcontextrestored", Ti, !1), r.removeEventListener("webglcontextcreationerror", q0, !1), U0.dispose(), Ri.dispose(), Ci.dispose(), C0.dispose(), $0.dispose(), a0.dispose(), R0.dispose(), Vi.dispose(), G0.dispose(), A0.dispose(), yi.dispose(), yi.removeEventListener("sessionstart", Mn), yi.removeEventListener("sessionend", Ln), ln.stop();
31054
+ r.removeEventListener("webglcontextlost", Ei, !1), r.removeEventListener("webglcontextrestored", Ti, !1), r.removeEventListener("webglcontextcreationerror", ui, !1), U0.dispose(), Ri.dispose(), Ci.dispose(), C0.dispose(), q0.dispose(), a0.dispose(), R0.dispose(), Vi.dispose(), G0.dispose(), K0.dispose(), yi.dispose(), yi.removeEventListener("sessionstart", Mn), yi.removeEventListener("sessionend", Ln), ln.stop();
31055
31055
  };
31056
31056
  function Ei(e0) {
31057
31057
  e0.preventDefault(), console.log("THREE.WebGLRenderer: Context Lost."), Gt = !0;
@@ -31061,12 +31061,12 @@ class WebGLRenderer {
31061
31061
  const e0 = P0.autoReset, h0 = Pi.enabled, d0 = Pi.autoUpdate, g0 = Pi.needsUpdate, u0 = Pi.type;
31062
31062
  N0(), P0.autoReset = e0, Pi.enabled = h0, Pi.autoUpdate = d0, Pi.needsUpdate = g0, Pi.type = u0;
31063
31063
  }
31064
- function q0(e0) {
31064
+ function ui(e0) {
31065
31065
  console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ", e0.statusMessage);
31066
31066
  }
31067
- function Ki(e0) {
31067
+ function Ai(e0) {
31068
31068
  const h0 = e0.target;
31069
- h0.removeEventListener("dispose", Ki), Oi(h0);
31069
+ h0.removeEventListener("dispose", Ai), Oi(h0);
31070
31070
  }
31071
31071
  function Oi(e0) {
31072
31072
  qi(e0), C0.remove(e0);
@@ -31074,8 +31074,8 @@ class WebGLRenderer {
31074
31074
  function qi(e0) {
31075
31075
  const h0 = C0.get(e0).programs;
31076
31076
  h0 !== void 0 && (h0.forEach(function(d0) {
31077
- A0.releaseProgram(d0);
31078
- }), e0.isShaderMaterial && A0.releaseShaderCache(e0));
31077
+ K0.releaseProgram(d0);
31078
+ }), e0.isShaderMaterial && K0.releaseShaderCache(e0));
31079
31079
  }
31080
31080
  this.renderBufferDirect = function(e0, h0, d0, g0, u0, M0) {
31081
31081
  h0 === null && (h0 = ki);
@@ -31174,11 +31174,11 @@ class WebGLRenderer {
31174
31174
  return;
31175
31175
  }
31176
31176
  if (Gt === !0) return;
31177
- if (e0.matrixWorldAutoUpdate === !0 && e0.updateMatrixWorld(), h0.parent === null && h0.matrixWorldAutoUpdate === !0 && h0.updateMatrixWorld(), yi.enabled === !0 && yi.isPresenting === !0 && (yi.cameraAutoUpdate === !0 && yi.updateCamera(h0), h0 = yi.getCamera()), e0.isScene === !0 && e0.onBeforeRender(xt, e0, h0, Pt), ke = Ci.get(e0, at.length), ke.init(h0), at.push(ke), xi.multiplyMatrices(h0.projectionMatrix, h0.matrixWorldInverse), v0.setFromProjectionMatrix(xi), K0 = this.localClippingEnabled, I0 = _i.init(this.clippingPlanes, K0), Oe = Ri.get(e0, je.length), Oe.init(), je.push(Oe), yi.enabled === !0 && yi.isPresenting === !0) {
31177
+ if (e0.matrixWorldAutoUpdate === !0 && e0.updateMatrixWorld(), h0.parent === null && h0.matrixWorldAutoUpdate === !0 && h0.updateMatrixWorld(), yi.enabled === !0 && yi.isPresenting === !0 && (yi.cameraAutoUpdate === !0 && yi.updateCamera(h0), h0 = yi.getCamera()), e0.isScene === !0 && e0.onBeforeRender(xt, e0, h0, Pt), ke = Ci.get(e0, at.length), ke.init(h0), at.push(ke), xi.multiplyMatrices(h0.projectionMatrix, h0.matrixWorldInverse), v0.setFromProjectionMatrix(xi), A0 = this.localClippingEnabled, I0 = _i.init(this.clippingPlanes, A0), Oe = Ri.get(e0, je.length), Oe.init(), je.push(Oe), yi.enabled === !0 && yi.isPresenting === !0) {
31178
31178
  const M0 = xt.xr.getDepthSensingMesh();
31179
31179
  M0 !== null && gn(M0, h0, -1 / 0, xt.sortObjects);
31180
31180
  }
31181
- gn(e0, h0, 0, xt.sortObjects), Oe.finish(), xt.sortObjects === !0 && Oe.sort(r0, f0), Ai = yi.enabled === !1 || yi.isPresenting === !1 || yi.hasDepthSensing() === !1, Ai && U0.addToRenderList(Oe, e0), this.info.render.frame++, I0 === !0 && _i.beginShadows();
31181
+ gn(e0, h0, 0, xt.sortObjects), Oe.finish(), xt.sortObjects === !0 && Oe.sort(r0, f0), Ki = yi.enabled === !1 || yi.isPresenting === !1 || yi.hasDepthSensing() === !1, Ki && U0.addToRenderList(Oe, e0), this.info.render.frame++, I0 === !0 && _i.beginShadows();
31182
31182
  const d0 = ke.state.shadowsArray;
31183
31183
  Pi.render(d0, e0, h0), I0 === !0 && _i.endShadows(), this.info.autoReset === !0 && this.info.reset();
31184
31184
  const g0 = Oe.opaque, u0 = Oe.transmissive;
@@ -31189,13 +31189,13 @@ class WebGLRenderer {
31189
31189
  const F0 = M0[T0];
31190
31190
  Tn(g0, u0, e0, F0);
31191
31191
  }
31192
- Ai && U0.render(e0);
31192
+ Ki && U0.render(e0);
31193
31193
  for (let T0 = 0, _0 = M0.length; T0 < _0; T0++) {
31194
31194
  const F0 = M0[T0];
31195
31195
  xn(Oe, e0, F0, F0.viewport);
31196
31196
  }
31197
31197
  } else
31198
- u0.length > 0 && Tn(g0, u0, e0, h0), Ai && U0.render(e0), xn(Oe, e0, h0);
31198
+ u0.length > 0 && Tn(g0, u0, e0, h0), Ki && U0.render(e0), xn(Oe, e0, h0);
31199
31199
  Pt !== null && Wt === 0 && (E0.updateMultisampleRenderTarget(Pt), E0.updateRenderTargetMipmap(Pt)), e0.isScene === !0 && e0.onAfterRender(xt, e0, h0), Vi.resetDefaultState(), zt = -1, Nt = null, at.pop(), at.length > 0 ? (ke = at[at.length - 1], I0 === !0 && _i.setGlobalState(xt.clippingPlanes, ke.state.camera)) : ke = null, je.pop(), je.length > 0 ? Oe = je[je.length - 1] : Oe = null;
31200
31200
  };
31201
31201
  function gn(e0, h0, d0, g0) {
@@ -31248,7 +31248,7 @@ class WebGLRenderer {
31248
31248
  const M0 = ke.state.transmissionRenderTarget[g0.id], T0 = g0.viewport || Kt;
31249
31249
  M0.setSize(T0.z * xt.transmissionResolutionScale, T0.w * xt.transmissionResolutionScale);
31250
31250
  const _0 = xt.getRenderTarget();
31251
- xt.setRenderTarget(M0), xt.getClearColor(o0), i0 = xt.getClearAlpha(), i0 < 1 && xt.setClearColor(16777215, 0.5), xt.clear(), Ai && U0.render(d0);
31251
+ xt.setRenderTarget(M0), xt.getClearColor(o0), i0 = xt.getClearAlpha(), i0 < 1 && xt.setClearColor(16777215, 0.5), xt.clear(), Ki && U0.render(d0);
31252
31252
  const F0 = xt.toneMapping;
31253
31253
  xt.toneMapping = NoToneMapping;
31254
31254
  const D0 = g0.viewport;
@@ -31278,15 +31278,15 @@ class WebGLRenderer {
31278
31278
  }
31279
31279
  function mn(e0, h0, d0) {
31280
31280
  h0.isScene !== !0 && (h0 = ki);
31281
- const g0 = C0.get(e0), u0 = ke.state.lights, M0 = ke.state.shadowsArray, T0 = u0.state.version, _0 = A0.getParameters(e0, u0.state, M0, h0, d0), F0 = A0.getProgramCacheKey(_0);
31281
+ const g0 = C0.get(e0), u0 = ke.state.lights, M0 = ke.state.shadowsArray, T0 = u0.state.version, _0 = K0.getParameters(e0, u0.state, M0, h0, d0), F0 = K0.getProgramCacheKey(_0);
31282
31282
  let D0 = g0.programs;
31283
- g0.environment = e0.isMeshStandardMaterial ? h0.environment : null, g0.fog = h0.fog, g0.envMap = (e0.isMeshStandardMaterial ? a0 : $0).get(e0.envMap || g0.environment), g0.envMapRotation = g0.environment !== null && e0.envMap === null ? h0.environmentRotation : e0.envMapRotation, D0 === void 0 && (e0.addEventListener("dispose", Ki), D0 = /* @__PURE__ */ new Map(), g0.programs = D0);
31283
+ g0.environment = e0.isMeshStandardMaterial ? h0.environment : null, g0.fog = h0.fog, g0.envMap = (e0.isMeshStandardMaterial ? a0 : q0).get(e0.envMap || g0.environment), g0.envMapRotation = g0.environment !== null && e0.envMap === null ? h0.environmentRotation : e0.envMapRotation, D0 === void 0 && (e0.addEventListener("dispose", Ai), D0 = /* @__PURE__ */ new Map(), g0.programs = D0);
31284
31284
  let J0 = D0.get(F0);
31285
31285
  if (J0 !== void 0) {
31286
31286
  if (g0.currentProgram === J0 && g0.lightsStateVersion === T0)
31287
31287
  return vn(e0, _0), J0;
31288
31288
  } else
31289
- _0.uniforms = A0.getUniforms(e0), e0.onBeforeCompile(_0, xt), J0 = A0.acquireProgram(_0, F0), D0.set(F0, J0), g0.uniforms = _0.uniforms;
31289
+ _0.uniforms = K0.getUniforms(e0), e0.onBeforeCompile(_0, xt), J0 = K0.acquireProgram(_0, F0), D0.set(F0, J0), g0.uniforms = _0.uniforms;
31290
31290
  const bi = g0.uniforms;
31291
31291
  return (!e0.isShaderMaterial && !e0.isRawShaderMaterial || e0.clipping === !0) && (bi.clippingPlanes = _i.uniform), vn(e0, _0), g0.needsLights = hn(e0), g0.lightsStateVersion = T0, g0.needsLights && (bi.ambientLightColor.value = u0.state.ambient, bi.lightProbe.value = u0.state.probe, bi.directionalLights.value = u0.state.directional, bi.directionalLightShadows.value = u0.state.directionalShadow, bi.spotLights.value = u0.state.spot, bi.spotLightShadows.value = u0.state.spotShadow, bi.rectAreaLights.value = u0.state.rectArea, bi.ltc_1.value = u0.state.rectAreaLTC1, bi.ltc_2.value = u0.state.rectAreaLTC2, bi.pointLights.value = u0.state.point, bi.pointLightShadows.value = u0.state.pointShadow, bi.hemisphereLights.value = u0.state.hemi, bi.directionalShadowMap.value = u0.state.directionalShadowMap, bi.directionalShadowMatrix.value = u0.state.directionalShadowMatrix, bi.spotShadowMap.value = u0.state.spotShadowMap, bi.spotLightMatrix.value = u0.state.spotLightMatrix, bi.spotLightMap.value = u0.state.spotLightMap, bi.pointShadowMap.value = u0.state.pointShadowMap, bi.pointShadowMatrix.value = u0.state.pointShadowMatrix), g0.currentProgram = J0, g0.uniformsList = null, J0;
31292
31292
  }
@@ -31303,11 +31303,11 @@ class WebGLRenderer {
31303
31303
  }
31304
31304
  function Rn(e0, h0, d0, g0, u0) {
31305
31305
  h0.isScene !== !0 && (h0 = ki), E0.resetTextureUnits();
31306
- const M0 = h0.fog, T0 = g0.isMeshStandardMaterial ? h0.environment : null, _0 = Pt === null ? xt.outputColorSpace : Pt.isXRRenderTarget === !0 ? Pt.texture.colorSpace : LinearSRGBColorSpace, F0 = (g0.isMeshStandardMaterial ? a0 : $0).get(g0.envMap || T0), D0 = g0.vertexColors === !0 && !!d0.attributes.color && d0.attributes.color.itemSize === 4, J0 = !!d0.attributes.tangent && (!!g0.normalMap || g0.anisotropy > 0), bi = !!d0.morphAttributes.position, vi = !!d0.morphAttributes.normal, Xi = !!d0.morphAttributes.color;
31306
+ const M0 = h0.fog, T0 = g0.isMeshStandardMaterial ? h0.environment : null, _0 = Pt === null ? xt.outputColorSpace : Pt.isXRRenderTarget === !0 ? Pt.texture.colorSpace : LinearSRGBColorSpace, F0 = (g0.isMeshStandardMaterial ? a0 : q0).get(g0.envMap || T0), D0 = g0.vertexColors === !0 && !!d0.attributes.color && d0.attributes.color.itemSize === 4, J0 = !!d0.attributes.tangent && (!!g0.normalMap || g0.anisotropy > 0), bi = !!d0.morphAttributes.position, vi = !!d0.morphAttributes.normal, Xi = !!d0.morphAttributes.color;
31307
31307
  let Wi = NoToneMapping;
31308
31308
  g0.toneMapped && (Pt === null || Pt.isXRRenderTarget === !0) && (Wi = xt.toneMapping);
31309
31309
  const Yi = d0.morphAttributes.position || d0.morphAttributes.normal || d0.morphAttributes.color, Fi = Yi !== void 0 ? Yi.length : 0, Ii = C0.get(g0), Di = ke.state.lights;
31310
- if (I0 === !0 && (K0 === !0 || e0 !== Nt)) {
31310
+ if (I0 === !0 && (A0 === !0 || e0 !== Nt)) {
31311
31311
  const en = e0 === Nt && g0.id === zt;
31312
31312
  _i.setState(g0, e0, en);
31313
31313
  }
@@ -31386,7 +31386,7 @@ class WebGLRenderer {
31386
31386
  const J0 = C0.get(e0).__webglFramebuffer;
31387
31387
  e0.isWebGLCubeRenderTarget ? (Array.isArray(J0[h0]) ? u0 = J0[h0][d0] : u0 = J0[h0], M0 = !0) : e0.samples > 0 && E0.useMultisampledRTT(e0) === !1 ? u0 = C0.get(e0).__webglMultisampledFramebuffer : Array.isArray(J0) ? u0 = J0[d0] : u0 = J0, Kt.copy(e0.viewport), t0.copy(e0.scissor), n0 = e0.scissorTest;
31388
31388
  } else
31389
- Kt.copy(m0).multiplyScalar(kt).floor(), t0.copy(w0).multiplyScalar(kt).floor(), n0 = Q0;
31389
+ Kt.copy(m0).multiplyScalar(kt).floor(), t0.copy(w0).multiplyScalar(kt).floor(), n0 = $0;
31390
31390
  if (d0 !== 0 && (u0 = Ut), k0.bindFramebuffer(l0.FRAMEBUFFER, u0) && g0 && k0.drawBuffers(e0, u0), k0.viewport(Kt), k0.scissor(t0), k0.setScissorTest(n0), M0) {
31391
31391
  const F0 = C0.get(e0.texture);
31392
31392
  l0.framebufferTexture2D(l0.FRAMEBUFFER, l0.COLOR_ATTACHMENT0, l0.TEXTURE_CUBE_MAP_POSITIVE_X + h0, F0.__webglTexture, d0);
@@ -33755,8 +33755,8 @@ function clipCircle(g) {
33755
33755
  Yt < i0 && (r0 = i0, i0 = Yt, Yt = r0);
33756
33756
  var f0 = Yt - i0, m0 = abs$1(f0 - pi$3) < epsilon$3, w0 = m0 || f0 < epsilon$3;
33757
33757
  if (!m0 && kt < qt && (r0 = qt, qt = kt, kt = r0), w0 ? m0 ? qt + kt > 0 ^ o0[1] < (abs$1(o0[0] - i0) < epsilon$3 ? qt : kt) : qt <= o0[1] && o0[1] <= kt : f0 > pi$3 ^ (i0 <= o0[0] && o0[0] <= Yt)) {
33758
- var Q0 = cartesianScale(zt, (-Nt + n0) / Kt);
33759
- return cartesianAddInPlace(Q0, Wt), [o0, spherical$1(Q0)];
33758
+ var $0 = cartesianScale(zt, (-Nt + n0) / Kt);
33759
+ return cartesianAddInPlace($0, Wt), [o0, spherical$1($0)];
33760
33760
  }
33761
33761
  }
33762
33762
  }
@@ -33843,8 +33843,8 @@ function clipRectangle(g, t, r, m) {
33843
33843
  }
33844
33844
  function zt() {
33845
33845
  for (var i0 = 0, Yt = 0, qt = Ae.length; Yt < qt; ++Yt)
33846
- for (var kt = Ae[Yt], r0 = 1, f0 = kt.length, m0 = kt[0], w0, Q0, v0 = m0[0], I0 = m0[1]; r0 < f0; ++r0)
33847
- w0 = v0, Q0 = I0, m0 = kt[r0], v0 = m0[0], I0 = m0[1], Q0 <= m ? I0 > m && (v0 - w0) * (m - Q0) > (I0 - Q0) * (g - w0) && ++i0 : I0 <= m && (v0 - w0) * (m - Q0) < (I0 - Q0) * (g - w0) && --i0;
33846
+ for (var kt = Ae[Yt], r0 = 1, f0 = kt.length, m0 = kt[0], w0, $0, v0 = m0[0], I0 = m0[1]; r0 < f0; ++r0)
33847
+ w0 = v0, $0 = I0, m0 = kt[r0], v0 = m0[0], I0 = m0[1], $0 <= m ? I0 > m && (v0 - w0) * (m - $0) > (I0 - $0) * (g - w0) && ++i0 : I0 <= m && (v0 - w0) * (m - $0) < (I0 - $0) * (g - w0) && --i0;
33848
33848
  return i0;
33849
33849
  }
33850
33850
  function Nt() {
@@ -37687,25 +37687,25 @@ class ViewHelper extends Object3D {
37687
37687
  const Kt = new Vector3(), t0 = 128, n0 = 2 * Math.PI;
37688
37688
  this.render = function(v0) {
37689
37689
  this.quaternion.copy(t.quaternion).invert(), this.updateMatrixWorld(), Kt.set(0, 0, 1), Kt.applyQuaternion(t.quaternion);
37690
- const I0 = r.offsetWidth - t0, K0 = v0.isWebGPURenderer ? r.offsetHeight - t0 : 0;
37691
- v0.clearDepth(), v0.getViewport(kt), v0.setViewport(I0, K0, t0, t0), v0.render(this, Ne), v0.setViewport(kt.x, kt.y, kt.z, kt.w);
37690
+ const I0 = r.offsetWidth - t0, A0 = v0.isWebGPURenderer ? r.offsetHeight - t0 : 0;
37691
+ v0.clearDepth(), v0.getViewport(kt), v0.setViewport(I0, A0, t0, t0), v0.render(this, Ne), v0.setViewport(kt.x, kt.y, kt.z, kt.w);
37692
37692
  };
37693
37693
  const o0 = new Vector3(), i0 = new Quaternion(), Yt = new Quaternion(), qt = new Quaternion(), kt = new Vector4();
37694
37694
  let r0 = 0;
37695
37695
  this.handleClick = function(v0) {
37696
37696
  if (this.animating === !0) return !1;
37697
- const I0 = r.getBoundingClientRect(), K0 = I0.left + (r.offsetWidth - t0), O0 = I0.top + (r.offsetHeight - t0);
37698
- ve.x = (v0.clientX - K0) / (I0.right - K0) * 2 - 1, ve.y = -((v0.clientY - O0) / (I0.bottom - O0)) * 2 + 1, O.setFromCamera(ve, Ne);
37697
+ const I0 = r.getBoundingClientRect(), A0 = I0.left + (r.offsetWidth - t0), O0 = I0.top + (r.offsetHeight - t0);
37698
+ ve.x = (v0.clientX - A0) / (I0.right - A0) * 2 - 1, ve.y = -((v0.clientY - O0) / (I0.bottom - O0)) * 2 + 1, O.setFromCamera(ve, Ne);
37699
37699
  const xi = O.intersectObjects(E);
37700
37700
  if (xi.length > 0) {
37701
37701
  const Li = xi[0].object;
37702
37702
  return f0(Li, this.center), this.animating = !0, !0;
37703
37703
  } else
37704
37704
  return !1;
37705
- }, this.setLabels = function(v0, I0, K0) {
37706
- w.labelX = v0, w.labelY = I0, w.labelZ = K0, Q0();
37707
- }, this.setLabelStyle = function(v0, I0, K0) {
37708
- w.font = v0, w.color = I0, w.radius = K0, Q0();
37705
+ }, this.setLabels = function(v0, I0, A0) {
37706
+ w.labelX = v0, w.labelY = I0, w.labelZ = A0, $0();
37707
+ }, this.setLabelStyle = function(v0, I0, A0) {
37708
+ w.font = v0, w.color = I0, w.radius = A0, $0();
37709
37709
  }, this.update = function(v0) {
37710
37710
  const I0 = v0 * n0;
37711
37711
  Yt.rotateTowards(qt, I0), t.position.set(0, 0, 1).applyQuaternion(Yt).multiplyScalar(r0).add(this.center), t.quaternion.rotateTowards(i0, I0), Yt.angleTo(qt) === 0 && (this.animating = !1);
@@ -37741,14 +37741,14 @@ class ViewHelper extends Object3D {
37741
37741
  return new MeshBasicMaterial({ color: v0, toneMapped: !1 });
37742
37742
  }
37743
37743
  function w0(v0, I0) {
37744
- const { font: K0 = "24px Arial", color: O0 = "#000000", radius: xi = 14 } = w, wi = document.createElement("canvas");
37744
+ const { font: A0 = "24px Arial", color: O0 = "#000000", radius: xi = 14 } = w, wi = document.createElement("canvas");
37745
37745
  wi.width = 64, wi.height = 64;
37746
37746
  const Li = wi.getContext("2d");
37747
- Li.beginPath(), Li.arc(32, 32, xi, 0, 2 * Math.PI), Li.closePath(), Li.fillStyle = v0.getStyle(), Li.fill(), I0 && (Li.font = K0, Li.textAlign = "center", Li.fillStyle = O0, Li.fillText(I0, 32, 41));
37747
+ Li.beginPath(), Li.arc(32, 32, xi, 0, 2 * Math.PI), Li.closePath(), Li.fillStyle = v0.getStyle(), Li.fill(), I0 && (Li.font = A0, Li.textAlign = "center", Li.fillStyle = O0, Li.fillText(I0, 32, 41));
37748
37748
  const ki = new CanvasTexture(wi);
37749
37749
  return ki.colorSpace = SRGBColorSpace, new SpriteMaterial({ map: ki, toneMapped: !1 });
37750
37750
  }
37751
- function Q0() {
37751
+ function $0() {
37752
37752
  Gt.material.map.dispose(), Lt.material.map.dispose(), Wt.material.map.dispose(), Gt.material.dispose(), Lt.material.dispose(), Wt.material.dispose(), Gt.material = w0(m, w.labelX), Lt.material = w0(v, w.labelY), Wt.material = w0(C, w.labelZ);
37753
37753
  }
37754
37754
  }
@@ -38223,8 +38223,8 @@ class TransformControlsGizmo extends Object3D {
38223
38223
  const Yt = new Object3D();
38224
38224
  for (const qt in i0)
38225
38225
  for (let kt = i0[qt].length; kt--; ) {
38226
- const r0 = i0[qt][kt][0].clone(), f0 = i0[qt][kt][1], m0 = i0[qt][kt][2], w0 = i0[qt][kt][3], Q0 = i0[qt][kt][4];
38227
- r0.name = qt, r0.tag = Q0, f0 && r0.position.set(f0[0], f0[1], f0[2]), m0 && r0.rotation.set(m0[0], m0[1], m0[2]), w0 && r0.scale.set(w0[0], w0[1], w0[2]), r0.updateMatrix();
38226
+ const r0 = i0[qt][kt][0].clone(), f0 = i0[qt][kt][1], m0 = i0[qt][kt][2], w0 = i0[qt][kt][3], $0 = i0[qt][kt][4];
38227
+ r0.name = qt, r0.tag = $0, f0 && r0.position.set(f0[0], f0[1], f0[2]), m0 && r0.rotation.set(m0[0], m0[1], m0[2]), w0 && r0.scale.set(w0[0], w0[1], w0[2]), r0.updateMatrix();
38228
38228
  const v0 = r0.geometry.clone();
38229
38229
  v0.applyMatrix4(r0.matrix), r0.geometry = v0, r0.renderOrder = 1 / 0, r0.position.set(0, 0, 0), r0.rotation.set(0, 0, 0), r0.scale.set(1, 1, 1), Yt.add(r0);
38230
38230
  }
@@ -38831,15 +38831,15 @@ class SimplexNoise {
38831
38831
  const O = (t + r + m) * 0.3333333333333333, ve = Math.floor(t + O), Pe = Math.floor(r + O), Ne = Math.floor(m + O), Ae = 1 / 6, Fe = (ve + Pe + Ne) * Ae, ct = ve - Fe, Oe = Pe - Fe, ke = Ne - Fe, je = t - ct, at = r - Oe, xt = m - ke;
38832
38832
  let Gt, Lt, Wt, Pt, zt, Nt;
38833
38833
  je >= at ? at >= xt ? (Gt = 1, Lt = 0, Wt = 0, Pt = 1, zt = 1, Nt = 0) : je >= xt ? (Gt = 1, Lt = 0, Wt = 0, Pt = 1, zt = 0, Nt = 1) : (Gt = 0, Lt = 0, Wt = 1, Pt = 1, zt = 0, Nt = 1) : at < xt ? (Gt = 0, Lt = 0, Wt = 1, Pt = 0, zt = 1, Nt = 1) : je < xt ? (Gt = 0, Lt = 1, Wt = 0, Pt = 0, zt = 1, Nt = 1) : (Gt = 0, Lt = 1, Wt = 0, Pt = 1, zt = 1, Nt = 0);
38834
- const Kt = je - Gt + Ae, t0 = at - Lt + Ae, n0 = xt - Wt + Ae, o0 = je - Pt + 2 * Ae, i0 = at - zt + 2 * Ae, Yt = xt - Nt + 2 * Ae, qt = je - 1 + 3 * Ae, kt = at - 1 + 3 * Ae, r0 = xt - 1 + 3 * Ae, f0 = ve & 255, m0 = Pe & 255, w0 = Ne & 255, Q0 = this.perm[f0 + this.perm[m0 + this.perm[w0]]] % 12, v0 = this.perm[f0 + Gt + this.perm[m0 + Lt + this.perm[w0 + Wt]]] % 12, I0 = this.perm[f0 + Pt + this.perm[m0 + zt + this.perm[w0 + Nt]]] % 12, K0 = this.perm[f0 + 1 + this.perm[m0 + 1 + this.perm[w0 + 1]]] % 12;
38834
+ const Kt = je - Gt + Ae, t0 = at - Lt + Ae, n0 = xt - Wt + Ae, o0 = je - Pt + 2 * Ae, i0 = at - zt + 2 * Ae, Yt = xt - Nt + 2 * Ae, qt = je - 1 + 3 * Ae, kt = at - 1 + 3 * Ae, r0 = xt - 1 + 3 * Ae, f0 = ve & 255, m0 = Pe & 255, w0 = Ne & 255, $0 = this.perm[f0 + this.perm[m0 + this.perm[w0]]] % 12, v0 = this.perm[f0 + Gt + this.perm[m0 + Lt + this.perm[w0 + Wt]]] % 12, I0 = this.perm[f0 + Pt + this.perm[m0 + zt + this.perm[w0 + Nt]]] % 12, A0 = this.perm[f0 + 1 + this.perm[m0 + 1 + this.perm[w0 + 1]]] % 12;
38835
38835
  let O0 = 0.6 - je * je - at * at - xt * xt;
38836
- O0 < 0 ? v = 0 : (O0 *= O0, v = O0 * O0 * this._dot3(this.grad3[Q0], je, at, xt));
38836
+ O0 < 0 ? v = 0 : (O0 *= O0, v = O0 * O0 * this._dot3(this.grad3[$0], je, at, xt));
38837
38837
  let xi = 0.6 - Kt * Kt - t0 * t0 - n0 * n0;
38838
38838
  xi < 0 ? C = 0 : (xi *= xi, C = xi * xi * this._dot3(this.grad3[v0], Kt, t0, n0));
38839
38839
  let wi = 0.6 - o0 * o0 - i0 * i0 - Yt * Yt;
38840
38840
  wi < 0 ? _ = 0 : (wi *= wi, _ = wi * wi * this._dot3(this.grad3[I0], o0, i0, Yt));
38841
38841
  let Li = 0.6 - qt * qt - kt * kt - r0 * r0;
38842
- return Li < 0 ? w = 0 : (Li *= Li, w = Li * Li * this._dot3(this.grad3[K0], qt, kt, r0)), 32 * (v + C + _ + w);
38842
+ return Li < 0 ? w = 0 : (Li *= Li, w = Li * Li * this._dot3(this.grad3[A0], qt, kt, r0)), 32 * (v + C + _ + w);
38843
38843
  }
38844
38844
  /**
38845
38845
  * A 4D simplex noise method.
@@ -38853,17 +38853,17 @@ class SimplexNoise {
38853
38853
  noise4d(t, r, m, v) {
38854
38854
  const C = this.grad4, _ = this.simplex, w = this.perm, E = (Math.sqrt(5) - 1) / 4, O = (5 - Math.sqrt(5)) / 20;
38855
38855
  let ve, Pe, Ne, Ae, Fe;
38856
- const ct = (t + r + m + v) * E, Oe = Math.floor(t + ct), ke = Math.floor(r + ct), je = Math.floor(m + ct), at = Math.floor(v + ct), xt = (Oe + ke + je + at) * O, Gt = Oe - xt, Lt = ke - xt, Wt = je - xt, Pt = at - xt, zt = t - Gt, Nt = r - Lt, Kt = m - Wt, t0 = v - Pt, n0 = zt > Nt ? 32 : 0, o0 = zt > Kt ? 16 : 0, i0 = Nt > Kt ? 8 : 0, Yt = zt > t0 ? 4 : 0, qt = Nt > t0 ? 2 : 0, kt = Kt > t0 ? 1 : 0, r0 = n0 + o0 + i0 + Yt + qt + kt, f0 = _[r0][0] >= 3 ? 1 : 0, m0 = _[r0][1] >= 3 ? 1 : 0, w0 = _[r0][2] >= 3 ? 1 : 0, Q0 = _[r0][3] >= 3 ? 1 : 0, v0 = _[r0][0] >= 2 ? 1 : 0, I0 = _[r0][1] >= 2 ? 1 : 0, K0 = _[r0][2] >= 2 ? 1 : 0, O0 = _[r0][3] >= 2 ? 1 : 0, xi = _[r0][0] >= 1 ? 1 : 0, wi = _[r0][1] >= 1 ? 1 : 0, Li = _[r0][2] >= 1 ? 1 : 0, ki = _[r0][3] >= 1 ? 1 : 0, Ai = zt - f0 + O, B0 = Nt - m0 + O, l0 = Kt - w0 + O, Si = t0 - Q0 + O, j0 = zt - v0 + 2 * O, gi = Nt - I0 + 2 * O, k0 = Kt - K0 + 2 * O, P0 = t0 - O0 + 2 * O, C0 = zt - xi + 3 * O, E0 = Nt - wi + 3 * O, $0 = Kt - Li + 3 * O, a0 = t0 - ki + 3 * O, s0 = zt - 1 + 4 * O, S0 = Nt - 1 + 4 * O, R0 = Kt - 1 + 4 * O, A0 = t0 - 1 + 4 * O, V0 = Oe & 255, Ri = ke & 255, Ci = je & 255, _i = at & 255, Pi = w[V0 + w[Ri + w[Ci + w[_i]]]] % 32, U0 = w[V0 + f0 + w[Ri + m0 + w[Ci + w0 + w[_i + Q0]]]] % 32, Zi = w[V0 + v0 + w[Ri + I0 + w[Ci + K0 + w[_i + O0]]]] % 32, Hi = w[V0 + xi + w[Ri + wi + w[Ci + Li + w[_i + ki]]]] % 32, Ni = w[V0 + 1 + w[Ri + 1 + w[Ci + 1 + w[_i + 1]]]] % 32;
38856
+ const ct = (t + r + m + v) * E, Oe = Math.floor(t + ct), ke = Math.floor(r + ct), je = Math.floor(m + ct), at = Math.floor(v + ct), xt = (Oe + ke + je + at) * O, Gt = Oe - xt, Lt = ke - xt, Wt = je - xt, Pt = at - xt, zt = t - Gt, Nt = r - Lt, Kt = m - Wt, t0 = v - Pt, n0 = zt > Nt ? 32 : 0, o0 = zt > Kt ? 16 : 0, i0 = Nt > Kt ? 8 : 0, Yt = zt > t0 ? 4 : 0, qt = Nt > t0 ? 2 : 0, kt = Kt > t0 ? 1 : 0, r0 = n0 + o0 + i0 + Yt + qt + kt, f0 = _[r0][0] >= 3 ? 1 : 0, m0 = _[r0][1] >= 3 ? 1 : 0, w0 = _[r0][2] >= 3 ? 1 : 0, $0 = _[r0][3] >= 3 ? 1 : 0, v0 = _[r0][0] >= 2 ? 1 : 0, I0 = _[r0][1] >= 2 ? 1 : 0, A0 = _[r0][2] >= 2 ? 1 : 0, O0 = _[r0][3] >= 2 ? 1 : 0, xi = _[r0][0] >= 1 ? 1 : 0, wi = _[r0][1] >= 1 ? 1 : 0, Li = _[r0][2] >= 1 ? 1 : 0, ki = _[r0][3] >= 1 ? 1 : 0, Ki = zt - f0 + O, B0 = Nt - m0 + O, l0 = Kt - w0 + O, Si = t0 - $0 + O, j0 = zt - v0 + 2 * O, gi = Nt - I0 + 2 * O, k0 = Kt - A0 + 2 * O, P0 = t0 - O0 + 2 * O, C0 = zt - xi + 3 * O, E0 = Nt - wi + 3 * O, q0 = Kt - Li + 3 * O, a0 = t0 - ki + 3 * O, s0 = zt - 1 + 4 * O, S0 = Nt - 1 + 4 * O, R0 = Kt - 1 + 4 * O, K0 = t0 - 1 + 4 * O, V0 = Oe & 255, Ri = ke & 255, Ci = je & 255, _i = at & 255, Pi = w[V0 + w[Ri + w[Ci + w[_i]]]] % 32, U0 = w[V0 + f0 + w[Ri + m0 + w[Ci + w0 + w[_i + $0]]]] % 32, Zi = w[V0 + v0 + w[Ri + I0 + w[Ci + A0 + w[_i + O0]]]] % 32, Hi = w[V0 + xi + w[Ri + wi + w[Ci + Li + w[_i + ki]]]] % 32, Ni = w[V0 + 1 + w[Ri + 1 + w[Ci + 1 + w[_i + 1]]]] % 32;
38857
38857
  let Mi = 0.6 - zt * zt - Nt * Nt - Kt * Kt - t0 * t0;
38858
38858
  Mi < 0 ? ve = 0 : (Mi *= Mi, ve = Mi * Mi * this._dot4(C[Pi], zt, Nt, Kt, t0));
38859
- let Vi = 0.6 - Ai * Ai - B0 * B0 - l0 * l0 - Si * Si;
38860
- Vi < 0 ? Pe = 0 : (Vi *= Vi, Pe = Vi * Vi * this._dot4(C[U0], Ai, B0, l0, Si));
38859
+ let Vi = 0.6 - Ki * Ki - B0 * B0 - l0 * l0 - Si * Si;
38860
+ Vi < 0 ? Pe = 0 : (Vi *= Vi, Pe = Vi * Vi * this._dot4(C[U0], Ki, B0, l0, Si));
38861
38861
  let G0 = 0.6 - j0 * j0 - gi * gi - k0 * k0 - P0 * P0;
38862
38862
  G0 < 0 ? Ne = 0 : (G0 *= G0, Ne = G0 * G0 * this._dot4(C[Zi], j0, gi, k0, P0));
38863
- let N0 = 0.6 - C0 * C0 - E0 * E0 - $0 * $0 - a0 * a0;
38864
- N0 < 0 ? Ae = 0 : (N0 *= N0, Ae = N0 * N0 * this._dot4(C[Hi], C0, E0, $0, a0));
38865
- let yi = 0.6 - s0 * s0 - S0 * S0 - R0 * R0 - A0 * A0;
38866
- return yi < 0 ? Fe = 0 : (yi *= yi, Fe = yi * yi * this._dot4(C[Ni], s0, S0, R0, A0)), 27 * (ve + Pe + Ne + Ae + Fe);
38863
+ let N0 = 0.6 - C0 * C0 - E0 * E0 - q0 * q0 - a0 * a0;
38864
+ N0 < 0 ? Ae = 0 : (N0 *= N0, Ae = N0 * N0 * this._dot4(C[Hi], C0, E0, q0, a0));
38865
+ let yi = 0.6 - s0 * s0 - S0 * S0 - R0 * R0 - K0 * K0;
38866
+ return yi < 0 ? Fe = 0 : (yi *= yi, Fe = yi * yi * this._dot4(C[Ni], s0, S0, R0, K0)), 27 * (ve + Pe + Ne + Ae + Fe);
38867
38867
  }
38868
38868
  // private
38869
38869
  _dot(t, r, m) {
@@ -41908,7 +41908,7 @@ const obb = /* @__PURE__ */ new OrientedBox(), tempBox = /* @__PURE__ */ new Box
41908
41908
  };
41909
41909
  class MeshBVH {
41910
41910
  static serialize(t, r = {}) {
41911
- r = ui({
41911
+ r = Q0({
41912
41912
  cloneBuffers: !0
41913
41913
  }, r);
41914
41914
  const m = t.geometry, v = t._roots, C = t._indirectBuffer, _ = m.getIndex();
@@ -41924,11 +41924,11 @@ class MeshBVH {
41924
41924
  }, w;
41925
41925
  }
41926
41926
  static deserialize(t, r, m = {}) {
41927
- m = ui({
41927
+ m = Q0({
41928
41928
  setIndex: !0,
41929
41929
  indirect: !!t.indirectBuffer
41930
41930
  }, m);
41931
- const { index: v, roots: C, indirectBuffer: _ } = t, w = new MeshBVH(r, Bi(ui({}, m), { [SKIP_GENERATION]: !0 }));
41931
+ const { index: v, roots: C, indirectBuffer: _ } = t, w = new MeshBVH(r, Bi(Q0({}, m), { [SKIP_GENERATION]: !0 }));
41932
41932
  if (w._roots = C, w._indirectBuffer = _ || null, m.setIndex) {
41933
41933
  const E = r.getIndex();
41934
41934
  if (E === null) {
@@ -41946,7 +41946,7 @@ class MeshBVH {
41946
41946
  if (t.index && t.index.isInterleavedBufferAttribute)
41947
41947
  throw new Error("MeshBVH: InterleavedBufferAttribute is not supported for the index attribute.");
41948
41948
  } else throw new Error("MeshBVH: Only BufferGeometries are supported.");
41949
- if (r = Object.assign(Bi(ui({}, DEFAULT_OPTIONS), {
41949
+ if (r = Object.assign(Bi(Q0({}, DEFAULT_OPTIONS), {
41950
41950
  // undocumented options
41951
41951
  // Whether to skip generating the tree. Used for deserialization.
41952
41952
  [SKIP_GENERATION]: !1
@@ -42966,7 +42966,7 @@ class Evaluator {
42966
42966
  this.triangleSplitter = new TriangleSplitter(), this.attributeData = [], this.attributes = ["position", "uv", "normal"], this.useGroups = !0, this.consolidateGroups = !0, this.debug = new OperationDebugData();
42967
42967
  }
42968
42968
  getGroupRanges(t) {
42969
- return !this.useGroups || t.groups.length === 0 ? [{ start: 0, count: 1 / 0, materialIndex: 0 }] : t.groups.map((r) => ui({}, r));
42969
+ return !this.useGroups || t.groups.length === 0 ? [{ start: 0, count: 1 / 0, materialIndex: 0 }] : t.groups.map((r) => Q0({}, r));
42970
42970
  }
42971
42971
  evaluate(t, r, m, v = new Brush()) {
42972
42972
  let C = !0;
@@ -42988,7 +42988,7 @@ class Evaluator {
42988
42988
  }), Pe.init(), performOperation(t, r, m, _, w, { useGroups: O }), Pe.complete();
42989
42989
  const Ne = this.getGroupRanges(t.geometry), Ae = getMaterialList(Ne, t.material), Fe = this.getGroupRanges(r.geometry), ct = getMaterialList(Fe, r.material);
42990
42990
  Fe.forEach((ke) => ke.materialIndex += Ae.length);
42991
- let Oe = [...Ne, ...Fe].map((ke, je) => Bi(ui({}, ke), { index: je }));
42991
+ let Oe = [...Ne, ...Fe].map((ke, je) => Bi(Q0({}, ke), { index: je }));
42992
42992
  if (O) {
42993
42993
  const ke = [...Ae, ...ct];
42994
42994
  ve && (Oe = Oe.map((at) => {
@@ -44587,7 +44587,7 @@ class GLTFParser {
44587
44587
  v.associations.set(ve, {});
44588
44588
  else if (C.mesh !== void 0 && v.meshCache.refs[C.mesh] > 1) {
44589
44589
  const Pe = v.associations.get(ve);
44590
- v.associations.set(ve, ui({}, Pe));
44590
+ v.associations.set(ve, Q0({}, Pe));
44591
44591
  }
44592
44592
  return v.associations.get(ve).nodes = t, ve;
44593
44593
  }), this.nodeCache[t];
@@ -45177,9 +45177,9 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
45177
45177
  var _ = !r, w = _ || t.i != 2, E = t.i;
45178
45178
  _ && (r = new u8(v * 3));
45179
45179
  var O = function(ki) {
45180
- var Ai = r.length;
45181
- if (ki > Ai) {
45182
- var B0 = new u8(Math.max(Ai * 2, ki));
45180
+ var Ki = r.length;
45181
+ if (ki > Ki) {
45182
+ var B0 = new u8(Math.max(Ki * 2, ki));
45183
45183
  B0.set(r), r = B0;
45184
45184
  }
45185
45185
  }, ve = t.f || 0, Pe = t.p || 0, Ne = t.b || 0, Ae = t.l, Fe = t.d, ct = t.m, Oe = t.n, ke = v * 8;
@@ -45228,24 +45228,24 @@ var flrm = /* @__PURE__ */ hMap(flt, 9, 1), fdrm = /* @__PURE__ */ hMap(fdt, 5,
45228
45228
  }
45229
45229
  w && O(Ne + 131072);
45230
45230
  for (var f0 = (1 << ct) - 1, m0 = (1 << Oe) - 1, w0 = Pe; ; w0 = Pe) {
45231
- var Yt = Ae[bits16(g, Pe) & f0], Q0 = Yt >> 4;
45231
+ var Yt = Ae[bits16(g, Pe) & f0], $0 = Yt >> 4;
45232
45232
  if (Pe += Yt & 15, Pe > ke) {
45233
45233
  E && err(0);
45234
45234
  break;
45235
45235
  }
45236
- if (Yt || err(2), Q0 < 256)
45237
- r[Ne++] = Q0;
45238
- else if (Q0 == 256) {
45236
+ if (Yt || err(2), $0 < 256)
45237
+ r[Ne++] = $0;
45238
+ else if ($0 == 256) {
45239
45239
  w0 = Pe, Ae = null;
45240
45240
  break;
45241
45241
  } else {
45242
- var v0 = Q0 - 254;
45243
- if (Q0 > 264) {
45244
- var Kt = Q0 - 257, I0 = fleb[Kt];
45242
+ var v0 = $0 - 254;
45243
+ if ($0 > 264) {
45244
+ var Kt = $0 - 257, I0 = fleb[Kt];
45245
45245
  v0 = bits(g, Pe, (1 << I0) - 1) + fl[Kt], Pe += I0;
45246
45246
  }
45247
- var K0 = Fe[bits16(g, Pe) & m0], O0 = K0 >> 4;
45248
- K0 || err(3), Pe += K0 & 15;
45247
+ var A0 = Fe[bits16(g, Pe) & m0], O0 = A0 >> 4;
45248
+ A0 || err(3), Pe += A0 & 15;
45249
45249
  var r0 = fd[O0];
45250
45250
  if (O0 > 3) {
45251
45251
  var I0 = fdeb[O0];
@@ -45395,7 +45395,7 @@ class EXRLoader extends DataTextureLoader {
45395
45395
  Ut = Ut << 8 | Hi(b0, e0), c0 += 8, f0.c = Ut, f0.lc = c0;
45396
45396
  }
45397
45397
  const w0 = { c: 0, lc: 0 };
45398
- function Q0(Ut, c0, b0, e0, h0, d0, g0, u0, M0) {
45398
+ function $0(Ut, c0, b0, e0, h0, d0, g0, u0, M0) {
45399
45399
  if (Ut == c0) {
45400
45400
  e0 < 8 && (m0(b0, e0, h0, d0), b0 = f0.c, e0 = f0.lc), e0 -= 8;
45401
45401
  let T0 = b0 >> e0;
@@ -45417,14 +45417,14 @@ class EXRLoader extends DataTextureLoader {
45417
45417
  const c0 = v0(Ut);
45418
45418
  return c0 > 32767 ? c0 - 65536 : c0;
45419
45419
  }
45420
- const K0 = { a: 0, b: 0 };
45420
+ const A0 = { a: 0, b: 0 };
45421
45421
  function O0(Ut, c0) {
45422
45422
  const b0 = I0(Ut), h0 = I0(c0), d0 = b0 + (h0 & 1) + (h0 >> 1), g0 = d0, u0 = d0 - h0;
45423
- K0.a = g0, K0.b = u0;
45423
+ A0.a = g0, A0.b = u0;
45424
45424
  }
45425
45425
  function xi(Ut, c0) {
45426
45426
  const b0 = v0(Ut), e0 = v0(c0), h0 = b0 - (e0 >> 1) & 65535, d0 = e0 + h0 - 32768 & 65535;
45427
- K0.a = d0, K0.b = h0;
45427
+ A0.a = d0, A0.b = h0;
45428
45428
  }
45429
45429
  function wi(Ut, c0, b0, e0, h0, d0, g0) {
45430
45430
  const u0 = g0 < 16384, M0 = b0 > h0 ? h0 : b0;
@@ -45439,11 +45439,11 @@ class EXRLoader extends DataTextureLoader {
45439
45439
  const zi = F0 + e0 * (b0 - _0);
45440
45440
  for (; Di <= zi; Di += Xi) {
45441
45441
  const $i = Di + vi, nn = Di + J0, ji = nn + vi;
45442
- u0 ? (O0(Ut[Di + c0], Ut[nn + c0]), Wi = K0.a, Fi = K0.b, O0(Ut[$i + c0], Ut[ji + c0]), Yi = K0.a, Ii = K0.b, O0(Wi, Yi), Ut[Di + c0] = K0.a, Ut[$i + c0] = K0.b, O0(Fi, Ii), Ut[nn + c0] = K0.a, Ut[ji + c0] = K0.b) : (xi(Ut[Di + c0], Ut[nn + c0]), Wi = K0.a, Fi = K0.b, xi(Ut[$i + c0], Ut[ji + c0]), Yi = K0.a, Ii = K0.b, xi(Wi, Yi), Ut[Di + c0] = K0.a, Ut[$i + c0] = K0.b, xi(Fi, Ii), Ut[nn + c0] = K0.a, Ut[ji + c0] = K0.b);
45442
+ u0 ? (O0(Ut[Di + c0], Ut[nn + c0]), Wi = A0.a, Fi = A0.b, O0(Ut[$i + c0], Ut[ji + c0]), Yi = A0.a, Ii = A0.b, O0(Wi, Yi), Ut[Di + c0] = A0.a, Ut[$i + c0] = A0.b, O0(Fi, Ii), Ut[nn + c0] = A0.a, Ut[ji + c0] = A0.b) : (xi(Ut[Di + c0], Ut[nn + c0]), Wi = A0.a, Fi = A0.b, xi(Ut[$i + c0], Ut[ji + c0]), Yi = A0.a, Ii = A0.b, xi(Wi, Yi), Ut[Di + c0] = A0.a, Ut[$i + c0] = A0.b, xi(Fi, Ii), Ut[nn + c0] = A0.a, Ut[ji + c0] = A0.b);
45443
45443
  }
45444
45444
  if (b0 & T0) {
45445
45445
  const $i = Di + J0;
45446
- u0 ? O0(Ut[Di + c0], Ut[$i + c0]) : xi(Ut[Di + c0], Ut[$i + c0]), Wi = K0.a, Ut[$i + c0] = K0.b, Ut[Di + c0] = Wi;
45446
+ u0 ? O0(Ut[Di + c0], Ut[$i + c0]) : xi(Ut[Di + c0], Ut[$i + c0]), Wi = A0.a, Ut[$i + c0] = A0.b, Ut[Di + c0] = Wi;
45447
45447
  }
45448
45448
  }
45449
45449
  if (h0 & T0) {
@@ -45451,7 +45451,7 @@ class EXRLoader extends DataTextureLoader {
45451
45451
  const zi = F0 + e0 * (b0 - _0);
45452
45452
  for (; Di <= zi; Di += Xi) {
45453
45453
  const $i = Di + vi;
45454
- u0 ? O0(Ut[Di + c0], Ut[$i + c0]) : xi(Ut[Di + c0], Ut[$i + c0]), Wi = K0.a, Ut[$i + c0] = K0.b, Ut[Di + c0] = Wi;
45454
+ u0 ? O0(Ut[Di + c0], Ut[$i + c0]) : xi(Ut[Di + c0], Ut[$i + c0]), Wi = A0.a, Ut[$i + c0] = A0.b, Ut[Di + c0] = Wi;
45455
45455
  }
45456
45456
  }
45457
45457
  _0 = T0, T0 >>= 1;
@@ -45465,7 +45465,7 @@ class EXRLoader extends DataTextureLoader {
45465
45465
  for (m0(T0, _0, b0, e0), T0 = f0.c, _0 = f0.lc; _0 >= 14; ) {
45466
45466
  const bi = T0 >> _0 - 14 & 16383, vi = c0[bi];
45467
45467
  if (vi.len)
45468
- _0 -= vi.len, Q0(vi.lit, d0, T0, _0, b0, e0, u0, M0, F0), T0 = w0.c, _0 = w0.lc;
45468
+ _0 -= vi.len, $0(vi.lit, d0, T0, _0, b0, e0, u0, M0, F0), T0 = w0.c, _0 = w0.lc;
45469
45469
  else {
45470
45470
  if (!vi.p)
45471
45471
  throw new Error("hufDecode issues");
@@ -45475,7 +45475,7 @@ class EXRLoader extends DataTextureLoader {
45475
45475
  for (; _0 < Wi && e0.value < D0; )
45476
45476
  m0(T0, _0, b0, e0), T0 = f0.c, _0 = f0.lc;
45477
45477
  if (_0 >= Wi && kt(Ut[vi.p[Xi]]) == (T0 >> _0 - Wi & (1 << Wi) - 1)) {
45478
- _0 -= Wi, Q0(vi.p[Xi], d0, T0, _0, b0, e0, u0, M0, F0), T0 = w0.c, _0 = w0.lc;
45478
+ _0 -= Wi, $0(vi.p[Xi], d0, T0, _0, b0, e0, u0, M0, F0), T0 = w0.c, _0 = w0.lc;
45479
45479
  break;
45480
45480
  }
45481
45481
  }
@@ -45487,7 +45487,7 @@ class EXRLoader extends DataTextureLoader {
45487
45487
  for (T0 >>= J0, _0 -= J0; _0 > 0; ) {
45488
45488
  const bi = c0[T0 << 14 - _0 & 16383];
45489
45489
  if (bi.len)
45490
- _0 -= bi.len, Q0(bi.lit, d0, T0, _0, b0, e0, u0, M0, F0), T0 = w0.c, _0 = w0.lc;
45490
+ _0 -= bi.len, $0(bi.lit, d0, T0, _0, b0, e0, u0, M0, F0), T0 = w0.c, _0 = w0.lc;
45491
45491
  else
45492
45492
  throw new Error("hufDecode issues");
45493
45493
  }
@@ -45506,7 +45506,7 @@ class EXRLoader extends DataTextureLoader {
45506
45506
  throw new Error("Something wrong with hufUncompress");
45507
45507
  r0(F0, M0, T0, D0), Li(F0, D0, Ut, b0, _0, T0, d0, h0, g0);
45508
45508
  }
45509
- function Ai(Ut, c0, b0) {
45509
+ function Ki(Ut, c0, b0) {
45510
45510
  for (let e0 = 0; e0 < b0; ++e0)
45511
45511
  c0[e0] = Ut[c0[e0]];
45512
45512
  }
@@ -45619,9 +45619,9 @@ class EXRLoader extends DataTextureLoader {
45619
45619
  }
45620
45620
  function E0(Ut, c0, b0) {
45621
45621
  for (let e0 = 0; e0 < 64; ++e0)
45622
- c0[b0 + e0] = DataUtils.toHalfFloat($0(Ut[e0]));
45622
+ c0[b0 + e0] = DataUtils.toHalfFloat(q0(Ut[e0]));
45623
45623
  }
45624
- function $0(Ut) {
45624
+ function q0(Ut) {
45625
45625
  return Ut <= 1 ? Math.sign(Ut) * Math.pow(Math.abs(Ut), 2.2) : Math.sign(Ut) * Math.pow(zt, Math.abs(Ut) - 1);
45626
45626
  }
45627
45627
  function a0(Ut) {
@@ -45662,7 +45662,7 @@ class EXRLoader extends DataTextureLoader {
45662
45662
  _0
45663
45663
  );
45664
45664
  }
45665
- Ai(T0, e0, d0);
45665
+ Ki(T0, e0, d0);
45666
45666
  let D0 = 0;
45667
45667
  const J0 = new Uint8Array(e0.buffer.byteLength);
45668
45668
  for (let bi = 0; bi < Ut.lines; bi++)
@@ -45672,7 +45672,7 @@ class EXRLoader extends DataTextureLoader {
45672
45672
  }
45673
45673
  return new DataView(J0.buffer);
45674
45674
  }
45675
- function A0(Ut) {
45675
+ function K0(Ut) {
45676
45676
  const c0 = Ut.array.slice(Ut.offset.value, Ut.offset.value + Ut.size), b0 = unzlibSync(c0), e0 = Ut.inputChannels.length * Ut.lines * Ut.columns * Ut.totalBytes, h0 = new ArrayBuffer(e0), d0 = new DataView(h0);
45677
45677
  let g0 = 0, u0 = 0;
45678
45678
  const M0 = new Array(4);
@@ -45872,11 +45872,11 @@ class EXRLoader extends DataTextureLoader {
45872
45872
  }
45873
45873
  return b0.value += 1, d0;
45874
45874
  }
45875
- function q0(Ut, c0) {
45875
+ function ui(Ut, c0) {
45876
45876
  const b0 = Vi(Ut, c0), e0 = Vi(Ut, c0), h0 = Vi(Ut, c0), d0 = Vi(Ut, c0), g0 = Vi(Ut, c0), u0 = Vi(Ut, c0), M0 = Vi(Ut, c0), T0 = Vi(Ut, c0);
45877
45877
  return { redX: b0, redY: e0, greenX: h0, greenY: d0, blueX: g0, blueY: u0, whiteX: M0, whiteY: T0 };
45878
45878
  }
45879
- function Ki(Ut, c0) {
45879
+ function Ai(Ut, c0) {
45880
45880
  const b0 = [
45881
45881
  "NO_COMPRESSION",
45882
45882
  "RLE_COMPRESSION",
@@ -45940,9 +45940,9 @@ class EXRLoader extends DataTextureLoader {
45940
45940
  if (e0 === "chlist")
45941
45941
  return Ti(Ut, c0, b0, h0);
45942
45942
  if (e0 === "chromaticities")
45943
- return q0(Ut, b0);
45943
+ return ui(Ut, b0);
45944
45944
  if (e0 === "compression")
45945
- return Ki(Ut, b0);
45945
+ return Ai(Ut, b0);
45946
45946
  if (e0 === "box2i")
45947
45947
  return Oi(Ut, b0);
45948
45948
  if (e0 === "envmap")
@@ -46107,7 +46107,7 @@ class EXRLoader extends DataTextureLoader {
46107
46107
  d0.blockHeight = 32, d0.uncompress = R0;
46108
46108
  break;
46109
46109
  case "PXR24_COMPRESSION":
46110
- d0.blockHeight = 16, d0.uncompress = A0;
46110
+ d0.blockHeight = 16, d0.uncompress = K0;
46111
46111
  break;
46112
46112
  case "DWAA_COMPRESSION":
46113
46113
  d0.blockHeight = 32, d0.uncompress = V0;
@@ -46404,9 +46404,9 @@ if (typeof document != "undefined") {
46404
46404
  Oe < 0 ? Oe = 0 : Oe > 1 && (Oe = 1);
46405
46405
  var at = E(Oe, je);
46406
46406
  ke = ke > 1 ? 1 : ke;
46407
- var xt = E(ke, je), Gt, Lt = Ne.length, Wt = 1 - at, Pt = 1 - xt, zt = Wt * Wt * Wt, Nt = at * Wt * Wt * 3, Kt = at * at * Wt * 3, t0 = at * at * at, n0 = Wt * Wt * Pt, o0 = at * Wt * Pt + Wt * at * Pt + Wt * Wt * xt, i0 = at * at * Pt + Wt * at * xt + at * Wt * xt, Yt = at * at * xt, qt = Wt * Pt * Pt, kt = at * Pt * Pt + Wt * xt * Pt + Wt * Pt * xt, r0 = at * xt * Pt + Wt * xt * xt + at * Pt * xt, f0 = at * xt * xt, m0 = Pt * Pt * Pt, w0 = xt * Pt * Pt + Pt * xt * Pt + Pt * Pt * xt, Q0 = xt * xt * Pt + Pt * xt * xt + xt * Pt * xt, v0 = xt * xt * xt;
46407
+ var xt = E(ke, je), Gt, Lt = Ne.length, Wt = 1 - at, Pt = 1 - xt, zt = Wt * Wt * Wt, Nt = at * Wt * Wt * 3, Kt = at * at * Wt * 3, t0 = at * at * at, n0 = Wt * Wt * Pt, o0 = at * Wt * Pt + Wt * at * Pt + Wt * Wt * xt, i0 = at * at * Pt + Wt * at * xt + at * Wt * xt, Yt = at * at * xt, qt = Wt * Pt * Pt, kt = at * Pt * Pt + Wt * xt * Pt + Wt * Pt * xt, r0 = at * xt * Pt + Wt * xt * xt + at * Pt * xt, f0 = at * xt * xt, m0 = Pt * Pt * Pt, w0 = xt * Pt * Pt + Pt * xt * Pt + Pt * Pt * xt, $0 = xt * xt * Pt + Pt * xt * xt + xt * Pt * xt, v0 = xt * xt * xt;
46408
46408
  for (Gt = 0; Gt < Lt; Gt += 1)
46409
- ve[Gt * 4] = g.round((zt * Ne[Gt] + Nt * Fe[Gt] + Kt * ct[Gt] + t0 * Ae[Gt]) * 1e3) / 1e3, ve[Gt * 4 + 1] = g.round((n0 * Ne[Gt] + o0 * Fe[Gt] + i0 * ct[Gt] + Yt * Ae[Gt]) * 1e3) / 1e3, ve[Gt * 4 + 2] = g.round((qt * Ne[Gt] + kt * Fe[Gt] + r0 * ct[Gt] + f0 * Ae[Gt]) * 1e3) / 1e3, ve[Gt * 4 + 3] = g.round((m0 * Ne[Gt] + w0 * Fe[Gt] + Q0 * ct[Gt] + v0 * Ae[Gt]) * 1e3) / 1e3;
46409
+ ve[Gt * 4] = g.round((zt * Ne[Gt] + Nt * Fe[Gt] + Kt * ct[Gt] + t0 * Ae[Gt]) * 1e3) / 1e3, ve[Gt * 4 + 1] = g.round((n0 * Ne[Gt] + o0 * Fe[Gt] + i0 * ct[Gt] + Yt * Ae[Gt]) * 1e3) / 1e3, ve[Gt * 4 + 2] = g.round((qt * Ne[Gt] + kt * Fe[Gt] + r0 * ct[Gt] + f0 * Ae[Gt]) * 1e3) / 1e3, ve[Gt * 4 + 3] = g.round((m0 * Ne[Gt] + w0 * Fe[Gt] + $0 * ct[Gt] + v0 * Ae[Gt]) * 1e3) / 1e3;
46410
46410
  return ve;
46411
46411
  }
46412
46412
  return {
@@ -47410,7 +47410,7 @@ if (typeof document != "undefined") {
47410
47410
  m || (m = _(function(Ae) {
47411
47411
  function Fe() {
47412
47412
  function Oe(i0, Yt) {
47413
- var qt, kt, r0 = i0.length, f0, m0, w0, Q0;
47413
+ var qt, kt, r0 = i0.length, f0, m0, w0, $0;
47414
47414
  for (kt = 0; kt < r0; kt += 1)
47415
47415
  if (qt = i0[kt], "ks" in qt && !qt.completed) {
47416
47416
  if (qt.completed = !0, qt.tt && (i0[kt - 1].td = qt.tt), qt.hasMask) {
@@ -47419,7 +47419,7 @@ if (typeof document != "undefined") {
47419
47419
  if (v0[f0].pt.k.i)
47420
47420
  Gt(v0[f0].pt.k);
47421
47421
  else
47422
- for (Q0 = v0[f0].pt.k.length, w0 = 0; w0 < Q0; w0 += 1)
47422
+ for ($0 = v0[f0].pt.k.length, w0 = 0; w0 < $0; w0 += 1)
47423
47423
  v0[f0].pt.k[w0].s && Gt(v0[f0].pt.k[w0].s[0]), v0[f0].pt.k[w0].e && Gt(v0[f0].pt.k[w0].e[0]);
47424
47424
  }
47425
47425
  qt.ty === 0 ? (qt.layers = at(qt.refId, Yt), Oe(qt.layers, Yt)) : qt.ty === 4 ? xt(qt.shapes) : qt.ty === 5 && n0(qt);
@@ -47588,16 +47588,16 @@ if (typeof document != "undefined") {
47588
47588
  else kt[r0].ty === "gr" && Yt(kt[r0].it);
47589
47589
  }
47590
47590
  function qt(kt) {
47591
- var r0, f0, m0 = kt.length, w0, Q0, v0, I0;
47591
+ var r0, f0, m0 = kt.length, w0, $0, v0, I0;
47592
47592
  for (f0 = 0; f0 < m0; f0 += 1) {
47593
47593
  if (r0 = kt[f0], r0.hasMask) {
47594
- var K0 = r0.masksProperties;
47595
- for (Q0 = K0.length, w0 = 0; w0 < Q0; w0 += 1)
47596
- if (K0[w0].pt.k.i)
47597
- K0[w0].pt.k.c = K0[w0].cl;
47594
+ var A0 = r0.masksProperties;
47595
+ for ($0 = A0.length, w0 = 0; w0 < $0; w0 += 1)
47596
+ if (A0[w0].pt.k.i)
47597
+ A0[w0].pt.k.c = A0[w0].cl;
47598
47598
  else
47599
- for (I0 = K0[w0].pt.k.length, v0 = 0; v0 < I0; v0 += 1)
47600
- K0[w0].pt.k[v0].s && (K0[w0].pt.k[v0].s[0].c = K0[w0].cl), K0[w0].pt.k[v0].e && (K0[w0].pt.k[v0].e[0].c = K0[w0].cl);
47599
+ for (I0 = A0[w0].pt.k.length, v0 = 0; v0 < I0; v0 += 1)
47600
+ A0[w0].pt.k[v0].s && (A0[w0].pt.k[v0].s[0].c = A0[w0].cl), A0[w0].pt.k[v0].e && (A0[w0].pt.k[v0].e[0].c = A0[w0].cl);
47601
47601
  }
47602
47602
  r0.ty === 4 && Yt(r0.shapes);
47603
47603
  }
@@ -48255,8 +48255,8 @@ if (typeof document != "undefined") {
48255
48255
  kt || (kt = "svg");
48256
48256
  var w0 = document.getElementsByTagName("body")[0];
48257
48257
  w0.innerText = "";
48258
- var Q0 = createTag("div");
48259
- Q0.style.width = "100%", Q0.style.height = "100%", Q0.setAttribute("data-bm-type", kt), w0.appendChild(Q0), E(Q0, Yt);
48258
+ var $0 = createTag("div");
48259
+ $0.style.width = "100%", $0.style.height = "100%", $0.setAttribute("data-bm-type", kt), w0.appendChild($0), E($0, Yt);
48260
48260
  }
48261
48261
  }
48262
48262
  function zt() {
@@ -48432,15 +48432,15 @@ if (typeof document != "undefined") {
48432
48432
  at[Kt] = f0.points[m0].point[Kt];
48433
48433
  } else {
48434
48434
  Nt.__fnct ? Yt = Nt.__fnct : (Yt = BezierFactory.getBezierEasing(Pt.o.x, Pt.o.y, Pt.i.x, Pt.i.y, Pt.n).get, Nt.__fnct = Yt), n0 = Yt((Oe - kt) / (qt - kt));
48435
- var w0 = f0.segmentLength * n0, Q0, v0 = ke.lastFrame < Oe && ke._lastKeyframeIndex === Gt ? ke._lastAddedLength : 0;
48435
+ var w0 = f0.segmentLength * n0, $0, v0 = ke.lastFrame < Oe && ke._lastKeyframeIndex === Gt ? ke._lastAddedLength : 0;
48436
48436
  for (i0 = ke.lastFrame < Oe && ke._lastKeyframeIndex === Gt ? ke._lastPoint : 0, Wt = !0, o0 = f0.points.length; Wt; ) {
48437
48437
  if (v0 += f0.points[i0].partialLength, w0 === 0 || n0 === 0 || i0 === f0.points.length - 1) {
48438
48438
  for (t0 = f0.points[i0].point.length, Kt = 0; Kt < t0; Kt += 1)
48439
48439
  at[Kt] = f0.points[i0].point[Kt];
48440
48440
  break;
48441
48441
  } else if (w0 >= v0 && w0 < v0 + f0.points[i0 + 1].partialLength) {
48442
- for (Q0 = (w0 - v0) / f0.points[i0 + 1].partialLength, t0 = f0.points[i0].point.length, Kt = 0; Kt < t0; Kt += 1)
48443
- at[Kt] = f0.points[i0].point[Kt] + (f0.points[i0 + 1].point[Kt] - f0.points[i0].point[Kt]) * Q0;
48442
+ for ($0 = (w0 - v0) / f0.points[i0 + 1].partialLength, t0 = f0.points[i0].point.length, Kt = 0; Kt < t0; Kt += 1)
48443
+ at[Kt] = f0.points[i0].point[Kt] + (f0.points[i0 + 1].point[Kt] - f0.points[i0].point[Kt]) * $0;
48444
48444
  break;
48445
48445
  }
48446
48446
  i0 < o0 - 1 ? i0 += 1 : Wt = !1;
@@ -48448,19 +48448,19 @@ if (typeof document != "undefined") {
48448
48448
  ke._lastPoint = i0, ke._lastAddedLength = v0 - f0.points[i0].partialLength, ke._lastKeyframeIndex = Gt;
48449
48449
  }
48450
48450
  } else {
48451
- var I0, K0, O0, xi, wi;
48451
+ var I0, A0, O0, xi, wi;
48452
48452
  if (Lt = Pt.s.length, r0 = zt.s || Pt.e, this.sh && Pt.h !== 1)
48453
48453
  if (Oe >= qt)
48454
48454
  at[0] = r0[0], at[1] = r0[1], at[2] = r0[2];
48455
48455
  else if (Oe <= kt)
48456
48456
  at[0] = Pt.s[0], at[1] = Pt.s[1], at[2] = Pt.s[2];
48457
48457
  else {
48458
- var Li = C(Pt.s), ki = C(r0), Ai = (Oe - kt) / (qt - kt);
48459
- v(at, m(Li, ki, Ai));
48458
+ var Li = C(Pt.s), ki = C(r0), Ki = (Oe - kt) / (qt - kt);
48459
+ v(at, m(Li, ki, Ki));
48460
48460
  }
48461
48461
  else
48462
48462
  for (Gt = 0; Gt < Lt; Gt += 1)
48463
- Pt.h !== 1 && (Oe >= qt ? n0 = 1 : Oe < kt ? n0 = 0 : (Pt.o.x.constructor === Array ? (Nt.__fnct || (Nt.__fnct = []), Nt.__fnct[Gt] ? Yt = Nt.__fnct[Gt] : (I0 = Pt.o.x[Gt] === void 0 ? Pt.o.x[0] : Pt.o.x[Gt], K0 = Pt.o.y[Gt] === void 0 ? Pt.o.y[0] : Pt.o.y[Gt], O0 = Pt.i.x[Gt] === void 0 ? Pt.i.x[0] : Pt.i.x[Gt], xi = Pt.i.y[Gt] === void 0 ? Pt.i.y[0] : Pt.i.y[Gt], Yt = BezierFactory.getBezierEasing(I0, K0, O0, xi).get, Nt.__fnct[Gt] = Yt)) : Nt.__fnct ? Yt = Nt.__fnct : (I0 = Pt.o.x, K0 = Pt.o.y, O0 = Pt.i.x, xi = Pt.i.y, Yt = BezierFactory.getBezierEasing(I0, K0, O0, xi).get, Pt.keyframeMetadata = Yt), n0 = Yt((Oe - kt) / (qt - kt)))), r0 = zt.s || Pt.e, wi = Pt.h === 1 ? Pt.s[Gt] : Pt.s[Gt] + (r0[Gt] - Pt.s[Gt]) * n0, this.propType === "multidimensional" ? at[Gt] = wi : at = wi;
48463
+ Pt.h !== 1 && (Oe >= qt ? n0 = 1 : Oe < kt ? n0 = 0 : (Pt.o.x.constructor === Array ? (Nt.__fnct || (Nt.__fnct = []), Nt.__fnct[Gt] ? Yt = Nt.__fnct[Gt] : (I0 = Pt.o.x[Gt] === void 0 ? Pt.o.x[0] : Pt.o.x[Gt], A0 = Pt.o.y[Gt] === void 0 ? Pt.o.y[0] : Pt.o.y[Gt], O0 = Pt.i.x[Gt] === void 0 ? Pt.i.x[0] : Pt.i.x[Gt], xi = Pt.i.y[Gt] === void 0 ? Pt.i.y[0] : Pt.i.y[Gt], Yt = BezierFactory.getBezierEasing(I0, A0, O0, xi).get, Nt.__fnct[Gt] = Yt)) : Nt.__fnct ? Yt = Nt.__fnct : (I0 = Pt.o.x, A0 = Pt.o.y, O0 = Pt.i.x, xi = Pt.i.y, Yt = BezierFactory.getBezierEasing(I0, A0, O0, xi).get, Pt.keyframeMetadata = Yt), n0 = Yt((Oe - kt) / (qt - kt)))), r0 = zt.s || Pt.e, wi = Pt.h === 1 ? Pt.s[Gt] : Pt.s[Gt] + (r0[Gt] - Pt.s[Gt]) * n0, this.propType === "multidimensional" ? at[Gt] = wi : at = wi;
48464
48464
  }
48465
48465
  return ke.lastIndex = xt, at;
48466
48466
  }
@@ -48868,18 +48868,18 @@ if (typeof document != "undefined") {
48868
48868
  function Ne(qt, kt, r0) {
48869
48869
  return !r0 && r0 !== 0 && (r0 = 1), qt === 1 && kt === 1 && r0 === 1 ? this : this._t(qt, 0, 0, 0, 0, kt, 0, 0, 0, 0, r0, 0, 0, 0, 0, 1);
48870
48870
  }
48871
- function Ae(qt, kt, r0, f0, m0, w0, Q0, v0, I0, K0, O0, xi, wi, Li, ki, Ai) {
48872
- return this.props[0] = qt, this.props[1] = kt, this.props[2] = r0, this.props[3] = f0, this.props[4] = m0, this.props[5] = w0, this.props[6] = Q0, this.props[7] = v0, this.props[8] = I0, this.props[9] = K0, this.props[10] = O0, this.props[11] = xi, this.props[12] = wi, this.props[13] = Li, this.props[14] = ki, this.props[15] = Ai, this;
48871
+ function Ae(qt, kt, r0, f0, m0, w0, $0, v0, I0, A0, O0, xi, wi, Li, ki, Ki) {
48872
+ return this.props[0] = qt, this.props[1] = kt, this.props[2] = r0, this.props[3] = f0, this.props[4] = m0, this.props[5] = w0, this.props[6] = $0, this.props[7] = v0, this.props[8] = I0, this.props[9] = A0, this.props[10] = O0, this.props[11] = xi, this.props[12] = wi, this.props[13] = Li, this.props[14] = ki, this.props[15] = Ki, this;
48873
48873
  }
48874
48874
  function Fe(qt, kt, r0) {
48875
48875
  return r0 = r0 || 0, qt !== 0 || kt !== 0 || r0 !== 0 ? this._t(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, qt, kt, r0, 1) : this;
48876
48876
  }
48877
- function ct(qt, kt, r0, f0, m0, w0, Q0, v0, I0, K0, O0, xi, wi, Li, ki, Ai) {
48877
+ function ct(qt, kt, r0, f0, m0, w0, $0, v0, I0, A0, O0, xi, wi, Li, ki, Ki) {
48878
48878
  var B0 = this.props;
48879
- if (qt === 1 && kt === 0 && r0 === 0 && f0 === 0 && m0 === 0 && w0 === 1 && Q0 === 0 && v0 === 0 && I0 === 0 && K0 === 0 && O0 === 1 && xi === 0)
48880
- return B0[12] = B0[12] * qt + B0[15] * wi, B0[13] = B0[13] * w0 + B0[15] * Li, B0[14] = B0[14] * O0 + B0[15] * ki, B0[15] *= Ai, this._identityCalculated = !1, this;
48881
- var l0 = B0[0], Si = B0[1], j0 = B0[2], gi = B0[3], k0 = B0[4], P0 = B0[5], C0 = B0[6], E0 = B0[7], $0 = B0[8], a0 = B0[9], s0 = B0[10], S0 = B0[11], R0 = B0[12], A0 = B0[13], V0 = B0[14], Ri = B0[15];
48882
- return B0[0] = l0 * qt + Si * m0 + j0 * I0 + gi * wi, B0[1] = l0 * kt + Si * w0 + j0 * K0 + gi * Li, B0[2] = l0 * r0 + Si * Q0 + j0 * O0 + gi * ki, B0[3] = l0 * f0 + Si * v0 + j0 * xi + gi * Ai, B0[4] = k0 * qt + P0 * m0 + C0 * I0 + E0 * wi, B0[5] = k0 * kt + P0 * w0 + C0 * K0 + E0 * Li, B0[6] = k0 * r0 + P0 * Q0 + C0 * O0 + E0 * ki, B0[7] = k0 * f0 + P0 * v0 + C0 * xi + E0 * Ai, B0[8] = $0 * qt + a0 * m0 + s0 * I0 + S0 * wi, B0[9] = $0 * kt + a0 * w0 + s0 * K0 + S0 * Li, B0[10] = $0 * r0 + a0 * Q0 + s0 * O0 + S0 * ki, B0[11] = $0 * f0 + a0 * v0 + s0 * xi + S0 * Ai, B0[12] = R0 * qt + A0 * m0 + V0 * I0 + Ri * wi, B0[13] = R0 * kt + A0 * w0 + V0 * K0 + Ri * Li, B0[14] = R0 * r0 + A0 * Q0 + V0 * O0 + Ri * ki, B0[15] = R0 * f0 + A0 * v0 + V0 * xi + Ri * Ai, this._identityCalculated = !1, this;
48879
+ if (qt === 1 && kt === 0 && r0 === 0 && f0 === 0 && m0 === 0 && w0 === 1 && $0 === 0 && v0 === 0 && I0 === 0 && A0 === 0 && O0 === 1 && xi === 0)
48880
+ return B0[12] = B0[12] * qt + B0[15] * wi, B0[13] = B0[13] * w0 + B0[15] * Li, B0[14] = B0[14] * O0 + B0[15] * ki, B0[15] *= Ki, this._identityCalculated = !1, this;
48881
+ var l0 = B0[0], Si = B0[1], j0 = B0[2], gi = B0[3], k0 = B0[4], P0 = B0[5], C0 = B0[6], E0 = B0[7], q0 = B0[8], a0 = B0[9], s0 = B0[10], S0 = B0[11], R0 = B0[12], K0 = B0[13], V0 = B0[14], Ri = B0[15];
48882
+ return B0[0] = l0 * qt + Si * m0 + j0 * I0 + gi * wi, B0[1] = l0 * kt + Si * w0 + j0 * A0 + gi * Li, B0[2] = l0 * r0 + Si * $0 + j0 * O0 + gi * ki, B0[3] = l0 * f0 + Si * v0 + j0 * xi + gi * Ki, B0[4] = k0 * qt + P0 * m0 + C0 * I0 + E0 * wi, B0[5] = k0 * kt + P0 * w0 + C0 * A0 + E0 * Li, B0[6] = k0 * r0 + P0 * $0 + C0 * O0 + E0 * ki, B0[7] = k0 * f0 + P0 * v0 + C0 * xi + E0 * Ki, B0[8] = q0 * qt + a0 * m0 + s0 * I0 + S0 * wi, B0[9] = q0 * kt + a0 * w0 + s0 * A0 + S0 * Li, B0[10] = q0 * r0 + a0 * $0 + s0 * O0 + S0 * ki, B0[11] = q0 * f0 + a0 * v0 + s0 * xi + S0 * Ki, B0[12] = R0 * qt + K0 * m0 + V0 * I0 + Ri * wi, B0[13] = R0 * kt + K0 * w0 + V0 * A0 + Ri * Li, B0[14] = R0 * r0 + K0 * $0 + V0 * O0 + Ri * ki, B0[15] = R0 * f0 + K0 * v0 + V0 * xi + Ri * Ki, this._identityCalculated = !1, this;
48883
48883
  }
48884
48884
  function Oe() {
48885
48885
  return this._identityCalculated || (this._identity = !(this.props[0] !== 1 || this.props[1] !== 0 || this.props[2] !== 0 || this.props[3] !== 0 || this.props[4] !== 0 || this.props[5] !== 1 || this.props[6] !== 0 || this.props[7] !== 0 || this.props[8] !== 0 || this.props[9] !== 0 || this.props[10] !== 1 || this.props[11] !== 0 || this.props[12] !== 0 || this.props[13] !== 0 || this.props[14] !== 0 || this.props[15] !== 1), this._identityCalculated = !0), this._identity;
@@ -48920,8 +48920,8 @@ if (typeof document != "undefined") {
48920
48920
  return qt * this.props[2] + kt * this.props[6] + r0 * this.props[10] + this.props[14];
48921
48921
  }
48922
48922
  function Pt() {
48923
- var qt = this.props[0] * this.props[5] - this.props[1] * this.props[4], kt = this.props[5] / qt, r0 = -this.props[1] / qt, f0 = -this.props[4] / qt, m0 = this.props[0] / qt, w0 = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / qt, Q0 = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / qt, v0 = new Matrix();
48924
- return v0.props[0] = kt, v0.props[1] = r0, v0.props[4] = f0, v0.props[5] = m0, v0.props[12] = w0, v0.props[13] = Q0, v0;
48923
+ var qt = this.props[0] * this.props[5] - this.props[1] * this.props[4], kt = this.props[5] / qt, r0 = -this.props[1] / qt, f0 = -this.props[4] / qt, m0 = this.props[0] / qt, w0 = (this.props[4] * this.props[13] - this.props[5] * this.props[12]) / qt, $0 = -(this.props[0] * this.props[13] - this.props[1] * this.props[12]) / qt, v0 = new Matrix();
48924
+ return v0.props[0] = kt, v0.props[1] = r0, v0.props[4] = f0, v0.props[5] = m0, v0.props[12] = w0, v0.props[13] = $0, v0;
48925
48925
  }
48926
48926
  function zt(qt) {
48927
48927
  var kt = this.getInverseMatrix();
@@ -48938,8 +48938,8 @@ if (typeof document != "undefined") {
48938
48938
  if (this.isIdentity())
48939
48939
  f0[0] = qt[0], f0[1] = qt[1], f0[2] = kt[0], f0[3] = kt[1], f0[4] = r0[0], f0[5] = r0[1];
48940
48940
  else {
48941
- var m0 = this.props[0], w0 = this.props[1], Q0 = this.props[4], v0 = this.props[5], I0 = this.props[12], K0 = this.props[13];
48942
- f0[0] = qt[0] * m0 + qt[1] * Q0 + I0, f0[1] = qt[0] * w0 + qt[1] * v0 + K0, f0[2] = kt[0] * m0 + kt[1] * Q0 + I0, f0[3] = kt[0] * w0 + kt[1] * v0 + K0, f0[4] = r0[0] * m0 + r0[1] * Q0 + I0, f0[5] = r0[0] * w0 + r0[1] * v0 + K0;
48941
+ var m0 = this.props[0], w0 = this.props[1], $0 = this.props[4], v0 = this.props[5], I0 = this.props[12], A0 = this.props[13];
48942
+ f0[0] = qt[0] * m0 + qt[1] * $0 + I0, f0[1] = qt[0] * w0 + qt[1] * v0 + A0, f0[2] = kt[0] * m0 + kt[1] * $0 + I0, f0[3] = kt[0] * w0 + kt[1] * v0 + A0, f0[4] = r0[0] * m0 + r0[1] * $0 + I0, f0[5] = r0[0] * w0 + r0[1] * v0 + A0;
48943
48943
  }
48944
48944
  return f0;
48945
48945
  }
@@ -48967,8 +48967,8 @@ if (typeof document != "undefined") {
48967
48967
  return qt < 1e-6 && qt > 0 || qt > -1e-6 && qt < 0 ? m(qt * kt) / kt : qt;
48968
48968
  }
48969
48969
  function Yt() {
48970
- var qt = this.props, kt = i0(qt[0]), r0 = i0(qt[1]), f0 = i0(qt[4]), m0 = i0(qt[5]), w0 = i0(qt[12]), Q0 = i0(qt[13]);
48971
- return "matrix(" + kt + "," + r0 + "," + f0 + "," + m0 + "," + w0 + "," + Q0 + ")";
48970
+ var qt = this.props, kt = i0(qt[0]), r0 = i0(qt[1]), f0 = i0(qt[4]), m0 = i0(qt[5]), w0 = i0(qt[12]), $0 = i0(qt[13]);
48971
+ return "matrix(" + kt + "," + r0 + "," + f0 + "," + m0 + "," + w0 + "," + $0 + ")";
48972
48972
  }
48973
48973
  return function() {
48974
48974
  this.reset = v, this.rotate = C, this.rotateX = _, this.rotateY = w, this.rotateZ = E, this.skew = ve, this.skewFromAxis = Pe, this.shear = O, this.scale = Ne, this.setTransform = Ae, this.translate = Fe, this.transform = ct, this.applyToPoint = xt, this.applyToX = Gt, this.applyToY = Lt, this.applyToZ = Wt, this.applyToPointArray = t0, this.applyToTriplePoints = Kt, this.applyToPointStringified = n0, this.toCSS = o0, this.to2dCSS = Yt, this.clone = je, this.cloneFromProps = at, this.equals = ke, this.inversePoints = Nt, this.inversePoint = zt, this.getInverseMatrix = Pt, this._t = this.transform, this.isIdentity = Oe, this._identity = !0, this._identityCalculated = !1, this.props = createTypedArray("float32", 16), this.reset();
@@ -51142,10 +51142,10 @@ if (typeof document != "undefined") {
51142
51142
  for (qt = Yt[Oe], qt.a.sc && (g.strokeColorAnim = !0), qt.a.sw && (g.strokeWidthAnim = !0), (qt.a.fc || qt.a.fh || qt.a.fs || qt.a.fb) && (g.fillColorAnim = !0), f0 = 0, r0 = qt.s.b, v = 0; v < C; v += 1)
51143
51143
  kt = m[v], kt.anIndexes[Oe] = f0, (r0 == 1 && kt.val !== "" || r0 == 2 && kt.val !== "" && kt.val !== " " || r0 == 3 && (kt.n || kt.val == " " || v == C - 1) || r0 == 4 && (kt.n || v == C - 1)) && (qt.s.rn === 1 && m0.push(f0), f0 += 1);
51144
51144
  r.a[Oe].s.totalChars = f0;
51145
- var w0 = -1, Q0;
51145
+ var w0 = -1, $0;
51146
51146
  if (qt.s.rn === 1)
51147
51147
  for (v = 0; v < C; v += 1)
51148
- kt = m[v], w0 != kt.anIndexes[Oe] && (w0 = kt.anIndexes[Oe], Q0 = m0.splice(Math.floor(Math.random() * m0.length), 1)[0]), kt.anIndexes[Oe] = Q0;
51148
+ kt = m[v], w0 != kt.anIndexes[Oe] && (w0 = kt.anIndexes[Oe], $0 = m0.splice(Math.floor(Math.random() * m0.length), 1)[0]), kt.anIndexes[Oe] = $0;
51149
51149
  }
51150
51150
  g.yOffset = g.finalLineHeight || g.finalSize * 1.2, g.ls = g.ls || 0, g.ascent = je.ascent * g.finalSize / 100;
51151
51151
  }, TextProperty.prototype.updateDocumentData = function(g, t) {
@@ -51259,25 +51259,25 @@ if (typeof document != "undefined") {
51259
51259
  Pe = Ne.length, E = 0, O = 0;
51260
51260
  var o0 = g.finalSize * 1.2 * 0.714, i0 = !0, Yt, qt, kt, r0, f0;
51261
51261
  r0 = m.length;
51262
- var m0, w0 = -1, Q0, v0, I0, K0 = Fe, O0 = at, xi = je, wi = -1, Li, ki, Ai, B0, l0, Si, j0, gi, k0 = "", P0 = this.defaultPropsArray, C0;
51262
+ var m0, w0 = -1, $0, v0, I0, A0 = Fe, O0 = at, xi = je, wi = -1, Li, ki, Ki, B0, l0, Si, j0, gi, k0 = "", P0 = this.defaultPropsArray, C0;
51263
51263
  if (g.j === 2 || g.j === 1) {
51264
- var E0 = 0, $0 = 0, a0 = g.j === 2 ? -0.5 : -1, s0 = 0, S0 = !0;
51264
+ var E0 = 0, q0 = 0, a0 = g.j === 2 ? -0.5 : -1, s0 = 0, S0 = !0;
51265
51265
  for (ve = 0; ve < Pe; ve += 1)
51266
51266
  if (Ne[ve].n) {
51267
- for (E0 && (E0 += $0); s0 < ve; )
51267
+ for (E0 && (E0 += q0); s0 < ve; )
51268
51268
  Ne[s0].animatorJustifyOffset = E0, s0 += 1;
51269
51269
  E0 = 0, S0 = !0;
51270
51270
  } else {
51271
51271
  for (kt = 0; kt < r0; kt += 1)
51272
- Yt = m[kt].a, Yt.t.propType && (S0 && g.j === 2 && ($0 += Yt.t.v * a0), qt = m[kt].s, m0 = qt.getMult(Ne[ve].anIndexes[kt], v.a[kt].s.totalChars), m0.length ? E0 += Yt.t.v * m0[0] * a0 : E0 += Yt.t.v * m0 * a0);
51272
+ Yt = m[kt].a, Yt.t.propType && (S0 && g.j === 2 && (q0 += Yt.t.v * a0), qt = m[kt].s, m0 = qt.getMult(Ne[ve].anIndexes[kt], v.a[kt].s.totalChars), m0.length ? E0 += Yt.t.v * m0[0] * a0 : E0 += Yt.t.v * m0 * a0);
51273
51273
  S0 = !1;
51274
51274
  }
51275
- for (E0 && (E0 += $0); s0 < ve; )
51275
+ for (E0 && (E0 += q0); s0 < ve; )
51276
51276
  Ne[s0].animatorJustifyOffset = E0, s0 += 1;
51277
51277
  }
51278
51278
  for (ve = 0; ve < Pe; ve += 1) {
51279
51279
  if (C.reset(), Li = 1, Ne[ve].n)
51280
- E = 0, O += g.yOffset, O += i0 ? 1 : 0, Fe = K0, i0 = !1, this._hasMaskedPath && (at = O0, je = xi, Gt = Lt[at].points, xt = Gt[je - 1], ct = Gt[je], Wt = ct.partialLength, Oe = 0), k0 = "", gi = "", Si = "", C0 = "", P0 = this.defaultPropsArray;
51280
+ E = 0, O += g.yOffset, O += i0 ? 1 : 0, Fe = A0, i0 = !1, this._hasMaskedPath && (at = O0, je = xi, Gt = Lt[at].points, xt = Gt[je - 1], ct = Gt[je], Wt = ct.partialLength, Oe = 0), k0 = "", gi = "", Si = "", C0 = "", P0 = this.defaultPropsArray;
51281
51281
  else {
51282
51282
  if (this._hasMaskedPath) {
51283
51283
  if (wi !== Ne[ve].line) {
@@ -51297,17 +51297,17 @@ if (typeof document != "undefined") {
51297
51297
  Yt = m[kt].a, Yt.p.propType && (qt = m[kt].s, m0 = qt.getMult(Ne[ve].anIndexes[kt], v.a[kt].s.totalChars), m0.length ? R0 += Yt.p.v[0] * m0[0] : R0 += Yt.p.v[0] * m0), Yt.a.propType && (qt = m[kt].s, m0 = qt.getMult(Ne[ve].anIndexes[kt], v.a[kt].s.totalChars), m0.length ? R0 += Yt.a.v[0] * m0[0] : R0 += Yt.a.v[0] * m0);
51298
51298
  for (ke = !0, this._pathData.a.v && (Fe = Ne[0].an * 0.5 + (Pt - this._pathData.f.v - Ne[0].an * 0.5 - Ne[Ne.length - 1].an * 0.5) * w0 / (Pe - 1), Fe += this._pathData.f.v); ke; )
51299
51299
  Oe + Wt >= Fe + R0 || !Gt ? (zt = (Fe + R0 - Oe) / ct.partialLength, v0 = xt.point[0] + (ct.point[0] - xt.point[0]) * zt, I0 = xt.point[1] + (ct.point[1] - xt.point[1]) * zt, C.translate(-r[0] * Ne[ve].an * 5e-3, -(r[1] * o0) * 0.01), ke = !1) : Gt && (Oe += ct.partialLength, je += 1, je >= Gt.length && (je = 0, at += 1, Lt[at] ? Gt = Lt[at].points : Kt.v.c ? (je = 0, at = 0, Gt = Lt[at].points) : (Oe -= ct.partialLength, Gt = null)), Gt && (xt = ct, ct = Gt[je], Wt = ct.partialLength));
51300
- Q0 = Ne[ve].an / 2 - Ne[ve].add, C.translate(-Q0, 0, 0);
51300
+ $0 = Ne[ve].an / 2 - Ne[ve].add, C.translate(-$0, 0, 0);
51301
51301
  } else
51302
- Q0 = Ne[ve].an / 2 - Ne[ve].add, C.translate(-Q0, 0, 0), C.translate(-r[0] * Ne[ve].an * 5e-3, -r[1] * o0 * 0.01, 0);
51302
+ $0 = Ne[ve].an / 2 - Ne[ve].add, C.translate(-$0, 0, 0), C.translate(-r[0] * Ne[ve].an * 5e-3, -r[1] * o0 * 0.01, 0);
51303
51303
  for (kt = 0; kt < r0; kt += 1)
51304
51304
  Yt = m[kt].a, Yt.t.propType && (qt = m[kt].s, m0 = qt.getMult(Ne[ve].anIndexes[kt], v.a[kt].s.totalChars), (E !== 0 || g.j !== 0) && (this._hasMaskedPath ? m0.length ? Fe += Yt.t.v * m0[0] : Fe += Yt.t.v * m0 : m0.length ? E += Yt.t.v * m0[0] : E += Yt.t.v * m0));
51305
- for (g.strokeWidthAnim && (Ai = g.sw || 0), g.strokeColorAnim && (g.sc ? ki = [g.sc[0], g.sc[1], g.sc[2]] : ki = [0, 0, 0]), g.fillColorAnim && g.fc && (B0 = [g.fc[0], g.fc[1], g.fc[2]]), kt = 0; kt < r0; kt += 1)
51305
+ for (g.strokeWidthAnim && (Ki = g.sw || 0), g.strokeColorAnim && (g.sc ? ki = [g.sc[0], g.sc[1], g.sc[2]] : ki = [0, 0, 0]), g.fillColorAnim && g.fc && (B0 = [g.fc[0], g.fc[1], g.fc[2]]), kt = 0; kt < r0; kt += 1)
51306
51306
  Yt = m[kt].a, Yt.a.propType && (qt = m[kt].s, m0 = qt.getMult(Ne[ve].anIndexes[kt], v.a[kt].s.totalChars), m0.length ? C.translate(-Yt.a.v[0] * m0[0], -Yt.a.v[1] * m0[1], Yt.a.v[2] * m0[2]) : C.translate(-Yt.a.v[0] * m0, -Yt.a.v[1] * m0, Yt.a.v[2] * m0));
51307
51307
  for (kt = 0; kt < r0; kt += 1)
51308
51308
  Yt = m[kt].a, Yt.s.propType && (qt = m[kt].s, m0 = qt.getMult(Ne[ve].anIndexes[kt], v.a[kt].s.totalChars), m0.length ? C.scale(1 + (Yt.s.v[0] - 1) * m0[0], 1 + (Yt.s.v[1] - 1) * m0[1], 1) : C.scale(1 + (Yt.s.v[0] - 1) * m0, 1 + (Yt.s.v[1] - 1) * m0, 1));
51309
51309
  for (kt = 0; kt < r0; kt += 1) {
51310
- if (Yt = m[kt].a, qt = m[kt].s, m0 = qt.getMult(Ne[ve].anIndexes[kt], v.a[kt].s.totalChars), Yt.sk.propType && (m0.length ? C.skewFromAxis(-Yt.sk.v * m0[0], Yt.sa.v * m0[1]) : C.skewFromAxis(-Yt.sk.v * m0, Yt.sa.v * m0)), Yt.r.propType && (m0.length ? C.rotateZ(-Yt.r.v * m0[2]) : C.rotateZ(-Yt.r.v * m0)), Yt.ry.propType && (m0.length ? C.rotateY(Yt.ry.v * m0[1]) : C.rotateY(Yt.ry.v * m0)), Yt.rx.propType && (m0.length ? C.rotateX(Yt.rx.v * m0[0]) : C.rotateX(Yt.rx.v * m0)), Yt.o.propType && (m0.length ? Li += (Yt.o.v * m0[0] - Li) * m0[0] : Li += (Yt.o.v * m0 - Li) * m0), g.strokeWidthAnim && Yt.sw.propType && (m0.length ? Ai += Yt.sw.v * m0[0] : Ai += Yt.sw.v * m0), g.strokeColorAnim && Yt.sc.propType)
51310
+ if (Yt = m[kt].a, qt = m[kt].s, m0 = qt.getMult(Ne[ve].anIndexes[kt], v.a[kt].s.totalChars), Yt.sk.propType && (m0.length ? C.skewFromAxis(-Yt.sk.v * m0[0], Yt.sa.v * m0[1]) : C.skewFromAxis(-Yt.sk.v * m0, Yt.sa.v * m0)), Yt.r.propType && (m0.length ? C.rotateZ(-Yt.r.v * m0[2]) : C.rotateZ(-Yt.r.v * m0)), Yt.ry.propType && (m0.length ? C.rotateY(Yt.ry.v * m0[1]) : C.rotateY(Yt.ry.v * m0)), Yt.rx.propType && (m0.length ? C.rotateX(Yt.rx.v * m0[0]) : C.rotateX(Yt.rx.v * m0)), Yt.o.propType && (m0.length ? Li += (Yt.o.v * m0[0] - Li) * m0[0] : Li += (Yt.o.v * m0 - Li) * m0), g.strokeWidthAnim && Yt.sw.propType && (m0.length ? Ki += Yt.sw.v * m0[0] : Ki += Yt.sw.v * m0), g.strokeColorAnim && Yt.sc.propType)
51311
51311
  for (l0 = 0; l0 < 3; l0 += 1)
51312
51312
  m0.length ? ki[l0] += (Yt.sc.v[l0] - ki[l0]) * m0[0] : ki[l0] += (Yt.sc.v[l0] - ki[l0]) * m0;
51313
51313
  if (g.fillColorAnim && g.fc) {
@@ -51319,11 +51319,11 @@ if (typeof document != "undefined") {
51319
51319
  }
51320
51320
  for (kt = 0; kt < r0; kt += 1)
51321
51321
  Yt = m[kt].a, Yt.p.propType && (qt = m[kt].s, m0 = qt.getMult(Ne[ve].anIndexes[kt], v.a[kt].s.totalChars), this._hasMaskedPath ? m0.length ? C.translate(0, Yt.p.v[1] * m0[0], -Yt.p.v[2] * m0[1]) : C.translate(0, Yt.p.v[1] * m0, -Yt.p.v[2] * m0) : m0.length ? C.translate(Yt.p.v[0] * m0[0], Yt.p.v[1] * m0[1], -Yt.p.v[2] * m0[2]) : C.translate(Yt.p.v[0] * m0, Yt.p.v[1] * m0, -Yt.p.v[2] * m0));
51322
- if (g.strokeWidthAnim && (Si = Ai < 0 ? 0 : Ai), g.strokeColorAnim && (j0 = "rgb(" + Math.round(ki[0] * 255) + "," + Math.round(ki[1] * 255) + "," + Math.round(ki[2] * 255) + ")"), g.fillColorAnim && g.fc && (gi = "rgb(" + Math.round(B0[0] * 255) + "," + Math.round(B0[1] * 255) + "," + Math.round(B0[2] * 255) + ")"), this._hasMaskedPath) {
51322
+ if (g.strokeWidthAnim && (Si = Ki < 0 ? 0 : Ki), g.strokeColorAnim && (j0 = "rgb(" + Math.round(ki[0] * 255) + "," + Math.round(ki[1] * 255) + "," + Math.round(ki[2] * 255) + ")"), g.fillColorAnim && g.fc && (gi = "rgb(" + Math.round(B0[0] * 255) + "," + Math.round(B0[1] * 255) + "," + Math.round(B0[2] * 255) + ")"), this._hasMaskedPath) {
51323
51323
  if (C.translate(0, -g.ls), C.translate(0, r[1] * o0 * 0.01 + O, 0), this._pathData.p.v) {
51324
51324
  Nt = (ct.point[1] - xt.point[1]) / (ct.point[0] - xt.point[0]);
51325
- var A0 = Math.atan(Nt) * 180 / Math.PI;
51326
- ct.point[0] < xt.point[0] && (A0 += 180), C.rotate(-A0 * Math.PI / 180);
51325
+ var K0 = Math.atan(Nt) * 180 / Math.PI;
51326
+ ct.point[0] < xt.point[0] && (K0 += 180), C.rotate(-K0 * Math.PI / 180);
51327
51327
  }
51328
51328
  C.translate(v0, I0, 0), Fe -= r[0] * Ne[ve].an * 5e-3, Ne[ve + 1] && w0 !== Ne[ve + 1].ind && (Fe += Ne[ve].an / 2, Fe += g.tr * 1e-3 * g.finalSize);
51329
51329
  } else {
@@ -51335,7 +51335,7 @@ if (typeof document != "undefined") {
51335
51335
  C.translate(Ne[ve].animatorJustifyOffset + g.justifyOffset + (g.boxWidth - g.lineWidths[Ne[ve].line]) / 2, 0, 0);
51336
51336
  break;
51337
51337
  }
51338
- C.translate(0, -g.ls), C.translate(Q0, 0, 0), C.translate(r[0] * Ne[ve].an * 5e-3, r[1] * o0 * 0.01, 0), E += Ne[ve].l + g.tr * 1e-3 * g.finalSize;
51338
+ C.translate(0, -g.ls), C.translate($0, 0, 0), C.translate(r[0] * Ne[ve].an * 5e-3, r[1] * o0 * 0.01, 0), E += Ne[ve].l + g.tr * 1e-3 * g.finalSize;
51339
51339
  }
51340
51340
  _ === "html" ? k0 = C.toCSS() : _ === "svg" ? k0 = C.to2dCSS() : P0 = [C.props[0], C.props[1], C.props[2], C.props[3], C.props[4], C.props[5], C.props[6], C.props[7], C.props[8], C.props[9], C.props[10], C.props[11], C.props[12], C.props[13], C.props[14], C.props[15]], C0 = Li;
51341
51341
  }
@@ -56670,15 +56670,15 @@ class Z extends BufferGeometry {
56670
56670
  function kt(P0) {
56671
56671
  const C0 = 10000000000000001e-36;
56672
56672
  let E0 = P0[0];
56673
- for (let $0 = 1; $0 <= P0.length; $0++) {
56674
- const a0 = $0 % P0.length, s0 = P0[a0], S0 = s0.x - E0.x, R0 = s0.y - E0.y, A0 = S0 * S0 + R0 * R0, V0 = Math.max(
56673
+ for (let q0 = 1; q0 <= P0.length; q0++) {
56674
+ const a0 = q0 % P0.length, s0 = P0[a0], S0 = s0.x - E0.x, R0 = s0.y - E0.y, K0 = S0 * S0 + R0 * R0, V0 = Math.max(
56675
56675
  Math.abs(s0.x),
56676
56676
  Math.abs(s0.y),
56677
56677
  Math.abs(E0.x),
56678
56678
  Math.abs(E0.y)
56679
56679
  ), Ri = C0 * V0 * V0;
56680
- if (A0 <= Ri) {
56681
- P0.splice(a0, 1), $0--;
56680
+ if (K0 <= Ri) {
56681
+ P0.splice(a0, 1), q0--;
56682
56682
  continue;
56683
56683
  }
56684
56684
  E0 = s0;
@@ -56694,35 +56694,35 @@ class Z extends BufferGeometry {
56694
56694
  return C0 || console.error("THREE.ExtrudeGeometry: vec does not exist"), P0.clone().addScaledVector(C0, E0);
56695
56695
  }
56696
56696
  const w0 = Yt.length;
56697
- function Q0(P0, C0, E0) {
56698
- let $0, a0, s0;
56699
- const S0 = P0.x - C0.x, R0 = P0.y - C0.y, A0 = E0.x - P0.x, V0 = E0.y - P0.y, Ri = S0 * S0 + R0 * R0, Ci = S0 * V0 - R0 * A0;
56697
+ function $0(P0, C0, E0) {
56698
+ let q0, a0, s0;
56699
+ const S0 = P0.x - C0.x, R0 = P0.y - C0.y, K0 = E0.x - P0.x, V0 = E0.y - P0.y, Ri = S0 * S0 + R0 * R0, Ci = S0 * V0 - R0 * K0;
56700
56700
  if (Math.abs(Ci) > Number.EPSILON) {
56701
56701
  const _i = Math.sqrt(Ri), Pi = Math.sqrt(
56702
- A0 * A0 + V0 * V0
56703
- ), U0 = C0.x - R0 / _i, Zi = C0.y + S0 / _i, Hi = E0.x - V0 / Pi, Ni = E0.y + A0 / Pi, Mi = ((Hi - U0) * V0 - (Ni - Zi) * A0) / (S0 * V0 - R0 * A0);
56704
- $0 = U0 + S0 * Mi - P0.x, a0 = Zi + R0 * Mi - P0.y;
56705
- const Vi = $0 * $0 + a0 * a0;
56702
+ K0 * K0 + V0 * V0
56703
+ ), U0 = C0.x - R0 / _i, Zi = C0.y + S0 / _i, Hi = E0.x - V0 / Pi, Ni = E0.y + K0 / Pi, Mi = ((Hi - U0) * V0 - (Ni - Zi) * K0) / (S0 * V0 - R0 * K0);
56704
+ q0 = U0 + S0 * Mi - P0.x, a0 = Zi + R0 * Mi - P0.y;
56705
+ const Vi = q0 * q0 + a0 * a0;
56706
56706
  if (Vi <= 2)
56707
- return new Vector2($0, a0);
56707
+ return new Vector2(q0, a0);
56708
56708
  s0 = Math.sqrt(Vi / 2);
56709
56709
  } else {
56710
56710
  let _i = !1;
56711
- S0 > Number.EPSILON ? A0 > Number.EPSILON && (_i = !0) : S0 < -Number.EPSILON ? A0 < -Number.EPSILON && (_i = !0) : Math.sign(R0) === Math.sign(V0) && (_i = !0), _i ? ($0 = -R0, a0 = S0, s0 = Math.sqrt(Ri)) : ($0 = S0, a0 = R0, s0 = Math.sqrt(Ri / 2));
56711
+ S0 > Number.EPSILON ? K0 > Number.EPSILON && (_i = !0) : S0 < -Number.EPSILON ? K0 < -Number.EPSILON && (_i = !0) : Math.sign(R0) === Math.sign(V0) && (_i = !0), _i ? (q0 = -R0, a0 = S0, s0 = Math.sqrt(Ri)) : (q0 = S0, a0 = R0, s0 = Math.sqrt(Ri / 2));
56712
56712
  }
56713
- return new Vector2($0 / s0, a0 / s0);
56713
+ return new Vector2(q0 / s0, a0 / s0);
56714
56714
  }
56715
56715
  const v0 = [];
56716
- for (let P0 = 0, C0 = f0.length, E0 = C0 - 1, $0 = P0 + 1; P0 < C0; P0++, E0++, $0++)
56717
- E0 === C0 && (E0 = 0), $0 === C0 && ($0 = 0), v0[P0] = Q0(f0[P0], f0[E0], f0[$0]);
56716
+ for (let P0 = 0, C0 = f0.length, E0 = C0 - 1, q0 = P0 + 1; P0 < C0; P0++, E0++, q0++)
56717
+ E0 === C0 && (E0 = 0), q0 === C0 && (q0 = 0), v0[P0] = $0(f0[P0], f0[E0], f0[q0]);
56718
56718
  const I0 = [];
56719
- let K0, O0 = v0.concat();
56719
+ let A0, O0 = v0.concat();
56720
56720
  for (let P0 = 0, C0 = r0; P0 < C0; P0++) {
56721
56721
  const E0 = qt[P0];
56722
- K0 = [];
56723
- for (let $0 = 0, a0 = E0.length, s0 = a0 - 1, S0 = $0 + 1; $0 < a0; $0++, s0++, S0++)
56724
- s0 === a0 && (s0 = 0), S0 === a0 && (S0 = 0), K0[$0] = Q0(E0[$0], E0[s0], E0[S0]);
56725
- I0.push(K0), O0 = O0.concat(K0);
56722
+ A0 = [];
56723
+ for (let q0 = 0, a0 = E0.length, s0 = a0 - 1, S0 = q0 + 1; q0 < a0; q0++, s0++, S0++)
56724
+ s0 === a0 && (s0 = 0), S0 === a0 && (S0 = 0), A0[q0] = $0(E0[q0], E0[s0], E0[S0]);
56725
+ I0.push(A0), O0 = O0.concat(A0);
56726
56726
  }
56727
56727
  let xi;
56728
56728
  if (at === 0)
@@ -56730,20 +56730,20 @@ class Z extends BufferGeometry {
56730
56730
  else {
56731
56731
  const P0 = [], C0 = [];
56732
56732
  for (let E0 = 0; E0 < at; E0++) {
56733
- const $0 = E0 / at, a0 = Oe * Math.cos($0 * Math.PI / 2), s0 = ke * Math.sin($0 * Math.PI / 2) + je;
56733
+ const q0 = E0 / at, a0 = Oe * Math.cos(q0 * Math.PI / 2), s0 = ke * Math.sin(q0 * Math.PI / 2) + je;
56734
56734
  for (let S0 = 0, R0 = f0.length; S0 < R0; S0++) {
56735
- const A0 = m0(f0[S0], v0[S0], s0);
56736
- l0(A0.x, A0.y, -a0), $0 === 0 && P0.push(A0);
56735
+ const K0 = m0(f0[S0], v0[S0], s0);
56736
+ l0(K0.x, K0.y, -a0), q0 === 0 && P0.push(K0);
56737
56737
  }
56738
56738
  for (let S0 = 0, R0 = r0; S0 < R0; S0++) {
56739
- const A0 = qt[S0];
56740
- K0 = I0[S0];
56739
+ const K0 = qt[S0];
56740
+ A0 = I0[S0];
56741
56741
  const V0 = [];
56742
- for (let Ri = 0, Ci = A0.length; Ri < Ci; Ri++) {
56743
- const _i = m0(A0[Ri], K0[Ri], s0);
56744
- l0(_i.x, _i.y, -a0), $0 === 0 && V0.push(_i);
56742
+ for (let Ri = 0, Ci = K0.length; Ri < Ci; Ri++) {
56743
+ const _i = m0(K0[Ri], A0[Ri], s0);
56744
+ l0(_i.x, _i.y, -a0), q0 === 0 && V0.push(_i);
56745
56745
  }
56746
- $0 === 0 && C0.push(V0);
56746
+ q0 === 0 && C0.push(V0);
56747
56747
  }
56748
56748
  }
56749
56749
  xi = ShapeUtils.triangulateShape(
@@ -56762,16 +56762,16 @@ class Z extends BufferGeometry {
56762
56762
  Nt ? (n0.copy(Kt.normals[P0]).multiplyScalar(E0.x), t0.copy(Kt.binormals[P0]).multiplyScalar(E0.y), o0.copy(zt[P0]).add(n0).add(t0), l0(o0.x, o0.y, o0.z)) : l0(E0.x, E0.y, Fe / Ae * P0);
56763
56763
  }
56764
56764
  for (let P0 = at - 1; P0 >= 0; P0--) {
56765
- const C0 = P0 / at, E0 = Oe * Math.cos(C0 * Math.PI / 2), $0 = ke * Math.sin(C0 * Math.PI / 2) + je;
56765
+ const C0 = P0 / at, E0 = Oe * Math.cos(C0 * Math.PI / 2), q0 = ke * Math.sin(C0 * Math.PI / 2) + je;
56766
56766
  for (let a0 = 0, s0 = f0.length; a0 < s0; a0++) {
56767
- const S0 = m0(f0[a0], v0[a0], $0);
56767
+ const S0 = m0(f0[a0], v0[a0], q0);
56768
56768
  l0(S0.x, S0.y, Fe + E0);
56769
56769
  }
56770
56770
  for (let a0 = 0, s0 = qt.length; a0 < s0; a0++) {
56771
56771
  const S0 = qt[a0];
56772
- K0 = I0[a0];
56773
- for (let R0 = 0, A0 = S0.length; R0 < A0; R0++) {
56774
- const V0 = m0(S0[R0], K0[R0], $0);
56772
+ A0 = I0[a0];
56773
+ for (let R0 = 0, K0 = S0.length; R0 < K0; R0++) {
56774
+ const V0 = m0(S0[R0], A0[R0], q0);
56775
56775
  Nt ? l0(
56776
56776
  V0.x,
56777
56777
  V0.y + zt[Ae - 1].y,
@@ -56780,19 +56780,19 @@ class Z extends BufferGeometry {
56780
56780
  }
56781
56781
  }
56782
56782
  }
56783
- ki(), Pt && Ai();
56783
+ ki(), Pt && Ki();
56784
56784
  function ki() {
56785
56785
  const P0 = v.length / 3;
56786
56786
  if (ct) {
56787
56787
  let C0 = 0, E0 = w0 * C0;
56788
56788
  if (Wt)
56789
- for (let $0 = 0; $0 < wi; $0++) {
56790
- const a0 = xi[$0];
56789
+ for (let q0 = 0; q0 < wi; q0++) {
56790
+ const a0 = xi[q0];
56791
56791
  Si(a0[2] + E0, a0[1] + E0, a0[0] + E0);
56792
56792
  }
56793
56793
  if (C0 = Ae + at * 2, E0 = w0 * C0, Lt)
56794
- for (let $0 = 0; $0 < wi; $0++) {
56795
- const a0 = xi[$0];
56794
+ for (let q0 = 0; q0 < wi; q0++) {
56795
+ const a0 = xi[q0];
56796
56796
  Si(a0[0] + E0, a0[1] + E0, a0[2] + E0);
56797
56797
  }
56798
56798
  } else {
@@ -56813,11 +56813,11 @@ class Z extends BufferGeometry {
56813
56813
  }
56814
56814
  m.addGroup(P0, v.length / 3 - P0, 0);
56815
56815
  }
56816
- function Ai() {
56816
+ function Ki() {
56817
56817
  const P0 = v.length / 3;
56818
56818
  let C0 = 0;
56819
56819
  B0(f0, C0), C0 += f0.length;
56820
- for (let E0 = 0, $0 = qt.length; E0 < $0; E0++) {
56820
+ for (let E0 = 0, q0 = qt.length; E0 < q0; E0++) {
56821
56821
  const a0 = qt[E0];
56822
56822
  B0(a0, C0), C0 += a0.length;
56823
56823
  }
@@ -56826,11 +56826,11 @@ class Z extends BufferGeometry {
56826
56826
  function B0(P0, C0) {
56827
56827
  let E0 = P0.length;
56828
56828
  for (; --E0 >= 0; ) {
56829
- const $0 = E0;
56829
+ const q0 = E0;
56830
56830
  let a0 = E0 - 1;
56831
56831
  a0 < 0 && (a0 = P0.length - 1);
56832
56832
  for (let s0 = 0, S0 = Ae + at * 2; s0 < S0; s0++) {
56833
- const R0 = w0 * s0, A0 = w0 * (s0 + 1), V0 = C0 + $0 + R0, Ri = C0 + a0 + R0, Ci = C0 + a0 + A0, _i = C0 + $0 + A0;
56833
+ const R0 = w0 * s0, K0 = w0 * (s0 + 1), V0 = C0 + q0 + R0, Ri = C0 + a0 + R0, Ci = C0 + a0 + K0, _i = C0 + q0 + K0;
56834
56834
  j0(V0, Ri, Ci, _i);
56835
56835
  }
56836
56836
  }
@@ -56840,17 +56840,17 @@ class Z extends BufferGeometry {
56840
56840
  }
56841
56841
  function Si(P0, C0, E0) {
56842
56842
  gi(P0), gi(C0), gi(E0);
56843
- const $0 = v.length / 3, a0 = Gt.generateTopUV(
56843
+ const q0 = v.length / 3, a0 = Gt.generateTopUV(
56844
56844
  m,
56845
56845
  v,
56846
- $0 - 3,
56847
- $0 - 2,
56848
- $0 - 1
56846
+ q0 - 3,
56847
+ q0 - 2,
56848
+ q0 - 1
56849
56849
  );
56850
56850
  k0(a0[0]), k0(a0[1]), k0(a0[2]);
56851
56851
  }
56852
- function j0(P0, C0, E0, $0) {
56853
- gi(P0), gi(C0), gi($0), gi(C0), gi(E0), gi($0);
56852
+ function j0(P0, C0, E0, q0) {
56853
+ gi(P0), gi(C0), gi(q0), gi(C0), gi(E0), gi(q0);
56854
56854
  const a0 = v.length / 3, s0 = Gt.generateSideWallUV(
56855
56855
  m,
56856
56856
  v,
@@ -57559,7 +57559,7 @@ class Point extends ht {
57559
57559
  super();
57560
57560
  L0(this, "options");
57561
57561
  L0(this, "scaleValue", 1);
57562
- this.options = ui({
57562
+ this.options = Q0({
57563
57563
  sprite: !0
57564
57564
  }, r);
57565
57565
  }
@@ -57640,7 +57640,7 @@ class Arc extends ht {
57640
57640
  L0(this, "helperMesh");
57641
57641
  L0(this, "helperMeshPosition");
57642
57642
  L0(this, "pickTube", null);
57643
- this.options = ui({
57643
+ this.options = Q0({
57644
57644
  color: "#ffffff",
57645
57645
  lineWidth: 6,
57646
57646
  globe: !1,
@@ -57798,7 +57798,7 @@ class CrossPlane extends ht {
57798
57798
  constructor(r) {
57799
57799
  super();
57800
57800
  L0(this, "options");
57801
- this.options = ui({}, r);
57801
+ this.options = Q0({}, r);
57802
57802
  }
57803
57803
  create() {
57804
57804
  return H0(this, null, function* () {
@@ -57841,7 +57841,7 @@ class Model extends ht {
57841
57841
  constructor(r) {
57842
57842
  super();
57843
57843
  L0(this, "options");
57844
- this.options = ui({}, r);
57844
+ this.options = Q0({}, r);
57845
57845
  }
57846
57846
  create() {
57847
57847
  return H0(this, null, function* () {
@@ -58023,9 +58023,9 @@ const baseObjs = {
58023
58023
  Icosahedron,
58024
58024
  Lathe,
58025
58025
  Octahedron
58026
- }, prefabType = Object.keys(Bi(ui({}, expObjs), { Arc, Model })).map(
58026
+ }, prefabType = Object.keys(Bi(Q0({}, expObjs), { Arc, Model })).map(
58027
58027
  (g) => g
58028
- ), objs$3 = ui(ui({}, baseObjs), expObjs);
58028
+ ), objs$3 = Q0(Q0({}, baseObjs), expObjs);
58029
58029
  function promisifyRequest(g) {
58030
58030
  return new Promise((t, r) => {
58031
58031
  g.oncomplete = g.onsuccess = () => t(g.result), g.onabort = g.onerror = () => r(g.error);
@@ -58457,7 +58457,10 @@ class SetMaterial extends Command {
58457
58457
  }
58458
58458
  fixJSON() {
58459
58459
  const t = this.json;
58460
- t && t.oldMaterial && delete t.oldMaterial;
58460
+ if (t && t.oldMaterial && delete t.oldMaterial, this.oldMaterial) {
58461
+ const r = this.editor.pencil.mList.getKey(this.oldMaterial);
58462
+ r && r !== t.objectUuid && (console.warn("SetMaterial:fix:", t.objectUuid, r), t.objectUuid = r);
58463
+ }
58461
58464
  }
58462
58465
  }
58463
58466
  function parseMaterial(g) {
@@ -58842,7 +58845,7 @@ class AddObject extends Command {
58842
58845
  return H0(this, null, function* () {
58843
58846
  var m;
58844
58847
  const r = this.editor.viewport.vis;
58845
- this.obj = yield r.lead.draw(this.objectType, Bi(ui({}, this.objectOptions), {
58848
+ this.obj = yield r.lead.draw(this.objectType, Bi(Q0({}, this.objectOptions), {
58846
58849
  key: `${this.id}`
58847
58850
  })), this.obj.userData.updateKey !== !1 && r.lead.updateBaseObjectKey(this.obj, `$t:_${this.id}`), this.addObjectUuid = this.obj.key, this.editor.select(this.obj.key), (m = this.editor.viewport.vis) == null || m.initBaseObjectUserData(this.obj);
58848
58851
  });
@@ -59194,7 +59197,48 @@ const Commands = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
59194
59197
  SetTarget,
59195
59198
  SetValue,
59196
59199
  SetVector
59197
- }, Symbol.toStringTag, { value: "Module" }));
59200
+ }, Symbol.toStringTag, { value: "Module" })), encodings = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_";
59201
+ function encodeArrayBufferToUrlSafeBase64(g) {
59202
+ let t = "";
59203
+ const r = new Uint8Array(g), m = r.byteLength, v = m % 3, C = m - v;
59204
+ let _, w, E, O, ve;
59205
+ for (let Pe = 0; Pe < C; Pe = Pe + 3)
59206
+ ve = r[Pe] << 16 | r[Pe + 1] << 8 | r[Pe + 2], _ = (ve & 16515072) >> 18, w = (ve & 258048) >> 12, E = (ve & 4032) >> 6, O = ve & 63, t += encodings[_] + encodings[w] + encodings[E] + encodings[O];
59207
+ return v === 1 ? (ve = r[C], _ = (ve & 252) >> 2, w = (ve & 3) << 4, t += encodings[_] + encodings[w]) : v === 2 && (ve = r[C] << 8 | r[C + 1], _ = (ve & 64512) >> 10, w = (ve & 1008) >> 4, E = (ve & 15) << 2, t += encodings[_] + encodings[w] + encodings[E]), t;
59208
+ }
59209
+ function charCodeToNumber(g) {
59210
+ if (g >= 65 && g <= 90)
59211
+ return g - 65;
59212
+ if (g >= 97 && g <= 122)
59213
+ return g - 71;
59214
+ if (g >= 48 && g <= 57)
59215
+ return g + 4;
59216
+ if (g === 45)
59217
+ return 62;
59218
+ if (g === 95)
59219
+ return 63;
59220
+ throw new Error("Invalid char code in url safe base64: " + g);
59221
+ }
59222
+ function decodeUrlSafeBase64ToArrayBuffer(g) {
59223
+ const t = g.length % 4;
59224
+ let r = 0, m = 0, v = 0;
59225
+ if (t === 0)
59226
+ r = g.length / 4 * 3, m = g.length;
59227
+ else {
59228
+ if (t === 1)
59229
+ throw new Error("invalid url safe base64 encoded string: " + g);
59230
+ t === 2 ? (r = (g.length - 2) / 4 * 3, m = g.length - 2, v = 1) : (r = (g.length - 3) / 4 * 3, m = g.length - 3, v = 2);
59231
+ }
59232
+ let C;
59233
+ const _ = new Uint8Array(r + v);
59234
+ let w, E, O, ve;
59235
+ for (let Pe = 0, Ne = 0; Pe < m; Pe += 4, Ne += 3)
59236
+ w = charCodeToNumber(g.charCodeAt(Pe)), E = charCodeToNumber(g.charCodeAt(Pe + 1)), O = charCodeToNumber(g.charCodeAt(Pe + 2)), ve = charCodeToNumber(g.charCodeAt(Pe + 3)), C = (w << 18) + (E << 12) + (O << 6) + ve, _.set(
59237
+ [(C & 16711680) >> 16, (C & 65280) >> 8, C & 255],
59238
+ Ne
59239
+ );
59240
+ return t === 2 ? (w = charCodeToNumber(g.charCodeAt(m)), E = charCodeToNumber(g.charCodeAt(m + 1)), C = (w << 2) + (E >> 4), _.set([C & 255], r)) : t === 3 && (w = charCodeToNumber(g.charCodeAt(m)), E = charCodeToNumber(g.charCodeAt(m + 1)), O = charCodeToNumber(g.charCodeAt(m + 2)), C = (w << 10) + (E << 4) + (O >> 2), _.set([(C & 65280) >> 8, C & 255], r)), _.buffer;
59241
+ }
59198
59242
  class History {
59199
59243
  constructor(t) {
59200
59244
  L0(this, "editor");
@@ -59247,21 +59291,28 @@ class History {
59247
59291
  const _ = this.undos[C].json;
59248
59292
  if ((r = _.newMap) != null && r.images || (m = _.newMaterial) != null && m.images) {
59249
59293
  const w = (v = _.newMap) != null && v.images ? "newMap" : "newMaterial";
59250
- t.u.push(Bi(ui({}, _), {
59251
- [w]: Bi(ui({}, _[w]), {
59294
+ t.u.push(Bi(Q0({}, _), {
59295
+ [w]: Bi(Q0({}, _[w]), {
59252
59296
  images: _[w].images.map((E) => {
59297
+ var Pe;
59253
59298
  if (typeof E.url != "string")
59254
- return ui({}, E);
59255
- const O = t.i.findIndex((Pe) => Pe === E.url);
59299
+ if (((Pe = E.url) == null ? void 0 : Pe.type) === "Uint16Array") {
59300
+ const Ne = encodeArrayBufferToUrlSafeBase64(
59301
+ new Uint16Array(E.url.data).buffer
59302
+ );
59303
+ E._url = Q0({}, E.url), delete E._url.data, E.url = Ne;
59304
+ } else
59305
+ return Q0({}, E);
59306
+ const O = t.i.findIndex((Ne) => Ne === E.url);
59256
59307
  let ve = E.url;
59257
- return O === -1 ? (t.i.push(E.url), ve = `$rp-${t.i.length - 1}`) : ve = `$rp-${O}`, Bi(ui({}, E), {
59308
+ return O === -1 ? (t.i.push(E.url), ve = `$rp-${t.i.length - 1}`) : ve = `$rp-${O}`, Bi(Q0({}, E), {
59258
59309
  url: ve
59259
59310
  });
59260
59311
  })
59261
59312
  })
59262
59313
  }));
59263
59314
  } else
59264
- t.u.push(ui({}, _));
59315
+ t.u.push(Q0({}, _));
59265
59316
  }
59266
59317
  return t;
59267
59318
  }
@@ -59277,7 +59328,9 @@ class History {
59277
59328
  E[ve].images.forEach((Pe) => {
59278
59329
  if (typeof Pe.url == "string" && Pe.url.startsWith("$rp-")) {
59279
59330
  const Ne = parseInt(Pe.url.replace("$rp-", ""));
59280
- Pe.url = m[Ne], this.editor.playing || console.log("$rp-", Ne, E);
59331
+ Pe._url ? (Pe.url = Bi(Q0({}, Pe._url), {
59332
+ data: decodeUrlSafeBase64ToArrayBuffer(m[Ne])
59333
+ }), delete Pe._url) : Pe.url = m[Ne], this.editor.playing || console.log("$rp-", Ne, E);
59281
59334
  }
59282
59335
  });
59283
59336
  }
@@ -59341,7 +59394,7 @@ class Viewport {
59341
59394
  }
59342
59395
  setSaveCamera(t) {
59343
59396
  var r, m;
59344
- this.vis.setSaveCamera(t), (r = this.vis.pencil.controls) == null || r.saveState(), this.cameraState = ui({}, (m = this.vis) == null ? void 0 : m.cameraState), this.editor.emit("cameraStateChanged");
59397
+ this.vis.setSaveCamera(t), (r = this.vis.pencil.controls) == null || r.saveState(), this.cameraState = Q0({}, (m = this.vis) == null ? void 0 : m.cameraState), this.editor.emit("cameraStateChanged");
59345
59398
  }
59346
59399
  addVis(m) {
59347
59400
  return H0(this, arguments, function* (t, r = {}) {
@@ -59363,8 +59416,8 @@ class Viewport {
59363
59416
  }
59364
59417
  if (this.vis = this.options.visFactories, this.vis.visName !== t)
59365
59418
  throw new Error(`visName is not match, import {${t}}`);
59366
- let v = ui(ui({}, r), this.extendsOptions);
59367
- v = this.editor.hooks.events.beforeSetVisOptions.length ? this.editor.hooks.dispatch("beforeSetVisOptions", v) : v, this.vis.setOptions(v), this.vis.cameraState = ui({}, this.cameraState), this.delLoadObj && (this.vis.delLoadArr = this.delLoadObj), this.vis.playing = this.editor.playing, this.vis._baseObjectByUuid = this.editor.baseObjectByUuid.bind(this.editor), this.vis._objectByUuid = this.editor.objectByUuid.bind(this.editor), this.vis.on("loaderProgress", (_, w) => {
59419
+ let v = Q0(Q0({}, r), this.extendsOptions);
59420
+ v = this.editor.hooks.events.beforeSetVisOptions.length ? this.editor.hooks.dispatch("beforeSetVisOptions", v) : v, this.vis.setOptions(v), this.vis.cameraState = Q0({}, this.cameraState), this.delLoadObj && (this.vis.delLoadArr = this.delLoadObj), this.vis.playing = this.editor.playing, this.vis._baseObjectByUuid = this.editor.baseObjectByUuid.bind(this.editor), this.vis._objectByUuid = this.editor.objectByUuid.bind(this.editor), this.vis.on("loaderProgress", (_, w) => {
59368
59421
  this.editor.emit("progress", {
59369
59422
  type: "下载资源",
59370
59423
  value: _ / w * 100 | 0
@@ -59546,7 +59599,7 @@ function applyFixes(g, t) {
59546
59599
  if (t.h.u[0] && t.h.u[0].visType === "city" && (t.h.u[0].visOptions.jsonName || (t.h.u = [])), t.h.u[0] && t.h.u[0].visType === "map") {
59547
59600
  if (t.h.u[0].visOptions.geojson) {
59548
59601
  const { geojson: _, adcode: w, geojsonLite: E } = t.h.u[0].visOptions;
59549
- t.h.u[0].visOptions = Bi(ui({}, t.h.u[0].visOptions), {
59602
+ t.h.u[0].visOptions = Bi(Q0({}, t.h.u[0].visOptions), {
59550
59603
  geojsonMap: {
59551
59604
  [w]: _
59552
59605
  },
@@ -59557,7 +59610,7 @@ function applyFixes(g, t) {
59557
59610
  }
59558
59611
  if (t.h.u[0].visOptions.bbox) {
59559
59612
  const { bbox: _, bboxMap: w, adcode: E } = t.h.u[0].visOptions;
59560
- t.h.u[0].visOptions = Bi(ui({}, t.h.u[0].visOptions), {
59613
+ t.h.u[0].visOptions = Bi(Q0({}, t.h.u[0].visOptions), {
59561
59614
  bboxMap: w || {
59562
59615
  [E]: _
59563
59616
  }
@@ -59565,7 +59618,7 @@ function applyFixes(g, t) {
59565
59618
  }
59566
59619
  if (t.h.u[0].visOptions.worldBg) {
59567
59620
  const { worldBg: _ } = t.h.u[0].visOptions;
59568
- t.h.u[0].visOptions = Bi(ui({}, t.h.u[0].visOptions), {
59621
+ t.h.u[0].visOptions = Bi(Q0({}, t.h.u[0].visOptions), {
59569
59622
  parentBg: _
59570
59623
  }), delete t.h.u[0].visOptions.worldBg;
59571
59624
  }
@@ -59840,7 +59893,7 @@ class Config {
59840
59893
  this.editor = t;
59841
59894
  }
59842
59895
  setConfig(t, r) {
59843
- this.meta[t] = r, this.editor.emit("configChanged", ui({}, this.meta));
59896
+ this.meta[t] = r, this.editor.emit("configChanged", Q0({}, this.meta));
59844
59897
  }
59845
59898
  fromJSON(t) {
59846
59899
  Object.keys(t).forEach((r) => {
@@ -59861,20 +59914,20 @@ class Config {
59861
59914
  };
59862
59915
  }
59863
59916
  }
59864
- const jsonFetch = (g, t, r = !1) => {
59865
- const m = makePromiseCreator(!0), v = g.endsWith("gzip") || r;
59866
- return window.fetch(g).then((C) => {
59867
- let _ = C;
59868
- if (_.ok)
59869
- return v ? _.blob().then((w) => {
59870
- const E = new DecompressionStream("gzip"), O = w.stream().pipeThrough(E);
59871
- return new Response(O);
59872
- }) : _;
59917
+ const isGzip = (g) => !!(g.endsWith(".gzip") || g.endsWith(".gz")), jsonFetch = (g, t, r = isGzip) => {
59918
+ const m = makePromiseCreator(!0);
59919
+ return window.fetch(g).then((v) => {
59920
+ let C = v;
59921
+ if (C.ok)
59922
+ return r(g) && C.headers.get("content-encoding") !== "gzip" ? C.blob().then((_) => {
59923
+ const w = new DecompressionStream("gzip"), E = _.stream().pipeThrough(w);
59924
+ return new Response(E);
59925
+ }) : C;
59873
59926
  throw new Error("Network response was not ok.");
59874
- }).then((C) => C.json()).then((C) => {
59875
- m.resolve(C);
59876
- }).catch((C) => {
59877
- m.reject(C);
59927
+ }).then((v) => v.json()).then((v) => {
59928
+ m.resolve(v);
59929
+ }).catch((v) => {
59930
+ m.reject(v);
59878
59931
  }), m.promise;
59879
59932
  };
59880
59933
  class Editor {
@@ -59894,7 +59947,7 @@ class Editor {
59894
59947
  L0(this, "selectOption", []);
59895
59948
  L0(this, "mListOptions", []);
59896
59949
  L0(this, "_dispose", !1);
59897
- this.options = ui({
59950
+ this.options = Q0({
59898
59951
  assetsPrefix: "",
59899
59952
  processUndosMaxFrameTime: Number.MAX_VALUE
59900
59953
  }, t), this.events.setMaxListeners(9999999), this.viewport = new Viewport(this, {
@@ -60601,7 +60654,7 @@ class WebGL {
60601
60654
  const detect = () => {
60602
60655
  try {
60603
60656
  const g = new WebGL(), t = new Benchmarks(g.renderer);
60604
- return ui(ui({}, g.query()), t.query());
60657
+ return Q0(Q0({}, g.query()), t.query());
60605
60658
  } catch (g) {
60606
60659
  return console.error("vis-core: feature detection failed", g), {
60607
60660
  tier: 0
@@ -60679,7 +60732,7 @@ class Base extends Camera {
60679
60732
  L0(this, "sceneActive", -1);
60680
60733
  L0(this, "initSettingsObj");
60681
60734
  L0(this, "mouseButtonsActiveStore", null);
60682
- if (this.container = r.container, this.options = ui({
60735
+ if (this.container = r.container, this.options = Q0({
60683
60736
  assetsPrefix: "",
60684
60737
  editor: !0,
60685
60738
  logarithmicDepthBuffer: !0,
@@ -60714,7 +60767,7 @@ class Base extends Camera {
60714
60767
  "vis-core:detect",
60715
60768
  version,
60716
60769
  JSON.stringify(
60717
- Bi(ui({}, v), {
60770
+ Bi(Q0({}, v), {
60718
60771
  ldb: this.options.logarithmicDepthBuffer,
60719
60772
  tier0: this.tier0
60720
60773
  }),
@@ -60732,7 +60785,7 @@ class Base extends Camera {
60732
60785
  return this.pencil.installPlugins.get("worker");
60733
60786
  }
60734
60787
  setOptions(r) {
60735
- this.options = ui(ui({}, this.options), r);
60788
+ this.options = Q0(Q0({}, this.options), r);
60736
60789
  }
60737
60790
  get fromJSON() {
60738
60791
  return this.editor.fromJSON.bind(this.editor);
@@ -60767,7 +60820,7 @@ class Base extends Camera {
60767
60820
  return H0(this, null, function* () {
60768
60821
  var v, C, _, w, E, O, ve, Pe;
60769
60822
  if (this.pencil) return;
60770
- const r = ui({}, this.options.pencilConfig);
60823
+ const r = Q0({}, this.options.pencilConfig);
60771
60824
  if (this.options.css2DContainer && (r.css2DRendererParams = {
60772
60825
  container: this.options.css2DContainer
60773
60826
  }), this.options.pencil)
@@ -60786,7 +60839,7 @@ class Base extends Camera {
60786
60839
  this.pencil = this.options.pencil2, this.lead = this.pencil.lead.init(this.leadObjs), this.mList = this.pencil.mList, this.sceneActive = this.pencil.pageActiveIndex;
60787
60840
  return;
60788
60841
  } else {
60789
- const Ne = new ot(ui(Bi(ui({
60842
+ const Ne = new ot(Q0(Bi(Q0({
60790
60843
  container: this.container,
60791
60844
  stats: !this.playing && IS_DEV,
60792
60845
  helper: !this.playing,
@@ -60816,7 +60869,7 @@ class Base extends Camera {
60816
60869
  scene: {
60817
60870
  background: new Color$1(0)
60818
60871
  },
60819
- loader: ui({
60872
+ loader: Q0({
60820
60873
  prefix: this.options.assetsPrefix,
60821
60874
  simpleTexture4deleted: !0
60822
60875
  }, this.tier0 ? {
@@ -60898,7 +60951,7 @@ class Base extends Camera {
60898
60951
  );
60899
60952
  }
60900
60953
  initBaseObjectUserData(r) {
60901
- const m = Bi(ui({}, r.object3d.userData), {
60954
+ const m = Bi(Q0({}, r.object3d.userData), {
60902
60955
  bloom: !1
60903
60956
  });
60904
60957
  if (r.objectType === "BaseObject#Light")
@@ -60928,7 +60981,7 @@ class Base extends Camera {
60928
60981
  mouseWheel: this.pencil.controls.mouseButtons.wheel
60929
60982
  };
60930
60983
  this.settings = new Proxy(
60931
- Bi(ui(ui({}, this.initSettingsObj), r), {
60984
+ Bi(Q0(Q0({}, this.initSettingsObj), r), {
60932
60985
  mouseNone: !1,
60933
60986
  viewportPadding: [0, 0, 0, 0]
60934
60987
  }),
@@ -61065,7 +61118,7 @@ class Building extends ht {
61065
61118
  L0(this, "worldPositionZ", {
61066
61119
  value: 0
61067
61120
  });
61068
- this.options = ui({}, r);
61121
+ this.options = Q0({}, r);
61069
61122
  }
61070
61123
  create() {
61071
61124
  return H0(this, null, function* () {
@@ -61208,7 +61261,7 @@ class Road extends ht {
61208
61261
  L0(this, "outJson", /* @__PURE__ */ new Map());
61209
61262
  L0(this, "linePrimary", []);
61210
61263
  L0(this, "lineSecondary", []);
61211
- this.options = ui({}, r);
61264
+ this.options = Q0({}, r);
61212
61265
  }
61213
61266
  create() {
61214
61267
  return H0(this, null, function* () {
@@ -61232,8 +61285,8 @@ class Road extends ht {
61232
61285
  const Lt = [
61233
61286
  Oe.geometry.coordinates[0].filter((Wt) => booleanPointInPolygon$1(Wt, at))
61234
61287
  ];
61235
- return Lt[0].length && Ae[ke].push(Bi(ui({}, Oe), {
61236
- geometry: Bi(ui({}, Oe.geometry), {
61288
+ return Lt[0].length && Ae[ke].push(Bi(Q0({}, Oe), {
61289
+ geometry: Bi(Q0({}, Oe.geometry), {
61237
61290
  coordinates: Lt
61238
61291
  })
61239
61292
  })), !0;
@@ -61288,7 +61341,7 @@ class Area extends ht {
61288
61341
  L0(this, "options");
61289
61342
  L0(this, "area", []);
61290
61343
  L0(this, "outJson", /* @__PURE__ */ new Map());
61291
- this.options = ui({}, r);
61344
+ this.options = Q0({}, r);
61292
61345
  }
61293
61346
  create() {
61294
61347
  return H0(this, null, function* () {
@@ -61312,8 +61365,8 @@ class Area extends ht {
61312
61365
  const Gt = lineString(ct.geometry.coordinates[0]);
61313
61366
  if (booleanCrosses(je, Gt)) {
61314
61367
  const Wt = clipGeojson(je, ct);
61315
- Wt.features[0] && Ne[Oe].push(Bi(ui({}, ct), {
61316
- geometry: Bi(ui({}, ct.geometry), {
61368
+ Wt.features[0] && Ne[Oe].push(Bi(Q0({}, ct), {
61369
+ geometry: Bi(Q0({}, ct.geometry), {
61317
61370
  coordinates: Wt.features[0].geometry.coordinates
61318
61371
  })
61319
61372
  }));
@@ -61837,7 +61890,7 @@ class CityPlane extends ht {
61837
61890
  L0(this, "options");
61838
61891
  L0(this, "plane");
61839
61892
  L0(this, "water");
61840
- this.options = ui({
61893
+ this.options = Q0({
61841
61894
  color: "#0C4557",
61842
61895
  map: null
61843
61896
  }, r);
@@ -61987,7 +62040,7 @@ class Target extends ht {
61987
62040
  this.time.value += 0.01, this.offset.y -= 0.02;
61988
62041
  }
61989
62042
  }
61990
- const objs$2 = Bi(ui({}, objs$3), {
62043
+ const objs$2 = Bi(Q0({}, objs$3), {
61991
62044
  Building,
61992
62045
  Road,
61993
62046
  Area,
@@ -104044,12 +104097,12 @@ const objs$2 = Bi(ui({}, objs$3), {
104044
104097
  ], worldExclATALite = {
104045
104098
  type,
104046
104099
  features
104047
- }, chinaJson = json100000, chinaLiteJson = json100000Lite, chinaBbox = adcodeAll[1e5].b, worldJson = Bi(ui({}, world$1), {
104100
+ }, chinaJson = json100000, chinaLiteJson = json100000Lite, chinaBbox = adcodeAll[1e5].b, worldJson = Bi(Q0({}, world$1), {
104048
104101
  features: world$1.features.map((g) => {
104049
104102
  if (g.properties.name === "索马里兰" || g.properties.full_name.endsWith(")") || g.properties.full_name.includes("美属") || g.properties.full_name.includes("英属") || g.properties.full_name.includes("法属") || g.properties.full_name.includes("荷属") || g.properties.full_name.includes("本土外"))
104050
104103
  return null;
104051
104104
  if (g.properties.name === "索马里")
104052
- return Bi(ui({}, g), {
104105
+ return Bi(Q0({}, g), {
104053
104106
  geometry: {
104054
104107
  type: "Polygon",
104055
104108
  coordinates: [
@@ -104090,7 +104143,7 @@ const objs$2 = Bi(ui({}, objs$3), {
104090
104143
  }
104091
104144
  });
104092
104145
  if (g.properties.name === "西撒哈拉")
104093
- return Bi(ui({}, g), {
104146
+ return Bi(Q0({}, g), {
104094
104147
  geometry: {
104095
104148
  type: "Polygon",
104096
104149
  coordinates: [
@@ -104140,7 +104193,7 @@ const objs$2 = Bi(ui({}, objs$3), {
104140
104193
  }
104141
104194
  });
104142
104195
  if (g.properties.name === "摩洛哥")
104143
- return Bi(ui({}, g), {
104196
+ return Bi(Q0({}, g), {
104144
104197
  geometry: {
104145
104198
  type: "Polygon",
104146
104199
  coordinates: [
@@ -104218,8 +104271,8 @@ const objs$2 = Bi(ui({}, objs$3), {
104218
104271
  }
104219
104272
  });
104220
104273
  if (g.properties.name === "挪威")
104221
- return Bi(ui({}, g), {
104222
- geometry: Bi(ui({}, g.geometry), {
104274
+ return Bi(Q0({}, g), {
104275
+ geometry: Bi(Q0({}, g.geometry), {
104223
104276
  coordinates: g.geometry.coordinates.filter((t, r) => r !== 10)
104224
104277
  })
104225
104278
  });
@@ -104233,17 +104286,17 @@ const objs$2 = Bi(ui({}, objs$3), {
104233
104286
  //start 广西
104234
104287
  t[0][0][73]
104235
104288
  ]
104236
- ], Bi(ui({}, g), {
104237
- geometry: Bi(ui({}, g.geometry), {
104289
+ ], Bi(Q0({}, g), {
104290
+ geometry: Bi(Q0({}, g.geometry), {
104238
104291
  coordinates: r
104239
104292
  })
104240
104293
  });
104241
- } else return g.properties.iso_a2 === "RU" ? Bi(ui({}, g), {
104242
- geometry: Bi(ui({}, g.geometry), {
104294
+ } else return g.properties.iso_a2 === "RU" ? Bi(Q0({}, g), {
104295
+ geometry: Bi(Q0({}, g.geometry), {
104243
104296
  coordinates: g.geometry.coordinates.filter((t, r) => r !== 45)
104244
104297
  })
104245
- }) : g.properties.iso_a2 === "UA" ? Bi(ui({}, g), {
104246
- geometry: Bi(ui({}, g.geometry), {
104298
+ }) : g.properties.iso_a2 === "UA" ? Bi(Q0({}, g), {
104299
+ geometry: Bi(Q0({}, g.geometry), {
104247
104300
  coordinates: [
104248
104301
  [
104249
104302
  [22.131836, 48.405322],
@@ -104323,7 +104376,7 @@ const objs$2 = Bi(ui({}, objs$3), {
104323
104376
  })
104324
104377
  }) : g;
104325
104378
  }).filter((g) => g)
104326
- }), worldExclATAJson = Bi(ui({}, worldJson), {
104379
+ }), worldExclATAJson = Bi(Q0({}, worldJson), {
104327
104380
  features: worldJson.features.filter(
104328
104381
  (g) => g.properties.iso_a3 !== "ATA"
104329
104382
  )
@@ -140206,8 +140259,8 @@ const continentsBbox = continentsBboxObj, continentsM49 = {
140206
140259
  return g;
140207
140260
  const r = g.properties.iso_a2 === "FR", m = g.properties.iso_a2 === "RU", v = r ? 20 : 10;
140208
140261
  let C = g.geometry.type === "Polygon" ? [g.geometry.coordinates] : g.geometry.coordinates;
140209
- return C = C.filter((_, w) => _.length === 1 && _[0].length < v ? !1 : !(m && w === 0)), C.length ? Bi(ui({}, g), {
140210
- geometry: Bi(ui({}, g.geometry), {
140262
+ return C = C.filter((_, w) => _.length === 1 && _[0].length < v ? !1 : !(m && w === 0)), C.length ? Bi(Q0({}, g), {
140263
+ geometry: Bi(Q0({}, g.geometry), {
140211
140264
  coordinates: g.geometry.type === "Polygon" ? C[0] : C
140212
140265
  })
140213
140266
  }) : null;
@@ -140246,7 +140299,7 @@ class City$1 extends Base {
140246
140299
  L0(this, "multiplyScalar", 1);
140247
140300
  }
140248
140301
  setOptions(r) {
140249
- super.setOptions(ui({
140302
+ super.setOptions(Q0({
140250
140303
  fitTo: !0,
140251
140304
  plane: !0,
140252
140305
  grey: !1,
@@ -140692,7 +140745,7 @@ let PlaneMap$1 = class extends ht {
140692
140745
  L0(this, "mergeSideArea", null);
140693
140746
  L0(this, "extrudelineArr");
140694
140747
  L0(this, "splitPolygons", 0);
140695
- this.options = ui({
140748
+ this.options = Q0({
140696
140749
  areaGroup: !0,
140697
140750
  hasSide: !0,
140698
140751
  lineOffset: 0,
@@ -140723,7 +140776,7 @@ let PlaneMap$1 = class extends ht {
140723
140776
  target: this,
140724
140777
  key: zt
140725
140778
  });
140726
- return Nt.object3d.name = (Pt == null ? void 0 : Pt.adcode) === "100000_JD" ? "十段线" : Pt == null ? void 0 : Pt.name, Nt.userData = ui({}, Pt), Nt;
140779
+ return Nt.object3d.name = (Pt == null ? void 0 : Pt.adcode) === "100000_JD" ? "十段线" : Pt == null ? void 0 : Pt.name, Nt.userData = Q0({}, Pt), Nt;
140727
140780
  }))
140728
140781
  );
140729
140782
  this.groupArr = Lt;
@@ -140810,14 +140863,14 @@ let PlaneMap$1 = class extends ht {
140810
140863
  },
140811
140864
  Ae
140812
140865
  );
140813
- return Oe.object3d.name = "板块", m != null && m.castShadow && (Oe.object3d.castShadow = !0), Oe.userData = ui({}, Ne), Oe;
140866
+ return Oe.object3d.name = "板块", m != null && m.castShadow && (Oe.object3d.castShadow = !0), Oe.userData = Q0({}, Ne), Oe;
140814
140867
  }))
140815
140868
  );
140816
140869
  {
140817
140870
  const ve = yield E.geoGeometry("extrudePolygon", {
140818
140871
  mesaage: {
140819
140872
  coordinatesArr: w.map(({ coords: Ne }) => Ne).flat(),
140820
- projection: ui({}, this.options.projection),
140873
+ projection: Q0({}, this.options.projection),
140821
140874
  topSegments: this.options.topSegments,
140822
140875
  bbox: v,
140823
140876
  depth: [this.options.depth],
@@ -140865,7 +140918,7 @@ let PlaneMap$1 = class extends ht {
140865
140918
  },
140866
140919
  Ne
140867
140920
  );
140868
- return ct.userData = ui({}, Pe), ct.object3d.name = "线", ct;
140921
+ return ct.userData = Q0({}, Pe), ct.object3d.name = "线", ct;
140869
140922
  }))
140870
140923
  );
140871
140924
  {
@@ -141049,7 +141102,7 @@ class ContinentsBg extends ht {
141049
141102
  areaGroup: !1,
141050
141103
  // bbox: bboxworld,
141051
141104
  depth: r,
141052
- materialOptions: ui({}, C)
141105
+ materialOptions: Q0({}, C)
141053
141106
  },
141054
141107
  this
141055
141108
  );
@@ -141097,7 +141150,7 @@ class PlaneMap extends ht {
141097
141150
  super();
141098
141151
  L0(this, "options");
141099
141152
  L0(this, "extrudePolygon");
141100
- this.options = ui({
141153
+ this.options = Q0({
141101
141154
  depth: 2
141102
141155
  }, r);
141103
141156
  }
@@ -141116,7 +141169,7 @@ class PlaneMap extends ht {
141116
141169
  const { geojson: r, bbox: m } = this.options, v = this.geojson2Meta(r), C = this.pencil.getPlugin("worker"), _ = this.pencil.lead, E = yield this.pencil.loader.load("/1.png"), O = yield C.geoGeometry("extrudePolygon", {
141117
141170
  mesaage: {
141118
141171
  coordinatesArr: v.map(({ coords: je }) => je).flat(),
141119
- projection: ui({}, this.options.projection),
141172
+ projection: Q0({}, this.options.projection),
141120
141173
  topSegments: 100,
141121
141174
  bbox: m,
141122
141175
  depth: [this.options.depth],
@@ -141178,7 +141231,7 @@ class PlaneMap extends ht {
141178
141231
  this.extrudePolygon.dispose(), super.dispose();
141179
141232
  }
141180
141233
  }
141181
- const objs$1 = Bi(ui({}, objs$3), {
141234
+ const objs$1 = Bi(Q0({}, objs$3), {
141182
141235
  PlaneMap: PlaneMap$1,
141183
141236
  CityPlane,
141184
141237
  ContinentsBg,
@@ -141604,11 +141657,11 @@ const objs$1 = Bi(ui({}, objs$3), {
141604
141657
  }
141605
141658
  setOptions(r) {
141606
141659
  r.continentType;
141607
- const m = ui(ui({
141660
+ const m = Q0(Q0({
141608
141661
  0: worldExclATAJson,
141609
141662
  1e5: chinaJson
141610
141663
  }, continentsJson), r == null ? void 0 : r.geojsonMap);
141611
- let v = ui({
141664
+ let v = Q0({
141612
141665
  0: worldExclATALiteJson,
141613
141666
  1e5: chinaLiteJson
141614
141667
  }, continentsLiteJson);
@@ -141620,7 +141673,7 @@ const objs$1 = Bi(ui({}, objs$3), {
141620
141673
  features: [w]
141621
141674
  };
141622
141675
  });
141623
- }), v = ui(ui({}, v), r == null ? void 0 : r.extrudeLineGeojsonMap), super.setOptions(Bi(ui({
141676
+ }), v = Q0(Q0({}, v), r == null ? void 0 : r.extrudeLineGeojsonMap), super.setOptions(Bi(Q0({
141624
141677
  parentBg: !1,
141625
141678
  continents: "",
141626
141679
  continentsBg: !1,
@@ -141772,11 +141825,11 @@ const objs$1 = Bi(ui({}, objs$3), {
141772
141825
  if (_) {
141773
141826
  const Ae = this.mList.getMultiple("parentPlane"), Fe = findAdcodeInfo(this.options.adcode).parent, ct = findAdcodeInfo(Fe), Oe = ct.b, { res: ke } = yield this.getGeojson(Fe), je = yield this.lead.draw(
141774
141827
  "PlaneMap",
141775
- ui({
141828
+ Q0({
141776
141829
  key: "bg-100000",
141777
141830
  geojson: ke,
141778
141831
  bbox: Oe,
141779
- materialOptions: ui({}, Ae)
141832
+ materialOptions: Q0({}, Ae)
141780
141833
  }, C),
141781
141834
  this.group
141782
141835
  );
@@ -141788,15 +141841,15 @@ const objs$1 = Bi(ui({}, objs$3), {
141788
141841
  }
141789
141842
  const w = this.mList.getMultiple("worldPlane"), E = this.options.geojsonMap[0], O = findAdcodeInfo(0).b, ve = yield this.lead.draw(
141790
141843
  "PlaneMap",
141791
- ui({
141844
+ Q0({
141792
141845
  key: "bg-0",
141793
- geojson: Bi(ui({}, E), {
141846
+ geojson: Bi(Q0({}, E), {
141794
141847
  features: [
141795
141848
  ...E.features.filter((Ae) => _ ? Ae.properties.iso_a3 !== "CHN" : !0)
141796
141849
  ]
141797
141850
  }),
141798
141851
  bbox: O,
141799
- materialOptions: ui({}, w)
141852
+ materialOptions: Q0({}, w)
141800
141853
  }, C),
141801
141854
  this.group
141802
141855
  );
@@ -141936,32 +141989,20 @@ const objs$1 = Bi(ui({}, objs$3), {
141936
141989
  if (!this.map) return;
141937
141990
  const C = this.map.areaArr.find((_) => _.userData[r] === m);
141938
141991
  if (C) {
141939
- if (v === "origin") {
141940
- C.useMaterial("origin");
141941
- return;
141942
- }
141943
- const _ = JSON.stringify(v);
141944
- if (!C.materialList[_]) {
141945
- const w = C.object3d, E = w.material[0].clone();
141946
- v.color && E.color.set(v.color), v.emissive && (E.emissive.set(v.emissive), E.emissiveIntensity = v.emissiveIntensity || 1), C.setMaterialList(_, [E, w.material[1]]);
141947
- }
141948
- C.useMaterial(_);
141992
+ const _ = C.object3d;
141993
+ let w = this.mList.get(
141994
+ "plane#topMat"
141995
+ );
141996
+ v !== "origin" && (w = _.material[0].clone(), v.color && w.color.set(v.color), v.emissive && (w.emissive.set(v.emissive), w.emissiveIntensity = v.emissiveIntensity || 1)), _.material[0] = w;
141949
141997
  }
141950
141998
  }
141951
141999
  setLineMaterialByProperty(r, m, v) {
141952
142000
  if (!this.map) return;
141953
142001
  const C = this.map.lineArr.find((_) => _.userData[r] === m);
141954
142002
  if (C) {
141955
- if (v === "origin") {
141956
- C.useMaterial("origin");
141957
- return;
141958
- }
141959
- const _ = JSON.stringify(v);
141960
- if (!C.materialList[_]) {
141961
- const E = C.object3d.material.clone();
141962
- v.color && E.color.set(v.color), v.width && (E.lineWidth = v.width), C.setMaterialList(_, E);
141963
- }
141964
- C.useMaterial(_);
142003
+ const _ = C.object3d;
142004
+ let w = this.mList.get("plane#lineMat");
142005
+ v !== "origin" && (w = _.material.clone(), v.color && w.color.set(v.color), v.width && (w.lineWidth = v.width)), _.material = w;
141965
142006
  }
141966
142007
  }
141967
142008
  addAreaPlaneByProperty(r, m, v) {
@@ -141972,12 +142013,12 @@ const objs$1 = Bi(ui({}, objs$3), {
141972
142013
  );
141973
142014
  if (_) {
141974
142015
  let w = v.material, E = v.sideMaterial;
141975
- if (f$1(v.sideMaterial) && (E = new MeshBasicMaterial(ui({}, v.sideMaterial))), f$1(v.material) && (w = new MeshBasicMaterial(ui({}, v.material))), v.area) {
142016
+ if (f$1(v.sideMaterial) && (E = new MeshBasicMaterial(Q0({}, v.sideMaterial))), f$1(v.material) && (w = new MeshBasicMaterial(Q0({}, v.material))), v.area) {
141976
142017
  const Pe = this.objectByUuid(v.area);
141977
142018
  Pe && ([w, E] = Pe.material);
141978
142019
  }
141979
142020
  let O = v.lineMaterial;
141980
- if (f$1(v.lineMaterial) && (O = new Te$1(ui({}, v.lineMaterial))), v.line) {
142021
+ if (f$1(v.lineMaterial) && (O = new Te$1(Q0({}, v.lineMaterial))), v.line) {
141981
142022
  const Pe = this.objectByUuid(v.line);
141982
142023
  Pe && (O = Pe.material);
141983
142024
  }
@@ -142255,7 +142296,7 @@ const objs$1 = Bi(ui({}, objs$3), {
142255
142296
  if (!this.options.showDistrict && this.getAdcodeShowLevel(r) === "city" && (Oe = ke, ke = void 0), [Oe, ke].filter(Boolean).forEach((at) => {
142256
142297
  if (!at.features[0].properties.adcode && /^\d{6}$/.test(`${r}`)) {
142257
142298
  const xt = findAdcodeInfo(r);
142258
- at.features[0].properties = Bi(ui(ui({}, at.features[0].properties), xt), {
142299
+ at.features[0].properties = Bi(Q0(Q0({}, at.features[0].properties), xt), {
142259
142300
  center: [xt.lng, xt.lat]
142260
142301
  });
142261
142302
  }
@@ -142400,7 +142441,7 @@ const objs$1 = Bi(ui({}, objs$3), {
142400
142441
  let ve = this.mapHistory.length, Pe = null;
142401
142442
  for (; Pe === null; )
142402
142443
  Pe = O[ve], ve--;
142403
- const Ne = this.mList.getMultiple("bgPlane"), Ae = ui(ui({}, Pe), Ne ? {
142444
+ const Ne = this.mList.getMultiple("bgPlane"), Ae = Q0(Q0({}, Pe), Ne ? {
142404
142445
  bgTopMat: Ne.topMat,
142405
142446
  bgSideMat: Ne.sideMat,
142406
142447
  bgLineMat: Ne.lineMat,
@@ -142571,7 +142612,7 @@ class Earth extends Sphere {
142571
142612
  constructor(r) {
142572
142613
  super();
142573
142614
  L0(this, "options");
142574
- this.options = ui({
142615
+ this.options = Q0({
142575
142616
  radius: 30,
142576
142617
  rotationY: 0
142577
142618
  }, r);
@@ -142587,7 +142628,7 @@ class Countries extends ht {
142587
142628
  L0(this, "options");
142588
142629
  L0(this, "areaArr", []);
142589
142630
  L0(this, "lineArr", []);
142590
- this.options = ui({
142631
+ this.options = Q0({
142591
142632
  start: 30,
142592
142633
  depth: 1.4,
142593
142634
  lineOffset: 0.01,
@@ -142644,7 +142685,7 @@ class Countries extends ht {
142644
142685
  },
142645
142686
  this
142646
142687
  );
142647
- ke.object3d.name = (je = ct.properties) != null && je.name ? ((at = ct.properties) == null ? void 0 : at.name) + "-板块" : "板块", ke.userData = ui({}, ct.properties), this.areaArr.push(ke);
142688
+ ke.object3d.name = (je = ct.properties) != null && je.name ? ((at = ct.properties) == null ? void 0 : at.name) + "-板块" : "板块", ke.userData = Q0({}, ct.properties), this.areaArr.push(ke);
142648
142689
  })
142649
142690
  }),
142650
142691
  Fe && w.geoGeometry("conicLine", {
@@ -142664,7 +142705,7 @@ class Countries extends ht {
142664
142705
  },
142665
142706
  this
142666
142707
  );
142667
- ke.object3d.name = (je = ct.properties) != null && je.name ? ct.properties.name + "-线" : "线", ke.userData = ui({}, ct.properties), this.lineArr.push(ke);
142708
+ ke.object3d.name = (je = ct.properties) != null && je.name ? ct.properties.name + "-线" : "线", ke.userData = Q0({}, ct.properties), this.lineArr.push(ke);
142668
142709
  })
142669
142710
  })
142670
142711
  ].filter(Boolean)).flat()
@@ -142676,7 +142717,7 @@ class SphereShadow extends ht {
142676
142717
  constructor(r) {
142677
142718
  super();
142678
142719
  L0(this, "options");
142679
- this.options = ui({
142720
+ this.options = Q0({
142680
142721
  radius: 30
142681
142722
  }, r);
142682
142723
  }
@@ -142687,7 +142728,7 @@ class SphereShadow extends ht {
142687
142728
  });
142688
142729
  }
142689
142730
  }
142690
- const objs = Bi(ui({}, objs$3), {
142731
+ const objs = Bi(Q0({}, objs$3), {
142691
142732
  Earth,
142692
142733
  Countries,
142693
142734
  SphereShadow
@@ -142729,7 +142770,7 @@ const objs = Bi(ui({}, objs$3), {
142729
142770
  });
142730
142771
  };
142731
142772
  }, chinaPlate = (g) => {
142732
- g.extendsOptions = Bi(ui({}, g.extendsOptions), {
142773
+ g.extendsOptions = Bi(Q0({}, g.extendsOptions), {
142733
142774
  copyChinaPlane: g.options.copyChinaPlane
142734
142775
  }), g.loaderAdd = function() {
142735
142776
  const { loader: t } = this;
@@ -142935,7 +142976,7 @@ const objs = Bi(ui({}, objs$3), {
142935
142976
  return this.map.areaArr;
142936
142977
  }
142937
142978
  setOptions(r) {
142938
- super.setOptions(ui({
142979
+ super.setOptions(Q0({
142939
142980
  mapDepth: 1.4,
142940
142981
  radius: 30,
142941
142982
  style: "chinaPlate",
@@ -142987,32 +143028,20 @@ const objs = Bi(ui({}, objs$3), {
142987
143028
  if (!this.map) return;
142988
143029
  const C = this.map.areaArr.find((_) => _.userData[r] === m);
142989
143030
  if (C) {
142990
- if (v === "origin") {
142991
- C.useMaterial("origin");
142992
- return;
142993
- }
142994
- const _ = JSON.stringify(v);
142995
- if (!C.materialList[_]) {
142996
- const w = C.object3d, E = w.material[0].clone();
142997
- v.color && E.color.set(v.color), v.emissive && (E.emissive.set(v.emissive), E.emissiveIntensity = v.emissiveIntensity || 1), C.setMaterialList(_, [E, w.material[1]]);
142998
- }
142999
- C.useMaterial(_);
143031
+ const _ = C.object3d;
143032
+ let w = this.mList.get(
143033
+ "plane#topMat"
143034
+ );
143035
+ v !== "origin" && (w = _.material[0].clone(), v.color && w.color.set(v.color), v.emissive && (w.emissive.set(v.emissive), w.emissiveIntensity = v.emissiveIntensity || 1)), _.material[0] = w;
143000
143036
  }
143001
143037
  }
143002
143038
  setLineMaterialByProperty(r, m, v) {
143003
143039
  if (!this.map) return;
143004
143040
  const C = this.map.lineArr.find((_) => _.userData[r] === m);
143005
143041
  if (C) {
143006
- if (v === "origin") {
143007
- C.useMaterial("origin");
143008
- return;
143009
- }
143010
- const _ = JSON.stringify(v);
143011
- if (!C.materialList[_]) {
143012
- const E = C.object3d.material.clone();
143013
- v.color && E.color.set(v.color), v.width && (E.lineWidth = v.width), C.setMaterialList(_, E);
143014
- }
143015
- C.useMaterial(_);
143042
+ const _ = C.object3d;
143043
+ let w = this.mList.get("plane#outLine");
143044
+ v !== "origin" && (w = _.material.clone(), v.color && w.color.set(v.color), v.width && (w.lineWidth = v.width)), _.material = w;
143016
143045
  }
143017
143046
  }
143018
143047
  addAreaPlaneByProperty(r, m, v) {
@@ -143135,14 +143164,14 @@ const getMapConfig = (v, ...C) => H0(void 0, [v, ...C], function* (g, t = b, r,
143135
143164
  }), extendMapConfig = (v, ...C) => H0(void 0, [v, ...C], function* (g, t = b, r, m) {
143136
143165
  var Fe, ct;
143137
143166
  if (g.adcode === 0 && g.adcode === 1e5)
143138
- return ui({}, g);
143167
+ return Q0({}, g);
143139
143168
  const _ = g.adcode, w = findAdcodeInfo(_).level === "province", E = findAdcodeInfo(_).level === "city" || findAdcodeInfo(_).level === "district" && findAdcodeInfo(findAdcodeInfo(_).parent).level === "province", O = (Fe = g.fixGeojson) == null ? void 0 : Fe[_], ve = (ct = g.fixGeojson) == null ? void 0 : ct[_ + "-lite"];
143140
143169
  let { res: Pe } = yield jsonFetch(
143141
143170
  t + `/geojson/${O || "json"}/${_}.json`
143142
143171
  );
143143
143172
  const { res: Ne } = yield jsonFetch(
143144
143173
  t + `/geojson/${ve || "json-lite"}/${_}.json`
143145
- ), Ae = Bi(ui({}, g), {
143174
+ ), Ae = Bi(Q0({}, g), {
143146
143175
  geojsonMap: {
143147
143176
  [_]: Pe
143148
143177
  },