@tomorrowevening/hermes 0.0.27 → 0.0.29

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