@wandelbots/wandelbots-js-react-components 5.4.0 → 5.4.1-pr.ci-biome-fixes.584.d0d213b

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.
Files changed (125) hide show
  1. package/dist/3d.cjs.js +1 -1
  2. package/dist/3d.d.ts +1 -1
  3. package/dist/3d.d.ts.map +1 -1
  4. package/dist/3d.es.js +1 -1
  5. package/dist/MotionGroupVisualizer-B3qmKrhO.cjs +2 -0
  6. package/dist/MotionGroupVisualizer-B3qmKrhO.cjs.map +1 -0
  7. package/dist/{MotionGroupVisualizer-1twp8wG6.js → MotionGroupVisualizer-kfAXxfmu.js} +440 -399
  8. package/dist/MotionGroupVisualizer-kfAXxfmu.js.map +1 -0
  9. package/dist/Setup.d.ts +1 -1
  10. package/dist/Setup.d.ts.map +1 -1
  11. package/dist/components/3d-viewport/SafetyZonesRenderer.d.ts +1 -1
  12. package/dist/components/3d-viewport/SafetyZonesRenderer.d.ts.map +1 -1
  13. package/dist/components/3d-viewport/collider/ColliderCollection.d.ts.map +1 -1
  14. package/dist/components/ConsoleFilter.d.ts +1 -1
  15. package/dist/components/ConsoleFilter.d.ts.map +1 -1
  16. package/dist/components/ProgramStateIndicator.d.ts.map +1 -1
  17. package/dist/components/RobotSetupReadinessIndicator.d.ts.map +1 -1
  18. package/dist/components/TabBar.d.ts.map +1 -1
  19. package/dist/components/Timer/TimerDefaultVariant.d.ts.map +1 -1
  20. package/dist/components/TransparentOverlay.d.ts +1 -1
  21. package/dist/components/TransparentOverlay.d.ts.map +1 -1
  22. package/dist/components/jogging/JoggingBlocked.d.ts +1 -1
  23. package/dist/components/jogging/JoggingBlocked.d.ts.map +1 -1
  24. package/dist/components/jogging/JoggingCartesianAxisControl.d.ts.map +1 -1
  25. package/dist/components/jogging/JoggingCartesianTab.d.ts.map +1 -1
  26. package/dist/components/jogging/JoggingJointLimitDetector.d.ts +1 -1
  27. package/dist/components/jogging/JoggingJointLimitDetector.d.ts.map +1 -1
  28. package/dist/components/jogging/JoggingJointTab.d.ts +2 -2
  29. package/dist/components/jogging/JoggingJointTab.d.ts.map +1 -1
  30. package/dist/components/jogging/JoggingJointValueControl.d.ts.map +1 -1
  31. package/dist/components/jogging/JoggingOptions.d.ts.map +1 -1
  32. package/dist/components/jogging/JoggingPanel.test.d.ts +2 -0
  33. package/dist/components/jogging/JoggingPanel.test.d.ts.map +1 -0
  34. package/dist/components/jogging/JoggingStore.d.ts +1 -1
  35. package/dist/components/jogging/JoggingStore.d.ts.map +1 -1
  36. package/dist/components/jogging/JoggingVelocitySlider.d.ts +1 -1
  37. package/dist/components/jogging/JoggingVelocitySlider.d.ts.map +1 -1
  38. package/dist/components/jogging/__fixtures__/motionStreamMockData.d.ts +11 -0
  39. package/dist/components/jogging/__fixtures__/motionStreamMockData.d.ts.map +1 -0
  40. package/dist/components/robots/DHLinearAxis.d.ts.map +1 -1
  41. package/dist/components/robots/DHRobot.d.ts.map +1 -1
  42. package/dist/components/robots/GenericRobot.d.ts +1 -1
  43. package/dist/components/robots/GenericRobot.d.ts.map +1 -1
  44. package/dist/components/robots/LinearAxisAnimator.d.ts +1 -1
  45. package/dist/components/robots/LinearAxisAnimator.d.ts.map +1 -1
  46. package/dist/components/robots/MotionGroupVisualizer.d.ts +2 -2
  47. package/dist/components/robots/MotionGroupVisualizer.d.ts.map +1 -1
  48. package/dist/components/robots/RobotAnimator.d.ts +1 -1
  49. package/dist/components/robots/RobotAnimator.d.ts.map +1 -1
  50. package/dist/components/robots/SupportedLinearAxis.d.ts.map +1 -1
  51. package/dist/components/robots/SupportedRobot.d.ts.map +1 -1
  52. package/dist/components/robots/robotModelLogic.d.ts.map +1 -1
  53. package/dist/components/safetyBar/IndicatorWithExplanation.d.ts.map +1 -1
  54. package/dist/components/utils/converters.d.ts +2 -2
  55. package/dist/components/utils/converters.d.ts.map +1 -1
  56. package/dist/components/utils/hooks.d.ts.map +1 -1
  57. package/dist/components/utils/interpolation.d.ts.map +1 -1
  58. package/dist/core.cjs.js +1 -1
  59. package/dist/core.es.js +2 -2
  60. package/dist/externalizeComponent.d.ts.map +1 -1
  61. package/dist/index.cjs.js +1 -1
  62. package/dist/index.es.js +3 -3
  63. package/dist/{interpolation-B3pbgXYX.cjs → interpolation-BVnfk3s2.cjs} +3 -3
  64. package/dist/interpolation-BVnfk3s2.cjs.map +1 -0
  65. package/dist/{interpolation-D4ATdkEg.js → interpolation-Bk-Oa5jf.js} +33 -34
  66. package/dist/interpolation-Bk-Oa5jf.js.map +1 -0
  67. package/dist/lib/JoggerConnection.d.ts +6 -4
  68. package/dist/lib/JoggerConnection.d.ts.map +1 -1
  69. package/dist/themes/createDarkTheme.d.ts.map +1 -1
  70. package/dist/{theming-BnAhDNbi.js → theming-CEHa4RBB.js} +1214 -1213
  71. package/dist/{theming-BnAhDNbi.js.map → theming-CEHa4RBB.js.map} +1 -1
  72. package/dist/{theming-BCLKcKOU.cjs → theming-vJeiAV5F.cjs} +27 -27
  73. package/dist/{theming-BCLKcKOU.cjs.map → theming-vJeiAV5F.cjs.map} +1 -1
  74. package/package.json +4 -3
  75. package/src/3d.ts +2 -2
  76. package/src/Setup.tsx +2 -6
  77. package/src/components/3d-viewport/PresetEnvironment.tsx +1 -0
  78. package/src/components/3d-viewport/SafetyZonesRenderer.tsx +43 -23
  79. package/src/components/3d-viewport/TrajectoryRenderer.tsx +1 -1
  80. package/src/components/3d-viewport/collider/ColliderCollection.tsx +3 -2
  81. package/src/components/ConsoleFilter.tsx +1 -1
  82. package/src/components/CycleTimer/DefaultVariant.tsx +4 -4
  83. package/src/components/LogViewer.tsx +2 -2
  84. package/src/components/ProgramStateIndicator.tsx +0 -1
  85. package/src/components/RobotSetupReadinessIndicator.tsx +0 -1
  86. package/src/components/TabBar.tsx +2 -1
  87. package/src/components/Timer/TimerDefaultVariant.tsx +6 -5
  88. package/src/components/Timer/useTimerLogic.ts +9 -9
  89. package/src/components/TransparentOverlay.tsx +1 -1
  90. package/src/components/jogging/JoggingBlocked.tsx +1 -1
  91. package/src/components/jogging/JoggingCartesianAxisControl.tsx +2 -6
  92. package/src/components/jogging/JoggingCartesianTab.tsx +1 -0
  93. package/src/components/jogging/JoggingJointLimitDetector.tsx +40 -42
  94. package/src/components/jogging/JoggingJointTab.tsx +8 -19
  95. package/src/components/jogging/JoggingJointValueControl.tsx +40 -29
  96. package/src/components/jogging/JoggingOptions.tsx +141 -138
  97. package/src/components/jogging/JoggingPanel.test.tsx +644 -0
  98. package/src/components/jogging/JoggingPanel.tsx +6 -12
  99. package/src/components/jogging/JoggingStore.ts +18 -13
  100. package/src/components/jogging/JoggingVelocitySlider.tsx +2 -10
  101. package/src/components/jogging/__fixtures__/motionStreamMockData.ts +136 -0
  102. package/src/components/robots/DHLinearAxis.tsx +62 -45
  103. package/src/components/robots/DHRobot.tsx +47 -45
  104. package/src/components/robots/GenericRobot.tsx +24 -24
  105. package/src/components/robots/LinearAxis.tsx +0 -1
  106. package/src/components/robots/LinearAxisAnimator.tsx +4 -1
  107. package/src/components/robots/MotionGroupVisualizer.tsx +53 -53
  108. package/src/components/robots/RobotAnimator.tsx +4 -1
  109. package/src/components/robots/SupportedLinearAxis.tsx +10 -3
  110. package/src/components/robots/SupportedRobot.tsx +10 -3
  111. package/src/components/robots/robotModelLogic.ts +22 -11
  112. package/src/components/safetyBar/IndicatorWithExplanation.tsx +9 -3
  113. package/src/components/utils/converters.ts +10 -7
  114. package/src/components/utils/errorHandling.ts +1 -1
  115. package/src/components/utils/hooks.tsx +1 -0
  116. package/src/components/utils/interpolation.test.ts +53 -38
  117. package/src/components/utils/interpolation.ts +1 -0
  118. package/src/externalizeComponent.tsx +3 -1
  119. package/src/lib/JoggerConnection.ts +39 -25
  120. package/src/themes/createDarkTheme.ts +2 -2
  121. package/dist/MotionGroupVisualizer-1twp8wG6.js.map +0 -1
  122. package/dist/MotionGroupVisualizer-Dq_KWGsa.cjs +0 -2
  123. package/dist/MotionGroupVisualizer-Dq_KWGsa.cjs.map +0 -1
  124. package/dist/interpolation-B3pbgXYX.cjs.map +0 -1
  125. package/dist/interpolation-D4ATdkEg.js.map +0 -1
