@notmrabhi/flowforge 0.1.37 → 0.1.39

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