quantum-component-library 1.4.47-dev.8 → 1.4.47-qa

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,5 +1,5 @@
1
1
  import { j as e } from "./react-jsx-runtime-vendor-OVHDjVDe.js";
2
- import { Flex as he, InputGroup as Fe, InputLeftElement as ct, Icon as Ue, Input as je, FormLabel as Be, Box as X, TableContainer as qe, Table as He, Thead as Ye, Tr as Se, Th as ue, Tbody as Je, Td as ge, ButtonGroup as xe, Tooltip as Le, Button as Y, RangeSlider as dt, RangeSliderMark as Ne, Text as x, RangeSliderTrack as ut, RangeSliderFilledTrack as ht, RangeSliderThumb as ke, Select as Re, NumberInput as Ee, NumberInputField as ze, HStack as te, Tag as fe, Checkbox as mt, Image as pt, useToast as Xe, VStack as ee, FormControl as q, RadioGroup as Ke, Radio as Ae, Alert as Te, AlertIcon as Me, Spinner as Ze, useDisclosure as gt, Modal as xt, ModalOverlay as jt, ModalContent as ft, ModalHeader as vt, ModalCloseButton as yt, ModalBody as bt, ModalFooter as Ct, IconButton as wt, Textarea as $e } from "@chakra-ui/react";
2
+ import { Flex as he, InputGroup as Fe, InputLeftElement as ct, Icon as Ue, Input as je, FormLabel as Be, Box as Y, TableContainer as qe, Table as He, Thead as Ye, Tr as Se, Th as ue, Tbody as Je, Td as ge, ButtonGroup as xe, Tooltip as Le, Button as J, RangeSlider as dt, RangeSliderMark as Ne, Text as x, RangeSliderTrack as ut, RangeSliderFilledTrack as ht, RangeSliderThumb as ke, Select as Re, NumberInput as Ee, NumberInputField as ze, HStack as te, Tag as fe, Checkbox as mt, Image as pt, useToast as Xe, VStack as ee, FormControl as q, RadioGroup as Ke, Radio as Ae, Alert as Te, AlertIcon as Me, Spinner as Ze, useDisclosure as gt, Modal as xt, ModalOverlay as jt, ModalContent as ft, ModalHeader as vt, ModalCloseButton as yt, ModalBody as bt, ModalFooter as Ct, IconButton as wt, Textarea as $e } from "@chakra-ui/react";
3
3
  import { useMemo as F, useState as P, useCallback as R, useRef as St, useEffect as ne, memo as Oe } from "react";
4
4
  import { u as At } from "./ufuzzy-vendor-Dl0ZI6Av.js";
5
5
  import { s as se } from "./react-select-vendor-BlY9Il4Q.js";
@@ -71,7 +71,7 @@ const Jt = ({
71
71
  },
72
72
  [n]
73
73
  );
