@tomorrowevening/hermes 0.0.46 → 0.0.47

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.
package/dist/hermes.es.js CHANGED
@@ -1,65 +1,71 @@
1
- import { EventDispatcher as en, Texture as tn, CubeTexture as kn, RepeatWrapping as Ut, Color as St, FrontSide as jn, BackSide as Dn, DoubleSide as nn, NoBlending as In, NormalBlending as Nn, AdditiveBlending as Ln, SubtractiveBlending as Fn, MultiplyBlending as Bn, CustomBlending as Un, AddEquation as $n, SubtractEquation as zn, ReverseSubtractEquation as Yn, MinEquation as Gn, MaxEquation as Vn, ZeroFactor as an, OneFactor as rn, SrcColorFactor as sn, OneMinusSrcColorFactor as on, SrcAlphaFactor as cn, OneMinusSrcAlphaFactor as ln, DstAlphaFactor as dn, OneMinusDstAlphaFactor as un, DstColorFactor as hn, OneMinusDstColorFactor as fn, SrcAlphaSaturateFactor as Hn, ConstantColorFactor as pn, OneMinusConstantColorFactor as mn, ConstantAlphaFactor as vn, OneMinusConstantAlphaFactor as gn, Matrix4 as Wn, Vector3 as W, Euler as qn, Ray as Kn, Plane as Xn, MathUtils as Zn, MOUSE as Xe, TOUCH as Ze, Quaternion as $t, Spherical as zt, Vector2 as fe, ShaderMaterial as bn, GLSL3 as Jn, Mesh as Qn, PlaneGeometry as ea, Scene as ta, Group as na, AxesHelper as Yt, MeshDepthMaterial as aa, MeshNormalMaterial as ia, MeshBasicMaterial as ra, PerspectiveCamera as Rt, WebGLRenderer as sa, Raycaster as oa, OrthographicCamera as Gt, CameraHelper as ca } from "three";
2
- import { Pane as la } from "tweakpane";
3
- import * as da from "@tweakpane/plugin-essentials";
4
- import yn, { useState as oe, useRef as Re, useEffect as _e, forwardRef as ua, useMemo as Se } from "react";
5
- import { Reorder as En } from "framer-motion";
6
- const Sn = () => {
7
- }, si = () => {
1
+ import { EventDispatcher as an, Texture as rn, CubeTexture as In, RepeatWrapping as $t, Color as St, FrontSide as Nn, BackSide as Ln, DoubleSide as sn, NoBlending as Fn, NormalBlending as Bn, AdditiveBlending as Un, SubtractiveBlending as $n, MultiplyBlending as zn, CustomBlending as Yn, AddEquation as Vn, SubtractEquation as Gn, ReverseSubtractEquation as Hn, MinEquation as Wn, MaxEquation as qn, ZeroFactor as on, OneFactor as cn, SrcColorFactor as ln, OneMinusSrcColorFactor as un, SrcAlphaFactor as dn, OneMinusSrcAlphaFactor as hn, DstAlphaFactor as fn, OneMinusDstAlphaFactor as pn, DstColorFactor as mn, OneMinusDstColorFactor as vn, SrcAlphaSaturateFactor as Kn, ConstantColorFactor as gn, OneMinusConstantColorFactor as bn, ConstantAlphaFactor as yn, OneMinusConstantAlphaFactor as En, Matrix4 as Xn, Vector3 as K, Euler as Zn, Ray as Jn, Plane as Qn, MathUtils as ea, MOUSE as Xe, TOUCH as Ze, Quaternion as zt, Spherical as Yt, Vector2 as me, ShaderMaterial as xn, GLSL3 as ta, Mesh as na, PlaneGeometry as aa, Scene as ia, Group as ra, AxesHelper as Vt, MeshDepthMaterial as sa, MeshNormalMaterial as oa, MeshBasicMaterial as ca, PerspectiveCamera as Pt, WebGLRenderer as la, Raycaster as ua, OrthographicCamera as Gt, CameraHelper as da } from "three";
2
+ import { Pane as ha } from "tweakpane";
3
+ import * as fa from "@tweakpane/plugin-essentials";
4
+ import Cn, { useState as ne, useRef as he, useEffect as Re, forwardRef as pa, useMemo as Se } from "react";
5
+ import { Reorder as Sn } from "framer-motion";
6
+ const wn = () => {
7
+ }, ui = () => {
8
8
  };
9
- function lt(t) {
9
+ function dt(t) {
10
10
  return t.substring(0, 1).toUpperCase() + t.substring(1);
11
11
  }
12
- function oi(t, n, a) {
12
+ function Je(t, n, a) {
13
13
  return Math.min(n, Math.max(t, a));
14
14
  }
15
- function ci(t, n) {
15
+ function Ht(t, n, a) {
16
+ return (a - t) / (n - t);
17
+ }
18
+ function Wt(t, n, a) {
19
+ return t * (1 - a) + n * a;
20
+ }
21
+ function di(t, n) {
16
22
  const a = t - n;
17
23
  return Math.sqrt(a * a);
18
24
  }
19
- function ha() {
25
+ function ma() {
20
26
  return Math.round(Math.random() * 1e6).toString();
21
27
  }
22
- function fa(t) {
28
+ function va(t) {
23
29
  return t.r !== void 0 && t.g !== void 0 && t.b !== void 0;
24
30
  }
25
- function pa(t) {
31
+ function ga(t) {
26
32
  const n = Math.round(t.r * 255), a = Math.round(t.g * 255), e = Math.round(t.b * 255), i = (d) => {
27
33
  const u = d.toString(16);
28
34
  return u.length === 1 ? "0" + u : u;
29
35
  }, o = i(n), h = i(a), c = i(e);
30
36
  return "#" + o + h + c;
31
37
  }
32
- function _t(t, n = 1) {
38
+ function ut(t, n = 1) {
33
39
  return Number(t.toFixed(n));
34
40
  }
35
- let jt = 0;
36
- const ma = () => {
37
- jt = 0;
38
- }, Cn = (t) => {
41
+ let Dt = 0;
42
+ const ba = () => {
43
+ Dt = 0;
44
+ }, On = (t) => {
39
45
  if (!t)
40
46
  return;
41
47
  let n = t.name.replace(" ", "");
42
- n.length === 0 && (n = `obj_${jt}`, jt++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
43
- Cn(a);
48
+ n.length === 0 && (n = `obj_${Dt}`, Dt++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
49
+ On(a);
44
50
  });
45
- }, li = (t) => {
51
+ }, hi = (t) => {
46
52
  t?.dispose();
47
- }, va = (t) => {
53
+ }, ya = (t) => {
48
54
  t && (Array.isArray(t) ? t.forEach((n) => n.dispose()) : t.dispose());
49
- }, xn = (t) => {
55
+ }, Mn = (t) => {
50
56
  if (t) {
51
57
  for (; t.children.length > 0; ) {
52
58
  const n = t.children[0];
53
- n.type === "Audio" ? (n.pause(), n.parent && n.parent.remove(n)) : xn(n);
59
+ n.type === "Audio" ? (n.pause(), n.parent && n.parent.remove(n)) : Mn(n);
54
60
  }
55
61
  if (t.parent && t.parent.remove(t), t.isMesh) {
56
62
  const n = t;
57
- n.geometry?.dispose(), va(n.material);
63
+ n.geometry?.dispose(), ya(n.material);
58
64
  }
59
65
  t.dispose !== void 0 && t.dispose();
60
66
  }
61
67
  };
62
- class di {
68
+ class fi {
63
69
  components = /* @__PURE__ */ new Map();
64
70
  listen;
65
71
  // Protected
@@ -113,7 +119,7 @@ class di {
113
119
  n && (this._mode = "editor");
114
120
  }
115
121
  }
116
- const P = new en(), k = {
122
+ const D = new an(), I = {
117
123
  CUSTOM: "ToolEvents::custom",
118
124
  // Components
119
125
  SELECT_DROPDOWN: "ToolEvents::selectDropdown",
@@ -129,7 +135,7 @@ const P = new en(), k = {
129
135
  ADD_CAMERA: "ToolEvents::addCamera",
130
136
  REMOVE_CAMERA: "ToolEvents::removeCamera"
131
137
  };
132
- class Ct {
138
+ class wt {
133
139
  app;
134
140
  constructor(n) {
135
141
  this.app = n;
@@ -141,7 +147,7 @@ class Ct {
141
147
  handleEditor(n, a, e) {
142
148
  }
143
149
  }
144
- class ui extends Ct {
150
+ class pi extends wt {
145
151
  selectDropdown(n, a) {
146
152
  this.app.send({
147
153
  event: "selectComponent",
@@ -165,22 +171,22 @@ class ui extends Ct {
165
171
  handleApp(n, a, e) {
166
172
  switch (e.event) {
167
173
  case "selectComponent":
168
- P.dispatchEvent({ type: k.SELECT_DROPDOWN, value: e.data });
174
+ D.dispatchEvent({ type: I.SELECT_DROPDOWN, value: e.data });
169
175
  break;
170
176
  case "draggableListUpdate":
171
- P.dispatchEvent({ type: k.DRAG_UPDATE, value: e.data });
177
+ D.dispatchEvent({ type: I.DRAG_UPDATE, value: e.data });
172
178
  break;
173
179
  }
174
180
  }
175
181
  }
176
- class Nt extends Ct {
182
+ class Lt extends wt {
177
183
  project;
178
184
  sheets = /* @__PURE__ */ new Map();
179
185
  sheetObjects = /* @__PURE__ */ new Map();
180
186
  sheetObjectCBs = /* @__PURE__ */ new Map();
181
187
  sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
182
188
  activeSheet;
183
- studio;
189
+ studio = void 0;
184
190
  static rafDriver = void 0;
185
191
  dispose() {
186
192
  this.project = void 0, this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
@@ -227,12 +233,12 @@ class Nt extends Ct {
227
233
  return;
228
234
  const h = `${n}_${a}`;
229
235
  let c = this.sheetObjects.get(h);
230
- c !== void 0 ? c = o.object(a, { ...e, ...c.value }, { reconfigure: !0 }) : c = o.object(a, e), this.sheetObjects.set(h, c), this.sheetObjectCBs.set(h, i !== void 0 ? i : Sn);
236
+ c !== void 0 ? c = o.object(a, { ...e, ...c.value }, { reconfigure: !0 }) : c = o.object(a, e), this.sheetObjects.set(h, c), this.sheetObjectCBs.set(h, i !== void 0 ? i : wn);
231
237
  const d = c.onValuesChange((u) => {
232
238
  if (this.app.editor) {
233
239
  for (const b in u) {
234
240
  const E = u[b];
235
- typeof E == "object" && fa(E) && (u[b] = {
241
+ typeof E == "object" && va(E) && (u[b] = {
236
242
  r: E.r,
237
243
  g: E.g,
238
244
  b: E.b,
@@ -249,8 +255,8 @@ class Nt extends Ct {
249
255
  }
250
256
  });
251
257
  }
252
- const v = this.sheetObjectCBs.get(h);
253
- v !== void 0 && v(u);
258
+ const m = this.sheetObjectCBs.get(h);
259
+ m !== void 0 && m(u);
254
260
  });
255
261
  return this.sheetObjectUnsubscribe.set(h, d), c;
256
262
  }
@@ -269,10 +275,10 @@ class Nt extends Ct {
269
275
  let o;
270
276
  switch (e.event) {
271
277
  case "setSheet":
272
- o = i.sheets.get(e.data.sheet), o !== void 0 && (i.activeSheet = o, this.studio.setSelection([o]));
278
+ o = i.sheets.get(e.data.sheet), o !== void 0 && (i.activeSheet = o, this.studio?.setSelection([o]));
273
279
  break;
274
280
  case "setSheetObject":
275
- o = i.sheetObjects.get(`${e.data.sheet}_${e.data.key}`), o !== void 0 && this.studio.setSelection([o]);
281
+ o = i.sheetObjects.get(`${e.data.sheet}_${e.data.key}`), o !== void 0 && this.studio?.setSelection([o]);
276
282
  break;
277
283
  case "updateSheetObject":
278
284
  o = i.sheets.get(e.data.sheet), o !== void 0 && o.sequence.pause(), o = i.sheetObjectCBs.get(e.data.sheetObject), o !== void 0 && o(e.data.values);
@@ -297,29 +303,29 @@ class Nt extends Ct {
297
303
  }
298
304
  handleEditorApp(n, a) {
299
305
  if (n.editor) {
300
- this.studio.ui.restore(), this.studio.onSelectionChange((h) => {
306
+ this.studio?.ui.restore(), this.studio?.onSelectionChange((h) => {
301
307
  h.length < 1 || h.forEach((c) => {
302
- let d = c.address.sheetId, u = "setSheet", v = {};
308
+ let d = c.address.sheetId, u = "setSheet", m = {};
303
309
  switch (c.type) {
304
310
  case "Theatre_Sheet_PublicAPI":
305
- u = "setSheet", v = {
311
+ u = "setSheet", m = {
306
312
  sheet: c.address.sheetId
307
313
  }, a.activeSheet = a.sheets.get(c.address.sheetId);
308
314
  break;
309
315
  case "Theatre_SheetObject_PublicAPI":
310
- u = "setSheetObject", d += `_${c.address.objectKey}`, v = {
316
+ u = "setSheetObject", d += `_${c.address.objectKey}`, m = {
311
317
  id: d,
312
318
  sheet: c.address.sheetId,
313
319
  key: c.address.objectKey
314
320
  }, a.activeSheet = a.sheets.get(c.address.sheetId);
315
321
  break;
316
322
  }
317
- n.send({ event: u, target: "app", data: v });
323
+ n.send({ event: u, target: "app", data: m });
318
324
  });
319
325
  });
320
326
  let e = -1;
321
327
  const i = () => {
322
- if (Nt.rafDriver?.tick(performance.now()), a.activeSheet !== void 0 && e !== a.activeSheet.sequence.position) {
328
+ if (Lt.rafDriver?.tick(performance.now()), a.activeSheet !== void 0 && e !== a.activeSheet.sequence.position) {
323
329
  e = a.activeSheet.sequence.position;
324
330
  const h = a.activeSheet;
325
331
  n.send({
@@ -336,34 +342,34 @@ class Nt extends Ct {
336
342
  };
337
343
  i(), o();
338
344
  } else
339
- this.studio.ui.hide();
345
+ this.studio?.ui.hide();
340
346
  }
341
347
  }
342
- function hi(t, n, a) {
348
+ function mi(t, n, a) {
343
349
  if (t.editor) {
344
350
  a.ui.restore(), a.onSelectionChange((h) => {
345
351
  h.length < 1 || h.forEach((c) => {
346
- let d = c.address.sheetId, u = "setSheet", v = {};
352
+ let d = c.address.sheetId, u = "setSheet", m = {};
347
353
  switch (c.type) {
348
354
  case "Theatre_Sheet_PublicAPI":
349
- u = "setSheet", v = {
355
+ u = "setSheet", m = {
350
356
  sheet: c.address.sheetId
351
357
  }, n.activeSheet = n.sheets.get(c.address.sheetId);
352
358
  break;
353
359
  case "Theatre_SheetObject_PublicAPI":
354
- u = "setSheetObject", d += `_${c.address.objectKey}`, v = {
360
+ u = "setSheetObject", d += `_${c.address.objectKey}`, m = {
355
361
  id: d,
356
362
  sheet: c.address.sheetId,
357
363
  key: c.address.objectKey
358
364
  }, n.activeSheet = n.sheets.get(c.address.sheetId);
359
365
  break;
360
366
  }
361
- t.send({ event: u, target: "app", data: v });
367
+ t.send({ event: u, target: "app", data: m });
362
368
  });
363
369
  });
364
370
  let e = -1;
365
371
  const i = () => {
366
- if (Nt.rafDriver?.tick(performance.now()), n.activeSheet !== void 0 && e !== n.activeSheet.sequence.position) {
372
+ if (Lt.rafDriver?.tick(performance.now()), n.activeSheet !== void 0 && e !== n.activeSheet.sequence.position) {
367
373
  e = n.activeSheet.sequence.position;
368
374
  const h = n.activeSheet;
369
375
  t.send({
@@ -382,7 +388,7 @@ function hi(t, n, a) {
382
388
  } else
383
389
  a.ui.hide();
384
390
  }
385
- function ga(t) {
391
+ function Ea(t) {
386
392
  if (t.name === "cameras")
387
393
  return "camera";
388
394
  if (t.name === "interactive")
@@ -396,7 +402,7 @@ function ga(t) {
396
402
  const n = t.type;
397
403
  return n.search("Helper") > -1 ? "icon_utils" : n.search("Camera") > -1 ? "camera" : n.search("Light") > -1 ? "light" : "obj3D";
398
404
  }
399
- function wn(t) {
405
+ function Tn(t) {
400
406
  const n = {
401
407
  name: t.name,
402
408
  type: t.type,
@@ -404,10 +410,10 @@ function wn(t) {
404
410
  children: []
405
411
  };
406
412
  return t.children.forEach((a) => {
407
- n.children.push(wn(a));
413
+ n.children.push(Tn(a));
408
414
  }), n;
409
415
  }
410
- function ba(t) {
416
+ function xa(t) {
411
417
  const n = {};
412
418
  for (const a in t) {
413
419
  const e = t[a].value;
@@ -415,7 +421,7 @@ function ba(t) {
415
421
  }
416
422
  return n;
417
423
  }
418
- function ya(t) {
424
+ function Ca(t) {
419
425
  switch (t) {
420
426
  case "blendSrcAlpha":
421
427
  case "blendDstAlpha":
@@ -427,10 +433,10 @@ function ya(t) {
427
433
  }
428
434
  return !1;
429
435
  }
430
- function Je(t) {
436
+ function Qe(t) {
431
437
  const n = {};
432
438
  for (const a in t) {
433
- if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || ya(a))
439
+ if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || Ca(a))
434
440
  continue;
435
441
  const e = typeof t[a], i = t[a];
436
442
  switch (e) {
@@ -442,13 +448,13 @@ function Je(t) {
442
448
  case "object":
443
449
  if (i !== null)
444
450
  if (n[a] = i, i.isTexture)
445
- if (i instanceof tn) {
451
+ if (i instanceof rn) {
446
452
  const o = i.source.toJSON();
447
453
  n[a] = { src: o.url };
448
454
  } else
449
- i instanceof kn && (console.log("env map"), console.log(i.source.data), console.log(i.source.toJSON()), n[a] = { src: "" });
455
+ i instanceof In && (console.log("env map"), console.log(i.source.data), console.log(i.source.toJSON()), n[a] = { src: "" });
450
456
  else
451
- a === "uniforms" && (n[a] = ba(n[a]));
457
+ a === "uniforms" && (n[a] = xa(n[a]));
452
458
  else
453
459
  n[a] = { src: "" };
454
460
  break;
@@ -483,28 +489,28 @@ function At(t) {
483
489
  if (Array.isArray(e.material)) {
484
490
  const i = [];
485
491
  e.material.forEach((o) => {
486
- i.push(Je(o));
492
+ i.push(Qe(o));
487
493
  }), n.material = i;
488
494
  } else
489
- n.material = Je(e.material);
495
+ n.material = Qe(e.material);
490
496
  } else if (a.search("points") > -1) {
491
497
  const e = t;
492
498
  if (Array.isArray(e.material)) {
493
499
  const i = [];
494
500
  e.material.forEach((o) => {
495
- i.push(Je(o));
501
+ i.push(Qe(o));
496
502
  }), n.material = i;
497
503
  } else
498
- n.material = Je(e.material);
504
+ n.material = Qe(e.material);
499
505
  } else if (a.search("line") > -1) {
500
506
  const e = t;
501
507
  if (Array.isArray(e.material)) {
502
508
  const i = [];
503
509
  e.material.forEach((o) => {
504
- i.push(Je(o));
510
+ i.push(Qe(o));
505
511
  }), n.material = i;
506
512
  } else
507
- n.material = Je(e.material);
513
+ n.material = Qe(e.material);
508
514
  } else
509
515
  a.search("camera") > -1 ? t.type === "PerspectiveCamera" ? n.perspectiveCameraInfo = {
510
516
  fov: t.fov,
@@ -534,7 +540,7 @@ function At(t) {
534
540
  });
535
541
  return n;
536
542
  }
537
- function Ea(t, n) {
543
+ function Sa(t, n) {
538
544
  const a = n.split(".");
539
545
  switch (a.length) {
540
546
  case 1:
@@ -571,16 +577,16 @@ function ee(t, n, a) {
571
577
  break;
572
578
  }
573
579
  }
574
- function Dt(t) {
580
+ function It(t) {
575
581
  return new Promise((n, a) => {
576
582
  const e = new Image();
577
583
  e.onload = () => {
578
- const i = new tn(e);
579
- i.wrapS = Ut, i.wrapT = Ut, i.needsUpdate = !0, n(i);
584
+ const i = new rn(e);
585
+ i.wrapS = $t, i.wrapT = $t, i.needsUpdate = !0, n(i);
580
586
  }, e.onerror = a, e.src = t;
581
587
  });
582
588
  }
583
- class fi extends Ct {
589
+ class vi extends wt {
584
590
  scene = void 0;
585
591
  renderer = void 0;
586
592
  getObject(n) {
@@ -635,8 +641,8 @@ class fi extends Ct {
635
641
  setScene(n) {
636
642
  if (n === void 0 || (this.scene = n, !this.app.debugEnabled))
637
643
  return;
638
- ma(), Cn(this.scene);
639
- const a = wn(this.scene);
644
+ ba(), On(this.scene);
645
+ const a = Tn(this.scene);
640
646
  this.app.send({
641
647
  event: "setScene",
642
648
  target: "editor",
@@ -666,37 +672,37 @@ class fi extends Ct {
666
672
  handleApp(n, a, e) {
667
673
  switch (e.event) {
668
674
  case "getObject":
669
- P.dispatchEvent({ type: k.GET_OBJECT, value: e.data });
675
+ D.dispatchEvent({ type: I.GET_OBJECT, value: e.data });
670
676
  break;
671
677
  case "updateObject":
672
- P.dispatchEvent({ type: k.UPDATE_OBJECT, value: e.data });
678
+ D.dispatchEvent({ type: I.UPDATE_OBJECT, value: e.data });
673
679
  break;
674
680
  case "createTexture":
675
- P.dispatchEvent({ type: k.CREATE_TEXTURE, value: e.data });
681
+ D.dispatchEvent({ type: I.CREATE_TEXTURE, value: e.data });
676
682
  break;
677
683
  case "requestMethod":
678
- P.dispatchEvent({ type: k.REQUEST_METHOD, value: e.data });
684
+ D.dispatchEvent({ type: I.REQUEST_METHOD, value: e.data });
679
685
  break;
680
686
  }
681
687
  }
682
688
  handleEditor(n, a, e) {
683
689
  switch (e.event) {
684
690
  case "setObject":
685
- P.dispatchEvent({ type: k.SET_OBJECT, value: e.data });
691
+ D.dispatchEvent({ type: I.SET_OBJECT, value: e.data });
686
692
  break;
687
693
  case "setScene":
688
- P.dispatchEvent({ type: k.SET_SCENE, value: e.data });
694
+ D.dispatchEvent({ type: I.SET_SCENE, value: e.data });
689
695
  break;
690
696
  case "addCamera":
691
- P.dispatchEvent({ type: k.ADD_CAMERA, value: e.data });
697
+ D.dispatchEvent({ type: I.ADD_CAMERA, value: e.data });
692
698
  break;
693
699
  case "removeCamera":
694
- P.dispatchEvent({ type: k.REMOVE_CAMERA, value: e.data });
700
+ D.dispatchEvent({ type: I.REMOVE_CAMERA, value: e.data });
695
701
  break;
696
702
  }
697
703
  }
698
704
  }
699
- class pi extends Ct {
705
+ class gi extends wt {
700
706
  bindCBs;
701
707
  buttonCBs;
702
708
  pane = void 0;
@@ -707,7 +713,7 @@ class pi extends Ct {
707
713
  super(n), this.bindCBs = /* @__PURE__ */ new Map(), this.buttonCBs = /* @__PURE__ */ new Map(), n.editor && this.createGUI();
708
714
  }
709
715
  createGUI() {
710
- this.pane = new la({ title: "GUI" }), this.pane.registerPlugin(da);
716
+ this.pane = new ha({ title: "GUI" }), this.pane.registerPlugin(fa);
711
717
  }
712
718
  dispose() {
713
719
  this.bindCBs.clear(), this.buttonCBs.clear(), this.appCallbacks = 0, this.editorCallbacks = 0, this.app.editor && (this.pane?.dispose(), this.pane = void 0);
@@ -733,7 +739,7 @@ class pi extends Ct {
733
739
  }
734
740
  // Binding
735
741
  bind(n, a, e, i = void 0) {
736
- const o = this.bindID, h = e.onChange !== void 0 ? e.onChange : Sn;
742
+ const o = this.bindID, h = e.onChange !== void 0 ? e.onChange : wn;
737
743
  this.bindCBs.set(o, h), this.app.editor ? (this.pane === void 0 && this.createGUI(), (i !== void 0 ? i : this.pane).addBinding(n, a, e).on("change", (d) => {
738
744
  this.app.send({
739
745
  event: "updateBind",
@@ -814,7 +820,7 @@ class pi extends Ct {
814
820
  }
815
821
  }
816
822
  }
817
- var It = { exports: {} }, rt = {};
823
+ var Nt = { exports: {} }, st = {};
818
824
  /**
819
825
  * @license React
820
826
  * react-jsx-runtime.production.min.js
@@ -824,25 +830,25 @@ var It = { exports: {} }, rt = {};
824
830
  * This source code is licensed under the MIT license found in the
825
831
  * LICENSE file in the root directory of this source tree.
826
832
  */
827
- var Vt;
828
- function Sa() {
829
- if (Vt)
830
- return rt;
831
- Vt = 1;
832
- var t = yn, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
833
+ var qt;
834
+ function wa() {
835
+ if (qt)
836
+ return st;
837
+ qt = 1;
838
+ var t = Cn, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
833
839
  function h(c, d, u) {
834
- var v, b = {}, E = null, S = null;
835
- u !== void 0 && (E = "" + u), d.key !== void 0 && (E = "" + d.key), d.ref !== void 0 && (S = d.ref);
836
- for (v in d)
837
- e.call(d, v) && !o.hasOwnProperty(v) && (b[v] = d[v]);
840
+ var m, b = {}, E = null, x = null;
841
+ u !== void 0 && (E = "" + u), d.key !== void 0 && (E = "" + d.key), d.ref !== void 0 && (x = d.ref);
842
+ for (m in d)
843
+ e.call(d, m) && !o.hasOwnProperty(m) && (b[m] = d[m]);
838
844
  if (c && c.defaultProps)
839
- for (v in d = c.defaultProps, d)
840
- b[v] === void 0 && (b[v] = d[v]);
841
- return { $$typeof: n, type: c, key: E, ref: S, props: b, _owner: i.current };
845
+ for (m in d = c.defaultProps, d)
846
+ b[m] === void 0 && (b[m] = d[m]);
847
+ return { $$typeof: n, type: c, key: E, ref: x, props: b, _owner: i.current };
842
848
  }
843
- return rt.Fragment = a, rt.jsx = h, rt.jsxs = h, rt;
849
+ return st.Fragment = a, st.jsx = h, st.jsxs = h, st;
844
850
  }
845
- var st = {};
851
+ var ot = {};
846
852
  /**
847
853
  * @license React
848
854
  * react-jsx-runtime.development.js
@@ -852,54 +858,54 @@ var st = {};
852
858
  * This source code is licensed under the MIT license found in the
853
859
  * LICENSE file in the root directory of this source tree.
854
860
  */
855
- var Ht;
856
- function Ca() {
857
- return Ht || (Ht = 1, process.env.NODE_ENV !== "production" && function() {
858
- var t = yn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), c = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), D = Symbol.iterator, I = "@@iterator";
859
- function q(r) {
861
+ var Kt;
862
+ function Oa() {
863
+ return Kt || (Kt = 1, process.env.NODE_ENV !== "production" && function() {
864
+ var t = Cn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), c = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), u = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), R = Symbol.iterator, P = "@@iterator";
865
+ function Y(r) {
860
866
  if (r === null || typeof r != "object")
861
867
  return null;
862
- var f = D && r[D] || r[I];
868
+ var f = R && r[R] || r[P];
863
869
  return typeof f == "function" ? f : null;
864
870
  }
865
- var B = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
871
+ var F = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
866
872
  function M(r) {
867
873
  {
868
- for (var f = arguments.length, g = new Array(f > 1 ? f - 1 : 0), C = 1; C < f; C++)
869
- g[C - 1] = arguments[C];
870
- z("error", r, g);
874
+ for (var f = arguments.length, g = new Array(f > 1 ? f - 1 : 0), S = 1; S < f; S++)
875
+ g[S - 1] = arguments[S];
876
+ w("error", r, g);
871
877
  }
872
878
  }
873
- function z(r, f, g) {
879
+ function w(r, f, g) {
874
880
  {
875
- var C = B.ReactDebugCurrentFrame, j = C.getStackAddendum();
876
- j !== "" && (f += "%s", g = g.concat([j]));
877
- var L = g.map(function(A) {
878
- return String(A);
881
+ var S = F.ReactDebugCurrentFrame, N = S.getStackAddendum();
882
+ N !== "" && (f += "%s", g = g.concat([N]));
883
+ var B = g.map(function(j) {
884
+ return String(j);
879
885
  });
880
- L.unshift("Warning: " + f), Function.prototype.apply.call(console[r], console, L);
886
+ B.unshift("Warning: " + f), Function.prototype.apply.call(console[r], console, B);
881
887
  }
882
888
  }
883
- var we = !1, ce = !1, Y = !1, Q = !1, x = !1, Ae;
884
- Ae = Symbol.for("react.module.reference");
885
- function Fe(r) {
886
- return !!(typeof r == "string" || typeof r == "function" || r === e || r === o || x || r === i || r === u || r === v || Q || r === S || we || ce || Y || typeof r == "object" && r !== null && (r.$$typeof === E || r.$$typeof === b || r.$$typeof === h || r.$$typeof === c || r.$$typeof === d || // This needs to include all possible module reference object
889
+ var ae = !1, X = !1, $ = !1, W = !1, C = !1, Pe;
890
+ Pe = Symbol.for("react.module.reference");
891
+ function Be(r) {
892
+ return !!(typeof r == "string" || typeof r == "function" || r === e || r === o || C || r === i || r === u || r === m || W || r === x || ae || X || $ || typeof r == "object" && r !== null && (r.$$typeof === E || r.$$typeof === b || r.$$typeof === h || r.$$typeof === c || r.$$typeof === d || // This needs to include all possible module reference object
887
893
  // types supported by any Flight configuration anywhere since
888
894
  // we don't know which Flight build this will end up being used
889
895
  // with.
890
- r.$$typeof === Ae || r.getModuleId !== void 0));
896
+ r.$$typeof === Pe || r.getModuleId !== void 0));
891
897
  }
892
- function Oe(r, f, g) {
893
- var C = r.displayName;
894
- if (C)
895
- return C;
896
- var j = f.displayName || f.name || "";
897
- return j !== "" ? g + "(" + j + ")" : g;
898
+ function Me(r, f, g) {
899
+ var S = r.displayName;
900
+ if (S)
901
+ return S;
902
+ var N = f.displayName || f.name || "";
903
+ return N !== "" ? g + "(" + N + ")" : g;
898
904
  }
899
- function me(r) {
905
+ function ge(r) {
900
906
  return r.displayName || "Context";
901
907
  }
902
- function te(r) {
908
+ function ie(r) {
903
909
  if (r == null)
904
910
  return null;
905
911
  if (typeof r.tag == "number" && M("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
@@ -917,26 +923,26 @@ function Ca() {
917
923
  return "StrictMode";
918
924
  case u:
919
925
  return "Suspense";
920
- case v:
926
+ case m:
921
927
  return "SuspenseList";
922
928
  }
923
929
  if (typeof r == "object")
924
930
  switch (r.$$typeof) {
925
931
  case c:
926
932
  var f = r;
927
- return me(f) + ".Consumer";
933
+ return ge(f) + ".Consumer";
928
934
  case h:
929
935
  var g = r;
930
- return me(g._context) + ".Provider";
936
+ return ge(g._context) + ".Provider";
931
937
  case d:
932
- return Oe(r, r.render, "ForwardRef");
938
+ return Me(r, r.render, "ForwardRef");
933
939
  case b:
934
- var C = r.displayName || null;
935
- return C !== null ? C : te(r.type) || "Memo";
940
+ var S = r.displayName || null;
941
+ return S !== null ? S : ie(r.type) || "Memo";
936
942
  case E: {
937
- var j = r, L = j._payload, A = j._init;
943
+ var N = r, B = N._payload, j = N._init;
938
944
  try {
939
- return te(A(L));
945
+ return ie(j(B));
940
946
  } catch {
941
947
  return null;
942
948
  }
@@ -944,18 +950,18 @@ function Ca() {
944
950
  }
945
951
  return null;
946
952
  }
947
- var ue = Object.assign, ve = 0, ge, K, pe, Pe, ke, he, p;
948
- function m() {
953
+ var fe = Object.assign, be = 0, ye, Z, ve, Ae, ke, pe, p;
954
+ function v() {
949
955
  }
950
- m.__reactDisabledLog = !0;
951
- function w() {
956
+ v.__reactDisabledLog = !0;
957
+ function O() {
952
958
  {
953
- if (ve === 0) {
954
- ge = console.log, K = console.info, pe = console.warn, Pe = console.error, ke = console.group, he = console.groupCollapsed, p = console.groupEnd;
959
+ if (be === 0) {
960
+ ye = console.log, Z = console.info, ve = console.warn, Ae = console.error, ke = console.group, pe = console.groupCollapsed, p = console.groupEnd;
955
961
  var r = {
956
962
  configurable: !0,
957
963
  enumerable: !0,
958
- value: m,
964
+ value: v,
959
965
  writable: !0
960
966
  };
961
967
  Object.defineProperties(console, {
@@ -968,254 +974,254 @@ function Ca() {
968
974
  groupEnd: r
969
975
  });
970
976
  }
971
- ve++;
977
+ be++;
972
978
  }
973
979
  }
974
- function R() {
980
+ function A() {
975
981
  {
976
- if (ve--, ve === 0) {
982
+ if (be--, be === 0) {
977
983
  var r = {
978
984
  configurable: !0,
979
985
  enumerable: !0,
980
986
  writable: !0
981
987
  };
982
988
  Object.defineProperties(console, {
983
- log: ue({}, r, {
984
- value: ge
989
+ log: fe({}, r, {
990
+ value: ye
985
991
  }),
986
- info: ue({}, r, {
987
- value: K
992
+ info: fe({}, r, {
993
+ value: Z
988
994
  }),
989
- warn: ue({}, r, {
990
- value: pe
995
+ warn: fe({}, r, {
996
+ value: ve
991
997
  }),
992
- error: ue({}, r, {
993
- value: Pe
998
+ error: fe({}, r, {
999
+ value: Ae
994
1000
  }),
995
- group: ue({}, r, {
1001
+ group: fe({}, r, {
996
1002
  value: ke
997
1003
  }),
998
- groupCollapsed: ue({}, r, {
999
- value: he
1004
+ groupCollapsed: fe({}, r, {
1005
+ value: pe
1000
1006
  }),
1001
- groupEnd: ue({}, r, {
1007
+ groupEnd: fe({}, r, {
1002
1008
  value: p
1003
1009
  })
1004
1010
  });
1005
1011
  }
1006
- ve < 0 && M("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1012
+ be < 0 && M("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1007
1013
  }
1008
1014
  }
1009
- var G = B.ReactCurrentDispatcher, V;
1010
- function ae(r, f, g) {
1015
+ var G = F.ReactCurrentDispatcher, H;
1016
+ function se(r, f, g) {
1011
1017
  {
1012
- if (V === void 0)
1018
+ if (H === void 0)
1013
1019
  try {
1014
1020
  throw Error();
1015
- } catch (j) {
1016
- var C = j.stack.trim().match(/\n( *(at )?)/);
1017
- V = C && C[1] || "";
1021
+ } catch (N) {
1022
+ var S = N.stack.trim().match(/\n( *(at )?)/);
1023
+ H = S && S[1] || "";
1018
1024
  }
1019
1025
  return `
1020
- ` + V + r;
1026
+ ` + H + r;
1021
1027
  }
1022
1028
  }
1023
- var U = !1, X;
1029
+ var z = !1, J;
1024
1030
  {
1025
- var ie = typeof WeakMap == "function" ? WeakMap : Map;
1026
- X = new ie();
1031
+ var oe = typeof WeakMap == "function" ? WeakMap : Map;
1032
+ J = new oe();
1027
1033
  }
1028
- function _(r, f) {
1029
- if (!r || U)
1034
+ function k(r, f) {
1035
+ if (!r || z)
1030
1036
  return "";
1031
1037
  {
1032
- var g = X.get(r);
1038
+ var g = J.get(r);
1033
1039
  if (g !== void 0)
1034
1040
  return g;
1035
1041
  }
1036
- var C;
1037
- U = !0;
1038
- var j = Error.prepareStackTrace;
1042
+ var S;
1043
+ z = !0;
1044
+ var N = Error.prepareStackTrace;
1039
1045
  Error.prepareStackTrace = void 0;
1040
- var L;
1041
- L = G.current, G.current = null, w();
1046
+ var B;
1047
+ B = G.current, G.current = null, O();
1042
1048
  try {
1043
1049
  if (f) {
1044
- var A = function() {
1050
+ var j = function() {
1045
1051
  throw Error();
1046
1052
  };
1047
- if (Object.defineProperty(A.prototype, "props", {
1053
+ if (Object.defineProperty(j.prototype, "props", {
1048
1054
  set: function() {
1049
1055
  throw Error();
1050
1056
  }
1051
1057
  }), typeof Reflect == "object" && Reflect.construct) {
1052
1058
  try {
1053
- Reflect.construct(A, []);
1054
- } catch (Te) {
1055
- C = Te;
1059
+ Reflect.construct(j, []);
1060
+ } catch (_e) {
1061
+ S = _e;
1056
1062
  }
1057
- Reflect.construct(r, [], A);
1063
+ Reflect.construct(r, [], j);
1058
1064
  } else {
1059
1065
  try {
1060
- A.call();
1061
- } catch (Te) {
1062
- C = Te;
1066
+ j.call();
1067
+ } catch (_e) {
1068
+ S = _e;
1063
1069
  }
1064
- r.call(A.prototype);
1070
+ r.call(j.prototype);
1065
1071
  }
1066
1072
  } else {
1067
1073
  try {
1068
1074
  throw Error();
1069
- } catch (Te) {
1070
- C = Te;
1075
+ } catch (_e) {
1076
+ S = _e;
1071
1077
  }
1072
1078
  r();
1073
1079
  }
1074
- } catch (Te) {
1075
- if (Te && C && typeof Te.stack == "string") {
1076
- for (var T = Te.stack.split(`
1077
- `), de = C.stack.split(`
1078
- `), Z = T.length - 1, J = de.length - 1; Z >= 1 && J >= 0 && T[Z] !== de[J]; )
1079
- J--;
1080
- for (; Z >= 1 && J >= 0; Z--, J--)
1081
- if (T[Z] !== de[J]) {
1082
- if (Z !== 1 || J !== 1)
1080
+ } catch (_e) {
1081
+ if (_e && S && typeof _e.stack == "string") {
1082
+ for (var _ = _e.stack.split(`
1083
+ `), de = S.stack.split(`
1084
+ `), Q = _.length - 1, te = de.length - 1; Q >= 1 && te >= 0 && _[Q] !== de[te]; )
1085
+ te--;
1086
+ for (; Q >= 1 && te >= 0; Q--, te--)
1087
+ if (_[Q] !== de[te]) {
1088
+ if (Q !== 1 || te !== 1)
1083
1089
  do
1084
- if (Z--, J--, J < 0 || T[Z] !== de[J]) {
1085
- var Ee = `
1086
- ` + T[Z].replace(" at new ", " at ");
1087
- return r.displayName && Ee.includes("<anonymous>") && (Ee = Ee.replace("<anonymous>", r.displayName)), typeof r == "function" && X.set(r, Ee), Ee;
1090
+ if (Q--, te--, te < 0 || _[Q] !== de[te]) {
1091
+ var Ce = `
1092
+ ` + _[Q].replace(" at new ", " at ");
1093
+ return r.displayName && Ce.includes("<anonymous>") && (Ce = Ce.replace("<anonymous>", r.displayName)), typeof r == "function" && J.set(r, Ce), Ce;
1088
1094
  }
1089
- while (Z >= 1 && J >= 0);
1095
+ while (Q >= 1 && te >= 0);
1090
1096
  break;
1091
1097
  }
1092
1098
  }
1093
1099
  } finally {
1094
- U = !1, G.current = L, R(), Error.prepareStackTrace = j;
1100
+ z = !1, G.current = B, A(), Error.prepareStackTrace = N;
1095
1101
  }
1096
- var Ke = r ? r.displayName || r.name : "", Bt = Ke ? ae(Ke) : "";
1097
- return typeof r == "function" && X.set(r, Bt), Bt;
1102
+ var Ke = r ? r.displayName || r.name : "", Ut = Ke ? se(Ke) : "";
1103
+ return typeof r == "function" && J.set(r, Ut), Ut;
1098
1104
  }
1099
- function F(r, f, g) {
1100
- return _(r, !1);
1105
+ function U(r, f, g) {
1106
+ return k(r, !1);
1101
1107
  }
1102
- function ne(r) {
1108
+ function re(r) {
1103
1109
  var f = r.prototype;
1104
1110
  return !!(f && f.isReactComponent);
1105
1111
  }
1106
- function Ce(r, f, g) {
1112
+ function we(r, f, g) {
1107
1113
  if (r == null)
1108
1114
  return "";
1109
1115
  if (typeof r == "function")
1110
- return _(r, ne(r));
1116
+ return k(r, re(r));
1111
1117
  if (typeof r == "string")
1112
- return ae(r);
1118
+ return se(r);
1113
1119
  switch (r) {
1114
1120
  case u:
1115
- return ae("Suspense");
1116
- case v:
1117
- return ae("SuspenseList");
1121
+ return se("Suspense");
1122
+ case m:
1123
+ return se("SuspenseList");
1118
1124
  }
1119
1125
  if (typeof r == "object")
1120
1126
  switch (r.$$typeof) {
1121
1127
  case d:
1122
- return F(r.render);
1128
+ return U(r.render);
1123
1129
  case b:
1124
- return Ce(r.type, f, g);
1130
+ return we(r.type, f, g);
1125
1131
  case E: {
1126
- var C = r, j = C._payload, L = C._init;
1132
+ var S = r, N = S._payload, B = S._init;
1127
1133
  try {
1128
- return Ce(L(j), f, g);
1134
+ return we(B(N), f, g);
1129
1135
  } catch {
1130
1136
  }
1131
1137
  }
1132
1138
  }
1133
1139
  return "";
1134
1140
  }
1135
- var Me = Object.prototype.hasOwnProperty, dt = {}, ut = B.ReactDebugCurrentFrame;
1136
- function Be(r) {
1141
+ var Te = Object.prototype.hasOwnProperty, ht = {}, ft = F.ReactDebugCurrentFrame;
1142
+ function Ue(r) {
1137
1143
  if (r) {
1138
- var f = r._owner, g = Ce(r.type, r._source, f ? f.type : null);
1139
- ut.setExtraStackFrame(g);
1144
+ var f = r._owner, g = we(r.type, r._source, f ? f.type : null);
1145
+ ft.setExtraStackFrame(g);
1140
1146
  } else
1141
- ut.setExtraStackFrame(null);
1147
+ ft.setExtraStackFrame(null);
1142
1148
  }
1143
- function et(r, f, g, C, j) {
1149
+ function tt(r, f, g, S, N) {
1144
1150
  {
1145
- var L = Function.call.bind(Me);
1146
- for (var A in r)
1147
- if (L(r, A)) {
1148
- var T = void 0;
1151
+ var B = Function.call.bind(Te);
1152
+ for (var j in r)
1153
+ if (B(r, j)) {
1154
+ var _ = void 0;
1149
1155
  try {
1150
- if (typeof r[A] != "function") {
1151
- var de = Error((C || "React class") + ": " + g + " type `" + A + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[A] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1156
+ if (typeof r[j] != "function") {
1157
+ var de = Error((S || "React class") + ": " + g + " type `" + j + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[j] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1152
1158
  throw de.name = "Invariant Violation", de;
1153
1159
  }
1154
- T = r[A](f, A, C, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1155
- } catch (Z) {
1156
- T = Z;
1160
+ _ = r[j](f, j, S, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1161
+ } catch (Q) {
1162
+ _ = Q;
1157
1163
  }
1158
- T && !(T instanceof Error) && (Be(j), M("%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, A, typeof T), Be(null)), T instanceof Error && !(T.message in dt) && (dt[T.message] = !0, Be(j), M("Failed %s type: %s", g, T.message), Be(null));
1164
+ _ && !(_ instanceof Error) && (Ue(N), M("%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).", S || "React class", g, j, typeof _), Ue(null)), _ instanceof Error && !(_.message in ht) && (ht[_.message] = !0, Ue(N), M("Failed %s type: %s", g, _.message), Ue(null));
1159
1165
  }
1160
1166
  }
1161
1167
  }
1162
- var Ue = Array.isArray;
1163
- function tt(r) {
1164
- return Ue(r);
1168
+ var $e = Array.isArray;
1169
+ function nt(r) {
1170
+ return $e(r);
1165
1171
  }
1166
- function xt(r) {
1172
+ function Ot(r) {
1167
1173
  {
1168
1174
  var f = typeof Symbol == "function" && Symbol.toStringTag, g = f && r[Symbol.toStringTag] || r.constructor.name || "Object";
1169
1175
  return g;
1170
1176
  }
1171
1177
  }
1172
- function ht(r) {
1178
+ function pt(r) {
1173
1179
  try {
1174
- return ft(r), !1;
1180
+ return mt(r), !1;
1175
1181
  } catch {
1176
1182
  return !0;
1177
1183
  }
1178
1184
  }
1179
- function ft(r) {
1185
+ function mt(r) {
1180
1186
  return "" + r;
1181
1187
  }
1182
- function pt(r) {
1183
- if (ht(r))
1184
- return M("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", xt(r)), ft(r);
1188
+ function vt(r) {
1189
+ if (pt(r))
1190
+ return M("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ot(r)), mt(r);
1185
1191
  }
1186
- var je = B.ReactCurrentOwner, nt = {
1192
+ var je = F.ReactCurrentOwner, at = {
1187
1193
  key: !0,
1188
1194
  ref: !0,
1189
1195
  __self: !0,
1190
1196
  __source: !0
1191
- }, at, mt, qe;
1197
+ }, it, gt, qe;
1192
1198
  qe = {};
1193
- function wt(r) {
1194
- if (Me.call(r, "ref")) {
1199
+ function Mt(r) {
1200
+ if (Te.call(r, "ref")) {
1195
1201
  var f = Object.getOwnPropertyDescriptor(r, "ref").get;
1196
1202
  if (f && f.isReactWarning)
1197
1203
  return !1;
1198
1204
  }
1199
1205
  return r.ref !== void 0;
1200
1206
  }
1201
- function Ot(r) {
1202
- if (Me.call(r, "key")) {
1207
+ function Tt(r) {
1208
+ if (Te.call(r, "key")) {
1203
1209
  var f = Object.getOwnPropertyDescriptor(r, "key").get;
1204
1210
  if (f && f.isReactWarning)
1205
1211
  return !1;
1206
1212
  }
1207
1213
  return r.key !== void 0;
1208
1214
  }
1209
- function vt(r, f) {
1215
+ function bt(r, f) {
1210
1216
  if (typeof r.ref == "string" && je.current && f && je.current.stateNode !== f) {
1211
- var g = te(je.current.type);
1212
- qe[g] || (M('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', te(je.current.type), r.ref), qe[g] = !0);
1217
+ var g = ie(je.current.type);
1218
+ qe[g] || (M('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', ie(je.current.type), r.ref), qe[g] = !0);
1213
1219
  }
1214
1220
  }
1215
1221
  function De(r, f) {
1216
1222
  {
1217
1223
  var g = function() {
1218
- at || (at = !0, M("%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));
1224
+ it || (it = !0, M("%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));
1219
1225
  };
1220
1226
  g.isReactWarning = !0, Object.defineProperty(r, "key", {
1221
1227
  get: g,
@@ -1223,10 +1229,10 @@ function Ca() {
1223
1229
  });
1224
1230
  }
1225
1231
  }
1226
- function Ft(r, f) {
1232
+ function Bt(r, f) {
1227
1233
  {
1228
1234
  var g = function() {
1229
- mt || (mt = !0, M("%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));
1235
+ gt || (gt = !0, M("%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));
1230
1236
  };
1231
1237
  g.isReactWarning = !0, Object.defineProperty(r, "ref", {
1232
1238
  get: g,
@@ -1234,70 +1240,70 @@ function Ca() {
1234
1240
  });
1235
1241
  }
1236
1242
  }
1237
- var s = function(r, f, g, C, j, L, A) {
1238
- var T = {
1243
+ var s = function(r, f, g, S, N, B, j) {
1244
+ var _ = {
1239
1245
  // This tag allows us to uniquely identify this as a React Element
1240
1246
  $$typeof: n,
1241
1247
  // Built-in properties that belong on the element
1242
1248
  type: r,
1243
1249
  key: f,
1244
1250
  ref: g,
1245
- props: A,
1251
+ props: j,
1246
1252
  // Record the component responsible for creating this element.
1247
- _owner: L
1253
+ _owner: B
1248
1254
  };
1249
- return T._store = {}, Object.defineProperty(T._store, "validated", {
1255
+ return _._store = {}, Object.defineProperty(_._store, "validated", {
1250
1256
  configurable: !1,
1251
1257
  enumerable: !1,
1252
1258
  writable: !0,
1253
1259
  value: !1
1254
- }), Object.defineProperty(T, "_self", {
1260
+ }), Object.defineProperty(_, "_self", {
1255
1261
  configurable: !1,
1256
1262
  enumerable: !1,
1257
1263
  writable: !1,
1258
- value: C
1259
- }), Object.defineProperty(T, "_source", {
1264
+ value: S
1265
+ }), Object.defineProperty(_, "_source", {
1260
1266
  configurable: !1,
1261
1267
  enumerable: !1,
1262
1268
  writable: !1,
1263
- value: j
1264
- }), Object.freeze && (Object.freeze(T.props), Object.freeze(T)), T;
1269
+ value: N
1270
+ }), Object.freeze && (Object.freeze(_.props), Object.freeze(_)), _;
1265
1271
  };
1266
- function y(r, f, g, C, j) {
1272
+ function y(r, f, g, S, N) {
1267
1273
  {
1268
- var L, A = {}, T = null, de = null;
1269
- g !== void 0 && (pt(g), T = "" + g), Ot(f) && (pt(f.key), T = "" + f.key), wt(f) && (de = f.ref, vt(f, j));
1270
- for (L in f)
1271
- Me.call(f, L) && !nt.hasOwnProperty(L) && (A[L] = f[L]);
1274
+ var B, j = {}, _ = null, de = null;
1275
+ g !== void 0 && (vt(g), _ = "" + g), Tt(f) && (vt(f.key), _ = "" + f.key), Mt(f) && (de = f.ref, bt(f, N));
1276
+ for (B in f)
1277
+ Te.call(f, B) && !at.hasOwnProperty(B) && (j[B] = f[B]);
1272
1278
  if (r && r.defaultProps) {
1273
- var Z = r.defaultProps;
1274
- for (L in Z)
1275
- A[L] === void 0 && (A[L] = Z[L]);
1279
+ var Q = r.defaultProps;
1280
+ for (B in Q)
1281
+ j[B] === void 0 && (j[B] = Q[B]);
1276
1282
  }
1277
- if (T || de) {
1278
- var J = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
1279
- T && De(A, J), de && Ft(A, J);
1283
+ if (_ || de) {
1284
+ var te = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
1285
+ _ && De(j, te), de && Bt(j, te);
1280
1286
  }
1281
- return s(r, T, de, j, C, je.current, A);
1287
+ return s(r, _, de, N, S, je.current, j);
1282
1288
  }
1283
1289
  }
1284
- var O = B.ReactCurrentOwner, N = B.ReactDebugCurrentFrame;
1285
- function H(r) {
1290
+ var T = F.ReactCurrentOwner, L = F.ReactDebugCurrentFrame;
1291
+ function q(r) {
1286
1292
  if (r) {
1287
- var f = r._owner, g = Ce(r.type, r._source, f ? f.type : null);
1288
- N.setExtraStackFrame(g);
1293
+ var f = r._owner, g = we(r.type, r._source, f ? f.type : null);
1294
+ L.setExtraStackFrame(g);
1289
1295
  } else
1290
- N.setExtraStackFrame(null);
1296
+ L.setExtraStackFrame(null);
1291
1297
  }
1292
- var be;
1293
- be = !1;
1294
- function le(r) {
1298
+ var Ee;
1299
+ Ee = !1;
1300
+ function ue(r) {
1295
1301
  return typeof r == "object" && r !== null && r.$$typeof === n;
1296
1302
  }
1297
- function Mt() {
1303
+ function Rt() {
1298
1304
  {
1299
- if (O.current) {
1300
- var r = te(O.current.type);
1305
+ if (T.current) {
1306
+ var r = ie(T.current.type);
1301
1307
  if (r)
1302
1308
  return `
1303
1309
 
@@ -1306,7 +1312,7 @@ Check the render method of \`` + r + "`.";
1306
1312
  return "";
1307
1313
  }
1308
1314
  }
1309
- function Tt(r) {
1315
+ function _t(r) {
1310
1316
  {
1311
1317
  if (r !== void 0) {
1312
1318
  var f = r.fileName.replace(/^.*[\\\/]/, ""), g = r.lineNumber;
@@ -1317,10 +1323,10 @@ Check your code at ` + f + ":" + g + ".";
1317
1323
  return "";
1318
1324
  }
1319
1325
  }
1320
- var it = {};
1321
- function xe(r) {
1326
+ var rt = {};
1327
+ function Oe(r) {
1322
1328
  {
1323
- var f = Mt();
1329
+ var f = Rt();
1324
1330
  if (!f) {
1325
1331
  var g = typeof r == "string" ? r : r.displayName || r.name;
1326
1332
  g && (f = `
@@ -1330,39 +1336,39 @@ Check the top-level render call using <` + g + ">.");
1330
1336
  return f;
1331
1337
  }
1332
1338
  }
1333
- function ye(r, f) {
1339
+ function xe(r, f) {
1334
1340
  {
1335
1341
  if (!r._store || r._store.validated || r.key != null)
1336
1342
  return;
1337
1343
  r._store.validated = !0;
1338
- var g = xe(f);
1339
- if (it[g])
1344
+ var g = Oe(f);
1345
+ if (rt[g])
1340
1346
  return;
1341
- it[g] = !0;
1342
- var C = "";
1343
- r && r._owner && r._owner !== O.current && (C = " It was passed a child from " + te(r._owner.type) + "."), H(r), M('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), H(null);
1347
+ rt[g] = !0;
1348
+ var S = "";
1349
+ r && r._owner && r._owner !== T.current && (S = " It was passed a child from " + ie(r._owner.type) + "."), q(r), M('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, S), q(null);
1344
1350
  }
1345
1351
  }
1346
- function $e(r, f) {
1352
+ function ze(r, f) {
1347
1353
  {
1348
1354
  if (typeof r != "object")
1349
1355
  return;
1350
- if (tt(r))
1356
+ if (nt(r))
1351
1357
  for (var g = 0; g < r.length; g++) {
1352
- var C = r[g];
1353
- le(C) && ye(C, f);
1358
+ var S = r[g];
1359
+ ue(S) && xe(S, f);
1354
1360
  }
1355
- else if (le(r))
1361
+ else if (ue(r))
1356
1362
  r._store && (r._store.validated = !0);
1357
1363
  else if (r) {
1358
- var j = q(r);
1359
- if (typeof j == "function" && j !== r.entries)
1360
- for (var L = j.call(r), A; !(A = L.next()).done; )
1361
- le(A.value) && ye(A.value, f);
1364
+ var N = Y(r);
1365
+ if (typeof N == "function" && N !== r.entries)
1366
+ for (var B = N.call(r), j; !(j = B.next()).done; )
1367
+ ue(j.value) && xe(j.value, f);
1362
1368
  }
1363
1369
  }
1364
1370
  }
1365
- function ze(r) {
1371
+ function Ye(r) {
1366
1372
  {
1367
1373
  var f = r.type;
1368
1374
  if (f == null || typeof f == "string")
@@ -1377,78 +1383,78 @@ Check the top-level render call using <` + g + ">.");
1377
1383
  else
1378
1384
  return;
1379
1385
  if (g) {
1380
- var C = te(f);
1381
- et(g, r.props, "prop", C, r);
1382
- } else if (f.PropTypes !== void 0 && !be) {
1383
- be = !0;
1384
- var j = te(f);
1385
- M("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", j || "Unknown");
1386
+ var S = ie(f);
1387
+ tt(g, r.props, "prop", S, r);
1388
+ } else if (f.PropTypes !== void 0 && !Ee) {
1389
+ Ee = !0;
1390
+ var N = ie(f);
1391
+ M("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", N || "Unknown");
1386
1392
  }
1387
1393
  typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && M("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1388
1394
  }
1389
1395
  }
1390
- function Ye(r) {
1396
+ function Ve(r) {
1391
1397
  {
1392
1398
  for (var f = Object.keys(r.props), g = 0; g < f.length; g++) {
1393
- var C = f[g];
1394
- if (C !== "children" && C !== "key") {
1395
- H(r), M("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", C), H(null);
1399
+ var S = f[g];
1400
+ if (S !== "children" && S !== "key") {
1401
+ q(r), M("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", S), q(null);
1396
1402
  break;
1397
1403
  }
1398
1404
  }
1399
- r.ref !== null && (H(r), M("Invalid attribute `ref` supplied to `React.Fragment`."), H(null));
1405
+ r.ref !== null && (q(r), M("Invalid attribute `ref` supplied to `React.Fragment`."), q(null));
1400
1406
  }
1401
1407
  }
1402
- function Ge(r, f, g, C, j, L) {
1408
+ function Ge(r, f, g, S, N, B) {
1403
1409
  {
1404
- var A = Fe(r);
1405
- if (!A) {
1406
- var T = "";
1407
- (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.");
1408
- var de = Tt(j);
1409
- de ? T += de : T += Mt();
1410
- var Z;
1411
- r === null ? Z = "null" : tt(r) ? Z = "array" : r !== void 0 && r.$$typeof === n ? (Z = "<" + (te(r.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : Z = typeof r, M("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Z, T);
1410
+ var j = Be(r);
1411
+ if (!j) {
1412
+ var _ = "";
1413
+ (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (_ += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1414
+ var de = _t(N);
1415
+ de ? _ += de : _ += Rt();
1416
+ var Q;
1417
+ r === null ? Q = "null" : nt(r) ? Q = "array" : r !== void 0 && r.$$typeof === n ? (Q = "<" + (ie(r.type) || "Unknown") + " />", _ = " Did you accidentally export a JSX literal instead of a component?") : Q = typeof r, M("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", Q, _);
1412
1418
  }
1413
- var J = y(r, f, g, j, L);
1414
- if (J == null)
1415
- return J;
1416
- if (A) {
1417
- var Ee = f.children;
1418
- if (Ee !== void 0)
1419
- if (C)
1420
- if (tt(Ee)) {
1421
- for (var Ke = 0; Ke < Ee.length; Ke++)
1422
- $e(Ee[Ke], r);
1423
- Object.freeze && Object.freeze(Ee);
1419
+ var te = y(r, f, g, N, B);
1420
+ if (te == null)
1421
+ return te;
1422
+ if (j) {
1423
+ var Ce = f.children;
1424
+ if (Ce !== void 0)
1425
+ if (S)
1426
+ if (nt(Ce)) {
1427
+ for (var Ke = 0; Ke < Ce.length; Ke++)
1428
+ ze(Ce[Ke], r);
1429
+ Object.freeze && Object.freeze(Ce);
1424
1430
  } else
1425
1431
  M("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1426
1432
  else
1427
- $e(Ee, r);
1433
+ ze(Ce, r);
1428
1434
  }
1429
- return r === e ? Ye(J) : ze(J), J;
1435
+ return r === e ? Ve(te) : Ye(te), te;
1430
1436
  }
1431
1437
  }
1432
- function Rn(r, f, g) {
1438
+ function An(r, f, g) {
1433
1439
  return Ge(r, f, g, !0);
1434
1440
  }
1435
- function _n(r, f, g) {
1441
+ function kn(r, f, g) {
1436
1442
  return Ge(r, f, g, !1);
1437
1443
  }
1438
- var An = _n, Pn = Rn;
1439
- st.Fragment = e, st.jsx = An, st.jsxs = Pn;
1440
- }()), st;
1444
+ var jn = kn, Dn = An;
1445
+ ot.Fragment = e, ot.jsx = jn, ot.jsxs = Dn;
1446
+ }()), ot;
1441
1447
  }
1442
- process.env.NODE_ENV === "production" ? It.exports = Sa() : It.exports = Ca();
1443
- var l = It.exports;
1444
- function On(t) {
1448
+ process.env.NODE_ENV === "production" ? Nt.exports = wa() : Nt.exports = Oa();
1449
+ var l = Nt.exports;
1450
+ function Rn(t) {
1445
1451
  return t.title.search("<") > -1 ? /* @__PURE__ */ l.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ l.jsx("button", { children: t.title });
1446
1452
  }
1447
- const xa = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1453
+ const Ma = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1448
1454
  /* @__PURE__ */ l.jsx("circle", { cx: "7", cy: "7", r: "6" }),
1449
1455
  /* @__PURE__ */ l.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
1450
1456
  /* @__PURE__ */ l.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
1451
- ] }), wa = /* @__PURE__ */ l.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ l.jsx(
1457
+ ] }), Ta = /* @__PURE__ */ l.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ l.jsx(
1452
1458
  "path",
1453
1459
  {
1454
1460
  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
@@ -1456,35 +1462,35 @@ 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
1456
1462
  C11,8.22,10.74,8,10.43,8z`
1457
1463
  }
1458
1464
  ) });
1459
- function Oa(t) {
1460
- return /* @__PURE__ */ l.jsx(En.Item, { value: t.title, children: /* @__PURE__ */ l.jsxs("div", { children: [
1461
- wa,
1465
+ function Ra(t) {
1466
+ return /* @__PURE__ */ l.jsx(Sn.Item, { value: t.title, children: /* @__PURE__ */ l.jsxs("div", { children: [
1467
+ Ta,
1462
1468
  /* @__PURE__ */ l.jsx("span", { children: t.title }),
1463
1469
  /* @__PURE__ */ l.jsx("button", { className: "closeIcon", onClick: () => {
1464
1470
  t.onDelete(t.index);
1465
- }, children: xa })
1471
+ }, children: Ma })
1466
1472
  ] }) }, t.title);
1467
1473
  }
1468
- function Ma(t) {
1469
- const [n, a] = oe(!1), [e, i] = oe(t.options), o = (u) => {
1474
+ function _a(t) {
1475
+ const [n, a] = ne(!1), [e, i] = ne(t.options), o = (u) => {
1470
1476
  t.onDragComplete(u), i(u);
1471
1477
  }, h = (u) => {
1472
- const v = [...e];
1473
- v.splice(u, 1), o(v);
1478
+ const m = [...e];
1479
+ m.splice(u, 1), o(m);
1474
1480
  }, c = [];
1475
- e.forEach((u, v) => {
1476
- c.push(/* @__PURE__ */ l.jsx(Oa, { index: v, title: u, onDelete: h }, u));
1481
+ e.forEach((u, m) => {
1482
+ c.push(/* @__PURE__ */ l.jsx(Ra, { index: m, title: u, onDelete: h }, u));
1477
1483
  });
1478
1484
  let d = "dropdown draggable";
1479
1485
  return t.subdropdown && (d += " subdropdown"), /* @__PURE__ */ l.jsxs("div", { className: d, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
1480
- /* @__PURE__ */ l.jsx(On, { title: t.title }),
1481
- /* @__PURE__ */ l.jsx(En.Group, { axis: "y", values: e, onReorder: o, style: { visibility: n ? "visible" : "hidden" }, children: c })
1486
+ /* @__PURE__ */ l.jsx(Rn, { title: t.title }),
1487
+ /* @__PURE__ */ l.jsx(Sn.Group, { axis: "y", values: e, onReorder: o, style: { visibility: n ? "visible" : "hidden" }, children: c })
1482
1488
  ] });
1483
1489
  }
1484
- function Ta(t) {
1485
- const [n, a] = oe(!1), e = [];
1490
+ function Pa(t) {
1491
+ const [n, a] = ne(!1), e = [];
1486
1492
  t.options.map((o, h) => {
1487
- t.onSelect !== void 0 && (o.onSelect = t.onSelect), e.push(/* @__PURE__ */ l.jsx(Ra, { option: o }, h));
1493
+ t.onSelect !== void 0 && (o.onSelect = t.onSelect), e.push(/* @__PURE__ */ l.jsx(Aa, { option: o }, h));
1488
1494
  });
1489
1495
  let i = "dropdown";
1490
1496
  return t.subdropdown && (i += " subdropdown"), /* @__PURE__ */ l.jsxs(
@@ -1494,7 +1500,7 @@ function Ta(t) {
1494
1500
  onMouseEnter: () => a(!0),
1495
1501
  onMouseLeave: () => a(!1),
1496
1502
  children: [
1497
- /* @__PURE__ */ l.jsx(On, { title: t.title }),
1503
+ /* @__PURE__ */ l.jsx(Rn, { title: t.title }),
1498
1504
  /* @__PURE__ */ l.jsx(
1499
1505
  "ul",
1500
1506
  {
@@ -1506,13 +1512,13 @@ function Ta(t) {
1506
1512
  }
1507
1513
  );
1508
1514
  }
1509
- function Ra(t) {
1510
- const { option: n } = t, [a, e] = oe("");
1515
+ function Aa(t) {
1516
+ const { option: n } = t, [a, e] = ne("");
1511
1517
  let i;
1512
1518
  switch (n.type) {
1513
1519
  case "draggable":
1514
1520
  i = /* @__PURE__ */ l.jsx(
1515
- Ma,
1521
+ _a,
1516
1522
  {
1517
1523
  title: n.title,
1518
1524
  options: n.value,
@@ -1525,7 +1531,7 @@ function Ra(t) {
1525
1531
  break;
1526
1532
  case "dropdown":
1527
1533
  i = /* @__PURE__ */ l.jsx(
1528
- Ta,
1534
+ Pa,
1529
1535
  {
1530
1536
  title: n.title,
1531
1537
  options: n.value,
@@ -1546,15 +1552,15 @@ function Ra(t) {
1546
1552
  );
1547
1553
  break;
1548
1554
  }
1549
- return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: i }, ha());
1555
+ return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: i }, ma());
1550
1556
  }
1551
- function mi(t, n, a) {
1557
+ function bi(t, n, a) {
1552
1558
  function e(o) {
1553
1559
  switch (n.forEach((h) => {
1554
1560
  h.callback(t, h.remote, o);
1555
1561
  }), o.event) {
1556
1562
  case "custom":
1557
- P.dispatchEvent({ type: k.CUSTOM, value: o.data });
1563
+ D.dispatchEvent({ type: I.CUSTOM, value: o.data });
1558
1564
  break;
1559
1565
  }
1560
1566
  }
@@ -1563,7 +1569,7 @@ function mi(t, n, a) {
1563
1569
  h.callback(t, h.remote, o);
1564
1570
  }), o.event) {
1565
1571
  case "custom":
1566
- P.dispatchEvent({ type: k.CUSTOM, value: o.data });
1572
+ D.dispatchEvent({ type: I.CUSTOM, value: o.data });
1567
1573
  break;
1568
1574
  }
1569
1575
  }
@@ -1571,8 +1577,8 @@ function mi(t, n, a) {
1571
1577
  o.target === "editor" ? i(o) : e(o);
1572
1578
  };
1573
1579
  }
1574
- function Lt(t) {
1575
- const [n, a] = oe(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
1580
+ function Ft(t) {
1581
+ const [n, a] = ne(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
1576
1582
  return /* @__PURE__ */ l.jsxs("div", { className: `accordion ${e ? "hide" : ""}`, children: [
1577
1583
  /* @__PURE__ */ l.jsxs(
1578
1584
  "button",
@@ -1590,7 +1596,7 @@ function Lt(t) {
1590
1596
  children: "Toggle"
1591
1597
  }
1592
1598
  ),
1593
- /* @__PURE__ */ l.jsx("p", { className: "label", children: lt(t.label) })
1599
+ /* @__PURE__ */ l.jsx("p", { className: "label", children: dt(t.label) })
1594
1600
  ]
1595
1601
  }
1596
1602
  ),
@@ -1598,10 +1604,10 @@ function Lt(t) {
1598
1604
  /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { children: t.children }) })
1599
1605
  ] });
1600
1606
  }
1601
- function Mn(t) {
1602
- const [n, a] = oe(!1), e = t.child !== void 0 && t.child.children.length > 0, i = [];
1607
+ function _n(t) {
1608
+ const [n, a] = ne(!1), e = t.child !== void 0 && t.child.children.length > 0, i = [];
1603
1609
  return t.child !== void 0 && t.child.children.length > 0 && t.child.children.map((o) => {
1604
- i.push(/* @__PURE__ */ l.jsx(Mn, { child: o, three: t.three }, Math.random()));
1610
+ i.push(/* @__PURE__ */ l.jsx(_n, { child: o, three: t.three }, Math.random()));
1605
1611
  }), /* @__PURE__ */ l.jsx(l.Fragment, { children: t.child !== void 0 && /* @__PURE__ */ l.jsxs("div", { className: "childObject", children: [
1606
1612
  /* @__PURE__ */ l.jsxs("div", { className: "child", children: [
1607
1613
  e ? /* @__PURE__ */ l.jsx(
@@ -1629,29 +1635,29 @@ function Mn(t) {
1629
1635
  children: t.child.name.length > 0 ? `${t.child.name} (${t.child.type})` : `${t.child.type}::${t.child.uuid}`
1630
1636
  }
1631
1637
  ),
1632
- /* @__PURE__ */ l.jsx("div", { className: `icon ${ga(t.child)}` })
1638
+ /* @__PURE__ */ l.jsx("div", { className: `icon ${Ea(t.child)}` })
1633
1639
  ] }),
1634
1640
  /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { className: "container", children: i }) })
1635
1641
  ] }, Math.random()) });
1636
1642
  }
1637
- function _a(t) {
1643
+ function ka(t) {
1638
1644
  const n = [];
1639
1645
  return t.child?.children.map((a) => {
1640
- n.push(/* @__PURE__ */ l.jsx(Mn, { child: a, three: t.three }, Math.random()));
1646
+ n.push(/* @__PURE__ */ l.jsx(_n, { child: a, three: t.three }, Math.random()));
1641
1647
  }), /* @__PURE__ */ l.jsx("div", { className: `scene ${t.class !== void 0 ? t.class : ""}`, children: n });
1642
1648
  }
1643
- const Aa = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1644
- function Pa(t) {
1649
+ const ja = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1650
+ function Da(t) {
1645
1651
  return "items" in t;
1646
1652
  }
1647
1653
  function We(t) {
1648
1654
  const n = [];
1649
1655
  return t.items.forEach((a) => {
1650
- Pa(a) ? n.push(
1651
- /* @__PURE__ */ l.jsx(We, { title: lt(a.title), items: a.items }, Math.random())
1656
+ Da(a) ? n.push(
1657
+ /* @__PURE__ */ l.jsx(We, { title: dt(a.title), items: a.items }, Math.random())
1652
1658
  ) : n.push(
1653
1659
  /* @__PURE__ */ l.jsx(
1654
- ct,
1660
+ lt,
1655
1661
  {
1656
1662
  title: a.title,
1657
1663
  prop: a.prop,
@@ -1669,12 +1675,12 @@ function We(t) {
1669
1675
  Math.random()
1670
1676
  )
1671
1677
  );
1672
- }), /* @__PURE__ */ l.jsx(Lt, { label: t.title, open: t.expanded === !0, children: n });
1678
+ }), /* @__PURE__ */ l.jsx(Ft, { label: t.title, open: t.expanded === !0, children: n });
1673
1679
  }
1674
- function ka(t) {
1680
+ function Ia(t) {
1675
1681
  return !(t === "alphaHash" || t === "alphaToCoverage" || t === "attenuationDistance" || t === "blendDstAlpha" || t === "colorWrite" || t === "combine" || t === "defaultAttributeValues" || t === "depthFunc" || t === "forceSinglePass" || t === "glslVersion" || t === "linecap" || t === "linejoin" || t === "linewidth" || t === "normalMapType" || t === "precision" || t === "premultipliedAlpha" || t === "shadowSide" || t === "toneMapped" || t === "uniformsGroups" || t === "uniformsNeedUpdate" || t === "userData" || t === "vertexColors" || t === "version" || t === "wireframeLinecap" || t === "wireframeLinejoin" || t === "wireframeLinewidth" || t.slice(0, 4) === "clip" || t.slice(0, 7) === "polygon" || t.slice(0, 7) === "stencil" || t.slice(0, 2) === "is");
1676
1682
  }
1677
- function Ve(t) {
1683
+ function Ie(t) {
1678
1684
  switch (t) {
1679
1685
  case "alphaMap":
1680
1686
  return "Alpha Map";
@@ -1847,10 +1853,10 @@ function Ve(t) {
1847
1853
  }
1848
1854
  return t;
1849
1855
  }
1850
- function ja(t) {
1856
+ function Na(t) {
1851
1857
  return t.toLowerCase().search("intensity") > -1 || t === "anisotropyRotation" || t === "blendAlpha" || t === "bumpScale" || t === "clearcoatRoughness" || t === "displacementBias" || t === "displacementScale" || t === "metalness" || t === "opacity" || t === "reflectivity" || t === "refractionRatio" || t === "roughness" || t === "sheenRoughness" || t === "thickness";
1852
1858
  }
1853
- function Da() {
1859
+ function La() {
1854
1860
  const t = document.createElement("input");
1855
1861
  return t.type = "file", new Promise((n, a) => {
1856
1862
  t.addEventListener("change", function() {
@@ -1865,231 +1871,231 @@ function Da() {
1865
1871
  }), t.click();
1866
1872
  });
1867
1873
  }
1868
- const Ia = [
1874
+ const Fa = [
1869
1875
  {
1870
1876
  title: "Front",
1871
- value: jn
1877
+ value: Nn
1872
1878
  },
1873
1879
  {
1874
1880
  title: "Back",
1875
- value: Dn
1881
+ value: Ln
1876
1882
  },
1877
1883
  {
1878
1884
  title: "Double",
1879
- value: nn
1885
+ value: sn
1880
1886
  }
1881
- ], Na = [
1887
+ ], Ba = [
1882
1888
  {
1883
1889
  title: "No Blending",
1884
- value: In
1890
+ value: Fn
1885
1891
  },
1886
1892
  {
1887
1893
  title: "Normal",
1888
- value: Nn
1894
+ value: Bn
1889
1895
  },
1890
1896
  {
1891
1897
  title: "Additive",
1892
- value: Ln
1898
+ value: Un
1893
1899
  },
1894
1900
  {
1895
1901
  title: "Subtractive",
1896
- value: Fn
1902
+ value: $n
1897
1903
  },
1898
1904
  {
1899
1905
  title: "Multiply",
1900
- value: Bn
1906
+ value: zn
1901
1907
  },
1902
1908
  {
1903
1909
  title: "Custom",
1904
- value: Un
1910
+ value: Yn
1905
1911
  }
1906
- ], La = [
1912
+ ], Ua = [
1907
1913
  {
1908
1914
  title: "Add",
1909
- value: $n
1915
+ value: Vn
1910
1916
  },
1911
1917
  {
1912
1918
  title: "Subtract",
1913
- value: zn
1919
+ value: Gn
1914
1920
  },
1915
1921
  {
1916
1922
  title: "Reverse Subtract",
1917
- value: Yn
1923
+ value: Hn
1918
1924
  },
1919
1925
  {
1920
1926
  title: "Min",
1921
- value: Gn
1927
+ value: Wn
1922
1928
  },
1923
1929
  {
1924
1930
  title: "Max",
1925
- value: Vn
1931
+ value: qn
1926
1932
  }
1927
- ], Fa = [
1933
+ ], $a = [
1928
1934
  {
1929
1935
  title: "Zero",
1930
- valye: an
1936
+ valye: on
1931
1937
  },
1932
1938
  {
1933
1939
  title: "One",
1934
- valye: rn
1940
+ valye: cn
1935
1941
  },
1936
1942
  {
1937
1943
  title: "Src Color",
1938
- valye: sn
1944
+ valye: ln
1939
1945
  },
1940
1946
  {
1941
1947
  title: "One Minus Src Color",
1942
- valye: on
1948
+ valye: un
1943
1949
  },
1944
1950
  {
1945
1951
  title: "Src Alpha",
1946
- valye: cn
1952
+ valye: dn
1947
1953
  },
1948
1954
  {
1949
1955
  title: "One Minus Src Alpha",
1950
- valye: ln
1956
+ valye: hn
1951
1957
  },
1952
1958
  {
1953
1959
  title: "Dst Alpha",
1954
- valye: dn
1960
+ valye: fn
1955
1961
  },
1956
1962
  {
1957
1963
  title: "One Minus Dst Alpha",
1958
- valye: un
1964
+ valye: pn
1959
1965
  },
1960
1966
  {
1961
1967
  title: "Dst Color",
1962
- valye: hn
1968
+ valye: mn
1963
1969
  },
1964
1970
  {
1965
1971
  title: "One Minus Dst Color",
1966
- valye: fn
1972
+ valye: vn
1967
1973
  },
1968
1974
  {
1969
1975
  title: "Src Alpha Saturate",
1970
- valye: Hn
1976
+ valye: Kn
1971
1977
  },
1972
1978
  {
1973
1979
  title: "Constant Color",
1974
- valye: pn
1980
+ valye: gn
1975
1981
  },
1976
1982
  {
1977
1983
  title: "One Minus Constant Color",
1978
- valye: mn
1984
+ valye: bn
1979
1985
  },
1980
1986
  {
1981
1987
  title: "Constant Alpha",
1982
- valye: vn
1988
+ valye: yn
1983
1989
  },
1984
1990
  {
1985
1991
  title: "One Minus Constant Alpha",
1986
- valye: gn
1992
+ valye: En
1987
1993
  }
1988
- ], Ba = [
1994
+ ], za = [
1989
1995
  {
1990
1996
  title: "Zero",
1991
- valye: an
1997
+ valye: on
1992
1998
  },
1993
1999
  {
1994
2000
  title: "One",
1995
- valye: rn
2001
+ valye: cn
1996
2002
  },
1997
2003
  {
1998
2004
  title: "Src Color",
1999
- valye: sn
2005
+ valye: ln
2000
2006
  },
2001
2007
  {
2002
2008
  title: "One Minus Src Color",
2003
- valye: on
2009
+ valye: un
2004
2010
  },
2005
2011
  {
2006
2012
  title: "Src Alpha",
2007
- valye: cn
2013
+ valye: dn
2008
2014
  },
2009
2015
  {
2010
2016
  title: "One Minus Src Alpha",
2011
- valye: ln
2017
+ valye: hn
2012
2018
  },
2013
2019
  {
2014
2020
  title: "Dst Alpha",
2015
- valye: dn
2021
+ valye: fn
2016
2022
  },
2017
2023
  {
2018
2024
  title: "One Minus Dst Alpha",
2019
- valye: un
2025
+ valye: pn
2020
2026
  },
2021
2027
  {
2022
2028
  title: "Dst Color",
2023
- valye: hn
2029
+ valye: mn
2024
2030
  },
2025
2031
  {
2026
2032
  title: "One Minus Dst Color",
2027
- valye: fn
2033
+ valye: vn
2028
2034
  },
2029
2035
  {
2030
2036
  title: "Constant Color",
2031
- valye: pn
2037
+ valye: gn
2032
2038
  },
2033
2039
  {
2034
2040
  title: "One Minus Constant Color",
2035
- valye: mn
2041
+ valye: bn
2036
2042
  },
2037
2043
  {
2038
2044
  title: "Constant Alpha",
2039
- valye: vn
2045
+ valye: yn
2040
2046
  },
2041
2047
  {
2042
2048
  title: "One Minus Constant Alpha",
2043
- valye: gn
2049
+ valye: En
2044
2050
  }
2045
2051
  ];
2046
- function ot(t, n) {
2052
+ function ct(t, n) {
2047
2053
  t.needsUpdate = !0, t.type = "option", t.options = n;
2048
2054
  }
2049
- function Wt(t, n, a) {
2055
+ function Xt(t, n, a) {
2050
2056
  const e = [];
2051
2057
  for (const i in t) {
2052
- if (!ka(i))
2058
+ if (!Ia(i))
2053
2059
  continue;
2054
2060
  const o = typeof t[i], h = t[i];
2055
2061
  if (o === "boolean" || o === "number" || o === "string") {
2056
2062
  const c = {
2057
- title: Ve(i),
2063
+ title: Ie(i),
2058
2064
  prop: i,
2059
2065
  type: o,
2060
2066
  value: h,
2061
2067
  min: void 0,
2062
2068
  max: void 0,
2063
2069
  needsUpdate: o === "boolean",
2064
- onChange: (u, v) => {
2065
- a.updateObject(n.uuid, `material.${u}`, v), c.needsUpdate && a.updateObject(n.uuid, "material.needsUpdate", !0);
2070
+ onChange: (u, m) => {
2071
+ a.updateObject(n.uuid, `material.${u}`, m), c.needsUpdate && a.updateObject(n.uuid, "material.needsUpdate", !0);
2066
2072
  const b = a.scene?.getObjectByProperty("uuid", n.uuid);
2067
- b !== void 0 && ee(b, `material.${u}`, v);
2073
+ b !== void 0 && ee(b, `material.${u}`, m);
2068
2074
  }
2069
2075
  };
2070
2076
  switch (i) {
2071
2077
  case "blending":
2072
- ot(c, Na);
2078
+ ct(c, Ba);
2073
2079
  break;
2074
2080
  case "blendDst":
2075
- ot(c, Ba);
2081
+ ct(c, za);
2076
2082
  break;
2077
2083
  case "blendEquation":
2078
- ot(c, La);
2084
+ ct(c, Ua);
2079
2085
  break;
2080
2086
  case "blendSrc":
2081
- ot(c, Fa);
2087
+ ct(c, $a);
2082
2088
  break;
2083
2089
  case "side":
2084
- ot(c, Ia);
2090
+ ct(c, Fa);
2085
2091
  break;
2086
2092
  }
2087
- ja(i) && (c.value = Number(h), c.type = "range", c.min = 0, c.max = 1, c.step = 0.01);
2093
+ Na(i) && (c.value = Number(h), c.type = "range", c.min = 0, c.max = 1, c.step = 0.01);
2088
2094
  const d = o === "string" && (i === "vertexShader" || i === "fragmentShader");
2089
- d && (c.disabled = !1, c.latest = c.value, c.onChange = (u, v) => {
2090
- c.latest = v;
2095
+ d && (c.disabled = !1, c.latest = c.value, c.onChange = (u, m) => {
2096
+ c.latest = m;
2091
2097
  }), e.push(c), d && e.push({
2092
- title: `${lt(i)} - Update`,
2098
+ title: `${dt(i)} - Update`,
2093
2099
  type: "button",
2094
2100
  onChange: () => {
2095
2101
  a.updateObject(n.uuid, `material.${i}`, c.latest), a.updateObject(n.uuid, "material.needsUpdate", !0);
@@ -2100,15 +2106,15 @@ function Wt(t, n, a) {
2100
2106
  } else if (o === "object")
2101
2107
  if (h.isColor)
2102
2108
  e.push({
2103
- title: Ve(i),
2109
+ title: Ie(i),
2104
2110
  prop: i,
2105
2111
  type: "color",
2106
2112
  value: h,
2107
2113
  onChange: (c, d) => {
2108
2114
  const u = new St(d);
2109
2115
  a.updateObject(n.uuid, `material.${c}`, u);
2110
- const v = a.scene?.getObjectByProperty("uuid", n.uuid);
2111
- v !== void 0 && ee(v, `material.${c}`, u);
2116
+ const m = a.scene?.getObjectByProperty("uuid", n.uuid);
2117
+ m !== void 0 && ee(m, `material.${c}`, u);
2112
2118
  }
2113
2119
  });
2114
2120
  else if (Array.isArray(h)) {
@@ -2118,17 +2124,29 @@ function Wt(t, n, a) {
2118
2124
  title: `${d}`,
2119
2125
  type: `${typeof h[d]}`,
2120
2126
  value: h[d],
2121
- onChange: (u, v) => {
2122
- a.updateObject(n.uuid, `material.${i}`, v);
2127
+ onChange: (u, m) => {
2128
+ a.updateObject(n.uuid, `material.${i}`, m);
2123
2129
  const b = a.scene?.getObjectByProperty("uuid", n.uuid);
2124
- b !== void 0 && ee(b, `material.${i}`, v);
2130
+ b !== void 0 && ee(b, `material.${i}`, m);
2125
2131
  }
2126
2132
  });
2127
2133
  e.push({
2128
- title: Ve(i),
2134
+ title: Ie(i),
2129
2135
  items: c
2130
2136
  });
2131
- } else {
2137
+ } else if (h.x !== void 0 && h.y !== void 0 && h.z === void 0)
2138
+ e.push({
2139
+ title: Ie(i),
2140
+ prop: i,
2141
+ type: "vector",
2142
+ value: h,
2143
+ onChange: (c, d) => {
2144
+ a.updateObject(n.uuid, `material.${c}`, d);
2145
+ const u = a.scene?.getObjectByProperty("uuid", n.uuid);
2146
+ u !== void 0 && ee(u, `material.${c}`, d);
2147
+ }
2148
+ });
2149
+ else {
2132
2150
  const c = [];
2133
2151
  for (const d in h) {
2134
2152
  const u = h[d];
@@ -2137,53 +2155,53 @@ function Wt(t, n, a) {
2137
2155
  case "number":
2138
2156
  case "string":
2139
2157
  d === "src" ? e.push({
2140
- title: Ve(i),
2158
+ title: Ie(i),
2141
2159
  type: "image",
2142
2160
  value: u,
2143
2161
  onChange: (b, E) => {
2144
2162
  a.createTexture(n.uuid, `material.${i}`, E);
2145
- const S = a.scene?.getObjectByProperty("uuid", n.uuid);
2146
- S !== void 0 && Dt(E).then((D) => {
2147
- ee(S, `material.${i}`, D), ee(S, "material.needsUpdate", !0);
2163
+ const x = a.scene?.getObjectByProperty("uuid", n.uuid);
2164
+ x !== void 0 && It(E).then((R) => {
2165
+ ee(x, `material.${i}`, R), ee(x, "material.needsUpdate", !0);
2148
2166
  });
2149
2167
  }
2150
2168
  }) : c.push({
2151
- title: `${Ve(d)}`,
2169
+ title: `${Ie(d)}`,
2152
2170
  prop: `material.${i}.${d}`,
2153
2171
  type: `${typeof t[i][d]}`,
2154
2172
  value: h[d],
2155
2173
  onChange: (b, E) => {
2156
2174
  a.updateObject(n.uuid, `material.${i}.${d}`, E);
2157
- const S = a.scene?.getObjectByProperty("uuid", n.uuid);
2158
- S !== void 0 && ee(S, `material.${i}.${d}`, E);
2175
+ const x = a.scene?.getObjectByProperty("uuid", n.uuid);
2176
+ x !== void 0 && ee(x, `material.${i}.${d}`, E);
2159
2177
  }
2160
2178
  });
2161
2179
  break;
2162
2180
  case "object":
2163
2181
  if (u.value !== void 0 && u.value.src !== void 0)
2164
2182
  c.push({
2165
- title: Ve(d),
2183
+ title: Ie(d),
2166
2184
  type: "image",
2167
2185
  value: u.value.src,
2168
2186
  onChange: (b, E) => {
2169
2187
  a.createTexture(n.uuid, `material.${i}.${d}.value`, h);
2170
- const S = a.scene?.getObjectByProperty("uuid", n.uuid);
2171
- S !== void 0 && Dt(E).then((D) => {
2172
- ee(S, `material.${i}.${d}.value`, D);
2188
+ const x = a.scene?.getObjectByProperty("uuid", n.uuid);
2189
+ x !== void 0 && It(E).then((R) => {
2190
+ ee(x, `material.${i}.${d}.value`, R);
2173
2191
  });
2174
2192
  }
2175
2193
  });
2176
2194
  else if (i === "uniforms") {
2177
- const b = u.value, E = (S, D, I) => ({
2178
- title: S,
2195
+ const b = u.value, E = (x, R, P) => ({
2196
+ title: x,
2179
2197
  type: "number",
2180
- value: I,
2198
+ value: P,
2181
2199
  step: 0.01,
2182
- onChange: (q, B) => {
2183
- const M = `material.uniforms.${d}.value.${D}`;
2184
- a.updateObject(n.uuid, M, B);
2185
- const z = a.scene?.getObjectByProperty("uuid", n.uuid);
2186
- z !== void 0 && ee(z, M, B);
2200
+ onChange: (Y, F) => {
2201
+ const M = `material.uniforms.${d}.value.${R}`;
2202
+ a.updateObject(n.uuid, M, F);
2203
+ const w = a.scene?.getObjectByProperty("uuid", n.uuid);
2204
+ w !== void 0 && ee(w, M, F);
2187
2205
  }
2188
2206
  });
2189
2207
  if (typeof u.value == "number")
@@ -2191,11 +2209,12 @@ function Wt(t, n, a) {
2191
2209
  title: d,
2192
2210
  type: "number",
2193
2211
  value: u.value,
2194
- onChange: (S, D) => {
2195
- const I = `material.${i}.${S}.value`;
2196
- a.updateObject(n.uuid, I, D);
2197
- const q = a.scene?.getObjectByProperty("uuid", n.uuid);
2198
- q !== void 0 && ee(q, I, D);
2212
+ step: 0.01,
2213
+ onChange: (x, R) => {
2214
+ const P = `material.${i}.${x}.value`;
2215
+ a.updateObject(n.uuid, P, R);
2216
+ const Y = a.scene?.getObjectByProperty("uuid", n.uuid);
2217
+ Y !== void 0 && ee(Y, P, R);
2199
2218
  }
2200
2219
  });
2201
2220
  else if (b.r !== void 0 && b.g !== void 0 && b.b !== void 0)
@@ -2203,23 +2222,25 @@ function Wt(t, n, a) {
2203
2222
  title: d,
2204
2223
  type: "color",
2205
2224
  value: u.value,
2206
- onChange: (S, D) => {
2207
- const I = new St(D), q = `material.${i}.${S}.value`;
2208
- a.updateObject(n.uuid, q, I);
2209
- const B = a.scene?.getObjectByProperty("uuid", n.uuid);
2210
- B !== void 0 && ee(B, q, I);
2225
+ onChange: (x, R) => {
2226
+ const P = new St(R), Y = `material.${i}.${x}.value`;
2227
+ a.updateObject(n.uuid, Y, P);
2228
+ const F = a.scene?.getObjectByProperty("uuid", n.uuid);
2229
+ F !== void 0 && ee(F, Y, P);
2211
2230
  }
2212
2231
  });
2213
2232
  else if (b.x !== void 0 && b.y !== void 0 && b.z === void 0 && b.w === void 0)
2214
- c.push(
2215
- {
2216
- title: d,
2217
- items: [
2218
- E("X", "x", u.value.x),
2219
- E("Y", "y", u.value.y)
2220
- ]
2233
+ c.push({
2234
+ title: d,
2235
+ type: "vector",
2236
+ value: u.value,
2237
+ prop: `material.${i}.${d}.value`,
2238
+ onChange: (x, R) => {
2239
+ a.updateObject(n.uuid, x, R);
2240
+ const P = a.scene?.getObjectByProperty("uuid", n.uuid);
2241
+ P !== void 0 && ee(P, x, R);
2221
2242
  }
2222
- );
2243
+ });
2223
2244
  else if (b.x !== void 0 && b.y !== void 0 && b.z !== void 0 && b.w === void 0)
2224
2245
  c.push(
2225
2246
  {
@@ -2244,13 +2265,13 @@ function Wt(t, n, a) {
2244
2265
  }
2245
2266
  );
2246
2267
  else if (b.elements !== void 0) {
2247
- const S = b.elements, D = [];
2248
- for (let I = 0; I < S.length; I++)
2249
- D.push(E(I.toString(), I.toString(), S[I]));
2268
+ const x = b.elements, R = [];
2269
+ for (let P = 0; P < x.length; P++)
2270
+ R.push(E(P.toString(), P.toString(), x[P]));
2250
2271
  c.push(
2251
2272
  {
2252
2273
  title: d,
2253
- items: D
2274
+ items: R
2254
2275
  }
2255
2276
  );
2256
2277
  } else
@@ -2262,15 +2283,15 @@ function Wt(t, n, a) {
2262
2283
  value: u.value,
2263
2284
  onChange: (b, E) => {
2264
2285
  a.updateObject(n.uuid, `material.${i}.${d}.value`, E);
2265
- const S = a.scene?.getObjectByProperty("uuid", n.uuid);
2266
- S !== void 0 && ee(S, `material.${i}.${d}.value`, E);
2286
+ const x = a.scene?.getObjectByProperty("uuid", n.uuid);
2287
+ x !== void 0 && ee(x, `material.${i}.${d}.value`, E);
2267
2288
  }
2268
2289
  });
2269
2290
  break;
2270
2291
  }
2271
2292
  }
2272
2293
  c.length > 0 && e.push({
2273
- title: Ve(i),
2294
+ title: Ie(i),
2274
2295
  items: c
2275
2296
  });
2276
2297
  }
@@ -2285,7 +2306,7 @@ function Wt(t, n, a) {
2285
2306
  }
2286
2307
  }), e;
2287
2308
  }
2288
- function Ua(t, n) {
2309
+ function Ya(t, n) {
2289
2310
  const a = t.material;
2290
2311
  if (Array.isArray(a)) {
2291
2312
  const e = [], i = a.length;
@@ -2295,7 +2316,7 @@ function Ua(t, n) {
2295
2316
  We,
2296
2317
  {
2297
2318
  title: `Material ${o}`,
2298
- items: Wt(a[o], t, n)
2319
+ items: Xt(a[o], t, n)
2299
2320
  },
2300
2321
  `Material ${o}`
2301
2322
  )
@@ -2306,39 +2327,133 @@ function Ua(t, n) {
2306
2327
  We,
2307
2328
  {
2308
2329
  title: "Material",
2309
- items: Wt(a, t, n)
2330
+ items: Xt(a, t, n)
2310
2331
  }
2311
2332
  );
2312
2333
  }
2313
- function ct(t) {
2334
+ function Va(t) {
2335
+ const n = he(null), a = he(null), e = he(null), i = he(null), o = he(null), h = he(null), [c, d] = ne(t.value), [u, m] = ne({ min: t.min, max: t.max }), [b, E] = ne(!1);
2336
+ function x() {
2337
+ b || (window.addEventListener("mousemove", P), window.addEventListener("mouseup", R), window.addEventListener("mouseup", R), E(!0));
2338
+ }
2339
+ function R() {
2340
+ window.removeEventListener("mousemove", P), window.removeEventListener("mouseup", R), E(!1);
2341
+ }
2342
+ function P(w) {
2343
+ const ae = o.current.getBoundingClientRect(), X = Je(0, 99, w.clientX - ae.left) / 99, $ = Je(0, 99, w.clientY - ae.top) / 99, W = ut(Wt(u.min, u.max, X), 3), C = ut(Wt(u.min, u.max, $), 3);
2344
+ t.onChange({ target: { value: { x: W, y: C } } }), d({ x: W, y: C });
2345
+ }
2346
+ function Y(w) {
2347
+ let ae = c.x, X = c.y;
2348
+ w.target === n.current ? ae = Number(w.target.value) : X = Number(w.target.value), d({ x: ae, y: X });
2349
+ }
2350
+ function F() {
2351
+ const w = Number(e.current.value);
2352
+ m({ min: w, max: u.max }), (c.x < w || c.y < w) && d({ x: Je(w, u.max, c.x), y: Je(w, u.max, c.y) });
2353
+ }
2354
+ function M() {
2355
+ const w = Number(i.current.value);
2356
+ m({ min: u.min, max: w }), (c.x > w || c.y > w) && d({ x: Je(u.min, w, c.x), y: Je(u.min, w, c.y) });
2357
+ }
2358
+ return Re(() => {
2359
+ console.log(u.min, u.max, c.x, c.y);
2360
+ const w = Ht(u.min, u.max, c.x), ae = Ht(u.min, u.max, c.y);
2361
+ h.current.style.left = `${w * 100}%`, h.current.style.top = `${ae * 100}%`;
2362
+ }, [u, c]), /* @__PURE__ */ l.jsxs("div", { className: "vector", children: [
2363
+ /* @__PURE__ */ l.jsxs("div", { className: "fields", children: [
2364
+ /* @__PURE__ */ l.jsxs("div", { children: [
2365
+ /* @__PURE__ */ l.jsx("label", { children: "X:" }),
2366
+ /* @__PURE__ */ l.jsx(
2367
+ "input",
2368
+ {
2369
+ ref: n,
2370
+ type: "number",
2371
+ value: c.x,
2372
+ min: u.min,
2373
+ max: u.max,
2374
+ step: 0.01,
2375
+ onChange: Y
2376
+ }
2377
+ )
2378
+ ] }),
2379
+ /* @__PURE__ */ l.jsxs("div", { children: [
2380
+ /* @__PURE__ */ l.jsx("label", { children: "Y:" }),
2381
+ /* @__PURE__ */ l.jsx(
2382
+ "input",
2383
+ {
2384
+ ref: a,
2385
+ type: "number",
2386
+ value: c.y,
2387
+ min: u.min,
2388
+ max: u.max,
2389
+ step: 0.01,
2390
+ onChange: Y
2391
+ }
2392
+ )
2393
+ ] }),
2394
+ /* @__PURE__ */ l.jsxs("div", { children: [
2395
+ /* @__PURE__ */ l.jsx("label", { children: "Min:" }),
2396
+ /* @__PURE__ */ l.jsx(
2397
+ "input",
2398
+ {
2399
+ ref: e,
2400
+ type: "number",
2401
+ value: u.min,
2402
+ step: 0.01,
2403
+ onChange: F
2404
+ }
2405
+ )
2406
+ ] }),
2407
+ /* @__PURE__ */ l.jsxs("div", { children: [
2408
+ /* @__PURE__ */ l.jsx("label", { children: "Max:" }),
2409
+ /* @__PURE__ */ l.jsx(
2410
+ "input",
2411
+ {
2412
+ ref: i,
2413
+ type: "number",
2414
+ value: u.max,
2415
+ step: 0.01,
2416
+ onChange: M
2417
+ }
2418
+ )
2419
+ ] })
2420
+ ] }),
2421
+ /* @__PURE__ */ l.jsxs("div", { className: "input", ref: o, onMouseDown: x, onMouseUp: R, children: [
2422
+ /* @__PURE__ */ l.jsx("div", { className: "x" }),
2423
+ /* @__PURE__ */ l.jsx("div", { className: "y" }),
2424
+ /* @__PURE__ */ l.jsx("div", { className: "pt", ref: h })
2425
+ ] })
2426
+ ] });
2427
+ }
2428
+ function lt(t) {
2314
2429
  let n = t.value;
2315
- n !== void 0 && n.isColor !== void 0 && (n = pa(t.value));
2316
- const [a, e] = oe(n), i = Re(null), o = Re(null), h = Re(null);
2317
- _e(() => {
2318
- let v = !1, b = -1, E = 0, S = Number(a);
2319
- const D = (z) => {
2320
- v = !0, E = S, b = z.clientX;
2321
- }, I = (z) => {
2322
- if (!v)
2430
+ n !== void 0 && n.isColor !== void 0 && (n = ga(t.value));
2431
+ const [a, e] = ne(n), i = he(null), o = he(null), h = he(null);
2432
+ Re(() => {
2433
+ let m = !1, b = -1, E = 0, x = Number(a);
2434
+ const R = (w) => {
2435
+ m = !0, E = x, b = w.clientX;
2436
+ }, P = (w) => {
2437
+ if (!m)
2323
2438
  return;
2324
- const we = t.step !== void 0 ? t.step : 1, ce = (z.clientX - b) * we;
2325
- S = Number((E + ce).toFixed(4)), o.current !== null && (o.current.value = S.toString()), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, S);
2326
- }, q = () => {
2327
- v = !1;
2328
- }, B = () => {
2329
- v = !1;
2439
+ const ae = t.step !== void 0 ? t.step : 1, X = (w.clientX - b) * ae;
2440
+ x = Number((E + X).toFixed(4)), o.current !== null && (o.current.value = x.toString()), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, x);
2441
+ }, Y = () => {
2442
+ m = !1;
2443
+ }, F = () => {
2444
+ m = !1;
2330
2445
  }, M = t.type === "number";
2331
- return M && (i.current?.addEventListener("mousedown", D, !1), document.addEventListener("mouseup", q, !1), document.addEventListener("mousemove", I, !1), document.addEventListener("contextmenu", B, !1)), () => {
2332
- M && (i.current?.removeEventListener("mousedown", D), document.removeEventListener("mouseup", q), document.removeEventListener("mousemove", I), document.removeEventListener("contextmenu", B));
2446
+ return M && (i.current?.addEventListener("mousedown", R, !1), document.addEventListener("mouseup", Y, !1), document.addEventListener("mousemove", P, !1), document.addEventListener("contextmenu", F, !1)), () => {
2447
+ M && (i.current?.removeEventListener("mousedown", R), document.removeEventListener("mouseup", Y), document.removeEventListener("mousemove", P), document.removeEventListener("contextmenu", F));
2333
2448
  };
2334
2449
  }, [a]);
2335
2450
  const c = t.type === "string" && (a.length > 100 || a.search(`
2336
- `) > -1), d = c || t.type === "image", u = (v) => {
2337
- let b = v.target.value;
2338
- t.type === "boolean" ? b = v.target.checked : t.type === "option" && (b = t.options[b].value), e(b), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, b);
2451
+ `) > -1), d = c || t.type === "image" || t.type === "vector", u = (m) => {
2452
+ let b = m.target.value;
2453
+ t.type === "boolean" ? b = m.target.checked : t.type === "option" && (b = t.options[b].value), e(b), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, b);
2339
2454
  };
2340
2455
  return /* @__PURE__ */ l.jsxs("div", { className: `field ${d ? "block" : ""}`, children: [
2341
- t.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: i, children: lt(t.title) }, "fieldLabel"),
2456
+ t.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: i, children: dt(t.title) }, "fieldLabel"),
2342
2457
  t.type === "string" && !c && /* @__PURE__ */ l.jsx(
2343
2458
  "input",
2344
2459
  {
@@ -2410,14 +2525,15 @@ function ct(t) {
2410
2525
  }
2411
2526
  ),
2412
2527
  t.type === "image" && /* @__PURE__ */ l.jsx("img", { ref: h, onClick: () => {
2413
- Da().then((v) => {
2414
- h.current.src = v, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, v);
2528
+ La().then((m) => {
2529
+ h.current.src = m, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, m);
2415
2530
  });
2416
- }, src: a.length > 0 ? a : Aa }),
2417
- t.type === "option" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx("select", { onChange: u, disabled: t.disabled, defaultValue: t.value, children: t.options?.map((v, b) => /* @__PURE__ */ l.jsx("option", { value: v.value, children: lt(v.title) }, b)) }) })
2531
+ }, src: a.length > 0 ? a : ja }),
2532
+ t.type === "option" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx("select", { onChange: u, disabled: t.disabled, defaultValue: t.value, children: t.options?.map((m, b) => /* @__PURE__ */ l.jsx("option", { value: m.value, children: dt(m.title) }, b)) }) }),
2533
+ t.type === "vector" && /* @__PURE__ */ l.jsx(Va, { value: a, min: -1, max: 1, onChange: u })
2418
2534
  ] });
2419
2535
  }
2420
- function qt(t) {
2536
+ function Zt(t) {
2421
2537
  switch (t) {
2422
2538
  case "fov":
2423
2539
  return "FOV";
@@ -2446,12 +2562,12 @@ function qt(t) {
2446
2562
  }
2447
2563
  return t;
2448
2564
  }
2449
- function $a(t, n) {
2565
+ function Ga(t, n) {
2450
2566
  const a = [];
2451
2567
  if (t.perspectiveCameraInfo !== void 0)
2452
2568
  for (const e in t.perspectiveCameraInfo)
2453
2569
  a.push({
2454
- title: qt(e),
2570
+ title: Zt(e),
2455
2571
  prop: e,
2456
2572
  type: "number",
2457
2573
  step: 0.01,
@@ -2465,7 +2581,7 @@ function $a(t, n) {
2465
2581
  else if (t.orthographicCameraInfo !== void 0)
2466
2582
  for (const e in t.orthographicCameraInfo)
2467
2583
  a.push({
2468
- title: qt(e),
2584
+ title: Zt(e),
2469
2585
  prop: e,
2470
2586
  type: "number",
2471
2587
  step: 0.01,
@@ -2484,27 +2600,27 @@ function $a(t, n) {
2484
2600
  }
2485
2601
  );
2486
2602
  }
2487
- const za = Math.PI / 180, Ya = 180 / Math.PI;
2488
- function Qe(t, n, a, e, i) {
2603
+ const Ha = Math.PI / 180, Wa = 180 / Math.PI;
2604
+ function et(t, n, a, e, i) {
2489
2605
  return e + (t - n) * (i - e) / (a - n);
2490
2606
  }
2491
- function Ga(t) {
2492
- return t * za;
2607
+ function qa(t) {
2608
+ return t * Ha;
2493
2609
  }
2494
- function Pt(t) {
2495
- return t * Ya;
2610
+ function kt(t) {
2611
+ return t * Wa;
2496
2612
  }
2497
- function Va(t, n) {
2498
- const a = new Wn();
2613
+ function Ka(t, n) {
2614
+ const a = new Xn();
2499
2615
  a.elements = t.matrix;
2500
- const e = new W(), i = new qn(), o = new W();
2616
+ const e = new K(), i = new Zn(), o = new K();
2501
2617
  t.uuid.length > 0 && (e.setFromMatrixPosition(a), i.setFromRotationMatrix(a), o.setFromMatrixScale(a));
2502
2618
  const h = (d, u) => {
2503
2619
  n.updateObject(t.uuid, d, u);
2504
- const v = n.scene?.getObjectByProperty("uuid", t.uuid);
2505
- v !== void 0 && ee(v, d, u);
2620
+ const m = n.scene?.getObjectByProperty("uuid", t.uuid);
2621
+ m !== void 0 && ee(m, d, u);
2506
2622
  }, c = (d, u) => {
2507
- h(d, Ga(u));
2623
+ h(d, qa(u));
2508
2624
  };
2509
2625
  return /* @__PURE__ */ l.jsx(
2510
2626
  We,
@@ -2536,7 +2652,7 @@ function Va(t, n) {
2536
2652
  title: "Rotation X",
2537
2653
  prop: "rotation.x",
2538
2654
  type: "number",
2539
- value: _t(Pt(i.x)),
2655
+ value: ut(kt(i.x)),
2540
2656
  min: -360,
2541
2657
  max: 360,
2542
2658
  step: 0.1,
@@ -2546,7 +2662,7 @@ function Va(t, n) {
2546
2662
  title: "Rotation Y",
2547
2663
  prop: "rotation.y",
2548
2664
  type: "number",
2549
- value: _t(Pt(i.y)),
2665
+ value: ut(kt(i.y)),
2550
2666
  min: -360,
2551
2667
  max: 360,
2552
2668
  step: 0.1,
@@ -2556,7 +2672,7 @@ function Va(t, n) {
2556
2672
  title: "Rotation Z",
2557
2673
  prop: "rotation.z",
2558
2674
  type: "number",
2559
- value: _t(Pt(i.z)),
2675
+ value: ut(kt(i.z)),
2560
2676
  min: -360,
2561
2677
  max: 360,
2562
2678
  step: 0.1,
@@ -2590,7 +2706,7 @@ function Va(t, n) {
2590
2706
  }
2591
2707
  );
2592
2708
  }
2593
- function Kt(t) {
2709
+ function Jt(t) {
2594
2710
  switch (t) {
2595
2711
  case "color":
2596
2712
  return "Color";
@@ -2609,13 +2725,13 @@ function Kt(t) {
2609
2725
  }
2610
2726
  return t;
2611
2727
  }
2612
- function Ha(t, n) {
2728
+ function Xa(t, n) {
2613
2729
  const a = [];
2614
2730
  if (t.lightInfo !== void 0)
2615
2731
  for (const e in t.lightInfo) {
2616
2732
  const i = t.lightInfo[e];
2617
2733
  i !== void 0 && (i.isColor !== void 0 ? a.push({
2618
- title: Kt(e),
2734
+ title: Jt(e),
2619
2735
  prop: e,
2620
2736
  type: "color",
2621
2737
  value: i,
@@ -2626,7 +2742,7 @@ function Ha(t, n) {
2626
2742
  d !== void 0 && ee(d, o, c);
2627
2743
  }
2628
2744
  }) : a.push({
2629
- title: Kt(e),
2745
+ title: Jt(e),
2630
2746
  prop: e,
2631
2747
  type: typeof i,
2632
2748
  value: i,
@@ -2646,7 +2762,7 @@ function Ha(t, n) {
2646
2762
  }
2647
2763
  );
2648
2764
  }
2649
- function Wa(t, n) {
2765
+ function Za(t, n) {
2650
2766
  const a = [], e = [];
2651
2767
  let i = 0;
2652
2768
  t.animations.forEach((c) => {
@@ -2693,8 +2809,8 @@ function Wa(t, n) {
2693
2809
  step: 0.01,
2694
2810
  min: -1,
2695
2811
  max: 2,
2696
- onChange: (u, v) => {
2697
- c.timeScale = v, n.updateObject(t.uuid, "mixer.timeScale", v);
2812
+ onChange: (u, m) => {
2813
+ c.timeScale = m, n.updateObject(t.uuid, "mixer.timeScale", m);
2698
2814
  }
2699
2815
  }
2700
2816
  ];
@@ -2712,7 +2828,7 @@ function Wa(t, n) {
2712
2828
  }
2713
2829
  return /* @__PURE__ */ l.jsx(We, { title: "Animation", items: a });
2714
2830
  }
2715
- const Tn = {
2831
+ const Pn = {
2716
2832
  name: "",
2717
2833
  uuid: "",
2718
2834
  type: "",
@@ -2724,94 +2840,94 @@ const Tn = {
2724
2840
  orthographicCameraInfo: void 0,
2725
2841
  lightInfo: void 0
2726
2842
  };
2727
- let re = { ...Tn };
2728
- function qa(t) {
2729
- const [n, a] = oe(-1);
2730
- _e(() => {
2843
+ let ce = { ...Pn };
2844
+ function Ja(t) {
2845
+ const [n, a] = ne(-1);
2846
+ Re(() => {
2731
2847
  function h(d) {
2732
- re = { ...d.value }, a(Date.now());
2848
+ ce = { ...d.value }, a(Date.now());
2733
2849
  }
2734
2850
  function c() {
2735
- re = { ...Tn }, a(Date.now());
2851
+ ce = { ...Pn }, a(Date.now());
2736
2852
  }
2737
- return P.addEventListener(k.SET_SCENE, c), P.addEventListener(k.SET_OBJECT, h), () => {
2738
- P.removeEventListener(k.SET_SCENE, c), P.removeEventListener(k.SET_OBJECT, h);
2853
+ return D.addEventListener(I.SET_SCENE, c), D.addEventListener(I.SET_OBJECT, h), () => {
2854
+ D.removeEventListener(I.SET_SCENE, c), D.removeEventListener(I.SET_OBJECT, h);
2739
2855
  };
2740
2856
  }, []);
2741
- const e = re.type.toLowerCase(), i = re.animations.length > 0 || re.mixer !== void 0, o = e.search("mesh") > -1 || e.search("line") > -1 || e.search("points") > -1;
2742
- return /* @__PURE__ */ l.jsx(Lt, { label: "Inspector", children: /* @__PURE__ */ l.jsx("div", { id: "Inspector", className: t.class, children: re.uuid.length > 0 && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2857
+ const e = ce.type.toLowerCase(), i = ce.animations.length > 0 || ce.mixer !== void 0, o = e.search("mesh") > -1 || e.search("line") > -1 || e.search("points") > -1;
2858
+ return /* @__PURE__ */ l.jsx(Ft, { label: "Inspector", children: /* @__PURE__ */ l.jsx("div", { id: "Inspector", className: t.class, children: ce.uuid.length > 0 && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2743
2859
  /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2744
2860
  /* @__PURE__ */ l.jsx(
2745
- ct,
2861
+ lt,
2746
2862
  {
2747
2863
  type: "string",
2748
2864
  title: "Name",
2749
2865
  prop: "name",
2750
- value: re.name,
2866
+ value: ce.name,
2751
2867
  disabled: !0
2752
2868
  }
2753
2869
  ),
2754
2870
  /* @__PURE__ */ l.jsx(
2755
- ct,
2871
+ lt,
2756
2872
  {
2757
2873
  type: "string",
2758
2874
  title: "Type",
2759
2875
  prop: "type",
2760
- value: re.type,
2876
+ value: ce.type,
2761
2877
  disabled: !0
2762
2878
  }
2763
2879
  ),
2764
2880
  /* @__PURE__ */ l.jsx(
2765
- ct,
2881
+ lt,
2766
2882
  {
2767
2883
  type: "string",
2768
2884
  title: "UUID",
2769
2885
  prop: "uuid",
2770
- value: re.uuid,
2886
+ value: ce.uuid,
2771
2887
  disabled: !0
2772
2888
  }
2773
2889
  ),
2774
2890
  /* @__PURE__ */ l.jsx(
2775
- ct,
2891
+ lt,
2776
2892
  {
2777
2893
  type: "boolean",
2778
2894
  title: "Visible",
2779
2895
  prop: "visible",
2780
- value: re.visible,
2896
+ value: ce.visible,
2781
2897
  onChange: (h, c) => {
2782
- t.three.updateObject(re.uuid, h, c);
2783
- const d = t.three.scene?.getObjectByProperty("uuid", re.uuid);
2898
+ t.three.updateObject(ce.uuid, h, c);
2899
+ const d = t.three.scene?.getObjectByProperty("uuid", ce.uuid);
2784
2900
  d !== void 0 && ee(d, h, c);
2785
2901
  }
2786
2902
  }
2787
2903
  )
2788
2904
  ] }),
2789
2905
  /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2790
- Va(re, t.three),
2791
- i ? Wa(re, t.three) : null,
2792
- e.search("camera") > -1 ? $a(re, t.three) : null,
2793
- e.search("light") > -1 ? Ha(re, t.three) : null,
2794
- o ? Ua(re, t.three) : null
2906
+ Ka(ce, t.three),
2907
+ i ? Za(ce, t.three) : null,
2908
+ e.search("camera") > -1 ? Ga(ce, t.three) : null,
2909
+ e.search("light") > -1 ? Xa(ce, t.three) : null,
2910
+ o ? Ya(ce, t.three) : null
2795
2911
  ] })
2796
2912
  ] }) }, n) }, "Inspector");
2797
2913
  }
2798
- function vi(t) {
2799
- const [n, a] = oe(t.scene);
2800
- _e(() => {
2914
+ function yi(t) {
2915
+ const [n, a] = ne(t.scene);
2916
+ Re(() => {
2801
2917
  const o = (h) => {
2802
2918
  a(h.value);
2803
2919
  };
2804
- return P.addEventListener(k.SET_SCENE, o), () => {
2805
- P.removeEventListener(k.SET_SCENE, o);
2920
+ return D.addEventListener(I.SET_SCENE, o), () => {
2921
+ D.removeEventListener(I.SET_SCENE, o);
2806
2922
  };
2807
2923
  }, []);
2808
2924
  const e = n !== null, i = "Hierarchy - " + (e ? `${n?.name}` : "No Scene");
2809
2925
  return /* @__PURE__ */ l.jsxs("div", { id: "SidePanel", children: [
2810
- /* @__PURE__ */ l.jsx(Lt, { label: i, open: !0, children: /* @__PURE__ */ l.jsx(l.Fragment, { children: e && /* @__PURE__ */ l.jsx(_a, { child: n, three: t.three }) }) }),
2811
- /* @__PURE__ */ l.jsx(qa, { three: t.three })
2926
+ /* @__PURE__ */ l.jsx(Ft, { label: i, open: !0, children: /* @__PURE__ */ l.jsx(l.Fragment, { children: e && /* @__PURE__ */ l.jsx(ka, { child: n, three: t.three }) }) }),
2927
+ /* @__PURE__ */ l.jsx(Ja, { three: t.three })
2812
2928
  ] }, "SidePanel");
2813
2929
  }
2814
- function gi(t) {
2930
+ function Ei(t) {
2815
2931
  function n() {
2816
2932
  return t.three.scene === void 0 ? (console.log("No scene:", t.three), !1) : !0;
2817
2933
  }
@@ -2823,81 +2939,81 @@ function gi(t) {
2823
2939
  }, e = (c, d, u) => {
2824
2940
  if (!n())
2825
2941
  return;
2826
- const v = t.three.scene?.getObjectByProperty("uuid", c);
2827
- v !== void 0 && ee(v, d, u);
2942
+ const m = t.three.scene?.getObjectByProperty("uuid", c);
2943
+ m !== void 0 && ee(m, d, u);
2828
2944
  }, i = (c) => {
2829
2945
  if (!n())
2830
2946
  return;
2831
- const d = c.value, { key: u, value: v, uuid: b } = d;
2832
- e(b, u, v);
2947
+ const d = c.value, { key: u, value: m, uuid: b } = d;
2948
+ e(b, u, m);
2833
2949
  }, o = (c) => {
2834
2950
  if (!n())
2835
2951
  return;
2836
2952
  const d = c.value;
2837
- Dt(d.value).then((u) => {
2953
+ It(d.value).then((u) => {
2838
2954
  e(d.uuid, d.key, u), e(d.uuid, "material.needsUpdate", !0);
2839
2955
  });
2840
2956
  }, h = (c) => {
2841
2957
  if (!n())
2842
2958
  return;
2843
- const { key: d, uuid: u, value: v, subitem: b } = c.value, E = t.three.scene?.getObjectByProperty("uuid", u);
2959
+ const { key: d, uuid: u, value: m, subitem: b } = c.value, E = t.three.scene?.getObjectByProperty("uuid", u);
2844
2960
  if (E !== void 0)
2845
2961
  try {
2846
- b !== void 0 ? Ea(E, b)[d](v) : E[d](v);
2847
- } catch (S) {
2848
- console.log("Error requesting method:"), console.log(S), console.log(d), console.log(v);
2962
+ b !== void 0 ? Sa(E, b)[d](m) : E[d](m);
2963
+ } catch (x) {
2964
+ console.log("Error requesting method:"), console.log(x), console.log(d), console.log(m);
2849
2965
  }
2850
2966
  };
2851
- return _e(() => (P.addEventListener(k.GET_OBJECT, a), P.addEventListener(k.UPDATE_OBJECT, i), P.addEventListener(k.CREATE_TEXTURE, o), P.addEventListener(k.REQUEST_METHOD, h), () => {
2852
- P.removeEventListener(k.GET_OBJECT, a), P.removeEventListener(k.UPDATE_OBJECT, i), P.removeEventListener(k.CREATE_TEXTURE, o), P.removeEventListener(k.REQUEST_METHOD, h);
2967
+ return Re(() => (D.addEventListener(I.GET_OBJECT, a), D.addEventListener(I.UPDATE_OBJECT, i), D.addEventListener(I.CREATE_TEXTURE, o), D.addEventListener(I.REQUEST_METHOD, h), () => {
2968
+ D.removeEventListener(I.GET_OBJECT, a), D.removeEventListener(I.UPDATE_OBJECT, i), D.removeEventListener(I.CREATE_TEXTURE, o), D.removeEventListener(I.REQUEST_METHOD, h);
2853
2969
  }), []), null;
2854
2970
  }
2855
- const Xt = { type: "change" }, kt = { type: "start" }, Zt = { type: "end" }, gt = new Kn(), Jt = new Xn(), Ka = Math.cos(70 * Zn.DEG2RAD);
2856
- class Xa extends en {
2971
+ const Qt = { type: "change" }, jt = { type: "start" }, en = { type: "end" }, yt = new Jn(), tn = new Qn(), Qa = Math.cos(70 * ea.DEG2RAD);
2972
+ class ei extends an {
2857
2973
  constructor(n, a) {
2858
- super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new W(), this.cursor = new W(), 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: Xe.ROTATE, MIDDLE: Xe.DOLLY, RIGHT: Xe.PAN }, this.touches = { ONE: Ze.ROTATE, TWO: Ze.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
2974
+ super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new K(), this.cursor = new K(), 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: Xe.ROTATE, MIDDLE: Xe.DOLLY, RIGHT: Xe.PAN }, this.touches = { ONE: Ze.ROTATE, TWO: Ze.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
2859
2975
  return c.phi;
2860
2976
  }, this.getAzimuthalAngle = function() {
2861
2977
  return c.theta;
2862
2978
  }, this.getDistance = function() {
2863
2979
  return this.object.position.distanceTo(this.target);
2864
2980
  }, this.listenToKeyEvents = function(s) {
2865
- s.addEventListener("keydown", nt), this._domElementKeyEvents = s;
2981
+ s.addEventListener("keydown", at), this._domElementKeyEvents = s;
2866
2982
  }, this.stopListenToKeyEvents = function() {
2867
- this._domElementKeyEvents.removeEventListener("keydown", nt), this._domElementKeyEvents = null;
2983
+ this._domElementKeyEvents.removeEventListener("keydown", at), this._domElementKeyEvents = null;
2868
2984
  }, this.saveState = function() {
2869
2985
  e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
2870
2986
  }, this.reset = function() {
2871
- e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(Xt), e.update(), o = i.NONE;
2987
+ e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(Qt), e.update(), o = i.NONE;
2872
2988
  }, this.update = function() {
2873
- const s = new W(), y = new $t().setFromUnitVectors(n.up, new W(0, 1, 0)), O = y.clone().invert(), N = new W(), H = new $t(), be = new W(), le = 2 * Math.PI;
2874
- return function(Tt = null) {
2875
- const it = e.object.position;
2876
- s.copy(it).sub(e.target), s.applyQuaternion(y), c.setFromVector3(s), e.autoRotate && o === i.NONE && me(Fe(Tt)), e.enableDamping ? (c.theta += d.theta * e.dampingFactor, c.phi += d.phi * e.dampingFactor) : (c.theta += d.theta, c.phi += d.phi);
2877
- let xe = e.minAzimuthAngle, ye = e.maxAzimuthAngle;
2878
- isFinite(xe) && isFinite(ye) && (xe < -Math.PI ? xe += le : xe > Math.PI && (xe -= le), ye < -Math.PI ? ye += le : ye > Math.PI && (ye -= le), xe <= ye ? c.theta = Math.max(xe, Math.min(ye, c.theta)) : c.theta = c.theta > (xe + ye) / 2 ? Math.max(xe, c.theta) : Math.min(ye, c.theta)), c.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, c.phi)), c.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(v, e.dampingFactor) : e.target.add(v), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor), e.zoomToCursor && Y || e.object.isOrthographicCamera ? c.radius = ke(c.radius) : c.radius = ke(c.radius * u), s.setFromSpherical(c), s.applyQuaternion(O), it.copy(e.target).add(s), e.object.lookAt(e.target), e.enableDamping === !0 ? (d.theta *= 1 - e.dampingFactor, d.phi *= 1 - e.dampingFactor, v.multiplyScalar(1 - e.dampingFactor)) : (d.set(0, 0, 0), v.set(0, 0, 0));
2879
- let $e = !1;
2880
- if (e.zoomToCursor && Y) {
2881
- let ze = null;
2989
+ const s = new K(), y = new zt().setFromUnitVectors(n.up, new K(0, 1, 0)), T = y.clone().invert(), L = new K(), q = new zt(), Ee = new K(), ue = 2 * Math.PI;
2990
+ return function(_t = null) {
2991
+ const rt = e.object.position;
2992
+ s.copy(rt).sub(e.target), s.applyQuaternion(y), c.setFromVector3(s), e.autoRotate && o === i.NONE && ge(Be(_t)), e.enableDamping ? (c.theta += d.theta * e.dampingFactor, c.phi += d.phi * e.dampingFactor) : (c.theta += d.theta, c.phi += d.phi);
2993
+ let Oe = e.minAzimuthAngle, xe = e.maxAzimuthAngle;
2994
+ isFinite(Oe) && isFinite(xe) && (Oe < -Math.PI ? Oe += ue : Oe > Math.PI && (Oe -= ue), xe < -Math.PI ? xe += ue : xe > Math.PI && (xe -= ue), Oe <= xe ? c.theta = Math.max(Oe, Math.min(xe, c.theta)) : c.theta = c.theta > (Oe + xe) / 2 ? Math.max(Oe, c.theta) : Math.min(xe, c.theta)), c.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, c.phi)), c.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 && $ || e.object.isOrthographicCamera ? c.radius = ke(c.radius) : c.radius = ke(c.radius * u), s.setFromSpherical(c), s.applyQuaternion(T), rt.copy(e.target).add(s), 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));
2995
+ let ze = !1;
2996
+ if (e.zoomToCursor && $) {
2997
+ let Ye = null;
2882
2998
  if (e.object.isPerspectiveCamera) {
2883
- const Ye = s.length();
2884
- ze = ke(Ye * u);
2885
- const Ge = Ye - ze;
2886
- e.object.position.addScaledVector(we, Ge), e.object.updateMatrixWorld();
2999
+ const Ve = s.length();
3000
+ Ye = ke(Ve * u);
3001
+ const Ge = Ve - Ye;
3002
+ e.object.position.addScaledVector(ae, Ge), e.object.updateMatrixWorld();
2887
3003
  } else if (e.object.isOrthographicCamera) {
2888
- const Ye = new W(ce.x, ce.y, 0);
2889
- Ye.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / u)), e.object.updateProjectionMatrix(), $e = !0;
2890
- const Ge = new W(ce.x, ce.y, 0);
2891
- Ge.unproject(e.object), e.object.position.sub(Ge).add(Ye), e.object.updateMatrixWorld(), ze = s.length();
3004
+ const Ve = new K(X.x, X.y, 0);
3005
+ Ve.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / u)), e.object.updateProjectionMatrix(), ze = !0;
3006
+ const Ge = new K(X.x, X.y, 0);
3007
+ Ge.unproject(e.object), e.object.position.sub(Ge).add(Ve), e.object.updateMatrixWorld(), Ye = s.length();
2892
3008
  } else
2893
3009
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), e.zoomToCursor = !1;
2894
- ze !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(ze).add(e.object.position) : (gt.origin.copy(e.object.position), gt.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(gt.direction)) < Ka ? n.lookAt(e.target) : (Jt.setFromNormalAndCoplanarPoint(e.object.up, e.target), gt.intersectPlane(Jt, e.target))));
3010
+ Ye !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(Ye).add(e.object.position) : (yt.origin.copy(e.object.position), yt.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(yt.direction)) < Qa ? n.lookAt(e.target) : (tn.setFromNormalAndCoplanarPoint(e.object.up, e.target), yt.intersectPlane(tn, e.target))));
2895
3011
  } else
2896
- e.object.isOrthographicCamera && ($e = u !== 1, $e && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / u)), e.object.updateProjectionMatrix()));
2897
- return u = 1, Y = !1, $e || N.distanceToSquared(e.object.position) > h || 8 * (1 - H.dot(e.object.quaternion)) > h || be.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(Xt), N.copy(e.object.position), H.copy(e.object.quaternion), be.copy(e.target), !0) : !1;
3012
+ e.object.isOrthographicCamera && (ze = u !== 1, ze && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / u)), e.object.updateProjectionMatrix()));
3013
+ return u = 1, $ = !1, ze || L.distanceToSquared(e.object.position) > h || 8 * (1 - q.dot(e.object.quaternion)) > h || Ee.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(Qt), L.copy(e.object.position), q.copy(e.object.quaternion), Ee.copy(e.target), !0) : !1;
2898
3014
  };
2899
3015
  }(), this.dispose = function() {
2900
- e.domElement.removeEventListener("contextmenu", qe), e.domElement.removeEventListener("pointerdown", Be), e.domElement.removeEventListener("pointercancel", Ue), e.domElement.removeEventListener("wheel", ht), e.domElement.removeEventListener("pointermove", et), e.domElement.removeEventListener("pointerup", Ue), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", nt), e._domElementKeyEvents = null);
3016
+ e.domElement.removeEventListener("contextmenu", qe), e.domElement.removeEventListener("pointerdown", Ue), e.domElement.removeEventListener("pointercancel", $e), e.domElement.removeEventListener("wheel", pt), e.domElement.removeEventListener("pointermove", tt), e.domElement.removeEventListener("pointerup", $e), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", at), e._domElementKeyEvents = null);
2901
3017
  };
2902
3018
  const e = this, i = {
2903
3019
  NONE: -1,
@@ -2910,181 +3026,181 @@ class Xa extends en {
2910
3026
  TOUCH_DOLLY_ROTATE: 6
2911
3027
  };
2912
3028
  let o = i.NONE;
2913
- const h = 1e-6, c = new zt(), d = new zt();
3029
+ const h = 1e-6, c = new Yt(), d = new Yt();
2914
3030
  let u = 1;
2915
- const v = new W(), b = new fe(), E = new fe(), S = new fe(), D = new fe(), I = new fe(), q = new fe(), B = new fe(), M = new fe(), z = new fe(), we = new W(), ce = new fe();
2916
- let Y = !1;
2917
- const Q = [], x = {};
2918
- let Ae = !1;
2919
- function Fe(s) {
3031
+ const m = new K(), b = new me(), E = new me(), x = new me(), R = new me(), P = new me(), Y = new me(), F = new me(), M = new me(), w = new me(), ae = new K(), X = new me();
3032
+ let $ = !1;
3033
+ const W = [], C = {};
3034
+ let Pe = !1;
3035
+ function Be(s) {
2920
3036
  return s !== null ? 2 * Math.PI / 60 * e.autoRotateSpeed * s : 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
2921
3037
  }
2922
- function Oe(s) {
3038
+ function Me(s) {
2923
3039
  const y = Math.abs(s * 0.01);
2924
3040
  return Math.pow(0.95, e.zoomSpeed * y);
2925
3041
  }
2926
- function me(s) {
3042
+ function ge(s) {
2927
3043
  d.theta -= s;
2928
3044
  }
2929
- function te(s) {
3045
+ function ie(s) {
2930
3046
  d.phi -= s;
2931
3047
  }
2932
- const ue = function() {
2933
- const s = new W();
2934
- return function(O, N) {
2935
- s.setFromMatrixColumn(N, 0), s.multiplyScalar(-O), v.add(s);
3048
+ const fe = function() {
3049
+ const s = new K();
3050
+ return function(T, L) {
3051
+ s.setFromMatrixColumn(L, 0), s.multiplyScalar(-T), m.add(s);
2936
3052
  };
2937
- }(), ve = function() {
2938
- const s = new W();
2939
- return function(O, N) {
2940
- e.screenSpacePanning === !0 ? s.setFromMatrixColumn(N, 1) : (s.setFromMatrixColumn(N, 0), s.crossVectors(e.object.up, s)), s.multiplyScalar(O), v.add(s);
3053
+ }(), be = function() {
3054
+ const s = new K();
3055
+ return function(T, L) {
3056
+ e.screenSpacePanning === !0 ? s.setFromMatrixColumn(L, 1) : (s.setFromMatrixColumn(L, 0), s.crossVectors(e.object.up, s)), s.multiplyScalar(T), m.add(s);
2941
3057
  };
2942
- }(), ge = function() {
2943
- const s = new W();
2944
- return function(O, N) {
2945
- const H = e.domElement;
3058
+ }(), ye = function() {
3059
+ const s = new K();
3060
+ return function(T, L) {
3061
+ const q = e.domElement;
2946
3062
  if (e.object.isPerspectiveCamera) {
2947
- const be = e.object.position;
2948
- s.copy(be).sub(e.target);
2949
- let le = s.length();
2950
- le *= Math.tan(e.object.fov / 2 * Math.PI / 180), ue(2 * O * le / H.clientHeight, e.object.matrix), ve(2 * N * le / H.clientHeight, e.object.matrix);
3063
+ const Ee = e.object.position;
3064
+ s.copy(Ee).sub(e.target);
3065
+ let ue = s.length();
3066
+ ue *= Math.tan(e.object.fov / 2 * Math.PI / 180), fe(2 * T * ue / q.clientHeight, e.object.matrix), be(2 * L * ue / q.clientHeight, e.object.matrix);
2951
3067
  } else
2952
- e.object.isOrthographicCamera ? (ue(O * (e.object.right - e.object.left) / e.object.zoom / H.clientWidth, e.object.matrix), ve(N * (e.object.top - e.object.bottom) / e.object.zoom / H.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
3068
+ e.object.isOrthographicCamera ? (fe(T * (e.object.right - e.object.left) / e.object.zoom / q.clientWidth, e.object.matrix), be(L * (e.object.top - e.object.bottom) / e.object.zoom / q.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
2953
3069
  };
2954
3070
  }();
2955
- function K(s) {
3071
+ function Z(s) {
2956
3072
  e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? u /= s : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2957
3073
  }
2958
- function pe(s) {
3074
+ function ve(s) {
2959
3075
  e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? u *= s : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2960
3076
  }
2961
- function Pe(s, y) {
3077
+ function Ae(s, y) {
2962
3078
  if (!e.zoomToCursor)
2963
3079
  return;
2964
- Y = !0;
2965
- const O = e.domElement.getBoundingClientRect(), N = s - O.left, H = y - O.top, be = O.width, le = O.height;
2966
- ce.x = N / be * 2 - 1, ce.y = -(H / le) * 2 + 1, we.set(ce.x, ce.y, 1).unproject(e.object).sub(e.object.position).normalize();
3080
+ $ = !0;
3081
+ const T = e.domElement.getBoundingClientRect(), L = s - T.left, q = y - T.top, Ee = T.width, ue = T.height;
3082
+ X.x = L / Ee * 2 - 1, X.y = -(q / ue) * 2 + 1, ae.set(X.x, X.y, 1).unproject(e.object).sub(e.object.position).normalize();
2967
3083
  }
2968
3084
  function ke(s) {
2969
3085
  return Math.max(e.minDistance, Math.min(e.maxDistance, s));
2970
3086
  }
2971
- function he(s) {
3087
+ function pe(s) {
2972
3088
  b.set(s.clientX, s.clientY);
2973
3089
  }
2974
3090
  function p(s) {
2975
- Pe(s.clientX, s.clientX), B.set(s.clientX, s.clientY);
3091
+ Ae(s.clientX, s.clientX), F.set(s.clientX, s.clientY);
2976
3092
  }
2977
- function m(s) {
2978
- D.set(s.clientX, s.clientY);
3093
+ function v(s) {
3094
+ R.set(s.clientX, s.clientY);
2979
3095
  }
2980
- function w(s) {
2981
- E.set(s.clientX, s.clientY), S.subVectors(E, b).multiplyScalar(e.rotateSpeed);
3096
+ function O(s) {
3097
+ E.set(s.clientX, s.clientY), x.subVectors(E, b).multiplyScalar(e.rotateSpeed);
2982
3098
  const y = e.domElement;
2983
- me(2 * Math.PI * S.x / y.clientHeight), te(2 * Math.PI * S.y / y.clientHeight), b.copy(E), e.update();
3099
+ ge(2 * Math.PI * x.x / y.clientHeight), ie(2 * Math.PI * x.y / y.clientHeight), b.copy(E), e.update();
2984
3100
  }
2985
- function R(s) {
2986
- M.set(s.clientX, s.clientY), z.subVectors(M, B), z.y > 0 ? K(Oe(z.y)) : z.y < 0 && pe(Oe(z.y)), B.copy(M), e.update();
3101
+ function A(s) {
3102
+ M.set(s.clientX, s.clientY), w.subVectors(M, F), w.y > 0 ? Z(Me(w.y)) : w.y < 0 && ve(Me(w.y)), F.copy(M), e.update();
2987
3103
  }
2988
3104
  function G(s) {
2989
- I.set(s.clientX, s.clientY), q.subVectors(I, D).multiplyScalar(e.panSpeed), ge(q.x, q.y), D.copy(I), e.update();
3105
+ P.set(s.clientX, s.clientY), Y.subVectors(P, R).multiplyScalar(e.panSpeed), ye(Y.x, Y.y), R.copy(P), e.update();
2990
3106
  }
2991
- function V(s) {
2992
- Pe(s.clientX, s.clientY), s.deltaY < 0 ? pe(Oe(s.deltaY)) : s.deltaY > 0 && K(Oe(s.deltaY)), e.update();
3107
+ function H(s) {
3108
+ Ae(s.clientX, s.clientY), s.deltaY < 0 ? ve(Me(s.deltaY)) : s.deltaY > 0 && Z(Me(s.deltaY)), e.update();
2993
3109
  }
2994
- function ae(s) {
3110
+ function se(s) {
2995
3111
  let y = !1;
2996
3112
  switch (s.code) {
2997
3113
  case e.keys.UP:
2998
- s.ctrlKey || s.metaKey || s.shiftKey ? te(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ge(0, e.keyPanSpeed), y = !0;
3114
+ s.ctrlKey || s.metaKey || s.shiftKey ? ie(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ye(0, e.keyPanSpeed), y = !0;
2999
3115
  break;
3000
3116
  case e.keys.BOTTOM:
3001
- s.ctrlKey || s.metaKey || s.shiftKey ? te(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ge(0, -e.keyPanSpeed), y = !0;
3117
+ s.ctrlKey || s.metaKey || s.shiftKey ? ie(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ye(0, -e.keyPanSpeed), y = !0;
3002
3118
  break;
3003
3119
  case e.keys.LEFT:
3004
- s.ctrlKey || s.metaKey || s.shiftKey ? me(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ge(e.keyPanSpeed, 0), y = !0;
3120
+ s.ctrlKey || s.metaKey || s.shiftKey ? ge(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ye(e.keyPanSpeed, 0), y = !0;
3005
3121
  break;
3006
3122
  case e.keys.RIGHT:
3007
- s.ctrlKey || s.metaKey || s.shiftKey ? me(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ge(-e.keyPanSpeed, 0), y = !0;
3123
+ s.ctrlKey || s.metaKey || s.shiftKey ? ge(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ye(-e.keyPanSpeed, 0), y = !0;
3008
3124
  break;
3009
3125
  }
3010
3126
  y && (s.preventDefault(), e.update());
3011
3127
  }
3012
- function U(s) {
3013
- if (Q.length === 1)
3128
+ function z(s) {
3129
+ if (W.length === 1)
3014
3130
  b.set(s.pageX, s.pageY);
3015
3131
  else {
3016
- const y = De(s), O = 0.5 * (s.pageX + y.x), N = 0.5 * (s.pageY + y.y);
3017
- b.set(O, N);
3132
+ const y = De(s), T = 0.5 * (s.pageX + y.x), L = 0.5 * (s.pageY + y.y);
3133
+ b.set(T, L);
3018
3134
  }
3019
3135
  }
3020
- function X(s) {
3021
- if (Q.length === 1)
3022
- D.set(s.pageX, s.pageY);
3136
+ function J(s) {
3137
+ if (W.length === 1)
3138
+ R.set(s.pageX, s.pageY);
3023
3139
  else {
3024
- const y = De(s), O = 0.5 * (s.pageX + y.x), N = 0.5 * (s.pageY + y.y);
3025
- D.set(O, N);
3140
+ const y = De(s), T = 0.5 * (s.pageX + y.x), L = 0.5 * (s.pageY + y.y);
3141
+ R.set(T, L);
3026
3142
  }
3027
3143
  }
3028
- function ie(s) {
3029
- const y = De(s), O = s.pageX - y.x, N = s.pageY - y.y, H = Math.sqrt(O * O + N * N);
3030
- B.set(0, H);
3144
+ function oe(s) {
3145
+ const y = De(s), T = s.pageX - y.x, L = s.pageY - y.y, q = Math.sqrt(T * T + L * L);
3146
+ F.set(0, q);
3031
3147
  }
3032
- function _(s) {
3033
- e.enableZoom && ie(s), e.enablePan && X(s);
3148
+ function k(s) {
3149
+ e.enableZoom && oe(s), e.enablePan && J(s);
3034
3150
  }
3035
- function F(s) {
3036
- e.enableZoom && ie(s), e.enableRotate && U(s);
3151
+ function U(s) {
3152
+ e.enableZoom && oe(s), e.enableRotate && z(s);
3037
3153
  }
3038
- function ne(s) {
3039
- if (Q.length == 1)
3154
+ function re(s) {
3155
+ if (W.length == 1)
3040
3156
  E.set(s.pageX, s.pageY);
3041
3157
  else {
3042
- const O = De(s), N = 0.5 * (s.pageX + O.x), H = 0.5 * (s.pageY + O.y);
3043
- E.set(N, H);
3158
+ const T = De(s), L = 0.5 * (s.pageX + T.x), q = 0.5 * (s.pageY + T.y);
3159
+ E.set(L, q);
3044
3160
  }
3045
- S.subVectors(E, b).multiplyScalar(e.rotateSpeed);
3161
+ x.subVectors(E, b).multiplyScalar(e.rotateSpeed);
3046
3162
  const y = e.domElement;
3047
- me(2 * Math.PI * S.x / y.clientHeight), te(2 * Math.PI * S.y / y.clientHeight), b.copy(E);
3163
+ ge(2 * Math.PI * x.x / y.clientHeight), ie(2 * Math.PI * x.y / y.clientHeight), b.copy(E);
3048
3164
  }
3049
- function Ce(s) {
3050
- if (Q.length === 1)
3051
- I.set(s.pageX, s.pageY);
3165
+ function we(s) {
3166
+ if (W.length === 1)
3167
+ P.set(s.pageX, s.pageY);
3052
3168
  else {
3053
- const y = De(s), O = 0.5 * (s.pageX + y.x), N = 0.5 * (s.pageY + y.y);
3054
- I.set(O, N);
3169
+ const y = De(s), T = 0.5 * (s.pageX + y.x), L = 0.5 * (s.pageY + y.y);
3170
+ P.set(T, L);
3055
3171
  }
3056
- q.subVectors(I, D).multiplyScalar(e.panSpeed), ge(q.x, q.y), D.copy(I);
3172
+ Y.subVectors(P, R).multiplyScalar(e.panSpeed), ye(Y.x, Y.y), R.copy(P);
3057
3173
  }
3058
- function Me(s) {
3059
- const y = De(s), O = s.pageX - y.x, N = s.pageY - y.y, H = Math.sqrt(O * O + N * N);
3060
- M.set(0, H), z.set(0, Math.pow(M.y / B.y, e.zoomSpeed)), K(z.y), B.copy(M);
3061
- const be = (s.pageX + y.x) * 0.5, le = (s.pageY + y.y) * 0.5;
3062
- Pe(be, le);
3174
+ function Te(s) {
3175
+ const y = De(s), T = s.pageX - y.x, L = s.pageY - y.y, q = Math.sqrt(T * T + L * L);
3176
+ M.set(0, q), w.set(0, Math.pow(M.y / F.y, e.zoomSpeed)), Z(w.y), F.copy(M);
3177
+ const Ee = (s.pageX + y.x) * 0.5, ue = (s.pageY + y.y) * 0.5;
3178
+ Ae(Ee, ue);
3063
3179
  }
3064
- function dt(s) {
3065
- e.enableZoom && Me(s), e.enablePan && Ce(s);
3180
+ function ht(s) {
3181
+ e.enableZoom && Te(s), e.enablePan && we(s);
3066
3182
  }
3067
- function ut(s) {
3068
- e.enableZoom && Me(s), e.enableRotate && ne(s);
3183
+ function ft(s) {
3184
+ e.enableZoom && Te(s), e.enableRotate && re(s);
3069
3185
  }
3070
- function Be(s) {
3071
- e.enabled !== !1 && (Q.length === 0 && (e.domElement.setPointerCapture(s.pointerId), e.domElement.addEventListener("pointermove", et), e.domElement.addEventListener("pointerup", Ue)), wt(s), s.pointerType === "touch" ? at(s) : tt(s));
3186
+ function Ue(s) {
3187
+ e.enabled !== !1 && (W.length === 0 && (e.domElement.setPointerCapture(s.pointerId), e.domElement.addEventListener("pointermove", tt), e.domElement.addEventListener("pointerup", $e)), Mt(s), s.pointerType === "touch" ? it(s) : nt(s));
3072
3188
  }
3073
- function et(s) {
3074
- e.enabled !== !1 && (s.pointerType === "touch" ? mt(s) : xt(s));
3189
+ function tt(s) {
3190
+ e.enabled !== !1 && (s.pointerType === "touch" ? gt(s) : Ot(s));
3075
3191
  }
3076
- function Ue(s) {
3077
- switch (Ot(s), Q.length) {
3192
+ function $e(s) {
3193
+ switch (Tt(s), W.length) {
3078
3194
  case 0:
3079
- e.domElement.releasePointerCapture(s.pointerId), e.domElement.removeEventListener("pointermove", et), e.domElement.removeEventListener("pointerup", Ue), e.dispatchEvent(Zt), o = i.NONE;
3195
+ e.domElement.releasePointerCapture(s.pointerId), e.domElement.removeEventListener("pointermove", tt), e.domElement.removeEventListener("pointerup", $e), e.dispatchEvent(en), o = i.NONE;
3080
3196
  break;
3081
3197
  case 1:
3082
- const y = Q[0], O = x[y];
3083
- at({ pointerId: y, pageX: O.x, pageY: O.y });
3198
+ const y = W[0], T = C[y];
3199
+ it({ pointerId: y, pageX: T.x, pageY: T.y });
3084
3200
  break;
3085
3201
  }
3086
3202
  }
3087
- function tt(s) {
3203
+ function nt(s) {
3088
3204
  let y;
3089
3205
  switch (s.button) {
3090
3206
  case 0:
@@ -3109,40 +3225,40 @@ class Xa extends en {
3109
3225
  if (s.ctrlKey || s.metaKey || s.shiftKey) {
3110
3226
  if (e.enablePan === !1)
3111
3227
  return;
3112
- m(s), o = i.PAN;
3228
+ v(s), o = i.PAN;
3113
3229
  } else {
3114
3230
  if (e.enableRotate === !1)
3115
3231
  return;
3116
- he(s), o = i.ROTATE;
3232
+ pe(s), o = i.ROTATE;
3117
3233
  }
3118
3234
  break;
3119
3235
  case Xe.PAN:
3120
3236
  if (s.ctrlKey || s.metaKey || s.shiftKey) {
3121
3237
  if (e.enableRotate === !1)
3122
3238
  return;
3123
- he(s), o = i.ROTATE;
3239
+ pe(s), o = i.ROTATE;
3124
3240
  } else {
3125
3241
  if (e.enablePan === !1)
3126
3242
  return;
3127
- m(s), o = i.PAN;
3243
+ v(s), o = i.PAN;
3128
3244
  }
3129
3245
  break;
3130
3246
  default:
3131
3247
  o = i.NONE;
3132
3248
  }
3133
- o !== i.NONE && e.dispatchEvent(kt);
3249
+ o !== i.NONE && e.dispatchEvent(jt);
3134
3250
  }
3135
- function xt(s) {
3251
+ function Ot(s) {
3136
3252
  switch (o) {
3137
3253
  case i.ROTATE:
3138
3254
  if (e.enableRotate === !1)
3139
3255
  return;
3140
- w(s);
3256
+ O(s);
3141
3257
  break;
3142
3258
  case i.DOLLY:
3143
3259
  if (e.enableZoom === !1)
3144
3260
  return;
3145
- R(s);
3261
+ A(s);
3146
3262
  break;
3147
3263
  case i.PAN:
3148
3264
  if (e.enablePan === !1)
@@ -3151,47 +3267,47 @@ class Xa extends en {
3151
3267
  break;
3152
3268
  }
3153
3269
  }
3154
- function ht(s) {
3155
- e.enabled === !1 || e.enableZoom === !1 || o !== i.NONE || (s.preventDefault(), e.dispatchEvent(kt), V(ft(s)), e.dispatchEvent(Zt));
3270
+ function pt(s) {
3271
+ e.enabled === !1 || e.enableZoom === !1 || o !== i.NONE || (s.preventDefault(), e.dispatchEvent(jt), H(mt(s)), e.dispatchEvent(en));
3156
3272
  }
3157
- function ft(s) {
3158
- const y = s.deltaMode, O = {
3273
+ function mt(s) {
3274
+ const y = s.deltaMode, T = {
3159
3275
  clientX: s.clientX,
3160
3276
  clientY: s.clientY,
3161
3277
  deltaY: s.deltaY
3162
3278
  };
3163
3279
  switch (y) {
3164
3280
  case 1:
3165
- O.deltaY *= 16;
3281
+ T.deltaY *= 16;
3166
3282
  break;
3167
3283
  case 2:
3168
- O.deltaY *= 100;
3284
+ T.deltaY *= 100;
3169
3285
  break;
3170
3286
  }
3171
- return s.ctrlKey && !Ae && (O.deltaY *= 10), O;
3287
+ return s.ctrlKey && !Pe && (T.deltaY *= 10), T;
3172
3288
  }
3173
- function pt(s) {
3174
- s.key === "Control" && (Ae = !0, e.domElement.getRootNode().addEventListener("keyup", je, { passive: !0, capture: !0 }));
3289
+ function vt(s) {
3290
+ s.key === "Control" && (Pe = !0, e.domElement.getRootNode().addEventListener("keyup", je, { passive: !0, capture: !0 }));
3175
3291
  }
3176
3292
  function je(s) {
3177
- s.key === "Control" && (Ae = !1, e.domElement.getRootNode().removeEventListener("keyup", je, { passive: !0, capture: !0 }));
3178
- }
3179
- function nt(s) {
3180
- e.enabled === !1 || e.enablePan === !1 || ae(s);
3293
+ s.key === "Control" && (Pe = !1, e.domElement.getRootNode().removeEventListener("keyup", je, { passive: !0, capture: !0 }));
3181
3294
  }
3182
3295
  function at(s) {
3183
- switch (vt(s), Q.length) {
3296
+ e.enabled === !1 || e.enablePan === !1 || se(s);
3297
+ }
3298
+ function it(s) {
3299
+ switch (bt(s), W.length) {
3184
3300
  case 1:
3185
3301
  switch (e.touches.ONE) {
3186
3302
  case Ze.ROTATE:
3187
3303
  if (e.enableRotate === !1)
3188
3304
  return;
3189
- U(s), o = i.TOUCH_ROTATE;
3305
+ z(s), o = i.TOUCH_ROTATE;
3190
3306
  break;
3191
3307
  case Ze.PAN:
3192
3308
  if (e.enablePan === !1)
3193
3309
  return;
3194
- X(s), o = i.TOUCH_PAN;
3310
+ J(s), o = i.TOUCH_PAN;
3195
3311
  break;
3196
3312
  default:
3197
3313
  o = i.NONE;
@@ -3202,12 +3318,12 @@ class Xa extends en {
3202
3318
  case Ze.DOLLY_PAN:
3203
3319
  if (e.enableZoom === !1 && e.enablePan === !1)
3204
3320
  return;
3205
- _(s), o = i.TOUCH_DOLLY_PAN;
3321
+ k(s), o = i.TOUCH_DOLLY_PAN;
3206
3322
  break;
3207
3323
  case Ze.DOLLY_ROTATE:
3208
3324
  if (e.enableZoom === !1 && e.enableRotate === !1)
3209
3325
  return;
3210
- F(s), o = i.TOUCH_DOLLY_ROTATE;
3326
+ U(s), o = i.TOUCH_DOLLY_ROTATE;
3211
3327
  break;
3212
3328
  default:
3213
3329
  o = i.NONE;
@@ -3216,29 +3332,29 @@ class Xa extends en {
3216
3332
  default:
3217
3333
  o = i.NONE;
3218
3334
  }
3219
- o !== i.NONE && e.dispatchEvent(kt);
3335
+ o !== i.NONE && e.dispatchEvent(jt);
3220
3336
  }
3221
- function mt(s) {
3222
- switch (vt(s), o) {
3337
+ function gt(s) {
3338
+ switch (bt(s), o) {
3223
3339
  case i.TOUCH_ROTATE:
3224
3340
  if (e.enableRotate === !1)
3225
3341
  return;
3226
- ne(s), e.update();
3342
+ re(s), e.update();
3227
3343
  break;
3228
3344
  case i.TOUCH_PAN:
3229
3345
  if (e.enablePan === !1)
3230
3346
  return;
3231
- Ce(s), e.update();
3347
+ we(s), e.update();
3232
3348
  break;
3233
3349
  case i.TOUCH_DOLLY_PAN:
3234
3350
  if (e.enableZoom === !1 && e.enablePan === !1)
3235
3351
  return;
3236
- dt(s), e.update();
3352
+ ht(s), e.update();
3237
3353
  break;
3238
3354
  case i.TOUCH_DOLLY_ROTATE:
3239
3355
  if (e.enableZoom === !1 && e.enableRotate === !1)
3240
3356
  return;
3241
- ut(s), e.update();
3357
+ ft(s), e.update();
3242
3358
  break;
3243
3359
  default:
3244
3360
  o = i.NONE;
@@ -3247,30 +3363,30 @@ class Xa extends en {
3247
3363
  function qe(s) {
3248
3364
  e.enabled !== !1 && s.preventDefault();
3249
3365
  }
3250
- function wt(s) {
3251
- Q.push(s.pointerId);
3366
+ function Mt(s) {
3367
+ W.push(s.pointerId);
3252
3368
  }
3253
- function Ot(s) {
3254
- delete x[s.pointerId];
3255
- for (let y = 0; y < Q.length; y++)
3256
- if (Q[y] == s.pointerId) {
3257
- Q.splice(y, 1);
3369
+ function Tt(s) {
3370
+ delete C[s.pointerId];
3371
+ for (let y = 0; y < W.length; y++)
3372
+ if (W[y] == s.pointerId) {
3373
+ W.splice(y, 1);
3258
3374
  return;
3259
3375
  }
3260
3376
  }
3261
- function vt(s) {
3262
- let y = x[s.pointerId];
3263
- y === void 0 && (y = new fe(), x[s.pointerId] = y), y.set(s.pageX, s.pageY);
3377
+ function bt(s) {
3378
+ let y = C[s.pointerId];
3379
+ y === void 0 && (y = new me(), C[s.pointerId] = y), y.set(s.pageX, s.pageY);
3264
3380
  }
3265
3381
  function De(s) {
3266
- const y = s.pointerId === Q[0] ? Q[1] : Q[0];
3267
- return x[y];
3382
+ const y = s.pointerId === W[0] ? W[1] : W[0];
3383
+ return C[y];
3268
3384
  }
3269
- e.domElement.addEventListener("contextmenu", qe), e.domElement.addEventListener("pointerdown", Be), e.domElement.addEventListener("pointercancel", Ue), e.domElement.addEventListener("wheel", ht, { passive: !1 }), e.domElement.getRootNode().addEventListener("keydown", pt, { passive: !0, capture: !0 }), this.update();
3385
+ e.domElement.addEventListener("contextmenu", qe), e.domElement.addEventListener("pointerdown", Ue), e.domElement.addEventListener("pointercancel", $e), e.domElement.addEventListener("wheel", pt, { passive: !1 }), e.domElement.getRootNode().addEventListener("keydown", vt, { passive: !0, capture: !0 }), this.update();
3270
3386
  }
3271
3387
  }
3272
- const Et = (t) => {
3273
- const [n, a] = oe(t.options[t.index]), e = () => {
3388
+ const Ct = (t) => {
3389
+ const [n, a] = ne(t.options[t.index]), e = () => {
3274
3390
  t.onToggle(!t.open);
3275
3391
  }, i = (o) => {
3276
3392
  o !== n && (t.onSelect(o), a(o)), t.onToggle(!1);
@@ -3279,14 +3395,14 @@ const Et = (t) => {
3279
3395
  /* @__PURE__ */ l.jsx("div", { className: "dropdown-toggle", onClick: e, children: n }),
3280
3396
  t.open && /* @__PURE__ */ l.jsx("ul", { className: "dropdown-menu", children: t.options.map((o) => /* @__PURE__ */ l.jsx("li", { onClick: () => i(o), children: o }, o)) })
3281
3397
  ] });
3282
- }, He = ua(function(n, a) {
3283
- const [e, i] = oe(!1), o = n.options.indexOf(n.camera.name);
3398
+ }, He = pa(function(n, a) {
3399
+ const [e, i] = ne(!1), o = n.options.indexOf(n.camera.name);
3284
3400
  return /* @__PURE__ */ l.jsxs("div", { className: "CameraWindow", children: [
3285
3401
  /* @__PURE__ */ l.jsx("div", { ref: a, className: "clickable", onClick: () => {
3286
3402
  e && i(!1);
3287
3403
  } }),
3288
3404
  /* @__PURE__ */ l.jsx(
3289
- Et,
3405
+ Ct,
3290
3406
  {
3291
3407
  index: o,
3292
3408
  open: e,
@@ -3300,14 +3416,14 @@ const Et = (t) => {
3300
3416
  )
3301
3417
  ] });
3302
3418
  });
3303
- class Za extends bn {
3419
+ class ti extends xn {
3304
3420
  constructor(n) {
3305
3421
  super({
3306
3422
  extensions: {
3307
3423
  derivatives: !0
3308
3424
  },
3309
- glslVersion: Jn,
3310
- side: nn,
3425
+ glslVersion: ta,
3426
+ side: sn,
3311
3427
  transparent: !0,
3312
3428
  uniforms: {
3313
3429
  uScale: {
@@ -3412,17 +3528,17 @@ class Za extends bn {
3412
3528
  });
3413
3529
  }
3414
3530
  }
3415
- class Ja extends Qn {
3531
+ class ni extends na {
3416
3532
  gridMaterial;
3417
3533
  constructor() {
3418
- const n = new Za();
3419
- super(new ea(2, 2), n), this.gridMaterial = n, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
3534
+ const n = new ti();
3535
+ super(new aa(2, 2), n), this.gridMaterial = n, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
3420
3536
  }
3421
3537
  update() {
3422
3538
  this.gridMaterial.needsUpdate = !0;
3423
3539
  }
3424
3540
  }
3425
- const Qa = `#include <common>
3541
+ const ai = `#include <common>
3426
3542
  #include <batching_pars_vertex>
3427
3543
  #include <uv_pars_vertex>
3428
3544
  #include <color_pars_vertex>
@@ -3452,7 +3568,7 @@ void main() {
3452
3568
  #include <logdepthbuf_vertex>
3453
3569
  #include <clipping_planes_vertex>
3454
3570
  #include <worldpos_vertex>
3455
- }`, ei = `
3571
+ }`, ii = `
3456
3572
  #include <common>
3457
3573
  #include <uv_pars_fragment>
3458
3574
  #include <clipping_planes_pars_fragment>
@@ -3461,51 +3577,51 @@ void main() {
3461
3577
  #include <clipping_planes_fragment>
3462
3578
  gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
3463
3579
  }`;
3464
- class ti extends bn {
3580
+ class ri extends xn {
3465
3581
  constructor() {
3466
3582
  super({
3467
3583
  defines: {
3468
3584
  USE_UV: ""
3469
3585
  },
3470
- vertexShader: Qa,
3471
- fragmentShader: ei
3586
+ vertexShader: ai,
3587
+ fragmentShader: ii
3472
3588
  });
3473
3589
  }
3474
3590
  }
3475
- let bt = "Renderer", Ie, yt = !1, Qt = !1, $, se, Ne, Le;
3476
- function bi(t) {
3477
- const n = Se(() => /* @__PURE__ */ new Map(), []), a = Se(() => /* @__PURE__ */ new Map(), []), e = Se(() => /* @__PURE__ */ new Map(), []), i = Se(() => new ta(), []), o = Se(() => new na(), []), h = Se(() => new Ja(), []), c = Se(() => new Yt(500), []), d = Se(() => new Yt(100), []), u = Se(() => new aa(), []), v = Se(() => new ia(), []), b = Se(() => new ti(), []), E = Se(() => new ra({
3591
+ let Et = "Renderer", Ne, xt = !1, nn = !1, V, le, Le, Fe;
3592
+ function xi(t) {
3593
+ const n = Se(() => /* @__PURE__ */ new Map(), []), a = Se(() => /* @__PURE__ */ new Map(), []), e = Se(() => /* @__PURE__ */ new Map(), []), i = Se(() => new ia(), []), o = Se(() => new ra(), []), h = Se(() => new ni(), []), c = Se(() => new Vt(500), []), d = Se(() => new Vt(100), []), u = Se(() => new sa(), []), m = Se(() => new oa(), []), b = Se(() => new ri(), []), E = Se(() => new ca({
3478
3594
  opacity: 0.33,
3479
3595
  transparent: !0,
3480
3596
  wireframe: !0
3481
3597
  }), []);
3482
- function S(p, m) {
3483
- const w = new Gt(-100, 100, 100, -100, 50, 3e3);
3484
- return w.name = p, w.position.copy(m), w.lookAt(0, 0, 0), n.set(p, w), w;
3598
+ function x(p, v) {
3599
+ const O = new Gt(-100, 100, 100, -100, 50, 3e3);
3600
+ return O.name = p, O.position.copy(v), O.lookAt(0, 0, 0), n.set(p, O), O;
3485
3601
  }
3486
- const D = [
3602
+ const R = [
3487
3603
  "Renderer",
3488
3604
  "Depth",
3489
3605
  "Normals",
3490
3606
  "UVs",
3491
3607
  "Wireframe"
3492
- ], I = [
3608
+ ], P = [
3493
3609
  "Single",
3494
3610
  "Side by Side",
3495
3611
  "Stacked",
3496
3612
  "Quad"
3497
3613
  ];
3498
- _e(() => {
3499
- i.name = "Debug Scene", o.name = "helpers", i.add(o), o.add(h), c.name = "axisHelper", o.add(c), d.name = "interactionHelper", o.add(d), d.visible = !1, S("Top", new W(0, 1e3, 0)), S("Bottom", new W(0, -1e3, 0)), S("Left", new W(-1e3, 0, 0)), S("Right", new W(1e3, 0, 0)), S("Front", new W(0, 0, 1e3)), S("Back", new W(0, 0, -1e3)), S("Orthographic", new W(1e3, 1e3, 1e3));
3500
- const p = new Rt(60, 1, 50, 3e3);
3501
- p.name = "Debug", p.position.set(500, 500, 500), p.lookAt(0, 0, 0), n.set("Debug", p), $ = n.get("Debug"), se = n.get("Orthographic"), Ne = n.get("Front"), Le = n.get("Top");
3614
+ Re(() => {
3615
+ i.name = "Debug Scene", o.name = "helpers", i.add(o), o.add(h), c.name = "axisHelper", o.add(c), d.name = "interactionHelper", o.add(d), d.visible = !1, x("Top", new K(0, 1e3, 0)), x("Bottom", new K(0, -1e3, 0)), x("Left", new K(-1e3, 0, 0)), x("Right", new K(1e3, 0, 0)), x("Front", new K(0, 0, 1e3)), x("Back", new K(0, 0, -1e3)), x("Orthographic", new K(1e3, 1e3, 1e3));
3616
+ const p = new Pt(60, 1, 50, 3e3);
3617
+ p.name = "Debug", p.position.set(500, 500, 500), p.lookAt(0, 0, 0), n.set("Debug", p), V = n.get("Debug"), le = n.get("Orthographic"), Le = n.get("Front"), Fe = n.get("Top");
3502
3618
  }, []);
3503
- const q = Re(null), B = Re(null), M = Re(null), z = Re(null), we = Re(null), ce = Re(null), [Y, Q] = oe(t.mode !== void 0 ? t.mode : "Single"), [x, Ae] = oe(null), [Fe, Oe] = oe(!1), [me, te] = oe(!1), [ue, ve] = oe(!1), [, ge] = oe(Date.now()), K = (p, m) => {
3504
- const w = a.get(p.name);
3505
- w !== void 0 && w.dispose(), a.delete(p.name);
3506
- const R = e.get(p.name);
3507
- R !== void 0 && (i.remove(R), R.dispose()), e.delete(p.name);
3508
- const G = new Xa(p, m);
3619
+ const Y = he(null), F = he(null), M = he(null), w = he(null), ae = he(null), X = he(null), [$, W] = ne(t.mode !== void 0 ? t.mode : "Single"), [C, Pe] = ne(null), [Be, Me] = ne(!1), [ge, ie] = ne(!1), [fe, be] = ne(!1), [, ye] = ne(Date.now()), Z = (p, v) => {
3620
+ const O = a.get(p.name);
3621
+ O !== void 0 && O.dispose(), a.delete(p.name);
3622
+ const A = e.get(p.name);
3623
+ A !== void 0 && (i.remove(A), A.dispose()), e.delete(p.name);
3624
+ const G = new ei(p, v);
3509
3625
  switch (G.enableDamping = !0, G.dampingFactor = 0.05, p.name) {
3510
3626
  case "Top":
3511
3627
  case "Bottom":
@@ -3516,244 +3632,244 @@ function bi(t) {
3516
3632
  G.enableRotate = !1;
3517
3633
  break;
3518
3634
  }
3519
- if (a.set(p.name, G), p instanceof Rt) {
3520
- const V = new ca(p);
3521
- e.set(p.name, V), i.add(V);
3522
- }
3523
- }, pe = (p) => {
3524
- const m = e.get(p.name);
3525
- m !== void 0 && (i.remove(m), m.dispose(), e.delete(p.name));
3526
- const w = a.get(p.name);
3527
- w !== void 0 && (w.dispose(), a.delete(p.name));
3528
- }, Pe = () => {
3529
- a.forEach((p, m) => {
3635
+ if (a.set(p.name, G), p instanceof Pt) {
3636
+ const H = new da(p);
3637
+ e.set(p.name, H), i.add(H);
3638
+ }
3639
+ }, ve = (p) => {
3640
+ const v = e.get(p.name);
3641
+ v !== void 0 && (i.remove(v), v.dispose(), e.delete(p.name));
3642
+ const O = a.get(p.name);
3643
+ O !== void 0 && (O.dispose(), a.delete(p.name));
3644
+ }, Ae = () => {
3645
+ a.forEach((p, v) => {
3530
3646
  p.dispose();
3531
- const w = e.get(m);
3532
- w !== void 0 && (i.remove(w), w.dispose()), e.delete(m), a.delete(m);
3647
+ const O = e.get(v);
3648
+ O !== void 0 && (i.remove(O), O.dispose()), e.delete(v), a.delete(v);
3533
3649
  }), a.clear(), e.clear();
3534
3650
  }, ke = () => {
3535
- switch (Y) {
3651
+ switch ($) {
3536
3652
  case "Single":
3537
- K($, M.current);
3653
+ Z(V, M.current);
3538
3654
  break;
3539
3655
  case "Side by Side":
3540
3656
  case "Stacked":
3541
- K($, M.current), K(se, z.current);
3657
+ Z(V, M.current), Z(le, w.current);
3542
3658
  break;
3543
3659
  case "Quad":
3544
- K($, M.current), K(se, z.current), K(Ne, we.current), K(Le, ce.current);
3660
+ Z(V, M.current), Z(le, w.current), Z(Le, ae.current), Z(Fe, X.current);
3545
3661
  break;
3546
3662
  }
3547
3663
  };
3548
- _e(() => {
3549
- const p = new sa({
3550
- canvas: q.current,
3664
+ Re(() => {
3665
+ const p = new la({
3666
+ canvas: Y.current,
3551
3667
  stencil: !1
3552
3668
  });
3553
- p.autoClear = !1, p.shadowMap.enabled = !0, p.setPixelRatio(devicePixelRatio), p.setClearColor(0), t.three.renderer = p, Ae(p);
3554
- }, []), _e(() => {
3555
- const p = (R) => {
3556
- xn(Ie), i.remove(Ie);
3557
- const G = t.scenes.get(R.value.name);
3669
+ p.autoClear = !1, p.shadowMap.enabled = !0, p.setPixelRatio(devicePixelRatio), p.setClearColor(0), t.three.renderer = p, Pe(p);
3670
+ }, []), Re(() => {
3671
+ const p = (A) => {
3672
+ Mn(Ne), i.remove(Ne);
3673
+ const G = t.scenes.get(A.value.name);
3558
3674
  if (G !== void 0) {
3559
- const V = new G();
3560
- t.onSceneSet !== void 0 && t.onSceneSet(V), Ie = V, t.three.scene = Ie, i.add(Ie), Qt = !0;
3561
- }
3562
- }, m = (R) => {
3563
- const G = R.value, V = t.three.scene?.getObjectByProperty("uuid", G.uuid);
3564
- V !== void 0 && n.set(G.name, V), ge(Date.now());
3565
- }, w = (R) => {
3566
- n.delete(R.value.name), ge(Date.now());
3675
+ const H = new G();
3676
+ t.onSceneSet !== void 0 && t.onSceneSet(H), Ne = H, t.three.scene = Ne, i.add(Ne), nn = !0;
3677
+ }
3678
+ }, v = (A) => {
3679
+ const G = A.value, H = t.three.scene?.getObjectByProperty("uuid", G.uuid);
3680
+ H !== void 0 && n.set(G.name, H), ye(Date.now());
3681
+ }, O = (A) => {
3682
+ n.delete(A.value.name), ye(Date.now());
3567
3683
  };
3568
- return P.addEventListener(k.SET_SCENE, p), P.addEventListener(k.ADD_CAMERA, m), P.addEventListener(k.REMOVE_CAMERA, w), () => {
3569
- P.removeEventListener(k.SET_SCENE, p), P.removeEventListener(k.ADD_CAMERA, m), P.removeEventListener(k.REMOVE_CAMERA, w);
3684
+ return D.addEventListener(I.SET_SCENE, p), D.addEventListener(I.ADD_CAMERA, v), D.addEventListener(I.REMOVE_CAMERA, O), () => {
3685
+ D.removeEventListener(I.SET_SCENE, p), D.removeEventListener(I.ADD_CAMERA, v), D.removeEventListener(I.REMOVE_CAMERA, O);
3570
3686
  };
3571
- }, []), _e(() => {
3572
- if (x === null)
3687
+ }, []), Re(() => {
3688
+ if (C === null)
3573
3689
  return;
3574
- let p = window.innerWidth, m = window.innerHeight, w = Math.floor(p / 2), R = Math.floor(m / 2), G = -1;
3575
- const V = () => {
3576
- p = window.innerWidth - 300, m = window.innerHeight, w = Math.floor(p / 2), R = Math.floor(m / 2), x.setSize(p, m);
3577
- let _ = p, F = m;
3578
- switch (Y) {
3690
+ let p = window.innerWidth, v = window.innerHeight, O = Math.floor(p / 2), A = Math.floor(v / 2), G = -1;
3691
+ const H = () => {
3692
+ p = window.innerWidth - 300, v = window.innerHeight, O = Math.floor(p / 2), A = Math.floor(v / 2), C.setSize(p, v);
3693
+ let k = p, U = v;
3694
+ switch ($) {
3579
3695
  case "Side by Side":
3580
- _ = w, F = m;
3696
+ k = O, U = v;
3581
3697
  break;
3582
3698
  case "Stacked":
3583
- _ = p, F = R;
3699
+ k = p, U = A;
3584
3700
  break;
3585
3701
  case "Quad":
3586
- _ = w, F = R;
3702
+ k = O, U = A;
3587
3703
  break;
3588
3704
  }
3589
- n.forEach((ne) => {
3590
- ne instanceof Gt ? (ne.left = _ / -2, ne.right = _ / 2, ne.top = F / 2, ne.bottom = F / -2, ne.updateProjectionMatrix()) : ne instanceof Rt && (ne.aspect = _ / F, ne.updateProjectionMatrix(), e.get(ne.name)?.update());
3705
+ n.forEach((re) => {
3706
+ re instanceof Gt ? (re.left = k / -2, re.right = k / 2, re.top = U / 2, re.bottom = U / -2, re.updateProjectionMatrix()) : re instanceof Pt && (re.aspect = k / U, re.updateProjectionMatrix(), e.get(re.name)?.update());
3591
3707
  });
3592
- }, ae = () => {
3593
- x.setViewport(0, 0, p, m), x.setScissor(0, 0, p, m), x.render(i, $);
3594
- }, U = () => {
3595
- if (Y === "Side by Side")
3596
- x.setViewport(0, 0, w, m), x.setScissor(0, 0, w, m), x.render(i, $), x.setViewport(w, 0, w, m), x.setScissor(w, 0, w, m), x.render(i, se);
3708
+ }, se = () => {
3709
+ C.setViewport(0, 0, p, v), C.setScissor(0, 0, p, v), C.render(i, V);
3710
+ }, z = () => {
3711
+ if ($ === "Side by Side")
3712
+ C.setViewport(0, 0, O, v), C.setScissor(0, 0, O, v), C.render(i, V), C.setViewport(O, 0, O, v), C.setScissor(O, 0, O, v), C.render(i, le);
3597
3713
  else {
3598
- const _ = m - R;
3599
- x.setViewport(0, _, p, R), x.setScissor(0, _, p, R), x.render(i, $), x.setViewport(0, 0, p, R), x.setScissor(0, 0, p, R), x.render(i, se);
3600
- }
3601
- }, X = () => {
3602
- let _ = 0, F = 0;
3603
- F = m - R, _ = 0, x.setViewport(_, F, w, R), x.setScissor(_, F, w, R), x.render(i, $), _ = w, x.setViewport(_, F, w, R), x.setScissor(_, F, w, R), x.render(i, se), F = 0, _ = 0, x.setViewport(_, F, w, R), x.setScissor(_, F, w, R), x.render(i, Ne), _ = w, x.setViewport(_, F, w, R), x.setScissor(_, F, w, R), x.render(i, Le);
3604
- }, ie = () => {
3605
- switch (a.forEach((_) => {
3606
- _.update();
3607
- }), t.onSceneUpdate !== void 0 && Qt && t.onSceneUpdate(Ie), x.clear(), Y) {
3714
+ const k = v - A;
3715
+ C.setViewport(0, k, p, A), C.setScissor(0, k, p, A), C.render(i, V), C.setViewport(0, 0, p, A), C.setScissor(0, 0, p, A), C.render(i, le);
3716
+ }
3717
+ }, J = () => {
3718
+ let k = 0, U = 0;
3719
+ U = v - A, k = 0, C.setViewport(k, U, O, A), C.setScissor(k, U, O, A), C.render(i, V), k = O, C.setViewport(k, U, O, A), C.setScissor(k, U, O, A), C.render(i, le), U = 0, k = 0, C.setViewport(k, U, O, A), C.setScissor(k, U, O, A), C.render(i, Le), k = O, C.setViewport(k, U, O, A), C.setScissor(k, U, O, A), C.render(i, Fe);
3720
+ }, oe = () => {
3721
+ switch (a.forEach((k) => {
3722
+ k.update();
3723
+ }), t.onSceneUpdate !== void 0 && nn && t.onSceneUpdate(Ne), C.clear(), $) {
3608
3724
  case "Single":
3609
- ae();
3725
+ se();
3610
3726
  break;
3611
3727
  case "Side by Side":
3612
3728
  case "Stacked":
3613
- U();
3729
+ z();
3614
3730
  break;
3615
3731
  case "Quad":
3616
- X();
3732
+ J();
3617
3733
  break;
3618
3734
  }
3619
- G = requestAnimationFrame(ie);
3735
+ G = requestAnimationFrame(oe);
3620
3736
  };
3621
- return ke(), window.addEventListener("resize", V), V(), ie(), () => {
3622
- window.removeEventListener("resize", V), cancelAnimationFrame(G), G = -1;
3737
+ return ke(), window.addEventListener("resize", H), H(), oe(), () => {
3738
+ window.removeEventListener("resize", H), cancelAnimationFrame(G), G = -1;
3623
3739
  };
3624
- }, [Y, x]), _e(() => {
3625
- if (x !== null) {
3626
- const p = new oa(), m = new fe(), w = (ae, U, X, ie) => {
3627
- switch (Y) {
3740
+ }, [$, C]), Re(() => {
3741
+ if (C !== null) {
3742
+ const p = new ua(), v = new me(), O = (se, z, J, oe) => {
3743
+ switch ($) {
3628
3744
  case "Quad":
3629
- ae < X ? U < ie ? p.setFromCamera(m, $) : p.setFromCamera(m, Ne) : U < ie ? p.setFromCamera(m, se) : p.setFromCamera(m, Le);
3745
+ se < J ? z < oe ? p.setFromCamera(v, V) : p.setFromCamera(v, Le) : z < oe ? p.setFromCamera(v, le) : p.setFromCamera(v, Fe);
3630
3746
  break;
3631
3747
  case "Side by Side":
3632
- ae < X ? p.setFromCamera(m, $) : p.setFromCamera(m, se);
3748
+ se < J ? p.setFromCamera(v, V) : p.setFromCamera(v, le);
3633
3749
  break;
3634
3750
  case "Single":
3635
- p.setFromCamera(m, $);
3751
+ p.setFromCamera(v, V);
3636
3752
  break;
3637
3753
  case "Stacked":
3638
- U < ie ? p.setFromCamera(m, $) : p.setFromCamera(m, se);
3754
+ z < oe ? p.setFromCamera(v, V) : p.setFromCamera(v, le);
3639
3755
  break;
3640
3756
  }
3641
- }, R = (ae) => {
3642
- if (!yt)
3757
+ }, A = (se) => {
3758
+ if (!xt)
3643
3759
  return;
3644
- const U = new fe();
3645
- x.getSize(U);
3646
- const X = Math.min(ae.clientX, U.x), ie = Math.min(ae.clientY, U.y);
3647
- m.x = Qe(X, 0, U.x, -1, 1), m.y = Qe(ie, 0, U.y, 1, -1);
3648
- const _ = U.x / 2, F = U.y / 2, ne = () => {
3649
- X < _ ? m.x = Qe(X, 0, _, -1, 1) : m.x = Qe(X, _, U.x, -1, 1);
3650
- }, Ce = () => {
3651
- ie < F ? m.y = Qe(ie, 0, F, 1, -1) : m.y = Qe(ie, F, U.y, 1, -1);
3760
+ const z = new me();
3761
+ C.getSize(z);
3762
+ const J = Math.min(se.clientX, z.x), oe = Math.min(se.clientY, z.y);
3763
+ v.x = et(J, 0, z.x, -1, 1), v.y = et(oe, 0, z.y, 1, -1);
3764
+ const k = z.x / 2, U = z.y / 2, re = () => {
3765
+ J < k ? v.x = et(J, 0, k, -1, 1) : v.x = et(J, k, z.x, -1, 1);
3766
+ }, we = () => {
3767
+ oe < U ? v.y = et(oe, 0, U, 1, -1) : v.y = et(oe, U, z.y, 1, -1);
3652
3768
  };
3653
- switch (Y) {
3769
+ switch ($) {
3654
3770
  case "Quad":
3655
- ne(), Ce();
3771
+ re(), we();
3656
3772
  break;
3657
3773
  case "Side by Side":
3658
- ne();
3774
+ re();
3659
3775
  break;
3660
3776
  case "Stacked":
3661
- Ce(), Ce();
3777
+ we(), we();
3662
3778
  break;
3663
3779
  }
3664
- w(X, ie, _, F);
3665
- const Me = p.intersectObjects(Ie.children);
3666
- Me.length > 0 && d.position.copy(Me[0].point);
3667
- }, G = (ae) => {
3668
- if (!yt)
3780
+ O(J, oe, k, U);
3781
+ const Te = p.intersectObjects(Ne.children);
3782
+ Te.length > 0 && d.position.copy(Te[0].point);
3783
+ }, G = (se) => {
3784
+ if (!xt)
3669
3785
  return;
3670
- const U = new fe();
3671
- if (x.getSize(U), ae.clientX >= U.x)
3786
+ const z = new me();
3787
+ if (C.getSize(z), se.clientX >= z.x)
3672
3788
  return;
3673
- R(ae);
3674
- const X = p.intersectObjects(Ie.children);
3675
- X.length > 0 && t.three.getObject(X[0].object.uuid);
3676
- }, V = B.current;
3677
- return V.addEventListener("mousemove", R, !1), V.addEventListener("click", G, !1), () => {
3678
- V.removeEventListener("mousemove", R), V.removeEventListener("click", G);
3789
+ A(se);
3790
+ const J = p.intersectObjects(Ne.children);
3791
+ J.length > 0 && t.three.getObject(J[0].object.uuid);
3792
+ }, H = F.current;
3793
+ return H.addEventListener("mousemove", A, !1), H.addEventListener("click", G, !1), () => {
3794
+ H.removeEventListener("mousemove", A), H.removeEventListener("click", G);
3679
3795
  };
3680
3796
  }
3681
- }, [Y, x]);
3682
- const he = [];
3683
- return n.forEach((p, m) => {
3684
- he.push(m);
3797
+ }, [$, C]);
3798
+ const pe = [];
3799
+ return n.forEach((p, v) => {
3800
+ pe.push(v);
3685
3801
  }), /* @__PURE__ */ l.jsxs("div", { className: "multiview", children: [
3686
- /* @__PURE__ */ l.jsx("canvas", { ref: q }),
3687
- x !== null && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3688
- /* @__PURE__ */ l.jsxs("div", { className: `cameras ${Y === "Single" || Y === "Stacked" ? "single" : ""}`, ref: B, children: [
3689
- Y === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(He, { camera: $, options: he, ref: M, onSelect: (p) => {
3690
- a.get($.name)?.dispose();
3691
- const m = n.get(p);
3692
- m !== void 0 && (pe($), $ = m, K(m, M.current));
3802
+ /* @__PURE__ */ l.jsx("canvas", { ref: Y }),
3803
+ C !== null && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3804
+ /* @__PURE__ */ l.jsxs("div", { className: `cameras ${$ === "Single" || $ === "Stacked" ? "single" : ""}`, ref: F, children: [
3805
+ $ === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(He, { camera: V, options: pe, ref: M, onSelect: (p) => {
3806
+ a.get(V.name)?.dispose();
3807
+ const v = n.get(p);
3808
+ v !== void 0 && (ve(V), V = v, Z(v, M.current));
3693
3809
  } }) }),
3694
- (Y === "Side by Side" || Y === "Stacked") && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3695
- /* @__PURE__ */ l.jsx(He, { camera: $, options: he, ref: M, onSelect: (p) => {
3696
- a.get($.name)?.dispose();
3697
- const m = n.get(p);
3698
- m !== void 0 && (pe($), $ = m, K(m, M.current));
3810
+ ($ === "Side by Side" || $ === "Stacked") && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3811
+ /* @__PURE__ */ l.jsx(He, { camera: V, options: pe, ref: M, onSelect: (p) => {
3812
+ a.get(V.name)?.dispose();
3813
+ const v = n.get(p);
3814
+ v !== void 0 && (ve(V), V = v, Z(v, M.current));
3699
3815
  } }),
3700
- /* @__PURE__ */ l.jsx(He, { camera: se, options: he, ref: z, onSelect: (p) => {
3701
- a.get(se.name)?.dispose();
3702
- const m = n.get(p);
3703
- m !== void 0 && (pe(se), se = m, K(m, z.current));
3816
+ /* @__PURE__ */ l.jsx(He, { camera: le, options: pe, ref: w, onSelect: (p) => {
3817
+ a.get(le.name)?.dispose();
3818
+ const v = n.get(p);
3819
+ v !== void 0 && (ve(le), le = v, Z(v, w.current));
3704
3820
  } })
3705
3821
  ] }),
3706
- Y === "Quad" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3707
- /* @__PURE__ */ l.jsx(He, { camera: $, options: he, ref: M, onSelect: (p) => {
3708
- a.get($.name)?.dispose();
3709
- const m = n.get(p);
3710
- m !== void 0 && (pe($), $ = m, K(m, M.current));
3711
- } }),
3712
- /* @__PURE__ */ l.jsx(He, { camera: se, options: he, ref: z, onSelect: (p) => {
3713
- a.get(se.name)?.dispose();
3714
- const m = n.get(p);
3715
- m !== void 0 && (pe(se), se = m, K(m, z.current));
3822
+ $ === "Quad" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3823
+ /* @__PURE__ */ l.jsx(He, { camera: V, options: pe, ref: M, onSelect: (p) => {
3824
+ a.get(V.name)?.dispose();
3825
+ const v = n.get(p);
3826
+ v !== void 0 && (ve(V), V = v, Z(v, M.current));
3716
3827
  } }),
3717
- /* @__PURE__ */ l.jsx(He, { camera: Ne, options: he, ref: we, onSelect: (p) => {
3718
- a.get(Ne.name)?.dispose();
3719
- const m = n.get(p);
3720
- m !== void 0 && (pe(Ne), Ne = m, K(m, we.current));
3828
+ /* @__PURE__ */ l.jsx(He, { camera: le, options: pe, ref: w, onSelect: (p) => {
3829
+ a.get(le.name)?.dispose();
3830
+ const v = n.get(p);
3831
+ v !== void 0 && (ve(le), le = v, Z(v, w.current));
3721
3832
  } }),
3722
- /* @__PURE__ */ l.jsx(He, { camera: Le, options: he, ref: ce, onSelect: (p) => {
3833
+ /* @__PURE__ */ l.jsx(He, { camera: Le, options: pe, ref: ae, onSelect: (p) => {
3723
3834
  a.get(Le.name)?.dispose();
3724
- const m = n.get(p);
3725
- m !== void 0 && (pe(Le), Le = m, K(m, ce.current));
3835
+ const v = n.get(p);
3836
+ v !== void 0 && (ve(Le), Le = v, Z(v, ae.current));
3837
+ } }),
3838
+ /* @__PURE__ */ l.jsx(He, { camera: Fe, options: pe, ref: X, onSelect: (p) => {
3839
+ a.get(Fe.name)?.dispose();
3840
+ const v = n.get(p);
3841
+ v !== void 0 && (ve(Fe), Fe = v, Z(v, X.current));
3726
3842
  } })
3727
3843
  ] })
3728
3844
  ] }),
3729
3845
  /* @__PURE__ */ l.jsxs("div", { className: "settings", children: [
3730
3846
  /* @__PURE__ */ l.jsx(
3731
- Et,
3847
+ Ct,
3732
3848
  {
3733
- index: I.indexOf(Y),
3734
- options: I,
3849
+ index: P.indexOf($),
3850
+ options: P,
3735
3851
  onSelect: (p) => {
3736
- p !== Y && (Pe(), Q(p));
3852
+ p !== $ && (Ae(), W(p));
3737
3853
  },
3738
- open: Fe,
3854
+ open: Be,
3739
3855
  onToggle: (p) => {
3740
- Oe(p), me && te(!1), ue && ve(!1);
3856
+ Me(p), ge && ie(!1), fe && be(!1);
3741
3857
  }
3742
3858
  }
3743
3859
  ),
3744
3860
  /* @__PURE__ */ l.jsx(
3745
- Et,
3861
+ Ct,
3746
3862
  {
3747
- index: D.indexOf(bt),
3748
- options: D,
3863
+ index: R.indexOf(Et),
3864
+ options: R,
3749
3865
  onSelect: (p) => {
3750
- if (p !== bt)
3751
- switch (bt = p, bt) {
3866
+ if (p !== Et)
3867
+ switch (Et = p, Et) {
3752
3868
  case "Depth":
3753
3869
  i.overrideMaterial = u;
3754
3870
  break;
3755
3871
  case "Normals":
3756
- i.overrideMaterial = v;
3872
+ i.overrideMaterial = m;
3757
3873
  break;
3758
3874
  default:
3759
3875
  case "Renderer":
@@ -3767,14 +3883,14 @@ function bi(t) {
3767
3883
  break;
3768
3884
  }
3769
3885
  },
3770
- open: me,
3886
+ open: ge,
3771
3887
  onToggle: (p) => {
3772
- Fe && Oe(!1), te(p), ue && ve(!1);
3888
+ Be && Me(!1), ie(p), fe && be(!1);
3773
3889
  }
3774
3890
  }
3775
3891
  ),
3776
3892
  /* @__PURE__ */ l.jsx(
3777
- Et,
3893
+ Ct,
3778
3894
  {
3779
3895
  index: 0,
3780
3896
  options: [
@@ -3782,11 +3898,11 @@ function bi(t) {
3782
3898
  "Selection Mode"
3783
3899
  ],
3784
3900
  onSelect: (p) => {
3785
- yt = p === "Selection Mode", d.visible = yt;
3901
+ xt = p === "Selection Mode", d.visible = xt;
3786
3902
  },
3787
- open: ue,
3903
+ open: fe,
3788
3904
  onToggle: (p) => {
3789
- Fe && Oe(!1), me && te(!1), ve(p);
3905
+ Be && Me(!1), ge && ie(!1), be(p);
3790
3906
  }
3791
3907
  }
3792
3908
  )
@@ -3794,7 +3910,7 @@ function bi(t) {
3794
3910
  ] })
3795
3911
  ] });
3796
3912
  }
3797
- function yi(t) {
3913
+ function Ci(t) {
3798
3914
  return /* @__PURE__ */ l.jsxs("div", { className: "editor", ref: t.ref, style: t.style, children: [
3799
3915
  /* @__PURE__ */ l.jsx("div", { className: "header", children: t.header }),
3800
3916
  t.children,
@@ -3802,42 +3918,44 @@ function yi(t) {
3802
3918
  ] });
3803
3919
  }
3804
3920
  export {
3805
- Lt as Accordion,
3806
- di as Application,
3807
- Ct as BaseRemote,
3808
- Mn as ChildObject,
3809
- _a as ContainerObject,
3810
- Ma as Draggable,
3811
- Oa as DraggableItem,
3812
- Ta as Dropdown,
3813
- Ra as DropdownItem,
3814
- yi as Editor,
3815
- qa as Inspector,
3816
- bi as MultiView,
3817
- On as NavButton,
3818
- ui as RemoteComponents,
3819
- mi as RemoteController,
3820
- Nt as RemoteTheatre,
3821
- fi as RemoteThree,
3822
- pi as RemoteTweakpane,
3823
- gi as SceneInspector,
3824
- vi as SidePanel,
3825
- k as ToolEvents,
3826
- lt as capitalize,
3827
- oi as clamp,
3828
- pa as colorToHex,
3829
- P as debugDispatcher,
3830
- si as defaultTheatreCallback,
3831
- xn as dispose,
3832
- va as disposeMaterial,
3833
- li as disposeTexture,
3834
- ci as distance,
3835
- Cn as hierarchyUUID,
3836
- fa as isColor,
3837
- Sn as noop,
3838
- ha as randomID,
3839
- ma as resetThreeObjects,
3840
- _t as round,
3841
- hi as theatreEditorApp,
3842
- jt as totalThreeObjects
3921
+ Ft as Accordion,
3922
+ fi as Application,
3923
+ wt as BaseRemote,
3924
+ _n as ChildObject,
3925
+ ka as ContainerObject,
3926
+ _a as Draggable,
3927
+ Ra as DraggableItem,
3928
+ Pa as Dropdown,
3929
+ Aa as DropdownItem,
3930
+ Ci as Editor,
3931
+ Ja as Inspector,
3932
+ xi as MultiView,
3933
+ Rn as NavButton,
3934
+ pi as RemoteComponents,
3935
+ bi as RemoteController,
3936
+ Lt as RemoteTheatre,
3937
+ vi as RemoteThree,
3938
+ gi as RemoteTweakpane,
3939
+ Ei as SceneInspector,
3940
+ yi as SidePanel,
3941
+ I as ToolEvents,
3942
+ dt as capitalize,
3943
+ Je as clamp,
3944
+ ga as colorToHex,
3945
+ D as debugDispatcher,
3946
+ ui as defaultTheatreCallback,
3947
+ Mn as dispose,
3948
+ ya as disposeMaterial,
3949
+ hi as disposeTexture,
3950
+ di as distance,
3951
+ On as hierarchyUUID,
3952
+ va as isColor,
3953
+ Wt as mix,
3954
+ wn as noop,
3955
+ Ht as normalize,
3956
+ ma as randomID,
3957
+ ba as resetThreeObjects,
3958
+ ut as round,
3959
+ mi as theatreEditorApp,
3960
+ Dt as totalThreeObjects
3843
3961
  };