@cratis/event-models 0.114.0 → 0.115.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/Board/BoardOverlay.d.ts +3 -1
  2. package/dist/Rows/UserExperience/UiCell.d.ts +7 -2
  3. package/dist/Rows/UserExperience/UiThumbnailProps.d.ts +13 -0
  4. package/dist/Rows/UserExperience/index.d.ts +1 -0
  5. package/dist/event-models.css +1 -1
  6. package/dist/index.js +990 -977
  7. package/dist/index.js.map +1 -1
  8. package/dist/screen-editor/ScreenEditor/Document/canvasMoveEdits.d.ts +7 -2
  9. package/dist/screen-editor/ScreenEditor/Document/placeOnCanvas.d.ts +8 -2
  10. package/dist/screen-editor/ScreenEditor/Host/ScreenEditorController.d.ts +7 -0
  11. package/dist/screen-editor/ScreenEditor/Host/ScreenEditorOverlay.d.ts +3 -0
  12. package/dist/screen-editor/ScreenEditor/Play/PlayScreen.d.ts +11 -0
  13. package/dist/screen-editor/ScreenEditor/Play/composePlayScreen.d.ts +7 -0
  14. package/dist/screen-editor/ScreenEditor/Runtime/ScreenEditorAppearance.d.ts +4 -0
  15. package/dist/screen-editor/ScreenEditor/Runtime/profileTheme.d.ts +1 -1
  16. package/dist/screen-editor/ScreenEditor/Runtime/screenEditorRuntime.d.ts +3 -1
  17. package/dist/screen-editor/ScreenEditor/Runtime/screenEditorRuntimeForProfile.d.ts +2 -1
  18. package/dist/screen-editor/ScreenEditor/Surface/designTimePointer.d.ts +9 -0
  19. package/dist/screen-editor/ScreenEditor/Surface/useDesignTimePointer.d.ts +2 -0
  20. package/dist/screen-editor/ScreenEditor/Thumbnail/ScreenThumbnail.d.ts +15 -0
  21. package/dist/screen-editor/ScreenEditor/Thumbnail/miniatureRegistry.d.ts +3 -0
  22. package/dist/screen-editor/ScreenEditor/Thumbnail/readThumbnailDocument.d.ts +2 -0
  23. package/dist/screen-editor/ScreenEditor/Thumbnail/thumbnailGeometry.d.ts +11 -0
  24. package/dist/screen-editor/ScreenEditor/Thumbnail/useIsNearViewport.d.ts +2 -0
  25. package/dist/screen-editor/ScreenEditor/Viewport/windowSizeMemory.d.ts +12 -0
  26. package/dist/screen-editor/ScreenEditor/Viewport/windowSizing.d.ts +10 -0
  27. package/dist/screen-editor/ScreenEditor/index.d.ts +8 -0
  28. package/dist/screen-editor/index.js +2073 -1739
  29. package/dist/screen-editor/screen-editor.css +1 -1
  30. package/package.json +3 -3
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Guid as de } from "@cratis/fundamentals";
2
2
  import { Fragment as Ae, createContext as Ne, forwardRef as ui, memo as tr, startTransition as mi, useCallback as q, useContext as Se, useEffect as re, useId as Gt, useImperativeHandle as tt, useLayoutEffect as Ut, useMemo as oe, useRef as A, useState as F } from "react";
3
- import { Fragment as ee, jsx as a, jsxs as k } from "react/jsx-runtime";
3
+ import { Fragment as ee, jsx as a, jsxs as x } from "react/jsx-runtime";
4
4
  import { createPortal as He } from "react-dom";
5
5
  import { Canvas as gi, CanvasItem as nr, Note as vi, canvasGesture as ht } from "@cratis/components/Canvas";
6
6
  import { Toolbar as hi, ToolbarButton as pi, ToolbarSlot as fi } from "@cratis/components/Toolbar";
