@notmrabhi/flowforge 0.1.12 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,14 @@
1
- import { jsxs as n, jsx as e, Fragment as M } from "react/jsx-runtime";
2
- import { Handle as x, Position as N, getStraightPath as j, BaseEdge as K } from "reactflow";
3
- import { Tooltip as L, Chip as H } from "@mui/material";
4
- import { GrTrigger as re } from "react-icons/gr";
5
- import { createContext as se, useContext as fe } from "react";
6
- import { d as ce } from "./messages-CO299wPN.js";
7
- import { MdOutlineModeEdit as T, MdInfoOutline as _, MdInput as de, MdDeleteOutline as P, MdCheckCircle as ae, MdPeople as pe, MdSchedule as he, MdWebhook as oe, MdNotifications as B, MdSms as ge, MdEmail as ye, MdContentCopy as me, MdHttp as ue, MdCallSplit as be, MdAccountTree as xe, MdOpenInNew as Ne } from "react-icons/md";
8
- import { FaCheckCircle as ke, FaTimesCircle as ve } from "react-icons/fa";
1
+ import { jsxs as n, jsx as e, Fragment as R } from "react/jsx-runtime";
2
+ import { Handle as b, Position as x, getStraightPath as M, BaseEdge as K } from "reactflow";
3
+ import { Tooltip as A, Chip as U } from "@mui/material";
4
+ import { GrTrigger as ce } from "react-icons/gr";
5
+ import { createContext as de, useContext as ae } from "react";
6
+ import { d as pe } from "./messages-CO299wPN.js";
7
+ import { MdOutlineModeEdit as T, MdInfoOutline as W, MdInput as oe, MdDeleteOutline as P, MdCheckCircle as he, MdPeople as ge, MdSchedule as ye, MdWebhook as ie, MdNotifications as j, MdSms as me, MdEmail as ue, MdContentCopy as be, MdHttp as xe, MdCallSplit as Ne, MdAccountTree as ke, MdOpenInNew as ve } from "react-icons/md";
8
+ import { FaCheckCircle as le, FaTimesCircle as re } from "react-icons/fa";
9
9
  import { FiFilter as we } from "react-icons/fi";
10
10
  import { a as F, H as Se, B as O } from "./canvasTokens-CAD6G24b.js";
11
- const Ee = se({
11
+ const Ee = de({
12
12
  onEditNode: () => {
13
13
  },
14
14
  onDeleteNode: () => {
@@ -17,20 +17,20 @@ const Ee = se({
17
17
  },
18
18
  onClickAddTrigger: () => {
19
19
  },
20
- messages: ce,
20
+ messages: pe,
21
21
  nodeRegistry: null,
22
22
  nodeBody: "full"
23
- }), E = () => fe(Ee), Ce = () => /* @__PURE__ */ n("div", { style: { width: 350, display: "flex", justifyContent: "center" }, children: [
24
- /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0, left: "50%" } }),
23
+ }), E = () => ae(Ee), Ce = () => /* @__PURE__ */ n("div", { style: { width: 350, display: "flex", justifyContent: "center" }, children: [
24
+ /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0, left: "50%" } }),
25
25
  /* @__PURE__ */ e("div", { style: { padding: "8px 28px", borderRadius: 999, background: "#f5f5f5", border: "1.5px solid #bdbdbd", fontSize: 13, fontWeight: 500, color: "#424242", userSelect: "none" }, children: "Start" })
26
26
  ] }), Te = () => /* @__PURE__ */ n("div", { style: { width: 350, display: "flex", justifyContent: "center" }, children: [
27
- /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0, left: "50%" } }),
27
+ /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0, left: "50%" } }),
28
28
  /* @__PURE__ */ e("div", { style: { padding: "8px 28px", borderRadius: 999, background: "#f5f5f5", border: "1.5px solid #bdbdbd", fontSize: 13, fontWeight: 500, color: "#424242", userSelect: "none" }, children: "End" })
29
29
  ] }), ze = () => {
30
- const { onClickAddTrigger: t, messages: l } = E();
30
+ const { onClickAddTrigger: t, messages: i } = E();
31
31
  return /* @__PURE__ */ n("div", { style: { width: 350, display: "flex", justifyContent: "center" }, children: [
32
- /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0, left: "50%" } }),
33
- /* @__PURE__ */ e(L, { title: l.addTriggerTooltip, placement: "top", arrow: !0, children: /* @__PURE__ */ n(
32
+ /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0, left: "50%" } }),
33
+ /* @__PURE__ */ e(A, { title: i.addTriggerTooltip, placement: "top", arrow: !0, children: /* @__PURE__ */ n(
34
34
  "div",
35
35
  {
36
36
  onClick: t,
@@ -41,70 +41,70 @@ const Ee = se({
41
41
  },
42
42
  style: { padding: "10px 24px", borderRadius: 8, border: "1.5px dashed #d0d0d0", background: "#fff", cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "center", gap: 8 },
43
43
  children: [
44
- /* @__PURE__ */ e(re, { size: 16 }),
45
- /* @__PURE__ */ e("span", { className: "ff-text-black", style: { fontSize: 13 }, "data-testid": "add-trigger-btn-text", children: l.addTriggerButton })
44
+ /* @__PURE__ */ e(ce, { size: 16 }),
45
+ /* @__PURE__ */ e("span", { className: "ff-text-black", style: { fontSize: 13 }, "data-testid": "add-trigger-btn-text", children: i.addTriggerButton })
46
46
  ]
47
47
  }
48
48
  ) }),
49
- /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0, left: "50%" } })
49
+ /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0, left: "50%" } })
50
50
  ] });
51
51
  }, Ie = ({ id: t }) => {
52
- const { onAddStep: l } = E();
52
+ const { onAddStep: i } = E();
53
53
  return /* @__PURE__ */ n(
54
54
  "div",
55
55
  {
56
- onClick: () => l(t),
56
+ onClick: () => i(t),
57
57
  role: "button",
58
58
  tabIndex: 0,
59
59
  onKeyDown: (f) => {
60
- f.key === "Enter" && l(t);
60
+ f.key === "Enter" && i(t);
61
61
  },
62
62
  style: { width: 28, height: 28, borderRadius: "50%", border: "1.5px solid #9e9e9e", background: "#fff", display: "flex", alignItems: "center", justifyContent: "center", cursor: "pointer", fontSize: 18, color: "#757575", lineHeight: 1, userSelect: "none" },
63
63
  children: [
64
- /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
64
+ /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
65
65
  "+",
66
- /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 } })
66
+ /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } })
67
67
  ]
68
68
  }
69
69
  );
70
70
  };
71
71
  function Pe(t) {
72
- return t ? t === "END_USER_CREATION" ? "New User Registration" : t === "END_USER_UPDATION" ? "On User Update" : t.replace(/[_-]+/g, " ").replace(/\b\w/g, (l) => l.toUpperCase()) : "";
72
+ return t ? t === "END_USER_CREATION" ? "New User Registration" : t === "END_USER_UPDATION" ? "On User Update" : t.replace(/[_-]+/g, " ").replace(/\b\w/g, (i) => i.toUpperCase()) : "";
73
73
  }
74
- function De(t) {
75
- const l = typeof t == "string" ? t : t.value ?? "";
76
- return l === "SIGNUP_FLOW" ? "User Self-Registration" : l === "ADMIN_CREATION_FLOW" ? "Create User via Admin Portal" : l === "SHEDULAR" ? "Scheduler" : typeof t != "string" && t.label ? t.label : l.replace(/[_-]+/g, " ").replace(/\b\w/g, (f) => f.toUpperCase());
74
+ function Ae(t) {
75
+ const i = typeof t == "string" ? t : t.value ?? "";
76
+ return i === "SIGNUP_FLOW" ? "User Self-Registration" : i === "ADMIN_CREATION_FLOW" ? "Create User via Admin Portal" : i === "SHEDULAR" ? "Scheduler" : typeof t != "string" && t.label ? t.label : i.replace(/[_-]+/g, " ").replace(/\b\w/g, (f) => f.toUpperCase());
77
77
  }
78
- const Ae = ({ data: t }) => {
79
- const { onClickAddTrigger: l } = E(), {
78
+ const De = ({ data: t }) => {
79
+ const { onClickAddTrigger: i } = E(), {
80
80
  type: f,
81
- eventType: p,
81
+ eventType: a,
82
82
  sources: s,
83
83
  label: r,
84
84
  source: h,
85
85
  previewWorkflow: o,
86
- executionStatus: i,
86
+ executionStatus: l,
87
87
  infoText: d = "This node decides the flow trigger type and configuration."
88
88
  } = t ?? {}, y = (u) => {
89
- u == null || u.stopPropagation(), l();
90
- }, g = Array.isArray(s) && s.length > 0, b = !!(r || h), a = f === "scheduler" ? "Scheduler Trigger" : f === "event" || g || b ? "Event Trigger Source" : "Select Trigger", c = f === "scheduler" ? /* @__PURE__ */ e("span", { children: "Scheduler to be configured" }) : f === "event" || g ? /* @__PURE__ */ n("div", { children: [
89
+ u == null || u.stopPropagation(), i();
90
+ }, g = Array.isArray(s) && s.length > 0, N = !!(r || h), p = f === "scheduler" ? "Scheduler Trigger" : f === "event" || g || N ? "Event Trigger Source" : "Select Trigger", c = f === "scheduler" ? /* @__PURE__ */ e("span", { children: "Scheduler to be configured" }) : f === "event" || g ? /* @__PURE__ */ n("div", { children: [
91
91
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center", children: [
92
- /* @__PURE__ */ e("span", { style: { fontWeight: 600 }, children: Pe(p) }),
92
+ /* @__PURE__ */ e("span", { style: { fontWeight: 600 }, children: Pe(a) }),
93
93
  /* @__PURE__ */ e("span", { className: "ff-ms-2 ff-text-muted", style: { fontSize: 12 }, children: "via" })
94
94
  ] }),
95
95
  /* @__PURE__ */ e("div", { className: "ff-d-flex ff-flex-wrap ff-mt-2", style: { gap: 4 }, children: g ? s.map((u, w) => /* @__PURE__ */ e(
96
- H,
96
+ U,
97
97
  {
98
- label: De(u),
98
+ label: Ae(u),
99
99
  variant: "outlined",
100
100
  size: "small",
101
101
  className: "ff-text-dark"
102
102
  },
103
103
  w
104
104
  )) : /* @__PURE__ */ e("span", { className: "ff-text-muted", style: { fontSize: 12 }, children: "No source selected" }) })
105
- ] }) : b ? /* @__PURE__ */ n("div", { className: "ff-d-flex ff-flex-wrap ff-align-items-center", style: { gap: 6 }, children: [
105
+ ] }) : N ? /* @__PURE__ */ n("div", { className: "ff-d-flex ff-flex-wrap ff-align-items-center", style: { gap: 6 }, children: [
106
106
  r && /* @__PURE__ */ e("span", { style: { fontWeight: 600 }, children: r }),
107
- h && /* @__PURE__ */ e(H, { label: h, variant: "outlined", size: "small" })
107
+ h && /* @__PURE__ */ e(U, { label: h, variant: "outlined", size: "small" })
108
108
  ] }) : /* @__PURE__ */ e(
109
109
  "span",
110
110
  {
@@ -117,9 +117,9 @@ const Ae = ({ data: t }) => {
117
117
  style: { cursor: "pointer", color: "#1e88e5" },
118
118
  children: "Click to select a trigger to start your workflow"
119
119
  }
120
- ), v = i ? /* @__PURE__ */ n(M, { children: [
121
- i.status === "success" && /* @__PURE__ */ e(ke, { size: 16, color: "#1DBF60", style: { marginRight: 8 } }),
122
- i.status === "failed" && /* @__PURE__ */ e(ve, { size: 16, color: "#f44336", style: { marginRight: 8 } })
120
+ ), v = l ? /* @__PURE__ */ n(R, { children: [
121
+ l.status === "success" && /* @__PURE__ */ e(le, { size: 16, color: "#1DBF60", style: { marginRight: 8 } }),
122
+ l.status === "failed" && /* @__PURE__ */ e(re, { size: 16, color: "#f44336", style: { marginRight: 8 } })
123
123
  ] }) : /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center", children: [
124
124
  !o && /* @__PURE__ */ e(
125
125
  "div",
@@ -136,10 +136,10 @@ const Ae = ({ data: t }) => {
136
136
  children: /* @__PURE__ */ e(T, { size: 16 })
137
137
  }
138
138
  ),
139
- /* @__PURE__ */ e(L, { title: /* @__PURE__ */ e("div", { children: d }), placement: "right", arrow: !0, children: /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(_, { color: "gray", size: 16 }) }) })
139
+ /* @__PURE__ */ e(A, { title: /* @__PURE__ */ e("div", { children: d }), placement: "right", arrow: !0, children: /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(W, { color: "gray", size: 16 }) }) })
140
140
  ] });
