@tomorrowevening/hermes 0.0.11 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/dist/hermes.js +1473 -1277
  2. package/dist/hermes.umd.cjs +16 -16
  3. package/dist/style.css +1 -1
  4. package/package.json +1 -1
  5. package/src/core/RemoteController.ts +7 -0
  6. package/src/core/remote/RemoteThree.ts +20 -2
  7. package/src/core/types.ts +2 -0
  8. package/src/editor/global.ts +3 -0
  9. package/src/editor/multiView/CameraWindow.tsx +20 -7
  10. package/src/editor/multiView/MultiView.scss +2 -0
  11. package/src/editor/multiView/MultiView.tsx +187 -5
  12. package/src/editor/scss/{_sceneHierarchy.scss → _sidePanel.scss} +1 -1
  13. package/src/editor/scss/index.scss +1 -1
  14. package/src/editor/{sceneHierarchy/SceneHierarchy.tsx → sidePanel/SidePanel.tsx} +8 -10
  15. package/src/editor/sidePanel/inspector/Inspector.tsx +114 -0
  16. package/src/editor/sidePanel/inspector/utils/InspectAnimation.tsx +51 -0
  17. package/src/editor/{sceneHierarchy → sidePanel}/types.ts +10 -1
  18. package/src/editor/{sceneHierarchy → sidePanel}/utils.ts +11 -2
  19. package/src/index.ts +6 -6
  20. package/types/core/remote/RemoteThree.d.ts +3 -1
  21. package/types/core/types.d.ts +1 -1
  22. package/types/editor/global.d.ts +2 -0
  23. package/types/editor/multiView/CameraWindow.d.ts +2 -0
  24. package/types/editor/sidePanel/SidePanel.d.ts +11 -0
  25. package/types/editor/sidePanel/inspector/utils/InspectAnimation.d.ts +3 -0
  26. package/types/editor/{sceneHierarchy → sidePanel}/types.d.ts +7 -1
  27. package/types/index.d.ts +6 -6
  28. package/src/editor/sceneHierarchy/inspector/Inspector.tsx +0 -97
  29. package/types/editor/sceneHierarchy/SceneHierarchy.d.ts +0 -11
  30. /package/src/editor/{sceneHierarchy → sidePanel}/Accordion.tsx +0 -0
  31. /package/src/editor/{sceneHierarchy → sidePanel}/ChildObject.tsx +0 -0
  32. /package/src/editor/{sceneHierarchy → sidePanel}/ContainerObject.tsx +0 -0
  33. /package/src/editor/{sceneHierarchy → sidePanel}/ToggleBtn.tsx +0 -0
  34. /package/src/editor/{sceneHierarchy → sidePanel}/inspector/InspectorField.tsx +0 -0
  35. /package/src/editor/{sceneHierarchy → sidePanel}/inspector/InspectorGroup.tsx +0 -0
  36. /package/src/editor/{sceneHierarchy → sidePanel}/inspector/SceneInspector.tsx +0 -0
  37. /package/src/editor/{sceneHierarchy → sidePanel}/inspector/inspector.scss +0 -0
  38. /package/src/editor/{sceneHierarchy → sidePanel}/inspector/utils/InspectCamera.tsx +0 -0
  39. /package/src/editor/{sceneHierarchy → sidePanel}/inspector/utils/InspectLight.tsx +0 -0
  40. /package/src/editor/{sceneHierarchy → sidePanel}/inspector/utils/InspectMaterial.tsx +0 -0
  41. /package/src/editor/{sceneHierarchy → sidePanel}/inspector/utils/InspectTransform.tsx +0 -0
  42. /package/types/editor/{sceneHierarchy → sidePanel}/Accordion.d.ts +0 -0
  43. /package/types/editor/{sceneHierarchy → sidePanel}/ChildObject.d.ts +0 -0
  44. /package/types/editor/{sceneHierarchy → sidePanel}/ContainerObject.d.ts +0 -0
  45. /package/types/editor/{sceneHierarchy → sidePanel}/ToggleBtn.d.ts +0 -0
  46. /package/types/editor/{sceneHierarchy → sidePanel}/inspector/Inspector.d.ts +0 -0
  47. /package/types/editor/{sceneHierarchy → sidePanel}/inspector/InspectorField.d.ts +0 -0
  48. /package/types/editor/{sceneHierarchy → sidePanel}/inspector/InspectorGroup.d.ts +0 -0
  49. /package/types/editor/{sceneHierarchy → sidePanel}/inspector/SceneInspector.d.ts +0 -0
  50. /package/types/editor/{sceneHierarchy → sidePanel}/inspector/utils/InspectCamera.d.ts +0 -0
  51. /package/types/editor/{sceneHierarchy → sidePanel}/inspector/utils/InspectLight.d.ts +0 -0
  52. /package/types/editor/{sceneHierarchy → sidePanel}/inspector/utils/InspectMaterial.d.ts +0 -0
  53. /package/types/editor/{sceneHierarchy → sidePanel}/inspector/utils/InspectTransform.d.ts +0 -0
  54. /package/types/editor/{sceneHierarchy → sidePanel}/utils.d.ts +0 -0