@@ -633,8 +633,8 @@ var jt = ({ anchorRef: e, open: t, side: n = "below", align: r = "left", gap: i
633
633
  d(void 0);
634
634
  return;
635
635
  }
636
- const c = e.current?.getBoundingClientRect();
637
- c && d(oo(c, n, r, i));
636
+ const u = e.current?.getBoundingClientRect();
637
+ u && d(oo(u, n, r, i));
638
638
  }, [
639
639
  t,
640
640
  n,
@@ -659,11 +659,11 @@ var jt = ({ anchorRef: e, open: t, side: n = "below", align: r = "left", gap: i
659
659
  right: "right"
660
660
  }, me = ({ content: e, position: t = "top", children: n }) => {
661
661
  const r = A(null), [i, o] = F(!1), [s, d] = F(!1);
662
- return /* @__PURE__ */ k("span", {
662
+ return /* @__PURE__ */ x("span", {
663
663
  ref: r,
664
664
  className: "grid-tooltip-root",
665
- onPointerEnter: (u) => {
666
- u.pointerType === "mouse" && o(!0);
665
+ onPointerEnter: (c) => {
666
+ c.pointerType === "mouse" && o(!0);
667
667
  },
668
668
  onPointerLeave: () => {
669
669
  o(!1), d(!1);
@@ -772,16 +772,16 @@ function mo(e, t, n, r, i) {
772
772
  onPointerMove: (s) => {
773
773
  const d = o.current;
774
774
  if (!d) return;
775
- const c = n(), l = (s.clientX - d.lastX) / c, u = (s.clientY - d.lastY) / c;
775
+ const u = n(), l = (s.clientX - d.lastX) / u, c = (s.clientY - d.lastY) / u;
776
776
  o.current = {
777
777
  lastX: s.clientX,
778
778
  lastY: s.clientY,
779
779
  position: {
780
780
  x: d.position.x + l,
781
- y: d.position.y + u
781
+ y: d.position.y + c
782
782
  },
783
783
  moved: !0
784
- }, r?.(e, l, u);
784
+ }, r?.(e, l, c);
785
785
  },
786
786
  onPointerUp: () => {
787
787
  const s = o.current;
@@ -793,16 +793,16 @@ var go = ({ onCollectionMoved: e, ...t }) => e ? /* @__PURE__ */ a(vo, {
793
793
  ...t,
794
794
  onCollectionMoved: e
795
795
  }) : void 0, vo = ({ collectionId: e, position: t, getZoom: n, topOffset: r = 0, onCollectionMoving: i, onCollectionMoved: o }) => {
796
- const [s, d] = F(!1), c = mo(e, t, n, i, o);
796
+ const [s, d] = F(!1), u = mo(e, t, n, i, o);
797
797
  return /* @__PURE__ */ a("div", {
798
798
  className: `collection-drag-handle ${s ? "collection-drag-handle--dragging" : ""}`,
799
799
  style: { top: `${r}px` },
800
800
  onPointerDown: (l) => {
801
- d(!0), c.onPointerDown(l);
801
+ d(!0), u.onPointerDown(l);
802
802
  },
803
- onPointerMove: c.onPointerMove,
803
+ onPointerMove: u.onPointerMove,
804
804
  onPointerUp: () => {
805
- d(!1), c.onPointerUp();
805
+ d(!1), u.onPointerUp();
806
806
  },
807
807
  children: /* @__PURE__ */ a("i", { className: "pi pi-arrows-alt" })
808
808
  });
@@ -822,9 +822,9 @@ var Cn = (e, t, n, r) => {
822
822
  return i !== void 0 && n - i < r;
823
823
  };
824
824
  function fo(e, t, n, r = ho) {
825
- const i = gr(t), o = new Map(t.map((u) => [u.id.toString(), u])), s = new Map(e.collections.map((u) => [u.id.toString(), u])), d = e.additions.filter((u) => !o.has(u.id.toString()));
825
+ const i = gr(t), o = new Map(t.map((c) => [c.id.toString(), c])), s = new Map(e.collections.map((c) => [c.id.toString(), c])), d = e.additions.filter((c) => !o.has(c.id.toString()));
826
826
  if (i !== e.contentSignature) {
827
- const u = t.map((f) => {
827
+ const c = t.map((f) => {
828
828
  const y = s.get(f.id.toString());
829
829
  return y && Cn(e, f.id, n, r) ? {
830
830
  ...f,
@@ -836,14 +836,14 @@ function fo(e, t, n, r = ho) {
836
836
  snapshot: t,
837
837
  contentSignature: i,
838
838
  additions: d,
839
- collections: [...u, ...d]
839
+ collections: [...c, ...d]
840
840
  };
841
841
  }
842
- let c = !1;
843
- const l = e.collections.map((u) => {
844
- const f = o.get(u.id.toString());
845
- return !f || Cn(e, u.id, n, r) || (u.position?.x ?? 0) === (f.position?.x ?? 0) && (u.position?.y ?? 0) === (f.position?.y ?? 0) ? u : (c = !0, {
846
- ...u,
842
+ let u = !1;
843
+ const l = e.collections.map((c) => {
844
+ const f = o.get(c.id.toString());
845
+ return !f || Cn(e, c.id, n, r) || (c.position?.x ?? 0) === (f.position?.x ?? 0) && (c.position?.y ?? 0) === (f.position?.y ?? 0) ? c : (u = !0, {
846
+ ...c,
847
847
  position: f.position
848
848
  });
849
849
  });
@@ -851,7 +851,7 @@ function fo(e, t, n, r = ho) {
851
851
  ...e,
852
852
  snapshot: t,
853
853
  additions: d,
854
- collections: c ? l : e.collections
854
+ collections: u ? l : e.collections
855
855
  };
856
856
  }
857
857
  function xn(e, t) {
@@ -917,15 +917,15 @@ function So(e) {
917
917
  return n ? r : e;
918
918
  }
919
919
  function Co({ initialCollections: e, onAddCollection: t, onCollectionMoved: n, onCollectionsChange: r, onPersistenceError: i }) {
920
- const { readOnly: o } = K(), [s, d] = F(() => po(e)), c = A(s), { collections: l, pendingMoveIds: u } = s, f = A(!1), y = A(!0), p = q((m) => {
921
- const g = m(c.current);
922
- c.current = g, d(g);
920
+ const { readOnly: o } = K(), [s, d] = F(() => po(e)), u = A(s), { collections: l, pendingMoveIds: c } = s, f = A(!1), y = A(!0), h = q((m) => {
921
+ const g = m(u.current);
922
+ u.current = g, d(g);
923
923
  }, []);
924
924
  return re(() => {
925
- e !== c.current.snapshot && p((m) => fo(m, e, Date.now(), o ? 1 / 0 : void 0));
925
+ e !== u.current.snapshot && h((m) => fo(m, e, Date.now(), o ? 1 / 0 : void 0));
926
926
  }, [
927
927
  e,
928
- p,
928
+ h,
929
929
  o
930
930
  ]), re(() => {
931
931
  if (y.current) {
@@ -935,22 +935,22 @@ function Co({ initialCollections: e, onAddCollection: t, onCollectionMoved: n, o
935
935
  r?.(l);
936
936
  }, [l, r]), {
937
937
  collections: l,
938
- pendingMoveIds: u,
938
+ pendingMoveIds: c,
939
939
  setCollections: q((m) => {
940
- p((g) => ({
940
+ h((g) => ({
941
941
  ...g,
942
942
  collections: typeof m == "function" ? m(g.collections) : m
943
943
  }));
944
- }, [p]),
944
+ }, [h]),
945
945
  addCollection: q(async (m, g) => {
946
946
  if (!(o || !t || f.current)) {
947
947
  f.current = !0;
948
948
  try {
949
- const v = await t(m, g, c.current.collections);
950
- v && p((h) => h.collections.some((w) => w.id.equals(v.id)) ? h : {
951
- ...h,
952
- additions: [...h.additions, v],
953
- collections: [...h.collections, v]
949
+ const v = await t(m, g, u.current.collections);
950
+ v && h((p) => p.collections.some((w) => w.id.equals(v.id)) ? p : {
951
+ ...p,
952
+ additions: [...p.additions, v],
953
+ collections: [...p.collections, v]
954
954
  });
955
955
  } catch (v) {
956
956
  if (i) i(v);
@@ -963,32 +963,32 @@ function Co({ initialCollections: e, onAddCollection: t, onCollectionMoved: n, o
963
963
  o,
964
964
  t,
965
965
  i,
966
- p
966
+ h
967
967
  ]),
968
968
  moveCollection: q((m, g, v) => {
969
- !o && !n || c.current.pendingMoveIds.has(m.toString()) || p((h) => wo(h, m, g, v, Date.now()));
969
+ !o && !n || u.current.pendingMoveIds.has(m.toString()) || h((p) => wo(p, m, g, v, Date.now()));
970
970
  }, [
971
971
  o,
972
972
  n,
973
- p
973
+ h
974
974
  ]),
975
975
  collectionMoved: q(async (m, g) => {
976
- if (!(o || !n || c.current.pendingMoveIds.has(m.toString()))) {
977
- p((v) => bo(v, m));
976
+ if (!(o || !n || u.current.pendingMoveIds.has(m.toString()))) {
977
+ h((v) => bo(v, m));
978
978
  try {
979
- await n(m, g) || p((v) => xn(v, m));
979
+ await n(m, g) || h((v) => xn(v, m));
980
980
  } catch (v) {
981
- if (p((h) => xn(h, m)), i) i(v);
981
+ if (h((p) => xn(p, m)), i) i(v);
982
982
  else throw v;
983
983
  } finally {
984
- p((v) => yo(v, m));
984
+ h((v) => yo(v, m));
985
985
  }
986
986
  }
987
987
  }, [
988
988
  o,
989
989
  n,
990
990
  i,
991
- p
991
+ h
992
992
  ]),
993
993
  canMove: o || !!n,
994
994
  canAdd: !o && !!t
@@ -1153,7 +1153,7 @@ function Vo() {
1153
1153
  kn = e;
1154
1154
  const i = r ? Math.min(Ee, Wo) : Ee;
1155
1155
  let o = 0;
1156
- for (const [s, d] of zo((c) => !r || c.verdict))
1156
+ for (const [s, d] of zo((u) => !r || u.verdict))
1157
1157
  if (We.delete(s), r ? mi(() => s(d.verdict)) : s(d.verdict), ++o >= i) break;
1158
1158
  Nt = o > 0;
1159
1159
  }
@@ -1190,10 +1190,10 @@ function Zt(e, t = "250% 250%", n = "light") {
1190
1190
  return;
1191
1191
  }
1192
1192
  const s = new IntersectionObserver((d) => {
1193
- const c = d[d.length - 1];
1194
- if (!c) return;
1195
- const l = c.boundingClientRect, u = Math.hypot(l.left + l.width / 2 - window.innerWidth / 2, l.top + l.height / 2 - window.innerHeight / 2);
1196
- In.request(i, c.isIntersecting, u, n);
1193
+ const u = d[d.length - 1];
1194
+ if (!u) return;
1195
+ const l = u.boundingClientRect, c = Math.hypot(l.left + l.width / 2 - window.innerWidth / 2, l.top + l.height / 2 - window.innerHeight / 2);
1196
+ In.request(i, u.isIntersecting, c, n);
1197
1197
  }, { rootMargin: t });
1198
1198
  return s.observe(o), () => {
1199
1199
  s.disconnect(), In.cancel(i);
@@ -1209,7 +1209,7 @@ function Go({ collection: e, estimatedSize: t, measuredSize: n, onSize: r, child
1209
1209
  return /* @__PURE__ */ a(nr, {
1210
1210
  x: e.position?.x ?? 0,
1211
1211
  y: e.position?.y ?? 0,
1212
- onSize: r ? (c, l) => r(e.id, c, l) : void 0,
1212
+ onSize: r ? (u, l) => r(e.id, u, l) : void 0,
1213
1213
  children: /* @__PURE__ */ a("div", {
1214
1214
  ref: o,
1215
1215
  children: s ? i : /* @__PURE__ */ a("div", {
@@ -1219,17 +1219,17 @@ function Go({ collection: e, estimatedSize: t, measuredSize: n, onSize: r, child
1219
1219
  height: d.height
1220
1220
  },
1221
1221
  "aria-hidden": !0,
1222
- children: e.modules.map((c, l) => /* @__PURE__ */ k("div", {
1222
+ children: e.modules.map((u, l) => /* @__PURE__ */ x("div", {
1223
1223
  className: "event-model-collection-placeholder-module",
1224
1224
  style: { width: t.moduleWidths[l] },
1225
1225
  children: [/* @__PURE__ */ a("div", {
1226
1226
  className: "event-modeling-grid-pill event-modeling-grid-pill--module event-model-collection-placeholder-pill",
1227
- children: c.name
1227
+ children: u.name
1228
1228
  }), /* @__PURE__ */ a("div", {
1229
1229
  className: "event-model-collection-placeholder-body",
1230
1230
  style: { height: Math.max(0, d.height - Z.headerHeight - 4) }
1231
1231
  })]
1232
- }, c.id.toString()))
1232
+ }, u.id.toString()))
1233
1233
  })
1234
1234
  })
1235
1235
  });
@@ -1239,8 +1239,8 @@ var Uo = tr(Go), pt = /* @__PURE__ */ (function(e) {
1239
1239
  })({});
1240
1240
  function Kt(e, t, n) {
1241
1241
  if (n === pt.Vertical) {
1242
- const s = t.y - e.y, d = e.y + s * 0.5, c = t.y - s * 0.5;
1243
- return `M ${e.x} ${e.y} C ${e.x} ${d}, ${t.x} ${c}, ${t.x} ${t.y}`;
1242
+ const s = t.y - e.y, d = e.y + s * 0.5, u = t.y - s * 0.5;
1243
+ return `M ${e.x} ${e.y} C ${e.x} ${d}, ${t.x} ${u}, ${t.x} ${t.y}`;
1244
1244
  }
1245
1245
  const r = t.x - e.x, i = e.x + r * 0.5, o = t.x - r * 0.5;
1246
1246
  return `M ${e.x} ${e.y} C ${i} ${e.y}, ${o} ${t.y}, ${t.x} ${t.y}`;
@@ -1325,12 +1325,12 @@ function Ko(e, t, n) {
1325
1325
  width: 0,
1326
1326
  height: 0
1327
1327
  };
1328
- const o = Math.min(...r) - n, s = Math.min(...i) - n, d = Math.max(...r) + n, c = Math.max(...i) + n;
1328
+ const o = Math.min(...r) - n, s = Math.min(...i) - n, d = Math.max(...r) + n, u = Math.max(...i) + n;
1329
1329
  return {
1330
1330
  x: o,
1331
1331
  y: s,
1332
1332
  width: d - o,
1333
- height: c - s
1333
+ height: u - s
1334
1334
  };
1335
1335
  }
1336
1336
  var oc = 12, ac = 600, Qo = "Inter, Avenir, Helvetica, Arial, sans-serif", sc = 230, st = null;
@@ -1399,7 +1399,7 @@ var lc = 56, ta = ({ drag: e }) => e ? He(/* @__PURE__ */ a("div", {
1399
1399
  title: r,
1400
1400
  "aria-label": r,
1401
1401
  "aria-expanded": !e,
1402
- children: e ? /* @__PURE__ */ k("svg", {
1402
+ children: e ? /* @__PURE__ */ x("svg", {
1403
1403
  width: "12",
1404
1404
  height: "12",
1405
1405
  viewBox: "0 0 12 12",
@@ -1439,7 +1439,7 @@ var lc = 56, ta = ({ drag: e }) => e ? He(/* @__PURE__ */ a("div", {
1439
1439
  strokeLinecap: "round"
1440
1440
  })
1441
1441
  ]
1442
- }) : /* @__PURE__ */ k("svg", {
1442
+ }) : /* @__PURE__ */ x("svg", {
1443
1443
  width: "12",
1444
1444
  height: "12",
1445
1445
  viewBox: "0 0 12 12",
@@ -1499,10 +1499,10 @@ var lc = 56, ta = ({ drag: e }) => e ? He(/* @__PURE__ */ a("div", {
1499
1499
  })
1500
1500
  });
1501
1501
  }, Ct = ({ value: e, onChange: t, placeholder: n = "Name…", style: r, validate: i, readOnly: o = !1 }) => {
1502
- const s = ge(), [d, c] = F(!1), [l, u] = F(e), [f, y] = F(void 0), p = () => {
1502
+ const s = ge(), [d, u] = F(!1), [l, c] = F(e), [f, y] = F(void 0), h = () => {
1503
1503
  const m = l.trim();
1504
1504
  if (!m) {
1505
- u(e), c(!1), y(void 0);
1505
+ c(e), u(!1), y(void 0);
1506
1506
  return;
1507
1507
  }
1508
1508
  if (i) {
@@ -1512,21 +1512,21 @@ var lc = 56, ta = ({ drag: e }) => e ? He(/* @__PURE__ */ a("div", {
1512
1512
  return;
1513
1513
  }
1514
1514
  }
1515
- y(void 0), c(!1), t(m);
1515
+ y(void 0), u(!1), t(m);
1516
1516
  };
1517
1517
  return d && !o ? /* @__PURE__ */ a("input", {
1518
1518
  autoFocus: !0,
1519
1519
  value: l,
1520
1520
  onChange: (m) => {
1521
- u(m.target.value), y(void 0);
1521
+ c(m.target.value), y(void 0);
1522
1522
  },
1523
- onBlur: p,
1523
+ onBlur: h,
1524
1524
  onKeyDown: (m) => {
1525
1525
  if (m.key === "Enter") {
1526
1526
  m.target.blur();
1527
1527
  return;
1528
1528
  }
1529
- m.key === "Escape" && (u(e), c(!1), y(void 0));
1529
+ m.key === "Escape" && (c(e), u(!1), y(void 0));
1530
1530
  },
1531
1531
  className: `event-modeling-grid-editable-label-input${f ? " event-modeling-grid-editable-label-input--error" : ""}`,
1532
1532
  title: f,
@@ -1534,7 +1534,7 @@ var lc = 56, ta = ({ drag: e }) => e ? He(/* @__PURE__ */ a("div", {
1534
1534
  }) : /* @__PURE__ */ a("span", {
1535
1535
  title: o ? void 0 : s.editableLabel.doubleClickToRename,
1536
1536
  onDoubleClick: o ? void 0 : () => {
1537
- u(e), c(!0), y(void 0);
1537
+ c(e), u(!0), y(void 0);
1538
1538
  },
1539
1539
  className: "event-modeling-grid-editable-label",
1540
1540
  style: r,
@@ -1555,7 +1555,7 @@ var lc = 56, ta = ({ drag: e }) => e ? He(/* @__PURE__ */ a("div", {
1555
1555
  const i = ge().erroredEntity;
1556
1556
  return /* @__PURE__ */ a(me, {
1557
1557
  content: i.couldNotBeRendered(i[e], n),
1558
- children: /* @__PURE__ */ k("div", {
1558
+ children: /* @__PURE__ */ x("div", {
1559
1559
  className: `errored-entity errored-entity--${e}`,
1560
1560
  role: "alert",
1561
1561
  "data-errored-entity": e,
@@ -1581,18 +1581,18 @@ var lc = 56, ta = ({ drag: e }) => e ? He(/* @__PURE__ */ a("div", {
1581
1581
  ]
1582
1582
  })
1583
1583
  });
1584
- }, xr = ({ variant: e, collapsed: t, onToggle: n, label: r, onRenameLabel: i, labelReadOnly: o = !1, validateLabel: s, labelStyle: d, background: c, border: l, height: u, children: f, leadingContent: y, draggable: p = !1, onPointerDown: m, onPointerMove: g, onPointerUp: v, error: h }) => /* @__PURE__ */ k("div", {
1585
- className: `event-modeling-grid-pill event-modeling-grid-pill--${e}${t ? " event-modeling-grid-pill--collapsed" : ""}${p ? " event-modeling-grid-pill--draggable" : ""}${h ? " event-modeling-grid-pill--error" : ""}`,
1584
+ }, xr = ({ variant: e, collapsed: t, onToggle: n, label: r, onRenameLabel: i, labelReadOnly: o = !1, validateLabel: s, labelStyle: d, background: u, border: l, height: c, children: f, leadingContent: y, draggable: h = !1, onPointerDown: m, onPointerMove: g, onPointerUp: v, error: p }) => /* @__PURE__ */ x("div", {
1585
+ className: `event-modeling-grid-pill event-modeling-grid-pill--${e}${t ? " event-modeling-grid-pill--collapsed" : ""}${h ? " event-modeling-grid-pill--draggable" : ""}${p ? " event-modeling-grid-pill--error" : ""}`,
1586
1586
  style: {
1587
- background: c,
1588
- border: h ? "2px solid #ef4444" : l,
1589
- height: u
1587
+ background: u,
1588
+ border: p ? "2px solid #ef4444" : l,
1589
+ height: c
1590
1590
  },
1591
1591
  onPointerDown: m,
1592
1592
  onPointerMove: g,
1593
1593
  onPointerUp: v,
1594
1594
  children: [
1595
- /* @__PURE__ */ k("div", {
1595
+ /* @__PURE__ */ x("div", {
1596
1596
  className: "event-modeling-grid-pill-left",
1597
1597
  children: [n && /* @__PURE__ */ a(Qt, {
1598
1598
  collapsed: t,
@@ -1606,9 +1606,9 @@ var lc = 56, ta = ({ drag: e }) => e ? He(/* @__PURE__ */ a("div", {
1606
1606
  style: d,
1607
1607
  readOnly: o
1608
1608
  }),
1609
- /* @__PURE__ */ k("div", {
1609
+ /* @__PURE__ */ x("div", {
1610
1610
  className: "event-modeling-grid-pill-right",
1611
- children: [h && /* @__PURE__ */ a(Cr, { error: h }), f]
1611
+ children: [p && /* @__PURE__ */ a(Cr, { error: p }), f]
1612
1612
  })
1613
1613
  ]
1614
1614
  }), ze = (e, t, n) => {
@@ -1616,8 +1616,8 @@ var lc = 56, ta = ({ drag: e }) => e ? He(/* @__PURE__ */ a("div", {
1616
1616
  r.current = t, re(() => {
1617
1617
  if (!n) return;
1618
1618
  const i = (o) => {
1619
- const s = e.map((l) => l.current).filter((l) => !!l), d = o.target, c = d instanceof Node && s.some((l) => l?.contains(d));
1620
- s.length > 0 && !c && r.current();
1619
+ const s = e.map((l) => l.current).filter((l) => !!l), d = o.target, u = d instanceof Node && s.some((l) => l?.contains(d));
1620
+ s.length > 0 && !u && r.current();
1621
1621
  };
1622
1622
  return document.addEventListener("pointerdown", i, !0), () => document.removeEventListener("pointerdown", i, !0);
1623
1623
  }, [e, n]);
@@ -1651,17 +1651,17 @@ var lc = 56, ta = ({ drag: e }) => e ? He(/* @__PURE__ */ a("div", {
1651
1651
  border: "1px solid #d1d5db",
1652
1652
  flexShrink: 0,
1653
1653
  display: "inline-block"
1654
- }), On = ({ rowType: e, height: t, name: n, description: r, actorId: i, onRenamed: o, validateName: s, onActorAdded: d, onDragStart: c, dragging: l = !1, badge: u, personaAvatar: f, children: y }) => {
1655
- const { readOnly: p, messages: m } = K(), [g, v] = F(!1), [h, w] = F(!1), b = A(void 0), S = A(null), C = A(null), O = A(null), N = oe(() => [C], []), L = oe(() => [O], []);
1656
- ze(N, () => v(!1), g), ze(L, () => w(!1), h);
1657
- const j = n ?? ra(e, m), H = ia(e), x = H && !p ? o : void 0, T = H && !p ? d : void 0, W = i && !p ? c : void 0, X = p ? [] : u?.actions ?? [], D = p ? void 0 : u?.onActivate, z = X.length > 0 || !!D, I = f ?? u?.avatar, M = H && (!!I || !!u && !p), E = () => {
1654
+ }), On = ({ rowType: e, height: t, name: n, description: r, actorId: i, onRenamed: o, validateName: s, onActorAdded: d, onDragStart: u, dragging: l = !1, badge: c, personaAvatar: f, children: y }) => {
1655
+ const { readOnly: h, messages: m } = K(), [g, v] = F(!1), [p, w] = F(!1), b = A(void 0), S = A(null), C = A(null), L = A(null), N = oe(() => [C], []), O = oe(() => [L], []);
1656
+ ze(N, () => v(!1), g), ze(O, () => w(!1), p);
1657
+ const j = n ?? ra(e, m), H = ia(e), M = H && !h ? o : void 0, T = H && !h ? d : void 0, W = i && !h ? u : void 0, X = h ? [] : c?.actions ?? [], D = h ? void 0 : c?.onActivate, z = X.length > 0 || !!D, I = f ?? c?.avatar, k = H && (!!I || !!c && !h), E = () => {
1658
1658
  if (X.length > 0) {
1659
1659
  w((P) => !P);
1660
1660
  return;
1661
1661
  }
1662
1662
  D?.();
1663
1663
  };
1664
- return /* @__PURE__ */ k("div", {
1664
+ return /* @__PURE__ */ x("div", {
1665
1665
  style: {
1666
1666
  width: 56,
1667
1667
  height: t,
@@ -1673,7 +1673,7 @@ var lc = 56, ta = ({ drag: e }) => e ? He(/* @__PURE__ */ a("div", {
1673
1673
  "data-role-row": i ? "true" : void 0,
1674
1674
  "data-role-type": i ? e : void 0,
1675
1675
  "data-role-id": i,
1676
- children: [/* @__PURE__ */ k("div", {
1676
+ children: [/* @__PURE__ */ x("div", {
1677
1677
  className: "event-modeling-grid-row-label-pill",
1678
1678
  ref: S,
1679
1679
  style: W ? { cursor: "grab" } : void 0,
@@ -1694,25 +1694,25 @@ var lc = 56, ta = ({ drag: e }) => e ? He(/* @__PURE__ */ a("div", {
1694
1694
  b.current = void 0;
1695
1695
  } : void 0,
1696
1696
  children: [
1697
- M && /* @__PURE__ */ k("div", {
1697
+ k && /* @__PURE__ */ x("div", {
1698
1698
  className: "event-modeling-grid-row-label-info",
1699
- ref: O,
1699
+ ref: L,
1700
1700
  children: [/* @__PURE__ */ a("button", {
1701
1701
  className: "event-modeling-grid-row-label-info-btn",
1702
1702
  onClick: (P) => {
1703
1703
  P.stopPropagation(), E();
1704
1704
  },
1705
- title: u?.title ?? j,
1706
- "aria-label": u?.title ?? j,
1705
+ title: c?.title ?? j,
1706
+ "aria-label": c?.title ?? j,
1707
1707
  disabled: !z,
1708
1708
  style: z ? void 0 : {
1709
- opacity: p ? 1 : 0.4,
1709
+ opacity: h ? 1 : 0.4,
1710
1710
  cursor: "default"
1711
1711
  },
1712
1712
  children: I ?? /* @__PURE__ */ a("i", { className: "pi pi-id-card" })
1713
- }), h && X.length > 0 && /* @__PURE__ */ a("div", {
1713
+ }), p && X.length > 0 && /* @__PURE__ */ a("div", {
1714
1714
  className: "event-modeling-grid-row-role-menu",
1715
- children: X.map((P) => /* @__PURE__ */ k("button", {
1715
+ children: X.map((P) => /* @__PURE__ */ x("button", {
1716
1716
  className: `event-modeling-grid-row-role-menu-option${P.danger ? " event-modeling-grid-row-role-menu-option--danger" : ""}`,
1717
1717
  onClick: (V) => {
1718
1718
  V.stopPropagation(), w(!1), i && S.current && P.onActivate(i, S.current.getBoundingClientRect());
@@ -1723,9 +1723,9 @@ var lc = 56, ta = ({ drag: e }) => e ? He(/* @__PURE__ */ a("div", {
1723
1723
  }),
1724
1724
  /* @__PURE__ */ a("div", {
1725
1725
  className: "event-modeling-grid-row-label-title",
1726
- children: x ? /* @__PURE__ */ a(Ct, {
1726
+ children: M ? /* @__PURE__ */ a(Ct, {
1727
1727
  value: j,
1728
- onChange: x,
1728
+ onChange: M,
1729
1729
  validate: s,
1730
1730
  style: oa
1731
1731
  }) : r?.trim() ? /* @__PURE__ */ a(me, {
@@ -1740,7 +1740,7 @@ var lc = 56, ta = ({ drag: e }) => e ? He(/* @__PURE__ */ a("div", {
1740
1740
  children: j
1741
1741
  })
1742
1742
  }),
1743
- T && /* @__PURE__ */ k("div", {
1743
+ T && /* @__PURE__ */ x("div", {
1744
1744
  className: "event-modeling-grid-row-label-add-role",
1745
1745
  ref: C,
1746
1746
  children: [/* @__PURE__ */ a("button", {
@@ -1753,7 +1753,7 @@ var lc = 56, ta = ({ drag: e }) => e ? He(/* @__PURE__ */ a("div", {
1753
1753
  children: "+"
1754
1754
  }), g && /* @__PURE__ */ a("div", {
1755
1755
  className: "event-modeling-grid-row-role-menu",
1756
- children: na(m).map(({ actorType: P, label: V, color: te }) => /* @__PURE__ */ k("button", {
1756
+ children: na(m).map(({ actorType: P, label: V, color: te }) => /* @__PURE__ */ x("button", {
1757
1757
  className: "event-modeling-grid-row-role-menu-option",
1758
1758
  onClick: () => {
1759
1759
  T(P), v(!1);
@@ -1765,7 +1765,7 @@ var lc = 56, ta = ({ drag: e }) => e ? He(/* @__PURE__ */ a("div", {
1765
1765
  ]
1766
1766
  }), y]
1767
1767
  });
1768
- }, sa = ({ topOffset: e, collectionId: t, children: n }) => /* @__PURE__ */ k("div", {
1768
+ }, sa = ({ topOffset: e, collectionId: t, children: n }) => /* @__PURE__ */ x("div", {
1769
1769
  className: "event-modeling-grid-row-labels",
1770
1770
  "data-actor-collection-id": t,
1771
1771
  style: { width: 56 },
@@ -1803,20 +1803,20 @@ function ua(e, t, n) {
1803
1803
  s.current = i;
1804
1804
  const d = A(t);
1805
1805
  d.current = t;
1806
- const c = A(e);
1807
- c.current = e;
1806
+ const u = A(e);
1807
+ u.current = e;
1808
1808
  const l = A(n);
1809
1809
  l.current = n;
1810
- const u = q((y, p, m) => {
1811
- const g = d.current.find((h) => h.id === y);
1810
+ const c = q((y, h, m) => {
1811
+ const g = d.current.find((p) => p.id === y);
1812
1812
  if (!g) return;
1813
- const v = d.current.filter((h) => h.actorType === g.actorType).findIndex((h) => h.id === y);
1813
+ const v = d.current.filter((p) => p.actorType === g.actorType).findIndex((p) => p.id === y);
1814
1814
  o({
1815
1815
  actorId: y,
1816
1816
  rowType: Lo(g.actorType),
1817
1817
  sourceIndex: v,
1818
1818
  ghostLabel: g.name,
1819
- currentX: p,
1819
+ currentX: h,
1820
1820
  currentY: m,
1821
1821
  dropIndex: v
1822
1822
  });
@@ -1828,64 +1828,64 @@ function ua(e, t, n) {
1828
1828
  ...g,
1829
1829
  currentX: m.clientX,
1830
1830
  currentY: m.clientY,
1831
- dropIndex: la(c.current, g.rowType, m.clientY)
1831
+ dropIndex: la(u.current, g.rowType, m.clientY)
1832
1832
  });
1833
- }, p = () => {
1833
+ }, h = () => {
1834
1834
  const m = s.current;
1835
1835
  if (o(void 0), !m) return;
1836
1836
  const g = ca(d.current, m.actorId, m.dropIndex);
1837
- g && l.current?.(c.current, g.actorType, g.orderedIds);
1837
+ g && l.current?.(u.current, g.actorType, g.orderedIds);
1838
1838
  };
1839
- return window.addEventListener("pointermove", y), window.addEventListener("pointerup", p), () => {
1840
- window.removeEventListener("pointermove", y), window.removeEventListener("pointerup", p);
1839
+ return window.addEventListener("pointermove", y), window.addEventListener("pointerup", h), () => {
1840
+ window.removeEventListener("pointermove", y), window.removeEventListener("pointerup", h);
1841
1841
  };
1842
1842
  }, [f]), {
1843
1843
  actorDrag: i,
1844
- handleActorDragStart: !r.readOnly && n !== void 0 ? u : void 0
1844
+ handleActorDragStart: !r.readOnly && n !== void 0 ? c : void 0
1845
1845
  };
1846
1846
  }
1847
- var ma = ({ collectionId: e, topOffset: t, contentRows: n, rowHeights: r, actors: i, onActorAdded: o, onActorRenamed: s, onRowRenamed: d, onActorsReordered: c, renderActorLabel: l, renderEmptyActorLabel: u }) => {
1848
- const [f, y] = F({}), [p, m] = F({}), { actorDrag: g, handleActorDragStart: v } = ua(e, i, c);
1849
- return /* @__PURE__ */ k(sa, {
1847
+ var ma = ({ collectionId: e, topOffset: t, contentRows: n, rowHeights: r, actors: i, onActorAdded: o, onActorRenamed: s, onRowRenamed: d, onActorsReordered: u, renderActorLabel: l, renderEmptyActorLabel: c }) => {
1848
+ const [f, y] = F({}), [h, m] = F({}), { actorDrag: g, handleActorDragStart: v } = ua(e, i, u);
1849
+ return /* @__PURE__ */ x(sa, {
1850
1850
  topOffset: t,
1851
1851
  collectionId: e.toString(),
1852
- children: [/* @__PURE__ */ a(ta, { drag: g }), n.flatMap((h) => {
1853
- const w = St(h), b = w === void 0 ? [] : i.filter((N) => N.actorType === w), S = {
1854
- rowType: h,
1855
- height: r[h],
1856
- name: f[h],
1852
+ children: [/* @__PURE__ */ a(ta, { drag: g }), n.flatMap((p) => {
1853
+ const w = St(p), b = w === void 0 ? [] : i.filter((N) => N.actorType === w), S = {
1854
+ rowType: p,
1855
+ height: r[p],
1856
+ name: f[p],
1857
1857
  onRenamed: d ? (N) => {
1858
- y((L) => ({
1859
- ...L,
1860
- [h]: N
1861
- })), d(h, N);
1858
+ y((O) => ({
1859
+ ...O,
1860
+ [p]: N
1861
+ })), d(p, N);
1862
1862
  } : void 0,
1863
- validateName: (N) => Object.entries(f).find(([L]) => L !== h)?.[1]?.toLowerCase() === N.toLowerCase() ? "Name already in use" : void 0,
1864
- onActorAdded: o ? (N) => o(h, N) : void 0
1865
- }, C = w === void 0 || b.length === 0 ? [/* @__PURE__ */ a(Ae, { children: w !== void 0 && u ? u(h, S) : /* @__PURE__ */ a(On, { ...S }) }, h)] : [], O = b.flatMap((N, L) => {
1866
- const j = g?.rowType === h, H = {
1867
- rowType: h,
1868
- height: r[h],
1869
- name: p[N.id] ?? N.name,
1863
+ validateName: (N) => Object.entries(f).find(([O]) => O !== p)?.[1]?.toLowerCase() === N.toLowerCase() ? "Name already in use" : void 0,
1864
+ onActorAdded: o ? (N) => o(p, N) : void 0
1865
+ }, C = w === void 0 || b.length === 0 ? [/* @__PURE__ */ a(Ae, { children: w !== void 0 && c ? c(p, S) : /* @__PURE__ */ a(On, { ...S }) }, p)] : [], L = b.flatMap((N, O) => {
1866
+ const j = g?.rowType === p, H = {
1867
+ rowType: p,
1868
+ height: r[p],
1869
+ name: h[N.id] ?? N.name,
1870
1870
  description: N.description,
1871
1871
  actorId: N.id,
1872
- onRenamed: s ? (x) => {
1872
+ onRenamed: s ? (M) => {
1873
1873
  m((T) => ({
1874
1874
  ...T,
1875
- [N.id]: x
1876
- })), s(N.id, x);
1875
+ [N.id]: M
1876
+ })), s(N.id, M);
1877
1877
  } : void 0,
1878
- onActorAdded: o ? (x) => o(h, x) : void 0,
1879
- onDragStart: v ? (x, T) => v(N.id, x, T) : void 0,
1878
+ onActorAdded: o ? (M) => o(p, M) : void 0,
1879
+ onDragStart: v ? (M, T) => v(N.id, M, T) : void 0,
1880
1880
  dragging: g?.actorId === N.id
1881
1881
  };
1882
1882
  return [
1883
- ...j && g.dropIndex === L ? [/* @__PURE__ */ a(Rn, {}, `drop-${h}-${L}`)] : [],
1883
+ ...j && g.dropIndex === O ? [/* @__PURE__ */ a(Rn, {}, `drop-${p}-${O}`)] : [],
1884
1884
  /* @__PURE__ */ a(Ae, { children: l ? l(N, H) : /* @__PURE__ */ a(On, { ...H }) }, N.id),
1885
- ...j && L === b.length - 1 && g.dropIndex === b.length ? [/* @__PURE__ */ a(Rn, {}, `drop-${h}-end`)] : []
1885
+ ...j && O === b.length - 1 && g.dropIndex === b.length ? [/* @__PURE__ */ a(Rn, {}, `drop-${p}-end`)] : []
1886
1886
  ];
1887
1887
  });
1888
- return [...C, ...O];
1888
+ return [...C, ...L];
1889
1889
  })]
1890
1890
  });
1891
1891
  }, ga = ({ moduleId: e, collectionId: t, marginLeft: n, dragging: r = !1, ref: i, children: o }) => /* @__PURE__ */ a("div", {
@@ -2042,7 +2042,7 @@ var Pn = ({ status: e }) => /* @__PURE__ */ a("svg", {
2042
2042
  strokeWidth: "1.5"
2043
2043
  });
2044
2044
  case ne.analysis:
2045
- return /* @__PURE__ */ k(ee, { children: [
2045
+ return /* @__PURE__ */ x(ee, { children: [
2046
2046
  /* @__PURE__ */ a("circle", {
2047
2047
  cx: "6",
2048
2048
  cy: "6",
@@ -2068,7 +2068,7 @@ var Pn = ({ status: e }) => /* @__PURE__ */ a("svg", {
2068
2068
  })
2069
2069
  ] });
2070
2070
  case ne.readyForImplementation:
2071
- return /* @__PURE__ */ k(ee, { children: [/* @__PURE__ */ a("circle", {
2071
+ return /* @__PURE__ */ x(ee, { children: [/* @__PURE__ */ a("circle", {
2072
2072
  cx: "6",
2073
2073
  cy: "6",
2074
2074
  r: "5",
@@ -2084,7 +2084,7 @@ var Pn = ({ status: e }) => /* @__PURE__ */ a("svg", {
2084
2084
  strokeLinecap: "round"
2085
2085
  })] });
2086
2086
  case ne.inProgress:
2087
- return /* @__PURE__ */ k(ee, { children: [/* @__PURE__ */ a("circle", {
2087
+ return /* @__PURE__ */ x(ee, { children: [/* @__PURE__ */ a("circle", {
2088
2088
  cx: "6",
2089
2089
  cy: "6",
2090
2090
  r: "5",
@@ -2098,7 +2098,7 @@ var Pn = ({ status: e }) => /* @__PURE__ */ a("svg", {
2098
2098
  fill: "none"
2099
2099
  })] });
2100
2100
  case ne.readyForReview:
2101
- return /* @__PURE__ */ k(ee, { children: [/* @__PURE__ */ a("circle", {
2101
+ return /* @__PURE__ */ x(ee, { children: [/* @__PURE__ */ a("circle", {
2102
2102
  cx: "6",
2103
2103
  cy: "6",
2104
2104
  r: "5",
@@ -2111,7 +2111,7 @@ var Pn = ({ status: e }) => /* @__PURE__ */ a("svg", {
2111
2111
  fill: "currentColor"
2112
2112
  })] });
2113
2113
  case ne.done:
2114
- return /* @__PURE__ */ k(ee, { children: [/* @__PURE__ */ a("circle", {
2114
+ return /* @__PURE__ */ x(ee, { children: [/* @__PURE__ */ a("circle", {
2115
2115
  cx: "6",
2116
2116
  cy: "6",
2117
2117
  r: "5",
@@ -2137,9 +2137,9 @@ var Pn = ({ status: e }) => /* @__PURE__ */ a("svg", {
2137
2137
  children: e
2138
2138
  });
2139
2139
  }, Pe = ({ trigger: e, items: t, align: n = "right", onClose: r }) => {
2140
- const i = Se(Er), o = Gt(), [s, d] = F(!1), [c, l] = F(), u = A(null), f = A(null), y = i ? i.openMenuId === o : s, p = A(y);
2140
+ const i = Se(Er), o = Gt(), [s, d] = F(!1), [u, l] = F(), c = A(null), f = A(null), y = i ? i.openMenuId === o : s, h = A(y);
2141
2141
  re(() => {
2142
- p.current && !y && (r?.(), l(void 0)), p.current = y;
2142
+ h.current && !y && (r?.(), l(void 0)), h.current = y;
2143
2143
  }, [y, r]);
2144
2144
  const m = (w) => {
2145
2145
  if (i) {
@@ -2147,18 +2147,18 @@ var Pn = ({ status: e }) => /* @__PURE__ */ a("svg", {
2147
2147
  return;
2148
2148
  }
2149
2149
  d(w);
2150
- }, g = () => m(!1), v = oe(() => [u, f], []);
2150
+ }, g = () => m(!1), v = oe(() => [c, f], []);
2151
2151
  ze(v, g, y);
2152
- const h = (w) => w.map((b) => {
2152
+ const p = (w) => w.map((b) => {
2153
2153
  if (b.isSeparator) return /* @__PURE__ */ a("div", { className: "event-modeling-menu-dropdown-separator" }, b.id.toString());
2154
2154
  if (b.isHeader) return /* @__PURE__ */ a("div", {
2155
2155
  className: "event-modeling-menu-dropdown-header",
2156
2156
  children: b.label
2157
2157
  }, b.id.toString());
2158
- const S = b.items && b.items.length > 0, C = c === b.id.toString();
2159
- return /* @__PURE__ */ k("div", {
2158
+ const S = b.items && b.items.length > 0, C = u === b.id.toString();
2159
+ return /* @__PURE__ */ x("div", {
2160
2160
  className: "event-modeling-menu-dropdown-item-wrapper",
2161
- children: [/* @__PURE__ */ k("button", {
2161
+ children: [/* @__PURE__ */ x("button", {
2162
2162
  className: `event-modeling-menu-dropdown-option ${S ? "event-modeling-menu-dropdown-option--has-submenu" : ""}`,
2163
2163
  disabled: b.disabled,
2164
2164
  title: b.tooltip,
@@ -2170,7 +2170,7 @@ var Pn = ({ status: e }) => /* @__PURE__ */ a("svg", {
2170
2170
  className: "event-modeling-menu-dropdown-option-icon",
2171
2171
  children: b.icon
2172
2172
  }),
2173
- /* @__PURE__ */ k("span", {
2173
+ /* @__PURE__ */ x("span", {
2174
2174
  className: "event-modeling-menu-dropdown-option-text",
2175
2175
  children: [b.label && /* @__PURE__ */ a("span", {
2176
2176
  className: "event-modeling-menu-dropdown-option-label",
@@ -2191,12 +2191,12 @@ var Pn = ({ status: e }) => /* @__PURE__ */ a("svg", {
2191
2191
  ]
2192
2192
  }), S && C && /* @__PURE__ */ a("div", {
2193
2193
  className: `event-modeling-menu-dropdown-submenu ${n === "right" ? "event-modeling-menu-dropdown-submenu--left" : ""}`,
2194
- children: h(b.items)
2194
+ children: p(b.items)
2195
2195
  })]
2196
2196
  }, b.id.toString());
2197
2197
  });
2198
- return /* @__PURE__ */ k("div", {
2199
- ref: u,
2198
+ return /* @__PURE__ */ x("div", {
2199
+ ref: c,
2200
2200
  className: "event-modeling-menu-dropdown",
2201
2201
  children: [/* @__PURE__ */ a("div", {
2202
2202
  className: "event-modeling-menu-dropdown-trigger",
@@ -2206,14 +2206,14 @@ var Pn = ({ status: e }) => /* @__PURE__ */ a("svg", {
2206
2206
  },
2207
2207
  children: e
2208
2208
  }), /* @__PURE__ */ a(jt, {
2209
- anchorRef: u,
2209
+ anchorRef: c,
2210
2210
  open: y,
2211
2211
  side: "below",
2212
2212
  align: n,
2213
2213
  children: /* @__PURE__ */ a("div", {
2214
2214
  ref: f,
2215
2215
  className: "event-modeling-menu-dropdown-menu",
2216
- children: h(t)
2216
+ children: p(t)
2217
2217
  })
2218
2218
  })]
2219
2219
  });
@@ -2264,14 +2264,14 @@ var Pn = ({ status: e }) => /* @__PURE__ */ a("svg", {
2264
2264
  }, $t = (e) => ne[e], tn = ({ status: e, onStatusChanged: t, selectable: n = Dn, unselectableReason: r }) => {
2265
2265
  const { readOnly: i, messages: o } = K(), [s, d] = F(e);
2266
2266
  re(() => d(e), [e]);
2267
- const c = `${o.statuses.titlePrefix} ${It(s, o)}`, l = `event-modeling-slice-status-icon event-modeling-slice-status-icon--${$t(s)}`;
2267
+ const u = `${o.statuses.titlePrefix} ${It(s, o)}`, l = `event-modeling-slice-status-icon event-modeling-slice-status-icon--${$t(s)}`;
2268
2268
  if (i || !t) return /* @__PURE__ */ a("span", {
2269
2269
  className: `${l} event-modeling-slice-status-icon--readonly`,
2270
- title: c,
2270
+ title: u,
2271
2271
  "aria-label": It(s, o),
2272
2272
  children: /* @__PURE__ */ a(Pn, { status: s })
2273
2273
  });
2274
- const u = (y) => xa(s, y, t, d), f = Dn.map((y) => ({
2274
+ const c = (y) => xa(s, y, t, d), f = Dn.map((y) => ({
2275
2275
  id: $t(y),
2276
2276
  label: It(y, o),
2277
2277
  icon: /* @__PURE__ */ a(ka, {
@@ -2280,12 +2280,12 @@ var Pn = ({ status: e }) => /* @__PURE__ */ a("svg", {
2280
2280
  }),
2281
2281
  disabled: !n.includes(y),
2282
2282
  tooltip: n.includes(y) ? void 0 : r,
2283
- onClick: () => u(y)
2283
+ onClick: () => c(y)
2284
2284
  }));
2285
2285
  return /* @__PURE__ */ a(Pe, {
2286
2286
  trigger: /* @__PURE__ */ a("button", {
2287
2287
  className: l,
2288
- title: c,
2288
+ title: u,
2289
2289
  "aria-label": o.statuses.change,
2290
2290
  children: /* @__PURE__ */ a(Pn, { status: s })
2291
2291
  }),
@@ -2294,7 +2294,7 @@ var Pn = ({ status: e }) => /* @__PURE__ */ a("svg", {
2294
2294
  });
2295
2295
  }, ka = ({ status: e, checked: t }) => {
2296
2296
  const n = Ma(e);
2297
- return /* @__PURE__ */ k("svg", {
2297
+ return /* @__PURE__ */ x("svg", {
2298
2298
  width: "12",
2299
2299
  height: "12",
2300
2300
  viewBox: "0 0 12 12",
@@ -2317,12 +2317,12 @@ var Pn = ({ status: e }) => /* @__PURE__ */ a("svg", {
2317
2317
  })]
2318
2318
  });
2319
2319
  }, _n = ({ moduleId: e, actions: t, onAddModule: n, onAddFeature: r, kind: i }) => {
2320
- const o = ge(), s = A(null), [d, c] = F();
2320
+ const o = ge(), s = A(null), [d, u] = F();
2321
2321
  if (!t.length && !n && !r) return null;
2322
- const l = (p) => {
2322
+ const l = (h) => {
2323
2323
  const m = s.current?.getBoundingClientRect();
2324
- m && p.onActivate(e, m);
2325
- }, u = (p) => p.map((m) => ({
2324
+ m && h.onActivate(e, m);
2325
+ }, c = (h) => h.map((m) => ({
2326
2326
  id: m.id,
2327
2327
  label: m.label + (m.items ? " ›" : ""),
2328
2328
  description: m.description,
@@ -2331,13 +2331,13 @@ var Pn = ({ status: e }) => /* @__PURE__ */ a("svg", {
2331
2331
  tooltip: m.tooltip,
2332
2332
  isSeparator: m.isSeparator,
2333
2333
  keepOpen: !!m.items,
2334
- onClick: () => m.items ? c(m.id) : l(m)
2334
+ onClick: () => m.items ? u(m.id) : l(m)
2335
2335
  })), f = d ? [{
2336
2336
  id: "back",
2337
2337
  label: o.features.back,
2338
2338
  keepOpen: !0,
2339
- onClick: () => c(void 0)
2340
- }, ...u(t.find((p) => p.id === d)?.items ?? [])] : [
2339
+ onClick: () => u(void 0)
2340
+ }, ...c(t.find((h) => h.id === d)?.items ?? [])] : [
2341
2341
  ...n ? [{
2342
2342
  id: "module",
2343
2343
  label: o.modules.addModule,
@@ -2350,7 +2350,7 @@ var Pn = ({ status: e }) => /* @__PURE__ */ a("svg", {
2350
2350
  description: o.modules.addFeatureDescription,
2351
2351
  onClick: r
2352
2352
  }] : [],
2353
- ...u(t)
2353
+ ...c(t)
2354
2354
  ], y = i === "add" ? o.modules.add : o.modules.options;
2355
2355
  return /* @__PURE__ */ a(Pe, {
2356
2356
  trigger: /* @__PURE__ */ a("button", {
@@ -2359,7 +2359,7 @@ var Pn = ({ status: e }) => /* @__PURE__ */ a("svg", {
2359
2359
  className: "event-modeling-grid-add-button event-modeling-grid-add-button--small event-modeling-grid-add-button--no-circle",
2360
2360
  title: y,
2361
2361
  "aria-label": y,
2362
- children: i === "add" ? "+" : /* @__PURE__ */ k("svg", {
2362
+ children: i === "add" ? "+" : /* @__PURE__ */ x("svg", {
2363
2363
  width: "13",
2364
2364
  height: "13",
2365
2365
  viewBox: "0 0 14 14",
@@ -2398,7 +2398,7 @@ var Pn = ({ status: e }) => /* @__PURE__ */ a("svg", {
2398
2398
  }),
2399
2399
  items: f,
2400
2400
  align: "right",
2401
- onClose: () => c(void 0)
2401
+ onClose: () => u(void 0)
2402
2402
  });
2403
2403
  }, Na = ({ suggestion: e }) => {
2404
2404
  const [t, n] = F(!1), r = async () => {
@@ -2411,10 +2411,10 @@ var Pn = ({ status: e }) => /* @__PURE__ */ a("svg", {
2411
2411
  }
2412
2412
  }
2413
2413
  };
2414
- return /* @__PURE__ */ k("span", {
2414
+ return /* @__PURE__ */ x("span", {
2415
2415
  className: "prediction-ghost",
2416
2416
  "data-suggestion-name": e.name,
2417
- children: [/* @__PURE__ */ k("button", {
2417
+ children: [/* @__PURE__ */ x("button", {
2418
2418
  type: "button",
2419
2419
  className: "prediction-ghost__accept",
2420
2420
  disabled: t,
@@ -2442,13 +2442,13 @@ var Pn = ({ status: e }) => /* @__PURE__ */ a("svg", {
2442
2442
  fontWeight: 600,
2443
2443
  color: "rgba(255,255,255,0.80)",
2444
2444
  textAlign: "center"
2445
- }, Aa = ({ moduleId: e, name: t, height: n, collapsed: r, onToggleCollapse: i, onAddModule: o, onAddFeature: s, onRenamed: d, validateName: c, status: l, detailsVisible: u = !1, onToggleDetails: f, onDragStart: y, error: p }) => {
2446
- const m = K(), { showStatuses: g = !0 } = fe(), v = Ir(!m.readOnly && !r ? y : void 0), h = m.readOnly ? void 0 : d, w = m.actions;
2447
- return /* @__PURE__ */ k(xr, {
2445
+ }, Aa = ({ moduleId: e, name: t, height: n, collapsed: r, onToggleCollapse: i, onAddModule: o, onAddFeature: s, onRenamed: d, validateName: u, status: l, detailsVisible: c = !1, onToggleDetails: f, onDragStart: y, error: h }) => {
2446
+ const m = K(), { showStatuses: g = !0 } = fe(), v = Ir(!m.readOnly && !r ? y : void 0), p = m.readOnly ? void 0 : d, w = m.actions;
2447
+ return /* @__PURE__ */ x(xr, {
2448
2448
  variant: "module",
2449
2449
  collapsed: r,
2450
2450
  onToggle: i,
2451
- leadingContent: !m.readOnly && (w.moduleHeaderLeading ?? []).map((b) => /* @__PURE__ */ k("button", {
2451
+ leadingContent: !m.readOnly && (w.moduleHeaderLeading ?? []).map((b) => /* @__PURE__ */ x("button", {
2452
2452
  type: "button",
2453
2453
  className: "event-modeling-grid-icon-btn",
2454
2454
  title: b.label,
@@ -2461,9 +2461,9 @@ var Pn = ({ status: e }) => /* @__PURE__ */ a("svg", {
2461
2461
  })]
2462
2462
  }, b.id)),
2463
2463
  label: t,
2464
- onRenameLabel: (b) => h?.(e, b),
2465
- labelReadOnly: !h,
2466
- validateLabel: c,
2464
+ onRenameLabel: (b) => p?.(e, b),
2465
+ labelReadOnly: !p,
2466
+ validateLabel: u,
2467
2467
  labelStyle: Ra,
2468
2468
  background: Ia,
2469
2469
  border: Ea,
@@ -2472,11 +2472,11 @@ var Pn = ({ status: e }) => /* @__PURE__ */ a("svg", {
2472
2472
  onPointerDown: v?.onPointerDown,
2473
2473
  onPointerMove: v?.onPointerMove,
2474
2474
  onPointerUp: v?.onPointerUp,
2475
- error: p,
2475
+ error: h,
2476
2476
  children: [
2477
2477
  g && l !== void 0 && /* @__PURE__ */ a(tn, { status: l }),
2478
2478
  !m.readOnly && f && /* @__PURE__ */ a(Sr, {
2479
- visible: u,
2479
+ visible: c,
2480
2480
  onToggle: f
2481
2481
  }),
2482
2482
  !m.readOnly && /* @__PURE__ */ a(_n, {
@@ -2513,16 +2513,16 @@ function La(e, t, n) {
2513
2513
  s.current = i;
2514
2514
  const d = A(t);
2515
2515
  d.current = t;
2516
- const c = A(e);
2517
- c.current = e;
2516
+ const u = A(e);
2517
+ u.current = e;
2518
2518
  const l = A(n);
2519
2519
  l.current = n;
2520
- const u = q((y, p, m) => {
2520
+ const c = q((y, h, m) => {
2521
2521
  const g = d.current.findIndex((v) => v.equals(y));
2522
2522
  g !== -1 && o({
2523
2523
  moduleId: y,
2524
2524
  sourceIndex: g,
2525
- ghostLabel: p,
2525
+ ghostLabel: h,
2526
2526
  ghostWidth: m.width,
2527
2527
  ghost: m.ghost,
2528
2528
  currentX: m.clientX,
@@ -2541,18 +2541,18 @@ function La(e, t, n) {
2541
2541
  currentY: m.clientY,
2542
2542
  dropIndex: Oa(d.current, m.clientX)
2543
2543
  });
2544
- }, p = () => {
2544
+ }, h = () => {
2545
2545
  const m = s.current;
2546
2546
  if (o(void 0), !m) return;
2547
2547
  const g = Nr(d.current, m.sourceIndex, m.dropIndex);
2548
- g && l.current?.(c.current, g);
2548
+ g && l.current?.(u.current, g);
2549
2549
  };
2550
- return window.addEventListener("pointermove", y), window.addEventListener("pointerup", p), () => {
2551
- window.removeEventListener("pointermove", y), window.removeEventListener("pointerup", p);
2550
+ return window.addEventListener("pointermove", y), window.addEventListener("pointerup", h), () => {
2551
+ window.removeEventListener("pointermove", y), window.removeEventListener("pointerup", h);
2552
2552
  };
2553
2553
  }, [f]), {
2554
2554
  moduleDrag: i,
2555
- handleModuleDragStart: !r.readOnly && n !== void 0 ? u : void 0
2555
+ handleModuleDragStart: !r.readOnly && n !== void 0 ? c : void 0
2556
2556
  };
2557
2557
  }
2558
2558
  var Ta = (e) => ({
@@ -2565,16 +2565,16 @@ var Ta = (e) => ({
2565
2565
  renameBarriers: /* @__PURE__ */ new Map()
2566
2566
  }), Bt = (e, t) => e.length === t.length && e.every((n, r) => n.id.equals(t[r]));
2567
2567
  function Je(e, t) {
2568
- const n = e.additions.filter((u) => !t.some((f) => f.id.equals(u.id))), r = new Map([...e.collapseBarriers].filter(([u, f]) => !t.some((y) => y.id.toString() === u && y.collapsed === f))), i = new Map([...e.renameBarriers].filter(([u, f]) => !t.some((y) => y.id.toString() === u && y.name === f))), o = e.orderBarrier && Bt(t, e.orderBarrier) ? void 0 : e.orderBarrier, s = new Map([...e.collapses].filter(([u, f]) => e.collapseBarriers.has(u) || !t.some((y) => y.id.toString() === u && y.collapsed === f))), d = new Map([...e.renames].filter(([u, f]) => e.renameBarriers.has(u) || !t.some((y) => y.id.toString() === u && y.name === f))), c = [...t, ...n].map((u) => ({
2569
- ...u,
2570
- collapsed: s.get(u.id.toString()) ?? u.collapsed,
2571
- name: d.get(u.id.toString()) ?? u.name
2572
- })), l = e.order ? Ar(c, e.order) : c;
2568
+ const n = e.additions.filter((c) => !t.some((f) => f.id.equals(c.id))), r = new Map([...e.collapseBarriers].filter(([c, f]) => !t.some((y) => y.id.toString() === c && y.collapsed === f))), i = new Map([...e.renameBarriers].filter(([c, f]) => !t.some((y) => y.id.toString() === c && y.name === f))), o = e.orderBarrier && Bt(t, e.orderBarrier) ? void 0 : e.orderBarrier, s = new Map([...e.collapses].filter(([c, f]) => e.collapseBarriers.has(c) || !t.some((y) => y.id.toString() === c && y.collapsed === f))), d = new Map([...e.renames].filter(([c, f]) => e.renameBarriers.has(c) || !t.some((y) => y.id.toString() === c && y.name === f))), u = [...t, ...n].map((c) => ({
2569
+ ...c,
2570
+ collapsed: s.get(c.id.toString()) ?? c.collapsed,
2571
+ name: d.get(c.id.toString()) ?? c.name
2572
+ })), l = e.order ? Ar(u, e.order) : u;
2573
2573
  return {
2574
2574
  snapshot: t,
2575
2575
  modules: l,
2576
2576
  additions: n,
2577
- order: e.order && !e.orderBarrier && Bt(t, l.map((u) => u.id)) ? void 0 : e.order,
2577
+ order: e.order && !e.orderBarrier && Bt(t, l.map((c) => c.id)) ? void 0 : e.order,
2578
2578
  collapses: s,
2579
2579
  renames: d,
2580
2580
  collapseBarriers: r,
@@ -2659,30 +2659,30 @@ async function Et(e, t, n) {
2659
2659
  }
2660
2660
  r !== !0 && t();
2661
2661
  }
2662
- function Ha({ collectionId: e, initialModules: t, onAddModule: n, onModulesReordered: r, onCollapseChanged: i, onRenameModule: o, onPersistenceError: s, renderModule: d, onModulesChanged: c }) {
2663
- const { readOnly: l } = K(), u = q((D) => {
2662
+ function Ha({ collectionId: e, initialModules: t, onAddModule: n, onModulesReordered: r, onCollapseChanged: i, onRenameModule: o, onPersistenceError: s, renderModule: d, onModulesChanged: u }) {
2663
+ const { readOnly: l } = K(), c = q((D) => {
2664
2664
  if (s) s(D);
2665
2665
  else throw D;
2666
- }, [s]), f = A(Ta(t)), [y, p] = F(f.current), m = A(!1), [g, v] = F(!1), h = A(/* @__PURE__ */ new Set()), [w, b] = F(/* @__PURE__ */ new Set()), S = A(!1), [C, O] = F(!1), N = (D, z) => {
2667
- z ? h.current.add(D) : h.current.delete(D), b(new Set(h.current));
2668
- }, L = q((D) => {
2666
+ }, [s]), f = A(Ta(t)), [y, h] = F(f.current), m = A(!1), [g, v] = F(!1), p = A(/* @__PURE__ */ new Set()), [w, b] = F(/* @__PURE__ */ new Set()), S = A(!1), [C, L] = F(!1), N = (D, z) => {
2667
+ z ? p.current.add(D) : p.current.delete(D), b(new Set(p.current));
2668
+ }, O = q((D) => {
2669
2669
  const z = D(f.current);
2670
- f.current = z, p(z), c?.(z.modules);
2671
- }, [c]);
2670
+ f.current = z, h(z), u?.(z.modules);
2671
+ }, [u]);
2672
2672
  re(() => {
2673
- t !== f.current.snapshot && L((D) => Je(D, t));
2674
- }, [t, L]);
2673
+ t !== f.current.snapshot && O((D) => Je(D, t));
2674
+ }, [t, O]);
2675
2675
  const j = q(async () => {
2676
2676
  if (!(l || !n || m.current)) {
2677
2677
  m.current = !0, v(!0);
2678
2678
  try {
2679
2679
  const D = await n();
2680
- D && L((z) => Je({
2680
+ D && O((z) => Je({
2681
2681
  ...z,
2682
2682
  additions: [...z.additions, D]
2683
2683
  }, z.snapshot));
2684
2684
  } catch (D) {
2685
- u(D);
2685
+ c(D);
2686
2686
  } finally {
2687
2687
  m.current = !1, v(!1);
2688
2688
  }
@@ -2690,29 +2690,29 @@ function Ha({ collectionId: e, initialModules: t, onAddModule: n, onModulesReord
2690
2690
  }, [
2691
2691
  l,
2692
2692
  n,
2693
- u,
2694
- L
2693
+ c,
2694
+ O
2695
2695
  ]), H = q(async (D) => {
2696
2696
  const z = D.id.toString();
2697
- if (!i || h.current.has(z)) return;
2697
+ if (!i || p.current.has(z)) return;
2698
2698
  N(z, !0);
2699
2699
  const I = !D.collapsed;
2700
- L((M) => Pa(M, D.id, I));
2700
+ O((k) => Pa(k, D.id, I));
2701
2701
  try {
2702
- await Et(() => i(D.id, I), () => L((M) => Fa(M, D.id)), u);
2702
+ await Et(() => i(D.id, I), () => O((k) => Fa(k, D.id)), c);
2703
2703
  } finally {
2704
2704
  N(z, !1);
2705
2705
  }
2706
2706
  }, [
2707
2707
  i,
2708
- u,
2709
- L
2710
- ]), x = q(async (D, z) => {
2708
+ c,
2709
+ O
2710
+ ]), M = q(async (D, z) => {
2711
2711
  const I = D.id.toString();
2712
- if (!(l || !o || h.current.has(I))) {
2713
- N(I, !0), L((M) => Da(M, D.id, z));
2712
+ if (!(l || !o || p.current.has(I))) {
2713
+ N(I, !0), O((k) => Da(k, D.id, z));
2714
2714
  try {
2715
- await Et(() => o(D.id, z), () => L((M) => $a(M, D.id)), u);
2715
+ await Et(() => o(D.id, z), () => O((k) => $a(k, D.id)), c);
2716
2716
  } finally {
2717
2717
  N(I, !1);
2718
2718
  }
@@ -2720,30 +2720,30 @@ function Ha({ collectionId: e, initialModules: t, onAddModule: n, onModulesReord
2720
2720
  }, [
2721
2721
  l,
2722
2722
  o,
2723
- u,
2724
- L
2723
+ c,
2724
+ O
2725
2725
  ]), T = q(async (D, z) => {
2726
2726
  if (l || !r || S.current) return;
2727
- S.current = !0, O(!0);
2727
+ S.current = !0, L(!0);
2728
2728
  const I = f.current.order;
2729
- L((M) => _a(M, z));
2729
+ O((k) => _a(k, z));
2730
2730
  try {
2731
- await Et(() => r(z), () => L((M) => Ba(M, I)), u);
2731
+ await Et(() => r(z), () => O((k) => Ba(k, I)), c);
2732
2732
  } finally {
2733
- S.current = !1, O(!1);
2733
+ S.current = !1, L(!1);
2734
2734
  }
2735
2735
  }, [
2736
- L,
2736
+ O,
2737
2737
  r,
2738
- u,
2738
+ c,
2739
2739
  l
2740
2740
  ]), { moduleDrag: W, handleModuleDragStart: X } = La(e, y.modules.map((D) => D.id), r && !C ? T : void 0);
2741
- return /* @__PURE__ */ k(ee, { children: [
2741
+ return /* @__PURE__ */ x(ee, { children: [
2742
2742
  /* @__PURE__ */ a(Mr, {
2743
2743
  drag: W,
2744
2744
  headerHeight: Z.headerHeight
2745
2745
  }),
2746
- y.modules.map((D, z) => /* @__PURE__ */ k("div", {
2746
+ y.modules.map((D, z) => /* @__PURE__ */ x("div", {
2747
2747
  style: { display: "contents" },
2748
2748
  children: [W?.dropIndex === z && /* @__PURE__ */ a(Ln, {}), d(D, {
2749
2749
  index: z,
@@ -2756,7 +2756,7 @@ function Ha({ collectionId: e, initialModules: t, onAddModule: n, onModulesReord
2756
2756
  H(D);
2757
2757
  } : void 0,
2758
2758
  onRenamed: !l && !w.has(D.id.toString()) && o ? (I) => {
2759
- x(D, I);
2759
+ M(D, I);
2760
2760
  } : void 0
2761
2761
  })]
2762
2762
  }, D.id.toString())),
@@ -2782,16 +2782,16 @@ var za = ({ width: e, collapsed: t, children: n }) => /* @__PURE__ */ a("div", {
2782
2782
  className: "event-modeling-module-placeholder__feature",
2783
2783
  style: { width: r }
2784
2784
  }, i))
2785
- }), qa = ({ moduleId: e, collectionId: t, index: n, width: r, collapsed: i, dragging: o, frameRef: s, header: d, template: c, content: l }) => /* @__PURE__ */ k(ga, {
2785
+ }), qa = ({ moduleId: e, collectionId: t, index: n, width: r, collapsed: i, dragging: o, frameRef: s, header: d, template: u, content: l }) => /* @__PURE__ */ x(ga, {
2786
2786
  ref: s,
2787
2787
  moduleId: e,
2788
2788
  collectionId: n === 0 ? t : void 0,
2789
2789
  marginLeft: n ? Z.sliceGap : 0,
2790
2790
  dragging: o,
2791
- children: [/* @__PURE__ */ k(za, {
2791
+ children: [/* @__PURE__ */ x(za, {
2792
2792
  width: r,
2793
2793
  collapsed: i,
2794
- children: [d, !i && c]
2794
+ children: [d, !i && u]
2795
2795
  }), i ? /* @__PURE__ */ a("div", { style: { width: Z.collapsedModuleWidth } }) : l]
2796
2796
  }), Ze = (e) => {
2797
2797
  const t = (n, r, i) => i.has(r.id.toString()) ? [] : (i.add(r.id.toString()), [...r.slices.map((o) => ({
@@ -2823,10 +2823,10 @@ var za = ({ width: e, collapsed: t, children: n }) => /* @__PURE__ */ a("div", {
2823
2823
  const t = /* @__PURE__ */ new Set(), n = (r) => t.has(r.id.toString()) ? [] : (t.add(r.id.toString()), [r, ...r.subFeatures.flatMap(n)]);
2824
2824
  return e.flatMap(n);
2825
2825
  }, Dr = (e, t) => Wa(Pr(t).map(Oe).filter((n) => n > 0), e), _r = (e) => e.length === 0 ? 0 : 1 + Math.max(...e.map((t) => _r(t.subFeatures))), Ga = (e, t) => {
2826
- const n = nn(e), r = Lr(e, t), i = Ze(e), o = e.modules.map((l) => l.collapsed ? Z.collapsedModuleWidth : Dr(l.name, l.features)), s = o.reduce((l, u, f) => l + (f ? Z.sliceGap : 0) + u, 0), d = Math.max(1, ...e.modules.map((l) => _r(l.features))), c = n.reduce((l, u) => l + r[u], 0);
2826
+ const n = nn(e), r = Lr(e, t), i = Ze(e), o = e.modules.map((l) => l.collapsed ? Z.collapsedModuleWidth : Dr(l.name, l.features)), s = o.reduce((l, c, f) => l + (f ? Z.sliceGap : 0) + c, 0), d = Math.max(1, ...e.modules.map((l) => _r(l.features))), u = n.reduce((l, c) => l + r[c], 0);
2827
2827
  return {
2828
2828
  width: (i.length ? 56 : 0) + s,
2829
- height: Z.headerHeight * (1 + d) + 28 + c,
2829
+ height: Z.headerHeight * (1 + d) + 28 + u,
2830
2830
  moduleWidths: o
2831
2831
  };
2832
2832
  }, Fr = () => {
@@ -2929,13 +2929,13 @@ function ja(e) {
2929
2929
  const r = (i, o) => {
2930
2930
  const s = n.get(o);
2931
2931
  if (!s || s.sliceId === i.id) return;
2932
- const d = t.get(i.id), c = t.get(s.sliceId);
2933
- d.connectedSliceIds.add(s.sliceId), c.connectedSliceIds.add(i.id), d.consumed.some((l) => l.eventId === o && l.sliceId === s.sliceId) || d.consumed.push({
2932
+ const d = t.get(i.id), u = t.get(s.sliceId);
2933
+ d.connectedSliceIds.add(s.sliceId), u.connectedSliceIds.add(i.id), d.consumed.some((l) => l.eventId === o && l.sliceId === s.sliceId) || d.consumed.push({
2934
2934
  eventId: o,
2935
2935
  eventName: s.eventName,
2936
2936
  sliceId: s.sliceId,
2937
2937
  sliceName: s.sliceName
2938
- }), c.produced.some((l) => l.eventId === o && l.sliceId === i.id) || c.produced.push({
2938
+ }), u.produced.some((l) => l.eventId === o && l.sliceId === i.id) || u.produced.push({
2939
2939
  eventId: o,
2940
2940
  eventName: s.eventName,
2941
2941
  sliceId: i.id,
@@ -2989,9 +2989,9 @@ function Ja(e, t) {
2989
2989
  }
2990
2990
  var Za = ({ sliceType: e, recomputeKey: t }) => {
2991
2991
  const n = A(null), [r, i] = F([]), o = `flow-arrow-${Gt().replace(/:/g, "")}`, s = q(() => {
2992
- const u = n.current, f = u?.parentElement;
2993
- if (!u || !f) return;
2994
- const y = u.getBoundingClientRect(), p = u.clientWidth || y.width, m = p ? y.width / p : 1, g = (w) => {
2992
+ const c = n.current, f = c?.parentElement;
2993
+ if (!c || !f) return;
2994
+ const y = c.getBoundingClientRect(), h = c.clientWidth || y.width, m = h ? y.width / h : 1, g = (w) => {
2995
2995
  const b = w.getBoundingClientRect();
2996
2996
  return {
2997
2997
  x: (b.left - y.left) / m,
@@ -2999,31 +2999,31 @@ var Za = ({ sliceType: e, recomputeKey: t }) => {
2999
2999
  width: b.width / m,
3000
3000
  height: b.height / m
3001
3001
  };
3002
- }, v = Xa(e).map((w) => Array.from(f.querySelectorAll(`[data-flow-node="${w}"]`)).map(g)).filter((w) => w.length > 0), h = [];
3003
- for (let w = 0; w < v.length - 1; w++) for (const b of v[w]) for (const S of v[w + 1]) h.push(Ja(b, S));
3004
- i((w) => w.length === h.length && w.every((b, S) => b === h[S]) ? w : h);
3005
- }, [e]), d = A(0), c = A(!1), l = q(() => {
3002
+ }, v = Xa(e).map((w) => Array.from(f.querySelectorAll(`[data-flow-node="${w}"]`)).map(g)).filter((w) => w.length > 0), p = [];
3003
+ for (let w = 0; w < v.length - 1; w++) for (const b of v[w]) for (const S of v[w + 1]) p.push(Ja(b, S));
3004
+ i((w) => w.length === p.length && w.every((b, S) => b === p[S]) ? w : p);
3005
+ }, [e]), d = A(0), u = A(!1), l = q(() => {
3006
3006
  if (ht.isActive) {
3007
- c.current = !0;
3007
+ u.current = !0;
3008
3008
  return;
3009
3009
  }
3010
3010
  d.current || (d.current = requestAnimationFrame(() => {
3011
3011
  d.current = 0, s();
3012
3012
  }));
3013
3013
  }, [s]);
3014
- return re(() => () => cancelAnimationFrame(d.current), []), re(() => ht.subscribe((u) => {
3015
- u || !c.current || (c.current = !1, l());
3014
+ return re(() => () => cancelAnimationFrame(d.current), []), re(() => ht.subscribe((c) => {
3015
+ c || !u.current || (u.current = !1, l());
3016
3016
  }), [l]), Ut(() => {
3017
3017
  s();
3018
3018
  }, [s, t]), re(() => {
3019
- const u = n.current, f = u?.parentElement;
3020
- if (!u || !f) return;
3021
- const y = new ResizeObserver(() => l()), p = () => {
3019
+ const c = n.current, f = c?.parentElement;
3020
+ if (!c || !f) return;
3021
+ const y = new ResizeObserver(() => l()), h = () => {
3022
3022
  y.disconnect(), y.observe(f), f.querySelectorAll("[data-flow-node]").forEach((g) => y.observe(g));
3023
3023
  };
3024
- p();
3024
+ h();
3025
3025
  const m = new MutationObserver((g) => {
3026
- g.every((v) => u.contains(v.target)) || (p(), l());
3026
+ g.every((v) => c.contains(v.target)) || (h(), l());
3027
3027
  });
3028
3028
  return m.observe(f, {
3029
3029
  childList: !0,
@@ -3039,7 +3039,7 @@ var Za = ({ sliceType: e, recomputeKey: t }) => {
3039
3039
  ref: n,
3040
3040
  className: "event-modeling-grid-connections",
3041
3041
  "aria-hidden": "true",
3042
- children: /* @__PURE__ */ k("svg", {
3042
+ children: /* @__PURE__ */ x("svg", {
3043
3043
  className: "event-modeling-grid-connections__svg",
3044
3044
  width: "100%",
3045
3045
  height: "100%",
@@ -3055,8 +3055,8 @@ var Za = ({ sliceType: e, recomputeKey: t }) => {
3055
3055
  d: "M 0 0 L 8 4.5 L 0 9 z",
3056
3056
  className: "event-modeling-grid-connections__arrow"
3057
3057
  })
3058
- }) }), r.map((u, f) => /* @__PURE__ */ a("path", {
3059
- d: u,
3058
+ }) }), r.map((c, f) => /* @__PURE__ */ a("path", {
3059
+ d: c,
3060
3060
  className: "event-modeling-grid-connections__line",
3061
3061
  markerEnd: `url(#${o})`
3062
3062
  }, f))]
@@ -3081,9 +3081,9 @@ function ns(e) {
3081
3081
  r();
3082
3082
  const d = [o];
3083
3083
  o.classList.add(Rt);
3084
- const c = new Set(e ?? []), l = o.dataset.sliceId;
3085
- l && c.add(l);
3086
- for (const u of c) s.querySelectorAll(ts(u)).forEach((f) => {
3084
+ const u = new Set(e ?? []), l = o.dataset.sliceId;
3085
+ l && u.add(l);
3086
+ for (const c of u) s.querySelectorAll(ts(c)).forEach((f) => {
3087
3087
  f !== o && (f.classList.add(Rt), d.push(f));
3088
3088
  });
3089
3089
  s.classList.add(Fn), n.current = {
@@ -3110,18 +3110,18 @@ var rs = ({ featureId: e, moduleId: t, enabled: n, dragging: r = !1, children: i
3110
3110
  transition: "opacity 0.15s"
3111
3111
  },
3112
3112
  children: i
3113
- }), is = ({ featureId: e, moduleId: t, enabled: n, collapsed: r, rowCollapsed: i, width: o, headerVisibility: s, header: d, screenTemplate: c, slices: l }) => /* @__PURE__ */ k(rs, {
3113
+ }), is = ({ featureId: e, moduleId: t, enabled: n, collapsed: r, rowCollapsed: i, width: o, headerVisibility: s, header: d, screenTemplate: u, slices: l }) => /* @__PURE__ */ x(rs, {
3114
3114
  featureId: e,
3115
3115
  moduleId: t,
3116
3116
  enabled: n,
3117
- children: [/* @__PURE__ */ k("div", {
3117
+ children: [/* @__PURE__ */ x("div", {
3118
3118
  className: `event-modeling-grid-header-cell-wrapper${r ? " event-modeling-grid-header-cell-wrapper--feature-collapsed" : ""}`,
3119
3119
  style: {
3120
3120
  width: s === "hidden" ? 0 : o,
3121
3121
  visibility: s === "hidden" ? "hidden" : "visible",
3122
3122
  overflow: s === "visible" && !r ? "visible" : "hidden"
3123
3123
  },
3124
- children: [s === "visible" ? d : s === "hidden" ? /* @__PURE__ */ a("div", { style: { height: Z.headerHeight } }) : null, !r && c]
3124
+ children: [s === "visible" ? d : s === "hidden" ? /* @__PURE__ */ a("div", { style: { height: Z.headerHeight } }) : null, !r && u]
3125
3125
  }), /* @__PURE__ */ a("div", {
3126
3126
  className: i ? "event-modeling-feature-grid-slices--row-collapsed" : s === "visible" ? "event-modeling-feature-grid-slices--header-visible" : void 0,
3127
3127
  children: l
@@ -3153,43 +3153,43 @@ function ds(e, t, n) {
3153
3153
  s.current = i;
3154
3154
  const d = A(t);
3155
3155
  d.current = t;
3156
- const c = A(n);
3157
- c.current = n;
3158
- const l = q((f, y, p) => {
3156
+ const u = A(n);
3157
+ u.current = n;
3158
+ const l = q((f, y, h) => {
3159
3159
  const m = d.current.findIndex((g) => g.equals(f));
3160
3160
  m !== -1 && o({
3161
3161
  featureId: f,
3162
3162
  moduleId: e,
3163
3163
  sourceIndex: m,
3164
3164
  ghostLabel: y,
3165
- ghostWidth: p.width,
3166
- ghost: p.ghost,
3167
- currentX: p.clientX,
3168
- currentY: p.clientY,
3165
+ ghostWidth: h.width,
3166
+ ghost: h.ghost,
3167
+ currentX: h.clientX,
3168
+ currentY: h.clientY,
3169
3169
  dropIndex: m,
3170
- headerY: p.headerY,
3171
- zoom: p.zoom
3170
+ headerY: h.headerY,
3171
+ zoom: h.zoom
3172
3172
  });
3173
- }, [e]), u = i !== void 0;
3173
+ }, [e]), c = i !== void 0;
3174
3174
  return re(() => {
3175
- if (!u) return;
3176
- const f = (p) => {
3175
+ if (!c) return;
3176
+ const f = (h) => {
3177
3177
  o((m) => m && {
3178
3178
  ...m,
3179
- currentX: p.clientX,
3180
- currentY: p.clientY,
3181
- dropIndex: ls(m.moduleId, p.clientX)
3179
+ currentX: h.clientX,
3180
+ currentY: h.clientY,
3181
+ dropIndex: ls(m.moduleId, h.clientX)
3182
3182
  });
3183
3183
  }, y = () => {
3184
- const p = s.current;
3185
- if (o(void 0), !p) return;
3186
- const m = Nr(d.current, p.sourceIndex, p.dropIndex);
3187
- m && c.current?.(p.moduleId, m);
3184
+ const h = s.current;
3185
+ if (o(void 0), !h) return;
3186
+ const m = Nr(d.current, h.sourceIndex, h.dropIndex);
3187
+ m && u.current?.(h.moduleId, m);
3188
3188
  };
3189
3189
  return window.addEventListener("pointermove", f), window.addEventListener("pointerup", y), () => {
3190
3190
  window.removeEventListener("pointermove", f), window.removeEventListener("pointerup", y);
3191
3191
  };
3192
- }, [u]), {
3192
+ }, [c]), {
3193
3193
  featureDrag: i,
3194
3194
  handleFeatureDragStart: !r.readOnly && n !== void 0 ? l : void 0
3195
3195
  };
@@ -3201,13 +3201,13 @@ function cs() {
3201
3201
  register: q((r, i) => {
3202
3202
  const o = `${i}:${r}`, s = n.current.get(o);
3203
3203
  if (s) return s;
3204
- const d = (c) => {
3204
+ const d = (u) => {
3205
3205
  t((l) => {
3206
- const u = l.get(r);
3207
- if ((u?.[i] ?? null) === c) return l;
3206
+ const c = l.get(r);
3207
+ if ((c?.[i] ?? null) === u) return l;
3208
3208
  const f = new Map(l), y = {
3209
- ...u,
3210
- [i]: c ?? void 0
3209
+ ...c,
3210
+ [i]: u ?? void 0
3211
3211
  };
3212
3212
  return !y.header && !y.column ? f.delete(r) : f.set(r, y), f;
3213
3213
  });
@@ -3243,7 +3243,7 @@ function Br(e, t, n) {
3243
3243
  })) : [...e, t];
3244
3244
  }
3245
3245
  function Ht(e, t) {
3246
- const n = e.pendingAdditions.filter(({ feature: c }) => !an(t, c.id)), r = n.reduce((c, l) => Br(c, l.feature, l.parentId), t), i = new Map([...e.pendingRenames].filter(([c, l]) => !Hr(t, c, l))), o = [...i].reduce((c, [l, u]) => ln(c, l, u), r), s = new Map([...e.pendingCollapses].filter(([c, l]) => !Wr(t, c, l))), d = [...s].reduce((c, [l, u]) => sn(c, l, u), o);
3246
+ const n = e.pendingAdditions.filter(({ feature: u }) => !an(t, u.id)), r = n.reduce((u, l) => Br(u, l.feature, l.parentId), t), i = new Map([...e.pendingRenames].filter(([u, l]) => !Hr(t, u, l))), o = [...i].reduce((u, [l, c]) => ln(u, l, c), r), s = new Map([...e.pendingCollapses].filter(([u, l]) => !Wr(t, u, l))), d = [...s].reduce((u, [l, c]) => sn(u, l, c), o);
3247
3247
  return {
3248
3248
  snapshot: t,
3249
3249
  features: e.order ? Wt(d, e.order) : d,
@@ -3307,20 +3307,20 @@ function Wt(e, t) {
3307
3307
  function zr(e, t) {
3308
3308
  return t.add(e.id.toString()), e.subFeatures.flatMap((n) => t.has(n.id.toString()) ? [] : [n, ...zr(n, t)]);
3309
3309
  }
3310
- function gs({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed: i, forceCollapsed: o = !1, onCollapseChanged: s, occupiesColumn: d, renderHeader: c, renderColumn: l, renderFeatureBoundary: u, onAddFeature: f, onRenameFeature: y, onFeaturesReordered: p, onFeaturesChanged: m }) {
3311
- const { readOnly: g, messages: v } = K(), { targets: h, register: w } = cs(), b = A(us(t)), [S, C] = F(b.current), O = A(!1), N = A(/* @__PURE__ */ new Set()), L = q((R) => {
3310
+ function gs({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed: i, forceCollapsed: o = !1, onCollapseChanged: s, occupiesColumn: d, renderHeader: u, renderColumn: l, renderFeatureBoundary: c, onAddFeature: f, onRenameFeature: y, onFeaturesReordered: h, onFeaturesChanged: m }) {
3311
+ const { readOnly: g, messages: v } = K(), { targets: p, register: w } = cs(), b = A(us(t)), [S, C] = F(b.current), L = A(!1), N = A(/* @__PURE__ */ new Set()), O = q((R) => {
3312
3312
  const G = R(b.current);
3313
3313
  G !== b.current && (b.current = G, C(G), m?.(G.features));
3314
3314
  }, [m]);
3315
3315
  re(() => {
3316
- t !== b.current.snapshot && L((R) => Ht(R, t));
3317
- }, [t, L]);
3316
+ t !== b.current.snapshot && O((R) => Ht(R, t));
3317
+ }, [t, O]);
3318
3318
  const j = q(async (R, G) => {
3319
- if (!(g || !f || O.current)) {
3320
- O.current = !0;
3319
+ if (!(g || !f || L.current)) {
3320
+ L.current = !0;
3321
3321
  try {
3322
3322
  const _ = await f(R, G);
3323
- _ && L((J) => ({
3323
+ _ && O((J) => ({
3324
3324
  ...J,
3325
3325
  features: Br(J.features, _, G),
3326
3326
  pendingAdditions: [...J.pendingAdditions, {
@@ -3329,31 +3329,31 @@ function gs({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed:
3329
3329
  }]
3330
3330
  }));
3331
3331
  } finally {
3332
- O.current = !1;
3332
+ L.current = !1;
3333
3333
  }
3334
3334
  }
3335
3335
  }, [
3336
3336
  g,
3337
3337
  f,
3338
- L
3338
+ O
3339
3339
  ]);
3340
3340
  tt(e, () => ({
3341
3341
  addFeature: (R) => j(R),
3342
3342
  addSubFeature: (R, G) => j(G, R),
3343
- updateFeature: (R, G) => L((_) => ({
3343
+ updateFeature: (R, G) => O((_) => ({
3344
3344
  ..._,
3345
3345
  features: on(_.features, R, G)
3346
3346
  }))
3347
- }), [j, L]);
3348
- const H = q((R) => L((G) => ms(G, R)), [L]), x = q((R, G) => {
3347
+ }), [j, O]);
3348
+ const H = q((R) => O((G) => ms(G, R)), [O]), M = q((R, G) => {
3349
3349
  const _ = R.toString();
3350
- !y || g || N.current.has(_) || (N.current.add(_), L((J) => ({
3350
+ !y || g || N.current.has(_) || (N.current.add(_), O((J) => ({
3351
3351
  ...J,
3352
3352
  features: ln(J.features, _, G),
3353
3353
  pendingRenames: new Map(J.pendingRenames).set(_, G)
3354
3354
  })), y(R, G).catch(() => H(R)).finally(() => N.current.delete(_)));
3355
3355
  }, [
3356
- L,
3356
+ O,
3357
3357
  y,
3358
3358
  g,
3359
3359
  H
@@ -3363,24 +3363,24 @@ function gs({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed:
3363
3363
  S.pendingCollapses
3364
3364
  ]), W = q((R) => {
3365
3365
  const G = !T(R);
3366
- L((_) => ({
3366
+ O((_) => ({
3367
3367
  ..._,
3368
3368
  features: sn(_.features, R.id.toString(), G),
3369
3369
  pendingCollapses: new Map(_.pendingCollapses).set(R.id.toString(), G)
3370
3370
  })), s?.(R.id, G);
3371
3371
  }, [
3372
- L,
3372
+ O,
3373
3373
  T,
3374
3374
  s
3375
3375
  ]), X = q((R) => {
3376
- L((G) => {
3376
+ O((G) => {
3377
3377
  const _ = new Map(G.pendingCollapses);
3378
3378
  return _.delete(R.id.toString()), Ht({
3379
3379
  ...G,
3380
3380
  pendingCollapses: _
3381
3381
  }, G.snapshot);
3382
3382
  }), s?.(R.id, R.collapsed);
3383
- }, [L, s]), D = S.features, z = oe(() => D.map((R) => {
3383
+ }, [O, s]), D = S.features, z = oe(() => D.map((R) => {
3384
3384
  const G = zr(R, /* @__PURE__ */ new Set());
3385
3385
  return {
3386
3386
  feature: R,
@@ -3391,59 +3391,59 @@ function gs({ ref: e, initialFeatures: t, moduleId: n, widthOf: r, isCollapsed:
3391
3391
  D,
3392
3392
  d,
3393
3393
  r
3394
- ]), I = z.flatMap((R) => [R.feature, ...R.children]).filter(d), M = new Set(z.filter((R) => R.children.length).map((R) => R.feature.id.toString())), E = new Set(z.flatMap((R) => R.children.map((G) => G.id.toString()))), $ = D.map((R) => R.id), Y = q((R, G) => {
3395
- L((_) => ({
3394
+ ]), I = z.flatMap((R) => [R.feature, ...R.children]).filter(d), k = new Set(z.filter((R) => R.children.length).map((R) => R.feature.id.toString())), E = new Set(z.flatMap((R) => R.children.map((G) => G.id.toString()))), $ = D.map((R) => R.id), Y = q((R, G) => {
3395
+ O((_) => ({
3396
3396
  ..._,
3397
3397
  features: Wt(_.features, G),
3398
3398
  order: G
3399
- })), p?.(Wt(b.current.features, G));
3400
- }, [L, p]), { featureDrag: Q, handleFeatureDragStart: P } = ds(n, $, p ? Y : void 0), V = (R) => ({
3399
+ })), h?.(Wt(b.current.features, G));
3400
+ }, [O, h]), { featureDrag: Q, handleFeatureDragStart: P } = ds(n, $, h ? Y : void 0), V = (R) => ({
3401
3401
  collapsed: T(R),
3402
3402
  dragging: Q?.featureId.equals(R.id) ?? !1,
3403
3403
  onDragStart: P,
3404
3404
  addSubFeature: !g && f ? (G) => {
3405
3405
  j(G, R.id);
3406
3406
  } : void 0,
3407
- onRenamed: !g && y ? (G) => x(R.id, G) : void 0,
3407
+ onRenamed: !g && y ? (G) => M(R.id, G) : void 0,
3408
3408
  onToggleCollapse: s ? () => W(R) : void 0,
3409
3409
  onCollapseFailed: s ? () => X(R) : void 0
3410
3410
  }), te = (R) => {
3411
- const G = M.has(R.id.toString()) ? "hidden" : E.has(R.id.toString()) ? "visible" : "none";
3411
+ const G = k.has(R.id.toString()) ? "hidden" : E.has(R.id.toString()) ? "visible" : "none";
3412
3412
  return {
3413
3413
  ...V(R),
3414
3414
  headerVisibility: G
3415
3415
  };
3416
3416
  };
3417
- return D.length ? /* @__PURE__ */ k(ee, { children: [
3417
+ return D.length ? /* @__PURE__ */ x(ee, { children: [
3418
3418
  /* @__PURE__ */ a(Mr, {
3419
3419
  drag: Q,
3420
3420
  headerHeight: Z.headerHeight
3421
3421
  }),
3422
- /* @__PURE__ */ k("div", {
3422
+ /* @__PURE__ */ x("div", {
3423
3423
  className: "event-modeling-features-area",
3424
3424
  children: [/* @__PURE__ */ a("div", {
3425
3425
  className: "event-modeling-features-area__headers",
3426
3426
  style: { columnGap: Z.sliceGap },
3427
3427
  children: z.map((R, G) => /* @__PURE__ */ a(as, {
3428
- ref: u ? w(R.feature.id.toString(), "header") : void 0,
3428
+ ref: c ? w(R.feature.id.toString(), "header") : void 0,
3429
3429
  width: R.width,
3430
3430
  collapsed: T(R.feature),
3431
3431
  dropEdge: ss(Q?.dropIndex, G, z.length),
3432
- children: !u && c(R.feature, V(R.feature))
3432
+ children: !c && u(R.feature, V(R.feature))
3433
3433
  }, R.feature.id.toString()))
3434
3434
  }), /* @__PURE__ */ a("div", {
3435
3435
  className: "event-modeling-features-area__columns",
3436
3436
  style: { columnGap: Z.sliceGap },
3437
3437
  children: I.map((R) => /* @__PURE__ */ a("div", {
3438
3438
  className: "event-modeling-features-area__column",
3439
- ref: u ? w(R.id.toString(), "column") : void 0,
3440
- children: !u && l(R, te(R))
3439
+ ref: c ? w(R.id.toString(), "column") : void 0,
3440
+ children: !c && l(R, te(R))
3441
3441
  }, R.id.toString()))
3442
3442
  })]
3443
3443
  }),
3444
- u && z.flatMap((R) => [R.feature, ...R.children]).map((R) => {
3445
- const G = h.get(R.id.toString());
3446
- return !G || !E.has(R.id.toString()) && !G.header || d(R) && !G.column ? null : /* @__PURE__ */ a(Ae, { children: u(R, /* @__PURE__ */ k(ee, { children: [!E.has(R.id.toString()) && G.header && He(c(R, V(R)), G.header), G.column && He(l(R, te(R)), G.column)] })) }, R.id.toString());
3444
+ c && z.flatMap((R) => [R.feature, ...R.children]).map((R) => {
3445
+ const G = p.get(R.id.toString());
3446
+ return !G || !E.has(R.id.toString()) && !G.header || d(R) && !G.column ? null : /* @__PURE__ */ a(Ae, { children: c(R, /* @__PURE__ */ x(ee, { children: [!E.has(R.id.toString()) && G.header && He(u(R, V(R)), G.header), G.column && He(l(R, te(R)), G.column)] })) }, R.id.toString());
3447
3447
  })
3448
3448
  ] }) : /* @__PURE__ */ a("div", {
3449
3449
  className: "event-modeling-module-empty-placeholder",
@@ -3462,7 +3462,7 @@ var vs = ({ type: e }) => /* @__PURE__ */ a("svg", {
3462
3462
  }), hs = ({ type: e }) => {
3463
3463
  switch (e) {
3464
3464
  case B.stateChange:
3465
- return /* @__PURE__ */ k(ee, { children: [
3465
+ return /* @__PURE__ */ x(ee, { children: [
3466
3466
  /* @__PURE__ */ a("rect", {
3467
3467
  x: "3",
3468
3468
  y: "3",
@@ -3503,7 +3503,7 @@ var vs = ({ type: e }) => /* @__PURE__ */ a("svg", {
3503
3503
  /* @__PURE__ */ a("polyline", { points: "10,16 12,17 14,16" })
3504
3504
  ] });
3505
3505
  case B.stateView:
3506
- return /* @__PURE__ */ k(ee, { children: [
3506
+ return /* @__PURE__ */ x(ee, { children: [
3507
3507
  /* @__PURE__ */ a("rect", {
3508
3508
  x: "3",
3509
3509
  y: "3",
@@ -3553,7 +3553,7 @@ var vs = ({ type: e }) => /* @__PURE__ */ a("svg", {
3553
3553
  /* @__PURE__ */ a("polyline", { points: "9,14 12,10 15,14" })
3554
3554
  ] });
3555
3555
  case B.automation:
3556
- return /* @__PURE__ */ k(ee, { children: [
3556
+ return /* @__PURE__ */ x(ee, { children: [
3557
3557
  /* @__PURE__ */ a("circle", {
3558
3558
  cx: "12",
3559
3559
  cy: "8",
@@ -3597,7 +3597,7 @@ var vs = ({ type: e }) => /* @__PURE__ */ a("svg", {
3597
3597
  })
3598
3598
  ] });
3599
3599
  case B.translator:
3600
- return /* @__PURE__ */ k(ee, { children: [
3600
+ return /* @__PURE__ */ x(ee, { children: [
3601
3601
  /* @__PURE__ */ a("circle", {
3602
3602
  cx: "12",
3603
3603
  cy: "7",
@@ -3685,7 +3685,7 @@ var vs = ({ type: e }) => /* @__PURE__ */ a("svg", {
3685
3685
  onClick: () => t(n)
3686
3686
  })), fs = ({ sliceType: e }) => {
3687
3687
  const { messages: t } = K();
3688
- return /* @__PURE__ */ k(ee, { children: [/* @__PURE__ */ a("strong", { children: Vr(e, t) }), /* @__PURE__ */ a("span", {
3688
+ return /* @__PURE__ */ x(ee, { children: [/* @__PURE__ */ a("strong", { children: Vr(e, t) }), /* @__PURE__ */ a("span", {
3689
3689
  className: "event-modeling-grid-slice-type-explanation",
3690
3690
  children: qr(e, t)
3691
3691
  })] });
@@ -3702,8 +3702,8 @@ var vs = ({ type: e }) => /* @__PURE__ */ a("svg", {
3702
3702
  align: "right"
3703
3703
  });
3704
3704
  }, ys = ({ featureId: e, onAddSubFeature: t, onAddSlice: n, actions: r = [] }) => {
3705
- const i = ge(), o = A(null), [s, d] = F("main"), [c, l] = F(), u = r.filter((v) => !v.when || v.when(e));
3706
- if (!t && !n && u.length === 0) return null;
3705
+ const i = ge(), o = A(null), [s, d] = F("main"), [u, l] = F(), c = r.filter((v) => !v.when || v.when(e));
3706
+ if (!t && !n && c.length === 0) return null;
3707
3707
  const f = [
3708
3708
  ...n ? [{
3709
3709
  id: "slice",
@@ -3718,7 +3718,7 @@ var vs = ({ type: e }) => /* @__PURE__ */ a("svg", {
3718
3718
  description: i.features.addSubFeatureDescription,
3719
3719
  onClick: t
3720
3720
  }] : [],
3721
- ...u.map((v) => ({
3721
+ ...c.map((v) => ({
3722
3722
  id: v.id,
3723
3723
  label: v.label + (v.items ? " ›" : ""),
3724
3724
  description: v.description,
@@ -3733,15 +3733,15 @@ var vs = ({ type: e }) => /* @__PURE__ */ a("svg", {
3733
3733
  }))
3734
3734
  ];
3735
3735
  function y(v) {
3736
- const h = o.current?.getBoundingClientRect();
3737
- h && v.onActivate(e, h);
3736
+ const p = o.current?.getBoundingClientRect();
3737
+ p && v.onActivate(e, p);
3738
3738
  }
3739
- const p = {
3739
+ const h = {
3740
3740
  id: "back",
3741
3741
  label: i.features.back,
3742
3742
  keepOpen: !0,
3743
3743
  onClick: () => d("main")
3744
- }, m = n ? [p, ...Gr(i, n)] : [p], g = [p, ...(u.find((v) => v.id === c)?.items ?? []).filter((v) => !v.when || v.when(e)).map((v) => ({
3744
+ }, m = n ? [h, ...Gr(i, n)] : [h], g = [h, ...(c.find((v) => v.id === u)?.items ?? []).filter((v) => !v.when || v.when(e)).map((v) => ({
3745
3745
  id: v.id,
3746
3746
  label: v.label,
3747
3747
  icon: v.icon,
@@ -3791,27 +3791,27 @@ var vs = ({ type: e }) => /* @__PURE__ */ a("svg", {
3791
3791
  items: o,
3792
3792
  align: "right"
3793
3793
  });
3794
- }, Ss = "rgba(160,140,230,0.10)", Cs = "1px solid rgba(160,140,230,0.22)", xs = ({ featureId: e, name: t, height: n, collapsed: r, onToggleCollapse: i, onRenamed: o, status: s, detailsVisible: d = !1, onToggleDetails: c, dragging: l = !1, onDragStart: u, error: f, onAddSubFeature: y, onAddSlice: p }) => {
3795
- const m = K(), { showStatuses: g = !0 } = fe(), v = Ir(!m.readOnly && !r ? u : void 0), h = m.readOnly ? void 0 : o, w = (m.actions.featureHeader ?? []).filter((C) => !C.when || C.when(e)), b = (m.actions.featureHeaderLeading ?? []).filter((C) => !C.when || C.when(e)), S = m.actions.featureHeaderMenu ?? [];
3794
+ }, Ss = "rgba(160,140,230,0.10)", Cs = "1px solid rgba(160,140,230,0.22)", xs = ({ featureId: e, name: t, height: n, collapsed: r, onToggleCollapse: i, onRenamed: o, status: s, detailsVisible: d = !1, onToggleDetails: u, dragging: l = !1, onDragStart: c, error: f, onAddSubFeature: y, onAddSlice: h }) => {
3795
+ const m = K(), { showStatuses: g = !0 } = fe(), v = Ir(!m.readOnly && !r ? c : void 0), p = m.readOnly ? void 0 : o, w = (m.actions.featureHeader ?? []).filter((C) => !C.when || C.when(e)), b = (m.actions.featureHeaderLeading ?? []).filter((C) => !C.when || C.when(e)), S = m.actions.featureHeaderMenu ?? [];
3796
3796
  return /* @__PURE__ */ a(xr, {
3797
3797
  variant: "feature",
3798
3798
  collapsed: r,
3799
3799
  onToggle: i,
3800
- leadingContent: !m.readOnly && b.map((C) => /* @__PURE__ */ k("button", {
3800
+ leadingContent: !m.readOnly && b.map((C) => /* @__PURE__ */ x("button", {
3801
3801
  type: "button",
3802
3802
  className: "event-modeling-grid-icon-btn",
3803
3803
  title: C.disabled ? C.disabledTooltip ?? C.tooltip : C.tooltip,
3804
3804
  "aria-label": C.tooltip,
3805
3805
  disabled: C.disabled,
3806
- onClick: (O) => C.onActivate(e, O.currentTarget.getBoundingClientRect()),
3806
+ onClick: (L) => C.onActivate(e, L.currentTarget.getBoundingClientRect()),
3807
3807
  children: [C.icon, C.indicator && /* @__PURE__ */ a("span", {
3808
3808
  className: "event-modeling-feature-chat-dot",
3809
3809
  "aria-hidden": "true"
3810
3810
  })]
3811
3811
  }, C.tooltip)),
3812
3812
  label: t,
3813
- onRenameLabel: (C) => h?.(e, C),
3814
- labelReadOnly: !h,
3813
+ onRenameLabel: (C) => p?.(e, C),
3814
+ labelReadOnly: !p,
3815
3815
  background: Ss,
3816
3816
  border: Cs,
3817
3817
  height: n,
@@ -3827,11 +3827,11 @@ var vs = ({ type: e }) => /* @__PURE__ */ a("svg", {
3827
3827
  opacity: l ? 0.65 : 1
3828
3828
  },
3829
3829
  error: f,
3830
- children: !r && /* @__PURE__ */ k(ee, { children: [
3830
+ children: !r && /* @__PURE__ */ x(ee, { children: [
3831
3831
  g && s !== void 0 && /* @__PURE__ */ a(tn, { status: s }),
3832
- !m.readOnly && c && /* @__PURE__ */ a(Sr, {
3832
+ !m.readOnly && u && /* @__PURE__ */ a(Sr, {
3833
3833
  visible: d,
3834
- onToggle: c
3834
+ onToggle: u
3835
3835
  }),
3836
3836
  !m.readOnly && w.map((C) => /* @__PURE__ */ a("button", {
3837
3837
  type: "button",
@@ -3843,13 +3843,13 @@ var vs = ({ type: e }) => /* @__PURE__ */ a("svg", {
3843
3843
  borderColor: "var(--text-color)",
3844
3844
  color: "var(--text-color)"
3845
3845
  } : void 0,
3846
- onClick: (O) => C.onActivate(e, O.currentTarget.getBoundingClientRect()),
3846
+ onClick: (L) => C.onActivate(e, L.currentTarget.getBoundingClientRect()),
3847
3847
  children: C.icon
3848
3848
  }, C.tooltip)),
3849
3849
  !m.readOnly && /* @__PURE__ */ a(ws, {
3850
3850
  featureId: e,
3851
3851
  tooltip: m.messages.features.options,
3852
- icon: /* @__PURE__ */ k("svg", {
3852
+ icon: /* @__PURE__ */ x("svg", {
3853
3853
  width: "13",
3854
3854
  height: "13",
3855
3855
  viewBox: "0 0 14 14",
@@ -3893,14 +3893,14 @@ var vs = ({ type: e }) => /* @__PURE__ */ a("svg", {
3893
3893
  title: C.disabled ? C.disabledTooltip ?? C.tooltip : C.tooltip,
3894
3894
  "aria-label": C.tooltip,
3895
3895
  disabled: C.disabled,
3896
- onClick: (O) => C.onActivate(e, O.currentTarget.getBoundingClientRect()),
3896
+ onClick: (L) => C.onActivate(e, L.currentTarget.getBoundingClientRect()),
3897
3897
  children: C.icon
3898
3898
  }, C.tooltip)),
3899
3899
  !m.readOnly && /* @__PURE__ */ a(Rr, { suggestions: m.actions.featureHeaderSuggestions ?? [] }),
3900
3900
  !m.readOnly && /* @__PURE__ */ a(ys, {
3901
3901
  featureId: e,
3902
3902
  onAddSubFeature: y,
3903
- onAddSlice: p,
3903
+ onAddSlice: h,
3904
3904
  actions: m.actions.featureHeaderAdd
3905
3905
  })
3906
3906
  ] })
@@ -3922,18 +3922,18 @@ function Ms(e, t) {
3922
3922
  }
3923
3923
  }
3924
3924
  var ks = ({ state: e, specification: t }) => {
3925
- const { actions: n } = K(), r = ve(), i = A(!1), [o, s] = F(!1), d = e === we.Running, c = d ? n.specificationStop : n.specificationRun;
3926
- if (!c || c.when && !c.when(t)) return null;
3927
- const l = async (u) => {
3925
+ const { actions: n } = K(), r = ve(), i = A(!1), [o, s] = F(!1), d = e === we.Running, u = d ? n.specificationStop : n.specificationRun;
3926
+ if (!u || u.when && !u.when(t)) return null;
3927
+ const l = async (c) => {
3928
3928
  if (!r) {
3929
3929
  if (d) {
3930
- await c.onActivate(t.id, u);
3930
+ await u.onActivate(t.id, c);
3931
3931
  return;
3932
3932
  }
3933
3933
  if (!i.current) {
3934
3934
  i.current = !0, s(!0);
3935
3935
  try {
3936
- await c.onActivate(t.id, u);
3936
+ await u.onActivate(t.id, c);
3937
3937
  } finally {
3938
3938
  i.current = !1, s(!1);
3939
3939
  }
@@ -3943,13 +3943,13 @@ var ks = ({ state: e, specification: t }) => {
3943
3943
  return /* @__PURE__ */ a("button", {
3944
3944
  type: "button",
3945
3945
  className: `spec-run-button spec-run-button--${e}`,
3946
- onClick: (u) => {
3947
- l(u.currentTarget.getBoundingClientRect());
3946
+ onClick: (c) => {
3947
+ l(c.currentTarget.getBoundingClientRect());
3948
3948
  },
3949
3949
  disabled: r || o && !d,
3950
- "aria-label": c.tooltip,
3951
- title: c.tooltip,
3952
- children: o && !d ? /* @__PURE__ */ a("i", { className: "pi pi-spin pi-spinner" }) : c.icon
3950
+ "aria-label": u.tooltip,
3951
+ title: u.tooltip,
3952
+ children: o && !d ? /* @__PURE__ */ a("i", { className: "pi pi-spin pi-spinner" }) : u.icon
3953
3953
  });
3954
3954
  }, Ns = {
3955
3955
  [we.Idle]: "pi pi-minus",
@@ -3967,9 +3967,9 @@ var ks = ({ state: e, specification: t }) => {
3967
3967
  tabIndex: i ? 0 : void 0,
3968
3968
  children: /* @__PURE__ */ a("i", { className: Ns[e] })
3969
3969
  });
3970
- }, Es = 44, Rs = ({ name: e, collapsed: t, onToggleCollapse: n, runState: r, runMessage: i, onRenamed: o, onDeleted: s, runControl: d, gutter: c }) => {
3971
- const { messages: l, readOnly: u } = K(), f = ve(), y = f ? void 0 : o, p = f ? void 0 : s;
3972
- return /* @__PURE__ */ k("div", {
3970
+ }, Es = 44, Rs = ({ name: e, collapsed: t, onToggleCollapse: n, runState: r, runMessage: i, onRenamed: o, onDeleted: s, runControl: d, gutter: u }) => {
3971
+ const { messages: l, readOnly: c } = K(), f = ve(), y = f ? void 0 : o, h = f ? void 0 : s;
3972
+ return /* @__PURE__ */ x("div", {
3973
3973
  className: "event-modeling-grid-specification-outer-row",
3974
3974
  children: [/* @__PURE__ */ a("div", {
3975
3975
  className: "event-modeling-grid-specification-label-gutter",
@@ -3982,8 +3982,8 @@ var ks = ({ state: e, specification: t }) => {
3982
3982
  alignItems: "center",
3983
3983
  justifyContent: "center"
3984
3984
  },
3985
- children: c
3986
- }), /* @__PURE__ */ k("div", {
3985
+ children: u
3986
+ }), /* @__PURE__ */ x("div", {
3987
3987
  className: [
3988
3988
  "event-modeling-grid-specification-box",
3989
3989
  "event-modeling-grid-specification-box--header",
@@ -3993,10 +3993,10 @@ var ks = ({ state: e, specification: t }) => {
3993
3993
  flex: 1,
3994
3994
  minWidth: 0
3995
3995
  },
3996
- children: [/* @__PURE__ */ k("div", {
3996
+ children: [/* @__PURE__ */ x("div", {
3997
3997
  className: "event-modeling-grid-specification-header",
3998
3998
  children: [
3999
- !u && n && /* @__PURE__ */ a(Qt, {
3999
+ !c && n && /* @__PURE__ */ a(Qt, {
4000
4000
  collapsed: t,
4001
4001
  onToggle: f ? void 0 : n
4002
4002
  }),
@@ -4020,10 +4020,10 @@ var ks = ({ state: e, specification: t }) => {
4020
4020
  message: i
4021
4021
  }),
4022
4022
  d,
4023
- p && /* @__PURE__ */ a("button", {
4023
+ h && /* @__PURE__ */ a("button", {
4024
4024
  type: "button",
4025
4025
  className: "spec-delete-button",
4026
- onClick: p,
4026
+ onClick: h,
4027
4027
  "aria-label": l.specifications.delete,
4028
4028
  title: l.specifications.delete,
4029
4029
  children: /* @__PURE__ */ a("i", { className: "pi pi-trash" })
@@ -4037,84 +4037,84 @@ var ks = ({ state: e, specification: t }) => {
4037
4037
  })]
4038
4038
  });
4039
4039
  }, As = 15e3, zt = (e) => e.given.length + (e.when ? 1 : 0) + e.thenEvents.length + e.thenErrors.length, Os = (e, t) => e || !(t.onSpecificationAdded || t.onSpecificationRemoved || t.onSpecificationRenamed || t.onSpecificationOpenStateSet || t.onGivenEventAdded || t.onGivenEventValuesSet || t.onGivenReadModelSet || t.onWhenCommandSet || t.onWhenCommandValuesSet || t.onThenEventAdded || t.onThenEventValuesSet || t.onThenErrorAdded || t.onThenRuleErrorAdded || t.onThenErrorRenamed || t.onGivenEventRemoved || t.onGivenReadModelRemoved || t.onGivenReadModelValuesSet || t.onThenEventRemoved || t.onThenReadModelValuesSet || t.onThenErrorRemoved || t.onSpecificationItemOpened), Ls = (e, t, n, r, i) => n ? t : r ? Ts(e, t, i) : e, Ts = (e, t, n = /* @__PURE__ */ new Set()) => {
4040
- const r = t.filter((c) => !n.has(c.id.toString())), i = new Map(r.map((c) => [c.id.toString(), c])), o = e.map((c) => {
4041
- const l = i.get(c.id.toString());
4042
- return l && zt(l) > zt(c) ? l : c;
4043
- }), s = new Set(e.map((c) => c.id.toString())), d = r.filter((c) => !s.has(c.id.toString()));
4044
- return d.length || o.some((c, l) => c !== e[l]) ? [...o, ...d] : e;
4040
+ const r = t.filter((u) => !n.has(u.id.toString())), i = new Map(r.map((u) => [u.id.toString(), u])), o = e.map((u) => {
4041
+ const l = i.get(u.id.toString());
4042
+ return l && zt(l) > zt(u) ? l : u;
4043
+ }), s = new Set(e.map((u) => u.id.toString())), d = r.filter((u) => !s.has(u.id.toString()));
4044
+ return d.length || o.some((u, l) => u !== e[l]) ? [...o, ...d] : e;
4045
4045
  }, Ps = 1, Ds = ({ sliceId: e, width: t, collapsed: n, specifications: r, runInfoFor: i, renderRows: o }) => {
4046
- const { editing: s, actions: d, messages: c } = K(), l = ve(), [u, f] = F(r), [y, p] = F(!1), [m, g] = F(!1), [v, h] = F(!1), w = A(0), b = A(!1), S = A(!1), C = A(!1), O = A(/* @__PURE__ */ new Set()), N = Os(l, s), L = N ? r : u;
4046
+ const { editing: s, actions: d, messages: u } = K(), l = ve(), [c, f] = F(r), [y, h] = F(!1), [m, g] = F(!1), [v, p] = F(!1), w = A(0), b = A(!1), S = A(!1), C = A(!1), L = A(/* @__PURE__ */ new Set()), N = Os(l, s), O = N ? r : c;
4047
4047
  re(() => {
4048
- f((M) => Ls(M, r, N, Date.now() <= w.current, O.current));
4048
+ f((k) => Ls(k, r, N, Date.now() <= w.current, L.current));
4049
4049
  }, [r, N]);
4050
4050
  const j = async () => {
4051
4051
  if (b.current || !s.onSpecificationAdded) return;
4052
- b.current = !0, h(!0);
4053
- const M = {
4052
+ b.current = !0, p(!0);
4053
+ const k = {
4054
4054
  id: de.create(),
4055
- name: `${c.specifications.namePlaceholder} ${Ps++}`,
4055
+ name: `${u.specifications.namePlaceholder} ${Ps++}`,
4056
4056
  collapsed: !1,
4057
4057
  given: [],
4058
4058
  thenEvents: [],
4059
4059
  thenErrors: []
4060
4060
  };
4061
- f((E) => [...E, M]);
4061
+ f((E) => [...E, k]);
4062
4062
  try {
4063
- await s.onSpecificationAdded(e, M) || f((E) => E.filter(($) => !$.id.equals(M.id)));
4063
+ await s.onSpecificationAdded(e, k) || f((E) => E.filter(($) => !$.id.equals(k.id)));
4064
4064
  } catch {
4065
- f((E) => E.filter(($) => !$.id.equals(M.id)));
4065
+ f((E) => E.filter(($) => !$.id.equals(k.id)));
4066
4066
  } finally {
4067
- b.current = !1, h(!1);
4067
+ b.current = !1, p(!1);
4068
4068
  }
4069
- }, H = (M) => {
4070
- O.current.has(M.toString()) || (O.current.add(M.toString()), w.current = 0, f((E) => E.filter(($) => !$.id.equals(M))), s.onSpecificationRemoved?.(e, M));
4071
- }, x = (M, E) => {
4072
- f(($) => $.map((Y) => Y.id.equals(M) ? {
4069
+ }, H = (k) => {
4070
+ L.current.has(k.toString()) || (L.current.add(k.toString()), w.current = 0, f((E) => E.filter(($) => !$.id.equals(k))), s.onSpecificationRemoved?.(e, k));
4071
+ }, M = (k, E) => {
4072
+ f(($) => $.map((Y) => Y.id.equals(k) ? {
4073
4073
  ...Y,
4074
4074
  name: E
4075
- } : Y)), s.onSpecificationRenamed?.(e, M, E);
4076
- }, T = (M, E) => {
4077
- l || !s.onSpecificationOpenStateSet || (f(($) => $.map((Y) => Y.id.equals(M) ? {
4075
+ } : Y)), s.onSpecificationRenamed?.(e, k, E);
4076
+ }, T = (k, E) => {
4077
+ l || !s.onSpecificationOpenStateSet || (f(($) => $.map((Y) => Y.id.equals(k) ? {
4078
4078
  ...Y,
4079
4079
  collapsed: !E
4080
- } : Y)), s.onSpecificationOpenStateSet?.(e, M, E));
4081
- }, W = async (M) => {
4080
+ } : Y)), s.onSpecificationOpenStateSet?.(e, k, E));
4081
+ }, W = async (k) => {
4082
4082
  if (!(l || S.current || !d.specificationsGenerate)) {
4083
- S.current = !0, p(!0);
4083
+ S.current = !0, h(!0);
4084
4084
  try {
4085
- await d.specificationsGenerate.onActivate(e, M) && (w.current = Date.now() + As);
4085
+ await d.specificationsGenerate.onActivate(e, k) && (w.current = Date.now() + As);
4086
4086
  } finally {
4087
- S.current = !1, p(!1);
4087
+ S.current = !1, h(!1);
4088
4088
  }
4089
4089
  }
4090
- }, X = async (M) => {
4090
+ }, X = async (k) => {
4091
4091
  if (!(l || C.current || !d.specificationsRunAll || d.specificationsRunAll.disabled)) {
4092
4092
  C.current = !0, g(!0);
4093
4093
  try {
4094
- await d.specificationsRunAll.onActivate(e, M);
4094
+ await d.specificationsRunAll.onActivate(e, k);
4095
4095
  } finally {
4096
4096
  C.current = !1, g(!1);
4097
4097
  }
4098
4098
  }
4099
4099
  }, D = d.specificationsGenerate, z = d.specificationsRunAll, I = !l && D && (!D.when || D.when(e));
4100
- return n ? null : /* @__PURE__ */ k(ee, { children: [L.map((M, E) => {
4101
- const { state: $, message: Y } = i(M);
4102
- return /* @__PURE__ */ k("div", {
4100
+ return n ? null : /* @__PURE__ */ x(ee, { children: [O.map((k, E) => {
4101
+ const { state: $, message: Y } = i(k);
4102
+ return /* @__PURE__ */ x("div", {
4103
4103
  "data-slice-spec-col": "true",
4104
4104
  "data-slice-id": e.toString(),
4105
4105
  className: `event-modeling-grid-specification-wrapper event-modeling-grid-specification-wrapper--${$}`,
4106
4106
  style: { width: 56 + t },
4107
4107
  children: [/* @__PURE__ */ a(Rs, {
4108
- name: M.name,
4109
- collapsed: M.collapsed,
4110
- onToggleCollapse: s.onSpecificationOpenStateSet ? () => T(M.id, M.collapsed) : void 0,
4111
- onRenamed: s.onSpecificationRenamed ? (Q) => x(M.id, Q) : void 0,
4112
- onDeleted: s.onSpecificationRemoved ? () => H(M.id) : void 0,
4108
+ name: k.name,
4109
+ collapsed: k.collapsed,
4110
+ onToggleCollapse: s.onSpecificationOpenStateSet ? () => T(k.id, k.collapsed) : void 0,
4111
+ onRenamed: s.onSpecificationRenamed ? (Q) => M(k.id, Q) : void 0,
4112
+ onDeleted: s.onSpecificationRemoved ? () => H(k.id) : void 0,
4113
4113
  runState: $,
4114
4114
  runMessage: Y,
4115
4115
  runControl: /* @__PURE__ */ a(ks, {
4116
4116
  state: $,
4117
- specification: M
4117
+ specification: k
4118
4118
  }),
4119
4119
  gutter: E === 0 && z && (!z.when || z.when(e)) && /* @__PURE__ */ a("button", {
4120
4120
  type: "button",
@@ -4127,12 +4127,12 @@ var ks = ({ state: e, specification: t }) => {
4127
4127
  title: z.tooltip,
4128
4128
  children: z.icon
4129
4129
  })
4130
- }), !M.collapsed && o(M)]
4131
- }, `${M.id.toString()}:${zt(M)}`);
4132
- }), !l && (s.onSpecificationAdded || I) && /* @__PURE__ */ k("div", {
4130
+ }), !k.collapsed && o(k)]
4131
+ }, `${k.id.toString()}:${zt(k)}`);
4132
+ }), !l && (s.onSpecificationAdded || I) && /* @__PURE__ */ x("div", {
4133
4133
  className: "event-modeling-grid-specification-add-area",
4134
4134
  children: [s.onSpecificationAdded && /* @__PURE__ */ a(me, {
4135
- content: c.specifications.add,
4135
+ content: u.specifications.add,
4136
4136
  position: "top",
4137
4137
  children: /* @__PURE__ */ a("button", {
4138
4138
  type: "button",
@@ -4141,7 +4141,7 @@ var ks = ({ state: e, specification: t }) => {
4141
4141
  },
4142
4142
  disabled: v,
4143
4143
  className: "event-modeling-grid-add-button--small",
4144
- "aria-label": c.specifications.add,
4144
+ "aria-label": u.specifications.add,
4145
4145
  children: "+"
4146
4146
  })
4147
4147
  }), I && /* @__PURE__ */ a(me, {
@@ -4149,8 +4149,8 @@ var ks = ({ state: e, specification: t }) => {
4149
4149
  position: "top",
4150
4150
  children: /* @__PURE__ */ a("button", {
4151
4151
  type: "button",
4152
- onClick: (M) => {
4153
- W(M.currentTarget.getBoundingClientRect());
4152
+ onClick: (k) => {
4153
+ W(k.currentTarget.getBoundingClientRect());
4154
4154
  },
4155
4155
  disabled: y,
4156
4156
  className: "event-modeling-grid-add-button--small",
@@ -4161,7 +4161,7 @@ var ks = ({ state: e, specification: t }) => {
4161
4161
  })] });
4162
4162
  }, _s = ({ headline: e, minHeight: t, actions: n, children: r }) => {
4163
4163
  const i = ve();
4164
- return /* @__PURE__ */ k("div", {
4164
+ return /* @__PURE__ */ x("div", {
4165
4165
  className: "event-modeling-grid-specification-section",
4166
4166
  style: { minHeight: t },
4167
4167
  children: [
@@ -4215,9 +4215,9 @@ function Ws(e, t) {
4215
4215
  lines: [e]
4216
4216
  });
4217
4217
  return Ut(() => {
4218
- const d = n.current, c = Hs();
4219
- if (!d || !c) return;
4220
- const l = (u, f) => (c.font = `${t.fontWeight} ${f}px ${t.fontFamily}`, c.measureText(u).width);
4218
+ const d = n.current, u = Hs();
4219
+ if (!d || !u) return;
4220
+ const l = (c, f) => (u.font = `${t.fontWeight} ${f}px ${t.fontFamily}`, u.measureText(c).width);
4221
4221
  s(Bs(e, {
4222
4222
  maxFontSizePx: r,
4223
4223
  minFontSizePx: i,
@@ -4231,28 +4231,28 @@ function Ws(e, t) {
4231
4231
  t.fontFamily
4232
4232
  ]), [n, o];
4233
4233
  }
4234
- var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backgroundColor: t, textColor: n, isSelected: r = !1, disabled: i = !1, onSelected: o, onStartEdit: s, extraContent: d, children: c, ariaLabel: l, ariaPressed: u, "data-event-id": f, "data-card-id": y, "data-slice-id": p }) => {
4235
- const m = A(null), g = !!(o ?? s) || i, [v, h] = Ws(e, {
4234
+ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backgroundColor: t, textColor: n, isSelected: r = !1, disabled: i = !1, onSelected: o, onStartEdit: s, extraContent: d, children: u, ariaLabel: l, ariaPressed: c, "data-event-id": f, "data-card-id": y, "data-slice-id": h }) => {
4235
+ const m = A(null), g = !!(o ?? s) || i, [v, p] = Ws(e, {
4236
4236
  fontFamily: Vs,
4237
4237
  fontWeight: "bold"
4238
4238
  });
4239
4239
  re(() => () => {
4240
4240
  m.current && clearTimeout(m.current);
4241
4241
  }, []);
4242
- const w = q((O) => {
4243
- if (O.stopPropagation(), m.current) {
4242
+ const w = q((L) => {
4243
+ if (L.stopPropagation(), m.current) {
4244
4244
  clearTimeout(m.current), m.current = null;
4245
4245
  return;
4246
4246
  }
4247
4247
  m.current = setTimeout(() => {
4248
4248
  m.current = null, o?.();
4249
4249
  }, zs);
4250
- }, [o]), b = q((O) => {
4251
- O.stopPropagation(), m.current && (clearTimeout(m.current), m.current = null), s?.();
4250
+ }, [o]), b = q((L) => {
4251
+ L.stopPropagation(), m.current && (clearTimeout(m.current), m.current = null), s?.();
4252
4252
  }, [s]), S = r ? {
4253
4253
  outline: `2px solid ${t}`,
4254
4254
  outlineOffset: 2
4255
- } : {}, C = /* @__PURE__ */ k(ee, { children: [/* @__PURE__ */ k("div", {
4255
+ } : {}, C = /* @__PURE__ */ x(ee, { children: [/* @__PURE__ */ x("div", {
4256
4256
  className: "event-modeling-card__face",
4257
4257
  style: {
4258
4258
  background: t,
@@ -4261,13 +4261,13 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
4261
4261
  children: [/* @__PURE__ */ a("strong", {
4262
4262
  ref: v,
4263
4263
  className: "event-modeling-card__title",
4264
- style: { fontSize: h.fontSizePx },
4265
- children: h.lines.length > 1 ? h.lines.map((O, N) => /* @__PURE__ */ a("span", {
4264
+ style: { fontSize: p.fontSizePx },
4265
+ children: p.lines.length > 1 ? p.lines.map((L, N) => /* @__PURE__ */ a("span", {
4266
4266
  className: "event-modeling-card__title-line",
4267
- children: O
4268
- }, N)) : h.lines[0]
4267
+ children: L
4268
+ }, N)) : p.lines[0]
4269
4269
  }), d]
4270
- }), c] });
4270
+ }), u] });
4271
4271
  return g ? /* @__PURE__ */ a("button", {
4272
4272
  className: "event-modeling-card",
4273
4273
  style: S,
@@ -4275,16 +4275,16 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
4275
4275
  onClick: w,
4276
4276
  onDoubleClick: b,
4277
4277
  "aria-label": l,
4278
- "aria-pressed": u,
4278
+ "aria-pressed": c,
4279
4279
  "data-event-id": f,
4280
4280
  "data-card-id": y,
4281
- "data-slice-id": p,
4281
+ "data-slice-id": h,
4282
4282
  children: C
4283
4283
  }) : /* @__PURE__ */ a("div", {
4284
4284
  className: "event-modeling-card",
4285
4285
  "data-event-id": f,
4286
4286
  "data-card-id": y,
4287
- "data-slice-id": p,
4287
+ "data-slice-id": h,
4288
4288
  children: C
4289
4289
  });
4290
4290
  }, pe = {
@@ -4305,7 +4305,7 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
4305
4305
  }, Re = {
4306
4306
  background: "#e05050",
4307
4307
  text: "#ffffff"
4308
- }, qs = () => /* @__PURE__ */ k("svg", {
4308
+ }, qs = () => /* @__PURE__ */ x("svg", {
4309
4309
  viewBox: "0 0 12 12",
4310
4310
  fill: "none",
4311
4311
  stroke: "currentColor",
@@ -4321,7 +4321,7 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
4321
4321
  height: "8.5",
4322
4322
  rx: "1.5"
4323
4323
  }), /* @__PURE__ */ a("path", { d: "M1 5.5h10M4 1v3M8 1v3" })]
4324
- }), Gs = () => /* @__PURE__ */ k("svg", {
4324
+ }), Gs = () => /* @__PURE__ */ x("svg", {
4325
4325
  viewBox: "0 0 12 12",
4326
4326
  fill: "none",
4327
4327
  stroke: "currentColor",
@@ -4422,14 +4422,14 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
4422
4422
  });
4423
4423
  }, Ve = ({ title: e, schema: t, showTitle: n = !0, compact: r = !1 }) => {
4424
4424
  const i = ge(), o = oe(() => vr(t), [t]);
4425
- return /* @__PURE__ */ k("div", {
4425
+ return /* @__PURE__ */ x("div", {
4426
4426
  className: `schema-tooltip-properties${r ? " schema-tooltip-properties--compact" : ""}`,
4427
4427
  children: [n && /* @__PURE__ */ a("div", {
4428
4428
  className: "schema-tooltip-properties__title",
4429
4429
  children: e
4430
4430
  }), o.length > 0 ? /* @__PURE__ */ a("div", {
4431
4431
  className: "schema-tooltip-properties__list",
4432
- children: o.map((s) => /* @__PURE__ */ k("div", {
4432
+ children: o.map((s) => /* @__PURE__ */ x("div", {
4433
4433
  className: "schema-tooltip-properties__row",
4434
4434
  children: [/* @__PURE__ */ a(js, { type: s.type }), /* @__PURE__ */ a("span", {
4435
4435
  className: "schema-tooltip-properties__name",
@@ -4482,13 +4482,13 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
4482
4482
  fontSize: 11,
4483
4483
  opacity: 0.8,
4484
4484
  marginTop: 4
4485
- }, Yr = ({ kind: e, artifactId: t, summary: n, tags: r, schema: i, showDetails: o = !1, actions: s = [], onActivate: d, onSelected: c, ...l }) => {
4486
- const u = ve(), f = A(null), y = () => f.current?.getBoundingClientRect() ?? new DOMRect(), p = u ? [] : s.filter((v) => !v.when || !!t && v.when(t)), m = (v) => p.filter((h) => (h.corner ?? vt.end) === v), g = /* @__PURE__ */ a("div", {
4485
+ }, Yr = ({ kind: e, artifactId: t, summary: n, tags: r, schema: i, showDetails: o = !1, actions: s = [], onActivate: d, onSelected: u, ...l }) => {
4486
+ const c = ve(), f = A(null), y = () => f.current?.getBoundingClientRect() ?? new DOMRect(), h = c ? [] : s.filter((v) => !v.when || !!t && v.when(t)), m = (v) => h.filter((p) => (p.corner ?? vt.end) === v), g = /* @__PURE__ */ a("div", {
4487
4487
  ref: f,
4488
4488
  children: /* @__PURE__ */ a(Ue, {
4489
4489
  backgroundColor: Hn[e].background,
4490
4490
  textColor: Hn[e].text,
4491
- extraContent: /* @__PURE__ */ k(ee, { children: [
4491
+ extraContent: /* @__PURE__ */ x(ee, { children: [
4492
4492
  /* @__PURE__ */ a(Zs, { tags: r }),
4493
4493
  n && /* @__PURE__ */ a("div", {
4494
4494
  style: Qs,
@@ -4502,23 +4502,23 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
4502
4502
  })
4503
4503
  ] }),
4504
4504
  onSelected: () => {
4505
- if (d && t && !u) {
4505
+ if (d && t && !c) {
4506
4506
  d(t, y());
4507
4507
  return;
4508
4508
  }
4509
- c?.();
4509
+ u?.();
4510
4510
  },
4511
4511
  ...l
4512
4512
  })
4513
4513
  });
4514
- return e === he.event && p.length === 0 ? g : /* @__PURE__ */ k("div", {
4514
+ return e === he.event && h.length === 0 ? g : /* @__PURE__ */ x("div", {
4515
4515
  className: Ks[e],
4516
4516
  "data-artifact-kind": e,
4517
- children: [g, [vt.start, vt.end].flatMap((v) => m(v).map((h, w) => /* @__PURE__ */ a(Js, {
4518
- action: h,
4517
+ children: [g, [vt.start, vt.end].flatMap((v) => m(v).map((p, w) => /* @__PURE__ */ a(Js, {
4518
+ action: p,
4519
4519
  corner: v,
4520
4520
  slot: w,
4521
- onActivate: () => t && h.onActivate(t, y())
4521
+ onActivate: () => t && p.onActivate(t, y())
4522
4522
  }, `${v}-${w}`)))]
4523
4523
  });
4524
4524
  }, dn = ({ value: e, backgroundColor: t, textColor: n, nameError: r, onChange: i, onCommit: o, onCancel: s }) => /* @__PURE__ */ a("div", {
@@ -4559,46 +4559,46 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
4559
4559
  }
4560
4560
  })
4561
4561
  }), jr = (e) => Object.fromEntries(e.map((t) => [t.id.toString(), t.values])), el = 5, Xr = ({ options: e, nameOf: t, color: n, searchPlaceholder: r, emptyLabel: i, onSelect: o, footer: s, trigger: d }) => {
4562
- const [c, l] = F(!1), [u, f] = F(""), y = A(null), p = A(null), m = e.length > el, g = () => {
4562
+ const [u, l] = F(!1), [c, f] = F(""), y = A(null), h = A(null), m = e.length > el, g = () => {
4563
4563
  l(!1), f("");
4564
- }, v = oe(() => [y, p], []);
4565
- ze(v, g, c);
4566
- const h = u ? e.filter((b) => t(b).toLowerCase().includes(u.toLowerCase())) : e, w = (b) => {
4564
+ }, v = oe(() => [y, h], []);
4565
+ ze(v, g, u);
4566
+ const p = c ? e.filter((b) => t(b).toLowerCase().includes(c.toLowerCase())) : e, w = (b) => {
4567
4567
  o(b), g();
4568
4568
  };
4569
- return /* @__PURE__ */ k("div", {
4569
+ return /* @__PURE__ */ x("div", {
4570
4570
  ref: y,
4571
4571
  className: "event-modeling-grid-event-picker",
4572
4572
  style: { position: "relative" },
4573
4573
  children: [d({
4574
- open: c,
4574
+ open: u,
4575
4575
  toggle: () => l((b) => !b)
4576
4576
  }), /* @__PURE__ */ a(jt, {
4577
4577
  anchorRef: y,
4578
- open: c,
4578
+ open: u,
4579
4579
  side: "above",
4580
4580
  align: "right",
4581
4581
  gap: 4,
4582
- children: /* @__PURE__ */ k("div", {
4583
- ref: p,
4582
+ children: /* @__PURE__ */ x("div", {
4583
+ ref: h,
4584
4584
  className: "event-modeling-grid-event-picker-dropdown",
4585
4585
  children: [m && /* @__PURE__ */ a("input", {
4586
4586
  className: "event-modeling-grid-event-picker-search",
4587
4587
  placeholder: r,
4588
- value: u,
4588
+ value: c,
4589
4589
  onChange: (b) => f(b.target.value),
4590
4590
  autoFocus: !0,
4591
4591
  onClick: (b) => b.stopPropagation()
4592
- }), /* @__PURE__ */ k("ul", {
4592
+ }), /* @__PURE__ */ x("ul", {
4593
4593
  className: "event-modeling-grid-event-picker-list",
4594
4594
  children: [
4595
- h.map((b, S) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a("button", {
4595
+ p.map((b, S) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a("button", {
4596
4596
  className: "event-modeling-grid-event-picker-item",
4597
4597
  style: { borderLeft: `3px solid ${n}` },
4598
4598
  onClick: () => w(b),
4599
4599
  children: t(b)
4600
4600
  }) }, `${S}-${t(b)}`)),
4601
- h.length === 0 && /* @__PURE__ */ a("li", {
4601
+ p.length === 0 && /* @__PURE__ */ a("li", {
4602
4602
  className: "event-modeling-grid-event-picker-empty",
4603
4603
  children: i
4604
4604
  }),
@@ -4615,7 +4615,7 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
4615
4615
  searchPlaceholder: i,
4616
4616
  emptyLabel: o,
4617
4617
  onSelect: n,
4618
- trigger: ({ toggle: d }) => s !== void 0 ? /* @__PURE__ */ k("div", {
4618
+ trigger: ({ toggle: d }) => s !== void 0 ? /* @__PURE__ */ x("div", {
4619
4619
  className: "event-modeling-grid-optional-event-reference",
4620
4620
  children: [/* @__PURE__ */ a("div", {
4621
4621
  className: "event-modeling-grid-optional-event-reference__card",
@@ -4625,8 +4625,8 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
4625
4625
  className: "event-modeling-grid-optional-event-reference__define-btn",
4626
4626
  "aria-label": r,
4627
4627
  title: r,
4628
- onClick: (c) => {
4629
- c.stopPropagation(), d();
4628
+ onClick: (u) => {
4629
+ u.stopPropagation(), d();
4630
4630
  },
4631
4631
  children: /* @__PURE__ */ a("i", { className: "pi pi-plus" })
4632
4632
  })]
@@ -4649,7 +4649,7 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
4649
4649
  searchPlaceholder: i.search,
4650
4650
  emptyLabel: i.noItems,
4651
4651
  onSelect: n,
4652
- footer: (o) => r.length > 0 && /* @__PURE__ */ k(ee, { children: [/* @__PURE__ */ a("li", { className: "event-modeling-grid-event-picker-separator" }), r.map((s, d) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a("button", {
4652
+ footer: (o) => r.length > 0 && /* @__PURE__ */ x(ee, { children: [/* @__PURE__ */ a("li", { className: "event-modeling-grid-event-picker-separator" }), r.map((s, d) => /* @__PURE__ */ a("li", { children: /* @__PURE__ */ a("button", {
4653
4653
  className: "event-modeling-grid-event-picker-item",
4654
4654
  style: tl,
4655
4655
  onClick: () => {
@@ -4684,7 +4684,7 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
4684
4684
  });
4685
4685
  }, Be = /* @__PURE__ */ (function(e) {
4686
4686
  return e.event = "event", e.command = "command", e.readModel = "readModel", e;
4687
- })({}), un = ({ headline: e, actions: t, isLast: n = !1, children: r }) => /* @__PURE__ */ k("div", {
4687
+ })({}), un = ({ headline: e, actions: t, isLast: n = !1, children: r }) => /* @__PURE__ */ x("div", {
4688
4688
  className: "event-modeling-grid-specification-outer-row",
4689
4689
  children: [/* @__PURE__ */ a("div", {
4690
4690
  className: "event-modeling-grid-specification-label-gutter",
@@ -4712,7 +4712,7 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
4712
4712
  const { messages: r } = K();
4713
4713
  if (ve() || !t) return /* @__PURE__ */ a(ee, { children: n });
4714
4714
  const i = `${r.specifications.removeItem} ${e}`;
4715
- return /* @__PURE__ */ k("div", {
4715
+ return /* @__PURE__ */ x("div", {
4716
4716
  className: "spec-item-removable",
4717
4717
  children: [n, /* @__PURE__ */ a("button", {
4718
4718
  type: "button",
@@ -4726,10 +4726,10 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
4726
4726
  })]
4727
4727
  });
4728
4728
  }, il = ({ sliceId: e, sliceType: t, specification: n, events: r, readModel: i, renamedReadModelName: o }) => {
4729
- const { editing: s, messages: d } = K(), c = ve(), { onGivenEventAdded: l, onGivenEventValuesSet: u, onGivenReadModelSet: f, onGivenReadModelValuesSet: y, onGivenEventRemoved: p, onGivenReadModelRemoved: m, onSpecificationItemOpened: g } = s, [v, h] = F(n.given), [w, b] = F(n.givenReadModel), [S, C] = F(() => ({
4729
+ const { editing: s, messages: d } = K(), u = ve(), { onGivenEventAdded: l, onGivenEventValuesSet: c, onGivenReadModelSet: f, onGivenReadModelValuesSet: y, onGivenEventRemoved: h, onGivenReadModelRemoved: m, onSpecificationItemOpened: g } = s, [v, p] = F(n.given), [w, b] = F(n.givenReadModel), [S, C] = F(() => ({
4730
4730
  ...jr(n.given),
4731
4731
  ...n.givenReadModel ? { [n.givenReadModel.id.toString()]: n.givenReadModel.values ?? {} } : {}
4732
- })), O = c || !(l || u || f || y || p || m || g), N = O ? n.given : v, L = O ? n.givenReadModel : w, j = oe(() => nl(r), [r]), H = oe(() => new Map(j.map((P) => [P.id.toString(), P])), [j]), x = (P, V, te, R, G, _) => g?.({
4732
+ })), L = u || !(l || c || f || y || h || m || g), N = L ? n.given : v, O = L ? n.givenReadModel : w, j = oe(() => nl(r), [r]), H = oe(() => new Map(j.map((P) => [P.id.toString(), P])), [j]), M = (P, V, te, R, G, _) => g?.({
4733
4733
  sliceId: e,
4734
4734
  specificationId: n.id,
4735
4735
  itemId: P,
@@ -4746,7 +4746,7 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
4746
4746
  }
4747
4747
  }), T = (P) => {
4748
4748
  const V = de.create();
4749
- h((te) => [...te, {
4749
+ p((te) => [...te, {
4750
4750
  id: V,
4751
4751
  eventId: P.id,
4752
4752
  name: P.name,
@@ -4760,40 +4760,40 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
4760
4760
  values: P
4761
4761
  }), f?.(e, n.id, i.id, i.name), y?.(e, n.id, P));
4762
4762
  }, X = (P) => {
4763
- h((V) => V.filter((te) => !te.id.equals(P))), p?.(e, n.id, P);
4763
+ p((V) => V.filter((te) => !te.id.equals(P))), h?.(e, n.id, P);
4764
4764
  }, D = () => {
4765
4765
  b(void 0), m?.(e, n.id);
4766
- }, z = (P) => (V) => u?.(e, n.id, P, V), I = !c && t === B.stateChange && !!l, M = !c && !!i && !!f && !!g && rl(!0, !!L), E = L && (o ?? L.name), $ = L?.id ?? L?.readModelItemId, Y = L && $ && E !== void 0 && /* @__PURE__ */ a(yt, {
4766
+ }, z = (P) => (V) => c?.(e, n.id, P, V), I = !u && t === B.stateChange && !!l, k = !u && !!i && !!f && !!g && rl(!0, !!O), E = O && (o ?? O.name), $ = O?.id ?? O?.readModelItemId, Y = O && $ && E !== void 0 && /* @__PURE__ */ a(yt, {
4767
4767
  name: E,
4768
4768
  onRemoved: m ? D : void 0,
4769
4769
  children: /* @__PURE__ */ a(Le, {
4770
4770
  name: E,
4771
4771
  colors: nt,
4772
- onOpen: !c && g && f ? (P) => x($, Be.readModel, E, P, i?.schema, W) : void 0
4772
+ onOpen: !u && g && f ? (P) => M($, Be.readModel, E, P, i?.schema, W) : void 0
4773
4773
  })
4774
4774
  }, $.toString()), Q = N.map((P) => {
4775
4775
  const V = H.get(P.eventId.toString())?.name ?? P.name;
4776
4776
  return /* @__PURE__ */ a(yt, {
4777
4777
  name: V,
4778
- onRemoved: p ? () => X(P.id) : void 0,
4778
+ onRemoved: h ? () => X(P.id) : void 0,
4779
4779
  children: /* @__PURE__ */ a(Le, {
4780
4780
  name: V,
4781
4781
  colors: pe,
4782
- onOpen: !c && g && u ? (te) => x(P.id, Be.event, V, te, H.get(P.eventId.toString())?.schema, z(P.id)) : void 0
4782
+ onOpen: !u && g && c ? (te) => M(P.id, Be.event, V, te, H.get(P.eventId.toString())?.schema, z(P.id)) : void 0
4783
4783
  })
4784
4784
  }, P.id.toString());
4785
4785
  });
4786
- return /* @__PURE__ */ k(un, {
4786
+ return /* @__PURE__ */ x(un, {
4787
4787
  headline: d.specifications.given,
4788
- actions: /* @__PURE__ */ k(ee, { children: [I && /* @__PURE__ */ a(cn, {
4788
+ actions: /* @__PURE__ */ x(ee, { children: [I && /* @__PURE__ */ a(cn, {
4789
4789
  options: j,
4790
4790
  nameOf: (P) => P.name,
4791
4791
  onChosen: T
4792
- }), M && i && /* @__PURE__ */ a(me, {
4792
+ }), k && i && /* @__PURE__ */ a(me, {
4793
4793
  content: d.specifications.defineReadModel,
4794
4794
  position: "top",
4795
4795
  children: /* @__PURE__ */ a("button", {
4796
- onClick: (P) => x(i.id, Be.readModel, i.name, P.currentTarget.getBoundingClientRect(), i.schema, W),
4796
+ onClick: (P) => M(i.id, Be.readModel, i.name, P.currentTarget.getBoundingClientRect(), i.schema, W),
4797
4797
  className: "event-modeling-grid-add-button--small",
4798
4798
  "aria-label": d.specifications.defineReadModel,
4799
4799
  children: /* @__PURE__ */ a("i", {
@@ -4805,44 +4805,44 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
4805
4805
  children: [Y, Q]
4806
4806
  });
4807
4807
  }, ol = ({ sliceId: e, sliceType: t, specification: n, command: r, renamedCommandName: i, events: o = [] }) => {
4808
- const { editing: s, messages: d } = K(), c = ve(), { onWhenCommandSet: l, onWhenCommandValuesSet: u, onSpecificationItemOpened: f } = s, [y, p] = F(n.when), [m, g] = F(n.when?.values ?? {}), v = c || !(l || u || f) ? n.when : y, h = (N) => {
4809
- const L = de.create();
4810
- p({
4811
- id: L,
4808
+ const { editing: s, messages: d } = K(), u = ve(), { onWhenCommandSet: l, onWhenCommandValuesSet: c, onSpecificationItemOpened: f } = s, [y, h] = F(n.when), [m, g] = F(n.when?.values ?? {}), v = u || !(l || c || f) ? n.when : y, p = (N) => {
4809
+ const O = de.create();
4810
+ h({
4811
+ id: O,
4812
4812
  commandId: N.id,
4813
4813
  name: N.name,
4814
4814
  values: {}
4815
- }), g({}), l?.(e, n.id, L, N.id, N.name);
4816
- }, w = (N, L, j, H, x) => f?.({
4815
+ }), g({}), l?.(e, n.id, O, N.id, N.name);
4816
+ }, w = (N, O, j, H, M) => f?.({
4817
4817
  sliceId: e,
4818
4818
  specificationId: n.id,
4819
4819
  itemId: N,
4820
4820
  kind: Be.command,
4821
4821
  name: j,
4822
- schema: L && r?.id.equals(L) ? r.schema : void 0,
4823
- values: x,
4822
+ schema: O && r?.id.equals(O) ? r.schema : void 0,
4823
+ values: M,
4824
4824
  host: H,
4825
4825
  onValuesSet: (T) => {
4826
- y?.id.equals(N) && g(T), u?.(e, n.id, T);
4826
+ y?.id.equals(N) && g(T), c?.(e, n.id, T);
4827
4827
  }
4828
- }), b = t === B.stateChange ? r : void 0, S = t === B.stateView ? o : [], C = v && (v.commandId && r?.id.equals(v.commandId) ? i ?? v.name : v.name), O = !c && !!f && !!u;
4829
- return /* @__PURE__ */ k(un, {
4828
+ }), b = t === B.stateChange ? r : void 0, S = t === B.stateView ? o : [], C = v && (v.commandId && r?.id.equals(v.commandId) ? i ?? v.name : v.name), L = !u && !!f && !!c;
4829
+ return /* @__PURE__ */ x(un, {
4830
4830
  headline: d.specifications.when,
4831
- actions: !c && t !== B.stateChange && t !== B.stateView && !v && r && l && /* @__PURE__ */ a(cn, {
4831
+ actions: !u && t !== B.stateChange && t !== B.stateView && !v && r && l && /* @__PURE__ */ a(cn, {
4832
4832
  options: [r],
4833
4833
  nameOf: (N) => N.name,
4834
- onChosen: h
4834
+ onChosen: p
4835
4835
  }),
4836
4836
  children: [
4837
4837
  v && C && /* @__PURE__ */ a(Le, {
4838
4838
  name: C,
4839
4839
  colors: et,
4840
- onOpen: O ? (N) => w(v.id, v.commandId, C, N, m) : void 0
4840
+ onOpen: L ? (N) => w(v.id, v.commandId, C, N, m) : void 0
4841
4841
  }, v.id.toString()),
4842
4842
  b && /* @__PURE__ */ a(Le, {
4843
4843
  name: b.name,
4844
4844
  colors: et,
4845
- onOpen: O ? (N) => w(b.id, b.id, b.name, N, m) : void 0
4845
+ onOpen: L ? (N) => w(b.id, b.id, b.name, N, m) : void 0
4846
4846
  }, b.id.toString()),
4847
4847
  S.map((N) => /* @__PURE__ */ a(Le, {
4848
4848
  name: N.name,
@@ -4883,8 +4883,8 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
4883
4883
  const n = ve(), [r, i] = F(!1), [o, s] = F(e);
4884
4884
  if (re(() => s(e), [e]), r) {
4885
4885
  const d = () => {
4886
- const c = o.trim();
4887
- i(!1), !(!c || c === e) && t?.(c);
4886
+ const u = o.trim();
4887
+ i(!1), !(!u || u === e) && t?.(u);
4888
4888
  };
4889
4889
  return /* @__PURE__ */ a(dn, {
4890
4890
  value: o,
@@ -4905,7 +4905,7 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
4905
4905
  disabled: n
4906
4906
  });
4907
4907
  }, cl = ({ sliceId: e, sliceType: t, specification: n, events: r, command: i, readModel: o, renamedEventNames: s = {}, extra: d }) => {
4908
- const { editing: c, messages: l } = K(), u = ve(), { onThenEventAdded: f, onThenEventValuesSet: y, onThenErrorAdded: p, onThenRuleErrorAdded: m, onThenErrorRenamed: g, onThenEventRemoved: v, onThenErrorRemoved: h, onThenReadModelValuesSet: w, onSpecificationItemOpened: b } = c, [S, C] = F(n.thenEvents), [O, N] = F(n.thenErrors), [L, j] = F(() => jr(n.thenEvents)), [H, x] = F({}), T = u || !(f || y || p || m || g || v || h || w || b), W = T ? n.thenEvents : S, X = T ? n.thenErrors : O, D = oe(() => new Map(r.map((_) => [_.id.toString(), _])), [r]), z = oe(() => sl(i, r), [i, r]), I = !u && t !== B.stateView, M = (_) => {
4908
+ const { editing: u, messages: l } = K(), c = ve(), { onThenEventAdded: f, onThenEventValuesSet: y, onThenErrorAdded: h, onThenRuleErrorAdded: m, onThenErrorRenamed: g, onThenEventRemoved: v, onThenErrorRemoved: p, onThenReadModelValuesSet: w, onSpecificationItemOpened: b } = u, [S, C] = F(n.thenEvents), [L, N] = F(n.thenErrors), [O, j] = F(() => jr(n.thenEvents)), [H, M] = F({}), T = c || !(f || y || h || m || g || v || p || w || b), W = T ? n.thenEvents : S, X = T ? n.thenErrors : L, D = oe(() => new Map(r.map((_) => [_.id.toString(), _])), [r]), z = oe(() => sl(i, r), [i, r]), I = !c && t !== B.stateView, k = (_) => {
4909
4909
  const J = de.create();
4910
4910
  C((ae) => [...ae, {
4911
4911
  id: J,
@@ -4918,7 +4918,7 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
4918
4918
  N((ae) => [...ae, {
4919
4919
  id: _,
4920
4920
  name: J
4921
- }]), p?.(e, n.id, _, J);
4921
+ }]), h?.(e, n.id, _, J);
4922
4922
  }, $ = (_) => {
4923
4923
  const J = de.create();
4924
4924
  N((ae) => [...ae, {
@@ -4934,7 +4934,7 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
4934
4934
  }, Q = (_) => {
4935
4935
  C((J) => J.filter((ae) => !ae.id.equals(_))), v?.(e, n.id, _);
4936
4936
  }, P = (_) => {
4937
- N((J) => J.filter((ae) => !ae.id.equals(_))), h?.(e, n.id, _);
4937
+ N((J) => J.filter((ae) => !ae.id.equals(_))), p?.(e, n.id, _);
4938
4938
  }, V = W.map((_) => {
4939
4939
  const J = D.get(_.eventId.toString()), ae = s[_.eventId.toString()] ?? _.name;
4940
4940
  return /* @__PURE__ */ a(yt, {
@@ -4943,14 +4943,14 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
4943
4943
  children: /* @__PURE__ */ a(Le, {
4944
4944
  name: ae,
4945
4945
  colors: pe,
4946
- onOpen: !u && b && y ? (Ie) => b({
4946
+ onOpen: !c && b && y ? (Ie) => b({
4947
4947
  sliceId: e,
4948
4948
  specificationId: n.id,
4949
4949
  itemId: _.id,
4950
4950
  kind: Be.event,
4951
4951
  name: ae,
4952
4952
  schema: J?.schema,
4953
- values: L[_.id.toString()] ?? {},
4953
+ values: O[_.id.toString()] ?? {},
4954
4954
  host: Ie,
4955
4955
  onValuesSet: (Ye) => {
4956
4956
  j((rt) => ({
@@ -4965,17 +4965,17 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
4965
4965
  const J = _.reference ? ll(_.reference, r) ?? l.specifications.missingRule : _.name;
4966
4966
  return /* @__PURE__ */ a(yt, {
4967
4967
  name: J,
4968
- onRemoved: h ? () => P(_.id) : void 0,
4968
+ onRemoved: p ? () => P(_.id) : void 0,
4969
4969
  children: _.reference ? /* @__PURE__ */ a(Ue, {
4970
4970
  name: J,
4971
4971
  backgroundColor: Re.background,
4972
4972
  textColor: Re.text
4973
4973
  }) : /* @__PURE__ */ a(dl, {
4974
4974
  name: _.name,
4975
- onRenamed: !u && g ? (ae) => Y(_.id, ae) : void 0
4975
+ onRenamed: !c && g ? (ae) => Y(_.id, ae) : void 0
4976
4976
  })
4977
4977
  }, _.id.toString());
4978
- }), R = [...p ? [{
4978
+ }), R = [...h ? [{
4979
4979
  label: l.specifications.addError,
4980
4980
  onChosen: E
4981
4981
  }] : [], ...m ? z.map((_) => ({
@@ -4984,9 +4984,9 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
4984
4984
  })) : []], G = I && (t === B.stateChange ? (f || R.length > 0) && /* @__PURE__ */ a(cn, {
4985
4985
  options: f ? r : [],
4986
4986
  nameOf: (_) => _.name,
4987
- onChosen: M,
4987
+ onChosen: k,
4988
4988
  errors: R
4989
- }) : p && /* @__PURE__ */ a(me, {
4989
+ }) : h && /* @__PURE__ */ a(me, {
4990
4990
  content: l.specifications.addItem,
4991
4991
  position: "top",
4992
4992
  children: /* @__PURE__ */ a("button", {
@@ -4996,7 +4996,7 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
4996
4996
  children: "+"
4997
4997
  })
4998
4998
  }));
4999
- return /* @__PURE__ */ k(un, {
4999
+ return /* @__PURE__ */ x(un, {
5000
5000
  headline: l.specifications.then,
5001
5001
  actions: G,
5002
5002
  isLast: !0,
@@ -5006,7 +5006,7 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
5006
5006
  t === B.stateView && o && /* @__PURE__ */ a(Le, {
5007
5007
  name: o.name,
5008
5008
  colors: nt,
5009
- onOpen: !u && b ? (_) => b({
5009
+ onOpen: !c && b ? (_) => b({
5010
5010
  sliceId: e,
5011
5011
  specificationId: n.id,
5012
5012
  itemId: o.id,
@@ -5016,7 +5016,7 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
5016
5016
  values: H,
5017
5017
  host: _,
5018
5018
  onValuesSet: (J) => {
5019
- x(J), w?.(e, n.id, o.id, o.name, J);
5019
+ M(J), w?.(e, n.id, o.id, o.name, J);
5020
5020
  }
5021
5021
  }) : void 0
5022
5022
  }, o.id.toString()),
@@ -5039,8 +5039,8 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
5039
5039
  sliceType: e.sliceType,
5040
5040
  recomputeKey: i
5041
5041
  });
5042
- }, ml = ({ slice: e, collapsed: t, moduleId: n, featureId: r, collection: i, rows: o, heights: s, priorEvents: d, followingEvents: c = [], externalEvents: l, slots: u, controls: f }) => {
5043
- const { detailLevel: y, detailsVisibility: p } = fe(), m = lr(y, dr(p, n.toString(), r.toString(), e.id.toString())), g = /* @__PURE__ */ a(Kl, {
5042
+ }, ml = ({ slice: e, collapsed: t, moduleId: n, featureId: r, collection: i, rows: o, heights: s, priorEvents: d, followingEvents: u = [], externalEvents: l, slots: c, controls: f }) => {
5043
+ const { detailLevel: y, detailsVisibility: h } = fe(), m = lr(y, dr(h, n.toString(), r.toString(), e.id.toString())), g = /* @__PURE__ */ a(Kl, {
5044
5044
  featureId: r,
5045
5045
  slice: e,
5046
5046
  eventCount: e.events.length,
@@ -5048,15 +5048,15 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
5048
5048
  isDragging: f?.isDragging,
5049
5049
  onSliceDragStart: f?.onSliceDragStart,
5050
5050
  collapsedWidth: Z.collapsedSliceWidth,
5051
- header: u?.sliceHeader?.(e, f ?? {
5051
+ header: c?.sliceHeader?.(e, f ?? {
5052
5052
  collapsed: t,
5053
5053
  sliceCollapsed: e.collapsed,
5054
5054
  isDragging: !1
5055
5055
  }) ?? /* @__PURE__ */ a(mr, {
5056
5056
  editing: {
5057
- onSliceAdded: f?.onAddSlice ? (v, h) => f.onAddSlice?.(h, e.id) : void 0,
5057
+ onSliceAdded: f?.onAddSlice ? (v, p) => f.onAddSlice?.(p, e.id) : void 0,
5058
5058
  onSliceOpenStateSet: f?.onToggleCollapse ? () => f.onToggleCollapse?.() : void 0,
5059
- onSliceRenamed: f?.onRenamed ? (v, h) => f.onRenamed?.(h) : void 0
5059
+ onSliceRenamed: f?.onRenamed ? (v, p) => f.onRenamed?.(p) : void 0
5060
5060
  },
5061
5061
  children: /* @__PURE__ */ a(oi, {
5062
5062
  slice: e,
@@ -5066,7 +5066,7 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
5066
5066
  })
5067
5067
  }),
5068
5068
  headerHeight: Z.headerHeight,
5069
- body: (v) => v ? /* @__PURE__ */ k(ee, { children: [u?.sliceBodyOverlay ? u.sliceBodyOverlay(e, t) : /* @__PURE__ */ a(ul, {
5069
+ body: (v) => v ? /* @__PURE__ */ x(ee, { children: [c?.sliceBodyOverlay ? c.sliceBodyOverlay(e, t) : /* @__PURE__ */ a(ul, {
5070
5070
  slice: e,
5071
5071
  collapsed: t,
5072
5072
  showDetails: m
@@ -5075,25 +5075,25 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
5075
5075
  contentRows: o,
5076
5076
  rowHeights: s,
5077
5077
  actors: i.actors,
5078
- renderCell: (h) => {
5078
+ renderCell: (p) => {
5079
5079
  const w = {
5080
- conn: h.conn,
5081
- rowHeight: h.rowHeight,
5080
+ conn: p.conn,
5081
+ rowHeight: p.rowHeight,
5082
5082
  collapsed: t
5083
5083
  }, b = {
5084
5084
  ...w,
5085
5085
  showDetails: m
5086
5086
  };
5087
- if (u?.sliceCell) {
5088
- const S = u.sliceCell(e, h);
5087
+ if (c?.sliceCell) {
5088
+ const S = c.sliceCell(e, p);
5089
5089
  if (S !== void 0) return S;
5090
5090
  }
5091
- switch (h.rowType) {
5091
+ switch (p.rowType) {
5092
5092
  case U.UI: {
5093
- const S = e.actors.find((C) => C.id === h.actor?.id);
5093
+ const S = e.actors.find((C) => C.id === p.actor?.id);
5094
5094
  return /* @__PURE__ */ a(Nd, {
5095
5095
  ...w,
5096
- actorId: h.actor?.id ?? "",
5096
+ actorId: p.actor?.id ?? "",
5097
5097
  elements: S?.elements ?? [],
5098
5098
  layout: S?.layout,
5099
5099
  windowSize: S ? {
@@ -5106,7 +5106,7 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
5106
5106
  return /* @__PURE__ */ a(xd, {
5107
5107
  ...w,
5108
5108
  sliceType: e.sliceType,
5109
- isSystemSlice: !!h.actor && (e.sliceType === B.automation || e.sliceType === B.translator),
5109
+ isSystemSlice: !!p.actor && (e.sliceType === B.automation || e.sliceType === B.translator),
5110
5110
  triggerType: e.automationTrigger?.type
5111
5111
  });
5112
5112
  case U.Chat:
@@ -5125,7 +5125,7 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
5125
5125
  ...b,
5126
5126
  slice: e,
5127
5127
  priorEvents: d,
5128
- followingEvents: c
5128
+ followingEvents: u
5129
5129
  });
5130
5130
  }
5131
5131
  }
@@ -5133,16 +5133,16 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
5133
5133
  style: { height: Tr(i, o, s) },
5134
5134
  "aria-hidden": "true"
5135
5135
  }),
5136
- specifications: (v, h) => u?.specifications ? u.specifications(e, v, h, f?.sliceCollapsed ?? e.collapsed) : v && /* @__PURE__ */ a(Ds, {
5136
+ specifications: (v, p) => c?.specifications ? c.specifications(e, v, p, f?.sliceCollapsed ?? e.collapsed) : v && /* @__PURE__ */ a(Ds, {
5137
5137
  sliceId: e.id,
5138
- width: h,
5138
+ width: p,
5139
5139
  collapsed: f?.sliceCollapsed ?? e.collapsed,
5140
5140
  specifications: e.specifications,
5141
5141
  runInfoFor: (w) => ({
5142
5142
  state: Ms(w.lastRunOutcome, !1),
5143
5143
  message: w.lastRunMessage ?? ""
5144
5144
  }),
5145
- renderRows: (w) => /* @__PURE__ */ k(ee, { children: [
5145
+ renderRows: (w) => /* @__PURE__ */ x(ee, { children: [
5146
5146
  /* @__PURE__ */ a(il, {
5147
5147
  sliceId: e.id,
5148
5148
  sliceType: e.sliceType,
@@ -5171,11 +5171,11 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
5171
5171
  ] })
5172
5172
  })
5173
5173
  });
5174
- return u?.sliceBoundary ? u.sliceBoundary(e, g) : g;
5174
+ return c?.sliceBoundary ? c.sliceBoundary(e, g) : g;
5175
5175
  }, Kr = ({ template: e, width: t }) => /* @__PURE__ */ a("div", {
5176
5176
  className: "event-modeling-collection-grid-template",
5177
5177
  style: { width: t },
5178
- children: /* @__PURE__ */ k("div", {
5178
+ children: /* @__PURE__ */ x("div", {
5179
5179
  className: "event-modeling-collection-grid-template__bar",
5180
5180
  children: [/* @__PURE__ */ a("i", {
5181
5181
  className: "pi pi-window-maximize",
@@ -5185,13 +5185,13 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
5185
5185
  children: e.name
5186
5186
  })]
5187
5187
  })
5188
- }), gl = ({ feature: e, options: t, moduleId: n, collection: r, rows: i, heights: o, slices: s, externalEvents: d, slots: c, editor: l, onSliceArea: u, sliceAreas: f, renderHeader: y, onSlicesChanged: p }) => {
5189
- const m = A(null), g = (S) => s.slice(0, s.findIndex((C) => C.id.equals(S))).filter((C) => C.sliceType === B.stateChange).flatMap((C) => C.events), v = (S) => s.slice(s.findIndex((C) => C.id.equals(S)) + 1).filter((C) => C.sliceType === B.stateChange).flatMap((C) => C.events), h = q(async (S, C, O) => {
5188
+ }), gl = ({ feature: e, options: t, moduleId: n, collection: r, rows: i, heights: o, slices: s, externalEvents: d, slots: u, editor: l, onSliceArea: c, sliceAreas: f, renderHeader: y, onSlicesChanged: h }) => {
5189
+ const m = A(null), g = (S) => s.slice(0, s.findIndex((C) => C.id.equals(S))).filter((C) => C.sliceType === B.stateChange).flatMap((C) => C.events), v = (S) => s.slice(s.findIndex((C) => C.id.equals(S)) + 1).filter((C) => C.sliceType === B.stateChange).flatMap((C) => C.events), p = q(async (S, C, L) => {
5190
5190
  const N = f.get(C.toString());
5191
- N?.moveIn(S, O);
5191
+ N?.moveIn(S, L);
5192
5192
  try {
5193
- const L = await l.onMoveSlice?.(S, e.id, C, O) ?? !1;
5194
- return N?.completeMoveIn(S.id, L), L;
5193
+ const O = await l.onMoveSlice?.(S, e.id, C, L) ?? !1;
5194
+ return N?.completeMoveIn(S.id, O), O;
5195
5195
  } catch {
5196
5196
  return N?.completeMoveIn(S.id, !1), !1;
5197
5197
  }
@@ -5200,11 +5200,11 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
5200
5200
  e.id,
5201
5201
  f
5202
5202
  ]), w = q((S, C) => {
5203
- !l.onMoveSlice || C.equals(e.id) || !m.current?.moveOut(S.id) || h(S, C, Number.MAX_SAFE_INTEGER).then((O) => m.current?.completeMoveOut(S.id, O));
5203
+ !l.onMoveSlice || C.equals(e.id) || !m.current?.moveOut(S.id) || p(S, C, Number.MAX_SAFE_INTEGER).then((L) => m.current?.completeMoveOut(S.id, L));
5204
5204
  }, [
5205
5205
  l.onMoveSlice,
5206
5206
  e.id,
5207
- h
5207
+ p
5208
5208
  ]), b = {
5209
5209
  ...t,
5210
5210
  dragging: !1,
@@ -5220,13 +5220,13 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
5220
5220
  width: Oe(e),
5221
5221
  headerVisibility: t.headerVisibility,
5222
5222
  header: y(b),
5223
- screenTemplate: c?.featureTemplate ? c.featureTemplate(e, Oe(e)) : e.screenTemplate && /* @__PURE__ */ a(Kr, {
5223
+ screenTemplate: u?.featureTemplate ? u.featureTemplate(e, Oe(e)) : e.screenTemplate && /* @__PURE__ */ a(Kr, {
5224
5224
  template: e.screenTemplate,
5225
5225
  width: Oe(e)
5226
5226
  }),
5227
5227
  slices: /* @__PURE__ */ a(md, {
5228
5228
  ref: (S) => {
5229
- m.current = S, u(S);
5229
+ m.current = S, c(S);
5230
5230
  },
5231
5231
  initialSlices: e.slices,
5232
5232
  moduleId: n,
@@ -5234,10 +5234,10 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
5234
5234
  featureCollapsed: t.collapsed,
5235
5235
  hideEmptyPlaceholder: t.headerVisibility === "hidden",
5236
5236
  createSlice: (S) => S,
5237
- onSlicesChanged: p,
5237
+ onSlicesChanged: h,
5238
5238
  onAddSlice: l.onAddSlice ? (S, C) => l.onAddSlice?.(e.id, S, C) ?? Promise.resolve(void 0) : void 0,
5239
5239
  onReorderSlices: l.onReorderSlices ? (S) => l.onReorderSlices?.(e.id, S) ?? Promise.resolve(!1) : void 0,
5240
- onMoveSlice: l.onMoveSlice ? h : void 0,
5240
+ onMoveSlice: l.onMoveSlice ? p : void 0,
5241
5241
  validateSliceDrop: l.validateSliceDrop,
5242
5242
  renderSlice: (S, C) => /* @__PURE__ */ a(ml, {
5243
5243
  slice: S,
@@ -5250,7 +5250,7 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
5250
5250
  priorEvents: g(S.id),
5251
5251
  followingEvents: v(S.id),
5252
5252
  externalEvents: d,
5253
- slots: c,
5253
+ slots: u,
5254
5254
  controls: {
5255
5255
  collapsed: C.collapsed,
5256
5256
  sliceCollapsed: C.sliceCollapsed,
@@ -5258,22 +5258,22 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
5258
5258
  onSliceDragStart: C.onSliceDragStart,
5259
5259
  onAddSlice: l.onAddSlice ? C.addSlice : void 0,
5260
5260
  onToggleCollapse: l.onSliceCollapseChanged ? () => {
5261
- m.current?.updateSlices((O) => O.map((N) => N.id.equals(S.id) ? {
5261
+ m.current?.updateSlices((L) => L.map((N) => N.id.equals(S.id) ? {
5262
5262
  ...N,
5263
5263
  collapsed: !C.sliceCollapsed
5264
5264
  } : N)), l.onSliceCollapseChanged?.(e.id, S.id, !C.sliceCollapsed);
5265
5265
  } : void 0,
5266
- onRenamed: l.onSliceRenamed ? (O) => {
5267
- m.current?.updateSlices((N) => N.map((L) => L.id.equals(S.id) ? {
5268
- ...L,
5269
- name: O
5270
- } : L)), l.onSliceRenamed?.(e.id, S.id, O);
5266
+ onRenamed: l.onSliceRenamed ? (L) => {
5267
+ m.current?.updateSlices((N) => N.map((O) => O.id.equals(S.id) ? {
5268
+ ...O,
5269
+ name: L
5270
+ } : O)), l.onSliceRenamed?.(e.id, S.id, L);
5271
5271
  } : void 0,
5272
- onMoveToFeature: l.onMoveSlice ? (O) => w(S, O) : void 0,
5273
- onDuplicated: l.onSliceDuplicated ? (O) => {
5274
- l.onSliceDuplicated?.(e.id, S.id, O), m.current?.addProjectedSlice({
5272
+ onMoveToFeature: l.onMoveSlice ? (L) => w(S, L) : void 0,
5273
+ onDuplicated: l.onSliceDuplicated ? (L) => {
5274
+ l.onSliceDuplicated?.(e.id, S.id, L), m.current?.addProjectedSlice({
5275
5275
  ...S,
5276
- id: O,
5276
+ id: L,
5277
5277
  name: ud(e.slices.map((N) => N.name), S.name),
5278
5278
  specifications: [],
5279
5279
  commentCount: 0,
@@ -5284,17 +5284,17 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
5284
5284
  })
5285
5285
  })
5286
5286
  });
5287
- }, vl = ({ ref: e, moduleId: t, collection: n, features: r, rows: i, heights: o, slots: s, editor: d, onFeaturesChanged: c }) => {
5288
- const l = A(/* @__PURE__ */ new Map()), u = A(null);
5287
+ }, vl = ({ ref: e, moduleId: t, collection: n, features: r, rows: i, heights: o, slots: s, editor: d, onFeaturesChanged: u }) => {
5288
+ const l = A(/* @__PURE__ */ new Map()), c = A(null);
5289
5289
  tt(e, () => ({
5290
- addFeature: (g) => u.current?.addFeature(g) ?? Promise.resolve(),
5291
- addSubFeature: (g, v) => u.current?.addSubFeature(g, v) ?? Promise.resolve(),
5292
- updateFeature: (g, v) => u.current?.updateFeature(g, v)
5290
+ addFeature: (g) => c.current?.addFeature(g) ?? Promise.resolve(),
5291
+ addSubFeature: (g, v) => c.current?.addSubFeature(g, v) ?? Promise.resolve(),
5292
+ updateFeature: (g, v) => c.current?.updateFeature(g, v)
5293
5293
  }), []);
5294
5294
  const f = Ze(n).map((g) => g.slice), y = Ze({
5295
5295
  ...n,
5296
5296
  modules: n.modules.filter((g) => !g.id.equals(t))
5297
- }).flatMap((g) => g.slice.events), p = (g) => d.onAddSlice ? (v, h) => l.current.get(g.toString())?.addSlice(v, void 0, h) : void 0, m = (g, v) => s?.featureHeader?.(g, v) ?? /* @__PURE__ */ a(xs, {
5297
+ }).flatMap((g) => g.slice.events), h = (g) => d.onAddSlice ? (v, p) => l.current.get(g.toString())?.addSlice(v, void 0, p) : void 0, m = (g, v) => s?.featureHeader?.(g, v) ?? /* @__PURE__ */ a(xs, {
5298
5298
  featureId: g.id,
5299
5299
  name: g.name,
5300
5300
  height: Z.headerHeight,
@@ -5302,18 +5302,18 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
5302
5302
  dragging: v.dragging,
5303
5303
  onDragStart: v.onDragStart,
5304
5304
  onToggleCollapse: v.onToggleCollapse,
5305
- onRenamed: v.onRenamed ? (h, w) => v.onRenamed?.(w) : void 0,
5305
+ onRenamed: v.onRenamed ? (p, w) => v.onRenamed?.(w) : void 0,
5306
5306
  onAddSubFeature: v.onAddSubFeature ? () => v.onAddSubFeature?.() : void 0,
5307
5307
  onAddSlice: v.onAddSlice
5308
5308
  });
5309
5309
  return /* @__PURE__ */ a(gs, {
5310
- ref: u,
5310
+ ref: c,
5311
5311
  initialFeatures: r,
5312
5312
  moduleId: t,
5313
5313
  widthOf: Oe,
5314
5314
  isCollapsed: (g) => g.collapsed,
5315
5315
  occupiesColumn: (g) => Oe(g) > 0,
5316
- onFeaturesChanged: c,
5316
+ onFeaturesChanged: u,
5317
5317
  renderFeatureBoundary: s?.featureBoundary,
5318
5318
  onAddFeature: d.onAddFeature ? (g, v) => d.onAddFeature?.(t, g, v) ?? Promise.resolve(void 0) : void 0,
5319
5319
  onRenameFeature: d.onRenameFeature,
@@ -5321,9 +5321,9 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
5321
5321
  onFeaturesReordered: d.onFeaturesReordered ? (g) => d.onFeaturesReordered?.(t, g) : void 0,
5322
5322
  renderHeader: (g, v) => m(g, {
5323
5323
  ...v,
5324
- onDragStart: v.onDragStart ? (h) => v.onDragStart?.(g.id, g.name, h) : void 0,
5324
+ onDragStart: v.onDragStart ? (p) => v.onDragStart?.(g.id, g.name, p) : void 0,
5325
5325
  onAddSubFeature: v.addSubFeature,
5326
- onAddSlice: p(g.id)
5326
+ onAddSlice: h(g.id)
5327
5327
  }),
5328
5328
  renderColumn: (g, v) => /* @__PURE__ */ a(gl, {
5329
5329
  feature: g,
@@ -5337,33 +5337,33 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
5337
5337
  slots: s,
5338
5338
  editor: d,
5339
5339
  sliceAreas: l.current,
5340
- onSlicesChanged: (h) => u.current?.updateFeature(g.id, (w) => ({
5340
+ onSlicesChanged: (p) => c.current?.updateFeature(g.id, (w) => ({
5341
5341
  ...w,
5342
- slices: h
5342
+ slices: p
5343
5343
  })),
5344
- onSliceArea: (h) => {
5345
- h ? l.current.set(g.id.toString(), h) : l.current.delete(g.id.toString());
5344
+ onSliceArea: (p) => {
5345
+ p ? l.current.set(g.id.toString(), p) : l.current.delete(g.id.toString());
5346
5346
  },
5347
- renderHeader: (h) => m(g, {
5348
- ...h,
5349
- onAddSlice: p(g.id)
5347
+ renderHeader: (p) => m(g, {
5348
+ ...p,
5349
+ onAddSlice: h(g.id)
5350
5350
  })
5351
5351
  })
5352
5352
  });
5353
- }, hl = ({ module: e, liveFeatures: t, index: n, collection: r, rows: i, heights: o, slots: s, editor: d, dragging: c, onDragStart: l, onAddModule: u, onToggleCollapse: f, onRenamed: y, onFeaturesChanged: p }) => {
5353
+ }, hl = ({ module: e, liveFeatures: t, index: n, collection: r, rows: i, heights: o, slots: s, editor: d, dragging: u, onDragStart: l, onAddModule: c, onToggleCollapse: f, onRenamed: y, onFeaturesChanged: h }) => {
5354
5354
  const m = A(null), g = A(null), v = d.onAddFeature ? (S) => {
5355
5355
  g.current?.addFeature(S);
5356
- } : void 0, h = Zt(m, void 0, "heavy"), w = Dr(e.name, t ?? e.features), b = /* @__PURE__ */ a(qa, {
5356
+ } : void 0, p = Zt(m, void 0, "heavy"), w = Dr(e.name, t ?? e.features), b = /* @__PURE__ */ a(qa, {
5357
5357
  moduleId: e.id,
5358
5358
  collectionId: r.id,
5359
5359
  index: n,
5360
5360
  width: w,
5361
5361
  collapsed: e.collapsed,
5362
- dragging: c,
5362
+ dragging: u,
5363
5363
  frameRef: m,
5364
5364
  header: s?.moduleHeader?.(e, {
5365
5365
  onDragStart: l,
5366
- onAddModule: u,
5366
+ onAddModule: c,
5367
5367
  onAddFeature: v,
5368
5368
  onToggleCollapse: f,
5369
5369
  onRenamed: y
@@ -5372,7 +5372,7 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
5372
5372
  name: e.name,
5373
5373
  height: Z.headerHeight,
5374
5374
  collapsed: e.collapsed,
5375
- onAddModule: u,
5375
+ onAddModule: c,
5376
5376
  onToggleCollapse: f,
5377
5377
  onRenamed: y ? (S, C) => y(C) : void 0,
5378
5378
  onDragStart: l,
@@ -5382,7 +5382,7 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
5382
5382
  template: e.screenTemplate,
5383
5383
  width: w
5384
5384
  }),
5385
- content: h ? /* @__PURE__ */ a(vl, {
5385
+ content: p ? /* @__PURE__ */ a(vl, {
5386
5386
  ref: g,
5387
5387
  moduleId: e.id,
5388
5388
  collection: r,
@@ -5391,7 +5391,7 @@ var zs = 250, Vs = "Inter, Helvetica, Arial, sans-serif", Ue = ({ name: e, backg
5391
5391
  heights: o,
5392
5392
  slots: s,
5393
5393
  editor: d,
5394
- onFeaturesChanged: (S) => p?.(e.id, S)
5394
+ onFeaturesChanged: (S) => h?.(e.id, S)
5395
5395
  }) : /* @__PURE__ */ a(Va, {
5396
5396
  width: w,
5397
5397
  height: Tr(r, i, o),
@@ -5415,23 +5415,23 @@ function fl(e, t) {
5415
5415
  features: n.features.map((r) => Qr(t, r))
5416
5416
  }));
5417
5417
  }
5418
- var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect: r, onCollectionMoving: i, onCollectionMoved: o, canMove: s, onAddModule: d, onModulesReordered: c, onCollapseChanged: l, onRenameModule: u, onModulesChanged: f, onFeaturesChanged: y, onPersistenceError: p, rowLabels: m, onActorsReordered: g, onAddFeature: v, onRenameFeature: h, onFeatureCollapseChanged: w, onFeaturesReordered: b, onAddSlice: S, onReorderSlices: C, onMoveSlice: O, validateSliceDrop: N, onSliceCollapseChanged: L, onSliceRenamed: j, onSliceDuplicated: H }) => {
5419
- const { readOnly: x, editing: T } = K(), [W, X] = F(/* @__PURE__ */ new Map()), D = q((ie, ce) => X((be) => new Map(be).set(ie.toString(), ce)), []), z = oe(() => fl(e.modules, W), [e.modules, W]), I = x ? {
5418
+ var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect: r, onCollectionMoving: i, onCollectionMoved: o, canMove: s, onAddModule: d, onModulesReordered: u, onCollapseChanged: l, onRenameModule: c, onModulesChanged: f, onFeaturesChanged: y, onPersistenceError: h, rowLabels: m, onActorsReordered: g, onAddFeature: v, onRenameFeature: p, onFeatureCollapseChanged: w, onFeaturesReordered: b, onAddSlice: S, onReorderSlices: C, onMoveSlice: L, validateSliceDrop: N, onSliceCollapseChanged: O, onSliceRenamed: j, onSliceDuplicated: H }) => {
5419
+ const { readOnly: M, editing: T } = K(), [W, X] = F(/* @__PURE__ */ new Map()), D = q((ie, ce) => X((be) => new Map(be).set(ie.toString(), ce)), []), z = oe(() => fl(e.modules, W), [e.modules, W]), I = M ? {
5420
5420
  onFeatureCollapseChanged: D,
5421
5421
  onSliceCollapseChanged: (ie, ce, be) => D(ce, be)
5422
5422
  } : {
5423
5423
  onAddFeature: v,
5424
- onRenameFeature: h,
5424
+ onRenameFeature: p,
5425
5425
  onFeatureCollapseChanged: w,
5426
5426
  onFeaturesReordered: b,
5427
5427
  onAddSlice: S,
5428
5428
  onReorderSlices: C,
5429
- onMoveSlice: O,
5429
+ onMoveSlice: L,
5430
5430
  validateSliceDrop: N,
5431
- onSliceCollapseChanged: L,
5431
+ onSliceCollapseChanged: O,
5432
5432
  onSliceRenamed: j,
5433
5433
  onSliceDuplicated: H
5434
- }, [M, E] = F(e.modules), [$, Y] = F(/* @__PURE__ */ new Map()), Q = A(null), [P, V] = F(0), te = !!(d || c || l || u || g || v || h || w || b || S || C || O || L || j || H || s && i && o || pl(T)), R = x || !te, G = x ? z : e.modules, _ = (R ? G : M).map((ie) => ({
5434
+ }, [k, E] = F(e.modules), [$, Y] = F(/* @__PURE__ */ new Map()), Q = A(null), [P, V] = F(0), te = !!(d || u || l || c || g || v || p || w || b || S || C || L || O || j || H || s && i && o || pl(T)), R = M || !te, G = M ? z : e.modules, _ = (R ? G : k).map((ie) => ({
5435
5435
  ...ie,
5436
5436
  features: R ? ie.features : $.get(ie.id.toString()) ?? ie.features
5437
5437
  })), J = {
@@ -5464,7 +5464,7 @@ var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect:
5464
5464
  const je = ie.querySelector(".event-modeling-grid-slices-area");
5465
5465
  return je && be.observe(je), () => be.disconnect();
5466
5466
  }, [
5467
- M,
5467
+ k,
5468
5468
  $,
5469
5469
  t
5470
5470
  ]);
@@ -5474,11 +5474,11 @@ var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect:
5474
5474
  contentRows: ae,
5475
5475
  rowHeights: Ye,
5476
5476
  actors: e.actors,
5477
- onActorsReordered: x ? void 0 : g
5477
+ onActorsReordered: M ? void 0 : g
5478
5478
  };
5479
5479
  return /* @__PURE__ */ a(Xt.Provider, {
5480
- value: x || !te,
5481
- children: /* @__PURE__ */ k("div", {
5480
+ value: M || !te,
5481
+ children: /* @__PURE__ */ x("div", {
5482
5482
  className: "event-modeling-grid-container event-modeling-collection-grid",
5483
5483
  onClick: r,
5484
5484
  children: [s && i && o && /* @__PURE__ */ a(go, {
@@ -5487,7 +5487,7 @@ var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect:
5487
5487
  getZoom: t,
5488
5488
  onCollectionMoving: i,
5489
5489
  onCollectionMoved: o
5490
- }), /* @__PURE__ */ k("div", {
5490
+ }), /* @__PURE__ */ x("div", {
5491
5491
  className: "event-modeling-grid-content-row",
5492
5492
  ref: Q,
5493
5493
  children: [di && (m ? m(fn) : /* @__PURE__ */ a(ma, { ...fn })), /* @__PURE__ */ a("div", {
@@ -5498,10 +5498,10 @@ var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect:
5498
5498
  collectionId: e.id,
5499
5499
  initialModules: G,
5500
5500
  onAddModule: d,
5501
- onModulesReordered: c,
5502
- onCollapseChanged: x ? (ie, ce) => (D(ie, ce), Promise.resolve(!0)) : l,
5503
- onRenameModule: u,
5504
- onPersistenceError: p,
5501
+ onModulesReordered: u,
5502
+ onCollapseChanged: M ? (ie, ce) => (D(ie, ce), Promise.resolve(!0)) : l,
5503
+ onRenameModule: c,
5504
+ onPersistenceError: h,
5505
5505
  onModulesChanged: (ie) => {
5506
5506
  E(ie), f?.(ie);
5507
5507
  },
@@ -5546,7 +5546,7 @@ var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect:
5546
5546
  role: "img",
5547
5547
  "aria-label": t,
5548
5548
  xmlns: "http://www.w3.org/2000/svg",
5549
- children: /* @__PURE__ */ k("g", {
5549
+ children: /* @__PURE__ */ x("g", {
5550
5550
  transform: "translate(0,328) scale(0.1,-0.1)",
5551
5551
  children: [
5552
5552
  /* @__PURE__ */ a("path", { d: "M974 2789 c-319 -182 -592 -343 -607 -358 -16 -14 -34 -35 -40 -46 -8 -14 -10 -229 -9 -735 l3 -715 23 -35 c18 -26 74 -64 222 -151 110 -64 374 -219 589 -344 214 -126 400 -231 413 -233 13 -3 31 3 42 13 19 17 20 33 20 307 0 233 -3 294 -15 317 -10 21 -93 74 -327 211 -172 101 -324 194 -338 207 l-25 23 0 401 0 401 27 23 c14 12 161 100 327 194 177 101 310 184 325 202 l26 31 0 293 c0 318 -1 325 -55 325 -12 0 -283 -149 -601 -331z" }),
@@ -5645,25 +5645,29 @@ var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect:
5645
5645
  items: r,
5646
5646
  align: "right"
5647
5647
  });
5648
- }, ei = ({ showLogo: e, showViewOptions: t, toolbar: n, children: r }) => {
5649
- const i = fe(), o = ro(), [s, d] = F(i), c = o ? i : s, l = o ?? d;
5648
+ }, ei = ({ showLogo: e, showViewOptions: t, toolbar: n, chrome: r, children: i }) => {
5649
+ const o = fe(), s = ro(), [d, u] = F(o), l = s ? o : d, c = s ?? u, f = t || n !== void 0, y = r?.controlsSurface, h = r?.captureAttributes?.content;
5650
5650
  return /* @__PURE__ */ a(io, {
5651
- presentation: c,
5652
- onChange: l,
5653
- children: /* @__PURE__ */ k("div", {
5651
+ presentation: l,
5652
+ onChange: c,
5653
+ children: /* @__PURE__ */ x("div", {
5654
5654
  className: "event-model-board",
5655
5655
  children: [
5656
- r,
5656
+ i,
5657
5657
  e && /* @__PURE__ */ a(wl, { className: "event-model-board__logo" }),
5658
- (t || n !== void 0) && /* @__PURE__ */ a("div", {
5658
+ f && /* @__PURE__ */ a("div", {
5659
5659
  className: "event-model-board__toolbar",
5660
- onPointerDown: (u) => u.stopPropagation(),
5661
- children: /* @__PURE__ */ k(hi, {
5662
- orientation: "horizontal",
5663
- "aria-label": "Board",
5664
- children: [n, t && /* @__PURE__ */ a(Sl, {
5665
- presentation: c,
5666
- onChange: l
5660
+ onPointerDown: (m) => m.stopPropagation(),
5661
+ children: /* @__PURE__ */ x("div", {
5662
+ className: `event-model-board__toolbar-surface${y ? "" : " event-model-board__toolbar-surface--plain"}`,
5663
+ ...y && h ? { [h]: "true" } : {},
5664
+ children: [y, /* @__PURE__ */ x(hi, {
5665
+ orientation: "horizontal",
5666
+ "aria-label": "Board",
5667
+ children: [n, t && /* @__PURE__ */ a(Sl, {
5668
+ presentation: l,
5669
+ onChange: c
5670
+ })]
5667
5671
  })]
5668
5672
  })
5669
5673
  })
@@ -5734,15 +5738,15 @@ var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect:
5734
5738
  center: Xo(o.start, o.end)
5735
5739
  }];
5736
5740
  }), Nl = 2e3, Il = ({ links: e, collections: t, getZoom: n, onCollectionsLinked: r, onCollectionsUnlinked: i, onPersistenceError: o }) => {
5737
- const s = K(), d = s.messages.links, c = s.readOnly ? void 0 : r, l = s.readOnly ? void 0 : i, [u, f] = F(null), [y, p] = F(() => Cl(e)), m = A(y), g = (I) => {
5738
- const M = I(m.current);
5739
- m.current = M, p(M);
5741
+ const s = K(), d = s.messages.links, u = s.readOnly ? void 0 : r, l = s.readOnly ? void 0 : i, [c, f] = F(null), [y, h] = F(() => Cl(e)), m = A(y), g = (I) => {
5742
+ const k = I(m.current);
5743
+ m.current = k, h(k);
5740
5744
  };
5741
5745
  re(() => {
5742
5746
  e !== m.current.snapshot && g((I) => mn(I, e));
5743
5747
  }, [e]);
5744
- const v = wt(y), h = A(null), w = A(null), b = `module-collection-link-arrow-${Gt().replace(/:/g, "")}`, S = oe(() => new Map(t.map((I) => {
5745
- const M = {
5748
+ const v = wt(y), p = A(null), w = A(null), b = `module-collection-link-arrow-${Gt().replace(/:/g, "")}`, S = oe(() => new Map(t.map((I) => {
5749
+ const k = {
5746
5750
  x: I.position.x,
5747
5751
  y: I.position.y,
5748
5752
  width: I.width,
@@ -5750,83 +5754,83 @@ var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect:
5750
5754
  };
5751
5755
  return [I.id.toString(), {
5752
5756
  id: I.id,
5753
- rect: M,
5757
+ rect: k,
5754
5758
  content: {
5755
- ...M,
5756
- height: Math.min(M.height, I.contentHeight)
5759
+ ...k,
5760
+ height: Math.min(k.height, I.contentHeight)
5757
5761
  }
5758
5762
  }];
5759
- })), [t]), C = oe(() => kl(v, (I) => S.get(I)?.content), [v, S]), O = (I, M) => {
5763
+ })), [t]), C = oe(() => kl(v, (I) => S.get(I)?.content), [v, S]), L = (I, k) => {
5760
5764
  for (const E of S.values())
5761
- if (E.id.toString() !== M.toString() && Jo(I, E.rect))
5765
+ if (E.id.toString() !== k.toString() && Jo(I, E.rect))
5762
5766
  return E;
5763
5767
  return null;
5764
- }, N = (I, M) => {
5768
+ }, N = (I, k) => {
5765
5769
  const E = n() || 1;
5766
5770
  return {
5767
- x: M.anchor.x + (I.clientX - M.startClientX) / E,
5768
- y: M.anchor.y + (I.clientY - M.startClientY) / E
5771
+ x: k.anchor.x + (I.clientX - k.startClientX) / E,
5772
+ y: k.anchor.y + (I.clientY - k.startClientY) / E
5769
5773
  };
5770
- }, L = (I, M) => (E) => {
5771
- m.current.pending.size > 0 || (E.stopPropagation(), E.preventDefault(), E.currentTarget.setPointerCapture(E.pointerId), h.current = {
5774
+ }, O = (I, k) => (E) => {
5775
+ m.current.pending.size > 0 || (E.stopPropagation(), E.preventDefault(), E.currentTarget.setPointerCapture(E.pointerId), p.current = {
5772
5776
  sourceId: I,
5773
- anchor: M,
5777
+ anchor: k,
5774
5778
  startClientX: E.clientX,
5775
5779
  startClientY: E.clientY
5776
5780
  }, w.current = null, f({
5777
5781
  sourceId: I.toString(),
5778
- pointer: M,
5782
+ pointer: k,
5779
5783
  targetId: null
5780
5784
  }));
5781
5785
  }, j = (I) => {
5782
- const M = h.current;
5783
- if (!M) return;
5784
- const E = N(I, M), $ = O(E, M.sourceId);
5786
+ const k = p.current;
5787
+ if (!k) return;
5788
+ const E = N(I, k), $ = L(E, k.sourceId);
5785
5789
  w.current = $?.id.toString() ?? null, f({
5786
- sourceId: M.sourceId.toString(),
5790
+ sourceId: k.sourceId.toString(),
5787
5791
  pointer: E,
5788
5792
  targetId: $?.id.toString() ?? null
5789
5793
  });
5790
5794
  }, H = async (I) => {
5791
- const M = h.current, E = w.current;
5792
- if (h.current = null, w.current = null, f(null), !M) return;
5793
- const $ = O(N(I, M), M.sourceId), Y = Zo($, E, (V) => S.get(V), M.sourceId.toString());
5794
- if (!Y || !c || m.current.pending.size > 0) return;
5795
+ const k = p.current, E = w.current;
5796
+ if (p.current = null, w.current = null, f(null), !k) return;
5797
+ const $ = L(N(I, k), k.sourceId), Y = Zo($, E, (V) => S.get(V), k.sourceId.toString());
5798
+ if (!Y || !u || m.current.pending.size > 0) return;
5795
5799
  const Q = {
5796
5800
  id: de.create(),
5797
- sourceCollectionId: M.sourceId,
5801
+ sourceCollectionId: k.sourceId,
5798
5802
  targetCollectionId: Y.id
5799
- }, P = Ce(M.sourceId, Y.id);
5803
+ }, P = Ce(k.sourceId, Y.id);
5800
5804
  if (!(m.current.pending.has(P) || wt(m.current).some((V) => Ce(V.sourceCollectionId, V.targetCollectionId) === P))) {
5801
5805
  g((V) => xl(V, Q));
5802
5806
  try {
5803
- const V = await c(M.sourceId, Y.id);
5807
+ const V = await u(k.sourceId, Y.id);
5804
5808
  g((te) => Wn(te, Q, V));
5805
5809
  } catch (V) {
5806
5810
  if (g((te) => Wn(te, Q)), o) o(V);
5807
5811
  else throw V;
5808
5812
  }
5809
5813
  }
5810
- }, x = async (I) => {
5814
+ }, M = async (I) => {
5811
5815
  if (!(!l || m.current.pending.size > 0)) {
5812
- g((M) => Ml(M, I));
5816
+ g((k) => Ml(k, I));
5813
5817
  try {
5814
- const M = await l(I);
5815
- g((E) => zn(E, I, M));
5816
- } catch (M) {
5817
- if (g((E) => zn(E, I, !1)), o) o(M);
5818
- else throw M;
5818
+ const k = await l(I);
5819
+ g((E) => zn(E, I, k));
5820
+ } catch (k) {
5821
+ if (g((E) => zn(E, I, !1)), o) o(k);
5822
+ else throw k;
5819
5823
  }
5820
5824
  }
5821
5825
  }, T = () => {
5822
- h.current = null, w.current = null, f(null);
5826
+ p.current = null, w.current = null, f(null);
5823
5827
  }, W = Array.from(S.values());
5824
5828
  if (W.length === 0) return null;
5825
- const X = Ko(W.map((I) => I.rect), u ? [u.pointer] : [], Nl), D = u ? S.get(u.sourceId) : void 0, z = u?.targetId ? S.get(u.targetId) : void 0;
5826
- return /* @__PURE__ */ k("div", {
5829
+ const X = Ko(W.map((I) => I.rect), c ? [c.pointer] : [], Nl), D = c ? S.get(c.sourceId) : void 0, z = c?.targetId ? S.get(c.targetId) : void 0;
5830
+ return /* @__PURE__ */ x("div", {
5827
5831
  className: "module-collection-link-layer",
5828
5832
  children: [
5829
- /* @__PURE__ */ k("svg", {
5833
+ /* @__PURE__ */ x("svg", {
5830
5834
  className: "module-collection-link-layer__svg",
5831
5835
  style: {
5832
5836
  left: X.x,
@@ -5850,13 +5854,13 @@ var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect:
5850
5854
  className: "module-collection-link-layer__arrow-head"
5851
5855
  })
5852
5856
  }) }),
5853
- C.map(({ link: I, path: M }) => /* @__PURE__ */ a("path", {
5854
- d: M,
5857
+ C.map(({ link: I, path: k }) => /* @__PURE__ */ a("path", {
5858
+ d: k,
5855
5859
  className: "module-collection-link-layer__arrow",
5856
5860
  markerEnd: `url(#${b})`
5857
5861
  }, I.id.toString())),
5858
- u && D && (() => {
5859
- const I = br(D.content, Yo(u.pointer));
5862
+ c && D && (() => {
5863
+ const I = br(D.content, Yo(c.pointer));
5860
5864
  return /* @__PURE__ */ a("path", {
5861
5865
  d: Kt(I.start, I.end, I.axis),
5862
5866
  className: "module-collection-link-layer__preview",
@@ -5874,8 +5878,8 @@ var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect:
5874
5878
  height: z.rect.height
5875
5879
  }
5876
5880
  }),
5877
- c && y.pending.size === 0 && W.map(({ id: I, content: M }) => {
5878
- const E = jo(M);
5881
+ u && y.pending.size === 0 && W.map(({ id: I, content: k }) => {
5882
+ const E = jo(k);
5879
5883
  return /* @__PURE__ */ a("div", {
5880
5884
  className: "module-collection-link-layer__handle",
5881
5885
  style: {
@@ -5883,23 +5887,23 @@ var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect:
5883
5887
  top: E.y
5884
5888
  },
5885
5889
  title: d.dragToLink,
5886
- onPointerDown: L(I, E),
5890
+ onPointerDown: O(I, E),
5887
5891
  onPointerMove: j,
5888
5892
  onPointerUp: H,
5889
5893
  onPointerCancel: T
5890
5894
  }, I.toString());
5891
5895
  }),
5892
- l && y.pending.size === 0 && C.map(({ link: I, center: M }) => /* @__PURE__ */ a("button", {
5896
+ l && y.pending.size === 0 && C.map(({ link: I, center: k }) => /* @__PURE__ */ a("button", {
5893
5897
  type: "button",
5894
5898
  className: "module-collection-link-layer__delete",
5895
5899
  style: {
5896
- left: M.x,
5897
- top: M.y
5900
+ left: k.x,
5901
+ top: k.y
5898
5902
  },
5899
5903
  title: d.removeLink,
5900
5904
  onPointerDown: (E) => E.stopPropagation(),
5901
5905
  onClick: () => {
5902
- x(I.id);
5906
+ M(I.id);
5903
5907
  },
5904
5908
  children: /* @__PURE__ */ a("i", { className: "pi pi-times" })
5905
5909
  }, I.id.toString()))
@@ -5963,35 +5967,35 @@ var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect:
5963
5967
  }
5964
5968
  }, dt = 50, ct = () => {
5965
5969
  }, Al = (e) => e.stopPropagation(), ti = ui(({ notes: e }, t) => {
5966
- const { editing: n, actions: r, messages: i } = K(), o = A(new Rl(e)), s = A(/* @__PURE__ */ new Set()), d = A(!1), c = A(/* @__PURE__ */ new Set()), l = A(/* @__PURE__ */ new Set()), [u, f] = F(0), [y, p] = F(), [m, g] = F(), v = A(null), h = oe(() => [v], []), w = q(() => f((x) => x + 1), []);
5970
+ const { editing: n, actions: r, messages: i } = K(), o = A(new Rl(e)), s = A(/* @__PURE__ */ new Set()), d = A(!1), u = A(/* @__PURE__ */ new Set()), l = A(/* @__PURE__ */ new Set()), [c, f] = F(0), [y, h] = F(), [m, g] = F(), v = A(null), p = oe(() => [v], []), w = q(() => f((M) => M + 1), []);
5967
5971
  re(() => {
5968
5972
  o.current.reconcile(e), w();
5969
5973
  }, [e, w]), re(() => {
5970
- const x = o.current.nextExpiration;
5971
- if (x === void 0) return;
5974
+ const M = o.current.nextExpiration;
5975
+ if (M === void 0) return;
5972
5976
  const T = setTimeout(() => {
5973
5977
  o.current.expire(), w();
5974
- }, Math.max(0, x - Date.now()));
5978
+ }, Math.max(0, M - Date.now()));
5975
5979
  return () => clearTimeout(T);
5976
- }, [u, w]);
5977
- const b = q((x, T, W) => s.current.has(x) ? Promise.resolve() : (s.current.add(x), o.current.change(x, T), o.current.begin(x, T), w(), Promise.resolve().then(W).then((X) => (X === !1 && (o.current.rollback(x, T), o.current.get(x) || p((D) => D === x ? void 0 : D), w()), X !== !1)).catch((X) => (o.current.rollback(x, T), o.current.get(x) || p((D) => D === x ? void 0 : D), w(), r.stickyNoteError ? r.stickyNoteError(X) : console.error(X), !1)).finally(() => {
5978
- o.current.settle(x, T), s.current.delete(x), w();
5980
+ }, [c, w]);
5981
+ const b = q((M, T, W) => s.current.has(M) ? Promise.resolve() : (s.current.add(M), o.current.change(M, T), o.current.begin(M, T), w(), Promise.resolve().then(W).then((X) => (X === !1 && (o.current.rollback(M, T), o.current.get(M) || h((D) => D === M ? void 0 : D), w()), X !== !1)).catch((X) => (o.current.rollback(M, T), o.current.get(M) || h((D) => D === M ? void 0 : D), w(), r.stickyNoteError ? r.stickyNoteError(X) : console.error(X), !1)).finally(() => {
5982
+ o.current.settle(M, T), s.current.delete(M), w();
5979
5983
  })), [r, w]);
5980
- tt(t, () => ({ add(x) {
5984
+ tt(t, () => ({ add(M) {
5981
5985
  const T = n.onStickyNoteAdded;
5982
5986
  if (!T || d.current) return;
5983
5987
  d.current = !0, r.stickyNoteCreatingChanged?.(!0);
5984
5988
  const W = {
5985
5989
  id: de.create().toString(),
5986
5990
  position: {
5987
- x: x.x - dt / 2,
5988
- y: x.y - dt / 2
5991
+ x: M.x - dt / 2,
5992
+ y: M.y - dt / 2
5989
5993
  },
5990
5994
  width: dt,
5991
5995
  height: dt,
5992
5996
  text: i.stickyNotes.newNote
5993
5997
  };
5994
- p(W.id), b(W.id, W, () => T(W)).then((X) => {
5998
+ h(W.id), b(W.id, W, () => T(W)).then((X) => {
5995
5999
  X && r.stickyNoteCreated?.(W);
5996
6000
  }).finally(() => {
5997
6001
  d.current = !1, r.stickyNoteCreatingChanged?.(!1);
@@ -6002,47 +6006,47 @@ var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect:
6002
6006
  i,
6003
6007
  b
6004
6008
  ]);
6005
- const S = n.onStickyNoteMoved || n.onStickyNoteResized || n.onStickyNoteTextChanged || n.onStickyNoteRemoved ? p : void 0;
6006
- ze(h, () => S?.(void 0), y !== void 0 && !!S);
6007
- const C = (x, T) => {
6008
- const W = o.current.get(x);
6009
- !W || s.current.has(x) || W.position.x === T.x && W.position.y === T.y || (c.current.add(x), o.current.change(x, {
6009
+ const S = n.onStickyNoteMoved || n.onStickyNoteResized || n.onStickyNoteTextChanged || n.onStickyNoteRemoved ? h : void 0;
6010
+ ze(p, () => S?.(void 0), y !== void 0 && !!S);
6011
+ const C = (M, T) => {
6012
+ const W = o.current.get(M);
6013
+ !W || s.current.has(M) || W.position.x === T.x && W.position.y === T.y || (u.current.add(M), o.current.change(M, {
6010
6014
  ...W,
6011
6015
  position: T
6012
6016
  }), w());
6013
- }, O = (x, T) => {
6014
- const W = o.current.get(x);
6015
- !W || s.current.has(x) || W.position.x === T.position.x && W.position.y === T.position.y && W.width === T.width && W.height === T.height || (l.current.add(x), o.current.change(x, {
6017
+ }, L = (M, T) => {
6018
+ const W = o.current.get(M);
6019
+ !W || s.current.has(M) || W.position.x === T.position.x && W.position.y === T.position.y && W.width === T.width && W.height === T.height || (l.current.add(M), o.current.change(M, {
6016
6020
  ...W,
6017
6021
  ...T
6018
6022
  }), w());
6019
- }, N = (x) => {
6020
- if (!c.current.delete(x)) return;
6021
- const T = o.current.get(x);
6022
- T && n.onStickyNoteMoved && b(x, T, () => n.onStickyNoteMoved?.(x, T.position));
6023
- }, L = (x) => {
6024
- if (!l.current.delete(x)) return;
6025
- const T = o.current.get(x);
6026
- T && n.onStickyNoteResized && b(x, T, () => n.onStickyNoteResized?.(x, {
6023
+ }, N = (M) => {
6024
+ if (!u.current.delete(M)) return;
6025
+ const T = o.current.get(M);
6026
+ T && n.onStickyNoteMoved && b(M, T, () => n.onStickyNoteMoved?.(M, T.position));
6027
+ }, O = (M) => {
6028
+ if (!l.current.delete(M)) return;
6029
+ const T = o.current.get(M);
6030
+ T && n.onStickyNoteResized && b(M, T, () => n.onStickyNoteResized?.(M, {
6027
6031
  position: T.position,
6028
6032
  width: T.width,
6029
6033
  height: T.height
6030
6034
  }));
6031
- }, j = (x, T) => {
6032
- const W = o.current.get(x);
6033
- W && W.text !== T && n.onStickyNoteTextChanged && b(x, {
6035
+ }, j = (M, T) => {
6036
+ const W = o.current.get(M);
6037
+ W && W.text !== T && n.onStickyNoteTextChanged && b(M, {
6034
6038
  ...W,
6035
6039
  text: T
6036
- }, () => n.onStickyNoteTextChanged?.(x, T));
6037
- }, H = q((x) => {
6038
- !o.current.get(x) || !n.onStickyNoteRemoved || s.current.has(x) || (p((T) => T === x ? void 0 : T), b(x, null, () => n.onStickyNoteRemoved?.(x)));
6040
+ }, () => n.onStickyNoteTextChanged?.(M, T));
6041
+ }, H = q((M) => {
6042
+ !o.current.get(M) || !n.onStickyNoteRemoved || s.current.has(M) || (h((T) => T === M ? void 0 : T), b(M, null, () => n.onStickyNoteRemoved?.(M)));
6039
6043
  }, [n, b]);
6040
6044
  return re(() => {
6041
6045
  if (!n.onStickyNoteRemoved || y === void 0) return;
6042
- const x = (T) => {
6046
+ const M = (T) => {
6043
6047
  T.key !== "Delete" && T.key !== "Backspace" || El(T.target) || (T.preventDefault(), H(y));
6044
6048
  };
6045
- return document.addEventListener("keydown", x), () => document.removeEventListener("keydown", x);
6049
+ return document.addEventListener("keydown", M), () => document.removeEventListener("keydown", M);
6046
6050
  }, [
6047
6051
  y,
6048
6052
  n,
@@ -6050,58 +6054,58 @@ var bl = () => 1, yl = ({ collection: e, getZoom: t = bl, slots: n, onDeselect:
6050
6054
  ]), /* @__PURE__ */ a("div", {
6051
6055
  ref: v,
6052
6056
  className: "event-model-sticky-notes",
6053
- children: o.current.notes.map((x) => {
6054
- const T = x.position?.x ?? 0, W = x.position?.y ?? 0;
6057
+ children: o.current.notes.map((M) => {
6058
+ const T = M.position?.x ?? 0, W = M.position?.y ?? 0;
6055
6059
  return /* @__PURE__ */ a(nr, {
6056
6060
  x: T,
6057
6061
  y: W,
6058
- zIndex: m === x.id ? 3 : 2,
6059
- children: /* @__PURE__ */ k("div", {
6060
- "data-sticky-note-id": x.id,
6061
- className: s.current.has(x.id) ? "event-model-sticky-note--busy" : void 0,
6062
- "aria-busy": s.current.has(x.id),
6063
- onDoubleClickCapture: n.onStickyNoteTextChanged && !s.current.has(x.id) ? void 0 : Al,
6062
+ zIndex: m === M.id ? 3 : 2,
6063
+ children: /* @__PURE__ */ x("div", {
6064
+ "data-sticky-note-id": M.id,
6065
+ className: s.current.has(M.id) ? "event-model-sticky-note--busy" : void 0,
6066
+ "aria-busy": s.current.has(M.id),
6067
+ onDoubleClickCapture: n.onStickyNoteTextChanged && !s.current.has(M.id) ? void 0 : Al,
6064
6068
  children: [/* @__PURE__ */ a(vi, {
6065
6069
  note: {
6066
- id: x.id,
6070
+ id: M.id,
6067
6071
  x: T,
6068
6072
  y: W,
6069
- width: x.width,
6070
- height: x.height,
6071
- text: x.text
6073
+ width: M.width,
6074
+ height: M.height,
6075
+ text: M.text
6072
6076
  },
6073
- selected: y === x.id && !!n.onStickyNoteResized && !s.current.has(x.id),
6077
+ selected: y === M.id && !!n.onStickyNoteResized && !s.current.has(M.id),
6074
6078
  onSelect: S ?? ct,
6075
6079
  onMove: n.onStickyNoteMoved ? (X, D, z) => C(X, {
6076
6080
  x: D,
6077
6081
  y: z
6078
6082
  }) : ct,
6079
6083
  onMoveEnd: n.onStickyNoteMoved ? N : void 0,
6080
- onResize: n.onStickyNoteResized ? (X, D, z, I, M) => O(X, {
6084
+ onResize: n.onStickyNoteResized ? (X, D, z, I, k) => L(X, {
6081
6085
  position: {
6082
6086
  x: D,
6083
6087
  y: z
6084
6088
  },
6085
6089
  width: I,
6086
- height: M
6090
+ height: k
6087
6091
  }) : ct,
6088
- onResizeEnd: n.onStickyNoteResized ? L : void 0,
6092
+ onResizeEnd: n.onStickyNoteResized ? O : void 0,
6089
6093
  onTextChange: n.onStickyNoteTextChanged ? j : ct,
6090
6094
  onExpandedChange: (X, D) => g((z) => D ? X : z === X ? void 0 : z)
6091
- }), s.current.has(x.id) && /* @__PURE__ */ a("span", {
6095
+ }), s.current.has(M.id) && /* @__PURE__ */ a("span", {
6092
6096
  className: "event-model-sticky-note__progress",
6093
6097
  "aria-hidden": "true",
6094
6098
  children: /* @__PURE__ */ a(bi, { className: "event-model-sticky-note__spinner" })
6095
6099
  })]
6096
6100
  })
6097
- }, x.id);
6101
+ }, M.id);
6098
6102
  })
6099
6103
  });
6100
6104
  });
6101
6105
  ti.displayName = "StickyNotes";
6102
- var ni = tr(({ collection: e, estimatedSize: t, measuredSize: n, onSize: r, getZoom: i, canMove: o, onCollectionMoving: s, onCollectionMoved: d, content: c }) => {
6103
- const l = q((u) => /* @__PURE__ */ a(yl, {
6104
- ...u,
6106
+ var ni = tr(({ collection: e, estimatedSize: t, measuredSize: n, onSize: r, getZoom: i, canMove: o, onCollectionMoving: s, onCollectionMoved: d, content: u }) => {
6107
+ const l = q((c) => /* @__PURE__ */ a(yl, {
6108
+ ...c,
6105
6109
  getZoom: i,
6106
6110
  canMove: o,
6107
6111
  onCollectionMoving: s,
@@ -6117,7 +6121,7 @@ var ni = tr(({ collection: e, estimatedSize: t, measuredSize: n, onSize: r, getZ
6117
6121
  estimatedSize: t,
6118
6122
  measuredSize: n,
6119
6123
  onSize: r,
6120
- children: c(l)
6124
+ children: u(l)
6121
6125
  });
6122
6126
  });
6123
6127
  ni.displayName = "BoardCollectionView";
@@ -6147,60 +6151,60 @@ function Un(e) {
6147
6151
  }, [e]);
6148
6152
  }
6149
6153
  var Fl = ({ collections: e, links: t, stickyNotes: n, readOnly: r, editor: i, canvas: o, showMinimap: s, handle: d }) => {
6150
- const c = r ? void 0 : i?.links, l = Co({
6154
+ const u = r ? void 0 : i?.links, l = Co({
6151
6155
  initialCollections: e.initialCollections,
6152
6156
  onAddCollection: e.onAddCollection,
6153
6157
  onCollectionMoved: e.onCollectionMoved,
6154
6158
  onCollectionsChange: e.onCollectionsChange,
6155
6159
  onPersistenceError: e.onPersistenceError
6156
- }), { collections: u, pendingMoveIds: f, canMove: y, moveCollection: p, collectionMoved: m, addCollection: g } = l, [v, h] = F(/* @__PURE__ */ new Map()), w = A(o?.initialZoom ?? 1), b = q(() => w.current, []), S = A(null);
6160
+ }), { collections: c, pendingMoveIds: f, canMove: y, moveCollection: h, collectionMoved: m, addCollection: g } = l, [v, p] = F(/* @__PURE__ */ new Map()), w = A(o?.initialZoom ?? 1), b = q(() => w.current, []), S = A(null);
6157
6161
  tt(d, () => ({
6158
6162
  addCollection: g,
6159
6163
  addStickyNote: (I) => S.current?.add(I)
6160
6164
  }), [g]);
6161
- const C = q((I, M, E) => {
6162
- h(($) => {
6165
+ const C = q((I, k, E) => {
6166
+ p(($) => {
6163
6167
  const Y = I.toString(), Q = $.get(Y);
6164
- return Q?.width === M && Q.height === E ? $ : new Map($).set(Y, {
6165
- width: M,
6168
+ return Q?.width === k && Q.height === E ? $ : new Map($).set(Y, {
6169
+ width: k,
6166
6170
  height: E
6167
6171
  });
6168
6172
  });
6169
- }, []), O = Un(e.estimateSize), { renderCollection: N } = e, L = Un(q((I) => (M) => N(I, M), [N])), j = oe(() => So(u), [u]), H = oe(() => Pl(j.map((I) => ({
6173
+ }, []), L = Un(e.estimateSize), { renderCollection: N } = e, O = Un(q((I) => (k) => N(I, k), [N])), j = oe(() => So(c), [c]), H = oe(() => Pl(j.map((I) => ({
6170
6174
  position: I.position,
6171
- size: O(I)
6172
- }))), [j, O]), { countSlices: x } = e, T = oe(() => _l(u.reduce((I, M) => I + x(M), 0)), [u, x]), W = oe(() => j.flatMap((I) => {
6173
- const M = v.get(I.id.toString());
6174
- return M ? [{
6175
+ size: L(I)
6176
+ }))), [j, L]), { countSlices: M } = e, T = oe(() => _l(c.reduce((I, k) => I + M(k), 0)), [c, M]), W = oe(() => j.flatMap((I) => {
6177
+ const k = v.get(I.id.toString());
6178
+ return k ? [{
6175
6179
  id: I.id,
6176
6180
  position: I.position,
6177
- width: M.width,
6178
- height: M.height,
6179
- contentHeight: O(I).height
6181
+ width: k.width,
6182
+ height: k.height,
6183
+ contentHeight: L(I).height
6180
6184
  }] : [];
6181
6185
  }), [
6182
6186
  j,
6183
6187
  v,
6184
- O
6185
- ]), X = o?.onTransformChange, D = q((I, M) => {
6186
- w.current = I, X?.(I, M);
6187
- }, [X]), z = /* @__PURE__ */ k(ee, { children: [
6188
+ L
6189
+ ]), X = o?.onTransformChange, D = q((I, k) => {
6190
+ w.current = I, X?.(I, k);
6191
+ }, [X]), z = /* @__PURE__ */ x(ee, { children: [
6188
6192
  j.map((I) => /* @__PURE__ */ a(ni, {
6189
6193
  collection: I,
6190
- estimatedSize: O(I),
6194
+ estimatedSize: L(I),
6191
6195
  measuredSize: v.get(I.id.toString()),
6192
6196
  onSize: C,
6193
6197
  getZoom: b,
6194
6198
  canMove: y && !f.has(I.id.toString()),
6195
- onCollectionMoving: y ? p : void 0,
6199
+ onCollectionMoving: y ? h : void 0,
6196
6200
  onCollectionMoved: y ? m : void 0,
6197
- content: L(I)
6201
+ content: O(I)
6198
6202
  }, I.id.toString())),
6199
6203
  /* @__PURE__ */ a(Il, {
6200
6204
  links: t,
6201
6205
  collections: W,
6202
6206
  getZoom: b,
6203
- ...c
6207
+ ...u
6204
6208
  }),
6205
6209
  /* @__PURE__ */ a(ti, {
6206
6210
  ref: S,
@@ -6224,7 +6228,7 @@ var Fl = ({ collections: e, links: t, stickyNotes: n, readOnly: r, editor: i, ca
6224
6228
  children: e.area ? e.area(l, z) : /* @__PURE__ */ a(Ae, { children: z })
6225
6229
  });
6226
6230
  }, $l = ({ id: e, readOnly: t = !1, showMinimap: n = !0, showLogo: r = !1, showViewOptions: i = !1, toolbar: o, editor: s, ...d }) => {
6227
- const c = /* @__PURE__ */ a(co, {
6231
+ const u = /* @__PURE__ */ a(co, {
6228
6232
  readOnly: t,
6229
6233
  editing: t ? void 0 : s?.editing,
6230
6234
  actions: t ? void 0 : s?.actions,
@@ -6237,30 +6241,31 @@ var Fl = ({ collections: e, links: t, stickyNotes: n, readOnly: r, editor: i, ca
6237
6241
  ...d
6238
6242
  }, e.toString())
6239
6243
  });
6240
- return !r && !i && o === void 0 ? c : /* @__PURE__ */ a(ei, {
6244
+ return !r && !i && o === void 0 ? u : /* @__PURE__ */ a(ei, {
6241
6245
  showLogo: r,
6242
6246
  showViewOptions: i,
6243
6247
  toolbar: o,
6244
- children: c
6248
+ chrome: d.canvas?.chrome,
6249
+ children: u
6245
6250
  });
6246
6251
  }, Yn = ({ document: e, readOnly: t = !1, editor: n, canvas: r, showMinimap: i = !0, handle: o }) => {
6247
- const s = t ? void 0 : n?.collection, d = t ? void 0 : n?.collectionBoundary, c = t ? void 0 : n?.collections, l = q((p, m) => {
6252
+ const s = t ? void 0 : n?.collection, d = t ? void 0 : n?.collectionBoundary, u = t ? void 0 : n?.collections, l = q((h, m) => {
6248
6253
  const g = m({
6249
- collection: p,
6250
- ...s?.(p)
6254
+ collection: h,
6255
+ ...s?.(h)
6251
6256
  });
6252
- return d ? d(p, g) : g;
6253
- }, [s, d]), u = Fr(), f = q((p) => Ga(p, u), [u]), y = oe(() => ({
6257
+ return d ? d(h, g) : g;
6258
+ }, [s, d]), c = Fr(), f = q((h) => Ga(h, c), [c]), y = oe(() => ({
6254
6259
  initialCollections: e.collections,
6255
6260
  estimateSize: f,
6256
6261
  countSlices: Dl,
6257
6262
  renderCollection: l,
6258
- ...c
6263
+ ...u
6259
6264
  }), [
6260
6265
  e.collections,
6261
6266
  f,
6262
6267
  l,
6263
- c
6268
+ u
6264
6269
  ]);
6265
6270
  return /* @__PURE__ */ a($l, {
6266
6271
  id: e.id,
@@ -6277,6 +6282,7 @@ var Fl = ({ collections: e, links: t, stickyNotes: n, readOnly: r, editor: i, ca
6277
6282
  showLogo: e,
6278
6283
  showViewOptions: t,
6279
6284
  toolbar: n,
6285
+ chrome: r.canvas?.chrome,
6280
6286
  children: /* @__PURE__ */ a(Yn, { ...r })
6281
6287
  }), pc = ({ slotName: e, order: t, children: n }) => {
6282
6288
  const { readOnly: r } = K();
@@ -6307,9 +6313,9 @@ var Fl = ({ collections: e, links: t, stickyNotes: n, readOnly: r, editor: i, ca
6307
6313
  fontWeight: 500,
6308
6314
  color: "rgba(255,255,255,0.80)",
6309
6315
  textAlign: "center"
6310
- }, oi = ({ slice: e, height: t, collapsed: n, selectableStatuses: r, unselectableStatusReason: i, error: o, leading: s, trailing: d, onToggleCollapse: c }) => {
6311
- const l = K(), { showStatuses: u = !0 } = fe(), { readOnly: f } = De(), { editing: y, actions: p } = l, m = y.onSliceRenamed, g = y.onSliceStatusChanged, v = y.onSliceAdded, h = y.onSliceOpenStateSet, w = (p.sliceHeader ?? []).filter((b) => !b.when || b.when(e));
6312
- return /* @__PURE__ */ k("div", {
6316
+ }, oi = ({ slice: e, height: t, collapsed: n, selectableStatuses: r, unselectableStatusReason: i, error: o, leading: s, trailing: d, onToggleCollapse: u }) => {
6317
+ const l = K(), { showStatuses: c = !0 } = fe(), { readOnly: f } = De(), { editing: y, actions: h } = l, m = y.onSliceRenamed, g = y.onSliceStatusChanged, v = y.onSliceAdded, p = y.onSliceOpenStateSet, w = (h.sliceHeader ?? []).filter((b) => !b.when || b.when(e));
6318
+ return /* @__PURE__ */ x("div", {
6313
6319
  className: "event-modeling-grid-slice-column-header",
6314
6320
  style: {
6315
6321
  height: t,
@@ -6317,14 +6323,14 @@ var Fl = ({ collections: e, links: t, stickyNotes: n, readOnly: r, editor: i, ca
6317
6323
  ...o ? { border: "2px solid #ef4444" } : {}
6318
6324
  },
6319
6325
  children: [
6320
- /* @__PURE__ */ k("div", {
6326
+ /* @__PURE__ */ x("div", {
6321
6327
  className: "event-modeling-grid-slice-column-header-left",
6322
6328
  children: [/* @__PURE__ */ a(Qt, {
6323
6329
  collapsed: n,
6324
- onToggle: l.readOnly ? c : !f && h ? () => h(e.id, !n) : void 0
6330
+ onToggle: l.readOnly ? u : !f && p ? () => p(e.id, !n) : void 0
6325
6331
  }), !n && s]
6326
6332
  }),
6327
- !n && /* @__PURE__ */ k("div", {
6333
+ !n && /* @__PURE__ */ x("div", {
6328
6334
  className: "event-modeling-grid-slice-column-header-center",
6329
6335
  children: [/* @__PURE__ */ a(me, {
6330
6336
  content: /* @__PURE__ */ a(fs, { sliceType: e.sliceType }),
@@ -6338,10 +6344,10 @@ var Fl = ({ collections: e, links: t, stickyNotes: n, readOnly: r, editor: i, ca
6338
6344
  })
6339
6345
  }), o && /* @__PURE__ */ a(Cr, { error: o })]
6340
6346
  }),
6341
- !n && /* @__PURE__ */ k("div", {
6347
+ !n && /* @__PURE__ */ x("div", {
6342
6348
  className: "event-modeling-grid-slice-column-header-right",
6343
6349
  children: [
6344
- u && /* @__PURE__ */ a(tn, {
6350
+ c && /* @__PURE__ */ a(tn, {
6345
6351
  status: e.status,
6346
6352
  onStatusChanged: g ? (b) => g(e.id, b) : void 0,
6347
6353
  selectable: r,
@@ -6391,7 +6397,7 @@ var ql = 3, Gl = ({ drag: e, headerHeight: t }) => e ? He(/* @__PURE__ */ a(Ul,
6391
6397
  const o = r.current;
6392
6398
  if (!(!o || !i))
6393
6399
  return o.replaceChildren(i), () => o.replaceChildren();
6394
- }, [i]), /* @__PURE__ */ k("div", {
6400
+ }, [i]), /* @__PURE__ */ x("div", {
6395
6401
  style: {
6396
6402
  position: "fixed",
6397
6403
  left: e.currentX - e.ghostWidth / 2 * e.zoom,
@@ -6406,7 +6412,7 @@ var ql = 3, Gl = ({ drag: e, headerHeight: t }) => e ? He(/* @__PURE__ */ a(Ul,
6406
6412
  ref: r,
6407
6413
  className: `event-modeling-grid-slice-ghost${n ? " event-modeling-grid-slice-ghost--invalid" : ""}`,
6408
6414
  style: { width: e.ghostWidth }
6409
- }) : /* @__PURE__ */ k("div", {
6415
+ }) : /* @__PURE__ */ x("div", {
6410
6416
  className: `event-modeling-grid-slice-ghost-fallback${n ? " event-modeling-grid-slice-ghost-fallback--invalid" : ""}`,
6411
6417
  style: {
6412
6418
  width: e.ghostWidth,
@@ -6425,7 +6431,7 @@ var ql = 3, Gl = ({ drag: e, headerHeight: t }) => e ? He(/* @__PURE__ */ a(Ul,
6425
6431
  }, jn = ({ isValid: e, marginLeft: t }) => /* @__PURE__ */ a("div", {
6426
6432
  className: Wl(e),
6427
6433
  style: { marginLeft: t }
6428
- }), Lt = ({ moduleId: e, featureId: t, active: n = !1, busy: r = !1, acceptsReorder: i = !0, acceptsMove: o = !0, style: s, className: d, children: c }) => /* @__PURE__ */ a("div", {
6434
+ }), Lt = ({ moduleId: e, featureId: t, active: n = !1, busy: r = !1, acceptsReorder: i = !0, acceptsMove: o = !0, style: s, className: d, children: u }) => /* @__PURE__ */ a("div", {
6429
6435
  "data-slice-drop-target": "true",
6430
6436
  "data-slice-module-id": e.toString(),
6431
6437
  "data-slice-feature-id": t.toString(),
@@ -6434,7 +6440,7 @@ var ql = 3, Gl = ({ drag: e, headerHeight: t }) => e ? He(/* @__PURE__ */ a(Ul,
6434
6440
  "aria-busy": r || void 0,
6435
6441
  className: [n && "event-modeling-grid-slice-drop-target--active", d].filter(Boolean).join(" ") || void 0,
6436
6442
  style: s,
6437
- children: c
6443
+ children: u
6438
6444
  }), Yl = (e) => {
6439
6445
  if (!e.targetFeatureId.equals(e.featureId)) return { index: e.dropIndex };
6440
6446
  const t = e.dropIndex > e.sourceIndex ? e.dropIndex - 1 : e.dropIndex;
@@ -6445,22 +6451,22 @@ function jl(e, t, n, r) {
6445
6451
  s.current = i;
6446
6452
  const d = A(r);
6447
6453
  d.current = r;
6448
- const c = A(n);
6449
- c.current = n;
6450
- const { readOnly: l } = K(), u = q((g, v, h) => {
6454
+ const u = A(n);
6455
+ u.current = n;
6456
+ const { readOnly: l } = K(), c = q((g, v, p) => {
6451
6457
  try {
6452
- return d.current?.(g, v, h);
6458
+ return d.current?.(g, v, p);
6453
6459
  } catch (w) {
6454
6460
  console.error("Slice drop validation failed — allowing the drop", w);
6455
6461
  return;
6456
6462
  }
6457
- }, []), f = q((g, v, h) => {
6458
- const w = document.querySelector(`[data-slice-drop-target="true"][data-slice-module-id="${g.toString()}"][data-slice-feature-id="${h.toString()}"]`);
6459
- return h.equals(v) ? w?.dataset.sliceAcceptsReorder === "true" : w?.dataset.sliceAcceptsMove === "true";
6460
- }, []), y = q((g, v, h, w, b, S, C, O = null) => {
6463
+ }, []), f = q((g, v, p) => {
6464
+ const w = document.querySelector(`[data-slice-drop-target="true"][data-slice-module-id="${g.toString()}"][data-slice-feature-id="${p.toString()}"]`);
6465
+ return p.equals(v) ? w?.dataset.sliceAcceptsReorder === "true" : w?.dataset.sliceAcceptsMove === "true";
6466
+ }, []), y = q((g, v, p, w, b, S, C, L = null) => {
6461
6467
  const N = e.slices.findIndex((j) => j.id.equals(g));
6462
6468
  if (N === -1) return;
6463
- const L = u(g, e.id, N);
6469
+ const O = c(g, e.id, N);
6464
6470
  o({
6465
6471
  sliceId: g,
6466
6472
  moduleId: t,
@@ -6469,64 +6475,64 @@ function jl(e, t, n, r) {
6469
6475
  sourceIndex: N,
6470
6476
  ghostLabel: v,
6471
6477
  ghostWidth: b,
6472
- ghost: O,
6473
- currentX: h,
6478
+ ghost: L,
6479
+ currentX: p,
6474
6480
  currentY: w,
6475
6481
  dropIndex: N,
6476
6482
  headerY: S,
6477
6483
  zoom: C,
6478
- isValid: (L?.isValid ?? !0) && f(t, e.id, e.id),
6479
- invalidReason: L?.reason
6484
+ isValid: (O?.isValid ?? !0) && f(t, e.id, e.id),
6485
+ invalidReason: O?.reason
6480
6486
  });
6481
6487
  }, [
6482
6488
  e,
6483
6489
  t,
6484
- u,
6490
+ c,
6485
6491
  f
6486
- ]), p = q((g, v) => {
6487
- const h = Array.from(document.querySelectorAll(`[data-slice-drop-target="true"][data-slice-module-id="${g.toString()}"]`));
6488
- if (h.length === 0) return e.id;
6489
- for (let w = 0; w < h.length; w++) {
6490
- const b = h[w].getBoundingClientRect();
6491
- if (v < b.left + b.width / 2) return de.parse(h[w].dataset.sliceFeatureId);
6492
+ ]), h = q((g, v) => {
6493
+ const p = Array.from(document.querySelectorAll(`[data-slice-drop-target="true"][data-slice-module-id="${g.toString()}"]`));
6494
+ if (p.length === 0) return e.id;
6495
+ for (let w = 0; w < p.length; w++) {
6496
+ const b = p[w].getBoundingClientRect();
6497
+ if (v < b.left + b.width / 2) return de.parse(p[w].dataset.sliceFeatureId);
6492
6498
  }
6493
- return de.parse(h[h.length - 1].dataset.sliceFeatureId);
6499
+ return de.parse(p[p.length - 1].dataset.sliceFeatureId);
6494
6500
  }, [e.id]), m = q((g, v) => {
6495
- const h = Array.from(document.querySelectorAll(`[data-slice-col="true"][data-slice-feature-id="${g.toString()}"]`));
6496
- if (h.length === 0) return 0;
6497
- for (let w = 0; w < h.length; w++) {
6498
- const b = h[w].getBoundingClientRect();
6501
+ const p = Array.from(document.querySelectorAll(`[data-slice-col="true"][data-slice-feature-id="${g.toString()}"]`));
6502
+ if (p.length === 0) return 0;
6503
+ for (let w = 0; w < p.length; w++) {
6504
+ const b = p[w].getBoundingClientRect();
6499
6505
  if (v < b.left + b.width / 2) return w;
6500
6506
  }
6501
- return h.length;
6507
+ return p.length;
6502
6508
  }, []);
6503
6509
  return re(() => {
6504
6510
  if (!i) return;
6505
- const g = (h) => {
6511
+ const g = (p) => {
6506
6512
  const w = s.current;
6507
6513
  if (!w) return;
6508
- const b = p(w.moduleId, h.clientX), S = m(b, h.clientX), C = u(w.sliceId, b, S);
6509
- o((O) => O ? {
6510
- ...O,
6511
- currentX: h.clientX,
6512
- currentY: h.clientY,
6514
+ const b = h(w.moduleId, p.clientX), S = m(b, p.clientX), C = c(w.sliceId, b, S);
6515
+ o((L) => L ? {
6516
+ ...L,
6517
+ currentX: p.clientX,
6518
+ currentY: p.clientY,
6513
6519
  targetFeatureId: b,
6514
6520
  dropIndex: S,
6515
6521
  isValid: (C?.isValid ?? !0) && f(w.moduleId, w.featureId, b),
6516
6522
  invalidReason: C?.reason
6517
6523
  } : void 0);
6518
6524
  }, v = () => {
6519
- const h = s.current, w = h && Yl(h);
6520
- h && w && f(h.moduleId, h.featureId, h.targetFeatureId) && c.current?.(h.sliceId, h.featureId, h.targetFeatureId, w.index), o(void 0);
6525
+ const p = s.current, w = p && Yl(p);
6526
+ p && w && f(p.moduleId, p.featureId, p.targetFeatureId) && u.current?.(p.sliceId, p.featureId, p.targetFeatureId, w.index), o(void 0);
6521
6527
  };
6522
6528
  return window.addEventListener("pointermove", g, !0), window.addEventListener("pointerup", v, !0), window.addEventListener("pointercancel", v, !0), () => {
6523
6529
  window.removeEventListener("pointermove", g, !0), window.removeEventListener("pointerup", v, !0), window.removeEventListener("pointercancel", v, !0);
6524
6530
  };
6525
6531
  }, [
6526
6532
  i,
6527
- p,
6533
+ h,
6528
6534
  m,
6529
- u,
6535
+ c,
6530
6536
  f
6531
6537
  ]), {
6532
6538
  sliceDrag: i,
@@ -6534,33 +6540,33 @@ function jl(e, t, n, r) {
6534
6540
  };
6535
6541
  }
6536
6542
  function Xl(e, t, n, r, i) {
6537
- const [o, s] = F(null), d = A(null), c = A(i);
6538
- c.current = i;
6543
+ const [o, s] = F(null), d = A(null), u = A(i);
6544
+ u.current = i;
6539
6545
  const l = () => {
6540
6546
  d.current !== null && (clearTimeout(d.current), d.current = null);
6541
- }, u = (g, v, h) => {
6547
+ }, c = (g, v, p) => {
6542
6548
  l(), s({
6543
6549
  ...g,
6544
6550
  committed: !0
6545
- }), g.element.setPointerCapture(g.pointerId), e && c.current?.(e, t, v, h, n, g.startY - g.grabOffsetY, Jl(g.element), ha(g.element));
6551
+ }), g.element.setPointerCapture(g.pointerId), e && u.current?.(e, t, v, p, n, g.startY - g.grabOffsetY, Jl(g.element), ha(g.element));
6546
6552
  };
6547
6553
  return re(() => {
6548
6554
  if (!o || o.committed) return;
6549
- const g = (h) => {
6550
- if (h.pointerId !== o.pointerId) return;
6551
- const w = zl(o.pointerType, h.clientX - o.startX, h.clientY - o.startY);
6552
- w === Fe.abandon && s(null), w === Fe.commit && u(o, h.clientX, h.clientY);
6553
- }, v = (h) => {
6554
- h.pointerId === o.pointerId && s(null);
6555
+ const g = (p) => {
6556
+ if (p.pointerId !== o.pointerId) return;
6557
+ const w = zl(o.pointerType, p.clientX - o.startX, p.clientY - o.startY);
6558
+ w === Fe.abandon && s(null), w === Fe.commit && c(o, p.clientX, p.clientY);
6559
+ }, v = (p) => {
6560
+ p.pointerId === o.pointerId && s(null);
6555
6561
  };
6556
6562
  return window.addEventListener("pointermove", g, !0), window.addEventListener("pointerup", v, !0), window.addEventListener("pointercancel", v, !0), () => {
6557
6563
  window.removeEventListener("pointermove", g, !0), window.removeEventListener("pointerup", v, !0), window.removeEventListener("pointercancel", v, !0);
6558
6564
  };
6559
- }, [o]), re(() => (!o || o.committed || o.pointerType !== "touch" || (d.current = setTimeout(() => u(o, o.startX, o.startY), 450)), l), [o]), {
6565
+ }, [o]), re(() => (!o || o.committed || o.pointerType !== "touch" || (d.current = setTimeout(() => c(o, o.startX, o.startY), 450)), l), [o]), {
6560
6566
  onPointerDown: (g) => {
6561
6567
  const v = g.currentTarget;
6562
6568
  if (!e) return;
6563
- const h = Vl({
6569
+ const p = Vl({
6564
6570
  target: g.target instanceof Element ? g.target : null,
6565
6571
  clientX: g.clientX,
6566
6572
  clientY: g.clientY,
@@ -6568,8 +6574,8 @@ function Xl(e, t, n, r, i) {
6568
6574
  pointerType: g.pointerType,
6569
6575
  elementTop: v.getBoundingClientRect().top
6570
6576
  }, r);
6571
- h && (s({
6572
- ...h,
6577
+ p && (s({
6578
+ ...p,
6573
6579
  element: v,
6574
6580
  committed: !1
6575
6581
  }), g.pointerType !== "touch" && g.stopPropagation());
@@ -6592,13 +6598,13 @@ function Jl(e) {
6592
6598
  }
6593
6599
  return 1;
6594
6600
  }
6595
- var Zl = ({ featureId: e, name: t, status: n, width: r, collapsed: i, isDragging: o = !1, onDragStart: s, ref: d, onMouseEnter: c, onMouseLeave: l, onFocusCapture: u, onBlurCapture: f, children: y }) => {
6596
- const { sliceId: p } = De(), m = Xl(p, t, r, i || !s, s);
6601
+ var Zl = ({ featureId: e, name: t, status: n, width: r, collapsed: i, isDragging: o = !1, onDragStart: s, ref: d, onMouseEnter: u, onMouseLeave: l, onFocusCapture: c, onBlurCapture: f, children: y }) => {
6602
+ const { sliceId: h } = De(), m = Xl(h, t, r, i || !s, s);
6597
6603
  return /* @__PURE__ */ a("div", {
6598
6604
  ref: d,
6599
6605
  "data-slice-col": "true",
6600
6606
  "data-slice-feature-id": e.toString(),
6601
- "data-slice-id": p?.toString(),
6607
+ "data-slice-id": h?.toString(),
6602
6608
  className: `event-modeling-grid-slice-column event-modeling-grid-slice-column--${$t(n)}${i ? " event-modeling-grid-slice-column--collapsed" : ""}`,
6603
6609
  style: {
6604
6610
  width: r,
@@ -6606,9 +6612,9 @@ var Zl = ({ featureId: e, name: t, status: n, width: r, collapsed: i, isDragging
6606
6612
  transition: "opacity 0.15s",
6607
6613
  ...o ? { opacity: 0.35 } : {}
6608
6614
  },
6609
- onMouseEnter: c,
6615
+ onMouseEnter: u,
6610
6616
  onMouseLeave: l,
6611
- onFocusCapture: u,
6617
+ onFocusCapture: c,
6612
6618
  onBlurCapture: f,
6613
6619
  onPointerDown: m.onPointerDown,
6614
6620
  onPointerMove: m.onPointerMove,
@@ -6617,15 +6623,15 @@ var Zl = ({ featureId: e, name: t, status: n, width: r, collapsed: i, isDragging
6617
6623
  onContextMenu: m.onContextMenu,
6618
6624
  children: y
6619
6625
  });
6620
- }, Kl = ({ featureId: e, slice: t, eventCount: n, collapsed: r, isDragging: i = !1, onSliceDragStart: o, header: s, headerHeight: d = 44, body: c, specifications: l, collapsedWidth: u }) => {
6621
- const { readOnly: f } = K(), y = Qa(t.id.toString()), { ref: p, onMouseEnter: m, onMouseLeave: g } = ns(y?.connectedSliceIds), v = A(null), h = Zt(v), [w, b] = F(!1), S = A(!1), C = pr({
6626
+ }, Kl = ({ featureId: e, slice: t, eventCount: n, collapsed: r, isDragging: i = !1, onSliceDragStart: o, header: s, headerHeight: d = 44, body: u, specifications: l, collapsedWidth: c }) => {
6627
+ const { readOnly: f } = K(), y = Qa(t.id.toString()), { ref: h, onMouseEnter: m, onMouseLeave: g } = ns(y?.connectedSliceIds), v = A(null), p = Zt(v), [w, b] = F(!1), S = A(!1), C = pr({
6622
6628
  sliceType: t.sliceType,
6623
6629
  eventCount: n
6624
- }), O = () => {
6630
+ }), L = () => {
6625
6631
  S.current = !0, m();
6626
6632
  }, N = () => {
6627
6633
  S.current = !1, w || g();
6628
- }, L = (j) => {
6634
+ }, O = (j) => {
6629
6635
  const H = j.relatedTarget;
6630
6636
  (!(H instanceof Node) || !j.currentTarget.contains(H)) && b(!1);
6631
6637
  };
@@ -6635,7 +6641,7 @@ var Zl = ({ featureId: e, name: t, status: n, width: r, collapsed: i, isDragging
6635
6641
  sliceId: t.id,
6636
6642
  sliceType: t.sliceType,
6637
6643
  status: t.status,
6638
- children: /* @__PURE__ */ k("div", {
6644
+ children: /* @__PURE__ */ x("div", {
6639
6645
  ref: v,
6640
6646
  style: {
6641
6647
  display: "flex",
@@ -6643,25 +6649,25 @@ var Zl = ({ featureId: e, name: t, status: n, width: r, collapsed: i, isDragging
6643
6649
  alignItems: "stretch",
6644
6650
  flexShrink: 0
6645
6651
  },
6646
- children: [/* @__PURE__ */ k(Zl, {
6647
- ref: p,
6652
+ children: [/* @__PURE__ */ x(Zl, {
6653
+ ref: h,
6648
6654
  featureId: e,
6649
6655
  name: t.name,
6650
6656
  status: t.status,
6651
- width: r ? u : C,
6657
+ width: r ? c : C,
6652
6658
  collapsed: r,
6653
6659
  isDragging: i,
6654
6660
  onDragStart: f ? void 0 : o,
6655
- onMouseEnter: O,
6661
+ onMouseEnter: L,
6656
6662
  onMouseLeave: N,
6657
6663
  onFocusCapture: () => b(!0),
6658
- onBlurCapture: L,
6664
+ onBlurCapture: O,
6659
6665
  children: [s ?? /* @__PURE__ */ a(oi, {
6660
6666
  slice: t,
6661
6667
  height: d,
6662
6668
  collapsed: r
6663
- }), typeof c == "function" ? c(h) : h && c]
6664
- }), typeof l == "function" ? l(h, C) : h && l]
6669
+ }), typeof u == "function" ? u(p) : p && u]
6670
+ }), typeof l == "function" ? l(p, C) : p && l]
6665
6671
  })
6666
6672
  });
6667
6673
  }, Ql = (e, t) => {
@@ -6821,14 +6827,14 @@ var Zl = ({ featureId: e, name: t, status: n, width: r, collapsed: i, isDragging
6821
6827
  };
6822
6828
  return n ? qe(r, e.snapshot) : r;
6823
6829
  }, qe = (e, t) => {
6824
- const n = e.additions.filter((p) => !p.confirmed || !xe(t, p.slice.id)), r = e.outgoing.filter((p) => !p.confirmed || xe(t, p.slice.id)), i = e.incoming.filter((p) => !p.confirmed || !xe(t, p.slice.id)), o = e.order?.ids.filter((p) => xe(t, p)), s = t.filter((p) => o?.some((m) => le(m, p.id))).map((p) => p.id), d = o !== void 0 && o.length > 0 && o.every((p, m) => le(p, s[m])), c = e.order?.confirmed && d ? void 0 : e.order, l = (p, m) => e.slices.find((g) => le(g.id, p)) ?? m, u = t.filter((p) => !r.some((m) => le(m.slice.id, p.id))).map((p) => e.additions.some((m) => le(m.slice.id, p.id)) || e.incoming.some((m) => le(m.slice.id, p.id)) ? l(p.id, p) : p), f = i.reduce((p, m) => vn(p, l(m.slice.id, m.slice), m.index), u), y = n.reduce((p, m) => xe(p, m.slice.id) ? p : gn(p, l(m.slice.id, m.slice), m.afterSliceId), f);
6830
+ const n = e.additions.filter((h) => !h.confirmed || !xe(t, h.slice.id)), r = e.outgoing.filter((h) => !h.confirmed || xe(t, h.slice.id)), i = e.incoming.filter((h) => !h.confirmed || !xe(t, h.slice.id)), o = e.order?.ids.filter((h) => xe(t, h)), s = t.filter((h) => o?.some((m) => le(m, h.id))).map((h) => h.id), d = o !== void 0 && o.length > 0 && o.every((h, m) => le(h, s[m])), u = e.order?.confirmed && d ? void 0 : e.order, l = (h, m) => e.slices.find((g) => le(g.id, h)) ?? m, c = t.filter((h) => !r.some((m) => le(m.slice.id, h.id))).map((h) => e.additions.some((m) => le(m.slice.id, h.id)) || e.incoming.some((m) => le(m.slice.id, h.id)) ? l(h.id, h) : h), f = i.reduce((h, m) => vn(h, l(m.slice.id, m.slice), m.index), c), y = n.reduce((h, m) => xe(h, m.slice.id) ? h : gn(h, l(m.slice.id, m.slice), m.afterSliceId), f);
6825
6831
  return {
6826
- slices: c ? cd(y, c.ids) : y,
6832
+ slices: u ? cd(y, u.ids) : y,
6827
6833
  snapshot: t,
6828
6834
  additions: n,
6829
6835
  outgoing: r,
6830
6836
  incoming: i,
6831
- order: c
6837
+ order: u
6832
6838
  };
6833
6839
  }, cd = (e, t) => {
6834
6840
  const n = t.map((i) => e.find((o) => le(o.id, i))).filter((i) => i !== void 0);
@@ -6838,8 +6844,8 @@ var Zl = ({ featureId: e, name: t, status: n, width: r, collapsed: i, isDragging
6838
6844
  const n = t.replace(/\s*\(\d+\)$/, "").trimEnd(), r = new RegExp(`^${n.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")}\\s+\\((\\d+)\\)$`), i = new Set(e.map((o) => r.exec(o)).filter((o) => o !== null).map((o) => Number(o[1])));
6839
6845
  return `${n} (${Array.from({ length: i.size + 1 }, (o, s) => s + 1).find((o) => !i.has(o))})`;
6840
6846
  };
6841
- function md({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollapsed: i, hideEmptyPlaceholder: o = !1, onSlicesChanged: s, createSlice: d, onAddSlice: c, onReorderSlices: l, onMoveSlice: u, validateSliceDrop: f, renderSlice: y }) {
6842
- const { readOnly: p, messages: m } = K(), g = A(ed(t)), v = A(void 0), [h, w] = F(g.current), { slices: b } = h, S = A(!1), [C, O] = F(!1), N = q((E) => {
6847
+ function md({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollapsed: i, hideEmptyPlaceholder: o = !1, onSlicesChanged: s, createSlice: d, onAddSlice: u, onReorderSlices: l, onMoveSlice: c, validateSliceDrop: f, renderSlice: y }) {
6848
+ const { readOnly: h, messages: m } = K(), g = A(ed(t)), v = A(void 0), [p, w] = F(g.current), { slices: b } = p, S = A(!1), [C, L] = F(!1), N = q((E) => {
6843
6849
  const $ = g.current, Y = E($);
6844
6850
  Y !== $ && (g.current = Y, w(Y), Y.slices !== $.slices && (v.current = Y.slices, s?.(Y.slices)));
6845
6851
  }, [s]);
@@ -6849,7 +6855,7 @@ function md({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
6849
6855
  snapshot: t
6850
6856
  } : qe(E, t));
6851
6857
  }, [t, N]);
6852
- const L = q((E) => {
6858
+ const O = q((E) => {
6853
6859
  N(($) => {
6854
6860
  const Y = E($.slices);
6855
6861
  return Y === $.slices ? $ : {
@@ -6857,35 +6863,35 @@ function md({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
6857
6863
  slices: Y
6858
6864
  };
6859
6865
  });
6860
- }, [N]), j = q((E, $) => N((Y) => rd(Y, E, $)), [N]), H = q((E, $) => N((Y) => ld(Y, E, $)), [N]), x = q((E, $) => N((Y) => dd(Y, E, $)), [N]), T = q((E) => [...g.current.additions, ...g.current.incoming].some(($) => $.slice.id.equals(E)) || !g.current.slices.some(($) => $.id.equals(E)) ? !1 : (N(($) => ad($, E)), !0), [N]), W = q((E, $) => N((Y) => sd(Y, E, $)), [N]), X = q((E, $, Y) => {
6861
- if (p || !c || S.current) return;
6862
- S.current = !0, O(!0);
6866
+ }, [N]), j = q((E, $) => N((Y) => rd(Y, E, $)), [N]), H = q((E, $) => N((Y) => ld(Y, E, $)), [N]), M = q((E, $) => N((Y) => dd(Y, E, $)), [N]), T = q((E) => [...g.current.additions, ...g.current.incoming].some(($) => $.slice.id.equals(E)) || !g.current.slices.some(($) => $.id.equals(E)) ? !1 : (N(($) => ad($, E)), !0), [N]), W = q((E, $) => N((Y) => sd(Y, E, $)), [N]), X = q((E, $, Y) => {
6867
+ if (h || !u || S.current) return;
6868
+ S.current = !0, L(!0);
6863
6869
  const Q = d(Ql(E, Y));
6864
- N((P) => nd(P, Q, $)), Promise.resolve().then(() => c(Q, $)).then((P) => {
6870
+ N((P) => nd(P, Q, $)), Promise.resolve().then(() => u(Q, $)).then((P) => {
6865
6871
  N((V) => Xn(V, Q.id, P));
6866
6872
  }).catch(() => N((P) => Xn(P, Q.id))).finally(() => {
6867
- S.current = !1, O(!1);
6873
+ S.current = !1, L(!1);
6868
6874
  });
6869
6875
  }, [
6870
- p,
6876
+ h,
6871
6877
  d,
6872
- c,
6878
+ u,
6873
6879
  N
6874
6880
  ]);
6875
6881
  tt(e, () => ({
6876
6882
  addSlice: X,
6877
- updateSlices: L,
6883
+ updateSlices: O,
6878
6884
  addProjectedSlice: j,
6879
6885
  moveIn: H,
6880
- completeMoveIn: x,
6886
+ completeMoveIn: M,
6881
6887
  moveOut: T,
6882
6888
  completeMoveOut: W
6883
6889
  }), [
6884
6890
  X,
6885
- L,
6891
+ O,
6886
6892
  j,
6887
6893
  H,
6888
- x,
6894
+ M,
6889
6895
  T,
6890
6896
  W
6891
6897
  ]);
@@ -6893,7 +6899,7 @@ function md({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
6893
6899
  id: r,
6894
6900
  slices: b
6895
6901
  }), [r, b]), z = q((E, $, Y, Q) => {
6896
- if (p || !$.equals(r)) return;
6902
+ if (h || !$.equals(r)) return;
6897
6903
  const P = g.current.slices.findIndex((V) => V.id.equals(E));
6898
6904
  if (!(P < 0 || [...g.current.additions, ...g.current.incoming].some((V) => V.slice.id.equals(E)))) {
6899
6905
  if (Y.equals(r)) {
@@ -6901,30 +6907,30 @@ function md({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
6901
6907
  const V = od(g.current, P, Q);
6902
6908
  if (V === g.current) return;
6903
6909
  N(() => V), Promise.resolve().then(() => l(V.slices.map((te) => te.id))).then((te) => N((R) => Jn(R, te))).catch(() => N((te) => Jn(te, !1)));
6904
- } else if (u) {
6910
+ } else if (c) {
6905
6911
  const V = g.current.slices[P];
6906
6912
  if (!T(E)) return;
6907
- Promise.resolve().then(() => u(V, Y, Q)).then((te) => W(E, te)).catch(() => W(E, !1));
6913
+ Promise.resolve().then(() => c(V, Y, Q)).then((te) => W(E, te)).catch(() => W(E, !1));
6908
6914
  }
6909
6915
  }
6910
6916
  }, [
6911
- p,
6917
+ h,
6912
6918
  r,
6913
6919
  l,
6914
- u,
6920
+ c,
6915
6921
  N,
6916
6922
  T,
6917
6923
  W
6918
- ]), { sliceDrag: I, handleSliceDragStart: M } = jl(D, n, l || u ? z : void 0, f);
6919
- return b.length ? /* @__PURE__ */ k(ee, { children: [/* @__PURE__ */ a(Gl, {
6924
+ ]), { sliceDrag: I, handleSliceDragStart: k } = jl(D, n, l || c ? z : void 0, f);
6925
+ return b.length ? /* @__PURE__ */ x(ee, { children: [/* @__PURE__ */ a(Gl, {
6920
6926
  drag: I,
6921
6927
  headerHeight: Z.headerHeight
6922
6928
  }), /* @__PURE__ */ a(Lt, {
6923
6929
  moduleId: n,
6924
6930
  featureId: r,
6925
6931
  busy: C,
6926
- acceptsReorder: !p && !!l,
6927
- acceptsMove: !p && !!u,
6932
+ acceptsReorder: !h && !!l,
6933
+ acceptsMove: !h && !!c,
6928
6934
  active: I?.targetFeatureId.equals(r),
6929
6935
  style: {
6930
6936
  display: "flex",
@@ -6944,9 +6950,9 @@ function md({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
6944
6950
  collapsed: i || V,
6945
6951
  sliceCollapsed: V,
6946
6952
  isDragging: I?.sliceId.equals(E.id) ?? !1,
6947
- onSliceDragStart: [...h.additions, ...h.incoming].some((te) => te.slice.id.equals(E.id)) ? void 0 : M,
6953
+ onSliceDragStart: [...p.additions, ...p.incoming].some((te) => te.slice.id.equals(E.id)) ? void 0 : k,
6948
6954
  addSlice: X,
6949
- updateSlices: L
6955
+ updateSlices: O
6950
6956
  })
6951
6957
  }, E.id.toString())), Y && $ === b.length - 1 && I?.dropIndex === b.length && P.push(/* @__PURE__ */ a(jn, {
6952
6958
  isValid: I.isValid,
@@ -6956,8 +6962,8 @@ function md({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
6956
6962
  })] }) : i ? null : o ? /* @__PURE__ */ a(Lt, {
6957
6963
  moduleId: n,
6958
6964
  featureId: r,
6959
- acceptsReorder: !p && !!l,
6960
- acceptsMove: !p && !!u,
6965
+ acceptsReorder: !h && !!l,
6966
+ acceptsMove: !h && !!c,
6961
6967
  style: {
6962
6968
  width: 0,
6963
6969
  flexShrink: 0
@@ -6966,8 +6972,8 @@ function md({ ref: e, initialSlices: t, moduleId: n, featureId: r, featureCollap
6966
6972
  moduleId: n,
6967
6973
  featureId: r,
6968
6974
  busy: C,
6969
- acceptsReorder: !p && !!l,
6970
- acceptsMove: !p && !!u,
6975
+ acceptsReorder: !h && !!l,
6976
+ acceptsMove: !h && !!c,
6971
6977
  className: "event-modeling-slices-empty",
6972
6978
  style: { width: Math.round(Z.sliceWidth * 1.5) },
6973
6979
  children: m.slices.empty
@@ -6978,8 +6984,8 @@ var gd = {
6978
6984
  [U.Chat]: "chat",
6979
6985
  [U.System]: "system"
6980
6986
  }, vd = ({ sliceType: e, contentRows: t, rowHeights: n, actors: r, renderCell: i }) => /* @__PURE__ */ a(ee, { children: t.flatMap((o) => {
6981
- const s = Ya(o, e, [...t]), d = n[o], c = gd[o];
6982
- if (c === void 0) return [/* @__PURE__ */ a(Ae, { children: i({
6987
+ const s = Ya(o, e, [...t]), d = n[o], u = gd[o];
6988
+ if (u === void 0) return [/* @__PURE__ */ a(Ae, { children: i({
6983
6989
  rowType: o,
6984
6990
  conn: s,
6985
6991
  rowHeight: d
@@ -6989,15 +6995,15 @@ var gd = {
6989
6995
  rowType: o,
6990
6996
  conn: s,
6991
6997
  rowHeight: d
6992
- }) }, `row:${c}`)] : l.map((u) => /* @__PURE__ */ a(Ae, { children: i({
6998
+ }) }, `row:${u}`)] : l.map((c) => /* @__PURE__ */ a(Ae, { children: i({
6993
6999
  rowType: o,
6994
7000
  conn: s,
6995
7001
  rowHeight: d,
6996
- actor: u
6997
- }) }, `role:${u.id.toString()}`)) : Array.from({ length: Math.max(1, l.length) }, (u, f) => /* @__PURE__ */ a("div", {
6998
- className: `event-modeling-grid-slice-cell event-modeling-grid-slice-cell--${c}`,
7002
+ actor: c
7003
+ }) }, `role:${c.id.toString()}`)) : Array.from({ length: Math.max(1, l.length) }, (c, f) => /* @__PURE__ */ a("div", {
7004
+ className: `event-modeling-grid-slice-cell event-modeling-grid-slice-cell--${u}`,
6999
7005
  style: { height: d }
7000
- }, `row:${c}:${f}`));
7006
+ }, `row:${u}:${f}`));
7001
7007
  }) }), Zn = "38";
7002
7008
  function hd(e) {
7003
7009
  if (e.sliceType === B.stateChange && e.hasCommand) return et.background;
@@ -7005,7 +7011,7 @@ function hd(e) {
7005
7011
  }
7006
7012
  var Sc = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(ee, { children: t.map((r) => {
7007
7013
  const i = r === U.Interaction ? hd(e) : void 0, o = r === U.Events ? Math.min(e.eventCount, 3) : 0;
7008
- return /* @__PURE__ */ k("div", {
7014
+ return /* @__PURE__ */ x("div", {
7009
7015
  className: "event-modeling-grid-slice-cell event-modeling-grid-slice-placeholder-row",
7010
7016
  style: { height: n[r] },
7011
7017
  "aria-hidden": !0,
@@ -7083,49 +7089,49 @@ var Sc = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(ee,
7083
7089
  ], Cd = ({ triggerType: e, onTriggerKindChosen: t, onTriggerOpened: n }) => {
7084
7090
  const r = ge(), [i, o] = F(!1), s = A(null), d = A([s]).current;
7085
7091
  ze(d, () => o(!1), i);
7086
- const c = e === void 0 ? void 0 : ai(e), l = (u) => (f) => {
7087
- f.stopPropagation(), u();
7092
+ const u = e === void 0 ? void 0 : ai(e), l = (c) => (f) => {
7093
+ f.stopPropagation(), c();
7088
7094
  };
7089
- return c ? /* @__PURE__ */ a("div", {
7095
+ return u ? /* @__PURE__ */ a("div", {
7090
7096
  className: "system-row-cell__trigger-wrapper",
7091
7097
  children: /* @__PURE__ */ a("button", {
7092
7098
  className: "system-row-cell__trigger-btn system-row-cell__trigger-btn--active",
7093
7099
  title: r.triggerControl.edit,
7094
7100
  onPointerDown: l(n),
7095
- children: /* @__PURE__ */ a("i", { className: c })
7101
+ children: /* @__PURE__ */ a("i", { className: u })
7096
7102
  })
7097
- }) : /* @__PURE__ */ k("div", {
7103
+ }) : /* @__PURE__ */ x("div", {
7098
7104
  ref: s,
7099
7105
  className: "system-row-cell__trigger-wrapper",
7100
7106
  children: [/* @__PURE__ */ a("button", {
7101
7107
  className: "system-row-cell__trigger-btn",
7102
7108
  title: r.triggerControl.add,
7103
- onPointerDown: l(() => o((u) => !u)),
7109
+ onPointerDown: l(() => o((c) => !c)),
7104
7110
  children: /* @__PURE__ */ a("i", { className: "pi pi-plus" })
7105
7111
  }), i && /* @__PURE__ */ a("div", {
7106
7112
  className: "system-row-cell__trigger-menu",
7107
- children: Sd.map((u) => /* @__PURE__ */ k("div", {
7113
+ children: Sd.map((c) => /* @__PURE__ */ x("div", {
7108
7114
  className: "system-row-cell__trigger-menu-item",
7109
7115
  onPointerDown: l(() => {
7110
- o(!1), t(u);
7116
+ o(!1), t(c);
7111
7117
  }),
7112
7118
  children: [/* @__PURE__ */ a("div", {
7113
7119
  className: "system-row-cell__trigger-menu-item-title",
7114
- children: r.triggerControl.kinds[u].title
7120
+ children: r.triggerControl.kinds[c].title
7115
7121
  }), /* @__PURE__ */ a("div", {
7116
7122
  className: "system-row-cell__trigger-menu-item-description",
7117
- children: r.triggerControl.kinds[u].description
7123
+ children: r.triggerControl.kinds[c].description
7118
7124
  })]
7119
- }, u))
7125
+ }, c))
7120
7126
  })]
7121
7127
  });
7122
7128
  }, xd = ({ sliceType: e, isSystemSlice: t, collapsed: n = !1, conn: r, rowHeight: i, triggerType: o }) => {
7123
- const { readOnly: s, sliceId: d } = De(), { onTriggerKindChosen: c, onTriggerOpened: l } = K().editing, u = ge(), f = o === void 0 ? void 0 : ai(o), y = { height: i }, p = t && e === B.automation;
7129
+ const { readOnly: s, sliceId: d } = De(), { onTriggerKindChosen: u, onTriggerOpened: l } = K().editing, c = ge(), f = o === void 0 ? void 0 : ai(o), y = { height: i }, h = t && e === B.automation;
7124
7130
  return n ? /* @__PURE__ */ a("div", {
7125
7131
  style: y,
7126
7132
  className: "event-modeling-grid-slice-cell event-modeling-grid-slice-cell--centered event-modeling-grid-slice-cell--system event-modeling-grid-slice-cell--collapsed",
7127
7133
  children: t && /* @__PURE__ */ a(At, {})
7128
- }) : /* @__PURE__ */ k("div", {
7134
+ }) : /* @__PURE__ */ x("div", {
7129
7135
  style: y,
7130
7136
  "data-card-id": "system",
7131
7137
  "data-slice-id": d?.toString(),
@@ -7133,23 +7139,23 @@ var Sc = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(ee,
7133
7139
  children: [
7134
7140
  r.topOutgoing && /* @__PURE__ */ a(bt, {}),
7135
7141
  r.topIncoming && /* @__PURE__ */ a(ft, {}),
7136
- e === B.automation ? /* @__PURE__ */ k(ee, { children: [r.bottomIncoming && /* @__PURE__ */ a(Qe, { columnPosition: "left" }), r.bottomOutgoing && /* @__PURE__ */ a(Ke, { columnPosition: "right" })] }) : /* @__PURE__ */ k(ee, { children: [r.bottomOutgoing && /* @__PURE__ */ a(Ke, {}), r.bottomIncoming && /* @__PURE__ */ a(Qe, {})] }),
7142
+ e === B.automation ? /* @__PURE__ */ x(ee, { children: [r.bottomIncoming && /* @__PURE__ */ a(Qe, { columnPosition: "left" }), r.bottomOutgoing && /* @__PURE__ */ a(Ke, { columnPosition: "right" })] }) : /* @__PURE__ */ x(ee, { children: [r.bottomOutgoing && /* @__PURE__ */ a(Ke, {}), r.bottomIncoming && /* @__PURE__ */ a(Qe, {})] }),
7137
7143
  r.passthrough && /* @__PURE__ */ a(Ua, {}),
7138
7144
  t && (e === B.automation ? /* @__PURE__ */ a("span", {
7139
7145
  "data-flow-node": ue.cogwheel,
7140
7146
  className: "system-row-cell__cogwheel",
7141
7147
  children: /* @__PURE__ */ a(At, {})
7142
7148
  }) : /* @__PURE__ */ a(At, {})),
7143
- p && !s && d && c && l && /* @__PURE__ */ a(Cd, {
7149
+ h && !s && d && u && l && /* @__PURE__ */ a(Cd, {
7144
7150
  triggerType: o,
7145
- onTriggerKindChosen: (m) => c(d, m),
7151
+ onTriggerKindChosen: (m) => u(d, m),
7146
7152
  onTriggerOpened: () => l(d)
7147
7153
  }),
7148
- p && s && o !== void 0 && f && /* @__PURE__ */ a("div", {
7154
+ h && s && o !== void 0 && f && /* @__PURE__ */ a("div", {
7149
7155
  className: "system-row-cell__trigger-wrapper",
7150
7156
  children: /* @__PURE__ */ a("span", {
7151
7157
  className: "system-row-cell__trigger-btn system-row-cell__trigger-btn--active system-row-cell__trigger-btn--readonly",
7152
- title: wd(o, u),
7158
+ title: wd(o, c),
7153
7159
  children: /* @__PURE__ */ a("i", { className: f })
7154
7160
  })
7155
7161
  })
@@ -7191,46 +7197,53 @@ var Sc = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(ee,
7191
7197
  })
7192
7198
  })
7193
7199
  });
7194
- }, Nd = ({ elements: e, windowSize: t, layout: n, collapsed: r = !1, conn: i, rowHeight: o, actorId: s }) => {
7195
- const { readOnly: d, sliceId: c } = De(), { editing: l, actions: u, readOnly: f } = K(), { onPrototypeOpened: y, onPrototypeAdded: p } = l, m = A(null), [g, v] = F(), h = Si().prototypeThumbnail, w = { height: o }, b = "event-modeling-grid-slice-cell event-modeling-grid-slice-cell--centered event-modeling-grid-slice-cell--ui";
7200
+ }, Nd = ({ elements: e, windowSize: t, layout: n, collapsed: r = !1, conn: i, rowHeight: o, actorId: s, hasScreen: d = !1, renderThumbnail: u }) => {
7201
+ const { readOnly: l, sliceId: c } = De(), { editing: f, actions: y, readOnly: h } = K(), { onPrototypeOpened: m, onPrototypeAdded: g } = f, v = A(null), [p, w] = F(), b = Si().prototypeThumbnail, S = { height: o }, C = "event-modeling-grid-slice-cell event-modeling-grid-slice-cell--centered event-modeling-grid-slice-cell--ui";
7196
7202
  if (r) return /* @__PURE__ */ a("div", {
7197
- style: w,
7198
- className: b
7203
+ style: S,
7204
+ className: C
7205
+ });
7206
+ const L = e.length > 0 || d, N = !l && c && m && c && m ? () => m(c, s, v.current?.getBoundingClientRect() ?? new DOMRect()) : h ? () => w(v.current?.getBoundingClientRect() ?? new DOMRect()) : void 0, O = /* @__PURE__ */ a(wi, {
7207
+ elements: [...e],
7208
+ windowSize: t,
7209
+ layout: n,
7210
+ onClick: N,
7211
+ openTitle: h ? b.openPreview : void 0
7199
7212
  });
7200
- const S = e.length > 0, C = !d && c && y && c && y ? () => y(c, s, m.current?.getBoundingClientRect() ?? new DOMRect()) : f ? () => v(m.current?.getBoundingClientRect() ?? new DOMRect()) : void 0;
7201
- return /* @__PURE__ */ k("div", {
7202
- style: w,
7203
- className: b,
7213
+ return /* @__PURE__ */ x("div", {
7214
+ style: S,
7215
+ className: C,
7204
7216
  children: [
7205
- i.bottomOutgoing && S && /* @__PURE__ */ a(Ke, {}),
7206
- i.bottomIncoming && S && /* @__PURE__ */ a(Qe, {}),
7207
- /* @__PURE__ */ k("div", {
7217
+ i.bottomOutgoing && L && /* @__PURE__ */ a(Ke, {}),
7218
+ i.bottomIncoming && L && /* @__PURE__ */ a(Qe, {}),
7219
+ /* @__PURE__ */ x("div", {
7208
7220
  className: "event-modeling-grid-slice-cell-items",
7209
- children: [S && /* @__PURE__ */ a("div", {
7210
- ref: m,
7211
- className: `event-modeling-grid-ui-preview${C ? " event-modeling-grid-ui-preview--clickable" : ""}`,
7221
+ children: [L && /* @__PURE__ */ a("div", {
7222
+ ref: v,
7223
+ className: `event-modeling-grid-ui-preview${N ? " event-modeling-grid-ui-preview--clickable" : ""}`,
7212
7224
  "data-flow-node": ue.ui,
7213
- children: /* @__PURE__ */ a(wi, {
7214
- elements: [...e],
7225
+ children: u ? u({
7226
+ elements: e,
7215
7227
  windowSize: t,
7216
7228
  layout: n,
7217
- onClick: C,
7218
- openTitle: f ? h.openPreview : void 0
7219
- })
7220
- }), g && /* @__PURE__ */ a(yi, {
7229
+ onClick: N,
7230
+ openTitle: h ? b.openPreview : void 0,
7231
+ fallback: O
7232
+ }) : O
7233
+ }), p && /* @__PURE__ */ a(yi, {
7221
7234
  elements: e,
7222
7235
  windowSize: t,
7223
7236
  layout: n,
7224
- sourceRect: g,
7225
- onClose: () => v(void 0)
7237
+ sourceRect: p,
7238
+ onClose: () => w(void 0)
7226
7239
  })]
7227
7240
  }),
7228
- !d && c && p && !S && /* @__PURE__ */ a(Ge, {
7241
+ !l && c && g && !L && /* @__PURE__ */ a(Ge, {
7229
7242
  placement: Te.add,
7230
7243
  children: /* @__PURE__ */ a(kd, {
7231
- templates: u.prototypeTemplates ?? [],
7232
- onFromScratch: (O) => p(c, s, O),
7233
- onFromTemplate: (O, N) => O.onChosen(c, s, N)
7244
+ templates: y.prototypeTemplates ?? [],
7245
+ onFromScratch: (j) => g(c, s, j),
7246
+ onFromTemplate: (j, H) => j.onChosen(c, s, H)
7234
7247
  })
7235
7248
  })
7236
7249
  ]
@@ -7253,7 +7266,7 @@ var Sc = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(ee,
7253
7266
  style: { height: r },
7254
7267
  className: i,
7255
7268
  children: /* @__PURE__ */ a(Kn, {})
7256
- }) : /* @__PURE__ */ k("div", {
7269
+ }) : /* @__PURE__ */ x("div", {
7257
7270
  style: { height: r },
7258
7271
  "data-card-id": "chat",
7259
7272
  "data-slice-id": e.toString(),
@@ -7269,16 +7282,16 @@ var Sc = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(ee,
7269
7282
  if (e) return /* @__PURE__ */ a("div", {
7270
7283
  style: { height: n },
7271
7284
  className: d,
7272
- children: Array.from({ length: r }, (l, u) => /* @__PURE__ */ a("div", { className: "event-modeling-grid-mini-card event-modeling-grid-mini-card--event" }, u))
7285
+ children: Array.from({ length: r }, (l, c) => /* @__PURE__ */ a("div", { className: "event-modeling-grid-mini-card event-modeling-grid-mini-card--event" }, c))
7273
7286
  });
7274
- const c = r > 0;
7275
- return /* @__PURE__ */ k("div", {
7287
+ const u = r > 0;
7288
+ return /* @__PURE__ */ x("div", {
7276
7289
  style: { height: n },
7277
7290
  className: d,
7278
7291
  children: [
7279
- t.topIncoming && c && /* @__PURE__ */ a(ft, {}),
7280
- t.topOutgoing && c && /* @__PURE__ */ a(bt, {}),
7281
- /* @__PURE__ */ k("div", {
7292
+ t.topIncoming && u && /* @__PURE__ */ a(ft, {}),
7293
+ t.topOutgoing && u && /* @__PURE__ */ a(bt, {}),
7294
+ /* @__PURE__ */ x("div", {
7282
7295
  className: "event-modeling-grid-slice-cell-cards",
7283
7296
  children: [i, o]
7284
7297
  }),
@@ -7286,11 +7299,11 @@ var Sc = ({ slice: e, contentRows: t, rowHeights: n }) => /* @__PURE__ */ a(ee,
7286
7299
  ]
7287
7300
  });
7288
7301
  }, Rd = ({ sliceId: e, event: t, renameable: n, showDetails: r = !1 }) => {
7289
- const { editing: i, actions: o, selection: s, messages: d } = K(), c = ve(), [l, u] = F(t.name), [f, y] = F(void 0);
7290
- re(() => u(t.name), [t.name]);
7291
- const p = i.onEventRenamed, m = n && !c && !!p, g = !!s.selectedArtifactId?.equals(t.id), v = () => {
7292
- const h = f?.trim() ?? "";
7293
- y(void 0), !(!h || !p) && u(p(e, t.id, h) ?? h);
7302
+ const { editing: i, actions: o, selection: s, messages: d } = K(), u = ve(), [l, c] = F(t.name), [f, y] = F(void 0);
7303
+ re(() => c(t.name), [t.name]);
7304
+ const h = i.onEventRenamed, m = n && !u && !!h, g = !!s.selectedArtifactId?.equals(t.id), v = () => {
7305
+ const p = f?.trim() ?? "";
7306
+ y(void 0), !(!p || !h) && c(h(e, t.id, p) ?? p);
7294
7307
  };
7295
7308
  return f !== void 0 ? /* @__PURE__ */ a("div", {
7296
7309
  className: "event-modeling-grid-event-wrapper",
@@ -7347,10 +7360,10 @@ function li(e, t) {
7347
7360
  if (!s) return;
7348
7361
  const d = s.closest(Ad);
7349
7362
  if (!d) return;
7350
- const c = d.querySelector(`[data-event-id="${e.toString()}"]`)?.closest(".event-modeling-grid-event-wrapper");
7351
- d.classList.add(Qn), s.classList.add(ut), c?.classList.add(ut), r.current = {
7363
+ const u = d.querySelector(`[data-event-id="${e.toString()}"]`)?.closest(".event-modeling-grid-event-wrapper");
7364
+ d.classList.add(Qn), s.classList.add(ut), u?.classList.add(ut), r.current = {
7352
7365
  board: d,
7353
- origin: c
7366
+ origin: u
7354
7367
  };
7355
7368
  }, [e]), o = q(() => {
7356
7369
  const s = r.current;
@@ -7370,12 +7383,12 @@ function li(e, t) {
7370
7383
  };
7371
7384
  }
7372
7385
  var Od = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: i, onNavigate: o, ariaLabel: s, ...d }) => {
7373
- const c = !!n && !n.equals(de.empty) && !!o, l = li(n ?? de.empty, o);
7374
- return /* @__PURE__ */ k("div", {
7386
+ const u = !!n && !n.equals(de.empty) && !!o, l = li(n ?? de.empty, o);
7387
+ return /* @__PURE__ */ x("div", {
7375
7388
  ref: l.ref,
7376
7389
  className: "event-modeling-grid-event-wrapper event-modeling-grid-event-wrapper--reference",
7377
- onMouseEnter: c ? l.onMouseEnter : void 0,
7378
- onMouseLeave: c ? l.onMouseLeave : void 0,
7390
+ onMouseEnter: u ? l.onMouseEnter : void 0,
7391
+ onMouseLeave: u ? l.onMouseLeave : void 0,
7379
7392
  children: [/* @__PURE__ */ a(Ue, {
7380
7393
  name: t,
7381
7394
  backgroundColor: $n.background,
@@ -7384,18 +7397,18 @@ var Od = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: i,
7384
7397
  onSelected: i,
7385
7398
  ariaLabel: s,
7386
7399
  ...d
7387
- }), c && /* @__PURE__ */ a(si, { onClick: l.handleNavigate })]
7400
+ }), u && /* @__PURE__ */ a(si, { onClick: l.handleNavigate })]
7388
7401
  });
7389
7402
  }, Ld = ({ event: e, selectable: t, showDetails: n = !1, projectedFromTheRight: r = !1 }) => {
7390
- const { selection: i, navigation: o, messages: s } = K(), d = de.parse(e.sourceEventId ?? de.empty.toString()), c = li(d, o.onNavigateToEvent), l = !!i.selectedArtifactId?.equals(e.id), u = i.onArtifactSelected;
7391
- return /* @__PURE__ */ k("div", {
7392
- ref: c.ref,
7403
+ const { selection: i, navigation: o, messages: s } = K(), d = de.parse(e.sourceEventId ?? de.empty.toString()), u = li(d, o.onNavigateToEvent), l = !!i.selectedArtifactId?.equals(e.id), c = i.onArtifactSelected;
7404
+ return /* @__PURE__ */ x("div", {
7405
+ ref: u.ref,
7393
7406
  className: `event-modeling-grid-event-wrapper event-modeling-grid-event-wrapper--reference event-modeling-event-reference${r ? " event-modeling-event-reference--out-of-order" : ""}`,
7394
7407
  "data-out-of-order": r || void 0,
7395
7408
  title: r ? s.events.projectedFromTheRight : void 0,
7396
7409
  "data-flow-node": ue.event,
7397
- onMouseEnter: c.onMouseEnter,
7398
- onMouseLeave: c.onMouseLeave,
7410
+ onMouseEnter: u.onMouseEnter,
7411
+ onMouseLeave: u.onMouseLeave,
7399
7412
  children: [
7400
7413
  /* @__PURE__ */ a(me, {
7401
7414
  content: /* @__PURE__ */ a(Ve, {
@@ -7408,7 +7421,7 @@ var Od = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: i,
7408
7421
  backgroundColor: pe.background,
7409
7422
  textColor: pe.text,
7410
7423
  isSelected: l,
7411
- onSelected: t && u ? () => u(e.id) : void 0,
7424
+ onSelected: t && c ? () => c(e.id) : void 0,
7412
7425
  ariaLabel: `${s.events.openEvent} ${e.name}`,
7413
7426
  ariaPressed: l,
7414
7427
  "data-event-id": e.id.toString(),
@@ -7426,7 +7439,7 @@ var Od = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: i,
7426
7439
  "aria-label": s.events.projectedFromTheRight,
7427
7440
  children: "!"
7428
7441
  }),
7429
- /* @__PURE__ */ a(si, { onClick: c.handleNavigate })
7442
+ /* @__PURE__ */ a(si, { onClick: u.handleNavigate })
7430
7443
  ]
7431
7444
  });
7432
7445
  }, Td = (e, t, n) => {
@@ -7437,7 +7450,7 @@ var Od = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: i,
7437
7450
  const n = new Set(e.events.flatMap((i) => i.sourceEventId ? [i.sourceEventId] : [])), r = new Set(e.events.map((i) => i.name));
7438
7451
  return t.filter((i) => !n.has(i.id.toString()) && !r.has(i.name));
7439
7452
  }, Dd = ({ slice: e, collapsed: t = !1, conn: n, rowHeight: r, priorEvents: i, followingEvents: o = [], showDetails: s = !1 }) => {
7440
- const { editing: d, actions: c, messages: l } = K(), u = ve(), { onEventAdded: f, onEventReferenced: y } = d, p = pn(e.sliceType), m = bd(e.sliceType, e.events.length), g = Pd(e, i), v = Td(e, i, o), h = (c.eventsRow ?? []).filter((b) => !b.when || b.when(e)), w = (b) => y && /* @__PURE__ */ a(Jr, {
7453
+ const { editing: d, actions: u, messages: l } = K(), c = ve(), { onEventAdded: f, onEventReferenced: y } = d, h = pn(e.sliceType), m = bd(e.sliceType, e.events.length), g = Pd(e, i), v = Td(e, i, o), p = (u.eventsRow ?? []).filter((b) => !b.when || b.when(e)), w = (b) => y && /* @__PURE__ */ a(Jr, {
7441
7454
  options: g,
7442
7455
  nameOf: (S) => S.name,
7443
7456
  onSelect: (S) => y(e.id, S),
@@ -7451,20 +7464,20 @@ var Od = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: i,
7451
7464
  conn: n,
7452
7465
  rowHeight: r,
7453
7466
  eventCount: e.events.length,
7454
- after: !u && m && w(!0),
7455
- corners: /* @__PURE__ */ k(ee, { children: [
7456
- !u && h.length > 0 && /* @__PURE__ */ a(Ge, {
7467
+ after: !c && m && w(!0),
7468
+ corners: /* @__PURE__ */ x(ee, { children: [
7469
+ !c && p.length > 0 && /* @__PURE__ */ a(Ge, {
7457
7470
  placement: Te.top,
7458
- children: h.map((b) => /* @__PURE__ */ a(hn, { action: b }, b.tooltip))
7471
+ children: p.map((b) => /* @__PURE__ */ a(hn, { action: b }, b.tooltip))
7459
7472
  }),
7460
- !u && !p && f && /* @__PURE__ */ a(fd, {
7473
+ !c && !h && f && /* @__PURE__ */ a(fd, {
7461
7474
  placement: Te.add,
7462
7475
  action: {
7463
7476
  tooltip: l.events.addEvent,
7464
7477
  onActivate: (b) => f(b)
7465
7478
  }
7466
7479
  }),
7467
- !u && p && !m && y && /* @__PURE__ */ a(Ge, {
7480
+ !c && h && !m && y && /* @__PURE__ */ a(Ge, {
7468
7481
  placement: Te.add,
7469
7482
  children: w(!1)
7470
7483
  })
@@ -7482,16 +7495,16 @@ var Od = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: i,
7482
7495
  }, b.id.toString()))
7483
7496
  });
7484
7497
  }, er = ({ sliceId: e, kind: t, artifactId: n, name: r, schema: i, showDetails: o = !1, onRenamed: s }) => {
7485
- const { actions: d, selection: c, messages: l } = K(), u = ve(), [f, y] = F(r), [p, m] = F(void 0);
7498
+ const { actions: d, selection: u, messages: l } = K(), c = ve(), [f, y] = F(r), [h, m] = F(void 0);
7486
7499
  re(() => y(r), [r]);
7487
- const g = t === he.command, v = g ? d.commandCard : d.readModelCard, h = g ? et : nt, w = g ? l.interaction.command : l.interaction.readModel, b = !u && !!s, S = c.onArtifactSelected, C = () => {
7488
- const O = p?.trim() ?? "";
7489
- m(void 0), !(!O || !s) && (s(O), y(O));
7500
+ const g = t === he.command, v = g ? d.commandCard : d.readModelCard, p = g ? et : nt, w = g ? l.interaction.command : l.interaction.readModel, b = !c && !!s, S = u.onArtifactSelected, C = () => {
7501
+ const L = h?.trim() ?? "";
7502
+ m(void 0), !(!L || !s) && (s(L), y(L));
7490
7503
  };
7491
- return p !== void 0 ? /* @__PURE__ */ a(dn, {
7492
- value: p,
7493
- backgroundColor: h.background,
7494
- textColor: h.text,
7504
+ return h !== void 0 ? /* @__PURE__ */ a(dn, {
7505
+ value: h,
7506
+ backgroundColor: p.background,
7507
+ textColor: p.text,
7495
7508
  onChange: m,
7496
7509
  onCommit: C,
7497
7510
  onCancel: () => m(void 0)
@@ -7511,7 +7524,7 @@ var Od = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: i,
7511
7524
  showDetails: o,
7512
7525
  actions: v?.actions,
7513
7526
  onActivate: v?.onActivate,
7514
- isSelected: !!c.selectedArtifactId?.equals(n),
7527
+ isSelected: !!u.selectedArtifactId?.equals(n),
7515
7528
  onSelected: S ? () => S(n) : void 0,
7516
7529
  onStartEdit: b ? () => m(f) : void 0,
7517
7530
  ariaLabel: `${l.interaction.open} ${w}: ${f}`,
@@ -7525,9 +7538,9 @@ var Od = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: i,
7525
7538
  if (e) return /* @__PURE__ */ a("div", {
7526
7539
  style: o,
7527
7540
  className: Pt,
7528
- children: r.map((d, c) => /* @__PURE__ */ a("div", { className: `event-modeling-grid-mini-card event-modeling-grid-mini-card--${d}` }, c))
7541
+ children: r.map((d, u) => /* @__PURE__ */ a("div", { className: `event-modeling-grid-mini-card event-modeling-grid-mini-card--${d}` }, u))
7529
7542
  });
7530
- if (i.kind === "sideBySide") return /* @__PURE__ */ k("div", {
7543
+ if (i.kind === "sideBySide") return /* @__PURE__ */ x("div", {
7531
7544
  style: o,
7532
7545
  className: Pt,
7533
7546
  children: [
@@ -7539,25 +7552,25 @@ var Od = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: i,
7539
7552
  })
7540
7553
  ]
7541
7554
  });
7542
- const s = i.hasItems && /* @__PURE__ */ k(ee, { children: [
7555
+ const s = i.hasItems && /* @__PURE__ */ x(ee, { children: [
7543
7556
  t.topOutgoing && /* @__PURE__ */ a(bt, {}),
7544
7557
  t.topIncoming && /* @__PURE__ */ a(ft, {}),
7545
7558
  t.bottomOutgoing && /* @__PURE__ */ a(Ke, {}),
7546
7559
  t.bottomIncoming && /* @__PURE__ */ a(Qe, {})
7547
7560
  ] });
7548
- return i.kind === "split" ? /* @__PURE__ */ k("div", {
7561
+ return i.kind === "split" ? /* @__PURE__ */ x("div", {
7549
7562
  style: o,
7550
7563
  className: "event-modeling-grid-slice-cell event-modeling-grid-slice-cell--translator event-modeling-grid-slice-cell--interaction",
7551
7564
  children: [
7552
7565
  s,
7553
- /* @__PURE__ */ k("div", {
7566
+ /* @__PURE__ */ x("div", {
7554
7567
  className: "event-modeling-grid-slice-cell--translator-external",
7555
7568
  children: [/* @__PURE__ */ a("div", {
7556
7569
  className: "event-modeling-grid-slice-cell-cards",
7557
7570
  children: i.left
7558
7571
  }), i.leftCorner]
7559
7572
  }),
7560
- /* @__PURE__ */ k("div", {
7573
+ /* @__PURE__ */ x("div", {
7561
7574
  className: "event-modeling-grid-slice-cell--translator-regular",
7562
7575
  children: [/* @__PURE__ */ a("div", {
7563
7576
  className: "event-modeling-grid-slice-cell-cards",
@@ -7565,7 +7578,7 @@ var Od = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: i,
7565
7578
  }), i.rightCorner]
7566
7579
  })
7567
7580
  ]
7568
- }) : /* @__PURE__ */ k("div", {
7581
+ }) : /* @__PURE__ */ x("div", {
7569
7582
  style: o,
7570
7583
  className: Pt,
7571
7584
  children: [
@@ -7581,7 +7594,7 @@ var Od = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: i,
7581
7594
  return e.command = "command", e.readModel = "readmodel", e;
7582
7595
  })({}), _d = ({ label: e, defineLabel: t, onDefine: n }) => {
7583
7596
  const r = A(null);
7584
- return /* @__PURE__ */ k("div", {
7597
+ return /* @__PURE__ */ x("div", {
7585
7598
  className: "event-modeling-grid-optional-read-model",
7586
7599
  ref: r,
7587
7600
  children: [/* @__PURE__ */ a("div", {
@@ -7610,7 +7623,7 @@ var Od = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: i,
7610
7623
  return [...e.externalEvents.map(() => _e.readModel), ...e.command ? [_e.command] : []];
7611
7624
  }
7612
7625
  }, $d = ({ slice: e, collapsed: t = !1, conn: n, rowHeight: r, externalEventOptions: i = [], showDetails: o = !1 }) => {
7613
- const { editing: s, actions: d, selection: c, navigation: l, messages: u } = K(), f = ve(), { onCommandRenamed: y, onReadModelRenamed: p, onReadModelAdded: m, onExternalEventAdded: g } = s, v = (d.interactionRow ?? []).filter((H) => !H.when || H.when(e)), h = Fd(e), w = c.onArtifactSelected, { command: b, readModel: S } = e, C = b && /* @__PURE__ */ a(er, {
7626
+ const { editing: s, actions: d, selection: u, navigation: l, messages: c } = K(), f = ve(), { onCommandRenamed: y, onReadModelRenamed: h, onReadModelAdded: m, onExternalEventAdded: g } = s, v = (d.interactionRow ?? []).filter((H) => !H.when || H.when(e)), p = Fd(e), w = u.onArtifactSelected, { command: b, readModel: S } = e, C = b && /* @__PURE__ */ a(er, {
7614
7627
  sliceId: e.id,
7615
7628
  kind: he.command,
7616
7629
  artifactId: b.id,
@@ -7618,19 +7631,19 @@ var Od = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: i,
7618
7631
  schema: b.schema,
7619
7632
  showDetails: o,
7620
7633
  onRenamed: y && ((H) => y(e.id, b.id, H))
7621
- }, b.id.toString()), O = S && /* @__PURE__ */ a(er, {
7634
+ }, b.id.toString()), L = S && /* @__PURE__ */ a(er, {
7622
7635
  sliceId: e.id,
7623
7636
  kind: he.readModel,
7624
7637
  artifactId: S.id,
7625
7638
  name: S.name,
7626
7639
  schema: S.schema,
7627
7640
  showDetails: o,
7628
- onRenamed: p && ((H) => p(e.id, S.id, H))
7641
+ onRenamed: h && ((H) => h(e.id, S.id, H))
7629
7642
  }, S.id.toString()), N = (H) => {
7630
- const x = `${u.interaction.open} ${u.interaction.externalEvent}: ${H.name}`, T = i.find((W) => W.name === H.name)?.schema;
7643
+ const M = `${c.interaction.open} ${c.interaction.externalEvent}: ${H.name}`, T = i.find((W) => W.name === H.name)?.schema;
7631
7644
  return /* @__PURE__ */ a(me, {
7632
7645
  content: /* @__PURE__ */ a(Ve, {
7633
- title: `${u.interaction.doubleClickToRenamePrefix} ${u.interaction.externalEvent}: ${H.name}`,
7646
+ title: `${c.interaction.doubleClickToRenamePrefix} ${c.interaction.externalEvent}: ${H.name}`,
7634
7647
  schema: T
7635
7648
  }),
7636
7649
  position: "top",
@@ -7641,15 +7654,15 @@ var Od = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: i,
7641
7654
  name: H.name,
7642
7655
  sourceEventId: H.sourceEventId ? de.parse(H.sourceEventId) : void 0,
7643
7656
  onNavigate: l.onNavigateToEvent,
7644
- isSelected: !!c.selectedArtifactId?.equals(H.id),
7657
+ isSelected: !!u.selectedArtifactId?.equals(H.id),
7645
7658
  onSelected: w ? () => w(H.id) : void 0,
7646
- ariaLabel: x,
7659
+ ariaLabel: M,
7647
7660
  "data-card-id": H.id.toString(),
7648
7661
  "data-slice-id": e.id.toString()
7649
7662
  })
7650
7663
  })
7651
7664
  }, H.id.toString());
7652
- }, L = !f && v.length > 0 && /* @__PURE__ */ a(Ge, {
7665
+ }, O = !f && v.length > 0 && /* @__PURE__ */ a(Ge, {
7653
7666
  placement: Te.add,
7654
7667
  children: v.map((H) => /* @__PURE__ */ a(hn, { action: H }, H.tooltip))
7655
7668
  });
@@ -7658,19 +7671,19 @@ var Od = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: i,
7658
7671
  return /* @__PURE__ */ a(Dt, {
7659
7672
  conn: n,
7660
7673
  rowHeight: r,
7661
- miniCards: h,
7674
+ miniCards: p,
7662
7675
  layout: {
7663
7676
  kind: "sideBySide",
7664
7677
  readModelOnTop: !!e.readModel,
7665
7678
  commandBelow: !!e.command,
7666
7679
  hasLeftCard: !!e.readModel || H,
7667
7680
  hasRightCard: !!e.command,
7668
- cards: /* @__PURE__ */ k(ee, { children: [
7669
- O,
7681
+ cards: /* @__PURE__ */ x(ee, { children: [
7682
+ L,
7670
7683
  H && /* @__PURE__ */ a(_d, {
7671
- label: u.interaction.readModel,
7672
- defineLabel: u.interaction.defineReadModel,
7673
- onDefine: (x) => m(e.id, x)
7684
+ label: c.interaction.readModel,
7685
+ defineLabel: c.interaction.defineReadModel,
7686
+ onDefine: (M) => m(e.id, M)
7674
7687
  }),
7675
7688
  C
7676
7689
  ] })
@@ -7678,11 +7691,11 @@ var Od = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: i,
7678
7691
  });
7679
7692
  }
7680
7693
  if (e.sliceType === B.translator && !t) {
7681
- const H = new Set(e.externalEvents.map((x) => x.name));
7694
+ const H = new Set(e.externalEvents.map((M) => M.name));
7682
7695
  return /* @__PURE__ */ a(Dt, {
7683
7696
  conn: n,
7684
7697
  rowHeight: r,
7685
- miniCards: h,
7698
+ miniCards: p,
7686
7699
  layout: {
7687
7700
  kind: "split",
7688
7701
  hasItems: e.externalEvents.length > 0 || !!e.command,
@@ -7690,30 +7703,30 @@ var Od = ({ id: e, name: t, sourceEventId: n, isSelected: r = !1, onSelected: i,
7690
7703
  leftCorner: !f && yd(e.sliceType) && g && /* @__PURE__ */ a(Ge, {
7691
7704
  placement: Te.add,
7692
7705
  children: /* @__PURE__ */ a(Jr, {
7693
- options: i.filter((x) => !H.has(x.name)),
7694
- nameOf: (x) => x.name,
7695
- onSelect: (x) => g(e.id, x),
7696
- label: u.interaction.addExternalEvent,
7697
- searchPlaceholder: u.interaction.searchExternalEvents,
7698
- emptyLabel: u.interaction.noExternalEventsAvailable
7706
+ options: i.filter((M) => !H.has(M.name)),
7707
+ nameOf: (M) => M.name,
7708
+ onSelect: (M) => g(e.id, M),
7709
+ label: c.interaction.addExternalEvent,
7710
+ searchPlaceholder: c.interaction.searchExternalEvents,
7711
+ emptyLabel: c.interaction.noExternalEventsAvailable
7699
7712
  })
7700
7713
  }),
7701
7714
  right: C,
7702
- rightCorner: L
7715
+ rightCorner: O
7703
7716
  }
7704
7717
  });
7705
7718
  }
7706
- const j = e.sliceType === B.stateView ? O : e.sliceType === B.automation ? /* @__PURE__ */ k(ee, { children: [O, C] }) : e.sliceType === B.translator ? /* @__PURE__ */ k(ee, { children: [e.externalEvents.map(N), C] }) : C;
7719
+ const j = e.sliceType === B.stateView ? L : e.sliceType === B.automation ? /* @__PURE__ */ x(ee, { children: [L, C] }) : e.sliceType === B.translator ? /* @__PURE__ */ x(ee, { children: [e.externalEvents.map(N), C] }) : C;
7707
7720
  return /* @__PURE__ */ a(Dt, {
7708
7721
  collapsed: t,
7709
7722
  conn: n,
7710
7723
  rowHeight: r,
7711
- miniCards: h,
7724
+ miniCards: p,
7712
7725
  layout: {
7713
7726
  kind: "centered",
7714
- hasItems: h.length > 0,
7727
+ hasItems: p.length > 0,
7715
7728
  cards: j,
7716
- corners: L
7729
+ corners: O
7717
7730
  }
7718
7731
  });
7719
7732
  };