141
141
  return /* @__PURE__ */ n("div", { style: { width: 350 }, children: [
142
- /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
142
+ /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
143
143
  /* @__PURE__ */ n("div", { style: { border: "1.5px solid #a5d6a7", borderRadius: 8, background: "#fff", overflow: "hidden" }, children: [
144
144
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 6px" }, children: [
145
145
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
@@ -156,10 +156,10 @@ const Ae = ({ data: t }) => {
156
156
  justifyContent: "center",
157
157
  flexShrink: 0
158
158
  },
159
- children: /* @__PURE__ */ e(de, { size: 16, color: "#388e3c" })
159
+ children: /* @__PURE__ */ e(oe, { size: 16, color: "#388e3c" })
160
160
  }
161
161
  ),
162
- /* @__PURE__ */ e("span", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: a })
162
+ /* @__PURE__ */ e("span", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: p })
163
163
  ] }),
164
164
  /* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center", children: v })
165
165
  ] }),
@@ -178,20 +178,98 @@ const Ae = ({ data: t }) => {
178
178
  }
179
179
  )
180
180
  ] }),
181
- /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 }, id: "1" })
181
+ /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 }, id: "1" })
182
182
  ] });
183
- }, ie = ({ rail: t, cardWidth: l }) => {
184
- const f = l / 2;
185
- l / 2 + t.indent;
186
- const p = "var(--ff-edge-color, #b0bec5)";
183
+ };
184
+ function Le(t) {
185
+ return t ? t === "END_USER_CREATION" ? "New User Registration" : t === "END_USER_UPDATION" ? "On User Update" : t.replace(/[_-]+/g, " ").replace(/\b\w/g, (i) => i.toUpperCase()) : "";
186
+ }
187
+ function Re(t) {
188
+ const i = typeof t == "string" ? t : t.value ?? "";
189
+ return i === "SIGNUP_FLOW" ? "User Self-Registration" : i === "ADMIN_CREATION_FLOW" ? "Create User via Admin Portal" : i === "SHEDULAR" || i === "SCHEDULER" ? "Scheduler" : typeof t != "string" && t.label ? t.label : i.replace(/[_-]+/g, " ").replace(/\b\w/g, (f) => f.toUpperCase());
190
+ }
191
+ const We = ({ data: t }) => {
192
+ const {
193
+ header: i = "Event",
194
+ title: f,
195
+ eventType: a,
196
+ sources: s,
197
+ executionStatus: r,
198
+ infoText: h = "This event is raised by the system. It cannot be configured."
199
+ } = t ?? {}, o = f ?? Le(a) ?? "—";
200
+ return /* @__PURE__ */ n("div", { style: { width: 350 }, children: [
201
+ /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
202
+ /* @__PURE__ */ n("div", { style: { border: "1.5px solid #a5d6a7", borderRadius: 8, background: "#fff", overflow: "hidden" }, children: [
203
+ /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center", style: { padding: "10px 12px" }, children: [
204
+ /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
205
+ /* @__PURE__ */ e(
206
+ "div",
207
+ {
208
+ style: {
209
+ width: 28,
210
+ height: 28,
211
+ borderRadius: 6,
212
+ background: "rgba(76,175,80,0.1)",
213
+ display: "flex",
214
+ alignItems: "center",
215
+ justifyContent: "center",
216
+ flexShrink: 0
217
+ },
218
+ children: /* @__PURE__ */ e(oe, { size: 16, color: "#388e3c" })
219
+ }
220
+ ),
221
+ /* @__PURE__ */ e("span", { style: { fontSize: 14, fontWeight: 500, color: "#212121" }, children: i })
222
+ ] }),
223
+ /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center", children: [
224
+ (r == null ? void 0 : r.status) === "success" && /* @__PURE__ */ e(le, { size: 16, color: "#1DBF60", style: { marginRight: 8 } }),
225
+ (r == null ? void 0 : r.status) === "failed" && /* @__PURE__ */ e(re, { size: 16, color: "#f44336", style: { marginRight: 8 } }),
226
+ !r && /* @__PURE__ */ e(A, { title: /* @__PURE__ */ e("div", { children: h }), placement: "right", arrow: !0, children: /* @__PURE__ */ e("span", { children: /* @__PURE__ */ e(W, { color: "gray", size: 16 }) }) })
227
+ ] })
228
+ ] }),
229
+ /* @__PURE__ */ n(
230
+ "div",
231
+ {
232
+ style: {
233
+ background: "#f5f5f5",
234
+ fontSize: 13,
235
+ color: "#212121",
236
+ padding: "10px 12px",
237
+ margin: "0 12px 12px",
238
+ borderRadius: 6
239
+ },
240
+ children: [
241
+ /* @__PURE__ */ e("div", { style: { fontWeight: 600 }, children: o }),
242
+ Array.isArray(s) && s.length > 0 && /* @__PURE__ */ n(R, { children: [
243
+ /* @__PURE__ */ e("div", { className: "ff-text-muted", style: { fontSize: 12, marginTop: 4 }, children: "via" }),
244
+ /* @__PURE__ */ e("div", { className: "ff-d-flex ff-flex-wrap ff-mt-1", style: { gap: 4 }, children: s.map((l, d) => /* @__PURE__ */ e(
245
+ U,
246
+ {
247
+ label: Re(l),
248
+ variant: "outlined",
249
+ size: "small",
250
+ className: "ff-text-dark"
251
+ },
252
+ d
253
+ )) })
254
+ ] })
255
+ ]
256
+ }
257
+ )
258
+ ] }),
259
+ /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 }, id: "1" })
260
+ ] });
261
+ }, se = ({ rail: t, cardWidth: i }) => {
262
+ const f = i / 2;
263
+ i / 2 + t.indent;
264
+ const a = "var(--ff-edge-color, #b0bec5)";
187
265
  return /* @__PURE__ */ n(
188
266
  "svg",
189
267
  {
190
- width: l + t.indent + 200,
268
+ width: i + t.indent + 200,
191
269
  height: t.height,
192
270
  style: { position: "absolute", left: 0, top: "100%", pointerEvents: "none", overflow: "visible" },
193
271
  children: [
194
- /* @__PURE__ */ e("line", { x1: f, y1: 0, x2: f, y2: t.height, stroke: p, strokeWidth: 1.5 }),
272
+ /* @__PURE__ */ e("line", { x1: f, y1: 0, x2: f, y2: t.height, stroke: a, strokeWidth: 1.5 }),
195
273
  t.branches.map((s, r) => {
196
274
  const h = s.y;
197
275
  return /* @__PURE__ */ n("g", { transform: `translate(0, ${h})`, children: [
@@ -203,7 +281,7 @@ const Ae = ({ data: t }) => {
203
281
  width: 10,
204
282
  height: 10,
205
283
  fill: "#fff",
206
- stroke: p,
284
+ stroke: a,
207
285
  strokeWidth: 1.5,
208
286
  transform: `rotate(45, ${f}, 0)`
209
287
  }
@@ -225,10 +303,10 @@ const Ae = ({ data: t }) => {
225
303
  ]
226
304
  }
227
305
  );
228
- }, Le = ({ id: t, data: l }) => {
229
- const { onEditNode: f, onDeleteNode: p } = E(), { conditions: s = [], infoText: r = "Filter conditions applied to workflow data", _branchRail: h } = l;
306
+ }, Fe = ({ id: t, data: i }) => {
307
+ const { onEditNode: f, onDeleteNode: a } = E(), { conditions: s = [], infoText: r = "Filter conditions applied to workflow data", _branchRail: h } = i;
230
308
  return /* @__PURE__ */ n("div", { style: { width: 350, position: "relative" }, children: [
231
- /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
309
+ /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
232
310
  /* @__PURE__ */ n("div", { style: { border: "1.5px solid #ffe082", borderRadius: 8, background: "#fff" }, children: [
233
311
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-mb-2 ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2", children: [
234
312
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center", children: [
@@ -257,31 +335,31 @@ const Ae = ({ data: t }) => {
257
335
  role: "button",
258
336
  tabIndex: 0,
259
337
  onClick: (o) => {
260
- o.stopPropagation(), p(t);
338
+ o.stopPropagation(), a(t);
261
339
  },
262
340
  onKeyDown: (o) => {
263
- o.key === "Enter" && (o.stopPropagation(), p(t));
341
+ o.key === "Enter" && (o.stopPropagation(), a(t));
264
342
  },
265
343
  children: /* @__PURE__ */ e(P, { color: "red", size: 16 })
266
344
  }
267
345
  ),
268
- /* @__PURE__ */ e(L, { title: r, placement: "right", arrow: !0, children: /* @__PURE__ */ e("div", { className: "ff-ms-2", children: /* @__PURE__ */ e(_, { color: "gray", size: 16 }) }) })
346
+ /* @__PURE__ */ e(A, { title: r, placement: "right", arrow: !0, children: /* @__PURE__ */ e("div", { className: "ff-ms-2", children: /* @__PURE__ */ e(W, { color: "gray", size: 16 }) }) })
269
347
  ] })
270
348
  ] }),
271
- /* @__PURE__ */ e("div", { className: "ff-p-2 ff-mx-2 ff-mb-2 ff-rounded", style: { background: "#fafafa", fontSize: 12 }, children: s.length === 0 ? /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "No conditions configured" }) : s.map((o, i) => /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-mb-1", children: [
349
+ /* @__PURE__ */ e("div", { className: "ff-p-2 ff-mx-2 ff-mb-2 ff-rounded", style: { background: "#fafafa", fontSize: 12 }, children: s.length === 0 ? /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "No conditions configured" }) : s.map((o, l) => /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-mb-1", children: [
272
350
  /* @__PURE__ */ e("p", { className: "ff-m-0 ff-fw-bold ff-me-1 ff-text-truncate", style: { maxWidth: 100 }, title: o.field, children: o.field }),
273
351
  /* @__PURE__ */ e("span", { className: "ff-text-muted", children: o.operator }),
274
352
  /* @__PURE__ */ e("p", { className: "ff-text-dark ff-text-truncate ff-mx-1 ff-m-0", title: o.value, children: o.value }),
275
- i < s.length - 1 && /* @__PURE__ */ e("p", { className: "ff-bg-primary ff-text-white ff-fw-bold ff-ms-1 ff-px-1 ff-rounded-1 ff-m-0", children: o.logicalOperator })
276
- ] }, i)) })
353
+ l < s.length - 1 && /* @__PURE__ */ e("p", { className: "ff-bg-primary ff-text-white ff-fw-bold ff-ms-1 ff-px-1 ff-rounded-1 ff-m-0", children: o.logicalOperator })
354
+ ] }, l)) })
277
355
  ] }),