package/dist/hermes.js CHANGED
@@ -1,70 +1,70 @@
1
- var bn = Object.defineProperty;
2
- var yn = (t, n, a) => n in t ? bn(t, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[n] = a;
3
- var $ = (t, n, a) => (yn(t, typeof n != "symbol" ? n + "" : n, a), a);
4
- import { PositionalAudio as En, EventDispatcher as Zt, Texture as Jt, CubeTexture as xn, RepeatWrapping as Lt, ShaderMaterial as Qt, GLSL3 as wn, DoubleSide as Cn, Color as kt, Mesh as Sn, PlaneGeometry as On, Matrix4 as Tn, Vector3 as L, Euler as Rn, Ray as Mn, Plane as Pn, MathUtils as jn, MOUSE as Ne, TOUCH as Le, Quaternion as Ft, Spherical as Ut, Vector2 as oe, PerspectiveCamera as Tt, MeshDepthMaterial as _n, MeshNormalMaterial as kn, MeshBasicMaterial as Dn, OrthographicCamera as en, Scene as tn, AxesHelper as An, WebGLRenderer as In, CameraHelper as Nn } from "three";
5
- import { getProject as Ln } from "@theatre/core";
6
- import { Pane as Fn } from "tweakpane";
7
- import * as Un from "@tweakpane/plugin-essentials";
8
- import nn, { useState as ne, useRef as ye, useEffect as Be, Component as Bn, forwardRef as $n } from "react";
9
- import { Reorder as an } from "framer-motion";
10
- import Ze from "@theatre/studio";
11
- function Ba(t, n, a) {
1
+ var Sn = Object.defineProperty;
2
+ var On = (t, n, a) => n in t ? Sn(t, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[n] = a;
3
+ var Z = (t, n, a) => (On(t, typeof n != "symbol" ? n + "" : n, a), a);
4
+ import { PositionalAudio as Tn, EventDispatcher as nn, Texture as an, CubeTexture as Mn, RepeatWrapping as Gt, ShaderMaterial as rn, GLSL3 as Rn, DoubleSide as Pn, Color as Nt, Mesh as jn, PlaneGeometry as _n, Matrix4 as kn, Vector3 as Y, Euler as An, AnimationMixer as Dn, Ray as In, Plane as Nn, MathUtils as Ln, MOUSE as ze, TOUCH as Ye, Quaternion as Vt, Spherical as zt, Vector2 as ue, PerspectiveCamera as kt, MeshDepthMaterial as Fn, MeshNormalMaterial as Un, MeshBasicMaterial as Bn, OrthographicCamera as on, Scene as sn, Group as $n, AxesHelper as cn, WebGLRenderer as Gn, Raycaster as Vn, CameraHelper as zn } from "three";
5
+ import { getProject as Yn } from "@theatre/core";
6
+ import { Pane as Wn } from "tweakpane";
7
+ import * as Hn from "@tweakpane/plugin-essentials";
8
+ import ln, { useState as ie, useRef as xe, useEffect as Ne, Component as Kn, forwardRef as Xn } from "react";
9
+ import { Reorder as un } from "framer-motion";
10
+ import et from "@theatre/studio";
11
+ function Ka(t, n, a) {
12
12
  return Math.min(n, Math.max(t, a));
13
13
  }
14
- function $a(t, n) {
14
+ function Xa(t, n) {
15
15
  const a = t - n;
16
16
  return Math.sqrt(a * a);
17
17
  }
18
- function Gn() {
18
+ function qn() {
19
19
  return Math.round(Math.random() * 1e6).toString();
20
20
  }
21
- function Vn(t) {
21
+ function Zn(t) {
22
22
  return t.r !== void 0 && t.g !== void 0 && t.b !== void 0;
23
23
  }
24
- function Yn(t) {
25
- const n = Math.round(t.r * 255), a = Math.round(t.g * 255), e = Math.round(t.b * 255), o = (d) => {
24
+ function Jn(t) {
25
+ const n = Math.round(t.r * 255), a = Math.round(t.g * 255), e = Math.round(t.b * 255), r = (d) => {
26
26
  const p = d.toString(16);
27
27
  return p.length === 1 ? "0" + p : p;
28
- }, u = o(n), c = o(a), s = o(e);
29
- return "#" + u + c + s;
28
+ }, s = r(n), c = r(a), l = r(e);
29
+ return "#" + s + c + l;
30
30
  }
31
- function Ct(t, n = 1) {
31
+ function Rt(t, n = 1) {
32
32
  return Number(t.toFixed(n));
33
33
  }
34
- let Rt = 0;
35
- const zn = () => {
36
- Rt = 0;
37
- }, rn = (t) => {
34
+ let At = 0;
35
+ const Qn = () => {
36
+ At = 0;
37
+ }, dn = (t) => {
38
38
  if (!t)
39
39
  return;
40
40
  let n = t.name.replace(" ", "");
41
- n.length === 0 && (n = `obj_${Rt}`, Rt++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
42
- rn(a);
41
+ n.length === 0 && (n = `obj_${At}`, At++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
42
+ dn(a);
43
43
  });
44
- }, Ga = (t) => {
44
+ }, qa = (t) => {
45
45
  t == null || t.dispose();
46
- }, Wn = (t) => {
46
+ }, ea = (t) => {
47
47
  t && (Array.isArray(t) ? t.forEach((n) => n.dispose()) : t.dispose());
48
- }, on = (t) => {
48
+ }, fn = (t) => {
49
49
  var n;
50
50
  if (t) {
51
51
  for (; t.children.length > 0; ) {
52
52
  const a = t.children[0];
53
- a instanceof En ? (a.pause(), a.parent && a.parent.remove(a)) : on(a);
53
+ a instanceof Tn ? (a.pause(), a.parent && a.parent.remove(a)) : fn(a);
54
54
  }
55
55
  if (t.parent && t.parent.remove(t), t.isMesh) {
56
56
  const a = t;
57
- (n = a.geometry) == null || n.dispose(), Wn(a.material);
57
+ (n = a.geometry) == null || n.dispose(), ea(a.material);
58
58
  }
59
59
  t.dispose !== void 0 && t.dispose();
60
60
  }
61
61
  };
62
- class Va {
62
+ class Za {
63
63
  constructor(n, a, e) {
64
- $(this, "channel");
65
- $(this, "components", /* @__PURE__ */ new Map());
64
+ Z(this, "channel");
65
+ Z(this, "components", /* @__PURE__ */ new Map());
66
66
  // Protected
67
- $(this, "_mode", "app");
67
+ Z(this, "_mode", "app");
68
68
  this.editor = a && document.location.hash.search(e) > -1, a && (this.channel = new BroadcastChannel(n));
69
69
  }
70
70
  addComponent(n, a) {
@@ -95,7 +95,7 @@ class Va {
95
95
  n && (this._mode = "editor", document.title += " - Editor");
96
96
  }
97
97
  }
98
- const I = new Zt(), N = {
98
+ const k = new nn(), A = {
99
99
  CUSTOM: "ToolEvents::custom",
100
100
  // Components
101
101
  SELECT_DROPDOWN: "ToolEvents::selectDropdown",
@@ -106,17 +106,20 @@ const I = new Zt(), N = {
106
106
  SET_OBJECT: "ToolEvents::setObject",
107
107
  UPDATE_OBJECT: "ToolEvents::updateObject",
108
108
  CREATE_TEXTURE: "ToolEvents::createTexture",
109
- REQUEST_METHOD: "ToolEvents::requestMethod"
109
+ REQUEST_METHOD: "ToolEvents::requestMethod",
110
+ // MultiView
111
+ ADD_CAMERA: "ToolEvents::addCamera",
112
+ REMOVE_CAMERA: "ToolEvents::removeCamera"
110
113
  };
111
- class gt {
114
+ class xt {
112
115
  constructor(n) {
113
- $(this, "app");
116
+ Z(this, "app");
114
117
  this.app = n;
115
118
  }
116
119
  dispose() {
117
120
  }
118
121
  }
119
- class Ya extends gt {
122
+ class Ja extends xt {
120
123
  selectDropdown(n, a) {
121
124
  this.app.send({
122
125
  event: "selectComponent",
@@ -138,31 +141,31 @@ class Ya extends gt {
138
141
  });
139
142
  }
140
143
  }
141
- const sn = () => {
144
+ const hn = () => {
142
145
  };
143
- class za extends gt {
144
- constructor(a, e, o) {
146
+ class Qa extends xt {
147
+ constructor(a, e, r) {
145
148
  super(a);
146
- $(this, "project");
147
- $(this, "sheets");
148
- $(this, "sheetObjects");
149
- $(this, "sheetObjectCBs");
150
- $(this, "sheetObjectUnsubscribe");
151
- this.project = Ln(e, o), this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
149
+ Z(this, "project");
150
+ Z(this, "sheets");
151
+ Z(this, "sheetObjects");
152
+ Z(this, "sheetObjectCBs");
153
+ Z(this, "sheetObjectUnsubscribe");
154
+ this.project = Yn(e, r), this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
152
155
  }
153
156
  dispose() {
154
157
  this.project = void 0, this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
155
158
  }
156
159
  sheet(a) {
157
- var o;
160
+ var r;
158
161
  if (this.project === void 0) {
159
162
  console.error("Theatre Project hasn't been created yet.");
160
163
  return;
161
164
  }
162
165
  let e = this.sheets.get(a);
163
- return e !== void 0 || (e = (o = this.project) == null ? void 0 : o.sheet(a), this.sheets.set(a, e)), e;
166
+ return e !== void 0 || (e = (r = this.project) == null ? void 0 : r.sheet(a), this.sheets.set(a, e)), e;
164
167
  }
165
- sheetObject(a, e, o, u) {
168
+ sheetObject(a, e, r, s) {
166
169
  if (this.project === void 0) {
167
170
  console.error("Theatre Project hasn't been created yet.");
168
171
  return;
@@ -170,16 +173,16 @@ class za extends gt {
170
173
  const c = this.sheets.get(a);
171
174
  if (c === void 0)
172
175
  return;
173
- const s = `${a}_${e}`;
174
- let d = this.sheetObjects.get(s);
176
+ const l = `${a}_${e}`;
177
+ let d = this.sheetObjects.get(l);
175
178
  if (d !== void 0)
176
- return d = c.object(e, { ...o, ...d.value }, { reconfigure: !0 }), d;
177
- d = c.object(e, o), this.sheetObjects.set(s, d), this.sheetObjectCBs.set(s, u !== void 0 ? u : sn);
178
- const p = d.onValuesChange((h) => {
179
+ return d = c.object(e, { ...r, ...d.value }, { reconfigure: !0 }), d;
180
+ d = c.object(e, r), this.sheetObjects.set(l, d), this.sheetObjectCBs.set(l, s !== void 0 ? s : hn);
181
+ const p = d.onValuesChange((m) => {
179
182
  if (this.app.editor) {
180
- for (const b in h) {
181
- const x = h[b];
182
- typeof x == "object" && Vn(x) && (h[b] = {
183
+ for (const b in m) {
184
+ const x = m[b];
185
+ typeof x == "object" && Zn(x) && (m[b] = {
183
186
  r: x.r,
184
187
  g: x.g,
185
188
  b: x.b,
@@ -190,27 +193,27 @@ class za extends gt {
190
193
  event: "updateSheetObject",
191
194
  target: "app",
192
195
  data: {
193
- sheetObject: s,
194
- values: h
196
+ sheetObject: l,
197
+ values: m
195
198
  }
196
199
  });
197
200
  } else {
198
- const b = this.sheetObjectCBs.get(s);
199
- b !== void 0 && b(h);
201
+ const b = this.sheetObjectCBs.get(l);
202
+ b !== void 0 && b(m);
200
203
  }
201
204
  });
202
- return this.sheetObjectUnsubscribe.set(s, p), d;
205
+ return this.sheetObjectUnsubscribe.set(l, p), d;
203
206
  }
204
207
  unsubscribe(a) {
205
208
  if (this.project === void 0) {
206
209
  console.error("Theatre Project hasn't been created yet.");
207
210
  return;
208
211
  }
209
- const e = `${a.address.sheetId}_${a.address.objectKey}`, o = this.sheetObjectUnsubscribe.get(e);
210
- o !== void 0 && o();
212
+ const e = `${a.address.sheetId}_${a.address.objectKey}`, r = this.sheetObjectUnsubscribe.get(e);
213
+ r !== void 0 && r();
211
214
  }
212
215
  }
213
- function Hn(t) {
216
+ function ta(t) {
214
217
  if (t.name === "cameras")
215
218
  return "camera";
216
219
  if (t.name === "interactive")
@@ -224,7 +227,7 @@ function Hn(t) {
224
227
  const n = t.type;
225
228
  return n.search("Helper") > -1 ? "icon_utils" : n.search("Camera") > -1 ? "camera" : n.search("Light") > -1 ? "light" : "obj3D";
226
229
  }
227
- function cn(t) {
230
+ function pn(t) {
228
231
  const n = {
229
232
  name: t.name,
230
233
  type: t.type,
@@ -232,10 +235,10 @@ function cn(t) {
232
235
  children: []
233
236
  };
234
237
  return t.children.forEach((a) => {
235
- n.children.push(cn(a));
238
+ n.children.push(pn(a));
236
239
  }), n;
237
240
  }
238
- function Kn(t) {
241
+ function na(t) {
239
242
  const n = {};
240
243
  for (const a in t) {
241
244
  const e = t[a].value;
@@ -243,7 +246,7 @@ function Kn(t) {
243
246
  }
244
247
  return n;
245
248
  }
246
- function Xn(t) {
249
+ function aa(t) {
247
250
  switch (t) {
248
251
  case "blendSrcAlpha":
249
252
  case "blendDstAlpha":
@@ -255,28 +258,28 @@ function Xn(t) {
255
258
  }
256
259
  return !1;
257
260
  }
258
- function Bt(t) {
261
+ function Yt(t) {
259
262
  const n = {};
260
263
  for (const a in t) {
261
- if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || Xn(a))
264
+ if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || aa(a))
262
265
  continue;
263
- const e = typeof t[a], o = t[a];
266
+ const e = typeof t[a], r = t[a];
264
267
  switch (e) {
265
268
  case "boolean":
266
269
  case "number":
267
270
  case "string":
268
- n[a] = o;
271
+ n[a] = r;
269
272
  break;
270
273
  case "object":
271
- if (o !== null)
272
- if (n[a] = o, o.isTexture)
273
- if (o instanceof Jt) {
274
- const u = o.source.toJSON();
275
- n[a] = { src: u.url };
274
+ if (r !== null)
275
+ if (n[a] = r, r.isTexture)
276
+ if (r instanceof an) {
277
+ const s = r.source.toJSON();
278
+ n[a] = { src: s.url };
276
279
  } else
277
- o instanceof xn && (console.log("env map"), console.log(o.source.data), console.log(o.source.toJSON()), n[a] = { src: "" });
280
+ r instanceof Mn && (console.log("env map"), console.log(r.source.data), console.log(r.source.toJSON()), n[a] = { src: "" });
278
281
  else
279
- a === "uniforms" && (n[a] = Kn(n[a]));
282
+ a === "uniforms" && (n[a] = na(n[a]));
280
283
  else
281
284
  n[a] = { src: "" };
282
285
  break;
@@ -284,7 +287,7 @@ function Bt(t) {
284
287
  }
285
288
  return n;
286
289
  }
287
- function qn(t) {
290
+ function Pt(t) {
288
291
  t.updateMatrix();
289
292
  const n = {
290
293
  name: t.name,
@@ -292,20 +295,29 @@ function qn(t) {
292
295
  uuid: t.uuid,
293
296
  visible: t.visible,
294
297
  matrix: t.matrix.elements,
298
+ animations: [],
295
299
  material: void 0,
296
300
  perspectiveCameraInfo: void 0,
297
301
  orthographicCameraInfo: void 0,
298
302
  lightInfo: void 0
299
- }, a = t.type.toLowerCase();
303
+ };
304
+ t.animations.forEach((e) => {
305
+ n.animations.push({
306
+ name: e.name,
307
+ duration: e.duration,
308
+ blendMode: e.blendMode
309
+ });
310
+ });
311
+ const a = t.type.toLowerCase();
300
312
  if (a.search("mesh") > -1) {
301
313
  const e = t;
302
314
  if (Array.isArray(e.material)) {
303
- const o = [];
304
- e.material.forEach((u) => {
305
- o.push(Bt(u));
306
- }), n.material = o;
315
+ const r = [];
316
+ e.material.forEach((s) => {
317
+ r.push(Yt(s));
318
+ }), n.material = r;
307
319
  } else
308
- n.material = Bt(e.material);
320
+ n.material = Yt(e.material);
309
321
  } else
310
322
  a.search("camera") > -1 ? t.type === "PerspectiveCamera" ? n.perspectiveCameraInfo = {
311
323
  fov: t.fov,
@@ -335,7 +347,7 @@ function qn(t) {
335
347
  });
336
348
  return n;
337
349
  }
338
- function q(t, n, a) {
350
+ function ee(t, n, a) {
339
351
  const e = n.split(".");
340
352
  switch (e.length) {
341
353
  case 1:
@@ -355,19 +367,19 @@ function q(t, n, a) {
355
367
  break;
356
368
  }
357
369
  }
358
- function Mt(t) {
370
+ function Dt(t) {
359
371
  return new Promise((n, a) => {
360
372
  const e = new Image();
361
373
  e.onload = () => {
362
- const o = new Jt(e);
363
- o.wrapS = Lt, o.wrapT = Lt, o.needsUpdate = !0, n(o);
374
+ const r = new an(e);
375
+ r.wrapS = Gt, r.wrapT = Gt, r.needsUpdate = !0, n(r);
364
376
  }, e.onerror = a, e.src = t;
365
377
  });
366
378
  }
367
- class Wa extends gt {
379
+ class ei extends xt {
368
380
  constructor() {
369
381
  super(...arguments);
370
- $(this, "scene");
382
+ Z(this, "scene");
371
383
  }
372
384
  getObject(a) {
373
385
  this.app.send({
@@ -377,79 +389,95 @@ class Wa extends gt {
377
389
  });
378
390
  }
379
391
  setObject(a) {
380
- const e = qn(a);
392
+ const e = Pt(a);
381
393
  this.app.send({
382
394
  event: "setObject",
383
395
  target: "editor",
384
396
  data: e
385
397
  });
386
398
  }
387
- requestMethod(a, e, o) {
399
+ requestMethod(a, e, r) {
388
400
  this.app.send({
389
401
  event: "requestMethod",
390
402
  target: "app",
391
403
  data: {
392
404
  uuid: a,
393
405
  key: e,
394
- value: o
406
+ value: r
395
407
  }
396
408
  });
397
409
  }
398
- updateObject(a, e, o) {
410
+ updateObject(a, e, r) {
399
411
  this.app.send({
400
412
  event: "updateObject",
401
413
  target: "app",
402
414
  data: {
403
415
  uuid: a,
404
416
  key: e,
405
- value: o
417
+ value: r
406
418
  }
407
419
  });
408
420
  }
409
- createTexture(a, e, o) {
421
+ createTexture(a, e, r) {
410
422
  this.app.send({
411
423
  event: "createTexture",
412
424
  target: "app",
413
425
  data: {
414
426
  uuid: a,
415
427
  key: e,
416
- value: o
428
+ value: r
417
429
  }
418
430
  });
419
431
  }
420
432
  setScene(a) {
421
433
  if (a === void 0)
422
434
  return;
423
- this.scene = a, zn(), rn(this.scene);
424
- const e = cn(this.scene);
435
+ this.scene = a, Qn(), dn(this.scene);
436
+ const e = pn(this.scene);
425
437
  this.app.send({
426
438
  event: "setScene",
427
439
  target: "editor",
428
440
  data: e
429
441
  });
430
442
  }
443
+ addCamera(a) {
444
+ const e = Pt(a);
445
+ this.app.send({
446
+ event: "addCamera",
447
+ target: "editor",
448
+ data: e
449
+ });
450
+ }
451
+ removeCamera(a) {
452
+ const e = Pt(a);
453
+ this.app.send({
454
+ event: "removeCamera",
455
+ target: "editor",
456
+ data: e
457
+ });
458
+ }
431
459
  }
432
- class Ha extends gt {
460
+ class ti extends xt {
433
461
  constructor(a) {
434
462
  super(a);
435
- $(this, "bindCBs");
436
- $(this, "buttonCBs");
437
- $(this, "pane");
438
- $(this, "appCallbacks", 0);
439
- $(this, "editorCallbacks", 0);
440
- $(this, "inspectorFolder");
463
+ Z(this, "bindCBs");
464
+ Z(this, "buttonCBs");
465
+ Z(this, "pane");
466
+ Z(this, "appCallbacks", 0);
467
+ Z(this, "editorCallbacks", 0);
468
+ Z(this, "inspectorFolder");
441
469
  this.bindCBs = /* @__PURE__ */ new Map(), this.buttonCBs = /* @__PURE__ */ new Map(), a.editor && this.createGUI();
442
470
  }
443
471
  createGUI() {
444
- this.pane = new Fn({ title: "GUI" }), this.pane.registerPlugin(Un);
472
+ this.pane = new Wn({ title: "GUI" }), this.pane.registerPlugin(Hn);
445
473
  }
446
474
  dispose() {
447
475
  var a;
448
476
  this.bindCBs.clear(), this.buttonCBs.clear(), this.appCallbacks = 0, this.editorCallbacks = 0, this.app.editor && ((a = this.pane) == null || a.dispose(), this.pane = void 0);
449
477
  }
450
- addFolder(a, e = void 0, o = void 0) {
478
+ addFolder(a, e = void 0, r = void 0) {
451
479
  if (this.app.editor)
452
- return this.pane === void 0 && this.createGUI(), (o !== void 0 ? o : this.pane).addFolder({
480
+ return this.pane === void 0 && this.createGUI(), (r !== void 0 ? r : this.pane).addFolder({
453
481
  title: a,
454
482
  ...e
455
483
  });
@@ -459,7 +487,7 @@ class Ha extends gt {
459
487
  data: {
460
488
  name: a,
461
489
  params: e,
462
- parent: o
490
+ parent: r
463
491
  }
464
492
  });
465
493
  }
@@ -467,9 +495,9 @@ class Ha extends gt {
467
495
  return `debug_${Math.max(this.appCallbacks, this.editorCallbacks)}`;
468
496
  }
469
497
  // Binding
470
- bind(a, e, o, u = void 0) {
471
- const c = this.bindID, s = o.onChange !== void 0 ? o.onChange : sn;
472
- this.bindCBs.set(c, s), this.app.editor ? (this.pane === void 0 && this.createGUI(), (u !== void 0 ? u : this.pane).addBinding(a, e, o).on("change", (p) => {
498
+ bind(a, e, r, s = void 0) {
499
+ const c = this.bindID, l = r.onChange !== void 0 ? r.onChange : hn;
500
+ this.bindCBs.set(c, l), this.app.editor ? (this.pane === void 0 && this.createGUI(), (s !== void 0 ? s : this.pane).addBinding(a, e, r).on("change", (p) => {
473
501
  this.app.send({
474
502
  event: "updateBind",
475
503
  target: "app",
@@ -484,34 +512,34 @@ class Ha extends gt {
484
512
  data: {
485
513
  id: c,
486
514
  name: e,
487
- params: o,
488
- parent: u
515
+ params: r,
516
+ parent: s
489
517
  }
490
518
  }), this.appCallbacks++);
491
519
  }
492
520
  triggerBind(a, e) {
493
- const o = this.bindCBs.get(a);
494
- o !== void 0 ? o(e) : console.warn(`No callback for: ${a}`, e);
521
+ const r = this.bindCBs.get(a);
522
+ r !== void 0 ? r(e) : console.warn(`No callback for: ${a}`, e);
495
523
  }
496
524
  // Buttons
497
- button(a, e, o = void 0) {
498
- const u = this.bindID;
499
- this.buttonCBs.set(u, e), this.app.editor ? (this.pane === void 0 && this.createGUI(), (o !== void 0 ? o : this.pane).addButton({ title: a }).on("click", () => {
525
+ button(a, e, r = void 0) {
526
+ const s = this.bindID;
527
+ this.buttonCBs.set(s, e), this.app.editor ? (this.pane === void 0 && this.createGUI(), (r !== void 0 ? r : this.pane).addButton({ title: a }).on("click", () => {
500
528
  this.app.send({
501
529
  event: "clickButton",
502
530
  target: "app",
503
531
  data: {
504
- id: u
532
+ id: s
505
533
  }
506
534
  });
507
535
  }), this.editorCallbacks++) : (this.app.send({
508
536
  event: "addButton",
509
537
  target: "app",
510
538
  data: {
511
- id: u,
539
+ id: s,
512
540
  name: a,
513
541
  callback: e,
514
- parent: o
542
+ parent: r
515
543
  }
516
544
  }), this.appCallbacks++);
517
545
  }
@@ -529,7 +557,7 @@ class Ha extends gt {
529
557
  this.inspectorFolder.remove(this.inspectorFolder.children[e]);
530
558
  }
531
559
  }
532
- var Pt = { exports: {} }, Je = {};
560
+ var It = { exports: {} }, tt = {};
533
561
  /**
534
562
  * @license React
535
563
  * react-jsx-runtime.production.min.js
@@ -539,25 +567,25 @@ var Pt = { exports: {} }, Je = {};
539
567
  * This source code is licensed under the MIT license found in the
540
568
  * LICENSE file in the root directory of this source tree.
541
569
  */
542
- var $t;
543
- function Zn() {
544
- if ($t)
545
- return Je;
546
- $t = 1;
547
- var t = nn, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, o = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, u = { key: !0, ref: !0, __self: !0, __source: !0 };
548
- function c(s, d, p) {
549
- var h, b = {}, x = null, S = null;
550
- p !== void 0 && (x = "" + p), d.key !== void 0 && (x = "" + d.key), d.ref !== void 0 && (S = d.ref);
551
- for (h in d)
552
- e.call(d, h) && !u.hasOwnProperty(h) && (b[h] = d[h]);
553
- if (s && s.defaultProps)
554
- for (h in d = s.defaultProps, d)
555
- b[h] === void 0 && (b[h] = d[h]);
556
- return { $$typeof: n, type: s, key: x, ref: S, props: b, _owner: o.current };
557
- }
558
- return Je.Fragment = a, Je.jsx = c, Je.jsxs = c, Je;
570
+ var Wt;
571
+ function ia() {
572
+ if (Wt)
573
+ return tt;
574
+ Wt = 1;
575
+ var t = ln, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, r = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
576
+ function c(l, d, p) {
577
+ var m, b = {}, x = null, C = null;
578
+ p !== void 0 && (x = "" + p), d.key !== void 0 && (x = "" + d.key), d.ref !== void 0 && (C = d.ref);
579
+ for (m in d)
580
+ e.call(d, m) && !s.hasOwnProperty(m) && (b[m] = d[m]);
581
+ if (l && l.defaultProps)
582
+ for (m in d = l.defaultProps, d)
583
+ b[m] === void 0 && (b[m] = d[m]);
584
+ return { $$typeof: n, type: l, key: x, ref: C, props: b, _owner: r.current };
585
+ }
586
+ return tt.Fragment = a, tt.jsx = c, tt.jsxs = c, tt;
559
587
  }
560
- var Qe = {};
588
+ var nt = {};
561
589
  /**
562
590
  * @license React
563
591
  * react-jsx-runtime.development.js
@@ -567,91 +595,91 @@ var Qe = {};
567
595
  * This source code is licensed under the MIT license found in the
568
596
  * LICENSE file in the root directory of this source tree.
569
597
  */
570
- var Gt;
571
- function Jn() {
572
- return Gt || (Gt = 1, process.env.NODE_ENV !== "production" && function() {
573
- var t = nn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), o = Symbol.for("react.strict_mode"), u = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), s = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), O = Symbol.iterator, m = "@@iterator";
574
- function v(r) {
575
- if (r === null || typeof r != "object")
598
+ var Ht;
599
+ function ra() {
600
+ return Ht || (Ht = 1, process.env.NODE_ENV !== "production" && function() {
601
+ var t = ln, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), l = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), S = Symbol.iterator, F = "@@iterator";
602
+ function Q(i) {
603
+ if (i === null || typeof i != "object")
576
604
  return null;
577
- var f = O && r[O] || r[m];
578
- return typeof f == "function" ? f : null;
605
+ var h = S && i[S] || i[F];
606
+ return typeof h == "function" ? h : null;
579
607
  }
580
- var y = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
581
- function w(r) {
608
+ var H = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
609
+ function O(i) {
582
610
  {
583
- for (var f = arguments.length, g = new Array(f > 1 ? f - 1 : 0), C = 1; C < f; C++)
584
- g[C - 1] = arguments[C];
585
- F("error", r, g);
611
+ for (var h = arguments.length, v = new Array(h > 1 ? h - 1 : 0), w = 1; w < h; w++)
612
+ v[w - 1] = arguments[w];
613
+ K("error", i, v);
586
614
  }
587
615
  }
588
- function F(r, f, g) {
616
+ function K(i, h, v) {
589
617
  {
590
- var C = y.ReactDebugCurrentFrame, M = C.getStackAddendum();
591
- M !== "" && (f += "%s", g = g.concat([M]));
592
- var k = g.map(function(R) {
593
- return String(R);
618
+ var w = H.ReactDebugCurrentFrame, j = w.getStackAddendum();
619
+ j !== "" && (h += "%s", v = v.concat([j]));
620
+ var L = v.map(function(P) {
621
+ return String(P);
594
622
  });
595
- k.unshift("Warning: " + f), Function.prototype.apply.call(console[r], console, k);
623
+ L.unshift("Warning: " + h), Function.prototype.apply.call(console[i], console, L);
596
624
  }
597
625
  }
598
- var V = !1, Z = !1, se = !1, Y = !1, fe = !1, j;
599
- j = Symbol.for("react.module.reference");
600
- function D(r) {
601
- return !!(typeof r == "string" || typeof r == "function" || r === e || r === u || fe || r === o || r === p || r === h || Y || r === S || V || Z || se || typeof r == "object" && r !== null && (r.$$typeof === x || r.$$typeof === b || r.$$typeof === c || r.$$typeof === s || r.$$typeof === d || // This needs to include all possible module reference object
626
+ var de = !1, ce = !1, te = !1, f = !1, g = !1, y;
627
+ y = Symbol.for("react.module.reference");
628
+ function T(i) {
629
+ return !!(typeof i == "string" || typeof i == "function" || i === e || i === s || g || i === r || i === p || i === m || f || i === C || de || ce || te || typeof i == "object" && i !== null && (i.$$typeof === x || i.$$typeof === b || i.$$typeof === c || i.$$typeof === l || i.$$typeof === d || // This needs to include all possible module reference object
602
630
  // types supported by any Flight configuration anywhere since
603
631
  // we don't know which Flight build this will end up being used
604
632
  // with.
605
- r.$$typeof === j || r.getModuleId !== void 0));
633
+ i.$$typeof === y || i.getModuleId !== void 0));
606
634
  }
607
- function z(r, f, g) {
608
- var C = r.displayName;
609
- if (C)
610
- return C;
611
- var M = f.displayName || f.name || "";
612
- return M !== "" ? g + "(" + M + ")" : g;
635
+ function V(i, h, v) {
636
+ var w = i.displayName;
637
+ if (w)
638
+ return w;
639
+ var j = h.displayName || h.name || "";
640
+ return j !== "" ? v + "(" + j + ")" : v;
613
641
  }
614
- function ce(r) {
615
- return r.displayName || "Context";
642
+ function z(i) {
643
+ return i.displayName || "Context";
616
644
  }
617
- function ae(r) {
618
- if (r == null)
645
+ function U(i) {
646
+ if (i == null)
619
647
  return null;
620
- if (typeof r.tag == "number" && w("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
621
- return r.displayName || r.name || null;
622
- if (typeof r == "string")
623
- return r;
624
- switch (r) {
648
+ if (typeof i.tag == "number" && O("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof i == "function")
649
+ return i.displayName || i.name || null;
650
+ if (typeof i == "string")
651
+ return i;
652
+ switch (i) {
625
653
  case e:
626
654
  return "Fragment";
627
655
  case a:
628
656
  return "Portal";
629
- case u:
657
+ case s:
630
658
  return "Profiler";
631
- case o:
659
+ case r:
632
660
  return "StrictMode";
633
661
  case p:
634
662
  return "Suspense";
635
- case h:
663
+ case m:
636
664
  return "SuspenseList";
637
665
  }
638
- if (typeof r == "object")
639
- switch (r.$$typeof) {
640
- case s:
641
- var f = r;
642
- return ce(f) + ".Consumer";
666
+ if (typeof i == "object")
667
+ switch (i.$$typeof) {
668
+ case l:
669
+ var h = i;
670
+ return z(h) + ".Consumer";
643
671
  case c:
644
- var g = r;
645
- return ce(g._context) + ".Provider";
672
+ var v = i;
673
+ return z(v._context) + ".Provider";
646
674
  case d:
647
- return z(r, r.render, "ForwardRef");
675
+ return V(i, i.render, "ForwardRef");
648
676
  case b:
649
- var C = r.displayName || null;
650
- return C !== null ? C : ae(r.type) || "Memo";
677
+ var w = i.displayName || null;
678
+ return w !== null ? w : U(i.type) || "Memo";
651
679
  case x: {
652
- var M = r, k = M._payload, R = M._init;
680
+ var j = i, L = j._payload, P = j._init;
653
681
  try {
654
- return ae(R(k));
682
+ return U(P(L));
655
683
  } catch {
656
684
  return null;
657
685
  }
@@ -659,511 +687,511 @@ function Jn() {
659
687
  }
660
688
  return null;
661
689
  }
662
- var le = Object.assign, re = 0, Me, Ge, Pe, je, Ve, nt, Ye;
663
- function at() {
690
+ var D = Object.assign, B = 0, J, R, I, X, pe, Oe, He;
691
+ function ot() {
664
692
  }
665
- at.__reactDisabledLog = !0;
666
- function bt() {
693
+ ot.__reactDisabledLog = !0;
694
+ function Ct() {
667
695
  {
668
- if (re === 0) {
669
- Me = console.log, Ge = console.info, Pe = console.warn, je = console.error, Ve = console.group, nt = console.groupCollapsed, Ye = console.groupEnd;
670
- var r = {
696
+ if (B === 0) {
697
+ J = console.log, R = console.info, I = console.warn, X = console.error, pe = console.group, Oe = console.groupCollapsed, He = console.groupEnd;
698
+ var i = {
671
699
  configurable: !0,
672
700
  enumerable: !0,
673
- value: at,
701
+ value: ot,
674
702
  writable: !0
675
703
  };
676
704
  Object.defineProperties(console, {
677
- info: r,
678
- log: r,
679
- warn: r,
680
- error: r,
681
- group: r,
682
- groupCollapsed: r,
683
- groupEnd: r
705
+ info: i,
706
+ log: i,
707
+ warn: i,
708
+ error: i,
709
+ group: i,
710
+ groupCollapsed: i,
711
+ groupEnd: i
684
712
  });
685
713
  }
686
- re++;
714
+ B++;
687
715
  }
688
716
  }
689
- function yt() {
717
+ function St() {
690
718
  {
691
- if (re--, re === 0) {
692
- var r = {
719
+ if (B--, B === 0) {
720
+ var i = {
693
721
  configurable: !0,
694
722
  enumerable: !0,
695
723
  writable: !0
696
724
  };
697
725
  Object.defineProperties(console, {
698
- log: le({}, r, {
699
- value: Me
726
+ log: D({}, i, {
727
+ value: J
700
728
  }),
701
- info: le({}, r, {
702
- value: Ge
729
+ info: D({}, i, {
730
+ value: R
703
731
  }),
704
- warn: le({}, r, {
705
- value: Pe
732
+ warn: D({}, i, {
733
+ value: I
706
734
  }),
707
- error: le({}, r, {
708
- value: je
735
+ error: D({}, i, {
736
+ value: X
709
737
  }),
710
- group: le({}, r, {
711
- value: Ve
738
+ group: D({}, i, {
739
+ value: pe
712
740
  }),
713
- groupCollapsed: le({}, r, {
714
- value: nt
741
+ groupCollapsed: D({}, i, {
742
+ value: Oe
715
743
  }),
716
- groupEnd: le({}, r, {
717
- value: Ye
744
+ groupEnd: D({}, i, {
745
+ value: He
718
746
  })
719
747
  });
720
748
  }
721
- re < 0 && w("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
749
+ B < 0 && O("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
722
750
  }
723
751
  }
724
- var ze = y.ReactCurrentDispatcher, We;
725
- function Ee(r, f, g) {
752
+ var Ke = H.ReactCurrentDispatcher, Xe;
753
+ function Te(i, h, v) {
726
754
  {
727
- if (We === void 0)
755
+ if (Xe === void 0)
728
756
  try {
729
757
  throw Error();
730
- } catch (M) {
731
- var C = M.stack.trim().match(/\n( *(at )?)/);
732
- We = C && C[1] || "";
758
+ } catch (j) {
759
+ var w = j.stack.trim().match(/\n( *(at )?)/);
760
+ Xe = w && w[1] || "";
733
761
  }
734
762
  return `
735
- ` + We + r;
763
+ ` + Xe + i;
736
764
  }
737
765
  }
738
- var _e = !1, xe;
766
+ var Ue = !1, Me;
739
767
  {
740
- var Et = typeof WeakMap == "function" ? WeakMap : Map;
741
- xe = new Et();
768
+ var Ot = typeof WeakMap == "function" ? WeakMap : Map;
769
+ Me = new Ot();
742
770
  }
743
- function rt(r, f) {
744
- if (!r || _e)
771
+ function st(i, h) {
772
+ if (!i || Ue)
745
773
  return "";
746
774
  {
747
- var g = xe.get(r);
748
- if (g !== void 0)
749
- return g;
775
+ var v = Me.get(i);
776
+ if (v !== void 0)
777
+ return v;
750
778
  }
751
- var C;
752
- _e = !0;
753
- var M = Error.prepareStackTrace;
779
+ var w;
780
+ Ue = !0;
781
+ var j = Error.prepareStackTrace;
754
782
  Error.prepareStackTrace = void 0;
755
- var k;
756
- k = ze.current, ze.current = null, bt();
783
+ var L;
784
+ L = Ke.current, Ke.current = null, Ct();
757
785
  try {
758
- if (f) {
759
- var R = function() {
786
+ if (h) {
787
+ var P = function() {
760
788
  throw Error();
761
789
  };
762
- if (Object.defineProperty(R.prototype, "props", {
790
+ if (Object.defineProperty(P.prototype, "props", {
763
791
  set: function() {
764
792
  throw Error();
765
793
  }
766
794
  }), typeof Reflect == "object" && Reflect.construct) {
767
795
  try {
768
- Reflect.construct(R, []);
769
- } catch (pe) {
770
- C = pe;
796
+ Reflect.construct(P, []);
797
+ } catch (ye) {
798
+ w = ye;
771
799
  }
772
- Reflect.construct(r, [], R);
800
+ Reflect.construct(i, [], P);
773
801
  } else {
774
802
  try {
775
- R.call();
776
- } catch (pe) {
777
- C = pe;
803
+ P.call();
804
+ } catch (ye) {
805
+ w = ye;
778
806
  }
779
- r.call(R.prototype);
807
+ i.call(P.prototype);
780
808
  }
781
809
  } else {
782
810
  try {
783
811
  throw Error();
784
- } catch (pe) {
785
- C = pe;
812
+ } catch (ye) {
813
+ w = ye;
786
814
  }
787
- r();
815
+ i();
788
816
  }
789
- } catch (pe) {
790
- if (pe && C && typeof pe.stack == "string") {
791
- for (var T = pe.stack.split(`
792
- `), K = C.stack.split(`
793
- `), U = T.length - 1, B = K.length - 1; U >= 1 && B >= 0 && T[U] !== K[B]; )
794
- B--;
795
- for (; U >= 1 && B >= 0; U--, B--)
796
- if (T[U] !== K[B]) {
797
- if (U !== 1 || B !== 1)
817
+ } catch (ye) {
818
+ if (ye && w && typeof ye.stack == "string") {
819
+ for (var M = ye.stack.split(`
820
+ `), se = w.stack.split(`
821
+ `), W = M.length - 1, q = se.length - 1; W >= 1 && q >= 0 && M[W] !== se[q]; )
822
+ q--;
823
+ for (; W >= 1 && q >= 0; W--, q--)
824
+ if (M[W] !== se[q]) {
825
+ if (W !== 1 || q !== 1)
798
826
  do
799
- if (U--, B--, B < 0 || T[U] !== K[B]) {
800
- var ie = `
801
- ` + T[U].replace(" at new ", " at ");
802
- return r.displayName && ie.includes("<anonymous>") && (ie = ie.replace("<anonymous>", r.displayName)), typeof r == "function" && xe.set(r, ie), ie;
827
+ if (W--, q--, q < 0 || M[W] !== se[q]) {
828
+ var me = `
829
+ ` + M[W].replace(" at new ", " at ");
830
+ return i.displayName && me.includes("<anonymous>") && (me = me.replace("<anonymous>", i.displayName)), typeof i == "function" && Me.set(i, me), me;
803
831
  }
804
- while (U >= 1 && B >= 0);
832
+ while (W >= 1 && q >= 0);
805
833
  break;
806
834
  }
807
835
  }
808
836
  } finally {
809
- _e = !1, ze.current = k, yt(), Error.prepareStackTrace = M;
837
+ Ue = !1, Ke.current = L, St(), Error.prepareStackTrace = j;
810
838
  }
811
- var Ie = r ? r.displayName || r.name : "", Nt = Ie ? Ee(Ie) : "";
812
- return typeof r == "function" && xe.set(r, Nt), Nt;
839
+ var Ve = i ? i.displayName || i.name : "", $t = Ve ? Te(Ve) : "";
840
+ return typeof i == "function" && Me.set(i, $t), $t;
813
841
  }
814
- function it(r, f, g) {
815
- return rt(r, !1);
842
+ function ct(i, h, v) {
843
+ return st(i, !1);
816
844
  }
817
- function ot(r) {
818
- var f = r.prototype;
819
- return !!(f && f.isReactComponent);
845
+ function lt(i) {
846
+ var h = i.prototype;
847
+ return !!(h && h.isReactComponent);
820
848
  }
821
- function we(r, f, g) {
822
- if (r == null)
849
+ function Re(i, h, v) {
850
+ if (i == null)
823
851
  return "";
824
- if (typeof r == "function")
825
- return rt(r, ot(r));
826
- if (typeof r == "string")
827
- return Ee(r);
828
- switch (r) {
852
+ if (typeof i == "function")
853
+ return st(i, lt(i));
854
+ if (typeof i == "string")
855
+ return Te(i);
856
+ switch (i) {
829
857
  case p:
830
- return Ee("Suspense");
831
- case h:
832
- return Ee("SuspenseList");
858
+ return Te("Suspense");
859
+ case m:
860
+ return Te("SuspenseList");
833
861
  }
834
- if (typeof r == "object")
835
- switch (r.$$typeof) {
862
+ if (typeof i == "object")
863
+ switch (i.$$typeof) {
836
864
  case d:
837
- return it(r.render);
865
+ return ct(i.render);
838
866
  case b:
839
- return we(r.type, f, g);
867
+ return Re(i.type, h, v);
840
868
  case x: {
841
- var C = r, M = C._payload, k = C._init;
869
+ var w = i, j = w._payload, L = w._init;
842
870
  try {
843
- return we(k(M), f, g);
871
+ return Re(L(j), h, v);
844
872
  } catch {
845
873
  }
846
874
  }
847
875
  }
848
876
  return "";
849
877
  }
850
- var ke = Object.prototype.hasOwnProperty, st = {}, He = y.ReactDebugCurrentFrame;
851
- function ge(r) {
852
- if (r) {
853
- var f = r._owner, g = we(r.type, r._source, f ? f.type : null);
854
- He.setExtraStackFrame(g);
878
+ var Be = Object.prototype.hasOwnProperty, ut = {}, qe = H.ReactDebugCurrentFrame;
879
+ function we(i) {
880
+ if (i) {
881
+ var h = i._owner, v = Re(i.type, i._source, h ? h.type : null);
882
+ qe.setExtraStackFrame(v);
855
883
  } else
856
- He.setExtraStackFrame(null);
884
+ qe.setExtraStackFrame(null);
857
885
  }
858
- function Ce(r, f, g, C, M) {
886
+ function Pe(i, h, v, w, j) {
859
887
  {
860
- var k = Function.call.bind(ke);
861
- for (var R in r)
862
- if (k(r, R)) {
863
- var T = void 0;
888
+ var L = Function.call.bind(Be);
889
+ for (var P in i)
890
+ if (L(i, P)) {
891
+ var M = void 0;
864
892
  try {
865
- if (typeof r[R] != "function") {
866
- var K = Error((C || "React class") + ": " + g + " type `" + R + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[R] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
867
- throw K.name = "Invariant Violation", K;
893
+ if (typeof i[P] != "function") {
894
+ var se = Error((w || "React class") + ": " + v + " type `" + P + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[P] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
895
+ throw se.name = "Invariant Violation", se;
868
896
  }
869
- T = r[R](f, R, C, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
870
- } catch (U) {
871
- T = U;
897
+ M = i[P](h, P, w, v, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
898
+ } catch (W) {
899
+ M = W;
872
900
  }
873
- T && !(T instanceof Error) && (ge(M), w("%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).", C || "React class", g, R, typeof T), ge(null)), T instanceof Error && !(T.message in st) && (st[T.message] = !0, ge(M), w("Failed %s type: %s", g, T.message), ge(null));
901
+ M && !(M instanceof Error) && (we(j), O("%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).", w || "React class", v, P, typeof M), we(null)), M instanceof Error && !(M.message in ut) && (ut[M.message] = !0, we(j), O("Failed %s type: %s", v, M.message), we(null));
874
902
  }
875
903
  }
876
904
  }
877
- var xt = Array.isArray;
878
- function Ke(r) {
879
- return xt(r);
905
+ var Tt = Array.isArray;
906
+ function Ze(i) {
907
+ return Tt(i);
880
908
  }
881
- function ct(r) {
909
+ function dt(i) {
882
910
  {
883
- var f = typeof Symbol == "function" && Symbol.toStringTag, g = f && r[Symbol.toStringTag] || r.constructor.name || "Object";
884
- return g;
911
+ var h = typeof Symbol == "function" && Symbol.toStringTag, v = h && i[Symbol.toStringTag] || i.constructor.name || "Object";
912
+ return v;
885
913
  }
886
914
  }
887
- function Xe(r) {
915
+ function Je(i) {
888
916
  try {
889
- return lt(r), !1;
917
+ return ft(i), !1;
890
918
  } catch {
891
919
  return !0;
892
920
  }
893
921
  }
894
- function lt(r) {
895
- return "" + r;
922
+ function ft(i) {
923
+ return "" + i;
896
924
  }
897
- function ut(r) {
898
- if (Xe(r))
899
- return w("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ct(r)), lt(r);
925
+ function ht(i) {
926
+ if (Je(i))
927
+ return O("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", dt(i)), ft(i);
900
928
  }
901
- var ve = y.ReactCurrentOwner, wt = {
929
+ var Ce = H.ReactCurrentOwner, Mt = {
902
930
  key: !0,
903
931
  ref: !0,
904
932
  __self: !0,
905
933
  __source: !0
906
- }, dt, qe, ue;
907
- ue = {};
908
- function i(r) {
909
- if (ke.call(r, "ref")) {
910
- var f = Object.getOwnPropertyDescriptor(r, "ref").get;
911
- if (f && f.isReactWarning)
934
+ }, pt, Qe, ge;
935
+ ge = {};
936
+ function o(i) {
937
+ if (Be.call(i, "ref")) {
938
+ var h = Object.getOwnPropertyDescriptor(i, "ref").get;
939
+ if (h && h.isReactWarning)
912
940
  return !1;
913
941
  }
914
- return r.ref !== void 0;
942
+ return i.ref !== void 0;
915
943
  }
916
- function E(r) {
917
- if (ke.call(r, "key")) {
918
- var f = Object.getOwnPropertyDescriptor(r, "key").get;
919
- if (f && f.isReactWarning)
944
+ function E(i) {
945
+ if (Be.call(i, "key")) {
946
+ var h = Object.getOwnPropertyDescriptor(i, "key").get;
947
+ if (h && h.isReactWarning)
920
948
  return !1;
921
949
  }
922
- return r.key !== void 0;
950
+ return i.key !== void 0;
923
951
  }
924
- function P(r, f) {
925
- if (typeof r.ref == "string" && ve.current && f && ve.current.stateNode !== f) {
926
- var g = ae(ve.current.type);
927
- ue[g] || (w('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', ae(ve.current.type), r.ref), ue[g] = !0);
952
+ function _(i, h) {
953
+ if (typeof i.ref == "string" && Ce.current && h && Ce.current.stateNode !== h) {
954
+ var v = U(Ce.current.type);
955
+ ge[v] || (O('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', U(Ce.current.type), i.ref), ge[v] = !0);
928
956
  }
929
957
  }
930
- function _(r, f) {
958
+ function N(i, h) {
931
959
  {
932
- var g = function() {
933
- dt || (dt = !0, w("%s: `key` 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)", f));
960
+ var v = function() {
961
+ pt || (pt = !0, O("%s: `key` 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)", h));
934
962
  };
935
- g.isReactWarning = !0, Object.defineProperty(r, "key", {
936
- get: g,
963
+ v.isReactWarning = !0, Object.defineProperty(i, "key", {
964
+ get: v,
937
965
  configurable: !0
938
966
  });
939
967
  }
940
968
  }
941
- function W(r, f) {
969
+ function ne(i, h) {
942
970
  {
943
- var g = function() {
944
- qe || (qe = !0, w("%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)", f));
971
+ var v = function() {
972
+ Qe || (Qe = !0, O("%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)", h));
945
973
  };
946
- g.isReactWarning = !0, Object.defineProperty(r, "ref", {
947
- get: g,
974
+ v.isReactWarning = !0, Object.defineProperty(i, "ref", {
975
+ get: v,
948
976
  configurable: !0
949
977
  });
950
978
  }
951
979
  }
952
- var de = function(r, f, g, C, M, k, R) {
953
- var T = {
980
+ var ve = function(i, h, v, w, j, L, P) {
981
+ var M = {
954
982
  // This tag allows us to uniquely identify this as a React Element
955
983
  $$typeof: n,
956
984
  // Built-in properties that belong on the element
957
- type: r,
958
- key: f,
959
- ref: g,
960
- props: R,
985
+ type: i,
986
+ key: h,
987
+ ref: v,
988
+ props: P,
961
989
  // Record the component responsible for creating this element.
962
- _owner: k
990
+ _owner: L
963
991
  };
964
- return T._store = {}, Object.defineProperty(T._store, "validated", {
992
+ return M._store = {}, Object.defineProperty(M._store, "validated", {
965
993
  configurable: !1,
966
994
  enumerable: !1,
967
995
  writable: !0,
968
996
  value: !1
969
- }), Object.defineProperty(T, "_self", {
997
+ }), Object.defineProperty(M, "_self", {
970
998
  configurable: !1,
971
999
  enumerable: !1,
972
1000
  writable: !1,
973
- value: C
974
- }), Object.defineProperty(T, "_source", {
1001
+ value: w
1002
+ }), Object.defineProperty(M, "_source", {
975
1003
  configurable: !1,
976
1004
  enumerable: !1,
977
1005
  writable: !1,
978
- value: M
979
- }), Object.freeze && (Object.freeze(T.props), Object.freeze(T)), T;
1006
+ value: j
1007
+ }), Object.freeze && (Object.freeze(M.props), Object.freeze(M)), M;
980
1008
  };
981
- function J(r, f, g, C, M) {
1009
+ function le(i, h, v, w, j) {
982
1010
  {
983
- var k, R = {}, T = null, K = null;
984
- g !== void 0 && (ut(g), T = "" + g), E(f) && (ut(f.key), T = "" + f.key), i(f) && (K = f.ref, P(f, M));
985
- for (k in f)
986
- ke.call(f, k) && !wt.hasOwnProperty(k) && (R[k] = f[k]);
987
- if (r && r.defaultProps) {
988
- var U = r.defaultProps;
989
- for (k in U)
990
- R[k] === void 0 && (R[k] = U[k]);
1011
+ var L, P = {}, M = null, se = null;
1012
+ v !== void 0 && (ht(v), M = "" + v), E(h) && (ht(h.key), M = "" + h.key), o(h) && (se = h.ref, _(h, j));
1013
+ for (L in h)
1014
+ Be.call(h, L) && !Mt.hasOwnProperty(L) && (P[L] = h[L]);
1015
+ if (i && i.defaultProps) {
1016
+ var W = i.defaultProps;
1017
+ for (L in W)
1018
+ P[L] === void 0 && (P[L] = W[L]);
991
1019
  }
992
- if (T || K) {
993
- var B = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
994
- T && _(R, B), K && W(R, B);
1020
+ if (M || se) {
1021
+ var q = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
1022
+ M && N(P, q), se && ne(P, q);
995
1023
  }
996
- return de(r, T, K, M, C, ve.current, R);
1024
+ return ve(i, M, se, j, w, Ce.current, P);
997
1025
  }
998
1026
  }
999
- var ft = y.ReactCurrentOwner, ht = y.ReactDebugCurrentFrame;
1000
- function he(r) {
1001
- if (r) {
1002
- var f = r._owner, g = we(r.type, r._source, f ? f.type : null);
1003
- ht.setExtraStackFrame(g);
1027
+ var mt = H.ReactCurrentOwner, gt = H.ReactDebugCurrentFrame;
1028
+ function be(i) {
1029
+ if (i) {
1030
+ var h = i._owner, v = Re(i.type, i._source, h ? h.type : null);
1031
+ gt.setExtraStackFrame(v);
1004
1032
  } else
1005
- ht.setExtraStackFrame(null);
1033
+ gt.setExtraStackFrame(null);
1006
1034
  }
1007
- var Q;
1008
- Q = !1;
1009
- function ee(r) {
1010
- return typeof r == "object" && r !== null && r.$$typeof === n;
1035
+ var fe;
1036
+ fe = !1;
1037
+ function he(i) {
1038
+ return typeof i == "object" && i !== null && i.$$typeof === n;
1011
1039
  }
1012
- function De() {
1040
+ function $e() {
1013
1041
  {
1014
- if (ft.current) {
1015
- var r = ae(ft.current.type);
1016
- if (r)
1042
+ if (mt.current) {
1043
+ var i = U(mt.current.type);
1044
+ if (i)
1017
1045
  return `
1018
1046
 
1019
- Check the render method of \`` + r + "`.";
1047
+ Check the render method of \`` + i + "`.";
1020
1048
  }
1021
1049
  return "";
1022
1050
  }
1023
1051
  }
1024
- function Se(r) {
1052
+ function je(i) {
1025
1053
  {
1026
- if (r !== void 0) {
1027
- var f = r.fileName.replace(/^.*[\\\/]/, ""), g = r.lineNumber;
1054
+ if (i !== void 0) {
1055
+ var h = i.fileName.replace(/^.*[\\\/]/, ""), v = i.lineNumber;
1028
1056
  return `
1029
1057
 
1030
- Check your code at ` + f + ":" + g + ".";
1058
+ Check your code at ` + h + ":" + v + ".";
1031
1059
  }
1032
1060
  return "";
1033
1061
  }
1034
1062
  }
1035
- var be = {};
1036
- function Ae(r) {
1063
+ var Se = {};
1064
+ function Ge(i) {
1037
1065
  {
1038
- var f = De();
1039
- if (!f) {
1040
- var g = typeof r == "string" ? r : r.displayName || r.name;
1041
- g && (f = `
1066
+ var h = $e();
1067
+ if (!h) {
1068
+ var v = typeof i == "string" ? i : i.displayName || i.name;
1069
+ v && (h = `
1042
1070
 
1043
- Check the top-level render call using <` + g + ">.");
1071
+ Check the top-level render call using <` + v + ">.");
1044
1072
  }
1045
- return f;
1073
+ return h;
1046
1074
  }
1047
1075
  }
1048
- function Dt(r, f) {
1076
+ function Ft(i, h) {
1049
1077
  {
1050
- if (!r._store || r._store.validated || r.key != null)
1078
+ if (!i._store || i._store.validated || i.key != null)
1051
1079
  return;
1052
- r._store.validated = !0;
1053
- var g = Ae(f);
1054
- if (be[g])
1080
+ i._store.validated = !0;
1081
+ var v = Ge(h);
1082
+ if (Se[v])
1055
1083
  return;
1056
- be[g] = !0;
1057
- var C = "";
1058
- r && r._owner && r._owner !== ft.current && (C = " It was passed a child from " + ae(r._owner.type) + "."), he(r), w('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, C), he(null);
1084
+ Se[v] = !0;
1085
+ var w = "";
1086
+ i && i._owner && i._owner !== mt.current && (w = " It was passed a child from " + U(i._owner.type) + "."), be(i), O('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', v, w), be(null);
1059
1087
  }
1060
1088
  }
1061
- function At(r, f) {
1089
+ function Ut(i, h) {
1062
1090
  {
1063
- if (typeof r != "object")
1091
+ if (typeof i != "object")
1064
1092
  return;
1065
- if (Ke(r))
1066
- for (var g = 0; g < r.length; g++) {
1067
- var C = r[g];
1068
- ee(C) && Dt(C, f);
1093
+ if (Ze(i))
1094
+ for (var v = 0; v < i.length; v++) {
1095
+ var w = i[v];
1096
+ he(w) && Ft(w, h);
1069
1097
  }
1070
- else if (ee(r))
1071
- r._store && (r._store.validated = !0);
1072
- else if (r) {
1073
- var M = v(r);
1074
- if (typeof M == "function" && M !== r.entries)
1075
- for (var k = M.call(r), R; !(R = k.next()).done; )
1076
- ee(R.value) && Dt(R.value, f);
1098
+ else if (he(i))
1099
+ i._store && (i._store.validated = !0);
1100
+ else if (i) {
1101
+ var j = Q(i);
1102
+ if (typeof j == "function" && j !== i.entries)
1103
+ for (var L = j.call(i), P; !(P = L.next()).done; )
1104
+ he(P.value) && Ft(P.value, h);
1077
1105
  }
1078
1106
  }
1079
1107
  }
1080
- function fn(r) {
1108
+ function bn(i) {
1081
1109
  {
1082
- var f = r.type;
1083
- if (f == null || typeof f == "string")
1110
+ var h = i.type;
1111
+ if (h == null || typeof h == "string")
1084
1112
  return;
1085
- var g;
1086
- if (typeof f == "function")
1087
- g = f.propTypes;
1088
- else if (typeof f == "object" && (f.$$typeof === d || // Note: Memo only checks outer props here.
1113
+ var v;
1114
+ if (typeof h == "function")
1115
+ v = h.propTypes;
1116
+ else if (typeof h == "object" && (h.$$typeof === d || // Note: Memo only checks outer props here.
1089
1117
  // Inner props are checked in the reconciler.
1090
- f.$$typeof === b))
1091
- g = f.propTypes;
1118
+ h.$$typeof === b))
1119
+ v = h.propTypes;
1092
1120
  else
1093
1121
  return;
1094
- if (g) {
1095
- var C = ae(f);
1096
- Ce(g, r.props, "prop", C, r);
1097
- } else if (f.PropTypes !== void 0 && !Q) {
1098
- Q = !0;
1099
- var M = ae(f);
1100
- w("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", M || "Unknown");
1122
+ if (v) {
1123
+ var w = U(h);
1124
+ Pe(v, i.props, "prop", w, i);
1125
+ } else if (h.PropTypes !== void 0 && !fe) {
1126
+ fe = !0;
1127
+ var j = U(h);
1128
+ O("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", j || "Unknown");
1101
1129
  }
1102
- typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && w("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1130
+ typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved && O("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1103
1131
  }
1104
1132
  }
1105
- function hn(r) {
1133
+ function yn(i) {
1106
1134
  {
1107
- for (var f = Object.keys(r.props), g = 0; g < f.length; g++) {
1108
- var C = f[g];
1109
- if (C !== "children" && C !== "key") {
1110
- he(r), w("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", C), he(null);
1135
+ for (var h = Object.keys(i.props), v = 0; v < h.length; v++) {
1136
+ var w = h[v];
1137
+ if (w !== "children" && w !== "key") {
1138
+ be(i), O("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", w), be(null);
1111
1139
  break;
1112
1140
  }
1113
1141
  }
1114
- r.ref !== null && (he(r), w("Invalid attribute `ref` supplied to `React.Fragment`."), he(null));
1142
+ i.ref !== null && (be(i), O("Invalid attribute `ref` supplied to `React.Fragment`."), be(null));
1115
1143
  }
1116
1144
  }
1117
- function It(r, f, g, C, M, k) {
1145
+ function Bt(i, h, v, w, j, L) {
1118
1146
  {
1119
- var R = D(r);
1120
- if (!R) {
1121
- var T = "";
1122
- (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (T += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1123
- var K = Se(M);
1124
- K ? T += K : T += De();
1125
- var U;
1126
- r === null ? U = "null" : Ke(r) ? U = "array" : r !== void 0 && r.$$typeof === n ? (U = "<" + (ae(r.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : U = typeof r, w("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", U, T);
1147
+ var P = T(i);
1148
+ if (!P) {
1149
+ var M = "";
1150
+ (i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (M += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1151
+ var se = je(j);
1152
+ se ? M += se : M += $e();
1153
+ var W;
1154
+ i === null ? W = "null" : Ze(i) ? W = "array" : i !== void 0 && i.$$typeof === n ? (W = "<" + (U(i.type) || "Unknown") + " />", M = " Did you accidentally export a JSX literal instead of a component?") : W = typeof i, O("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", W, M);
1127
1155
  }
1128
- var B = J(r, f, g, M, k);
1129
- if (B == null)
1130
- return B;
1131
- if (R) {
1132
- var ie = f.children;
1133
- if (ie !== void 0)
1134
- if (C)
1135
- if (Ke(ie)) {
1136
- for (var Ie = 0; Ie < ie.length; Ie++)
1137
- At(ie[Ie], r);
1138
- Object.freeze && Object.freeze(ie);
1156
+ var q = le(i, h, v, j, L);
1157
+ if (q == null)
1158
+ return q;
1159
+ if (P) {
1160
+ var me = h.children;
1161
+ if (me !== void 0)
1162
+ if (w)
1163
+ if (Ze(me)) {
1164
+ for (var Ve = 0; Ve < me.length; Ve++)
1165
+ Ut(me[Ve], i);
1166
+ Object.freeze && Object.freeze(me);
1139
1167
  } else
1140
- w("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1168
+ O("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1141
1169
  else
1142
- At(ie, r);
1170
+ Ut(me, i);
1143
1171
  }
1144
- return r === e ? hn(B) : fn(B), B;
1172
+ return i === e ? yn(q) : bn(q), q;
1145
1173
  }
1146
1174
  }
1147
- function pn(r, f, g) {
1148
- return It(r, f, g, !0);
1175
+ function En(i, h, v) {
1176
+ return Bt(i, h, v, !0);
1149
1177
  }
1150
- function mn(r, f, g) {
1151
- return It(r, f, g, !1);
1178
+ function xn(i, h, v) {
1179
+ return Bt(i, h, v, !1);
1152
1180
  }
1153
- var gn = mn, vn = pn;
1154
- Qe.Fragment = e, Qe.jsx = gn, Qe.jsxs = vn;
1155
- }()), Qe;
1181
+ var wn = xn, Cn = En;
1182
+ nt.Fragment = e, nt.jsx = wn, nt.jsxs = Cn;
1183
+ }()), nt;
1156
1184
  }
1157
- process.env.NODE_ENV === "production" ? Pt.exports = Zn() : Pt.exports = Jn();
1158
- var l = Pt.exports;
1159
- function ln(t) {
1160
- return t.title.search("<") > -1 ? /* @__PURE__ */ l.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ l.jsx("button", { children: t.title });
1185
+ process.env.NODE_ENV === "production" ? It.exports = ia() : It.exports = ra();
1186
+ var u = It.exports;
1187
+ function mn(t) {
1188
+ return t.title.search("<") > -1 ? /* @__PURE__ */ u.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ u.jsx("button", { children: t.title });
1161
1189
  }
1162
- const Qn = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1163
- /* @__PURE__ */ l.jsx("circle", { cx: "7", cy: "7", r: "6" }),
1164
- /* @__PURE__ */ l.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
1165
- /* @__PURE__ */ l.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
1166
- ] }), ea = /* @__PURE__ */ l.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ l.jsx(
1190
+ const oa = /* @__PURE__ */ u.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1191
+ /* @__PURE__ */ u.jsx("circle", { cx: "7", cy: "7", r: "6" }),
1192
+ /* @__PURE__ */ u.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
1193
+ /* @__PURE__ */ u.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
1194
+ ] }), sa = /* @__PURE__ */ u.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ u.jsx(
1167
1195
  "path",
1168
1196
  {
1169
1197
  d: `M10.43,4H3.57C3.26,4,3,4.22,3,4.5v1C3,5.78,3.26,6,3.57,6h6.86C10.74,6,11,5.78,11,5.5v-1
@@ -1171,46 +1199,46 @@ C11,4.22,10.74,4,10.43,4z M10.43,8H3.57C3.26,8,3,8.22,3,8.5v1C3,9.78,3.26,10,3.5
1171
1199
  C11,8.22,10.74,8,10.43,8z`
1172
1200
  }
1173
1201
  ) });
1174
- function ta(t) {
1175
- return /* @__PURE__ */ l.jsx(an.Item, { value: t.title, children: /* @__PURE__ */ l.jsxs("div", { children: [
1176
- ea,
1177
- /* @__PURE__ */ l.jsx("span", { children: t.title }),
1178
- /* @__PURE__ */ l.jsx("button", { className: "closeIcon", onClick: () => {
1202
+ function ca(t) {
1203
+ return /* @__PURE__ */ u.jsx(un.Item, { value: t.title, children: /* @__PURE__ */ u.jsxs("div", { children: [
1204
+ sa,
1205
+ /* @__PURE__ */ u.jsx("span", { children: t.title }),
1206
+ /* @__PURE__ */ u.jsx("button", { className: "closeIcon", onClick: () => {
1179
1207
  t.onDelete(t.index);
1180
- }, children: Qn })
1208
+ }, children: oa })
1181
1209
  ] }) }, t.title);
1182
1210
  }
1183
- function na(t) {
1184
- const [n, a] = ne(!1), [e, o] = ne(t.options), u = (p) => {
1185
- t.onDragComplete(p), o(p);
1211
+ function la(t) {
1212
+ const [n, a] = ie(!1), [e, r] = ie(t.options), s = (p) => {
1213
+ t.onDragComplete(p), r(p);
1186
1214
  }, c = (p) => {
1187
- const h = [...e];
1188
- h.splice(p, 1), u(h);
1189
- }, s = [];
1190
- e.forEach((p, h) => {
1191
- s.push(/* @__PURE__ */ l.jsx(ta, { index: h, title: p, onDelete: c }, p));
1215
+ const m = [...e];
1216
+ m.splice(p, 1), s(m);
1217
+ }, l = [];
1218
+ e.forEach((p, m) => {
1219
+ l.push(/* @__PURE__ */ u.jsx(ca, { index: m, title: p, onDelete: c }, p));
1192
1220
  });
1193
1221
  let d = "dropdown draggable";
1194
- return t.subdropdown && (d += " subdropdown"), /* @__PURE__ */ l.jsxs("div", { className: d, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
1195
- /* @__PURE__ */ l.jsx(ln, { title: t.title }),
1196
- /* @__PURE__ */ l.jsx(an.Group, { axis: "y", values: e, onReorder: u, style: { visibility: n ? "visible" : "hidden" }, children: s })
1222
+ return t.subdropdown && (d += " subdropdown"), /* @__PURE__ */ u.jsxs("div", { className: d, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
1223
+ /* @__PURE__ */ u.jsx(mn, { title: t.title }),
1224
+ /* @__PURE__ */ u.jsx(un.Group, { axis: "y", values: e, onReorder: s, style: { visibility: n ? "visible" : "hidden" }, children: l })
1197
1225
  ] });
1198
1226
  }
1199
- function aa(t) {
1200
- const [n, a] = ne(!1), e = [];
1201
- t.options.map((u, c) => {
1202
- t.onSelect !== void 0 && (u.onSelect = t.onSelect), e.push(/* @__PURE__ */ l.jsx(ra, { option: u }, c));
1227
+ function ua(t) {
1228
+ const [n, a] = ie(!1), e = [];
1229
+ t.options.map((s, c) => {
1230
+ t.onSelect !== void 0 && (s.onSelect = t.onSelect), e.push(/* @__PURE__ */ u.jsx(da, { option: s }, c));
1203
1231
  });
1204
- let o = "dropdown";
1205
- return t.subdropdown && (o += " subdropdown"), /* @__PURE__ */ l.jsxs(
1232
+ let r = "dropdown";
1233
+ return t.subdropdown && (r += " subdropdown"), /* @__PURE__ */ u.jsxs(
1206
1234
  "div",
1207
1235
  {
1208
- className: o,
1236
+ className: r,
1209
1237
  onMouseEnter: () => a(!0),
1210
1238
  onMouseLeave: () => a(!1),
1211
1239
  children: [
1212
- /* @__PURE__ */ l.jsx(ln, { title: t.title }),
1213
- /* @__PURE__ */ l.jsx(
1240
+ /* @__PURE__ */ u.jsx(mn, { title: t.title }),
1241
+ /* @__PURE__ */ u.jsx(
1214
1242
  "ul",
1215
1243
  {
1216
1244
  style: { visibility: n ? "visible" : "hidden" },
@@ -1221,26 +1249,26 @@ function aa(t) {
1221
1249
  }
1222
1250
  );
1223
1251
  }
1224
- function ra(t) {
1225
- const { option: n } = t, [a, e] = ne("");
1226
- let o;
1252
+ function da(t) {
1253
+ const { option: n } = t, [a, e] = ie("");
1254
+ let r;
1227
1255
  switch (n.type) {
1228
1256
  case "draggable":
1229
- o = /* @__PURE__ */ l.jsx(
1230
- na,
1257
+ r = /* @__PURE__ */ u.jsx(
1258
+ la,
1231
1259
  {
1232
1260
  title: n.title,
1233
1261
  options: n.value,
1234
- onDragComplete: (u) => {
1235
- n.onDragComplete !== void 0 && n.onDragComplete(u);
1262
+ onDragComplete: (s) => {
1263
+ n.onDragComplete !== void 0 && n.onDragComplete(s);
1236
1264
  },
1237
1265
  subdropdown: !0
1238
1266
  }
1239
1267
  );
1240
1268
  break;
1241
1269
  case "dropdown":
1242
- o = /* @__PURE__ */ l.jsx(
1243
- aa,
1270
+ r = /* @__PURE__ */ u.jsx(
1271
+ ua,
1244
1272
  {
1245
1273
  title: n.title,
1246
1274
  options: n.value,
@@ -1250,7 +1278,7 @@ function ra(t) {
1250
1278
  );
1251
1279
  break;
1252
1280
  case "option":
1253
- o = /* @__PURE__ */ l.jsx(
1281
+ r = /* @__PURE__ */ u.jsx(
1254
1282
  "button",
1255
1283
  {
1256
1284
  onClick: () => {
@@ -1261,22 +1289,22 @@ function ra(t) {
1261
1289
  );
1262
1290
  break;
1263
1291
  }
1264
- return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: o }, Gn());
1292
+ return /* @__PURE__ */ u.jsx("li", { className: a === n.title ? "selected" : "", children: r }, qn());
1265
1293
  }
1266
- function Ka(t) {
1294
+ function ni(t) {
1267
1295
  let n;
1268
1296
  function a(c) {
1269
- var d, p, h, b, x, S, O, m, v;
1270
- let s;
1297
+ var d, p, m, b, x, C, S, F, Q;
1298
+ let l;
1271
1299
  switch (c.event) {
1272
1300
  case "custom":
1273
- I.dispatchEvent({ type: N.CUSTOM, value: c.data });
1301
+ k.dispatchEvent({ type: A.CUSTOM, value: c.data });
1274
1302
  break;
1275
1303
  case "selectComponent":
1276
- I.dispatchEvent({ type: N.SELECT_DROPDOWN, value: c.data });
1304
+ k.dispatchEvent({ type: A.SELECT_DROPDOWN, value: c.data });
1277
1305
  break;
1278
1306
  case "draggableListUpdate":
1279
- I.dispatchEvent({ type: N.DRAG_UPDATE, value: c.data });
1307
+ k.dispatchEvent({ type: A.DRAG_UPDATE, value: c.data });
1280
1308
  break;
1281
1309
  case "addFolder":
1282
1310
  (d = t.components.get("debug")) == null || d.addFolder(c.data.name, c.data.params, c.data.parent);
@@ -1285,7 +1313,7 @@ function Ka(t) {
1285
1313
  (p = t.components.get("debug")) == null || p.bind(c.data.name, c.data.params, c.data.parent);
1286
1314
  break;
1287
1315
  case "updateBind":
1288
- (h = t.components.get("debug")) == null || h.triggerBind(c.data.id, c.data.value);
1316
+ (m = t.components.get("debug")) == null || m.triggerBind(c.data.id, c.data.value);
1289
1317
  break;
1290
1318
  case "addButton":
1291
1319
  (b = t.components.get("debug")) == null || b.button(c.data.name, c.data.callback, c.data.parent);
@@ -1294,71 +1322,77 @@ function Ka(t) {
1294
1322
  (x = t.components.get("debug")) == null || x.triggerButton(c.data.id);
1295
1323
  break;
1296
1324
  case "setSheet":
1297
- s = (S = t.components.get("theatre")) == null ? void 0 : S.sheets.get(c.data.sheet), s !== void 0 && (n = s, Ze.setSelection([s]));
1325
+ l = (C = t.components.get("theatre")) == null ? void 0 : C.sheets.get(c.data.sheet), l !== void 0 && (n = l, et.setSelection([l]));
1298
1326
  break;
1299
1327
  case "setSheetObject":
1300
- s = (O = t.components.get("theatre")) == null ? void 0 : O.sheetObjects.get(`${c.data.sheet}_${c.data.key}`), s !== void 0 && Ze.setSelection([s]);
1328
+ l = (S = t.components.get("theatre")) == null ? void 0 : S.sheetObjects.get(`${c.data.sheet}_${c.data.key}`), l !== void 0 && et.setSelection([l]);
1301
1329
  break;
1302
1330
  case "updateSheetObject":
1303
- s = (m = t.components.get("theatre")) == null ? void 0 : m.sheetObjectCBs.get(c.data.sheetObject), s !== void 0 && s(c.data.values);
1331
+ l = (F = t.components.get("theatre")) == null ? void 0 : F.sheetObjectCBs.get(c.data.sheetObject), l !== void 0 && l(c.data.values);
1304
1332
  break;
1305
1333
  case "updateTimeline":
1306
- n = (v = t.components.get("theatre")) == null ? void 0 : v.sheets.get(c.data.sheet), n !== void 0 && (n.sequence.position = c.data.position);
1334
+ n = (Q = t.components.get("theatre")) == null ? void 0 : Q.sheets.get(c.data.sheet), n !== void 0 && (n.sequence.position = c.data.position);
1307
1335
  break;
1308
1336
  case "getObject":
1309
- I.dispatchEvent({ type: N.GET_OBJECT, value: c.data });
1337
+ k.dispatchEvent({ type: A.GET_OBJECT, value: c.data });
1310
1338
  break;
1311
1339
  case "updateObject":
1312
- I.dispatchEvent({ type: N.UPDATE_OBJECT, value: c.data });
1340
+ k.dispatchEvent({ type: A.UPDATE_OBJECT, value: c.data });
1313
1341
  break;
1314
1342
  case "createTexture":
1315
- I.dispatchEvent({ type: N.CREATE_TEXTURE, value: c.data });
1343
+ k.dispatchEvent({ type: A.CREATE_TEXTURE, value: c.data });
1316
1344
  break;
1317
1345
  case "requestMethod":
1318
- I.dispatchEvent({ type: N.REQUEST_METHOD, value: c.data });
1346
+ k.dispatchEvent({ type: A.REQUEST_METHOD, value: c.data });
1319
1347
  break;
1320
1348
  }
1321
1349
  }
1322
1350
  function e(c) {
1323
1351
  switch (c.event) {
1324
1352
  case "custom":
1325
- I.dispatchEvent({ type: N.CUSTOM, value: c.data });
1353
+ k.dispatchEvent({ type: A.CUSTOM, value: c.data });
1326
1354
  break;
1327
1355
  case "setObject":
1328
- I.dispatchEvent({ type: N.SET_OBJECT, value: c.data });
1356
+ k.dispatchEvent({ type: A.SET_OBJECT, value: c.data });
1329
1357
  break;
1330
1358
  case "setScene":
1331
- I.dispatchEvent({ type: N.SET_SCENE, value: c.data });
1359
+ k.dispatchEvent({ type: A.SET_SCENE, value: c.data });
1360
+ break;
1361
+ case "addCamera":
1362
+ k.dispatchEvent({ type: A.ADD_CAMERA, value: c.data });
1363
+ break;
1364
+ case "removeCamera":
1365
+ k.dispatchEvent({ type: A.REMOVE_CAMERA, value: c.data });
1332
1366
  break;
1333
1367
  }
1334
1368
  }
1335
- function o() {
1336
- Ze.ui.hide();
1369
+ function r() {
1370
+ et.ui.hide();
1337
1371
  }
1338
- function u() {
1339
- Ze.ui.restore(), Ze.onSelectionChange((p) => {
1340
- p.length < 1 || p.forEach((h) => {
1341
- var O;
1342
- let b = h.address.sheetId, x = "setSheet", S = {};
1343
- switch (h.type) {
1372
+ function s() {
1373
+ et.ui.restore(), et.onSelectionChange((p) => {
1374
+ p.length < 1 || p.forEach((m) => {
1375
+ var S;
1376
+ let b = m.address.sheetId, x = "setSheet", C = {};
1377
+ switch (m.type) {
1344
1378
  case "Theatre_Sheet_PublicAPI":
1345
- x = "setSheet", S = {
1346
- sheet: h.address.sheetId
1347
- }, n = (O = t.components.get("theatre")) == null ? void 0 : O.sheets.get(h.address.sheetId);
1379
+ x = "setSheet", C = {
1380
+ sheet: m.address.sheetId
1381
+ }, n = (S = t.components.get("theatre")) == null ? void 0 : S.sheets.get(m.address.sheetId);
1348
1382
  break;
1349
1383
  case "Theatre_SheetObject_PublicAPI":
1350
- x = "setSheetObject", b += `_${h.address.objectKey}`, S = {
1384
+ x = "setSheetObject", b += `_${m.address.objectKey}`, C = {
1351
1385
  id: b,
1352
- sheet: h.address.sheetId,
1353
- key: h.address.objectKey
1386
+ sheet: m.address.sheetId,
1387
+ key: m.address.objectKey
1354
1388
  };
1355
1389
  break;
1356
1390
  }
1357
- t.send({ event: x, target: "app", data: S });
1391
+ t.send({ event: x, target: "app", data: C });
1358
1392
  });
1359
1393
  });
1360
1394
  let c = 0;
1361
- const s = () => {
1395
+ const l = () => {
1362
1396
  if (n !== void 0 && c !== n.sequence.position) {
1363
1397
  c = n.sequence.position;
1364
1398
  const p = n;
@@ -1372,15 +1406,15 @@ function Ka(t) {
1372
1406
  });
1373
1407
  }
1374
1408
  }, d = () => {
1375
- s(), requestAnimationFrame(d);
1409
+ l(), requestAnimationFrame(d);
1376
1410
  };
1377
- s(), d();
1411
+ l(), d();
1378
1412
  }
1379
1413
  t.listen((c) => {
1380
1414
  t.editor ? e(c) : a(c);
1381
- }), t.editor ? u() : o();
1415
+ }), t.editor ? s() : r();
1382
1416
  }
1383
- const ia = `out vec3 worldPosition;
1417
+ const fa = `out vec3 worldPosition;
1384
1418
  uniform float uDistance;
1385
1419
 
1386
1420
  void main() {
@@ -1389,7 +1423,7 @@ void main() {
1389
1423
  worldPosition.xz += cameraPosition.xz;
1390
1424
 
1391
1425
  gl_Position = projectionMatrix * modelViewMatrix * vec4(worldPosition, 1.0);
1392
- }`, oa = `out vec4 fragColor;
1426
+ }`, ha = `out vec4 fragColor;
1393
1427
  in vec3 worldPosition;
1394
1428
 
1395
1429
  uniform float uDivisions;
@@ -1457,14 +1491,14 @@ void main() {
1457
1491
 
1458
1492
  if (fragColor.a <= 0.0) discard;
1459
1493
  }`;
1460
- class sa extends Qt {
1494
+ class pa extends rn {
1461
1495
  constructor(n) {
1462
1496
  super({
1463
1497
  extensions: {
1464
1498
  derivatives: !0
1465
1499
  },
1466
- glslVersion: wn,
1467
- side: Cn,
1500
+ glslVersion: Rn,
1501
+ side: Pn,
1468
1502
  transparent: !0,
1469
1503
  uniforms: {
1470
1504
  uScale: {
@@ -1474,7 +1508,7 @@ class sa extends Qt {
1474
1508
  value: (n == null ? void 0 : n.divisions) !== void 0 ? n == null ? void 0 : n.divisions : 10
1475
1509
  },
1476
1510
  uColor: {
1477
- value: (n == null ? void 0 : n.color) !== void 0 ? n == null ? void 0 : n.color : new kt(16777215)
1511
+ value: (n == null ? void 0 : n.color) !== void 0 ? n == null ? void 0 : n.color : new Nt(16777215)
1478
1512
  },
1479
1513
  uDistance: {
1480
1514
  value: (n == null ? void 0 : n.distance) !== void 0 ? n == null ? void 0 : n.distance : 1e4
@@ -1486,25 +1520,25 @@ class sa extends Qt {
1486
1520
  value: (n == null ? void 0 : n.gridOpacity) !== void 0 ? n == null ? void 0 : n.gridOpacity : 0.25
1487
1521
  }
1488
1522
  },
1489
- vertexShader: ia,
1490
- fragmentShader: oa,
1523
+ vertexShader: fa,
1524
+ fragmentShader: ha,
1491
1525
  name: "InfiniteGrid",
1492
1526
  depthWrite: !1
1493
1527
  });
1494
1528
  }
1495
1529
  }
1496
- class ca extends Sn {
1530
+ class ma extends jn {
1497
1531
  constructor() {
1498
- const a = new sa();
1499
- super(new On(2, 2), a);
1500
- $(this, "gridMaterial");
1532
+ const a = new pa();
1533
+ super(new _n(2, 2), a);
1534
+ Z(this, "gridMaterial");
1501
1535
  this.gridMaterial = a, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
1502
1536
  }
1503
1537
  update() {
1504
1538
  this.gridMaterial.needsUpdate = !0;
1505
1539
  }
1506
1540
  }
1507
- const la = `#include <common>
1541
+ const ga = `#include <common>
1508
1542
  #include <batching_pars_vertex>
1509
1543
  #include <uv_pars_vertex>
1510
1544
  #include <color_pars_vertex>
@@ -1534,7 +1568,7 @@ void main() {
1534
1568
  #include <logdepthbuf_vertex>
1535
1569
  #include <clipping_planes_vertex>
1536
1570
  #include <worldpos_vertex>
1537
- }`, ua = `
1571
+ }`, va = `
1538
1572
  #include <common>
1539
1573
  #include <uv_pars_fragment>
1540
1574
  #include <clipping_planes_pars_fragment>
@@ -1543,51 +1577,51 @@ void main() {
1543
1577
  #include <clipping_planes_fragment>
1544
1578
  gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
1545
1579
  }`;
1546
- class da extends Qt {
1580
+ class ba extends rn {
1547
1581
  constructor() {
1548
1582
  super({
1549
1583
  defines: {
1550
1584
  USE_UV: ""
1551
1585
  },
1552
- vertexShader: la,
1553
- fragmentShader: ua
1586
+ vertexShader: ga,
1587
+ fragmentShader: va
1554
1588
  });
1555
1589
  }
1556
1590
  }
1557
- function jt(t) {
1558
- const [n, a] = ne(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
1559
- return /* @__PURE__ */ l.jsxs("div", { className: `accordion ${e ? "hide" : ""}`, children: [
1560
- /* @__PURE__ */ l.jsxs(
1591
+ function Lt(t) {
1592
+ const [n, a] = ie(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
1593
+ return /* @__PURE__ */ u.jsxs("div", { className: `accordion ${e ? "hide" : ""}`, children: [
1594
+ /* @__PURE__ */ u.jsxs(
1561
1595
  "button",
1562
1596
  {
1563
1597
  className: "toggle",
1564
1598
  onClick: () => {
1565
- const o = !n;
1566
- t.onToggle !== void 0 && t.onToggle(o), a(o);
1599
+ const r = !n;
1600
+ t.onToggle !== void 0 && t.onToggle(r), a(r);
1567
1601
  },
1568
1602
  children: [
1569
- /* @__PURE__ */ l.jsx(
1603
+ /* @__PURE__ */ u.jsx(
1570
1604
  "p",
1571
1605
  {
1572
1606
  className: `status ${n ? "open" : ""}`,
1573
1607
  children: "Toggle"
1574
1608
  }
1575
1609
  ),
1576
- /* @__PURE__ */ l.jsx("p", { className: "label", children: t.label })
1610
+ /* @__PURE__ */ u.jsx("p", { className: "label", children: t.label })
1577
1611
  ]
1578
1612
  }
1579
1613
  ),
1580
1614
  t.button,
1581
- /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { children: t.children }) })
1615
+ /* @__PURE__ */ u.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ u.jsx("div", { children: t.children }) })
1582
1616
  ] });
1583
1617
  }
1584
- function un(t) {
1585
- const [n, a] = ne(!1), e = t.child.children.length > 0, o = [];
1586
- return t.child.children.length > 0 && t.child.children.map((u) => {
1587
- o.push(/* @__PURE__ */ l.jsx(un, { child: u, three: t.three }, Math.random()));
1588
- }), /* @__PURE__ */ l.jsxs("div", { className: "childObject", children: [
1589
- /* @__PURE__ */ l.jsxs("div", { className: "child", children: [
1590
- e ? /* @__PURE__ */ l.jsx(
1618
+ function gn(t) {
1619
+ const [n, a] = ie(!1), e = t.child.children.length > 0, r = [];
1620
+ return t.child.children.length > 0 && t.child.children.map((s) => {
1621
+ r.push(/* @__PURE__ */ u.jsx(gn, { child: s, three: t.three }, Math.random()));
1622
+ }), /* @__PURE__ */ u.jsxs("div", { className: "childObject", children: [
1623
+ /* @__PURE__ */ u.jsxs("div", { className: "child", children: [
1624
+ e ? /* @__PURE__ */ u.jsx(
1591
1625
  "button",
1592
1626
  {
1593
1627
  className: "status",
@@ -1599,7 +1633,7 @@ function un(t) {
1599
1633
  }
1600
1634
  }
1601
1635
  ) : null,
1602
- /* @__PURE__ */ l.jsx(
1636
+ /* @__PURE__ */ u.jsx(
1603
1637
  "button",
1604
1638
  {
1605
1639
  className: "name",
@@ -1612,32 +1646,32 @@ function un(t) {
1612
1646
  children: t.child.name.length > 0 ? `${t.child.name} (${t.child.type})` : `${t.child.type}::${t.child.uuid}`
1613
1647
  }
1614
1648
  ),
1615
- /* @__PURE__ */ l.jsx("div", { className: `icon ${Hn(t.child)}` })
1649
+ /* @__PURE__ */ u.jsx("div", { className: `icon ${ta(t.child)}` })
1616
1650
  ] }),
1617
- /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { className: "container", children: o }) })
1651
+ /* @__PURE__ */ u.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ u.jsx("div", { className: "container", children: r }) })
1618
1652
  ] }, Math.random());
1619
1653
  }
1620
- function fa(t) {
1654
+ function ya(t) {
1621
1655
  const n = [];
1622
1656
  return t.child.children.map((a) => {
1623
- n.push(/* @__PURE__ */ l.jsx(un, { child: a, three: t.three }, Math.random()));
1624
- }), /* @__PURE__ */ l.jsx("div", { className: `scene ${t.class !== void 0 ? t.class : ""}`, children: n });
1657
+ n.push(/* @__PURE__ */ u.jsx(gn, { child: a, three: t.three }, Math.random()));
1658
+ }), /* @__PURE__ */ u.jsx("div", { className: `scene ${t.class !== void 0 ? t.class : ""}`, children: n });
1625
1659
  }
1626
- const ha = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1627
- function pa(t) {
1660
+ const Ea = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1661
+ function xa(t) {
1628
1662
  return "items" in t;
1629
1663
  }
1630
- function $e(t) {
1631
- function n(e, o) {
1632
- console.log("onChange:", e, o);
1664
+ function Le(t) {
1665
+ function n(e, r) {
1666
+ console.log("onChange:", e, r);
1633
1667
  }
1634
1668
  const a = [];
1635
1669
  return t.items.forEach((e) => {
1636
- pa(e) ? a.push(
1637
- /* @__PURE__ */ l.jsx($e, { title: e.title, items: e.items }, Math.random())
1670
+ xa(e) ? a.push(
1671
+ /* @__PURE__ */ u.jsx(Le, { title: e.title, items: e.items }, Math.random())
1638
1672
  ) : a.push(
1639
- /* @__PURE__ */ l.jsx(
1640
- et,
1673
+ /* @__PURE__ */ u.jsx(
1674
+ at,
1641
1675
  {
1642
1676
  title: e.title,
1643
1677
  prop: e.prop,
@@ -1647,19 +1681,19 @@ function $e(t) {
1647
1681
  max: e.max,
1648
1682
  step: e.step,
1649
1683
  disabled: e.disabled,
1650
- onChange: (o, u) => {
1651
- e.onChange !== void 0 ? e.onChange(o, u) : n(o, u);
1684
+ onChange: (r, s) => {
1685
+ e.onChange !== void 0 ? e.onChange(r, s) : n(r, s);
1652
1686
  }
1653
1687
  },
1654
1688
  Math.random()
1655
1689
  )
1656
1690
  );
1657
- }), /* @__PURE__ */ l.jsx(jt, { label: t.title, open: !1, children: a });
1691
+ }), /* @__PURE__ */ u.jsx(Lt, { label: t.title, open: !1, children: a });
1658
1692
  }
1659
- function ma(t) {
1693
+ function wa(t) {
1660
1694
  return !(t === "alphaHash" || t === "alphaToCoverage" || t === "attenuationDistance" || t === "colorWrite" || t === "combine" || t === "defaultAttributeValues" || t === "depthFunc" || t === "forceSinglePass" || t === "glslVersion" || t === "linewidth" || t === "normalMapType" || t === "precision" || t === "premultipliedAlpha" || t === "shadowSide" || t === "side" || t === "toneMapped" || t === "uniformsGroups" || t === "uniformsNeedUpdate" || t === "userData" || t === "vertexColors" || t === "version" || t === "wireframeLinecap" || t === "wireframeLinejoin" || t === "wireframeLinewidth" || t.slice(0, 5) === "blend" || t.slice(0, 4) === "clip" || t.slice(0, 7) === "polygon" || t.slice(0, 7) === "stencil" || t.slice(0, 2) === "is");
1661
1695
  }
1662
- function Oe(t) {
1696
+ function _e(t) {
1663
1697
  switch (t) {
1664
1698
  case "alphaMap":
1665
1699
  return "Alpha Map";
@@ -1808,81 +1842,81 @@ function Oe(t) {
1808
1842
  }
1809
1843
  return t;
1810
1844
  }
1811
- function ga(t) {
1845
+ function Ca(t) {
1812
1846
  return t.toLowerCase().search("intensity") > -1 || t === "anisotropyRotation" || t === "bumpScale" || t === "clearcoatRoughness" || t === "displacementBias" || t === "displacementScale" || t === "metalness" || t === "opacity" || t === "reflectivity" || t === "refractionRatio" || t === "roughness" || t === "sheenRoughness" || t === "thickness";
1813
1847
  }
1814
- function va() {
1848
+ function Sa() {
1815
1849
  const t = document.createElement("input");
1816
1850
  return t.type = "file", new Promise((n, a) => {
1817
1851
  t.addEventListener("change", function() {
1818
1852
  if (t.files === null)
1819
1853
  a();
1820
1854
  else {
1821
- const e = t.files[0], o = new FileReader();
1822
- o.onload = function(u) {
1823
- n(u.target.result);
1824
- }, o.readAsDataURL(e);
1855
+ const e = t.files[0], r = new FileReader();
1856
+ r.onload = function(s) {
1857
+ n(s.target.result);
1858
+ }, r.readAsDataURL(e);
1825
1859
  }
1826
1860
  }), t.click();
1827
1861
  });
1828
1862
  }
1829
- function Vt(t, n, a) {
1863
+ function Kt(t, n, a) {
1830
1864
  const e = [];
1831
- for (const o in t) {
1832
- if (!ma(o))
1865
+ for (const r in t) {
1866
+ if (!wa(r))
1833
1867
  continue;
1834
- const u = typeof t[o], c = t[o];
1835
- if (u === "boolean" || u === "number" || u === "string") {
1836
- const s = {
1837
- title: Oe(o),
1838
- prop: o,
1839
- type: u,
1868
+ const s = typeof t[r], c = t[r];
1869
+ if (s === "boolean" || s === "number" || s === "string") {
1870
+ const l = {
1871
+ title: _e(r),
1872
+ prop: r,
1873
+ type: s,
1840
1874
  value: c,
1841
1875
  min: void 0,
1842
1876
  max: void 0,
1843
1877
  onChange: (d, p) => {
1844
1878
  var b;
1845
- a.updateObject(n.uuid, `material.${d}`, p), u === "boolean" && a.updateObject(n.uuid, "material.needsUpdate", !0);
1846
- const h = (b = a.scene) == null ? void 0 : b.getObjectByProperty("uuid", n.uuid);
1847
- h !== void 0 && q(h, `material.${d}`, p);
1879
+ a.updateObject(n.uuid, `material.${d}`, p), s === "boolean" && a.updateObject(n.uuid, "material.needsUpdate", !0);
1880
+ const m = (b = a.scene) == null ? void 0 : b.getObjectByProperty("uuid", n.uuid);
1881
+ m !== void 0 && ee(m, `material.${d}`, p);
1848
1882
  }
1849
1883
  };
1850
- ga(o) && (s.value = Number(c), s.type = "range", s.min = 0, s.max = 1, s.step = 0.01), e.push(s);
1851
- } else if (u === "object")
1884
+ Ca(r) && (l.value = Number(c), l.type = "range", l.min = 0, l.max = 1, l.step = 0.01), e.push(l);
1885
+ } else if (s === "object")
1852
1886
  if (c.isColor)
1853
1887
  e.push({
1854
- title: Oe(o),
1855
- prop: o,
1888
+ title: _e(r),
1889
+ prop: r,
1856
1890
  type: "color",
1857
1891
  value: c,
1858
- onChange: (s, d) => {
1892
+ onChange: (l, d) => {
1859
1893
  var b;
1860
- const p = new kt(d);
1861
- a.updateObject(n.uuid, `material.${s}`, p);
1862
- const h = (b = a.scene) == null ? void 0 : b.getObjectByProperty("uuid", n.uuid);
1863
- h !== void 0 && q(h, `material.${s}`, p);
1894
+ const p = new Nt(d);
1895
+ a.updateObject(n.uuid, `material.${l}`, p);
1896
+ const m = (b = a.scene) == null ? void 0 : b.getObjectByProperty("uuid", n.uuid);
1897
+ m !== void 0 && ee(m, `material.${l}`, p);
1864
1898
  }
1865
1899
  });
1866
1900
  else if (Array.isArray(c)) {
1867
- const s = [];
1901
+ const l = [];
1868
1902
  for (const d in c)
1869
- s.push({
1903
+ l.push({
1870
1904
  title: `${d}`,
1871
1905
  type: `${typeof c[d]}`,
1872
1906
  value: c[d],
1873
- onChange: (p, h) => {
1907
+ onChange: (p, m) => {
1874
1908
  var x;
1875
- a.updateObject(n.uuid, `material.${o}`, h);
1909
+ a.updateObject(n.uuid, `material.${r}`, m);
1876
1910
  const b = (x = a.scene) == null ? void 0 : x.getObjectByProperty("uuid", n.uuid);
1877
- b !== void 0 && q(b, `material.${o}`, h);
1911
+ b !== void 0 && ee(b, `material.${r}`, m);
1878
1912
  }
1879
1913
  });
1880
1914
  e.push({
1881
- title: Oe(o),
1882
- items: s
1915
+ title: _e(r),
1916
+ items: l
1883
1917
  });
1884
1918
  } else {
1885
- const s = [];
1919
+ const l = [];
1886
1920
  for (const d in c) {
1887
1921
  const p = c[d];
1888
1922
  switch (typeof p) {
@@ -1890,66 +1924,66 @@ function Vt(t, n, a) {
1890
1924
  case "number":
1891
1925
  case "string":
1892
1926
  d === "src" ? e.push({
1893
- title: Oe(o),
1927
+ title: _e(r),
1894
1928
  type: "image",
1895
1929
  value: p,
1896
1930
  onChange: (b, x) => {
1897
- var O;
1898
- a.createTexture(n.uuid, `material.${o}`, x);
1899
- const S = (O = a.scene) == null ? void 0 : O.getObjectByProperty("uuid", n.uuid);
1900
- S !== void 0 && Mt(x).then((m) => {
1901
- q(S, `material.${o}`, m), q(S, "material.needsUpdate", !0);
1931
+ var S;
1932
+ a.createTexture(n.uuid, `material.${r}`, x);
1933
+ const C = (S = a.scene) == null ? void 0 : S.getObjectByProperty("uuid", n.uuid);
1934
+ C !== void 0 && Dt(x).then((F) => {
1935
+ ee(C, `material.${r}`, F), ee(C, "material.needsUpdate", !0);
1902
1936
  });
1903
1937
  }
1904
- }) : s.push({
1905
- title: `${Oe(d)}`,
1906
- prop: `material.${o}.${d}`,
1907
- type: `${typeof t[o][d]}`,
1938
+ }) : l.push({
1939
+ title: `${_e(d)}`,
1940
+ prop: `material.${r}.${d}`,
1941
+ type: `${typeof t[r][d]}`,
1908
1942
  value: c[d],
1909
1943
  onChange: (b, x) => {
1910
- var O;
1911
- a.updateObject(n.uuid, `material.${o}.${d}`, x);
1912
- const S = (O = a.scene) == null ? void 0 : O.getObjectByProperty("uuid", n.uuid);
1913
- S !== void 0 && q(S, `material.${o}.${d}`, x);
1944
+ var S;
1945
+ a.updateObject(n.uuid, `material.${r}.${d}`, x);
1946
+ const C = (S = a.scene) == null ? void 0 : S.getObjectByProperty("uuid", n.uuid);
1947
+ C !== void 0 && ee(C, `material.${r}.${d}`, x);
1914
1948
  }
1915
1949
  });
1916
1950
  break;
1917
1951
  case "object":
1918
- p.value !== void 0 && p.value.src !== void 0 ? s.push({
1919
- title: Oe(d),
1952
+ p.value !== void 0 && p.value.src !== void 0 ? l.push({
1953
+ title: _e(d),
1920
1954
  type: "image",
1921
1955
  value: p.value.src,
1922
1956
  onChange: (b, x) => {
1923
- var O;
1924
- a.createTexture(n.uuid, `material.${o}.${d}.value`, x);
1925
- const S = (O = a.scene) == null ? void 0 : O.getObjectByProperty("uuid", n.uuid);
1926
- S !== void 0 && Mt(x).then((m) => {
1927
- q(S, `material.${o}.${d}.value`, m);
1957
+ var S;
1958
+ a.createTexture(n.uuid, `material.${r}.${d}.value`, x);
1959
+ const C = (S = a.scene) == null ? void 0 : S.getObjectByProperty("uuid", n.uuid);
1960
+ C !== void 0 && Dt(x).then((F) => {
1961
+ ee(C, `material.${r}.${d}.value`, F);
1928
1962
  });
1929
1963
  }
1930
- }) : s.push({
1964
+ }) : l.push({
1931
1965
  title: d,
1932
1966
  type: `${typeof p.value}`,
1933
1967
  value: p.value,
1934
1968
  onChange: (b, x) => {
1935
- var O;
1936
- a.updateObject(n.uuid, `material.${o}.${d}.value`, x);
1937
- const S = (O = a.scene) == null ? void 0 : O.getObjectByProperty("uuid", n.uuid);
1938
- S !== void 0 && q(S, `material.${o}.${d}.value`, x);
1969
+ var S;
1970
+ a.updateObject(n.uuid, `material.${r}.${d}.value`, x);
1971
+ const C = (S = a.scene) == null ? void 0 : S.getObjectByProperty("uuid", n.uuid);
1972
+ C !== void 0 && ee(C, `material.${r}.${d}.value`, x);
1939
1973
  }
1940
1974
  });
1941
1975
  break;
1942
1976
  }
1943
1977
  }
1944
- s.length > 0 && e.push({
1945
- title: Oe(o),
1946
- items: s
1978
+ l.length > 0 && e.push({
1979
+ title: _e(r),
1980
+ items: l
1947
1981
  });
1948
1982
  }
1949
1983
  else
1950
- c !== void 0 && console.log("other:", o, u, c);
1984
+ c !== void 0 && console.log("other:", r, s, c);
1951
1985
  }
1952
- return e.sort((o, u) => o.title < u.title ? -1 : o.title > u.title ? 1 : 0), e.push({
1986
+ return e.sort((r, s) => r.title < s.title ? -1 : r.title > s.title ? 1 : 0), e.push({
1953
1987
  title: "Update Material",
1954
1988
  type: "button",
1955
1989
  onChange: () => {
@@ -1957,63 +1991,63 @@ function Vt(t, n, a) {
1957
1991
  }
1958
1992
  }), e;
1959
1993
  }
1960
- function ba(t, n) {
1994
+ function Oa(t, n) {
1961
1995
  const a = t.material;
1962
1996
  if (Array.isArray(a)) {
1963
- const e = [], o = a.length;
1964
- for (let u = 0; u < o; u++)
1997
+ const e = [], r = a.length;
1998
+ for (let s = 0; s < r; s++)
1965
1999
  e.push(
1966
- /* @__PURE__ */ l.jsx(
1967
- $e,
2000
+ /* @__PURE__ */ u.jsx(
2001
+ Le,
1968
2002
  {
1969
- title: `Material ${u}`,
1970
- items: Vt(a[u], t, n)
2003
+ title: `Material ${s}`,
2004
+ items: Kt(a[s], t, n)
1971
2005
  },
1972
- `Material ${u}`
2006
+ `Material ${s}`
1973
2007
  )
1974
2008
  );
1975
- return /* @__PURE__ */ l.jsx(l.Fragment, { children: e });
2009
+ return /* @__PURE__ */ u.jsx(u.Fragment, { children: e });
1976
2010
  } else
1977
- return /* @__PURE__ */ l.jsx(
1978
- $e,
2011
+ return /* @__PURE__ */ u.jsx(
2012
+ Le,
1979
2013
  {
1980
2014
  title: "Material",
1981
- items: Vt(a, t, n)
2015
+ items: Kt(a, t, n)
1982
2016
  }
1983
2017
  );
1984
2018
  }
1985
- function et(t) {
2019
+ function at(t) {
1986
2020
  let n = t.value;
1987
- n !== void 0 && n.isColor !== void 0 && (n = Yn(t.value));
1988
- const [a, e] = ne(n), o = ye(null), u = ye(null), c = ye(null);
1989
- Be(() => {
1990
- var F;
1991
- let h = !1, b = -1, x = 0, S = Number(a);
1992
- const O = (V) => {
1993
- h = !0, x = S, b = V.clientX;
1994
- }, m = (V) => {
1995
- if (!h)
2021
+ n !== void 0 && n.isColor !== void 0 && (n = Jn(t.value));
2022
+ const [a, e] = ie(n), r = xe(null), s = xe(null), c = xe(null);
2023
+ Ne(() => {
2024
+ var K;
2025
+ let m = !1, b = -1, x = 0, C = Number(a);
2026
+ const S = (de) => {
2027
+ m = !0, x = C, b = de.clientX;
2028
+ }, F = (de) => {
2029
+ if (!m)
1996
2030
  return;
1997
- const Z = t.step !== void 0 ? t.step : 1, se = (V.clientX - b) * Z;
1998
- S = Number((x + se).toFixed(4)), u.current !== null && (u.current.value = S.toString()), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, S);
1999
- }, v = () => {
2000
- h = !1;
2001
- }, y = () => {
2002
- h = !1;
2003
- }, w = t.type === "number";
2004
- return w && ((F = o.current) == null || F.addEventListener("mousedown", O, !1), document.addEventListener("mouseup", v, !1), document.addEventListener("mousemove", m, !1), document.addEventListener("contextmenu", y, !1)), () => {
2005
- var V;
2006
- w && ((V = o.current) == null || V.removeEventListener("mousedown", O), document.removeEventListener("mouseup", v), document.removeEventListener("mousemove", m), document.removeEventListener("contextmenu", y));
2031
+ const ce = t.step !== void 0 ? t.step : 1, te = (de.clientX - b) * ce;
2032
+ C = Number((x + te).toFixed(4)), s.current !== null && (s.current.value = C.toString()), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, C);
2033
+ }, Q = () => {
2034
+ m = !1;
2035
+ }, H = () => {
2036
+ m = !1;
2037
+ }, O = t.type === "number";
2038
+ return O && ((K = r.current) == null || K.addEventListener("mousedown", S, !1), document.addEventListener("mouseup", Q, !1), document.addEventListener("mousemove", F, !1), document.addEventListener("contextmenu", H, !1)), () => {
2039
+ var de;
2040
+ O && ((de = r.current) == null || de.removeEventListener("mousedown", S), document.removeEventListener("mouseup", Q), document.removeEventListener("mousemove", F), document.removeEventListener("contextmenu", H));
2007
2041
  };
2008
2042
  }, [a]);
2009
- const s = t.type === "string" && (a.length > 100 || a.search(`
2010
- `) > -1), d = s || t.type === "image", p = (h) => {
2011
- let b = h.target.value;
2012
- t.type === "boolean" && (b = h.target.checked), e(b), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, b);
2043
+ const l = t.type === "string" && (a.length > 100 || a.search(`
2044
+ `) > -1), d = l || t.type === "image", p = (m) => {
2045
+ let b = m.target.value;
2046
+ t.type === "boolean" && (b = m.target.checked), e(b), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, b);
2013
2047
  };
2014
- return /* @__PURE__ */ l.jsxs("div", { className: `field ${d ? "block" : ""}`, children: [
2015
- t.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: o, children: t.title }, "fieldLabel"),
2016
- t.type === "string" && !s && /* @__PURE__ */ l.jsx(
2048
+ return /* @__PURE__ */ u.jsxs("div", { className: `field ${d ? "block" : ""}`, children: [
2049
+ t.type !== "button" && /* @__PURE__ */ u.jsx("label", { ref: r, children: t.title }, "fieldLabel"),
2050
+ t.type === "string" && !l && /* @__PURE__ */ u.jsx(
2017
2051
  "input",
2018
2052
  {
2019
2053
  type: "text",
@@ -2022,7 +2056,7 @@ function et(t) {
2022
2056
  value: a
2023
2057
  }
2024
2058
  ),
2025
- t.type === "string" && s && /* @__PURE__ */ l.jsx(
2059
+ t.type === "string" && l && /* @__PURE__ */ u.jsx(
2026
2060
  "textarea",
2027
2061
  {
2028
2062
  cols: 50,
@@ -2032,7 +2066,7 @@ function et(t) {
2032
2066
  value: a
2033
2067
  }
2034
2068
  ),
2035
- t.type === "boolean" && /* @__PURE__ */ l.jsx(
2069
+ t.type === "boolean" && /* @__PURE__ */ u.jsx(
2036
2070
  "input",
2037
2071
  {
2038
2072
  type: "checkbox",
@@ -2041,10 +2075,10 @@ function et(t) {
2041
2075
  checked: a
2042
2076
  }
2043
2077
  ),
2044
- t.type === "number" && /* @__PURE__ */ l.jsx(
2078
+ t.type === "number" && /* @__PURE__ */ u.jsx(
2045
2079
  "input",
2046
2080
  {
2047
- ref: u,
2081
+ ref: s,
2048
2082
  type: "number",
2049
2083
  value: a,
2050
2084
  min: t.min,
@@ -2053,9 +2087,9 @@ function et(t) {
2053
2087
  onChange: p
2054
2088
  }
2055
2089
  ),
2056
- t.type === "range" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2057
- /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: p, className: "min" }),
2058
- /* @__PURE__ */ l.jsx(
2090
+ t.type === "range" && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
2091
+ /* @__PURE__ */ u.jsx("input", { type: "text", value: a.toString(), onChange: p, className: "min" }),
2092
+ /* @__PURE__ */ u.jsx(
2059
2093
  "input",
2060
2094
  {
2061
2095
  disabled: t.disabled,
@@ -2068,11 +2102,11 @@ function et(t) {
2068
2102
  }
2069
2103
  )
2070
2104
  ] }),
2071
- t.type === "color" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2072
- /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: p, className: "color" }),
2073
- /* @__PURE__ */ l.jsx("input", { type: "color", value: a, onChange: p })
2105
+ t.type === "color" && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
2106
+ /* @__PURE__ */ u.jsx("input", { type: "text", value: a.toString(), onChange: p, className: "color" }),
2107
+ /* @__PURE__ */ u.jsx("input", { type: "color", value: a, onChange: p })
2074
2108
  ] }),
2075
- t.type === "button" && /* @__PURE__ */ l.jsx(
2109
+ t.type === "button" && /* @__PURE__ */ u.jsx(
2076
2110
  "button",
2077
2111
  {
2078
2112
  onClick: () => {
@@ -2081,14 +2115,14 @@ function et(t) {
2081
2115
  children: t.title
2082
2116
  }
2083
2117
  ),
2084
- t.type === "image" && /* @__PURE__ */ l.jsx("img", { ref: c, onClick: () => {
2085
- va().then((h) => {
2086
- c.current.src = h, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, h);
2118
+ t.type === "image" && /* @__PURE__ */ u.jsx("img", { ref: c, onClick: () => {
2119
+ Sa().then((m) => {
2120
+ c.current.src = m, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, m);
2087
2121
  });
2088
- }, src: a.length > 0 ? a : ha })
2122
+ }, src: a.length > 0 ? a : Ea })
2089
2123
  ] });
2090
2124
  }
2091
- function Yt(t) {
2125
+ function Xt(t) {
2092
2126
  switch (t) {
2093
2127
  case "fov":
2094
2128
  return "FOV";
@@ -2117,68 +2151,71 @@ function Yt(t) {
2117
2151
  }
2118
2152
  return t;
2119
2153
  }
2120
- function ya(t, n) {
2154
+ function Ta(t, n) {
2121
2155
  const a = [];
2122
2156
  if (t.perspectiveCameraInfo !== void 0)
2123
2157
  for (const e in t.perspectiveCameraInfo)
2124
2158
  a.push({
2125
- title: Yt(e),
2159
+ title: Xt(e),
2126
2160
  prop: e,
2127
2161
  type: "number",
2128
2162
  step: 0.01,
2129
2163
  value: t.perspectiveCameraInfo[e],
2130
- onChange: (o, u) => {
2131
- var s;
2132
- n.updateObject(t.uuid, o, u), n.requestMethod(t.uuid, "updateProjectionMatrix");
2133
- const c = (s = n.scene) == null ? void 0 : s.getObjectByProperty("uuid", t.uuid);
2134
- c !== void 0 && (q(c, o, u), c.updateProjectionMatrix());
2164
+ onChange: (r, s) => {
2165
+ var l;
2166
+ n.updateObject(t.uuid, r, s), n.requestMethod(t.uuid, "updateProjectionMatrix");
2167
+ const c = (l = n.scene) == null ? void 0 : l.getObjectByProperty("uuid", t.uuid);
2168
+ c !== void 0 && (ee(c, r, s), c.updateProjectionMatrix());
2135
2169
  }
2136
2170
  });
2137
2171
  else if (t.orthographicCameraInfo !== void 0)
2138
2172
  for (const e in t.orthographicCameraInfo)
2139
2173
  a.push({
2140
- title: Yt(e),
2174
+ title: Xt(e),
2141
2175
  prop: e,
2142
2176
  type: "number",
2143
2177
  step: 0.01,
2144
2178
  value: t.perspectiveCameraInfo[e],
2145
- onChange: (o, u) => {
2146
- var s;
2147
- n.updateObject(t.uuid, o, u), n.requestMethod(t.uuid, "updateProjectionMatrix");
2148
- const c = (s = n.scene) == null ? void 0 : s.getObjectByProperty("uuid", t.uuid);
2149
- c !== void 0 && (q(c, o, u), c.updateProjectionMatrix());
2179
+ onChange: (r, s) => {
2180
+ var l;
2181
+ n.updateObject(t.uuid, r, s), n.requestMethod(t.uuid, "updateProjectionMatrix");
2182
+ const c = (l = n.scene) == null ? void 0 : l.getObjectByProperty("uuid", t.uuid);
2183
+ c !== void 0 && (ee(c, r, s), c.updateProjectionMatrix());
2150
2184
  }
2151
2185
  });
2152
- return /* @__PURE__ */ l.jsx(
2153
- $e,
2186
+ return /* @__PURE__ */ u.jsx(
2187
+ Le,
2154
2188
  {
2155
2189
  title: "Camera",
2156
2190
  items: a
2157
2191
  }
2158
2192
  );
2159
2193
  }
2160
- const Ea = Math.PI / 180, xa = 180 / Math.PI;
2161
- function wa(t) {
2162
- return t * Ea;
2194
+ const Ma = Math.PI / 180, Ra = 180 / Math.PI;
2195
+ function We(t, n, a, e, r) {
2196
+ return e + (t - n) * (r - e) / (a - n);
2163
2197
  }
2164
- function St(t) {
2165
- return t * xa;
2198
+ function Pa(t) {
2199
+ return t * Ma;
2166
2200
  }
2167
- function Ca(t, n) {
2168
- const a = new Tn();
2201
+ function jt(t) {
2202
+ return t * Ra;
2203
+ }
2204
+ function ja(t, n) {
2205
+ const a = new kn();
2169
2206
  a.elements = t.matrix;
2170
- const e = new L(), o = new Rn(), u = new L();
2171
- t.uuid.length > 0 && (e.setFromMatrixPosition(a), o.setFromRotationMatrix(a), u.setFromMatrixScale(a));
2207
+ const e = new Y(), r = new An(), s = new Y();
2208
+ t.uuid.length > 0 && (e.setFromMatrixPosition(a), r.setFromRotationMatrix(a), s.setFromMatrixScale(a));
2172
2209
  const c = (d, p) => {
2173
2210
  var b;
2174
2211
  n.updateObject(t.uuid, d, p);
2175
- const h = (b = n.scene) == null ? void 0 : b.getObjectByProperty("uuid", t.uuid);
2176
- h !== void 0 && q(h, d, p);
2177
- }, s = (d, p) => {
2178
- c(d, wa(p));
2212
+ const m = (b = n.scene) == null ? void 0 : b.getObjectByProperty("uuid", t.uuid);
2213
+ m !== void 0 && ee(m, d, p);
2214
+ }, l = (d, p) => {
2215
+ c(d, Pa(p));
2179
2216
  };
2180
- return /* @__PURE__ */ l.jsx(
2181
- $e,
2217
+ return /* @__PURE__ */ u.jsx(
2218
+ Le,
2182
2219
  {
2183
2220
  title: "Transform",
2184
2221
  items: [
@@ -2207,37 +2244,37 @@ function Ca(t, n) {
2207
2244
  title: "Rotation X",
2208
2245
  prop: "rotation.x",
2209
2246
  type: "number",
2210
- value: Ct(St(o.x)),
2247
+ value: Rt(jt(r.x)),
2211
2248
  min: -360,
2212
2249
  max: 360,
2213
2250
  step: 0.1,
2214
- onChange: s
2251
+ onChange: l
2215
2252
  },
2216
2253
  {
2217
2254
  title: "Rotation Y",
2218
2255
  prop: "rotation.y",
2219
2256
  type: "number",
2220
- value: Ct(St(o.y)),
2257
+ value: Rt(jt(r.y)),
2221
2258
  min: -360,
2222
2259
  max: 360,
2223
2260
  step: 0.1,
2224
- onChange: s
2261
+ onChange: l
2225
2262
  },
2226
2263
  {
2227
2264
  title: "Rotation Z",
2228
2265
  prop: "rotation.z",
2229
2266
  type: "number",
2230
- value: Ct(St(o.z)),
2267
+ value: Rt(jt(r.z)),
2231
2268
  min: -360,
2232
2269
  max: 360,
2233
2270
  step: 0.1,
2234
- onChange: s
2271
+ onChange: l
2235
2272
  },
2236
2273
  {
2237
2274
  title: "Scale X",
2238
2275
  prop: "scale.x",
2239
2276
  type: "number",
2240
- value: u.x,
2277
+ value: s.x,
2241
2278
  step: 0.01,
2242
2279
  onChange: c
2243
2280
  },
@@ -2245,7 +2282,7 @@ function Ca(t, n) {
2245
2282
  title: "Scale Y",
2246
2283
  prop: "scale.y",
2247
2284
  type: "number",
2248
- value: u.y,
2285
+ value: s.y,
2249
2286
  step: 0.01,
2250
2287
  onChange: c
2251
2288
  },
@@ -2253,7 +2290,7 @@ function Ca(t, n) {
2253
2290
  title: "Scale Z",
2254
2291
  prop: "scale.z",
2255
2292
  type: "number",
2256
- value: u.z,
2293
+ value: s.z,
2257
2294
  step: 0.01,
2258
2295
  onChange: c
2259
2296
  }
@@ -2261,7 +2298,7 @@ function Ca(t, n) {
2261
2298
  }
2262
2299
  );
2263
2300
  }
2264
- function zt(t) {
2301
+ function qt(t) {
2265
2302
  switch (t) {
2266
2303
  case "color":
2267
2304
  return "Color";
@@ -2280,71 +2317,120 @@ function zt(t) {
2280
2317
  }
2281
2318
  return t;
2282
2319
  }
2283
- function Sa(t, n) {
2320
+ function _a(t, n) {
2284
2321
  const a = [];
2285
2322
  if (t.lightInfo !== void 0)
2286
2323
  for (const e in t.lightInfo) {
2287
- const o = t.lightInfo[e];
2288
- o !== void 0 && (o.isColor !== void 0 ? a.push({
2289
- title: zt(e),
2324
+ const r = t.lightInfo[e];
2325
+ r !== void 0 && (r.isColor !== void 0 ? a.push({
2326
+ title: qt(e),
2290
2327
  prop: e,
2291
2328
  type: "color",
2292
- value: o,
2293
- onChange: (u, c) => {
2329
+ value: r,
2330
+ onChange: (s, c) => {
2294
2331
  var p;
2295
- const s = new kt(c);
2296
- n.updateObject(t.uuid, u, s);
2332
+ const l = new Nt(c);
2333
+ n.updateObject(t.uuid, s, l);
2297
2334
  const d = (p = n.scene) == null ? void 0 : p.getObjectByProperty("uuid", t.uuid);
2298
- d !== void 0 && q(d, u, s);
2335
+ d !== void 0 && ee(d, s, l);
2299
2336
  }
2300
2337
  }) : a.push({
2301
- title: zt(e),
2338
+ title: qt(e),
2302
2339
  prop: e,
2303
- type: typeof o,
2304
- value: o,
2305
- step: typeof o == "number" ? 0.01 : void 0,
2306
- onChange: (u, c) => {
2340
+ type: typeof r,
2341
+ value: r,
2342
+ step: typeof r == "number" ? 0.01 : void 0,
2343
+ onChange: (s, c) => {
2307
2344
  var d;
2308
- n.updateObject(t.uuid, u, c);
2309
- const s = (d = n.scene) == null ? void 0 : d.getObjectByProperty("uuid", t.uuid);
2310
- s !== void 0 && q(s, u, c);
2345
+ n.updateObject(t.uuid, s, c);
2346
+ const l = (d = n.scene) == null ? void 0 : d.getObjectByProperty("uuid", t.uuid);
2347
+ l !== void 0 && ee(l, s, c);
2311
2348
  }
2312
2349
  }));
2313
2350
  }
2314
- return /* @__PURE__ */ l.jsx(
2315
- $e,
2351
+ return /* @__PURE__ */ u.jsx(
2352
+ Le,
2316
2353
  {
2317
2354
  title: "Light",
2318
2355
  items: a
2319
2356
  }
2320
2357
  );
2321
2358
  }
2322
- function Oa(t) {
2323
- const [n, a] = ne(-1), [e, o] = ne({
2359
+ function ka(t, n) {
2360
+ const a = [];
2361
+ return t.animations.forEach((e) => {
2362
+ a.push({
2363
+ title: "Name",
2364
+ type: "string",
2365
+ prop: "name",
2366
+ value: e.name,
2367
+ disabled: !0,
2368
+ onChange: (r, s) => {
2369
+ var l;
2370
+ n.updateObject(t.uuid, r, s);
2371
+ const c = (l = n.scene) == null ? void 0 : l.getObjectByProperty("uuid", t.uuid);
2372
+ c !== void 0 && ee(c, r, s);
2373
+ }
2374
+ }), a.push({
2375
+ title: "Duration",
2376
+ type: "number",
2377
+ prop: "duration",
2378
+ value: e.duration,
2379
+ disabled: !0,
2380
+ onChange: (r, s) => {
2381
+ var l;
2382
+ n.updateObject(t.uuid, r, s);
2383
+ const c = (l = n.scene) == null ? void 0 : l.getObjectByProperty("uuid", t.uuid);
2384
+ c !== void 0 && ee(c, r, s);
2385
+ }
2386
+ }), a.push({
2387
+ title: "Blend Mode",
2388
+ type: "number",
2389
+ prop: "blendMode",
2390
+ value: e.blendMode,
2391
+ disabled: !0,
2392
+ onChange: (r, s) => {
2393
+ var l;
2394
+ n.updateObject(t.uuid, r, s);
2395
+ const c = (l = n.scene) == null ? void 0 : l.getObjectByProperty("uuid", t.uuid);
2396
+ c !== void 0 && ee(c, r, s);
2397
+ }
2398
+ });
2399
+ }), /* @__PURE__ */ u.jsx(Le, { title: "Animations", items: a });
2400
+ }
2401
+ function Aa(t) {
2402
+ const [n, a] = ie(-1), [e, r] = ie({
2324
2403
  name: "",
2325
2404
  uuid: "",
2326
2405
  type: "",
2327
2406
  visible: !1,
2328
2407
  matrix: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
2408
+ animations: [],
2329
2409
  material: void 0,
2330
2410
  perspectiveCameraInfo: void 0,
2331
2411
  orthographicCameraInfo: void 0,
2332
2412
  lightInfo: void 0
2333
2413
  });
2334
- Be(() => {
2335
- function c(s) {
2336
- const d = s.value;
2337
- o(d), a(Date.now());
2414
+ Ne(() => {
2415
+ function c(l) {
2416
+ const d = l.value;
2417
+ if (r(d), a(Date.now()), t.three.scene !== void 0) {
2418
+ const p = t.three.scene.getObjectByProperty("uuid", d.uuid);
2419
+ if (p !== void 0 && p.animations.length > 0) {
2420
+ const m = new Dn(p);
2421
+ console.log(m), console.log(p.animations);
2422
+ }
2423
+ }
2338
2424
  }
2339
- return I.addEventListener(N.SET_OBJECT, c), () => {
2340
- I.removeEventListener(N.SET_OBJECT, c);
2425
+ return k.addEventListener(A.SET_OBJECT, c), () => {
2426
+ k.removeEventListener(A.SET_OBJECT, c);
2341
2427
  };
2342
2428
  }, []);
2343
- const u = e.type.toLowerCase();
2344
- return /* @__PURE__ */ l.jsx("div", { id: "Inspector", className: t.class, children: e.uuid.length > 0 && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2345
- /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2346
- /* @__PURE__ */ l.jsx(
2347
- et,
2429
+ const s = e.type.toLowerCase();
2430
+ return /* @__PURE__ */ u.jsx(Lt, { label: "Inspector", children: /* @__PURE__ */ u.jsx("div", { id: "Inspector", className: t.class, children: e.uuid.length > 0 && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
2431
+ /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
2432
+ /* @__PURE__ */ u.jsx(
2433
+ at,
2348
2434
  {
2349
2435
  type: "string",
2350
2436
  title: "Name",
@@ -2353,8 +2439,8 @@ function Oa(t) {
2353
2439
  disabled: !0
2354
2440
  }
2355
2441
  ),
2356
- /* @__PURE__ */ l.jsx(
2357
- et,
2442
+ /* @__PURE__ */ u.jsx(
2443
+ at,
2358
2444
  {
2359
2445
  type: "string",
2360
2446
  title: "Type",
@@ -2363,8 +2449,8 @@ function Oa(t) {
2363
2449
  disabled: !0
2364
2450
  }
2365
2451
  ),
2366
- /* @__PURE__ */ l.jsx(
2367
- et,
2452
+ /* @__PURE__ */ u.jsx(
2453
+ at,
2368
2454
  {
2369
2455
  type: "string",
2370
2456
  title: "UUID",
@@ -2373,152 +2459,153 @@ function Oa(t) {
2373
2459
  disabled: !0
2374
2460
  }
2375
2461
  ),
2376
- /* @__PURE__ */ l.jsx(
2377
- et,
2462
+ /* @__PURE__ */ u.jsx(
2463
+ at,
2378
2464
  {
2379
2465
  type: "boolean",
2380
2466
  title: "Visible",
2381
2467
  prop: "visible",
2382
2468
  value: e.visible,
2383
- onChange: (c, s) => {
2469
+ onChange: (c, l) => {
2384
2470
  var p;
2385
- t.three.updateObject(e.uuid, c, s);
2471
+ t.three.updateObject(e.uuid, c, l);
2386
2472
  const d = (p = t.three.scene) == null ? void 0 : p.getObjectByProperty("uuid", e.uuid);
2387
- d !== void 0 && q(d, c, s);
2473
+ d !== void 0 && ee(d, c, l);
2388
2474
  }
2389
2475
  }
2390
2476
  )
2391
2477
  ] }),
2392
- /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2393
- Ca(e, t.three),
2394
- u.search("camera") > -1 ? ya(e, t.three) : null,
2395
- u.search("light") > -1 ? Sa(e, t.three) : null,
2396
- u.search("mesh") > -1 ? ba(e, t.three) : null
2478
+ /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
2479
+ ja(e, t.three),
2480
+ e.animations.length > 0 ? ka(e, t.three) : null,
2481
+ s.search("camera") > -1 ? Ta(e, t.three) : null,
2482
+ s.search("light") > -1 ? _a(e, t.three) : null,
2483
+ s.search("mesh") > -1 ? Oa(e, t.three) : null
2397
2484
  ] })
2398
- ] }) }, n);
2485
+ ] }) }, n) }, "Inspector");
2399
2486
  }
2400
- class Xa extends Bn {
2487
+ class ai extends Kn {
2401
2488
  constructor(a) {
2402
2489
  super(a);
2403
- $(this, "three");
2490
+ Z(this, "three");
2404
2491
  // Private
2405
- $(this, "setScene", (a) => {
2492
+ Z(this, "setScene", (a) => {
2406
2493
  this.setState(() => ({
2407
2494
  scene: a.value
2408
2495
  }));
2409
2496
  });
2410
2497
  this.state = {
2411
2498
  scene: a.scene !== void 0 ? a.scene : null
2412
- }, this.three = a.three, I.addEventListener(N.SET_SCENE, this.setScene);
2499
+ }, this.three = a.three, k.addEventListener(A.SET_SCENE, this.setScene);
2413
2500
  }
2414
2501
  componentWillUnmount() {
2415
- I.removeEventListener(N.SET_SCENE, this.setScene);
2502
+ k.removeEventListener(A.SET_SCENE, this.setScene);
2416
2503
  }
2417
2504
  render() {
2418
- var o;
2419
- const a = this.componentState.scene !== null, e = "Hierarchy - " + (a ? `${(o = this.componentState.scene) == null ? void 0 : o.name}` : "No Scene");
2420
- return /* @__PURE__ */ l.jsx("div", { id: "SceneHierarchy", children: /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2421
- /* @__PURE__ */ l.jsx(jt, { label: e, open: !0, children: /* @__PURE__ */ l.jsx(l.Fragment, { children: a && /* @__PURE__ */ l.jsx(fa, { child: this.componentState.scene, three: this.three }) }) }),
2422
- /* @__PURE__ */ l.jsx(jt, { label: "Inspector", children: /* @__PURE__ */ l.jsx(Oa, { three: this.three }, "Inspector") })
2423
- ] }) }, "SceneHierarchy");
2505
+ var r;
2506
+ const a = this.componentState.scene !== null, e = "Hierarchy - " + (a ? `${(r = this.componentState.scene) == null ? void 0 : r.name}` : "No Scene");
2507
+ return /* @__PURE__ */ u.jsx("div", { id: "SidePanel", children: /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
2508
+ /* @__PURE__ */ u.jsx(Lt, { label: e, open: !0, children: /* @__PURE__ */ u.jsx(u.Fragment, { children: a && /* @__PURE__ */ u.jsx(ya, { child: this.componentState.scene, three: this.three }) }) }),
2509
+ /* @__PURE__ */ u.jsx(Aa, { three: this.three })
2510
+ ] }) }, "SidePanel");
2424
2511
  }
2425
2512
  // Getters / Setters
2426
2513
  get componentState() {
2427
2514
  return this.state;
2428
2515
  }
2429
2516
  }
2430
- function qa(t) {
2517
+ function ii(t) {
2431
2518
  function n() {
2432
2519
  return t.three.scene === void 0 ? (console.log("No scene:", t.three), !1) : !0;
2433
2520
  }
2434
- const a = (s) => {
2521
+ const a = (l) => {
2435
2522
  var p;
2436
2523
  if (!n())
2437
2524
  return;
2438
- const d = (p = t.three.scene) == null ? void 0 : p.getObjectByProperty("uuid", s.value);
2525
+ const d = (p = t.three.scene) == null ? void 0 : p.getObjectByProperty("uuid", l.value);
2439
2526
  d !== void 0 && t.three.setObject(d);
2440
- }, e = (s, d, p) => {
2527
+ }, e = (l, d, p) => {
2441
2528
  var b;
2442
2529
  if (!n())
2443
2530
  return;
2444
- const h = (b = t.three.scene) == null ? void 0 : b.getObjectByProperty("uuid", s);
2445
- h !== void 0 && q(h, d, p);
2446
- }, o = (s) => {
2531
+ const m = (b = t.three.scene) == null ? void 0 : b.getObjectByProperty("uuid", l);
2532
+ m !== void 0 && ee(m, d, p);
2533
+ }, r = (l) => {
2447
2534
  if (!n())
2448
2535
  return;
2449
- const d = s.value, { key: p, value: h, uuid: b } = d;
2450
- e(b, p, h);
2451
- }, u = (s) => {
2536
+ const d = l.value, { key: p, value: m, uuid: b } = d;
2537
+ e(b, p, m);
2538
+ }, s = (l) => {
2452
2539
  if (!n())
2453
2540
  return;
2454
- const d = s.value;
2455
- Mt(d.value).then((p) => {
2541
+ const d = l.value;
2542
+ Dt(d.value).then((p) => {
2456
2543
  e(d.uuid, d.key, p), e(d.uuid, "material.needsUpdate", !0);
2457
2544
  });
2458
- }, c = (s) => {
2545
+ }, c = (l) => {
2459
2546
  var x;
2460
2547
  if (!n())
2461
2548
  return;
2462
- const { key: d, uuid: p, value: h } = s.value, b = (x = t.three.scene) == null ? void 0 : x.getObjectByProperty("uuid", p);
2549
+ const { key: d, uuid: p, value: m } = l.value, b = (x = t.three.scene) == null ? void 0 : x.getObjectByProperty("uuid", p);
2463
2550
  if (b !== void 0)
2464
2551
  try {
2465
- b[d](h);
2466
- } catch (S) {
2467
- console.log("Error requesting method:"), console.log(S), console.log(d), console.log(h);
2552
+ b[d](m);
2553
+ } catch (C) {
2554
+ console.log("Error requesting method:"), console.log(C), console.log(d), console.log(m);
2468
2555
  }
2469
2556
  };
2470
- return Be(() => (I.addEventListener(N.GET_OBJECT, a), I.addEventListener(N.UPDATE_OBJECT, o), I.addEventListener(N.CREATE_TEXTURE, u), I.addEventListener(N.REQUEST_METHOD, c), () => {
2471
- I.removeEventListener(N.GET_OBJECT, a), I.removeEventListener(N.UPDATE_OBJECT, o), I.removeEventListener(N.CREATE_TEXTURE, u), I.removeEventListener(N.REQUEST_METHOD, c);
2557
+ return Ne(() => (k.addEventListener(A.GET_OBJECT, a), k.addEventListener(A.UPDATE_OBJECT, r), k.addEventListener(A.CREATE_TEXTURE, s), k.addEventListener(A.REQUEST_METHOD, c), () => {
2558
+ k.removeEventListener(A.GET_OBJECT, a), k.removeEventListener(A.UPDATE_OBJECT, r), k.removeEventListener(A.CREATE_TEXTURE, s), k.removeEventListener(A.REQUEST_METHOD, c);
2472
2559
  }), []), null;
2473
2560
  }
2474
- const Wt = { type: "change" }, Ot = { type: "start" }, Ht = { type: "end" }, pt = new Mn(), Kt = new Pn(), Ta = Math.cos(70 * jn.DEG2RAD);
2475
- class Ra extends Zt {
2561
+ const Zt = { type: "change" }, _t = { type: "start" }, Jt = { type: "end" }, vt = new In(), Qt = new Nn(), Da = Math.cos(70 * Ln.DEG2RAD);
2562
+ class Ia extends nn {
2476
2563
  constructor(n, a) {
2477
- super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new L(), this.cursor = new L(), 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: Ne.ROTATE, MIDDLE: Ne.DOLLY, RIGHT: Ne.PAN }, this.touches = { ONE: Le.ROTATE, TWO: Le.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
2478
- return s.phi;
2564
+ super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new Y(), this.cursor = new Y(), 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: ze.ROTATE, MIDDLE: ze.DOLLY, RIGHT: ze.PAN }, this.touches = { ONE: Ye.ROTATE, TWO: Ye.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
2565
+ return l.phi;
2479
2566
  }, this.getAzimuthalAngle = function() {
2480
- return s.theta;
2567
+ return l.theta;
2481
2568
  }, this.getDistance = function() {
2482
2569
  return this.object.position.distanceTo(this.target);
2483
- }, this.listenToKeyEvents = function(i) {
2484
- i.addEventListener("keydown", Xe), this._domElementKeyEvents = i;
2570
+ }, this.listenToKeyEvents = function(o) {
2571
+ o.addEventListener("keydown", Je), this._domElementKeyEvents = o;
2485
2572
  }, this.stopListenToKeyEvents = function() {
2486
- this._domElementKeyEvents.removeEventListener("keydown", Xe), this._domElementKeyEvents = null;
2573
+ this._domElementKeyEvents.removeEventListener("keydown", Je), this._domElementKeyEvents = null;
2487
2574
  }, this.saveState = function() {
2488
2575
  e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
2489
2576
  }, this.reset = function() {
2490
- e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(Wt), e.update(), u = o.NONE;
2577
+ e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(Zt), e.update(), s = r.NONE;
2491
2578
  }, this.update = function() {
2492
- const i = new L(), E = new Ft().setFromUnitVectors(n.up, new L(0, 1, 0)), P = E.clone().invert(), _ = new L(), W = new Ft(), de = new L(), J = 2 * Math.PI;
2493
- return function(ht = null) {
2494
- const he = e.object.position;
2495
- i.copy(he).sub(e.target), i.applyQuaternion(E), s.setFromVector3(i), e.autoRotate && u === o.NONE && z(j(ht)), e.enableDamping ? (s.theta += d.theta * e.dampingFactor, s.phi += d.phi * e.dampingFactor) : (s.theta += d.theta, s.phi += d.phi);
2496
- let Q = e.minAzimuthAngle, ee = e.maxAzimuthAngle;
2497
- isFinite(Q) && isFinite(ee) && (Q < -Math.PI ? Q += J : Q > Math.PI && (Q -= J), ee < -Math.PI ? ee += J : ee > Math.PI && (ee -= J), Q <= ee ? s.theta = Math.max(Q, Math.min(ee, s.theta)) : s.theta = s.theta > (Q + ee) / 2 ? Math.max(Q, s.theta) : Math.min(ee, s.theta)), s.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, s.phi)), s.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(h, e.dampingFactor) : e.target.add(h), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor), e.zoomToCursor && se || e.object.isOrthographicCamera ? s.radius = je(s.radius) : s.radius = je(s.radius * p), i.setFromSpherical(s), i.applyQuaternion(P), he.copy(e.target).add(i), e.object.lookAt(e.target), e.enableDamping === !0 ? (d.theta *= 1 - e.dampingFactor, d.phi *= 1 - e.dampingFactor, h.multiplyScalar(1 - e.dampingFactor)) : (d.set(0, 0, 0), h.set(0, 0, 0));
2498
- let De = !1;
2499
- if (e.zoomToCursor && se) {
2500
- let Se = null;
2579
+ const o = new Y(), E = new Vt().setFromUnitVectors(n.up, new Y(0, 1, 0)), _ = E.clone().invert(), N = new Y(), ne = new Vt(), ve = new Y(), le = 2 * Math.PI;
2580
+ return function(gt = null) {
2581
+ const be = e.object.position;
2582
+ o.copy(be).sub(e.target), o.applyQuaternion(E), l.setFromVector3(o), e.autoRotate && s === r.NONE && V(y(gt)), e.enableDamping ? (l.theta += d.theta * e.dampingFactor, l.phi += d.phi * e.dampingFactor) : (l.theta += d.theta, l.phi += d.phi);
2583
+ let fe = e.minAzimuthAngle, he = e.maxAzimuthAngle;
2584
+ isFinite(fe) && isFinite(he) && (fe < -Math.PI ? fe += le : fe > Math.PI && (fe -= le), he < -Math.PI ? he += le : he > Math.PI && (he -= le), fe <= he ? l.theta = Math.max(fe, Math.min(he, l.theta)) : l.theta = l.theta > (fe + he) / 2 ? Math.max(fe, l.theta) : Math.min(he, l.theta)), l.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, l.phi)), l.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(m, e.dampingFactor) : e.target.add(m), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor), e.zoomToCursor && te || e.object.isOrthographicCamera ? l.radius = X(l.radius) : l.radius = X(l.radius * p), o.setFromSpherical(l), o.applyQuaternion(_), be.copy(e.target).add(o), e.object.lookAt(e.target), e.enableDamping === !0 ? (d.theta *= 1 - e.dampingFactor, d.phi *= 1 - e.dampingFactor, m.multiplyScalar(1 - e.dampingFactor)) : (d.set(0, 0, 0), m.set(0, 0, 0));
2585
+ let $e = !1;
2586
+ if (e.zoomToCursor && te) {
2587
+ let je = null;
2501
2588
  if (e.object.isPerspectiveCamera) {
2502
- const be = i.length();
2503
- Se = je(be * p);
2504
- const Ae = be - Se;
2505
- e.object.position.addScaledVector(V, Ae), e.object.updateMatrixWorld();
2589
+ const Se = o.length();
2590
+ je = X(Se * p);
2591
+ const Ge = Se - je;
2592
+ e.object.position.addScaledVector(de, Ge), e.object.updateMatrixWorld();
2506
2593
  } else if (e.object.isOrthographicCamera) {
2507
- const be = new L(Z.x, Z.y, 0);
2508
- be.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / p)), e.object.updateProjectionMatrix(), De = !0;
2509
- const Ae = new L(Z.x, Z.y, 0);
2510
- Ae.unproject(e.object), e.object.position.sub(Ae).add(be), e.object.updateMatrixWorld(), Se = i.length();
2594
+ const Se = new Y(ce.x, ce.y, 0);
2595
+ Se.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / p)), e.object.updateProjectionMatrix(), $e = !0;
2596
+ const Ge = new Y(ce.x, ce.y, 0);
2597
+ Ge.unproject(e.object), e.object.position.sub(Ge).add(Se), e.object.updateMatrixWorld(), je = o.length();
2511
2598
  } else
2512
2599
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), e.zoomToCursor = !1;
2513
- Se !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(Se).add(e.object.position) : (pt.origin.copy(e.object.position), pt.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(pt.direction)) < Ta ? n.lookAt(e.target) : (Kt.setFromNormalAndCoplanarPoint(e.object.up, e.target), pt.intersectPlane(Kt, e.target))));
2600
+ je !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(je).add(e.object.position) : (vt.origin.copy(e.object.position), vt.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(vt.direction)) < Da ? n.lookAt(e.target) : (Qt.setFromNormalAndCoplanarPoint(e.object.up, e.target), vt.intersectPlane(Qt, e.target))));
2514
2601
  } else
2515
- e.object.isOrthographicCamera && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / p)), e.object.updateProjectionMatrix(), De = !0);
2516
- return p = 1, se = !1, De || _.distanceToSquared(e.object.position) > c || 8 * (1 - W.dot(e.object.quaternion)) > c || de.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(Wt), _.copy(e.object.position), W.copy(e.object.quaternion), de.copy(e.target), !0) : !1;
2602
+ e.object.isOrthographicCamera && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / p)), e.object.updateProjectionMatrix(), $e = !0);
2603
+ return p = 1, te = !1, $e || N.distanceToSquared(e.object.position) > c || 8 * (1 - ne.dot(e.object.quaternion)) > c || ve.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(Zt), N.copy(e.object.position), ne.copy(e.object.quaternion), ve.copy(e.target), !0) : !1;
2517
2604
  };
2518
2605
  }(), this.dispose = function() {
2519
- e.domElement.removeEventListener("contextmenu", ve), e.domElement.removeEventListener("pointerdown", He), e.domElement.removeEventListener("pointercancel", Ce), e.domElement.removeEventListener("wheel", ct), e.domElement.removeEventListener("pointermove", ge), e.domElement.removeEventListener("pointerup", Ce), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", Xe), e._domElementKeyEvents = null);
2606
+ e.domElement.removeEventListener("contextmenu", Ce), e.domElement.removeEventListener("pointerdown", qe), e.domElement.removeEventListener("pointercancel", Pe), e.domElement.removeEventListener("wheel", dt), e.domElement.removeEventListener("pointermove", we), e.domElement.removeEventListener("pointerup", Pe), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", Je), e._domElementKeyEvents = null);
2520
2607
  };
2521
- const e = this, o = {
2608
+ const e = this, r = {
2522
2609
  NONE: -1,
2523
2610
  ROTATE: 0,
2524
2611
  DOLLY: 1,
@@ -2528,175 +2615,175 @@ class Ra extends Zt {
2528
2615
  TOUCH_DOLLY_PAN: 5,
2529
2616
  TOUCH_DOLLY_ROTATE: 6
2530
2617
  };
2531
- let u = o.NONE;
2532
- const c = 1e-6, s = new Ut(), d = new Ut();
2618
+ let s = r.NONE;
2619
+ const c = 1e-6, l = new zt(), d = new zt();
2533
2620
  let p = 1;
2534
- const h = new L(), b = new oe(), x = new oe(), S = new oe(), O = new oe(), m = new oe(), v = new oe(), y = new oe(), w = new oe(), F = new oe(), V = new L(), Z = new oe();
2535
- let se = !1;
2536
- const Y = [], fe = {};
2537
- function j(i) {
2538
- return i !== null ? 2 * Math.PI / 60 * e.autoRotateSpeed * i : 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
2539
- }
2540
- function D(i) {
2541
- const E = Math.abs(i) / (100 * (window.devicePixelRatio | 0));
2621
+ const m = new Y(), b = new ue(), x = new ue(), C = new ue(), S = new ue(), F = new ue(), Q = new ue(), H = new ue(), O = new ue(), K = new ue(), de = new Y(), ce = new ue();
2622
+ let te = !1;
2623
+ const f = [], g = {};
2624
+ function y(o) {
2625
+ return o !== null ? 2 * Math.PI / 60 * e.autoRotateSpeed * o : 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
2626
+ }
2627
+ function T(o) {
2628
+ const E = Math.abs(o) / (100 * (window.devicePixelRatio | 0));
2542
2629
  return Math.pow(0.95, e.zoomSpeed * E);
2543
2630
  }
2544
- function z(i) {
2545
- d.theta -= i;
2631
+ function V(o) {
2632
+ d.theta -= o;
2546
2633
  }
2547
- function ce(i) {
2548
- d.phi -= i;
2634
+ function z(o) {
2635
+ d.phi -= o;
2549
2636
  }
2550
- const ae = function() {
2551
- const i = new L();
2552
- return function(P, _) {
2553
- i.setFromMatrixColumn(_, 0), i.multiplyScalar(-P), h.add(i);
2637
+ const U = function() {
2638
+ const o = new Y();
2639
+ return function(_, N) {
2640
+ o.setFromMatrixColumn(N, 0), o.multiplyScalar(-_), m.add(o);
2554
2641
  };
2555
- }(), le = function() {
2556
- const i = new L();
2557
- return function(P, _) {
2558
- e.screenSpacePanning === !0 ? i.setFromMatrixColumn(_, 1) : (i.setFromMatrixColumn(_, 0), i.crossVectors(e.object.up, i)), i.multiplyScalar(P), h.add(i);
2642
+ }(), D = function() {
2643
+ const o = new Y();
2644
+ return function(_, N) {
2645
+ e.screenSpacePanning === !0 ? o.setFromMatrixColumn(N, 1) : (o.setFromMatrixColumn(N, 0), o.crossVectors(e.object.up, o)), o.multiplyScalar(_), m.add(o);
2559
2646
  };
2560
- }(), re = function() {
2561
- const i = new L();
2562
- return function(P, _) {
2563
- const W = e.domElement;
2647
+ }(), B = function() {
2648
+ const o = new Y();
2649
+ return function(_, N) {
2650
+ const ne = e.domElement;
2564
2651
  if (e.object.isPerspectiveCamera) {
2565
- const de = e.object.position;
2566
- i.copy(de).sub(e.target);
2567
- let J = i.length();
2568
- J *= Math.tan(e.object.fov / 2 * Math.PI / 180), ae(2 * P * J / W.clientHeight, e.object.matrix), le(2 * _ * J / W.clientHeight, e.object.matrix);
2652
+ const ve = e.object.position;
2653
+ o.copy(ve).sub(e.target);
2654
+ let le = o.length();
2655
+ le *= Math.tan(e.object.fov / 2 * Math.PI / 180), U(2 * _ * le / ne.clientHeight, e.object.matrix), D(2 * N * le / ne.clientHeight, e.object.matrix);
2569
2656
  } else
2570
- e.object.isOrthographicCamera ? (ae(P * (e.object.right - e.object.left) / e.object.zoom / W.clientWidth, e.object.matrix), le(_ * (e.object.top - e.object.bottom) / e.object.zoom / W.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
2657
+ e.object.isOrthographicCamera ? (U(_ * (e.object.right - e.object.left) / e.object.zoom / ne.clientWidth, e.object.matrix), D(N * (e.object.top - e.object.bottom) / e.object.zoom / ne.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
2571
2658
  };
2572
2659
  }();
2573
- function Me(i) {
2574
- e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? p /= i : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2660
+ function J(o) {
2661
+ e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? p /= o : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2575
2662
  }
2576
- function Ge(i) {
2577
- e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? p *= i : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2663
+ function R(o) {
2664
+ e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? p *= o : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2578
2665
  }
2579
- function Pe(i, E) {
2666
+ function I(o, E) {
2580
2667
  if (!e.zoomToCursor)
2581
2668
  return;
2582
- se = !0;
2583
- const P = e.domElement.getBoundingClientRect(), _ = i - P.left, W = E - P.top, de = P.width, J = P.height;
2584
- Z.x = _ / de * 2 - 1, Z.y = -(W / J) * 2 + 1, V.set(Z.x, Z.y, 1).unproject(e.object).sub(e.object.position).normalize();
2669
+ te = !0;
2670
+ const _ = e.domElement.getBoundingClientRect(), N = o - _.left, ne = E - _.top, ve = _.width, le = _.height;
2671
+ ce.x = N / ve * 2 - 1, ce.y = -(ne / le) * 2 + 1, de.set(ce.x, ce.y, 1).unproject(e.object).sub(e.object.position).normalize();
2585
2672
  }
2586
- function je(i) {
2587
- return Math.max(e.minDistance, Math.min(e.maxDistance, i));
2673
+ function X(o) {
2674
+ return Math.max(e.minDistance, Math.min(e.maxDistance, o));
2588
2675
  }
2589
- function Ve(i) {
2590
- b.set(i.clientX, i.clientY);
2676
+ function pe(o) {
2677
+ b.set(o.clientX, o.clientY);
2591
2678
  }
2592
- function nt(i) {
2593
- Pe(i.clientX, i.clientX), y.set(i.clientX, i.clientY);
2679
+ function Oe(o) {
2680
+ I(o.clientX, o.clientX), H.set(o.clientX, o.clientY);
2594
2681
  }
2595
- function Ye(i) {
2596
- O.set(i.clientX, i.clientY);
2682
+ function He(o) {
2683
+ S.set(o.clientX, o.clientY);
2597
2684
  }
2598
- function at(i) {
2599
- x.set(i.clientX, i.clientY), S.subVectors(x, b).multiplyScalar(e.rotateSpeed);
2685
+ function ot(o) {
2686
+ x.set(o.clientX, o.clientY), C.subVectors(x, b).multiplyScalar(e.rotateSpeed);
2600
2687
  const E = e.domElement;
2601
- z(2 * Math.PI * S.x / E.clientHeight), ce(2 * Math.PI * S.y / E.clientHeight), b.copy(x), e.update();
2688
+ V(2 * Math.PI * C.x / E.clientHeight), z(2 * Math.PI * C.y / E.clientHeight), b.copy(x), e.update();
2602
2689
  }
2603
- function bt(i) {
2604
- w.set(i.clientX, i.clientY), F.subVectors(w, y), F.y > 0 ? Me(D(F.y)) : F.y < 0 && Ge(D(F.y)), y.copy(w), e.update();
2690
+ function Ct(o) {
2691
+ O.set(o.clientX, o.clientY), K.subVectors(O, H), K.y > 0 ? J(T(K.y)) : K.y < 0 && R(T(K.y)), H.copy(O), e.update();
2605
2692
  }
2606
- function yt(i) {
2607
- m.set(i.clientX, i.clientY), v.subVectors(m, O).multiplyScalar(e.panSpeed), re(v.x, v.y), O.copy(m), e.update();
2693
+ function St(o) {
2694
+ F.set(o.clientX, o.clientY), Q.subVectors(F, S).multiplyScalar(e.panSpeed), B(Q.x, Q.y), S.copy(F), e.update();
2608
2695
  }
2609
- function ze(i) {
2610
- Pe(i.clientX, i.clientY), i.deltaY < 0 ? Ge(D(i.deltaY)) : i.deltaY > 0 && Me(D(i.deltaY)), e.update();
2696
+ function Ke(o) {
2697
+ I(o.clientX, o.clientY), o.deltaY < 0 ? R(T(o.deltaY)) : o.deltaY > 0 && J(T(o.deltaY)), e.update();
2611
2698
  }
2612
- function We(i) {
2699
+ function Xe(o) {
2613
2700
  let E = !1;
2614
- switch (i.code) {
2701
+ switch (o.code) {
2615
2702
  case e.keys.UP:
2616
- i.ctrlKey || i.metaKey || i.shiftKey ? ce(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : re(0, e.keyPanSpeed), E = !0;
2703
+ o.ctrlKey || o.metaKey || o.shiftKey ? z(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : B(0, e.keyPanSpeed), E = !0;
2617
2704
  break;
2618
2705
  case e.keys.BOTTOM:
2619
- i.ctrlKey || i.metaKey || i.shiftKey ? ce(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : re(0, -e.keyPanSpeed), E = !0;
2706
+ o.ctrlKey || o.metaKey || o.shiftKey ? z(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : B(0, -e.keyPanSpeed), E = !0;
2620
2707
  break;
2621
2708
  case e.keys.LEFT:
2622
- i.ctrlKey || i.metaKey || i.shiftKey ? z(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : re(e.keyPanSpeed, 0), E = !0;
2709
+ o.ctrlKey || o.metaKey || o.shiftKey ? V(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : B(e.keyPanSpeed, 0), E = !0;
2623
2710
  break;
2624
2711
  case e.keys.RIGHT:
2625
- i.ctrlKey || i.metaKey || i.shiftKey ? z(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : re(-e.keyPanSpeed, 0), E = !0;
2712
+ o.ctrlKey || o.metaKey || o.shiftKey ? V(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : B(-e.keyPanSpeed, 0), E = !0;
2626
2713
  break;
2627
2714
  }
2628
- E && (i.preventDefault(), e.update());
2715
+ E && (o.preventDefault(), e.update());
2629
2716
  }
2630
- function Ee(i) {
2631
- if (Y.length === 1)
2632
- b.set(i.pageX, i.pageY);
2717
+ function Te(o) {
2718
+ if (f.length === 1)
2719
+ b.set(o.pageX, o.pageY);
2633
2720
  else {
2634
- const E = ue(i), P = 0.5 * (i.pageX + E.x), _ = 0.5 * (i.pageY + E.y);
2635
- b.set(P, _);
2721
+ const E = ge(o), _ = 0.5 * (o.pageX + E.x), N = 0.5 * (o.pageY + E.y);
2722
+ b.set(_, N);
2636
2723
  }
2637
2724
  }
2638
- function _e(i) {
2639
- if (Y.length === 1)
2640
- O.set(i.pageX, i.pageY);
2725
+ function Ue(o) {
2726
+ if (f.length === 1)
2727
+ S.set(o.pageX, o.pageY);
2641
2728
  else {
2642
- const E = ue(i), P = 0.5 * (i.pageX + E.x), _ = 0.5 * (i.pageY + E.y);
2643
- O.set(P, _);
2729
+ const E = ge(o), _ = 0.5 * (o.pageX + E.x), N = 0.5 * (o.pageY + E.y);
2730
+ S.set(_, N);
2644
2731
  }
2645
2732
  }
2646
- function xe(i) {
2647
- const E = ue(i), P = i.pageX - E.x, _ = i.pageY - E.y, W = Math.sqrt(P * P + _ * _);
2648
- y.set(0, W);
2733
+ function Me(o) {
2734
+ const E = ge(o), _ = o.pageX - E.x, N = o.pageY - E.y, ne = Math.sqrt(_ * _ + N * N);
2735
+ H.set(0, ne);
2649
2736
  }
2650
- function Et(i) {
2651
- e.enableZoom && xe(i), e.enablePan && _e(i);
2737
+ function Ot(o) {
2738
+ e.enableZoom && Me(o), e.enablePan && Ue(o);
2652
2739
  }
2653
- function rt(i) {
2654
- e.enableZoom && xe(i), e.enableRotate && Ee(i);
2740
+ function st(o) {
2741
+ e.enableZoom && Me(o), e.enableRotate && Te(o);
2655
2742
  }
2656
- function it(i) {
2657
- if (Y.length == 1)
2658
- x.set(i.pageX, i.pageY);
2743
+ function ct(o) {
2744
+ if (f.length == 1)
2745
+ x.set(o.pageX, o.pageY);
2659
2746
  else {
2660
- const P = ue(i), _ = 0.5 * (i.pageX + P.x), W = 0.5 * (i.pageY + P.y);
2661
- x.set(_, W);
2747
+ const _ = ge(o), N = 0.5 * (o.pageX + _.x), ne = 0.5 * (o.pageY + _.y);
2748
+ x.set(N, ne);
2662
2749
  }
2663
- S.subVectors(x, b).multiplyScalar(e.rotateSpeed);
2750
+ C.subVectors(x, b).multiplyScalar(e.rotateSpeed);
2664
2751
  const E = e.domElement;
2665
- z(2 * Math.PI * S.x / E.clientHeight), ce(2 * Math.PI * S.y / E.clientHeight), b.copy(x);
2752
+ V(2 * Math.PI * C.x / E.clientHeight), z(2 * Math.PI * C.y / E.clientHeight), b.copy(x);
2666
2753
  }
2667
- function ot(i) {
2668
- if (Y.length === 1)
2669
- m.set(i.pageX, i.pageY);
2754
+ function lt(o) {
2755
+ if (f.length === 1)
2756
+ F.set(o.pageX, o.pageY);
2670
2757
  else {
2671
- const E = ue(i), P = 0.5 * (i.pageX + E.x), _ = 0.5 * (i.pageY + E.y);
2672
- m.set(P, _);
2758
+ const E = ge(o), _ = 0.5 * (o.pageX + E.x), N = 0.5 * (o.pageY + E.y);
2759
+ F.set(_, N);
2673
2760
  }
2674
- v.subVectors(m, O).multiplyScalar(e.panSpeed), re(v.x, v.y), O.copy(m);
2761
+ Q.subVectors(F, S).multiplyScalar(e.panSpeed), B(Q.x, Q.y), S.copy(F);
2675
2762
  }
2676
- function we(i) {
2677
- const E = ue(i), P = i.pageX - E.x, _ = i.pageY - E.y, W = Math.sqrt(P * P + _ * _);
2678
- w.set(0, W), F.set(0, Math.pow(w.y / y.y, e.zoomSpeed)), Me(F.y), y.copy(w);
2679
- const de = (i.pageX + E.x) * 0.5, J = (i.pageY + E.y) * 0.5;
2680
- Pe(de, J);
2763
+ function Re(o) {
2764
+ const E = ge(o), _ = o.pageX - E.x, N = o.pageY - E.y, ne = Math.sqrt(_ * _ + N * N);
2765
+ O.set(0, ne), K.set(0, Math.pow(O.y / H.y, e.zoomSpeed)), J(K.y), H.copy(O);
2766
+ const ve = (o.pageX + E.x) * 0.5, le = (o.pageY + E.y) * 0.5;
2767
+ I(ve, le);
2681
2768
  }
2682
- function ke(i) {
2683
- e.enableZoom && we(i), e.enablePan && ot(i);
2769
+ function Be(o) {
2770
+ e.enableZoom && Re(o), e.enablePan && lt(o);
2684
2771
  }
2685
- function st(i) {
2686
- e.enableZoom && we(i), e.enableRotate && it(i);
2772
+ function ut(o) {
2773
+ e.enableZoom && Re(o), e.enableRotate && ct(o);
2687
2774
  }
2688
- function He(i) {
2689
- e.enabled !== !1 && (Y.length === 0 && (e.domElement.setPointerCapture(i.pointerId), e.domElement.addEventListener("pointermove", ge), e.domElement.addEventListener("pointerup", Ce)), wt(i), i.pointerType === "touch" ? lt(i) : xt(i));
2775
+ function qe(o) {
2776
+ e.enabled !== !1 && (f.length === 0 && (e.domElement.setPointerCapture(o.pointerId), e.domElement.addEventListener("pointermove", we), e.domElement.addEventListener("pointerup", Pe)), Mt(o), o.pointerType === "touch" ? ft(o) : Tt(o));
2690
2777
  }
2691
- function ge(i) {
2692
- e.enabled !== !1 && (i.pointerType === "touch" ? ut(i) : Ke(i));
2778
+ function we(o) {
2779
+ e.enabled !== !1 && (o.pointerType === "touch" ? ht(o) : Ze(o));
2693
2780
  }
2694
- function Ce(i) {
2695
- dt(i), Y.length === 0 && (e.domElement.releasePointerCapture(i.pointerId), e.domElement.removeEventListener("pointermove", ge), e.domElement.removeEventListener("pointerup", Ce)), e.dispatchEvent(Ht), u = o.NONE;
2781
+ function Pe(o) {
2782
+ pt(o), f.length === 0 && (e.domElement.releasePointerCapture(o.pointerId), e.domElement.removeEventListener("pointermove", we), e.domElement.removeEventListener("pointerup", Pe)), e.dispatchEvent(Jt), s = r.NONE;
2696
2783
  }
2697
- function xt(i) {
2784
+ function Tt(o) {
2698
2785
  let E;
2699
- switch (i.button) {
2786
+ switch (o.button) {
2700
2787
  case 0:
2701
2788
  E = e.mouseButtons.LEFT;
2702
2789
  break;
@@ -2710,464 +2797,573 @@ class Ra extends Zt {
2710
2797
  E = -1;
2711
2798
  }
2712
2799
  switch (E) {
2713
- case Ne.DOLLY:
2800
+ case ze.DOLLY:
2714
2801
  if (e.enableZoom === !1)
2715
2802
  return;
2716
- nt(i), u = o.DOLLY;
2803
+ Oe(o), s = r.DOLLY;
2717
2804
  break;
2718
- case Ne.ROTATE:
2719
- if (i.ctrlKey || i.metaKey || i.shiftKey) {
2805
+ case ze.ROTATE:
2806
+ if (o.ctrlKey || o.metaKey || o.shiftKey) {
2720
2807
  if (e.enablePan === !1)
2721
2808
  return;
2722
- Ye(i), u = o.PAN;
2809
+ He(o), s = r.PAN;
2723
2810
  } else {
2724
2811
  if (e.enableRotate === !1)
2725
2812
  return;
2726
- Ve(i), u = o.ROTATE;
2813
+ pe(o), s = r.ROTATE;
2727
2814
  }
2728
2815
  break;
2729
- case Ne.PAN:
2730
- if (i.ctrlKey || i.metaKey || i.shiftKey) {
2816
+ case ze.PAN:
2817
+ if (o.ctrlKey || o.metaKey || o.shiftKey) {
2731
2818
  if (e.enableRotate === !1)
2732
2819
  return;
2733
- Ve(i), u = o.ROTATE;
2820
+ pe(o), s = r.ROTATE;
2734
2821
  } else {
2735
2822
  if (e.enablePan === !1)
2736
2823
  return;
2737
- Ye(i), u = o.PAN;
2824
+ He(o), s = r.PAN;
2738
2825
  }
2739
2826
  break;
2740
2827
  default:
2741
- u = o.NONE;
2828
+ s = r.NONE;
2742
2829
  }
2743
- u !== o.NONE && e.dispatchEvent(Ot);
2830
+ s !== r.NONE && e.dispatchEvent(_t);
2744
2831
  }
2745
- function Ke(i) {
2746
- switch (u) {
2747
- case o.ROTATE:
2832
+ function Ze(o) {
2833
+ switch (s) {
2834
+ case r.ROTATE:
2748
2835
  if (e.enableRotate === !1)
2749
2836
  return;
2750
- at(i);
2837
+ ot(o);
2751
2838
  break;
2752
- case o.DOLLY:
2839
+ case r.DOLLY:
2753
2840
  if (e.enableZoom === !1)
2754
2841
  return;
2755
- bt(i);
2842
+ Ct(o);
2756
2843
  break;
2757
- case o.PAN:
2844
+ case r.PAN:
2758
2845
  if (e.enablePan === !1)
2759
2846
  return;
2760
- yt(i);
2847
+ St(o);
2761
2848
  break;
2762
2849
  }
2763
2850
  }
2764
- function ct(i) {
2765
- e.enabled === !1 || e.enableZoom === !1 || u !== o.NONE || (i.preventDefault(), e.dispatchEvent(Ot), ze(i), e.dispatchEvent(Ht));
2851
+ function dt(o) {
2852
+ e.enabled === !1 || e.enableZoom === !1 || s !== r.NONE || (o.preventDefault(), e.dispatchEvent(_t), Ke(o), e.dispatchEvent(Jt));
2766
2853
  }
2767
- function Xe(i) {
2768
- e.enabled === !1 || e.enablePan === !1 || We(i);
2854
+ function Je(o) {
2855
+ e.enabled === !1 || e.enablePan === !1 || Xe(o);
2769
2856
  }
2770
- function lt(i) {
2771
- switch (qe(i), Y.length) {
2857
+ function ft(o) {
2858
+ switch (Qe(o), f.length) {
2772
2859
  case 1:
2773
2860
  switch (e.touches.ONE) {
2774
- case Le.ROTATE:
2861
+ case Ye.ROTATE:
2775
2862
  if (e.enableRotate === !1)
2776
2863
  return;
2777
- Ee(i), u = o.TOUCH_ROTATE;
2864
+ Te(o), s = r.TOUCH_ROTATE;
2778
2865
  break;
2779
- case Le.PAN:
2866
+ case Ye.PAN:
2780
2867
  if (e.enablePan === !1)
2781
2868
  return;
2782
- _e(i), u = o.TOUCH_PAN;
2869
+ Ue(o), s = r.TOUCH_PAN;
2783
2870
  break;
2784
2871
  default:
2785
- u = o.NONE;
2872
+ s = r.NONE;
2786
2873
  }
2787
2874
  break;
2788
2875
  case 2:
2789
2876
  switch (e.touches.TWO) {
2790
- case Le.DOLLY_PAN:
2877
+ case Ye.DOLLY_PAN:
2791
2878
  if (e.enableZoom === !1 && e.enablePan === !1)
2792
2879
  return;
2793
- Et(i), u = o.TOUCH_DOLLY_PAN;
2880
+ Ot(o), s = r.TOUCH_DOLLY_PAN;
2794
2881
  break;
2795
- case Le.DOLLY_ROTATE:
2882
+ case Ye.DOLLY_ROTATE:
2796
2883
  if (e.enableZoom === !1 && e.enableRotate === !1)
2797
2884
  return;
2798
- rt(i), u = o.TOUCH_DOLLY_ROTATE;
2885
+ st(o), s = r.TOUCH_DOLLY_ROTATE;
2799
2886
  break;
2800
2887
  default:
2801
- u = o.NONE;
2888
+ s = r.NONE;
2802
2889
  }
2803
2890
  break;
2804
2891
  default:
2805
- u = o.NONE;
2892
+ s = r.NONE;
2806
2893
  }
2807
- u !== o.NONE && e.dispatchEvent(Ot);
2894
+ s !== r.NONE && e.dispatchEvent(_t);
2808
2895
  }
2809
- function ut(i) {
2810
- switch (qe(i), u) {
2811
- case o.TOUCH_ROTATE:
2896
+ function ht(o) {
2897
+ switch (Qe(o), s) {
2898
+ case r.TOUCH_ROTATE:
2812
2899
  if (e.enableRotate === !1)
2813
2900
  return;
2814
- it(i), e.update();
2901
+ ct(o), e.update();
2815
2902
  break;
2816
- case o.TOUCH_PAN:
2903
+ case r.TOUCH_PAN:
2817
2904
  if (e.enablePan === !1)
2818
2905
  return;
2819
- ot(i), e.update();
2906
+ lt(o), e.update();
2820
2907
  break;
2821
- case o.TOUCH_DOLLY_PAN:
2908
+ case r.TOUCH_DOLLY_PAN:
2822
2909
  if (e.enableZoom === !1 && e.enablePan === !1)
2823
2910
  return;
2824
- ke(i), e.update();
2911
+ Be(o), e.update();
2825
2912
  break;
2826
- case o.TOUCH_DOLLY_ROTATE:
2913
+ case r.TOUCH_DOLLY_ROTATE:
2827
2914
  if (e.enableZoom === !1 && e.enableRotate === !1)
2828
2915
  return;
2829
- st(i), e.update();
2916
+ ut(o), e.update();
2830
2917
  break;
2831
2918
  default:
2832
- u = o.NONE;
2919
+ s = r.NONE;
2833
2920
  }
2834
2921
  }
2835
- function ve(i) {
2836
- e.enabled !== !1 && i.preventDefault();
2922
+ function Ce(o) {
2923
+ e.enabled !== !1 && o.preventDefault();
2837
2924
  }
2838
- function wt(i) {
2839
- Y.push(i.pointerId);
2925
+ function Mt(o) {
2926
+ f.push(o.pointerId);
2840
2927
  }
2841
- function dt(i) {
2842
- delete fe[i.pointerId];
2843
- for (let E = 0; E < Y.length; E++)
2844
- if (Y[E] == i.pointerId) {
2845
- Y.splice(E, 1);
2928
+ function pt(o) {
2929
+ delete g[o.pointerId];
2930
+ for (let E = 0; E < f.length; E++)
2931
+ if (f[E] == o.pointerId) {
2932
+ f.splice(E, 1);
2846
2933
  return;
2847
2934
  }
2848
2935
  }
2849
- function qe(i) {
2850
- let E = fe[i.pointerId];
2851
- E === void 0 && (E = new oe(), fe[i.pointerId] = E), E.set(i.pageX, i.pageY);
2936
+ function Qe(o) {
2937
+ let E = g[o.pointerId];
2938
+ E === void 0 && (E = new ue(), g[o.pointerId] = E), E.set(o.pageX, o.pageY);
2852
2939
  }
2853
- function ue(i) {
2854
- const E = i.pointerId === Y[0] ? Y[1] : Y[0];
2855
- return fe[E];
2940
+ function ge(o) {
2941
+ const E = o.pointerId === f[0] ? f[1] : f[0];
2942
+ return g[E];
2856
2943
  }
2857
- e.domElement.addEventListener("contextmenu", ve), e.domElement.addEventListener("pointerdown", He), e.domElement.addEventListener("pointercancel", Ce), e.domElement.addEventListener("wheel", ct, { passive: !1 }), this.update();
2944
+ e.domElement.addEventListener("contextmenu", Ce), e.domElement.addEventListener("pointerdown", qe), e.domElement.addEventListener("pointercancel", Pe), e.domElement.addEventListener("wheel", dt, { passive: !1 }), this.update();
2858
2945
  }
2859
2946
  }
2860
- const _t = (t) => {
2861
- const [n, a] = ne(!1), [e, o] = ne(t.options[t.index]), u = () => {
2862
- a(!n);
2863
- }, c = (s) => {
2864
- s !== e && (t.onSelect(s), o(s)), a(!1);
2947
+ const Et = (t) => {
2948
+ const [n, a] = ie(t.options[t.index]), e = () => {
2949
+ t.onToggle(!t.open);
2950
+ }, r = (s) => {
2951
+ s !== n && (t.onSelect(s), a(s)), t.onToggle(!1);
2865
2952
  };
2866
- return /* @__PURE__ */ l.jsxs("div", { className: `dropdown ${t.up === !0 ? "up" : ""}`, children: [
2867
- /* @__PURE__ */ l.jsx("div", { className: "dropdown-toggle", onClick: u, children: e }),
2868
- n && /* @__PURE__ */ l.jsx("ul", { className: "dropdown-menu", children: t.options.map((s) => /* @__PURE__ */ l.jsx("li", { onClick: () => c(s), children: s }, s)) })
2953
+ return /* @__PURE__ */ u.jsxs("div", { className: `dropdown ${t.up === !0 ? "up" : ""}`, children: [
2954
+ /* @__PURE__ */ u.jsx("div", { className: "dropdown-toggle", onClick: e, children: n }),
2955
+ t.open && /* @__PURE__ */ u.jsx("ul", { className: "dropdown-menu", children: t.options.map((s) => /* @__PURE__ */ u.jsx("li", { onClick: () => r(s), children: s }, s)) })
2869
2956
  ] });
2870
- }, Te = $n(function(n, a) {
2871
- const e = n.options.indexOf(n.camera.name);
2872
- return /* @__PURE__ */ l.jsxs("div", { className: "CameraWindow", children: [
2873
- /* @__PURE__ */ l.jsx("div", { ref: a, className: "clickable" }),
2874
- /* @__PURE__ */ l.jsx(_t, { index: e, options: n.options, onSelect: n.onSelect, up: !0 })
2957
+ }, ke = Xn(function(n, a) {
2958
+ const [e, r] = ie(!1), s = n.options.indexOf(n.camera.name);
2959
+ return /* @__PURE__ */ u.jsxs("div", { className: "CameraWindow", children: [
2960
+ /* @__PURE__ */ u.jsx("div", { ref: a, className: "clickable", onClick: () => {
2961
+ e && r(!1);
2962
+ } }),
2963
+ /* @__PURE__ */ u.jsx(
2964
+ Et,
2965
+ {
2966
+ index: s,
2967
+ open: e,
2968
+ options: n.options,
2969
+ onSelect: n.onSelect,
2970
+ onToggle: (c) => {
2971
+ r(c);
2972
+ },
2973
+ up: !0
2974
+ }
2975
+ )
2875
2976
  ] });
2876
- }), Xt = [
2977
+ }), en = [
2877
2978
  "Single",
2878
2979
  "Side by Side",
2879
2980
  "Stacked",
2880
2981
  "Quad"
2881
- ], X = /* @__PURE__ */ new Map(), H = /* @__PURE__ */ new Map(), me = /* @__PURE__ */ new Map();
2882
- function Re(t, n) {
2883
- const a = new en(-100, 100, 100, -100, 50, 3e3);
2884
- return a.name = t, a.position.copy(n), a.lookAt(0, 0, 0), X.set(t, a), a;
2982
+ ], ae = /* @__PURE__ */ new Map(), re = /* @__PURE__ */ new Map(), Ee = /* @__PURE__ */ new Map();
2983
+ function Fe(t, n) {
2984
+ const a = new on(-100, 100, 100, -100, 50, 3e3);
2985
+ return a.name = t, a.position.copy(n), a.lookAt(0, 0, 0), ae.set(t, a), a;
2885
2986
  }
2886
- Re("Top", new L(0, 1e3, 0));
2887
- Re("Bottom", new L(0, -1e3, 0));
2888
- Re("Left", new L(-1e3, 0, 0));
2889
- Re("Right", new L(1e3, 0, 0));
2890
- Re("Front", new L(0, 0, 1e3));
2891
- Re("Back", new L(0, 0, -1e3));
2892
- Re("Orthographic", new L(1e3, 1e3, 1e3));
2893
- const vt = new Tt(60, 1, 50, 3e3);
2894
- vt.name = "Debug";
2895
- vt.position.set(500, 500, 500);
2896
- vt.lookAt(0, 0, 0);
2897
- X.set("Debug", vt);
2898
- const qt = [
2987
+ Fe("Top", new Y(0, 1e3, 0));
2988
+ Fe("Bottom", new Y(0, -1e3, 0));
2989
+ Fe("Left", new Y(-1e3, 0, 0));
2990
+ Fe("Right", new Y(1e3, 0, 0));
2991
+ Fe("Front", new Y(0, 0, 1e3));
2992
+ Fe("Back", new Y(0, 0, -1e3));
2993
+ Fe("Orthographic", new Y(1e3, 1e3, 1e3));
2994
+ const wt = new kt(60, 1, 50, 3e3);
2995
+ wt.name = "Debug";
2996
+ wt.position.set(500, 500, 500);
2997
+ wt.lookAt(0, 0, 0);
2998
+ ae.set("Debug", wt);
2999
+ const tn = [
2899
3000
  "Renderer",
2900
3001
  "Depth",
2901
3002
  "Normals",
2902
3003
  "UVs",
2903
3004
  "Wireframe"
2904
- ], Ma = new _n(), Pa = new kn(), ja = new da(), _a = new Dn({
3005
+ ], Na = new Fn(), La = new Un(), Fa = new ba(), Ua = new Bn({
2905
3006
  opacity: 0.33,
2906
3007
  transparent: !0,
2907
3008
  wireframe: !0
2908
3009
  });
2909
- let mt = "Renderer";
2910
- const A = new tn();
2911
- A.name = "Debug Scene";
2912
- let tt = new tn();
2913
- A.add(tt);
2914
- const ka = new ca();
2915
- A.add(ka);
2916
- const dn = new An(500);
2917
- dn.name = "axisHelper";
2918
- A.add(dn);
2919
- let G = X.get("Debug"), te = X.get("Orthographic"), Fe = X.get("Front"), Ue = X.get("Top");
2920
- function Za(t) {
2921
- const [n, a] = ne(t.mode !== void 0 ? t.mode : "Quad"), [e, o] = ne(null), u = ye(null), c = ye(null), s = ye(null), d = ye(null), p = ye(null), h = (m, v) => {
2922
- const y = H.get(m.name);
2923
- y !== void 0 && y.dispose(), H.delete(m.name);
2924
- const w = me.get(m.name);
2925
- w !== void 0 && (A.remove(w), w.dispose()), me.delete(m.name);
2926
- const F = new Ra(m, v);
2927
- switch (F.enableDamping = !0, F.dampingFactor = 0.05, m.name) {
3010
+ let bt = "Renderer";
3011
+ const G = new sn();
3012
+ G.name = "Debug Scene";
3013
+ let Ie = new sn();
3014
+ G.add(Ie);
3015
+ const rt = new $n();
3016
+ rt.name = "helpers";
3017
+ G.add(rt);
3018
+ const Ba = new ma();
3019
+ rt.add(Ba);
3020
+ const vn = new cn(500);
3021
+ vn.name = "axisHelper";
3022
+ rt.add(vn);
3023
+ const it = new cn(100);
3024
+ it.name = "interactionHelper";
3025
+ rt.add(it);
3026
+ it.visible = !1;
3027
+ let yt = !1, $ = ae.get("Debug"), oe = ae.get("Orthographic"), Ae = ae.get("Front"), De = ae.get("Top");
3028
+ function ri(t) {
3029
+ const [n, a] = ie(t.mode !== void 0 ? t.mode : "Quad"), [e, r] = ie(null), [s, c] = ie(!1), [l, d] = ie(!1), [p, m] = ie(!1), [, b] = ie(Date.now()), x = xe(null), C = xe(null), S = xe(null), F = xe(null), Q = xe(null), H = xe(null), O = (f, g) => {
3030
+ const y = re.get(f.name);
3031
+ y !== void 0 && y.dispose(), re.delete(f.name);
3032
+ const T = Ee.get(f.name);
3033
+ T !== void 0 && (G.remove(T), T.dispose()), Ee.delete(f.name);
3034
+ const V = new Ia(f, g);
3035
+ switch (V.enableDamping = !0, V.dampingFactor = 0.05, f.name) {
2928
3036
  case "Top":
2929
3037
  case "Bottom":
2930
3038
  case "Left":
2931
3039
  case "Right":
2932
3040
  case "Front":
2933
3041
  case "Back":
2934
- F.enableRotate = !1;
3042
+ V.enableRotate = !1;
2935
3043
  break;
2936
3044
  }
2937
- if (H.set(m.name, F), m instanceof Tt) {
2938
- const V = new Nn(m);
2939
- me.set(m.name, V), A.add(V);
2940
- }
2941
- }, b = (m) => {
2942
- const v = me.get(m.name);
2943
- v !== void 0 && (A.remove(v), v.dispose(), me.delete(m.name));
2944
- const y = H.get(m.name);
2945
- y !== void 0 && (y.dispose(), H.delete(m.name));
2946
- }, x = () => {
2947
- H.forEach((m, v) => {
2948
- m.dispose();
2949
- const y = me.get(v);
2950
- y !== void 0 && (A.remove(y), y.dispose()), me.delete(v), H.delete(v);
2951
- }), H.clear(), me.clear();
2952
- }, S = () => {
3045
+ if (re.set(f.name, V), f instanceof kt) {
3046
+ const z = new zn(f);
3047
+ Ee.set(f.name, z), G.add(z);
3048
+ }
3049
+ }, K = (f) => {
3050
+ const g = Ee.get(f.name);
3051
+ g !== void 0 && (G.remove(g), g.dispose(), Ee.delete(f.name));
3052
+ const y = re.get(f.name);
3053
+ y !== void 0 && (y.dispose(), re.delete(f.name));
3054
+ }, de = () => {
3055
+ re.forEach((f, g) => {
3056
+ f.dispose();
3057
+ const y = Ee.get(g);
3058
+ y !== void 0 && (G.remove(y), y.dispose()), Ee.delete(g), re.delete(g);
3059
+ }), re.clear(), Ee.clear();
3060
+ }, ce = () => {
2953
3061
  switch (n) {
2954
3062
  case "Single":
2955
- h(G, c.current);
3063
+ O($, S.current);
2956
3064
  break;
2957
3065
  case "Side by Side":
2958
3066
  case "Stacked":
2959
- h(G, c.current), h(te, s.current);
3067
+ O($, S.current), O(oe, F.current);
2960
3068
  break;
2961
3069
  case "Quad":
2962
- h(G, c.current), h(te, s.current), h(Fe, d.current), h(Ue, p.current);
3070
+ O($, S.current), O(oe, F.current), O(Ae, Q.current), O(De, H.current);
2963
3071
  break;
2964
3072
  }
2965
3073
  };
2966
- Be(() => {
2967
- const m = new In({
2968
- canvas: u.current,
3074
+ Ne(() => {
3075
+ const f = new Gn({
3076
+ canvas: x.current,
2969
3077
  stencil: !1
2970
3078
  });
2971
- m.autoClear = !1, m.shadowMap.enabled = !0, m.setPixelRatio(devicePixelRatio), m.setClearColor(0), o(m);
2972
- }, []), Be(() => {
2973
- const m = () => {
2974
- on(tt), A.remove(tt), t.three.scene !== void 0 && (tt = t.three.scene, A.add(tt));
3079
+ f.autoClear = !1, f.shadowMap.enabled = !0, f.setPixelRatio(devicePixelRatio), f.setClearColor(0), r(f);
3080
+ }, []), Ne(() => {
3081
+ const f = () => {
3082
+ fn(Ie), G.remove(Ie), t.three.scene !== void 0 && (Ie = t.three.scene, G.add(Ie));
3083
+ }, g = (T) => {
3084
+ var U;
3085
+ const V = T.value, z = (U = t.three.scene) == null ? void 0 : U.getObjectByProperty("uuid", V.uuid);
3086
+ z !== void 0 && ae.set(V.name, z), b(Date.now());
3087
+ }, y = (T) => {
3088
+ ae.delete(T.value.name), b(Date.now());
2975
3089
  };
2976
- return I.addEventListener(N.SET_SCENE, m), () => {
2977
- I.removeEventListener(N.SET_SCENE, m);
3090
+ return k.addEventListener(A.SET_SCENE, f), k.addEventListener(A.ADD_CAMERA, g), k.addEventListener(A.REMOVE_CAMERA, y), () => {
3091
+ k.removeEventListener(A.SET_SCENE, f), k.removeEventListener(A.ADD_CAMERA, g), k.removeEventListener(A.REMOVE_CAMERA, y);
2978
3092
  };
2979
- }, []), Be(() => {
3093
+ }, []), Ne(() => {
2980
3094
  if (e === null)
2981
3095
  return;
2982
- let m = window.innerWidth, v = window.innerHeight, y = Math.floor(m / 2), w = Math.floor(v / 2), F = -1;
2983
- const V = () => {
2984
- m = window.innerWidth - 300, v = window.innerHeight, y = Math.floor(m / 2), w = Math.floor(v / 2), e.setSize(m, v);
2985
- let j = m, D = v;
3096
+ let f = window.innerWidth, g = window.innerHeight, y = Math.floor(f / 2), T = Math.floor(g / 2), V = -1;
3097
+ const z = () => {
3098
+ f = window.innerWidth - 300, g = window.innerHeight, y = Math.floor(f / 2), T = Math.floor(g / 2), e.setSize(f, g);
3099
+ let R = f, I = g;
2986
3100
  switch (n) {
2987
3101
  case "Side by Side":
2988
- j = y, D = v;
3102
+ R = y, I = g;
2989
3103
  break;
2990
3104
  case "Stacked":
2991
- j = m, D = w;
3105
+ R = f, I = T;
2992
3106
  break;
2993
3107
  case "Quad":
2994
- j = y, D = w;
3108
+ R = y, I = T;
2995
3109
  break;
2996
3110
  }
2997
- X.forEach((z) => {
2998
- var ce;
2999
- z instanceof en ? (z.left = j / -2, z.right = j / 2, z.top = D / 2, z.bottom = D / -2, z.updateProjectionMatrix()) : z instanceof Tt && (z.aspect = j / D, z.updateProjectionMatrix(), (ce = me.get(z.name)) == null || ce.update());
3111
+ ae.forEach((X) => {
3112
+ var pe;
3113
+ X instanceof on ? (X.left = R / -2, X.right = R / 2, X.top = I / 2, X.bottom = I / -2, X.updateProjectionMatrix()) : X instanceof kt && (X.aspect = R / I, X.updateProjectionMatrix(), (pe = Ee.get(X.name)) == null || pe.update());
3000
3114
  });
3001
- }, Z = () => {
3002
- e.setViewport(0, 0, m, v), e.setScissor(0, 0, m, v), e.render(A, G);
3003
- }, se = () => {
3115
+ }, U = () => {
3116
+ e.setViewport(0, 0, f, g), e.setScissor(0, 0, f, g), e.render(G, $);
3117
+ }, D = () => {
3004
3118
  if (n === "Side by Side")
3005
- e.setViewport(0, 0, y, v), e.setScissor(0, 0, y, v), e.render(A, G), e.setViewport(y, 0, y, v), e.setScissor(y, 0, y, v), e.render(A, te);
3119
+ e.setViewport(0, 0, y, g), e.setScissor(0, 0, y, g), e.render(G, $), e.setViewport(y, 0, y, g), e.setScissor(y, 0, y, g), e.render(G, oe);
3006
3120
  else {
3007
- const j = v - w;
3008
- e.setViewport(0, j, m, w), e.setScissor(0, j, m, w), e.render(A, G), e.setViewport(0, 0, m, w), e.setScissor(0, 0, m, w), e.render(A, te);
3009
- }
3010
- }, Y = () => {
3011
- let j = 0, D = 0;
3012
- D = v - w, j = 0, e.setViewport(j, D, y, w), e.setScissor(j, D, y, w), e.render(A, G), j = y, e.setViewport(j, D, y, w), e.setScissor(j, D, y, w), e.render(A, te), D = 0, j = 0, e.setViewport(j, D, y, w), e.setScissor(j, D, y, w), e.render(A, Fe), j = y, e.setViewport(j, D, y, w), e.setScissor(j, D, y, w), e.render(A, Ue);
3013
- }, fe = () => {
3014
- switch (H.forEach((j) => {
3015
- j.update();
3121
+ const R = g - T;
3122
+ e.setViewport(0, R, f, T), e.setScissor(0, R, f, T), e.render(G, $), e.setViewport(0, 0, f, T), e.setScissor(0, 0, f, T), e.render(G, oe);
3123
+ }
3124
+ }, B = () => {
3125
+ let R = 0, I = 0;
3126
+ I = g - T, R = 0, e.setViewport(R, I, y, T), e.setScissor(R, I, y, T), e.render(G, $), R = y, e.setViewport(R, I, y, T), e.setScissor(R, I, y, T), e.render(G, oe), I = 0, R = 0, e.setViewport(R, I, y, T), e.setScissor(R, I, y, T), e.render(G, Ae), R = y, e.setViewport(R, I, y, T), e.setScissor(R, I, y, T), e.render(G, De);
3127
+ }, J = () => {
3128
+ switch (re.forEach((R) => {
3129
+ R.update();
3016
3130
  }), e.clear(), n) {
3017
3131
  case "Single":
3018
- Z();
3132
+ U();
3019
3133
  break;
3020
3134
  case "Side by Side":
3021
3135
  case "Stacked":
3022
- se();
3136
+ D();
3023
3137
  break;
3024
3138
  case "Quad":
3025
- Y();
3139
+ B();
3026
3140
  break;
3027
3141
  }
3028
- F = requestAnimationFrame(fe);
3142
+ V = requestAnimationFrame(J);
3029
3143
  };
3030
- return S(), window.addEventListener("resize", V), V(), fe(), () => {
3031
- window.removeEventListener("resize", V), cancelAnimationFrame(F), F = -1;
3144
+ return ce(), window.addEventListener("resize", z), z(), J(), () => {
3145
+ window.removeEventListener("resize", z), cancelAnimationFrame(V), V = -1;
3032
3146
  };
3147
+ }, [n, e]), Ne(() => {
3148
+ if (e !== null) {
3149
+ const f = new Vn(), g = new ue(), y = (U, D, B, J) => {
3150
+ switch (n) {
3151
+ case "Quad":
3152
+ U < B ? D < J ? f.setFromCamera(g, $) : f.setFromCamera(g, Ae) : D < J ? f.setFromCamera(g, oe) : f.setFromCamera(g, De);
3153
+ break;
3154
+ case "Side by Side":
3155
+ U < B ? f.setFromCamera(g, $) : f.setFromCamera(g, oe);
3156
+ break;
3157
+ case "Single":
3158
+ f.setFromCamera(g, $);
3159
+ break;
3160
+ case "Stacked":
3161
+ D < J ? f.setFromCamera(g, $) : f.setFromCamera(g, oe);
3162
+ break;
3163
+ }
3164
+ }, T = (U) => {
3165
+ if (!yt)
3166
+ return;
3167
+ const D = new ue();
3168
+ e.getSize(D);
3169
+ const B = Math.min(U.clientX, D.x), J = Math.min(U.clientY, D.y);
3170
+ g.x = We(B, 0, D.x, -1, 1), g.y = We(J, 0, D.y, 1, -1);
3171
+ const R = D.x / 2, I = D.y / 2, X = () => {
3172
+ B < R ? g.x = We(B, 0, R, -1, 1) : g.x = We(B, R, D.x, -1, 1);
3173
+ }, pe = () => {
3174
+ J < I ? g.y = We(J, 0, I, 1, -1) : g.y = We(J, I, D.y, 1, -1);
3175
+ };
3176
+ switch (n) {
3177
+ case "Quad":
3178
+ X(), pe();
3179
+ break;
3180
+ case "Side by Side":
3181
+ X();
3182
+ break;
3183
+ case "Stacked":
3184
+ pe(), pe();
3185
+ break;
3186
+ }
3187
+ y(B, J, R, I);
3188
+ const Oe = f.intersectObjects(Ie.children);
3189
+ Oe.length > 0 && it.position.copy(Oe[0].point);
3190
+ }, V = (U) => {
3191
+ if (!yt)
3192
+ return;
3193
+ const D = new ue();
3194
+ if (e.getSize(D), U.clientX >= D.x)
3195
+ return;
3196
+ T(U);
3197
+ const B = f.intersectObjects(Ie.children);
3198
+ B.length > 0 && t.three.getObject(B[0].object.uuid);
3199
+ }, z = C.current;
3200
+ return z.addEventListener("mousemove", T, !1), z.addEventListener("click", V, !1), () => {
3201
+ z.removeEventListener("mousemove", T), z.removeEventListener("click", V);
3202
+ };
3203
+ }
3033
3204
  }, [n, e]);
3034
- const O = [];
3035
- return X.forEach((m, v) => {
3036
- O.push(v);
3037
- }), /* @__PURE__ */ l.jsxs("div", { className: "multiview", children: [
3038
- /* @__PURE__ */ l.jsx("canvas", { ref: u }),
3039
- /* @__PURE__ */ l.jsxs("div", { className: `cameras ${n === "Single" || n === "Stacked" ? "single" : ""}`, children: [
3040
- n === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(Te, { camera: G, options: O, ref: c, onSelect: (m) => {
3205
+ const te = [];
3206
+ return ae.forEach((f, g) => {
3207
+ te.push(g);
3208
+ }), /* @__PURE__ */ u.jsxs("div", { className: "multiview", children: [
3209
+ /* @__PURE__ */ u.jsx("canvas", { ref: x }),
3210
+ /* @__PURE__ */ u.jsxs("div", { className: `cameras ${n === "Single" || n === "Stacked" ? "single" : ""}`, ref: C, children: [
3211
+ n === "Single" && /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsx(ke, { camera: $, options: te, ref: S, onSelect: (f) => {
3041
3212
  var y;
3042
- (y = H.get(G.name)) == null || y.dispose();
3043
- const v = X.get(m);
3044
- v !== void 0 && (b(G), G = v, h(v, c.current));
3213
+ (y = re.get($.name)) == null || y.dispose();
3214
+ const g = ae.get(f);
3215
+ g !== void 0 && (K($), $ = g, O(g, S.current));
3045
3216
  } }) }),
3046
- (n === "Side by Side" || n === "Stacked") && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3047
- /* @__PURE__ */ l.jsx(Te, { camera: G, options: O, ref: c, onSelect: (m) => {
3217
+ (n === "Side by Side" || n === "Stacked") && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
3218
+ /* @__PURE__ */ u.jsx(ke, { camera: $, options: te, ref: S, onSelect: (f) => {
3048
3219
  var y;
3049
- (y = H.get(G.name)) == null || y.dispose();
3050
- const v = X.get(m);
3051
- v !== void 0 && (b(G), G = v, h(v, c.current));
3220
+ (y = re.get($.name)) == null || y.dispose();
3221
+ const g = ae.get(f);
3222
+ g !== void 0 && (K($), $ = g, O(g, S.current));
3052
3223
  } }),
3053
- /* @__PURE__ */ l.jsx(Te, { camera: te, options: O, ref: s, onSelect: (m) => {
3224
+ /* @__PURE__ */ u.jsx(ke, { camera: oe, options: te, ref: F, onSelect: (f) => {
3054
3225
  var y;
3055
- (y = H.get(te.name)) == null || y.dispose();
3056
- const v = X.get(m);
3057
- v !== void 0 && (b(te), te = v, h(v, s.current));
3226
+ (y = re.get(oe.name)) == null || y.dispose();
3227
+ const g = ae.get(f);
3228
+ g !== void 0 && (K(oe), oe = g, O(g, F.current));
3058
3229
  } })
3059
3230
  ] }),
3060
- n === "Quad" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3061
- /* @__PURE__ */ l.jsx(Te, { camera: G, options: O, ref: c, onSelect: (m) => {
3231
+ n === "Quad" && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
3232
+ /* @__PURE__ */ u.jsx(ke, { camera: $, options: te, ref: S, onSelect: (f) => {
3062
3233
  var y;
3063
- (y = H.get(G.name)) == null || y.dispose();
3064
- const v = X.get(m);
3065
- v !== void 0 && (b(G), G = v, h(v, c.current));
3234
+ (y = re.get($.name)) == null || y.dispose();
3235
+ const g = ae.get(f);
3236
+ g !== void 0 && (K($), $ = g, O(g, S.current));
3066
3237
  } }),
3067
- /* @__PURE__ */ l.jsx(Te, { camera: te, options: O, ref: s, onSelect: (m) => {
3238
+ /* @__PURE__ */ u.jsx(ke, { camera: oe, options: te, ref: F, onSelect: (f) => {
3068
3239
  var y;
3069
- (y = H.get(te.name)) == null || y.dispose();
3070
- const v = X.get(m);
3071
- v !== void 0 && (b(te), te = v, h(v, s.current));
3240
+ (y = re.get(oe.name)) == null || y.dispose();
3241
+ const g = ae.get(f);
3242
+ g !== void 0 && (K(oe), oe = g, O(g, F.current));
3072
3243
  } }),
3073
- /* @__PURE__ */ l.jsx(Te, { camera: Fe, options: O, ref: d, onSelect: (m) => {
3244
+ /* @__PURE__ */ u.jsx(ke, { camera: Ae, options: te, ref: Q, onSelect: (f) => {
3074
3245
  var y;
3075
- (y = H.get(Fe.name)) == null || y.dispose();
3076
- const v = X.get(m);
3077
- v !== void 0 && (b(Fe), Fe = v, h(v, d.current));
3246
+ (y = re.get(Ae.name)) == null || y.dispose();
3247
+ const g = ae.get(f);
3248
+ g !== void 0 && (K(Ae), Ae = g, O(g, Q.current));
3078
3249
  } }),
3079
- /* @__PURE__ */ l.jsx(Te, { camera: Ue, options: O, ref: p, onSelect: (m) => {
3250
+ /* @__PURE__ */ u.jsx(ke, { camera: De, options: te, ref: H, onSelect: (f) => {
3080
3251
  var y;
3081
- (y = H.get(Ue.name)) == null || y.dispose();
3082
- const v = X.get(m);
3083
- v !== void 0 && (b(Ue), Ue = v, h(v, p.current));
3252
+ (y = re.get(De.name)) == null || y.dispose();
3253
+ const g = ae.get(f);
3254
+ g !== void 0 && (K(De), De = g, O(g, H.current));
3084
3255
  } })
3085
3256
  ] })
3086
3257
  ] }),
3087
- /* @__PURE__ */ l.jsxs("div", { className: "settings", children: [
3088
- /* @__PURE__ */ l.jsx(
3089
- _t,
3258
+ /* @__PURE__ */ u.jsxs("div", { className: "settings", children: [
3259
+ /* @__PURE__ */ u.jsx(
3260
+ Et,
3090
3261
  {
3091
- index: Xt.indexOf(n),
3092
- options: Xt,
3093
- onSelect: (m) => {
3094
- m !== n && (x(), a(m));
3262
+ index: en.indexOf(n),
3263
+ options: en,
3264
+ onSelect: (f) => {
3265
+ f !== n && (de(), a(f));
3266
+ },
3267
+ open: s,
3268
+ onToggle: (f) => {
3269
+ c(f), l && d(!1), p && m(!1);
3095
3270
  }
3096
3271
  }
3097
3272
  ),
3098
- /* @__PURE__ */ l.jsx(
3099
- _t,
3273
+ /* @__PURE__ */ u.jsx(
3274
+ Et,
3100
3275
  {
3101
- index: qt.indexOf(mt),
3102
- options: qt,
3103
- onSelect: (m) => {
3104
- if (m !== mt)
3105
- switch (mt = m, mt) {
3276
+ index: tn.indexOf(bt),
3277
+ options: tn,
3278
+ onSelect: (f) => {
3279
+ if (f !== bt)
3280
+ switch (bt = f, bt) {
3106
3281
  case "Depth":
3107
- A.overrideMaterial = Ma;
3282
+ G.overrideMaterial = Na;
3108
3283
  break;
3109
3284
  case "Normals":
3110
- A.overrideMaterial = Pa;
3285
+ G.overrideMaterial = La;
3111
3286
  break;
3112
3287
  default:
3113
3288
  case "Renderer":
3114
- A.overrideMaterial = null;
3289
+ G.overrideMaterial = null;
3115
3290
  break;
3116
3291
  case "Wireframe":
3117
- A.overrideMaterial = _a;
3292
+ G.overrideMaterial = Ua;
3118
3293
  break;
3119
3294
  case "UVs":
3120
- A.overrideMaterial = ja;
3295
+ G.overrideMaterial = Fa;
3121
3296
  break;
3122
3297
  }
3298
+ },
3299
+ open: l,
3300
+ onToggle: (f) => {
3301
+ s && c(!1), d(f), p && m(!1);
3302
+ }
3303
+ }
3304
+ ),
3305
+ /* @__PURE__ */ u.jsx(
3306
+ Et,
3307
+ {
3308
+ index: 0,
3309
+ options: [
3310
+ "Orbit Mode",
3311
+ "Selection Mode"
3312
+ ],
3313
+ onSelect: (f) => {
3314
+ yt = f === "Selection Mode", it.visible = yt;
3315
+ },
3316
+ open: p,
3317
+ onToggle: (f) => {
3318
+ s && c(!1), l && d(!1), m(f);
3123
3319
  }
3124
3320
  }
3125
3321
  )
3126
3322
  ] })
3127
3323
  ] });
3128
3324
  }
3129
- function Ja(t) {
3130
- return /* @__PURE__ */ l.jsxs("div", { className: "editor", ref: t.ref, style: t.style, children: [
3131
- /* @__PURE__ */ l.jsx("header", { children: t.header }),
3325
+ function oi(t) {
3326
+ return /* @__PURE__ */ u.jsxs("div", { className: "editor", ref: t.ref, style: t.style, children: [
3327
+ /* @__PURE__ */ u.jsx("header", { children: t.header }),
3132
3328
  t.children,
3133
- /* @__PURE__ */ l.jsx("footer", { children: t.footer })
3329
+ /* @__PURE__ */ u.jsx("footer", { children: t.footer })
3134
3330
  ] });
3135
3331
  }
3136
3332
  export {
3137
- jt as Accordion,
3138
- Va as Application,
3139
- gt as BaseRemote,
3140
- un as ChildObject,
3141
- fa as ContainerObject,
3142
- na as Draggable,
3143
- ta as DraggableItem,
3144
- aa as Dropdown,
3145
- ra as DropdownItem,
3146
- Ja as Editor,
3147
- ca as InfiniteGridHelper,
3148
- Oa as Inspector,
3149
- Za as MultiView,
3150
- ln as NavButton,
3151
- Ya as RemoteComponents,
3152
- Ka as RemoteController,
3153
- za as RemoteTheatre,
3154
- Wa as RemoteThree,
3155
- Ha as RemoteTweakpane,
3156
- Xa as SceneHierarchy,
3157
- qa as SceneInspector,
3158
- N as ToolEvents,
3159
- da as UVMaterial,
3160
- Ba as clamp,
3161
- Yn as colorToHex,
3162
- I as debugDispatcher,
3163
- on as dispose,
3164
- Wn as disposeMaterial,
3165
- Ga as disposeTexture,
3166
- $a as distance,
3167
- rn as hierarchyUUID,
3168
- Vn as isColor,
3169
- Gn as randomID,
3170
- zn as resetThreeObjects,
3171
- Ct as round,
3172
- Rt as totalThreeObjects
3333
+ Lt as Accordion,
3334
+ Za as Application,
3335
+ xt as BaseRemote,
3336
+ gn as ChildObject,
3337
+ ya as ContainerObject,
3338
+ la as Draggable,
3339
+ ca as DraggableItem,
3340
+ ua as Dropdown,
3341
+ da as DropdownItem,
3342
+ oi as Editor,
3343
+ ma as InfiniteGridHelper,
3344
+ Aa as Inspector,
3345
+ ri as MultiView,
3346
+ mn as NavButton,
3347
+ Ja as RemoteComponents,
3348
+ ni as RemoteController,
3349
+ Qa as RemoteTheatre,
3350
+ ei as RemoteThree,
3351
+ ti as RemoteTweakpane,
3352
+ ii as SceneInspector,
3353
+ ai as SidePanel,
3354
+ A as ToolEvents,
3355
+ ba as UVMaterial,
3356
+ Ka as clamp,
3357
+ Jn as colorToHex,
3358
+ k as debugDispatcher,
3359
+ fn as dispose,
3360
+ ea as disposeMaterial,
3361
+ qa as disposeTexture,
3362
+ Xa as distance,
3363
+ dn as hierarchyUUID,
3364
+ Zn as isColor,
3365
+ qn as randomID,
3366
+ Qn as resetThreeObjects,
3367
+ Rt as round,
3368
+ At as totalThreeObjects
3173
3369
  };