@solid-labs/fab-one-widget 1.0.19 → 1.0.20

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.
@@ -8,7 +8,7 @@ import { create as go } from "zustand";
8
8
  import { OBJLoader as zn } from "three/examples/jsm/loaders/OBJLoader.js";
9
9
  import { STLLoader as mo } from "three/examples/jsm/loaders/STLLoader.js";
10
10
  import { MeshBVH as yt } from "three-mesh-bvh";
11
- let Rr, gt, vr, Dn;
11
+ let Rr, gt, vr, In;
12
12
  let __tla = (async () => {
13
13
  const xo = {
14
14
  showDragDrop: true,
@@ -97,14 +97,14 @@ let __tla = (async () => {
97
97
  const R = r[k * 3] * o, T = r[k * 3 + 1] * o, N = r[k * 3 + 2] * o;
98
98
  R < e && (e = R), R > f && (f = R), T < g && (g = T), T > u && (u = T), N < d && (d = N), N > h && (h = N);
99
99
  }
100
- const A = (e + f) * 0.5, p = (g + u) * 0.5, x = (d + h) * 0.5, m = f - e + 1e-6, L = u - g + 1e-6, S = h - d + 1e-6, P = m * 0.5, z = L * 0.5, w = S * 0.5, C = Math.min(128, Math.max(16, Math.round(Math.cbrt(a)))), b = m / C, I = L / C, _ = S / C, v = /* @__PURE__ */ new Map();
100
+ const A = (e + f) * 0.5, p = (g + u) * 0.5, x = (d + h) * 0.5, m = f - e + 1e-6, L = u - g + 1e-6, S = h - d + 1e-6, P = m * 0.5, z = L * 0.5, w = S * 0.5, C = Math.min(128, Math.max(16, Math.round(Math.cbrt(a)))), b = m / C, D = L / C, _ = S / C, v = /* @__PURE__ */ new Map();
101
101
  for (let k = 0; k < a; k++) {
102
- const R = r[k * 3] * o - A, T = r[k * 3 + 1] * o - p, N = r[k * 3 + 2] * o - x, Q = Math.min(C - 1, Math.max(0, Math.floor((R + P) / b))), be = Math.min(C - 1, Math.max(0, Math.floor((T + z) / I))), ae = Math.min(C - 1, Math.max(0, Math.floor((N + w) / _))), fe = Q * C * C + be * C + ae;
102
+ const R = r[k * 3] * o - A, T = r[k * 3 + 1] * o - p, N = r[k * 3 + 2] * o - x, Q = Math.min(C - 1, Math.max(0, Math.floor((R + P) / b))), be = Math.min(C - 1, Math.max(0, Math.floor((T + z) / D))), ae = Math.min(C - 1, Math.max(0, Math.floor((N + w) / _))), fe = Q * C * C + be * C + ae;
103
103
  let re = v.get(fe);
104
104
  re || (re = [], v.set(fe, re)), re.push(k);
105
105
  }
106
106
  for (let k = 0; k < l; k++) {
107
- const R = s.getX(k), T = s.getY(k), N = s.getZ(k), Q = Math.min(C - 1, Math.max(0, Math.floor((R + P) / b))), be = Math.min(C - 1, Math.max(0, Math.floor((T + z) / I))), ae = Math.min(C - 1, Math.max(0, Math.floor((N + w) / _)));
107
+ const R = s.getX(k), T = s.getY(k), N = s.getZ(k), Q = Math.min(C - 1, Math.max(0, Math.floor((R + P) / b))), be = Math.min(C - 1, Math.max(0, Math.floor((T + z) / D))), ae = Math.min(C - 1, Math.max(0, Math.floor((N + w) / _)));
108
108
  let fe = 1 / 0, re = 0;
109
109
  for (let ee = 0; ee <= C && fe > 0; ee++) {
110
110
  for (let Y = -ee; Y <= ee; Y++) for (let ue = -ee; ue <= ee; ue++) for (let Z = -ee; Z <= ee; Z++) {
@@ -497,7 +497,7 @@ let __tla = (async () => {
497
497
  P[1],
498
498
  P[2]
499
499
  ]), w = c.align_to_origin(f, h, A, z);
500
- let C = w.positions(), b = w.mpt(), I = w.origin();
500
+ let C = w.positions(), b = w.mpt(), D = w.origin();
501
501
  const _ = w.transform();
502
502
  ce.info(ke, "Alignment complete", w.details());
503
503
  const v = [
@@ -516,7 +516,7 @@ let __tla = (async () => {
516
516
  v[6] * P[0] + v[7] * P[1] + v[8] * P[2]
517
517
  ]);
518
518
  o.onStatus("Generating measurement points...");
519
- const R = c.subdivide_origin_to_plane(new Float32Array(I), new Float32Array(b), k);
519
+ const R = c.subdivide_origin_to_plane(new Float32Array(D), new Float32Array(b), k);
520
520
  ce.debug(ke, `Subdivide: ${R.count()} pts, spacing=${R.spacing().toFixed(1)}mm`);
521
521
  const T = R.points(), N = R.count(), Q = 2, be = 1, ae = [];
522
522
  for (let j = Q; j < N - be; j++) ae.push(T[j * 3 + 1]);
@@ -538,11 +538,11 @@ let __tla = (async () => {
538
538
  }
539
539
  if (fe.length >= 6) {
540
540
  o.onStatus("Refining alignment...");
541
- const j = c.refine_alignment(new Float32Array(fe), C, new Float32Array(I), new Float32Array(b));
542
- ce.info(ke, "Refinement complete", j.details()), C = j.positions(), b = j.mpt(), I = j.origin();
541
+ const j = c.refine_alignment(new Float32Array(fe), C, new Float32Array(D), new Float32Array(b));
542
+ ce.info(ke, "Refinement complete", j.details()), C = j.positions(), b = j.mpt(), D = j.origin();
543
543
  }
544
544
  const re = a.getAttribute("color"), ee = Fn(C, u);
545
- re && ee.setAttribute("color", re), a.dispose(), a = ee, t.geometry = a, a.computeVertexNormals(), a.computeBoundingBox(), e[0] = new F(I[0], I[1], I[2]), e[1] = new F(b[0], b[1], b[2]), o.onStatus("Setting blue point...");
545
+ re && ee.setAttribute("color", re), a.dispose(), a = ee, t.geometry = a, a.computeVertexNormals(), a.computeBoundingBox(), e[0] = new F(D[0], D[1], D[2]), e[1] = new F(b[0], b[1], b[2]), o.onStatus("Setting blue point...");
546
546
  const Y = new F(e[0].x, e[0].y, e[0].z);
547
547
  e.push(Y), o.addLandmarkPoint({
548
548
  faceIndex: -1,
@@ -667,7 +667,7 @@ let __tla = (async () => {
667
667
  }) : this.props.children;
668
668
  }
669
669
  }
670
- const Io = ({ message: t, onDismiss: r }) => M("div", {
670
+ const Do = ({ message: t, onDismiss: r }) => M("div", {
671
671
  style: {
672
672
  position: "absolute",
673
673
  top: 16,
@@ -758,7 +758,7 @@ let __tla = (async () => {
758
758
  })
759
759
  ]
760
760
  });
761
- function Do(t, r, n, o) {
761
+ function Io(t, r, n, o) {
762
762
  const s = new F().subVectors(n, r), l = new F().subVectors(o, r), c = new F().subVectors(t, r), a = s.dot(s), e = s.dot(l), g = s.dot(c), d = l.dot(l), f = l.dot(c), u = 1 / (a * d - e * e), h = (d * g - e * f) * u, A = (a * f - e * g) * u;
763
763
  return {
764
764
  u: 1 - h - A,
@@ -785,7 +785,7 @@ let __tla = (async () => {
785
785
  ];
786
786
  const S = x.getAttribute("position"), P = new F().fromBufferAttribute(S, L[0]), z = new F().fromBufferAttribute(S, L[1]), w = new F().fromBufferAttribute(S, L[2]);
787
787
  P.applyMatrix4(t.matrixWorld), z.applyMatrix4(t.matrixWorld), w.applyMatrix4(t.matrixWorld);
788
- const C = A.point, b = Do(C, P, z, w), I = {
788
+ const C = A.point, b = Io(C, P, z, w), D = {
789
789
  faceIndex: p,
790
790
  vertexIndices: L,
791
791
  position: {
@@ -795,7 +795,7 @@ let __tla = (async () => {
795
795
  },
796
796
  barycentricCoords: b
797
797
  };
798
- c(I);
798
+ c(D);
799
799
  }, [
800
800
  t,
801
801
  c,
@@ -989,7 +989,7 @@ let __tla = (async () => {
989
989
  const R = w.x * k.x + w.z * k.z;
990
990
  R > C && (C = R, b = k);
991
991
  }
992
- const I = s * 0.35, _ = new F(b.x + w.x * I, n, b.z + w.z * I);
992
+ const D = s * 0.35, _ = new F(b.x + w.x * D, n, b.z + w.z * D);
993
993
  m.current.position.copy(_);
994
994
  const v = L.geometry.getAttribute("position");
995
995
  v.setXYZ(0, b.x, b.y, b.z), v.setXYZ(1, _.x, _.y, _.z), v.needsUpdate = true;
@@ -1138,12 +1138,12 @@ let __tla = (async () => {
1138
1138
  ];
1139
1139
  if (o > 25.4 + 0.1) {
1140
1140
  const b = f.mptY;
1141
- C = C.filter((I) => {
1142
- const _ = Math.abs(I - b);
1141
+ C = C.filter((D) => {
1142
+ const _ = Math.abs(D - b);
1143
1143
  return _ < 0.5 || Math.abs(Math.round(_ / o) * o - _) < 0.5;
1144
1144
  });
1145
1145
  }
1146
- return c ? C.sort((b, I) => I - b) : C.sort((b, I) => b - I), C;
1146
+ return c ? C.sort((b, D) => D - b) : C.sort((b, D) => b - D), C;
1147
1147
  }
1148
1148
  const z = [];
1149
1149
  if (c) for (let w = n; w >= r; w -= o) z.push(w);
@@ -1158,12 +1158,12 @@ let __tla = (async () => {
1158
1158
  ]), x = V(() => {
1159
1159
  if (!f) return null;
1160
1160
  const z = /* @__PURE__ */ new Map(), { allLoopPoints: w, offsets: C, yValues: b } = f;
1161
- for (let I = 0; I < C.length - 1; I++) {
1162
- const _ = C[I], v = C[I + 1];
1161
+ for (let D = 0; D < C.length - 1; D++) {
1162
+ const _ = C[D], v = C[D + 1];
1163
1163
  if (v <= _) continue;
1164
1164
  const k = [];
1165
1165
  for (let R = _; R < v; R += 3) k.push(new F(w[R], w[R + 1], w[R + 2]));
1166
- k.length >= 3 && z.set(b[I], k);
1166
+ k.length >= 3 && z.set(b[D], k);
1167
1167
  }
1168
1168
  return z;
1169
1169
  }, [
@@ -1236,8 +1236,8 @@ let __tla = (async () => {
1236
1236
  const b = new F(C.x, 0, C.z);
1237
1237
  if (b.lengthSq() < 1e-8) return;
1238
1238
  b.normalize();
1239
- const I = new F().crossVectors(new F(0, 1, 0), b).normalize();
1240
- f.current.position.set(I.x * g, 0, I.z * g);
1239
+ const D = new F().crossVectors(new F(0, 1, 0), b).normalize();
1240
+ f.current.position.set(D.x * g, 0, D.z * g);
1241
1241
  const _ = w.position.x - f.current.position.x, v = w.position.z - f.current.position.z;
1242
1242
  f.current.rotation.y = Math.atan2(_, v);
1243
1243
  });
@@ -1365,10 +1365,10 @@ let __tla = (async () => {
1365
1365
  if (!o || t <= 0) return null;
1366
1366
  const b = a ?? o.geometry;
1367
1367
  b.computeBoundingBox();
1368
- const I = b.boundingBox, _ = new F();
1369
- I.getCenter(_);
1368
+ const D = b.boundingBox, _ = new F();
1369
+ D.getCenter(_);
1370
1370
  const v = new F();
1371
- I.getSize(v), p.current.copy(v);
1371
+ D.getSize(v), p.current.copy(v);
1372
1372
  const k = d.width / d.height, R = Math.max(v.y, v.x / k) * 1.6, T = R * k, N = _.y - v.y * 0.05;
1373
1373
  z.current = N;
1374
1374
  const Q = new O.OrthographicCamera(-T / 2, T / 2, R / 2, -R / 2, 0.1, t * 10);
@@ -1395,7 +1395,7 @@ let __tla = (async () => {
1395
1395
  u
1396
1396
  ]);
1397
1397
  const C = J((b) => {
1398
- const I = b.position.clone(), _ = I.length(), v = Math.atan2(I.x, I.z), k = Math.acos(I.y / _), T = v + 0.02;
1398
+ const D = b.position.clone(), _ = D.length(), v = Math.atan2(D.x, D.z), k = Math.acos(D.y / _), T = v + 0.02;
1399
1399
  b.position.set(_ * Math.sin(k) * Math.sin(T), _ * Math.cos(k), _ * Math.sin(k) * Math.cos(T)), b.lookAt(0, 0, 0), b.updateMatrixWorld(true), u();
1400
1400
  }, [
1401
1401
  u
@@ -1423,8 +1423,8 @@ let __tla = (async () => {
1423
1423
  f,
1424
1424
  C
1425
1425
  ]), U(() => {
1426
- const b = L.current !== r, I = S.current !== n, _ = !P.current && !!a;
1427
- if (L.current = r, S.current = n, P.current = a, !b && !I && !_ || !r || s !== "3D") return;
1426
+ const b = L.current !== r, D = S.current !== n, _ = !P.current && !!a;
1427
+ if (L.current = r, S.current = n, P.current = a, !b && !D && !_ || !r || s !== "3D") return;
1428
1428
  const v = w();
1429
1429
  v && g({
1430
1430
  camera: v
@@ -1442,15 +1442,15 @@ let __tla = (async () => {
1442
1442
  if (A.current = s, !(!r || !o || t <= 0)) {
1443
1443
  if (s === "2D" && l != null) {
1444
1444
  x.current = f;
1445
- const I = o.geometry, _ = I.getAttribute("position"), v = _.array, k = t * 0.15;
1445
+ const D = o.geometry, _ = D.getAttribute("position"), v = _.array, k = t * 0.15;
1446
1446
  let R = 1 / 0, T = -1 / 0, N = 1 / 0, Q = -1 / 0, be = false;
1447
1447
  for (let he = 0; he < _.count; he++) if (Math.abs(v[he * 3 + 1] - l) < k) {
1448
1448
  const j = v[he * 3], ne = v[he * 3 + 2];
1449
1449
  j < R && (R = j), j > T && (T = j), ne < N && (N = ne), ne > Q && (Q = ne), be = true;
1450
1450
  }
1451
1451
  if (!be) {
1452
- I.computeBoundingBox();
1453
- const he = I.boundingBox;
1452
+ D.computeBoundingBox();
1453
+ const he = D.boundingBox;
1454
1454
  R = he.min.x, T = he.max.x, N = he.min.z, Q = he.max.z;
1455
1455
  }
1456
1456
  const ae = (R + T) / 2, fe = (N + Q) / 2, re = d.width / d.height, ee = 1.4, Y = (T - R) * ee, ue = (Q - N) * ee;
@@ -1464,9 +1464,9 @@ let __tla = (async () => {
1464
1464
  camera: x.current
1465
1465
  }), x.current = null;
1466
1466
  else {
1467
- const I = w();
1468
- I && g({
1469
- camera: I
1467
+ const D = w();
1468
+ D && g({
1469
+ camera: D
1470
1470
  });
1471
1471
  }
1472
1472
  }
@@ -1485,22 +1485,22 @@ let __tla = (async () => {
1485
1485
  const b = f;
1486
1486
  if (s === "2D") {
1487
1487
  if (!o || l == null) return;
1488
- const I = o.geometry, _ = I.getAttribute("position"), v = _.array, k = t * 0.15;
1488
+ const D = o.geometry, _ = D.getAttribute("position"), v = _.array, k = t * 0.15;
1489
1489
  let R = 1 / 0, T = -1 / 0, N = 1 / 0, Q = -1 / 0, be = false;
1490
1490
  for (let Z = 0; Z < _.count; Z++) if (Math.abs(v[Z * 3 + 1] - l) < k) {
1491
1491
  const pe = v[Z * 3], me = v[Z * 3 + 2];
1492
1492
  pe < R && (R = pe), pe > T && (T = pe), me < N && (N = me), me > Q && (Q = me), be = true;
1493
1493
  }
1494
1494
  if (!be) {
1495
- I.computeBoundingBox();
1496
- const Z = I.boundingBox;
1495
+ D.computeBoundingBox();
1496
+ const Z = D.boundingBox;
1497
1497
  R = Z.min.x, T = Z.max.x, N = Z.min.z, Q = Z.max.z;
1498
1498
  }
1499
1499
  const ae = d.width / d.height, fe = 1.4, re = (T - R) * fe, ee = (Q - N) * fe;
1500
1500
  let Y, ue;
1501
1501
  re / ee > ae ? (Y = re, ue = re / ae) : (ue = ee, Y = ee * ae), b.left = -Y / 2, b.right = Y / 2, b.top = ue / 2, b.bottom = -ue / 2;
1502
1502
  } else {
1503
- const I = p.current, _ = d.width / d.height, v = Math.max(I.y, I.x / _) * 1.6, k = v * _;
1503
+ const D = p.current, _ = d.width / d.height, v = Math.max(D.y, D.x / _) * 1.6, k = v * _;
1504
1504
  b.left = -k / 2, b.right = k / 2, b.top = v / 2, b.bottom = -v / 2;
1505
1505
  }
1506
1506
  b.updateProjectionMatrix();
@@ -1859,7 +1859,7 @@ let __tla = (async () => {
1859
1859
  n,
1860
1860
  o,
1861
1861
  s
1862
- ]), I = J((v) => {
1862
+ ]), D = J((v) => {
1863
1863
  h(false), m.domElement.style.cursor = "auto", v.target.releasePointerCapture(v.pointerId), f == null ? void 0 : f();
1864
1864
  }, [
1865
1865
  m,
@@ -1880,7 +1880,7 @@ let __tla = (async () => {
1880
1880
  renderOrder: 10,
1881
1881
  onPointerDown: C,
1882
1882
  onPointerMove: b,
1883
- onPointerUp: I,
1883
+ onPointerUp: D,
1884
1884
  onPointerEnter: () => {
1885
1885
  p(true), m.domElement.style.cursor = "ns-resize";
1886
1886
  },
@@ -1957,7 +1957,7 @@ let __tla = (async () => {
1957
1957
  boxSizing: "border-box",
1958
1958
  fontFamily: "system-ui, sans-serif"
1959
1959
  }, tr = ({ amputationType: t, spacingInches: r, scanMeasurements: n, scanFrontalHeight: o, onSave: s, onSkip: l, onFormChange: c, onHeightChange: a, initialValues: e, initialFrontalHeight: g }) => {
1960
- const d = t === "AK" ? "IT" : "MPT", f = r, u = t === "AK" ? 18 : 9, h = V(() => {
1960
+ const d = t === "AK" ? "Perineum" : "MPT", f = r, u = t === "AK" ? 18 : 9, h = V(() => {
1961
1961
  const v = [];
1962
1962
  for (let k = 2; k >= 1; k -= f) v.push(`${k}\u2033 above ${d}`);
1963
1963
  v.push(`At ${d}`);
@@ -2017,7 +2017,7 @@ let __tla = (async () => {
2017
2017
  t,
2018
2018
  S,
2019
2019
  z
2020
- ]), I = J(() => {
2020
+ ]), D = J(() => {
2021
2021
  if (!b) return;
2022
2022
  const v = m !== "" && !isNaN(parseFloat(m)) ? parseFloat(m) : 0, k = S !== "" && !isNaN(parseFloat(S)) ? parseFloat(S) : void 0, R = z !== "" && !isNaN(parseFloat(z)) ? parseFloat(z) : void 0;
2023
2023
  s({
@@ -2364,7 +2364,7 @@ let __tla = (async () => {
2364
2364
  flexShrink: 0
2365
2365
  },
2366
2366
  children: i("button", {
2367
- onClick: I,
2367
+ onClick: D,
2368
2368
  disabled: !b,
2369
2369
  style: {
2370
2370
  ...bn,
@@ -2386,7 +2386,7 @@ let __tla = (async () => {
2386
2386
  "Modified CAD",
2387
2387
  "I don't want to",
2388
2388
  "I want a second opinion",
2389
- "I measured from IT"
2389
+ "I measured from Perineum"
2390
2390
  ], ht = {
2391
2391
  padding: "8px 20px",
2392
2392
  borderRadius: 4,
@@ -2998,16 +2998,16 @@ let __tla = (async () => {
2998
2998
  const l = V(() => {
2999
2999
  const d = s ?? t, f = Ot(d), u = new F(0, 1, 0), h = 5, p = n + 3 * 25.4, x = [];
3000
3000
  for (let b = r + h; b < p; b += h) {
3001
- const I = ko(f, d, new F(0, b, 0), u);
3002
- I > 0 && x.push({
3001
+ const D = ko(f, d, new F(0, b, 0), u);
3002
+ D > 0 && x.push({
3003
3003
  y: b,
3004
- circ: I
3004
+ circ: D
3005
3005
  });
3006
3006
  }
3007
3007
  if (x.length < 5) return null;
3008
3008
  const m = n - r, L = r + m * 0.3, S = r + m * 0.7, P = x.filter((b) => b.y >= L && b.y <= S);
3009
3009
  if (P.length < 3) return null;
3010
- const z = P.map((b) => b.circ).sort((b, I) => b - I), w = z[Math.floor(z.length / 2)], C = Math.max(...x.map((b) => b.circ));
3010
+ const z = P.map((b) => b.circ).sort((b, D) => b - D), w = z[Math.floor(z.length / 2)], C = Math.max(...x.map((b) => b.circ));
3011
3011
  return {
3012
3012
  circumferences: x,
3013
3013
  baseline: w,
@@ -3259,7 +3259,7 @@ let __tla = (async () => {
3259
3259
  renderOrder: 999
3260
3260
  });
3261
3261
  }
3262
- const In = [
3262
+ const Dn = [
3263
3263
  {
3264
3264
  key: "pcaAxes",
3265
3265
  label: "PCA Axes (full mesh)",
@@ -3316,7 +3316,7 @@ let __tla = (async () => {
3316
3316
  group: "Alignment"
3317
3317
  }
3318
3318
  ], br = [
3319
- ...new Set(In.map((t) => t.group))
3319
+ ...new Set(Dn.map((t) => t.group))
3320
3320
  ];
3321
3321
  function yr({ layers: t, onToggleLayer: r, isDoubleShell: n }) {
3322
3322
  return M("div", {
@@ -3348,7 +3348,7 @@ let __tla = (async () => {
3348
3348
  children: "Debug Layers"
3349
3349
  }),
3350
3350
  br.map((o) => {
3351
- const s = In.filter((l) => l.group === o && !(l.hideWhenDoubleShell && n));
3351
+ const s = Dn.filter((l) => l.group === o && !(l.hideWhenDoubleShell && n));
3352
3352
  return s.length === 0 ? null : M("div", {
3353
3353
  children: [
3354
3354
  i("div", {
@@ -3409,9 +3409,9 @@ let __tla = (async () => {
3409
3409
  });
3410
3410
  }
3411
3411
  const wr = ({ config: t, spacingType: r, scanUrl: n, formMeasurements: o, onComplete: s, isDebugUser: l = false, onAnalyticsEvent: c, wasmModule: a }) => {
3412
- const [e, g] = B(null), [d, f] = B(0), [u, h] = B(false), [A, p] = B(false), [x, m] = B(""), [L, S] = B("3D"), [P, z] = B(r === "AK" ? 2 : 1), [w, C] = B(false), [b, I] = B(null), [_, v] = B(r ?? null), [k, R] = B("mm"), [T, N] = B(false), [Q, be] = B(""), [ae, fe] = B(false), [re, ee] = B(false), [Y, ue] = B(false), [Z, pe] = B(false), [me, he] = B(null), [j, ne] = B(null), [xe, we] = B(null), [ye, oe] = B(false), [X, G] = B([]), [Pe, Fe] = B(null), [Ve, ie] = B(null), [Ae, St] = B(null), [vt, Nt] = B(null), [Rn, jt] = B(false), [Ct, Vt] = B(null), [zt, Le] = B(null), [De, Wn] = B(false), [Xt, Bn] = B(ir), [$e, Gt] = B("obj"), [Se, Mt] = B(o), [Ye, At] = B(true), [Ze, tt] = B(false), [nt, Yt] = B(false), [ze, ot] = B(false), [En, Ft] = B(false), [Te, $n] = B(null), [Tn, On] = B(void 0), [Hn, Nn] = B(void 0), [Zt] = B("#c8c8c8"), [jn] = B(1), [Be, Vn] = B(false), [kt, Kt] = B([]), rt = le(null), Oe = le(null), it = le(false), Xn = le(null), Pt = le(null), Lt = le(null), Ke = J(async () => {
3412
+ const [e, g] = B(null), [d, f] = B(0), [u, h] = B(false), [A, p] = B(false), [x, m] = B(""), [L, S] = B("3D"), [P, z] = B(r === "AK" ? 2 : 1), [w, C] = B(false), [b, D] = B(null), [_, v] = B(r ?? null), [k, R] = B("mm"), [T, N] = B(false), [Q, be] = B(""), [ae, fe] = B(false), [re, ee] = B(false), [Y, ue] = B(false), [Z, pe] = B(false), [me, he] = B(null), [j, ne] = B(null), [xe, we] = B(null), [ye, oe] = B(false), [X, G] = B([]), [Pe, Fe] = B(null), [Ve, ie] = B(null), [Ae, St] = B(null), [vt, Nt] = B(null), [Rn, jt] = B(false), [Ct, Vt] = B(null), [zt, Le] = B(null), [Ie, Wn] = B(false), [Xt, Bn] = B(ir), [$e, Gt] = B("obj"), [Se, Mt] = B(o), [Ye, At] = B(true), [Ze, tt] = B(false), [nt, Yt] = B(false), [ze, ot] = B(false), [En, Ft] = B(false), [Te, $n] = B(null), [Tn, On] = B(void 0), [Hn, Nn] = B(void 0), [Zt] = B("#c8c8c8"), [jn] = B(1), [Be, Vn] = B(false), [kt, Kt] = B([]), rt = le(null), Oe = le(null), it = le(false), Xn = le(null), Pt = le(null), Lt = le(null), Ke = J(async () => {
3413
3413
  if (Lt.current) try {
3414
- const y = Lt.current, D = () => {
3414
+ const y = Lt.current, I = () => {
3415
3415
  const q = y.querySelector("canvas");
3416
3416
  if (!q) return;
3417
3417
  const H = y.getBoundingClientRect(), ge = q.width, Ce = q.height, te = ge / H.width, Me = Ce / H.height, Re = document.createElement("canvas");
@@ -3423,8 +3423,8 @@ let __tla = (async () => {
3423
3423
  const on = nn.querySelectorAll("div[style*='background']");
3424
3424
  on.length !== 0 && on.forEach((Xe) => {
3425
3425
  var _a;
3426
- const Ie = Xe.getBoundingClientRect();
3427
- if (Ie.width === 0 || Ie.height === 0) return;
3426
+ const De = Xe.getBoundingClientRect();
3427
+ if (De.width === 0 || De.height === 0) return;
3428
3428
  let Wt = 0, Qe = Xe;
3429
3429
  for (; Qe && Qe !== y; ) {
3430
3430
  const ft = (Qe.style.transform || "").match(/rotate\((-?\d+)deg\)/);
@@ -3434,7 +3434,7 @@ let __tla = (async () => {
3434
3434
  }
3435
3435
  Qe = Qe.parentElement;
3436
3436
  }
3437
- const rn = (Ie.left + Ie.width / 2 - H.left) * te, sn = (Ie.top + Ie.height / 2 - H.top) * Me, ct = Math.abs(Wt) > 1, ln = (ct ? Ie.height : Ie.width) * te, an = (ct ? Ie.width : Ie.height) * Me;
3437
+ const rn = (De.left + De.width / 2 - H.left) * te, sn = (De.top + De.height / 2 - H.top) * Me, ct = Math.abs(Wt) > 1, ln = (ct ? De.height : De.width) * te, an = (ct ? De.width : De.height) * Me;
3438
3438
  se.save(), se.translate(rn, sn), ct && se.rotate(Wt * Math.PI / 180);
3439
3439
  const oo = Xe.style.backgroundColor || "rgba(0,0,0,0.75)";
3440
3440
  se.fillStyle = oo;
@@ -3457,9 +3457,9 @@ let __tla = (async () => {
3457
3457
  }), Re.toDataURL("image/png");
3458
3458
  };
3459
3459
  Pt.current && Pt.current(), await new Promise((q) => requestAnimationFrame(() => requestAnimationFrame(q)));
3460
- const E = D();
3460
+ const E = I();
3461
3461
  S("2D"), await new Promise((q) => setTimeout(q, 150)), await new Promise((q) => requestAnimationFrame(() => requestAnimationFrame(q)));
3462
- const W = D();
3462
+ const W = I();
3463
3463
  return S("3D"), !E || !W ? void 0 : {
3464
3464
  frontal_view_png: E,
3465
3465
  side_view_png: W
@@ -3468,7 +3468,7 @@ let __tla = (async () => {
3468
3468
  return;
3469
3469
  }
3470
3470
  }, []), ve = J((y) => {
3471
- const D = /* @__PURE__ */ new Date(), E = `${String(D.getHours()).padStart(2, "0")}:${String(D.getMinutes()).padStart(2, "0")}:${String(D.getSeconds()).padStart(2, "0")}.${String(D.getMilliseconds()).padStart(3, "0")}`;
3471
+ const I = /* @__PURE__ */ new Date(), E = `${String(I.getHours()).padStart(2, "0")}:${String(I.getMinutes()).padStart(2, "0")}:${String(I.getSeconds()).padStart(2, "0")}.${String(I.getMilliseconds()).padStart(3, "0")}`;
3472
3472
  Kt((W) => [
3473
3473
  ...W.slice(-200),
3474
3474
  `[${E}] ${y}`
@@ -3529,11 +3529,11 @@ let __tla = (async () => {
3529
3529
  measurement_source: "scan_derived",
3530
3530
  is_double_wall: Y,
3531
3531
  is_unit_converted: false,
3532
- form_measurements: (Se == null ? void 0 : Se.filter((D) => D != null)) ?? null,
3533
- scan_measurements: X.map((D) => +(D.modifiedValue ?? D.originalValue).toFixed(1)),
3534
- measurement_variance: Se ? X.map((D, E) => {
3532
+ form_measurements: (Se == null ? void 0 : Se.filter((I) => I != null)) ?? null,
3533
+ scan_measurements: X.map((I) => +(I.modifiedValue ?? I.originalValue).toFixed(1)),
3534
+ measurement_variance: Se ? X.map((I, E) => {
3535
3535
  const W = Se[E];
3536
- return W == null ? null : +((D.modifiedValue ?? D.originalValue) - W).toFixed(1);
3536
+ return W == null ? null : +((I.modifiedValue ?? I.originalValue) - W).toFixed(1);
3537
3537
  }) : null,
3538
3538
  frontal_height: y !== null ? +y.toFixed(1) : null
3539
3539
  });
@@ -3545,7 +3545,7 @@ let __tla = (async () => {
3545
3545
  }, [
3546
3546
  a
3547
3547
  ]);
3548
- const Ue = J((y, D) => {
3548
+ const Ue = J((y, I) => {
3549
3549
  y.computeBoundingBox();
3550
3550
  const E = y.boundingBox, W = new F();
3551
3551
  E.getCenter(W), y.translate(-W.x, -W.y, -W.z), y.computeBoundingBox();
@@ -3555,15 +3555,15 @@ let __tla = (async () => {
3555
3555
  color: 8947848,
3556
3556
  side: O.DoubleSide
3557
3557
  }));
3558
- g(ge), fe(D), ee(true), pe(false), it.current = false;
3559
- }, []), Ee = J(async (y, D) => {
3558
+ g(ge), fe(I), ee(true), pe(false), it.current = false;
3559
+ }, []), Ee = J(async (y, I) => {
3560
3560
  Le(null);
3561
- const E = D.toLowerCase(), W = E.endsWith(".stl");
3561
+ const E = I.toLowerCase(), W = E.endsWith(".stl");
3562
3562
  if (!E.endsWith(".obj") && !W) {
3563
3563
  Le("Unsupported file format. Please use OBJ or STL.");
3564
3564
  return;
3565
3565
  }
3566
- Gt(W ? "stl" : "obj"), p(true), m("Processing file..."), ve(`FILE_LOAD: ${D} (${W ? "STL" : "OBJ"})`);
3566
+ Gt(W ? "stl" : "obj"), p(true), m("Processing file..."), ve(`FILE_LOAD: ${I} (${W ? "STL" : "OBJ"})`);
3567
3567
  try {
3568
3568
  let H;
3569
3569
  if (W) if (m("Converting STL..."), y instanceof ArrayBuffer) {
@@ -3571,25 +3571,25 @@ let __tla = (async () => {
3571
3571
  y
3572
3572
  ]), Me = new File([
3573
3573
  te
3574
- ], D);
3574
+ ], I);
3575
3575
  H = await $t(Me);
3576
3576
  } else {
3577
3577
  const te = new Blob([
3578
3578
  y
3579
3579
  ]), Me = new File([
3580
3580
  te
3581
- ], D);
3581
+ ], I);
3582
3582
  H = await $t(Me);
3583
3583
  }
3584
3584
  else H = typeof y == "string" ? y : new TextDecoder().decode(y);
3585
3585
  const ge = performance.now(), Ce = Oe.current ? await zo(H, Oe.current, (te) => {
3586
3586
  m(te), ve(`PREPROCESS: ${te}`);
3587
3587
  }) : null;
3588
- if (Ce) ve(`PREPROCESS: done in ${(performance.now() - ge).toFixed(0)}ms \u2014 unit=${Ce.detectedUnit}, scaled=${Ce.wasScaled}`), t.showAmputationModal && !r ? (I(Ce), C(true)) : Ue(Ce.geometry, Ce.wasScaled);
3588
+ if (Ce) ve(`PREPROCESS: done in ${(performance.now() - ge).toFixed(0)}ms \u2014 unit=${Ce.detectedUnit}, scaled=${Ce.wasScaled}`), t.showAmputationModal && !r ? (D(Ce), C(true)) : Ue(Ce.geometry, Ce.wasScaled);
3589
3589
  else {
3590
3590
  m("Using fallback loader...");
3591
3591
  const te = Mo(H);
3592
- te ? t.showAmputationModal && !r ? (I({
3592
+ te ? t.showAmputationModal && !r ? (D({
3593
3593
  geometry: te,
3594
3594
  wasScaled: false
3595
3595
  }), C(true)) : Ue(te, false) : Le("Failed to parse the mesh.");
@@ -3610,18 +3610,18 @@ let __tla = (async () => {
3610
3610
  (async () => {
3611
3611
  p(true), m("Loading scan...");
3612
3612
  try {
3613
- const D = await fetch(n);
3614
- if (!D.ok) throw new Error(`Failed to download scan: ${D.status}`);
3613
+ const I = await fetch(n);
3614
+ if (!I.ok) throw new Error(`Failed to download scan: ${I.status}`);
3615
3615
  const W = new URL(n).pathname.split("/").pop() || "scan.obj";
3616
3616
  if (W.toLowerCase().endsWith(".stl")) {
3617
- const H = await D.arrayBuffer();
3617
+ const H = await I.arrayBuffer();
3618
3618
  await Ee(H, W);
3619
3619
  } else {
3620
- const H = await D.text();
3620
+ const H = await I.text();
3621
3621
  await Ee(H, W);
3622
3622
  }
3623
- } catch (D) {
3624
- Le(D instanceof Error ? D.message : "Failed to load scan from URL."), p(false), m("");
3623
+ } catch (I) {
3624
+ Le(I instanceof Error ? I.message : "Failed to load scan from URL."), p(false), m("");
3625
3625
  }
3626
3626
  })();
3627
3627
  }, [
@@ -3637,9 +3637,9 @@ let __tla = (async () => {
3637
3637
  Le("WASM module is still loading. Please wait.");
3638
3638
  return;
3639
3639
  }
3640
- const D = y.dataTransfer.files[0];
3641
- if (!D) return;
3642
- const E = D.name.toLowerCase();
3640
+ const I = y.dataTransfer.files[0];
3641
+ if (!I) return;
3642
+ const E = I.name.toLowerCase();
3643
3643
  if (!E.endsWith(".obj") && !E.endsWith(".stl")) {
3644
3644
  Le("Please drop an OBJ or STL file.");
3645
3645
  return;
@@ -3647,20 +3647,20 @@ let __tla = (async () => {
3647
3647
  if (E.endsWith(".stl")) {
3648
3648
  Gt("stl"), p(true), m("Converting STL...");
3649
3649
  try {
3650
- const W = await $t(D);
3651
- await Ee(W, D.name.replace(/\.stl$/i, ".obj"));
3650
+ const W = await $t(I);
3651
+ await Ee(W, I.name.replace(/\.stl$/i, ".obj"));
3652
3652
  } catch (W) {
3653
3653
  Le(W instanceof Error ? W.message : "Failed to process STL file."), p(false), m("");
3654
3654
  }
3655
3655
  } else {
3656
- const W = await D.text();
3657
- await Ee(W, D.name);
3656
+ const W = await I.text();
3657
+ await Ee(W, I.name);
3658
3658
  }
3659
3659
  }, [
3660
3660
  Be,
3661
3661
  Ee
3662
3662
  ]), Un = J((y) => {
3663
- v(y), z(y === "AK" ? 2 : 1), C(false), b && (Ue(b.geometry, b.wasScaled), I(null)), c == null ? void 0 : c("file_loaded", {
3663
+ v(y), z(y === "AK" ? 2 : 1), C(false), b && (Ue(b.geometry, b.wasScaled), D(null)), c == null ? void 0 : c("file_loaded", {
3664
3664
  spacing_type: y,
3665
3665
  file_format: $e,
3666
3666
  is_double_wall: false
@@ -3674,11 +3674,11 @@ let __tla = (async () => {
3674
3674
  U(() => {
3675
3675
  if (!e || $.length !== 1 || !Oe.current || it.current) return;
3676
3676
  it.current = true;
3677
- const y = $[0], D = Oe.current, E = e.geometry, { positions: W, indices: q } = xt(E), H = new Float32Array([
3677
+ const y = $[0], I = Oe.current, E = e.geometry, { positions: W, indices: q } = xt(E), H = new Float32Array([
3678
3678
  y.position.x,
3679
3679
  y.position.y,
3680
3680
  y.position.z
3681
- ]), ge = D.detect_shell(W, q, H, 40), Ce = ge.details(), te = ge.is_double_shell();
3681
+ ]), ge = I.detect_shell(W, q, H, 40), Ce = ge.details(), te = ge.is_double_shell();
3682
3682
  ve(`SHELL_DETECT: ${te ? "DOUBLE" : "SINGLE"} \u2014 ${Ce}`), te && (ue(true), oe(true), ve(`SHELL_DETECT: double shell, thickness=${ge.thickness().toFixed(1)}mm`));
3683
3683
  }, [
3684
3684
  e,
@@ -3690,12 +3690,12 @@ let __tla = (async () => {
3690
3690
  N(true), be("Please wait..."), ve("PIPELINE: starting processing pipeline...");
3691
3691
  const y = performance.now();
3692
3692
  setTimeout(() => {
3693
- const D = [
3693
+ const I = [
3694
3694
  $[1],
3695
3695
  $[0],
3696
3696
  ...$.slice(2)
3697
3697
  ];
3698
- Lo(e, D, mt, {
3698
+ Lo(e, I, mt, {
3699
3699
  onStatus: (E) => {
3700
3700
  be(E), ve(`PIPELINE: ${E}`);
3701
3701
  },
@@ -3737,8 +3737,8 @@ let __tla = (async () => {
3737
3737
  qt,
3738
3738
  en,
3739
3739
  Z
3740
- ]), It = le(false), Jn = J(async () => {
3741
- if (st(), G([]), Fe(null), we(null), ie(null), St(null), Vt(null), Nt(null), tt(false), Yt(false), At(true), ue(false), pe(false), it.current = false, It.current = false, at.current = false, S("3D"), n && Be) {
3740
+ ]), Dt = le(false), Jn = J(async () => {
3741
+ if (st(), G([]), Fe(null), we(null), ie(null), St(null), Vt(null), Nt(null), tt(false), Yt(false), At(true), ue(false), pe(false), it.current = false, Dt.current = false, at.current = false, S("3D"), n && Be) {
3742
3742
  g(null);
3743
3743
  try {
3744
3744
  const y = await fetch(n);
@@ -3756,7 +3756,7 @@ let __tla = (async () => {
3756
3756
  st
3757
3757
  ]);
3758
3758
  U(() => {
3759
- K && X.length > 0 && !It.current && (It.current = true, tt(true));
3759
+ K && X.length > 0 && !Dt.current && (Dt.current = true, tt(true));
3760
3760
  }, [
3761
3761
  K,
3762
3762
  X.length
@@ -3767,8 +3767,8 @@ let __tla = (async () => {
3767
3767
  if (Y) return Math.abs($[0].position.y - $[2].position.y);
3768
3768
  const y = e.geometry;
3769
3769
  y.computeBoundingBox();
3770
- const D = ((_a = y.boundingBox) == null ? void 0 : _a.min.y) ?? 0;
3771
- return Math.abs($[0].position.y - D);
3770
+ const I = ((_a = y.boundingBox) == null ? void 0 : _a.min.y) ?? 0;
3771
+ return Math.abs($[0].position.y - I);
3772
3772
  }, [
3773
3773
  e,
3774
3774
  $,
@@ -3778,7 +3778,7 @@ let __tla = (async () => {
3778
3778
  }, []), tn = J(async (y) => {
3779
3779
  if (!s) return;
3780
3780
  tt(false), Ft(false), ot(true);
3781
- const D = e ? await Ke().catch(() => {
3781
+ const I = e ? await Ke().catch(() => {
3782
3782
  }) : void 0;
3783
3783
  try {
3784
3784
  s({
@@ -3796,7 +3796,7 @@ let __tla = (async () => {
3796
3796
  scanUrl: n,
3797
3797
  decision: "skip",
3798
3798
  skipReason: y,
3799
- screenshots: D,
3799
+ screenshots: I,
3800
3800
  alignedGeometry: e == null ? void 0 : e.geometry
3801
3801
  });
3802
3802
  } finally {
@@ -3813,14 +3813,14 @@ let __tla = (async () => {
3813
3813
  qe,
3814
3814
  n,
3815
3815
  Ke
3816
- ]), Dt = le(null);
3816
+ ]), It = le(null);
3817
3817
  U(() => {
3818
3818
  if (!e || !K) {
3819
- Dt.current = null;
3819
+ It.current = null;
3820
3820
  return;
3821
3821
  }
3822
3822
  const y = (He ?? e).geometry;
3823
- Dt.current = Ot(y);
3823
+ It.current = Ot(y);
3824
3824
  }, [
3825
3825
  e,
3826
3826
  K,
@@ -3829,14 +3829,14 @@ let __tla = (async () => {
3829
3829
  const Rt = J(async (y) => {
3830
3830
  if (!s || !e || X.length === 0 || !_) return;
3831
3831
  ot(true);
3832
- const D = await Ke().catch(() => {
3832
+ const I = await Ke().catch(() => {
3833
3833
  });
3834
3834
  try {
3835
3835
  let E = 0, W = 0;
3836
3836
  if ($.length >= 2) {
3837
3837
  const q = (He ?? e).geometry, ge = $[0].position.y;
3838
3838
  try {
3839
- const Ce = Dt.current ?? Ot(q), te = Ne(Ce, q, ge);
3839
+ const Ce = It.current ?? Ot(q), te = Ne(Ce, q, ge);
3840
3840
  if (te.linePoints.length >= 2) {
3841
3841
  let Me = te.linePoints[0], Re = te.linePoints[0], se = te.linePoints[0], Je = te.linePoints[0];
3842
3842
  for (const _e of te.linePoints) _e.x < Me.x && (Me = _e), _e.x > Re.x && (Re = _e), _e.z < se.z && (se = _e), _e.z > Je.z && (Je = _e);
@@ -3862,7 +3862,7 @@ let __tla = (async () => {
3862
3862
  scanUrl: n,
3863
3863
  decision: y,
3864
3864
  userEnteredMeasurements: Te ?? void 0,
3865
- screenshots: D,
3865
+ screenshots: I,
3866
3866
  alignedGeometry: (He ?? e).geometry
3867
3867
  });
3868
3868
  } finally {
@@ -3886,8 +3886,8 @@ let __tla = (async () => {
3886
3886
  if (!Se || X.length === 0) return false;
3887
3887
  const y = Math.min(Se.length, X.length);
3888
3888
  if (y === 0) return false;
3889
- for (let D = 0; D < y; D++) {
3890
- const E = Se[D], W = X[D];
3889
+ for (let I = 0; I < y; I++) {
3890
+ const E = Se[I], W = X[I];
3891
3891
  if (!W || E == null || E === 0) continue;
3892
3892
  const q = W.modifiedValue ?? W.originalValue;
3893
3893
  if (Math.abs(q - E) > 7) return false;
@@ -4117,8 +4117,8 @@ let __tla = (async () => {
4117
4117
  flexShrink: 0
4118
4118
  }
4119
4119
  }),
4120
- "Click mesh to set ",
4121
- _ === "AK" ? "IT" : "MPT"
4120
+ "Place Point at ",
4121
+ _ === "AK" ? "Perineum" : "MPT"
4122
4122
  ]
4123
4123
  }),
4124
4124
  e && !K && $.length === 1 && M("div", {
@@ -4149,7 +4149,7 @@ let __tla = (async () => {
4149
4149
  flexShrink: 0
4150
4150
  }
4151
4151
  }),
4152
- "Click mesh to set Origin"
4152
+ "Place Point at Origin"
4153
4153
  ]
4154
4154
  }),
4155
4155
  A && i(hn, {
@@ -4158,7 +4158,7 @@ let __tla = (async () => {
4158
4158
  T && i(hn, {
4159
4159
  message: Q
4160
4160
  }),
4161
- zt && i(Io, {
4161
+ zt && i(Do, {
4162
4162
  message: zt,
4163
4163
  onDismiss: () => Le(null)
4164
4164
  }),
@@ -4275,7 +4275,7 @@ let __tla = (async () => {
4275
4275
  children: [
4276
4276
  i("button", {
4277
4277
  onClick: () => {
4278
- C(false), I(null);
4278
+ C(false), D(null);
4279
4279
  },
4280
4280
  style: {
4281
4281
  padding: "6px 16px",
@@ -4336,14 +4336,14 @@ let __tla = (async () => {
4336
4336
  },
4337
4337
  style: {
4338
4338
  display: e ? "block" : "none",
4339
- backgroundColor: De ? "#070611" : void 0
4339
+ backgroundColor: Ie ? "#070611" : void 0
4340
4340
  },
4341
4341
  gl: {
4342
4342
  localClippingEnabled: true,
4343
4343
  preserveDrawingBuffer: true
4344
4344
  },
4345
4345
  scene: {
4346
- background: De ? new O.Color("#070611") : null
4346
+ background: Ie ? new O.Color("#070611") : null
4347
4347
  },
4348
4348
  children: [
4349
4349
  i("ambientLight", {
@@ -4377,14 +4377,14 @@ let __tla = (async () => {
4377
4377
  mesh: e,
4378
4378
  maxPoints: 2,
4379
4379
  meshColor: Zt,
4380
- meshOpacity: De ? 0.3 : jn,
4380
+ meshOpacity: Ie ? 0.3 : jn,
4381
4381
  frontFaceOnly: Z,
4382
4382
  doubleShellTransparency: Y && K
4383
4383
  }),
4384
4384
  e && L === "3D" && i(Bo, {
4385
4385
  modelSize: d,
4386
4386
  labels: [
4387
- _ === "AK" ? "IT" : "MPT",
4387
+ _ === "AK" ? "Perineum" : "MPT",
4388
4388
  "Origin",
4389
4389
  "Cut Plane"
4390
4390
  ]
@@ -4408,8 +4408,8 @@ let __tla = (async () => {
4408
4408
  isDragging: Rn
4409
4409
  }),
4410
4410
  e && K && $.length >= 3 && (() => {
4411
- const D = e.geometry.getIndex();
4412
- if (!D || D.count < 30) return null;
4411
+ const I = e.geometry.getIndex();
4412
+ if (!I || I.count < 30) return null;
4413
4413
  const E = $[2], W = $[0], q = Ve ?? E.position.y, H = Ae ?? vt ?? W.position.y;
4414
4414
  return L === "2D" ? i(Uo, {
4415
4415
  mesh: He ?? e,
@@ -4456,17 +4456,17 @@ let __tla = (async () => {
4456
4456
  color: "#44ff44",
4457
4457
  hoverColor: "#88ff88",
4458
4458
  dragColor: "#ffffff",
4459
- label: _ === "AK" ? "IT" : "MPT",
4459
+ label: _ === "AK" ? "Perineum" : "MPT",
4460
4460
  onDragStart: () => jt(true),
4461
4461
  onDragEnd: () => jt(false)
4462
4462
  })
4463
4463
  ]
4464
4464
  });
4465
4465
  })(),
4466
- e && K && L === "3D" && De && i(xr, {
4466
+ e && K && L === "3D" && Ie && i(xr, {
4467
4467
  mesh: e
4468
4468
  }),
4469
- e && t.showDebug && De && L === "3D" && i(mr, {
4469
+ e && t.showDebug && Ie && L === "3D" && i(mr, {
4470
4470
  mesh: e,
4471
4471
  modelSize: d,
4472
4472
  layers: Xt,
@@ -4548,11 +4548,11 @@ let __tla = (async () => {
4548
4548
  })
4549
4549
  ]
4550
4550
  }),
4551
- t.showDebug && De && e && L === "3D" && i(yr, {
4551
+ t.showDebug && Ie && e && L === "3D" && i(yr, {
4552
4552
  layers: Xt,
4553
- onToggleLayer: (y) => Bn((D) => ({
4554
- ...D,
4555
- [y]: !D[y]
4553
+ onToggleLayer: (y) => Bn((I) => ({
4554
+ ...I,
4555
+ [y]: !I[y]
4556
4556
  })),
4557
4557
  isDoubleShell: Y
4558
4558
  }),
@@ -4721,11 +4721,11 @@ let __tla = (async () => {
4721
4721
  onClick: async () => {
4722
4722
  const y = await Ke();
4723
4723
  if (!y) return;
4724
- const D = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), E = (W, q) => {
4724
+ const I = (/* @__PURE__ */ new Date()).toISOString().slice(0, 10), E = (W, q) => {
4725
4725
  const H = document.createElement("a");
4726
4726
  H.href = W, H.download = q, H.click();
4727
4727
  };
4728
- E(y.frontal_view_png, `measurements_front_${D}.png`), await new Promise((W) => setTimeout(W, 300)), E(y.side_view_png, `measurements_transverse_${D}.png`);
4728
+ E(y.frontal_view_png, `measurements_front_${I}.png`), await new Promise((W) => setTimeout(W, 300)), E(y.side_view_png, `measurements_transverse_${I}.png`);
4729
4729
  },
4730
4730
  style: {
4731
4731
  padding: "6px 14px",
@@ -4753,9 +4753,9 @@ let __tla = (async () => {
4753
4753
  style: {
4754
4754
  padding: "6px 14px",
4755
4755
  fontSize: 13,
4756
- fontWeight: De ? 600 : 400,
4757
- backgroundColor: De ? "#e65100" : "#fff",
4758
- color: De ? "#fff" : "#666",
4756
+ fontWeight: Ie ? 600 : 400,
4757
+ backgroundColor: Ie ? "#e65100" : "#fff",
4758
+ color: Ie ? "#fff" : "#666",
4759
4759
  border: "none",
4760
4760
  cursor: "pointer",
4761
4761
  fontFamily: "system-ui, sans-serif"
@@ -5020,7 +5020,7 @@ let __tla = (async () => {
5020
5020
  padding: "4px 10px",
5021
5021
  lineHeight: 1.6
5022
5022
  },
5023
- children: kt.map((y, D) => {
5023
+ children: kt.map((y, I) => {
5024
5024
  const E = y.includes("ERROR") || y.includes("failed"), W = y.includes("warning") || y.includes("WARN"), q = y.includes("PIPELINE:"), H = y.includes("STATE:");
5025
5025
  return i("div", {
5026
5026
  style: {
@@ -5028,7 +5028,7 @@ let __tla = (async () => {
5028
5028
  whiteSpace: "pre"
5029
5029
  },
5030
5030
  children: y
5031
- }, D);
5031
+ }, I);
5032
5032
  })
5033
5033
  })
5034
5034
  ]
@@ -5049,7 +5049,7 @@ let __tla = (async () => {
5049
5049
  t
5050
5050
  ]), null;
5051
5051
  }
5052
- Dn = function(t) {
5052
+ In = function(t) {
5053
5053
  const r = t === "AK" ? 2 : 1, n = [];
5054
5054
  for (let o = 2; o >= 1; o -= r) n.push(`${o}_above`);
5055
5055
  n.push("at_ref");
@@ -5069,7 +5069,7 @@ let __tla = (async () => {
5069
5069
  return n;
5070
5070
  };
5071
5071
  gt = function(t, r) {
5072
- const n = Dn(r), o = {};
5072
+ const n = In(r), o = {};
5073
5073
  for (let s = 0; s < Math.min(t.length, n.length); s++) {
5074
5074
  const l = t[s];
5075
5075
  l != null && !isNaN(l) && (o[n[s]] = l);
@@ -5078,7 +5078,7 @@ let __tla = (async () => {
5078
5078
  };
5079
5079
  vr = function(t, r) {
5080
5080
  if (!t) return;
5081
- const o = Dn(r).map((s) => {
5081
+ const o = In(r).map((s) => {
5082
5082
  const l = t[s];
5083
5083
  return l ?? void 0;
5084
5084
  });
@@ -5257,5 +5257,5 @@ export {
5257
5257
  __tla,
5258
5258
  gt as a,
5259
5259
  vr as c,
5260
- Dn as g
5260
+ In as g
5261
5261
  };