278
- /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 } }),
279
- h && /* @__PURE__ */ e(ie, { rail: h, cardWidth: 350 })
356
+ /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } }),
357
+ h && /* @__PURE__ */ e(se, { rail: h, cardWidth: 350 })
280
358
  ] });
281
- }, Fe = ({ id: t, data: l }) => {
282
- const { onEditNode: f, onDeleteNode: p, nodeRegistry: s, nodeBody: r = "full" } = E(), { title: h = "Task", descriptorType: o, groupBlocks: i, groups: d, roles: y, groupId: g, roleId: b, infoText: a = "" } = l, c = o ? s == null ? void 0 : s.forType(o) : void 0, v = c == null ? void 0 : c.icon, u = (m) => m == null ? "" : typeof m == "string" ? m : typeof m == "object" && "label" in m ? String(m.label) : String(m), w = (m) => Array.isArray(m) ? m.map(u).filter(Boolean) : m != null && m !== "" ? [u(m)] : [], k = (i == null ? void 0 : i.flatMap((m) => m.groups ?? [])) ?? [...w(d), ...w(y), ...w(g), ...w(b)], I = k.length > 0;
359
+ }, $e = ({ id: t, data: i }) => {
360
+ const { onEditNode: f, onDeleteNode: a, nodeRegistry: s, nodeBody: r = "full" } = E(), { title: h = "Task", descriptorType: o, groupBlocks: l, groups: d, roles: y, groupId: g, roleId: N, infoText: p = "" } = i, c = o ? s == null ? void 0 : s.forType(o) : void 0, v = c == null ? void 0 : c.icon, u = (m) => m == null ? "" : typeof m == "string" ? m : typeof m == "object" && "label" in m ? String(m.label) : String(m), w = (m) => Array.isArray(m) ? m.map(u).filter(Boolean) : m != null && m !== "" ? [u(m)] : [], k = (l == null ? void 0 : l.flatMap((m) => m.groups ?? [])) ?? [...w(d), ...w(y), ...w(g), ...w(N)], I = k.length > 0;
283
361
  return /* @__PURE__ */ n("div", { style: { width: 350 }, children: [
284
- /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
362
+ /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
285
363
  /* @__PURE__ */ n("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
286
364
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2 ff-mb-1", children: [
287
365
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
@@ -310,29 +388,29 @@ const Ae = ({ data: t }) => {
310
388
  role: "button",
311
389
  tabIndex: 0,
312
390
  onClick: (m) => {
313
- m.stopPropagation(), p(t);
391
+ m.stopPropagation(), a(t);
314
392
  },
315
393
  onKeyDown: (m) => {
316
- m.key === "Enter" && (m.stopPropagation(), p(t));
394
+ m.key === "Enter" && (m.stopPropagation(), a(t));
317
395
  },
318
396
  children: /* @__PURE__ */ e(P, { color: "red", size: 16 })
319
397
  }
320
398
  ),
321
- a && /* @__PURE__ */ e(L, { title: a, placement: "right", arrow: !0, children: /* @__PURE__ */ e("div", { className: "ff-ms-2", children: /* @__PURE__ */ e(_, { color: "gray", size: 16 }) }) })
399
+ p && /* @__PURE__ */ e(A, { title: p, placement: "right", arrow: !0, children: /* @__PURE__ */ e("div", { className: "ff-ms-2", children: /* @__PURE__ */ e(W, { color: "gray", size: 16 }) }) })
322
400
  ] })
323
401
  ] }),
324
- r !== "title-only" && /* @__PURE__ */ e("div", { className: "ff-mx-2 ff-mb-2 ff-p-2 ff-rounded", style: { background: "#fafafa", fontSize: 12 }, children: c != null && c.renderNode ? c.renderNode(l) : I ? /* @__PURE__ */ e("div", { className: "ff-d-flex ff-flex-wrap ff-gap-1", children: k.map((m, z) => /* @__PURE__ */ e("span", { className: "ff-badge ff-bg-dark ff-text-white ff-py-1 ff-px-2 ff-rounded", style: { fontSize: 11 }, title: m, children: m }, z)) }) : /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "Not configured" }) })
402
+ r !== "title-only" && /* @__PURE__ */ e("div", { className: "ff-mx-2 ff-mb-2 ff-p-2 ff-rounded", style: { background: "#fafafa", fontSize: 12 }, children: c != null && c.renderNode ? c.renderNode(i) : I ? /* @__PURE__ */ e("div", { className: "ff-d-flex ff-flex-wrap ff-gap-1", children: k.map((m, z) => /* @__PURE__ */ e("span", { className: "ff-badge ff-bg-dark ff-text-white ff-py-1 ff-px-2 ff-rounded", style: { fontSize: 11 }, title: m, children: m }, z)) }) : /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "Not configured" }) })
325
403
  ] }),
326
- /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 } })
404
+ /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } })
327
405
  ] });
328
- }, U = 5, We = ({ id: t, data: l }) => {
329
- const { onEditNode: f, onDeleteNode: p } = E(), { approvalData: s, isPreview: r = !1, _branchRail: h } = l, o = (s == null ? void 0 : s.policy) ?? {}, i = o.stages ?? [], d = i.length, y = i.slice(0, U), g = d - U, b = o.name ?? o.policyName ?? "Untitled Policy";
406
+ }, H = 5, Be = ({ id: t, data: i }) => {
407
+ const { onEditNode: f, onDeleteNode: a } = E(), { approvalData: s, isPreview: r = !1, _branchRail: h } = i, o = (s == null ? void 0 : s.policy) ?? {}, l = o.stages ?? [], d = l.length, y = l.slice(0, H), g = d - H, N = o.name ?? o.policyName ?? "Untitled Policy";
330
408
  return /* @__PURE__ */ n("div", { style: { width: 350, position: "relative" }, children: [
331
- /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
409
+ /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
332
410
  /* @__PURE__ */ n("div", { style: { border: "1.5px solid #ffe082", borderRadius: 8, background: "#fff" }, children: [
333
411
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-mb-2 ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2", children: [
334
412
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
335
- /* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded", style: { width: 25, height: 25, background: "rgba(251,192,45,0.2)" }, children: /* @__PURE__ */ e(ae, { style: { color: "#FBC02D" }, size: 16 }) }),
413
+ /* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded", style: { width: 25, height: 25, background: "rgba(251,192,45,0.2)" }, children: /* @__PURE__ */ e(he, { style: { color: "#FBC02D" }, size: 16 }) }),
336
414
  /* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: "Approval Policy" })
337
415
  ] }),
338
416
  /* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
@@ -342,11 +420,11 @@ const Ae = ({ data: t }) => {
342
420
  role: "button",
343
421
  tabIndex: 0,
344
422
  style: { cursor: "pointer" },
345
- onClick: (a) => {
346
- a.stopPropagation(), f(t);
423
+ onClick: (p) => {
424
+ p.stopPropagation(), f(t);
347
425
  },
348
- onKeyDown: (a) => {
349
- a.key === "Enter" && (a.stopPropagation(), f(t));
426
+ onKeyDown: (p) => {
427
+ p.key === "Enter" && (p.stopPropagation(), f(t));
350
428
  },
351
429
  children: /* @__PURE__ */ e(T, { size: 16, className: "ff-text-secondary" })
352
430
  }
@@ -358,38 +436,38 @@ const Ae = ({ data: t }) => {
358
436
  role: "button",
359
437
  tabIndex: 0,
360
438
  style: { cursor: "pointer" },
361
- onClick: (a) => {
362
- a.stopPropagation(), p(t);
439
+ onClick: (p) => {
440
+ p.stopPropagation(), a(t);
363
441
  },
364
- onKeyDown: (a) => {
365
- a.key === "Enter" && (a.stopPropagation(), p(t));
442
+ onKeyDown: (p) => {
443
+ p.key === "Enter" && (p.stopPropagation(), a(t));
366
444
  },
367
445
  children: /* @__PURE__ */ e(P, { color: "red", size: 16 })
368
446
  }
369
447
  ),
370
- /* @__PURE__ */ e(L, { title: "This approval policy determines who must approve a request before the workflow continues.", arrow: !0, placement: "right", children: /* @__PURE__ */ e("span", { className: "ff-ms-2 ff-d-inline-flex", children: /* @__PURE__ */ e(_, { color: "gray", size: 16 }) }) })
448
+ /* @__PURE__ */ e(A, { title: "This approval policy determines who must approve a request before the workflow continues.", arrow: !0, placement: "right", children: /* @__PURE__ */ e("span", { className: "ff-ms-2 ff-d-inline-flex", children: /* @__PURE__ */ e(W, { color: "gray", size: 16 }) }) })
371
449
  ] })
