@tomorrowevening/hermes 0.0.4 → 0.0.5

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.js CHANGED
@@ -1,14 +1,43 @@
1
- var rn = Object.defineProperty;
2
- var on = (t, n, r) => n in t ? rn(t, n, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[n] = r;
3
- var $ = (t, n, r) => (on(t, typeof n != "symbol" ? n + "" : n, r), r);
4
- import { EventDispatcher as Gt, Mesh as Yt, Camera as sn, PerspectiveCamera as lt, OrthographicCamera as Ct, Light as cn, Texture as Vt, CubeTexture as ln, RepeatWrapping as jt, Color as St, Matrix4 as un, Vector3 as G, Euler as dn, Ray as fn, Plane as hn, MathUtils as mn, MOUSE as De, TOUCH as _e, Quaternion as Mt, Spherical as kt, Vector2 as ae, ShaderMaterial as pn, GLSL3 as gn, DoubleSide as vn, PlaneGeometry as bn, MeshNormalMaterial as yn, MeshBasicMaterial as En, Scene as wn, AxesHelper as xn, CameraHelper as Cn } from "three";
5
- import { getProject as Sn } from "@theatre/core";
6
- import { Pane as On } from "tweakpane";
7
- import * as Tn from "@tweakpane/plugin-essentials";
8
- import zt, { useState as re, useRef as Se, useEffect as qe, Component as Pn, forwardRef as Rn } from "react";
9
- import { Reorder as Wt } from "framer-motion";
1
+ var sn = Object.defineProperty;
2
+ var cn = (t, n, r) => n in t ? sn(t, n, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[n] = r;
3
+ var $ = (t, n, r) => (cn(t, typeof n != "symbol" ? n + "" : n, r), r);
4
+ import { EventDispatcher as Yt, Mesh as Vt, Camera as ln, PerspectiveCamera as lt, OrthographicCamera as Ct, Light as un, Texture as zt, CubeTexture as dn, RepeatWrapping as jt, Color as St, Matrix4 as fn, Vector3 as G, Euler as hn, Ray as mn, Plane as pn, MathUtils as gn, MOUSE as De, TOUCH as _e, Quaternion as Mt, Spherical as kt, Vector2 as ae, ShaderMaterial as vn, GLSL3 as bn, DoubleSide as yn, PlaneGeometry as En, MeshNormalMaterial as wn, MeshBasicMaterial as xn, Scene as Cn, AxesHelper as Sn, CameraHelper as On } from "three";
5
+ import { getProject as Tn } from "@theatre/core";
6
+ import { Pane as Pn } from "tweakpane";
7
+ import * as Rn from "@tweakpane/plugin-essentials";
8
+ import Wt, { useState as re, useRef as Se, useEffect as qe, Component as jn, forwardRef as Mn } from "react";
9
+ import { Reorder as Ht } from "framer-motion";
10
10
  import We from "@theatre/studio";
11
- class va {
11
+ function ya(t, n, r) {
12
+ return Math.min(n, Math.max(t, r));
13
+ }
14
+ function Ea(t, n) {
15
+ const r = t - n;
16
+ return Math.sqrt(r * r);
17
+ }
18
+ function kn() {
19
+ return Math.round(Math.random() * 1e6).toString();
20
+ }
21
+ function Dn(t) {
22
+ return t.r !== void 0 && t.g !== void 0 && t.b !== void 0;
23
+ }
24
+ function _n(t) {
25
+ const n = Math.round(t.r * 255), r = Math.round(t.g * 255), e = Math.round(t.b * 255), i = (u) => {
26
+ const h = u.toString(16);
27
+ return h.length === 1 ? "0" + h : h;
28
+ }, l = i(n), c = i(r), s = i(e);
29
+ return "#" + l + c + s;
30
+ }
31
+ let Dt = 0;
32
+ const Kt = (t) => {
33
+ if (!t)
34
+ return;
35
+ let n = t.name.replace(" ", "");
36
+ n.length === 0 && (n = `obj_${Dt}`), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, Dt++, t.children.forEach((r) => {
37
+ Kt(r);
38
+ });
39
+ };
40
+ class wa {
12
41
  constructor(n, r, e) {
13
42
  $(this, "channel");
14
43
  $(this, "components", /* @__PURE__ */ new Map());
@@ -44,7 +73,7 @@ class va {
44
73
  n && (this._mode = "editor", document.title += " - Editor");
45
74
  }
46
75
  }
47
- const I = new Gt(), N = {
76
+ const I = new Yt(), N = {
48
77
  CUSTOM: "ToolEvents::custom",
49
78
  // Components
50
79
  SELECT_DROPDOWN: "ToolEvents::selectDropdown",
@@ -66,7 +95,7 @@ class ut {
66
95
  dispose() {
67
96
  }
68
97
  }
69
- class ba extends ut {
98
+ class xa extends ut {
70
99
  selectDropdown(n, r) {
71
100
  this.app.send({
72
101
  event: "selectComponent",
@@ -88,22 +117,9 @@ class ba extends ut {
88
117
  });
89
118
  }
90
119
  }
91
- function jn() {
92
- return Math.round(Math.random() * 1e6).toString();
93
- }
94
- function Mn(t) {
95
- return t.r !== void 0 && t.g !== void 0 && t.b !== void 0;
96
- }
97
- function kn(t) {
98
- const n = Math.round(t.r * 255), r = Math.round(t.g * 255), e = Math.round(t.b * 255), i = (c) => {
99
- const f = c.toString(16);
100
- return f.length === 1 ? "0" + f : f;
101
- }, l = i(n), h = i(r), s = i(e);
102
- return "#" + l + h + s;
103
- }
104
- const Ht = () => {
120
+ const Xt = () => {
105
121
  };
106
- class ya extends ut {
122
+ class Ca extends ut {
107
123
  constructor(r, e, i) {
108
124
  super(r);
109
125
  $(this, "project");
@@ -111,7 +127,7 @@ class ya extends ut {
111
127
  $(this, "sheetObjects");
112
128
  $(this, "sheetObjectCBs");
113
129
  $(this, "sheetObjectUnsubscribe");
114
- this.project = Sn(e, i), this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
130
+ this.project = Tn(e, i), this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
115
131
  }
116
132
  dispose() {
117
133
  this.project = void 0, this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
@@ -130,19 +146,19 @@ class ya extends ut {
130
146
  console.error("Theatre Project hasn't been created yet.");
131
147
  return;
132
148
  }
133
- const h = this.sheets.get(r);
134
- if (h === void 0)
149
+ const c = this.sheets.get(r);
150
+ if (c === void 0)
135
151
  return;
136
152
  const s = `${r}_${e}`;
137
- let c = this.sheetObjects.get(s);
138
- if (c !== void 0)
139
- return c = h.object(e, { ...i, ...c.value }, { reconfigure: !0 }), c;
140
- c = h.object(e, i), this.sheetObjects.set(s, c), this.sheetObjectCBs.set(s, l !== void 0 ? l : Ht);
141
- const f = c.onValuesChange((m) => {
153
+ let u = this.sheetObjects.get(s);
154
+ if (u !== void 0)
155
+ return u = c.object(e, { ...i, ...u.value }, { reconfigure: !0 }), u;
156
+ u = c.object(e, i), this.sheetObjects.set(s, u), this.sheetObjectCBs.set(s, l !== void 0 ? l : Xt);
157
+ const h = u.onValuesChange((m) => {
142
158
  if (this.app.editor) {
143
- for (const p in m) {
144
- const E = m[p];
145
- typeof E == "object" && Mn(E) && (m[p] = {
159
+ for (const g in m) {
160
+ const E = m[g];
161
+ typeof E == "object" && Dn(E) && (m[g] = {
146
162
  r: E.r,
147
163
  g: E.g,
148
164
  b: E.b,
@@ -158,11 +174,11 @@ class ya extends ut {
158
174
  }
159
175
  });
160
176
  } else {
161
- const p = this.sheetObjectCBs.get(s);
162
- p !== void 0 && p(m);
177
+ const g = this.sheetObjectCBs.get(s);
178
+ g !== void 0 && g(m);
163
179
  }
164
180
  });
165
- return this.sheetObjectUnsubscribe.set(s, f), c;
181
+ return this.sheetObjectUnsubscribe.set(s, h), u;
166
182
  }
167
183
  unsubscribe(r) {
168
184
  if (this.project === void 0) {
@@ -173,7 +189,7 @@ class ya extends ut {
173
189
  i !== void 0 && i();
174
190
  }
175
191
  }
176
- function Dn(t) {
192
+ function An(t) {
177
193
  if (t.name === "cameras")
178
194
  return "camera";
179
195
  if (t.name === "interactive")
@@ -187,7 +203,7 @@ function Dn(t) {
187
203
  const n = t.type;
188
204
  return n.search("Helper") > -1 ? "icon_utils" : n.search("Camera") > -1 ? "camera" : n.search("Light") > -1 ? "light" : "obj3D";
189
205
  }
190
- function Kt(t) {
206
+ function qt(t) {
191
207
  const n = {
192
208
  name: t.name,
193
209
  type: t.type,
@@ -195,10 +211,10 @@ function Kt(t) {
195
211
  children: []
196
212
  };
197
213
  return t.children.forEach((r) => {
198
- n.children.push(Kt(r));
214
+ n.children.push(qt(r));
199
215
  }), n;
200
216
  }
201
- function _n(t) {
217
+ function In(t) {
202
218
  const n = {};
203
219
  for (const r in t) {
204
220
  const e = t[r].value;
@@ -206,7 +222,7 @@ function _n(t) {
206
222
  }
207
223
  return n;
208
224
  }
209
- function An(t) {
225
+ function Nn(t) {
210
226
  switch (t) {
211
227
  case "blendSrcAlpha":
212
228
  case "blendDstAlpha":
@@ -218,10 +234,10 @@ function An(t) {
218
234
  }
219
235
  return !1;
220
236
  }
221
- function Dt(t) {
237
+ function _t(t) {
222
238
  const n = {};
223
239
  for (const r in t) {
224
- if (r.substring(0, 1) === "_" || r.substring(0, 2) === "is" || An(r))
240
+ if (r.substring(0, 1) === "_" || r.substring(0, 2) === "is" || Nn(r))
225
241
  continue;
226
242
  const e = typeof t[r], i = t[r];
227
243
  switch (e) {
@@ -233,13 +249,13 @@ function Dt(t) {
233
249
  case "object":
234
250
  if (i !== null)
235
251
  if (n[r] = i, i.isTexture)
236
- if (i instanceof Vt) {
252
+ if (i instanceof zt) {
237
253
  const l = i.source.toJSON();
238
254
  n[r] = { src: l.url };
239
255
  } else
240
- i instanceof ln && (console.log("env map"), console.log(i.source.data), console.log(i.source.toJSON()), n[r] = { src: "" });
256
+ i instanceof dn && (console.log("env map"), console.log(i.source.data), console.log(i.source.toJSON()), n[r] = { src: "" });
241
257
  else
242
- r === "uniforms" && (n[r] = _n(n[r]));
258
+ r === "uniforms" && (n[r] = In(n[r]));
243
259
  else
244
260
  n[r] = { src: "" };
245
261
  break;
@@ -247,7 +263,7 @@ function Dt(t) {
247
263
  }
248
264
  return n;
249
265
  }
250
- function In(t) {
266
+ function Ln(t) {
251
267
  t.updateMatrix();
252
268
  const n = {
253
269
  name: t.name,
@@ -256,17 +272,17 @@ function In(t) {
256
272
  visible: t.visible,
257
273
  matrix: t.matrix.elements
258
274
  };
259
- if (t instanceof Yt) {
275
+ if (t instanceof Vt) {
260
276
  const r = t;
261
277
  if (Array.isArray(r.material)) {
262
278
  const e = [];
263
279
  r.material.forEach((i) => {
264
- e.push(Dt(i));
280
+ e.push(_t(i));
265
281
  }), n.material = e;
266
282
  } else
267
- n.material = Dt(r.material);
283
+ n.material = _t(r.material);
268
284
  } else
269
- t instanceof sn ? t instanceof lt ? n.perspectiveCameraInfo = {
285
+ t instanceof ln ? t instanceof lt ? n.perspectiveCameraInfo = {
270
286
  fov: t.fov,
271
287
  zoom: t.zoom,
272
288
  near: t.near,
@@ -283,7 +299,7 @@ function In(t) {
283
299
  right: t.right,
284
300
  top: t.top,
285
301
  bottom: t.bottom
286
- }) : t instanceof cn && (n.lightInfo = {
302
+ }) : t instanceof un && (n.lightInfo = {
287
303
  color: t.color,
288
304
  intensity: t.intensity,
289
305
  decay: t.decay,
@@ -318,12 +334,12 @@ function yt(t) {
318
334
  return new Promise((n, r) => {
319
335
  const e = new Image();
320
336
  e.onload = () => {
321
- const i = new Vt(e);
337
+ const i = new zt(e);
322
338
  i.wrapS = jt, i.wrapT = jt, i.needsUpdate = !0, n(i);
323
339
  }, e.onerror = r, e.src = t;
324
340
  });
325
341
  }
326
- class Ea extends ut {
342
+ class Sa extends ut {
327
343
  constructor() {
328
344
  super(...arguments);
329
345
  $(this, "scene");
@@ -336,7 +352,7 @@ class Ea extends ut {
336
352
  });
337
353
  }
338
354
  setObject(r) {
339
- const e = In(r);
355
+ const e = Ln(r);
340
356
  this.app.send({
341
357
  event: "setObject",
342
358
  target: "editor",
@@ -383,8 +399,8 @@ class Ea extends ut {
383
399
  });
384
400
  }
385
401
  setScene(r) {
386
- this.scene = r;
387
- const e = Kt(r);
402
+ this.scene = r, Kt(r);
403
+ const e = qt(r);
388
404
  this.app.send({
389
405
  event: "setScene",
390
406
  target: "editor",
@@ -392,7 +408,7 @@ class Ea extends ut {
392
408
  });
393
409
  }
394
410
  }
395
- class wa extends ut {
411
+ class Oa extends ut {
396
412
  constructor(r) {
397
413
  super(r);
398
414
  $(this, "bindCBs");
@@ -404,7 +420,7 @@ class wa extends ut {
404
420
  this.bindCBs = /* @__PURE__ */ new Map(), this.buttonCBs = /* @__PURE__ */ new Map(), r.editor && this.createGUI();
405
421
  }
406
422
  createGUI() {
407
- this.pane = new On({ title: "GUI" }), this.pane.registerPlugin(Tn);
423
+ this.pane = new Pn({ title: "GUI" }), this.pane.registerPlugin(Rn);
408
424
  }
409
425
  dispose() {
410
426
  var r;
@@ -431,21 +447,21 @@ class wa extends ut {
431
447
  }
432
448
  // Binding
433
449
  bind(r, e, i, l = void 0) {
434
- const h = this.bindID, s = i.onChange !== void 0 ? i.onChange : Ht;
435
- this.bindCBs.set(h, s), this.app.editor ? (this.pane === void 0 && this.createGUI(), (l !== void 0 ? l : this.pane).addBinding(r, e, i).on("change", (f) => {
450
+ const c = this.bindID, s = i.onChange !== void 0 ? i.onChange : Xt;
451
+ this.bindCBs.set(c, s), this.app.editor ? (this.pane === void 0 && this.createGUI(), (l !== void 0 ? l : this.pane).addBinding(r, e, i).on("change", (h) => {
436
452
  this.app.send({
437
453
  event: "updateBind",
438
454
  target: "app",
439
455
  data: {
440
- id: h,
441
- value: f.value
456
+ id: c,
457
+ value: h.value
442
458
  }
443
459
  });
444
460
  }), this.editorCallbacks++) : (this.app.send({
445
461
  event: "bindObject",
446
462
  target: "app",
447
463
  data: {
448
- id: h,
464
+ id: c,
449
465
  name: e,
450
466
  params: i,
451
467
  parent: l
@@ -502,23 +518,23 @@ var Et = { exports: {} }, He = {};
502
518
  * This source code is licensed under the MIT license found in the
503
519
  * LICENSE file in the root directory of this source tree.
504
520
  */
505
- var _t;
506
- function Nn() {
507
- if (_t)
521
+ var At;
522
+ function Fn() {
523
+ if (At)
508
524
  return He;
509
- _t = 1;
510
- var t = zt, n = Symbol.for("react.element"), r = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
511
- function h(s, c, f) {
512
- var m, p = {}, E = null, C = null;
513
- f !== void 0 && (E = "" + f), c.key !== void 0 && (E = "" + c.key), c.ref !== void 0 && (C = c.ref);
514
- for (m in c)
515
- e.call(c, m) && !l.hasOwnProperty(m) && (p[m] = c[m]);
525
+ At = 1;
526
+ var t = Wt, n = Symbol.for("react.element"), r = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, l = { key: !0, ref: !0, __self: !0, __source: !0 };
527
+ function c(s, u, h) {
528
+ var m, g = {}, E = null, C = null;
529
+ h !== void 0 && (E = "" + h), u.key !== void 0 && (E = "" + u.key), u.ref !== void 0 && (C = u.ref);
530
+ for (m in u)
531
+ e.call(u, m) && !l.hasOwnProperty(m) && (g[m] = u[m]);
516
532
  if (s && s.defaultProps)
517
- for (m in c = s.defaultProps, c)
518
- p[m] === void 0 && (p[m] = c[m]);
519
- return { $$typeof: n, type: s, key: E, ref: C, props: p, _owner: i.current };
533
+ for (m in u = s.defaultProps, u)
534
+ g[m] === void 0 && (g[m] = u[m]);
535
+ return { $$typeof: n, type: s, key: E, ref: C, props: g, _owner: i.current };
520
536
  }
521
- return He.Fragment = r, He.jsx = h, He.jsxs = h, He;
537
+ return He.Fragment = r, He.jsx = c, He.jsxs = c, He;
522
538
  }
523
539
  var Ke = {};
524
540
  /**
@@ -530,49 +546,49 @@ var Ke = {};
530
546
  * This source code is licensed under the MIT license found in the
531
547
  * LICENSE file in the root directory of this source tree.
532
548
  */
533
- var At;
534
- function Ln() {
535
- return At || (At = 1, process.env.NODE_ENV !== "production" && function() {
536
- var t = zt, n = Symbol.for("react.element"), r = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), s = Symbol.for("react.context"), c = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), p = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), O = Symbol.iterator, k = "@@iterator";
549
+ var It;
550
+ function Un() {
551
+ return It || (It = 1, process.env.NODE_ENV !== "production" && function() {
552
+ var t = Wt, n = Symbol.for("react.element"), r = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), l = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), s = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), g = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), R = Symbol.iterator, D = "@@iterator";
537
553
  function y(a) {
538
554
  if (a === null || typeof a != "object")
539
555
  return null;
540
- var d = O && a[O] || a[k];
541
- return typeof d == "function" ? d : null;
556
+ var f = R && a[R] || a[D];
557
+ return typeof f == "function" ? f : null;
542
558
  }
543
- var v = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
544
- function b(a) {
559
+ var b = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
560
+ function v(a) {
545
561
  {
546
- for (var d = arguments.length, g = new Array(d > 1 ? d - 1 : 0), x = 1; x < d; x++)
547
- g[x - 1] = arguments[x];
548
- T("error", a, g);
562
+ for (var f = arguments.length, p = new Array(f > 1 ? f - 1 : 0), x = 1; x < f; x++)
563
+ p[x - 1] = arguments[x];
564
+ O("error", a, p);
549
565
  }
550
566
  }
551
- function T(a, d, g) {
567
+ function O(a, f, p) {
552
568
  {
553
- var x = v.ReactDebugCurrentFrame, D = x.getStackAddendum();
554
- D !== "" && (d += "%s", g = g.concat([D]));
555
- var _ = g.map(function(R) {
556
- return String(R);
569
+ var x = b.ReactDebugCurrentFrame, k = x.getStackAddendum();
570
+ k !== "" && (f += "%s", p = p.concat([k]));
571
+ var _ = p.map(function(P) {
572
+ return String(P);
557
573
  });
558
- _.unshift("Warning: " + d), Function.prototype.apply.call(console[a], console, _);
574
+ _.unshift("Warning: " + f), Function.prototype.apply.call(console[a], console, _);
559
575
  }
560
576
  }
561
- var j = !1, z = !1, ee = !1, P = !1, le = !1, Te;
577
+ var j = !1, z = !1, ee = !1, T = !1, le = !1, Te;
562
578
  Te = Symbol.for("react.module.reference");
563
579
  function oe(a) {
564
- return !!(typeof a == "string" || typeof a == "function" || a === e || a === l || le || a === i || a === f || a === m || P || a === C || j || z || ee || typeof a == "object" && a !== null && (a.$$typeof === E || a.$$typeof === p || a.$$typeof === h || a.$$typeof === s || a.$$typeof === c || // This needs to include all possible module reference object
580
+ return !!(typeof a == "string" || typeof a == "function" || a === e || a === l || le || a === i || a === h || a === m || T || a === C || j || z || ee || typeof a == "object" && a !== null && (a.$$typeof === E || a.$$typeof === g || a.$$typeof === c || a.$$typeof === s || a.$$typeof === u || // This needs to include all possible module reference object
565
581
  // types supported by any Flight configuration anywhere since
566
582
  // we don't know which Flight build this will end up being used
567
583
  // with.
568
584
  a.$$typeof === Te || a.getModuleId !== void 0));
569
585
  }
570
- function M(a, d, g) {
586
+ function M(a, f, p) {
571
587
  var x = a.displayName;
572
588
  if (x)
573
589
  return x;
574
- var D = d.displayName || d.name || "";
575
- return D !== "" ? g + "(" + D + ")" : g;
590
+ var k = f.displayName || f.name || "";
591
+ return k !== "" ? p + "(" + k + ")" : p;
576
592
  }
577
593
  function A(a) {
578
594
  return a.displayName || "Context";
@@ -580,7 +596,7 @@ function Ln() {
580
596
  function L(a) {
581
597
  if (a == null)
582
598
  return null;
583
- if (typeof a.tag == "number" && b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof a == "function")
599
+ if (typeof a.tag == "number" && v("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof a == "function")
584
600
  return a.displayName || a.name || null;
585
601
  if (typeof a == "string")
586
602
  return a;
@@ -593,7 +609,7 @@ function Ln() {
593
609
  return "Profiler";
594
610
  case i:
595
611
  return "StrictMode";
596
- case f:
612
+ case h:
597
613
  return "Suspense";
598
614
  case m:
599
615
  return "SuspenseList";
@@ -601,20 +617,20 @@ function Ln() {
601
617
  if (typeof a == "object")
602
618
  switch (a.$$typeof) {
603
619
  case s:
604
- var d = a;
605
- return A(d) + ".Consumer";
606
- case h:
607
- var g = a;
608
- return A(g._context) + ".Provider";
620
+ var f = a;
621
+ return A(f) + ".Consumer";
609
622
  case c:
623
+ var p = a;
624
+ return A(p._context) + ".Provider";
625
+ case u:
610
626
  return M(a, a.render, "ForwardRef");
611
- case p:
627
+ case g:
612
628
  var x = a.displayName || null;
613
629
  return x !== null ? x : L(a.type) || "Memo";
614
630
  case E: {
615
- var D = a, _ = D._payload, R = D._init;
631
+ var k = a, _ = k._payload, P = k._init;
616
632
  try {
617
- return L(R(_));
633
+ return L(P(_));
618
634
  } catch {
619
635
  return null;
620
636
  }
@@ -681,17 +697,17 @@ function Ln() {
681
697
  })
682
698
  });
683
699
  }
684
- te < 0 && b("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
700
+ te < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
685
701
  }
686
702
  }
687
- var Ue = v.ReactCurrentDispatcher, Be;
688
- function pe(a, d, g) {
703
+ var Ue = b.ReactCurrentDispatcher, Be;
704
+ function pe(a, f, p) {
689
705
  {
690
706
  if (Be === void 0)
691
707
  try {
692
708
  throw Error();
693
- } catch (D) {
694
- var x = D.stack.trim().match(/\n( *(at )?)/);
709
+ } catch (k) {
710
+ var x = k.stack.trim().match(/\n( *(at )?)/);
695
711
  Be = x && x[1] || "";
696
712
  }
697
713
  return `
@@ -703,43 +719,43 @@ function Ln() {
703
719
  var mt = typeof WeakMap == "function" ? WeakMap : Map;
704
720
  ge = new mt();
705
721
  }
706
- function Qe(a, d) {
722
+ function Qe(a, f) {
707
723
  if (!a || je)
708
724
  return "";
709
725
  {
710
- var g = ge.get(a);
711
- if (g !== void 0)
712
- return g;
726
+ var p = ge.get(a);
727
+ if (p !== void 0)
728
+ return p;
713
729
  }
714
730
  var x;
715
731
  je = !0;
716
- var D = Error.prepareStackTrace;
732
+ var k = Error.prepareStackTrace;
717
733
  Error.prepareStackTrace = void 0;
718
734
  var _;
719
735
  _ = Ue.current, Ue.current = null, ft();
720
736
  try {
721
- if (d) {
722
- var R = function() {
737
+ if (f) {
738
+ var P = function() {
723
739
  throw Error();
724
740
  };
725
- if (Object.defineProperty(R.prototype, "props", {
741
+ if (Object.defineProperty(P.prototype, "props", {
726
742
  set: function() {
727
743
  throw Error();
728
744
  }
729
745
  }), typeof Reflect == "object" && Reflect.construct) {
730
746
  try {
731
- Reflect.construct(R, []);
747
+ Reflect.construct(P, []);
732
748
  } catch (se) {
733
749
  x = se;
734
750
  }
735
- Reflect.construct(a, [], R);
751
+ Reflect.construct(a, [], P);
736
752
  } else {
737
753
  try {
738
- R.call();
754
+ P.call();
739
755
  } catch (se) {
740
756
  x = se;
741
757
  }
742
- a.call(R.prototype);
758
+ a.call(P.prototype);
743
759
  }
744
760
  } else {
745
761
  try {
@@ -769,19 +785,19 @@ function Ln() {
769
785
  }
770
786
  }
771
787
  } finally {
772
- je = !1, Ue.current = _, ht(), Error.prepareStackTrace = D;
788
+ je = !1, Ue.current = _, ht(), Error.prepareStackTrace = k;
773
789
  }
774
790
  var ke = a ? a.displayName || a.name : "", Rt = ke ? pe(ke) : "";
775
791
  return typeof a == "function" && ge.set(a, Rt), Rt;
776
792
  }
777
- function et(a, d, g) {
793
+ function et(a, f, p) {
778
794
  return Qe(a, !1);
779
795
  }
780
796
  function tt(a) {
781
- var d = a.prototype;
782
- return !!(d && d.isReactComponent);
797
+ var f = a.prototype;
798
+ return !!(f && f.isReactComponent);
783
799
  }
784
- function ve(a, d, g) {
800
+ function ve(a, f, p) {
785
801
  if (a == null)
786
802
  return "";
787
803
  if (typeof a == "function")
@@ -789,51 +805,51 @@ function Ln() {
789
805
  if (typeof a == "string")
790
806
  return pe(a);
791
807
  switch (a) {
792
- case f:
808
+ case h:
793
809
  return pe("Suspense");
794
810
  case m:
795
811
  return pe("SuspenseList");
796
812
  }
797
813
  if (typeof a == "object")
798
814
  switch (a.$$typeof) {
799
- case c:
815
+ case u:
800
816
  return et(a.render);
801
- case p:
802
- return ve(a.type, d, g);
817
+ case g:
818
+ return ve(a.type, f, p);
803
819
  case E: {
804
- var x = a, D = x._payload, _ = x._init;
820
+ var x = a, k = x._payload, _ = x._init;
805
821
  try {
806
- return ve(_(D), d, g);
822
+ return ve(_(k), f, p);
807
823
  } catch {
808
824
  }
809
825
  }
810
826
  }
811
827
  return "";
812
828
  }
813
- var Me = Object.prototype.hasOwnProperty, nt = {}, $e = v.ReactDebugCurrentFrame;
829
+ var Me = Object.prototype.hasOwnProperty, nt = {}, $e = b.ReactDebugCurrentFrame;
814
830
  function ue(a) {
815
831
  if (a) {
816
- var d = a._owner, g = ve(a.type, a._source, d ? d.type : null);
817
- $e.setExtraStackFrame(g);
832
+ var f = a._owner, p = ve(a.type, a._source, f ? f.type : null);
833
+ $e.setExtraStackFrame(p);
818
834
  } else
819
835
  $e.setExtraStackFrame(null);
820
836
  }
821
- function be(a, d, g, x, D) {
837
+ function be(a, f, p, x, k) {
822
838
  {
823
839
  var _ = Function.call.bind(Me);
824
- for (var R in a)
825
- if (_(a, R)) {
840
+ for (var P in a)
841
+ if (_(a, P)) {
826
842
  var S = void 0;
827
843
  try {
828
- if (typeof a[R] != "function") {
829
- var X = Error((x || "React class") + ": " + g + " type `" + R + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[R] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
844
+ if (typeof a[P] != "function") {
845
+ var X = Error((x || "React class") + ": " + p + " type `" + P + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof a[P] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
830
846
  throw X.name = "Invariant Violation", X;
831
847
  }
832
- S = a[R](d, R, x, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
848
+ S = a[P](f, P, x, p, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
833
849
  } catch (B) {
834
850
  S = B;
835
851
  }
836
- S && !(S instanceof Error) && (ue(D), b("%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).", x || "React class", g, R, typeof S), ue(null)), S instanceof Error && !(S.message in nt) && (nt[S.message] = !0, ue(D), b("Failed %s type: %s", g, S.message), ue(null));
852
+ S && !(S instanceof Error) && (ue(k), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", x || "React class", p, P, typeof S), ue(null)), S instanceof Error && !(S.message in nt) && (nt[S.message] = !0, ue(k), v("Failed %s type: %s", p, S.message), ue(null));
837
853
  }
838
854
  }
839
855
  }
@@ -843,8 +859,8 @@ function Ln() {
843
859
  }
844
860
  function at(a) {
845
861
  {
846
- var d = typeof Symbol == "function" && Symbol.toStringTag, g = d && a[Symbol.toStringTag] || a.constructor.name || "Object";
847
- return g;
862
+ var f = typeof Symbol == "function" && Symbol.toStringTag, p = f && a[Symbol.toStringTag] || a.constructor.name || "Object";
863
+ return p;
848
864
  }
849
865
  }
850
866
  function Ye(a) {
@@ -859,9 +875,9 @@ function Ln() {
859
875
  }
860
876
  function it(a) {
861
877
  if (Ye(a))
862
- return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", at(a)), rt(a);
878
+ return v("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", at(a)), rt(a);
863
879
  }
864
- var de = v.ReactCurrentOwner, gt = {
880
+ var de = b.ReactCurrentOwner, gt = {
865
881
  key: !0,
866
882
  ref: !0,
867
883
  __self: !0,
@@ -870,57 +886,57 @@ function Ln() {
870
886
  ye = {};
871
887
  function o(a) {
872
888
  if (Me.call(a, "ref")) {
873
- var d = Object.getOwnPropertyDescriptor(a, "ref").get;
874
- if (d && d.isReactWarning)
889
+ var f = Object.getOwnPropertyDescriptor(a, "ref").get;
890
+ if (f && f.isReactWarning)
875
891
  return !1;
876
892
  }
877
893
  return a.ref !== void 0;
878
894
  }
879
895
  function w(a) {
880
896
  if (Me.call(a, "key")) {
881
- var d = Object.getOwnPropertyDescriptor(a, "key").get;
882
- if (d && d.isReactWarning)
897
+ var f = Object.getOwnPropertyDescriptor(a, "key").get;
898
+ if (f && f.isReactWarning)
883
899
  return !1;
884
900
  }
885
901
  return a.key !== void 0;
886
902
  }
887
- function F(a, d) {
888
- if (typeof a.ref == "string" && de.current && d && de.current.stateNode !== d) {
889
- var g = L(de.current.type);
890
- ye[g] || (b('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', L(de.current.type), a.ref), ye[g] = !0);
903
+ function F(a, f) {
904
+ if (typeof a.ref == "string" && de.current && f && de.current.stateNode !== f) {
905
+ var p = L(de.current.type);
906
+ ye[p] || (v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', L(de.current.type), a.ref), ye[p] = !0);
891
907
  }
892
908
  }
893
- function U(a, d) {
909
+ function U(a, f) {
894
910
  {
895
- var g = function() {
896
- ot || (ot = !0, b("%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)", d));
911
+ var p = function() {
912
+ ot || (ot = !0, v("%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));
897
913
  };
898
- g.isReactWarning = !0, Object.defineProperty(a, "key", {
899
- get: g,
914
+ p.isReactWarning = !0, Object.defineProperty(a, "key", {
915
+ get: p,
900
916
  configurable: !0
901
917
  });
902
918
  }
903
919
  }
904
- function K(a, d) {
920
+ function K(a, f) {
905
921
  {
906
- var g = function() {
907
- Ve || (Ve = !0, b("%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)", d));
922
+ var p = function() {
923
+ Ve || (Ve = !0, v("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", f));
908
924
  };
909
- g.isReactWarning = !0, Object.defineProperty(a, "ref", {
910
- get: g,
925
+ p.isReactWarning = !0, Object.defineProperty(a, "ref", {
926
+ get: p,
911
927
  configurable: !0
912
928
  });
913
929
  }
914
930
  }
915
- var fe = function(a, d, g, x, D, _, R) {
931
+ var fe = function(a, f, p, x, k, _, P) {
916
932
  var S = {
917
933
  // This tag allows us to uniquely identify this as a React Element
918
934
  $$typeof: n,
919
935
  // Built-in properties that belong on the element
920
936
  type: a,
921
- key: d,
922
- ref: g,
923
- props: R,
937
+ key: f,
938
+ ref: p,
939
+ props: P,
924
940
  // Record the component responsible for creating this element.
925
941
  _owner: _
926
942
  };
@@ -938,32 +954,32 @@ function Ln() {
938
954
  configurable: !1,
939
955
  enumerable: !1,
940
956
  writable: !1,
941
- value: D
957
+ value: k
942
958
  }), Object.freeze && (Object.freeze(S.props), Object.freeze(S)), S;
943
959
  };
944
- function ie(a, d, g, x, D) {
960
+ function ie(a, f, p, x, k) {
945
961
  {
946
- var _, R = {}, S = null, X = null;
947
- g !== void 0 && (it(g), S = "" + g), w(d) && (it(d.key), S = "" + d.key), o(d) && (X = d.ref, F(d, D));
948
- for (_ in d)
949
- Me.call(d, _) && !gt.hasOwnProperty(_) && (R[_] = d[_]);
962
+ var _, P = {}, S = null, X = null;
963
+ p !== void 0 && (it(p), S = "" + p), w(f) && (it(f.key), S = "" + f.key), o(f) && (X = f.ref, F(f, k));
964
+ for (_ in f)
965
+ Me.call(f, _) && !gt.hasOwnProperty(_) && (P[_] = f[_]);
950
966
  if (a && a.defaultProps) {
951
967
  var B = a.defaultProps;
952
968
  for (_ in B)
953
- R[_] === void 0 && (R[_] = B[_]);
969
+ P[_] === void 0 && (P[_] = B[_]);
954
970
  }
955
971
  if (S || X) {
956
972
  var Y = typeof a == "function" ? a.displayName || a.name || "Unknown" : a;
957
- S && U(R, Y), X && K(R, Y);
973
+ S && U(P, Y), X && K(P, Y);
958
974
  }
959
- return fe(a, S, X, D, x, de.current, R);
975
+ return fe(a, S, X, k, x, de.current, P);
960
976
  }
961
977
  }
962
- var st = v.ReactCurrentOwner, ze = v.ReactDebugCurrentFrame;
978
+ var st = b.ReactCurrentOwner, ze = b.ReactDebugCurrentFrame;
963
979
  function W(a) {
964
980
  if (a) {
965
- var d = a._owner, g = ve(a.type, a._source, d ? d.type : null);
966
- ze.setExtraStackFrame(g);
981
+ var f = a._owner, p = ve(a.type, a._source, f ? f.type : null);
982
+ ze.setExtraStackFrame(p);
967
983
  } else
968
984
  ze.setExtraStackFrame(null);
969
985
  }
@@ -987,112 +1003,112 @@ Check the render method of \`` + a + "`.";
987
1003
  function Ee(a) {
988
1004
  {
989
1005
  if (a !== void 0) {
990
- var d = a.fileName.replace(/^.*[\\\/]/, ""), g = a.lineNumber;
1006
+ var f = a.fileName.replace(/^.*[\\\/]/, ""), p = a.lineNumber;
991
1007
  return `
992
1008
 
993
- Check your code at ` + d + ":" + g + ".";
1009
+ Check your code at ` + f + ":" + p + ".";
994
1010
  }
995
1011
  return "";
996
1012
  }
997
1013
  }
998
1014
  var we = {};
999
- function Zt(a) {
1015
+ function Qt(a) {
1000
1016
  {
1001
- var d = me();
1002
- if (!d) {
1003
- var g = typeof a == "string" ? a : a.displayName || a.name;
1004
- g && (d = `
1017
+ var f = me();
1018
+ if (!f) {
1019
+ var p = typeof a == "string" ? a : a.displayName || a.name;
1020
+ p && (f = `
1005
1021
 
1006
- Check the top-level render call using <` + g + ">.");
1022
+ Check the top-level render call using <` + p + ">.");
1007
1023
  }
1008
- return d;
1024
+ return f;
1009
1025
  }
1010
1026
  }
1011
- function Ot(a, d) {
1027
+ function Ot(a, f) {
1012
1028
  {
1013
1029
  if (!a._store || a._store.validated || a.key != null)
1014
1030
  return;
1015
1031
  a._store.validated = !0;
1016
- var g = Zt(d);
1017
- if (we[g])
1032
+ var p = Qt(f);
1033
+ if (we[p])
1018
1034
  return;
1019
- we[g] = !0;
1035
+ we[p] = !0;
1020
1036
  var x = "";
1021
- a && a._owner && a._owner !== st.current && (x = " It was passed a child from " + L(a._owner.type) + "."), W(a), b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, x), W(null);
1037
+ a && a._owner && a._owner !== st.current && (x = " It was passed a child from " + L(a._owner.type) + "."), W(a), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', p, x), W(null);
1022
1038
  }
1023
1039
  }
1024
- function Tt(a, d) {
1040
+ function Tt(a, f) {
1025
1041
  {
1026
1042
  if (typeof a != "object")
1027
1043
  return;
1028
1044
  if (Ge(a))
1029
- for (var g = 0; g < a.length; g++) {
1030
- var x = a[g];
1031
- he(x) && Ot(x, d);
1045
+ for (var p = 0; p < a.length; p++) {
1046
+ var x = a[p];
1047
+ he(x) && Ot(x, f);
1032
1048
  }
1033
1049
  else if (he(a))
1034
1050
  a._store && (a._store.validated = !0);
1035
1051
  else if (a) {
1036
- var D = y(a);
1037
- if (typeof D == "function" && D !== a.entries)
1038
- for (var _ = D.call(a), R; !(R = _.next()).done; )
1039
- he(R.value) && Ot(R.value, d);
1052
+ var k = y(a);
1053
+ if (typeof k == "function" && k !== a.entries)
1054
+ for (var _ = k.call(a), P; !(P = _.next()).done; )
1055
+ he(P.value) && Ot(P.value, f);
1040
1056
  }
1041
1057
  }
1042
1058
  }
1043
- function Jt(a) {
1059
+ function en(a) {
1044
1060
  {
1045
- var d = a.type;
1046
- if (d == null || typeof d == "string")
1061
+ var f = a.type;
1062
+ if (f == null || typeof f == "string")
1047
1063
  return;
1048
- var g;
1049
- if (typeof d == "function")
1050
- g = d.propTypes;
1051
- else if (typeof d == "object" && (d.$$typeof === c || // Note: Memo only checks outer props here.
1064
+ var p;
1065
+ if (typeof f == "function")
1066
+ p = f.propTypes;
1067
+ else if (typeof f == "object" && (f.$$typeof === u || // Note: Memo only checks outer props here.
1052
1068
  // Inner props are checked in the reconciler.
1053
- d.$$typeof === p))
1054
- g = d.propTypes;
1069
+ f.$$typeof === g))
1070
+ p = f.propTypes;
1055
1071
  else
1056
1072
  return;
1057
- if (g) {
1058
- var x = L(d);
1059
- be(g, a.props, "prop", x, a);
1060
- } else if (d.PropTypes !== void 0 && !Q) {
1073
+ if (p) {
1074
+ var x = L(f);
1075
+ be(p, a.props, "prop", x, a);
1076
+ } else if (f.PropTypes !== void 0 && !Q) {
1061
1077
  Q = !0;
1062
- var D = L(d);
1063
- b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", D || "Unknown");
1078
+ var k = L(f);
1079
+ v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", k || "Unknown");
1064
1080
  }
1065
- typeof d.getDefaultProps == "function" && !d.getDefaultProps.isReactClassApproved && b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1081
+ typeof f.getDefaultProps == "function" && !f.getDefaultProps.isReactClassApproved && v("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
1066
1082
  }
1067
1083
  }
1068
- function Qt(a) {
1084
+ function tn(a) {
1069
1085
  {
1070
- for (var d = Object.keys(a.props), g = 0; g < d.length; g++) {
1071
- var x = d[g];
1086
+ for (var f = Object.keys(a.props), p = 0; p < f.length; p++) {
1087
+ var x = f[p];
1072
1088
  if (x !== "children" && x !== "key") {
1073
- W(a), b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", x), W(null);
1089
+ W(a), v("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", x), W(null);
1074
1090
  break;
1075
1091
  }
1076
1092
  }
1077
- a.ref !== null && (W(a), b("Invalid attribute `ref` supplied to `React.Fragment`."), W(null));
1093
+ a.ref !== null && (W(a), v("Invalid attribute `ref` supplied to `React.Fragment`."), W(null));
1078
1094
  }
1079
1095
  }
1080
- function Pt(a, d, g, x, D, _) {
1096
+ function Pt(a, f, p, x, k, _) {
1081
1097
  {
1082
- var R = oe(a);
1083
- if (!R) {
1098
+ var P = oe(a);
1099
+ if (!P) {
1084
1100
  var S = "";
1085
1101
  (a === void 0 || typeof a == "object" && a !== null && Object.keys(a).length === 0) && (S += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
1086
- var X = Ee(D);
1102
+ var X = Ee(k);
1087
1103
  X ? S += X : S += me();
1088
1104
  var B;
1089
- a === null ? B = "null" : Ge(a) ? B = "array" : a !== void 0 && a.$$typeof === n ? (B = "<" + (L(a.type) || "Unknown") + " />", S = " Did you accidentally export a JSX literal instead of a component?") : B = typeof a, b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", B, S);
1105
+ a === null ? B = "null" : Ge(a) ? B = "array" : a !== void 0 && a.$$typeof === n ? (B = "<" + (L(a.type) || "Unknown") + " />", S = " Did you accidentally export a JSX literal instead of a component?") : B = typeof a, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", B, S);
1090
1106
  }
1091
- var Y = ie(a, d, g, D, _);
1107
+ var Y = ie(a, f, p, k, _);
1092
1108
  if (Y == null)
1093
1109
  return Y;
1094
- if (R) {
1095
- var ne = d.children;
1110
+ if (P) {
1111
+ var ne = f.children;
1096
1112
  if (ne !== void 0)
1097
1113
  if (x)
1098
1114
  if (Ge(ne)) {
@@ -1100,33 +1116,33 @@ Check the top-level render call using <` + g + ">.");
1100
1116
  Tt(ne[ke], a);
1101
1117
  Object.freeze && Object.freeze(ne);
1102
1118
  } else
1103
- b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1119
+ v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
1104
1120
  else
1105
1121
  Tt(ne, a);
1106
1122
  }
1107
- return a === e ? Qt(Y) : Jt(Y), Y;
1123
+ return a === e ? tn(Y) : en(Y), Y;
1108
1124
  }
1109
1125
  }
1110
- function en(a, d, g) {
1111
- return Pt(a, d, g, !0);
1126
+ function nn(a, f, p) {
1127
+ return Pt(a, f, p, !0);
1112
1128
  }
1113
- function tn(a, d, g) {
1114
- return Pt(a, d, g, !1);
1129
+ function an(a, f, p) {
1130
+ return Pt(a, f, p, !1);
1115
1131
  }
1116
- var nn = tn, an = en;
1117
- Ke.Fragment = e, Ke.jsx = nn, Ke.jsxs = an;
1132
+ var rn = an, on = nn;
1133
+ Ke.Fragment = e, Ke.jsx = rn, Ke.jsxs = on;
1118
1134
  }()), Ke;
1119
1135
  }
1120
- process.env.NODE_ENV === "production" ? Et.exports = Nn() : Et.exports = Ln();
1121
- var u = Et.exports;
1122
- function Xt(t) {
1123
- return t.title.search("<") > -1 ? /* @__PURE__ */ u.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ u.jsx("button", { children: t.title });
1136
+ process.env.NODE_ENV === "production" ? Et.exports = Fn() : Et.exports = Un();
1137
+ var d = Et.exports;
1138
+ function Zt(t) {
1139
+ return t.title.search("<") > -1 ? /* @__PURE__ */ d.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ d.jsx("button", { children: t.title });
1124
1140
  }
1125
- const Fn = /* @__PURE__ */ u.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1126
- /* @__PURE__ */ u.jsx("circle", { cx: "7", cy: "7", r: "6" }),
1127
- /* @__PURE__ */ u.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
1128
- /* @__PURE__ */ u.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
1129
- ] }), Un = /* @__PURE__ */ u.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ u.jsx(
1141
+ const Bn = /* @__PURE__ */ d.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
1142
+ /* @__PURE__ */ d.jsx("circle", { cx: "7", cy: "7", r: "6" }),
1143
+ /* @__PURE__ */ d.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
1144
+ /* @__PURE__ */ d.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
1145
+ ] }), $n = /* @__PURE__ */ d.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ d.jsx(
1130
1146
  "path",
1131
1147
  {
1132
1148
  d: `M10.43,4H3.57C3.26,4,3,4.22,3,4.5v1C3,5.78,3.26,6,3.57,6h6.86C10.74,6,11,5.78,11,5.5v-1
@@ -1134,46 +1150,46 @@ C11,4.22,10.74,4,10.43,4z M10.43,8H3.57C3.26,8,3,8.22,3,8.5v1C3,9.78,3.26,10,3.5
1134
1150
  C11,8.22,10.74,8,10.43,8z`
1135
1151
  }
1136
1152
  ) });
1137
- function Bn(t) {
1138
- return /* @__PURE__ */ u.jsx(Wt.Item, { value: t.title, children: /* @__PURE__ */ u.jsxs("div", { children: [
1139
- Un,
1140
- /* @__PURE__ */ u.jsx("span", { children: t.title }),
1141
- /* @__PURE__ */ u.jsx("button", { className: "closeIcon", onClick: () => {
1153
+ function Gn(t) {
1154
+ return /* @__PURE__ */ d.jsx(Ht.Item, { value: t.title, children: /* @__PURE__ */ d.jsxs("div", { children: [
1155
+ $n,
1156
+ /* @__PURE__ */ d.jsx("span", { children: t.title }),
1157
+ /* @__PURE__ */ d.jsx("button", { className: "closeIcon", onClick: () => {
1142
1158
  t.onDelete(t.index);
1143
- }, children: Fn })
1159
+ }, children: Bn })
1144
1160
  ] }) }, t.title);
1145
1161
  }
1146
- function $n(t) {
1147
- const [n, r] = re(!1), [e, i] = re(t.options), l = (f) => {
1148
- t.onDragComplete(f), i(f);
1149
- }, h = (f) => {
1162
+ function Yn(t) {
1163
+ const [n, r] = re(!1), [e, i] = re(t.options), l = (h) => {
1164
+ t.onDragComplete(h), i(h);
1165
+ }, c = (h) => {
1150
1166
  const m = [...e];
1151
- m.splice(f, 1), l(m);
1167
+ m.splice(h, 1), l(m);
1152
1168
  }, s = [];
1153
- e.forEach((f, m) => {
1154
- s.push(/* @__PURE__ */ u.jsx(Bn, { index: m, title: f, onDelete: h }, f));
1169
+ e.forEach((h, m) => {
1170
+ s.push(/* @__PURE__ */ d.jsx(Gn, { index: m, title: h, onDelete: c }, h));
1155
1171
  });
1156
- let c = "dropdown draggable";
1157
- return t.subdropdown && (c += " subdropdown"), /* @__PURE__ */ u.jsxs("div", { className: c, onMouseEnter: () => r(!0), onMouseLeave: () => r(!1), children: [
1158
- /* @__PURE__ */ u.jsx(Xt, { title: t.title }),
1159
- /* @__PURE__ */ u.jsx(Wt.Group, { axis: "y", values: e, onReorder: l, style: { visibility: n ? "visible" : "hidden" }, children: s })
1172
+ let u = "dropdown draggable";
1173
+ return t.subdropdown && (u += " subdropdown"), /* @__PURE__ */ d.jsxs("div", { className: u, onMouseEnter: () => r(!0), onMouseLeave: () => r(!1), children: [
1174
+ /* @__PURE__ */ d.jsx(Zt, { title: t.title }),
1175
+ /* @__PURE__ */ d.jsx(Ht.Group, { axis: "y", values: e, onReorder: l, style: { visibility: n ? "visible" : "hidden" }, children: s })
1160
1176
  ] });
1161
1177
  }
1162
- function Gn(t) {
1178
+ function Vn(t) {
1163
1179
  const [n, r] = re(!1), e = [];
1164
- t.options.map((l, h) => {
1165
- t.onSelect !== void 0 && (l.onSelect = t.onSelect), e.push(/* @__PURE__ */ u.jsx(Yn, { option: l }, h));
1180
+ t.options.map((l, c) => {
1181
+ t.onSelect !== void 0 && (l.onSelect = t.onSelect), e.push(/* @__PURE__ */ d.jsx(zn, { option: l }, c));
1166
1182
  });
1167
1183
  let i = "dropdown";
1168
- return t.subdropdown && (i += " subdropdown"), /* @__PURE__ */ u.jsxs(
1184
+ return t.subdropdown && (i += " subdropdown"), /* @__PURE__ */ d.jsxs(
1169
1185
  "div",
1170
1186
  {
1171
1187
  className: i,
1172
1188
  onMouseEnter: () => r(!0),
1173
1189
  onMouseLeave: () => r(!1),
1174
1190
  children: [
1175
- /* @__PURE__ */ u.jsx(Xt, { title: t.title }),
1176
- /* @__PURE__ */ u.jsx(
1191
+ /* @__PURE__ */ d.jsx(Zt, { title: t.title }),
1192
+ /* @__PURE__ */ d.jsx(
1177
1193
  "ul",
1178
1194
  {
1179
1195
  style: { visibility: n ? "visible" : "hidden" },
@@ -1184,13 +1200,13 @@ function Gn(t) {
1184
1200
  }
1185
1201
  );
1186
1202
  }
1187
- function Yn(t) {
1203
+ function zn(t) {
1188
1204
  const { option: n } = t, [r, e] = re("");
1189
1205
  let i;
1190
1206
  switch (n.type) {
1191
1207
  case "draggable":
1192
- i = /* @__PURE__ */ u.jsx(
1193
- $n,
1208
+ i = /* @__PURE__ */ d.jsx(
1209
+ Yn,
1194
1210
  {
1195
1211
  title: n.title,
1196
1212
  options: n.value,
@@ -1202,8 +1218,8 @@ function Yn(t) {
1202
1218
  );
1203
1219
  break;
1204
1220
  case "dropdown":
1205
- i = /* @__PURE__ */ u.jsx(
1206
- Gn,
1221
+ i = /* @__PURE__ */ d.jsx(
1222
+ Vn,
1207
1223
  {
1208
1224
  title: n.title,
1209
1225
  options: n.value,
@@ -1213,7 +1229,7 @@ function Yn(t) {
1213
1229
  );
1214
1230
  break;
1215
1231
  case "option":
1216
- i = /* @__PURE__ */ u.jsx(
1232
+ i = /* @__PURE__ */ d.jsx(
1217
1233
  "button",
1218
1234
  {
1219
1235
  onClick: () => {
@@ -1224,133 +1240,132 @@ function Yn(t) {
1224
1240
  );
1225
1241
  break;
1226
1242
  }
1227
- return /* @__PURE__ */ u.jsx("li", { className: r === n.title ? "selected" : "", children: i }, jn());
1243
+ return /* @__PURE__ */ d.jsx("li", { className: r === n.title ? "selected" : "", children: i }, kn());
1228
1244
  }
1229
- function xa(t) {
1245
+ function Ta(t) {
1230
1246
  let n;
1231
- const r = t.editor ? "editor" : "app";
1232
- function e(s) {
1233
- var f, m, p, E, C, O, k, y, v;
1234
- let c;
1235
- switch (s.event) {
1247
+ function r(c) {
1248
+ var u, h, m, g, E, C, R, D, y;
1249
+ let s;
1250
+ switch (c.event) {
1236
1251
  case "custom":
1237
- I.dispatchEvent({ type: N.CUSTOM, value: s.data });
1252
+ I.dispatchEvent({ type: N.CUSTOM, value: c.data });
1238
1253
  break;
1239
1254
  case "selectComponent":
1240
- I.dispatchEvent({ type: N.SELECT_DROPDOWN, value: s.data });
1255
+ I.dispatchEvent({ type: N.SELECT_DROPDOWN, value: c.data });
1241
1256
  break;
1242
1257
  case "draggableListUpdate":
1243
- I.dispatchEvent({ type: N.DRAG_UPDATE, value: s.data });
1258
+ I.dispatchEvent({ type: N.DRAG_UPDATE, value: c.data });
1244
1259
  break;
1245
1260
  case "addFolder":
1246
- (f = t.components.get("debug")) == null || f.addFolder(s.data.name, s.data.params, s.data.parent);
1261
+ (u = t.components.get("debug")) == null || u.addFolder(c.data.name, c.data.params, c.data.parent);
1247
1262
  break;
1248
1263
  case "bindObject":
1249
- (m = t.components.get("debug")) == null || m.bind(s.data.name, s.data.params, s.data.parent);
1264
+ (h = t.components.get("debug")) == null || h.bind(c.data.name, c.data.params, c.data.parent);
1250
1265
  break;
1251
1266
  case "updateBind":
1252
- (p = t.components.get("debug")) == null || p.triggerBind(s.data.id, s.data.value);
1267
+ (m = t.components.get("debug")) == null || m.triggerBind(c.data.id, c.data.value);
1253
1268
  break;
1254
1269
  case "addButton":
1255
- (E = t.components.get("debug")) == null || E.button(s.data.name, s.data.callback, s.data.parent);
1270
+ (g = t.components.get("debug")) == null || g.button(c.data.name, c.data.callback, c.data.parent);
1256
1271
  break;
1257
1272
  case "clickButton":
1258
- (C = t.components.get("debug")) == null || C.triggerButton(s.data.id);
1273
+ (E = t.components.get("debug")) == null || E.triggerButton(c.data.id);
1259
1274
  break;
1260
1275
  case "setSheet":
1261
- c = (O = t.components.get("theatre")) == null ? void 0 : O.sheets.get(s.data.sheet), c !== void 0 && (n = c, We.setSelection([c]));
1276
+ s = (C = t.components.get("theatre")) == null ? void 0 : C.sheets.get(c.data.sheet), s !== void 0 && (n = s, We.setSelection([s]));
1262
1277
  break;
1263
1278
  case "setSheetObject":
1264
- c = (k = t.components.get("theatre")) == null ? void 0 : k.sheetObjects.get(`${s.data.sheet}_${s.data.key}`), c !== void 0 && We.setSelection([c]);
1279
+ s = (R = t.components.get("theatre")) == null ? void 0 : R.sheetObjects.get(`${c.data.sheet}_${c.data.key}`), s !== void 0 && We.setSelection([s]);
1265
1280
  break;
1266
1281
  case "updateSheetObject":
1267
- c = (y = t.components.get("theatre")) == null ? void 0 : y.sheetObjectCBs.get(s.data.sheetObject), c !== void 0 && c(s.data.values);
1282
+ s = (D = t.components.get("theatre")) == null ? void 0 : D.sheetObjectCBs.get(c.data.sheetObject), s !== void 0 && s(c.data.values);
1268
1283
  break;
1269
1284
  case "updateTimeline":
1270
- n = (v = t.components.get("theatre")) == null ? void 0 : v.sheets.get(s.data.sheet), n !== void 0 && (n.sequence.position = s.data.position);
1285
+ n = (y = t.components.get("theatre")) == null ? void 0 : y.sheets.get(c.data.sheet), n !== void 0 && (n.sequence.position = c.data.position);
1271
1286
  break;
1272
1287
  case "getScene":
1273
1288
  I.dispatchEvent({ type: N.GET_SCENE });
1274
1289
  break;
1275
1290
  case "getObject":
1276
- I.dispatchEvent({ type: N.GET_OBJECT, value: s.data });
1291
+ I.dispatchEvent({ type: N.GET_OBJECT, value: c.data });
1277
1292
  break;
1278
1293
  case "updateObject":
1279
- I.dispatchEvent({ type: N.UPDATE_OBJECT, value: s.data });
1294
+ I.dispatchEvent({ type: N.UPDATE_OBJECT, value: c.data });
1280
1295
  break;
1281
1296
  case "createTexture":
1282
- I.dispatchEvent({ type: N.CREATE_TEXTURE, value: s.data });
1297
+ I.dispatchEvent({ type: N.CREATE_TEXTURE, value: c.data });
1283
1298
  break;
1284
1299
  case "requestMethod":
1285
- I.dispatchEvent({ type: N.REQUEST_METHOD, value: s.data });
1300
+ I.dispatchEvent({ type: N.REQUEST_METHOD, value: c.data });
1286
1301
  break;
1287
1302
  }
1288
1303
  }
1289
- function i(s) {
1290
- switch (s.event) {
1304
+ function e(c) {
1305
+ switch (c.event) {
1291
1306
  case "custom":
1292
- I.dispatchEvent({ type: N.CUSTOM, value: s.data });
1307
+ I.dispatchEvent({ type: N.CUSTOM, value: c.data });
1293
1308
  break;
1294
1309
  case "setObject":
1295
- I.dispatchEvent({ type: N.SET_OBJECT, value: s.data });
1310
+ I.dispatchEvent({ type: N.SET_OBJECT, value: c.data });
1296
1311
  break;
1297
1312
  case "setScene":
1298
- I.dispatchEvent({ type: N.SET_SCENE, value: s.data });
1313
+ I.dispatchEvent({ type: N.SET_SCENE, value: c.data });
1299
1314
  break;
1300
1315
  }
1301
1316
  }
1302
- function l() {
1317
+ function i() {
1303
1318
  We.ui.hide();
1304
1319
  }
1305
- function h() {
1306
- We.ui.restore(), We.onSelectionChange((m) => {
1307
- m.length < 1 || m.forEach((p) => {
1308
- var k;
1309
- let E = p.address.sheetId, C = "setSheet", O = {};
1310
- switch (p.type) {
1320
+ function l() {
1321
+ We.ui.restore(), We.onSelectionChange((h) => {
1322
+ h.length < 1 || h.forEach((m) => {
1323
+ var R;
1324
+ let g = m.address.sheetId, E = "setSheet", C = {};
1325
+ switch (m.type) {
1311
1326
  case "Theatre_Sheet_PublicAPI":
1312
- C = "setSheet", O = {
1313
- sheet: p.address.sheetId
1314
- }, n = (k = t.components.get("theatre")) == null ? void 0 : k.sheets.get(p.address.sheetId);
1327
+ E = "setSheet", C = {
1328
+ sheet: m.address.sheetId
1329
+ }, n = (R = t.components.get("theatre")) == null ? void 0 : R.sheets.get(m.address.sheetId);
1315
1330
  break;
1316
1331
  case "Theatre_SheetObject_PublicAPI":
1317
- C = "setSheetObject", E += `_${p.address.objectKey}`, O = {
1318
- id: E,
1319
- sheet: p.address.sheetId,
1320
- key: p.address.objectKey
1332
+ E = "setSheetObject", g += `_${m.address.objectKey}`, C = {
1333
+ id: g,
1334
+ sheet: m.address.sheetId,
1335
+ key: m.address.objectKey
1321
1336
  };
1322
1337
  break;
1323
1338
  }
1324
- t.send({ event: C, target: "app", data: O });
1339
+ t.send({ event: E, target: "app", data: C });
1325
1340
  });
1326
1341
  });
1327
- let s = 0;
1328
- const c = () => {
1329
- if (n !== void 0 && s !== n.sequence.position) {
1330
- s = n.sequence.position;
1331
- const m = n;
1342
+ let c = 0;
1343
+ const s = () => {
1344
+ if (n !== void 0 && c !== n.sequence.position) {
1345
+ c = n.sequence.position;
1346
+ const h = n;
1332
1347
  t.send({
1333
1348
  event: "updateTimeline",
1334
1349
  target: "app",
1335
1350
  data: {
1336
- position: s,
1337
- sheet: m.address.sheetId
1351
+ position: c,
1352
+ sheet: h.address.sheetId
1338
1353
  }
1339
1354
  });
1340
1355
  }
1341
- }, f = () => {
1342
- c(), requestAnimationFrame(f);
1356
+ }, u = () => {
1357
+ s(), requestAnimationFrame(u);
1343
1358
  };
1344
- c(), f();
1359
+ s(), u();
1345
1360
  }
1346
- t.listen((s) => {
1347
- r === "app" ? e(s) : i(s);
1348
- }), t.editor ? h() : l();
1361
+ t.listen((c) => {
1362
+ t.editor ? e(c) : r(c);
1363
+ }), t.editor ? l() : i();
1349
1364
  }
1350
1365
  function wt(t) {
1351
1366
  const [n, r] = re(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
1352
- return /* @__PURE__ */ u.jsxs("div", { className: `accordion ${e ? "hide" : ""}`, children: [
1353
- /* @__PURE__ */ u.jsxs(
1367
+ return /* @__PURE__ */ d.jsxs("div", { className: `accordion ${e ? "hide" : ""}`, children: [
1368
+ /* @__PURE__ */ d.jsxs(
1354
1369
  "button",
1355
1370
  {
1356
1371
  className: "toggle",
@@ -1359,28 +1374,28 @@ function wt(t) {
1359
1374
  t.onToggle !== void 0 && t.onToggle(i), r(i);
1360
1375
  },
1361
1376
  children: [
1362
- /* @__PURE__ */ u.jsx(
1377
+ /* @__PURE__ */ d.jsx(
1363
1378
  "p",
1364
1379
  {
1365
1380
  className: `status ${n ? "open" : ""}`,
1366
1381
  children: "Toggle"
1367
1382
  }
1368
1383
  ),
1369
- /* @__PURE__ */ u.jsx("p", { className: "label", children: t.label })
1384
+ /* @__PURE__ */ d.jsx("p", { className: "label", children: t.label })
1370
1385
  ]
1371
1386
  }
1372
1387
  ),
1373
1388
  t.button,
1374
- /* @__PURE__ */ u.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ u.jsx("div", { children: t.children }) })
1389
+ /* @__PURE__ */ d.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ d.jsx("div", { children: t.children }) })
1375
1390
  ] });
1376
1391
  }
1377
- function qt(t) {
1392
+ function Jt(t) {
1378
1393
  const [n, r] = re(t.child.children.length > 0), e = t.child.children.length > 0, i = [];
1379
1394
  return t.child.children.length > 0 && t.child.children.map((l) => {
1380
- i.push(/* @__PURE__ */ u.jsx(qt, { child: l, three: t.three }, Math.random()));
1381
- }), /* @__PURE__ */ u.jsxs("div", { className: "childObject", children: [
1382
- /* @__PURE__ */ u.jsxs("div", { className: "child", children: [
1383
- e ? /* @__PURE__ */ u.jsx(
1395
+ i.push(/* @__PURE__ */ d.jsx(Jt, { child: l, three: t.three }, Math.random()));
1396
+ }), /* @__PURE__ */ d.jsxs("div", { className: "childObject", children: [
1397
+ /* @__PURE__ */ d.jsxs("div", { className: "child", children: [
1398
+ e ? /* @__PURE__ */ d.jsx(
1384
1399
  "button",
1385
1400
  {
1386
1401
  className: "status",
@@ -1392,7 +1407,7 @@ function qt(t) {
1392
1407
  }
1393
1408
  }
1394
1409
  ) : null,
1395
- /* @__PURE__ */ u.jsx(
1410
+ /* @__PURE__ */ d.jsx(
1396
1411
  "button",
1397
1412
  {
1398
1413
  className: "name",
@@ -1405,19 +1420,19 @@ function qt(t) {
1405
1420
  children: t.child.name.length > 0 ? `${t.child.name} (${t.child.type})` : `${t.child.type}::${t.child.uuid}`
1406
1421
  }
1407
1422
  ),
1408
- /* @__PURE__ */ u.jsx("div", { className: `icon ${Dn(t.child)}` })
1423
+ /* @__PURE__ */ d.jsx("div", { className: `icon ${An(t.child)}` })
1409
1424
  ] }),
1410
- /* @__PURE__ */ u.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ u.jsx("div", { className: "container", children: i }) })
1425
+ /* @__PURE__ */ d.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ d.jsx("div", { className: "container", children: i }) })
1411
1426
  ] }, Math.random());
1412
1427
  }
1413
- function Vn(t) {
1428
+ function Wn(t) {
1414
1429
  const n = [];
1415
1430
  return t.child.children.map((r) => {
1416
- n.push(/* @__PURE__ */ u.jsx(qt, { child: r, three: t.three }, Math.random()));
1417
- }), /* @__PURE__ */ u.jsx("div", { className: `scene ${t.class !== void 0 ? t.class : ""}`, children: n });
1431
+ n.push(/* @__PURE__ */ d.jsx(Jt, { child: r, three: t.three }, Math.random()));
1432
+ }), /* @__PURE__ */ d.jsx("div", { className: `scene ${t.class !== void 0 ? t.class : ""}`, children: n });
1418
1433
  }
1419
- const zn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1420
- function Wn(t) {
1434
+ const Hn = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
1435
+ function Kn(t) {
1421
1436
  return "items" in t;
1422
1437
  }
1423
1438
  function Ae(t) {
@@ -1426,10 +1441,10 @@ function Ae(t) {
1426
1441
  }
1427
1442
  const r = [];
1428
1443
  return t.items.forEach((e) => {
1429
- Wn(e) ? r.push(
1430
- /* @__PURE__ */ u.jsx(Ae, { title: e.title, items: e.items }, Math.random())
1444
+ Kn(e) ? r.push(
1445
+ /* @__PURE__ */ d.jsx(Ae, { title: e.title, items: e.items }, Math.random())
1431
1446
  ) : r.push(
1432
- /* @__PURE__ */ u.jsx(
1447
+ /* @__PURE__ */ d.jsx(
1433
1448
  Xe,
1434
1449
  {
1435
1450
  title: e.title,
@@ -1447,9 +1462,9 @@ function Ae(t) {
1447
1462
  Math.random()
1448
1463
  )
1449
1464
  );
1450
- }), /* @__PURE__ */ u.jsx(wt, { label: t.title, open: !1, children: r });
1465
+ }), /* @__PURE__ */ d.jsx(wt, { label: t.title, open: !1, children: r });
1451
1466
  }
1452
- function Hn(t) {
1467
+ function Xn(t) {
1453
1468
  return !(t === "alphaHash" || t === "alphaToCoverage" || t === "attenuationDistance" || t === "colorWrite" || t === "combine" || t === "defaultAttributeValues" || t === "depthFunc" || t === "forceSinglePass" || t === "glslVersion" || t === "linewidth" || t === "normalMapType" || t === "precision" || t === "premultipliedAlpha" || t === "shadowSide" || t === "side" || t === "toneMapped" || t === "uniformsGroups" || t === "uniformsNeedUpdate" || t === "userData" || t === "vertexColors" || t === "version" || t === "wireframeLinecap" || t === "wireframeLinejoin" || t === "wireframeLinewidth" || t.slice(0, 5) === "blend" || t.slice(0, 4) === "clip" || t.slice(0, 7) === "polygon" || t.slice(0, 7) === "stencil" || t.slice(0, 2) === "is");
1454
1469
  }
1455
1470
  function xe(t) {
@@ -1569,10 +1584,10 @@ function xe(t) {
1569
1584
  }
1570
1585
  return t;
1571
1586
  }
1572
- function Kn(t) {
1587
+ function qn(t) {
1573
1588
  return t.toLowerCase().search("intensity") > -1 || t === "anisotropyRotation" || t === "bumpScale" || t === "clearcoatRoughness" || t === "displacementBias" || t === "displacementScale" || t === "metalness" || t === "opacity" || t === "reflectivity" || t === "refractionRatio" || t === "roughness" || t === "sheenRoughness" || t === "thickness";
1574
1589
  }
1575
- function Xn() {
1590
+ function Zn() {
1576
1591
  const t = document.createElement("input");
1577
1592
  return t.type = "file", new Promise((n, r) => {
1578
1593
  t.addEventListener("change", function() {
@@ -1587,55 +1602,55 @@ function Xn() {
1587
1602
  }), t.click();
1588
1603
  });
1589
1604
  }
1590
- function It(t, n, r) {
1605
+ function Nt(t, n, r) {
1591
1606
  const e = [];
1592
1607
  for (const i in t) {
1593
- if (!Hn(i))
1608
+ if (!Xn(i))
1594
1609
  continue;
1595
- const l = typeof t[i], h = t[i];
1610
+ const l = typeof t[i], c = t[i];
1596
1611
  if (l === "boolean" || l === "number" || l === "string") {
1597
1612
  const s = {
1598
1613
  title: xe(i),
1599
1614
  prop: i,
1600
1615
  type: l,
1601
- value: h,
1616
+ value: c,
1602
1617
  min: void 0,
1603
1618
  max: void 0,
1604
- onChange: (c, f) => {
1605
- var p;
1606
- r.updateObject(n.uuid, `material.${c}`, f), l === "boolean" && r.updateObject(n.uuid, "material.needsUpdate", !0);
1607
- const m = (p = r.scene) == null ? void 0 : p.getObjectByProperty("uuid", n.uuid);
1608
- m !== void 0 && Z(m, `material.${c}`, f);
1619
+ onChange: (u, h) => {
1620
+ var g;
1621
+ r.updateObject(n.uuid, `material.${u}`, h), l === "boolean" && r.updateObject(n.uuid, "material.needsUpdate", !0);
1622
+ const m = (g = r.scene) == null ? void 0 : g.getObjectByProperty("uuid", n.uuid);
1623
+ m !== void 0 && Z(m, `material.${u}`, h);
1609
1624
  }
1610
1625
  };
1611
- Kn(i) && (s.value = Number(h), s.type = "range", s.min = 0, s.max = 1, s.step = 0.01), e.push(s);
1626
+ qn(i) && (s.value = Number(c), s.type = "range", s.min = 0, s.max = 1, s.step = 0.01), e.push(s);
1612
1627
  } else if (l === "object")
1613
- if (h.isColor)
1628
+ if (c.isColor)
1614
1629
  e.push({
1615
1630
  title: xe(i),
1616
1631
  prop: i,
1617
1632
  type: "color",
1618
- value: h,
1619
- onChange: (s, c) => {
1620
- var p;
1621
- const f = new St(c);
1622
- r.updateObject(n.uuid, `material.${s}`, f);
1623
- const m = (p = r.scene) == null ? void 0 : p.getObjectByProperty("uuid", n.uuid);
1624
- m !== void 0 && Z(m, `material.${s}`, f);
1633
+ value: c,
1634
+ onChange: (s, u) => {
1635
+ var g;
1636
+ const h = new St(u);
1637
+ r.updateObject(n.uuid, `material.${s}`, h);
1638
+ const m = (g = r.scene) == null ? void 0 : g.getObjectByProperty("uuid", n.uuid);
1639
+ m !== void 0 && Z(m, `material.${s}`, h);
1625
1640
  }
1626
1641
  });
1627
- else if (Array.isArray(h)) {
1642
+ else if (Array.isArray(c)) {
1628
1643
  const s = [];
1629
- for (const c in h)
1644
+ for (const u in c)
1630
1645
  s.push({
1631
- title: `${c}`,
1632
- type: `${typeof h[c]}`,
1633
- value: h[c],
1634
- onChange: (f, m) => {
1646
+ title: `${u}`,
1647
+ type: `${typeof c[u]}`,
1648
+ value: c[u],
1649
+ onChange: (h, m) => {
1635
1650
  var E;
1636
1651
  r.updateObject(n.uuid, `material.${i}`, m);
1637
- const p = (E = r.scene) == null ? void 0 : E.getObjectByProperty("uuid", n.uuid);
1638
- p !== void 0 && Z(p, `material.${i}`, m);
1652
+ const g = (E = r.scene) == null ? void 0 : E.getObjectByProperty("uuid", n.uuid);
1653
+ g !== void 0 && Z(g, `material.${i}`, m);
1639
1654
  }
1640
1655
  });
1641
1656
  e.push({
@@ -1644,59 +1659,59 @@ function It(t, n, r) {
1644
1659
  });
1645
1660
  } else {
1646
1661
  const s = [];
1647
- for (const c in h) {
1648
- const f = h[c];
1649
- switch (typeof f) {
1662
+ for (const u in c) {
1663
+ const h = c[u];
1664
+ switch (typeof h) {
1650
1665
  case "boolean":
1651
1666
  case "number":
1652
1667
  case "string":
1653
- c === "src" ? e.push({
1668
+ u === "src" ? e.push({
1654
1669
  title: xe(i),
1655
1670
  type: "image",
1656
- value: f,
1657
- onChange: (p, E) => {
1658
- var O;
1671
+ value: h,
1672
+ onChange: (g, E) => {
1673
+ var R;
1659
1674
  r.createTexture(n.uuid, `material.${i}`, E);
1660
- const C = (O = r.scene) == null ? void 0 : O.getObjectByProperty("uuid", n.uuid);
1661
- C !== void 0 && yt(E).then((k) => {
1662
- Z(C, `material.${i}`, k), Z(C, "material.needsUpdate", !0);
1675
+ const C = (R = r.scene) == null ? void 0 : R.getObjectByProperty("uuid", n.uuid);
1676
+ C !== void 0 && yt(E).then((D) => {
1677
+ Z(C, `material.${i}`, D), Z(C, "material.needsUpdate", !0);
1663
1678
  });
1664
1679
  }
1665
1680
  }) : s.push({
1666
- title: `${xe(c)}`,
1667
- prop: `material.${i}.${c}`,
1668
- type: `${typeof t[i][c]}`,
1669
- value: h[c],
1670
- onChange: (p, E) => {
1671
- var O;
1672
- r.updateObject(n.uuid, `material.${i}.${c}`, E);
1673
- const C = (O = r.scene) == null ? void 0 : O.getObjectByProperty("uuid", n.uuid);
1674
- C !== void 0 && Z(C, `material.${i}.${c}`, E);
1681
+ title: `${xe(u)}`,
1682
+ prop: `material.${i}.${u}`,
1683
+ type: `${typeof t[i][u]}`,
1684
+ value: c[u],
1685
+ onChange: (g, E) => {
1686
+ var R;
1687
+ r.updateObject(n.uuid, `material.${i}.${u}`, E);
1688
+ const C = (R = r.scene) == null ? void 0 : R.getObjectByProperty("uuid", n.uuid);
1689
+ C !== void 0 && Z(C, `material.${i}.${u}`, E);
1675
1690
  }
1676
1691
  });
1677
1692
  break;
1678
1693
  case "object":
1679
- f.value !== void 0 && f.value.src !== void 0 ? s.push({
1680
- title: xe(c),
1694
+ h.value !== void 0 && h.value.src !== void 0 ? s.push({
1695
+ title: xe(u),
1681
1696
  type: "image",
1682
- value: f.value.src,
1683
- onChange: (p, E) => {
1684
- var O;
1685
- r.createTexture(n.uuid, `material.${i}.${c}.value`, E);
1686
- const C = (O = r.scene) == null ? void 0 : O.getObjectByProperty("uuid", n.uuid);
1687
- C !== void 0 && yt(E).then((k) => {
1688
- Z(C, `material.${i}.${c}.value`, k);
1697
+ value: h.value.src,
1698
+ onChange: (g, E) => {
1699
+ var R;
1700
+ r.createTexture(n.uuid, `material.${i}.${u}.value`, E);
1701
+ const C = (R = r.scene) == null ? void 0 : R.getObjectByProperty("uuid", n.uuid);
1702
+ C !== void 0 && yt(E).then((D) => {
1703
+ Z(C, `material.${i}.${u}.value`, D);
1689
1704
  });
1690
1705
  }
1691
1706
  }) : s.push({
1692
- title: c,
1693
- type: `${typeof f.value}`,
1694
- value: f.value,
1695
- onChange: (p, E) => {
1696
- var O;
1697
- r.updateObject(n.uuid, `material.${i}.${c}.value`, E);
1698
- const C = (O = r.scene) == null ? void 0 : O.getObjectByProperty("uuid", n.uuid);
1699
- C !== void 0 && Z(C, `material.${i}.${c}.value`, E);
1707
+ title: u,
1708
+ type: `${typeof h.value}`,
1709
+ value: h.value,
1710
+ onChange: (g, E) => {
1711
+ var R;
1712
+ r.updateObject(n.uuid, `material.${i}.${u}.value`, E);
1713
+ const C = (R = r.scene) == null ? void 0 : R.getObjectByProperty("uuid", n.uuid);
1714
+ C !== void 0 && Z(C, `material.${i}.${u}.value`, E);
1700
1715
  }
1701
1716
  });
1702
1717
  break;
@@ -1708,7 +1723,7 @@ function It(t, n, r) {
1708
1723
  });
1709
1724
  }
1710
1725
  else
1711
- h !== void 0 && console.log("other:", i, l, h);
1726
+ c !== void 0 && console.log("other:", i, l, c);
1712
1727
  }
1713
1728
  return e.sort((i, l) => i.title < l.title ? -1 : i.title > l.title ? 1 : 0), e.push({
1714
1729
  title: "Update Material",
@@ -1718,90 +1733,90 @@ function It(t, n, r) {
1718
1733
  }
1719
1734
  }), e;
1720
1735
  }
1721
- function qn(t, n) {
1736
+ function Jn(t, n) {
1722
1737
  const r = t.material;
1723
1738
  if (Array.isArray(r)) {
1724
1739
  const e = [], i = r.length;
1725
1740
  for (let l = 0; l < i; l++)
1726
1741
  e.push(
1727
- /* @__PURE__ */ u.jsx(
1742
+ /* @__PURE__ */ d.jsx(
1728
1743
  Ae,
1729
1744
  {
1730
1745
  title: `Material ${l}`,
1731
- items: It(r[l], t, n)
1746
+ items: Nt(r[l], t, n)
1732
1747
  }
1733
1748
  )
1734
1749
  );
1735
- return /* @__PURE__ */ u.jsx(u.Fragment, { children: e });
1750
+ return /* @__PURE__ */ d.jsx(d.Fragment, { children: e });
1736
1751
  } else
1737
- return /* @__PURE__ */ u.jsx(
1752
+ return /* @__PURE__ */ d.jsx(
1738
1753
  Ae,
1739
1754
  {
1740
1755
  title: "Material",
1741
- items: It(r, t, n)
1756
+ items: Nt(r, t, n)
1742
1757
  }
1743
1758
  );
1744
1759
  }
1745
1760
  function Xe(t) {
1746
1761
  let n = t.value;
1747
- n !== void 0 && n.isColor !== void 0 && (n = kn(t.value));
1748
- const [r, e] = re(n), i = Se(null), l = Se(null), h = Se(null);
1762
+ n !== void 0 && n.isColor !== void 0 && (n = _n(t.value));
1763
+ const [r, e] = re(n), i = Se(null), l = Se(null), c = Se(null);
1749
1764
  qe(() => {
1750
- var T;
1751
- let m = !1, p = -1, E = 0, C = Number(r);
1752
- const O = (j) => {
1753
- m = !0, E = C, p = j.clientX;
1754
- }, k = (j) => {
1765
+ var O;
1766
+ let m = !1, g = -1, E = 0, C = Number(r);
1767
+ const R = (j) => {
1768
+ m = !0, E = C, g = j.clientX;
1769
+ }, D = (j) => {
1755
1770
  if (!m)
1756
1771
  return;
1757
- const z = t.step !== void 0 ? t.step : 1, ee = (j.clientX - p) * z;
1772
+ const z = t.step !== void 0 ? t.step : 1, ee = (j.clientX - g) * z;
1758
1773
  C = Number((E + ee).toFixed(4)), l.current !== null && (l.current.value = C.toString()), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, C);
1759
1774
  }, y = () => {
1760
1775
  m = !1;
1761
- }, v = () => {
1776
+ }, b = () => {
1762
1777
  m = !1;
1763
- }, b = t.type === "number";
1764
- return b && ((T = i.current) == null || T.addEventListener("mousedown", O, !1), document.addEventListener("mouseup", y, !1), document.addEventListener("mousemove", k, !1), document.addEventListener("contextmenu", v, !1)), () => {
1778
+ }, v = t.type === "number";
1779
+ return v && ((O = i.current) == null || O.addEventListener("mousedown", R, !1), document.addEventListener("mouseup", y, !1), document.addEventListener("mousemove", D, !1), document.addEventListener("contextmenu", b, !1)), () => {
1765
1780
  var j;
1766
- b && ((j = i.current) == null || j.removeEventListener("mousedown", O), document.removeEventListener("mouseup", y), document.removeEventListener("mousemove", k), document.removeEventListener("contextmenu", v));
1781
+ v && ((j = i.current) == null || j.removeEventListener("mousedown", R), document.removeEventListener("mouseup", y), document.removeEventListener("mousemove", D), document.removeEventListener("contextmenu", b));
1767
1782
  };
1768
1783
  }, [r]);
1769
1784
  const s = t.type === "string" && (r.length > 100 || r.search(`
1770
- `) > -1), c = s || t.type === "image", f = (m) => {
1771
- let p = m.target.value;
1772
- t.type === "boolean" && (p = m.target.checked), e(p), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, p);
1785
+ `) > -1), u = s || t.type === "image", h = (m) => {
1786
+ let g = m.target.value;
1787
+ t.type === "boolean" && (g = m.target.checked), e(g), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, g);
1773
1788
  };
1774
- return /* @__PURE__ */ u.jsxs("div", { className: `field ${c ? "block" : ""}`, children: [
1775
- t.type !== "button" && /* @__PURE__ */ u.jsx("label", { ref: i, children: t.title }, "fieldLabel"),
1776
- t.type === "string" && !s && /* @__PURE__ */ u.jsx(
1789
+ return /* @__PURE__ */ d.jsxs("div", { className: `field ${u ? "block" : ""}`, children: [
1790
+ t.type !== "button" && /* @__PURE__ */ d.jsx("label", { ref: i, children: t.title }, "fieldLabel"),
1791
+ t.type === "string" && !s && /* @__PURE__ */ d.jsx(
1777
1792
  "input",
1778
1793
  {
1779
1794
  type: "text",
1780
1795
  disabled: t.disabled,
1781
- onChange: f,
1796
+ onChange: h,
1782
1797
  value: r
1783
1798
  }
1784
1799
  ),
1785
- t.type === "string" && s && /* @__PURE__ */ u.jsx(
1800
+ t.type === "string" && s && /* @__PURE__ */ d.jsx(
1786
1801
  "textarea",
1787
1802
  {
1788
1803
  cols: 50,
1789
1804
  rows: 10,
1790
1805
  disabled: !0,
1791
- onChange: f,
1806
+ onChange: h,
1792
1807
  value: r
1793
1808
  }
1794
1809
  ),
1795
- t.type === "boolean" && /* @__PURE__ */ u.jsx(
1810
+ t.type === "boolean" && /* @__PURE__ */ d.jsx(
1796
1811
  "input",
1797
1812
  {
1798
1813
  type: "checkbox",
1799
1814
  disabled: t.disabled,
1800
- onChange: f,
1815
+ onChange: h,
1801
1816
  checked: r
1802
1817
  }
1803
1818
  ),
1804
- t.type === "number" && /* @__PURE__ */ u.jsx(
1819
+ t.type === "number" && /* @__PURE__ */ d.jsx(
1805
1820
  "input",
1806
1821
  {
1807
1822
  ref: l,
@@ -1810,12 +1825,12 @@ function Xe(t) {
1810
1825
  min: t.min,
1811
1826
  max: t.max,
1812
1827
  step: t.step,
1813
- onChange: f
1828
+ onChange: h
1814
1829
  }
1815
1830
  ),
1816
- t.type === "range" && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
1817
- /* @__PURE__ */ u.jsx("input", { type: "text", value: r.toString(), onChange: f, className: "min" }),
1818
- /* @__PURE__ */ u.jsx(
1831
+ t.type === "range" && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
1832
+ /* @__PURE__ */ d.jsx("input", { type: "text", value: r.toString(), onChange: h, className: "min" }),
1833
+ /* @__PURE__ */ d.jsx(
1819
1834
  "input",
1820
1835
  {
1821
1836
  disabled: t.disabled,
@@ -1824,15 +1839,15 @@ function Xe(t) {
1824
1839
  min: t.min,
1825
1840
  max: t.max,
1826
1841
  step: t.step,
1827
- onChange: f
1842
+ onChange: h
1828
1843
  }
1829
1844
  )
1830
1845
  ] }),
1831
- t.type === "color" && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
1832
- /* @__PURE__ */ u.jsx("input", { type: "text", value: r.toString(), onChange: f, className: "color" }),
1833
- /* @__PURE__ */ u.jsx("input", { type: "color", value: r, onChange: f })
1846
+ t.type === "color" && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
1847
+ /* @__PURE__ */ d.jsx("input", { type: "text", value: r.toString(), onChange: h, className: "color" }),
1848
+ /* @__PURE__ */ d.jsx("input", { type: "color", value: r, onChange: h })
1834
1849
  ] }),
1835
- t.type === "button" && /* @__PURE__ */ u.jsx(
1850
+ t.type === "button" && /* @__PURE__ */ d.jsx(
1836
1851
  "button",
1837
1852
  {
1838
1853
  onClick: () => {
@@ -1841,14 +1856,14 @@ function Xe(t) {
1841
1856
  children: t.title
1842
1857
  }
1843
1858
  ),
1844
- t.type === "image" && /* @__PURE__ */ u.jsx("img", { ref: h, onClick: () => {
1845
- Xn().then((m) => {
1846
- h.current.src = m, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, m);
1859
+ t.type === "image" && /* @__PURE__ */ d.jsx("img", { ref: c, onClick: () => {
1860
+ Zn().then((m) => {
1861
+ c.current.src = m, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, m);
1847
1862
  });
1848
- }, src: r.length > 0 ? r : zn })
1863
+ }, src: r.length > 0 ? r : Hn })
1849
1864
  ] });
1850
1865
  }
1851
- function Nt(t) {
1866
+ function Lt(t) {
1852
1867
  switch (t) {
1853
1868
  case "fov":
1854
1869
  return "FOV";
@@ -1877,12 +1892,12 @@ function Nt(t) {
1877
1892
  }
1878
1893
  return t;
1879
1894
  }
1880
- function Zn(t, n) {
1895
+ function Qn(t, n) {
1881
1896
  const r = [];
1882
1897
  if (t.perspectiveCameraInfo !== void 0)
1883
1898
  for (const e in t.perspectiveCameraInfo)
1884
1899
  r.push({
1885
- title: Nt(e),
1900
+ title: Lt(e),
1886
1901
  prop: e,
1887
1902
  type: "number",
1888
1903
  step: 0.01,
@@ -1890,14 +1905,14 @@ function Zn(t, n) {
1890
1905
  onChange: (i, l) => {
1891
1906
  var s;
1892
1907
  n.updateObject(t.uuid, i, l), n.requestMethod(t.uuid, "updateProjectionMatrix");
1893
- const h = (s = n.scene) == null ? void 0 : s.getObjectByProperty("uuid", t.uuid);
1894
- h !== void 0 && (Z(h, i, l), h.updateProjectionMatrix());
1908
+ const c = (s = n.scene) == null ? void 0 : s.getObjectByProperty("uuid", t.uuid);
1909
+ c !== void 0 && (Z(c, i, l), c.updateProjectionMatrix());
1895
1910
  }
1896
1911
  });
1897
1912
  else if (t.orthographicCameraInfo !== void 0)
1898
1913
  for (const e in t.orthographicCameraInfo)
1899
1914
  r.push({
1900
- title: Nt(e),
1915
+ title: Lt(e),
1901
1916
  prop: e,
1902
1917
  type: "number",
1903
1918
  step: 0.01,
@@ -1905,11 +1920,11 @@ function Zn(t, n) {
1905
1920
  onChange: (i, l) => {
1906
1921
  var s;
1907
1922
  n.updateObject(t.uuid, i, l), n.requestMethod(t.uuid, "updateProjectionMatrix");
1908
- const h = (s = n.scene) == null ? void 0 : s.getObjectByProperty("uuid", t.uuid);
1909
- h !== void 0 && (Z(h, i, l), h.updateProjectionMatrix());
1923
+ const c = (s = n.scene) == null ? void 0 : s.getObjectByProperty("uuid", t.uuid);
1924
+ c !== void 0 && (Z(c, i, l), c.updateProjectionMatrix());
1910
1925
  }
1911
1926
  });
1912
- return /* @__PURE__ */ u.jsx(
1927
+ return /* @__PURE__ */ d.jsx(
1913
1928
  Ae,
1914
1929
  {
1915
1930
  title: "Camera",
@@ -1917,16 +1932,16 @@ function Zn(t, n) {
1917
1932
  }
1918
1933
  );
1919
1934
  }
1920
- function Jn(t, n) {
1921
- const r = new un();
1935
+ function ea(t, n) {
1936
+ const r = new fn();
1922
1937
  r.elements = t.matrix;
1923
- const e = new G(), i = new dn(), l = new G();
1938
+ const e = new G(), i = new hn(), l = new G();
1924
1939
  t.uuid.length > 0 && (e.setFromMatrixPosition(r), i.setFromRotationMatrix(r), l.setFromMatrixScale(r));
1925
- const h = (c, f) => {
1926
- var p;
1927
- n.updateObject(t.uuid, c, f);
1928
- const m = (p = n.scene) == null ? void 0 : p.getObjectByProperty("uuid", t.uuid);
1929
- m !== void 0 && Z(m, c, f);
1940
+ const c = (u, h) => {
1941
+ var g;
1942
+ n.updateObject(t.uuid, u, h);
1943
+ const m = (g = n.scene) == null ? void 0 : g.getObjectByProperty("uuid", t.uuid);
1944
+ m !== void 0 && Z(m, u, h);
1930
1945
  }, s = [
1931
1946
  {
1932
1947
  title: "Position",
@@ -1936,21 +1951,21 @@ function Jn(t, n) {
1936
1951
  prop: "position.x",
1937
1952
  type: "number",
1938
1953
  value: e.x,
1939
- onChange: h
1954
+ onChange: c
1940
1955
  },
1941
1956
  {
1942
1957
  title: "Y",
1943
1958
  prop: "position.y",
1944
1959
  type: "number",
1945
1960
  value: e.y,
1946
- onChange: h
1961
+ onChange: c
1947
1962
  },
1948
1963
  {
1949
1964
  title: "Z",
1950
1965
  prop: "position.z",
1951
1966
  type: "number",
1952
1967
  value: e.z,
1953
- onChange: h
1968
+ onChange: c
1954
1969
  }
1955
1970
  ]
1956
1971
  },
@@ -1965,7 +1980,7 @@ function Jn(t, n) {
1965
1980
  min: -Math.PI,
1966
1981
  max: Math.PI,
1967
1982
  step: 0.01,
1968
- onChange: h
1983
+ onChange: c
1969
1984
  },
1970
1985
  {
1971
1986
  title: "Y",
@@ -1975,7 +1990,7 @@ function Jn(t, n) {
1975
1990
  min: -Math.PI,
1976
1991
  max: Math.PI,
1977
1992
  step: 0.01,
1978
- onChange: h
1993
+ onChange: c
1979
1994
  },
1980
1995
  {
1981
1996
  title: "Z",
@@ -1985,7 +2000,7 @@ function Jn(t, n) {
1985
2000
  min: -Math.PI,
1986
2001
  max: Math.PI,
1987
2002
  step: 0.01,
1988
- onChange: h
2003
+ onChange: c
1989
2004
  }
1990
2005
  ]
1991
2006
  },
@@ -1998,7 +2013,7 @@ function Jn(t, n) {
1998
2013
  type: "number",
1999
2014
  value: l.x,
2000
2015
  step: 0.01,
2001
- onChange: h
2016
+ onChange: c
2002
2017
  },
2003
2018
  {
2004
2019
  title: "Y",
@@ -2006,7 +2021,7 @@ function Jn(t, n) {
2006
2021
  type: "number",
2007
2022
  value: l.y,
2008
2023
  step: 0.01,
2009
- onChange: h
2024
+ onChange: c
2010
2025
  },
2011
2026
  {
2012
2027
  title: "Z",
@@ -2014,12 +2029,12 @@ function Jn(t, n) {
2014
2029
  type: "number",
2015
2030
  value: l.z,
2016
2031
  step: 0.01,
2017
- onChange: h
2032
+ onChange: c
2018
2033
  }
2019
2034
  ]
2020
2035
  }
2021
2036
  ];
2022
- return /* @__PURE__ */ u.jsx(
2037
+ return /* @__PURE__ */ d.jsx(
2023
2038
  Ae,
2024
2039
  {
2025
2040
  title: "Transform",
@@ -2027,7 +2042,7 @@ function Jn(t, n) {
2027
2042
  }
2028
2043
  );
2029
2044
  }
2030
- function Lt(t) {
2045
+ function Ft(t) {
2031
2046
  switch (t) {
2032
2047
  case "color":
2033
2048
  return "Color";
@@ -2046,38 +2061,38 @@ function Lt(t) {
2046
2061
  }
2047
2062
  return t;
2048
2063
  }
2049
- function Qn(t, n) {
2064
+ function ta(t, n) {
2050
2065
  const r = [];
2051
2066
  if (t.lightInfo !== void 0)
2052
2067
  for (const e in t.lightInfo) {
2053
2068
  const i = t.lightInfo[e];
2054
2069
  i !== void 0 && (i.isColor !== void 0 ? r.push({
2055
- title: Lt(e),
2070
+ title: Ft(e),
2056
2071
  prop: e,
2057
2072
  type: "color",
2058
2073
  value: i,
2059
- onChange: (l, h) => {
2060
- var f;
2061
- const s = new St(h);
2074
+ onChange: (l, c) => {
2075
+ var h;
2076
+ const s = new St(c);
2062
2077
  n.updateObject(t.uuid, l, s);
2063
- const c = (f = n.scene) == null ? void 0 : f.getObjectByProperty("uuid", t.uuid);
2064
- c !== void 0 && Z(c, l, s);
2078
+ const u = (h = n.scene) == null ? void 0 : h.getObjectByProperty("uuid", t.uuid);
2079
+ u !== void 0 && Z(u, l, s);
2065
2080
  }
2066
2081
  }) : r.push({
2067
- title: Lt(e),
2082
+ title: Ft(e),
2068
2083
  prop: e,
2069
2084
  type: typeof i,
2070
2085
  value: i,
2071
2086
  step: typeof i == "number" ? 0.01 : void 0,
2072
- onChange: (l, h) => {
2073
- var c;
2074
- n.updateObject(t.uuid, l, h);
2075
- const s = (c = n.scene) == null ? void 0 : c.getObjectByProperty("uuid", t.uuid);
2076
- s !== void 0 && Z(s, l, h);
2087
+ onChange: (l, c) => {
2088
+ var u;
2089
+ n.updateObject(t.uuid, l, c);
2090
+ const s = (u = n.scene) == null ? void 0 : u.getObjectByProperty("uuid", t.uuid);
2091
+ s !== void 0 && Z(s, l, c);
2077
2092
  }
2078
2093
  }));
2079
2094
  }
2080
- return /* @__PURE__ */ u.jsx(
2095
+ return /* @__PURE__ */ d.jsx(
2081
2096
  Ae,
2082
2097
  {
2083
2098
  title: "Light",
@@ -2085,7 +2100,7 @@ function Qn(t, n) {
2085
2100
  }
2086
2101
  );
2087
2102
  }
2088
- function ea(t) {
2103
+ function na(t) {
2089
2104
  const [n, r] = re(-1), [e, i] = re({
2090
2105
  name: "",
2091
2106
  uuid: "",
@@ -2094,15 +2109,15 @@ function ea(t) {
2094
2109
  matrix: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1]
2095
2110
  });
2096
2111
  return qe(() => {
2097
- function l(h) {
2098
- const s = h.value;
2112
+ function l(c) {
2113
+ const s = c.value;
2099
2114
  i(s), r(Date.now());
2100
2115
  }
2101
2116
  return I.addEventListener(N.SET_OBJECT, l), () => {
2102
2117
  I.removeEventListener(N.SET_OBJECT, l);
2103
2118
  };
2104
- }, []), /* @__PURE__ */ u.jsx("div", { id: "Inspector", className: t.class, children: e.uuid.length > 0 && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
2105
- /* @__PURE__ */ u.jsx(
2119
+ }, []), /* @__PURE__ */ d.jsx("div", { id: "Inspector", className: t.class, children: e.uuid.length > 0 && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
2120
+ /* @__PURE__ */ d.jsx(
2106
2121
  Xe,
2107
2122
  {
2108
2123
  type: "string",
@@ -2112,7 +2127,7 @@ function ea(t) {
2112
2127
  disabled: !0
2113
2128
  }
2114
2129
  ),
2115
- /* @__PURE__ */ u.jsx(
2130
+ /* @__PURE__ */ d.jsx(
2116
2131
  Xe,
2117
2132
  {
2118
2133
  type: "string",
@@ -2122,7 +2137,7 @@ function ea(t) {
2122
2137
  disabled: !0
2123
2138
  }
2124
2139
  ),
2125
- /* @__PURE__ */ u.jsx(
2140
+ /* @__PURE__ */ d.jsx(
2126
2141
  Xe,
2127
2142
  {
2128
2143
  type: "string",
@@ -2132,25 +2147,25 @@ function ea(t) {
2132
2147
  disabled: !0
2133
2148
  }
2134
2149
  ),
2135
- /* @__PURE__ */ u.jsx(
2150
+ /* @__PURE__ */ d.jsx(
2136
2151
  Xe,
2137
2152
  {
2138
2153
  type: "boolean",
2139
2154
  title: "Visible",
2140
2155
  prop: "visible",
2141
2156
  value: e.visible,
2142
- onChange: (l, h) => {
2143
- t.three.updateObject(e.uuid, l, h);
2157
+ onChange: (l, c) => {
2158
+ t.three.updateObject(e.uuid, l, c);
2144
2159
  }
2145
2160
  }
2146
2161
  ),
2147
- Jn(e, t.three),
2148
- e.type.search("Camera") > -1 ? Zn(e, t.three) : null,
2149
- e.type.search("Light") > -1 ? Qn(e, t.three) : null,
2150
- e.material !== void 0 ? qn(e, t.three) : null
2162
+ ea(e, t.three),
2163
+ e.type.search("Camera") > -1 ? Qn(e, t.three) : null,
2164
+ e.type.search("Light") > -1 ? ta(e, t.three) : null,
2165
+ e.material !== void 0 ? Jn(e, t.three) : null
2151
2166
  ] }) }, n);
2152
2167
  }
2153
- class Ca extends Pn {
2168
+ class Pa extends jn {
2154
2169
  constructor(r) {
2155
2170
  super(r);
2156
2171
  $(this, "three");
@@ -2176,17 +2191,17 @@ class Ca extends Pn {
2176
2191
  render() {
2177
2192
  var i;
2178
2193
  const r = this.componentState.scene !== null, e = "Hierarchy" + (r ? `: ${(i = this.componentState.scene) == null ? void 0 : i.name}` : "");
2179
- return /* @__PURE__ */ u.jsx("div", { id: "SceneHierarchy", children: /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
2180
- r && /* @__PURE__ */ u.jsx(
2194
+ return /* @__PURE__ */ d.jsx("div", { id: "SceneHierarchy", children: /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
2195
+ r && /* @__PURE__ */ d.jsx(
2181
2196
  wt,
2182
2197
  {
2183
2198
  label: e,
2184
- button: /* @__PURE__ */ u.jsx("button", { className: "icon refresh hideText", onClick: this.onRefresh, children: "Refresh" }),
2199
+ button: /* @__PURE__ */ d.jsx("button", { className: "icon refresh hideText", onClick: this.onRefresh, children: "Refresh" }),
2185
2200
  open: !0,
2186
- children: /* @__PURE__ */ u.jsx(Vn, { child: this.componentState.scene, three: this.three })
2201
+ children: /* @__PURE__ */ d.jsx(Wn, { child: this.componentState.scene, three: this.three })
2187
2202
  }
2188
2203
  ),
2189
- /* @__PURE__ */ u.jsx(wt, { label: "Inspector", children: /* @__PURE__ */ u.jsx(ea, { three: this.three }, "Inspector") })
2204
+ /* @__PURE__ */ d.jsx(wt, { label: "Inspector", children: /* @__PURE__ */ d.jsx(na, { three: this.three }, "Inspector") })
2190
2205
  ] }) }, "SceneHierarchy");
2191
2206
  }
2192
2207
  // Getters / Setters
@@ -2194,38 +2209,38 @@ class Ca extends Pn {
2194
2209
  return this.state;
2195
2210
  }
2196
2211
  }
2197
- function Sa(t) {
2212
+ function Ra(t) {
2198
2213
  const n = (s) => {
2199
- const c = t.scene.getObjectByProperty("uuid", s.value);
2200
- c !== void 0 && t.three.setObject(c);
2201
- }, r = (s, c, f) => {
2214
+ const u = t.scene.getObjectByProperty("uuid", s.value);
2215
+ u !== void 0 && t.three.setObject(u);
2216
+ }, r = (s, u, h) => {
2202
2217
  const m = t.scene.getObjectByProperty("uuid", s);
2203
- m !== void 0 && Z(m, c, f);
2218
+ m !== void 0 && Z(m, u, h);
2204
2219
  }, e = (s) => {
2205
- const c = s.value, { key: f, value: m, uuid: p } = c;
2206
- r(p, f, m);
2220
+ const u = s.value, { key: h, value: m, uuid: g } = u;
2221
+ r(g, h, m);
2207
2222
  }, i = (s) => {
2208
- const c = s.value;
2209
- yt(c.value).then((f) => {
2210
- r(c.uuid, c.key, f), r(c.uuid, "material.needsUpdate", !0);
2223
+ const u = s.value;
2224
+ yt(u.value).then((h) => {
2225
+ r(u.uuid, u.key, h), r(u.uuid, "material.needsUpdate", !0);
2211
2226
  });
2212
2227
  }, l = () => {
2213
2228
  t.three.setScene(t.scene);
2214
- }, h = (s) => {
2215
- const { key: c, uuid: f, value: m } = s.value, p = t.scene.getObjectByProperty("uuid", f);
2216
- if (p !== void 0)
2229
+ }, c = (s) => {
2230
+ const { key: u, uuid: h, value: m } = s.value, g = t.scene.getObjectByProperty("uuid", h);
2231
+ if (g !== void 0)
2217
2232
  try {
2218
- p[c](m);
2233
+ g[u](m);
2219
2234
  } catch (E) {
2220
- console.log("Error requesting method:"), console.log(E), console.log(c), console.log(m);
2235
+ console.log("Error requesting method:"), console.log(E), console.log(u), console.log(m);
2221
2236
  }
2222
2237
  };
2223
- return qe(() => (I.addEventListener(N.GET_OBJECT, n), I.addEventListener(N.GET_SCENE, l), I.addEventListener(N.UPDATE_OBJECT, e), I.addEventListener(N.CREATE_TEXTURE, i), I.addEventListener(N.REQUEST_METHOD, h), () => {
2224
- I.removeEventListener(N.GET_OBJECT, n), I.removeEventListener(N.GET_SCENE, l), I.removeEventListener(N.UPDATE_OBJECT, e), I.removeEventListener(N.CREATE_TEXTURE, i), I.removeEventListener(N.REQUEST_METHOD, h);
2238
+ return qe(() => (I.addEventListener(N.GET_OBJECT, n), I.addEventListener(N.GET_SCENE, l), I.addEventListener(N.UPDATE_OBJECT, e), I.addEventListener(N.CREATE_TEXTURE, i), I.addEventListener(N.REQUEST_METHOD, c), () => {
2239
+ I.removeEventListener(N.GET_OBJECT, n), I.removeEventListener(N.GET_SCENE, l), I.removeEventListener(N.UPDATE_OBJECT, e), I.removeEventListener(N.CREATE_TEXTURE, i), I.removeEventListener(N.REQUEST_METHOD, c);
2225
2240
  }), []), null;
2226
2241
  }
2227
- const Ft = { type: "change" }, vt = { type: "start" }, Ut = { type: "end" }, ct = new fn(), Bt = new hn(), ta = Math.cos(70 * mn.DEG2RAD);
2228
- class na extends Gt {
2242
+ const Ut = { type: "change" }, vt = { type: "start" }, Bt = { type: "end" }, ct = new mn(), $t = new pn(), aa = Math.cos(70 * gn.DEG2RAD);
2243
+ class ra extends Yt {
2229
2244
  constructor(n, r) {
2230
2245
  super(), this.object = n, this.domElement = r, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new G(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 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: De.ROTATE, MIDDLE: De.DOLLY, RIGHT: De.PAN }, this.touches = { ONE: _e.ROTATE, TWO: _e.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
2231
2246
  return s.phi;
@@ -2240,33 +2255,33 @@ class na extends Gt {
2240
2255
  }, this.saveState = function() {
2241
2256
  e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
2242
2257
  }, this.reset = function() {
2243
- e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(Ft), e.update(), l = i.NONE;
2258
+ e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(Ut), e.update(), l = i.NONE;
2244
2259
  }, this.update = function() {
2245
2260
  const o = new G(), w = new Mt().setFromUnitVectors(n.up, new G(0, 1, 0)), F = w.clone().invert(), U = new G(), K = new Mt(), fe = new G(), ie = 2 * Math.PI;
2246
2261
  return function() {
2247
2262
  const ze = e.object.position;
2248
- o.copy(ze).sub(e.target), o.applyQuaternion(w), s.setFromVector3(o), e.autoRotate && l === i.NONE && M(Te()), e.enableDamping ? (s.theta += c.theta * e.dampingFactor, s.phi += c.phi * e.dampingFactor) : (s.theta += c.theta, s.phi += c.phi);
2263
+ o.copy(ze).sub(e.target), o.applyQuaternion(w), s.setFromVector3(o), e.autoRotate && l === i.NONE && M(Te()), e.enableDamping ? (s.theta += u.theta * e.dampingFactor, s.phi += u.phi * e.dampingFactor) : (s.theta += u.theta, s.phi += u.phi);
2249
2264
  let W = e.minAzimuthAngle, Q = e.maxAzimuthAngle;
2250
- isFinite(W) && isFinite(Q) && (W < -Math.PI ? W += ie : W > Math.PI && (W -= ie), Q < -Math.PI ? Q += ie : Q > Math.PI && (Q -= ie), W <= Q ? s.theta = Math.max(W, Math.min(Q, s.theta)) : s.theta = s.theta > (W + Q) / 2 ? Math.max(W, s.theta) : Math.min(Q, s.theta)), s.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, s.phi)), s.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(m, e.dampingFactor) : e.target.add(m), e.zoomToCursor && ee || e.object.isOrthographicCamera ? s.radius = Re(s.radius) : s.radius = Re(s.radius * f), o.setFromSpherical(s), o.applyQuaternion(F), ze.copy(e.target).add(o), e.object.lookAt(e.target), e.enableDamping === !0 ? (c.theta *= 1 - e.dampingFactor, c.phi *= 1 - e.dampingFactor, m.multiplyScalar(1 - e.dampingFactor)) : (c.set(0, 0, 0), m.set(0, 0, 0));
2265
+ isFinite(W) && isFinite(Q) && (W < -Math.PI ? W += ie : W > Math.PI && (W -= ie), Q < -Math.PI ? Q += ie : Q > Math.PI && (Q -= ie), W <= Q ? s.theta = Math.max(W, Math.min(Q, s.theta)) : s.theta = s.theta > (W + Q) / 2 ? Math.max(W, s.theta) : Math.min(Q, s.theta)), s.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, s.phi)), s.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(m, e.dampingFactor) : e.target.add(m), e.zoomToCursor && ee || e.object.isOrthographicCamera ? s.radius = Re(s.radius) : s.radius = Re(s.radius * h), o.setFromSpherical(s), o.applyQuaternion(F), ze.copy(e.target).add(o), e.object.lookAt(e.target), e.enableDamping === !0 ? (u.theta *= 1 - e.dampingFactor, u.phi *= 1 - e.dampingFactor, m.multiplyScalar(1 - e.dampingFactor)) : (u.set(0, 0, 0), m.set(0, 0, 0));
2251
2266
  let he = !1;
2252
2267
  if (e.zoomToCursor && ee) {
2253
2268
  let me = null;
2254
2269
  if (e.object.isPerspectiveCamera) {
2255
2270
  const Ee = o.length();
2256
- me = Re(Ee * f);
2271
+ me = Re(Ee * h);
2257
2272
  const we = Ee - me;
2258
2273
  e.object.position.addScaledVector(j, we), e.object.updateMatrixWorld();
2259
2274
  } else if (e.object.isOrthographicCamera) {
2260
2275
  const Ee = new G(z.x, z.y, 0);
2261
- Ee.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / f)), e.object.updateProjectionMatrix(), he = !0;
2276
+ Ee.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / h)), e.object.updateProjectionMatrix(), he = !0;
2262
2277
  const we = new G(z.x, z.y, 0);
2263
2278
  we.unproject(e.object), e.object.position.sub(we).add(Ee), e.object.updateMatrixWorld(), me = o.length();
2264
2279
  } else
2265
2280
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), e.zoomToCursor = !1;
2266
- me !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(me).add(e.object.position) : (ct.origin.copy(e.object.position), ct.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(ct.direction)) < ta ? n.lookAt(e.target) : (Bt.setFromNormalAndCoplanarPoint(e.object.up, e.target), ct.intersectPlane(Bt, e.target))));
2281
+ me !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(me).add(e.object.position) : (ct.origin.copy(e.object.position), ct.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(ct.direction)) < aa ? n.lookAt(e.target) : ($t.setFromNormalAndCoplanarPoint(e.object.up, e.target), ct.intersectPlane($t, e.target))));
2267
2282
  } else
2268
- e.object.isOrthographicCamera && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / f)), e.object.updateProjectionMatrix(), he = !0);
2269
- return f = 1, ee = !1, he || U.distanceToSquared(e.object.position) > h || 8 * (1 - K.dot(e.object.quaternion)) > h || fe.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(Ft), U.copy(e.object.position), K.copy(e.object.quaternion), fe.copy(e.target), he = !1, !0) : !1;
2283
+ e.object.isOrthographicCamera && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / h)), e.object.updateProjectionMatrix(), he = !0);
2284
+ return h = 1, ee = !1, he || U.distanceToSquared(e.object.position) > c || 8 * (1 - K.dot(e.object.quaternion)) > c || fe.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(Ut), U.copy(e.object.position), K.copy(e.object.quaternion), fe.copy(e.target), he = !1, !0) : !1;
2270
2285
  };
2271
2286
  }(), this.dispose = function() {
2272
2287
  e.domElement.removeEventListener("contextmenu", de), e.domElement.removeEventListener("pointerdown", $e), e.domElement.removeEventListener("pointercancel", be), e.domElement.removeEventListener("wheel", at), e.domElement.removeEventListener("pointermove", ue), e.domElement.removeEventListener("pointerup", be), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", Ye), e._domElementKeyEvents = null);
@@ -2282,11 +2297,11 @@ class na extends Gt {
2282
2297
  TOUCH_DOLLY_ROTATE: 6
2283
2298
  };
2284
2299
  let l = i.NONE;
2285
- const h = 1e-6, s = new kt(), c = new kt();
2286
- let f = 1;
2287
- const m = new G(), p = new ae(), E = new ae(), C = new ae(), O = new ae(), k = new ae(), y = new ae(), v = new ae(), b = new ae(), T = new ae(), j = new G(), z = new ae();
2300
+ const c = 1e-6, s = new kt(), u = new kt();
2301
+ let h = 1;
2302
+ const m = new G(), g = new ae(), E = new ae(), C = new ae(), R = new ae(), D = new ae(), y = new ae(), b = new ae(), v = new ae(), O = new ae(), j = new G(), z = new ae();
2288
2303
  let ee = !1;
2289
- const P = [], le = {};
2304
+ const T = [], le = {};
2290
2305
  function Te() {
2291
2306
  return 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
2292
2307
  }
@@ -2294,10 +2309,10 @@ class na extends Gt {
2294
2309
  return Math.pow(0.95, e.zoomSpeed);
2295
2310
  }
2296
2311
  function M(o) {
2297
- c.theta -= o;
2312
+ u.theta -= o;
2298
2313
  }
2299
2314
  function A(o) {
2300
- c.phi -= o;
2315
+ u.phi -= o;
2301
2316
  }
2302
2317
  const L = function() {
2303
2318
  const o = new G();
@@ -2323,10 +2338,10 @@ class na extends Gt {
2323
2338
  };
2324
2339
  }();
2325
2340
  function Pe(o) {
2326
- e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? f /= o : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2341
+ e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? h /= o : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2327
2342
  }
2328
2343
  function Ie(o) {
2329
- e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? f *= o : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2344
+ e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? h *= o : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
2330
2345
  }
2331
2346
  function Ne(o) {
2332
2347
  if (!e.zoomToCursor)
@@ -2339,24 +2354,24 @@ class na extends Gt {
2339
2354
  return Math.max(e.minDistance, Math.min(e.maxDistance, o));
2340
2355
  }
2341
2356
  function Le(o) {
2342
- p.set(o.clientX, o.clientY);
2357
+ g.set(o.clientX, o.clientY);
2343
2358
  }
2344
2359
  function Ze(o) {
2345
- Ne(o), v.set(o.clientX, o.clientY);
2360
+ Ne(o), b.set(o.clientX, o.clientY);
2346
2361
  }
2347
2362
  function Fe(o) {
2348
- O.set(o.clientX, o.clientY);
2363
+ R.set(o.clientX, o.clientY);
2349
2364
  }
2350
2365
  function Je(o) {
2351
- E.set(o.clientX, o.clientY), C.subVectors(E, p).multiplyScalar(e.rotateSpeed);
2366
+ E.set(o.clientX, o.clientY), C.subVectors(E, g).multiplyScalar(e.rotateSpeed);
2352
2367
  const w = e.domElement;
2353
- M(2 * Math.PI * C.x / w.clientHeight), A(2 * Math.PI * C.y / w.clientHeight), p.copy(E), e.update();
2368
+ M(2 * Math.PI * C.x / w.clientHeight), A(2 * Math.PI * C.y / w.clientHeight), g.copy(E), e.update();
2354
2369
  }
2355
2370
  function ft(o) {
2356
- b.set(o.clientX, o.clientY), T.subVectors(b, v), T.y > 0 ? Pe(oe()) : T.y < 0 && Ie(oe()), v.copy(b), e.update();
2371
+ v.set(o.clientX, o.clientY), O.subVectors(v, b), O.y > 0 ? Pe(oe()) : O.y < 0 && Ie(oe()), b.copy(v), e.update();
2357
2372
  }
2358
2373
  function ht(o) {
2359
- k.set(o.clientX, o.clientY), y.subVectors(k, O).multiplyScalar(e.panSpeed), te(y.x, y.y), O.copy(k), e.update();
2374
+ D.set(o.clientX, o.clientY), y.subVectors(D, R).multiplyScalar(e.panSpeed), te(y.x, y.y), R.copy(D), e.update();
2360
2375
  }
2361
2376
  function Ue(o) {
2362
2377
  Ne(o), o.deltaY < 0 ? Ie(oe()) : o.deltaY > 0 && Pe(oe()), e.update();
@@ -2380,24 +2395,24 @@ class na extends Gt {
2380
2395
  w && (o.preventDefault(), e.update());
2381
2396
  }
2382
2397
  function pe() {
2383
- if (P.length === 1)
2384
- p.set(P[0].pageX, P[0].pageY);
2398
+ if (T.length === 1)
2399
+ g.set(T[0].pageX, T[0].pageY);
2385
2400
  else {
2386
- const o = 0.5 * (P[0].pageX + P[1].pageX), w = 0.5 * (P[0].pageY + P[1].pageY);
2387
- p.set(o, w);
2401
+ const o = 0.5 * (T[0].pageX + T[1].pageX), w = 0.5 * (T[0].pageY + T[1].pageY);
2402
+ g.set(o, w);
2388
2403
  }
2389
2404
  }
2390
2405
  function je() {
2391
- if (P.length === 1)
2392
- O.set(P[0].pageX, P[0].pageY);
2406
+ if (T.length === 1)
2407
+ R.set(T[0].pageX, T[0].pageY);
2393
2408
  else {
2394
- const o = 0.5 * (P[0].pageX + P[1].pageX), w = 0.5 * (P[0].pageY + P[1].pageY);
2395
- O.set(o, w);
2409
+ const o = 0.5 * (T[0].pageX + T[1].pageX), w = 0.5 * (T[0].pageY + T[1].pageY);
2410
+ R.set(o, w);
2396
2411
  }
2397
2412
  }
2398
2413
  function ge() {
2399
- const o = P[0].pageX - P[1].pageX, w = P[0].pageY - P[1].pageY, F = Math.sqrt(o * o + w * w);
2400
- v.set(0, F);
2414
+ const o = T[0].pageX - T[1].pageX, w = T[0].pageY - T[1].pageY, F = Math.sqrt(o * o + w * w);
2415
+ b.set(0, F);
2401
2416
  }
2402
2417
  function mt() {
2403
2418
  e.enableZoom && ge(), e.enablePan && je();
@@ -2406,28 +2421,28 @@ class na extends Gt {
2406
2421
  e.enableZoom && ge(), e.enableRotate && pe();
2407
2422
  }
2408
2423
  function et(o) {
2409
- if (P.length == 1)
2424
+ if (T.length == 1)
2410
2425
  E.set(o.pageX, o.pageY);
2411
2426
  else {
2412
2427
  const F = ye(o), U = 0.5 * (o.pageX + F.x), K = 0.5 * (o.pageY + F.y);
2413
2428
  E.set(U, K);
2414
2429
  }
2415
- C.subVectors(E, p).multiplyScalar(e.rotateSpeed);
2430
+ C.subVectors(E, g).multiplyScalar(e.rotateSpeed);
2416
2431
  const w = e.domElement;
2417
- M(2 * Math.PI * C.x / w.clientHeight), A(2 * Math.PI * C.y / w.clientHeight), p.copy(E);
2432
+ M(2 * Math.PI * C.x / w.clientHeight), A(2 * Math.PI * C.y / w.clientHeight), g.copy(E);
2418
2433
  }
2419
2434
  function tt(o) {
2420
- if (P.length === 1)
2421
- k.set(o.pageX, o.pageY);
2435
+ if (T.length === 1)
2436
+ D.set(o.pageX, o.pageY);
2422
2437
  else {
2423
2438
  const w = ye(o), F = 0.5 * (o.pageX + w.x), U = 0.5 * (o.pageY + w.y);
2424
- k.set(F, U);
2439
+ D.set(F, U);
2425
2440
  }
2426
- y.subVectors(k, O).multiplyScalar(e.panSpeed), te(y.x, y.y), O.copy(k);
2441
+ y.subVectors(D, R).multiplyScalar(e.panSpeed), te(y.x, y.y), R.copy(D);
2427
2442
  }
2428
2443
  function ve(o) {
2429
2444
  const w = ye(o), F = o.pageX - w.x, U = o.pageY - w.y, K = Math.sqrt(F * F + U * U);
2430
- b.set(0, K), T.set(0, Math.pow(b.y / v.y, e.zoomSpeed)), Pe(T.y), v.copy(b);
2445
+ v.set(0, K), O.set(0, Math.pow(v.y / b.y, e.zoomSpeed)), Pe(O.y), b.copy(v);
2431
2446
  }
2432
2447
  function Me(o) {
2433
2448
  e.enableZoom && ve(o), e.enablePan && tt(o);
@@ -2436,13 +2451,13 @@ class na extends Gt {
2436
2451
  e.enableZoom && ve(o), e.enableRotate && et(o);
2437
2452
  }
2438
2453
  function $e(o) {
2439
- e.enabled !== !1 && (P.length === 0 && (e.domElement.setPointerCapture(o.pointerId), e.domElement.addEventListener("pointermove", ue), e.domElement.addEventListener("pointerup", be)), gt(o), o.pointerType === "touch" ? rt(o) : pt(o));
2454
+ e.enabled !== !1 && (T.length === 0 && (e.domElement.setPointerCapture(o.pointerId), e.domElement.addEventListener("pointermove", ue), e.domElement.addEventListener("pointerup", be)), gt(o), o.pointerType === "touch" ? rt(o) : pt(o));
2440
2455
  }
2441
2456
  function ue(o) {
2442
2457
  e.enabled !== !1 && (o.pointerType === "touch" ? it(o) : Ge(o));
2443
2458
  }
2444
2459
  function be(o) {
2445
- ot(o), P.length === 0 && (e.domElement.releasePointerCapture(o.pointerId), e.domElement.removeEventListener("pointermove", ue), e.domElement.removeEventListener("pointerup", be)), e.dispatchEvent(Ut), l = i.NONE;
2460
+ ot(o), T.length === 0 && (e.domElement.releasePointerCapture(o.pointerId), e.domElement.removeEventListener("pointermove", ue), e.domElement.removeEventListener("pointerup", be)), e.dispatchEvent(Bt), l = i.NONE;
2446
2461
  }
2447
2462
  function pt(o) {
2448
2463
  let w;
@@ -2512,13 +2527,13 @@ class na extends Gt {
2512
2527
  }
2513
2528
  }
2514
2529
  function at(o) {
2515
- e.enabled === !1 || e.enableZoom === !1 || l !== i.NONE || (o.preventDefault(), e.dispatchEvent(vt), Ue(o), e.dispatchEvent(Ut));
2530
+ e.enabled === !1 || e.enableZoom === !1 || l !== i.NONE || (o.preventDefault(), e.dispatchEvent(vt), Ue(o), e.dispatchEvent(Bt));
2516
2531
  }
2517
2532
  function Ye(o) {
2518
2533
  e.enabled === !1 || e.enablePan === !1 || Be(o);
2519
2534
  }
2520
2535
  function rt(o) {
2521
- switch (Ve(o), P.length) {
2536
+ switch (Ve(o), T.length) {
2522
2537
  case 1:
2523
2538
  switch (e.touches.ONE) {
2524
2539
  case _e.ROTATE:
@@ -2586,13 +2601,13 @@ class na extends Gt {
2586
2601
  e.enabled !== !1 && o.preventDefault();
2587
2602
  }
2588
2603
  function gt(o) {
2589
- P.push(o);
2604
+ T.push(o);
2590
2605
  }
2591
2606
  function ot(o) {
2592
2607
  delete le[o.pointerId];
2593
- for (let w = 0; w < P.length; w++)
2594
- if (P[w].pointerId == o.pointerId) {
2595
- P.splice(w, 1);
2608
+ for (let w = 0; w < T.length; w++)
2609
+ if (T[w].pointerId == o.pointerId) {
2610
+ T.splice(w, 1);
2596
2611
  return;
2597
2612
  }
2598
2613
  }
@@ -2601,7 +2616,7 @@ class na extends Gt {
2601
2616
  w === void 0 && (w = new ae(), le[o.pointerId] = w), w.set(o.pageX, o.pageY);
2602
2617
  }
2603
2618
  function ye(o) {
2604
- const w = o.pointerId === P[0].pointerId ? P[1] : P[0];
2619
+ const w = o.pointerId === T[0].pointerId ? T[1] : T[0];
2605
2620
  return le[w.pointerId];
2606
2621
  }
2607
2622
  e.domElement.addEventListener("contextmenu", de), e.domElement.addEventListener("pointerdown", $e), e.domElement.addEventListener("pointercancel", be), e.domElement.addEventListener("wheel", at, { passive: !1 }), this.update();
@@ -2610,20 +2625,20 @@ class na extends Gt {
2610
2625
  const xt = (t) => {
2611
2626
  const [n, r] = re(!1), [e, i] = re(t.options[t.index]), l = () => {
2612
2627
  r(!n);
2613
- }, h = (s) => {
2628
+ }, c = (s) => {
2614
2629
  s !== e && (t.onSelect(s), i(s)), r(!1);
2615
2630
  };
2616
- return /* @__PURE__ */ u.jsxs("div", { className: `dropdown ${t.up === !0 ? "up" : ""}`, children: [
2617
- /* @__PURE__ */ u.jsx("div", { className: "dropdown-toggle", onClick: l, children: e }),
2618
- n && /* @__PURE__ */ u.jsx("ul", { className: "dropdown-menu", children: t.options.map((s) => /* @__PURE__ */ u.jsx("li", { onClick: () => h(s), children: s }, s)) })
2631
+ return /* @__PURE__ */ d.jsxs("div", { className: `dropdown ${t.up === !0 ? "up" : ""}`, children: [
2632
+ /* @__PURE__ */ d.jsx("div", { className: "dropdown-toggle", onClick: l, children: e }),
2633
+ n && /* @__PURE__ */ d.jsx("ul", { className: "dropdown-menu", children: t.options.map((s) => /* @__PURE__ */ d.jsx("li", { onClick: () => c(s), children: s }, s)) })
2619
2634
  ] });
2620
- }, Ce = Rn(function(n, r) {
2635
+ }, Ce = Mn(function(n, r) {
2621
2636
  const e = n.options.indexOf(n.camera.name);
2622
- return /* @__PURE__ */ u.jsxs("div", { className: "CameraWindow", children: [
2623
- /* @__PURE__ */ u.jsx("div", { ref: r, className: "clickable" }),
2624
- /* @__PURE__ */ u.jsx(xt, { index: e, options: n.options, onSelect: n.onSelect, up: !0 })
2637
+ return /* @__PURE__ */ d.jsxs("div", { className: "CameraWindow", children: [
2638
+ /* @__PURE__ */ d.jsx("div", { ref: r, className: "clickable" }),
2639
+ /* @__PURE__ */ d.jsx(xt, { index: e, options: n.options, onSelect: n.onSelect, up: !0 })
2625
2640
  ] });
2626
- }), aa = `out vec3 worldPosition;
2641
+ }), ia = `out vec3 worldPosition;
2627
2642
  uniform float uDistance;
2628
2643
 
2629
2644
  void main() {
@@ -2632,7 +2647,7 @@ void main() {
2632
2647
  worldPosition.xz += cameraPosition.xz;
2633
2648
 
2634
2649
  gl_Position = projectionMatrix * modelViewMatrix * vec4(worldPosition, 1.0);
2635
- }`, ra = `out vec4 fragColor;
2650
+ }`, oa = `out vec4 fragColor;
2636
2651
  in vec3 worldPosition;
2637
2652
 
2638
2653
  uniform float uDivisions;
@@ -2700,14 +2715,14 @@ void main() {
2700
2715
 
2701
2716
  if (fragColor.a <= 0.0) discard;
2702
2717
  }`;
2703
- class ia extends pn {
2718
+ class sa extends vn {
2704
2719
  constructor(n) {
2705
2720
  super({
2706
2721
  extensions: {
2707
2722
  derivatives: !0
2708
2723
  },
2709
- glslVersion: gn,
2710
- side: vn,
2724
+ glslVersion: bn,
2725
+ side: yn,
2711
2726
  transparent: !0,
2712
2727
  uniforms: {
2713
2728
  uScale: {
@@ -2729,17 +2744,17 @@ class ia extends pn {
2729
2744
  value: (n == null ? void 0 : n.gridOpacity) !== void 0 ? n == null ? void 0 : n.gridOpacity : 0.25
2730
2745
  }
2731
2746
  },
2732
- vertexShader: aa,
2733
- fragmentShader: ra,
2747
+ vertexShader: ia,
2748
+ fragmentShader: oa,
2734
2749
  name: "InfiniteGrid",
2735
2750
  depthWrite: !1
2736
2751
  });
2737
2752
  }
2738
2753
  }
2739
- class oa extends Yt {
2754
+ class ca extends Vt {
2740
2755
  constructor() {
2741
- const r = new ia();
2742
- super(new bn(2, 2), r);
2756
+ const r = new sa();
2757
+ super(new En(2, 2), r);
2743
2758
  $(this, "gridMaterial");
2744
2759
  this.gridMaterial = r, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
2745
2760
  }
@@ -2747,7 +2762,7 @@ class oa extends Yt {
2747
2762
  this.gridMaterial.needsUpdate = !0;
2748
2763
  }
2749
2764
  }
2750
- const $t = [
2765
+ const Gt = [
2751
2766
  "Single",
2752
2767
  "Side by Side",
2753
2768
  "Stacked",
@@ -2770,24 +2785,24 @@ dt.position.set(500, 500, 500);
2770
2785
  dt.lookAt(0, 0, 0);
2771
2786
  q.set("Debug", dt);
2772
2787
  let bt = "Default";
2773
- const sa = [
2788
+ const la = [
2774
2789
  "Default",
2775
2790
  "Normals",
2776
2791
  "Wireframe"
2777
- ], ca = new yn(), la = new En({
2792
+ ], ua = new wn(), da = new xn({
2778
2793
  opacity: 0.33,
2779
2794
  transparent: !0,
2780
2795
  wireframe: !0
2781
- }), V = new wn();
2782
- function Oa(t) {
2783
- const [n, r] = re(t.mode !== void 0 ? t.mode : "Quad"), e = Se(null), i = Se(null), l = Se(null), h = Se(null);
2784
- let s = q.get("Debug"), c = q.get("Orthographic"), f = q.get("Front"), m = q.get("Top");
2785
- const p = (y, v) => {
2786
- const b = H.get(y.name);
2787
- b !== void 0 && b.dispose(), H.delete(y.name);
2788
- const T = ce.get(y.name);
2789
- T !== void 0 && (V.remove(T), T.dispose()), ce.delete(y.name);
2790
- const j = new na(y, v);
2796
+ }), V = new Cn();
2797
+ function ja(t) {
2798
+ const [n, r] = re(t.mode !== void 0 ? t.mode : "Quad"), e = Se(null), i = Se(null), l = Se(null), c = Se(null);
2799
+ let s = q.get("Debug"), u = q.get("Orthographic"), h = q.get("Front"), m = q.get("Top");
2800
+ const g = (y, b) => {
2801
+ const v = H.get(y.name);
2802
+ v !== void 0 && v.dispose(), H.delete(y.name);
2803
+ const O = ce.get(y.name);
2804
+ O !== void 0 && (V.remove(O), O.dispose()), ce.delete(y.name);
2805
+ const j = new ra(y, b);
2791
2806
  switch (y.name) {
2792
2807
  case "Top":
2793
2808
  case "Bottom":
@@ -2799,79 +2814,79 @@ function Oa(t) {
2799
2814
  break;
2800
2815
  }
2801
2816
  if (H.set(y.name, j), y instanceof lt) {
2802
- const z = new Cn(y);
2817
+ const z = new On(y);
2803
2818
  ce.set(y.name, z), V.add(z);
2804
2819
  }
2805
2820
  }, E = (y) => {
2806
- const v = ce.get(y.name);
2807
- v !== void 0 && (V.remove(v), v.dispose(), ce.delete(y.name));
2808
- const b = H.get(y.name);
2809
- b !== void 0 && (b.dispose(), H.delete(y.name));
2821
+ const b = ce.get(y.name);
2822
+ b !== void 0 && (V.remove(b), b.dispose(), ce.delete(y.name));
2823
+ const v = H.get(y.name);
2824
+ v !== void 0 && (v.dispose(), H.delete(y.name));
2810
2825
  }, C = () => {
2811
- H.forEach((y, v) => {
2826
+ H.forEach((y, b) => {
2812
2827
  y.dispose();
2813
- const b = ce.get(v);
2814
- b !== void 0 && (V.remove(b), b.dispose()), ce.delete(v), H.delete(v);
2828
+ const v = ce.get(b);
2829
+ v !== void 0 && (V.remove(v), v.dispose()), ce.delete(b), H.delete(b);
2815
2830
  }), H.clear(), ce.clear();
2816
- }, O = () => {
2831
+ }, R = () => {
2817
2832
  switch (n) {
2818
2833
  case "Single":
2819
- p(s, e.current);
2834
+ g(s, e.current);
2820
2835
  break;
2821
2836
  case "Side by Side":
2822
2837
  case "Stacked":
2823
- p(s, e.current), p(c, i.current);
2838
+ g(s, e.current), g(u, i.current);
2824
2839
  break;
2825
2840
  case "Quad":
2826
- p(s, e.current), p(c, i.current), p(f, l.current), p(m, h.current);
2841
+ g(s, e.current), g(u, i.current), g(h, l.current), g(m, c.current);
2827
2842
  break;
2828
2843
  }
2829
2844
  };
2830
2845
  qe(() => {
2831
2846
  V.name = "Debug Scene", V.add(t.scene);
2832
- const y = new oa();
2847
+ const y = new ca();
2833
2848
  V.add(y);
2834
- const v = new xn(500);
2835
- v.name = "axisHelper", V.add(v);
2849
+ const b = new Sn(500);
2850
+ b.name = "axisHelper", V.add(b);
2836
2851
  }, []), qe(() => {
2837
2852
  const y = t.renderer.getSize(new ae());
2838
- let v = y.x, b = y.y, T = Math.floor(v / 2), j = Math.floor(b / 2), z = -1;
2853
+ let b = y.x, v = y.y, O = Math.floor(b / 2), j = Math.floor(v / 2), z = -1;
2839
2854
  const ee = () => {
2840
- v = window.innerWidth - 300, b = window.innerHeight, T = Math.floor(v / 2), j = Math.floor(b / 2);
2841
- let M = v, A = b;
2855
+ b = window.innerWidth - 300, v = window.innerHeight, O = Math.floor(b / 2), j = Math.floor(v / 2);
2856
+ let M = b, A = v;
2842
2857
  switch (n) {
2843
2858
  case "Side by Side":
2844
- M = T, A = b;
2859
+ M = O, A = v;
2845
2860
  break;
2846
2861
  case "Stacked":
2847
- M = v, A = j;
2862
+ M = b, A = j;
2848
2863
  break;
2849
2864
  case "Quad":
2850
- M = T, A = j;
2865
+ M = O, A = j;
2851
2866
  break;
2852
2867
  }
2853
2868
  q.forEach((L) => {
2854
2869
  var J;
2855
2870
  L instanceof Ct ? (L.left = M / -2, L.right = M / 2, L.top = A / 2, L.bottom = A / -2, L.updateProjectionMatrix()) : L instanceof lt && (L.aspect = M / A, L.updateProjectionMatrix(), (J = ce.get(L.name)) == null || J.update());
2856
2871
  });
2857
- }, P = () => {
2858
- t.renderer.setViewport(0, 0, v, b), t.renderer.setScissor(0, 0, v, b), t.renderer.render(V, s);
2872
+ }, T = () => {
2873
+ t.renderer.setViewport(0, 0, b, v), t.renderer.setScissor(0, 0, b, v), t.renderer.render(V, s);
2859
2874
  }, le = () => {
2860
2875
  if (n === "Side by Side")
2861
- t.renderer.setViewport(0, 0, T, b), t.renderer.setScissor(0, 0, T, b), t.renderer.render(V, s), t.renderer.setViewport(T, 0, T, b), t.renderer.setScissor(T, 0, T, b), t.renderer.render(V, c);
2876
+ t.renderer.setViewport(0, 0, O, v), t.renderer.setScissor(0, 0, O, v), t.renderer.render(V, s), t.renderer.setViewport(O, 0, O, v), t.renderer.setScissor(O, 0, O, v), t.renderer.render(V, u);
2862
2877
  else {
2863
- const M = b - j;
2864
- t.renderer.setViewport(0, M, v, j), t.renderer.setScissor(0, M, v, j), t.renderer.render(V, s), t.renderer.setViewport(0, 0, v, j), t.renderer.setScissor(0, 0, v, j), t.renderer.render(V, c);
2878
+ const M = v - j;
2879
+ t.renderer.setViewport(0, M, b, j), t.renderer.setScissor(0, M, b, j), t.renderer.render(V, s), t.renderer.setViewport(0, 0, b, j), t.renderer.setScissor(0, 0, b, j), t.renderer.render(V, u);
2865
2880
  }
2866
2881
  }, Te = () => {
2867
2882
  let M = 0, A = 0;
2868
- A = b - j, M = 0, t.renderer.setViewport(M, A, T, j), t.renderer.setScissor(M, A, T, j), t.renderer.render(V, s), M = T, t.renderer.setViewport(M, A, T, j), t.renderer.setScissor(M, A, T, j), t.renderer.render(V, c), A = 0, M = 0, t.renderer.setViewport(M, A, T, j), t.renderer.setScissor(M, A, T, j), t.renderer.render(V, f), M = T, t.renderer.setViewport(M, A, T, j), t.renderer.setScissor(M, A, T, j), t.renderer.render(V, m);
2883
+ A = v - j, M = 0, t.renderer.setViewport(M, A, O, j), t.renderer.setScissor(M, A, O, j), t.renderer.render(V, s), M = O, t.renderer.setViewport(M, A, O, j), t.renderer.setScissor(M, A, O, j), t.renderer.render(V, u), A = 0, M = 0, t.renderer.setViewport(M, A, O, j), t.renderer.setScissor(M, A, O, j), t.renderer.render(V, h), M = O, t.renderer.setViewport(M, A, O, j), t.renderer.setScissor(M, A, O, j), t.renderer.render(V, m);
2869
2884
  }, oe = () => {
2870
2885
  switch (H.forEach((M) => {
2871
2886
  M.update();
2872
2887
  }), t.scene.update(), t.renderer.clear(), n) {
2873
2888
  case "Single":
2874
- P();
2889
+ T();
2875
2890
  break;
2876
2891
  case "Side by Side":
2877
2892
  case "Stacked":
@@ -2883,11 +2898,11 @@ function Oa(t) {
2883
2898
  }
2884
2899
  z = requestAnimationFrame(oe);
2885
2900
  };
2886
- return O(), window.addEventListener("resize", ee), ee(), oe(), () => {
2901
+ return R(), window.addEventListener("resize", ee), ee(), oe(), () => {
2887
2902
  window.removeEventListener("resize", ee), cancelAnimationFrame(z), z = -1;
2888
2903
  };
2889
2904
  }, [n]);
2890
- const k = [
2905
+ const D = [
2891
2906
  "Top",
2892
2907
  "Bottom",
2893
2908
  "Left",
@@ -2898,72 +2913,72 @@ function Oa(t) {
2898
2913
  "Debug"
2899
2914
  ];
2900
2915
  return t.cameras.forEach((y) => {
2901
- q.set(y.name, y), k.push(y.name);
2902
- }), /* @__PURE__ */ u.jsxs("div", { className: "multiview", children: [
2903
- /* @__PURE__ */ u.jsxs("div", { className: `cameras ${n === "Single" || n === "Stacked" ? "single" : ""}`, children: [
2904
- n === "Single" && /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsx(Ce, { camera: s, options: k, ref: e, onSelect: (y) => {
2905
- var b;
2906
- (b = H.get(s.name)) == null || b.dispose();
2907
- const v = q.get(y);
2908
- v !== void 0 && (E(s), s = v, p(v, e.current));
2916
+ q.set(y.name, y), D.push(y.name);
2917
+ }), /* @__PURE__ */ d.jsxs("div", { className: "multiview", children: [
2918
+ /* @__PURE__ */ d.jsxs("div", { className: `cameras ${n === "Single" || n === "Stacked" ? "single" : ""}`, children: [
2919
+ n === "Single" && /* @__PURE__ */ d.jsx(d.Fragment, { children: /* @__PURE__ */ d.jsx(Ce, { camera: s, options: D, ref: e, onSelect: (y) => {
2920
+ var v;
2921
+ (v = H.get(s.name)) == null || v.dispose();
2922
+ const b = q.get(y);
2923
+ b !== void 0 && (E(s), s = b, g(b, e.current));
2909
2924
  } }) }),
2910
- (n === "Side by Side" || n === "Stacked") && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
2911
- /* @__PURE__ */ u.jsx(Ce, { camera: s, options: k, ref: e, onSelect: (y) => {
2912
- var b;
2913
- (b = H.get(s.name)) == null || b.dispose();
2914
- const v = q.get(y);
2915
- v !== void 0 && (E(s), s = v, p(v, e.current));
2925
+ (n === "Side by Side" || n === "Stacked") && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
2926
+ /* @__PURE__ */ d.jsx(Ce, { camera: s, options: D, ref: e, onSelect: (y) => {
2927
+ var v;
2928
+ (v = H.get(s.name)) == null || v.dispose();
2929
+ const b = q.get(y);
2930
+ b !== void 0 && (E(s), s = b, g(b, e.current));
2916
2931
  } }),
2917
- /* @__PURE__ */ u.jsx(Ce, { camera: c, options: k, ref: i, onSelect: (y) => {
2918
- var b;
2919
- (b = H.get(c.name)) == null || b.dispose();
2920
- const v = q.get(y);
2921
- v !== void 0 && (E(c), c = v, p(v, i.current));
2932
+ /* @__PURE__ */ d.jsx(Ce, { camera: u, options: D, ref: i, onSelect: (y) => {
2933
+ var v;
2934
+ (v = H.get(u.name)) == null || v.dispose();
2935
+ const b = q.get(y);
2936
+ b !== void 0 && (E(u), u = b, g(b, i.current));
2922
2937
  } })
2923
2938
  ] }),
2924
- n === "Quad" && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
2925
- /* @__PURE__ */ u.jsx(Ce, { camera: s, options: k, ref: e, onSelect: (y) => {
2926
- var b;
2927
- (b = H.get(s.name)) == null || b.dispose();
2928
- const v = q.get(y);
2929
- v !== void 0 && (E(s), s = v, p(v, e.current));
2939
+ n === "Quad" && /* @__PURE__ */ d.jsxs(d.Fragment, { children: [
2940
+ /* @__PURE__ */ d.jsx(Ce, { camera: s, options: D, ref: e, onSelect: (y) => {
2941
+ var v;
2942
+ (v = H.get(s.name)) == null || v.dispose();
2943
+ const b = q.get(y);
2944
+ b !== void 0 && (E(s), s = b, g(b, e.current));
2930
2945
  } }),
2931
- /* @__PURE__ */ u.jsx(Ce, { camera: c, options: k, ref: i, onSelect: (y) => {
2932
- var b;
2933
- (b = H.get(c.name)) == null || b.dispose();
2934
- const v = q.get(y);
2935
- v !== void 0 && (E(c), c = v, p(v, i.current));
2946
+ /* @__PURE__ */ d.jsx(Ce, { camera: u, options: D, ref: i, onSelect: (y) => {
2947
+ var v;
2948
+ (v = H.get(u.name)) == null || v.dispose();
2949
+ const b = q.get(y);
2950
+ b !== void 0 && (E(u), u = b, g(b, i.current));
2936
2951
  } }),
2937
- /* @__PURE__ */ u.jsx(Ce, { camera: f, options: k, ref: l, onSelect: (y) => {
2938
- var b;
2939
- (b = H.get(f.name)) == null || b.dispose();
2940
- const v = q.get(y);
2941
- v !== void 0 && (E(f), f = v, p(v, l.current));
2952
+ /* @__PURE__ */ d.jsx(Ce, { camera: h, options: D, ref: l, onSelect: (y) => {
2953
+ var v;
2954
+ (v = H.get(h.name)) == null || v.dispose();
2955
+ const b = q.get(y);
2956
+ b !== void 0 && (E(h), h = b, g(b, l.current));
2942
2957
  } }),
2943
- /* @__PURE__ */ u.jsx(Ce, { camera: m, options: k, ref: h, onSelect: (y) => {
2944
- var b;
2945
- (b = H.get(m.name)) == null || b.dispose();
2946
- const v = q.get(y);
2947
- v !== void 0 && (E(m), m = v, p(v, h.current));
2958
+ /* @__PURE__ */ d.jsx(Ce, { camera: m, options: D, ref: c, onSelect: (y) => {
2959
+ var v;
2960
+ (v = H.get(m.name)) == null || v.dispose();
2961
+ const b = q.get(y);
2962
+ b !== void 0 && (E(m), m = b, g(b, c.current));
2948
2963
  } })
2949
2964
  ] })
2950
2965
  ] }),
2951
- /* @__PURE__ */ u.jsxs("div", { className: "settings", children: [
2952
- /* @__PURE__ */ u.jsx(
2966
+ /* @__PURE__ */ d.jsxs("div", { className: "settings", children: [
2967
+ /* @__PURE__ */ d.jsx(
2953
2968
  xt,
2954
2969
  {
2955
- index: $t.indexOf(n),
2956
- options: $t,
2970
+ index: Gt.indexOf(n),
2971
+ options: Gt,
2957
2972
  onSelect: (y) => {
2958
2973
  y !== n && (C(), r(y));
2959
2974
  }
2960
2975
  }
2961
2976
  ),
2962
- /* @__PURE__ */ u.jsx(
2977
+ /* @__PURE__ */ d.jsx(
2963
2978
  xt,
2964
2979
  {
2965
2980
  index: 0,
2966
- options: sa,
2981
+ options: la,
2967
2982
  onSelect: (y) => {
2968
2983
  if (y !== bt)
2969
2984
  switch (bt = y, bt) {
@@ -2971,10 +2986,10 @@ function Oa(t) {
2971
2986
  V.overrideMaterial = null;
2972
2987
  break;
2973
2988
  case "Normals":
2974
- V.overrideMaterial = ca;
2989
+ V.overrideMaterial = ua;
2975
2990
  break;
2976
2991
  case "Wireframe":
2977
- V.overrideMaterial = la;
2992
+ V.overrideMaterial = da;
2978
2993
  break;
2979
2994
  }
2980
2995
  }
@@ -2983,35 +2998,41 @@ function Oa(t) {
2983
2998
  ] })
2984
2999
  ] });
2985
3000
  }
2986
- function Ta(t) {
2987
- return /* @__PURE__ */ u.jsxs("div", { className: "editor", ref: t.ref, style: t.style, children: [
2988
- /* @__PURE__ */ u.jsx("header", { children: t.header }),
3001
+ function Ma(t) {
3002
+ return /* @__PURE__ */ d.jsxs("div", { className: "editor", ref: t.ref, style: t.style, children: [
3003
+ /* @__PURE__ */ d.jsx("header", { children: t.header }),
2989
3004
  t.children,
2990
- /* @__PURE__ */ u.jsx("footer", { children: t.footer })
3005
+ /* @__PURE__ */ d.jsx("footer", { children: t.footer })
2991
3006
  ] });
2992
3007
  }
2993
3008
  export {
2994
3009
  wt as Accordion,
2995
- va as Application,
3010
+ wa as Application,
2996
3011
  ut as BaseRemote,
2997
- qt as ChildObject,
2998
- Vn as ContainerObject,
2999
- $n as Draggable,
3000
- Bn as DraggableItem,
3001
- Gn as Dropdown,
3002
- Yn as DropdownItem,
3003
- Ta as Editor,
3004
- oa as InfiniteGridHelper,
3005
- ea as Inspector,
3006
- Oa as MultiView,
3007
- Xt as NavButton,
3008
- ba as RemoteComponents,
3009
- xa as RemoteController,
3010
- ya as RemoteTheatre,
3011
- Ea as RemoteThree,
3012
- wa as RemoteTweakpane,
3013
- Ca as SceneHierarchy,
3014
- Sa as SceneInspector,
3012
+ Jt as ChildObject,
3013
+ Wn as ContainerObject,
3014
+ Yn as Draggable,
3015
+ Gn as DraggableItem,
3016
+ Vn as Dropdown,
3017
+ zn as DropdownItem,
3018
+ Ma as Editor,
3019
+ ca as InfiniteGridHelper,
3020
+ na as Inspector,
3021
+ ja as MultiView,
3022
+ Zt as NavButton,
3023
+ xa as RemoteComponents,
3024
+ Ta as RemoteController,
3025
+ Ca as RemoteTheatre,
3026
+ Sa as RemoteThree,
3027
+ Oa as RemoteTweakpane,
3028
+ Pa as SceneHierarchy,
3029
+ Ra as SceneInspector,
3015
3030
  N as ToolEvents,
3016
- I as debugDispatcher
3031
+ ya as clamp,
3032
+ _n as colorToHex,
3033
+ I as debugDispatcher,
3034
+ Ea as distance,
3035
+ Kt as hierarchyUUID,
3036
+ Dn as isColor,
3037
+ kn as randomID
3017
3038
  };