@liquidcars/atlas 0.1.37 → 0.1.39

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.
@@ -66,30 +66,30 @@ function ne(e, t) {
66
66
  function re(e, t) {
67
67
  return e + Math.random() * (t - e);
68
68
  }
69
- function R(e) {
69
+ function ie(e) {
70
70
  return e * (.5 - Math.random());
71
71
  }
72
- function z(e) {
72
+ function R(e) {
73
73
  e !== void 0 && (D = e);
74
74
  let t = D += 1831565813;
75
75
  return t = Math.imul(t ^ t >>> 15, t | 1), t ^= t + Math.imul(t ^ t >>> 7, t | 61), ((t ^ t >>> 14) >>> 0) / 4294967296;
76
76
  }
77
- function B(e) {
77
+ function z(e) {
78
78
  return e * O;
79
79
  }
80
- function ie(e) {
80
+ function ae(e) {
81
81
  return e * k;
82
82
  }
83
- function ae(e) {
83
+ function oe(e) {
84
84
  return !(e & e - 1) && e !== 0;
85
85
  }
86
- function oe(e) {
86
+ function se(e) {
87
87
  return 2 ** Math.ceil(Math.log(e) / Math.LN2);
88
88
  }
89
- function se(e) {
89
+ function ce(e) {
90
90
  return 2 ** Math.floor(Math.log(e) / Math.LN2);
91
91
  }
92
- function ce(e, t, n, r, i) {
92
+ function le(e, t, n, r, i) {
93
93
  let a = Math.cos, o = Math.sin, s = a(n / 2), c = o(n / 2), l = a((t + r) / 2), u = o((t + r) / 2), d = a((t - r) / 2), f = o((t - r) / 2), p = a((r - t) / 2), m = o((r - t) / 2);
94
94
  switch (i) {
95
95
  case "XYX":
@@ -113,7 +113,7 @@ function ce(e, t, n, r, i) {
113
113
  default: console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: " + i);
114
114
  }
115
115
  }
116
- function le(e, t) {
116
+ function B(e, t) {
117
117
  switch (t.constructor) {
118
118
  case Float32Array: return e;
119
119
  case Uint32Array: return e / 4294967295;
@@ -152,16 +152,16 @@ var de = {
152
152
  smootherstep: L,
153
153
  randInt: ne,
154
154
  randFloat: re,
155
- randFloatSpread: R,
156
- seededRandom: z,
157
- degToRad: B,
158
- radToDeg: ie,
159
- isPowerOfTwo: ae,
160
- ceilPowerOfTwo: oe,
161
- floorPowerOfTwo: se,
162
- setQuaternionFromProperEuler: ce,
155
+ randFloatSpread: ie,
156
+ seededRandom: R,
157
+ degToRad: z,
158
+ radToDeg: ae,
159
+ isPowerOfTwo: oe,
160
+ ceilPowerOfTwo: se,
161
+ floorPowerOfTwo: ce,
162
+ setQuaternionFromProperEuler: le,
163
163
  normalize: ue,
164
- denormalize: le
164
+ denormalize: B
165
165
  }, V = class e {
166
166
  constructor(t = 0, n = 0) {
167
167
  e.prototype.isVector2 = !0, this.x = t, this.y = n;
@@ -3020,35 +3020,35 @@ var tn = 0, nn = class extends T {
3020
3020
  }
3021
3021
  getComponent(e, t) {
3022
3022
  let n = this.array[e * this.itemSize + t];
3023
- return this.normalized && (n = le(n, this.array)), n;
3023
+ return this.normalized && (n = B(n, this.array)), n;
3024
3024
  }
3025
3025
  setComponent(e, t, n) {
3026
3026
  return this.normalized && (n = ue(n, this.array)), this.array[e * this.itemSize + t] = n, this;
3027
3027
  }
3028
3028
  getX(e) {
3029
3029
  let t = this.array[e * this.itemSize];
3030
- return this.normalized && (t = le(t, this.array)), t;
3030
+ return this.normalized && (t = B(t, this.array)), t;
3031
3031
  }
3032
3032
  setX(e, t) {
3033
3033
  return this.normalized && (t = ue(t, this.array)), this.array[e * this.itemSize] = t, this;
3034
3034
  }
3035
3035
  getY(e) {
3036
3036
  let t = this.array[e * this.itemSize + 1];
3037
- return this.normalized && (t = le(t, this.array)), t;
3037
+ return this.normalized && (t = B(t, this.array)), t;
3038
3038
  }
3039
3039
  setY(e, t) {
3040
3040
  return this.normalized && (t = ue(t, this.array)), this.array[e * this.itemSize + 1] = t, this;
3041
3041
  }
3042
3042
  getZ(e) {
3043
3043
  let t = this.array[e * this.itemSize + 2];
3044
- return this.normalized && (t = le(t, this.array)), t;
3044
+ return this.normalized && (t = B(t, this.array)), t;
3045
3045
  }
3046
3046
  setZ(e, t) {
3047
3047
  return this.normalized && (t = ue(t, this.array)), this.array[e * this.itemSize + 2] = t, this;
3048
3048
  }
3049
3049
  getW(e) {
3050
3050
  let t = this.array[e * this.itemSize + 3];
3051
- return this.normalized && (t = le(t, this.array)), t;
3051
+ return this.normalized && (t = B(t, this.array)), t;
3052
3052
  }
3053
3053
  setW(e, t) {
3054
3054
  return this.normalized && (t = ue(t, this.array)), this.array[e * this.itemSize + 3] = t, this;
@@ -5447,21 +5447,21 @@ var Ji = class e extends vn {
5447
5447
  let e = 0, t = k * e;
5448
5448
  for (let e = 0; e < I; e++) {
5449
5449
  let n = F[e];
5450
- R(n[2] + t, n[1] + t, n[0] + t);
5450
+ ie(n[2] + t, n[1] + t, n[0] + t);
5451
5451
  }
5452
5452
  e = s + p * 2, t = k * e;
5453
5453
  for (let e = 0; e < I; e++) {
5454
5454
  let n = F[e];
5455
- R(n[0] + t, n[1] + t, n[2] + t);
5455
+ ie(n[0] + t, n[1] + t, n[2] + t);
5456
5456
  }
5457
5457
  } else {
5458
5458
  for (let e = 0; e < I; e++) {
5459
5459
  let t = F[e];
5460
- R(t[2], t[1], t[0]);
5460
+ ie(t[2], t[1], t[0]);
5461
5461
  }
5462
5462
  for (let e = 0; e < I; e++) {
5463
5463
  let t = F[e];
5464
- R(t[0] + k * s, t[1] + k * s, t[2] + k * s);
5464
+ ie(t[0] + k * s, t[1] + k * s, t[2] + k * s);
5465
5465
  }
5466
5466
  }
5467
5467
  n.addGroup(e, r.length / 3 - e, 0);
@@ -5482,27 +5482,27 @@ var Ji = class e extends vn {
5482
5482
  i < 0 && (i = e.length - 1);
5483
5483
  for (let e = 0, n = s + p * 2; e < n; e++) {
5484
5484
  let n = k * e, a = k * (e + 1);
5485
- z(t + r + n, t + i + n, t + i + a, t + r + a);
5485
+ R(t + r + n, t + i + n, t + i + a, t + r + a);
5486
5486
  }
5487
5487
  }
5488
5488
  }
5489
5489
  function re(e, t, n) {
5490
5490
  a.push(e), a.push(t), a.push(n);
5491
5491
  }
5492
- function R(e, t, i) {
5493
- B(e), B(t), B(i);
5492
+ function ie(e, t, i) {
5493
+ z(e), z(t), z(i);
5494
5494
  let a = r.length / 3, o = h.generateTopUV(n, r, a - 3, a - 2, a - 1);
5495
- ie(o[0]), ie(o[1]), ie(o[2]);
5495
+ ae(o[0]), ae(o[1]), ae(o[2]);
5496
5496
  }
5497
- function z(e, t, i, a) {
5498
- B(e), B(t), B(a), B(t), B(i), B(a);
5497
+ function R(e, t, i, a) {
5498
+ z(e), z(t), z(a), z(t), z(i), z(a);
5499
5499
  let o = r.length / 3, s = h.generateSideWallUV(n, r, o - 6, o - 3, o - 2, o - 1);
5500
- ie(s[0]), ie(s[1]), ie(s[3]), ie(s[1]), ie(s[2]), ie(s[3]);
5500
+ ae(s[0]), ae(s[1]), ae(s[3]), ae(s[1]), ae(s[2]), ae(s[3]);
5501
5501
  }
5502
- function B(e) {
5502
+ function z(e) {
5503
5503
  r.push(a[e * 3 + 0]), r.push(a[e * 3 + 1]), r.push(a[e * 3 + 2]);
5504
5504
  }
5505
- function ie(e) {
5505
+ function ae(e) {
5506
5506
  i.push(e.x), i.push(e.y);
5507
5507
  }
5508
5508
  }
@@ -9243,7 +9243,7 @@ function Cc(e, t, n, r, i, a, o) {
9243
9243
  let e = Za[w];
9244
9244
  O = e.vertexShader, k = e.fragmentShader;
9245
9245
  } else O = a.vertexShader, k = a.fragmentShader, c.update(a), A = c.getVertexShaderID(a), j = c.getFragmentShaderID(a);
9246
- let M = e.getRenderTarget(), N = e.state.buffers.depth.getReversed(), P = _.isInstancedMesh === !0, F = _.isBatchedMesh === !0, I = !!a.map, ee = !!a.matcap, te = !!S, L = !!a.aoMap, ne = !!a.lightMap, re = !!a.bumpMap, R = !!a.normalMap, z = !!a.displacementMap, B = !!a.emissiveMap, ie = !!a.metalnessMap, ae = !!a.roughnessMap, oe = a.anisotropy > 0, se = a.clearcoat > 0, ce = a.dispersion > 0, le = a.iridescence > 0, ue = a.sheen > 0, de = a.transmission > 0, V = oe && !!a.anisotropyMap, H = se && !!a.clearcoatMap, U = se && !!a.clearcoatNormalMap, fe = se && !!a.clearcoatRoughnessMap, W = le && !!a.iridescenceMap, G = le && !!a.iridescenceThicknessMap, K = ue && !!a.sheenColorMap, pe = ue && !!a.sheenRoughnessMap, q = !!a.specularMap, me = !!a.specularColorMap, J = !!a.specularIntensityMap, he = de && !!a.transmissionMap, ge = de && !!a.thicknessMap, _e = !!a.gradientMap, ve = !!a.alphaMap, ye = a.alphaTest > 0, be = !!a.alphaHash, xe = !!a.extensions, Se = 0;
9246
+ let M = e.getRenderTarget(), N = e.state.buffers.depth.getReversed(), P = _.isInstancedMesh === !0, F = _.isBatchedMesh === !0, I = !!a.map, ee = !!a.matcap, te = !!S, L = !!a.aoMap, ne = !!a.lightMap, re = !!a.bumpMap, ie = !!a.normalMap, R = !!a.displacementMap, z = !!a.emissiveMap, ae = !!a.metalnessMap, oe = !!a.roughnessMap, se = a.anisotropy > 0, ce = a.clearcoat > 0, le = a.dispersion > 0, B = a.iridescence > 0, ue = a.sheen > 0, de = a.transmission > 0, V = se && !!a.anisotropyMap, H = ce && !!a.clearcoatMap, U = ce && !!a.clearcoatNormalMap, fe = ce && !!a.clearcoatRoughnessMap, W = B && !!a.iridescenceMap, G = B && !!a.iridescenceThicknessMap, K = ue && !!a.sheenColorMap, pe = ue && !!a.sheenRoughnessMap, q = !!a.specularMap, me = !!a.specularColorMap, J = !!a.specularIntensityMap, he = de && !!a.transmissionMap, ge = de && !!a.thicknessMap, _e = !!a.gradientMap, ve = !!a.alphaMap, ye = a.alphaTest > 0, be = !!a.alphaHash, xe = !!a.extensions, Se = 0;
9247
9247
  a.toneMapped && (M === null || M.isXRRenderTarget === !0) && (Se = e.toneMapping);
9248
9248
  let Ce = {
9249
9249
  shaderID: w,
@@ -9273,21 +9273,21 @@ function Cc(e, t, n, r, i, a, o) {
9273
9273
  aoMap: L,
9274
9274
  lightMap: ne,
9275
9275
  bumpMap: re,
9276
- normalMap: R,
9277
- displacementMap: f && z,
9278
- emissiveMap: B,
9279
- normalMapObjectSpace: R && a.normalMapType === 1,
9280
- normalMapTangentSpace: R && a.normalMapType === 0,
9281
- metalnessMap: ie,
9282
- roughnessMap: ae,
9283
- anisotropy: oe,
9276
+ normalMap: ie,
9277
+ displacementMap: f && R,
9278
+ emissiveMap: z,
9279
+ normalMapObjectSpace: ie && a.normalMapType === 1,
9280
+ normalMapTangentSpace: ie && a.normalMapType === 0,
9281
+ metalnessMap: ae,
9282
+ roughnessMap: oe,
9283
+ anisotropy: se,
9284
9284
  anisotropyMap: V,
9285
- clearcoat: se,
9285
+ clearcoat: ce,
9286
9286
  clearcoatMap: H,
9287
9287
  clearcoatNormalMap: U,
9288
9288
  clearcoatRoughnessMap: fe,
9289
- dispersion: ce,
9290
- iridescence: le,
9289
+ dispersion: le,
9290
+ iridescence: B,
9291
9291
  iridescenceMap: W,
9292
9292
  iridescenceThicknessMap: G,
9293
9293
  sheen: ue,
@@ -9309,11 +9309,11 @@ function Cc(e, t, n, r, i, a, o) {
9309
9309
  aoMapUv: L && h(a.aoMap.channel),
9310
9310
  lightMapUv: ne && h(a.lightMap.channel),
9311
9311
  bumpMapUv: re && h(a.bumpMap.channel),
9312
- normalMapUv: R && h(a.normalMap.channel),
9313
- displacementMapUv: z && h(a.displacementMap.channel),
9314
- emissiveMapUv: B && h(a.emissiveMap.channel),
9315
- metalnessMapUv: ie && h(a.metalnessMap.channel),
9316
- roughnessMapUv: ae && h(a.roughnessMap.channel),
9312
+ normalMapUv: ie && h(a.normalMap.channel),
9313
+ displacementMapUv: R && h(a.displacementMap.channel),
9314
+ emissiveMapUv: z && h(a.emissiveMap.channel),
9315
+ metalnessMapUv: ae && h(a.metalnessMap.channel),
9316
+ roughnessMapUv: oe && h(a.roughnessMap.channel),
9317
9317
  anisotropyMapUv: V && h(a.anisotropyMap.channel),
9318
9318
  clearcoatMapUv: H && h(a.clearcoatMap.channel),
9319
9319
  clearcoatNormalMapUv: U && h(a.clearcoatNormalMap.channel),
@@ -9328,7 +9328,7 @@ function Cc(e, t, n, r, i, a, o) {
9328
9328
  transmissionMapUv: he && h(a.transmissionMap.channel),
9329
9329
  thicknessMapUv: ge && h(a.thicknessMap.channel),
9330
9330
  alphaMapUv: ve && h(a.alphaMap.channel),
9331
- vertexTangents: !!y.attributes.tangent && (R || oe),
9331
+ vertexTangents: !!y.attributes.tangent && (ie || se),
9332
9332
  vertexColors: a.vertexColors,
9333
9333
  vertexAlphas: a.vertexColors === !0 && !!y.attributes.color && y.attributes.color.itemSize === 4,
9334
9334
  pointsUvs: _.isPoints === !0 && !!y.attributes.uv && (I || ve),
@@ -9363,7 +9363,7 @@ function Cc(e, t, n, r, i, a, o) {
9363
9363
  shadowMapType: e.shadowMap.type,
9364
9364
  toneMapping: Se,
9365
9365
  decodeVideoTexture: I && a.map.isVideoTexture === !0 && Y.getTransfer(a.map.colorSpace) === "srgb",
9366
- decodeVideoTextureEmissive: B && a.emissiveMap.isVideoTexture === !0 && Y.getTransfer(a.emissiveMap.colorSpace) === "srgb",
9366
+ decodeVideoTextureEmissive: z && a.emissiveMap.isVideoTexture === !0 && Y.getTransfer(a.emissiveMap.colorSpace) === "srgb",
9367
9367
  premultipliedAlpha: a.premultipliedAlpha,
9368
9368
  doubleSided: a.side === 2,
9369
9369
  flipSided: a.side === 1,
@@ -9931,7 +9931,7 @@ function Bc(e, t) {
9931
9931
  return r;
9932
9932
  },
9933
9933
  setTest: function(t) {
9934
- t ? z(e.DEPTH_TEST) : B(e.DEPTH_TEST);
9934
+ t ? R(e.DEPTH_TEST) : z(e.DEPTH_TEST);
9935
9935
  },
9936
9936
  setMask: function(t) {
9937
9937
  i !== t && !n && (e.depthMask(t), i = t);
@@ -9983,7 +9983,7 @@ function Bc(e, t) {
9983
9983
  let t = !1, n = null, r = null, i = null, a = null, o = null, s = null, c = null, l = null;
9984
9984
  return {
9985
9985
  setTest: function(n) {
9986
- t || (n ? z(e.STENCIL_TEST) : B(e.STENCIL_TEST));
9986
+ t || (n ? R(e.STENCIL_TEST) : z(e.STENCIL_TEST));
9987
9987
  },
9988
9988
  setMask: function(r) {
9989
9989
  n !== r && !t && (e.stencilMask(r), n = r);
@@ -10014,18 +10014,18 @@ function Bc(e, t) {
10014
10014
  for (let o = 0; o < r; o++) t === e.TEXTURE_3D || t === e.TEXTURE_2D_ARRAY ? e.texImage3D(n, 0, e.RGBA, 1, 1, i, 0, e.RGBA, e.UNSIGNED_BYTE, a) : e.texImage2D(n + o, 0, e.RGBA, 1, 1, 0, e.RGBA, e.UNSIGNED_BYTE, a);
10015
10015
  return o;
10016
10016
  }
10017
- let R = {};
10018
- R[e.TEXTURE_2D] = re(e.TEXTURE_2D, e.TEXTURE_2D, 1), R[e.TEXTURE_CUBE_MAP] = re(e.TEXTURE_CUBE_MAP, e.TEXTURE_CUBE_MAP_POSITIVE_X, 6), R[e.TEXTURE_2D_ARRAY] = re(e.TEXTURE_2D_ARRAY, e.TEXTURE_2D_ARRAY, 1, 1), R[e.TEXTURE_3D] = re(e.TEXTURE_3D, e.TEXTURE_3D, 1, 1), a.setClear(0, 0, 0, 1), o.setClear(1), s.setClear(0), z(e.DEPTH_TEST), o.setFunc(3), de(!1), V(1), z(e.CULL_FACE), le(0);
10019
- function z(t) {
10017
+ let ie = {};
10018
+ ie[e.TEXTURE_2D] = re(e.TEXTURE_2D, e.TEXTURE_2D, 1), ie[e.TEXTURE_CUBE_MAP] = re(e.TEXTURE_CUBE_MAP, e.TEXTURE_CUBE_MAP_POSITIVE_X, 6), ie[e.TEXTURE_2D_ARRAY] = re(e.TEXTURE_2D_ARRAY, e.TEXTURE_2D_ARRAY, 1, 1), ie[e.TEXTURE_3D] = re(e.TEXTURE_3D, e.TEXTURE_3D, 1, 1), a.setClear(0, 0, 0, 1), o.setClear(1), s.setClear(0), R(e.DEPTH_TEST), o.setFunc(3), de(!1), V(1), R(e.CULL_FACE), B(0);
10019
+ function R(t) {
10020
10020
  u[t] !== !0 && (e.enable(t), u[t] = !0);
10021
10021
  }
10022
- function B(t) {
10022
+ function z(t) {
10023
10023
  u[t] !== !1 && (e.disable(t), u[t] = !1);
10024
10024
  }
10025
- function ie(t, n) {
10025
+ function ae(t, n) {
10026
10026
  return d[t] !== n && (e.bindFramebuffer(t, n), d[t] = n, t === e.DRAW_FRAMEBUFFER && (d[e.FRAMEBUFFER] = n), t === e.FRAMEBUFFER && (d[e.DRAW_FRAMEBUFFER] = n), !0);
10027
10027
  }
10028
- function ae(t, n) {
10028
+ function oe(t, n) {
10029
10029
  let r = p, i = !1;
10030
10030
  if (t) {
10031
10031
  r = f.get(n), r === void 0 && (r = [], f.set(n, r));
@@ -10037,16 +10037,16 @@ function Bc(e, t) {
10037
10037
  } else r[0] !== e.BACK && (r[0] = e.BACK, i = !0);
10038
10038
  i && e.drawBuffers(r);
10039
10039
  }
10040
- function oe(t) {
10040
+ function se(t) {
10041
10041
  return m !== t && (e.useProgram(t), m = t, !0);
10042
10042
  }
10043
- let se = {
10043
+ let ce = {
10044
10044
  100: e.FUNC_ADD,
10045
10045
  101: e.FUNC_SUBTRACT,
10046
10046
  102: e.FUNC_REVERSE_SUBTRACT
10047
10047
  };
10048
- se[103] = e.MIN, se[104] = e.MAX;
10049
- let ce = {
10048
+ ce[103] = e.MIN, ce[104] = e.MAX;
10049
+ let le = {
10050
10050
  200: e.ZERO,
10051
10051
  201: e.ONE,
10052
10052
  202: e.SRC_COLOR,
@@ -10063,12 +10063,12 @@ function Bc(e, t) {
10063
10063
  213: e.CONSTANT_ALPHA,
10064
10064
  214: e.ONE_MINUS_CONSTANT_ALPHA
10065
10065
  };
10066
- function le(t, n, r, i, a, o, s, c, l, u) {
10066
+ function B(t, n, r, i, a, o, s, c, l, u) {
10067
10067
  if (t === 0) {
10068
- h === !0 && (B(e.BLEND), h = !1);
10068
+ h === !0 && (z(e.BLEND), h = !1);
10069
10069
  return;
10070
10070
  }
10071
- if (h === !1 && (z(e.BLEND), h = !0), t !== 5) {
10071
+ if (h === !1 && (R(e.BLEND), h = !0), t !== 5) {
10072
10072
  if (t !== g || u !== T) {
10073
10073
  if ((_ !== 100 || b !== 100) && (e.blendEquation(e.FUNC_ADD), _ = 100, b = 100), u) switch (t) {
10074
10074
  case 1:
@@ -10104,29 +10104,29 @@ function Bc(e, t) {
10104
10104
  }
10105
10105
  return;
10106
10106
  }
10107
- a ||= n, o ||= r, s ||= i, (n !== _ || a !== b) && (e.blendEquationSeparate(se[n], se[a]), _ = n, b = a), (r !== v || i !== y || o !== x || s !== S) && (e.blendFuncSeparate(ce[r], ce[i], ce[o], ce[s]), v = r, y = i, x = o, S = s), (c.equals(C) === !1 || l !== w) && (e.blendColor(c.r, c.g, c.b, l), C.copy(c), w = l), g = t, T = !1;
10107
+ a ||= n, o ||= r, s ||= i, (n !== _ || a !== b) && (e.blendEquationSeparate(ce[n], ce[a]), _ = n, b = a), (r !== v || i !== y || o !== x || s !== S) && (e.blendFuncSeparate(le[r], le[i], le[o], le[s]), v = r, y = i, x = o, S = s), (c.equals(C) === !1 || l !== w) && (e.blendColor(c.r, c.g, c.b, l), C.copy(c), w = l), g = t, T = !1;
10108
10108
  }
10109
10109
  function ue(t, n) {
10110
- t.side === 2 ? B(e.CULL_FACE) : z(e.CULL_FACE);
10110
+ t.side === 2 ? z(e.CULL_FACE) : R(e.CULL_FACE);
10111
10111
  let r = t.side === 1;
10112
- n && (r = !r), de(r), t.blending === 1 && t.transparent === !1 ? le(0) : le(t.blending, t.blendEquation, t.blendSrc, t.blendDst, t.blendEquationAlpha, t.blendSrcAlpha, t.blendDstAlpha, t.blendColor, t.blendAlpha, t.premultipliedAlpha), o.setFunc(t.depthFunc), o.setTest(t.depthTest), o.setMask(t.depthWrite), a.setMask(t.colorWrite);
10112
+ n && (r = !r), de(r), t.blending === 1 && t.transparent === !1 ? B(0) : B(t.blending, t.blendEquation, t.blendSrc, t.blendDst, t.blendEquationAlpha, t.blendSrcAlpha, t.blendDstAlpha, t.blendColor, t.blendAlpha, t.premultipliedAlpha), o.setFunc(t.depthFunc), o.setTest(t.depthTest), o.setMask(t.depthWrite), a.setMask(t.colorWrite);
10113
10113
  let i = t.stencilWrite;
10114
- s.setTest(i), i && (s.setMask(t.stencilWriteMask), s.setFunc(t.stencilFunc, t.stencilRef, t.stencilFuncMask), s.setOp(t.stencilFail, t.stencilZFail, t.stencilZPass)), U(t.polygonOffset, t.polygonOffsetFactor, t.polygonOffsetUnits), t.alphaToCoverage === !0 ? z(e.SAMPLE_ALPHA_TO_COVERAGE) : B(e.SAMPLE_ALPHA_TO_COVERAGE);
10114
+ s.setTest(i), i && (s.setMask(t.stencilWriteMask), s.setFunc(t.stencilFunc, t.stencilRef, t.stencilFuncMask), s.setOp(t.stencilFail, t.stencilZFail, t.stencilZPass)), U(t.polygonOffset, t.polygonOffsetFactor, t.polygonOffsetUnits), t.alphaToCoverage === !0 ? R(e.SAMPLE_ALPHA_TO_COVERAGE) : z(e.SAMPLE_ALPHA_TO_COVERAGE);
10115
10115
  }
10116
10116
  function de(t) {
10117
10117
  E !== t && (t ? e.frontFace(e.CW) : e.frontFace(e.CCW), E = t);
10118
10118
  }
10119
10119
  function V(t) {
10120
- t === 0 ? B(e.CULL_FACE) : (z(e.CULL_FACE), t !== D && (t === 1 ? e.cullFace(e.BACK) : t === 2 ? e.cullFace(e.FRONT) : e.cullFace(e.FRONT_AND_BACK))), D = t;
10120
+ t === 0 ? z(e.CULL_FACE) : (R(e.CULL_FACE), t !== D && (t === 1 ? e.cullFace(e.BACK) : t === 2 ? e.cullFace(e.FRONT) : e.cullFace(e.FRONT_AND_BACK))), D = t;
10121
10121
  }
10122
10122
  function H(t) {
10123
10123
  t !== O && (M && e.lineWidth(t), O = t);
10124
10124
  }
10125
10125
  function U(t, n, r) {
10126
- t ? (z(e.POLYGON_OFFSET_FILL), (k !== n || A !== r) && (e.polygonOffset(n, r), k = n, A = r)) : B(e.POLYGON_OFFSET_FILL);
10126
+ t ? (R(e.POLYGON_OFFSET_FILL), (k !== n || A !== r) && (e.polygonOffset(n, r), k = n, A = r)) : z(e.POLYGON_OFFSET_FILL);
10127
10127
  }
10128
10128
  function fe(t) {
10129
- t ? z(e.SCISSOR_TEST) : B(e.SCISSOR_TEST);
10129
+ t ? R(e.SCISSOR_TEST) : z(e.SCISSOR_TEST);
10130
10130
  }
10131
10131
  function W(t) {
10132
10132
  t === void 0 && (t = e.TEXTURE0 + j - 1), F !== t && (e.activeTexture(t), F = t);
@@ -10137,7 +10137,7 @@ function Bc(e, t) {
10137
10137
  i === void 0 && (i = {
10138
10138
  type: void 0,
10139
10139
  texture: void 0
10140
- }, I[r] = i), (i.type !== t || i.texture !== n) && (F !== r && (e.activeTexture(r), F = r), e.bindTexture(t, n || R[t]), i.type = t, i.texture = n);
10140
+ }, I[r] = i), (i.type !== t || i.texture !== n) && (F !== r && (e.activeTexture(r), F = r), e.bindTexture(t, n || ie[t]), i.type = t, i.texture = n);
10141
10141
  }
10142
10142
  function K() {
10143
10143
  let t = I[F];
@@ -10238,12 +10238,12 @@ function Bc(e, t) {
10238
10238
  depth: o,
10239
10239
  stencil: s
10240
10240
  },
10241
- enable: z,
10242
- disable: B,
10243
- bindFramebuffer: ie,
10244
- drawBuffers: ae,
10245
- useProgram: oe,
10246
- setBlending: le,
10241
+ enable: R,
10242
+ disable: z,
10243
+ bindFramebuffer: ae,
10244
+ drawBuffers: oe,
10245
+ useProgram: se,
10246
+ setBlending: B,
10247
10247
  setMaterial: ue,
10248
10248
  setFlipSided: de,
10249
10249
  setCullFace: V,
@@ -10382,7 +10382,7 @@ function Vc(o, s, c, l, u, d, p) {
10382
10382
  if (r === null) console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");
10383
10383
  else if (r.complete === !1) console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");
10384
10384
  else {
10385
- le(n, e, t);
10385
+ B(n, e, t);
10386
10386
  return;
10387
10387
  }
10388
10388
  } else e.isExternalTexture && (n.__webglTexture = e.sourceTexture ? e.sourceTexture : null);
@@ -10391,7 +10391,7 @@ function Vc(o, s, c, l, u, d, p) {
10391
10391
  function ne(e, t) {
10392
10392
  let n = l.get(e);
10393
10393
  if (e.isRenderTargetTexture === !1 && e.version > 0 && n.__version !== e.version) {
10394
- le(n, e, t);
10394
+ B(n, e, t);
10395
10395
  return;
10396
10396
  }
10397
10397
  c.bindTexture(o.TEXTURE_2D_ARRAY, n.__webglTexture, o.TEXTURE0 + t);
@@ -10399,12 +10399,12 @@ function Vc(o, s, c, l, u, d, p) {
10399
10399
  function re(e, t) {
10400
10400
  let n = l.get(e);
10401
10401
  if (e.isRenderTargetTexture === !1 && e.version > 0 && n.__version !== e.version) {
10402
- le(n, e, t);
10402
+ B(n, e, t);
10403
10403
  return;
10404
10404
  }
10405
10405
  c.bindTexture(o.TEXTURE_3D, n.__webglTexture, o.TEXTURE0 + t);
10406
10406
  }
10407
- function R(e, t) {
10407
+ function ie(e, t) {
10408
10408
  let n = l.get(e);
10409
10409
  if (e.version > 0 && n.__version !== e.version) {
10410
10410
  ue(n, e, t);
@@ -10412,18 +10412,18 @@ function Vc(o, s, c, l, u, d, p) {
10412
10412
  }
10413
10413
  c.bindTexture(o.TEXTURE_CUBE_MAP, n.__webglTexture, o.TEXTURE0 + t);
10414
10414
  }
10415
- let z = {
10415
+ let R = {
10416
10416
  [e]: o.REPEAT,
10417
10417
  [t]: o.CLAMP_TO_EDGE,
10418
10418
  [n]: o.MIRRORED_REPEAT
10419
- }, B = {
10419
+ }, z = {
10420
10420
  [r]: o.NEAREST,
10421
10421
  1004: o.NEAREST_MIPMAP_NEAREST,
10422
10422
  1005: o.NEAREST_MIPMAP_LINEAR,
10423
10423
  [i]: o.LINEAR,
10424
10424
  1007: o.LINEAR_MIPMAP_NEAREST,
10425
10425
  [a]: o.LINEAR_MIPMAP_LINEAR
10426
- }, ie = {
10426
+ }, ae = {
10427
10427
  512: o.NEVER,
10428
10428
  519: o.ALWAYS,
10429
10429
  513: o.LESS,
@@ -10433,8 +10433,8 @@ function Vc(o, s, c, l, u, d, p) {
10433
10433
  516: o.GREATER,
10434
10434
  517: o.NOTEQUAL
10435
10435
  };
10436
- function ae(e, t) {
10437
- if (t.type === 1015 && s.has("OES_texture_float_linear") === !1 && (t.magFilter === 1006 || t.magFilter === 1007 || t.magFilter === 1005 || t.magFilter === 1008 || t.minFilter === 1006 || t.minFilter === 1007 || t.minFilter === 1005 || t.minFilter === 1008) && console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."), o.texParameteri(e, o.TEXTURE_WRAP_S, z[t.wrapS]), o.texParameteri(e, o.TEXTURE_WRAP_T, z[t.wrapT]), (e === o.TEXTURE_3D || e === o.TEXTURE_2D_ARRAY) && o.texParameteri(e, o.TEXTURE_WRAP_R, z[t.wrapR]), o.texParameteri(e, o.TEXTURE_MAG_FILTER, B[t.magFilter]), o.texParameteri(e, o.TEXTURE_MIN_FILTER, B[t.minFilter]), t.compareFunction && (o.texParameteri(e, o.TEXTURE_COMPARE_MODE, o.COMPARE_REF_TO_TEXTURE), o.texParameteri(e, o.TEXTURE_COMPARE_FUNC, ie[t.compareFunction])), s.has("EXT_texture_filter_anisotropic") === !0) {
10436
+ function oe(e, t) {
10437
+ if (t.type === 1015 && s.has("OES_texture_float_linear") === !1 && (t.magFilter === 1006 || t.magFilter === 1007 || t.magFilter === 1005 || t.magFilter === 1008 || t.minFilter === 1006 || t.minFilter === 1007 || t.minFilter === 1005 || t.minFilter === 1008) && console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."), o.texParameteri(e, o.TEXTURE_WRAP_S, R[t.wrapS]), o.texParameteri(e, o.TEXTURE_WRAP_T, R[t.wrapT]), (e === o.TEXTURE_3D || e === o.TEXTURE_2D_ARRAY) && o.texParameteri(e, o.TEXTURE_WRAP_R, R[t.wrapR]), o.texParameteri(e, o.TEXTURE_MAG_FILTER, z[t.magFilter]), o.texParameteri(e, o.TEXTURE_MIN_FILTER, z[t.minFilter]), t.compareFunction && (o.texParameteri(e, o.TEXTURE_COMPARE_MODE, o.COMPARE_REF_TO_TEXTURE), o.texParameteri(e, o.TEXTURE_COMPARE_FUNC, ae[t.compareFunction])), s.has("EXT_texture_filter_anisotropic") === !0) {
10438
10438
  if (t.magFilter === 1003 || t.minFilter !== 1005 && t.minFilter !== 1008 || t.type === 1015 && s.has("OES_texture_float_linear") === !1) return;
10439
10439
  if (t.anisotropy > 1 || l.get(t).__currentAnisotropy) {
10440
10440
  let n = s.get("EXT_texture_filter_anisotropic");
@@ -10442,7 +10442,7 @@ function Vc(o, s, c, l, u, d, p) {
10442
10442
  }
10443
10443
  }
10444
10444
  }
10445
- function oe(e, t) {
10445
+ function se(e, t) {
10446
10446
  let n = !1;
10447
10447
  e.__webglInit === void 0 && (e.__webglInit = !0, t.addEventListener("dispose", A));
10448
10448
  let r = t.source, i = y.get(r);
@@ -10458,18 +10458,18 @@ function Vc(o, s, c, l, u, d, p) {
10458
10458
  }
10459
10459
  return n;
10460
10460
  }
10461
- function se(e, t, n) {
10461
+ function ce(e, t, n) {
10462
10462
  return Math.floor(Math.floor(e / n) / t);
10463
10463
  }
10464
- function ce(e, t, n, r) {
10464
+ function le(e, t, n, r) {
10465
10465
  let i = e.updateRanges;
10466
10466
  if (i.length === 0) c.texSubImage2D(o.TEXTURE_2D, 0, 0, 0, t.width, t.height, n, r, t.data);
10467
10467
  else {
10468
10468
  i.sort((e, t) => e.start - t.start);
10469
10469
  let a = 0;
10470
10470
  for (let e = 1; e < i.length; e++) {
10471
- let n = i[a], r = i[e], o = n.start + n.count, s = se(r.start, t.width, 4), c = se(n.start, t.width, 4);
10472
- r.start <= o + 1 && s === c && se(r.start + r.count - 1, t.width, 4) === s ? n.count = Math.max(n.count, r.start + r.count - n.start) : (++a, i[a] = r);
10471
+ let n = i[a], r = i[e], o = n.start + n.count, s = ce(r.start, t.width, 4), c = ce(n.start, t.width, 4);
10472
+ r.start <= o + 1 && s === c && ce(r.start + r.count - 1, t.width, 4) === s ? n.count = Math.max(n.count, r.start + r.count - n.start) : (++a, i[a] = r);
10473
10473
  }
10474
10474
  i.length = a + 1;
10475
10475
  let s = o.getParameter(o.UNPACK_ROW_LENGTH), l = o.getParameter(o.UNPACK_SKIP_PIXELS), u = o.getParameter(o.UNPACK_SKIP_ROWS);
@@ -10481,10 +10481,10 @@ function Vc(o, s, c, l, u, d, p) {
10481
10481
  e.clearUpdateRanges(), o.pixelStorei(o.UNPACK_ROW_LENGTH, s), o.pixelStorei(o.UNPACK_SKIP_PIXELS, l), o.pixelStorei(o.UNPACK_SKIP_ROWS, u);
10482
10482
  }
10483
10483
  }
10484
- function le(e, t, n) {
10484
+ function B(e, t, n) {
10485
10485
  let r = o.TEXTURE_2D;
10486
10486
  (t.isDataArrayTexture || t.isCompressedArrayTexture) && (r = o.TEXTURE_2D_ARRAY), t.isData3DTexture && (r = o.TEXTURE_3D);
10487
- let i = oe(e, t), a = t.source;
10487
+ let i = se(e, t), a = t.source;
10488
10488
  c.bindTexture(r, e.__webglTexture, o.TEXTURE0 + n);
10489
10489
  let s = l.get(a);
10490
10490
  if (a.version !== s.__version || i === !0) {
@@ -10494,7 +10494,7 @@ function Vc(o, s, c, l, u, d, p) {
10494
10494
  let m = C(t.image, !1, u.maxTextureSize);
10495
10495
  m = ve(t, m);
10496
10496
  let h = d.convert(t.format, t.colorSpace), g = d.convert(t.type), _ = D(t.internalFormat, h, g, t.colorSpace, t.isVideoTexture);
10497
- ae(r, t);
10497
+ oe(r, t);
10498
10498
  let v, y = t.mipmaps, b = t.isVideoTexture !== !0, x = s.__version === void 0 || i === !0, S = a.dataReady, E = k(t, m);
10499
10499
  if (t.isDepthTexture) _ = O(t.format === f, t.type), x && (b ? c.texStorage2D(o.TEXTURE_2D, 1, _, m.width, m.height) : c.texImage2D(o.TEXTURE_2D, 0, _, m.width, m.height, 0, h, g, null));
10500
10500
  else if (t.isDataTexture) {
@@ -10502,7 +10502,7 @@ function Vc(o, s, c, l, u, d, p) {
10502
10502
  b && x && c.texStorage2D(o.TEXTURE_2D, E, _, y[0].width, y[0].height);
10503
10503
  for (let e = 0, t = y.length; e < t; e++) v = y[e], b ? S && c.texSubImage2D(o.TEXTURE_2D, e, 0, 0, v.width, v.height, h, g, v.data) : c.texImage2D(o.TEXTURE_2D, e, _, v.width, v.height, 0, h, g, v.data);
10504
10504
  t.generateMipmaps = !1;
10505
- } else b ? (x && c.texStorage2D(o.TEXTURE_2D, E, _, m.width, m.height), S && ce(t, m, h, g)) : c.texImage2D(o.TEXTURE_2D, 0, _, m.width, m.height, 0, h, g, m.data);
10505
+ } else b ? (x && c.texStorage2D(o.TEXTURE_2D, E, _, m.width, m.height), S && le(t, m, h, g)) : c.texImage2D(o.TEXTURE_2D, 0, _, m.width, m.height, 0, h, g, m.data);
10506
10506
  } else if (t.isCompressedTexture) {
10507
10507
  if (t.isCompressedArrayTexture) {
10508
10508
  b && x && c.texStorage3D(o.TEXTURE_2D_ARRAY, E, _, y[0].width, y[0].height, m.depth);
@@ -10568,7 +10568,7 @@ function Vc(o, s, c, l, u, d, p) {
10568
10568
  }
10569
10569
  function ue(e, t, n) {
10570
10570
  if (t.image.length !== 6) return;
10571
- let r = oe(e, t), i = t.source;
10571
+ let r = se(e, t), i = t.source;
10572
10572
  c.bindTexture(o.TEXTURE_CUBE_MAP, e.__webglTexture, o.TEXTURE0 + n);
10573
10573
  let a = l.get(i);
10574
10574
  if (i.version !== a.__version || r === !0) {
@@ -10578,7 +10578,7 @@ function Vc(o, s, c, l, u, d, p) {
10578
10578
  let f = t.isCompressedTexture || t.image[0].isCompressedTexture, p = t.image[0] && t.image[0].isDataTexture, m = [];
10579
10579
  for (let e = 0; e < 6; e++) !f && !p ? m[e] = C(t.image[e], !0, u.maxCubemapSize) : m[e] = p ? t.image[e].image : t.image[e], m[e] = ve(t, m[e]);
10580
10580
  let h = m[0], g = d.convert(t.format, t.colorSpace), _ = d.convert(t.type), v = D(t.internalFormat, g, _, t.colorSpace), y = t.isVideoTexture !== !0, b = a.__version === void 0 || r === !0, x = i.dataReady, S = k(t, h);
10581
- ae(o.TEXTURE_CUBE_MAP, t);
10581
+ oe(o.TEXTURE_CUBE_MAP, t);
10582
10582
  let E;
10583
10583
  if (f) {
10584
10584
  y && b && c.texStorage2D(o.TEXTURE_CUBE_MAP, S, v, h.width, h.height);
@@ -10712,19 +10712,19 @@ function Vc(o, s, c, l, u, d, p) {
10712
10712
  }
10713
10713
  }
10714
10714
  if (a) {
10715
- c.bindTexture(o.TEXTURE_CUBE_MAP, r.__webglTexture), ae(o.TEXTURE_CUBE_MAP, t);
10715
+ c.bindTexture(o.TEXTURE_CUBE_MAP, r.__webglTexture), oe(o.TEXTURE_CUBE_MAP, t);
10716
10716
  for (let r = 0; r < 6; r++) if (t.mipmaps && t.mipmaps.length > 0) for (let i = 0; i < t.mipmaps.length; i++) de(n.__webglFramebuffer[r][i], e, t, o.COLOR_ATTACHMENT0, o.TEXTURE_CUBE_MAP_POSITIVE_X + r, i);
10717
10717
  else de(n.__webglFramebuffer[r], e, t, o.COLOR_ATTACHMENT0, o.TEXTURE_CUBE_MAP_POSITIVE_X + r, 0);
10718
10718
  w(t) && T(o.TEXTURE_CUBE_MAP), c.unbindTexture();
10719
10719
  } else if (s) {
10720
10720
  for (let t = 0, r = i.length; t < r; t++) {
10721
10721
  let r = i[t], a = l.get(r), s = o.TEXTURE_2D;
10722
- (e.isWebGL3DRenderTarget || e.isWebGLArrayRenderTarget) && (s = e.isWebGL3DRenderTarget ? o.TEXTURE_3D : o.TEXTURE_2D_ARRAY), c.bindTexture(s, a.__webglTexture), ae(s, r), de(n.__webglFramebuffer, e, r, o.COLOR_ATTACHMENT0 + t, s, 0), w(r) && T(s);
10722
+ (e.isWebGL3DRenderTarget || e.isWebGLArrayRenderTarget) && (s = e.isWebGL3DRenderTarget ? o.TEXTURE_3D : o.TEXTURE_2D_ARRAY), c.bindTexture(s, a.__webglTexture), oe(s, r), de(n.__webglFramebuffer, e, r, o.COLOR_ATTACHMENT0 + t, s, 0), w(r) && T(s);
10723
10723
  }
10724
10724
  c.unbindTexture();
10725
10725
  } else {
10726
10726
  let i = o.TEXTURE_2D;
10727
- if ((e.isWebGL3DRenderTarget || e.isWebGLArrayRenderTarget) && (i = e.isWebGL3DRenderTarget ? o.TEXTURE_3D : o.TEXTURE_2D_ARRAY), c.bindTexture(i, r.__webglTexture), ae(i, t), t.mipmaps && t.mipmaps.length > 0) for (let r = 0; r < t.mipmaps.length; r++) de(n.__webglFramebuffer[r], e, t, o.COLOR_ATTACHMENT0, i, r);
10727
+ if ((e.isWebGL3DRenderTarget || e.isWebGLArrayRenderTarget) && (i = e.isWebGL3DRenderTarget ? o.TEXTURE_3D : o.TEXTURE_2D_ARRAY), c.bindTexture(i, r.__webglTexture), oe(i, t), t.mipmaps && t.mipmaps.length > 0) for (let r = 0; r < t.mipmaps.length; r++) de(n.__webglFramebuffer[r], e, t, o.COLOR_ATTACHMENT0, i, r);
10728
10728
  else de(n.__webglFramebuffer, e, t, o.COLOR_ATTACHMENT0, i, 0);
10729
10729
  w(t) && T(i), c.unbindTexture();
10730
10730
  }
@@ -10787,7 +10787,7 @@ function Vc(o, s, c, l, u, d, p) {
10787
10787
  function ye(e) {
10788
10788
  return typeof HTMLImageElement < "u" && e instanceof HTMLImageElement ? (g.width = e.naturalWidth || e.width, g.height = e.naturalHeight || e.height) : typeof VideoFrame < "u" && e instanceof VideoFrame ? (g.width = e.displayWidth, g.height = e.displayHeight) : (g.width = e.width, g.height = e.height), g;
10789
10789
  }
10790
- this.allocateTextureUnit = ee, this.resetTextureUnits = I, this.setTexture2D = L, this.setTexture2DArray = ne, this.setTexture3D = re, this.setTextureCube = R, this.rebindTextures = W, this.setupRenderTarget = G, this.updateRenderTargetMipmap = K, this.updateMultisampleRenderTarget = J, this.setupDepthRenderbuffer = fe, this.setupFrameBufferTexture = de, this.useMultisampledRTT = ge;
10790
+ this.allocateTextureUnit = ee, this.resetTextureUnits = I, this.setTexture2D = L, this.setTexture2DArray = ne, this.setTexture3D = re, this.setTextureCube = ie, this.rebindTextures = W, this.setupRenderTarget = G, this.updateRenderTargetMipmap = K, this.updateMultisampleRenderTarget = J, this.setupDepthRenderbuffer = fe, this.setupFrameBufferTexture = de, this.useMultisampledRTT = ge;
10791
10791
  }
10792
10792
  function Hc(e, t) {
10793
10793
  function n(n, r = "") {
@@ -10946,7 +10946,7 @@ var Uc = "\nvoid main() {\n\n gl_Position = vec4( position, 1.0 );\n\n}", Wc = "
10946
10946
  }
10947
10947
  P = null, F = null, b.reset();
10948
10948
  for (let e in x) delete x[e];
10949
- e.setRenderTarget(C), _ = null, g = null, h = null, r = null, w = null, ae.stop(), n.isPresenting = !1, e.setPixelRatio(O), e.setSize(D.width, D.height, !1), n.dispatchEvent({ type: "sessionend" });
10949
+ e.setRenderTarget(C), _ = null, g = null, h = null, r = null, w = null, oe.stop(), n.isPresenting = !1, e.setPixelRatio(O), e.setSize(D.width, D.height, !1), n.dispatchEvent({ type: "sessionend" });
10950
10950
  }
10951
10951
  this.setFramebufferScaleFactor = function(e) {
10952
10952
  i = e, n.isPresenting === !0 && console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.");
@@ -11001,7 +11001,7 @@ var Uc = "\nvoid main() {\n\n gl_Position = vec4( position, 1.0 );\n\n}", Wc = "
11001
11001
  resolveStencilBuffer: _.ignoreDepthValues === !1
11002
11002
  });
11003
11003
  }
11004
- w.isXRRenderTarget = !0, this.setFoveation(l), p = null, a = await r.requestReferenceSpace(c), ae.setContext(r), ae.start(), n.isPresenting = !0, n.dispatchEvent({ type: "sessionstart" });
11004
+ w.isXRRenderTarget = !0, this.setFoveation(l), p = null, a = await r.requestReferenceSpace(c), oe.setContext(r), oe.start(), n.isPresenting = !0, n.dispatchEvent({ type: "sessionstart" });
11005
11005
  }
11006
11006
  }, this.getEnvironmentBlendMode = function() {
11007
11007
  if (r !== null) return r.environmentBlendMode;
@@ -11039,7 +11039,7 @@ var Uc = "\nvoid main() {\n\n gl_Position = vec4( position, 1.0 );\n\n}", Wc = "
11039
11039
  e.projectionMatrix.makePerspective(i, a, u, d, t, n), e.projectionMatrixInverse.copy(e.projectionMatrix).invert();
11040
11040
  }
11041
11041
  }
11042
- function R(e, t) {
11042
+ function ie(e, t) {
11043
11043
  t === null ? e.matrixWorld.copy(e.matrix) : e.matrixWorld.multiplyMatrices(t.matrixWorld, e.matrix), e.matrixWorldInverse.copy(e.matrixWorld).invert();
11044
11044
  }
11045
11045
  this.updateCamera = function(e) {
@@ -11050,11 +11050,11 @@ var Uc = "\nvoid main() {\n\n gl_Position = vec4( position, 1.0 );\n\n}", Wc = "
11050
11050
  depthFar: N.far
11051
11051
  }), P = N.near, F = N.far), N.layers.mask = e.layers.mask | 6, A.layers.mask = N.layers.mask & 3, j.layers.mask = N.layers.mask & 5;
11052
11052
  let i = e.parent, a = N.cameras;
11053
- R(N, i);
11054
- for (let e = 0; e < a.length; e++) R(a[e], i);
11055
- a.length === 2 ? re(N, A, j) : N.projectionMatrix.copy(A.projectionMatrix), z(e, N, i);
11053
+ ie(N, i);
11054
+ for (let e = 0; e < a.length; e++) ie(a[e], i);
11055
+ a.length === 2 ? re(N, A, j) : N.projectionMatrix.copy(A.projectionMatrix), R(e, N, i);
11056
11056
  };
11057
- function z(e, t, n) {
11057
+ function R(e, t, n) {
11058
11058
  n === null ? e.matrix.copy(t.matrixWorld) : (e.matrix.copy(n.matrixWorld), e.matrix.invert(), e.matrix.multiply(t.matrixWorld)), e.matrix.decompose(e.position, e.quaternion, e.scale), e.updateMatrixWorld(!0), e.projectionMatrix.copy(t.projectionMatrix), e.projectionMatrixInverse.copy(t.projectionMatrixInverse), e.isPerspectiveCamera && (e.fov = k * 2 * Math.atan(1 / e.projectionMatrix.elements[5]), e.zoom = 1);
11059
11059
  }
11060
11060
  this.getCamera = function() {
@@ -11070,8 +11070,8 @@ var Uc = "\nvoid main() {\n\n gl_Position = vec4( position, 1.0 );\n\n}", Wc = "
11070
11070
  }, this.getCameraTexture = function(e) {
11071
11071
  return x[e];
11072
11072
  };
11073
- let B = null;
11074
- function ie(t, i) {
11073
+ let z = null;
11074
+ function ae(t, i) {
11075
11075
  if (m = i.getViewerPose(p || a), v = i, m !== null) {
11076
11076
  let t = m.views;
11077
11077
  _ !== null && (e.setRenderTargetFramebuffer(w, _.framebuffer), e.setRenderTarget(w));
@@ -11110,14 +11110,14 @@ var Uc = "\nvoid main() {\n\n gl_Position = vec4( position, 1.0 );\n\n}", Wc = "
11110
11110
  let t = E[e], n = T[e];
11111
11111
  t !== null && n !== void 0 && n.update(t, i, p || a);
11112
11112
  }
11113
- B && B(t, i), i.detectedPlanes && n.dispatchEvent({
11113
+ z && z(t, i), i.detectedPlanes && n.dispatchEvent({
11114
11114
  type: "planesdetected",
11115
11115
  data: i
11116
11116
  }), v = null;
11117
11117
  }
11118
- let ae = new Ya();
11119
- ae.setAnimationLoop(ie), this.setAnimationLoop = function(e) {
11120
- B = e;
11118
+ let oe = new Ya();
11119
+ oe.setAnimationLoop(ae), this.setAnimationLoop = function(e) {
11120
+ z = e;
11121
11121
  }, this.dispose = function() {};
11122
11122
  }
11123
11123
  }, qc = /*@__PURE__*/ new vt(), Jc = /*@__PURE__*/ new ct();
@@ -11280,7 +11280,7 @@ var Zc = class {
11280
11280
  }, this.autoClear = !0, this.autoClearColor = !0, this.autoClearDepth = !0, this.autoClearStencil = !0, this.sortObjects = !0, this.clippingPlanes = [], this.localClippingEnabled = !1, this.toneMapping = 0, this.toneMappingExposure = 1, this.transmissionResolutionScale = 1;
11281
11281
  let T = this, E = !1;
11282
11282
  this._outputColorSpace = y;
11283
- let D = 0, O = 0, k = null, A = -1, j = null, M = new Ae(), N = new Ae(), P = null, F = new X(0), I = 0, ee = t.width, te = t.height, L = 1, ne = null, re = null, R = new Ae(0, 0, ee, te), z = new Ae(0, 0, ee, te), B = !1, ie = new lr(), ae = !1, oe = !1, se = new ct(), ce = new U(), le = new Ae(), ue = {
11283
+ let D = 0, O = 0, k = null, A = -1, j = null, M = new Ae(), N = new Ae(), P = null, F = new X(0), I = 0, ee = t.width, te = t.height, L = 1, ne = null, re = null, ie = new Ae(0, 0, ee, te), R = new Ae(0, 0, ee, te), z = !1, ae = new lr(), oe = !1, se = !1, ce = new ct(), le = new U(), B = new Ae(), ue = {
11284
11284
  background: null,
11285
11285
  fog: null,
11286
11286
  environment: null,
@@ -11347,17 +11347,17 @@ var Zc = class {
11347
11347
  }, this.getCurrentViewport = function(e) {
11348
11348
  return e.copy(M);
11349
11349
  }, this.getViewport = function(e) {
11350
- return e.copy(R);
11350
+ return e.copy(ie);
11351
11351
  }, this.setViewport = function(e, t, n, r) {
11352
- e.isVector4 ? R.set(e.x, e.y, e.z, e.w) : R.set(e, t, n, r), K.viewport(M.copy(R).multiplyScalar(L).round());
11352
+ e.isVector4 ? ie.set(e.x, e.y, e.z, e.w) : ie.set(e, t, n, r), K.viewport(M.copy(ie).multiplyScalar(L).round());
11353
11353
  }, this.getScissor = function(e) {
11354
- return e.copy(z);
11354
+ return e.copy(R);
11355
11355
  }, this.setScissor = function(e, t, n, r) {
11356
- e.isVector4 ? z.set(e.x, e.y, e.z, e.w) : z.set(e, t, n, r), K.scissor(N.copy(z).multiplyScalar(L).round());
11356
+ e.isVector4 ? R.set(e.x, e.y, e.z, e.w) : R.set(e, t, n, r), K.scissor(N.copy(R).multiplyScalar(L).round());
11357
11357
  }, this.getScissorTest = function() {
11358
- return B;
11358
+ return z;
11359
11359
  }, this.setScissorTest = function(e) {
11360
- K.setScissorTest(B = e);
11360
+ K.setScissorTest(z = e);
11361
11361
  }, this.setOpaqueSort = function(e) {
11362
11362
  ne = e;
11363
11363
  }, this.setTransparentSort = function(e) {
@@ -11505,13 +11505,13 @@ var Zc = class {
11505
11505
  return;
11506
11506
  }
11507
11507
  if (E === !0) return;
11508
- if (e.matrixWorldAutoUpdate === !0 && e.updateMatrixWorld(), t.parent === null && t.matrixWorldAutoUpdate === !0 && t.updateMatrixWorld(), Re.enabled === !0 && Re.isPresenting === !0 && (Re.cameraAutoUpdate === !0 && Re.updateCamera(t), t = Re.getCamera()), e.isScene === !0 && e.onBeforeRender(T, e, t, k), x = Te.get(e, C.length), x.init(t), C.push(x), se.multiplyMatrices(t.projectionMatrix, t.matrixWorldInverse), ie.setFromProjectionMatrix(se, w, t.reversedDepth), oe = this.localClippingEnabled, ae = Ee.init(this.clippingPlanes, oe), v = we.get(e, S.length), v.init(), S.push(v), Re.enabled === !0 && Re.isPresenting === !0) {
11508
+ if (e.matrixWorldAutoUpdate === !0 && e.updateMatrixWorld(), t.parent === null && t.matrixWorldAutoUpdate === !0 && t.updateMatrixWorld(), Re.enabled === !0 && Re.isPresenting === !0 && (Re.cameraAutoUpdate === !0 && Re.updateCamera(t), t = Re.getCamera()), e.isScene === !0 && e.onBeforeRender(T, e, t, k), x = Te.get(e, C.length), x.init(t), C.push(x), ce.multiplyMatrices(t.projectionMatrix, t.matrixWorldInverse), ae.setFromProjectionMatrix(ce, w, t.reversedDepth), se = this.localClippingEnabled, oe = Ee.init(this.clippingPlanes, se), v = we.get(e, S.length), v.init(), S.push(v), Re.enabled === !0 && Re.isPresenting === !0) {
11509
11509
  let e = T.xr.getDepthSensingMesh();
11510
11510
  e !== null && Ze(e, t, -Infinity, T.sortObjects);
11511
11511
  }
11512
- Ze(e, t, 0, T.sortObjects), v.finish(), T.sortObjects === !0 && v.sort(ne, re), de = Re.enabled === !1 || Re.isPresenting === !1 || Re.hasDepthSensing() === !1, de && Oe.addToRenderList(v, e), this.info.render.frame++, ae === !0 && Ee.beginShadows();
11512
+ Ze(e, t, 0, T.sortObjects), v.finish(), T.sortObjects === !0 && v.sort(ne, re), de = Re.enabled === !1 || Re.isPresenting === !1 || Re.hasDepthSensing() === !1, de && Oe.addToRenderList(v, e), this.info.render.frame++, oe === !0 && Ee.beginShadows();
11513
11513
  let n = x.state.shadowsArray;
11514
- De.render(n, e, t), ae === !0 && Ee.endShadows(), this.info.autoReset === !0 && this.info.reset();
11514
+ De.render(n, e, t), oe === !0 && Ee.endShadows(), this.info.autoReset === !0 && this.info.reset();
11515
11515
  let r = v.opaque, i = v.transmissive;
11516
11516
  if (x.setupLights(), t.isArrayCamera) {
11517
11517
  let n = t.cameras;
@@ -11525,7 +11525,7 @@ var Zc = class {
11525
11525
  Qe(v, e, r, r.viewport);
11526
11526
  }
11527
11527
  } else i.length > 0 && $e(r, i, e, t), de && Oe.render(e), Qe(v, e, t);
11528
- k !== null && O === 0 && (J.updateMultisampleRenderTarget(k), J.updateRenderTargetMipmap(k)), e.isScene === !0 && e.onAfterRender(T, e, t), Fe.resetDefaultState(), A = -1, j = null, C.pop(), C.length > 0 ? (x = C[C.length - 1], ae === !0 && Ee.setGlobalState(T.clippingPlanes, x.state.camera)) : x = null, S.pop(), v = S.length > 0 ? S[S.length - 1] : null;
11528
+ k !== null && O === 0 && (J.updateMultisampleRenderTarget(k), J.updateRenderTargetMipmap(k)), e.isScene === !0 && e.onAfterRender(T, e, t), Fe.resetDefaultState(), A = -1, j = null, C.pop(), C.length > 0 ? (x = C[C.length - 1], oe === !0 && Ee.setGlobalState(T.clippingPlanes, x.state.camera)) : x = null, S.pop(), v = S.length > 0 ? S[S.length - 1] : null;
11529
11529
  };
11530
11530
  function Ze(e, t, n, r) {
11531
11531
  if (e.visible === !1) return;
@@ -11534,20 +11534,20 @@ var Zc = class {
11534
11534
  else if (e.isLOD) e.autoUpdate === !0 && e.update(t);
11535
11535
  else if (e.isLight) x.pushLight(e), e.castShadow && x.pushShadow(e);
11536
11536
  else if (e.isSprite) {
11537
- if (!e.frustumCulled || ie.intersectsSprite(e)) {
11538
- r && le.setFromMatrixPosition(e.matrixWorld).applyMatrix4(se);
11537
+ if (!e.frustumCulled || ae.intersectsSprite(e)) {
11538
+ r && B.setFromMatrixPosition(e.matrixWorld).applyMatrix4(ce);
11539
11539
  let t = xe.update(e), i = e.material;
11540
- i.visible && v.push(e, t, i, n, le.z, null);
11540
+ i.visible && v.push(e, t, i, n, B.z, null);
11541
11541
  }
11542
- } else if ((e.isMesh || e.isLine || e.isPoints) && (!e.frustumCulled || ie.intersectsObject(e))) {
11542
+ } else if ((e.isMesh || e.isLine || e.isPoints) && (!e.frustumCulled || ae.intersectsObject(e))) {
11543
11543
  let t = xe.update(e), i = e.material;
11544
- if (r && (e.boundingSphere === void 0 ? (t.boundingSphere === null && t.computeBoundingSphere(), le.copy(t.boundingSphere.center)) : (e.boundingSphere === null && e.computeBoundingSphere(), le.copy(e.boundingSphere.center)), le.applyMatrix4(e.matrixWorld).applyMatrix4(se)), Array.isArray(i)) {
11544
+ if (r && (e.boundingSphere === void 0 ? (t.boundingSphere === null && t.computeBoundingSphere(), B.copy(t.boundingSphere.center)) : (e.boundingSphere === null && e.computeBoundingSphere(), B.copy(e.boundingSphere.center)), B.applyMatrix4(e.matrixWorld).applyMatrix4(ce)), Array.isArray(i)) {
11545
11545
  let r = t.groups;
11546
11546
  for (let a = 0, o = r.length; a < o; a++) {
11547
11547
  let o = r[a], s = i[o.materialIndex];
11548
- s && s.visible && v.push(e, t, s, n, le.z, o);
11548
+ s && s.visible && v.push(e, t, s, n, B.z, o);
11549
11549
  }
11550
- } else i.visible && v.push(e, t, i, n, le.z, null);
11550
+ } else i.visible && v.push(e, t, i, n, B.z, null);
11551
11551
  }
11552
11552
  }
11553
11553
  let i = e.children;
@@ -11555,7 +11555,7 @@ var Zc = class {
11555
11555
  }
11556
11556
  function Qe(e, t, n, r) {
11557
11557
  let i = e.opaque, a = e.transmissive, o = e.transparent;
11558
- x.setupLightsView(n), ae === !0 && Ee.setGlobalState(T.clippingPlanes, n), r && K.viewport(M.copy(r)), i.length > 0 && et(i, t, n), a.length > 0 && et(a, t, n), o.length > 0 && et(o, t, n), K.buffers.depth.setTest(!0), K.buffers.depth.setMask(!0), K.buffers.color.setMask(!0), K.setPolygonOffset(!1);
11558
+ x.setupLightsView(n), oe === !0 && Ee.setGlobalState(T.clippingPlanes, n), r && K.viewport(M.copy(r)), i.length > 0 && et(i, t, n), a.length > 0 && et(a, t, n), o.length > 0 && et(o, t, n), K.buffers.depth.setTest(!0), K.buffers.depth.setMask(!0), K.buffers.color.setMask(!0), K.setPolygonOffset(!1);
11559
11559
  }
11560
11560
  function $e(e, t, n, r) {
11561
11561
  if ((n.isScene === !0 ? n.overrideMaterial : null) !== null) return;
@@ -11576,7 +11576,7 @@ var Zc = class {
11576
11576
  let p = T.toneMapping;
11577
11577
  T.toneMapping = 0;
11578
11578
  let m = r.viewport;
11579
- if (r.viewport !== void 0 && (r.viewport = void 0), x.setupLightsView(r), ae === !0 && Ee.setGlobalState(T.clippingPlanes, r), et(e, n, r), J.updateMultisampleRenderTarget(s), J.updateRenderTargetMipmap(s), W.has("WEBGL_multisampled_render_to_texture") === !1) {
11579
+ if (r.viewport !== void 0 && (r.viewport = void 0), x.setupLightsView(r), oe === !0 && Ee.setGlobalState(T.clippingPlanes, r), et(e, n, r), J.updateMultisampleRenderTarget(s), J.updateRenderTargetMipmap(s), W.has("WEBGL_multisampled_render_to_texture") === !1) {
11580
11580
  let e = !1;
11581
11581
  for (let i = 0, a = t.length; i < a; i++) {
11582
11582
  let a = t[i], o = a.object, s = a.geometry, c = a.material, l = a.group;
@@ -11626,7 +11626,7 @@ var Zc = class {
11626
11626
  let a = t.fog, o = r.isMeshStandardMaterial ? t.environment : null, s = k === null ? T.outputColorSpace : k.isXRRenderTarget === !0 ? k.texture.colorSpace : b, c = (r.isMeshStandardMaterial ? ve : _e).get(r.envMap || o), l = r.vertexColors === !0 && !!n.attributes.color && n.attributes.color.itemSize === 4, u = !!n.attributes.tangent && (!!r.normalMap || r.anisotropy > 0), d = !!n.morphAttributes.position, f = !!n.morphAttributes.normal, p = !!n.morphAttributes.color, m = 0;
11627
11627
  r.toneMapped && (k === null || k.isXRRenderTarget === !0) && (m = T.toneMapping);
11628
11628
  let h = n.morphAttributes.position || n.morphAttributes.normal || n.morphAttributes.color, g = h === void 0 ? 0 : h.length, _ = q.get(r), v = x.state.lights;
11629
- if (ae === !0 && (oe === !0 || e !== j)) {
11629
+ if (oe === !0 && (se === !0 || e !== j)) {
11630
11630
  let t = e === j && r.id === A;
11631
11631
  Ee.setState(r, e, t);
11632
11632
  }
@@ -11638,7 +11638,7 @@ var Zc = class {
11638
11638
  if (K.useProgram(S.program) && (C = !0, w = !0, E = !0), r.id !== A && (A = r.id, w = !0), C || j !== e) {
11639
11639
  K.buffers.depth.getReversed() && e.reversedDepth !== !0 && (e._reversedDepth = !0, e.updateProjectionMatrix()), D.setValue(H, "projectionMatrix", e.projectionMatrix), D.setValue(H, "viewMatrix", e.matrixWorldInverse);
11640
11640
  let t = D.map.cameraPosition;
11641
- t !== void 0 && t.setValue(H, ce.setFromMatrixPosition(e.matrixWorld)), G.logarithmicDepthBuffer && D.setValue(H, "logDepthBufFC", 2 / (Math.log(e.far + 1) / Math.LN2)), (r.isMeshPhongMaterial || r.isMeshToonMaterial || r.isMeshLambertMaterial || r.isMeshBasicMaterial || r.isMeshStandardMaterial || r.isShaderMaterial) && D.setValue(H, "isOrthographic", e.isOrthographicCamera === !0), j !== e && (j = e, w = !0, E = !0);
11641
+ t !== void 0 && t.setValue(H, le.setFromMatrixPosition(e.matrixWorld)), G.logarithmicDepthBuffer && D.setValue(H, "logDepthBufFC", 2 / (Math.log(e.far + 1) / Math.LN2)), (r.isMeshPhongMaterial || r.isMeshToonMaterial || r.isMeshLambertMaterial || r.isMeshBasicMaterial || r.isMeshStandardMaterial || r.isShaderMaterial) && D.setValue(H, "isOrthographic", e.isOrthographicCamera === !0), j !== e && (j = e, w = !0, E = !0);
11642
11642
  }
11643
11643
  if (i.isSkinnedMesh) {
11644
11644
  D.setOptional(H, i, "bindMatrix"), D.setOptional(H, i, "bindMatrixInverse");
@@ -11695,7 +11695,7 @@ var Zc = class {
11695
11695
  (c.isData3DTexture || c.isDataArrayTexture || c.isCompressedArrayTexture) && (o = !0);
11696
11696
  let l = q.get(e).__webglFramebuffer;
11697
11697
  e.isWebGLCubeRenderTarget ? (i = Array.isArray(l[t]) ? l[t][n] : l[t], a = !0) : i = e.samples > 0 && J.useMultisampledRTT(e) === !1 ? q.get(e).__webglMultisampledFramebuffer : Array.isArray(l) ? l[n] : l, M.copy(e.viewport), N.copy(e.scissor), P = e.scissorTest;
11698
- } else M.copy(R).multiplyScalar(L).floor(), N.copy(z).multiplyScalar(L).floor(), P = B;
11698
+ } else M.copy(ie).multiplyScalar(L).floor(), N.copy(R).multiplyScalar(L).floor(), P = z;
11699
11699
  if (n !== 0 && (i = lt), K.bindFramebuffer(H.FRAMEBUFFER, i) && r && K.drawBuffers(e, i), K.viewport(M), K.scissor(N), K.setScissorTest(P), a) {
11700
11700
  let r = q.get(e.texture);
11701
11701
  H.framebufferTexture2D(H.FRAMEBUFFER, H.COLOR_ATTACHMENT0, H.TEXTURE_CUBE_MAP_POSITIVE_X + t, r.__webglTexture, n);
@@ -11803,79 +11803,189 @@ var Zc = class {
11803
11803
  t.drawingBufferColorSpace = Y._getDrawingBufferColorSpace(e), t.unpackColorSpace = Y._getUnpackColorSpace();
11804
11804
  }
11805
11805
  }, Qc = {
11806
+ name: "@liquidcars/atlas",
11807
+ version: "0.1.39",
11808
+ description: "Reusable 3D conceptual atlas Web Component for LiquidCars-style models",
11809
+ type: "module",
11810
+ scripts: {
11811
+ build: "node scripts/assemble-three-core.mjs && vite build",
11812
+ test: "node --test test/*.test.mjs"
11813
+ },
11814
+ main: "./dist/liquidcars-atlas.js",
11815
+ module: "./dist/liquidcars-atlas.js",
11816
+ exports: { ".": {
11817
+ import: "./dist/liquidcars-atlas.js",
11818
+ default: "./dist/liquidcars-atlas.js"
11819
+ } },
11820
+ files: [
11821
+ "index.html",
11822
+ "dist",
11823
+ "demo",
11824
+ "src",
11825
+ "scripts",
11826
+ "vite.config.js",
11827
+ "src/THREE-LICENSE.txt",
11828
+ "README.md"
11829
+ ],
11830
+ sideEffects: !0,
11831
+ devDependencies: { vite: "^8.3.0" },
11832
+ keywords: [
11833
+ "web-component",
11834
+ "custom-element",
11835
+ "threejs",
11836
+ "3d",
11837
+ "conceptual-model",
11838
+ "liquidcars"
11839
+ ],
11840
+ license: "MIT"
11841
+ }.version, $c = {
11806
11842
  component: "#8ae4d0",
11807
11843
  connection: "#f4edba"
11808
- }, $c = .05, el = 15, tl = /* @__PURE__ */ new Map(), nl = /* @__PURE__ */ new Map();
11809
- function rl(e) {
11810
- let { create: t, ...n } = e;
11844
+ }, el = .05, tl = 15, nl = /* @__PURE__ */ new Map(), rl = /* @__PURE__ */ new Map(), il = /* @__PURE__ */ new Map();
11845
+ function al(e) {
11846
+ return Array.isArray(e) ? e.map(al) : !e || typeof e != "object" ? e : Object.fromEntries(Object.entries(e).filter(([, e]) => typeof e != "function" && e !== void 0).map(([e, t]) => [e, al(t)]));
11847
+ }
11848
+ function ol(e) {
11849
+ return (e == null ? [] : Array.isArray(e) ? e : [e]).map((e) => typeof e == "string" ? { name: e } : al(e)).filter((e) => e && String(e.name || "").trim()).map((e) => ({
11850
+ ...e,
11851
+ name: String(e.name).trim()
11852
+ }));
11853
+ }
11854
+ function sl(e) {
11855
+ return [...new Set((e == null ? [] : Array.isArray(e) ? e : [e]).map((e) => String(e || "").trim()).filter(Boolean))];
11856
+ }
11857
+ function cl(e) {
11858
+ return e ? typeof e == "string" ? { spdx: e } : al(e) : null;
11859
+ }
11860
+ function ll(e, t) {
11861
+ let n = al(e || {}), r = String(n.id || `source-${t + 1}`).trim();
11862
+ if (!r) throw TypeError("Geometry pack sources require an id.");
11811
11863
  return {
11812
11864
  ...n,
11865
+ id: r,
11866
+ authors: ol(n.authors ?? n.author),
11867
+ license: cl(n.license)
11868
+ };
11869
+ }
11870
+ function ul(e, t, n) {
11871
+ let r = al(e || {}), i = String(r.id || "").trim();
11872
+ if (!i) throw TypeError(`Geometry pack resource at index ${t} requires an id.`);
11873
+ let a = r.source == null ? null : String(r.source).trim();
11874
+ if (a && !n.has(a)) throw TypeError(`Geometry pack resource '${i}' references unknown source '${a}'.`);
11875
+ return {
11876
+ ...r,
11877
+ id: i,
11878
+ kind: String(r.kind || r.type || "asset"),
11879
+ source: a,
11880
+ authors: ol(r.authors ?? r.author),
11881
+ license: cl(r.license)
11882
+ };
11883
+ }
11884
+ function dl(e, t) {
11885
+ let n = (Array.isArray(e.sources) ? e.sources : []).map(ll), r = new Set(n.map((e) => e.id)), i = (Array.isArray(e.resources) ? e.resources : []).map((e, t) => ul(e, t, r));
11886
+ if (new Set(i.map((e) => e.id)).size !== i.length) throw TypeError(`Geometry pack '${t}' contains duplicate resource ids.`);
11887
+ return {
11888
+ namespace: t,
11889
+ name: String(e.name || t),
11890
+ version: String(e.version || "0.0.0"),
11891
+ description: String(e.description || ""),
11892
+ category: String(e.category || e.name || t),
11893
+ homepage: e.homepage ? String(e.homepage) : "",
11894
+ repository: al(e.repository || null),
11895
+ authors: ol(e.authors ?? e.author),
11896
+ license: cl(e.license),
11897
+ attribution: String(e.attribution || ""),
11898
+ collections: al(Array.isArray(e.collections) ? e.collections : []),
11899
+ sources: n,
11900
+ resources: i,
11901
+ geometries: []
11902
+ };
11903
+ }
11904
+ function fl(e) {
11905
+ let { create: t, resourceMap: n, ...r } = e;
11906
+ return {
11907
+ ...al(r),
11813
11908
  canonicalSize: [...e.canonicalSize],
11814
- parameters: { ...e.parameters },
11815
- palette: { ...e.palette },
11816
- anchors: { ...e.anchors }
11909
+ parameters: al(e.parameters),
11910
+ palette: al(e.palette),
11911
+ anchors: al(e.anchors)
11817
11912
  };
11818
11913
  }
11819
- function il(e) {
11914
+ function pl(e) {
11915
+ return al(e);
11916
+ }
11917
+ function ml(e) {
11820
11918
  if (!e || typeof e != "object") throw TypeError("A geometry pack must be an object.");
11821
11919
  let t = String(e.namespace || "").trim();
11822
- if (!/^[a-z][a-z0-9-]*$/i.test(t)) throw TypeError("A geometry pack requires a valid namespace.");
11920
+ if (!/^[a-z][a-z0-9-]*(?:\.[a-z][a-z0-9-]*)*$/i.test(t)) throw TypeError("A geometry pack requires a valid dot-separated namespace.");
11823
11921
  if (!Array.isArray(e.geometries) || !e.geometries.length) throw TypeError("A geometry pack requires at least one geometry.");
11824
- let n = [];
11825
- for (let r of e.geometries) {
11826
- if (!r || typeof r != "object" || !r.id) throw TypeError(`Geometry pack '${t}' contains an invalid geometry.`);
11827
- let i = String(r.id).includes(".") ? String(r.id).split(".").pop() : String(r.id), a = String(r.id).includes(".") ? String(r.id) : `${t}.${i}`, o = {
11828
- ...r,
11829
- id: a,
11830
- localId: i,
11922
+ let n = dl(e, t), r = Object.freeze(Object.fromEntries(n.resources.map((e) => [e.id, Object.freeze(al(e))]))), i = [];
11923
+ for (let a of e.geometries) {
11924
+ if (!a || typeof a != "object" || !a.id) throw TypeError(`Geometry pack '${t}' contains an invalid geometry.`);
11925
+ let o = String(a.id).includes(".") ? String(a.id).split(".").pop() : String(a.id), s = String(a.id).includes(".") ? String(a.id) : `${t}.${o}`;
11926
+ i.push({
11927
+ ...a,
11928
+ id: s,
11929
+ localId: o,
11831
11930
  namespace: t,
11832
- pack: e.name || t,
11833
- packVersion: e.version || "0.0.0",
11834
- category: r.category || e.category || e.name || t,
11835
- canonicalSize: Array.isArray(r.canonicalSize) && r.canonicalSize.length === 3 ? r.canonicalSize.map(Number) : [
11931
+ pack: n.name,
11932
+ packVersion: n.version,
11933
+ category: a.category || n.category,
11934
+ collection: a.collection == null ? "" : String(a.collection).trim(),
11935
+ tags: sl(a.tags),
11936
+ keywords: sl(a.keywords),
11937
+ canonicalSize: Array.isArray(a.canonicalSize) && a.canonicalSize.length === 3 ? a.canonicalSize.map(Number) : [
11836
11938
  2.5,
11837
11939
  1.5,
11838
11940
  2.5
11839
11941
  ],
11840
- parameters: r.parameters && typeof r.parameters == "object" ? r.parameters : {},
11942
+ parameters: a.parameters && typeof a.parameters == "object" ? a.parameters : {},
11841
11943
  palette: {
11842
11944
  ...e.palette || {},
11843
- ...r.palette || {}
11945
+ ...a.palette || {}
11844
11946
  },
11845
11947
  anchors: {
11846
11948
  ...e.anchors || {},
11847
- ...r.anchors || {}
11848
- }
11849
- };
11850
- tl.set(a, o), nl.set(a, a);
11851
- for (let e of r.aliases || []) nl.set(String(e), a);
11852
- n.push(a);
11949
+ ...a.anchors || {}
11950
+ },
11951
+ resourceMap: r
11952
+ });
11853
11953
  }
11954
+ hl(t);
11955
+ let a = [];
11956
+ for (let e of i) {
11957
+ nl.set(e.id, e), rl.set(e.id, e.id);
11958
+ for (let t of e.aliases || []) rl.set(String(t), e.id);
11959
+ a.push(e.id);
11960
+ }
11961
+ n.geometries = [...a], il.set(t, n);
11962
+ let o = pl(n);
11854
11963
  return typeof globalThis.dispatchEvent == "function" && typeof CustomEvent == "function" && globalThis.dispatchEvent(new CustomEvent("lc-geometry-registry-change", { detail: {
11855
11964
  namespace: t,
11856
- geometries: n
11857
- } })), {
11858
- namespace: t,
11859
- geometries: n
11860
- };
11965
+ geometries: a,
11966
+ pack: o
11967
+ } })), o;
11861
11968
  }
11862
- function al(e) {
11969
+ function hl(e) {
11863
11970
  let t = [];
11864
- for (let [n, r] of tl) r.namespace === e && (tl.delete(n), t.push(n));
11865
- for (let [e, n] of nl) t.includes(n) && nl.delete(e);
11866
- return t;
11971
+ for (let [n, r] of nl) r.namespace === e && (nl.delete(n), t.push(n));
11972
+ for (let [e, n] of rl) t.includes(n) && rl.delete(e);
11973
+ return il.delete(e), t;
11867
11974
  }
11868
- function ol() {
11869
- return [...tl.values()].map(rl);
11975
+ function gl() {
11976
+ return [...nl.values()].map(fl);
11870
11977
  }
11871
- function sl(e) {
11872
- let t = nl.get(e) || e;
11873
- return tl.get(t) || null;
11978
+ function _l() {
11979
+ return [...il.values()].map(pl);
11874
11980
  }
11875
- function cl(e) {
11981
+ function vl(e) {
11982
+ let t = rl.get(e) || e;
11983
+ return nl.get(t) || null;
11984
+ }
11985
+ function yl(e) {
11876
11986
  return e === "container" || e === "shell";
11877
11987
  }
11878
- function ll(e = {}) {
11988
+ function bl(e = {}) {
11879
11989
  let t = e && typeof e == "object" ? e : {}, n = Number(t.opacity);
11880
11990
  return {
11881
11991
  mode: t.mode === "connected" ? "connected" : "all",
@@ -11884,24 +11994,34 @@ function ll(e = {}) {
11884
11994
  opacity: Number.isFinite(n) ? Math.max(.02, Math.min(.8, n)) : .12
11885
11995
  };
11886
11996
  }
11887
- function ul(e) {
11997
+ function xl(e) {
11888
11998
  return [
11889
11999
  "preserve",
11890
12000
  "center",
11891
12001
  "fit"
11892
12002
  ].includes(e) ? e : "preserve";
11893
12003
  }
11894
- function dl(e) {
12004
+ function Sl(e) {
11895
12005
  return e === "model" ? "model" : "camera";
11896
12006
  }
11897
- function fl(e, t) {
12007
+ function Cl(e, t) {
11898
12008
  e && e.transparent !== t && (e.transparent = t, e.needsUpdate = !0);
11899
12009
  }
11900
- il({
12010
+ ml({
11901
12011
  namespace: "geo",
11902
12012
  name: "Geometric primitives",
11903
12013
  version: "1",
12014
+ description: "Built-in Atlas geometric primitives.",
11904
12015
  category: "Geometric primitives",
12016
+ authors: [{
12017
+ name: "LiquidCars S.L.",
12018
+ url: "https://liquidcars.net"
12019
+ }],
12020
+ license: {
12021
+ spdx: "MIT",
12022
+ url: "https://opensource.org/license/mit"
12023
+ },
12024
+ homepage: "https://github.com/gaelibus/atlas",
11905
12025
  geometries: [
11906
12026
  "box",
11907
12027
  "cylinder",
@@ -11944,7 +12064,7 @@ il({
11944
12064
  } } : {}
11945
12065
  }))
11946
12066
  });
11947
- var pl = {
12067
+ var wl = {
11948
12068
  background: {
11949
12069
  color: "#0a111a",
11950
12070
  glow: "#1c2b39",
@@ -11989,17 +12109,17 @@ var pl = {
11989
12109
  hint: !0
11990
12110
  }
11991
12111
  };
11992
- function ml(e, t) {
12112
+ function Tl(e, t) {
11993
12113
  let n = { ...e };
11994
12114
  if (!t || typeof t != "object") return n;
11995
- for (let [r, i] of Object.entries(t)) n[r] = i && typeof i == "object" && !Array.isArray(i) ? ml(e?.[r] || {}, i) : i;
12115
+ for (let [r, i] of Object.entries(t)) n[r] = i && typeof i == "object" && !Array.isArray(i) ? Tl(e?.[r] || {}, i) : i;
11996
12116
  return n;
11997
12117
  }
11998
- function hl(e) {
12118
+ function El(e) {
11999
12119
  let t = e && typeof e == "object" ? { ...e } : {};
12000
- return typeof e == "string" ? t.background = { color: e } : typeof t.background == "string" && (t.background = { color: t.background }), ml(pl, t);
12120
+ return typeof e == "string" ? t.background = { color: e } : typeof t.background == "string" && (t.background = { color: t.background }), Tl(wl, t);
12001
12121
  }
12002
- function gl(e) {
12122
+ function Dl(e) {
12003
12123
  if (!e || typeof e != "object") return "directed";
12004
12124
  let t = String(e.mode || e.visual || e.render || e.type || e.direction || "").trim().toLowerCase().replace(/[_\s]+/g, "-");
12005
12125
  return e.bidirectional === !0 || [
@@ -12014,7 +12134,7 @@ function gl(e) {
12014
12134
  "failed"
12015
12135
  ].includes(t) ? "broken" : "directed";
12016
12136
  }
12017
- var _l = [":host{display:block;position:relative;height:var(--lc-height,680px);min-height:420px;color:var(--lc-panel-title,#e9f0f5);font:14px Inter,system-ui,-apple-system,sans-serif;background:var(--lc-bg,#0a111a);border:1px solid #294252;border-radius:12px;overflow:hidden;contain:content}", "*{box-sizing:border-box}.atlas{display:grid;grid-template-columns:minmax(0,1fr) 300px;height:100%}.atlas[data-panel=hidden]{grid-template-columns:1fr}.viewport{position:relative;min-width:0;overflow:hidden;background:radial-gradient(ellipse at 50% 45%,var(--lc-bg-glow,#1c2b39),var(--lc-bg-fade,#0a111a) 82%)}canvas{display:block;width:100%;height:100%;cursor:grab;touch-action:none}.toolbar{position:absolute;z-index:10;bottom:28px;left:50%;transform:translateX(-50%);display:flex;gap:3px;padding:6px;background:var(--lc-toolbar-bg,#15232fe8);border:1px solid var(--lc-toolbar-border,#3a5062);border-radius:8px;white-space:nowrap}.toolbar[data-hidden=true],.toolbar[hidden],.panel[data-hidden=true],.panel[hidden],.crumbs[data-hidden=true],.crumbs[hidden],.hint[data-hidden=true],.hint[hidden]{display:none!important}.toolbar button{height:30px;padding:0 9px;border:0;border-radius:5px;background:none;color:var(--lc-toolbar-text,#dbe7ec);cursor:pointer}.toolbar button:hover,.toolbar button.active{background:var(--lc-toolbar-active,#1f3d4b);color:var(--lc-toolbar-active-text,#c5f2e9)}.toolbar i{display:block;width:1px;margin:2px 3px;background:#38515f}.hint{position:absolute;z-index:9;top:8px;bottom:auto;left:0;right:0;text-align:center;padding:2px 8px;font-size:11px;line-height:16px;color:var(--lc-hint,#8da6b8);pointer-events:none}.panel{overflow:auto;padding:24px 20px;background:var(--lc-panel-bg,linear-gradient(140deg,#182633,#0e1925 65%));border-left:1px solid var(--lc-panel-border,#2a3a48)}.panel h2{font-size:26px;line-height:1.12;font-weight:470;margin:12px 0;color:var(--lc-panel-title,#e9f0f5)}.panel h3{font-size:11px;letter-spacing:1.4px;color:#91aabd;margin:24px 0 10px}.panel p{font-size:14px;line-height:1.55;color:var(--lc-panel-text,#b5c6d2)}.panel .eyebrow{font-size:11px;letter-spacing:1.7px;color:#6ad7c0}.panel .sub{font-size:13px;color:#8fa8bd;margin-bottom:16px}.panel .external-link{display:inline-flex;align-items:center;gap:6px;margin:2px 0 12px;color:#6ad7c0;font-size:13px;font-weight:600;text-decoration:none}.panel .external-link:hover{text-decoration:underline}.panel button{display:block;width:100%;padding:10px 0;text-align:left;background:none;border:0;border-bottom:1px solid var(--lc-panel-border,#2a3a48);color:#d9e7eb;cursor:pointer}.panel button:hover{color:#6ad7c0}.panel .relation{padding:10px 0;border-bottom:1px solid var(--lc-panel-border,#2a3a48)}.panel .relation strong{display:block;font-weight:550}.panel .relation small{display:block;color:#86a6b9;font-size:12px;margin-top:4px}.panel .back{color:#9db7c8;font-size:13px}.panel .crumbs{display:flex;flex-wrap:wrap;gap:5px;align-items:center;margin:0 0 12px}.panel .crumbs button{display:inline;width:auto;padding:3px 7px;border:0;border-radius:4px;background:var(--lc-crumb-bg,#142733);color:var(--lc-crumb-text,#91b6c7);font-size:12px}.panel .crumbs button.current{background:var(--lc-crumb-active,#1c4a4d);color:var(--lc-crumb-active-text,#c5f2e9)}.panel .note{border-top:1px solid var(--lc-panel-border,#2a3a48);padding-top:16px;margin-top:22px;font-size:12px;color:#7692a6}.error{position:absolute;inset:20%;padding:18px;background:#172b3b;border:1px solid #7896a9;line-height:1.5;z-index:4}@media(max-width:900px){.toolbar{gap:0}.toolbar button{padding:0 6px;font-size:12px}}@media(max-width:760px){:host{height:680px}.atlas{grid-template-columns:1fr;grid-template-rows:minmax(420px,1fr) auto}.panel{max-height:250px;border-left:0;border-top:1px solid var(--lc-panel-border,#2a3a48);padding:18px}.toolbar{bottom:24px}.hint{top:8px;bottom:auto;display:block}}"].join(""), vl = ".toolbar{max-width:calc(100% - 16px);overflow:visible}.toolbar-group{display:flex;align-items:center;gap:2px}.toolbar-group+.toolbar-group{padding-left:6px;border-left:1px solid #38515f}.toolbar .toolbar-icon{display:grid;width:30px;padding:0;place-items:center}.toolbar-icon svg,.toolbar-menu>summary svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.toolbar-menu{position:relative}.toolbar-menu>summary{display:flex;align-items:center;height:30px;padding:0 8px;gap:6px;border-radius:5px;color:var(--lc-toolbar-text,#dbe7ec);cursor:pointer;list-style:none;user-select:none}.toolbar-menu>summary::-webkit-details-marker{display:none}.toolbar-menu>summary:hover,.toolbar-menu[open]>summary{background:var(--lc-toolbar-active,#1f3d4b);color:var(--lc-toolbar-active-text,#c5f2e9)}.toolbar-menu-status{max-width:92px;overflow:hidden;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.toolbar-menu-chevron{width:10px;height:10px!important;transition:transform .16s ease}.toolbar-menu[open] .toolbar-menu-chevron{transform:rotate(180deg)}.toolbar-popover{position:absolute;right:0;bottom:calc(100% + 8px);display:grid;min-width:218px;padding:6px;border:1px solid var(--lc-toolbar-border,#3a5062);border-radius:9px;background:var(--lc-toolbar-bg,#15232ff7);box-shadow:0 14px 36px #0009}.toolbar-popover-title{padding:7px 9px 5px;color:var(--lc-hint,#8da6b8);font-size:9px;font-weight:700;letter-spacing:.1em;text-transform:uppercase}.toolbar .toolbar-option{display:grid;grid-template-columns:minmax(0,1fr) 18px;align-items:center;width:100%;height:auto;min-height:34px;padding:7px 9px;text-align:left}.toolbar-option span:first-child{overflow:hidden;text-overflow:ellipsis}.toolbar-option-check{color:var(--lc-toolbar-active-text,#c5f2e9);font-weight:700;text-align:center;visibility:hidden}.toolbar-option.active .toolbar-option-check{visibility:visible}.toolbar-option-separator{height:1px;margin:5px 7px;background:#38515f}.toolbar button[disabled]{opacity:.42;cursor:not-allowed}@media(max-width:620px){.toolbar-menu-status{display:none}.toolbar-menu>summary{width:30px;padding:0;justify-content:center}.toolbar-menu-chevron{display:none}.toolbar-group+.toolbar-group{padding-left:3px}.toolbar-popover{right:-4px}}", yl = [
12137
+ var Ol = [":host{display:block;position:relative;height:var(--lc-height,680px);min-height:420px;color:var(--lc-panel-title,#e9f0f5);font:14px Inter,system-ui,-apple-system,sans-serif;background:var(--lc-bg,#0a111a);border:1px solid #294252;border-radius:12px;overflow:hidden;contain:content}", "*{box-sizing:border-box}.atlas{display:grid;grid-template-columns:minmax(0,1fr) 300px;height:100%}.atlas[data-panel=hidden]{grid-template-columns:1fr}.viewport{position:relative;min-width:0;overflow:hidden;background:radial-gradient(ellipse at 50% 45%,var(--lc-bg-glow,#1c2b39),var(--lc-bg-fade,#0a111a) 82%)}canvas{display:block;width:100%;height:100%;cursor:grab;touch-action:none}.toolbar{position:absolute;z-index:10;bottom:28px;left:50%;transform:translateX(-50%);display:flex;gap:3px;padding:6px;background:var(--lc-toolbar-bg,#15232fe8);border:1px solid var(--lc-toolbar-border,#3a5062);border-radius:8px;white-space:nowrap}.toolbar[data-hidden=true],.toolbar[hidden],.panel[data-hidden=true],.panel[hidden],.crumbs[data-hidden=true],.crumbs[hidden],.hint[data-hidden=true],.hint[hidden]{display:none!important}.toolbar button{height:30px;padding:0 9px;border:0;border-radius:5px;background:none;color:var(--lc-toolbar-text,#dbe7ec);cursor:pointer}.toolbar button:hover,.toolbar button.active{background:var(--lc-toolbar-active,#1f3d4b);color:var(--lc-toolbar-active-text,#c5f2e9)}.toolbar i{display:block;width:1px;margin:2px 3px;background:#38515f}.hint{position:absolute;z-index:9;top:8px;bottom:auto;left:0;right:0;text-align:center;padding:2px 8px;font-size:11px;line-height:16px;color:var(--lc-hint,#8da6b8);pointer-events:none}.panel{overflow:auto;padding:24px 20px;background:var(--lc-panel-bg,linear-gradient(140deg,#182633,#0e1925 65%));border-left:1px solid var(--lc-panel-border,#2a3a48)}.panel h2{font-size:26px;line-height:1.12;font-weight:470;margin:12px 0;color:var(--lc-panel-title,#e9f0f5)}.panel h3{font-size:11px;letter-spacing:1.4px;color:#91aabd;margin:24px 0 10px}.panel p{font-size:14px;line-height:1.55;color:var(--lc-panel-text,#b5c6d2)}.panel .eyebrow{font-size:11px;letter-spacing:1.7px;color:#6ad7c0}.panel .sub{font-size:13px;color:#8fa8bd;margin-bottom:16px}.panel .external-link{display:inline-flex;align-items:center;gap:6px;margin:2px 0 12px;color:#6ad7c0;font-size:13px;font-weight:600;text-decoration:none}.panel .external-link:hover{text-decoration:underline}.panel button{display:block;width:100%;padding:10px 0;text-align:left;background:none;border:0;border-bottom:1px solid var(--lc-panel-border,#2a3a48);color:#d9e7eb;cursor:pointer}.panel button:hover{color:#6ad7c0}.panel .relation{padding:10px 0;border-bottom:1px solid var(--lc-panel-border,#2a3a48)}.panel .relation strong{display:block;font-weight:550}.panel .relation small{display:block;color:#86a6b9;font-size:12px;margin-top:4px}.panel .back{color:#9db7c8;font-size:13px}.panel .crumbs{display:flex;flex-wrap:wrap;gap:5px;align-items:center;margin:0 0 12px}.panel .crumbs button{display:inline;width:auto;padding:3px 7px;border:0;border-radius:4px;background:var(--lc-crumb-bg,#142733);color:var(--lc-crumb-text,#91b6c7);font-size:12px}.panel .crumbs button.current{background:var(--lc-crumb-active,#1c4a4d);color:var(--lc-crumb-active-text,#c5f2e9)}.panel .note{border-top:1px solid var(--lc-panel-border,#2a3a48);padding-top:16px;margin-top:22px;font-size:12px;color:#7692a6}.error{position:absolute;inset:20%;padding:18px;background:#172b3b;border:1px solid #7896a9;line-height:1.5;z-index:4}@media(max-width:900px){.toolbar{gap:0}.toolbar button{padding:0 6px;font-size:12px}}@media(max-width:760px){:host{height:680px}.atlas{grid-template-columns:1fr;grid-template-rows:minmax(420px,1fr) auto}.panel{max-height:250px;border-left:0;border-top:1px solid var(--lc-panel-border,#2a3a48);padding:18px}.toolbar{bottom:24px}.hint{top:8px;bottom:auto;display:block}}"].join(""), kl = ".toolbar{max-width:calc(100% - 16px);overflow:visible}.toolbar-group{display:flex;align-items:center;gap:2px}.toolbar-group+.toolbar-group{padding-left:6px;border-left:1px solid #38515f}.toolbar .toolbar-icon{display:grid;width:30px;padding:0;place-items:center}.toolbar-icon svg,.toolbar-menu>summary svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}.toolbar-menu{position:relative}.toolbar-menu>summary{display:flex;align-items:center;height:30px;padding:0 8px;gap:6px;border-radius:5px;color:var(--lc-toolbar-text,#dbe7ec);cursor:pointer;list-style:none;user-select:none}.toolbar-menu>summary::-webkit-details-marker{display:none}.toolbar-menu>summary:hover,.toolbar-menu[open]>summary{background:var(--lc-toolbar-active,#1f3d4b);color:var(--lc-toolbar-active-text,#c5f2e9)}.toolbar-menu-status{max-width:92px;overflow:hidden;font-size:11px;text-overflow:ellipsis;white-space:nowrap}.toolbar-menu-chevron{width:10px;height:10px!important;transition:transform .16s ease}.toolbar-menu[open] .toolbar-menu-chevron{transform:rotate(180deg)}.toolbar-popover{position:absolute;right:0;bottom:calc(100% + 8px);display:grid;min-width:218px;padding:6px;border:1px solid var(--lc-toolbar-border,#3a5062);border-radius:9px;background:var(--lc-toolbar-bg,#15232ff7);box-shadow:0 14px 36px #0009}.toolbar-popover-title{padding:7px 9px 5px;color:var(--lc-hint,#8da6b8);font-size:9px;font-weight:700;letter-spacing:.1em;text-transform:uppercase}.toolbar .toolbar-option{display:grid;grid-template-columns:minmax(0,1fr) 18px;align-items:center;width:100%;height:auto;min-height:34px;padding:7px 9px;text-align:left}.toolbar-option span:first-child{overflow:hidden;text-overflow:ellipsis}.toolbar-option-check{color:var(--lc-toolbar-active-text,#c5f2e9);font-weight:700;text-align:center;visibility:hidden}.toolbar-option.active .toolbar-option-check{visibility:visible}.toolbar-option-separator{height:1px;margin:5px 7px;background:#38515f}.toolbar button[disabled]{opacity:.42;cursor:not-allowed}@media(max-width:620px){.toolbar-menu-status{display:none}.toolbar-menu>summary{width:30px;padding:0;justify-content:center}.toolbar-menu-chevron{display:none}.toolbar-group+.toolbar-group{padding-left:3px}.toolbar-popover{right:-4px}}", Al = [
12018
12138
  ".viewport>.atlas-print-snapshot{display:none!important}",
12019
12139
  "@media print{",
12020
12140
  ":host{-webkit-print-color-adjust:exact;print-color-adjust:exact;break-inside:avoid;page-break-inside:avoid}",
@@ -12023,17 +12143,17 @@ var _l = [":host{display:block;position:relative;height:var(--lc-height,680px);m
12023
12143
  ":host([data-lc-print-ready]) .viewport>canvas:not(.atlas-print-snapshot){display:none!important}",
12024
12144
  ":host([data-lc-print-ready]) .viewport>.atlas-print-snapshot{display:block!important;width:100%;height:100%}",
12025
12145
  "}"
12026
- ].join(""), bl = (e, t = "0 0 24 24") => `<svg viewBox="${t}" aria-hidden="true">${e}</svg>`, xl = {
12027
- minus: bl("<path d=\"M6 12h12\"/>"),
12028
- plus: bl("<path d=\"M12 6v12M6 12h12\"/>"),
12029
- fit: bl("<path d=\"M9 4H4v5M15 4h5v5M20 15v5h-5M4 15v5h5\"/><circle cx=\"12\" cy=\"12\" r=\"2.5\"/>"),
12030
- front: bl("<rect x=\"4\" y=\"5\" width=\"16\" height=\"14\" rx=\"1.5\"/><path d=\"M8 16h8\"/>"),
12031
- view: bl("<path d=\"M2.5 12s3.5-5 9.5-5 9.5 5 9.5 5-3.5 5-9.5 5-9.5-5-9.5-5Z\"/><circle cx=\"12\" cy=\"12\" r=\"2.5\"/>"),
12032
- relations: bl("<circle cx=\"5\" cy=\"6\" r=\"2\"/><circle cx=\"19\" cy=\"7\" r=\"2\"/><circle cx=\"12\" cy=\"18\" r=\"2\"/><path d=\"m6.8 6.3 10.2.5M6.2 7.7l4.6 8.6m6.8-7.5-4.4 7.5\"/>"),
12033
- focus: bl("<circle cx=\"12\" cy=\"12\" r=\"7\"/><circle cx=\"12\" cy=\"12\" r=\"2.5\"/><path d=\"M12 2v3M12 19v3M2 12h3M19 12h3\"/>"),
12034
- chevron: bl("<path d=\"m8 10 4 4 4-4\"/>")
12035
- }, Sl = (e, t, n = !1) => `<button class="toolbar-option${n ? " active" : ""}" data-action="${e}" aria-pressed="${n}"><span>${t}</span><span class="toolbar-option-check" aria-hidden="true">✓</span></button>`, Cl = (e, t, n, r, i) => `<details class="toolbar-menu" data-toolbar-menu="${e}"><summary aria-label="${n}" title="${n}">${t}<span class="toolbar-menu-status" data-toolbar-status="${e}">${r}</span>${xl.chevron}</summary><div class="toolbar-popover" role="menu"><div class="toolbar-popover-title">${n}</div>${i}</div></details>`, wl = `<div class="atlas"><section class="viewport"><canvas tabindex="0" aria-label="Modelo 3D interactivo"></canvas><div class="toolbar" role="toolbar" aria-label="Controles de la vista"><div class="toolbar-group" data-toolbar-group="camera"><button class="toolbar-icon" data-action="minus" aria-label="Alejar" title="Alejar">${xl.minus}</button><button class="toolbar-icon" data-action="plus" aria-label="Acercar" title="Acercar">${xl.plus}</button><button class="toolbar-icon" data-action="fit" aria-label="Encuadrar todo el modelo" title="Encuadrar todo el modelo">${xl.fit}</button><button class="toolbar-icon" data-action="front" aria-label="Vista frontal" title="Vista frontal">${xl.front}</button></div><div class="toolbar-group" data-toolbar-group="view">${Cl("view", xl.view, "Vista", "Vista", Sl("labels", "Etiquetas", !0) + Sl("panel", "Información", !0) + Sl("item-facing", "Caras a cámara", !0) + "<div class=\"toolbar-option-separator\"></div>" + Sl("open-all", "Abrir todos") + Sl("close-all", "Cerrar todos"))}</div><div class="toolbar-group" data-toolbar-group="relations">${Cl("relations", xl.relations, "Relaciones", "Selección", Sl("relations-all", "Todas") + Sl("relations-selected", "Selección", !0) + Sl("relations-none", "Ocultar"))}</div><div class="toolbar-group" data-toolbar-group="focus">${Cl("focus", xl.focus, "Foco", "Todo", Sl("focus-all", "Todo", !0) + Sl("focus-dim", "Conectados") + Sl("focus-hide", "Aislar") + "<div class=\"toolbar-option-separator\"></div>" + Sl("focus-selection", "Enfocar selección") + Sl("focus-layout", "Reorganizar visibles"))}</div></div><div class="hint">Gira: arrastra · Pan: botón derecho / ⇧+arrastra / 2 dedos · Zoom: rueda o pellizco · Selecciona: clic · Enfoca: doble clic</div></section><aside class="panel" aria-live="polite"></aside></div>`;
12036
- function Tl(e) {
12146
+ ].join(""), jl = (e, t = "0 0 24 24") => `<svg viewBox="${t}" aria-hidden="true">${e}</svg>`, Ml = {
12147
+ minus: jl("<path d=\"M6 12h12\"/>"),
12148
+ plus: jl("<path d=\"M12 6v12M6 12h12\"/>"),
12149
+ fit: jl("<path d=\"M9 4H4v5M15 4h5v5M20 15v5h-5M4 15v5h5\"/><circle cx=\"12\" cy=\"12\" r=\"2.5\"/>"),
12150
+ front: jl("<rect x=\"4\" y=\"5\" width=\"16\" height=\"14\" rx=\"1.5\"/><path d=\"M8 16h8\"/>"),
12151
+ view: jl("<path d=\"M2.5 12s3.5-5 9.5-5 9.5 5 9.5 5-3.5 5-9.5 5-9.5-5-9.5-5Z\"/><circle cx=\"12\" cy=\"12\" r=\"2.5\"/>"),
12152
+ relations: jl("<circle cx=\"5\" cy=\"6\" r=\"2\"/><circle cx=\"19\" cy=\"7\" r=\"2\"/><circle cx=\"12\" cy=\"18\" r=\"2\"/><path d=\"m6.8 6.3 10.2.5M6.2 7.7l4.6 8.6m6.8-7.5-4.4 7.5\"/>"),
12153
+ focus: jl("<circle cx=\"12\" cy=\"12\" r=\"7\"/><circle cx=\"12\" cy=\"12\" r=\"2.5\"/><path d=\"M12 2v3M12 19v3M2 12h3M19 12h3\"/>"),
12154
+ chevron: jl("<path d=\"m8 10 4 4 4-4\"/>")
12155
+ }, Nl = (e, t, n = !1) => `<button class="toolbar-option${n ? " active" : ""}" data-action="${e}" aria-pressed="${n}"><span>${t}</span><span class="toolbar-option-check" aria-hidden="true">✓</span></button>`, Pl = (e, t, n, r, i) => `<details class="toolbar-menu" data-toolbar-menu="${e}"><summary aria-label="${n}" title="${n}">${t}<span class="toolbar-menu-status" data-toolbar-status="${e}">${r}</span>${Ml.chevron}</summary><div class="toolbar-popover" role="menu"><div class="toolbar-popover-title">${n}</div>${i}</div></details>`, Fl = `<div class="atlas"><section class="viewport"><canvas tabindex="0" aria-label="Modelo 3D interactivo"></canvas><div class="toolbar" role="toolbar" aria-label="Controles de la vista"><div class="toolbar-group" data-toolbar-group="camera"><button class="toolbar-icon" data-action="minus" aria-label="Alejar" title="Alejar">${Ml.minus}</button><button class="toolbar-icon" data-action="plus" aria-label="Acercar" title="Acercar">${Ml.plus}</button><button class="toolbar-icon" data-action="fit" aria-label="Encuadrar todo el modelo" title="Encuadrar todo el modelo">${Ml.fit}</button><button class="toolbar-icon" data-action="front" aria-label="Vista frontal" title="Vista frontal">${Ml.front}</button></div><div class="toolbar-group" data-toolbar-group="view">${Pl("view", Ml.view, "Vista", "Vista", Nl("labels", "Etiquetas", !0) + Nl("panel", "Información", !0) + Nl("item-facing", "Caras a cámara", !0) + "<div class=\"toolbar-option-separator\"></div>" + Nl("open-all", "Abrir todos") + Nl("close-all", "Cerrar todos"))}</div><div class="toolbar-group" data-toolbar-group="relations">${Pl("relations", Ml.relations, "Relaciones", "Selección", Nl("relations-all", "Todas") + Nl("relations-selected", "Selección", !0) + Nl("relations-none", "Ocultar"))}</div><div class="toolbar-group" data-toolbar-group="focus">${Pl("focus", Ml.focus, "Foco", "Todo", Nl("focus-all", "Todo", !0) + Nl("focus-dim", "Conectados") + Nl("focus-hide", "Aislar") + "<div class=\"toolbar-option-separator\"></div>" + Nl("focus-selection", "Enfocar selección") + Nl("focus-layout", "Reorganizar visibles"))}</div></div><div class="hint">Gira: arrastra · Pan: botón derecho / ⇧+arrastra / 2 dedos · Zoom: rueda o pellizco · Selecciona: clic · Enfoca: doble clic</div></section><aside class="panel" aria-live="polite"></aside></div>`;
12156
+ function Il(e) {
12037
12157
  return String(e ?? "").replace(/[&<>"']/g, (e) => ({
12038
12158
  "&": "&amp;",
12039
12159
  "<": "&lt;",
@@ -12042,17 +12162,17 @@ function Tl(e) {
12042
12162
  "'": "&#39;"
12043
12163
  })[e]);
12044
12164
  }
12045
- function El(e) {
12165
+ function Ll(e) {
12046
12166
  let t = String(e ?? "").trim();
12047
12167
  if (!t) return "";
12048
12168
  try {
12049
12169
  let e = new URL(t, globalThis.location?.href);
12050
- return ["http:", "https:"].includes(e.protocol) ? "<a class=\"external-link\" href=\"" + Tl(e.href) + "\" target=\"_blank\" rel=\"noopener noreferrer\">Open documentation ↗</a>" : "";
12170
+ return ["http:", "https:"].includes(e.protocol) ? "<a class=\"external-link\" href=\"" + Il(e.href) + "\" target=\"_blank\" rel=\"noopener noreferrer\">Open documentation ↗</a>" : "";
12051
12171
  } catch {
12052
12172
  return "";
12053
12173
  }
12054
12174
  }
12055
- function Dl(e) {
12175
+ function Rl(e) {
12056
12176
  let t = e && typeof e == "object" ? e : {}, n = Array.isArray(t.entities) ? t.entities.map((e) => ({
12057
12177
  ...e,
12058
12178
  p: Array.isArray(e.p) ? e.p : [
@@ -12069,28 +12189,28 @@ function Dl(e) {
12069
12189
  from: e[0],
12070
12190
  to: e[1],
12071
12191
  label: e[2] || "",
12072
- mode: gl({ mode: e[3] }),
12192
+ mode: Dl({ mode: e[3] }),
12073
12193
  index: t
12074
12194
  } : {
12075
12195
  ...e,
12076
12196
  from: e.from,
12077
12197
  to: e.to,
12078
12198
  label: e.label || "",
12079
- mode: gl(e),
12199
+ mode: Dl(e),
12080
12200
  index: t
12081
12201
  }) : [];
12082
12202
  return {
12083
12203
  ...t,
12084
12204
  palette: {
12085
- ...Qc,
12205
+ ...$c,
12086
12206
  ...t.palette || {}
12087
12207
  },
12088
- theme: hl(t.theme || t.styles),
12208
+ theme: El(t.theme || t.styles),
12089
12209
  entities: n,
12090
12210
  relations: r
12091
12211
  };
12092
12212
  }
12093
- function Ol(e, t, n = [
12213
+ function zl(e, t, n = [
12094
12214
  1,
12095
12215
  1,
12096
12216
  1
@@ -12109,7 +12229,7 @@ function Ol(e, t, n = [
12109
12229
  });
12110
12230
  return s.center(), s;
12111
12231
  }
12112
- function kl(e, t, n) {
12232
+ function Bl(e, t, n) {
12113
12233
  let r = new ui();
12114
12234
  for (let t = 0; t < e; t++) {
12115
12235
  let n = Math.PI / 2 + t * Math.PI * 2 / e, i = new V(Math.cos(n) * .5, Math.sin(n) * .5);
@@ -12126,7 +12246,7 @@ function kl(e, t, n) {
12126
12246
  });
12127
12247
  return i.rotateX(Math.PI / 2), i.center(), i;
12128
12248
  }
12129
- function Al(e, t, n, r) {
12249
+ function Vl(e, t, n, r) {
12130
12250
  let i = Math.min(.22, Math.max(0, Number(n) || 0));
12131
12251
  if (!i) return new Er(t, e, 1, 32);
12132
12252
  let a = [new V(0, -.5)];
@@ -12143,7 +12263,7 @@ function Al(e, t, n, r) {
12143
12263
  }
12144
12264
  return a.push(new V(0, .5)), new Qi(a, 32);
12145
12265
  }
12146
- function jl(e, t) {
12266
+ function Hl(e, t) {
12147
12267
  if (!t) return e;
12148
12268
  let n = Math.min(.72, Math.max(0, Number(t) * 3)), r = e.attributes.position;
12149
12269
  for (let e = 0; e < r.count; e++) {
@@ -12152,36 +12272,36 @@ function jl(e, t) {
12152
12272
  }
12153
12273
  return r.needsUpdate = !0, e.computeVertexNormals(), e;
12154
12274
  }
12155
- function Ml(e, t = 0, n = 4, r = [
12275
+ function Ul(e, t = 0, n = 4, r = [
12156
12276
  1,
12157
12277
  1,
12158
12278
  1
12159
12279
  ]) {
12160
12280
  let i = Number(t) || 0, a = Math.max(2, Math.round(Number(n) || 4));
12161
12281
  switch (e) {
12162
- case "cylinder": return i ? Al(.5, .5, i, a) : new Er(.5, .5, 1, 32);
12163
- case "cone": return i ? Al(0, .5, i, a) : new Dr(.5, 1, 32);
12282
+ case "cylinder": return i ? Vl(.5, .5, i, a) : new Er(.5, .5, 1, 32);
12283
+ case "cone": return i ? Vl(0, .5, i, a) : new Dr(.5, 1, 32);
12164
12284
  case "frustum-cone":
12165
- case "truncated-cone": return i ? Al(.28, .5, i, a) : new Er(.28, .5, 1, 32);
12285
+ case "truncated-cone": return i ? Vl(.28, .5, i, a) : new Er(.28, .5, 1, 32);
12166
12286
  case "frustum-pyramid":
12167
12287
  case "truncated-pyramid": return new Er(.28, .5, 1, 4);
12168
12288
  case "frustum-triangle": return new Er(.28, .5, 1, 3);
12169
- case "prism": return i ? kl(6, i, a) : new Er(.5, .5, 1, 6);
12170
- case "pyramid-square": return i ? jl(new Dr(.5, 1, 4), i) : new Dr(.5, 1, 4);
12171
- case "pyramid-triangle": return i ? jl(new Dr(.5, 1, 3), i) : new Dr(.5, 1, 3);
12289
+ case "prism": return i ? Bl(6, i, a) : new Er(.5, .5, 1, 6);
12290
+ case "pyramid-square": return i ? Hl(new Dr(.5, 1, 4), i) : new Dr(.5, 1, 4);
12291
+ case "pyramid-triangle": return i ? Hl(new Dr(.5, 1, 3), i) : new Dr(.5, 1, 3);
12172
12292
  case "sphere": return new ta(.5, 24, 16);
12173
- case "octahedron": return jl(new $i(.5), i);
12174
- case "dodecahedron": return jl(new kr(.5), i);
12175
- case "icosahedron": return jl(new Zi(.5), i);
12176
- default: return i ? Ol(i, a, r) : new Nn(1, 1, 1);
12293
+ case "octahedron": return Hl(new $i(.5), i);
12294
+ case "dodecahedron": return Hl(new kr(.5), i);
12295
+ case "icosahedron": return Hl(new Zi(.5), i);
12296
+ default: return i ? zl(i, a, r) : new Nn(1, 1, 1);
12177
12297
  }
12178
12298
  }
12179
- function Nl(e) {
12299
+ function Wl(e) {
12180
12300
  e.computeBoundingBox();
12181
12301
  let t = e.boundingBox?.getSize(new U());
12182
12302
  return !t || !t.x || !t.y || !t.z ? e : (e.scale(1 / t.x, 1 / t.y, 1 / t.z), e.computeBoundingBox(), e);
12183
12303
  }
12184
- function Pl(e, t) {
12304
+ function Gl(e, t) {
12185
12305
  let n = e.geometryOptions || e.geometry_options || e.parameters || {}, r = {};
12186
12306
  for (let [e, n] of Object.entries(t?.parameters || {})) n && Object.hasOwn(n, "default") && (r[e] = n.default);
12187
12307
  return {
@@ -12189,10 +12309,10 @@ function Pl(e, t) {
12189
12309
  ...n && typeof n == "object" ? n : {}
12190
12310
  };
12191
12311
  }
12192
- function Fl(e, t, n) {
12312
+ function Kl(e, t, n) {
12193
12313
  return typeof e != "string" || !e ? n : t[e] || e;
12194
12314
  }
12195
- function Il(e, t = "#ffffff", n = "transparent") {
12315
+ function ql(e, t = "#ffffff", n = "transparent") {
12196
12316
  let r = document.createElement("canvas");
12197
12317
  r.width = 256, r.height = 256;
12198
12318
  let i = r.getContext("2d");
@@ -12200,27 +12320,28 @@ function Il(e, t = "#ffffff", n = "transparent") {
12200
12320
  let a = new Cr(r);
12201
12321
  return a.colorSpace = y, a;
12202
12322
  }
12203
- function Ll(e) {
12204
- return e.shape === "plane" ? new ea(1, 1) : Ml(e.shape || e.geometry || "box", e.radius, e.segments, e.size);
12323
+ function Jl(e) {
12324
+ return e.shape === "plane" ? new ea(1, 1) : Ul(e.shape || e.geometry || "box", e.radius, e.segments, e.size);
12205
12325
  }
12206
- function Rl(e, t, n, r, i) {
12207
- let a = Pl(t, e), o = {
12326
+ function Yl(e, t, n, r, i) {
12327
+ let a = Gl(t, e), o = {
12208
12328
  ...n,
12209
12329
  ...e.palette || {},
12210
12330
  ...t.geometryPalette || t.geometry_palette || {}
12211
12331
  }, s = typeof e.create == "function" ? e.create({
12212
12332
  parameters: { ...a },
12213
12333
  colors: { ...o },
12214
- entity: { ...t }
12334
+ entity: { ...t },
12335
+ resources: e.resourceMap || {}
12215
12336
  }) : { parts: e.parts || [] };
12216
12337
  Array.isArray(s) && (s = { parts: s });
12217
12338
  let c = Array.isArray(s?.parts) ? s.parts : [];
12218
12339
  if (!c.length) throw Error(`Geometry '${e.id}' did not produce any parts.`);
12219
12340
  let l = new Qn(), u = [], d = [];
12220
12341
  for (let a of c) {
12221
- let s = Ll(a);
12222
- Nl(s);
12223
- let c = a.color || "component", f = Fl(c, o, n.component || Qc.component), p = new ia({
12342
+ let s = Jl(a);
12343
+ Wl(s);
12344
+ let c = a.color || "component", f = Kl(c, o, n.component || $c.component), p = new ia({
12224
12345
  color: f,
12225
12346
  roughness: Number.isFinite(Number(a.roughness)) ? Number(a.roughness) : .72,
12226
12347
  metalness: Number.isFinite(Number(a.metalness)) ? Number(a.metalness) : .06,
@@ -12291,7 +12412,7 @@ function Rl(e, t, n, r, i) {
12291
12412
  n.src = g;
12292
12413
  }
12293
12414
  })(), p.map.colorSpace = y, p.needsUpdate = !0;
12294
- } else h != null && h !== "" && (p.map = Il(h, Fl(a.iconColor || "#ffffff", o, "#ffffff"), Fl(a.iconBackground || "transparent", o, "transparent")), p.transparent = !0, p.needsUpdate = !0);
12415
+ } else h != null && h !== "" && (p.map = ql(h, Kl(a.iconColor || "#ffffff", o, "#ffffff"), Kl(a.iconBackground || "transparent", o, "transparent")), p.transparent = !0, p.needsUpdate = !0);
12295
12416
  if (m = new An(s, p), m.position.fromArray(Array.isArray(a.position) ? a.position : [
12296
12417
  0,
12297
12418
  0,
@@ -12327,7 +12448,7 @@ function Rl(e, t, n, r, i) {
12327
12448
  descriptor: s
12328
12449
  };
12329
12450
  }
12330
- function zl(e, t, n, r = "", i = !0) {
12451
+ function Xl(e, t, n, r = "", i = !0) {
12331
12452
  let a = document.createElement("canvas"), o = a.getContext("2d"), s = n.x * .88, c = Math.min(.82, n.y * .64);
12332
12453
  a.width = Math.ceil(s * 320), a.height = Math.ceil(c * 320), o.imageSmoothingEnabled = !0, o.imageSmoothingQuality = "high", o.clearRect(0, 0, a.width, a.height);
12333
12454
  let l = a.height * .62;
@@ -12364,7 +12485,7 @@ function zl(e, t, n, r = "", i = !0) {
12364
12485
  let C = new An(b, v);
12365
12486
  C.rotation.y = Math.PI, C.position.set(0, n.y / 2 - .09 - c / 2, -n.z / 2 - .012);
12366
12487
  let w = new An(b, v.clone());
12367
- w.rotation.x = -Math.PI / 2, w.position.set(0, n.y / 2 + .012, 0), w.visible = cl(r), x.add(S, C, w);
12488
+ w.rotation.x = -Math.PI / 2, w.position.set(0, n.y / 2 + .012, 0), w.visible = yl(r), x.add(S, C, w);
12368
12489
  for (let e of [
12369
12490
  S,
12370
12491
  C,
@@ -12372,7 +12493,7 @@ function zl(e, t, n, r = "", i = !0) {
12372
12493
  ]) e.renderOrder = 20, e.frustumCulled = !1, e.material.depthTest = !0, e.material.depthWrite = !1, e.material.transparent = !0;
12373
12494
  return x.renderOrder = 20, x.frustumCulled = !1, x.userData.front = S, x.userData.back = C, x.userData.top = w, x.userData.height = c, x.userData.width = s, x.userData.textOffsetX = h, x.userData.textOffsetY = g, x.userData.nodeLabel = !0, x;
12374
12495
  }
12375
- function Bl(e, t, n, r = globalThis.document) {
12496
+ function Zl(e, t, n, r = globalThis.document) {
12376
12497
  if (!e || !t || !n || !r?.createElement) return null;
12377
12498
  try {
12378
12499
  e.render(t, n);
@@ -12394,7 +12515,8 @@ function Bl(e, t, n, r = globalThis.document) {
12394
12515
  return null;
12395
12516
  }
12396
12517
  }
12397
- var Vl = class extends HTMLElement {
12518
+ var Ql = class extends HTMLElement {
12519
+ static version = Qc;
12398
12520
  static get observedAttributes() {
12399
12521
  return [
12400
12522
  "height",
@@ -12411,20 +12533,23 @@ var Vl = class extends HTMLElement {
12411
12533
  ];
12412
12534
  }
12413
12535
  static registerGeometryPack(e) {
12414
- return il(e);
12536
+ return ml(e);
12415
12537
  }
12416
12538
  static unregisterGeometryPack(e) {
12417
- return al(e);
12539
+ return hl(e);
12418
12540
  }
12419
12541
  static getGeometryCatalog() {
12420
- return ol();
12542
+ return gl();
12543
+ }
12544
+ static getGeometryPackCatalog() {
12545
+ return _l();
12421
12546
  }
12422
12547
  constructor() {
12423
- super(), this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = "<style>" + _l + vl + yl + "</style>" + wl, this.canvas = this.shadowRoot.querySelector("canvas"), this.panel = this.shadowRoot.querySelector(".panel"), this.scene = new tr(), this.camera = new Kn(30, 1, .1, 2e3), this.cameraPosition = new U(), this.cameraTarget = new U(), this.raycaster = new Wa(), this.pointer = new V(), this.nodes = /* @__PURE__ */ new Map(), this.open = /* @__PURE__ */ new Set(), this._initialOpenContainers = /* @__PURE__ */ new Set(), this.selected = null, this.selectedRelationIndex = null, this.modelData = null, this._loading = !1, this._pendingSelection = null, this._theme = hl(), this.relationMode = this.getAttribute("relation-mode") || "selected", this.focusFilter = ll({
12548
+ super(), this.attachShadow({ mode: "open" }), this.shadowRoot.innerHTML = "<style>" + Ol + kl + Al + "</style>" + Fl, this.canvas = this.shadowRoot.querySelector("canvas"), this.panel = this.shadowRoot.querySelector(".panel"), this.scene = new tr(), this.camera = new Kn(30, 1, .1, 2e3), this.cameraPosition = new U(), this.cameraTarget = new U(), this.raycaster = new Wa(), this.pointer = new V(), this.nodes = /* @__PURE__ */ new Map(), this.open = /* @__PURE__ */ new Set(), this._initialOpenContainers = /* @__PURE__ */ new Set(), this.selected = null, this.selectedRelationIndex = null, this.modelData = null, this._loading = !1, this._pendingSelection = null, this._theme = El(), this.relationMode = this.getAttribute("relation-mode") || "selected", this.focusFilter = bl({
12424
12549
  mode: this.getAttribute("focus-mode"),
12425
12550
  effect: this.getAttribute("focus-effect"),
12426
12551
  layout: this.getAttribute("focus-layout")
12427
- }), this.selectionMode = ["internal", "event"].includes(this.getAttribute("selection-mode")) ? this.getAttribute("selection-mode") : "internal", this.selectionNavigation = ul(this.getAttribute("selection-navigation")), this.itemFacing = dl(this.getAttribute("item-facing")), this.showShellLabels = this.getAttribute("shell-labels") !== "false", this.yaw = .37, this.pitch = .22, this.zoom = 1, this.targetZoom = 1, this.focus = new U(), this.targetFocus = new U(), this.drag = null, this.pointers = /* @__PURE__ */ new Map(), this.relationGroup = new Qn(), this.scene.add(this.relationGroup), this.relations = [], this.animationFrame = 0, this.ready = !1, this._toolbarVisible = this.getAttribute("toolbar") !== "off", this._panelVisible = this.getAttribute("panel") !== "off", this.toolbar = this.shadowRoot.querySelector(".toolbar"), this._printState = null, this._beforePrintListener = () => this.prepareForPrint(), this._afterPrintListener = () => this.restoreAfterPrint(), this._printMedia = globalThis.matchMedia?.("print") || null, this._printMediaListener = (e) => e.matches ? this.prepareForPrint() : this.restoreAfterPrint(), this._geometryRegistryListener = () => {
12552
+ }), this.selectionMode = ["internal", "event"].includes(this.getAttribute("selection-mode")) ? this.getAttribute("selection-mode") : "internal", this.selectionNavigation = xl(this.getAttribute("selection-navigation")), this.itemFacing = Sl(this.getAttribute("item-facing")), this.showShellLabels = this.getAttribute("shell-labels") !== "false", this.yaw = .37, this.pitch = .22, this.zoom = 1, this.targetZoom = 1, this.focus = new U(), this.targetFocus = new U(), this.drag = null, this.pointers = /* @__PURE__ */ new Map(), this.relationGroup = new Qn(), this.scene.add(this.relationGroup), this.relations = [], this.animationFrame = 0, this.ready = !1, this._toolbarVisible = this.getAttribute("toolbar") !== "off", this._panelVisible = this.getAttribute("panel") !== "off", this.toolbar = this.shadowRoot.querySelector(".toolbar"), this._printState = null, this._beforePrintListener = () => this.prepareForPrint(), this._afterPrintListener = () => this.restoreAfterPrint(), this._printMedia = globalThis.matchMedia?.("print") || null, this._printMediaListener = (e) => e.matches ? this.prepareForPrint() : this.restoreAfterPrint(), this._geometryRegistryListener = () => {
12428
12553
  this.ready && this.modelData && this._build();
12429
12554
  }, this._bindControls(), this._syncFocusToolbar(), this._syncRelationToolbar(), this._syncLabelsToolbar(), this._syncPanelToolbar(), this._syncItemFacingToolbar(), this.resizeObserver = new ResizeObserver(() => this.resize()), this.resizeObserver.observe(this.canvas);
12430
12555
  }
@@ -12436,7 +12561,7 @@ var Vl = class extends HTMLElement {
12436
12561
  }
12437
12562
  attributeChangedCallback(e, t, n) {
12438
12563
  if (t !== n) {
12439
- if (e === "height" && this.style.setProperty("--lc-height", n || "680px"), e === "relation-mode" && this.ready && this.setRelationMode(n || "selected"), e === "selection-mode" && this.setSelectionMode(n || "internal"), e === "selection-navigation" && this.setSelectionNavigation(n), e === "item-facing" && dl(n) !== this.itemFacing && this.setItemFacing(n, { source: "attribute" }), e === "focus-mode" && n !== this.focusFilter.mode && this.setFocusFilter({ mode: n }), e === "focus-effect" && n !== this.focusFilter.effect && this.setFocusFilter({ effect: n }), e === "focus-layout" && n !== this.focusFilter.layout && this.setFocusFilter({ layout: n }), e === "shell-labels" && this.ready) {
12564
+ if (e === "height" && this.style.setProperty("--lc-height", n || "680px"), e === "relation-mode" && this.ready && this.setRelationMode(n || "selected"), e === "selection-mode" && this.setSelectionMode(n || "internal"), e === "selection-navigation" && this.setSelectionNavigation(n), e === "item-facing" && Sl(n) !== this.itemFacing && this.setItemFacing(n, { source: "attribute" }), e === "focus-mode" && n !== this.focusFilter.mode && this.setFocusFilter({ mode: n }), e === "focus-effect" && n !== this.focusFilter.effect && this.setFocusFilter({ effect: n }), e === "focus-layout" && n !== this.focusFilter.layout && this.setFocusFilter({ layout: n }), e === "shell-labels" && this.ready) {
12440
12565
  let e = n !== "false";
12441
12566
  e !== this.showShellLabels && (this.showShellLabels = e, this._build({
12442
12567
  preserveSelection: this.selected?.id,
@@ -12473,13 +12598,13 @@ var Vl = class extends HTMLElement {
12473
12598
  } : null;
12474
12599
  }
12475
12600
  get palette() {
12476
- return this.modelData?.palette || { ...Qc };
12601
+ return this.modelData?.palette || { ...$c };
12477
12602
  }
12478
12603
  set palette(e) {
12479
12604
  this.setPalette(e);
12480
12605
  }
12481
12606
  captureFrame() {
12482
- return Bl(this.renderer, this.scene, this.camera, this.ownerDocument);
12607
+ return Zl(this.renderer, this.scene, this.camera, this.ownerDocument);
12483
12608
  }
12484
12609
  prepareForPrint() {
12485
12610
  if (this._printState) return this;
@@ -12584,13 +12709,13 @@ var Vl = class extends HTMLElement {
12584
12709
  if (!e.size) return null;
12585
12710
  for (let t of [...e]) {
12586
12711
  let n = this.nodes.get(t);
12587
- n && cl(n.type) && this._descendantIds(t, e);
12712
+ n && yl(n.type) && this._descendantIds(t, e);
12588
12713
  }
12589
12714
  let t = new Set(e);
12590
12715
  for (let n of this.relations) (t.has(n.from) || t.has(n.to)) && (e.add(n.from), e.add(n.to));
12591
12716
  for (let t of [...e]) {
12592
12717
  let n = this.nodes.get(t);
12593
- n && cl(n.type) && this._descendantIds(t, e);
12718
+ n && yl(n.type) && this._descendantIds(t, e);
12594
12719
  }
12595
12720
  for (let t of [...e]) {
12596
12721
  let n = this.nodes.get(t)?.parent ? this.nodes.get(this.nodes.get(t).parent) : null;
@@ -12667,7 +12792,7 @@ var Vl = class extends HTMLElement {
12667
12792
  });
12668
12793
  }
12669
12794
  setFocusFilter(e = {}, t = {}) {
12670
- let n = ll({
12795
+ let n = bl({
12671
12796
  ...this.focusFilter,
12672
12797
  ...e || {}
12673
12798
  }), r = JSON.stringify(n) !== JSON.stringify(this.focusFilter);
@@ -12685,7 +12810,7 @@ var Vl = class extends HTMLElement {
12685
12810
  "none"
12686
12811
  ].includes(e.relationMode) && e.relationMode !== this.relationMode && this.setRelationMode(e.relationMode), Object.hasOwn(e, "selectionMode") && e.selectionMode !== this.selectionMode && this.setSelectionMode(e.selectionMode);
12687
12812
  let t = e.navigation?.onSelect ?? e.selectionNavigation;
12688
- return t != null && t !== this.selectionNavigation && this.setSelectionNavigation(t), Object.hasOwn(e, "toolbar") && e.toolbar !== !1 !== this.toolbarVisible && this.setToolbarVisible(e.toolbar !== !1), Object.hasOwn(e, "shellLabels") && e.shellLabels !== !1 !== this.showShellLabels && this.setShellLabels(e.shellLabels !== !1), Object.hasOwn(e, "itemFacing") && dl(e.itemFacing) !== this.itemFacing && this.setItemFacing(e.itemFacing, {
12813
+ return t != null && t !== this.selectionNavigation && this.setSelectionNavigation(t), Object.hasOwn(e, "toolbar") && e.toolbar !== !1 !== this.toolbarVisible && this.setToolbarVisible(e.toolbar !== !1), Object.hasOwn(e, "shellLabels") && e.shellLabels !== !1 !== this.showShellLabels && this.setShellLabels(e.shellLabels !== !1), Object.hasOwn(e, "itemFacing") && Sl(e.itemFacing) !== this.itemFacing && this.setItemFacing(e.itemFacing, {
12689
12814
  emit: !1,
12690
12815
  source: "model"
12691
12816
  }), e.focus && this.setFocusFilter(e.focus, { emit: !1 }), this;
@@ -12698,10 +12823,10 @@ var Vl = class extends HTMLElement {
12698
12823
  }));
12699
12824
  }
12700
12825
  _containerEntityIds() {
12701
- return (this.modelData?.entities || []).filter((e) => cl(e.type)).map((e) => e.id);
12826
+ return (this.modelData?.entities || []).filter((e) => yl(e.type)).map((e) => e.id);
12702
12827
  }
12703
12828
  _declaredOpenContainerIds() {
12704
- return (this.modelData?.entities || []).filter((e) => cl(e.type) && e.open === !0).map((e) => e.id);
12829
+ return (this.modelData?.entities || []).filter((e) => yl(e.type) && e.open === !0).map((e) => e.id);
12705
12830
  }
12706
12831
  _emitContainerStateChange(e, t = {}) {
12707
12832
  if (!e?.changed || t.emit === !1) return;
@@ -12759,7 +12884,7 @@ var Vl = class extends HTMLElement {
12759
12884
  }
12760
12885
  _commitModelChange(e, t = {}, n = {}) {
12761
12886
  let r = n.preserveSelection === !1 ? null : this.selected?.id, i = n.preserveSelection === !1 ? null : this._publicRelation(this.selectedRelationIndex), a = i?.id ?? i?.index ?? null;
12762
- this.modelData = Dl(this.modelData);
12887
+ this.modelData = Rl(this.modelData);
12763
12888
  let o = this._syncInitialContainerState({
12764
12889
  refresh: !1,
12765
12890
  emit: !1,
@@ -12776,7 +12901,7 @@ var Vl = class extends HTMLElement {
12776
12901
  }
12777
12902
  updateModel(e = {}, t = {}) {
12778
12903
  if (!e || typeof e != "object" || Array.isArray(e)) throw TypeError("El parche del modelo debe ser un objeto.");
12779
- let n = this.modelData || Dl({}), r = JSON.stringify(n.render?.camera || null), i = {
12904
+ let n = this.modelData || Rl({}), r = JSON.stringify(n.render?.camera || null), i = {
12780
12905
  ...n,
12781
12906
  ...e,
12782
12907
  palette: e.palette ? {
@@ -12787,11 +12912,11 @@ var Vl = class extends HTMLElement {
12787
12912
  entities: Array.isArray(e.entities) ? e.entities : n.entities,
12788
12913
  relations: Array.isArray(e.relations) ? e.relations : n.relations
12789
12914
  };
12790
- return this.modelData = Dl(i), this.theme = this.modelData.theme, this._commitModelChange("model-update", { patch: e }, t), this._applyModelRenderOptions(), JSON.stringify(this.modelData.render?.camera || null) !== r && this.modelData.render?.camera && this.setCameraView(this.modelData.render.camera, { animate: t.animateCamera !== !1 }), this;
12915
+ return this.modelData = Rl(i), this.theme = this.modelData.theme, this._commitModelChange("model-update", { patch: e }, t), this._applyModelRenderOptions(), JSON.stringify(this.modelData.render?.camera || null) !== r && this.modelData.render?.camera && this.setCameraView(this.modelData.render.camera, { animate: t.animateCamera !== !1 }), this;
12791
12916
  }
12792
12917
  addEntity(e, t = {}) {
12793
12918
  if (!e || typeof e != "object" || !e.id) throw TypeError("La entidad debe incluir un id.");
12794
- if (this.modelData ||= Dl({}), this.modelData.entities.some((t) => t.id === e.id)) throw Error(`Ya existe una entidad con id "${e.id}".`);
12919
+ if (this.modelData ||= Rl({}), this.modelData.entities.some((t) => t.id === e.id)) throw Error(`Ya existe una entidad con id "${e.id}".`);
12795
12920
  if (e.parent && !this.modelData.entities.some((t) => t.id === e.parent)) throw Error(`No existe el contenedor padre "${e.parent}".`);
12796
12921
  return this.modelData.entities = [...this.modelData.entities, { ...e }], this._commitModelChange("entity-add", { entity: this._publicEntity(e.id) }, t);
12797
12922
  }
@@ -12868,10 +12993,10 @@ var Vl = class extends HTMLElement {
12868
12993
  return this.targetZoom = Math.min(2.8, this.targetZoom * 1.18), this.invalidate(), this;
12869
12994
  }
12870
12995
  zoomOut() {
12871
- return this.targetZoom = Math.max($c, this.targetZoom / 1.18), this.invalidate(), this;
12996
+ return this.targetZoom = Math.max(el, this.targetZoom / 1.18), this.invalidate(), this;
12872
12997
  }
12873
12998
  setSelectionNavigation(e) {
12874
- let t = ul(e);
12999
+ let t = xl(e);
12875
13000
  return this.selectionNavigation = t, this.getAttribute("selection-navigation") !== t && this.setAttribute("selection-navigation", t), this;
12876
13001
  }
12877
13002
  focusSelection(e = {}) {
@@ -12884,7 +13009,7 @@ var Vl = class extends HTMLElement {
12884
13009
  return t ? (this.targetFocus.copy(t), this.targetZoom = n, e.animate === !1 && (this.focus.copy(this.targetFocus), this.zoom = this.targetZoom), this.invalidate(), this) : this;
12885
13010
  }
12886
13011
  _applySelectionNavigation(e = this.selectionNavigation) {
12887
- let t = ul(e);
13012
+ let t = xl(e);
12888
13013
  if (t === "preserve") return this;
12889
13014
  let n = this.targetZoom;
12890
13015
  return this.focusSelection(), t === "center" && (this.targetZoom = n), this;
@@ -12909,7 +13034,7 @@ var Vl = class extends HTMLElement {
12909
13034
  return Math.max(29, 39.5 / Math.max(this.camera.aspect, .5));
12910
13035
  }
12911
13036
  getCameraView() {
12912
- let e = this.focus.clone(), t = this._baseCameraDistance() / Math.max($c, this.zoom), n = new U(Math.sin(this.yaw) * Math.cos(this.pitch), Math.sin(this.pitch), Math.cos(this.yaw) * Math.cos(this.pitch)).multiplyScalar(t).add(e), r = (e) => e.map((e) => Number(e.toFixed(3)));
13037
+ let e = this.focus.clone(), t = this._baseCameraDistance() / Math.max(el, this.zoom), n = new U(Math.sin(this.yaw) * Math.cos(this.pitch), Math.sin(this.pitch), Math.cos(this.yaw) * Math.cos(this.pitch)).multiplyScalar(t).add(e), r = (e) => e.map((e) => Number(e.toFixed(3)));
12913
13038
  return {
12914
13039
  position: r(n.toArray()),
12915
13040
  target: r(e.toArray()),
@@ -12923,7 +13048,7 @@ var Vl = class extends HTMLElement {
12923
13048
  if (!(a > 1e-6)) return this;
12924
13049
  this.yaw = Math.atan2(i.x, i.z), this.pitch = Math.asin(Math.max(-1, Math.min(1, i.y / a)));
12925
13050
  let o = Number(e.zoom), s = Number.isFinite(o) && o > 0 ? o : this._baseCameraDistance() / a;
12926
- return this.targetFocus.copy(r), this.targetZoom = Math.max($c, Math.min(2.8, s)), t.animate === !1 && (this.focus.copy(this.targetFocus), this.zoom = this.targetZoom), this.invalidate(), this;
13051
+ return this.targetFocus.copy(r), this.targetZoom = Math.max(el, Math.min(2.8, s)), t.animate === !1 && (this.focus.copy(this.targetFocus), this.zoom = this.targetZoom), this.invalidate(), this;
12927
13052
  }
12928
13053
  restoreInitialCamera(e = {}) {
12929
13054
  let t = this.modelData?.render?.camera;
@@ -12933,14 +13058,14 @@ var Vl = class extends HTMLElement {
12933
13058
  let n = this.canvas.getBoundingClientRect(), r = 2 * Math.max(1, this.camera.position.distanceTo(this.focus)) * Math.tan(de.degToRad(this.camera.fov) / 2) / Math.max(1, n.height);
12934
13059
  return this.panBy(-e * r, t * r);
12935
13060
  }
12936
- fit() {
12937
- let e = new Fe();
12938
- for (let t of this.nodes.values()) {
12939
- let n = this._worldPosition(t), r = new U(t.s[0] / 2, t.s[1] / 2, t.s[2] / 2);
12940
- e.expandByPoint(n.clone().sub(r)), e.expandByPoint(n.clone().add(r));
13061
+ fit(e = {}) {
13062
+ let t = new Fe();
13063
+ for (let e of this.nodes.values()) {
13064
+ let n = this._worldPosition(e), r = new U(e.s[0] / 2, e.s[1] / 2, e.s[2] / 2);
13065
+ t.expandByPoint(n.clone().sub(r)), t.expandByPoint(n.clone().add(r));
12941
13066
  }
12942
- let t = e.isEmpty() ? new U() : e.getCenter(new U()), n = e.isEmpty() ? new U(1, 1, 1) : e.getSize(new U()), r = Math.max(1, n.length() / 2), i = de.degToRad(this.camera.fov), a = r / Math.sin(i / 2) * 1.12, o = this._baseCameraDistance();
12943
- return this.targetZoom = Math.max($c, Math.min(2.8, o / a)), this.targetFocus.copy(t), this.invalidate(), this;
13067
+ let n = t.isEmpty() ? new U() : t.getCenter(new U()), r = t.isEmpty() ? new U(1, 1, 1) : t.getSize(new U()), i = Math.max(1, r.length() / 2), a = de.degToRad(this.camera.fov), o = i / Math.sin(a / 2) * 1.12, s = this._baseCameraDistance();
13068
+ return this.targetZoom = Math.max(el, Math.min(2.8, s / o)), this.targetFocus.copy(n), e.animate === !1 && (this.zoom = this.targetZoom, this.focus.copy(this.targetFocus)), this.invalidate(), this;
12944
13069
  }
12945
13070
  frontView() {
12946
13071
  return this.yaw = 0, this.pitch = 0, this.invalidate(), this;
@@ -12956,7 +13081,7 @@ var Vl = class extends HTMLElement {
12956
13081
  return this.setShellLabels(!this.showShellLabels);
12957
13082
  }
12958
13083
  setItemFacing(e = "camera", t = {}) {
12959
- let n = dl(e), r = n !== this.itemFacing;
13084
+ let n = Sl(e), r = n !== this.itemFacing;
12960
13085
  return this.itemFacing = n, this.getAttribute("item-facing") !== n && this.setAttribute("item-facing", n), this._syncItemFacingToolbar(), this._applyItemFacing(), this.invalidate(), r && t.emit !== !1 && this._emit("lc-item-facing-change", {
12961
13086
  mode: n,
12962
13087
  source: t.source || "api"
@@ -12966,7 +13091,7 @@ var Vl = class extends HTMLElement {
12966
13091
  return this.setItemFacing(this.itemFacing === "camera" ? "model" : "camera", e);
12967
13092
  }
12968
13093
  _applyItemFacing() {
12969
- if (this.camera) for (let e of this.nodes.values()) e.group && !cl(e.type) && (this.itemFacing === "camera" ? e.group.quaternion.copy(this.camera.quaternion) : e.group.quaternion.identity());
13094
+ if (this.camera) for (let e of this.nodes.values()) e.group && !yl(e.type) && (this.itemFacing === "camera" ? e.group.quaternion.copy(this.camera.quaternion) : e.group.quaternion.identity());
12970
13095
  }
12971
13096
  isContainerOpen(e) {
12972
13097
  return this._containerEntityIds().includes(e) && this.open.has(e);
@@ -12981,14 +13106,14 @@ var Vl = class extends HTMLElement {
12981
13106
  setContainerOpen(e, t = !0, n = {}) {
12982
13107
  let r = this.modelData?.entities?.find((t) => t.id === e);
12983
13108
  if (!r) throw Error(`No existe una entidad con id "${e}".`);
12984
- if (!cl(r.type)) throw TypeError(`La entidad "${e}" no es un contenedor.`);
13109
+ if (!yl(r.type)) throw TypeError(`La entidad "${e}" no es un contenedor.`);
12985
13110
  let i = new Set(this.open);
12986
13111
  if (t) i.add(e);
12987
13112
  else if (i.delete(e), n.closeDescendants !== !1) for (let t of this.modelData.entities) {
12988
13113
  let n = t.parent, r = /* @__PURE__ */ new Set();
12989
13114
  for (; n && !r.has(n);) {
12990
13115
  if (r.add(n), n === e) {
12991
- cl(t.type) && i.delete(t.id);
13116
+ yl(t.type) && i.delete(t.id);
12992
13117
  break;
12993
13118
  }
12994
13119
  n = this.modelData.entities.find((e) => e.id === n)?.parent || null;
@@ -13025,13 +13150,13 @@ var Vl = class extends HTMLElement {
13025
13150
  this.setTheme(e);
13026
13151
  }
13027
13152
  get theme() {
13028
- return this._theme || hl();
13153
+ return this._theme || El();
13029
13154
  }
13030
13155
  set theme(e) {
13031
- this._theme = hl(e), this.shadowRoot && this._applyTheme();
13156
+ this._theme = El(e), this.shadowRoot && this._applyTheme();
13032
13157
  }
13033
13158
  setTheme(e = {}) {
13034
- return this.theme = ml(this.theme, e), this.modelData && (this.modelData.theme = this.theme), this._applyLighting(), this.invalidate(), this;
13159
+ return this.theme = Tl(this.theme, e), this.modelData && (this.modelData.theme = this.theme), this._applyLighting(), this.invalidate(), this;
13035
13160
  }
13036
13161
  _applyTheme() {
13037
13162
  let e = this.theme, t = this.style;
@@ -13048,7 +13173,7 @@ var Vl = class extends HTMLElement {
13048
13173
  if (e) return this.load(e);
13049
13174
  let t = this.querySelector("script[type=\"application/json\"]");
13050
13175
  if (!t) return this.load({
13051
- palette: Qc,
13176
+ palette: $c,
13052
13177
  entities: [],
13053
13178
  relations: []
13054
13179
  });
@@ -13062,7 +13187,7 @@ var Vl = class extends HTMLElement {
13062
13187
  this._loading = !0, this._pendingSelection = null;
13063
13188
  try {
13064
13189
  let t = typeof e == "string" ? await fetch(e).then((e) => e.json()) : e;
13065
- this.modelData = Dl(t), this.selected = null, this.selectedRelationIndex = null, this.open.clear(), this._initialOpenContainers.clear(), this._pendingPalette &&= (this.modelData.palette = {
13190
+ this.modelData = Rl(t), this.selected = null, this.selectedRelationIndex = null, this.open.clear(), this._initialOpenContainers.clear(), this._pendingPalette &&= (this.modelData.palette = {
13066
13191
  ...this.modelData.palette,
13067
13192
  ...this._pendingPalette
13068
13193
  }, null), this.theme = this.modelData.theme, this._applyTheme(), this._syncInitialContainerState({
@@ -13093,9 +13218,9 @@ var Vl = class extends HTMLElement {
13093
13218
  }
13094
13219
  _applyLighting() {
13095
13220
  if (!this.ambientLight || !this.directionalLight) return;
13096
- let e = this.theme?.lighting || pl.lighting;
13221
+ let e = this.theme?.lighting || wl.lighting;
13097
13222
  this.ambientLight.color.set(e.ambientSky), this.ambientLight.groundColor.set(e.ambientGround), this.ambientLight.intensity = Number(e.ambient) || 0, this.directionalLight.color.set(e.directionalColor), this.directionalLight.intensity = Number(e.directional) || 0;
13098
- let t = Array.isArray(e.directionalPosition) ? e.directionalPosition : pl.lighting.directionalPosition;
13223
+ let t = Array.isArray(e.directionalPosition) ? e.directionalPosition : wl.lighting.directionalPosition;
13099
13224
  this.directionalLight.position.fromArray(t);
13100
13225
  }
13101
13226
  _worldPosition(e, t = /* @__PURE__ */ new Set()) {
@@ -13132,7 +13257,7 @@ var Vl = class extends HTMLElement {
13132
13257
  ...e.geometryPalette || {},
13133
13258
  ...e.geometryPaletteOverrides || {}
13134
13259
  };
13135
- n.material.color.set(Fl(n.value, r, t));
13260
+ n.material.color.set(Kl(n.value, r, t));
13136
13261
  }
13137
13262
  }
13138
13263
  }
@@ -13145,19 +13270,19 @@ var Vl = class extends HTMLElement {
13145
13270
  for (let e of this.modelData.entities) {
13146
13271
  let t = this.nodes.get(e.id);
13147
13272
  t.group = new Qn(), t.group.position.copy(this._worldPosition(t));
13148
- let n = e.geometry || "box", r = sl(n), i = !r && n.includes("."), a = i ? "#ed8f98" : this.modelData.palette[e.c] || e.c || this.modelData.palette.component;
13273
+ let n = e.geometry || "box", r = vl(n), i = !r && n.includes("."), a = i ? "#ed8f98" : this.modelData.palette[e.c] || e.c || this.modelData.palette.component;
13149
13274
  i && this.dispatchEvent(new CustomEvent("lc-warning", { detail: {
13150
13275
  code: "GEOMETRY_NOT_REGISTERED",
13151
13276
  geometry: n,
13152
13277
  entityId: e.id
13153
13278
  } }));
13154
- let o = r?.primitive || n, s = r && !r.primitive && !cl(e.type);
13279
+ let o = r?.primitive || n, s = r && !r.primitive && !yl(e.type);
13155
13280
  if (t.geometryDefinition = r || null, t.geometryMissing = i, t.geometryPalette = r?.palette || {}, t.geometryPaletteOverrides = e.geometryPalette || e.geometry_palette || {}, t.ports = {
13156
13281
  ...r?.anchors || {},
13157
13282
  ...e.ports || {}
13158
13283
  }, s) {
13159
13284
  try {
13160
- let n = Rl(r, e, this.modelData.palette, () => this.invalidate(), (e) => this.dispatchEvent(new CustomEvent("lc-warning", { detail: e })));
13285
+ let n = Yl(r, e, this.modelData.palette, () => this.invalidate(), (e) => this.dispatchEvent(new CustomEvent("lc-warning", { detail: e })));
13161
13286
  n.root.scale.multiply(new U().fromArray(e.s)), t.appearanceMaterials = [], n.root.traverse((e) => {
13162
13287
  if (!(e.isMesh || e.isLine || e.isLineSegments || e.isSprite)) return;
13163
13288
  e.userData.node = t;
@@ -13178,7 +13303,7 @@ var Vl = class extends HTMLElement {
13178
13303
  entityId: e.id,
13179
13304
  error: r
13180
13305
  } }));
13181
- let i = Nl(Ml("box"));
13306
+ let i = Wl(Ul("box"));
13182
13307
  t.material = new ia({
13183
13308
  color: "#ed8f98",
13184
13309
  roughness: .72,
@@ -13187,13 +13312,13 @@ var Vl = class extends HTMLElement {
13187
13312
  }
13188
13313
  t.labelSize = new U().fromArray(e.s);
13189
13314
  } else {
13190
- let n = o === "box" && Number(e.radius) > 0, r = Ml(o, e.radius, e.segments, e.s);
13191
- n || Nl(r), t.material = new ia({
13315
+ let n = o === "box" && Number(e.radius) > 0, r = Ul(o, e.radius, e.segments, e.s);
13316
+ n || Wl(r), t.material = new ia({
13192
13317
  color: a,
13193
13318
  roughness: .72,
13194
13319
  metalness: .06,
13195
13320
  transparent: !0,
13196
- opacity: cl(e.type) ? .96 : 1
13321
+ opacity: yl(e.type) ? .96 : 1
13197
13322
  }), t.mesh = new An(r, t.material), t.mesh.scale.fromArray(n ? [
13198
13323
  1,
13199
13324
  1,
@@ -13208,7 +13333,7 @@ var Vl = class extends HTMLElement {
13208
13333
  1
13209
13334
  ] : e.s), t.group.add(t.edge);
13210
13335
  }
13211
- t.label = zl(e.name, a, t.labelSize, e.type, this.showShellLabels), t.label.userData.node = t, t.label.traverse((e) => {
13336
+ t.label = Xl(e.name, a, t.labelSize, e.type, this.showShellLabels), t.label.userData.node = t, t.label.traverse((e) => {
13212
13337
  e.userData.node = t;
13213
13338
  }), t.group.add(t.label), this.scene.add(t.group);
13214
13339
  }
@@ -13247,7 +13372,7 @@ var Vl = class extends HTMLElement {
13247
13372
  }
13248
13373
  _rebuildRelations() {
13249
13374
  this._clearRelationGroup();
13250
- let e = this._activeRelationIndexes(), t = this._focusedEntityIds(), n = new X(this.modelData?.palette.connection || Qc.connection);
13375
+ let e = this._activeRelationIndexes(), t = this._focusedEntityIds(), n = new X(this.modelData?.palette.connection || $c.connection);
13251
13376
  for (let r of e) {
13252
13377
  let e = this.relations[r], i = this.nodes.get(e.from), a = this.nodes.get(e.to);
13253
13378
  if (!i || !a) continue;
@@ -13255,7 +13380,7 @@ var Vl = class extends HTMLElement {
13255
13380
  if (!o && this.focusFilter.effect === "hide") continue;
13256
13381
  let s = o ? 1 : this.focusFilter.opacity, c = this._endpoint(i, a, !0, e), l = this._endpoint(a, i, !1, e), u = l.clone().sub(c);
13257
13382
  if (u.lengthSq() < .01) continue;
13258
- let d = gl(e), f = r === this.selectedRelationIndex, p = (e, t = .055, n = .88) => {
13383
+ let d = Dl(e), f = r === this.selectedRelationIndex, p = (e, t = .055, n = .88) => {
13259
13384
  let r = new rn({
13260
13385
  color: e,
13261
13386
  transparent: !0,
@@ -13265,7 +13390,7 @@ var Vl = class extends HTMLElement {
13265
13390
  });
13266
13391
  f && (r.color.lerp(new X(16777215), .28), r.opacity = 1);
13267
13392
  let i = new An(new ra(new ri(c, l), 10, f ? t * 1.45 : t, 6, !1), r);
13268
- return i.renderOrder = el, this.relationGroup.add(i), i;
13393
+ return i.renderOrder = tl, this.relationGroup.add(i), i;
13269
13394
  }, m = new An(new ra(new ri(c, l), 10, .16, 6, !1), new rn({
13270
13395
  transparent: !0,
13271
13396
  opacity: 0,
@@ -13284,7 +13409,7 @@ var Vl = class extends HTMLElement {
13284
13409
  opacity: (f ? 1 : .9) * s,
13285
13410
  depthWrite: !1
13286
13411
  }));
13287
- a.userData.relationIndex = r, a.userData.phase = n / 3, a.userData.oscillate = !0, a.userData.start = i.clone().sub(e.clone().multiplyScalar(t)), a.userData.end = i.clone().add(e.clone().multiplyScalar(t)), a.quaternion.setFromUnitVectors(new U(0, 0, 1), e), a.renderOrder = el, this.relationGroup.add(a);
13412
+ a.userData.relationIndex = r, a.userData.phase = n / 3, a.userData.oscillate = !0, a.userData.start = i.clone().sub(e.clone().multiplyScalar(t)), a.userData.end = i.clone().add(e.clone().multiplyScalar(t)), a.quaternion.setFromUnitVectors(new U(0, 0, 1), e), a.renderOrder = tl, this.relationGroup.add(a);
13288
13413
  }
13289
13414
  continue;
13290
13415
  }
@@ -13297,7 +13422,7 @@ var Vl = class extends HTMLElement {
13297
13422
  opacity: (f ? 1 : .9) * s,
13298
13423
  depthWrite: !1
13299
13424
  }));
13300
- t.userData.relationIndex = r, t.userData.phase = e / 4, t.userData.direction = d === "bidirectional" && e % 2 ? -1 : 1, t.userData.start = c.clone(), t.userData.end = l.clone(), t.quaternion.setFromUnitVectors(new U(0, 0, 1), h), t.renderOrder = el, this.relationGroup.add(t);
13425
+ t.userData.relationIndex = r, t.userData.phase = e / 4, t.userData.direction = d === "bidirectional" && e % 2 ? -1 : 1, t.userData.start = c.clone(), t.userData.end = l.clone(), t.quaternion.setFromUnitVectors(new U(0, 0, 1), h), t.renderOrder = tl, this.relationGroup.add(t);
13301
13426
  }
13302
13427
  }
13303
13428
  }
@@ -13305,8 +13430,8 @@ var Vl = class extends HTMLElement {
13305
13430
  if (!this.modelData) return;
13306
13431
  let e = this.selectedRelationIndex === null ? null : this.relations[this.selectedRelationIndex];
13307
13432
  if (e) {
13308
- let t = gl(e), n = e.text ? "<p>" + Tl(e.text) + "</p>" : "", r = El(e.url);
13309
- this.panel.innerHTML = "<button class=\"back\" data-action=\"overview\">← Vista de conjunto</button><button data-action=\"focus-selection\">◎ Enfocar selección</button><div class=\"eyebrow\">RELACIÓN</div><h2>" + Tl(e.label || `${e.from} → ${e.to}`) + "</h2><div class=\"sub\">" + Tl(e.from) + " → " + Tl(e.to) + "</div>" + n + r + "<h3>MODO</h3><p>" + Tl(t) + "</p>", this.panel.querySelector("[data-action=\"overview\"]")?.addEventListener("click", () => this.reset()), this.panel.querySelector("[data-action=\"focus-selection\"]")?.addEventListener("click", () => this.focusSelection()), this._applyTheme();
13433
+ let t = Dl(e), n = e.text ? "<p>" + Il(e.text) + "</p>" : "", r = Ll(e.url);
13434
+ this.panel.innerHTML = "<button class=\"back\" data-action=\"overview\">← Vista de conjunto</button><button data-action=\"focus-selection\">◎ Enfocar selección</button><div class=\"eyebrow\">RELACIÓN</div><h2>" + Il(e.label || `${e.from} → ${e.to}`) + "</h2><div class=\"sub\">" + Il(e.from) + " → " + Il(e.to) + "</div>" + n + r + "<h3>MODO</h3><p>" + Il(t) + "</p>", this.panel.querySelector("[data-action=\"overview\"]")?.addEventListener("click", () => this.reset()), this.panel.querySelector("[data-action=\"focus-selection\"]")?.addEventListener("click", () => this.focusSelection()), this._applyTheme();
13310
13435
  return;
13311
13436
  }
13312
13437
  let t = this.selected;
@@ -13316,11 +13441,11 @@ var Vl = class extends HTMLElement {
13316
13441
  }
13317
13442
  let n = this.relations.filter((e) => e.from === t.id || e.to === t.id), r = this.modelData.entities.filter((e) => e.parent === t.id), i = [], a = /* @__PURE__ */ new Set(), o = t;
13318
13443
  for (; o && !a.has(o.id);) a.add(o.id), i.unshift(o), o = o.parent ? this.nodes.get(o.parent) : null;
13319
- let s = "<nav class=\"crumbs\" aria-label=\"Ruta del modelo\"><button data-action=\"overview\">Modelo</button>" + i.map((e, t) => "<span>/</span><button data-action=\"path\" data-id=\"" + Tl(e.id) + "\" class=\"" + (t === i.length - 1 ? "current" : "") + "\">" + Tl(e.name) + "</button>").join("") + "</nav>", c = n.map((e) => {
13320
- let n = this.relations.indexOf(e), r = e.text ? "<small>" + Tl(e.text) + "</small>" : "";
13321
- return "<button class=\"relation\" data-action=\"relation\" data-relation-index=\"" + n + "\"><strong>" + Tl(e.label || (e.from === t.id ? e.to : e.from)) + "</strong><small>" + Tl(e.from) + " → " + Tl(e.to) + "</small>" + r + "</button>";
13444
+ let s = "<nav class=\"crumbs\" aria-label=\"Ruta del modelo\"><button data-action=\"overview\">Modelo</button>" + i.map((e, t) => "<span>/</span><button data-action=\"path\" data-id=\"" + Il(e.id) + "\" class=\"" + (t === i.length - 1 ? "current" : "") + "\">" + Il(e.name) + "</button>").join("") + "</nav>", c = n.map((e) => {
13445
+ let n = this.relations.indexOf(e), r = e.text ? "<small>" + Il(e.text) + "</small>" : "";
13446
+ return "<button class=\"relation\" data-action=\"relation\" data-relation-index=\"" + n + "\"><strong>" + Il(e.label || (e.from === t.id ? e.to : e.from)) + "</strong><small>" + Il(e.from) + " → " + Il(e.to) + "</small>" + r + "</button>";
13322
13447
  }).join("");
13323
- this.panel.innerHTML = "<button class=\"back\" data-action=\"overview\">← Vista de conjunto</button>" + s + "<button data-action=\"focus-selection\">◎ Enfocar selección</button><div class=\"eyebrow\">" + Tl(cl(t.type) ? "CONTENEDOR" : t.type === "actor" ? "ACTOR EXTERNO" : "COMPONENTE") + "</div><h2>" + Tl(t.name) + "</h2><div class=\"sub\">" + Tl(t.sub || "") + "</div><p>" + Tl(t.text || "") + "</p>" + El(t.url) + (cl(t.type) ? "<button data-action=\"toggle-shell\">" + (this.open.has(t.id) ? "Cerrar bloque" : "Abrir bloque") + "</button>" : "") + (r.length ? "<h3>CONTIENE</h3><p>" + r.length + " pieza(s) interna(s).</p>" : "") + "<h3>RELACIONES</h3>" + (c || "<p>No hay relaciones directas.</p>"), this.panel.querySelectorAll("[data-action=\"overview\"]").forEach((e) => e.addEventListener("click", () => this.reset())), this.panel.querySelectorAll("[data-action=\"path\"]").forEach((e) => e.addEventListener("click", () => this.select(e.dataset.id))), this.panel.querySelectorAll("[data-action=\"relation\"]").forEach((e) => e.addEventListener("click", () => this.selectRelation(Number(e.dataset.relationIndex), { source: "panel" }))), this.panel.querySelector("[data-action=\"focus-selection\"]")?.addEventListener("click", () => this.focusSelection()), this.panel.querySelector("[data-action=\"toggle-shell\"]")?.addEventListener("click", () => {
13448
+ this.panel.innerHTML = "<button class=\"back\" data-action=\"overview\">← Vista de conjunto</button>" + s + "<button data-action=\"focus-selection\">◎ Enfocar selección</button><div class=\"eyebrow\">" + Il(yl(t.type) ? "CONTENEDOR" : t.type === "actor" ? "ACTOR EXTERNO" : "COMPONENTE") + "</div><h2>" + Il(t.name) + "</h2><div class=\"sub\">" + Il(t.sub || "") + "</div><p>" + Il(t.text || "") + "</p>" + Ll(t.url) + (yl(t.type) ? "<button data-action=\"toggle-shell\">" + (this.open.has(t.id) ? "Cerrar bloque" : "Abrir bloque") + "</button>" : "") + (r.length ? "<h3>CONTIENE</h3><p>" + r.length + " pieza(s) interna(s).</p>" : "") + "<h3>RELACIONES</h3>" + (c || "<p>No hay relaciones directas.</p>"), this.panel.querySelectorAll("[data-action=\"overview\"]").forEach((e) => e.addEventListener("click", () => this.reset())), this.panel.querySelectorAll("[data-action=\"path\"]").forEach((e) => e.addEventListener("click", () => this.select(e.dataset.id))), this.panel.querySelectorAll("[data-action=\"relation\"]").forEach((e) => e.addEventListener("click", () => this.selectRelation(Number(e.dataset.relationIndex), { source: "panel" }))), this.panel.querySelector("[data-action=\"focus-selection\"]")?.addEventListener("click", () => this.focusSelection()), this.panel.querySelector("[data-action=\"toggle-shell\"]")?.addEventListener("click", () => {
13324
13449
  this.toggleContainer(t.id, { source: "panel" });
13325
13450
  }), this._applyTheme();
13326
13451
  }
@@ -13329,7 +13454,7 @@ var Vl = class extends HTMLElement {
13329
13454
  if (!n) return this;
13330
13455
  let r = new Set(this.open), i = n.parent ? this.nodes.get(n.parent) : null;
13331
13456
  for (; i;) r.add(i.id), i = i.parent ? this.nodes.get(i.parent) : null;
13332
- return this.selected = n, this.selectedRelationIndex = null, cl(n.type) && r.add(n.id), this._replaceOpenContainers(r, {
13457
+ return this.selected = n, this.selectedRelationIndex = null, yl(n.type) && r.add(n.id), this._replaceOpenContainers(r, {
13333
13458
  refresh: !1,
13334
13459
  source: t.source || "api"
13335
13460
  }), this._applySelectionNavigation(t.navigation), this._renderPanel(), this._rebuildRelations(), this._syncFocusToolbar(), this.invalidate(), t.focusEvent !== !1 && this._emitFocusChange(t.source || "api"), t.emit !== !1 && this._emit("lc-select", {
@@ -13393,19 +13518,19 @@ var Vl = class extends HTMLElement {
13393
13518
  for (let e of this.nodes.values()) {
13394
13519
  let t = this._focusAlpha(e, i), n = this._isVisible(e) && t > 0;
13395
13520
  e.group.visible = n;
13396
- let r = cl(e.type) && this.open.has(e.id), a = (r ? .12 : 1) * t;
13397
- if (e.mesh.renderOrder = r ? 10 - !!e.parent : 0, e.material) fl(e.material, !0), e.material.opacity = a, e.material.depthWrite = !r, e.material.emissive?.set(e === this.selected ? e.material.color : 0), e.material.emissiveIntensity = e === this.selected ? .15 : 0;
13521
+ let r = yl(e.type) && this.open.has(e.id), a = (r ? .12 : 1) * t;
13522
+ if (e.mesh.renderOrder = r ? 10 - !!e.parent : 0, e.material) Cl(e.material, !0), e.material.opacity = a, e.material.depthWrite = !r, e.material.emissive?.set(e === this.selected ? e.material.color : 0), e.material.emissiveIntensity = e === this.selected ? .15 : 0;
13398
13523
  else {
13399
- for (let n of e.appearanceMaterials || []) Object.hasOwn(n.userData, "atlasBaseOpacity") || (n.userData.atlasBaseOpacity = n.opacity ?? 1), Object.hasOwn(n.userData, "atlasBaseTransparent") || (n.userData.atlasBaseTransparent = n.transparent), Object.hasOwn(n.userData, "atlasBaseDepthWrite") || (n.userData.atlasBaseDepthWrite = n.depthWrite), fl(n, n.userData.atlasBaseTransparent || t < 1), n.depthWrite = n.userData.atlasBaseDepthWrite, n.opacity = n.userData.atlasBaseOpacity * t, n.emissive?.set(e === this.selected ? n.color : 0), n.emissiveIntensity = e === this.selected ? .15 : 0;
13524
+ for (let n of e.appearanceMaterials || []) Object.hasOwn(n.userData, "atlasBaseOpacity") || (n.userData.atlasBaseOpacity = n.opacity ?? 1), Object.hasOwn(n.userData, "atlasBaseTransparent") || (n.userData.atlasBaseTransparent = n.transparent), Object.hasOwn(n.userData, "atlasBaseDepthWrite") || (n.userData.atlasBaseDepthWrite = n.depthWrite), Cl(n, n.userData.atlasBaseTransparent || t < 1), n.depthWrite = n.userData.atlasBaseDepthWrite, n.opacity = n.userData.atlasBaseOpacity * t, n.emissive?.set(e === this.selected ? n.color : 0), n.emissiveIntensity = e === this.selected ? .15 : 0;
13400
13525
  e._appearanceSelected = e === this.selected;
13401
13526
  }
13402
13527
  e.edge?.material && (e.edge.material.opacity = (e === this.selected ? 1 : .65) * t);
13403
- let o = cl(e.type) && r, s = o, c = e.label.userData.front, l = e.label.userData.back, u = e.label.userData.top, d = e.label.userData.height, f = e.label.userData.width, p = e.label.userData.textOffsetX || 0;
13528
+ let o = yl(e.type) && r, s = o, c = e.label.userData.front, l = e.label.userData.back, u = e.label.userData.top, d = e.label.userData.height, f = e.label.userData.width, p = e.label.userData.textOffsetX || 0;
13404
13529
  e.label.userData.textOffsetY;
13405
13530
  let m = e.labelSize || new U().fromArray(e.s);
13406
13531
  e.label.visible = n;
13407
- let h = this._worldPosition(e), g = this.itemFacing === "camera" && !cl(e.type) || this.camera.position.z >= h.z, _ = this.camera.position.y > h.y + .25;
13408
- if (cl(e.type)) {
13532
+ let h = this._worldPosition(e), g = this.itemFacing === "camera" && !yl(e.type) || this.camera.position.z >= h.z, _ = this.camera.position.y > h.y + .25;
13533
+ if (yl(e.type)) {
13409
13534
  c.visible = g && (!o || s), l.visible = !g && (!o || s), u.visible = s && _;
13410
13535
  let e = s ? .52 : 1;
13411
13536
  c.scale.setScalar(e), c.position.x = s ? -m.x / 2 + .18 + f * e / 2 - p * e : 0;
@@ -13424,7 +13549,7 @@ var Vl = class extends HTMLElement {
13424
13549
  let t = this.canvas.getBoundingClientRect();
13425
13550
  this.pointer.set((e.clientX - t.left) / t.width * 2 - 1, -(e.clientY - t.top) / t.height * 2 + 1), this.raycaster.setFromCamera(this.pointer, this.camera);
13426
13551
  let n = [];
13427
- for (let e of this.nodes.values()) e.group.visible && (cl(e.type) && this.open.has(e.id) || n.push(e.pickMesh || e.mesh), e.label?.visible && n.push(...e.label.children.filter((e) => e.visible)));
13552
+ for (let e of this.nodes.values()) e.group.visible && (yl(e.type) && this.open.has(e.id) || n.push(e.pickMesh || e.mesh), e.label?.visible && n.push(...e.label.children.filter((e) => e.visible)));
13428
13553
  let r = this.raycaster.intersectObjects(n, !0)[0] || null, i = this.relationMode === "none" ? [] : this.relationGroup.children.filter((e) => e.userData?.relationPick), a = this.raycaster.intersectObjects(i, !1)[0] || null;
13429
13554
  if (r && (!a || r.distance <= a.distance + .12)) {
13430
13555
  let e = r.object;
@@ -13497,7 +13622,7 @@ var Vl = class extends HTMLElement {
13497
13622
  y: e.clientY
13498
13623
  }), e.pointerType === "touch" && this.pointers.size >= 2) {
13499
13624
  let [e, t] = [...this.pointers.values()], n = (e.x + t.x) / 2, r = (e.y + t.y) / 2, i = Math.max(1, Math.hypot(e.x - t.x, e.y - t.y));
13500
- this.drag.mode === "touch-pan" ? (this._panByPixels(n - this.drag.x, r - this.drag.y), this.targetZoom = Math.min(2.8, Math.max($c, this.targetZoom * i / Math.max(1, this.drag.distance))), Object.assign(this.drag, {
13625
+ this.drag.mode === "touch-pan" ? (this._panByPixels(n - this.drag.x, r - this.drag.y), this.targetZoom = Math.min(2.8, Math.max(el, this.targetZoom * i / Math.max(1, this.drag.distance))), Object.assign(this.drag, {
13501
13626
  x: n,
13502
13627
  y: r,
13503
13628
  distance: i,
@@ -13568,16 +13693,16 @@ var Vl = class extends HTMLElement {
13568
13693
  navigation: "fit"
13569
13694
  });
13570
13695
  }), this.canvas.addEventListener("wheel", (e) => {
13571
- e.preventDefault(), this.targetZoom = Math.min(2.8, Math.max($c, this.targetZoom * Math.exp(-e.deltaY * .001))), this.invalidate();
13696
+ e.preventDefault(), this.targetZoom = Math.min(2.8, Math.max(el, this.targetZoom * Math.exp(-e.deltaY * .001))), this.invalidate();
13572
13697
  }, { passive: !1 });
13573
13698
  }
13574
13699
  _showError(e) {
13575
13700
  let t = this.shadowRoot.querySelector(".viewport"), n = t.querySelector(".error");
13576
- n ? n.textContent = e : t.insertAdjacentHTML("beforeend", "<div class=\"error\" role=\"alert\">" + Tl(e) + "</div>");
13701
+ n ? n.textContent = e : t.insertAdjacentHTML("beforeend", "<div class=\"error\" role=\"alert\">" + Il(e) + "</div>");
13577
13702
  }
13578
13703
  };
13579
- customElements.get("liquidcars-atlas") || customElements.define("liquidcars-atlas", Vl);
13704
+ customElements.get("liquidcars-atlas") || customElements.define("liquidcars-atlas", Ql);
13580
13705
  //#endregion
13581
- export { Vl as LiquidCarsAtlas, Bl as captureRendererFrame, ol as getGeometryCatalog, Dl as normalizeModel, il as registerGeometryPack, al as unregisterGeometryPack };
13706
+ export { Qc as ATLAS_VERSION, Ql as LiquidCarsAtlas, Zl as captureRendererFrame, gl as getGeometryCatalog, _l as getGeometryPackCatalog, Rl as normalizeModel, ml as registerGeometryPack, hl as unregisterGeometryPack };
13582
13707
 
13583
13708
  //# sourceMappingURL=liquidcars-atlas.js.map