372
450
  ] }),
373
451
  /* @__PURE__ */ n("div", { className: "ff-p-2 ff-rounded ff-mx-2 ff-mb-2", style: { background: "#FCFCFC" }, children: [
374
452
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-start ff-align-items-center ff-mb-2", children: [
375
- /* @__PURE__ */ e("h6", { className: "ff-text-dark ff-mb-0 ff-text-truncate ff-flex-grow-1 ff-me-2", style: { fontSize: 13, fontWeight: 700 }, title: b, children: b }),
453
+ /* @__PURE__ */ e("h6", { className: "ff-text-dark ff-mb-0 ff-text-truncate ff-flex-grow-1 ff-me-2", style: { fontSize: 13, fontWeight: 700 }, title: N, children: N }),
376
454
  /* @__PURE__ */ n("span", { className: "ff-badge ff-rounded-pill ff-px-2 ff-py-1 ff-flex-shrink-0", style: { background: "#FFF9C4", color: "#616161", fontSize: 11, fontWeight: 600 }, children: [
377
455
  d,
378
456
  " Stage",
379
457
  d !== 1 ? "s" : ""
380
458
  ] })
381
459
  ] }),
382
- i.length > 0 ? /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
383
- y.map((a, c) => {
460
+ l.length > 0 ? /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column", gap: 8 }, children: [
461
+ y.map((p, c) => {
384
462
  var z, D, C;
385
- const v = ((z = a.stageName) == null ? void 0 : z.trim()) || `Stage ${c + 1}`, u = Array.isArray(a.userIds) ? a.userIds.length : 0, w = ((D = a.groupName) == null ? void 0 : D.trim()) ?? "", k = ((C = a.roleName) == null ? void 0 : C.trim()) ?? "", I = u > 0 || w || k;
463
+ const v = ((z = p.stageName) == null ? void 0 : z.trim()) || `Stage ${c + 1}`, u = Array.isArray(p.userIds) ? p.userIds.length : 0, w = ((D = p.groupName) == null ? void 0 : D.trim()) ?? "", k = ((C = p.roleName) == null ? void 0 : C.trim()) ?? "", I = u > 0 || w || k;
386
464
  let m = "Not configured";
387
465
  return w ? m = `Group: ${w}` : k ? m = `Role: ${k}` : u > 0 && (m = `${u} approver${u !== 1 ? "s" : ""}`), /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
388
466
  /* @__PURE__ */ e("div", { className: "ff-rounded-circle ff-d-flex ff-align-items-center ff-justify-content-center ff-flex-shrink-0", style: { width: 28, height: 28, background: "#FFF9C4", color: "#5D4037", fontSize: 12, fontWeight: 700 }, children: c + 1 }),
389
467
  /* @__PURE__ */ n("div", { className: "ff-flex-grow-1 ff-rounded ff-p-2 ff-d-flex ff-justify-content-between ff-align-items-center ff-border", style: { background: "#FFFDE7", borderColor: "#FEE79A" }, children: [
390
468
  /* @__PURE__ */ e("span", { style: { fontSize: 12, fontWeight: 700, color: "#212121" }, children: v }),
391
469
  /* @__PURE__ */ n("span", { className: `ff-d-flex ff-align-items-center ff-gap-1 ${I ? "ff-text-dark" : "ff-text-muted"}`, style: { fontSize: 12 }, children: [
392
- /* @__PURE__ */ e(pe, { size: 16, className: "ff-flex-shrink-0", style: { color: I ? "#5D4037" : "#9E9E9E" } }),
470
+ /* @__PURE__ */ e(ge, { size: 16, className: "ff-flex-shrink-0", style: { color: I ? "#5D4037" : "#9E9E9E" } }),
393
471
  m
394
472
  ] })
395
473
  ] })
@@ -402,11 +480,11 @@ const Ae = ({ data: t }) => {
402
480
  style: { fontSize: 11, color: "#1976d2", borderColor: "#FEE79A", background: "#FFFDE7", borderStyle: "dashed", cursor: r ? "default" : "pointer" },
403
481
  role: r ? void 0 : "button",
404
482
  tabIndex: r ? void 0 : 0,
405
- onClick: (a) => {
406
- r || (a.stopPropagation(), f(t));
483
+ onClick: (p) => {
484
+ r || (p.stopPropagation(), f(t));
407
485
  },
408
- onKeyDown: (a) => {
409
- r || a.key !== "Enter" || (a.stopPropagation(), f(t));
486
+ onKeyDown: (p) => {
487
+ r || p.key !== "Enter" || (p.stopPropagation(), f(t));
410
488
  },
411
489
  children: [
412
490
  "+ ",
@@ -419,17 +497,17 @@ const Ae = ({ data: t }) => {
419
497
  ] }) : /* @__PURE__ */ e("div", { className: "ff-text-center ff-py-3 ff-rounded ff-border", style: { fontSize: 12, color: "#9e9e9e", background: "#FFFDE7", borderColor: "#FEE79A", borderStyle: "dashed" }, children: "No stages configured" })
420
498
  ] })
421
499
  ] }),
422
- /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 } }),
423
- h && /* @__PURE__ */ e(ie, { rail: h, cardWidth: 350 })
500
+ /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } }),
501
+ h && /* @__PURE__ */ e(se, { rail: h, cardWidth: 350 })
424
502
  ] });
425
- }, Re = ({ id: t, data: l }) => {
426
- const { onEditNode: f, onDeleteNode: p } = E(), { duration: s, unit: r } = l, h = s != null && r, o = h ? `Wait ${s} ${r}` : "Not configured";
503
+ }, _e = ({ id: t, data: i }) => {
504
+ const { onEditNode: f, onDeleteNode: a } = E(), { duration: s, unit: r } = i, h = s != null && r, o = h ? `Wait ${s} ${r}` : "Not configured";
427
505
  return /* @__PURE__ */ n("div", { style: { width: 350 }, children: [
428
- /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
506
+ /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
429
507
  /* @__PURE__ */ n("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
430
508
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2 ff-mb-1", children: [
431
509
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
432
- /* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded", style: { width: 25, height: 25, background: "rgba(33,150,243,0.1)" }, children: /* @__PURE__ */ e(he, { size: 16, color: "#1976d2" }) }),
510
+ /* @__PURE__ */ e("div", { className: "ff-d-flex ff-align-items-center ff-justify-content-center ff-rounded", style: { width: 25, height: 25, background: "rgba(33,150,243,0.1)" }, children: /* @__PURE__ */ e(ye, { size: 16, color: "#1976d2" }) }),
433
511
  /* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: "Delay" })
434
512
  ] }),
435
513
  /* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
@@ -438,11 +516,11 @@ const Ae = ({ data: t }) => {
438
516
  {
439
517
  role: "button",
440
518
  tabIndex: 0,
441
- onClick: (i) => {
442
- i.stopPropagation(), f(t);
519
+ onClick: (l) => {
520
+ l.stopPropagation(), f(t);
443
521
  },
444
- onKeyDown: (i) => {
445
- i.key === "Enter" && (i.stopPropagation(), f(t));
522
+ onKeyDown: (l) => {
523
+ l.key === "Enter" && (l.stopPropagation(), f(t));
446
524
  },
447
525
  children: /* @__PURE__ */ e(T, { size: 16 })
448
526
  }
@@ -453,11 +531,11 @@ const Ae = ({ data: t }) => {
453
531
  className: "ff-ms-2",
454
532
  role: "button",
455
533
  tabIndex: 0,
456
- onClick: (i) => {
457
- i.stopPropagation(), p(t);
534
+ onClick: (l) => {
535
+ l.stopPropagation(), a(t);
458
536
  },
459
- onKeyDown: (i) => {
460
- i.key === "Enter" && (i.stopPropagation(), p(t));
537
+ onKeyDown: (l) => {
538
+ l.key === "Enter" && (l.stopPropagation(), a(t));
461
539
  },
462
540
  children: /* @__PURE__ */ e(P, { color: "red", size: 16 })
463
541
  }
@@ -466,26 +544,26 @@ const Ae = ({ data: t }) => {
466
544
  ] }),
467
545
  /* @__PURE__ */ e("div", { className: "ff-mx-2 ff-mb-2 ff-p-2 ff-rounded", style: { background: "#fafafa", fontSize: 12 }, children: /* @__PURE__ */ e("span", { className: h ? "ff-text-dark ff-fw-medium" : "ff-text-muted", children: o }) })
468
546
  ] }),
469
- /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 } })
547
+ /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } })
470
548
  ] });
471
549
  }, G = {
472
- email: { label: "Email", bg: "#e3f2fd", color: "#1565c0", iconType: ye },
473
- slack: { label: "Slack", bg: "#e8f5e9", color: "#2e7d32", iconType: B },
474
- teams: { label: "MS Teams", bg: "#ede7f6", color: "#4527a0", iconType: B },
475
- sms: { label: "SMS", bg: "#fce4ec", color: "#880e4f", iconType: ge },
476
- "in-app": { label: "In-App", bg: "#fff3e0", color: "#e65100", iconType: B },
477
- webhook: { label: "Webhook", bg: "#f3e5f5", color: "#6a1b9a", iconType: oe }
478
- }, $e = {
550
+ email: { label: "Email", bg: "#e3f2fd", color: "#1565c0", iconType: ue },
551
+ slack: { label: "Slack", bg: "#e8f5e9", color: "#2e7d32", iconType: j },
552
+ teams: { label: "MS Teams", bg: "#ede7f6", color: "#4527a0", iconType: j },
553
+ sms: { label: "SMS", bg: "#fce4ec", color: "#880e4f", iconType: me },
554
+ "in-app": { label: "In-App", bg: "#fff3e0", color: "#e65100", iconType: j },
555
+ webhook: { label: "Webhook", bg: "#f3e5f5", color: "#6a1b9a", iconType: ie }
556
+ }, je = {
479
557
  label: "Notification",
480
558
  bg: "rgba(156,39,176,0.1)",
481
559
  color: "#7b1fa2",
482
- iconType: B
560
+ iconType: j
483
561
  };