@@ -1,11 +1,11 @@
1
- import { j as e, g as Me, v as _e, o as Te, N as ke, V as re, c as se, h as U, b as X, M as v, J as O } from "./interpolation-D4ATdkEg.js";
1
+ import { j as e, g as Me, v as _e, o as Te, N as ke, V as re, c as se, h as U, b as X, M as v, J as O } from "./interpolation-Bk-Oa5jf.js";
2
2
  import * as g from "three";
3
- import { Matrix4 as w, Vector3 as k, Quaternion as J } from "three";
4
- import { ConvexGeometry as oe, RoundedBoxGeometry as Fe } from "three-stdlib";
5
- import Ge, { useMemo as V, useRef as R, useEffect as M, useCallback as T, useState as F, Suspense as ie } from "react";
6
- import { useThree as ae, useFrame as le, Canvas as K } from "@react-three/fiber";
7
- import { Environment as Le, Lightformer as L, Line as B, useGLTF as Se, Bounds as Z } from "@react-three/drei";
8
- import { useTheme as Pe, Card as Ae, Box as b, Typography as Q, Divider as z, Button as ee } from "@mui/material";
3
+ import { Matrix4 as b, Vector3 as k, Quaternion as J } from "three";
4
+ import { ConvexGeometry as oe, RoundedBoxGeometry as Le } from "three-stdlib";
5
+ import Ge, { useMemo as V, useRef as R, useEffect as M, useCallback as T, useState as L, Suspense as ie } from "react";
6
+ import { Environment as Se, Lightformer as S, Line as B, useGLTF as Fe, Bounds as K } from "@react-three/drei";
7
+ import { useTheme as Ae, Card as Pe, Box as w, Typography as Z, Divider as Q, Button as z } from "@mui/material";
8
+ import { useThree as ae, useFrame as le, Canvas as ee } from "@react-three/fiber";
9
9
  import { observer as Ie } from "mobx-react-lite";
10
10
  import { useTranslation as De } from "react-i18next";
11
11
  import { ErrorBoundary as ce } from "react-error-boundary";
@@ -48,12 +48,12 @@ function Oe(t) {
48
48
  }
