@wandelbots/wandelbots-js-react-components 5.7.0 → 5.7.1-pr.feat-adorned-textfield.618.3cf7c50

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