484
- function Be(t) {
485
- var l;
562
+ function Me(t) {
563
+ var i;
486
564
  switch (t.channel) {
487
565
  case "email":
488
- return ((l = t.emailTo) == null ? void 0 : l.join(", ")) ?? t.recipient ?? null;
566
+ return ((i = t.emailTo) == null ? void 0 : i.join(", ")) ?? t.recipient ?? null;
489
567
  case "slack":
490
568
  return t.slackChannel ?? null;
491
569
  case "teams":
@@ -500,13 +578,13 @@ function Be(t) {
500
578
  return t.recipient ?? null;
501
579
  }
502
580
  }
503
- function Me(t) {
581
+ function Ke(t) {
504
582
  switch (t.channel) {
505
583
  case "email":
506
584
  return t.emailSubject ?? t.subject ?? null;
507
585
  case "slack": {
508
- const l = t.slackMessage;
509
- return l ? l.length > 60 ? `${l.slice(0, 60)}…` : l : null;
586
+ const i = t.slackMessage;
587
+ return i ? i.length > 60 ? `${i.slice(0, 60)}…` : i : null;
510
588
  }
511
589
  case "in-app":
512
590
  return t.inAppTitle ?? null;
@@ -514,10 +592,10 @@ function Me(t) {
514
592
  return t.subject ?? null;
515
593
  }
516
594
  }
517
- const je = ({ id: t, data: l }) => {
518
- const { onEditNode: f, onDeleteNode: p } = E(), s = l, r = s.channel && G[s.channel] ? G[s.channel] : $e, h = Be(s), o = Me(s), i = !!(s.channel && h), d = r.iconType;
595
+ const Ue = ({ id: t, data: i }) => {
596
+ const { onEditNode: f, onDeleteNode: a } = E(), s = i, r = s.channel && G[s.channel] ? G[s.channel] : je, h = Me(s), o = Ke(s), l = !!(s.channel && h), d = r.iconType;
519
597
  return /* @__PURE__ */ n("div", { style: { width: F }, children: [
520
- /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
598
+ /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
521
599
  /* @__PURE__ */ n("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
522
600
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2 ff-mb-1", children: [
523
601
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
@@ -546,17 +624,17 @@ const je = ({ id: t, data: l }) => {
546
624
  role: "button",
547
625
  tabIndex: 0,
548
626
  onClick: (y) => {
549
- y.stopPropagation(), p(t);
627
+ y.stopPropagation(), a(t);
550
628
  },
551
629
  onKeyDown: (y) => {
552
- (y.key === "Enter" || y.key === " ") && (y.stopPropagation(), p(t));
630
+ (y.key === "Enter" || y.key === " ") && (y.stopPropagation(), a(t));
553
631
  },
554
632
  children: /* @__PURE__ */ e(P, { color: "red", size: 16 })
555
633
  }
556
634
  )
557
635
  ] })
558
636
  ] }),
559
- /* @__PURE__ */ e("div", { className: "ff-mx-2 ff-mb-2 ff-p-2 ff-rounded", style: { background: "#fafafa", fontSize: 12 }, children: i ? /* @__PURE__ */ n("div", { className: "ff-d-flex ff-flex-column ff-gap-1", children: [
637
+ /* @__PURE__ */ e("div", { className: "ff-mx-2 ff-mb-2 ff-p-2 ff-rounded", style: { background: "#fafafa", fontSize: 12 }, children: l ? /* @__PURE__ */ n("div", { className: "ff-d-flex ff-flex-column ff-gap-1", children: [
560
638
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
561
639
  /* @__PURE__ */ e("span", { className: "ff-px-2 ff-py-1 ff-rounded", style: { fontSize: 10, background: r.bg, color: r.color, fontWeight: 600, flexShrink: 0 }, children: r.label }),
562
640
  /* @__PURE__ */ e("span", { className: "ff-text-dark ff-text-truncate", style: { maxWidth: 220 }, children: h })
@@ -564,24 +642,24 @@ const je = ({ id: t, data: l }) => {
564
642
  o && /* @__PURE__ */ e("span", { className: "ff-text-muted ff-text-truncate", style: { maxWidth: 280 }, children: o })
565
643
  ] }) : /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "Not configured" }) })
566
644
  ] }),
567
- /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 } })
645
+ /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } })
568
646
  ] });
569
647
  }, V = {
570
648
  "api-key": "API Key",
571
649
  hmac: "HMAC"
572
- }, Ke = ({ data: t }) => {
573
- const { onClickAddTrigger: l } = E(), { label: f = "Webhook Trigger", endpointUrl: p, authMethod: s, source: r } = t, h = (i) => {
574
- i.stopPropagation(), l();
575
- }, o = (i) => {
576
- i.stopPropagation(), p && navigator.clipboard.writeText(p).catch(() => {
650
+ }, Oe = ({ data: t }) => {
651
+ const { onClickAddTrigger: i } = E(), { label: f = "Webhook Trigger", endpointUrl: a, authMethod: s, source: r } = t, h = (l) => {
652
+ l.stopPropagation(), i();
653
+ }, o = (l) => {
654
+ l.stopPropagation(), a && navigator.clipboard.writeText(a).catch(() => {
577
655
  });
578
656
  };
579
657
  return /* @__PURE__ */ n("div", { style: { width: F }, children: [
580
- /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
658
+ /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
581
659
  /* @__PURE__ */ n("div", { style: { border: "1.5px solid #90caf9", borderRadius: 8, background: "#fff", overflow: "hidden" }, children: [
582
660
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2 ff-mb-2", children: [
583
661
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
584
- /* @__PURE__ */ e("div", { style: { width: 28, height: 28, borderRadius: 6, background: "rgba(33,150,243,0.1)", display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ e(oe, { size: 16, color: "#1565c0" }) }),
662
+ /* @__PURE__ */ e("div", { style: { width: 28, height: 28, borderRadius: 6, background: "rgba(33,150,243,0.1)", display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0 }, children: /* @__PURE__ */ e(ie, { size: 16, color: "#1565c0" }) }),
585
663
  /* @__PURE__ */ e("span", { style: { fontSize: 13, fontWeight: 600, color: "#212121" }, children: "Webhook Trigger" })
586
664
  ] }),
587
665
  /* @__PURE__ */ e(
@@ -590,8 +668,8 @@ const je = ({ id: t, data: l }) => {
590
668
  role: "button",
591
669
  tabIndex: 0,
592
670
  onClick: h,
593
- onKeyDown: (i) => {
594
- (i.key === "Enter" || i.key === " ") && h(i);
671
+ onKeyDown: (l) => {
672
+ (l.key === "Enter" || l.key === " ") && h(l);
595
673
  },
596
674
  className: "ff-d-flex ff-align-items-center",
597
675
  style: { paddingRight: 4, cursor: "pointer" },
@@ -605,35 +683,35 @@ const je = ({ id: t, data: l }) => {
605
683
  r && /* @__PURE__ */ e("span", { className: "ff-px-2 ff-py-1 ff-rounded", style: { fontSize: 11, background: "#fff", border: "1px solid #90caf9", color: "#1565c0" }, children: r }),
606
684
  s && s !== "none" && V[s] && /* @__PURE__ */ e("span", { className: "ff-px-2 ff-py-1 ff-rounded", style: { fontSize: 10, background: "#1565c0", color: "#fff", fontWeight: 600 }, children: V[s] })
607
685
  ] }),
608
- p && /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-1", style: { marginTop: 4 }, children: [
609
- /* @__PURE__ */ e("span", { style: { fontSize: 10, color: "#1565c0", fontFamily: "monospace", flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: p }),
610
- /* @__PURE__ */ e(L, { title: "Copy URL", placement: "top", arrow: !0, children: /* @__PURE__ */ e(
686
+ a && /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-1", style: { marginTop: 4 }, children: [
687
+ /* @__PURE__ */ e("span", { style: { fontSize: 10, color: "#1565c0", fontFamily: "monospace", flex: 1, overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: a }),
688
+ /* @__PURE__ */ e(A, { title: "Copy URL", placement: "top", arrow: !0, children: /* @__PURE__ */ e(
611
689
  "div",
612
690
  {
613
691
  role: "button",
614
692
  tabIndex: 0,
615
693
  onClick: o,
616
- onKeyDown: (i) => {
617
- (i.key === "Enter" || i.key === " ") && o(i);
694
+ onKeyDown: (l) => {
695
+ (l.key === "Enter" || l.key === " ") && o(l);
618
696
  },
619
697
  style: { cursor: "pointer", flexShrink: 0 },
620
- children: /* @__PURE__ */ e(me, { size: 12, color: "#1565c0" })
698
+ children: /* @__PURE__ */ e(be, { size: 12, color: "#1565c0" })
621
699
  }
622
700
  ) })
623
701
  ] })
624
702
  ] })
625
703
  ] }),
626
- /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 } })
704
+ /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } })
627
705
  ] });
628
- }, _e = ({ id: t, data: l }) => {
629
- var b;
630
- const { onEditNode: f, onDeleteNode: p, nodeRegistry: s } = E(), { method: r, url: h, descriptorType: o } = l, i = o ? (b = s == null ? void 0 : s.forType(o)) == null ? void 0 : b.icon : /* @__PURE__ */ e(ue, { size: 16, color: "#546e7a" }), d = !!(r && h), y = (r == null ? void 0 : r.toUpperCase()) ?? "", g = Se[y] ?? null;
706
+ }, He = ({ id: t, data: i }) => {
707
+ var N;
708
+ const { onEditNode: f, onDeleteNode: a, nodeRegistry: s } = E(), { method: r, url: h, descriptorType: o } = i, l = o ? (N = s == null ? void 0 : s.forType(o)) == null ? void 0 : N.icon : /* @__PURE__ */ e(xe, { size: 16, color: "#546e7a" }), d = !!(r && h), y = (r == null ? void 0 : r.toUpperCase()) ?? "", g = Se[y] ?? null;
631
709
  return /* @__PURE__ */ n("div", { style: { width: F }, children: [
632
- /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
710
+ /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
633
711
  /* @__PURE__ */ n("div", { style: { border: "1.5px solid #b0bec5", borderRadius: 8, background: "#fff" }, children: [
634
712
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2 ff-mb-1", children: [
635
713
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
636
- /* @__PURE__ */ e("div", { style: { width: 25, height: 25, display: "flex", alignItems: "center", justifyContent: "center" }, children: i }),
714
+ /* @__PURE__ */ e("div", { style: { width: 25, height: 25, display: "flex", alignItems: "center", justifyContent: "center" }, children: l }),
637
715
  /* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: "REST API Call" })
638
716
  ] }),
639
717
  /* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
@@ -642,11 +720,11 @@ const je = ({ id: t, data: l }) => {
642
720
  {
643
721
  role: "button",
644
722
  tabIndex: 0,
645
- onClick: (a) => {
646
- a.stopPropagation(), f(t);
723
+ onClick: (p) => {
724
+ p.stopPropagation(), f(t);
647
725
  },
648
- onKeyDown: (a) => {
649
- (a.key === "Enter" || a.key === " ") && (a.stopPropagation(), f(t));
726
+ onKeyDown: (p) => {
727
+ (p.key === "Enter" || p.key === " ") && (p.stopPropagation(), f(t));
650
728
  },
651
729
  children: /* @__PURE__ */ e(T, { size: 16 })
652
730
  }
@@ -657,11 +735,11 @@ const je = ({ id: t, data: l }) => {
657
735
  className: "ff-ms-2",
658
736
  role: "button",
659
737
  tabIndex: 0,
660
- onClick: (a) => {
661
- a.stopPropagation(), p(t);
738
+ onClick: (p) => {
739
+ p.stopPropagation(), a(t);
662
740
  },
663
- onKeyDown: (a) => {
664
- (a.key === "Enter" || a.key === " ") && (a.stopPropagation(), p(t));
741
+ onKeyDown: (p) => {
742
+ (p.key === "Enter" || p.key === " ") && (p.stopPropagation(), a(t));
665
743
  },
666
744
  children: /* @__PURE__ */ e(P, { color: "red", size: 16 })
667
745
  }
@@ -673,9 +751,9 @@ const je = ({ id: t, data: l }) => {
673
751
  /* @__PURE__ */ e("span", { className: "ff-text-dark ff-text-truncate", style: { fontFamily: "monospace", fontSize: 11 }, title: h, children: h })
674
752
  ] }) : /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "Not configured" }) })
675
753
  ] }),
