@tresjs/cientos 2.0.0-rc.3 → 2.0.0

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,16 +1,16 @@
1
1
  /**
2
2
  * name: @tresjs/cientos
3
- * version: v2.0.0-rc.3
3
+ * version: v2.0.0
4
4
  * (c) 2023
5
5
  * description: Collection of useful helpers and fully functional, ready-made abstractions for Tres
6
6
  * author: Alvaro Saburido <hola@alvarosaburido.dev> (https://github.com/alvarosabu/)
7
7
  */
8
- var eu = Object.defineProperty;
9
- var tu = (f, i, s) => i in f ? eu(f, i, { enumerable: !0, configurable: !0, writable: !0, value: s }) : f[i] = s;
10
- var Zr = (f, i, s) => (tu(f, typeof i != "symbol" ? i + "" : i, s), s);
11
- import { inject as ha, defineComponent as Pe, useSlots as nu, computed as pn, shallowRef as Oe, withAsyncContext as Ks, watchEffect as ss, unref as ke, openBlock as Ce, createElementBlock as Me, createCommentVNode as es, renderSlot as He, ref as Qe, shallowReactive as iu, getCurrentScope as su, onScopeDispose as ru, getCurrentInstance as Ta, onMounted as xo, nextTick as ou, toRef as au, readonly as lu, customRef as cu, watch as vi, createElementVNode as be, normalizeProps as uu, guardReactiveProps as pu, mergeProps as ze, Fragment as hu, renderList as du, resolveComponent as ka, createBlock as Aa, onUnmounted as Ma } from "vue";
12
- import { useTres as mu, useRenderLoop as rs, useLoader as Eo, useLogger as fu, useTexture as vu } from "@tresjs/core";
13
- import { TrianglesDrawMode as bu, TriangleFanDrawMode as co, TriangleStripDrawMode as Sa, Object3D as un, Raycaster as gu, Vector3 as $, Quaternion as Ae, Euler as Fn, Matrix4 as ye, Color as Be, MeshBasicMaterial as jn, DoubleSide as Co, LineBasicMaterial as Po, CylinderGeometry as yt, BoxGeometry as In, BufferGeometry as jt, Float32BufferAttribute as Ft, Mesh as Z, Line as ue, OctahedronGeometry as Dn, PlaneGeometry as Nn, TorusGeometry as Ns, SphereGeometry as _u, EventDispatcher as La, MOUSE as rn, TOUCH as on, PerspectiveCamera as an, Spherical as uo, Vector2 as ht, OrthographicCamera as Qi, Loader as $s, LoaderUtils as mi, FileLoader as fi, SpotLight as Ra, PointLight as po, DirectionalLight as Va, sRGBEncoding as zt, MeshPhysicalMaterial as zn, InstancedMesh as wu, TextureLoader as Ia, ImageBitmapLoader as yu, BufferAttribute as Zi, InterleavedBuffer as xu, InterleavedBufferAttribute as Eu, LinearFilter as Gs, LinearMipmapLinearFilter as Da, RepeatWrapping as ts, PointsMaterial as Cu, Material as Wr, MeshStandardMaterial as To, PropertyBinding as ns, SkinnedMesh as Oa, LineSegments as Pu, LineLoop as Tu, Points as ku, Group as Wi, MathUtils as mt, Skeleton as Na, InterpolateLinear as Ba, AnimationClip as Fa, Bone as ho, NearestFilter as Au, NearestMipmapNearestFilter as Mu, LinearMipmapNearestFilter as Su, NearestMipmapLinearFilter as Lu, ClampToEdgeWrapping as mo, MirroredRepeatWrapping as Ru, InterpolateDiscrete as Vu, FrontSide as Iu, Texture as Hs, VectorKeyframeTrack as ja, QuaternionKeyframeTrack as fo, NumberKeyframeTrack as za, Box3 as Du, Sphere as Ou, Interpolant as Nu, ExtrudeGeometry as Bu, Vector4 as Xs, Curve as Fu, MeshPhongMaterial as Jr, MeshLambertMaterial as ju, EquirectangularReflectionMapping as Ua, AmbientLight as zu, Uint16BufferAttribute as Uu, Matrix3 as Gu, ShapePath as Hu, DataTextureLoader as Ku, HalfFloatType as Bs, FloatType as eo, DataUtils as Fs, LinearEncoding as Ga, AnimationMixer as $u, CubeReflectionMapping as Xu, SRGBColorSpace as Yu, CubeTextureLoader as qu, QuadraticBezierCurve3 as Qu } from "three";
8
+ var Jc = Object.defineProperty;
9
+ var eu = (f, i, s) => i in f ? Jc(f, i, { enumerable: !0, configurable: !0, writable: !0, value: s }) : f[i] = s;
10
+ var Zr = (f, i, s) => (eu(f, typeof i != "symbol" ? i + "" : i, s), s);
11
+ import { inject as ha, defineComponent as Pe, useSlots as tu, computed as pn, shallowRef as Oe, withAsyncContext as Ks, watchEffect as ss, unref as ke, openBlock as Ce, createElementBlock as Me, createCommentVNode as es, renderSlot as He, ref as Qe, shallowReactive as nu, getCurrentScope as iu, onScopeDispose as su, getCurrentInstance as Ta, onMounted as xo, nextTick as ru, toRef as ou, readonly as au, customRef as lu, watch as vi, createElementVNode as be, normalizeProps as cu, guardReactiveProps as uu, mergeProps as ze, Fragment as pu, renderList as hu, resolveComponent as ka, createBlock as Aa, onUnmounted as Ma } from "vue";
12
+ import { useTres as du, useRenderLoop as rs, useLoader as Eo, useLogger as mu, useTexture as fu } from "@tresjs/core";
13
+ import { TrianglesDrawMode as vu, TriangleFanDrawMode as co, TriangleStripDrawMode as Sa, Object3D as un, Raycaster as bu, Vector3 as $, Quaternion as Ae, Euler as Fn, Matrix4 as ye, Color as Be, MeshBasicMaterial as jn, DoubleSide as Co, LineBasicMaterial as Po, CylinderGeometry as yt, BoxGeometry as In, BufferGeometry as jt, Float32BufferAttribute as Ft, Mesh as Z, Line as ue, OctahedronGeometry as Dn, PlaneGeometry as Nn, TorusGeometry as Ns, SphereGeometry as gu, EventDispatcher as La, MOUSE as rn, TOUCH as on, PerspectiveCamera as an, Spherical as uo, Vector2 as ht, OrthographicCamera as Qi, Loader as $s, LoaderUtils as mi, FileLoader as fi, SpotLight as Ra, PointLight as po, DirectionalLight as Va, sRGBEncoding as zt, MeshPhysicalMaterial as zn, InstancedMesh as _u, TextureLoader as Ia, ImageBitmapLoader as wu, BufferAttribute as Zi, InterleavedBuffer as yu, InterleavedBufferAttribute as xu, LinearFilter as Gs, LinearMipmapLinearFilter as Da, RepeatWrapping as ts, PointsMaterial as Eu, Material as Wr, MeshStandardMaterial as To, PropertyBinding as ns, SkinnedMesh as Oa, LineSegments as Cu, LineLoop as Pu, Points as Tu, Group as Wi, MathUtils as mt, Skeleton as Na, InterpolateLinear as Ba, AnimationClip as Fa, Bone as ho, NearestFilter as ku, NearestMipmapNearestFilter as Au, LinearMipmapNearestFilter as Mu, NearestMipmapLinearFilter as Su, ClampToEdgeWrapping as mo, MirroredRepeatWrapping as Lu, InterpolateDiscrete as Ru, FrontSide as Vu, Texture as Hs, VectorKeyframeTrack as ja, QuaternionKeyframeTrack as fo, NumberKeyframeTrack as za, Box3 as Iu, Sphere as Du, Interpolant as Ou, ExtrudeGeometry as Nu, Vector4 as Xs, Curve as Bu, MeshPhongMaterial as Jr, MeshLambertMaterial as Fu, EquirectangularReflectionMapping as Ua, AmbientLight as ju, Uint16BufferAttribute as zu, Matrix3 as Uu, ShapePath as Gu, DataTextureLoader as Hu, HalfFloatType as Bs, FloatType as eo, DataUtils as Fs, LinearEncoding as Ku, AnimationMixer as $u, CubeReflectionMapping as Xu, SRGBColorSpace as Yu, CubeTextureLoader as qu, QuadraticBezierCurve3 as Qu } from "three";
14
14
  function Zu(f, i) {
15
15
  for (var s = 0; s < i.length; s++) {
16
16
  const r = i[s];
@@ -59,7 +59,7 @@ function P(f, i, s) {
59
59
  }) : f[i] = s, f;
60
60
  }
61
61
  function da(f, i) {
62
- if (i === bu)
62
+ if (i === vu)
63
63
  return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), f;
64
64
  if (i === co || i === Sa) {
65
65
  let s = f.getIndex();
@@ -86,7 +86,7 @@ function da(f, i) {
86
86
  } else
87
87
  return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:", i), f;
88
88
  }
