@wandelbots/wandelbots-js-react-components 5.5.3 → 5.5.4-pr.fix-RB-3595-jogging-store-blocked.603.e3b085c

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,4 +1,4 @@
1
- import { jsx as a, jsxs as S, Fragment as et } from "react/jsx-runtime";
1
+ import { jsx as s, jsxs as v, Fragment as et } from "react/jsx-runtime";
2
2
  import { alpha as Mt, useTheme as F, styled as gt, createTheme as Jt } from "@mui/material/styles";
3
3
  import Xt from "@mui/material/AppBar";
4
4
  import Bt from "@mui/material/Backdrop";
@@ -7,9 +7,9 @@ import H from "@mui/material/IconButton";
7
7
  import Kt from "@mui/material/Menu";
8
8
  import q from "@mui/material/MenuItem";
9
9
  import te from "@mui/material/Toolbar";
10
- import E from "@mui/material/Typography";
10
+ import j from "@mui/material/Typography";
11
11
  import { observer as J, useLocalObservable as Ft } from "mobx-react-lite";
12
- import { useState as B, useRef as D, useCallback as P, useEffect as A, useMemo as rt, useId as ee } from "react";
12
+ import { useState as B, useRef as D, useCallback as _, useEffect as A, useMemo as rt, useId as ee } from "react";
13
13
  import { e as $ } from "./externalizeComponent-D6S3WLFc.js";
14
14
  import oe from "@mui/material/SvgIcon";
15
15
  import U from "@mui/material/Fade";
@@ -23,22 +23,22 @@ import Y from "@mui/material/Divider";
23
23
  import { useGridApiRef as se, DataGrid as le, Toolbar as ce, FilterPanelTrigger as de, ToolbarButton as st, QuickFilter as ue, QuickFilterTrigger as ge, QuickFilterControl as pe, QuickFilterClear as me } from "@mui/x-data-grid";
24
24
  import he from "@mui/icons-material/OpenWith";
25
25
  import fe from "@mui/icons-material/Share";
26
- import _ from "@mui/material/Stack";
26
+ import P from "@mui/material/Stack";
27
27
  import $t from "@mui/material/Tab";
28
28
  import zt from "@mui/material/Tabs";
29
29
  import { JointTypeEnum as G, NovaClient as be, poseToWandelscriptString as xe } from "@wandelbots/nova-js/v2";
30
30
  import { lowerFirst as ye, countBy as Se, isString as ve } from "lodash-es";
31
- import { runInAction as L, makeAutoObservable as mt, when as lt, autorun as Ce, makeObservable as we, action as kt, observable as Te } from "mobx";
31
+ import { runInAction as L, makeAutoObservable as mt, when as lt, autorun as we, makeObservable as Ce, action as kt, observable as Te } from "mobx";
32
32
  import { radiansToDegrees as Vt, tryParseJson as W, XYZ_TO_VECTOR as tt, degreesToRadians as Me } from "@wandelbots/nova-js";
33
33
  import { Vector3 as ct } from "three/src/math/Vector3.js";
34
34
  import Ie from "@mui/material/CircularProgress";
35
35
  import { capitalize as ke } from "@mui/material/utils";
36
36
  import { m as Re } from "./SafetyBar-C8whliAf.js";
37
- import Ee from "@mui/material/Alert";
38
- import je from "@mui/material/AlertTitle";
37
+ import je from "@mui/material/Alert";
38
+ import Ee from "@mui/material/AlertTitle";
39
39
  import Z from "@mui/material/Button";
40
40
  import Rt from "@mui/material/ToggleButton";
41
- import { c as Pe, d as _e, F as Oe, a as De, b as Ae, f as Je, e as Be } from "./robot-Cy9ST5-m.js";
41
+ import { c as _e, d as Pe, F as Oe, a as De, b as Ae, f as Je, e as Be } from "./robot-Cy9ST5-m.js";
42
42
  import Fe from "lodash-es/isEqual.js";
43
43
  import Le from "@mui/material/FormControl";
44
44
  import $e from "@mui/material/InputLabel";
@@ -66,9 +66,9 @@ import ro from "@mui/material/Chip";
66
66
  import ao from "@mui/material/Fab";
67
67
  import so from "@mui/material/Badge";
68
68
  import { Gauge as lo } from "@mui/x-charts";