676
- /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 } })
754
+ /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } })
677
755
  ] });
678
- }, He = {
756
+ }, Ge = {
679
757
  eq: "=",
680
758
  neq: "≠",
681
759
  gt: ">",
@@ -687,14 +765,14 @@ const je = ({ id: t, data: l }) => {
687
765
  endsWith: "ends with",
688
766
  isEmpty: "is empty",
689
767
  isNotEmpty: "is not empty"
690
- }, Oe = ({ id: t, data: l }) => {
691
- const { onEditNode: f, onDeleteNode: p } = E(), { title: s = "Condition Branch", branchConfigs: r = [], defaultBranch: h } = l, o = r.length > 0;
768
+ }, Ve = ({ id: t, data: i }) => {
769
+ const { onEditNode: f, onDeleteNode: a } = E(), { title: s = "Condition Branch", branchConfigs: r = [], defaultBranch: h } = i, o = r.length > 0;
692
770
  return /* @__PURE__ */ n("div", { style: { width: F }, children: [
693
- /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
771
+ /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
694
772
  /* @__PURE__ */ n("div", { style: { border: "1.5px solid #b39ddb", borderRadius: 8, background: "#fff" }, children: [
695
773
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2 ff-mb-1", children: [
696
774
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
697
- /* @__PURE__ */ e("div", { style: { width: 25, height: 25, borderRadius: 6, background: "rgba(103,58,183,0.1)", display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(be, { size: 16, color: "#512da8" }) }),
775
+ /* @__PURE__ */ e("div", { style: { width: 25, height: 25, borderRadius: 6, background: "rgba(103,58,183,0.1)", display: "flex", alignItems: "center", justifyContent: "center" }, children: /* @__PURE__ */ e(Ne, { size: 16, color: "#512da8" }) }),
698
776
  /* @__PURE__ */ e("span", { className: "ff-fw-medium ff-text-dark", style: { fontSize: 14 }, children: s })
699
777
  ] }),
700
778
  /* @__PURE__ */ n("div", { className: "node-actions ff-d-flex ff-align-items-center", children: [
@@ -703,11 +781,11 @@ const je = ({ id: t, data: l }) => {
703
781
  {
704
782
  role: "button",
705
783
  tabIndex: 0,
706
- onClick: (i) => {
707
- i.stopPropagation(), f(t);
784
+ onClick: (l) => {
785
+ l.stopPropagation(), f(t);
708
786
  },
709
- onKeyDown: (i) => {
710
- (i.key === "Enter" || i.key === " ") && (i.stopPropagation(), f(t));
787
+ onKeyDown: (l) => {
788
+ (l.key === "Enter" || l.key === " ") && (l.stopPropagation(), f(t));
711
789
  },
712
790
  children: /* @__PURE__ */ e(T, { size: 16 })
713
791
  }
@@ -718,11 +796,11 @@ const je = ({ id: t, data: l }) => {
718
796
  className: "ff-ms-2",
719
797
  role: "button",
720
798
  tabIndex: 0,
721
- onClick: (i) => {
722
- i.stopPropagation(), p(t);
799
+ onClick: (l) => {
800
+ l.stopPropagation(), a(t);
723
801
  },
724
- onKeyDown: (i) => {
725
- (i.key === "Enter" || i.key === " ") && (i.stopPropagation(), p(t));
802
+ onKeyDown: (l) => {
803
+ (l.key === "Enter" || l.key === " ") && (l.stopPropagation(), a(t));
726
804
  },
727
805
  children: /* @__PURE__ */ e(P, { color: "red", size: 16 })
728
806
  }
@@ -730,19 +808,19 @@ const je = ({ id: t, data: l }) => {
730
808
  ] })
731
809
  ] }),
732
810
  /* @__PURE__ */ e("div", { className: "ff-mx-2 ff-mb-2 ff-p-2 ff-rounded", style: { background: "#fafafa", fontSize: 12 }, children: o ? /* @__PURE__ */ n("div", { style: { display: "flex", flexDirection: "column", gap: 4 }, children: [
733
- r.map((i, d) => {
734
- var a, c;
735
- const y = O[d % O.length], g = (a = i.conditions) == null ? void 0 : a[0], b = (((c = i.conditions) == null ? void 0 : c.length) ?? 0) - 1;
811
+ r.map((l, d) => {
812
+ var p, c;
813
+ const y = O[d % O.length], g = (p = l.conditions) == null ? void 0 : p[0], N = (((c = l.conditions) == null ? void 0 : c.length) ?? 0) - 1;
736
814
  return /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", gap: 6 }, children: [
737
- /* @__PURE__ */ e("span", { style: { fontSize: 10, fontWeight: 600, padding: "2px 7px", borderRadius: 10, background: y.bg, color: y.color, flexShrink: 0 }, children: i.label || i.key }),
815
+ /* @__PURE__ */ e("span", { style: { fontSize: 10, fontWeight: 600, padding: "2px 7px", borderRadius: 10, background: y.bg, color: y.color, flexShrink: 0 }, children: l.label || l.key }),
738
816
  g ? /* @__PURE__ */ n("span", { style: { fontSize: 11, color: "#616161", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" }, children: [
739
817
  g.field,
740
818
  " ",
741
- He[g.operator] ?? g.operator,
819
+ Ge[g.operator] ?? g.operator,
742
820
  g.value ? ` ${g.value}` : "",
743
- b > 0 ? ` +${b} more` : ""
821
+ N > 0 ? ` +${N} more` : ""
744
822
  ] }) : /* @__PURE__ */ e("span", { style: { fontSize: 11, color: "#9e9e9e" }, children: "No conditions yet" })
745
- ] }, i.key);
823
+ ] }, l.key);
746
824
  }),
747
825
  h && /* @__PURE__ */ n("div", { style: { display: "flex", alignItems: "center", gap: 6, marginTop: 2 }, children: [
748
826
  /* @__PURE__ */ e("span", { style: { fontSize: 10, fontWeight: 600, padding: "2px 7px", borderRadius: 10, background: "#f5f5f5", color: "#757575", flexShrink: 0 }, children: "Default" }),
@@ -750,15 +828,15 @@ const je = ({ id: t, data: l }) => {
750
828
  ] })
751
829
  ] }) : /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "Not configured — click edit to add branches" }) })
752
830
  ] }),
753
- /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 } })
831
+ /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } })
754
832
  ] });
755
- }, Ue = ({ id: t, data: l }) => {
756
- var a;
757
- const { onEditNode: f, onDeleteNode: p, nodeRegistry: s } = E(), { title: r = "Sub-Workflow", workflowId: h, workflowLabel: o, descriptorType: i, onPreview: d } = l, y = i ? (a = s == null ? void 0 : s.forType(i)) == null ? void 0 : a.icon : /* @__PURE__ */ e(xe, { size: 16, color: "#00695c" }), g = !!h, b = (c) => {
833
+ }, qe = ({ id: t, data: i }) => {
834
+ var p;
835
+ const { onEditNode: f, onDeleteNode: a, nodeRegistry: s } = E(), { title: r = "Sub-Workflow", workflowId: h, workflowLabel: o, descriptorType: l, onPreview: d } = i, y = l ? (p = s == null ? void 0 : s.forType(l)) == null ? void 0 : p.icon : /* @__PURE__ */ e(ke, { size: 16, color: "#00695c" }), g = !!h, N = (c) => {
758
836
  c.stopPropagation(), h && d && d(h);
759
837
  };
760
838
  return /* @__PURE__ */ n("div", { style: { width: F }, children: [
761
- /* @__PURE__ */ e(x, { type: "target", position: N.Top, style: { opacity: 0 } }),
839
+ /* @__PURE__ */ e(b, { type: "target", position: x.Top, style: { opacity: 0 } }),
762
840
  /* @__PURE__ */ n("div", { style: { border: "1.5px solid #80cbc4", borderRadius: 8, background: "#fff" }, children: [
763
841
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-justify-content-between ff-align-items-center ff-mx-2 ff-mt-2 ff-mb-1", children: [
764
842
  /* @__PURE__ */ n("div", { className: "ff-d-flex ff-align-items-center ff-gap-2", children: [
@@ -787,10 +865,10 @@ const je = ({ id: t, data: l }) => {
787
865
  role: "button",
788
866
  tabIndex: 0,
789
867
  onClick: (c) => {
790
- c.stopPropagation(), p(t);
868
+ c.stopPropagation(), a(t);
791
869
  },
792
870
  onKeyDown: (c) => {
793
- (c.key === "Enter" || c.key === " ") && (c.stopPropagation(), p(t));
871
+ (c.key === "Enter" || c.key === " ") && (c.stopPropagation(), a(t));
794
872
  },
795
873
  children: /* @__PURE__ */ e(P, { color: "red", size: 16 })
796
874
  }
@@ -810,73 +888,74 @@ const je = ({ id: t, data: l }) => {
810
888
  {
811
889
  role: "button",
812
890
  tabIndex: 0,
813
- onClick: b,
891
+ onClick: N,
814
892
  onKeyDown: (c) => {
815
- (c.key === "Enter" || c.key === " ") && b(c);
893
+ (c.key === "Enter" || c.key === " ") && N(c);
816
894
  },
817
895
  style: { cursor: "pointer", display: "flex", alignItems: "center", gap: 3, fontSize: 11, color: "#00897b" },
818
896
  children: [
819
- /* @__PURE__ */ e(Ne, { size: 13 }),
897
+ /* @__PURE__ */ e(ve, { size: 13 }),
820
898
  "Preview"
821
899
  ]
822
900
  }
823
901
  )
824
902
  ] }) : /* @__PURE__ */ e("span", { className: "ff-text-muted", children: "Not configured — select a workflow" }) })
825
903
  ] }),
826
- /* @__PURE__ */ e(x, { type: "source", position: N.Bottom, style: { opacity: 0 } })
904
+ /* @__PURE__ */ e(b, { type: "source", position: x.Bottom, style: { opacity: 0 } })
827
905
  ] });
