@emporix/process-diagram 2.0.0-beta.8 → 2.0.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 (81) hide show
  1. package/dist/App.d.ts.map +1 -1
  2. package/dist/components/ProcessDiagram.d.ts +12 -11
  3. package/dist/components/ProcessDiagram.d.ts.map +1 -1
  4. package/dist/components/common/AlertIcon.d.ts.map +1 -1
  5. package/dist/components/common/Line.d.ts +2 -1
  6. package/dist/components/common/Line.d.ts.map +1 -1
  7. package/dist/components/common/icons/ConditionIcon.d.ts.map +1 -1
  8. package/dist/components/common/icons/IteratorIcon.d.ts.map +1 -1
  9. package/dist/components/common/icons/LoopIcon.d.ts.map +1 -1
  10. package/dist/components/common/icons/MenuFilterIcon.d.ts.map +1 -1
  11. package/dist/components/common/icons.d.ts +1 -1
  12. package/dist/components/common/icons.d.ts.map +1 -1
  13. package/dist/components/common/menuTemplate.d.ts.map +1 -1
  14. package/dist/components/condition/Condition.d.ts +4 -1
  15. package/dist/components/condition/Condition.d.ts.map +1 -1
  16. package/dist/components/curve/Curve.d.ts +4 -1
  17. package/dist/components/curve/Curve.d.ts.map +1 -1
  18. package/dist/components/if-statement/IfStatement.d.ts +12 -3
  19. package/dist/components/if-statement/IfStatement.d.ts.map +1 -1
  20. package/dist/components/iterator/Iterator.d.ts +9 -10
  21. package/dist/components/iterator/Iterator.d.ts.map +1 -1
  22. package/dist/components/menu/Menu.d.ts.map +1 -1
  23. package/dist/components/menu/Separator.d.ts.map +1 -1
  24. package/dist/components/plus-button/PlusButton.d.ts +8 -6
  25. package/dist/components/plus-button/PlusButton.d.ts.map +1 -1
  26. package/dist/components/plus-button/PlusIcon.d.ts.map +1 -1
  27. package/dist/components/process-debugger-diagram/DebuggerIterator.d.ts +14 -0
  28. package/dist/components/process-debugger-diagram/DebuggerIterator.d.ts.map +1 -0
  29. package/dist/components/process-debugger-diagram/DebuggerRow.d.ts +15 -0
  30. package/dist/components/process-debugger-diagram/DebuggerRow.d.ts.map +1 -0
  31. package/dist/components/process-debugger-diagram/DebuggerSteps.d.ts +19 -0
  32. package/dist/components/process-debugger-diagram/DebuggerSteps.d.ts.map +1 -0
  33. package/dist/components/process-debugger-diagram/ProcessDebuggerContext.d.ts +10 -0
  34. package/dist/components/process-debugger-diagram/ProcessDebuggerContext.d.ts.map +1 -0
  35. package/dist/components/process-debugger-diagram/ProcessDebuggerDiagram.d.ts +18 -0
  36. package/dist/components/process-debugger-diagram/ProcessDebuggerDiagram.d.ts.map +1 -0
  37. package/dist/components/process-debugger-diagram/StepConnector.d.ts +10 -0
  38. package/dist/components/process-debugger-diagram/StepConnector.d.ts.map +1 -0
  39. package/dist/components/processDiagram.storyFixtures.d.ts +19 -0
  40. package/dist/components/processDiagram.storyFixtures.d.ts.map +1 -0
  41. package/dist/components/row/Row.d.ts +7 -9
  42. package/dist/components/row/Row.d.ts.map +1 -1
  43. package/dist/components/step/Step.d.ts +16 -6
  44. package/dist/components/step/Step.d.ts.map +1 -1
  45. package/dist/components/steps/Steps.d.ts +5 -8
  46. package/dist/components/steps/Steps.d.ts.map +1 -1
  47. package/dist/components/triggers/AddTriggerIcon.d.ts.map +1 -1
  48. package/dist/components/triggers/MultipleTriggersIcon.d.ts +3 -1
  49. package/dist/components/triggers/MultipleTriggersIcon.d.ts.map +1 -1
  50. package/dist/components/triggers/Trigger.d.ts +16 -5
  51. package/dist/components/triggers/Trigger.d.ts.map +1 -1
  52. package/dist/constants/colors.d.ts +23 -0
  53. package/dist/constants/colors.d.ts.map +1 -0
  54. package/dist/fixtures/one.d.ts +4 -0
  55. package/dist/fixtures/one.d.ts.map +1 -0
  56. package/dist/helpers/debuggerConnector.helpers.d.ts +4 -0
  57. package/dist/helpers/debuggerConnector.helpers.d.ts.map +1 -0
  58. package/dist/helpers/debuggerStatus.helpers.d.ts +15 -0
  59. package/dist/helpers/debuggerStatus.helpers.d.ts.map +1 -0
  60. package/dist/helpers/diagramMenu.helpers.d.ts +5 -0
  61. package/dist/helpers/diagramMenu.helpers.d.ts.map +1 -0
  62. package/dist/helpers/finishedSequentialLine.helpers.d.ts +18 -0
  63. package/dist/helpers/finishedSequentialLine.helpers.d.ts.map +1 -0
  64. package/dist/helpers/processGraph.helpers.d.ts +8 -0
  65. package/dist/helpers/processGraph.helpers.d.ts.map +1 -0
  66. package/dist/index.cjs +1 -1
  67. package/dist/index.cjs.map +1 -1
  68. package/dist/index.d.ts +5 -0
  69. package/dist/index.d.ts.map +1 -1
  70. package/dist/index.mjs +1943 -1057
  71. package/dist/index.mjs.map +1 -1
  72. package/dist/setupTests.d.ts +1 -1
  73. package/dist/setupTests.d.ts.map +1 -1
  74. package/dist/style.css +1 -1
  75. package/dist/types/index.d.ts +16 -2
  76. package/dist/types/index.d.ts.map +1 -1
  77. package/dist/types/menu.d.ts +40 -0
  78. package/dist/types/menu.d.ts.map +1 -0
  79. package/package.json +5 -5
  80. package/dist/components/iterator/LoopBoxIcon.d.ts +0 -8
  81. package/dist/components/iterator/LoopBoxIcon.d.ts.map +0 -1