89
- var ft = Uint8Array, cn = Uint16Array, vo = Uint32Array, Ha = new ft([
89
+ var ft = Uint8Array, cn = Uint16Array, vo = Uint32Array, Ga = new ft([
90
90
  0,
91
91
  0,
92
92
  0,
@@ -121,7 +121,7 @@ var ft = Uint8Array, cn = Uint16Array, vo = Uint32Array, Ha = new ft([
121
121
  0,
122
122
  /* impossible */
123
123
  0
124
- ]), Ka = new ft([
124
+ ]), Ha = new ft([
125
125
  0,
126
126
  0,
127
127
  0,
@@ -155,16 +155,16 @@ var ft = Uint8Array, cn = Uint16Array, vo = Uint32Array, Ha = new ft([
155
155
  /* unused */
156
156
  0,
157
157
  0
158
- ]), ep = new ft([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), $a = function(f, i) {
158
+ ]), ep = new ft([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), Ka = function(f, i) {
159
159
  for (var s = new cn(31), r = 0; r < 31; ++r)
160
160
  s[r] = i += 1 << f[r - 1];
161
161
  for (var o = new vo(s[30]), r = 1; r < 30; ++r)
162
162
  for (var c = s[r]; c < s[r + 1]; ++c)
163
163
  o[c] = c - s[r] << 5 | r;
164
164
  return [s, o];
165
- }, Xa = $a(Ha, 2), Ya = Xa[0], tp = Xa[1];
166
- Ya[28] = 258, tp[258] = 28;
167
- var np = $a(Ka, 0), ip = np[0], bo = new cn(32768);
165
+ }, $a = Ka(Ga, 2), Xa = $a[0], tp = $a[1];
166
+ Xa[28] = 258, tp[258] = 28;
167
+ var np = Ka(Ha, 0), ip = np[0], bo = new cn(32768);
168
168
  for (var Te = 0; Te < 32768; ++Te) {
169
169
  var nn = (Te & 43690) >>> 1 | (Te & 21845) << 1;
170
170
  nn = (nn & 52428) >>> 2 | (nn & 13107) << 2, nn = (nn & 61680) >>> 4 | (nn & 3855) << 4, bo[Te] = ((nn & 65280) >>> 8 | (nn & 255) << 8) >>> 1;
@@ -181,8 +181,8 @@ var Ji = function(f, i, s) {
181
181
  var m = 15 - i;
182
182
  for (o = 0; o < r; ++o)
183
183
  if (f[o])
184
- for (var g = o << 4 | f[o], _ = i - f[o], w = p[f[o] - 1]++ << _, y = w | (1 << _) - 1; w <= y; ++w)
185
- h[bo[w] >>> m] = g;
184
+ for (var g = o << 4 | f[o], w = i - f[o], _ = p[f[o] - 1]++ << w, y = _ | (1 << w) - 1; _ <= y; ++_)
185
+ h[bo[_] >>> m] = g;
186
186
  } else
187
187
  for (h = new cn(r), o = 0; o < r; ++o)
188
188
  f[o] && (h[o] = bo[p[f[o] - 1]++] >>> 15 - f[o]);
@@ -196,10 +196,10 @@ for (var Te = 256; Te < 280; ++Te)
196
196
  os[Te] = 7;
197
197
  for (var Te = 280; Te < 288; ++Te)
198
198
  os[Te] = 8;
199
- var qa = new ft(32);
199
+ var Ya = new ft(32);
200
200
  for (var Te = 0; Te < 32; ++Te)
201
- qa[Te] = 5;
202
- var sp = /* @__PURE__ */ Ji(os, 9, 1), rp = /* @__PURE__ */ Ji(qa, 5, 1), to = function(f) {
201
+ Ya[Te] = 5;
202
+ var sp = /* @__PURE__ */ Ji(os, 9, 1), rp = /* @__PURE__ */ Ji(Ya, 5, 1), to = function(f) {
203
203
  for (var i = f[0], s = 1; s < f.length; ++s)
204
204
  f[s] > i && (i = f[s]);
205
205
  return i;
@@ -227,14 +227,14 @@ var sp = /* @__PURE__ */ Ji(os, 9, 1), rp = /* @__PURE__ */ Ji(qa, 5, 1), to = f
227
227
  var xe = new ft(Math.max(Ue * 2, Ne));
228
228
  xe.set(i), i = xe;
229
229
  }
230
- }, h = s.f || 0, m = s.p || 0, g = s.b || 0, _ = s.l, w = s.d, y = s.m, C = s.n, L = r * 8;
230
+ }, h = s.f || 0, m = s.p || 0, g = s.b || 0, w = s.l, _ = s.d, y = s.m, C = s.n, L = r * 8;
231
231
  do {
232
- if (!_) {
232
+ if (!w) {
233
233
  s.f = h = xt(f, m, 1);
234
234
  var S = xt(f, m + 1, 3);
235
235
  if (m += 3, S)
236
236
  if (S == 1)
237
- _ = sp, w = rp, y = 9, C = 5;
237
+ w = sp, _ = rp, y = 9, C = 5;
238
238
  else if (S == 2) {
239
239
  var I = xt(f, m, 31) + 257, D = xt(f, m + 10, 15) + 4, Y = I + xt(f, m + 5, 31) + 1;
240
240
  m += 14;
@@ -254,7 +254,7 @@ var sp = /* @__PURE__ */ Ji(os, 9, 1), rp = /* @__PURE__ */ Ji(qa, 5, 1), to = f
254
254
  }
255
255
  }
256
256
  var me = G.subarray(0, I), he = G.subarray(I);
257
- y = to(me), C = to(he), _ = Ji(me, y, 1), w = Ji(he, C, 1);
257
+ y = to(me), C = to(he), w = Ji(me, y, 1), _ = Ji(he, C, 1);
258
258
  } else
259
259
  throw "invalid block type";
260
260
  else {
@@ -275,7 +275,7 @@ var sp = /* @__PURE__ */ Ji(os, 9, 1), rp = /* @__PURE__ */ Ji(qa, 5, 1), to = f
275
275
  }
276
276
  o && p(g + 131072);
277
277
  for (var ee = (1 << y) - 1, X = (1 << C) - 1, Se = m; ; Se = m) {
278
- var _e = _[no(f, m) & ee], fe = _e >>> 4;
278
+ var _e = w[no(f, m) & ee], fe = _e >>> 4;
279
279
  if (m += _e & 15, m > L) {
280
280
  if (c)
281
281
  throw "unexpected EOF";
@@ -286,21 +286,21 @@ var sp = /* @__PURE__ */ Ji(os, 9, 1), rp = /* @__PURE__ */ Ji(qa, 5, 1), to = f
286
286
  if (fe < 256)
287
287
  i[g++] = fe;
288
288
  else if (fe == 256) {
289
- Se = m, _ = null;
289
+ Se = m, w = null;
290
290
  break;
291
291
  } else {
292
292
  var oe = fe - 254;
293
293
  if (fe > 264) {
294
- var B = fe - 257, ne = Ha[B];
295
- oe = xt(f, m, (1 << ne) - 1) + Ya[B], m += ne;
294
+ var B = fe - 257, ne = Ga[B];
295
+ oe = xt(f, m, (1 << ne) - 1) + Xa[B], m += ne;
296
296
  }
297
- var ge = w[no(f, m) & X], A = ge >>> 4;
297
+ var ge = _[no(f, m) & X], A = ge >>> 4;
298
298
  if (!ge)
299
299
  throw "invalid distance";
300
300
  m += ge & 15;
301
301
  var he = ip[A];
302
302
  if (A > 3) {
303
- var ne = Ka[A];
303
+ var ne = Ha[A];
304
304
  he += no(f, m) & (1 << ne) - 1, m += ne;
305
305
  }
306
306
  if (m > L) {
@@ -314,7 +314,7 @@ var sp = /* @__PURE__ */ Ji(os, 9, 1), rp = /* @__PURE__ */ Ji(qa, 5, 1), to = f
314
314
  g = ae;
315
315
  }
316
316
  }
317
- s.l = _, s.p = Se, s.b = g, _ && (h = 1, s.m = y, s.d = w, s.n = C);
317
+ s.l = w, s.p = Se, s.b = g, w && (h = 1, s.m = y, s.d = _, s.n = C);
318
318
  } while (!h);
319
319
  return g == i.length ? i : ap(i, 0, g);
320
320
  }, cp = /* @__PURE__ */ new ft(0), up = function(f) {
@@ -334,7 +334,7 @@ try {
334
334
  class mp extends un {
335
335
  // events
336
336
  constructor(i, s) {
337
- super(), P(this, "isTransformControls", !0), P(this, "visible", !1), P(this, "domElement", void 0), P(this, "raycaster", new gu()), P(this, "gizmo", void 0), P(this, "plane", void 0), P(this, "tempVector", new $()), P(this, "tempVector2", new $()), P(this, "tempQuaternion", new Ae()), P(this, "unit", {
337
+ super(), P(this, "isTransformControls", !0), P(this, "visible", !1), P(this, "domElement", void 0), P(this, "raycaster", new bu()), P(this, "gizmo", void 0), P(this, "plane", void 0), P(this, "tempVector", new $()), P(this, "tempVector2", new $()), P(this, "tempQuaternion", new Ae()), P(this, "unit", {
338
338
  X: new $(1, 0, 0),
339
339
  Y: new $(0, 1, 0),
340
340
  Z: new $(0, 0, 1)
@@ -388,15 +388,15 @@ class mp extends un {
388
388
  this.offset.copy(this.pointEnd).sub(this.pointStart), m === "local" && c !== "XYZ" && this.offset.applyQuaternion(this.worldQuaternionInv), c.indexOf("X") === -1 && (this.offset.x = 0), c.indexOf("Y") === -1 && (this.offset.y = 0), c.indexOf("Z") === -1 && (this.offset.z = 0), m === "local" && c !== "XYZ" ? this.offset.applyQuaternion(this.quaternionStart).divide(this.parentScale) : this.offset.applyQuaternion(this.parentQuaternionInv).divide(this.parentScale), h.position.copy(this.offset).add(this.positionStart), this.translationSnap && (m === "local" && (h.position.applyQuaternion(this.tempQuaternion.copy(this.quaternionStart).invert()), c.search("X") !== -1 && (h.position.x = Math.round(h.position.x / this.translationSnap) * this.translationSnap), c.search("Y") !== -1 && (h.position.y = Math.round(h.position.y / this.translationSnap) * this.translationSnap), c.search("Z") !== -1 && (h.position.z = Math.round(h.position.z / this.translationSnap) * this.translationSnap), h.position.applyQuaternion(this.quaternionStart)), m === "world" && (h.parent && h.position.add(this.tempVector.setFromMatrixPosition(h.parent.matrixWorld)), c.search("X") !== -1 && (h.position.x = Math.round(h.position.x / this.translationSnap) * this.translationSnap), c.search("Y") !== -1 && (h.position.y = Math.round(h.position.y / this.translationSnap) * this.translationSnap), c.search("Z") !== -1 && (h.position.z = Math.round(h.position.z / this.translationSnap) * this.translationSnap), h.parent && h.position.sub(this.tempVector.setFromMatrixPosition(h.parent.matrixWorld))));
389
389
  else if (p === "scale") {
390
390
  if (c.search("XYZ") !== -1) {
391
- let _ = this.pointEnd.length() / this.pointStart.length();
392
- this.pointEnd.dot(this.pointStart) < 0 && (_ *= -1), this.tempVector2.set(_, _, _);
391
+ let w = this.pointEnd.length() / this.pointStart.length();
392
+ this.pointEnd.dot(this.pointStart) < 0 && (w *= -1), this.tempVector2.set(w, w, w);
393
393
  } else
394
394
  this.tempVector.copy(this.pointStart), this.tempVector2.copy(this.pointEnd), this.tempVector.applyQuaternion(this.worldQuaternionInv), this.tempVector2.applyQuaternion(this.worldQuaternionInv), this.tempVector2.divide(this.tempVector), c.search("X") === -1 && (this.tempVector2.x = 1), c.search("Y") === -1 && (this.tempVector2.y = 1), c.search("Z") === -1 && (this.tempVector2.z = 1);
395
395
  h.scale.copy(this.scaleStart).multiply(this.tempVector2), this.scaleSnap && this.object && (c.search("X") !== -1 && (this.object.scale.x = Math.round(h.scale.x / this.scaleSnap) * this.scaleSnap || this.scaleSnap), c.search("Y") !== -1 && (h.scale.y = Math.round(h.scale.y / this.scaleSnap) * this.scaleSnap || this.scaleSnap), c.search("Z") !== -1 && (h.scale.z = Math.round(h.scale.z / this.scaleSnap) * this.scaleSnap || this.scaleSnap));
396
396
  } else if (p === "rotate") {
397
397
  this.offset.copy(this.pointEnd).sub(this.pointStart);
398
- const _ = 20 / this.worldPosition.distanceTo(this.tempVector.setFromMatrixPosition(this.camera.matrixWorld));
399
- c === "E" ? (this.rotationAxis.copy(this.eye), this.rotationAngle = this.pointEnd.angleTo(this.pointStart), this.startNorm.copy(this.pointStart).normalize(), this.endNorm.copy(this.pointEnd).normalize(), this.rotationAngle *= this.endNorm.cross(this.startNorm).dot(this.eye) < 0 ? 1 : -1) : c === "XYZE" ? (this.rotationAxis.copy(this.offset).cross(this.eye).normalize(), this.rotationAngle = this.offset.dot(this.tempVector.copy(this.rotationAxis).cross(this.eye)) * _) : (c === "X" || c === "Y" || c === "Z") && (this.rotationAxis.copy(this.unit[c]), this.tempVector.copy(this.unit[c]), m === "local" && this.tempVector.applyQuaternion(this.worldQuaternion), this.rotationAngle = this.offset.dot(this.tempVector.cross(this.eye).normalize()) * _), this.rotationSnap && (this.rotationAngle = Math.round(this.rotationAngle / this.rotationSnap) * this.rotationSnap), m === "local" && c !== "E" && c !== "XYZE" ? (h.quaternion.copy(this.quaternionStart), h.quaternion.multiply(this.tempQuaternion.setFromAxisAngle(this.rotationAxis, this.rotationAngle)).normalize()) : (this.rotationAxis.applyQuaternion(this.parentQuaternionInv), h.quaternion.copy(this.tempQuaternion.setFromAxisAngle(this.rotationAxis, this.rotationAngle)), h.quaternion.multiply(this.quaternionStart).normalize());
398
+ const w = 20 / this.worldPosition.distanceTo(this.tempVector.setFromMatrixPosition(this.camera.matrixWorld));
399
+ c === "E" ? (this.rotationAxis.copy(this.eye), this.rotationAngle = this.pointEnd.angleTo(this.pointStart), this.startNorm.copy(this.pointStart).normalize(), this.endNorm.copy(this.pointEnd).normalize(), this.rotationAngle *= this.endNorm.cross(this.startNorm).dot(this.eye) < 0 ? 1 : -1) : c === "XYZE" ? (this.rotationAxis.copy(this.offset).cross(this.eye).normalize(), this.rotationAngle = this.offset.dot(this.tempVector.copy(this.rotationAxis).cross(this.eye)) * w) : (c === "X" || c === "Y" || c === "Z") && (this.rotationAxis.copy(this.unit[c]), this.tempVector.copy(this.unit[c]), m === "local" && this.tempVector.applyQuaternion(this.worldQuaternion), this.rotationAngle = this.offset.dot(this.tempVector.cross(this.eye).normalize()) * w), this.rotationSnap && (this.rotationAngle = Math.round(this.rotationAngle / this.rotationSnap) * this.rotationSnap), m === "local" && c !== "E" && c !== "XYZE" ? (h.quaternion.copy(this.quaternionStart), h.quaternion.multiply(this.tempQuaternion.setFromAxisAngle(this.rotationAxis, this.rotationAngle)).normalize()) : (this.rotationAxis.applyQuaternion(this.parentQuaternionInv), h.quaternion.copy(this.tempQuaternion.setFromAxisAngle(this.rotationAxis, this.rotationAngle)), h.quaternion.multiply(this.quaternionStart).normalize());
400
400
  }
401
401
  this.dispatchEvent(this.changeEvent), this.dispatchEvent(this.objectChangeEvent);
402
402
  }
@@ -451,9 +451,9 @@ class mp extends un {
451
451
  o === document && console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'), this.domElement = o, this.domElement.addEventListener("pointerdown", this.onPointerDown), this.domElement.addEventListener("pointermove", this.onPointerHover), this.domElement.ownerDocument.addEventListener("pointerup", this.onPointerUp);
452
452
  }), P(this, "dispose", () => {
453
453
  var o, c, p, h, m, g;
454
- (o = this.domElement) === null || o === void 0 || o.removeEventListener("pointerdown", this.onPointerDown), (c = this.domElement) === null || c === void 0 || c.removeEventListener("pointermove", this.onPointerHover), (p = this.domElement) === null || p === void 0 || (h = p.ownerDocument) === null || h === void 0 || h.removeEventListener("pointermove", this.onPointerMove), (m = this.domElement) === null || m === void 0 || (g = m.ownerDocument) === null || g === void 0 || g.removeEventListener("pointerup", this.onPointerUp), this.traverse((_) => {
455
- const w = _;
456
- w.geometry && w.geometry.dispose(), w.material && w.material.dispose();
454
+ (o = this.domElement) === null || o === void 0 || o.removeEventListener("pointerdown", this.onPointerDown), (c = this.domElement) === null || c === void 0 || c.removeEventListener("pointermove", this.onPointerHover), (p = this.domElement) === null || p === void 0 || (h = p.ownerDocument) === null || h === void 0 || h.removeEventListener("pointermove", this.onPointerMove), (m = this.domElement) === null || m === void 0 || (g = m.ownerDocument) === null || g === void 0 || g.removeEventListener("pointerup", this.onPointerUp), this.traverse((w) => {
455
+ const _ = w;
456
+ _.geometry && _.geometry.dispose(), _.material && _.material.dispose();
457
457
  });
458
458
  }), this.domElement = s, this.camera = i, this.gizmo = new fp(), this.add(this.gizmo), this.plane = new vp(), this.add(this.plane);
459
459
  const r = (o, c) => {
@@ -525,10 +525,10 @@ class fp extends un {
525
525
  m.opacity = 0.25;
526
526
  const g = m.clone();
527
527
  g.color.set(16776960);
528
- const _ = m.clone();
529
- _.color.set(65535);
530
528
  const w = m.clone();
531
- w.color.set(16711935), i.clone().color.set(16776960);
529
+ w.color.set(65535);
530
+ const _ = m.clone();
531
+ _.color.set(16711935), i.clone().color.set(16776960);
532
532
  const C = s.clone();
533
533
  C.color.set(16711680);
534
534
  const L = s.clone();
@@ -561,8 +561,8 @@ class fp extends un {
561
561
  Z: [[new Z(Y, h), [0, 0, 1], [Math.PI / 2, 0, 0], null, "fwd"], [new Z(Y, h), [0, 0, 1], [-Math.PI / 2, 0, 0], null, "bwd"], [new ue(F, S), null, [0, -Math.PI / 2, 0]]],
562
562
  XYZ: [[new Z(new Dn(0.1, 0), m.clone()), [0, 0, 0], [0, 0, 0]]],
563
563
  XY: [[new Z(new Nn(0.295, 0.295), g.clone()), [0.15, 0.15, 0]], [new ue(F, N), [0.18, 0.3, 0], null, [0.125, 1, 1]], [new ue(F, N), [0.3, 0.18, 0], [0, 0, Math.PI / 2], [0.125, 1, 1]]],
564
- YZ: [[new Z(new Nn(0.295, 0.295), _.clone()), [0, 0.15, 0.15], [0, Math.PI / 2, 0]], [new ue(F, R), [0, 0.18, 0.3], [0, 0, Math.PI / 2], [0.125, 1, 1]], [new ue(F, R), [0, 0.3, 0.18], [0, -Math.PI / 2, 0], [0.125, 1, 1]]],
565
- XZ: [[new Z(new Nn(0.295, 0.295), w.clone()), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]], [new ue(F, O), [0.18, 0, 0.3], null, [0.125, 1, 1]], [new ue(F, O), [0.3, 0, 0.18], [0, -Math.PI / 2, 0], [0.125, 1, 1]]]
564
+ YZ: [[new Z(new Nn(0.295, 0.295), w.clone()), [0, 0.15, 0.15], [0, Math.PI / 2, 0]], [new ue(F, R), [0, 0.18, 0.3], [0, 0, Math.PI / 2], [0.125, 1, 1]], [new ue(F, R), [0, 0.3, 0.18], [0, -Math.PI / 2, 0], [0.125, 1, 1]]],
565
+ XZ: [[new Z(new Nn(0.295, 0.295), _.clone()), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]], [new ue(F, O), [0.18, 0, 0.3], null, [0.125, 1, 1]], [new ue(F, O), [0.3, 0, 0.18], [0, -Math.PI / 2, 0], [0.125, 1, 1]]]
566
566
  }, q = {
567
567
  X: [[new Z(new yt(0.2, 0, 1, 4, 1, !1), r), [0.6, 0, 0], [0, 0, -Math.PI / 2]]],
568
568
  Y: [[new Z(new yt(0.2, 0, 1, 4, 1, !1), r), [0, 0.6, 0]]],
@@ -591,14 +591,14 @@ class fp extends un {
591
591
  Y: [[new Z(new Ns(1, 0.1, 4, 24), r), [0, 0, 0], [Math.PI / 2, 0, 0]]],
592
592
  Z: [[new Z(new Ns(1, 0.1, 4, 24), r), [0, 0, 0], [0, 0, -Math.PI / 2]]],
593
593
  E: [[new Z(new Ns(1.25, 0.1, 2, 24), r)]],
594
- XYZE: [[new Z(new _u(0.7, 10, 8), r)]]
594
+ XYZE: [[new Z(new gu(0.7, 10, 8), r)]]
595
595
  }, he = {
596
596
  X: [[new Z(G, c), [0.8, 0, 0], [0, 0, -Math.PI / 2]], [new ue(F, C), null, null, [0.8, 1, 1]]],
597
597
  Y: [[new Z(G, p), [0, 0.8, 0]], [new ue(F, L), null, [0, 0, Math.PI / 2], [0.8, 1, 1]]],
598
598
  Z: [[new Z(G, h), [0, 0, 0.8], [Math.PI / 2, 0, 0]], [new ue(F, S), null, [0, -Math.PI / 2, 0], [0.8, 1, 1]]],
599
599
  XY: [[new Z(G, g), [0.85, 0.85, 0], null, [2, 2, 0.2]], [new ue(F, N), [0.855, 0.98, 0], null, [0.125, 1, 1]], [new ue(F, N), [0.98, 0.855, 0], [0, 0, Math.PI / 2], [0.125, 1, 1]]],
600
- YZ: [[new Z(G, _), [0, 0.85, 0.85], null, [0.2, 2, 2]], [new ue(F, R), [0, 0.855, 0.98], [0, 0, Math.PI / 2], [0.125, 1, 1]], [new ue(F, R), [0, 0.98, 0.855], [0, -Math.PI / 2, 0], [0.125, 1, 1]]],
601
- XZ: [[new Z(G, w), [0.85, 0, 0.85], null, [2, 0.2, 2]], [new ue(F, O), [0.855, 0, 0.98], null, [0.125, 1, 1]], [new ue(F, O), [0.98, 0, 0.855], [0, -Math.PI / 2, 0], [0.125, 1, 1]]],
600
+ YZ: [[new Z(G, w), [0, 0.85, 0.85], null, [0.2, 2, 2]], [new ue(F, R), [0, 0.855, 0.98], [0, 0, Math.PI / 2], [0.125, 1, 1]], [new ue(F, R), [0, 0.98, 0.855], [0, -Math.PI / 2, 0], [0.125, 1, 1]]],
601
+ XZ: [[new Z(G, _), [0.85, 0, 0.85], null, [2, 0.2, 2]], [new ue(F, O), [0.855, 0, 0.98], null, [0.125, 1, 1]], [new ue(F, O), [0.98, 0, 0.855], [0, -Math.PI / 2, 0], [0.125, 1, 1]]],
602
602
  XYZX: [[new Z(new In(0.125, 0.125, 0.125), m.clone()), [1.1, 0, 0]]],
603
603
  XYZY: [[new Z(new In(0.125, 0.125, 0.125), m.clone()), [0, 1.1, 0]]],
604
604
  XYZZ: [[new Z(new In(0.125, 0.125, 0.125), m.clone()), [0, 0, 1.1]]]
@@ -714,7 +714,7 @@ class wp extends La {
714
714
  }
715
715
  }
716
716
  const fa = (f, i) => (f % i + i) % i;
717
- class Qa extends La {
717
+ class qa extends La {
718
718
  // Set to false to disable this control
719
719
  // "target" sets the location of focus, where the object orbits around
720
720
  // How far you can dolly in and out ( PerspectiveCamera only )
@@ -756,16 +756,16 @@ class Qa extends La {
756
756
  }), P(this, "touches", {
757
757
  ONE: on.ROTATE,
758
758
  TWO: on.DOLLY_PAN
759
- }), P(this, "target0", void 0), P(this, "position0", void 0), P(this, "zoom0", void 0), P(this, "_domElementKeyEvents", null), P(this, "getPolarAngle", void 0), P(this, "getAzimuthalAngle", void 0), P(this, "setPolarAngle", void 0), P(this, "setAzimuthalAngle", void 0), P(this, "getDistance", void 0), P(this, "listenToKeyEvents", void 0), P(this, "saveState", void 0), P(this, "reset", void 0), P(this, "update", void 0), P(this, "connect", void 0), P(this, "dispose", void 0), this.object = i, this.domElement = s, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object instanceof an ? this.object.zoom : 1, this.getPolarAngle = () => _.phi, this.getAzimuthalAngle = () => _.theta, this.setPolarAngle = (M) => {
760
- let U = fa(M, 2 * Math.PI), W = _.phi;
759
+ }), P(this, "target0", void 0), P(this, "position0", void 0), P(this, "zoom0", void 0), P(this, "_domElementKeyEvents", null), P(this, "getPolarAngle", void 0), P(this, "getAzimuthalAngle", void 0), P(this, "setPolarAngle", void 0), P(this, "setAzimuthalAngle", void 0), P(this, "getDistance", void 0), P(this, "listenToKeyEvents", void 0), P(this, "saveState", void 0), P(this, "reset", void 0), P(this, "update", void 0), P(this, "connect", void 0), P(this, "dispose", void 0), this.object = i, this.domElement = s, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object instanceof an ? this.object.zoom : 1, this.getPolarAngle = () => w.phi, this.getAzimuthalAngle = () => w.theta, this.setPolarAngle = (M) => {
760
+ let U = fa(M, 2 * Math.PI), W = w.phi;
761
761
  W < 0 && (W += 2 * Math.PI), U < 0 && (U += 2 * Math.PI);
762
762
  let ie = Math.abs(U - W);
763
- 2 * Math.PI - ie < ie && (U < W ? U += 2 * Math.PI : W += 2 * Math.PI), w.phi = U - W, r.update();
763
+ 2 * Math.PI - ie < ie && (U < W ? U += 2 * Math.PI : W += 2 * Math.PI), _.phi = U - W, r.update();
764
764
  }, this.setAzimuthalAngle = (M) => {
765
- let U = fa(M, 2 * Math.PI), W = _.theta;
765
+ let U = fa(M, 2 * Math.PI), W = w.theta;
766
766
  W < 0 && (W += 2 * Math.PI), U < 0 && (U += 2 * Math.PI);
767
767
  let ie = Math.abs(U - W);
768
- 2 * Math.PI - ie < ie && (U < W ? U += 2 * Math.PI : W += 2 * Math.PI), w.theta = U - W, r.update();
768
+ 2 * Math.PI - ie < ie && (U < W ? U += 2 * Math.PI : W += 2 * Math.PI), _.theta = U - W, r.update();
769
769
  }, this.getDistance = () => r.object.position.distanceTo(r.target), this.listenToKeyEvents = (M) => {
770
770
  M.addEventListener("keydown", Et), this._domElementKeyEvents = M;
771
771
  }, this.saveState = () => {
@@ -776,9 +776,9 @@ class Qa extends La {
776
776
  const M = new $(), U = new Ae().setFromUnitVectors(i.up, new $(0, 1, 0)), W = U.clone().invert(), ie = new $(), Ee = new Ae(), Fe = 2 * Math.PI;
777
777
  return function() {
778
778
  const fn = r.object.position;
779
- M.copy(fn).sub(r.target), M.applyQuaternion(U), _.setFromVector3(M), r.autoRotate && m === h.NONE && pe(K()), r.enableDamping ? (_.theta += w.theta * r.dampingFactor, _.phi += w.phi * r.dampingFactor) : (_.theta += w.theta, _.phi += w.phi);
779
+ M.copy(fn).sub(r.target), M.applyQuaternion(U), w.setFromVector3(M), r.autoRotate && m === h.NONE && pe(K()), r.enableDamping ? (w.theta += _.theta * r.dampingFactor, w.phi += _.phi * r.dampingFactor) : (w.theta += _.theta, w.phi += _.phi);
780
780
  let $e = r.minAzimuthAngle, Xe = r.maxAzimuthAngle;
781
- return isFinite($e) && isFinite(Xe) && ($e < -Math.PI ? $e += Fe : $e > Math.PI && ($e -= Fe), Xe < -Math.PI ? Xe += Fe : Xe > Math.PI && (Xe -= Fe), $e <= Xe ? _.theta = Math.max($e, Math.min(Xe, _.theta)) : _.theta = _.theta > ($e + Xe) / 2 ? Math.max($e, _.theta) : Math.min(Xe, _.theta)), _.phi = Math.max(r.minPolarAngle, Math.min(r.maxPolarAngle, _.phi)), _.makeSafe(), _.radius *= y, _.radius = Math.max(r.minDistance, Math.min(r.maxDistance, _.radius)), r.enableDamping === !0 ? r.target.addScaledVector(C, r.dampingFactor) : r.target.add(C), M.setFromSpherical(_), M.applyQuaternion(W), fn.copy(r.target).add(M), r.object.lookAt(r.target), r.enableDamping === !0 ? (w.theta *= 1 - r.dampingFactor, w.phi *= 1 - r.dampingFactor, C.multiplyScalar(1 - r.dampingFactor)) : (w.set(0, 0, 0), C.set(0, 0, 0)), y = 1, L || ie.distanceToSquared(r.object.position) > g || 8 * (1 - Ee.dot(r.object.quaternion)) > g ? (r.dispatchEvent(o), ie.copy(r.object.position), Ee.copy(r.object.quaternion), L = !1, !0) : !1;
781
+ return isFinite($e) && isFinite(Xe) && ($e < -Math.PI ? $e += Fe : $e > Math.PI && ($e -= Fe), Xe < -Math.PI ? Xe += Fe : Xe > Math.PI && (Xe -= Fe), $e <= Xe ? w.theta = Math.max($e, Math.min(Xe, w.theta)) : w.theta = w.theta > ($e + Xe) / 2 ? Math.max($e, w.theta) : Math.min(Xe, w.theta)), w.phi = Math.max(r.minPolarAngle, Math.min(r.maxPolarAngle, w.phi)), w.makeSafe(), w.radius *= y, w.radius = Math.max(r.minDistance, Math.min(r.maxDistance, w.radius)), r.enableDamping === !0 ? r.target.addScaledVector(C, r.dampingFactor) : r.target.add(C), M.setFromSpherical(w), M.applyQuaternion(W), fn.copy(r.target).add(M), r.object.lookAt(r.target), r.enableDamping === !0 ? (_.theta *= 1 - r.dampingFactor, _.phi *= 1 - r.dampingFactor, C.multiplyScalar(1 - r.dampingFactor)) : (_.set(0, 0, 0), C.set(0, 0, 0)), y = 1, L || ie.distanceToSquared(r.object.position) > g || 8 * (1 - Ee.dot(r.object.quaternion)) > g ? (r.dispatchEvent(o), ie.copy(r.object.position), Ee.copy(r.object.quaternion), L = !1, !0) : !1;
782
782
  };
783
783
  })(), this.connect = (M) => {
784
784
  M === document && console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'), r.domElement = M, r.domElement.style.touchAction = "none", r.domElement.addEventListener("contextmenu", mn), r.domElement.addEventListener("pointerdown", ot), r.domElement.addEventListener("pointercancel", Hn), r.domElement.addEventListener("wheel", $n);
@@ -803,7 +803,7 @@ class Qa extends La {
803
803
  TOUCH_DOLLY_ROTATE: 6
804
804
  };
805
805
  let m = h.NONE;
806
- const g = 1e-6, _ = new uo(), w = new uo();
806
+ const g = 1e-6, w = new uo(), _ = new uo();
807
807
  let y = 1;
808
808
  const C = new $();
809
809
  let L = !1;
@@ -815,10 +815,10 @@ class Qa extends La {
815
815
  return Math.pow(0.95, r.zoomSpeed);
816
816
  }
817
817
  function pe(M) {
818
- r.reverseOrbit ? w.theta += M : w.theta -= M;
818
+ r.reverseOrbit ? _.theta += M : _.theta -= M;
819
819
  }
820
820
  function _e(M) {
821
- r.reverseOrbit ? w.phi += M : w.phi -= M;
821
+ r.reverseOrbit ? _.phi += M : _.phi -= M;
822
822
  }
823
823
  const ce = (() => {
824
824
  const M = new $();
@@ -1132,7 +1132,7 @@ class Qa extends La {
1132
1132
  s !== void 0 && this.connect(s), this.update();
1133
1133
  }
1134
1134
  }
1135
- class yp extends Qa {
1135
+ class yp extends qa {
1136
1136
  constructor(i, s) {
1137
1137
  super(i, s), this.screenSpacePanning = !1, this.mouseButtons.LEFT = rn.PAN, this.mouseButtons.RIGHT = rn.ROTATE, this.touches.ONE = on.PAN, this.touches.TWO = on.DOLLY_ROTATE;
1138
1138
  }
@@ -1178,11 +1178,11 @@ class xp extends $s {
1178
1178
  }, m = new fi(this.manager);
1179
1179
  m.setPath(this.path), m.setResponseType("arraybuffer"), m.setRequestHeader(this.requestHeader), m.setWithCredentials(this.withCredentials), m.load(i, function(g) {
1180
1180
  try {
1181
- c.parse(g, p, function(_) {
1182
- s(_), c.manager.itemEnd(i);
1181
+ c.parse(g, p, function(w) {
1182
+ s(w), c.manager.itemEnd(i);
1183
1183
  }, h);
1184
- } catch (_) {
1185
- h(_);
1184
+ } catch (w) {
1185
+ h(w);
1186
1186
  }
1187
1187
  }, r, h);
1188
1188
  }
@@ -1210,11 +1210,11 @@ class xp extends $s {
1210
1210
  if (typeof i == "string")
1211
1211
  c = JSON.parse(i);
1212
1212
  else if (i instanceof ArrayBuffer)
1213
- if (m.decode(new Uint8Array(i, 0, 4)) === Za) {
1213
+ if (m.decode(new Uint8Array(i, 0, 4)) === Qa) {
1214
1214
  try {
1215
1215
  p[le.KHR_BINARY_GLTF] = new Fp(i);
1216
- } catch (w) {
1217
- o && o(w);
1216
+ } catch (_) {
1217
+ o && o(_);
1218
1218
  return;
1219
1219
  }
1220
1220
  c = JSON.parse(p[le.KHR_BINARY_GLTF].content);
@@ -1235,28 +1235,28 @@ class xp extends $s {
1235
1235
  meshoptDecoder: this.meshoptDecoder
1236
1236
  });
1237
1237
  g.fileLoader.setRequestHeader(this.requestHeader);
1238
- for (let _ = 0; _ < this.pluginCallbacks.length; _++) {
1239
- const w = this.pluginCallbacks[_](g);
1240
- h[w.name] = w, p[w.name] = !0;
1238
+ for (let w = 0; w < this.pluginCallbacks.length; w++) {
1239
+ const _ = this.pluginCallbacks[w](g);
1240
+ h[_.name] = _, p[_.name] = !0;
1241
1241
  }
1242
1242
  if (c.extensionsUsed)
1243
- for (let _ = 0; _ < c.extensionsUsed.length; ++_) {
1244
- const w = c.extensionsUsed[_], y = c.extensionsRequired || [];
1245
- switch (w) {
1243
+ for (let w = 0; w < c.extensionsUsed.length; ++w) {
1244
+ const _ = c.extensionsUsed[w], y = c.extensionsRequired || [];
1245
+ switch (_) {
1246
1246
  case le.KHR_MATERIALS_UNLIT:
1247
- p[w] = new Pp();
1247
+ p[_] = new Pp();
1248
1248
  break;
1249
1249
  case le.KHR_DRACO_MESH_COMPRESSION:
1250
- p[w] = new jp(c, this.dracoLoader);
1250
+ p[_] = new jp(c, this.dracoLoader);
1251
1251
  break;
1252
1252
  case le.KHR_TEXTURE_TRANSFORM:
1253
- p[w] = new zp();
1253
+ p[_] = new zp();
1254
1254
  break;
1255
1255
  case le.KHR_MESH_QUANTIZATION:
1256
- p[w] = new Up();
1256
+ p[_] = new Up();
1257
1257
  break;
1258
1258
  default:
1259
- y.indexOf(w) >= 0 && h[w] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + w + '".');
1259
+ y.indexOf(_) >= 0 && h[_] === void 0 && console.warn('THREE.GLTFLoader: Unknown extension "' + _ + '".');
1260
1260
  }
1261
1261
  }
1262
1262
  g.setExtensions(p), g.setPlugins(h), g.parse(r, o);
@@ -1327,18 +1327,18 @@ class Cp {
1327
1327
  return o;
1328
1328
  const c = s.json, m = ((c.extensions && c.extensions[this.name] || {}).lights || [])[i];
1329
1329
  let g;
1330
- const _ = new Be(16777215);
1331
- m.color !== void 0 && _.fromArray(m.color);
1332
- const w = m.range !== void 0 ? m.range : 0;
1330
+ const w = new Be(16777215);
1331
+ m.color !== void 0 && w.fromArray(m.color);
1332
+ const _ = m.range !== void 0 ? m.range : 0;
1333
1333
  switch (m.type) {
1334
1334
  case "directional":
1335
- g = new Va(_), g.target.position.set(0, 0, -1), g.add(g.target);
1335
+ g = new Va(w), g.target.position.set(0, 0, -1), g.add(g.target);
1336
1336
  break;
1337
1337
  case "point":
1338
- g = new po(_), g.distance = w;
1338
+ g = new po(w), g.distance = _;
1339
1339
  break;
1340
1340
  case "spot":
1341
- g = new Ra(_), g.distance = w, m.spot = m.spot || {}, m.spot.innerConeAngle = m.spot.innerConeAngle !== void 0 ? m.spot.innerConeAngle : 0, m.spot.outerConeAngle = m.spot.outerConeAngle !== void 0 ? m.spot.outerConeAngle : Math.PI / 4, g.angle = m.spot.outerConeAngle, g.penumbra = 1 - m.spot.innerConeAngle / m.spot.outerConeAngle, g.target.position.set(0, 0, -1), g.add(g.target);
1341
+ g = new Ra(w), g.distance = _, m.spot = m.spot || {}, m.spot.innerConeAngle = m.spot.innerConeAngle !== void 0 ? m.spot.innerConeAngle : 0, m.spot.outerConeAngle = m.spot.outerConeAngle !== void 0 ? m.spot.outerConeAngle : Math.PI / 4, g.angle = m.spot.outerConeAngle, g.penumbra = 1 - m.spot.innerConeAngle / m.spot.outerConeAngle, g.target.position.set(0, 0, -1), g.add(g.target);
1342
1342
  break;
1343
1343
  default:
1344
1344
  throw new Error("THREE.GLTFLoader: Unexpected light type: " + m.type);
@@ -1604,12 +1604,12 @@ class Np {
1604
1604
  return null;
1605
1605
  }
1606
1606
  return c.then(function(h) {
1607
- const m = o.byteOffset || 0, g = o.byteLength || 0, _ = o.count, w = o.byteStride, y = new Uint8Array(h, m, g);
1608
- return p.decodeGltfBufferAsync ? p.decodeGltfBufferAsync(_, w, y, o.mode, o.filter).then(function(C) {
1607
+ const m = o.byteOffset || 0, g = o.byteLength || 0, w = o.count, _ = o.byteStride, y = new Uint8Array(h, m, g);
1608
+ return p.decodeGltfBufferAsync ? p.decodeGltfBufferAsync(w, _, y, o.mode, o.filter).then(function(C) {
1609
1609
  return C.buffer;
1610
1610
  }) : p.ready.then(function() {
1611
- const C = new ArrayBuffer(_ * w);
1612
- return p.decodeGltfBuffer(new Uint8Array(C), _, w, y, o.mode, o.filter), C;
1611
+ const C = new ArrayBuffer(w * _);
1612
+ return p.decodeGltfBuffer(new Uint8Array(C), w, _, y, o.mode, o.filter), C;
1613
1613
  });
1614
1614
  });
1615
1615
  } else
@@ -1630,22 +1630,22 @@ class Bp {
1630
1630
  return null;
1631
1631
  const p = r.extensions[this.name].attributes, h = [], m = {};
1632
1632
  for (const g in p)
1633
- h.push(this.parser.getDependency("accessor", p[g]).then((_) => (m[g] = _, m[g])));
1633
+ h.push(this.parser.getDependency("accessor", p[g]).then((w) => (m[g] = w, m[g])));
1634
1634
  return h.length < 1 ? null : (h.push(this.parser.createNodeMesh(i)), Promise.all(h).then((g) => {
1635
- const _ = g.pop(), w = _.isGroup ? _.children : [_], y = g[0].count, C = [];
1636
- for (const L of w) {
1637
- const S = new ye(), R = new $(), O = new Ae(), N = new $(1, 1, 1), I = new wu(L.geometry, L.material, y);
1635
+ const w = g.pop(), _ = w.isGroup ? w.children : [w], y = g[0].count, C = [];
1636
+ for (const L of _) {
1637
+ const S = new ye(), R = new $(), O = new Ae(), N = new $(1, 1, 1), I = new _u(L.geometry, L.material, y);
1638
1638
  for (let D = 0; D < y; D++)
1639
1639
  m.TRANSLATION && R.fromBufferAttribute(m.TRANSLATION, D), m.ROTATION && O.fromBufferAttribute(m.ROTATION, D), m.SCALE && N.fromBufferAttribute(m.SCALE, D), I.setMatrixAt(D, S.compose(R, O, N));
1640
1640
  for (const D in m)
1641
1641
  D !== "TRANSLATION" && D !== "ROTATION" && D !== "SCALE" && L.geometry.setAttribute(D, m[D]);
1642
1642
  un.prototype.copy.call(I, L), this.parser.assignFinalMaterial(I), C.push(I);
1643
1643
  }
1644
- return _.isGroup ? (_.clear(), _.add(...C), _) : C[0];
1644
+ return w.isGroup ? (w.clear(), w.add(...C), w) : C[0];
1645
1645
  }));
1646
1646
  }
1647
1647
  }
1648
- const Za = "glTF", Yi = 12, va = {
1648
+ const Qa = "glTF", Yi = 12, va = {
1649
1649
  JSON: 1313821514,
1650
1650
  BIN: 5130562
1651
1651
  };
@@ -1657,7 +1657,7 @@ class Fp {
1657
1657
  magic: r.decode(new Uint8Array(i.slice(0, 4))),
1658
1658
  version: s.getUint32(4, !0),
1659
1659
  length: s.getUint32(8, !0)
1660
- }, this.header.magic !== Za)
1660
+ }, this.header.magic !== Qa)
1661
1661
  throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");
1662
1662
  if (this.header.version < 2)
1663
1663
  throw new Error("THREE.GLTFLoader: Legacy binary file detected.");
@@ -1688,25 +1688,25 @@ class jp {
1688
1688
  }
1689
1689
  decodePrimitive(i, s) {
1690
1690
  const r = this.json, o = this.dracoLoader, c = i.extensions[this.name].bufferView, p = i.extensions[this.name].attributes, h = {}, m = {}, g = {};
1691
- for (const _ in p) {
1692
- const w = go[_] || _.toLowerCase();
1693
- h[w] = p[_];
1691
+ for (const w in p) {
1692
+ const _ = go[w] || w.toLowerCase();
1693
+ h[_] = p[w];
1694
1694
  }
1695
- for (const _ in i.attributes) {
1696
- const w = go[_] || _.toLowerCase();
1697
- if (p[_] !== void 0) {
1698
- const y = r.accessors[i.attributes[_]], C = di[y.componentType];
1699
- g[w] = C.name, m[w] = y.normalized === !0;
1695
+ for (const w in i.attributes) {
1696
+ const _ = go[w] || w.toLowerCase();
1697
+ if (p[w] !== void 0) {
1698
+ const y = r.accessors[i.attributes[w]], C = di[y.componentType];
1699
+ g[_] = C.name, m[_] = y.normalized === !0;
1700
1700
  }
1701
1701
  }
1702
- return s.getDependency("bufferView", c).then(function(_) {
1703
- return new Promise(function(w) {
1704
- o.decodeDracoFile(_, function(y) {
1702
+ return s.getDependency("bufferView", c).then(function(w) {
1703
+ return new Promise(function(_) {
1704
+ o.decodeDracoFile(w, function(y) {
1705
1705
  for (const C in y.attributes) {
1706
1706
  const L = y.attributes[C], S = m[C];
1707
1707
  S !== void 0 && (L.normalized = S);
1708
1708
  }
1709
- w(y);
1709
+ _(y);
1710
1710
  }, h, g);
1711
1711
  });
1712
1712
  });
@@ -1725,7 +1725,7 @@ class Up {
1725
1725
  this.name = le.KHR_MESH_QUANTIZATION;
1726
1726
  }
1727
1727
  }
1728
- class Wa extends Nu {
1728
+ class Za extends Ou {
1729
1729
  constructor(i, s, r, o) {
1730
1730
  super(i, s, r, o);
1731
1731
  }
@@ -1736,16 +1736,16 @@ class Wa extends Nu {
1736
1736
  return s;
1737
1737
  }
1738
1738
  interpolate_(i, s, r, o) {
1739
- const c = this.resultBuffer, p = this.sampleValues, h = this.valueSize, m = h * 2, g = h * 3, _ = o - s, w = (r - s) / _, y = w * w, C = y * w, L = i * g, S = L - g, R = -2 * C + 3 * y, O = C - y, N = 1 - R, I = O - y + w;
1739
+ const c = this.resultBuffer, p = this.sampleValues, h = this.valueSize, m = h * 2, g = h * 3, w = o - s, _ = (r - s) / w, y = _ * _, C = y * _, L = i * g, S = L - g, R = -2 * C + 3 * y, O = C - y, N = 1 - R, I = O - y + _;
1740
1740
  for (let D = 0; D !== h; D++) {
1741
- const Y = p[S + D + h], G = p[S + D + m] * _, F = p[L + D + h], B = p[L + D] * _;
1741
+ const Y = p[S + D + h], G = p[S + D + m] * w, F = p[L + D + h], B = p[L + D] * w;
1742
1742
  c[D] = N * Y + I * G + R * F + O * B;
1743
1743
  }
1744
1744
  return c;
1745
1745
  }
1746
1746
  }
1747
1747
  const Gp = new Ae();
1748
- class Hp extends Wa {
1748
+ class Hp extends Za {
1749
1749
  interpolate_(i, s, r, o) {
1750
1750
  const c = super.interpolate_(i, s, r, o);
1751
1751
  return Gp.fromArray(c).normalize().toArray(c), c;
@@ -1779,15 +1779,15 @@ const dt = {
1779
1779
  5125: Uint32Array,
1780
1780
  5126: Float32Array
1781
1781
  }, ba = {
1782
- 9728: Au,
1782
+ 9728: ku,
1783
1783
  9729: Gs,
1784
- 9984: Mu,
1785
- 9985: Su,
1786
- 9986: Lu,
1784
+ 9984: Au,
1785
+ 9985: Mu,
1786
+ 9986: Su,
1787
1787
  9987: Da
1788
1788
  }, ga = {
1789
1789
  33071: mo,
1790
- 33648: Ru,
1790
+ 33648: Lu,
1791
1791
  10497: ts
1792
1792
  }, io = {
1793
1793
  SCALAR: 1,
@@ -1816,7 +1816,7 @@ const dt = {
1816
1816
  // We use a custom interpolant (GLTFCubicSplineInterpolation) for CUBICSPLINE tracks. Each
1817
1817
  // keyframe track will be initialized with a default interpolation type, then modified.
1818
1818
  LINEAR: Ba,
1819
- STEP: Vu
1819
+ STEP: Ru
1820
1820
  }, so = {
1821
1821
  OPAQUE: "OPAQUE",
1822
1822
  MASK: "MASK",
@@ -1830,7 +1830,7 @@ function $p(f) {
1830
1830
  roughness: 1,
1831
1831
  transparent: !1,
1832
1832
  depthTest: !0,
1833
- side: Iu
1833
+ side: Vu
1834
1834
  })), f.DefaultMaterial;
1835
1835
  }
1836
1836
  function qi(f, i, s) {
@@ -1842,32 +1842,32 @@ function ln(f, i) {
1842
1842
  }
1843
1843
  function Xp(f, i, s) {
1844
1844
  let r = !1, o = !1, c = !1;
1845
- for (let g = 0, _ = i.length; g < _; g++) {
1846
- const w = i[g];
1847
- if (w.POSITION !== void 0 && (r = !0), w.NORMAL !== void 0 && (o = !0), w.COLOR_0 !== void 0 && (c = !0), r && o && c)
1845
+ for (let g = 0, w = i.length; g < w; g++) {
1846
+ const _ = i[g];
1847
+ if (_.POSITION !== void 0 && (r = !0), _.NORMAL !== void 0 && (o = !0), _.COLOR_0 !== void 0 && (c = !0), r && o && c)
1848
1848
  break;
1849
1849
  }
1850
1850
  if (!r && !o && !c)
1851
1851
  return Promise.resolve(f);
1852
1852
  const p = [], h = [], m = [];
1853
- for (let g = 0, _ = i.length; g < _; g++) {
1854
- const w = i[g];
1853
+ for (let g = 0, w = i.length; g < w; g++) {
1854
+ const _ = i[g];
1855
1855
  if (r) {
1856
- const y = w.POSITION !== void 0 ? s.getDependency("accessor", w.POSITION) : f.attributes.position;
1856
+ const y = _.POSITION !== void 0 ? s.getDependency("accessor", _.POSITION) : f.attributes.position;
1857
1857
  p.push(y);
1858
1858
  }
1859
1859
  if (o) {
1860
- const y = w.NORMAL !== void 0 ? s.getDependency("accessor", w.NORMAL) : f.attributes.normal;
1860
+ const y = _.NORMAL !== void 0 ? s.getDependency("accessor", _.NORMAL) : f.attributes.normal;
1861
1861
  h.push(y);
1862
1862
  }
1863
1863
  if (c) {
1864
- const y = w.COLOR_0 !== void 0 ? s.getDependency("accessor", w.COLOR_0) : f.attributes.color;
1864
+ const y = _.COLOR_0 !== void 0 ? s.getDependency("accessor", _.COLOR_0) : f.attributes.color;
1865
1865
  m.push(y);
1866
1866
  }
1867
1867
  }
1868
1868
  return Promise.all([Promise.all(p), Promise.all(h), Promise.all(m)]).then(function(g) {
1869
- const _ = g[0], w = g[1], y = g[2];
1870
- return r && (f.morphAttributes.position = _), o && (f.morphAttributes.normal = w), c && (f.morphAttributes.color = y), f.morphTargetsRelative = !0, f;
1869
+ const w = g[0], _ = g[1], y = g[2];
1870
+ return r && (f.morphAttributes.position = w), o && (f.morphAttributes.normal = _), c && (f.morphAttributes.color = y), f.morphTargetsRelative = !0, f;
1871
1871
  });
1872
1872
  }
1873
1873
  function Yp(f, i) {
@@ -1927,7 +1927,7 @@ class Wp {
1927
1927
  uses: {}
1928
1928
  }, this.sourceCache = {}, this.textureCache = {}, this.nodeNamesUsed = {};
1929
1929
  let r = !1, o = !1, c = -1;
1930
- typeof navigator < "u" && (r = /^((?!chrome|android).)*safari/i.test(navigator.userAgent) === !0, o = navigator.userAgent.indexOf("Firefox") > -1, c = o ? navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1] : -1), typeof createImageBitmap > "u" || r || o && c < 98 ? this.textureLoader = new Ia(this.options.manager) : this.textureLoader = new yu(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new fi(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
1930
+ typeof navigator < "u" && (r = /^((?!chrome|android).)*safari/i.test(navigator.userAgent) === !0, o = navigator.userAgent.indexOf("Firefox") > -1, c = o ? navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1] : -1), typeof createImageBitmap > "u" || r || o && c < 98 ? this.textureLoader = new Ia(this.options.manager) : this.textureLoader = new wu(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new fi(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
1931
1931
  }
1932
1932
  setExtensions(i) {
1933
1933
  this.extensions = i;
@@ -1994,8 +1994,8 @@ class Wp {
1994
1994
  const o = r.clone(), c = (p, h) => {
1995
1995
  const m = this.associations.get(p);
1996
1996
  m != null && this.associations.set(h, m);
1997
- for (const [g, _] of p.children.entries())
1998
- c(_, h.children[g]);
1997
+ for (const [g, w] of p.children.entries())
1998
+ c(w, h.children[g]);
1999
1999
  };
2000
2000
  return c(r, o), o.name += "_instance_" + i.uses[s]++, o;
2001
2001
  }
@@ -2144,12 +2144,12 @@ class Wp {
2144
2144
  }
2145
2145
  const c = [];
2146
2146
  return o.bufferView !== void 0 ? c.push(this.getDependency("bufferView", o.bufferView)) : c.push(null), o.sparse !== void 0 && (c.push(this.getDependency("bufferView", o.sparse.indices.bufferView)), c.push(this.getDependency("bufferView", o.sparse.values.bufferView))), Promise.all(c).then(function(p) {
2147
- const h = p[0], m = io[o.type], g = di[o.componentType], _ = g.BYTES_PER_ELEMENT, w = _ * m, y = o.byteOffset || 0, C = o.bufferView !== void 0 ? r.bufferViews[o.bufferView].byteStride : void 0, L = o.normalized === !0;
2147
+ const h = p[0], m = io[o.type], g = di[o.componentType], w = g.BYTES_PER_ELEMENT, _ = w * m, y = o.byteOffset || 0, C = o.bufferView !== void 0 ? r.bufferViews[o.bufferView].byteStride : void 0, L = o.normalized === !0;
2148
2148
  let S, R;
2149
- if (C && C !== w) {
2149
+ if (C && C !== _) {
2150
2150
  const O = Math.floor(y / C), N = "InterleavedBuffer:" + o.bufferView + ":" + o.componentType + ":" + O + ":" + o.count;
2151
2151
  let I = s.cache.get(N);
2152
- I || (S = new g(h, O * C, o.count * C / _), I = new xu(S, C / _), s.cache.add(N, I)), R = new Eu(I, m, y % C / _, L);
2152
+ I || (S = new g(h, O * C, o.count * C / w), I = new yu(S, C / w), s.cache.add(N, I)), R = new xu(I, m, y % C / w, L);
2153
2153
  } else
2154
2154
  h === null ? S = new g(o.count * m) : S = new g(h, y, o.count * m), R = new Zi(S, m, L);
2155
2155
  if (o.sparse !== void 0) {
@@ -2182,12 +2182,12 @@ class Wp {
2182
2182
  const o = this, c = this.json, p = c.textures[i], h = c.images[s], m = (h.uri || h.bufferView) + ":" + p.sampler;
2183
2183
  if (this.textureCache[m])
2184
2184
  return this.textureCache[m];
2185
- const g = this.loadImageSource(s, r).then(function(_) {
2186
- _.flipY = !1, _.name = p.name || h.name || "", _.name === "" && typeof h.uri == "string" && h.uri.startsWith("data:image/") === !1 && (_.name = h.uri);
2185
+ const g = this.loadImageSource(s, r).then(function(w) {
2186
+ w.flipY = !1, w.name = p.name || h.name || "", w.name === "" && typeof h.uri == "string" && h.uri.startsWith("data:image/") === !1 && (w.name = h.uri);
2187
2187
  const y = (c.samplers || {})[p.sampler] || {};
2188
- return _.magFilter = ba[y.magFilter] || Gs, _.minFilter = ba[y.minFilter] || Da, _.wrapS = ga[y.wrapS] || ts, _.wrapT = ga[y.wrapT] || ts, o.associations.set(_, {
2188
+ return w.magFilter = ba[y.magFilter] || Gs, w.minFilter = ba[y.minFilter] || Da, w.wrapS = ga[y.wrapS] || ts, w.wrapT = ga[y.wrapT] || ts, o.associations.set(w, {
2189
2189
  textures: i
2190
- }), _;
2190
+ }), w;
2191
2191
  }).catch(function() {
2192
2192
  return null;
2193
2193
  });
@@ -2196,33 +2196,33 @@ class Wp {
2196
2196
  loadImageSource(i, s) {
2197
2197
  const r = this, o = this.json, c = this.options;
2198
2198
  if (this.sourceCache[i] !== void 0)
2199
- return this.sourceCache[i].then((w) => w.clone());
2199
+ return this.sourceCache[i].then((_) => _.clone());
2200
2200
  const p = o.images[i], h = self.URL || self.webkitURL;
2201
2201
  let m = p.uri || "", g = !1;
2202
2202
  if (p.bufferView !== void 0)
2203
- m = r.getDependency("bufferView", p.bufferView).then(function(w) {
2203
+ m = r.getDependency("bufferView", p.bufferView).then(function(_) {
2204
2204
  g = !0;
2205
- const y = new Blob([w], {
2205
+ const y = new Blob([_], {
2206
2206
  type: p.mimeType
2207
2207
  });
2208
2208
  return m = h.createObjectURL(y), m;
2209
2209
  });
2210
2210
  else if (p.uri === void 0)
2211
2211
  throw new Error("THREE.GLTFLoader: Image " + i + " is missing URI and bufferView");
2212
- const _ = Promise.resolve(m).then(function(w) {
2212
+ const w = Promise.resolve(m).then(function(_) {
2213
2213
  return new Promise(function(y, C) {
2214
2214
  let L = y;
2215
2215
  s.isImageBitmapLoader === !0 && (L = function(S) {
2216
2216
  const R = new Hs(S);
2217
2217
  R.needsUpdate = !0, y(R);
2218
- }), s.load(mi.resolveURL(w, c.path), L, void 0, C);
2218
+ }), s.load(mi.resolveURL(_, c.path), L, void 0, C);
2219
2219
  });
2220
- }).then(function(w) {
2221
- return g === !0 && h.revokeObjectURL(m), w.userData.mimeType = p.mimeType || Qp(p.uri), w;
2222
- }).catch(function(w) {
2223
- throw console.error("THREE.GLTFLoader: Couldn't load texture", m), w;
2220
+ }).then(function(_) {
2221
+ return g === !0 && h.revokeObjectURL(m), _.userData.mimeType = p.mimeType || Qp(p.uri), _;
2222
+ }).catch(function(_) {
2223
+ throw console.error("THREE.GLTFLoader: Couldn't load texture", m), _;
2224
2224
  });
2225
- return this.sourceCache[i] = _, _;
2225
+ return this.sourceCache[i] = w, w;
2226
2226
  }
2227
2227
  /**
2228
2228
  * Asynchronously assigns a texture to the given material parameters.
@@ -2261,7 +2261,7 @@ class Wp {
2261
2261
  if (i.isPoints) {
2262
2262
  const h = "PointsMaterial:" + r.uuid;
2263
2263
  let m = this.cache.get(h);
2264
- m || (m = new Cu(), Wr.prototype.copy.call(m, r), m.color.copy(r.color), m.map = r.map, m.sizeAttenuation = !1, this.cache.add(h, m)), r = m;
2264
+ m || (m = new Eu(), Wr.prototype.copy.call(m, r), m.color.copy(r.color), m.map = r.map, m.sizeAttenuation = !1, this.cache.add(h, m)), r = m;
2265
2265
  } else if (i.isLine) {
2266
2266
  const h = "LineBasicMaterial:" + r.uuid;
2267
2267
  let m = this.cache.get(h);
@@ -2288,31 +2288,31 @@ class Wp {
2288
2288
  let p;
2289
2289
  const h = {}, m = c.extensions || {}, g = [];
2290
2290
  if (m[le.KHR_MATERIALS_UNLIT]) {
2291
- const w = o[le.KHR_MATERIALS_UNLIT];
2292
- p = w.getMaterialType(), g.push(w.extendParams(h, c, s));
2291
+ const _ = o[le.KHR_MATERIALS_UNLIT];
2292
+ p = _.getMaterialType(), g.push(_.extendParams(h, c, s));
2293
2293
  } else {
2294
- const w = c.pbrMetallicRoughness || {};
2295
- if (h.color = new Be(1, 1, 1), h.opacity = 1, Array.isArray(w.baseColorFactor)) {
2296
- const y = w.baseColorFactor;
2294
+ const _ = c.pbrMetallicRoughness || {};
2295
+ if (h.color = new Be(1, 1, 1), h.opacity = 1, Array.isArray(_.baseColorFactor)) {
2296
+ const y = _.baseColorFactor;
2297
2297
  h.color.fromArray(y), h.opacity = y[3];
2298
2298
  }
2299
- w.baseColorTexture !== void 0 && g.push(s.assignTexture(h, "map", w.baseColorTexture, zt)), h.metalness = w.metallicFactor !== void 0 ? w.metallicFactor : 1, h.roughness = w.roughnessFactor !== void 0 ? w.roughnessFactor : 1, w.metallicRoughnessTexture !== void 0 && (g.push(s.assignTexture(h, "metalnessMap", w.metallicRoughnessTexture)), g.push(s.assignTexture(h, "roughnessMap", w.metallicRoughnessTexture))), p = this._invokeOne(function(y) {
2299
+ _.baseColorTexture !== void 0 && g.push(s.assignTexture(h, "map", _.baseColorTexture, zt)), h.metalness = _.metallicFactor !== void 0 ? _.metallicFactor : 1, h.roughness = _.roughnessFactor !== void 0 ? _.roughnessFactor : 1, _.metallicRoughnessTexture !== void 0 && (g.push(s.assignTexture(h, "metalnessMap", _.metallicRoughnessTexture)), g.push(s.assignTexture(h, "roughnessMap", _.metallicRoughnessTexture))), p = this._invokeOne(function(y) {
2300
2300
  return y.getMaterialType && y.getMaterialType(i);
2301
2301
  }), g.push(Promise.all(this._invokeAll(function(y) {
2302
2302
  return y.extendMaterialParams && y.extendMaterialParams(i, h);
2303
2303
  })));
2304
2304
  }
2305
2305
  c.doubleSided === !0 && (h.side = Co);
2306
- const _ = c.alphaMode || so.OPAQUE;
2307
- if (_ === so.BLEND ? (h.transparent = !0, h.depthWrite = !1) : (h.transparent = !1, _ === so.MASK && (h.alphaTest = c.alphaCutoff !== void 0 ? c.alphaCutoff : 0.5)), c.normalTexture !== void 0 && p !== jn && (g.push(s.assignTexture(h, "normalMap", c.normalTexture)), h.normalScale = new ht(1, 1), c.normalTexture.scale !== void 0)) {
2308
- const w = c.normalTexture.scale;
2309
- h.normalScale.set(w, w);
2306
+ const w = c.alphaMode || so.OPAQUE;
2307
+ if (w === so.BLEND ? (h.transparent = !0, h.depthWrite = !1) : (h.transparent = !1, w === so.MASK && (h.alphaTest = c.alphaCutoff !== void 0 ? c.alphaCutoff : 0.5)), c.normalTexture !== void 0 && p !== jn && (g.push(s.assignTexture(h, "normalMap", c.normalTexture)), h.normalScale = new ht(1, 1), c.normalTexture.scale !== void 0)) {
2308
+ const _ = c.normalTexture.scale;
2309
+ h.normalScale.set(_, _);
2310
2310
  }
2311
2311
  return c.occlusionTexture !== void 0 && p !== jn && (g.push(s.assignTexture(h, "aoMap", c.occlusionTexture)), c.occlusionTexture.strength !== void 0 && (h.aoMapIntensity = c.occlusionTexture.strength)), c.emissiveFactor !== void 0 && p !== jn && (h.emissive = new Be().fromArray(c.emissiveFactor)), c.emissiveTexture !== void 0 && p !== jn && g.push(s.assignTexture(h, "emissiveMap", c.emissiveTexture, zt)), Promise.all(g).then(function() {
2312
- const w = new p(h);
2313
- return c.name && (w.name = c.name), ln(w, c), s.associations.set(w, {
2312
+ const _ = new p(h);
2313
+ return c.name && (_.name = c.name), ln(_, c), s.associations.set(_, {
2314
2314
  materials: i
2315
- }), c.extensions && qi(o, w, c), w;
2315
+ }), c.extensions && qi(o, _, c), _;
2316
2316
  });
2317
2317
  }
2318
2318
  /** When Object3D instances are targeted by animation, they need unique names. */
@@ -2340,12 +2340,12 @@ class Wp {
2340
2340
  }
2341
2341
  const p = [];
2342
2342
  for (let h = 0, m = i.length; h < m; h++) {
2343
- const g = i[h], _ = qp(g), w = o[_];
2344
- if (w)
2345
- p.push(w.promise);
2343
+ const g = i[h], w = qp(g), _ = o[w];
2344
+ if (_)
2345
+ p.push(_.promise);
2346
2346
  else {
2347
2347
  let y;
2348
- g.extensions && g.extensions[le.KHR_DRACO_MESH_COMPRESSION] ? y = c(g) : y = wa(new jt(), g, s), o[_] = {
2348
+ g.extensions && g.extensions[le.KHR_DRACO_MESH_COMPRESSION] ? y = c(g) : y = wa(new jt(), g, s), o[w] = {
2349
2349
  primitive: g,
2350
2350
  promise: y
2351
2351
  }, p.push(y);
@@ -2361,42 +2361,42 @@ class Wp {
2361
2361
  loadMesh(i) {
2362
2362
  const s = this, r = this.json, o = this.extensions, c = r.meshes[i], p = c.primitives, h = [];
2363
2363
  for (let m = 0, g = p.length; m < g; m++) {
2364
- const _ = p[m].material === void 0 ? $p(this.cache) : this.getDependency("material", p[m].material);
2365
- h.push(_);
2364
+ const w = p[m].material === void 0 ? $p(this.cache) : this.getDependency("material", p[m].material);
2365
+ h.push(w);
2366
2366
  }
2367
2367
  return h.push(s.loadGeometries(p)), Promise.all(h).then(function(m) {
2368
- const g = m.slice(0, m.length - 1), _ = m[m.length - 1], w = [];
2369
- for (let C = 0, L = _.length; C < L; C++) {
2370
- const S = _[C], R = p[C];
2368
+ const g = m.slice(0, m.length - 1), w = m[m.length - 1], _ = [];
2369
+ for (let C = 0, L = w.length; C < L; C++) {
2370
+ const S = w[C], R = p[C];
2371
2371
  let O;
2372
2372
  const N = g[C];
2373
2373
  if (R.mode === dt.TRIANGLES || R.mode === dt.TRIANGLE_STRIP || R.mode === dt.TRIANGLE_FAN || R.mode === void 0)
2374
2374
  O = c.isSkinnedMesh === !0 ? new Oa(S, N) : new Z(S, N), O.isSkinnedMesh === !0 && O.normalizeSkinWeights(), R.mode === dt.TRIANGLE_STRIP ? O.geometry = da(O.geometry, Sa) : R.mode === dt.TRIANGLE_FAN && (O.geometry = da(O.geometry, co));
2375
2375
  else if (R.mode === dt.LINES)
2376
- O = new Pu(S, N);
2376
+ O = new Cu(S, N);
2377
2377
  else if (R.mode === dt.LINE_STRIP)
2378
2378
  O = new ue(S, N);
2379
2379
  else if (R.mode === dt.LINE_LOOP)
2380
- O = new Tu(S, N);
2380
+ O = new Pu(S, N);
2381
2381
  else if (R.mode === dt.POINTS)
2382
- O = new ku(S, N);
2382
+ O = new Tu(S, N);
2383
2383
  else
2384
2384
  throw new Error("THREE.GLTFLoader: Primitive mode unsupported: " + R.mode);
2385
- Object.keys(O.geometry.morphAttributes).length > 0 && Yp(O, c), O.name = s.createUniqueName(c.name || "mesh_" + i), ln(O, c), R.extensions && qi(o, O, R), s.assignFinalMaterial(O), w.push(O);
2385
+ Object.keys(O.geometry.morphAttributes).length > 0 && Yp(O, c), O.name = s.createUniqueName(c.name || "mesh_" + i), ln(O, c), R.extensions && qi(o, O, R), s.assignFinalMaterial(O), _.push(O);
2386
2386
  }
2387
- for (let C = 0, L = w.length; C < L; C++)
2388
- s.associations.set(w[C], {
2387
+ for (let C = 0, L = _.length; C < L; C++)
2388
+ s.associations.set(_[C], {
2389
2389
  meshes: i,
2390
2390
  primitives: C
2391
2391
  });
2392
- if (w.length === 1)
2393
- return w[0];
2392
+ if (_.length === 1)
2393
+ return _[0];
2394
2394
  const y = new Wi();
2395
2395
  s.associations.set(y, {
2396
2396
  meshes: i
2397
2397
  });
2398
- for (let C = 0, L = w.length; C < L; C++)
2399
- y.add(w[C]);
2398
+ for (let C = 0, L = _.length; C < L; C++)
2399
+ y.add(_[C]);
2400
2400
  return y;
2401
2401
  });
2402
2402
  }
@@ -2425,10 +2425,10 @@ class Wp {
2425
2425
  r.push(this._loadNodeShallow(s.joints[o]));
2426
2426
  return s.inverseBindMatrices !== void 0 ? r.push(this.getDependency("accessor", s.inverseBindMatrices)) : r.push(null), Promise.all(r).then(function(o) {
2427
2427
  const c = o.pop(), p = o, h = [], m = [];
2428
- for (let g = 0, _ = p.length; g < _; g++) {
2429
- const w = p[g];
2430
- if (w) {
2431
- h.push(w);
2428
+ for (let g = 0, w = p.length; g < w; g++) {
2429
+ const _ = p[g];
2430
+ if (_) {
2431
+ h.push(_);
2432
2432
  const y = new ye();
2433
2433
  c !== null && y.fromArray(c.array, g * 16), m.push(y);
2434
2434
  } else
@@ -2444,14 +2444,14 @@ class Wp {
2444
2444
  */
2445
2445
  loadAnimation(i) {
2446
2446
  const r = this.json.animations[i], o = r.name ? r.name : "animation_" + i, c = [], p = [], h = [], m = [], g = [];
2447
- for (let _ = 0, w = r.channels.length; _ < w; _++) {
2448
- const y = r.channels[_], C = r.samplers[y.sampler], L = y.target, S = L.node, R = r.parameters !== void 0 ? r.parameters[C.input] : C.input, O = r.parameters !== void 0 ? r.parameters[C.output] : C.output;
2447
+ for (let w = 0, _ = r.channels.length; w < _; w++) {
2448
+ const y = r.channels[w], C = r.samplers[y.sampler], L = y.target, S = L.node, R = r.parameters !== void 0 ? r.parameters[C.input] : C.input, O = r.parameters !== void 0 ? r.parameters[C.output] : C.output;
2449
2449
  L.node !== void 0 && (c.push(this.getDependency("node", S)), p.push(this.getDependency("accessor", R)), h.push(this.getDependency("accessor", O)), m.push(C), g.push(L));
2450
2450
  }
2451
- return Promise.all([Promise.all(c), Promise.all(p), Promise.all(h), Promise.all(m), Promise.all(g)]).then(function(_) {
2452
- const w = _[0], y = _[1], C = _[2], L = _[3], S = _[4], R = [];
2453
- for (let O = 0, N = w.length; O < N; O++) {
2454
- const I = w[O], D = y[O], Y = C[O], G = L[O], F = S[O];
2451
+ return Promise.all([Promise.all(c), Promise.all(p), Promise.all(h), Promise.all(m), Promise.all(g)]).then(function(w) {
2452
+ const _ = w[0], y = w[1], C = w[2], L = w[3], S = w[4], R = [];
2453
+ for (let O = 0, N = _.length; O < N; O++) {
2454
+ const I = _[O], D = y[O], Y = C[O], G = L[O], F = S[O];
2455
2455
  if (I === void 0)
2456
2456
  continue;
2457
2457
  I.updateMatrix();
@@ -2483,7 +2483,7 @@ class Wp {
2483
2483
  for (let _e = 0, ce = q.length; _e < ce; _e++) {
2484
2484
  const me = new B(q[_e] + "." + sn[F.path], D.array, pe, K);
2485
2485
  G.interpolation === "CUBICSPLINE" && (me.createInterpolant = function(ee) {
2486
- const X = this instanceof fo ? Hp : Wa;
2486
+ const X = this instanceof fo ? Hp : Za;
2487
2487
  return new X(this.times, this.values, this.getValueSize() / 3, ee);
2488
2488
  }, me.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0), R.push(me);
2489
2489
  }
@@ -2509,17 +2509,17 @@ class Wp {
2509
2509
  */
2510
2510
  loadNode(i) {
2511
2511
  const s = this.json, r = this, o = s.nodes[i], c = r._loadNodeShallow(i), p = [], h = o.children || [];
2512
- for (let g = 0, _ = h.length; g < _; g++)
2512
+ for (let g = 0, w = h.length; g < w; g++)
2513
2513
  p.push(r.getDependency("node", h[g]));
2514
2514
  const m = o.skin === void 0 ? Promise.resolve(null) : r.getDependency("skin", o.skin);
2515
2515
  return Promise.all([c, Promise.all(p), m]).then(function(g) {
2516
- const _ = g[0], w = g[1], y = g[2];
2517
- y !== null && _.traverse(function(C) {
2516
+ const w = g[0], _ = g[1], y = g[2];
2517
+ y !== null && w.traverse(function(C) {
2518
2518
  C.isSkinnedMesh && C.bind(y, Zp);
2519
2519
  });
2520
- for (let C = 0, L = w.length; C < L; C++)
2521
- _.add(w[C]);
2522
- return _;
2520
+ for (let C = 0, L = _.length; C < L; C++)
2521
+ w.add(_[C]);
2522
+ return w;
2523
2523
  });
2524
2524
  }
2525
2525
  // ._loadNodeShallow() parses a single node.
@@ -2538,16 +2538,16 @@ class Wp {
2538
2538
  }).forEach(function(g) {
2539
2539
  h.push(g);
2540
2540
  }), this.nodeCache[i] = Promise.all(h).then(function(g) {
2541
- let _;
2542
- if (c.isBone === !0 ? _ = new ho() : g.length > 1 ? _ = new Wi() : g.length === 1 ? _ = g[0] : _ = new un(), _ !== g[0])
2543
- for (let w = 0, y = g.length; w < y; w++)
2544
- _.add(g[w]);
2545
- if (c.name && (_.userData.name = c.name, _.name = p), ln(_, c), c.extensions && qi(r, _, c), c.matrix !== void 0) {
2546
- const w = new ye();
2547
- w.fromArray(c.matrix), _.applyMatrix4(w);
2541
+ let w;
2542
+ if (c.isBone === !0 ? w = new ho() : g.length > 1 ? w = new Wi() : g.length === 1 ? w = g[0] : w = new un(), w !== g[0])
2543
+ for (let _ = 0, y = g.length; _ < y; _++)
2544
+ w.add(g[_]);
2545
+ if (c.name && (w.userData.name = c.name, w.name = p), ln(w, c), c.extensions && qi(r, w, c), c.matrix !== void 0) {
2546
+ const _ = new ye();
2547
+ _.fromArray(c.matrix), w.applyMatrix4(_);
2548
2548
  } else
2549
- c.translation !== void 0 && _.position.fromArray(c.translation), c.rotation !== void 0 && _.quaternion.fromArray(c.rotation), c.scale !== void 0 && _.scale.fromArray(c.scale);
2550
- return o.associations.has(_) || o.associations.set(_, {}), o.associations.get(_).nodes = i, _;
2549
+ c.translation !== void 0 && w.position.fromArray(c.translation), c.rotation !== void 0 && w.quaternion.fromArray(c.rotation), c.scale !== void 0 && w.scale.fromArray(c.scale);
2550
+ return o.associations.has(w) || o.associations.set(w, {}), o.associations.get(w).nodes = i, w;
2551
2551
  }), this.nodeCache[i];
2552
2552
  }
2553
2553
  /**
@@ -2562,29 +2562,29 @@ class Wp {
2562
2562
  for (let m = 0, g = p.length; m < g; m++)
2563
2563
  h.push(o.getDependency("node", p[m]));
2564
2564
  return Promise.all(h).then(function(m) {
2565
- for (let _ = 0, w = m.length; _ < w; _++)
2566
- c.add(m[_]);
2567
- const g = (_) => {
2568
- const w = /* @__PURE__ */ new Map();
2565
+ for (let w = 0, _ = m.length; w < _; w++)
2566
+ c.add(m[w]);
2567
+ const g = (w) => {
2568
+ const _ = /* @__PURE__ */ new Map();
2569
2569
  for (const [y, C] of o.associations)
2570
- (y instanceof Wr || y instanceof Hs) && w.set(y, C);
2571
- return _.traverse((y) => {
2570
+ (y instanceof Wr || y instanceof Hs) && _.set(y, C);
2571
+ return w.traverse((y) => {
2572
2572
  const C = o.associations.get(y);
2573
- C != null && w.set(y, C);
2574
- }), w;
2573
+ C != null && _.set(y, C);
2574
+ }), _;
2575
2575
  };
2576
2576
  return o.associations = g(c), c;
2577
2577
  });
2578
2578
  }
2579
2579
  }
2580
2580
  function Jp(f, i, s) {
2581
- const r = i.attributes, o = new Du();
2581
+ const r = i.attributes, o = new Iu();
2582
2582
  if (r.POSITION !== void 0) {
2583
2583
  const h = s.json.accessors[r.POSITION], m = h.min, g = h.max;
2584
2584
  if (m !== void 0 && g !== void 0) {
2585
2585
  if (o.set(new $(m[0], m[1], m[2]), new $(g[0], g[1], g[2])), h.normalized) {
2586
- const _ = _o(di[h.componentType]);
2587
- o.min.multiplyScalar(_), o.max.multiplyScalar(_);
2586
+ const w = _o(di[h.componentType]);
2587
+ o.min.multiplyScalar(w), o.max.multiplyScalar(w);
2588
2588
  }
2589
2589
  } else {
2590
2590
  console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");
@@ -2595,10 +2595,10 @@ function Jp(f, i, s) {
2595
2595
  const c = i.targets;
2596
2596
  if (c !== void 0) {
2597
2597
  const h = new $(), m = new $();
2598
- for (let g = 0, _ = c.length; g < _; g++) {
2599
- const w = c[g];
2600
- if (w.POSITION !== void 0) {
2601
- const y = s.json.accessors[w.POSITION], C = y.min, L = y.max;
2598
+ for (let g = 0, w = c.length; g < w; g++) {
2599
+ const _ = c[g];
2600
+ if (_.POSITION !== void 0) {
2601
+ const y = s.json.accessors[_.POSITION], C = y.min, L = y.max;
2602
2602
  if (C !== void 0 && L !== void 0) {
2603
2603
  if (m.setX(Math.max(Math.abs(C[0]), Math.abs(L[0]))), m.setY(Math.max(Math.abs(C[1]), Math.abs(L[1]))), m.setZ(Math.max(Math.abs(C[2]), Math.abs(L[2]))), y.normalized) {
2604
2604
  const S = _o(di[y.componentType]);
@@ -2612,7 +2612,7 @@ function Jp(f, i, s) {
2612
2612
  o.expandByVector(h);
2613
2613
  }
2614
2614
  f.boundingBox = o;
2615
- const p = new Ou();
2615
+ const p = new Du();
2616
2616
  o.getCenter(p.center), p.radius = o.min.distanceTo(o.max) / 2, f.boundingSphere = p;
2617
2617
  }
2618
2618
  function wa(f, i, s) {
@@ -2636,7 +2636,7 @@ function wa(f, i, s) {
2636
2636
  return i.targets !== void 0 ? Xp(f, i.targets, s) : f;
2637
2637
  });
2638
2638
  }
2639
- class ya extends Bu {
2639
+ class ya extends Nu {
2640
2640
  constructor(i, s = {}) {
2641
2641
  const {
2642
2642
  bevelEnabled: r = !1,
@@ -2646,18 +2646,18 @@ class ya extends Bu {
2646
2646
  height: h = 50,
2647
2647
  size: m = 100,
2648
2648
  lineHeight: g = 1,
2649
- letterSpacing: _ = 0,
2650
- ...w
2649
+ letterSpacing: w = 0,
2650
+ ..._
2651
2651
  } = s;
2652
2652
  if (p === void 0)
2653
2653
  super();
2654
2654
  else {
2655
2655
  const y = p.generateShapes(i, m, {
2656
2656
  lineHeight: g,
2657
- letterSpacing: _
2657
+ letterSpacing: w
2658
2658
  });
2659
2659
  super(y, {
2660
- ...w,
2660
+ ..._,
2661
2661
  bevelEnabled: r,
2662
2662
  bevelSize: o,
2663
2663
  bevelThickness: c,
@@ -2667,7 +2667,7 @@ class ya extends Bu {
2667
2667
  this.type = "TextGeometry";
2668
2668
  }
2669
2669
  }
2670
- function Ja(f, i, s) {
2670
+ function Wa(f, i, s) {
2671
2671
  const r = s.length - f - 1;
2672
2672
  if (i >= s[r])
2673
2673
  return r - 1;
@@ -2685,18 +2685,18 @@ function eh(f, i, s, r) {
2685
2685
  c[h] = i - r[f + 1 - h], p[h] = r[f + h] - i;
2686
2686
  let m = 0;
2687
2687
  for (let g = 0; g < h; ++g) {
2688
- const _ = p[g + 1], w = c[h - g], y = o[g] / (_ + w);
2689
- o[g] = m + _ * y, m = w * y;
2688
+ const w = p[g + 1], _ = c[h - g], y = o[g] / (w + _);
2689
+ o[g] = m + w * y, m = _ * y;
2690
2690
  }
2691
2691
  o[h] = m;
2692
2692
  }
2693
2693
  return o;
2694
2694
  }
2695
2695
  function th(f, i, s, r) {
2696
- const o = Ja(f, r, i), c = eh(o, r, f, i), p = new Xs(0, 0, 0, 0);
2696
+ const o = Wa(f, r, i), c = eh(o, r, f, i), p = new Xs(0, 0, 0, 0);
2697
2697
  for (let h = 0; h <= f; ++h) {
2698
- const m = s[o - f + h], g = c[h], _ = m.w * g;
2699
- p.x += m.x * _, p.y += m.y * _, p.z += m.z * _, p.w += m.w * g;
2698
+ const m = s[o - f + h], g = c[h], w = m.w * g;
2699
+ p.x += m.x * w, p.y += m.y * w, p.z += m.z * w, p.w += m.w * g;
2700
2700
  }
2701
2701
  return p;
2702
2702
  }
@@ -2739,33 +2739,33 @@ function nh(f, i, s, r, o) {
2739
2739
  for (let G = D; G <= Y; ++G)
2740
2740
  S[L][G] = (S[C][G] - S[C][G - 1]) / h[I + 1][N + G], O += S[L][G] * h[N + G][I];
2741
2741
  y <= I && (S[L][R] = -S[C][R - 1] / h[I + 1][y], O += S[L][R] * h[y][I]), p[R][y] = O;
2742
- var _ = C;
2743
- C = L, L = _;
2742
+ var w = C;
2743
+ C = L, L = w;
2744
2744
  }
2745
2745
  }
2746
- var w = s;
2746
+ var _ = s;
2747
2747
  for (let y = 1; y <= r; ++y) {
2748
2748
  for (let C = 0; C <= s; ++C)
2749
- p[y][C] *= w;
2750
- w *= s - y;
2749
+ p[y][C] *= _;
2750
+ _ *= s - y;
2751
2751
  }
2752
2752
  return p;
2753
2753
  }
2754
2754
  function ih(f, i, s, r, o) {
2755
- const c = o < f ? o : f, p = [], h = Ja(f, r, i), m = nh(h, r, f, c, i), g = [];
2756
- for (let w = 0; w < s.length; ++w) {
2757
- var _ = s[w].clone();
2758
- const y = _.w;
2759
- _.x *= y, _.y *= y, _.z *= y, g[w] = _;
2760
- }
2761
- for (let w = 0; w <= c; ++w) {
2762
- var _ = g[h - f].clone().multiplyScalar(m[w][0]);
2755
+ const c = o < f ? o : f, p = [], h = Wa(f, r, i), m = nh(h, r, f, c, i), g = [];
2756
+ for (let _ = 0; _ < s.length; ++_) {
2757
+ var w = s[_].clone();
2758
+ const y = w.w;
2759
+ w.x *= y, w.y *= y, w.z *= y, g[_] = w;
2760
+ }
2761
+ for (let _ = 0; _ <= c; ++_) {
2762
+ var w = g[h - f].clone().multiplyScalar(m[_][0]);
2763
2763
  for (let C = 1; C <= f; ++C)
2764
- _.add(g[h - f + C].clone().multiplyScalar(m[w][C]));
2765
- p[w] = _;
2764
+ w.add(g[h - f + C].clone().multiplyScalar(m[_][C]));
2765
+ p[_] = w;
2766
2766
  }
2767
- for (let w = c + 1; w <= o + 1; ++w)
2768
- p[w] = new Xs(0, 0, 0);
2767
+ for (let _ = c + 1; _ <= o + 1; ++_)
2768
+ p[_] = new Xs(0, 0, 0);
2769
2769
  return p;
2770
2770
  }
2771
2771
  function sh(f, i) {
@@ -2798,7 +2798,7 @@ function oh(f, i, s, r, o) {
2798
2798
  const c = ih(f, i, s, r, o);
2799
2799
  return rh(c);
2800
2800
  }
2801
- class xa extends Fu {
2801
+ class xa extends Bu {
2802
2802
  constructor(i, s, r, o, c) {
2803
2803
  super(), this.degree = i, this.knots = s, this.controlPoints = [], this.startKnot = o || 0, this.endKnot = c || this.knots.length - 1;
2804
2804
  for (let p = 0; p < r.length; ++p) {
@@ -2834,7 +2834,7 @@ class ah extends $s {
2834
2834
  if (dh(i))
2835
2835
  se = new hh().parse(i);
2836
2836
  else {
2837
- const o = il(i);
2837
+ const o = nl(i);
2838
2838
  if (!mh(o))
2839
2839
  throw new Error("THREE.FBXLoader: Unknown format.");
2840
2840
  if (Ca(o) < 7e3)
@@ -3003,7 +3003,7 @@ class lh {
3003
3003
  h = new Jr();
3004
3004
  break;
3005
3005
  case "lambert":
3006
- h = new ju();
3006
+ h = new Fu();
3007
3007
  break;
3008
3008
  default:
3009
3009
  console.warn('THREE.FBXLoader: unknown material type "%s". Defaulting to MeshPhongMaterial.', c), h = new Jr();
@@ -3136,14 +3136,14 @@ class lh {
3136
3136
  const o = this.parseModels(i.skeletons, s, r), c = se.Objects.Model, p = this;
3137
3137
  o.forEach(function(m) {
3138
3138
  const g = c[m.ID];
3139
- p.setLookAtProperties(m, g), Ve.get(m.ID).parents.forEach(function(w) {
3140
- const y = o.get(w.ID);
3139
+ p.setLookAtProperties(m, g), Ve.get(m.ID).parents.forEach(function(_) {
3140
+ const y = o.get(_.ID);
3141
3141
  y !== void 0 && y.add(m);
3142
3142
  }), m.parent === null && nt.add(m);
3143
3143
  }), this.bindSkeleton(i.skeletons, s, o), this.createAmbientLight(), nt.traverse(function(m) {
3144
3144
  if (m.userData.transformData) {
3145
3145
  m.parent && (m.userData.transformData.parentMatrix = m.parent.matrix, m.userData.transformData.parentMatrixWorld = m.parent.matrixWorld);
3146
- const g = tl(m.userData.transformData);
3146
+ const g = el(m.userData.transformData);
3147
3147
  m.applyMatrix4(g), m.updateWorldMatrix();
3148
3148
  }
3149
3149
  });
@@ -3155,33 +3155,33 @@ class lh {
3155
3155
  const o = /* @__PURE__ */ new Map(), c = se.Objects.Model;
3156
3156
  for (const p in c) {
3157
3157
  const h = parseInt(p), m = c[p], g = Ve.get(h);
3158
- let _ = this.buildSkeleton(g, i, h, m.attrName);
3159
- if (!_) {
3158
+ let w = this.buildSkeleton(g, i, h, m.attrName);
3159
+ if (!w) {
3160
3160
  switch (m.attrType) {
3161
3161
  case "Camera":
3162
- _ = this.createCamera(g);
3162
+ w = this.createCamera(g);
3163
3163
  break;
3164
3164
  case "Light":
3165
- _ = this.createLight(g);
3165
+ w = this.createLight(g);
3166
3166
  break;
3167
3167
  case "Mesh":
3168
- _ = this.createMesh(g, s, r);
3168
+ w = this.createMesh(g, s, r);
3169
3169
  break;
3170
3170
  case "NurbsCurve":
3171
- _ = this.createCurve(g, s);
3171
+ w = this.createCurve(g, s);
3172
3172
  break;
3173
3173
  case "LimbNode":
3174
3174
  case "Root":
3175
- _ = new ho();
3175
+ w = new ho();
3176
3176
  break;
3177
3177
  case "Null":
3178
3178
  default:
3179
- _ = new Wi();
3179
+ w = new Wi();
3180
3180
  break;
3181
3181
  }
3182
- _.name = m.attrName ? ns.sanitizeNodeName(m.attrName) : "", _.ID = h;
3182
+ w.name = m.attrName ? ns.sanitizeNodeName(m.attrName) : "", w.ID = h;
3183
3183
  }
3184
- this.getTransformData(_, m), o.set(h, _);
3184
+ this.getTransformData(w, m), o.set(h, w);
3185
3185
  }
3186
3186
  return o;
3187
3187
  }
@@ -3190,10 +3190,10 @@ class lh {
3190
3190
  return i.parents.forEach(function(p) {
3191
3191
  for (const h in s) {
3192
3192
  const m = s[h];
3193
- m.rawBones.forEach(function(g, _) {
3193
+ m.rawBones.forEach(function(g, w) {
3194
3194
  if (g.ID === p.ID) {
3195
- const w = c;
3196
- c = new ho(), c.matrixWorld.copy(g.transformLink), c.name = o ? ns.sanitizeNodeName(o) : "", c.ID = r, m.bones[_] = c, w !== null && c.add(w);
3195
+ const _ = c;
3196
+ c = new ho(), c.matrixWorld.copy(g.transformLink), c.name = o ? ns.sanitizeNodeName(o) : "", c.ID = r, m.bones[w] = c, _ !== null && c.add(_);
3197
3197
  }
3198
3198
  });
3199
3199
  }
@@ -3217,12 +3217,12 @@ class lh {
3217
3217
  let h = window.innerWidth, m = window.innerHeight;
3218
3218
  r.AspectWidth !== void 0 && r.AspectHeight !== void 0 && (h = r.AspectWidth.value, m = r.AspectHeight.value);
3219
3219
  const g = h / m;
3220
- let _ = 45;
3221
- r.FieldOfView !== void 0 && (_ = r.FieldOfView.value);
3222
- const w = r.FocalLength ? r.FocalLength.value : null;
3220
+ let w = 45;
3221
+ r.FieldOfView !== void 0 && (w = r.FieldOfView.value);
3222
+ const _ = r.FocalLength ? r.FocalLength.value : null;
3223
3223
  switch (o) {
3224
3224
  case 0:
3225
- s = new an(_, g, c, p), w !== null && s.setFocalLength(w);
3225
+ s = new an(w, g, c, p), _ !== null && s.setFocalLength(_);
3226
3226
  break;
3227
3227
  case 1:
3228
3228
  s = new Qi(-h / 2, h / 2, m / 2, -m / 2, c, p);
@@ -3262,8 +3262,8 @@ class lh {
3262
3262
  case 2:
3263
3263
  let g = Math.PI / 3;
3264
3264
  r.InnerAngle !== void 0 && (g = mt.degToRad(r.InnerAngle.value));
3265
- let _ = 0;
3266
- r.OuterAngle !== void 0 && (_ = mt.degToRad(r.OuterAngle.value), _ = Math.max(_, 1)), s = new Ra(c, p, h, g, _, m);
3265
+ let w = 0;
3266
+ r.OuterAngle !== void 0 && (w = mt.degToRad(r.OuterAngle.value), w = Math.max(w, 1)), s = new Ra(c, p, h, g, w, m);
3267
3267
  break;
3268
3268
  default:
3269
3269
  console.warn("THREE.FBXLoader: Unknown light type " + r.LightType.value + ", defaulting to a PointLight."), s = new po(c, p);
@@ -3296,7 +3296,7 @@ class lh {
3296
3296
  // parse the model node for transform data
3297
3297
  getTransformData(i, s) {
3298
3298
  const r = {};
3299
- "InheritType" in s && (r.inheritType = parseInt(s.InheritType.value)), "RotationOrder" in s ? r.eulerOrder = nl(s.RotationOrder.value) : r.eulerOrder = "ZYX", "Lcl_Translation" in s && (r.translation = s.Lcl_Translation.value), "PreRotation" in s && (r.preRotation = s.PreRotation.value), "Lcl_Rotation" in s && (r.rotation = s.Lcl_Rotation.value), "PostRotation" in s && (r.postRotation = s.PostRotation.value), "Lcl_Scaling" in s && (r.scale = s.Lcl_Scaling.value), "ScalingOffset" in s && (r.scalingOffset = s.ScalingOffset.value), "ScalingPivot" in s && (r.scalingPivot = s.ScalingPivot.value), "RotationOffset" in s && (r.rotationOffset = s.RotationOffset.value), "RotationPivot" in s && (r.rotationPivot = s.RotationPivot.value), i.userData.transformData = r;
3299
+ "InheritType" in s && (r.inheritType = parseInt(s.InheritType.value)), "RotationOrder" in s ? r.eulerOrder = tl(s.RotationOrder.value) : r.eulerOrder = "ZYX", "Lcl_Translation" in s && (r.translation = s.Lcl_Translation.value), "PreRotation" in s && (r.preRotation = s.PreRotation.value), "Lcl_Rotation" in s && (r.rotation = s.Lcl_Rotation.value), "PostRotation" in s && (r.postRotation = s.PostRotation.value), "Lcl_Scaling" in s && (r.scale = s.Lcl_Scaling.value), "ScalingOffset" in s && (r.scalingOffset = s.ScalingOffset.value), "ScalingPivot" in s && (r.scalingPivot = s.ScalingPivot.value), "RotationOffset" in s && (r.rotationOffset = s.RotationOffset.value), "RotationPivot" in s && (r.rotationPivot = s.RotationPivot.value), i.userData.transformData = r;
3300
3300
  }
3301
3301
  setLookAtProperties(i, s) {
3302
3302
  "LookAtProperty" in s && Ve.get(i.ID).children.forEach(function(o) {
@@ -3316,8 +3316,8 @@ class lh {
3316
3316
  Ve.get(parseInt(p.ID)).parents.forEach(function(m) {
3317
3317
  if (s.has(m.ID)) {
3318
3318
  const g = m.ID;
3319
- Ve.get(g).parents.forEach(function(w) {
3320
- r.has(w.ID) && r.get(w.ID).bind(new Na(p.bones), o[w.ID]);
3319
+ Ve.get(g).parents.forEach(function(_) {
3320
+ r.has(_.ID) && r.get(_.ID).bind(new Na(p.bones), o[_.ID]);
3321
3321
  });
3322
3322
  }
3323
3323
  });
@@ -3343,7 +3343,7 @@ class lh {
3343
3343
  const i = se.GlobalSettings.AmbientColor.value, s = i[0], r = i[1], o = i[2];
3344
3344
  if (s !== 0 || r !== 0 || o !== 0) {
3345
3345
  const c = new Be(s, r, o);
3346
- nt.add(new zu(c, 1));
3346
+ nt.add(new ju(c, 1));
3347
3347
  }
3348
3348
  }
3349
3349
  }
@@ -3372,40 +3372,40 @@ class ch {
3372
3372
  }
3373
3373
  // Parse single node mesh geometry in FBXTree.Objects.Geometry
3374
3374
  parseMeshGeometry(i, s, r) {
3375
- const o = r.skeletons, c = [], p = i.parents.map(function(w) {
3376
- return se.Objects.Model[w.ID];
3375
+ const o = r.skeletons, c = [], p = i.parents.map(function(_) {
3376
+ return se.Objects.Model[_.ID];
3377
3377
  });
3378
3378
  if (p.length === 0)
3379
3379
  return;
3380
- const h = i.children.reduce(function(w, y) {
3381
- return o[y.ID] !== void 0 && (w = o[y.ID]), w;
3380
+ const h = i.children.reduce(function(_, y) {
3381
+ return o[y.ID] !== void 0 && (_ = o[y.ID]), _;
3382
3382
  }, null);
3383
- i.children.forEach(function(w) {
3384
- r.morphTargets[w.ID] !== void 0 && c.push(r.morphTargets[w.ID]);
3383
+ i.children.forEach(function(_) {
3384
+ r.morphTargets[_.ID] !== void 0 && c.push(r.morphTargets[_.ID]);
3385
3385
  });
3386
3386
  const m = p[0], g = {};
3387
- "RotationOrder" in m && (g.eulerOrder = nl(m.RotationOrder.value)), "InheritType" in m && (g.inheritType = parseInt(m.InheritType.value)), "GeometricTranslation" in m && (g.translation = m.GeometricTranslation.value), "GeometricRotation" in m && (g.rotation = m.GeometricRotation.value), "GeometricScaling" in m && (g.scale = m.GeometricScaling.value);
3388
- const _ = tl(g);
3389
- return this.genGeometry(s, h, c, _);
3387
+ "RotationOrder" in m && (g.eulerOrder = tl(m.RotationOrder.value)), "InheritType" in m && (g.inheritType = parseInt(m.InheritType.value)), "GeometricTranslation" in m && (g.translation = m.GeometricTranslation.value), "GeometricRotation" in m && (g.rotation = m.GeometricRotation.value), "GeometricScaling" in m && (g.scale = m.GeometricScaling.value);
3388
+ const w = el(g);
3389
+ return this.genGeometry(s, h, c, w);
3390
3390
  }
3391
3391
  // Generate a BufferGeometry from a node in FBXTree.Objects.Geometry
3392
3392
  genGeometry(i, s, r, o) {
3393
3393
  const c = new jt();
3394
3394
  i.attrName && (c.name = i.attrName);
3395
3395
  const p = this.parseGeoNode(i, s), h = this.genBuffers(p), m = new Ft(h.vertex, 3);
3396
- if (m.applyMatrix4(o), c.setAttribute("position", m), h.colors.length > 0 && c.setAttribute("color", new Ft(h.colors, 3)), s && (c.setAttribute("skinIndex", new Uu(h.weightsIndices, 4)), c.setAttribute("skinWeight", new Ft(h.vertexWeights, 4)), c.FBX_Deformer = s), h.normal.length > 0) {
3397
- const g = new Gu().getNormalMatrix(o), _ = new Ft(h.normal, 3);
3398
- _.applyNormalMatrix(g), c.setAttribute("normal", _);
3396
+ if (m.applyMatrix4(o), c.setAttribute("position", m), h.colors.length > 0 && c.setAttribute("color", new Ft(h.colors, 3)), s && (c.setAttribute("skinIndex", new zu(h.weightsIndices, 4)), c.setAttribute("skinWeight", new Ft(h.vertexWeights, 4)), c.FBX_Deformer = s), h.normal.length > 0) {
3397
+ const g = new Uu().getNormalMatrix(o), w = new Ft(h.normal, 3);
3398
+ w.applyNormalMatrix(g), c.setAttribute("normal", w);
3399
3399
  }
3400
- if (h.uvs.forEach(function(g, _) {
3401
- let w = "uv" + (_ + 1).toString();
3402
- _ === 0 && (w = "uv"), c.setAttribute(w, new Ft(h.uvs[_], 2));
3400
+ if (h.uvs.forEach(function(g, w) {
3401
+ let _ = "uv" + (w + 1).toString();
3402
+ w === 0 && (_ = "uv"), c.setAttribute(_, new Ft(h.uvs[w], 2));
3403
3403
  }), p.material && p.material.mappingType !== "AllSame") {
3404
- let g = h.materialIndex[0], _ = 0;
3405
- if (h.materialIndex.forEach(function(w, y) {
3406
- w !== g && (c.addGroup(_, y - _, g), g = w, _ = y);
3404
+ let g = h.materialIndex[0], w = 0;
3405
+ if (h.materialIndex.forEach(function(_, y) {
3406
+ _ !== g && (c.addGroup(w, y - w, g), g = _, w = y);
3407
3407
  }), c.groups.length > 0) {
3408
- const w = c.groups[c.groups.length - 1], y = w.start + w.count;
3408
+ const _ = c.groups[c.groups.length - 1], y = _.start + _.count;
3409
3409
  y !== h.materialIndex.length && c.addGroup(y, h.materialIndex.length - y, g);
3410
3410
  }
3411
3411
  c.groups.length === 0 && c.addGroup(0, h.materialIndex.length, h.materialIndex[0]);
@@ -3439,7 +3439,7 @@ class ch {
3439
3439
  vertexWeights: [],
3440
3440
  weightsIndices: []
3441
3441
  };
3442
- let r = 0, o = 0, c = !1, p = [], h = [], m = [], g = [], _ = [], w = [];
3442
+ let r = 0, o = 0, c = !1, p = [], h = [], m = [], g = [], w = [], _ = [];
3443
3443
  const y = this;
3444
3444
  return i.vertexIndices.forEach(function(C, L) {
3445
3445
  let S, R = !1;
@@ -3469,7 +3469,7 @@ class ch {
3469
3469
  for (; N.length < 4; )
3470
3470
  N.push(0), O.push(0);
3471
3471
  for (let I = 0; I < 4; ++I)
3472
- _.push(N[I]), w.push(O[I]);
3472
+ w.push(N[I]), _.push(O[I]);
3473
3473
  }
3474
3474
  if (i.normal) {
3475
3475
  const I = js(L, r, C, i.normal);
@@ -3478,14 +3478,14 @@ class ch {
3478
3478
  i.material && i.material.mappingType !== "AllSame" && (S = js(L, r, C, i.material)[0]), i.uv && i.uv.forEach(function(I, D) {
3479
3479
  const Y = js(L, r, C, I);
3480
3480
  g[D] === void 0 && (g[D] = []), g[D].push(Y[0]), g[D].push(Y[1]);
3481
- }), o++, R && (y.genFace(s, i, p, S, h, m, g, _, w, o), r++, o = 0, p = [], h = [], m = [], g = [], _ = [], w = []);
3481
+ }), o++, R && (y.genFace(s, i, p, S, h, m, g, w, _, o), r++, o = 0, p = [], h = [], m = [], g = [], w = [], _ = []);
3482
3482
  }), s;
3483
3483
  }
3484
3484
  // Generate data for a single face in a geometry. If the face is a quad then split it into 2 tris
3485
- genFace(i, s, r, o, c, p, h, m, g, _) {
3486
- for (let w = 2; w < _; w++)
3487
- i.vertex.push(s.vertexPositions[r[0]]), i.vertex.push(s.vertexPositions[r[1]]), i.vertex.push(s.vertexPositions[r[2]]), i.vertex.push(s.vertexPositions[r[(w - 1) * 3]]), i.vertex.push(s.vertexPositions[r[(w - 1) * 3 + 1]]), i.vertex.push(s.vertexPositions[r[(w - 1) * 3 + 2]]), i.vertex.push(s.vertexPositions[r[w * 3]]), i.vertex.push(s.vertexPositions[r[w * 3 + 1]]), i.vertex.push(s.vertexPositions[r[w * 3 + 2]]), s.skeleton && (i.vertexWeights.push(m[0]), i.vertexWeights.push(m[1]), i.vertexWeights.push(m[2]), i.vertexWeights.push(m[3]), i.vertexWeights.push(m[(w - 1) * 4]), i.vertexWeights.push(m[(w - 1) * 4 + 1]), i.vertexWeights.push(m[(w - 1) * 4 + 2]), i.vertexWeights.push(m[(w - 1) * 4 + 3]), i.vertexWeights.push(m[w * 4]), i.vertexWeights.push(m[w * 4 + 1]), i.vertexWeights.push(m[w * 4 + 2]), i.vertexWeights.push(m[w * 4 + 3]), i.weightsIndices.push(g[0]), i.weightsIndices.push(g[1]), i.weightsIndices.push(g[2]), i.weightsIndices.push(g[3]), i.weightsIndices.push(g[(w - 1) * 4]), i.weightsIndices.push(g[(w - 1) * 4 + 1]), i.weightsIndices.push(g[(w - 1) * 4 + 2]), i.weightsIndices.push(g[(w - 1) * 4 + 3]), i.weightsIndices.push(g[w * 4]), i.weightsIndices.push(g[w * 4 + 1]), i.weightsIndices.push(g[w * 4 + 2]), i.weightsIndices.push(g[w * 4 + 3])), s.color && (i.colors.push(p[0]), i.colors.push(p[1]), i.colors.push(p[2]), i.colors.push(p[(w - 1) * 3]), i.colors.push(p[(w - 1) * 3 + 1]), i.colors.push(p[(w - 1) * 3 + 2]), i.colors.push(p[w * 3]), i.colors.push(p[w * 3 + 1]), i.colors.push(p[w * 3 + 2])), s.material && s.material.mappingType !== "AllSame" && (i.materialIndex.push(o), i.materialIndex.push(o), i.materialIndex.push(o)), s.normal && (i.normal.push(c[0]), i.normal.push(c[1]), i.normal.push(c[2]), i.normal.push(c[(w - 1) * 3]), i.normal.push(c[(w - 1) * 3 + 1]), i.normal.push(c[(w - 1) * 3 + 2]), i.normal.push(c[w * 3]), i.normal.push(c[w * 3 + 1]), i.normal.push(c[w * 3 + 2])), s.uv && s.uv.forEach(function(y, C) {
3488
- i.uvs[C] === void 0 && (i.uvs[C] = []), i.uvs[C].push(h[C][0]), i.uvs[C].push(h[C][1]), i.uvs[C].push(h[C][(w - 1) * 2]), i.uvs[C].push(h[C][(w - 1) * 2 + 1]), i.uvs[C].push(h[C][w * 2]), i.uvs[C].push(h[C][w * 2 + 1]);
3485
+ genFace(i, s, r, o, c, p, h, m, g, w) {
3486
+ for (let _ = 2; _ < w; _++)
3487
+ i.vertex.push(s.vertexPositions[r[0]]), i.vertex.push(s.vertexPositions[r[1]]), i.vertex.push(s.vertexPositions[r[2]]), i.vertex.push(s.vertexPositions[r[(_ - 1) * 3]]), i.vertex.push(s.vertexPositions[r[(_ - 1) * 3 + 1]]), i.vertex.push(s.vertexPositions[r[(_ - 1) * 3 + 2]]), i.vertex.push(s.vertexPositions[r[_ * 3]]), i.vertex.push(s.vertexPositions[r[_ * 3 + 1]]), i.vertex.push(s.vertexPositions[r[_ * 3 + 2]]), s.skeleton && (i.vertexWeights.push(m[0]), i.vertexWeights.push(m[1]), i.vertexWeights.push(m[2]), i.vertexWeights.push(m[3]), i.vertexWeights.push(m[(_ - 1) * 4]), i.vertexWeights.push(m[(_ - 1) * 4 + 1]), i.vertexWeights.push(m[(_ - 1) * 4 + 2]), i.vertexWeights.push(m[(_ - 1) * 4 + 3]), i.vertexWeights.push(m[_ * 4]), i.vertexWeights.push(m[_ * 4 + 1]), i.vertexWeights.push(m[_ * 4 + 2]), i.vertexWeights.push(m[_ * 4 + 3]), i.weightsIndices.push(g[0]), i.weightsIndices.push(g[1]), i.weightsIndices.push(g[2]), i.weightsIndices.push(g[3]), i.weightsIndices.push(g[(_ - 1) * 4]), i.weightsIndices.push(g[(_ - 1) * 4 + 1]), i.weightsIndices.push(g[(_ - 1) * 4 + 2]), i.weightsIndices.push(g[(_ - 1) * 4 + 3]), i.weightsIndices.push(g[_ * 4]), i.weightsIndices.push(g[_ * 4 + 1]), i.weightsIndices.push(g[_ * 4 + 2]), i.weightsIndices.push(g[_ * 4 + 3])), s.color && (i.colors.push(p[0]), i.colors.push(p[1]), i.colors.push(p[2]), i.colors.push(p[(_ - 1) * 3]), i.colors.push(p[(_ - 1) * 3 + 1]), i.colors.push(p[(_ - 1) * 3 + 2]), i.colors.push(p[_ * 3]), i.colors.push(p[_ * 3 + 1]), i.colors.push(p[_ * 3 + 2])), s.material && s.material.mappingType !== "AllSame" && (i.materialIndex.push(o), i.materialIndex.push(o), i.materialIndex.push(o)), s.normal && (i.normal.push(c[0]), i.normal.push(c[1]), i.normal.push(c[2]), i.normal.push(c[(_ - 1) * 3]), i.normal.push(c[(_ - 1) * 3 + 1]), i.normal.push(c[(_ - 1) * 3 + 2]), i.normal.push(c[_ * 3]), i.normal.push(c[_ * 3 + 1]), i.normal.push(c[_ * 3 + 2])), s.uv && s.uv.forEach(function(y, C) {
3488
+ i.uvs[C] === void 0 && (i.uvs[C] = []), i.uvs[C].push(h[C][0]), i.uvs[C].push(h[C][1]), i.uvs[C].push(h[C][(_ - 1) * 2]), i.uvs[C].push(h[C][(_ - 1) * 2 + 1]), i.uvs[C].push(h[C][_ * 2]), i.uvs[C].push(h[C][_ * 2 + 1]);
3489
3489
  });
3490
3490
  }
3491
3491
  addMorphTargets(i, s, r, o) {
@@ -3505,15 +3505,15 @@ class ch {
3505
3505
  // and a special attribute Index defining which vertices of the original geometry are affected
3506
3506
  // Normal and position attributes only have data for the vertices that are affected by the morph
3507
3507
  genMorphGeometry(i, s, r, o, c) {
3508
- const p = s.PolygonVertexIndex !== void 0 ? s.PolygonVertexIndex.a : [], h = r.Vertices !== void 0 ? r.Vertices.a : [], m = r.Indexes !== void 0 ? r.Indexes.a : [], g = i.attributes.position.count * 3, _ = new Float32Array(g);
3508
+ const p = s.PolygonVertexIndex !== void 0 ? s.PolygonVertexIndex.a : [], h = r.Vertices !== void 0 ? r.Vertices.a : [], m = r.Indexes !== void 0 ? r.Indexes.a : [], g = i.attributes.position.count * 3, w = new Float32Array(g);
3509
3509
  for (let L = 0; L < m.length; L++) {
3510
3510
  const S = m[L] * 3;
3511
- _[S] = h[L * 3], _[S + 1] = h[L * 3 + 1], _[S + 2] = h[L * 3 + 2];
3511
+ w[S] = h[L * 3], w[S + 1] = h[L * 3 + 1], w[S + 2] = h[L * 3 + 2];
3512
3512
  }
3513
- const w = {
3513
+ const _ = {
3514
3514
  vertexIndices: p,
3515
- vertexPositions: _
3516
- }, y = this.genBuffers(w), C = new Ft(y.vertex, 3);
3515
+ vertexPositions: w
3516
+ }, y = this.genBuffers(_), C = new Ft(y.vertex, 3);
3517
3517
  C.name = c || r.attrName, C.applyMatrix4(o), i.morphAttributes.position.push(C);
3518
3518
  }
3519
3519
  // Parse normal from FBXTree.Objects.Geometry.LayerElementNormal if it exists
@@ -3582,18 +3582,18 @@ class ch {
3582
3582
  if (isNaN(s))
3583
3583
  return console.error("THREE.FBXLoader: Invalid Order %s given for geometry ID: %s", i.Order, i.id), new jt();
3584
3584
  const r = s - 1, o = i.KnotVector.a, c = [], p = i.Points.a;
3585
- for (let w = 0, y = p.length; w < y; w += 4)
3586
- c.push(new Xs().fromArray(p, w));
3585
+ for (let _ = 0, y = p.length; _ < y; _ += 4)
3586
+ c.push(new Xs().fromArray(p, _));
3587
3587
  let h, m;
3588
3588
  if (i.Form === "Closed")
3589
3589
  c.push(c[0]);
3590
3590
  else if (i.Form === "Periodic") {
3591
3591
  h = r, m = o.length - 1 - h;
3592
- for (let w = 0; w < r; ++w)
3593
- c.push(c[w]);
3592
+ for (let _ = 0; _ < r; ++_)
3593
+ c.push(c[_]);
3594
3594
  }
3595
- const _ = new xa(r, o, c, h, m).getPoints(c.length * 12);
3596
- return new jt().setFromPoints(_);
3595
+ const w = new xa(r, o, c, h, m).getPoints(c.length * 12);
3596
+ return new jt().setFromPoints(w);
3597
3597
  }
3598
3598
  }
3599
3599
  class uh {
@@ -3659,14 +3659,14 @@ class uh {
3659
3659
  const c = [], p = Ve.get(parseInt(o));
3660
3660
  p !== void 0 && (p.children.forEach(function(m, g) {
3661
3661
  if (i.has(m.ID)) {
3662
- const _ = i.get(m.ID);
3663
- if (_.curves.x !== void 0 || _.curves.y !== void 0 || _.curves.z !== void 0) {
3662
+ const w = i.get(m.ID);
3663
+ if (w.curves.x !== void 0 || w.curves.y !== void 0 || w.curves.z !== void 0) {
3664
3664
  if (c[g] === void 0) {
3665
- const w = Ve.get(m.ID).parents.filter(function(y) {
3665
+ const _ = Ve.get(m.ID).parents.filter(function(y) {
3666
3666
  return y.relationship !== void 0;
3667
3667
  })[0].ID;
3668
- if (w !== void 0) {
3669
- const y = se.Objects.Model[w.toString()];
3668
+ if (_ !== void 0) {
3669
+ const y = se.Objects.Model[_.toString()];
3670
3670
  if (y === void 0) {
3671
3671
  console.warn("THREE.FBXLoader: Encountered a unused curve.", m);
3672
3672
  return;
@@ -3683,18 +3683,18 @@ class uh {
3683
3683
  }), C.transform || (C.transform = new ye()), "PreRotation" in y && (C.preRotation = y.PreRotation.value), "PostRotation" in y && (C.postRotation = y.PostRotation.value), c[g] = C;
3684
3684
  }
3685
3685
  }
3686
- c[g] && (c[g][_.attr] = _);
3687
- } else if (_.curves.morph !== void 0) {
3686
+ c[g] && (c[g][w.attr] = w);
3687
+ } else if (w.curves.morph !== void 0) {
3688
3688
  if (c[g] === void 0) {
3689
- const w = Ve.get(m.ID).parents.filter(function(O) {
3689
+ const _ = Ve.get(m.ID).parents.filter(function(O) {
3690
3690
  return O.relationship !== void 0;
3691
- })[0].ID, y = Ve.get(w).parents[0].ID, C = Ve.get(y).parents[0].ID, L = Ve.get(C).parents[0].ID, S = se.Objects.Model[L], R = {
3691
+ })[0].ID, y = Ve.get(_).parents[0].ID, C = Ve.get(y).parents[0].ID, L = Ve.get(C).parents[0].ID, S = se.Objects.Model[L], R = {
3692
3692
  modelName: S.attrName ? ns.sanitizeNodeName(S.attrName) : "",
3693
- morphName: se.Objects.Deformer[w].attrName
3693
+ morphName: se.Objects.Deformer[_].attrName
3694
3694
  };
3695
3695
  c[g] = R;
3696
3696
  }
3697
- c[g][_.attr] = _;
3697
+ c[g][w.attr] = w;
3698
3698
  }
3699
3699
  }
3700
3700
  }), r.set(parseInt(o), c));
@@ -3752,10 +3752,10 @@ class uh {
3752
3752
  s.x !== void 0 && (this.interpolateRotations(s.x), s.x.values = s.x.values.map(mt.degToRad)), s.y !== void 0 && (this.interpolateRotations(s.y), s.y.values = s.y.values.map(mt.degToRad)), s.z !== void 0 && (this.interpolateRotations(s.z), s.z.values = s.z.values.map(mt.degToRad));
3753
3753
  const h = this.getTimesForAllAxes(s), m = this.getKeyframeTrackValues(h, s, r);
3754
3754
  o !== void 0 && (o = o.map(mt.degToRad), o.push(p), o = new Fn().fromArray(o), o = new Ae().setFromEuler(o)), c !== void 0 && (c = c.map(mt.degToRad), c.push(p), c = new Fn().fromArray(c), c = new Ae().setFromEuler(c).invert());
3755
- const g = new Ae(), _ = new Fn(), w = [];
3755
+ const g = new Ae(), w = new Fn(), _ = [];
3756
3756
  for (let y = 0; y < m.length; y += 3)
3757
- _.set(m[y], m[y + 1], m[y + 2], p), g.setFromEuler(_), o !== void 0 && g.premultiply(o), c !== void 0 && g.multiply(c), g.toArray(w, y / 3 * 4);
3758
- return new fo(i + ".quaternion", h, w);
3757
+ w.set(m[y], m[y + 1], m[y + 2], p), g.setFromEuler(w), o !== void 0 && g.premultiply(o), c !== void 0 && g.multiply(c), g.toArray(_, y / 3 * 4);
3758
+ return new fo(i + ".quaternion", h, _);
3759
3759
  }
3760
3760
  generateMorphTrack(i) {
3761
3761
  const s = i.DeformPercent.curves.morph, r = s.values.map(function(c) {
@@ -3784,18 +3784,18 @@ class uh {
3784
3784
  let p = -1, h = -1, m = -1;
3785
3785
  return i.forEach(function(g) {
3786
3786
  if (s.x && (p = s.x.times.indexOf(g)), s.y && (h = s.y.times.indexOf(g)), s.z && (m = s.z.times.indexOf(g)), p !== -1) {
3787
- const _ = s.x.values[p];
3788
- c.push(_), o[0] = _;
3787
+ const w = s.x.values[p];
3788
+ c.push(w), o[0] = w;
3789
3789
  } else
3790
3790
  c.push(o[0]);
3791
3791
  if (h !== -1) {
3792
- const _ = s.y.values[h];
3793
- c.push(_), o[1] = _;
3792
+ const w = s.y.values[h];
3793
+ c.push(w), o[1] = w;
3794
3794
  } else
3795
3795
  c.push(o[1]);
3796
3796
  if (m !== -1) {
3797
- const _ = s.z.values[m];
3798
- c.push(_), o[2] = _;
3797
+ const w = s.z.values[m];
3798
+ c.push(w), o[2] = w;
3799
3799
  } else
3800
3800
  c.push(o[2]);
3801
3801
  }), c;
@@ -3809,11 +3809,11 @@ class uh {
3809
3809
  if (c >= 180) {
3810
3810
  const p = c / 180, h = o / p;
3811
3811
  let m = r + h;
3812
- const g = i.times[s - 1], w = (i.times[s] - g) / p;
3813
- let y = g + w;
3812
+ const g = i.times[s - 1], _ = (i.times[s] - g) / p;
3813
+ let y = g + _;
3814
3814
  const C = [], L = [];
3815
3815
  for (; y < i.times[s]; )
3816
- C.push(y), y += w, L.push(m), m += h;
3816
+ C.push(y), y += _, L.push(m), m += h;
3817
3817
  i.times = Pa(i.times, s, C), i.values = Pa(i.values, s, L);
3818
3818
  }
3819
3819
  }
@@ -3839,14 +3839,14 @@ class ph {
3839
3839
  this.currentProp = i, this.currentPropName = s;
3840
3840
  }
3841
3841
  parse(i) {
3842
- this.currentIndent = 0, this.allNodes = new el(), this.nodeStack = [], this.currentProp = [], this.currentPropName = "";
3842
+ this.currentIndent = 0, this.allNodes = new Ja(), this.nodeStack = [], this.currentProp = [], this.currentPropName = "";
3843
3843
  const s = this, r = i.split(/[\r\n]+/);
3844
3844
  return r.forEach(function(o, c) {
3845
3845
  const p = o.match(/^[\s\t]*;/), h = o.match(/^[\s\t]*$/);
3846
3846
  if (p || h)
3847
3847
  return;
3848
- const m = o.match("^\\t{" + s.currentIndent + "}(\\w+):(.*){", ""), g = o.match("^\\t{" + s.currentIndent + "}(\\w+):[\\s\\t\\r\\n](.*)"), _ = o.match("^\\t{" + (s.currentIndent - 1) + "}}");
3849
- m ? s.parseNodeBegin(o, m) : g ? s.parseNodeProperty(o, g, r[++c]) : _ ? s.popStack() : o.match(/^[^\s\t}]/) && s.parseNodePropertyContinued(o);
3848
+ const m = o.match("^\\t{" + s.currentIndent + "}(\\w+):(.*){", ""), g = o.match("^\\t{" + s.currentIndent + "}(\\w+):[\\s\\t\\r\\n](.*)"), w = o.match("^\\t{" + (s.currentIndent - 1) + "}}");
3849
+ m ? s.parseNodeBegin(o, m) : g ? s.parseNodeProperty(o, g, r[++c]) : w ? s.popStack() : o.match(/^[^\s\t}]/) && s.parseNodePropertyContinued(o);
3850
3850
  }), this.allNodes;
3851
3851
  }
3852
3852
  parseNodeBegin(i, s) {
@@ -3876,11 +3876,11 @@ class ph {
3876
3876
  return;
3877
3877
  }
3878
3878
  if (o === "C") {
3879
- const m = c.split(",").slice(1), g = parseInt(m[0]), _ = parseInt(m[1]);
3880
- let w = c.split(",").slice(3);
3881
- w = w.map(function(y) {
3879
+ const m = c.split(",").slice(1), g = parseInt(m[0]), w = parseInt(m[1]);
3880
+ let _ = c.split(",").slice(3);
3881
+ _ = _.map(function(y) {
3882
3882
  return y.trim().replace(/^"/, "");
3883
- }), o = "connections", c = [g, _], bh(c, w), p[o] === void 0 && (p[o] = []);
3883
+ }), o = "connections", c = [g, w], bh(c, _), p[o] === void 0 && (p[o] = []);
3884
3884
  }
3885
3885
  o === "Node" && (p.id = c), o in p && Array.isArray(p[o]) ? p[o].push(c) : o !== "a" ? p[o] = c : p.a = c, this.setCurrentProp(p, o), o === "a" && c.slice(-1) !== "," && (p.a = oo(c));
3886
3886
  }
@@ -3890,8 +3890,8 @@ class ph {
3890
3890
  }
3891
3891
  // parse "Property70"
3892
3892
  parseNodeSpecialProperty(i, s, r) {
3893
- const o = r.split('",').map(function(_) {
3894
- return _.trim().replace(/^\"/, "").replace(/\s/, "_");
3893
+ const o = r.split('",').map(function(w) {
3894
+ return w.trim().replace(/^\"/, "").replace(/\s/, "_");
3895
3895
  }), c = o[0], p = o[1], h = o[2], m = o[3];
3896
3896
  let g = o[4];
3897
3897
  switch (p) {
@@ -3928,7 +3928,7 @@ class hh {
3928
3928
  const r = s.getUint32();
3929
3929
  if (r < 6400)
3930
3930
  throw new Error("THREE.FBXLoader: FBX version not supported, FileVersion: " + r);
3931
- const o = new el();
3931
+ const o = new Ja();
3932
3932
  for (; !this.endOfContent(s); ) {
3933
3933
  const c = this.parseNode(s, r);
3934
3934
  c !== null && o.add(c.name, c);
@@ -3949,12 +3949,12 @@ class hh {
3949
3949
  const m = [];
3950
3950
  for (let y = 0; y < c; y++)
3951
3951
  m.push(this.parseProperty(i));
3952
- const g = m.length > 0 ? m[0] : "", _ = m.length > 1 ? m[1] : "", w = m.length > 2 ? m[2] : "";
3952
+ const g = m.length > 0 ? m[0] : "", w = m.length > 1 ? m[1] : "", _ = m.length > 2 ? m[2] : "";
3953
3953
  for (r.singleProperty = c === 1 && i.getOffset() === o; o > i.getOffset(); ) {
3954
3954
  const y = this.parseNode(i, s);
3955
3955
  y !== null && this.parseSubNode(h, r, y);
3956
3956
  }
3957
- return r.propertyList = m, typeof g == "number" && (r.id = g), _ !== "" && (r.attrName = _), w !== "" && (r.attrType = w), h !== "" && (r.name = h), r;
3957
+ return r.propertyList = m, typeof g == "number" && (r.id = g), w !== "" && (r.attrName = w), _ !== "" && (r.attrType = _), h !== "" && (r.name = h), r;
3958
3958
  }
3959
3959
  parseSubNode(i, s, r) {
3960
3960
  if (r.singleProperty === !0) {
@@ -4141,14 +4141,14 @@ class Ea {
4141
4141
  return r >= 0 && (s = s.slice(0, r)), mi.decodeText(new Uint8Array(s));
4142
4142
  }
4143
4143
  }
4144
- class el {
4144
+ class Ja {
4145
4145
  add(i, s) {
4146
4146
  this[i] = s;
4147
4147
  }
4148
4148
  }
4149
4149
  function dh(f) {
4150
4150
  const i = "Kaydara FBX Binary \0";
4151
- return f.byteLength >= i.length && i === il(f, 0, i.length);
4151
+ return f.byteLength >= i.length && i === nl(f, 0, i.length);
4152
4152
  }
4153
4153
  function mh(f) {
4154
4154
  const i = ["K", "a", "y", "d", "a", "r", "a", "\\", "F", "B", "X", "\\", "B", "i", "n", "a", "r", "y", "\\", "\\"];
@@ -4195,8 +4195,8 @@ function js(f, i, s, r) {
4195
4195
  return gh(vh, r.buffer, c, p);
4196
4196
  }
4197
4197
  const ro = new Fn(), hi = new $();
4198
- function tl(f) {
4199
- const i = new ye(), s = new ye(), r = new ye(), o = new ye(), c = new ye(), p = new ye(), h = new ye(), m = new ye(), g = new ye(), _ = new ye(), w = new ye(), y = new ye(), C = f.inheritType ? f.inheritType : 0;
4198
+ function el(f) {
4199
+ const i = new ye(), s = new ye(), r = new ye(), o = new ye(), c = new ye(), p = new ye(), h = new ye(), m = new ye(), g = new ye(), w = new ye(), _ = new ye(), y = new ye(), C = f.inheritType ? f.inheritType : 0;
4200
4200
  if (f.translation && i.setPosition(hi.fromArray(f.translation)), f.preRotation) {
4201
4201
  const K = f.preRotation.map(mt.degToRad);
4202
4202
  K.push(f.eulerOrder), s.makeRotationFromEuler(ro.fromArray(K));
@@ -4209,26 +4209,26 @@ function tl(f) {
4209
4209
  const K = f.postRotation.map(mt.degToRad);
4210
4210
  K.push(f.eulerOrder), o.makeRotationFromEuler(ro.fromArray(K)), o.invert();
4211
4211
  }
4212
- f.scale && c.scale(hi.fromArray(f.scale)), f.scalingOffset && h.setPosition(hi.fromArray(f.scalingOffset)), f.scalingPivot && p.setPosition(hi.fromArray(f.scalingPivot)), f.rotationOffset && m.setPosition(hi.fromArray(f.rotationOffset)), f.rotationPivot && g.setPosition(hi.fromArray(f.rotationPivot)), f.parentMatrixWorld && (w.copy(f.parentMatrix), _.copy(f.parentMatrixWorld));
4212
+ f.scale && c.scale(hi.fromArray(f.scale)), f.scalingOffset && h.setPosition(hi.fromArray(f.scalingOffset)), f.scalingPivot && p.setPosition(hi.fromArray(f.scalingPivot)), f.rotationOffset && m.setPosition(hi.fromArray(f.rotationOffset)), f.rotationPivot && g.setPosition(hi.fromArray(f.rotationPivot)), f.parentMatrixWorld && (_.copy(f.parentMatrix), w.copy(f.parentMatrixWorld));
4213
4213
  const L = s.clone().multiply(r).multiply(o), S = new ye();
4214
- S.extractRotation(_);
4214
+ S.extractRotation(w);
4215
4215
  const R = new ye();
4216
- R.copyPosition(_);
4217
- const O = R.clone().invert().multiply(_), N = S.clone().invert().multiply(O), I = c, D = new ye();
4216
+ R.copyPosition(w);
4217
+ const O = R.clone().invert().multiply(w), N = S.clone().invert().multiply(O), I = c, D = new ye();
4218
4218
  if (C === 0)
4219
4219
  D.copy(S).multiply(L).multiply(N).multiply(I);
4220
4220
  else if (C === 1)
4221
4221
  D.copy(S).multiply(N).multiply(L).multiply(I);
4222
4222
  else {
4223
- const q = new ye().scale(new $().setFromMatrixScale(w)).clone().invert(), pe = N.clone().multiply(q);
4223
+ const q = new ye().scale(new $().setFromMatrixScale(_)).clone().invert(), pe = N.clone().multiply(q);
4224
4224
  D.copy(S).multiply(L).multiply(pe).multiply(I);
4225
4225
  }
4226
4226
  const Y = g.clone().invert(), G = p.clone().invert();
4227
4227
  let F = i.clone().multiply(m).multiply(g).multiply(s).multiply(r).multiply(o).multiply(Y).multiply(h).multiply(p).multiply(c).multiply(G);
4228
- const B = new ye().copyPosition(F), H = _.clone().multiply(B);
4229
- return y.copyPosition(H), F = y.clone().multiply(D), F.premultiply(_.invert()), F;
4228
+ const B = new ye().copyPosition(F), H = w.clone().multiply(B);
4229
+ return y.copyPosition(H), F = y.clone().multiply(D), F.premultiply(w.invert()), F;
4230
4230
  }
4231
- function nl(f) {
4231
+ function tl(f) {
4232
4232
  f = f || 0;
4233
4233
  const i = [
4234
4234
  "ZYX",
@@ -4252,7 +4252,7 @@ function oo(f) {
4252
4252
  return parseFloat(s);
4253
4253
  });
4254
4254
  }
4255
- function il(f, i, s) {
4255
+ function nl(f, i, s) {
4256
4256
  return i === void 0 && (i = 0), s === void 0 && (s = f.byteLength), mi.decodeText(new Uint8Array(f, i, s));
4257
4257
  }
4258
4258
  function bh(f, i) {
@@ -4304,13 +4304,13 @@ P(ko, "type", void 0);
4304
4304
  function wh(f, i, s, r) {
4305
4305
  const o = Array.from(f), c = i / s.resolution, p = (s.boundingBox.yMax - s.boundingBox.yMin + s.underlineThickness) * c, h = [];
4306
4306
  let m = 0, g = 0;
4307
- for (let _ = 0; _ < o.length; _++) {
4308
- const w = o[_];
4309
- if (w === `
4307
+ for (let w = 0; w < o.length; w++) {
4308
+ const _ = o[w];
4309
+ if (_ === `
4310
4310
  `)
4311
4311
  m = 0, g -= p * r.lineHeight;
4312
4312
  else {
4313
- const y = yh(w, c, m, g, s);
4313
+ const y = yh(_, c, m, g, s);
4314
4314
  y && (m += y.offsetX + r.letterSpacing, h.push(y.path));
4315
4315
  }
4316
4316
  }
@@ -4322,8 +4322,8 @@ function yh(f, i, s, r, o) {
4322
4322
  console.error('THREE.Font: character "' + f + '" does not exists in font family ' + o.familyName + ".");
4323
4323
  return;
4324
4324
  }
4325
- const p = new Hu();
4326
- let h, m, g, _, w, y, C, L;
4325
+ const p = new Gu();
4326
+ let h, m, g, w, _, y, C, L;
4327
4327
  if (c.o) {
4328
4328
  const S = c._cachedOutline || (c._cachedOutline = c.o.split(" "));
4329
4329
  for (let R = 0, O = S.length; R < O; )
@@ -4335,10 +4335,10 @@ function yh(f, i, s, r, o) {
4335
4335
  h = parseInt(S[R++]) * i + s, m = parseInt(S[R++]) * i + r, p.lineTo(h, m);
4336
4336
  break;
4337
4337
  case "q":
4338
- g = parseInt(S[R++]) * i + s, _ = parseInt(S[R++]) * i + r, w = parseInt(S[R++]) * i + s, y = parseInt(S[R++]) * i + r, p.quadraticCurveTo(w, y, g, _);
4338
+ g = parseInt(S[R++]) * i + s, w = parseInt(S[R++]) * i + r, _ = parseInt(S[R++]) * i + s, y = parseInt(S[R++]) * i + r, p.quadraticCurveTo(_, y, g, w);
4339
4339
  break;
4340
4340
  case "b":
4341
- g = parseInt(S[R++]) * i + s, _ = parseInt(S[R++]) * i + r, w = parseInt(S[R++]) * i + s, y = parseInt(S[R++]) * i + r, C = parseInt(S[R++]) * i + s, L = parseInt(S[R++]) * i + r, p.bezierCurveTo(w, y, C, L, g, _);
4341
+ g = parseInt(S[R++]) * i + s, w = parseInt(S[R++]) * i + r, _ = parseInt(S[R++]) * i + s, y = parseInt(S[R++]) * i + r, C = parseInt(S[R++]) * i + s, L = parseInt(S[R++]) * i + r, p.bezierCurveTo(_, y, C, L, g, w);
4342
4342
  break;
4343
4343
  }
4344
4344
  }
@@ -4347,11 +4347,11 @@ function yh(f, i, s, r, o) {
4347
4347
  path: p
4348
4348
  };
4349
4349
  }
4350
- var sl = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
4350
+ var il = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
4351
4351
  function xh(f) {
4352
4352
  return f && f.__esModule && Object.prototype.hasOwnProperty.call(f, "default") ? f.default : f;
4353
4353
  }
4354
- class Eh extends Ku {
4354
+ class Eh extends Hu {
4355
4355
  constructor(i) {
4356
4356
  super(i), this.type = Bs;
4357
4357
  }
@@ -4373,11 +4373,11 @@ class Eh extends Ku {
4373
4373
  console.error("THREE.RGBELoader: Error: " + (D || ""));
4374
4374
  }
4375
4375
  return -1;
4376
- }, w = `
4376
+ }, _ = `
4377
4377
  `, y = function(I, D, Y) {
4378
4378
  D = D || 1024;
4379
4379
  let F = I.pos, B = -1, H = 0, K = "", q = String.fromCharCode.apply(null, new Uint16Array(I.subarray(F, F + 128)));
4380
- for (; 0 > (B = q.indexOf(w)) && H < D && F < I.byteLength; )
4380
+ for (; 0 > (B = q.indexOf(_)) && H < D && F < I.byteLength; )
4381
4381
  K += q, H += q.length, F += 128, q += String.fromCharCode.apply(null, new Uint16Array(I.subarray(F, F + 128)));
4382
4382
  return -1 < B ? (Y !== !1 && (I.pos += H + B + 1), K + q.slice(0, B)) : !1;
4383
4383
  }, C = function(I) {
@@ -4505,7 +4505,7 @@ class Eh extends Ku {
4505
4505
  switch (p.type) {
4506
4506
  case eo:
4507
4507
  case Bs:
4508
- p.encoding = Ga, p.minFilter = Gs, p.magFilter = Gs, p.generateMipmaps = !1, p.flipY = !0;
4508
+ p.encoding = Ku, p.minFilter = Gs, p.magFilter = Gs, p.generateMipmaps = !1, p.flipY = !0;
4509
4509
  break;
4510
4510
  }
4511
4511
  s && s(p, h);
@@ -4571,10 +4571,10 @@ class Ch extends $s {
4571
4571
  throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.");
4572
4572
  }
4573
4573
  let o;
4574
- const c = this.workerNextTaskID++, p = i.byteLength, h = this._getWorker(c, p).then((m) => (o = m, new Promise((g, _) => {
4574
+ const c = this.workerNextTaskID++, p = i.byteLength, h = this._getWorker(c, p).then((m) => (o = m, new Promise((g, w) => {
4575
4575
  o._callbacks[c] = {
4576
4576
  resolve: g,
4577
- reject: _
4577
+ reject: w
4578
4578
  }, o.postMessage({
4579
4579
  type: "decode",
4580
4580
  id: c,
@@ -4665,21 +4665,21 @@ function Ph() {
4665
4665
  const h = p.data;
4666
4666
  switch (h.type) {
4667
4667
  case "init":
4668
- f = h.decoderConfig, i = new Promise(function(_) {
4669
- f.onModuleLoaded = function(w) {
4670
- _({
4671
- draco: w
4668
+ f = h.decoderConfig, i = new Promise(function(w) {
4669
+ f.onModuleLoaded = function(_) {
4670
+ w({
4671
+ draco: _
4672
4672
  });
4673
4673
  }, DracoDecoderModule(f);
4674
4674
  });
4675
4675
  break;
4676
4676
  case "decode":
4677
4677
  const m = h.buffer, g = h.taskConfig;
4678
- i.then((_) => {
4679
- const w = _.draco, y = new w.Decoder(), C = new w.DecoderBuffer();
4678
+ i.then((w) => {
4679
+ const _ = w.draco, y = new _.Decoder(), C = new _.DecoderBuffer();
4680
4680
  C.Init(new Int8Array(m), m.byteLength);
4681
4681
  try {
4682
- const L = s(w, y, C, g), S = L.attributes.map((R) => R.array.buffer);
4682
+ const L = s(_, y, C, g), S = L.attributes.map((R) => R.array.buffer);
4683
4683
  L.index && S.push(L.index.array.buffer), self.postMessage({
4684
4684
  type: "decode",
4685
4685
  id: h.id,
@@ -4692,14 +4692,14 @@ function Ph() {
4692
4692
  error: L.message
4693
4693
  });
4694
4694
  } finally {
4695
- w.destroy(C), w.destroy(y);
4695
+ _.destroy(C), _.destroy(y);
4696
4696
  }
4697
4697
  });
4698
4698
  break;
4699
4699
  }
4700
4700
  };
4701
4701
  function s(p, h, m, g) {
4702
- const _ = g.attributeIDs, w = g.attributeTypes;
4702
+ const w = g.attributeIDs, _ = g.attributeTypes;
4703
4703
  let y, C;
4704
4704
  const L = h.GetEncodedGeometryType(m);
4705
4705
  if (L === p.TRIANGULAR_MESH)
@@ -4714,13 +4714,13 @@ function Ph() {
4714
4714
  index: null,
4715
4715
  attributes: []
4716
4716
  };
4717
- for (const R in _) {
4718
- const O = self[w[R]];
4717
+ for (const R in w) {
4718
+ const O = self[_[R]];
4719
4719
  let N, I;
4720
4720
  if (g.useUniqueIDs)
4721
- I = _[R], N = h.GetAttributeByUniqueId(y, I);
4721
+ I = w[R], N = h.GetAttributeByUniqueId(y, I);
4722
4722
  else {
4723
- if (I = h.GetAttributeId(y, p[_[R]]), I === -1)
4723
+ if (I = h.GetAttributeId(y, p[w[R]]), I === -1)
4724
4724
  continue;
4725
4725
  N = h.GetAttribute(y, I);
4726
4726
  }
@@ -4729,18 +4729,18 @@ function Ph() {
4729
4729
  return L === p.TRIANGULAR_MESH && (S.index = r(p, h, y)), p.destroy(y), S;
4730
4730
  }
4731
4731
  function r(p, h, m) {
4732
- const _ = m.num_faces() * 3, w = _ * 4, y = p._malloc(w);
4733
- h.GetTrianglesUInt32Array(m, w, y);
4734
- const C = new Uint32Array(p.HEAPF32.buffer, y, _).slice();
4732
+ const w = m.num_faces() * 3, _ = w * 4, y = p._malloc(_);
4733
+ h.GetTrianglesUInt32Array(m, _, y);
4734
+ const C = new Uint32Array(p.HEAPF32.buffer, y, w).slice();
4735
4735
  return p._free(y), {
4736
4736
  array: C,
4737
4737
  itemSize: 1
4738
4738
  };
4739
4739
  }
4740
- function o(p, h, m, g, _, w) {
4741
- const y = w.num_components(), L = m.num_points() * y, S = L * _.BYTES_PER_ELEMENT, R = c(p, _), O = p._malloc(S);
4742
- h.GetAttributeDataArrayForAllPoints(m, w, R, S, O);
4743
- const N = new _(p.HEAPF32.buffer, O, L).slice();
4740
+ function o(p, h, m, g, w, _) {
4741
+ const y = _.num_components(), L = m.num_points() * y, S = L * w.BYTES_PER_ELEMENT, R = c(p, w), O = p._malloc(S);
4742
+ h.GetAttributeDataArrayForAllPoints(m, _, R, S, O);
4743
+ const N = new w(p.HEAPF32.buffer, O, L).slice();
4744
4744
  return p._free(O), {
4745
4745
  name: g,
4746
4746
  array: N,
@@ -4767,7 +4767,7 @@ function Ph() {
4767
4767
  }
4768
4768
  }
4769
4769
  function Ut() {
4770
- const { state: f, setState: i } = ha("useTres", mu()), s = ha("extend") || (() => {
4770
+ const { state: f, setState: i } = ha("useTres", du()), s = ha("extend") || (() => {
4771
4771
  });
4772
4772
  return {
4773
4773
  state: f,
@@ -4795,14 +4795,14 @@ const Th = ["args", "center"], Dd = /* @__PURE__ */ Pe({
4795
4795
  let s, r;
4796
4796
  const o = f, { extend: c } = Ut();
4797
4797
  c({ TextGeometry: ya });
4798
- const p = new _h(), h = nu(), m = pn(() => {
4798
+ const p = new _h(), h = tu(), m = pn(() => {
4799
4799
  var y;
4800
4800
  return o.text ? o.text : h.default ? (y = h.default()[0].children) == null ? void 0 : y.trim() : o.needUpdates ? "" : "TresJS";
4801
4801
  }), g = Oe();
4802
4802
  i({
4803
4803
  value: g
4804
4804
  });
4805
- const _ = ([s, r] = Ks(() => new Promise((y, C) => {
4805
+ const w = ([s, r] = Ks(() => new Promise((y, C) => {
4806
4806
  try {
4807
4807
  typeof o.font == "string" ? p.load(o.font, (L) => {
4808
4808
  y(L);
@@ -4810,8 +4810,8 @@ const Th = ["args", "center"], Dd = /* @__PURE__ */ Pe({
4810
4810
  } catch (L) {
4811
4811
  C(console.error("cientos", L));
4812
4812
  }
4813
- })), s = await s, r(), s), w = pn(() => ({
4814
- font: _,
4813
+ })), s = await s, r(), s), _ = pn(() => ({
4814
+ font: w,
4815
4815
  size: o.size,
4816
4816
  height: o.height,
4817
4817
  curveSegments: o.curveSegments,
@@ -4822,15 +4822,15 @@ const Th = ["args", "center"], Dd = /* @__PURE__ */ Pe({
4822
4822
  bevelSegments: o.bevelSegments
4823
4823
  }));
4824
4824
  return ss(() => {
4825
- g.value && o.needUpdates && (g.value.geometry.dispose(), g.value.geometry = new ya(m.value, w.value), o.center && g.value.geometry.center());
4826
- }), (y, C) => ke(_) ? (Ce(), Me("TresMesh", {
4825
+ g.value && o.needUpdates && (g.value.geometry.dispose(), g.value.geometry = new ya(m.value, _.value), o.center && g.value.geometry.center());
4826
+ }), (y, C) => ke(w) ? (Ce(), Me("TresMesh", {
4827
4827
  key: 0,
4828
4828
  ref_key: "text3DRef",
4829
4829
  ref: g
4830
4830
  }, [
4831
4831
  ke(m) ? (Ce(), Me("TresTextGeometry", {
4832
4832
  key: 0,
4833
- args: [ke(m), ke(w)],
4833
+ args: [ke(m), ke(_)],
4834
4834
  center: f.center
4835
4835
  }, null, 8, Th)) : es("", !0),
4836
4836
  He(y.$slots, "default")
@@ -4838,7 +4838,7 @@ const Th = ["args", "center"], Dd = /* @__PURE__ */ Pe({
4838
4838
  }
4839
4839
  });
4840
4840
  function Od(f, i) {
4841
- const s = Qe(i), r = new $u(s.value), o = iu({});
4841
+ const s = Qe(i), r = new $u(s.value), o = nu({});
4842
4842
  f.forEach((p) => {
4843
4843
  const h = r.clipAction(p, s.value);
4844
4844
  o[p.name] = h;
@@ -4859,23 +4859,22 @@ async function kh({
4859
4859
  blur: i = 0,
4860
4860
  background: s = !1,
4861
4861
  path: r = "/",
4862
- preset: o = void 0,
4863
- colorSpace: c = void 0
4862
+ preset: o = void 0
4864
4863
  }) {
4865
- const { state: p } = Ut();
4864
+ const { state: c } = Ut();
4866
4865
  if (o) {
4867
4866
  if (!(o in lo))
4868
4867
  throw new Error("Preset must be one of: " + Object.keys(lo).join(", "));
4869
4868
  f = lo[o], r = "https://raw.githubusercontent.com/Tresjs/assets/main/textures/hdr/";
4870
4869
  }
4871
- const h = Array.isArray(f), g = await Eo(
4872
- h ? qu : Eh,
4873
- h ? [f] : f,
4870
+ const p = Array.isArray(f), m = await Eo(
4871
+ p ? qu : Eh,
4872
+ p ? [f] : f,
4874
4873
  (w) => {
4875
- r && w.setPath(r), c && (w.colorSpace = c);
4874
+ r && w.setPath(r);
4876
4875
  }
4877
- ), _ = h ? g[0] : g;
4878
- return _ && (_.mapping = h ? Xu : Ua, _.colorSpace = c ?? h ? Yu : Ga), p.scene && (p.scene.environment = _, s !== void 0 && (p.scene.background = _), i && (p.scene.backgroundBlurriness = i | 0)), _;
4876
+ ), g = p ? m[0] : m;
4877
+ return g && (g.mapping = p ? Xu : Ua, g.colorSpace = Yu), c.scene && (c.scene.environment = g, s !== void 0 && (c.scene.background = g), i && (c.scene.backgroundBlurriness = i | 0)), g;
4879
4878
  }
4880
4879
  const Nd = Pe({
4881
4880
  name: "Environment",
@@ -4886,48 +4885,48 @@ const Nd = Pe({
4886
4885
  };
4887
4886
  }
4888
4887
  });
4889
- function rl(f) {
4890
- return su() ? (ru(f), !0) : !1;
4888
+ function sl(f) {
4889
+ return iu() ? (su(f), !0) : !1;
4891
4890
  }
4892
- function ol(f) {
4891
+ function rl(f) {
4893
4892
  return typeof f == "function" ? f() : ke(f);
4894
4893
  }
4895
- const Ah = typeof window < "u", al = () => {
4894
+ const Ah = typeof window < "u", ol = () => {
4896
4895
  };
4897
4896
  function Mh(...f) {
4898
4897
  if (f.length !== 1)
4899
- return au(...f);
4898
+ return ou(...f);
4900
4899
  const i = f[0];
4901
- return typeof i == "function" ? lu(cu(() => ({ get: i, set: al }))) : Qe(i);
4900
+ return typeof i == "function" ? au(lu(() => ({ get: i, set: ol }))) : Qe(i);
4902
4901
  }
4903
4902
  function Sh(f, i = !0) {
4904
- Ta() ? xo(f) : i ? f() : ou(f);
4903
+ Ta() ? xo(f) : i ? f() : ru(f);
4905
4904
  }
4906
4905
  function Lh(f) {
4907
4906
  var i;
4908
- const s = ol(f);
4907
+ const s = rl(f);
4909
4908
  return (i = s == null ? void 0 : s.$el) != null ? i : s;
4910
4909
  }
4911
4910
  const Ys = Ah ? window : void 0;
4912
4911
  function Bn(...f) {
4913
4912
  let i, s, r, o;
4914
4913
  if (typeof f[0] == "string" || Array.isArray(f[0]) ? ([s, r, o] = f, i = Ys) : [i, s, r, o] = f, !i)
4915
- return al;
4914
+ return ol;
4916
4915
  Array.isArray(s) || (s = [s]), Array.isArray(r) || (r = [r]);
4917
4916
  const c = [], p = () => {
4918
- c.forEach((_) => _()), c.length = 0;
4919
- }, h = (_, w, y, C) => (_.addEventListener(w, y, C), () => _.removeEventListener(w, y, C)), m = vi(
4920
- () => [Lh(i), ol(o)],
4921
- ([_, w]) => {
4922
- p(), _ && c.push(
4923
- ...s.flatMap((y) => r.map((C) => h(_, y, C, w)))
4917
+ c.forEach((w) => w()), c.length = 0;
4918
+ }, h = (w, _, y, C) => (w.addEventListener(_, y, C), () => w.removeEventListener(_, y, C)), m = vi(
4919
+ () => [Lh(i), rl(o)],
4920
+ ([w, _]) => {
4921
+ p(), w && c.push(
4922
+ ...s.flatMap((y) => r.map((C) => h(w, y, C, _)))
4924
4923
  );
4925
4924
  },
4926
4925
  { immediate: !0, flush: "post" }
4927
4926
  ), g = () => {
4928
4927
  m(), p();
4929
4928
  };
4930
- return rl(g), g;
4929
+ return sl(g), g;
4931
4930
  }
4932
4931
  function Rh() {
4933
4932
  const f = Qe(!1);
@@ -4947,7 +4946,7 @@ function Ih(f, i = {}) {
4947
4946
  }, h = () => {
4948
4947
  r.value && (p(), o = s.matchMedia(Mh(f).value), c.value = !!(o != null && o.matches), o && ("addEventListener" in o ? o.addEventListener("change", h) : o.addListener(h)));
4949
4948
  };
4950
- return ss(h), rl(() => p()), c;
4949
+ return ss(h), sl(() => p()), c;
4951
4950
  }
4952
4951
  const Dh = {
4953
4952
  page: (f) => [f.pageX, f.pageY],
@@ -4964,13 +4963,13 @@ function Oh(f = {}) {
4964
4963
  window: c = Ys,
4965
4964
  target: p = c,
4966
4965
  eventFilter: h
4967
- } = f, m = Qe(o.x), g = Qe(o.y), _ = Qe(null), w = typeof i == "function" ? i : Dh[i], y = (O) => {
4968
- const N = w(O);
4969
- N && ([m.value, g.value] = N, _.value = "mouse");
4966
+ } = f, m = Qe(o.x), g = Qe(o.y), w = Qe(null), _ = typeof i == "function" ? i : Dh[i], y = (O) => {
4967
+ const N = _(O);
4968
+ N && ([m.value, g.value] = N, w.value = "mouse");
4970
4969
  }, C = (O) => {
4971
4970
  if (O.touches.length > 0) {
4972
- const N = w(O.touches[0]);
4973
- N && ([m.value, g.value] = N, _.value = "touch");
4971
+ const N = _(O.touches[0]);
4972
+ N && ([m.value, g.value] = N, w.value = "touch");
4974
4973
  }
4975
4974
  }, L = () => {
4976
4975
  m.value = o.x, g.value = o.y;
@@ -4978,7 +4977,7 @@ function Oh(f = {}) {
4978
4977
  return p && (Bn(p, "mousemove", S, { passive: !0 }), Bn(p, "dragover", S, { passive: !0 }), s && i !== "movement" && (Bn(p, "touchstart", R, { passive: !0 }), Bn(p, "touchmove", R, { passive: !0 }), r && Bn(p, "touchend", L, { passive: !0 }))), {
4979
4978
  x: m,
4980
4979
  y: g,
4981
- sourceType: _
4980
+ sourceType: w
4982
4981
  };
4983
4982
  }
4984
4983
  function Nh(f = {}) {
@@ -4998,11 +4997,11 @@ function Nh(f = {}) {
4998
4997
  return { width: p, height: h };
4999
4998
  }
5000
4999
  function Bh(f = !1, i = 5, s) {
5001
- const { x: r, y: o } = Oh(), { logWarning: c } = fu(), { width: p, height: h } = Nh(), m = pn(() => (r.value / p.value - 0.5) * i), g = pn(() => -(o.value / h.value - 0.5) * i);
5000
+ const { x: r, y: o } = Oh(), { logWarning: c } = mu(), { width: p, height: h } = Nh(), m = pn(() => (r.value / p.value - 0.5) * i), g = pn(() => -(o.value / h.value - 0.5) * i);
5002
5001
  if (s) {
5003
- const { x: _, y: w } = s.position;
5002
+ const { x: w, y: _ } = s.position;
5004
5003
  ss(() => {
5005
- f || s && (s.position.x = _ + m.value, s.position.y = w + g.value);
5004
+ f || s && (s.position.x = w + m.value, s.position.y = _ + g.value);
5006
5005
  });
5007
5006
  } else
5008
5007
  c("Scene must contain a Camera component to use this composable");
@@ -5039,24 +5038,24 @@ const Bd = Pe({
5039
5038
  const o = s.depth / s.count, c = [], p = Array.from({ length: s.count }, () => (0.5 + 0.5 * Math.random()) * s.factor), h = (y) => new $().setFromSpherical(new uo(y, Math.acos(1 - Math.random() * 2), Math.random() * 2 * Math.PI));
5040
5039
  for (let y = 0; y < s.count; y++)
5041
5040
  r -= o * Math.random(), c.push(...h(r).toArray());
5042
- const m = new Float32Array(c), g = new Float32Array(p), _ = pn(() => ({
5041
+ const m = new Float32Array(c), g = new Float32Array(p), w = pn(() => ({
5043
5042
  size: s.size,
5044
5043
  sizeAttenuation: s.sizeAttenuation,
5045
5044
  transparent: s.transparent,
5046
5045
  alphaTest: s.alphaTest,
5047
5046
  alphaMap: s.alphaMap
5048
- })), w = Oe();
5047
+ })), _ = Oe();
5049
5048
  return i({
5050
- value: w
5049
+ value: _
5051
5050
  }), (y, C) => (Ce(), Me("TresPoints", {
5052
5051
  ref_key: "starsRef",
5053
- ref: w
5052
+ ref: _
5054
5053
  }, [
5055
5054
  be("TresBufferGeometry", {
5056
5055
  position: [ke(m), 3],
5057
5056
  "a-scale": [ke(g), 1]
5058
5057
  }, null, 8, Fh),
5059
- be("TresPointsMaterial", uu(pu(ke(_))), null, 16)
5058
+ be("TresPointsMaterial", cu(uu(ke(w))), null, 16)
5060
5059
  ], 512));
5061
5060
  }
5062
5061
  }), jh = ["position"], zh = ["position"], Uh = ["scale"], Gh = ["map", "map-encoding", "depth-test", "color", "opacity"], jd = /* @__PURE__ */ Pe({
@@ -5083,15 +5082,15 @@ const Bd = Pe({
5083
5082
  scale: 0.4 + Math.sin((L + 1) / o.segments * Math.PI) * ((0.2 + Math.random()) * 10),
5084
5083
  density: Math.max(0.2, Math.random()),
5085
5084
  rotation: Math.max(2e-3, 5e-3 * Math.random()) * o.speed
5086
- })), m = (C, L) => C / 6 * L * o.opacity, { map: g } = ([s, r] = Ks(() => vu({ map: o.texture })), s = await s, r(), s), { state: _ } = Ut(), w = pn(() => {
5085
+ })), m = (C, L) => C / 6 * L * o.opacity, { map: g } = ([s, r] = Ks(() => fu({ map: o.texture })), s = await s, r(), s), { state: w } = Ut(), _ = pn(() => {
5087
5086
  var C;
5088
- return (C = _.renderer) == null ? void 0 : C.outputColorSpace;
5087
+ return (C = w.renderer) == null ? void 0 : C.outputColorSpace;
5089
5088
  }), { onLoop: y } = rs();
5090
5089
  return y(() => {
5091
5090
  var C, L;
5092
- c.value && _.camera && p.value && ((C = p.value) == null || C.children.forEach((S, R) => {
5091
+ c.value && w.camera && p.value && ((C = p.value) == null || C.children.forEach((S, R) => {
5093
5092
  S.rotation.z += h[R].rotation;
5094
- }), c.value.lookAt((L = _.camera) == null ? void 0 : L.position));
5093
+ }), c.value.lookAt((L = w.camera) == null ? void 0 : L.position));
5095
5094
  }), (C, L) => (Ce(), Me("TresGroup", ze({
5096
5095
  ref_key: "smokeRef",
5097
5096
  ref: c
@@ -5101,7 +5100,7 @@ const Bd = Pe({
5101
5100
  ref: p,
5102
5101
  position: [0, 0, f.segments / 2 * f.depth]
5103
5102
  }, [
5104
- (Ce(!0), Me(hu, null, du(ke(h), ({ scale: S, x: R, y: O, density: N }, I) => (Ce(), Me("TresMesh", {
5103
+ (Ce(!0), Me(pu, null, hu(ke(h), ({ scale: S, x: R, y: O, density: N }, I) => (Ce(), Me("TresMesh", {
5105
5104
  key: I,
5106
5105
  position: [R, O, -I * f.depth]
5107
5106
  }, [
@@ -5111,7 +5110,7 @@ const Bd = Pe({
5111
5110
  }, null, 8, Uh),
5112
5111
  be("TresMeshStandardMaterial", {
5113
5112
  map: ke(g),
5114
- "map-encoding": ke(w),
5113
+ "map-encoding": ke(_),
5115
5114
  "depth-test": f.depthTest,
5116
5115
  color: f.color,
5117
5116
  "depth-write": !1,
@@ -5137,13 +5136,13 @@ const Bd = Pe({
5137
5136
  });
5138
5137
  const { onLoop: o } = rs(), c = Qe(Math.random() * 1e4);
5139
5138
  return o(({ elapsed: p }) => {
5140
- var g, _;
5139
+ var g, w;
5141
5140
  if (!r.value)
5142
5141
  return;
5143
5142
  const h = c.value + p;
5144
5143
  r.value.rotation.x = Math.cos(h / 4 * s.speed) / 8 * s.rotationFactor, r.value.rotation.y = Math.sin(h / 4 * s.speed) / 8 * s.rotationFactor, r.value.rotation.z = Math.sin(h / 4 * s.speed) / 20 * s.rotationFactor;
5145
5144
  let m = Math.sin(h / 4 * s.speed) / 10;
5146
- m = mt.mapLinear(m, -0.1, 0.1, ((g = s.range) == null ? void 0 : g[0]) ?? -0.1, ((_ = s.range) == null ? void 0 : _[1]) ?? 0.1), r.value.position.y = m * s.floatFactor;
5145
+ m = mt.mapLinear(m, -0.1, 0.1, ((g = s.range) == null ? void 0 : g[0]) ?? -0.1, ((w = s.range) == null ? void 0 : w[1]) ?? 0.1), r.value.position.y = m * s.floatFactor;
5147
5146
  }), (p, h) => (Ce(), Me("TresGroup", ze(p.$attrs, {
5148
5147
  ref_key: "groupRef",
5149
5148
  ref: r
@@ -5222,7 +5221,7 @@ const Gd = /* @__PURE__ */ Pe({
5222
5221
  },
5223
5222
  setup(f) {
5224
5223
  const i = f, { state: s, setState: r, extend: o } = Ut(), c = Qe(null);
5225
- return o({ OrbitControls: Qa }), vi(c, (p) => {
5224
+ return o({ OrbitControls: qa }), vi(c, (p) => {
5226
5225
  p && i.makeDefault ? r("controls", p) : r("controls", null);
5227
5226
  }), (p, h) => {
5228
5227
  var m;
@@ -5279,14 +5278,14 @@ const Kd = /* @__PURE__ */ Pe({
5279
5278
  "showY",
5280
5279
  "showZ"
5281
5280
  ])
5282
- ), p = () => i("change", r.value), h = () => i("mouseDown", r.value), m = () => i("mouseUp", r.value), g = () => i("objectChange", r.value), _ = (y) => {
5281
+ ), p = () => i("change", r.value), h = () => i("mouseDown", r.value), m = () => i("mouseUp", r.value), g = () => i("objectChange", r.value), w = (y) => {
5283
5282
  o.controls && (o.controls.enabled = !y.value), i("dragging", y.value);
5284
5283
  };
5285
- function w(y) {
5286
- y.addEventListener("dragging-changed", _), y.addEventListener("change", p), y.addEventListener("mouseDown", h), y.addEventListener("mouseUp", m), y.addEventListener("objectChange", g);
5284
+ function _(y) {
5285
+ y.addEventListener("dragging-changed", w), y.addEventListener("change", p), y.addEventListener("mouseDown", h), y.addEventListener("mouseUp", m), y.addEventListener("objectChange", g);
5287
5286
  }
5288
5287
  return ss(() => {
5289
- o.camera && o.renderer && o.scene && s.object && (r.value = new mp(o.camera, o.renderer.domElement), r.value.attach(s.object), o.scene.add(r.value), w(r.value));
5288
+ o.camera && o.renderer && o.scene && s.object && (r.value = new mp(o.camera, o.renderer.domElement), r.value.attach(s.object), o.scene.add(r.value), _(r.value));
5290
5289
  }), vi(
5291
5290
  [c, r],
5292
5291
  // TODO: properly type this
@@ -5304,7 +5303,7 @@ const Kd = /* @__PURE__ */ Pe({
5304
5303
  immediate: !0
5305
5304
  }
5306
5305
  ), Ma(() => {
5307
- r.value && (r.value.removeEventListener("dragging-changed", _), r.value.removeEventListener("change", p), r.value.removeEventListener("mouseDown", h), r.value.removeEventListener("mouseUp", m), r.value.removeEventListener("objectChange", g));
5306
+ r.value && (r.value.removeEventListener("dragging-changed", w), r.value.removeEventListener("change", p), r.value.removeEventListener("mouseDown", h), r.value.removeEventListener("mouseUp", m), r.value.removeEventListener("objectChange", g));
5308
5307
  }), (y, C) => He(y.$slots, "default");
5309
5308
  }
5310
5309
  }), Qh = ["args"], $d = /* @__PURE__ */ Pe({
@@ -5319,22 +5318,22 @@ const Kd = /* @__PURE__ */ Pe({
5319
5318
  const s = f, { state: r, setState: o, extend: c } = Ut(), p = Qe(null);
5320
5319
  let h;
5321
5320
  return c({ PointerLockControls: wp }), vi(p, (m) => {
5322
- var _;
5321
+ var w;
5323
5322
  m && s.makeDefault ? o("controls", m) : o("controls", null);
5324
5323
  const g = document.getElementById(s.selector || "");
5325
- h = g || ((_ = r.renderer) == null ? void 0 : _.domElement), Bn(h, "click", () => {
5326
- var w;
5327
- (w = p.value) == null || w.lock();
5324
+ h = g || ((w = r.renderer) == null ? void 0 : w.domElement), Bn(h, "click", () => {
5325
+ var _;
5326
+ (_ = p.value) == null || _.lock();
5328
5327
  });
5329
5328
  }), i({
5330
5329
  value: p
5331
5330
  }), (m, g) => {
5332
- var _;
5331
+ var w;
5333
5332
  return ke(r).camera && ke(r).renderer ? (Ce(), Me("TresPointerLockControls", {
5334
5333
  key: 0,
5335
5334
  ref_key: "controls",
5336
5335
  ref: p,
5337
- args: [ke(r).camera || f.camera, ((_ = ke(r).renderer) == null ? void 0 : _.domElement) || f.domElement]
5336
+ args: [ke(r).camera || f.camera, ((w = ke(r).renderer) == null ? void 0 : w.domElement) || f.domElement]
5338
5337
  }, null, 8, Qh)) : es("", !0);
5339
5338
  };
5340
5339
  }
@@ -5687,7 +5686,7 @@ var wo = { exports: {} };
5687
5686
  (function(f, i) {
5688
5687
  (function(s, r) {
5689
5688
  r(i);
5690
- })(sl, function(s) {
5689
+ })(il, function(s) {
5691
5690
  class r {
5692
5691
  /**
5693
5692
  * @hidden
@@ -5749,10 +5748,10 @@ var wo = { exports: {} };
5749
5748
  super(e), this.index = t;
5750
5749
  }
5751
5750
  }
5752
- function _(n) {
5751
+ function w(n) {
5753
5752
  return n;
5754
5753
  }
5755
- function w(n) {
5754
+ function _(n) {
5756
5755
  return n == null;
5757
5756
  }
5758
5757
  function y(n, e) {
@@ -6287,7 +6286,7 @@ var wo = { exports: {} };
6287
6286
  this.element = e.createElement("div"), this.element.classList.add(gt()), t.viewProps.bindClassModifiers(this.element);
6288
6287
  const l = e.createElement("div");
6289
6288
  l.classList.add(gt("l")), B(t.props, "label", (E) => {
6290
- w(E) ? this.element.classList.add(gt(void 0, "nol")) : (this.element.classList.remove(gt(void 0, "nol")), Yn(l), l.appendChild(St(e, E)));
6289
+ _(E) ? this.element.classList.add(gt(void 0, "nol")) : (this.element.classList.remove(gt(void 0, "nol")), Yn(l), l.appendChild(St(e, E)));
6291
6290
  }), this.element.appendChild(l), this.labelElement = l;
6292
6291
  const b = e.createElement("div");
6293
6292
  b.classList.add(gt("v")), this.element.appendChild(b), this.valueElement = b;
@@ -6365,7 +6364,7 @@ var wo = { exports: {} };
6365
6364
  if (!this.styleExpanded)
6366
6365
  return "0";
6367
6366
  const e = this.get("expandedHeight");
6368
- return this.get("shouldFixHeight") && !w(e) ? `${e}px` : "auto";
6367
+ return this.get("shouldFixHeight") && !_(e) ? `${e}px` : "auto";
6369
6368
  }
6370
6369
  bindExpandedClass(e, t) {
6371
6370
  const l = () => {
@@ -6388,7 +6387,7 @@ var wo = { exports: {} };
6388
6387
  }
6389
6388
  function $e(n, e) {
6390
6389
  n.value("expanded").emitter.on("beforechange", () => {
6391
- if (n.set("completed", !1), w(n.get("expandedHeight"))) {
6390
+ if (n.set("completed", !1), _(n.get("expandedHeight"))) {
6392
6391
  const t = Gt(n, e);
6393
6392
  t > 0 && n.set("expandedHeight", t);
6394
6393
  }
@@ -6931,7 +6930,7 @@ var wo = { exports: {} };
6931
6930
  this.className_ = D((l = t.viewName) !== null && l !== void 0 ? l : "fld"), this.element = e.createElement("div"), this.element.classList.add(this.className_(), cs()), t.viewProps.bindClassModifiers(this.element), this.foldable_ = t.foldable, this.foldable_.bindExpandedClass(this.element, this.className_(void 0, "expanded")), B(this.foldable_, "completed", K(this.element, this.className_(void 0, "cpl")));
6932
6931
  const b = e.createElement("button");
6933
6932
  b.classList.add(this.className_("b")), B(t.props, "title", (J) => {
6934
- w(J) ? this.element.classList.add(this.className_(void 0, "not")) : this.element.classList.remove(this.className_(void 0, "not"));
6933
+ _(J) ? this.element.classList.add(this.className_(void 0, "not")) : this.element.classList.remove(this.className_(void 0, "not"));
6935
6934
  }), t.viewProps.bindDisabled(b), this.element.appendChild(b), this.buttonElement = b;
6936
6935
  const E = e.createElement("div");
6937
6936
  E.classList.add(this.className_("i")), this.element.appendChild(E);
@@ -7489,7 +7488,7 @@ var wo = { exports: {} };
7489
7488
  constrain(e) {
7490
7489
  const t = this.values.get("max"), l = this.values.get("min");
7491
7490
  let b = e;
7492
- return w(l) || (b = Math.max(b, l)), w(t) || (b = Math.min(b, t)), b;
7491
+ return _(l) || (b = Math.max(b, l)), _(t) || (b = Math.min(b, t)), b;
7493
7492
  }
7494
7493
  }
7495
7494
  class Jn {
@@ -7577,7 +7576,7 @@ var wo = { exports: {} };
7577
7576
  }
7578
7577
  onInputChange_(e) {
7579
7578
  const l = e.currentTarget.value, b = this.parser_(l);
7580
- w(b) || (this.value.rawValue = b), this.view.refresh();
7579
+ _(b) || (this.value.rawValue = b), this.view.refresh();
7581
7580
  }
7582
7581
  }
7583
7582
  function mr(n) {
@@ -7866,7 +7865,7 @@ var wo = { exports: {} };
7866
7865
  return n;
7867
7866
  if (typeof n == "string") {
7868
7867
  const e = ct(n);
7869
- if (!w(e))
7868
+ if (!_(e))
7870
7869
  return e;
7871
7870
  }
7872
7871
  return 0;
@@ -8101,7 +8100,7 @@ var wo = { exports: {} };
8101
8100
  }
8102
8101
  onInputChange_(e) {
8103
8102
  const l = e.currentTarget.value, b = this.parser_(l);
8104
- w(b) || (this.value.rawValue = this.constrainValue_(b)), this.view.refresh();
8103
+ _(b) || (this.value.rawValue = this.constrainValue_(b)), this.view.refresh();
8105
8104
  }
8106
8105
  onInputKeyDown_(e) {
8107
8106
  const t = je(this.baseStep_, Pn(e));
@@ -8264,7 +8263,7 @@ var wo = { exports: {} };
8264
8263
  }), e;
8265
8264
  }
8266
8265
  function Ui(n) {
8267
- return w(n) ? null : new yn(Ls(n));
8266
+ return _(n) ? null : new yn(Ls(n));
8268
8267
  }
8269
8268
  function Sr(n) {
8270
8269
  const e = n ? it(n, Jn) : null;
@@ -8454,7 +8453,7 @@ var wo = { exports: {} };
8454
8453
  return re(b, t.mode, "int", t.type);
8455
8454
  }
8456
8455
  function tt(n, e) {
8457
- return typeof n != "object" || w(n) ? !1 : e in n && typeof n[e] == "number";
8456
+ return typeof n != "object" || _(n) ? !1 : e in n && typeof n[e] == "number";
8458
8457
  }
8459
8458
  class te {
8460
8459
  static black(e = "int") {
@@ -8535,7 +8534,7 @@ var wo = { exports: {} };
8535
8534
  return this.alphaViews_ && e.push(this.alphaViews_.palette.element, this.alphaViews_.text.inputElement), e;
8536
8535
  }
8537
8536
  }
8538
- function cl(n) {
8537
+ function ll(n) {
8539
8538
  return n === "int" ? "int" : n === "float" ? "float" : void 0;
8540
8539
  }
8541
8540
  function Dr(n) {
@@ -8544,7 +8543,7 @@ var wo = { exports: {} };
8544
8543
  alpha: e.optional.boolean,
8545
8544
  color: e.optional.object({
8546
8545
  alpha: e.optional.boolean,
8547
- type: e.optional.custom(cl)
8546
+ type: e.optional.custom(ll)
8548
8547
  }),
8549
8548
  expanded: e.optional.boolean,
8550
8549
  picker: e.optional.custom(zi)
@@ -8557,14 +8556,14 @@ var wo = { exports: {} };
8557
8556
  var e;
8558
8557
  return (e = n.color) === null || e === void 0 ? void 0 : e.type;
8559
8558
  }
8560
- function ul(n, e) {
8559
+ function cl(n, e) {
8561
8560
  return n.alpha === e.alpha && n.mode === e.mode && n.notation === e.notation && n.type === e.type;
8562
8561
  }
8563
8562
  function pt(n, e) {
8564
8563
  const t = n.match(/^(.+)%$/);
8565
8564
  return Math.min(t ? parseFloat(t[1]) * 0.01 * e : parseFloat(n), e);
8566
8565
  }
8567
- const pl = {
8566
+ const ul = {
8568
8567
  deg: (n) => n,
8569
8568
  grad: (n) => n * 360 / 400,
8570
8569
  rad: (n) => n * 360 / (2 * Math.PI),
@@ -8575,7 +8574,7 @@ var wo = { exports: {} };
8575
8574
  if (!e)
8576
8575
  return parseFloat(n);
8577
8576
  const t = parseFloat(e[1]), l = e[2];
8578
- return pl[l](t);
8577
+ return ul[l](t);
8579
8578
  }
8580
8579
  function Mo(n) {
8581
8580
  const e = n.match(/^rgb\(\s*([0-9A-Fa-f.]+%?)\s*,\s*([0-9A-Fa-f.]+%?)\s*,\s*([0-9A-Fa-f.]+%?)\s*\)$/);
@@ -8662,7 +8661,7 @@ var wo = { exports: {} };
8662
8661
  parseInt(t[3], 16)
8663
8662
  ] : null;
8664
8663
  }
8665
- function hl(n) {
8664
+ function pl(n) {
8666
8665
  const e = No(n);
8667
8666
  return e ? new te(e, "rgb", "int") : null;
8668
8667
  }
@@ -8683,7 +8682,7 @@ var wo = { exports: {} };
8683
8682
  we(parseInt(t[4], 16), 0, 255, 0, 1)
8684
8683
  ] : null;
8685
8684
  }
8686
- function dl(n) {
8685
+ function hl(n) {
8687
8686
  const e = Bo(n);
8688
8687
  return e ? new te(e, "rgb", "int") : null;
8689
8688
  }
@@ -8722,7 +8721,7 @@ var wo = { exports: {} };
8722
8721
  return t ? new te(t, "rgb", n) : null;
8723
8722
  };
8724
8723
  }
8725
- const ml = [
8724
+ const dl = [
8726
8725
  {
8727
8726
  parser: No,
8728
8727
  result: {
@@ -8788,17 +8787,17 @@ var wo = { exports: {} };
8788
8787
  }
8789
8788
  }
8790
8789
  ];
8791
- function fl(n) {
8792
- return ml.reduce((e, { parser: t, result: l }) => e || (t(n) ? l : null), null);
8790
+ function ml(n) {
8791
+ return dl.reduce((e, { parser: t, result: l }) => e || (t(n) ? l : null), null);
8793
8792
  }
8794
8793
  function Or(n, e = "int") {
8795
- const t = fl(n);
8794
+ const t = ml(n);
8796
8795
  return t ? t.notation === "hex" && e !== "float" ? Object.assign(Object.assign({}, t), { type: "int" }) : t.notation === "func" ? Object.assign(Object.assign({}, t), { type: e }) : null : null;
8797
8796
  }
8798
8797
  const Go = {
8799
8798
  int: [
8799
+ pl,
8800
8800
  hl,
8801
- dl,
8802
8801
  So("int"),
8803
8802
  Ro("int"),
8804
8803
  Io("int"),
@@ -8815,7 +8814,7 @@ var wo = { exports: {} };
8815
8814
  Uo("float")
8816
8815
  ]
8817
8816
  };
8818
- function vl(n) {
8817
+ function fl(n) {
8819
8818
  const e = Go[n];
8820
8819
  return (t) => {
8821
8820
  if (typeof t != "string")
@@ -8844,17 +8843,17 @@ var wo = { exports: {} };
8844
8843
  const t = De(e === "float" ? 2 : 0);
8845
8844
  return `rgb(${u(n.getComponents("rgb", e)).map((b) => t(b)).join(", ")})`;
8846
8845
  }
8847
- function bl(n) {
8846
+ function vl(n) {
8848
8847
  return (e) => $o(e, n);
8849
8848
  }
8850
8849
  function Ds(n, e) {
8851
8850
  const t = De(2), l = De(e === "float" ? 2 : 0);
8852
8851
  return `rgba(${n.getComponents("rgb", e).map((E, k) => (k === 3 ? t : l)(E)).join(", ")})`;
8853
8852
  }
8854
- function gl(n) {
8853
+ function bl(n) {
8855
8854
  return (e) => Ds(e, n);
8856
8855
  }
8857
- function _l(n) {
8856
+ function gl(n) {
8858
8857
  const e = [
8859
8858
  De(0),
8860
8859
  Cn,
@@ -8862,7 +8861,7 @@ var wo = { exports: {} };
8862
8861
  ];
8863
8862
  return `hsl(${u(n.getComponents("hsl")).map((l, b) => e[b](l)).join(", ")})`;
8864
8863
  }
8865
- function wl(n) {
8864
+ function _l(n) {
8866
8865
  const e = [
8867
8866
  De(0),
8868
8867
  Cn,
@@ -8875,7 +8874,7 @@ var wo = { exports: {} };
8875
8874
  const t = De(e === "float" ? 2 : 0), l = ["r", "g", "b"];
8876
8875
  return `{${u(n.getComponents("rgb", e)).map((E, k) => `${l[k]}: ${t(E)}`).join(", ")}}`;
8877
8876
  }
8878
- function yl(n) {
8877
+ function wl(n) {
8879
8878
  return (e) => Xo(e, n);
8880
8879
  }
8881
8880
  function Yo(n, e) {
@@ -8885,10 +8884,10 @@ var wo = { exports: {} };
8885
8884
  return `${b[j]}: ${Q(k)}`;
8886
8885
  }).join(", ")}}`;
8887
8886
  }
8888
- function xl(n) {
8887
+ function yl(n) {
8889
8888
  return (e) => Yo(e, n);
8890
8889
  }
8891
- const El = [
8890
+ const xl = [
8892
8891
  {
8893
8892
  format: {
8894
8893
  alpha: !1,
@@ -8914,7 +8913,7 @@ var wo = { exports: {} };
8914
8913
  notation: "func",
8915
8914
  type: "int"
8916
8915
  },
8917
- stringifier: _l
8916
+ stringifier: gl
8918
8917
  },
8919
8918
  {
8920
8919
  format: {
@@ -8923,7 +8922,7 @@ var wo = { exports: {} };
8923
8922
  notation: "func",
8924
8923
  type: "int"
8925
8924
  },
8926
- stringifier: wl
8925
+ stringifier: _l
8927
8926
  },
8928
8927
  ...["int", "float"].reduce((n, e) => [
8929
8928
  ...n,
@@ -8934,7 +8933,7 @@ var wo = { exports: {} };
8934
8933
  notation: "func",
8935
8934
  type: e
8936
8935
  },
8937
- stringifier: bl(e)
8936
+ stringifier: vl(e)
8938
8937
  },
8939
8938
  {
8940
8939
  format: {
@@ -8943,7 +8942,7 @@ var wo = { exports: {} };
8943
8942
  notation: "func",
8944
8943
  type: e
8945
8944
  },
8946
- stringifier: gl(e)
8945
+ stringifier: bl(e)
8947
8946
  },
8948
8947
  {
8949
8948
  format: {
@@ -8952,7 +8951,7 @@ var wo = { exports: {} };
8952
8951
  notation: "object",
8953
8952
  type: e
8954
8953
  },
8955
- stringifier: yl(e)
8954
+ stringifier: wl(e)
8956
8955
  },
8957
8956
  {
8958
8957
  format: {
@@ -8961,15 +8960,15 @@ var wo = { exports: {} };
8961
8960
  notation: "object",
8962
8961
  type: e
8963
8962
  },
8964
- stringifier: xl(e)
8963
+ stringifier: yl(e)
8965
8964
  }
8966
8965
  ], [])
8967
8966
  ];
8968
8967
  function Fr(n) {
8969
- return El.reduce((e, t) => e || (ul(t.format, n) ? t.stringifier : null), null);
8968
+ return xl.reduce((e, t) => e || (cl(t.format, n) ? t.stringifier : null), null);
8970
8969
  }
8971
8970
  const Hi = D("apl");
8972
- class Cl {
8971
+ class El {
8973
8972
  constructor(e, t) {
8974
8973
  this.onValueChange_ = this.onValueChange_.bind(this), this.value = t.value, this.value.emitter.on("change", this.onValueChange_), this.element = e.createElement("div"), this.element.classList.add(Hi()), t.viewProps.bindClassModifiers(this.element), t.viewProps.bindTabIndex(this.element);
8975
8974
  const l = e.createElement("div");
@@ -8995,9 +8994,9 @@ var wo = { exports: {} };
8995
8994
  this.update_();
8996
8995
  }
8997
8996
  }
8998
- class Pl {
8997
+ class Cl {
8999
8998
  constructor(e, t) {
9000
- this.onKeyDown_ = this.onKeyDown_.bind(this), this.onKeyUp_ = this.onKeyUp_.bind(this), this.onPointerDown_ = this.onPointerDown_.bind(this), this.onPointerMove_ = this.onPointerMove_.bind(this), this.onPointerUp_ = this.onPointerUp_.bind(this), this.value = t.value, this.viewProps = t.viewProps, this.view = new Cl(e, {
8999
+ this.onKeyDown_ = this.onKeyDown_.bind(this), this.onKeyUp_ = this.onKeyUp_.bind(this), this.onPointerDown_ = this.onPointerDown_.bind(this), this.onPointerMove_ = this.onPointerMove_.bind(this), this.onPointerUp_ = this.onPointerUp_.bind(this), this.value = t.value, this.viewProps = t.viewProps, this.view = new El(e, {
9001
9000
  value: this.value,
9002
9001
  viewProps: this.viewProps
9003
9002
  }), this.ptHandler_ = new It(this.view.element), this.ptHandler_.emitter.on("down", this.onPointerDown_), this.ptHandler_.emitter.on("move", this.onPointerMove_), this.ptHandler_.emitter.on("up", this.onPointerUp_), this.view.element.addEventListener("keydown", this.onKeyDown_), this.view.element.addEventListener("keyup", this.onKeyUp_);
@@ -9044,7 +9043,7 @@ var wo = { exports: {} };
9044
9043
  }
9045
9044
  }
9046
9045
  const oi = D("coltxt");
9047
- function Tl(n) {
9046
+ function Pl(n) {
9048
9047
  const e = n.createElement("select"), t = [
9049
9048
  { text: "RGB", value: "rgb" },
9050
9049
  { text: "HSL", value: "hsl" },
@@ -9055,11 +9054,11 @@ var wo = { exports: {} };
9055
9054
  return E.textContent = b.text, E.value = b.value, l.appendChild(E), l;
9056
9055
  }, n.createDocumentFragment())), e;
9057
9056
  }
9058
- class kl {
9057
+ class Tl {
9059
9058
  constructor(e, t) {
9060
9059
  this.element = e.createElement("div"), this.element.classList.add(oi()), t.viewProps.bindClassModifiers(this.element);
9061
9060
  const l = e.createElement("div");
9062
- l.classList.add(oi("m")), this.modeElem_ = Tl(e), this.modeElem_.classList.add(oi("ms")), l.appendChild(this.modeSelectElement), t.viewProps.bindDisabled(this.modeElem_);
9061
+ l.classList.add(oi("m")), this.modeElem_ = Pl(e), this.modeElem_.classList.add(oi("ms")), l.appendChild(this.modeSelectElement), t.viewProps.bindDisabled(this.modeElem_);
9063
9062
  const b = e.createElement("div");
9064
9063
  b.classList.add(oi("mm")), b.appendChild(Et(e, "dropdown")), l.appendChild(b), this.element.appendChild(l);
9065
9064
  const E = e.createElement("div");
@@ -9085,10 +9084,10 @@ var wo = { exports: {} };
9085
9084
  });
9086
9085
  }
9087
9086
  }
9088
- function Al(n) {
9087
+ function kl(n) {
9089
9088
  return De(n === "float" ? 2 : 0);
9090
9089
  }
9091
- function Ml(n, e, t) {
9090
+ function Al(n, e, t) {
9092
9091
  const l = T(n, e)[t];
9093
9092
  return new Yt({
9094
9093
  min: 0,
@@ -9102,17 +9101,17 @@ var wo = { exports: {} };
9102
9101
  parser: e.parser,
9103
9102
  props: X.fromObject({
9104
9103
  draggingScale: e.colorType === "float" ? 0.01 : 1,
9105
- formatter: Al(e.colorType)
9104
+ formatter: kl(e.colorType)
9106
9105
  }),
9107
9106
  value: ee(0, {
9108
- constraint: Ml(e.colorMode, e.colorType, t)
9107
+ constraint: Al(e.colorMode, e.colorType, t)
9109
9108
  }),
9110
9109
  viewProps: e.viewProps
9111
9110
  });
9112
9111
  }
9113
- class Sl {
9112
+ class Ml {
9114
9113
  constructor(e, t) {
9115
- this.onModeSelectChange_ = this.onModeSelectChange_.bind(this), this.colorType_ = t.colorType, this.parser_ = t.parser, this.value = t.value, this.viewProps = t.viewProps, this.colorMode = ee(this.value.rawValue.mode), this.ccs_ = this.createComponentControllers_(e), this.view = new kl(e, {
9114
+ this.onModeSelectChange_ = this.onModeSelectChange_.bind(this), this.colorType_ = t.colorType, this.parser_ = t.parser, this.value = t.value, this.viewProps = t.viewProps, this.colorMode = ee(this.value.rawValue.mode), this.ccs_ = this.createComponentControllers_(e), this.view = new Tl(e, {
9116
9115
  colorMode: this.colorMode,
9117
9116
  textViews: [this.ccs_[0].view, this.ccs_[1].view, this.ccs_[2].view],
9118
9117
  viewProps: this.viewProps
@@ -9151,7 +9150,7 @@ var wo = { exports: {} };
9151
9150
  }
9152
9151
  }
9153
9152
  const zr = D("hpl");
9154
- class Ll {
9153
+ class Sl {
9155
9154
  constructor(e, t) {
9156
9155
  this.onValueChange_ = this.onValueChange_.bind(this), this.value = t.value, this.value.emitter.on("change", this.onValueChange_), this.element = e.createElement("div"), this.element.classList.add(zr()), t.viewProps.bindClassModifiers(this.element), t.viewProps.bindTabIndex(this.element);
9157
9156
  const l = e.createElement("div");
@@ -9169,9 +9168,9 @@ var wo = { exports: {} };
9169
9168
  this.update_();
9170
9169
  }
9171
9170
  }
9172
- class Rl {
9171
+ class Ll {
9173
9172
  constructor(e, t) {
9174
- this.onKeyDown_ = this.onKeyDown_.bind(this), this.onKeyUp_ = this.onKeyUp_.bind(this), this.onPointerDown_ = this.onPointerDown_.bind(this), this.onPointerMove_ = this.onPointerMove_.bind(this), this.onPointerUp_ = this.onPointerUp_.bind(this), this.value = t.value, this.viewProps = t.viewProps, this.view = new Ll(e, {
9173
+ this.onKeyDown_ = this.onKeyDown_.bind(this), this.onKeyUp_ = this.onKeyUp_.bind(this), this.onPointerDown_ = this.onPointerDown_.bind(this), this.onPointerMove_ = this.onPointerMove_.bind(this), this.onPointerUp_ = this.onPointerUp_.bind(this), this.value = t.value, this.viewProps = t.viewProps, this.view = new Sl(e, {
9175
9174
  value: this.value,
9176
9175
  viewProps: this.viewProps
9177
9176
  }), this.ptHandler_ = new It(this.view.element), this.ptHandler_.emitter.on("down", this.onPointerDown_), this.ptHandler_.emitter.on("move", this.onPointerMove_), this.ptHandler_.emitter.on("up", this.onPointerUp_), this.view.element.addEventListener("keydown", this.onKeyDown_), this.view.element.addEventListener("keyup", this.onKeyUp_);
@@ -9218,7 +9217,7 @@ var wo = { exports: {} };
9218
9217
  }
9219
9218
  }
9220
9219
  const Ur = D("svp"), qo = 64;
9221
- class Vl {
9220
+ class Rl {
9222
9221
  constructor(e, t) {
9223
9222
  this.onValueChange_ = this.onValueChange_.bind(this), this.value = t.value, this.value.emitter.on("change", this.onValueChange_), this.element = e.createElement("div"), this.element.classList.add(Ur()), t.viewProps.bindClassModifiers(this.element), t.viewProps.bindTabIndex(this.element);
9224
9223
  const l = e.createElement("canvas");
@@ -9246,9 +9245,9 @@ var wo = { exports: {} };
9246
9245
  this.update_();
9247
9246
  }
9248
9247
  }
9249
- class Il {
9248
+ class Vl {
9250
9249
  constructor(e, t) {
9251
- this.onKeyDown_ = this.onKeyDown_.bind(this), this.onKeyUp_ = this.onKeyUp_.bind(this), this.onPointerDown_ = this.onPointerDown_.bind(this), this.onPointerMove_ = this.onPointerMove_.bind(this), this.onPointerUp_ = this.onPointerUp_.bind(this), this.value = t.value, this.viewProps = t.viewProps, this.view = new Vl(e, {
9250
+ this.onKeyDown_ = this.onKeyDown_.bind(this), this.onKeyUp_ = this.onKeyUp_.bind(this), this.onPointerDown_ = this.onPointerDown_.bind(this), this.onPointerMove_ = this.onPointerMove_.bind(this), this.onPointerUp_ = this.onPointerUp_.bind(this), this.value = t.value, this.viewProps = t.viewProps, this.view = new Rl(e, {
9252
9251
  value: this.value,
9253
9252
  viewProps: this.viewProps
9254
9253
  }), this.ptHandler_ = new It(this.view.element), this.ptHandler_.emitter.on("down", this.onPointerDown_), this.ptHandler_.emitter.on("move", this.onPointerMove_), this.ptHandler_.emitter.on("up", this.onPointerUp_), this.view.element.addEventListener("keydown", this.onKeyDown_), this.view.element.addEventListener("keyup", this.onKeyUp_);
@@ -9293,16 +9292,16 @@ var wo = { exports: {} };
9293
9292
  });
9294
9293
  }
9295
9294
  }
9296
- class Dl {
9295
+ class Il {
9297
9296
  constructor(e, t) {
9298
- this.value = t.value, this.viewProps = t.viewProps, this.hPaletteC_ = new Rl(e, {
9297
+ this.value = t.value, this.viewProps = t.viewProps, this.hPaletteC_ = new Ll(e, {
9299
9298
  value: this.value,
9300
9299
  viewProps: this.viewProps
9301
- }), this.svPaletteC_ = new Il(e, {
9300
+ }), this.svPaletteC_ = new Vl(e, {
9302
9301
  value: this.value,
9303
9302
  viewProps: this.viewProps
9304
9303
  }), this.alphaIcs_ = t.supportsAlpha ? {
9305
- palette: new Pl(e, {
9304
+ palette: new Cl(e, {
9306
9305
  value: this.value,
9307
9306
  viewProps: this.viewProps
9308
9307
  }),
@@ -9326,7 +9325,7 @@ var wo = { exports: {} };
9326
9325
  const E = l.rawValue.getComponents();
9327
9326
  return E[3] = b.rawValue, new te(E, l.rawValue.mode);
9328
9327
  }
9329
- }), this.textC_ = new Sl(e, {
9328
+ }), this.textC_ = new Ml(e, {
9330
9329
  colorType: t.colorType,
9331
9330
  parser: ct,
9332
9331
  value: this.value,
@@ -9348,7 +9347,7 @@ var wo = { exports: {} };
9348
9347
  }
9349
9348
  }
9350
9349
  const Gr = D("colsw");
9351
- class Ol {
9350
+ class Dl {
9352
9351
  constructor(e, t) {
9353
9352
  this.onValueChange_ = this.onValueChange_.bind(this), t.value.emitter.on("change", this.onValueChange_), this.value = t.value, this.element = e.createElement("div"), this.element.classList.add(Gr()), t.viewProps.bindClassModifiers(this.element);
9354
9353
  const l = e.createElement("div");
@@ -9364,9 +9363,9 @@ var wo = { exports: {} };
9364
9363
  this.update_();
9365
9364
  }
9366
9365
  }
9367
- class Nl {
9366
+ class Ol {
9368
9367
  constructor(e, t) {
9369
- this.value = t.value, this.viewProps = t.viewProps, this.view = new Ol(e, {
9368
+ this.value = t.value, this.viewProps = t.viewProps, this.view = new Dl(e, {
9370
9369
  value: this.value,
9371
9370
  viewProps: this.viewProps
9372
9371
  });
@@ -9374,7 +9373,7 @@ var wo = { exports: {} };
9374
9373
  }
9375
9374
  class Hr {
9376
9375
  constructor(e, t) {
9377
- this.onButtonBlur_ = this.onButtonBlur_.bind(this), this.onButtonClick_ = this.onButtonClick_.bind(this), this.onPopupChildBlur_ = this.onPopupChildBlur_.bind(this), this.onPopupChildKeydown_ = this.onPopupChildKeydown_.bind(this), this.value = t.value, this.viewProps = t.viewProps, this.foldable_ = Fe.create(t.expanded), this.swatchC_ = new Nl(e, {
9376
+ this.onButtonBlur_ = this.onButtonBlur_.bind(this), this.onButtonClick_ = this.onButtonClick_.bind(this), this.onPopupChildBlur_ = this.onPopupChildBlur_.bind(this), this.onPopupChildKeydown_ = this.onPopupChildKeydown_.bind(this), this.value = t.value, this.viewProps = t.viewProps, this.foldable_ = Fe.create(t.expanded), this.swatchC_ = new Ol(e, {
9378
9377
  value: this.value,
9379
9378
  viewProps: this.viewProps
9380
9379
  });
@@ -9392,7 +9391,7 @@ var wo = { exports: {} };
9392
9391
  }), this.view.swatchElement.appendChild(this.swatchC_.view.element), this.view.textElement.appendChild(this.textC_.view.element), this.popC_ = t.pickerLayout === "popup" ? new gs(e, {
9393
9392
  viewProps: this.viewProps
9394
9393
  }) : null;
9395
- const b = new Dl(e, {
9394
+ const b = new Il(e, {
9396
9395
  colorType: t.colorType,
9397
9396
  supportsAlpha: t.supportsAlpha,
9398
9397
  value: this.value,
@@ -9429,22 +9428,22 @@ var wo = { exports: {} };
9429
9428
  this.popC_ ? e.key === "Escape" && (this.popC_.shows.rawValue = !1) : this.view.pickerElement && e.key === "Escape" && this.swatchC_.view.buttonElement.focus();
9430
9429
  }
9431
9430
  }
9432
- function Bl(n, e) {
9431
+ function Nl(n, e) {
9433
9432
  return te.isColorObject(n) ? te.fromObject(n, e) : te.black(e);
9434
9433
  }
9435
- function Fl(n) {
9434
+ function Bl(n) {
9436
9435
  return u(n.getComponents("rgb")).reduce((e, t) => e << 8 | Math.floor(t) & 255, 0);
9437
9436
  }
9438
- function jl(n) {
9437
+ function Fl(n) {
9439
9438
  return n.getComponents("rgb").reduce((e, t, l) => {
9440
9439
  const b = Math.floor(l === 3 ? t * 255 : t) & 255;
9441
9440
  return e << 8 | b;
9442
9441
  }, 0) >>> 0;
9443
9442
  }
9444
- function zl(n) {
9443
+ function jl(n) {
9445
9444
  return new te([n >> 16 & 255, n >> 8 & 255, n & 255], "rgb");
9446
9445
  }
9447
- function Ul(n) {
9446
+ function zl(n) {
9448
9447
  return new te([
9449
9448
  n >> 24 & 255,
9450
9449
  n >> 16 & 255,
@@ -9452,52 +9451,52 @@ var wo = { exports: {} };
9452
9451
  we(n & 255, 0, 255, 0, 1)
9453
9452
  ], "rgb");
9454
9453
  }
9454
+ function Ul(n) {
9455
+ return typeof n != "number" ? te.black() : jl(n);
9456
+ }
9455
9457
  function Gl(n) {
9456
9458
  return typeof n != "number" ? te.black() : zl(n);
9457
9459
  }
9458
9460
  function Hl(n) {
9459
- return typeof n != "number" ? te.black() : Ul(n);
9460
- }
9461
- function Kl(n) {
9462
9461
  const e = Fr(n);
9463
9462
  return e ? (t, l) => {
9464
9463
  st(t, e(l));
9465
9464
  } : null;
9466
9465
  }
9467
- function $l(n) {
9468
- const e = n ? jl : Fl;
9466
+ function Kl(n) {
9467
+ const e = n ? Fl : Bl;
9469
9468
  return (t, l) => {
9470
9469
  st(t, e(l));
9471
9470
  };
9472
9471
  }
9473
- function Xl(n, e, t) {
9472
+ function $l(n, e, t) {
9474
9473
  const l = e.toRgbaObject(t);
9475
9474
  n.writeProperty("r", l.r), n.writeProperty("g", l.g), n.writeProperty("b", l.b), n.writeProperty("a", l.a);
9476
9475
  }
9477
- function Yl(n, e, t) {
9476
+ function Xl(n, e, t) {
9478
9477
  const l = e.toRgbaObject(t);
9479
9478
  n.writeProperty("r", l.r), n.writeProperty("g", l.g), n.writeProperty("b", l.b);
9480
9479
  }
9481
- function ql(n, e) {
9480
+ function Yl(n, e) {
9482
9481
  return (t, l) => {
9483
- n ? Xl(t, l, e) : Yl(t, l, e);
9482
+ n ? $l(t, l, e) : Xl(t, l, e);
9484
9483
  };
9485
9484
  }
9486
9485
  function Kr(n) {
9487
9486
  var e;
9488
9487
  return !!(n != null && n.alpha || !((e = n == null ? void 0 : n.color) === null || e === void 0) && e.alpha);
9489
9488
  }
9490
- function Ql(n) {
9489
+ function ql(n) {
9491
9490
  return n ? (e) => Br(e, "0x") : (e) => Ko(e, "0x");
9492
9491
  }
9493
- function Zl(n) {
9492
+ function Ql(n) {
9494
9493
  return "color" in n || "view" in n && n.view === "color";
9495
9494
  }
9496
- const Wl = {
9495
+ const Zl = {
9497
9496
  id: "input-color-number",
9498
9497
  type: "input",
9499
9498
  accept: (n, e) => {
9500
- if (typeof n != "number" || !Zl(e))
9499
+ if (typeof n != "number" || !Ql(e))
9501
9500
  return null;
9502
9501
  const t = Dr(e);
9503
9502
  return t ? {
@@ -9506,16 +9505,16 @@ var wo = { exports: {} };
9506
9505
  } : null;
9507
9506
  },
9508
9507
  binding: {
9509
- reader: (n) => Kr(n.params) ? Hl : Gl,
9508
+ reader: (n) => Kr(n.params) ? Gl : Ul,
9510
9509
  equals: te.equals,
9511
- writer: (n) => $l(Kr(n.params))
9510
+ writer: (n) => Kl(Kr(n.params))
9512
9511
  },
9513
9512
  controller: (n) => {
9514
9513
  const e = Kr(n.params), t = "expanded" in n.params ? n.params.expanded : void 0, l = "picker" in n.params ? n.params.picker : void 0;
9515
9514
  return new Hr(n.document, {
9516
9515
  colorType: "int",
9517
9516
  expanded: t ?? !1,
9518
- formatter: Ql(e),
9517
+ formatter: ql(e),
9519
9518
  parser: Nr("int"),
9520
9519
  pickerLayout: l ?? "popup",
9521
9520
  supportsAlpha: e,
@@ -9524,16 +9523,16 @@ var wo = { exports: {} };
9524
9523
  });
9525
9524
  }
9526
9525
  };
9527
- function Jl(n) {
9526
+ function Wl(n) {
9528
9527
  return te.isRgbaColorObject(n);
9529
9528
  }
9530
- function ec(n) {
9531
- return (e) => Bl(e, n);
9529
+ function Jl(n) {
9530
+ return (e) => Nl(e, n);
9532
9531
  }
9533
- function tc(n, e) {
9532
+ function ec(n, e) {
9534
9533
  return (t) => n ? Yo(t, e) : Xo(t, e);
9535
9534
  }
9536
- const nc = {
9535
+ const tc = {
9537
9536
  id: "input-color-object",
9538
9537
  type: "input",
9539
9538
  accept: (n, e) => {
@@ -9546,9 +9545,9 @@ var wo = { exports: {} };
9546
9545
  } : null;
9547
9546
  },
9548
9547
  binding: {
9549
- reader: (n) => ec(Rn(n.params)),
9548
+ reader: (n) => Jl(Rn(n.params)),
9550
9549
  equals: te.equals,
9551
- writer: (n) => ql(Jl(n.initialValue), Rn(n.params))
9550
+ writer: (n) => Yl(Wl(n.initialValue), Rn(n.params))
9552
9551
  },
9553
9552
  controller: (n) => {
9554
9553
  var e;
@@ -9556,7 +9555,7 @@ var wo = { exports: {} };
9556
9555
  return new Hr(n.document, {
9557
9556
  colorType: E,
9558
9557
  expanded: l ?? !1,
9559
- formatter: tc(t, E),
9558
+ formatter: ec(t, E),
9560
9559
  parser: Nr(E),
9561
9560
  pickerLayout: b ?? "popup",
9562
9561
  supportsAlpha: t,
@@ -9564,7 +9563,7 @@ var wo = { exports: {} };
9564
9563
  viewProps: n.viewProps
9565
9564
  });
9566
9565
  }
9567
- }, ic = {
9566
+ }, nc = {
9568
9567
  id: "input-color-string",
9569
9568
  type: "input",
9570
9569
  accept: (n, e) => {
@@ -9582,14 +9581,14 @@ var wo = { exports: {} };
9582
9581
  binding: {
9583
9582
  reader: (n) => {
9584
9583
  var e;
9585
- return vl((e = Rn(n.params)) !== null && e !== void 0 ? e : "int");
9584
+ return fl((e = Rn(n.params)) !== null && e !== void 0 ? e : "int");
9586
9585
  },
9587
9586
  equals: te.equals,
9588
9587
  writer: (n) => {
9589
9588
  const e = Or(n.initialValue, Rn(n.params));
9590
9589
  if (!e)
9591
9590
  throw S.shouldNeverHappen();
9592
- const t = Kl(e);
9591
+ const t = Hl(e);
9593
9592
  if (!t)
9594
9593
  throw S.notBindable();
9595
9594
  return t;
@@ -9628,7 +9627,7 @@ var wo = { exports: {} };
9628
9627
  }
9629
9628
  }
9630
9629
  const Qo = D("pndtxt");
9631
- class sc {
9630
+ class ic {
9632
9631
  constructor(e, t) {
9633
9632
  this.textViews = t.textViews, this.element = e.createElement("div"), this.element.classList.add(Qo()), this.textViews.forEach((l) => {
9634
9633
  const b = e.createElement("div");
@@ -9636,7 +9635,7 @@ var wo = { exports: {} };
9636
9635
  });
9637
9636
  }
9638
9637
  }
9639
- function rc(n, e, t) {
9638
+ function sc(n, e, t) {
9640
9639
  return new Tn(n, {
9641
9640
  arrayPosition: t === 0 ? "fst" : t === e.axes.length - 1 ? "lst" : "mid",
9642
9641
  baseStep: e.axes[t].baseStep,
@@ -9650,7 +9649,7 @@ var wo = { exports: {} };
9650
9649
  }
9651
9650
  class $r {
9652
9651
  constructor(e, t) {
9653
- this.value = t.value, this.viewProps = t.viewProps, this.acs_ = t.axes.map((l, b) => rc(e, t, b)), this.acs_.forEach((l, b) => {
9652
+ this.value = t.value, this.viewProps = t.viewProps, this.acs_ = t.axes.map((l, b) => sc(e, t, b)), this.acs_.forEach((l, b) => {
9654
9653
  Qt({
9655
9654
  primary: this.value,
9656
9655
  secondary: l.value,
@@ -9660,31 +9659,31 @@ var wo = { exports: {} };
9660
9659
  return j[b] = k.rawValue, t.assembly.fromComponents(j);
9661
9660
  }
9662
9661
  });
9663
- }), this.view = new sc(e, {
9662
+ }), this.view = new ic(e, {
9664
9663
  textViews: this.acs_.map((l) => l.view)
9665
9664
  });
9666
9665
  }
9667
9666
  }
9668
9667
  function Zo(n, e) {
9669
- return "step" in n && !w(n.step) ? new Jn(n.step, e) : null;
9668
+ return "step" in n && !_(n.step) ? new Jn(n.step, e) : null;
9670
9669
  }
9671
9670
  function Wo(n) {
9672
- return !w(n.max) && !w(n.min) ? new Yt({
9671
+ return !_(n.max) && !_(n.min) ? new Yt({
9673
9672
  max: n.max,
9674
9673
  min: n.min
9675
- }) : !w(n.max) || !w(n.min) ? new Ai({
9674
+ }) : !_(n.max) || !_(n.min) ? new Ai({
9676
9675
  max: n.max,
9677
9676
  min: n.min
9678
9677
  }) : null;
9679
9678
  }
9680
- function oc(n) {
9679
+ function rc(n) {
9681
9680
  const e = it(n, Yt);
9682
9681
  if (e)
9683
9682
  return [e.values.get("min"), e.values.get("max")];
9684
9683
  const t = it(n, Ai);
9685
9684
  return t ? [t.minValue, t.maxValue] : [void 0, void 0];
9686
9685
  }
9687
- function ac(n, e) {
9686
+ function oc(n, e) {
9688
9687
  const t = [], l = Zo(n, e);
9689
9688
  l && t.push(l);
9690
9689
  const b = Wo(n);
@@ -9692,7 +9691,7 @@ var wo = { exports: {} };
9692
9691
  const E = Ui(n.options);
9693
9692
  return E && t.push(E), new wn(t);
9694
9693
  }
9695
- const lc = {
9694
+ const ac = {
9696
9695
  id: "input-number",
9697
9696
  type: "input",
9698
9697
  accept: (n, e) => {
@@ -9712,7 +9711,7 @@ var wo = { exports: {} };
9712
9711
  },
9713
9712
  binding: {
9714
9713
  reader: (n) => _t,
9715
- constraint: (n) => ac(n.params, n.initialValue),
9714
+ constraint: (n) => oc(n.params, n.initialValue),
9716
9715
  writer: (n) => st
9717
9716
  },
9718
9717
  controller: (n) => {
@@ -9760,7 +9759,7 @@ var wo = { exports: {} };
9760
9759
  return [this.x, this.y];
9761
9760
  }
9762
9761
  static isObject(e) {
9763
- if (w(e))
9762
+ if (_(e))
9764
9763
  return !1;
9765
9764
  const t = e.x, l = e.y;
9766
9765
  return !(typeof t != "number" || typeof l != "number");
@@ -9779,7 +9778,7 @@ var wo = { exports: {} };
9779
9778
  toComponents: (n) => n.getComponents(),
9780
9779
  fromComponents: (n) => new Jt(...n)
9781
9780
  }, ai = D("p2d");
9782
- class cc {
9781
+ class lc {
9783
9782
  constructor(e, t) {
9784
9783
  this.element = e.createElement("div"), this.element.classList.add(ai()), t.viewProps.bindClassModifiers(this.element), F(t.expanded, K(this.element, ai(void 0, "expanded")));
9785
9784
  const l = e.createElement("div");
@@ -9795,7 +9794,7 @@ var wo = { exports: {} };
9795
9794
  }
9796
9795
  }
9797
9796
  const en = D("p2dp");
9798
- class uc {
9797
+ class cc {
9799
9798
  constructor(e, t) {
9800
9799
  this.onFoldableChange_ = this.onFoldableChange_.bind(this), this.onValueChange_ = this.onValueChange_.bind(this), this.invertsY_ = t.invertsY, this.maxValue_ = t.maxValue, this.element = e.createElement("div"), this.element.classList.add(en()), t.layout === "popup" && this.element.classList.add(en(void 0, "p")), t.viewProps.bindClassModifiers(this.element);
9801
9800
  const l = e.createElement("div");
@@ -9831,9 +9830,9 @@ var wo = { exports: {} };
9831
9830
  je(e[1], Pn(n)) * (t ? 1 : -1)
9832
9831
  ];
9833
9832
  }
9834
- class pc {
9833
+ class uc {
9835
9834
  constructor(e, t) {
9836
- this.onPadKeyDown_ = this.onPadKeyDown_.bind(this), this.onPadKeyUp_ = this.onPadKeyUp_.bind(this), this.onPointerDown_ = this.onPointerDown_.bind(this), this.onPointerMove_ = this.onPointerMove_.bind(this), this.onPointerUp_ = this.onPointerUp_.bind(this), this.value = t.value, this.viewProps = t.viewProps, this.baseSteps_ = t.baseSteps, this.maxValue_ = t.maxValue, this.invertsY_ = t.invertsY, this.view = new uc(e, {
9835
+ this.onPadKeyDown_ = this.onPadKeyDown_.bind(this), this.onPadKeyUp_ = this.onPadKeyUp_.bind(this), this.onPointerDown_ = this.onPointerDown_.bind(this), this.onPointerMove_ = this.onPointerMove_.bind(this), this.onPointerUp_ = this.onPointerUp_.bind(this), this.value = t.value, this.viewProps = t.viewProps, this.baseSteps_ = t.baseSteps, this.maxValue_ = t.maxValue, this.invertsY_ = t.invertsY, this.view = new cc(e, {
9837
9836
  invertsY: this.invertsY_,
9838
9837
  layout: t.layout,
9839
9838
  maxValue: this.maxValue_,
@@ -9881,13 +9880,13 @@ var wo = { exports: {} };
9881
9880
  });
9882
9881
  }
9883
9882
  }
9884
- class hc {
9883
+ class pc {
9885
9884
  constructor(e, t) {
9886
9885
  var l, b;
9887
9886
  this.onPopupChildBlur_ = this.onPopupChildBlur_.bind(this), this.onPopupChildKeydown_ = this.onPopupChildKeydown_.bind(this), this.onPadButtonBlur_ = this.onPadButtonBlur_.bind(this), this.onPadButtonClick_ = this.onPadButtonClick_.bind(this), this.value = t.value, this.viewProps = t.viewProps, this.foldable_ = Fe.create(t.expanded), this.popC_ = t.pickerLayout === "popup" ? new gs(e, {
9888
9887
  viewProps: this.viewProps
9889
9888
  }) : null;
9890
- const E = new pc(e, {
9889
+ const E = new uc(e, {
9891
9890
  baseSteps: [t.axes[0].baseStep, t.axes[1].baseStep],
9892
9891
  invertsY: t.invertsY,
9893
9892
  layout: t.pickerLayout,
@@ -9903,7 +9902,7 @@ var wo = { exports: {} };
9903
9902
  parser: t.parser,
9904
9903
  value: this.value,
9905
9904
  viewProps: this.viewProps
9906
- }), this.view = new cc(e, {
9905
+ }), this.view = new lc(e, {
9907
9906
  expanded: this.foldable_.value("expanded"),
9908
9907
  pickerLayout: t.pickerLayout,
9909
9908
  viewProps: this.viewProps
@@ -9941,7 +9940,7 @@ var wo = { exports: {} };
9941
9940
  return [this.x, this.y, this.z];
9942
9941
  }
9943
9942
  static isObject(e) {
9944
- if (w(e))
9943
+ if (_(e))
9945
9944
  return !1;
9946
9945
  const t = e.x, l = e.y, b = e.z;
9947
9946
  return !(typeof t != "number" || typeof l != "number" || typeof b != "number");
@@ -9961,13 +9960,13 @@ var wo = { exports: {} };
9961
9960
  toComponents: (n) => n.getComponents(),
9962
9961
  fromComponents: (n) => new li(...n)
9963
9962
  };
9964
- function dc(n) {
9963
+ function hc(n) {
9965
9964
  return li.isObject(n) ? new li(n.x, n.y, n.z) : new li();
9966
9965
  }
9967
- function mc(n, e) {
9966
+ function dc(n, e) {
9968
9967
  n.writeProperty("x", e.x), n.writeProperty("y", e.y), n.writeProperty("z", e.z);
9969
9968
  }
9970
- function fc(n, e) {
9969
+ function mc(n, e) {
9971
9970
  return new Wt({
9972
9971
  assembly: ta,
9973
9972
  components: [
@@ -9987,7 +9986,7 @@ var wo = { exports: {} };
9987
9986
  })
9988
9987
  };
9989
9988
  }
9990
- const vc = {
9989
+ const fc = {
9991
9990
  id: "input-point3d",
9992
9991
  type: "input",
9993
9992
  accept: (n, e) => {
@@ -10004,10 +10003,10 @@ var wo = { exports: {} };
10004
10003
  } : null;
10005
10004
  },
10006
10005
  binding: {
10007
- reader: (n) => dc,
10008
- constraint: (n) => fc(n.params, n.initialValue),
10006
+ reader: (n) => hc,
10007
+ constraint: (n) => mc(n.params, n.initialValue),
10009
10008
  equals: li.equals,
10010
- writer: (n) => mc
10009
+ writer: (n) => dc
10011
10010
  },
10012
10011
  controller: (n) => {
10013
10012
  const e = n.value, t = n.constraint;
@@ -10034,7 +10033,7 @@ var wo = { exports: {} };
10034
10033
  return [this.x, this.y, this.z, this.w];
10035
10034
  }
10036
10035
  static isObject(e) {
10037
- if (w(e))
10036
+ if (_(e))
10038
10037
  return !1;
10039
10038
  const t = e.x, l = e.y, b = e.z, E = e.w;
10040
10039
  return !(typeof t != "number" || typeof l != "number" || typeof b != "number" || typeof E != "number");
@@ -10055,13 +10054,13 @@ var wo = { exports: {} };
10055
10054
  toComponents: (n) => n.getComponents(),
10056
10055
  fromComponents: (n) => new ci(...n)
10057
10056
  };
10058
- function bc(n) {
10057
+ function vc(n) {
10059
10058
  return ci.isObject(n) ? new ci(n.x, n.y, n.z, n.w) : new ci();
10060
10059
  }
10061
- function gc(n, e) {
10060
+ function bc(n, e) {
10062
10061
  n.writeProperty("x", e.x), n.writeProperty("y", e.y), n.writeProperty("z", e.z), n.writeProperty("w", e.w);
10063
10062
  }
10064
- function _c(n, e) {
10063
+ function gc(n, e) {
10065
10064
  return new Wt({
10066
10065
  assembly: na,
10067
10066
  components: [
@@ -10072,7 +10071,7 @@ var wo = { exports: {} };
10072
10071
  ]
10073
10072
  });
10074
10073
  }
10075
- function wc(n, e) {
10074
+ function _c(n, e) {
10076
10075
  return {
10077
10076
  baseStep: Dt(e),
10078
10077
  constraint: e,
@@ -10082,7 +10081,7 @@ var wo = { exports: {} };
10082
10081
  })
10083
10082
  };
10084
10083
  }
10085
- const yc = {
10084
+ const wc = {
10086
10085
  id: "input-point4d",
10087
10086
  type: "input",
10088
10087
  accept: (n, e) => {
@@ -10100,10 +10099,10 @@ var wo = { exports: {} };
10100
10099
  } : null;
10101
10100
  },
10102
10101
  binding: {
10103
- reader: (n) => bc,
10104
- constraint: (n) => _c(n.params, n.initialValue),
10102
+ reader: (n) => vc,
10103
+ constraint: (n) => gc(n.params, n.initialValue),
10105
10104
  equals: ci.equals,
10106
- writer: (n) => gc
10105
+ writer: (n) => bc
10107
10106
  },
10108
10107
  controller: (n) => {
10109
10108
  const e = n.value, t = n.constraint;
@@ -10111,18 +10110,18 @@ var wo = { exports: {} };
10111
10110
  throw S.shouldNeverHappen();
10112
10111
  return new $r(n.document, {
10113
10112
  assembly: na,
10114
- axes: e.rawValue.getComponents().map((l, b) => wc(l, t.components[b])),
10113
+ axes: e.rawValue.getComponents().map((l, b) => _c(l, t.components[b])),
10115
10114
  parser: ct,
10116
10115
  value: e,
10117
10116
  viewProps: n.viewProps
10118
10117
  });
10119
10118
  }
10120
10119
  };
10121
- function xc(n) {
10120
+ function yc(n) {
10122
10121
  const e = [], t = Ui(n.options);
10123
10122
  return t && e.push(t), new wn(e);
10124
10123
  }
10125
- const Ec = {
10124
+ const xc = {
10126
10125
  id: "input-string",
10127
10126
  type: "input",
10128
10127
  accept: (n, e) => {
@@ -10138,7 +10137,7 @@ var wo = { exports: {} };
10138
10137
  },
10139
10138
  binding: {
10140
10139
  reader: (n) => Ii,
10141
- constraint: (n) => xc(n.params),
10140
+ constraint: (n) => yc(n.params),
10142
10141
  writer: (n) => st
10143
10142
  },
10144
10143
  controller: (n) => {
@@ -10164,7 +10163,7 @@ var wo = { exports: {} };
10164
10163
  defaultLineCount: 3
10165
10164
  }
10166
10165
  }, ia = D("mll");
10167
- class Cc {
10166
+ class Ec {
10168
10167
  constructor(e, t) {
10169
10168
  this.onValueUpdate_ = this.onValueUpdate_.bind(this), this.formatter_ = t.formatter, this.element = e.createElement("div"), this.element.classList.add(ia()), t.viewProps.bindClassModifiers(this.element);
10170
10169
  const l = e.createElement("textarea");
@@ -10183,7 +10182,7 @@ var wo = { exports: {} };
10183
10182
  }
10184
10183
  class Yr {
10185
10184
  constructor(e, t) {
10186
- this.value = t.value, this.viewProps = t.viewProps, this.view = new Cc(e, {
10185
+ this.value = t.value, this.viewProps = t.viewProps, this.view = new Ec(e, {
10187
10186
  formatter: t.formatter,
10188
10187
  lineCount: t.lineCount,
10189
10188
  value: this.value,
@@ -10192,7 +10191,7 @@ var wo = { exports: {} };
10192
10191
  }
10193
10192
  }
10194
10193
  const sa = D("sgl");
10195
- class Pc {
10194
+ class Cc {
10196
10195
  constructor(e, t) {
10197
10196
  this.onValueUpdate_ = this.onValueUpdate_.bind(this), this.formatter_ = t.formatter, this.element = e.createElement("div"), this.element.classList.add(sa()), t.viewProps.bindClassModifiers(this.element);
10198
10197
  const l = e.createElement("input");
@@ -10208,14 +10207,14 @@ var wo = { exports: {} };
10208
10207
  }
10209
10208
  class qr {
10210
10209
  constructor(e, t) {
10211
- this.value = t.value, this.viewProps = t.viewProps, this.view = new Pc(e, {
10210
+ this.value = t.value, this.viewProps = t.viewProps, this.view = new Cc(e, {
10212
10211
  formatter: t.formatter,
10213
10212
  value: this.value,
10214
10213
  viewProps: this.viewProps
10215
10214
  });
10216
10215
  }
10217
10216
  }
10218
- const Tc = {
10217
+ const Pc = {
10219
10218
  id: "monitor-bool",
10220
10219
  type: "monitor",
10221
10220
  accept: (n, e) => {
@@ -10246,7 +10245,7 @@ var wo = { exports: {} };
10246
10245
  });
10247
10246
  }
10248
10247
  }, tn = D("grl");
10249
- class kc {
10248
+ class Tc {
10250
10249
  constructor(e, t) {
10251
10250
  this.onCursorChange_ = this.onCursorChange_.bind(this), this.onValueUpdate_ = this.onValueUpdate_.bind(this), this.element = e.createElement("div"), this.element.classList.add(tn()), t.viewProps.bindClassModifiers(this.element), this.formatter_ = t.formatter, this.props_ = t.props, this.cursor_ = t.cursor, this.cursor_.emitter.on("change", this.onCursorChange_);
10252
10251
  const l = e.createElementNS(Ke, "svg");
@@ -10282,9 +10281,9 @@ var wo = { exports: {} };
10282
10281
  this.update_();
10283
10282
  }
10284
10283
  }
10285
- class Ac {
10284
+ class kc {
10286
10285
  constructor(e, t) {
10287
- if (this.onGraphMouseMove_ = this.onGraphMouseMove_.bind(this), this.onGraphMouseLeave_ = this.onGraphMouseLeave_.bind(this), this.onGraphPointerDown_ = this.onGraphPointerDown_.bind(this), this.onGraphPointerMove_ = this.onGraphPointerMove_.bind(this), this.onGraphPointerUp_ = this.onGraphPointerUp_.bind(this), this.props_ = t.props, this.value = t.value, this.viewProps = t.viewProps, this.cursor_ = ee(-1), this.view = new kc(e, {
10286
+ if (this.onGraphMouseMove_ = this.onGraphMouseMove_.bind(this), this.onGraphMouseLeave_ = this.onGraphMouseLeave_.bind(this), this.onGraphPointerDown_ = this.onGraphPointerDown_.bind(this), this.onGraphPointerMove_ = this.onGraphPointerMove_.bind(this), this.onGraphPointerUp_ = this.onGraphPointerUp_.bind(this), this.props_ = t.props, this.value = t.value, this.viewProps = t.viewProps, this.cursor_ = ee(-1), this.view = new Tc(e, {
10288
10287
  cursor: this.cursor_,
10289
10288
  formatter: t.formatter,
10290
10289
  lineCount: t.lineCount,
@@ -10320,9 +10319,9 @@ var wo = { exports: {} };
10320
10319
  }
10321
10320
  }
10322
10321
  function Qr(n) {
10323
- return "format" in n && !w(n.format) ? n.format : De(2);
10322
+ return "format" in n && !_(n.format) ? n.format : De(2);
10324
10323
  }
10325
- function Mc(n) {
10324
+ function Ac(n) {
10326
10325
  var e;
10327
10326
  return n.value.rawValue.length === 1 ? new qr(n.document, {
10328
10327
  formatter: Qr(n.params),
@@ -10335,9 +10334,9 @@ var wo = { exports: {} };
10335
10334
  viewProps: n.viewProps
10336
10335
  });
10337
10336
  }
10338
- function Sc(n) {
10337
+ function Mc(n) {
10339
10338
  var e, t, l;
10340
- return new Ac(n.document, {
10339
+ return new kc(n.document, {
10341
10340
  formatter: Qr(n.params),
10342
10341
  lineCount: (e = n.params.lineCount) !== null && e !== void 0 ? e : Ki.monitor.defaultLineCount,
10343
10342
  props: X.fromObject({
@@ -10351,7 +10350,7 @@ var wo = { exports: {} };
10351
10350
  function ra(n) {
10352
10351
  return "view" in n && n.view === "graph";
10353
10352
  }
10354
- const Lc = {
10353
+ const Sc = {
10355
10354
  id: "monitor-number",
10356
10355
  type: "monitor",
10357
10356
  accept: (n, e) => {
@@ -10373,8 +10372,8 @@ var wo = { exports: {} };
10373
10372
  defaultBufferSize: (n) => ra(n) ? 64 : 1,
10374
10373
  reader: (n) => _t
10375
10374
  },
10376
- controller: (n) => ra(n.params) ? Sc(n) : Mc(n)
10377
- }, Rc = {
10375
+ controller: (n) => ra(n.params) ? Mc(n) : Ac(n)
10376
+ }, Lc = {
10378
10377
  id: "monitor-string",
10379
10378
  type: "monitor",
10380
10379
  accept: (n, e) => {
@@ -10407,10 +10406,10 @@ var wo = { exports: {} };
10407
10406
  });
10408
10407
  }
10409
10408
  };
10410
- function Vc(n, e) {
10409
+ function Rc(n, e) {
10411
10410
  var t;
10412
10411
  const l = n.accept(e.target.read(), e.params);
10413
- if (w(l))
10412
+ if (_(l))
10414
10413
  return null;
10415
10414
  const b = A, E = {
10416
10415
  target: e.target,
@@ -10444,13 +10443,13 @@ var wo = { exports: {} };
10444
10443
  valueController: Vn
10445
10444
  });
10446
10445
  }
10447
- function Ic(n, e) {
10446
+ function Vc(n, e) {
10448
10447
  return e === 0 ? new ms() : new ki(n, e ?? Ki.monitor.defaultInterval);
10449
10448
  }
10450
- function Dc(n, e) {
10449
+ function Ic(n, e) {
10451
10450
  var t, l, b;
10452
10451
  const E = A, k = n.accept(e.target.read(), e.params);
10453
- if (w(k))
10452
+ if (_(k))
10454
10453
  return null;
10455
10454
  const j = {
10456
10455
  target: e.target,
@@ -10459,7 +10458,7 @@ var wo = { exports: {} };
10459
10458
  }, Q = n.binding.reader(j), J = (l = (t = E.optional.number(e.params.bufferSize).value) !== null && t !== void 0 ? t : n.binding.defaultBufferSize && n.binding.defaultBufferSize(k.params)) !== null && l !== void 0 ? l : 1, de = E.optional.number(e.params.interval).value, ve = new pr({
10460
10459
  reader: Q,
10461
10460
  target: e.target,
10462
- ticker: Ic(e.document, de),
10461
+ ticker: Vc(e.document, de),
10463
10462
  value: fs(J)
10464
10463
  }), Vn = E.optional.boolean(e.params.disabled).value, $i = E.optional.boolean(e.params.hidden).value, Xi = n.controller({
10465
10464
  document: e.document,
@@ -10479,7 +10478,7 @@ var wo = { exports: {} };
10479
10478
  valueController: Xi
10480
10479
  });
10481
10480
  }
10482
- class Oc {
10481
+ class Dc {
10483
10482
  constructor() {
10484
10483
  this.pluginsMap_ = {
10485
10484
  blades: [],
@@ -10499,14 +10498,14 @@ var wo = { exports: {} };
10499
10498
  }
10500
10499
  createInput(e, t, l) {
10501
10500
  const b = t.read();
10502
- if (w(b))
10501
+ if (_(b))
10503
10502
  throw new S({
10504
10503
  context: {
10505
10504
  key: t.key
10506
10505
  },
10507
10506
  type: "nomatchingcontroller"
10508
10507
  });
10509
- const E = this.pluginsMap_.inputs.reduce((k, j) => k ?? Vc(j, {
10508
+ const E = this.pluginsMap_.inputs.reduce((k, j) => k ?? Rc(j, {
10510
10509
  document: e,
10511
10510
  target: t,
10512
10511
  params: l
@@ -10521,7 +10520,7 @@ var wo = { exports: {} };
10521
10520
  });
10522
10521
  }
10523
10522
  createMonitor(e, t, l) {
10524
- const b = this.pluginsMap_.monitors.reduce((E, k) => E ?? Dc(k, {
10523
+ const b = this.pluginsMap_.monitors.reduce((E, k) => E ?? Ic(k, {
10525
10524
  document: e,
10526
10525
  params: l,
10527
10526
  target: t
@@ -10565,21 +10564,21 @@ var wo = { exports: {} };
10565
10564
  return t;
10566
10565
  }
10567
10566
  }
10568
- function Nc() {
10569
- const n = new Oc();
10567
+ function Oc() {
10568
+ const n = new Dc();
10570
10569
  return [
10571
- Gc,
10572
- vc,
10573
- yc,
10574
- Ec,
10575
- lc,
10576
- ic,
10570
+ Uc,
10571
+ fc,
10572
+ wc,
10573
+ xc,
10574
+ ac,
10577
10575
  nc,
10578
- Wl,
10576
+ tc,
10577
+ Zl,
10579
10578
  ri,
10580
- Tc,
10581
- Rc,
10579
+ Pc,
10582
10580
  Lc,
10581
+ Sc,
10583
10582
  W,
10584
10583
  rr,
10585
10584
  ar,
@@ -10588,10 +10587,10 @@ var wo = { exports: {} };
10588
10587
  n.register(e);
10589
10588
  }), n;
10590
10589
  }
10591
- function Bc(n) {
10590
+ function Nc(n) {
10592
10591
  return Jt.isObject(n) ? new Jt(n.x, n.y) : new Jt();
10593
10592
  }
10594
- function Fc(n, e) {
10593
+ function Bc(n, e) {
10595
10594
  n.writeProperty("x", e.x), n.writeProperty("y", e.y);
10596
10595
  }
10597
10596
  function Bt(n, e) {
@@ -10602,7 +10601,7 @@ var wo = { exports: {} };
10602
10601
  const b = Wo(n);
10603
10602
  return b && t.push(b), new wn(t);
10604
10603
  }
10605
- function jc(n, e) {
10604
+ function Fc(n, e) {
10606
10605
  return new Wt({
10607
10606
  assembly: Jo,
10608
10607
  components: [
@@ -10612,13 +10611,13 @@ var wo = { exports: {} };
10612
10611
  });
10613
10612
  }
10614
10613
  function oa(n, e) {
10615
- const [t, l] = n ? oc(n) : [];
10616
- if (!w(t) || !w(l))
10614
+ const [t, l] = n ? rc(n) : [];
10615
+ if (!_(t) || !_(l))
10617
10616
  return Math.max(Math.abs(t ?? 0), Math.abs(l ?? 0));
10618
10617
  const b = Dt(n);
10619
10618
  return Math.max(Math.abs(b) * 10, Math.abs(e) * 10);
10620
10619
  }
10621
- function zc(n, e) {
10620
+ function jc(n, e) {
10622
10621
  const t = e instanceof Wt ? e.components[0] : void 0, l = e instanceof Wt ? e.components[1] : void 0, b = oa(t, n.x), E = oa(l, n.y);
10623
10622
  return Math.max(b, E);
10624
10623
  }
@@ -10632,13 +10631,13 @@ var wo = { exports: {} };
10632
10631
  })
10633
10632
  };
10634
10633
  }
10635
- function Uc(n) {
10634
+ function zc(n) {
10636
10635
  if (!("y" in n))
10637
10636
  return !1;
10638
10637
  const e = n.y;
10639
10638
  return e && "inverted" in e ? !!e.inverted : !1;
10640
10639
  }
10641
- const Gc = {
10640
+ const Uc = {
10642
10641
  id: "input-point2d",
10643
10642
  type: "input",
10644
10643
  accept: (n, e) => {
@@ -10661,24 +10660,24 @@ var wo = { exports: {} };
10661
10660
  } : null;
10662
10661
  },
10663
10662
  binding: {
10664
- reader: (n) => Bc,
10665
- constraint: (n) => jc(n.params, n.initialValue),
10663
+ reader: (n) => Nc,
10664
+ constraint: (n) => Fc(n.params, n.initialValue),
10666
10665
  equals: Jt.equals,
10667
- writer: (n) => Fc
10666
+ writer: (n) => Bc
10668
10667
  },
10669
10668
  controller: (n) => {
10670
10669
  const e = n.document, t = n.value, l = n.constraint;
10671
10670
  if (!(l instanceof Wt))
10672
10671
  throw S.shouldNeverHappen();
10673
10672
  const b = "expanded" in n.params ? n.params.expanded : void 0, E = "picker" in n.params ? n.params.picker : void 0;
10674
- return new hc(e, {
10673
+ return new pc(e, {
10675
10674
  axes: [
10676
10675
  aa(t.rawValue.x, l.components[0]),
10677
10676
  aa(t.rawValue.y, l.components[1])
10678
10677
  ],
10679
10678
  expanded: b ?? !1,
10680
- invertsY: Uc(n.params),
10681
- maxValue: zc(t.rawValue, l),
10679
+ invertsY: zc(n.params),
10680
+ maxValue: jc(t.rawValue, l),
10682
10681
  parser: ct,
10683
10682
  pickerLayout: E ?? "popup",
10684
10683
  value: t,
@@ -10791,7 +10790,7 @@ var wo = { exports: {} };
10791
10790
  }), this;
10792
10791
  }
10793
10792
  }
10794
- const Hc = function() {
10793
+ const Gc = function() {
10795
10794
  return {
10796
10795
  id: "list",
10797
10796
  type: "blade",
@@ -10827,18 +10826,18 @@ var wo = { exports: {} };
10827
10826
  }
10828
10827
  };
10829
10828
  }();
10830
- function Kc(n) {
10829
+ function Hc(n) {
10831
10830
  return n.reduce((e, t) => Object.assign(e, {
10832
10831
  [t.presetKey]: t.read()
10833
10832
  }), {});
10834
10833
  }
10835
- function $c(n, e) {
10834
+ function Kc(n, e) {
10836
10835
  n.forEach((t) => {
10837
10836
  const l = e[t.target.presetKey];
10838
10837
  l !== void 0 && t.writer(t.target, t.reader(l));
10839
10838
  });
10840
10839
  }
10841
- class Xc extends yi {
10840
+ class $c extends yi {
10842
10841
  /**
10843
10842
  * @hidden
10844
10843
  */
@@ -10854,7 +10853,7 @@ var wo = { exports: {} };
10854
10853
  */
10855
10854
  importPreset(e) {
10856
10855
  const t = this.controller_.rackController.rack.find(Ge).map((l) => l.binding);
10857
- $c(t, e), this.refresh();
10856
+ Kc(t, e), this.refresh();
10858
10857
  }
10859
10858
  /**
10860
10859
  * Exports a preset of all inputs.
@@ -10862,7 +10861,7 @@ var wo = { exports: {} };
10862
10861
  */
10863
10862
  exportPreset() {
10864
10863
  const e = this.controller_.rackController.rack.find(Ge).map((t) => t.binding.target);
10865
- return Kc(e);
10864
+ return Hc(e);
10866
10865
  }
10867
10866
  /**
10868
10867
  * Refreshes all bindings of the pane.
@@ -10875,7 +10874,7 @@ var wo = { exports: {} };
10875
10874
  });
10876
10875
  }
10877
10876
  }
10878
- class Yc extends Qn {
10877
+ class Xc extends Qn {
10879
10878
  constructor(e, t) {
10880
10879
  super(e, {
10881
10880
  expanded: t.expanded,
@@ -10886,7 +10885,7 @@ var wo = { exports: {} };
10886
10885
  });
10887
10886
  }
10888
10887
  }
10889
- const qc = {
10888
+ const Yc = {
10890
10889
  id: "slider",
10891
10890
  type: "blade",
10892
10891
  accept(n) {
@@ -10932,7 +10931,7 @@ var wo = { exports: {} };
10932
10931
  api(n) {
10933
10932
  return !(n.controller instanceof Ht) || !(n.controller.valueController instanceof ii) ? null : new ca(n.controller);
10934
10933
  }
10935
- }, Qc = function() {
10934
+ }, qc = function() {
10936
10935
  return {
10937
10936
  id: "text",
10938
10937
  type: "blade",
@@ -10969,7 +10968,7 @@ var wo = { exports: {} };
10969
10968
  }
10970
10969
  };
10971
10970
  }();
10972
- function Zc(n) {
10971
+ function Qc(n) {
10973
10972
  const e = n.createElement("div");
10974
10973
  return e.classList.add(D("dfw")()), n.body && n.body.appendChild(e), e;
10975
10974
  }
@@ -10979,10 +10978,10 @@ var wo = { exports: {} };
10979
10978
  const l = n.createElement("style");
10980
10979
  l.dataset.tpStyle = e, l.textContent = t, n.head.appendChild(l);
10981
10980
  }
10982
- class Wc extends Xc {
10981
+ class Zc extends $c {
10983
10982
  constructor(e) {
10984
10983
  var t, l;
10985
- const b = e ?? {}, E = (t = b.document) !== null && t !== void 0 ? t : bi(), k = Nc(), j = new Yc(E, {
10984
+ const b = e ?? {}, E = (t = b.document) !== null && t !== void 0 ? t : bi(), k = Oc(), j = new Xc(E, {
10986
10985
  expanded: b.expanded,
10987
10986
  blade: Ee(),
10988
10987
  props: X.fromObject({
@@ -10990,7 +10989,7 @@ var wo = { exports: {} };
10990
10989
  }),
10991
10990
  viewProps: Ze.create()
10992
10991
  });
10993
- super(j, k), this.pool_ = k, this.containerElem_ = (l = b.container) !== null && l !== void 0 ? l : Zc(E), this.containerElem_.appendChild(this.element), this.doc_ = E, this.usesDefaultWrapper_ = !b.container, this.setUpDefaultPlugins_();
10992
+ super(j, k), this.pool_ = k, this.containerElem_ = (l = b.container) !== null && l !== void 0 ? l : Qc(E), this.containerElem_.appendChild(this.element), this.doc_ = E, this.usesDefaultWrapper_ = !b.container, this.setUpDefaultPlugins_();
10994
10993
  }
10995
10994
  get document() {
10996
10995
  if (!this.doc_)
@@ -11020,23 +11019,23 @@ var wo = { exports: {} };
11020
11019
  this.embedPluginStyle_(e);
11021
11020
  }), this.registerPlugin({
11022
11021
  plugins: [
11023
- qc,
11024
- Hc,
11022
+ Yc,
11023
+ Gc,
11025
11024
  Ti,
11026
- Qc
11025
+ qc
11027
11026
  ]
11028
11027
  });
11029
11028
  }
11030
11029
  }
11031
- const Jc = new r("3.1.9");
11032
- s.BladeApi = o, s.ButtonApi = O, s.FolderApi = yi, s.InputBindingApi = _i, s.ListApi = la, s.MonitorBindingApi = wi, s.Pane = Wc, s.SeparatorApi = us, s.SliderApi = ca, s.TabApi = hs, s.TabPageApi = Pi, s.TextApi = ua, s.TpChangeEvent = p, s.VERSION = Jc, Object.defineProperty(s, "__esModule", { value: !0 });
11030
+ const Wc = new r("3.1.9");
11031
+ s.BladeApi = o, s.ButtonApi = O, s.FolderApi = yi, s.InputBindingApi = _i, s.ListApi = la, s.MonitorBindingApi = wi, s.Pane = Zc, s.SeparatorApi = us, s.SliderApi = ca, s.TabApi = hs, s.TabPageApi = Pi, s.TextApi = ua, s.TpChangeEvent = p, s.VERSION = Wc, Object.defineProperty(s, "__esModule", { value: !0 });
11033
11032
  });
11034
11033
  })(wo, wo.exports);
11035
11034
  var Ad = wo.exports, yo = { exports: {} };
11036
11035
  (function(f, i) {
11037
11036
  (function(s, r) {
11038
11037
  r(i);
11039
- })(sl, function(s) {
11038
+ })(il, function(s) {
11040
11039
  class r {
11041
11040
  constructor(a) {
11042
11041
  this.controller_ = a;
@@ -11110,7 +11109,7 @@ var Ad = wo.exports, yo = { exports: {} };
11110
11109
  return new g({ type: "shouldneverhappen" });
11111
11110
  }
11112
11111
  }
11113
- class _ {
11112
+ class w {
11114
11113
  constructor() {
11115
11114
  this.observers_ = {};
11116
11115
  }
@@ -11131,10 +11130,10 @@ var Ad = wo.exports, yo = { exports: {} };
11131
11130
  });
11132
11131
  }
11133
11132
  }
11134
- const w = "tp";
11133
+ const _ = "tp";
11135
11134
  function y(d) {
11136
11135
  return (u, v) => [
11137
- w,
11136
+ _,
11138
11137
  "-",
11139
11138
  d,
11140
11139
  "v",
@@ -11179,7 +11178,7 @@ var Ad = wo.exports, yo = { exports: {} };
11179
11178
  }
11180
11179
  class G {
11181
11180
  constructor(a, u) {
11182
- this.emitter = new _(), this.onClick_ = this.onClick_.bind(this), this.props = u.props, this.viewProps = u.viewProps, this.view = new Y(a, {
11181
+ this.emitter = new w(), this.onClick_ = this.onClick_.bind(this), this.props = u.props, this.viewProps = u.viewProps, this.view = new Y(a, {
11183
11182
  props: this.props,
11184
11183
  viewProps: this.viewProps
11185
11184
  }), this.view.buttonElement.addEventListener("click", this.onClick_);
@@ -11193,7 +11192,7 @@ var Ad = wo.exports, yo = { exports: {} };
11193
11192
  class F {
11194
11193
  constructor(a, u) {
11195
11194
  var v;
11196
- this.constraint_ = u == null ? void 0 : u.constraint, this.equals_ = (v = u == null ? void 0 : u.equals) !== null && v !== void 0 ? v : (x, T) => x === T, this.emitter = new _(), this.rawValue_ = a;
11195
+ this.constraint_ = u == null ? void 0 : u.constraint, this.equals_ = (v = u == null ? void 0 : u.equals) !== null && v !== void 0 ? v : (x, T) => x === T, this.emitter = new w(), this.rawValue_ = a;
11197
11196
  }
11198
11197
  get constraint() {
11199
11198
  return this.constraint_;
@@ -11224,7 +11223,7 @@ var Ad = wo.exports, yo = { exports: {} };
11224
11223
  }
11225
11224
  class B {
11226
11225
  constructor(a) {
11227
- this.emitter = new _(), this.value_ = a;
11226
+ this.emitter = new w(), this.value_ = a;
11228
11227
  }
11229
11228
  get rawValue() {
11230
11229
  return this.value_;
@@ -11256,7 +11255,7 @@ var Ad = wo.exports, yo = { exports: {} };
11256
11255
  }
11257
11256
  class K {
11258
11257
  constructor(a) {
11259
- this.emitter = new _(), this.valMap_ = a;
11258
+ this.emitter = new w(), this.valMap_ = a;
11260
11259
  for (const u in this.valMap_)
11261
11260
  this.valMap_[u].emitter.on("change", () => {
11262
11261
  this.emitter.emit("change", {
@@ -11602,7 +11601,7 @@ var Ad = wo.exports, yo = { exports: {} };
11602
11601
  }
11603
11602
  class Xn {
11604
11603
  constructor() {
11605
- this.disabled = !1, this.emitter = new _();
11604
+ this.disabled = !1, this.emitter = new w();
11606
11605
  }
11607
11606
  dispose() {
11608
11607
  }
@@ -11614,7 +11613,7 @@ var Ad = wo.exports, yo = { exports: {} };
11614
11613
  }
11615
11614
  class mn {
11616
11615
  constructor(a, u) {
11617
- this.disabled_ = !1, this.timerId_ = null, this.onTick_ = this.onTick_.bind(this), this.doc_ = a, this.emitter = new _(), this.interval_ = u, this.setTimer_();
11616
+ this.disabled_ = !1, this.timerId_ = null, this.onTick_ = this.onTick_.bind(this), this.doc_ = a, this.emitter = new w(), this.interval_ = u, this.setTimer_();
11618
11617
  }
11619
11618
  get disabled() {
11620
11619
  return this.disabled_;
@@ -12112,7 +12111,7 @@ var Ad = wo.exports, yo = { exports: {} };
12112
12111
  }
12113
12112
  class Wn {
12114
12113
  constructor(a) {
12115
- this.lastTouch_ = null, this.onDocumentMouseMove_ = this.onDocumentMouseMove_.bind(this), this.onDocumentMouseUp_ = this.onDocumentMouseUp_.bind(this), this.onMouseDown_ = this.onMouseDown_.bind(this), this.onTouchEnd_ = this.onTouchEnd_.bind(this), this.onTouchMove_ = this.onTouchMove_.bind(this), this.onTouchStart_ = this.onTouchStart_.bind(this), this.elem_ = a, this.emitter = new _(), a.addEventListener("touchstart", this.onTouchStart_, {
12114
+ this.lastTouch_ = null, this.onDocumentMouseMove_ = this.onDocumentMouseMove_.bind(this), this.onDocumentMouseUp_ = this.onDocumentMouseUp_.bind(this), this.onMouseDown_ = this.onMouseDown_.bind(this), this.onTouchEnd_ = this.onTouchEnd_.bind(this), this.onTouchMove_ = this.onTouchMove_.bind(this), this.onTouchStart_ = this.onTouchStart_.bind(this), this.elem_ = a, this.emitter = new w(), a.addEventListener("touchstart", this.onTouchStart_, {
12116
12115
  passive: !1
12117
12116
  }), a.addEventListener("touchmove", this.onTouchMove_, {
12118
12117
  passive: !0
@@ -12600,7 +12599,7 @@ var Ad = wo.exports, yo = { exports: {} };
12600
12599
  }
12601
12600
  class Ps extends r {
12602
12601
  constructor(a) {
12603
- super(a), this.cellToApiMap_ = /* @__PURE__ */ new Map(), this.emitter_ = new _();
12602
+ super(a), this.cellToApiMap_ = /* @__PURE__ */ new Map(), this.emitter_ = new w();
12604
12603
  const u = this.controller_.valueController;
12605
12604
  u.cellControllers.forEach((v, x) => {
12606
12605
  const T = new Cs(v);
@@ -13701,11 +13700,11 @@ var Ad = wo.exports, yo = { exports: {} };
13701
13700
  s.ButtonCellApi = Cs, s.ButtonGridApi = Ps, s.ButtonGridController = Si, s.CubicBezier = Pt, s.CubicBezierApi = Ts, s.CubicBezierAssembly = Ri, s.CubicBezierController = ni, s.CubicBezierGraphController = ut, s.CubicBezierGraphView = De, s.CubicBezierPickerController = Ss, s.CubicBezierPickerView = As, s.CubicBezierPreviewView = Qt, s.CubicBezierView = ks, s.FpsGraphBladeApi = we, s.FpsGraphController = Ni, s.FpsView = Ye, s.Fpswatch = Re, s.Interval = qe, s.IntervalAssembly = Fi, s.IntervalConstraint = kn, s.RadioCellApi = Dt, s.RadioController = Vs, s.RadioGridApi = Mn, s.RadioGridController = ri, s.RadioView = Rs, s.RangeSliderController = zi, s.RangeSliderTextController = wt, s.RangeSliderTextView = ii, s.RangeSliderView = An, s.TpRadioGridChangeEvent = Ot, s.plugins = Is, Object.defineProperty(s, "__esModule", { value: !0 });
13702
13701
  });
13703
13702
  })(yo, yo.exports);
13704
- var ll = yo.exports;
13705
- const Md = /* @__PURE__ */ xh(ll), Sd = /* @__PURE__ */ Zu({
13703
+ var al = yo.exports;
13704
+ const Md = /* @__PURE__ */ xh(al), Sd = /* @__PURE__ */ Zu({
13706
13705
  __proto__: null,
13707
13706
  default: Md
13708
- }, [ll]);
13707
+ }, [al]);
13709
13708
  let On, Us;
13710
13709
  const lm = (f = "tres-container") => {
13711
13710
  On || (On = new Ad.Pane({