@tomorrowevening/hermes 0.0.102 → 0.0.103

Sign up to get free protection for your applications and to get access to all the features.
package/dist/hermes.es.js CHANGED
@@ -1,8 +1,8 @@
1
- import { OrthographicCamera as wi, Scene as Ps, MeshBasicMaterial as Ge, BufferGeometry as at, Float32BufferAttribute as Be, Mesh as w, LinearSRGBColorSpace as Xi, EventDispatcher as Ds, Texture as In, RepeatWrapping as $i, WebGLRenderTarget as Ln, Color as Tt, FrontSide as kn, BackSide as Rs, DoubleSide as Di, NoBlending as Un, NormalBlending as jn, AdditiveBlending as Nn, SubtractiveBlending as Fn, MultiplyBlending as zn, CustomBlending as Hn, AddEquation as Yn, SubtractEquation as Bn, ReverseSubtractEquation as Zn, MinEquation as Gn, MaxEquation as Wn, ZeroFactor as As, OneFactor as Is, SrcColorFactor as Ls, OneMinusSrcColorFactor as ks, SrcAlphaFactor as Us, OneMinusSrcAlphaFactor as js, DstAlphaFactor as Ns, OneMinusDstAlphaFactor as Fs, DstColorFactor as zs, OneMinusDstColorFactor as Hs, SrcAlphaSaturateFactor as Vn, ConstantColorFactor as Ys, OneMinusConstantColorFactor as Bs, ConstantAlphaFactor as Zs, OneMinusConstantAlphaFactor as Gs, Line as Se, LineBasicMaterial as Ri, Ray as Xn, Plane as $n, MathUtils as Qn, Vector3 as O, Controls as Ws, MOUSE as rt, TOUCH as nt, Quaternion as fe, Spherical as Si, Vector2 as ae, ShaderMaterial as Vs, GLSL3 as qn, PlaneGeometry as Xs, Raycaster as Xt, Euler as $s, Matrix4 as Kt, Object3D as ot, CylinderGeometry as ce, BoxGeometry as ne, OctahedronGeometry as kt, SphereGeometry as Qs, TorusGeometry as dt, CatmullRomCurve3 as Qi, Group as Kn, AxesHelper as qi, MeshDepthMaterial as Jn, MeshNormalMaterial as er, WebGLRenderer as tr, PerspectiveCamera as hi, CameraHelper as ir, SkinnedMesh as sr, SpotLightHelper as nr, PointLightHelper as rr, HemisphereLightHelper as ar, DirectionalLightHelper as or, Clock as lr, Vector4 as cr, Box3 as hr, Sphere as dr } from "three";
2
- import qs, { useState as G, useRef as ee, useEffect as lt, useMemo as xt, Component as Jt, createRef as Ae, forwardRef as ur } from "react";
1
+ import { OrthographicCamera as wi, Scene as Ps, MeshBasicMaterial as We, BufferGeometry as ot, Float32BufferAttribute as Ze, Mesh as w, LinearSRGBColorSpace as $i, EventDispatcher as Ds, Texture as In, RepeatWrapping as Qi, WebGLRenderTarget as Ln, Color as Tt, FrontSide as kn, BackSide as Rs, DoubleSide as Ri, NoBlending as Un, NormalBlending as jn, AdditiveBlending as Nn, SubtractiveBlending as zn, MultiplyBlending as Fn, CustomBlending as Hn, AddEquation as Yn, SubtractEquation as Bn, ReverseSubtractEquation as Zn, MinEquation as Gn, MaxEquation as Wn, ZeroFactor as As, OneFactor as Is, SrcColorFactor as Ls, OneMinusSrcColorFactor as ks, SrcAlphaFactor as Us, OneMinusSrcAlphaFactor as js, DstAlphaFactor as Ns, OneMinusDstAlphaFactor as zs, DstColorFactor as Fs, OneMinusDstColorFactor as Hs, SrcAlphaSaturateFactor as Vn, ConstantColorFactor as Ys, OneMinusConstantColorFactor as Bs, ConstantAlphaFactor as Zs, OneMinusConstantAlphaFactor as Gs, Line as xe, LineBasicMaterial as Ai, Ray as Xn, Plane as $n, MathUtils as Qn, Vector3 as O, Controls as Ws, MOUSE as at, TOUCH as rt, Quaternion as fe, Spherical as Si, Vector2 as ae, ShaderMaterial as Vs, GLSL3 as qn, PlaneGeometry as Xs, Raycaster as Xt, Euler as $s, Matrix4 as Kt, Object3D as lt, CylinderGeometry as ce, BoxGeometry as ne, OctahedronGeometry as kt, SphereGeometry as Qs, TorusGeometry as ut, CatmullRomCurve3 as qi, Group as Kn, AxesHelper as Ki, MeshDepthMaterial as Jn, MeshNormalMaterial as er, WebGLRenderer as tr, PerspectiveCamera as hi, CameraHelper as ir, SkinnedMesh as sr, SpotLightHelper as nr, PointLightHelper as rr, HemisphereLightHelper as ar, DirectionalLightHelper as or, Clock as lr, Vector4 as cr, Box3 as hr, Sphere as dr } from "three";
2
+ import qs, { useState as G, useRef as ee, useEffect as ct, useMemo as Ot, Component as Jt, createRef as Ie, forwardRef as ur } from "react";
3
3
  import { Reorder as Ks } from "framer-motion";
4
4
  const Js = () => {
5
- }, za = () => {
5
+ }, Ya = () => {
6
6
  };