49
49
  function Ve({
50
50
  name: t,
51
- collider: s,
51
+ collider: r,
52
52
  children: n
53
53
  }) {
54
- var u, c;
55
- const a = ((u = s.pose) == null ? void 0 : u.position) ?? [0, 0, 0], i = ((c = s.pose) == null ? void 0 : c.orientation) ?? [0, 0, 0];
56
- return s.margin && console.warn(`${t} margin is not supported`), /* @__PURE__ */ e.jsx(
54
+ var d, u;
55
+ const a = ((d = r.pose) == null ? void 0 : d.position) ?? [0, 0, 0], o = ((u = r.pose) == null ? void 0 : u.orientation) ?? [0, 0, 0];
56
+ return r.margin && console.warn(`${t} margin is not supported`), /* @__PURE__ */ e.jsx(
57
57
  "mesh",
58
58
  {
59
59
  name: t,
@@ -62,48 +62,48 @@ function Ve({
62
62
  a[1],
63
63
  a[2]
64
64
  ).divideScalar(1e3),
65
- rotation: new g.Euler(i[0], i[1], i[2], "XYZ"),
66
- geometry: Oe(s.shape),
65
+ rotation: new g.Euler(o[0], o[1], o[2], "XYZ"),
66
+ geometry: Oe(r.shape),
67
67
  children: n
68
68
  }
69
69
  );
70
70
  }
71
71
  function Ue({
72
72
  name: t,
73
- colliders: s,
73
+ colliders: r,
74
74
  meshChildrenProvider: n,
75
75
  ...a
76
76
  }) {
77
- return /* @__PURE__ */ e.jsx("group", { name: t, ...a, children: Object.entries(s).map(([i, u]) => /* @__PURE__ */ e.jsx(
77
+ return /* @__PURE__ */ e.jsx("group", { name: t, ...a, children: Object.entries(r).map(([o, d]) => /* @__PURE__ */ e.jsx(
78
78
  Ve,
79
79
  {
80
- name: i,
81
- collider: u,
82
- children: n(i, u)
80
+ name: o,
81
+ collider: d,
82
+ children: n(o, d)
83
83
  },
84
- i
84
+ o
85
85
  )) });
86
86
  }
87
87
  function it({
88
88
  scene: t,
89
- meshChildrenProvider: s
89
+ meshChildrenProvider: r
90
90
  }) {
91
91
  const n = t.colliders;
92
92
  return /* @__PURE__ */ e.jsx("group", { children: n && /* @__PURE__ */ e.jsx(
93
93
  Ue,
94
94
  {
95
- meshChildrenProvider: s,
95
+ meshChildrenProvider: r,
96
96
  colliders: n
97
97
  }
98
98
  ) });
99
99
  }
100
100
  function te() {
101
- return /* @__PURE__ */ e.jsx(Le, { children: /* @__PURE__ */ e.jsx(Ce, {}) });
101
+ return /* @__PURE__ */ e.jsx(Se, { children: /* @__PURE__ */ e.jsx(Ce, {}) });
102
102
  }
103
103
  function Ce({ positions: t = [2, 0, 2, 0, 2, 0, 2, 0] }) {
104
104
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
105
105
  /* @__PURE__ */ e.jsx(
106
- L,
106
+ S,
107
107
  {
108
108
  intensity: 5,
109
109
  "rotation-x": Math.PI / 2,
@@ -111,19 +111,19 @@ function Ce({ positions: t = [2, 0, 2, 0, 2, 0, 2, 0] }) {
111
111
  scale: [10, 10, 1]
112
112
  }
113
113
  ),
114
- /* @__PURE__ */ e.jsx("group", { rotation: [0, 0.5, 0], children: /* @__PURE__ */ e.jsx("group", { children: t.map((s, n) => /* @__PURE__ */ e.jsx(
115
- L,
114
+ /* @__PURE__ */ e.jsx("group", { rotation: [0, 0.5, 0], children: /* @__PURE__ */ e.jsx("group", { children: t.map((r, n) => /* @__PURE__ */ e.jsx(
115
+ S,
116
116
  {
117
117
  form: "circle",
118
118
  intensity: 5,
119
119
  rotation: [Math.PI / 2, 0, 0],
120
- position: [s, 4, n * 4],
120
+ position: [r, 4, n * 4],
121
121
  scale: [3, 1, 1]
122
122
  },
123
123
  n
124
124
  )) }) }),
125
125
  /* @__PURE__ */ e.jsx(
126
- L,
126
+ S,
127
127
  {
128
128
  intensity: 40,
129
129
  "rotation-y": Math.PI / 2,
@@ -132,7 +132,7 @@ function Ce({ positions: t = [2, 0, 2, 0, 2, 0, 2, 0] }) {
132
132
  }
133
133
  ),
134
134
  /* @__PURE__ */ e.jsx(
135
- L,
135
+ S,
136
136
  {
137
137
  intensity: 20,
138
138
  "rotation-y": -Math.PI,
@@ -141,7 +141,7 @@ function Ce({ positions: t = [2, 0, 2, 0, 2, 0, 2, 0] }) {
141
141
  }
142
142
  ),
143
143
  /* @__PURE__ */ e.jsx(
144
- L,
144
+ S,
145
145
  {
146
146
  "rotation-y": Math.PI / 2,
147
147
  position: [-5, -1, -1],
@@ -150,7 +150,7 @@ function Ce({ positions: t = [2, 0, 2, 0, 2, 0, 2, 0] }) {
150
150
  }
151
151
  ),
152
152
  /* @__PURE__ */ e.jsx(
153
- L,
153
+ S,
154
154
  {
155
155
  "rotation-y": -Math.PI / 2,
156
156
  position: [10, 1, 0],
@@ -159,7 +159,7 @@ function Ce({ positions: t = [2, 0, 2, 0, 2, 0, 2, 0] }) {
159
159
  }
160
160
  ),
161
161
  /* @__PURE__ */ e.jsx(
162
- L,
162
+ S,
163
163
  {
164
164
  form: "ring",
165
165
  color: "white",
@@ -173,7 +173,7 @@ function Ce({ positions: t = [2, 0, 2, 0, 2, 0, 2, 0] }) {
173
173
  }
174
174
  function at({
175
175
  safetyZones: t,
176
- dhParameters: s,
176
+ dhParameters: r,
177
177
  ...n
178
178
  }) {
179
179
  const a = {
@@ -184,34 +184,42 @@ function at({
184
184
  depthWrite: !1,
185
185
  transparent: !0,
186
186
  polygonOffset: !0
187
- }, i = Me(s ?? []), u = (f, r) => {
188
- var d, x;
189
- if (!((d = r == null ? void 0 : r.pose) != null && d.position) || !((x = r == null ? void 0 : r.pose) != null && x.orientation))
187
+ }, o = Me(r ?? []), d = (h, l) => {
188
+ var f, x;
189
+ if (!((f = l == null ? void 0 : l.pose) != null && f.position) || !((x = l == null ? void 0 : l.pose) != null && x.orientation))
190
190
  return null;
191
- const h = new g.Vector3(r.pose.position[0] / 1e3, r.pose.position[1] / 1e3, r.pose.position[2] / 1e3), m = new g.Vector3(r.pose.orientation[0], r.pose.orientation[1], r.pose.orientation[2]);
192
- let o;
193
- const l = r.shape.shape_type === "plane" ? { ...a, side: g.DoubleSide } : { ...a, side: g.FrontSide };
194
- switch (r.shape.shape_type) {
191
+ const i = new g.Vector3(
192
+ l.pose.position[0] / 1e3,
193
+ l.pose.position[1] / 1e3,
194
+ l.pose.position[2] / 1e3
195
+ ), m = new g.Vector3(
196
+ l.pose.orientation[0],
197
+ l.pose.orientation[1],
198
+ l.pose.orientation[2]
199
+ );
200
+ let s;
201
+ const c = l.shape.shape_type === "plane" ? { ...a, side: g.DoubleSide } : { ...a, side: g.FrontSide };
202
+ switch (l.shape.shape_type) {
195
203
  /**
196
204
  * Plane shape, uses DH parameters to calculate the size of the plane (reach distance of a robot)
197
205
  */
198
206
  case "plane":
199
- o = /* @__PURE__ */ e.jsx("planeGeometry", { args: [i, i] });
207
+ s = /* @__PURE__ */ e.jsx("planeGeometry", { args: [o, o] });
200
208
  break;
201
209
  /**
202
210
  * Sphere shape
203
211
  */
204
212
  case "sphere": {
205
- const p = (r == null ? void 0 : r.shape).radius / 1e3;
206
- o = /* @__PURE__ */ e.jsx("sphereGeometry", { args: [p] });
213
+ const p = (l == null ? void 0 : l.shape).radius / 1e3;
214
+ s = /* @__PURE__ */ e.jsx("sphereGeometry", { args: [p] });
207
215
  break;
208
216
  }
209
217
  /**
210
218
  * Capsule shape
211
219
  */
212
220
  case "capsule": {
213
- const p = (r == null ? void 0 : r.shape).radius / 1e3, j = (r == null ? void 0 : r.shape).cylinder_height / 1e3;
214
- o = /* @__PURE__ */ e.jsx("capsuleGeometry", { args: [p, j] });
221
+ const p = (l == null ? void 0 : l.shape).radius / 1e3, j = (l == null ? void 0 : l.shape).cylinder_height / 1e3;
222
+ s = /* @__PURE__ */ e.jsx("capsuleGeometry", { args: [p, j] });
215
223
  break;
216
224
  }
217
225
  /**
@@ -219,7 +227,7 @@ function at({
219
227
  * renderer to be able to visualize the convex hull.
220
228
  */
221
229
  case "convex_hull": {
222
- const p = (r == null ? void 0 : r.shape).vertices.map(
230
+ const p = (l == null ? void 0 : l.shape).vertices.map(
223
231
  (y) => new g.Vector3(y[0] / 1e3, y[1] / 1e3, y[2] / 1e3)
224
232
  ), j = _e(p);
225
233
  if (j.isCoplanar && j.normal) {
@@ -230,7 +238,13 @@ function at({
230
238
  p.push(G);
231
239
  }
232
240
  try {
233
- o = /* @__PURE__ */ e.jsx("primitive", { object: new oe(p), attach: "geometry" });
241
+ s = /* @__PURE__ */ e.jsx(
242
+ "primitive",
243
+ {
244
+ object: new oe(p),
245
+ attach: "geometry"
246
+ }
247
+ );
234
248
  } catch (y) {
235
249
  return console.log("Error creating ConvexGeometry:", y), null;
236
250
  }
@@ -244,48 +258,53 @@ function at({
244
258
  * Basically a rounded box with a rectangular cross-section.
245
259
  */
246
260
  case "rectangular_capsule": {
247
- const p = r.shape, j = p.radius / 1e3, y = p.sphere_center_distance_x / 1e3, G = p.sphere_center_distance_y / 1e3, S = j * 2;
248
- o = /* @__PURE__ */ e.jsx(
261
+ const p = l.shape, j = p.radius / 1e3, y = p.sphere_center_distance_x / 1e3, G = p.sphere_center_distance_y / 1e3, F = j * 2;
262
+ s = /* @__PURE__ */ e.jsx(
249
263
  "primitive",
250
264
  {
251
- object: new Fe(y, G, S, 2, j),
265
+ object: new Le(y, G, F, 2, j),
252
266
  attach: "geometry"
253
267
  }
254
268
  );
255
269
  break;
256
270
  }
257
271
  default:
258
- console.warn("Unsupported safety zone shape type:", r.shape.shape_type), o = null;
272
+ console.warn(
273
+ "Unsupported safety zone shape type:",
274
+ l.shape.shape_type
275
+ ), s = null;
259
276
  }
260
277
  return /* @__PURE__ */ e.jsxs(
261
278
  "mesh",
262
279
  {
263
- renderOrder: f,
264
- position: h,
280
+ renderOrder: h,
281
+ position: i,
265
282
  quaternion: Te(m),
266
283
  children: [
267
- o,
268
- /* @__PURE__ */ e.jsx("meshStandardMaterial", { ...l, polygonOffsetFactor: -f })
284
+ s,
285
+ /* @__PURE__ */ e.jsx("meshStandardMaterial", { ...c, polygonOffsetFactor: -h })
269
286
  ]
270
287
  },
271
- `safety-zone-${r.shape.shape_type}-${f}`
288
+ `safety-zone-${l.shape.shape_type}-${h}`
272
289
  );
273
- }, c = V(() => Object.values(t ?? {}).map((f, r) => u(r, f)), [t, i]);
274
- return /* @__PURE__ */ e.jsx("group", { ...n, children: c });
290
+ }, u = V(() => Object.values(t ?? {}).map(
291
+ (h, l) => d(l, h)
292
+ ), [t, o]);
293
+ return /* @__PURE__ */ e.jsx("group", { ...n, children: u });
275
294
  }
276
295
  function lt({
277
296
  trajectory: t,
278
- ...s
297
+ ...r
279
298
  }) {
280
299
  const n = (t == null ? void 0 : t.map((a) => {
281
300
  if (a.position && a.position.length >= 3) {
282
- const [i, u, c] = a.position;
283
- if (isFinite(i) && isFinite(u) && isFinite(c))
284
- return new g.Vector3(i / 1e3, c / 1e3, -u / 1e3);
301
+ const [o, d, u] = a.position;
302
+ if (Number.isFinite(o) && Number.isFinite(d) && Number.isFinite(u))
303
+ return new g.Vector3(o / 1e3, u / 1e3, -d / 1e3);
285
304
  }
286
305
  return null;
287
306
  }).filter((a) => a !== null)) || [];
288
- return /* @__PURE__ */ e.jsx("group", { ...s, children: n.length > 0 && /* @__PURE__ */ e.jsx(
307
+ return /* @__PURE__ */ e.jsx("group", { ...r, children: n.length > 0 && /* @__PURE__ */ e.jsx(
289
308
  B,
290
309
  {
291
310
  points: n,
@@ -297,30 +316,32 @@ function lt({
297
316
  ) });
298
317
  }
299
318
  const E = /* @__PURE__ */ new Map();
300
- async function C(t, s) {
319
+ async function C(t, r) {
301
320
  if (E.has(t))
302
321
  return E.get(t);
303
322
  const n = (async () => {
304
- var c;
305
- const a = s || "", i = new ke({ instanceUrl: a }), u = i.api.motionGroupModels;
306
- (c = u.axios) != null && c.interceptors && u.axios.interceptors.request.use((f) => {
307
- var r;
308
- return (r = f.url) != null && r.includes("/glb") && (f.responseType = "blob"), f;
323
+ var u;
324
+ const a = r || "", o = new ke({ instanceUrl: a }), d = o.api.motionGroupModels;
325
+ (u = d.axios) != null && u.interceptors && d.axios.interceptors.request.use((h) => {
326
+ var l;
327
+ return (l = h.url) != null && l.includes("/glb") && (h.responseType = "blob"), h;
309
328
  });
310
329
  try {
311
- const f = await i.api.motionGroupModels.getMotionGroupGlbModel(t);
312
- return URL.createObjectURL(f);
313
- } catch (f) {
314
- throw console.error("Failed to fetch model:", f), f;
330
+ const h = await o.api.motionGroupModels.getMotionGroupGlbModel(
331
+ t
332
+ );
333
+ return URL.createObjectURL(h);
334
+ } catch (h) {
335
+ throw console.error("Failed to fetch model:", h), h;
315
336
  }
316
337
  })();
317
338
  return E.set(t, n), n;
318
339
  }
319
340
  function ue(t) {
320
- function s(n) {
321
- return n.children.length === 0 ? [n] : [n, ...n.children.flatMap((a) => s(a))];
341
+ function r(n) {
342
+ return n.children.length === 0 ? [n] : [n, ...n.children.flatMap((a) => r(a))];
322
343
  }
323
- return s(t).filter((n) => pe(n));
344
+ return r(t).filter((n) => pe(n));
324
345
  }
325
346
  function de(t) {
326
347
  return t.name.endsWith("_FLG");
@@ -328,139 +349,139 @@ function de(t) {
328
349
  function pe(t) {
329
350
  return /_J[0-9]+$/.test(t.name);
330
351
  }
331
- function Ee(t, s) {
352
+ function Ee(t, r) {
332
353
  let n;
333
- function a(i) {
334
- if (de(i)) {
354
+ function a(o) {
355
+ if (de(o)) {
335
356
  if (n)
336
357
  throw Error(
337
- `Found multiple flange groups in robot model ${s}; first ${n.name} then ${i.name}. Only one _FLG group is allowed.`
358
+ `Found multiple flange groups in robot model ${r}; first ${n.name} then ${o.name}. Only one _FLG group is allowed.`
338
359
  );
339
- n = i;
360
+ n = o;
340
361
  }
341
- pe(i), i.children.map(a);
362
+ pe(o), o.children.map(a);
342
363
  }
343
364
  if (a(t.scene), !n)
344
365
  throw Error(
345
- `No flange group found in robot model ${s}. Flange must be identified with a name ending in _FLG.`
366
+ `No flange group found in robot model ${r}. Flange must be identified with a name ending in _FLG.`
346
367
  );
347
368
  return { gltf: t };
348
369
  }
349
370
  function fe({
350
371
  rapidlyChangingMotionState: t,
351
- dhParameters: s,
372
+ dhParameters: r,
352
373
  onRotationChanged: n,
353
374
  children: a
354
375
  }) {
355
- const i = R([]), u = R([]), c = R(null), { invalidate: f } = ae();
376
+ const o = R([]), d = R([]), u = R(null), { invalidate: h } = ae();
356
377
  M(() => {
357
- const o = t.joint_position.filter(
358
- (l) => l !== void 0
378
+ const s = t.joint_position.filter(
379
+ (c) => c !== void 0
359
380
  );
360
- return c.current = new re(o, {
381
+ return u.current = new re(s, {
361
382
  tension: 120,
362
383
  // Controls spring stiffness - higher values create faster, more responsive motion
363
384
  friction: 20,
364
385
  // Controls damping - higher values reduce oscillation and create smoother settling
365
386
  threshold: 1e-3
366
387
  }), () => {
367
- var l;
368
- (l = c.current) == null || l.destroy();
388
+ var c;
389
+ (c = u.current) == null || c.destroy();
369
390
  };
370
- }, []), le((o, l) => {
371
- if (c.current) {
372
- const d = c.current.update(l);
373
- h(), d || f();
391
+ }, []), le((s, c) => {
392
+ if (u.current) {
393
+ const f = u.current.update(c);
394
+ i(), f || h();
374
395
  }
375
396
  });
376
- function r(o) {
377
- o && (u.current = ue(o), h(), f());
397
+ function l(s) {
398
+ s && (d.current = ue(s), i(), h());
378
399
  }
379
- function h() {
380
- var l;
381
- const o = ((l = c.current) == null ? void 0 : l.getCurrentValues()) || [];
400
+ function i() {
401
+ var c;
402
+ const s = ((c = u.current) == null ? void 0 : c.getCurrentValues()) || [];
382
403
  if (n)
383
- n(u.current, o);
404
+ n(d.current, s);
384
405
  else
385
- for (const [d, x] of u.current.entries()) {
386
- const p = s[d], j = p.theta || 0, y = p.reverse_rotation_direction ? -1 : 1;
387
- x.rotation.y = y * (o[d] || 0) + j;
406
+ for (const [f, x] of d.current.entries()) {
407
+ const p = r[f], j = p.theta || 0, y = p.reverse_rotation_direction ? -1 : 1;
408
+ x.rotation.y = y * (s[f] || 0) + j;
388
409
  }
389
410
  }
390
411
  const m = T(() => {
391
- const o = t.joint_position.filter(
392
- (l) => l !== void 0
412
+ const s = t.joint_position.filter(
413
+ (c) => c !== void 0
393
414
  );
394
415
  requestAnimationFrame(() => {
395
- var l;
396
- i.current = o, (l = c.current) == null || l.setTarget(o);
416
+ var c;
417
+ o.current = s, (c = u.current) == null || c.setTarget(s);
397
418
  });
398
419
  }, [t]);
399
420
  return M(() => {
400
421
  m();
401
422
  }, [t, m]), se(() => {
402
423
  m();
403
- }), /* @__PURE__ */ e.jsx("group", { ref: r, children: a });
424
+ }), /* @__PURE__ */ e.jsx("group", { ref: l, children: a });
404
425
  }
405
426
  const Je = "line", Be = "mesh";
406
427
  function We({
407
428
  rapidlyChangingMotionState: t,
408
- dhParameters: s,
429
+ dhParameters: r,
409
430
  ...n
410
431
  }) {
411
- const a = new w(), i = R([]), u = R([]);
432
+ const a = new b(), o = R([]), d = R([]);
412
433
  Ge.useEffect(() => {
413
- i.current = new Array(s.length).fill(null), u.current = new Array(s.length).fill(null);
414
- }, [s.length]);
415
- function c(h, m) {
416
- const o = new k(), l = new J(), d = new k();
417
- a.decompose(o, l, d);
418
- const x = o.clone(), p = new w().makeRotationY(
419
- h.theta + m * (h.reverse_rotation_direction ? -1 : 1)
420
- ).multiply(new w().makeTranslation(0, h.d / 1e3, 0)).multiply(new w().makeTranslation(h.a / 1e3, 0, 0)).multiply(new w().makeRotationX(h.alpha));
421
- return a.multiply(p), a.decompose(o, l, d), { a: x, b: o };
434
+ o.current = new Array(r.length).fill(null), d.current = new Array(r.length).fill(null);
435
+ }, [r.length]);
436
+ function u(i, m) {
437
+ const s = new k(), c = new J(), f = new k();
438
+ a.decompose(s, c, f);
439
+ const x = s.clone(), p = new b().makeRotationY(
440
+ i.theta + m * (i.reverse_rotation_direction ? -1 : 1)
441
+ ).multiply(new b().makeTranslation(0, i.d / 1e3, 0)).multiply(new b().makeTranslation(i.a / 1e3, 0, 0)).multiply(new b().makeRotationX(i.alpha));
442
+ return a.multiply(p), a.decompose(s, c, f), { a: x, b: s };
422
443
  }
423
- function f(h, m, o, l) {
424
- if (!s)
444
+ function h(i, m, s, c) {
445
+ if (!r)
425
446
  return;
426
- const d = s[h];
427
- if (!d)
447
+ const f = r[i];
448
+ if (!f)
428
449
  return;
429
- const { a: x, b: p } = c(d, l);
430
- m.geometry.setPositions([x.toArray(), p.toArray()].flat()), o.position.set(p.x, p.y, p.z);
450
+ const { a: x, b: p } = u(f, c);
451
+ m.geometry.setPositions([x.toArray(), p.toArray()].flat()), s.position.set(p.x, p.y, p.z);
431
452
  }
432
- function r(h, m) {
453
+ function l(i, m) {
433
454
  a.identity();
434
- for (let o = 0; o < Math.min(h.length, m.length); o++) {
435
- const l = i.current[o], d = u.current[o];
436
- l && d && f(o, l, d, m[o]);
455
+ for (let s = 0; s < Math.min(i.length, m.length); s++) {
456
+ const c = o.current[s], f = d.current[s];
457
+ c && f && h(s, c, f, m[s]);
437
458
  }
438
459
  }
439
- return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
460
+ return /* @__PURE__ */ e.jsx(
440
461
  fe,
441
462
  {
442
463
  rapidlyChangingMotionState: t,
443
- dhParameters: s,
444
- onRotationChanged: r,
464
+ dhParameters: r,
465
+ onRotationChanged: l,
445
466
  children: /* @__PURE__ */ e.jsxs("group", { ...n, name: "Scene", children: [
446
467
  /* @__PURE__ */ e.jsxs("mesh", { children: [
447
468
  /* @__PURE__ */ e.jsx("sphereGeometry", { args: [0.01, 32, 32] }),
448
469
  /* @__PURE__ */ e.jsx("meshStandardMaterial", { color: "black", depthTest: !0 })
449
470
  ] }),
450
- s.map((h, m) => {
451
- const { a: o, b: l } = c(
452
- h,
471
+ r == null ? void 0 : r.map((i, m) => {
472
+ const { a: s, b: c } = u(
473
+ i,
453
474
  t.joint_position[m] ?? 0
454
- ), d = `dhrobot_J0${m}`;
455
- return /* @__PURE__ */ e.jsxs("group", { name: d, children: [
475
+ ), f = `dhrobot_J0${m}`;
476
+ return /* @__PURE__ */ e.jsxs("group", { name: f, children: [
456
477
  /* @__PURE__ */ e.jsx(
457
478
  B,
458
479
  {
459
480
  ref: (x) => {
460
- i.current[m] = x;
481
+ o.current[m] = x;
461
482
  },
462
483
  name: Je,
463
- points: [o, l],
484
+ points: [s, c],
464
485
  color: "white",
465
486
  lineWidth: 5
466
487
  }
@@ -469,22 +490,22 @@ function We({
469
490
  "mesh",
470
491
  {
471
492
  ref: (x) => {
472
- u.current[m] = x;
493
+ d.current[m] = x;
473
494
  },
474
495
  name: Be,
475
- position: l,
496
+ position: c,
476
497
  children: [
477
498
  /* @__PURE__ */ e.jsx("sphereGeometry", { args: [0.01, 32, 32] }),
478
499
  /* @__PURE__ */ e.jsx("meshStandardMaterial", { color: "black", depthTest: !0 })
479
500
  ]
480
501
  },
481
- "mesh_" + m
502
+ `mesh_${m}`
482
503
  )
483
- ] }, d);
504
+ ] }, f);
484
505
  })
485
506
  ] })
486
507
  }
487
- ) });
508
+ );
488
509
  }
489
510
  const $e = console.warn;
490
511
  function he() {
@@ -492,94 +513,95 @@ function he() {
492
513
  console.warn = (t) => {
493
514
  t !== "Cannot call the manual advancement of rafz whilst frameLoop is not set as demand" && $e(t);
494
515
  };
495
- }, []), /* @__PURE__ */ e.jsx(e.Fragment, {});
516
+ }, []), null;
496
517
  }
497
- function He(t) {
518
+ function Ne(t) {
498
519
  return t.type === "Mesh";
499
520
  }
500
- function Ne({
521
+ function He({
501
522
  url: t,
502
- flangeRef: s,
523
+ flangeRef: r,
503
524
  postModelRender: n,
504
525
  ...a
505
526
  }) {
506
- const i = Se(t);
507
- let u;
508
- try {
509
- u = Ee(i, "robot.glb").gltf;
510
- } catch (r) {
511
- throw r;
512
- }
513
- const c = T(
514
- (r) => {
515
- r && n && n();
527
+ const o = Fe(t), u = Ee(o, "robot.glb").gltf, h = T(
528
+ (i) => {
529
+ i && n && n();
516
530
  },
517
531
  [n]
518
532
  );
519
- function f(r) {
533
+ function l(i) {
520
534
  try {
521
- return He(r) ? r.geometry ? /* @__PURE__ */ e.jsx(
535
+ return Ne(i) ? i.geometry ? /* @__PURE__ */ e.jsx(
522
536
  "mesh",
523
537
  {
524
- name: r.name,
525
- geometry: r.geometry,
526
- material: r.material,
527
- position: r.position,
528
- rotation: r.rotation
538
+ name: i.name,
539
+ geometry: i.geometry,
540
+ material: i.material,
541
+ position: i.position,
542
+ rotation: i.rotation
543
+ },
544
+ i.uuid
545
+ ) : /* @__PURE__ */ e.jsx(
546
+ "group",
547
+ {
548
+ name: i.name,
549
+ position: i.position,
550
+ rotation: i.rotation
529
551
  },
530
- r.uuid
531
- ) : /* @__PURE__ */ e.jsx("group", { name: r.name, position: r.position, rotation: r.rotation }, r.uuid) : /* @__PURE__ */ e.jsx(
552
+ i.uuid
553
+ ) : /* @__PURE__ */ e.jsx(
532
554
  "group",
533
555
  {
534
- name: r.name,
535
- position: r.position,
536
- rotation: r.rotation,
537
- ref: de(r) ? s : void 0,
538
- children: r.children.map(f)
556
+ name: i.name,
557
+ position: i.position,
558
+ rotation: i.rotation,
559
+ ref: de(i) ? r : void 0,
560
+ children: i.children.map(l)
539
561
  },
540
- r.uuid
562
+ i.uuid
541
563
  );
542
- } catch (h) {
543
- return console.warn("Error rendering node", r.name, h), null;
564
+ } catch (m) {
565
+ return console.warn("Error rendering node", i.name, m), null;
544
566
  }
545
567
  }
546
- return /* @__PURE__ */ e.jsx("group", { ...a, dispose: null, ref: c, children: f(u.scene) });
568
+ return /* @__PURE__ */ e.jsx("group", { ...a, dispose: null, ref: h, children: l(u.scene) });
547
569
  }
548
570
  function me({
549
571
  modelURL: t,
550
- flangeRef: s,
572
+ flangeRef: r,
551
573
  postModelRender: n,
552
574
  ...a
553
575
  }) {
554
- const [i, u] = F(null);
576
+ const [o, d] = L(null);
555
577
  return M(() => {
556
578
  (async () => {
557
579
  try {
558
580
  if (typeof t == "string")
559
- u(t);
581
+ d(t);
560
582
  else {
561
- const f = await t;
562
- u(f);
583
+ const h = await t;
584
+ d(h);
563
585
  }
564
- } catch (f) {
565
- console.error("Failed to resolve model URL:", f);
586
+ } catch (h) {
587
+ console.error("Failed to resolve model URL:", h);
566
588
  }
567
589
  })();
568
- }, [t]), i ? /* @__PURE__ */ e.jsx(
569
- Ne,
590
+ }, [t]), o ? /* @__PURE__ */ e.jsx(
591
+ He,
570
592
  {
571
- url: i,
572
- flangeRef: s,
593
+ url: o,
594
+ flangeRef: r,
573
595
  postModelRender: n,
574
596
  ...a
575
597
  }
576
598
  ) : null;
577
599
  }
578
- const xe = (t, s) => {
600
+ const xe = (t, r) => {
579
601
  t.userData.isGhost || (t.traverse((n) => {
580
602
  if (n instanceof g.Mesh) {
581
603
  n.material instanceof g.Material && (n.material.colorWrite = !1);
582
- const a = n.clone(), i = n.clone();
604
+ const a = n.clone(), o = n.clone();
583
605
  a.material = new g.MeshStandardMaterial({
584
606
  depthTest: !0,
585
607
  depthWrite: !0,
@@ -587,8 +609,8 @@ const xe = (t, s) => {
587
609
  polygonOffset: !0,
588
610
  polygonOffsetFactor: -1,
589
611
  side: g.DoubleSide
590
- }), a.userData.isGhost = !0, i.material = new g.MeshStandardMaterial({
591
- color: s,
612
+ }), a.userData.isGhost = !0, o.material = new g.MeshStandardMaterial({
613
+ color: r,
592
614
  opacity: 0.3,
593
615
  depthTest: !0,
594
616
  depthWrite: !1,
@@ -596,53 +618,53 @@ const xe = (t, s) => {
596
618
  polygonOffset: !0,
597
619
  polygonOffsetFactor: -2,
598
620
  side: g.DoubleSide
599
- }), i.userData.isGhost = !0, n.parent && (n.parent.add(a), n.parent.add(i));
621
+ }), o.userData.isGhost = !0, n.parent && (n.parent.add(a), n.parent.add(o));
600
622
  }
601
623
  }), t.userData.isGhost = !0);
602
624
  }, ye = (t) => {
603
625
  if (!t.userData.isGhost) return;
604
- const s = [];
626
+ const r = [];
605
627
  t.traverse((n) => {
606
628
  var a;
607
- n instanceof g.Mesh && ((a = n.userData) != null && a.isGhost ? s.push(n) : n.material instanceof g.Material && (n.material.colorWrite = !0));
608
- }), s.forEach((n) => {
629
+ n instanceof g.Mesh && ((a = n.userData) != null && a.isGhost ? r.push(n) : n.material instanceof g.Material && (n.material.colorWrite = !0));
630
+ }), r.forEach((n) => {
609
631
  n.parent && n.parent.remove(n);
610
632
  }), t.userData.isGhost = !1;
611
633
  }, ge = U(
612
634
  ({
613
635
  rapidlyChangingMotionState: t,
614
- modelFromController: s,
636
+ modelFromController: r,
615
637
  dhParameters: n,
616
638
  getModel: a = C,
617
- flangeRef: i,
618
- postModelRender: u,
619
- transparentColor: c,
620
- instanceUrl: f,
621
- ...r
639
+ flangeRef: o,
640
+ postModelRender: d,
641
+ transparentColor: u,
642
+ instanceUrl: h,
643
+ ...l
622
644
  }) => {
623
- const [h, m] = F(null), o = T((d) => {
624
- m(d);
645
+ const [i, m] = L(null), s = T((f) => {
646
+ m(f);
625
647
  }, []);
626
648
  M(() => {
627
- h && (c ? xe(h, c) : ye(h));
628
- }, [h, c]);
629
- const l = /* @__PURE__ */ e.jsx(
649
+ i && (u ? xe(i, u) : ye(i));
650
+ }, [i, u]);
651
+ const c = /* @__PURE__ */ e.jsx(
630
652
  We,
631
653
  {
632
654
  rapidlyChangingMotionState: t,
633
655
  dhParameters: n,
634
- ...r
656
+ ...l
635
657
  }
636
658
  );
637
659
  return /* @__PURE__ */ e.jsxs(
638
660
  ce,
639
661
  {
640
- fallback: l,
641
- onError: (d) => {
642
- console.warn(d);
662
+ fallback: c,
663
+ onError: (f) => {
664
+ console.warn(f);
643
665
  },
644
666
  children: [
645
- /* @__PURE__ */ e.jsx(ie, { fallback: l, children: /* @__PURE__ */ e.jsx("group", { ref: o, children: /* @__PURE__ */ e.jsx(
667
+ /* @__PURE__ */ e.jsx(ie, { fallback: c, children: /* @__PURE__ */ e.jsx("group", { ref: s, children: /* @__PURE__ */ e.jsx(
646
668
  fe,
647
669
  {
648
670
  rapidlyChangingMotionState: t,
@@ -651,16 +673,20 @@ const xe = (t, s) => {
651
673
  me,
652
674
  {
653
675
  modelURL: (() => {
654
- const d = a(s, f);
655
- if (!d) {
656
- const x = new Blob([], { type: "model/gltf-binary" }), p = new File([x], `${s}.glb`, { type: "model/gltf-binary" });
676
+ const f = a(r, h);
677
+ if (!f) {
678
+ const x = new Blob([], { type: "model/gltf-binary" }), p = new File(
679
+ [x],
680
+ `${r}.glb`,
681
+ { type: "model/gltf-binary" }
682
+ );
657
683
  return Promise.resolve(URL.createObjectURL(p));
658
684
  }
659
- return d;
685
+ return f;
660
686
  })(),
661
- postModelRender: u,
662
- flangeRef: i,
663
- ...r
687
+ postModelRender: d,
688
+ flangeRef: o,
689
+ ...l
664
690
  }
665
691
  )
666
692
  }
@@ -673,11 +699,11 @@ const xe = (t, s) => {
673
699
  );
674
700
  function qe({
675
701
  connectedMotionGroup: t,
676
- getModel: s = C,
702
+ getModel: r = C,
677
703
  flangeRef: n,
678
704
  transparentColor: a,
679
- postModelRender: i,
680
- ...u
705
+ postModelRender: o,
706
+ ...d
681
707
  }) {
682
708
  return t.dhParameters ? /* @__PURE__ */ e.jsx(
683
709
  ge,
@@ -685,11 +711,11 @@ function qe({
685
711
  rapidlyChangingMotionState: t.rapidlyChangingMotionState,
686
712
  modelFromController: t.modelFromController || "",
687
713
  dhParameters: t.dhParameters,
688
- getModel: s,
714
+ getModel: r,
689
715
  flangeRef: n,
690
716
  transparentColor: a,
691
- postModelRender: i,
692
- ...u
717
+ postModelRender: o,
718
+ ...d
693
719
  }
694
720
  ) : null;
695
721
  }
@@ -697,19 +723,19 @@ const ct = U(
697
723
  Ie(
698
724
  ({
699
725
  robotName: t,
700
- programState: s,
726
+ programState: r,
701
727
  safetyState: n,
702
728
  operationMode: a,
703
- driveToHomeEnabled: i = !1,
704
- onDriveToHomePress: u,
705
- onDriveToHomeRelease: c,
706
- connectedMotionGroup: f,
707
- robotComponent: r = qe,
708
- customContentComponent: h,
729
+ driveToHomeEnabled: o = !1,
730
+ onDriveToHomePress: d,
731
+ onDriveToHomeRelease: u,
732
+ connectedMotionGroup: h,
733
+ robotComponent: l = qe,
734
+ customContentComponent: i,
709
735
  className: m
710
736
  }) => {
711
- var H;
712
- const o = Pe(), { t: l } = De(), [d, x] = F(!1), p = R(null), j = R(null), [y, G] = F(!1), [S, Re] = F({ width: 400, height: 600 }), [Xe, ve] = F(0);
737
+ var N;
738
+ const s = Ae(), { t: c } = De(), [f, x] = L(!1), p = R(null), j = R(null), [y, G] = L(!1), [F, Re] = L({ width: 400, height: 600 }), [Xe, ve] = L(0);
713
739
  M(() => {
714
740
  const D = () => {
715
741
  if (j.current) {
@@ -718,22 +744,22 @@ const ct = U(
718
744
  }
719
745
  };
720
746
  D();
721
- const N = new ResizeObserver(D);
722
- return j.current && N.observe(j.current), () => {
723
- N.disconnect();
747
+ const H = new ResizeObserver(D);
748
+ return j.current && H.observe(j.current), () => {
749
+ H.disconnect();
724
750
  };
725
751
  }, []);
726
752
  const W = T(() => {
727
753
  ve((D) => D + 1);
728
- }, []), P = T(() => {
729
- !i || !u || (x(!0), u());
730
- }, [i, u]), A = T(() => {
731
- !i || !c || (x(!1), c());
732
- }, [i, c]), $ = T(() => {
733
- d && c && (x(!1), c());
734
- }, [d, c]), _ = y ? S.width < 350 : S.height < 200, I = y ? S.height < 310 : S.height < 450;
754
+ }, []), A = T(() => {
755
+ !o || !d || (x(!0), d());
756
+ }, [o, d]), P = T(() => {
757
+ !o || !u || (x(!1), u());
758
+ }, [o, u]), $ = T(() => {
759
+ f && u && (x(!1), u());
760
+ }, [f, u]), _ = y ? F.width < 350 : F.height < 200, I = y ? F.height < 310 : F.height < 450;
735
761
  return /* @__PURE__ */ e.jsx(
736
- Ae,
762
+ Pe,
737
763
  {
738
764
  ref: j,
739
765
  className: m,
@@ -747,16 +773,16 @@ const ct = U(
747
773
  minWidth: { xs: 180, sm: 220, md: 250 },
748
774
  minHeight: y ? { xs: 200, sm: 240, md: 260 } : { xs: 150, sm: 180, md: 220 },
749
775
  // Allow progressive hiding in portrait mode
750
- border: `1px solid ${o.palette.divider}`,
776
+ border: `1px solid ${s.palette.divider}`,
751
777
  borderRadius: "18px",
752
778
  boxShadow: "none",
753
- backgroundColor: ((H = o.palette.backgroundPaperElevation) == null ? void 0 : H[8]) || "#2A2A3F",
779
+ backgroundColor: ((N = s.palette.backgroundPaperElevation) == null ? void 0 : N[8]) || "#2A2A3F",
754
780
  backgroundImage: "none"
755
781
  // Override any gradient from elevation
756
782
  },
757
783
  children: y ? /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
758
784
  /* @__PURE__ */ e.jsx(
759
- b,
785
+ w,
760
786
  {
761
787
  sx: {
762
788
  flex: "0 0 50%",
@@ -772,7 +798,7 @@ const ct = U(
772
798
  display: _ ? "none" : "block"
773
799
  },
774
800
  children: !_ && /* @__PURE__ */ e.jsxs(
775
- K,
801
+ ee,
776
802
  {
777
803
  orthographic: !0,
778
804
  camera: {
@@ -782,7 +808,7 @@ const ct = U(
782
808
  shadows: !0,
783
809
  frameloop: "demand",
784
810
  style: {
785
- borderRadius: o.shape.borderRadius,
811
+ borderRadius: s.shape.borderRadius,
786
812
  width: "100%",
787
813
  height: "100%",
788
814
  background: "transparent",
@@ -794,10 +820,10 @@ const ct = U(
794
820
  gl: { alpha: !0, antialias: !0 },
795
821
  children: [
796
822
  /* @__PURE__ */ e.jsx(te, {}),
797
- /* @__PURE__ */ e.jsx(Z, { fit: !0, observe: !0, margin: 1, maxDuration: 1, children: /* @__PURE__ */ e.jsx(
798
- r,
823
+ /* @__PURE__ */ e.jsx(K, { fit: !0, observe: !0, margin: 1, maxDuration: 1, children: /* @__PURE__ */ e.jsx(
824
+ l,
799
825
  {
800
- connectedMotionGroup: f,
826
+ connectedMotionGroup: h,
801
827
  postModelRender: W
802
828
  }
803
829
  ) })
@@ -807,7 +833,7 @@ const ct = U(
807
833
  }
808
834
  ),
809
835
  /* @__PURE__ */ e.jsxs(
810
- b,
836
+ w,
811
837
  {
812
838
  sx: {
813
839
  flex: "1",
@@ -818,7 +844,7 @@ const ct = U(
818
844
  },
819
845
  children: [
820
846
  /* @__PURE__ */ e.jsxs(
821
- b,
847
+ w,
822
848
  {
823
849
  sx: {
824
850
  p: { xs: 1.5, sm: 2, md: 3 },
@@ -826,11 +852,11 @@ const ct = U(
826
852
  textAlign: "left"
827
853
  },
828
854
  children: [
829
- /* @__PURE__ */ e.jsx(Q, { variant: "h6", component: "h2", sx: { mb: 1 }, children: t }),
855
+ /* @__PURE__ */ e.jsx(Z, { variant: "h6", component: "h2", sx: { mb: 1 }, children: t }),
830
856
  /* @__PURE__ */ e.jsx(
831
857
  X,
832
858
  {
833
- programState: s,
859
+ programState: r,
834
860
  safetyState: n,
835
861
  operationMode: a
836
862
  }
@@ -839,7 +865,7 @@ const ct = U(
839
865
  }
840
866
  ),
841
867
  /* @__PURE__ */ e.jsxs(
842
- b,
868
+ w,
843
869
  {
844
870
  sx: {
845
871
  p: { xs: 1.5, sm: 2, md: 3 },
@@ -850,28 +876,28 @@ const ct = U(
850
876
  justifyContent: "space-between"
851
877
  },
852
878
  children: [
853
- !I && h && /* @__PURE__ */ e.jsxs(b, { children: [
854
- /* @__PURE__ */ e.jsx(h, {}),
879
+ !I && i && /* @__PURE__ */ e.jsxs(w, { children: [
880
+ /* @__PURE__ */ e.jsx(i, {}),
855
881
  /* @__PURE__ */ e.jsx(
856
- z,
882
+ Q,
857
883
  {
858
884
  sx: {
859
885
  mt: 1,
860
886
  mb: 0,
861
- borderColor: o.palette.divider,
887
+ borderColor: s.palette.divider,
862
888
  opacity: 0.5
863
889
  }
864
890
  }
865
891
  )
866
892
  ] }),
867
893
  /* @__PURE__ */ e.jsx(
868
- b,
894
+ w,
869
895
  {
870
896
  sx: {
871
- mt: !I && h ? "auto" : 0
897
+ mt: !I && i ? "auto" : 0
872
898
  },
873
899
  children: /* @__PURE__ */ e.jsx(
874
- b,
900
+ w,
875
901
  {
876
902
  sx: {
877
903
  display: "flex",
@@ -880,24 +906,24 @@ const ct = U(
880
906
  mb: { xs: 0.5, sm: 0.75, md: 1 }
881
907
  },
882
908
  children: /* @__PURE__ */ e.jsx(
883
- ee,
909
+ z,
884
910
  {
885
911
  ref: p,
886
912
  variant: "contained",
887
913
  color: "secondary",
888
914
  size: "small",
889
- disabled: !i,
890
- onMouseDown: P,
891
- onMouseUp: A,
915
+ disabled: !o,
916
+ onMouseDown: A,
917
+ onMouseUp: P,
892
918
  onMouseLeave: $,
893
- onTouchStart: P,
894
- onTouchEnd: A,
919
+ onTouchStart: A,
920
+ onTouchEnd: P,
895
921
  sx: {
896
922
  textTransform: "none",
897
923
  px: 1.5,
898
924
  py: 0.5
899
925
  },
900
- children: l("RobotCard.DriveToHome.bt")
926
+ children: c("RobotCard.DriveToHome.bt")
901
927
  }
902
928
  )
903
929
  }
@@ -911,7 +937,7 @@ const ct = U(
911
937
  }
912
938
  )
913
939
  ] }) : /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(
914
- b,
940
+ w,
915
941
  {
916
942
  sx: {
917
943
  p: 3,
@@ -920,19 +946,19 @@ const ct = U(
920
946
  flexDirection: "column"
921
947
  },
922
948
  children: [
923
- /* @__PURE__ */ e.jsxs(b, { children: [
924
- /* @__PURE__ */ e.jsx(Q, { variant: "h6", component: "h2", sx: { mb: 1 }, children: t }),
949
+ /* @__PURE__ */ e.jsxs(w, { children: [
950
+ /* @__PURE__ */ e.jsx(Z, { variant: "h6", component: "h2", sx: { mb: 1 }, children: t }),
925
951
  /* @__PURE__ */ e.jsx(
926
952
  X,
927
953
  {
928
- programState: s,
954
+ programState: r,
929
955
  safetyState: n,
930
956
  operationMode: a
931
957
  }
932
958
  )
933
959
  ] }),
934
960
  /* @__PURE__ */ e.jsx(
935
- b,
961
+ w,
936
962
  {
937
963
  sx: {
938
964
  flex: _ ? 0 : 1,
@@ -944,7 +970,7 @@ const ct = U(
944
970
  display: _ ? "none" : "block"
945
971
  },
946
972
  children: !_ && /* @__PURE__ */ e.jsxs(
947
- K,
973
+ ee,
948
974
  {
949
975
  orthographic: !0,
950
976
  camera: {
@@ -954,7 +980,7 @@ const ct = U(
954
980
  shadows: !0,
955
981
  frameloop: "demand",
956
982
  style: {
957
- borderRadius: o.shape.borderRadius,
983
+ borderRadius: s.shape.borderRadius,
958
984
  width: "100%",
959
985
  height: "100%",
960
986
  background: "transparent",
@@ -964,10 +990,10 @@ const ct = U(
964
990
  gl: { alpha: !0, antialias: !0 },
965
991
  children: [
966
992
  /* @__PURE__ */ e.jsx(te, {}),
967
- /* @__PURE__ */ e.jsx(Z, { fit: !0, clip: !0, observe: !0, margin: 1, maxDuration: 1, children: /* @__PURE__ */ e.jsx(
968
- r,
993
+ /* @__PURE__ */ e.jsx(K, { fit: !0, clip: !0, observe: !0, margin: 1, maxDuration: 1, children: /* @__PURE__ */ e.jsx(
994
+ l,
969
995
  {
970
- connectedMotionGroup: f,
996
+ connectedMotionGroup: h,
971
997
  postModelRender: W
972
998
  }
973
999
  ) })
@@ -976,49 +1002,49 @@ const ct = U(
976
1002
  )
977
1003
  }
978
1004
  ),
979
- /* @__PURE__ */ e.jsxs(b, { children: [
980
- !I && h && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
981
- /* @__PURE__ */ e.jsx(h, {}),
1005
+ /* @__PURE__ */ e.jsxs(w, { children: [
1006
+ !I && i && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1007
+ /* @__PURE__ */ e.jsx(i, {}),
982
1008
  /* @__PURE__ */ e.jsx(
983
- z,
1009
+ Q,
984
1010
  {
985
1011
  sx: {
986
1012
  mt: 1,
987
1013
  mb: 0,
988
- borderColor: o.palette.divider,
1014
+ borderColor: s.palette.divider,
989
1015
  opacity: 0.5
990
1016
  }
991
1017
  }
992
1018
  )
993
1019
  ] }),
994
1020
  /* @__PURE__ */ e.jsx(
995
- b,
1021
+ w,
996
1022
  {
997
1023
  sx: {
998
1024
  display: "flex",
999
1025
  justifyContent: "flex-start",
1000
- mt: !I && h ? { xs: 1, sm: 2, md: 5 } : { xs: 0.5, sm: 1, md: 2 },
1026
+ mt: !I && i ? { xs: 1, sm: 2, md: 5 } : { xs: 0.5, sm: 1, md: 2 },
1001
1027
  mb: { xs: 0.5, sm: 0.75, md: 1 }
1002
1028
  },
1003
1029
  children: /* @__PURE__ */ e.jsx(
1004
- ee,
1030
+ z,
1005
1031
  {
1006
1032
  ref: p,
1007
1033
  variant: "contained",
1008
1034
  color: "secondary",
1009
1035
  size: "small",
1010
- disabled: !i,
1011
- onMouseDown: P,
1012
- onMouseUp: A,
1036
+ disabled: !o,
1037
+ onMouseDown: A,
1038
+ onMouseUp: P,
1013
1039
  onMouseLeave: $,
1014
- onTouchStart: P,
1015
- onTouchEnd: A,
1040
+ onTouchStart: A,
1041
+ onTouchEnd: P,
1016
1042
  sx: {
1017
1043
  textTransform: "none",
1018
1044
  px: 1.5,
1019
1045
  py: 0.5
1020
1046
  },
1021
- children: l("RobotCard.DriveToHome.bt")
1047
+ children: c("RobotCard.DriveToHome.bt")
1022
1048
  }
1023
1049
  )
1024
1050
  }
@@ -1034,107 +1060,120 @@ const ct = U(
1034
1060
  ), ut = Array(6).fill(2 * Math.PI);
1035
1061
  function je({
1036
1062
  rapidlyChangingMotionState: t,
1037
- dhParameters: s,
1063
+ dhParameters: r,
1038
1064
  onTranslationChanged: n,
1039
1065
  children: a
1040
1066
  }) {
1041
- const i = R([]), u = R([]), c = R(null), { invalidate: f } = ae();
1067
+ const o = R([]), d = R([]), u = R(null), { invalidate: h } = ae();
1042
1068
  M(() => {
1043
- const o = t.joint_position.filter(
1044
- (l) => l !== void 0
1069
+ const s = t.joint_position.filter(
1070
+ (c) => c !== void 0
1045
1071
  );
1046
- return c.current = new re(o, {
1072
+ return u.current = new re(s, {
1047
1073
  tension: 120,
1048
1074
  // Controls spring stiffness - higher values create faster, more responsive motion
1049
1075
  friction: 20,
1050
1076
  // Controls damping - higher values reduce oscillation and create smoother settling
1051
1077
  threshold: 1e-3
1052
1078
  }), () => {
1053
- var l;
1054
- (l = c.current) == null || l.destroy();
1079
+ var c;
1080
+ (c = u.current) == null || c.destroy();
1055
1081
  };
1056
- }, []), le((o, l) => {
1057
- if (c.current) {
1058
- const d = c.current.update(l);
1059
- h(), d || f();
1082
+ }, []), le((s, c) => {
1083
+ if (u.current) {
1084
+ const f = u.current.update(c);
1085
+ i(), f || h();
1060
1086
  }
1061
1087
  });
1062
- function r(o) {
1063
- o && (u.current = ue(o), h(), f());
1088
+ function l(s) {
1089
+ s && (d.current = ue(s), i(), h());
1064
1090
  }
1065
- function h() {
1066
- var l;
1067
- const o = ((l = c.current) == null ? void 0 : l.getCurrentValues()) || [];
1091
+ function i() {
1092
+ var c;
1093
+ const s = ((c = u.current) == null ? void 0 : c.getCurrentValues()) || [];
1068
1094
  if (n)
1069
- n(u.current, o);
1095
+ n(d.current, s);
1070
1096
  else
1071
- for (const [d, x] of u.current.entries()) {
1072
- const j = s[d].reverse_rotation_direction ? -1 : 1;
1073
- x.position.y = j * (o[d] || 0) / 1e3;
1097
+ for (const [f, x] of d.current.entries()) {
1098
+ const j = r[f].reverse_rotation_direction ? -1 : 1;
1099
+ x.position.y = j * (s[f] || 0) / 1e3;
1074
1100
  }
1075
1101
  }
1076
1102
  const m = T(() => {
1077
- const o = t.joint_position.filter(
1078
- (l) => l !== void 0
1103
+ const s = t.joint_position.filter(
1104
+ (c) => c !== void 0
1079
1105
  );
1080
1106
  requestAnimationFrame(() => {
1081
- var l;
1082
- i.current = o, (l = c.current) == null || l.setTarget(o);
1107
+ var c;
1108
+ o.current = s, (c = u.current) == null || c.setTarget(s);
1083
1109
  });
1084
1110
  }, [t]);
1085
1111
  return M(() => {
1086
1112
  m();
1087
1113
  }, [t, m]), se(() => {
1088
1114
  m();
1089
- }), /* @__PURE__ */ e.jsx("group", { ref: r, children: a });
1115
+ }), /* @__PURE__ */ e.jsx("group", { ref: l, children: a });
1090
1116
  }
1091
- function we({
1117
+ function be({
1092
1118
  rapidlyChangingMotionState: t,
1093
- dhParameters: s,
1119
+ dhParameters: r,
1094
1120
  ...n
1095
1121
  }) {
1096
- const a = new w(), i = R(null), u = R(null);
1097
- function c(h) {
1098
- const m = new w();
1099
- for (let x = 0; x < s.length; x++) {
1100
- const p = s[x], j = h[x] ?? 0, y = new w().makeRotationY(p.theta).multiply(
1101
- new w().makeTranslation(
1122
+ const a = new b(), o = R(null), d = R(null);
1123
+ function u(i) {
1124
+ const m = new b();
1125
+ for (let x = 0; x < r.length; x++) {
1126
+ const p = r[x], j = i[x] ?? 0, y = new b().makeRotationY(p.theta).multiply(
1127
+ new b().makeTranslation(
1102
1128
  p.a / 1e3,
1103
1129
  (p.d + j * (p.reverse_rotation_direction ? -1 : 1)) / 1e3,
1104
1130
  0
1105
1131
  )
1106
- ).multiply(new w().makeRotationX(p.alpha));
1132
+ ).multiply(new b().makeRotationX(p.alpha));
1107
1133
  m.multiply(y);
1108
1134
  }
1109
- const o = new k(), l = new J(), d = new k();
1110
- return m.decompose(o, l, d), o;
1135
+ const s = new k(), c = new J(), f = new k();
1136
+ return m.decompose(s, c, f), s;
1111
1137
  }
1112
- const f = c(t.joint_position);
1113
- function r(h, m) {
1138
+ const h = u(
1139
+ t.joint_position
1140
+ );
1141
+ function l(i, m) {
1114
1142
  a.identity();
1115
- let o = new k();
1116
- for (let p = 0; p < s.length; p++) {
1117
- const j = m[p] ?? 0, y = s[p], G = new w().makeRotationY(y.theta).multiply(
1118
- new w().makeTranslation(
1143
+ let s = new k();
1144
+ for (let p = 0; p < r.length; p++) {
1145
+ const j = m[p] ?? 0, y = r[p], G = new b().makeRotationY(y.theta).multiply(
1146
+ new b().makeTranslation(
1119
1147
  y.a / 1e3,
1120
1148
  (y.d + j * (y.reverse_rotation_direction ? -1 : 1)) / 1e3,
1121
1149
  0
1122
1150
  )
1123
- ).multiply(new w().makeRotationX(y.alpha));
1151
+ ).multiply(new b().makeRotationX(y.alpha));
1124
1152
  a.multiply(G);
1125
1153
  }
1126
- const l = new k(), d = new J(), x = new k();
1127
- if (a.decompose(l, d, x), o = l, i.current && i.current.position.set(o.x, o.y, o.z), u.current) {
1128
- const p = u.current.geometry;
1129
- p && p.setPositions && p.setPositions([0, 0, 0, o.x, o.y, o.z]);
1154
+ const c = new k(), f = new J(), x = new k();
1155
+ if (a.decompose(c, f, x), s = c, o.current && o.current.position.set(
1156
+ s.x,
1157
+ s.y,
1158
+ s.z
1159
+ ), d.current) {
1160
+ const p = d.current.geometry;
1161
+ p != null && p.setPositions && p.setPositions([
1162
+ 0,
1163
+ 0,
1164
+ 0,
1165
+ s.x,
1166
+ s.y,
1167
+ s.z
1168
+ ]);
1130
1169
  }
1131
1170
  }
1132
- return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
1171
+ return /* @__PURE__ */ e.jsx(
1133
1172
  je,
1134
1173
  {
1135
1174
  rapidlyChangingMotionState: t,
1136
- dhParameters: s,
1137
- onTranslationChanged: r,
1175
+ dhParameters: r,
1176
+ onTranslationChanged: l,
1138
1177
  children: /* @__PURE__ */ e.jsxs("group", { ...n, name: "Scene", children: [
1139
1178
  /* @__PURE__ */ e.jsxs("mesh", { name: "Base", position: [0, 0, 0], children: [
1140
1179
  /* @__PURE__ */ e.jsx("sphereGeometry", { args: [0.02, 32, 32] }),
@@ -1143,55 +1182,55 @@ function we({
1143
1182
  /* @__PURE__ */ e.jsx(
1144
1183
  B,
1145
1184
  {
1146
- ref: u,
1147
- points: [new k(0, 0, 0), f],
1185
+ ref: d,
1186
+ points: [new k(0, 0, 0), h],
1148
1187
  color: "White",
1149
1188
  lineWidth: 5
1150
1189
  }
1151
1190
  ),
1152
- /* @__PURE__ */ e.jsxs("mesh", { ref: i, name: "TCP", position: f, children: [
1191
+ /* @__PURE__ */ e.jsxs("mesh", { ref: o, name: "TCP", position: h, children: [
1153
1192
  /* @__PURE__ */ e.jsx("sphereGeometry", { args: [0.025, 32, 32] }),
1154
1193
  /* @__PURE__ */ e.jsx("meshStandardMaterial", { color: "red", depthTest: !0 })
1155
1194
  ] })
1156
1195
  ] })
1157
1196
  }
1158
- ) });
1197
+ );
1159
1198
  }
1160
- const be = U(
1199
+ const we = U(
1161
1200
  ({
1162
1201
  rapidlyChangingMotionState: t,
1163
- modelFromController: s,
1202
+ modelFromController: r,
1164
1203
  dhParameters: n,
1165
1204
  getModel: a = C,
1166
- flangeRef: i,
1167
- postModelRender: u,
1168
- transparentColor: c,
1169
- instanceUrl: f,
1170
- ...r
1205
+ flangeRef: o,
1206
+ postModelRender: d,
1207
+ transparentColor: u,
1208
+ instanceUrl: h,
1209
+ ...l
1171
1210
  }) => {
1172
- const [h, m] = F(null), o = T((d) => {
1173
- m(d);
1211
+ const [i, m] = L(null), s = T((f) => {
1212
+ m(f);
1174
1213
  }, []);
1175
1214
  M(() => {
1176
- h && (c ? xe(h, c) : ye(h));
1177
- }, [h, c]);
1178
- const l = /* @__PURE__ */ e.jsx(
1179
- we,
1215
+ i && (u ? xe(i, u) : ye(i));
1216
+ }, [i, u]);
1217
+ const c = /* @__PURE__ */ e.jsx(
1218
+ be,
1180
1219
  {
1181
1220
  rapidlyChangingMotionState: t,
1182
1221
  dhParameters: n,
1183
- ...r
1222
+ ...l
1184
1223
  }
1185
1224
  );
1186
1225
  return /* @__PURE__ */ e.jsxs(
1187
1226
  ce,
1188
1227
  {
1189
- fallback: l,
1190
- onError: (d) => {
1191
- console.warn(d);
1228
+ fallback: c,
1229
+ onError: (f) => {
1230
+ console.warn(f);
1192
1231
  },
1193
1232
  children: [
1194
- /* @__PURE__ */ e.jsx(ie, { fallback: l, children: /* @__PURE__ */ e.jsx("group", { ref: o, children: /* @__PURE__ */ e.jsx(
1233
+ /* @__PURE__ */ e.jsx(ie, { fallback: c, children: /* @__PURE__ */ e.jsx("group", { ref: s, children: /* @__PURE__ */ e.jsx(
1195
1234
  je,
1196
1235
  {
1197
1236
  rapidlyChangingMotionState: t,
@@ -1200,16 +1239,20 @@ const be = U(
1200
1239
  me,
1201
1240
  {
1202
1241
  modelURL: (() => {
1203
- const d = a(s, f);
1204
- if (!d) {
1205
- const x = new Blob([], { type: "model/gltf-binary" }), p = new File([x], `${s}.glb`, { type: "model/gltf-binary" });
1242
+ const f = a(r, h);
1243
+ if (!f) {
1244
+ const x = new Blob([], { type: "model/gltf-binary" }), p = new File(
1245
+ [x],
1246
+ `${r}.glb`,
1247
+ { type: "model/gltf-binary" }
1248
+ );
1206
1249
  return Promise.resolve(URL.createObjectURL(p));
1207
1250
  }
1208
- return d;
1251
+ return f;
1209
1252
  })(),
1210
- postModelRender: u,
1211
- flangeRef: i,
1212
- ...r
1253
+ postModelRender: d,
1254
+ flangeRef: o,
1255
+ ...l
1213
1256
  }
1214
1257
  )
1215
1258
  }
@@ -1222,33 +1265,33 @@ const be = U(
1222
1265
  );
1223
1266
  function dt({
1224
1267
  connectedMotionGroup: t,
1225
- getModel: s = C,
1268
+ getModel: r = C,
1226
1269
  flangeRef: n,
1227
1270
  transparentColor: a,
1228
- postModelRender: i,
1229
- ...u
1271
+ postModelRender: o,
1272
+ ...d
1230
1273
  }) {
1231
1274
  if (!t.dhParameters)
1232
1275
  return null;
1233
- const c = t.modelFromController || "";
1234
- return c && s(c) ? /* @__PURE__ */ e.jsx(
1235
- be,
1276
+ const u = t.modelFromController || "";
1277
+ return u && r(u) ? /* @__PURE__ */ e.jsx(
1278
+ we,
1236
1279
  {
1237
1280
  rapidlyChangingMotionState: t.rapidlyChangingMotionState,
1238
- modelFromController: c,
1281
+ modelFromController: u,
1239
1282
  dhParameters: t.dhParameters,
1240
- getModel: s,
1283
+ getModel: r,
1241
1284
  flangeRef: n,
1242
1285
  transparentColor: a,
1243
- postModelRender: i,
1244
- ...u
1286
+ postModelRender: o,
1287
+ ...d
1245
1288
  }
1246
1289
  ) : /* @__PURE__ */ e.jsx(
1247
- we,
1290
+ be,
1248
1291
  {
1249
1292
  rapidlyChangingMotionState: t.rapidlyChangingMotionState,
1250
1293
  dhParameters: t.dhParameters,
1251
- ...u
1294
+ ...d
1252
1295
  }
1253
1296
  );
1254
1297
  }
@@ -1276,8 +1319,8 @@ const ne = {
1276
1319
  ]
1277
1320
  };
1278
1321
  function Ye(t) {
1279
- const [s] = t.split("_");
1280
- switch (s) {
1322
+ const [r] = t.split("_");
1323
+ switch (r) {
1281
1324
  case "ABB":
1282
1325
  return v.Abb;
1283
1326
  case "FANUC":
@@ -1292,21 +1335,19 @@ function Ye(t) {
1292
1335
  return null;
1293
1336
  }
1294
1337
  }
1295
- function pt(t, s) {
1338
+ function pt(t, r) {
1296
1339
  const n = Ye(t);
1297
- return n && n in ne ? ne[n] : s || null;
1340
+ return n && n in ne ? ne[n] : r || null;
1298
1341
  }
1299
1342
  const ft = U((t) => {
1300
- const {
1301
- inverseSolver: s,
1302
- dhParameters: n,
1303
- ...a
1304
- } = t, [i, u] = F(O.RevoluteJoint);
1343
+ const { inverseSolver: r, dhParameters: n, ...a } = t, [o, d] = L(
1344
+ O.RevoluteJoint
1345
+ );
1305
1346
  M(() => {
1306
- n.length && u(n[0].type ?? O.RevoluteJoint);
1347
+ n.length && d(n[0].type ?? O.RevoluteJoint);
1307
1348
  }, [n]);
1308
- const c = V(() => s === null && i === O.RevoluteJoint, [s, i]), f = V(() => s === null && i === O.PrismaticJoint, [s, i]);
1309
- return V(() => !!s, [s]) || c ? /* @__PURE__ */ e.jsx(ge, { dhParameters: n, ...a }) : f ? /* @__PURE__ */ e.jsx(be, { dhParameters: n, ...a }) : /* @__PURE__ */ e.jsx(e.Fragment, {});
1349
+ const u = V(() => r === null && o === O.RevoluteJoint, [r, o]), h = V(() => r === null && o === O.PrismaticJoint, [r, o]);
1350
+ return V(() => !!r, [r]) || u ? /* @__PURE__ */ e.jsx(ge, { dhParameters: n, ...a }) : h ? /* @__PURE__ */ e.jsx(we, { dhParameters: n, ...a }) : null;
1310
1351
  });
1311
1352
  export {
1312
1353
  it as C,
@@ -1318,11 +1359,11 @@ export {
1318
1359
  lt as T,
1319
1360
  ut as a,
1320
1361
  qe as b,
1321
- be as c,
1362
+ we as c,
1322
1363
  C as d,
1323
1364
  Ye as e,
1324
1365
  ge as f,
1325
1366
  pt as g,
1326
1367
  ft as h
1327
1368
  };
1328
- //# sourceMappingURL=MotionGroupVisualizer-1twp8wG6.js.map
1369
+ //# sourceMappingURL=MotionGroupVisualizer-kfAXxfmu.js.map