@tomorrowevening/hermes 0.0.47 → 0.0.48

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,15 +1,15 @@
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";
1
+ import { EventDispatcher as an, Texture as rn, CubeTexture as In, RepeatWrapping as $t, Color as Ct, 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 q, Euler as Zn, Ray as Jn, Plane as Qn, MathUtils as ea, MOUSE as et, TOUCH as tt, 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, WebGLRenderer as la, PerspectiveCamera as Pt, Raycaster as ua, OrthographicCamera as Gt, CameraHelper as da } from "three";
2
2
  import { Pane as ha } from "tweakpane";
3
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";
4
+ import Cn, { useState as ae, useRef as fe, useEffect as ke, forwardRef as pa, useMemo as xe } from "react";
5
5
  import { Reorder as Sn } from "framer-motion";
6
6
  const wn = () => {
7
- }, ui = () => {
7
+ }, fi = () => {
8
8
  };
9
- function dt(t) {
9
+ function St(t) {
10
10
  return t.substring(0, 1).toUpperCase() + t.substring(1);
11
11
  }
12
- function Je(t, n, a) {
12
+ function Xe(t, n, a) {
13
13
  return Math.min(n, Math.max(t, a));
14
14
  }
15
15
  function Ht(t, n, a) {
@@ -18,7 +18,7 @@ function Ht(t, n, a) {
18
18
  function Wt(t, n, a) {
19
19
  return t * (1 - a) + n * a;
20
20
  }
21
- function di(t, n) {
21
+ function pi(t, n) {
22
22
  const a = t - n;
23
23
  return Math.sqrt(a * a);
24
24
  }
@@ -29,13 +29,13 @@ function va(t) {
29
29
  return t.r !== void 0 && t.g !== void 0 && t.b !== void 0;
30
30
  }
31
31
  function ga(t) {
32
- const n = Math.round(t.r * 255), a = Math.round(t.g * 255), e = Math.round(t.b * 255), i = (d) => {
33
- const u = d.toString(16);
34
- return u.length === 1 ? "0" + u : u;
35
- }, o = i(n), h = i(a), c = i(e);
36
- return "#" + o + h + c;
32
+ const n = Math.round(t.r * 255), a = Math.round(t.g * 255), e = Math.round(t.b * 255), i = (u) => {
33
+ const d = u.toString(16);
34
+ return d.length === 1 ? "0" + d : d;
35
+ }, c = i(n), h = i(a), o = i(e);
36
+ return "#" + c + h + o;
37
37
  }
38
- function ut(t, n = 1) {
38
+ function ht(t, n = 1) {
39
39
  return Number(t.toFixed(n));
40
40
  }
41
41
  let Dt = 0;
@@ -48,7 +48,7 @@ const ba = () => {
48
48
  n.length === 0 && (n = `obj_${Dt}`, Dt++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
49
49
  On(a);
50
50
  });
51
- }, hi = (t) => {
51
+ }, mi = (t) => {
52
52
  t?.dispose();
53
53
  }, ya = (t) => {
54
54
  t && (Array.isArray(t) ? t.forEach((n) => n.dispose()) : t.dispose());
@@ -65,10 +65,11 @@ const ba = () => {
65
65
  t.dispose !== void 0 && t.dispose();
66
66
  }
67
67
  };
68
- class fi {
68
+ class vi {
69
69
  components = /* @__PURE__ */ new Map();
70
70
  listen;
71
71
  // Protected
72
+ _appID = "";
72
73
  _debugEnabled;
73
74
  _broadcastChannel = void 0;
74
75
  _webSocket = void 0;
@@ -76,7 +77,7 @@ class fi {
76
77
  _connected = !1;
77
78
  _useBC = !1;
78
79
  constructor(n, a, e = !0) {
79
- this._debugEnabled = a, a && (this._useBC = e, e ? (this._broadcastChannel = new BroadcastChannel(n), this._broadcastChannel.addEventListener("message", this.messageHandler)) : (this._webSocket = new WebSocket(n), this._webSocket.addEventListener("open", this.openHandler), this._webSocket.addEventListener("close", this.closeHandler), this._webSocket.addEventListener("message", this.messageHandler)));
80
+ this._appID = n, this._debugEnabled = a, a && (this._useBC = e, e ? (this._broadcastChannel = new BroadcastChannel(n), this._broadcastChannel.addEventListener("message", this.messageHandler)) : (this._webSocket = new WebSocket(n), this._webSocket.addEventListener("open", this.openHandler), this._webSocket.addEventListener("close", this.closeHandler), this._webSocket.addEventListener("message", this.messageHandler)));
80
81
  }
81
82
  addComponent(n, a) {
82
83
  this.components.set(n, a);
@@ -100,6 +101,9 @@ class fi {
100
101
  this._connected = !1;
101
102
  };
102
103
  // Getters / Setters
104
+ get appID() {
105
+ return this._appID;
106
+ }
103
107
  get connected() {
104
108
  return this._connected;
105
109
  }
@@ -147,7 +151,7 @@ class wt {
147
151
  handleEditor(n, a, e) {
148
152
  }
149
153
  }
150
- class pi extends wt {
154
+ class gi extends wt {
151
155
  selectDropdown(n, a) {
152
156
  this.app.send({
153
157
  event: "selectComponent",
@@ -228,17 +232,17 @@ class Lt extends wt {
228
232
  console.error("Theatre Project hasn't been created yet.");
229
233
  return;
230
234
  }
231
- const o = this.sheet(n);
232
- if (o === void 0)
235
+ const c = this.sheet(n);
236
+ if (c === void 0)
233
237
  return;
234
238
  const h = `${n}_${a}`;
235
- let c = this.sheetObjects.get(h);
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);
237
- const d = c.onValuesChange((u) => {
239
+ let o = this.sheetObjects.get(h);
240
+ o !== void 0 ? o = c.object(a, { ...e, ...o.value }, { reconfigure: !0 }) : o = c.object(a, e), this.sheetObjects.set(h, o), this.sheetObjectCBs.set(h, i !== void 0 ? i : wn);
241
+ const u = o.onValuesChange((d) => {
238
242
  if (this.app.editor) {
239
- for (const b in u) {
240
- const E = u[b];
241
- typeof E == "object" && va(E) && (u[b] = {
243
+ for (const b in d) {
244
+ const E = d[b];
245
+ typeof E == "object" && va(E) && (d[b] = {
242
246
  r: E.r,
243
247
  g: E.g,
244
248
  b: E.b,
@@ -251,14 +255,14 @@ class Lt extends wt {
251
255
  data: {
252
256
  sheet: n,
253
257
  sheetObject: h,
254
- values: u
258
+ values: d
255
259
  }
256
260
  });
257
261
  }
258
- const m = this.sheetObjectCBs.get(h);
259
- m !== void 0 && m(u);
262
+ const f = this.sheetObjectCBs.get(h);
263
+ f !== void 0 && f(d);
260
264
  });
261
- return this.sheetObjectUnsubscribe.set(h, d), c;
265
+ return this.sheetObjectUnsubscribe.set(h, u), o;
262
266
  }
263
267
  unsubscribe(n) {
264
268
  if (this.project === void 0) {
@@ -267,24 +271,24 @@ class Lt extends wt {
267
271
  }
268
272
  const a = n.address.sheetId, e = n.address.objectKey;
269
273
  this.sheets.get(a)?.detachObject(e);
270
- const o = `${a}_${e}`, h = this.sheetObjectUnsubscribe.get(o);
271
- h !== void 0 && (this.sheetObjects.delete(o), this.sheetObjectCBs.delete(o), this.sheetObjectUnsubscribe.delete(o), h());
274
+ const c = `${a}_${e}`, h = this.sheetObjectUnsubscribe.get(c);
275
+ h !== void 0 && (this.sheetObjects.delete(c), this.sheetObjectCBs.delete(c), this.sheetObjectUnsubscribe.delete(c), h());
272
276
  }
273
277
  handleApp(n, a, e) {
274
278
  const i = a;
275
- let o;
279
+ let c;
276
280
  switch (e.event) {
277
281
  case "setSheet":
278
- o = i.sheets.get(e.data.sheet), o !== void 0 && (i.activeSheet = o, this.studio?.setSelection([o]));
282
+ c = i.sheets.get(e.data.sheet), c !== void 0 && (i.activeSheet = c, this.studio?.setSelection([c]));
279
283
  break;
280
284
  case "setSheetObject":
281
- o = i.sheetObjects.get(`${e.data.sheet}_${e.data.key}`), o !== void 0 && this.studio?.setSelection([o]);
285
+ c = i.sheetObjects.get(`${e.data.sheet}_${e.data.key}`), c !== void 0 && this.studio?.setSelection([c]);
282
286
  break;
283
287
  case "updateSheetObject":
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);
288
+ c = i.sheets.get(e.data.sheet), c !== void 0 && c.sequence.pause(), c = i.sheetObjectCBs.get(e.data.sheetObject), c !== void 0 && c(e.data.values);
285
289
  break;
286
290
  case "updateTimeline":
287
- o = i.sheets.get(e.data.sheet), i.activeSheet !== void 0 && (i.activeSheet.sequence.position = e.data.position);
291
+ c = i.sheets.get(e.data.sheet), i.activeSheet !== void 0 && (i.activeSheet.sequence.position = e.data.position);
288
292
  break;
289
293
  }
290
294
  }
@@ -304,23 +308,23 @@ class Lt extends wt {
304
308
  handleEditorApp(n, a) {
305
309
  if (n.editor) {
306
310
  this.studio?.ui.restore(), this.studio?.onSelectionChange((h) => {
307
- h.length < 1 || h.forEach((c) => {
308
- let d = c.address.sheetId, u = "setSheet", m = {};
309
- switch (c.type) {
311
+ h.length < 1 || h.forEach((o) => {
312
+ let u = o.address.sheetId, d = "setSheet", f = {};
313
+ switch (o.type) {
310
314
  case "Theatre_Sheet_PublicAPI":
311
- u = "setSheet", m = {
312
- sheet: c.address.sheetId
313
- }, a.activeSheet = a.sheets.get(c.address.sheetId);
315
+ d = "setSheet", f = {
316
+ sheet: o.address.sheetId
317
+ }, a.activeSheet = a.sheets.get(o.address.sheetId);
314
318
  break;
315
319
  case "Theatre_SheetObject_PublicAPI":
316
- u = "setSheetObject", d += `_${c.address.objectKey}`, m = {
317
- id: d,
318
- sheet: c.address.sheetId,
319
- key: c.address.objectKey
320
- }, a.activeSheet = a.sheets.get(c.address.sheetId);
320
+ d = "setSheetObject", u += `_${o.address.objectKey}`, f = {
321
+ id: u,
322
+ sheet: o.address.sheetId,
323
+ key: o.address.objectKey
324
+ }, a.activeSheet = a.sheets.get(o.address.sheetId);
321
325
  break;
322
326
  }
323
- n.send({ event: u, target: "app", data: m });
327
+ n.send({ event: d, target: "app", data: f });
324
328
  });
325
329
  });
326
330
  let e = -1;
@@ -337,34 +341,34 @@ class Lt extends wt {
337
341
  }
338
342
  });
339
343
  }
340
- }, o = () => {
341
- i(), requestAnimationFrame(o);
344
+ }, c = () => {
345
+ i(), requestAnimationFrame(c);
342
346
  };
343
- i(), o();
347
+ i(), c();
344
348
  } else
345
349
  this.studio?.ui.hide();
346
350
  }
347
351
  }
348
- function mi(t, n, a) {
352
+ function bi(t, n, a) {
349
353
  if (t.editor) {
350
354
  a.ui.restore(), a.onSelectionChange((h) => {
351
- h.length < 1 || h.forEach((c) => {
352
- let d = c.address.sheetId, u = "setSheet", m = {};
353
- switch (c.type) {
355
+ h.length < 1 || h.forEach((o) => {
356
+ let u = o.address.sheetId, d = "setSheet", f = {};
357
+ switch (o.type) {
354
358
  case "Theatre_Sheet_PublicAPI":
355
- u = "setSheet", m = {
356
- sheet: c.address.sheetId
357
- }, n.activeSheet = n.sheets.get(c.address.sheetId);
359
+ d = "setSheet", f = {
360
+ sheet: o.address.sheetId
361
+ }, n.activeSheet = n.sheets.get(o.address.sheetId);
358
362
  break;
359
363
  case "Theatre_SheetObject_PublicAPI":
360
- u = "setSheetObject", d += `_${c.address.objectKey}`, m = {
361
- id: d,
362
- sheet: c.address.sheetId,
363
- key: c.address.objectKey
364
- }, n.activeSheet = n.sheets.get(c.address.sheetId);
364
+ d = "setSheetObject", u += `_${o.address.objectKey}`, f = {
365
+ id: u,
366
+ sheet: o.address.sheetId,
367
+ key: o.address.objectKey
368
+ }, n.activeSheet = n.sheets.get(o.address.sheetId);
365
369
  break;
366
370
  }
367
- t.send({ event: u, target: "app", data: m });
371
+ t.send({ event: d, target: "app", data: f });
368
372
  });
369
373
  });
370
374
  let e = -1;
@@ -381,10 +385,10 @@ function mi(t, n, a) {
381
385
  }
382
386
  });
383
387
  }
384
- }, o = () => {
385
- i(), requestAnimationFrame(o);
388
+ }, c = () => {
389
+ i(), requestAnimationFrame(c);
386
390
  };
387
- i(), o();
391
+ i(), c();
388
392
  } else
389
393
  a.ui.hide();
390
394
  }
@@ -433,7 +437,7 @@ function Ca(t) {
433
437
  }
434
438
  return !1;
435
439
  }
436
- function Qe(t) {
440
+ function nt(t) {
437
441
  const n = {};
438
442
  for (const a in t) {
439
443
  if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || Ca(a))
@@ -449,8 +453,8 @@ function Qe(t) {
449
453
  if (i !== null)
450
454
  if (n[a] = i, i.isTexture)
451
455
  if (i instanceof rn) {
452
- const o = i.source.toJSON();
453
- n[a] = { src: o.url };
456
+ const c = i.source.toJSON();
457
+ n[a] = { src: c.url };
454
458
  } else
455
459
  i instanceof In && (console.log("env map"), console.log(i.source.data), console.log(i.source.toJSON()), n[a] = { src: "" });
456
460
  else
@@ -488,29 +492,29 @@ function At(t) {
488
492
  const e = t;
489
493
  if (Array.isArray(e.material)) {
490
494
  const i = [];
491
- e.material.forEach((o) => {
492
- i.push(Qe(o));
495
+ e.material.forEach((c) => {
496
+ i.push(nt(c));
493
497
  }), n.material = i;
494
498
  } else
495
- n.material = Qe(e.material);
499
+ n.material = nt(e.material);
496
500
  } else if (a.search("points") > -1) {
497
501
  const e = t;
498
502
  if (Array.isArray(e.material)) {
499
503
  const i = [];
500
- e.material.forEach((o) => {
501
- i.push(Qe(o));
504
+ e.material.forEach((c) => {
505
+ i.push(nt(c));
502
506
  }), n.material = i;
503
507
  } else
504
- n.material = Qe(e.material);
508
+ n.material = nt(e.material);
505
509
  } else if (a.search("line") > -1) {
506
510
  const e = t;
507
511
  if (Array.isArray(e.material)) {
508
512
  const i = [];
509
- e.material.forEach((o) => {
510
- i.push(Qe(o));
513
+ e.material.forEach((c) => {
514
+ i.push(nt(c));
511
515
  }), n.material = i;
512
516
  } else
513
- n.material = Qe(e.material);
517
+ n.material = nt(e.material);
514
518
  } else
515
519
  a.search("camera") > -1 ? t.type === "PerspectiveCamera" ? n.perspectiveCameraInfo = {
516
520
  fov: t.fov,
@@ -557,7 +561,7 @@ function Sa(t, n) {
557
561
  return t[a[0]][a[1]][a[2]][a[3]][a[4]][a[5]];
558
562
  }
559
563
  }
560
- function ee(t, n, a) {
564
+ function K(t, n, a) {
561
565
  const e = n.split(".");
562
566
  switch (e.length) {
563
567
  case 1:
@@ -586,7 +590,7 @@ function It(t) {
586
590
  }, e.onerror = a, e.src = t;
587
591
  });
588
592
  }
589
- class vi extends wt {
593
+ class yi extends wt {
590
594
  scene = void 0;
591
595
  renderer = void 0;
592
596
  getObject(n) {
@@ -701,8 +705,27 @@ class vi extends wt {
701
705
  break;
702
706
  }
703
707
  }
708
+ // Renderer
709
+ resize(n, a) {
710
+ this.renderer?.setSize(n, a);
711
+ }
712
+ set dpr(n) {
713
+ this.renderer?.setPixelRatio(Xe(1, 2, n));
714
+ }
715
+ get dpr() {
716
+ return this.renderer !== void 0 ? this.renderer?.getPixelRatio() : 1;
717
+ }
718
+ get width() {
719
+ return this.renderer !== void 0 ? this.renderer?.domElement.width / this.dpr : 0;
720
+ }
721
+ get height() {
722
+ return this.renderer !== void 0 ? this.renderer?.domElement.height / this.dpr : 0;
723
+ }
724
+ get canvas() {
725
+ return this.renderer !== void 0 ? this.renderer?.domElement : null;
726
+ }
704
727
  }
705
- class gi extends wt {
728
+ class Ei extends wt {
706
729
  bindCBs;
707
730
  buttonCBs;
708
731
  pane = void 0;
@@ -739,21 +762,21 @@ class gi extends wt {
739
762
  }
740
763
  // Binding
741
764
  bind(n, a, e, i = void 0) {
742
- const o = this.bindID, h = e.onChange !== void 0 ? e.onChange : wn;
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) => {
765
+ const c = this.bindID, h = e.onChange !== void 0 ? e.onChange : wn;
766
+ this.bindCBs.set(c, h), this.app.editor ? (this.pane === void 0 && this.createGUI(), (i !== void 0 ? i : this.pane).addBinding(n, a, e).on("change", (u) => {
744
767
  this.app.send({
745
768
  event: "updateBind",
746
769
  target: "app",
747
770
  data: {
748
- id: o,
749
- value: d.value
771
+ id: c,
772
+ value: u.value
750
773
  }
751
774
  });
752
775
  }), this.editorCallbacks++) : (this.app.send({
753
776
  event: "bindObject",
754
777
  target: "app",
755
778
  data: {
756
- id: o,
779
+ id: c,
757
780
  name: a,
758
781
  params: e,
759
782
  parent: i
@@ -820,7 +843,7 @@ class gi extends wt {
820
843
  }
821
844
  }
822
845
  }
823
- var Nt = { exports: {} }, st = {};
846
+ var Nt = { exports: {} }, ct = {};
824
847
  /**
825
848
  * @license React
826
849
  * react-jsx-runtime.production.min.js
@@ -833,22 +856,22 @@ var Nt = { exports: {} }, st = {};
833
856
  var qt;
834
857
  function wa() {
835
858
  if (qt)
836
- return st;
859
+ return ct;
837
860
  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 };
839
- function h(c, d, u) {
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]);
844
- if (c && c.defaultProps)
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 };
848
- }
849
- return st.Fragment = a, st.jsx = h, st.jsxs = h, st;
850
- }
851
- var ot = {};
861
+ 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, c = { key: !0, ref: !0, __self: !0, __source: !0 };
862
+ function h(o, u, d) {
863
+ var f, b = {}, E = null, x = null;
864
+ d !== void 0 && (E = "" + d), u.key !== void 0 && (E = "" + u.key), u.ref !== void 0 && (x = u.ref);
865
+ for (f in u)
866
+ e.call(u, f) && !c.hasOwnProperty(f) && (b[f] = u[f]);
867
+ if (o && o.defaultProps)
868
+ for (f in u = o.defaultProps, u)
869
+ b[f] === void 0 && (b[f] = u[f]);
870
+ return { $$typeof: n, type: o, key: E, ref: x, props: b, _owner: i.current };
871
+ }
872
+ return ct.Fragment = a, ct.jsx = h, ct.jsxs = h, ct;
873
+ }
874
+ var lt = {};
852
875
  /**
853
876
  * @license React
854
877
  * react-jsx-runtime.development.js
@@ -861,54 +884,54 @@ var ot = {};
861
884
  var Kt;
862
885
  function Oa() {
863
886
  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) {
887
+ var t = Cn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), o = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), x = Symbol.for("react.offscreen"), M = Symbol.iterator, P = "@@iterator";
888
+ function V(r) {
866
889
  if (r === null || typeof r != "object")
867
890
  return null;
868
- var f = R && r[R] || r[P];
869
- return typeof f == "function" ? f : null;
891
+ var m = M && r[M] || r[P];
892
+ return typeof m == "function" ? m : null;
870
893
  }
871
- var F = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
872
- function M(r) {
894
+ var U = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
895
+ function j(r) {
873
896
  {
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);
897
+ for (var m = arguments.length, g = new Array(m > 1 ? m - 1 : 0), w = 1; w < m; w++)
898
+ g[w - 1] = arguments[w];
899
+ O("error", r, g);
877
900
  }
878
901
  }
879
- function w(r, f, g) {
902
+ function O(r, m, g) {
880
903
  {
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);
904
+ var w = U.ReactDebugCurrentFrame, N = w.getStackAddendum();
905
+ N !== "" && (m += "%s", g = g.concat([N]));
906
+ var B = g.map(function(k) {
907
+ return String(k);
885
908
  });
886
- B.unshift("Warning: " + f), Function.prototype.apply.call(console[r], console, B);
909
+ B.unshift("Warning: " + m), Function.prototype.apply.call(console[r], console, B);
887
910
  }
888
911
  }
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
912
+ var re = !1, Q = !1, Ce = !1, G = !1, ee = !1, ve;
913
+ ve = Symbol.for("react.module.reference");
914
+ function ze(r) {
915
+ return !!(typeof r == "string" || typeof r == "function" || r === e || r === c || ee || r === i || r === d || r === f || G || r === x || re || Q || Ce || typeof r == "object" && r !== null && (r.$$typeof === E || r.$$typeof === b || r.$$typeof === h || r.$$typeof === o || r.$$typeof === u || // This needs to include all possible module reference object
893
916
  // types supported by any Flight configuration anywhere since
894
917
  // we don't know which Flight build this will end up being used
895
918
  // with.
896
- r.$$typeof === Pe || r.getModuleId !== void 0));
919
+ r.$$typeof === ve || r.getModuleId !== void 0));
897
920
  }
898
- function Me(r, f, g) {
899
- var S = r.displayName;
900
- if (S)
901
- return S;
902
- var N = f.displayName || f.name || "";
921
+ function Me(r, m, g) {
922
+ var w = r.displayName;
923
+ if (w)
924
+ return w;
925
+ var N = m.displayName || m.name || "";
903
926
  return N !== "" ? g + "(" + N + ")" : g;
904
927
  }
905
- function ge(r) {
928
+ function $(r) {
906
929
  return r.displayName || "Context";
907
930
  }
908
- function ie(r) {
931
+ function le(r) {
909
932
  if (r == null)
910
933
  return null;
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")
934
+ if (typeof r.tag == "number" && j("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof r == "function")
912
935
  return r.displayName || r.name || null;
913
936
  if (typeof r == "string")
914
937
  return r;
@@ -917,32 +940,32 @@ function Oa() {
917
940
  return "Fragment";
918
941
  case a:
919
942
  return "Portal";
920
- case o:
943
+ case c:
921
944
  return "Profiler";
922
945
  case i:
923
946
  return "StrictMode";
924
- case u:
947
+ case d:
925
948
  return "Suspense";
926
- case m:
949
+ case f:
927
950
  return "SuspenseList";
928
951
  }
929
952
  if (typeof r == "object")
930
953
  switch (r.$$typeof) {
931
- case c:
932
- var f = r;
933
- return ge(f) + ".Consumer";
954
+ case o:
955
+ var m = r;
956
+ return $(m) + ".Consumer";
934
957
  case h:
935
958
  var g = r;
936
- return ge(g._context) + ".Provider";
937
- case d:
959
+ return $(g._context) + ".Provider";
960
+ case u:
938
961
  return Me(r, r.render, "ForwardRef");
939
962
  case b:
940
- var S = r.displayName || null;
941
- return S !== null ? S : ie(r.type) || "Memo";
963
+ var w = r.displayName || null;
964
+ return w !== null ? w : le(r.type) || "Memo";
942
965
  case E: {
943
- var N = r, B = N._payload, j = N._init;
966
+ var N = r, B = N._payload, k = N._init;
944
967
  try {
945
- return ie(j(B));
968
+ return le(k(B));
946
969
  } catch {
947
970
  return null;
948
971
  }
@@ -950,18 +973,18 @@ function Oa() {
950
973
  }
951
974
  return null;
952
975
  }
953
- var fe = Object.assign, be = 0, ye, Z, ve, Ae, ke, pe, p;
954
- function v() {
976
+ var S = Object.assign, Te = 0, ge, _e, je, Re, Pe, De, Ye;
977
+ function te() {
955
978
  }
956
- v.__reactDisabledLog = !0;
957
- function O() {
979
+ te.__reactDisabledLog = !0;
980
+ function Se() {
958
981
  {
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;
982
+ if (Te === 0) {
983
+ ge = console.log, _e = console.info, je = console.warn, Re = console.error, Pe = console.group, De = console.groupCollapsed, Ye = console.groupEnd;
961
984
  var r = {
962
985
  configurable: !0,
963
986
  enumerable: !0,
964
- value: v,
987
+ value: te,
965
988
  writable: !0
966
989
  };
967
990
  Object.defineProperties(console, {
@@ -974,254 +997,254 @@ function Oa() {
974
997
  groupEnd: r
975
998
  });
976
999
  }
977
- be++;
1000
+ Te++;
978
1001
  }
979
1002
  }
980
- function A() {
1003
+ function it() {
981
1004
  {
982
- if (be--, be === 0) {
1005
+ if (Te--, Te === 0) {
983
1006
  var r = {
984
1007
  configurable: !0,
985
1008
  enumerable: !0,
986
1009
  writable: !0
987
1010
  };
988
1011
  Object.defineProperties(console, {
989
- log: fe({}, r, {
990
- value: ye
1012
+ log: S({}, r, {
1013
+ value: ge
991
1014
  }),
992
- info: fe({}, r, {
993
- value: Z
1015
+ info: S({}, r, {
1016
+ value: _e
994
1017
  }),
995
- warn: fe({}, r, {
996
- value: ve
1018
+ warn: S({}, r, {
1019
+ value: je
997
1020
  }),
998
- error: fe({}, r, {
999
- value: Ae
1021
+ error: S({}, r, {
1022
+ value: Re
1000
1023
  }),
1001
- group: fe({}, r, {
1002
- value: ke
1024
+ group: S({}, r, {
1025
+ value: Pe
1003
1026
  }),
1004
- groupCollapsed: fe({}, r, {
1005
- value: pe
1027
+ groupCollapsed: S({}, r, {
1028
+ value: De
1006
1029
  }),
1007
- groupEnd: fe({}, r, {
1008
- value: p
1030
+ groupEnd: S({}, r, {
1031
+ value: Ye
1009
1032
  })
1010
1033
  });
1011
1034
  }
1012
- be < 0 && M("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1035
+ Te < 0 && j("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
1013
1036
  }
1014
1037
  }
1015
- var G = F.ReactCurrentDispatcher, H;
1016
- function se(r, f, g) {
1038
+ var Ve = U.ReactCurrentDispatcher, pe;
1039
+ function p(r, m, g) {
1017
1040
  {
1018
- if (H === void 0)
1041
+ if (pe === void 0)
1019
1042
  try {
1020
1043
  throw Error();
1021
1044
  } catch (N) {
1022
- var S = N.stack.trim().match(/\n( *(at )?)/);
1023
- H = S && S[1] || "";
1045
+ var w = N.stack.trim().match(/\n( *(at )?)/);
1046
+ pe = w && w[1] || "";
1024
1047
  }
1025
1048
  return `
1026
- ` + H + r;
1049
+ ` + pe + r;
1027
1050
  }
1028
1051
  }
1029
- var z = !1, J;
1052
+ var v = !1, C;
1030
1053
  {
1031
- var oe = typeof WeakMap == "function" ? WeakMap : Map;
1032
- J = new oe();
1054
+ var _ = typeof WeakMap == "function" ? WeakMap : Map;
1055
+ C = new _();
1033
1056
  }
1034
- function k(r, f) {
1035
- if (!r || z)
1057
+ function H(r, m) {
1058
+ if (!r || v)
1036
1059
  return "";
1037
1060
  {
1038
- var g = J.get(r);
1061
+ var g = C.get(r);
1039
1062
  if (g !== void 0)
1040
1063
  return g;
1041
1064
  }
1042
- var S;
1043
- z = !0;
1065
+ var w;
1066
+ v = !0;
1044
1067
  var N = Error.prepareStackTrace;
1045
1068
  Error.prepareStackTrace = void 0;
1046
1069
  var B;
1047
- B = G.current, G.current = null, O();
1070
+ B = Ve.current, Ve.current = null, Se();
1048
1071
  try {
1049
- if (f) {
1050
- var j = function() {
1072
+ if (m) {
1073
+ var k = function() {
1051
1074
  throw Error();
1052
1075
  };
1053
- if (Object.defineProperty(j.prototype, "props", {
1076
+ if (Object.defineProperty(k.prototype, "props", {
1054
1077
  set: function() {
1055
1078
  throw Error();
1056
1079
  }
1057
1080
  }), typeof Reflect == "object" && Reflect.construct) {
1058
1081
  try {
1059
- Reflect.construct(j, []);
1060
- } catch (_e) {
1061
- S = _e;
1082
+ Reflect.construct(k, []);
1083
+ } catch (Ie) {
1084
+ w = Ie;
1062
1085
  }
1063
- Reflect.construct(r, [], j);
1086
+ Reflect.construct(r, [], k);
1064
1087
  } else {
1065
1088
  try {
1066
- j.call();
1067
- } catch (_e) {
1068
- S = _e;
1089
+ k.call();
1090
+ } catch (Ie) {
1091
+ w = Ie;
1069
1092
  }
1070
- r.call(j.prototype);
1093
+ r.call(k.prototype);
1071
1094
  }
1072
1095
  } else {
1073
1096
  try {
1074
1097
  throw Error();
1075
- } catch (_e) {
1076
- S = _e;
1098
+ } catch (Ie) {
1099
+ w = Ie;
1077
1100
  }
1078
1101
  r();
1079
1102
  }
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)
1103
+ } catch (Ie) {
1104
+ if (Ie && w && typeof Ie.stack == "string") {
1105
+ for (var R = Ie.stack.split(`
1106
+ `), he = w.stack.split(`
1107
+ `), J = R.length - 1, ne = he.length - 1; J >= 1 && ne >= 0 && R[J] !== he[ne]; )
1108
+ ne--;
1109
+ for (; J >= 1 && ne >= 0; J--, ne--)
1110
+ if (R[J] !== he[ne]) {
1111
+ if (J !== 1 || ne !== 1)
1089
1112
  do
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;
1113
+ if (J--, ne--, ne < 0 || R[J] !== he[ne]) {
1114
+ var Ee = `
1115
+ ` + R[J].replace(" at new ", " at ");
1116
+ return r.displayName && Ee.includes("<anonymous>") && (Ee = Ee.replace("<anonymous>", r.displayName)), typeof r == "function" && C.set(r, Ee), Ee;
1094
1117
  }
1095
- while (Q >= 1 && te >= 0);
1118
+ while (J >= 1 && ne >= 0);
1096
1119
  break;
1097
1120
  }
1098
1121
  }
1099
1122
  } finally {
1100
- z = !1, G.current = B, A(), Error.prepareStackTrace = N;
1123
+ v = !1, Ve.current = B, it(), Error.prepareStackTrace = N;
1101
1124
  }
1102
- var Ke = r ? r.displayName || r.name : "", Ut = Ke ? se(Ke) : "";
1103
- return typeof r == "function" && J.set(r, Ut), Ut;
1125
+ var Qe = r ? r.displayName || r.name : "", Ut = Qe ? p(Qe) : "";
1126
+ return typeof r == "function" && C.set(r, Ut), Ut;
1104
1127
  }
1105
- function U(r, f, g) {
1106
- return k(r, !1);
1128
+ function X(r, m, g) {
1129
+ return H(r, !1);
1107
1130
  }
1108
- function re(r) {
1109
- var f = r.prototype;
1110
- return !!(f && f.isReactComponent);
1131
+ function de(r) {
1132
+ var m = r.prototype;
1133
+ return !!(m && m.isReactComponent);
1111
1134
  }
1112
- function we(r, f, g) {
1135
+ function z(r, m, g) {
1113
1136
  if (r == null)
1114
1137
  return "";
1115
1138
  if (typeof r == "function")
1116
- return k(r, re(r));
1139
+ return H(r, de(r));
1117
1140
  if (typeof r == "string")
1118
- return se(r);
1141
+ return p(r);
1119
1142
  switch (r) {
1120
- case u:
1121
- return se("Suspense");
1122
- case m:
1123
- return se("SuspenseList");
1143
+ case d:
1144
+ return p("Suspense");
1145
+ case f:
1146
+ return p("SuspenseList");
1124
1147
  }
1125
1148
  if (typeof r == "object")
1126
1149
  switch (r.$$typeof) {
1127
- case d:
1128
- return U(r.render);
1150
+ case u:
1151
+ return X(r.render);
1129
1152
  case b:
1130
- return we(r.type, f, g);
1153
+ return z(r.type, m, g);
1131
1154
  case E: {
1132
- var S = r, N = S._payload, B = S._init;
1155
+ var w = r, N = w._payload, B = w._init;
1133
1156
  try {
1134
- return we(B(N), f, g);
1157
+ return z(B(N), m, g);
1135
1158
  } catch {
1136
1159
  }
1137
1160
  }
1138
1161
  }
1139
1162
  return "";
1140
1163
  }
1141
- var Te = Object.prototype.hasOwnProperty, ht = {}, ft = F.ReactDebugCurrentFrame;
1142
- function Ue(r) {
1164
+ var Z = Object.prototype.hasOwnProperty, se = {}, A = U.ReactDebugCurrentFrame;
1165
+ function L(r) {
1143
1166
  if (r) {
1144
- var f = r._owner, g = we(r.type, r._source, f ? f.type : null);
1145
- ft.setExtraStackFrame(g);
1167
+ var m = r._owner, g = z(r.type, r._source, m ? m.type : null);
1168
+ A.setExtraStackFrame(g);
1146
1169
  } else
1147
- ft.setExtraStackFrame(null);
1170
+ A.setExtraStackFrame(null);
1148
1171
  }
1149
- function tt(r, f, g, S, N) {
1172
+ function ie(r, m, g, w, N) {
1150
1173
  {
1151
- var B = Function.call.bind(Te);
1152
- for (var j in r)
1153
- if (B(r, j)) {
1154
- var _ = void 0;
1174
+ var B = Function.call.bind(Z);
1175
+ for (var k in r)
1176
+ if (B(r, k)) {
1177
+ var R = void 0;
1155
1178
  try {
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`.");
1158
- throw de.name = "Invariant Violation", de;
1179
+ if (typeof r[k] != "function") {
1180
+ var he = Error((w || "React class") + ": " + g + " type `" + k + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof r[k] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
1181
+ throw he.name = "Invariant Violation", he;
1159
1182
  }
1160
- _ = r[j](f, j, S, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1161
- } catch (Q) {
1162
- _ = Q;
1183
+ R = r[k](m, k, w, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
1184
+ } catch (J) {
1185
+ R = J;
1163
1186
  }
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));
1187
+ R && !(R instanceof Error) && (L(N), j("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", w || "React class", g, k, typeof R), L(null)), R instanceof Error && !(R.message in se) && (se[R.message] = !0, L(N), j("Failed %s type: %s", g, R.message), L(null));
1165
1188
  }
1166
1189
  }
1167
1190
  }
1168
- var $e = Array.isArray;
1169
- function nt(r) {
1170
- return $e(r);
1191
+ var we = Array.isArray;
1192
+ function Ne(r) {
1193
+ return we(r);
1171
1194
  }
1172
1195
  function Ot(r) {
1173
1196
  {
1174
- var f = typeof Symbol == "function" && Symbol.toStringTag, g = f && r[Symbol.toStringTag] || r.constructor.name || "Object";
1197
+ var m = typeof Symbol == "function" && Symbol.toStringTag, g = m && r[Symbol.toStringTag] || r.constructor.name || "Object";
1175
1198
  return g;
1176
1199
  }
1177
1200
  }
1178
- function pt(r) {
1201
+ function ft(r) {
1179
1202
  try {
1180
- return mt(r), !1;
1203
+ return pt(r), !1;
1181
1204
  } catch {
1182
1205
  return !0;
1183
1206
  }
1184
1207
  }
1185
- function mt(r) {
1208
+ function pt(r) {
1186
1209
  return "" + r;
1187
1210
  }
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);
1211
+ function mt(r) {
1212
+ if (ft(r))
1213
+ return j("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Ot(r)), pt(r);
1191
1214
  }
1192
- var je = F.ReactCurrentOwner, at = {
1215
+ var Le = U.ReactCurrentOwner, rt = {
1193
1216
  key: !0,
1194
1217
  ref: !0,
1195
1218
  __self: !0,
1196
1219
  __source: !0
1197
- }, it, gt, qe;
1198
- qe = {};
1220
+ }, st, vt, Je;
1221
+ Je = {};
1199
1222
  function Mt(r) {
1200
- if (Te.call(r, "ref")) {
1201
- var f = Object.getOwnPropertyDescriptor(r, "ref").get;
1202
- if (f && f.isReactWarning)
1223
+ if (Z.call(r, "ref")) {
1224
+ var m = Object.getOwnPropertyDescriptor(r, "ref").get;
1225
+ if (m && m.isReactWarning)
1203
1226
  return !1;
1204
1227
  }
1205
1228
  return r.ref !== void 0;
1206
1229
  }
1207
1230
  function Tt(r) {
1208
- if (Te.call(r, "key")) {
1209
- var f = Object.getOwnPropertyDescriptor(r, "key").get;
1210
- if (f && f.isReactWarning)
1231
+ if (Z.call(r, "key")) {
1232
+ var m = Object.getOwnPropertyDescriptor(r, "key").get;
1233
+ if (m && m.isReactWarning)
1211
1234
  return !1;
1212
1235
  }
1213
1236
  return r.key !== void 0;
1214
1237
  }
1215
- function bt(r, f) {
1216
- if (typeof r.ref == "string" && je.current && f && je.current.stateNode !== f) {
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);
1238
+ function gt(r, m) {
1239
+ if (typeof r.ref == "string" && Le.current && m && Le.current.stateNode !== m) {
1240
+ var g = le(Le.current.type);
1241
+ Je[g] || (j('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', le(Le.current.type), r.ref), Je[g] = !0);
1219
1242
  }
1220
1243
  }
1221
- function De(r, f) {
1244
+ function Fe(r, m) {
1222
1245
  {
1223
1246
  var g = function() {
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));
1247
+ st || (st = !0, j("%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)", m));
1225
1248
  };
1226
1249
  g.isReactWarning = !0, Object.defineProperty(r, "key", {
1227
1250
  get: g,
@@ -1229,10 +1252,10 @@ function Oa() {
1229
1252
  });
1230
1253
  }
1231
1254
  }
1232
- function Bt(r, f) {
1255
+ function Bt(r, m) {
1233
1256
  {
1234
1257
  var g = function() {
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));
1258
+ vt || (vt = !0, j("%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)", m));
1236
1259
  };
1237
1260
  g.isReactWarning = !0, Object.defineProperty(r, "ref", {
1238
1261
  get: g,
@@ -1240,70 +1263,70 @@ function Oa() {
1240
1263
  });
1241
1264
  }
1242
1265
  }
1243
- var s = function(r, f, g, S, N, B, j) {
1244
- var _ = {
1266
+ var s = function(r, m, g, w, N, B, k) {
1267
+ var R = {
1245
1268
  // This tag allows us to uniquely identify this as a React Element
1246
1269
  $$typeof: n,
1247
1270
  // Built-in properties that belong on the element
1248
1271
  type: r,
1249
- key: f,
1272
+ key: m,
1250
1273
  ref: g,
1251
- props: j,
1274
+ props: k,
1252
1275
  // Record the component responsible for creating this element.
1253
1276
  _owner: B
1254
1277
  };
1255
- return _._store = {}, Object.defineProperty(_._store, "validated", {
1278
+ return R._store = {}, Object.defineProperty(R._store, "validated", {
1256
1279
  configurable: !1,
1257
1280
  enumerable: !1,
1258
1281
  writable: !0,
1259
1282
  value: !1
1260
- }), Object.defineProperty(_, "_self", {
1283
+ }), Object.defineProperty(R, "_self", {
1261
1284
  configurable: !1,
1262
1285
  enumerable: !1,
1263
1286
  writable: !1,
1264
- value: S
1265
- }), Object.defineProperty(_, "_source", {
1287
+ value: w
1288
+ }), Object.defineProperty(R, "_source", {
1266
1289
  configurable: !1,
1267
1290
  enumerable: !1,
1268
1291
  writable: !1,
1269
1292
  value: N
1270
- }), Object.freeze && (Object.freeze(_.props), Object.freeze(_)), _;
1293
+ }), Object.freeze && (Object.freeze(R.props), Object.freeze(R)), R;
1271
1294
  };
1272
- function y(r, f, g, S, N) {
1295
+ function y(r, m, g, w, N) {
1273
1296
  {
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]);
1297
+ var B, k = {}, R = null, he = null;
1298
+ g !== void 0 && (mt(g), R = "" + g), Tt(m) && (mt(m.key), R = "" + m.key), Mt(m) && (he = m.ref, gt(m, N));
1299
+ for (B in m)
1300
+ Z.call(m, B) && !rt.hasOwnProperty(B) && (k[B] = m[B]);
1278
1301
  if (r && r.defaultProps) {
1279
- var Q = r.defaultProps;
1280
- for (B in Q)
1281
- j[B] === void 0 && (j[B] = Q[B]);
1302
+ var J = r.defaultProps;
1303
+ for (B in J)
1304
+ k[B] === void 0 && (k[B] = J[B]);
1282
1305
  }
1283
- if (_ || de) {
1284
- var te = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
1285
- _ && De(j, te), de && Bt(j, te);
1306
+ if (R || he) {
1307
+ var ne = typeof r == "function" ? r.displayName || r.name || "Unknown" : r;
1308
+ R && Fe(k, ne), he && Bt(k, ne);
1286
1309
  }
1287
- return s(r, _, de, N, S, je.current, j);
1310
+ return s(r, R, he, N, w, Le.current, k);
1288
1311
  }
1289
1312
  }
1290
- var T = F.ReactCurrentOwner, L = F.ReactDebugCurrentFrame;
1291
- function q(r) {
1313
+ var T = U.ReactCurrentOwner, F = U.ReactDebugCurrentFrame;
1314
+ function W(r) {
1292
1315
  if (r) {
1293
- var f = r._owner, g = we(r.type, r._source, f ? f.type : null);
1294
- L.setExtraStackFrame(g);
1316
+ var m = r._owner, g = z(r.type, r._source, m ? m.type : null);
1317
+ F.setExtraStackFrame(g);
1295
1318
  } else
1296
- L.setExtraStackFrame(null);
1319
+ F.setExtraStackFrame(null);
1297
1320
  }
1298
- var Ee;
1299
- Ee = !1;
1321
+ var be;
1322
+ be = !1;
1300
1323
  function ue(r) {
1301
1324
  return typeof r == "object" && r !== null && r.$$typeof === n;
1302
1325
  }
1303
- function Rt() {
1326
+ function _t() {
1304
1327
  {
1305
1328
  if (T.current) {
1306
- var r = ie(T.current.type);
1329
+ var r = le(T.current.type);
1307
1330
  if (r)
1308
1331
  return `
1309
1332
 
@@ -1312,142 +1335,142 @@ Check the render method of \`` + r + "`.";
1312
1335
  return "";
1313
1336
  }
1314
1337
  }
1315
- function _t(r) {
1338
+ function Rt(r) {
1316
1339
  {
1317
1340
  if (r !== void 0) {
1318
- var f = r.fileName.replace(/^.*[\\\/]/, ""), g = r.lineNumber;
1341
+ var m = r.fileName.replace(/^.*[\\\/]/, ""), g = r.lineNumber;
1319
1342
  return `
1320
1343
 
1321
- Check your code at ` + f + ":" + g + ".";
1344
+ Check your code at ` + m + ":" + g + ".";
1322
1345
  }
1323
1346
  return "";
1324
1347
  }
1325
1348
  }
1326
- var rt = {};
1349
+ var ot = {};
1327
1350
  function Oe(r) {
1328
1351
  {
1329
- var f = Rt();
1330
- if (!f) {
1352
+ var m = _t();
1353
+ if (!m) {
1331
1354
  var g = typeof r == "string" ? r : r.displayName || r.name;
1332
- g && (f = `
1355
+ g && (m = `
1333
1356
 
1334
1357
  Check the top-level render call using <` + g + ">.");
1335
1358
  }
1336
- return f;
1359
+ return m;
1337
1360
  }
1338
1361
  }
1339
- function xe(r, f) {
1362
+ function ye(r, m) {
1340
1363
  {
1341
1364
  if (!r._store || r._store.validated || r.key != null)
1342
1365
  return;
1343
1366
  r._store.validated = !0;
1344
- var g = Oe(f);
1345
- if (rt[g])
1367
+ var g = Oe(m);
1368
+ if (ot[g])
1346
1369
  return;
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);
1370
+ ot[g] = !0;
1371
+ var w = "";
1372
+ r && r._owner && r._owner !== T.current && (w = " It was passed a child from " + le(r._owner.type) + "."), W(r), j('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, w), W(null);
1350
1373
  }
1351
1374
  }
1352
- function ze(r, f) {
1375
+ function Ge(r, m) {
1353
1376
  {
1354
1377
  if (typeof r != "object")
1355
1378
  return;
1356
- if (nt(r))
1379
+ if (Ne(r))
1357
1380
  for (var g = 0; g < r.length; g++) {
1358
- var S = r[g];
1359
- ue(S) && xe(S, f);
1381
+ var w = r[g];
1382
+ ue(w) && ye(w, m);
1360
1383
  }
1361
1384
  else if (ue(r))
1362
1385
  r._store && (r._store.validated = !0);
1363
1386
  else if (r) {
1364
- var N = Y(r);
1387
+ var N = V(r);
1365
1388
  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);
1389
+ for (var B = N.call(r), k; !(k = B.next()).done; )
1390
+ ue(k.value) && ye(k.value, m);
1368
1391
  }
1369
1392
  }
1370
1393
  }
1371
- function Ye(r) {
1394
+ function He(r) {
1372
1395
  {
1373
- var f = r.type;
1374
- if (f == null || typeof f == "string")
1396
+ var m = r.type;
1397
+ if (m == null || typeof m == "string")
1375
1398
  return;
1376
1399
  var g;
1377
- if (typeof f == "function")
1378
- g = f.propTypes;
1379
- else if (typeof f == "object" && (f.$$typeof === d || // Note: Memo only checks outer props here.
1400
+ if (typeof m == "function")
1401
+ g = m.propTypes;
1402
+ else if (typeof m == "object" && (m.$$typeof === u || // Note: Memo only checks outer props here.
1380
1403
  // Inner props are checked in the reconciler.
1381
- f.$$typeof === b))
1382
- g = f.propTypes;
1404
+ m.$$typeof === b))
1405
+ g = m.propTypes;
1383
1406
  else
1384
1407
  return;
1385
1408
  if (g) {
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");
1409
+ var w = le(m);
1410
+ ie(g, r.props, "prop", w, r);
1411
+ } else if (m.PropTypes !== void 0 && !be) {
1412
+ be = !0;
1413
+ var N = le(m);
1414
+ j("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", N || "Unknown");
1392
1415
  }
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.");
1416
+ typeof m.getDefaultProps == "function" && !m.getDefaultProps.isReactClassApproved && j("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1394
1417
  }
1395
1418
  }
1396
- function Ve(r) {
1419
+ function We(r) {
1397
1420
  {
1398
- for (var f = Object.keys(r.props), g = 0; g < f.length; g++) {
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);
1421
+ for (var m = Object.keys(r.props), g = 0; g < m.length; g++) {
1422
+ var w = m[g];
1423
+ if (w !== "children" && w !== "key") {
1424
+ W(r), j("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", w), W(null);
1402
1425
  break;
1403
1426
  }
1404
1427
  }
1405
- r.ref !== null && (q(r), M("Invalid attribute `ref` supplied to `React.Fragment`."), q(null));
1428
+ r.ref !== null && (W(r), j("Invalid attribute `ref` supplied to `React.Fragment`."), W(null));
1406
1429
  }
1407
1430
  }
1408
- function Ge(r, f, g, S, N, B) {
1431
+ function qe(r, m, g, w, N, B) {
1409
1432
  {
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, _);
1433
+ var k = ze(r);
1434
+ if (!k) {
1435
+ var R = "";
1436
+ (r === void 0 || typeof r == "object" && r !== null && Object.keys(r).length === 0) && (R += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1437
+ var he = Rt(N);
1438
+ he ? R += he : R += _t();
1439
+ var J;
1440
+ r === null ? J = "null" : Ne(r) ? J = "array" : r !== void 0 && r.$$typeof === n ? (J = "<" + (le(r.type) || "Unknown") + " />", R = " Did you accidentally export a JSX literal instead of a component?") : J = typeof r, j("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", J, R);
1418
1441
  }
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);
1442
+ var ne = y(r, m, g, N, B);
1443
+ if (ne == null)
1444
+ return ne;
1445
+ if (k) {
1446
+ var Ee = m.children;
1447
+ if (Ee !== void 0)
1448
+ if (w)
1449
+ if (Ne(Ee)) {
1450
+ for (var Qe = 0; Qe < Ee.length; Qe++)
1451
+ Ge(Ee[Qe], r);
1452
+ Object.freeze && Object.freeze(Ee);
1430
1453
  } else
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.");
1454
+ j("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1432
1455
  else
1433
- ze(Ce, r);
1456
+ Ge(Ee, r);
1434
1457
  }
1435
- return r === e ? Ve(te) : Ye(te), te;
1458
+ return r === e ? We(ne) : He(ne), ne;
1436
1459
  }
1437
1460
  }
1438
- function An(r, f, g) {
1439
- return Ge(r, f, g, !0);
1461
+ function An(r, m, g) {
1462
+ return qe(r, m, g, !0);
1440
1463
  }
1441
- function kn(r, f, g) {
1442
- return Ge(r, f, g, !1);
1464
+ function kn(r, m, g) {
1465
+ return qe(r, m, g, !1);
1443
1466
  }
1444
1467
  var jn = kn, Dn = An;
1445
- ot.Fragment = e, ot.jsx = jn, ot.jsxs = Dn;
1446
- }()), ot;
1468
+ lt.Fragment = e, lt.jsx = jn, lt.jsxs = Dn;
1469
+ }()), lt;
1447
1470
  }
1448
1471
  process.env.NODE_ENV === "production" ? Nt.exports = wa() : Nt.exports = Oa();
1449
1472
  var l = Nt.exports;
1450
- function Rn(t) {
1473
+ function _n(t) {
1451
1474
  return t.title.search("<") > -1 ? /* @__PURE__ */ l.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ l.jsx("button", { children: t.title });
1452
1475
  }
1453
1476
  const Ma = /* @__PURE__ */ l.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
@@ -1462,7 +1485,7 @@ 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
1462
1485
  C11,8.22,10.74,8,10.43,8z`
1463
1486
  }
1464
1487
  ) });
1465
- function Ra(t) {
1488
+ function _a(t) {
1466
1489
  return /* @__PURE__ */ l.jsx(Sn.Item, { value: t.title, children: /* @__PURE__ */ l.jsxs("div", { children: [
1467
1490
  Ta,
1468
1491
  /* @__PURE__ */ l.jsx("span", { children: t.title }),
@@ -1471,26 +1494,26 @@ function Ra(t) {
1471
1494
  }, children: Ma })
1472
1495
  ] }) }, t.title);
1473
1496
  }
1474
- function _a(t) {
1475
- const [n, a] = ne(!1), [e, i] = ne(t.options), o = (u) => {
1476
- t.onDragComplete(u), i(u);
1477
- }, h = (u) => {
1478
- const m = [...e];
1479
- m.splice(u, 1), o(m);
1480
- }, c = [];
1481
- e.forEach((u, m) => {
1482
- c.push(/* @__PURE__ */ l.jsx(Ra, { index: m, title: u, onDelete: h }, u));
1497
+ function Ra(t) {
1498
+ const [n, a] = ae(!1), [e, i] = ae(t.options), c = (d) => {
1499
+ t.onDragComplete(d), i(d);
1500
+ }, h = (d) => {
1501
+ const f = [...e];
1502
+ f.splice(d, 1), c(f);
1503
+ }, o = [];
1504
+ e.forEach((d, f) => {
1505
+ o.push(/* @__PURE__ */ l.jsx(_a, { index: f, title: d, onDelete: h }, d));
1483
1506
  });
1484
- let d = "dropdown draggable";
1485
- return t.subdropdown && (d += " subdropdown"), /* @__PURE__ */ l.jsxs("div", { className: d, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
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 })
1507
+ let u = "dropdown draggable";
1508
+ return t.subdropdown && (u += " subdropdown"), /* @__PURE__ */ l.jsxs("div", { className: u, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
1509
+ /* @__PURE__ */ l.jsx(_n, { title: t.title }),
1510
+ /* @__PURE__ */ l.jsx(Sn.Group, { axis: "y", values: e, onReorder: c, style: { visibility: n ? "visible" : "hidden" }, children: o })
1488
1511
  ] });
1489
1512
  }
1490
1513
  function Pa(t) {
1491
- const [n, a] = ne(!1), e = [];
1492
- t.options.map((o, h) => {
1493
- t.onSelect !== void 0 && (o.onSelect = t.onSelect), e.push(/* @__PURE__ */ l.jsx(Aa, { option: o }, h));
1514
+ const [n, a] = ae(!1), e = [];
1515
+ t.options.map((c, h) => {
1516
+ t.onSelect !== void 0 && (c.onSelect = t.onSelect), e.push(/* @__PURE__ */ l.jsx(Aa, { option: c }, h));
1494
1517
  });
1495
1518
  let i = "dropdown";
1496
1519
  return t.subdropdown && (i += " subdropdown"), /* @__PURE__ */ l.jsxs(
@@ -1500,7 +1523,7 @@ function Pa(t) {
1500
1523
  onMouseEnter: () => a(!0),
1501
1524
  onMouseLeave: () => a(!1),
1502
1525
  children: [
1503
- /* @__PURE__ */ l.jsx(Rn, { title: t.title }),
1526
+ /* @__PURE__ */ l.jsx(_n, { title: t.title }),
1504
1527
  /* @__PURE__ */ l.jsx(
1505
1528
  "ul",
1506
1529
  {
@@ -1513,17 +1536,17 @@ function Pa(t) {
1513
1536
  );
1514
1537
  }
1515
1538
  function Aa(t) {
1516
- const { option: n } = t, [a, e] = ne("");
1539
+ const { option: n } = t, [a, e] = ae("");
1517
1540
  let i;
1518
1541
  switch (n.type) {
1519
1542
  case "draggable":
1520
1543
  i = /* @__PURE__ */ l.jsx(
1521
- _a,
1544
+ Ra,
1522
1545
  {
1523
1546
  title: n.title,
1524
1547
  options: n.value,
1525
- onDragComplete: (o) => {
1526
- n.onDragComplete !== void 0 && n.onDragComplete(o);
1548
+ onDragComplete: (c) => {
1549
+ n.onDragComplete !== void 0 && n.onDragComplete(c);
1527
1550
  },
1528
1551
  subdropdown: !0
1529
1552
  }
@@ -1554,31 +1577,31 @@ function Aa(t) {
1554
1577
  }
1555
1578
  return /* @__PURE__ */ l.jsx("li", { className: a === n.title ? "selected" : "", children: i }, ma());
1556
1579
  }
1557
- function bi(t, n, a) {
1558
- function e(o) {
1580
+ function xi(t, n, a) {
1581
+ function e(c) {
1559
1582
  switch (n.forEach((h) => {
1560
- h.callback(t, h.remote, o);
1561
- }), o.event) {
1583
+ h.callback(t, h.remote, c);
1584
+ }), c.event) {
1562
1585
  case "custom":
1563
- D.dispatchEvent({ type: I.CUSTOM, value: o.data });
1586
+ D.dispatchEvent({ type: I.CUSTOM, value: c.data });
1564
1587
  break;
1565
1588
  }
1566
1589
  }
1567
- function i(o) {
1590
+ function i(c) {
1568
1591
  switch (a.forEach((h) => {
1569
- h.callback(t, h.remote, o);
1570
- }), o.event) {
1592
+ h.callback(t, h.remote, c);
1593
+ }), c.event) {
1571
1594
  case "custom":
1572
- D.dispatchEvent({ type: I.CUSTOM, value: o.data });
1595
+ D.dispatchEvent({ type: I.CUSTOM, value: c.data });
1573
1596
  break;
1574
1597
  }
1575
1598
  }
1576
- t.listen = (o) => {
1577
- o.target === "editor" ? i(o) : e(o);
1599
+ t.listen = (c) => {
1600
+ c.target === "editor" ? i(c) : e(c);
1578
1601
  };
1579
1602
  }
1580
1603
  function Ft(t) {
1581
- const [n, a] = ne(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
1604
+ const [n, a] = ae(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
1582
1605
  return /* @__PURE__ */ l.jsxs("div", { className: `accordion ${e ? "hide" : ""}`, children: [
1583
1606
  /* @__PURE__ */ l.jsxs(
1584
1607
  "button",
@@ -1596,7 +1619,7 @@ function Ft(t) {
1596
1619
  children: "Toggle"
1597
1620
  }
1598
1621
  ),
1599
- /* @__PURE__ */ l.jsx("p", { className: "label", children: dt(t.label) })
1622
+ /* @__PURE__ */ l.jsx("p", { className: "label", children: St(t.label) })
1600
1623
  ]
1601
1624
  }
1602
1625
  ),
@@ -1604,10 +1627,10 @@ function Ft(t) {
1604
1627
  /* @__PURE__ */ l.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ l.jsx("div", { children: t.children }) })
1605
1628
  ] });
1606
1629
  }
1607
- function _n(t) {
1608
- const [n, a] = ne(!1), e = t.child !== void 0 && t.child.children.length > 0, i = [];
1609
- return t.child !== void 0 && t.child.children.length > 0 && t.child.children.map((o) => {
1610
- i.push(/* @__PURE__ */ l.jsx(_n, { child: o, three: t.three }, Math.random()));
1630
+ function Rn(t) {
1631
+ const [n, a] = ae(!1), e = t.child !== void 0 && t.child.children.length > 0, i = [];
1632
+ return t.child !== void 0 && t.child.children.length > 0 && t.child.children.map((c) => {
1633
+ i.push(/* @__PURE__ */ l.jsx(Rn, { child: c, three: t.three }, Math.random()));
1611
1634
  }), /* @__PURE__ */ l.jsx(l.Fragment, { children: t.child !== void 0 && /* @__PURE__ */ l.jsxs("div", { className: "childObject", children: [
1612
1635
  /* @__PURE__ */ l.jsxs("div", { className: "child", children: [
1613
1636
  e ? /* @__PURE__ */ l.jsx(
@@ -1643,21 +1666,21 @@ function _n(t) {
1643
1666
  function ka(t) {
1644
1667
  const n = [];
1645
1668
  return t.child?.children.map((a) => {
1646
- n.push(/* @__PURE__ */ l.jsx(_n, { child: a, three: t.three }, Math.random()));
1669
+ n.push(/* @__PURE__ */ l.jsx(Rn, { child: a, three: t.three }, Math.random()));
1647
1670
  }), /* @__PURE__ */ l.jsx("div", { className: `scene ${t.class !== void 0 ? t.class : ""}`, children: n });
1648
1671
  }
1649
1672
  const ja = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1650
1673
  function Da(t) {
1651
1674
  return "items" in t;
1652
1675
  }
1653
- function We(t) {
1676
+ function Ze(t) {
1654
1677
  const n = [];
1655
1678
  return t.items.forEach((a) => {
1656
1679
  Da(a) ? n.push(
1657
- /* @__PURE__ */ l.jsx(We, { title: dt(a.title), items: a.items }, Math.random())
1680
+ /* @__PURE__ */ l.jsx(Ze, { title: St(a.title), items: a.items }, Math.random())
1658
1681
  ) : n.push(
1659
1682
  /* @__PURE__ */ l.jsx(
1660
- lt,
1683
+ dt,
1661
1684
  {
1662
1685
  title: a.title,
1663
1686
  prop: a.prop,
@@ -1680,7 +1703,7 @@ function We(t) {
1680
1703
  function Ia(t) {
1681
1704
  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");
1682
1705
  }
1683
- function Ie(t) {
1706
+ function Ae(t) {
1684
1707
  switch (t) {
1685
1708
  case "alphaMap":
1686
1709
  return "Alpha Map";
@@ -1864,8 +1887,8 @@ function La() {
1864
1887
  a();
1865
1888
  else {
1866
1889
  const e = t.files[0], i = new FileReader();
1867
- i.onload = function(o) {
1868
- n(o.target.result);
1890
+ i.onload = function(c) {
1891
+ n(c.target.result);
1869
1892
  }, i.readAsDataURL(e);
1870
1893
  }
1871
1894
  }), t.click();
@@ -2049,256 +2072,283 @@ const Fa = [
2049
2072
  valye: En
2050
2073
  }
2051
2074
  ];
2052
- function ct(t, n) {
2075
+ function ut(t, n) {
2053
2076
  t.needsUpdate = !0, t.type = "option", t.options = n;
2054
2077
  }
2078
+ function Ya(t, n, a, e) {
2079
+ return {
2080
+ type: "boolean",
2081
+ title: Ae(t),
2082
+ prop: t,
2083
+ value: n,
2084
+ needsUpdate: !0,
2085
+ onChange: (i, c) => {
2086
+ e.updateObject(a.uuid, `material.${t}`, c), e.updateObject(a.uuid, "material.needsUpdate", !0);
2087
+ const h = e.scene?.getObjectByProperty("uuid", a.uuid);
2088
+ h !== void 0 && K(h, `material.${t}`, c);
2089
+ }
2090
+ };
2091
+ }
2092
+ function Va(t, n, a, e) {
2093
+ const i = {
2094
+ type: "number",
2095
+ title: Ae(t),
2096
+ prop: t,
2097
+ value: n,
2098
+ min: void 0,
2099
+ max: void 0,
2100
+ step: 0.01,
2101
+ needsUpdate: !0,
2102
+ onChange: (c, h) => {
2103
+ e.updateObject(a.uuid, `material.${t}`, h), e.updateObject(a.uuid, "material.needsUpdate", !0);
2104
+ const o = e.scene?.getObjectByProperty("uuid", a.uuid);
2105
+ o !== void 0 && K(o, `material.${t}`, h);
2106
+ }
2107
+ };
2108
+ switch (t) {
2109
+ case "blending":
2110
+ ut(i, Ba);
2111
+ break;
2112
+ case "blendDst":
2113
+ ut(i, za);
2114
+ break;
2115
+ case "blendEquation":
2116
+ ut(i, Ua);
2117
+ break;
2118
+ case "blendSrc":
2119
+ ut(i, $a);
2120
+ break;
2121
+ case "side":
2122
+ ut(i, Fa);
2123
+ break;
2124
+ }
2125
+ return Na(t) && (i.value = Number(n), i.type = "range", i.min = 0, i.max = 1, i.step = 0.01), i;
2126
+ }
2127
+ function Ga(t, n, a, e) {
2128
+ const i = {
2129
+ type: "string",
2130
+ title: Ae(t),
2131
+ prop: t,
2132
+ value: n,
2133
+ needsUpdate: !0,
2134
+ onChange: (h, o) => {
2135
+ e.updateObject(a.uuid, `material.${t}`, o), e.updateObject(a.uuid, "material.needsUpdate", !0);
2136
+ const u = e.scene?.getObjectByProperty("uuid", a.uuid);
2137
+ u !== void 0 && K(u, `material.${t}`, o);
2138
+ }
2139
+ };
2140
+ return (t === "vertexShader" || t === "fragmentShader") && (i.disabled = !1, i.latest = i.value, i.onChange = (h, o) => {
2141
+ i.latest = o;
2142
+ }), i;
2143
+ }
2055
2144
  function Xt(t, n, a) {
2056
2145
  const e = [];
2057
2146
  for (const i in t) {
2058
2147
  if (!Ia(i))
2059
2148
  continue;
2060
- const o = typeof t[i], h = t[i];
2061
- if (o === "boolean" || o === "number" || o === "string") {
2062
- const c = {
2063
- title: Ie(i),
2064
- prop: i,
2065
- type: o,
2066
- value: h,
2067
- min: void 0,
2068
- max: void 0,
2069
- needsUpdate: o === "boolean",
2070
- onChange: (u, m) => {
2071
- a.updateObject(n.uuid, `material.${u}`, m), c.needsUpdate && a.updateObject(n.uuid, "material.needsUpdate", !0);
2072
- const b = a.scene?.getObjectByProperty("uuid", n.uuid);
2073
- b !== void 0 && ee(b, `material.${u}`, m);
2074
- }
2075
- };
2076
- switch (i) {
2077
- case "blending":
2078
- ct(c, Ba);
2079
- break;
2080
- case "blendDst":
2081
- ct(c, za);
2082
- break;
2083
- case "blendEquation":
2084
- ct(c, Ua);
2085
- break;
2086
- case "blendSrc":
2087
- ct(c, $a);
2088
- break;
2089
- case "side":
2090
- ct(c, Fa);
2091
- break;
2092
- }
2093
- Na(i) && (c.value = Number(h), c.type = "range", c.min = 0, c.max = 1, c.step = 0.01);
2094
- const d = o === "string" && (i === "vertexShader" || i === "fragmentShader");
2095
- d && (c.disabled = !1, c.latest = c.value, c.onChange = (u, m) => {
2096
- c.latest = m;
2097
- }), e.push(c), d && e.push({
2098
- title: `${dt(i)} - Update`,
2099
- type: "button",
2100
- onChange: () => {
2101
- a.updateObject(n.uuid, `material.${i}`, c.latest), a.updateObject(n.uuid, "material.needsUpdate", !0);
2102
- const u = a.scene?.getObjectByProperty("uuid", n.uuid);
2103
- u !== void 0 && (ee(u, `material.${i}`, c.latest), u.material.needsUpdate = !0);
2104
- }
2105
- });
2106
- } else if (o === "object")
2149
+ const c = typeof t[i], h = t[i];
2150
+ if (c === "boolean")
2151
+ e.push(Ya(i, h, n, a));
2152
+ else if (c === "number")
2153
+ e.push(Va(i, h, n, a));
2154
+ else if (c === "string")
2155
+ e.push(Ga(i, h, n, a));
2156
+ else if (c === "object")
2107
2157
  if (h.isColor)
2108
2158
  e.push({
2109
- title: Ie(i),
2159
+ title: Ae(i),
2110
2160
  prop: i,
2111
2161
  type: "color",
2112
2162
  value: h,
2113
- onChange: (c, d) => {
2114
- const u = new St(d);
2115
- a.updateObject(n.uuid, `material.${c}`, u);
2116
- const m = a.scene?.getObjectByProperty("uuid", n.uuid);
2117
- m !== void 0 && ee(m, `material.${c}`, u);
2163
+ onChange: (o, u) => {
2164
+ const d = new Ct(u);
2165
+ a.updateObject(n.uuid, `material.${o}`, d);
2166
+ const f = a.scene?.getObjectByProperty("uuid", n.uuid);
2167
+ f !== void 0 && K(f, `material.${o}`, d);
2118
2168
  }
2119
2169
  });
2120
2170
  else if (Array.isArray(h)) {
2121
- const c = [];
2122
- for (const d in h)
2123
- c.push({
2124
- title: `${d}`,
2125
- type: `${typeof h[d]}`,
2126
- value: h[d],
2127
- onChange: (u, m) => {
2128
- a.updateObject(n.uuid, `material.${i}`, m);
2171
+ const o = [];
2172
+ for (const u in h)
2173
+ o.push({
2174
+ title: `${u}`,
2175
+ type: `${typeof h[u]}`,
2176
+ value: h[u],
2177
+ onChange: (d, f) => {
2178
+ a.updateObject(n.uuid, `material.${i}`, f);
2129
2179
  const b = a.scene?.getObjectByProperty("uuid", n.uuid);
2130
- b !== void 0 && ee(b, `material.${i}`, m);
2180
+ b !== void 0 && K(b, `material.${i}`, f);
2131
2181
  }
2132
2182
  });
2133
2183
  e.push({
2134
- title: Ie(i),
2135
- items: c
2184
+ title: Ae(i),
2185
+ items: o
2136
2186
  });
2137
2187
  } else if (h.x !== void 0 && h.y !== void 0 && h.z === void 0)
2138
2188
  e.push({
2139
- title: Ie(i),
2189
+ title: Ae(i),
2140
2190
  prop: i,
2141
2191
  type: "vector",
2142
2192
  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);
2193
+ onChange: (o, u) => {
2194
+ a.updateObject(n.uuid, `material.${o}`, u);
2195
+ const d = a.scene?.getObjectByProperty("uuid", n.uuid);
2196
+ d !== void 0 && K(d, `material.${o}`, u);
2147
2197
  }
2148
2198
  });
2149
2199
  else {
2150
- const c = [];
2151
- for (const d in h) {
2152
- const u = h[d];
2153
- switch (typeof u) {
2200
+ const o = [];
2201
+ for (const u in h) {
2202
+ const d = h[u];
2203
+ switch (typeof d) {
2154
2204
  case "boolean":
2155
2205
  case "number":
2156
2206
  case "string":
2157
- d === "src" ? e.push({
2158
- title: Ie(i),
2207
+ u === "src" ? e.push({
2208
+ title: Ae(i),
2159
2209
  type: "image",
2160
- value: u,
2210
+ value: d,
2161
2211
  onChange: (b, E) => {
2162
2212
  a.createTexture(n.uuid, `material.${i}`, E);
2163
2213
  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);
2214
+ x !== void 0 && It(E).then((M) => {
2215
+ K(x, `material.${i}`, M), K(x, "material.needsUpdate", !0);
2166
2216
  });
2167
2217
  }
2168
- }) : c.push({
2169
- title: `${Ie(d)}`,
2170
- prop: `material.${i}.${d}`,
2171
- type: `${typeof t[i][d]}`,
2172
- value: h[d],
2218
+ }) : o.push({
2219
+ title: `${Ae(u)}`,
2220
+ prop: `material.${i}.${u}`,
2221
+ type: `${typeof t[i][u]}`,
2222
+ value: h[u],
2173
2223
  onChange: (b, E) => {
2174
- a.updateObject(n.uuid, `material.${i}.${d}`, E);
2224
+ a.updateObject(n.uuid, `material.${i}.${u}`, E);
2175
2225
  const x = a.scene?.getObjectByProperty("uuid", n.uuid);
2176
- x !== void 0 && ee(x, `material.${i}.${d}`, E);
2226
+ x !== void 0 && K(x, `material.${i}.${u}`, E);
2177
2227
  }
2178
2228
  });
2179
2229
  break;
2180
2230
  case "object":
2181
- if (u.value !== void 0 && u.value.src !== void 0)
2182
- c.push({
2183
- title: Ie(d),
2231
+ if (d.value !== void 0 && d.value.src !== void 0)
2232
+ o.push({
2233
+ title: Ae(u),
2184
2234
  type: "image",
2185
- value: u.value.src,
2235
+ value: d.value.src,
2186
2236
  onChange: (b, E) => {
2187
- a.createTexture(n.uuid, `material.${i}.${d}.value`, h);
2237
+ a.createTexture(n.uuid, `material.${i}.${u}.value`, h);
2188
2238
  const x = a.scene?.getObjectByProperty("uuid", n.uuid);
2189
- x !== void 0 && It(E).then((R) => {
2190
- ee(x, `material.${i}.${d}.value`, R);
2239
+ x !== void 0 && It(E).then((M) => {
2240
+ K(x, `material.${i}.${u}.value`, M);
2191
2241
  });
2192
2242
  }
2193
2243
  });
2194
2244
  else if (i === "uniforms") {
2195
- const b = u.value, E = (x, R, P) => ({
2245
+ const b = d.value, E = (x, M, P) => ({
2196
2246
  title: x,
2197
2247
  type: "number",
2198
2248
  value: P,
2199
2249
  step: 0.01,
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);
2250
+ onChange: (V, U) => {
2251
+ const j = `material.uniforms.${u}.value.${M}`;
2252
+ a.updateObject(n.uuid, j, U);
2253
+ const O = a.scene?.getObjectByProperty("uuid", n.uuid);
2254
+ O !== void 0 && K(O, j, U);
2205
2255
  }
2206
2256
  });
2207
- if (typeof u.value == "number")
2208
- c.push({
2209
- title: d,
2257
+ if (typeof d.value == "number")
2258
+ o.push({
2259
+ title: u,
2210
2260
  type: "number",
2211
- value: u.value,
2261
+ value: d.value,
2212
2262
  step: 0.01,
2213
- onChange: (x, R) => {
2263
+ onChange: (x, M) => {
2214
2264
  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);
2265
+ a.updateObject(n.uuid, P, M);
2266
+ const V = a.scene?.getObjectByProperty("uuid", n.uuid);
2267
+ V !== void 0 && K(V, P, M);
2218
2268
  }
2219
2269
  });
2220
2270
  else if (b.r !== void 0 && b.g !== void 0 && b.b !== void 0)
2221
- c.push({
2222
- title: d,
2271
+ o.push({
2272
+ title: u,
2223
2273
  type: "color",
2224
- value: u.value,
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);
2274
+ value: d.value,
2275
+ onChange: (x, M) => {
2276
+ const P = new Ct(M), V = `material.${i}.${x}.value`;
2277
+ a.updateObject(n.uuid, V, P);
2278
+ const U = a.scene?.getObjectByProperty("uuid", n.uuid);
2279
+ U !== void 0 && K(U, V, P);
2230
2280
  }
2231
2281
  });
2232
2282
  else if (b.x !== void 0 && b.y !== void 0 && b.z === void 0 && b.w === void 0)
2233
- c.push({
2234
- title: d,
2283
+ o.push({
2284
+ title: u,
2235
2285
  type: "vector",
2236
- value: u.value,
2237
- prop: `material.${i}.${d}.value`,
2238
- onChange: (x, R) => {
2239
- a.updateObject(n.uuid, x, R);
2286
+ value: d.value,
2287
+ prop: `material.${i}.${u}.value`,
2288
+ onChange: (x, M) => {
2289
+ a.updateObject(n.uuid, x, M);
2240
2290
  const P = a.scene?.getObjectByProperty("uuid", n.uuid);
2241
- P !== void 0 && ee(P, x, R);
2291
+ P !== void 0 && K(P, x, M);
2242
2292
  }
2243
2293
  });
2244
2294
  else if (b.x !== void 0 && b.y !== void 0 && b.z !== void 0 && b.w === void 0)
2245
- c.push(
2295
+ o.push(
2246
2296
  {
2247
- title: d,
2297
+ title: u,
2248
2298
  items: [
2249
- E("X", "x", u.value.x),
2250
- E("Y", "y", u.value.y),
2251
- E("Z", "z", u.value.z)
2299
+ E("X", "x", d.value.x),
2300
+ E("Y", "y", d.value.y),
2301
+ E("Z", "z", d.value.z)
2252
2302
  ]
2253
2303
  }
2254
2304
  );
2255
2305
  else if (b.x !== void 0 && b.y !== void 0 && b.z !== void 0 && b.w !== void 0)
2256
- c.push(
2306
+ o.push(
2257
2307
  {
2258
- title: d,
2308
+ title: u,
2259
2309
  items: [
2260
- E("X", "x", u.value.x),
2261
- E("Y", "y", u.value.y),
2262
- E("Z", "z", u.value.z),
2263
- E("W", "w", u.value.w)
2310
+ E("X", "x", d.value.x),
2311
+ E("Y", "y", d.value.y),
2312
+ E("Z", "z", d.value.z),
2313
+ E("W", "w", d.value.w)
2264
2314
  ]
2265
2315
  }
2266
2316
  );
2267
2317
  else if (b.elements !== void 0) {
2268
- const x = b.elements, R = [];
2318
+ const x = b.elements, M = [];
2269
2319
  for (let P = 0; P < x.length; P++)
2270
- R.push(E(P.toString(), P.toString(), x[P]));
2271
- c.push(
2320
+ M.push(E(P.toString(), P.toString(), x[P]));
2321
+ o.push(
2272
2322
  {
2273
- title: d,
2274
- items: R
2323
+ title: u,
2324
+ items: M
2275
2325
  }
2276
2326
  );
2277
2327
  } else
2278
- console.log(">>> need to add this format:", d, b);
2328
+ console.log(">>> need to add this format:", u, b);
2279
2329
  } else
2280
- c.push({
2281
- title: d,
2282
- type: `${typeof u.value}`,
2283
- value: u.value,
2330
+ o.push({
2331
+ title: u,
2332
+ type: `${typeof d.value}`,
2333
+ value: d.value,
2284
2334
  onChange: (b, E) => {
2285
- a.updateObject(n.uuid, `material.${i}.${d}.value`, E);
2335
+ a.updateObject(n.uuid, `material.${i}.${u}.value`, E);
2286
2336
  const x = a.scene?.getObjectByProperty("uuid", n.uuid);
2287
- x !== void 0 && ee(x, `material.${i}.${d}.value`, E);
2337
+ x !== void 0 && K(x, `material.${i}.${u}.value`, E);
2288
2338
  }
2289
2339
  });
2290
2340
  break;
2291
2341
  }
2292
2342
  }
2293
- c.length > 0 && e.push({
2294
- title: Ie(i),
2295
- items: c
2343
+ o.length > 0 && e.push({
2344
+ title: Ae(i),
2345
+ items: o
2296
2346
  });
2297
2347
  }
2298
2348
  else
2299
- h !== void 0 && console.log("other:", i, o, h);
2349
+ h !== void 0 && console.log("other:", i, c, h);
2300
2350
  }
2301
- return e.sort((i, o) => i.title < o.title ? -1 : i.title > o.title ? 1 : 0), e.push({
2351
+ return e.sort((i, c) => i.title < c.title ? -1 : i.title > c.title ? 1 : 0), e.push({
2302
2352
  title: "Update Material",
2303
2353
  type: "button",
2304
2354
  onChange: () => {
@@ -2306,60 +2356,59 @@ function Xt(t, n, a) {
2306
2356
  }
2307
2357
  }), e;
2308
2358
  }
2309
- function Ya(t, n) {
2359
+ function Ha(t, n) {
2310
2360
  const a = t.material;
2311
2361
  if (Array.isArray(a)) {
2312
2362
  const e = [], i = a.length;
2313
- for (let o = 0; o < i; o++)
2363
+ for (let c = 0; c < i; c++)
2314
2364
  e.push(
2315
2365
  /* @__PURE__ */ l.jsx(
2316
- We,
2366
+ Ze,
2317
2367
  {
2318
- title: `Material ${o}`,
2319
- items: Xt(a[o], t, n)
2368
+ title: `Material ${c}`,
2369
+ items: Xt(a[c], t, n)
2320
2370
  },
2321
- `Material ${o}`
2371
+ `Material ${c}`
2322
2372
  )
2323
2373
  );
2324
2374
  return /* @__PURE__ */ l.jsx(l.Fragment, { children: e });
2325
2375
  } else
2326
2376
  return /* @__PURE__ */ l.jsx(
2327
- We,
2377
+ Ze,
2328
2378
  {
2329
2379
  title: "Material",
2330
2380
  items: Xt(a, t, n)
2331
2381
  }
2332
2382
  );
2333
2383
  }
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);
2384
+ function Wa(t) {
2385
+ const n = fe(null), a = fe(null), e = fe(null), i = fe(null), c = fe(null), h = fe(null), [o, u] = ae(t.value), [d, f] = ae({ min: t.min, max: t.max }), [b, E] = ae(!1);
2336
2386
  function x() {
2337
- b || (window.addEventListener("mousemove", P), window.addEventListener("mouseup", R), window.addEventListener("mouseup", R), E(!0));
2387
+ b || (window.addEventListener("mousemove", P), window.addEventListener("mouseup", M), window.addEventListener("mouseup", M), E(!0));
2388
+ }
2389
+ function M() {
2390
+ window.removeEventListener("mousemove", P), window.removeEventListener("mouseup", M), E(!1);
2338
2391
  }
2339
- function R() {
2340
- window.removeEventListener("mousemove", P), window.removeEventListener("mouseup", R), E(!1);
2392
+ function P(O) {
2393
+ const re = c.current.getBoundingClientRect(), Q = Xe(0, 99, O.clientX - re.left) / 99, Ce = Xe(0, 99, O.clientY - re.top) / 99, G = ht(Wt(d.min, d.max, Q), 3), ee = ht(Wt(d.min, d.max, Ce), 3);
2394
+ t.onChange({ target: { value: { x: G, y: ee } } }), u({ x: G, y: ee });
2341
2395
  }
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 });
2396
+ function V(O) {
2397
+ let re = o.x, Q = o.y;
2398
+ O.target === n.current ? re = Number(O.target.value) : Q = Number(O.target.value), u({ x: re, y: Q });
2345
2399
  }
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 });
2400
+ function U() {
2401
+ const O = Number(e.current.value);
2402
+ f({ min: O, max: d.max }), (o.x < O || o.y < O) && u({ x: Xe(O, d.max, o.x), y: Xe(O, d.max, o.y) });
2349
2403
  }
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) });
2404
+ function j() {
2405
+ const O = Number(i.current.value);
2406
+ f({ min: d.min, max: O }), (o.x > O || o.y > O) && u({ x: Xe(d.min, O, o.x), y: Xe(d.min, O, o.y) });
2353
2407
  }
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: [
2408
+ return ke(() => {
2409
+ const O = Ht(d.min, d.max, o.x), re = Ht(d.min, d.max, o.y);
2410
+ h.current.style.left = `${O * 100}%`, h.current.style.top = `${re * 100}%`;
2411
+ }, [d, o]), /* @__PURE__ */ l.jsxs("div", { className: "vector", children: [
2363
2412
  /* @__PURE__ */ l.jsxs("div", { className: "fields", children: [
2364
2413
  /* @__PURE__ */ l.jsxs("div", { children: [
2365
2414
  /* @__PURE__ */ l.jsx("label", { children: "X:" }),
@@ -2368,11 +2417,11 @@ function Va(t) {
2368
2417
  {
2369
2418
  ref: n,
2370
2419
  type: "number",
2371
- value: c.x,
2372
- min: u.min,
2373
- max: u.max,
2420
+ value: o.x,
2421
+ min: d.min,
2422
+ max: d.max,
2374
2423
  step: 0.01,
2375
- onChange: Y
2424
+ onChange: V
2376
2425
  }
2377
2426
  )
2378
2427
  ] }),
@@ -2383,11 +2432,11 @@ function Va(t) {
2383
2432
  {
2384
2433
  ref: a,
2385
2434
  type: "number",
2386
- value: c.y,
2387
- min: u.min,
2388
- max: u.max,
2435
+ value: o.y,
2436
+ min: d.min,
2437
+ max: d.max,
2389
2438
  step: 0.01,
2390
- onChange: Y
2439
+ onChange: V
2391
2440
  }
2392
2441
  )
2393
2442
  ] }),
@@ -2398,9 +2447,9 @@ function Va(t) {
2398
2447
  {
2399
2448
  ref: e,
2400
2449
  type: "number",
2401
- value: u.min,
2450
+ value: d.min,
2402
2451
  step: 0.01,
2403
- onChange: F
2452
+ onChange: U
2404
2453
  }
2405
2454
  )
2406
2455
  ] }),
@@ -2411,65 +2460,65 @@ function Va(t) {
2411
2460
  {
2412
2461
  ref: i,
2413
2462
  type: "number",
2414
- value: u.max,
2463
+ value: d.max,
2415
2464
  step: 0.01,
2416
- onChange: M
2465
+ onChange: j
2417
2466
  }
2418
2467
  )
2419
2468
  ] })
2420
2469
  ] }),
2421
- /* @__PURE__ */ l.jsxs("div", { className: "input", ref: o, onMouseDown: x, onMouseUp: R, children: [
2470
+ /* @__PURE__ */ l.jsxs("div", { className: "input", ref: c, onMouseDown: x, onMouseUp: M, children: [
2422
2471
  /* @__PURE__ */ l.jsx("div", { className: "x" }),
2423
2472
  /* @__PURE__ */ l.jsx("div", { className: "y" }),
2424
2473
  /* @__PURE__ */ l.jsx("div", { className: "pt", ref: h })
2425
2474
  ] })
2426
2475
  ] });
2427
2476
  }
2428
- function lt(t) {
2477
+ function dt(t) {
2429
2478
  let n = t.value;
2430
2479
  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)
2480
+ const [a, e] = ae(n), i = fe(null), c = fe(null), h = fe(null);
2481
+ ke(() => {
2482
+ let f = !1, b = -1, E = 0, x = Number(a);
2483
+ const M = (O) => {
2484
+ f = !0, E = x, b = O.clientX;
2485
+ }, P = (O) => {
2486
+ if (!f)
2438
2487
  return;
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;
2445
- }, M = t.type === "number";
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));
2488
+ const re = t.step !== void 0 ? t.step : 1, Q = (O.clientX - b) * re;
2489
+ x = Number((E + Q).toFixed(4)), c.current !== null && (c.current.value = x.toString()), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, x);
2490
+ }, V = () => {
2491
+ f = !1;
2492
+ }, U = () => {
2493
+ f = !1;
2494
+ }, j = t.type === "number";
2495
+ return j && (i.current?.addEventListener("mousedown", M, !1), document.addEventListener("mouseup", V, !1), document.addEventListener("mousemove", P, !1), document.addEventListener("contextmenu", U, !1)), () => {
2496
+ j && (i.current?.removeEventListener("mousedown", M), document.removeEventListener("mouseup", V), document.removeEventListener("mousemove", P), document.removeEventListener("contextmenu", U));
2448
2497
  };
2449
2498
  }, [a]);
2450
- const c = t.type === "string" && (a.length > 100 || a.search(`
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);
2499
+ const o = t.type === "string" && (a.length > 100 || a.search(`
2500
+ `) > -1), u = o || t.type === "image" || t.type === "vector", d = (f) => {
2501
+ let b = f.target.value;
2502
+ t.type === "boolean" ? b = f.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);
2454
2503
  };
2455
- return /* @__PURE__ */ l.jsxs("div", { className: `field ${d ? "block" : ""}`, children: [
2456
- t.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: i, children: dt(t.title) }, "fieldLabel"),
2457
- t.type === "string" && !c && /* @__PURE__ */ l.jsx(
2504
+ return /* @__PURE__ */ l.jsxs("div", { className: `field ${u ? "block" : ""}`, children: [
2505
+ t.type !== "button" && /* @__PURE__ */ l.jsx("label", { ref: i, children: St(t.title) }, "fieldLabel"),
2506
+ t.type === "string" && !o && /* @__PURE__ */ l.jsx(
2458
2507
  "input",
2459
2508
  {
2460
2509
  type: "text",
2461
2510
  disabled: t.disabled,
2462
- onChange: u,
2511
+ onChange: d,
2463
2512
  value: a
2464
2513
  }
2465
2514
  ),
2466
- t.type === "string" && c && /* @__PURE__ */ l.jsx(
2515
+ t.type === "string" && o && /* @__PURE__ */ l.jsx(
2467
2516
  "textarea",
2468
2517
  {
2469
2518
  cols: 50,
2470
2519
  rows: 10,
2471
2520
  disabled: t.disabled !== void 0 ? t.disabled : !0,
2472
- onChange: u,
2521
+ onChange: d,
2473
2522
  value: a
2474
2523
  }
2475
2524
  ),
@@ -2478,25 +2527,25 @@ function lt(t) {
2478
2527
  {
2479
2528
  type: "checkbox",
2480
2529
  disabled: t.disabled,
2481
- onChange: u,
2530
+ onChange: d,
2482
2531
  checked: a
2483
2532
  }
2484
2533
  ),
2485
2534
  t.type === "number" && /* @__PURE__ */ l.jsx(
2486
2535
  "input",
2487
2536
  {
2488
- ref: o,
2537
+ ref: c,
2489
2538
  type: "number",
2490
2539
  value: a,
2491
2540
  min: t.min,
2492
2541
  max: t.max,
2493
2542
  step: t.step,
2494
2543
  disabled: t.disabled,
2495
- onChange: u
2544
+ onChange: d
2496
2545
  }
2497
2546
  ),
2498
2547
  t.type === "range" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2499
- /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: u, disabled: t.disabled, className: "min" }),
2548
+ /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: d, disabled: t.disabled, className: "min" }),
2500
2549
  /* @__PURE__ */ l.jsx(
2501
2550
  "input",
2502
2551
  {
@@ -2506,13 +2555,13 @@ function lt(t) {
2506
2555
  min: t.min,
2507
2556
  max: t.max,
2508
2557
  step: t.step,
2509
- onChange: u
2558
+ onChange: d
2510
2559
  }
2511
2560
  )
2512
2561
  ] }),
2513
2562
  t.type === "color" && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2514
- /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: u, disabled: t.disabled, className: "color" }),
2515
- /* @__PURE__ */ l.jsx("input", { type: "color", value: a, onChange: u, disabled: t.disabled })
2563
+ /* @__PURE__ */ l.jsx("input", { type: "text", value: a.toString(), onChange: d, disabled: t.disabled, className: "color" }),
2564
+ /* @__PURE__ */ l.jsx("input", { type: "color", value: a, onChange: d, disabled: t.disabled })
2516
2565
  ] }),
2517
2566
  t.type === "button" && /* @__PURE__ */ l.jsx(
2518
2567
  "button",
@@ -2525,12 +2574,12 @@ function lt(t) {
2525
2574
  }
2526
2575
  ),
2527
2576
  t.type === "image" && /* @__PURE__ */ l.jsx("img", { ref: h, onClick: () => {
2528
- La().then((m) => {
2529
- h.current.src = m, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, m);
2577
+ La().then((f) => {
2578
+ h.current.src = f, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, f);
2530
2579
  });
2531
2580
  }, 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 })
2581
+ t.type === "option" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx("select", { onChange: d, disabled: t.disabled, defaultValue: t.value, children: t.options?.map((f, b) => /* @__PURE__ */ l.jsx("option", { value: f.value, children: St(f.title) }, b)) }) }),
2582
+ t.type === "vector" && /* @__PURE__ */ l.jsx(Wa, { value: a, min: -1, max: 1, onChange: d })
2534
2583
  ] });
2535
2584
  }
2536
2585
  function Zt(t) {
@@ -2562,7 +2611,7 @@ function Zt(t) {
2562
2611
  }
2563
2612
  return t;
2564
2613
  }
2565
- function Ga(t, n) {
2614
+ function qa(t, n) {
2566
2615
  const a = [];
2567
2616
  if (t.perspectiveCameraInfo !== void 0)
2568
2617
  for (const e in t.perspectiveCameraInfo)
@@ -2572,10 +2621,10 @@ function Ga(t, n) {
2572
2621
  type: "number",
2573
2622
  step: 0.01,
2574
2623
  value: t.perspectiveCameraInfo[e],
2575
- onChange: (i, o) => {
2576
- n.updateObject(t.uuid, i, o), n.requestMethod(t.uuid, "updateProjectionMatrix");
2624
+ onChange: (i, c) => {
2625
+ n.updateObject(t.uuid, i, c), n.requestMethod(t.uuid, "updateProjectionMatrix");
2577
2626
  const h = n.scene?.getObjectByProperty("uuid", t.uuid);
2578
- h !== void 0 && (ee(h, i, o), h.updateProjectionMatrix());
2627
+ h !== void 0 && (K(h, i, c), h.updateProjectionMatrix());
2579
2628
  }
2580
2629
  });
2581
2630
  else if (t.orthographicCameraInfo !== void 0)
@@ -2586,44 +2635,44 @@ function Ga(t, n) {
2586
2635
  type: "number",
2587
2636
  step: 0.01,
2588
2637
  value: t.perspectiveCameraInfo[e],
2589
- onChange: (i, o) => {
2590
- n.updateObject(t.uuid, i, o), n.requestMethod(t.uuid, "updateProjectionMatrix");
2638
+ onChange: (i, c) => {
2639
+ n.updateObject(t.uuid, i, c), n.requestMethod(t.uuid, "updateProjectionMatrix");
2591
2640
  const h = n.scene?.getObjectByProperty("uuid", t.uuid);
2592
- h !== void 0 && (ee(h, i, o), h.updateProjectionMatrix());
2641
+ h !== void 0 && (K(h, i, c), h.updateProjectionMatrix());
2593
2642
  }
2594
2643
  });
2595
2644
  return /* @__PURE__ */ l.jsx(
2596
- We,
2645
+ Ze,
2597
2646
  {
2598
2647
  title: "Camera",
2599
2648
  items: a
2600
2649
  }
2601
2650
  );
2602
2651
  }
2603
- const Ha = Math.PI / 180, Wa = 180 / Math.PI;
2604
- function et(t, n, a, e, i) {
2652
+ const Ka = Math.PI / 180, Xa = 180 / Math.PI;
2653
+ function at(t, n, a, e, i) {
2605
2654
  return e + (t - n) * (i - e) / (a - n);
2606
2655
  }
2607
- function qa(t) {
2608
- return t * Ha;
2656
+ function Za(t) {
2657
+ return t * Ka;
2609
2658
  }
2610
2659
  function kt(t) {
2611
- return t * Wa;
2660
+ return t * Xa;
2612
2661
  }
2613
- function Ka(t, n) {
2662
+ function Ja(t, n) {
2614
2663
  const a = new Xn();
2615
2664
  a.elements = t.matrix;
2616
- const e = new K(), i = new Zn(), o = new K();
2617
- t.uuid.length > 0 && (e.setFromMatrixPosition(a), i.setFromRotationMatrix(a), o.setFromMatrixScale(a));
2618
- const h = (d, u) => {
2619
- n.updateObject(t.uuid, d, u);
2620
- const m = n.scene?.getObjectByProperty("uuid", t.uuid);
2621
- m !== void 0 && ee(m, d, u);
2622
- }, c = (d, u) => {
2623
- h(d, qa(u));
2665
+ const e = new q(), i = new Zn(), c = new q();
2666
+ t.uuid.length > 0 && (e.setFromMatrixPosition(a), i.setFromRotationMatrix(a), c.setFromMatrixScale(a));
2667
+ const h = (u, d) => {
2668
+ n.updateObject(t.uuid, u, d);
2669
+ const f = n.scene?.getObjectByProperty("uuid", t.uuid);
2670
+ f !== void 0 && K(f, u, d);
2671
+ }, o = (u, d) => {
2672
+ h(u, Za(d));
2624
2673
  };
2625
2674
  return /* @__PURE__ */ l.jsx(
2626
- We,
2675
+ Ze,
2627
2676
  {
2628
2677
  title: "Transform",
2629
2678
  items: [
@@ -2652,37 +2701,37 @@ function Ka(t, n) {
2652
2701
  title: "Rotation X",
2653
2702
  prop: "rotation.x",
2654
2703
  type: "number",
2655
- value: ut(kt(i.x)),
2704
+ value: ht(kt(i.x)),
2656
2705
  min: -360,
2657
2706
  max: 360,
2658
2707
  step: 0.1,
2659
- onChange: c
2708
+ onChange: o
2660
2709
  },
2661
2710
  {
2662
2711
  title: "Rotation Y",
2663
2712
  prop: "rotation.y",
2664
2713
  type: "number",
2665
- value: ut(kt(i.y)),
2714
+ value: ht(kt(i.y)),
2666
2715
  min: -360,
2667
2716
  max: 360,
2668
2717
  step: 0.1,
2669
- onChange: c
2718
+ onChange: o
2670
2719
  },
2671
2720
  {
2672
2721
  title: "Rotation Z",
2673
2722
  prop: "rotation.z",
2674
2723
  type: "number",
2675
- value: ut(kt(i.z)),
2724
+ value: ht(kt(i.z)),
2676
2725
  min: -360,
2677
2726
  max: 360,
2678
2727
  step: 0.1,
2679
- onChange: c
2728
+ onChange: o
2680
2729
  },
2681
2730
  {
2682
2731
  title: "Scale X",
2683
2732
  prop: "scale.x",
2684
2733
  type: "number",
2685
- value: o.x,
2734
+ value: c.x,
2686
2735
  step: 0.01,
2687
2736
  onChange: h
2688
2737
  },
@@ -2690,7 +2739,7 @@ function Ka(t, n) {
2690
2739
  title: "Scale Y",
2691
2740
  prop: "scale.y",
2692
2741
  type: "number",
2693
- value: o.y,
2742
+ value: c.y,
2694
2743
  step: 0.01,
2695
2744
  onChange: h
2696
2745
  },
@@ -2698,7 +2747,7 @@ function Ka(t, n) {
2698
2747
  title: "Scale Z",
2699
2748
  prop: "scale.z",
2700
2749
  type: "number",
2701
- value: o.z,
2750
+ value: c.z,
2702
2751
  step: 0.01,
2703
2752
  onChange: h
2704
2753
  }
@@ -2725,7 +2774,7 @@ function Jt(t) {
2725
2774
  }
2726
2775
  return t;
2727
2776
  }
2728
- function Xa(t, n) {
2777
+ function Qa(t, n) {
2729
2778
  const a = [];
2730
2779
  if (t.lightInfo !== void 0)
2731
2780
  for (const e in t.lightInfo) {
@@ -2735,11 +2784,11 @@ function Xa(t, n) {
2735
2784
  prop: e,
2736
2785
  type: "color",
2737
2786
  value: i,
2738
- onChange: (o, h) => {
2739
- const c = new St(h);
2740
- n.updateObject(t.uuid, o, c);
2741
- const d = n.scene?.getObjectByProperty("uuid", t.uuid);
2742
- d !== void 0 && ee(d, o, c);
2787
+ onChange: (c, h) => {
2788
+ const o = new Ct(h);
2789
+ n.updateObject(t.uuid, c, o);
2790
+ const u = n.scene?.getObjectByProperty("uuid", t.uuid);
2791
+ u !== void 0 && K(u, c, o);
2743
2792
  }
2744
2793
  }) : a.push({
2745
2794
  title: Jt(e),
@@ -2747,32 +2796,32 @@ function Xa(t, n) {
2747
2796
  type: typeof i,
2748
2797
  value: i,
2749
2798
  step: typeof i == "number" ? 0.01 : void 0,
2750
- onChange: (o, h) => {
2751
- n.updateObject(t.uuid, o, h);
2752
- const c = n.scene?.getObjectByProperty("uuid", t.uuid);
2753
- c !== void 0 && ee(c, o, h);
2799
+ onChange: (c, h) => {
2800
+ n.updateObject(t.uuid, c, h);
2801
+ const o = n.scene?.getObjectByProperty("uuid", t.uuid);
2802
+ o !== void 0 && K(o, c, h);
2754
2803
  }
2755
2804
  }));
2756
2805
  }
2757
2806
  return /* @__PURE__ */ l.jsx(
2758
- We,
2807
+ Ze,
2759
2808
  {
2760
2809
  title: "Light",
2761
2810
  items: a
2762
2811
  }
2763
2812
  );
2764
2813
  }
2765
- function Za(t, n) {
2814
+ function ei(t, n) {
2766
2815
  const a = [], e = [];
2767
2816
  let i = 0;
2768
- t.animations.forEach((c) => {
2769
- i = Math.max(i, c.duration), c.duration > 0 && e.push({
2770
- title: c.name,
2817
+ t.animations.forEach((o) => {
2818
+ i = Math.max(i, o.duration), o.duration > 0 && e.push({
2819
+ title: o.name,
2771
2820
  items: [
2772
2821
  {
2773
2822
  title: "Duration",
2774
2823
  type: "number",
2775
- value: c.duration,
2824
+ value: o.duration,
2776
2825
  disabled: !0
2777
2826
  },
2778
2827
  {
@@ -2796,37 +2845,37 @@ function Za(t, n) {
2796
2845
  title: "Animations",
2797
2846
  items: e
2798
2847
  });
2799
- const o = n.scene?.getObjectByProperty("uuid", t.uuid);
2848
+ const c = n.scene?.getObjectByProperty("uuid", t.uuid);
2800
2849
  let h = !1;
2801
- if (o !== void 0) {
2802
- const c = o.mixer;
2803
- if (h = c !== void 0, h) {
2804
- const d = [
2850
+ if (c !== void 0) {
2851
+ const o = c.mixer;
2852
+ if (h = o !== void 0, h) {
2853
+ const u = [
2805
2854
  {
2806
2855
  title: "Time Scale",
2807
2856
  type: "range",
2808
- value: c.timeScale,
2857
+ value: o.timeScale,
2809
2858
  step: 0.01,
2810
2859
  min: -1,
2811
2860
  max: 2,
2812
- onChange: (u, m) => {
2813
- c.timeScale = m, n.updateObject(t.uuid, "mixer.timeScale", m);
2861
+ onChange: (d, f) => {
2862
+ o.timeScale = f, n.updateObject(t.uuid, "mixer.timeScale", f);
2814
2863
  }
2815
2864
  }
2816
2865
  ];
2817
- d.push({
2866
+ u.push({
2818
2867
  title: "Stop All",
2819
2868
  type: "button",
2820
2869
  onChange: () => {
2821
- c.stopAllAction(), n.requestMethod(t.uuid, "stopAllAction", void 0, "mixer");
2870
+ o.stopAllAction(), n.requestMethod(t.uuid, "stopAllAction", void 0, "mixer");
2822
2871
  }
2823
2872
  }), a.push({
2824
2873
  title: "Mixer",
2825
- items: d
2874
+ items: u
2826
2875
  });
2827
2876
  }
2828
2877
  }
2829
- return /* @__PURE__ */ l.jsx(We, { title: "Animation", items: a });
2878
+ return /* @__PURE__ */ l.jsx(Ze, { title: "Animation", items: a });
2830
2879
  }
2831
2880
  const Pn = {
2832
2881
  name: "",
@@ -2840,180 +2889,180 @@ const Pn = {
2840
2889
  orthographicCameraInfo: void 0,
2841
2890
  lightInfo: void 0
2842
2891
  };
2843
- let ce = { ...Pn };
2844
- function Ja(t) {
2845
- const [n, a] = ne(-1);
2846
- Re(() => {
2847
- function h(d) {
2848
- ce = { ...d.value }, a(Date.now());
2849
- }
2850
- function c() {
2851
- ce = { ...Pn }, a(Date.now());
2852
- }
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);
2892
+ let oe = { ...Pn };
2893
+ function ti(t) {
2894
+ const [n, a] = ae(-1);
2895
+ ke(() => {
2896
+ function h(u) {
2897
+ oe = { ...u.value }, a(Date.now());
2898
+ }
2899
+ function o() {
2900
+ oe = { ...Pn }, a(Date.now());
2901
+ }
2902
+ return D.addEventListener(I.SET_SCENE, o), D.addEventListener(I.SET_OBJECT, h), () => {
2903
+ D.removeEventListener(I.SET_SCENE, o), D.removeEventListener(I.SET_OBJECT, h);
2855
2904
  };
2856
2905
  }, []);
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: [
2906
+ const e = oe.type.toLowerCase(), i = oe.animations.length > 0 || oe.mixer !== void 0, c = e.search("mesh") > -1 || e.search("line") > -1 || e.search("points") > -1;
2907
+ return /* @__PURE__ */ l.jsx(Ft, { label: "Inspector", children: /* @__PURE__ */ l.jsx("div", { id: "Inspector", className: t.class, children: oe.uuid.length > 0 && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2859
2908
  /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
2860
2909
  /* @__PURE__ */ l.jsx(
2861
- lt,
2910
+ dt,
2862
2911
  {
2863
2912
  type: "string",
2864
2913
  title: "Name",
2865
2914
  prop: "name",
2866
- value: ce.name,
2915
+ value: oe.name,
2867
2916
  disabled: !0
2868
2917
  }
2869
2918
  ),
2870
2919
  /* @__PURE__ */ l.jsx(
2871
- lt,
2920
+ dt,
2872
2921
  {
2873
2922
  type: "string",
2874
2923
  title: "Type",
2875
2924
  prop: "type",
2876
- value: ce.type,
2925
+ value: oe.type,
2877
2926
  disabled: !0
2878
2927
  }
2879
2928
  ),
2880
2929
  /* @__PURE__ */ l.jsx(
2881
- lt,
2930
+ dt,
2882
2931
  {
2883
2932
  type: "string",
2884
2933
  title: "UUID",
2885
2934
  prop: "uuid",
2886
- value: ce.uuid,
2935
+ value: oe.uuid,
2887
2936
  disabled: !0
2888
2937
  }
2889
2938
  ),
2890
2939
  /* @__PURE__ */ l.jsx(
2891
- lt,
2940
+ dt,
2892
2941
  {
2893
2942
  type: "boolean",
2894
2943
  title: "Visible",
2895
2944
  prop: "visible",
2896
- value: ce.visible,
2897
- onChange: (h, c) => {
2898
- t.three.updateObject(ce.uuid, h, c);
2899
- const d = t.three.scene?.getObjectByProperty("uuid", ce.uuid);
2900
- d !== void 0 && ee(d, h, c);
2945
+ value: oe.visible,
2946
+ onChange: (h, o) => {
2947
+ t.three.updateObject(oe.uuid, h, o);
2948
+ const u = t.three.scene?.getObjectByProperty("uuid", oe.uuid);
2949
+ u !== void 0 && K(u, h, o);
2901
2950
  }
2902
2951
  }
2903
2952
  )
2904
2953
  ] }),
2905
2954
  /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
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
2955
+ Ja(oe, t.three),
2956
+ i ? ei(oe, t.three) : null,
2957
+ e.search("camera") > -1 ? qa(oe, t.three) : null,
2958
+ e.search("light") > -1 ? Qa(oe, t.three) : null,
2959
+ c ? Ha(oe, t.three) : null
2911
2960
  ] })
2912
2961
  ] }) }, n) }, "Inspector");
2913
2962
  }
2914
- function yi(t) {
2915
- const [n, a] = ne(t.scene);
2916
- Re(() => {
2917
- const o = (h) => {
2963
+ function Ci(t) {
2964
+ const [n, a] = ae(t.scene);
2965
+ ke(() => {
2966
+ const c = (h) => {
2918
2967
  a(h.value);
2919
2968
  };
2920
- return D.addEventListener(I.SET_SCENE, o), () => {
2921
- D.removeEventListener(I.SET_SCENE, o);
2969
+ return D.addEventListener(I.SET_SCENE, c), () => {
2970
+ D.removeEventListener(I.SET_SCENE, c);
2922
2971
  };
2923
2972
  }, []);
2924
2973
  const e = n !== null, i = "Hierarchy - " + (e ? `${n?.name}` : "No Scene");
2925
2974
  return /* @__PURE__ */ l.jsxs("div", { id: "SidePanel", children: [
2926
2975
  /* @__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 })
2976
+ /* @__PURE__ */ l.jsx(ti, { three: t.three })
2928
2977
  ] }, "SidePanel");
2929
2978
  }
2930
- function Ei(t) {
2979
+ function Si(t) {
2931
2980
  function n() {
2932
2981
  return t.three.scene === void 0 ? (console.log("No scene:", t.three), !1) : !0;
2933
2982
  }
2934
- const a = (c) => {
2983
+ const a = (o) => {
2935
2984
  if (!n())
2936
2985
  return;
2937
- const d = t.three.scene?.getObjectByProperty("uuid", c.value);
2938
- d !== void 0 && t.three.setObject(d);
2939
- }, e = (c, d, u) => {
2986
+ const u = t.three.scene?.getObjectByProperty("uuid", o.value);
2987
+ u !== void 0 && t.three.setObject(u);
2988
+ }, e = (o, u, d) => {
2940
2989
  if (!n())
2941
2990
  return;
2942
- const m = t.three.scene?.getObjectByProperty("uuid", c);
2943
- m !== void 0 && ee(m, d, u);
2944
- }, i = (c) => {
2991
+ const f = t.three.scene?.getObjectByProperty("uuid", o);
2992
+ f !== void 0 && K(f, u, d);
2993
+ }, i = (o) => {
2945
2994
  if (!n())
2946
2995
  return;
2947
- const d = c.value, { key: u, value: m, uuid: b } = d;
2948
- e(b, u, m);
2949
- }, o = (c) => {
2996
+ const u = o.value, { key: d, value: f, uuid: b } = u;
2997
+ e(b, d, f);
2998
+ }, c = (o) => {
2950
2999
  if (!n())
2951
3000
  return;
2952
- const d = c.value;
2953
- It(d.value).then((u) => {
2954
- e(d.uuid, d.key, u), e(d.uuid, "material.needsUpdate", !0);
3001
+ const u = o.value;
3002
+ It(u.value).then((d) => {
3003
+ e(u.uuid, u.key, d), e(u.uuid, "material.needsUpdate", !0);
2955
3004
  });
2956
- }, h = (c) => {
3005
+ }, h = (o) => {
2957
3006
  if (!n())
2958
3007
  return;
2959
- const { key: d, uuid: u, value: m, subitem: b } = c.value, E = t.three.scene?.getObjectByProperty("uuid", u);
3008
+ const { key: u, uuid: d, value: f, subitem: b } = o.value, E = t.three.scene?.getObjectByProperty("uuid", d);
2960
3009
  if (E !== void 0)
2961
3010
  try {
2962
- b !== void 0 ? Sa(E, b)[d](m) : E[d](m);
3011
+ b !== void 0 ? Sa(E, b)[u](f) : E[u](f);
2963
3012
  } catch (x) {
2964
- console.log("Error requesting method:"), console.log(x), console.log(d), console.log(m);
3013
+ console.log("Error requesting method:"), console.log(x), console.log(u), console.log(f);
2965
3014
  }
2966
3015
  };
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);
3016
+ return ke(() => (D.addEventListener(I.GET_OBJECT, a), D.addEventListener(I.UPDATE_OBJECT, i), D.addEventListener(I.CREATE_TEXTURE, c), D.addEventListener(I.REQUEST_METHOD, h), () => {
3017
+ D.removeEventListener(I.GET_OBJECT, a), D.removeEventListener(I.UPDATE_OBJECT, i), D.removeEventListener(I.CREATE_TEXTURE, c), D.removeEventListener(I.REQUEST_METHOD, h);
2969
3018
  }), []), null;
2970
3019
  }
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 {
3020
+ const Qt = { type: "change" }, jt = { type: "start" }, en = { type: "end" }, bt = new Jn(), tn = new Qn(), ni = Math.cos(70 * ea.DEG2RAD);
3021
+ class ai extends an {
2973
3022
  constructor(n, a) {
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() {
2975
- return c.phi;
3023
+ super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new q(), this.cursor = new q(), 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: et.ROTATE, MIDDLE: et.DOLLY, RIGHT: et.PAN }, this.touches = { ONE: tt.ROTATE, TWO: tt.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
3024
+ return o.phi;
2976
3025
  }, this.getAzimuthalAngle = function() {
2977
- return c.theta;
3026
+ return o.theta;
2978
3027
  }, this.getDistance = function() {
2979
3028
  return this.object.position.distanceTo(this.target);
2980
3029
  }, this.listenToKeyEvents = function(s) {
2981
- s.addEventListener("keydown", at), this._domElementKeyEvents = s;
3030
+ s.addEventListener("keydown", rt), this._domElementKeyEvents = s;
2982
3031
  }, this.stopListenToKeyEvents = function() {
2983
- this._domElementKeyEvents.removeEventListener("keydown", at), this._domElementKeyEvents = null;
3032
+ this._domElementKeyEvents.removeEventListener("keydown", rt), this._domElementKeyEvents = null;
2984
3033
  }, this.saveState = function() {
2985
3034
  e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
2986
3035
  }, this.reset = function() {
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;
3036
+ e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(Qt), e.update(), c = i.NONE;
2988
3037
  }, this.update = function() {
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;
3038
+ const s = new q(), y = new zt().setFromUnitVectors(n.up, new q(0, 1, 0)), T = y.clone().invert(), F = new q(), W = new zt(), be = new q(), ue = 2 * Math.PI;
3039
+ return function(Rt = null) {
3040
+ const ot = e.object.position;
3041
+ s.copy(ot).sub(e.target), s.applyQuaternion(y), o.setFromVector3(s), e.autoRotate && c === i.NONE && $(ze(Rt)), e.enableDamping ? (o.theta += u.theta * e.dampingFactor, o.phi += u.phi * e.dampingFactor) : (o.theta += u.theta, o.phi += u.phi);
3042
+ let Oe = e.minAzimuthAngle, ye = e.maxAzimuthAngle;
3043
+ isFinite(Oe) && isFinite(ye) && (Oe < -Math.PI ? Oe += ue : Oe > Math.PI && (Oe -= ue), ye < -Math.PI ? ye += ue : ye > Math.PI && (ye -= ue), Oe <= ye ? o.theta = Math.max(Oe, Math.min(ye, o.theta)) : o.theta = o.theta > (Oe + ye) / 2 ? Math.max(Oe, o.theta) : Math.min(ye, o.theta)), o.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, o.phi)), o.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(f, e.dampingFactor) : e.target.add(f), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor), e.zoomToCursor && Ce || e.object.isOrthographicCamera ? o.radius = Pe(o.radius) : o.radius = Pe(o.radius * d), s.setFromSpherical(o), s.applyQuaternion(T), ot.copy(e.target).add(s), e.object.lookAt(e.target), e.enableDamping === !0 ? (u.theta *= 1 - e.dampingFactor, u.phi *= 1 - e.dampingFactor, f.multiplyScalar(1 - e.dampingFactor)) : (u.set(0, 0, 0), f.set(0, 0, 0));
3044
+ let Ge = !1;
3045
+ if (e.zoomToCursor && Ce) {
3046
+ let He = null;
2998
3047
  if (e.object.isPerspectiveCamera) {
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();
3048
+ const We = s.length();
3049
+ He = Pe(We * d);
3050
+ const qe = We - He;
3051
+ e.object.position.addScaledVector(re, qe), e.object.updateMatrixWorld();
3003
3052
  } else if (e.object.isOrthographicCamera) {
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();
3053
+ const We = new q(Q.x, Q.y, 0);
3054
+ We.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / d)), e.object.updateProjectionMatrix(), Ge = !0;
3055
+ const qe = new q(Q.x, Q.y, 0);
3056
+ qe.unproject(e.object), e.object.position.sub(qe).add(We), e.object.updateMatrixWorld(), He = s.length();
3008
3057
  } else
3009
3058
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), e.zoomToCursor = !1;
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))));
3059
+ He !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(He).add(e.object.position) : (bt.origin.copy(e.object.position), bt.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(bt.direction)) < ni ? n.lookAt(e.target) : (tn.setFromNormalAndCoplanarPoint(e.object.up, e.target), bt.intersectPlane(tn, e.target))));
3011
3060
  } else
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;
3061
+ e.object.isOrthographicCamera && (Ge = d !== 1, Ge && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / d)), e.object.updateProjectionMatrix()));
3062
+ return d = 1, Ce = !1, Ge || F.distanceToSquared(e.object.position) > h || 8 * (1 - W.dot(e.object.quaternion)) > h || be.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(Qt), F.copy(e.object.position), W.copy(e.object.quaternion), be.copy(e.target), !0) : !1;
3014
3063
  };
3015
3064
  }(), this.dispose = function() {
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);
3065
+ e.domElement.removeEventListener("contextmenu", Je), e.domElement.removeEventListener("pointerdown", L), e.domElement.removeEventListener("pointercancel", we), e.domElement.removeEventListener("wheel", ft), e.domElement.removeEventListener("pointermove", ie), e.domElement.removeEventListener("pointerup", we), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", rt), e._domElementKeyEvents = null);
3017
3066
  };
3018
3067
  const e = this, i = {
3019
3068
  NONE: -1,
@@ -3025,182 +3074,182 @@ class ei extends an {
3025
3074
  TOUCH_DOLLY_PAN: 5,
3026
3075
  TOUCH_DOLLY_ROTATE: 6
3027
3076
  };
3028
- let o = i.NONE;
3029
- const h = 1e-6, c = new Yt(), d = new Yt();
3030
- let u = 1;
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) {
3077
+ let c = i.NONE;
3078
+ const h = 1e-6, o = new Yt(), u = new Yt();
3079
+ let d = 1;
3080
+ const f = new q(), b = new me(), E = new me(), x = new me(), M = new me(), P = new me(), V = new me(), U = new me(), j = new me(), O = new me(), re = new q(), Q = new me();
3081
+ let Ce = !1;
3082
+ const G = [], ee = {};
3083
+ let ve = !1;
3084
+ function ze(s) {
3036
3085
  return s !== null ? 2 * Math.PI / 60 * e.autoRotateSpeed * s : 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
3037
3086
  }
3038
3087
  function Me(s) {
3039
3088
  const y = Math.abs(s * 0.01);
3040
3089
  return Math.pow(0.95, e.zoomSpeed * y);
3041
3090
  }
3042
- function ge(s) {
3043
- d.theta -= s;
3091
+ function $(s) {
3092
+ u.theta -= s;
3044
3093
  }
3045
- function ie(s) {
3046
- d.phi -= s;
3094
+ function le(s) {
3095
+ u.phi -= s;
3047
3096
  }
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);
3097
+ const S = function() {
3098
+ const s = new q();
3099
+ return function(T, F) {
3100
+ s.setFromMatrixColumn(F, 0), s.multiplyScalar(-T), f.add(s);
3052
3101
  };
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);
3102
+ }(), Te = function() {
3103
+ const s = new q();
3104
+ return function(T, F) {
3105
+ e.screenSpacePanning === !0 ? s.setFromMatrixColumn(F, 1) : (s.setFromMatrixColumn(F, 0), s.crossVectors(e.object.up, s)), s.multiplyScalar(T), f.add(s);
3057
3106
  };
3058
- }(), ye = function() {
3059
- const s = new K();
3060
- return function(T, L) {
3061
- const q = e.domElement;
3107
+ }(), ge = function() {
3108
+ const s = new q();
3109
+ return function(T, F) {
3110
+ const W = e.domElement;
3062
3111
  if (e.object.isPerspectiveCamera) {
3063
- const Ee = e.object.position;
3064
- s.copy(Ee).sub(e.target);
3112
+ const be = e.object.position;
3113
+ s.copy(be).sub(e.target);
3065
3114
  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);
3115
+ ue *= Math.tan(e.object.fov / 2 * Math.PI / 180), S(2 * T * ue / W.clientHeight, e.object.matrix), Te(2 * F * ue / W.clientHeight, e.object.matrix);
3067
3116
  } else
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);
3117
+ e.object.isOrthographicCamera ? (S(T * (e.object.right - e.object.left) / e.object.zoom / W.clientWidth, e.object.matrix), Te(F * (e.object.top - e.object.bottom) / e.object.zoom / W.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
3069
3118
  };
3070
3119
  }();
3071
- function Z(s) {
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);
3120
+ function _e(s) {
3121
+ e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? d /= s : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
3073
3122
  }
3074
- function ve(s) {
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);
3123
+ function je(s) {
3124
+ e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? d *= s : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
3076
3125
  }
3077
- function Ae(s, y) {
3126
+ function Re(s, y) {
3078
3127
  if (!e.zoomToCursor)
3079
3128
  return;
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();
3129
+ Ce = !0;
3130
+ const T = e.domElement.getBoundingClientRect(), F = s - T.left, W = y - T.top, be = T.width, ue = T.height;
3131
+ Q.x = F / be * 2 - 1, Q.y = -(W / ue) * 2 + 1, re.set(Q.x, Q.y, 1).unproject(e.object).sub(e.object.position).normalize();
3083
3132
  }
3084
- function ke(s) {
3133
+ function Pe(s) {
3085
3134
  return Math.max(e.minDistance, Math.min(e.maxDistance, s));
3086
3135
  }
3087
- function pe(s) {
3136
+ function De(s) {
3088
3137
  b.set(s.clientX, s.clientY);
3089
3138
  }
3090
- function p(s) {
3091
- Ae(s.clientX, s.clientX), F.set(s.clientX, s.clientY);
3139
+ function Ye(s) {
3140
+ Re(s.clientX, s.clientX), U.set(s.clientX, s.clientY);
3092
3141
  }
3093
- function v(s) {
3094
- R.set(s.clientX, s.clientY);
3142
+ function te(s) {
3143
+ M.set(s.clientX, s.clientY);
3095
3144
  }
3096
- function O(s) {
3145
+ function Se(s) {
3097
3146
  E.set(s.clientX, s.clientY), x.subVectors(E, b).multiplyScalar(e.rotateSpeed);
3098
3147
  const y = e.domElement;
3099
- ge(2 * Math.PI * x.x / y.clientHeight), ie(2 * Math.PI * x.y / y.clientHeight), b.copy(E), e.update();
3148
+ $(2 * Math.PI * x.x / y.clientHeight), le(2 * Math.PI * x.y / y.clientHeight), b.copy(E), e.update();
3100
3149
  }
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();
3150
+ function it(s) {
3151
+ j.set(s.clientX, s.clientY), O.subVectors(j, U), O.y > 0 ? _e(Me(O.y)) : O.y < 0 && je(Me(O.y)), U.copy(j), e.update();
3103
3152
  }
3104
- function G(s) {
3105
- P.set(s.clientX, s.clientY), Y.subVectors(P, R).multiplyScalar(e.panSpeed), ye(Y.x, Y.y), R.copy(P), e.update();
3153
+ function Ve(s) {
3154
+ P.set(s.clientX, s.clientY), V.subVectors(P, M).multiplyScalar(e.panSpeed), ge(V.x, V.y), M.copy(P), e.update();
3106
3155
  }
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();
3156
+ function pe(s) {
3157
+ Re(s.clientX, s.clientY), s.deltaY < 0 ? je(Me(s.deltaY)) : s.deltaY > 0 && _e(Me(s.deltaY)), e.update();
3109
3158
  }
3110
- function se(s) {
3159
+ function p(s) {
3111
3160
  let y = !1;
3112
3161
  switch (s.code) {
3113
3162
  case e.keys.UP:
3114
- s.ctrlKey || s.metaKey || s.shiftKey ? ie(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ye(0, e.keyPanSpeed), y = !0;
3163
+ s.ctrlKey || s.metaKey || s.shiftKey ? le(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ge(0, e.keyPanSpeed), y = !0;
3115
3164
  break;
3116
3165
  case e.keys.BOTTOM:
3117
- s.ctrlKey || s.metaKey || s.shiftKey ? ie(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ye(0, -e.keyPanSpeed), y = !0;
3166
+ s.ctrlKey || s.metaKey || s.shiftKey ? le(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ge(0, -e.keyPanSpeed), y = !0;
3118
3167
  break;
3119
3168
  case e.keys.LEFT:
3120
- s.ctrlKey || s.metaKey || s.shiftKey ? ge(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ye(e.keyPanSpeed, 0), y = !0;
3169
+ s.ctrlKey || s.metaKey || s.shiftKey ? $(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ge(e.keyPanSpeed, 0), y = !0;
3121
3170
  break;
3122
3171
  case e.keys.RIGHT:
3123
- s.ctrlKey || s.metaKey || s.shiftKey ? ge(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ye(-e.keyPanSpeed, 0), y = !0;
3172
+ s.ctrlKey || s.metaKey || s.shiftKey ? $(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : ge(-e.keyPanSpeed, 0), y = !0;
3124
3173
  break;
3125
3174
  }
3126
3175
  y && (s.preventDefault(), e.update());
3127
3176
  }
3128
- function z(s) {
3129
- if (W.length === 1)
3177
+ function v(s) {
3178
+ if (G.length === 1)
3130
3179
  b.set(s.pageX, s.pageY);
3131
3180
  else {
3132
- const y = De(s), T = 0.5 * (s.pageX + y.x), L = 0.5 * (s.pageY + y.y);
3133
- b.set(T, L);
3181
+ const y = Fe(s), T = 0.5 * (s.pageX + y.x), F = 0.5 * (s.pageY + y.y);
3182
+ b.set(T, F);
3134
3183
  }
3135
3184
  }
3136
- function J(s) {
3137
- if (W.length === 1)
3138
- R.set(s.pageX, s.pageY);
3185
+ function C(s) {
3186
+ if (G.length === 1)
3187
+ M.set(s.pageX, s.pageY);
3139
3188
  else {
3140
- const y = De(s), T = 0.5 * (s.pageX + y.x), L = 0.5 * (s.pageY + y.y);
3141
- R.set(T, L);
3189
+ const y = Fe(s), T = 0.5 * (s.pageX + y.x), F = 0.5 * (s.pageY + y.y);
3190
+ M.set(T, F);
3142
3191
  }
3143
3192
  }
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);
3193
+ function _(s) {
3194
+ const y = Fe(s), T = s.pageX - y.x, F = s.pageY - y.y, W = Math.sqrt(T * T + F * F);
3195
+ U.set(0, W);
3147
3196
  }
3148
- function k(s) {
3149
- e.enableZoom && oe(s), e.enablePan && J(s);
3197
+ function H(s) {
3198
+ e.enableZoom && _(s), e.enablePan && C(s);
3150
3199
  }
3151
- function U(s) {
3152
- e.enableZoom && oe(s), e.enableRotate && z(s);
3200
+ function X(s) {
3201
+ e.enableZoom && _(s), e.enableRotate && v(s);
3153
3202
  }
3154
- function re(s) {
3155
- if (W.length == 1)
3203
+ function de(s) {
3204
+ if (G.length == 1)
3156
3205
  E.set(s.pageX, s.pageY);
3157
3206
  else {
3158
- const T = De(s), L = 0.5 * (s.pageX + T.x), q = 0.5 * (s.pageY + T.y);
3159
- E.set(L, q);
3207
+ const T = Fe(s), F = 0.5 * (s.pageX + T.x), W = 0.5 * (s.pageY + T.y);
3208
+ E.set(F, W);
3160
3209
  }
3161
3210
  x.subVectors(E, b).multiplyScalar(e.rotateSpeed);
3162
3211
  const y = e.domElement;
3163
- ge(2 * Math.PI * x.x / y.clientHeight), ie(2 * Math.PI * x.y / y.clientHeight), b.copy(E);
3212
+ $(2 * Math.PI * x.x / y.clientHeight), le(2 * Math.PI * x.y / y.clientHeight), b.copy(E);
3164
3213
  }
3165
- function we(s) {
3166
- if (W.length === 1)
3214
+ function z(s) {
3215
+ if (G.length === 1)
3167
3216
  P.set(s.pageX, s.pageY);
3168
3217
  else {
3169
- const y = De(s), T = 0.5 * (s.pageX + y.x), L = 0.5 * (s.pageY + y.y);
3170
- P.set(T, L);
3218
+ const y = Fe(s), T = 0.5 * (s.pageX + y.x), F = 0.5 * (s.pageY + y.y);
3219
+ P.set(T, F);
3171
3220
  }
3172
- Y.subVectors(P, R).multiplyScalar(e.panSpeed), ye(Y.x, Y.y), R.copy(P);
3221
+ V.subVectors(P, M).multiplyScalar(e.panSpeed), ge(V.x, V.y), M.copy(P);
3173
3222
  }
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);
3223
+ function Z(s) {
3224
+ const y = Fe(s), T = s.pageX - y.x, F = s.pageY - y.y, W = Math.sqrt(T * T + F * F);
3225
+ j.set(0, W), O.set(0, Math.pow(j.y / U.y, e.zoomSpeed)), _e(O.y), U.copy(j);
3226
+ const be = (s.pageX + y.x) * 0.5, ue = (s.pageY + y.y) * 0.5;
3227
+ Re(be, ue);
3179
3228
  }
3180
- function ht(s) {
3181
- e.enableZoom && Te(s), e.enablePan && we(s);
3229
+ function se(s) {
3230
+ e.enableZoom && Z(s), e.enablePan && z(s);
3182
3231
  }
3183
- function ft(s) {
3184
- e.enableZoom && Te(s), e.enableRotate && re(s);
3232
+ function A(s) {
3233
+ e.enableZoom && Z(s), e.enableRotate && de(s);
3185
3234
  }
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));
3235
+ function L(s) {
3236
+ e.enabled !== !1 && (G.length === 0 && (e.domElement.setPointerCapture(s.pointerId), e.domElement.addEventListener("pointermove", ie), e.domElement.addEventListener("pointerup", we)), Mt(s), s.pointerType === "touch" ? st(s) : Ne(s));
3188
3237
  }
3189
- function tt(s) {
3190
- e.enabled !== !1 && (s.pointerType === "touch" ? gt(s) : Ot(s));
3238
+ function ie(s) {
3239
+ e.enabled !== !1 && (s.pointerType === "touch" ? vt(s) : Ot(s));
3191
3240
  }
3192
- function $e(s) {
3193
- switch (Tt(s), W.length) {
3241
+ function we(s) {
3242
+ switch (Tt(s), G.length) {
3194
3243
  case 0:
3195
- e.domElement.releasePointerCapture(s.pointerId), e.domElement.removeEventListener("pointermove", tt), e.domElement.removeEventListener("pointerup", $e), e.dispatchEvent(en), o = i.NONE;
3244
+ e.domElement.releasePointerCapture(s.pointerId), e.domElement.removeEventListener("pointermove", ie), e.domElement.removeEventListener("pointerup", we), e.dispatchEvent(en), c = i.NONE;
3196
3245
  break;
3197
3246
  case 1:
3198
- const y = W[0], T = C[y];
3199
- it({ pointerId: y, pageX: T.x, pageY: T.y });
3247
+ const y = G[0], T = ee[y];
3248
+ st({ pointerId: y, pageX: T.x, pageY: T.y });
3200
3249
  break;
3201
3250
  }
3202
3251
  }
3203
- function nt(s) {
3252
+ function Ne(s) {
3204
3253
  let y;
3205
3254
  switch (s.button) {
3206
3255
  case 0:
@@ -3216,61 +3265,61 @@ class ei extends an {
3216
3265
  y = -1;
3217
3266
  }
3218
3267
  switch (y) {
3219
- case Xe.DOLLY:
3268
+ case et.DOLLY:
3220
3269
  if (e.enableZoom === !1)
3221
3270
  return;
3222
- p(s), o = i.DOLLY;
3271
+ Ye(s), c = i.DOLLY;
3223
3272
  break;
3224
- case Xe.ROTATE:
3273
+ case et.ROTATE:
3225
3274
  if (s.ctrlKey || s.metaKey || s.shiftKey) {
3226
3275
  if (e.enablePan === !1)
3227
3276
  return;
3228
- v(s), o = i.PAN;
3277
+ te(s), c = i.PAN;
3229
3278
  } else {
3230
3279
  if (e.enableRotate === !1)
3231
3280
  return;
3232
- pe(s), o = i.ROTATE;
3281
+ De(s), c = i.ROTATE;
3233
3282
  }
3234
3283
  break;
3235
- case Xe.PAN:
3284
+ case et.PAN:
3236
3285
  if (s.ctrlKey || s.metaKey || s.shiftKey) {
3237
3286
  if (e.enableRotate === !1)
3238
3287
  return;
3239
- pe(s), o = i.ROTATE;
3288
+ De(s), c = i.ROTATE;
3240
3289
  } else {
3241
3290
  if (e.enablePan === !1)
3242
3291
  return;
3243
- v(s), o = i.PAN;
3292
+ te(s), c = i.PAN;
3244
3293
  }
3245
3294
  break;
3246
3295
  default:
3247
- o = i.NONE;
3296
+ c = i.NONE;
3248
3297
  }
3249
- o !== i.NONE && e.dispatchEvent(jt);
3298
+ c !== i.NONE && e.dispatchEvent(jt);
3250
3299
  }
3251
3300
  function Ot(s) {
3252
- switch (o) {
3301
+ switch (c) {
3253
3302
  case i.ROTATE:
3254
3303
  if (e.enableRotate === !1)
3255
3304
  return;
3256
- O(s);
3305
+ Se(s);
3257
3306
  break;
3258
3307
  case i.DOLLY:
3259
3308
  if (e.enableZoom === !1)
3260
3309
  return;
3261
- A(s);
3310
+ it(s);
3262
3311
  break;
3263
3312
  case i.PAN:
3264
3313
  if (e.enablePan === !1)
3265
3314
  return;
3266
- G(s);
3315
+ Ve(s);
3267
3316
  break;
3268
3317
  }
3269
3318
  }
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));
3319
+ function ft(s) {
3320
+ e.enabled === !1 || e.enableZoom === !1 || c !== i.NONE || (s.preventDefault(), e.dispatchEvent(jt), pe(pt(s)), e.dispatchEvent(en));
3272
3321
  }
3273
- function mt(s) {
3322
+ function pt(s) {
3274
3323
  const y = s.deltaMode, T = {
3275
3324
  clientX: s.clientX,
3276
3325
  clientY: s.clientY,
@@ -3284,127 +3333,127 @@ class ei extends an {
3284
3333
  T.deltaY *= 100;
3285
3334
  break;
3286
3335
  }
3287
- return s.ctrlKey && !Pe && (T.deltaY *= 10), T;
3336
+ return s.ctrlKey && !ve && (T.deltaY *= 10), T;
3288
3337
  }
3289
- function vt(s) {
3290
- s.key === "Control" && (Pe = !0, e.domElement.getRootNode().addEventListener("keyup", je, { passive: !0, capture: !0 }));
3338
+ function mt(s) {
3339
+ s.key === "Control" && (ve = !0, e.domElement.getRootNode().addEventListener("keyup", Le, { passive: !0, capture: !0 }));
3291
3340
  }
3292
- function je(s) {
3293
- s.key === "Control" && (Pe = !1, e.domElement.getRootNode().removeEventListener("keyup", je, { passive: !0, capture: !0 }));
3341
+ function Le(s) {
3342
+ s.key === "Control" && (ve = !1, e.domElement.getRootNode().removeEventListener("keyup", Le, { passive: !0, capture: !0 }));
3294
3343
  }
3295
- function at(s) {
3296
- e.enabled === !1 || e.enablePan === !1 || se(s);
3344
+ function rt(s) {
3345
+ e.enabled === !1 || e.enablePan === !1 || p(s);
3297
3346
  }
3298
- function it(s) {
3299
- switch (bt(s), W.length) {
3347
+ function st(s) {
3348
+ switch (gt(s), G.length) {
3300
3349
  case 1:
3301
3350
  switch (e.touches.ONE) {
3302
- case Ze.ROTATE:
3351
+ case tt.ROTATE:
3303
3352
  if (e.enableRotate === !1)
3304
3353
  return;
3305
- z(s), o = i.TOUCH_ROTATE;
3354
+ v(s), c = i.TOUCH_ROTATE;
3306
3355
  break;
3307
- case Ze.PAN:
3356
+ case tt.PAN:
3308
3357
  if (e.enablePan === !1)
3309
3358
  return;
3310
- J(s), o = i.TOUCH_PAN;
3359
+ C(s), c = i.TOUCH_PAN;
3311
3360
  break;
3312
3361
  default:
3313
- o = i.NONE;
3362
+ c = i.NONE;
3314
3363
  }
3315
3364
  break;
3316
3365
  case 2:
3317
3366
  switch (e.touches.TWO) {
3318
- case Ze.DOLLY_PAN:
3367
+ case tt.DOLLY_PAN:
3319
3368
  if (e.enableZoom === !1 && e.enablePan === !1)
3320
3369
  return;
3321
- k(s), o = i.TOUCH_DOLLY_PAN;
3370
+ H(s), c = i.TOUCH_DOLLY_PAN;
3322
3371
  break;
3323
- case Ze.DOLLY_ROTATE:
3372
+ case tt.DOLLY_ROTATE:
3324
3373
  if (e.enableZoom === !1 && e.enableRotate === !1)
3325
3374
  return;
3326
- U(s), o = i.TOUCH_DOLLY_ROTATE;
3375
+ X(s), c = i.TOUCH_DOLLY_ROTATE;
3327
3376
  break;
3328
3377
  default:
3329
- o = i.NONE;
3378
+ c = i.NONE;
3330
3379
  }
3331
3380
  break;
3332
3381
  default:
3333
- o = i.NONE;
3382
+ c = i.NONE;
3334
3383
  }
3335
- o !== i.NONE && e.dispatchEvent(jt);
3384
+ c !== i.NONE && e.dispatchEvent(jt);
3336
3385
  }
3337
- function gt(s) {
3338
- switch (bt(s), o) {
3386
+ function vt(s) {
3387
+ switch (gt(s), c) {
3339
3388
  case i.TOUCH_ROTATE:
3340
3389
  if (e.enableRotate === !1)
3341
3390
  return;
3342
- re(s), e.update();
3391
+ de(s), e.update();
3343
3392
  break;
3344
3393
  case i.TOUCH_PAN:
3345
3394
  if (e.enablePan === !1)
3346
3395
  return;
3347
- we(s), e.update();
3396
+ z(s), e.update();
3348
3397
  break;
3349
3398
  case i.TOUCH_DOLLY_PAN:
3350
3399
  if (e.enableZoom === !1 && e.enablePan === !1)
3351
3400
  return;
3352
- ht(s), e.update();
3401
+ se(s), e.update();
3353
3402
  break;
3354
3403
  case i.TOUCH_DOLLY_ROTATE:
3355
3404
  if (e.enableZoom === !1 && e.enableRotate === !1)
3356
3405
  return;
3357
- ft(s), e.update();
3406
+ A(s), e.update();
3358
3407
  break;
3359
3408
  default:
3360
- o = i.NONE;
3409
+ c = i.NONE;
3361
3410
  }
3362
3411
  }
3363
- function qe(s) {
3412
+ function Je(s) {
3364
3413
  e.enabled !== !1 && s.preventDefault();
3365
3414
  }
3366
3415
  function Mt(s) {
3367
- W.push(s.pointerId);
3416
+ G.push(s.pointerId);
3368
3417
  }
3369
3418
  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);
3419
+ delete ee[s.pointerId];
3420
+ for (let y = 0; y < G.length; y++)
3421
+ if (G[y] == s.pointerId) {
3422
+ G.splice(y, 1);
3374
3423
  return;
3375
3424
  }
3376
3425
  }
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);
3426
+ function gt(s) {
3427
+ let y = ee[s.pointerId];
3428
+ y === void 0 && (y = new me(), ee[s.pointerId] = y), y.set(s.pageX, s.pageY);
3380
3429
  }
3381
- function De(s) {
3382
- const y = s.pointerId === W[0] ? W[1] : W[0];
3383
- return C[y];
3430
+ function Fe(s) {
3431
+ const y = s.pointerId === G[0] ? G[1] : G[0];
3432
+ return ee[y];
3384
3433
  }
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();
3434
+ e.domElement.addEventListener("contextmenu", Je), e.domElement.addEventListener("pointerdown", L), e.domElement.addEventListener("pointercancel", we), e.domElement.addEventListener("wheel", ft, { passive: !1 }), e.domElement.getRootNode().addEventListener("keydown", mt, { passive: !0, capture: !0 }), this.update();
3386
3435
  }
3387
3436
  }
3388
- const Ct = (t) => {
3389
- const [n, a] = ne(t.options[t.index]), e = () => {
3437
+ const xt = (t) => {
3438
+ const [n, a] = ae(t.options[t.index]), e = () => {
3390
3439
  t.onToggle(!t.open);
3391
- }, i = (o) => {
3392
- o !== n && (t.onSelect(o), a(o)), t.onToggle(!1);
3440
+ }, i = (c) => {
3441
+ c !== n && (t.onSelect(c), a(c)), t.onToggle(!1);
3393
3442
  };
3394
3443
  return /* @__PURE__ */ l.jsxs("div", { className: `dropdown ${t.up === !0 ? "up" : ""}`, children: [
3395
3444
  /* @__PURE__ */ l.jsx("div", { className: "dropdown-toggle", onClick: e, children: n }),
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)) })
3445
+ t.open && /* @__PURE__ */ l.jsx("ul", { className: "dropdown-menu", children: t.options.map((c) => /* @__PURE__ */ l.jsx("li", { onClick: () => i(c), children: c }, c)) })
3397
3446
  ] });
3398
- }, He = pa(function(n, a) {
3399
- const [e, i] = ne(!1), o = n.options.indexOf(n.camera.name);
3447
+ }, Ke = pa(function(n, a) {
3448
+ const [e, i] = ae(!1), c = n.options.indexOf(n.camera.name);
3400
3449
  return /* @__PURE__ */ l.jsxs("div", { className: "CameraWindow", children: [
3401
3450
  /* @__PURE__ */ l.jsx("div", { ref: a, className: "clickable", onClick: () => {
3402
3451
  e && i(!1);
3403
3452
  } }),
3404
3453
  /* @__PURE__ */ l.jsx(
3405
- Ct,
3454
+ xt,
3406
3455
  {
3407
- index: o,
3456
+ index: c,
3408
3457
  open: e,
3409
3458
  options: n.options,
3410
3459
  onSelect: n.onSelect,
@@ -3416,7 +3465,7 @@ const Ct = (t) => {
3416
3465
  )
3417
3466
  ] });
3418
3467
  });
3419
- class ti extends xn {
3468
+ class ii extends xn {
3420
3469
  constructor(n) {
3421
3470
  super({
3422
3471
  extensions: {
@@ -3433,7 +3482,7 @@ class ti extends xn {
3433
3482
  value: n?.divisions !== void 0 ? n?.divisions : 10
3434
3483
  },
3435
3484
  uColor: {
3436
- value: n?.color !== void 0 ? n?.color : new St(16777215)
3485
+ value: n?.color !== void 0 ? n?.color : new Ct(16777215)
3437
3486
  },
3438
3487
  uDistance: {
3439
3488
  value: n?.distance !== void 0 ? n?.distance : 1e4
@@ -3528,17 +3577,17 @@ class ti extends xn {
3528
3577
  });
3529
3578
  }
3530
3579
  }
3531
- class ni extends na {
3580
+ class ri extends na {
3532
3581
  gridMaterial;
3533
3582
  constructor() {
3534
- const n = new ti();
3583
+ const n = new ii();
3535
3584
  super(new aa(2, 2), n), this.gridMaterial = n, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
3536
3585
  }
3537
3586
  update() {
3538
3587
  this.gridMaterial.needsUpdate = !0;
3539
3588
  }
3540
3589
  }
3541
- const ai = `#include <common>
3590
+ const si = `#include <common>
3542
3591
  #include <batching_pars_vertex>
3543
3592
  #include <uv_pars_vertex>
3544
3593
  #include <color_pars_vertex>
@@ -3568,7 +3617,7 @@ void main() {
3568
3617
  #include <logdepthbuf_vertex>
3569
3618
  #include <clipping_planes_vertex>
3570
3619
  #include <worldpos_vertex>
3571
- }`, ii = `
3620
+ }`, oi = `
3572
3621
  #include <common>
3573
3622
  #include <uv_pars_fragment>
3574
3623
  #include <clipping_planes_pars_fragment>
@@ -3577,320 +3626,320 @@ void main() {
3577
3626
  #include <clipping_planes_fragment>
3578
3627
  gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
3579
3628
  }`;
3580
- class ri extends xn {
3629
+ class ci extends xn {
3581
3630
  constructor() {
3582
3631
  super({
3583
3632
  defines: {
3584
3633
  USE_UV: ""
3585
3634
  },
3586
- vertexShader: ai,
3587
- fragmentShader: ii
3635
+ vertexShader: si,
3636
+ fragmentShader: oi
3588
3637
  });
3589
3638
  }
3590
3639
  }
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({
3640
+ let yt = "Renderer", Be, Et = !1, nn = !1, Y = null, ce = null, Ue = null, $e = null;
3641
+ function wi(t) {
3642
+ const n = t.three.app.appID, a = localStorage.getItem(`${n}_mode`), e = localStorage.getItem(`${n}_tlCam`) !== null ? localStorage.getItem(`${n}_tlCam`) : "Debug", i = localStorage.getItem(`${n}_trCam`) !== null ? localStorage.getItem(`${n}_trCam`) : "Orthographic", c = localStorage.getItem(`${n}_blCam`) !== null ? localStorage.getItem(`${n}_blCam`) : "Front", h = localStorage.getItem(`${n}_brCam`) !== null ? localStorage.getItem(`${n}_brCam`) : "Top", o = xe(() => /* @__PURE__ */ new Map(), []), u = xe(() => /* @__PURE__ */ new Map(), []), d = xe(() => /* @__PURE__ */ new Map(), []), f = xe(() => new ia(), []), b = xe(() => new ra(), []), E = xe(() => new ri(), []), x = xe(() => new Vt(500), []), M = xe(() => new Vt(100), []), P = xe(() => new sa(), []), V = xe(() => new oa(), []), U = xe(() => new ci(), []), j = xe(() => new ca({
3594
3643
  opacity: 0.33,
3595
3644
  transparent: !0,
3596
3645
  wireframe: !0
3597
3646
  }), []);
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;
3647
+ function O(p, v) {
3648
+ const C = new Gt(-100, 100, 100, -100, 50, 3e3);
3649
+ return C.name = p, C.position.copy(v), C.lookAt(0, 0, 0), o.set(p, C), C;
3601
3650
  }
3602
- const R = [
3651
+ const re = [
3603
3652
  "Renderer",
3604
3653
  "Depth",
3605
3654
  "Normals",
3606
3655
  "UVs",
3607
3656
  "Wireframe"
3608
- ], P = [
3657
+ ], Q = [
3609
3658
  "Single",
3610
3659
  "Side by Side",
3611
3660
  "Stacked",
3612
3661
  "Quad"
3613
- ];
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");
3618
- }, []);
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);
3625
- switch (G.enableDamping = !0, G.dampingFactor = 0.05, p.name) {
3662
+ ], Ce = fe(null), G = fe(null), ee = fe(null), ve = fe(null), ze = fe(null), Me = fe(null), [$, le] = ae(a !== null ? a : "Single"), [S, Te] = ae(null), [ge, _e] = ae(!1), [je, Re] = ae(!1), [Pe, De] = ae(!1), [, Ye] = ae(Date.now());
3663
+ localStorage.setItem(`${n}_mode`, $), localStorage.setItem(`${n}_tlCam`, e), localStorage.setItem(`${n}_trCam`, i), localStorage.setItem(`${n}_blCam`, c), localStorage.setItem(`${n}_brCam`, h);
3664
+ const te = (p, v) => {
3665
+ const C = u.get(p.name);
3666
+ C !== void 0 && C.dispose(), u.delete(p.name);
3667
+ const _ = d.get(p.name);
3668
+ _ !== void 0 && (f.remove(_), _.dispose()), d.delete(p.name);
3669
+ const H = new ai(p, v);
3670
+ switch (H.enableDamping = !0, H.dampingFactor = 0.05, p.name) {
3626
3671
  case "Top":
3627
3672
  case "Bottom":
3628
3673
  case "Left":
3629
3674
  case "Right":
3630
3675
  case "Front":
3631
3676
  case "Back":
3632
- G.enableRotate = !1;
3677
+ H.enableRotate = !1;
3633
3678
  break;
3634
3679
  }
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) => {
3680
+ if (u.set(p.name, H), p instanceof Pt) {
3681
+ const X = new da(p);
3682
+ d.set(p.name, X), f.add(X);
3683
+ }
3684
+ }, Se = (p) => {
3685
+ const v = d.get(p.name);
3686
+ v !== void 0 && (f.remove(v), v.dispose(), d.delete(p.name));
3687
+ const C = u.get(p.name);
3688
+ C !== void 0 && (C.dispose(), u.delete(p.name));
3689
+ }, it = () => {
3690
+ u.forEach((p, v) => {
3646
3691
  p.dispose();
3647
- const O = e.get(v);
3648
- O !== void 0 && (i.remove(O), O.dispose()), e.delete(v), a.delete(v);
3649
- }), a.clear(), e.clear();
3650
- }, ke = () => {
3692
+ const C = d.get(v);
3693
+ C !== void 0 && (f.remove(C), C.dispose()), d.delete(v), u.delete(v);
3694
+ }), u.clear(), d.clear();
3695
+ }, Ve = () => {
3651
3696
  switch ($) {
3652
3697
  case "Single":
3653
- Z(V, M.current);
3698
+ te(Y, ee.current);
3654
3699
  break;
3655
3700
  case "Side by Side":
3656
3701
  case "Stacked":
3657
- Z(V, M.current), Z(le, w.current);
3702
+ te(Y, ee.current), te(ce, ve.current);
3658
3703
  break;
3659
3704
  case "Quad":
3660
- Z(V, M.current), Z(le, w.current), Z(Le, ae.current), Z(Fe, X.current);
3705
+ te(Y, ee.current), te(ce, ve.current), te(Ue, ze.current), te($e, Me.current);
3661
3706
  break;
3662
3707
  }
3663
3708
  };
3664
- Re(() => {
3709
+ ke(() => {
3665
3710
  const p = new la({
3666
- canvas: Y.current,
3711
+ canvas: Ce.current,
3667
3712
  stencil: !1
3668
3713
  });
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);
3674
- if (G !== void 0) {
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());
3714
+ p.autoClear = !1, p.shadowMap.enabled = !0, p.setPixelRatio(devicePixelRatio), p.setClearColor(0), t.three.renderer = p, Te(p);
3715
+ }, []), ke(() => {
3716
+ f.name = "Debug Scene", b.name = "helpers", f.add(b), b.add(E), x.name = "axisHelper", b.add(x), M.name = "interactionHelper", b.add(M), M.visible = !1, O("Top", new q(0, 1e3, 0)), O("Bottom", new q(0, -1e3, 0)), O("Left", new q(-1e3, 0, 0)), O("Right", new q(1e3, 0, 0)), O("Front", new q(0, 0, 1e3)), O("Back", new q(0, 0, -1e3)), O("Orthographic", new q(1e3, 1e3, 1e3));
3717
+ const p = new Pt(60, 1, 50, 3e3);
3718
+ p.name = "Debug", p.position.set(500, 500, 500), p.lookAt(0, 0, 0), o.set("Debug", p), Y = o.get(localStorage.getItem(`${n}_tlCam`)), ce = o.get(localStorage.getItem(`${n}_trCam`)), Ue = o.get(localStorage.getItem(`${n}_blCam`)), $e = o.get(localStorage.getItem(`${n}_brCam`));
3719
+ }, []), ke(() => {
3720
+ const p = (_) => {
3721
+ Mn(Be), f.remove(Be);
3722
+ const H = t.scenes.get(_.value.name);
3723
+ if (H !== void 0) {
3724
+ const X = new H();
3725
+ t.onSceneSet !== void 0 && t.onSceneSet(X), Be = X, t.three.scene = Be, f.add(Be), nn = !0;
3726
+ }
3727
+ }, v = (_) => {
3728
+ const H = _.value, X = t.three.scene?.getObjectByProperty("uuid", H.uuid);
3729
+ X !== void 0 && o.set(H.name, X), Ye(Date.now());
3730
+ }, C = (_) => {
3731
+ o.delete(_.value.name), Ye(Date.now());
3683
3732
  };
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);
3733
+ return D.addEventListener(I.SET_SCENE, p), D.addEventListener(I.ADD_CAMERA, v), D.addEventListener(I.REMOVE_CAMERA, C), () => {
3734
+ D.removeEventListener(I.SET_SCENE, p), D.removeEventListener(I.ADD_CAMERA, v), D.removeEventListener(I.REMOVE_CAMERA, C);
3686
3735
  };
3687
- }, []), Re(() => {
3688
- if (C === null)
3736
+ }, []), ke(() => {
3737
+ if (S === null)
3689
3738
  return;
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;
3739
+ let p = window.innerWidth, v = window.innerHeight, C = Math.floor(p / 2), _ = Math.floor(v / 2), H = -1;
3740
+ const X = () => {
3741
+ p = window.innerWidth - 300, v = window.innerHeight, C = Math.floor(p / 2), _ = Math.floor(v / 2), S.setSize(p, v);
3742
+ let A = p, L = v;
3694
3743
  switch ($) {
3695
3744
  case "Side by Side":
3696
- k = O, U = v;
3745
+ A = C, L = v;
3697
3746
  break;
3698
3747
  case "Stacked":
3699
- k = p, U = A;
3748
+ A = p, L = _;
3700
3749
  break;
3701
3750
  case "Quad":
3702
- k = O, U = A;
3751
+ A = C, L = _;
3703
3752
  break;
3704
3753
  }
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());
3754
+ o.forEach((ie) => {
3755
+ ie instanceof Gt ? (ie.left = A / -2, ie.right = A / 2, ie.top = L / 2, ie.bottom = L / -2, ie.updateProjectionMatrix()) : ie instanceof Pt && (ie.aspect = A / L, ie.updateProjectionMatrix(), d.get(ie.name)?.update());
3707
3756
  });
3708
- }, se = () => {
3709
- C.setViewport(0, 0, p, v), C.setScissor(0, 0, p, v), C.render(i, V);
3757
+ }, de = () => {
3758
+ S.setViewport(0, 0, p, v), S.setScissor(0, 0, p, v), S.render(f, Y);
3710
3759
  }, z = () => {
3711
3760
  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);
3761
+ S.setViewport(0, 0, C, v), S.setScissor(0, 0, C, v), S.render(f, Y), S.setViewport(C, 0, C, v), S.setScissor(C, 0, C, v), S.render(f, ce);
3713
3762
  else {
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(), $) {
3763
+ const A = v - _;
3764
+ S.setViewport(0, A, p, _), S.setScissor(0, A, p, _), S.render(f, Y), S.setViewport(0, 0, p, _), S.setScissor(0, 0, p, _), S.render(f, ce);
3765
+ }
3766
+ }, Z = () => {
3767
+ let A = 0, L = 0;
3768
+ L = v - _, A = 0, S.setViewport(A, L, C, _), S.setScissor(A, L, C, _), S.render(f, Y), A = C, S.setViewport(A, L, C, _), S.setScissor(A, L, C, _), S.render(f, ce), L = 0, A = 0, S.setViewport(A, L, C, _), S.setScissor(A, L, C, _), S.render(f, Ue), A = C, S.setViewport(A, L, C, _), S.setScissor(A, L, C, _), S.render(f, $e);
3769
+ }, se = () => {
3770
+ switch (u.forEach((A) => {
3771
+ A.update();
3772
+ }), t.onSceneUpdate !== void 0 && nn && t.onSceneUpdate(Be), S.clear(), $) {
3724
3773
  case "Single":
3725
- se();
3774
+ de();
3726
3775
  break;
3727
3776
  case "Side by Side":
3728
3777
  case "Stacked":
3729
3778
  z();
3730
3779
  break;
3731
3780
  case "Quad":
3732
- J();
3781
+ Z();
3733
3782
  break;
3734
3783
  }
3735
- G = requestAnimationFrame(oe);
3784
+ H = requestAnimationFrame(se);
3736
3785
  };
3737
- return ke(), window.addEventListener("resize", H), H(), oe(), () => {
3738
- window.removeEventListener("resize", H), cancelAnimationFrame(G), G = -1;
3786
+ return Ve(), window.addEventListener("resize", X), X(), se(), () => {
3787
+ window.removeEventListener("resize", X), cancelAnimationFrame(H), H = -1;
3739
3788
  };
3740
- }, [$, C]), Re(() => {
3741
- if (C !== null) {
3742
- const p = new ua(), v = new me(), O = (se, z, J, oe) => {
3789
+ }, [$, S]), ke(() => {
3790
+ if (S !== null) {
3791
+ const p = new ua(), v = new me(), C = (de, z, Z, se) => {
3743
3792
  switch ($) {
3744
3793
  case "Quad":
3745
- se < J ? z < oe ? p.setFromCamera(v, V) : p.setFromCamera(v, Le) : z < oe ? p.setFromCamera(v, le) : p.setFromCamera(v, Fe);
3794
+ de < Z ? z < se ? p.setFromCamera(v, Y) : p.setFromCamera(v, Ue) : z < se ? p.setFromCamera(v, ce) : p.setFromCamera(v, $e);
3746
3795
  break;
3747
3796
  case "Side by Side":
3748
- se < J ? p.setFromCamera(v, V) : p.setFromCamera(v, le);
3797
+ de < Z ? p.setFromCamera(v, Y) : p.setFromCamera(v, ce);
3749
3798
  break;
3750
3799
  case "Single":
3751
- p.setFromCamera(v, V);
3800
+ p.setFromCamera(v, Y);
3752
3801
  break;
3753
3802
  case "Stacked":
3754
- z < oe ? p.setFromCamera(v, V) : p.setFromCamera(v, le);
3803
+ z < se ? p.setFromCamera(v, Y) : p.setFromCamera(v, ce);
3755
3804
  break;
3756
3805
  }
3757
- }, A = (se) => {
3758
- if (!xt)
3806
+ }, _ = (de) => {
3807
+ if (!Et)
3759
3808
  return;
3760
3809
  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);
3810
+ S.getSize(z);
3811
+ const Z = Math.min(de.clientX, z.x), se = Math.min(de.clientY, z.y);
3812
+ v.x = at(Z, 0, z.x, -1, 1), v.y = at(se, 0, z.y, 1, -1);
3813
+ const A = z.x / 2, L = z.y / 2, ie = () => {
3814
+ Z < A ? v.x = at(Z, 0, A, -1, 1) : v.x = at(Z, A, z.x, -1, 1);
3766
3815
  }, we = () => {
3767
- oe < U ? v.y = et(oe, 0, U, 1, -1) : v.y = et(oe, U, z.y, 1, -1);
3816
+ se < L ? v.y = at(se, 0, L, 1, -1) : v.y = at(se, L, z.y, 1, -1);
3768
3817
  };
3769
3818
  switch ($) {
3770
3819
  case "Quad":
3771
- re(), we();
3820
+ ie(), we();
3772
3821
  break;
3773
3822
  case "Side by Side":
3774
- re();
3823
+ ie();
3775
3824
  break;
3776
3825
  case "Stacked":
3777
3826
  we(), we();
3778
3827
  break;
3779
3828
  }
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)
3829
+ C(Z, se, A, L);
3830
+ const Ne = p.intersectObjects(Be.children);
3831
+ Ne.length > 0 && M.position.copy(Ne[0].point);
3832
+ }, H = (de) => {
3833
+ if (!Et)
3785
3834
  return;
3786
3835
  const z = new me();
3787
- if (C.getSize(z), se.clientX >= z.x)
3836
+ if (S.getSize(z), de.clientX >= z.x)
3788
3837
  return;
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);
3838
+ _(de);
3839
+ const Z = p.intersectObjects(Be.children);
3840
+ Z.length > 0 && t.three.getObject(Z[0].object.uuid);
3841
+ }, X = G.current;
3842
+ return X.addEventListener("mousemove", _, !1), X.addEventListener("click", H, !1), () => {
3843
+ X.removeEventListener("mousemove", _), X.removeEventListener("click", H);
3795
3844
  };
3796
3845
  }
3797
- }, [$, C]);
3846
+ }, [$, S]);
3798
3847
  const pe = [];
3799
- return n.forEach((p, v) => {
3848
+ return o.forEach((p, v) => {
3800
3849
  pe.push(v);
3801
3850
  }), /* @__PURE__ */ l.jsxs("div", { className: "multiview", children: [
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));
3851
+ /* @__PURE__ */ l.jsx("canvas", { ref: Ce }),
3852
+ S !== null && /* @__PURE__ */ l.jsxs(l.Fragment, { children: [
3853
+ /* @__PURE__ */ l.jsxs("div", { className: `cameras ${$ === "Single" || $ === "Stacked" ? "single" : ""}`, ref: G, children: [
3854
+ $ === "Single" && /* @__PURE__ */ l.jsx(l.Fragment, { children: /* @__PURE__ */ l.jsx(Ke, { camera: Y, options: pe, ref: ee, onSelect: (p) => {
3855
+ u.get(Y.name)?.dispose();
3856
+ const v = o.get(p);
3857
+ v !== void 0 && (Se(Y), Y = v, localStorage.setItem(`${n}_tlCam`, v.name), te(v, ee.current));
3809
3858
  } }) }),
3810
3859
  ($ === "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));
3860
+ /* @__PURE__ */ l.jsx(Ke, { camera: Y, options: pe, ref: ee, onSelect: (p) => {
3861
+ u.get(Y.name)?.dispose();
3862
+ const v = o.get(p);
3863
+ v !== void 0 && (Se(Y), Y = v, localStorage.setItem(`${n}_tlCam`, v.name), te(v, ee.current));
3815
3864
  } }),
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));
3865
+ /* @__PURE__ */ l.jsx(Ke, { camera: ce, options: pe, ref: ve, onSelect: (p) => {
3866
+ u.get(ce.name)?.dispose();
3867
+ const v = o.get(p);
3868
+ v !== void 0 && (Se(ce), ce = v, localStorage.setItem(`${n}_trCam`, v.name), te(v, ve.current));
3820
3869
  } })
3821
3870
  ] }),
3822
3871
  $ === "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));
3872
+ /* @__PURE__ */ l.jsx(Ke, { camera: Y, options: pe, ref: ee, onSelect: (p) => {
3873
+ u.get(Y.name)?.dispose();
3874
+ const v = o.get(p);
3875
+ v !== void 0 && (Se(Y), Y = v, localStorage.setItem(`${n}_tlCam`, v.name), te(v, ee.current));
3827
3876
  } }),
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));
3877
+ /* @__PURE__ */ l.jsx(Ke, { camera: ce, options: pe, ref: ve, onSelect: (p) => {
3878
+ u.get(ce.name)?.dispose();
3879
+ const v = o.get(p);
3880
+ v !== void 0 && (Se(ce), ce = v, localStorage.setItem(`${n}_trCam`, v.name), te(v, ve.current));
3832
3881
  } }),
3833
- /* @__PURE__ */ l.jsx(He, { camera: Le, options: pe, ref: ae, onSelect: (p) => {
3834
- a.get(Le.name)?.dispose();
3835
- const v = n.get(p);
3836
- v !== void 0 && (ve(Le), Le = v, Z(v, ae.current));
3882
+ /* @__PURE__ */ l.jsx(Ke, { camera: Ue, options: pe, ref: ze, onSelect: (p) => {
3883
+ u.get(Ue.name)?.dispose();
3884
+ const v = o.get(p);
3885
+ v !== void 0 && (Se(Ue), Ue = v, localStorage.setItem(`${n}_blCam`, v.name), te(v, ze.current));
3837
3886
  } }),
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));
3887
+ /* @__PURE__ */ l.jsx(Ke, { camera: $e, options: pe, ref: Me, onSelect: (p) => {
3888
+ u.get($e.name)?.dispose();
3889
+ const v = o.get(p);
3890
+ v !== void 0 && (Se($e), $e = v, localStorage.setItem(`${n}_brCam`, v.name), te(v, Me.current));
3842
3891
  } })
3843
3892
  ] })
3844
3893
  ] }),
3845
3894
  /* @__PURE__ */ l.jsxs("div", { className: "settings", children: [
3846
3895
  /* @__PURE__ */ l.jsx(
3847
- Ct,
3896
+ xt,
3848
3897
  {
3849
- index: P.indexOf($),
3850
- options: P,
3898
+ index: Q.indexOf($),
3899
+ options: Q,
3851
3900
  onSelect: (p) => {
3852
- p !== $ && (Ae(), W(p));
3901
+ p !== $ && (it(), le(p));
3853
3902
  },
3854
- open: Be,
3903
+ open: ge,
3855
3904
  onToggle: (p) => {
3856
- Me(p), ge && ie(!1), fe && be(!1);
3905
+ _e(p), je && Re(!1), Pe && De(!1);
3857
3906
  }
3858
3907
  }
3859
3908
  ),
3860
3909
  /* @__PURE__ */ l.jsx(
3861
- Ct,
3910
+ xt,
3862
3911
  {
3863
- index: R.indexOf(Et),
3864
- options: R,
3912
+ index: re.indexOf(yt),
3913
+ options: re,
3865
3914
  onSelect: (p) => {
3866
- if (p !== Et)
3867
- switch (Et = p, Et) {
3915
+ if (p !== yt)
3916
+ switch (yt = p, yt) {
3868
3917
  case "Depth":
3869
- i.overrideMaterial = u;
3918
+ f.overrideMaterial = P;
3870
3919
  break;
3871
3920
  case "Normals":
3872
- i.overrideMaterial = m;
3921
+ f.overrideMaterial = V;
3873
3922
  break;
3874
3923
  default:
3875
3924
  case "Renderer":
3876
- i.overrideMaterial = null;
3925
+ f.overrideMaterial = null;
3877
3926
  break;
3878
3927
  case "Wireframe":
3879
- i.overrideMaterial = E;
3928
+ f.overrideMaterial = j;
3880
3929
  break;
3881
3930
  case "UVs":
3882
- i.overrideMaterial = b;
3931
+ f.overrideMaterial = U;
3883
3932
  break;
3884
3933
  }
3885
3934
  },
3886
- open: ge,
3935
+ open: je,
3887
3936
  onToggle: (p) => {
3888
- Be && Me(!1), ie(p), fe && be(!1);
3937
+ ge && _e(!1), Re(p), Pe && De(!1);
3889
3938
  }
3890
3939
  }
3891
3940
  ),
3892
3941
  /* @__PURE__ */ l.jsx(
3893
- Ct,
3942
+ xt,
3894
3943
  {
3895
3944
  index: 0,
3896
3945
  options: [
@@ -3898,11 +3947,11 @@ function xi(t) {
3898
3947
  "Selection Mode"
3899
3948
  ],
3900
3949
  onSelect: (p) => {
3901
- xt = p === "Selection Mode", d.visible = xt;
3950
+ Et = p === "Selection Mode", M.visible = Et;
3902
3951
  },
3903
- open: fe,
3952
+ open: Pe,
3904
3953
  onToggle: (p) => {
3905
- Be && Me(!1), ge && ie(!1), be(p);
3954
+ ge && _e(!1), je && Re(!1), De(p);
3906
3955
  }
3907
3956
  }
3908
3957
  )
@@ -3910,7 +3959,7 @@ function xi(t) {
3910
3959
  ] })
3911
3960
  ] });
3912
3961
  }
3913
- function Ci(t) {
3962
+ function Oi(t) {
3914
3963
  return /* @__PURE__ */ l.jsxs("div", { className: "editor", ref: t.ref, style: t.style, children: [
3915
3964
  /* @__PURE__ */ l.jsx("div", { className: "header", children: t.header }),
3916
3965
  t.children,
@@ -3919,35 +3968,35 @@ function Ci(t) {
3919
3968
  }
3920
3969
  export {
3921
3970
  Ft as Accordion,
3922
- fi as Application,
3971
+ vi as Application,
3923
3972
  wt as BaseRemote,
3924
- _n as ChildObject,
3973
+ Rn as ChildObject,
3925
3974
  ka as ContainerObject,
3926
- _a as Draggable,
3927
- Ra as DraggableItem,
3975
+ Ra as Draggable,
3976
+ _a as DraggableItem,
3928
3977
  Pa as Dropdown,
3929
3978
  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,
3979
+ Oi as Editor,
3980
+ ti as Inspector,
3981
+ wi as MultiView,
3982
+ _n as NavButton,
3983
+ gi as RemoteComponents,
3984
+ xi as RemoteController,
3936
3985
  Lt as RemoteTheatre,
3937
- vi as RemoteThree,
3938
- gi as RemoteTweakpane,
3939
- Ei as SceneInspector,
3940
- yi as SidePanel,
3986
+ yi as RemoteThree,
3987
+ Ei as RemoteTweakpane,
3988
+ Si as SceneInspector,
3989
+ Ci as SidePanel,
3941
3990
  I as ToolEvents,
3942
- dt as capitalize,
3943
- Je as clamp,
3991
+ St as capitalize,
3992
+ Xe as clamp,
3944
3993
  ga as colorToHex,
3945
3994
  D as debugDispatcher,
3946
- ui as defaultTheatreCallback,
3995
+ fi as defaultTheatreCallback,
3947
3996
  Mn as dispose,
3948
3997
  ya as disposeMaterial,
3949
- hi as disposeTexture,
3950
- di as distance,
3998
+ mi as disposeTexture,
3999
+ pi as distance,
3951
4000
  On as hierarchyUUID,
3952
4001
  va as isColor,
3953
4002
  Wt as mix,
@@ -3955,7 +4004,7 @@ export {
3955
4004
  Ht as normalize,
3956
4005
  ma as randomID,
3957
4006
  ba as resetThreeObjects,
3958
- ut as round,
3959
- mi as theatreEditorApp,
4007
+ ht as round,
4008
+ bi as theatreEditorApp,
3960
4009
  Dt as totalThreeObjects
3961
4010
  };