package/dist/index.mjs CHANGED
@@ -1,266 +1,272 @@
1
- import { jsxs as h, Fragment as n1, jsx as e } from "react/jsx-runtime";
2
- import W, { forwardRef as k1, useState as E, useRef as $, useCallback as D, useImperativeHandle as B1, useEffect as Y, createContext as P1, useMemo as H, useContext as M1, useLayoutEffect as L1 } from "react";
3
- import { createPortal as E1 } from "react-dom";
4
- const $1 = "_container_1vo7a_1", T1 = "_step_1vo7a_7", O1 = "_selected_1vo7a_23", j1 = "_selectedInvalid_1vo7a_29", H1 = "_isSet_1vo7a_35", S1 = "_invalid_1vo7a_39", W1 = "_filterFlag_1vo7a_45", R1 = "_title_1vo7a_73", z1 = "_icon_1vo7a_90", D1 = "_content_1vo7a_108", F1 = "_dotsButton_1vo7a_114", N = {
5
- container: $1,
6
- step: T1,
7
- selected: O1,
8
- selectedInvalid: j1,
9
- isSet: H1,
10
- invalid: S1,
11
- filterFlag: W1,
12
- title: R1,
13
- icon: z1,
14
- content: D1,
15
- dotsButton: F1
1
+ import { jsxs as C, Fragment as G, jsx as i } from "react/jsx-runtime";
2
+ import U, { forwardRef as ue, useState as O, useRef as $, useCallback as tt, useImperativeHandle as pe, useEffect as ot, createContext as Gt, useMemo as k, useContext as Vt, useLayoutEffect as he } from "react";
3
+ import { createPortal as fe } from "react-dom";
4
+ const ge = "_container_1f7x1_1", Ce = "_step_1f7x1_7", me = "_dotsButton_1f7x1_23", ve = "_selected_1f7x1_27", _e = "_selectedInvalid_1f7x1_36", xe = "_isSet_1f7x1_45", we = "_invalid_1f7x1_52", be = "_debuggerStatus_1f7x1_60", ye = "_title_1f7x1_64", Ne = "_icon_1f7x1_67", Ie = "_filterFlag_1f7x1_78", Se = "_content_1f7x1_141", P = {
5
+ container: ge,
6
+ step: Ce,
7
+ dotsButton: me,
8
+ selected: ve,
9
+ selectedInvalid: _e,
10
+ isSet: xe,
11
+ invalid: we,
12
+ debuggerStatus: be,
13
+ title: ye,
14
+ icon: Ne,
15
+ filterFlag: Ie,
16
+ content: Se
16
17
  };
17
- var f1 = {
18
+ var Zt = {
18
19
  color: void 0,
19
20
  size: void 0,
20
21
  className: void 0,
21
22
  style: void 0,
22
23
  attr: void 0
23
- }, p1 = W.createContext && /* @__PURE__ */ W.createContext(f1), Z1 = ["attr", "size", "title"];
24
- function V1(t, n) {
24
+ }, Ft = U.createContext && /* @__PURE__ */ U.createContext(Zt), Le = ["attr", "size", "title"];
25
+ function Te(t, e) {
25
26
  if (t == null) return {};
26
- var o = Y1(t, n), i, r;
27
+ var n = Ee(t, e), s, o;
27
28
  if (Object.getOwnPropertySymbols) {
28
- var c = Object.getOwnPropertySymbols(t);
29
- for (r = 0; r < c.length; r++)
30
- i = c[r], !(n.indexOf(i) >= 0) && Object.prototype.propertyIsEnumerable.call(t, i) && (o[i] = t[i]);
29
+ var l = Object.getOwnPropertySymbols(t);
30
+ for (o = 0; o < l.length; o++)
31
+ s = l[o], !(e.indexOf(s) >= 0) && Object.prototype.propertyIsEnumerable.call(t, s) && (n[s] = t[s]);
31
32
  }
32
- return o;
33
+ return n;
33
34
  }
34
- function Y1(t, n) {
35
+ function Ee(t, e) {
35
36
  if (t == null) return {};
36
- var o = {};
37
- for (var i in t)
38
- if (Object.prototype.hasOwnProperty.call(t, i)) {
39
- if (n.indexOf(i) >= 0) continue;
40
- o[i] = t[i];
37
+ var n = {};
38
+ for (var s in t)
39
+ if (Object.prototype.hasOwnProperty.call(t, s)) {
40
+ if (e.indexOf(s) >= 0) continue;
41
+ n[s] = t[s];
41
42
  }
42
- return o;
43
+ return n;
43
44
  }
44
- function G() {
45
- return G = Object.assign ? Object.assign.bind() : function(t) {
46
- for (var n = 1; n < arguments.length; n++) {
47
- var o = arguments[n];
48
- for (var i in o)
49
- Object.prototype.hasOwnProperty.call(o, i) && (t[i] = o[i]);
45
+ function gt() {
46
+ return gt = Object.assign ? Object.assign.bind() : function(t) {
47
+ for (var e = 1; e < arguments.length; e++) {
48
+ var n = arguments[e];
49
+ for (var s in n)
50
+ Object.prototype.hasOwnProperty.call(n, s) && (t[s] = n[s]);
50
51
  }
51
52
  return t;
52
- }, G.apply(this, arguments);
53
+ }, gt.apply(this, arguments);
53
54
  }
54
- function u1(t, n) {
55
- var o = Object.keys(t);
55
+ function Bt(t, e) {
56
+ var n = Object.keys(t);
56
57
  if (Object.getOwnPropertySymbols) {
57
- var i = Object.getOwnPropertySymbols(t);
58
- n && (i = i.filter(function(r) {
59
- return Object.getOwnPropertyDescriptor(t, r).enumerable;
60
- })), o.push.apply(o, i);
58
+ var s = Object.getOwnPropertySymbols(t);
59
+ e && (s = s.filter(function(o) {
60
+ return Object.getOwnPropertyDescriptor(t, o).enumerable;
61
+ })), n.push.apply(n, s);
61
62
  }
62
- return o;
63
+ return n;
63
64
  }
64
- function K(t) {
65
- for (var n = 1; n < arguments.length; n++) {
66
- var o = arguments[n] != null ? arguments[n] : {};
67
- n % 2 ? u1(Object(o), !0).forEach(function(i) {
68
- A1(t, i, o[i]);
69
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(o)) : u1(Object(o)).forEach(function(i) {
70
- Object.defineProperty(t, i, Object.getOwnPropertyDescriptor(o, i));
65
+ function Ct(t) {
66
+ for (var e = 1; e < arguments.length; e++) {
67
+ var n = arguments[e] != null ? arguments[e] : {};
68
+ e % 2 ? Bt(Object(n), !0).forEach(function(s) {
69
+ Pe(t, s, n[s]);
70
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : Bt(Object(n)).forEach(function(s) {
71
+ Object.defineProperty(t, s, Object.getOwnPropertyDescriptor(n, s));
71
72
  });
72
73
  }
73
74
  return t;
74
75
  }
75
- function A1(t, n, o) {
76
- return n = X1(n), n in t ? Object.defineProperty(t, n, { value: o, enumerable: !0, configurable: !0, writable: !0 }) : t[n] = o, t;
76
+ function Pe(t, e, n) {
77
+ return e = ke(e), e in t ? Object.defineProperty(t, e, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[e] = n, t;
77
78
  }
78
- function X1(t) {
79
- var n = G1(t, "string");
80
- return typeof n == "symbol" ? n : n + "";
79
+ function ke(t) {
80
+ var e = Re(t, "string");
81
+ return typeof e == "symbol" ? e : e + "";
81
82
  }
82
- function G1(t, n) {
83
+ function Re(t, e) {
83
84
  if (typeof t != "object" || !t) return t;
84
- var o = t[Symbol.toPrimitive];
85
- if (o !== void 0) {
86
- var i = o.call(t, n);
87
- if (typeof i != "object") return i;
85
+ var n = t[Symbol.toPrimitive];
86
+ if (n !== void 0) {
87
+ var s = n.call(t, e);
88
+ if (typeof s != "object") return s;
88
89
  throw new TypeError("@@toPrimitive must return a primitive value.");
89
90
  }
90
- return (n === "string" ? String : Number)(t);
91
+ return (e === "string" ? String : Number)(t);
91
92
  }
92
- function g1(t) {
93
- return t && t.map((n, o) => /* @__PURE__ */ W.createElement(n.tag, K({
94
- key: o
95
- }, n.attr), g1(n.child)));
93
+ function qt(t) {
94
+ return t && t.map((e, n) => /* @__PURE__ */ U.createElement(e.tag, Ct({
95
+ key: n
96
+ }, e.attr), qt(e.child)));
96
97
  }
97
- function Z(t) {
98
- return (n) => /* @__PURE__ */ W.createElement(K1, G({
99
- attr: K({}, t.attr)
100
- }, n), g1(t.child));
98
+ function Oe(t) {
99
+ return (e) => /* @__PURE__ */ U.createElement(Me, gt({
100
+ attr: Ct({}, t.attr)
101
+ }, e), qt(t.child));
101
102
  }
102
- function K1(t) {
103
- var n = (o) => {
103
+ function Me(t) {
104
+ var e = (n) => {
104
105
  var {
105
- attr: i,
106
- size: r,
107
- title: c
108
- } = t, d = V1(t, Z1), a = r || o.size || "1em", s;
109
- return o.className && (s = o.className), t.className && (s = (s ? s + " " : "") + t.className), /* @__PURE__ */ W.createElement("svg", G({
106
+ attr: s,
107
+ size: o,
108
+ title: l
109
+ } = t, c = Te(t, Le), p = o || n.size || "1em", a;
110
+ return n.className && (a = n.className), t.className && (a = (a ? a + " " : "") + t.className), /* @__PURE__ */ U.createElement("svg", gt({
110
111
  stroke: "currentColor",
111
112
  fill: "currentColor",
112
113
  strokeWidth: "0"
113
- }, o.attr, i, d, {
114
- className: s,
115
- style: K(K({
116
- color: t.color || o.color
117
- }, o.style), t.style),
118
- height: a,
119
- width: a,
114
+ }, n.attr, s, c, {
115
+ className: a,
116
+ style: Ct(Ct({
117
+ color: t.color || n.color
118
+ }, n.style), t.style),
119
+ height: p,
120
+ width: p,
120
121
  xmlns: "http://www.w3.org/2000/svg"
121
- }), c && /* @__PURE__ */ W.createElement("title", null, c), t.children);
122
+ }), l && /* @__PURE__ */ U.createElement("title", null, l), t.children);
122
123
  };
123
- return p1 !== void 0 ? /* @__PURE__ */ W.createElement(p1.Consumer, null, (o) => n(o)) : n(f1);
124
+ return Ft !== void 0 ? /* @__PURE__ */ U.createElement(Ft.Consumer, null, (n) => e(n)) : e(Zt);
124
125
  }
125
- function q1(t) {
126
- return Z({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M5.52.359A.5.5 0 0 1 6 0h4a.5.5 0 0 1 .474.658L8.694 6H12.5a.5.5 0 0 1 .395.807l-7 9a.5.5 0 0 1-.873-.454L6.823 9.5H3.5a.5.5 0 0 1-.48-.641zM6.374 1 4.168 8.5H7.5a.5.5 0 0 1 .478.647L6.78 13.04 11.478 7H8a.5.5 0 0 1-.474-.658L9.306 1z" }, child: [] }] })(t);
126
+ function mt(t) {
127
+ return Oe({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0" }, child: [] }] })(t);
127
128
  }
128
- function v1(t) {
129
- return Z({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M12.146.146a.5.5 0 0 1 .708 0l3 3a.5.5 0 0 1 0 .708l-10 10a.5.5 0 0 1-.168.11l-5 2a.5.5 0 0 1-.65-.65l2-5a.5.5 0 0 1 .11-.168zM11.207 2.5 13.5 4.793 14.793 3.5 12.5 1.207zm1.586 3L10.5 3.207 4 9.707V10h.5a.5.5 0 0 1 .5.5v.5h.5a.5.5 0 0 1 .5.5v.5h.293zm-9.761 5.175-.106.106-1.528 3.821 3.821-1.528.106-.106A.5.5 0 0 1 5 12.5V12h-.5a.5.5 0 0 1-.5-.5V11h-.5a.5.5 0 0 1-.468-.325" }, child: [] }] })(t);
130
- }
131
- function q(t) {
132
- return Z({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0" }, child: [] }] })(t);
133
- }
134
- function J(t) {
135
- return Z({ attr: { fill: "currentColor", viewBox: "0 0 16 16" }, child: [{ tag: "path", attr: { d: "M5.5 5.5A.5.5 0 0 1 6 6v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m2.5 0a.5.5 0 0 1 .5.5v6a.5.5 0 0 1-1 0V6a.5.5 0 0 1 .5-.5m3 .5a.5.5 0 0 0-1 0v6a.5.5 0 0 0 1 0z" }, child: [] }, { tag: "path", attr: { d: "M14.5 3a1 1 0 0 1-1 1H13v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V4h-.5a1 1 0 0 1-1-1V2a1 1 0 0 1 1-1H6a1 1 0 0 1 1-1h2a1 1 0 0 1 1 1h3.5a1 1 0 0 1 1 1zM4.118 4 4 4.059V13a1 1 0 0 0 1 1h6a1 1 0 0 0 1-1V4.059L11.882 4zM2.5 3h11V2h-11z" }, child: [] }] })(t);
136
- }
137
- const J1 = "_panel_19663_1", Q1 = "_panelExiting_19663_13", U1 = "_menuItem_19663_37", tt = "_disabled_19663_52", et = "_menuItemIcon_19663_57", nt = "_menuItemText_19663_63", ot = "_overlay_19663_69", O = {
138
- panel: J1,
139
- panelExiting: Q1,
140
- menuItem: U1,
141
- disabled: tt,
142
- menuItemIcon: et,
143
- menuItemText: nt,
144
- overlay: ot
145
- }, it = (t) => {
146
- const o = t.currentTarget ?? t.target;
147
- if (o?.getBoundingClientRect) {
148
- const r = o.getBoundingClientRect();
149
- return { top: r.bottom + 2, left: r.left };
129
+ const $e = "_panel_1uqzz_1", De = "_panelExiting_1uqzz_13", Fe = "_menuItem_1uqzz_37", Be = "_disabled_1uqzz_48", We = "_menuItemText_1uqzz_56", je = "_menuItemIcon_1uqzz_60", He = "_overlay_1uqzz_72", H = {
130
+ panel: $e,
131
+ panelExiting: De,
132
+ menuItem: Fe,
133
+ disabled: Be,
134
+ menuItemText: We,
135
+ menuItemIcon: je,
136
+ overlay: He
137
+ }, ze = (t) => {
138
+ const n = t.currentTarget ?? t.target;
139
+ if (n?.getBoundingClientRect) {
140
+ const o = n.getBoundingClientRect();
141
+ return { top: o.bottom + 2, left: o.left };
150
142
  }
151
- const i = t;
143
+ const s = t;
152
144
  return {
153
- top: (i.clientY ?? 0) + 2,
154
- left: i.clientX ?? 0
145
+ top: (s.clientY ?? 0) + 2,
146
+ left: s.clientX ?? 0
155
147
  };
156
- }, Q = k1(function({ model: n, popup: o = !0, onHide: i, onClick: r }, c) {
157
- const [d, a] = E(!1), [s, l] = E(!1), [f, b] = E({ top: 0, left: 0 }), _ = $(null), x = D(() => {
158
- s || l(!0);
159
- }, [s]), C = D(
160
- (m) => {
161
- s && m.animationName.includes("menuOut") && (a(!1), l(!1), i?.());
148
+ }, xt = ue(function({ model: e, popup: n = !0, onHide: s, onClick: o }, l) {
149
+ const [c, p] = O(!1), [a, r] = O(!1), [d, g] = O({ top: 0, left: 0 }), b = $(null), h = tt(() => {
150
+ a || (s?.(), r(!0));
151
+ }, [a, s]), m = tt(
152
+ (v) => {
153
+ a && v.animationName.includes("menuOut") && (p(!1), r(!1));
162
154
  },
163
- [s, i]
164
- ), p = D((m) => {
165
- b(it(m)), l(!1), a(!0);
166
- }, []), I = D(
167
- (m) => {
168
- d ? x() : p(m);
155
+ [a]
156
+ ), x = tt((v) => {
157
+ g(ze(v)), r(!1), p(!0);
158
+ }, []), f = tt(
159
+ (v) => {
160
+ c ? h() : x(v);
169
161
  },
170
- [d, x, p]
162
+ [c, h, x]
171
163
  );
172
- B1(
173
- c,
164
+ pe(
165
+ l,
174
166
  () => ({
175
- show: p,
176
- hide: x,
177
- toggle: I
167
+ show: x,
168
+ hide: h,
169
+ toggle: f
178
170
  }),
179
- [p, x, I]
180
- ), Y(() => {
181
- if (!d) return;
182
- const m = (L) => {
183
- L.key === "Escape" && x();
184
- }, y = (L) => {
185
- const u = _.current;
186
- u && !u.contains(L.target) && (L.stopPropagation(), x());
171
+ [x, h, f]
172
+ ), ot(() => {
173
+ if (!c) return;
174
+ const v = (u) => {
175
+ u.key === "Escape" && h();
176
+ }, y = (u) => {
177
+ const _ = b.current;
178
+ !_ || _.contains(u.target) || (u.preventDefault(), u.stopPropagation(), h());
179
+ };
180
+ return document.addEventListener("keydown", v), document.addEventListener("mousedown", y, !0), document.addEventListener("click", y, !0), () => {
181
+ document.removeEventListener("keydown", v), document.removeEventListener("mousedown", y, !0), document.removeEventListener("click", y, !0);
187
182
  };
188
- return document.addEventListener("keydown", m), document.addEventListener("mousedown", y), () => {
189
- document.removeEventListener("keydown", m), document.removeEventListener("mousedown", y);
183
+ }, [c, h]);
184
+ const N = (v, y) => {
185
+ y.stopPropagation(), v.command?.({ originalEvent: y, item: v }), h();
186
+ }, E = (v, y) => {
187
+ const u = (_) => {
188
+ v.disabled || N(v, _);
190
189
  };
191
- }, [d, x]);
192
- const w = (m, y) => {
193
- y.stopPropagation(), m.command?.({ originalEvent: y, item: m }), x();
194
- }, v = (m, y) => {
195
- const L = (u) => w(m, u);
196
- return m.template ? /* @__PURE__ */ e(W.Fragment, { children: m.template(m, { onClick: L }) }, y) : /* @__PURE__ */ h(
190
+ return v.template ? /* @__PURE__ */ i(U.Fragment, { children: v.template(v, { onClick: u }) }, y) : /* @__PURE__ */ C(
197
191
  "button",
198
192
  {
199
193
  type: "button",
200
- className: `${O.menuItem} ${m.disabled && O.disabled}`,
201
- onClick: (u) => {
202
- m.disabled || L(u);
194
+ className: `${H.menuItem} ${v.disabled && H.disabled}`,
195
+ onClick: (_) => {
196
+ v.disabled || u(_);
203
197
  },
204
198
  children: [
205
- m.icon && /* @__PURE__ */ e("span", { className: O.menuItemIcon, children: m.icon }),
206
- /* @__PURE__ */ e("span", { className: O.menuItemText, children: m.label })
199
+ v.icon && /* @__PURE__ */ i("span", { className: H.menuItemIcon, children: v.icon }),
200
+ /* @__PURE__ */ i("span", { className: H.menuItemText, children: v.label })
207
201
  ]
208
202
  },
209
203
  y
210
204
  );
211
205
  };
212
- return !d || !o ? null : E1(
213
- /* @__PURE__ */ h(n1, { children: [
214
- /* @__PURE__ */ e(
206
+ return !c || !n ? null : fe(
207
+ /* @__PURE__ */ C(G, { children: [
208
+ /* @__PURE__ */ i(
215
209
  "div",
216
210
  {
217
- className: O.overlay,
211
+ className: H.overlay,
218
212
  "aria-hidden": !0,
219
- onClick: () => x(),
220
- onMouseDown: (m) => m.stopPropagation()
213
+ onMouseDown: (v) => {
214
+ v.preventDefault(), v.stopPropagation(), h();
215
+ }
221
216
  }
222
217
  ),
223
- /* @__PURE__ */ e(
218
+ /* @__PURE__ */ i(
224
219
  "div",
225
220
  {
226
- ref: _,
227
- className: `${O.panel} ${s ? O.panelExiting : ""}`,
221
+ ref: b,
222
+ className: `${H.panel} ${a ? H.panelExiting : ""}`,
228
223
  role: "menu",
229
- style: { top: f.top, left: f.left },
230
- onAnimationEnd: C,
231
- onClick: (m) => {
232
- m.stopPropagation(), r?.(m);
224
+ style: { top: d.top, left: d.left },
225
+ onAnimationEnd: m,
226
+ onClick: (v) => {
227
+ v.stopPropagation(), o?.(v);
233
228
  },
234
- children: n.map(v)
229
+ children: e.map(E)
235
230
  }
236
231
  )
237
232
  ] }),
238
233
  document.body
239
234
  );
240
- }), i1 = () => (t, n) => /* @__PURE__ */ h(
241
- "button",
242
- {
243
- className: O.menuItem,
244
- onClick: (o) => n.onClick(o),
245
- children: [
246
- /* @__PURE__ */ e("span", { className: O.menuItemIcon, children: t.icon }),
247
- /* @__PURE__ */ e("span", { className: O.menuItemText, children: t.label })
248
- ]
249
- }
250
- ), rt = ({
235
+ }), I = {
236
+ NAVY: "#3B64A0",
237
+ FINISHED_GREEN: "#17a34a",
238
+ ERROR_RED: "#E32012",
239
+ TEAL: "#127ee3",
240
+ ADD_TRIGGER_FILL: "#0C971F",
241
+ ADD_TRIGGER_STROKE: "#14BC2B",
242
+ SEPARATOR: "#a1bbdc",
243
+ SLATE_400: "#94a3b8",
244
+ ORANGE: "#ff9800"
245
+ }, pt = (t) => t?.toLowerCase() === I.FINISHED_GREEN.toLowerCase(), et = (t) => pt(t) ? `3px dotted ${t}` : `2px solid ${t}`, wt = {
246
+ pending: I.NAVY,
247
+ running: I.TEAL,
248
+ validating: I.ORANGE,
249
+ finished: I.FINISHED_GREEN,
250
+ failed: I.ERROR_RED,
251
+ cancelled: I.ORANGE,
252
+ skipped: I.SLATE_400,
253
+ invalid: I.ERROR_RED
254
+ }, Ae = {
255
+ finished: "#DFFFE3"
256
+ }, S1 = ({
251
257
  width: t = 16,
252
- height: n = 16,
253
- color: o = "#3B64A0"
254
- }) => /* @__PURE__ */ h(
258
+ height: e = 16,
259
+ color: n = I.NAVY
260
+ }) => /* @__PURE__ */ C(
255
261
  "svg",
256
262
  {
257
263
  width: t,
258
- height: n,
264
+ height: e,
259
265
  viewBox: "0 0 16 16",
260
266
  fill: "none",
261
267
  xmlns: "http://www.w3.org/2000/svg",
262
268
  children: [
263
- /* @__PURE__ */ e(
269
+ /* @__PURE__ */ i(
264
270
  "rect",
265
271
  {
266
272
  x: "7.99219",
@@ -269,103 +275,103 @@ const J1 = "_panel_19663_1", Q1 = "_panelExiting_19663_13", U1 = "_menuItem_1966
269
275
  height: "11",
270
276
  rx: "1.5",
271
277
  transform: "rotate(45 7.99219 0.222732)",
272
- stroke: o
278
+ stroke: n
273
279
  }
274
280
  ),
275
- /* @__PURE__ */ e(
281
+ /* @__PURE__ */ i(
276
282
  "path",
277
283
  {
278
284
  d: "M10.4693 5.52599L5.52513 10.4813M5.52513 5.53151L10.4749 10.4813",
279
- stroke: o,
285
+ stroke: n,
280
286
  strokeLinecap: "round"
281
287
  }
282
288
  )
283
289
  ]
284
290
  }
285
- ), st = ({
291
+ ), L1 = ({
286
292
  width: t = 16,
287
- height: n = 16,
288
- color: o = "#3B64A0"
289
- }) => /* @__PURE__ */ h(
293
+ height: e = 16,
294
+ color: n = I.NAVY
295
+ }) => /* @__PURE__ */ C(
290
296
  "svg",
291
297
  {
292
298
  width: t,
293
- height: n,
299
+ height: e,
294
300
  viewBox: "0 0 16 16",
295
301
  fill: "none",
296
302
  xmlns: "http://www.w3.org/2000/svg",
297
303
  children: [
298
- /* @__PURE__ */ e(
304
+ /* @__PURE__ */ i(
299
305
  "path",
300
306
  {
301
307
  d: "M11.5341 7.00002H15.4661C15.5136 7.00004 15.5601 7.01359 15.6002 7.03909C15.6403 7.06459 15.6722 7.10098 15.6924 7.144C15.7125 7.18702 15.72 7.23489 15.7139 7.282C15.7079 7.32912 15.6885 7.37352 15.6581 7.41002L13.6921 9.77002C13.6686 9.79816 13.6393 9.82079 13.6061 9.83633C13.5729 9.85186 13.5367 9.85991 13.5001 9.85991C13.4635 9.85991 13.4273 9.85186 13.3941 9.83633C13.3609 9.82079 13.3315 9.79816 13.3081 9.77002L11.3421 7.41002C11.3117 7.37352 11.2923 7.32912 11.2862 7.282C11.2802 7.23489 11.2876 7.18702 11.3078 7.144C11.3279 7.10098 11.3599 7.06459 11.4 7.03909C11.4401 7.01359 11.4866 7.00004 11.5341 7.00002ZM0.534086 9.00002H4.46609C4.51359 9.00001 4.56011 8.98645 4.60019 8.96096C4.64027 8.93546 4.67225 8.89907 4.6924 8.85605C4.71254 8.81303 4.72002 8.76516 4.71394 8.71804C4.70786 8.67093 4.68849 8.62652 4.65809 8.59002L2.69209 6.23002C2.66862 6.20189 2.63926 6.17925 2.60609 6.16372C2.57291 6.14819 2.53672 6.14014 2.50009 6.14014C2.46345 6.14014 2.42726 6.14819 2.39409 6.16372C2.36091 6.17925 2.33155 6.20189 2.30809 6.23002L0.342086 8.59002C0.311684 8.62652 0.29231 8.67093 0.286234 8.71804C0.280157 8.76516 0.287629 8.81303 0.307775 8.85605C0.327921 8.89907 0.359907 8.93546 0.399987 8.96096C0.440067 8.98645 0.486583 9.00001 0.534086 9.00002Z",
302
- fill: o
308
+ fill: n
303
309
  }
304
310
  ),
305
- /* @__PURE__ */ e(
311
+ /* @__PURE__ */ i(
306
312
  "path",
307
313
  {
308
314
  fillRule: "evenodd",
309
315
  clipRule: "evenodd",
310
316
  d: "M8.00001 3.00023C6.44801 3.00023 5.06001 3.70723 4.14301 4.81823C4.10206 4.87131 4.05086 4.9156 3.99245 4.94849C3.93404 4.98138 3.86961 5.00219 3.803 5.00968C3.73638 5.01717 3.66895 5.01119 3.60469 4.99209C3.54043 4.97299 3.48068 4.94117 3.42897 4.89851C3.37726 4.85586 3.33465 4.80324 3.30368 4.74379C3.27272 4.68434 3.25402 4.61926 3.24871 4.55244C3.24339 4.48562 3.25157 4.41841 3.27275 4.35481C3.29394 4.29121 3.32769 4.23252 3.37201 4.18223C4.1042 3.29576 5.0756 2.63824 6.17067 2.28789C7.26575 1.93753 8.43841 1.90908 9.54918 2.20592C10.66 2.50276 11.6621 3.1124 12.4364 3.96232C13.2107 4.81224 13.7246 5.86668 13.917 7.00023H12.9C12.6691 5.87104 12.0554 4.85623 11.1625 4.12738C10.2697 3.39853 9.15256 3.00037 8.00001 3.00023ZM3.10001 9.00023C3.28932 9.92486 3.73636 10.7771 4.38949 11.4584C5.04261 12.1397 5.87517 12.6223 6.79097 12.8505C7.70677 13.0787 8.66845 13.0431 9.5649 12.7479C10.4613 12.4527 11.256 11.9099 11.857 11.1822C11.898 11.1292 11.9492 11.0849 12.0076 11.052C12.066 11.0191 12.1304 10.9983 12.197 10.9908C12.2636 10.9833 12.3311 10.9893 12.3953 11.0084C12.4596 11.0275 12.5193 11.0593 12.5711 11.102C12.6228 11.1446 12.6654 11.1972 12.6963 11.2567C12.7273 11.3161 12.746 11.3812 12.7513 11.448C12.7566 11.5148 12.7484 11.5821 12.7273 11.6457C12.7061 11.7093 12.6723 11.7679 12.628 11.8182C11.8958 12.7047 10.9244 13.3622 9.82934 13.7126C8.73427 14.0629 7.56161 14.0914 6.45083 13.7945C5.34006 13.4977 4.33791 12.8881 3.5636 12.0381C2.78928 11.1882 2.27538 10.1338 2.08301 9.00023H3.10001Z",
311
- fill: o
317
+ fill: n
312
318
  }
313
319
  )
314
320
  ]
315
321
  }
316
- ), h1 = ({
322
+ ), Ye = ({
317
323
  width: t = 16,
318
- height: n = 16,
319
- color: o = "#3B64A0"
320
- }) => /* @__PURE__ */ h(
324
+ height: e = 16,
325
+ color: n = I.NAVY
326
+ }) => /* @__PURE__ */ C(
321
327
  "svg",
322
328
  {
323
329
  width: t,
324
- height: n,
330
+ height: e,
325
331
  viewBox: "0 0 16 16",
326
332
  fill: "none",
327
333
  xmlns: "http://www.w3.org/2000/svg",
328
334
  children: [
329
- /* @__PURE__ */ e(
335
+ /* @__PURE__ */ i(
330
336
  "path",
331
337
  {
332
338
  d: "M8 15C6.14348 15 4.36301 14.2625 3.05025 12.9497C1.7375 11.637 1 9.85652 1 8C1 6.14348 1.7375 4.36301 3.05025 3.05025C4.36301 1.7375 6.14348 1 8 1C9.85652 1 11.637 1.7375 12.9497 3.05025C14.2625 4.36301 15 6.14348 15 8C15 9.85652 14.2625 11.637 12.9497 12.9497C11.637 14.2625 9.85652 15 8 15ZM8 16C10.1217 16 12.1566 15.1571 13.6569 13.6569C15.1571 12.1566 16 10.1217 16 8C16 5.87827 15.1571 3.84344 13.6569 2.34315C12.1566 0.842855 10.1217 0 8 0C5.87827 0 3.84344 0.842855 2.34315 2.34315C0.842855 3.84344 0 5.87827 0 8C0 10.1217 0.842855 12.1566 2.34315 13.6569C3.84344 15.1571 5.87827 16 8 16Z",
333
- fill: o
339
+ fill: n
334
340
  }
335
341
  ),
336
- /* @__PURE__ */ e(
342
+ /* @__PURE__ */ i(
337
343
  "path",
338
344
  {
339
345
  d: "M7 11.5C7 11.3674 7.05268 11.2402 7.14645 11.1464C7.24021 11.0527 7.36739 11 7.5 11H8.5C8.63261 11 8.75979 11.0527 8.85355 11.1464C8.94732 11.2402 9 11.3674 9 11.5C9 11.6326 8.94732 11.7598 8.85355 11.8536C8.75979 11.9473 8.63261 12 8.5 12H7.5C7.36739 12 7.24021 11.9473 7.14645 11.8536C7.05268 11.7598 7 11.6326 7 11.5ZM5 8.5C5 8.36739 5.05268 8.24021 5.14645 8.14645C5.24021 8.05268 5.36739 8 5.5 8H10.5C10.6326 8 10.7598 8.05268 10.8536 8.14645C10.9473 8.24021 11 8.36739 11 8.5C11 8.63261 10.9473 8.75979 10.8536 8.85355C10.7598 8.94732 10.6326 9 10.5 9H5.5C5.36739 9 5.24021 8.94732 5.14645 8.85355C5.05268 8.75979 5 8.63261 5 8.5ZM3 5.5C3 5.36739 3.05268 5.24021 3.14645 5.14645C3.24021 5.05268 3.36739 5 3.5 5H12.5C12.6326 5 12.7598 5.05268 12.8536 5.14645C12.9473 5.24021 13 5.36739 13 5.5C13 5.63261 12.9473 5.75979 12.8536 5.85355C12.7598 5.94732 12.6326 6 12.5 6H3.5C3.36739 6 3.24021 5.94732 3.14645 5.85355C3.05268 5.75979 3 5.63261 3 5.5Z",
340
- fill: o
346
+ fill: n
341
347
  }
342
348
  )
343
349
  ]
344
350
  }
345
- ), _1 = P1(
351
+ ), Ut = Gt(
346
352
  void 0
347
- ), Ee = ({ children: t }) => {
348
- const [n, o] = E([]), i = D((d, a) => {
349
- o((s) => (s.forEach((l) => {
350
- l.current && l !== d && l.current.hide(a);
351
- }), [])), d.current?.toggle(a), o([d]);
352
- }, []), r = D((d) => {
353
- o((a) => a.filter((s) => s !== d));
354
- }, []), c = H(
353
+ ), T1 = ({ children: t }) => {
354
+ const [e, n] = O([]), s = tt((c, p) => {
355
+ n((a) => (a.forEach((r) => {
356
+ r.current && r !== c && r.current.hide(p);
357
+ }), [])), c.current?.toggle(p), n([c]);
358
+ }, []), o = tt((c) => {
359
+ n((p) => p.filter((a) => a !== c));
360
+ }, []), l = k(
355
361
  () => ({
356
- openMenus: n,
357
- openMenu: i,
358
- closeMenu: r
362
+ openMenus: e,
363
+ openMenu: s,
364
+ closeMenu: o
359
365
  }),
360
- [n, i, r]
366
+ [e, s, o]
361
367
  );
362
- return /* @__PURE__ */ e(_1.Provider, { value: c, children: t });
363
- }, r1 = () => {
364
- const t = M1(_1);
368
+ return /* @__PURE__ */ i(Ut.Provider, { value: l, children: t });
369
+ }, Lt = () => {
370
+ const t = Vt(Ut);
365
371
  if (t === void 0)
366
372
  throw new Error("useMenuProvider must be used within a MenuProvider");
367
373
  return t;
368
- }, lt = ({ color: t = "#E32012" }) => /* @__PURE__ */ h(
374
+ }, Ge = ({ color: t = I.ERROR_RED }) => /* @__PURE__ */ C(
369
375
  "svg",
370
376
  {
371
377
  xmlns: "http://www.w3.org/2000/svg",
@@ -374,330 +380,396 @@ const J1 = "_panel_19663_1", Q1 = "_panelExiting_19663_13", U1 = "_menuItem_1966
374
380
  viewBox: "0 0 16 16",
375
381
  fill: "none",
376
382
  children: [
377
- /* @__PURE__ */ e("g", { clipPath: "url(#clip0_3105_5367)", children: /* @__PURE__ */ e(
383
+ /* @__PURE__ */ i("g", { clipPath: "url(#clip0_3105_5367)", children: /* @__PURE__ */ i(
378
384
  "path",
379
385
  {
380
386
  d: "M16 8C16 10.1217 15.1571 12.1566 13.6569 13.6569C12.1566 15.1571 10.1217 16 8 16C5.87827 16 3.84344 15.1571 2.34315 13.6569C0.842855 12.1566 0 10.1217 0 8C0 5.87827 0.842855 3.84344 2.34315 2.34315C3.84344 0.842855 5.87827 0 8 0C10.1217 0 12.1566 0.842855 13.6569 2.34315C15.1571 3.84344 16 5.87827 16 8ZM8 4C7.87361 4.00007 7.74863 4.02662 7.63312 4.07793C7.51761 4.12924 7.41413 4.20418 7.32934 4.29791C7.24456 4.39165 7.18035 4.5021 7.14084 4.62217C7.10134 4.74223 7.08743 4.86923 7.1 4.995L7.45 8.502C7.46176 8.63977 7.5248 8.76811 7.62664 8.86164C7.72849 8.95516 7.86173 9.00705 8 9.00705C8.13827 9.00705 8.27151 8.95516 8.37336 8.86164C8.4752 8.76811 8.53824 8.63977 8.55 8.502L8.9 4.995C8.91257 4.86923 8.89866 4.74223 8.85915 4.62217C8.81965 4.5021 8.75544 4.39165 8.67066 4.29791C8.58587 4.20418 8.48239 4.12924 8.36688 4.07793C8.25137 4.02662 8.12639 4.00007 8 4ZM8.002 10C7.73678 10 7.48243 10.1054 7.29489 10.2929C7.10736 10.4804 7.002 10.7348 7.002 11C7.002 11.2652 7.10736 11.5196 7.29489 11.7071C7.48243 11.8946 7.73678 12 8.002 12C8.26722 12 8.52157 11.8946 8.70911 11.7071C8.89664 11.5196 9.002 11.2652 9.002 11C9.002 10.7348 8.89664 10.4804 8.70911 10.2929C8.52157 10.1054 8.26722 10 8.002 10Z",
381
387
  fill: t
382
388
  }
383
389
  ) }),
384
- /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ e("clipPath", { id: "clip0_3105_5367", children: /* @__PURE__ */ e("rect", { width: "16", height: "16", fill: "white" }) }) })
390
+ /* @__PURE__ */ i("defs", { children: /* @__PURE__ */ i("clipPath", { id: "clip0_3105_5367", children: /* @__PURE__ */ i("rect", { width: "16", height: "16", fill: "white" }) }) })
385
391
  ]
386
392
  }
387
- ), s1 = (t) => {
388
- const {
389
- isSet: n,
390
- isSelected: o,
391
- isFilter: i,
392
- className: r,
393
- title: c,
394
- icon: d,
395
- contextMenuItems: a = void 0,
396
- onDeleteStep: s,
397
- onUpdateFilter: l,
398
- onSelectStep: f,
399
- subtitle: b,
400
- isInvalid: _,
401
- localId: x
402
- } = t, C = $(null), { openMenu: p, closeMenu: I } = r1(), w = i1(), v = H(
403
- () => [
404
- {
405
- label: "Add Step Filter",
406
- icon: /* @__PURE__ */ e("div", { className: "mr-2 flex items-center justify-center", children: /* @__PURE__ */ e(h1, {}) }),
407
- command: (g) => {
408
- g?.originalEvent?.stopPropagation(), l && l(x);
409
- },
410
- template: w
411
- },
412
- {
413
- label: "Remove",
414
- icon: /* @__PURE__ */ e(J, { color: "#3B64A0", size: 18 }),
415
- command: (g) => {
416
- g?.originalEvent?.stopPropagation(), s && s(x);
417
- },
418
- template: w
419
- }
420
- ],
421
- [l, s, x, w]
422
- ), m = H(() => a !== void 0 ? a : v, [a, v]), y = (g) => {
423
- g.stopPropagation(), p(C, g);
424
- }, L = H(() => o && _ ? N.step + " " + N.selectedInvalid : o ? N.step + " " + N.selected : n ? N.step + " " + N.isSet : _ ? N.step + " " + N.invalid : N.step, [n, o, _]), u = H(() => _ ? /* @__PURE__ */ e(lt, { color: "#E32012" }) : d, [d, _]);
425
- return /* @__PURE__ */ e("div", { className: N.container + " " + r, children: /* @__PURE__ */ h("div", { children: [
426
- /* @__PURE__ */ h("div", { className: L, onClick: () => f(x), children: [
427
- /* @__PURE__ */ h("div", { className: N.content, children: [
428
- /* @__PURE__ */ e("div", { className: `${N.icon} ${_ && N.invalid}`, children: u }),
429
- /* @__PURE__ */ e("div", { className: N.title, children: c })
430
- ] }),
431
- /* @__PURE__ */ e(
432
- "button",
433
- {
434
- className: N.dotsButton,
435
- onClick: y,
436
- "aria-haspopup": !0,
437
- "aria-label": "Step options",
438
- children: /* @__PURE__ */ e(
439
- q,
440
- {
441
- className: N.dots,
442
- color: _ ? "#E32012" : "#3B64A0",
443
- size: 16
444
- }
445
- )
446
- }
447
- ),
448
- /* @__PURE__ */ e(
449
- Q,
450
- {
451
- model: m,
452
- popup: !0,
453
- ref: C,
454
- onClick: (g) => g.stopPropagation(),
455
- onHide: () => I(C)
456
- }
457
- )
458
- ] }),
459
- i && /* @__PURE__ */ h(
460
- "div",
461
- {
462
- className: N.filterFlag,
463
- role: "button",
464
- tabIndex: 0,
465
- onClick: () => {
466
- l && l(x);
467
- },
468
- onKeyDown: (g) => {
469
- (g.key === "Enter" || g.key === " ") && l && (g.preventDefault(), l(x));
470
- },
471
- children: [
472
- /* @__PURE__ */ e(h1, { color: "#3B64A0" }),
473
- /* @__PURE__ */ e("span", { children: "Filter" }),
474
- /* @__PURE__ */ e(
475
- q,
476
- {
477
- className: N.dots,
478
- color: _ ? "#E32012" : "#3B64A0",
479
- style: { height: "10px" }
480
- }
481
- )
482
- ]
483
- }
484
- ),
485
- b && /* @__PURE__ */ e("div", { className: N.subtitle, children: b })
486
- ] }) });
487
- }, ct = () => /* @__PURE__ */ h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: [
488
- /* @__PURE__ */ h("g", { clipPath: "url(#clip0_6551_9169)", children: [
489
- /* @__PURE__ */ e("rect", { width: "24", height: "24", rx: "12", fill: "#0C971F" }),
490
- /* @__PURE__ */ e("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11 6C11 5.44772 11.4477 5 12 5C12.5523 5 13 5.44772 13 6V11H18C18.5523 11 19 11.4477 19 12C19 12.5523 18.5523 13 18 13H13V18C13 18.5523 12.5523 19 12 19C11.4477 19 11 18.5523 11 18V13H6C5.44772 13 5 12.5523 5 12C5 11.4477 5.44772 11 6 11H11V6Z", fill: "white" })
491
- ] }),
492
- /* @__PURE__ */ e("rect", { x: "0.75", y: "0.75", width: "22.5", height: "22.5", rx: "11.25", stroke: "#14BC2B", strokeWidth: "1.5" }),
493
- /* @__PURE__ */ e("defs", { children: /* @__PURE__ */ e("clipPath", { id: "clip0_6551_9169", children: /* @__PURE__ */ e("rect", { width: "24", height: "24", rx: "12", fill: "white" }) }) })
494
- ] }), at = "_multipleTriggersIcon_oxhdi_1", dt = {
495
- multipleTriggersIcon: at
496
- }, pt = () => /* @__PURE__ */ e("div", { className: dt.multipleTriggersIcon, children: /* @__PURE__ */ e("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ e("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1.5 3.75C1.5 3.15326 1.73705 2.58097 2.15901 2.15901C2.58097 1.73705 3.15326 1.5 3.75 1.5H5.25C5.84674 1.5 6.41903 1.73705 6.84099 2.15901C7.26295 2.58097 7.5 3.15326 7.5 3.75L13.701 3.75C13.8661 3.46404 14.1209 3.24054 14.426 3.11418C14.7311 2.98782 15.0693 2.96565 15.3883 3.05111C15.7072 3.13657 15.9891 3.32489 16.1901 3.58686C16.3911 3.84882 16.5 4.1698 16.5 4.5C16.5 4.8302 16.3911 5.15118 16.1901 5.41314C15.9891 5.67511 15.7072 5.86343 15.3883 5.94889C15.0693 6.03435 14.7311 6.01218 14.426 5.88582C14.1209 5.75946 13.8661 5.53596 13.701 5.25H10.686C10.956 5.52 11.196 5.8215 11.412 6.1575C12.369 7.6455 12.75 9.6885 12.75 12C12.75 14.9895 13.1355 16.638 13.8195 17.55C14.3535 18.264 15.162 18.6315 16.5 18.726C16.5063 18.1334 16.7462 17.5673 17.1674 17.1505C17.5887 16.7337 18.1574 16.5 18.75 16.5H20.25C20.8467 16.5 21.419 16.7371 21.841 17.159C22.2629 17.581 22.5 18.1533 22.5 18.75V20.25C22.5 20.8467 22.2629 21.419 21.841 21.841C21.419 22.2629 20.8467 22.5 20.25 22.5H18.75C18.1533 22.5 17.581 22.2629 17.159 21.841C16.7371 21.419 16.5 20.8467 16.5 20.25H10.299C10.1339 20.536 9.87905 20.7595 9.57399 20.8858C9.26892 21.0122 8.93068 21.0344 8.61173 20.9489C8.29278 20.8634 8.01095 20.6751 7.80993 20.4131C7.60892 20.1512 7.49996 19.8302 7.49996 19.5C7.49996 19.1698 7.60892 18.8488 7.80993 18.5869C8.01095 18.3249 8.29278 18.1366 8.61173 18.0511C8.93068 17.9656 9.26892 17.9878 9.57399 18.1142C9.87905 18.2405 10.1339 18.464 10.299 18.75H12.8655C12.7785 18.6538 12.6959 18.5537 12.618 18.45C11.6145 17.1105 11.25 15.0105 11.25 12C11.25 9.81 10.881 8.1045 10.1505 6.9675C9.5655 6.06 8.7225 5.4675 7.5 5.2995C7.48706 5.88762 7.2443 6.44728 6.82374 6.85859C6.40318 7.2699 5.83826 7.50014 5.25 7.5H3.75C3.15326 7.5 2.58097 7.26295 2.15901 6.84099C1.73705 6.41903 1.5 5.84674 1.5 5.25V3.75ZM3.75 3C3.55109 3 3.36032 3.07902 3.21967 3.21967C3.07902 3.36032 3 3.55109 3 3.75V5.25C3 5.44891 3.07902 5.63968 3.21967 5.78033C3.36032 5.92098 3.55109 6 3.75 6H5.25C5.44891 6 5.63968 5.92098 5.78033 5.78033C5.92098 5.63968 6 5.44891 6 5.25V3.75C6 3.55109 5.92098 3.36032 5.78033 3.21967C5.63968 3.07902 5.44891 3 5.25 3H3.75ZM18.75 18C18.5511 18 18.3603 18.079 18.2197 18.2197C18.079 18.3603 18 18.5511 18 18.75V20.25C18 20.4489 18.079 20.6397 18.2197 20.7803C18.3603 20.921 18.5511 21 18.75 21H20.25C20.4489 21 20.6397 20.921 20.7803 20.7803C20.921 20.6397 21 20.4489 21 20.25V18.75C21 18.5511 20.921 18.3603 20.7803 18.2197C20.6397 18.079 20.4489 18 20.25 18H18.75Z", fill: "white" }) }) }), ut = "_trigger_kfg1y_1", ht = "_title_kfg1y_7", Ct = "_empty_kfg1y_15", mt = "_triggerContainer_kfg1y_21", ft = "_stepsContainer_kfg1y_25", gt = "_stepItem_kfg1y_51", vt = "_curvesSvg_kfg1y_70", _t = "_centralNode_kfg1y_78", xt = "_iconWrapper_kfg1y_104", wt = "_fadeIn_kfg1y_127", yt = "_fadeOut_kfg1y_130", It = "_operationContainer_kfg1y_134", M = {
497
- trigger: ut,
498
- title: ht,
499
- empty: Ct,
500
- triggerContainer: mt,
501
- stepsContainer: ft,
502
- stepItem: gt,
503
- curvesSvg: vt,
504
- centralNode: _t,
505
- iconWrapper: xt,
506
- fadeIn: wt,
507
- fadeOut: yt,
508
- operationContainer: It
509
- }, bt = () => /* @__PURE__ */ e(
393
+ ), Ve = () => (t, e) => /* @__PURE__ */ C(
394
+ "button",
395
+ {
396
+ type: "button",
397
+ className: `${H.menuItem} ${t.disabled ? H.disabled : ""}`,
398
+ disabled: t.disabled,
399
+ onClick: (n) => {
400
+ t.disabled || e.onClick(n);
401
+ },
402
+ children: [
403
+ /* @__PURE__ */ i("span", { className: H.menuItemIcon, children: t.icon }),
404
+ /* @__PURE__ */ i("span", { className: H.menuItemText, children: t.label })
405
+ ]
406
+ }
407
+ ), Ze = () => /* @__PURE__ */ i(
510
408
  "div",
511
409
  {
512
410
  style: {
513
411
  height: "1px",
514
412
  marginLeft: "4px",
515
413
  marginRight: "4px",
516
- borderTop: "1px solid #a1bbdc"
414
+ borderTop: `1px solid ${I.SEPARATOR}`
517
415
  }
518
416
  }
519
- ), Nt = 80, A = 34, kt = ({
417
+ ), Wt = (t) => t.separator === !0, qe = (t, e) => t.disabled === !0 || t.disabledOnPrepend === !0 && e.operation === "prepend", Ue = (t, e) => t.visible?.(e) ?? !0, bt = (t, e, n) => {
418
+ if (!t || t.length === 0) return [];
419
+ const s = Ve();
420
+ return t.filter((l) => Wt(l) ? !0 : Ue(l, e)).map((l, c) => {
421
+ if (Wt(l))
422
+ return {
423
+ label: `__separator-${c}`,
424
+ template: () => /* @__PURE__ */ i(Ze, {})
425
+ };
426
+ const p = qe(l, e);
427
+ return {
428
+ label: l.label,
429
+ icon: l.icon,
430
+ disabled: p,
431
+ command: (a) => {
432
+ a?.originalEvent?.stopPropagation(), !p && n(l.actionId, e);
433
+ },
434
+ template: s
435
+ };
436
+ });
437
+ }, ht = (t) => {
438
+ const {
439
+ isSet: e,
440
+ isSelected: n,
441
+ isFilter: s,
442
+ debuggerMode: o = !1,
443
+ status: l,
444
+ className: c,
445
+ title: p,
446
+ icon: a,
447
+ items: r,
448
+ menuContext: d,
449
+ onAction: g,
450
+ filterFlagActionId: b,
451
+ onSelectStep: h,
452
+ subtitle: m,
453
+ isInvalid: x,
454
+ id: f
455
+ } = t, N = $(null), { openMenu: E, closeMenu: v, openMenus: y } = Lt(), u = k(
456
+ () => d ?? { stepId: f },
457
+ [d, f]
458
+ ), _ = k(() => g ? bt(r, u, g) : [], [r, u, g]), T = (w) => {
459
+ w.stopPropagation(), E(N, w);
460
+ }, L = () => {
461
+ b && g && g(b, u);
462
+ }, D = k(() => {
463
+ if (!(!o || l == null || l === "pending"))
464
+ return {
465
+ "--step-debugger-accent": wt[l]
466
+ };
467
+ }, [o, l]), X = k(() => n && x ? P.step + " " + P.selectedInvalid : o && l != null && l !== "pending" ? P.step + " " + P.debuggerStatus : n ? P.step + " " + P.selected : e ? P.step + " " + P.isSet : x ? P.step + " " + P.invalid : P.step, [e, n, x, l, o]), K = k(() => x ? /* @__PURE__ */ i(Ge, { color: I.ERROR_RED }) : a, [a, x]), j = !!(b && g);
468
+ return /* @__PURE__ */ i(
469
+ "div",
470
+ {
471
+ className: P.container + " " + c,
472
+ "data-id": void 0,
473
+ children: /* @__PURE__ */ C("div", { children: [
474
+ /* @__PURE__ */ C(
475
+ "div",
476
+ {
477
+ className: X,
478
+ style: D,
479
+ onClick: () => {
480
+ y.length > 0 || h(f);
481
+ },
482
+ children: [
483
+ /* @__PURE__ */ C("div", { className: P.content, children: [
484
+ /* @__PURE__ */ i("div", { className: `${P.icon} ${x && P.invalid}`, children: K }),
485
+ /* @__PURE__ */ i("div", { className: P.title, children: p })
486
+ ] }),
487
+ _.length > 0 && /* @__PURE__ */ C(G, { children: [
488
+ /* @__PURE__ */ i(
489
+ "button",
490
+ {
491
+ className: P.dotsButton,
492
+ onClick: T,
493
+ "aria-haspopup": !0,
494
+ "aria-label": "Step options",
495
+ children: /* @__PURE__ */ i(mt, { className: P.dots, size: 16 })
496
+ }
497
+ ),
498
+ /* @__PURE__ */ i(
499
+ xt,
500
+ {
501
+ model: _,
502
+ popup: !0,
503
+ ref: N,
504
+ onClick: (w) => w.stopPropagation(),
505
+ onHide: () => v(N)
506
+ }
507
+ )
508
+ ] })
509
+ ]
510
+ }
511
+ ),
512
+ s && /* @__PURE__ */ C(
513
+ "div",
514
+ {
515
+ className: P.filterFlag,
516
+ role: j ? "button" : void 0,
517
+ tabIndex: j ? 0 : void 0,
518
+ onClick: j ? L : void 0,
519
+ onKeyDown: (w) => {
520
+ j && (w.key === "Enter" || w.key === " ") && (w.preventDefault(), L());
521
+ },
522
+ children: [
523
+ /* @__PURE__ */ i(Ye, { color: I.NAVY }),
524
+ /* @__PURE__ */ i("span", { children: "Filter" }),
525
+ !o && /* @__PURE__ */ i(
526
+ mt,
527
+ {
528
+ className: P.dots,
529
+ color: x ? I.ERROR_RED : I.NAVY,
530
+ style: { height: "10px" }
531
+ }
532
+ )
533
+ ]
534
+ }
535
+ ),
536
+ m && /* @__PURE__ */ i("div", { className: P.subtitle, children: m })
537
+ ] })
538
+ }
539
+ );
540
+ }, Xe = () => /* @__PURE__ */ C("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: [
541
+ /* @__PURE__ */ C("g", { clipPath: "url(#clip0_6551_9169)", children: [
542
+ /* @__PURE__ */ i("rect", { width: "24", height: "24", rx: "12", fill: I.ADD_TRIGGER_FILL }),
543
+ /* @__PURE__ */ i("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M11 6C11 5.44772 11.4477 5 12 5C12.5523 5 13 5.44772 13 6V11H18C18.5523 11 19 11.4477 19 12C19 12.5523 18.5523 13 18 13H13V18C13 18.5523 12.5523 19 12 19C11.4477 19 11 18.5523 11 18V13H6C5.44772 13 5 12.5523 5 12C5 11.4477 5.44772 11 6 11H11V6Z", fill: "white" })
544
+ ] }),
545
+ /* @__PURE__ */ i("rect", { x: "0.75", y: "0.75", width: "22.5", height: "22.5", rx: "11.25", stroke: I.ADD_TRIGGER_STROKE, strokeWidth: "1.5" }),
546
+ /* @__PURE__ */ i("defs", { children: /* @__PURE__ */ i("clipPath", { id: "clip0_6551_9169", children: /* @__PURE__ */ i("rect", { width: "24", height: "24", rx: "12", fill: "white" }) }) })
547
+ ] }), Ke = "_multipleTriggersIcon_oxhdi_1", Je = {
548
+ multipleTriggersIcon: Ke
549
+ }, Qe = ({
550
+ color: t
551
+ }) => /* @__PURE__ */ i(
552
+ "div",
553
+ {
554
+ className: Je.multipleTriggersIcon,
555
+ style: t != null ? { backgroundColor: t, color: t } : void 0,
556
+ children: /* @__PURE__ */ i("svg", { width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: /* @__PURE__ */ i("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M1.5 3.75C1.5 3.15326 1.73705 2.58097 2.15901 2.15901C2.58097 1.73705 3.15326 1.5 3.75 1.5H5.25C5.84674 1.5 6.41903 1.73705 6.84099 2.15901C7.26295 2.58097 7.5 3.15326 7.5 3.75L13.701 3.75C13.8661 3.46404 14.1209 3.24054 14.426 3.11418C14.7311 2.98782 15.0693 2.96565 15.3883 3.05111C15.7072 3.13657 15.9891 3.32489 16.1901 3.58686C16.3911 3.84882 16.5 4.1698 16.5 4.5C16.5 4.8302 16.3911 5.15118 16.1901 5.41314C15.9891 5.67511 15.7072 5.86343 15.3883 5.94889C15.0693 6.03435 14.7311 6.01218 14.426 5.88582C14.1209 5.75946 13.8661 5.53596 13.701 5.25H10.686C10.956 5.52 11.196 5.8215 11.412 6.1575C12.369 7.6455 12.75 9.6885 12.75 12C12.75 14.9895 13.1355 16.638 13.8195 17.55C14.3535 18.264 15.162 18.6315 16.5 18.726C16.5063 18.1334 16.7462 17.5673 17.1674 17.1505C17.5887 16.7337 18.1574 16.5 18.75 16.5H20.25C20.8467 16.5 21.419 16.7371 21.841 17.159C22.2629 17.581 22.5 18.1533 22.5 18.75V20.25C22.5 20.8467 22.2629 21.419 21.841 21.841C21.419 22.2629 20.8467 22.5 20.25 22.5H18.75C18.1533 22.5 17.581 22.2629 17.159 21.841C16.7371 21.419 16.5 20.8467 16.5 20.25H10.299C10.1339 20.536 9.87905 20.7595 9.57399 20.8858C9.26892 21.0122 8.93068 21.0344 8.61173 20.9489C8.29278 20.8634 8.01095 20.6751 7.80993 20.4131C7.60892 20.1512 7.49996 19.8302 7.49996 19.5C7.49996 19.1698 7.60892 18.8488 7.80993 18.5869C8.01095 18.3249 8.29278 18.1366 8.61173 18.0511C8.93068 17.9656 9.26892 17.9878 9.57399 18.1142C9.87905 18.2405 10.1339 18.464 10.299 18.75H12.8655C12.7785 18.6538 12.6959 18.5537 12.618 18.45C11.6145 17.1105 11.25 15.0105 11.25 12C11.25 9.81 10.881 8.1045 10.1505 6.9675C9.5655 6.06 8.7225 5.4675 7.5 5.2995C7.48706 5.88762 7.2443 6.44728 6.82374 6.85859C6.40318 7.2699 5.83826 7.50014 5.25 7.5H3.75C3.15326 7.5 2.58097 7.26295 2.15901 6.84099C1.73705 6.41903 1.5 5.84674 1.5 5.25V3.75ZM3.75 3C3.55109 3 3.36032 3.07902 3.21967 3.21967C3.07902 3.36032 3 3.55109 3 3.75V5.25C3 5.44891 3.07902 5.63968 3.21967 5.78033C3.36032 5.92098 3.55109 6 3.75 6H5.25C5.44891 6 5.63968 5.92098 5.78033 5.78033C5.92098 5.63968 6 5.44891 6 5.25V3.75C6 3.55109 5.92098 3.36032 5.78033 3.21967C5.63968 3.07902 5.44891 3 5.25 3H3.75ZM18.75 18C18.5511 18 18.3603 18.079 18.2197 18.2197C18.079 18.3603 18 18.5511 18 18.75V20.25C18 20.4489 18.079 20.6397 18.2197 20.7803C18.3603 20.921 18.5511 21 18.75 21H20.25C20.4489 21 20.6397 20.921 20.7803 20.7803C20.921 20.6397 21 20.4489 21 20.25V18.75C21 18.5511 20.921 18.3603 20.7803 18.2197C20.6397 18.079 20.4489 18 20.25 18H18.75Z", fill: "white" }) })
557
+ }
558
+ ), tn = "_trigger_kfg1y_1", en = "_title_kfg1y_7", nn = "_empty_kfg1y_15", sn = "_triggerContainer_kfg1y_21", on = "_stepsContainer_kfg1y_25", rn = "_stepItem_kfg1y_51", ln = "_curvesSvg_kfg1y_70", cn = "_centralNode_kfg1y_78", an = "_iconWrapper_kfg1y_104", dn = "_fadeIn_kfg1y_127", un = "_fadeOut_kfg1y_130", pn = "_operationContainer_kfg1y_134", M = {
559
+ trigger: tn,
560
+ title: en,
561
+ empty: nn,
562
+ triggerContainer: sn,
563
+ stepsContainer: on,
564
+ stepItem: rn,
565
+ curvesSvg: ln,
566
+ centralNode: cn,
567
+ iconWrapper: an,
568
+ fadeIn: dn,
569
+ fadeOut: un,
570
+ operationContainer: pn
571
+ }, hn = [
572
+ "failed",
573
+ "invalid",
574
+ "cancelled",
575
+ "validating",
576
+ "running",
577
+ "finished",
578
+ "skipped",
579
+ "pending"
580
+ ], Xt = (t) => {
581
+ const e = [
582
+ ...new Set(t.filter((n) => n != null))
583
+ ];
584
+ if (e.length !== 0) {
585
+ for (const n of hn)
586
+ if (e.includes(n)) return n;
587
+ return e[0];
588
+ }
589
+ }, Kt = (t, e) => !e || t == null ? I.NAVY : wt[t], fn = (t, e, n = I.NAVY) => t == null ? n : e?.[t] ?? wt[t], gn = (t, e = I.NAVY) => ({
590
+ statusLine: (n) => fn(n, t, e)
591
+ }), dt = (t) => {
592
+ if ("status" in t && t.status != null) return t.status;
593
+ const e = t.steps;
594
+ if (e?.[0]?.status != null) return e[0].status;
595
+ }, Cn = 80, ft = 34, Jt = ({
520
596
  steps: t,
521
- title: n,
522
- className: o,
523
- onDeleteTrigger: i,
524
- onAddTrigger: r,
525
- onSelectStep: c,
526
- onUpdateFilter: d,
527
- onCenterYUpdate: a
597
+ title: e,
598
+ className: n,
599
+ items: s,
600
+ hubActionId: o,
601
+ filterFlagActionId: l,
602
+ onAction: c,
603
+ onSelectStep: p,
604
+ onCenterYUpdate: a,
605
+ debuggerMode: r = !1,
606
+ resolveCurveStrokeColor: d,
607
+ nextStepStatus: g
528
608
  }) => {
529
- const s = $(null), l = $([]), [f, b] = E([]), [_, x] = E({ width: 0, height: 0 }), [C, p] = E(!1), [I, w] = E(!1), v = $(null);
530
- Y(() => {
531
- const u = () => {
532
- if (!s.current) return;
533
- const g = [];
534
- if (l.current.forEach((P, T) => {
535
- if (P && s.current) {
536
- const k = s.current.getBoundingClientRect(), j = P.getBoundingClientRect();
537
- g.push({
538
- localId: t[T]?.localId ?? `step-${T}`,
539
- top: j.top - k.top,
540
- right: j.right - k.left,
541
- centerY: j.top - k.top + j.height / 2
609
+ const b = $(null), h = $([]), [m, x] = O([]), [f, N] = O({ width: 0, height: 0 }), [E, v] = O(!1), [y, u] = O(!1), _ = $(null);
610
+ ot(() => {
611
+ const w = () => {
612
+ if (!b.current) return;
613
+ const R = [];
614
+ if (h.current.forEach((F, A) => {
615
+ if (F && b.current) {
616
+ const Y = b.current.getBoundingClientRect(), B = F.getBoundingClientRect();
617
+ R.push({
618
+ id: t[A]?.id ?? `step-${A}`,
619
+ top: B.top - Y.top,
620
+ right: B.right - Y.left,
621
+ centerY: B.top - Y.top + B.height / 2
542
622
  });
543
623
  }
544
- }), b(g), s.current && g.length > 0) {
545
- const P = s.current.getBoundingClientRect(), T = Math.min(...g.map((S) => S.top)), k = l.current.filter(Boolean).map((S) => S?.offsetHeight || 68), j = Math.max(
546
- ...g.map((S, N1) => S.top + (k[N1] || 68))
547
- ), U = Math.max(...g.map((S) => S.right)) + 0, t1 = Math.max(
548
- P.height,
549
- j - T + 100
624
+ }), x(R), b.current && R.length > 0) {
625
+ const F = b.current.getBoundingClientRect(), A = Math.min(...R.map((Z) => Z.top)), Y = h.current.filter(Boolean).map((Z) => Z?.offsetHeight || 68), B = Math.max(
626
+ ...R.map((Z, de) => Z.top + (Y[de] || 68))
627
+ ), nt = Math.max(...R.map((Z) => Z.right)) + 0, ct = Math.max(
628
+ F.height,
629
+ B - A + 100
550
630
  );
551
- x({
552
- width: U,
553
- height: t1
631
+ N({
632
+ width: nt,
633
+ height: ct
554
634
  });
555
635
  }
556
636
  };
557
- return u(), window.addEventListener("resize", u), () => window.removeEventListener("resize", u);
558
- }, [t]), Y(() => {
559
- let u = !0;
560
- if (C) {
561
- v.current && (clearTimeout(v.current), v.current = null);
562
- const g = setTimeout(() => {
563
- u && w(!0);
637
+ return w(), window.addEventListener("resize", w), () => window.removeEventListener("resize", w);
638
+ }, [t]), ot(() => {
639
+ let w = !0;
640
+ if (E) {
641
+ _.current && (clearTimeout(_.current), _.current = null);
642
+ const R = setTimeout(() => {
643
+ w && u(!0);
564
644
  }, 0);
565
645
  return () => {
566
- u = !1, clearTimeout(g);
646
+ w = !1, clearTimeout(R);
567
647
  };
568
648
  }
569
- return v.current = setTimeout(() => {
570
- u && w(!1);
649
+ return _.current = setTimeout(() => {
650
+ w && u(!1);
571
651
  }, 140), () => {
572
- u = !1, v.current && (clearTimeout(v.current), v.current = null);
652
+ w = !1, _.current && (clearTimeout(_.current), _.current = null);
573
653
  };
574
- }, [C]);
575
- const m = f.length > 0 ? Nt : 0, y = H(() => f.length > 1 ? f.reduce((u, g) => u + g.top + A, 0) / f.length : f.length === 1 ? f[0].top + A : 0, [f]);
576
- if (Y(() => {
577
- a?.(y);
578
- }, [y, a]), t.length === 0)
579
- return /* @__PURE__ */ h("div", { className: `${M.trigger} ${o || ""}`, children: [
580
- n && /* @__PURE__ */ e("h3", { className: M.title, children: n }),
581
- /* @__PURE__ */ e("div", { className: M.empty, children: "No steps" })
654
+ }, [E]);
655
+ const T = m.length > 0 ? Cn : 0, L = k(() => m.length > 1 ? m.reduce((w, R) => w + R.top + ft, 0) / m.length : m.length === 1 ? m[0].top + ft : 0, [m]);
656
+ ot(() => {
657
+ a?.(L);
658
+ }, [L, a]);
659
+ const D = r && t.some((w) => w.status === "finished") && g === "finished", X = () => {
660
+ o && c && c(o, {});
661
+ }, K = !!(o && c);
662
+ if (t.length === 0)
663
+ return /* @__PURE__ */ C("div", { className: `${M.trigger} ${n || ""}`, children: [
664
+ e && /* @__PURE__ */ i("h3", { className: M.title, children: e }),
665
+ /* @__PURE__ */ i("div", { className: M.empty, children: "No steps" })
582
666
  ] });
583
- const L = (u, g, P, T) => {
584
- const k = P - u, j = Math.min(k * 0.6, 60), d1 = u + j, U = g, t1 = P - j;
585
- return `M ${u} ${g} C ${d1} ${U}, ${t1} ${T}, ${P} ${T}`;
667
+ const j = (w, R, F, A) => {
668
+ const Y = F - w, B = Math.min(Y * 0.6, 60), lt = w + B, nt = R, ct = F - B;
669
+ return `M ${w} ${R} C ${lt} ${nt}, ${ct} ${A}, ${F} ${A}`;
586
670
  };
587
- return /* @__PURE__ */ h("div", { className: `${M.trigger} ${o || ""}`, ref: s, children: [
588
- n && /* @__PURE__ */ e("h3", { className: M.title, children: n }),
589
- /* @__PURE__ */ h("div", { className: M.triggerContainer, children: [
590
- /* @__PURE__ */ e("div", { className: M.stepsContainer, children: t.map((u, g) => /* @__PURE__ */ e(
671
+ return /* @__PURE__ */ C("div", { className: `${M.trigger} ${n || ""}`, ref: b, children: [
672
+ e && /* @__PURE__ */ i("h3", { className: M.title, children: e }),
673
+ /* @__PURE__ */ C("div", { className: M.triggerContainer, children: [
674
+ /* @__PURE__ */ i("div", { className: M.stepsContainer, children: t.map((w, R) => /* @__PURE__ */ i(
591
675
  "div",
592
676
  {
593
- ref: (P) => {
594
- l.current[g] = P;
677
+ ref: (F) => {
678
+ h.current[R] = F;
595
679
  },
596
- children: /* @__PURE__ */ e(
597
- s1,
680
+ children: /* @__PURE__ */ i(
681
+ ht,
598
682
  {
599
- title: u.title,
683
+ title: w.title,
600
684
  className: M.stepItem,
601
- localId: u.localId,
602
- idx: g,
603
- isSet: u.isSet,
604
- isSelected: u.isSelected,
605
- isInvalid: u.isInvalid,
606
- isFilter: u.isFilter,
607
- icon: u.icon,
608
- onSelectStep: c,
609
- onUpdateFilter: d,
610
- contextMenuItems: [
611
- {
612
- label: "Delete",
613
- icon: /* @__PURE__ */ e(J, { className: "mr-2", color: "#3B64A0", size: 18 }),
614
- command: () => {
615
- i?.(u.localId);
616
- },
617
- disabled: t.length === 1
618
- },
619
- {
620
- label: "",
621
- template: () => /* @__PURE__ */ e(bt, {})
622
- },
623
- {
624
- label: "Add More Triggers",
625
- icon: /* @__PURE__ */ e(q1, { className: "mr-2", color: "#3B64A0", size: 18 }),
626
- command: () => {
627
- r?.();
628
- }
629
- }
630
- ]
685
+ id: w.id,
686
+ isSet: w.isSet,
687
+ isSelected: w.isSelected,
688
+ isInvalid: w.isInvalid,
689
+ isFilter: w.isFilter,
690
+ status: w.status,
691
+ debuggerMode: r,
692
+ icon: w.icon,
693
+ onSelectStep: p,
694
+ items: s,
695
+ menuContext: { stepId: w.id },
696
+ onAction: c,
697
+ filterFlagActionId: l
631
698
  }
632
699
  )
633
700
  },
634
- u.localId
701
+ w.id
635
702
  )) }),
636
- /* @__PURE__ */ e("div", { style: { position: "relative" }, children: f.length > 1 && /* @__PURE__ */ e(
703
+ /* @__PURE__ */ i("div", { style: { position: "relative" }, children: m.length > 1 && /* @__PURE__ */ i(
637
704
  "svg",
638
705
  {
639
706
  className: M.curvesSvg,
640
- width: _.width,
641
- height: _.height,
642
- children: f.map((u) => {
643
- const P = f.length === 1 ? f[0].top + A : u.top + A;
644
- return /* @__PURE__ */ e(
707
+ width: f.width,
708
+ height: f.height,
709
+ children: m.map((w) => {
710
+ const F = m.length === 1 ? m[0].top + ft : w.top + ft, A = T, Y = L, B = t.find(
711
+ (ct) => ct.id === w.id
712
+ )?.status, lt = d != null ? d(B) : Kt(B, r), nt = pt(lt);
713
+ return /* @__PURE__ */ i(
645
714
  "path",
646
715
  {
647
- d: L(0, P, m, y),
648
- stroke: "#3b64a0",
649
- strokeWidth: "2",
716
+ d: j(0, F, A, Y),
717
+ stroke: lt,
718
+ strokeWidth: nt ? 3 : 2,
650
719
  fill: "none",
651
- strokeLinecap: "round"
720
+ strokeLinecap: "round",
721
+ strokeDasharray: nt ? "0 6" : void 0
652
722
  },
653
- u.localId
723
+ w.id
654
724
  );
655
725
  })
656
726
  }
657
727
  ) }),
658
- f.length > 1 ? /* @__PURE__ */ h("div", { style: { position: "relative", marginRight: "140px" }, children: [
659
- /* @__PURE__ */ e(
728
+ m.length > 1 ? /* @__PURE__ */ C("div", { style: { position: "relative", marginRight: "140px" }, children: [
729
+ /* @__PURE__ */ i(
660
730
  "div",
661
731
  {
662
732
  className: M.centralNode,
663
733
  style: {
664
- "--node-x": `${m}px`,
665
- "--node-y": `${y}px`
734
+ "--node-x": `${T}px`,
735
+ "--node-y": `${L}px`,
736
+ ...r && {
737
+ cursor: "default",
738
+ pointerEvents: "none"
739
+ },
740
+ ...D && {
741
+ backgroundColor: I.FINISHED_GREEN
742
+ }
743
+ },
744
+ ...!r && {
745
+ onMouseEnter: () => v(!0),
746
+ onMouseLeave: () => v(!1)
666
747
  },
667
- onMouseEnter: () => p(!0),
668
- onMouseLeave: () => p(!1),
669
- children: I ? /* @__PURE__ */ e(
748
+ children: !r && K && y ? /* @__PURE__ */ i(
670
749
  "div",
671
750
  {
672
- className: `${M.iconWrapper} ${C ? M.fadeIn : M.fadeOut}`,
673
- onClick: r,
674
- children: /* @__PURE__ */ e(ct, {})
751
+ className: `${M.iconWrapper} ${E ? M.fadeIn : M.fadeOut}`,
752
+ onClick: X,
753
+ children: /* @__PURE__ */ i(Xe, {})
675
754
  }
676
755
  ) : null
677
756
  }
678
757
  ),
679
- /* @__PURE__ */ e(
758
+ /* @__PURE__ */ i(
680
759
  "div",
681
760
  {
682
761
  className: M.operationContainer,
683
762
  style: {
684
- "--op-x": `${m + 16}px`,
685
- "--op-y": `${y}px`
763
+ "--op-x": `${T + 16}px`,
764
+ "--op-y": `${L}px`
686
765
  },
687
- children: /* @__PURE__ */ e(pt, {})
766
+ children: /* @__PURE__ */ i(Qe, { color: D ? I.FINISHED_GREEN : void 0 })
688
767
  }
689
768
  )
690
769
  ] }) : null
691
770
  ] })
692
771
  ] });
693
- };
694
- function Bt(t) {
695
- return Z({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "circle", attr: { cx: "12", cy: "12", r: "4" }, child: [] }, { tag: "line", attr: { x1: "1.05", y1: "12", x2: "7", y2: "12" }, child: [] }, { tag: "line", attr: { x1: "17.01", y1: "12", x2: "22.96", y2: "12" }, child: [] }] })(t);
696
- }
697
- function Pt(t) {
698
- return Z({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "polygon", attr: { points: "13 2 3 14 12 14 11 22 21 10 12 10 13 2" }, child: [] }] })(t);
699
- }
700
- const Mt = () => /* @__PURE__ */ h(
772
+ }, jt = () => /* @__PURE__ */ C(
701
773
  "svg",
702
774
  {
703
775
  width: "24",
@@ -706,302 +778,323 @@ const Mt = () => /* @__PURE__ */ h(
706
778
  fill: "none",
707
779
  xmlns: "http://www.w3.org/2000/svg",
708
780
  children: [
709
- /* @__PURE__ */ e(
781
+ /* @__PURE__ */ i(
710
782
  "path",
711
783
  {
712
784
  d: "M6 12L18 12",
713
- stroke: "#3B64A0",
785
+ stroke: I.NAVY,
714
786
  strokeWidth: "2",
715
787
  strokeLinecap: "round"
716
788
  }
717
789
  ),
718
- /* @__PURE__ */ e(
790
+ /* @__PURE__ */ i(
719
791
  "path",
720
792
  {
721
793
  d: "M12 6V18",
722
- stroke: "#3B64A0",
794
+ stroke: I.NAVY,
723
795
  strokeWidth: "2",
724
796
  strokeLinecap: "round"
725
797
  }
726
798
  )
727
799
  ]
728
800
  }
729
- ), Lt = "_stepLinkIcon_18u2g_1", Et = "_stepLinkLine_18u2g_15", $t = "_stepLinkContainer_18u2g_39", X = {
730
- stepLinkIcon: Lt,
731
- stepLinkLine: Et,
732
- stepLinkContainer: $t
733
- }, F = ({
734
- onAddStep: t,
735
- onAddTrigger: n,
736
- onAddCondition: o,
737
- onAddLoop: i,
738
- stepId: r,
739
- index: c = 0,
740
- style: d,
741
- pathId: a
801
+ ), mn = "_stepLinkIcon_b0452_1", vn = "_stepLinkLine_b0452_15", _n = "_stepLinkContainer_b0452_39", xn = "_readOnly_b0452_61", wn = "_debuggerIconCollapsed_b0452_66", bn = "_dashedLine_b0452_75", W = {
802
+ stepLinkIcon: mn,
803
+ stepLinkLine: vn,
804
+ stepLinkContainer: _n,
805
+ readOnly: xn,
806
+ debuggerIconCollapsed: wn,
807
+ dashedLine: bn
808
+ }, it = ({
809
+ items: t,
810
+ onAction: e,
811
+ lineColor: n = I.NAVY,
812
+ stepId: s,
813
+ index: o = 0,
814
+ style: l,
815
+ pathId: c
742
816
  }) => {
743
- const s = i1(), l = $(null), f = [
744
- ...c > 0 ? [
745
- {
746
- label: "Trigger",
747
- icon: /* @__PURE__ */ e(Pt, { color: "#3B64A0", size: 18 }),
748
- command: () => {
749
- n?.(r, a, "trigger");
750
- },
751
- template: s
752
- }
753
- ] : [],
754
- {
755
- label: "Step",
756
- icon: /* @__PURE__ */ e(Bt, { color: "#3B64A0", size: 18 }),
757
- command: () => t?.(r, a, "append"),
758
- template: s
759
- },
760
- ...r ? [
761
- {
762
- label: "Condition",
763
- icon: /* @__PURE__ */ e(rt, { width: 18, height: 18 }),
764
- command: () => o?.(r, a, "append"),
765
- template: s
766
- },
767
- {
768
- label: "Loop",
769
- icon: /* @__PURE__ */ e(st, { width: 18, height: 18 }),
770
- command: () => i?.(r, a, "append"),
771
- template: s
772
- }
773
- ] : []
774
- ], b = (_) => {
775
- l.current?.show(_);
817
+ const p = $(null), a = k(
818
+ () => ({
819
+ stepId: s,
820
+ pathId: c,
821
+ operation: o > 0 ? "append" : "prepend"
822
+ }),
823
+ [s, c, o]
824
+ ), r = k(() => e ? bt(t, a, e) : [], [t, a, e]), d = (g) => {
825
+ p.current?.show(g);
776
826
  };
777
- return /* @__PURE__ */ h(
827
+ return /* @__PURE__ */ C(
778
828
  "div",
779
829
  {
780
- className: X.stepLinkContainer,
781
- style: { ...d },
782
- "data-plus-index": c,
830
+ className: W.stepLinkContainer,
831
+ style: { ...l, "--step-link-color": n },
832
+ "data-plus-index": o,
783
833
  children: [
784
- /* @__PURE__ */ e("div", { className: X.stepLinkLine }),
785
- /* @__PURE__ */ e(
786
- "div",
787
- {
788
- className: X.stepLinkIcon,
789
- onClick: b,
790
- "aria-haspopup": !0,
791
- children: /* @__PURE__ */ e(Mt, {})
792
- }
793
- ),
794
- /* @__PURE__ */ e(Q, { model: f, popup: !0, ref: l }),
795
- /* @__PURE__ */ e("div", { className: X.stepLinkLine })
834
+ /* @__PURE__ */ i("div", { className: W.stepLinkLine }),
835
+ r.length > 0 ? /* @__PURE__ */ C(G, { children: [
836
+ /* @__PURE__ */ i(
837
+ "div",
838
+ {
839
+ className: W.stepLinkIcon,
840
+ onClick: d,
841
+ "aria-haspopup": !0,
842
+ children: /* @__PURE__ */ i(jt, {})
843
+ }
844
+ ),
845
+ /* @__PURE__ */ i(xt, { model: r, popup: !0, ref: p })
846
+ ] }) : /* @__PURE__ */ i("div", { className: W.stepLinkIcon, "aria-hidden": !0, children: /* @__PURE__ */ i(jt, {}) }),
847
+ /* @__PURE__ */ i("div", { className: W.stepLinkLine })
796
848
  ]
797
849
  }
798
850
  );
799
- }, Tt = "_steps_yug55_1", Ot = "_stepContainer_yug55_8", jt = "_stepContainerWithPaths_yug55_14", e1 = {
800
- steps: Tt,
801
- stepContainer: Ot,
802
- stepContainerWithPaths: jt
803
- }, Ht = (t, n, o, i) => {
804
- const r = o - t, c = Math.min(r * 0.66, 66), d = t + c, a = n, s = o - c;
805
- return `M ${t} ${n} C ${d} ${a}, ${s} ${i}, ${o} ${i}`;
806
- }, St = ({
851
+ }, yn = "_steps_yug55_1", Nn = "_stepContainer_yug55_8", In = "_stepContainerWithPaths_yug55_14", rt = {
852
+ steps: yn,
853
+ stepContainer: Nn,
854
+ stepContainerWithPaths: In
855
+ }, Sn = (t, e, n, s) => {
856
+ const o = n - t, l = Math.min(o * 0.66, 66), c = t + l, p = e, a = n - l;
857
+ return `M ${t} ${e} C ${c} ${p}, ${a} ${s}, ${n} ${s}`;
858
+ }, Nt = ({
807
859
  width: t,
808
- height: n
860
+ height: e,
861
+ strokeColor: n = I.NAVY,
862
+ fromId: s,
863
+ toId: o
809
864
  }) => {
810
- const d = Ht(0, 1, t, n);
811
- return /* @__PURE__ */ e("div", { style: { position: "absolute" }, children: /* @__PURE__ */ e(
812
- "svg",
865
+ const l = pt(n), d = Sn(0, 1, t, e);
866
+ return /* @__PURE__ */ i(
867
+ "div",
813
868
  {
814
- width: t,
815
- height: n + 1,
816
- viewBox: `0 0 ${t} ${n + 1}`,
817
- xmlns: "http://www.w3.org/2000/svg",
818
- children: /* @__PURE__ */ e(
819
- "path",
869
+ style: { position: "absolute" },
870
+ "data-connector-from": void 0,
871
+ "data-connector-to": void 0,
872
+ children: /* @__PURE__ */ i(
873
+ "svg",
820
874
  {
821
- d,
822
- stroke: "#3b64a0",
823
- strokeWidth: "2",
824
- fill: "none",
825
- strokeLinecap: "round"
875
+ width: t,
876
+ height: e + 1,
877
+ viewBox: `0 0 ${t} ${e + 1}`,
878
+ xmlns: "http://www.w3.org/2000/svg",
879
+ children: /* @__PURE__ */ i(
880
+ "path",
881
+ {
882
+ d,
883
+ stroke: n,
884
+ strokeWidth: l ? 3 : 2,
885
+ fill: "none",
886
+ strokeLinecap: "round",
887
+ strokeDasharray: l ? "0 6" : void 0,
888
+ "data-connector-from": void 0,
889
+ "data-connector-to": void 0
890
+ }
891
+ )
826
892
  }
827
893
  )
828
894
  }
829
- ) });
830
- }, Wt = "_column_1uiy3_1", Rt = "_row_1uiy3_19", zt = "_stepsContainer_1uiy3_24", V = {
831
- column: Wt,
832
- row: Rt,
833
- stepsContainer: zt
834
- }, Dt = "_wrapper_1nl2d_1", Ft = "_tooltip_1nl2d_5", C1 = {
835
- wrapper: Dt,
836
- tooltip: Ft
837
- }, Zt = ({
895
+ );
896
+ }, Ln = "_column_1uiy3_1", Tn = "_row_1uiy3_19", En = "_stepsContainer_1uiy3_24", z = {
897
+ column: Ln,
898
+ row: Tn,
899
+ stepsContainer: En
900
+ }, Pn = "_wrapper_1nl2d_1", kn = "_tooltip_1nl2d_5", Ht = {
901
+ wrapper: Pn,
902
+ tooltip: kn
903
+ }, Rn = ({
838
904
  content: t,
839
- children: n,
840
- maxWidth: o = 500,
841
- className: i
842
- }) => /* @__PURE__ */ h(
905
+ children: e,
906
+ maxWidth: n = 500,
907
+ className: s
908
+ }) => /* @__PURE__ */ C(
843
909
  "div",
844
910
  {
845
- className: `${C1.wrapper} ${i ?? ""}`.trim(),
846
- style: { "--tooltip-max-width": `${o}px` },
911
+ className: `${Ht.wrapper} ${s ?? ""}`.trim(),
912
+ style: { "--tooltip-max-width": `${n}px` },
847
913
  children: [
848
- n,
849
- t ? /* @__PURE__ */ e("div", { className: C1.tooltip, role: "tooltip", children: t }) : null
914
+ e,
915
+ t ? /* @__PURE__ */ i("div", { className: Ht.tooltip, role: "tooltip", children: t }) : null
850
916
  ]
851
917
  }
852
- ), Vt = "_conditionContainer_n6c2x_1", Yt = "_connectorLine_n6c2x_6", At = "_conditionWrapper_n6c2x_12", Xt = "_condition_n6c2x_1", Gt = "_conditionFits_n6c2x_53", Kt = "_connectorDot_n6c2x_57", R = {
853
- conditionContainer: Vt,
854
- connectorLine: Yt,
855
- conditionWrapper: At,
856
- condition: Xt,
857
- conditionFits: Gt,
858
- connectorDot: Kt
859
- }, x1 = ({
918
+ ), On = "_conditionContainer_19jfz_1", Mn = "_debuggerTint_19jfz_5", $n = "_connectorLine_19jfz_5", Dn = "_connectorDot_19jfz_8", Fn = "_condition_19jfz_1", Bn = "_conditionWrapper_19jfz_15", Wn = "_conditionFits_19jfz_67", q = {
919
+ conditionContainer: On,
920
+ debuggerTint: Mn,
921
+ connectorLine: $n,
922
+ connectorDot: Dn,
923
+ condition: Fn,
924
+ conditionWrapper: Bn,
925
+ conditionFits: Wn
926
+ }, yt = ({
860
927
  expression: t,
861
- style: n
928
+ style: e,
929
+ status: n,
930
+ debuggerMode: s = !1
862
931
  }) => {
863
- const o = $(null), i = $(null), [r, c] = E(!1);
864
- L1(() => {
865
- const s = o.current, l = i.current;
866
- !s || !l || c(l.offsetWidth > s.clientWidth);
932
+ const o = $(null), l = $(null), [c, p] = O(!1);
933
+ he(() => {
934
+ const m = o.current, x = l.current;
935
+ if (!m || !x) return;
936
+ const { paddingLeft: f, paddingRight: N } = getComputedStyle(m), E = Number.parseFloat(f) + Number.parseFloat(N);
937
+ p(x.offsetWidth >= m.clientWidth - E);
867
938
  }, [t]);
868
- const d = t && r ? t : "", a = `${R.condition} ${r ? "" : R.conditionFits}`.trim();
869
- return /* @__PURE__ */ h("div", { className: R.conditionContainer, style: n, children: [
870
- /* @__PURE__ */ e("div", { className: R.connectorLine }),
871
- /* @__PURE__ */ e(Zt, { content: d, className: R.conditionWrapper, children: /* @__PURE__ */ e("div", { ref: o, className: a, children: /* @__PURE__ */ e("span", { ref: i, children: t }) }) }),
872
- /* @__PURE__ */ e("div", { className: R.connectorLine }),
873
- /* @__PURE__ */ e("div", { className: R.connectorDot })
874
- ] });
875
- }, qt = "data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='21.8125'%20y='-2.52539'%20width='34.4207'%20height='34.4207'%20rx='6.09524'%20transform='rotate(45%2021.8125%20-2.52539)'%20fill='%236B90C0'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M31.3947%2013.0355C31.4679%2013.1085%2031.526%2013.1952%2031.5656%2013.2907C31.6052%2013.3861%2031.6256%2013.4885%2031.6256%2013.5918C31.6256%2013.6952%2031.6052%2013.7975%2031.5656%2013.8929C31.526%2013.9884%2031.4679%2014.0751%2031.3947%2014.1481L14.109%2031.4338C13.9615%2031.5813%2013.7614%2031.6642%2013.5527%2031.6642C13.3441%2031.6642%2013.144%2031.5813%2012.9965%2031.4338C12.8489%2031.2863%2012.766%2031.0862%2012.766%2030.8775C12.766%2030.6689%2012.8489%2030.4688%2012.9965%2030.3212L30.2822%2013.0355C30.3552%2012.9623%2030.4419%2012.9043%2030.5373%2012.8647C30.6328%2012.8251%2030.7351%2012.8047%2030.8385%2012.8047C30.9418%2012.8047%2031.0441%2012.8251%2031.1396%2012.8647C31.2351%2012.9043%2031.3218%2012.9623%2031.3947%2013.0355Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.9965%2013.0355C12.9233%2013.1085%2012.8652%2013.1952%2012.8256%2013.2907C12.786%2013.3861%2012.7656%2013.4885%2012.7656%2013.5918C12.7656%2013.6952%2012.786%2013.7975%2012.8256%2013.8929C12.8652%2013.9884%2012.9233%2014.0751%2012.9965%2014.1481L30.2822%2031.4338C30.4297%2031.5813%2030.6298%2031.6642%2030.8385%2031.6642C31.0471%2031.6642%2031.2472%2031.5813%2031.3947%2031.4338C31.5423%2031.2863%2031.6252%2031.0862%2031.6252%2030.8775C31.6252%2030.6689%2031.5423%2030.4688%2031.3947%2030.3212L14.109%2013.0355C14.036%2012.9623%2013.9493%2012.9043%2013.8539%2012.8647C13.7584%2012.8251%2013.6561%2012.8047%2013.5527%2012.8047C13.4494%2012.8047%2013.3471%2012.8251%2013.2516%2012.8647C13.1561%2012.9043%2013.0694%2012.9623%2012.9965%2013.0355Z'%20fill='white'/%3e%3c/svg%3e", Jt = "data:image/svg+xml,%3csvg%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='1'%20y='1'%20width='26'%20height='26'%20rx='13'%20fill='white'/%3e%3crect%20x='1'%20y='1'%20width='26'%20height='26'%20rx='13'%20stroke='%236B90C0'%20stroke-width='2'/%3e%3ccircle%20cx='14'%20cy='14'%20r='6'%20fill='%236B90C0'/%3e%3c/svg%3e", Qt = "_ifStatement_xtij3_1", Ut = "_conditionIcon_xtij3_7", te = "_ifStatementContainer_xtij3_21", ee = "_menuButton_xtij3_27", ne = "_menuIcon_xtij3_52", oe = "_ifdotIcon_xtij3_59", z = {
876
- ifStatement: Qt,
877
- conditionIcon: Ut,
878
- ifStatementContainer: te,
879
- menuButton: ee,
880
- menuIcon: ne,
881
- ifdotIcon: oe
882
- }, ie = ({ style: t }) => /* @__PURE__ */ e(
939
+ const a = t && c ? t : "", r = s && n === "finished", d = r, g = k(() => {
940
+ if (r)
941
+ return {
942
+ "--condition-accent": wt.finished,
943
+ "--condition-bg": Ae.finished,
944
+ "--condition-line-width": "3px",
945
+ "--condition-line-style": "dotted"
946
+ };
947
+ }, [r]), b = `${q.condition} ${c ? "" : q.conditionFits}`.trim(), h = `${q.conditionContainer} ${d ? q.debuggerTint : ""}`.trim();
948
+ return /* @__PURE__ */ C(
949
+ "div",
950
+ {
951
+ className: h,
952
+ style: { ...e, ...g },
953
+ children: [
954
+ /* @__PURE__ */ i("div", { className: q.connectorLine }),
955
+ /* @__PURE__ */ i(Rn, { content: a, className: q.conditionWrapper, children: /* @__PURE__ */ i("div", { ref: o, className: b, children: /* @__PURE__ */ i("span", { ref: l, children: t }) }) }),
956
+ /* @__PURE__ */ i("div", { className: q.connectorLine }),
957
+ /* @__PURE__ */ i("div", { className: q.connectorDot })
958
+ ]
959
+ }
960
+ );
961
+ }, jn = "data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='21.8125'%20y='-2.52539'%20width='34.4207'%20height='34.4207'%20rx='6.09524'%20transform='rotate(45%2021.8125%20-2.52539)'%20fill='%236B90C0'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M31.3947%2013.0355C31.4679%2013.1085%2031.526%2013.1952%2031.5656%2013.2907C31.6052%2013.3861%2031.6256%2013.4885%2031.6256%2013.5918C31.6256%2013.6952%2031.6052%2013.7975%2031.5656%2013.8929C31.526%2013.9884%2031.4679%2014.0751%2031.3947%2014.1481L14.109%2031.4338C13.9615%2031.5813%2013.7614%2031.6642%2013.5527%2031.6642C13.3441%2031.6642%2013.144%2031.5813%2012.9965%2031.4338C12.8489%2031.2863%2012.766%2031.0862%2012.766%2030.8775C12.766%2030.6689%2012.8489%2030.4688%2012.9965%2030.3212L30.2822%2013.0355C30.3552%2012.9623%2030.4419%2012.9043%2030.5373%2012.8647C30.6328%2012.8251%2030.7351%2012.8047%2030.8385%2012.8047C30.9418%2012.8047%2031.0441%2012.8251%2031.1396%2012.8647C31.2351%2012.9043%2031.3218%2012.9623%2031.3947%2013.0355Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.9965%2013.0355C12.9233%2013.1085%2012.8652%2013.1952%2012.8256%2013.2907C12.786%2013.3861%2012.7656%2013.4885%2012.7656%2013.5918C12.7656%2013.6952%2012.786%2013.7975%2012.8256%2013.8929C12.8652%2013.9884%2012.9233%2014.0751%2012.9965%2014.1481L30.2822%2031.4338C30.4297%2031.5813%2030.6298%2031.6642%2030.8385%2031.6642C31.0471%2031.6642%2031.2472%2031.5813%2031.3947%2031.4338C31.5423%2031.2863%2031.6252%2031.0862%2031.6252%2030.8775C31.6252%2030.6689%2031.5423%2030.4688%2031.3947%2030.3212L14.109%2013.0355C14.036%2012.9623%2013.9493%2012.9043%2013.8539%2012.8647C13.7584%2012.8251%2013.6561%2012.8047%2013.5527%2012.8047C13.4494%2012.8047%2013.3471%2012.8251%2013.2516%2012.8647C13.1561%2012.9043%2013.0694%2012.9623%2012.9965%2013.0355Z'%20fill='white'/%3e%3c/svg%3e", Hn = "data:image/svg+xml,%3csvg%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='1'%20y='1'%20width='26'%20height='26'%20rx='13'%20fill='white'/%3e%3crect%20x='1'%20y='1'%20width='26'%20height='26'%20rx='13'%20stroke='%236B90C0'%20stroke-width='2'/%3e%3ccircle%20cx='14'%20cy='14'%20r='6'%20fill='%236B90C0'/%3e%3c/svg%3e", zn = "data:image/svg+xml,%3csvg%20width='44'%20height='44'%20viewBox='0%200%2044%2044'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='21.8125'%20y='-2.52539'%20width='34.4207'%20height='34.4207'%20rx='6.09524'%20transform='rotate(45%2021.8125%20-2.52539)'%20fill='%2317A34A'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M31.3947%2013.0355C31.4679%2013.1085%2031.526%2013.1952%2031.5656%2013.2907C31.6052%2013.3861%2031.6256%2013.4885%2031.6256%2013.5918C31.6256%2013.6952%2031.6052%2013.7975%2031.5656%2013.8929C31.526%2013.9884%2031.4679%2014.0751%2031.3947%2014.1481L14.109%2031.4338C13.9615%2031.5813%2013.7614%2031.6642%2013.5527%2031.6642C13.3441%2031.6642%2013.144%2031.5813%2012.9965%2031.4338C12.8489%2031.2863%2012.766%2031.0862%2012.766%2030.8775C12.766%2030.6689%2012.8489%2030.4688%2012.9965%2030.3212L30.2822%2013.0355C30.3552%2012.9623%2030.4419%2012.9043%2030.5373%2012.8647C30.6328%2012.8251%2030.7351%2012.8047%2030.8385%2012.8047C30.9418%2012.8047%2031.0441%2012.8251%2031.1396%2012.8647C31.2351%2012.9043%2031.3218%2012.9623%2031.3947%2013.0355Z'%20fill='white'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.9965%2013.0355C12.9233%2013.1085%2012.8652%2013.1952%2012.8256%2013.2907C12.786%2013.3861%2012.7656%2013.4885%2012.7656%2013.5918C12.7656%2013.6952%2012.786%2013.7975%2012.8256%2013.8929C12.8652%2013.9884%2012.9233%2014.0751%2012.9965%2014.1481L30.2822%2031.4338C30.4297%2031.5813%2030.6298%2031.6642%2030.8385%2031.6642C31.0471%2031.6642%2031.2472%2031.5813%2031.3947%2031.4338C31.5423%2031.2863%2031.6252%2031.0862%2031.6252%2030.8775C31.6252%2030.6689%2031.5423%2030.4688%2031.3947%2030.3212L14.109%2013.0355C14.036%2012.9623%2013.9493%2012.9043%2013.8539%2012.8647C13.7584%2012.8251%2013.6561%2012.8047%2013.5527%2012.8047C13.4494%2012.8047%2013.3471%2012.8251%2013.2516%2012.8647C13.1561%2012.9043%2013.0694%2012.9623%2012.9965%2013.0355Z'%20fill='white'/%3e%3c/svg%3e", An = "data:image/svg+xml,%3csvg%20width='28'%20height='28'%20viewBox='0%200%2028%2028'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='1'%20y='1'%20width='26'%20height='26'%20rx='13'%20fill='white'/%3e%3crect%20x='1'%20y='1'%20width='26'%20height='26'%20rx='13'%20stroke='%2317A34A'%20stroke-width='2'/%3e%3ccircle%20cx='14'%20cy='14'%20r='6'%20fill='%2317A34A'/%3e%3c/svg%3e", Yn = "_ifStatement_xtij3_1", Gn = "_conditionIcon_xtij3_7", Vn = "_ifStatementContainer_xtij3_21", Zn = "_menuButton_xtij3_27", qn = "_menuIcon_xtij3_52", Un = "_ifdotIcon_xtij3_59", J = {
962
+ ifStatement: Yn,
963
+ conditionIcon: Gn,
964
+ ifStatementContainer: Vn,
965
+ menuButton: Zn,
966
+ menuIcon: qn,
967
+ ifdotIcon: Un
968
+ }, Xn = ({
969
+ style: t,
970
+ color: e = I.NAVY
971
+ }) => /* @__PURE__ */ i(
883
972
  "div",
884
973
  {
885
974
  style: {
886
975
  width: "100%",
887
976
  height: "2px",
888
- borderTop: "2px solid #3B64A0",
977
+ borderTop: et(e),
889
978
  ...t
890
979
  }
891
980
  }
892
- ), re = ({
893
- onEdit: t,
894
- onDelete: n,
895
- onSelect: o
896
- }) => {
897
- const i = $(null), { openMenu: r, closeMenu: c } = r1(), d = H(
898
- () => [
899
- {
900
- label: "Edit",
901
- icon: /* @__PURE__ */ e(v1, { color: "#3B64A0", size: 18 }),
902
- command: () => t?.()
903
- },
904
- {
905
- label: "Delete",
906
- icon: /* @__PURE__ */ e(J, { color: "#3B64A0", size: 18 }),
907
- command: () => n?.()
908
- }
909
- ],
910
- [t, n]
911
- ), a = (l) => {
912
- l.stopPropagation(), r(i, l);
913
- }, s = (l) => {
914
- l.target.closest(`.${z.menuButton}`) || o?.();
981
+ ), Qt = (t) => {
982
+ const {
983
+ enabled: e = !0,
984
+ items: n,
985
+ menuContext: s,
986
+ onAction: o,
987
+ onSelect: l,
988
+ debuggerMode: c = !1,
989
+ status: p
990
+ } = t, a = $(null), { openMenu: r, closeMenu: d } = Lt(), g = k(
991
+ () => s ?? {},
992
+ [s]
993
+ ), b = k(() => o ? bt(n, g, o) : [], [n, g, o]), h = e && !c && b.length > 0, m = c && p === "finished", x = m ? Kt("finished", !0) : I.NAVY, f = m ? zn : jn, N = m ? An : Hn, E = (y) => {
994
+ y.stopPropagation(), r(a, y);
995
+ }, v = (y) => {
996
+ y.target.closest(`.${J.menuButton}`) || l?.();
915
997
  };
916
- return /* @__PURE__ */ h("div", { className: z.ifStatementContainer, children: [
917
- /* @__PURE__ */ e(
918
- ie,
998
+ return /* @__PURE__ */ C("div", { className: J.ifStatementContainer, children: [
999
+ /* @__PURE__ */ i(
1000
+ Xn,
919
1001
  {
1002
+ color: x,
920
1003
  style: { position: "absolute", top: "22.5px", left: 0, zIndex: 1 }
921
1004
  }
922
1005
  ),
923
- /* @__PURE__ */ e("div", { className: z.ifStatement, children: /* @__PURE__ */ e(
1006
+ /* @__PURE__ */ i("div", { className: J.ifStatement, children: /* @__PURE__ */ i(
924
1007
  "img",
925
1008
  {
926
- src: qt,
1009
+ src: f,
927
1010
  alt: "condition",
928
- onClick: (l) => s(l),
929
- className: z.conditionIcon
1011
+ onClick: (y) => v(y),
1012
+ className: J.conditionIcon
930
1013
  }
931
1014
  ) }),
932
- /* @__PURE__ */ e(
933
- "button",
934
- {
935
- type: "button",
936
- className: z.menuButton,
937
- onClick: a,
938
- "aria-label": "Open menu",
939
- "aria-haspopup": "menu",
940
- children: /* @__PURE__ */ e(q, { className: z.menuIcon, size: 16 })
941
- }
942
- ),
943
- /* @__PURE__ */ e(
944
- Q,
945
- {
946
- ref: i,
947
- model: d,
948
- popup: !0,
949
- onHide: () => c(i)
950
- }
951
- ),
952
- /* @__PURE__ */ e("img", { src: Jt, alt: "ifdot", className: z.ifdotIcon })
1015
+ h && /* @__PURE__ */ C(G, { children: [
1016
+ /* @__PURE__ */ i(
1017
+ "button",
1018
+ {
1019
+ type: "button",
1020
+ className: J.menuButton,
1021
+ onClick: E,
1022
+ "aria-label": "Open menu",
1023
+ "aria-haspopup": "menu",
1024
+ children: /* @__PURE__ */ i(mt, { className: J.menuIcon, size: 16 })
1025
+ }
1026
+ ),
1027
+ /* @__PURE__ */ i(
1028
+ xt,
1029
+ {
1030
+ ref: a,
1031
+ model: b,
1032
+ popup: !0,
1033
+ onHide: () => d(a)
1034
+ }
1035
+ )
1036
+ ] }),
1037
+ /* @__PURE__ */ i("img", { src: N, alt: "ifdot", className: J.ifdotIcon })
953
1038
  ] });
954
- }, se = 34.5, w1 = ({
955
- items: t,
956
- pathId: n,
957
- onAddStep: o,
958
- onAddTrigger: i,
959
- onAddCondition: r,
960
- onAddLoop: c,
961
- onDeleteStep: d,
962
- onUpdateFilter: a,
963
- onSelectStep: s,
964
- onResize: l
965
- }) => {
966
- const f = $(null), b = $([]), [_, x] = E([]);
967
- Y(() => {
968
- const p = () => {
969
- if (!f.current || t.length === 0) {
970
- x([]);
1039
+ }, zt = 34.5, Kn = 33, at = I.NAVY, te = (t) => {
1040
+ const {
1041
+ items: e,
1042
+ pathId: n,
1043
+ menus: s,
1044
+ filterFlagActionId: o,
1045
+ onAction: l,
1046
+ onSelectStep: c,
1047
+ onResize: p
1048
+ } = t, a = $(null), r = $([]), [d, g] = O([]);
1049
+ ot(() => {
1050
+ const h = () => {
1051
+ const f = a.current;
1052
+ if (!f || e.length === 0) {
1053
+ g([]);
971
1054
  return;
972
1055
  }
973
- const I = f.current.getBoundingClientRect(), w = [];
974
- for (let v = 0; v < t.length; v++) {
975
- const m = b.current[v];
976
- if (m) {
977
- const y = m.getBoundingClientRect();
978
- w.push(y.top - I.top + se);
979
- }
1056
+ const N = [], E = Number.parseFloat(
1057
+ getComputedStyle(f).zoom || "1"
1058
+ );
1059
+ for (let v = 0; v < e.length; v++) {
1060
+ const y = r.current[v];
1061
+ if (y)
1062
+ if (y.offsetParent == null) {
1063
+ const u = f.getBoundingClientRect(), _ = y.getBoundingClientRect();
1064
+ N.push((_.top - u.top) / E + zt);
1065
+ } else
1066
+ N.push(y.offsetTop - Kn + zt);
980
1067
  }
981
- w.length === t.length && x(w);
1068
+ N.length === e.length && g(N);
982
1069
  };
983
- return p(), window.addEventListener("resize", p), () => window.removeEventListener("resize", p);
984
- }, [t]);
985
- const C = H(() => _.length !== t.length || t.length <= 1 ? null : t.map((p, I) => I).filter((p) => p > 0).map((p) => {
986
- const I = _[p];
987
- return I === void 0 ? null : /* @__PURE__ */ e(St, { width: 100, height: I }, p);
988
- }), [t, _]);
989
- return /* @__PURE__ */ h("div", { className: V.row, children: [
990
- /* @__PURE__ */ e(
991
- re,
1070
+ h();
1071
+ const m = new ResizeObserver(h), x = a.current;
1072
+ return x && m.observe(x), window.addEventListener("resize", h), () => {
1073
+ m.disconnect(), window.removeEventListener("resize", h);
1074
+ };
1075
+ }, [e]);
1076
+ const b = k(() => d.length !== e.length || e.length <= 1 ? null : e.map((h, m) => m).filter((h) => h > 0).map((h) => {
1077
+ const m = d[h];
1078
+ return m === void 0 ? null : /* @__PURE__ */ i(Nt, { width: 100, height: m, strokeColor: at }, h);
1079
+ }), [e, d]);
1080
+ return /* @__PURE__ */ C("div", { className: z.row, children: [
1081
+ /* @__PURE__ */ i(
1082
+ Qt,
992
1083
  {
993
- onDelete: () => n != null && d?.(n),
994
- onSelect: n != null && s ? () => s(n) : void 0
1084
+ items: s?.condition,
1085
+ menuContext: { pathId: n },
1086
+ onAction: l,
1087
+ onSelect: n != null && c ? () => c(n) : void 0
995
1088
  }
996
1089
  ),
997
- /* @__PURE__ */ h(
1090
+ /* @__PURE__ */ C(
998
1091
  "div",
999
1092
  {
1000
- ref: f,
1001
- className: V.column,
1093
+ ref: a,
1094
+ className: z.column,
1002
1095
  style: { marginTop: "33px" },
1003
1096
  children: [
1004
- /* @__PURE__ */ e(
1097
+ /* @__PURE__ */ i(
1005
1098
  "div",
1006
1099
  {
1007
1100
  style: {
@@ -1010,91 +1103,86 @@ const Mt = () => /* @__PURE__ */ h(
1010
1103
  left: 0,
1011
1104
  width: "100px",
1012
1105
  height: "2px",
1013
- borderTop: "2px solid #3B64A0"
1106
+ borderTop: `2px solid ${at}`
1014
1107
  }
1015
1108
  }
1016
1109
  ),
1017
- C
1110
+ b
1018
1111
  ]
1019
1112
  }
1020
1113
  ),
1021
- /* @__PURE__ */ e("div", { className: V.column, children: t.map((p, I) => {
1022
- let w;
1023
- if (p.paths)
1024
- w = /* @__PURE__ */ e(
1025
- w1,
1114
+ /* @__PURE__ */ i("div", { className: z.column, children: e.map((h, m) => {
1115
+ let x;
1116
+ if (h.paths)
1117
+ x = /* @__PURE__ */ i(
1118
+ te,
1026
1119
  {
1027
- items: p.paths,
1120
+ items: h.paths,
1028
1121
  pathId: n,
1029
- onAddStep: o,
1030
- onAddTrigger: i,
1031
- onAddCondition: r,
1032
- onAddLoop: c,
1033
- onDeleteStep: d,
1034
- onUpdateFilter: a,
1035
- onSelectStep: s,
1036
- onResize: l
1122
+ menus: s,
1123
+ filterFlagActionId: o,
1124
+ onAction: l,
1125
+ onSelectStep: c,
1126
+ onResize: p
1037
1127
  },
1038
- p.localId
1128
+ h.id
1039
1129
  );
1040
- else if (p.steps) {
1041
- const v = p;
1042
- w = /* @__PURE__ */ h("div", { className: V.stepsContainer, children: [
1043
- /* @__PURE__ */ e(
1044
- x1,
1130
+ else if (h.steps) {
1131
+ const f = h;
1132
+ x = /* @__PURE__ */ C("div", { className: z.stepsContainer, children: [
1133
+ /* @__PURE__ */ i(
1134
+ yt,
1045
1135
  {
1046
- expression: v.condition,
1136
+ expression: f.condition,
1137
+ status: f.status,
1047
1138
  style: { marginTop: "25px" }
1048
1139
  }
1049
1140
  ),
1050
- /* @__PURE__ */ e(
1051
- l1,
1141
+ /* @__PURE__ */ i(
1142
+ Tt,
1052
1143
  {
1053
- steps: p.steps,
1054
- pathId: p.localId,
1055
- onSelectStep: s ?? (() => {
1056
- }),
1057
- onAddStep: o ?? (() => {
1058
- }),
1059
- onAddTrigger: i,
1060
- onAddCondition: r ?? (() => {
1144
+ steps: h.steps,
1145
+ pathId: h.id,
1146
+ menus: s,
1147
+ filterFlagActionId: o,
1148
+ onAction: l,
1149
+ onSelectStep: c ?? (() => {
1061
1150
  }),
1062
- onAddLoop: c,
1063
- onDeleteStep: d,
1064
- onUpdateFilter: a,
1065
- onResize: l
1151
+ onResize: p
1066
1152
  },
1067
- p.localId
1153
+ h.id
1068
1154
  )
1069
1155
  ] });
1070
1156
  } else
1071
- w = /* @__PURE__ */ e(
1072
- s1,
1157
+ x = /* @__PURE__ */ i(
1158
+ ht,
1073
1159
  {
1074
- localId: p.localId,
1075
- title: "title" in p ? p.title : "",
1076
- idx: 1,
1077
- icon: "icon" in p ? p.icon : void 0,
1078
- onSelectStep: s,
1079
- onDeleteStep: d,
1080
- onUpdateFilter: a
1160
+ id: h.id,
1161
+ title: "title" in h ? h.title : "",
1162
+ icon: "icon" in h ? h.icon : void 0,
1163
+ status: "status" in h ? h.status : void 0,
1164
+ items: s?.step,
1165
+ menuContext: { stepId: h.id },
1166
+ onAction: l,
1167
+ filterFlagActionId: o,
1168
+ onSelectStep: c
1081
1169
  },
1082
- p.localId
1170
+ h.id
1083
1171
  );
1084
- return /* @__PURE__ */ e(
1172
+ return /* @__PURE__ */ i(
1085
1173
  "div",
1086
1174
  {
1087
- ref: (v) => {
1088
- b.current[I] = v;
1175
+ ref: (f) => {
1176
+ r.current[m] = f;
1089
1177
  },
1090
1178
  style: { width: "100%" },
1091
- children: w
1179
+ children: x
1092
1180
  },
1093
- p.localId
1181
+ h.id
1094
1182
  );
1095
1183
  }) }),
1096
- /* @__PURE__ */ h("div", { className: V.column, style: { marginTop: "33px" }, children: [
1097
- /* @__PURE__ */ e(
1184
+ /* @__PURE__ */ C("div", { className: z.column, style: { marginTop: "33px" }, children: [
1185
+ /* @__PURE__ */ i(
1098
1186
  "div",
1099
1187
  {
1100
1188
  style: {
@@ -1104,19 +1192,18 @@ const Mt = () => /* @__PURE__ */ h(
1104
1192
  flex: 1,
1105
1193
  width: "100%",
1106
1194
  height: "2px",
1107
- borderTop: "2px solid #3B64A0"
1195
+ borderTop: `2px solid ${at}`
1108
1196
  }
1109
1197
  }
1110
1198
  ),
1111
- C
1199
+ b
1112
1200
  ] }),
1113
- /* @__PURE__ */ e(
1114
- F,
1201
+ /* @__PURE__ */ i(
1202
+ it,
1115
1203
  {
1116
- onAddStep: o,
1117
- onAddTrigger: i,
1118
- onAddCondition: r,
1119
- onAddLoop: c,
1204
+ items: s?.add,
1205
+ onAction: l,
1206
+ lineColor: at,
1120
1207
  stepId: n,
1121
1208
  pathId: n,
1122
1209
  index: 1,
@@ -1126,36 +1213,33 @@ const Mt = () => /* @__PURE__ */ h(
1126
1213
  }
1127
1214
  }
1128
1215
  ),
1129
- /* @__PURE__ */ e(
1216
+ /* @__PURE__ */ i(
1130
1217
  "div",
1131
1218
  {
1132
1219
  style: {
1133
1220
  flex: 1,
1134
1221
  width: "100%",
1135
1222
  height: "2px",
1136
- borderTop: "2px solid #3B64A0",
1223
+ borderTop: `2px solid ${at}`,
1137
1224
  marginTop: "34px"
1138
1225
  }
1139
1226
  }
1140
1227
  )
1141
1228
  ] });
1142
- }, o1 = 68, l1 = ({
1229
+ }, It = 68, Q = I.NAVY, Tt = ({
1143
1230
  pathId: t,
1144
- steps: n,
1145
- centerY: o,
1146
- className: i,
1147
- onAddStep: r,
1148
- onDeleteStep: c,
1149
- onUpdateFilter: d,
1150
- onAddTrigger: a,
1151
- onAddCondition: s,
1152
- onAddLoop: l,
1153
- onSelectStep: f,
1154
- onResize: b,
1155
- isDescendent: _ = !0
1231
+ steps: e,
1232
+ centerY: n,
1233
+ className: s,
1234
+ menus: o,
1235
+ filterFlagActionId: l,
1236
+ onAction: c,
1237
+ onSelectStep: p,
1238
+ onResize: a,
1239
+ isDescendent: r = !0
1156
1240
  }) => {
1157
- const x = o === void 0 ? void 0 : { marginTop: Math.max(0, o - o1 / 2) };
1158
- return n.length === 0 ? /* @__PURE__ */ h(
1241
+ const d = n === void 0 ? void 0 : { marginTop: Math.max(0, n - It / 2) };
1242
+ return e.length === 0 ? /* @__PURE__ */ C(
1159
1243
  "div",
1160
1244
  {
1161
1245
  style: {
@@ -1165,10 +1249,10 @@ const Mt = () => /* @__PURE__ */ h(
1165
1249
  flexDirection: "row",
1166
1250
  flex: 1,
1167
1251
  minWidth: 0,
1168
- ...x
1252
+ ...d
1169
1253
  },
1170
1254
  children: [
1171
- /* @__PURE__ */ e(
1255
+ /* @__PURE__ */ i(
1172
1256
  "div",
1173
1257
  {
1174
1258
  style: {
@@ -1178,27 +1262,26 @@ const Mt = () => /* @__PURE__ */ h(
1178
1262
  minWidth: 0,
1179
1263
  height: "2px",
1180
1264
  marginTop: "13.5px",
1181
- borderTop: "2px solid #3B64A0"
1265
+ borderTop: `2px solid ${Q}`
1182
1266
  }
1183
1267
  }
1184
1268
  ),
1185
- /* @__PURE__ */ e(
1186
- F,
1269
+ /* @__PURE__ */ i(
1270
+ it,
1187
1271
  {
1188
- onAddStep: () => {
1189
- r?.(void 0, t);
1190
- },
1191
- onAddTrigger: a,
1192
- onAddCondition: s,
1193
- onAddLoop: l,
1272
+ items: o?.add,
1273
+ onAction: c,
1274
+ lineColor: Q,
1194
1275
  stepId: t,
1276
+ pathId: t,
1195
1277
  index: 0,
1196
1278
  style: {
1197
- height: "auto"
1279
+ height: "auto",
1280
+ marginTop: "0"
1198
1281
  }
1199
1282
  }
1200
1283
  ),
1201
- /* @__PURE__ */ e(
1284
+ /* @__PURE__ */ i(
1202
1285
  "div",
1203
1286
  {
1204
1287
  style: {
@@ -1208,18 +1291,18 @@ const Mt = () => /* @__PURE__ */ h(
1208
1291
  minWidth: 0,
1209
1292
  height: "2px",
1210
1293
  marginTop: "13.5px",
1211
- borderTop: "2px solid #3B64A0"
1294
+ borderTop: `2px solid ${Q}`
1212
1295
  }
1213
1296
  }
1214
1297
  )
1215
1298
  ]
1216
1299
  }
1217
- ) : /* @__PURE__ */ e(
1300
+ ) : /* @__PURE__ */ i(
1218
1301
  "div",
1219
1302
  {
1220
- className: e1.steps + (i ? " " + i : ""),
1221
- style: x,
1222
- children: /* @__PURE__ */ h(
1303
+ className: rt.steps + (s ? " " + s : ""),
1304
+ style: d,
1305
+ children: /* @__PURE__ */ C(
1223
1306
  "div",
1224
1307
  {
1225
1308
  style: {
@@ -1231,16 +1314,13 @@ const Mt = () => /* @__PURE__ */ h(
1231
1314
  alignItems: "flex-start"
1232
1315
  },
1233
1316
  children: [
1234
- /* @__PURE__ */ e(
1235
- F,
1317
+ /* @__PURE__ */ i(
1318
+ it,
1236
1319
  {
1237
- onAddStep: () => {
1238
- r?.(n[0].localId, t, "prepend");
1239
- },
1240
- onAddTrigger: a,
1241
- onAddCondition: s,
1242
- onAddLoop: l,
1243
- stepId: n[0].localId,
1320
+ items: o?.add,
1321
+ onAction: c,
1322
+ lineColor: Q,
1323
+ stepId: e[0].id,
1244
1324
  pathId: t,
1245
1325
  index: 0,
1246
1326
  style: {
@@ -1248,98 +1328,92 @@ const Mt = () => /* @__PURE__ */ h(
1248
1328
  }
1249
1329
  }
1250
1330
  ),
1251
- n.map((C, p) => {
1252
- const I = !!C.paths, w = "condition" in C && typeof C.condition == "string";
1253
- let v;
1254
- return I && C.paths ? v = /* @__PURE__ */ e(
1255
- w1,
1331
+ e.map((g, b) => {
1332
+ const h = !!g.paths, m = "condition" in g && typeof g.condition == "string";
1333
+ let x;
1334
+ return h && g.paths ? x = /* @__PURE__ */ i(
1335
+ te,
1256
1336
  {
1257
- items: C.paths,
1258
- pathId: C.localId,
1259
- onAddStep: r,
1260
- onAddCondition: s,
1261
- onAddLoop: l,
1262
- onDeleteStep: c,
1263
- onAddTrigger: a,
1264
- onSelectStep: f,
1265
- onUpdateFilter: d,
1266
- onResize: b
1337
+ items: g.paths,
1338
+ pathId: g.id,
1339
+ menus: o,
1340
+ filterFlagActionId: l,
1341
+ onAction: c,
1342
+ onSelectStep: p,
1343
+ onResize: a
1267
1344
  },
1268
- C.title
1269
- ) : w ? v = /* @__PURE__ */ h(n1, { children: [
1270
- /* @__PURE__ */ e(
1271
- Ie,
1345
+ g.title
1346
+ ) : m ? x = /* @__PURE__ */ C(G, { children: [
1347
+ /* @__PURE__ */ i(
1348
+ h1,
1272
1349
  {
1273
- value: C,
1274
- onAddStep: r,
1275
- onAddTrigger: a,
1276
- onAddCondition: s,
1277
- onAddLoop: l,
1278
- onDeleteStep: c,
1279
- onUpdateFilter: d,
1280
- onSelectStep: f,
1281
- onResize: b
1350
+ value: g,
1351
+ menus: o,
1352
+ filterFlagActionId: l,
1353
+ onAction: c,
1354
+ onSelectStep: p,
1355
+ onResize: a
1282
1356
  },
1283
- C.localId
1357
+ g.id
1284
1358
  ),
1285
- /* @__PURE__ */ e(
1286
- F,
1359
+ /* @__PURE__ */ i(
1360
+ it,
1287
1361
  {
1288
- onAddStep: r,
1289
- onAddTrigger: a,
1290
- onAddCondition: s,
1291
- onAddLoop: l,
1292
- stepId: C.localId,
1362
+ items: o?.add,
1363
+ onAction: c,
1364
+ lineColor: Q,
1365
+ stepId: g.id,
1293
1366
  pathId: t,
1294
- index: p + 1,
1367
+ index: b + 1,
1295
1368
  style: { marginTop: "34px", height: 0 }
1296
1369
  }
1297
1370
  )
1298
- ] }) : v = /* @__PURE__ */ h(n1, { children: [
1299
- /* @__PURE__ */ e(
1300
- s1,
1371
+ ] }) : x = /* @__PURE__ */ C(G, { children: [
1372
+ /* @__PURE__ */ i(
1373
+ ht,
1301
1374
  {
1302
- localId: C.localId,
1303
- title: C.title,
1304
- idx: 1,
1305
- icon: C.icon,
1306
- isSet: C.isSet,
1307
- isInvalid: C.isInvalid,
1308
- isFilter: C.isFilter,
1309
- onSelectStep: f,
1310
- onDeleteStep: c,
1311
- onUpdateFilter: d
1375
+ id: g.id,
1376
+ title: g.title,
1377
+ icon: g.icon,
1378
+ isSet: g.isSet,
1379
+ isInvalid: g.isInvalid,
1380
+ isFilter: g.isFilter,
1381
+ status: g.status,
1382
+ items: o?.step,
1383
+ menuContext: { stepId: g.id },
1384
+ onAction: c,
1385
+ filterFlagActionId: l,
1386
+ onSelectStep: p
1312
1387
  },
1313
- C.title
1388
+ g.title
1314
1389
  ),
1315
- /* @__PURE__ */ e(
1316
- F,
1390
+ /* @__PURE__ */ i(
1391
+ it,
1317
1392
  {
1318
- onAddStep: r,
1319
- onAddTrigger: a,
1320
- onAddCondition: s,
1321
- onAddLoop: l,
1322
- stepId: C.localId,
1393
+ items: o?.add,
1394
+ onAction: c,
1395
+ lineColor: Q,
1396
+ stepId: g.id,
1323
1397
  pathId: t,
1324
- index: p + 1
1398
+ index: b + 1
1325
1399
  }
1326
1400
  )
1327
- ] }), /* @__PURE__ */ e(
1401
+ ] }), /* @__PURE__ */ i(
1328
1402
  "div",
1329
1403
  {
1330
- className: e1.stepContainer + (I || w ? " " + e1.stepContainerWithPaths : ""),
1331
- children: v
1404
+ className: rt.stepContainer + (h || m ? " " + rt.stepContainerWithPaths : ""),
1405
+ children: x
1332
1406
  },
1333
- C.localId
1407
+ g.id
1334
1408
  );
1335
1409
  }),
1336
- _ && /* @__PURE__ */ e(
1410
+ r && /* @__PURE__ */ i(
1337
1411
  "div",
1338
1412
  {
1339
1413
  style: {
1340
1414
  flexGrow: 1,
1341
1415
  minWidth: 0,
1342
- borderTop: "2px solid #3B64A0",
1416
+ borderTop: `2px solid ${Q}`,
1343
1417
  marginTop: "33.5px"
1344
1418
  }
1345
1419
  }
@@ -1349,7 +1423,7 @@ const Mt = () => /* @__PURE__ */ h(
1349
1423
  )
1350
1424
  }
1351
1425
  );
1352
- }, le = () => /* @__PURE__ */ h(
1426
+ }, ee = () => /* @__PURE__ */ C(
1353
1427
  "svg",
1354
1428
  {
1355
1429
  width: "24",
@@ -1358,14 +1432,14 @@ const Mt = () => /* @__PURE__ */ h(
1358
1432
  fill: "none",
1359
1433
  xmlns: "http://www.w3.org/2000/svg",
1360
1434
  children: [
1361
- /* @__PURE__ */ e(
1435
+ /* @__PURE__ */ i(
1362
1436
  "path",
1363
1437
  {
1364
1438
  d: "M17.3006 10.5H23.1986C23.2699 10.5001 23.3397 10.5204 23.3998 10.5586C23.4599 10.5969 23.5079 10.6515 23.5381 10.716C23.5683 10.7805 23.5795 10.8523 23.5704 10.923C23.5613 10.9937 23.5322 11.0603 23.4866 11.115L20.5376 14.655C20.5024 14.6972 20.4584 14.7312 20.4086 14.7545C20.3589 14.7778 20.3046 14.7899 20.2496 14.7899C20.1947 14.7899 20.1404 14.7778 20.0906 14.7545C20.0409 14.7312 19.9968 14.6972 19.9616 14.655L17.0126 11.115C16.967 11.0603 16.938 10.9937 16.9289 10.923C16.9197 10.8523 16.931 10.7805 16.9612 10.716C16.9914 10.6515 17.0394 10.5969 17.0995 10.5586C17.1596 10.5204 17.2294 10.5001 17.3006 10.5ZM0.800641 13.5H6.69864C6.7699 13.5 6.83967 13.4797 6.89979 13.4414C6.95991 13.4032 7.00789 13.3486 7.03811 13.2841C7.06833 13.2195 7.07953 13.1477 7.07042 13.0771C7.06131 13.0064 7.03224 12.9398 6.98664 12.885L4.03764 9.34504C4.00245 9.30283 3.95841 9.26888 3.90864 9.24558C3.85887 9.22228 3.80459 9.21021 3.74964 9.21021C3.69469 9.21021 3.64041 9.22228 3.59064 9.24558C3.54087 9.26888 3.49683 9.30283 3.46164 9.34504L0.512641 12.885C0.467037 12.9398 0.437977 13.0064 0.428862 13.0771C0.419747 13.1477 0.430956 13.2195 0.461175 13.2841C0.491394 13.3486 0.539372 13.4032 0.599493 13.4414C0.659613 13.4797 0.729386 13.5 0.800641 13.5Z",
1365
1439
  fill: "#41B0AC"
1366
1440
  }
1367
1441
  ),
1368
- /* @__PURE__ */ e(
1442
+ /* @__PURE__ */ i(
1369
1443
  "path",
1370
1444
  {
1371
1445
  fillRule: "evenodd",
@@ -1376,246 +1450,1058 @@ const Mt = () => /* @__PURE__ */ h(
1376
1450
  )
1377
1451
  ]
1378
1452
  }
1379
- ), ce = "_container_1ktj6_1", ae = "_collapsed_1ktj6_16", de = "_loopNodeWrapper_1ktj6_21", pe = "_loopIconWrapper_1ktj6_31", ue = "_loopBox_1ktj6_40", he = "_dotsButton_1ktj6_57", Ce = "_label_1ktj6_77", me = "_limit_1ktj6_84", fe = "_expandable_1ktj6_90", ge = "_expandableCollapsed_1ktj6_98", ve = "_connector_1ktj6_105", _e = "_line_1ktj6_113", xe = "_circleDot_1ktj6_121", we = "_innerDot_1ktj6_136", ye = "_stepsWrapper_1ktj6_143", B = {
1380
- container: ce,
1381
- collapsed: ae,
1382
- loopNodeWrapper: de,
1383
- loopIconWrapper: pe,
1384
- loopBox: ue,
1385
- dotsButton: he,
1386
- label: Ce,
1387
- limit: me,
1388
- expandable: fe,
1389
- expandableCollapsed: ge,
1390
- connector: ve,
1391
- line: _e,
1392
- circleDot: xe,
1393
- innerDot: we,
1394
- stepsWrapper: ye
1395
- }, Ie = ({
1453
+ ), Jn = "_container_18jhr_1", Qn = "_collapsed_18jhr_16", t1 = "_loopNodeWrapper_18jhr_21", e1 = "_loopIconWrapper_18jhr_31", n1 = "_loopBox_18jhr_40", i1 = "_dotsButton_18jhr_57", s1 = "_label_18jhr_77", o1 = "_limit_18jhr_84", r1 = "_expandable_18jhr_90", l1 = "_expandableCollapsed_18jhr_98", c1 = "_connector_18jhr_105", a1 = "_line_18jhr_113", d1 = "_circleDot_18jhr_121", u1 = "_innerDot_18jhr_136", p1 = "_stepsWrapper_18jhr_143", S = {
1454
+ container: Jn,
1455
+ collapsed: Qn,
1456
+ loopNodeWrapper: t1,
1457
+ loopIconWrapper: e1,
1458
+ loopBox: n1,
1459
+ dotsButton: i1,
1460
+ label: s1,
1461
+ limit: o1,
1462
+ expandable: r1,
1463
+ expandableCollapsed: l1,
1464
+ connector: c1,
1465
+ line: a1,
1466
+ circleDot: d1,
1467
+ innerDot: u1,
1468
+ stepsWrapper: p1
1469
+ }, h1 = ({
1396
1470
  value: t,
1397
- onAddStep: n,
1398
- onAddTrigger: o,
1399
- onAddCondition: i,
1400
- onAddLoop: r,
1401
- onDeleteStep: c,
1402
- onUpdateFilter: d,
1403
- onSelectStep: a,
1404
- onResize: s
1471
+ menus: e,
1472
+ filterFlagActionId: n,
1473
+ onAction: s,
1474
+ onSelectStep: o,
1475
+ onResize: l
1405
1476
  }) => {
1406
- const { localId: l, limit: f, steps: b, condition: _ } = t, x = b ?? [], C = () => {
1407
- }, [p, I] = E(!1), w = $(null), { openMenu: v, closeMenu: m } = r1(), y = i1(), L = H(
1408
- () => [
1409
- {
1410
- label: "Edit",
1411
- icon: /* @__PURE__ */ e(v1, { color: "#3B64A0", size: 18 }),
1412
- command: (k) => {
1413
- k?.originalEvent?.stopPropagation(), a?.(l);
1414
- },
1415
- template: y
1416
- },
1417
- {
1418
- label: "Remove",
1419
- icon: /* @__PURE__ */ e(J, { color: "#3B64A0", size: 18 }),
1420
- command: (k) => {
1421
- k?.originalEvent?.stopPropagation(), c && c(l);
1422
- },
1423
- template: y
1424
- }
1425
- ],
1426
- [a, c, l, y]
1427
- ), u = (k) => {
1428
- k.stopPropagation(), v(w, k);
1429
- }, g = () => {
1430
- I((k) => !k), s?.();
1431
- }, P = B.container + (p ? "" : " " + B.collapsed), T = B.expandable + (p ? "" : " " + B.expandableCollapsed);
1432
- return /* @__PURE__ */ h("div", { className: P, children: [
1433
- /* @__PURE__ */ h("div", { className: B.loopNodeWrapper, children: [
1434
- /* @__PURE__ */ h("div", { className: B.loopBox, children: [
1435
- /* @__PURE__ */ e("div", { onClick: g, className: B.loopIconWrapper, children: /* @__PURE__ */ e(le, {}) }),
1436
- /* @__PURE__ */ e("button", { className: B.dotsButton, onClick: u, children: /* @__PURE__ */ e(q, { size: 16 }) }),
1437
- /* @__PURE__ */ e(
1438
- Q,
1439
- {
1440
- model: L,
1441
- popup: !0,
1442
- ref: w,
1443
- onHide: () => m(w)
1444
- }
1445
- )
1477
+ const { id: c, limit: p, steps: a, condition: r } = t, d = a ?? [], [g, b] = O(!1), h = $(null), { openMenu: m, closeMenu: x } = Lt(), f = k(() => ({ stepId: c }), [c]), N = k(() => s ? bt(e?.iterator, f, s) : [], [e?.iterator, f, s]), E = (_) => {
1478
+ _.stopPropagation(), m(h, _);
1479
+ }, v = () => {
1480
+ b((_) => !_), l?.();
1481
+ }, y = S.container + (g ? "" : " " + S.collapsed), u = S.expandable + (g ? "" : " " + S.expandableCollapsed);
1482
+ return /* @__PURE__ */ C("div", { className: y, children: [
1483
+ /* @__PURE__ */ C("div", { className: S.loopNodeWrapper, children: [
1484
+ /* @__PURE__ */ C("div", { className: S.loopBox, children: [
1485
+ /* @__PURE__ */ i("div", { onClick: v, className: S.loopIconWrapper, children: /* @__PURE__ */ i(ee, {}) }),
1486
+ N.length > 0 && /* @__PURE__ */ C(G, { children: [
1487
+ /* @__PURE__ */ i(
1488
+ "button",
1489
+ {
1490
+ type: "button",
1491
+ className: S.dotsButton,
1492
+ onClick: E,
1493
+ "aria-label": "Open loop menu",
1494
+ "aria-haspopup": "menu",
1495
+ children: /* @__PURE__ */ i(mt, { size: 16 })
1496
+ }
1497
+ ),
1498
+ /* @__PURE__ */ i(
1499
+ xt,
1500
+ {
1501
+ model: N,
1502
+ popup: !0,
1503
+ ref: h,
1504
+ onHide: () => x(h)
1505
+ }
1506
+ )
1507
+ ] })
1446
1508
  ] }),
1447
- /* @__PURE__ */ e("div", { className: B.label, children: "Loop" }),
1448
- f != null && /* @__PURE__ */ h("div", { className: B.limit, children: [
1449
- f,
1509
+ /* @__PURE__ */ i("div", { className: S.label, children: "Loop" }),
1510
+ p != null && /* @__PURE__ */ C("div", { className: S.limit, children: [
1511
+ p,
1450
1512
  "x"
1451
1513
  ] })
1452
1514
  ] }),
1453
- /* @__PURE__ */ h("div", { className: T, children: [
1454
- /* @__PURE__ */ h("div", { className: B.connector, children: [
1455
- /* @__PURE__ */ e("div", { className: B.line }),
1456
- /* @__PURE__ */ e("div", { className: B.circleDot, children: /* @__PURE__ */ e("div", { className: B.innerDot }) }),
1457
- /* @__PURE__ */ e("div", { className: B.line })
1515
+ /* @__PURE__ */ C("div", { className: u, children: [
1516
+ /* @__PURE__ */ C("div", { className: S.connector, children: [
1517
+ /* @__PURE__ */ i("div", { className: S.line }),
1518
+ /* @__PURE__ */ i("div", { className: S.circleDot, children: /* @__PURE__ */ i("div", { className: S.innerDot }) }),
1519
+ /* @__PURE__ */ i("div", { className: S.line })
1458
1520
  ] }),
1459
- /* @__PURE__ */ e(x1, { expression: _ ?? "", style: { marginTop: "25.5px" } }),
1460
- /* @__PURE__ */ e("div", { className: B.stepsWrapper, children: /* @__PURE__ */ e(
1461
- l1,
1521
+ /* @__PURE__ */ i(
1522
+ yt,
1523
+ {
1524
+ expression: r ?? "",
1525
+ status: t.status,
1526
+ style: { marginTop: "25.5px" }
1527
+ }
1528
+ ),
1529
+ /* @__PURE__ */ i("div", { className: S.stepsWrapper, children: /* @__PURE__ */ i(
1530
+ Tt,
1462
1531
  {
1463
- steps: x,
1464
- pathId: l,
1465
- onAddStep: n ?? C,
1466
- onAddTrigger: o,
1467
- onAddCondition: i ?? C,
1468
- onAddLoop: r,
1469
- onDeleteStep: c,
1470
- onUpdateFilter: d ?? C,
1471
- onSelectStep: a ?? C,
1532
+ steps: d,
1533
+ pathId: c,
1534
+ menus: e,
1535
+ filterFlagActionId: n,
1536
+ onAction: s,
1537
+ onSelectStep: o ?? (() => {
1538
+ }),
1472
1539
  isDescendent: !0
1473
1540
  }
1474
1541
  ) })
1475
1542
  ] })
1476
1543
  ] });
1477
- }, be = "_container_kielx_1", Ne = {
1478
- container: be
1479
- }, $e = ({
1544
+ }, f1 = "_container_kielx_1", ne = {
1545
+ container: f1
1546
+ }, E1 = ({
1480
1547
  process: t,
1481
- addMultipleTriggers: n,
1482
- onAddStep: o,
1483
- onAddTrigger: i,
1484
- onAddCondition: r,
1485
- onAddLoop: c,
1486
- onResize: d,
1487
- onDeleteTrigger: a,
1488
- onDeleteStep: s,
1489
- onUpdateFilter: l,
1490
- onSelectStep: f
1548
+ menus: e,
1549
+ onMenuAction: n,
1550
+ onSelectStep: s,
1551
+ hubActionId: o,
1552
+ filterFlagActionId: l,
1553
+ onResize: c
1491
1554
  }) => {
1492
- const [b, _] = E(0);
1493
- return /* @__PURE__ */ h("div", { className: Ne.container, children: [
1494
- /* @__PURE__ */ e(
1495
- kt,
1555
+ const [p, a] = O(0);
1556
+ return /* @__PURE__ */ C("div", { className: ne.container, children: [
1557
+ /* @__PURE__ */ i(
1558
+ Jt,
1496
1559
  {
1497
1560
  steps: t.triggers,
1498
- onAddTrigger: n,
1499
- onUpdateFilter: l,
1500
- onDeleteTrigger: a,
1501
- onSelectStep: f,
1502
- onCenterYUpdate: _
1561
+ items: e?.trigger,
1562
+ hubActionId: o,
1563
+ filterFlagActionId: l,
1564
+ onAction: n,
1565
+ onSelectStep: s,
1566
+ onCenterYUpdate: a
1503
1567
  }
1504
1568
  ),
1505
- t.steps.length > 0 ? /* @__PURE__ */ e(
1506
- l1,
1569
+ t.steps.length > 0 ? /* @__PURE__ */ i(
1570
+ Tt,
1507
1571
  {
1508
1572
  steps: t.steps,
1509
- centerY: b,
1510
- onAddStep: o,
1511
- onAddTrigger: i,
1512
- onAddCondition: r,
1513
- onAddLoop: c,
1514
- onResize: d,
1515
- onDeleteStep: s,
1516
- onUpdateFilter: l,
1517
- onSelectStep: f,
1573
+ centerY: p,
1574
+ menus: e,
1575
+ filterFlagActionId: l,
1576
+ onAction: n,
1577
+ onResize: c,
1578
+ onSelectStep: s,
1518
1579
  isDescendent: !1,
1519
1580
  pathId: void 0
1520
1581
  }
1521
- ) : /* @__PURE__ */ e(
1522
- F,
1582
+ ) : /* @__PURE__ */ i(
1583
+ it,
1523
1584
  {
1524
- onAddStep: () => o(),
1525
- onAddTrigger: i,
1526
- onAddCondition: r,
1527
- onAddLoop: c,
1585
+ items: e?.add,
1586
+ onAction: n,
1528
1587
  index: 0,
1529
1588
  style: {
1530
- height: o1,
1531
- marginTop: Math.max(0, b - o1 / 2)
1589
+ height: It,
1590
+ marginTop: Math.max(0, p - It / 2)
1532
1591
  }
1533
1592
  }
1534
1593
  )
1535
1594
  ] });
1595
+ }, Et = (t, e, n) => {
1596
+ if (e === n) return !1;
1597
+ const s = (r) => {
1598
+ if ("paths" in r && r.paths && r.paths.length > 0) {
1599
+ const d = r.paths[r.paths.length - 1];
1600
+ if (d.steps && d.steps.length > 0) {
1601
+ const g = d.steps[d.steps.length - 1];
1602
+ return s(g);
1603
+ }
1604
+ return d.id;
1605
+ }
1606
+ return "steps" in r && r.steps && r.steps.length > 0 ? s(
1607
+ r.steps[r.steps.length - 1]
1608
+ ) : r.id;
1609
+ }, o = (r) => r.steps && r.steps.length > 0 ? s(
1610
+ r.steps[r.steps.length - 1]
1611
+ ) : r.paths && r.paths.length > 0 ? o(r.paths[r.paths.length - 1]) : r.id, l = (r, d) => "paths" in r && r.paths && r.paths.length > 0 ? r.paths.some((b) => o(b) === d) : s(r) === d, c = (r) => {
1612
+ for (let d = 0; d < r.length - 1; d++) {
1613
+ const g = r[d], b = r[d + 1];
1614
+ if (g.id === e && b.id === n || l(g, e) && b.id === n)
1615
+ return !0;
1616
+ }
1617
+ for (const d of r) {
1618
+ if (d.id === e && d.steps?.[0]?.id === n)
1619
+ return !0;
1620
+ if ("paths" in d && d.paths) {
1621
+ for (const g of d.paths)
1622
+ if (p(g)) return !0;
1623
+ }
1624
+ if ("steps" in d && d.steps && c(d.steps))
1625
+ return !0;
1626
+ }
1627
+ return !1;
1628
+ }, p = (r) => {
1629
+ if (r.id === e && r.steps?.[0]?.id === n || r.steps && r.steps.length > 0 && c(r.steps))
1630
+ return !0;
1631
+ if (r.paths) {
1632
+ for (const d of r.paths)
1633
+ if (p(d)) return !0;
1634
+ }
1635
+ return !1;
1636
+ }, a = t.steps;
1637
+ return a?.[0] && a[0].id === e && a[0].steps?.[0]?.id === n ? !0 : c(a);
1638
+ }, ie = (t, e) => {
1639
+ if (t.id === e) return t.status;
1640
+ if (t.steps)
1641
+ for (const n of t.steps) {
1642
+ const s = Pt(n, e);
1643
+ if (s !== void 0) return s;
1644
+ }
1645
+ if (t.paths)
1646
+ for (const n of t.paths) {
1647
+ const s = ie(n, e);
1648
+ if (s !== void 0) return s;
1649
+ }
1650
+ }, Pt = (t, e) => {
1651
+ if (t.id === e) return t.status;
1652
+ if (t.paths)
1653
+ for (const n of t.paths) {
1654
+ const s = ie(n, e);
1655
+ if (s !== void 0) return s;
1656
+ }
1657
+ if (t.steps)
1658
+ for (const n of t.steps) {
1659
+ const s = Pt(n, e);
1660
+ if (s !== void 0) return s;
1661
+ }
1662
+ }, V = (t, e) => {
1663
+ for (const n of t.triggers)
1664
+ if (n.id === e) return n.status;
1665
+ for (const n of t.steps) {
1666
+ const s = Pt(n, e);
1667
+ if (s !== void 0) return s;
1668
+ }
1669
+ }, g1 = (t, e) => {
1670
+ const n = (o) => {
1671
+ if (o.id === e) return !0;
1672
+ if (o.steps) {
1673
+ for (const l of o.steps)
1674
+ if (s(l)) return !0;
1675
+ }
1676
+ if (o.paths) {
1677
+ for (const l of o.paths)
1678
+ if (n(l)) return !0;
1679
+ }
1680
+ return !1;
1681
+ }, s = (o) => {
1682
+ if (o.paths) {
1683
+ for (const l of o.paths)
1684
+ if (n(l)) return !0;
1685
+ }
1686
+ if (o.steps) {
1687
+ for (const l of o.steps)
1688
+ if (s(l)) return !0;
1689
+ }
1690
+ return !1;
1691
+ };
1692
+ for (const o of t.triggers)
1693
+ if (s(o)) return !0;
1694
+ for (const o of t.steps)
1695
+ if (s(o)) return !0;
1696
+ return !1;
1697
+ }, vt = (t, e, n) => {
1698
+ if (e === n) return !1;
1699
+ const s = V(t, e), o = V(t, n);
1700
+ return s !== "finished" || o !== "finished" ? !1 : Et(t, e, n);
1701
+ }, kt = (t, e, n) => e === n || !g1(t, e) || V(t, n) !== "finished" ? !1 : Et(t, e, n), st = ({
1702
+ lineColor: t,
1703
+ style: e,
1704
+ fromId: n,
1705
+ toId: s
1706
+ }) => {
1707
+ const l = pt(t) ? `${W.stepLinkLine} ${W.dashedLine}` : W.stepLinkLine;
1708
+ return /* @__PURE__ */ C(
1709
+ "div",
1710
+ {
1711
+ className: `${W.stepLinkContainer} ${W.readOnly}`,
1712
+ style: { ...e, "--step-link-color": t },
1713
+ "aria-hidden": !0,
1714
+ "data-connector-from": void 0,
1715
+ "data-connector-to": void 0,
1716
+ children: [
1717
+ /* @__PURE__ */ i("div", { className: l }),
1718
+ /* @__PURE__ */ i(
1719
+ "div",
1720
+ {
1721
+ className: `${W.stepLinkIcon} ${W.debuggerIconCollapsed}`,
1722
+ "aria-hidden": !0
1723
+ }
1724
+ ),
1725
+ /* @__PURE__ */ i("div", { className: l })
1726
+ ]
1727
+ }
1728
+ );
1729
+ }, Rt = (t) => t.steps && t.steps.length > 0 ? ut(t.steps[t.steps.length - 1]) : t.paths && t.paths.length > 0 ? Rt(t.paths[t.paths.length - 1]) : t.id, ut = (t) => "paths" in t && t.paths && t.paths.length > 0 ? Rt(t.paths[t.paths.length - 1]) : "steps" in t && t.steps && t.steps.length > 0 ? ut(t.steps[t.steps.length - 1]) : t.id, _t = (t) => "steps" in t && t.steps && t.steps.length > 0 ? _t(t.steps[t.steps.length - 1]) : "paths" in t && t.paths && t.paths.length > 0 ? _t(t.paths[t.paths.length - 1]) : t.id, se = (t, e, n, s) => {
1730
+ const o = e.statusLine(void 0);
1731
+ if (s == null)
1732
+ return n != null && V(t, n) === "finished" ? e.statusLine("finished") : o;
1733
+ const l = V(t, s);
1734
+ if (l == null || l !== "finished")
1735
+ return o;
1736
+ if (n == null) {
1737
+ const c = t.steps[0]?.id;
1738
+ return c !== void 0 && s === c ? e.statusLine("finished") : o;
1739
+ }
1740
+ return kt(t, n, s) || vt(t, n, s) ? e.statusLine("finished") : o;
1741
+ }, oe = Gt(
1742
+ null
1743
+ ), C1 = oe.Provider, Ot = () => {
1744
+ const t = Vt(oe);
1745
+ if (!t)
1746
+ throw new Error(
1747
+ "useProcessDebuggerContext must be used within ProcessDebuggerProvider"
1748
+ );
1749
+ return t;
1750
+ }, At = 34.5, m1 = 33, re = (t) => {
1751
+ const {
1752
+ items: e,
1753
+ pathId: n,
1754
+ previousId: s,
1755
+ nextId: o,
1756
+ menus: l,
1757
+ onAction: c,
1758
+ onSelectStep: p,
1759
+ onResize: a
1760
+ } = t, { process: r, lineColors: d } = Ot(), g = se(
1761
+ r,
1762
+ d,
1763
+ s,
1764
+ o
1765
+ ), b = $(null), h = $([]), [m, x] = O([]);
1766
+ ot(() => {
1767
+ const u = () => {
1768
+ const L = b.current;
1769
+ if (!L || e.length === 0) {
1770
+ x([]);
1771
+ return;
1772
+ }
1773
+ const D = [], X = Number.parseFloat(getComputedStyle(L).zoom || "1");
1774
+ for (let K = 0; K < e.length; K++) {
1775
+ const j = h.current[K];
1776
+ if (j)
1777
+ if (j.offsetParent == null) {
1778
+ const w = L.getBoundingClientRect(), R = j.getBoundingClientRect();
1779
+ D.push((R.top - w.top) / X + At);
1780
+ } else
1781
+ D.push(j.offsetTop - m1 + At);
1782
+ }
1783
+ D.length === e.length && x(D);
1784
+ };
1785
+ u();
1786
+ const _ = new ResizeObserver(u), T = b.current;
1787
+ return T && _.observe(T), window.addEventListener("resize", u), () => {
1788
+ _.disconnect(), window.removeEventListener("resize", u);
1789
+ };
1790
+ }, [e]);
1791
+ const f = k(() => {
1792
+ if (e.length)
1793
+ return Xt(
1794
+ e.map((u) => dt(u))
1795
+ );
1796
+ }, [e]), N = k(() => {
1797
+ const u = d.statusLine(void 0);
1798
+ return e.length === 0 ? u : dt(e[0]) === "finished" ? d.statusLine("finished") : u;
1799
+ }, [e, d]), E = k(() => m.length !== e.length || e.length <= 1 ? null : e.map((u, _) => _).filter((u) => u > 0).map((u) => {
1800
+ const _ = m[u];
1801
+ if (_ === void 0) return null;
1802
+ const L = dt(e[u]) === "finished" ? d.statusLine("finished") : d.statusLine(void 0);
1803
+ return /* @__PURE__ */ i(
1804
+ Nt,
1805
+ {
1806
+ width: 100,
1807
+ height: _,
1808
+ strokeColor: L,
1809
+ fromId: e[u - 1]?.id,
1810
+ toId: e[u]?.id
1811
+ },
1812
+ u
1813
+ );
1814
+ }), [e, m, d]), v = k(() => {
1815
+ if (m.length !== e.length || e.length <= 1) return null;
1816
+ const u = d.statusLine(void 0);
1817
+ return e.map((_, T) => T).filter((_) => _ > 0).map((_) => {
1818
+ const T = m[_];
1819
+ if (T === void 0) return null;
1820
+ let L = u;
1821
+ if (o != null && V(r, o) === "finished") {
1822
+ const X = _t(
1823
+ e[_]
1824
+ );
1825
+ vt(
1826
+ r,
1827
+ X,
1828
+ o
1829
+ ) && (L = d.statusLine("finished"));
1830
+ }
1831
+ return /* @__PURE__ */ i(
1832
+ Nt,
1833
+ {
1834
+ width: 100,
1835
+ height: T,
1836
+ strokeColor: L,
1837
+ fromId: s,
1838
+ toId: o
1839
+ },
1840
+ _
1841
+ );
1842
+ });
1843
+ }, [
1844
+ e,
1845
+ m,
1846
+ d,
1847
+ r,
1848
+ o,
1849
+ s
1850
+ ]), y = k(() => {
1851
+ const u = d.statusLine(void 0);
1852
+ if (e.length === 0 || o == null || V(r, o) !== "finished") return u;
1853
+ const T = _t(
1854
+ e[0]
1855
+ );
1856
+ return vt(
1857
+ r,
1858
+ T,
1859
+ o
1860
+ ) ? d.statusLine("finished") : u;
1861
+ }, [e, d, r, o]);
1862
+ return /* @__PURE__ */ C("div", { className: z.row, children: [
1863
+ /* @__PURE__ */ i(
1864
+ Qt,
1865
+ {
1866
+ enabled: !1,
1867
+ debuggerMode: !0,
1868
+ status: f,
1869
+ onSelect: n != null && p ? () => p(n) : void 0
1870
+ }
1871
+ ),
1872
+ /* @__PURE__ */ C(
1873
+ "div",
1874
+ {
1875
+ ref: b,
1876
+ className: z.column,
1877
+ style: { marginTop: "33px" },
1878
+ children: [
1879
+ /* @__PURE__ */ i(
1880
+ "div",
1881
+ {
1882
+ style: {
1883
+ position: "absolute",
1884
+ top: 0,
1885
+ left: 0,
1886
+ width: "100px",
1887
+ height: "2px",
1888
+ borderTop: et(N)
1889
+ }
1890
+ }
1891
+ ),
1892
+ E
1893
+ ]
1894
+ }
1895
+ ),
1896
+ /* @__PURE__ */ i("div", { className: z.column, children: e.map((u, _) => {
1897
+ let T;
1898
+ if (u.paths)
1899
+ T = /* @__PURE__ */ i(
1900
+ re,
1901
+ {
1902
+ items: u.paths,
1903
+ pathId: n,
1904
+ previousId: u.id,
1905
+ nextId: o,
1906
+ menus: l,
1907
+ onAction: c,
1908
+ onSelectStep: p,
1909
+ onResize: a
1910
+ },
1911
+ u.id
1912
+ );
1913
+ else if (u.steps) {
1914
+ const L = u, D = L.status === "finished" || o != null && kt(
1915
+ r,
1916
+ L.id,
1917
+ o
1918
+ ) ? "finished" : void 0;
1919
+ T = /* @__PURE__ */ C(
1920
+ "div",
1921
+ {
1922
+ className: z.stepsContainer,
1923
+ "data-id": void 0,
1924
+ children: [
1925
+ /* @__PURE__ */ i(
1926
+ yt,
1927
+ {
1928
+ expression: L.condition,
1929
+ status: D,
1930
+ debuggerMode: !0,
1931
+ style: { marginTop: "25px" }
1932
+ }
1933
+ ),
1934
+ /* @__PURE__ */ i(
1935
+ Mt,
1936
+ {
1937
+ steps: u.steps,
1938
+ pathId: u.id,
1939
+ previousId: L.id,
1940
+ nextId: o,
1941
+ menus: l,
1942
+ onAction: c,
1943
+ onSelectStep: p ?? (() => {
1944
+ }),
1945
+ onResize: a
1946
+ },
1947
+ u.id
1948
+ )
1949
+ ]
1950
+ }
1951
+ );
1952
+ } else
1953
+ T = /* @__PURE__ */ i(
1954
+ ht,
1955
+ {
1956
+ id: u.id,
1957
+ title: "title" in u ? u.title : "",
1958
+ icon: "icon" in u ? u.icon : void 0,
1959
+ status: "status" in u ? u.status : void 0,
1960
+ debuggerMode: !0,
1961
+ items: l?.step,
1962
+ menuContext: {
1963
+ stepId: u.id,
1964
+ status: "status" in u ? u.status : void 0
1965
+ },
1966
+ onAction: c,
1967
+ onSelectStep: p
1968
+ },
1969
+ u.id
1970
+ );
1971
+ return /* @__PURE__ */ i(
1972
+ "div",
1973
+ {
1974
+ ref: (L) => {
1975
+ h.current[_] = L;
1976
+ },
1977
+ style: { width: "100%" },
1978
+ "data-id": void 0,
1979
+ children: T
1980
+ },
1981
+ u.id
1982
+ );
1983
+ }) }),
1984
+ /* @__PURE__ */ C("div", { className: z.column, style: { marginTop: "33px" }, children: [
1985
+ /* @__PURE__ */ i(
1986
+ "div",
1987
+ {
1988
+ style: {
1989
+ position: "absolute",
1990
+ top: 0.5,
1991
+ left: 0,
1992
+ flex: 1,
1993
+ width: "100%",
1994
+ height: "2px",
1995
+ borderTop: et(y)
1996
+ }
1997
+ }
1998
+ ),
1999
+ v
2000
+ ] }),
2001
+ /* @__PURE__ */ i(
2002
+ st,
2003
+ {
2004
+ lineColor: g,
2005
+ fromId: s,
2006
+ toId: o,
2007
+ style: {
2008
+ marginTop: "34px",
2009
+ height: 0
2010
+ }
2011
+ }
2012
+ ),
2013
+ /* @__PURE__ */ i(
2014
+ "div",
2015
+ {
2016
+ style: {
2017
+ flex: 1,
2018
+ width: "100%",
2019
+ height: "2px",
2020
+ borderTop: et(g),
2021
+ marginTop: "34px"
2022
+ }
2023
+ }
2024
+ )
2025
+ ] });
2026
+ }, v1 = ({
2027
+ value: t,
2028
+ previousId: e,
2029
+ nextId: n,
2030
+ menus: s,
2031
+ onAction: o,
2032
+ onSelectStep: l,
2033
+ onResize: c
2034
+ }) => {
2035
+ const { process: p, lineColors: a } = Ot(), { id: r, limit: d, steps: g, condition: b } = t, h = g ?? [], [m, x] = O(!1), f = () => {
2036
+ x((T) => !T), c?.();
2037
+ }, N = S.container + (m ? "" : " " + S.collapsed), E = S.expandable + (m ? "" : " " + S.expandableCollapsed), v = h[0]?.id, y = v != null ? V(p, v) : void 0, _ = e != null && (kt(
2038
+ p,
2039
+ e,
2040
+ r
2041
+ ) || V(p, e) === "finished" && Et(p, e, r) || vt(p, e, r)) && y === "finished" ? a.statusLine("finished") : a.statusLine(void 0);
2042
+ return /* @__PURE__ */ C(
2043
+ "div",
2044
+ {
2045
+ className: N,
2046
+ "data-id": void 0,
2047
+ children: [
2048
+ /* @__PURE__ */ C("div", { className: S.loopNodeWrapper, children: [
2049
+ /* @__PURE__ */ i("div", { className: S.loopBox, children: /* @__PURE__ */ i("div", { onClick: f, className: S.loopIconWrapper, children: /* @__PURE__ */ i(ee, {}) }) }),
2050
+ /* @__PURE__ */ i("div", { className: S.label, children: "Loop" }),
2051
+ d != null && /* @__PURE__ */ C("div", { className: S.limit, children: [
2052
+ d,
2053
+ "x"
2054
+ ] })
2055
+ ] }),
2056
+ /* @__PURE__ */ C("div", { className: E, children: [
2057
+ /* @__PURE__ */ C(
2058
+ "div",
2059
+ {
2060
+ className: S.connector,
2061
+ style: {
2062
+ "--iterator-connector-color": _,
2063
+ ...pt(_) && {
2064
+ "--iterator-connector-width": "3px",
2065
+ "--iterator-connector-style": "dotted"
2066
+ }
2067
+ },
2068
+ children: [
2069
+ /* @__PURE__ */ i("div", { className: S.line }),
2070
+ /* @__PURE__ */ i("div", { className: S.circleDot, children: /* @__PURE__ */ i("div", { className: S.innerDot }) }),
2071
+ /* @__PURE__ */ i("div", { className: S.line })
2072
+ ]
2073
+ }
2074
+ ),
2075
+ /* @__PURE__ */ i(
2076
+ yt,
2077
+ {
2078
+ expression: b ?? "",
2079
+ status: t.status,
2080
+ debuggerMode: !0,
2081
+ style: { marginTop: "25.5px" }
2082
+ }
2083
+ ),
2084
+ /* @__PURE__ */ i("div", { className: S.stepsWrapper, children: /* @__PURE__ */ i(
2085
+ Mt,
2086
+ {
2087
+ steps: h,
2088
+ pathId: r,
2089
+ previousId: r,
2090
+ nextId: n,
2091
+ menus: s,
2092
+ onAction: o,
2093
+ onSelectStep: l ?? (() => {
2094
+ }),
2095
+ onResize: c,
2096
+ isDescendent: !0
2097
+ }
2098
+ ) })
2099
+ ] })
2100
+ ]
2101
+ }
2102
+ );
2103
+ }, St = 68, _1 = (t) => {
2104
+ if (!t || t.length === 0) return;
2105
+ const e = Xt(
2106
+ t.map((s) => dt(s))
2107
+ ), n = t.find((s) => dt(s) === e) ?? t[t.length - 1];
2108
+ return Rt(n);
2109
+ }, Mt = ({
2110
+ pathId: t,
2111
+ steps: e,
2112
+ centerY: n,
2113
+ className: s,
2114
+ previousId: o,
2115
+ nextId: l,
2116
+ menus: c,
2117
+ onAction: p,
2118
+ onSelectStep: a,
2119
+ onResize: r,
2120
+ isDescendent: d = !0
2121
+ }) => {
2122
+ const { process: g, lineColors: b } = Ot(), h = n === void 0 ? void 0 : { marginTop: Math.max(0, n - St / 2) }, m = (f, N) => se(g, b, f, N), x = (f) => f === e.length - 1 ? l : e[f + 1]?.id;
2123
+ if (e.length === 0) {
2124
+ const f = m(o, l);
2125
+ return /* @__PURE__ */ C(
2126
+ "div",
2127
+ {
2128
+ "data-path-id": t ?? "",
2129
+ style: {
2130
+ width: "100%",
2131
+ marginTop: "20px",
2132
+ display: "flex",
2133
+ flexDirection: "row",
2134
+ flex: 1,
2135
+ minWidth: 0,
2136
+ ...h
2137
+ },
2138
+ children: [
2139
+ /* @__PURE__ */ i(
2140
+ "div",
2141
+ {
2142
+ style: {
2143
+ flexGrow: 1,
2144
+ flexShrink: 0,
2145
+ flexBasis: "auto",
2146
+ minWidth: 0,
2147
+ height: "2px",
2148
+ marginTop: "13.5px",
2149
+ borderTop: et(f)
2150
+ }
2151
+ }
2152
+ ),
2153
+ /* @__PURE__ */ i(
2154
+ st,
2155
+ {
2156
+ lineColor: f,
2157
+ fromId: o,
2158
+ toId: l,
2159
+ style: {
2160
+ height: "auto",
2161
+ marginTop: "2px"
2162
+ }
2163
+ }
2164
+ ),
2165
+ /* @__PURE__ */ i(
2166
+ "div",
2167
+ {
2168
+ style: {
2169
+ flexGrow: 1,
2170
+ flexShrink: 0,
2171
+ flexBasis: "auto",
2172
+ minWidth: 0,
2173
+ height: "2px",
2174
+ marginTop: "13.5px",
2175
+ borderTop: et(f)
2176
+ }
2177
+ }
2178
+ )
2179
+ ]
2180
+ }
2181
+ );
2182
+ }
2183
+ return /* @__PURE__ */ i(
2184
+ "div",
2185
+ {
2186
+ "data-path-id": t ?? "",
2187
+ className: rt.steps + (s ? " " + s : ""),
2188
+ style: h,
2189
+ children: /* @__PURE__ */ C(
2190
+ "div",
2191
+ {
2192
+ style: {
2193
+ display: "flex",
2194
+ flexDirection: "row",
2195
+ flex: 1,
2196
+ minWidth: 0,
2197
+ width: "100%",
2198
+ alignItems: "flex-start"
2199
+ },
2200
+ children: [
2201
+ /* @__PURE__ */ i(
2202
+ st,
2203
+ {
2204
+ lineColor: m(o, e[0]?.id),
2205
+ fromId: o,
2206
+ toId: e[0]?.id,
2207
+ style: {
2208
+ marginTop: "21.5px"
2209
+ }
2210
+ }
2211
+ ),
2212
+ e.map((f, N) => {
2213
+ const E = !!f.paths, v = "condition" in f && typeof f.condition == "string";
2214
+ let y;
2215
+ if (E && f.paths) {
2216
+ const u = _1(f.paths);
2217
+ y = /* @__PURE__ */ i(
2218
+ re,
2219
+ {
2220
+ items: f.paths,
2221
+ pathId: f.id,
2222
+ previousId: u ?? f.id,
2223
+ nextId: x(N),
2224
+ menus: c,
2225
+ onAction: p,
2226
+ onSelectStep: a,
2227
+ onResize: r
2228
+ },
2229
+ f.title
2230
+ );
2231
+ } else if (v) {
2232
+ const u = N === 0 ? o : ut(e[N - 1]), _ = ut(f);
2233
+ y = /* @__PURE__ */ C(G, { children: [
2234
+ /* @__PURE__ */ i(
2235
+ v1,
2236
+ {
2237
+ value: f,
2238
+ previousId: u,
2239
+ nextId: x(N),
2240
+ menus: c,
2241
+ onAction: p,
2242
+ onSelectStep: a,
2243
+ onResize: r
2244
+ }
2245
+ ),
2246
+ /* @__PURE__ */ i(
2247
+ st,
2248
+ {
2249
+ lineColor: m(
2250
+ _,
2251
+ x(N)
2252
+ ),
2253
+ fromId: f.id,
2254
+ toId: x(N),
2255
+ style: { marginTop: "34px", height: 0 }
2256
+ }
2257
+ )
2258
+ ] });
2259
+ } else
2260
+ y = /* @__PURE__ */ C(G, { children: [
2261
+ /* @__PURE__ */ i(
2262
+ ht,
2263
+ {
2264
+ id: f.id,
2265
+ title: f.title,
2266
+ icon: f.icon,
2267
+ isSet: f.isSet,
2268
+ isInvalid: f.isInvalid,
2269
+ isFilter: f.isFilter,
2270
+ status: f.status,
2271
+ debuggerMode: !0,
2272
+ items: c?.step,
2273
+ menuContext: { stepId: f.id },
2274
+ onAction: p,
2275
+ onSelectStep: a
2276
+ },
2277
+ f.title
2278
+ ),
2279
+ /* @__PURE__ */ i(
2280
+ st,
2281
+ {
2282
+ lineColor: m(
2283
+ f.id,
2284
+ x(N)
2285
+ ),
2286
+ fromId: f.id,
2287
+ toId: x(N)
2288
+ }
2289
+ )
2290
+ ] });
2291
+ return /* @__PURE__ */ i(
2292
+ "div",
2293
+ {
2294
+ className: rt.stepContainer + (E || v ? " " + rt.stepContainerWithPaths : ""),
2295
+ children: y
2296
+ },
2297
+ f.id
2298
+ );
2299
+ }),
2300
+ d && /* @__PURE__ */ i(
2301
+ "div",
2302
+ {
2303
+ style: {
2304
+ flexGrow: 1,
2305
+ minWidth: 0,
2306
+ borderTop: et(m(
2307
+ e.length > 0 ? ut(
2308
+ e[e.length - 1]
2309
+ ) : void 0,
2310
+ l
2311
+ )),
2312
+ marginTop: "33.5px"
2313
+ }
2314
+ }
2315
+ )
2316
+ ]
2317
+ }
2318
+ )
2319
+ }
2320
+ );
2321
+ }, x1 = ({
2322
+ centerY: t,
2323
+ neutralLineColor: e
2324
+ }) => /* @__PURE__ */ C(
2325
+ "div",
2326
+ {
2327
+ style: {
2328
+ display: "flex",
2329
+ flexDirection: "row",
2330
+ flex: 1,
2331
+ minWidth: 0,
2332
+ width: "100%",
2333
+ marginTop: Math.max(0, t - St / 2),
2334
+ height: St,
2335
+ alignItems: "center"
2336
+ },
2337
+ children: [
2338
+ /* @__PURE__ */ i(
2339
+ "div",
2340
+ {
2341
+ style: {
2342
+ flexGrow: 1,
2343
+ minWidth: 0,
2344
+ height: "2px",
2345
+ borderTop: `2px solid ${e}`
2346
+ }
2347
+ }
2348
+ ),
2349
+ /* @__PURE__ */ i(
2350
+ st,
2351
+ {
2352
+ lineColor: e,
2353
+ style: { height: "auto" }
2354
+ }
2355
+ ),
2356
+ /* @__PURE__ */ i(
2357
+ "div",
2358
+ {
2359
+ style: {
2360
+ flexGrow: 1,
2361
+ minWidth: 0,
2362
+ height: "2px",
2363
+ borderTop: `2px solid ${e}`
2364
+ }
2365
+ }
2366
+ )
2367
+ ]
2368
+ }
2369
+ ), P1 = ({
2370
+ process: t,
2371
+ statusLineColors: e,
2372
+ neutralLineColor: n = I.NAVY,
2373
+ menus: s,
2374
+ onMenuAction: o,
2375
+ onResize: l,
2376
+ onSelectStep: c
2377
+ }) => {
2378
+ const [p, a] = O(0), r = k(
2379
+ () => gn(e, n),
2380
+ [e, n]
2381
+ ), d = tt(
2382
+ (g) => g === "finished" ? r.statusLine("finished") : r.statusLine(void 0),
2383
+ [r]
2384
+ );
2385
+ return /* @__PURE__ */ i("div", { className: ne.container, children: /* @__PURE__ */ C(C1, { value: { process: t, lineColors: r }, children: [
2386
+ /* @__PURE__ */ i(
2387
+ Jt,
2388
+ {
2389
+ steps: t.triggers,
2390
+ onSelectStep: c,
2391
+ debuggerMode: !0,
2392
+ resolveCurveStrokeColor: d,
2393
+ onCenterYUpdate: a,
2394
+ nextStepStatus: t.steps[0]?.status
2395
+ }
2396
+ ),
2397
+ t.steps.length > 0 ? /* @__PURE__ */ i(
2398
+ Mt,
2399
+ {
2400
+ steps: t.steps,
2401
+ centerY: p,
2402
+ onResize: l,
2403
+ onSelectStep: c,
2404
+ menus: s,
2405
+ onAction: o,
2406
+ isDescendent: !1,
2407
+ pathId: void 0
2408
+ }
2409
+ ) : /* @__PURE__ */ i(
2410
+ x1,
2411
+ {
2412
+ centerY: p,
2413
+ neutralLineColor: r.statusLine(void 0)
2414
+ }
2415
+ )
2416
+ ] }) });
1536
2417
  };
1537
- class ke extends Error {
1538
- constructor(n) {
1539
- super(n), this.name = "AddStepError";
2418
+ class w1 extends Error {
2419
+ constructor(e) {
2420
+ super(e), this.name = "AddStepError";
1540
2421
  }
1541
2422
  }
1542
- const m1 = (t) => "condition" in t && typeof t.condition == "string", y1 = (t, n, o, i) => {
1543
- const r = i === "prepend" ? n : n + 1;
1544
- return [...t.slice(0, r), o, ...t.slice(r)];
1545
- }, c1 = (t, n, o, i) => {
1546
- for (let r = 0; r < t.length; r++) {
1547
- if (t[r].localId === n)
1548
- return y1(t, r, i, o);
1549
- const c = t[r], d = c.steps?.length && c1(c.steps, n, o, i);
1550
- if (d)
2423
+ const Yt = (t) => "condition" in t && typeof t.condition == "string", le = (t, e, n, s) => {
2424
+ const o = s === "prepend" ? e : e + 1;
2425
+ return [...t.slice(0, o), n, ...t.slice(o)];
2426
+ }, $t = (t, e, n, s) => {
2427
+ for (let o = 0; o < t.length; o++) {
2428
+ if (t[o].id === e)
2429
+ return le(t, o, s, n);
2430
+ const l = t[o], c = l.steps?.length && $t(l.steps, e, n, s);
2431
+ if (c)
1551
2432
  return t.map(
1552
- (s, l) => l === r ? { ...s, steps: d } : s
2433
+ (a, r) => r === o ? { ...a, steps: c } : a
1553
2434
  );
1554
- const a = c.paths?.length && I1(c.paths, n, o, i);
1555
- if (a)
2435
+ const p = l.paths?.length && ce(l.paths, e, n, s);
2436
+ if (p)
1556
2437
  return t.map(
1557
- (s, l) => l === r ? { ...s, paths: a } : s
2438
+ (a, r) => r === o ? { ...a, paths: p } : a
1558
2439
  );
1559
2440
  }
1560
2441
  return null;
1561
- }, Be = (t, n, o) => {
1562
- const i = t.steps ?? [], r = n === "prepend" ? [o, ...i] : [...i, o];
1563
- return { ...t, steps: r };
1564
- }, I1 = (t, n, o, i) => {
1565
- for (let r = 0; r < t.length; r++) {
1566
- const c = t[r];
1567
- if (c.localId === n)
1568
- return m1(c) ? t.map(
1569
- (d, a) => a === r ? Be(c, o, i) : d
1570
- ) : y1(t, r, i, o);
1571
- if (m1(c)) {
1572
- const d = c.steps?.length && c1(c.steps, n, o, i);
1573
- if (d)
2442
+ }, b1 = (t, e, n) => {
2443
+ const s = t.steps ?? [], o = e === "prepend" ? [n, ...s] : [...s, n];
2444
+ return { ...t, steps: o };
2445
+ }, ce = (t, e, n, s) => {
2446
+ for (let o = 0; o < t.length; o++) {
2447
+ const l = t[o];
2448
+ if (l.id === e)
2449
+ return Yt(l) ? t.map(
2450
+ (c, p) => p === o ? b1(l, n, s) : c
2451
+ ) : le(t, o, s, n);
2452
+ if (Yt(l)) {
2453
+ const c = l.steps?.length && $t(l.steps, e, n, s);
2454
+ if (c)
1574
2455
  return t.map(
1575
- (s, l) => l === r ? { ...s, steps: d } : s
2456
+ (a, r) => r === o ? { ...a, steps: c } : a
1576
2457
  );
1577
- const a = c.paths?.length && I1(c.paths, n, o, i);
1578
- if (a)
2458
+ const p = l.paths?.length && ce(l.paths, e, n, s);
2459
+ if (p)
1579
2460
  return t.map(
1580
- (s, l) => l === r ? { ...s, paths: a } : s
2461
+ (a, r) => r === o ? { ...a, paths: p } : a
1581
2462
  );
1582
2463
  }
1583
2464
  }
1584
2465
  return null;
1585
- }, Te = (t, n, o, i) => {
1586
- const r = c1(t.steps, n, o, i);
1587
- if (r)
1588
- return { ...t, steps: r };
1589
- throw new ke(`Step or path with id "${n}" not found`);
1590
- }, b1 = (t, n) => ({
2466
+ }, k1 = (t, e, n, s) => {
2467
+ const o = $t(t.steps, e, n, s);
2468
+ if (o)
2469
+ return { ...t, steps: o };
2470
+ throw new w1(`Step or path with id "${e}" not found`);
2471
+ }, ae = (t, e) => ({
1591
2472
  ...t,
1592
- ...t.steps != null && { steps: a1(t.steps, n) },
2473
+ ...t.steps != null && { steps: Dt(t.steps, e) },
1593
2474
  ...t.paths != null && {
1594
- paths: t.paths.map((o) => b1(o, n))
2475
+ paths: t.paths.map((n) => ae(n, e))
1595
2476
  }
1596
- }), a1 = (t, n) => t.filter((o) => o.localId !== n).map((o) => ({
1597
- ...o,
1598
- ...o.steps != null && { steps: a1(o.steps, n) },
1599
- ...o.paths != null && {
1600
- paths: o.paths.map((i) => b1(i, n))
2477
+ }), Dt = (t, e) => t.filter((n) => n.id !== e).map((n) => ({
2478
+ ...n,
2479
+ ...n.steps != null && { steps: Dt(n.steps, e) },
2480
+ ...n.paths != null && {
2481
+ paths: n.paths.map((s) => ae(s, e))
1601
2482
  }
1602
- })), Oe = (t, n) => {
1603
- const o = a1(t.steps, n);
2483
+ })), R1 = (t, e) => {
2484
+ const n = Dt(t.steps, e);
1604
2485
  return {
1605
2486
  ...t,
1606
- steps: o
2487
+ steps: n
1607
2488
  };
1608
2489
  };
1609
2490
  export {
1610
- ke as AddStepError,
1611
- Ie as Iterator,
1612
- Q as Menu,
1613
- Ee as MenuProvider,
1614
- $e as ProcessDiagram,
1615
- s1 as ProcessStep,
1616
- kt as Trigger,
1617
- Te as addStep,
1618
- Oe as deleteStep,
1619
- r1 as useMenuProvider
2491
+ w1 as AddStepError,
2492
+ S1 as ConditionIcon,
2493
+ h1 as Iterator,
2494
+ L1 as LoopIcon,
2495
+ xt as Menu,
2496
+ Ye as MenuFilterIcon,
2497
+ T1 as MenuProvider,
2498
+ P1 as ProcessDebuggerDiagram,
2499
+ E1 as ProcessDiagram,
2500
+ ht as ProcessStep,
2501
+ Jt as Trigger,
2502
+ k1 as addStep,
2503
+ R1 as deleteStep,
2504
+ Wt as isDiagramMenuSeparator,
2505
+ Lt as useMenuProvider
1620
2506
  };
1621
2507
  //# sourceMappingURL=index.mjs.map