74
- return /* @__PURE__ */ e.jsx(X, { children: /* @__PURE__ */ e.jsx(Rt, { backend: Et, children: /* @__PURE__ */ e.jsx(qe, { children: /* @__PURE__ */ e.jsxs(He, { variant: "simple", size: "md", children: [
74
+ return /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsx(Rt, { backend: Et, children: /* @__PURE__ */ e.jsx(qe, { children: /* @__PURE__ */ e.jsxs(He, { variant: "simple", size: "md", children: [
75
75
  /* @__PURE__ */ e.jsx(Ye, { children: /* @__PURE__ */ e.jsxs(Se, { children: [
76
76
  /* @__PURE__ */ e.jsx(ue, { children: "Order" }),
77
77
  /* @__PURE__ */ e.jsx(ue, { children: "Name" })
@@ -94,14 +94,14 @@ const Jt = ({
94
94
  collect: (h) => ({
95
95
  handlerId: h.getHandlerId()?.toString() ?? ""
96
96
  }),
97
- hover: (h, S) => {
97
+ hover: (h, C) => {
98
98
  if (!l.current)
99
99
  return;
100
100
  const r = h.index, a = n;
101
101
  if (r === a)
102
102
  return;
103
- const p = l.current?.getBoundingClientRect(), g = (p.bottom - p.top) / 2, C = S.getClientOffset().y - p.top;
104
- r < a && C < g || r > a && C > g || (u(r, a), h.index = a);
103
+ const p = l.current?.getBoundingClientRect(), g = (p.bottom - p.top) / 2, w = C.getClientOffset().y - p.top;
104
+ r < a && w < g || r > a && w > g || (u(r, a), h.index = a);
105
105
  }
106
106
  }), [{ isDragging: o }, I] = $t({
107
107
  type: s,
@@ -133,7 +133,7 @@ const Jt = ({
133
133
  visibility: o.tooltip ? "visible" : "hidden",
134
134
  hasArrow: !0,
135
135
  children: /* @__PURE__ */ e.jsx(
136
- Y,
136
+ J,
137
137
  {
138
138
  onClick: () => d(o) ? null : n(o, I),
139
139
  isDisabled: o.disabled,
@@ -159,7 +159,7 @@ const Jt = ({
159
159
  isDisabled: A,
160
160
  ...h
161
161
  }) => {
162
- const [S, r] = P([void 0, void 0]), a = S[0], p = S[1], g = v && n < -5 && i > 5, y = Number(c?.[0] ?? p ?? n) > 0 ? 1 : -1, C = Number(c?.[1] ?? p ?? i) < 0 ? -1 : 1, G = j?.[0] === j?.[1], k = c?.[0], T = c?.[1];
162
+ const [C, r] = P([void 0, void 0]), a = C[0], p = C[1], g = v && n < -5 && i > 5, y = Number(c?.[0] ?? p ?? n) > 0 ? 1 : -1, w = Number(c?.[1] ?? p ?? i) < 0 ? -1 : 1, G = j?.[0] === j?.[1], k = c?.[0], T = c?.[1];
163
163
  ne(() => {
164
164
  k !== void 0 && T !== void 0 && r([k.toFixed(0), T.toFixed(0)]);
165
165
  }, [k, T, r]);
@@ -175,10 +175,10 @@ const Jt = ({
175
175
  [u]
176
176
  ), _ = R(() => {
177
177
  r(([b, z]) => {
178
- const Z = isNaN(Number(b)) ? n : Number(b), t = isNaN(Number(z)) ? i : Number(z), m = ye(Number(Z), y), w = ye(Number(t), C), D = y < 0 ? Math.max(m, n) : Math.min(m, i), $ = C < 0 ? Math.max(w, n) : Math.min(w, i);
178
+ const Z = isNaN(Number(b)) ? n : Number(b), t = isNaN(Number(z)) ? i : Number(z), m = ye(Number(Z), y), S = ye(Number(t), w), D = y < 0 ? Math.max(m, n) : Math.min(m, i), $ = w < 0 ? Math.max(S, n) : Math.min(S, i);
179
179
  return D > $ ? (u([$, D]), [$.toFixed(0), D.toFixed(0)]) : (u([D, $]), [D.toFixed(0), $.toFixed(0)]);
180
180
  });
181
- }, [u, r, y, C, n, i]), f = R(
181
+ }, [u, r, y, w, n, i]), f = R(
182
182
  (b) => {
183
183
  const z = b === "" || isNaN(Number(b)) ? b : ye(Number(b), y);
184
184
  r(([Z, t]) => [z.toString(), t]);
@@ -186,25 +186,25 @@ const Jt = ({
186
186
  [r, y]
187
187
  ), M = R(
188
188
  (b) => {
189
- const z = b === "" || isNaN(Number(b)) ? b : ye(Number(b), C);
189
+ const z = b === "" || isNaN(Number(b)) ? b : ye(Number(b), w);
190
190
  r(([Z, t]) => [Z, z.toString()]);
191
191
  },
192
- [r, C]
192
+ [r, w]
193
193
  ), L = F(
194
194
  () => d === "xs" ? "0.75rem" : void 0,
195
195
  [d]
196
- ), J = R(
196
+ ), X = R(
197
197
  (b, z) => {
198
198
  const Z = Number(z.target.value);
199
199
  if (!a || !p || ![-1, 1].includes(Z))
200
200
  return;
201
- const t = (D) => Z < 0 ? -1 * Math.abs(D) : Math.abs(D), m = b ? t(Number(a)) : Number(a), w = b ? Number(p) : t(Number(p));
202
- m > w ? u([w, m]) : u([m, w]);
201
+ const t = (D) => Z < 0 ? -1 * Math.abs(D) : Math.abs(D), m = b ? t(Number(a)) : Number(a), S = b ? Number(p) : t(Number(p));
202
+ m > S ? u([S, m]) : u([m, S]);
203
203
  },
204
204
  [a, p, u]
205
205
  );
206
206
  return /* @__PURE__ */ e.jsxs(he, { direction: "column", ...h, children: [
207
- /* @__PURE__ */ e.jsx(X, { pt: "1em", mb: "-0.5em", children: /* @__PURE__ */ e.jsxs(
207
+ /* @__PURE__ */ e.jsx(Y, { pt: "1em", mb: "-0.5em", children: /* @__PURE__ */ e.jsxs(
208
208
  dt,
209
209
  {
210
210
  "aria-label": ["min", "max"],
@@ -240,7 +240,7 @@ const Jt = ({
240
240
  g && /* @__PURE__ */ e.jsxs(Ne, { value: 0, top: "-1em", pos: "relative", children: [
241
241
  /* @__PURE__ */ e.jsx(x, { fontSize: d, fontWeight: "semibold", children: o?.(0) ?? "0" }),
242
242
  /* @__PURE__ */ e.jsx(
243
- X,
243
+ Y,
244
244
  {
245
245
  position: "absolute",
246
246
  width: "2px",
@@ -299,7 +299,7 @@ const Jt = ({
299
299
  size: d,
300
300
  fontWeight: "bold",
301
301
  value: y,
302
- onChange: (b) => J(!0, b),
302
+ onChange: (b) => X(!0, b),
303
303
  isDisabled: G || A,
304
304
  children: [
305
305
  /* @__PURE__ */ e.jsx("option", { value: -1, children: j[0] }),
@@ -337,7 +337,7 @@ const Jt = ({
337
337
  {
338
338
  size: d ?? "sm",
339
339
  min: 0,
340
- max: C < 0 ? Math.abs(k ?? n) : i,
340
+ max: w < 0 ? Math.abs(k ?? n) : i,
341
341
  precision: 0,
342
342
  value: p === "" ? "" : Math.abs(Number(p ?? i)),
343
343
  onChange: M,
@@ -363,8 +363,8 @@ const Jt = ({
363
363
  width: "auto",
364
364
  size: d,
365
365
  fontWeight: "bold",
366
- value: C,
367
- onChange: (b) => J(!1, b),
366
+ value: w,
367
+ onChange: (b) => X(!1, b),
368
368
  isDisabled: G || A,
369
369
  children: [
370
370
  /* @__PURE__ */ e.jsx("option", { value: -1, children: j[0] }),
@@ -385,14 +385,22 @@ const Jt = ({
385
385
  label: "This activity is owned by Quantum",
386
386
  "aria-label": "Quantum owned",
387
387
  children: /* @__PURE__ */ e.jsx(
388
- pt,
388
+ Y,
389
389
  {
390
- src: n,
391
- alt: "Quantum owned",
392
- boxSize: "16px",
393
- display: "inline-block",
394
- ml: 2,
395
- verticalAlign: "middle"
390
+ boxSize: "1.5em",
391
+ borderRadius: "full",
392
+ bg: "black",
393
+ display: "flex",
394
+ alignItems: "center",
395
+ justifyContent: "center",
396
+ children: /* @__PURE__ */ e.jsx(
397
+ pt,
398
+ {
399
+ src: n,
400
+ boxSize: "1em",
401
+ alt: "Quantum-owned activity"
402
+ }
403
+ )
396
404
  }
397
405
  )
398
406
  }
@@ -407,7 +415,7 @@ const Jt = ({
407
415
  n.replace(/([A-Z])/g, " $1").trim()
408
416
  )
409
417
  ).join(", "), rn = (s, n) => !n || n.length == 0 ? s : s.filter(
410
- (i) => i.useCases.some((c) => n.includes(c.id))
418
+ (i) => i.useCases?.some((c) => n.includes(c.id)) ?? !1
411
419
  ), ln = ({
412
420
  actions: s,
413
421
  totalActions: n,
@@ -422,11 +430,11 @@ const Jt = ({
422
430
  disableEdit: j,
423
431
  disableCreate: A,
424
432
  hideUseCase: h = !0,
425
- tableProps: S,
433
+ tableProps: C,
426
434
  containerProps: r,
427
435
  quantumIconSrc: a = "/favicon.ico"
428
436
  }) => {
429
- const [p, g] = P(""), [y, C] = P(), G = F(() => {
437
+ const [p, g] = P(""), [y, w] = P(), G = F(() => {
430
438
  if (!s)
431
439
  return;
432
440
  const f = sn(s, p);
@@ -444,11 +452,11 @@ const Jt = ({
444
452
  const f = s.filter((M) => M.selected);
445
453
  v(f.map((M) => M.id)), d && f.forEach((M) => d(M, !1));
446
454
  }, [s, v, d]), N = F(() => s.some((f) => f.selected && !f.quantumOwned), [s]), E = F(() => s.some((f) => f.selected), [s]), _ = F(() => s.some((f) => f.selected && f.quantumOwned), [s]);
447
- return /* @__PURE__ */ e.jsxs(X, { ...r, children: [
455
+ return /* @__PURE__ */ e.jsxs(Y, { ...r, children: [
448
456
  /* @__PURE__ */ e.jsxs(he, { alignContent: "space-between", gap: 4, children: [
449
457
  (i || c || v) && /* @__PURE__ */ e.jsxs(xe, { mb: "1rem", gap: 4, children: [
450
458
  i && /* @__PURE__ */ e.jsx(
451
- Y,
459
+ J,
452
460
  {
453
461
  isDisabled: !i || A,
454
462
  colorScheme: "blackAlpha",
@@ -461,8 +469,9 @@ const Jt = ({
461
469
  Le,
462
470
  {
463
471
  label: _ ? N ? "Quantum-owned activities are selected and will be skipped" : "Selected activities are quantum-owned and cannot be deleted" : void 0,
472
+ shouldWrapChildren: !0,
464
473
  children: /* @__PURE__ */ e.jsx(
465
- Y,
474
+ J,
466
475
  {
467
476
  colorScheme: "gray",
468
477
  isDisabled: !N || !c || I,
@@ -473,7 +482,7 @@ const Jt = ({
473
482
  }
474
483
  ),
475
484
  v && !o && /* @__PURE__ */ e.jsx(
476
- Y,
485
+ J,
477
486
  {
478
487
  colorScheme: "gray",
479
488
  isDisabled: !E,
@@ -487,12 +496,12 @@ const Jt = ({
487
496
  {
488
497
  setSearch: g,
489
498
  actions: s,
490
- updateUseCases: C,
499
+ updateUseCases: w,
491
500
  hideUseCaseFilter: h
492
501
  }
493
502
  )
494
503
  ] }),
495
- /* @__PURE__ */ e.jsx(qe, { mr: "2rem", overflowX: "hidden", ...S, children: /* @__PURE__ */ e.jsxs(He, { size: "md", variant: "simple", children: [
504
+ /* @__PURE__ */ e.jsx(qe, { mr: "2rem", overflowX: "hidden", ...C, children: /* @__PURE__ */ e.jsxs(He, { size: "md", variant: "simple", children: [
496
505
  /* @__PURE__ */ e.jsx(Ye, { position: "sticky", top: 0, bg: "white", zIndex: 1, children: /* @__PURE__ */ e.jsxs(Se, { children: [
497
506
  /* @__PURE__ */ e.jsxs(ue, { fontWeight: "normal", children: [
498
507
  "(showing ",
@@ -523,11 +532,12 @@ const Jt = ({
523
532
  mt,
524
533
  {
525
534
  isChecked: f.selected,
535
+ "aria-label": "Select activity",
526
536
  onChange: (M) => d(f, M.target.checked)
527
537
  }
528
538
  ),
529
539
  (f.quantumOwned || !u) && l && /* @__PURE__ */ e.jsx(
530
- Y,
540
+ J,
531
541
  {
532
542
  ml: "1em",
533
543
  size: "sm",
@@ -538,9 +548,9 @@ const Jt = ({
538
548
  }
539
549
  ),
540
550
  !f.quantumOwned && u && /* @__PURE__ */ e.jsx(
541
- Y,
551
+ J,
542
552
  {
543
- disabled: j,
553
+ isDisabled: j,
544
554
  ml: "1em",
545
555
  size: "sm",
546
556
  variant: "link",
@@ -583,14 +593,14 @@ const Jt = ({
583
593
  setButtonOnClick: l,
584
594
  quantumOwned: d
585
595
  }) => {
586
- const v = Xe(), [o, I] = P("copy"), [j, A] = P(""), [h, S] = P([]), [r, a] = P(!1), [p] = le({
596
+ const v = Xe(), [o, I] = P("copy"), [j, A] = P(""), [h, C] = P([]), [r, a] = P(!1), [p] = le({
587
597
  query: Ve
588
598
  }), [g] = le({
589
599
  query: Ot,
590
600
  variables: { groupId: j },
591
601
  pause: !j
592
602
  // Only run when group is selected
593
- }), [, y] = oe(De), [, C] = oe(
603
+ }), [, y] = oe(De), [, w] = oe(
594
604
  et
595
605
  ), G = F(() => p.data?.groups ? p.data.groups.map(
596
606
  (t) => U(tt, t)
@@ -601,13 +611,13 @@ const Jt = ({
601
611
  ), [k, h]), N = R(
602
612
  (t) => {
603
613
  const m = t?.value || "";
604
- A(m), S([]);
614
+ A(m), C([]);
605
615
  },
606
616
  []
607
617
  ), E = R(
608
618
  (t) => {
609
- const m = t.map((w) => w.value);
610
- S(m);
619
+ const m = t.map((S) => S.value);
620
+ C(m);
611
621
  },
612
622
  []
613
623
  ), _ = R(
@@ -615,7 +625,7 @@ const Jt = ({
615
625
  const m = U(
616
626
  me,
617
627
  t.categories
618
- ), w = {
628
+ ), S = {
619
629
  ...t,
620
630
  name: `${t.name} (Copy)`,
621
631
  // Add "(Copy)" suffix to distinguish
@@ -632,7 +642,7 @@ const Jt = ({
632
642
  categories: m?.map(($) => $.id),
633
643
  quantumOwned: d,
634
644
  id: void 0
635
- }, D = await y({ fields: w });
645
+ }, D = await y({ fields: S });
636
646
  if (D.error)
637
647
  throw new Error(D.error.message);
638
648
  if (D.data?.createAction)
@@ -642,7 +652,7 @@ const Jt = ({
642
652
  [y, d]
643
653
  ), f = R(
644
654
  async (t) => {
645
- const m = await C({ id: t.id });
655
+ const m = await w({ id: t.id });
646
656
  if (m.error)
647
657
  throw new Error(m.error.message);
648
658
  if (m.data?.convertActionToQuantumOwned)
@@ -652,7 +662,7 @@ const Jt = ({
652
662
  );
653
663
  throw new Error("No action data returned");
654
664
  },
655
- [C]
665
+ [w]
656
666
  ), M = R(async () => {
657
667
  if (a(!0), !T.length) {
658
668
  const t = new Error(
@@ -664,10 +674,10 @@ const Jt = ({
664
674
  try {
665
675
  const t = [];
666
676
  let m = 0;
667
- const w = o === "copy" ? _ : f, D = o === "copy" ? "copy" : "convert";
677
+ const S = o === "copy" ? _ : f, D = o === "copy" ? "copy" : "convert";
668
678
  for (const $ of T)
669
679
  try {
670
- const Q = await w($);
680
+ const Q = await S($);
671
681
  t.push(Q);
672
682
  } catch (Q) {
673
683
  console.error(
@@ -683,18 +693,18 @@ const Jt = ({
683
693
  status: m > 0 ? "warning" : "success",
684
694
  duration: 3e3,
685
695
  isClosable: !0
686
- }), s?.(), A(""), S([]);
696
+ }), s?.(), A(""), C([]);
687
697
  } else
688
698
  throw new Error(`Failed to ${D} any activities`);
689
699
  } catch (t) {
690
- const m = o === "copy" ? "copy" : "convert", w = t instanceof Error ? t.message : `Failed to ${m} activities`;
700
+ const m = o === "copy" ? "copy" : "convert", S = t instanceof Error ? t.message : `Failed to ${m} activities`;
691
701
  v({
692
702
  title: `${o === "copy" ? "Copy" : "Convert"} failed`,
693
- description: w,
703
+ description: S,
694
704
  status: "error",
695
705
  duration: 5e3,
696
706
  isClosable: !0
697
- }), i?.(t instanceof Error ? t : new Error(w));
707
+ }), i?.(t instanceof Error ? t : new Error(S));
698
708
  } finally {
699
709
  a(!1);
700
710
  }
@@ -707,7 +717,7 @@ const Jt = ({
707
717
  s,
708
718
  i
709
719
  ]), L = R(() => {
710
- A(""), S([]), I("copy"), n?.();
720
+ A(""), C([]), I("copy"), n?.();
711
721
  }, [n]);
712
722
  ne(() => {
713
723
  u && u({
@@ -720,7 +730,7 @@ const Jt = ({
720
730
  saveButton: M
721
731
  });
722
732
  }, [l, L, M]);
723
- const J = F(() => G.map((t) => ({
733
+ const X = F(() => G.map((t) => ({
724
734
  value: t.id,
725
735
  label: t.name
726
736
  })), [G]), b = F(() => k.filter((t) => o === "copy" ? !0 : !t.quantumOwned).map((t) => ({
@@ -729,7 +739,7 @@ const Jt = ({
729
739
  // Add custom data to identify quantum-owned actions for UI display
730
740
  isQuantumOwned: t.quantumOwned
731
741
  })), [k, o]), z = p.fetching, Z = g.fetching;
732
- return /* @__PURE__ */ e.jsx(X, { children: /* @__PURE__ */ e.jsxs(ee, { spacing: 6, align: "stretch", children: [
742
+ return /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsxs(ee, { spacing: 6, align: "stretch", children: [
733
743
  d && /* @__PURE__ */ e.jsxs(q, { children: [
734
744
  /* @__PURE__ */ e.jsx(re, { children: "Operation Mode" }),
735
745
  /* @__PURE__ */ e.jsx(
@@ -737,7 +747,7 @@ const Jt = ({
737
747
  {
738
748
  value: o,
739
749
  onChange: (t) => {
740
- I(t), S([]);
750
+ I(t), C([]);
741
751
  },
742
752
  children: /* @__PURE__ */ e.jsxs(te, { spacing: 6, children: [
743
753
  /* @__PURE__ */ e.jsx(Ae, { value: "copy", colorScheme: "blue", children: /* @__PURE__ */ e.jsxs(ee, { align: "start", spacing: 1, children: [
@@ -758,8 +768,8 @@ const Jt = ({
758
768
  se,
759
769
  {
760
770
  placeholder: "Choose a group...",
761
- options: J,
762
- value: J.find((t) => t.value === j) || null,
771
+ options: X,
772
+ value: X.find((t) => t.value === j) || null,
763
773
  onChange: N,
764
774
  isLoading: z,
765
775
  isDisabled: z,
@@ -816,11 +826,11 @@ const Jt = ({
816
826
  ] })
817
827
  ] })
818
828
  ] }),
819
- T.length > 0 && /* @__PURE__ */ e.jsxs(X, { p: 4, bg: "gray.50", borderRadius: "md", children: [
829
+ T.length > 0 && /* @__PURE__ */ e.jsxs(Y, { p: 4, bg: "gray.50", borderRadius: "md", children: [
820
830
  /* @__PURE__ */ e.jsx(x, { fontWeight: "semibold", mb: 3, children: T.length === 1 ? `Activity to ${o === "copy" ? "Copy" : "Convert"}:` : `${T.length} Activities to ${o === "copy" ? "Copy" : "Convert"}:` }),
821
831
  /* @__PURE__ */ e.jsxs(ee, { align: "start", spacing: 3, children: [
822
832
  T.map((t, m) => /* @__PURE__ */ e.jsxs(
823
- X,
833
+ Y,
824
834
  {
825
835
  w: "100%",
826
836
  p: 3,
@@ -873,7 +883,7 @@ const Jt = ({
873
883
  /* @__PURE__ */ e.jsxs(x, { children: [
874
884
  /* @__PURE__ */ e.jsx("strong", { children: "Use Cases:" }),
875
885
  " ",
876
- t.useCases.map((w) => w.name).join(", ") || "None"
886
+ t.useCases.map((S) => S.name).join(", ") || "None"
877
887
  ] })
878
888
  ]
879
889
  }
@@ -883,7 +893,7 @@ const Jt = ({
883
893
  t.id
884
894
  )),
885
895
  T.length > 1 && /* @__PURE__ */ e.jsx(
886
- X,
896
+ Y,
887
897
  {
888
898
  w: "100%",
889
899
  p: 2,
@@ -904,7 +914,7 @@ const Jt = ({
904
914
  ] }),
905
915
  !c && /* @__PURE__ */ e.jsxs(xe, { spacing: 4, justifyContent: "flex-end", children: [
906
916
  /* @__PURE__ */ e.jsx(
907
- Y,
917
+ J,
908
918
  {
909
919
  variant: "outline",
910
920
  onClick: L,
@@ -913,7 +923,7 @@ const Jt = ({
913
923
  }
914
924
  ),
915
925
  /* @__PURE__ */ e.jsxs(
916
- Y,
926
+ J,
917
927
  {
918
928
  colorScheme: o === "copy" ? "blue" : "green",
919
929
  onClick: M,
@@ -938,14 +948,14 @@ const Jt = ({
938
948
  setButtonOnClick: l,
939
949
  quantumOwned: d
940
950
  }) => {
941
- const v = Xe(), [o, I] = P(""), [j, A] = P([]), [h, S] = P(!1), [r, a] = P("copy"), [p] = le({
951
+ const v = Xe(), [o, I] = P(""), [j, A] = P([]), [h, C] = P(!1), [r, a] = P("copy"), [p] = le({
942
952
  query: Ve
943
953
  }), [g] = le({
944
954
  query: It,
945
955
  variables: { groupId: o },
946
956
  pause: !o
947
957
  // Only run when group is selected
948
- }), [, y] = oe(ot), [, C] = oe(st), [, G] = oe(De), [, k] = oe(
958
+ }), [, y] = oe(ot), [, w] = oe(st), [, G] = oe(De), [, k] = oe(
949
959
  et
950
960
  ), T = F(() => p.data?.groups ? p.data.groups.map(
951
961
  (t) => U(tt, t)
@@ -953,13 +963,13 @@ const Jt = ({
953
963
  Ce,
954
964
  g.data?.modules
955
965
  ).map((m) => {
956
- const w = U(
966
+ const S = U(
957
967
  nt,
958
968
  m.moduleActions
959
969
  );
960
970
  return {
961
971
  ...m,
962
- moduleActions: w.map((D) => ({
972
+ moduleActions: S.map((D) => ({
963
973
  ...D,
964
974
  action: U(ae, D.action)
965
975
  })),
@@ -978,13 +988,13 @@ const Jt = ({
978
988
  []
979
989
  ), f = R(
980
990
  (t) => {
981
- const m = t.map((w) => w.value);
991
+ const m = t.map((S) => S.value);
982
992
  A(m);
983
993
  },
984
994
  []
985
995
  ), M = R(async () => {
986
- if (S(!0), !E.length) {
987
- S(!1);
996
+ if (C(!0), !E.length) {
997
+ C(!1);
988
998
  const t = new Error(
989
999
  `No modules selected for ${r === "convert" ? "converting" : "copying"}`
990
1000
  );
@@ -994,11 +1004,11 @@ const Jt = ({
994
1004
  try {
995
1005
  const t = [];
996
1006
  let m = 0;
997
- for (const w of E)
1007
+ for (const S of E)
998
1008
  try {
999
- let D = w.moduleActions.map(($) => $.actionId);
1009
+ let D = S.moduleActions.map(($) => $.actionId);
1000
1010
  if (d) {
1001
- const $ = w.moduleActions.map((B) => B.action), Q = async (B) => {
1011
+ const $ = S.moduleActions.map((B) => B.action), Q = async (B) => {
1002
1012
  if (r === "copy") {
1003
1013
  if (B.quantumOwned) return B;
1004
1014
  const Ie = U(
@@ -1034,13 +1044,13 @@ const Jt = ({
1034
1044
  }
1035
1045
  if (r === "convert") {
1036
1046
  const $ = {
1037
- name: w.name,
1038
- description: w.description || void 0,
1047
+ name: S.name,
1048
+ description: S.description || void 0,
1039
1049
  actions: D,
1040
- categories: w.categories.map((K) => K.id),
1050
+ categories: S.categories.map((K) => K.id),
1041
1051
  quantumOwned: !0
1042
- }, Q = await C({
1043
- id: w.id,
1052
+ }, Q = await w({
1053
+ id: S.id,
1044
1054
  input: $
1045
1055
  });
1046
1056
  if (Q.error) throw new Error(Q.error.message);
@@ -1053,10 +1063,10 @@ const Jt = ({
1053
1063
  }
1054
1064
  } else {
1055
1065
  const $ = {
1056
- name: `${w.name} (Copy)`,
1057
- description: w.description || void 0,
1066
+ name: `${S.name} (Copy)`,
1067
+ description: S.description || void 0,
1058
1068
  actions: D,
1059
- categories: w.categories.map((K) => K.id),
1069
+ categories: S.categories.map((K) => K.id),
1060
1070
  quantumOwned: d
1061
1071
  }, Q = await y({ input: $ });
1062
1072
  if (Q.error) throw new Error(Q.error.message);
@@ -1070,15 +1080,15 @@ const Jt = ({
1070
1080
  }
1071
1081
  } catch (D) {
1072
1082
  console.error(
1073
- `Failed to ${r === "convert" ? "convert" : "copy"} module "${w.name}":`,
1083
+ `Failed to ${r === "convert" ? "convert" : "copy"} module "${S.name}":`,
1074
1084
  D
1075
1085
  ), m++;
1076
1086
  }
1077
1087
  if (t.length > 0) {
1078
- const w = t.length, D = E.length;
1088
+ const S = t.length, D = E.length;
1079
1089
  v({
1080
1090
  title: m > 0 ? `Partial ${r === "convert" ? "convert" : "copy"} completed` : `Modules ${r === "convert" ? "converted" : "copied"} successfully`,
1081
- description: m > 0 ? `${w} of ${D} modules ${r === "convert" ? "converted" : "copied"} successfully` : `${w} module${w > 1 ? "s" : ""} ${r === "convert" ? "converted" : "copied"} successfully`,
1091
+ description: m > 0 ? `${S} of ${D} modules ${r === "convert" ? "converted" : "copied"} successfully` : `${S} module${S > 1 ? "s" : ""} ${r === "convert" ? "converted" : "copied"} successfully`,
1082
1092
  status: m > 0 ? "warning" : "success",
1083
1093
  duration: 3e3,
1084
1094
  isClosable: !0
@@ -1097,12 +1107,12 @@ const Jt = ({
1097
1107
  isClosable: !0
1098
1108
  }), i?.(t instanceof Error ? t : new Error(m));
1099
1109
  } finally {
1100
- S(!1);
1110
+ C(!1);
1101
1111
  }
1102
1112
  }, [
1103
1113
  E,
1104
1114
  y,
1105
- C,
1115
+ w,
1106
1116
  v,
1107
1117
  s,
1108
1118
  i,
@@ -1124,7 +1134,7 @@ const Jt = ({
1124
1134
  saveButton: M
1125
1135
  });
1126
1136
  }, [l, L, M]);
1127
- const J = F(() => T.map((t) => ({
1137
+ const X = F(() => T.map((t) => ({
1128
1138
  value: t.id,
1129
1139
  label: t.name
1130
1140
  })), [T]), b = F(() => N.filter((t) => r === "copy" ? !0 : !t.quantumOwned).map((t) => ({
@@ -1133,7 +1143,7 @@ const Jt = ({
1133
1143
  // Add custom data to identify quantum-owned modules
1134
1144
  isQuantumOwned: t.quantumOwned
1135
1145
  })), [N, r]), z = p.fetching, Z = g.fetching;
1136
- return /* @__PURE__ */ e.jsx(X, { children: /* @__PURE__ */ e.jsxs(ee, { spacing: 6, align: "stretch", children: [
1146
+ return /* @__PURE__ */ e.jsx(Y, { children: /* @__PURE__ */ e.jsxs(ee, { spacing: 6, align: "stretch", children: [
1137
1147
  d && /* @__PURE__ */ e.jsxs(q, { children: [
1138
1148
  /* @__PURE__ */ e.jsx(re, { children: "Operation Mode" }),
1139
1149
  /* @__PURE__ */ e.jsx(
@@ -1162,8 +1172,8 @@ const Jt = ({
1162
1172
  se,
1163
1173
  {
1164
1174
  placeholder: "Choose a group...",
1165
- options: J,
1166
- value: J.find((t) => t.value === o) || null,
1175
+ options: X,
1176
+ value: X.find((t) => t.value === o) || null,
1167
1177
  onChange: _,
1168
1178
  isLoading: z,
1169
1179
  isDisabled: z,
@@ -1216,11 +1226,11 @@ const Jt = ({
1216
1226
  ] })
1217
1227
  ] })
1218
1228
  ] }),
1219
- E.length > 0 && /* @__PURE__ */ e.jsxs(X, { p: 4, bg: "gray.50", borderRadius: "md", children: [
1229
+ E.length > 0 && /* @__PURE__ */ e.jsxs(Y, { p: 4, bg: "gray.50", borderRadius: "md", children: [
1220
1230
  /* @__PURE__ */ e.jsx(x, { fontWeight: "semibold", mb: 3, children: E.length === 1 ? `Module to ${r === "copy" ? "Copy" : "Convert"}` : `${E.length} Modules to ${r === "copy" ? "Copy" : "Convert"}` }),
1221
1231
  /* @__PURE__ */ e.jsxs(ee, { align: "start", spacing: 3, children: [
1222
1232
  E.map((t, m) => /* @__PURE__ */ e.jsxs(
1223
- X,
1233
+ Y,
1224
1234
  {
1225
1235
  w: "100%",
1226
1236
  p: 3,
@@ -1258,7 +1268,7 @@ const Jt = ({
1258
1268
  /* @__PURE__ */ e.jsxs(x, { children: [
1259
1269
  /* @__PURE__ */ e.jsx("strong", { children: "Categories:" }),
1260
1270
  " ",
1261
- t.categories.map((w) => w.name).join(", ") || "None"
1271
+ t.categories.map((S) => S.name).join(", ") || "None"
1262
1272
  ] })
1263
1273
  ]
1264
1274
  }
@@ -1268,7 +1278,7 @@ const Jt = ({
1268
1278
  t.id
1269
1279
  )),
1270
1280
  E.length > 1 && /* @__PURE__ */ e.jsx(
1271
- X,
1281
+ Y,
1272
1282
  {
1273
1283
  w: "100%",
1274
1284
  p: 2,
@@ -1286,7 +1296,7 @@ const Jt = ({
1286
1296
  }
1287
1297
  ),
1288
1298
  d && E.filter((t) => t.moduleActions.some((m) => !m.action.quantumOwned)).length > 0 && /* @__PURE__ */ e.jsx(
1289
- X,
1299
+ Y,
1290
1300
  {
1291
1301
  p: 2,
1292
1302
  bg: "yellow.50",
@@ -1300,7 +1310,7 @@ const Jt = ({
1300
1310
  ] }),
1301
1311
  !c && /* @__PURE__ */ e.jsxs(xe, { spacing: 4, justifyContent: "flex-end", children: [
1302
1312
  /* @__PURE__ */ e.jsx(
1303
- Y,
1313
+ J,
1304
1314
  {
1305
1315
  variant: "outline",
1306
1316
  onClick: L,
@@ -1309,7 +1319,7 @@ const Jt = ({
1309
1319
  }
1310
1320
  ),
1311
1321
  /* @__PURE__ */ e.jsxs(
1312
- Y,
1322
+ J,
1313
1323
  {
1314
1324
  colorScheme: r === "copy" ? "blue" : "green",
1315
1325
  onClick: M,
@@ -1341,12 +1351,12 @@ const Jt = ({
1341
1351
  const A = gt(), h = F(() => i.map((y) => ({
1342
1352
  ...y,
1343
1353
  selected: c.includes(y.id)
1344
- })), [i, c]), S = F(() => i.reduce((y, C) => (y[C.id] = C, y), {}), [i]), r = F(
1345
- () => c.map((y) => S[y]),
1346
- [h, c]
1354
+ })), [i, c]), C = F(() => i.reduce((y, w) => (y[w.id] = w, y), {}), [i]), r = F(
1355
+ () => c.map((y) => C[y]),
1356
+ [c, C]
1347
1357
  ), a = R(
1348
- (y, C) => {
1349
- u(C ? [...c, y.id] : c.filter((G) => G !== y.id));
1358
+ (y, w) => {
1359
+ u(w ? [...c, y.id] : c.filter((G) => G !== y.id));
1350
1360
  },
1351
1361
  [c, u]
1352
1362
  ), p = R(
@@ -1360,7 +1370,7 @@ const Jt = ({
1360
1370
  },
1361
1371
  [I]
1362
1372
  );
1363
- return /* @__PURE__ */ e.jsxs(X, { ...j, children: [
1373
+ return /* @__PURE__ */ e.jsxs(Y, { ...j, children: [
1364
1374
  /* @__PURE__ */ e.jsxs(te, { gap: "2rem", children: [
1365
1375
  /* @__PURE__ */ e.jsx(cn, { name: s ?? "", onInputChange: p }),
1366
1376
  /* @__PURE__ */ e.jsx(
@@ -1412,7 +1422,7 @@ const Jt = ({
1412
1422
  }
1413
1423
  ) }),
1414
1424
  /* @__PURE__ */ e.jsx(Ct, { children: /* @__PURE__ */ e.jsx(
1415
- Y,
1425
+ J,
1416
1426
  {
1417
1427
  colorScheme: "blue",
1418
1428
  onClick: A.onClose,
@@ -1463,12 +1473,11 @@ const Jt = ({
1463
1473
  se,
1464
1474
  {
1465
1475
  isDisabled: s.length === 0,
1466
- isClearable: !0,
1467
1476
  options: u,
1468
- value: c.filter((l) => n.includes(l.id)).map((l) => ({
1477
+ value: n.length === 0 ? { value: "other", label: "Other" } : c.filter((l) => n.includes(l.id)).map((l) => ({
1469
1478
  value: l.id,
1470
1479
  label: l.name
1471
- })),
1480
+ }))[0],
1472
1481
  onChange: (l) => i(l ? [l.value] : []),
1473
1482
  placeholder: "Select category"
1474
1483
  }
@@ -1513,7 +1522,7 @@ const Jt = ({
1513
1522
  /* @__PURE__ */ e.jsx(x, { fontSize: "sm", color: "gray.500", children: "Drag and drop to reorder the activities in this module." })
1514
1523
  ] }) }),
1515
1524
  /* @__PURE__ */ e.jsx(
1516
- Y,
1525
+ J,
1517
1526
  {
1518
1527
  size: "sm",
1519
1528
  variant: "solid",
@@ -1526,7 +1535,7 @@ const Jt = ({
1526
1535
  c.length === 0 ? /* @__PURE__ */ e.jsx(ee, { children: /* @__PURE__ */ e.jsxs(x, { color: "gray.500", fontSize: "lg", mb: "4rem", mt: "4rem", children: [
1527
1536
  "No activities selected for this module.",
1528
1537
  /* @__PURE__ */ e.jsx(
1529
- Y,
1538
+ J,
1530
1539
  {
1531
1540
  ml: "0.5em",
1532
1541
  size: "sm",
@@ -1558,37 +1567,37 @@ const Jt = ({
1558
1567
  lockRanges: d,
1559
1568
  ...v
1560
1569
  }) => {
1561
- const o = F(() => [...s].sort((h, S) => {
1562
- const r = Ge.indexOf(h.plane), a = Ge.indexOf(S.plane);
1570
+ const o = F(() => [...s].sort((h, C) => {
1571
+ const r = Ge.indexOf(h.plane), a = Ge.indexOf(C.plane);
1563
1572
  return r - a;
1564
1573
  }), [s]), I = R((h) => "segment" in h.id ? it(h.id.segment, h.plane, !0) ?? "Unknown" : lt(h.id.joint, h.plane, !0) ?? "Unknown", []), j = R(
1565
- (h, S) => {
1574
+ (h, C) => {
1566
1575
  const r = o.findIndex(
1567
- (p) => p.id === S.id && p.plane === S.plane
1576
+ (p) => p.id === C.id && p.plane === C.plane
1568
1577
  );
1569
1578
  let a = [...o];
1570
- i && (S = { ...S, kind: i }), a[r] = S, d && (a = a.map((p) => ({
1579
+ i && (C = { ...C, kind: i }), a[r] = C, d && (a = a.map((p) => ({
1571
1580
  ...p,
1572
- min: S.min,
1573
- max: S.max
1581
+ min: C.min,
1582
+ max: C.max
1574
1583
  }))), n(a);
1575
1584
  },
1576
1585
  [n, o, i, d]
1577
1586
  ), A = R(
1578
1587
  (h) => {
1579
- const S = o.filter(
1588
+ const C = o.filter(
1580
1589
  (r) => r.id !== h.id || r.plane !== h.plane
1581
1590
  );
1582
- n(S);
1591
+ n(C);
1583
1592
  },
1584
1593
  [n, o]
1585
1594
  );
1586
- return /* @__PURE__ */ e.jsx(ee, { alignItems: "flex-start", overflowY: "auto", ...v, children: o.map((h, S) => /* @__PURE__ */ e.jsx(
1595
+ return /* @__PURE__ */ e.jsx(ee, { alignItems: "flex-start", overflowY: "auto", ...v, children: o.map((h, C) => /* @__PURE__ */ e.jsx(
1587
1596
  pn,
1588
1597
  {
1589
1598
  label: I(h),
1590
1599
  parameter: h,
1591
- onChange: (r) => j(S, r),
1600
+ onChange: (r) => j(C, r),
1592
1601
  onRemove: c || l ? void 0 : () => A(h),
1593
1602
  forceKind: i,
1594
1603
  disableKind: u || l,
@@ -1716,7 +1725,7 @@ const Jt = ({
1716
1725
  return A.filter(
1717
1726
  (p) => ve(p.value) === ve(a.id) && p.plane === a.plane
1718
1727
  );
1719
- }, [A, n, l]), S = F(
1728
+ }, [A, n, l]), C = F(
1720
1729
  () => A.filter(
1721
1730
  (a) => n.some((p) => be(p.id, a.value) && p.plane === a.plane)
1722
1731
  ),
@@ -1726,11 +1735,11 @@ const Jt = ({
1726
1735
  const p = a.map((g) => {
1727
1736
  const y = n.find(
1728
1737
  (N) => be(N.id, g.value) && N.plane === g.plane
1729
- ), C = s.find(
1738
+ ), w = s.find(
1730
1739
  (N) => be(N.id, g.value) && N.plane === g.plane
1731
1740
  ), G = l ? n.find(
1732
1741
  (N) => ve(N.id) === ve(g.value) && N.plane === g.plane
1733
- ) : void 0, k = G && !y ? G.min : C && C.min ? C.min : 0, T = G && !y ? G.max : C && C.max ? C.max : 0;
1742
+ ) : void 0, k = G && !y ? G.min : w && w.min ? w.min : 0, T = G && !y ? G.max : w && w.max ? w.max : 0;
1734
1743
  return y ?? {
1735
1744
  id: g.value,
1736
1745
  plane: g.plane,
@@ -1748,14 +1757,14 @@ const Jt = ({
1748
1757
  (p) => s.some((g) => be(g.id, p.id) && g.plane === p.plane)
1749
1758
  );
1750
1759
  a.length !== n.length && i(a);
1751
- }, [s, i]), /* @__PURE__ */ e.jsxs(X, { ...I, children: [
1760
+ }, [s, i]), /* @__PURE__ */ e.jsxs(Y, { ...I, children: [
1752
1761
  /* @__PURE__ */ e.jsx(
1753
1762
  se,
1754
1763
  {
1755
1764
  isMulti: !u,
1756
1765
  placeholder: n.length ? `${n.length} selected` : "Search...",
1757
- value: S,
1758
- isDisabled: d || S.length >= (j ?? 1 / 0),
1766
+ value: C,
1767
+ isDisabled: d || C.length >= (j ?? 1 / 0),
1759
1768
  onChange: (a) => Array.isArray(a) ? r([...a]) : r(a !== null ? [a] : []),
1760
1769
  options: h,
1761
1770
  controlShouldRenderValue: !1
@@ -1832,25 +1841,25 @@ const Jt = ({
1832
1841
  quantumOwned: v,
1833
1842
  isView: o
1834
1843
  }) => {
1835
- const [{ fetching: I }, j] = oe(De), [{ fetching: A }, h] = oe(Nt), [{ data: S }] = le({
1844
+ const [{ fetching: I }, j] = oe(De), [{ fetching: A }, h] = oe(Nt), [{ data: C }] = le({
1836
1845
  query: Lt,
1837
1846
  variables: { id: s ?? "" },
1838
1847
  pause: !s
1839
1848
  }), r = U(
1840
1849
  ae,
1841
- S?.getActionById
1842
- ), a = I || A, p = !!r && !!s, [g, y] = P(""), [C, G] = P(""), [k, T] = P(""), [N, E] = P(""), [_, f] = P(), [M, L] = P([]), [J, b] = P([]), [z, Z] = P([]), t = F(
1843
- () => J.map((O) => O.value),
1844
- [J]
1845
- ), m = Yt(t), [{ data: w }] = le({
1850
+ C?.getActionById
1851
+ ), a = I || A, p = !!r && !!s, [g, y] = P(""), [w, G] = P(""), [k, T] = P(""), [N, E] = P(""), [_, f] = P(), [M, L] = P([]), [X, b] = P([]), [z, Z] = P([]), t = F(
1852
+ () => X.map((O) => O.value),
1853
+ [X]
1854
+ ), m = Yt(t), [{ data: S }] = le({
1846
1855
  query: rt
1847
1856
  }), D = F(() => U(
1848
1857
  me,
1849
- w?.moduleCategories
1858
+ S?.moduleCategories
1850
1859
  )?.map((H) => ({
1851
1860
  label: H.name,
1852
1861
  value: H.id
1853
- })), [w?.moduleCategories]), $ = F(
1862
+ })), [S?.moduleCategories]), $ = F(
1854
1863
  () => Qe(Object.values(Pt), Pe),
1855
1864
  []
1856
1865
  ), [Q, K] = P([]), B = g.length > 0, [ce, Ie] = P({});
@@ -1882,7 +1891,7 @@ const Jt = ({
1882
1891
  const pe = F(
1883
1892
  () => JSON.stringify(ce) !== JSON.stringify({
1884
1893
  name: g,
1885
- description: C,
1894
+ description: w,
1886
1895
  cameraPlacement: k,
1887
1896
  videoLink: N,
1888
1897
  activityType: _,
@@ -1895,7 +1904,7 @@ const Jt = ({
1895
1904
  ce,
1896
1905
  g,
1897
1906
  t,
1898
- C,
1907
+ w,
1899
1908
  k,
1900
1909
  N,
1901
1910
  _,
@@ -1906,7 +1915,7 @@ const Jt = ({
1906
1915
  ), de = R(() => {
1907
1916
  const O = {
1908
1917
  name: g,
1909
- description: C,
1918
+ description: w,
1910
1919
  cameraPlacement: k,
1911
1920
  videoLink: N,
1912
1921
  activityType: _,
@@ -1935,7 +1944,7 @@ const Jt = ({
1935
1944
  s,
1936
1945
  g,
1937
1946
  t,
1938
- C,
1947
+ w,
1939
1948
  k,
1940
1949
  N,
1941
1950
  _,
@@ -2024,7 +2033,7 @@ const Jt = ({
2024
2033
  /* @__PURE__ */ e.jsx(
2025
2034
  $e,
2026
2035
  {
2027
- value: C,
2036
+ value: w,
2028
2037
  onChange: (O) => G(O.target.value),
2029
2038
  rows: 2,
2030
2039
  placeholder: "(optional) Describe how to perform the test or exercise",
@@ -2076,10 +2085,10 @@ const Jt = ({
2076
2085
  se,
2077
2086
  {
2078
2087
  isMulti: !0,
2079
- value: J,
2088
+ value: X,
2080
2089
  onChange: (O) => b([...O]),
2081
2090
  options: fn,
2082
- isOptionDisabled: () => J.length >= xn,
2091
+ isOptionDisabled: () => X.length >= xn,
2083
2092
  isDisabled: o
2084
2093
  }
2085
2094
  )
@@ -2105,9 +2114,9 @@ const Jt = ({
2105
2114
  (u || o) && "hidden"
2106
2115
  ),
2107
2116
  children: /* @__PURE__ */ e.jsxs(xe, { mt: 16, gap: 4, children: [
2108
- /* @__PURE__ */ e.jsx(Y, { colorScheme: "gray", isDisabled: a, onClick: i, children: "Cancel" }),
2117
+ /* @__PURE__ */ e.jsx(J, { colorScheme: "gray", isDisabled: a, onClick: i, children: "Cancel" }),
2109
2118
  /* @__PURE__ */ e.jsx(
2110
- Y,
2119
+ J,
2111
2120
  {
2112
2121
  colorScheme: "blue",
2113
2122
  isDisabled: a || !B || !pe,
@@ -2141,10 +2150,10 @@ const Jt = ({
2141
2150
  }), A = U(
2142
2151
  me,
2143
2152
  j?.moduleCategories
2144
- ), [{ fetching: h }, S] = oe(st), [{ fetching: r }, a] = oe(ot), p = U(
2153
+ ), [{ fetching: h }, C] = oe(st), [{ fetching: r }, a] = oe(ot), p = U(
2145
2154
  ae,
2146
2155
  l ? o?.quantumOwnedActions : o?.actions
2147
- ) ?? [], g = U(Ce, I?.module), y = U(nt, g?.moduleActions) ?? [], [C, G] = P([
2156
+ ) ?? [], g = U(Ce, I?.module), y = U(nt, g?.moduleActions) ?? [], [w, G] = P([
2148
2157
  ...y.map((L) => L.actionId) ?? []
2149
2158
  ]), [k, T] = P(g?.name ?? ""), [N, E] = P([]), [_, f] = P(g?.description ?? "");
2150
2159
  ne(() => {
@@ -2156,50 +2165,51 @@ const Jt = ({
2156
2165
  }, [g, y]);
2157
2166
  const M = R(() => {
2158
2167
  let L;
2159
- const J = {
2160
- actions: C,
2168
+ const X = {
2169
+ actions: w,
2161
2170
  name: k,
2162
2171
  categories: N.filter((b) => b !== "other"),
2163
2172
  description: _,
2164
2173
  quantumOwned: l
2165
2174
  };
2166
- g ? L = S({
2175
+ g ? L = C({
2167
2176
  id: g.id,
2168
- input: J
2177
+ input: X
2169
2178
  }) : L = a({
2170
- input: J
2179
+ input: X
2171
2180
  }), L.then(({ error: b }) => {
2172
2181
  b ? c(b) : i();
2173
2182
  });
2174
2183
  }, [
2175
2184
  a,
2176
- S,
2177
2185
  C,
2186
+ w,
2178
2187
  k,
2179
2188
  _,
2180
2189
  N,
2181
2190
  g,
2182
2191
  i,
2183
- c
2192
+ c,
2193
+ l
2184
2194
  ]);
2185
2195
  return ne(() => {
2186
2196
  v && v({
2187
2197
  cancelButton: h || r,
2188
2198
  saveButton: h || r || !k || _.trim().split(/\s+/).filter(Boolean).length > 40
2189
2199
  });
2190
- }, [v, h, r, C, k, _]), ne(() => {
2200
+ }, [v, h, r, w, k, _]), ne(() => {
2191
2201
  d && d({
2192
2202
  cancelButton: n,
2193
2203
  saveButton: M
2194
2204
  });
2195
- }, [d, n, M]), /* @__PURE__ */ e.jsxs(X, { width: "100%", children: [
2205
+ }, [d, n, M]), /* @__PURE__ */ e.jsxs(Y, { width: "100%", children: [
2196
2206
  /* @__PURE__ */ e.jsx(
2197
2207
  an,
2198
2208
  {
2199
2209
  name: k,
2200
2210
  setName: T,
2201
2211
  actions: p,
2202
- selectedActionIds: C,
2212
+ selectedActionIds: w,
2203
2213
  setSelectedActionIds: G,
2204
2214
  availableCategories: A ?? [],
2205
2215
  selectedCategoryIds: N,
@@ -2210,7 +2220,7 @@ const Jt = ({
2210
2220
  ),
2211
2221
  !u && /* @__PURE__ */ e.jsx(te, { justifyContent: "flex-start", children: /* @__PURE__ */ e.jsxs(xe, { mt: 16, gap: 4, children: [
2212
2222
  /* @__PURE__ */ e.jsx(
2213
- Y,
2223
+ J,
2214
2224
  {
2215
2225
  colorScheme: "gray",
2216
2226
  isDisabled: h || r,
@@ -2219,7 +2229,7 @@ const Jt = ({
2219
2229
  }
2220
2230
  ),
2221
2231
  /* @__PURE__ */ e.jsx(
2222
- Y,
2232
+ J,
2223
2233
  {
2224
2234
  colorScheme: "blue",
2225
2235
  isDisabled: h || r || !k || _.trim().split(/\s+/).filter(Boolean).length > 40,