@abi-software/scaffoldvuer 1.15.0 → 1.15.2

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.
@@ -2110,8 +2110,8 @@ function oE(n) {
2110
2110
  }
2111
2111
  if (F) for (var U = p ? 3 : 1, z = function(Z) {
2112
2112
  var te = w.find(function(q) {
2113
- var j = E.get(q);
2114
- if (j) return j.slice(0, Z).every(function($) {
2113
+ var W = E.get(q);
2114
+ if (W) return W.slice(0, Z).every(function($) {
2115
2115
  return $;
2116
2116
  });
2117
2117
  });
@@ -2160,7 +2160,7 @@ function mE(n) {
2160
2160
  var e = n.state, t = n.options, i = n.name, r = t.mainAxis, s = r === void 0 ? !0 : r, o = t.altAxis, a = o === void 0 ? !1 : o, c = t.boundary, l = t.rootBoundary, d = t.altBoundary, u = t.padding, f = t.tether, m = f === void 0 ? !0 : f, p = t.tetherOffset, h = p === void 0 ? 0 : p, y = ja(e, { boundary: c, rootBoundary: l, padding: u, altBoundary: d }), v = Li(e.placement), g = Lo(e.placement), M = !g, w = af(v), S = pE(w), x = e.modifiersData.popperOffsets, E = e.rects.reference, F = e.rects.popper, L = typeof h == "function" ? h(Object.assign({}, e.rects, { placement: e.placement })) : h, P = typeof L == "number" ? { mainAxis: L, altAxis: L } : Object.assign({ mainAxis: 0, altAxis: 0 }, L), A = e.modifiersData.offset ? e.modifiersData.offset[e.placement] : null, _ = { x: 0, y: 0 };
2161
2161
  if (x) {
2162
2162
  if (s) {
2163
- var T, C = w === "y" ? On : Dn, R = w === "y" ? Qn : ei, b = w === "y" ? "height" : "width", I = x[w], D = I + y[C], O = I - y[R], U = m ? -F[b] / 2 : 0, z = g === _o ? E[b] : F[b], G = g === _o ? -F[b] : -E[b], Y = e.elements.arrow, Z = m && Y ? of(Y) : { width: 0, height: 0 }, te = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : E0(), q = te[C], j = te[R], $ = Oa(0, E[b], Z[b]), X = M ? E[b] / 2 - U - $ - q - P.mainAxis : z - $ - q - P.mainAxis, K = M ? -E[b] / 2 + U + $ + j + P.mainAxis : G + $ + j + P.mainAxis, re = e.elements.arrow && ul(e.elements.arrow), k = re ? w === "y" ? re.clientTop || 0 : re.clientLeft || 0 : 0, W = (T = A == null ? void 0 : A[w]) != null ? T : 0, oe = I + X - W - k, le = I + K - W, ce = Oa(m ? jc(D, oe) : D, I, m ? As(O, le) : O);
2163
+ var T, C = w === "y" ? On : Dn, R = w === "y" ? Qn : ei, b = w === "y" ? "height" : "width", I = x[w], D = I + y[C], O = I - y[R], U = m ? -F[b] / 2 : 0, z = g === _o ? E[b] : F[b], G = g === _o ? -F[b] : -E[b], Y = e.elements.arrow, Z = m && Y ? of(Y) : { width: 0, height: 0 }, te = e.modifiersData["arrow#persistent"] ? e.modifiersData["arrow#persistent"].padding : E0(), q = te[C], W = te[R], $ = Oa(0, E[b], Z[b]), X = M ? E[b] / 2 - U - $ - q - P.mainAxis : z - $ - q - P.mainAxis, K = M ? -E[b] / 2 + U + $ + W + P.mainAxis : G + $ + W + P.mainAxis, re = e.elements.arrow && ul(e.elements.arrow), k = re ? w === "y" ? re.clientTop || 0 : re.clientLeft || 0 : 0, j = (T = A == null ? void 0 : A[w]) != null ? T : 0, oe = I + X - j - k, le = I + K - j, ce = Oa(m ? jc(D, oe) : D, I, m ? As(O, le) : O);
2164
2164
  x[w] = ce, _[w] = ce - I;
2165
2165
  }
2166
2166
  if (a) {
@@ -2948,7 +2948,7 @@ const r2 = at({
2948
2948
  right: `calc(100% - ${ne + 15 + 6}px)`
2949
2949
  };
2950
2950
  });
2951
- const j = () => {
2951
+ const W = () => {
2952
2952
  const { type: fe, autosize: Ae } = i;
2953
2953
  if (!(!en || fe !== "textarea" || !g.value))
2954
2954
  if (Ae) {
@@ -2971,13 +2971,13 @@ const r2 = at({
2971
2971
  return;
2972
2972
  ((ne = g.value) == null ? void 0 : ne.offsetParent) === null || (fe(), Ae = !0);
2973
2973
  };
2974
- })(j), K = () => {
2974
+ })(W), K = () => {
2975
2975
  const fe = E.value, Ae = i.formatter ? i.formatter(D.value) : D.value;
2976
2976
  !fe || fe.value === Ae || (fe.value = Ae);
2977
2977
  }, re = async (fe) => {
2978
2978
  te();
2979
2979
  let { value: Ae } = fe.target;
2980
- if (i.formatter && (Ae = i.parser ? i.parser(Ae) : Ae), !W.value) {
2980
+ if (i.formatter && (Ae = i.parser ? i.parser(Ae) : Ae), !j.value) {
2981
2981
  if (Ae === D.value) {
2982
2982
  K();
2983
2983
  return;
@@ -2987,7 +2987,7 @@ const r2 = at({
2987
2987
  }, k = (fe) => {
2988
2988
  t("change", fe.target.value);
2989
2989
  }, {
2990
- isComposing: W,
2990
+ isComposing: j,
2991
2991
  handleCompositionStart: oe,
2992
2992
  handleCompositionUpdate: le,
2993
2993
  handleCompositionEnd: ce
@@ -3013,23 +3013,23 @@ const r2 = at({
3013
3013
  };
3014
3014
  return Je(() => i.modelValue, () => {
3015
3015
  var fe;
3016
- yt(() => j()), i.validateEvent && ((fe = u == null ? void 0 : u.validate) == null || fe.call(u, "change").catch((Ae) => Pt(Ae)));
3016
+ yt(() => W()), i.validateEvent && ((fe = u == null ? void 0 : u.validate) == null || fe.call(u, "change").catch((Ae) => Pt(Ae)));
3017
3017
  }), Je(D, () => K()), Je(() => i.type, async () => {
3018
- await yt(), K(), j();
3018
+ await yt(), K(), W();
3019
3019
  }), Yt(() => {
3020
- !i.formatter && i.parser && Pt("ElInput", "If you set the parser, you also need to set the formatter."), K(), yt(j);
3020
+ !i.formatter && i.parser && Pt("ElInput", "If you set the parser, you also need to set the formatter."), K(), yt(W);
3021
3021
  }), e({
3022
3022
  input: v,
3023
3023
  textarea: g,
3024
3024
  ref: E,
3025
3025
  textareaStyle: I,
3026
3026
  autosize: hi(i, "autosize"),
3027
- isComposing: W,
3027
+ isComposing: j,
3028
3028
  focus: V,
3029
3029
  blur: B,
3030
3030
  select: xe,
3031
3031
  clear: we,
3032
- resizeTextarea: j
3032
+ resizeTextarea: W
3033
3033
  }), (fe, Ae) => (pe(), Ee("div", Ti(N(o), {
3034
3034
  class: [
3035
3035
  N(a),
@@ -7361,7 +7361,7 @@ const UR = 11, kR = (n, e) => {
7361
7361
  const ze = ge.findIndex((Ze) => Ze.value === Ie);
7362
7362
  ze > -1 && Se.push(ge[ze]);
7363
7363
  }), Se.length >= ge.length ? Se : ge;
7364
- }), j = ue(() => Array.from(o.cachedOptions.values())), $ = ue(() => {
7364
+ }), W = ue(() => Array.from(o.cachedOptions.values())), $ = ue(() => {
7365
7365
  const ge = q.value.filter((Se) => !Se.created).some((Se) => Se.currentLabel === o.inputValue);
7366
7366
  return n.filterable && n.allowCreate && o.inputValue !== "" && !ge;
7367
7367
  }), X = () => {
@@ -7376,7 +7376,7 @@ const UR = 11, kR = (n, e) => {
7376
7376
  set(ge) {
7377
7377
  L.value = ge;
7378
7378
  }
7379
- }), W = ue(() => {
7379
+ }), j = ue(() => {
7380
7380
  if (n.multiple && !Fn(n.modelValue))
7381
7381
  return Ai(n.modelValue).length === 0 && !o.inputValue;
7382
7382
  const ge = on(n.modelValue) ? n.modelValue[0] : n.modelValue;
@@ -7429,7 +7429,7 @@ const UR = 11, kR = (n, e) => {
7429
7429
  let Se;
7430
7430
  const Ie = Bu(ge).toLowerCase() === "object", ze = Bu(ge).toLowerCase() === "null", Ze = Bu(ge).toLowerCase() === "undefined";
7431
7431
  for (let ft = o.cachedOptions.size - 1; ft >= 0; ft--) {
7432
- const zt = j.value[ft];
7432
+ const zt = W.value[ft];
7433
7433
  if (Ie ? Ki(zt.value, n.valueKey) === Ki(ge, n.valueKey) : zt.value === ge) {
7434
7434
  Se = {
7435
7435
  value: ge,
@@ -7595,7 +7595,7 @@ const UR = 11, kR = (n, e) => {
7595
7595
  handleOptionSelect: qe,
7596
7596
  scrollToOption: ke,
7597
7597
  hasModelValue: I,
7598
- shouldShowPlaceholder: W,
7598
+ shouldShowPlaceholder: j,
7599
7599
  currentPlaceholder: oe,
7600
7600
  mouseEnterEventName: le,
7601
7601
  showClose: D,
@@ -8784,13 +8784,13 @@ const _3 = Re({
8784
8784
  ]), U = s3(i);
8785
8785
  y3(i, o, f, m, t, a);
8786
8786
  const z = ue(() => {
8787
- const j = [i.min, i.max, i.step].map(($) => {
8787
+ const W = [i.min, i.max, i.step].map(($) => {
8788
8788
  const X = `${$}`.split(".")[1];
8789
8789
  return X ? X.length : 0;
8790
8790
  });
8791
- return Math.max.apply(null, j);
8792
- }), { sliderWrapper: G } = r3(i, o, y), { firstValue: Y, secondValue: Z, sliderSize: te } = sr(o), q = (j) => {
8793
- o.dragging = j;
8791
+ return Math.max.apply(null, W);
8792
+ }), { sliderWrapper: G } = r3(i, o, y), { firstValue: Y, secondValue: Z, sliderSize: te } = sr(o), q = (W) => {
8793
+ o.dragging = W;
8794
8794
  };
8795
8795
  return dn(G, "touchstart", g, {
8796
8796
  passive: !1
@@ -8806,23 +8806,23 @@ const _3 = Re({
8806
8806
  updateDragging: q
8807
8807
  }), e({
8808
8808
  onSliderClick: M
8809
- }), (j, $) => {
8809
+ }), (W, $) => {
8810
8810
  var X, K;
8811
8811
  return pe(), Ee("div", {
8812
- id: j.range ? N(P) : void 0,
8812
+ id: W.range ? N(P) : void 0,
8813
8813
  ref_key: "sliderWrapper",
8814
8814
  ref: G,
8815
8815
  class: _e(N(O)),
8816
- role: j.range ? "group" : void 0,
8817
- "aria-label": j.range && !N(A) ? N(C) : void 0,
8818
- "aria-labelledby": j.range && N(A) ? (X = N(a)) == null ? void 0 : X.labelId : void 0
8816
+ role: W.range ? "group" : void 0,
8817
+ "aria-label": W.range && !N(A) ? N(C) : void 0,
8818
+ "aria-labelledby": W.range && N(A) ? (X = N(a)) == null ? void 0 : X.labelId : void 0
8819
8819
  }, [
8820
8820
  Oe("div", {
8821
8821
  ref_key: "slider",
8822
8822
  ref: c,
8823
8823
  class: _e([
8824
8824
  N(r).e("runway"),
8825
- { "show-input": j.showInput && !j.range },
8825
+ { "show-input": W.showInput && !W.range },
8826
8826
  N(r).is("disabled", N(u))
8827
8827
  ]),
8828
8828
  style: wt(N(p)),
@@ -8834,43 +8834,43 @@ const _3 = Re({
8834
8834
  style: wt(N(h))
8835
8835
  }, null, 6),
8836
8836
  ae(jm, {
8837
- id: j.range ? void 0 : N(P),
8837
+ id: W.range ? void 0 : N(P),
8838
8838
  ref_key: "firstButton",
8839
8839
  ref: l,
8840
8840
  "model-value": N(Y),
8841
- vertical: j.vertical,
8842
- "tooltip-class": j.tooltipClass,
8843
- placement: j.placement,
8841
+ vertical: W.vertical,
8842
+ "tooltip-class": W.tooltipClass,
8843
+ placement: W.placement,
8844
8844
  role: "slider",
8845
- "aria-label": j.range || !N(A) ? N(R) : void 0,
8846
- "aria-labelledby": !j.range && N(A) ? (K = N(a)) == null ? void 0 : K.labelId : void 0,
8847
- "aria-valuemin": j.min,
8848
- "aria-valuemax": j.range ? N(Z) : j.max,
8845
+ "aria-label": W.range || !N(A) ? N(R) : void 0,
8846
+ "aria-labelledby": !W.range && N(A) ? (K = N(a)) == null ? void 0 : K.labelId : void 0,
8847
+ "aria-valuemin": W.min,
8848
+ "aria-valuemax": W.range ? N(Z) : W.max,
8849
8849
  "aria-valuenow": N(Y),
8850
8850
  "aria-valuetext": N(b),
8851
- "aria-orientation": j.vertical ? "vertical" : "horizontal",
8851
+ "aria-orientation": W.vertical ? "vertical" : "horizontal",
8852
8852
  "aria-disabled": N(u),
8853
8853
  "onUpdate:modelValue": N(x)
8854
8854
  }, null, 8, ["id", "model-value", "vertical", "tooltip-class", "placement", "aria-label", "aria-labelledby", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-orientation", "aria-disabled", "onUpdate:modelValue"]),
8855
- j.range ? (pe(), Ge(jm, {
8855
+ W.range ? (pe(), Ge(jm, {
8856
8856
  key: 0,
8857
8857
  ref_key: "secondButton",
8858
8858
  ref: d,
8859
8859
  "model-value": N(Z),
8860
- vertical: j.vertical,
8861
- "tooltip-class": j.tooltipClass,
8862
- placement: j.placement,
8860
+ vertical: W.vertical,
8861
+ "tooltip-class": W.tooltipClass,
8862
+ placement: W.placement,
8863
8863
  role: "slider",
8864
8864
  "aria-label": N(I),
8865
8865
  "aria-valuemin": N(Y),
8866
- "aria-valuemax": j.max,
8866
+ "aria-valuemax": W.max,
8867
8867
  "aria-valuenow": N(Z),
8868
8868
  "aria-valuetext": N(D),
8869
- "aria-orientation": j.vertical ? "vertical" : "horizontal",
8869
+ "aria-orientation": W.vertical ? "vertical" : "horizontal",
8870
8870
  "aria-disabled": N(u),
8871
8871
  "onUpdate:modelValue": N(E)
8872
8872
  }, null, 8, ["model-value", "vertical", "tooltip-class", "placement", "aria-label", "aria-valuemin", "aria-valuemax", "aria-valuenow", "aria-valuetext", "aria-orientation", "aria-disabled", "onUpdate:modelValue"])) : Ve("v-if", !0),
8873
- j.showStops ? (pe(), Ee("div", { key: 1 }, [
8873
+ W.showStops ? (pe(), Ee("div", { key: 1 }, [
8874
8874
  (pe(!0), Ee(Ft, null, Gn(N(F), (re, k) => (pe(), Ee("div", {
8875
8875
  key: k,
8876
8876
  class: _e(N(r).e("stop")),
@@ -8892,23 +8892,23 @@ const _3 = Re({
8892
8892
  key: k,
8893
8893
  mark: re.mark,
8894
8894
  style: wt(N(L)(re.position)),
8895
- onMousedown: Et((W) => N(S)(re.position), ["stop"])
8895
+ onMousedown: Et((j) => N(S)(re.position), ["stop"])
8896
8896
  }, null, 8, ["mark", "style", "onMousedown"]))), 128))
8897
8897
  ], 2)
8898
8898
  ], 64)) : Ve("v-if", !0)
8899
8899
  ], 46, ["onMousedown", "onTouchstartPassive"]),
8900
- j.showInput && !j.range ? (pe(), Ge(N(vr), {
8900
+ W.showInput && !W.range ? (pe(), Ge(N(vr), {
8901
8901
  key: 0,
8902
8902
  ref: "input",
8903
8903
  "model-value": N(Y),
8904
8904
  class: _e(N(r).e("input")),
8905
- step: j.step,
8905
+ step: W.step,
8906
8906
  disabled: N(u),
8907
- controls: j.showInputControls,
8908
- min: j.min,
8909
- max: j.max,
8907
+ controls: W.showInputControls,
8908
+ min: W.min,
8909
+ max: W.max,
8910
8910
  precision: N(z),
8911
- debounce: j.debounce,
8911
+ debounce: W.debounce,
8912
8912
  size: N(T),
8913
8913
  "onUpdate:modelValue": N(x),
8914
8914
  onChange: N(v)
@@ -17586,12 +17586,12 @@ function EO(n, e, t, i) {
17586
17586
  if (G !== void 0) {
17587
17587
  const Y = G.normalized, Z = G.itemSize, te = t.get(G);
17588
17588
  if (te === void 0) continue;
17589
- const q = te.buffer, j = te.type, $ = te.bytesPerElement;
17589
+ const q = te.buffer, W = te.type, $ = te.bytesPerElement;
17590
17590
  if (G.isInterleavedBufferAttribute) {
17591
17591
  const X = G.data, K = X.stride, re = G.offset;
17592
- X && X.isInstancedInterleavedBuffer ? (w(z, X.meshPerAttribute), b._maxInstanceCount === void 0 && (b._maxInstanceCount = X.meshPerAttribute * X.count)) : M(z), n.bindBuffer(34962, q), x(z, Z, j, Y, K * $, re * $);
17592
+ X && X.isInstancedInterleavedBuffer ? (w(z, X.meshPerAttribute), b._maxInstanceCount === void 0 && (b._maxInstanceCount = X.meshPerAttribute * X.count)) : M(z), n.bindBuffer(34962, q), x(z, Z, W, Y, K * $, re * $);
17593
17593
  } else
17594
- G.isInstancedBufferAttribute ? (w(z, G.meshPerAttribute), b._maxInstanceCount === void 0 && (b._maxInstanceCount = G.meshPerAttribute * G.count)) : M(z), n.bindBuffer(34962, q), x(z, Z, j, Y, 0, 0);
17594
+ G.isInstancedBufferAttribute ? (w(z, G.meshPerAttribute), b._maxInstanceCount === void 0 && (b._maxInstanceCount = G.meshPerAttribute * G.count)) : M(z), n.bindBuffer(34962, q), x(z, Z, W, Y, 0, 0);
17595
17595
  } else if (U === "instanceMatrix") {
17596
17596
  const Y = t.get(T.instanceMatrix);
17597
17597
  if (Y === void 0) continue;
@@ -19752,7 +19752,7 @@ function iN(n, e, t) {
19752
19752
  return Fe;
19753
19753
  }
19754
19754
  const Y = {};
19755
- Y[3553] = G(3553, 3553, 1), Y[34067] = G(34067, 34069, 6), a.setClear(0, 0, 0, 1), c.setClear(1), l.setClear(0), Z(2929), c.setFunc(Xc), W(!1), oe(ld), Z(2884), re(nr);
19755
+ Y[3553] = G(3553, 3553, 1), Y[34067] = G(34067, 34069, 6), a.setClear(0, 0, 0, 1), c.setClear(1), l.setClear(0), Z(2929), c.setFunc(Xc), j(!1), oe(ld), Z(2884), re(nr);
19756
19756
  function Z(ne) {
19757
19757
  d[ne] !== !0 && (n.enable(ne), d[ne] = !0);
19758
19758
  }
@@ -19762,7 +19762,7 @@ function iN(n, e, t) {
19762
19762
  function q(ne) {
19763
19763
  ne !== u && (n.bindFramebuffer(36160, ne), u = ne);
19764
19764
  }
19765
- function j(ne, me) {
19765
+ function W(ne, me) {
19766
19766
  return me === null && u !== null && (me = u), f[ne] !== me ? (n.bindFramebuffer(ne, me), f[ne] = me, i && (ne === 36009 && (f[36160] = me), ne === 36160 && (f[36009] = me)), !0) : !1;
19767
19767
  }
19768
19768
  function $(ne) {
@@ -19844,11 +19844,11 @@ function iN(n, e, t) {
19844
19844
  function k(ne, me) {
19845
19845
  ne.side === Xr ? te(2884) : Z(2884);
19846
19846
  let Me = ne.side === Wt;
19847
- me && (Me = !Me), W(Me), ne.blending === xo && ne.transparent === !1 ? re(nr) : re(ne.blending, ne.blendEquation, ne.blendSrc, ne.blendDst, ne.blendEquationAlpha, ne.blendSrcAlpha, ne.blendDstAlpha, ne.premultipliedAlpha), c.setFunc(ne.depthFunc), c.setTest(ne.depthTest), c.setMask(ne.depthWrite), a.setMask(ne.colorWrite);
19847
+ me && (Me = !Me), j(Me), ne.blending === xo && ne.transparent === !1 ? re(nr) : re(ne.blending, ne.blendEquation, ne.blendSrc, ne.blendDst, ne.blendEquationAlpha, ne.blendSrcAlpha, ne.blendDstAlpha, ne.premultipliedAlpha), c.setFunc(ne.depthFunc), c.setTest(ne.depthTest), c.setMask(ne.depthWrite), a.setMask(ne.colorWrite);
19848
19848
  const Ne = ne.stencilWrite;
19849
19849
  l.setTest(Ne), Ne && (l.setMask(ne.stencilWriteMask), l.setFunc(ne.stencilFunc, ne.stencilRef, ne.stencilFuncMask), l.setOp(ne.stencilFail, ne.stencilZFail, ne.stencilZPass)), ce(ne.polygonOffset, ne.polygonOffsetFactor, ne.polygonOffsetUnits), ne.alphaToCoverage === !0 ? Z(32926) : te(32926);
19850
19850
  }
19851
- function W(ne) {
19851
+ function j(ne) {
19852
19852
  E !== ne && (ne ? n.frontFace(2304) : n.frontFace(2305), E = ne);
19853
19853
  }
19854
19854
  function oe(ne) {
@@ -19913,12 +19913,12 @@ function iN(n, e, t) {
19913
19913
  },
19914
19914
  enable: Z,
19915
19915
  disable: te,
19916
- bindFramebuffer: j,
19916
+ bindFramebuffer: W,
19917
19917
  bindXRFramebuffer: q,
19918
19918
  useProgram: $,
19919
19919
  setBlending: re,
19920
19920
  setMaterial: k,
19921
- setFlipSided: W,
19921
+ setFlipSided: j,
19922
19922
  setCullFace: oe,
19923
19923
  setLineWidth: le,
19924
19924
  setPolygonOffset: ce,
@@ -20195,7 +20195,7 @@ function rN(n, e, t, i, r, s, o) {
20195
20195
  else
20196
20196
  throw new Error("Unknown depthTexture format");
20197
20197
  }
20198
- function j(H) {
20198
+ function W(H) {
20199
20199
  const V = i.get(H), B = H.isWebGLCubeRenderTarget === !0;
20200
20200
  if (H.depthTexture) {
20201
20201
  if (B) throw new Error("target.depthTexture not supported in Cube render targets");
@@ -20248,7 +20248,7 @@ function rN(n, e, t, i, r, s, o) {
20248
20248
  let Ae = 3553;
20249
20249
  we && (a ? Ae = V.isDataTexture3D ? 32879 : 35866 : console.warn("THREE.DataTexture3D and THREE.DataTexture2DArray only supported with WebGL2.")), t.bindTexture(Ae, Q.__webglTexture), U(Ae, V, fe), Z(B.__webglFramebuffer, H, V, 36064, Ae), M(V, fe) && w(Ae, V, H.width, H.height, H.depth), t.bindTexture(Ae, null);
20250
20250
  }
20251
- H.depthBuffer && j(H);
20251
+ H.depthBuffer && W(H);
20252
20252
  }
20253
20253
  function X(H) {
20254
20254
  const V = v(H) || a, B = H.isWebGLMultipleRenderTargets === !0 ? H.texture : [H.texture];
@@ -20278,9 +20278,9 @@ function rN(n, e, t, i, r, s, o) {
20278
20278
  const V = o.render.frame;
20279
20279
  f.get(H) !== V && (f.set(H, V), H.update());
20280
20280
  }
20281
- let W = !1, oe = !1;
20281
+ let j = !1, oe = !1;
20282
20282
  function le(H, V) {
20283
- H && H.isWebGLRenderTarget && (W === !1 && (console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."), W = !0), H = H.texture), C(H, V);
20283
+ H && H.isWebGLRenderTarget && (j === !1 && (console.warn("THREE.WebGLTextures.safeSetTexture2D: don't use render targets as textures. Use their .texture property instead."), j = !0), H = H.texture), C(H, V);
20284
20284
  }
20285
20285
  function ce(H, V) {
20286
20286
  H && H.isWebGLCubeRenderTarget && (oe === !1 && (console.warn("THREE.WebGLTextures.safeSetTextureCube: don't use cube render targets as textures. Use their .texture property instead."), oe = !0), H = H.texture), I(H, V);
@@ -20490,10 +20490,10 @@ class oN extends es {
20490
20490
  const F = new ee(), L = new ee();
20491
20491
  function P(R, b, I) {
20492
20492
  F.setFromMatrixPosition(b.matrixWorld), L.setFromMatrixPosition(I.matrixWorld);
20493
- const D = F.distanceTo(L), O = b.projectionMatrix.elements, U = I.projectionMatrix.elements, z = O[14] / (O[10] - 1), G = O[14] / (O[10] + 1), Y = (O[9] + 1) / O[5], Z = (O[9] - 1) / O[5], te = (O[8] - 1) / O[0], q = (U[8] + 1) / U[0], j = z * te, $ = z * q, X = D / (-te + q), K = X * -te;
20493
+ const D = F.distanceTo(L), O = b.projectionMatrix.elements, U = I.projectionMatrix.elements, z = O[14] / (O[10] - 1), G = O[14] / (O[10] + 1), Y = (O[9] + 1) / O[5], Z = (O[9] - 1) / O[5], te = (O[8] - 1) / O[0], q = (U[8] + 1) / U[0], W = z * te, $ = z * q, X = D / (-te + q), K = X * -te;
20494
20494
  b.matrixWorld.decompose(R.position, R.quaternion, R.scale), R.translateX(K), R.translateZ(X), R.matrixWorld.compose(R.position, R.quaternion, R.scale), R.matrixWorldInverse.copy(R.matrixWorld).invert();
20495
- const re = z + X, k = G + X, W = j - K, oe = $ + (D - K), le = Y * G / k * re, ce = Z * G / k * re;
20496
- R.projectionMatrix.makePerspective(W, oe, le, ce, re, k);
20495
+ const re = z + X, k = G + X, j = W - K, oe = $ + (D - K), le = Y * G / k * re, ce = Z * G / k * re;
20496
+ R.projectionMatrix.makePerspective(j, oe, le, ce, re, k);
20497
20497
  }
20498
20498
  function A(R, b) {
20499
20499
  b === null ? R.matrixWorld.copy(R.matrix) : R.matrixWorld.multiplyMatrices(b.matrixWorld, R.matrix), R.matrixWorldInverse.copy(R.matrixWorld).invert();
@@ -20647,7 +20647,7 @@ function St(n = {}) {
20647
20647
  return M === null ? A : 1;
20648
20648
  }
20649
20649
  let q = t;
20650
- function j(J, ye) {
20650
+ function W(J, ye) {
20651
20651
  for (let ve = 0; ve < J.length; ve++) {
20652
20652
  const be = J[ve], Le = e.getContext(be, ye);
20653
20653
  if (Le !== null) return Le;
@@ -20667,8 +20667,8 @@ function St(n = {}) {
20667
20667
  };
20668
20668
  if (e.addEventListener("webglcontextlost", je, !1), e.addEventListener("webglcontextrestored", ct, !1), q === null) {
20669
20669
  const ye = ["webgl2", "webgl", "experimental-webgl"];
20670
- if (h.isWebGL1Renderer === !0 && ye.shift(), q = j(ye, J), q === null)
20671
- throw j(ye) ? new Error("Error creating WebGL context with your selected attributes.") : new Error("Error creating WebGL context.");
20670
+ if (h.isWebGL1Renderer === !0 && ye.shift(), q = W(ye, J), q === null)
20671
+ throw W(ye) ? new Error("Error creating WebGL context with your selected attributes.") : new Error("Error creating WebGL context.");
20672
20672
  }
20673
20673
  q.getShaderPrecisionFormat === void 0 && (q.getShaderPrecisionFormat = function() {
20674
20674
  return { rangeMin: 1, rangeMax: 1, precision: 1 };
@@ -20676,9 +20676,9 @@ function St(n = {}) {
20676
20676
  } catch (J) {
20677
20677
  throw console.error("THREE.WebGLRenderer: " + J.message), J;
20678
20678
  }
20679
- let $, X, K, re, k, W, oe, le, ce, H, V, B, Q, ie, he, xe, we, fe, Ae, ne, me, Me;
20679
+ let $, X, K, re, k, j, oe, le, ce, H, V, B, Q, ie, he, xe, we, fe, Ae, ne, me, Me;
20680
20680
  function Ne() {
20681
- $ = new PO(q), X = new LO(q, $, n), $.init(X), me = new Dx(q, $, X), K = new iN(q, $, X), I[0] = 1029, re = new DO(), k = new $D(), W = new rN(q, $, K, k, X, me, re), oe = new FO(h), le = new rP(q, X), Me = new EO(q, $, le, X), ce = new IO(q, le, re, Me), H = new kO(q, ce, le, re), fe = new UO(q), he = new RO(k), V = new jD(h, oe, $, X, Me, he), B = new aN(k), Q = new XD(k), ie = new eN($, X), we = new TO(h, oe, K, H, a), xe = new Ox(h, H, X), Ae = new CO(q, $, re, X), ne = new OO(q, $, re, X), re.programs = V.programs, h.capabilities = X, h.extensions = $, h.properties = k, h.renderLists = Q, h.shadowMap = xe, h.state = K, h.info = re;
20681
+ $ = new PO(q), X = new LO(q, $, n), $.init(X), me = new Dx(q, $, X), K = new iN(q, $, X), I[0] = 1029, re = new DO(), k = new $D(), j = new rN(q, $, K, k, X, me, re), oe = new FO(h), le = new rP(q, X), Me = new EO(q, $, le, X), ce = new IO(q, le, re, Me), H = new kO(q, ce, le, re), fe = new UO(q), he = new RO(k), V = new jD(h, oe, $, X, Me, he), B = new aN(k), Q = new XD(k), ie = new eN($, X), we = new TO(h, oe, K, H, a), xe = new Ox(h, H, X), Ae = new CO(q, $, re, X), ne = new OO(q, $, re, X), re.programs = V.programs, h.capabilities = X, h.extensions = $, h.properties = k, h.renderLists = Q, h.shadowMap = xe, h.state = K, h.info = re;
20682
20682
  }
20683
20683
  Ne();
20684
20684
  const Fe = new oN(h, q);
@@ -20846,7 +20846,7 @@ function St(n = {}) {
20846
20846
  const ve = f.state.shadowsArray;
20847
20847
  xe.render(ve, J, ye), f.setupLights(), f.setupLightsView(ye), O === !0 && he.endShadows(), this.info.autoReset === !0 && this.info.reset(), we.render(u, J);
20848
20848
  const be = u.opaque, Le = u.transmissive, ge = u.transparent;
20849
- be.length > 0 && bi(be, J, ye), Le.length > 0 && Gi(be, Le, J, ye), ge.length > 0 && bi(ge, J, ye), M !== null && (W.updateMultisampleRenderTarget(M), W.updateRenderTargetMipmap(M)), J.isScene === !0 && J.onAfterRender(h, J, ye), K.buffers.depth.setTest(!0), K.buffers.depth.setMask(!0), K.buffers.color.setMask(!0), K.setPolygonOffset(!1), Me.resetDefaultState(), w = -1, S = null, p.pop(), p.length > 0 ? f = p[p.length - 1] : f = null, m.pop(), m.length > 0 ? u = m[m.length - 1] : u = null;
20849
+ be.length > 0 && bi(be, J, ye), Le.length > 0 && Gi(be, Le, J, ye), ge.length > 0 && bi(ge, J, ye), M !== null && (j.updateMultisampleRenderTarget(M), j.updateRenderTargetMipmap(M)), J.isScene === !0 && J.onAfterRender(h, J, ye), K.buffers.depth.setTest(!0), K.buffers.depth.setMask(!0), K.buffers.color.setMask(!0), K.setPolygonOffset(!1), Me.resetDefaultState(), w = -1, S = null, p.pop(), p.length > 0 ? f = p[p.length - 1] : f = null, m.pop(), m.length > 0 ? u = m[m.length - 1] : u = null;
20850
20850
  };
20851
20851
  function yi(J, ye, ve, be) {
20852
20852
  if (J.visible === !1) return;
@@ -20896,7 +20896,7 @@ function St(n = {}) {
20896
20896
  const Le = h.getRenderTarget();
20897
20897
  h.setRenderTarget(z), h.clear();
20898
20898
  const ge = h.toneMapping;
20899
- h.toneMapping = Ur, bi(J, ve, be), h.toneMapping = ge, W.updateMultisampleRenderTarget(z), W.updateRenderTargetMipmap(z), h.setRenderTarget(Le), bi(ye, ve, be);
20899
+ h.toneMapping = Ur, bi(J, ve, be), h.toneMapping = ge, j.updateMultisampleRenderTarget(z), j.updateRenderTargetMipmap(z), h.setRenderTarget(Le), bi(ye, ve, be);
20900
20900
  }
20901
20901
  function bi(J, ye, ve) {
20902
20902
  const be = ye.isScene === !0 ? ye.overrideMaterial : null;
@@ -20941,7 +20941,7 @@ function St(n = {}) {
20941
20941
  ve.outputEncoding = ye.outputEncoding, ve.instancing = ye.instancing, ve.skinning = ye.skinning, ve.numClippingPlanes = ye.numClippingPlanes, ve.numIntersection = ye.numClipIntersection, ve.vertexAlphas = ye.vertexAlphas;
20942
20942
  }
20943
20943
  function Te(J, ye, ve, be) {
20944
- ye.isScene !== !0 && (ye = Z), W.resetTextureUnits();
20944
+ ye.isScene !== !0 && (ye = Z), j.resetTextureUnits();
20945
20945
  const Le = ye.fog, ge = ve.isMeshStandardMaterial ? ye.environment : null, Se = M === null ? h.outputEncoding : M.texture.encoding, Ie = oe.get(ve.envMap || ge), ze = ve.vertexColors === !0 && be.geometry && be.geometry.attributes.color && be.geometry.attributes.color.itemSize === 4, Ze = k.get(ve), st = f.state.lights;
20946
20946
  if (O === !0 && (U === !0 || J !== S)) {
20947
20947
  const wn = J === S && ve.id === w;
@@ -20970,9 +20970,9 @@ function St(n = {}) {
20970
20970
  if (be.isSkinnedMesh) {
20971
20971
  Ct.setOptional(q, be, "bindMatrix"), Ct.setOptional(q, be, "bindMatrixInverse");
20972
20972
  const wn = be.skeleton;
20973
- wn && (X.floatVertexTextures ? (wn.boneTexture === null && wn.computeBoneTexture(), Ct.setValue(q, "boneTexture", wn.boneTexture, W), Ct.setValue(q, "boneTextureSize", wn.boneTextureSize)) : Ct.setOptional(q, wn, "boneMatrices"));
20973
+ wn && (X.floatVertexTextures ? (wn.boneTexture === null && wn.computeBoneTexture(), Ct.setValue(q, "boneTexture", wn.boneTexture, j), Ct.setValue(q, "boneTextureSize", wn.boneTextureSize)) : Ct.setOptional(q, wn, "boneMatrices"));
20974
20974
  }
20975
- return (un || Ze.receiveShadow !== be.receiveShadow) && (Ze.receiveShadow = be.receiveShadow, Ct.setValue(q, "receiveShadow", be.receiveShadow)), un && (Ct.setValue(q, "toneMappingExposure", h.toneMappingExposure), Ze.needsLights && De(os, ss), Le && ve.fog && B.refreshFogUniforms(os, Le), B.refreshMaterialUniforms(os, ve, A, P, z), kr.upload(q, Ze.uniformsList, os, W)), ve.isShaderMaterial && ve.uniformsNeedUpdate === !0 && (kr.upload(q, Ze.uniformsList, os, W), ve.uniformsNeedUpdate = !1), ve.isSpriteMaterial && Ct.setValue(q, "center", be.center), Ct.setValue(q, "modelViewMatrix", be.modelViewMatrix), Ct.setValue(q, "normalMatrix", be.normalMatrix), Ct.setValue(q, "modelMatrix", be.matrixWorld), ft;
20975
+ return (un || Ze.receiveShadow !== be.receiveShadow) && (Ze.receiveShadow = be.receiveShadow, Ct.setValue(q, "receiveShadow", be.receiveShadow)), un && (Ct.setValue(q, "toneMappingExposure", h.toneMappingExposure), Ze.needsLights && De(os, ss), Le && ve.fog && B.refreshFogUniforms(os, Le), B.refreshMaterialUniforms(os, ve, A, P, z), kr.upload(q, Ze.uniformsList, os, j)), ve.isShaderMaterial && ve.uniformsNeedUpdate === !0 && (kr.upload(q, Ze.uniformsList, os, j), ve.uniformsNeedUpdate = !1), ve.isSpriteMaterial && Ct.setValue(q, "center", be.center), Ct.setValue(q, "modelViewMatrix", be.modelViewMatrix), Ct.setValue(q, "normalMatrix", be.normalMatrix), Ct.setValue(q, "modelMatrix", be.matrixWorld), ft;
20976
20976
  }
20977
20977
  function De(J, ye) {
20978
20978
  J.ambientLightColor.needsUpdate = ye, J.lightProbe.needsUpdate = ye, J.directionalLights.needsUpdate = ye, J.directionalLightShadows.needsUpdate = ye, J.pointLights.needsUpdate = ye, J.pointLightShadows.needsUpdate = ye, J.spotLights.needsUpdate = ye, J.spotLightShadows.needsUpdate = ye, J.rectAreaLights.needsUpdate = ye, J.hemisphereLights.needsUpdate = ye;
@@ -20987,7 +20987,7 @@ function St(n = {}) {
20987
20987
  }, this.getRenderTarget = function() {
20988
20988
  return M;
20989
20989
  }, this.setRenderTarget = function(J, ye = 0, ve = 0) {
20990
- M = J, v = ye, g = ve, J && k.get(J).__webglFramebuffer === void 0 && W.setupRenderTarget(J);
20990
+ M = J, v = ye, g = ve, J && k.get(J).__webglFramebuffer === void 0 && j.setupRenderTarget(J);
20991
20991
  let be = null, Le = !1, ge = !1;
20992
20992
  if (J) {
20993
20993
  const Ie = J.texture;
@@ -21049,10 +21049,10 @@ function St(n = {}) {
21049
21049
  }, this.copyFramebufferToTexture = function(J, ye, ve = 0) {
21050
21050
  const be = Math.pow(2, -ve), Le = Math.floor(ye.image.width * be), ge = Math.floor(ye.image.height * be);
21051
21051
  let Se = me.convert(ye.format);
21052
- X.isWebGL2 && (Se === 6407 && (Se = 32849), Se === 6408 && (Se = 32856)), W.setTexture2D(ye, 0), q.copyTexImage2D(3553, ve, Se, J.x, J.y, Le, ge, 0), K.unbindTexture();
21052
+ X.isWebGL2 && (Se === 6407 && (Se = 32849), Se === 6408 && (Se = 32856)), j.setTexture2D(ye, 0), q.copyTexImage2D(3553, ve, Se, J.x, J.y, Le, ge, 0), K.unbindTexture();
21053
21053
  }, this.copyTextureToTexture = function(J, ye, ve, be = 0) {
21054
21054
  const Le = ye.image.width, ge = ye.image.height, Se = me.convert(ve.format), Ie = me.convert(ve.type);
21055
- W.setTexture2D(ve, 0), q.pixelStorei(37440, ve.flipY), q.pixelStorei(37441, ve.premultiplyAlpha), q.pixelStorei(3317, ve.unpackAlignment), ye.isDataTexture ? q.texSubImage2D(3553, be, J.x, J.y, Le, ge, Se, Ie, ye.image.data) : ye.isCompressedTexture ? q.compressedTexSubImage2D(3553, be, J.x, J.y, ye.mipmaps[0].width, ye.mipmaps[0].height, Se, ye.mipmaps[0].data) : q.texSubImage2D(3553, be, J.x, J.y, Se, Ie, ye.image), be === 0 && ve.generateMipmaps && q.generateMipmap(3553), K.unbindTexture();
21055
+ j.setTexture2D(ve, 0), q.pixelStorei(37440, ve.flipY), q.pixelStorei(37441, ve.premultiplyAlpha), q.pixelStorei(3317, ve.unpackAlignment), ye.isDataTexture ? q.texSubImage2D(3553, be, J.x, J.y, Le, ge, Se, Ie, ye.image.data) : ye.isCompressedTexture ? q.compressedTexSubImage2D(3553, be, J.x, J.y, ye.mipmaps[0].width, ye.mipmaps[0].height, Se, ye.mipmaps[0].data) : q.texSubImage2D(3553, be, J.x, J.y, Se, Ie, ye.image), be === 0 && ve.generateMipmaps && q.generateMipmap(3553), K.unbindTexture();
21056
21056
  }, this.copyTextureToTexture3D = function(J, ye, ve, be, Le = 0) {
21057
21057
  if (h.isWebGL1Renderer) {
21058
21058
  console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");
@@ -21061,9 +21061,9 @@ function St(n = {}) {
21061
21061
  const ge = J.max.x - J.min.x + 1, Se = J.max.y - J.min.y + 1, Ie = J.max.z - J.min.z + 1, ze = me.convert(be.format), Ze = me.convert(be.type);
21062
21062
  let st;
21063
21063
  if (be.isDataTexture3D)
21064
- W.setTexture3D(be, 0), st = 32879;
21064
+ j.setTexture3D(be, 0), st = 32879;
21065
21065
  else if (be.isDataTexture2DArray)
21066
- W.setTexture2DArray(be, 0), st = 35866;
21066
+ j.setTexture2DArray(be, 0), st = 35866;
21067
21067
  else {
21068
21068
  console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");
21069
21069
  return;
@@ -21072,7 +21072,7 @@ function St(n = {}) {
21072
21072
  const Qe = q.getParameter(3314), ft = q.getParameter(32878), zt = q.getParameter(3316), un = q.getParameter(3315), ss = q.getParameter(32877), Ct = ve.isCompressedTexture ? ve.mipmaps[0] : ve.image;
21073
21073
  q.pixelStorei(3314, Ct.width), q.pixelStorei(32878, Ct.height), q.pixelStorei(3316, J.min.x), q.pixelStorei(3315, J.min.y), q.pixelStorei(32877, J.min.z), ve.isDataTexture || ve.isDataTexture3D ? q.texSubImage3D(st, Le, ye.x, ye.y, ye.z, ge, Se, Ie, ze, Ze, Ct.data) : ve.isCompressedTexture ? (console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."), q.compressedTexSubImage3D(st, Le, ye.x, ye.y, ye.z, ge, Se, Ie, ze, Ct.data)) : q.texSubImage3D(st, Le, ye.x, ye.y, ye.z, ge, Se, Ie, ze, Ze, Ct), q.pixelStorei(3314, Qe), q.pixelStorei(32878, ft), q.pixelStorei(3316, zt), q.pixelStorei(3315, un), q.pixelStorei(32877, ss), Le === 0 && be.generateMipmaps && q.generateMipmap(st), K.unbindTexture();
21074
21074
  }, this.initTexture = function(J) {
21075
- W.setTexture2D(J, 0), K.unbindTexture();
21075
+ j.setTexture2D(J, 0), K.unbindTexture();
21076
21076
  }, this.resetState = function() {
21077
21077
  v = 0, g = 0, M = null, K.reset(), Me.reset();
21078
21078
  }, typeof __THREE_DEVTOOLS__ < "u" && __THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe", { detail: this }));
@@ -22999,25 +22999,25 @@ class pi extends Ke {
22999
22999
  const A = L.holes;
23000
23000
  if (!Ri.isClockWise(P)) {
23001
23001
  P = P.reverse();
23002
- for (let k = 0, W = A.length; k < W; k++) {
23002
+ for (let k = 0, j = A.length; k < j; k++) {
23003
23003
  const oe = A[k];
23004
23004
  Ri.isClockWise(oe) && (A[k] = oe.reverse());
23005
23005
  }
23006
23006
  }
23007
23007
  const T = Ri.triangulateShape(P, A), C = P;
23008
- for (let k = 0, W = A.length; k < W; k++) {
23008
+ for (let k = 0, j = A.length; k < j; k++) {
23009
23009
  const oe = A[k];
23010
23010
  P = P.concat(oe);
23011
23011
  }
23012
- function R(k, W, oe) {
23013
- return W || console.error("THREE.ExtrudeGeometry: vec does not exist"), W.clone().multiplyScalar(oe).add(k);
23012
+ function R(k, j, oe) {
23013
+ return j || console.error("THREE.ExtrudeGeometry: vec does not exist"), j.clone().multiplyScalar(oe).add(k);
23014
23014
  }
23015
23015
  const b = P.length, I = T.length;
23016
- function D(k, W, oe) {
23016
+ function D(k, j, oe) {
23017
23017
  let le, ce, H;
23018
- const V = k.x - W.x, B = k.y - W.y, Q = oe.x - k.x, ie = oe.y - k.y, he = V * V + B * B, xe = V * ie - B * Q;
23018
+ const V = k.x - j.x, B = k.y - j.y, Q = oe.x - k.x, ie = oe.y - k.y, he = V * V + B * B, xe = V * ie - B * Q;
23019
23019
  if (Math.abs(xe) > Number.EPSILON) {
23020
- const we = Math.sqrt(he), fe = Math.sqrt(Q * Q + ie * ie), Ae = W.x - B / we, ne = W.y + V / we, me = oe.x - ie / fe, Me = oe.y + Q / fe, Ne = ((me - Ae) * ie - (Me - ne) * Q) / (V * ie - B * Q);
23020
+ const we = Math.sqrt(he), fe = Math.sqrt(Q * Q + ie * ie), Ae = j.x - B / we, ne = j.y + V / we, me = oe.x - ie / fe, Me = oe.y + Q / fe, Ne = ((me - Ae) * ie - (Me - ne) * Q) / (V * ie - B * Q);
23021
23021
  le = Ae + V * Ne - k.x, ce = ne + B * Ne - k.y;
23022
23022
  const Fe = le * le + ce * ce;
23023
23023
  if (Fe <= 2)
@@ -23030,11 +23030,11 @@ class pi extends Ke {
23030
23030
  return new Pe(le / H, ce / H);
23031
23031
  }
23032
23032
  const O = [];
23033
- for (let k = 0, W = C.length, oe = W - 1, le = k + 1; k < W; k++, oe++, le++)
23034
- oe === W && (oe = 0), le === W && (le = 0), O[k] = D(C[k], C[oe], C[le]);
23033
+ for (let k = 0, j = C.length, oe = j - 1, le = k + 1; k < j; k++, oe++, le++)
23034
+ oe === j && (oe = 0), le === j && (le = 0), O[k] = D(C[k], C[oe], C[le]);
23035
23035
  const U = [];
23036
23036
  let z, G = O.concat();
23037
- for (let k = 0, W = A.length; k < W; k++) {
23037
+ for (let k = 0, j = A.length; k < j; k++) {
23038
23038
  const oe = A[k];
23039
23039
  z = [];
23040
23040
  for (let le = 0, ce = oe.length, H = ce - 1, V = le + 1; le < ce; le++, H++, V++)
@@ -23042,42 +23042,42 @@ class pi extends Ke {
23042
23042
  U.push(z), G = G.concat(z);
23043
23043
  }
23044
23044
  for (let k = 0; k < y; k++) {
23045
- const W = k / y, oe = m * Math.cos(W * Math.PI / 2), le = p * Math.sin(W * Math.PI / 2) + h;
23045
+ const j = k / y, oe = m * Math.cos(j * Math.PI / 2), le = p * Math.sin(j * Math.PI / 2) + h;
23046
23046
  for (let ce = 0, H = C.length; ce < H; ce++) {
23047
23047
  const V = R(C[ce], O[ce], le);
23048
- j(V.x, V.y, -oe);
23048
+ W(V.x, V.y, -oe);
23049
23049
  }
23050
23050
  for (let ce = 0, H = A.length; ce < H; ce++) {
23051
23051
  const V = A[ce];
23052
23052
  z = U[ce];
23053
23053
  for (let B = 0, Q = V.length; B < Q; B++) {
23054
23054
  const ie = R(V[B], z[B], le);
23055
- j(ie.x, ie.y, -oe);
23055
+ W(ie.x, ie.y, -oe);
23056
23056
  }
23057
23057
  }
23058
23058
  }
23059
23059
  const Y = p + h;
23060
23060
  for (let k = 0; k < b; k++) {
23061
- const W = f ? R(P[k], G[k], Y) : P[k];
23062
- w ? (E.copy(S.normals[0]).multiplyScalar(W.x), x.copy(S.binormals[0]).multiplyScalar(W.y), F.copy(M[0]).add(E).add(x), j(F.x, F.y, F.z)) : j(W.x, W.y, 0);
23061
+ const j = f ? R(P[k], G[k], Y) : P[k];
23062
+ w ? (E.copy(S.normals[0]).multiplyScalar(j.x), x.copy(S.binormals[0]).multiplyScalar(j.y), F.copy(M[0]).add(E).add(x), W(F.x, F.y, F.z)) : W(j.x, j.y, 0);
23063
23063
  }
23064
23064
  for (let k = 1; k <= d; k++)
23065
- for (let W = 0; W < b; W++) {
23066
- const oe = f ? R(P[W], G[W], Y) : P[W];
23067
- w ? (E.copy(S.normals[k]).multiplyScalar(oe.x), x.copy(S.binormals[k]).multiplyScalar(oe.y), F.copy(M[k]).add(E).add(x), j(F.x, F.y, F.z)) : j(oe.x, oe.y, u / d * k);
23065
+ for (let j = 0; j < b; j++) {
23066
+ const oe = f ? R(P[j], G[j], Y) : P[j];
23067
+ w ? (E.copy(S.normals[k]).multiplyScalar(oe.x), x.copy(S.binormals[k]).multiplyScalar(oe.y), F.copy(M[k]).add(E).add(x), W(F.x, F.y, F.z)) : W(oe.x, oe.y, u / d * k);
23068
23068
  }
23069
23069
  for (let k = y - 1; k >= 0; k--) {
23070
- const W = k / y, oe = m * Math.cos(W * Math.PI / 2), le = p * Math.sin(W * Math.PI / 2) + h;
23070
+ const j = k / y, oe = m * Math.cos(j * Math.PI / 2), le = p * Math.sin(j * Math.PI / 2) + h;
23071
23071
  for (let ce = 0, H = C.length; ce < H; ce++) {
23072
23072
  const V = R(C[ce], O[ce], le);
23073
- j(V.x, V.y, u + oe);
23073
+ W(V.x, V.y, u + oe);
23074
23074
  }
23075
23075
  for (let ce = 0, H = A.length; ce < H; ce++) {
23076
23076
  const V = A[ce];
23077
23077
  z = U[ce];
23078
23078
  for (let B = 0, Q = V.length; B < Q; B++) {
23079
23079
  const ie = R(V[B], z[B], le);
23080
- w ? j(ie.x, ie.y + M[d - 1].y, M[d - 1].x + oe) : j(ie.x, ie.y, u + oe);
23080
+ w ? W(ie.x, ie.y + M[d - 1].y, M[d - 1].x + oe) : W(ie.x, ie.y, u + oe);
23081
23081
  }
23082
23082
  }
23083
23083
  }
@@ -23085,23 +23085,23 @@ class pi extends Ke {
23085
23085
  function Z() {
23086
23086
  const k = r.length / 3;
23087
23087
  if (f) {
23088
- let W = 0, oe = b * W;
23088
+ let j = 0, oe = b * j;
23089
23089
  for (let le = 0; le < I; le++) {
23090
23090
  const ce = T[le];
23091
23091
  $(ce[2] + oe, ce[1] + oe, ce[0] + oe);
23092
23092
  }
23093
- W = d + y * 2, oe = b * W;
23093
+ j = d + y * 2, oe = b * j;
23094
23094
  for (let le = 0; le < I; le++) {
23095
23095
  const ce = T[le];
23096
23096
  $(ce[0] + oe, ce[1] + oe, ce[2] + oe);
23097
23097
  }
23098
23098
  } else {
23099
- for (let W = 0; W < I; W++) {
23100
- const oe = T[W];
23099
+ for (let j = 0; j < I; j++) {
23100
+ const oe = T[j];
23101
23101
  $(oe[2], oe[1], oe[0]);
23102
23102
  }
23103
- for (let W = 0; W < I; W++) {
23104
- const oe = T[W];
23103
+ for (let j = 0; j < I; j++) {
23104
+ const oe = T[j];
23105
23105
  $(oe[0] + b * d, oe[1] + b * d, oe[2] + b * d);
23106
23106
  }
23107
23107
  }
@@ -23109,36 +23109,36 @@ class pi extends Ke {
23109
23109
  }
23110
23110
  function te() {
23111
23111
  const k = r.length / 3;
23112
- let W = 0;
23113
- q(C, W), W += C.length;
23112
+ let j = 0;
23113
+ q(C, j), j += C.length;
23114
23114
  for (let oe = 0, le = A.length; oe < le; oe++) {
23115
23115
  const ce = A[oe];
23116
- q(ce, W), W += ce.length;
23116
+ q(ce, j), j += ce.length;
23117
23117
  }
23118
23118
  i.addGroup(k, r.length / 3 - k, 1);
23119
23119
  }
23120
- function q(k, W) {
23120
+ function q(k, j) {
23121
23121
  let oe = k.length;
23122
23122
  for (; --oe >= 0; ) {
23123
23123
  const le = oe;
23124
23124
  let ce = oe - 1;
23125
23125
  ce < 0 && (ce = k.length - 1);
23126
23126
  for (let H = 0, V = d + y * 2; H < V; H++) {
23127
- const B = b * H, Q = b * (H + 1), ie = W + le + B, he = W + ce + B, xe = W + ce + Q, we = W + le + Q;
23127
+ const B = b * H, Q = b * (H + 1), ie = j + le + B, he = j + ce + B, xe = j + ce + Q, we = j + le + Q;
23128
23128
  X(ie, he, xe, we);
23129
23129
  }
23130
23130
  }
23131
23131
  }
23132
- function j(k, W, oe) {
23133
- c.push(k), c.push(W), c.push(oe);
23132
+ function W(k, j, oe) {
23133
+ c.push(k), c.push(j), c.push(oe);
23134
23134
  }
23135
- function $(k, W, oe) {
23136
- K(k), K(W), K(oe);
23135
+ function $(k, j, oe) {
23136
+ K(k), K(j), K(oe);
23137
23137
  const le = r.length / 3, ce = g.generateTopUV(i, r, le - 3, le - 2, le - 1);
23138
23138
  re(ce[0]), re(ce[1]), re(ce[2]);
23139
23139
  }
23140
- function X(k, W, oe, le) {
23141
- K(k), K(W), K(le), K(W), K(oe), K(le);
23140
+ function X(k, j, oe, le) {
23141
+ K(k), K(j), K(le), K(j), K(oe), K(le);
23142
23142
  const ce = r.length / 3, H = g.generateSideWallUV(i, r, ce - 6, ce - 3, ce - 2, ce - 1);
23143
23143
  re(H[0]), re(H[1]), re(H[3]), re(H[1]), re(H[2]), re(H[3]);
23144
23144
  }
@@ -32283,7 +32283,7 @@ const a5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
32283
32283
  /* 2 */
32284
32284
  /***/
32285
32285
  (o) => {
32286
- o.exports = /* @__PURE__ */ JSON.parse('{"name":"zincjs","version":"1.18.4","description":"ZincJS (Web-based-Zinc-Visualisation)","main":"build/zinc.js","directories":{"doc":"docs"},"files":["package.json","LICENSE","README.md","src/*","build/zinc.js","build/zinc.frontend.js","build/zinc.js.map","webpack.config.js"],"scripts":{"build-bundle":"webpack --config webpack.frontend.js; webpack --config webpack.backend.js","build-backend":"webpack --config webpack.backend.js","test":"npm --prefix ./test install && npm --prefix ./test run test-ci","changelog":"auto-changelog -p --output CHANGELOG.md --template keepachangelog","jsdoc":"jsdoc -c jsdoc_conf.json","version":"npm run build-bundle;npm run jsdoc;npm run changelog; git add CHANGELOG.md docs","release:beta":"npm version prerelease --preid=beta; npm publish --tag beta","release:minor":"npm version minor; npm publish","release:patch":"npm version patch; npm publish"},"repository":{"type":"git","url":"git+https://github.com/alan-wu/ZincJS.git"},"keywords":["library","webgl","3d","zincjs"],"author":"Alan Wu <alan.wu@auckland.ac.nz>","license":"MIT","bugs":{"url":"https://github.com/alan-wu/ZincJS/issues"},"homepage":"http://alan-wu.github.io/ZincJS/","devDependencies":{"@babel/core":"^7.23.9","@babel/preset-env":"^7.23.9","auto-changelog":"^2.4.0","babel-loader":"^9.1.3","babel-preset-minify":"^0.5.1","file-loader":"^6.2.0","jsdoc":"^4.0.2","raw-loader":"^4.0.2","webpack":"^5.90.3","webpack-cli":"^5.1.4","webpack-node-externals":"^3.0.0"},"dependencies":{"css-element-queries":"^1.2.2","lodash":"^4.17.19","promise-polyfill":"^8.1.3","three":"^0.130.1","three-spritetext":"1.6.2","url-loader":"^4.1.1","url-polyfill":"^1.1.7","webworkify-webpack":"^2.1.5"}}');
32286
+ o.exports = /* @__PURE__ */ JSON.parse('{"name":"zincjs","version":"1.18.7","description":"ZincJS (Web-based-Zinc-Visualisation)","main":"build/zinc.js","directories":{"doc":"docs"},"files":["package.json","LICENSE","README.md","src/*","build/zinc.js","build/zinc.frontend.js","build/zinc.js.map","webpack.config.js"],"scripts":{"build-bundle":"webpack --config webpack.frontend.js; webpack --config webpack.backend.js","build-backend":"webpack --config webpack.backend.js","test":"npm --prefix ./test install && npm --prefix ./test run test-ci","changelog":"auto-changelog -p --output CHANGELOG.md --template keepachangelog","jsdoc":"jsdoc -c jsdoc_conf.json","version":"npm run build-bundle;npm run jsdoc;npm run changelog; git add CHANGELOG.md docs","release:beta":"npm version prerelease --preid=beta; npm publish --tag beta","release:minor":"npm version minor; npm publish","release:patch":"npm version patch; npm publish"},"repository":{"type":"git","url":"git+https://github.com/alan-wu/ZincJS.git"},"keywords":["library","webgl","3d","zincjs"],"author":"Alan Wu <alan.wu@auckland.ac.nz>","license":"MIT","bugs":{"url":"https://github.com/alan-wu/ZincJS/issues"},"homepage":"http://alan-wu.github.io/ZincJS/","devDependencies":{"@babel/core":"^7.23.9","@babel/preset-env":"^7.23.9","auto-changelog":"^2.4.0","babel-loader":"^9.1.3","babel-preset-minify":"^0.5.1","file-loader":"^6.2.0","jsdoc":"^4.0.2","raw-loader":"^4.0.2","webpack":"^5.90.3","webpack-cli":"^5.1.4","webpack-node-externals":"^3.0.0"},"dependencies":{"css-element-queries":"^1.2.2","lodash":"^4.17.19","promise-polyfill":"^8.1.3","three":"^0.130.1","three-spritetext":"1.6.2","url-loader":"^4.1.1","url-polyfill":"^1.1.7","webworkify-webpack":"^2.1.5"}}');
32287
32287
  },
32288
32288
  /* 3 */
32289
32289
  /***/
@@ -32463,12 +32463,12 @@ const a5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
32463
32463
  }
32464
32464
  }
32465
32465
  if (A) {
32466
- for (var te, q = 0, j = [], $ = 0; $ < L.length; ++$) {
32466
+ for (var te, q = 0, W = [], $ = 0; $ < L.length; ++$) {
32467
32467
  te = L[$].index;
32468
- for (var X = 0; X < te.count; ++X) j.push(te.getX(X) + q);
32468
+ for (var X = 0; X < te.count; ++X) W.push(te.getX(X) + q);
32469
32469
  q += L[$].attributes.position.count;
32470
32470
  }
32471
- I.setIndex(j);
32471
+ I.setIndex(W);
32472
32472
  }
32473
32473
  for (var K in C) {
32474
32474
  var re = g(C[K]);
@@ -32476,10 +32476,10 @@ const a5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
32476
32476
  I.setAttribute(K, re);
32477
32477
  }
32478
32478
  for (var k in R) {
32479
- var W = R[k][0].length;
32480
- if (W === 0) break;
32479
+ var j = R[k][0].length;
32480
+ if (j === 0) break;
32481
32481
  I.morphAttributes = I.morphAttributes || {}, I.morphAttributes[k] = [];
32482
- for (var oe, le = 0; le < W; ++le) {
32482
+ for (var oe, le = 0; le < j; ++le) {
32483
32483
  oe = [];
32484
32484
  for (var ce = 0; ce < R[k].length; ++ce) oe.push(R[k][ce][le]);
32485
32485
  var H = g(oe);
@@ -32497,12 +32497,12 @@ const a5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
32497
32497
  Y && (O[A] = Array(Y.length).fill().map(() => []));
32498
32498
  }
32499
32499
  for (var Z = Math.log10(1 / P), te = Math.pow(10, Z), z = 0; z < R; z++) {
32500
- for (var q = T ? T.getX(z) : z, j = "", $ = 0, G = I.length; $ < G; $++) for (var A = I[$], X = L.getAttribute(A), K = X.itemSize, re = 0; re < K; re++)
32501
- j += "".concat(~~(X[U[re]](q) * te), ",");
32502
- if (j in _) xe.push(_[j]);
32500
+ for (var q = T ? T.getX(z) : z, W = "", $ = 0, G = I.length; $ < G; $++) for (var A = I[$], X = L.getAttribute(A), K = X.itemSize, re = 0; re < K; re++)
32501
+ W += "".concat(~~(X[U[re]](q) * te), ",");
32502
+ if (W in _) xe.push(_[W]);
32503
32503
  else {
32504
- for (var $ = 0, G = I.length; $ < G; $++) for (var k, A = I[$], X = L.getAttribute(A), Y = L.morphAttributes[A], K = X.itemSize, W = D[A], oe = O[A], re = 0; re < K; re++) if (k = U[re], W.push(X[k](q)), Y) for (var le = 0, ce = Y.length; le < ce; le++) oe[le].push(Y[le][k](q));
32505
- _[j] = b, xe.push(b), b++;
32504
+ for (var $ = 0, G = I.length; $ < G; $++) for (var k, A = I[$], X = L.getAttribute(A), Y = L.morphAttributes[A], K = X.itemSize, j = D[A], oe = O[A], re = 0; re < K; re++) if (k = U[re], j.push(X[k](q)), Y) for (var le = 0, ce = Y.length; le < ce; le++) oe[le].push(Y[le][k](q));
32505
+ _[W] = b, xe.push(b), b++;
32506
32506
  }
32507
32507
  }
32508
32508
  for (var H = L.clone(), z = 0, G = I.length; z < G; z++) {
@@ -32617,7 +32617,7 @@ const a5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
32617
32617
  },
32618
32618
  fromBufferGeometry: function(g) {
32619
32619
  function M(G, Y, Z, te) {
32620
- var q = L === void 0 ? [] : [w.colors[G].clone(), w.colors[Y].clone(), w.colors[Z].clone()], j = F === void 0 ? [] : [new l.Vector3().fromBufferAttribute(F, G), new l.Vector3().fromBufferAttribute(F, Y), new l.Vector3().fromBufferAttribute(F, Z)], $ = new y(G, Y, Z, j, q, te);
32620
+ var q = L === void 0 ? [] : [w.colors[G].clone(), w.colors[Y].clone(), w.colors[Z].clone()], W = F === void 0 ? [] : [new l.Vector3().fromBufferAttribute(F, G), new l.Vector3().fromBufferAttribute(F, Y), new l.Vector3().fromBufferAttribute(F, Z)], $ = new y(G, Y, Z, W, q, te);
32621
32621
  w.faces.push($), P !== void 0 && w.faceVertexUvs[0].push([new l.Vector2().fromBufferAttribute(P, G), new l.Vector2().fromBufferAttribute(P, Y), new l.Vector2().fromBufferAttribute(P, Z)]), A !== void 0 && w.faceVertexUvs[1].push([new l.Vector2().fromBufferAttribute(A, G), new l.Vector2().fromBufferAttribute(A, Y), new l.Vector2().fromBufferAttribute(A, Z)]);
32622
32622
  }
32623
32623
  var w = this, S = g.index === null ? void 0 : g.index, x = g.attributes;
@@ -32730,17 +32730,17 @@ const a5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
32730
32730
  for (var D = 0; D < L.length; D += 3) m.set(L[D], L[D + 1], L[D + 2]), M !== void 0 && m.applyMatrix4(M), this.normals.push(m.x, m.y, m.z);
32731
32731
  for (var O = 0, U = T.length; O < U; O++) typeof T[O] == "number" ? _.push(T[O]) : _.push(T[O].clone());
32732
32732
  for (var z = 0, G = A.length; z < G; z++) {
32733
- var Y = A[z], Z = void 0, te = void 0, q = Y.vertexNormals, j = Y.vertexColors, $ = new y(Y.a + x, Y.b + x, Y.c + x);
32733
+ var Y = A[z], Z = void 0, te = void 0, q = Y.vertexNormals, W = Y.vertexColors, $ = new y(Y.a + x, Y.b + x, Y.c + x);
32734
32734
  $.normal.copy(Y.normal), S !== void 0 && $.normal.applyMatrix3(S).normalize();
32735
32735
  for (var X = 0, K = q.length; X < K; X++) Z = q[X].clone(), S !== void 0 && Z.applyMatrix3(S).normalize(), $.vertexNormals.push(Z);
32736
32736
  $.color.copy(Y.color);
32737
- for (var re = 0, k = j.length; re < k; re++) te = j[re], $.vertexColors.push(te.clone());
32737
+ for (var re = 0, k = W.length; re < k; re++) te = W[re], $.vertexColors.push(te.clone());
32738
32738
  $.materialIndex = Y.materialIndex + w, P.push($);
32739
32739
  }
32740
- for (var W, oe = 0, le = g.faceVertexUvs.length; oe < le; oe++) {
32741
- W = g.faceVertexUvs[oe], this.faceVertexUvs[oe] === void 0 && (this.faceVertexUvs[oe] = []);
32742
- for (var ce = 0, H = W.length; ce < H; ce++) {
32743
- for (var V = W[ce], B = [], Q = 0, ie = V.length; Q < ie; Q++) B.push(V[Q].clone());
32740
+ for (var j, oe = 0, le = g.faceVertexUvs.length; oe < le; oe++) {
32741
+ j = g.faceVertexUvs[oe], this.faceVertexUvs[oe] === void 0 && (this.faceVertexUvs[oe] = []);
32742
+ for (var ce = 0, H = j.length; ce < H; ce++) {
32743
+ for (var V = j[ce], B = [], Q = 0, ie = V.length; Q < ie; Q++) B.push(V[Q].clone());
32744
32744
  this.faceVertexUvs[oe].push(B);
32745
32745
  }
32746
32746
  }
@@ -32789,20 +32789,20 @@ const a5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
32789
32789
  S && (this.faceVertexUvs[0] = S), x && (this.faceVertexUvs[1] = x);
32790
32790
  },
32791
32791
  toJSON: function() {
32792
- function g(k, W, oe) {
32793
- return oe ? k | 1 << W : k & ~(1 << W);
32792
+ function g(k, j, oe) {
32793
+ return oe ? k | 1 << j : k & ~(1 << j);
32794
32794
  }
32795
32795
  function M(k) {
32796
- var W = k.x.toString() + k.y.toString() + k.z.toString();
32797
- return C[W] === void 0 && (C[W] = T.length / 3, T.push(k.x, k.y, k.z)), C[W];
32796
+ var j = k.x.toString() + k.y.toString() + k.z.toString();
32797
+ return C[j] === void 0 && (C[j] = T.length / 3, T.push(k.x, k.y, k.z)), C[j];
32798
32798
  }
32799
32799
  function w(k) {
32800
- var W = k.r.toString() + k.g.toString() + k.b.toString();
32801
- return b[W] === void 0 && (b[W] = R.length, R.push(k.getHex())), b[W];
32800
+ var j = k.r.toString() + k.g.toString() + k.b.toString();
32801
+ return b[j] === void 0 && (b[j] = R.length, R.push(k.getHex())), b[j];
32802
32802
  }
32803
32803
  function S(k) {
32804
- var W = k.x.toString() + k.y.toString();
32805
- return D[W] === void 0 && (D[W] = I.length / 2, I.push(k.x, k.y)), D[W];
32804
+ var j = k.x.toString() + k.y.toString();
32805
+ return D[j] === void 0 && (D[j] = I.length / 2, I.push(k.x, k.y)), D[j];
32806
32806
  }
32807
32807
  var x = { metadata: { version: 4.5, type: "Geometry", generator: "Geometry.toJSON" } };
32808
32808
  if (x.uuid = this.uuid, x.type = this.type, this.name !== "" && (x.name = this.name), this.parameters !== void 0) {
@@ -32812,8 +32812,8 @@ const a5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
32812
32812
  }
32813
32813
  for (var L, P = [], A = 0; A < this.vertices.length; A++) L = this.vertices[A], P.push(L.x, L.y, L.z);
32814
32814
  for (var _ = [], T = [], C = {}, R = [], b = {}, I = [], D = {}, O = 0; O < this.faces.length; O++) {
32815
- var U = this.faces[O], z = !0, G = !1, Y = this.faceVertexUvs[0][O] !== void 0, Z = 0 < U.normal.length(), te = 0 < U.vertexNormals.length, q = U.color.r !== 1 || U.color.g !== 1 || U.color.b !== 1, j = 0 < U.vertexColors.length, $ = 0;
32816
- if ($ = g($, 0, 0), $ = g($, 1, z), $ = g($, 2, G), $ = g($, 3, Y), $ = g($, 4, Z), $ = g($, 5, te), $ = g($, 6, q), $ = g($, 7, j), _.push($), _.push(U.a, U.b, U.c), _.push(U.materialIndex), Y) {
32815
+ var U = this.faces[O], z = !0, G = !1, Y = this.faceVertexUvs[0][O] !== void 0, Z = 0 < U.normal.length(), te = 0 < U.vertexNormals.length, q = U.color.r !== 1 || U.color.g !== 1 || U.color.b !== 1, W = 0 < U.vertexColors.length, $ = 0;
32816
+ if ($ = g($, 0, 0), $ = g($, 1, z), $ = g($, 2, G), $ = g($, 3, Y), $ = g($, 4, Z), $ = g($, 5, te), $ = g($, 6, q), $ = g($, 7, W), _.push($), _.push(U.a, U.b, U.c), _.push(U.materialIndex), Y) {
32817
32817
  var X = this.faceVertexUvs[0][O];
32818
32818
  _.push(S(X[0]), S(X[1]), S(X[2]));
32819
32819
  }
@@ -32821,7 +32821,7 @@ const a5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
32821
32821
  var K = U.vertexNormals;
32822
32822
  _.push(M(K[0]), M(K[1]), M(K[2]));
32823
32823
  }
32824
- if (q && _.push(w(U.color)), j) {
32824
+ if (q && _.push(w(U.color)), W) {
32825
32825
  var re = U.vertexColors;
32826
32826
  _.push(w(re[0]), w(re[1]), w(re[2]));
32827
32827
  }
@@ -32846,7 +32846,7 @@ const a5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
32846
32846
  for (var G, Y = g.morphTargets, Z = 0, te = Y.length; Z < te; Z++) {
32847
32847
  if (G = {}, G.name = Y[Z].name, Y[Z].vertices !== void 0) {
32848
32848
  G.vertices = [];
32849
- for (var q = 0, j = Y[Z].vertices.length; q < j; q++) G.vertices.push(Y[Z].vertices[q].clone());
32849
+ for (var q = 0, W = Y[Z].vertices.length; q < W; q++) G.vertices.push(Y[Z].vertices[q].clone());
32850
32850
  }
32851
32851
  if (Y[Z].normals !== void 0) {
32852
32852
  G.normals = [];
@@ -32854,7 +32854,7 @@ const a5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
32854
32854
  }
32855
32855
  this.morphTargets.push(G);
32856
32856
  }
32857
- for (var K, re = g.morphNormals, k = 0, W = re.length; k < W; k++) {
32857
+ for (var K, re = g.morphNormals, k = 0, j = re.length; k < j; k++) {
32858
32858
  if (K = {}, re[k].vertexNormals !== void 0) {
32859
32859
  K.vertexNormals = [];
32860
32860
  for (var oe = 0, le = re[k].vertexNormals.length; oe < le; oe++) {
@@ -33043,8 +33043,8 @@ const a5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
33043
33043
  q === void 0 ? (console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv ", z), this.uvs.push(new l.Vector2(), new l.Vector2(), new l.Vector2())) : this.uvs.push(q[0], q[1], q[2]);
33044
33044
  }
33045
33045
  if (F === !0) {
33046
- var j = x[1][z];
33047
- j === void 0 ? (console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ", z), this.uvs2.push(new l.Vector2(), new l.Vector2(), new l.Vector2())) : this.uvs2.push(j[0], j[1], j[2]);
33046
+ var W = x[1][z];
33047
+ W === void 0 ? (console.warn("THREE.DirectGeometry.fromGeometry(): Undefined vertexUv2 ", z), this.uvs2.push(new l.Vector2(), new l.Vector2(), new l.Vector2())) : this.uvs2.push(W[0], W[1], W[2]);
33048
33048
  }
33049
33049
  for (var $, X = 0; X < P; X++) $ = L[X].vertices, M[X].data.push($[U.a], $[U.b], $[U.c]);
33050
33050
  for (var K, re = 0; re < C; re++) K = T[re].vertexNormals[z], _[re].data.push(K.a, K.b, K.c);
@@ -33424,8 +33424,8 @@ const a5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
33424
33424
  if (F.isBufferGeometry) {
33425
33425
  var U = F.index, z = F.attributes, G = z.position;
33426
33426
  if (U !== null) for (var Y = Math.max(0, A.start), Z = Math.min(U.count, A.start + A.count), te = Y; te < Z - 1; te += O) {
33427
- var q = U.getX(te), j = U.getX(te + 1);
33428
- w(R, b, this, G, _, q, j);
33427
+ var q = U.getX(te), W = U.getX(te + 1);
33428
+ w(R, b, this, G, _, q, W);
33429
33429
  var $ = m.distanceSqToSegment(R, b, D, I);
33430
33430
  if (!($ > C)) {
33431
33431
  D.applyMatrix4(this.matrixWorld);
@@ -33444,8 +33444,8 @@ const a5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
33444
33444
  }
33445
33445
  else for (var K = Math.max(0, A.start), re = Math.min(G.count, A.start + A.count), k = K; k < re - 1; k += O) {
33446
33446
  w(R, b, this, G, _, k, k + 1);
33447
- var W = m.distanceSqToSegment(R, b, D, I);
33448
- if (!(W > C)) {
33447
+ var j = m.distanceSqToSegment(R, b, D, I);
33448
+ if (!(j > C)) {
33449
33449
  D.applyMatrix4(this.matrixWorld);
33450
33450
  var oe = x.ray.origin.distanceTo(D);
33451
33451
  oe < x.near || oe > x.far || E.push({
@@ -33565,7 +33565,11 @@ const a5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
33565
33565
  }, this.setLabel = (M) => {
33566
33566
  M && (typeof M == "string" || M instanceof String) && (v = M, this.morph && (this.morph.name = M));
33567
33567
  }, this.showLabel = (M) => {
33568
- y && (g = y.getPosition(), this.group.remove(y.getSprite()), y.dispose(), y = void 0), v && (typeof v == "string" || v instanceof String) && (y = new (c(17)).Label(v, M), y.setPosition(g[0], g[1], g[2]), this.group.add(y.getSprite()));
33568
+ if (y && (g = y.getPosition(), this.group.remove(y.getSprite()), y.dispose(), y = void 0), v && (typeof v == "string" || v instanceof String)) {
33569
+ y = new (c(17)).Label(v, M), y.setPosition(g[0], g[1], g[2]);
33570
+ var w = y.getSprite();
33571
+ w.material.alphaTest = 0.5, w.material.transparent = !0, w.material.depthWrite = !1, w.material.depthTest = labelDepthTest, this.group.add(y.getSprite());
33572
+ }
33569
33573
  }, this.hideLabel = () => {
33570
33574
  y && (g = y.getPosition(), this.group.remove(y.getSprite()), y.dispose(), y = void 0);
33571
33575
  }, this.getLabel = () => v, this.getMesh = () => this.morph, this.setTransformation = (M, w, S, x) => {
@@ -33618,27 +33622,27 @@ const a5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
33618
33622
  var _ = new l.Matrix4(), T = new l.Color(), C = new l.Color(), R = new l.Box3(), b = new l.Box3(), I = new l.Box3(), D = [], O = [], U = [], z = [], G = [], Y = [], Z = [];
33619
33623
  this.globalScale = 1;
33620
33624
  for (var te = 0; 8 > te; te++) new l.Vector3();
33621
- this.load = (k, W, oe, le, ce) => {
33625
+ this.load = (k, j, oe, le, ce) => {
33622
33626
  m = k.axis1, p = k.axis2, h = k.axis3, y = k.positions, v = k.scale, g = k.colors, M = k.label, P = k.metadata.MorphColours, A = k.metadata.MorphVertices, w = k.metadata.number_of_time_steps, L = k.metadata.repeat_mode, S = k.metadata.number_of_vertices, L == "AXES_2D" || L == "MIRROR" ? S *= 2 : L == "AXES_3D" && (S *= 3), x = k.metadata.base_size, E = k.metadata.offset, F = k.metadata.scale_factors;
33623
33627
  var H = new d();
33624
33628
  this.geometry = new l.BufferGeometry();
33625
33629
  var V = new l.InstancedMesh(this.geometry, void 0, S);
33626
33630
  if (this.setMorph(V), le) {
33627
- var B = H.parse(W);
33631
+ var B = H.parse(j);
33628
33632
  re(oe, ce)(B.geometry, B.materials), B.geometry.dispose();
33629
- } else H.crossOrigin = "Anonymous", H.load(W, re(oe, ce));
33633
+ } else H.crossOrigin = "Anonymous", H.load(j, re(oe, ce));
33630
33634
  };
33631
- var q = (k, W, oe, le, ce, H) => {
33635
+ var q = (k, j, oe, le, ce, H) => {
33632
33636
  if (L == "NONE" || L == "MIRROR") {
33633
33637
  for (var V, B = [0, 0, 0], Q = [0, 0, 0], ie = [0, 0, 0], he = [0, 0, 0], xe = [0, 0, 0], we = [0, 0, 0], fe = [0, 0, 0], Ae = [0, 0, 0], ne = [0, 0, 0], me = 0; 3 > me; me++) V = 0 > ce[me] ? -1 : 1, B[me] = (V * x[me] + ce[me] * F[me]) * this.globalScale;
33634
- for (var me = 0; 3 > me; me++) Q[me] = W[me] * B[0], ie[me] = oe[me] * B[1], he[me] = le[me] * B[2], xe[me] = k[me] + E[0] * Q[me] + E[1] * ie[me] + E[2] * he[me], L == "MIRROR" && (we[me] = -Q[me], fe[me] = -ie[me], Ae[me] = -he[me], ne[me] = xe[me], 0 > ce[0] && (xe[me] -= Q[me], ne[me] -= we[me]));
33638
+ for (var me = 0; 3 > me; me++) Q[me] = j[me] * B[0], ie[me] = oe[me] * B[1], he[me] = le[me] * B[2], xe[me] = k[me] + E[0] * Q[me] + E[1] * ie[me] + E[2] * he[me], L == "MIRROR" && (we[me] = -Q[me], fe[me] = -ie[me], Ae[me] = -he[me], ne[me] = xe[me], 0 > ce[0] && (xe[me] -= Q[me], ne[me] -= we[me]));
33635
33639
  0 > he[0] * (Q[1] * ie[2] - Q[2] * ie[1]) + he[1] * (Q[2] * ie[0] - Q[0] * ie[2]) + he[2] * (Q[0] * ie[1] - Q[1] * ie[0]) && (he[0] = -he[0], he[1] = -he[1], he[2] = -he[2]), H[0] = [xe, Q, ie, he], L == "MIRROR" && (0 > Ae[0] * (we[1] * fe[2] - we[2] * fe[1]) + Ae[1] * (we[2] * fe[0] - we[0] * fe[2]) + Ae[2] * (we[0] * fe[1] - we[1] * fe[0]) && (Ae[0] = -Ae[0], Ae[1] = -Ae[1], Ae[2] = -Ae[2]), H[1] = [ne, we, fe, Ae]);
33636
33640
  } else if (L == "AXES_2D" || L == "AXES_3D") {
33637
33641
  for (var V, Me = [0, 0, 0], Ne = [0, 0, 0], me = 0; 3 > me; me++) V = 0 > ce[me] ? -1 : 1, Me[me] = (V * x[0] + ce[me] * F[0]) * this.globalScale;
33638
- for (var me = 0; 3 > me; me++) Ne[me] = k[me] + E[0] * Me[0] * W[me] + E[1] * Me[1] * oe[me] + E[2] * Me[2] * le[me];
33642
+ for (var me = 0; 3 > me; me++) Ne[me] = k[me] + E[0] * Me[0] * j[me] + E[1] * Me[1] * oe[me] + E[2] * Me[2] * le[me];
33639
33643
  for (var Fe = glyph_repeat_mode == "AXES_2D" ? 2 : 3, je = 0; je < Fe; je++) {
33640
33644
  var ct = void 0, qe = void 0, At = ce[je], ke = [0, 0, 0], et = [0, 0, 0], rt = [0, 0, 0];
33641
- je == 0 ? (ct = W, qe = oe) : je == 1 ? (ct = oe, qe = glyph_repeat_mode == "AXES_2D" ? W : le) : (ct = le, qe = W);
33645
+ je == 0 ? (ct = j, qe = oe) : je == 1 ? (ct = oe, qe = glyph_repeat_mode == "AXES_2D" ? j : le) : (ct = le, qe = j);
33642
33646
  var qt = (x[0] + At * F[0]) * this.globalScale;
33643
33647
  ke[0] = ct[0] * qt, ke[1] = ct[1] * qt, ke[2] = ct[2] * qt, rt[0] = ke[1] * qe[2] - qe[1] * ke[2], rt[1] = ke[2] * qe[0] - qe[2] * ke[0], rt[2] = ke[0] * qe[1] - ke[1] * qe[0];
33644
33648
  var Qt = Math.sqrt(rt[0] * rt[0] + rt[1] * rt[1] + rt[2] * rt[2]);
@@ -33654,13 +33658,13 @@ const a5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
33654
33658
  }
33655
33659
  }
33656
33660
  return H;
33657
- }, j = (k, W, oe, le, ce) => {
33661
+ }, W = (k, j, oe, le, ce) => {
33658
33662
  var H = 1;
33659
33663
  L == "AXES_2D" || L == "MIRROR" ? H = 2 : L == "AXES_3D" && (H = 3);
33660
33664
  var V = k.length / 3, B = 0;
33661
33665
  Z.length = H;
33662
33666
  for (var Q = 0; Q < V; Q++) {
33663
- var ie = 3 * Q, he = [k[ie], k[ie + 1], k[ie + 2]], xe = [W[ie], W[ie + 1], W[ie + 2]], we = [oe[ie], oe[ie + 1], oe[ie + 2]], fe = [le[ie], le[ie + 1], le[ie + 2]], Ae = [ce[ie], ce[ie + 1], ce[ie + 2]], ne = q(he, xe, we, fe, Ae, Z);
33667
+ var ie = 3 * Q, he = [k[ie], k[ie + 1], k[ie + 2]], xe = [j[ie], j[ie + 1], j[ie + 2]], we = [oe[ie], oe[ie + 1], oe[ie + 2]], fe = [le[ie], le[ie + 1], le[ie + 2]], Ae = [ce[ie], ce[ie + 1], ce[ie + 2]], ne = q(he, xe, we, fe, Ae, Z);
33664
33668
  if (ne.length == H) for (var me = 0; me < H; me++) {
33665
33669
  _.elements[0] = ne[me][1][0], _.elements[1] = ne[me][1][1], _.elements[2] = ne[me][1][2], _.elements[3] = 0, _.elements[4] = ne[me][2][0], _.elements[5] = ne[me][2][1], _.elements[6] = ne[me][2][2], _.elements[7] = 0, _.elements[8] = ne[me][3][0], _.elements[9] = ne[me][3][1], _.elements[10] = ne[me][3][2], _.elements[11] = 0, _.elements[12] = ne[me][0][0], _.elements[13] = ne[me][0][1], _.elements[14] = ne[me][0][2], _.elements[15] = 1, this.morph.setMatrixAt(B, _);
33666
33670
  var Me = f[B];
@@ -33669,11 +33673,11 @@ const a5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
33669
33673
  }
33670
33674
  this.morph.instanceMatrix.needsUpdate = !0;
33671
33675
  }, $ = (k) => {
33672
- var W = 1;
33673
- L == "AXES_2D" || L == "MIRROR" ? W = 2 : L == "AXES_3D" && (W = 3);
33676
+ var j = 1;
33677
+ L == "AXES_2D" || L == "MIRROR" ? j = 2 : L == "AXES_3D" && (j = 3);
33674
33678
  for (var oe, le = k.length, ce = 0, H = 0; H < le; H++) {
33675
33679
  oe = k[H];
33676
- for (var V = 0; V < W; V++) {
33680
+ for (var V = 0; V < j; V++) {
33677
33681
  T.setHex(oe), this.morph.setColorAt(ce, T);
33678
33682
  var B = f[ce];
33679
33683
  B && B.setColour(T), ce++;
@@ -33681,13 +33685,13 @@ const a5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
33681
33685
  }
33682
33686
  this.morph.instanceColor.needsUpdate = !0;
33683
33687
  }, X = () => {
33684
- var k = D, W = O, oe = U, le = z, ce = G, H = Y, V = this.inbuildTime / this.duration * (w - 1), B = Math.floor(V), Q = 1 - (V - B), ie = Math.ceil(V);
33688
+ var k = D, j = O, oe = U, le = z, ce = G, H = Y, V = this.inbuildTime / this.duration * (w - 1), B = Math.floor(V), Q = 1 - (V - B), ie = Math.ceil(V);
33685
33689
  if (A) {
33686
33690
  var he = y[B.toString()], xe = y[ie.toString()], we = m[B.toString()], fe = m[ie.toString()], Ae = p[B.toString()], ne = p[ie.toString()], me = h[B.toString()], Me = h[ie.toString()], Ne = v[B.toString()], Fe = v[ie.toString()];
33687
33691
  D.length = he.length, O.length = he.length, U.length = he.length, z.length = he.length, G.length = he.length;
33688
- for (var je = 0; je < he.length; je++) k[je] = Q * he[je] + (1 - Q) * xe[je], W[je] = Q * we[je] + (1 - Q) * fe[je], oe[je] = Q * Ae[je] + (1 - Q) * ne[je], le[je] = Q * me[je] + (1 - Q) * Me[je], ce[je] = Q * Ne[je] + (1 - Q) * Fe[je];
33689
- } else k = y[0], W = m[0], oe = p[0], le = h[0], ce = v[0];
33690
- if (j(k, W, oe, le, ce), this.boundingBoxUpdateRequired = !0, g != null) {
33692
+ for (var je = 0; je < he.length; je++) k[je] = Q * he[je] + (1 - Q) * xe[je], j[je] = Q * we[je] + (1 - Q) * fe[je], oe[je] = Q * Ae[je] + (1 - Q) * ne[je], le[je] = Q * me[je] + (1 - Q) * Me[je], ce[je] = Q * Ne[je] + (1 - Q) * Fe[je];
33693
+ } else k = y[0], j = m[0], oe = p[0], le = h[0], ce = v[0];
33694
+ if (W(k, j, oe, le, ce), this.boundingBoxUpdateRequired = !0, g != null) {
33691
33695
  if (P) {
33692
33696
  var ct = g[B.toString()], qe = g[ie.toString()];
33693
33697
  H.length = ct.length;
@@ -33696,37 +33700,37 @@ const a5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
33696
33700
  $(H);
33697
33701
  }
33698
33702
  };
33699
- this.showLabel = () => {
33703
+ this.getLabel = (k) => M && M.length > k ? M[k] : void 0, this.showLabel = () => {
33700
33704
  for (var k = 0; k < f.length; k++) f[k].showLabel(this.morph.material ? this.morph.material.color : void 0);
33701
33705
  }, this.hideLabel = () => {
33702
33706
  for (var k = 0; k < f.length; k++) f[k].hideLabel();
33703
33707
  };
33704
33708
  var K = (k) => {
33705
- for (var W = 0; W < S; W++) {
33706
- var oe = new (c(16)).Glyph(void 0, void 0, W, this), le = M ? M[W] : void 0;
33707
- le = le || this.groupName, le && oe.setLabel(le), 0 < w && oe.setFrustumCulled(!1), f[W] = oe, this.morph.add(oe.getGroup());
33709
+ for (var j = 0; j < S; j++) {
33710
+ var oe = new (c(16)).Glyph(void 0, void 0, j, this), le = M ? M[j] : void 0;
33711
+ le = le || this.groupName, le && oe.setLabel(le), 0 < w && oe.setFrustumCulled(!1), f[j] = oe, this.morph.add(oe.getGroup());
33708
33712
  }
33709
- k && this.showLabel(), j(y[0], m[0], p[0], h[0], v[0]), g != null && $(g[0]), this.ready = !0, this.boundingBoxUpdateRequired = !0;
33713
+ k && this.showLabel(), W(y[0], m[0], p[0], h[0], v[0]), g != null && $(g[0]), this.ready = !0, this.boundingBoxUpdateRequired = !0;
33710
33714
  };
33711
33715
  this.addCustomGlyph = (k) => {
33712
33716
  k.isGlyph && f.push(k), this.ready = !0, this.boundingBoxUpdateRequired = !0;
33713
- }, this.addMeshAsGlyph = (k, W) => {
33717
+ }, this.addMeshAsGlyph = (k, j) => {
33714
33718
  if (k.isMesh) {
33715
- var oe = new (c(16)).Glyph(void 0, void 0, W, this);
33719
+ var oe = new (c(16)).Glyph(void 0, void 0, j, this);
33716
33720
  return oe.fromMesh(k), f.push(oe), this.morph.add(oe.getGroup()), this.ready = !0, this.boundingBoxUpdateRequired = !0, oe;
33717
33721
  }
33718
33722
  }, this.forEachGlyph = (k) => {
33719
- for (var W = 0; W < f.length; W++) k(f[W]);
33723
+ for (var j = 0; j < f.length; j++) k(f[j]);
33720
33724
  };
33721
- var re = (k, W) => (oe, le) => {
33725
+ var re = (k, j) => (oe, le) => {
33722
33726
  var ce = oe.toBufferGeometry();
33723
- this.geometry.copy(ce), this.geometry.computeBoundingSphere(), this.geometry.computeBoundingBox(), ce.dispose(), le && le[0] && (this.morph.material = le[0]), K(W), this.morph.name = this.groupName, this.morph.userData = this, this.setMorph(this.morph), oe.dispose(), k != null && typeof k == "function" && k(this);
33727
+ this.geometry.copy(ce), this.geometry.computeBoundingSphere(), this.geometry.computeBoundingBox(), ce.dispose(), le && le[0] && (this.morph.material = le[0]), K(j), this.morph.name = this.groupName, this.morph.userData = this, this.setMorph(this.morph), oe.dispose(), k != null && typeof k == "function" && k(this);
33724
33728
  };
33725
33729
  this.getClosestVertexIndex = function() {
33726
33730
  var k = -1;
33727
33731
  if (this.morph && this.ready) {
33728
33732
  this.getBoundingBox().getCenter(this._v1);
33729
- for (var W, oe = y[0], le = oe.length / 3, ce = -1, H = 0, V = 0; V < le; V++) W = 3 * V, this._v2.set(oe[W], oe[W + 1], oe[W + 2]), H = this._v1.distanceTo(this._v2), (ce == -1 || ce > H) && (ce = H, k = V);
33733
+ for (var j, oe = y[0], le = oe.length / 3, ce = -1, H = 0, V = 0; V < le; V++) j = 3 * V, this._v2.set(oe[j], oe[j + 1], oe[j + 2]), H = this._v1.distanceTo(this._v2), (ce == -1 || ce > H) && (ce = H, k = V);
33730
33734
  }
33731
33735
  return k;
33732
33736
  }, this.getClosestVertex = function() {
@@ -33751,12 +33755,12 @@ const a5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
33751
33755
  }, this.dispose = () => {
33752
33756
  for (var k = f.length - 1; 0 <= k; k--) f[k].dispose();
33753
33757
  this.geometry && this.geometry.dispose(), this.morph && this.morph.material.dispose(), m = void 0, p = void 0, h = void 0, y = void 0, v = void 0, g = void 0, this.ready = !1, this.groupName = void 0;
33754
- }, this.render = (k, W, oe) => {
33755
- if (W == !0) {
33758
+ }, this.render = (k, j, oe) => {
33759
+ if (j == !0) {
33756
33760
  var le = this.inbuildTime + k;
33757
33761
  le > this.duration && (le -= this.duration), this.inbuildTime = le, (P || A) && X();
33758
33762
  }
33759
- this.updateMarker(W, oe);
33763
+ this.updateMarker(j, oe);
33760
33764
  };
33761
33765
  };
33762
33766
  u.prototype = Object.create(c(10).ZincObject.prototype), a.Glyphset = u;
@@ -33804,7 +33808,7 @@ const a5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
33804
33808
  function T(me, Me) {
33805
33809
  return me & 1 << Me;
33806
33810
  }
33807
- var C, R, b, I, D, O, U, z, G, Y, Z, te, q, j, $, X, K, re, k, W, oe, le, ce, H, V, B, Q, ie = A.faces, he = A.vertices, xe = A.normals, we = A.colors, fe = A.scale, Ae = 0;
33811
+ var C, R, b, I, D, O, U, z, G, Y, Z, te, q, W, $, X, K, re, k, j, oe, le, ce, H, V, B, Q, ie = A.faces, he = A.vertices, xe = A.normals, we = A.colors, fe = A.scale, Ae = 0;
33808
33812
  if (A.uvs !== void 0) {
33809
33813
  for (C = 0; C < A.uvs.length; C++) A.uvs[C].length && Ae++;
33810
33814
  for (C = 0; C < Ae; C++) _.faceVertexUvs[C] = [];
@@ -33817,14 +33821,14 @@ const a5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
33817
33821
  if (xe) for (C = 0; C < xe.length; C++) _.normals[C] = xe[C];
33818
33822
  if (we) for (C = 0; C < we.length; C++) _.colors[C] = we[C];
33819
33823
  for (; I < D; )
33820
- if (Y = ie[I++], Z = T(Y, 0), te = T(Y, 1), q = T(Y, 3), j = T(Y, 4), $ = T(Y, 5), X = T(Y, 6), K = T(Y, 7), Z) {
33821
- if (W = new v(), W.a = ie[I], W.b = ie[I + 1], W.c = ie[I + 3], oe = new v(), oe.a = ie[I + 1], oe.b = ie[I + 2], oe.c = ie[I + 3], I += 4, te && (G = ie[I++], W.materialIndex = G, oe.materialIndex = G), b = _.faces.length, q) for (C = 0; C < Ae; C++) for (H = A.uvs[C], _.faceVertexUvs[C][b] = [], _.faceVertexUvs[C][b + 1] = [], R = 0; 4 > R; R++) z = ie[I++], B = H[2 * z], Q = H[2 * z + 1], V = new y(B, Q), R !== 2 && _.faceVertexUvs[C][b].push(V), R !== 0 && _.faceVertexUvs[C][b + 1].push(V);
33822
- if (j && (U = 3 * ie[I++], W.normal.set(xe[U++], xe[U++], xe[U]), oe.normal.copy(W.normal)), $) for (C = 0; 4 > C; C++) U = 3 * ie[I++], ce = new m(xe[U++], xe[U++], xe[U]), C !== 2 && W.vertexNormals.push(ce), C !== 0 && oe.vertexNormals.push(ce);
33823
- if (X && (O = ie[I++], le = we[O], W.color.setHex(le), oe.color.setHex(le)), K) for (C = 0; 4 > C; C++) O = ie[I++], le = we[O], C !== 2 && W.vertexColors.push(new h(le)), C !== 0 && oe.vertexColors.push(new h(le));
33824
- _.faces.push(W), _.faces.push(oe);
33824
+ if (Y = ie[I++], Z = T(Y, 0), te = T(Y, 1), q = T(Y, 3), W = T(Y, 4), $ = T(Y, 5), X = T(Y, 6), K = T(Y, 7), Z) {
33825
+ if (j = new v(), j.a = ie[I], j.b = ie[I + 1], j.c = ie[I + 3], oe = new v(), oe.a = ie[I + 1], oe.b = ie[I + 2], oe.c = ie[I + 3], I += 4, te && (G = ie[I++], j.materialIndex = G, oe.materialIndex = G), b = _.faces.length, q) for (C = 0; C < Ae; C++) for (H = A.uvs[C], _.faceVertexUvs[C][b] = [], _.faceVertexUvs[C][b + 1] = [], R = 0; 4 > R; R++) z = ie[I++], B = H[2 * z], Q = H[2 * z + 1], V = new y(B, Q), R !== 2 && _.faceVertexUvs[C][b].push(V), R !== 0 && _.faceVertexUvs[C][b + 1].push(V);
33826
+ if (W && (U = 3 * ie[I++], j.normal.set(xe[U++], xe[U++], xe[U]), oe.normal.copy(j.normal)), $) for (C = 0; 4 > C; C++) U = 3 * ie[I++], ce = new m(xe[U++], xe[U++], xe[U]), C !== 2 && j.vertexNormals.push(ce), C !== 0 && oe.vertexNormals.push(ce);
33827
+ if (X && (O = ie[I++], le = we[O], j.color.setHex(le), oe.color.setHex(le)), K) for (C = 0; 4 > C; C++) O = ie[I++], le = we[O], C !== 2 && j.vertexColors.push(new h(le)), C !== 0 && oe.vertexColors.push(new h(le));
33828
+ _.faces.push(j), _.faces.push(oe);
33825
33829
  } else {
33826
33830
  if (k = new v(), k.a = ie[I++], k.b = ie[I++], k.c = ie[I++], k.b || (k.b = k.a), k.c || (k.c = k.b), te && (G = ie[I++], k.materialIndex = G), b = _.faces.length, q) for (C = 0; C < Ae; C++) for (H = A.uvs[C], _.faceVertexUvs[C][b] = [], R = 0; 3 > R; R++) z = ie[I++], B = H[2 * z], Q = H[2 * z + 1], V = new y(B, Q), _.faceVertexUvs[C][b].push(V);
33827
- if (j && (U = 3 * ie[I++], k.normal.set(xe[U++], xe[U++], xe[U])), $) for (C = 0; 3 > C; C++) U = 3 * ie[I++], ce = new m(xe[U++], xe[U++], xe[U]), k.vertexNormals.push(ce);
33831
+ if (W && (U = 3 * ie[I++], k.normal.set(xe[U++], xe[U++], xe[U])), $) for (C = 0; 3 > C; C++) U = 3 * ie[I++], ce = new m(xe[U++], xe[U++], xe[U]), k.vertexNormals.push(ce);
33828
33832
  if (X && (O = ie[I++], k.color.setHex(we[O])), K) for (C = 0; 3 > C; C++) O = ie[I++], k.vertexColors.push(new h(we[O]));
33829
33833
  _.faces.push(k);
33830
33834
  }
@@ -33855,8 +33859,8 @@ const a5 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
33855
33859
  }
33856
33860
  }
33857
33861
  if (A.morphColors !== void 0) {
33858
- var C, R, Z, te, q, j, $;
33859
- for (C = 0, R = A.morphColors.length; C < R; C++) for (_.morphColors[C] = {}, _.morphColors[C].name = A.morphColors[C].name, _.morphColors[C].colors = [], q = _.morphColors[C].colors, j = A.morphColors[C].colors, Z = 0, te = j.length; Z < te; Z += 3) $ = new l.Color(16755200), $.setRGB(j[Z], j[Z + 1], j[Z + 2]), q.push($);
33862
+ var C, R, Z, te, q, W, $;
33863
+ for (C = 0, R = A.morphColors.length; C < R; C++) for (_.morphColors[C] = {}, _.morphColors[C].name = A.morphColors[C].name, _.morphColors[C].colors = [], q = _.morphColors[C].colors, W = A.morphColors[C].colors, Z = 0, te = W.length; Z < te; Z += 3) $ = new l.Color(16755200), $.setRGB(W[Z], W[Z + 1], W[Z + 2]), q.push($);
33860
33864
  }
33861
33865
  }
33862
33866
  function P(A, _) {
@@ -34667,8 +34671,8 @@ void main() {
34667
34671
  if (m != null) {
34668
34672
  var q;
34669
34673
  f ? (q = f.getBoundingClientRect(), m.setSize(Z, te)) : b && (typeof b.getBoundingClientRect > "u" || (q = b.getBoundingClientRect(), b.width = Z, b.height = te), m.setSize(Z, te, !1)), q && (q.left, q.top);
34670
- var j = new l.Vector2();
34671
- m.getSize(j), j.x, j.y;
34674
+ var W = new l.Vector2();
34675
+ m.getSize(W), W.x, W.y;
34672
34676
  }
34673
34677
  }, this.initialiseVisualisation = (Z) => {
34674
34678
  if (!O) {
@@ -34684,8 +34688,8 @@ void main() {
34684
34688
  Z.canvas && (f = void 0, b = Z.canvas), m = new l.WebGLRenderer(Z), f !== void 0 && f.appendChild(m.domElement), m.setClearColor(16777215, 1), b && b.style && (b.style.height = "100%", b.style.width = "100%");
34685
34689
  var q = m.domElement;
34686
34690
  q.addEventListener("webglcontextlost", U, !1), q.addEventListener("webglcontextrestored", z, !1), m.autoClear = !1;
34687
- var j = this.createScene("default");
34688
- this.setCurrentScene(j), O = !0;
34691
+ var W = this.createScene("default");
34692
+ this.setCurrentScene(W), O = !0;
34689
34693
  }
34690
34694
  };
34691
34695
  var U = (Z) => {
@@ -34716,8 +34720,8 @@ void main() {
34716
34720
  p.viewAllWithBoundingBox(Z);
34717
34721
  }
34718
34722
  }
34719
- }, this.loadModelsURL = (Z, te, q, j, $, X) => {
34720
- p.loadModelsURL(Z, te, q, j, $, X);
34723
+ }, this.loadModelsURL = (Z, te, q, W, $, X) => {
34724
+ p.loadModelsURL(Z, te, q, W, $, X);
34721
34725
  }, this.loadViewURL = (Z) => {
34722
34726
  p.loadViewURL(Z);
34723
34727
  }, this.loadFromViewURL = (Z, te) => {
@@ -34755,10 +34759,10 @@ void main() {
34755
34759
  };
34756
34760
  var Y = (Z) => (te) => {
34757
34761
  te.needsUpdate = !0;
34758
- var q = new l.SpriteMaterial({ map: te }), j = q.map.image.width, $ = q.map.image.height;
34759
- Z.material = q, Z.scale.set(j, $, 1);
34762
+ var q = new l.SpriteMaterial({ map: te }), W = q.map.image.width, $ = q.map.image.height;
34763
+ Z.material = q, Z.scale.set(W, $, 1);
34760
34764
  var X = this.getDrawingWidth(), K = this.getDrawingHeight();
34761
- Z.position.set((X - j) / 2, (-K + $) / 2, 1), this.addToOrthoScene(Z);
34765
+ Z.position.set((X - W) / 2, (-K + $) / 2, 1), this.addToOrthoScene(Z);
34762
34766
  };
34763
34767
  this.addLogo = () => {
34764
34768
  _ = new l.Sprite(), l.ImageUtils.loadTexture("images/abi_big_logo_transparent_small.png", void 0, Y(_));
@@ -34768,7 +34772,7 @@ void main() {
34768
34772
  p.renderGeometries(y, Z, this.playAnimation);
34769
34773
  for (var te, q = 0; q < C.length; q++) te = C[q], te.renderGeometries(y, Z, this.playAnimation);
34770
34774
  P != null && A != null && (m.clearDepth(), m.render(A, P));
34771
- for (var j of Object.keys(v)) v.hasOwnProperty(j) && v[j].call();
34775
+ for (var W of Object.keys(v)) v.hasOwnProperty(W) && v[W].call();
34772
34776
  p.render(m);
34773
34777
  for (var $ of Object.keys(M)) M.hasOwnProperty($) && M[$].call();
34774
34778
  }, this.forceContextLoss = () => {
@@ -34794,10 +34798,10 @@ void main() {
34794
34798
  this.setCurrentScene(q), I = void 0, (Z = m) === null || Z === void 0 || Z.dispose();
34795
34799
  }, this.transitionScene = (Z, te) => {
34796
34800
  if (p) {
34797
- var q = p.getZincCameraControls(), j = Z.getBoundingBox();
34798
- if (j) {
34799
- var $ = j.min.distanceTo(j.max) / 2, X = (j.min.x + j.max.x) / 2, K = (j.min.y + j.max.y) / 2, re = (j.min.z + j.max.z) / 2, k = q.getViewportFromCentreAndRadius(X, K, re, $, 40, $ * 4), W = q.getCurrentViewport();
34800
- q.cameraTransition(W, k, te), q.enableCameraTransition();
34801
+ var q = p.getZincCameraControls(), W = Z.getBoundingBox();
34802
+ if (W) {
34803
+ var $ = W.min.distanceTo(W.max) / 2, X = (W.min.x + W.max.x) / 2, K = (W.min.y + W.max.y) / 2, re = (W.min.z + W.max.z) / 2, k = q.getViewportFromCentreAndRadius(X, K, re, $, 40, $ * 4), j = q.getCurrentViewport();
34804
+ q.cameraTransition(j, k, te), q.enableCameraTransition();
34801
34805
  }
34802
34806
  }
34803
34807
  }, this.isWebGL2 = () => !!m && m.capabilities.isWebGL2;
@@ -34825,13 +34829,13 @@ void main() {
34825
34829
  this.sceneName = void 0;
34826
34830
  var Y = !1, Z = void 0;
34827
34831
  this.autoClearFlag = !0, this.displayMarkers = !1, this.displayMinimap = !1, this.displayMiniAxes = !1, this.minimapScissor = { x_offset: 16, y_offset: 16, width: 128, height: 128, align: "top-right", updateRequired: !0 };
34828
- var te = { x: 0, y: 0 }, q = M(), j = new l.Vector2(), $ = [];
34832
+ var te = { x: 0, y: 0 }, q = M(), W = new l.Vector2(), $ = [];
34829
34833
  this.forcePickableObjectsUpdate = !1, this.uuid = g();
34830
34834
  var X = new d(this);
34831
34835
  X.disable(), I.add(X.group);
34832
- var K = { main: [], mini: [] }, re = new l.Vector3(0, 0, 0), k = () => F ? typeof F.clientWidth > "u" ? F.width : F.clientWidth : 0, W = () => F ? typeof F.clientHeight > "u" ? F.height : F.clientHeight : 0;
34836
+ var K = { main: [], mini: [] }, re = new l.Vector3(0, 0, 0), k = () => F ? typeof F.clientWidth > "u" ? F.width : F.clientWidth : 0, j = () => F ? typeof F.clientHeight > "u" ? F.height : F.clientHeight : 0;
34833
34837
  this.getDownloadProgress = () => A.getDownloadProgress(), this.onWindowResize = () => {
34834
- var B = W();
34838
+ var B = j();
34835
34839
  this.camera.aspect = k() / B, this.camera.updateProjectionMatrix(), this.minimapScissor.updateRequired = !0, G.onResize(), G.calculateHeightPerPixelAtZeroDepth(B);
34836
34840
  }, this.resetView = () => {
34837
34841
  this.onWindowResize(), G.resetView();
@@ -34839,7 +34843,7 @@ void main() {
34839
34843
  G.changeZoomByScrollRateUnit(B);
34840
34844
  };
34841
34845
  var oe = () => {
34842
- this.camera = new l.PerspectiveCamera(40, k() / W(), 0, 10), this.ambient = new l.AmbientLight(16777215, 0.2), I.add(this.ambient), this.directionalLight = new l.DirectionalLight(16777215, 0.8), I.add(this.directionalLight), G = new (c(44)).CameraControls(this.camera, x.domElement, x, this), G.setDirectionalLight(this.directionalLight), G.resetView(), _ = new (c(50)).Minimap(this);
34846
+ this.camera = new l.PerspectiveCamera(40, k() / j(), 0, 10), this.ambient = new l.AmbientLight(16777215, 0.2), I.add(this.ambient), this.directionalLight = new l.DirectionalLight(16777215, 0.8), I.add(this.directionalLight), G = new (c(44)).CameraControls(this.camera, x.domElement, x, this), G.setDirectionalLight(this.directionalLight), G.resetView(), _ = new (c(50)).Minimap(this);
34843
34847
  };
34844
34848
  oe(), this.loadView = (B) => {
34845
34849
  var Q = new m();
@@ -34853,7 +34857,7 @@ void main() {
34853
34857
  }, this.getBoundingBox = () => O.getBoundingBox(!0), this.viewAllWithBoundingBox = (B) => {
34854
34858
  if (B) {
34855
34859
  var Q = G.getViewportFromBoundingBox(B, 1);
34856
- G.setCurrentCameraSettings(Q), G.calculateHeightPerPixelAtZeroDepth(W()), X.markerUpdateRequired = !0;
34860
+ G.setCurrentCameraSettings(Q), G.calculateHeightPerPixelAtZeroDepth(j()), X.markerUpdateRequired = !0;
34857
34861
  }
34858
34862
  }, this.viewAll = () => {
34859
34863
  var B = this.getBoundingBox();
@@ -34871,7 +34875,7 @@ void main() {
34871
34875
  return ie;
34872
34876
  }, this.vectorToScreenXY = (B) => {
34873
34877
  B.project(this.camera);
34874
- var Q = k(), ie = W(), he = Q / 2, xe = ie / 2;
34878
+ var Q = k(), ie = j(), he = Q / 2, xe = ie / 2;
34875
34879
  return B.x = B.x * he + he, B.y = -(B.y * xe) + xe, B;
34876
34880
  }, this.getObjectsScreenXY = (B) => {
34877
34881
  if (B && 0 < B.length) {
@@ -34917,11 +34921,11 @@ void main() {
34917
34921
  P != null && P.setMorphTime(B, z), O.setMorphTime(B, !0);
34918
34922
  }, this.isTimeVarying = () => !!(P && P.video && !P.video.error) || O.isTimeVarying(), this.renderGeometries = (B, Q, ie) => {
34919
34923
  var he = {};
34920
- if (he.camera = G, he.displayMarkers = this.displayMarkers, he.markerCluster = X, he.markersList = X.markers, he.ndcToBeUpdated = !1, ie && (he.markerCluster.markerUpdateRequired = !0), !P) A.toBeDownloaded == 0 ? (he.ndcToBeUpdated = G.update(Q), he.ndcToBeUpdated && G.calculateHeightPerPixelAtZeroDepth(W()), O.renderGeometries(B, Q, ie, G, he, !0)) : G.update(0);
34924
+ if (he.camera = G, he.displayMarkers = this.displayMarkers, he.markerCluster = X, he.markersList = X.markers, he.ndcToBeUpdated = !1, ie && (he.markerCluster.markerUpdateRequired = !0), !P) A.toBeDownloaded == 0 ? (he.ndcToBeUpdated = G.update(Q), he.ndcToBeUpdated && G.calculateHeightPerPixelAtZeroDepth(j()), O.renderGeometries(B, Q, ie, G, he, !0)) : G.update(0);
34921
34925
  else if (P.isReadyToPlay()) {
34922
34926
  ie ? P.video.play() : P.video.pause();
34923
34927
  var xe = P.video.currentTime / P.getVideoDuration() * z;
34924
- A.toBeDownloaded == 0 ? (G.setTime(xe), he.ndcToBeUpdated = G.update(0), he.ndcToBeUpdated && G.calculateHeightPerPixelAtZeroDepth(W()), O.setMorphTime(xe, !0), O.renderGeometries(0, 0, ie, G, he, !0)) : G.update(0);
34928
+ A.toBeDownloaded == 0 ? (G.setTime(xe), he.ndcToBeUpdated = G.update(0), he.ndcToBeUpdated && G.calculateHeightPerPixelAtZeroDepth(j()), O.setMorphTime(xe, !0), O.renderGeometries(0, 0, ie, G, he, !0)) : G.update(0);
34925
34929
  } else myPlayRate = 0;
34926
34930
  }, this.getThreeJSScene = () => I, this.setVideoHandler = (B) => {
34927
34931
  P || (P = B);
@@ -34932,7 +34936,7 @@ void main() {
34932
34936
  var Ae = 0, ne = 0;
34933
34937
  return ne = B.includes("top") ? fe - xe - ie : B.includes("bottom") ? ie : Math.floor((fe - xe) / 2), Ae = B.includes("left") ? Q : B.includes("right") ? we - Q - he : Math.floor((we - he) / 2), { x: Ae, y: ne };
34934
34938
  }, ce = (B) => {
34935
- (this.displayMinimap || this.displayMiniAxes) && (B.setScissorTest(!0), B.getSize(j), this.minimapScissor.updateRequired && (te = le(this.minimapScissor.align, this.minimapScissor.x_offset, this.minimapScissor.y_offset, this.minimapScissor.width, this.minimapScissor.height, j.x, j.y), this.minimapScissor.updateRequired = !1), B.setScissor(te.x, te.y, this.minimapScissor.width, this.minimapScissor.height), B.setViewport(te.x, te.y, this.minimapScissor.width, this.minimapScissor.height), _.updateCamera(), this.displayMiniAxes ? B.render(D, _.camera) : (I.add(_.mask), B.render(I, _.camera), I.remove(_.mask)), B.setScissorTest(!1), B.setViewport(0, 0, j.x, j.y));
34939
+ (this.displayMinimap || this.displayMiniAxes) && (B.setScissorTest(!0), B.getSize(W), this.minimapScissor.updateRequired && (te = le(this.minimapScissor.align, this.minimapScissor.x_offset, this.minimapScissor.y_offset, this.minimapScissor.width, this.minimapScissor.height, W.x, W.y), this.minimapScissor.updateRequired = !1), B.setScissor(te.x, te.y, this.minimapScissor.width, this.minimapScissor.height), B.setViewport(te.x, te.y, this.minimapScissor.width, this.minimapScissor.height), _.updateCamera(), this.displayMiniAxes ? B.render(D, _.camera) : (I.add(_.mask), B.render(I, _.camera), I.remove(_.mask)), B.setScissorTest(!1), B.setViewport(0, 0, W.x, W.y));
34936
34940
  };
34937
34941
  this.render = (B) => {
34938
34942
  this.autoClearFlag && B.clear(), Y && Z ? Z.render(I, this.camera) : (B.render(I, this.camera), ce(B));
@@ -34941,7 +34945,7 @@ void main() {
34941
34945
  }, this.getZincCameraControls = () => G, this.getThreeJSScene = () => I, this.setDuration = (B) => {
34942
34946
  O.setDuration(B), z = B, G.setPathDuration(B), A.duration = B;
34943
34947
  }, this.getDuration = () => z, this.setStereoEffectEnable = (B) => {
34944
- B != !0 || Z || (Z = new c(44).StereoEffect(x)), x.setSize(k(), W()), this.camera.updateProjectionMatrix(), Y = B;
34948
+ B != !0 || Z || (Z = new c(44).StereoEffect(x)), x.setSize(k(), j()), this.camera.updateProjectionMatrix(), Y = B;
34945
34949
  }, this.objectIsInScene = (B) => O.objectIsInRegion(B, !0), this.alignBoundingBoxToCameraView = (B, Q) => {
34946
34950
  if (B) {
34947
34951
  B.getCenter(re);
@@ -35220,27 +35224,27 @@ void main() {
35220
35224
  this.toBeDownloaded = 0, this.progressMap = {};
35221
35225
  var g = !1, M = !1, w = new h();
35222
35226
  this.getDownloadProgress = () => {
35223
- var j = 0, $ = 0, X = !1;
35227
+ var W = 0, $ = 0, X = !1;
35224
35228
  for (var K in this.progressMap) {
35225
35229
  var re = this.progressMap[K];
35226
- j += re[1], $ += re[0], re[1] == 0 && (X = !0);
35230
+ W += re[1], $ += re[0], re[1] == 0 && (X = !0);
35227
35231
  }
35228
- return X && (j = 0), [j, $, M];
35229
- }, this.onProgress = (j) => ($) => {
35230
- this.progressMap[j] = [$.loaded, $.total];
35231
- }, this.onError = (j) => ($) => {
35232
- --this.toBeDownloaded, M = !0, console.error("There is an issue with external resource ".concat($ != null && $.responseURL ? ": " + ($ == null ? void 0 : $.responseURL) : "", ".")), j && j({ type: "Error", xhr: $ });
35232
+ return X && (W = 0), [W, $, M];
35233
+ }, this.onProgress = (W) => ($) => {
35234
+ this.progressMap[W] = [$.loaded, $.total];
35235
+ }, this.onError = (W) => ($) => {
35236
+ --this.toBeDownloaded, M = !0, console.error("There is an issue with external resource ".concat($ != null && $.responseURL ? ": " + ($ == null ? void 0 : $.responseURL) : "", ".")), W && W({ type: "Error", xhr: $ });
35233
35237
  };
35234
- var S = (j, $) => {
35238
+ var S = (W, $) => {
35235
35239
  var X = $.Default;
35236
35240
  if ($.Inline) v.setupMultipleViews(X, $.Entries);
35237
35241
  else {
35238
35242
  var K = [], re = function(le) {
35239
- j && (newURL = u(W, j), K.push(new Promise((ce, H) => {
35243
+ W && (newURL = u(j, W), K.push(new Promise((ce, H) => {
35240
35244
  fetch(newURL).then((V) => V.json()).then((V) => ce({ key: le, data: V })).catch((V) => H(V));
35241
35245
  })));
35242
35246
  };
35243
- for (var [k, W] of Object.entries($.Entries)) re(k);
35247
+ for (var [k, j] of Object.entries($.Entries)) re(k);
35244
35248
  Promise.all(K).then((oe) => {
35245
35249
  var le = {};
35246
35250
  oe.forEach((H) => {
@@ -35251,18 +35255,18 @@ void main() {
35251
35255
  });
35252
35256
  }
35253
35257
  };
35254
- this.loadViewURL = (j, $) => {
35258
+ this.loadViewURL = (W, $) => {
35255
35259
  this.toBeDownloaded += 1;
35256
35260
  var X = new XMLHttpRequest();
35257
35261
  X.onreadystatechange = () => {
35258
35262
  if (X.readyState == 4) if (X.status == 200) {
35259
35263
  var re = JSON.parse(X.responseText);
35260
35264
  v.setupMultipleViews("default", { default: re }), v.resetView(), g = !0, --this.toBeDownloaded, $ != null && typeof $ == "function" && $();
35261
- } else this.onError($)({ responseURL: j });
35265
+ } else this.onError($)({ responseURL: W });
35262
35266
  };
35263
- var K = d(j);
35267
+ var K = d(W);
35264
35268
  X.open("GET", K, !0), X.send();
35265
- }, this.loadModelsURL = (j, $, X, K, re, k, W) => {
35269
+ }, this.loadModelsURL = (W, $, X, K, re, k, j) => {
35266
35270
  var oe = $.length;
35267
35271
  this.toBeDownloaded += oe;
35268
35272
  for (var le = 0; le < oe; le++) {
@@ -35271,165 +35275,165 @@ void main() {
35271
35275
  var B = 0;
35272
35276
  re != null && re[le] != null && (B = !!re[le]);
35273
35277
  var Q = 0;
35274
- k != null && k[le] != null && (Q = !!k[le]), w.load(d(ce), C(j, H, V, B, Q, void 0, void 0, void 0, void 0, W), this.onProgress(ce), this.onError(W));
35278
+ k != null && k[le] != null && (Q = !!k[le]), w.load(d(ce), C(W, H, V, B, Q, void 0, void 0, void 0, void 0, j), this.onProgress(ce), this.onError(j));
35275
35279
  }
35276
- }, this.loadFromViewURL = (j, $, X) => {
35280
+ }, this.loadFromViewURL = (W, $, X) => {
35277
35281
  var K = new XMLHttpRequest();
35278
35282
  K.onreadystatechange = () => {
35279
35283
  if (K.readyState == 4 && K.status == 200) {
35280
35284
  var k = JSON.parse(K.responseText);
35281
35285
  v.loadView(k);
35282
- for (var W, oe = [], le = $ + "_", ce = 0; ce < k.numberOfResources; ce++) W = le + (ce + 1) + ".json", oe.push(W);
35283
- this.loadModelsURL(j, oe, k.colour, k.opacity, k.timeEnabled, k.morphColour, X);
35286
+ for (var j, oe = [], le = $ + "_", ce = 0; ce < k.numberOfResources; ce++) j = le + (ce + 1) + ".json", oe.push(j);
35287
+ this.loadModelsURL(W, oe, k.colour, k.opacity, k.timeEnabled, k.morphColour, X);
35284
35288
  }
35285
35289
  };
35286
35290
  var re = d($ + "_view.json");
35287
35291
  K.open("GET", re, !0), K.send();
35288
35292
  };
35289
- var x = (j, $, X, K, re, k, W, oe, le) => (ce, H) => {
35293
+ var x = (W, $, X, K, re, k, j, oe, le) => (ce, H) => {
35290
35294
  var V = oe ? new (c(39)).TubeLines() : new (c(24)).Lines(), B = void 0;
35291
35295
  H && H[0] && (B = new l.LineBasicMaterial({ color: H[0].color.clone() }), 1 > H[0].opacity && (B.transparent = !0), B.opacity = H[0].opacity, B.morphTargets = $, B.vertexColors = H[0].vertexColors);
35292
35296
  var Q = { localTimeEnabled: $, localMorphColour: X };
35293
- if (V && (V.createLineSegment(ce, B, Q), V.setName(K), V.setAnatomicalId(re), V.setRenderOrder(k), j.addZincObject(V), V.setDuration(v.getDuration()), W && W.levels)) for (var [ie, he] of Object.entries(W.levels)) V.addLOD(w, ie, he.URL, he.Index, W.preload);
35297
+ if (V && (V.createLineSegment(ce, B, Q), V.setName(K), V.setAnatomicalId(re), V.setRenderOrder(k), W.addZincObject(V), V.setDuration(v.getDuration()), j && j.levels)) for (var [ie, he] of Object.entries(j.levels)) V.addLOD(w, ie, he.URL, he.Index, j.preload);
35294
35298
  --this.toBeDownloaded, ce.dispose(), le != null && typeof le == "function" && le(V);
35295
35299
  };
35296
- this.loadLinesURL = (j, $, X, K, re, k, W) => {
35300
+ this.loadLinesURL = (W, $, X, K, re, k, j) => {
35297
35301
  var oe = 0;
35298
35302
  this.toBeDownloaded += 1;
35299
- var le = !!(W != null && W.isInline) && W.isInline, ce = W != null && W.anatomicalId ? W.anatomicalId : void 0, H = W != null && W.renderOrder ? W.renderOrder : void 0;
35303
+ var le = !!(j != null && j.isInline) && j.isInline, ce = j != null && j.anatomicalId ? j.anatomicalId : void 0, H = j && "renderOrder" in j ? j.renderOrder : void 0;
35300
35304
  X != null && (oe = !!X);
35301
35305
  var V = 0;
35302
35306
  K != null && (V = !!K);
35303
- var B = W.tubeLines && !oe && !V;
35307
+ var B = j.tubeLines && !oe && !V;
35304
35308
  if (le) {
35305
35309
  var Q = w.parse($);
35306
- x(j, oe, V, re, ce, H, W.lod, B, k)(Q.geometry, Q.materials);
35307
- } else w.load($, x(j, oe, V, re, ce, H, W.lod, B, k), this.onProgress($), this.onError(k), W.loaderOptions);
35310
+ x(W, oe, V, re, ce, H, j.lod, B, k)(Q.geometry, Q.materials);
35311
+ } else w.load($, x(W, oe, V, re, ce, H, j.lod, B, k), this.onProgress($), this.onError(k), j.loaderOptions);
35308
35312
  };
35309
- var E = (j, $, X, K, re) => (k) => {
35310
- var W = k;
35311
- (typeof W == "string" || W instanceof String) && (W = JSON.parse(k));
35312
- var oe = re && re.isInline ? re.isInline : void 0, le = re && re.anatomicalId ? re.anatomicalId : void 0, ce = re && re.displayLabels ? re.displayLabels : void 0, H = re && re.renderOrder ? re.renderOrder : void 0, V = new (c(18)).Glyphset();
35313
+ var E = (W, $, X, K, re) => (k) => {
35314
+ var j = k;
35315
+ (typeof j == "string" || j instanceof String) && (j = JSON.parse(k));
35316
+ var oe = re && re.isInline ? re.isInline : void 0, le = re && re.anatomicalId ? re.anatomicalId : void 0, ce = re && re.displayLabels ? re.displayLabels : void 0, H = re && "renderOrder" in re ? re.renderOrder : void 0, V = new (c(18)).Glyphset();
35313
35317
  V.setDuration(v.getDuration()), V.groupName = X;
35314
35318
  var B = () => {
35315
35319
  --this.toBeDownloaded, K != null && typeof K == "function" && K(V);
35316
35320
  };
35317
- ++this.toBeDownloaded, oe ? V.load(W, $, B, oe, ce) : V.load(W, d($), B, oe, ce), V.setAnatomicalId(le), V.setRenderOrder(H), j.addZincObject(V);
35321
+ ++this.toBeDownloaded, oe ? V.load(j, $, B, oe, ce) : V.load(j, d($), B, oe, ce), V.setAnatomicalId(le), V.setRenderOrder(H), W.addZincObject(V);
35318
35322
  };
35319
- this.loadGlyphsetURL = (j, $, X, K, re, k) => {
35320
- var W = !!(k && k.isInline) && k.isInline;
35321
- W ? E(j, X, K, re, k)($) : w.load($, E(j, X, K, re, k), this.onProgress($), this.onError(re), k.loaderOptions);
35323
+ this.loadGlyphsetURL = (W, $, X, K, re, k) => {
35324
+ var j = !!(k && k.isInline) && k.isInline;
35325
+ j ? E(W, X, K, re, k)($) : w.load($, E(W, X, K, re, k), this.onProgress($), this.onError(re), k.loaderOptions);
35322
35326
  };
35323
- var F = (j, $, X, K, re, k, W) => (oe, le) => {
35327
+ var F = (W, $, X, K, re, k, j) => (oe, le) => {
35324
35328
  var ce = new (c(22)).Pointset(), H = new l.PointsMaterial({ alphaTest: 0.5, size: 10, sizeAttenuation: !1 });
35325
35329
  le && le[0] && (1 > le[0].opacity && (H.transparent = !0), H.opacity = le[0].opacity, H.color = le[0].color, H.morphTargets = $, H.vertexColors = le[0].vertexColors);
35326
35330
  var V = {};
35327
- V.localTimeEnabled = $, V.localMorphColour = X, ce && (ce.createMesh(oe, H, V), ce.setName(K), ce.setAnatomicalId(re), j.addZincObject(ce), ce.setDuration(v.getDuration()), ce.setRenderOrder(k)), oe.dispose(), --this.toBeDownloaded, W != null && typeof W == "function" && W(ce);
35331
+ V.localTimeEnabled = $, V.localMorphColour = X, ce && (ce.createMesh(oe, H, V), ce.setName(K), ce.setAnatomicalId(re), W.addZincObject(ce), ce.setDuration(v.getDuration()), ce.setRenderOrder(k)), oe.dispose(), --this.toBeDownloaded, j != null && typeof j == "function" && j(ce);
35328
35332
  };
35329
- this.loadSTL = (j, $, X, K) => {
35333
+ this.loadSTL = (W, $, X, K) => {
35330
35334
  this.toBeDownloaded += 1;
35331
- var re = c(0).defaultMaterialColor, k = c(0).defaultOpacity, W = new m();
35332
- W.crossOrigin = "Anonymous", W.load(d($), C(j, re, k, !1, !1, X, void 0, void 0, void 0, K));
35333
- }, this.loadOBJ = (j, $, X, K) => {
35335
+ var re = c(0).defaultMaterialColor, k = c(0).defaultOpacity, j = new m();
35336
+ j.crossOrigin = "Anonymous", j.load(d($), C(W, re, k, !1, !1, X, void 0, void 0, void 0, K));
35337
+ }, this.loadOBJ = (W, $, X, K) => {
35334
35338
  this.toBeDownloaded += 1;
35335
- var re = c(0).defaultMaterialColor, k = c(0).defaultOpacity, W = new p();
35336
- W.crossOrigin = "Anonymous", W.load(d($), C(j, re, k, !1, !1, X, void 0, void 0, void 0, K));
35339
+ var re = c(0).defaultMaterialColor, k = c(0).defaultOpacity, j = new p();
35340
+ j.crossOrigin = "Anonymous", j.load(d($), C(W, re, k, !1, !1, X, void 0, void 0, void 0, K));
35337
35341
  };
35338
- var L = (j, $, X, K, re, k, W) => {
35342
+ var L = (W, $, X, K, re, k, j) => {
35339
35343
  this.toBeDownloaded += 1;
35340
- var oe = c(0).defaultMaterialColor, le = c(0).defaultOpacity, ce = 0, H = !!(W && W.isInline) && W.isInline, V = W && W.fileFormat ? W.fileFormat : void 0, B = W && W.anatomicalId ? W.anatomicalId : void 0, Q = W && W.renderOrder ? W.renderOrder : void 0;
35344
+ var oe = c(0).defaultMaterialColor, le = c(0).defaultOpacity, ce = 0, H = !!(j && j.isInline) && j.isInline, V = j && j.fileFormat ? j.fileFormat : void 0, B = j && j.anatomicalId ? j.anatomicalId : void 0, Q = j && "renderOrder" in j ? j.renderOrder : void 0;
35341
35345
  X != null && (ce = !!X);
35342
35346
  var ie = 0;
35343
35347
  K != null && (ie = !!K);
35344
35348
  var he = w;
35345
35349
  if (V !== void 0) {
35346
35350
  if (V == "STL") he = new m();
35347
- else if (V == "OBJ") return he = new p(), he.crossOrigin = "Anonymous", void he.load($, objloader(j, oe, le, ce, ie, re, B, k), this.onProgress($), this.onError, W.loaderOptions);
35351
+ else if (V == "OBJ") return he = new p(), he.crossOrigin = "Anonymous", void he.load($, objloader(W, oe, le, ce, ie, re, B, k), this.onProgress($), this.onError, j.loaderOptions);
35348
35352
  }
35349
35353
  if (H) {
35350
35354
  var xe = w.parse($);
35351
- C(j, oe, le, ce, ie, re, B, Q, W, k)(xe.geometry, xe.materials);
35352
- } else he.crossOrigin = "Anonymous", w.load($, C(j, oe, le, ce, ie, re, B, Q, W, k), this.onProgress($), this.onError(k), W.loaderOptions);
35355
+ C(W, oe, le, ce, ie, re, B, Q, j, k)(xe.geometry, xe.materials);
35356
+ } else he.crossOrigin = "Anonymous", w.load($, C(W, oe, le, ce, ie, re, B, Q, j, k), this.onProgress($), this.onError(k), j.loaderOptions);
35353
35357
  }, P = function($, X, K) {
35354
35358
  var re = 0;
35355
35359
  return (k) => {
35356
35360
  if (++re, k && X != null && typeof X == "function" && X(k), re == $ && (g == !1 && v.viewAll(), K != null && typeof K == "function")) {
35357
35361
  K();
35358
- var W = v.getZincCameraControls();
35359
- W && W.calculateMaxAllowedDistance(v);
35362
+ var j = v.getZincCameraControls();
35363
+ j && j.calculateMaxAllowedDistance(v);
35360
35364
  }
35361
35365
  };
35362
35366
  };
35363
- this.loadPointsetURL = (j, $, X, K, re, k, W) => {
35367
+ this.loadPointsetURL = (W, $, X, K, re, k, j) => {
35364
35368
  var oe = 0;
35365
35369
  this.toBeDownloaded += 1, X != null && (oe = !!X);
35366
35370
  var le = 0;
35367
35371
  K != null && (le = !!K);
35368
- var ce = !!(W && W.isInline) && W.isInline, H = W && W.anatomicalId ? W.anatomicalId : void 0, V = W && W.renderOrder ? W.renderOrder : void 0;
35372
+ var ce = !!(j && j.isInline) && j.isInline, H = j && j.anatomicalId ? j.anatomicalId : void 0, V = j && "renderOrder" in j ? j.renderOrder : void 0;
35369
35373
  if (ce) {
35370
35374
  var B = w.parse($);
35371
- F(j, oe, le, re, H, V, k)(B.geometry, B.materials);
35372
- } else w.load($, F(j, oe, le, re, H, V, k), this.onProgress($), this.onError(k), W.loaderOptions);
35375
+ F(W, oe, le, re, H, V, k)(B.geometry, B.materials);
35376
+ } else w.load($, F(W, oe, le, re, H, V, k), this.onProgress($), this.onError(k), j.loaderOptions);
35373
35377
  };
35374
- var A = (j, $, X, K, re, k) => {
35375
- var W = k && k.isInline ? k.isInline : void 0, oe = k && k.anatomicalId ? k.anatomicalId : void 0, le = k && k.renderOrder ? k.renderOrder : void 0, ce = void 0;
35378
+ var A = (W, $, X, K, re, k) => {
35379
+ var j = k && k.isInline ? k.isInline : void 0, oe = k && k.anatomicalId ? k.anatomicalId : void 0, le = k && "renderOrder" in k ? k.renderOrder : void 0, ce = void 0;
35376
35380
  if (X) {
35377
35381
  if ($ && X.images && X.images.source) for (var H, V = X.images.source, B = 0; B < V.length; B++) H = u(V[B], $), X.images.source[B] = H;
35378
35382
  if (X.type === "slides" && (ce = new (c(27)).TextureSlides()), ce) {
35379
35383
  ce.groupName = K;
35380
35384
  var Q = () => {
35381
- j.addZincObject(ce), --this.toBeDownloaded, re != null && typeof re == "function" && re(ce);
35385
+ W.addZincObject(ce), --this.toBeDownloaded, re != null && typeof re == "function" && re(ce);
35382
35386
  };
35383
- ++this.toBeDownloaded, ce.load(X, Q, W), ce.setAnatomicalId(oe), ce.setRenderOrder(le);
35387
+ ++this.toBeDownloaded, ce.load(X, Q, j), ce.setAnatomicalId(oe), ce.setRenderOrder(le);
35384
35388
  }
35385
35389
  }
35386
- }, _ = (j, $, X, K, re) => () => {
35390
+ }, _ = (W, $, X, K, re) => () => {
35387
35391
  if ($.readyState == 4 && $.status == 200) {
35388
35392
  var k = JSON.parse($.responseText);
35389
- A(j, $.responseURL, k, X, K, re);
35393
+ A(W, $.responseURL, k, X, K, re);
35390
35394
  }
35391
35395
  };
35392
- this.loadTextureURL = (j, $, X, K, re) => {
35396
+ this.loadTextureURL = (W, $, X, K, re) => {
35393
35397
  var k = !!(re && re.isInline) && re.isInline;
35394
- if (k) A(j, void 0, $, X, K, re);
35398
+ if (k) A(W, void 0, $, X, K, re);
35395
35399
  else {
35396
- var W = new XMLHttpRequest();
35397
- W.onreadystatechange = _(j, W, X, K, re), W.open("GET", d($), !0), W.send();
35400
+ var j = new XMLHttpRequest();
35401
+ j.onreadystatechange = _(W, j, X, K, re), j.open("GET", d($), !0), j.send();
35398
35402
  }
35399
35403
  };
35400
- var T = (j, $, X, K, re, k, W, oe, le, ce, H) => {
35404
+ var T = (W, $, X, K, re, k, j, oe, le, ce, H) => {
35401
35405
  var V = { colour: X, opacity: K, localTimeEnabled: re, localMorphColour: k }, B = new (c(3)).Geometry();
35402
- return B.createMesh($, oe, V), B.getMorph() ? (B.setName(le), B.setRenderOrder(ce), B.setAnatomicalId(H), j && j.addZincObject(B), B.setDuration(v.getDuration()), B.videoHandler && v.setVideoHandler(B.videoHandler), B) : void 0;
35403
- }, C = (j, $, X, K, re, k, W, oe, le, ce) => (H, V) => {
35406
+ return B.createMesh($, oe, V), B.getMorph() ? (B.setName(le), B.setRenderOrder(ce), B.setAnatomicalId(H), W && W.addZincObject(B), B.setDuration(v.getDuration()), B.videoHandler && v.setVideoHandler(B.videoHandler), B) : void 0;
35407
+ }, C = (W, $, X, K, re, k, j, oe, le, ce) => (H, V) => {
35404
35408
  var B;
35405
35409
  V && V[0] && (B = V[0]);
35406
- var Q = T(j, H, $, X, K, re, void 0, B, k, oe, W);
35410
+ var Q = T(W, H, $, X, K, re, void 0, B, k, oe, j);
35407
35411
  if (le.lod && le.lod.levels) for (var [ie, he] of Object.entries(le.lod.levels)) Q.addLOD(w, ie, he.URL, he.Index, le.lod.preload);
35408
35412
  --this.toBeDownloaded, H.dispose(), ce != null && typeof ce == "function" && ce(Q);
35409
- }, R = (j) => {
35410
- var $ = /P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/, [, X, K, re, k, W, oe, le] = j.match($);
35411
- return { years: X, months: K, weeks: re, days: k, hours: W, mins: oe, secs: le };
35413
+ }, R = (W) => {
35414
+ var $ = /P(?:(\d+)Y)?(?:(\d+)M)?(?:(\d+)W)?(?:(\d+)D)?(?:T(?:(\d+)H)?(?:(\d+)M)?(?:(\d+)S)?)?$/, [, X, K, re, k, j, oe, le] = W.match($);
35415
+ return { years: X, months: K, weeks: re, days: k, hours: j, mins: oe, secs: le };
35412
35416
  };
35413
- this.loadSettings = (j) => {
35414
- if (j) {
35415
- if (j.Duration) {
35416
- var $ = R(j.Duration);
35417
+ this.loadSettings = (W) => {
35418
+ if (W) {
35419
+ if (W.Duration) {
35420
+ var $ = R(W.Duration);
35417
35421
  v.setDurationFromObject($);
35418
35422
  }
35419
- if (j.OriginalDuration) {
35420
- var X = R(j.OriginalDuration);
35423
+ if (W.OriginalDuration) {
35424
+ var X = R(W.OriginalDuration);
35421
35425
  v.setOriginalDurationFromObject(X);
35422
35426
  }
35423
- if (j.TimeStamps) for (var K in j.TimeStamps) {
35424
- var re = R(j.TimeStamps[K]);
35427
+ if (W.TimeStamps) for (var K in W.TimeStamps) {
35428
+ var re = R(W.TimeStamps[K]);
35425
35429
  v.addMetadataTimeStamp(K, re);
35426
35430
  }
35427
35431
  }
35428
35432
  };
35429
- var b = (j, $, X, K, re) => {
35433
+ var b = (W, $, X, K, re) => {
35430
35434
  if (X) {
35431
- var k = void 0, W = !1;
35432
- X.URL ? (k = X.URL, $ && (k = u(k, $))) : X.Inline && (k = X.Inline.URL, W = !0);
35435
+ var k = void 0, j = !1;
35436
+ X.URL ? (k = X.URL, $ && (k = u(k, $))) : X.Inline && (k = X.Inline.URL, j = !0);
35433
35437
  var oe = {};
35434
35438
  if (X.LOD && X.LOD.Levels) {
35435
35439
  oe.preload = !!X.LOD.Preload, oe.levels = {};
@@ -35437,30 +35441,30 @@ void main() {
35437
35441
  }
35438
35442
  var H = X.GroupName;
35439
35443
  (H === void 0 || H === "") && (H = "_Unnamed");
35440
- var V = { loaderOptions: { index: X.Index }, isInline: W, fileFormat: X.FileFormat, anatomicalId: X.AnatomicalId, compression: X.compression, tubeLines: X.tubeLines, lod: oe, renderOrder: K };
35444
+ var V = { loaderOptions: { index: X.Index }, isInline: j, fileFormat: X.FileFormat, anatomicalId: X.AnatomicalId, compression: X.compression, tubeLines: X.tubeLines, lod: oe, renderOrder: K };
35441
35445
  switch (X.Type) {
35442
35446
  case "Surfaces":
35443
- L(j, k, X.MorphVertices, X.MorphColours, H, re, V);
35447
+ L(W, k, X.MorphVertices, X.MorphColours, H, re, V);
35444
35448
  break;
35445
35449
  case "Glyph":
35446
35450
  var B;
35447
- W ? B = X.Inline.GlyphGeometriesURL : (B = X.GlyphGeometriesURL, B = u(X.GlyphGeometriesURL, $)), X.DisplayLabels && (V.displayLabels = !0), V.loaderOptions.isGlyphsets = !0, this.loadGlyphsetURL(j, k, B, H, re, V);
35451
+ j ? B = X.Inline.GlyphGeometriesURL : (B = X.GlyphGeometriesURL, B = u(X.GlyphGeometriesURL, $)), X.DisplayLabels && (V.displayLabels = !0), V.loaderOptions.isGlyphsets = !0, this.loadGlyphsetURL(W, k, B, H, re, V);
35448
35452
  break;
35449
35453
  case "Points":
35450
- this.loadPointsetURL(j, k, X.MorphVertices, X.MorphColours, H, re, V);
35454
+ this.loadPointsetURL(W, k, X.MorphVertices, X.MorphColours, H, re, V);
35451
35455
  break;
35452
35456
  case "Lines":
35453
- this.loadLinesURL(j, k, X.MorphVertices, X.MorphColours, H, re, V);
35457
+ this.loadLinesURL(W, k, X.MorphVertices, X.MorphColours, H, re, V);
35454
35458
  break;
35455
35459
  case "Texture":
35456
- this.loadTextureURL(j, k, H, re, V);
35460
+ this.loadTextureURL(W, k, H, re, V);
35457
35461
  break;
35458
35462
  }
35459
35463
  }
35460
- }, I = (j, $, X) => {
35464
+ }, I = (W, $, X) => {
35461
35465
  if ($) {
35462
35466
  var K = void 0, re = !1;
35463
- switch ($.URL ? (K = $.URL, j && (K = u($.URL, j))) : $.Inline && (K = $.Inline.URL, re = !0), $.Type) {
35467
+ switch ($.URL ? (K = $.URL, W && (K = u($.URL, W))) : $.Inline && (K = $.Inline.URL, re = !0), $.Type) {
35464
35468
  case "View":
35465
35469
  re ? (v.setupMultipleViews("default", { default: K }), g = !0, X != null && typeof X == "function" && X()) : this.loadViewURL(K, X);
35466
35470
  break;
@@ -35470,63 +35474,63 @@ void main() {
35470
35474
  }
35471
35475
  }
35472
35476
  };
35473
- this.loadGLTF = (j, $, X, K, re) => {
35477
+ this.loadGLTF = (W, $, X, K, re) => {
35474
35478
  var k = new (c(40)).GLTFToZincJSLoader();
35475
- k.load(v, j, $, X, K, re);
35479
+ k.load(v, W, $, X, K, re);
35476
35480
  };
35477
- var D = (j, $, X, K) => {
35481
+ var D = (W, $, X, K) => {
35478
35482
  if (X.Primitives && X.Primitives.forEach((oe) => {
35479
35483
  var le = 1;
35480
- oe.Order && (le = oe.Order), b(j, $, oe, le, K);
35481
- }), X.Transformation && j.setTransformation(X.Transformation), X.Children) for (var [re, k] of Object.entries(X.Children)) {
35482
- var W = j.findOrCreateChildFromPath(re);
35483
- W && D(W, $, k, K);
35484
+ oe.Order && (le = oe.Order), b(W, $, oe, le, K);
35485
+ }), X.Transformation && W.setTransformation(X.Transformation), X.Children) for (var [re, k] of Object.entries(X.Children)) {
35486
+ var j = W.findOrCreateChildFromPath(re);
35487
+ j && D(j, $, k, K);
35484
35488
  }
35485
- }, O = (j, $) => {
35486
- var X, K, re = j, k = $ == null || (X = $.enabled) === null || X === void 0 ? void 0 : X.include, W = $ == null || (K = $.enabled) === null || K === void 0 ? void 0 : K.exclude, oe = $ == null ? void 0 : $.tubeLines;
35487
- return (k != null && k.length || W != null && W.length) && (k && (re = j.filter((le) => {
35489
+ }, O = (W, $) => {
35490
+ var X, K, re = W, k = $ == null || (X = $.enabled) === null || X === void 0 ? void 0 : X.include, j = $ == null || (K = $.enabled) === null || K === void 0 ? void 0 : K.exclude, oe = $ == null ? void 0 : $.tubeLines;
35491
+ return (k != null && k.length || j != null && j.length) && (k && (re = W.filter((le) => {
35488
35492
  if (le.Type === "View") return !0;
35489
35493
  for (var ce = 0; ce < k.length; ce++) if (f(le.RegionPath, le.GroupName, k[ce])) return !0;
35490
35494
  return !1;
35491
- })), W && (re = re.filter((le) => {
35495
+ })), j && (re = re.filter((le) => {
35492
35496
  if (le.Type === "View") return !0;
35493
- for (var ce = 0; ce < W.length; ce++) if (f(le.RegionPath, le.GroupName, W[ce])) return !1;
35497
+ for (var ce = 0; ce < j.length; ce++) if (f(le.RegionPath, le.GroupName, j[ce])) return !1;
35494
35498
  return !0;
35495
35499
  }))), oe && re.forEach((le) => {
35496
35500
  le.Type === "Lines" && (le.tubeLines = !0);
35497
35501
  }), re;
35498
- }, U = (j, $) => Array.isArray(j) ? O(j, $) : j, z = (j, $) => {
35499
- if (Array.isArray(j)) {
35500
- for (var X = 0, K = 0; K < j.length; K++) j[K].Type && ($ && j[K].Type === "View" || j[K].Type === "Surfaces" || j[K].Type === "Glyph" || j[K].Type === "Points" || j[K].Type === "Lines" || j[K].Type === "Texture") && X++;
35502
+ }, U = (W, $) => Array.isArray(W) ? O(W, $) : W, z = (W, $) => {
35503
+ if (Array.isArray(W)) {
35504
+ for (var X = 0, K = 0; K < W.length; K++) W[K].Type && ($ && W[K].Type === "View" || W[K].Type === "Surfaces" || W[K].Type === "Glyph" || W[K].Type === "Points" || W[K].Type === "Lines" || W[K].Type === "Texture") && X++;
35501
35505
  return X;
35502
35506
  }
35503
35507
  return 0;
35504
- }, G = (j) => {
35505
- var $ = j.Primitives ? z(j.Primitives, !1) : 0;
35506
- return j.Children && Object.values(j.Children).forEach((X) => {
35508
+ }, G = (W) => {
35509
+ var $ = W.Primitives ? z(W.Primitives, !1) : 0;
35510
+ return W.Children && Object.values(W.Children).forEach((X) => {
35507
35511
  $ += G(X);
35508
35512
  }), $;
35509
- }, Y = (j) => Array.isArray(j) ? z(j, !0) : typeof j == "object" && j !== null && j.Version === "2.0" ? G(j.Regions) : void 0, Z = (j, $, X, K, re) => {
35510
- var k = j;
35511
- X.RegionPath && X.RegionPath !== "" && (k = j.findOrCreateChildFromPath(X.RegionPath)), b(k, $, X, 2 * K, re);
35512
- }, te = (j, $, X, K, re, k) => {
35513
- for (var W = U($, k), oe = Y(W), le = new P(oe, K, re), ce = 0; ce < $.length; ce++) I(X, W[ce], le);
35514
- for (var H = 0; H < $.length; H++) Z(j, X, W[H], H, le);
35515
- }, q = (j, $, X, K, re) => {
35516
- var k = Y($), W = new P(k, K, re);
35517
- $.Settings && this.loadSettings($.Settings), $.Views && S(X, $.Views), $.Regions && D(j, X, $.Regions, W);
35513
+ }, Y = (W) => Array.isArray(W) ? z(W, !0) : typeof W == "object" && W !== null && W.Version === "2.0" ? G(W.Regions) : void 0, Z = (W, $, X, K, re) => {
35514
+ var k = W;
35515
+ X.RegionPath && X.RegionPath !== "" && (k = W.findOrCreateChildFromPath(X.RegionPath)), b(k, $, X, 2 * K, re);
35516
+ }, te = (W, $, X, K, re, k) => {
35517
+ for (var j = U($, k), oe = Y(j), le = new P(oe, K, re), ce = 0; ce < $.length; ce++) I(X, j[ce], le);
35518
+ for (var H = 0; H < $.length; H++) Z(W, X, j[H], H, le);
35519
+ }, q = (W, $, X, K, re) => {
35520
+ var k = Y($), j = new P(k, K, re);
35521
+ $.Settings && this.loadSettings($.Settings), $.Views && S(X, $.Views), $.Regions && D(W, X, $.Regions, j);
35518
35522
  };
35519
- this.loadMetadataURL = (j, $, X, K, re) => {
35520
- var k = new XMLHttpRequest(), W = d($);
35523
+ this.loadMetadataURL = (W, $, X, K, re) => {
35524
+ var k = new XMLHttpRequest(), j = d($);
35521
35525
  k.onreadystatechange = () => {
35522
35526
  if (k.readyState == 4 && k.status == 200) {
35523
35527
  v.resetMetadata(), v.resetDuration(), g = !1;
35524
35528
  var oe = k.responseURL;
35525
- oe === void 0 && (oe = new URL(W).href);
35529
+ oe === void 0 && (oe = new URL(j).href);
35526
35530
  var le = JSON.parse(k.responseText);
35527
- Array.isArray(le) ? te(j, le, oe, X, K, re) : typeof le == "object" && le !== null && le.Version == "2.0" && q(j, le, oe, X, K);
35531
+ Array.isArray(le) ? te(W, le, oe, X, K, re) : typeof le == "object" && le !== null && le.Version == "2.0" && q(W, le, oe, X, K);
35528
35532
  }
35529
- }, k.open("GET", W, !0), k.send();
35533
+ }, k.open("GET", j, !0), k.send();
35530
35534
  };
35531
35535
  };
35532
35536
  },
@@ -35743,13 +35747,13 @@ void main() {
35743
35747
  U.push(Y);
35744
35748
  }
35745
35749
  for (var Z = U[0], te = 1, q = U.length - 1; te < q; te++) {
35746
- var j = U[te], $ = U[te + 1];
35747
- E.addFace(Z[0], j[0], $[0], Z[1], j[1], $[1], Z[2], j[2], $[2]);
35750
+ var W = U[te], $ = U[te + 1];
35751
+ E.addFace(Z[0], W[0], $[0], Z[1], W[1], $[1], Z[2], W[2], $[2]);
35748
35752
  }
35749
35753
  } else if (P === "l") {
35750
35754
  var X = L.substring(1).trim().split(" "), K = [], re = [];
35751
35755
  if (L.indexOf("/") === -1) K = X;
35752
- else for (var k, W = 0, oe = X.length; W < oe; W++) k = X[W].split("/"), k[0] !== "" && K.push(k[0]), k[1] !== "" && re.push(k[1]);
35756
+ else for (var k, j = 0, oe = X.length; j < oe; j++) k = X[j].split("/"), k[0] !== "" && K.push(k[0]), k[1] !== "" && re.push(k[1]);
35753
35757
  E.addLineGeometry(K, re);
35754
35758
  } else if (P === "p") {
35755
35759
  var le = L.substr(1).trim(), ce = le.split(" ");
@@ -36186,19 +36190,19 @@ void main() {
36186
36190
  X.setUint32(0, $.byteLength, !0), X.setUint32(4, M, !0);
36187
36191
  var K = L(S(JSON.stringify(z)), 32), re = new DataView(new ArrayBuffer(v));
36188
36192
  re.setUint32(0, K.byteLength, !0), re.setUint32(4, g, !0);
36189
- var k = new ArrayBuffer(p), W = new DataView(k);
36190
- W.setUint32(0, h, !0), W.setUint32(4, y, !0);
36193
+ var k = new ArrayBuffer(p), j = new DataView(k);
36194
+ j.setUint32(0, h, !0), j.setUint32(4, y, !0);
36191
36195
  var oe = p + re.byteLength + K.byteLength + X.byteLength + $.byteLength;
36192
- W.setUint32(8, oe, !0);
36196
+ j.setUint32(8, oe, !0);
36193
36197
  var le = new Blob([k, re, K, X, $], { type: "application/octet-stream" }), ce = new window.FileReader();
36194
36198
  ce.readAsArrayBuffer(le), ce.onloadend = function() {
36195
36199
  I(ce.result);
36196
36200
  };
36197
36201
  };
36198
36202
  } else if (z.buffers && 0 < z.buffers.length) {
36199
- var j = new window.FileReader();
36200
- j.readAsDataURL(Z), j.onloadend = function() {
36201
- var $ = j.result;
36203
+ var W = new window.FileReader();
36204
+ W.readAsDataURL(Z), W.onloadend = function() {
36205
+ var $ = W.result;
36202
36206
  z.buffers[0].uri = $, I(z);
36203
36207
  };
36204
36208
  } else I(z);
@@ -36292,7 +36296,7 @@ void main() {
36292
36296
  processBufferView(b, I, D, O, U) {
36293
36297
  var z = this.json;
36294
36298
  z.bufferViews || (z.bufferViews = []);
36295
- for (var G = I === u.UNSIGNED_BYTE ? 1 : I === u.UNSIGNED_SHORT ? 2 : 4, Y = F(O * b.itemSize * G), Z = new DataView(new ArrayBuffer(Y)), te = 0, q = D; q < D + O; q++) for (var j, $ = 0; $ < b.itemSize; $++) j = void 0, 4 < b.itemSize ? j = b.array[q * b.itemSize + $] : $ === 0 ? j = b.getX(q) : $ === 1 ? j = b.getY(q) : $ === 2 ? j = b.getZ(q) : $ == 3 && (j = b.getW(q)), I === u.FLOAT ? Z.setFloat32(te, j, !0) : I === u.UNSIGNED_INT ? Z.setUint32(te, j, !0) : I === u.UNSIGNED_SHORT ? Z.setUint16(te, j, !0) : I === u.UNSIGNED_BYTE && Z.setUint8(te, j), te += G;
36299
+ for (var G = I === u.UNSIGNED_BYTE ? 1 : I === u.UNSIGNED_SHORT ? 2 : 4, Y = F(O * b.itemSize * G), Z = new DataView(new ArrayBuffer(Y)), te = 0, q = D; q < D + O; q++) for (var W, $ = 0; $ < b.itemSize; $++) W = void 0, 4 < b.itemSize ? W = b.array[q * b.itemSize + $] : $ === 0 ? W = b.getX(q) : $ === 1 ? W = b.getY(q) : $ === 2 ? W = b.getZ(q) : $ == 3 && (W = b.getW(q)), I === u.FLOAT ? Z.setFloat32(te, W, !0) : I === u.UNSIGNED_INT ? Z.setUint32(te, W, !0) : I === u.UNSIGNED_SHORT ? Z.setUint16(te, W, !0) : I === u.UNSIGNED_BYTE && Z.setUint8(te, W), te += G;
36296
36300
  var X = { buffer: this.processBuffer(Z.buffer), byteOffset: this.byteOffset, byteLength: Y };
36297
36301
  U !== void 0 && (X.target = U), U === u.ARRAY_BUFFER && (X.byteStride = b.itemSize * G), this.byteOffset += Y, z.bufferViews.push(X);
36298
36302
  var K = { id: z.bufferViews.length - 1, byteLength: 0 };
@@ -36335,7 +36339,7 @@ void main() {
36335
36339
  if (O === 0) return null;
36336
36340
  var te, q = E(b, D, O);
36337
36341
  I !== void 0 && (te = b === I.index ? u.ELEMENT_ARRAY_BUFFER : u.ARRAY_BUFFER);
36338
- var j = this.processBufferView(b, U, D, O, te), $ = { bufferView: j.id, byteOffset: j.byteOffset, componentType: U, count: O, max: q.max, min: q.min, type: { 1: "SCALAR", 2: "VEC2", 3: "VEC3", 4: "VEC4", 16: "MAT4" }[b.itemSize] };
36342
+ var W = this.processBufferView(b, U, D, O, te), $ = { bufferView: W.id, byteOffset: W.byteOffset, componentType: U, count: O, max: q.max, min: q.min, type: { 1: "SCALAR", 2: "VEC2", 3: "VEC3", 4: "VEC4", 16: "MAT4" }[b.itemSize] };
36339
36343
  return b.normalized === !0 && ($.normalized = !0), G.accessors || (G.accessors = []), G.accessors.push($) - 1;
36340
36344
  }
36341
36345
  /**
@@ -36351,7 +36355,7 @@ void main() {
36351
36355
  var Z = U.images.get(b), te = I === l.RGBAFormat ? "image/png" : "image/jpeg", q = te + ":flipY/" + D.toString();
36352
36356
  if (Z[q] !== void 0) return Z[q];
36353
36357
  z.images || (z.images = []);
36354
- var j = { mimeType: te };
36358
+ var W = { mimeType: te };
36355
36359
  if (G.embedImages) {
36356
36360
  var $ = P = P || document.createElement("canvas");
36357
36361
  $.width = Math.min(b.width, G.maxTextureSize), $.height = Math.min(b.height, G.maxTextureSize);
@@ -36361,18 +36365,18 @@ void main() {
36361
36365
  I !== l.RGBAFormat && I !== l.RGBFormat && console.error("GLTFExporter: Only RGB and RGBA formats are supported."), (b.width > G.maxTextureSize || b.height > G.maxTextureSize) && console.warn("GLTFExporter: Image size is bigger than maxTextureSize", b);
36362
36366
  var K = new Uint8ClampedArray(4 * (b.height * b.width));
36363
36367
  if (I === l.RGBAFormat) for (var re = 0; re < K.length; re += 4) K[re + 0] = b.data[re + 0], K[re + 1] = b.data[re + 1], K[re + 2] = b.data[re + 2], K[re + 3] = b.data[re + 3];
36364
- else for (var k = 0, W = 0; k < K.length; k += 4, W += 3) K[k + 0] = b.data[W + 0], K[k + 1] = b.data[W + 1], K[k + 2] = b.data[W + 2], K[k + 3] = 255;
36368
+ else for (var k = 0, j = 0; k < K.length; k += 4, j += 3) K[k + 0] = b.data[j + 0], K[k + 1] = b.data[j + 1], K[k + 2] = b.data[j + 2], K[k + 3] = 255;
36365
36369
  X.putImageData(new ImageData(K, b.width, b.height), 0, 0);
36366
36370
  }
36367
36371
  G.binary === !0 ? Y.push(new Promise(function(le) {
36368
36372
  $.toBlob(function(ce) {
36369
36373
  O.processBufferViewImage(ce).then(function(H) {
36370
- j.bufferView = H, le();
36374
+ W.bufferView = H, le();
36371
36375
  });
36372
36376
  }, te);
36373
- })) : j.uri = $.toDataURL(te);
36374
- } else j.uri = b.src;
36375
- var oe = z.images.push(j) - 1;
36377
+ })) : W.uri = $.toDataURL(te);
36378
+ } else W.uri = b.src;
36379
+ var oe = z.images.push(W) - 1;
36376
36380
  return Z[q] = oe, oe;
36377
36381
  }
36378
36382
  /**
@@ -36435,8 +36439,8 @@ void main() {
36435
36439
  b.normalScale && b.normalScale.x !== -1 && (b.normalScale.x !== b.normalScale.y && console.warn("THREE.GLTFExporter: Normal scale components are different, ignoring Y and exporting X."), q.scale = b.normalScale.x), this.applyTextureTransform(q, b.normalMap), O.normalTexture = q;
36436
36440
  }
36437
36441
  if (b.aoMap) {
36438
- var j = { index: this.processTexture(b.aoMap), texCoord: 1 };
36439
- b.aoMapIntensity !== 1 && (j.strength = b.aoMapIntensity), this.applyTextureTransform(j, b.aoMap), O.occlusionTexture = j;
36442
+ var W = { index: this.processTexture(b.aoMap), texCoord: 1 };
36443
+ b.aoMapIntensity !== 1 && (W.strength = b.aoMapIntensity), this.applyTextureTransform(W, b.aoMap), O.occlusionTexture = W;
36440
36444
  }
36441
36445
  b.transparent ? O.alphaMode = "BLEND" : 0 < b.alphaTest && (O.alphaMode = "MASK", O.alphaCutoff = b.alphaTest), b.side === l.DoubleSide && (O.doubleSided = !0), b.name !== "" && (O.name = b.name), this.serializeUserData(b, O), this._invokeAll(function(X) {
36442
36446
  X.writeMaterial && X.writeMaterial(b, O);
@@ -36457,23 +36461,23 @@ void main() {
36457
36461
  if (I.meshes.has(G)) return I.meshes.get(G);
36458
36462
  var Y, Z = b.geometry;
36459
36463
  if (Y = b.isLineSegments ? u.LINES : b.isLineLoop ? u.LINE_LOOP : b.isLine ? u.LINE_STRIP : b.isPoints ? u.POINTS : b.material.wireframe ? u.LINES : u.TRIANGLES, Z.isBufferGeometry !== !0) throw new Error("THREE.GLTFExporter: Geometry is not of type THREE.BufferGeometry.");
36460
- var te = {}, q = {}, j = [], $ = [], X = { uv: "TEXCOORD_0", uv2: "TEXCOORD_1", color: "COLOR_0", skinWeight: "WEIGHTS_0", skinIndex: "JOINTS_0" }, K = Z.getAttribute("normal");
36464
+ var te = {}, q = {}, W = [], $ = [], X = { uv: "TEXCOORD_0", uv2: "TEXCOORD_1", color: "COLOR_0", skinWeight: "WEIGHTS_0", skinIndex: "JOINTS_0" }, K = Z.getAttribute("normal");
36461
36465
  K === void 0 || this.isNormalizedNormalAttribute(K) || (console.warn("THREE.GLTFExporter: Creating normalized normal attribute from the non-normalized one."), Z.setAttribute("normal", this.createNormalizedNormalAttribute(K)));
36462
36466
  var re = null;
36463
36467
  for (var k in Z.attributes)
36464
36468
  if (k.substr(0, 5) !== "morph") {
36465
- var W = Z.attributes[k];
36469
+ var j = Z.attributes[k];
36466
36470
  k = X[k] || k.toUpperCase();
36467
36471
  var oe = /^(POSITION|NORMAL|TANGENT|TEXCOORD_\d+|COLOR_\d+|JOINTS_\d+|WEIGHTS_\d+)$/;
36468
- if (oe.test(k) || (k = "_" + k), I.attributes.has(this.getUID(W))) {
36469
- q[k] = I.attributes.get(this.getUID(W));
36472
+ if (oe.test(k) || (k = "_" + k), I.attributes.has(this.getUID(j))) {
36473
+ q[k] = I.attributes.get(this.getUID(j));
36470
36474
  continue;
36471
36475
  }
36472
36476
  re = null;
36473
- var le = W.array;
36474
- k !== "JOINTS_0" || le instanceof Uint16Array || le instanceof Uint8Array || (console.warn('GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.'), re = new l.BufferAttribute(new Uint16Array(le), W.itemSize, W.normalized));
36475
- var ce = this.processAccessor(re || W, Z);
36476
- ce !== null && (q[k] = ce, I.attributes.set(this.getUID(W), ce));
36477
+ var le = j.array;
36478
+ k !== "JOINTS_0" || le instanceof Uint16Array || le instanceof Uint8Array || (console.warn('GLTFExporter: Attribute "skinIndex" converted to type UNSIGNED_SHORT.'), re = new l.BufferAttribute(new Uint16Array(le), j.itemSize, j.normalized));
36479
+ var ce = this.processAccessor(re || j, Z);
36480
+ ce !== null && (q[k] = ce, I.attributes.set(this.getUID(j), ce));
36477
36481
  }
36478
36482
  if (K !== void 0 && Z.setAttribute("normal", K), Object.keys(q).length === 0) return null;
36479
36483
  if (b.morphTargetInfluences !== void 0 && 0 < b.morphTargetInfluences.length) {
@@ -36510,9 +36514,9 @@ void main() {
36510
36514
  (ke[et].start !== void 0 || ke[et].count !== void 0) && (qt += ":" + ke[et].start + ":" + ke[et].count), I.attributes.has(qt) ? qe.indices = I.attributes.get(qt) : (qe.indices = this.processAccessor(Z.index, Z, ke[et].start, ke[et].count), I.attributes.set(qt, qe.indices)), qe.indices === null && delete qe.indices;
36511
36515
  }
36512
36516
  var Qt = this.processMaterial(At[ke[et].materialIndex]);
36513
- Qt !== null && (qe.material = Qt), j.push(qe);
36517
+ Qt !== null && (qe.material = Qt), W.push(qe);
36514
36518
  }
36515
- te.primitives = j, D.meshes || (D.meshes = []), this._invokeAll(function(Nt) {
36519
+ te.primitives = W, D.meshes || (D.meshes = []), this._invokeAll(function(Nt) {
36516
36520
  Nt.writeMesh && Nt.writeMesh(b, te);
36517
36521
  });
36518
36522
  var It = D.meshes.push(te) - 1;
@@ -36543,12 +36547,12 @@ void main() {
36543
36547
  var D = this.json, O = this.nodeMap;
36544
36548
  D.animations || (D.animations = []), b = d.Utils.mergeMorphTargetTracks(b.clone(), I);
36545
36549
  for (var U = b.tracks, z = [], G = [], Y = 0; Y < U.length; ++Y) {
36546
- var Z = U[Y], te = l.PropertyBinding.parseTrackName(Z.name), q = l.PropertyBinding.findNode(I, te.nodeName), j = m[te.propertyName];
36547
- if (te.objectName === "bones" && (q.isSkinnedMesh === !0 ? q = q.skeleton.getBoneByName(te.objectIndex) : q = void 0), !q || !j) return console.warn('THREE.GLTFExporter: Could not export animation track "%s".', Z.name), null;
36550
+ var Z = U[Y], te = l.PropertyBinding.parseTrackName(Z.name), q = l.PropertyBinding.findNode(I, te.nodeName), W = m[te.propertyName];
36551
+ if (te.objectName === "bones" && (q.isSkinnedMesh === !0 ? q = q.skeleton.getBoneByName(te.objectIndex) : q = void 0), !q || !W) return console.warn('THREE.GLTFExporter: Could not export animation track "%s".', Z.name), null;
36548
36552
  var $ = 1, X = Z.values.length / Z.times.length;
36549
- j === m.morphTargetInfluences && (X /= q.morphTargetInfluences.length);
36553
+ W === m.morphTargetInfluences && (X /= q.morphTargetInfluences.length);
36550
36554
  var K = void 0;
36551
- Z.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline === !0 ? (K = "CUBICSPLINE", X /= 3) : Z.getInterpolation() === l.InterpolateDiscrete ? K = "STEP" : K = "LINEAR", G.push({ input: this.processAccessor(new l.BufferAttribute(Z.times, $)), output: this.processAccessor(new l.BufferAttribute(Z.values, X)), interpolation: K }), z.push({ sampler: G.length - 1, target: { node: O.get(q), path: j } });
36555
+ Z.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline === !0 ? (K = "CUBICSPLINE", X /= 3) : Z.getInterpolation() === l.InterpolateDiscrete ? K = "STEP" : K = "LINEAR", G.push({ input: this.processAccessor(new l.BufferAttribute(Z.times, $)), output: this.processAccessor(new l.BufferAttribute(Z.values, X)), interpolation: K }), z.push({ sampler: G.length - 1, target: { node: O.get(q), path: W } });
36552
36556
  }
36553
36557
  return D.animations.push({ name: b.name || "clip_" + D.animations.length, samplers: G, channels: z }), D.animations.length - 1;
36554
36558
  }
@@ -36584,7 +36588,7 @@ void main() {
36584
36588
  Z !== null && (U.mesh = Z);
36585
36589
  } else b.isCamera && (U.camera = this.processCamera(b));
36586
36590
  if (b.isSkinnedMesh && this.skins.push(b), 0 < b.children.length) {
36587
- for (var te, q = [], j = 0, $ = b.children.length; j < $; j++) if (te = b.children[j], te.visible || D.onlyVisible === !1) {
36591
+ for (var te, q = [], W = 0, $ = b.children.length; W < $; W++) if (te = b.children[W], te.visible || D.onlyVisible === !1) {
36588
36592
  var X = this.processNode(te);
36589
36593
  X !== null && q.push(X);
36590
36594
  }
@@ -36718,17 +36722,17 @@ void main() {
36718
36722
  }
36719
36723
  var te = Z.morphTargetInfluences.length, q = Z.morphTargetDictionary[Y.propertyIndex];
36720
36724
  if (q === void 0) throw new Error("THREE.GLTFExporter: Morph target name not found: " + Y.propertyIndex);
36721
- var j = void 0;
36725
+ var W = void 0;
36722
36726
  if (O[Z.uuid] === void 0) {
36723
- j = G.clone();
36724
- for (var $ = new j.ValueBufferType(te * j.times.length), X = 0; X < j.times.length; X++) $[X * te + q] = j.values[X];
36725
- j.name = (Y.nodeName || "") + ".morphTargetInfluences", j.values = $, O[Z.uuid] = j, D.push(j);
36727
+ W = G.clone();
36728
+ for (var $ = new W.ValueBufferType(te * W.times.length), X = 0; X < W.times.length; X++) $[X * te + q] = W.values[X];
36729
+ W.name = (Y.nodeName || "") + ".morphTargetInfluences", W.values = $, O[Z.uuid] = W, D.push(W);
36726
36730
  continue;
36727
36731
  }
36728
36732
  var K = G.createInterpolant(new G.ValueBufferType(1));
36729
- j = O[Z.uuid];
36730
- for (var re = 0; re < j.times.length; re++) j.values[re * te + q] = K.evaluate(j.times[re]);
36731
- for (var k, W = 0; W < G.times.length; W++) k = this.insertKeyframe(j, G.times[W]), j.values[k * te + q] = G.values[W];
36733
+ W = O[Z.uuid];
36734
+ for (var re = 0; re < W.times.length; re++) W.values[re * te + q] = K.evaluate(W.times[re]);
36735
+ for (var k, j = 0; j < G.times.length; j++) k = this.insertKeyframe(W, G.times[j]), W.values[k * te + q] = G.values[j];
36732
36736
  }
36733
36737
  return b.tracks = D, b;
36734
36738
  } };
@@ -36746,11 +36750,11 @@ void main() {
36746
36750
  }, f = function(S, x, E, F) {
36747
36751
  var L = { DEFAULT: 0, PATH: 1, SMOOTH_CAMERA_TRANSITION: 2, AUTO_TUMBLE: 3, MINIMAP: 5, SYNC_CONTROL: 6 }, P = { NONE: -1, ROTATE: 0, ZOOM: 1, PAN: 2, TOUCH_ROTATE: 3, TOUCH_ZOOM: 4, TOUCH_PAN: 5, SCROLL: 6, KEYBOARD_ZOOM: 7, KEYBOARD_ROTATE: 8, KEYBOARD_PAN: 9 }, A = { NONE: -1, FREE: 1, HORIZONTAL: 2, VERTICAL: 3 }, _ = { ARROWLEFT: 37, ARROWUP: 38, ARROWRIGHT: 39, ARROWDOWN: 40, NUMPADADD: 107, NUMPADSUBTRACT: 109, EQUAL: 187, MINUS: 189 }, T = {};
36748
36752
  T.MAIN = P.ROTATE, T.AUXILIARY = P.ZOOM, T.SECONDARY = P.PAN, this.cameraObject = S, this.domElement = x === void 0 ? document : x, this.renderer = E, this.scene = F, this.tumble_rate = 1.5, this.pointer_x = 0, this.pointer_y = 0, this.pointer_x_start = 0, this.pointer_y_start = 0, this.previous_pointer_x = 0, this.previous_pointer_y = 0, this.near_plane_fly_debt = 0, this.touchZoomDistanceStart = 0, this.touchZoomDistanceEnd = 0, this.directionalLight = 0, this.zoomRate = 50, this.rotateRate = 50, this.panRate = 100, this.pixelHeight = 1;
36749
- var C = 6e3, R = !0, b = 0, I = void 0, D = void 0, O = !1, U = 500, z = void 0, G = "default", Y = L.DEFAULT, Z = void 0, te = void 0, q = void 0, j = 0, $ = A.FREE;
36753
+ var C = 6e3, R = !0, b = 0, I = void 0, D = void 0, O = !1, U = 500, z = void 0, G = "default", Y = L.DEFAULT, Z = void 0, te = void 0, q = void 0, W = 0, $ = A.FREE;
36750
36754
  this._state = P.NONE;
36751
36755
  var X;
36752
36756
  this.targetTouchId = -1;
36753
- var K = void 0, re = new l.Vector3(), k = new l.Vector3(), W = new l.Vector3(), oe = new l.Vector3(), le = new l.Vector3(), ce = new l.Vector3(), H = new l.Vector3(), V = new l.Vector3(), B = new l.Sphere(), Q = new l.Vector3(), ie = !1, he = void 0, xe = 0, we = { default: new u() };
36757
+ var K = void 0, re = new l.Vector3(), k = new l.Vector3(), j = new l.Vector3(), oe = new l.Vector3(), le = new l.Vector3(), ce = new l.Vector3(), H = new l.Vector3(), V = new l.Vector3(), B = new l.Sphere(), Q = new l.Vector3(), ie = !1, he = void 0, xe = 0, we = { default: new u() };
36754
36758
  we.default.nearPlane = 0.1, we.default.farPlane = 2e3, we.default.eyePosition = [0, 0, 0], we.default.targetPosition = [0, 0, -1], we.default.upVector = [0, 1, 0], this.cameraObject.target === void 0 && (this.cameraObject.target = new l.Vector3(...we.default.targetPosition)), this.calculateMaxAllowedDistance = (se) => {
36755
36759
  var Te = se.getBoundingBox();
36756
36760
  if (Te) {
@@ -36874,14 +36878,14 @@ void main() {
36874
36878
  }, rt = (se) => {
36875
36879
  et(!1), this._state = P.SCROLL;
36876
36880
  var Te = 0;
36877
- 0 < se.deltaY ? Te = this.zoomRate : 0 > se.deltaY && (Te = -1 * this.zoomRate), j += Te, se.preventDefault(), se.stopImmediatePropagation();
36881
+ 0 < se.deltaY ? Te = this.zoomRate : 0 > se.deltaY && (Te = -1 * this.zoomRate), W += Te, se.preventDefault(), se.stopImmediatePropagation();
36878
36882
  }, qt = (se) => {
36879
36883
  et(!1);
36880
36884
  var Te = 0;
36881
36885
  if (se.keyCode === _.EQUAL || se.keyCode === _.MINUS || se.keyCode === _.NUMPADADD || se.keyCode === _.NUMPADSUBTRACT) {
36882
36886
  this._state = P.KEYBOARD_ZOOM;
36883
36887
  var De = 1;
36884
- se.shiftKey && (De *= 2), se.keyCode === _.EQUAL || se.keyCode === _.NUMPADADD ? Te = -1 * (this.zoomRate * De) : (se.keyCode === _.MINUS || se.keyCode === _.NUMPADSUBTRACT) && (Te = this.zoomRate * De), j += Te;
36888
+ se.shiftKey && (De *= 2), se.keyCode === _.EQUAL || se.keyCode === _.NUMPADADD ? Te = -1 * (this.zoomRate * De) : (se.keyCode === _.MINUS || se.keyCode === _.NUMPADSUBTRACT) && (Te = this.zoomRate * De), W += Te;
36885
36889
  } else (se.keyCode === _.ARROWLEFT || se.keyCode === _.ARROWUP || se.keyCode === _.ARROWRIGHT || se.keyCode === _.ARROWDOWN) && (se.shiftKey ? (this._state = P.KEYBOARD_ROTATE, this.pointer_x_start = this.pointer_x, this.pointer_y_start = this.pointer_y, Te = this.rotateRate) : (this._state = P.KEYBOARD_PAN, Te = this.panRate), this.previous_pointer_x = this.pointer_x, this.previous_pointer_y = this.pointer_y, se.keyCode === _.ARROWLEFT ? this.pointer_x -= Te : se.keyCode === _.ARROWUP ? this.pointer_y -= Te : se.keyCode === _.ARROWRIGHT ? this.pointer_x += Te : se.keyCode === _.ARROWDOWN && (this.pointer_y += Te));
36886
36890
  Object.values(_).includes(se.keyCode) && se.preventDefault();
36887
36891
  }, Qt = (se) => {
@@ -36889,16 +36893,16 @@ void main() {
36889
36893
  }, It = () => {
36890
36894
  if (typeof this.cameraObject < "u") {
36891
36895
  var se = K.height, Te = this.cameraObject.position.distanceTo(this.cameraObject.target), De = 0;
36892
- this.cameraObject.far > this.cameraObject.near && Te >= this.cameraObject.near && Te <= this.cameraObject.far && (De = (Te - this.cameraObject.near) / (this.cameraObject.far - this.cameraObject.near)), k.set(this.previous_pointer_x, se - this.previous_pointer_y, 0), W.set(this.previous_pointer_x, se - this.previous_pointer_y, 1), oe.set(this.pointer_x, se - this.pointer_y, 0), le.set(this.pointer_x, se - this.pointer_y, 1), k.unproject(this.cameraObject), W.unproject(this.cameraObject), oe.unproject(this.cameraObject), le.unproject(this.cameraObject);
36896
+ this.cameraObject.far > this.cameraObject.near && Te >= this.cameraObject.near && Te <= this.cameraObject.far && (De = (Te - this.cameraObject.near) / (this.cameraObject.far - this.cameraObject.near)), k.set(this.previous_pointer_x, se - this.previous_pointer_y, 0), j.set(this.previous_pointer_x, se - this.previous_pointer_y, 1), oe.set(this.pointer_x, se - this.pointer_y, 0), le.set(this.pointer_x, se - this.pointer_y, 1), k.unproject(this.cameraObject), j.unproject(this.cameraObject), oe.unproject(this.cameraObject), le.unproject(this.cameraObject);
36893
36897
  var Ye = -2e-3;
36894
- oe.sub(k).multiplyScalar(1 - De), le.sub(W).multiplyScalar(De), oe.add(le).multiplyScalar(Ye), me(oe);
36898
+ oe.sub(k).multiplyScalar(1 - De), le.sub(j).multiplyScalar(De), oe.add(le).multiplyScalar(Ye), me(oe);
36895
36899
  }
36896
36900
  this.previous_pointer_x = this.pointer_x, this.previous_pointer_y = this.pointer_y;
36897
36901
  };
36898
36902
  this.getVectorsFromRotateAboutLookAtPoints = (se, Te) => {
36899
- se.normalize(), H.copy(this.cameraObject.position).sub(this.cameraObject.target), V.copy(H), H.normalize(), 0.8 < Math.abs(H.dot(se)) && H.copy(this.cameraObject.up), k.crossVectors(se, H).normalize(), W.crossVectors(se, k);
36900
- var De = se.dot(V), Ye = k.dot(V), J = W.dot(V), ye = se.dot(this.cameraObject.up), ve = k.dot(this.cameraObject.up), be = W.dot(this.cameraObject.up), Le = Math.cos(Te), ge = Math.sin(Te);
36901
- return oe.set(Le * k.x + ge * W.x, Le * k.y + ge * W.y, Le * k.z + ge * W.z), le.set(Le * W.x - ge * k.x, Le * W.y - ge * k.y, Le * W.z - ge * k.z), H.copy(this.cameraObject.target), H.x = H.x + se.x * De + oe.x * Ye + le.x * J, H.y = H.y + se.y * De + oe.y * Ye + le.y * J, H.z = H.z + se.z * De + oe.z * Ye + le.z * J, re.set(se.x * ye + oe.x * ve + le.x * be, se.y * ye + oe.y * ve + le.y * be, se.z * ye + oe.z * ve + le.z * be), { position: H, up: re };
36903
+ se.normalize(), H.copy(this.cameraObject.position).sub(this.cameraObject.target), V.copy(H), H.normalize(), 0.8 < Math.abs(H.dot(se)) && H.copy(this.cameraObject.up), k.crossVectors(se, H).normalize(), j.crossVectors(se, k);
36904
+ var De = se.dot(V), Ye = k.dot(V), J = j.dot(V), ye = se.dot(this.cameraObject.up), ve = k.dot(this.cameraObject.up), be = j.dot(this.cameraObject.up), Le = Math.cos(Te), ge = Math.sin(Te);
36905
+ return oe.set(Le * k.x + ge * j.x, Le * k.y + ge * j.y, Le * k.z + ge * j.z), le.set(Le * j.x - ge * k.x, Le * j.y - ge * k.y, Le * j.z - ge * k.z), H.copy(this.cameraObject.target), H.x = H.x + se.x * De + oe.x * Ye + le.x * J, H.y = H.y + se.y * De + oe.y * Ye + le.y * J, H.z = H.z + se.z * De + oe.z * Ye + le.z * J, re.set(se.x * ye + oe.x * ve + le.x * be, se.y * ye + oe.y * ve + le.y * be, se.z * ye + oe.z * ve + le.z * be), { position: H, up: re };
36902
36906
  }, this.rotateAboutLookAtpoint = (se, Te) => {
36903
36907
  var De = this.getVectorsFromRotateAboutLookAtPoints(se, Te);
36904
36908
  this.cameraObject.position.copy(De.position), this.updateDirectionalLight(), this.cameraObject.up.copy(De.up);
@@ -36914,14 +36918,14 @@ void main() {
36914
36918
  var Le = 1 * -ve / be, ge = 1 * ye / be, Se = 0;
36915
36919
  $ === A.FREE && Le * (this.pointer_x - 0.5 * (De - 1)) + ge * (0.5 * (Ye - 1) - this.pointer_y);
36916
36920
  var Ie = Math.acos(Se / J) - 0.5 * Math.PI, ze = this.tumble_rate * be / J;
36917
- re.copy(this.cameraObject.position).sub(this.cameraObject.target).normalize(), k.copy(this.cameraObject.up).normalize(), W.copy(k).cross(re).normalize().multiplyScalar(Le), k.multiplyScalar(ge), ce.addVectors(W, k).multiplyScalar(Math.cos(Ie)), re.multiplyScalar(Math.sin(Ie)), ce.add(re), this.rotateAboutLookAtpoint(ce, -ze);
36921
+ re.copy(this.cameraObject.position).sub(this.cameraObject.target).normalize(), k.copy(this.cameraObject.up).normalize(), j.copy(k).cross(re).normalize().multiplyScalar(Le), k.multiplyScalar(ge), ce.addVectors(j, k).multiplyScalar(Math.cos(Ie)), re.multiplyScalar(Math.sin(Ie)), ce.add(re), this.rotateAboutLookAtpoint(ce, -ze);
36918
36922
  }
36919
36923
  }
36920
36924
  }
36921
36925
  this.previous_pointer_x = this.pointer_x, this.previous_pointer_y = this.pointer_y;
36922
36926
  }, yi = () => {
36923
36927
  var se = 0;
36924
- return this._state === P.ZOOM ? se = this.previous_pointer_y - this.pointer_y : this._state === P.SCROLL || this._state === P.KEYBOARD_ZOOM ? se = j : (se = -1 * (this.touchZoomDistanceEnd - this.touchZoomDistanceStart), this.touchZoomDistanceStart = this.touchZoomDistanceEnd), se;
36928
+ return this._state === P.ZOOM ? se = this.previous_pointer_y - this.pointer_y : this._state === P.SCROLL || this._state === P.KEYBOARD_ZOOM ? se = W : (se = -1 * (this.touchZoomDistanceEnd - this.touchZoomDistanceStart), this.touchZoomDistanceStart = this.touchZoomDistanceEnd), se;
36925
36929
  };
36926
36930
  this.changeZoomByScrollRateUnit = (se) => {
36927
36931
  var Te = se * this.zoomRate;
@@ -36936,7 +36940,7 @@ void main() {
36936
36940
  };
36937
36941
  var Gi = () => {
36938
36942
  var se = yi();
36939
- this.changeZoomByValue(se), this._state === P.ZOOM && (this.previous_pointer_x = this.pointer_x, this.previous_pointer_y = this.pointer_y), (this._state === P.SCROLL || this._state === P.KEYBOARD_ZOOM) && (j = 0, this._state = P.NONE);
36943
+ this.changeZoomByValue(se), this._state === P.ZOOM && (this.previous_pointer_x = this.pointer_x, this.previous_pointer_y = this.pointer_y), (this._state === P.SCROLL || this._state === P.KEYBOARD_ZOOM) && (W = 0, this._state = P.NONE);
36940
36944
  };
36941
36945
  this.setDirectionalLight = (se) => {
36942
36946
  this.directionalLight = se;
@@ -36992,7 +36996,7 @@ void main() {
36992
36996
  xr(0);
36993
36997
  };
36994
36998
  var rs = () => {
36995
- this._state === P.ROTATE || this._state === P.TOUCH_ROTATE || this._state === P.KEYBOARD_ROTATE ? Nt() : this._state === P.PAN || this._state === P.TOUCH_PAN || this._state === P.KEYBOARD_PAN ? (It(), he.triggerCallback()) : (this._state === P.ZOOM || this._state === P.TOUCH_ZOOM || this._state === P.SCROLL || this._state === P.KEYBOARD_ZOOM) && (he.zoom(yi()), this.previous_pointer_x = this.pointer_x, this.previous_pointer_y = this.pointer_y, (this._state === P.SCROLL || this._state === P.KEYBOARD_ZOOM) && (this._state = P.NONE), j = 0, he.triggerCallback());
36999
+ this._state === P.ROTATE || this._state === P.TOUCH_ROTATE || this._state === P.KEYBOARD_ROTATE ? Nt() : this._state === P.PAN || this._state === P.TOUCH_PAN || this._state === P.KEYBOARD_PAN ? (It(), he.triggerCallback()) : (this._state === P.ZOOM || this._state === P.TOUCH_ZOOM || this._state === P.SCROLL || this._state === P.KEYBOARD_ZOOM) && (he.zoom(yi()), this.previous_pointer_x = this.pointer_x, this.previous_pointer_y = this.pointer_y, (this._state === P.SCROLL || this._state === P.KEYBOARD_ZOOM) && (this._state = P.NONE), W = 0, he.triggerCallback());
36996
37000
  };
36997
37001
  this.update = (se) => {
36998
37002
  var Te = se * U, De = R, Ye = !0;
@@ -37086,39 +37090,39 @@ void main() {
37086
37090
  enable = !0;
37087
37091
  }, this.disable = () => {
37088
37092
  enable = !1;
37089
- }, this.getIntersectsObject = (j) => {
37093
+ }, this.getIntersectsObject = (W) => {
37090
37094
  if (_ !== A) {
37091
37095
  var $ = A.getThreeJSScene();
37092
- T.render($, j.cameraObject);
37096
+ T.render($, W.cameraObject);
37093
37097
  }
37094
37098
  var X = Z || A.getPickableThreeJSObjects();
37095
37099
  return G.length = 0, b.intersectObjects(X, !0, G);
37096
- }, this.setPickableObjects = (j) => {
37097
- j === void 0 ? Z = void 0 : (Z = [], j.forEach(($) => {
37100
+ }, this.setPickableObjects = (W) => {
37101
+ W === void 0 ? Z = void 0 : (Z = [], W.forEach(($) => {
37098
37102
  $.getGroup() && $.getGroup().visible && Z.push($.getGroup());
37099
37103
  }));
37100
- }, this.getIntersectsObjectWithOrigin = (j, $, X) => (b.set($, X), this.getIntersectsObject(j)), this.getIntersectsObjectWithCamera = (j, $, X) => (j.getNDCFromDocumentCoords($, X, I), b.setFromCamera(I, j.cameraObject), this.getIntersectsObject(j)), this.pick = (j, $, X) => {
37101
- if (T && A && j && C) {
37102
- this.getIntersectsObjectWithCamera(j, $, X);
37104
+ }, this.getIntersectsObjectWithOrigin = (W, $, X) => (b.set($, X), this.getIntersectsObject(W)), this.getIntersectsObjectWithCamera = (W, $, X) => (W.getNDCFromDocumentCoords($, X, I), b.setFromCamera(I, W.cameraObject), this.getIntersectsObject(W)), this.pick = (W, $, X) => {
37105
+ if (T && A && W && C) {
37106
+ this.getIntersectsObjectWithCamera(W, $, X);
37103
37107
  for (var K, re = G.length, k = 0; k < re; k++) if (K = G[k].object ? G[k].object.userData : void 0, K && K.isMarkerCluster && K.visible && K.clusterIsVisible(G[k].object.clusterIndex) && K.zoomToCluster(G[k].object.clusterIndex))
37104
37108
  return;
37105
37109
  C(G, $, X);
37106
37110
  }
37107
37111
  };
37108
- var te = (j, $, X) => {
37109
- if (T && A && j && R) {
37110
- if (this.getIntersectsObjectWithCamera(j, $, X), O.setTime(Date.now()), G.length === 0) {
37112
+ var te = (W, $, X) => {
37113
+ if (T && A && W && R) {
37114
+ if (this.getIntersectsObjectWithCamera(W, $, X), O.setTime(Date.now()), G.length === 0) {
37111
37115
  if (U) return;
37112
37116
  U = !0;
37113
37117
  } else U = !1;
37114
37118
  R(G, $, X);
37115
37119
  }
37116
37120
  };
37117
- this.move = (j, $, X) => {
37118
- T && A && j && R && (A.displayMarkers ? te(j, $, X) : (Y.zincCamera = j, Y.x = $, Y.y = X, !D && (z = O ? Date.now() - O.getTime() : 250, 250 <= z ? te(j, $, X) : (D = !0, setTimeout(q(Y), z)))));
37121
+ this.move = (W, $, X) => {
37122
+ T && A && W && R && (A.displayMarkers ? te(W, $, X) : (Y.zincCamera = W, Y.x = $, Y.y = X, !D && (z = O ? Date.now() - O.getTime() : 250, 250 <= z ? te(W, $, X) : (D = !0, setTimeout(q(Y), z)))));
37119
37123
  };
37120
- var q = (j) => function() {
37121
- D = !1, te(j.zincCamera, j.x, j.y);
37124
+ var q = (W) => function() {
37125
+ D = !1, te(W.zincCamera, W.x, W.y);
37122
37126
  };
37123
37127
  }, y = function(x, E, F, L) {
37124
37128
  var P = new l.Vector3(), A = -E, _ = L, T = x;
@@ -37487,8 +37491,8 @@ void main() {
37487
37491
  var q = 0.5 * Math.abs(Z / E.w);
37488
37492
  if (x.radius += q, P.ray.intersectsSphere(x) !== !1) {
37489
37493
  I.boundingBox === null && I.computeBoundingBox(), S.copy(I.boundingBox).applyMatrix4(b);
37490
- var j = Math.max(C.near, S.distanceToPoint(T.origin));
37491
- E.set(0, 0, -j, 1).applyMatrix4(C.projectionMatrix), E.multiplyScalar(1 / E.w), E.applyMatrix4(C.projectionMatrixInverse);
37494
+ var W = Math.max(C.near, S.distanceToPoint(T.origin));
37495
+ E.set(0, 0, -W, 1).applyMatrix4(C.projectionMatrix), E.multiplyScalar(1 / E.w), E.applyMatrix4(C.projectionMatrixInverse);
37492
37496
  var $ = 0.5 * Math.abs(Z / E.w);
37493
37497
  if (S.max.x += $, S.max.y += $, S.max.z += $, S.min.x -= $, S.min.y -= $, S.min.z -= $, P.ray.intersectsBox(S) !== !1) {
37494
37498
  T.at(1, y), y.w = 1, y.applyMatrix4(C.matrixWorldInverse), y.applyMatrix4(R), y.multiplyScalar(1 / y.w), y.x *= O.x / 2, y.y *= O.y / 2, y.z = 0, v.copy(y), g.multiplyMatrices(C.matrixWorldInverse, b);
@@ -37497,8 +37501,8 @@ void main() {
37497
37501
  var re = p.z > Y && h.z > Y;
37498
37502
  if (!re) {
37499
37503
  if (p.z > Y) {
37500
- var k = p.z - h.z, W = (p.z - Y) / k;
37501
- p.lerp(h, W);
37504
+ var k = p.z - h.z, j = (p.z - Y) / k;
37505
+ p.lerp(h, j);
37502
37506
  } else if (h.z > Y) {
37503
37507
  var oe = h.z - p.z, le = (h.z - Y) / oe;
37504
37508
  h.lerp(p, le);
@@ -40875,29 +40879,29 @@ Kt.prototype.getIntersectedObject = function(n) {
40875
40879
  return t > -1 || (t = e.indexOf(2), t = t > -1 ? t : e.indexOf(3)), n[t];
40876
40880
  }
40877
40881
  };
40878
- Kt.prototype.getAnnotationsFromObjects = function(n) {
40879
- const e = [];
40880
- for (var t = 0; t < n.length; t++) {
40881
- const i = n[t].userData;
40882
- let r;
40883
- if (i) {
40884
- if (i.isGlyph || i.isGlyphset) {
40885
- let s = i;
40886
- i.isGlyph && (s = i.getGlyphset()), r = s.userData ? s.userData.annotation : void 0, r && r.data && (n[t].name && n[t].name != "" ? r.data.id = n[t].name : r.data.id = s.groupName);
40882
+ Kt.prototype.getAnnotationsFromObjects = function(n, e) {
40883
+ const t = [];
40884
+ for (var i = 0; i < n.length; i++) {
40885
+ const r = n[i].userData;
40886
+ let s;
40887
+ if (r) {
40888
+ if (r.isGlyph || r.isGlyphset) {
40889
+ let o = r;
40890
+ r.isGlyph && (o = r.getGlyphset()), s = o.userData ? o.userData.annotation : void 0, s && s.data && (e && "instanceId" in e ? s.data.id = o.getLabel(e.instanceId) : n[i].name && n[i].name != "" ? s.data.id = n[i].name : s.data.id = o.groupName);
40887
40891
  } else
40888
- r = i.userData ? i.userData.annotation : void 0, r && r.data && (r.data.id = n[t].name);
40889
- r && (r.data.anatomicalId = i.anatomicalId, r.data.isNerves = i.userData.isNerves, r.data.zincObject = i);
40892
+ s = r.userData ? r.userData.annotation : void 0, s && s.data && (s.data.id = n[i].name);
40893
+ s && (s.data.anatomicalId = r.anatomicalId, s.data.isNerves = r.userData.isNerves, s.data.zincObject = r);
40890
40894
  }
40891
- r && e.push(r);
40895
+ s && t.push(s);
40892
40896
  }
40893
- return e;
40897
+ return t;
40894
40898
  };
40895
40899
  Kt.prototype.setHighlightedByObjects = function(n, e, t, i) {
40896
40900
  const r = xp(n), s = this.graphicsHighlight.setHighlighted(n);
40897
40901
  if (i) {
40898
40902
  let o = sl.MOVE;
40899
40903
  s && (o = sl.HIGHLIGHTED);
40900
- const a = this.getAnnotationsFromObjects(n);
40904
+ const a = this.getAnnotationsFromObjects(n, t);
40901
40905
  a.length > 0 && (a[0].coords = e, a[0].extraData = t), this.publishChanges(a, o, r);
40902
40906
  }
40903
40907
  return s;
@@ -40921,7 +40925,7 @@ Kt.prototype.setSelectedByObjects = function(n, e, t, i) {
40921
40925
  if (this.selectObjectOnPick ? r = this.graphicsHighlight.setSelected(n) : r = !0, r || this.ignorePreviousSelected) {
40922
40926
  const s = xp(n);
40923
40927
  if (this.selectObjectOnPick && this.setupLiveCoordinates(s), i) {
40924
- const o = sl.SELECTED, a = this.getAnnotationsFromObjects(n);
40928
+ const o = sl.SELECTED, a = this.getAnnotationsFromObjects(n, t);
40925
40929
  a.length > 0 && (a[0].coords = e, a[0].extraData = t), this.publishChanges(a, o, s);
40926
40930
  }
40927
40931
  }
@@ -41076,7 +41080,8 @@ const W5 = function() {
41076
41080
  _ = T.name;
41077
41081
  else {
41078
41082
  const R = e.getAnnotationsFromObjects(
41079
- [T]
41083
+ [T],
41084
+ void 0
41080
41085
  );
41081
41086
  R && R[0] && (_ = R[0].data.group);
41082
41087
  }
@@ -41092,7 +41097,8 @@ const W5 = function() {
41092
41097
  C ? C.point.z : 0
41093
41098
  ],
41094
41099
  intersected: C,
41095
- intersects: A
41100
+ intersects: A,
41101
+ instanceId: C != null && C.instanceId ? C.instanceId : -1
41096
41102
  }, I = { x: _, y: T };
41097
41103
  if (R.id) {
41098
41104
  b.threeID = (D = R.object) == null ? void 0 : D.id, R.object.userData.isGlyph ? R.object.name ? e.setSelectedByObjects(
@@ -41120,7 +41126,8 @@ const W5 = function() {
41120
41126
  C ? C.point.x : 0,
41121
41127
  C ? C.point.y : 0,
41122
41128
  C ? C.point.z : 0
41123
- ]
41129
+ ],
41130
+ instanceId: C != null && C.instanceId ? C.instanceId : -1
41124
41131
  }, I = { x: _, y: T };
41125
41132
  if (R.id) {
41126
41133
  b.threeID = (D = R.object) == null ? void 0 : D.id, e.displayArea.style.cursor = "pointer", e.setHighlightedByObjects([R.object], I, b, !0);