7
7
  function $t(s) {
8
8
  return s.substring(0, 1).toUpperCase() + s.substring(1);
@@ -11,16 +11,16 @@ function pr(s) {
11
11
  const e = JSON.stringify(s);
12
12
  return navigator.clipboard.writeText(e), e;
13
13
  }
14
- function He(s, e, t) {
14
+ function Ye(s, e, t) {
15
15
  return Math.min(e, Math.max(s, t));
16
16
  }
17
- function Ki(s, e, t) {
17
+ function Ji(s, e, t) {
18
18
  return (t - s) / (e - s);
19
19
  }
20
20
  function xi(s, e, t) {
21
21
  return s * (1 - t) + e * t;
22
22
  }
23
- function Ha(s, e) {
23
+ function Ba(s, e) {
24
24
  const t = s - e;
25
25
  return Math.sqrt(t * t);
26
26
  }
@@ -30,18 +30,18 @@ function mr() {
30
30
  function fr(s) {
31
31
  return s.r !== void 0 && s.g !== void 0 && s.b !== void 0;
32
32
  }
33
- function Ji(s) {
34
- const e = Math.round(s.r * 255), t = Math.round(s.g * 255), i = Math.round(s.b * 255), n = (h) => {
35
- const c = h.toString(16);
36
- return c.length === 1 ? "0" + c : c;
33
+ function es(s) {
34
+ const e = Math.round(s.r * 255), t = Math.round(s.g * 255), i = Math.round(s.b * 255), n = (c) => {
35
+ const h = c.toString(16);
36
+ return h.length === 1 ? "0" + h : h;
37
37
  }, a = n(e), r = n(t), o = n(i);
38
38
  return "#" + a + r + o;
39
39
  }
40
- function Ot(s, e = 1) {
40
+ function be(s, e = 1) {
41
41
  return Number(s.toFixed(e));
42
42
  }
43
43
  let Oi = 0;
44
- const es = () => {
44
+ const ts = () => {
45
45
  Oi = 0;
46
46
  }, Ti = (s) => {
47
47
  if (!s)
@@ -59,15 +59,15 @@ const es = () => {
59
59
  }
60
60
  }
61
61
  s.children.forEach((t) => Ti(t));
62
- }, Ya = (s) => {
62
+ }, Za = (s) => {
63
63
  s?.dispose();
64
64
  }, _r = (s) => {
65
65
  s && (Array.isArray(s) ? s.forEach((e) => e.dispose()) : s.dispose());
66
- }, We = (s) => {
66
+ }, Ve = (s) => {
67
67
  if (s) {
68
68
  for (; s.children.length > 0; ) {
69
69
  const e = s.children[0];
70
- e.type === "Audio" ? (e.pause(), e.parent && e.parent.remove(e)) : We(e);
70
+ e.type === "Audio" ? (e.pause(), e.parent && e.parent.remove(e)) : Ve(e);
71
71
  }
72
72
  if (s.parent && s.parent.remove(s), s.isMesh) {
73
73
  const e = s;
@@ -105,9 +105,9 @@ class Gt {
105
105
  }
106
106
  static renderToCanvas(e) {
107
107
  if (this.material === null) {
108
- this.camera = new wi(-0.5, 0.5, 0.5, -0.5, 0, 100), this.scene = new Ps(), this.material = new Ge();
109
- const t = new at();
110
- t.setAttribute("position", new Be([-0.5, -0.5, 0, 1.5, -0.5, 0, -0.5, 1.5, 0], 3)), t.setAttribute("normal", new Be([0, 0, 1, 0, 0, 1], 3)), t.setAttribute("uv", new Be([0, 0, 2, 0, 0, 2], 2));
108
+ this.camera = new wi(-0.5, 0.5, 0.5, -0.5, 0, 100), this.scene = new Ps(), this.material = new We();
109
+ const t = new ot();
110
+ t.setAttribute("position", new Ze([-0.5, -0.5, 0, 1.5, -0.5, 0, -0.5, 1.5, 0], 3)), t.setAttribute("normal", new Ze([0, 0, 1, 0, 0, 1], 3)), t.setAttribute("uv", new Ze([0, 0, 2, 0, 0, 2], 2));
111
111
  const i = new w(t, this.material);
112
112
  this.scene.add(i);
113
113
  }
@@ -115,12 +115,12 @@ class Gt {
115
115
  this.material.map = e, this.renderer.render(this.scene, this.camera);
116
116
  else {
117
117
  const t = this.renderer.outputColorSpace, i = e.colorSpace;
118
- this.renderer.outputColorSpace = Xi, e.colorSpace = Xi, this.material.map = e, this.renderer.render(this.scene, this.camera), this.renderer.outputColorSpace = t, e.colorSpace = i;
118
+ this.renderer.outputColorSpace = $i, e.colorSpace = $i, this.material.map = e, this.renderer.render(this.scene, this.camera), this.renderer.outputColorSpace = t, e.colorSpace = i;
119
119
  }
120
120
  return this.renderer.domElement;
121
121
  }
122
122
  }
123
- class Ba {
123
+ class Ga {
124
124
  components = /* @__PURE__ */ new Map();
125
125
  listen;
126
126
  // Protected
@@ -180,7 +180,7 @@ class Ba {
180
180
  }
181
181
  var D = /* @__PURE__ */ ((s) => (s.CUSTOM = "ToolEvents::custom", s.SELECT_DROPDOWN = "ToolEvents::selectDropdown", s.DRAG_UPDATE = "ToolEvents::dragUpdate", s.ADD_SCENE = "ToolEvents::addScene", s.REFRESH_SCENE = "ToolEvents::refreshScene", s.REMOVE_SCENE = "ToolEvents::removeScene", s.SET_SCENE = "ToolEvents::setScene", s.GET_OBJECT = "ToolEvents::getObject", s.SET_OBJECT = "ToolEvents::setObject", s.UPDATE_OBJECT = "ToolEvents::updateObject", s.CREATE_TEXTURE = "ToolEvents::createTexture", s.REQUEST_METHOD = "ToolEvents::requestMethod", s.ADD_CAMERA = "ToolEvents::addCamera", s.REMOVE_CAMERA = "ToolEvents::removeCamera", s.ADD_GROUP = "ToolEvents::addGroup", s.REMOVE_GROUP = "ToolEvents::removeGroup", s.ADD_SPLINE = "ToolEvents::addSpline", s))(D || {});
182
182
  const R = new Ds();
183
- class Ai {
183
+ class Ii {
184
184
  app;
185
185
  constructor(e) {
186
186
  this.app = e;
@@ -192,7 +192,7 @@ class Ai {
192
192
  handleEditor(e, t, i) {
193
193
  }
194
194
  }
195
- class Za extends Ai {
195
+ class Wa extends Ii {
196
196
  selectDropdown(e, t) {
197
197
  this.app.send({
198
198
  event: "selectComponent",
@@ -224,26 +224,26 @@ class Za extends Ai {
224
224
  }
225
225
  }
226
226
  }
227
- function Ga(s, e, t) {
227
+ function Va(s, e, t) {
228
228
  if (s.editor) {
229
229
  t.ui.restore(), t.onSelectionChange((r) => {
230
230
  r.length < 1 || r.forEach((o) => {
231
- let h = o.address.sheetId, c = "setSheet", u = {};
231
+ let c = o.address.sheetId, h = "setSheet", u = {};
232
232
  switch (o.type) {
233
233
  case "Theatre_Sheet_PublicAPI":
234
- c = "setSheet", u = {
234
+ h = "setSheet", u = {
235
235
  sheet: o.address.sheetId
236
236
  }, e.activeSheet = e.sheets.get(o.address.sheetId);
237
237
  break;
238
238
  case "Theatre_SheetObject_PublicAPI":
239
- c = "setSheetObject", h += `_${o.address.objectKey}`, u = {
240
- id: h,
239
+ h = "setSheetObject", c += `_${o.address.objectKey}`, u = {
240
+ id: c,
241
241
  sheet: o.address.sheetId,
242
242
  key: o.address.objectKey
243
243
  }, e.activeSheet = e.sheets.get(o.address.sheetId);
244
244
  break;
245
245
  }
246
- s.send({ event: c, target: "app", data: u });
246
+ s.send({ event: h, target: "app", data: u });
247
247
  });
248
248
  });
249
249
  let i = -1;
@@ -267,7 +267,7 @@ function Ga(s, e, t) {
267
267
  } else
268
268
  t.ui.hide();
269
269
  }
270
- function Wa() {
270
+ function Xa() {
271
271
  const s = document.getElementById("theatrejs-studio-root")?.shadowRoot?.getElementById("pointer-root")?.children[0], e = s?.children[1];
272
272
  e.style.justifyContent = "left";
273
273
  const t = e.children[1];
@@ -275,7 +275,7 @@ function Wa() {
275
275
  const i = s?.children[3];
276
276
  i.style.top = "0", i.style.right = "300px";
277
277
  }
278
- class en extends Ai {
278
+ class en extends Ii {
279
279
  project;
280
280
  sheets = /* @__PURE__ */ new Map();
281
281
  sheetObjects = /* @__PURE__ */ new Map();
@@ -336,14 +336,14 @@ class en extends Ai {
336
336
  const r = this.sheet(e, a);
337
337
  if (r === void 0)
338
338
  return;
339
- const h = `${this.getSheetInstance(e, a)}_${t}`;
340
- let c = this.sheetObjects.get(h);
341
- c !== void 0 ? c = r.object(t, { ...i, ...c.value }, { reconfigure: !0 }) : c = r.object(t, i), this.sheetObjects.set(h, c), this.sheetObjectCBs.set(h, n !== void 0 ? n : Js);
342
- const u = c.onValuesChange((m) => {
339
+ const c = `${this.getSheetInstance(e, a)}_${t}`;
340
+ let h = this.sheetObjects.get(c);
341
+ h !== void 0 ? h = r.object(t, { ...i, ...h.value }, { reconfigure: !0 }) : h = r.object(t, i), this.sheetObjects.set(c, h), this.sheetObjectCBs.set(c, n !== void 0 ? n : Js);
342
+ const u = h.onValuesChange((p) => {
343
343
  if (this.app.editor) {
344
- for (const g in m) {
345
- const S = m[g];
346
- typeof S == "object" && fr(S) && (m[g] = {
344
+ for (const g in p) {
345
+ const S = p[g];
346
+ typeof S == "object" && fr(S) && (p[g] = {
347
347
  r: S.r,
348
348
  g: S.g,
349
349
  b: S.b,
@@ -355,15 +355,15 @@ class en extends Ai {
355
355
  target: "app",
356
356
  data: {
357
357
  sheet: e,
358
- sheetObject: h,
359
- values: m
358
+ sheetObject: c,
359
+ values: p
360
360
  }
361
361
  });
362
362
  }
363
- const _ = this.sheetObjectCBs.get(h);
364
- _ !== void 0 && _(m);
363
+ const _ = this.sheetObjectCBs.get(c);
364
+ _ !== void 0 && _(p);
365
365
  });
366
- return this.sheetObjectUnsubscribe.set(h, u), c;
366
+ return this.sheetObjectUnsubscribe.set(c, u), h;
367
367
  }
368
368
  unsubscribe(e) {
369
369
  if (this.project === void 0) {
@@ -410,22 +410,22 @@ class en extends Ai {
410
410
  if (e.editor) {
411
411
  this.studio?.ui.restore(), this.studio?.onSelectionChange((r) => {
412
412
  r.length < 1 || r.forEach((o) => {
413
- let h = o.address.sheetId, c = "setSheet", u = {};
413
+ let c = o.address.sheetId, h = "setSheet", u = {};
414
414
  switch (o.type) {
415
415
  case "Theatre_Sheet_PublicAPI":
416
- c = "setSheet", u = {
416
+ h = "setSheet", u = {
417
417
  sheet: o.address.sheetId
418
418
  }, t.activeSheet = t.sheets.get(o.address.sheetId);
419
419
  break;
420
420
  case "Theatre_SheetObject_PublicAPI":
421
- c = "setSheetObject", h += `_${o.address.objectKey}`, u = {
422
- id: h,
421
+ h = "setSheetObject", c += `_${o.address.objectKey}`, u = {
422
+ id: c,
423
423
  sheet: o.address.sheetId,
424
424
  key: o.address.objectKey
425
425
  }, t.activeSheet = t.sheets.get(o.address.sheetId);
426
426
  break;
427
427
  }
428
- e.send({ event: c, target: "app", data: u });
428
+ e.send({ event: h, target: "app", data: u });
429
429
  });
430
430
  });
431
431
  let i = -1;
@@ -464,7 +464,7 @@ function gr(s) {
464
464
  const e = s.type;
465
465
  return e.search("Helper") > -1 ? "icon_utils" : e.search("Camera") > -1 ? "camera" : e.search("Light") > -1 ? "light" : "obj3D";
466
466
  }
467
- function st(s) {
467
+ function nt(s) {
468
468
  const e = {
469
469
  name: s.name,
470
470
  type: s.type,
@@ -472,7 +472,7 @@ function st(s) {
472
472
  children: []
473
473
  };
474
474
  return s.children.forEach((t) => {
475
- e.children.push(st(t));
475
+ e.children.push(nt(t));
476
476
  }), e;
477
477
  }
478
478
  function vr(s) {
@@ -503,7 +503,7 @@ function yr(s) {
503
503
  }
504
504
  return !1;
505
505
  }
506
- function Qe(s) {
506
+ function qe(s) {
507
507
  const e = {};
508
508
  for (const t in s) {
509
509
  if (t.substring(0, 1) === "_" || t.substring(0, 2) === "is" || yr(t))
@@ -558,28 +558,28 @@ function di(s) {
558
558
  if (Array.isArray(i.material)) {
559
559
  const n = [];
560
560
  i.material.forEach((a) => {
561
- n.push(Qe(a));
561
+ n.push(qe(a));
562
562
  }), e.material = n;
563
563
  } else
564
- e.material = Qe(i.material);
564
+ e.material = qe(i.material);
565
565
  } else if (t.search("points") > -1) {
566
566
  const i = s;
567
567
  if (Array.isArray(i.material)) {
568
568
  const n = [];
569
569
  i.material.forEach((a) => {
570
- n.push(Qe(a));
570
+ n.push(qe(a));
571
571
  }), e.material = n;
572
572
  } else
573
- e.material = Qe(i.material);
573
+ e.material = qe(i.material);
574
574
  } else if (t.search("line") > -1) {
575
575
  const i = s;
576
576
  if (Array.isArray(i.material)) {
577
577
  const n = [];
578
578
  i.material.forEach((a) => {
579
- n.push(Qe(a));
579
+ n.push(qe(a));
580
580
  }), e.material = n;
581
581
  } else
582
- e.material = Qe(i.material);
582
+ e.material = qe(i.material);
583
583
  } else
584
584
  t.search("camera") > -1 ? s.type === "PerspectiveCamera" ? e.perspectiveCameraInfo = {
585
585
  fov: s.fov,
@@ -681,11 +681,11 @@ function tn(s) {
681
681
  const i = new Image();
682
682
  i.onload = () => {
683
683
  const n = new In(i);
684
- n.wrapS = $i, n.wrapT = $i, n.needsUpdate = !0, e(n);
684
+ n.wrapS = Qi, n.wrapT = Qi, n.needsUpdate = !0, e(n);
685
685
  }, i.onerror = t, i.src = s;
686
686
  });
687
687
  }
688
- class Va extends Ai {
688
+ class $a extends Ii {
689
689
  scene = void 0;
690
690
  scenes = /* @__PURE__ */ new Map();
691
691
  renderer = void 0;
@@ -693,8 +693,8 @@ class Va extends Ai {
693
693
  groups = /* @__PURE__ */ new Map();
694
694
  dispose() {
695
695
  this.scenes.forEach((e) => {
696
- We(e);
697
- }), this.scenes.clear(), this.scene && We(this.scene), this.renderTargets.forEach((e) => {
696
+ Ve(e);
697
+ }), this.scenes.clear(), this.scene && Ve(this.scene), this.renderTargets.forEach((e) => {
698
698
  e.dispose();
699
699
  }), this.renderTargets.clear(), this.renderer?.dispose();
700
700
  }
@@ -784,18 +784,20 @@ class Va extends Ai {
784
784
  }), this.groups.clear();
785
785
  }
786
786
  addSpline(e) {
787
- this.app.send({
788
- event: "addSpline",
789
- target: "editor",
790
- data: JSON.stringify(e.toJSON())
791
- });
787
+ setTimeout(() => {
788
+ this.app.send({
789
+ event: "addSpline",
790
+ target: "editor",
791
+ data: JSON.stringify(e.toJSON())
792
+ });
793
+ }, 1);
792
794
  }
793
795
  // Scenes
794
796
  addScene(e) {
795
797
  if (e === void 0 || (this.scenes.set(e.name, e), !this.app.debugEnabled))
796
798
  return;
797
- es(), Ti(e);
798
- const t = st(e);
799
+ ts(), Ti(e);
800
+ const t = nt(e);
799
801
  this.app.send({
800
802
  event: "addScene",
801
803
  target: "editor",
@@ -807,7 +809,7 @@ class Va extends Ai {
807
809
  return;
808
810
  const t = this.scenes.get(e);
809
811
  if (t !== void 0) {
810
- const i = st(t);
812
+ const i = nt(t);
811
813
  this.app.send({
812
814
  event: "refreshScene",
813
815
  target: "app",
@@ -818,7 +820,7 @@ class Va extends Ai {
818
820
  removeScene(e) {
819
821
  if (e === void 0 || (this.scenes.delete(e.name), !this.app.debugEnabled))
820
822
  return;
821
- const t = st(e);
823
+ const t = nt(e);
822
824
  this.app.send({
823
825
  event: "removeScene",
824
826
  target: "editor",
@@ -837,8 +839,8 @@ class Va extends Ai {
837
839
  setScene(e) {
838
840
  if (e === void 0 || (this.scene = e, !this.app.debugEnabled))
839
841
  return;
840
- this.renderer !== void 0 && (Gt.renderer = this.renderer), es(), Ti(e);
841
- const t = st(e);
842
+ this.renderer !== void 0 && (Gt.renderer = this.renderer), ts(), Ti(e);
843
+ const t = nt(e);
842
844
  this.app.send({
843
845
  event: "setScene",
844
846
  target: "editor",
@@ -885,7 +887,7 @@ class Va extends Ai {
885
887
  e.send({
886
888
  event: "refreshScene",
887
889
  target: "editor",
888
- data: st(n.scenes.get(i.data.name))
890
+ data: nt(n.scenes.get(i.data.name))
889
891
  });
890
892
  break;
891
893
  }
@@ -940,7 +942,7 @@ class Va extends Ai {
940
942
  }), this.renderer?.setSize(e, t);
941
943
  }
942
944
  set dpr(e) {
943
- this.renderer?.setPixelRatio(He(1, 2, e));
945
+ this.renderer?.setPixelRatio(Ye(1, 2, e));
944
946
  }
945
947
  get dpr() {
946
948
  return this.renderer !== void 0 ? this.renderer?.getPixelRatio() : 1;
@@ -955,7 +957,7 @@ class Va extends Ai {
955
957
  return this.renderer !== void 0 ? this.renderer?.domElement : null;
956
958
  }
957
959
  }
958
- var Mi = { exports: {} }, ut = {};
960
+ var Mi = { exports: {} }, pt = {};
959
961
  /**
960
962
  * @license React
961
963
  * react-jsx-runtime.production.min.js
@@ -965,25 +967,25 @@ var Mi = { exports: {} }, ut = {};
965
967
  * This source code is licensed under the MIT license found in the
966
968
  * LICENSE file in the root directory of this source tree.
967
969
  */
968
- var ts;
970
+ var is;
969
971
  function Cr() {
970
- if (ts)
971
- return ut;
972
- ts = 1;
972
+ if (is)
973
+ return pt;
974
+ is = 1;
973
975
  var s = qs, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, n = s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, a = { key: !0, ref: !0, __self: !0, __source: !0 };
974
- function r(o, h, c) {
975
- var u, m = {}, _ = null, g = null;
976
- c !== void 0 && (_ = "" + c), h.key !== void 0 && (_ = "" + h.key), h.ref !== void 0 && (g = h.ref);
977
- for (u in h)
978
- i.call(h, u) && !a.hasOwnProperty(u) && (m[u] = h[u]);
976
+ function r(o, c, h) {
977
+ var u, p = {}, _ = null, g = null;
978
+ h !== void 0 && (_ = "" + h), c.key !== void 0 && (_ = "" + c.key), c.ref !== void 0 && (g = c.ref);
979
+ for (u in c)
980
+ i.call(c, u) && !a.hasOwnProperty(u) && (p[u] = c[u]);
979
981
  if (o && o.defaultProps)
980
- for (u in h = o.defaultProps, h)
981
- m[u] === void 0 && (m[u] = h[u]);
982
- return { $$typeof: e, type: o, key: _, ref: g, props: m, _owner: n.current };
982
+ for (u in c = o.defaultProps, c)
983
+ p[u] === void 0 && (p[u] = c[u]);
984
+ return { $$typeof: e, type: o, key: _, ref: g, props: p, _owner: n.current };
983
985
  }
984
- return ut.Fragment = t, ut.jsx = r, ut.jsxs = r, ut;
986
+ return pt.Fragment = t, pt.jsx = r, pt.jsxs = r, pt;
985
987
  }
986
- var pt = {};
988
+ var mt = {};
987
989
  /**
988
990
  * @license React
989
991
  * react-jsx-runtime.development.js
@@ -993,10 +995,10 @@ var pt = {};
993
995
  * This source code is licensed under the MIT license found in the
994
996
  * LICENSE file in the root directory of this source tree.
995
997
  */
996
- var is;
998
+ var ss;
997
999
  function wr() {
998
- return is || (is = 1, process.env.NODE_ENV !== "production" && function() {
999
- var s = qs, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), r = Symbol.for("react.provider"), o = Symbol.for("react.context"), h = Symbol.for("react.forward_ref"), c = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), S = Symbol.iterator, M = "@@iterator";
1000
+ return ss || (ss = 1, process.env.NODE_ENV !== "production" && function() {
1001
+ var s = qs, e = Symbol.for("react.element"), t = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), n = Symbol.for("react.strict_mode"), a = Symbol.for("react.profiler"), r = Symbol.for("react.provider"), o = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), S = Symbol.iterator, M = "@@iterator";
1000
1002
  function T(l) {
1001
1003
  if (l === null || typeof l != "object")
1002
1004
  return null;
@@ -1013,8 +1015,8 @@ function wr() {
1013
1015
  }
1014
1016
  function E(l, y, C) {
1015
1017
  {
1016
- var I = f.ReactDebugCurrentFrame, F = I.getStackAddendum();
1017
- F !== "" && (y += "%s", C = C.concat([F]));
1018
+ var I = f.ReactDebugCurrentFrame, z = I.getStackAddendum();
1019
+ z !== "" && (y += "%s", C = C.concat([z]));
1018
1020
  var Y = C.map(function(U) {
1019
1021
  return String(U);
1020
1022
  });
@@ -1023,21 +1025,21 @@ function wr() {
1023
1025
  }
1024
1026
  var b = !1, P = !1, x = !1, j = !1, X = !1, _e;
1025
1027
  _e = Symbol.for("react.module.reference");
1026
- function Pe(l) {
1027
- return !!(typeof l == "string" || typeof l == "function" || l === i || l === a || X || l === n || l === c || l === u || j || l === g || b || P || x || typeof l == "object" && l !== null && (l.$$typeof === _ || l.$$typeof === m || l.$$typeof === r || l.$$typeof === o || l.$$typeof === h || // This needs to include all possible module reference object
1028
+ function De(l) {
1029
+ return !!(typeof l == "string" || typeof l == "function" || l === i || l === a || X || l === n || l === h || l === u || j || l === g || b || P || x || typeof l == "object" && l !== null && (l.$$typeof === _ || l.$$typeof === p || l.$$typeof === r || l.$$typeof === o || l.$$typeof === c || // This needs to include all possible module reference object
1028
1030
  // types supported by any Flight configuration anywhere since
1029
1031
  // we don't know which Flight build this will end up being used
1030
1032
  // with.
1031
1033
  l.$$typeof === _e || l.getModuleId !== void 0));
1032
1034
  }
1033
- function ct(l, y, C) {
1035
+ function ht(l, y, C) {
1034
1036
  var I = l.displayName;
1035
1037
  if (I)
1036
1038
  return I;
1037
- var F = y.displayName || y.name || "";
1038
- return F !== "" ? C + "(" + F + ")" : C;
1039
+ var z = y.displayName || y.name || "";
1040
+ return z !== "" ? C + "(" + z + ")" : C;
1039
1041
  }
1040
- function Ve(l) {
1042
+ function Xe(l) {
1041
1043
  return l.displayName || "Context";
1042
1044
  }
1043
1045
  function me(l) {
@@ -1056,7 +1058,7 @@ function wr() {
1056
1058
  return "Profiler";
1057
1059
  case n:
1058
1060
  return "StrictMode";
1059
- case c:
1061
+ case h:
1060
1062
  return "Suspense";
1061
1063
  case u:
1062
1064
  return "SuspenseList";
@@ -1065,17 +1067,17 @@ function wr() {
1065
1067
  switch (l.$$typeof) {
1066
1068
  case o:
1067
1069
  var y = l;
1068
- return Ve(y) + ".Consumer";
1070
+ return Xe(y) + ".Consumer";
1069
1071
  case r:
1070
1072
  var C = l;
1071
- return Ve(C._context) + ".Provider";
1072
- case h:
1073
- return ct(l, l.render, "ForwardRef");
1074
- case m:
1073
+ return Xe(C._context) + ".Provider";
1074
+ case c:
1075
+ return ht(l, l.render, "ForwardRef");
1076
+ case p:
1075
1077
  var I = l.displayName || null;
1076
1078
  return I !== null ? I : me(l.type) || "Memo";
1077
1079
  case _: {
1078
- var F = l, Y = F._payload, U = F._init;
1080
+ var z = l, Y = z._payload, U = z._init;
1079
1081
  try {
1080
1082
  return me(U(Y));
1081
1083
  } catch {
@@ -1085,14 +1087,14 @@ function wr() {
1085
1087
  }
1086
1088
  return null;
1087
1089
  }
1088
- var te = Object.assign, $ = 0, Ie, le, Oe, se, Le, ke, Ue;
1090
+ var te = Object.assign, $ = 0, Le, le, Te, se, ke, Ue, je;
1089
1091
  function Mt() {
1090
1092
  }
1091
1093
  Mt.__reactDisabledLog = !0;
1092
1094
  function Pt() {
1093
1095
  {
1094
1096
  if ($ === 0) {
1095
- Ie = console.log, le = console.info, Oe = console.warn, se = console.error, Le = console.group, ke = console.groupCollapsed, Ue = console.groupEnd;
1097
+ Le = console.log, le = console.info, Te = console.warn, se = console.error, ke = console.group, Ue = console.groupCollapsed, je = console.groupEnd;
1096
1098
  var l = {
1097
1099
  configurable: !0,
1098
1100
  enumerable: !0,
@@ -1122,25 +1124,25 @@ function wr() {
1122
1124
  };
1123
1125
  Object.defineProperties(console, {
1124
1126
  log: te({}, l, {
1125
- value: Ie
1127
+ value: Le
1126
1128
  }),
1127
1129
  info: te({}, l, {
1128
1130
  value: le
1129
1131
  }),
1130
1132
  warn: te({}, l, {
1131
- value: Oe
1133
+ value: Te
1132
1134
  }),
1133
1135
  error: te({}, l, {
1134
1136
  value: se
1135
1137
  }),
1136
1138
  group: te({}, l, {
1137
- value: Le
1139
+ value: ke
1138
1140
  }),
1139
1141
  groupCollapsed: te({}, l, {
1140
- value: ke
1142
+ value: Ue
1141
1143
  }),
1142
1144
  groupEnd: te({}, l, {
1143
- value: Ue
1145
+ value: je
1144
1146
  })
1145
1147
  });
1146
1148
  }
@@ -1153,8 +1155,8 @@ function wr() {
1153
1155
  if (si === void 0)
1154
1156
  try {
1155
1157
  throw Error();
1156
- } catch (F) {
1157
- var I = F.stack.trim().match(/\n( *(at )?)/);
1158
+ } catch (z) {
1159
+ var I = z.stack.trim().match(/\n( *(at )?)/);
1158
1160
  si = I && I[1] || "";
1159
1161
  }
1160
1162
  return `
@@ -1166,7 +1168,7 @@ function wr() {
1166
1168
  var hn = typeof WeakMap == "function" ? WeakMap : Map;
1167
1169
  Rt = new hn();
1168
1170
  }
1169
- function Li(l, y) {
1171
+ function ki(l, y) {
1170
1172
  if (!l || ni)
1171
1173
  return "";
1172
1174
  {
@@ -1176,7 +1178,7 @@ function wr() {
1176
1178
  }
1177
1179
  var I;
1178
1180
  ni = !0;
1179
- var F = Error.prepareStackTrace;
1181
+ var z = Error.prepareStackTrace;
1180
1182
  Error.prepareStackTrace = void 0;
1181
1183
  var Y;
1182
1184
  Y = ii.current, ii.current = null, Pt();
@@ -1192,29 +1194,29 @@ function wr() {
1192
1194
  }), typeof Reflect == "object" && Reflect.construct) {
1193
1195
  try {
1194
1196
  Reflect.construct(U, []);
1195
- } catch (Te) {
1196
- I = Te;
1197
+ } catch (Me) {
1198
+ I = Me;
1197
1199
  }
1198
1200
  Reflect.construct(l, [], U);
1199
1201
  } else {
1200
1202
  try {
1201
1203
  U.call();
1202
- } catch (Te) {
1203
- I = Te;
1204
+ } catch (Me) {
1205
+ I = Me;
1204
1206
  }
1205
1207
  l.call(U.prototype);
1206
1208
  }
1207
1209
  } else {
1208
1210
  try {
1209
1211
  throw Error();
1210
- } catch (Te) {
1211
- I = Te;
1212
+ } catch (Me) {
1213
+ I = Me;
1212
1214
  }
1213
1215
  l();
1214
1216
  }
1215
- } catch (Te) {
1216
- if (Te && I && typeof Te.stack == "string") {
1217
- for (var k = Te.stack.split(`
1217
+ } catch (Me) {
1218
+ if (Me && I && typeof Me.stack == "string") {
1219
+ for (var k = Me.stack.split(`
1218
1220
  `), oe = I.stack.split(`
1219
1221
  `), Q = k.length - 1, J = oe.length - 1; Q >= 1 && J >= 0 && k[Q] !== oe[J]; )
1220
1222
  J--;
@@ -1232,13 +1234,13 @@ function wr() {
1232
1234
  }
1233
1235
  }
1234
1236
  } finally {
1235
- ni = !1, ii.current = Y, cn(), Error.prepareStackTrace = F;
1237
+ ni = !1, ii.current = Y, cn(), Error.prepareStackTrace = z;
1236
1238
  }
1237
- var $e = l ? l.displayName || l.name : "", Vi = $e ? Dt($e) : "";
1238
- return typeof l == "function" && Rt.set(l, Vi), Vi;
1239
+ var Qe = l ? l.displayName || l.name : "", Xi = Qe ? Dt(Qe) : "";
1240
+ return typeof l == "function" && Rt.set(l, Xi), Xi;
1239
1241
  }
1240
1242
  function dn(l, y, C) {
1241
- return Li(l, !1);
1243
+ return ki(l, !1);
1242
1244
  }
1243
1245
  function un(l) {
1244
1246
  var y = l.prototype;
@@ -1248,40 +1250,40 @@ function wr() {
1248
1250
  if (l == null)
1249
1251
  return "";
1250
1252
  if (typeof l == "function")
1251
- return Li(l, un(l));
1253
+ return ki(l, un(l));
1252
1254
  if (typeof l == "string")
1253
1255
  return Dt(l);
1254
1256
  switch (l) {
1255
- case c:
1257
+ case h:
1256
1258
  return Dt("Suspense");
1257
1259
  case u:
1258
1260
  return Dt("SuspenseList");
1259
1261
  }
1260
1262
  if (typeof l == "object")
1261
1263
  switch (l.$$typeof) {
1262
- case h:
1264
+ case c:
1263
1265
  return dn(l.render);
1264
- case m:
1266
+ case p:
1265
1267
  return At(l.type, y, C);
1266
1268
  case _: {
1267
- var I = l, F = I._payload, Y = I._init;
1269
+ var I = l, z = I._payload, Y = I._init;
1268
1270
  try {
1269
- return At(Y(F), y, C);
1271
+ return At(Y(z), y, C);
1270
1272
  } catch {
1271
1273
  }
1272
1274
  }
1273
1275
  }
1274
1276
  return "";
1275
1277
  }
1276
- var It = Object.prototype.hasOwnProperty, ki = {}, Ui = f.ReactDebugCurrentFrame;
1278
+ var It = Object.prototype.hasOwnProperty, Ui = {}, ji = f.ReactDebugCurrentFrame;
1277
1279
  function Lt(l) {
1278
1280
  if (l) {
1279
1281
  var y = l._owner, C = At(l.type, l._source, y ? y.type : null);
1280
- Ui.setExtraStackFrame(C);
1282
+ ji.setExtraStackFrame(C);
1281
1283
  } else
1282
- Ui.setExtraStackFrame(null);
1284
+ ji.setExtraStackFrame(null);
1283
1285
  }
1284
- function pn(l, y, C, I, F) {
1286
+ function pn(l, y, C, I, z) {
1285
1287
  {
1286
1288
  var Y = Function.call.bind(It);
1287
1289
  for (var U in l)
@@ -1296,7 +1298,7 @@ function wr() {
1296
1298
  } catch (Q) {
1297
1299
  k = Q;
1298
1300
  }
1299
- k && !(k instanceof Error) && (Lt(F), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", I || "React class", C, U, typeof k), Lt(null)), k instanceof Error && !(k.message in ki) && (ki[k.message] = !0, Lt(F), v("Failed %s type: %s", C, k.message), Lt(null));
1301
+ k && !(k instanceof Error) && (Lt(z), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", I || "React class", C, U, typeof k), Lt(null)), k instanceof Error && !(k.message in Ui) && (Ui[k.message] = !0, Lt(z), v("Failed %s type: %s", C, k.message), Lt(null));
1300
1302
  }
1301
1303
  }
1302
1304
  }
@@ -1312,24 +1314,24 @@ function wr() {
1312
1314
  }
1313
1315
  function _n(l) {
1314
1316
  try {
1315
- return ji(l), !1;
1317
+ return Ni(l), !1;
1316
1318
  } catch {
1317
1319
  return !0;
1318
1320
  }
1319
1321
  }
1320
- function ji(l) {
1322
+ function Ni(l) {
1321
1323
  return "" + l;
1322
1324
  }
1323
- function Ni(l) {
1325
+ function zi(l) {
1324
1326
  if (_n(l))
1325
- return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", fn(l)), ji(l);
1327
+ return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", fn(l)), Ni(l);
1326
1328
  }
1327
- var ht = f.ReactCurrentOwner, gn = {
1329
+ var dt = f.ReactCurrentOwner, gn = {
1328
1330
  key: !0,
1329
1331
  ref: !0,
1330
1332
  __self: !0,
1331
1333
  __source: !0
1332
- }, Fi, zi, ai;
1334
+ }, Fi, Hi, ai;
1333
1335
  ai = {};
1334
1336
  function vn(l) {
1335
1337
  if (It.call(l, "ref")) {
@@ -1348,9 +1350,9 @@ function wr() {
1348
1350
  return l.key !== void 0;
1349
1351
  }
1350
1352
  function bn(l, y) {
1351
- if (typeof l.ref == "string" && ht.current && y && ht.current.stateNode !== y) {
1352
- var C = me(ht.current.type);
1353
- ai[C] || (v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', me(ht.current.type), l.ref), ai[C] = !0);
1353
+ if (typeof l.ref == "string" && dt.current && y && dt.current.stateNode !== y) {
1354
+ var C = me(dt.current.type);
1355
+ ai[C] || (v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', me(dt.current.type), l.ref), ai[C] = !0);
1354
1356
  }
1355
1357
  }
1356
1358
  function En(l, y) {
@@ -1367,7 +1369,7 @@ function wr() {
1367
1369
  function Cn(l, y) {
1368
1370
  {
1369
1371
  var C = function() {
1370
- zi || (zi = !0, v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", y));
1372
+ Hi || (Hi = !0, v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", y));
1371
1373
  };
1372
1374
  C.isReactWarning = !0, Object.defineProperty(l, "ref", {
1373
1375
  get: C,
@@ -1375,7 +1377,7 @@ function wr() {
1375
1377
  });
1376
1378
  }
1377
1379
  }
1378
- var wn = function(l, y, C, I, F, Y, U) {
1380
+ var wn = function(l, y, C, I, z, Y, U) {
1379
1381
  var k = {
1380
1382
  // This tag allows us to uniquely identify this as a React Element
1381
1383
  $$typeof: e,
@@ -1401,13 +1403,13 @@ function wr() {
1401
1403
  configurable: !1,
1402
1404
  enumerable: !1,
1403
1405
  writable: !1,
1404
- value: F
1406
+ value: z
1405
1407
  }), Object.freeze && (Object.freeze(k.props), Object.freeze(k)), k;
1406
1408
  };
1407
- function Sn(l, y, C, I, F) {
1409
+ function Sn(l, y, C, I, z) {
1408
1410
  {
1409
1411
  var Y, U = {}, k = null, oe = null;
1410
- C !== void 0 && (Ni(C), k = "" + C), yn(y) && (Ni(y.key), k = "" + y.key), vn(y) && (oe = y.ref, bn(y, F));
1412
+ C !== void 0 && (zi(C), k = "" + C), yn(y) && (zi(y.key), k = "" + y.key), vn(y) && (oe = y.ref, bn(y, z));
1411
1413
  for (Y in y)
1412
1414
  It.call(y, Y) && !gn.hasOwnProperty(Y) && (U[Y] = y[Y]);
1413
1415
  if (l && l.defaultProps) {
@@ -1419,23 +1421,23 @@ function wr() {
1419
1421
  var J = typeof l == "function" ? l.displayName || l.name || "Unknown" : l;
1420
1422
  k && En(U, J), oe && Cn(U, J);
1421
1423
  }
1422
- return wn(l, k, oe, F, I, ht.current, U);
1424
+ return wn(l, k, oe, z, I, dt.current, U);
1423
1425
  }
1424
1426
  }
1425
- var oi = f.ReactCurrentOwner, Hi = f.ReactDebugCurrentFrame;
1426
- function Xe(l) {
1427
+ var oi = f.ReactCurrentOwner, Yi = f.ReactDebugCurrentFrame;
1428
+ function $e(l) {
1427
1429
  if (l) {
1428
1430
  var y = l._owner, C = At(l.type, l._source, y ? y.type : null);
1429
- Hi.setExtraStackFrame(C);
1431
+ Yi.setExtraStackFrame(C);
1430
1432
  } else
1431
- Hi.setExtraStackFrame(null);
1433
+ Yi.setExtraStackFrame(null);
1432
1434
  }
1433
1435
  var li;
1434
1436
  li = !1;
1435
1437
  function ci(l) {
1436
1438
  return typeof l == "object" && l !== null && l.$$typeof === e;
1437
1439
  }
1438
- function Yi() {
1440
+ function Bi() {
1439
1441
  {
1440
1442
  if (oi.current) {
1441
1443
  var l = me(oi.current.type);
@@ -1458,10 +1460,10 @@ Check your code at ` + y + ":" + C + ".";
1458
1460
  return "";
1459
1461
  }
1460
1462
  }
1461
- var Bi = {};
1463
+ var Zi = {};
1462
1464
  function On(l) {
1463
1465
  {
1464
- var y = Yi();
1466
+ var y = Bi();
1465
1467
  if (!y) {
1466
1468
  var C = typeof l == "string" ? l : l.displayName || l.name;
1467
1469
  C && (y = `
@@ -1471,35 +1473,35 @@ Check the top-level render call using <` + C + ">.");
1471
1473
  return y;
1472
1474
  }
1473
1475
  }
1474
- function Zi(l, y) {
1476
+ function Gi(l, y) {
1475
1477
  {
1476
1478
  if (!l._store || l._store.validated || l.key != null)
1477
1479
  return;
1478
1480
  l._store.validated = !0;
1479
1481
  var C = On(y);
1480
- if (Bi[C])
1482
+ if (Zi[C])
1481
1483
  return;
1482
- Bi[C] = !0;
1484
+ Zi[C] = !0;
1483
1485
  var I = "";
1484
- l && l._owner && l._owner !== oi.current && (I = " It was passed a child from " + me(l._owner.type) + "."), Xe(l), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', C, I), Xe(null);
1486
+ l && l._owner && l._owner !== oi.current && (I = " It was passed a child from " + me(l._owner.type) + "."), $e(l), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', C, I), $e(null);
1485
1487
  }
1486
1488
  }
1487
- function Gi(l, y) {
1489
+ function Wi(l, y) {
1488
1490
  {
1489
1491
  if (typeof l != "object")
1490
1492
  return;
1491
1493
  if (ri(l))
1492
1494
  for (var C = 0; C < l.length; C++) {
1493
1495
  var I = l[C];
1494
- ci(I) && Zi(I, y);
1496
+ ci(I) && Gi(I, y);
1495
1497
  }
1496
1498
  else if (ci(l))
1497
1499
  l._store && (l._store.validated = !0);
1498
1500
  else if (l) {
1499
- var F = T(l);
1500
- if (typeof F == "function" && F !== l.entries)
1501
- for (var Y = F.call(l), U; !(U = Y.next()).done; )
1502
- ci(U.value) && Zi(U.value, y);
1501
+ var z = T(l);
1502
+ if (typeof z == "function" && z !== l.entries)
1503
+ for (var Y = z.call(l), U; !(U = Y.next()).done; )
1504
+ ci(U.value) && Gi(U.value, y);
1503
1505
  }
1504
1506
  }
1505
1507
  }
@@ -1511,9 +1513,9 @@ Check the top-level render call using <` + C + ">.");
1511
1513
  var C;
1512
1514
  if (typeof y == "function")
1513
1515
  C = y.propTypes;
1514
- else if (typeof y == "object" && (y.$$typeof === h || // Note: Memo only checks outer props here.
1516
+ else if (typeof y == "object" && (y.$$typeof === c || // Note: Memo only checks outer props here.
1515
1517
  // Inner props are checked in the reconciler.
1516
- y.$$typeof === m))
1518
+ y.$$typeof === p))
1517
1519
  C = y.propTypes;
1518
1520
  else
1519
1521
  return;
@@ -1522,8 +1524,8 @@ Check the top-level render call using <` + C + ">.");
1522
1524
  pn(C, l.props, "prop", I, l);
1523
1525
  } else if (y.PropTypes !== void 0 && !li) {
1524
1526
  li = !0;
1525
- var F = me(y);
1526
- v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", F || "Unknown");
1527
+ var z = me(y);
1528
+ v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", z || "Unknown");
1527
1529
  }
1528
1530
  typeof y.getDefaultProps == "function" && !y.getDefaultProps.isReactClassApproved && v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1529
1531
  }
@@ -1533,25 +1535,25 @@ Check the top-level render call using <` + C + ">.");
1533
1535
  for (var y = Object.keys(l.props), C = 0; C < y.length; C++) {
1534
1536
  var I = y[C];
1535
1537
  if (I !== "children" && I !== "key") {
1536
- Xe(l), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", I), Xe(null);
1538
+ $e(l), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", I), $e(null);
1537
1539
  break;
1538
1540
  }
1539
1541
  }
1540
- l.ref !== null && (Xe(l), v("Invalid attribute `ref` supplied to `React.Fragment`."), Xe(null));
1542
+ l.ref !== null && ($e(l), v("Invalid attribute `ref` supplied to `React.Fragment`."), $e(null));
1541
1543
  }
1542
1544
  }
1543
- function Wi(l, y, C, I, F, Y) {
1545
+ function Vi(l, y, C, I, z, Y) {
1544
1546
  {
1545
- var U = Pe(l);
1547
+ var U = De(l);
1546
1548
  if (!U) {
1547
1549
  var k = "";
1548
1550
  (l === void 0 || typeof l == "object" && l !== null && Object.keys(l).length === 0) && (k += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1549
- var oe = xn(F);
1550
- oe ? k += oe : k += Yi();
1551
+ var oe = xn(z);
1552
+ oe ? k += oe : k += Bi();
1551
1553
  var Q;
1552
1554
  l === null ? Q = "null" : ri(l) ? Q = "array" : l !== void 0 && l.$$typeof === e ? (Q = "<" + (me(l.type) || "Unknown") + " />", k = " Did you accidentally export a JSX literal instead of a component?") : Q = typeof l, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Q, k);
1553
1555
  }
1554
- var J = Sn(l, y, C, F, Y);
1556
+ var J = Sn(l, y, C, z, Y);
1555
1557
  if (J == null)
1556
1558
  return J;
1557
1559
  if (U) {
@@ -1559,26 +1561,26 @@ Check the top-level render call using <` + C + ">.");
1559
1561
  if (ge !== void 0)
1560
1562
  if (I)
1561
1563
  if (ri(ge)) {
1562
- for (var $e = 0; $e < ge.length; $e++)
1563
- Gi(ge[$e], l);
1564
+ for (var Qe = 0; Qe < ge.length; Qe++)
1565
+ Wi(ge[Qe], l);
1564
1566
  Object.freeze && Object.freeze(ge);
1565
1567
  } else
1566
1568
  v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1567
1569
  else
1568
- Gi(ge, l);
1570
+ Wi(ge, l);
1569
1571
  }
1570
1572
  return l === i ? Mn(J) : Tn(J), J;
1571
1573
  }
1572
1574
  }
1573
1575
  function Pn(l, y, C) {
1574
- return Wi(l, y, C, !0);
1576
+ return Vi(l, y, C, !0);
1575
1577
  }
1576
1578
  function Dn(l, y, C) {
1577
- return Wi(l, y, C, !1);
1579
+ return Vi(l, y, C, !1);
1578
1580
  }
1579
1581
  var Rn = Dn, An = Pn;
1580
- pt.Fragment = i, pt.jsx = Rn, pt.jsxs = An;
1581
- }()), pt;
1582
+ mt.Fragment = i, mt.jsx = Rn, mt.jsxs = An;
1583
+ }()), mt;
1582
1584
  }
1583
1585
  process.env.NODE_ENV === "production" ? Mi.exports = Cr() : Mi.exports = wr();
1584
1586
  var d = Mi.exports;
@@ -1607,17 +1609,17 @@ function Or(s) {
1607
1609
  ] }) }, s.title);
1608
1610
  }
1609
1611
  function Tr(s) {
1610
- const [e, t] = G(!1), [i, n] = G(s.options), a = (c) => {
1611
- s.onDragComplete(c), n(c);
1612
- }, r = (c) => {
1612
+ const [e, t] = G(!1), [i, n] = G(s.options), a = (h) => {
1613
+ s.onDragComplete(h), n(h);
1614
+ }, r = (h) => {
1613
1615
  const u = [...i];
1614
- u.splice(c, 1), a(u);
1616
+ u.splice(h, 1), a(u);
1615
1617
  }, o = [];
1616
- i.forEach((c, u) => {
1617
- o.push(/* @__PURE__ */ d.jsx(Or, { index: u, title: c, onDelete: r }, c));
1618
+ i.forEach((h, u) => {
1619
+ o.push(/* @__PURE__ */ d.jsx(Or, { index: u, title: h, onDelete: r }, h));
1618
1620
  });
1619
- let h = "dropdown draggable";
1620
- return s.subdropdown && (h += " subdropdown"), /* @__PURE__ */ d.jsxs("div", { className: h, onMouseEnter: () => t(!0), onMouseLeave: () => t(!1), children: [
1621
+ let c = "dropdown draggable";
1622
+ return s.subdropdown && (c += " subdropdown"), /* @__PURE__ */ d.jsxs("div", { className: c, onMouseEnter: () => t(!0), onMouseLeave: () => t(!1), children: [
1621
1623
  /* @__PURE__ */ d.jsx(sn, { title: s.title }),
1622
1624
  /* @__PURE__ */ d.jsx(Ks.Group, { axis: "y", values: i, onReorder: a, style: { visibility: e ? "visible" : "hidden" }, children: o })
1623
1625
  ] });
@@ -1689,7 +1691,7 @@ function Pr(s) {
1689
1691
  }
1690
1692
  return /* @__PURE__ */ d.jsx("li", { className: t === e.title ? "selected" : "", children: n }, mr());
1691
1693
  }
1692
- function Xa(s, e, t) {
1694
+ function Qa(s, e, t) {
1693
1695
  function i(a) {
1694
1696
  switch (e.forEach((r) => {
1695
1697
  r.callback(s, r.remote, a);
@@ -1749,7 +1751,7 @@ function nn(s) {
1749
1751
  const e = ee(null), [t, i] = G(!1), n = s.child !== void 0 && s.child.children.length > 0, a = [];
1750
1752
  return s.child !== void 0 && s.child.children.length > 0 && s.child.children.map((r, o) => {
1751
1753
  a.push(/* @__PURE__ */ d.jsx(nn, { child: r, three: s.three }, o));
1752
- }), lt(() => {
1754
+ }), ct(() => {
1753
1755
  if (s.child) {
1754
1756
  const r = s.three.getScene(s.child.uuid);
1755
1757
  if (r !== null) {
@@ -1795,8 +1797,8 @@ function nn(s) {
1795
1797
  if (r !== null) {
1796
1798
  const o = r.getObjectByProperty("uuid", s.child.uuid);
1797
1799
  if (o !== void 0) {
1798
- const h = "visible", c = !o.visible;
1799
- e.current.style.opacity = c ? "1" : "0.25", s.three.updateObject(s.child.uuid, h, c), K(o, h, c);
1800
+ const c = "visible", h = !o.visible;
1801
+ e.current.style.opacity = h ? "1" : "0.25", s.three.updateObject(s.child.uuid, c, h), K(o, c, h);
1800
1802
  }
1801
1803
  }
1802
1804
  }
@@ -1808,7 +1810,7 @@ function nn(s) {
1808
1810
  /* @__PURE__ */ d.jsx("div", { className: t ? "open" : "", children: /* @__PURE__ */ d.jsx("div", { className: "container", children: a }) })
1809
1811
  ] }, Math.random()) });
1810
1812
  }
1811
- function ss(s) {
1813
+ function ns(s) {
1812
1814
  const e = [];
1813
1815
  return s.child?.children.map((t, i) => {
1814
1816
  e.push(/* @__PURE__ */ d.jsx(nn, { child: t, scene: s.scene, three: s.three }, i));
@@ -1816,30 +1818,30 @@ function ss(s) {
1816
1818
  }
1817
1819
  function Dr(s) {
1818
1820
  const [e, t] = G(s.defaultValue);
1819
- return lt(() => {
1821
+ return ct(() => {
1820
1822
  let i = !1, n = -1, a = 0, r = s.defaultValue;
1821
1823
  const o = (_) => {
1822
- i = !0, a = Number(s.input.current?.value), n = _.clientX, document.addEventListener("mouseup", c, !1), document.addEventListener("mousemove", h, !1), document.addEventListener("contextmenu", c, !1);
1823
- }, h = (_) => {
1824
+ i = !0, a = Number(s.input.current?.value), n = _.clientX, document.addEventListener("mouseup", h, !1), document.addEventListener("mousemove", c, !1), document.addEventListener("contextmenu", h, !1);
1825
+ }, c = (_) => {
1824
1826
  if (!i)
1825
1827
  return;
1826
1828
  const g = s.step !== void 0 ? s.step : 1, S = (_.clientX - n) * g;
1827
1829
  r = Number((a + S).toFixed(4)), s.min !== void 0 && (r = Math.max(r, s.min)), s.max !== void 0 && (r = Math.min(r, s.max)), s.onChange !== void 0 && s.onChange(r), t(r);
1828
- }, c = () => {
1829
- i = !1, document.removeEventListener("mouseup", c), document.removeEventListener("mousemove", h), document.removeEventListener("contextmenu", c);
1830
+ }, h = () => {
1831
+ i = !1, document.removeEventListener("mouseup", h), document.removeEventListener("mousemove", c), document.removeEventListener("contextmenu", h);
1830
1832
  }, u = (_) => {
1831
1833
  const g = Number(_.target.value);
1832
1834
  t(g);
1833
- }, m = (_) => {
1835
+ }, p = (_) => {
1834
1836
  const g = Number(_.target.value);
1835
1837
  s.onChange !== void 0 && s.onChange(g), t(g);
1836
1838
  };
1837
- return s.input.current?.addEventListener("input", u), s.label.current?.addEventListener("mousedown", o, !1), s.sliderRef !== void 0 && s.sliderRef.current?.addEventListener("input", m), () => {
1838
- s.input.current?.removeEventListener("input", u), s.label.current?.removeEventListener("mousedown", o), s.sliderRef !== void 0 && s.sliderRef.current?.removeEventListener("input", m), document.removeEventListener("mouseup", c), document.removeEventListener("mousemove", h), document.removeEventListener("contextmenu", c);
1839
+ return s.input.current?.addEventListener("input", u), s.label.current?.addEventListener("mousedown", o, !1), s.sliderRef !== void 0 && s.sliderRef.current?.addEventListener("input", p), () => {
1840
+ s.input.current?.removeEventListener("input", u), s.label.current?.removeEventListener("mousedown", o), s.sliderRef !== void 0 && s.sliderRef.current?.removeEventListener("input", p), document.removeEventListener("mouseup", h), document.removeEventListener("mousemove", c), document.removeEventListener("contextmenu", h);
1839
1841
  };
1840
1842
  }, []), e;
1841
1843
  }
1842
- function Ze(s) {
1844
+ function Ge(s) {
1843
1845
  const e = ee(null), t = ee(null), i = Dr({
1844
1846
  label: s.labelRef,
1845
1847
  input: e,
@@ -1903,36 +1905,36 @@ function Ze(s) {
1903
1905
  ] });
1904
1906
  }
1905
1907
  function Rr(s) {
1906
- const e = ee(null), t = ee(null), i = ee(null), n = ee(null), a = ee(null), r = ee(null), [o, h] = G(s.value), [c, u] = G({
1908
+ const e = ee(null), t = ee(null), i = ee(null), n = ee(null), a = ee(null), r = ee(null), [o, c] = G(s.value), [h, u] = G({
1907
1909
  min: Math.min(s.min, Math.min(s.value.x, s.value.y)),
1908
1910
  max: Math.max(s.max, Math.max(s.value.x, s.value.y))
1909
- }), [m, _] = G(!1);
1911
+ }), [p, _] = G(!1);
1910
1912
  function g() {
1911
- m || (window.addEventListener("mousemove", M), window.addEventListener("mouseup", S), window.addEventListener("mouseup", S), _(!0));
1913
+ p || (window.addEventListener("mousemove", M), window.addEventListener("mouseup", S), window.addEventListener("mouseup", S), _(!0));
1912
1914
  }
1913
1915
  function S() {
1914
1916
  window.removeEventListener("mousemove", M), window.removeEventListener("mouseup", S), _(!1);
1915
1917
  }
1916
1918
  function M(b) {
1917
- const P = a.current.getBoundingClientRect(), x = He(0, 99, b.clientX - P.left) / 99, j = He(0, 99, b.clientY - P.top) / 99, X = Ot(xi(c.min, c.max, x), 3), _e = Ot(xi(c.min, c.max, j), 3);
1918
- s.onChange({ target: { value: { x: X, y: _e } } }), h({ x: X, y: _e });
1919
+ const P = a.current.getBoundingClientRect(), x = Ye(0, 99, b.clientX - P.left) / 99, j = Ye(0, 99, b.clientY - P.top) / 99, X = be(xi(h.min, h.max, x), 3), _e = be(xi(h.min, h.max, j), 3);
1920
+ s.onChange({ target: { value: { x: X, y: _e } } }), c({ x: X, y: _e });
1919
1921
  }
1920
1922
  function T(b) {
1921
1923
  let P = o.x, x = o.y;
1922
- b.target === e.current ? P = Number(b.target.value) : x = Number(b.target.value), h({ x: P, y: x });
1924
+ b.target === e.current ? P = Number(b.target.value) : x = Number(b.target.value), c({ x: P, y: x });
1923
1925
  }
1924
1926
  function f() {
1925
1927
  const b = Number(i.current.value);
1926
- u({ min: b, max: c.max }), (o.x < b || o.y < b) && h({ x: He(b, c.max, o.x), y: He(b, c.max, o.y) });
1928
+ u({ min: b, max: h.max }), (o.x < b || o.y < b) && c({ x: Ye(b, h.max, o.x), y: Ye(b, h.max, o.y) });
1927
1929
  }
1928
1930
  function v() {
1929
1931
  const b = Number(n.current.value);
1930
- u({ min: c.min, max: b }), (o.x > b || o.y > b) && h({ x: He(c.min, b, o.x), y: He(c.min, b, o.y) });
1932
+ u({ min: h.min, max: b }), (o.x > b || o.y > b) && c({ x: Ye(h.min, b, o.x), y: Ye(h.min, b, o.y) });
1931
1933
  }
1932
- lt(() => {
1933
- const b = Ki(c.min, c.max, o.x), P = Ki(c.min, c.max, o.y);
1934
+ ct(() => {
1935
+ const b = Ji(h.min, h.max, o.x), P = Ji(h.min, h.max, o.y);
1934
1936
  r.current.style.left = `${b * 100}%`, r.current.style.top = `${P * 100}%`;
1935
- }, [c, o]);
1937
+ }, [h, o]);
1936
1938
  const E = s.step !== void 0 ? s.step : 0.01;
1937
1939
  return /* @__PURE__ */ d.jsxs("div", { className: "vector2", children: [
1938
1940
  /* @__PURE__ */ d.jsxs("div", { className: "fields", children: [
@@ -1944,8 +1946,8 @@ function Rr(s) {
1944
1946
  ref: e,
1945
1947
  type: "number",
1946
1948
  value: o.x,
1947
- min: c.min,
1948
- max: c.max,
1949
+ min: h.min,
1950
+ max: h.max,
1949
1951
  step: E,
1950
1952
  onChange: T
1951
1953
  }
@@ -1959,8 +1961,8 @@ function Rr(s) {
1959
1961
  ref: t,
1960
1962
  type: "number",
1961
1963
  value: o.y,
1962
- min: c.min,
1963
- max: c.max,
1964
+ min: h.min,
1965
+ max: h.max,
1964
1966
  step: E,
1965
1967
  onChange: T
1966
1968
  }
@@ -1973,7 +1975,7 @@ function Rr(s) {
1973
1975
  {
1974
1976
  ref: i,
1975
1977
  type: "number",
1976
- value: c.min,
1978
+ value: h.min,
1977
1979
  step: E,
1978
1980
  onChange: f
1979
1981
  }
@@ -1986,7 +1988,7 @@ function Rr(s) {
1986
1988
  {
1987
1989
  ref: n,
1988
1990
  type: "number",
1989
- value: c.max,
1991
+ value: h.max,
1990
1992
  step: E,
1991
1993
  onChange: v
1992
1994
  }
@@ -2000,100 +2002,113 @@ function Rr(s) {
2000
2002
  ] })
2001
2003
  ] });
2002
2004
  }
2003
- function ns(s) {
2005
+ const Ar = Math.PI / 180, Ir = 180 / Math.PI;
2006
+ function Ke(s, e, t, i, n) {
2007
+ return i + (s - e) * (n - i) / (t - e);
2008
+ }
2009
+ function Je(s, e, t) {
2010
+ return (1 - t) * s + t * e;
2011
+ }
2012
+ function Pi(s) {
2013
+ return s * Ar;
2014
+ }
2015
+ function Lr(s) {
2016
+ return s * Ir;
2017
+ }
2018
+ function rs(s) {
2004
2019
  const e = s.value.x !== void 0 && s.value.y !== void 0 && s.value.z !== void 0, t = s.value.isEuler !== void 0, i = s.value.elements !== void 0, n = s.step !== void 0 ? s.step : 0.01, a = [];
2005
- if (e) {
2006
- const r = xt(() => s.value, []), o = (c, u) => {
2007
- r[c] = u, s.onChange({ target: { value: r } });
2008
- };
2009
- ["x", "y", "z"].forEach((c) => {
2010
- const u = ee(null);
2020
+ if (t) {
2021
+ const r = Ot(() => s.value, []);
2022
+ ["_x", "_y", "_z"].forEach((c) => {
2023
+ const h = ee(null);
2011
2024
  a.push(
2012
2025
  /* @__PURE__ */ d.jsxs("div", { children: [
2013
- /* @__PURE__ */ d.jsx("label", { ref: u, children: c.toUpperCase() }),
2026
+ /* @__PURE__ */ d.jsx("label", { ref: h, children: c.substring(1).toUpperCase() }),
2014
2027
  /* @__PURE__ */ d.jsx(
2015
- Ze,
2028
+ Ge,
2016
2029
  {
2017
- value: r[c],
2030
+ value: Lr(r[c]),
2018
2031
  type: "number",
2019
2032
  prop: c,
2020
- step: n,
2021
- labelRef: u,
2022
- onChange: o
2033
+ step: 0.1,
2034
+ labelRef: h,
2035
+ onChange: (u, p) => {
2036
+ r[u] = Pi(p), s.onChange({ target: { value: r } });
2037
+ }
2023
2038
  }
2024
2039
  )
2025
2040
  ] }, c)
2026
2041
  );
2027
2042
  });
2028
- } else if (t) {
2029
- const r = xt(() => s.value, []), o = (c, u) => {
2030
- r[c] = u, s.onChange({ target: { value: r } });
2043
+ } else if (e) {
2044
+ const r = Ot(() => s.value, []), o = (h, u) => {
2045
+ r[h] = u, s.onChange({ target: { value: r } });
2031
2046
  };
2032
- ["_x", "_y", "_z"].forEach((c) => {
2047
+ ["x", "y", "z"].forEach((h) => {
2033
2048
  const u = ee(null);
2034
2049
  a.push(
2035
2050
  /* @__PURE__ */ d.jsxs("div", { children: [
2036
- /* @__PURE__ */ d.jsx("label", { ref: u, children: c.substring(1).toUpperCase() }),
2051
+ /* @__PURE__ */ d.jsx("label", { ref: u, children: h.toUpperCase() }),
2037
2052
  /* @__PURE__ */ d.jsx(
2038
- Ze,
2053
+ Ge,
2039
2054
  {
2040
- value: r[c],
2055
+ value: r[h],
2041
2056
  type: "number",
2042
- prop: c,
2057
+ prop: h,
2043
2058
  step: n,
2044
2059
  labelRef: u,
2045
2060
  onChange: o
2046
2061
  }
2047
2062
  )
2048
- ] }, c)
2063
+ ] }, h)
2049
2064
  );
2050
2065
  });
2051
2066
  } else if (i) {
2052
- const r = xt(() => s.value, []), o = (h, c) => {
2053
- const u = Number(h);
2054
- r.elements[u] = c, s.onChange({ target: { value: r } });
2067
+ const r = Ot(() => s.value, []), o = (c, h) => {
2068
+ const u = Number(c);
2069
+ r.elements[u] = h, s.onChange({ target: { value: r } });
2055
2070
  };
2056
- for (let h = 0; h < 9; h++) {
2057
- const c = ee(null);
2071
+ for (let c = 0; c < 9; c++) {
2072
+ const h = ee(null);
2058
2073
  a.push(
2059
2074
  /* @__PURE__ */ d.jsxs("div", { children: [
2060
- /* @__PURE__ */ d.jsx("label", { ref: c, children: h + 1 }),
2075
+ /* @__PURE__ */ d.jsx("label", { ref: h, children: c + 1 }),
2061
2076
  /* @__PURE__ */ d.jsx(
2062
- Ze,
2077
+ Ge,
2063
2078
  {
2064
- value: r.elements[h],
2079
+ value: r.elements[c],
2065
2080
  type: "number",
2066
- prop: h.toString(),
2081
+ prop: c.toString(),
2067
2082
  step: n,
2068
- labelRef: c,
2083
+ labelRef: h,
2069
2084
  onChange: o
2070
2085
  }
2071
2086
  )
2072
- ] }, h.toString())
2087
+ ] }, c.toString())
2073
2088
  );
2074
2089
  }
2075
2090
  }
2076
2091
  return /* @__PURE__ */ d.jsx("div", { className: "grid3", children: a }, Math.random().toString());
2077
2092
  }
2078
- function Ar(s) {
2093
+ function kr(s) {
2079
2094
  const e = s.value.x !== void 0, t = s.step !== void 0 ? s.step : 0.01, i = [];
2080
2095
  if (e) {
2081
- const n = xt(() => s.value, []), a = (o, h) => {
2082
- n[o] = h, s.onChange({ target: { value: n } });
2096
+ const n = Ot(() => s.value, []), a = (o, c) => {
2097
+ n[o] = c, s.onChange({ target: { value: n } });
2083
2098
  };
2084
2099
  ["x", "y", "z", "w"].forEach((o) => {
2085
- const h = ee(null);
2100
+ const c = ee(null);
2086
2101
  i.push(
2087
2102
  /* @__PURE__ */ d.jsxs("div", { children: [
2088
- /* @__PURE__ */ d.jsx("label", { ref: h, children: o.toUpperCase() }),
2103
+ /* @__PURE__ */ d.jsx("label", { ref: c, children: o.toUpperCase() }),
2089
2104
  /* @__PURE__ */ d.jsx(
2090
- Ze,
2105
+ Ge,
2091
2106
  {
2092
2107
  value: n.x,
2093
2108
  type: "number",
2094
2109
  prop: o,
2095
2110
  step: t,
2096
- labelRef: h,
2111
+ labelRef: c,
2097
2112
  onChange: a
2098
2113
  }
2099
2114
  )
@@ -2101,9 +2116,9 @@ function Ar(s) {
2101
2116
  );
2102
2117
  });
2103
2118
  } else {
2104
- const n = xt(() => s.value, []), a = (r, o) => {
2105
- const h = Number(r);
2106
- n.elements[h] = o, s.onChange({ target: { value: n } });
2119
+ const n = Ot(() => s.value, []), a = (r, o) => {
2120
+ const c = Number(r);
2121
+ n.elements[c] = o, s.onChange({ target: { value: n } });
2107
2122
  };
2108
2123
  for (let r = 0; r < 16; r++) {
2109
2124
  const o = ee(null);
@@ -2111,7 +2126,7 @@ function Ar(s) {
2111
2126
  /* @__PURE__ */ d.jsxs("div", { children: [
2112
2127
  /* @__PURE__ */ d.jsx("label", { ref: o, children: r + 1 }),
2113
2128
  /* @__PURE__ */ d.jsx(
2114
- Ze,
2129
+ Ge,
2115
2130
  {
2116
2131
  value: n.elements[r],
2117
2132
  type: "number",
@@ -2127,10 +2142,10 @@ function Ar(s) {
2127
2142
  }
2128
2143
  return /* @__PURE__ */ d.jsx("div", { className: "grid4", children: i });
2129
2144
  }
2130
- function Ir(s) {
2145
+ function Ur(s) {
2131
2146
  return !(s === "defaultAttributeValues" || s === "forceSinglePass" || s === "linecap" || s === "linejoin" || s === "linewidth" || s === "normalMapType" || s === "precision" || s === "shadowSide" || s === "uniformsGroups" || s === "uniformsNeedUpdate" || s === "userData" || s === "version" || s === "wireframeLinecap" || s === "wireframeLinejoin" || s === "wireframeLinewidth" || s.slice(0, 4) === "clip" || s.slice(0, 7) === "polygon" || s.slice(0, 7) === "stencil" || s.slice(0, 2) === "is");
2132
2147
  }
2133
- function Lr(s) {
2148
+ function jr(s) {
2134
2149
  switch (s) {
2135
2150
  case "Alpha Map":
2136
2151
  return "alphaMap";
@@ -2386,7 +2401,7 @@ function rn(s) {
2386
2401
  const e = s.toLowerCase();
2387
2402
  return e.search("intensity") > -1 || e === "anisotropyrotation" || e === "blendalpha" || e === "bumpscale" || e === "clearcoatroughness" || e === "displacementbias" || e === "displacementscale" || e === "metalness" || e === "opacity" || e === "reflectivity" || e === "refractionratio" || e === "roughness" || e === "sheenroughness";
2388
2403
  }
2389
- function kr() {
2404
+ function Nr() {
2390
2405
  const s = document.createElement("input");
2391
2406
  return s.type = "file", new Promise((e, t) => {
2392
2407
  s.addEventListener("change", function() {
@@ -2401,7 +2416,7 @@ function kr() {
2401
2416
  }), s.click();
2402
2417
  });
2403
2418
  }
2404
- const Ur = [
2419
+ const zr = [
2405
2420
  {
2406
2421
  title: "Front",
2407
2422
  value: kn
@@ -2412,9 +2427,9 @@ const Ur = [
2412
2427
  },
2413
2428
  {
2414
2429
  title: "Double",
2415
- value: Di
2430
+ value: Ri
2416
2431
  }
2417
- ], jr = [
2432
+ ], Fr = [
2418
2433
  {
2419
2434
  title: "No Blending",
2420
2435
  value: Un
@@ -2429,17 +2444,17 @@ const Ur = [
2429
2444
  },
2430
2445
  {
2431
2446
  title: "Subtractive",
2432
- value: Fn
2447
+ value: zn
2433
2448
  },
2434
2449
  {
2435
2450
  title: "Multiply",
2436
- value: zn
2451
+ value: Fn
2437
2452
  },
2438
2453
  {
2439
2454
  title: "Custom",
2440
2455
  value: Hn
2441
2456
  }
2442
- ], Nr = [
2457
+ ], Hr = [
2443
2458
  {
2444
2459
  title: "Add",
2445
2460
  value: Yn
@@ -2460,7 +2475,7 @@ const Ur = [
2460
2475
  title: "Max",
2461
2476
  value: Wn
2462
2477
  }
2463
- ], Fr = [
2478
+ ], Yr = [
2464
2479
  {
2465
2480
  title: "Zero",
2466
2481
  value: As
@@ -2491,11 +2506,11 @@ const Ur = [
2491
2506
  },
2492
2507
  {
2493
2508
  title: "One Minus Dst Alpha",
2494
- value: Fs
2509
+ value: zs
2495
2510
  },
2496
2511
  {
2497
2512
  title: "Dst Color",
2498
- value: zs
2513
+ value: Fs
2499
2514
  },
2500
2515
  {
2501
2516
  title: "One Minus Dst Color",
@@ -2521,7 +2536,7 @@ const Ur = [
2521
2536
  title: "One Minus Constant Alpha",
2522
2537
  value: Gs
2523
2538
  }
2524
- ], zr = [
2539
+ ], Br = [
2525
2540
  {
2526
2541
  title: "Zero",
2527
2542
  value: As
@@ -2552,11 +2567,11 @@ const Ur = [
2552
2567
  },
2553
2568
  {
2554
2569
  title: "One Minus Dst Alpha",
2555
- value: Fs
2570
+ value: zs
2556
2571
  },
2557
2572
  {
2558
2573
  title: "Dst Color",
2559
- value: zs
2574
+ value: Fs
2560
2575
  },
2561
2576
  {
2562
2577
  title: "One Minus Dst Color",
@@ -2579,10 +2594,10 @@ const Ur = [
2579
2594
  value: Gs
2580
2595
  }
2581
2596
  ];
2582
- function mt(s, e) {
2597
+ function ft(s, e) {
2583
2598
  s.needsUpdate = !0, s.type = "option", s.options = e;
2584
2599
  }
2585
- function Hr(s, e, t, i) {
2600
+ function Zr(s, e, t, i) {
2586
2601
  return {
2587
2602
  type: "boolean",
2588
2603
  title: ei(s),
@@ -2599,7 +2614,7 @@ function Hr(s, e, t, i) {
2599
2614
  }
2600
2615
  };
2601
2616
  }
2602
- function Yr(s, e, t, i) {
2617
+ function Gr(s, e, t, i) {
2603
2618
  const n = {
2604
2619
  type: "number",
2605
2620
  title: ei(s),
@@ -2613,31 +2628,31 @@ function Yr(s, e, t, i) {
2613
2628
  i.updateObject(t.uuid, `material.${s}`, r), i.updateObject(t.uuid, "material.needsUpdate", !0);
2614
2629
  const o = i.getScene(t.uuid);
2615
2630
  if (o !== null) {
2616
- const h = o.getObjectByProperty("uuid", t.uuid);
2617
- K(h, `material.${s}`, r);
2631
+ const c = o.getObjectByProperty("uuid", t.uuid);
2632
+ K(c, `material.${s}`, r);
2618
2633
  }
2619
2634
  }
2620
2635
  };
2621
2636
  switch (s) {
2622
2637
  case "blending":
2623
- mt(n, jr);
2638
+ ft(n, Fr);
2624
2639
  break;
2625
2640
  case "blendDst":
2626
- mt(n, zr);
2641
+ ft(n, Br);
2627
2642
  break;
2628
2643
  case "blendEquation":
2629
- mt(n, Nr);
2644
+ ft(n, Hr);
2630
2645
  break;
2631
2646
  case "blendSrc":
2632
- mt(n, Fr);
2647
+ ft(n, Yr);
2633
2648
  break;
2634
2649
  case "side":
2635
- mt(n, Ur);
2650
+ ft(n, zr);
2636
2651
  break;
2637
2652
  }
2638
2653
  return rn(s) && (n.value = Number(e), n.type = "range", n.min = Math.min(0, n.value), n.max = Math.max(1, n.value), n.step = 0.01), n;
2639
2654
  }
2640
- function Br(s, e, t, i) {
2655
+ function Wr(s, e, t, i) {
2641
2656
  const n = {
2642
2657
  type: "string",
2643
2658
  title: ei(s),
@@ -2646,10 +2661,10 @@ function Br(s, e, t, i) {
2646
2661
  needsUpdate: !0,
2647
2662
  onChange: (r, o) => {
2648
2663
  i.updateObject(t.uuid, `material.${s}`, o), i.updateObject(t.uuid, "material.needsUpdate", !0);
2649
- const h = i.getScene(t.uuid);
2650
- if (h !== null) {
2651
- const c = h.getObjectByProperty("uuid", t.uuid);
2652
- K(c, `material.${s}`, o);
2664
+ const c = i.getScene(t.uuid);
2665
+ if (c !== null) {
2666
+ const h = c.getObjectByProperty("uuid", t.uuid);
2667
+ K(h, `material.${s}`, o);
2653
2668
  }
2654
2669
  },
2655
2670
  onKeyDown: (r) => {
@@ -2657,70 +2672,70 @@ function Br(s, e, t, i) {
2657
2672
  };
2658
2673
  return (s === "vertexShader" || s === "fragmentShader") && (n.disabled = !1, n.latest = n.value, n.onChange = (r, o) => {
2659
2674
  n.latest = o, i.updateObject(t.uuid, `material.${s}`, o);
2660
- const h = i.getScene(t.uuid);
2661
- if (h !== null) {
2662
- const c = h.getObjectByProperty("uuid", t.uuid);
2663
- K(c, `material.${s}`, o);
2675
+ const c = i.getScene(t.uuid);
2676
+ if (c !== null) {
2677
+ const h = c.getObjectByProperty("uuid", t.uuid);
2678
+ K(h, `material.${s}`, o);
2664
2679
  }
2665
2680
  }, n.onKeyDown = (r) => {
2666
2681
  if (r.key === "Enter" && (r.altKey || r.metaKey)) {
2667
2682
  i.updateObject(t.uuid, "material.needsUpdate", !0);
2668
2683
  const o = i.getScene(t.uuid);
2669
2684
  if (o !== null) {
2670
- const h = o.getObjectByProperty("uuid", t.uuid);
2671
- K(h, "material.needsUpdate", !0);
2685
+ const c = o.getObjectByProperty("uuid", t.uuid);
2686
+ K(c, "material.needsUpdate", !0);
2672
2687
  }
2673
2688
  }
2674
2689
  }), n;
2675
2690
  }
2676
- function Zr(s) {
2691
+ function Vr(s) {
2677
2692
  return s.x !== void 0 && s.y !== void 0 && s.z === void 0;
2678
2693
  }
2679
- function Gr(s) {
2694
+ function Xr(s) {
2680
2695
  return s.x !== void 0 && s.y !== void 0 && s.z !== void 0 && s.w === void 0;
2681
2696
  }
2682
- function Wr(s) {
2697
+ function $r(s) {
2683
2698
  return s.x !== void 0 && s.y !== void 0 && s.z !== void 0 && s.w !== void 0;
2684
2699
  }
2685
- function Pi(s) {
2700
+ function Di(s) {
2686
2701
  s.sort((e, t) => e.title < t.title ? -1 : e.title > t.title ? 1 : 0);
2687
2702
  }
2688
- function Ct(s, e, t, i, n = "", a = !1) {
2689
- const r = ei(s).split(".")[0].replaceAll("[", "").replaceAll("]", ""), o = n.length > 0 ? `${n}.${s}` : s, h = typeof e;
2690
- if (h === "boolean" || h === "string")
2703
+ function wt(s, e, t, i, n = "", a = !1) {
2704
+ const r = ei(s).split(".")[0].replaceAll("[", "").replaceAll("]", ""), o = n.length > 0 ? `${n}.${s}` : s, c = typeof e;
2705
+ if (c === "boolean" || c === "string")
2691
2706
  return {
2692
2707
  title: r,
2693
2708
  prop: o,
2694
- type: h,
2709
+ type: c,
2695
2710
  value: e,
2696
2711
  disabled: a,
2697
- onChange: (c, u) => {
2712
+ onChange: (h, u) => {
2698
2713
  i.updateObject(t.uuid, `material.${o}`, u);
2699
- const m = i.getScene(t.uuid);
2700
- if (m !== null) {
2701
- const _ = m.getObjectByProperty("uuid", t.uuid);
2714
+ const p = i.getScene(t.uuid);
2715
+ if (p !== null) {
2716
+ const _ = p.getObjectByProperty("uuid", t.uuid);
2702
2717
  K(_, `material.${o}`, u);
2703
2718
  }
2704
2719
  }
2705
2720
  };
2706
- if (h === "number") {
2707
- const c = {
2721
+ if (c === "number") {
2722
+ const h = {
2708
2723
  title: r,
2709
2724
  prop: o,
2710
2725
  type: "number",
2711
2726
  value: e,
2712
2727
  step: 0.01,
2713
2728
  disabled: a,
2714
- onChange: (u, m) => {
2715
- i.updateObject(t.uuid, `material.${o}`, m);
2729
+ onChange: (u, p) => {
2730
+ i.updateObject(t.uuid, `material.${o}`, p);
2716
2731
  const _ = i.getScene(t.uuid);
2717
2732
  if (_ !== null) {
2718
2733
  const g = _.getObjectByProperty("uuid", t.uuid);
2719
- K(g, `material.${o}`, m);
2734
+ K(g, `material.${o}`, p);
2720
2735
  }
2721
2736
  }
2722
2737
  };
2723
- return rn(r) && (c.type = "range", c.min = 0, c.max = 1), c;
2738
+ return rn(r) && (h.type = "range", h.min = 0, h.max = 1), h;
2724
2739
  } else {
2725
2740
  if (e.isColor)
2726
2741
  return {
@@ -2729,78 +2744,78 @@ function Ct(s, e, t, i, n = "", a = !1) {
2729
2744
  type: "color",
2730
2745
  value: e,
2731
2746
  disabled: a,
2732
- onChange: (c, u) => {
2733
- const m = new Tt(u);
2734
- i.updateObject(t.uuid, `material.${o}`, m);
2747
+ onChange: (h, u) => {
2748
+ const p = new Tt(u);
2749
+ i.updateObject(t.uuid, `material.${o}`, p);
2735
2750
  const _ = i.getScene(t.uuid);
2736
2751
  if (_ !== null) {
2737
2752
  const g = _.getObjectByProperty("uuid", t.uuid);
2738
- K(g, `material.${o}`, m);
2753
+ K(g, `material.${o}`, p);
2739
2754
  }
2740
2755
  }
2741
2756
  };
2742
2757
  if (Array.isArray(e)) {
2743
- const c = [];
2758
+ const h = [];
2744
2759
  for (const u in e) {
2745
- const m = e[u], _ = `[${u.toString()}]`;
2746
- if (m.value !== void 0) {
2747
- const g = Ct(`${_}.value`, m.value, t, i, o, a);
2748
- g !== void 0 && c.push(g);
2760
+ const p = e[u], _ = `[${u.toString()}]`;
2761
+ if (p.value !== void 0) {
2762
+ const g = wt(`${_}.value`, p.value, t, i, o, a);
2763
+ g !== void 0 && h.push(g);
2749
2764
  } else {
2750
- const g = Ct(_, m, t, i, o, a);
2751
- g !== void 0 && c.push(g);
2765
+ const g = wt(_, p, t, i, o, a);
2766
+ g !== void 0 && h.push(g);
2752
2767
  }
2753
2768
  }
2754
- if (c.length > 0)
2755
- return Pi(c), {
2769
+ if (h.length > 0)
2770
+ return Di(h), {
2756
2771
  title: r,
2757
- items: c
2772
+ items: h
2758
2773
  };
2759
2774
  } else {
2760
- if (Zr(e))
2775
+ if (Vr(e))
2761
2776
  return {
2762
2777
  title: r,
2763
2778
  prop: o,
2764
2779
  type: "vector2",
2765
2780
  value: e,
2766
2781
  disabled: a,
2767
- onChange: (c, u) => {
2782
+ onChange: (h, u) => {
2768
2783
  i.updateObject(t.uuid, `material.${o}`, u);
2769
- const m = i.getScene(t.uuid);
2770
- if (m !== null) {
2771
- const _ = m.getObjectByProperty("uuid", t.uuid);
2784
+ const p = i.getScene(t.uuid);
2785
+ if (p !== null) {
2786
+ const _ = p.getObjectByProperty("uuid", t.uuid);
2772
2787
  K(_, `material.${o}`, u);
2773
2788
  }
2774
2789
  }
2775
2790
  };
2776
- if (Gr(e))
2791
+ if (Xr(e))
2777
2792
  return {
2778
2793
  title: r,
2779
2794
  prop: o,
2780
2795
  type: "grid3",
2781
2796
  value: e,
2782
2797
  disabled: a,
2783
- onChange: (c, u) => {
2798
+ onChange: (h, u) => {
2784
2799
  i.updateObject(t.uuid, `material.${o}`, u);
2785
- const m = i.getScene(t.uuid);
2786
- if (m !== null) {
2787
- const _ = m.getObjectByProperty("uuid", t.uuid);
2800
+ const p = i.getScene(t.uuid);
2801
+ if (p !== null) {
2802
+ const _ = p.getObjectByProperty("uuid", t.uuid);
2788
2803
  K(_, `material.${o}`, u);
2789
2804
  }
2790
2805
  }
2791
2806
  };
2792
- if (Wr(e))
2807
+ if ($r(e))
2793
2808
  return {
2794
2809
  title: r,
2795
2810
  prop: o,
2796
2811
  type: "grid4",
2797
2812
  value: e,
2798
2813
  disabled: a,
2799
- onChange: (c, u) => {
2814
+ onChange: (h, u) => {
2800
2815
  i.updateObject(t.uuid, `material.${o}`, u);
2801
- const m = i.getScene(t.uuid);
2802
- if (m !== null) {
2803
- const _ = m.getObjectByProperty("uuid", t.uuid);
2816
+ const p = i.getScene(t.uuid);
2817
+ if (p !== null) {
2818
+ const _ = p.getObjectByProperty("uuid", t.uuid);
2804
2819
  K(_, `material.${o}`, u);
2805
2820
  }
2806
2821
  }
@@ -2812,11 +2827,11 @@ function Ct(s, e, t, i, n = "", a = !1) {
2812
2827
  type: "euler",
2813
2828
  value: e,
2814
2829
  disabled: a,
2815
- onChange: (c, u) => {
2830
+ onChange: (h, u) => {
2816
2831
  i.updateObject(t.uuid, `material.${o}`, u);
2817
- const m = i.getScene(t.uuid);
2818
- if (m !== null) {
2819
- const _ = m.getObjectByProperty("uuid", t.uuid);
2832
+ const p = i.getScene(t.uuid);
2833
+ if (p !== null) {
2834
+ const _ = p.getObjectByProperty("uuid", t.uuid);
2820
2835
  K(_, `material.${o}`, u);
2821
2836
  }
2822
2837
  }
@@ -2827,8 +2842,8 @@ function Ct(s, e, t, i, n = "", a = !1) {
2827
2842
  type: "image",
2828
2843
  value: e,
2829
2844
  disabled: a,
2830
- onChange: (c, u) => {
2831
- const m = Lr(s), _ = n.length > 0 ? `${n}.${m}` : m;
2845
+ onChange: (h, u) => {
2846
+ const p = jr(s), _ = n.length > 0 ? `${n}.${p}` : p;
2832
2847
  i.createTexture(t.uuid, `material.${_}`, u);
2833
2848
  const g = i.getScene(t.uuid);
2834
2849
  if (g !== null) {
@@ -2869,60 +2884,60 @@ function Ct(s, e, t, i, n = "", a = !1) {
2869
2884
  type: e.elements.length > 9 ? "grid4" : "grid3",
2870
2885
  value: e,
2871
2886
  disabled: a,
2872
- onChange: (c, u) => {
2887
+ onChange: (h, u) => {
2873
2888
  i.updateObject(t.uuid, `material.${o}`, u);
2874
- const m = i.getScene(t.uuid);
2875
- if (m !== null) {
2876
- const _ = m.getObjectByProperty("uuid", t.uuid);
2889
+ const p = i.getScene(t.uuid);
2890
+ if (p !== null) {
2891
+ const _ = p.getObjectByProperty("uuid", t.uuid);
2877
2892
  K(_, `material.${o}`, u);
2878
2893
  }
2879
2894
  }
2880
2895
  };
2881
2896
  {
2882
- const c = [], u = s === "defines" || s === "extensions";
2897
+ const h = [], u = s === "defines" || s === "extensions";
2883
2898
  try {
2884
- for (const m in e) {
2885
- const _ = e[m];
2899
+ for (const p in e) {
2900
+ const _ = e[p];
2886
2901
  if (_ !== void 0)
2887
2902
  if (_.value !== void 0) {
2888
- const g = Ct(`${m}.value`, _.value, t, i, o, u);
2889
- g !== void 0 && c.push(g);
2903
+ const g = wt(`${p}.value`, _.value, t, i, o, u);
2904
+ g !== void 0 && h.push(g);
2890
2905
  } else {
2891
- const g = Ct(m, _, t, i, o, u);
2892
- g !== void 0 && c.push(g);
2906
+ const g = wt(p, _, t, i, o, u);
2907
+ g !== void 0 && h.push(g);
2893
2908
  }
2894
2909
  }
2895
2910
  } catch {
2896
2911
  console.log("Issue cycling through material object:", s, e);
2897
2912
  }
2898
- if (c.length > 0)
2899
- return Pi(c), {
2913
+ if (h.length > 0)
2914
+ return Di(h), {
2900
2915
  title: r,
2901
- items: c
2916
+ items: h
2902
2917
  };
2903
2918
  }
2904
2919
  }
2905
2920
  }
2906
2921
  }
2907
- function rs(s, e, t) {
2922
+ function as(s, e, t) {
2908
2923
  const i = [];
2909
2924
  for (const n in s) {
2910
- if (!Ir(n))
2925
+ if (!Ur(n))
2911
2926
  continue;
2912
2927
  const a = typeof s[n], r = s[n];
2913
2928
  if (a === "boolean")
2914
- i.push(Hr(n, r, e, t));
2929
+ i.push(Zr(n, r, e, t));
2915
2930
  else if (a === "number")
2916
- i.push(Yr(n, r, e, t));
2931
+ i.push(Gr(n, r, e, t));
2917
2932
  else if (a === "string")
2918
- i.push(Br(n, r, e, t));
2933
+ i.push(Wr(n, r, e, t));
2919
2934
  else if (a === "object") {
2920
- const o = Ct(n, r, e, t);
2935
+ const o = wt(n, r, e, t);
2921
2936
  o !== void 0 && i.push(o);
2922
2937
  } else
2923
2938
  r !== void 0 && console.log("other:", n, a, r);
2924
2939
  }
2925
- return Pi(i), i.push({
2940
+ return Di(i), i.push({
2926
2941
  title: "Update Material",
2927
2942
  type: "button",
2928
2943
  onChange: () => {
@@ -2935,17 +2950,17 @@ function rs(s, e, t) {
2935
2950
  }
2936
2951
  }), i;
2937
2952
  }
2938
- function Vr(s, e) {
2953
+ function Qr(s, e) {
2939
2954
  const t = s.material;
2940
2955
  if (Array.isArray(t)) {
2941
2956
  const i = [], n = t.length;
2942
2957
  for (let a = 0; a < n; a++)
2943
2958
  i.push(
2944
2959
  /* @__PURE__ */ d.jsx(
2945
- be,
2960
+ Ee,
2946
2961
  {
2947
2962
  title: `Material ${a}`,
2948
- items: rs(t[a], s, e)
2963
+ items: as(t[a], s, e)
2949
2964
  },
2950
2965
  `Material ${a}`
2951
2966
  )
@@ -2953,16 +2968,16 @@ function Vr(s, e) {
2953
2968
  return /* @__PURE__ */ d.jsx(d.Fragment, { children: i });
2954
2969
  } else
2955
2970
  return /* @__PURE__ */ d.jsx(
2956
- be,
2971
+ Ee,
2957
2972
  {
2958
2973
  title: "Material",
2959
- items: rs(t, s, e)
2974
+ items: as(t, s, e)
2960
2975
  }
2961
2976
  );
2962
2977
  }
2963
- const as = "data:image/gif;base64,R0lGODlhDgFkAIAAAP///wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgOS4xLWMwMDIgNzkuZGJhM2RhM2I1LCAyMDIzLzEyLzE1LTEwOjQyOjM3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjUuNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoyMDk3M0NEODAxQjQxMUVGODVGNENDMkUyMUExNDk1NSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoyMDk3M0NEOTAxQjQxMUVGODVGNENDMkUyMUExNDk1NSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkE4ODc3Qzg5MDFCMzExRUY4NUY0Q0MyRTIxQTE0OTU1IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkE4ODc3QzhBMDFCMzExRUY4NUY0Q0MyRTIxQTE0OTU1Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAAAAAAAsAAAAAA4BZAAAAv+Mj6nL7Q+jnLTai7PevPsPhuJIluaJpurKtu4Lx/JM1/aN5/rO9/4PDAqHxKLxiEwql8ym8wmNSqfUqvWKzWq33K73Cw6Lx+Sy+YxOq9fstvsNj8vn9Lr9js/r9/y+/w8YKDhIWGh4iJiouMjY6PgIGSk5SVlpeYmZqTkJAGDQ+dnpuekmGgAKejpKuiZqmprKqoZKGyrbOlqrejub6xvLGyw8TFzcprurGuvqybxq7ETbrItsCz0l7Zpc+6p9/cS967w9/S2FTF0u/mzehK4Oqz3eTl9vf4+fr7/P3+//DzCgwIEECxo8iDChwoUMGzp8CDGixIkUK1q8iDGjxo0XHDt6/AgypMiRJEuaPIkypcqVLFt+KwAAOw==";
2964
- function Xr(s) {
2965
- const e = s.step !== void 0 ? s.step : 0.01, t = ee(null), i = ee(null), n = ee(null), a = ee(null), r = ee(null), [o] = G(s.value), [h, c] = G(s.value.offset[0]), [u, m] = G(s.value.offset[1]), [_, g] = G(s.value.repeat[0]), [S, M] = G(s.value.repeat[1]);
2978
+ const os = "data:image/gif;base64,R0lGODlhDgFkAIAAAP///wAAACH/C1hNUCBEYXRhWE1QPD94cGFja2V0IGJlZ2luPSLvu78iIGlkPSJXNU0wTXBDZWhpSHpyZVN6TlRjemtjOWQiPz4gPHg6eG1wbWV0YSB4bWxuczp4PSJhZG9iZTpuczptZXRhLyIgeDp4bXB0az0iQWRvYmUgWE1QIENvcmUgOS4xLWMwMDIgNzkuZGJhM2RhM2I1LCAyMDIzLzEyLzE1LTEwOjQyOjM3ICAgICAgICAiPiA8cmRmOlJERiB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiPiA8cmRmOkRlc2NyaXB0aW9uIHJkZjphYm91dD0iIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtbG5zOnhtcE1NPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvbW0vIiB4bWxuczpzdFJlZj0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL3NUeXBlL1Jlc291cmNlUmVmIyIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgMjUuNiAoTWFjaW50b3NoKSIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDoyMDk3M0NEODAxQjQxMUVGODVGNENDMkUyMUExNDk1NSIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDoyMDk3M0NEOTAxQjQxMUVGODVGNENDMkUyMUExNDk1NSI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkE4ODc3Qzg5MDFCMzExRUY4NUY0Q0MyRTIxQTE0OTU1IiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkE4ODc3QzhBMDFCMzExRUY4NUY0Q0MyRTIxQTE0OTU1Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+Af/+/fz7+vn49/b19PPy8fDv7u3s6+rp6Ofm5eTj4uHg397d3Nva2djX1tXU09LR0M/OzczLysnIx8bFxMPCwcC/vr28u7q5uLe2tbSzsrGwr66trKuqqainpqWko6KhoJ+enZybmpmYl5aVlJOSkZCPjo2Mi4qJiIeGhYSDgoGAf359fHt6eXh3dnV0c3JxcG9ubWxramloZ2ZlZGNiYWBfXl1cW1pZWFdWVVRTUlFQT05NTEtKSUhHRkVEQ0JBQD8+PTw7Ojk4NzY1NDMyMTAvLi0sKyopKCcmJSQjIiEgHx4dHBsaGRgXFhUUExIREA8ODQwLCgkIBwYFBAMCAQAAIfkEAAAAAAAsAAAAAA4BZAAAAv+Mj6nL7Q+jnLTai7PevPsPhuJIluaJpurKtu4Lx/JM1/aN5/rO9/4PDAqHxKLxiEwql8ym8wmNSqfUqvWKzWq33K73Cw6Lx+Sy+YxOq9fstvsNj8vn9Lr9js/r9/y+/w8YKDhIWGh4iJiouMjY6PgIGSk5SVlpeYmZqTkJAGDQ+dnpuekmGgAKejpKuiZqmprKqoZKGyrbOlqrejub6xvLGyw8TFzcprurGuvqybxq7ETbrItsCz0l7Zpc+6p9/cS967w9/S2FTF0u/mzehK4Oqz3eTl9vf4+fr7/P3+//DzCgwIEECxo8iDChwoUMGzp8CDGixIkUK1q8iDGjxo0XHDt6/AgypMiRJEuaPIkypcqVLFt+KwAAOw==";
2979
+ function qr(s) {
2980
+ const e = s.step !== void 0 ? s.step : 0.01, t = ee(null), i = ee(null), n = ee(null), a = ee(null), r = ee(null), [o] = G(s.value), [c, h] = G(s.value.offset[0]), [u, p] = G(s.value.offset[1]), [_, g] = G(s.value.repeat[0]), [S, M] = G(s.value.repeat[1]);
2966
2981
  function T(v, E, b, P, x) {
2967
2982
  if (s.onChange !== void 0) {
2968
2983
  const j = s.prop !== void 0 ? s.prop : s.title;
@@ -2977,25 +2992,25 @@ function Xr(s) {
2977
2992
  const E = t.current.src, b = v.target.value;
2978
2993
  switch (v.target) {
2979
2994
  case i.current:
2980
- c(b), T(E, b, u, _, S);
2995
+ h(b), T(E, b, u, _, S);
2981
2996
  break;
2982
2997
  case n.current:
2983
- m(b), T(E, h, b, _, S);
2998
+ p(b), T(E, c, b, _, S);
2984
2999
  break;
2985
3000
  case a.current:
2986
- g(b), T(E, h, u, b, S);
3001
+ g(b), T(E, c, u, b, S);
2987
3002
  break;
2988
3003
  case r.current:
2989
- M(b), T(E, h, u, _, b);
3004
+ M(b), T(E, c, u, _, b);
2990
3005
  break;
2991
3006
  }
2992
3007
  }
2993
3008
  return /* @__PURE__ */ d.jsxs("div", { className: "imageField", children: [
2994
3009
  /* @__PURE__ */ d.jsx("img", { alt: s.title, ref: t, onClick: () => {
2995
- kr().then((v) => {
2996
- t.current.src = v, T(v, h, u, _, S);
3010
+ Nr().then((v) => {
3011
+ t.current.src = v, T(v, c, u, _, S);
2997
3012
  });
2998
- }, src: o.src.length > 0 ? o.src : as }),
3013
+ }, src: o.src.length > 0 ? o.src : os }),
2999
3014
  /* @__PURE__ */ d.jsxs("div", { className: "fields", children: [
3000
3015
  /* @__PURE__ */ d.jsxs("div", { children: [
3001
3016
  /* @__PURE__ */ d.jsx("label", { children: "Offset:" }),
@@ -3004,7 +3019,7 @@ function Xr(s) {
3004
3019
  {
3005
3020
  ref: i,
3006
3021
  type: "number",
3007
- value: h,
3022
+ value: c,
3008
3023
  step: e,
3009
3024
  onChange: f
3010
3025
  }
@@ -3044,29 +3059,29 @@ function Xr(s) {
3044
3059
  )
3045
3060
  ] }),
3046
3061
  /* @__PURE__ */ d.jsx("button", { onClick: () => {
3047
- T("", h, u, _, S), t.current.src = as;
3062
+ T("", c, u, _, S), t.current.src = os;
3048
3063
  }, children: "Clear" })
3049
3064
  ] })
3050
3065
  ] });
3051
3066
  }
3052
3067
  function Wt(s) {
3053
3068
  let e = s.value;
3054
- e !== void 0 && (e.isColor !== void 0 ? e = Ji(s.value) : s.type === "color" && (e = Ji(new Tt(s.value))));
3055
- const [t, i] = G(e), n = ee(null), a = (c) => {
3056
- let u = c.target.value;
3069
+ e !== void 0 && (e.isColor !== void 0 ? e = es(s.value) : s.type === "color" && (e = es(new Tt(s.value))));
3070
+ const [t, i] = G(e), n = ee(null), a = (h) => {
3071
+ let u = h.target.value;
3057
3072
  if (s.type === "boolean")
3058
- u = c.target.checked;
3073
+ u = h.target.checked;
3059
3074
  else if (s.type === "option" && (typeof s.value == "number" ? u = Number(u) : typeof s.value == "boolean" ? u = !!u : typeof s.value == "object" && (u = JSON.parse(u)), s.options !== void 0)) {
3060
- const m = s.options.length;
3061
- for (let _ = 0; _ < m && s.options[_].value !== u; _++)
3075
+ const p = s.options.length;
3076
+ for (let _ = 0; _ < p && s.options[_].value !== u; _++)
3062
3077
  ;
3063
3078
  }
3064
3079
  i(u), s.onChange !== void 0 && s.onChange(s.prop !== void 0 ? s.prop : s.title, u);
3065
3080
  }, r = {};
3066
3081
  s.disabled && (r.opacity = 0.8);
3067
3082
  const o = s.type === "string" && (t.length > 100 || t.search(`
3068
- `) > -1), h = o || s.type === "image" || s.type === "vector2";
3069
- return /* @__PURE__ */ d.jsxs("div", { className: `field ${h ? "block" : ""}`, style: r, children: [
3083
+ `) > -1), c = o || s.type === "image" || s.type === "vector2";
3084
+ return /* @__PURE__ */ d.jsxs("div", { className: `field ${c ? "block" : ""}`, style: r, children: [
3070
3085
  s.type !== "button" && /* @__PURE__ */ d.jsx("label", { ref: n, children: $t(s.title) }, "fieldLabel"),
3071
3086
  s.type === "string" && !o && /* @__PURE__ */ d.jsx(
3072
3087
  "input",
@@ -3084,8 +3099,8 @@ function Wt(s) {
3084
3099
  rows: 10,
3085
3100
  disabled: s.disabled !== void 0 ? s.disabled : !0,
3086
3101
  onChange: a,
3087
- onKeyDown: (c) => {
3088
- s.onKeyDown !== void 0 && s.onKeyDown(c);
3102
+ onKeyDown: (h) => {
3103
+ s.onKeyDown !== void 0 && s.onKeyDown(h);
3089
3104
  },
3090
3105
  value: t
3091
3106
  }
@@ -3100,7 +3115,7 @@ function Wt(s) {
3100
3115
  }
3101
3116
  ),
3102
3117
  s.type === "number" && /* @__PURE__ */ d.jsx(
3103
- Ze,
3118
+ Ge,
3104
3119
  {
3105
3120
  value: t,
3106
3121
  type: s.type,
@@ -3114,7 +3129,7 @@ function Wt(s) {
3114
3129
  }
3115
3130
  ),
3116
3131
  s.type === "range" && /* @__PURE__ */ d.jsx(
3117
- Ze,
3132
+ Ge,
3118
3133
  {
3119
3134
  value: t,
3120
3135
  type: s.type,
@@ -3141,18 +3156,18 @@ function Wt(s) {
3141
3156
  children: s.title
3142
3157
  }
3143
3158
  ),
3144
- s.type === "image" && /* @__PURE__ */ d.jsx(Xr, { title: s.title, prop: s.prop, value: s.value, onChange: s.onChange }),
3145
- s.type === "option" && /* @__PURE__ */ d.jsx(d.Fragment, { children: /* @__PURE__ */ d.jsx("select", { onChange: a, disabled: s.disabled, defaultValue: s.value, children: s.options?.map((c, u) => /* @__PURE__ */ d.jsx("option", { value: c.value, children: $t(c.title) }, u)) }) }),
3159
+ s.type === "image" && /* @__PURE__ */ d.jsx(qr, { title: s.title, prop: s.prop, value: s.value, onChange: s.onChange }),
3160
+ s.type === "option" && /* @__PURE__ */ d.jsx(d.Fragment, { children: /* @__PURE__ */ d.jsx("select", { onChange: a, disabled: s.disabled, defaultValue: s.value, children: s.options?.map((h, u) => /* @__PURE__ */ d.jsx("option", { value: h.value, children: $t(h.title) }, u)) }) }),
3146
3161
  s.type === "vector2" && /* @__PURE__ */ d.jsx(Rr, { step: s.step, value: t, min: 0, max: 1, onChange: a }),
3147
- s.type === "grid3" && /* @__PURE__ */ d.jsx(ns, { step: s.step, value: t, onChange: a }),
3148
- s.type === "grid4" && /* @__PURE__ */ d.jsx(Ar, { step: s.step, value: t, onChange: a }),
3149
- s.type === "euler" && /* @__PURE__ */ d.jsx(ns, { step: s.step, value: t, onChange: a })
3162
+ s.type === "grid3" && /* @__PURE__ */ d.jsx(rs, { step: s.step, value: t, onChange: a }),
3163
+ s.type === "grid4" && /* @__PURE__ */ d.jsx(kr, { step: s.step, value: t, onChange: a }),
3164
+ s.type === "euler" && /* @__PURE__ */ d.jsx(rs, { step: s.step, value: t, onChange: a })
3150
3165
  ] });
3151
3166
  }
3152
- function $r(s) {
3167
+ function Kr(s) {
3153
3168
  return "items" in s;
3154
3169
  }
3155
- class be extends Jt {
3170
+ class Ee extends Jt {
3156
3171
  subgroupNames = [];
3157
3172
  subgroupElements = [];
3158
3173
  valueOverrides = /* @__PURE__ */ new Map();
@@ -3177,8 +3192,8 @@ class be extends Jt {
3177
3192
  }
3178
3193
  });
3179
3194
  });
3180
- const i = Ae(), n = /* @__PURE__ */ d.jsx(
3181
- be,
3195
+ const i = Ie(), n = /* @__PURE__ */ d.jsx(
3196
+ Ee,
3182
3197
  {
3183
3198
  ref: i,
3184
3199
  title: e.title,
@@ -3204,9 +3219,9 @@ class be extends Jt {
3204
3219
  render() {
3205
3220
  const e = [];
3206
3221
  return this.props.items.forEach((t) => {
3207
- if ($r(t))
3222
+ if (Kr(t))
3208
3223
  e.push(
3209
- /* @__PURE__ */ d.jsx(be, { title: $t(t.title), items: t.items }, Math.random())
3224
+ /* @__PURE__ */ d.jsx(Ee, { title: $t(t.title), items: t.items }, Math.random())
3210
3225
  );
3211
3226
  else {
3212
3227
  const i = this.valueOverrides.get(t.title), n = i !== void 0 ? i : t.value;
@@ -3281,7 +3296,7 @@ class q extends Jt {
3281
3296
  });
3282
3297
  }), q.groups.push(
3283
3298
  /* @__PURE__ */ d.jsx(
3284
- be,
3299
+ Ee,
3285
3300
  {
3286
3301
  title: t.title,
3287
3302
  items: i
@@ -3317,8 +3332,8 @@ class q extends Jt {
3317
3332
  }
3318
3333
  });
3319
3334
  });
3320
- const i = Ae(), n = /* @__PURE__ */ d.jsx(
3321
- be,
3335
+ const i = Ie(), n = /* @__PURE__ */ d.jsx(
3336
+ Ee,
3322
3337
  {
3323
3338
  ref: i,
3324
3339
  title: e.title,
@@ -3338,7 +3353,7 @@ class q extends Jt {
3338
3353
  }
3339
3354
  }
3340
3355
  }
3341
- function os(s) {
3356
+ function ls(s) {
3342
3357
  switch (s) {
3343
3358
  case "fov":
3344
3359
  return "FOV";
@@ -3367,12 +3382,12 @@ function os(s) {
3367
3382
  }
3368
3383
  return s;
3369
3384
  }
3370
- function Qr(s, e) {
3385
+ function Jr(s, e) {
3371
3386
  const t = [];
3372
3387
  if (s.perspectiveCameraInfo !== void 0)
3373
3388
  for (const i in s.perspectiveCameraInfo)
3374
3389
  t.push({
3375
- title: os(i),
3390
+ title: ls(i),
3376
3391
  prop: i,
3377
3392
  type: "number",
3378
3393
  step: 0.01,
@@ -3389,7 +3404,7 @@ function Qr(s, e) {
3389
3404
  else if (s.orthographicCameraInfo !== void 0)
3390
3405
  for (const i in s.orthographicCameraInfo)
3391
3406
  t.push({
3392
- title: os(i),
3407
+ title: ls(i),
3393
3408
  prop: i,
3394
3409
  type: "number",
3395
3410
  step: 0.01,
@@ -3404,21 +3419,21 @@ function Qr(s, e) {
3404
3419
  }
3405
3420
  });
3406
3421
  return /* @__PURE__ */ d.jsx(
3407
- be,
3422
+ Ee,
3408
3423
  {
3409
3424
  title: "Camera",
3410
3425
  items: t
3411
3426
  }
3412
3427
  );
3413
3428
  }
3414
- class qr extends Se {
3429
+ class ea extends xe {
3415
3430
  constructor(e, t) {
3416
- const i = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0], n = new at();
3417
- n.setAttribute("position", new Be(i, 3)), n.computeBoundingSphere();
3418
- const a = new Ri({ fog: !1 });
3431
+ const i = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, -1, 0, 1, 1, 0], n = new ot();
3432
+ n.setAttribute("position", new Ze(i, 3)), n.computeBoundingSphere();
3433
+ const a = new Ai({ fog: !1 });
3419
3434
  super(n, a), this.light = e, this.color = t, this.type = "RectAreaLightHelper";
3420
- const r = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], o = new at();
3421
- o.setAttribute("position", new Be(r, 3)), o.computeBoundingSphere(), this.add(new w(o, new Ge({ side: Rs, fog: !1 })));
3435
+ const r = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], o = new ot();
3436
+ o.setAttribute("position", new Ze(r, 3)), o.computeBoundingSphere(), this.add(new w(o, new We({ side: Rs, fog: !1 })));
3422
3437
  }
3423
3438
  updateMatrixWorld() {
3424
3439
  if (this.scale.set(0.5 * this.light.width, 0.5 * this.light.height, 1), this.color !== void 0)
@@ -3434,7 +3449,7 @@ class qr extends Se {
3434
3449
  this.geometry.dispose(), this.material.dispose(), this.children[0].geometry.dispose(), this.children[0].material.dispose();
3435
3450
  }
3436
3451
  }
3437
- const ls = { type: "change" }, Ii = { type: "start" }, an = { type: "end" }, Ut = new Xn(), cs = new $n(), Kr = Math.cos(70 * Qn.DEG2RAD), ie = new O(), he = 2 * Math.PI, H = {
3452
+ const cs = { type: "change" }, Li = { type: "start" }, an = { type: "end" }, Ut = new Xn(), hs = new $n(), ta = Math.cos(70 * Qn.DEG2RAD), ie = new O(), he = 2 * Math.PI, H = {
3438
3453
  NONE: -1,
3439
3454
  ROTATE: 0,
3440
3455
  DOLLY: 1,
@@ -3444,9 +3459,9 @@ const ls = { type: "change" }, Ii = { type: "start" }, an = { type: "end" }, Ut
3444
3459
  TOUCH_DOLLY_PAN: 5,
3445
3460
  TOUCH_DOLLY_ROTATE: 6
3446
3461
  }, ui = 1e-6;
3447
- class Jr extends Ws {
3462
+ class ia extends Ws {
3448
3463
  constructor(e, t = null) {
3449
- super(e, t), this.state = H.NONE, this.enabled = !0, this.target = new O(), this.cursor = new O(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: rt.ROTATE, MIDDLE: rt.DOLLY, RIGHT: rt.PAN }, this.touches = { ONE: nt.ROTATE, TWO: nt.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new O(), this._lastQuaternion = new fe(), this._lastTargetPosition = new O(), this._quat = new fe().setFromUnitVectors(e.up, new O(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Si(), this._sphericalDelta = new Si(), this._scale = 1, this._panOffset = new O(), this._rotateStart = new ae(), this._rotateEnd = new ae(), this._rotateDelta = new ae(), this._panStart = new ae(), this._panEnd = new ae(), this._panDelta = new ae(), this._dollyStart = new ae(), this._dollyEnd = new ae(), this._dollyDelta = new ae(), this._dollyDirection = new O(), this._mouse = new ae(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = ta.bind(this), this._onPointerDown = ea.bind(this), this._onPointerUp = ia.bind(this), this._onContextMenu = ca.bind(this), this._onMouseWheel = ra.bind(this), this._onKeyDown = aa.bind(this), this._onTouchStart = oa.bind(this), this._onTouchMove = la.bind(this), this._onMouseDown = sa.bind(this), this._onMouseMove = na.bind(this), this._interceptControlDown = ha.bind(this), this._interceptControlUp = da.bind(this), this.domElement !== null && this.connect(), this.update();
3464
+ super(e, t), this.state = H.NONE, this.enabled = !0, this.target = new O(), this.cursor = new O(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: at.ROTATE, MIDDLE: at.DOLLY, RIGHT: at.PAN }, this.touches = { ONE: rt.ROTATE, TWO: rt.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new O(), this._lastQuaternion = new fe(), this._lastTargetPosition = new O(), this._quat = new fe().setFromUnitVectors(e.up, new O(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Si(), this._sphericalDelta = new Si(), this._scale = 1, this._panOffset = new O(), this._rotateStart = new ae(), this._rotateEnd = new ae(), this._rotateDelta = new ae(), this._panStart = new ae(), this._panEnd = new ae(), this._panDelta = new ae(), this._dollyStart = new ae(), this._dollyEnd = new ae(), this._dollyDelta = new ae(), this._dollyDirection = new O(), this._mouse = new ae(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = na.bind(this), this._onPointerDown = sa.bind(this), this._onPointerUp = ra.bind(this), this._onContextMenu = ua.bind(this), this._onMouseWheel = la.bind(this), this._onKeyDown = ca.bind(this), this._onTouchStart = ha.bind(this), this._onTouchMove = da.bind(this), this._onMouseDown = aa.bind(this), this._onMouseMove = oa.bind(this), this._interceptControlDown = pa.bind(this), this._interceptControlUp = ma.bind(this), this.domElement !== null && this.connect(), this.update();
3450
3465
  }
3451
3466
  connect() {
3452
3467
  this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
@@ -3476,7 +3491,7 @@ class Jr extends Ws {
3476
3491
  this.target0.copy(this.target), this.position0.copy(this.object.position), this.zoom0 = this.object.zoom;
3477
3492
  }
3478
3493
  reset() {
3479
- this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(ls), this.update(), this.state = H.NONE;
3494
+ this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(cs), this.update(), this.state = H.NONE;
3480
3495
  }
3481
3496
  update(e = null) {
3482
3497
  const t = this.object.position;
@@ -3495,23 +3510,23 @@ class Jr extends Ws {
3495
3510
  if (this.object.isPerspectiveCamera) {
3496
3511
  const o = ie.length();
3497
3512
  r = this._clampDistance(o * this._scale);
3498
- const h = o - r;
3499
- this.object.position.addScaledVector(this._dollyDirection, h), this.object.updateMatrixWorld(), a = !!h;
3513
+ const c = o - r;
3514
+ this.object.position.addScaledVector(this._dollyDirection, c), this.object.updateMatrixWorld(), a = !!c;
3500
3515
  } else if (this.object.isOrthographicCamera) {
3501
3516
  const o = new O(this._mouse.x, this._mouse.y, 0);
3502
3517
  o.unproject(this.object);
3503
- const h = this.object.zoom;
3504
- this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(), a = h !== this.object.zoom;
3505
- const c = new O(this._mouse.x, this._mouse.y, 0);
3506
- c.unproject(this.object), this.object.position.sub(c).add(o), this.object.updateMatrixWorld(), r = ie.length();
3518
+ const c = this.object.zoom;
3519
+ this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(), a = c !== this.object.zoom;
3520
+ const h = new O(this._mouse.x, this._mouse.y, 0);
3521
+ h.unproject(this.object), this.object.position.sub(h).add(o), this.object.updateMatrixWorld(), r = ie.length();
3507
3522
  } else
3508
3523
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
3509
- r !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(r).add(this.object.position) : (Ut.origin.copy(this.object.position), Ut.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Ut.direction)) < Kr ? this.object.lookAt(this.target) : (cs.setFromNormalAndCoplanarPoint(this.object.up, this.target), Ut.intersectPlane(cs, this.target))));
3524
+ r !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(r).add(this.object.position) : (Ut.origin.copy(this.object.position), Ut.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Ut.direction)) < ta ? this.object.lookAt(this.target) : (hs.setFromNormalAndCoplanarPoint(this.object.up, this.target), Ut.intersectPlane(hs, this.target))));
3510
3525
  } else if (this.object.isOrthographicCamera) {
3511
3526
  const r = this.object.zoom;
3512
3527
  this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), r !== this.object.zoom && (this.object.updateProjectionMatrix(), a = !0);
3513
3528
  }
3514
- return this._scale = 1, this._performCursorZoom = !1, a || this._lastPosition.distanceToSquared(this.object.position) > ui || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > ui || this._lastTargetPosition.distanceToSquared(this.target) > ui ? (this.dispatchEvent(ls), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
3529
+ return this._scale = 1, this._performCursorZoom = !1, a || this._lastPosition.distanceToSquared(this.object.position) > ui || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > ui || this._lastTargetPosition.distanceToSquared(this.target) > ui ? (this.dispatchEvent(cs), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
3515
3530
  }
3516
3531
  _getAutoRotationAngle(e) {
3517
3532
  return e !== null ? he / 60 * this.autoRotateSpeed * e : he / 60 / 60 * this.autoRotateSpeed;
@@ -3705,13 +3720,13 @@ class Jr extends Ws {
3705
3720
  return e.ctrlKey && !this._controlActive && (i.deltaY *= 10), i;
3706
3721
  }
3707
3722
  }
3708
- function ea(s) {
3723
+ function sa(s) {
3709
3724
  this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(s.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.domElement.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(s) && (this._addPointer(s), s.pointerType === "touch" ? this._onTouchStart(s) : this._onMouseDown(s)));
3710
3725
  }
3711
- function ta(s) {
3726
+ function na(s) {
3712
3727
  this.enabled !== !1 && (s.pointerType === "touch" ? this._onTouchMove(s) : this._onMouseMove(s));
3713
3728
  }
3714
- function ia(s) {
3729
+ function ra(s) {
3715
3730
  switch (this._removePointer(s), this._pointers.length) {
3716
3731
  case 0:
3717
3732
  this.domElement.releasePointerCapture(s.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(an), this.state = H.NONE;
@@ -3722,7 +3737,7 @@ function ia(s) {
3722
3737
  break;
3723
3738
  }
3724
3739
  }
3725
- function sa(s) {
3740
+ function aa(s) {
3726
3741
  let e;
3727
3742
  switch (s.button) {
3728
3743
  case 0:
@@ -3738,12 +3753,12 @@ function sa(s) {
3738
3753
  e = -1;
3739
3754
  }
3740
3755
  switch (e) {
3741
- case rt.DOLLY:
3756
+ case at.DOLLY:
3742
3757
  if (this.enableZoom === !1)
3743
3758
  return;
3744
3759
  this._handleMouseDownDolly(s), this.state = H.DOLLY;
3745
3760
  break;
3746
- case rt.ROTATE:
3761
+ case at.ROTATE:
3747
3762
  if (s.ctrlKey || s.metaKey || s.shiftKey) {
3748
3763
  if (this.enablePan === !1)
3749
3764
  return;
@@ -3754,7 +3769,7 @@ function sa(s) {
3754
3769
  this._handleMouseDownRotate(s), this.state = H.ROTATE;
3755
3770
  }
3756
3771
  break;
3757
- case rt.PAN:
3772
+ case at.PAN:
3758
3773
  if (s.ctrlKey || s.metaKey || s.shiftKey) {
3759
3774
  if (this.enableRotate === !1)
3760
3775
  return;
@@ -3768,9 +3783,9 @@ function sa(s) {
3768
3783
  default:
3769
3784
  this.state = H.NONE;
3770
3785
  }
3771
- this.state !== H.NONE && this.dispatchEvent(Ii);
3786
+ this.state !== H.NONE && this.dispatchEvent(Li);
3772
3787
  }
3773
- function na(s) {
3788
+ function oa(s) {
3774
3789
  switch (this.state) {
3775
3790
  case H.ROTATE:
3776
3791
  if (this.enableRotate === !1)
@@ -3789,22 +3804,22 @@ function na(s) {
3789
3804
  break;
3790
3805
  }
3791
3806
  }
3792
- function ra(s) {
3793
- this.enabled === !1 || this.enableZoom === !1 || this.state !== H.NONE || (s.preventDefault(), this.dispatchEvent(Ii), this._handleMouseWheel(this._customWheelEvent(s)), this.dispatchEvent(an));
3807
+ function la(s) {
3808
+ this.enabled === !1 || this.enableZoom === !1 || this.state !== H.NONE || (s.preventDefault(), this.dispatchEvent(Li), this._handleMouseWheel(this._customWheelEvent(s)), this.dispatchEvent(an));
3794
3809
  }
3795
- function aa(s) {
3810
+ function ca(s) {
3796
3811
  this.enabled === !1 || this.enablePan === !1 || this._handleKeyDown(s);
3797
3812
  }
3798
- function oa(s) {
3813
+ function ha(s) {
3799
3814
  switch (this._trackPointer(s), this._pointers.length) {
3800
3815
  case 1:
3801
3816
  switch (this.touches.ONE) {
3802
- case nt.ROTATE:
3817
+ case rt.ROTATE:
3803
3818
  if (this.enableRotate === !1)
3804
3819
  return;
3805
3820
  this._handleTouchStartRotate(s), this.state = H.TOUCH_ROTATE;
3806
3821
  break;
3807
- case nt.PAN:
3822
+ case rt.PAN:
3808
3823
  if (this.enablePan === !1)
3809
3824
  return;
3810
3825
  this._handleTouchStartPan(s), this.state = H.TOUCH_PAN;
@@ -3815,12 +3830,12 @@ function oa(s) {
3815
3830
  break;
3816
3831
  case 2:
3817
3832
  switch (this.touches.TWO) {
3818
- case nt.DOLLY_PAN:
3833
+ case rt.DOLLY_PAN:
3819
3834
  if (this.enableZoom === !1 && this.enablePan === !1)
3820
3835
  return;
3821
3836
  this._handleTouchStartDollyPan(s), this.state = H.TOUCH_DOLLY_PAN;
3822
3837
  break;
3823
- case nt.DOLLY_ROTATE:
3838
+ case rt.DOLLY_ROTATE:
3824
3839
  if (this.enableZoom === !1 && this.enableRotate === !1)
3825
3840
  return;
3826
3841
  this._handleTouchStartDollyRotate(s), this.state = H.TOUCH_DOLLY_ROTATE;
@@ -3832,9 +3847,9 @@ function oa(s) {
3832
3847
  default:
3833
3848
  this.state = H.NONE;
3834
3849
  }
3835
- this.state !== H.NONE && this.dispatchEvent(Ii);
3850
+ this.state !== H.NONE && this.dispatchEvent(Li);
3836
3851
  }
3837
- function la(s) {
3852
+ function da(s) {
3838
3853
  switch (this._trackPointer(s), this.state) {
3839
3854
  case H.TOUCH_ROTATE:
3840
3855
  if (this.enableRotate === !1)
@@ -3860,25 +3875,15 @@ function la(s) {
3860
3875
  this.state = H.NONE;
3861
3876
  }
3862
3877
  }
3863
- function ca(s) {
3878
+ function ua(s) {
3864
3879
  this.enabled !== !1 && s.preventDefault();
3865
3880
  }
3866
- function ha(s) {
3881
+ function pa(s) {
3867
3882
  s.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
3868
3883
  }
3869
- function da(s) {
3884
+ function ma(s) {
3870
3885
  s.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
3871
3886
  }
3872
- const ua = Math.PI / 180;
3873
- function qe(s, e, t, i, n) {
3874
- return i + (s - e) * (n - i) / (t - e);
3875
- }
3876
- function Ke(s, e, t) {
3877
- return (1 - t) * s + t * e;
3878
- }
3879
- function hs(s) {
3880
- return s * ua;
3881
- }
3882
3887
  /*!
3883
3888
  * camera-controls
3884
3889
  * https://github.com/yomotsu/camera-controls
@@ -3889,7 +3894,7 @@ const V = {
3889
3894
  LEFT: 1,
3890
3895
  RIGHT: 2,
3891
3896
  MIDDLE: 4
3892
- }, p = Object.freeze({
3897
+ }, m = Object.freeze({
3893
3898
  NONE: 0,
3894
3899
  ROTATE: 1,
3895
3900
  TRUCK: 2,
@@ -3907,61 +3912,61 @@ const V = {
3907
3912
  TOUCH_ZOOM_TRUCK: 8192,
3908
3913
  TOUCH_ZOOM_OFFSET: 16384,
3909
3914
  TOUCH_ZOOM_ROTATE: 32768
3910
- }), Je = {
3915
+ }), et = {
3911
3916
  NONE: 0,
3912
3917
  IN: 1,
3913
3918
  OUT: -1
3914
3919
  };
3915
- function je(s) {
3920
+ function Ne(s) {
3916
3921
  return s.isPerspectiveCamera;
3917
3922
  }
3918
- function Re(s) {
3923
+ function Ae(s) {
3919
3924
  return s.isOrthographicCamera;
3920
3925
  }
3921
- const et = Math.PI * 2, ds = Math.PI / 2, on = 1e-5, ft = Math.PI / 180;
3926
+ const tt = Math.PI * 2, ds = Math.PI / 2, on = 1e-5, _t = Math.PI / 180;
3922
3927
  function ye(s, e, t) {
3923
3928
  return Math.max(e, Math.min(t, s));
3924
3929
  }
3925
3930
  function Z(s, e = on) {
3926
3931
  return Math.abs(s) < e;
3927
3932
  }
3928
- function z(s, e, t = on) {
3933
+ function F(s, e, t = on) {
3929
3934
  return Z(s - e, t);
3930
3935
  }
3931
3936
  function us(s, e) {
3932
3937
  return Math.round(s / e) * e;
3933
3938
  }
3934
- function _t(s) {
3939
+ function gt(s) {
3935
3940
  return isFinite(s) ? s : s < 0 ? -Number.MAX_VALUE : Number.MAX_VALUE;
3936
3941
  }
3937
- function gt(s) {
3942
+ function vt(s) {
3938
3943
  return Math.abs(s) < Number.MAX_VALUE ? s : s * (1 / 0);
3939
3944
  }
3940
3945
  function jt(s, e, t, i, n = 1 / 0, a) {
3941
3946
  i = Math.max(1e-4, i);
3942
- const r = 2 / i, o = r * a, h = 1 / (1 + o + 0.48 * o * o + 0.235 * o * o * o);
3943
- let c = s - e;
3944
- const u = e, m = n * i;
3945
- c = ye(c, -m, m), e = s - c;
3946
- const _ = (t.value + r * c) * a;
3947
- t.value = (t.value - r * _) * h;
3948
- let g = e + (c + _) * h;
3947
+ const r = 2 / i, o = r * a, c = 1 / (1 + o + 0.48 * o * o + 0.235 * o * o * o);
3948
+ let h = s - e;
3949
+ const u = e, p = n * i;
3950
+ h = ye(h, -p, p), e = s - h;
3951
+ const _ = (t.value + r * h) * a;
3952
+ t.value = (t.value - r * _) * c;
3953
+ let g = e + (h + _) * c;
3949
3954
  return u - s > 0 == g > u && (g = u, t.value = (g - u) / a), g;
3950
3955
  }
3951
3956
  function ps(s, e, t, i, n = 1 / 0, a, r) {
3952
3957
  i = Math.max(1e-4, i);
3953
- const o = 2 / i, h = o * a, c = 1 / (1 + h + 0.48 * h * h + 0.235 * h * h * h);
3954
- let u = e.x, m = e.y, _ = e.z, g = s.x - u, S = s.y - m, M = s.z - _;
3955
- const T = u, f = m, v = _, E = n * i, b = E * E, P = g * g + S * S + M * M;
3958
+ const o = 2 / i, c = o * a, h = 1 / (1 + c + 0.48 * c * c + 0.235 * c * c * c);
3959
+ let u = e.x, p = e.y, _ = e.z, g = s.x - u, S = s.y - p, M = s.z - _;
3960
+ const T = u, f = p, v = _, E = n * i, b = E * E, P = g * g + S * S + M * M;
3956
3961
  if (P > b) {
3957
3962
  const $ = Math.sqrt(P);
3958
3963
  g = g / $ * E, S = S / $ * E, M = M / $ * E;
3959
3964
  }
3960
- u = s.x - g, m = s.y - S, _ = s.z - M;
3965
+ u = s.x - g, p = s.y - S, _ = s.z - M;
3961
3966
  const x = (t.x + o * g) * a, j = (t.y + o * S) * a, X = (t.z + o * M) * a;
3962
- t.x = (t.x - o * x) * c, t.y = (t.y - o * j) * c, t.z = (t.z - o * X) * c, r.x = u + (g + x) * c, r.y = m + (S + j) * c, r.z = _ + (M + X) * c;
3963
- const _e = T - s.x, Pe = f - s.y, ct = v - s.z, Ve = r.x - T, me = r.y - f, te = r.z - v;
3964
- return _e * Ve + Pe * me + ct * te > 0 && (r.x = T, r.y = f, r.z = v, t.x = (r.x - T) / a, t.y = (r.y - f) / a, t.z = (r.z - v) / a), r;
3967
+ t.x = (t.x - o * x) * h, t.y = (t.y - o * j) * h, t.z = (t.z - o * X) * h, r.x = u + (g + x) * h, r.y = p + (S + j) * h, r.z = _ + (M + X) * h;
3968
+ const _e = T - s.x, De = f - s.y, ht = v - s.z, Xe = r.x - T, me = r.y - f, te = r.z - v;
3969
+ return _e * Xe + De * me + ht * te > 0 && (r.x = T, r.y = f, r.z = v, t.x = (r.x - T) / a, t.y = (r.y - f) / a, t.z = (r.z - v) / a), r;
3965
3970
  }
3966
3971
  function pi(s, e) {
3967
3972
  e.set(0, 0), s.forEach((t) => {
@@ -3969,9 +3974,9 @@ function pi(s, e) {
3969
3974
  }), e.x /= s.length, e.y /= s.length;
3970
3975
  }
3971
3976
  function mi(s, e) {
3972
- return Re(s) ? (console.warn(`${e} is not supported in OrthographicCamera`), !0) : !1;
3977
+ return Ae(s) ? (console.warn(`${e} is not supported in OrthographicCamera`), !0) : !1;
3973
3978
  }
3974
- class pa {
3979
+ class fa {
3975
3980
  constructor() {
3976
3981
  this._listeners = {};
3977
3982
  }
@@ -4036,9 +4041,9 @@ class pa {
4036
4041
  }
4037
4042
  }
4038
4043
  var fi;
4039
- const ma = "2.9.0", Nt = 1 / 8, fa = /Mac/.test((fi = globalThis?.navigator) === null || fi === void 0 ? void 0 : fi.platform);
4040
- let A, ms, Ft, _i, de, L, N, tt, vt, Ee, Ce, Ne, fs, _s, ve, yt, it, gs, gi, vs, vi, yi, zt;
4041
- class xe extends pa {
4044
+ const _a = "2.9.0", Nt = 1 / 8, ga = /Mac/.test((fi = globalThis?.navigator) === null || fi === void 0 ? void 0 : fi.platform);
4045
+ let A, ms, zt, _i, de, L, N, it, yt, Ce, we, ze, fs, _s, ve, bt, st, gs, gi, vs, vi, yi, Ft;
4046
+ class Oe extends fa {
4042
4047
  /**
4043
4048
  * Injects THREE as the dependency. You can then proceed to use CameraControls.
4044
4049
  *
@@ -4080,14 +4085,14 @@ class xe extends pa {
4080
4085
  * @category Statics
4081
4086
  */
4082
4087
  static install(e) {
4083
- A = e.THREE, ms = Object.freeze(new A.Vector3(0, 0, 0)), Ft = Object.freeze(new A.Vector3(0, 1, 0)), _i = Object.freeze(new A.Vector3(0, 0, 1)), de = new A.Vector2(), L = new A.Vector3(), N = new A.Vector3(), tt = new A.Vector3(), vt = new A.Vector3(), Ee = new A.Vector3(), Ce = new A.Vector3(), Ne = new A.Vector3(), fs = new A.Vector3(), _s = new A.Vector3(), ve = new A.Spherical(), yt = new A.Spherical(), it = new A.Box3(), gs = new A.Box3(), gi = new A.Sphere(), vs = new A.Quaternion(), vi = new A.Quaternion(), yi = new A.Matrix4(), zt = new A.Raycaster();
4088
+ A = e.THREE, ms = Object.freeze(new A.Vector3(0, 0, 0)), zt = Object.freeze(new A.Vector3(0, 1, 0)), _i = Object.freeze(new A.Vector3(0, 0, 1)), de = new A.Vector2(), L = new A.Vector3(), N = new A.Vector3(), it = new A.Vector3(), yt = new A.Vector3(), Ce = new A.Vector3(), we = new A.Vector3(), ze = new A.Vector3(), fs = new A.Vector3(), _s = new A.Vector3(), ve = new A.Spherical(), bt = new A.Spherical(), st = new A.Box3(), gs = new A.Box3(), gi = new A.Sphere(), vs = new A.Quaternion(), vi = new A.Quaternion(), yi = new A.Matrix4(), Ft = new A.Raycaster();
4084
4089
  }
4085
4090
  /**
4086
4091
  * list all ACTIONs
4087
4092
  * @category Statics
4088
4093
  */
4089
4094
  static get ACTION() {
4090
- return p;
4095
+ return m;
4091
4096
  }
4092
4097
  /**
4093
4098
  * Creates a `CameraControls` instance.
@@ -4108,19 +4113,19 @@ class xe extends pa {
4108
4113
  */
4109
4114
  constructor(e, t) {
4110
4115
  super(), this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.minDistance = Number.EPSILON, this.maxDistance = 1 / 0, this.infinityDolly = !1, this.minZoom = 0.01, this.maxZoom = 1 / 0, this.smoothTime = 0.25, this.draggingSmoothTime = 0.125, this.maxSpeed = 1 / 0, this.azimuthRotateSpeed = 1, this.polarRotateSpeed = 1, this.dollySpeed = 1, this.dollyDragInverted = !1, this.truckSpeed = 2, this.dollyToCursor = !1, this.dragToOffset = !1, this.verticalDragToForward = !1, this.boundaryFriction = 0, this.restThreshold = 0.01, this.colliderMeshes = [], this.cancel = () => {
4111
- }, this._enabled = !0, this._state = p.NONE, this._viewport = null, this._changedDolly = 0, this._changedZoom = 0, this._hasRested = !0, this._boundaryEnclosesCamera = !1, this._needsUpdate = !0, this._updatedLastTime = !1, this._elementRect = new DOMRect(), this._isDragging = !1, this._dragNeedsUpdate = !0, this._activePointers = [], this._lockedPointer = null, this._interactiveArea = new DOMRect(0, 0, 1, 1), this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._isUserControllingOffset = !1, this._isUserControllingZoom = !1, this._lastDollyDirection = Je.NONE, this._thetaVelocity = { value: 0 }, this._phiVelocity = { value: 0 }, this._radiusVelocity = { value: 0 }, this._targetVelocity = new A.Vector3(), this._focalOffsetVelocity = new A.Vector3(), this._zoomVelocity = { value: 0 }, this._truckInternal = (f, v, E) => {
4116
+ }, this._enabled = !0, this._state = m.NONE, this._viewport = null, this._changedDolly = 0, this._changedZoom = 0, this._hasRested = !0, this._boundaryEnclosesCamera = !1, this._needsUpdate = !0, this._updatedLastTime = !1, this._elementRect = new DOMRect(), this._isDragging = !1, this._dragNeedsUpdate = !0, this._activePointers = [], this._lockedPointer = null, this._interactiveArea = new DOMRect(0, 0, 1, 1), this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._isUserControllingOffset = !1, this._isUserControllingZoom = !1, this._lastDollyDirection = et.NONE, this._thetaVelocity = { value: 0 }, this._phiVelocity = { value: 0 }, this._radiusVelocity = { value: 0 }, this._targetVelocity = new A.Vector3(), this._focalOffsetVelocity = new A.Vector3(), this._zoomVelocity = { value: 0 }, this._truckInternal = (f, v, E) => {
4112
4117
  let b, P;
4113
- if (je(this._camera)) {
4114
- const x = L.copy(this._camera.position).sub(this._target), j = this._camera.getEffectiveFOV() * ft, X = x.length() * Math.tan(j * 0.5);
4118
+ if (Ne(this._camera)) {
4119
+ const x = L.copy(this._camera.position).sub(this._target), j = this._camera.getEffectiveFOV() * _t, X = x.length() * Math.tan(j * 0.5);
4115
4120
  b = this.truckSpeed * f * X / this._elementRect.height, P = this.truckSpeed * v * X / this._elementRect.height;
4116
- } else if (Re(this._camera)) {
4121
+ } else if (Ae(this._camera)) {
4117
4122
  const x = this._camera;
4118
4123
  b = f * (x.right - x.left) / x.zoom / this._elementRect.width, P = v * (x.top - x.bottom) / x.zoom / this._elementRect.height;
4119
4124
  } else
4120
4125
  return;
4121
4126
  this.verticalDragToForward ? (E ? this.setFocalOffset(this._focalOffsetEnd.x + b, this._focalOffsetEnd.y, this._focalOffsetEnd.z, !0) : this.truck(b, 0, !0), this.forward(-P, !0)) : E ? this.setFocalOffset(this._focalOffsetEnd.x + b, this._focalOffsetEnd.y + P, this._focalOffsetEnd.z, !0) : this.truck(b, P, !0);
4122
4127
  }, this._rotateInternal = (f, v) => {
4123
- const E = et * this.azimuthRotateSpeed * f / this._elementRect.height, b = et * this.polarRotateSpeed * v / this._elementRect.height;
4128
+ const E = tt * this.azimuthRotateSpeed * f / this._elementRect.height, b = tt * this.polarRotateSpeed * v / this._elementRect.height;
4124
4129
  this.rotate(E, b, !0);
4125
4130
  }, this._dollyInternal = (f, v, E) => {
4126
4131
  const b = Math.pow(0.95, -f * this.dollySpeed), P = this._sphericalEnd.radius, x = this._sphericalEnd.radius * b, j = ye(x, this.minDistance, this.maxDistance), X = j - x;
@@ -4128,20 +4133,20 @@ class xe extends pa {
4128
4133
  }, this._zoomInternal = (f, v, E) => {
4129
4134
  const b = Math.pow(0.95, f * this.dollySpeed), P = this._zoom, x = this._zoom * b;
4130
4135
  this.zoomTo(x, !0), this.dollyToCursor && (this._changedZoom += x - P, this._dollyControlCoord.set(v, E));
4131
- }, typeof A > "u" && console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."), this._camera = e, this._yAxisUpSpace = new A.Quaternion().setFromUnitVectors(this._camera.up, Ft), this._yAxisUpSpaceInverse = this._yAxisUpSpace.clone().invert(), this._state = p.NONE, this._target = new A.Vector3(), this._targetEnd = this._target.clone(), this._focalOffset = new A.Vector3(), this._focalOffsetEnd = this._focalOffset.clone(), this._spherical = new A.Spherical().setFromVector3(L.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)), this._sphericalEnd = this._spherical.clone(), this._lastDistance = this._spherical.radius, this._zoom = this._camera.zoom, this._zoomEnd = this._zoom, this._lastZoom = this._zoom, this._nearPlaneCorners = [
4136
+ }, typeof A > "u" && console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."), this._camera = e, this._yAxisUpSpace = new A.Quaternion().setFromUnitVectors(this._camera.up, zt), this._yAxisUpSpaceInverse = this._yAxisUpSpace.clone().invert(), this._state = m.NONE, this._target = new A.Vector3(), this._targetEnd = this._target.clone(), this._focalOffset = new A.Vector3(), this._focalOffsetEnd = this._focalOffset.clone(), this._spherical = new A.Spherical().setFromVector3(L.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)), this._sphericalEnd = this._spherical.clone(), this._lastDistance = this._spherical.radius, this._zoom = this._camera.zoom, this._zoomEnd = this._zoom, this._lastZoom = this._zoom, this._nearPlaneCorners = [
4132
4137
  new A.Vector3(),
4133
4138
  new A.Vector3(),
4134
4139
  new A.Vector3(),
4135
4140
  new A.Vector3()
4136
4141
  ], this._updateNearPlaneCorners(), this._boundary = new A.Box3(new A.Vector3(-1 / 0, -1 / 0, -1 / 0), new A.Vector3(1 / 0, 1 / 0, 1 / 0)), this._cameraUp0 = this._camera.up.clone(), this._target0 = this._target.clone(), this._position0 = this._camera.position.clone(), this._zoom0 = this._zoom, this._focalOffset0 = this._focalOffset.clone(), this._dollyControlCoord = new A.Vector2(), this.mouseButtons = {
4137
- left: p.ROTATE,
4138
- middle: p.DOLLY,
4139
- right: p.TRUCK,
4140
- wheel: je(this._camera) ? p.DOLLY : Re(this._camera) ? p.ZOOM : p.NONE
4142
+ left: m.ROTATE,
4143
+ middle: m.DOLLY,
4144
+ right: m.TRUCK,
4145
+ wheel: Ne(this._camera) ? m.DOLLY : Ae(this._camera) ? m.ZOOM : m.NONE
4141
4146
  }, this.touches = {
4142
- one: p.TOUCH_ROTATE,
4143
- two: je(this._camera) ? p.TOUCH_DOLLY_TRUCK : Re(this._camera) ? p.TOUCH_ZOOM_TRUCK : p.NONE,
4144
- three: p.TOUCH_TRUCK
4147
+ one: m.TOUCH_ROTATE,
4148
+ two: Ne(this._camera) ? m.TOUCH_DOLLY_TRUCK : Ae(this._camera) ? m.TOUCH_ZOOM_TRUCK : m.NONE,
4149
+ three: m.TOUCH_TRUCK
4145
4150
  };
4146
4151
  const i = new A.Vector2(), n = new A.Vector2(), a = new A.Vector2(), r = (f) => {
4147
4152
  if (!this._enabled || !this._domElement)
@@ -4166,7 +4171,7 @@ class xe extends pa {
4166
4171
  deltaY: 0,
4167
4172
  mouseButton: v
4168
4173
  };
4169
- this._activePointers.push(E), this._domElement.ownerDocument.removeEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("pointerup", h), this._domElement.ownerDocument.addEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.addEventListener("pointerup", h), this._isDragging = !0, _(f);
4174
+ this._activePointers.push(E), this._domElement.ownerDocument.removeEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("pointerup", c), this._domElement.ownerDocument.addEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.addEventListener("pointerup", c), this._isDragging = !0, _(f);
4170
4175
  }, o = (f) => {
4171
4176
  f.cancelable && f.preventDefault();
4172
4177
  const v = f.pointerId, E = this._lockedPointer || this._findPointerById(v);
@@ -4187,13 +4192,13 @@ class xe extends pa {
4187
4192
  (!this._isDragging && this._lockedPointer || this._isDragging && (f.buttons & V.LEFT) === V.LEFT) && (this._state = this._state | this.mouseButtons.left), this._isDragging && (f.buttons & V.MIDDLE) === V.MIDDLE && (this._state = this._state | this.mouseButtons.middle), this._isDragging && (f.buttons & V.RIGHT) === V.RIGHT && (this._state = this._state | this.mouseButtons.right);
4188
4193
  g();
4189
4194
  }
4190
- }, h = (f) => {
4195
+ }, c = (f) => {
4191
4196
  const v = this._findPointerById(f.pointerId);
4192
4197
  if (!(v && v === this._lockedPointer)) {
4193
4198
  if (v && this._disposePointer(v), f.pointerType === "touch")
4194
4199
  switch (this._activePointers.length) {
4195
4200
  case 0:
4196
- this._state = p.NONE;
4201
+ this._state = m.NONE;
4197
4202
  break;
4198
4203
  case 1:
4199
4204
  this._state = this.touches.one;
@@ -4206,52 +4211,52 @@ class xe extends pa {
4206
4211
  break;
4207
4212
  }
4208
4213
  else
4209
- this._state = p.NONE;
4214
+ this._state = m.NONE;
4210
4215
  S();
4211
4216
  }
4212
4217
  };
4213
- let c = -1;
4218
+ let h = -1;
4214
4219
  const u = (f) => {
4215
- if (!this._domElement || !this._enabled || this.mouseButtons.wheel === p.NONE)
4220
+ if (!this._domElement || !this._enabled || this.mouseButtons.wheel === m.NONE)
4216
4221
  return;
4217
4222
  if (this._interactiveArea.left !== 0 || this._interactiveArea.top !== 0 || this._interactiveArea.width !== 1 || this._interactiveArea.height !== 1) {
4218
4223
  const x = this._domElement.getBoundingClientRect(), j = f.clientX / x.width, X = f.clientY / x.height;
4219
4224
  if (j < this._interactiveArea.left || j > this._interactiveArea.right || X < this._interactiveArea.top || X > this._interactiveArea.bottom)
4220
4225
  return;
4221
4226
  }
4222
- if (f.preventDefault(), this.dollyToCursor || this.mouseButtons.wheel === p.ROTATE || this.mouseButtons.wheel === p.TRUCK) {
4227
+ if (f.preventDefault(), this.dollyToCursor || this.mouseButtons.wheel === m.ROTATE || this.mouseButtons.wheel === m.TRUCK) {
4223
4228
  const x = performance.now();
4224
- c - x < 1e3 && this._getClientRect(this._elementRect), c = x;
4229
+ h - x < 1e3 && this._getClientRect(this._elementRect), h = x;
4225
4230
  }
4226
- const v = fa ? -1 : -3, E = f.deltaMode === 1 ? f.deltaY / v : f.deltaY / (v * 10), b = this.dollyToCursor ? (f.clientX - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, P = this.dollyToCursor ? (f.clientY - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
4231
+ const v = ga ? -1 : -3, E = f.deltaMode === 1 ? f.deltaY / v : f.deltaY / (v * 10), b = this.dollyToCursor ? (f.clientX - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, P = this.dollyToCursor ? (f.clientY - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
4227
4232
  switch (this.mouseButtons.wheel) {
4228
- case p.ROTATE: {
4233
+ case m.ROTATE: {
4229
4234
  this._rotateInternal(f.deltaX, f.deltaY), this._isUserControllingRotate = !0;
4230
4235
  break;
4231
4236
  }
4232
- case p.TRUCK: {
4237
+ case m.TRUCK: {
4233
4238
  this._truckInternal(f.deltaX, f.deltaY, !1), this._isUserControllingTruck = !0;
4234
4239
  break;
4235
4240
  }
4236
- case p.OFFSET: {
4241
+ case m.OFFSET: {
4237
4242
  this._truckInternal(f.deltaX, f.deltaY, !0), this._isUserControllingOffset = !0;
4238
4243
  break;
4239
4244
  }
4240
- case p.DOLLY: {
4245
+ case m.DOLLY: {
4241
4246
  this._dollyInternal(-E, b, P), this._isUserControllingDolly = !0;
4242
4247
  break;
4243
4248
  }
4244
- case p.ZOOM: {
4249
+ case m.ZOOM: {
4245
4250
  this._zoomInternal(-E, b, P), this._isUserControllingZoom = !0;
4246
4251
  break;
4247
4252
  }
4248
4253
  }
4249
4254
  this.dispatchEvent({ type: "control" });
4250
- }, m = (f) => {
4255
+ }, p = (f) => {
4251
4256
  if (!(!this._domElement || !this._enabled)) {
4252
- if (this.mouseButtons.right === xe.ACTION.NONE) {
4257
+ if (this.mouseButtons.right === Oe.ACTION.NONE) {
4253
4258
  const v = f instanceof PointerEvent ? f.pointerId : 0, E = this._findPointerById(v);
4254
- E && this._disposePointer(E), this._domElement.ownerDocument.removeEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("pointerup", h);
4259
+ E && this._disposePointer(E), this._domElement.ownerDocument.removeEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("pointerup", c);
4255
4260
  return;
4256
4261
  }
4257
4262
  f.preventDefault();
@@ -4281,25 +4286,25 @@ class xe extends pa {
4281
4286
  }
4282
4287
  else
4283
4288
  !this._lockedPointer && (f.buttons & V.LEFT) === V.LEFT && (this._state = this._state | this.mouseButtons.left), (f.buttons & V.MIDDLE) === V.MIDDLE && (this._state = this._state | this.mouseButtons.middle), (f.buttons & V.RIGHT) === V.RIGHT && (this._state = this._state | this.mouseButtons.right);
4284
- ((this._state & p.ROTATE) === p.ROTATE || (this._state & p.TOUCH_ROTATE) === p.TOUCH_ROTATE || (this._state & p.TOUCH_DOLLY_ROTATE) === p.TOUCH_DOLLY_ROTATE || (this._state & p.TOUCH_ZOOM_ROTATE) === p.TOUCH_ZOOM_ROTATE) && (this._sphericalEnd.theta = this._spherical.theta, this._sphericalEnd.phi = this._spherical.phi, this._thetaVelocity.value = 0, this._phiVelocity.value = 0), ((this._state & p.TRUCK) === p.TRUCK || (this._state & p.TOUCH_TRUCK) === p.TOUCH_TRUCK || (this._state & p.TOUCH_DOLLY_TRUCK) === p.TOUCH_DOLLY_TRUCK || (this._state & p.TOUCH_ZOOM_TRUCK) === p.TOUCH_ZOOM_TRUCK) && (this._targetEnd.copy(this._target), this._targetVelocity.set(0, 0, 0)), ((this._state & p.DOLLY) === p.DOLLY || (this._state & p.TOUCH_DOLLY) === p.TOUCH_DOLLY || (this._state & p.TOUCH_DOLLY_TRUCK) === p.TOUCH_DOLLY_TRUCK || (this._state & p.TOUCH_DOLLY_OFFSET) === p.TOUCH_DOLLY_OFFSET || (this._state & p.TOUCH_DOLLY_ROTATE) === p.TOUCH_DOLLY_ROTATE) && (this._sphericalEnd.radius = this._spherical.radius, this._radiusVelocity.value = 0), ((this._state & p.ZOOM) === p.ZOOM || (this._state & p.TOUCH_ZOOM) === p.TOUCH_ZOOM || (this._state & p.TOUCH_ZOOM_TRUCK) === p.TOUCH_ZOOM_TRUCK || (this._state & p.TOUCH_ZOOM_OFFSET) === p.TOUCH_ZOOM_OFFSET || (this._state & p.TOUCH_ZOOM_ROTATE) === p.TOUCH_ZOOM_ROTATE) && (this._zoomEnd = this._zoom, this._zoomVelocity.value = 0), ((this._state & p.OFFSET) === p.OFFSET || (this._state & p.TOUCH_OFFSET) === p.TOUCH_OFFSET || (this._state & p.TOUCH_DOLLY_OFFSET) === p.TOUCH_DOLLY_OFFSET || (this._state & p.TOUCH_ZOOM_OFFSET) === p.TOUCH_ZOOM_OFFSET) && (this._focalOffsetEnd.copy(this._focalOffset), this._focalOffsetVelocity.set(0, 0, 0)), this.dispatchEvent({ type: "controlstart" });
4289
+ ((this._state & m.ROTATE) === m.ROTATE || (this._state & m.TOUCH_ROTATE) === m.TOUCH_ROTATE || (this._state & m.TOUCH_DOLLY_ROTATE) === m.TOUCH_DOLLY_ROTATE || (this._state & m.TOUCH_ZOOM_ROTATE) === m.TOUCH_ZOOM_ROTATE) && (this._sphericalEnd.theta = this._spherical.theta, this._sphericalEnd.phi = this._spherical.phi, this._thetaVelocity.value = 0, this._phiVelocity.value = 0), ((this._state & m.TRUCK) === m.TRUCK || (this._state & m.TOUCH_TRUCK) === m.TOUCH_TRUCK || (this._state & m.TOUCH_DOLLY_TRUCK) === m.TOUCH_DOLLY_TRUCK || (this._state & m.TOUCH_ZOOM_TRUCK) === m.TOUCH_ZOOM_TRUCK) && (this._targetEnd.copy(this._target), this._targetVelocity.set(0, 0, 0)), ((this._state & m.DOLLY) === m.DOLLY || (this._state & m.TOUCH_DOLLY) === m.TOUCH_DOLLY || (this._state & m.TOUCH_DOLLY_TRUCK) === m.TOUCH_DOLLY_TRUCK || (this._state & m.TOUCH_DOLLY_OFFSET) === m.TOUCH_DOLLY_OFFSET || (this._state & m.TOUCH_DOLLY_ROTATE) === m.TOUCH_DOLLY_ROTATE) && (this._sphericalEnd.radius = this._spherical.radius, this._radiusVelocity.value = 0), ((this._state & m.ZOOM) === m.ZOOM || (this._state & m.TOUCH_ZOOM) === m.TOUCH_ZOOM || (this._state & m.TOUCH_ZOOM_TRUCK) === m.TOUCH_ZOOM_TRUCK || (this._state & m.TOUCH_ZOOM_OFFSET) === m.TOUCH_ZOOM_OFFSET || (this._state & m.TOUCH_ZOOM_ROTATE) === m.TOUCH_ZOOM_ROTATE) && (this._zoomEnd = this._zoom, this._zoomVelocity.value = 0), ((this._state & m.OFFSET) === m.OFFSET || (this._state & m.TOUCH_OFFSET) === m.TOUCH_OFFSET || (this._state & m.TOUCH_DOLLY_OFFSET) === m.TOUCH_DOLLY_OFFSET || (this._state & m.TOUCH_ZOOM_OFFSET) === m.TOUCH_ZOOM_OFFSET) && (this._focalOffsetEnd.copy(this._focalOffset), this._focalOffsetVelocity.set(0, 0, 0)), this.dispatchEvent({ type: "controlstart" });
4285
4290
  }, g = () => {
4286
4291
  if (!this._enabled || !this._dragNeedsUpdate)
4287
4292
  return;
4288
4293
  this._dragNeedsUpdate = !1, pi(this._activePointers, de);
4289
4294
  const v = this._domElement && this._domElement.ownerDocument.pointerLockElement === this._domElement ? this._lockedPointer || this._activePointers[0] : null, E = v ? -v.deltaX : n.x - de.x, b = v ? -v.deltaY : n.y - de.y;
4290
- if (n.copy(de), ((this._state & p.ROTATE) === p.ROTATE || (this._state & p.TOUCH_ROTATE) === p.TOUCH_ROTATE || (this._state & p.TOUCH_DOLLY_ROTATE) === p.TOUCH_DOLLY_ROTATE || (this._state & p.TOUCH_ZOOM_ROTATE) === p.TOUCH_ZOOM_ROTATE) && (this._rotateInternal(E, b), this._isUserControllingRotate = !0), (this._state & p.DOLLY) === p.DOLLY || (this._state & p.ZOOM) === p.ZOOM) {
4295
+ if (n.copy(de), ((this._state & m.ROTATE) === m.ROTATE || (this._state & m.TOUCH_ROTATE) === m.TOUCH_ROTATE || (this._state & m.TOUCH_DOLLY_ROTATE) === m.TOUCH_DOLLY_ROTATE || (this._state & m.TOUCH_ZOOM_ROTATE) === m.TOUCH_ZOOM_ROTATE) && (this._rotateInternal(E, b), this._isUserControllingRotate = !0), (this._state & m.DOLLY) === m.DOLLY || (this._state & m.ZOOM) === m.ZOOM) {
4291
4296
  const P = this.dollyToCursor ? (i.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, x = this.dollyToCursor ? (i.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0, j = this.dollyDragInverted ? -1 : 1;
4292
- (this._state & p.DOLLY) === p.DOLLY ? (this._dollyInternal(j * b * Nt, P, x), this._isUserControllingDolly = !0) : (this._zoomInternal(j * b * Nt, P, x), this._isUserControllingZoom = !0);
4297
+ (this._state & m.DOLLY) === m.DOLLY ? (this._dollyInternal(j * b * Nt, P, x), this._isUserControllingDolly = !0) : (this._zoomInternal(j * b * Nt, P, x), this._isUserControllingZoom = !0);
4293
4298
  }
4294
- if ((this._state & p.TOUCH_DOLLY) === p.TOUCH_DOLLY || (this._state & p.TOUCH_ZOOM) === p.TOUCH_ZOOM || (this._state & p.TOUCH_DOLLY_TRUCK) === p.TOUCH_DOLLY_TRUCK || (this._state & p.TOUCH_ZOOM_TRUCK) === p.TOUCH_ZOOM_TRUCK || (this._state & p.TOUCH_DOLLY_OFFSET) === p.TOUCH_DOLLY_OFFSET || (this._state & p.TOUCH_ZOOM_OFFSET) === p.TOUCH_ZOOM_OFFSET || (this._state & p.TOUCH_DOLLY_ROTATE) === p.TOUCH_DOLLY_ROTATE || (this._state & p.TOUCH_ZOOM_ROTATE) === p.TOUCH_ZOOM_ROTATE) {
4299
+ if ((this._state & m.TOUCH_DOLLY) === m.TOUCH_DOLLY || (this._state & m.TOUCH_ZOOM) === m.TOUCH_ZOOM || (this._state & m.TOUCH_DOLLY_TRUCK) === m.TOUCH_DOLLY_TRUCK || (this._state & m.TOUCH_ZOOM_TRUCK) === m.TOUCH_ZOOM_TRUCK || (this._state & m.TOUCH_DOLLY_OFFSET) === m.TOUCH_DOLLY_OFFSET || (this._state & m.TOUCH_ZOOM_OFFSET) === m.TOUCH_ZOOM_OFFSET || (this._state & m.TOUCH_DOLLY_ROTATE) === m.TOUCH_DOLLY_ROTATE || (this._state & m.TOUCH_ZOOM_ROTATE) === m.TOUCH_ZOOM_ROTATE) {
4295
4300
  const P = de.x - this._activePointers[1].clientX, x = de.y - this._activePointers[1].clientY, j = Math.sqrt(P * P + x * x), X = a.y - j;
4296
4301
  a.set(0, j);
4297
- const _e = this.dollyToCursor ? (n.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, Pe = this.dollyToCursor ? (n.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
4298
- (this._state & p.TOUCH_DOLLY) === p.TOUCH_DOLLY || (this._state & p.TOUCH_DOLLY_ROTATE) === p.TOUCH_DOLLY_ROTATE || (this._state & p.TOUCH_DOLLY_TRUCK) === p.TOUCH_DOLLY_TRUCK || (this._state & p.TOUCH_DOLLY_OFFSET) === p.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(X * Nt, _e, Pe), this._isUserControllingDolly = !0) : (this._zoomInternal(X * Nt, _e, Pe), this._isUserControllingZoom = !0);
4302
+ const _e = this.dollyToCursor ? (n.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, De = this.dollyToCursor ? (n.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
4303
+ (this._state & m.TOUCH_DOLLY) === m.TOUCH_DOLLY || (this._state & m.TOUCH_DOLLY_ROTATE) === m.TOUCH_DOLLY_ROTATE || (this._state & m.TOUCH_DOLLY_TRUCK) === m.TOUCH_DOLLY_TRUCK || (this._state & m.TOUCH_DOLLY_OFFSET) === m.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(X * Nt, _e, De), this._isUserControllingDolly = !0) : (this._zoomInternal(X * Nt, _e, De), this._isUserControllingZoom = !0);
4299
4304
  }
4300
- ((this._state & p.TRUCK) === p.TRUCK || (this._state & p.TOUCH_TRUCK) === p.TOUCH_TRUCK || (this._state & p.TOUCH_DOLLY_TRUCK) === p.TOUCH_DOLLY_TRUCK || (this._state & p.TOUCH_ZOOM_TRUCK) === p.TOUCH_ZOOM_TRUCK) && (this._truckInternal(E, b, !1), this._isUserControllingTruck = !0), ((this._state & p.OFFSET) === p.OFFSET || (this._state & p.TOUCH_OFFSET) === p.TOUCH_OFFSET || (this._state & p.TOUCH_DOLLY_OFFSET) === p.TOUCH_DOLLY_OFFSET || (this._state & p.TOUCH_ZOOM_OFFSET) === p.TOUCH_ZOOM_OFFSET) && (this._truckInternal(E, b, !0), this._isUserControllingOffset = !0), this.dispatchEvent({ type: "control" });
4305
+ ((this._state & m.TRUCK) === m.TRUCK || (this._state & m.TOUCH_TRUCK) === m.TOUCH_TRUCK || (this._state & m.TOUCH_DOLLY_TRUCK) === m.TOUCH_DOLLY_TRUCK || (this._state & m.TOUCH_ZOOM_TRUCK) === m.TOUCH_ZOOM_TRUCK) && (this._truckInternal(E, b, !1), this._isUserControllingTruck = !0), ((this._state & m.OFFSET) === m.OFFSET || (this._state & m.TOUCH_OFFSET) === m.TOUCH_OFFSET || (this._state & m.TOUCH_DOLLY_OFFSET) === m.TOUCH_DOLLY_OFFSET || (this._state & m.TOUCH_ZOOM_OFFSET) === m.TOUCH_ZOOM_OFFSET) && (this._truckInternal(E, b, !0), this._isUserControllingOffset = !0), this.dispatchEvent({ type: "control" });
4301
4306
  }, S = () => {
4302
- pi(this._activePointers, de), n.copy(de), this._dragNeedsUpdate = !1, (this._activePointers.length === 0 || this._activePointers.length === 1 && this._activePointers[0] === this._lockedPointer) && (this._isDragging = !1), this._activePointers.length === 0 && this._domElement && (this._domElement.ownerDocument.removeEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("pointerup", h), this.dispatchEvent({ type: "controlend" }));
4307
+ pi(this._activePointers, de), n.copy(de), this._dragNeedsUpdate = !1, (this._activePointers.length === 0 || this._activePointers.length === 1 && this._activePointers[0] === this._lockedPointer) && (this._isDragging = !1), this._activePointers.length === 0 && this._domElement && (this._domElement.ownerDocument.removeEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("pointerup", c), this.dispatchEvent({ type: "controlend" }));
4303
4308
  };
4304
4309
  this.lockPointer = () => {
4305
4310
  !this._enabled || !this._domElement || (this.cancel(), this._lockedPointer = {
@@ -4309,7 +4314,7 @@ class xe extends pa {
4309
4314
  deltaX: 0,
4310
4315
  deltaY: 0,
4311
4316
  mouseButton: null
4312
- }, this._activePointers.push(this._lockedPointer), this._domElement.ownerDocument.removeEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("pointerup", h), this._domElement.requestPointerLock(), this._domElement.ownerDocument.addEventListener("pointerlockchange", M), this._domElement.ownerDocument.addEventListener("pointerlockerror", T), this._domElement.ownerDocument.addEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.addEventListener("pointerup", h), _());
4317
+ }, this._activePointers.push(this._lockedPointer), this._domElement.ownerDocument.removeEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("pointerup", c), this._domElement.requestPointerLock(), this._domElement.ownerDocument.addEventListener("pointerlockchange", M), this._domElement.ownerDocument.addEventListener("pointerlockerror", T), this._domElement.ownerDocument.addEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.addEventListener("pointerup", c), _());
4313
4318
  }, this.unlockPointer = () => {
4314
4319
  var f, v, E;
4315
4320
  this._lockedPointer !== null && (this._disposePointer(this._lockedPointer), this._lockedPointer = null), (f = this._domElement) === null || f === void 0 || f.ownerDocument.exitPointerLock(), (v = this._domElement) === null || v === void 0 || v.ownerDocument.removeEventListener("pointerlockchange", M), (E = this._domElement) === null || E === void 0 || E.ownerDocument.removeEventListener("pointerlockerror", T), this.cancel();
@@ -4320,11 +4325,11 @@ class xe extends pa {
4320
4325
  this.unlockPointer();
4321
4326
  };
4322
4327
  this._addAllEventListeners = (f) => {
4323
- this._domElement = f, this._domElement.style.touchAction = "none", this._domElement.style.userSelect = "none", this._domElement.style.webkitUserSelect = "none", this._domElement.addEventListener("pointerdown", r), this._domElement.addEventListener("pointercancel", h), this._domElement.addEventListener("wheel", u, { passive: !1 }), this._domElement.addEventListener("contextmenu", m);
4328
+ this._domElement = f, this._domElement.style.touchAction = "none", this._domElement.style.userSelect = "none", this._domElement.style.webkitUserSelect = "none", this._domElement.addEventListener("pointerdown", r), this._domElement.addEventListener("pointercancel", c), this._domElement.addEventListener("wheel", u, { passive: !1 }), this._domElement.addEventListener("contextmenu", p);
4324
4329
  }, this._removeAllEventListeners = () => {
4325
- this._domElement && (this._domElement.style.touchAction = "", this._domElement.style.userSelect = "", this._domElement.style.webkitUserSelect = "", this._domElement.removeEventListener("pointerdown", r), this._domElement.removeEventListener("pointercancel", h), this._domElement.removeEventListener("wheel", u, { passive: !1 }), this._domElement.removeEventListener("contextmenu", m), this._domElement.ownerDocument.removeEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("pointerup", h), this._domElement.ownerDocument.removeEventListener("pointerlockchange", M), this._domElement.ownerDocument.removeEventListener("pointerlockerror", T));
4330
+ this._domElement && (this._domElement.style.touchAction = "", this._domElement.style.userSelect = "", this._domElement.style.webkitUserSelect = "", this._domElement.removeEventListener("pointerdown", r), this._domElement.removeEventListener("pointercancel", c), this._domElement.removeEventListener("wheel", u, { passive: !1 }), this._domElement.removeEventListener("contextmenu", p), this._domElement.ownerDocument.removeEventListener("pointermove", o, { passive: !1 }), this._domElement.ownerDocument.removeEventListener("pointerup", c), this._domElement.ownerDocument.removeEventListener("pointerlockchange", M), this._domElement.ownerDocument.removeEventListener("pointerlockerror", T));
4326
4331
  }, this.cancel = () => {
4327
- this._state !== p.NONE && (this._state = p.NONE, this._activePointers.length = 0, S());
4332
+ this._state !== m.NONE && (this._state = m.NONE, this._activePointers.length = 0, S());
4328
4333
  }, t && this.connect(t), this.update(0);
4329
4334
  }
4330
4335
  /**
@@ -4538,7 +4543,7 @@ class xe extends pa {
4538
4543
  this._isUserControllingRotate = !1;
4539
4544
  const n = ye(e, this.minAzimuthAngle, this.maxAzimuthAngle), a = ye(t, this.minPolarAngle, this.maxPolarAngle);
4540
4545
  this._sphericalEnd.theta = n, this._sphericalEnd.phi = a, this._sphericalEnd.makeSafe(), this._needsUpdate = !0, i || (this._spherical.theta = this._sphericalEnd.theta, this._spherical.phi = this._sphericalEnd.phi);
4541
- const r = !i || z(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && z(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold);
4546
+ const r = !i || F(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && F(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold);
4542
4547
  return this._createOnRestPromise(r);
4543
4548
  }
4544
4549
  /**
@@ -4557,19 +4562,19 @@ class xe extends pa {
4557
4562
  * @category Methods
4558
4563
  */
4559
4564
  dollyTo(e, t = !1) {
4560
- return this._isUserControllingDolly = !1, this._lastDollyDirection = Je.NONE, this._changedDolly = 0, this._dollyToNoClamp(ye(e, this.minDistance, this.maxDistance), t);
4565
+ return this._isUserControllingDolly = !1, this._lastDollyDirection = et.NONE, this._changedDolly = 0, this._dollyToNoClamp(ye(e, this.minDistance, this.maxDistance), t);
4561
4566
  }
4562
4567
  _dollyToNoClamp(e, t = !1) {
4563
4568
  const i = this._sphericalEnd.radius;
4564
4569
  if (this.colliderMeshes.length >= 1) {
4565
- const r = this._collisionTest(), o = z(r, this._spherical.radius);
4570
+ const r = this._collisionTest(), o = F(r, this._spherical.radius);
4566
4571
  if (!(i > e) && o)
4567
4572
  return Promise.resolve();
4568
4573
  this._sphericalEnd.radius = Math.min(e, r);
4569
4574
  } else
4570
4575
  this._sphericalEnd.radius = e;
4571
4576
  this._needsUpdate = !0, t || (this._spherical.radius = this._sphericalEnd.radius);
4572
- const a = !t || z(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
4577
+ const a = !t || F(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
4573
4578
  return this._createOnRestPromise(a);
4574
4579
  }
4575
4580
  /**
@@ -4580,8 +4585,8 @@ class xe extends pa {
4580
4585
  * @category Methods
4581
4586
  */
4582
4587
  dollyInFixed(e, t = !1) {
4583
- this._targetEnd.add(this._getCameraDirection(vt).multiplyScalar(e)), t || this._target.copy(this._targetEnd);
4584
- const i = !t || z(this._target.x, this._targetEnd.x, this.restThreshold) && z(this._target.y, this._targetEnd.y, this.restThreshold) && z(this._target.z, this._targetEnd.z, this.restThreshold);
4588
+ this._targetEnd.add(this._getCameraDirection(yt).multiplyScalar(e)), t || this._target.copy(this._targetEnd);
4589
+ const i = !t || F(this._target.x, this._targetEnd.x, this.restThreshold) && F(this._target.y, this._targetEnd.y, this.restThreshold) && F(this._target.z, this._targetEnd.z, this.restThreshold);
4585
4590
  return this._createOnRestPromise(i);
4586
4591
  }
4587
4592
  /**
@@ -4603,7 +4608,7 @@ class xe extends pa {
4603
4608
  */
4604
4609
  zoomTo(e, t = !1) {
4605
4610
  this._isUserControllingZoom = !1, this._zoomEnd = ye(e, this.minZoom, this.maxZoom), this._needsUpdate = !0, t || (this._zoom = this._zoomEnd);
4606
- const i = !t || z(this._zoom, this._zoomEnd, this.restThreshold);
4611
+ const i = !t || F(this._zoom, this._zoomEnd, this.restThreshold);
4607
4612
  return this._changedZoom = 0, this._createOnRestPromise(i);
4608
4613
  }
4609
4614
  /**
@@ -4621,8 +4626,8 @@ class xe extends pa {
4621
4626
  * @category Methods
4622
4627
  */
4623
4628
  truck(e, t, i = !1) {
4624
- this._camera.updateMatrix(), Ee.setFromMatrixColumn(this._camera.matrix, 0), Ce.setFromMatrixColumn(this._camera.matrix, 1), Ee.multiplyScalar(e), Ce.multiplyScalar(-t);
4625
- const n = L.copy(Ee).add(Ce), a = N.copy(this._targetEnd).add(n);
4629
+ this._camera.updateMatrix(), Ce.setFromMatrixColumn(this._camera.matrix, 0), we.setFromMatrixColumn(this._camera.matrix, 1), Ce.multiplyScalar(e), we.multiplyScalar(-t);
4630
+ const n = L.copy(Ce).add(we), a = N.copy(this._targetEnd).add(n);
4626
4631
  return this.moveTo(a.x, a.y, a.z, i);
4627
4632
  }
4628
4633
  /**
@@ -4657,7 +4662,7 @@ class xe extends pa {
4657
4662
  this._isUserControllingTruck = !1;
4658
4663
  const a = L.set(e, t, i).sub(this._targetEnd);
4659
4664
  this._encloseToBoundary(this._targetEnd, a, this.boundaryFriction), this._needsUpdate = !0, n || this._target.copy(this._targetEnd);
4660
- const r = !n || z(this._target.x, this._targetEnd.x, this.restThreshold) && z(this._target.y, this._targetEnd.y, this.restThreshold) && z(this._target.z, this._targetEnd.z, this.restThreshold);
4665
+ const r = !n || F(this._target.x, this._targetEnd.x, this.restThreshold) && F(this._target.y, this._targetEnd.y, this.restThreshold) && F(this._target.z, this._targetEnd.z, this.restThreshold);
4661
4666
  return this._createOnRestPromise(r);
4662
4667
  }
4663
4668
  /**
@@ -4687,23 +4692,23 @@ class xe extends pa {
4687
4692
  * @category Methods
4688
4693
  */
4689
4694
  fitToBox(e, t, { cover: i = !1, paddingLeft: n = 0, paddingRight: a = 0, paddingBottom: r = 0, paddingTop: o = 0 } = {}) {
4690
- const h = [], c = e.isBox3 ? it.copy(e) : it.setFromObject(e);
4691
- c.isEmpty() && (console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"), Promise.resolve());
4692
- const u = us(this._sphericalEnd.theta, ds), m = us(this._sphericalEnd.phi, ds);
4693
- h.push(this.rotateTo(u, m, t));
4694
- const _ = L.setFromSpherical(this._sphericalEnd).normalize(), g = vs.setFromUnitVectors(_, _i), S = z(Math.abs(_.y), 1);
4695
- S && g.multiply(vi.setFromAxisAngle(Ft, u)), g.multiply(this._yAxisUpSpaceInverse);
4695
+ const c = [], h = e.isBox3 ? st.copy(e) : st.setFromObject(e);
4696
+ h.isEmpty() && (console.warn("camera-controls: fitTo() cannot be used with an empty box. Aborting"), Promise.resolve());
4697
+ const u = us(this._sphericalEnd.theta, ds), p = us(this._sphericalEnd.phi, ds);
4698
+ c.push(this.rotateTo(u, p, t));
4699
+ const _ = L.setFromSpherical(this._sphericalEnd).normalize(), g = vs.setFromUnitVectors(_, _i), S = F(Math.abs(_.y), 1);
4700
+ S && g.multiply(vi.setFromAxisAngle(zt, u)), g.multiply(this._yAxisUpSpaceInverse);
4696
4701
  const M = gs.makeEmpty();
4697
- N.copy(c.min).applyQuaternion(g), M.expandByPoint(N), N.copy(c.min).setX(c.max.x).applyQuaternion(g), M.expandByPoint(N), N.copy(c.min).setY(c.max.y).applyQuaternion(g), M.expandByPoint(N), N.copy(c.max).setZ(c.min.z).applyQuaternion(g), M.expandByPoint(N), N.copy(c.min).setZ(c.max.z).applyQuaternion(g), M.expandByPoint(N), N.copy(c.max).setY(c.min.y).applyQuaternion(g), M.expandByPoint(N), N.copy(c.max).setX(c.min.x).applyQuaternion(g), M.expandByPoint(N), N.copy(c.max).applyQuaternion(g), M.expandByPoint(N), M.min.x -= n, M.min.y -= r, M.max.x += a, M.max.y += o, g.setFromUnitVectors(_i, _), S && g.premultiply(vi.invert()), g.premultiply(this._yAxisUpSpace);
4702
+ N.copy(h.min).applyQuaternion(g), M.expandByPoint(N), N.copy(h.min).setX(h.max.x).applyQuaternion(g), M.expandByPoint(N), N.copy(h.min).setY(h.max.y).applyQuaternion(g), M.expandByPoint(N), N.copy(h.max).setZ(h.min.z).applyQuaternion(g), M.expandByPoint(N), N.copy(h.min).setZ(h.max.z).applyQuaternion(g), M.expandByPoint(N), N.copy(h.max).setY(h.min.y).applyQuaternion(g), M.expandByPoint(N), N.copy(h.max).setX(h.min.x).applyQuaternion(g), M.expandByPoint(N), N.copy(h.max).applyQuaternion(g), M.expandByPoint(N), M.min.x -= n, M.min.y -= r, M.max.x += a, M.max.y += o, g.setFromUnitVectors(_i, _), S && g.premultiply(vi.invert()), g.premultiply(this._yAxisUpSpace);
4698
4703
  const T = M.getSize(L), f = M.getCenter(N).applyQuaternion(g);
4699
- if (je(this._camera)) {
4704
+ if (Ne(this._camera)) {
4700
4705
  const v = this.getDistanceToFitBox(T.x, T.y, T.z, i);
4701
- h.push(this.moveTo(f.x, f.y, f.z, t)), h.push(this.dollyTo(v, t)), h.push(this.setFocalOffset(0, 0, 0, t));
4702
- } else if (Re(this._camera)) {
4706
+ c.push(this.moveTo(f.x, f.y, f.z, t)), c.push(this.dollyTo(v, t)), c.push(this.setFocalOffset(0, 0, 0, t));
4707
+ } else if (Ae(this._camera)) {
4703
4708
  const v = this._camera, E = v.right - v.left, b = v.top - v.bottom, P = i ? Math.max(E / T.x, b / T.y) : Math.min(E / T.x, b / T.y);
4704
- h.push(this.moveTo(f.x, f.y, f.z, t)), h.push(this.zoomTo(P, t)), h.push(this.setFocalOffset(0, 0, 0, t));
4709
+ c.push(this.moveTo(f.x, f.y, f.z, t)), c.push(this.zoomTo(P, t)), c.push(this.setFocalOffset(0, 0, 0, t));
4705
4710
  }
4706
- return Promise.all(h);
4711
+ return Promise.all(c);
4707
4712
  }
4708
4713
  /**
4709
4714
  * Fit the viewport to the sphere or the bounding sphere of the object.
@@ -4712,13 +4717,13 @@ class xe extends pa {
4712
4717
  * @category Methods
4713
4718
  */
4714
4719
  fitToSphere(e, t) {
4715
- const i = [], a = "isObject3D" in e ? xe.createBoundingSphere(e, gi) : gi.copy(e);
4716
- if (i.push(this.moveTo(a.center.x, a.center.y, a.center.z, t)), je(this._camera)) {
4720
+ const i = [], a = "isObject3D" in e ? Oe.createBoundingSphere(e, gi) : gi.copy(e);
4721
+ if (i.push(this.moveTo(a.center.x, a.center.y, a.center.z, t)), Ne(this._camera)) {
4717
4722
  const r = this.getDistanceToFitSphere(a.radius);
4718
4723
  i.push(this.dollyTo(r, t));
4719
- } else if (Re(this._camera)) {
4720
- const r = this._camera.right - this._camera.left, o = this._camera.top - this._camera.bottom, h = 2 * a.radius, c = Math.min(r / h, o / h);
4721
- i.push(this.zoomTo(c, t));
4724
+ } else if (Ae(this._camera)) {
4725
+ const r = this._camera.right - this._camera.left, o = this._camera.top - this._camera.bottom, c = 2 * a.radius, h = Math.min(r / c, o / c);
4726
+ i.push(this.zoomTo(h, t));
4722
4727
  }
4723
4728
  return i.push(this.setFocalOffset(0, 0, 0, t)), Promise.all(i);
4724
4729
  }
@@ -4734,10 +4739,10 @@ class xe extends pa {
4734
4739
  * @category Methods
4735
4740
  */
4736
4741
  setLookAt(e, t, i, n, a, r, o = !1) {
4737
- this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection = Je.NONE, this._changedDolly = 0;
4738
- const h = N.set(n, a, r), c = L.set(e, t, i);
4739
- this._targetEnd.copy(h), this._sphericalEnd.setFromVector3(c.sub(h).applyQuaternion(this._yAxisUpSpace)), this.normalizeRotations(), this._needsUpdate = !0, o || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
4740
- const u = !o || z(this._target.x, this._targetEnd.x, this.restThreshold) && z(this._target.y, this._targetEnd.y, this.restThreshold) && z(this._target.z, this._targetEnd.z, this.restThreshold) && z(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && z(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold) && z(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
4742
+ this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection = et.NONE, this._changedDolly = 0;
4743
+ const c = N.set(n, a, r), h = L.set(e, t, i);
4744
+ this._targetEnd.copy(c), this._sphericalEnd.setFromVector3(h.sub(c).applyQuaternion(this._yAxisUpSpace)), this.normalizeRotations(), this._needsUpdate = !0, o || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
4745
+ const u = !o || F(this._target.x, this._targetEnd.x, this.restThreshold) && F(this._target.y, this._targetEnd.y, this.restThreshold) && F(this._target.z, this._targetEnd.z, this.restThreshold) && F(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && F(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold) && F(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
4741
4746
  return this._createOnRestPromise(u);
4742
4747
  }
4743
4748
  /**
@@ -4758,15 +4763,15 @@ class xe extends pa {
4758
4763
  * @param enableTransition
4759
4764
  * @category Methods
4760
4765
  */
4761
- lerpLookAt(e, t, i, n, a, r, o, h, c, u, m, _, g, S = !1) {
4762
- this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection = Je.NONE, this._changedDolly = 0;
4766
+ lerpLookAt(e, t, i, n, a, r, o, c, h, u, p, _, g, S = !1) {
4767
+ this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._lastDollyDirection = et.NONE, this._changedDolly = 0;
4763
4768
  const M = L.set(n, a, r), T = N.set(e, t, i);
4764
4769
  ve.setFromVector3(T.sub(M).applyQuaternion(this._yAxisUpSpace));
4765
- const f = tt.set(u, m, _), v = N.set(o, h, c);
4766
- yt.setFromVector3(v.sub(f).applyQuaternion(this._yAxisUpSpace)), this._targetEnd.copy(M.lerp(f, g));
4767
- const E = yt.theta - ve.theta, b = yt.phi - ve.phi, P = yt.radius - ve.radius;
4770
+ const f = it.set(u, p, _), v = N.set(o, c, h);
4771
+ bt.setFromVector3(v.sub(f).applyQuaternion(this._yAxisUpSpace)), this._targetEnd.copy(M.lerp(f, g));
4772
+ const E = bt.theta - ve.theta, b = bt.phi - ve.phi, P = bt.radius - ve.radius;
4768
4773
  this._sphericalEnd.set(ve.radius + P * g, ve.phi + b * g, ve.theta + E * g), this.normalizeRotations(), this._needsUpdate = !0, S || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
4769
- const x = !S || z(this._target.x, this._targetEnd.x, this.restThreshold) && z(this._target.y, this._targetEnd.y, this.restThreshold) && z(this._target.z, this._targetEnd.z, this.restThreshold) && z(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && z(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold) && z(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
4774
+ const x = !S || F(this._target.x, this._targetEnd.x, this.restThreshold) && F(this._target.y, this._targetEnd.y, this.restThreshold) && F(this._target.z, this._targetEnd.z, this.restThreshold) && F(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && F(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold) && F(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
4770
4775
  return this._createOnRestPromise(x);
4771
4776
  }
4772
4777
  /**
@@ -4804,7 +4809,7 @@ class xe extends pa {
4804
4809
  */
4805
4810
  setFocalOffset(e, t, i, n = !1) {
4806
4811
  this._isUserControllingOffset = !1, this._focalOffsetEnd.set(e, t, i), this._needsUpdate = !0, n || this._focalOffset.copy(this._focalOffsetEnd);
4807
- const a = !n || z(this._focalOffset.x, this._focalOffsetEnd.x, this.restThreshold) && z(this._focalOffset.y, this._focalOffsetEnd.y, this.restThreshold) && z(this._focalOffset.z, this._focalOffsetEnd.z, this.restThreshold);
4812
+ const a = !n || F(this._focalOffset.x, this._focalOffsetEnd.x, this.restThreshold) && F(this._focalOffset.y, this._focalOffsetEnd.y, this.restThreshold) && F(this._focalOffset.z, this._focalOffsetEnd.z, this.restThreshold);
4808
4813
  return this._createOnRestPromise(a);
4809
4814
  }
4810
4815
  /**
@@ -4816,9 +4821,9 @@ class xe extends pa {
4816
4821
  * @category Methods
4817
4822
  */
4818
4823
  setOrbitPoint(e, t, i) {
4819
- this._camera.updateMatrixWorld(), Ee.setFromMatrixColumn(this._camera.matrixWorldInverse, 0), Ce.setFromMatrixColumn(this._camera.matrixWorldInverse, 1), Ne.setFromMatrixColumn(this._camera.matrixWorldInverse, 2);
4824
+ this._camera.updateMatrixWorld(), Ce.setFromMatrixColumn(this._camera.matrixWorldInverse, 0), we.setFromMatrixColumn(this._camera.matrixWorldInverse, 1), ze.setFromMatrixColumn(this._camera.matrixWorldInverse, 2);
4820
4825
  const n = L.set(e, t, i), a = n.distanceTo(this._camera.position), r = n.sub(this._camera.position);
4821
- Ee.multiplyScalar(r.x), Ce.multiplyScalar(r.y), Ne.multiplyScalar(r.z), L.copy(Ee).add(Ce).add(Ne), L.z = L.z + a, this.dollyTo(a, !1), this.setFocalOffset(-L.x, L.y, -L.z, !1), this.moveTo(e, t, i, !1);
4826
+ Ce.multiplyScalar(r.x), we.multiplyScalar(r.y), ze.multiplyScalar(r.z), L.copy(Ce).add(we).add(ze), L.z = L.z + a, this.dollyTo(a, !1), this.setFocalOffset(-L.x, L.y, -L.z, !1), this.moveTo(e, t, i, !1);
4822
4827
  }
4823
4828
  /**
4824
4829
  * Set the boundary box that encloses the target of the camera. box3 is in THREE.Box3
@@ -4859,7 +4864,7 @@ class xe extends pa {
4859
4864
  getDistanceToFitBox(e, t, i, n = !1) {
4860
4865
  if (mi(this._camera, "getDistanceToFitBox"))
4861
4866
  return this._spherical.radius;
4862
- const a = e / t, r = this._camera.getEffectiveFOV() * ft, o = this._camera.aspect;
4867
+ const a = e / t, r = this._camera.getEffectiveFOV() * _t, o = this._camera.aspect;
4863
4868
  return ((n ? a > o : a < o) ? t : e / o) * 0.5 / Math.tan(r * 0.5) + i * 0.5;
4864
4869
  }
4865
4870
  /**
@@ -4871,7 +4876,7 @@ class xe extends pa {
4871
4876
  getDistanceToFitSphere(e) {
4872
4877
  if (mi(this._camera, "getDistanceToFitSphere"))
4873
4878
  return this._spherical.radius;
4874
- const t = this._camera.getEffectiveFOV() * ft, i = Math.atan(Math.tan(t * 0.5) * this._camera.aspect) * 2, n = 1 < this._camera.aspect ? t : i;
4879
+ const t = this._camera.getEffectiveFOV() * _t, i = Math.atan(Math.tan(t * 0.5) * this._camera.aspect) * 2, n = 1 < this._camera.aspect ? t : i;
4875
4880
  return e / Math.sin(n * 0.5);
4876
4881
  }
4877
4882
  /**
@@ -4915,7 +4920,7 @@ class xe extends pa {
4915
4920
  * @category Methods
4916
4921
  */
4917
4922
  normalizeRotations() {
4918
- this._sphericalEnd.theta = this._sphericalEnd.theta % et, this._sphericalEnd.theta < 0 && (this._sphericalEnd.theta += et), this._spherical.theta += et * Math.round((this._sphericalEnd.theta - this._spherical.theta) / et);
4923
+ this._sphericalEnd.theta = this._sphericalEnd.theta % tt, this._sphericalEnd.theta < 0 && (this._sphericalEnd.theta += tt), this._spherical.theta += tt * Math.round((this._sphericalEnd.theta - this._spherical.theta) / tt);
4919
4924
  }
4920
4925
  /**
4921
4926
  * stop all transitions.
@@ -4929,7 +4934,7 @@ class xe extends pa {
4929
4934
  * @category Methods
4930
4935
  */
4931
4936
  reset(e = !1) {
4932
- if (!z(this._camera.up.x, this._cameraUp0.x) || !z(this._camera.up.y, this._cameraUp0.y) || !z(this._camera.up.z, this._cameraUp0.z)) {
4937
+ if (!F(this._camera.up.x, this._cameraUp0.x) || !F(this._camera.up.y, this._cameraUp0.y) || !F(this._camera.up.z, this._cameraUp0.z)) {
4933
4938
  this._camera.up.copy(this._cameraUp0);
4934
4939
  const i = this.getPosition(L);
4935
4940
  this.updateCameraUp(), this.setPosition(i.x, i.y, i.z);
@@ -4954,7 +4959,7 @@ class xe extends pa {
4954
4959
  * @category Methods
4955
4960
  */
4956
4961
  updateCameraUp() {
4957
- this._yAxisUpSpace.setFromUnitVectors(this._camera.up, Ft), this._yAxisUpSpaceInverse.copy(this._yAxisUpSpace).invert();
4962
+ this._yAxisUpSpace.setFromUnitVectors(this._camera.up, zt), this._yAxisUpSpaceInverse.copy(this._yAxisUpSpace).invert();
4958
4963
  }
4959
4964
  /**
4960
4965
  * Apply current camera-up direction to the camera.
@@ -4979,62 +4984,62 @@ class xe extends pa {
4979
4984
  if (Z(t))
4980
4985
  this._thetaVelocity.value = 0, this._spherical.theta = this._sphericalEnd.theta;
4981
4986
  else {
4982
- const m = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
4983
- this._spherical.theta = jt(this._spherical.theta, this._sphericalEnd.theta, this._thetaVelocity, m, 1 / 0, e), this._needsUpdate = !0;
4987
+ const p = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
4988
+ this._spherical.theta = jt(this._spherical.theta, this._sphericalEnd.theta, this._thetaVelocity, p, 1 / 0, e), this._needsUpdate = !0;
4984
4989
  }
4985
4990
  if (Z(i))
4986
4991
  this._phiVelocity.value = 0, this._spherical.phi = this._sphericalEnd.phi;
4987
4992
  else {
4988
- const m = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
4989
- this._spherical.phi = jt(this._spherical.phi, this._sphericalEnd.phi, this._phiVelocity, m, 1 / 0, e), this._needsUpdate = !0;
4993
+ const p = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
4994
+ this._spherical.phi = jt(this._spherical.phi, this._sphericalEnd.phi, this._phiVelocity, p, 1 / 0, e), this._needsUpdate = !0;
4990
4995
  }
4991
4996
  if (Z(n))
4992
4997
  this._radiusVelocity.value = 0, this._spherical.radius = this._sphericalEnd.radius;
4993
4998
  else {
4994
- const m = this._isUserControllingDolly ? this.draggingSmoothTime : this.smoothTime;
4995
- this._spherical.radius = jt(this._spherical.radius, this._sphericalEnd.radius, this._radiusVelocity, m, this.maxSpeed, e), this._needsUpdate = !0;
4999
+ const p = this._isUserControllingDolly ? this.draggingSmoothTime : this.smoothTime;
5000
+ this._spherical.radius = jt(this._spherical.radius, this._sphericalEnd.radius, this._radiusVelocity, p, this.maxSpeed, e), this._needsUpdate = !0;
4996
5001
  }
4997
5002
  if (Z(a.x) && Z(a.y) && Z(a.z))
4998
5003
  this._targetVelocity.set(0, 0, 0), this._target.copy(this._targetEnd);
4999
5004
  else {
5000
- const m = this._isUserControllingTruck ? this.draggingSmoothTime : this.smoothTime;
5001
- ps(this._target, this._targetEnd, this._targetVelocity, m, this.maxSpeed, e, this._target), this._needsUpdate = !0;
5005
+ const p = this._isUserControllingTruck ? this.draggingSmoothTime : this.smoothTime;
5006
+ ps(this._target, this._targetEnd, this._targetVelocity, p, this.maxSpeed, e, this._target), this._needsUpdate = !0;
5002
5007
  }
5003
5008
  if (Z(r.x) && Z(r.y) && Z(r.z))
5004
5009
  this._focalOffsetVelocity.set(0, 0, 0), this._focalOffset.copy(this._focalOffsetEnd);
5005
5010
  else {
5006
- const m = this._isUserControllingOffset ? this.draggingSmoothTime : this.smoothTime;
5007
- ps(this._focalOffset, this._focalOffsetEnd, this._focalOffsetVelocity, m, this.maxSpeed, e, this._focalOffset), this._needsUpdate = !0;
5011
+ const p = this._isUserControllingOffset ? this.draggingSmoothTime : this.smoothTime;
5012
+ ps(this._focalOffset, this._focalOffsetEnd, this._focalOffsetVelocity, p, this.maxSpeed, e, this._focalOffset), this._needsUpdate = !0;
5008
5013
  }
5009
5014
  if (Z(o))
5010
5015
  this._zoomVelocity.value = 0, this._zoom = this._zoomEnd;
5011
5016
  else {
5012
- const m = this._isUserControllingZoom ? this.draggingSmoothTime : this.smoothTime;
5013
- this._zoom = jt(this._zoom, this._zoomEnd, this._zoomVelocity, m, 1 / 0, e);
5017
+ const p = this._isUserControllingZoom ? this.draggingSmoothTime : this.smoothTime;
5018
+ this._zoom = jt(this._zoom, this._zoomEnd, this._zoomVelocity, p, 1 / 0, e);
5014
5019
  }
5015
5020
  if (this.dollyToCursor) {
5016
- if (je(this._camera) && this._changedDolly !== 0) {
5017
- const m = this._spherical.radius - this._lastDistance, _ = this._camera, g = this._getCameraDirection(vt), S = L.copy(g).cross(_.up).normalize();
5021
+ if (Ne(this._camera) && this._changedDolly !== 0) {
5022
+ const p = this._spherical.radius - this._lastDistance, _ = this._camera, g = this._getCameraDirection(yt), S = L.copy(g).cross(_.up).normalize();
5018
5023
  S.lengthSq() === 0 && (S.x = 1);
5019
- const M = N.crossVectors(S, g), T = this._sphericalEnd.radius * Math.tan(_.getEffectiveFOV() * ft * 0.5), v = (this._sphericalEnd.radius - m - this._sphericalEnd.radius) / this._sphericalEnd.radius, E = tt.copy(this._targetEnd).add(S.multiplyScalar(this._dollyControlCoord.x * T * _.aspect)).add(M.multiplyScalar(this._dollyControlCoord.y * T)), b = L.copy(this._targetEnd).lerp(E, v), P = this._lastDollyDirection === Je.IN && this._spherical.radius <= this.minDistance, x = this._lastDollyDirection === Je.OUT && this.maxDistance <= this._spherical.radius;
5024
+ const M = N.crossVectors(S, g), T = this._sphericalEnd.radius * Math.tan(_.getEffectiveFOV() * _t * 0.5), v = (this._sphericalEnd.radius - p - this._sphericalEnd.radius) / this._sphericalEnd.radius, E = it.copy(this._targetEnd).add(S.multiplyScalar(this._dollyControlCoord.x * T * _.aspect)).add(M.multiplyScalar(this._dollyControlCoord.y * T)), b = L.copy(this._targetEnd).lerp(E, v), P = this._lastDollyDirection === et.IN && this._spherical.radius <= this.minDistance, x = this._lastDollyDirection === et.OUT && this.maxDistance <= this._spherical.radius;
5020
5025
  if (this.infinityDolly && (P || x)) {
5021
- this._sphericalEnd.radius -= m, this._spherical.radius -= m;
5022
- const X = N.copy(g).multiplyScalar(-m);
5026
+ this._sphericalEnd.radius -= p, this._spherical.radius -= p;
5027
+ const X = N.copy(g).multiplyScalar(-p);
5023
5028
  b.add(X);
5024
5029
  }
5025
5030
  this._boundary.clampPoint(b, b);
5026
5031
  const j = N.subVectors(b, this._targetEnd);
5027
- this._targetEnd.copy(b), this._target.add(j), this._changedDolly -= m, Z(this._changedDolly) && (this._changedDolly = 0);
5028
- } else if (Re(this._camera) && this._changedZoom !== 0) {
5029
- const m = this._zoom - this._lastZoom, _ = this._camera, g = L.set(this._dollyControlCoord.x, this._dollyControlCoord.y, (_.near + _.far) / (_.near - _.far)).unproject(_), S = N.set(0, 0, -1).applyQuaternion(_.quaternion), M = tt.copy(g).add(S.multiplyScalar(-g.dot(_.up))), f = -(this._zoom - m - this._zoom) / this._zoom, v = this._getCameraDirection(vt), E = this._targetEnd.dot(v), b = L.copy(this._targetEnd).lerp(M, f), P = b.dot(v), x = v.multiplyScalar(P - E);
5032
+ this._targetEnd.copy(b), this._target.add(j), this._changedDolly -= p, Z(this._changedDolly) && (this._changedDolly = 0);
5033
+ } else if (Ae(this._camera) && this._changedZoom !== 0) {
5034
+ const p = this._zoom - this._lastZoom, _ = this._camera, g = L.set(this._dollyControlCoord.x, this._dollyControlCoord.y, (_.near + _.far) / (_.near - _.far)).unproject(_), S = N.set(0, 0, -1).applyQuaternion(_.quaternion), M = it.copy(g).add(S.multiplyScalar(-g.dot(_.up))), f = -(this._zoom - p - this._zoom) / this._zoom, v = this._getCameraDirection(yt), E = this._targetEnd.dot(v), b = L.copy(this._targetEnd).lerp(M, f), P = b.dot(v), x = v.multiplyScalar(P - E);
5030
5035
  b.sub(x), this._boundary.clampPoint(b, b);
5031
5036
  const j = N.subVectors(b, this._targetEnd);
5032
- this._targetEnd.copy(b), this._target.add(j), this._changedZoom -= m, Z(this._changedZoom) && (this._changedZoom = 0);
5037
+ this._targetEnd.copy(b), this._target.add(j), this._changedZoom -= p, Z(this._changedZoom) && (this._changedZoom = 0);
5033
5038
  }
5034
5039
  }
5035
5040
  this._camera.zoom !== this._zoom && (this._camera.zoom = this._zoom, this._camera.updateProjectionMatrix(), this._updateNearPlaneCorners(), this._needsUpdate = !0), this._dragNeedsUpdate = !0;
5036
- const h = this._collisionTest();
5037
- this._spherical.radius = Math.min(this._spherical.radius, h), this._spherical.makeSafe(), this._camera.position.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(this._target), this._camera.lookAt(this._target), (!Z(this._focalOffset.x) || !Z(this._focalOffset.y) || !Z(this._focalOffset.z)) && (this._camera.updateMatrixWorld(), Ee.setFromMatrixColumn(this._camera.matrix, 0), Ce.setFromMatrixColumn(this._camera.matrix, 1), Ne.setFromMatrixColumn(this._camera.matrix, 2), Ee.multiplyScalar(this._focalOffset.x), Ce.multiplyScalar(-this._focalOffset.y), Ne.multiplyScalar(this._focalOffset.z), L.copy(Ee).add(Ce).add(Ne), this._camera.position.add(L)), this._boundaryEnclosesCamera && this._encloseToBoundary(this._camera.position.copy(this._target), L.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse), 1);
5041
+ const c = this._collisionTest();
5042
+ this._spherical.radius = Math.min(this._spherical.radius, c), this._spherical.makeSafe(), this._camera.position.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse).add(this._target), this._camera.lookAt(this._target), (!Z(this._focalOffset.x) || !Z(this._focalOffset.y) || !Z(this._focalOffset.z)) && (this._camera.updateMatrixWorld(), Ce.setFromMatrixColumn(this._camera.matrix, 0), we.setFromMatrixColumn(this._camera.matrix, 1), ze.setFromMatrixColumn(this._camera.matrix, 2), Ce.multiplyScalar(this._focalOffset.x), we.multiplyScalar(-this._focalOffset.y), ze.multiplyScalar(this._focalOffset.z), L.copy(Ce).add(we).add(ze), this._camera.position.add(L)), this._boundaryEnclosesCamera && this._encloseToBoundary(this._camera.position.copy(this._target), L.setFromSpherical(this._spherical).applyQuaternion(this._yAxisUpSpaceInverse), 1);
5038
5043
  const u = this._needsUpdate;
5039
5044
  return u && !this._updatedLastTime ? (this._hasRested = !1, this.dispatchEvent({ type: "wake" }), this.dispatchEvent({ type: "update" })) : u ? (this.dispatchEvent({ type: "update" }), Z(t, this.restThreshold) && Z(i, this.restThreshold) && Z(n, this.restThreshold) && Z(a.x, this.restThreshold) && Z(a.y, this.restThreshold) && Z(a.z, this.restThreshold) && Z(r.x, this.restThreshold) && Z(r.y, this.restThreshold) && Z(r.z, this.restThreshold) && Z(o, this.restThreshold) && !this._hasRested && (this._hasRested = !0, this.dispatchEvent({ type: "rest" }))) : !u && this._updatedLastTime && this.dispatchEvent({ type: "sleep" }), this._lastDistance = this._spherical.radius, this._lastZoom = this._zoom, this._updatedLastTime = u, this._needsUpdate = !1, u;
5040
5045
  }
@@ -5046,13 +5051,13 @@ class xe extends pa {
5046
5051
  return JSON.stringify({
5047
5052
  enabled: this._enabled,
5048
5053
  minDistance: this.minDistance,
5049
- maxDistance: _t(this.maxDistance),
5054
+ maxDistance: gt(this.maxDistance),
5050
5055
  minZoom: this.minZoom,
5051
- maxZoom: _t(this.maxZoom),
5056
+ maxZoom: gt(this.maxZoom),
5052
5057
  minPolarAngle: this.minPolarAngle,
5053
- maxPolarAngle: _t(this.maxPolarAngle),
5054
- minAzimuthAngle: _t(this.minAzimuthAngle),
5055
- maxAzimuthAngle: _t(this.maxAzimuthAngle),
5058
+ maxPolarAngle: gt(this.maxPolarAngle),
5059
+ minAzimuthAngle: gt(this.minAzimuthAngle),
5060
+ maxAzimuthAngle: gt(this.maxAzimuthAngle),
5056
5061
  smoothTime: this.smoothTime,
5057
5062
  draggingSmoothTime: this.draggingSmoothTime,
5058
5063
  dollySpeed: this.dollySpeed,
@@ -5077,7 +5082,7 @@ class xe extends pa {
5077
5082
  */
5078
5083
  fromJSON(e, t = !1) {
5079
5084
  const i = JSON.parse(e);
5080
- this.enabled = i.enabled, this.minDistance = i.minDistance, this.maxDistance = gt(i.maxDistance), this.minZoom = i.minZoom, this.maxZoom = gt(i.maxZoom), this.minPolarAngle = i.minPolarAngle, this.maxPolarAngle = gt(i.maxPolarAngle), this.minAzimuthAngle = gt(i.minAzimuthAngle), this.maxAzimuthAngle = gt(i.maxAzimuthAngle), this.smoothTime = i.smoothTime, this.draggingSmoothTime = i.draggingSmoothTime, this.dollySpeed = i.dollySpeed, this.truckSpeed = i.truckSpeed, this.dollyToCursor = i.dollyToCursor, this.verticalDragToForward = i.verticalDragToForward, this._target0.fromArray(i.target0), this._position0.fromArray(i.position0), this._zoom0 = i.zoom0, this._focalOffset0.fromArray(i.focalOffset0), this.moveTo(i.target[0], i.target[1], i.target[2], t), ve.setFromVector3(L.fromArray(i.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace)), this.rotateTo(ve.theta, ve.phi, t), this.dollyTo(ve.radius, t), this.zoomTo(i.zoom, t), this.setFocalOffset(i.focalOffset[0], i.focalOffset[1], i.focalOffset[2], t), this._needsUpdate = !0;
5085
+ this.enabled = i.enabled, this.minDistance = i.minDistance, this.maxDistance = vt(i.maxDistance), this.minZoom = i.minZoom, this.maxZoom = vt(i.maxZoom), this.minPolarAngle = i.minPolarAngle, this.maxPolarAngle = vt(i.maxPolarAngle), this.minAzimuthAngle = vt(i.minAzimuthAngle), this.maxAzimuthAngle = vt(i.maxAzimuthAngle), this.smoothTime = i.smoothTime, this.draggingSmoothTime = i.draggingSmoothTime, this.dollySpeed = i.dollySpeed, this.truckSpeed = i.truckSpeed, this.dollyToCursor = i.dollyToCursor, this.verticalDragToForward = i.verticalDragToForward, this._target0.fromArray(i.target0), this._position0.fromArray(i.position0), this._zoom0 = i.zoom0, this._focalOffset0.fromArray(i.focalOffset0), this.moveTo(i.target[0], i.target[1], i.target[2], t), ve.setFromVector3(L.fromArray(i.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace)), this.rotateTo(ve.theta, ve.phi, t), this.dollyTo(ve.radius, t), this.zoomTo(i.zoom, t), this.setFocalOffset(i.focalOffset[0], i.focalOffset[1], i.focalOffset[2], t), this._needsUpdate = !0;
5081
5086
  }
5082
5087
  /**
5083
5088
  * Attach all internal event handlers to enable drag control.
@@ -5088,7 +5093,7 @@ class xe extends pa {
5088
5093
  console.warn("camera-controls is already connected.");
5089
5094
  return;
5090
5095
  }
5091
- e.setAttribute("data-camera-controls-version", ma), this._addAllEventListeners(e), this._getClientRect(this._elementRect);
5096
+ e.setAttribute("data-camera-controls-version", _a), this._addAllEventListeners(e), this._getClientRect(this._elementRect);
5092
5097
  }
5093
5098
  /**
5094
5099
  * Detach all internal event handlers to disable drag control.
@@ -5124,23 +5129,23 @@ class xe extends pa {
5124
5129
  const n = t.lengthSq();
5125
5130
  if (n === 0)
5126
5131
  return e;
5127
- const a = N.copy(t).add(e), o = this._boundary.clampPoint(a, tt).sub(a), h = o.lengthSq();
5128
- if (h === 0)
5132
+ const a = N.copy(t).add(e), o = this._boundary.clampPoint(a, it).sub(a), c = o.lengthSq();
5133
+ if (c === 0)
5129
5134
  return e.add(t);
5130
- if (h === n)
5135
+ if (c === n)
5131
5136
  return e;
5132
5137
  if (i === 0)
5133
5138
  return e.add(t).add(o);
5134
5139
  {
5135
- const c = 1 + i * h / t.dot(o);
5136
- return e.add(N.copy(t).multiplyScalar(c)).add(o.multiplyScalar(1 - i));
5140
+ const h = 1 + i * c / t.dot(o);
5141
+ return e.add(N.copy(t).multiplyScalar(h)).add(o.multiplyScalar(1 - i));
5137
5142
  }
5138
5143
  }
5139
5144
  _updateNearPlaneCorners() {
5140
- if (je(this._camera)) {
5141
- const e = this._camera, t = e.near, i = e.getEffectiveFOV() * ft, n = Math.tan(i * 0.5) * t, a = n * e.aspect;
5145
+ if (Ne(this._camera)) {
5146
+ const e = this._camera, t = e.near, i = e.getEffectiveFOV() * _t, n = Math.tan(i * 0.5) * t, a = n * e.aspect;
5142
5147
  this._nearPlaneCorners[0].set(-a, -n, 0), this._nearPlaneCorners[1].set(a, -n, 0), this._nearPlaneCorners[2].set(a, n, 0), this._nearPlaneCorners[3].set(-a, n, 0);
5143
- } else if (Re(this._camera)) {
5148
+ } else if (Ae(this._camera)) {
5144
5149
  const e = this._camera, t = 1 / e.zoom, i = e.left * t, n = e.right * t, a = e.top * t, r = e.bottom * t;
5145
5150
  this._nearPlaneCorners[0].set(i, a, 0), this._nearPlaneCorners[1].set(n, a, 0), this._nearPlaneCorners[2].set(n, r, 0), this._nearPlaneCorners[3].set(i, r, 0);
5146
5151
  }
@@ -5150,14 +5155,14 @@ class xe extends pa {
5150
5155
  let e = 1 / 0;
5151
5156
  if (!(this.colliderMeshes.length >= 1) || mi(this._camera, "_collisionTest"))
5152
5157
  return e;
5153
- const i = this._getTargetDirection(vt);
5158
+ const i = this._getTargetDirection(yt);
5154
5159
  yi.lookAt(ms, i, this._camera.up);
5155
5160
  for (let n = 0; n < 4; n++) {
5156
5161
  const a = N.copy(this._nearPlaneCorners[n]);
5157
5162
  a.applyMatrix4(yi);
5158
- const r = tt.addVectors(this._target, a);
5159
- zt.set(r, i), zt.far = this._spherical.radius + 1;
5160
- const o = zt.intersectObjects(this.colliderMeshes);
5163
+ const r = it.addVectors(this._target, a);
5164
+ Ft.set(r, i), Ft.far = this._spherical.radius + 1;
5165
+ const o = Ft.intersectObjects(this.colliderMeshes);
5161
5166
  o.length !== 0 && o[0].distance < e && (e = o[0].distance);
5162
5167
  }
5163
5168
  return e;
@@ -5218,18 +5223,18 @@ class xe extends pa {
5218
5223
  }
5219
5224
  static createBoundingSphere(e, t = new A.Sphere()) {
5220
5225
  const i = t, n = i.center;
5221
- it.makeEmpty(), e.traverseVisible((r) => {
5222
- r.isMesh && it.expandByObject(r);
5223
- }), it.getCenter(n);
5226
+ st.makeEmpty(), e.traverseVisible((r) => {
5227
+ r.isMesh && st.expandByObject(r);
5228
+ }), st.getCenter(n);
5224
5229
  let a = 0;
5225
5230
  return e.traverseVisible((r) => {
5226
5231
  if (!r.isMesh)
5227
5232
  return;
5228
- const o = r, h = o.geometry.clone();
5229
- h.applyMatrix4(o.matrixWorld);
5230
- const u = h.attributes.position;
5231
- for (let m = 0, _ = u.count; m < _; m++)
5232
- L.fromBufferAttribute(u, m), a = Math.max(a, n.distanceToSquared(L));
5233
+ const o = r, c = o.geometry.clone();
5234
+ c.applyMatrix4(o.matrixWorld);
5235
+ const u = c.attributes.position;
5236
+ for (let p = 0, _ = u.count; p < _; p++)
5237
+ L.fromBufferAttribute(u, p), a = Math.max(a, n.distanceToSquared(L));
5233
5238
  }), i.radius = Math.sqrt(a), i;
5234
5239
  }
5235
5240
  }
@@ -5250,10 +5255,10 @@ const qt = (s) => {
5250
5255
  "Normals",
5251
5256
  "UVs",
5252
5257
  "Wireframe"
5253
- ], [n, a] = G("Renderer"), [r, o] = G(!1), [h, c] = G(!1), [u, m] = G(!1);
5258
+ ], [n, a] = G("Renderer"), [r, o] = G(!1), [c, h] = G(!1), [u, p] = G(!1);
5254
5259
  return /* @__PURE__ */ d.jsxs("div", { className: `CameraWindow ${e.name}`, children: [
5255
5260
  /* @__PURE__ */ d.jsx("div", { ref: t, className: "clickable", onClick: () => {
5256
- u && m(!1);
5261
+ u && p(!1);
5257
5262
  } }),
5258
5263
  /* @__PURE__ */ d.jsxs("div", { className: "options", children: [
5259
5264
  e.camera !== null && /* @__PURE__ */ d.jsx(
@@ -5265,7 +5270,7 @@ const qt = (s) => {
5265
5270
  options: e.options,
5266
5271
  onSelect: e.onSelectCamera,
5267
5272
  onToggle: (_) => {
5268
- m(_);
5273
+ p(_);
5269
5274
  },
5270
5275
  up: !0
5271
5276
  }
@@ -5275,7 +5280,7 @@ const qt = (s) => {
5275
5280
  {
5276
5281
  title: "Mode",
5277
5282
  index: i.indexOf(n),
5278
- open: h,
5283
+ open: c,
5279
5284
  options: i,
5280
5285
  onSelect: (_) => {
5281
5286
  if (_ === n)
@@ -5284,7 +5289,7 @@ const qt = (s) => {
5284
5289
  e.onSelectRenderMode(g), a(g);
5285
5290
  },
5286
5291
  onToggle: (_) => {
5287
- r && o(!1), c(_);
5292
+ r && o(!1), h(_);
5288
5293
  },
5289
5294
  up: !0
5290
5295
  }
@@ -5292,7 +5297,7 @@ const qt = (s) => {
5292
5297
  ] })
5293
5298
  ] });
5294
5299
  });
5295
- class _a extends Vs {
5300
+ class va extends Vs {
5296
5301
  constructor(e) {
5297
5302
  super({
5298
5303
  extensions: {
@@ -5300,7 +5305,7 @@ class _a extends Vs {
5300
5305
  derivatives: !0
5301
5306
  },
5302
5307
  glslVersion: qn,
5303
- side: Di,
5308
+ side: Ri,
5304
5309
  transparent: !0,
5305
5310
  uniforms: {
5306
5311
  uScale: {
@@ -5405,17 +5410,17 @@ class _a extends Vs {
5405
5410
  });
5406
5411
  }
5407
5412
  }
5408
- class ga extends w {
5413
+ class ya extends w {
5409
5414
  gridMaterial;
5410
5415
  constructor() {
5411
- const e = new _a();
5416
+ const e = new va();
5412
5417
  super(new Xs(2, 2), e), this.gridMaterial = e, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
5413
5418
  }
5414
5419
  update() {
5415
5420
  this.gridMaterial.needsUpdate = !0;
5416
5421
  }
5417
5422
  }
5418
- const va = `#include <common>
5423
+ const ba = `#include <common>
5419
5424
  #include <batching_pars_vertex>
5420
5425
  #include <uv_pars_vertex>
5421
5426
  #include <color_pars_vertex>
@@ -5445,7 +5450,7 @@ void main() {
5445
5450
  #include <logdepthbuf_vertex>
5446
5451
  #include <clipping_planes_vertex>
5447
5452
  #include <worldpos_vertex>
5448
- }`, ya = `
5453
+ }`, Ea = `
5449
5454
  #include <common>
5450
5455
  #include <uv_pars_fragment>
5451
5456
  #include <clipping_planes_pars_fragment>
@@ -5454,30 +5459,30 @@ void main() {
5454
5459
  #include <clipping_planes_fragment>
5455
5460
  gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
5456
5461
  }`;
5457
- class ba extends Vs {
5462
+ class Ca extends Vs {
5458
5463
  constructor() {
5459
5464
  super({
5460
5465
  defines: {
5461
5466
  USE_UV: ""
5462
5467
  },
5463
- vertexShader: va,
5464
- fragmentShader: ya
5468
+ vertexShader: ba,
5469
+ fragmentShader: Ea
5465
5470
  });
5466
5471
  }
5467
5472
  }
5468
- const ze = new Xt(), re = new O(), De = new O(), W = new fe(), ys = {
5473
+ const He = new Xt(), re = new O(), Re = new O(), W = new fe(), ys = {
5469
5474
  X: new O(1, 0, 0),
5470
5475
  Y: new O(0, 1, 0),
5471
5476
  Z: new O(0, 0, 1)
5472
5477
  }, bi = { type: "change" }, bs = { type: "mouseDown", mode: null }, Es = { type: "mouseUp", mode: null }, Cs = { type: "objectChange" };
5473
- class Ea extends Ws {
5478
+ class wa extends Ws {
5474
5479
  constructor(e, t = null) {
5475
5480
  super(void 0, t);
5476
- const i = new Ta(this);
5481
+ const i = new Pa(this);
5477
5482
  this._root = i;
5478
- const n = new Ma();
5483
+ const n = new Da();
5479
5484
  this._gizmo = n, i.add(n);
5480
- const a = new Pa();
5485
+ const a = new Ra();
5481
5486
  this._plane = a, i.add(a);
5482
5487
  const r = this;
5483
5488
  function o(E, b) {
@@ -5492,8 +5497,8 @@ class Ea extends Ws {
5492
5497
  }), r[E] = b, a[E] = b, n[E] = b;
5493
5498
  }
5494
5499
  o("camera", e), o("object", void 0), o("enabled", !0), o("axis", null), o("mode", "translate"), o("translationSnap", null), o("rotationSnap", null), o("scaleSnap", null), o("space", "world"), o("size", 1), o("dragging", !1), o("showX", !0), o("showY", !0), o("showZ", !0);
5495
- const h = new O(), c = new O(), u = new fe(), m = new fe(), _ = new O(), g = new fe(), S = new O(), M = new O(), T = new O(), f = 0, v = new O();
5496
- o("worldPosition", h), o("worldPositionStart", c), o("worldQuaternion", u), o("worldQuaternionStart", m), o("cameraPosition", _), o("cameraQuaternion", g), o("pointStart", S), o("pointEnd", M), o("rotationAxis", T), o("rotationAngle", f), o("eye", v), this._offset = new O(), this._startNorm = new O(), this._endNorm = new O(), this._cameraScale = new O(), this._parentPosition = new O(), this._parentQuaternion = new fe(), this._parentQuaternionInv = new fe(), this._parentScale = new O(), this._worldScaleStart = new O(), this._worldQuaternionInv = new fe(), this._worldScale = new O(), this._positionStart = new O(), this._quaternionStart = new fe(), this._scaleStart = new O(), this._getPointer = Ca.bind(this), this._onPointerDown = Sa.bind(this), this._onPointerHover = wa.bind(this), this._onPointerMove = xa.bind(this), this._onPointerUp = Oa.bind(this), t !== null && this.connect();
5500
+ const c = new O(), h = new O(), u = new fe(), p = new fe(), _ = new O(), g = new fe(), S = new O(), M = new O(), T = new O(), f = 0, v = new O();
5501
+ o("worldPosition", c), o("worldPositionStart", h), o("worldQuaternion", u), o("worldQuaternionStart", p), o("cameraPosition", _), o("cameraQuaternion", g), o("pointStart", S), o("pointEnd", M), o("rotationAxis", T), o("rotationAngle", f), o("eye", v), this._offset = new O(), this._startNorm = new O(), this._endNorm = new O(), this._cameraScale = new O(), this._parentPosition = new O(), this._parentQuaternion = new fe(), this._parentQuaternionInv = new fe(), this._parentScale = new O(), this._worldScaleStart = new O(), this._worldQuaternionInv = new fe(), this._worldScale = new O(), this._positionStart = new O(), this._quaternionStart = new fe(), this._scaleStart = new O(), this._getPointer = Sa.bind(this), this._onPointerDown = Oa.bind(this), this._onPointerHover = xa.bind(this), this._onPointerMove = Ta.bind(this), this._onPointerUp = Ma.bind(this), t !== null && this.connect();
5497
5502
  }
5498
5503
  connect() {
5499
5504
  this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointermove", this._onPointerHover), this.domElement.addEventListener("pointerup", this._onPointerUp), this.domElement.style.touchAction = "none";
@@ -5507,14 +5512,14 @@ class Ea extends Ws {
5507
5512
  pointerHover(e) {
5508
5513
  if (this.object === void 0 || this.dragging === !0)
5509
5514
  return;
5510
- e !== null && ze.setFromCamera(e, this.camera);
5511
- const t = Ei(this._gizmo.picker[this.mode], ze);
5515
+ e !== null && He.setFromCamera(e, this.camera);
5516
+ const t = Ei(this._gizmo.picker[this.mode], He);
5512
5517
  t ? this.axis = t.object.name : this.axis = null;
5513
5518
  }
5514
5519
  pointerDown(e) {
5515
5520
  if (!(this.object === void 0 || this.dragging === !0 || e != null && e.button !== 0) && this.axis !== null) {
5516
- e !== null && ze.setFromCamera(e, this.camera);
5517
- const t = Ei(this._plane, ze, !0);
5521
+ e !== null && He.setFromCamera(e, this.camera);
5522
+ const t = Ei(this._plane, He, !0);
5518
5523
  t && (this.object.updateMatrixWorld(), this.object.parent.updateMatrixWorld(), this._positionStart.copy(this.object.position), this._quaternionStart.copy(this.object.quaternion), this._scaleStart.copy(this.object.scale), this.object.matrixWorld.decompose(this.worldPositionStart, this.worldQuaternionStart, this._worldScaleStart), this.pointStart.copy(t.point).sub(this.worldPositionStart)), this.dragging = !0, bs.mode = this.mode, this.dispatchEvent(bs);
5519
5524
  }
5520
5525
  }
@@ -5523,23 +5528,23 @@ class Ea extends Ws {
5523
5528
  let a = this.space;
5524
5529
  if (i === "scale" ? a = "local" : (t === "E" || t === "XYZE" || t === "XYZ") && (a = "world"), n === void 0 || t === null || this.dragging === !1 || e !== null && e.button !== -1)
5525
5530
  return;
5526
- e !== null && ze.setFromCamera(e, this.camera);
5527
- const r = Ei(this._plane, ze, !0);
5531
+ e !== null && He.setFromCamera(e, this.camera);
5532
+ const r = Ei(this._plane, He, !0);
5528
5533
  if (r) {
5529
5534
  if (this.pointEnd.copy(r.point).sub(this.worldPositionStart), i === "translate")
5530
5535
  this._offset.copy(this.pointEnd).sub(this.pointStart), a === "local" && t !== "XYZ" && this._offset.applyQuaternion(this._worldQuaternionInv), t.indexOf("X") === -1 && (this._offset.x = 0), t.indexOf("Y") === -1 && (this._offset.y = 0), t.indexOf("Z") === -1 && (this._offset.z = 0), a === "local" && t !== "XYZ" ? this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale) : this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale), n.position.copy(this._offset).add(this._positionStart), this.translationSnap && (a === "local" && (n.position.applyQuaternion(W.copy(this._quaternionStart).invert()), t.search("X") !== -1 && (n.position.x = Math.round(n.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (n.position.y = Math.round(n.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (n.position.z = Math.round(n.position.z / this.translationSnap) * this.translationSnap), n.position.applyQuaternion(this._quaternionStart)), a === "world" && (n.parent && n.position.add(re.setFromMatrixPosition(n.parent.matrixWorld)), t.search("X") !== -1 && (n.position.x = Math.round(n.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (n.position.y = Math.round(n.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (n.position.z = Math.round(n.position.z / this.translationSnap) * this.translationSnap), n.parent && n.position.sub(re.setFromMatrixPosition(n.parent.matrixWorld))));
5531
5536
  else if (i === "scale") {
5532
5537
  if (t.search("XYZ") !== -1) {
5533
5538
  let o = this.pointEnd.length() / this.pointStart.length();
5534
- this.pointEnd.dot(this.pointStart) < 0 && (o *= -1), De.set(o, o, o);
5539
+ this.pointEnd.dot(this.pointStart) < 0 && (o *= -1), Re.set(o, o, o);
5535
5540
  } else
5536
- re.copy(this.pointStart), De.copy(this.pointEnd), re.applyQuaternion(this._worldQuaternionInv), De.applyQuaternion(this._worldQuaternionInv), De.divide(re), t.search("X") === -1 && (De.x = 1), t.search("Y") === -1 && (De.y = 1), t.search("Z") === -1 && (De.z = 1);
5537
- n.scale.copy(this._scaleStart).multiply(De), this.scaleSnap && (t.search("X") !== -1 && (n.scale.x = Math.round(n.scale.x / this.scaleSnap) * this.scaleSnap || this.scaleSnap), t.search("Y") !== -1 && (n.scale.y = Math.round(n.scale.y / this.scaleSnap) * this.scaleSnap || this.scaleSnap), t.search("Z") !== -1 && (n.scale.z = Math.round(n.scale.z / this.scaleSnap) * this.scaleSnap || this.scaleSnap));
5541
+ re.copy(this.pointStart), Re.copy(this.pointEnd), re.applyQuaternion(this._worldQuaternionInv), Re.applyQuaternion(this._worldQuaternionInv), Re.divide(re), t.search("X") === -1 && (Re.x = 1), t.search("Y") === -1 && (Re.y = 1), t.search("Z") === -1 && (Re.z = 1);
5542
+ n.scale.copy(this._scaleStart).multiply(Re), this.scaleSnap && (t.search("X") !== -1 && (n.scale.x = Math.round(n.scale.x / this.scaleSnap) * this.scaleSnap || this.scaleSnap), t.search("Y") !== -1 && (n.scale.y = Math.round(n.scale.y / this.scaleSnap) * this.scaleSnap || this.scaleSnap), t.search("Z") !== -1 && (n.scale.z = Math.round(n.scale.z / this.scaleSnap) * this.scaleSnap || this.scaleSnap));
5538
5543
  } else if (i === "rotate") {
5539
5544
  this._offset.copy(this.pointEnd).sub(this.pointStart);
5540
5545
  const o = 20 / this.worldPosition.distanceTo(re.setFromMatrixPosition(this.camera.matrixWorld));
5541
- let h = !1;
5542
- t === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(re.copy(this.rotationAxis).cross(this.eye)) * o) : (t === "X" || t === "Y" || t === "Z") && (this.rotationAxis.copy(ys[t]), re.copy(ys[t]), a === "local" && re.applyQuaternion(this.worldQuaternion), re.cross(this.eye), re.length() === 0 ? h = !0 : this.rotationAngle = this._offset.dot(re.normalize()) * o), (t === "E" || h) && (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), this.rotationSnap && (this.rotationAngle = Math.round(this.rotationAngle / this.rotationSnap) * this.rotationSnap), a === "local" && t !== "E" && t !== "XYZE" ? (n.quaternion.copy(this._quaternionStart), n.quaternion.multiply(W.setFromAxisAngle(this.rotationAxis, this.rotationAngle)).normalize()) : (this.rotationAxis.applyQuaternion(this._parentQuaternionInv), n.quaternion.copy(W.setFromAxisAngle(this.rotationAxis, this.rotationAngle)), n.quaternion.multiply(this._quaternionStart).normalize());
5546
+ let c = !1;
5547
+ t === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(re.copy(this.rotationAxis).cross(this.eye)) * o) : (t === "X" || t === "Y" || t === "Z") && (this.rotationAxis.copy(ys[t]), re.copy(ys[t]), a === "local" && re.applyQuaternion(this.worldQuaternion), re.cross(this.eye), re.length() === 0 ? c = !0 : this.rotationAngle = this._offset.dot(re.normalize()) * o), (t === "E" || c) && (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), this.rotationSnap && (this.rotationAngle = Math.round(this.rotationAngle / this.rotationSnap) * this.rotationSnap), a === "local" && t !== "E" && t !== "XYZE" ? (n.quaternion.copy(this._quaternionStart), n.quaternion.multiply(W.setFromAxisAngle(this.rotationAxis, this.rotationAngle)).normalize()) : (this.rotationAxis.applyQuaternion(this._parentQuaternionInv), n.quaternion.copy(W.setFromAxisAngle(this.rotationAxis, this.rotationAngle)), n.quaternion.multiply(this._quaternionStart).normalize());
5543
5548
  }
5544
5549
  this.dispatchEvent(bi), this.dispatchEvent(Cs);
5545
5550
  }
@@ -5564,7 +5569,7 @@ class Ea extends Ws {
5564
5569
  this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent(bi), this.dispatchEvent(Cs), this.pointStart.copy(this.pointEnd));
5565
5570
  }
5566
5571
  getRaycaster() {
5567
- return ze;
5572
+ return He;
5568
5573
  }
5569
5574
  // TODO: deprecate
5570
5575
  getMode() {
@@ -5589,7 +5594,7 @@ class Ea extends Ws {
5589
5594
  this.space = e;
5590
5595
  }
5591
5596
  }
5592
- function Ca(s) {
5597
+ function Sa(s) {
5593
5598
  if (this.domElement.ownerDocument.pointerLockElement)
5594
5599
  return {
5595
5600
  x: 0,
@@ -5605,7 +5610,7 @@ function Ca(s) {
5605
5610
  };
5606
5611
  }
5607
5612
  }
5608
- function wa(s) {
5613
+ function xa(s) {
5609
5614
  if (this.enabled)
5610
5615
  switch (s.pointerType) {
5611
5616
  case "mouse":
@@ -5614,13 +5619,13 @@ function wa(s) {
5614
5619
  break;
5615
5620
  }
5616
5621
  }
5617
- function Sa(s) {
5622
+ function Oa(s) {
5618
5623
  this.enabled && (document.pointerLockElement || this.domElement.setPointerCapture(s.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.pointerHover(this._getPointer(s)), this.pointerDown(this._getPointer(s)));
5619
5624
  }
5620
- function xa(s) {
5625
+ function Ta(s) {
5621
5626
  this.enabled && this.pointerMove(this._getPointer(s));
5622
5627
  }
5623
- function Oa(s) {
5628
+ function Ma(s) {
5624
5629
  this.enabled && (this.domElement.releasePointerCapture(s.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.pointerUp(this._getPointer(s)));
5625
5630
  }
5626
5631
  function Ei(s, e, t) {
@@ -5630,8 +5635,8 @@ function Ei(s, e, t) {
5630
5635
  return i[n];
5631
5636
  return !1;
5632
5637
  }
5633
- const Ht = new $s(), B = new O(0, 1, 0), ws = new O(0, 0, 0), Ss = new Kt(), Yt = new fe(), Vt = new fe(), we = new O(), xs = new Kt(), wt = new O(1, 0, 0), Ye = new O(0, 1, 0), St = new O(0, 0, 1), Bt = new O(), bt = new O(), Et = new O();
5634
- class Ta extends ot {
5638
+ const Ht = new $s(), B = new O(0, 1, 0), ws = new O(0, 0, 0), Ss = new Kt(), Yt = new fe(), Vt = new fe(), Se = new O(), xs = new Kt(), St = new O(1, 0, 0), Be = new O(0, 1, 0), xt = new O(0, 0, 1), Bt = new O(), Et = new O(), Ct = new O();
5639
+ class Pa extends lt {
5635
5640
  constructor(e) {
5636
5641
  super(), this.isTransformControlsRoot = !0, this.controls = e, this.visible = !1;
5637
5642
  }
@@ -5641,16 +5646,16 @@ class Ta extends ot {
5641
5646
  t.object !== void 0 && (t.object.updateMatrixWorld(), t.object.parent === null ? console.error("TransformControls: The attached 3D object must be a part of the scene graph.") : t.object.parent.matrixWorld.decompose(t._parentPosition, t._parentQuaternion, t._parentScale), t.object.matrixWorld.decompose(t.worldPosition, t.worldQuaternion, t._worldScale), t._parentQuaternionInv.copy(t._parentQuaternion).invert(), t._worldQuaternionInv.copy(t.worldQuaternion).invert()), t.camera.updateMatrixWorld(), t.camera.matrixWorld.decompose(t.cameraPosition, t.cameraQuaternion, t._cameraScale), t.camera.isOrthographicCamera ? t.camera.getWorldDirection(t.eye).negate() : t.eye.copy(t.cameraPosition).sub(t.worldPosition).normalize(), super.updateMatrixWorld(e);
5642
5647
  }
5643
5648
  }
5644
- class Ma extends ot {
5649
+ class Da extends lt {
5645
5650
  constructor() {
5646
5651
  super(), this.isTransformControlsGizmo = !0, this.type = "TransformControlsGizmo";
5647
- const e = new Ge({
5652
+ const e = new We({
5648
5653
  depthTest: !1,
5649
5654
  depthWrite: !1,
5650
5655
  fog: !1,
5651
5656
  toneMapped: !1,
5652
5657
  transparent: !0
5653
- }), t = new Ri({
5658
+ }), t = new Ai({
5654
5659
  depthTest: !1,
5655
5660
  depthWrite: !1,
5656
5661
  fog: !1,
@@ -5666,14 +5671,14 @@ class Ma extends ot {
5666
5671
  r.color.setHex(65280);
5667
5672
  const o = e.clone();
5668
5673
  o.color.setHex(255);
5669
- const h = e.clone();
5670
- h.color.setHex(16711680), h.opacity = 0.5;
5671
5674
  const c = e.clone();
5672
- c.color.setHex(65280), c.opacity = 0.5;
5675
+ c.color.setHex(16711680), c.opacity = 0.5;
5676
+ const h = e.clone();
5677
+ h.color.setHex(65280), h.opacity = 0.5;
5673
5678
  const u = e.clone();
5674
5679
  u.color.setHex(255), u.opacity = 0.5;
5675
- const m = e.clone();
5676
- m.opacity = 0.25;
5680
+ const p = e.clone();
5681
+ p.opacity = 0.25;
5677
5682
  const _ = e.clone();
5678
5683
  _.color.setHex(16776960), _.opacity = 0.25, e.clone().color.setHex(16776960);
5679
5684
  const S = e.clone();
@@ -5682,17 +5687,17 @@ class Ma extends ot {
5682
5687
  M.translate(0, 0.05, 0);
5683
5688
  const T = new ne(0.08, 0.08, 0.08);
5684
5689
  T.translate(0, 0.04, 0);
5685
- const f = new at();
5686
- f.setAttribute("position", new Be([0, 0, 0, 1, 0, 0], 3));
5690
+ const f = new ot();
5691
+ f.setAttribute("position", new Ze([0, 0, 0, 1, 0, 0], 3));
5687
5692
  const v = new ce(75e-4, 75e-4, 0.5, 3);
5688
5693
  v.translate(0, 0.25, 0);
5689
- function E($, Ie) {
5690
- const le = new dt($, 75e-4, 3, 64, Ie * Math.PI * 2);
5694
+ function E($, Le) {
5695
+ const le = new ut($, 75e-4, 3, 64, Le * Math.PI * 2);
5691
5696
  return le.rotateY(Math.PI / 2), le.rotateX(Math.PI / 2), le;
5692
5697
  }
5693
5698
  function b() {
5694
- const $ = new at();
5695
- return $.setAttribute("position", new Be([0, 0, 0, 1, 1, 1], 3)), $;
5699
+ const $ = new ot();
5700
+ return $.setAttribute("position", new Ze([0, 0, 0, 1, 1, 1], 3)), $;
5696
5701
  }
5697
5702
  const P = {
5698
5703
  X: [
@@ -5711,16 +5716,16 @@ class Ma extends ot {
5711
5716
  [new w(v, o), null, [Math.PI / 2, 0, 0]]
5712
5717
  ],
5713
5718
  XYZ: [
5714
- [new w(new kt(0.1, 0), m.clone()), [0, 0, 0]]
5719
+ [new w(new kt(0.1, 0), p.clone()), [0, 0, 0]]
5715
5720
  ],
5716
5721
  XY: [
5717
5722
  [new w(new ne(0.15, 0.15, 0.01), u.clone()), [0.15, 0.15, 0]]
5718
5723
  ],
5719
5724
  YZ: [
5720
- [new w(new ne(0.15, 0.15, 0.01), h.clone()), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
5725
+ [new w(new ne(0.15, 0.15, 0.01), c.clone()), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
5721
5726
  ],
5722
5727
  XZ: [
5723
- [new w(new ne(0.15, 0.15, 0.01), c.clone()), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
5728
+ [new w(new ne(0.15, 0.15, 0.01), h.clone()), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
5724
5729
  ]
5725
5730
  }, x = {
5726
5731
  X: [
@@ -5755,16 +5760,16 @@ class Ma extends ot {
5755
5760
  [new w(new kt(0.01, 2), n), null, null, null, "helper"]
5756
5761
  ],
5757
5762
  DELTA: [
5758
- [new Se(b(), n), null, null, null, "helper"]
5763
+ [new xe(b(), n), null, null, null, "helper"]
5759
5764
  ],
5760
5765
  X: [
5761
- [new Se(f, n.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
5766
+ [new xe(f, n.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
5762
5767
  ],
5763
5768
  Y: [
5764
- [new Se(f, n.clone()), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]
5769
+ [new xe(f, n.clone()), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]
5765
5770
  ],
5766
5771
  Z: [
5767
- [new Se(f, n.clone()), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]
5772
+ [new xe(f, n.clone()), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]
5768
5773
  ]
5769
5774
  }, X = {
5770
5775
  XYZE: [
@@ -5784,25 +5789,25 @@ class Ma extends ot {
5784
5789
  ]
5785
5790
  }, _e = {
5786
5791
  AXIS: [
5787
- [new Se(f, n.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
5792
+ [new xe(f, n.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
5788
5793
  ]
5789
- }, Pe = {
5794
+ }, De = {
5790
5795
  XYZE: [
5791
5796
  [new w(new Qs(0.25, 10, 8), i)]
5792
5797
  ],
5793
5798
  X: [
5794
- [new w(new dt(0.5, 0.1, 4, 24), i), [0, 0, 0], [0, -Math.PI / 2, -Math.PI / 2]]
5799
+ [new w(new ut(0.5, 0.1, 4, 24), i), [0, 0, 0], [0, -Math.PI / 2, -Math.PI / 2]]
5795
5800
  ],
5796
5801
  Y: [
5797
- [new w(new dt(0.5, 0.1, 4, 24), i), [0, 0, 0], [Math.PI / 2, 0, 0]]
5802
+ [new w(new ut(0.5, 0.1, 4, 24), i), [0, 0, 0], [Math.PI / 2, 0, 0]]
5798
5803
  ],
5799
5804
  Z: [
5800
- [new w(new dt(0.5, 0.1, 4, 24), i), [0, 0, 0], [0, 0, -Math.PI / 2]]
5805
+ [new w(new ut(0.5, 0.1, 4, 24), i), [0, 0, 0], [0, 0, -Math.PI / 2]]
5801
5806
  ],
5802
5807
  E: [
5803
- [new w(new dt(0.75, 0.1, 2, 24), i)]
5808
+ [new w(new ut(0.75, 0.1, 2, 24), i)]
5804
5809
  ]
5805
- }, ct = {
5810
+ }, ht = {
5806
5811
  X: [
5807
5812
  [new w(T, a), [0.5, 0, 0], [0, 0, -Math.PI / 2]],
5808
5813
  [new w(v, a), [0, 0, 0], [0, 0, -Math.PI / 2]],
@@ -5822,15 +5827,15 @@ class Ma extends ot {
5822
5827
  [new w(new ne(0.15, 0.15, 0.01), u), [0.15, 0.15, 0]]
5823
5828
  ],
5824
5829
  YZ: [
5825
- [new w(new ne(0.15, 0.15, 0.01), h), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
5830
+ [new w(new ne(0.15, 0.15, 0.01), c), [0, 0.15, 0.15], [0, Math.PI / 2, 0]]
5826
5831
  ],
5827
5832
  XZ: [
5828
- [new w(new ne(0.15, 0.15, 0.01), c), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
5833
+ [new w(new ne(0.15, 0.15, 0.01), h), [0.15, 0, 0.15], [-Math.PI / 2, 0, 0]]
5829
5834
  ],
5830
5835
  XYZ: [
5831
- [new w(new ne(0.1, 0.1, 0.1), m.clone())]
5836
+ [new w(new ne(0.1, 0.1, 0.1), p.clone())]
5832
5837
  ]
5833
- }, Ve = {
5838
+ }, Xe = {
5834
5839
  X: [
5835
5840
  [new w(new ce(0.2, 0, 0.6, 4), i), [0.3, 0, 0], [0, 0, -Math.PI / 2]],
5836
5841
  [new w(new ce(0.2, 0, 0.6, 4), i), [-0.3, 0, 0], [0, 0, Math.PI / 2]]
@@ -5857,27 +5862,27 @@ class Ma extends ot {
5857
5862
  ]
5858
5863
  }, me = {
5859
5864
  X: [
5860
- [new Se(f, n.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
5865
+ [new xe(f, n.clone()), [-1e3, 0, 0], null, [1e6, 1, 1], "helper"]
5861
5866
  ],
5862
5867
  Y: [
5863
- [new Se(f, n.clone()), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]
5868
+ [new xe(f, n.clone()), [0, -1e3, 0], [0, 0, Math.PI / 2], [1e6, 1, 1], "helper"]
5864
5869
  ],
5865
5870
  Z: [
5866
- [new Se(f, n.clone()), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]
5871
+ [new xe(f, n.clone()), [0, 0, -1e3], [0, -Math.PI / 2, 0], [1e6, 1, 1], "helper"]
5867
5872
  ]
5868
5873
  };
5869
5874
  function te($) {
5870
- const Ie = new ot();
5875
+ const Le = new lt();
5871
5876
  for (const le in $)
5872
- for (let Oe = $[le].length; Oe--; ) {
5873
- const se = $[le][Oe][0].clone(), Le = $[le][Oe][1], ke = $[le][Oe][2], Ue = $[le][Oe][3], Mt = $[le][Oe][4];
5874
- se.name = le, se.tag = Mt, Le && se.position.set(Le[0], Le[1], Le[2]), ke && se.rotation.set(ke[0], ke[1], ke[2]), Ue && se.scale.set(Ue[0], Ue[1], Ue[2]), se.updateMatrix();
5877
+ for (let Te = $[le].length; Te--; ) {
5878
+ const se = $[le][Te][0].clone(), ke = $[le][Te][1], Ue = $[le][Te][2], je = $[le][Te][3], Mt = $[le][Te][4];
5879
+ se.name = le, se.tag = Mt, ke && se.position.set(ke[0], ke[1], ke[2]), Ue && se.rotation.set(Ue[0], Ue[1], Ue[2]), je && se.scale.set(je[0], je[1], je[2]), se.updateMatrix();
5875
5880
  const Pt = se.geometry.clone();
5876
- Pt.applyMatrix4(se.matrix), se.geometry = Pt, se.renderOrder = 1 / 0, se.position.set(0, 0, 0), se.rotation.set(0, 0, 0), se.scale.set(1, 1, 1), Ie.add(se);
5881
+ Pt.applyMatrix4(se.matrix), se.geometry = Pt, se.renderOrder = 1 / 0, se.position.set(0, 0, 0), se.rotation.set(0, 0, 0), se.scale.set(1, 1, 1), Le.add(se);
5877
5882
  }
5878
- return Ie;
5883
+ return Le;
5879
5884
  }
5880
- this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = te(P)), this.add(this.gizmo.rotate = te(X)), this.add(this.gizmo.scale = te(ct)), this.add(this.picker.translate = te(x)), this.add(this.picker.rotate = te(Pe)), this.add(this.picker.scale = te(Ve)), this.add(this.helper.translate = te(j)), this.add(this.helper.rotate = te(_e)), this.add(this.helper.scale = te(me)), this.picker.translate.visible = !1, this.picker.rotate.visible = !1, this.picker.scale.visible = !1;
5885
+ this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = te(P)), this.add(this.gizmo.rotate = te(X)), this.add(this.gizmo.scale = te(ht)), this.add(this.picker.translate = te(x)), this.add(this.picker.rotate = te(De)), this.add(this.picker.scale = te(Xe)), this.add(this.helper.translate = te(j)), this.add(this.helper.rotate = te(_e)), this.add(this.helper.scale = te(me)), this.picker.translate.visible = !1, this.picker.rotate.visible = !1, this.picker.scale.visible = !1;
5881
5886
  }
5882
5887
  // updateMatrixWorld will update transformations and appearance of individual handles
5883
5888
  updateMatrixWorld(e) {
@@ -5890,58 +5895,58 @@ class Ma extends ot {
5890
5895
  r.visible = !0, r.rotation.set(0, 0, 0), r.position.copy(this.worldPosition);
5891
5896
  let o;
5892
5897
  if (this.camera.isOrthographicCamera ? o = (this.camera.top - this.camera.bottom) / this.camera.zoom : o = this.worldPosition.distanceTo(this.cameraPosition) * Math.min(1.9 * Math.tan(Math.PI * this.camera.fov / 360) / this.camera.zoom, 7), r.scale.set(1, 1, 1).multiplyScalar(o * this.size / 4), r.tag === "helper") {
5893
- r.visible = !1, r.name === "AXIS" ? (r.visible = !!this.axis, this.axis === "X" && (W.setFromEuler(Ht.set(0, 0, 0)), r.quaternion.copy(i).multiply(W), Math.abs(B.copy(wt).applyQuaternion(i).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "Y" && (W.setFromEuler(Ht.set(0, 0, Math.PI / 2)), r.quaternion.copy(i).multiply(W), Math.abs(B.copy(Ye).applyQuaternion(i).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "Z" && (W.setFromEuler(Ht.set(0, Math.PI / 2, 0)), r.quaternion.copy(i).multiply(W), Math.abs(B.copy(St).applyQuaternion(i).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "XYZE" && (W.setFromEuler(Ht.set(0, Math.PI / 2, 0)), B.copy(this.rotationAxis), r.quaternion.setFromRotationMatrix(Ss.lookAt(ws, B, Ye)), r.quaternion.multiply(W), r.visible = this.dragging), this.axis === "E" && (r.visible = !1)) : r.name === "START" ? (r.position.copy(this.worldPositionStart), r.visible = this.dragging) : r.name === "END" ? (r.position.copy(this.worldPosition), r.visible = this.dragging) : r.name === "DELTA" ? (r.position.copy(this.worldPositionStart), r.quaternion.copy(this.worldQuaternionStart), re.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), re.applyQuaternion(this.worldQuaternionStart.clone().invert()), r.scale.copy(re), r.visible = this.dragging) : (r.quaternion.copy(i), this.dragging ? r.position.copy(this.worldPositionStart) : r.position.copy(this.worldPosition), this.axis && (r.visible = this.axis.search(r.name) !== -1));
5898
+ r.visible = !1, r.name === "AXIS" ? (r.visible = !!this.axis, this.axis === "X" && (W.setFromEuler(Ht.set(0, 0, 0)), r.quaternion.copy(i).multiply(W), Math.abs(B.copy(St).applyQuaternion(i).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "Y" && (W.setFromEuler(Ht.set(0, 0, Math.PI / 2)), r.quaternion.copy(i).multiply(W), Math.abs(B.copy(Be).applyQuaternion(i).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "Z" && (W.setFromEuler(Ht.set(0, Math.PI / 2, 0)), r.quaternion.copy(i).multiply(W), Math.abs(B.copy(xt).applyQuaternion(i).dot(this.eye)) > 0.9 && (r.visible = !1)), this.axis === "XYZE" && (W.setFromEuler(Ht.set(0, Math.PI / 2, 0)), B.copy(this.rotationAxis), r.quaternion.setFromRotationMatrix(Ss.lookAt(ws, B, Be)), r.quaternion.multiply(W), r.visible = this.dragging), this.axis === "E" && (r.visible = !1)) : r.name === "START" ? (r.position.copy(this.worldPositionStart), r.visible = this.dragging) : r.name === "END" ? (r.position.copy(this.worldPosition), r.visible = this.dragging) : r.name === "DELTA" ? (r.position.copy(this.worldPositionStart), r.quaternion.copy(this.worldQuaternionStart), re.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), re.applyQuaternion(this.worldQuaternionStart.clone().invert()), r.scale.copy(re), r.visible = this.dragging) : (r.quaternion.copy(i), this.dragging ? r.position.copy(this.worldPositionStart) : r.position.copy(this.worldPosition), this.axis && (r.visible = this.axis.search(r.name) !== -1));
5894
5899
  continue;
5895
5900
  }
5896
- r.quaternion.copy(i), this.mode === "translate" || this.mode === "scale" ? (r.name === "X" && Math.abs(B.copy(wt).applyQuaternion(i).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Y" && Math.abs(B.copy(Ye).applyQuaternion(i).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Z" && Math.abs(B.copy(St).applyQuaternion(i).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XY" && Math.abs(B.copy(St).applyQuaternion(i).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "YZ" && Math.abs(B.copy(wt).applyQuaternion(i).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XZ" && Math.abs(B.copy(Ye).applyQuaternion(i).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1)) : this.mode === "rotate" && (Yt.copy(i), B.copy(this.eye).applyQuaternion(W.copy(i).invert()), r.name.search("E") !== -1 && r.quaternion.setFromRotationMatrix(Ss.lookAt(this.eye, ws, Ye)), r.name === "X" && (W.setFromAxisAngle(wt, Math.atan2(-B.y, B.z)), W.multiplyQuaternions(Yt, W), r.quaternion.copy(W)), r.name === "Y" && (W.setFromAxisAngle(Ye, Math.atan2(B.x, B.z)), W.multiplyQuaternions(Yt, W), r.quaternion.copy(W)), r.name === "Z" && (W.setFromAxisAngle(St, Math.atan2(B.y, B.x)), W.multiplyQuaternions(Yt, W), r.quaternion.copy(W))), r.visible = r.visible && (r.name.indexOf("X") === -1 || this.showX), r.visible = r.visible && (r.name.indexOf("Y") === -1 || this.showY), r.visible = r.visible && (r.name.indexOf("Z") === -1 || this.showZ), r.visible = r.visible && (r.name.indexOf("E") === -1 || this.showX && this.showY && this.showZ), r.material._color = r.material._color || r.material.color.clone(), r.material._opacity = r.material._opacity || r.material.opacity, r.material.color.copy(r.material._color), r.material.opacity = r.material._opacity, this.enabled && this.axis && (r.name === this.axis || this.axis.split("").some(function(h) {
5897
- return r.name === h;
5901
+ r.quaternion.copy(i), this.mode === "translate" || this.mode === "scale" ? (r.name === "X" && Math.abs(B.copy(St).applyQuaternion(i).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Y" && Math.abs(B.copy(Be).applyQuaternion(i).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Z" && Math.abs(B.copy(xt).applyQuaternion(i).dot(this.eye)) > 0.99 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XY" && Math.abs(B.copy(xt).applyQuaternion(i).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "YZ" && Math.abs(B.copy(St).applyQuaternion(i).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XZ" && Math.abs(B.copy(Be).applyQuaternion(i).dot(this.eye)) < 0.2 && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1)) : this.mode === "rotate" && (Yt.copy(i), B.copy(this.eye).applyQuaternion(W.copy(i).invert()), r.name.search("E") !== -1 && r.quaternion.setFromRotationMatrix(Ss.lookAt(this.eye, ws, Be)), r.name === "X" && (W.setFromAxisAngle(St, Math.atan2(-B.y, B.z)), W.multiplyQuaternions(Yt, W), r.quaternion.copy(W)), r.name === "Y" && (W.setFromAxisAngle(Be, Math.atan2(B.x, B.z)), W.multiplyQuaternions(Yt, W), r.quaternion.copy(W)), r.name === "Z" && (W.setFromAxisAngle(xt, Math.atan2(B.y, B.x)), W.multiplyQuaternions(Yt, W), r.quaternion.copy(W))), r.visible = r.visible && (r.name.indexOf("X") === -1 || this.showX), r.visible = r.visible && (r.name.indexOf("Y") === -1 || this.showY), r.visible = r.visible && (r.name.indexOf("Z") === -1 || this.showZ), r.visible = r.visible && (r.name.indexOf("E") === -1 || this.showX && this.showY && this.showZ), r.material._color = r.material._color || r.material.color.clone(), r.material._opacity = r.material._opacity || r.material.opacity, r.material.color.copy(r.material._color), r.material.opacity = r.material._opacity, this.enabled && this.axis && (r.name === this.axis || this.axis.split("").some(function(c) {
5902
+ return r.name === c;
5898
5903
  })) && (r.material.color.setHex(16776960), r.material.opacity = 1);
5899
5904
  }
5900
5905
  super.updateMatrixWorld(e);
5901
5906
  }
5902
5907
  }
5903
- class Pa extends w {
5908
+ class Ra extends w {
5904
5909
  constructor() {
5905
5910
  super(
5906
5911
  new Xs(1e5, 1e5, 2, 2),
5907
- new Ge({ visible: !1, wireframe: !0, side: Di, transparent: !0, opacity: 0.1, toneMapped: !1 })
5912
+ new We({ visible: !1, wireframe: !0, side: Ri, transparent: !0, opacity: 0.1, toneMapped: !1 })
5908
5913
  ), this.isTransformControlsPlane = !0, this.type = "TransformControlsPlane";
5909
5914
  }
5910
5915
  updateMatrixWorld(e) {
5911
5916
  let t = this.space;
5912
- switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"), Bt.copy(wt).applyQuaternion(t === "local" ? this.worldQuaternion : Vt), bt.copy(Ye).applyQuaternion(t === "local" ? this.worldQuaternion : Vt), Et.copy(St).applyQuaternion(t === "local" ? this.worldQuaternion : Vt), B.copy(bt), this.mode) {
5917
+ switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"), Bt.copy(St).applyQuaternion(t === "local" ? this.worldQuaternion : Vt), Et.copy(Be).applyQuaternion(t === "local" ? this.worldQuaternion : Vt), Ct.copy(xt).applyQuaternion(t === "local" ? this.worldQuaternion : Vt), B.copy(Et), this.mode) {
5913
5918
  case "translate":
5914
5919
  case "scale":
5915
5920
  switch (this.axis) {
5916
5921
  case "X":
5917
- B.copy(this.eye).cross(Bt), we.copy(Bt).cross(B);
5922
+ B.copy(this.eye).cross(Bt), Se.copy(Bt).cross(B);
5918
5923
  break;
5919
5924
  case "Y":
5920
- B.copy(this.eye).cross(bt), we.copy(bt).cross(B);
5925
+ B.copy(this.eye).cross(Et), Se.copy(Et).cross(B);
5921
5926
  break;
5922
5927
  case "Z":
5923
- B.copy(this.eye).cross(Et), we.copy(Et).cross(B);
5928
+ B.copy(this.eye).cross(Ct), Se.copy(Ct).cross(B);
5924
5929
  break;
5925
5930
  case "XY":
5926
- we.copy(Et);
5931
+ Se.copy(Ct);
5927
5932
  break;
5928
5933
  case "YZ":
5929
- we.copy(Bt);
5934
+ Se.copy(Bt);
5930
5935
  break;
5931
5936
  case "XZ":
5932
- B.copy(Et), we.copy(bt);
5937
+ B.copy(Ct), Se.copy(Et);
5933
5938
  break;
5934
5939
  case "XYZ":
5935
5940
  case "E":
5936
- we.set(0, 0, 0);
5941
+ Se.set(0, 0, 0);
5937
5942
  break;
5938
5943
  }
5939
5944
  break;
5940
5945
  case "rotate":
5941
5946
  default:
5942
- we.set(0, 0, 0);
5947
+ Se.set(0, 0, 0);
5943
5948
  }
5944
- we.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (xs.lookAt(re.set(0, 0, 0), we, B), this.quaternion.setFromRotationMatrix(xs)), super.updateMatrixWorld(e);
5949
+ Se.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (xs.lookAt(re.set(0, 0, 0), Se, B), this.quaternion.setFromRotationMatrix(xs)), super.updateMatrixWorld(e);
5945
5950
  }
5946
5951
  }
5947
5952
  class pe extends Ds {
@@ -5965,12 +5970,12 @@ class pe extends Ds {
5965
5970
  let t = this.controls.get(e);
5966
5971
  if (t === void 0) {
5967
5972
  const i = document.querySelector(".clickable");
5968
- t = new Ea(this.activeCamera, i), t.getHelper().name = e, t.setSpace("local"), this.controls.set(e, t), this.visibility.set(e, !0), t.addEventListener("mouseDown", () => {
5973
+ t = new wa(this.activeCamera, i), t.getHelper().name = e, t.setSpace("local"), this.controls.set(e, t), this.visibility.set(e, !0), t.addEventListener("mouseDown", () => {
5969
5974
  this.dispatchEvent({ type: pe.DRAG_START });
5970
5975
  }), t.addEventListener("mouseUp", () => {
5971
5976
  this.dispatchEvent({ type: pe.DRAG_END });
5972
5977
  }), t.addEventListener("dragging-changed", (a) => {
5973
- Me.instance?.toggleOrbitControls(a.value);
5978
+ Pe.instance?.toggleOrbitControls(a.value);
5974
5979
  });
5975
5980
  const n = `Controls: ${e}`;
5976
5981
  this.groups.push(n), this.three.addGroup({
@@ -6052,7 +6057,7 @@ class pe extends Ds {
6052
6057
  }
6053
6058
  remove(e) {
6054
6059
  const t = this.get(e);
6055
- return t === void 0 ? !1 : (t.detach(), t.disconnect(), We(t.getHelper()), this.controls.delete(e), !0);
6060
+ return t === void 0 ? !1 : (t.detach(), t.disconnect(), Ve(t.getHelper()), this.controls.delete(e), !0);
6056
6061
  }
6057
6062
  enabled(e) {
6058
6063
  this.controls.forEach((t) => {
@@ -6080,9 +6085,9 @@ class pe extends Ds {
6080
6085
  return pe._instance || (pe._instance = new pe()), pe._instance;
6081
6086
  }
6082
6087
  }
6083
- const Da = new ne(), Ci = new ae();
6084
- class Os extends ot {
6085
- curve = new Qi();
6088
+ const Aa = new ne(), Ci = new ae();
6089
+ class Os extends lt {
6090
+ curve = new qi();
6086
6091
  line;
6087
6092
  draggable;
6088
6093
  curvePos;
@@ -6098,12 +6103,12 @@ class Os extends ot {
6098
6103
  _draggableScale = 10;
6099
6104
  _transform;
6100
6105
  raycaster;
6101
- draggedMat = new Ge();
6106
+ draggedMat = new We();
6102
6107
  parentGroup;
6103
6108
  group;
6104
6109
  constructor(e, t) {
6105
- const i = new Tt(Ke(0.5, 1, Math.random()), Ke(0.5, 1, Math.random()), Ke(0.5, 1, Math.random()));
6106
- super(), this.name = e, this.lineMaterial = new Ri({ color: i }), this.line = new Se(new at(), this.lineMaterial), this.line.name = "line", this.add(this.line), this._camera = t, this.curveType = "catmullrom", this.draggedMat.color = i, this.draggable = new ot(), this.draggable.name = "draggablePoints", this.add(this.draggable), this.curvePos = new w(new Qs(1.5), new Ge({ color: i })), this.curvePos.name = "curvePos", this.curvePos.scale.setScalar(this._draggableScale), this.curvePos.visible = !1, this.add(this.curvePos), this.raycaster = new Xt(), this.raycaster.params.Line.threshold = 3, this.enable();
6110
+ const i = new Tt(Je(0.5, 1, Math.random()), Je(0.5, 1, Math.random()), Je(0.5, 1, Math.random()));
6111
+ super(), this.name = e, this.lineMaterial = new Ai({ color: i }), this.line = new xe(new ot(), this.lineMaterial), this.line.name = "line", this.add(this.line), this._camera = t, this.curveType = "catmullrom", this.draggedMat.color = i, this.draggable = new lt(), this.draggable.name = "draggablePoints", this.add(this.draggable), this.curvePos = new w(new Qs(1.5), new We({ color: i })), this.curvePos.name = "curvePos", this.curvePos.scale.setScalar(this._draggableScale), this.curvePos.visible = !1, this.add(this.curvePos), this.raycaster = new Xt(), this.raycaster.params.Line.threshold = 3, this.enable();
6107
6112
  }
6108
6113
  enable() {
6109
6114
  document.addEventListener("pointerdown", this.onMouseClick);
@@ -6120,7 +6125,7 @@ class Os extends ot {
6120
6125
  exportSpline = () => {
6121
6126
  const e = [];
6122
6127
  this.draggable.children.forEach((t) => {
6123
- e.push([Ot(t.position.x, 3), Ot(t.position.y, 3), Ot(t.position.z, 3)]);
6128
+ e.push([be(t.position.x, 3), be(t.position.y, 3), be(t.position.z, 3)]);
6124
6129
  }), pr({
6125
6130
  name: this.name,
6126
6131
  points: e,
@@ -6144,14 +6149,14 @@ class Os extends ot {
6144
6149
  this.addPoint(new O(-50, 0, 0), !1), this.addPoint(new O(50, 0, 0));
6145
6150
  };
6146
6151
  addPoint = (e, t = !0) => {
6147
- const i = this.draggable.children.length, n = new w(Da, this.draggedMat);
6152
+ const i = this.draggable.children.length, n = new w(Aa, this.draggedMat);
6148
6153
  return n.name = `point_${i}`, n.position.copy(e), n.scale.setScalar(this._draggableScale), this.draggable.add(n), t && this.updateSpline(), n;
6149
6154
  };
6150
6155
  addNextPt = () => {
6151
6156
  const e = this.draggable.children.length, t = new O(
6152
- Ke(-this.offset, this.offset, Math.random()),
6153
- Ke(-this.offset, this.offset, Math.random()),
6154
- Ke(-this.offset, this.offset, Math.random())
6157
+ Je(-this.offset, this.offset, Math.random()),
6158
+ Je(-this.offset, this.offset, Math.random()),
6159
+ Je(-this.offset, this.offset, Math.random())
6155
6160
  );
6156
6161
  e > 0 && t.add(this.draggable.children[e - 1].position);
6157
6162
  const i = this.addPoint(t);
@@ -6163,7 +6168,7 @@ class Os extends ot {
6163
6168
  const t = this.draggable.children[this.draggable.children.length - 1];
6164
6169
  this._transform?.attach(t), this.group.current?.setField("Current Point", t.position);
6165
6170
  }
6166
- We(e), this.updateSpline();
6171
+ Ve(e), this.updateSpline();
6167
6172
  };
6168
6173
  removePointAt = (e) => {
6169
6174
  const t = this.draggable.children[e];
@@ -6173,13 +6178,13 @@ class Os extends ot {
6173
6178
  this._transform?.object !== void 0 && this.removePoint(this._transform?.object);
6174
6179
  };
6175
6180
  updateSpline = () => {
6176
- this.curve = new Qi(this.points, this.closed, this.curveType, this.tension), this.line.geometry.setFromPoints(this.getPoints()), this.curvePos.position.copy(this.getPointAt(this._curvePercentage));
6181
+ this.curve = new qi(this.points, this.closed, this.curveType, this.tension), this.line.geometry.setFromPoints(this.getPoints()), this.curvePos.position.copy(this.getPointAt(this._curvePercentage));
6177
6182
  };
6178
6183
  // Handlers
6179
6184
  onMouseClick = (e) => {
6180
- if (!Me.instance)
6185
+ if (!Pe.instance || this._transform && !this._transform.getHelper().visible)
6181
6186
  return;
6182
- const i = Me.instance.currentWindow.current.getBoundingClientRect();
6187
+ const i = Pe.instance.currentWindow.current.getBoundingClientRect();
6183
6188
  Ci.x = (e.clientX - i.x) / i.width * 2 - 1, Ci.y = -((e.clientY - i.y) / i.height) * 2 + 1, this.raycaster.setFromCamera(Ci, this.camera);
6184
6189
  const n = this.raycaster.intersectObjects(this.draggable.children, !1);
6185
6190
  if (n.length > 0) {
@@ -6234,7 +6239,7 @@ class Os extends ot {
6234
6239
  };
6235
6240
  initDebug(e) {
6236
6241
  const t = this.draggable.children;
6237
- this.parentGroup = e, this._transform = pe.instance.add(this.name), this._transform.camera = this._camera, this._transform.addEventListener("objectChange", this.onUpdateTransform), this._transform.attach(t.length > 0 ? t[t.length - 1] : this), Me.instance?.scene.add(this._transform.getHelper());
6242
+ this.parentGroup = e, this._transform = pe.instance.add(this.name), this._transform.camera = this._camera, this._transform.addEventListener("objectChange", this.onUpdateTransform), this._transform.attach(t.length > 0 ? t[t.length - 1] : this), Pe.instance?.scene.add(this._transform.getHelper());
6238
6243
  const i = t.length > 0 ? t[t.length - 1].position : { x: 0, y: 0, z: 0 };
6239
6244
  this.group = e.addGroup({
6240
6245
  title: this.name,
@@ -6321,6 +6326,10 @@ class Os extends ot {
6321
6326
  step: 0.01,
6322
6327
  value: 0
6323
6328
  },
6329
+ {
6330
+ prop: "Toggle Transform",
6331
+ type: "button"
6332
+ },
6324
6333
  {
6325
6334
  prop: "Add Point",
6326
6335
  type: "button"
@@ -6378,6 +6387,9 @@ class Os extends ot {
6378
6387
  case "Show Points":
6379
6388
  this.draggable.visible = a;
6380
6389
  break;
6390
+ case "Toggle Transform":
6391
+ this._transform && (this._transform.getHelper().visible = !this._transform.getHelper().visible);
6392
+ break;
6381
6393
  case "Add Point":
6382
6394
  this.addNextPt();
6383
6395
  break;
@@ -6388,7 +6400,7 @@ class Os extends ot {
6388
6400
  this.exportSpline();
6389
6401
  break;
6390
6402
  case "Delete":
6391
- We(this);
6403
+ Ve(this);
6392
6404
  break;
6393
6405
  case "Current Point":
6394
6406
  if (this.group.current && this._transform?.object) {
@@ -6407,7 +6419,7 @@ class Os extends ot {
6407
6419
  };
6408
6420
  }
6409
6421
  let Zt = 0;
6410
- class Ra extends ot {
6422
+ class Ia extends lt {
6411
6423
  defaultScale = 10;
6412
6424
  _camera;
6413
6425
  group = null;
@@ -6509,7 +6521,7 @@ const Ts = [
6509
6521
  "Stacked",
6510
6522
  "Quad"
6511
6523
  ];
6512
- class Me extends Jt {
6524
+ class Pe extends Jt {
6513
6525
  static instance = null;
6514
6526
  scene = new Ps();
6515
6527
  renderer;
@@ -6522,17 +6534,17 @@ class Me extends Jt {
6522
6534
  cameraHelpers = /* @__PURE__ */ new Map();
6523
6535
  lightHelpers = /* @__PURE__ */ new Map();
6524
6536
  helpersContainer = new Kn();
6525
- grid = new ga();
6526
- axisHelper = new qi(500);
6527
- interactionHelper = new qi(100);
6537
+ grid = new ya();
6538
+ axisHelper = new Ki(500);
6539
+ interactionHelper = new Ki(100);
6528
6540
  currentTransform;
6529
6541
  // Tools
6530
6542
  splineEditor;
6531
6543
  // Override Materials
6532
6544
  depthMaterial = new Jn();
6533
6545
  normalsMaterial = new er();
6534
- uvMaterial = new ba();
6535
- wireframeMaterial = new Ge({
6546
+ uvMaterial = new Ca();
6547
+ wireframeMaterial = new We({
6536
6548
  opacity: 0.33,
6537
6549
  transparent: !0,
6538
6550
  wireframe: !0
@@ -6566,7 +6578,7 @@ class Me extends Jt {
6566
6578
  blWindow;
6567
6579
  brWindow;
6568
6580
  constructor(e) {
6569
- super(e), this.canvasRef = Ae(), this.containerRef = Ae(), this.tlWindow = Ae(), this.trWindow = Ae(), this.blWindow = Ae(), this.brWindow = Ae();
6581
+ super(e), this.canvasRef = Ie(), this.containerRef = Ie(), this.tlWindow = Ie(), this.trWindow = Ie(), this.blWindow = Ie(), this.brWindow = Ie();
6570
6582
  const t = e.three.app.appID, i = localStorage, n = i.getItem(`${t}_mode`);
6571
6583
  this.state = {
6572
6584
  mode: n !== null ? n : "Single",
@@ -6587,7 +6599,7 @@ class Me extends Jt {
6587
6599
  Sphere: dr,
6588
6600
  Raycaster: Xt
6589
6601
  };
6590
- xe.install({ THREE: a }), this.setupScene(), this.setupTools(), Me.instance = this;
6602
+ Oe.install({ THREE: a }), this.setupScene(), this.setupTools(), Pe.instance = this;
6591
6603
  }
6592
6604
  componentDidMount() {
6593
6605
  this.setupRenderer(), this.enable(), this.assignControls(), this.resize(), this.play(), pe.instance.three = this.props.three, pe.instance.activeCamera = this.debugCamera;
@@ -6792,7 +6804,7 @@ class Me extends Jt {
6792
6804
  this.tlCam = this.cameras.get(t.getItem(`${i}_tlCam`)), this.trCam = this.cameras.get(t.getItem(`${i}_trCam`)), this.blCam = this.cameras.get(t.getItem(`${i}_blCam`)), this.brCam = this.cameras.get(t.getItem(`${i}_brCam`)), this.tlCam === void 0 && (this.tlCam = this.cameras.get("Debug")), this.trCam === void 0 && (this.trCam = this.cameras.get("Orthographic")), this.blCam === void 0 && (this.blCam = this.cameras.get("Front")), this.brCam === void 0 && (this.brCam = this.cameras.get("Top"));
6793
6805
  }
6794
6806
  setupTools() {
6795
- this.splineEditor = new Ra(this.currentCamera), this.splineEditor.initDebug(), this.scene.add(this.splineEditor);
6807
+ this.splineEditor = new Ia(this.currentCamera), this.splineEditor.initDebug(), this.scene.add(this.splineEditor);
6796
6808
  }
6797
6809
  // Public
6798
6810
  play() {
@@ -6864,7 +6876,7 @@ class Me extends Jt {
6864
6876
  });
6865
6877
  };
6866
6878
  sceneUpdate = (e) => {
6867
- this.helpersContainer.add(this.axisHelper), this.clearLightHelpers(), this.scene.remove(this.currentScene), We(this.currentScene);
6879
+ this.helpersContainer.add(this.axisHelper), this.clearLightHelpers(), this.scene.remove(this.currentScene), Ve(this.currentScene);
6868
6880
  const t = this.props.scenes.get(e.value.name);
6869
6881
  if (t !== void 0) {
6870
6882
  const i = new t();
@@ -6887,27 +6899,27 @@ class Me extends Jt {
6887
6899
  const t = new ae();
6888
6900
  this.renderer.getSize(t);
6889
6901
  const i = Math.min(e.clientX, t.x), n = Math.min(e.clientY, t.y);
6890
- this.pointer.x = qe(i, 0, t.x, -1, 1), this.pointer.y = qe(n, 0, t.y, 1, -1);
6902
+ this.pointer.x = Ke(i, 0, t.x, -1, 1), this.pointer.y = Ke(n, 0, t.y, 1, -1);
6891
6903
  const a = t.x / 2, r = t.y / 2, o = () => {
6892
- i < a ? this.pointer.x = qe(i, 0, a, -1, 1) : this.pointer.x = qe(i, a, t.x, -1, 1);
6893
- }, h = () => {
6894
- n < r ? this.pointer.y = qe(n, 0, r, 1, -1) : this.pointer.y = qe(n, r, t.y, 1, -1);
6904
+ i < a ? this.pointer.x = Ke(i, 0, a, -1, 1) : this.pointer.x = Ke(i, a, t.x, -1, 1);
6905
+ }, c = () => {
6906
+ n < r ? this.pointer.y = Ke(n, 0, r, 1, -1) : this.pointer.y = Ke(n, r, t.y, 1, -1);
6895
6907
  };
6896
6908
  switch (this.state.mode) {
6897
6909
  case "Quad":
6898
- o(), h();
6910
+ o(), c();
6899
6911
  break;
6900
6912
  case "Side by Side":
6901
6913
  o();
6902
6914
  break;
6903
6915
  case "Stacked":
6904
- h(), h();
6916
+ c(), c();
6905
6917
  break;
6906
6918
  }
6907
6919
  if (this.updateCamera(i, n, a, r), this.state.interactionMode === "Orbit")
6908
6920
  return;
6909
- const c = this.raycaster.intersectObjects(this.currentScene.children);
6910
- c.length > 0 && this.interactionHelper.position.copy(c[0].point);
6921
+ const h = this.raycaster.intersectObjects(this.currentScene.children);
6922
+ h.length > 0 && this.interactionHelper.position.copy(h[0].point);
6911
6923
  };
6912
6924
  onClick = (e) => {
6913
6925
  if (this.state.interactionMode === "Orbit")
@@ -6925,7 +6937,7 @@ class Me extends Jt {
6925
6937
  if (this.currentCamera.name === "UI")
6926
6938
  return;
6927
6939
  const t = this.controls.get(this.currentCamera.name);
6928
- e.key === "0" ? (this.clearControls(), this.cameraControls = new xe(this.currentCamera, this.currentWindow.current), this.selectedItem instanceof w || this.selectedItem instanceof sr ? (this.selectedItem.geometry.computeBoundingBox(), this.cameraControls.fitToBox(this.selectedItem.geometry.boundingBox, !0)) : this.cameraControls.fitToSphere(this.selectedItem, !0), this.updateCameraControls(t, !0)) : e.key === "1" ? (this.clearControls(), this.cameraControls = new xe(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(0, Math.PI * 0.5, !0), this.cameraControls.moveTo(this.selectedItem.position.x, this.selectedItem.position.y, 0, !0), this.updateCameraControls(t)) : e.key === "2" ? (this.clearControls(), this.cameraControls = new xe(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(0, 0, !0), this.cameraControls.moveTo(this.selectedItem.position.x, 0, this.selectedItem.position.z, !0), this.updateCameraControls(t)) : e.key === "3" ? (this.clearControls(), this.cameraControls = new xe(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(Math.PI / 2, Math.PI / 2, !0), this.cameraControls.moveTo(0, this.selectedItem.position.y, this.selectedItem.position.z, !0), this.updateCameraControls(t)) : e.key === "4" ? (this.clearControls(), this.cameraControls = new xe(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(Math.PI, Math.PI / 2, !0), this.cameraControls.moveTo(this.selectedItem.position.x, this.selectedItem.position.y, 0, !0), this.updateCameraControls(t)) : e.key === "5" && (this.clearControls(), this.cameraControls = new xe(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(hs(45), hs(45), !0), this.updateCameraControls(t));
6940
+ e.key === "0" ? (this.clearControls(), this.cameraControls = new Oe(this.currentCamera, this.currentWindow.current), this.selectedItem instanceof w || this.selectedItem instanceof sr ? (this.selectedItem.geometry.computeBoundingBox(), this.cameraControls.fitToBox(this.selectedItem.geometry.boundingBox, !0)) : this.cameraControls.fitToSphere(this.selectedItem, !0), this.updateCameraControls(t, !0)) : e.key === "1" ? (this.clearControls(), this.cameraControls = new Oe(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(0, Math.PI * 0.5, !0), this.cameraControls.moveTo(this.selectedItem.position.x, this.selectedItem.position.y, 0, !0), this.updateCameraControls(t)) : e.key === "2" ? (this.clearControls(), this.cameraControls = new Oe(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(0, 0, !0), this.cameraControls.moveTo(this.selectedItem.position.x, 0, this.selectedItem.position.z, !0), this.updateCameraControls(t)) : e.key === "3" ? (this.clearControls(), this.cameraControls = new Oe(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(Math.PI / 2, Math.PI / 2, !0), this.cameraControls.moveTo(0, this.selectedItem.position.y, this.selectedItem.position.z, !0), this.updateCameraControls(t)) : e.key === "4" ? (this.clearControls(), this.cameraControls = new Oe(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(Math.PI, Math.PI / 2, !0), this.cameraControls.moveTo(this.selectedItem.position.x, this.selectedItem.position.y, 0, !0), this.updateCameraControls(t)) : e.key === "5" && (this.clearControls(), this.cameraControls = new Oe(this.currentCamera, this.currentWindow.current), this.cameraControls.rotateTo(Pi(45), Pi(45), !0), this.updateCameraControls(t));
6929
6941
  } else if (this.currentTransform !== void 0)
6930
6942
  switch (e.key) {
6931
6943
  case "r":
@@ -6968,7 +6980,7 @@ class Me extends Jt {
6968
6980
  t = new ar(e, 250), t.name = `${e.name}Helper`, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
6969
6981
  break;
6970
6982
  case "RectAreaLight":
6971
- t = new qr(e), t.name = `${e.name}Helper`, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
6983
+ t = new ea(e), t.name = `${e.name}Helper`, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
6972
6984
  break;
6973
6985
  case "PointLight":
6974
6986
  t = new rr(e, 100), t.name = `${e.name}Helper`, this.lightHelpers.set(e.name, t), this.helpersContainer.add(t);
@@ -6984,7 +6996,7 @@ class Me extends Jt {
6984
6996
  const i = this.controls.get(e.name);
6985
6997
  if (i !== void 0 && i.dispose(), this.controls.delete(e.name), e.name === "UI")
6986
6998
  return;
6987
- const n = new Jr(e, t);
6999
+ const n = new ia(e, t);
6988
7000
  switch (n.enableDamping = !0, n.dampingFactor = 0.05, e.name) {
6989
7001
  case "Top":
6990
7002
  case "Bottom":
@@ -7087,8 +7099,8 @@ class Me extends Jt {
7087
7099
  };
7088
7100
  drawQuad = () => {
7089
7101
  const e = this.getSceneOverride(this.tlRender), t = this.getSceneOverride(this.trRender), i = this.getSceneOverride(this.blRender), n = this.getSceneOverride(this.brRender), a = Math.floor(this.width / 2), r = Math.floor(this.height / 2);
7090
- let o = 0, h = 0;
7091
- h = this.height - r, o = 0, this.scene.overrideMaterial = e, this.renderer?.setViewport(o, h, a, r), this.renderer?.setScissor(o, h, a, r), this.renderer?.render(this.scene, this.tlCam), o = a, this.scene.overrideMaterial = t, this.renderer?.setViewport(o, h, a, r), this.renderer?.setScissor(o, h, a, r), this.renderer?.render(this.scene, this.trCam), h = 0, o = 0, this.scene.overrideMaterial = i, this.renderer?.setViewport(o, h, a, r), this.renderer?.setScissor(o, h, a, r), this.renderer?.render(this.scene, this.blCam), o = a, this.scene.overrideMaterial = n, this.renderer?.setViewport(o, h, a, r), this.renderer?.setScissor(o, h, a, r), this.renderer?.render(this.scene, this.brCam);
7102
+ let o = 0, c = 0;
7103
+ c = this.height - r, o = 0, this.scene.overrideMaterial = e, this.renderer?.setViewport(o, c, a, r), this.renderer?.setScissor(o, c, a, r), this.renderer?.render(this.scene, this.tlCam), o = a, this.scene.overrideMaterial = t, this.renderer?.setViewport(o, c, a, r), this.renderer?.setScissor(o, c, a, r), this.renderer?.render(this.scene, this.trCam), c = 0, o = 0, this.scene.overrideMaterial = i, this.renderer?.setViewport(o, c, a, r), this.renderer?.setScissor(o, c, a, r), this.renderer?.render(this.scene, this.blCam), o = a, this.scene.overrideMaterial = n, this.renderer?.setViewport(o, c, a, r), this.renderer?.setScissor(o, c, a, r), this.renderer?.render(this.scene, this.brCam);
7092
7104
  };
7093
7105
  // Getters
7094
7106
  get appID() {
@@ -7115,16 +7127,16 @@ class ti extends Jt {
7115
7127
  }, this.matrix.elements = e.object.matrix, e.object.uuid.length > 0 && (this.position.setFromMatrixPosition(this.matrix), this.rotation.setFromRotationMatrix(this.matrix), this.scale.setFromMatrixScale(this.matrix)), ti.instance = this;
7116
7128
  }
7117
7129
  update() {
7118
- if (Me.instance) {
7119
- const e = Me.instance.selectedItem;
7130
+ if (Pe.instance) {
7131
+ const e = Pe.instance.selectedItem;
7120
7132
  if (e === void 0)
7121
7133
  return;
7122
- this.position.copy(e.position), this.rotation.copy(e.rotation), this.scale.copy(e.scale), this.setState({ lastUpdated: Date.now() });
7134
+ this.position.x = be(e.position.x, 3), this.position.y = be(e.position.y, 3), this.position.z = be(e.position.z, 3), this.rotation.copy(e.rotation), this.scale.x = be(e.scale.x, 3), this.scale.y = be(e.scale.y, 3), this.scale.z = be(e.scale.z, 3), this.setState({ lastUpdated: Date.now() });
7123
7135
  }
7124
7136
  }
7125
7137
  render() {
7126
7138
  return /* @__PURE__ */ d.jsx(
7127
- be,
7139
+ Ee,
7128
7140
  {
7129
7141
  title: "Transform",
7130
7142
  expanded: this.open,
@@ -7140,7 +7152,7 @@ class ti extends Jt {
7140
7152
  {
7141
7153
  title: "Rotation",
7142
7154
  prop: "rotation",
7143
- type: "grid3",
7155
+ type: "euler",
7144
7156
  value: this.rotation,
7145
7157
  onChange: this.updateTransform
7146
7158
  },
@@ -7199,7 +7211,7 @@ function Ms(s) {
7199
7211
  }
7200
7212
  return s;
7201
7213
  }
7202
- function Aa(s, e) {
7214
+ function La(s, e) {
7203
7215
  const t = [];
7204
7216
  if (s.lightInfo !== void 0)
7205
7217
  for (const i in s.lightInfo) {
@@ -7212,10 +7224,10 @@ function Aa(s, e) {
7212
7224
  onChange: (a, r) => {
7213
7225
  const o = new Tt(r);
7214
7226
  e.updateObject(s.uuid, a, o);
7215
- const h = e.getScene(s.uuid);
7216
- if (h !== null) {
7217
- const c = h.getObjectByProperty("uuid", s.uuid);
7218
- K(c, a, o);
7227
+ const c = e.getScene(s.uuid);
7228
+ if (c !== null) {
7229
+ const h = c.getObjectByProperty("uuid", s.uuid);
7230
+ K(h, a, o);
7219
7231
  }
7220
7232
  }
7221
7233
  }) : t.push({
@@ -7228,21 +7240,21 @@ function Aa(s, e) {
7228
7240
  e.updateObject(s.uuid, a, r);
7229
7241
  const o = e.getScene(s.uuid);
7230
7242
  if (o !== null) {
7231
- const h = o.getObjectByProperty("uuid", s.uuid);
7232
- K(h, a, r);
7243
+ const c = o.getObjectByProperty("uuid", s.uuid);
7244
+ K(c, a, r);
7233
7245
  }
7234
7246
  }
7235
7247
  }));
7236
7248
  }
7237
7249
  return /* @__PURE__ */ d.jsx(
7238
- be,
7250
+ Ee,
7239
7251
  {
7240
7252
  title: "Light",
7241
7253
  items: t
7242
7254
  }
7243
7255
  );
7244
7256
  }
7245
- function Ia(s, e) {
7257
+ function ka(s, e) {
7246
7258
  const t = [], i = [];
7247
7259
  let n = 0;
7248
7260
  s.animations.forEach((r) => {
@@ -7281,35 +7293,35 @@ function Ia(s, e) {
7281
7293
  const r = a.getObjectByProperty("uuid", s.uuid);
7282
7294
  let o = !1;
7283
7295
  if (r !== void 0) {
7284
- const h = r.mixer;
7285
- if (o = h !== void 0, o) {
7286
- const c = [
7296
+ const c = r.mixer;
7297
+ if (o = c !== void 0, o) {
7298
+ const h = [
7287
7299
  {
7288
7300
  title: "Time Scale",
7289
7301
  type: "range",
7290
- value: h.timeScale,
7302
+ value: c.timeScale,
7291
7303
  step: 0.01,
7292
7304
  min: -1,
7293
7305
  max: 2,
7294
- onChange: (u, m) => {
7295
- h.timeScale = m, e.updateObject(s.uuid, "mixer.timeScale", m);
7306
+ onChange: (u, p) => {
7307
+ c.timeScale = p, e.updateObject(s.uuid, "mixer.timeScale", p);
7296
7308
  }
7297
7309
  }
7298
7310
  ];
7299
- c.push({
7311
+ h.push({
7300
7312
  title: "Stop All",
7301
7313
  type: "button",
7302
7314
  onChange: () => {
7303
- h.stopAllAction(), e.requestMethod(s.uuid, "stopAllAction", void 0, "mixer");
7315
+ c.stopAllAction(), e.requestMethod(s.uuid, "stopAllAction", void 0, "mixer");
7304
7316
  }
7305
7317
  }), t.push({
7306
7318
  title: "Mixer",
7307
- items: c
7319
+ items: h
7308
7320
  });
7309
7321
  }
7310
7322
  }
7311
7323
  }
7312
- return /* @__PURE__ */ d.jsx(be, { title: "Animation", items: t });
7324
+ return /* @__PURE__ */ d.jsx(Ee, { title: "Animation", items: t });
7313
7325
  }
7314
7326
  const ln = {
7315
7327
  name: "",
@@ -7325,11 +7337,11 @@ const ln = {
7325
7337
  children: []
7326
7338
  };
7327
7339
  let ue = { ...ln };
7328
- function La(s) {
7340
+ function Ua(s) {
7329
7341
  const [e, t] = G(-1);
7330
- lt(() => {
7331
- function r(h) {
7332
- ue = { ...h.value }, t(Date.now());
7342
+ ct(() => {
7343
+ function r(c) {
7344
+ ue = { ...c.value }, t(Date.now());
7333
7345
  }
7334
7346
  function o() {
7335
7347
  ue = { ...ln }, t(Date.now());
@@ -7374,88 +7386,88 @@ function La(s) {
7374
7386
  ] }),
7375
7387
  /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
7376
7388
  /* @__PURE__ */ d.jsx(ti, { object: ue, three: s.three }),
7377
- n ? Ia(ue, s.three) : null,
7378
- i.search("camera") > -1 ? Qr(ue, s.three) : null,
7379
- i.search("light") > -1 ? Aa(ue, s.three) : null,
7380
- a ? Vr(ue, s.three) : null
7389
+ n ? ka(ue, s.three) : null,
7390
+ i.search("camera") > -1 ? Jr(ue, s.three) : null,
7391
+ i.search("light") > -1 ? La(ue, s.three) : null,
7392
+ a ? Qr(ue, s.three) : null
7381
7393
  ] })
7382
7394
  ] }) }, e) }, "Inspector");
7383
7395
  }
7384
- function ka(s) {
7385
- const [e] = G([]), [t] = G([]), [i, n] = G(0), a = (h) => {
7386
- const c = h.value;
7387
- e.push(c), t.push(
7396
+ function ja(s) {
7397
+ const [e] = G([]), [t] = G([]), [i, n] = G(0), a = (c) => {
7398
+ const h = c.value;
7399
+ e.push(h), t.push(
7388
7400
  /* @__PURE__ */ d.jsx(
7389
7401
  Qt,
7390
7402
  {
7391
- label: `Scene: ${c.name}`,
7392
- scene: c,
7403
+ label: `Scene: ${h.name}`,
7404
+ scene: h,
7393
7405
  open: !0,
7394
7406
  onRefresh: () => {
7395
- s.three.refreshScene(c.name);
7407
+ s.three.refreshScene(h.name);
7396
7408
  },
7397
- children: /* @__PURE__ */ d.jsx(ss, { child: c, scene: c, three: s.three })
7409
+ children: /* @__PURE__ */ d.jsx(ns, { child: h, scene: h, three: s.three })
7398
7410
  },
7399
7411
  Math.random()
7400
7412
  )
7401
7413
  ), n(Date.now());
7402
- }, r = (h) => {
7403
- const c = h.value;
7414
+ }, r = (c) => {
7415
+ const h = c.value;
7404
7416
  for (let u = 0; u < e.length; u++)
7405
- if (c.uuid === e[u].uuid) {
7406
- e[u] = c, t[u] = /* @__PURE__ */ d.jsx(
7417
+ if (h.uuid === e[u].uuid) {
7418
+ e[u] = h, t[u] = /* @__PURE__ */ d.jsx(
7407
7419
  Qt,
7408
7420
  {
7409
- label: `Scene: ${c.name}`,
7410
- scene: c,
7421
+ label: `Scene: ${h.name}`,
7422
+ scene: h,
7411
7423
  open: !0,
7412
7424
  onRefresh: () => {
7413
- s.three.refreshScene(c.name);
7425
+ s.three.refreshScene(h.name);
7414
7426
  },
7415
- children: /* @__PURE__ */ d.jsx(ss, { child: c, scene: c, three: s.three })
7427
+ children: /* @__PURE__ */ d.jsx(ns, { child: h, scene: h, three: s.three })
7416
7428
  },
7417
7429
  Math.random()
7418
7430
  ), n(Date.now());
7419
7431
  return;
7420
7432
  }
7421
- }, o = (h) => {
7422
- const c = h.value;
7433
+ }, o = (c) => {
7434
+ const h = c.value;
7423
7435
  for (let u = 0; u < e.length; u++)
7424
- if (c.uuid === e[u].uuid) {
7436
+ if (h.uuid === e[u].uuid) {
7425
7437
  e.splice(u, 1), t.splice(u, 1), n(Date.now());
7426
7438
  return;
7427
7439
  }
7428
7440
  };
7429
- return lt(() => (R.addEventListener(D.ADD_SCENE, a), R.addEventListener(D.REFRESH_SCENE, r), R.addEventListener(D.REMOVE_SCENE, o), () => {
7441
+ return ct(() => (R.addEventListener(D.ADD_SCENE, a), R.addEventListener(D.REFRESH_SCENE, r), R.addEventListener(D.REMOVE_SCENE, o), () => {
7430
7442
  R.removeEventListener(D.ADD_SCENE, a), R.removeEventListener(D.REFRESH_SCENE, r), R.removeEventListener(D.REMOVE_SCENE, o);
7431
7443
  }), []), /* @__PURE__ */ d.jsxs("div", { id: "SidePanel", children: [
7432
7444
  /* @__PURE__ */ d.jsx("div", { className: "scenes", children: t }, i),
7433
- /* @__PURE__ */ d.jsx(La, { three: s.three }),
7445
+ /* @__PURE__ */ d.jsx(Ua, { three: s.three }),
7434
7446
  /* @__PURE__ */ d.jsx(q, { three: s.three })
7435
7447
  ] });
7436
7448
  }
7437
- function $a(s) {
7438
- return lt(() => {
7449
+ function qa(s) {
7450
+ return ct(() => {
7439
7451
  function e(o) {
7440
- let h = null;
7441
- return s.three.scenes.forEach((c) => {
7442
- o.search(c.uuid) > -1 && (h = c);
7443
- }), h;
7452
+ let c = null;
7453
+ return s.three.scenes.forEach((h) => {
7454
+ o.search(h.uuid) > -1 && (c = h);
7455
+ }), c;
7444
7456
  }
7445
7457
  const t = (o) => {
7446
- const h = o.value, u = e(h)?.getObjectByProperty("uuid", h);
7458
+ const c = o.value, u = e(c)?.getObjectByProperty("uuid", c);
7447
7459
  u !== void 0 && s.three.setObject(u);
7448
- }, i = (o, h, c) => {
7449
- const m = e(o)?.getObjectByProperty("uuid", o);
7450
- m !== void 0 && K(m, h, c);
7460
+ }, i = (o, c, h) => {
7461
+ const p = e(o)?.getObjectByProperty("uuid", o);
7462
+ p !== void 0 && K(p, c, h);
7451
7463
  }, n = (o) => {
7452
- const h = o.value, { key: c, value: u, uuid: m } = h;
7453
- i(m, c, u);
7464
+ const c = o.value, { key: h, value: u, uuid: p } = c;
7465
+ i(p, h, u);
7454
7466
  }, a = (o) => {
7455
- const h = o.value, u = e(h.uuid)?.getObjectByProperty("uuid", h.uuid);
7467
+ const c = o.value, u = e(c.uuid)?.getObjectByProperty("uuid", c.uuid);
7456
7468
  if (u !== void 0) {
7457
- const m = (_) => {
7458
- const g = h.key.split(".");
7469
+ const p = (_) => {
7470
+ const g = c.key.split(".");
7459
7471
  switch (g.length) {
7460
7472
  case 1:
7461
7473
  u[g[0]] = _;
@@ -7475,17 +7487,17 @@ function $a(s) {
7475
7487
  }
7476
7488
  u.material.needsUpdate = !0;
7477
7489
  };
7478
- h.value.src.length > 0 ? tn(h.value.src).then((_) => {
7479
- _.offset.set(h.value.offset[0], h.value.offset[1]), _.repeat.set(h.value.repeat[0], h.value.repeat[1]), m(_);
7480
- }) : m(null);
7490
+ c.value.src.length > 0 ? tn(c.value.src).then((_) => {
7491
+ _.offset.set(c.value.offset[0], c.value.offset[1]), _.repeat.set(c.value.repeat[0], c.value.repeat[1]), p(_);
7492
+ }) : p(null);
7481
7493
  }
7482
7494
  }, r = (o) => {
7483
- const { key: h, uuid: c, value: u, subitem: m } = o.value, g = e(c)?.getObjectByProperty("uuid", c);
7495
+ const { key: c, uuid: h, value: u, subitem: p } = o.value, g = e(h)?.getObjectByProperty("uuid", h);
7484
7496
  if (g !== void 0)
7485
7497
  try {
7486
- m !== void 0 ? br(g, m)[h](u) : g[h](u);
7498
+ p !== void 0 ? br(g, p)[c](u) : g[c](u);
7487
7499
  } catch (S) {
7488
- console.log("Error requesting method:"), console.log(S), console.log(h), console.log(u);
7500
+ console.log("Error requesting method:"), console.log(S), console.log(c), console.log(u);
7489
7501
  }
7490
7502
  };
7491
7503
  return R.addEventListener(D.GET_OBJECT, t), R.addEventListener(D.UPDATE_OBJECT, n), R.addEventListener(D.CREATE_TEXTURE, a), R.addEventListener(D.REQUEST_METHOD, r), () => {
@@ -7493,17 +7505,17 @@ function $a(s) {
7493
7505
  };
7494
7506
  }, []), null;
7495
7507
  }
7496
- function Ua(s) {
7508
+ function Na(s) {
7497
7509
  return /* @__PURE__ */ d.jsxs("div", { className: "editor", ref: s.ref, style: s.style, children: [
7498
7510
  /* @__PURE__ */ d.jsx("div", { className: "header", children: s.header }),
7499
7511
  s.children,
7500
7512
  /* @__PURE__ */ d.jsx("div", { className: "footer", children: s.footer })
7501
7513
  ] });
7502
7514
  }
7503
- function Qa(s) {
7504
- return /* @__PURE__ */ d.jsx(Ua, { children: /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
7515
+ function Ka(s) {
7516
+ return /* @__PURE__ */ d.jsx(Na, { children: /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
7505
7517
  /* @__PURE__ */ d.jsx(
7506
- Me,
7518
+ Pe,
7507
7519
  {
7508
7520
  three: s.three,
7509
7521
  scenes: s.scenes,
@@ -7512,51 +7524,51 @@ function Qa(s) {
7512
7524
  onSceneUpdate: s.onSceneUpdate
7513
7525
  }
7514
7526
  ),
7515
- /* @__PURE__ */ d.jsx(ka, { three: s.three })
7527
+ /* @__PURE__ */ d.jsx(ja, { three: s.three })
7516
7528
  ] }) });
7517
7529
  }
7518
7530
  export {
7519
7531
  Qt as Accordion,
7520
- Ba as Application,
7521
- Ai as BaseRemote,
7532
+ Ga as Application,
7533
+ Ii as BaseRemote,
7522
7534
  nn as ChildObject,
7523
- ss as ContainerObject,
7535
+ ns as ContainerObject,
7524
7536
  Tr as Draggable,
7525
7537
  Or as DraggableItem,
7526
7538
  Mr as Dropdown,
7527
7539
  Pr as DropdownItem,
7528
- Ua as Editor,
7540
+ Na as Editor,
7529
7541
  Gt as ExportTexture,
7530
- La as Inspector,
7531
- Me as MultiView,
7542
+ Ua as Inspector,
7543
+ Pe as MultiView,
7532
7544
  sn as NavButton,
7533
- Za as RemoteComponents,
7534
- Xa as RemoteController,
7545
+ Wa as RemoteComponents,
7546
+ Qa as RemoteController,
7535
7547
  en as RemoteTheatre,
7536
- Va as RemoteThree,
7537
- $a as SceneInspector,
7538
- ka as SidePanel,
7539
- Qa as ThreeEditor,
7548
+ $a as RemoteThree,
7549
+ qa as SceneInspector,
7550
+ ja as SidePanel,
7551
+ Ka as ThreeEditor,
7540
7552
  D as ToolEvents,
7541
7553
  $t as capitalize,
7542
- He as clamp,
7543
- Ji as colorToHex,
7554
+ Ye as clamp,
7555
+ es as colorToHex,
7544
7556
  pr as copyToClipboard,
7545
- Wa as customizeTheatreElements,
7557
+ Xa as customizeTheatreElements,
7546
7558
  R as debugDispatcher,
7547
- za as defaultTheatreCallback,
7548
- We as dispose,
7559
+ Ya as defaultTheatreCallback,
7560
+ Ve as dispose,
7549
7561
  _r as disposeMaterial,
7550
- Ya as disposeTexture,
7551
- Ha as distance,
7562
+ Za as disposeTexture,
7563
+ Ba as distance,
7552
7564
  Ti as hierarchyUUID,
7553
7565
  fr as isColor,
7554
7566
  xi as mix,
7555
7567
  Js as noop,
7556
- Ki as normalize,
7568
+ Ji as normalize,
7557
7569
  mr as randomID,
7558
- es as resetThreeObjects,
7559
- Ot as round,
7560
- Ga as theatreEditorApp,
7570
+ ts as resetThreeObjects,
7571
+ be as round,
7572
+ Va as theatreEditorApp,
7561
7573
  Oi as totalThreeObjects
7562
7574
  };