828
- }, rt = {
906
+ }, ct = {
829
907
  startNode: Ce,
830
908
  endNode: Te,
831
909
  addTriggerNode: ze,
832
910
  addStepNode: Ie,
833
- triggerNode: Ae,
834
- filterNode: Le,
835
- actionNode: Fe,
836
- approvalNode: We,
837
- delayNode: Re,
838
- notificationNode: je,
839
- webhookTriggerNode: Ke,
840
- restApiNode: _e,
841
- conditionBranchNode: Oe,
842
- subWorkflowNode: Ue
843
- }, Ge = 11.5, q = 2, W = 6, Z = 40, Y = 20, J = 4, st = ({
911
+ triggerNode: De,
912
+ eventNode: We,
913
+ filterNode: Fe,
914
+ actionNode: $e,
915
+ approvalNode: Be,
916
+ delayNode: _e,
917
+ notificationNode: Ue,
918
+ webhookTriggerNode: Oe,
919
+ restApiNode: He,
920
+ conditionBranchNode: Ve,
921
+ subWorkflowNode: qe
922
+ }, Ze = 11.5, q = 2, $ = 6, Z = 40, Y = 20, J = 4, dt = ({
844
923
  id: t,
845
- sourceX: l,
924
+ sourceX: i,
846
925
  sourceY: f,
847
- targetX: p,
926
+ targetX: a,
848
927
  targetY: s,
849
928
  sourcePosition: r,
850
929
  targetPosition: h,
851
930
  source: o,
852
- target: i,
931
+ target: l,
853
932
  data: d
854
933
  }) => {
855
- const [y, g, b] = j({
856
- sourceX: l,
934
+ const [y, g, N] = M({
935
+ sourceX: i,
857
936
  sourceY: f,
858
- targetX: p,
937
+ targetX: a,
859
938
  targetY: s
860
- }), a = d == null ? void 0 : d.label, c = a === "Pass", v = c || a === "Fail", u = l + (p - l) / 3, w = f + (s - f) / 3, k = l + 2 * (p - l) / 3, I = f + 2 * (s - f) / 3, m = d == null ? void 0 : d.onAddStepClick, z = (A) => {
861
- if (A.stopPropagation(), typeof m != "function") return;
862
- const le = {
939
+ }), p = d == null ? void 0 : d.label, c = p === "Pass", v = c || p === "Fail", u = i + (a - i) / 3, w = f + (s - f) / 3, k = i + 2 * (a - i) / 3, I = f + 2 * (s - f) / 3, m = d == null ? void 0 : d.onAddStepClick, z = (L) => {
940
+ if (L.stopPropagation(), typeof m != "function") return;
941
+ const fe = {
863
942
  edgeId: t,
864
943
  nodeId: o,
865
944
  sourceNodeId: o,
866
- targetNodeId: i,
945
+ targetNodeId: l,
867
946
  position: "between",
868
947
  referenceNodeId: o,
869
948
  referenceNodeType: d == null ? void 0 : d.referenceNodeType,
870
949
  stepVisibility: d == null ? void 0 : d.stepVisibility
871
950
  };
872
- m(o, le);
873
- }, D = (A) => {
874
- (A.key === "Enter" || A.key === " ") && (A.preventDefault(), z(A));
875
- }, C = () => /* @__PURE__ */ n(M, { children: [
951
+ m(o, fe);
952
+ }, D = (L) => {
953
+ (L.key === "Enter" || L.key === " ") && (L.preventDefault(), z(L));
954
+ }, C = () => /* @__PURE__ */ n(R, { children: [
876
955
  /* @__PURE__ */ n("g", { className: "plus-icon-container", children: [
877
- /* @__PURE__ */ e("circle", { r: Ge, className: "edge-plus-circle" }),
878
- /* @__PURE__ */ e("line", { x1: 0, y1: -W, x2: 0, y2: W, strokeWidth: q, strokeLinecap: "round", className: "plus-line" }),
879
- /* @__PURE__ */ e("line", { x1: -W, y1: 0, x2: W, y2: 0, strokeWidth: q, strokeLinecap: "round", className: "plus-line" })
956
+ /* @__PURE__ */ e("circle", { r: Ze, className: "edge-plus-circle" }),
957
+ /* @__PURE__ */ e("line", { x1: 0, y1: -$, x2: 0, y2: $, strokeWidth: q, strokeLinecap: "round", className: "plus-line" }),
958
+ /* @__PURE__ */ e("line", { x1: -$, y1: 0, x2: $, y2: 0, strokeWidth: q, strokeLinecap: "round", className: "plus-line" })
880
959
  ] }),
881
960
  /* @__PURE__ */ n("g", { className: "edge-plus-tooltip", transform: "translate(18, 0)", children: [
882
961
  /* @__PURE__ */ e("rect", { x: 0, y: -10, width: 65, height: 20, rx: 4, className: "tooltip-bg" }),
@@ -894,30 +973,30 @@ const je = ({ id: t, data: l }) => {
894
973
  };
895
974
  return /* @__PURE__ */ n("g", { className: "edge-with-plus-wrapper", children: [
896
975
  /* @__PURE__ */ e(K, { id: t, path: y }),
897
- v ? /* @__PURE__ */ n(M, { children: [
976
+ v ? /* @__PURE__ */ n(R, { children: [
898
977
  /* @__PURE__ */ n("g", { transform: `translate(${u}, ${w})`, children: [
899
978
  /* @__PURE__ */ e("rect", { x: -Z / 2, y: -Y / 2, width: Z, height: Y, rx: J, ry: J, fill: c ? "#ADE6C5" : "#FDBFBF" }),
900
- /* @__PURE__ */ e("text", { textAnchor: "middle", dominantBaseline: "central", fill: c ? "#1DBF60" : "#C50000", style: { fontSize: 12, fontWeight: 500 }, children: a })
979
+ /* @__PURE__ */ e("text", { textAnchor: "middle", dominantBaseline: "central", fill: c ? "#1DBF60" : "#C50000", style: { fontSize: 12, fontWeight: 500 }, children: p })
901
980
  ] }),
902
981
  /* @__PURE__ */ e("g", { className: "nodrag nopan edge-plus-svg", transform: `translate(${k}, ${I})`, "data-testid": "plus-node-icon", ...S, children: /* @__PURE__ */ e(C, {}) })
903
- ] }) : /* @__PURE__ */ e("g", { className: "nodrag nopan edge-plus-svg", transform: `translate(${g}, ${b})`, "data-testid": "plus-node-icon", ...S, children: /* @__PURE__ */ e(C, {}) })
982
+ ] }) : /* @__PURE__ */ e("g", { className: "nodrag nopan edge-plus-svg", transform: `translate(${g}, ${N})`, "data-testid": "plus-node-icon", ...S, children: /* @__PURE__ */ e(C, {}) })
904
983
  ] });
905
- }, Ve = 11.5, Q = 2, R = 6, ft = ({
984
+ }, Ye = 11.5, Q = 2, B = 6, at = ({
906
985
  id: t,
907
- sourceX: l,
986
+ sourceX: i,
908
987
  sourceY: f,
909
- targetX: p,
988
+ targetX: a,
910
989
  targetY: s,
911
990
  source: r,
912
991
  target: h,
913
992
  data: o
914
993
  }) => {
915
- const [i, d, y] = j({
916
- sourceX: l,
994
+ const [l, d, y] = M({
995
+ sourceX: i,
917
996
  sourceY: f,
918
- targetX: p,
997
+ targetX: a,
919
998
  targetY: s
920
- }), g = o == null ? void 0 : o.onAddStepClick, b = (c) => {
999
+ }), g = o == null ? void 0 : o.onAddStepClick, N = (c) => {
921
1000
  c.stopPropagation(), typeof g == "function" && g(r, {
922
1001
  edgeId: t,
923
1002
  nodeId: r,
@@ -930,11 +1009,11 @@ const je = ({ id: t, data: l }) => {
930
1009
  filterId: o == null ? void 0 : o.filterId,
931
1010
  branch: o == null ? void 0 : o.branch
932
1011
  });
933
- }, a = (c) => {
934
- (c.key === "Enter" || c.key === " ") && (c.preventDefault(), b(c));
1012
+ }, p = (c) => {
1013
+ (c.key === "Enter" || c.key === " ") && (c.preventDefault(), N(c));
935
1014
  };
936
1015
  return /* @__PURE__ */ n("g", { className: "edge-with-plus-wrapper", children: [
937
- /* @__PURE__ */ e(K, { id: t, path: i, style: { stroke: "#b0bec5" } }),
1016
+ /* @__PURE__ */ e(K, { id: t, path: l, style: { stroke: "#b0bec5" } }),
938
1017
  /* @__PURE__ */ n(
939
1018
  "g",
940
1019
  {
@@ -945,20 +1024,20 @@ const je = ({ id: t, data: l }) => {
945
1024
  pointerEvents: "all",
946
1025
  outline: "none"
947
1026
  },
948
- onClick: g ? b : void 0,
949
- onKeyDown: g ? a : void 0,
1027
+ onClick: g ? N : void 0,
1028
+ onKeyDown: g ? p : void 0,
950
1029
  role: g ? "button" : void 0,
951
1030
  tabIndex: g ? 0 : void 0,
952
1031
  "data-testid": "plus-node-icon",
953
1032
  children: [
954
- /* @__PURE__ */ e("circle", { r: Ve, className: "edge-plus-circle" }),
1033
+ /* @__PURE__ */ e("circle", { r: Ye, className: "edge-plus-circle" }),
955
1034
  /* @__PURE__ */ e(
956
1035
  "line",
957
1036
  {
958
1037
  x1: 0,
959
- y1: -R,
1038
+ y1: -B,
960
1039
  x2: 0,
961
- y2: R,
1040
+ y2: B,
962
1041
  strokeWidth: Q,
963
1042
  strokeLinecap: "round",
964
1043
  className: "plus-line"
@@ -967,9 +1046,9 @@ const je = ({ id: t, data: l }) => {
967
1046
  /* @__PURE__ */ e(
968
1047
  "line",
969
1048
  {
970
- x1: -R,
1049
+ x1: -B,
971
1050
  y1: 0,
972
- x2: R,
1051
+ x2: B,
973
1052
  y2: 0,
974
1053
  strokeWidth: Q,
975
1054
  strokeLinecap: "round",
@@ -1006,20 +1085,20 @@ const je = ({ id: t, data: l }) => {
1006
1085
  }
1007
1086
  )
1008
1087
  ] });
1009
- }, ct = ({ id: t, sourceX: l, sourceY: f, targetX: p, targetY: s }) => {
1010
- const [r] = j({ sourceX: l, sourceY: f, targetX: p, targetY: s });
1088
+ }, pt = ({ id: t, sourceX: i, sourceY: f, targetX: a, targetY: s }) => {
1089
+ const [r] = M({ sourceX: i, sourceY: f, targetX: a, targetY: s });
1011
1090
  return /* @__PURE__ */ e(K, { id: t, path: r, style: { stroke: "#b0bec5" } });
1012
- }, qe = 11.5, X = 2, $ = 6, Ze = -24, ee = 40, te = 20, ne = 4, dt = ({
1091
+ }, Je = 11.5, X = 2, _ = 6, Qe = -24, ee = 40, te = 20, ne = 4, ht = ({
1013
1092
  id: t,
1014
- sourceX: l,
1093
+ sourceX: i,
1015
1094
  sourceY: f,
1016
- targetX: p,
1095
+ targetX: a,
1017
1096
  targetY: s,
1018
1097
  source: r,
1019
1098
  target: h,
1020
1099
  data: o
1021
1100
  }) => {
1022
- const [i, d, y] = j({ sourceX: l, sourceY: f, targetX: p, targetY: s }), g = o == null ? void 0 : o.label, b = g === "Pass", a = b || g === "Fail", c = o == null ? void 0 : o.onAddStepClick, v = (o == null ? void 0 : o.showPlus) !== !1 && !!c, u = (k) => {
1101
+ const [l, d, y] = M({ sourceX: i, sourceY: f, targetX: a, targetY: s }), g = o == null ? void 0 : o.label, N = g === "Pass", p = N || g === "Fail", c = o == null ? void 0 : o.onAddStepClick, v = (o == null ? void 0 : o.showPlus) !== !1 && !!c, u = (k) => {
1023
1102
  k.stopPropagation(), typeof c == "function" && c(r, {
1024
1103
  edgeId: t,
1025
1104
  nodeId: r,
@@ -1034,7 +1113,7 @@ const je = ({ id: t, data: l }) => {
1034
1113
  (k.key === "Enter" || k.key === " ") && (k.preventDefault(), u(k));
1035
1114
  };
1036
1115
  return /* @__PURE__ */ n("g", { className: "edge-with-plus-wrapper", children: [
1037
- /* @__PURE__ */ e(K, { id: t, path: i, style: { stroke: "#b0bec5" } }),
1116
+ /* @__PURE__ */ e(K, { id: t, path: l, style: { stroke: "#b0bec5" } }),
1038
1117
  /* @__PURE__ */ n(
1039
1118
  "g",
1040
1119
  {
@@ -1046,7 +1125,7 @@ const je = ({ id: t, data: l }) => {
1046
1125
  role: c ? "button" : void 0,
1047
1126
  tabIndex: c ? 0 : void 0,
1048
1127
  children: [
1049
- a && /* @__PURE__ */ n("g", { transform: `translate(0, ${v ? Ze : 0})`, children: [
1128
+ p && /* @__PURE__ */ n("g", { transform: `translate(0, ${v ? Qe : 0})`, children: [
1050
1129
  /* @__PURE__ */ e(
1051
1130
  "rect",
1052
1131
  {
@@ -1056,15 +1135,15 @@ const je = ({ id: t, data: l }) => {
1056
1135
  height: te,
1057
1136
  rx: ne,
1058
1137
  ry: ne,
1059
- fill: b ? "#ADE6C5" : "#FDBFBF"
1138
+ fill: N ? "#ADE6C5" : "#FDBFBF"
1060
1139
  }
1061
1140
  ),
1062
- /* @__PURE__ */ e("text", { textAnchor: "middle", dominantBaseline: "central", fill: b ? "#1DBF60" : "#C50000", style: { fontSize: 12, fontWeight: 500 }, children: g })
1141
+ /* @__PURE__ */ e("text", { textAnchor: "middle", dominantBaseline: "central", fill: N ? "#1DBF60" : "#C50000", style: { fontSize: 12, fontWeight: 500 }, children: g })
1063
1142
  ] }),
1064
1143
  v && /* @__PURE__ */ n("g", { className: "plus-icon-container", children: [
1065
- /* @__PURE__ */ e("circle", { r: qe, className: "edge-plus-circle" }),
1066
- /* @__PURE__ */ e("line", { x1: 0, y1: -$, x2: 0, y2: $, strokeWidth: X, strokeLinecap: "round", className: "plus-line" }),
1067
- /* @__PURE__ */ e("line", { x1: -$, y1: 0, x2: $, y2: 0, strokeWidth: X, strokeLinecap: "round", className: "plus-line" })
1144
+ /* @__PURE__ */ e("circle", { r: Je, className: "edge-plus-circle" }),
1145
+ /* @__PURE__ */ e("line", { x1: 0, y1: -_, x2: 0, y2: _, strokeWidth: X, strokeLinecap: "round", className: "plus-line" }),
1146
+ /* @__PURE__ */ e("line", { x1: -_, y1: 0, x2: _, y2: 0, strokeWidth: X, strokeLinecap: "round", className: "plus-line" })
1068
1147
  ] }),
1069
1148
  v && /* @__PURE__ */ n("g", { className: "edge-plus-tooltip", transform: "translate(22, 0)", children: [
1070
1149
  /* @__PURE__ */ e("rect", { x: 0, y: -10, width: 65, height: 20, rx: 4, className: "tooltip-bg" }),
@@ -1075,41 +1154,41 @@ const je = ({ id: t, data: l }) => {
1075
1154
  }
1076
1155
  )
1077
1156
  ] });
1078
- }, at = ({
1157
+ }, gt = ({
1079
1158
  id: t,
1080
- source: l,
1159
+ source: i,
1081
1160
  target: f,
1082
- sourceX: p,
1161
+ sourceX: a,
1083
1162
  sourceY: s,
1084
1163
  targetX: r,
1085
1164
  targetY: h,
1086
1165
  style: o = {},
1087
- markerEnd: i,
1166
+ markerEnd: l,
1088
1167
  data: d
1089
1168
  }) => {
1090
- const y = (d == null ? void 0 : d.verticalRouting) ?? !1, g = 30, b = y ? (() => {
1169
+ const y = (d == null ? void 0 : d.verticalRouting) ?? !1, g = 30, N = y ? (() => {
1091
1170
  const S = h - g;
1092
- return `M ${p},${S} L ${r},${S} L ${r},${h}`;
1171
+ return `M ${a},${S} L ${r},${S} L ${r},${h}`;
1093
1172
  })() : (() => {
1094
1173
  const S = s + 30;
1095
- return `M ${p},${s} L ${p},${S} L ${r},${S} L ${r},${h}`;
1096
- })(), a = o.stroke || "#d1d5db", c = d == null ? void 0 : d.label, v = (d == null ? void 0 : d.isFirst) ?? !1, u = d == null ? void 0 : d.onAddStepClick, w = y ? h - g : s + 30, k = p + (r - p) * (y ? 0.25 : 0.35), I = p + (r - p) * (y ? 0.65 : 0.7), m = w, z = (S) => {
1097
- S.stopPropagation(), u && u(l, {
1174
+ return `M ${a},${s} L ${a},${S} L ${r},${S} L ${r},${h}`;
1175
+ })(), p = o.stroke || "#d1d5db", c = d == null ? void 0 : d.label, v = (d == null ? void 0 : d.isFirst) ?? !1, u = d == null ? void 0 : d.onAddStepClick, w = y ? h - g : s + 30, k = a + (r - a) * (y ? 0.25 : 0.35), I = a + (r - a) * (y ? 0.65 : 0.7), m = w, z = (S) => {
1176
+ S.stopPropagation(), u && u(i, {
1098
1177
  edgeId: t,
1099
- nodeId: l,
1100
- sourceNodeId: l,
1178
+ nodeId: i,
1179
+ sourceNodeId: i,
1101
1180
  targetNodeId: f,
1102
1181
  position: "between",
1103
- referenceNodeId: l,
1182
+ referenceNodeId: i,
1104
1183
  filterId: d == null ? void 0 : d.filterId,
1105
1184
  branch: d == null ? void 0 : d.branch
1106
1185
  });
1107
1186
  }, D = 11.5, C = 6;
1108
1187
  return /* @__PURE__ */ n("g", { children: [
1109
- /* @__PURE__ */ e("path", { id: t, d: b, fill: "none", stroke: a, strokeWidth: 1.5, markerEnd: i }),
1188
+ /* @__PURE__ */ e("path", { id: t, d: N, fill: "none", stroke: p, strokeWidth: 1.5, markerEnd: l }),
1110
1189
  c && !y && /* @__PURE__ */ e("g", { transform: `translate(${k}, ${m})`, children: (() => {
1111
1190
  const S = Math.max(44, c.length * 7 + 20);
1112
- return /* @__PURE__ */ n(M, { children: [
1191
+ return /* @__PURE__ */ n(R, { children: [
1113
1192
  /* @__PURE__ */ e(
1114
1193
  "rect",
1115
1194
  {
@@ -1155,22 +1234,22 @@ const je = ({ id: t, data: l }) => {
1155
1234
  ] });
1156
1235
  };
1157
1236
  export {
1158
- Fe as A,
1159
- Re as D,
1160
- st as E,
1161
- Le as F,
1162
- at as G,
1163
- dt as L,
1164
- je as N,
1165
- ct as P,
1166
- _e as R,
1237
+ $e as A,
1238
+ _e as D,
1239
+ dt as E,
1240
+ Fe as F,
1241
+ gt as G,
1242
+ ht as L,
1243
+ Ue as N,
1244
+ pt as P,
1245
+ He as R,
1167
1246
  Ce as S,
1168
- Ae as T,
1169
- Ke as W,
1247
+ De as T,
1248
+ Oe as W,
1170
1249
  ze as a,
1171
- We as b,
1250
+ Be as b,
1172
1251
  Te as c,
1173
- ft as d,
1174
- rt as e,
1252
+ at as d,
1253
+ ct as e,
1175
1254
  Ee as f
1176
1255
  };