69
- import * as Et from "three";
70
- import { Vector3 as jt } from "three";
71
- const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /* @__PURE__ */ a(
69
+ import * as jt from "three";
70
+ import { Vector3 as Et } from "three";
71
+ const co = (t) => /* @__PURE__ */ s(oe, { ...t, viewBox: "0 0 10 8", children: /* @__PURE__ */ s(
72
72
  "path",
73
73
  {
74
74
  d: "M8.825 0.9125L5 4.72917L1.175 0.9125L0 2.0875L5 7.0875L10 2.0875L8.825 0.9125Z",
@@ -84,15 +84,15 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
84
84
  onAppSelect: i,
85
85
  disabled: n = !1,
86
86
  sx: c
87
- } = t, [s, l] = B(null), g = !!s, m = (p) => {
88
- l(p.currentTarget);
87
+ } = t, [a, l] = B(null), u = !!a, f = (g) => {
88
+ l(g.currentTarget);
89
89
  }, d = () => {
90
90
  l(null);
91
- }, u = (p) => {
92
- d(), p.onClick ? p.onClick() : p.href && (window.location.href = p.href), i == null || i(p);
91
+ }, p = (g) => {
92
+ d(), g.onClick ? g.onClick() : g.href && (window.location.href = g.href), i == null || i(g);
93
93
  };
94
- return /* @__PURE__ */ S(et, { children: [
95
- /* @__PURE__ */ a(
94
+ return /* @__PURE__ */ v(et, { children: [
95
+ /* @__PURE__ */ s(
96
96
  Xt,
97
97
  {
98
98
  position: "static",
@@ -105,11 +105,11 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
105
105
  },
106
106
  ...c
107
107
  },
108
- children: /* @__PURE__ */ S(te, { sx: { minHeight: "62px !important" }, children: [
109
- /* @__PURE__ */ a(T, { sx: { mr: 1, display: "flex", alignItems: "center" }, children: e }),
110
- /* @__PURE__ */ S(T, { sx: { display: "flex", alignItems: "center", flexGrow: 1 }, children: [
111
- /* @__PURE__ */ a(
112
- E,
108
+ children: /* @__PURE__ */ v(te, { sx: { minHeight: "62px !important" }, children: [
109
+ /* @__PURE__ */ s(T, { sx: { mr: 1, display: "flex", alignItems: "center" }, children: e }),
110
+ /* @__PURE__ */ v(T, { sx: { display: "flex", alignItems: "center", flexGrow: 1 }, children: [
111
+ /* @__PURE__ */ s(
112
+ j,
113
113
  {
114
114
  component: "h1",
115
115
  sx: {
@@ -119,14 +119,14 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
119
119
  children: o
120
120
  }
121
121
  ),
122
- r.length > 0 && /* @__PURE__ */ a(
122
+ r.length > 0 && /* @__PURE__ */ s(
123
123
  H,
124
124
  {
125
125
  color: "inherit",
126
126
  "aria-label": "switch app",
127
127
  "aria-controls": "app-menu",
128
128
  "aria-haspopup": "true",
129
- onClick: m,
129
+ onClick: f,
130
130
  disabled: n,
131
131
  sx: {
132
132
  ml: 1,
@@ -134,10 +134,10 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
134
134
  height: 28,
135
135
  borderRadius: "6px",
136
136
  padding: 0,
137
- backgroundColor: (p) => Mt(p.palette.common.white, 0.1),
137
+ backgroundColor: (g) => Mt(g.palette.common.white, 0.1),
138
138
  opacity: 1,
139
139
  "&:hover": {
140
- backgroundColor: (p) => Mt(p.palette.common.white, 0.16)
140
+ backgroundColor: (g) => Mt(g.palette.common.white, 0.16)
141
141
  },
142
142
  "& .MuiSvgIcon-root": {
143
143
  fontSize: "8px",
@@ -145,31 +145,31 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
145
145
  height: "6px"
146
146
  }
147
147
  },
148
- children: /* @__PURE__ */ a(co, {})
148
+ children: /* @__PURE__ */ s(co, {})
149
149
  }
150
150
  )
151
151
  ] })
152
152
  ] })
153
153
  }
154
154
  ),
155
- /* @__PURE__ */ a(
155
+ /* @__PURE__ */ s(
156
156
  Bt,
157
157
  {
158
- open: g,
158
+ open: u,
159
159
  onClick: d,
160
160
  sx: {
161
161
  backdropFilter: "blur(4px)",
162
162
  backgroundColor: "rgba(0, 0, 0, 0.3)",
163
- zIndex: (p) => p.zIndex.modal - 1
163
+ zIndex: (g) => g.zIndex.modal - 1
164
164
  }
165
165
  }
166
166
  ),
167
- /* @__PURE__ */ a(
167
+ /* @__PURE__ */ s(
168
168
  Kt,
169
169
  {
170
170
  id: "app-menu",
171
- anchorEl: s,
172
- open: g,
171
+ anchorEl: a,
172
+ open: u,
173
173
  onClose: d,
174
174
  anchorOrigin: {
175
175
  vertical: "bottom",
@@ -180,16 +180,16 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
180
180
  horizontal: "left"
181
181
  },
182
182
  sx: {
183
- zIndex: (p) => p.zIndex.modal,
183
+ zIndex: (g) => g.zIndex.modal,
184
184
  "& .MuiPaper-root": {
185
185
  minWidth: 200,
186
186
  mt: 1
187
187
  }
188
188
  },
189
- children: r.map((p) => /* @__PURE__ */ S(q, { onClick: () => u(p), children: [
190
- /* @__PURE__ */ a(T, { sx: { display: "flex", alignItems: "center" }, children: p.icon }),
191
- /* @__PURE__ */ a(E, { variant: "body1", sx: { ml: 2 }, children: p.name })
192
- ] }, p.id))
189
+ children: r.map((g) => /* @__PURE__ */ v(q, { onClick: () => p(g), children: [
190
+ /* @__PURE__ */ s(T, { sx: { display: "flex", alignItems: "center" }, children: g.icon }),
191
+ /* @__PURE__ */ s(j, { variant: "body1", sx: { ml: 2 }, children: g.name })
192
+ ] }, g.id))
193
193
  }
194
194
  )
195
195
  ] });
@@ -201,8 +201,8 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
201
201
  const o = Math.floor(t / 86400), r = Math.floor(t % 86400 / 3600), i = Math.floor(t % 3600 / 60), n = t % 60;
202
202
  if (typeof Intl < "u" && "DurationFormat" in Intl)
203
203
  try {
204
- const s = {};
205
- return o > 0 && (s.days = o), r > 0 && (s.hours = r), i > 0 && (s.minutes = i), (n > 0 || Object.keys(s).length === 0) && (s.seconds = n), new Intl.DurationFormat(e, { style: "narrow" }).format(s);
204
+ const a = {};
205
+ return o > 0 && (a.days = o), r > 0 && (a.hours = r), i > 0 && (a.minutes = i), (n > 0 || Object.keys(a).length === 0) && (a.seconds = n), new Intl.DurationFormat(e, { style: "narrow" }).format(a);
206
206
  } catch {
207
207
  }
208
208
  const c = [];
@@ -213,17 +213,17 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
213
213
  hasError: o,
214
214
  className: r
215
215
  }) => {
216
- const { t: i, i18n: n } = V(), c = F(), { currentState: s, remainingTime: l, maxTime: g, currentProgress: m } = t, {
216
+ const { t: i, i18n: n } = V(), c = F(), { currentState: a, remainingTime: l, maxTime: u, currentProgress: f } = t, {
217
217
  showErrorAnimation: d,
218
- showPauseAnimation: u,
219
- showPulsatingText: p,
220
- pulsatingFinished: x,
221
- showLabels: y,
222
- showMainText: f,
218
+ showPauseAnimation: p,
219
+ showPulsatingText: g,
220
+ pulsatingFinished: m,
221
+ showLabels: S,
222
+ showMainText: x,
223
223
  showIdlePulsating: h,
224
- idleDotsCount: v
224
+ idleDotsCount: y
225
225
  } = e;
226
- return /* @__PURE__ */ S(
226
+ return /* @__PURE__ */ v(
227
227
  T,
228
228
  {
229
229
  className: r,
@@ -236,12 +236,12 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
236
236
  justifyContent: "center"
237
237
  },
238
238
  children: [
239
- /* @__PURE__ */ a(
239
+ /* @__PURE__ */ s(
240
240
  ne,
241
241
  {
242
242
  width: 264,
243
243
  height: 264,
244
- value: s === "idle" ? 0 : m,
244
+ value: a === "idle" ? 0 : f,
245
245
  valueMin: 0,
246
246
  valueMax: 100,
247
247
  innerRadius: "85%",
@@ -250,7 +250,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
250
250
  skipAnimation: !0,
251
251
  text: () => "",
252
252
  sx: {
253
- opacity: u || d ? 0.6 : 1,
253
+ opacity: p || d ? 0.6 : 1,
254
254
  transition: "opacity 0.5s ease-out",
255
255
  "& .MuiGauge-valueArc": {
256
256
  fill: o ? c.palette.error.light : c.palette.success.main,
@@ -271,7 +271,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
271
271
  }
272
272
  }
273
273
  ),
274
- /* @__PURE__ */ S(
274
+ /* @__PURE__ */ v(
275
275
  T,
276
276
  {
277
277
  sx: {
@@ -292,7 +292,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
292
292
  transition: "background-color 0.5s ease-out"
293
293
  },
294
294
  children: [
295
- /* @__PURE__ */ a(
295
+ /* @__PURE__ */ s(
296
296
  T,
297
297
  {
298
298
  sx: {
@@ -302,28 +302,28 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
302
302
  justifyContent: "center",
303
303
  marginBottom: 1
304
304
  },
305
- children: /* @__PURE__ */ a(
305
+ children: /* @__PURE__ */ s(
306
306
  U,
307
307
  {
308
- in: y && !o && s !== "idle" && s !== "success",
308
+ in: S && !o && a !== "idle" && a !== "success",
309
309
  timeout: 300,
310
- children: /* @__PURE__ */ a(
311
- E,
310
+ children: /* @__PURE__ */ s(
311
+ j,
312
312
  {
313
313
  variant: "body2",
314
314
  sx: {
315
315
  fontSize: "12px",
316
- color: s === "measured" && (p || x) ? c.palette.success.main : c.palette.text.secondary,
316
+ color: a === "measured" && (g || m) ? c.palette.success.main : c.palette.text.secondary,
317
317
  transition: "color 0.8s ease-in-out"
318
318
  },
319
- children: /* @__PURE__ */ a(
319
+ children: /* @__PURE__ */ s(
320
320
  "span",
321
321
  {
322
322
  style: {
323
- opacity: s === "measured" && x ? p ? 1 : 0.6 : 1,
323
+ opacity: a === "measured" && m ? g ? 1 : 0.6 : 1,
324
324
  transition: "opacity 2s ease-in-out"
325
325
  },
326
- children: s === "measuring" || s === "measured" ? i("CycleTimer.CycleTime.lb", "Cycle Time") : s === "countdown" ? i("CycleTimer.RemainingTime.lb", "Remaining Time") : ""
326
+ children: a === "measuring" || a === "measured" ? i("CycleTimer.CycleTime.lb", "Cycle Time") : a === "countdown" ? i("CycleTimer.RemainingTime.lb", "Remaining Time") : ""
327
327
  }
328
328
  )
329
329
  }
@@ -332,7 +332,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
332
332
  )
333
333
  }
334
334
  ),
335
- /* @__PURE__ */ S(
335
+ /* @__PURE__ */ v(
336
336
  T,
337
337
  {
338
338
  sx: {
@@ -344,13 +344,13 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
344
344
  marginBottom: 0.5
345
345
  },
346
346
  children: [
347
- /* @__PURE__ */ a(
347
+ /* @__PURE__ */ s(
348
348
  U,
349
349
  {
350
- in: f && s === "idle" && !o,
350
+ in: x && a === "idle" && !o,
351
351
  timeout: 200,
352
- children: /* @__PURE__ */ S(
353
- E,
352
+ children: /* @__PURE__ */ v(
353
+ j,
354
354
  {
355
355
  variant: "body2",
356
356
  sx: {
@@ -368,7 +368,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
368
368
  justifyContent: "center"
369
369
  },
370
370
  children: [
371
- /* @__PURE__ */ a(
371
+ /* @__PURE__ */ s(
372
372
  "span",
373
373
  {
374
374
  style: {
@@ -381,7 +381,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
381
381
  )
382
382
  }
383
383
  ),
384
- /* @__PURE__ */ a(
384
+ /* @__PURE__ */ s(
385
385
  "span",
386
386
  {
387
387
  style: {
@@ -391,7 +391,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
391
391
  opacity: h ? 1 : 0.6,
392
392
  transition: "opacity 2s ease-in-out"
393
393
  },
394
- children: ".".repeat(v)
394
+ children: ".".repeat(y)
395
395
  }
396
396
  )
397
397
  ]
@@ -399,8 +399,8 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
399
399
  )
400
400
  }
401
401
  ),
402
- /* @__PURE__ */ a(U, { in: f && o, timeout: 200, children: /* @__PURE__ */ a(
403
- E,
402
+ /* @__PURE__ */ s(U, { in: x && o, timeout: 200, children: /* @__PURE__ */ s(
403
+ j,
404
404
  {
405
405
  variant: "h3",
406
406
  sx: {
@@ -413,13 +413,13 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
413
413
  children: i("CycleTimer.Error.lb", "Error")
414
414
  }
415
415
  ) }),
416
- /* @__PURE__ */ a(
416
+ /* @__PURE__ */ s(
417
417
  U,
418
418
  {
419
- in: f && !o && s !== "idle" && s !== "success",
419
+ in: x && !o && a !== "idle" && a !== "success",
420
420
  timeout: 300,
421
- children: /* @__PURE__ */ a(
422
- E,
421
+ children: /* @__PURE__ */ s(
422
+ j,
423
423
  {
424
424
  variant: "h1",
425
425
  sx: {
@@ -430,7 +430,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
430
430
  lineHeight: 1,
431
431
  transition: "color 0.8s ease-in-out"
432
432
  },
433
- children: /* @__PURE__ */ a(
433
+ children: /* @__PURE__ */ s(
434
434
  "span",
435
435
  {
436
436
  style: {
@@ -447,7 +447,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
447
447
  ]
448
448
  }
449
449
  ),
450
- /* @__PURE__ */ a(
450
+ /* @__PURE__ */ s(
451
451
  T,
452
452
  {
453
453
  sx: {
@@ -457,29 +457,29 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
457
457
  alignItems: "center",
458
458
  justifyContent: "center"
459
459
  },
460
- children: /* @__PURE__ */ a(
460
+ children: /* @__PURE__ */ s(
461
461
  U,
462
462
  {
463
- in: y && !o && s !== "idle" && s !== "success",
463
+ in: S && !o && a !== "idle" && a !== "success",
464
464
  timeout: 300,
465
- children: /* @__PURE__ */ a(
466
- E,
465
+ children: /* @__PURE__ */ s(
466
+ j,
467
467
  {
468
468
  variant: "body2",
469
469
  sx: {
470
470
  fontSize: "12px",
471
- color: s === "measured" && (p || x) ? c.palette.success.main : c.palette.text.secondary,
471
+ color: a === "measured" && (g || m) ? c.palette.success.main : c.palette.text.secondary,
472
472
  transition: "color 0.8s ease-in-out"
473
473
  },
474
- children: /* @__PURE__ */ a(
474
+ children: /* @__PURE__ */ s(
475
475
  "span",
476
476
  {
477
477
  style: {
478
- opacity: s === "measured" && x ? p ? 1 : 0.6 : 1,
478
+ opacity: a === "measured" && m ? g ? 1 : 0.6 : 1,
479
479
  transition: "opacity 2s ease-in-out"
480
480
  },
481
- children: s === "measuring" ? i("CycleTimer.Measuring.lb", "measuring...") : s === "measured" ? i("CycleTimer.Determined.lb", "determined") : s === "countdown" && g !== null ? i("CycleTimer.OfTime.lb", {
482
- time: N(g, n.language)
481
+ children: a === "measuring" ? i("CycleTimer.Measuring.lb", "measuring...") : a === "measured" ? i("CycleTimer.Determined.lb", "determined") : a === "countdown" && u !== null ? i("CycleTimer.OfTime.lb", {
482
+ time: N(u, n.language)
483
483
  }) : ""
484
484
  }
485
485
  )
@@ -502,15 +502,15 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
502
502
  compact: r,
503
503
  className: i
504
504
  }) => {
505
- const { t: n, i18n: c } = V(), s = F(), { currentState: l, remainingTime: g, maxTime: m } = t, {
505
+ const { t: n, i18n: c } = V(), a = F(), { currentState: l, remainingTime: u, maxTime: f } = t, {
506
506
  showErrorAnimation: d,
507
- showPauseAnimation: u,
508
- showPulsatingText: p,
509
- pulsatingFinished: x,
510
- showIdlePulsating: y,
511
- idleDotsCount: f
507
+ showPauseAnimation: p,
508
+ showPulsatingText: g,
509
+ pulsatingFinished: m,
510
+ showIdlePulsating: S,
511
+ idleDotsCount: x
512
512
  } = e;
513
- return r && l === "idle" ? /* @__PURE__ */ a(
513
+ return r && l === "idle" ? /* @__PURE__ */ s(
514
514
  T,
515
515
  {
516
516
  className: i,
@@ -519,20 +519,20 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
519
519
  alignItems: "center",
520
520
  m: 0
521
521
  },
522
- children: /* @__PURE__ */ a(
523
- E,
522
+ children: /* @__PURE__ */ s(
523
+ j,
524
524
  {
525
525
  variant: "body2",
526
526
  sx: {
527
- color: o ? s.palette.error.light : s.palette.text.primary,
527
+ color: o ? a.palette.error.light : a.palette.text.primary,
528
528
  fontSize: "14px",
529
529
  transition: "color 0.5s ease-out"
530
530
  },
531
- children: o ? n("CycleTimer.Error.lb", "Error") : l === "idle" ? "0s" : N(g, c.language)
531
+ children: o ? n("CycleTimer.Error.lb", "Error") : l === "idle" ? "0s" : N(u, c.language)
532
532
  }
533
533
  )
534
534
  }
535
- ) : /* @__PURE__ */ S(
535
+ ) : /* @__PURE__ */ v(
536
536
  T,
537
537
  {
538
538
  className: i,
@@ -543,7 +543,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
543
543
  gap: 1
544
544
  },
545
545
  children: [
546
- !(l === "idle" && r) && /* @__PURE__ */ a(
546
+ !(l === "idle" && r) && /* @__PURE__ */ s(
547
547
  T,
548
548
  {
549
549
  sx: {
@@ -552,10 +552,10 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
552
552
  display: "flex",
553
553
  alignItems: "center",
554
554
  justifyContent: "center",
555
- opacity: u || d ? 0.6 : 1,
555
+ opacity: p || d ? 0.6 : 1,
556
556
  transition: "opacity 0.5s ease-out"
557
557
  },
558
- children: /* @__PURE__ */ S(
558
+ children: /* @__PURE__ */ v(
559
559
  "svg",
560
560
  {
561
561
  width: "20",
@@ -565,35 +565,35 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
565
565
  role: "img",
566
566
  "aria-label": "Timer progress",
567
567
  children: [
568
- /* @__PURE__ */ a(
568
+ /* @__PURE__ */ s(
569
569
  "circle",
570
570
  {
571
571
  cx: "10",
572
572
  cy: "10",
573
573
  r: "8",
574
574
  fill: "none",
575
- stroke: o ? s.palette.error.light : l === "measured" ? p || x ? s.palette.success.main : s.palette.text.secondary : s.palette.success.main,
575
+ stroke: o ? a.palette.error.light : l === "measured" ? g || m ? a.palette.success.main : a.palette.text.secondary : a.palette.success.main,
576
576
  strokeWidth: "2",
577
- opacity: l === "measured" && x ? p ? 1 : 0.6 : 0.3,
577
+ opacity: l === "measured" && m ? g ? 1 : 0.6 : 0.3,
578
578
  style: {
579
579
  transition: "stroke 0.8s ease-in-out, opacity 2s ease-in-out"
580
580
  }
581
581
  }
582
582
  ),
583
- /* @__PURE__ */ a(
583
+ /* @__PURE__ */ s(
584
584
  "circle",
585
585
  {
586
586
  cx: "10",
587
587
  cy: "10",
588
588
  r: "8",
589
589
  fill: "none",
590
- stroke: o ? s.palette.error.light : l === "measured" ? p || x ? s.palette.success.main : s.palette.text.secondary : s.palette.success.main,
590
+ stroke: o ? a.palette.error.light : l === "measured" ? g || m ? a.palette.success.main : a.palette.text.secondary : a.palette.success.main,
591
591
  strokeWidth: "2",
592
592
  strokeLinecap: "round",
593
593
  strokeDasharray: `${2 * Math.PI * 8}`,
594
594
  strokeDashoffset: `${2 * Math.PI * 8 * (1 - (l === "idle" ? 0 : t.currentProgress) / 100)}`,
595
595
  style: {
596
- opacity: l === "measured" && x ? p ? 1 : 0.6 : 1,
596
+ opacity: l === "measured" && m ? g ? 1 : 0.6 : 1,
597
597
  transition: "stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"
598
598
  }
599
599
  }
@@ -603,21 +603,21 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
603
603
  )
604
604
  }
605
605
  ),
606
- /* @__PURE__ */ a(
607
- E,
606
+ /* @__PURE__ */ s(
607
+ j,
608
608
  {
609
609
  variant: "body2",
610
610
  sx: {
611
- color: o ? s.palette.error.light : l === "idle" ? "rgba(255, 255, 255, 0.7)" : l === "measured" ? p || x ? s.palette.success.main : s.palette.text.secondary : s.palette.text.primary,
611
+ color: o ? a.palette.error.light : l === "idle" ? "rgba(255, 255, 255, 0.7)" : l === "measured" ? g || m ? a.palette.success.main : a.palette.text.secondary : a.palette.text.primary,
612
612
  fontSize: "14px",
613
613
  lineHeight: "normal",
614
614
  letterSpacing: "normal",
615
- opacity: l === "idle" ? y ? 1 : 0.6 : l === "measured" && x ? p ? 1 : 0.6 : 1,
615
+ opacity: l === "idle" ? S ? 1 : 0.6 : l === "measured" && m ? g ? 1 : 0.6 : 1,
616
616
  transition: "color 0.8s ease-in-out, font-size 0.3s ease-out, opacity 2s ease-in-out"
617
617
  },
618
- children: o ? n("CycleTimer.Error.lb", "Error") : l === "idle" ? /* @__PURE__ */ S(et, { children: [
619
- /* @__PURE__ */ a("span", { children: n("CycleTimer.WaitingForCycle.lb", "Waiting for program cycle") }),
620
- /* @__PURE__ */ a(
618
+ children: o ? n("CycleTimer.Error.lb", "Error") : l === "idle" ? /* @__PURE__ */ v(et, { children: [
619
+ /* @__PURE__ */ s("span", { children: n("CycleTimer.WaitingForCycle.lb", "Waiting for program cycle") }),
620
+ /* @__PURE__ */ s(
621
621
  "span",
622
622
  {
623
623
  style: {
@@ -625,10 +625,10 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
625
625
  width: "18px",
626
626
  textAlign: "left"
627
627
  },
628
- children: ".".repeat(f)
628
+ children: ".".repeat(x)
629
629
  }
630
630
  )
631
- ] }) : l === "measuring" ? r ? N(g, c.language) : `${N(g, c.language)} / ${n("CycleTimer.Measuring.lb", "measuring...")}` : l === "measured" ? r ? N(g, c.language) : `${N(g, c.language)} / ${n("CycleTimer.Determined.lb", "determined")}` : l === "countdown" && m !== null ? r ? N(g, c.language) : `${N(g, c.language)} / ${n("CycleTimer.Time.lb", { time: N(m, c.language) })}` : N(g, c.language)
631
+ ] }) : l === "measuring" ? r ? N(u, c.language) : `${N(u, c.language)} / ${n("CycleTimer.Measuring.lb", "measuring...")}` : l === "measured" ? r ? N(u, c.language) : `${N(u, c.language)} / ${n("CycleTimer.Determined.lb", "determined")}` : l === "countdown" && f !== null ? r ? N(u, c.language) : `${N(u, c.language)} / ${n("CycleTimer.Time.lb", { time: N(f, c.language) })}` : N(u, c.language)
632
632
  }
633
633
  )
634
634
  ]
@@ -650,46 +650,46 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
650
650
  null
651
651
  ), i = D(
652
652
  null
653
- ), n = D(null), c = D(0), s = D(null), l = D(
653
+ ), n = D(null), c = D(0), a = D(null), l = D(
654
654
  null
655
- ), g = P(() => {
655
+ ), u = _(() => {
656
656
  e((b) => ({ ...b, showPauseAnimation: !0 })), o.current && clearTimeout(o.current), o.current = setTimeout(() => {
657
657
  e((b) => ({ ...b, showPauseAnimation: !1 }));
658
658
  }, 800);
659
- }, []), m = P(() => {
659
+ }, []), f = _(() => {
660
660
  e((b) => ({ ...b, showErrorAnimation: !0 })), r.current && clearTimeout(r.current), r.current = setTimeout(() => {
661
661
  e((b) => ({ ...b, showErrorAnimation: !1 }));
662
662
  }, 600);
663
- }, []), d = P(() => {
663
+ }, []), d = _(() => {
664
664
  e((b) => ({ ...b, showErrorAnimation: !1 })), r.current && clearTimeout(r.current);
665
- }, []), u = P((b) => {
666
- c.current = 0, e((w) => ({
667
- ...w,
665
+ }, []), p = _((b) => {
666
+ c.current = 0, e((C) => ({
667
+ ...C,
668
668
  showPulsatingText: !0,
669
669
  pulsatingFinished: !1
670
670
  })), setTimeout(() => {
671
- e((w) => ({
672
- ...w,
671
+ e((C) => ({
672
+ ...C,
673
673
  pulsatingFinished: !0
674
674
  // This will keep the success color and start slow pulsating
675
675
  })), i.current = setInterval(() => {
676
- e((w) => ({
677
- ...w,
678
- showPulsatingText: !w.showPulsatingText
676
+ e((C) => ({
677
+ ...C,
678
+ showPulsatingText: !C.showPulsatingText
679
679
  }));
680
680
  }, 2e3), b && b();
681
681
  }, 800);
682
- }, []), p = P(() => {
682
+ }, []), g = _(() => {
683
683
  i.current && (clearInterval(i.current), i.current = null), e((b) => ({
684
684
  ...b,
685
685
  showPulsatingText: !1,
686
686
  pulsatingFinished: !1
687
687
  })), c.current = 0;
688
- }, []), x = P(() => {
688
+ }, []), m = _(() => {
689
689
  e((b) => ({
690
690
  ...b,
691
691
  showIdlePulsating: !0
692
- })), s.current = setInterval(() => {
692
+ })), a.current = setInterval(() => {
693
693
  e((b) => ({
694
694
  ...b,
695
695
  showIdlePulsating: !b.showIdlePulsating
@@ -701,13 +701,13 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
701
701
  // Cycle through 0, 1, 2, 3
702
702
  }));
703
703
  }, 800);
704
- }, []), y = P(() => {
705
- s.current && (clearInterval(s.current), s.current = null), l.current && (clearInterval(l.current), l.current = null), e((b) => ({
704
+ }, []), S = _(() => {
705
+ a.current && (clearInterval(a.current), a.current = null), l.current && (clearInterval(l.current), l.current = null), e((b) => ({
706
706
  ...b,
707
707
  showIdlePulsating: !1,
708
708
  idleDotsCount: 0
709
709
  }));
710
- }, []), f = P(() => {
710
+ }, []), x = _(() => {
711
711
  e((b) => ({
712
712
  ...b,
713
713
  showLabels: !1,
@@ -719,27 +719,27 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
719
719
  showMainText: !0
720
720
  }));
721
721
  }, 200);
722
- }, []), h = P(() => {
722
+ }, []), h = _(() => {
723
723
  e((b) => ({
724
724
  ...b,
725
725
  showLabels: !0,
726
726
  showMainText: !0
727
727
  }));
728
- }, []), v = P(() => {
729
- o.current && clearTimeout(o.current), r.current && clearTimeout(r.current), n.current && clearTimeout(n.current), i.current && clearInterval(i.current), s.current && clearInterval(s.current), l.current && clearInterval(l.current);
728
+ }, []), y = _(() => {
729
+ o.current && clearTimeout(o.current), r.current && clearTimeout(r.current), n.current && clearTimeout(n.current), i.current && clearInterval(i.current), a.current && clearInterval(a.current), l.current && clearInterval(l.current);
730
730
  }, []);
731
731
  return {
732
732
  animationState: t,
733
- triggerPauseAnimation: g,
734
- triggerErrorAnimation: m,
733
+ triggerPauseAnimation: u,
734
+ triggerErrorAnimation: f,
735
735
  clearErrorAnimation: d,
736
- startPulsatingAnimation: u,
737
- stopPulsatingAnimation: p,
738
- startIdleAnimations: x,
739
- stopIdleAnimations: y,
740
- triggerFadeTransition: f,
736
+ startPulsatingAnimation: p,
737
+ stopPulsatingAnimation: g,
738
+ startIdleAnimations: m,
739
+ stopIdleAnimations: S,
740
+ triggerFadeTransition: x,
741
741
  setInitialAnimationState: h,
742
- cleanup: v
742
+ cleanup: y
743
743
  };
744
744
  }, fo = ({
745
745
  autoStart: t,
@@ -749,9 +749,9 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
749
749
  onPauseAnimation: i,
750
750
  onErrorAnimation: n,
751
751
  onClearErrorAnimation: c,
752
- onStartPulsating: s
752
+ onStartPulsating: a
753
753
  }) => {
754
- const [l, g] = B({
754
+ const [l, u] = B({
755
755
  currentState: "idle",
756
756
  remainingTime: 0,
757
757
  maxTime: null,
@@ -759,15 +759,15 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
759
759
  isPausedState: !1,
760
760
  currentProgress: 0,
761
761
  wasRunningBeforeError: !1
762
- }), m = D(null), d = D(null), u = D(0), [p] = Lt([0], {
762
+ }), f = D(null), d = D(null), p = D(0), [g] = Lt([0], {
763
763
  tension: 80,
764
764
  friction: 18,
765
- onChange: ([C]) => {
766
- g((M) => ({ ...M, currentProgress: C }));
765
+ onChange: ([w]) => {
766
+ u((M) => ({ ...M, currentProgress: w }));
767
767
  }
768
- }), x = P(() => {
769
- g((C) => ({
770
- ...C,
768
+ }), m = _(() => {
769
+ u((w) => ({
770
+ ...w,
771
771
  currentState: "idle",
772
772
  maxTime: null,
773
773
  // Don't reset remainingTime - keep the last value
@@ -775,61 +775,61 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
775
775
  isPausedState: !1,
776
776
  currentProgress: 0
777
777
  // Reset progress to 0 for gauge
778
- })), u.current = 0, d.current = null, p.setImmediate([0]);
779
- }, [p]), y = P(
780
- (C = 0) => {
781
- const M = C / 60 % 1 * 100;
782
- g((k) => ({
778
+ })), p.current = 0, d.current = null, g.setImmediate([0]);
779
+ }, [g]), S = _(
780
+ (w = 0) => {
781
+ const M = w / 60 % 1 * 100;
782
+ u((k) => ({
783
783
  ...k,
784
784
  currentState: "measuring",
785
785
  maxTime: null,
786
- remainingTime: C,
786
+ remainingTime: w,
787
787
  isPausedState: !1,
788
788
  currentProgress: M
789
789
  // Immediately set progress
790
- })), u.current = 0, p.setImmediate([M]), t ? (d.current = Date.now() - C * 1e3, g((k) => ({ ...k, isRunning: !0 }))) : d.current = null;
790
+ })), p.current = 0, g.setImmediate([M]), t ? (d.current = Date.now() - w * 1e3, u((k) => ({ ...k, isRunning: !0 }))) : d.current = null;
791
791
  },
792
- [t, p]
793
- ), f = P(
794
- (C, M = 0) => {
795
- g((I) => ({ ...I, isRunning: !1 })), d.current = null, g((I) => ({
792
+ [t, g]
793
+ ), x = _(
794
+ (w, M = 0) => {
795
+ u((I) => ({ ...I, isRunning: !1 })), d.current = null, u((I) => ({
796
796
  ...I,
797
797
  currentState: "countdown",
798
- maxTime: C,
798
+ maxTime: w,
799
799
  isPausedState: !1
800
- })), u.current = 0;
801
- const k = Math.max(0, C - M), R = M > 0 ? M / C * 100 : 0;
802
- g((I) => ({
800
+ })), p.current = 0;
801
+ const k = Math.max(0, w - M), R = M > 0 ? M / w * 100 : 0;
802
+ u((I) => ({
803
803
  ...I,
804
804
  remainingTime: k,
805
805
  currentProgress: R
806
806
  // Immediately set progress
807
- })), p.setImmediate([R]), k === 0 ? (g((I) => ({ ...I, isRunning: !1 })), d.current = null, e && queueMicrotask(() => e())) : t ? setTimeout(() => {
808
- d.current = Date.now() - M * 1e3, g((I) => ({ ...I, isRunning: !0 }));
807
+ })), g.setImmediate([R]), k === 0 ? (u((I) => ({ ...I, isRunning: !1 })), d.current = null, e && queueMicrotask(() => e())) : t ? setTimeout(() => {
808
+ d.current = Date.now() - M * 1e3, u((I) => ({ ...I, isRunning: !0 }));
809
809
  }, 0) : d.current = null;
810
810
  },
811
- [t, e, p]
812
- ), h = P(() => {
813
- g((C) => ({
814
- ...C,
811
+ [t, e, g]
812
+ ), h = _(() => {
813
+ u((w) => ({
814
+ ...w,
815
815
  isRunning: !1,
816
816
  currentState: "measured"
817
- })), d.current = null, s(() => {
817
+ })), d.current = null, a(() => {
818
818
  o && o();
819
819
  });
820
- }, [s, o]), v = P(() => {
820
+ }, [a, o]), y = _(() => {
821
821
  if (d.current && l.isRunning) {
822
822
  const M = Date.now() - d.current;
823
- u.current += M;
824
- const k = u.current / 1e3, R = go(
823
+ p.current += M;
824
+ const k = p.current / 1e3, R = go(
825
825
  l.currentState,
826
826
  k,
827
827
  l.maxTime
828
828
  );
829
- p.setTarget([R]);
829
+ g.setTarget([R]);
830
830
  }
831
- g((C) => ({
832
- ...C,
831
+ u((w) => ({
832
+ ...w,
833
833
  isRunning: !1,
834
834
  isPausedState: !0
835
835
  })), i();
@@ -837,11 +837,11 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
837
837
  l.isRunning,
838
838
  l.currentState,
839
839
  l.maxTime,
840
- p,
840
+ g,
841
841
  i
842
- ]), b = P(() => {
843
- l.isPausedState && (l.remainingTime > 0 || l.currentState !== "countdown") && (d.current = Date.now(), g((C) => ({
844
- ...C,
842
+ ]), b = _(() => {
843
+ l.isPausedState && (l.remainingTime > 0 || l.currentState !== "countdown") && (d.current = Date.now(), u((w) => ({
844
+ ...w,
845
845
  isRunning: !0,
846
846
  isPausedState: !1
847
847
  })));
@@ -849,79 +849,79 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
849
849
  l.isPausedState,
850
850
  l.remainingTime,
851
851
  l.currentState
852
- ]), w = P(() => l.isPausedState, [l.isPausedState]);
852
+ ]), C = _(() => l.isPausedState, [l.isPausedState]);
853
853
  return A(() => {
854
- r ? (l.isRunning && !l.isPausedState && (g((C) => ({ ...C, wasRunningBeforeError: !0 })), v()), n()) : (l.wasRunningBeforeError && l.isPausedState && (g((C) => ({ ...C, wasRunningBeforeError: !1 })), b()), c());
854
+ r ? (l.isRunning && !l.isPausedState && (u((w) => ({ ...w, wasRunningBeforeError: !0 })), y()), n()) : (l.wasRunningBeforeError && l.isPausedState && (u((w) => ({ ...w, wasRunningBeforeError: !1 })), b()), c());
855
855
  }, [
856
856
  r,
857
857
  l.isRunning,
858
858
  l.isPausedState,
859
859
  l.wasRunningBeforeError,
860
- v,
860
+ y,
861
861
  b,
862
862
  n,
863
863
  c
864
864
  ]), A(() => {
865
865
  if (l.isRunning) {
866
- const C = () => {
866
+ const w = () => {
867
867
  if (d.current) {
868
- const k = (Date.now() - d.current + u.current) / 1e3;
868
+ const k = (Date.now() - d.current + p.current) / 1e3;
869
869
  if (l.currentState === "countdown" && l.maxTime !== null) {
870
870
  const R = Math.max(0, l.maxTime - k);
871
- g((j) => ({
872
- ...j,
871
+ u((E) => ({
872
+ ...E,
873
873
  remainingTime: Math.ceil(R)
874
874
  }));
875
875
  const I = Math.min(100, k / l.maxTime * 100);
876
- if (p.setTarget([I]), R <= 0) {
877
- g((j) => ({
878
- ...j,
876
+ if (g.setTarget([I]), R <= 0) {
877
+ u((E) => ({
878
+ ...E,
879
879
  isRunning: !1,
880
880
  remainingTime: 0
881
- })), d.current = null, p.setTarget([100]), e && queueMicrotask(() => e());
881
+ })), d.current = null, g.setTarget([100]), e && queueMicrotask(() => e());
882
882
  return;
883
883
  }
884
884
  } else if (l.currentState === "measuring") {
885
- g((I) => ({
885
+ u((I) => ({
886
886
  ...I,
887
887
  remainingTime: Math.floor(k)
888
888
  }));
889
889
  const R = k / 60 % 1 * 100;
890
- p.setTarget([R]);
890
+ g.setTarget([R]);
891
891
  }
892
- l.isRunning && (m.current = requestAnimationFrame(C));
892
+ l.isRunning && (f.current = requestAnimationFrame(w));
893
893
  }
894
894
  };
895
- m.current = requestAnimationFrame(C);
895
+ f.current = requestAnimationFrame(w);
896
896
  } else
897
- m.current && (cancelAnimationFrame(m.current), m.current = null);
897
+ f.current && (cancelAnimationFrame(f.current), f.current = null);
898
898
  return () => {
899
- m.current && cancelAnimationFrame(m.current);
899
+ f.current && cancelAnimationFrame(f.current);
900
900
  };
901
901
  }, [
902
902
  l.isRunning,
903
903
  e,
904
904
  l.currentState,
905
905
  l.maxTime,
906
- p
906
+ g
907
907
  ]), A(() => {
908
- let C = null;
908
+ let w = null;
909
909
  const M = () => {
910
- p.update(1 / 60), C = requestAnimationFrame(M);
910
+ g.update(1 / 60), w = requestAnimationFrame(M);
911
911
  };
912
- return C = requestAnimationFrame(M), () => {
913
- C && cancelAnimationFrame(C);
912
+ return w = requestAnimationFrame(M), () => {
913
+ w && cancelAnimationFrame(w);
914
914
  };
915
- }, [p]), {
915
+ }, [g]), {
916
916
  timerState: l,
917
917
  controls: {
918
- startNewCycle: f,
919
- startMeasuring: y,
920
- setIdle: x,
918
+ startNewCycle: x,
919
+ startMeasuring: S,
920
+ setIdle: m,
921
921
  completeMeasuring: h,
922
- pause: v,
922
+ pause: y,
923
923
  resume: b,
924
- isPaused: w
924
+ isPaused: C
925
925
  }
926
926
  };
927
927
  }, di = $(
@@ -934,63 +934,63 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
934
934
  variant: i = "default",
935
935
  compact: n = !1,
936
936
  className: c,
937
- hasError: s = !1
937
+ hasError: a = !1
938
938
  }) => {
939
939
  const l = D(void 0), {
940
- animationState: g,
941
- triggerPauseAnimation: m,
940
+ animationState: u,
941
+ triggerPauseAnimation: f,
942
942
  triggerErrorAnimation: d,
943
- clearErrorAnimation: u,
944
- startPulsatingAnimation: p,
945
- stopPulsatingAnimation: x,
946
- startIdleAnimations: y,
947
- stopIdleAnimations: f,
943
+ clearErrorAnimation: p,
944
+ startPulsatingAnimation: g,
945
+ stopPulsatingAnimation: m,
946
+ startIdleAnimations: S,
947
+ stopIdleAnimations: x,
948
948
  triggerFadeTransition: h,
949
- setInitialAnimationState: v,
949
+ setInitialAnimationState: y,
950
950
  cleanup: b
951
- } = ho(), { timerState: w, controls: C } = fo({
951
+ } = ho(), { timerState: C, controls: w } = fo({
952
952
  autoStart: r,
953
953
  onCycleEnd: e,
954
954
  onMeasuringComplete: o,
955
- hasError: s,
956
- onPauseAnimation: m,
955
+ hasError: a,
956
+ onPauseAnimation: f,
957
957
  onErrorAnimation: d,
958
- onClearErrorAnimation: u,
959
- onStartPulsating: p
958
+ onClearErrorAnimation: p,
959
+ onStartPulsating: g
960
960
  });
961
961
  return A(() => {
962
962
  const M = l.current;
963
- l.current !== void 0 && M !== w.currentState ? (M === "measured" && x(), M === "idle" && f(), h()) : v(), w.currentState === "idle" && y(), l.current = w.currentState;
963
+ l.current !== void 0 && M !== C.currentState ? (M === "measured" && m(), M === "idle" && x(), h()) : y(), C.currentState === "idle" && S(), l.current = C.currentState;
964
964
  }, [
965
- w.currentState,
965
+ C.currentState,
966
+ m,
966
967
  x,
967
- f,
968
- y,
968
+ S,
969
969
  h,
970
- v
970
+ y
971
971
  ]), A(() => {
972
972
  let M = !0;
973
973
  const k = setTimeout(() => {
974
- M && t(C);
974
+ M && t(w);
975
975
  }, 0);
976
976
  return () => {
977
977
  M = !1, clearTimeout(k);
978
978
  };
979
- }, [t, C]), A(() => b, [b]), i === "small" ? /* @__PURE__ */ a(
979
+ }, [t, w]), A(() => b, [b]), i === "small" ? /* @__PURE__ */ s(
980
980
  mo,
981
981
  {
982
- timerState: w,
983
- animationState: g,
984
- hasError: s,
982
+ timerState: C,
983
+ animationState: u,
984
+ hasError: a,
985
985
  compact: n,
986
986
  className: c
987
987
  }
988
- ) : /* @__PURE__ */ a(
988
+ ) : /* @__PURE__ */ s(
989
989
  po,
990
990
  {
991
- timerState: w,
992
- animationState: g,
993
- hasError: s,
991
+ timerState: C,
992
+ animationState: u,
993
+ hasError: a,
994
994
  className: c
995
995
  }
996
996
  );
@@ -1006,54 +1006,54 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
1006
1006
  selectedItem: i,
1007
1007
  getItemId: n,
1008
1008
  title: c,
1009
- showCount: s = !0,
1009
+ showCount: a = !0,
1010
1010
  searchPlaceholder: l = "Search programs",
1011
- dataGridProps: g,
1012
- CustomToolbar: m,
1011
+ dataGridProps: u,
1012
+ CustomToolbar: f,
1013
1013
  selectFirstByDefault: d = !1,
1014
- sx: u
1014
+ sx: p
1015
1015
  }) => {
1016
1016
  var R;
1017
- const p = F(), x = se(), y = D(null), [f, h] = B(null), v = rt(() => t.map(o), [t, o]);
1017
+ const g = F(), m = se(), S = D(null), [x, h] = B(null), y = rt(() => t.map(o), [t, o]);
1018
1018
  A(() => {
1019
- x.current && v.length > 0 && x.current.autosizeColumns({
1019
+ m.current && y.length > 0 && m.current.autosizeColumns({
1020
1020
  includeOutliers: !0,
1021
1021
  includeHeaders: !0,
1022
1022
  expand: !0,
1023
1023
  columns: e.map((I) => I.field)
1024
1024
  });
1025
- }, [v, e, x]), A(() => {
1026
- if (!y.current || !x.current) return;
1025
+ }, [y, e, m]), A(() => {
1026
+ if (!S.current || !m.current) return;
1027
1027
  const I = new ResizeObserver(() => {
1028
1028
  setTimeout(() => {
1029
- x.current && v.length > 0 && x.current.autosizeColumns({
1029
+ m.current && y.length > 0 && m.current.autosizeColumns({
1030
1030
  includeOutliers: !0,
1031
1031
  includeHeaders: !0,
1032
1032
  expand: !0,
1033
- columns: e.map((j) => j.field)
1033
+ columns: e.map((E) => E.field)
1034
1034
  });
1035
1035
  }, 100);
1036
1036
  });
1037
- return I.observe(y.current), () => {
1037
+ return I.observe(S.current), () => {
1038
1038
  I.disconnect();
1039
1039
  };
1040
- }, [x, v.length, e]);
1040
+ }, [m, y.length, e]);
1041
1041
  const b = rt(() => {
1042
1042
  if (i !== void 0)
1043
1043
  return i;
1044
- if (f !== null)
1045
- return f;
1044
+ if (x !== null)
1045
+ return x;
1046
1046
  if (d && t.length > 0) {
1047
1047
  const I = t[0];
1048
1048
  return h(I), I;
1049
1049
  }
1050
1050
  return null;
1051
- }, [d, t, i, f]), w = (I) => {
1052
- const j = t.find((z) => o(z).id === I.id);
1053
- j && (i === void 0 && h(j), r && r(j, I));
1054
- }, C = rt(() => !b || !n ? null : n(b), [b, n]);
1051
+ }, [d, t, i, x]), C = (I) => {
1052
+ const E = t.find((z) => o(z).id === I.id);
1053
+ E && (i === void 0 && h(E), r && r(E, I));
1054
+ }, w = rt(() => !b || !n ? null : n(b), [b, n]);
1055
1055
  function M() {
1056
- return /* @__PURE__ */ a(ce, { children: /* @__PURE__ */ S(
1056
+ return /* @__PURE__ */ s(ce, { children: /* @__PURE__ */ v(
1057
1057
  T,
1058
1058
  {
1059
1059
  sx: {
@@ -1064,8 +1064,8 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
1064
1064
  alignItems: "center"
1065
1065
  },
1066
1066
  children: [
1067
- c && /* @__PURE__ */ S(
1068
- E,
1067
+ c && /* @__PURE__ */ v(
1068
+ j,
1069
1069
  {
1070
1070
  variant: "h6",
1071
1071
  sx: {
@@ -1074,11 +1074,11 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
1074
1074
  },
1075
1075
  children: [
1076
1076
  c,
1077
- s && ` (${t.length})`
1077
+ a && ` (${t.length})`
1078
1078
  ]
1079
1079
  }
1080
1080
  ),
1081
- /* @__PURE__ */ S(
1081
+ /* @__PURE__ */ v(
1082
1082
  T,
1083
1083
  {
1084
1084
  sx: {
@@ -1089,13 +1089,13 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
1089
1089
  pr: 1
1090
1090
  },
1091
1091
  children: [
1092
- /* @__PURE__ */ a(
1092
+ /* @__PURE__ */ s(
1093
1093
  de,
1094
1094
  {
1095
- render: /* @__PURE__ */ a(st, { "aria-label": "Show filters", children: /* @__PURE__ */ a(ae, { fontSize: "small" }) })
1095
+ render: /* @__PURE__ */ s(st, { "aria-label": "Show filters", children: /* @__PURE__ */ s(ae, { fontSize: "small" }) })
1096
1096
  }
1097
1097
  ),
1098
- /* @__PURE__ */ a(
1098
+ /* @__PURE__ */ s(
1099
1099
  Y,
1100
1100
  {
1101
1101
  orientation: "vertical",
@@ -1106,10 +1106,10 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
1106
1106
  }
1107
1107
  }
1108
1108
  ),
1109
- /* @__PURE__ */ a(
1109
+ /* @__PURE__ */ s(
1110
1110
  ue,
1111
1111
  {
1112
- render: (I, j) => /* @__PURE__ */ S(
1112
+ render: (I, E) => /* @__PURE__ */ v(
1113
1113
  T,
1114
1114
  {
1115
1115
  ...I,
@@ -1118,24 +1118,24 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
1118
1118
  overflow: "hidden"
1119
1119
  },
1120
1120
  children: [
1121
- !j.expanded && /* @__PURE__ */ a(
1121
+ !E.expanded && /* @__PURE__ */ s(
1122
1122
  ge,
1123
1123
  {
1124
- render: /* @__PURE__ */ a(st, { "aria-label": "Search", children: /* @__PURE__ */ a(It, { fontSize: "small" }) })
1124
+ render: /* @__PURE__ */ s(st, { "aria-label": "Search", children: /* @__PURE__ */ s(It, { fontSize: "small" }) })
1125
1125
  }
1126
1126
  ),
1127
- /* @__PURE__ */ S(
1127
+ /* @__PURE__ */ v(
1128
1128
  T,
1129
1129
  {
1130
1130
  sx: {
1131
1131
  display: "flex",
1132
1132
  overflow: "hidden",
1133
1133
  transition: "all 0.3s ease-in-out",
1134
- width: j.expanded ? "200px" : "0px",
1134
+ width: E.expanded ? "200px" : "0px",
1135
1135
  position: "relative"
1136
1136
  },
1137
1137
  children: [
1138
- /* @__PURE__ */ S(
1138
+ /* @__PURE__ */ v(
1139
1139
  T,
1140
1140
  {
1141
1141
  sx: {
@@ -1146,7 +1146,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
1146
1146
  borderRadius: "16px",
1147
1147
  backgroundColor: "#171927",
1148
1148
  paddingLeft: "40px",
1149
- paddingRight: j.expanded && j.value !== "" ? "40px" : "12px",
1149
+ paddingRight: E.expanded && E.value !== "" ? "40px" : "12px",
1150
1150
  color: "white",
1151
1151
  fontSize: "14px",
1152
1152
  border: "none !important",
@@ -1220,7 +1220,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
1220
1220
  }
1221
1221
  },
1222
1222
  children: [
1223
- j.expanded && /* @__PURE__ */ a(
1223
+ E.expanded && /* @__PURE__ */ s(
1224
1224
  It,
1225
1225
  {
1226
1226
  fontSize: "small",
@@ -1235,14 +1235,14 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
1235
1235
  }
1236
1236
  }
1237
1237
  ),
1238
- /* @__PURE__ */ a(pe, { placeholder: l })
1238
+ /* @__PURE__ */ s(pe, { placeholder: l })
1239
1239
  ]
1240
1240
  }
1241
1241
  ),
1242
- j.expanded && j.value !== "" && /* @__PURE__ */ a(
1242
+ E.expanded && E.value !== "" && /* @__PURE__ */ s(
1243
1243
  me,
1244
1244
  {
1245
- render: /* @__PURE__ */ a(
1245
+ render: /* @__PURE__ */ s(
1246
1246
  T,
1247
1247
  {
1248
1248
  sx: {
@@ -1252,7 +1252,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
1252
1252
  transform: "translateY(-50%)",
1253
1253
  zIndex: 1
1254
1254
  },
1255
- children: /* @__PURE__ */ a(
1255
+ children: /* @__PURE__ */ s(
1256
1256
  T,
1257
1257
  {
1258
1258
  sx: {
@@ -1265,7 +1265,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
1265
1265
  backgroundColor: "rgba(255, 255, 255, 0.1)"
1266
1266
  }
1267
1267
  },
1268
- children: /* @__PURE__ */ a(st, { "aria-label": "Clear", children: /* @__PURE__ */ a(re, { fontSize: "small" }) })
1268
+ children: /* @__PURE__ */ s(st, { "aria-label": "Clear", children: /* @__PURE__ */ s(re, { fontSize: "small" }) })
1269
1269
  }
1270
1270
  )
1271
1271
  }
@@ -1287,11 +1287,11 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
1287
1287
  }
1288
1288
  ) });
1289
1289
  }
1290
- const k = m || M;
1291
- return /* @__PURE__ */ a(
1290
+ const k = f || M;
1291
+ return /* @__PURE__ */ s(
1292
1292
  T,
1293
1293
  {
1294
- ref: y,
1294
+ ref: S,
1295
1295
  sx: {
1296
1296
  height: "100%",
1297
1297
  display: "flex",
@@ -1306,7 +1306,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
1306
1306
  },
1307
1307
  "&:hover *": {
1308
1308
  scrollbarWidth: "thin",
1309
- scrollbarColor: `${p.palette.divider} transparent`,
1309
+ scrollbarColor: `${g.palette.divider} transparent`,
1310
1310
  "&::-webkit-scrollbar": {
1311
1311
  display: "block",
1312
1312
  width: "8px",
@@ -1316,22 +1316,22 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
1316
1316
  background: "transparent"
1317
1317
  },
1318
1318
  "&::-webkit-scrollbar-thumb": {
1319
- background: p.palette.divider,
1319
+ background: g.palette.divider,
1320
1320
  borderRadius: "4px"
1321
1321
  },
1322
1322
  "&::-webkit-scrollbar-thumb:hover": {
1323
- background: p.palette.action.hover
1323
+ background: g.palette.action.hover
1324
1324
  }
1325
1325
  },
1326
- ...u
1326
+ ...p
1327
1327
  },
1328
- children: /* @__PURE__ */ a(
1328
+ children: /* @__PURE__ */ s(
1329
1329
  le,
1330
1330
  {
1331
- apiRef: x,
1332
- rows: v,
1331
+ apiRef: m,
1332
+ rows: y,
1333
1333
  columns: e,
1334
- onRowClick: w,
1334
+ onRowClick: C,
1335
1335
  disableColumnMenu: !1,
1336
1336
  disableRowSelectionOnClick: !0,
1337
1337
  disableMultipleRowSelection: !0,
@@ -1352,19 +1352,19 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
1352
1352
  items: []
1353
1353
  }
1354
1354
  },
1355
- ...g == null ? void 0 : g.initialState
1355
+ ...u == null ? void 0 : u.initialState
1356
1356
  },
1357
- ...g,
1357
+ ...u,
1358
1358
  autosizeOnMount: !0,
1359
1359
  autosizeOptions: {
1360
1360
  // Merge any custom autosize options first
1361
- ...(g == null ? void 0 : g.autosizeOptions) || {},
1361
+ ...(u == null ? void 0 : u.autosizeOptions) || {},
1362
1362
  // Force these key properties to always be true to maintain autosize behavior
1363
1363
  includeOutliers: !0,
1364
1364
  includeHeaders: !0,
1365
1365
  expand: !0,
1366
1366
  // Auto-size all columns by default (can be overridden by dataGridProps)
1367
- columns: ((R = g == null ? void 0 : g.autosizeOptions) == null ? void 0 : R.columns) || e.map((I) => I.field)
1367
+ columns: ((R = u == null ? void 0 : u.autosizeOptions) == null ? void 0 : R.columns) || e.map((I) => I.field)
1368
1368
  },
1369
1369
  sx: {
1370
1370
  border: "none",
@@ -1416,8 +1416,8 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
1416
1416
  }
1417
1417
  },
1418
1418
  // Highlight selected row with a distinct color using data attribute
1419
- ...C !== null && {
1420
- [`&[data-id="${C}"]`]: {
1419
+ ...w !== null && {
1420
+ [`&[data-id="${w}"]`]: {
1421
1421
  backgroundColor: "transparent !important",
1422
1422
  "&::before": {
1423
1423
  content: '""',
@@ -1504,7 +1504,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
1504
1504
  // Remove any remaining MUI background overlays
1505
1505
  "& .MuiBackdrop-root": {},
1506
1506
  "& .MuiModal-backdrop": {},
1507
- ...g == null ? void 0 : g.sx
1507
+ ...u == null ? void 0 : u.sx
1508
1508
  }
1509
1509
  }
1510
1510
  )
@@ -1514,7 +1514,7 @@ const co = (t) => /* @__PURE__ */ a(oe, { ...t, viewBox: "0 0 10 8", children: /
1514
1514
  )
1515
1515
  );
1516
1516
  bo.displayName = "WandelbotsDataGrid";
1517
- const Pt = $(
1517
+ const _t = $(
1518
1518
  J(
1519
1519
  ({
1520
1520
  colors: t,
@@ -1524,18 +1524,18 @@ const Pt = $(
1524
1524
  stopJogging: i,
1525
1525
  disabled: n,
1526
1526
  activeJoggingDirection: c,
1527
- ...s
1527
+ ...a
1528
1528
  }) => {
1529
- var b, w, C, M, k, R, I;
1529
+ var b, C, w, M, k, R, I;
1530
1530
  pt(() => {
1531
- const j = o(), z = u.current;
1532
- z && (z.textContent = j);
1531
+ const E = o(), z = p.current;
1532
+ z && (z.textContent = E);
1533
1533
  });
1534
- const l = F(), [g, m] = B(null);
1534
+ const l = F(), [u, f] = B(null);
1535
1535
  A(() => {
1536
- n && v();
1536
+ n && y();
1537
1537
  }, [n]);
1538
- const d = c || g, u = D(null);
1538
+ const d = c || u, p = D(null);
1539
1539
  t || (t = {
1540
1540
  color: "#fff",
1541
1541
  backgroundColor: "#000",
@@ -1548,7 +1548,7 @@ const Pt = $(
1548
1548
  },
1549
1549
  labelColor: "#000"
1550
1550
  });
1551
- const p = d ? (b = t.buttonBackgroundColor) == null ? void 0 : b.pressed : t.borderColor, x = {
1551
+ const g = d ? (b = t.buttonBackgroundColor) == null ? void 0 : b.pressed : t.borderColor, m = {
1552
1552
  width: "55px",
1553
1553
  color: t.color,
1554
1554
  path: { fill: t.color },
@@ -1557,11 +1557,11 @@ const Pt = $(
1557
1557
  svg: {
1558
1558
  pointerEvents: "none"
1559
1559
  }
1560
- }, y = {
1561
- ...x,
1562
- backgroundColor: (w = t.buttonBackgroundColor) == null ? void 0 : w.default,
1560
+ }, S = {
1561
+ ...m,
1562
+ backgroundColor: (C = t.buttonBackgroundColor) == null ? void 0 : C.default,
1563
1563
  ":hover": {
1564
- backgroundColor: (C = t.buttonBackgroundColor) == null ? void 0 : C.hovered
1564
+ backgroundColor: (w = t.buttonBackgroundColor) == null ? void 0 : w.hovered
1565
1565
  },
1566
1566
  ":active": {
1567
1567
  backgroundColor: (M = t.buttonBackgroundColor) == null ? void 0 : M.pressed,
@@ -1572,8 +1572,8 @@ const Pt = $(
1572
1572
  backgroundColor: (k = t.buttonBackgroundColor) == null ? void 0 : k.disabled,
1573
1573
  "svg path": { fill: l.palette.action.disabled }
1574
1574
  }
1575
- }, f = {
1576
- ...x,
1575
+ }, x = {
1576
+ ...m,
1577
1577
  backgroundColor: (R = t.buttonBackgroundColor) == null ? void 0 : R.pressed,
1578
1578
  color: t.backgroundColor,
1579
1579
  path: { fill: t.backgroundColor },
@@ -1582,34 +1582,34 @@ const Pt = $(
1582
1582
  "svg path": { fill: l.palette.action.disabled }
1583
1583
  }
1584
1584
  };
1585
- function h(j, z) {
1586
- n || j.button === 0 && (m(z), r(z));
1585
+ function h(E, z) {
1586
+ n || E.button === 0 && (f(z), r(z));
1587
1587
  }
1588
- function v() {
1589
- m(null), i();
1588
+ function y() {
1589
+ f(null), i();
1590
1590
  }
1591
- return /* @__PURE__ */ S(_, { height: "64px", direction: "row", justifyContent: "center", ...s, children: [
1592
- /* @__PURE__ */ a(
1591
+ return /* @__PURE__ */ v(P, { height: "64px", direction: "row", justifyContent: "center", ...a, children: [
1592
+ /* @__PURE__ */ s(
1593
1593
  H,
1594
1594
  {
1595
1595
  disabled: n,
1596
1596
  disableRipple: !0,
1597
- onPointerDown: (j) => h(j, "-"),
1598
- onPointerUp: v,
1599
- onPointerOut: v,
1597
+ onPointerDown: (E) => h(E, "-"),
1598
+ onPointerUp: y,
1599
+ onPointerOut: y,
1600
1600
  size: "large",
1601
1601
  sx: {
1602
- ...d === "-" ? f : y,
1602
+ ...d === "-" ? x : S,
1603
1603
  borderRadius: "16px 0px 0px 16px",
1604
- borderLeft: `2px solid ${p ?? "#fff"}`,
1605
- borderBottom: `2px solid ${p ?? "#fff"}`,
1606
- borderTop: `2px solid ${p ?? "#fff"}`
1604
+ borderLeft: `2px solid ${g ?? "#fff"}`,
1605
+ borderBottom: `2px solid ${g ?? "#fff"}`,
1606
+ borderTop: `2px solid ${g ?? "#fff"}`
1607
1607
  },
1608
- children: /* @__PURE__ */ a(Pe, {})
1608
+ children: /* @__PURE__ */ s(_e, {})
1609
1609
  }
1610
1610
  ),
1611
- /* @__PURE__ */ S(
1612
- _,
1611
+ /* @__PURE__ */ v(
1612
+ P,
1613
1613
  {
1614
1614
  spacing: "6px",
1615
1615
  sx: {
@@ -1618,12 +1618,12 @@ const Pt = $(
1618
1618
  alignItems: "center",
1619
1619
  justifyContent: "center",
1620
1620
  opacity: "0.9",
1621
- borderBottom: `2px solid ${p ?? "#fff"}`,
1622
- borderTop: `2px solid ${p ?? "#fff"}`
1621
+ borderBottom: `2px solid ${g ?? "#fff"}`,
1622
+ borderTop: `2px solid ${g ?? "#fff"}`
1623
1623
  },
1624
1624
  children: [
1625
- /* @__PURE__ */ a(
1626
- _,
1625
+ /* @__PURE__ */ s(
1626
+ P,
1627
1627
  {
1628
1628
  height: "22px",
1629
1629
  direction: "row",
@@ -1642,8 +1642,8 @@ const Pt = $(
1642
1642
  children: e
1643
1643
  }
1644
1644
  ),
1645
- /* @__PURE__ */ a(
1646
- E,
1645
+ /* @__PURE__ */ s(
1646
+ j,
1647
1647
  {
1648
1648
  height: "22px",
1649
1649
  sx: {
@@ -1654,30 +1654,30 @@ const Pt = $(
1654
1654
  minWidth: "80px",
1655
1655
  textAlign: "center"
1656
1656
  },
1657
- ref: u,
1657
+ ref: p,
1658
1658
  children: o()
1659
1659
  }
1660
1660
  )
1661
1661
  ]
1662
1662
  }
1663
1663
  ),
1664
- /* @__PURE__ */ a(
1664
+ /* @__PURE__ */ s(
1665
1665
  H,
1666
1666
  {
1667
1667
  disableRipple: !0,
1668
1668
  disabled: n,
1669
- onPointerDown: (j) => h(j, "+"),
1670
- onPointerUp: v,
1671
- onPointerOut: v,
1669
+ onPointerDown: (E) => h(E, "+"),
1670
+ onPointerUp: y,
1671
+ onPointerOut: y,
1672
1672
  size: "large",
1673
1673
  sx: {
1674
- ...d === "+" ? f : y,
1674
+ ...d === "+" ? x : S,
1675
1675
  borderRadius: "0px 16px 16px 0px",
1676
- borderRight: `2px solid ${p ?? "#fff"}`,
1677
- borderBottom: `2px solid ${p ?? "#fff"}`,
1678
- borderTop: `2px solid ${p ?? "#fff"}`
1676
+ borderRight: `2px solid ${g ?? "#fff"}`,
1677
+ borderBottom: `2px solid ${g ?? "#fff"}`,
1678
+ borderTop: `2px solid ${g ?? "#fff"}`
1679
1679
  },
1680
- children: /* @__PURE__ */ a(_e, {})
1680
+ children: /* @__PURE__ */ s(Pe, {})
1681
1681
  }
1682
1682
  )
1683
1683
  ] });
@@ -1693,13 +1693,13 @@ const Pt = $(
1693
1693
  useDegree: i,
1694
1694
  getValue: n,
1695
1695
  disabled: c,
1696
- ...s
1696
+ ...a
1697
1697
  }) => {
1698
- var M, k, R, I, j, z, Q, ot, xt, yt, St, vt, Ct, wt, Tt;
1699
- const { t: l } = V(), [g, m] = B(), d = F(), u = {
1698
+ var M, k, R, I, E, z, Q, ot, xt, yt, St, vt, wt, Ct, Tt;
1699
+ const { t: l } = V(), [u, f] = B(), d = F(), p = {
1700
1700
  background: (M = d.palette.backgroundPaperElevation) == null ? void 0 : M[4],
1701
1701
  color: (k = d.palette.backgroundPaperElevation) == null ? void 0 : k[11]
1702
- }, p = Ft(() => ({
1702
+ }, g = Ft(() => ({
1703
1703
  activeJoggingDir: null,
1704
1704
  startJogging(O) {
1705
1705
  this.activeJoggingDir = O, t(O);
@@ -1707,49 +1707,49 @@ const Pt = $(
1707
1707
  stopJogging() {
1708
1708
  this.activeJoggingDir = null, e();
1709
1709
  }
1710
- })), x = He(() => {
1711
- const O = i ? y(n()) : n();
1712
- (O === void 0 || g === void 0 || Math.abs(g - O) > 1e-9) && m(O);
1710
+ })), m = He(() => {
1711
+ const O = i ? S(n()) : n();
1712
+ (O === void 0 || u === void 0 || Math.abs(u - O) > 1e-9) && f(O);
1713
1713
  }, 50);
1714
- pt(x);
1715
- function y(O) {
1714
+ pt(m);
1715
+ function S(O) {
1716
1716
  if (O !== void 0)
1717
1717
  return Vt(O);
1718
1718
  }
1719
- function f(O) {
1720
- O.button === 0 && p.startJogging("-");
1719
+ function x(O) {
1720
+ O.button === 0 && g.startJogging("-");
1721
1721
  }
1722
1722
  function h(O) {
1723
- O.button === 0 && p.startJogging("+");
1723
+ O.button === 0 && g.startJogging("+");
1724
1724
  }
1725
- function v(O) {
1726
- p.stopJogging();
1725
+ function y(O) {
1726
+ g.stopJogging();
1727
1727
  }
1728
1728
  function b(O) {
1729
- p.stopJogging();
1729
+ g.stopJogging();
1730
1730
  }
1731
- function w(O, X = 1) {
1731
+ function C(O, X = 1) {
1732
1732
  if (O === void 0 || Number.isNaN(O)) return "";
1733
1733
  const K = l("General.degree.variable", {
1734
1734
  amount: O.toFixed(X)
1735
1735
  });
1736
1736
  return O > 0 && X === 0 ? `+${K}` : K;
1737
1737
  }
1738
- function C(O, X = 1) {
1738
+ function w(O, X = 1) {
1739
1739
  if (O === void 0 || Number.isNaN(O)) return "";
1740
1740
  const K = l("General.mm.variable", {
1741
1741
  amount: O.toFixed(X)
1742
1742
  });
1743
1743
  return O > 0 && X === 0 ? `+${K}` : K;
1744
1744
  }
1745
- return /* @__PURE__ */ S(
1746
- _,
1745
+ return /* @__PURE__ */ v(
1746
+ P,
1747
1747
  {
1748
1748
  height: "64px",
1749
1749
  width: "100%",
1750
1750
  maxWidth: "260px",
1751
1751
  direction: "row",
1752
- ...s,
1752
+ ...a,
1753
1753
  sx: {
1754
1754
  "& .MuiIconButton-root": {
1755
1755
  width: "52px",
@@ -1766,27 +1766,27 @@ const Pt = $(
1766
1766
  opacity: 1
1767
1767
  },
1768
1768
  "&:hover": {
1769
- backgroundColor: (j = d.palette.backgroundPaperElevation) == null ? void 0 : j[9]
1769
+ backgroundColor: (E = d.palette.backgroundPaperElevation) == null ? void 0 : E[9]
1770
1770
  },
1771
1771
  "&:active": {
1772
- ...u
1772
+ ...p
1773
1773
  }
1774
1774
  }
1775
1775
  },
1776
1776
  children: [
1777
- /* @__PURE__ */ a(
1777
+ /* @__PURE__ */ s(
1778
1778
  H,
1779
1779
  {
1780
- onPointerDown: f,
1781
- onPointerUp: v,
1780
+ onPointerDown: x,
1781
+ onPointerUp: y,
1782
1782
  onPointerOut: b,
1783
1783
  disabled: c,
1784
1784
  disableRipple: !0,
1785
1785
  sx: {
1786
1786
  borderRadius: "16px 0px 0px 16px",
1787
- ...p.activeJoggingDir === "-" ? u : {}
1787
+ ...g.activeJoggingDir === "-" ? p : {}
1788
1788
  },
1789
- children: /* @__PURE__ */ a(
1789
+ children: /* @__PURE__ */ s(
1790
1790
  Ge,
1791
1791
  {
1792
1792
  sx: {
@@ -1797,8 +1797,8 @@ const Pt = $(
1797
1797
  )
1798
1798
  }
1799
1799
  ),
1800
- /* @__PURE__ */ S(
1801
- _,
1800
+ /* @__PURE__ */ v(
1801
+ P,
1802
1802
  {
1803
1803
  flexGrow: 1,
1804
1804
  alignItems: "center",
@@ -1814,8 +1814,8 @@ const Pt = $(
1814
1814
  zIndex: 1
1815
1815
  },
1816
1816
  children: [
1817
- /* @__PURE__ */ a(
1818
- E,
1817
+ /* @__PURE__ */ s(
1818
+ j,
1819
1819
  {
1820
1820
  sx: {
1821
1821
  fontSize: "15px",
@@ -1827,17 +1827,17 @@ const Pt = $(
1827
1827
  textAlign: "center",
1828
1828
  color: c ? d.palette.action.disabled : d.palette.text.primary
1829
1829
  },
1830
- children: i ? w(g) : C(g)
1830
+ children: i ? C(u) : w(u)
1831
1831
  }
1832
1832
  ),
1833
- /* @__PURE__ */ a(
1833
+ /* @__PURE__ */ s(
1834
1834
  Nt,
1835
1835
  {
1836
1836
  disabled: !0,
1837
1837
  "aria-label": "Joint position",
1838
- min: i ? y(o) : o,
1839
- max: i ? y(r) : r,
1840
- value: g || 0,
1838
+ min: i ? S(o) : o,
1839
+ max: i ? S(r) : r,
1840
+ value: u || 0,
1841
1841
  track: !1,
1842
1842
  sx: {
1843
1843
  "& .MuiSlider-mark": {
@@ -1861,12 +1861,12 @@ const Pt = $(
1861
1861
  },
1862
1862
  marks: o !== void 0 && r !== void 0 && [
1863
1863
  {
1864
- value: i ? y(o) : o,
1865
- label: i ? w(y(o), 0) : C(o)
1864
+ value: i ? S(o) : o,
1865
+ label: i ? C(S(o), 0) : w(o)
1866
1866
  },
1867
1867
  {
1868
- value: i ? y(r) : r,
1869
- label: i ? w(y(r), 0) : C(r)
1868
+ value: i ? S(r) : r,
1869
+ label: i ? C(S(r), 0) : w(r)
1870
1870
  }
1871
1871
  ]
1872
1872
  }
@@ -1874,24 +1874,24 @@ const Pt = $(
1874
1874
  ]
1875
1875
  }
1876
1876
  ),
1877
- /* @__PURE__ */ a(
1877
+ /* @__PURE__ */ s(
1878
1878
  H,
1879
1879
  {
1880
1880
  onPointerDown: h,
1881
- onPointerUp: v,
1881
+ onPointerUp: y,
1882
1882
  onPointerOut: b,
1883
1883
  disabled: c,
1884
1884
  disableRipple: !0,
1885
1885
  sx: {
1886
1886
  borderRadius: "0px 16px 16px 0px",
1887
- ...p.activeJoggingDir === "+" ? u : {}
1887
+ ...g.activeJoggingDir === "+" ? p : {}
1888
1888
  },
1889
- children: /* @__PURE__ */ a(
1889
+ children: /* @__PURE__ */ s(
1890
1890
  Ue,
1891
1891
  {
1892
1892
  sx: {
1893
1893
  pointerEvents: "none",
1894
- color: (Tt = (wt = (Ct = (vt = d.componentsExt) == null ? void 0 : vt.JoggingPanel) == null ? void 0 : Ct.JoggingJoint) == null ? void 0 : wt.Joint) == null ? void 0 : Tt.arrowColor
1894
+ color: (Tt = (Ct = (wt = (vt = d.componentsExt) == null ? void 0 : vt.JoggingPanel) == null ? void 0 : wt.JoggingJoint) == null ? void 0 : Ct.Joint) == null ? void 0 : Tt.arrowColor
1895
1895
  }
1896
1896
  }
1897
1897
  )
@@ -1930,43 +1930,43 @@ function Gt(t, e, o) {
1930
1930
  );
1931
1931
  }
1932
1932
  function So(t, e) {
1933
- const o = new jt(
1933
+ const o = new Et(
1934
1934
  e[0],
1935
1935
  e[1],
1936
1936
  e[2]
1937
- ), r = new jt(
1937
+ ), r = new Et(
1938
1938
  t[0],
1939
1939
  t[1],
1940
1940
  t[2]
1941
1941
  ), i = o.length(), n = o.normalize();
1942
- let c = r.length(), s = r.normalize();
1943
- s.dot(n) < 0 && (c = -c, s = s.multiplyScalar(-1));
1942
+ let c = r.length(), a = r.normalize();
1943
+ a.dot(n) < 0 && (c = -c, a = a.multiplyScalar(-1));
1944
1944
  let l = c - i;
1945
- return l -= 2 * Math.PI * Math.floor((l + Math.PI) / (2 * Math.PI)), c = i + l, [...s.multiplyScalar(c)];
1945
+ return l -= 2 * Math.PI * Math.floor((l + Math.PI) / (2 * Math.PI)), c = i + l, [...a.multiplyScalar(c)];
1946
1946
  }
1947
- const _t = 1e-4;
1947
+ const Pt = 1e-4;
1948
1948
  class ht {
1949
1949
  constructor(e, o, r, i, n, c) {
1950
- this.nova = e, this.controller = o, this.motionGroup = r, this.description = i, this.initialMotionState = n, this.motionStateSocket = c, this.rapidlyChangingMotionState = n, c.addEventListener("message", (s) => {
1951
- var g;
1952
- const l = (g = W(s.data)) == null ? void 0 : g.result;
1950
+ this.nova = e, this.controller = o, this.motionGroup = r, this.description = i, this.initialMotionState = n, this.motionStateSocket = c, this.rapidlyChangingMotionState = n, c.addEventListener("message", (a) => {
1951
+ var u;
1952
+ const l = (u = W(a.data)) == null ? void 0 : u.result;
1953
1953
  if (!l)
1954
1954
  throw new Error(
1955
- `Failed to get motion state for ${this.motionGroupId}: ${s.data}`
1955
+ `Failed to get motion state for ${this.motionGroupId}: ${a.data}`
1956
1956
  );
1957
1957
  Wt(
1958
1958
  this.rapidlyChangingMotionState.joint_position,
1959
1959
  l.joint_position,
1960
- _t
1960
+ Pt
1961
1961
  ) || L(() => {
1962
1962
  this.rapidlyChangingMotionState.joint_position = l.joint_position;
1963
1963
  }), Gt(
1964
1964
  this.rapidlyChangingMotionState,
1965
1965
  l,
1966
- _t
1966
+ Pt
1967
1967
  ) || L(() => {
1968
- var m, d, u;
1969
- this.rapidlyChangingMotionState.tcp_pose == null ? this.rapidlyChangingMotionState.tcp_pose = l.tcp_pose : (m = l.tcp_pose) != null && m.orientation && ((d = l.tcp_pose) != null && d.position) && ((u = this.rapidlyChangingMotionState.tcp_pose) != null && u.orientation) ? this.rapidlyChangingMotionState.tcp_pose = {
1968
+ var f, d, p;
1969
+ this.rapidlyChangingMotionState.tcp_pose == null ? this.rapidlyChangingMotionState.tcp_pose = l.tcp_pose : (f = l.tcp_pose) != null && f.orientation && ((d = l.tcp_pose) != null && d.position) && ((p = this.rapidlyChangingMotionState.tcp_pose) != null && p.orientation) ? this.rapidlyChangingMotionState.tcp_pose = {
1970
1970
  position: l.tcp_pose.position,
1971
1971
  orientation: So(
1972
1972
  l.tcp_pose.orientation,
@@ -1984,25 +1984,25 @@ class ht {
1984
1984
  static async open(e, o) {
1985
1985
  var d;
1986
1986
  const [r, i] = o.split("@"), n = await e.api.controller.getCurrentRobotControllerState(i), c = n == null ? void 0 : n.motion_groups.find(
1987
- (u) => u.motion_group === o
1987
+ (p) => p.motion_group === o
1988
1988
  );
1989
1989
  if (!n || !c)
1990
1990
  throw new Error(
1991
1991
  `Controller ${i} or motion group ${o} not found`
1992
1992
  );
1993
- const s = e.openReconnectingWebsocket(
1993
+ const a = e.openReconnectingWebsocket(
1994
1994
  `/controllers/${i}/motion-groups/${o}/state-stream`
1995
- ), l = await s.firstMessage(), g = (d = W(l.data)) == null ? void 0 : d.result;
1996
- if (!g)
1995
+ ), l = await a.firstMessage(), u = (d = W(l.data)) == null ? void 0 : d.result;
1996
+ if (!u)
1997
1997
  throw new Error(
1998
1998
  `Unable to parse initial motion state message ${l.data}`
1999
1999
  );
2000
2000
  console.log(
2001
2001
  `Connected motion state websocket to motion group ${c.motion_group}. Initial state:
2002
2002
  `,
2003
- g
2003
+ u
2004
2004
  );
2005
- const m = await e.api.motionGroup.getMotionGroupDescription(
2005
+ const f = await e.api.motionGroup.getMotionGroupDescription(
2006
2006
  i,
2007
2007
  c.motion_group
2008
2008
  );
@@ -2010,9 +2010,9 @@ class ht {
2010
2010
  e,
2011
2011
  n,
2012
2012
  c,
2013
- m,
2014
- g,
2015
- s
2013
+ f,
2014
+ u,
2015
+ a
2016
2016
  );
2017
2017
  }
2018
2018
  get motionGroupId() {
@@ -2122,15 +2122,15 @@ class ft {
2122
2122
  this.joggingSocket = this.nova.openReconnectingWebsocket(
2123
2123
  `/controllers/${this.motionStream.controllerId}/execution/jogging`
2124
2124
  ), this.joggingSocket.addEventListener("message", (i) => {
2125
- var c, s, l, g;
2125
+ var c, a, l, u;
2126
2126
  const n = W(i.data);
2127
2127
  if (((c = n == null ? void 0 : n.result) == null ? void 0 : c.kind) === "INITIALIZE_RECEIVED") {
2128
2128
  clearTimeout(r), e();
2129
2129
  return;
2130
2130
  }
2131
- if (((s = n == null ? void 0 : n.result) == null ? void 0 : s.kind) === "MOTION_ERROR")
2131
+ if (((a = n == null ? void 0 : n.result) == null ? void 0 : a.kind) === "MOTION_ERROR")
2132
2132
  if (clearTimeout(r), this.onBlocked && ((l = n == null ? void 0 : n.result) != null && l.message.includes(Ot))) {
2133
- (g = this.joggingSocket) == null || g.dispose(), this.onBlocked();
2133
+ (u = this.joggingSocket) == null || u.dispose(), this.onBlocked();
2134
2134
  return;
2135
2135
  } else this.onError ? this.onError(i.data) : o(new Error(i.data));
2136
2136
  }), this.joggingSocket.sendJson({
@@ -2195,7 +2195,8 @@ class ft {
2195
2195
  i[tt[e]] = o === "-" ? -r : r, this.joggingSocket.sendJson({
2196
2196
  message_type: "TcpVelocityRequest",
2197
2197
  translation: n,
2198
- rotation: i
2198
+ rotation: i,
2199
+ use_tool_coordinate_system: this.orientation === "tool"
2199
2200
  });
2200
2201
  }
2201
2202
  /**
@@ -2214,7 +2215,7 @@ class ft {
2214
2215
  direction: n,
2215
2216
  motion: c
2216
2217
  }) {
2217
- const s = [];
2218
+ const a = [];
2218
2219
  if (this.mode !== "trajectory")
2219
2220
  throw new Error(
2220
2221
  "Set jogging mode to 'trajectory' to run incremental cartesian motions"
@@ -2224,15 +2225,15 @@ class ft {
2224
2225
  throw new Error(
2225
2226
  "Current pose has no position, cannot perform translation"
2226
2227
  );
2227
- const f = [...e.position];
2228
- f[tt[i]] += c.distanceMm * (n === "-" ? -1 : 1), s.push({
2228
+ const x = [...e.position];
2229
+ x[tt[i]] += c.distanceMm * (n === "-" ? -1 : 1), a.push({
2229
2230
  limits_override: {
2230
2231
  tcp_velocity_limit: r
2231
2232
  },
2232
2233
  path: {
2233
2234
  path_definition_name: "PathLine",
2234
2235
  target_pose: {
2235
- position: f,
2236
+ position: x,
2236
2237
  orientation: e.orientation
2237
2238
  }
2238
2239
  }
@@ -2242,16 +2243,16 @@ class ft {
2242
2243
  throw new Error(
2243
2244
  "Current pose has no orientation, cannot perform rotation"
2244
2245
  );
2245
- const f = new ct(
2246
+ const x = new ct(
2246
2247
  e.orientation[0],
2247
2248
  e.orientation[1],
2248
2249
  e.orientation[2]
2249
- ), h = f.length(), v = f.clone().normalize(), b = c.distanceRads * (n === "-" ? -1 : 1), w = new ct(0, 0, 0);
2250
- w[i] = 1;
2251
- const C = Math.cos(0.5 * b) * Math.cos(0.5 * h), M = Math.sin(0.5 * b) * Math.sin(0.5 * h), k = Math.sin(0.5 * b) * Math.cos(0.5 * h), R = Math.cos(0.5 * b) * Math.sin(0.5 * h), I = w.dot(
2252
- v
2253
- ), j = w.clone().cross(v), z = 2 * Math.acos(C - M * I), Q = z / Math.sin(0.5 * z), ot = new ct().addScaledVector(j, M).addScaledVector(w, k).addScaledVector(v, R).multiplyScalar(Q);
2254
- s.push({
2250
+ ), h = x.length(), y = x.clone().normalize(), b = c.distanceRads * (n === "-" ? -1 : 1), C = new ct(0, 0, 0);
2251
+ C[i] = 1;
2252
+ const w = Math.cos(0.5 * b) * Math.cos(0.5 * h), M = Math.sin(0.5 * b) * Math.sin(0.5 * h), k = Math.sin(0.5 * b) * Math.cos(0.5 * h), R = Math.cos(0.5 * b) * Math.sin(0.5 * h), I = C.dot(
2253
+ y
2254
+ ), E = C.clone().cross(y), z = 2 * Math.acos(w - M * I), Q = z / Math.sin(0.5 * z), ot = new ct().addScaledVector(E, M).addScaledVector(C, k).addScaledVector(y, R).multiplyScalar(Q);
2255
+ a.push({
2255
2256
  limits_override: {
2256
2257
  tcp_orientation_velocity_limit: r
2257
2258
  },
@@ -2271,35 +2272,35 @@ class ft {
2271
2272
  );
2272
2273
  return;
2273
2274
  }
2274
- const g = {
2275
+ const u = {
2275
2276
  motion_group_model: l.motion_group_model,
2276
2277
  cycle_time: l.cycle_time,
2277
2278
  mounting: l.mounting,
2278
2279
  // tcp_offset: description.tcp_offset, TODO: implement tcp_offset handling
2279
2280
  // FIXME use proper mode's limits if set
2280
2281
  global: l.operation_limits.auto_limits
2281
- }, m = await this.nova.api.trajectoryPlanning.planTrajectory(
2282
+ }, f = await this.nova.api.trajectoryPlanning.planTrajectory(
2282
2283
  {
2283
- motion_group_setup: g,
2284
+ motion_group_setup: u,
2284
2285
  start_joint_position: o,
2285
- motion_commands: s
2286
+ motion_commands: a
2286
2287
  }
2287
- ), d = m.response;
2288
+ ), d = f.response;
2288
2289
  if (!d)
2289
2290
  throw new Error(
2290
- `Failed to plan jogging increment motion ${JSON.stringify(m)}`
2291
+ `Failed to plan jogging increment motion ${JSON.stringify(f)}`
2291
2292
  );
2292
2293
  this.trajectorySocket && (console.warn("Trajectory jogging websocket already open; will close"), this.trajectorySocket.dispose()), this.trajectorySocket = this.nova.openReconnectingWebsocket(
2293
2294
  `/controllers/${this.motionStream.controllerId}/execution/trajectory`
2294
2295
  );
2295
- const u = (f) => {
2296
+ const p = (x) => {
2296
2297
  var h;
2297
- if (!f || f.add_trajectory_error || f.message)
2298
+ if (!x || x.add_trajectory_error || x.message)
2298
2299
  if (this.onError)
2299
- this.onError(f);
2300
+ this.onError(x);
2300
2301
  else
2301
2302
  throw new Error(
2302
- ((h = f == null ? void 0 : f.add_trajectory_error) == null ? void 0 : h.message) || (f == null ? void 0 : f.message) || "Failed to execute trajectory, unknown error"
2303
+ ((h = x == null ? void 0 : x.add_trajectory_error) == null ? void 0 : h.message) || (x == null ? void 0 : x.message) || "Failed to execute trajectory, unknown error"
2303
2304
  );
2304
2305
  if (!this.trajectorySocket)
2305
2306
  throw new Error(
@@ -2309,38 +2310,38 @@ class ft {
2309
2310
  message_type: "StartMovementRequest",
2310
2311
  direction: "DIRECTION_FORWARD"
2311
2312
  });
2312
- }, p = async () => {
2313
- var f;
2314
- await lt(() => !this.motionStream.rapidlyChangingMotionState.standstill), await lt(() => this.motionStream.rapidlyChangingMotionState.standstill), (f = this.trajectorySocket) == null || f.dispose(), this.trajectorySocket = null;
2315
- }, x = async () => {
2316
- var f;
2317
- await lt(() => this.motionStream.rapidlyChangingMotionState.standstill), (f = this.trajectorySocket) == null || f.dispose(), this.trajectorySocket = null;
2318
- }, y = async (f) => {
2319
- if (f != null && f.message)
2313
+ }, g = async () => {
2314
+ var x;
2315
+ await lt(() => !this.motionStream.rapidlyChangingMotionState.standstill), await lt(() => this.motionStream.rapidlyChangingMotionState.standstill), (x = this.trajectorySocket) == null || x.dispose(), this.trajectorySocket = null;
2316
+ }, m = async () => {
2317
+ var x;
2318
+ await lt(() => this.motionStream.rapidlyChangingMotionState.standstill), (x = this.trajectorySocket) == null || x.dispose(), this.trajectorySocket = null;
2319
+ }, S = async (x) => {
2320
+ if (x != null && x.message)
2320
2321
  if (this.onError) {
2321
- this.onError(f);
2322
+ this.onError(x);
2322
2323
  return;
2323
2324
  } else
2324
2325
  throw new Error(
2325
- f.message || "Failed to execute trajectory, unknown error"
2326
+ x.message || "Failed to execute trajectory, unknown error"
2326
2327
  );
2327
- this.motionStream.rapidlyChangingMotionState.standstill ? await p() : await x();
2328
+ this.motionStream.rapidlyChangingMotionState.standstill ? await g() : await m();
2328
2329
  };
2329
- this.trajectorySocket.addEventListener("message", (f) => {
2330
- var v, b;
2331
- const h = W(f.data);
2332
- if (!((v = h == null ? void 0 : h.result) != null && v.kind))
2330
+ this.trajectorySocket.addEventListener("message", (x) => {
2331
+ var y, b;
2332
+ const h = W(x.data);
2333
+ if (!((y = h == null ? void 0 : h.result) != null && y.kind))
2333
2334
  throw new Error(
2334
- `Failed to execute trajectory: Received invalid message ${f.data}`
2335
+ `Failed to execute trajectory: Received invalid message ${x.data}`
2335
2336
  );
2336
2337
  if (this.onBlocked && ((b = h.result.message) != null && b.includes(Ot))) {
2337
2338
  this.onBlocked();
2338
2339
  return;
2339
2340
  }
2340
2341
  if (h.result.kind === "INITIALIZE_RECEIVED")
2341
- u(h.result);
2342
+ p(h.result);
2342
2343
  else if (h.result.kind === "START_RECEIVED")
2343
- y(h);
2344
+ S(h);
2344
2345
  else if (h.result.kind !== "PAUSE_RECEIVED") if (h.result.kind === "MOTION_ERROR" && h.result.message)
2345
2346
  if (this.onError) {
2346
2347
  this.onError(h);
@@ -2369,25 +2370,25 @@ const vo = (t) => {
2369
2370
  r(!0);
2370
2371
  }, e);
2371
2372
  return () => clearTimeout(n);
2372
- }), /* @__PURE__ */ a(
2373
- _,
2373
+ }), /* @__PURE__ */ s(
2374
+ P,
2374
2375
  {
2375
2376
  width: "100%",
2376
2377
  height: "100%",
2377
2378
  alignItems: "center",
2378
2379
  justifyContent: "center",
2379
2380
  sx: { color: i.palette.text.primary },
2380
- children: t.error ? /* @__PURE__ */ a(
2381
- Co,
2381
+ children: t.error ? /* @__PURE__ */ s(
2382
+ wo,
2382
2383
  {
2383
2384
  loadingMessage: t.message,
2384
2385
  error: t.error
2385
2386
  }
2386
- ) : /* @__PURE__ */ S(et, { children: [
2387
- /* @__PURE__ */ a(Ie, { sx: { marginBottom: "24px" } }),
2388
- !!t.message && /* @__PURE__ */ a("div", { children: t.message }),
2389
- /* @__PURE__ */ a(
2390
- _,
2387
+ ) : /* @__PURE__ */ v(et, { children: [
2388
+ /* @__PURE__ */ s(Ie, { sx: { marginBottom: "24px" } }),
2389
+ !!t.message && /* @__PURE__ */ s("div", { children: t.message }),
2390
+ /* @__PURE__ */ s(
2391
+ P,
2391
2392
  {
2392
2393
  sx: {
2393
2394
  visibility: o ? "visible" : "hidden",
@@ -2400,10 +2401,10 @@ const vo = (t) => {
2400
2401
  ] })
2401
2402
  }
2402
2403
  );
2403
- }, Co = (t) => {
2404
+ }, wo = (t) => {
2404
2405
  const e = Re(t.error), o = t.error instanceof Error ? t.error.stack : null, r = F();
2405
- return /* @__PURE__ */ S(
2406
- _,
2406
+ return /* @__PURE__ */ v(
2407
+ P,
2407
2408
  {
2408
2409
  sx: {
2409
2410
  maxHeight: "100%",
@@ -2419,14 +2420,14 @@ const vo = (t) => {
2419
2420
  },
2420
2421
  children: [
2421
2422
  (t.loadingMessage ? `Error while ${ye(ke(t.loadingMessage))} - ` : "") + e,
2422
- /* @__PURE__ */ a("br", {}),
2423
- o && /* @__PURE__ */ a("pre", { children: o })
2423
+ /* @__PURE__ */ s("br", {}),
2424
+ o && /* @__PURE__ */ s("pre", { children: o })
2424
2425
  ]
2425
2426
  }
2426
2427
  );
2427
- }, wo = J(({ store: t }) => {
2428
+ }, Co = J(({ store: t }) => {
2428
2429
  const { t: e } = V();
2429
- return /* @__PURE__ */ a(
2430
+ return /* @__PURE__ */ s(
2430
2431
  Bt,
2431
2432
  {
2432
2433
  "data-testid": "jogging-blocked",
@@ -2440,12 +2441,12 @@ const vo = (t) => {
2440
2441
  justifyContent: "flex-start",
2441
2442
  alignItems: "flex-start"
2442
2443
  },
2443
- children: /* @__PURE__ */ S(_, { sx: { m: 2, width: "100%" }, children: [
2444
- /* @__PURE__ */ S(Ee, { severity: "error", sx: { mb: 2 }, children: [
2445
- /* @__PURE__ */ a(je, { children: e("Jogging.Blocked.ti") }),
2444
+ children: /* @__PURE__ */ v(P, { sx: { m: 2, width: "100%" }, children: [
2445
+ /* @__PURE__ */ v(je, { severity: "error", sx: { mb: 2 }, children: [
2446
+ /* @__PURE__ */ s(Ee, { children: e("Jogging.Blocked.ti") }),
2446
2447
  e("Jogging.Blocked.lb")
2447
2448
  ] }),
2448
- /* @__PURE__ */ a(
2449
+ /* @__PURE__ */ s(
2449
2450
  Z,
2450
2451
  {
2451
2452
  variant: "contained",
@@ -2467,10 +2468,10 @@ const vo = (t) => {
2467
2468
  Fe(i.current, c) || (i.current = c, r(c));
2468
2469
  });
2469
2470
  const n = [];
2470
- for (const [c, s] of o.entries())
2471
- s && n.push(c);
2472
- return /* @__PURE__ */ a(
2473
- E,
2471
+ for (const [c, a] of o.entries())
2472
+ a && n.push(c);
2473
+ return /* @__PURE__ */ s(
2474
+ j,
2474
2475
  {
2475
2476
  "data-testid": "jogging-joint-limit-detector",
2476
2477
  "aria-label": "jogging-joint-limit-detector",
@@ -2508,9 +2509,9 @@ function it({
2508
2509
  labelValue: t,
2509
2510
  ...e
2510
2511
  }) {
2511
- return /* @__PURE__ */ S(To, { fullWidth: !0, variant: "filled", children: [
2512
- /* @__PURE__ */ a($e, { id: e.labelId, children: t }),
2513
- /* @__PURE__ */ a(ze, { ...e })
2512
+ return /* @__PURE__ */ v(To, { fullWidth: !0, variant: "filled", children: [
2513
+ /* @__PURE__ */ s($e, { id: e.labelId, children: t }),
2514
+ /* @__PURE__ */ s(ze, { ...e })
2514
2515
  ] });
2515
2516
  }
2516
2517
  const dt = [
@@ -2524,16 +2525,16 @@ const dt = [
2524
2525
  ], Io = ["coordsys", "tool"];
2525
2526
  class bt {
2526
2527
  constructor(e, o, r, i, n) {
2527
- var c, s, l, g;
2528
+ var c, a, l, u;
2528
2529
  this.jogger = e, this.coordSystems = o, this.motionGroupDescription = r, this.tcps = i, this.inverseSolverValue = n, this.selectedTabId = "cartesian", this.locks = /* @__PURE__ */ new Set(), this.blocked = !1, this.selectedCoordSystemId = "world", this.selectedTcpId = "", this.selectedOrientation = "coordsys", this.selectedIncrementId = "continuous", this.selectedCartesianMotionType = "translate", this.incrementJogInProgress = null, this.translationVelocityMmPerSec = 10, this.rotationVelocityDegPerSec = 1, this.minTranslationVelocityMmPerSec = 5, this.maxTranslationVelocityMmPerSec = 250, this.minRotationVelocityDegPerSec = 1, this.maxRotationVelocityDegPerSec = 60, this.showCoordSystemSelect = !1, this.showTcpSelect = !0, this.showOrientationSelect = !0, this.showIncrementSelect = !0, this.showTabIcons = !1, this.showVelocitySliderLabel = !0, this.showVelocityLegend = !1, this.showJointsLegend = !1, this.disposers = [], this.inverseSolver = void 0, this.jointType = G.RevoluteJoint;
2529
- for (const m of o)
2530
- if (m.coordinate_system === "") {
2531
- m.coordinate_system = "world";
2530
+ for (const f of o)
2531
+ if (f.coordinate_system === "") {
2532
+ f.coordinate_system = "world";
2532
2533
  break;
2533
2534
  }
2534
- this.selectedCoordSystemId = ((c = o[0]) == null ? void 0 : c.coordinate_system) || "world", this.selectedTcpId = ((s = i[0]) == null ? void 0 : s.id) || "", this.inverseSolver = n, this.jointType = ((g = (l = r == null ? void 0 : r.dh_parameters) == null ? void 0 : l[0]) == null ? void 0 : g.type) ?? G.RevoluteJoint, mt(this, {}, { autoBind: !0 }), this.jogger.onBlocked = () => {
2535
+ this.selectedCoordSystemId = ((c = o[0]) == null ? void 0 : c.coordinate_system) || "world", this.selectedTcpId = ((a = i[0]) == null ? void 0 : a.id) || "", this.inverseSolver = n, this.jointType = ((u = (l = r == null ? void 0 : r.dh_parameters) == null ? void 0 : l[0]) == null ? void 0 : u.type) ?? G.RevoluteJoint, mt(this, {}, { autoBind: !0 }), this.jogger.onBlocked = () => {
2535
2536
  this.block();
2536
- }, this.loadFromLocalStorage(), this.disposers.push(Ce(() => this.saveToLocalStorage())), window.joggingStore = this;
2537
+ }, this.loadFromLocalStorage(), this.disposers.push(we(() => this.saveToLocalStorage())), window.joggingStore = this;
2537
2538
  }
2538
2539
  /**
2539
2540
  * Load a jogging store with the relevant data it needs
@@ -2553,8 +2554,8 @@ class bt {
2553
2554
  )
2554
2555
  ]), n = await o.api.motionGroupModels.getMotionGroupKinematicModel(
2555
2556
  i.motion_group_model
2556
- ), c = Object.entries(i.tcps || {}).map(([s, l]) => ({
2557
- id: s,
2557
+ ), c = Object.entries(i.tcps || {}).map(([a, l]) => ({
2558
+ id: a,
2558
2559
  readable_name: l.name,
2559
2560
  position: l.pose.position,
2560
2561
  orientation: l.pose.orientation
@@ -2724,18 +2725,18 @@ const ko = J(
2724
2725
  ({ store: t, useDegree: e }) => {
2725
2726
  var c;
2726
2727
  const { t: o } = V(), r = ee(), i = [];
2727
- function n(s) {
2728
- switch (s) {
2728
+ function n(a) {
2729
+ switch (a) {
2729
2730
  case "coordsys":
2730
2731
  return o("Jogging.Orientation.coordsys");
2731
2732
  case "tool":
2732
2733
  return o("Jogging.Orientation.tool");
2733
2734
  default:
2734
- return s;
2735
+ return a;
2735
2736
  }
2736
2737
  }
2737
2738
  return t.showCoordSystemSelect && i.push(
2738
- /* @__PURE__ */ a(
2739
+ /* @__PURE__ */ s(
2739
2740
  it,
2740
2741
  {
2741
2742
  labelId: `jogging-coord-select-${r}`,
@@ -2744,14 +2745,14 @@ const ko = J(
2744
2745
  size: "small",
2745
2746
  variant: "filled",
2746
2747
  displayEmpty: !0,
2747
- onChange: (s) => t.setSelectedCoordSystemId(s.target.value),
2748
+ onChange: (a) => t.setSelectedCoordSystemId(a.target.value),
2748
2749
  disabled: t.isLocked,
2749
- children: t.coordSystems.map((s) => /* @__PURE__ */ a(q, { value: s.coordinate_system, children: s.name && t.coordSystemCountByName[s.name] > 1 ? `${s.name} / ${s.coordinate_system}` : s.name || s.coordinate_system }, s.coordinate_system))
2750
+ children: t.coordSystems.map((a) => /* @__PURE__ */ s(q, { value: a.coordinate_system, children: a.name && t.coordSystemCountByName[a.name] > 1 ? `${a.name} / ${a.coordinate_system}` : a.name || a.coordinate_system }, a.coordinate_system))
2750
2751
  },
2751
2752
  "coord"
2752
2753
  )
2753
2754
  ), t.showTcpSelect && i.push(
2754
- /* @__PURE__ */ a(
2755
+ /* @__PURE__ */ s(
2755
2756
  it,
2756
2757
  {
2757
2758
  labelId: `jogging-tcp-select-${r}`,
@@ -2759,27 +2760,27 @@ const ko = J(
2759
2760
  value: t.selectedTcpId,
2760
2761
  size: "small",
2761
2762
  variant: "filled",
2762
- onChange: (s) => t.setSelectedTcpId(s.target.value),
2763
+ onChange: (a) => t.setSelectedTcpId(a.target.value),
2763
2764
  disabled: t.isLocked,
2764
- children: t.tcps.map((s) => /* @__PURE__ */ a(q, { value: s.id, children: s.id }, s.id))
2765
+ children: t.tcps.map((a) => /* @__PURE__ */ s(q, { value: a.id, children: a.id }, a.id))
2765
2766
  },
2766
2767
  "tcp"
2767
2768
  )
2768
2769
  ), t.showOrientationSelect && i.push(
2769
- /* @__PURE__ */ a(
2770
+ /* @__PURE__ */ s(
2770
2771
  it,
2771
2772
  {
2772
2773
  labelValue: o("Jogging.Cartesian.Orientation.lb"),
2773
2774
  labelId: `orientation-select-${r}`,
2774
2775
  value: t.selectedOrientation,
2775
- onChange: (s) => t.setSelectedOrientation(s.target.value),
2776
+ onChange: (a) => t.setSelectedOrientation(a.target.value),
2776
2777
  disabled: t.isLocked,
2777
- children: Io.map((s) => /* @__PURE__ */ a(q, { value: s, children: n(s) }, s))
2778
+ children: Io.map((a) => /* @__PURE__ */ s(q, { value: a, children: n(a) }, a))
2778
2779
  },
2779
2780
  "orientation"
2780
2781
  )
2781
2782
  ), t.showIncrementSelect && i.push(
2782
- /* @__PURE__ */ S(
2783
+ /* @__PURE__ */ v(
2783
2784
  it,
2784
2785
  {
2785
2786
  labelValue: o("Jogging.Increment.hlb"),
@@ -2787,18 +2788,18 @@ const ko = J(
2787
2788
  size: "small",
2788
2789
  variant: "filled",
2789
2790
  value: ((c = t.activeDiscreteIncrement) == null ? void 0 : c.id) || "continuous",
2790
- onChange: (s) => t.setSelectedIncrementId(
2791
- s.target.value
2791
+ onChange: (a) => t.setSelectedIncrementId(
2792
+ a.target.value
2792
2793
  ),
2793
2794
  disabled: t.isLocked,
2794
2795
  children: [
2795
- /* @__PURE__ */ a(q, { value: "continuous", children: o("Jogging.Increment.Continuous.dd") }, "continuous"),
2796
- t.selectedOrientation === "tool" ? null : t.discreteIncrementOptions.map((s) => /* @__PURE__ */ a(q, { value: s.id, children: e ? `${s.degrees}°` : `${s.mm}mm` }, s.id))
2796
+ /* @__PURE__ */ s(q, { value: "continuous", children: o("Jogging.Increment.Continuous.dd") }, "continuous"),
2797
+ t.selectedOrientation === "tool" ? null : t.discreteIncrementOptions.map((a) => /* @__PURE__ */ s(q, { value: a.id, children: e ? `${a.degrees}°` : `${a.mm}mm` }, a.id))
2797
2798
  ]
2798
2799
  },
2799
2800
  "increment"
2800
2801
  )
2801
- ), /* @__PURE__ */ a(
2802
+ ), /* @__PURE__ */ s(
2802
2803
  T,
2803
2804
  {
2804
2805
  component: "div",
@@ -2811,13 +2812,13 @@ const ko = J(
2811
2812
  gridAutoRows: "min-content",
2812
2813
  "& label": { opacity: 0.7, fontSize: "12px", marginBottom: "4px" }
2813
2814
  },
2814
- children: i.map((s, l) => /* @__PURE__ */ a(
2815
+ children: i.map((a, l) => /* @__PURE__ */ s(
2815
2816
  T,
2816
2817
  {
2817
2818
  sx: {
2818
2819
  gridColumn: i.length % 2 === 1 && l === i.length - 1 ? "span 2" : "auto"
2819
2820
  },
2820
- children: s
2821
+ children: a
2821
2822
  },
2822
2823
  l
2823
2824
  ))
@@ -2846,14 +2847,14 @@ const ko = J(
2846
2847
  }
2847
2848
  }
2848
2849
  };
2849
- }), Eo = J((t) => {
2850
- var n, c, s;
2850
+ }), jo = J((t) => {
2851
+ var n, c, a;
2851
2852
  const e = F(), { store: o } = t, { t: r } = V();
2852
- function i(l, g) {
2853
- g === t.velocity || !We(g) || t.onVelocityChange(g, t.useDegree);
2853
+ function i(l, u) {
2854
+ u === t.velocity || !We(u) || t.onVelocityChange(u, t.useDegree);
2854
2855
  }
2855
- return /* @__PURE__ */ S(
2856
- _,
2856
+ return /* @__PURE__ */ v(
2857
+ P,
2857
2858
  {
2858
2859
  direction: "row",
2859
2860
  gap: 2,
@@ -2861,17 +2862,17 @@ const ko = J(
2861
2862
  "data-testid": "velocity-slider",
2862
2863
  "aria-label": "velocity-slider",
2863
2864
  children: [
2864
- o.showVelocityLegend && /* @__PURE__ */ a(
2865
- E,
2865
+ o.showVelocityLegend && /* @__PURE__ */ s(
2866
+ j,
2866
2867
  {
2867
2868
  sx: {
2868
- color: (s = (c = (n = e.componentsExt) == null ? void 0 : n.JoggingPanel) == null ? void 0 : c.VelocitySlider) == null ? void 0 : s.sliderLegendColor,
2869
+ color: (a = (c = (n = e.componentsExt) == null ? void 0 : n.JoggingPanel) == null ? void 0 : c.VelocitySlider) == null ? void 0 : a.sliderLegendColor,
2869
2870
  fontSize: "14px"
2870
2871
  },
2871
2872
  children: r("Jogging.Velocity.bt")
2872
2873
  }
2873
2874
  ),
2874
- /* @__PURE__ */ a(
2875
+ /* @__PURE__ */ s(
2875
2876
  Nt,
2876
2877
  {
2877
2878
  value: t.velocity,
@@ -2890,7 +2891,7 @@ const ko = J(
2890
2891
  }
2891
2892
  }
2892
2893
  ),
2893
- o.showVelocitySliderLabel && (t.renderValue ? t.renderValue(t.velocity) : /* @__PURE__ */ a(Ht, { value: t.velocity.toString() }))
2894
+ o.showVelocitySliderLabel && (t.renderValue ? t.renderValue(t.velocity) : /* @__PURE__ */ s(Ht, { value: t.velocity.toString() }))
2894
2895
  ]
2895
2896
  }
2896
2897
  );
@@ -2898,8 +2899,8 @@ const ko = J(
2898
2899
  function Ht({ value: t, sx: e }) {
2899
2900
  var r;
2900
2901
  const o = F();
2901
- return /* @__PURE__ */ a(
2902
- _,
2902
+ return /* @__PURE__ */ s(
2903
+ P,
2903
2904
  {
2904
2905
  direction: "row",
2905
2906
  justifyContent: "center",
@@ -2912,8 +2913,8 @@ function Ht({ value: t, sx: e }) {
2912
2913
  minWidth: "111px",
2913
2914
  ...e
2914
2915
  },
2915
- children: /* @__PURE__ */ a(
2916
- E,
2916
+ children: /* @__PURE__ */ s(
2917
+ j,
2917
2918
  {
2918
2919
  component: "span",
2919
2920
  sx: {
@@ -2935,8 +2936,8 @@ const qt = J(
2935
2936
  function r(i, n) {
2936
2937
  return n ? `ω = ${o("Jogging.Cartesian.Rotation.velocityDegPerSec.lb", { amount: i })}` : `v = ${o("Jogging.Cartesian.Translation.velocityMmPerSec.lb", { amount: i })}`;
2937
2938
  }
2938
- return /* @__PURE__ */ a(
2939
- Eo,
2939
+ return /* @__PURE__ */ s(
2940
+ jo,
2940
2941
  {
2941
2942
  store: t,
2942
2943
  velocity: t.velocityInDisplayUnits(e),
@@ -2945,7 +2946,7 @@ const qt = J(
2945
2946
  onVelocityChange: t.setVelocityFromSlider,
2946
2947
  useDegree: e,
2947
2948
  disabled: t.isLocked,
2948
- renderValue: (i) => /* @__PURE__ */ a(
2949
+ renderValue: (i) => /* @__PURE__ */ s(
2949
2950
  Ht,
2950
2951
  {
2951
2952
  value: r(i, e),
@@ -2960,14 +2961,14 @@ const qt = J(
2960
2961
  }
2961
2962
  );
2962
2963
  }
2963
- ), jo = J(
2964
+ ), Eo = J(
2964
2965
  ({
2965
2966
  store: t,
2966
2967
  children: e
2967
2968
  }) => {
2968
- const { t: o } = V(), r = F();
2969
- function i(u, p) {
2970
- (p === "translate" || p === "rotate") && t.setSelectedCartesianMotionType(p);
2969
+ const { t: o } = V(), r = F(), [i, n] = B(t.jogger.mode);
2970
+ function c(m, S) {
2971
+ (S === "translate" || S === "rotate") && t.setSelectedCartesianMotionType(S);
2971
2972
  }
2972
2973
  ie(
2973
2974
  () => [t.selectedCoordSystemId, t.selectedTcpId],
@@ -2981,26 +2982,26 @@ const qt = J(
2981
2982
  // biome-ignore lint/suspicious/noExplicitAny: pre-biome code
2982
2983
  { fireImmediately: !0 }
2983
2984
  );
2984
- async function n(u, p) {
2985
- const x = await t.activate(), y = x.motionStream.rapidlyChangingMotionState.tcp_pose, f = x.motionStream.rapidlyChangingMotionState.joint_position;
2986
- y && await t.withMotionLock(async () => {
2985
+ async function a(m, S) {
2986
+ const x = await t.activate(), h = x.motionStream.rapidlyChangingMotionState.tcp_pose, y = x.motionStream.rapidlyChangingMotionState.joint_position;
2987
+ h && await t.withMotionLock(async () => {
2987
2988
  try {
2988
2989
  t.setCurrentIncrementJog({
2989
- axis: u.axis,
2990
- direction: u.direction
2990
+ axis: m.axis,
2991
+ direction: m.direction
2991
2992
  }), await t.jogger.runIncrementalCartesianMotion({
2992
- currentTcpPose: y,
2993
- currentJoints: f,
2993
+ currentTcpPose: h,
2994
+ currentJoints: y,
2994
2995
  coordSystemId: t.activeCoordSystemId,
2995
2996
  velocityInRelevantUnits: t.selectedCartesianMotionType === "translate" ? t.translationVelocityMmPerSec : t.rotationVelocityRadsPerSec,
2996
- axis: u.axis,
2997
- direction: u.direction,
2997
+ axis: m.axis,
2998
+ direction: m.direction,
2998
2999
  motion: t.selectedCartesianMotionType === "translate" ? {
2999
3000
  type: "translate",
3000
- distanceMm: p.mm
3001
+ distanceMm: S.mm
3001
3002
  } : {
3002
3003
  type: "rotate",
3003
- distanceRads: Me(p.degrees)
3004
+ distanceRads: Me(S.degrees)
3004
3005
  }
3005
3006
  });
3006
3007
  } finally {
@@ -3008,57 +3009,57 @@ const qt = J(
3008
3009
  }
3009
3010
  });
3010
3011
  }
3011
- async function c(u) {
3012
+ async function l(m) {
3012
3013
  if (!t.isLocked) {
3013
- if (await t.activate(), t.activeDiscreteIncrement)
3014
- return n(u, t.activeDiscreteIncrement);
3015
- u.motionType === "translate" ? await t.jogger.translateTCP({
3016
- axis: u.axis,
3017
- direction: u.direction,
3014
+ if (await t.activate(), await t.jogger.setJoggingMode(i), t.activeDiscreteIncrement)
3015
+ return a(m, t.activeDiscreteIncrement);
3016
+ m.motionType === "translate" ? await t.jogger.translateTCP({
3017
+ axis: m.axis,
3018
+ direction: m.direction,
3018
3019
  velocityMmPerSec: t.translationVelocityMmPerSec
3019
3020
  }) : await t.jogger.rotateTCP({
3020
- axis: u.axis,
3021
- direction: u.direction,
3021
+ axis: m.axis,
3022
+ direction: m.direction,
3022
3023
  velocityRadsPerSec: t.rotationVelocityRadsPerSec
3023
3024
  });
3024
3025
  }
3025
3026
  }
3026
- async function s() {
3027
- t.isLocked || t.activeDiscreteIncrement || await t.deactivate();
3027
+ async function u() {
3028
+ t.isLocked || t.activeDiscreteIncrement || (n(t.jogger.mode), await t.jogger.setJoggingMode("off"), await t.deactivate());
3028
3029
  }
3029
- function l(u, p, x) {
3030
- var f, h, v;
3031
- const y = (v = (h = (f = x.componentsExt) == null ? void 0 : f.JoggingPanel) == null ? void 0 : h.JoggingCartesian) == null ? void 0 : v.Axis;
3032
- if (y)
3033
- return p === "translate" ? y[u] : y.CustomRotation ?? y[u];
3030
+ function f(m, S, x) {
3031
+ var y, b, C;
3032
+ const h = (C = (b = (y = x.componentsExt) == null ? void 0 : y.JoggingPanel) == null ? void 0 : b.JoggingCartesian) == null ? void 0 : C.Axis;
3033
+ if (h)
3034
+ return S === "translate" ? h[m] : h.CustomRotation ?? h[m];
3034
3035
  }
3035
- const g = [
3036
+ const d = [
3036
3037
  {
3037
3038
  id: "x",
3038
- icon: /* @__PURE__ */ a(Oe, {}),
3039
- colors: l("X", t.selectedCartesianMotionType, r)
3039
+ icon: /* @__PURE__ */ s(Oe, {}),
3040
+ colors: f("X", t.selectedCartesianMotionType, r)
3040
3041
  },
3041
3042
  {
3042
3043
  id: "y",
3043
- icon: /* @__PURE__ */ a(De, {}),
3044
- colors: l("Y", t.selectedCartesianMotionType, r)
3044
+ icon: /* @__PURE__ */ s(De, {}),
3045
+ colors: f("Y", t.selectedCartesianMotionType, r)
3045
3046
  },
3046
3047
  {
3047
3048
  id: "z",
3048
- icon: /* @__PURE__ */ a(Ae, {}),
3049
- colors: l("Z", t.selectedCartesianMotionType, r)
3049
+ icon: /* @__PURE__ */ s(Ae, {}),
3050
+ colors: f("Z", t.selectedCartesianMotionType, r)
3050
3051
  }
3051
3052
  ];
3052
- function m(u) {
3053
- return o("General.mm.variable", { amount: u.toFixed(1) });
3053
+ function p(m) {
3054
+ return o("General.mm.variable", { amount: m.toFixed(1) });
3054
3055
  }
3055
- function d(u) {
3056
+ function g(m) {
3056
3057
  return o("General.degree.variable", {
3057
- amount: Vt(u).toFixed(1)
3058
+ amount: Vt(m).toFixed(1)
3058
3059
  });
3059
3060
  }
3060
- return /* @__PURE__ */ S(
3061
- _,
3061
+ return /* @__PURE__ */ v(
3062
+ P,
3062
3063
  {
3063
3064
  "data-testid": "jogging-cartesian-tab",
3064
3065
  "aria-label": "jogging-cartesian-tab",
@@ -3066,129 +3067,129 @@ const qt = J(
3066
3067
  gap: 2,
3067
3068
  sx: { padding: "18px 24px" },
3068
3069
  children: [
3069
- /* @__PURE__ */ S(_, { gap: 2, children: [
3070
- /* @__PURE__ */ a(
3070
+ /* @__PURE__ */ v(P, { gap: 2, children: [
3071
+ /* @__PURE__ */ s(
3071
3072
  ko,
3072
3073
  {
3073
3074
  store: t,
3074
3075
  useDegree: t.selectedCartesianMotionType === "rotate"
3075
3076
  }
3076
3077
  ),
3077
- /* @__PURE__ */ a(
3078
+ /* @__PURE__ */ s(
3078
3079
  qt,
3079
3080
  {
3080
3081
  store: t,
3081
3082
  useDegree: t.selectedCartesianMotionType === "rotate"
3082
3083
  }
3083
3084
  ),
3084
- /* @__PURE__ */ a(Y, {})
3085
+ /* @__PURE__ */ s(Y, {})
3085
3086
  ] }),
3086
- /* @__PURE__ */ a(
3087
- _,
3087
+ /* @__PURE__ */ s(
3088
+ P,
3088
3089
  {
3089
3090
  marginLeft: "auto",
3090
3091
  marginRight: "auto",
3091
3092
  gap: "24px",
3092
3093
  justifyContent: "center",
3093
3094
  sx: { flexGrow: "1" },
3094
- children: /* @__PURE__ */ S(
3095
- _,
3095
+ children: /* @__PURE__ */ v(
3096
+ P,
3096
3097
  {
3097
3098
  alignItems: "center",
3098
3099
  justifyContent: "center",
3099
3100
  gap: "24px",
3100
3101
  sx: { flexGrow: 1 },
3101
3102
  children: [
3102
- /* @__PURE__ */ S(
3103
+ /* @__PURE__ */ v(
3103
3104
  Ro,
3104
3105
  {
3105
3106
  value: t.selectedCartesianMotionType,
3106
- onChange: i,
3107
+ onChange: c,
3107
3108
  exclusive: !0,
3108
3109
  "aria-label": o("Jogging.Cartesian.MotionType.lb"),
3109
3110
  sx: { justifyContent: "center" },
3110
3111
  children: [
3111
- /* @__PURE__ */ a(Rt, { value: "translate", children: o("Jogging.Cartesian.Translation.bt") }),
3112
- /* @__PURE__ */ a(Rt, { value: "rotate", children: o("Jogging.Cartesian.Rotation.bt") })
3112
+ /* @__PURE__ */ s(Rt, { value: "translate", children: o("Jogging.Cartesian.Translation.bt") }),
3113
+ /* @__PURE__ */ s(Rt, { value: "rotate", children: o("Jogging.Cartesian.Rotation.bt") })
3113
3114
  ]
3114
3115
  }
3115
3116
  ),
3116
- t.selectedCartesianMotionType === "translate" && g.map((u) => {
3117
- var p, x;
3118
- return /* @__PURE__ */ a(
3119
- Pt,
3117
+ t.selectedCartesianMotionType === "translate" && d.map((m) => {
3118
+ var S, x;
3119
+ return /* @__PURE__ */ s(
3120
+ _t,
3120
3121
  {
3121
- "data-testid": `jogging-cartesian-axis-control-${u.id}`,
3122
- "aria-label": `jogging-cartesian-axis-control-${u.id}`,
3123
- colors: u.colors,
3122
+ "data-testid": `jogging-cartesian-axis-control-${m.id}`,
3123
+ "aria-label": `jogging-cartesian-axis-control-${m.id}`,
3124
+ colors: m.colors,
3124
3125
  disabled: t.isLocked,
3125
- activeJoggingDirection: ((p = t.incrementJogInProgress) == null ? void 0 : p.axis) === u.id ? t.incrementJogInProgress.direction : void 0,
3126
- label: /* @__PURE__ */ S(et, { children: [
3127
- u.icon,
3128
- /* @__PURE__ */ a(
3129
- E,
3126
+ activeJoggingDirection: ((S = t.incrementJogInProgress) == null ? void 0 : S.axis) === m.id ? t.incrementJogInProgress.direction : void 0,
3127
+ label: /* @__PURE__ */ v(et, { children: [
3128
+ m.icon,
3129
+ /* @__PURE__ */ s(
3130
+ j,
3130
3131
  {
3131
3132
  sx: {
3132
3133
  fontSize: "24px",
3133
- color: ((x = u.colors) == null ? void 0 : x.labelColor) ?? r.palette.text.primary
3134
+ color: ((x = m.colors) == null ? void 0 : x.labelColor) ?? r.palette.text.primary
3134
3135
  },
3135
- children: u.id.toUpperCase()
3136
+ children: m.id.toUpperCase()
3136
3137
  }
3137
3138
  )
3138
3139
  ] }),
3139
3140
  getDisplayedValue: () => {
3140
- var y, f;
3141
- return m(
3142
- ((f = (y = t.jogger.motionStream.rapidlyChangingMotionState.tcp_pose) == null ? void 0 : y.position) == null ? void 0 : f[tt[u.id]]) || 0
3141
+ var h, y;
3142
+ return p(
3143
+ ((y = (h = t.jogger.motionStream.rapidlyChangingMotionState.tcp_pose) == null ? void 0 : h.position) == null ? void 0 : y[tt[m.id]]) || 0
3143
3144
  );
3144
3145
  },
3145
- startJogging: (y) => c({
3146
- axis: u.id,
3146
+ startJogging: (h) => l({
3147
+ axis: m.id,
3147
3148
  motionType: "translate",
3148
- direction: y
3149
+ direction: h
3149
3150
  }),
3150
- stopJogging: s
3151
+ stopJogging: u
3151
3152
  },
3152
- u.id
3153
+ m.id
3153
3154
  );
3154
3155
  }),
3155
- t.selectedCartesianMotionType === "rotate" && g.map((u) => {
3156
- var p, x;
3157
- return /* @__PURE__ */ a(
3158
- Pt,
3156
+ t.selectedCartesianMotionType === "rotate" && d.map((m) => {
3157
+ var S, x;
3158
+ return /* @__PURE__ */ s(
3159
+ _t,
3159
3160
  {
3160
- "data-testid": `jogging-cartesian-axis-control-${u.id}`,
3161
- "aria-label": `jogging-cartesian-axis-control-${u.id}`,
3162
- colors: u.colors,
3161
+ "data-testid": `jogging-cartesian-axis-control-${m.id}`,
3162
+ "aria-label": `jogging-cartesian-axis-control-${m.id}`,
3163
+ colors: m.colors,
3163
3164
  disabled: t.isLocked,
3164
- activeJoggingDirection: ((p = t.incrementJogInProgress) == null ? void 0 : p.axis) === u.id ? t.incrementJogInProgress.direction : void 0,
3165
- label: /* @__PURE__ */ S(et, { children: [
3166
- /* @__PURE__ */ a(Je, {}),
3167
- /* @__PURE__ */ a(
3168
- E,
3165
+ activeJoggingDirection: ((S = t.incrementJogInProgress) == null ? void 0 : S.axis) === m.id ? t.incrementJogInProgress.direction : void 0,
3166
+ label: /* @__PURE__ */ v(et, { children: [
3167
+ /* @__PURE__ */ s(Je, {}),
3168
+ /* @__PURE__ */ s(
3169
+ j,
3169
3170
  {
3170
3171
  sx: {
3171
3172
  fontSize: "24px",
3172
- color: ((x = u.colors) == null ? void 0 : x.labelColor) ?? r.palette.text.primary
3173
+ color: ((x = m.colors) == null ? void 0 : x.labelColor) ?? r.palette.text.primary
3173
3174
  },
3174
- children: u.id.toUpperCase()
3175
+ children: m.id.toUpperCase()
3175
3176
  }
3176
3177
  )
3177
3178
  ] }),
3178
3179
  getDisplayedValue: () => {
3179
- var y, f;
3180
- return d(
3181
- ((f = (y = t.jogger.motionStream.rapidlyChangingMotionState.tcp_pose) == null ? void 0 : y.orientation) == null ? void 0 : f[tt[u.id]]) || 0
3180
+ var h, y;
3181
+ return g(
3182
+ ((y = (h = t.jogger.motionStream.rapidlyChangingMotionState.tcp_pose) == null ? void 0 : h.orientation) == null ? void 0 : y[tt[m.id]]) || 0
3182
3183
  );
3183
3184
  },
3184
- startJogging: (y) => c({
3185
- axis: u.id,
3185
+ startJogging: (h) => l({
3186
+ axis: m.id,
3186
3187
  motionType: "rotate",
3187
- direction: y
3188
+ direction: h
3188
3189
  }),
3189
- stopJogging: s
3190
+ stopJogging: u
3190
3191
  },
3191
- u.id
3192
+ m.id
3192
3193
  );
3193
3194
  })
3194
3195
  ]
@@ -3196,29 +3197,29 @@ const qt = J(
3196
3197
  )
3197
3198
  }
3198
3199
  ),
3199
- /* @__PURE__ */ a(Ut, { store: t }),
3200
- e && /* @__PURE__ */ a(Y, {}),
3200
+ /* @__PURE__ */ s(Ut, { store: t }),
3201
+ e && /* @__PURE__ */ s(Y, {}),
3201
3202
  e
3202
3203
  ]
3203
3204
  }
3204
3205
  );
3205
3206
  }
3206
- ), Po = J(
3207
+ ), _o = J(
3207
3208
  ({ store: t, children: e }) => {
3208
- const o = F();
3209
- async function r(n) {
3210
- await t.activate(), await t.jogger.rotateJoints({
3211
- joint: n.joint,
3212
- direction: n.direction,
3209
+ const o = F(), [r, i] = B(t.jogger.mode);
3210
+ async function n(a) {
3211
+ await t.activate(), await t.jogger.setJoggingMode(r), await t.jogger.rotateJoints({
3212
+ joint: a.joint,
3213
+ direction: a.direction,
3213
3214
  velocityUnit: t.jointType === G.PrismaticJoint ? "mm/s" : "rad/s",
3214
3215
  velocityValue: t.jointType === G.PrismaticJoint ? t.translationVelocityMmPerSec : t.rotationVelocityRadsPerSec
3215
3216
  });
3216
3217
  }
3217
- async function i() {
3218
- await t.jogger.stop(), await t.deactivate();
3218
+ async function c() {
3219
+ i(t.jogger.mode), await t.jogger.setJoggingMode("off"), await t.jogger.stop(), await t.deactivate();
3219
3220
  }
3220
- return /* @__PURE__ */ S(
3221
- _,
3221
+ return /* @__PURE__ */ v(
3222
+ P,
3222
3223
  {
3223
3224
  "data-testid": "jogging-joint-tab",
3224
3225
  "aria-label": "jogging-joint-tab",
@@ -3226,77 +3227,77 @@ const qt = J(
3226
3227
  gap: 2,
3227
3228
  sx: { padding: "18px 24px" },
3228
3229
  children: [
3229
- /* @__PURE__ */ a(
3230
+ /* @__PURE__ */ s(
3230
3231
  qt,
3231
3232
  {
3232
3233
  store: t,
3233
3234
  useDegree: t.jointType === G.RevoluteJoint
3234
3235
  }
3235
3236
  ),
3236
- /* @__PURE__ */ a(Y, {}),
3237
- /* @__PURE__ */ a(
3238
- _,
3237
+ /* @__PURE__ */ s(Y, {}),
3238
+ /* @__PURE__ */ s(
3239
+ P,
3239
3240
  {
3240
3241
  justifyContent: "center",
3241
3242
  alignItems: "stretch",
3242
3243
  sx: { flexGrow: "1" },
3243
- children: /* @__PURE__ */ a(
3244
- _,
3244
+ children: /* @__PURE__ */ s(
3245
+ P,
3245
3246
  {
3246
3247
  "data-testid": "jogging-joint-value-controls-wrapper",
3247
3248
  "aria-label": "jogging-joint-value-controls-wrapper",
3248
3249
  alignItems: "center",
3249
3250
  gap: "24px",
3250
- children: t.jogger.motionStream.joints.map((n) => {
3251
- var s, l, g;
3252
- const c = (g = (l = (s = t.motionGroupDescription.operation_limits.auto_limits) == null ? void 0 : s.joints) == null ? void 0 : l[n.index]) == null ? void 0 : g.position;
3253
- return /* @__PURE__ */ S(
3254
- _,
3251
+ children: t.jogger.motionStream.joints.map((a) => {
3252
+ var u, f, d;
3253
+ const l = (d = (f = (u = t.motionGroupDescription.operation_limits.auto_limits) == null ? void 0 : u.joints) == null ? void 0 : f[a.index]) == null ? void 0 : d.position;
3254
+ return /* @__PURE__ */ v(
3255
+ P,
3255
3256
  {
3256
- "data-testid": `jogging-joint-value-control-${n.index}`,
3257
- "aria-label": `jogging-joint-value-control-${n.index}`,
3257
+ "data-testid": `jogging-joint-value-control-${a.index}`,
3258
+ "aria-label": `jogging-joint-value-control-${a.index}`,
3258
3259
  direction: "row",
3259
3260
  alignItems: "center",
3260
3261
  justifyContent: "center",
3261
3262
  spacing: 1.5,
3262
3263
  width: "100%",
3263
3264
  children: [
3264
- t.showJointsLegend && /* @__PURE__ */ a(
3265
- E,
3265
+ t.showJointsLegend && /* @__PURE__ */ s(
3266
+ j,
3266
3267
  {
3267
3268
  color: t.isLocked ? o.palette.text.disabled : o.palette.text.secondary,
3268
- children: `G${n.index + 1}`
3269
+ children: `G${a.index + 1}`
3269
3270
  }
3270
3271
  ),
3271
- /* @__PURE__ */ a(
3272
+ /* @__PURE__ */ s(
3272
3273
  xo,
3273
3274
  {
3274
3275
  disabled: t.isLocked,
3275
- lowerLimit: c == null ? void 0 : c.lower_limit,
3276
- upperLimit: c == null ? void 0 : c.upper_limit,
3276
+ lowerLimit: l == null ? void 0 : l.lower_limit,
3277
+ upperLimit: l == null ? void 0 : l.upper_limit,
3277
3278
  useDegree: t.jointType === G.RevoluteJoint,
3278
3279
  getValue: () => {
3279
- const m = t.jogger.motionStream.rapidlyChangingMotionState.joint_position[n.index];
3280
- return m !== void 0 ? m : void 0;
3280
+ const p = t.jogger.motionStream.rapidlyChangingMotionState.joint_position[a.index];
3281
+ return p !== void 0 ? p : void 0;
3281
3282
  },
3282
- startJogging: (m) => r({
3283
- joint: n.index,
3284
- direction: m
3283
+ startJogging: (p) => n({
3284
+ joint: a.index,
3285
+ direction: p
3285
3286
  }),
3286
- stopJogging: i
3287
+ stopJogging: c
3287
3288
  }
3288
3289
  )
3289
3290
  ]
3290
3291
  },
3291
- `joint-${n.index}`
3292
+ `joint-${a.index}`
3292
3293
  );
3293
3294
  })
3294
3295
  }
3295
3296
  )
3296
3297
  }
3297
3298
  ),
3298
- /* @__PURE__ */ a(Ut, { store: t }),
3299
- e && /* @__PURE__ */ a(Y, {}),
3299
+ /* @__PURE__ */ s(Ut, { store: t }),
3300
+ e && /* @__PURE__ */ s(Y, {}),
3300
3301
  e
3301
3302
  ]
3302
3303
  }
@@ -3331,8 +3332,8 @@ const qt = J(
3331
3332
  }), [t.store, t.nova, t.motionGroupId]), A(() => {
3332
3333
  const i = o.joggingStore;
3333
3334
  i && (t.locked ? i.lock("external") : i.unlock("external"));
3334
- }, [o.joggingStore, t.locked]), /* @__PURE__ */ a(
3335
- _,
3335
+ }, [o.joggingStore, t.locked]), /* @__PURE__ */ s(
3336
+ P,
3336
3337
  {
3337
3338
  "data-testid": "jogging-panel",
3338
3339
  "aria-label": "jogging-panel",
@@ -3342,11 +3343,11 @@ const qt = J(
3342
3343
  position: "relative",
3343
3344
  ...t.sx
3344
3345
  },
3345
- children: o.joggingStore ? /* @__PURE__ */ a(_o, { store: o.joggingStore, children: t.children }) : /* @__PURE__ */ a(vo, { message: "Loading jogging", error: o.loadingError })
3346
+ children: o.joggingStore ? /* @__PURE__ */ s(Po, { store: o.joggingStore, children: t.children }) : /* @__PURE__ */ s(vo, { message: "Loading jogging", error: o.loadingError })
3346
3347
  }
3347
3348
  );
3348
3349
  })
3349
- ), _o = J(
3350
+ ), Po = J(
3350
3351
  ({
3351
3352
  store: t,
3352
3353
  children: e
@@ -3354,12 +3355,12 @@ const qt = J(
3354
3355
  const { t: o } = V();
3355
3356
  function r() {
3356
3357
  if (t.currentTab.id === "cartesian")
3357
- return /* @__PURE__ */ a(jo, { store: t, children: e });
3358
+ return /* @__PURE__ */ s(Eo, { store: t, children: e });
3358
3359
  if (t.currentTab.id === "joint")
3359
- return /* @__PURE__ */ a(Po, { store: t, children: e });
3360
+ return /* @__PURE__ */ s(_o, { store: t, children: e });
3360
3361
  }
3361
- return /* @__PURE__ */ S(_, { flexGrow: 1, sx: { overflow: "hidden" }, children: [
3362
- /* @__PURE__ */ a(
3362
+ return /* @__PURE__ */ v(P, { flexGrow: 1, sx: { overflow: "hidden" }, children: [
3363
+ /* @__PURE__ */ s(
3363
3364
  zt,
3364
3365
  {
3365
3366
  "data-testid": "jogging-tabs",
@@ -3368,13 +3369,13 @@ const qt = J(
3368
3369
  onChange: t.onTabChange,
3369
3370
  variant: "fullWidth",
3370
3371
  children: t.tabs.map((i) => {
3371
- const n = i.label === "Cartesian" ? o("Jogging.Cartesian.bt") : o("Jogging.Joints.bt"), c = i.label === "cartesian" ? /* @__PURE__ */ a(he, { fontSize: "small", sx: { mr: 1 } }) : /* @__PURE__ */ a(fe, { fontSize: "small", sx: { mr: 1 } });
3372
- return /* @__PURE__ */ a(
3372
+ const n = i.label === "Cartesian" ? o("Jogging.Cartesian.bt") : o("Jogging.Joints.bt"), c = i.label === "cartesian" ? /* @__PURE__ */ s(he, { fontSize: "small", sx: { mr: 1 } }) : /* @__PURE__ */ s(fe, { fontSize: "small", sx: { mr: 1 } });
3373
+ return /* @__PURE__ */ s(
3373
3374
  $t,
3374
3375
  {
3375
3376
  "data-testid": `jogging-tab-${i.id}`,
3376
3377
  "aria-label": `jogging-tab-${i.id}`,
3377
- label: t.showTabIcons ? /* @__PURE__ */ S(_, { direction: "row", alignItems: "center", children: [
3378
+ label: t.showTabIcons ? /* @__PURE__ */ v(P, { direction: "row", alignItems: "center", children: [
3378
3379
  c,
3379
3380
  n
3380
3381
  ] }) : n,
@@ -3386,8 +3387,8 @@ const qt = J(
3386
3387
  })
3387
3388
  }
3388
3389
  ),
3389
- /* @__PURE__ */ a(
3390
- _,
3390
+ /* @__PURE__ */ s(
3391
+ P,
3391
3392
  {
3392
3393
  flexGrow: 1,
3393
3394
  position: "relative",
@@ -3395,11 +3396,11 @@ const qt = J(
3395
3396
  children: r()
3396
3397
  }
3397
3398
  ),
3398
- t.blocked && /* @__PURE__ */ a(wo, { store: t })
3399
+ t.blocked && /* @__PURE__ */ s(Co, { store: t })
3399
3400
  ] });
3400
3401
  }
3401
3402
  ), Yt = (t) => {
3402
- var s;
3403
+ var a;
3403
3404
  const { value: e, ref: o } = t, r = F(), [i, n] = B(!1);
3404
3405
  async function c() {
3405
3406
  if (!o || !("current" in o))
@@ -3408,10 +3409,10 @@ const qt = J(
3408
3409
  return await navigator.clipboard.writeText(e), console.log("Copied!"), n(!0), !0;
3409
3410
  } catch (l) {
3410
3411
  console.error(l);
3411
- const g = window.getSelection();
3412
- if (g && o && "current" in o && o.current) {
3413
- const m = document.createRange();
3414
- m.selectNodeContents(o.current), g.removeAllRanges(), g.addRange(m);
3412
+ const u = window.getSelection();
3413
+ if (u && o && "current" in o && o.current) {
3414
+ const f = document.createRange();
3415
+ f.selectNodeContents(o.current), u.removeAllRanges(), u.addRange(f);
3415
3416
  }
3416
3417
  }
3417
3418
  return !1;
@@ -3423,22 +3424,22 @@ const qt = J(
3423
3424
  return () => {
3424
3425
  l && clearTimeout(l);
3425
3426
  };
3426
- }, [i]), /* @__PURE__ */ a(qe, { open: i, title: "Copied!", children: /* @__PURE__ */ a(
3427
- _,
3427
+ }, [i]), /* @__PURE__ */ s(qe, { open: i, title: "Copied!", children: /* @__PURE__ */ s(
3428
+ P,
3428
3429
  {
3429
3430
  justifyContent: "center",
3430
3431
  sx: {
3431
3432
  height: "100%",
3432
3433
  boxSizing: "border-box",
3433
3434
  padding: "6px 12px",
3434
- background: (s = r.palette.backgroundPaperElevation) == null ? void 0 : s[8],
3435
+ background: (a = r.palette.backgroundPaperElevation) == null ? void 0 : a[8],
3435
3436
  borderRadius: "10px",
3436
3437
  minWidth: "0",
3437
3438
  cursor: "pointer"
3438
3439
  },
3439
3440
  onClick: () => c(),
3440
- children: /* @__PURE__ */ a(
3441
- E,
3441
+ children: /* @__PURE__ */ s(
3442
+ j,
3442
3443
  {
3443
3444
  ref: o,
3444
3445
  align: "center",
@@ -3460,8 +3461,8 @@ const qt = J(
3460
3461
  }, gi = $(
3461
3462
  J(({ tcpPose: t, showCopyButton: e = !1 }) => {
3462
3463
  const [o, r] = B(null), i = xe(t);
3463
- return /* @__PURE__ */ S(
3464
- _,
3464
+ return /* @__PURE__ */ v(
3465
+ P,
3465
3466
  {
3466
3467
  direction: "row",
3467
3468
  alignItems: "center",
@@ -3469,8 +3470,8 @@ const qt = J(
3469
3470
  sx: { flexGrow: 1, minWidth: 0, overflow: "hidden" },
3470
3471
  "data-testid": "pose-cartesian-values",
3471
3472
  children: [
3472
- /* @__PURE__ */ a(Yt, { value: i }),
3473
- e && /* @__PURE__ */ a(
3473
+ /* @__PURE__ */ s(Yt, { value: i }),
3474
+ e && /* @__PURE__ */ s(
3474
3475
  Z,
3475
3476
  {
3476
3477
  variant: "contained",
@@ -3494,8 +3495,8 @@ const qt = J(
3494
3495
  ), pi = $(
3495
3496
  J(({ joints: t, showCopyButton: e = !1 }) => {
3496
3497
  const [o, r] = B(null), i = `[${t.map((c) => parseFloat(c.toFixed(4))).join(", ")}]`;
3497
- return /* @__PURE__ */ S(
3498
- _,
3498
+ return /* @__PURE__ */ v(
3499
+ P,
3499
3500
  {
3500
3501
  direction: "row",
3501
3502
  alignItems: "center",
@@ -3503,8 +3504,8 @@ const qt = J(
3503
3504
  sx: { flexGrow: 1, minWidth: 0, overflow: "hidden" },
3504
3505
  "data-testid": "pose-joint-values",
3505
3506
  children: [
3506
- /* @__PURE__ */ a(Yt, { value: i }),
3507
- e && /* @__PURE__ */ a(
3507
+ /* @__PURE__ */ s(Yt, { value: i }),
3508
+ e && /* @__PURE__ */ s(
3508
3509
  Z,
3509
3510
  {
3510
3511
  variant: "contained",
@@ -3546,7 +3547,7 @@ class Oo {
3546
3547
  this.addMessage(e, "error");
3547
3548
  }, this.addDebug = (e) => {
3548
3549
  this.addMessage(e, "debug");
3549
- }, we(this, {
3550
+ }, Ce(this, {
3550
3551
  messages: Te,
3551
3552
  addMessage: kt,
3552
3553
  clearMessages: kt
@@ -3560,18 +3561,18 @@ const at = (t, e, o) => ({
3560
3561
  level: e
3561
3562
  }), mi = (t, e) => at(t, "debug", e), hi = (t, e) => at(t, "info", e), fi = (t, e) => at(t, "warning", e), bi = (t, e) => at(t, "error", e), Do = $(
3562
3563
  J((t) => {
3563
- var m;
3564
+ var f;
3564
3565
  const { messages: e = [], onClear: o, height: r = 400, sx: i } = t, n = F(), c = D(null);
3565
3566
  A(() => {
3566
3567
  if (e.length === 0) return;
3567
3568
  const d = c.current;
3568
3569
  if (!d) return;
3569
- const u = setTimeout(() => {
3570
+ const p = setTimeout(() => {
3570
3571
  d.scrollTop = d.scrollHeight;
3571
3572
  }, 10);
3572
- return () => clearTimeout(u);
3573
+ return () => clearTimeout(p);
3573
3574
  }, [e.length]);
3574
- const s = (d) => d.toLocaleTimeString("en-US", {
3575
+ const a = (d) => d.toLocaleTimeString("en-US", {
3575
3576
  hour12: !1,
3576
3577
  hour: "2-digit",
3577
3578
  minute: "2-digit",
@@ -3589,15 +3590,15 @@ const at = (t, e, o) => ({
3589
3590
  default:
3590
3591
  return n.palette.text.secondary;
3591
3592
  }
3592
- }, g = ({ message: d }) => {
3593
- const [u, p] = B(!1), [x, y] = B(!1), [f, h] = B(!1), v = d.message.length > 150, b = async () => {
3593
+ }, u = ({ message: d }) => {
3594
+ const [p, g] = B(!1), [m, S] = B(!1), [x, h] = B(!1), y = d.message.length > 150, b = async () => {
3594
3595
  try {
3595
- await navigator.clipboard.writeText(d.message), y(!0), setTimeout(() => y(!1), 2e3);
3596
- } catch (C) {
3597
- console.error("Failed to copy message:", C);
3596
+ await navigator.clipboard.writeText(d.message), S(!0), setTimeout(() => S(!1), 2e3);
3597
+ } catch (w) {
3598
+ console.error("Failed to copy message:", w);
3598
3599
  }
3599
- }, w = v && !u ? `${d.message.substring(0, 150)}...` : d.message;
3600
- return /* @__PURE__ */ a(
3600
+ }, C = y && !p ? `${d.message.substring(0, 150)}...` : d.message;
3601
+ return /* @__PURE__ */ s(
3601
3602
  T,
3602
3603
  {
3603
3604
  onMouseEnter: () => h(!0),
@@ -3614,9 +3615,9 @@ const at = (t, e, o) => ({
3614
3615
  padding: "2px 4px",
3615
3616
  margin: "-2px -4px"
3616
3617
  },
3617
- children: /* @__PURE__ */ S(T, { sx: { display: "flex", gap: 1 }, children: [
3618
- /* @__PURE__ */ S(
3619
- E,
3618
+ children: /* @__PURE__ */ v(T, { sx: { display: "flex", gap: 1 }, children: [
3619
+ /* @__PURE__ */ v(
3620
+ j,
3620
3621
  {
3621
3622
  component: "span",
3622
3623
  sx: {
@@ -3630,13 +3631,13 @@ const at = (t, e, o) => ({
3630
3631
  },
3631
3632
  children: [
3632
3633
  "[",
3633
- s(d.timestamp),
3634
+ a(d.timestamp),
3634
3635
  "]"
3635
3636
  ]
3636
3637
  }
3637
3638
  ),
3638
- /* @__PURE__ */ a(
3639
- E,
3639
+ /* @__PURE__ */ s(
3640
+ j,
3640
3641
  {
3641
3642
  component: "span",
3642
3643
  sx: {
@@ -3651,22 +3652,22 @@ const at = (t, e, o) => ({
3651
3652
  flex: 1,
3652
3653
  whiteSpace: "pre-wrap"
3653
3654
  },
3654
- children: w
3655
+ children: C
3655
3656
  }
3656
3657
  ),
3657
- /* @__PURE__ */ S(
3658
+ /* @__PURE__ */ v(
3658
3659
  T,
3659
3660
  {
3660
3661
  sx: {
3661
3662
  display: "flex",
3662
3663
  alignItems: "flex-start",
3663
3664
  gap: 0.5,
3664
- opacity: f ? 1 : 0,
3665
+ opacity: x ? 1 : 0,
3665
3666
  transition: "opacity 0.2s ease-in-out",
3666
- visibility: f ? "visible" : "hidden"
3667
+ visibility: x ? "visible" : "hidden"
3667
3668
  },
3668
3669
  children: [
3669
- /* @__PURE__ */ a(
3670
+ /* @__PURE__ */ s(
3670
3671
  H,
3671
3672
  {
3672
3673
  size: "small",
@@ -3678,15 +3679,15 @@ const at = (t, e, o) => ({
3678
3679
  backgroundColor: n.palette.action.hover
3679
3680
  }
3680
3681
  },
3681
- title: x ? "Copied!" : "Copy message",
3682
- children: /* @__PURE__ */ a(Ye, { sx: { fontSize: 12 } })
3682
+ title: m ? "Copied!" : "Copy message",
3683
+ children: /* @__PURE__ */ s(Ye, { sx: { fontSize: 12 } })
3683
3684
  }
3684
3685
  ),
3685
- v && /* @__PURE__ */ a(
3686
+ y && /* @__PURE__ */ s(
3686
3687
  H,
3687
3688
  {
3688
3689
  size: "small",
3689
- onClick: () => p(!u),
3690
+ onClick: () => g(!p),
3690
3691
  sx: {
3691
3692
  padding: "2px",
3692
3693
  color: n.palette.text.secondary,
@@ -3694,8 +3695,8 @@ const at = (t, e, o) => ({
3694
3695
  backgroundColor: n.palette.action.hover
3695
3696
  }
3696
3697
  },
3697
- title: u ? "Collapse" : "Expand",
3698
- children: u ? /* @__PURE__ */ a(Qe, { sx: { fontSize: 12 } }) : /* @__PURE__ */ a(Xe, { sx: { fontSize: 12 } })
3698
+ title: p ? "Collapse" : "Expand",
3699
+ children: p ? /* @__PURE__ */ s(Qe, { sx: { fontSize: 12 } }) : /* @__PURE__ */ s(Xe, { sx: { fontSize: 12 } })
3699
3700
  }
3700
3701
  )
3701
3702
  ]
@@ -3706,11 +3707,11 @@ const at = (t, e, o) => ({
3706
3707
  d.id
3707
3708
  );
3708
3709
  };
3709
- return /* @__PURE__ */ S(
3710
+ return /* @__PURE__ */ v(
3710
3711
  Ke,
3711
3712
  {
3712
3713
  sx: {
3713
- backgroundColor: ((m = n.palette.backgroundPaperElevation) == null ? void 0 : m[2]) || "#171927",
3714
+ backgroundColor: ((f = n.palette.backgroundPaperElevation) == null ? void 0 : f[2]) || "#171927",
3714
3715
  backgroundImage: "none",
3715
3716
  // Override any gradient from elevation
3716
3717
  height: r,
@@ -3720,7 +3721,7 @@ const at = (t, e, o) => ({
3720
3721
  ...i
3721
3722
  },
3722
3723
  children: [
3723
- /* @__PURE__ */ S(
3724
+ /* @__PURE__ */ v(
3724
3725
  T,
3725
3726
  {
3726
3727
  sx: {
@@ -3730,8 +3731,8 @@ const at = (t, e, o) => ({
3730
3731
  padding: "12px 16px"
3731
3732
  },
3732
3733
  children: [
3733
- /* @__PURE__ */ S(T, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
3734
- /* @__PURE__ */ a(
3734
+ /* @__PURE__ */ v(T, { sx: { display: "flex", alignItems: "center", gap: 1 }, children: [
3735
+ /* @__PURE__ */ s(
3735
3736
  Ze,
3736
3737
  {
3737
3738
  sx: {
@@ -3741,8 +3742,8 @@ const at = (t, e, o) => ({
3741
3742
  }
3742
3743
  }
3743
3744
  ),
3744
- /* @__PURE__ */ a(
3745
- E,
3745
+ /* @__PURE__ */ s(
3746
+ j,
3746
3747
  {
3747
3748
  sx: {
3748
3749
  fontWeight: 500,
@@ -3755,7 +3756,7 @@ const at = (t, e, o) => ({
3755
3756
  }
3756
3757
  )
3757
3758
  ] }),
3758
- /* @__PURE__ */ a(
3759
+ /* @__PURE__ */ s(
3759
3760
  Z,
3760
3761
  {
3761
3762
  onClick: o,
@@ -3780,7 +3781,7 @@ const at = (t, e, o) => ({
3780
3781
  ]
3781
3782
  }
3782
3783
  ),
3783
- /* @__PURE__ */ a(
3784
+ /* @__PURE__ */ s(
3784
3785
  T,
3785
3786
  {
3786
3787
  ref: c,
@@ -3808,8 +3809,8 @@ const at = (t, e, o) => ({
3808
3809
  }
3809
3810
  }
3810
3811
  },
3811
- children: e.length === 0 ? /* @__PURE__ */ a(
3812
- E,
3812
+ children: e.length === 0 ? /* @__PURE__ */ s(
3813
+ j,
3813
3814
  {
3814
3815
  sx: {
3815
3816
  color: n.palette.text.disabled,
@@ -3820,7 +3821,7 @@ const at = (t, e, o) => ({
3820
3821
  },
3821
3822
  children: "No log messages"
3822
3823
  }
3823
- ) : e.map((d) => /* @__PURE__ */ a(g, { message: d }, d.id))
3824
+ ) : e.map((d) => /* @__PURE__ */ s(u, { message: d }, d.id))
3824
3825
  }
3825
3826
  )
3826
3827
  ]
@@ -3835,12 +3836,12 @@ const at = (t, e, o) => ({
3835
3836
  }, [o]);
3836
3837
  const n = rt(() => {
3837
3838
  var l;
3838
- const s = e || new Oo();
3839
- return (l = i.current) == null || l.call(i, s), s;
3839
+ const a = e || new Oo();
3840
+ return (l = i.current) == null || l.call(i, a), a;
3840
3841
  }, [e]), c = () => {
3841
3842
  n.clearMessages();
3842
3843
  };
3843
- return /* @__PURE__ */ a(
3844
+ return /* @__PURE__ */ s(
3844
3845
  Do,
3845
3846
  {
3846
3847
  ...r,
@@ -3861,7 +3862,7 @@ function yi({
3861
3862
  baseUrl: t = Ao(),
3862
3863
  ...e
3863
3864
  }) {
3864
- return /* @__PURE__ */ S(
3865
+ return /* @__PURE__ */ v(
3865
3866
  to,
3866
3867
  {
3867
3868
  "aria-labelledby": "no-motion-group-modal-title",
@@ -3882,8 +3883,8 @@ function yi({
3882
3883
  }
3883
3884
  },
3884
3885
  children: [
3885
- /* @__PURE__ */ a(no, { id: "no-motion-group-modal-title", children: "No motion group found" }),
3886
- /* @__PURE__ */ S(
3886
+ /* @__PURE__ */ s(no, { id: "no-motion-group-modal-title", children: "No motion group found" }),
3887
+ /* @__PURE__ */ v(
3887
3888
  oo,
3888
3889
  {
3889
3890
  sx: {
@@ -3892,13 +3893,13 @@ function yi({
3892
3893
  textAlign: "center"
3893
3894
  },
3894
3895
  children: [
3895
- /* @__PURE__ */ a(E, { color: "#fff", children: "Found no devices to connect to." }),
3896
- /* @__PURE__ */ a(E, { color: "#fff", children: "Please ensure a motion group has been created." })
3896
+ /* @__PURE__ */ s(j, { color: "#fff", children: "Found no devices to connect to." }),
3897
+ /* @__PURE__ */ s(j, { color: "#fff", children: "Please ensure a motion group has been created." })
3897
3898
  ]
3898
3899
  }
3899
3900
  ),
3900
- /* @__PURE__ */ a(eo, { children: /* @__PURE__ */ S(_, { width: "100%", maxWidth: "300px", margin: "auto", marginBottom: "2rem", children: [
3901
- /* @__PURE__ */ a(
3901
+ /* @__PURE__ */ s(eo, { children: /* @__PURE__ */ v(P, { width: "100%", maxWidth: "300px", margin: "auto", marginBottom: "2rem", children: [
3902
+ /* @__PURE__ */ s(
3902
3903
  Z,
3903
3904
  {
3904
3905
  href: `${t}/settings`,
@@ -3910,7 +3911,7 @@ function yi({
3910
3911
  children: "Go to settings app"
3911
3912
  }
3912
3913
  ),
3913
- /* @__PURE__ */ a(
3914
+ /* @__PURE__ */ s(
3914
3915
  Z,
3915
3916
  {
3916
3917
  href: `${t}`,
@@ -3933,13 +3934,13 @@ var Zt = /* @__PURE__ */ ((t) => (t.PRECONDITION_NOT_FULFILLED = "PRECONDITION_N
3933
3934
  const Jo = $(
3934
3935
  J(({ setupState: t, className: e }) => {
3935
3936
  const o = F(), { t: r } = V(), i = () => {
3936
- var g, m, d, u, p, x, y;
3937
+ var u, f, d, p, g, m, S;
3937
3938
  switch (t) {
3938
3939
  case "READY":
3939
3940
  return {
3940
3941
  label: r("RobotSetupReadinessIndicator.Ready.lb"),
3941
- indicatorColor: ((g = o.palette.tertiary) == null ? void 0 : g.main) || o.palette.primary.main,
3942
- backgroundColor: ((m = o.palette.backgroundPaperElevation) == null ? void 0 : m[11]) || o.palette.background.paper,
3942
+ indicatorColor: ((u = o.palette.tertiary) == null ? void 0 : u.main) || o.palette.primary.main,
3943
+ backgroundColor: ((f = o.palette.backgroundPaperElevation) == null ? void 0 : f[11]) || o.palette.background.paper,
3943
3944
  textColor: o.palette.secondary.contrastText
3944
3945
  };
3945
3946
  case "ROBOT_DISCONNECTED":
@@ -3953,21 +3954,21 @@ const Jo = $(
3953
3954
  return {
3954
3955
  label: r("RobotSetupReadinessIndicator.CellOpen.lb"),
3955
3956
  indicatorColor: o.palette.error.main,
3956
- backgroundColor: ((u = o.palette.backgroundPaperElevation) == null ? void 0 : u[11]) || o.palette.background.paper,
3957
+ backgroundColor: ((p = o.palette.backgroundPaperElevation) == null ? void 0 : p[11]) || o.palette.background.paper,
3957
3958
  textColor: o.palette.secondary.contrastText
3958
3959
  };
3959
3960
  case "E_STOP":
3960
3961
  return {
3961
3962
  label: r("RobotSetupReadinessIndicator.EStop.lb"),
3962
3963
  indicatorColor: o.palette.error.main,
3963
- backgroundColor: ((p = o.palette.backgroundPaperElevation) == null ? void 0 : p[11]) || o.palette.background.paper,
3964
+ backgroundColor: ((g = o.palette.backgroundPaperElevation) == null ? void 0 : g[11]) || o.palette.background.paper,
3964
3965
  textColor: o.palette.secondary.contrastText
3965
3966
  };
3966
3967
  case "MANUAL_MODE":
3967
3968
  return {
3968
3969
  label: r("RobotSetupReadinessIndicator.ManualMode.lb"),
3969
3970
  indicatorColor: o.palette.error.main,
3970
- backgroundColor: ((x = o.palette.backgroundPaperElevation) == null ? void 0 : x[11]) || o.palette.background.paper,
3971
+ backgroundColor: ((m = o.palette.backgroundPaperElevation) == null ? void 0 : m[11]) || o.palette.background.paper,
3971
3972
  textColor: o.palette.secondary.contrastText
3972
3973
  };
3973
3974
  default:
@@ -3976,16 +3977,16 @@ const Jo = $(
3976
3977
  "RobotSetupReadinessIndicator.PreconditionNotFulfilled.lb"
3977
3978
  ),
3978
3979
  indicatorColor: o.palette.error.main,
3979
- backgroundColor: ((y = o.palette.backgroundPaperElevation) == null ? void 0 : y[11]) || o.palette.background.paper,
3980
+ backgroundColor: ((S = o.palette.backgroundPaperElevation) == null ? void 0 : S[11]) || o.palette.background.paper,
3980
3981
  textColor: o.palette.secondary.contrastText
3981
3982
  };
3982
3983
  }
3983
- }, { label: n, indicatorColor: c, backgroundColor: s, textColor: l } = i();
3984
- return /* @__PURE__ */ a(
3984
+ }, { label: n, indicatorColor: c, backgroundColor: a, textColor: l } = i();
3985
+ return /* @__PURE__ */ s(
3985
3986
  ro,
3986
3987
  {
3987
3988
  className: e,
3988
- label: /* @__PURE__ */ S(
3989
+ label: /* @__PURE__ */ v(
3989
3990
  T,
3990
3991
  {
3991
3992
  sx: {
@@ -3994,7 +3995,7 @@ const Jo = $(
3994
3995
  gap: 1
3995
3996
  },
3996
3997
  children: [
3997
- /* @__PURE__ */ a(
3998
+ /* @__PURE__ */ s(
3998
3999
  T,
3999
4000
  {
4000
4001
  sx: {
@@ -4006,8 +4007,8 @@ const Jo = $(
4006
4007
  }
4007
4008
  }
4008
4009
  ),
4009
- /* @__PURE__ */ a(
4010
- E,
4010
+ /* @__PURE__ */ s(
4011
+ j,
4011
4012
  {
4012
4013
  variant: "body2",
4013
4014
  sx: {
@@ -4024,8 +4025,8 @@ const Jo = $(
4024
4025
  ),
4025
4026
  variant: "filled",
4026
4027
  sx: {
4027
- backgroundColor: s,
4028
- color: o.palette.getContrastText(s),
4028
+ backgroundColor: a,
4029
+ color: o.palette.getContrastText(a),
4029
4030
  fontWeight: 500,
4030
4031
  height: "auto",
4031
4032
  "& .MuiChip-label": {
@@ -4046,8 +4047,8 @@ const Jo = $(
4046
4047
  className: i
4047
4048
  }) => {
4048
4049
  var l;
4049
- const n = F(), c = e || "Robot", s = o === Zt.READY;
4050
- return /* @__PURE__ */ S(
4050
+ const n = F(), c = e || "Robot", a = o === Zt.READY;
4051
+ return /* @__PURE__ */ v(
4051
4052
  T,
4052
4053
  {
4053
4054
  className: i,
@@ -4062,7 +4063,7 @@ const Jo = $(
4062
4063
  opacity: 1
4063
4064
  },
4064
4065
  children: [
4065
- /* @__PURE__ */ S(
4066
+ /* @__PURE__ */ v(
4066
4067
  T,
4067
4068
  {
4068
4069
  sx: {
@@ -4072,7 +4073,7 @@ const Jo = $(
4072
4073
  flex: 1
4073
4074
  },
4074
4075
  children: [
4075
- s ? /* @__PURE__ */ a(
4076
+ a ? /* @__PURE__ */ s(
4076
4077
  T,
4077
4078
  {
4078
4079
  sx: {
@@ -4089,9 +4090,9 @@ const Jo = $(
4089
4090
  fill: `${n.palette.primary.main} !important`
4090
4091
  }
4091
4092
  },
4092
- children: /* @__PURE__ */ a(Be, {})
4093
+ children: /* @__PURE__ */ s(Be, {})
4093
4094
  }
4094
- ) : /* @__PURE__ */ a(
4095
+ ) : /* @__PURE__ */ s(
4095
4096
  io,
4096
4097
  {
4097
4098
  sx: {
@@ -4100,8 +4101,8 @@ const Jo = $(
4100
4101
  }
4101
4102
  }
4102
4103
  ),
4103
- /* @__PURE__ */ a(
4104
- E,
4104
+ /* @__PURE__ */ s(
4105
+ j,
4105
4106
  {
4106
4107
  variant: "body1",
4107
4108
  sx: {
@@ -4111,7 +4112,7 @@ const Jo = $(
4111
4112
  children: t
4112
4113
  }
4113
4114
  ),
4114
- /* @__PURE__ */ a(
4115
+ /* @__PURE__ */ s(
4115
4116
  Y,
4116
4117
  {
4117
4118
  orientation: "vertical",
@@ -4123,8 +4124,8 @@ const Jo = $(
4123
4124
  }
4124
4125
  }
4125
4126
  ),
4126
- /* @__PURE__ */ a(
4127
- E,
4127
+ /* @__PURE__ */ s(
4128
+ j,
4128
4129
  {
4129
4130
  variant: "body2",
4130
4131
  sx: {
@@ -4136,7 +4137,7 @@ const Jo = $(
4136
4137
  ]
4137
4138
  }
4138
4139
  ),
4139
- r && /* @__PURE__ */ a(r, { setupState: o })
4140
+ r && /* @__PURE__ */ s(r, { setupState: o })
4140
4141
  ]
4141
4142
  }
4142
4143
  );
@@ -4174,7 +4175,7 @@ const Jo = $(
4174
4175
  };
4175
4176
  }), vi = (t) => {
4176
4177
  const { ref: e, ...o } = t;
4177
- return /* @__PURE__ */ a(
4178
+ return /* @__PURE__ */ s(
4178
4179
  Bo,
4179
4180
  {
4180
4181
  ref: e,
@@ -4187,7 +4188,7 @@ const Jo = $(
4187
4188
  };
4188
4189
  function Fo(t) {
4189
4190
  const { children: e, value: o, index: r, ...i } = t;
4190
- return /* @__PURE__ */ a(
4191
+ return /* @__PURE__ */ s(
4191
4192
  "div",
4192
4193
  {
4193
4194
  role: "tabpanel",
@@ -4195,7 +4196,7 @@ function Fo(t) {
4195
4196
  id: `tabpanel-${r}`,
4196
4197
  "aria-labelledby": `tab-${r}`,
4197
4198
  ...i,
4198
- children: o === r && /* @__PURE__ */ a(T, { children: e })
4199
+ children: o === r && /* @__PURE__ */ s(T, { children: e })
4199
4200
  }
4200
4201
  );
4201
4202
  }
@@ -4206,15 +4207,15 @@ function Lo({ children: t, ...e }) {
4206
4207
  onChange: i,
4207
4208
  orientation: n,
4208
4209
  scrollButtons: c,
4209
- selectionFollowsFocus: s,
4210
+ selectionFollowsFocus: a,
4210
4211
  textColor: l,
4211
- value: g,
4212
- variant: m,
4212
+ value: u,
4213
+ variant: f,
4213
4214
  ...d
4214
4215
  } = e;
4215
- return /* @__PURE__ */ a(T, { ...d, children: t });
4216
+ return /* @__PURE__ */ s(T, { ...d, children: t });
4216
4217
  }
4217
- const Ci = $(
4218
+ const wi = $(
4218
4219
  J((t) => {
4219
4220
  const {
4220
4221
  items: e,
@@ -4223,20 +4224,20 @@ const Ci = $(
4223
4224
  onTabChange: i,
4224
4225
  sx: n,
4225
4226
  ref: c
4226
- } = t, s = o !== void 0, [l, g] = B(r), m = s ? o : l;
4227
+ } = t, a = o !== void 0, [l, u] = B(r), f = a ? o : l;
4227
4228
  A(() => {
4228
- s || e.length !== 0 && (l < 0 || l > e.length - 1) && g(0);
4229
- }, [e.length, s, l]);
4230
- const d = (u, p) => {
4231
- s || g(p), i == null || i(p);
4229
+ a || e.length !== 0 && (l < 0 || l > e.length - 1) && u(0);
4230
+ }, [e.length, a, l]);
4231
+ const d = (p, g) => {
4232
+ a || u(g), i == null || i(g);
4232
4233
  };
4233
- return /* @__PURE__ */ S(
4234
+ return /* @__PURE__ */ v(
4234
4235
  T,
4235
4236
  {
4236
4237
  ref: c,
4237
4238
  sx: { height: "100%", display: "flex", flexDirection: "column", ...n },
4238
4239
  children: [
4239
- /* @__PURE__ */ a(
4240
+ /* @__PURE__ */ s(
4240
4241
  T,
4241
4242
  {
4242
4243
  sx: {
@@ -4247,15 +4248,15 @@ const Ci = $(
4247
4248
  // Extra padding to prevent badge clipping
4248
4249
  // Top: accommodates badge positioned at top: -6px with 20px height
4249
4250
  // Right: accommodates badge positioned at right: -8px with 20px width
4250
- paddingTop: (u) => u.spacing(2),
4251
+ paddingTop: (p) => p.spacing(2),
4251
4252
  // 16px
4252
- paddingRight: (u) => u.spacing(2.5)
4253
+ paddingRight: (p) => p.spacing(2.5)
4253
4254
  // 20px
4254
4255
  },
4255
- children: /* @__PURE__ */ a(
4256
+ children: /* @__PURE__ */ s(
4256
4257
  zt,
4257
4258
  {
4258
- value: m,
4259
+ value: f,
4259
4260
  onChange: d,
4260
4261
  sx: {
4261
4262
  minHeight: "32px",
@@ -4278,26 +4279,26 @@ const Ci = $(
4278
4279
  overflow: "visible"
4279
4280
  }
4280
4281
  },
4281
- children: e.map((u, p) => {
4282
- var w, C, M;
4283
- const x = () => {
4284
- if (!u.badge) return;
4285
- const k = u.badge.content, R = u.badge.max;
4282
+ children: e.map((p, g) => {
4283
+ var C, w, M;
4284
+ const m = () => {
4285
+ if (!p.badge) return;
4286
+ const k = p.badge.content, R = p.badge.max;
4286
4287
  return typeof k == "number" && R && k > R ? `${R}+` : k;
4287
- }, y = () => {
4288
- if (!u.badge) return !1;
4289
- const k = u.badge.content, R = u.badge.showZero;
4288
+ }, S = () => {
4289
+ if (!p.badge) return !1;
4290
+ const k = p.badge.content, R = p.badge.showZero;
4290
4291
  return !(k === 0 && !R);
4291
- }, f = x(), h = y(), v = () => {
4292
- s || g(p), i == null || i(p);
4293
- }, b = /* @__PURE__ */ a(
4292
+ }, x = m(), h = S(), y = () => {
4293
+ a || u(g), i == null || i(g);
4294
+ }, b = /* @__PURE__ */ s(
4294
4295
  $t,
4295
4296
  {
4296
- label: u.label,
4297
- icon: u.icon,
4297
+ label: p.label,
4298
+ icon: p.icon,
4298
4299
  iconPosition: "start",
4299
4300
  disableRipple: !0,
4300
- onClick: v,
4301
+ onClick: y,
4301
4302
  sx: {
4302
4303
  minHeight: "32px",
4303
4304
  height: "32px",
@@ -4308,13 +4309,13 @@ const Ci = $(
4308
4309
  return ((R = k.palette.backgroundPaperElevation) == null ? void 0 : R[11]) || "#32344B";
4309
4310
  },
4310
4311
  color: "text.primary",
4311
- opacity: m === p ? 1 : 0.38,
4312
+ opacity: f === g ? 1 : 0.38,
4312
4313
  fontSize: "13px",
4313
4314
  transition: "all 0.2s ease-in-out",
4314
4315
  position: "relative",
4315
4316
  overflow: "visible",
4316
4317
  "&:hover": {
4317
- opacity: m === p ? 1 : 0.6
4318
+ opacity: f === g ? 1 : 0.6
4318
4319
  },
4319
4320
  "&.Mui-selected": {
4320
4321
  opacity: 1,
@@ -4332,20 +4333,20 @@ const Ci = $(
4332
4333
  }
4333
4334
  }
4334
4335
  },
4335
- u.id
4336
+ p.id
4336
4337
  );
4337
- return h ? /* @__PURE__ */ a(
4338
+ return h ? /* @__PURE__ */ s(
4338
4339
  Lo,
4339
4340
  {
4340
4341
  component: "span",
4341
4342
  sx: { display: "inline-flex" },
4342
- children: /* @__PURE__ */ a(
4343
+ children: /* @__PURE__ */ s(
4343
4344
  so,
4344
4345
  {
4345
- badgeContent: f,
4346
- color: ((w = u.badge) == null ? void 0 : w.color) || "error",
4347
- max: (C = u.badge) == null ? void 0 : C.max,
4348
- showZero: (M = u.badge) == null ? void 0 : M.showZero,
4346
+ badgeContent: x,
4347
+ color: ((C = p.badge) == null ? void 0 : C.color) || "error",
4348
+ max: (w = p.badge) == null ? void 0 : w.max,
4349
+ showZero: (M = p.badge) == null ? void 0 : M.showZero,
4349
4350
  anchorOrigin: {
4350
4351
  vertical: "top",
4351
4352
  horizontal: "right"
@@ -4361,24 +4362,24 @@ const Ci = $(
4361
4362
  }
4362
4363
  )
4363
4364
  },
4364
- u.id
4365
+ p.id
4365
4366
  ) : b;
4366
4367
  })
4367
4368
  }
4368
4369
  )
4369
4370
  }
4370
4371
  ),
4371
- /* @__PURE__ */ a(
4372
+ /* @__PURE__ */ s(
4372
4373
  T,
4373
4374
  {
4374
4375
  sx: {
4375
- mt: (u) => u.spacing(2),
4376
+ mt: (p) => p.spacing(2),
4376
4377
  borderBottom: 1,
4377
4378
  borderColor: "divider"
4378
4379
  }
4379
4380
  }
4380
4381
  ),
4381
- /* @__PURE__ */ a(T, { sx: { flex: 1, overflow: "auto" }, children: e.map((u, p) => /* @__PURE__ */ a(Fo, { value: m, index: p, children: u.content }, u.id)) })
4382
+ /* @__PURE__ */ s(T, { sx: { flex: 1, overflow: "auto" }, children: e.map((p, g) => /* @__PURE__ */ s(Fo, { value: f, index: g, children: p.content }, p.id)) })
4382
4383
  ]
4383
4384
  }
4384
4385
  );
@@ -4390,8 +4391,8 @@ const Ci = $(
4390
4391
  const o = Math.floor(t / 86400), r = Math.floor(t % 86400 / 3600), i = Math.floor(t % 3600 / 60), n = t % 60;
4391
4392
  if (typeof Intl < "u" && "DurationFormat" in Intl)
4392
4393
  try {
4393
- const s = {};
4394
- return o > 0 && (s.days = o), r > 0 && (s.hours = r), i > 0 && (s.minutes = i), (n > 0 || Object.keys(s).length === 0) && (s.seconds = n), new Intl.DurationFormat(e, { style: "narrow" }).format(s);
4394
+ const a = {};
4395
+ return o > 0 && (a.days = o), r > 0 && (a.hours = r), i > 0 && (a.minutes = i), (n > 0 || Object.keys(a).length === 0) && (a.seconds = n), new Intl.DurationFormat(e, { style: "narrow" }).format(a);
4395
4396
  } catch {
4396
4397
  }
4397
4398
  const c = [];
@@ -4402,8 +4403,8 @@ const Ci = $(
4402
4403
  hasError: o,
4403
4404
  className: r
4404
4405
  }) => {
4405
- const { t: i } = V(), n = F(), { elapsedTime: c, currentProgress: s } = t, { showErrorAnimation: l, showPauseAnimation: g, showMainText: m } = e;
4406
- return /* @__PURE__ */ S(
4406
+ const { t: i } = V(), n = F(), { elapsedTime: c, currentProgress: a } = t, { showErrorAnimation: l, showPauseAnimation: u, showMainText: f } = e;
4407
+ return /* @__PURE__ */ v(
4407
4408
  T,
4408
4409
  {
4409
4410
  className: r,
@@ -4416,12 +4417,12 @@ const Ci = $(
4416
4417
  justifyContent: "center"
4417
4418
  },
4418
4419
  children: [
4419
- /* @__PURE__ */ a(
4420
+ /* @__PURE__ */ s(
4420
4421
  lo,
4421
4422
  {
4422
4423
  width: 264,
4423
4424
  height: 264,
4424
- value: s,
4425
+ value: a,
4425
4426
  valueMin: 0,
4426
4427
  valueMax: 100,
4427
4428
  innerRadius: "85%",
@@ -4430,7 +4431,7 @@ const Ci = $(
4430
4431
  skipAnimation: !0,
4431
4432
  text: () => "",
4432
4433
  sx: {
4433
- opacity: g || l ? 0.6 : 1,
4434
+ opacity: u || l ? 0.6 : 1,
4434
4435
  transition: "opacity 0.5s ease-out",
4435
4436
  "& .MuiGauge-valueArc": {
4436
4437
  fill: o ? n.palette.error.light : n.palette.success.main,
@@ -4451,7 +4452,7 @@ const Ci = $(
4451
4452
  }
4452
4453
  }
4453
4454
  ),
4454
- /* @__PURE__ */ a(
4455
+ /* @__PURE__ */ s(
4455
4456
  T,
4456
4457
  {
4457
4458
  sx: {
@@ -4471,7 +4472,7 @@ const Ci = $(
4471
4472
  gap: 1,
4472
4473
  transition: "background-color 0.5s ease-out"
4473
4474
  },
4474
- children: /* @__PURE__ */ S(
4475
+ children: /* @__PURE__ */ v(
4475
4476
  T,
4476
4477
  {
4477
4478
  sx: {
@@ -4483,8 +4484,8 @@ const Ci = $(
4483
4484
  marginBottom: 0.5
4484
4485
  },
4485
4486
  children: [
4486
- /* @__PURE__ */ a(U, { in: m && o, timeout: 200, children: /* @__PURE__ */ a(
4487
- E,
4487
+ /* @__PURE__ */ s(U, { in: f && o, timeout: 200, children: /* @__PURE__ */ s(
4488
+ j,
4488
4489
  {
4489
4490
  variant: "h6",
4490
4491
  sx: {
@@ -4496,8 +4497,8 @@ const Ci = $(
4496
4497
  children: i("timer.error")
4497
4498
  }
4498
4499
  ) }),
4499
- /* @__PURE__ */ a(U, { in: m && !o, timeout: 300, children: /* @__PURE__ */ a(
4500
- E,
4500
+ /* @__PURE__ */ s(U, { in: f && !o, timeout: 300, children: /* @__PURE__ */ s(
4501
+ j,
4501
4502
  {
4502
4503
  variant: "h1",
4503
4504
  sx: {
@@ -4526,8 +4527,8 @@ const Ci = $(
4526
4527
  compact: r,
4527
4528
  className: i
4528
4529
  }) => {
4529
- const { t: n, i18n: c } = V(), s = F(), { elapsedTime: l, currentProgress: g } = t, { showErrorAnimation: m, showPauseAnimation: d } = e;
4530
- return r ? /* @__PURE__ */ a(
4530
+ const { t: n, i18n: c } = V(), a = F(), { elapsedTime: l, currentProgress: u } = t, { showErrorAnimation: f, showPauseAnimation: d } = e;
4531
+ return r ? /* @__PURE__ */ s(
4531
4532
  T,
4532
4533
  {
4533
4534
  className: i,
@@ -4536,12 +4537,12 @@ const Ci = $(
4536
4537
  alignItems: "center",
4537
4538
  m: 0
4538
4539
  },
4539
- children: /* @__PURE__ */ a(
4540
- E,
4540
+ children: /* @__PURE__ */ s(
4541
+ j,
4541
4542
  {
4542
4543
  variant: "body2",
4543
4544
  sx: {
4544
- color: o ? s.palette.error.light : s.palette.text.primary,
4545
+ color: o ? a.palette.error.light : a.palette.text.primary,
4545
4546
  fontSize: "14px",
4546
4547
  transition: "color 0.5s ease-out"
4547
4548
  },
@@ -4549,7 +4550,7 @@ const Ci = $(
4549
4550
  }
4550
4551
  )
4551
4552
  }
4552
- ) : /* @__PURE__ */ S(
4553
+ ) : /* @__PURE__ */ v(
4553
4554
  T,
4554
4555
  {
4555
4556
  className: i,
@@ -4560,7 +4561,7 @@ const Ci = $(
4560
4561
  gap: 1
4561
4562
  },
4562
4563
  children: [
4563
- /* @__PURE__ */ a(
4564
+ /* @__PURE__ */ s(
4564
4565
  T,
4565
4566
  {
4566
4567
  sx: {
@@ -4569,10 +4570,10 @@ const Ci = $(
4569
4570
  display: "flex",
4570
4571
  alignItems: "center",
4571
4572
  justifyContent: "center",
4572
- opacity: d || m ? 0.6 : 1,
4573
+ opacity: d || f ? 0.6 : 1,
4573
4574
  transition: "opacity 0.5s ease-out"
4574
4575
  },
4575
- children: /* @__PURE__ */ S(
4576
+ children: /* @__PURE__ */ v(
4576
4577
  "svg",
4577
4578
  {
4578
4579
  width: "20",
@@ -4582,14 +4583,14 @@ const Ci = $(
4582
4583
  role: "img",
4583
4584
  "aria-label": "Timer progress",
4584
4585
  children: [
4585
- /* @__PURE__ */ a(
4586
+ /* @__PURE__ */ s(
4586
4587
  "circle",
4587
4588
  {
4588
4589
  cx: "10",
4589
4590
  cy: "10",
4590
4591
  r: "8",
4591
4592
  fill: "none",
4592
- stroke: o ? s.palette.error.light : s.palette.success.main,
4593
+ stroke: o ? a.palette.error.light : a.palette.success.main,
4593
4594
  strokeWidth: "2",
4594
4595
  opacity: 0.3,
4595
4596
  style: {
@@ -4597,18 +4598,18 @@ const Ci = $(
4597
4598
  }
4598
4599
  }
4599
4600
  ),
4600
- /* @__PURE__ */ a(
4601
+ /* @__PURE__ */ s(
4601
4602
  "circle",
4602
4603
  {
4603
4604
  cx: "10",
4604
4605
  cy: "10",
4605
4606
  r: "8",
4606
4607
  fill: "none",
4607
- stroke: o ? s.palette.error.light : s.palette.success.main,
4608
+ stroke: o ? a.palette.error.light : a.palette.success.main,
4608
4609
  strokeWidth: "2",
4609
4610
  strokeLinecap: "round",
4610
4611
  strokeDasharray: `${2 * Math.PI * 8}`,
4611
- strokeDashoffset: `${2 * Math.PI * 8 * (1 - g / 100)}`,
4612
+ strokeDashoffset: `${2 * Math.PI * 8 * (1 - u / 100)}`,
4612
4613
  style: {
4613
4614
  transition: "stroke-dashoffset 0.1s ease-out, stroke 0.8s ease-in-out, opacity 2s ease-in-out"
4614
4615
  }
@@ -4619,12 +4620,12 @@ const Ci = $(
4619
4620
  )
4620
4621
  }
4621
4622
  ),
4622
- /* @__PURE__ */ a(
4623
- E,
4623
+ /* @__PURE__ */ s(
4624
+ j,
4624
4625
  {
4625
4626
  variant: "body2",
4626
4627
  sx: {
4627
- color: o ? s.palette.error.light : s.palette.text.primary,
4628
+ color: o ? a.palette.error.light : a.palette.text.primary,
4628
4629
  fontSize: "14px",
4629
4630
  lineHeight: "normal",
4630
4631
  letterSpacing: "normal",
@@ -4645,17 +4646,17 @@ const Ci = $(
4645
4646
  null
4646
4647
  ), r = D(
4647
4648
  null
4648
- ), i = D(null), n = P(() => {
4649
+ ), i = D(null), n = _(() => {
4649
4650
  e((d) => ({ ...d, showPauseAnimation: !0 })), o.current && clearTimeout(o.current), o.current = setTimeout(() => {
4650
4651
  e((d) => ({ ...d, showPauseAnimation: !1 }));
4651
4652
  }, 800);
4652
- }, []), c = P(() => {
4653
+ }, []), c = _(() => {
4653
4654
  e((d) => ({ ...d, showErrorAnimation: !0 })), r.current && clearTimeout(r.current), r.current = setTimeout(() => {
4654
4655
  e((d) => ({ ...d, showErrorAnimation: !1 }));
4655
4656
  }, 600);
4656
- }, []), s = P(() => {
4657
+ }, []), a = _(() => {
4657
4658
  e((d) => ({ ...d, showErrorAnimation: !1 })), r.current && clearTimeout(r.current);
4658
- }, []), l = P(() => {
4659
+ }, []), l = _(() => {
4659
4660
  e((d) => ({
4660
4661
  ...d,
4661
4662
  showMainText: !1
@@ -4665,22 +4666,22 @@ const Ci = $(
4665
4666
  showMainText: !0
4666
4667
  }));
4667
4668
  }, 200);
4668
- }, []), g = P(() => {
4669
+ }, []), u = _(() => {
4669
4670
  e((d) => ({
4670
4671
  ...d,
4671
4672
  showMainText: !0
4672
4673
  }));
4673
- }, []), m = P(() => {
4674
+ }, []), f = _(() => {
4674
4675
  o.current && clearTimeout(o.current), r.current && clearTimeout(r.current), i.current && clearTimeout(i.current);
4675
4676
  }, []);
4676
4677
  return {
4677
4678
  animationState: t,
4678
4679
  triggerPauseAnimation: n,
4679
4680
  triggerErrorAnimation: c,
4680
- clearErrorAnimation: s,
4681
+ clearErrorAnimation: a,
4681
4682
  triggerFadeTransition: l,
4682
- setInitialAnimationState: g,
4683
- cleanup: m
4683
+ setInitialAnimationState: u,
4684
+ cleanup: f
4684
4685
  };
4685
4686
  }, Wo = ({
4686
4687
  autoStart: t,
@@ -4695,29 +4696,29 @@ const Ci = $(
4695
4696
  isPausedState: !1,
4696
4697
  currentProgress: 0,
4697
4698
  wasRunningBeforeError: !1
4698
- }), s = D(null), l = D(null), g = D(0), m = D(0), [d] = Lt([0], {
4699
+ }), a = D(null), l = D(null), u = D(0), f = D(0), [d] = Lt([0], {
4699
4700
  tension: 80,
4700
4701
  friction: 18,
4701
4702
  onChange: ([h]) => {
4702
- c((v) => ({ ...v, currentProgress: h }));
4703
+ c((y) => ({ ...y, currentProgress: h }));
4703
4704
  }
4704
- }), u = P(
4705
+ }), p = _(
4705
4706
  (h = 0) => {
4706
- const v = h / 60 % 1 * 100;
4707
+ const y = h / 60 % 1 * 100;
4707
4708
  c((b) => ({
4708
4709
  ...b,
4709
4710
  elapsedTime: h,
4710
4711
  isPausedState: !1,
4711
- currentProgress: v
4712
- })), g.current = 0, m.current = v, d.setImmediate([v]), t ? (l.current = Date.now() - h * 1e3, c((b) => ({ ...b, isRunning: !0 }))) : l.current = null;
4712
+ currentProgress: y
4713
+ })), u.current = 0, f.current = y, d.setImmediate([y]), t ? (l.current = Date.now() - h * 1e3, c((b) => ({ ...b, isRunning: !0 }))) : l.current = null;
4713
4714
  },
4714
4715
  [t, d]
4715
- ), p = P(() => {
4716
+ ), g = _(() => {
4716
4717
  if (l.current && n.isRunning) {
4717
- const v = (Date.now() - l.current) / 1e3 + g.current, b = v / 60 % 1 * 100;
4718
- d.setTarget([b]), c((w) => ({
4719
- ...w,
4720
- elapsedTime: Math.floor(v)
4718
+ const y = (Date.now() - l.current) / 1e3 + u.current, b = y / 60 % 1 * 100;
4719
+ d.setTarget([b]), c((C) => ({
4720
+ ...C,
4721
+ elapsedTime: Math.floor(y)
4721
4722
  }));
4722
4723
  }
4723
4724
  c((h) => ({
@@ -4725,70 +4726,70 @@ const Ci = $(
4725
4726
  isRunning: !1,
4726
4727
  isPausedState: !0
4727
4728
  })), o();
4728
- }, [n.isRunning, d, o]), x = P(() => {
4729
- n.isPausedState && (g.current = n.elapsedTime, l.current = Date.now(), c((h) => ({
4729
+ }, [n.isRunning, d, o]), m = _(() => {
4730
+ n.isPausedState && (u.current = n.elapsedTime, l.current = Date.now(), c((h) => ({
4730
4731
  ...h,
4731
4732
  isRunning: !0,
4732
4733
  isPausedState: !1
4733
4734
  })));
4734
- }, [n.isPausedState, n.elapsedTime]), y = P(() => {
4735
+ }, [n.isPausedState, n.elapsedTime]), S = _(() => {
4735
4736
  c((h) => ({
4736
4737
  ...h,
4737
4738
  elapsedTime: 0,
4738
4739
  isRunning: !1,
4739
4740
  isPausedState: !1,
4740
4741
  currentProgress: 0
4741
- })), g.current = 0, l.current = null, m.current = 0, d.setImmediate([0]);
4742
- }, [d]), f = P(() => n.isPausedState, [n.isPausedState]);
4742
+ })), u.current = 0, l.current = null, f.current = 0, d.setImmediate([0]);
4743
+ }, [d]), x = _(() => n.isPausedState, [n.isPausedState]);
4743
4744
  return A(() => {
4744
- e ? (n.isRunning && (c((h) => ({ ...h, wasRunningBeforeError: !0 })), p()), r()) : (n.wasRunningBeforeError && !n.isRunning && (c((h) => ({ ...h, wasRunningBeforeError: !1 })), x()), i());
4745
+ e ? (n.isRunning && (c((h) => ({ ...h, wasRunningBeforeError: !0 })), g()), r()) : (n.wasRunningBeforeError && !n.isRunning && (c((h) => ({ ...h, wasRunningBeforeError: !1 })), m()), i());
4745
4746
  }, [
4746
4747
  e,
4747
4748
  n.isRunning,
4748
4749
  n.wasRunningBeforeError,
4749
- p,
4750
- x,
4750
+ g,
4751
+ m,
4751
4752
  r,
4752
4753
  i
4753
4754
  ]), A(() => {
4754
4755
  if (n.isRunning) {
4755
4756
  const h = () => {
4756
4757
  if (l.current) {
4757
- const b = (Date.now() - l.current) / 1e3 + g.current, w = b / 60 % 1 * 100;
4758
+ const b = (Date.now() - l.current) / 1e3 + u.current, C = b / 60 % 1 * 100;
4758
4759
  c((M) => ({
4759
4760
  ...M,
4760
4761
  elapsedTime: Math.floor(b)
4761
4762
  })), Math.abs(
4762
- w - m.current
4763
- ) > 0.1 && (d.setTarget([w]), m.current = w);
4763
+ C - f.current
4764
+ ) > 0.1 && (d.setTarget([C]), f.current = C);
4764
4765
  }
4765
- s.current = requestAnimationFrame(h);
4766
+ a.current = requestAnimationFrame(h);
4766
4767
  };
4767
- s.current = requestAnimationFrame(h);
4768
+ a.current = requestAnimationFrame(h);
4768
4769
  } else
4769
- s.current && (cancelAnimationFrame(s.current), s.current = null);
4770
+ a.current && (cancelAnimationFrame(a.current), a.current = null);
4770
4771
  return () => {
4771
- s.current && (cancelAnimationFrame(s.current), s.current = null);
4772
+ a.current && (cancelAnimationFrame(a.current), a.current = null);
4772
4773
  };
4773
4774
  }, [n.isRunning, d]), A(() => {
4774
4775
  let h = null;
4775
- const v = () => {
4776
- d.update(), h = requestAnimationFrame(v);
4776
+ const y = () => {
4777
+ d.update(), h = requestAnimationFrame(y);
4777
4778
  };
4778
- return h = requestAnimationFrame(v), () => {
4779
+ return h = requestAnimationFrame(y), () => {
4779
4780
  h && cancelAnimationFrame(h);
4780
4781
  };
4781
4782
  }, [d]), {
4782
4783
  timerState: n,
4783
4784
  controls: {
4784
- start: u,
4785
- pause: p,
4786
- resume: x,
4787
- reset: y,
4788
- isPaused: f
4785
+ start: p,
4786
+ pause: g,
4787
+ resume: m,
4788
+ reset: S,
4789
+ isPaused: x
4789
4790
  }
4790
4791
  };
4791
- }, wi = $(
4792
+ }, Ci = $(
4792
4793
  J(
4793
4794
  ({
4794
4795
  onTimerReady: t,
@@ -4800,41 +4801,41 @@ const Ci = $(
4800
4801
  }) => {
4801
4802
  const {
4802
4803
  animationState: c,
4803
- triggerPauseAnimation: s,
4804
+ triggerPauseAnimation: a,
4804
4805
  triggerErrorAnimation: l,
4805
- clearErrorAnimation: g,
4806
- setInitialAnimationState: m,
4806
+ clearErrorAnimation: u,
4807
+ setInitialAnimationState: f,
4807
4808
  cleanup: d
4808
- } = No(), { timerState: u, controls: p } = Wo({
4809
+ } = No(), { timerState: p, controls: g } = Wo({
4809
4810
  autoStart: e,
4810
4811
  hasError: n,
4811
- onPauseAnimation: s,
4812
+ onPauseAnimation: a,
4812
4813
  onErrorAnimation: l,
4813
- onClearErrorAnimation: g
4814
+ onClearErrorAnimation: u
4814
4815
  });
4815
4816
  return A(() => {
4816
- m();
4817
- }, [m]), A(() => {
4818
- let x = !0;
4819
- const y = setTimeout(() => {
4820
- x && t(p);
4817
+ f();
4818
+ }, [f]), A(() => {
4819
+ let m = !0;
4820
+ const S = setTimeout(() => {
4821
+ m && t(g);
4821
4822
  }, 0);
4822
4823
  return () => {
4823
- x = !1, clearTimeout(y);
4824
+ m = !1, clearTimeout(S);
4824
4825
  };
4825
- }, [t, p]), A(() => d, [d]), o === "small" ? /* @__PURE__ */ a(
4826
+ }, [t, g]), A(() => d, [d]), o === "small" ? /* @__PURE__ */ s(
4826
4827
  Vo,
4827
4828
  {
4828
- timerState: u,
4829
+ timerState: p,
4829
4830
  animationState: c,
4830
4831
  hasError: n,
4831
4832
  compact: r,
4832
4833
  className: i
4833
4834
  }
4834
- ) : /* @__PURE__ */ a(
4835
+ ) : /* @__PURE__ */ s(
4835
4836
  zo,
4836
4837
  {
4837
- timerState: u,
4838
+ timerState: p,
4838
4839
  animationState: c,
4839
4840
  hasError: n,
4840
4841
  className: i
@@ -4850,34 +4851,34 @@ const Ci = $(
4850
4851
  reverse_rotation_direction: !1
4851
4852
  };
4852
4853
  class ut {
4853
- constructor(e, o, r, i, n, c, s, l, g, m) {
4854
- this.nova = e, this.controller = o, this.motionGroup = r, this.initialMotionState = i, this.motionStateSocket = n, this.isVirtual = c, this.tcps = s, this.description = l, this.initialControllerState = g, this.controllerStateSocket = m, this.connectedJoggingSocket = null, this.joggingVelocity = 10, this.activationState = "inactive", this.rapidlyChangingMotionState = i, this.controllerState = g, m.addEventListener("message", (d) => {
4855
- var p;
4856
- const u = (p = W(d.data)) == null ? void 0 : p.result;
4857
- u && L(() => {
4858
- this.controllerState = u;
4854
+ constructor(e, o, r, i, n, c, a, l, u, f) {
4855
+ this.nova = e, this.controller = o, this.motionGroup = r, this.initialMotionState = i, this.motionStateSocket = n, this.isVirtual = c, this.tcps = a, this.description = l, this.initialControllerState = u, this.controllerStateSocket = f, this.connectedJoggingSocket = null, this.joggingVelocity = 10, this.activationState = "inactive", this.rapidlyChangingMotionState = i, this.controllerState = u, f.addEventListener("message", (d) => {
4856
+ var g;
4857
+ const p = (g = W(d.data)) == null ? void 0 : g.result;
4858
+ p && L(() => {
4859
+ this.controllerState = p;
4859
4860
  });
4860
4861
  }), n.addEventListener("message", (d) => {
4861
- var p;
4862
- const u = (p = W(d.data)) == null ? void 0 : p.result;
4863
- if (!u)
4862
+ var g;
4863
+ const p = (g = W(d.data)) == null ? void 0 : g.result;
4864
+ if (!p)
4864
4865
  throw new Error(
4865
4866
  `Failed to get motion state for ${this.motionGroupId}: ${d.data}`
4866
4867
  );
4867
4868
  Wt(
4868
4869
  this.rapidlyChangingMotionState.joint_position,
4869
- u.joint_position,
4870
+ p.joint_position,
4870
4871
  At
4871
4872
  ) || L(() => {
4872
- this.rapidlyChangingMotionState.joint_position = u.joint_position;
4873
+ this.rapidlyChangingMotionState.joint_position = p.joint_position;
4873
4874
  }), Gt(
4874
4875
  this.rapidlyChangingMotionState,
4875
- u,
4876
+ p,
4876
4877
  At
4877
4878
  ) || L(() => {
4878
- this.rapidlyChangingMotionState.tcp_pose = u.tcp_pose;
4879
- }), this.rapidlyChangingMotionState.standstill !== u.standstill && L(() => {
4880
- this.rapidlyChangingMotionState.standstill = u.standstill;
4879
+ this.rapidlyChangingMotionState.tcp_pose = p.tcp_pose;
4880
+ }), this.rapidlyChangingMotionState.standstill !== p.standstill && L(() => {
4881
+ this.rapidlyChangingMotionState.standstill = p.standstill;
4881
4882
  });
4882
4883
  }), mt(this);
4883
4884
  }
@@ -4889,7 +4890,7 @@ class ut {
4889
4890
  );
4890
4891
  }
4891
4892
  static async connect(e, o) {
4892
- var h, v;
4893
+ var h, y;
4893
4894
  const [r, i] = o.split("@"), n = await e.api.controller.getCurrentRobotControllerState(i), c = n == null ? void 0 : n.motion_groups.find(
4894
4895
  (b) => b.motion_group === o
4895
4896
  );
@@ -4897,52 +4898,52 @@ class ut {
4897
4898
  throw new Error(
4898
4899
  `Controller ${i} or motion group ${o} not found`
4899
4900
  );
4900
- const s = e.openReconnectingWebsocket(
4901
+ const a = e.openReconnectingWebsocket(
4901
4902
  `/controllers/${i}/motion-groups/${o}/state-stream`
4902
- ), l = await s.firstMessage(), g = (h = W(l.data)) == null ? void 0 : h.result;
4903
- if (!g)
4903
+ ), l = await a.firstMessage(), u = (h = W(l.data)) == null ? void 0 : h.result;
4904
+ if (!u)
4904
4905
  throw new Error(
4905
4906
  `Unable to parse initial motion state message ${l.data}`
4906
4907
  );
4907
4908
  console.log(
4908
4909
  `Connected motion state websocket to motion group ${c.motion_group}. Initial state:
4909
4910
  `,
4910
- g
4911
+ u
4911
4912
  );
4912
4913
  const d = (await e.api.controller.getRobotController(
4913
4914
  n.controller
4914
- )).configuration.kind === "VirtualController", u = await e.api.motionGroup.getMotionGroupDescription(
4915
+ )).configuration.kind === "VirtualController", p = await e.api.motionGroup.getMotionGroupDescription(
4915
4916
  i,
4916
4917
  c.motion_group
4917
- ), p = Object.entries(u.tcps || {}).map(
4918
- ([b, w]) => ({
4918
+ ), g = Object.entries(p.tcps || {}).map(
4919
+ ([b, C]) => ({
4919
4920
  id: b,
4920
- readable_name: w.name,
4921
- position: w.pose.position,
4922
- orientation: w.pose.orientation
4921
+ readable_name: C.name,
4922
+ position: C.pose.position,
4923
+ orientation: C.pose.orientation
4923
4924
  })
4924
- ), x = e.openReconnectingWebsocket(
4925
+ ), m = e.openReconnectingWebsocket(
4925
4926
  `/controllers/${n.controller}/state-stream?response_rate=1000`
4926
- ), y = await x.firstMessage(), f = (v = W(y.data)) == null ? void 0 : v.result;
4927
- if (!f)
4927
+ ), S = await m.firstMessage(), x = (y = W(S.data)) == null ? void 0 : y.result;
4928
+ if (!x)
4928
4929
  throw new Error(
4929
- `Unable to parse initial controller state message ${y.data}`
4930
+ `Unable to parse initial controller state message ${S.data}`
4930
4931
  );
4931
4932
  return console.log(
4932
4933
  `Connected controller state websocket to controller ${n.controller}. Initial state:
4933
4934
  `,
4934
- f
4935
+ x
4935
4936
  ), new ut(
4936
4937
  e,
4937
4938
  n,
4938
4939
  c,
4939
- g,
4940
- s,
4940
+ u,
4941
+ a,
4941
4942
  d,
4943
+ g,
4942
4944
  p,
4943
- u,
4944
- f,
4945
- x
4945
+ x,
4946
+ m
4946
4947
  );
4947
4948
  }
4948
4949
  get motionGroupId() {
@@ -4985,13 +4986,13 @@ class ut {
4985
4986
  }
4986
4987
  /** Gets the robot mounting position rotation in 3D viz coordinates */
4987
4988
  get mountingQuaternion() {
4988
- var i, n, c, s, l, g;
4989
- const e = new Et.Vector3(
4989
+ var i, n, c, a, l, u;
4990
+ const e = new jt.Vector3(
4990
4991
  ((n = (i = this.description.mounting) == null ? void 0 : i.orientation) == null ? void 0 : n[0]) || 0,
4991
- ((s = (c = this.description.mounting) == null ? void 0 : c.orientation) == null ? void 0 : s[1]) || 0,
4992
- ((g = (l = this.description.mounting) == null ? void 0 : l.orientation) == null ? void 0 : g[2]) || 0
4992
+ ((a = (c = this.description.mounting) == null ? void 0 : c.orientation) == null ? void 0 : a[1]) || 0,
4993
+ ((u = (l = this.description.mounting) == null ? void 0 : l.orientation) == null ? void 0 : u[2]) || 0
4993
4994
  ), o = e.length(), r = e.normalize();
4994
- return new Et.Quaternion().setFromAxisAngle(r, o);
4995
+ return new jt.Quaternion().setFromAxisAngle(r, o);
4995
4996
  }
4996
4997
  /**
4997
4998
  * Whether the controller is currently in a safety state
@@ -5443,16 +5444,16 @@ export {
5443
5444
  gi as P,
5444
5445
  Si as R,
5445
5446
  vi as S,
5446
- Ci as T,
5447
- Eo as V,
5447
+ wi as T,
5448
+ jo as V,
5448
5449
  bo as W,
5449
- Pt as a,
5450
+ _t as a,
5450
5451
  xo as b,
5451
5452
  Ti as c,
5452
5453
  ui as d,
5453
5454
  pi as e,
5454
5455
  vo as f,
5455
- Co as g,
5456
+ wo as g,
5456
5457
  xi as h,
5457
5458
  at as i,
5458
5459
  mi as j,
@@ -5462,7 +5463,7 @@ export {
5462
5463
  Do as n,
5463
5464
  Zt as o,
5464
5465
  Jo as p,
5465
- wi as q,
5466
+ Ci as q,
5466
5467
  Ht as r,
5467
5468
  ut as s,
5468
5469
  ft as t,