softbox 4.1.0 → 4.1.1

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.
@@ -1516,7 +1516,7 @@ class Wt {
1516
1516
  return new Wt(new T.Vector3(e, t, n));
1517
1517
  }
1518
1518
  }
1519
- const Oo = 0, Nc = 1, kc = 2, Cr = 2, ni = 1.25, Pr = 1, Ye = 32, Oe = Ye / 4, nr = 65535, Dd = nr << 16, Fs = Math.pow(2, -24), sr = Symbol("SKIP_GENERATION"), Do = {
1519
+ const Oo = 0, Nc = 1, kc = 2, Cr = 2, ni = 1.25, Pr = 1, Ye = 32, Oe = Ye / 4, nr = 65535, Nd = nr << 16, Fs = Math.pow(2, -24), sr = Symbol("SKIP_GENERATION"), Do = {
1520
1520
  strategy: Oo,
1521
1521
  maxDepth: 40,
1522
1522
  maxLeafSize: 10,
@@ -1578,7 +1578,7 @@ function ze(i, e) {
1578
1578
  function ir(i, e) {
1579
1579
  return e[i + 7];
1580
1580
  }
1581
- function Nd(i) {
1581
+ function kd(i) {
1582
1582
  return i;
1583
1583
  }
1584
1584
  function si(i, e, t, n, s) {
@@ -7691,7 +7691,7 @@ class Kh {
7691
7691
  this.events = new tr(), this.disposed = !1;
7692
7692
  }
7693
7693
  async initialize(e) {
7694
- const { ThreePathTracingService: t } = await import("./ThreePathTracingService-DTwEWxOo.js");
7694
+ const { ThreePathTracingService: t } = await import("./ThreePathTracingService-Cjc6pt4n.js");
7695
7695
  if (this.disposed)
7696
7696
  return B.ok(void 0);
7697
7697
  const n = new t();
@@ -9769,7 +9769,10 @@ class Tu {
9769
9769
  attach(e) {
9770
9770
  this.detach();
9771
9771
  const t = en(e);
9772
- t && (this.clips = t.animations ?? [], this.clips.length > 0 && (this.mixer = new T.AnimationMixer(t), this.mixer.timeScale = this.speed));
9772
+ if (!t)
9773
+ return;
9774
+ const n = _u(t);
9775
+ n && (this.clips = n.animations, this.mixer = new T.AnimationMixer(n), this.mixer.timeScale = this.speed);
9773
9776
  }
9774
9777
  getClipNames() {
9775
9778
  return this.clips.map((e) => e.name);
@@ -9806,8 +9809,15 @@ class Tu {
9806
9809
  this.mixer && (this.mixer.stopAllAction(), this.mixer.uncacheRoot(this.mixer.getRoot())), this.mixer = null, this.clips = [], this.activeActions = [], this.playing = !1;
9807
9810
  }
9808
9811
  }
9812
+ function _u(i) {
9813
+ let e = null;
9814
+ return i.traverse((t) => {
9815
+ var n;
9816
+ !e && (((n = t.animations) == null ? void 0 : n.length) ?? 0) > 0 && (e = t);
9817
+ }), e;
9818
+ }
9809
9819
  var Ws = /* @__PURE__ */ ((i) => (i.MapControls = "MapControls", i.OrbitControls = "OrbitControls", i))(Ws || {});
9810
- class _u {
9820
+ class Su {
9811
9821
  static convertRendererOptions(e) {
9812
9822
  const t = {
9813
9823
  antialias: e.antialias,
@@ -9845,7 +9855,7 @@ class _u {
9845
9855
  return typeof e == "string" ? e : "aces";
9846
9856
  }
9847
9857
  }
9848
- class Su {
9858
+ class bu {
9849
9859
  /**
9850
9860
  * Create a ViewerCore instance with Three.js implementations
9851
9861
  */
@@ -9855,14 +9865,14 @@ class Su {
9855
9865
  r.getThreeCamera(),
9856
9866
  e,
9857
9867
  t
9858
- ), a = new bu().createDefaultLoader({
9868
+ ), a = new xu().createDefaultLoader({
9859
9869
  renderer: n.getThreeRenderer() ?? void 0,
9860
9870
  bvh: (E = t.selection) == null ? void 0 : E.bvh,
9861
9871
  ...t.loaders
9862
9872
  }), c = new Wh(), d = new fu();
9863
9873
  let u;
9864
9874
  (((b = t.pathTracing) == null ? void 0 : b.enabled) ?? !1) && (u = new Kh());
9865
- const f = new mu(), p = new gu(), w = new Eu(), _ = new Tu(), y = _u.convertRendererOptions(
9875
+ const f = new mu(), p = new gu(), w = new Eu(), _ = new Tu(), y = Su.convertRendererOptions(
9866
9876
  t.renderer || {}
9867
9877
  );
9868
9878
  (t.replaceWithScreenshotOnComplete || (x = t.pathTracing) != null && x.enabled) && (y.preserveDrawingBuffer = !0);
@@ -9921,12 +9931,12 @@ class Su {
9921
9931
  return d && o.target && (o.target.set(d[0], d[1], d[2]), o.update()), o;
9922
9932
  }
9923
9933
  }
9924
- class bu extends so {
9934
+ class xu extends so {
9925
9935
  createDefaultLoader(e = {}) {
9926
9936
  return so.createLoader("model.glb", e);
9927
9937
  }
9928
9938
  }
9929
- const xu = ["toneMappingExposure"], Au = ["environmentIntensity"], vu = ["autoRotate", "autoRotateSpeed"];
9939
+ const Au = ["toneMappingExposure"], vu = ["environmentIntensity"], Ru = ["autoRotate", "autoRotateSpeed"];
9930
9940
  function Jo(i) {
9931
9941
  var t, n, s, r, o, a, c, d, u, h;
9932
9942
  const e = {
@@ -10109,11 +10119,11 @@ const Zi = {
10109
10119
  environment: { environmentIntensity: 0.85 }
10110
10120
  }
10111
10121
  };
10112
- function Ru(i) {
10122
+ function Mu(i) {
10113
10123
  return i ? ea[i] : {};
10114
10124
  }
10115
10125
  function Wi(i, e) {
10116
- return Gs(Gs(i, Ru(e.preset)), e);
10126
+ return Gs(Gs(i, Mu(e.preset)), e);
10117
10127
  }
10118
10128
  const Ti = (i, ...e) => {
10119
10129
  if (!i)
@@ -10123,7 +10133,7 @@ const Ti = (i, ...e) => {
10123
10133
  delete t[n];
10124
10134
  return Object.keys(t).length > 0 ? t : void 0;
10125
10135
  };
10126
- function Mu(i) {
10136
+ function Iu(i) {
10127
10137
  const e = Zt(
10128
10138
  () => {
10129
10139
  var s;
@@ -10133,12 +10143,12 @@ function Mu(i) {
10133
10143
  // renderer/environment minus their runtime-tunable fields: a direct
10134
10144
  // toneMappingExposure / environmentIntensity change is exactly what
10135
10145
  // the live updateOptions path exists for and must not rebuild.
10136
- renderer: Ti(i.renderer, ...xu),
10146
+ renderer: Ti(i.renderer, ...Au),
10137
10147
  camera: i.camera,
10138
10148
  // The turntable fields toggle live (updateOptions), like the look
10139
10149
  // fields — flipping auto-rotate must not reload the model.
10140
- controls: Ti(i.controls, ...vu),
10141
- environment: Ti(i.environment, ...Au),
10150
+ controls: Ti(i.controls, ...Ru),
10151
+ environment: Ti(i.environment, ...vu),
10142
10152
  lighting: i.lighting,
10143
10153
  helpers: i.helpers,
10144
10154
  rendering: i.rendering,
@@ -10170,12 +10180,12 @@ function Mu(i) {
10170
10180
  }, [i.preset, i.backgroundColor, i.renderer, i.environment, i.controls, i.animations]);
10171
10181
  return { options: Zt(() => i, [e, t]), structuralKey: e, runtimeKey: t };
10172
10182
  }
10173
- function Iu(i, e) {
10174
- const t = $e(null), [n, s] = Xs(!1), { options: r, structuralKey: o, runtimeKey: a } = Mu(e);
10183
+ function Cu(i, e) {
10184
+ const t = $e(null), [n, s] = Xs(!1), { options: r, structuralKey: o, runtimeKey: a } = Iu(e);
10175
10185
  Et(() => {
10176
10186
  if (!i.current || t.current)
10177
10187
  return;
10178
- const d = Wi(Zi, r), u = Su.createViewer(i.current, d);
10188
+ const d = Wi(Zi, r), u = bu.createViewer(i.current, d);
10179
10189
  t.current = u;
10180
10190
  let h = !1;
10181
10191
  return u.initialize().then((f) => {
@@ -10221,7 +10231,7 @@ function Iu(i, e) {
10221
10231
  isInitialized: n
10222
10232
  };
10223
10233
  }
10224
- function Cu(i, e) {
10234
+ function Pu(i, e) {
10225
10235
  const t = $e(e);
10226
10236
  t.current = e, Et(() => {
10227
10237
  if (!i)
@@ -10240,7 +10250,7 @@ function Cu(i, e) {
10240
10250
  };
10241
10251
  }, [i]);
10242
10252
  }
10243
- function Pu(i, e) {
10253
+ function Lu(i, e) {
10244
10254
  const [t, n] = Xs(null), s = $e(/* @__PURE__ */ new Set());
10245
10255
  Et(() => {
10246
10256
  if (i !== void 0 && s.current.has(i)) {
@@ -10265,7 +10275,7 @@ function Pu(i, e) {
10265
10275
  selectPreset: a
10266
10276
  };
10267
10277
  }
10268
- function Lu(i, e, t, n, s) {
10278
+ function Ou(i, e, t, n, s) {
10269
10279
  return Zt(() => {
10270
10280
  var d, u, h;
10271
10281
  const r = i.preset !== e, o = t === !0 && ((d = i.pathTracing) == null ? void 0 : d.enabled) === void 0, a = n !== void 0 && ((u = i.controls) == null ? void 0 : u.autoRotate) === void 0, c = s !== void 0 && ((h = i.animations) == null ? void 0 : h.autoplay) === void 0;
@@ -10278,7 +10288,7 @@ function Lu(i, e, t, n, s) {
10278
10288
  };
10279
10289
  }, [i, e, t, n, s]);
10280
10290
  }
10281
- function Ou(i, e, t) {
10291
+ function Du(i, e, t) {
10282
10292
  const n = Zt(() => {
10283
10293
  if (typeof t == "string")
10284
10294
  return t;
@@ -10370,7 +10380,7 @@ class _i {
10370
10380
  };
10371
10381
  }
10372
10382
  }
10373
- function Du(i) {
10383
+ function Nu(i) {
10374
10384
  const e = $e(new tr()), t = Zt(
10375
10385
  () => ({
10376
10386
  "model:loading": (n) => e.current.emit("model:loading", n),
@@ -10384,10 +10394,10 @@ function Du(i) {
10384
10394
  []
10385
10395
  // eventsRef is stable
10386
10396
  );
10387
- return Cu(i, t), e.current;
10397
+ return Pu(i, t), e.current;
10388
10398
  }
10389
10399
  const ta = Ha(null);
10390
- function Nu({ viewer: i, canvasRef: e, children: t }) {
10400
+ function ku({ viewer: i, canvasRef: e, children: t }) {
10391
10401
  const n = Zt(() => ({ viewer: i, canvasRef: e }), [i, e]);
10392
10402
  return /* @__PURE__ */ Te(ta.Provider, { value: n, children: t });
10393
10403
  }
@@ -10397,7 +10407,7 @@ function na() {
10397
10407
  throw new Error("useViewerContext must be used within ViewerProvider");
10398
10408
  return i;
10399
10409
  }
10400
- function ku() {
10410
+ function Fu() {
10401
10411
  const { canvasRef: i } = na();
10402
10412
  return /* @__PURE__ */ Te(
10403
10413
  "canvas",
@@ -10425,13 +10435,13 @@ function ku() {
10425
10435
  console.error("vite-plugin-css-injected-by-js", e);
10426
10436
  }
10427
10437
  })();
10428
- const Fu = (i, e, t, n, s, r) => {
10438
+ const zu = (i, e, t, n, s, r) => {
10429
10439
  const o = performance.now(), a = () => {
10430
10440
  const c = performance.now() - o, d = Math.min(c / s, 1);
10431
10441
  i.position.lerpVectors(t, n, d), e == null || e.update(), r(), d < 1 && requestAnimationFrame(a);
10432
10442
  };
10433
10443
  requestAnimationFrame(a);
10434
- }, ho = { type: "change" }, ur = { type: "start" }, sa = { type: "end" }, Os = new Xi(), uo = new $n(), zu = Math.cos(70 * er.DEG2RAD), Pe = new Y(), nt = 2 * Math.PI, Ee = {
10444
+ }, ho = { type: "change" }, ur = { type: "start" }, sa = { type: "end" }, Os = new Xi(), uo = new $n(), Bu = Math.cos(70 * er.DEG2RAD), Pe = new Y(), nt = 2 * Math.PI, Ee = {
10435
10445
  NONE: -1,
10436
10446
  ROTATE: 0,
10437
10447
  DOLLY: 1,
@@ -10449,7 +10459,7 @@ class ia extends Mo {
10449
10459
  * @param {?HTMLDOMElement} domElement - The HTML element used for event listeners.
10450
10460
  */
10451
10461
  constructor(e, t = null) {
10452
- super(e, t), this.state = Ee.NONE, 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.keyRotateSpeed = 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: Be.ROTATE, MIDDLE: Be.DOLLY, RIGHT: Be.PAN }, this.touches = { ONE: Xe.ROTATE, TWO: Xe.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new Y(), this._lastQuaternion = new xn(), this._lastTargetPosition = new Y(), this._quat = new xn().setFromUnitVectors(e.up, new Y(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Hs(), this._sphericalDelta = new Hs(), this._scale = 1, this._panOffset = new Y(), this._rotateStart = new pe(), this._rotateEnd = new pe(), this._rotateDelta = new pe(), this._panStart = new pe(), this._panEnd = new pe(), this._panDelta = new pe(), this._dollyStart = new pe(), this._dollyEnd = new pe(), this._dollyDelta = new pe(), this._dollyDirection = new Y(), this._mouse = new pe(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = Uu.bind(this), this._onPointerDown = Bu.bind(this), this._onPointerUp = Hu.bind(this), this._onContextMenu = Xu.bind(this), this._onMouseWheel = Vu.bind(this), this._onKeyDown = Zu.bind(this), this._onTouchStart = Wu.bind(this), this._onTouchMove = Ku.bind(this), this._onMouseDown = Gu.bind(this), this._onMouseMove = ju.bind(this), this._interceptControlDown = Yu.bind(this), this._interceptControlUp = qu.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
10462
+ super(e, t), this.state = Ee.NONE, 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.keyRotateSpeed = 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: Be.ROTATE, MIDDLE: Be.DOLLY, RIGHT: Be.PAN }, this.touches = { ONE: Xe.ROTATE, TWO: Xe.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this._lastPosition = new Y(), this._lastQuaternion = new xn(), this._lastTargetPosition = new Y(), this._quat = new xn().setFromUnitVectors(e.up, new Y(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Hs(), this._sphericalDelta = new Hs(), this._scale = 1, this._panOffset = new Y(), this._rotateStart = new pe(), this._rotateEnd = new pe(), this._rotateDelta = new pe(), this._panStart = new pe(), this._panEnd = new pe(), this._panDelta = new pe(), this._dollyStart = new pe(), this._dollyEnd = new pe(), this._dollyDelta = new pe(), this._dollyDirection = new Y(), this._mouse = new pe(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = Hu.bind(this), this._onPointerDown = Uu.bind(this), this._onPointerUp = Gu.bind(this), this._onContextMenu = Yu.bind(this), this._onMouseWheel = Zu.bind(this), this._onKeyDown = Wu.bind(this), this._onTouchStart = Ku.bind(this), this._onTouchMove = Xu.bind(this), this._onMouseDown = ju.bind(this), this._onMouseMove = Vu.bind(this), this._interceptControlDown = qu.bind(this), this._interceptControlUp = $u.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
10453
10463
  }
10454
10464
  connect(e) {
10455
10465
  super.connect(e), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointercancel", this._onPointerUp), this.domElement.addEventListener("contextmenu", this._onContextMenu), this.domElement.addEventListener("wheel", this._onMouseWheel, { passive: !1 }), this.domElement.getRootNode().addEventListener("keydown", this._interceptControlDown, { passive: !0, capture: !0 }), this.domElement.style.touchAction = "none";
@@ -10540,7 +10550,7 @@ class ia extends Mo {
10540
10550
  d.unproject(this.object), this.object.position.sub(d).add(a), this.object.updateMatrixWorld(), o = Pe.length();
10541
10551
  } else
10542
10552
  console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
10543
- o !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position) : (Os.origin.copy(this.object.position), Os.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Os.direction)) < zu ? this.object.lookAt(this.target) : (uo.setFromNormalAndCoplanarPoint(this.object.up, this.target), Os.intersectPlane(uo, this.target))));
10553
+ o !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(o).add(this.object.position) : (Os.origin.copy(this.object.position), Os.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Os.direction)) < Bu ? this.object.lookAt(this.target) : (uo.setFromNormalAndCoplanarPoint(this.object.up, this.target), Os.intersectPlane(uo, this.target))));
10544
10554
  } else if (this.object.isOrthographicCamera) {
10545
10555
  const o = this.object.zoom;
10546
10556
  this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), o !== this.object.zoom && (this.object.updateProjectionMatrix(), r = !0);
@@ -10737,13 +10747,13 @@ class ia extends Mo {
10737
10747
  return e.ctrlKey && !this._controlActive && (n.deltaY *= 10), n;
10738
10748
  }
10739
10749
  }
10740
- function Bu(i) {
10750
+ function Uu(i) {
10741
10751
  this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(i.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.domElement.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(i) && (this._addPointer(i), i.pointerType === "touch" ? this._onTouchStart(i) : this._onMouseDown(i)));
10742
10752
  }
10743
- function Uu(i) {
10753
+ function Hu(i) {
10744
10754
  this.enabled !== !1 && (i.pointerType === "touch" ? this._onTouchMove(i) : this._onMouseMove(i));
10745
10755
  }
10746
- function Hu(i) {
10756
+ function Gu(i) {
10747
10757
  switch (this._removePointer(i), this._pointers.length) {
10748
10758
  case 0:
10749
10759
  this.domElement.releasePointerCapture(i.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.domElement.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(sa), this.state = Ee.NONE;
@@ -10754,7 +10764,7 @@ function Hu(i) {
10754
10764
  break;
10755
10765
  }
10756
10766
  }
10757
- function Gu(i) {
10767
+ function ju(i) {
10758
10768
  let e;
10759
10769
  switch (i.button) {
10760
10770
  case 0:
@@ -10797,7 +10807,7 @@ function Gu(i) {
10797
10807
  }
10798
10808
  this.state !== Ee.NONE && this.dispatchEvent(ur);
10799
10809
  }
10800
- function ju(i) {
10810
+ function Vu(i) {
10801
10811
  switch (this.state) {
10802
10812
  case Ee.ROTATE:
10803
10813
  if (this.enableRotate === !1) return;
@@ -10813,13 +10823,13 @@ function ju(i) {
10813
10823
  break;
10814
10824
  }
10815
10825
  }
10816
- function Vu(i) {
10826
+ function Zu(i) {
10817
10827
  this.enabled === !1 || this.enableZoom === !1 || this.state !== Ee.NONE || (i.preventDefault(), this.dispatchEvent(ur), this._handleMouseWheel(this._customWheelEvent(i)), this.dispatchEvent(sa));
10818
10828
  }
10819
- function Zu(i) {
10829
+ function Wu(i) {
10820
10830
  this.enabled !== !1 && this._handleKeyDown(i);
10821
10831
  }
10822
- function Wu(i) {
10832
+ function Ku(i) {
10823
10833
  switch (this._trackPointer(i), this._pointers.length) {
10824
10834
  case 1:
10825
10835
  switch (this.touches.ONE) {
@@ -10854,7 +10864,7 @@ function Wu(i) {
10854
10864
  }
10855
10865
  this.state !== Ee.NONE && this.dispatchEvent(ur);
10856
10866
  }
10857
- function Ku(i) {
10867
+ function Xu(i) {
10858
10868
  switch (this._trackPointer(i), this.state) {
10859
10869
  case Ee.TOUCH_ROTATE:
10860
10870
  if (this.enableRotate === !1) return;
@@ -10876,16 +10886,16 @@ function Ku(i) {
10876
10886
  this.state = Ee.NONE;
10877
10887
  }
10878
10888
  }
10879
- function Xu(i) {
10889
+ function Yu(i) {
10880
10890
  this.enabled !== !1 && i.preventDefault();
10881
10891
  }
10882
- function Yu(i) {
10892
+ function qu(i) {
10883
10893
  i.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
10884
10894
  }
10885
- function qu(i) {
10895
+ function $u(i) {
10886
10896
  i.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, { passive: !0, capture: !0 }));
10887
10897
  }
10888
- class $u extends ia {
10898
+ class Qu extends ia {
10889
10899
  constructor(e, t) {
10890
10900
  super(e, t), this.screenSpacePanning = !1, this.mouseButtons = { LEFT: Be.PAN, MIDDLE: Be.DOLLY, RIGHT: Be.ROTATE }, this.touches = { ONE: Xe.PAN, TWO: Xe.DOLLY_ROTATE };
10891
10901
  }
@@ -10906,7 +10916,7 @@ const de = {
10906
10916
  };
10907
10917
  var Gt = /* @__PURE__ */ ((i) => (i.FRONT = "FRONT", i.BACK = "BACK", i.RIGHT = "RIGHT", i.LEFT = "LEFT", i.TOP = "TOP", i.BOTTOM = "BOTTOM", i))(Gt || {});
10908
10918
  new T.Vector3(0, 1, 0);
10909
- const qn = "rotation-arrows-name", Ki = "left-rotation-arrow-name", Ks = "right-rotation-arrow-name", Qu = "gizmo-group-name", Ju = [
10919
+ const qn = "rotation-arrows-name", Ki = "left-rotation-arrow-name", Ks = "right-rotation-arrow-name", Ju = "gizmo-group-name", ed = [
10910
10920
  Ks,
10911
10921
  Ki
10912
10922
  ], Bs = {
@@ -10914,7 +10924,7 @@ const qn = "rotation-arrows-name", Ki = "left-rotation-arrow-name", Ks = "right-
10914
10924
  DEFAULT_UP: new T.Vector3(0, 1, 0),
10915
10925
  FORWARD: new T.Vector3(0, 0, -1)
10916
10926
  }, bi = (i) => Bs.FORWARD.clone().applyQuaternion(i), fo = (i, e, t = new T.Vector3()) => t.clone().add(i.multiplyScalar(-e));
10917
- class ed {
10927
+ class td {
10918
10928
  constructor(e, t = qn) {
10919
10929
  this.gizmoScene = e, this.gizmoArrowsName = t;
10920
10930
  }
@@ -10929,7 +10939,7 @@ class ed {
10929
10939
  }
10930
10940
  syncMainWithGizmo(e, t, n) {
10931
10941
  const s = n.target.clone(), r = e.position.distanceTo(s), o = e.camera instanceof T.PerspectiveCamera;
10932
- n instanceof $u && !o ? this.syncMapControls(e, t, s, r) : this.syncOrbitControls(e, t, s, r), e.camera.updateMatrix(), e.camera.updateMatrixWorld(!0), n.update();
10942
+ n instanceof Qu && !o ? this.syncMapControls(e, t, s, r) : this.syncOrbitControls(e, t, s, r), e.camera.updateMatrix(), e.camera.updateMatrixWorld(!0), n.update();
10933
10943
  }
10934
10944
  syncMapControls(e, t, n, s) {
10935
10945
  const r = e.position.y - n.y, o = bi(t.quaternion);
@@ -10944,7 +10954,7 @@ class ed {
10944
10954
  e.position.copy(a), e.up.copy(o), e.camera.lookAt(n);
10945
10955
  }
10946
10956
  }
10947
- const ra = (i) => new ed(i), po = (i, e, t) => {
10957
+ const ra = (i) => new td(i), po = (i, e, t) => {
10948
10958
  ra(t).syncGizmoWithMain(
10949
10959
  {
10950
10960
  camera: i,
@@ -10959,7 +10969,7 @@ const ra = (i) => new ed(i), po = (i, e, t) => {
10959
10969
  up: e.up
10960
10970
  }
10961
10971
  );
10962
- }, td = (i, e, t) => {
10972
+ }, nd = (i, e, t) => {
10963
10973
  ra(e.userData.scene).syncMainWithGizmo(
10964
10974
  {
10965
10975
  camera: i,
@@ -10975,14 +10985,14 @@ const ra = (i) => new ed(i), po = (i, e, t) => {
10975
10985
  },
10976
10986
  t
10977
10987
  );
10978
- }, nd = () => {
10988
+ }, sd = () => {
10979
10989
  try {
10980
10990
  const i = document.createElement("canvas");
10981
10991
  return !!(window.WebGLRenderingContext && (i.getContext("webgl") || i.getContext("experimental-webgl")));
10982
10992
  } catch {
10983
10993
  return !1;
10984
10994
  }
10985
- }, sd = () => nd() ? new T.WebGLRenderer({ alpha: !0, antialias: !1 }) : (console.error("WebGL is not supported in this environment."), null), id = (i) => {
10995
+ }, id = () => sd() ? new T.WebGLRenderer({ alpha: !0, antialias: !1 }) : (console.error("WebGL is not supported in this environment."), null), rd = (i) => {
10986
10996
  const e = new T.AmbientLight(16777215, 1);
10987
10997
  i.add(e);
10988
10998
  const t = new T.DirectionalLight(16777215, 1);
@@ -10992,7 +11002,7 @@ const ra = (i) => new ed(i), po = (i, e, t) => {
10992
11002
  const s = new T.PointLight(16777215, 1, 100);
10993
11003
  s.position.set(0, 0, 5), i.add(s), t.castShadow = !1, n.castShadow = !1, s.castShadow = !1;
10994
11004
  };
10995
- class rd {
11005
+ class od {
10996
11006
  static createTextTexture(e) {
10997
11007
  const t = document.createElement("canvas"), n = t.getContext("2d");
10998
11008
  t.width = de.CANVAS_SIZE, t.height = de.CANVAS_SIZE, n && (n.clearRect(0, 0, t.width, t.height), n.font = `${de.FONT_SIZE} Arial`, n.fillStyle = de.TEXT_COLOR, n.textAlign = de.TEXT_ALIGN, n.textBaseline = de.TEXT_BASELINE, n.fillText(e, t.width / 2, t.height / 2));
@@ -11034,14 +11044,14 @@ class Ds {
11034
11044
  de.CUBE_SIZE - de.EDGE_SECTION_SIZE,
11035
11045
  de.CUBE_SIZE - de.EDGE_SECTION_SIZE
11036
11046
  ), d = new T.MeshStandardMaterial({
11037
- map: rd.createTextTexture(n),
11047
+ map: od.createTextTexture(n),
11038
11048
  transparent: !0,
11039
11049
  depthWrite: !1
11040
11050
  }), u = new T.Mesh(c, d);
11041
11051
  return u.position.set(0, 0, de.FACE_THICKNESS / 2 + 0.01), s.add(u), s.position.copy(e), s.rotation.copy(t), s;
11042
11052
  }
11043
11053
  }
11044
- const od = (i, e) => {
11054
+ const ad = (i, e) => {
11045
11055
  const t = document.createElement("canvas");
11046
11056
  t.width = 64, t.height = 64;
11047
11057
  const n = t.getContext("2d");
@@ -11049,7 +11059,7 @@ const od = (i, e) => {
11049
11059
  const s = new T.CanvasTexture(t), r = new T.SpriteMaterial({ map: s }), o = new T.Sprite(r);
11050
11060
  return o.scale.set(0.5, 0.5, 0.5), o;
11051
11061
  };
11052
- class ad {
11062
+ class cd {
11053
11063
  constructor(e) {
11054
11064
  this.hoveredObject = null, this.originalColor = null, this.config = e;
11055
11065
  }
@@ -11171,7 +11181,7 @@ class ad {
11171
11181
  f.setRotationFromAxisAngle(w, _);
11172
11182
  }
11173
11183
  c.add(f);
11174
- const p = od(a, t);
11184
+ const p = ad(a, t);
11175
11185
  return p.position.copy(r).add(n.clone().multiplyScalar(s + 0.1)), c.add(p), c;
11176
11186
  }
11177
11187
  createCoordinateAxes() {
@@ -11214,7 +11224,7 @@ class ad {
11214
11224
  }
11215
11225
  create() {
11216
11226
  const e = new T.Group();
11217
- e.name = Qu;
11227
+ e.name = Ju;
11218
11228
  const t = this.createWireframe();
11219
11229
  e.add(t), this.createEdges(e), this.createCorners(e), this.createFaces(e);
11220
11230
  const n = this.createCoordinateAxes();
@@ -11239,7 +11249,7 @@ class ad {
11239
11249
  }
11240
11250
  }
11241
11251
  }
11242
- class cd {
11252
+ class ld {
11243
11253
  constructor(e) {
11244
11254
  this.onChangeMainControlsListener = () => {
11245
11255
  }, this.onChangeGizmoControlsListener = () => {
@@ -11261,10 +11271,10 @@ class cd {
11261
11271
  }
11262
11272
  initializeScene() {
11263
11273
  var e;
11264
- const t = new ad({
11274
+ const t = new cd({
11265
11275
  initialFace: ((e = this.options) == null ? void 0 : e.initialFace) ?? Gt.FRONT
11266
11276
  }).create();
11267
- this.gizmoScene.add(t), id(this.gizmoScene);
11277
+ this.gizmoScene.add(t), rd(this.gizmoScene);
11268
11278
  }
11269
11279
  initializeControls() {
11270
11280
  this.onChangeMainControlsListener = () => this.syncFunctions.syncGizmoCameraWithMain(
@@ -11304,7 +11314,7 @@ class cd {
11304
11314
  ), this.gizmoScene.clear(), cancelAnimationFrame(this.animationId);
11305
11315
  }
11306
11316
  }
11307
- const ld = (i, e) => {
11317
+ const hd = (i, e) => {
11308
11318
  let t;
11309
11319
  return function(...n) {
11310
11320
  t || (i.apply(this, n), t = !0, setTimeout(() => t = !1, e));
@@ -11320,12 +11330,12 @@ const oa = (i, e, t, n) => (n.setFromCamera(i, e), n.intersectObjects(t.children
11320
11330
  const t = ["Wireframe", ""];
11321
11331
  return ((e = i.find((n) => !t.includes(n.object.name))) == null ? void 0 : e.object) || null;
11322
11332
  };
11323
- function hd(i, e, t, n) {
11333
+ function ud(i, e, t, n) {
11324
11334
  if (!e || !t) return null;
11325
11335
  const s = oa(i, e, t, n);
11326
11336
  return aa(s);
11327
11337
  }
11328
- function ud(i, e) {
11338
+ function dd(i, e) {
11329
11339
  const t = i == null ? void 0 : i.userData.gizmoCube;
11330
11340
  if (i && t) {
11331
11341
  t.handleClick();
@@ -11333,22 +11343,22 @@ function ud(i, e) {
11333
11343
  n && e(n);
11334
11344
  }
11335
11345
  }
11336
- const dd = {
11346
+ const fd = {
11337
11347
  radius: 2.1,
11338
11348
  color: 12369854,
11339
11349
  tubeRadius: 0.1,
11340
11350
  tubeSegments: 8,
11341
11351
  numPoints: 64,
11342
11352
  tubeOffset: 1.5
11343
- }, fd = {
11353
+ }, pd = {
11344
11354
  size: 0.2,
11345
11355
  depth: 0.1,
11346
11356
  heightRatio: 1.4,
11347
11357
  segments: 1
11348
11358
  };
11349
- class pd {
11359
+ class md {
11350
11360
  constructor(e = {}) {
11351
- this.config = { ...dd, ...e }, this.material = new T.MeshBasicMaterial({ color: this.config.color });
11361
+ this.config = { ...fd, ...e }, this.material = new T.MeshBasicMaterial({ color: this.config.color });
11352
11362
  }
11353
11363
  create() {
11354
11364
  const e = new T.Group(), t = this.createQuarterCircleCurves();
@@ -11389,7 +11399,7 @@ class pd {
11389
11399
  ];
11390
11400
  }
11391
11401
  createArrowHeads([e, t]) {
11392
- const { size: n, depth: s, heightRatio: r, segments: o } = fd, a = this.createArrowShape(n, r), c = new T.ExtrudeGeometry(a, {
11402
+ const { size: n, depth: s, heightRatio: r, segments: o } = pd, a = this.createArrowShape(n, r), c = new T.ExtrudeGeometry(a, {
11393
11403
  steps: o,
11394
11404
  depth: s,
11395
11405
  bevelEnabled: !1
@@ -11417,11 +11427,11 @@ class pd {
11417
11427
  return Math.atan2(e.y, e.x);
11418
11428
  }
11419
11429
  }
11420
- const md = (i) => {
11430
+ const gd = (i) => {
11421
11431
  const e = i.rotation, t = 0.01, n = Math.PI, s = (Math.abs(e.x) % (2 * n) + 2 * n) % (2 * n), r = (Math.abs(e.y) % (2 * n) + 2 * n) % (2 * n), o = Math.abs(s - n / 2) < t || Math.abs(s - 3 * n / 2) < t || Math.abs(r - n / 2) < t || Math.abs(r - 3 * n / 2) < t, a = (Math.abs(s) < t || Math.abs(s - n) < t) && (Math.abs(r) < t || Math.abs(r - n) < t);
11422
11432
  return !(o || a);
11423
- }, gd = 25, yd = 200;
11424
- function wd({
11433
+ }, yd = 25, wd = 200;
11434
+ function Ed({
11425
11435
  gizmoRenderer: i,
11426
11436
  gizmoScene: e,
11427
11437
  gizmoCamera: t,
@@ -11429,19 +11439,19 @@ function wd({
11429
11439
  gizmoControlRef: s
11430
11440
  }) {
11431
11441
  const r = $e(null), o = $e(null), a = $e(new T.Raycaster()).current, c = $e(new T.Vector2()).current, d = Rt(() => {
11432
- const _ = e.getObjectByName(qn), y = md(t);
11442
+ const _ = e.getObjectByName(qn), y = gd(t);
11433
11443
  if (_ && y) {
11434
11444
  e.remove(_);
11435
11445
  return;
11436
11446
  }
11437
11447
  if (_ || y) return;
11438
- const S = new pd().create();
11448
+ const S = new md().create();
11439
11449
  S.rotation.copy(t.rotation), e.add(S);
11440
11450
  }, [e, t]), u = Rt(() => {
11441
11451
  const _ = e.getObjectByName(qn);
11442
11452
  _ && e.remove(_);
11443
11453
  }, [e]), h = Rt(
11444
- ld((_) => {
11454
+ hd((_) => {
11445
11455
  if (!s.current || !i) return;
11446
11456
  mo(_, i, c);
11447
11457
  const y = oa(
@@ -11453,7 +11463,7 @@ function wd({
11453
11463
  S != null && S.userData.gizmoCube ? S.userData.gizmoCube.highlightObject(S) : e.traverse((E) => {
11454
11464
  E.userData.gizmoCube && E.userData.gizmoCube.highlightObject(null);
11455
11465
  }), y.length > 0 ? d() : u();
11456
- }, 1e3 / gd),
11466
+ }, 1e3 / yd),
11457
11467
  [
11458
11468
  s,
11459
11469
  i,
@@ -11475,15 +11485,15 @@ function wd({
11475
11485
  [t, s]
11476
11486
  ), w = Rt(
11477
11487
  (_) => {
11478
- if ((r.current ? Date.now() - r.current : 0) < yd) {
11488
+ if ((r.current ? Date.now() - r.current : 0) < wd) {
11479
11489
  mo(_, i, c);
11480
- const y = hd(
11490
+ const y = ud(
11481
11491
  c,
11482
11492
  t,
11483
11493
  e,
11484
11494
  a
11485
11495
  );
11486
- y != null && y.name && Ju.includes(y.name) ? p(y) : ud(y, n);
11496
+ y != null && y.name && ed.includes(y.name) ? p(y) : dd(y, n);
11487
11497
  }
11488
11498
  r.current = null, o.current = null;
11489
11499
  },
@@ -11504,14 +11514,14 @@ function wd({
11504
11514
  onMouseLeave: u
11505
11515
  };
11506
11516
  }
11507
- const Ed = ({
11517
+ const Td = ({
11508
11518
  camera: i,
11509
11519
  controls: e,
11510
11520
  className: t,
11511
11521
  render: n,
11512
11522
  options: s
11513
11523
  }) => {
11514
- const r = $e(null), o = $e(new T.Scene()).current, [a] = Xs(() => sd()), c = 30, d = 1, u = 0.1, h = 10, f = new T.PerspectiveCamera(
11524
+ const r = $e(null), o = $e(new T.Scene()).current, [a] = Xs(() => id()), c = 30, d = 1, u = 0.1, h = 10, f = new T.PerspectiveCamera(
11515
11525
  c,
11516
11526
  d,
11517
11527
  u,
@@ -11524,7 +11534,7 @@ const Ed = ({
11524
11534
  const L = i.position.length(), C = v.clone().multiplyScalar(L), M = 400, D = new T.Matrix4();
11525
11535
  D.lookAt(C, new T.Vector3(0, 0, 0), new T.Vector3(0, 1, 0));
11526
11536
  const I = new T.Quaternion();
11527
- I.setFromRotationMatrix(D), i.quaternion.copy(I), Fu(
11537
+ I.setFromRotationMatrix(D), i.quaternion.copy(I), zu(
11528
11538
  i,
11529
11539
  e,
11530
11540
  i.position.clone(),
@@ -11534,7 +11544,7 @@ const Ed = ({
11534
11544
  ), i.up.set(0, 1, 0), i.lookAt(new T.Vector3(0, 0, 0)), e.target.set(0, 0, 0), e.update();
11535
11545
  },
11536
11546
  [i, e, _, o]
11537
- ), { onMouseDown: S, onMouseMove: E, onMouseUp: b, onMouseLeave: x } = wd({
11547
+ ), { onMouseDown: S, onMouseMove: E, onMouseUp: b, onMouseLeave: x } = Ed({
11538
11548
  gizmoRenderer: a,
11539
11549
  gizmoScene: o,
11540
11550
  gizmoCamera: p,
@@ -11556,9 +11566,9 @@ const Ed = ({
11556
11566
  renderGizmo: _
11557
11567
  }, M = {
11558
11568
  syncGizmoCameraWithMain: po,
11559
- syncMainCameraWithGizmo: td
11569
+ syncMainCameraWithGizmo: nd
11560
11570
  };
11561
- return w.current = new cd({
11571
+ return w.current = new ld({
11562
11572
  gizmoParams: L,
11563
11573
  mainParams: C,
11564
11574
  syncFunctions: M,
@@ -11575,12 +11585,12 @@ const Ed = ({
11575
11585
  ref: r
11576
11586
  }
11577
11587
  );
11578
- }, Ns = 10, Td = (i) => ({
11588
+ }, Ns = 10, _d = (i) => ({
11579
11589
  top: i.startsWith("top") ? Ns : "auto",
11580
11590
  bottom: i.startsWith("bottom") ? Ns : "auto",
11581
11591
  left: i.endsWith("left") ? Ns : "auto",
11582
11592
  right: i.endsWith("right") ? Ns : "auto"
11583
- }), _d = ({
11593
+ }), Sd = ({
11584
11594
  camera: i,
11585
11595
  controls: e,
11586
11596
  render: t,
@@ -11599,10 +11609,10 @@ const Ed = ({
11599
11609
  width: s,
11600
11610
  height: s,
11601
11611
  zIndex: 1e3,
11602
- ...Td(n)
11612
+ ..._d(n)
11603
11613
  },
11604
11614
  children: /* @__PURE__ */ Te(
11605
- Ed,
11615
+ Td,
11606
11616
  {
11607
11617
  camera: i,
11608
11618
  controls: r,
@@ -11612,7 +11622,7 @@ const Ed = ({
11612
11622
  }
11613
11623
  );
11614
11624
  };
11615
- class Sd extends ja {
11625
+ class bd extends ja {
11616
11626
  constructor(e) {
11617
11627
  super(e), this.reset = () => {
11618
11628
  this.setState({ hasError: !1, error: null });
@@ -11644,7 +11654,7 @@ class Sd extends ja {
11644
11654
  ] }) }) : this.props.children;
11645
11655
  }
11646
11656
  }
11647
- function bd({ status: i, label: e, color: t, backdrop: n }) {
11657
+ function xd({ status: i, label: e, color: t, backdrop: n }) {
11648
11658
  const s = typeof window < "u" && typeof window.matchMedia == "function" && window.matchMedia("(prefers-reduced-motion: reduce)").matches;
11649
11659
  return /* @__PURE__ */ Hn(
11650
11660
  "div",
@@ -11694,14 +11704,14 @@ function bd({ status: i, label: e, color: t, backdrop: n }) {
11694
11704
  }
11695
11705
  );
11696
11706
  }
11697
- const xd = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif', Ad = {
11707
+ const Ad = '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif', vd = {
11698
11708
  background: "rgba(255,255,255,0.78)",
11699
11709
  backdropFilter: "blur(16px)",
11700
11710
  WebkitBackdropFilter: "blur(16px)",
11701
11711
  border: "1px solid rgba(0,0,0,0.06)",
11702
11712
  boxShadow: "0 8px 30px rgba(0,0,0,0.10)"
11703
- }, vd = Object.keys(ea);
11704
- function Rd({ active: i, onSelect: e }) {
11713
+ }, Rd = Object.keys(ea);
11714
+ function Md({ active: i, onSelect: e }) {
11705
11715
  return /* @__PURE__ */ Te(
11706
11716
  "div",
11707
11717
  {
@@ -11722,9 +11732,9 @@ function Rd({ active: i, onSelect: e }) {
11722
11732
  // instead of bleeding past the canvas edges.
11723
11733
  maxWidth: "calc(100% - 16px)",
11724
11734
  overflowX: "auto",
11725
- ...Ad
11735
+ ...vd
11726
11736
  },
11727
- children: vd.map((t) => /* @__PURE__ */ Te(
11737
+ children: Rd.map((t) => /* @__PURE__ */ Te(
11728
11738
  "button",
11729
11739
  {
11730
11740
  type: "button",
@@ -11739,7 +11749,7 @@ function Rd({ active: i, onSelect: e }) {
11739
11749
  border: t === i ? "1px solid #111318" : "1px solid transparent",
11740
11750
  background: t === i ? "#111318" : "transparent",
11741
11751
  color: t === i ? "#fff" : "#3f3f4a",
11742
- fontFamily: xd,
11752
+ fontFamily: Ad,
11743
11753
  fontSize: 13,
11744
11754
  fontWeight: 500,
11745
11755
  lineHeight: 1,
@@ -11764,7 +11774,7 @@ const Bn = {
11764
11774
  // default light background (#f0f0f7) and dark studio mode.
11765
11775
  backdrop: "rgba(15,16,20,0.6)"
11766
11776
  };
11767
- function Md(i) {
11777
+ function Id(i) {
11768
11778
  return i === void 0 || i === !0 ? Bn : i === !1 ? { ...Bn, enabled: !1 } : {
11769
11779
  enabled: i.enabled ?? !0,
11770
11780
  label: i.label ?? Bn.label,
@@ -11776,19 +11786,19 @@ function Md(i) {
11776
11786
  const ks = () => new K("Viewer is not ready yet", q.COMPONENT_NOT_MOUNTED), ca = go(
11777
11787
  ({ object: i, options: e = {}, preset: t, pathTraced: n, turntable: s, animations: r, children: o }, a) => {
11778
11788
  var I, N;
11779
- const c = $e(null), d = e.preset ?? t, { activePreset: u, pickerEnabled: h, selectPreset: f } = Pu(
11789
+ const c = $e(null), d = e.preset ?? t, { activePreset: u, pickerEnabled: h, selectPreset: f } = Lu(
11780
11790
  d,
11781
11791
  e.ui
11782
- ), p = Lu(
11792
+ ), p = Ou(
11783
11793
  e,
11784
11794
  u,
11785
11795
  n,
11786
11796
  s,
11787
11797
  r
11788
- ), { viewer: w, isInitialized: _ } = Iu(c, p), y = Ou(w, _, i), S = Du(w), E = w ? Jn(w.getCamera()) : null, b = w ? hr(w.getControls()) : null, x = w ? Wo(w.getRenderer()) : null, v = Rt(() => {
11798
+ ), { viewer: w, isInitialized: _ } = Cu(c, p), y = Du(w, _, i), S = Nu(w), E = w ? Jn(w.getCamera()) : null, b = w ? hr(w.getControls()) : null, x = w ? Wo(w.getRenderer()) : null, v = Rt(() => {
11789
11799
  w == null || w.requestRender();
11790
11800
  }, [w]), L = ((I = e.helpers) == null ? void 0 : I.gizmo) !== void 0 && e.helpers.gizmo !== !1, C = typeof ((N = e.helpers) == null ? void 0 : N.gizmo) == "object" ? e.helpers.gizmo : {}, M = Zt(
11791
- () => Md(e.loadingIndicator),
11801
+ () => Id(e.loadingIndicator),
11792
11802
  [e.loadingIndicator]
11793
11803
  ), D = M.enabled && (y.status === "loading" || y.status === "error");
11794
11804
  return Va(a, () => ({
@@ -11832,10 +11842,10 @@ const ks = () => new K("Viewer is not ready yet", q.COMPONENT_NOT_MOUNTED), ca =
11832
11842
  dispose: () => {
11833
11843
  w == null || w.dispose();
11834
11844
  }
11835
- }), [w, E, x, b, S]), /* @__PURE__ */ Te(Sd, { children: /* @__PURE__ */ Te(Nu, { viewer: w, canvasRef: c, children: /* @__PURE__ */ Hn("div", { style: { position: "relative", width: "100%", height: "100%" }, children: [
11836
- /* @__PURE__ */ Te(ku, {}),
11845
+ }), [w, E, x, b, S]), /* @__PURE__ */ Te(bd, { children: /* @__PURE__ */ Te(ku, { viewer: w, canvasRef: c, children: /* @__PURE__ */ Hn("div", { style: { position: "relative", width: "100%", height: "100%" }, children: [
11846
+ /* @__PURE__ */ Te(Fu, {}),
11837
11847
  L && _ && E && b && /* @__PURE__ */ Te(
11838
- _d,
11848
+ Sd,
11839
11849
  {
11840
11850
  camera: E,
11841
11851
  controls: b,
@@ -11845,7 +11855,7 @@ const ks = () => new K("Viewer is not ready yet", q.COMPONENT_NOT_MOUNTED), ca =
11845
11855
  }
11846
11856
  ),
11847
11857
  D && /* @__PURE__ */ Te(
11848
- bd,
11858
+ xd,
11849
11859
  {
11850
11860
  status: y.status === "error" ? "error" : "loading",
11851
11861
  label: y.status === "error" ? M.errorLabel ?? y.error ?? "Failed to load model" : M.label,
@@ -11855,17 +11865,17 @@ const ks = () => new K("Viewer is not ready yet", q.COMPONENT_NOT_MOUNTED), ca =
11855
11865
  ),
11856
11866
  h && /* The defaults ARE the studio look (pinned by presets.test.ts),
11857
11867
  so with no preset set the studio chip is the honest active one. */
11858
- /* @__PURE__ */ Te(Rd, { active: u ?? "studio", onSelect: f }),
11868
+ /* @__PURE__ */ Te(Md, { active: u ?? "studio", onSelect: f }),
11859
11869
  o
11860
11870
  ] }) }) });
11861
11871
  }
11862
11872
  );
11863
11873
  ca.displayName = "SimpleViewer";
11864
- const Id = go(
11874
+ const Cd = go(
11865
11875
  (i, e) => /* @__PURE__ */ Te(ca, { ref: e, ...i })
11866
11876
  );
11867
- Id.displayName = "SimpleViewer";
11868
- const Cd = () => /* @__PURE__ */ Te(
11877
+ Cd.displayName = "SimpleViewer";
11878
+ const Pd = () => /* @__PURE__ */ Te(
11869
11879
  "span",
11870
11880
  {
11871
11881
  "aria-hidden": "true",
@@ -11880,7 +11890,7 @@ const Cd = () => /* @__PURE__ */ Te(
11880
11890
  }
11881
11891
  }
11882
11892
  );
11883
- function Fd({ position: i, occlude: e = !1, children: t }) {
11893
+ function zd({ position: i, occlude: e = !1, children: t }) {
11884
11894
  const { viewer: n } = na(), s = $e(null), [r, o, a] = i;
11885
11895
  Et(() => {
11886
11896
  if (!n)
@@ -11931,7 +11941,7 @@ function Fd({ position: i, occlude: e = !1, children: t }) {
11931
11941
  // interactive custom children keep receiving pointer events.
11932
11942
  pointerEvents: c ? "auto" : "none"
11933
11943
  },
11934
- children: c ? t : /* @__PURE__ */ Te(Cd, {})
11944
+ children: c ? t : /* @__PURE__ */ Te(Pd, {})
11935
11945
  }
11936
11946
  );
11937
11947
  }
@@ -11940,9 +11950,9 @@ export {
11940
11950
  Qe as C,
11941
11951
  Mr as D,
11942
11952
  q as E,
11943
- Fd as H,
11953
+ zd as H,
11944
11954
  De as I,
11945
- Dd as L,
11955
+ Nd as L,
11946
11956
  Vs as M,
11947
11957
  qe as O,
11948
11958
  B as R,
@@ -11950,13 +11960,13 @@ export {
11950
11960
  tr as T,
11951
11961
  ea as V,
11952
11962
  or as a,
11953
- Nd as b,
11963
+ kd as b,
11954
11964
  kc as c,
11955
11965
  K as d,
11956
11966
  Ws as e,
11957
- Id as f,
11967
+ Cd as f,
11958
11968
  qc as g,
11959
11969
  Cc as h,
11960
11970
  Zi as i,
11961
- Ru as r
11971
+ Mu as r
11962
11972
  };