@tomorrowevening/hermes 0.0.12 → 0.0.14

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