@oomol-lab/open-flow 0.1.0-beta.3 → 0.1.0-beta.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/dist/browser/DesignerIcon-XKBRy_0Q.js +2066 -0
  2. package/dist/browser/{createResourceDialog-BkZns-oZ.js → createResourceDialog-Cf7QpXp6.js} +161 -160
  3. package/dist/browser/{dist-BMqL-qR5.js → dist-BMRLCebL.js} +291 -292
  4. package/dist/browser/{dist-DWADUsVB.js → dist-By46o5UV.js} +47 -47
  5. package/dist/browser/{dist-CJpzJrLM.js → dist-Cc0y2Pli.js} +811 -812
  6. package/dist/browser/{dist-DUzA0Ukh.js → dist-Dg_VXC8f.js} +134 -135
  7. package/dist/browser/{dist-3Mj8q8Pr.js → dist-DmuE3M0R.js} +53 -54
  8. package/dist/browser/{dist-BN4ZCyOB.js → dist-DpDLsYtO.js} +14 -15
  9. package/dist/browser/dist-DxahK_I8.js +2688 -0
  10. package/dist/browser/{dist-CPuF50D9.js → dist-meg_oHVR.js} +335 -335
  11. package/dist/browser/{esm-C2UUqIUP.js → esm-xWDFFpGd.js} +5 -6
  12. package/dist/browser/flow-authoring-module.d.ts +2 -2
  13. package/dist/browser/flow-authoring-node.d.ts +5 -2
  14. package/dist/browser/flow-authoring.d.ts +1 -1
  15. package/dist/browser/flow-authoring.js +489 -209
  16. package/dist/browser/flow-change.d.ts +110 -9
  17. package/dist/browser/flow-change.js +319 -96
  18. package/dist/browser/flow-notifications.d.ts +5 -0
  19. package/dist/browser/{diagnostics-SDCyFuxm.js → flowChanges-CeMiiZIO.js} +4234 -3825
  20. package/dist/browser/{flowRunInputEditorStore-CwvOiIiU.js → flowRunInputEditorStore-DDidwd8h.js} +10 -2
  21. package/dist/browser/{flowWorkspace-BZ_eiQNR.js → flowWorkspace-VnS8nLMT.js} +35268 -35081
  22. package/dist/browser/{getPseudoElementBounds-ESJExRFX.js → getPseudoElementBounds-5LArT6Xc.js} +1827 -2322
  23. package/dist/browser/icons-CRxvozBE.js +726 -0
  24. package/dist/browser/{typeScriptSession-mPCiA9sV.js → typeScriptSession-Bj2HDFRd.js} +256 -257
  25. package/dist/browser/waitNotificationInputs-ClCAEIAM.js +26 -0
  26. package/dist/browser/workbench.css +1 -1
  27. package/dist/browser/workbench.d.ts +1 -0
  28. package/dist/browser/workbench.js +851 -840
  29. package/dist/browser/{workbenchSelect-B2s1HV-Y.js → workbenchSelect-Cf1zlVm9.js} +479 -478
  30. package/dist/common/control-api-conformance.d.ts +1 -0
  31. package/dist/common/control-api-conformance.js +80 -19
  32. package/dist/common/control-api-errors.d.ts +4 -0
  33. package/dist/common/control-api.d.ts +26 -14
  34. package/dist/common/control-api.js +138 -89
  35. package/dist/common/flow-encoding.js +20 -8
  36. package/dist/common/flow-notifications.d.ts +5 -0
  37. package/dist/common/flow-semantics.d.ts +1 -0
  38. package/dist/common/flow-semantics.js +467 -381
  39. package/dist/common/run-events.js +2 -1
  40. package/dist/common/run-lifecycle.d.ts +17 -2
  41. package/dist/common/run-lifecycle.js +53 -2
  42. package/dist/common/scheduler.d.ts +64 -3
  43. package/dist/common/scheduler.js +417 -142
  44. package/dist/index.d.ts +1 -0
  45. package/package.json +1 -1
  46. package/dist/browser/dist-BpopSHwP.js +0 -1543
  47. package/dist/browser/dist-CUSrALSX.js +0 -1620
@@ -1,13 +1,14 @@
1
1
  import { a as e, f as t, i as n } from "./dist-C46JByB-.js";
2
2
  import { a as r, i, s as a, t as o } from "./main-DmjVyuWr.js";
3
- import { At as s, It as c, Jn as l, Kn as u, Mt as d, Ot as f, Qn as p, Xn as m, Yn as h, Zn as g, er as _, jt as v } from "./getPseudoElementBounds-ESJExRFX.js";
4
- import { A as y, At as b, B as x, C as S, D as C, Dt as ee, E as te, Et as ne, Ft as w, G as re, H as ie, It as T, J as ae, K as E, L as D, M as O, Mt as oe, N as k, Nt as se, O as A, Ot as ce, P as j, Pt as le, Rt as ue, S as de, Tt as M, U as fe, V as N, W as pe, _ as me, a as P, b as he, c as ge, d as F, f as _e, g as ve, h as ye, i as be, j as I, jt as L, kt as R, l as xe, m as Se, n as Ce, p as we, q as Te, s as Ee, t as De, u as Oe, v as ke, w as Ae, wt as je, x as Me, y as Ne, z, zt as B } from "./diagnostics-SDCyFuxm.js";
5
- import { t as Pe } from "./workbenchSelect-B2s1HV-Y.js";
6
- import { a as V, i as Fe, n as Ie, r as Le } from "./languages-DgJehE1g.js";
7
- import { Suspense as Re, lazy as ze, useEffect as H, useRef as Be, useState as U } from "react";
8
- import { Fragment as Ve, jsx as W, jsxs as G } from "react/jsx-runtime";
3
+ import { Un as s, Vn as c, jt as l } from "./getPseudoElementBounds-5LArT6Xc.js";
4
+ import { a as u, c as d, d as f, f as p, i as m, n as h, o as g, p as _, t as v, u as y } from "./icons-CRxvozBE.js";
5
+ import { t as b } from "./workbenchSelect-Cf1zlVm9.js";
6
+ import { $ as x, A as S, C as ee, D as C, E as w, F as T, G as E, H as D, I as O, J as k, M as A, N as j, O as M, P as N, Q as P, S as F, U as I, V as L, W as te, X as ne, Y as re, Z as ie, _ as ae, a as oe, at as se, b as ce, c as le, ct as ue, d as de, dt as fe, et as pe, f as me, ft as R, g as he, h as ge, i as _e, it as ve, j as z, l as ye, lt as be, m as xe, mt as B, n as V, nt as Se, o as Ce, ot as we, p as Te, pt as Ee, q as De, rt as Oe, s as ke, st as Ae, t as je, tt as H, u as Me, ut as U, v as Ne, w as Pe, x as Fe, y as Ie, z as Le } from "./flowChanges-CeMiiZIO.js";
7
+ import { a as Re, i as ze, n as Be, r as Ve } from "./languages-DgJehE1g.js";
8
+ import { Suspense as He, lazy as Ue, useEffect as W, useRef as We, useState as G } from "react";
9
+ import { Fragment as Ge, jsx as K, jsxs as q } from "react/jsx-runtime";
9
10
  //#region src/workbench/browser/runtime/navigation.ts
10
- var He = class {
11
+ var Ke = class {
11
12
  #e;
12
13
  #t;
13
14
  #n;
@@ -66,7 +67,7 @@ var He = class {
66
67
  this.#s = !0, await this.#n.selectFlow(void 0), e == this.#i && (this.#u("design", !1), this.#s = !1);
67
68
  }
68
69
  async apply(e) {
69
- if (Ue(e, this.#t)) return;
70
+ if (qe(e, this.#t)) return;
70
71
  this.#t = e;
71
72
  let t = ++this.#i;
72
73
  this.#s = !0;
@@ -82,49 +83,49 @@ var He = class {
82
83
  flowId: this.#n.workspace.$.flowId.value,
83
84
  view: e
84
85
  };
85
- Ue(n, this.#t) || (this.#t = n, this.#e(n, { replace: t })), this.#r.set(e);
86
+ qe(n, this.#t) || (this.#t = n, this.#e(n, { replace: t })), this.#r.set(e);
86
87
  }
87
88
  };
88
- function Ue(e, t) {
89
+ function qe(e, t) {
89
90
  return e.flowId == t.flowId && e.view == t.view;
90
91
  }
91
92
  //#endregion
92
93
  //#region src/workbench/browser/runtime/shell/resourceBrowser.tsx
93
- var We = ze(() => import("./createResourceDialog-BkZns-oZ.js")), Ge = V.map((e) => ({
94
- label: Fe[e],
94
+ var Je = Ue(() => import("./createResourceDialog-Cf7QpXp6.js")), Ye = Re.map((e) => ({
95
+ label: ze[e],
95
96
  value: e
96
97
  }));
97
- function Ke({ language: e, onLanguageChange: t }) {
98
- let n = r(), [i, a] = U(null);
99
- return t == null ? null : /* @__PURE__ */ G("div", {
98
+ function Xe({ language: e, onLanguageChange: t }) {
99
+ let n = r(), [i, a] = G(null);
100
+ return t == null ? null : /* @__PURE__ */ q("div", {
100
101
  className: "resource-language",
101
102
  ref: a,
102
- children: [/* @__PURE__ */ W("span", {
103
+ children: [/* @__PURE__ */ K("span", {
103
104
  className: "sr-only",
104
105
  children: n("language.label")
105
- }), /* @__PURE__ */ W(Pe, {
106
+ }), /* @__PURE__ */ K(b, {
106
107
  ariaLabel: n("language.label"),
107
108
  onValueChange: (e) => t(e),
108
- options: Ge,
109
+ options: Ye,
109
110
  portalRoot: i,
110
111
  value: e
111
112
  })]
112
113
  });
113
114
  }
114
- function qe({ badge: e, busy: t, flow: n, href: a, onSelect: o, store: s }) {
115
- let l = i(), u = r(), [d, m] = U("idle"), [h, y] = U(n.name), b = v(h);
115
+ function Ze({ badge: e, busy: t, flow: n, href: a, onSelect: o, store: d }) {
116
+ let f = i(), p = r(), [m, h] = G("idle"), [g, y] = G(n.name), b = u(g);
116
117
  async function x(e) {
117
118
  e.preventDefault();
118
- let t = h.trim();
119
- v(t) == null && await s.workspace.renameFlow(n.flowId, t) && m("idle");
119
+ let t = g.trim();
120
+ u(t) == null && await d.workspace.renameFlow(n.flowId, t) && h("idle");
120
121
  }
121
122
  async function S() {
122
- await s.workspace.deleteFlow(n.flowId) && m("idle");
123
+ await d.workspace.deleteFlow(n.flowId) && h("idle");
123
124
  }
124
- return /* @__PURE__ */ G("div", {
125
+ return /* @__PURE__ */ q("div", {
125
126
  className: "resource-item-row",
126
127
  children: [
127
- /* @__PURE__ */ G(p, {
128
+ /* @__PURE__ */ q(c, {
128
129
  "aria-disabled": n.status == "retiring",
129
130
  className: "resource-list-row flow-columns",
130
131
  nativeButton: !1,
@@ -133,310 +134,307 @@ function qe({ badge: e, busy: t, flow: n, href: a, onSelect: o, store: s }) {
133
134
  e.preventDefault();
134
135
  return;
135
136
  }
136
- je(e, () => o(n));
137
+ pe(e, () => o(n));
137
138
  },
138
- render: /* @__PURE__ */ W("a", { href: n.status == "retiring" ? void 0 : a }),
139
+ render: /* @__PURE__ */ K("a", { href: n.status == "retiring" ? void 0 : a }),
139
140
  tabIndex: n.status == "retiring" ? -1 : void 0,
140
141
  variant: "ghost",
141
142
  children: [
142
- /* @__PURE__ */ G("span", {
143
+ /* @__PURE__ */ q("span", {
143
144
  className: "resource-primary-cell",
144
- children: [/* @__PURE__ */ W("span", {
145
+ children: [/* @__PURE__ */ K("span", {
145
146
  className: "resource-icon",
146
- children: /* @__PURE__ */ W(f, { name: "flow" })
147
- }), /* @__PURE__ */ G("span", { children: [/* @__PURE__ */ G("span", {
147
+ children: /* @__PURE__ */ K(v, { name: "flow" })
148
+ }), /* @__PURE__ */ q("span", { children: [/* @__PURE__ */ q("span", {
148
149
  className: "flex min-w-0 items-center gap-2",
149
- children: [/* @__PURE__ */ W("strong", {
150
+ children: [/* @__PURE__ */ K("strong", {
150
151
  className: "min-w-0 truncate",
151
152
  children: n.name
152
- }), e != null && /* @__PURE__ */ W(w, {
153
+ }), e != null && /* @__PURE__ */ K(fe, {
153
154
  className: "min-w-0 shrink",
154
155
  title: e,
155
156
  variant: "secondary",
156
- children: /* @__PURE__ */ W("span", {
157
+ children: /* @__PURE__ */ K("span", {
157
158
  className: "truncate",
158
159
  children: e
159
160
  })
160
161
  })]
161
- }), /* @__PURE__ */ W("code", {
162
+ }), /* @__PURE__ */ K("code", {
162
163
  translate: "no",
163
164
  children: n.flowId
164
165
  })] })]
165
166
  }),
166
- /* @__PURE__ */ W("time", {
167
+ /* @__PURE__ */ K("time", {
167
168
  dateTime: n.updatedAt,
168
- children: new Date(n.updatedAt).toLocaleString(l)
169
+ children: new Date(n.updatedAt).toLocaleString(f)
169
170
  }),
170
- /* @__PURE__ */ G("span", {
171
+ /* @__PURE__ */ q("span", {
171
172
  className: `resource-status ${n.status == "active" ? "active" : "warning"}`,
172
- children: [/* @__PURE__ */ W("span", {
173
+ children: [/* @__PURE__ */ K("span", {
173
174
  "aria-hidden": "true",
174
175
  className: `status-dot ${n.status == "active" ? "success" : "running"}`
175
- }), u(n.status == "active" ? "resource.active" : "resource.retiring")]
176
+ }), p(n.status == "active" ? "resource.active" : "resource.retiring")]
176
177
  })
177
178
  ]
178
179
  }),
179
- n.status == "active" && /* @__PURE__ */ W(p, {
180
- "aria-expanded": d != "idle",
181
- "aria-label": u("sidebar.flowActions", { name: n.name }),
182
- className: _("resource-row-more", d != "idle" && "active"),
180
+ n.status == "active" && /* @__PURE__ */ K(c, {
181
+ "aria-expanded": m != "idle",
182
+ "aria-label": p("sidebar.flowActions", { name: n.name }),
183
+ className: s("resource-row-more", m != "idle" && "active"),
183
184
  disabled: t != null,
184
- onClick: () => m(d == "idle" ? "actions" : "idle"),
185
+ onClick: () => h(m == "idle" ? "actions" : "idle"),
185
186
  size: "icon-sm",
186
187
  variant: "ghost",
187
- children: /* @__PURE__ */ W(f, { name: "more" })
188
+ children: /* @__PURE__ */ K(v, { name: "more" })
188
189
  }),
189
- d == "actions" && /* @__PURE__ */ G("div", {
190
+ m == "actions" && /* @__PURE__ */ q("div", {
190
191
  className: "resource-row-actions",
191
- children: [/* @__PURE__ */ W(p, {
192
+ children: [/* @__PURE__ */ K(c, {
192
193
  onClick: () => {
193
- y(n.name), m("rename");
194
+ y(n.name), h("rename");
194
195
  },
195
196
  size: "sm",
196
197
  variant: "outline",
197
- children: u("common.rename")
198
- }), /* @__PURE__ */ W(p, {
199
- onClick: () => m("delete"),
198
+ children: p("common.rename")
199
+ }), /* @__PURE__ */ K(c, {
200
+ onClick: () => h("delete"),
200
201
  size: "sm",
201
202
  variant: "destructive",
202
- children: u("common.delete")
203
+ children: p("common.delete")
203
204
  })]
204
205
  }),
205
- d == "rename" && /* @__PURE__ */ G("form", {
206
+ m == "rename" && /* @__PURE__ */ q("form", {
206
207
  className: "resource-row-form",
207
208
  onSubmit: (e) => void x(e),
208
209
  children: [
209
- /* @__PURE__ */ W(g, {
210
+ /* @__PURE__ */ K(_, {
210
211
  htmlFor: `rename-flow-${n.flowId}`,
211
- children: u("sidebar.renameFlow", { name: n.name })
212
+ children: p("sidebar.renameFlow", { name: n.name })
212
213
  }),
213
- /* @__PURE__ */ G("span", {
214
+ /* @__PURE__ */ q("span", {
214
215
  className: "resource-row-field",
215
- children: [/* @__PURE__ */ W(c, {
216
+ children: [/* @__PURE__ */ K(l, {
216
217
  autoComplete: "off",
217
- "aria-invalid": h.length > 0 && b != null,
218
+ "aria-invalid": g.length > 0 && b != null,
218
219
  autoFocus: !0,
219
220
  id: `rename-flow-${n.flowId}`,
220
221
  name: "flow-name",
221
222
  onChange: (e) => y(e.target.value),
222
223
  required: !0,
223
- value: h
224
- }), h.length > 0 && b != null && /* @__PURE__ */ W("small", {
224
+ value: g
225
+ }), g.length > 0 && b != null && /* @__PURE__ */ K("small", {
225
226
  className: "resource-name-message error",
226
- children: u(`resource.nameIssue.${b}`, { max: 80 })
227
+ children: p(`resource.nameIssue.${b}`, { max: 80 })
227
228
  })]
228
229
  }),
229
- /* @__PURE__ */ G("div", { children: [/* @__PURE__ */ W(p, {
230
- onClick: () => m("idle"),
230
+ /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K(c, {
231
+ onClick: () => h("idle"),
231
232
  size: "sm",
232
233
  variant: "outline",
233
- children: u("common.cancel")
234
- }), /* @__PURE__ */ W(p, {
234
+ children: p("common.cancel")
235
+ }), /* @__PURE__ */ K(c, {
235
236
  disabled: t != null || b != null,
236
237
  size: "sm",
237
238
  type: "submit",
238
- children: u("common.save")
239
+ children: p("common.save")
239
240
  })] })
240
241
  ]
241
242
  }),
242
- d == "delete" && /* @__PURE__ */ G("div", {
243
+ m == "delete" && /* @__PURE__ */ q("div", {
243
244
  className: "resource-row-confirm",
244
245
  role: "group",
245
- "aria-label": u("sidebar.deleteFlow", { name: n.name }),
246
- children: [/* @__PURE__ */ W("span", { children: /* @__PURE__ */ W("strong", { children: u("sidebar.deleteFlowConfirm", { name: n.name }) }) }), /* @__PURE__ */ G("div", { children: [/* @__PURE__ */ W(p, {
247
- onClick: () => m("idle"),
246
+ "aria-label": p("sidebar.deleteFlow", { name: n.name }),
247
+ children: [/* @__PURE__ */ K("span", { children: /* @__PURE__ */ K("strong", { children: p("sidebar.deleteFlowConfirm", { name: n.name }) }) }), /* @__PURE__ */ q("div", { children: [/* @__PURE__ */ K(c, {
248
+ onClick: () => h("idle"),
248
249
  size: "sm",
249
250
  variant: "outline",
250
- children: u("common.cancel")
251
- }), /* @__PURE__ */ W(p, {
251
+ children: p("common.cancel")
252
+ }), /* @__PURE__ */ K(c, {
252
253
  disabled: t != null,
253
254
  onClick: () => void S(),
254
255
  size: "sm",
255
256
  variant: "destructive",
256
- children: u(t == "flow" ? "common.deleting" : "common.delete")
257
+ children: p(t == "flow" ? "common.deleting" : "common.delete")
257
258
  })] })]
258
259
  })
259
260
  ]
260
261
  });
261
262
  }
262
- function Je() {
263
- return /* @__PURE__ */ G("div", {
263
+ function Qe() {
264
+ return /* @__PURE__ */ q("div", {
264
265
  "aria-hidden": "true",
265
266
  className: "resource-list-row resource-skeleton-row flow-columns",
266
267
  children: [
267
- /* @__PURE__ */ G("span", {
268
+ /* @__PURE__ */ q("span", {
268
269
  className: "resource-primary-cell",
269
- children: [/* @__PURE__ */ W(M, { className: "size-8 shrink-0" }), /* @__PURE__ */ G("span", {
270
+ children: [/* @__PURE__ */ K(H, { className: "size-8 shrink-0" }), /* @__PURE__ */ q("span", {
270
271
  className: "resource-skeleton-copy",
271
- children: [/* @__PURE__ */ W(M, { className: "h-3.5 w-36" }), /* @__PURE__ */ W(M, { className: "h-2.5 w-48 max-w-full" })]
272
+ children: [/* @__PURE__ */ K(H, { className: "h-3.5 w-36" }), /* @__PURE__ */ K(H, { className: "h-2.5 w-48 max-w-full" })]
272
273
  })]
273
274
  }),
274
- /* @__PURE__ */ W(M, { className: "h-3 w-28" }),
275
- /* @__PURE__ */ W(M, { className: "h-3 w-16" })
275
+ /* @__PURE__ */ K(H, { className: "h-3 w-28" }),
276
+ /* @__PURE__ */ K(H, { className: "h-3 w-16" })
276
277
  ]
277
278
  });
278
279
  }
279
- function Ye({ createFlowDisabled: e, createFlowField: t, flowBadges: n, hrefForFlow: i, hostAction: o, hostTitle: s, language: c, onCreateFlow: l, onHostAction: u, onLanguageChange: d, onSelectFlow: m, store: h }) {
280
- let g = r(), _ = a(h.workspace.$.busy), y = a(h.workspace.$.flowLoadFailed), x = a(h.workspace.$.flowLoadMoreFailed), S = a(h.workspace.$.flowLoading), C = a(h.workspace.$.flowLoadingMore), te = a(h.workspace.$.flowNextCursor), w = a(h.workspace.$.flows), re = a(h.workspace.$.flowTotal), [ie, T] = U(!1), [E, D] = U(""), [O, k] = U(""), A = E.trim().toLocaleLowerCase(), j = w.filter((e) => e.name.toLocaleLowerCase().includes(A));
281
- async function ue(e) {
280
+ function $e({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBadges: i, hrefForFlow: o, hostAction: l, hostTitle: d, language: f, onCreateFlow: p, onHostAction: m, onLanguageChange: h, onSelectFlow: g, store: _ }) {
281
+ let y = r(), b = a(_.workspace.$.busy), S = a(_.workspace.$.flowLoadFailed), ee = a(_.workspace.$.flowLoadMoreFailed), C = a(_.workspace.$.flowLoading), w = a(_.workspace.$.flowLoadingMore), T = a(_.workspace.$.flowNextCursor), E = a(_.workspace.$.flows), D = a(_.workspace.$.flowTotal), [O, k] = G(!1), [A, j] = G(""), [M, N] = G(""), P = A.trim().toLocaleLowerCase(), F = E.filter((e) => e.name.toLocaleLowerCase().includes(P));
282
+ async function I(e) {
282
283
  e.preventDefault();
283
- let t = O.trim();
284
- v(t) != null || !await l(t) || (T(!1), k(""));
284
+ let t = M.trim();
285
+ u(t) != null || !await p(t) || (k(!1), N(""));
285
286
  }
286
- return /* @__PURE__ */ W("main", {
287
+ return /* @__PURE__ */ K("main", {
287
288
  className: "resource-browser",
288
- children: /* @__PURE__ */ G("div", {
289
- className: "resource-page",
289
+ children: /* @__PURE__ */ q("div", {
290
+ className: s("resource-page", e != "default" && "resource-page-full"),
290
291
  children: [
291
- /* @__PURE__ */ G("header", {
292
- className: "resource-page-header",
293
- children: [/* @__PURE__ */ W("div", {
294
- className: "resource-heading",
295
- children: /* @__PURE__ */ W("h1", { children: g("resource.flows") })
296
- }), /* @__PURE__ */ G("div", {
297
- className: "resource-page-actions",
298
- children: [
299
- /* @__PURE__ */ W(Ke, {
300
- language: c,
301
- onLanguageChange: d
302
- }),
303
- /* @__PURE__ */ G(p, {
304
- disabled: _ != null,
305
- onClick: () => T(!0),
306
- children: [/* @__PURE__ */ W(f, {
307
- "data-icon": "inline-start",
308
- name: "plus"
309
- }), g("resource.newFlow")]
310
- }),
311
- o != null && s != null && u != null && /* @__PURE__ */ W(ae, {
312
- action: o,
313
- onAction: u,
314
- title: s
315
- })
316
- ]
317
- })]
292
+ /* @__PURE__ */ K("h1", {
293
+ className: "sr-only",
294
+ children: y("resource.flows")
318
295
  }),
319
- /* @__PURE__ */ G("section", {
296
+ /* @__PURE__ */ q("section", {
320
297
  "aria-labelledby": "flow-list-title",
321
298
  className: "resource-list-section",
322
299
  children: [
323
- /* @__PURE__ */ G("div", {
300
+ /* @__PURE__ */ q("div", {
324
301
  className: "resource-list-title",
325
- children: [/* @__PURE__ */ G("div", {
302
+ children: [/* @__PURE__ */ q("div", {
326
303
  className: "resource-list-heading",
327
- children: [/* @__PURE__ */ W("h2", {
304
+ children: [/* @__PURE__ */ K("h2", {
328
305
  id: "flow-list-title",
329
- children: g("resource.allFlows")
330
- }), !S && /* @__PURE__ */ W("span", { children: g("resource.flowCount", { count: re ?? w.length }) })]
331
- }), /* @__PURE__ */ G("div", {
306
+ children: y("resource.allFlows")
307
+ }), !C && /* @__PURE__ */ K("span", { children: y("resource.flowCount", { count: D ?? E.length }) })]
308
+ }), /* @__PURE__ */ q("div", {
332
309
  className: "resource-list-actions",
333
- children: [/* @__PURE__ */ G(ne, {
334
- className: "w-full sm:w-56",
335
- children: [/* @__PURE__ */ W(ee, { children: /* @__PURE__ */ W(f, {
336
- name: "search",
337
- size: 17
338
- }) }), /* @__PURE__ */ W(ce, {
339
- autoComplete: "off",
340
- "aria-label": g("resource.searchFlows"),
341
- name: "flow-search",
342
- onChange: (e) => D(e.target.value),
343
- placeholder: g("resource.searchFlows"),
344
- value: E
345
- })]
346
- }), /* @__PURE__ */ W(p, {
347
- "aria-label": g("common.refresh"),
348
- disabled: S || _ != null,
349
- onClick: () => void h.workspace.reloadFlows(),
350
- size: "icon",
351
- title: g("common.refresh"),
352
- variant: "outline",
353
- children: /* @__PURE__ */ W(f, { name: "refresh" })
354
- })]
310
+ children: [
311
+ /* @__PURE__ */ K(Xe, {
312
+ language: f,
313
+ onLanguageChange: h
314
+ }),
315
+ /* @__PURE__ */ q(Se, {
316
+ className: "w-full sm:w-56",
317
+ children: [/* @__PURE__ */ K(Oe, { children: /* @__PURE__ */ K(v, {
318
+ name: "search",
319
+ size: 17
320
+ }) }), /* @__PURE__ */ K(ve, {
321
+ autoComplete: "off",
322
+ "aria-label": y("resource.searchFlows"),
323
+ name: "flow-search",
324
+ onChange: (e) => j(e.target.value),
325
+ placeholder: y("resource.searchFlows"),
326
+ value: A
327
+ })]
328
+ }),
329
+ /* @__PURE__ */ K(c, {
330
+ "aria-label": y("common.refresh"),
331
+ disabled: C || b != null,
332
+ onClick: () => void _.workspace.reloadFlows(),
333
+ size: "icon",
334
+ title: y("common.refresh"),
335
+ variant: "outline",
336
+ children: /* @__PURE__ */ K(v, { name: "refresh" })
337
+ }),
338
+ /* @__PURE__ */ q(c, {
339
+ className: "resource-page-primary-action",
340
+ disabled: b != null,
341
+ onClick: () => k(!0),
342
+ children: [/* @__PURE__ */ K(v, {
343
+ "data-icon": "inline-start",
344
+ name: "plus"
345
+ }), y("resource.newFlow")]
346
+ }),
347
+ l != null && d != null && m != null && /* @__PURE__ */ K(x, {
348
+ action: l,
349
+ onAction: m,
350
+ title: d
351
+ })
352
+ ]
355
353
  })]
356
354
  }),
357
- /* @__PURE__ */ G("div", {
355
+ /* @__PURE__ */ q("div", {
358
356
  "aria-hidden": "true",
359
357
  className: "resource-list-columns flow-columns",
360
358
  children: [
361
- /* @__PURE__ */ W("span", { children: g("resource.name") }),
362
- /* @__PURE__ */ W("span", { children: g("resource.updated") }),
363
- /* @__PURE__ */ W("span", { children: g("resource.status") })
359
+ /* @__PURE__ */ K("span", { children: y("resource.name") }),
360
+ /* @__PURE__ */ K("span", { children: y("resource.updated") }),
361
+ /* @__PURE__ */ K("span", { children: y("resource.status") })
364
362
  ]
365
363
  }),
366
- /* @__PURE__ */ W("div", {
364
+ /* @__PURE__ */ K("div", {
367
365
  className: "resource-list",
368
- children: S ? Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ W(Je, {}, t)) : y ? /* @__PURE__ */ G(R, {
366
+ children: C ? Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ K(Qe, {}, t)) : S ? /* @__PURE__ */ q(se, {
369
367
  className: "min-h-64",
370
368
  role: "alert",
371
- children: [/* @__PURE__ */ G(oe, { children: [
372
- /* @__PURE__ */ W(se, {
369
+ children: [/* @__PURE__ */ q(ue, { children: [
370
+ /* @__PURE__ */ K(be, {
373
371
  variant: "icon",
374
- children: /* @__PURE__ */ W(f, {
372
+ children: /* @__PURE__ */ K(v, {
375
373
  name: "alert",
376
374
  size: 20
377
375
  })
378
376
  }),
379
- /* @__PURE__ */ W(le, { children: g("resource.flowsLoadFailed") }),
380
- /* @__PURE__ */ W(L, { children: g("resource.flowsLoadFailedDescription") })
381
- ] }), /* @__PURE__ */ W(b, { children: /* @__PURE__ */ W(p, {
382
- onClick: () => void h.retryFlows(),
377
+ /* @__PURE__ */ K(U, { children: y("resource.flowsLoadFailed") }),
378
+ /* @__PURE__ */ K(Ae, { children: y("resource.flowsLoadFailedDescription") })
379
+ ] }), /* @__PURE__ */ K(we, { children: /* @__PURE__ */ K(c, {
380
+ onClick: () => void _.retryFlows(),
383
381
  variant: "outline",
384
- children: g("empty.retry")
382
+ children: y("empty.retry")
385
383
  }) })]
386
- }) : j.length == 0 ? /* @__PURE__ */ G(R, {
384
+ }) : F.length == 0 ? /* @__PURE__ */ q(se, {
387
385
  className: "min-h-64",
388
- children: [/* @__PURE__ */ G(oe, { children: [
389
- /* @__PURE__ */ W(se, {
386
+ children: [/* @__PURE__ */ q(ue, { children: [
387
+ /* @__PURE__ */ K(be, {
390
388
  variant: "icon",
391
- children: /* @__PURE__ */ W(f, {
389
+ children: /* @__PURE__ */ K(v, {
392
390
  name: "flow",
393
391
  size: 20
394
392
  })
395
393
  }),
396
- /* @__PURE__ */ W(le, { children: g(A.length == 0 ? "resource.noFlows" : "resource.noMatchingFlows") }),
397
- /* @__PURE__ */ W(L, { children: g(A.length == 0 ? "resource.noFlowsDescription" : "resource.noMatchingDescription") })
398
- ] }), A.length == 0 && /* @__PURE__ */ W(b, { children: /* @__PURE__ */ G(p, {
399
- onClick: () => T(!0),
394
+ /* @__PURE__ */ K(U, { children: y(P.length == 0 ? "resource.noFlows" : "resource.noMatchingFlows") }),
395
+ /* @__PURE__ */ K(Ae, { children: y(P.length == 0 ? "resource.noFlowsDescription" : "resource.noMatchingDescription") })
396
+ ] }), P.length == 0 && /* @__PURE__ */ K(we, { children: /* @__PURE__ */ q(c, {
397
+ onClick: () => k(!0),
400
398
  variant: "outline",
401
- children: [/* @__PURE__ */ W(f, {
399
+ children: [/* @__PURE__ */ K(v, {
402
400
  "data-icon": "inline-start",
403
401
  name: "plus"
404
- }), g("resource.newFlow")]
402
+ }), y("resource.newFlow")]
405
403
  }) })]
406
- }) : j.map((e) => /* @__PURE__ */ W(qe, {
407
- badge: n?.[e.flowId],
408
- busy: _,
404
+ }) : F.map((e) => /* @__PURE__ */ K(Ze, {
405
+ badge: i?.[e.flowId],
406
+ busy: b,
409
407
  flow: e,
410
- href: i(e),
411
- onSelect: m,
412
- store: h
408
+ href: o(e),
409
+ onSelect: g,
410
+ store: _
413
411
  }, e.flowId))
414
412
  }),
415
- te != null && /* @__PURE__ */ W("div", {
413
+ T != null && /* @__PURE__ */ K("div", {
416
414
  className: "resource-list-footer",
417
- children: /* @__PURE__ */ W(p, {
418
- disabled: C,
419
- onClick: () => void h.workspace.loadMoreFlows(),
415
+ children: /* @__PURE__ */ K(c, {
416
+ disabled: w,
417
+ onClick: () => void _.workspace.loadMoreFlows(),
420
418
  variant: "outline",
421
- children: g(C ? "resource.loadingMore" : x ? "resource.retryLoadMore" : "resource.loadMore")
419
+ children: y(w ? "resource.loadingMore" : ee ? "resource.retryLoadMore" : "resource.loadMore")
422
420
  })
423
421
  })
424
422
  ]
425
423
  }),
426
- ie && /* @__PURE__ */ W(Re, {
424
+ O && /* @__PURE__ */ K(He, {
427
425
  fallback: null,
428
- children: /* @__PURE__ */ W(We, {
429
- disabled: e,
430
- field: t,
426
+ children: /* @__PURE__ */ K(Je, {
427
+ disabled: t,
428
+ field: n,
431
429
  id: "flow-name",
432
- issue: v(O),
433
- label: g("resource.flowName"),
434
- name: O,
435
- onNameChange: k,
436
- onOpenChange: T,
437
- onSubmit: (e) => void ue(e),
438
- pending: _ == "flow",
439
- title: g("resource.newFlow")
430
+ issue: u(M),
431
+ label: y("resource.flowName"),
432
+ name: M,
433
+ onNameChange: N,
434
+ onOpenChange: k,
435
+ onSubmit: (e) => void I(e),
436
+ pending: b == "flow",
437
+ title: y("resource.newFlow")
440
438
  })
441
439
  })
442
440
  ]
@@ -445,7 +443,7 @@ function Ye({ createFlowDisabled: e, createFlowField: t, flowBadges: n, hrefForF
445
443
  }
446
444
  //#endregion
447
445
  //#region ../../node_modules/.bun/nanoid@6.0.1/node_modules/nanoid/index.browser.js
448
- var Xe = (e) => crypto.getRandomValues(new Uint8Array(e)), Ze = (e, t, n) => {
446
+ var et = (e) => crypto.getRandomValues(new Uint8Array(e)), tt = (e, t, n) => {
449
447
  let r = 256 - 256 % e.length;
450
448
  if (r === 256) {
451
449
  let r = e.length - 1;
@@ -467,41 +465,43 @@ var Xe = (e) => crypto.getRandomValues(new Uint8Array(e)), Ze = (e, t, n) => {
467
465
  for (; s--;) if (t[s] < r && (o += e[t[s] % e.length], o.length >= a)) return o;
468
466
  }
469
467
  };
470
- }, Qe = (e, t = 21) => Ze(e, t | 0, Xe);
468
+ }, nt = (e, t = 21) => tt(e, t | 0, et);
471
469
  //#endregion
472
470
  //#region src/flow/common/edgeChanges.ts
473
- function $e(e, t, n) {
471
+ function rt(e, t, n) {
474
472
  let r = {
475
473
  source: n.source,
476
474
  sourceHandle: n.sourceHandle,
477
475
  target: n.target,
478
476
  targetHandle: n.targetHandle
479
- }, i = tt(e, t)?.nodes[n.target], a = i != null && "inputs" in i ? i.inputs[n.targetHandle] : void 0;
480
- return a?.kind == "sources" && a.sources.some((e) => e.kind == "node" && e.nodeId == n.source && e.output == n.sourceHandle) ? [] : ie(e, [{
477
+ }, i = at(e, t)?.nodes[n.target], a = i != null && "inputs" in i ? i.inputs[n.targetHandle] : void 0;
478
+ return a?.kind == "sources" && a.sources.some((e) => e.kind == "node" && e.nodeId == n.source && e.output == n.sourceHandle) ? [] : De(e, [{
479
+ before: a,
481
480
  edge: r,
482
481
  kind: "graph.edge.connect",
483
482
  target: t
484
483
  }]);
485
484
  }
486
- function et(e, t, n) {
485
+ function it(e, t, n) {
487
486
  let r = {
488
487
  source: n.source,
489
488
  sourceHandle: n.sourceHandle,
490
489
  target: n.target,
491
490
  targetHandle: n.targetHandle
492
- }, i = tt(e, t)?.nodes[n.target], a = i != null && "inputs" in i ? i.inputs[n.targetHandle] : void 0;
491
+ }, i = at(e, t)?.nodes[n.target], a = i != null && "inputs" in i ? i.inputs[n.targetHandle] : void 0;
493
492
  return a?.kind != "sources" || !a.sources.some((e) => e.kind == "node" && e.nodeId == n.source && e.output == n.sourceHandle) ? [] : [{
493
+ before: a,
494
494
  edge: r,
495
495
  kind: "graph.edge.disconnect",
496
496
  target: t
497
497
  }];
498
498
  }
499
- function tt(e, t) {
499
+ function at(e, t) {
500
500
  return t.kind == "flow" ? e.document.graph : e.document.subflows[t.id]?.graph;
501
501
  }
502
502
  //#endregion
503
503
  //#region src/flow/common/moduleChanges.ts
504
- async function nt(e) {
504
+ async function ot(e) {
505
505
  try {
506
506
  let { parse: t } = await import("./lib-C5Ipyfps.js").then((e) => e.t), n = t(e, {
507
507
  errorRecovery: !0,
@@ -517,15 +517,17 @@ async function nt(e) {
517
517
  return [];
518
518
  }
519
519
  }
520
- function rt(e, t, n) {
520
+ function st(e, t, n, r, i) {
521
521
  return [{
522
- imports: n,
522
+ beforeImports: n,
523
+ beforeSource: t,
524
+ imports: i,
523
525
  kind: "module.source.replace",
524
526
  moduleId: e,
525
- source: t
527
+ source: r
526
528
  }];
527
529
  }
528
- var it = Qe("23456789abcdefghjkmnpqrstuvwxyz", 10), K = {
530
+ var ct = nt("23456789abcdefghjkmnpqrstuvwxyz", 10), J = {
529
531
  activities: [],
530
532
  activitiesLoadFailed: !1,
531
533
  activitiesLoading: !1,
@@ -538,24 +540,24 @@ var it = Qe("23456789abcdefghjkmnpqrstuvwxyz", 10), K = {
538
540
  loadingMore: !1,
539
541
  publications: [],
540
542
  publishing: !1
541
- }, at = 20, ot = 50, st = 750;
542
- function q(e, t) {
543
+ }, lt = 20, ut = 50, dt = 750;
544
+ function Y(e, t) {
543
545
  return e?.flowId == t.flowId;
544
546
  }
545
- var ct = class {
547
+ var ft = class {
546
548
  #e;
547
549
  #t;
548
550
  #n;
549
- #r = new N();
550
- #i = new N();
551
+ #r = new I();
552
+ #i = new I();
551
553
  #a;
552
- #o = new N();
553
- #s = new N();
554
+ #o = new I();
555
+ #s = new I();
554
556
  #c;
555
- #l = t(K);
557
+ #l = t(J);
556
558
  #u;
557
559
  #d;
558
- constructor(t, n, r, i, a = () => crypto.randomUUID(), o = T()) {
560
+ constructor(t, n, r, i, a = () => crypto.randomUUID(), o = R()) {
559
561
  this.#e = t, this.#t = a, this.#n = o, this.#a = i, this.#c = r, this.#u = n, this.$ = {
560
562
  activities: e(this.#l, (e) => e.activities),
561
563
  activitiesLoadFailed: e(this.#l, (e) => e.activitiesLoadFailed),
@@ -588,12 +590,12 @@ var ct = class {
588
590
  this.#l.dispose();
589
591
  }
590
592
  reset() {
591
- this.#r.invalidate(), this.#i.invalidate(), this.#o.invalidate(), this.#s.invalidate(), this.#d = void 0, this.#l.set(K);
593
+ this.#r.invalidate(), this.#i.invalidate(), this.#o.invalidate(), this.#s.invalidate(), this.#d = void 0, this.#l.set(J);
592
594
  }
593
595
  async load(e) {
594
596
  let t = { flowId: e }, n = this.#r.begin();
595
- q(this.#l.value.target, t) || (this.#i.invalidate(), this.#d = void 0), this.#c(void 0), this.#l.set({
596
- ...K,
597
+ Y(this.#l.value.target, t) || (this.#i.invalidate(), this.#d = void 0), this.#c(void 0), this.#l.set({
598
+ ...J,
597
599
  loading: !0,
598
600
  target: t
599
601
  });
@@ -618,7 +620,7 @@ var ct = class {
618
620
  this.#y({
619
621
  loadFailed: !0,
620
622
  loading: !1
621
- }), this.#c(x(e, this.#n.t));
623
+ }), this.#c(D(e, this.#n.t));
622
624
  }
623
625
  }
624
626
  async loadMore() {
@@ -632,7 +634,7 @@ var ct = class {
632
634
  try {
633
635
  let e = await this.#e.listPublications(n.flowId, {
634
636
  cursor: t,
635
- limit: ot
637
+ limit: ut
636
638
  });
637
639
  if (!r()) return;
638
640
  let i = new Set(this.#l.value.publications.map((e) => e.publicationId));
@@ -647,7 +649,7 @@ var ct = class {
647
649
  this.#y({
648
650
  loadMoreFailed: !0,
649
651
  loadingMore: !1
650
- }), this.#c(x(e, this.#n.t));
652
+ }), this.#c(D(e, this.#n.t));
651
653
  }
652
654
  }
653
655
  async publish() {
@@ -670,7 +672,7 @@ var ct = class {
670
672
  publishing: i.status == "pending"
671
673
  }), await this.#g(n, i, o, e.name)) : !1;
672
674
  } catch (e) {
673
- return o() ? (e instanceof B && e.code == "live.conflict" && await this.#p(n), this.#c(x(e, this.#n.t)), !1) : !1;
675
+ return o() ? (e instanceof B && e.code == "live.conflict" && await this.#p(n), this.#c(D(e, this.#n.t)), !1) : !1;
674
676
  } finally {
675
677
  o() && this.#y({ publishing: !1 });
676
678
  }
@@ -694,7 +696,7 @@ var ct = class {
694
696
  message: this.#n.t("notice.rolledBack", { revision: e.revisionId })
695
697
  }), !0);
696
698
  } catch (e) {
697
- return s() ? (e instanceof B && e.code == "live.conflict" && await this.#p(r), this.#c(x(e, this.#n.t)), !1) : !1;
699
+ return s() ? (e instanceof B && e.code == "live.conflict" && await this.#p(r), this.#c(D(e, this.#n.t)), !1) : !1;
698
700
  } finally {
699
701
  s() && this.#y({ rollingBackPublicationId: void 0 });
700
702
  }
@@ -729,13 +731,13 @@ var ct = class {
729
731
  testingTriggerId: void 0,
730
732
  testResult: void 0
731
733
  });
732
- let [r, i] = await Promise.allSettled([this.#e.getFlowTriggerBinding(t.flowId, e), this.#e.listFlowTriggerActivities(t.flowId, e, { limit: at })]);
734
+ let [r, i] = await Promise.allSettled([this.#e.getFlowTriggerBinding(t.flowId, e), this.#e.listFlowTriggerActivities(t.flowId, e, { limit: lt })]);
733
735
  if (n()) {
734
736
  if (r.status == "rejected") {
735
737
  this.#y({
736
738
  activitiesLoading: !1,
737
739
  detailLoading: !1
738
- }), this.#c(x(r.reason, this.#n.t));
740
+ }), this.#c(D(r.reason, this.#n.t));
739
741
  return;
740
742
  }
741
743
  this.#y({
@@ -749,7 +751,7 @@ var ct = class {
749
751
  }) : (this.#y({
750
752
  activitiesLoadFailed: !0,
751
753
  activitiesLoading: !1
752
- }), this.#c(x(i.reason, this.#n.t)));
754
+ }), this.#c(D(i.reason, this.#n.t)));
753
755
  }
754
756
  }
755
757
  async loadMoreTriggerActivities() {
@@ -763,7 +765,7 @@ var ct = class {
763
765
  try {
764
766
  let e = await this.#e.listFlowTriggerActivities(r.flowId, n, {
765
767
  cursor: t,
766
- limit: at
768
+ limit: lt
767
769
  });
768
770
  if (!i() || this.#l.value.selectedTriggerId != n) return;
769
771
  let a = new Set(this.#l.value.activities.map((e) => e.activityId));
@@ -778,7 +780,7 @@ var ct = class {
778
780
  this.#y({
779
781
  activitiesLoadFailed: !0,
780
782
  activitiesLoadingMore: !1
781
- }), this.#c(x(e, this.#n.t));
783
+ }), this.#c(D(e, this.#n.t));
782
784
  }
783
785
  }
784
786
  async testTrigger() {
@@ -793,7 +795,7 @@ var ct = class {
793
795
  let e = await this.#e.testFlowPollTrigger(n.flowId, t);
794
796
  return !i() || this.#l.value.selectedTriggerId != t ? !1 : (this.#y({ testResult: e }), !0);
795
797
  } catch (e) {
796
- return i() && this.#l.value.selectedTriggerId == t && this.#c(x(e, this.#n.t)), !1;
798
+ return i() && this.#l.value.selectedTriggerId == t && this.#c(D(e, this.#n.t)), !1;
797
799
  } finally {
798
800
  i() && this.#l.value.selectedTriggerId == t && this.#y({ testingTriggerId: void 0 });
799
801
  }
@@ -811,14 +813,14 @@ var ct = class {
811
813
  message: this.#n.t(e.operatorState == "active" ? "notice.triggerPaused" : "notice.triggerResumed")
812
814
  }), !0) : !1;
813
815
  } catch (e) {
814
- return n() && this.#c(x(e, this.#n.t)), !1;
816
+ return n() && this.#c(D(e, this.#n.t)), !1;
815
817
  } finally {
816
818
  n() && this.#y({ changingTriggerId: void 0 });
817
819
  }
818
820
  }
819
821
  async #f(e) {
820
822
  let [t, n, r] = await this.#m(e);
821
- this.#u.updateLive(t), await this.#u.refreshFlows(), q(this.#l.value.target, e) && this.#y({
823
+ this.#u.updateLive(t), await this.#u.refreshFlows(), Y(this.#l.value.target, e) && this.#y({
822
824
  bindings: r,
823
825
  live: t,
824
826
  loadFailed: !1,
@@ -839,7 +841,7 @@ var ct = class {
839
841
  this.#e.getLive(e.flowId),
840
842
  this.#e.listPublications(e.flowId, {
841
843
  includeTotal: !0,
842
- limit: ot
844
+ limit: ut
843
845
  }),
844
846
  this.#e.listFlowTriggerBindings(e.flowId)
845
847
  ]);
@@ -859,7 +861,7 @@ var ct = class {
859
861
  async #g(e, t, n, r) {
860
862
  let i = t;
861
863
  for (; i.status == "pending";) {
862
- if (await new Promise((e) => setTimeout(e, st)), !n()) return !1;
864
+ if (await new Promise((e) => setTimeout(e, dt)), !n()) return !1;
863
865
  try {
864
866
  i = await this.#e.getPublishOperation(e.flowId, i.operationId);
865
867
  } catch (t) {
@@ -867,8 +869,8 @@ var ct = class {
867
869
  if (t instanceof B && t.code == "publication.operation-not-found") return this.#a.setItem(this.#_(e.flowId), ""), this.#v(e, {
868
870
  operation: void 0,
869
871
  publishing: !1
870
- }), this.#c(x(t, this.#n.t)), !1;
871
- this.#c(x(t, this.#n.t));
872
+ }), this.#c(D(t, this.#n.t)), !1;
873
+ this.#c(D(t, this.#n.t));
872
874
  continue;
873
875
  }
874
876
  if (!n()) return !1;
@@ -884,7 +886,7 @@ var ct = class {
884
886
  try {
885
887
  await this.#f(e);
886
888
  } catch (e) {
887
- return n() && this.#c(x(e, this.#n.t)), !0;
889
+ return n() && this.#c(D(e, this.#n.t)), !0;
888
890
  }
889
891
  return n() ? (this.#c({
890
892
  kind: "success",
@@ -895,8 +897,8 @@ var ct = class {
895
897
  return `publish-operation:${e}`;
896
898
  }
897
899
  #v(e, t) {
898
- q(this.#l.value.target, e) ? this.#y(t) : this.#l.set({
899
- ...K,
900
+ Y(this.#l.value.target, e) ? this.#y(t) : this.#l.set({
901
+ ...J,
900
902
  ...t,
901
903
  target: e
902
904
  });
@@ -907,24 +909,29 @@ var ct = class {
907
909
  ...e
908
910
  });
909
911
  }
910
- }, lt = { starting: !1 };
911
- function ut(e) {
912
+ }, pt = { starting: !1 };
913
+ function mt(e) {
912
914
  switch (e.kind) {
913
915
  case "condition": return { [e.node.input.handle]: e.node.input };
914
- case "subflow": return s(e.definition?.inputs ?? []);
915
- case "task": return s(e.definition?.inputs ?? []);
916
+ case "subflow": return m(e.definition?.inputs ?? []);
917
+ case "task": return m(e.definition?.inputs ?? []);
916
918
  case "value": return {};
919
+ case "wait": return { value: {
920
+ jsonSchema: {},
921
+ nullable: !0,
922
+ value: null
923
+ } };
917
924
  }
918
925
  }
919
- function dt(e) {
926
+ function ht(e) {
920
927
  return e.node.name == null ? e.kind == "task" || e.kind == "subflow" ? e.definition?.name ?? e.id : e.id : e.node.name;
921
928
  }
922
- async function ft(e, t) {
923
- let { FlowRunInputEditorStore: n } = await import("./flowRunInputEditorStore-CwvOiIiU.js").then((e) => e.n), r = z(e), i = r.graph({ kind: "flow" });
929
+ async function gt(e, t) {
930
+ let { FlowRunInputEditorStore: n } = await import("./flowRunInputEditorStore-DDidwd8h.js").then((e) => e.r), r = L(e), i = r.graph({ kind: "flow" });
924
931
  return i == null ? [] : Object.entries(i.nodes).toSorted(([e], [t]) => e.localeCompare(t)).flatMap(([e, i]) => {
925
932
  let a = r.resolveNode(e, i);
926
933
  if (a.kind == "trigger") return [];
927
- let o = Object.entries(ut(a)).filter(([e, t]) => a.node.inputs[e] == null && !Object.hasOwn(t, "value")).toSorted(([e], [t]) => e.localeCompare(t)).map(([e, t]) => Object.assign({
934
+ let o = Object.entries(mt(a)).filter(([e, t]) => a.node.inputs[e] == null && !Object.hasOwn(t, "value")).toSorted(([e], [t]) => e.localeCompare(t)).map(([e, t]) => Object.assign({
928
935
  handle: e,
929
936
  jsonSchema: t.jsonSchema,
930
937
  nullable: t.nullable
@@ -932,21 +939,21 @@ async function ft(e, t) {
932
939
  return o.length == 0 ? [] : [{
933
940
  editor: new n(o, t),
934
941
  nodeId: e,
935
- title: dt(a)
942
+ title: ht(a)
936
943
  }];
937
944
  });
938
945
  }
939
- var pt = class {
946
+ var _t = class {
940
947
  #e;
941
948
  #t;
942
949
  #n;
943
- #r = new N();
944
- #i = new N();
950
+ #r = new I();
951
+ #i = new I();
945
952
  #a;
946
953
  #o;
947
- #s = t(lt);
954
+ #s = t(pt);
948
955
  #c;
949
- constructor(t, n, r, i = T(), a = () => crypto.randomUUID()) {
956
+ constructor(t, n, r, i = R(), a = () => crypto.randomUUID()) {
950
957
  this.#e = t, this.#a = n, this.#o = r, this.#n = i, this.#t = a, this.$ = {
951
958
  inputRequest: e(this.#s, (e) => e.inputRequest),
952
959
  starting: e(this.#s, (e) => e.starting),
@@ -961,7 +968,7 @@ var pt = class {
961
968
  reset() {
962
969
  this.#r.invalidate(), this.#i.invalidate(), this.#c = void 0;
963
970
  let e = this.#s.value.inputRequest;
964
- this.#s.set(lt), this.#d(e);
971
+ this.#s.set(pt), this.#d(e);
965
972
  }
966
973
  async requestDraft(e, t) {
967
974
  let n = this.#i.begin();
@@ -976,7 +983,7 @@ var pt = class {
976
983
  let r = await this.#e.getRevision(e.flowId, n.revisionId);
977
984
  return t() ? await this.#l("live", e, r, n.revisionId, t, n.publicationId) : "unavailable";
978
985
  } catch (e) {
979
- return t() && this.#o(x(e, this.#n.t)), "unavailable";
986
+ return t() && this.#o(D(e, this.#n.t)), "unavailable";
980
987
  } finally {
981
988
  t() && this.#f({ starting: !1 });
982
989
  }
@@ -1004,7 +1011,7 @@ var pt = class {
1004
1011
  }), this.#d(s);
1005
1012
  let c;
1006
1013
  try {
1007
- c = await ft(r, this.#n.lang$);
1014
+ c = await gt(r, this.#n.lang$);
1008
1015
  } catch (e) {
1009
1016
  throw a() && this.#f({
1010
1017
  starting: !1,
@@ -1060,7 +1067,7 @@ var pt = class {
1060
1067
  });
1061
1068
  return !a() || !o() ? !1 : (this.#c = void 0, this.#a.follow(s, o));
1062
1069
  } catch (e) {
1063
- return a() && o() && this.#o(x(e, this.#n.t)), !1;
1070
+ return a() && o() && this.#o(D(e, this.#n.t)), !1;
1064
1071
  } finally {
1065
1072
  a() && this.#f({
1066
1073
  starting: !1,
@@ -1080,18 +1087,18 @@ var pt = class {
1080
1087
  ...e
1081
1088
  });
1082
1089
  }
1083
- }, mt = {
1090
+ }, vt = {
1084
1091
  actions: {},
1085
1092
  catalogs: {}
1086
1093
  };
1087
- function ht(e) {
1094
+ function yt(e) {
1088
1095
  return Object.entries(e).map(([e, t]) => ({
1089
1096
  description: t.description,
1090
1097
  handle: e,
1091
1098
  jsonSchema: t.jsonSchema
1092
1099
  }));
1093
1100
  }
1094
- function J(e, t) {
1101
+ function X(e, t) {
1095
1102
  return {
1096
1103
  connector: e,
1097
1104
  description: e.authenticated && e.defaultConnection == null ? t("addNode.connectorNeedsConnection", {
@@ -1099,15 +1106,15 @@ function J(e, t) {
1099
1106
  service: e.serviceName
1100
1107
  }) : e.description,
1101
1108
  group: t("addNode.connectorActions"),
1102
- icon: e.icon ?? ":carbon:connection-signal:",
1109
+ icon: T(e),
1103
1110
  id: `connector:${e.actionId}`,
1104
- inputs: ht(e.inputs),
1111
+ inputs: yt(e.inputs),
1105
1112
  kind: "connector",
1106
1113
  label: e.name,
1107
- outputs: ht(e.outputs)
1114
+ outputs: yt(e.outputs)
1108
1115
  };
1109
1116
  }
1110
- function gt(e, t) {
1117
+ function bt(e, t) {
1111
1118
  let n = /* @__PURE__ */ new Map();
1112
1119
  for (let t of e) {
1113
1120
  let e = n.get(t.serviceId) ?? [];
@@ -1115,7 +1122,7 @@ function gt(e, t) {
1115
1122
  }
1116
1123
  return [...n.values()].toSorted((e, t) => e[0].serviceName.localeCompare(t[0].serviceName)).map((e) => {
1117
1124
  let n = e[0], r = e.map((e) => {
1118
- let n = J(e, t);
1125
+ let n = X(e, t);
1119
1126
  return {
1120
1127
  description: n.description,
1121
1128
  label: n.label,
@@ -1126,7 +1133,7 @@ function gt(e, t) {
1126
1133
  choices: r,
1127
1134
  description: t(r.length == 1 ? "addNode.connectorActionCountOne" : "addNode.connectorActionCount", { count: r.length }),
1128
1135
  group: t("addNode.connectorActions"),
1129
- icon: n.icon ?? ":carbon:connection-signal:",
1136
+ icon: T(n),
1130
1137
  id: `connector-provider:${n.serviceId}`,
1131
1138
  inputs: [],
1132
1139
  kind: "connector-group",
@@ -1136,12 +1143,12 @@ function gt(e, t) {
1136
1143
  };
1137
1144
  });
1138
1145
  }
1139
- function _t(e, t) {
1146
+ function xt(e, t) {
1140
1147
  return {
1141
1148
  choices: [],
1142
1149
  description: t("addNode.connectorBrowseActions"),
1143
1150
  group: t("addNode.connectorActions"),
1144
- icon: e.icon ?? ":carbon:connection-signal:",
1151
+ icon: T(e),
1145
1152
  id: `connector-provider:${e.serviceId}`,
1146
1153
  inputs: [],
1147
1154
  kind: "connector-group",
@@ -1150,17 +1157,39 @@ function _t(e, t) {
1150
1157
  serviceId: e.serviceId
1151
1158
  };
1152
1159
  }
1153
- function vt(e) {
1154
- if (e?.kind != "task" || e.node.task != null) return;
1155
- let t = e.definition;
1156
- if (!(t == null || !("executor" in t) || t.executor.kind != "connector")) return {
1157
- actionId: t.executor.action,
1158
- connectionId: t.executor.connectionId,
1160
+ function St(e, t) {
1161
+ if (e == null) return;
1162
+ let n = e.kind == "wait" ? e.node.notification?.taskId : e.kind == "task" && e.node.task == null ? e.node.taskId : void 0;
1163
+ if (n == null) return;
1164
+ let r = e.kind == "task" ? e.definition : t?.task(n);
1165
+ if (!(r == null || !("executor" in r) || r.executor.kind != "connector")) return {
1166
+ actionId: r.executor.action,
1167
+ connectionId: r.executor.connectionId,
1159
1168
  nodeId: e.id,
1160
- taskId: e.node.taskId
1169
+ taskId: n
1161
1170
  };
1162
1171
  }
1163
- var yt = class {
1172
+ function Ct(e, t, n) {
1173
+ if (e == null) return [];
1174
+ let r = [];
1175
+ for (let i of [...O(e.revision.content).tasks].toSorted()) {
1176
+ let a = e.task(i);
1177
+ if (a?.executor.kind != "connector") continue;
1178
+ let o = t[a.executor.action];
1179
+ if (o?.authenticated != 1) continue;
1180
+ let s = a.executor.connectionId == null ? void 0 : n[o.serviceId]?.byId.get(a.executor.connectionId);
1181
+ s == null && o.defaultConnection?.connectionId == a.executor.connectionId && (s = o.defaultConnection), (a.executor.connectionId == null || n[o.serviceId] != null && s?.status != "active") && r.push({
1182
+ code: "task.connector-connection-required",
1183
+ column: 0,
1184
+ line: 1,
1185
+ message: `Connector Task "${i}" requires an active Connection.`,
1186
+ path: `/document/tasks/${i}/executor/connectionId`,
1187
+ values: { taskId: i }
1188
+ });
1189
+ }
1190
+ return r;
1191
+ }
1192
+ var wt = class {
1164
1193
  #e;
1165
1194
  #t;
1166
1195
  #n;
@@ -1176,43 +1205,44 @@ var yt = class {
1176
1205
  #f;
1177
1206
  #p;
1178
1207
  #m;
1179
- constructor(r, i, a, o, s = T()) {
1180
- this.#r = /* @__PURE__ */ new Map(), this.#i = /* @__PURE__ */ new Set(), this.#a = new N(), this.#u = t(mt), this.#m = !1, this.browseAddNodeOptions = async (e) => {
1181
- if (this.#m) return;
1182
- let t = this.#d.$.flowId.value;
1208
+ #h;
1209
+ constructor(r, i, a, o, s = R()) {
1210
+ this.#r = /* @__PURE__ */ new Map(), this.#i = /* @__PURE__ */ new Set(), this.#a = new I(), this.#o = new I(), this.#d = t(vt), this.#h = !1, this.browseAddNodeOptions = async (e) => {
1211
+ if (this.#h) return;
1212
+ let t = this.#f.$.flowId.value;
1183
1213
  if (t == null) return;
1184
- let n = this.#p ?? await this.#e.listConnectorProviders(e, t);
1185
- if (!(e.aborted || this.#m || t != this.#d.$.flowId.value)) return this.#p = n, n.toSorted((e, t) => e.serviceName.localeCompare(t.serviceName)).map((e) => _t(e, this.#t.t));
1214
+ let n = this.#m ?? await this.#e.listConnectorProviders(e, t);
1215
+ if (!(e.aborted || this.#h || t != this.#f.$.flowId.value)) return this.#m = n, n.toSorted((e, t) => e.serviceName.localeCompare(t.serviceName)).map((e) => xt(e, this.#t.t));
1186
1216
  }, this.provideAddNodeOptionChoices = async (e, t) => {
1187
- if (this.#m) return;
1188
- let n = this.#d.$.flowId.value, r = this.#p?.find((t) => `connector-provider:${t.serviceId}` == e);
1217
+ if (this.#h) return;
1218
+ let n = this.#f.$.flowId.value, r = this.#m?.find((t) => `connector-provider:${t.serviceId}` == e);
1189
1219
  if (n == null || r == null) return;
1190
1220
  let i = this.#r.get(r.serviceId) ?? await this.#e.listConnectorActions(r.serviceId, t, n);
1191
- if (t.aborted || this.#m || n != this.#d.$.flowId.value) return;
1221
+ if (t.aborted || this.#h || n != this.#f.$.flowId.value) return;
1192
1222
  let a = i.map((e) => Object.assign({}, e, e.icon == null && r.icon != null ? { icon: r.icon } : {}, { serviceName: r.serviceName }));
1193
- return this.#r.set(r.serviceId, a), this.#y({ actions: {
1194
- ...this.#u.value.actions,
1223
+ return this.#r.set(r.serviceId, a), this.#b({ actions: {
1224
+ ...this.#d.value.actions,
1195
1225
  ...Object.fromEntries(a.map((e) => [e.actionId, e]))
1196
- } }), a.map((e) => J(e, this.#t.t));
1226
+ } }), a.map((e) => X(e, this.#t.t));
1197
1227
  }, this.provideAddNodeOptions = async (e, t) => {
1198
- if (this.#m) return;
1199
- let n = this.#d.$.flowId.value;
1228
+ if (this.#h) return;
1229
+ let n = this.#f.$.flowId.value;
1200
1230
  if (n == null) return;
1201
- let r = e.trim(), i = r.length == 0 ? Object.values(this.#u.value.actions) : await this.#e.searchConnectorActions(r, t, n);
1202
- if (t.aborted || this.#m || n != this.#d.$.flowId.value) return;
1203
- let a = { ...this.#u.value.actions };
1231
+ let r = e.trim(), i = r.length == 0 ? Object.values(this.#d.value.actions) : await this.#e.searchConnectorActions(r, t, n);
1232
+ if (t.aborted || this.#h || n != this.#f.$.flowId.value) return;
1233
+ let a = { ...this.#d.value.actions };
1204
1234
  for (let e of i) a[e.actionId] = e;
1205
- if (this.#y({ actions: a }), r.length != 0) return i.map((e) => J(e, this.#t.t));
1235
+ if (this.#b({ actions: a }), r.length != 0) return i.map((e) => X(e, this.#t.t));
1206
1236
  let o = new Map(i.map((e) => [e.actionId, e]));
1207
- for (let e of this.#d.$.revision.value?.connectorActionIds ?? []) {
1237
+ for (let e of this.#f.$.revision.value?.connectorActionIds ?? []) {
1208
1238
  let t = a[e];
1209
1239
  t != null && o.set(e, t);
1210
1240
  }
1211
- return gt([...o.values()], this.#t.t);
1212
- }, this.#e = r, this.#n = o, this.#d = i, this.#l = a, this.#t = s;
1213
- let c = e(this.#u, (e) => e.actions), l = e(this.#u, (e) => e.catalogs);
1214
- this.#c = n((e) => {
1215
- let t = vt(e(i.$.selection)), n = e(this.#u);
1241
+ return bt([...o.values()], this.#t.t);
1242
+ }, this.#e = r, this.#n = o, this.#f = i, this.#u = a, this.#t = s;
1243
+ let c = e(this.#d, (e) => e.actions), l = e(this.#d, (e) => e.catalogs);
1244
+ this.#l = n((e) => {
1245
+ let t = St(e(i.$.selection), e(i.$.revision)), n = e(this.#d);
1216
1246
  if (t == null) return { authorizationPending: !1 };
1217
1247
  let r = n.actions[t.actionId], a = r == null ? void 0 : n.catalogs[r.serviceId], o = t.connectionId == null ? void 0 : a?.byId.get(t.connectionId);
1218
1248
  return o == null && r?.defaultConnection?.connectionId == t.connectionId && (o = r.defaultConnection), {
@@ -1224,157 +1254,167 @@ var yt = class {
1224
1254
  connectionError: r != null && n.connectionError?.serviceId == r.serviceId ? n.connectionError.message : void 0
1225
1255
  };
1226
1256
  }), this.$ = {
1227
- actionLoading: e(this.#u, (e) => e.actionLoading),
1257
+ actionLoading: e(this.#d, (e) => e.actionLoading),
1228
1258
  actions: c,
1229
1259
  catalogs: l,
1230
- connectionLoading: e(this.#u, (e) => e.connectionLoading),
1231
- selectedAction: e(this.#c, (e) => e.action),
1232
- selectedActionError: e(this.#c, (e) => e.actionError),
1233
- selectedActiveConnections: e(this.#c, (e) => e.activeConnections),
1234
- selectedAuthorizationPending: e(this.#c, (e) => e.authorizationPending),
1235
- selectedConnection: e(this.#c, (e) => e.connection),
1236
- selectedConnectionError: e(this.#c, (e) => e.connectionError)
1237
- }, this.#o = i.$.flowId.reaction(() => this.reset()), this.#s = i.$.revision.reaction(() => void this.#x());
1260
+ connectionLoading: e(this.#d, (e) => e.connectionLoading),
1261
+ diagnostics: n((e) => Ct(e(i.$.revision), e(c), e(l))),
1262
+ selectedAction: e(this.#l, (e) => e.action),
1263
+ selectedActionError: e(this.#l, (e) => e.actionError),
1264
+ selectedActiveConnections: e(this.#l, (e) => e.activeConnections),
1265
+ selectedAuthorizationPending: e(this.#l, (e) => e.authorizationPending),
1266
+ selectedConnection: e(this.#l, (e) => e.connection),
1267
+ selectedConnectionError: e(this.#l, (e) => e.connectionError)
1268
+ }, this.#s = i.$.flowId.reaction(() => this.reset()), this.#c = i.$.revision.reaction(() => void this.#S());
1238
1269
  }
1239
1270
  dispose() {
1240
- this.#m = !0, this.#a.invalidate(), this.#o(), this.#s();
1271
+ this.#h = !0, this.#a.invalidate(), this.#o.invalidate(), this.#s(), this.#c();
1241
1272
  for (let e of Object.values(this.$)) e.dispose();
1242
- this.#c.dispose(), this.#u.dispose();
1273
+ this.#l.dispose(), this.#d.dispose();
1243
1274
  }
1244
1275
  reset() {
1245
- this.#m || (this.#a.invalidate(), this.#f = void 0, this.#r.clear(), this.#p = void 0, this.#i.clear(), this.#u.set(mt));
1276
+ this.#h || (this.#a.invalidate(), this.#o.invalidate(), this.#p = void 0, this.#r.clear(), this.#m = void 0, this.#i.clear(), this.#d.set(vt));
1246
1277
  }
1247
1278
  async refresh(e = !1) {
1248
- if (this.#m) return;
1249
- let t = this.#a.begin(), n = this.#d.$.flowId.value, r = vt(this.#d.$.selection.value);
1279
+ if (this.#h) return;
1280
+ let t = this.#o.begin(), n = this.#f.$.flowId.value, r = St(this.#f.$.selection.value, this.#f.$.revision.value);
1250
1281
  if (n == null || r == null) {
1251
- (this.#u.value.actionLoading != null || this.#u.value.connectionLoading != null) && this.#y({
1282
+ (this.#d.value.actionLoading != null || this.#d.value.connectionLoading != null) && this.#b({
1252
1283
  actionLoading: void 0,
1253
1284
  connectionLoading: void 0
1254
1285
  });
1255
1286
  return;
1256
1287
  }
1257
- this.#y({
1288
+ this.#b({
1258
1289
  actionError: void 0,
1259
1290
  actionLoading: r.actionId,
1260
1291
  connectionError: void 0,
1261
1292
  connectionLoading: void 0
1262
1293
  });
1263
1294
  try {
1264
- let i = await this.#h(r.actionId, e);
1265
- if (!this.#b(t, n)) return;
1266
- this.#y({ actions: {
1267
- ...this.#u.value.actions,
1295
+ let i = await this.#g(r.actionId, e);
1296
+ if (!this.#x(t, n)) return;
1297
+ this.#b({ actions: {
1298
+ ...this.#d.value.actions,
1268
1299
  [i.actionId]: i
1269
- } }), i.authenticated && await this.#g(n, r, i.serviceId, e, t);
1300
+ } }), i.authenticated && await this.#_(n, r, i.serviceId, e, t);
1270
1301
  } catch (e) {
1271
- this.#b(t, n) && this.#y({ actionError: {
1302
+ this.#x(t, n) && this.#b({ actionError: {
1272
1303
  actionId: r.actionId,
1273
- message: x(e, this.#t.t).message
1304
+ message: D(e, this.#t.t).message
1274
1305
  } });
1275
1306
  } finally {
1276
- this.#b(t, n) && this.#u.value.actionLoading == r.actionId && this.#y({ actionLoading: void 0 });
1307
+ this.#x(t, n) && this.#d.value.actionLoading == r.actionId && this.#b({ actionLoading: void 0 });
1277
1308
  }
1278
1309
  }
1279
1310
  async connect(e) {
1280
- if (this.#m) return;
1281
- let t = this.#d.$.flowId.value;
1311
+ if (this.#h) return;
1312
+ let t = this.#f.$.flowId.value;
1282
1313
  if (t == null) return;
1283
- let n = this.#u.value.catalogs[e];
1314
+ let n = this.#d.value.catalogs[e];
1284
1315
  try {
1285
1316
  if (!await this.#n.openExternalPage(() => this.#e.createConnectorConnectionPage(e, t))) {
1286
- this.#l({
1317
+ this.#u({
1287
1318
  kind: "error",
1288
1319
  message: this.#t.t("notice.connectionPopupBlocked")
1289
1320
  });
1290
1321
  return;
1291
1322
  }
1292
- if (this.#m || t != this.#d.$.flowId.value) return;
1293
- this.#f = {
1323
+ if (this.#h || t != this.#f.$.flowId.value) return;
1324
+ this.#p = {
1294
1325
  connectionIds: new Set(n?.all.map((e) => e.connectionId)),
1295
1326
  serviceId: e
1296
- }, this.#y({ authorizationServiceId: e });
1327
+ }, this.#b({ authorizationServiceId: e });
1297
1328
  } catch (e) {
1298
- this.#m || this.#l(x(e, this.#t.t));
1329
+ this.#h || this.#u(D(e, this.#t.t));
1299
1330
  }
1300
1331
  }
1301
1332
  async setConnection(e, t) {
1302
- return await this.#d.setConnectorConnection(e, t);
1333
+ return await this.#f.setConnectorConnection(e, t);
1303
1334
  }
1304
1335
  async refreshAfterAuthorization() {
1305
- if (this.#m || this.#f == null) return;
1306
- let e = this.#f.serviceId;
1307
- this.#r.delete(e), this.#y({ authorizationServiceId: void 0 }), this.$.selectedAction.value?.serviceId == e && await this.refresh(!0), !this.#m && this.#f?.serviceId == e && (this.#f = void 0);
1336
+ if (this.#h || this.#p == null) return;
1337
+ let e = this.#p.serviceId;
1338
+ this.#r.delete(e), this.#b({ authorizationServiceId: void 0 }), this.$.selectedAction.value?.serviceId == e && await this.refresh(!0), !this.#h && this.#p?.serviceId == e && (this.#p = void 0);
1308
1339
  }
1309
- async #h(e, t) {
1310
- let n = this.#u.value.actions[e];
1311
- return !t && n != null ? n : await this.#e.getConnectorAction(e, void 0, this.#d.$.flowId.value);
1340
+ async #g(e, t) {
1341
+ let n = this.#d.value.actions[e];
1342
+ return !t && n != null ? n : await this.#e.getConnectorAction(e, void 0, this.#f.$.flowId.value);
1312
1343
  }
1313
- async #g(e, t, n, r, i) {
1314
- this.#y({ connectionLoading: n });
1344
+ async #_(e, t, n, r, i) {
1345
+ this.#b({ connectionLoading: n });
1315
1346
  try {
1316
- let a = await this.#_(e, n, r, i);
1317
- if (a == null || !this.#b(i, e)) return;
1318
- await this.#v(t, n, a);
1347
+ let a = await this.#v(e, n, r, i);
1348
+ if (a == null || !this.#x(i, e)) return;
1349
+ await this.#y(t, n, a);
1319
1350
  } finally {
1320
- this.#b(i, e) && this.#u.value.connectionLoading == n && this.#y({ connectionLoading: void 0 });
1351
+ this.#x(i, e) && this.#d.value.connectionLoading == n && this.#b({ connectionLoading: void 0 });
1321
1352
  }
1322
1353
  }
1323
- async #_(e, t, n, r) {
1324
- let i = this.#u.value.catalogs[t];
1354
+ async #v(e, t, n, r) {
1355
+ let i = this.#d.value.catalogs[t];
1325
1356
  if (!n && i != null) return i;
1326
1357
  let a;
1327
1358
  try {
1328
1359
  a = await this.#e.listConnectorConnections(t, void 0, e);
1329
1360
  } catch (n) {
1330
- this.#b(r, e) && this.#y({ connectionError: {
1331
- message: x(n, this.#t.t).message,
1361
+ this.#x(r, e) && this.#b({ connectionError: {
1362
+ message: D(n, this.#t.t).message,
1332
1363
  serviceId: t
1333
1364
  } });
1334
1365
  return;
1335
1366
  }
1336
- if (!this.#b(r, e)) return;
1367
+ if (!this.#x(r, e)) return;
1337
1368
  let o = C(a);
1338
- return this.#y({ catalogs: {
1339
- ...this.#u.value.catalogs,
1369
+ return this.#b({ catalogs: {
1370
+ ...this.#d.value.catalogs,
1340
1371
  [t]: o
1341
1372
  } }), o;
1342
1373
  }
1343
- async #v(e, t, n) {
1344
- let r = this.#f?.serviceId == t ? this.#f : void 0, i = r == null ? [] : n.active.filter((e) => !r.connectionIds.has(e.connectionId)), a = i.length == 1 ? i[0] : n.preferred, o = this.#d.$.revision.value?.task(e.taskId);
1345
- a != null && this.#d.$.selectedNodeIds.value.includes(e.nodeId) && o != null && "executor" in o && o.executor.kind == "connector" && o.executor.connectionId == null && await this.#d.setConnectorConnection(e.taskId, a.connectionId);
1374
+ async #y(e, t, n) {
1375
+ let r = this.#p?.serviceId == t ? this.#p : void 0, i = r == null ? [] : n.active.filter((e) => !r.connectionIds.has(e.connectionId)), a = i.length == 1 ? i[0] : n.preferred, o = this.#f.$.revision.value?.task(e.taskId);
1376
+ a != null && this.#f.$.selectedNodeIds.value.includes(e.nodeId) && o != null && "executor" in o && o.executor.kind == "connector" && o.executor.connectionId == null && await this.#f.setConnectorConnection(e.taskId, a.connectionId);
1346
1377
  }
1347
- #y(e) {
1348
- this.#m || this.#u.set({
1349
- ...this.#u.value,
1378
+ #b(e) {
1379
+ this.#h || this.#d.set({
1380
+ ...this.#d.value,
1350
1381
  ...e
1351
1382
  });
1352
1383
  }
1353
- #b(e, t) {
1354
- return !this.#m && e() && t == this.#d.$.flowId.value;
1384
+ #x(e, t) {
1385
+ return !this.#h && e() && t == this.#f.$.flowId.value;
1355
1386
  }
1356
- async #x() {
1357
- if (this.#m) return;
1358
- let e = this.#a.capture(), t = this.#d.$.flowId.value, n = this.#d.$.revision.value;
1387
+ async #S() {
1388
+ if (this.#h) return;
1389
+ let e = this.#a.begin(), t = this.#f.$.flowId.value, n = this.#f.$.revision.value;
1359
1390
  if (t == null || n == null) return;
1360
- let r = [...n.connectorActionIds].filter((e) => this.#u.value.actions[e] == null && !this.#i.has(e));
1361
- if (r.length != 0) {
1391
+ let r = [...n.connectorActionIds].filter((e) => this.#d.value.actions[e] == null && !this.#i.has(e));
1392
+ if (r.length > 0) {
1362
1393
  for (let e of r) this.#i.add(e);
1363
1394
  try {
1364
1395
  let n = await Promise.all(r.map((e) => this.#e.getConnectorAction(e, void 0, t)));
1365
- if (!this.#b(e, t)) return;
1366
- let i = { ...this.#u.value.actions };
1396
+ if (!this.#x(e, t)) return;
1397
+ let i = { ...this.#d.value.actions };
1367
1398
  for (let e of n) i[e.actionId] = e;
1368
- this.#y({ actions: i });
1399
+ this.#b({ actions: i });
1369
1400
  } catch {
1370
1401
  return;
1371
1402
  } finally {
1372
1403
  for (let e of r) this.#i.delete(e);
1373
1404
  }
1374
1405
  }
1406
+ if (!this.#x(e, t)) return;
1407
+ let i = /* @__PURE__ */ new Set();
1408
+ for (let e of O(n.revision.content).tasks) {
1409
+ let t = n.task(e);
1410
+ if (t?.executor.kind != "connector") continue;
1411
+ let r = this.#d.value.actions[t.executor.action];
1412
+ r?.authenticated == 1 && i.add(r.serviceId);
1413
+ }
1414
+ await Promise.all([...i].map((n) => this.#v(t, n, !1, e)));
1375
1415
  }
1376
- }, bt = { catalogs: {} }, xt = "trigger:";
1377
- function Y(e, t) {
1416
+ }, Tt = { catalogs: {} }, Et = "trigger:";
1417
+ function Z(e, t) {
1378
1418
  if (e?.kind != "trigger") return;
1379
1419
  let n = e.trigger;
1380
1420
  if (n.kind != "poll" && n.kind != "integration") return;
@@ -1385,11 +1425,15 @@ function Y(e, t) {
1385
1425
  triggerId: e.id
1386
1426
  };
1387
1427
  }
1388
- function St(e, t) {
1428
+ function Dt(e, t) {
1389
1429
  return {
1390
1430
  description: t.t("addNode.triggerNeedsConnection", { provider: e.provider }),
1391
1431
  group: t.t("addNode.triggers"),
1392
- id: `${xt}${e.key}`,
1432
+ icon: T({
1433
+ serviceId: e.provider,
1434
+ serviceName: e.provider
1435
+ }),
1436
+ id: `${Et}${e.key}`,
1393
1437
  inputs: [],
1394
1438
  kind: "trigger",
1395
1439
  label: e.displayName,
@@ -1403,7 +1447,7 @@ function St(e, t) {
1403
1447
  }
1404
1448
  };
1405
1449
  }
1406
- var Ct = class {
1450
+ var Ot = class {
1407
1451
  #e;
1408
1452
  #t;
1409
1453
  #n;
@@ -1415,12 +1459,12 @@ var Ct = class {
1415
1459
  #c;
1416
1460
  #l;
1417
1461
  #u;
1418
- constructor(r, i, a, o, s = T()) {
1419
- this.#t = new AbortController(), this.#a = new N(), this.#c = t(bt), this.#u = !1, this.browseAddNodeOptions = async (e) => {
1462
+ constructor(r, i, a, o, s = R()) {
1463
+ this.#t = new AbortController(), this.#a = new I(), this.#c = t(Tt), this.#u = !1, this.browseAddNodeOptions = async (e) => {
1420
1464
  let t = this.#l.$.flowId.value;
1421
1465
  if (e.aborted || this.#u || t == null || this.#l.$.target.value?.kind != "flow") return [];
1422
1466
  let n = await this.#d();
1423
- if (!(e.aborted || this.#u || t != this.#l.$.flowId.value)) return [...n.values()].map((e) => St(e, this.#i));
1467
+ if (!(e.aborted || this.#u || t != this.#l.$.flowId.value)) return [...n.values()].map((e) => Dt(e, this.#i));
1424
1468
  }, this.provideAddNodeOptions = async (e, t) => {
1425
1469
  let n = this.#l.$.flowId.value;
1426
1470
  if (t.aborted || this.#u || n == null || this.#l.$.target.value?.kind != "flow") return [];
@@ -1434,9 +1478,9 @@ var Ct = class {
1434
1478
  e.name,
1435
1479
  e.provider,
1436
1480
  e.type
1437
- ].some((e) => e.toLowerCase().includes(r))).map((e) => St(e, this.#i));
1481
+ ].some((e) => e.toLowerCase().includes(r))).map((e) => Dt(e, this.#i));
1438
1482
  }, this.#n = r, this.#r = o, this.#i = s, this.#s = a, this.#l = i, this.#o = n((e) => {
1439
- let t = e(i.$.selection), n = Y(t, i), r = e(this.#c);
1483
+ let t = e(i.$.selection), n = Z(t, i), r = e(this.#c);
1440
1484
  if (t?.kind != "trigger") return { authorizationPending: !1 };
1441
1485
  let a = t.trigger;
1442
1486
  if (a.kind != "poll" && a.kind != "integration") return { authorizationPending: !1 };
@@ -1463,10 +1507,10 @@ var Ct = class {
1463
1507
  this.#o.dispose(), this.#c.dispose();
1464
1508
  }
1465
1509
  reset() {
1466
- this.#u || (this.#t.abort(), this.#t = new AbortController(), this.#e = void 0, this.#a.invalidate(), this.#c.set(bt));
1510
+ this.#u || (this.#t.abort(), this.#t = new AbortController(), this.#e = void 0, this.#a.invalidate(), this.#c.set(Tt));
1467
1511
  }
1468
1512
  async refresh(e = !1) {
1469
- let t = this.#a.begin(), n = this.#l.$.flowId.value, r = Y(this.#l.$.selection.value, this.#l);
1513
+ let t = this.#a.begin(), n = this.#l.$.flowId.value, r = Z(this.#l.$.selection.value, this.#l);
1470
1514
  if (!this.#u) {
1471
1515
  if (n == null || r == null) {
1472
1516
  this.#c.value.connectionLoading != null && this.#f({ connectionLoading: void 0 });
@@ -1486,7 +1530,7 @@ var Ct = class {
1486
1530
  } });
1487
1531
  } catch (e) {
1488
1532
  this.#p(t, n) && this.#f({ connectionError: {
1489
- message: x(e, this.#i.t).message,
1533
+ message: D(e, this.#i.t).message,
1490
1534
  provider: r.provider
1491
1535
  } });
1492
1536
  } finally {
@@ -1507,7 +1551,7 @@ var Ct = class {
1507
1551
  }
1508
1552
  !this.#u && t == this.#l.$.flowId.value && this.#f({ authorizationProvider: e });
1509
1553
  } catch (e) {
1510
- this.#u || this.#s(x(e, this.#i.t));
1554
+ this.#u || this.#s(D(e, this.#i.t));
1511
1555
  }
1512
1556
  }
1513
1557
  async setConnection(e, t) {
@@ -1523,7 +1567,7 @@ var Ct = class {
1523
1567
  delete t[e], this.#f({
1524
1568
  authorizationProvider: void 0,
1525
1569
  catalogs: t
1526
- }), Y(this.#l.$.selection.value, this.#l)?.provider == e && await this.refresh(!0);
1570
+ }), Z(this.#l.$.selection.value, this.#l)?.provider == e && await this.refresh(!0);
1527
1571
  }
1528
1572
  #d() {
1529
1573
  if (this.#e != null) return this.#e;
@@ -1543,46 +1587,28 @@ var Ct = class {
1543
1587
  }
1544
1588
  };
1545
1589
  //#endregion
1546
- //#region src/workbench/browser/runtime/designer/remoteChangeTargets.ts
1547
- function wt(e, t) {
1548
- return e.kind == t.kind && (e.kind != "subflow" || t.kind == "subflow" && e.id == t.id);
1549
- }
1550
- function X(e, t, n, r) {
1551
- for (let [i, a] of Object.entries(t.graph(n)?.nodes ?? {})) r(a) && e.add(i);
1552
- }
1553
- function Tt(e, t, n, r) {
1554
- let i = /* @__PURE__ */ new Set();
1555
- for (let a of r) switch (a.kind) {
1556
- case "graph.node.create":
1557
- case "graph.node.replace":
1558
- wt(a.target, n) && i.add(a.nodeId);
1559
- break;
1560
- case "task.replace":
1561
- X(i, e, n, (e) => e.kind == "task" && e.task == null && e.taskId == a.taskId), X(i, t, n, (e) => e.kind == "task" && e.task == null && e.taskId == a.taskId);
1562
- break;
1563
- case "module.source.replace":
1564
- X(i, e, n, (e) => e.kind == "task" && e.task?.moduleId == a.moduleId), X(i, t, n, (e) => e.kind == "task" && e.task?.moduleId == a.moduleId);
1565
- break;
1566
- case "subflow.definition.replace": X(i, e, n, (e) => e.kind == "subflow" && e.subflowId == a.subflowId), X(i, t, n, (e) => e.kind == "subflow" && e.subflowId == a.subflowId);
1567
- }
1568
- return new Set([...i].filter((e) => t.selection(n, e) != null));
1569
- }
1570
- //#endregion
1571
1590
  //#region src/workbench/browser/runtime/stores/draftChanges.ts
1572
- function Et(e) {
1573
- if (e.length != 1) return;
1574
- let t = e[0];
1575
- switch (t.kind) {
1576
- case "binding.replace": return `${t.kind}:${t.bindingId}`;
1577
- case "graph.node.replace": return `${t.kind}:${t.target.kind}:${t.target.kind == "subflow" ? t.target.id : ""}:${t.nodeId}`;
1578
- case "module.rename":
1579
- case "module.source.replace": return `${t.kind}:${t.moduleId}`;
1580
- case "subflow.definition.replace": return `${t.kind}:${t.subflowId}`;
1581
- case "task.replace": return `${t.kind}:${t.taskId}`;
1582
- default: return;
1583
- }
1591
+ function kt(e, t) {
1592
+ if (e.length != 1 || t.length != 1) return;
1593
+ let n = e[0], r = t[0];
1594
+ if (n?.kind == "graph.node.field.set" && r?.kind == "graph.node.field.set") return n.nodeId != r.nodeId || n.field != r.field || n.target.kind != r.target.kind || n.target.kind == "subflow" && (r.target.kind != "subflow" || n.target.id != r.target.id) ? void 0 : [{
1595
+ before: n.before,
1596
+ field: r.field,
1597
+ kind: r.kind,
1598
+ nodeId: r.nodeId,
1599
+ target: r.target,
1600
+ value: r.value
1601
+ }];
1602
+ if (n?.kind == "graph.node.input.set" && r?.kind == "graph.node.input.set") return n.nodeId != r.nodeId || n.handle != r.handle || n.target.kind != r.target.kind || n.target.kind == "subflow" && (r.target.kind != "subflow" || n.target.id != r.target.id) ? void 0 : [{
1603
+ before: n.before,
1604
+ handle: r.handle,
1605
+ kind: r.kind,
1606
+ nodeId: r.nodeId,
1607
+ target: r.target,
1608
+ value: r.value
1609
+ }];
1584
1610
  }
1585
- var Dt = class {
1611
+ var At = class {
1586
1612
  #e;
1587
1613
  #t;
1588
1614
  #n;
@@ -1608,39 +1634,49 @@ var Dt = class {
1608
1634
  }
1609
1635
  replaceCommitted(e) {
1610
1636
  this.#a = e;
1637
+ let t = e, n = [];
1638
+ for (let e of this.#o) try {
1639
+ t = V(t, e.changes), n.push(e);
1640
+ } catch (t) {
1641
+ if (!(t instanceof h)) throw t;
1642
+ e.active = !1;
1643
+ }
1644
+ return this.#o = n, t;
1611
1645
  }
1612
1646
  project(e) {
1613
- return this.#o.reduce((e, t) => P(e, t.changes), e);
1647
+ return this.#o.reduce((e, t) => V(e, t.changes), e);
1614
1648
  }
1615
1649
  enqueue(e) {
1616
1650
  let t = this.#s.then(e);
1617
1651
  return this.#s = t, t;
1618
1652
  }
1619
1653
  async change(e, t, n, r = !0) {
1620
- this.#t.beforeChange(r), this.#t.apply(P(t, n));
1621
- let i = Et(n), a = this.#o.at(-1), o = i != null && a != null && !a.started && Et(a.changes) == i ? a : void 0;
1622
- if (o != null) return o.changes = n, await o.result;
1623
- let s = {
1654
+ let i = this.#o.at(-1), a = i == null || i.started || !i.active ? void 0 : kt(i.changes, n);
1655
+ if (i != null && a != null) return i.changes = a, this.#a != null && this.#t.apply(this.project(this.#a)), i.result;
1656
+ this.#t.beforeChange(r);
1657
+ let o = {
1624
1658
  ...e,
1659
+ active: !0,
1660
+ changeId: crypto.randomUUID(),
1625
1661
  changes: n,
1626
1662
  started: !1
1627
1663
  };
1628
- this.#a ??= t, this.#o.push(s), this.#i += 1;
1629
- let c = this.#s.then(() => (s.started = !0, this.#c(s)));
1630
- s.result = c, this.#s = c.then(() => void 0);
1664
+ this.#a ??= t, this.#o.push(o), this.#t.apply(this.project(this.#a)), this.#i += 1;
1665
+ let s = this.#s.then(() => (o.started = !0, this.#c(o)));
1666
+ o.result = s, this.#s = s.then(() => void 0);
1631
1667
  try {
1632
- return await c;
1668
+ return await s;
1633
1669
  } finally {
1634
1670
  --this.#i, this.#i == 0 && this.#t.finishChanges();
1635
1671
  }
1636
1672
  }
1637
1673
  async #c(e) {
1638
1674
  let t = !1;
1639
- for (; this.#t.current(e);) {
1675
+ for (; e.active && this.#t.current(e);) {
1640
1676
  let n = this.#a;
1641
1677
  if (n == null) return;
1642
1678
  try {
1643
- let t = await this.#e.changeDraft(e.flowId, n.revisionId, e.changes);
1679
+ let t = await this.#e.changeDraft(e.flowId, n.revisionId, e.changes, e.changeId);
1644
1680
  if (!this.#t.current(e)) return;
1645
1681
  if (t.revision.parentRevisionId != n.revisionId) throw Error("Invalid Draft change response.");
1646
1682
  let r = this.#l(e, n, t);
@@ -1648,14 +1684,20 @@ var Dt = class {
1648
1684
  } catch (n) {
1649
1685
  if (n instanceof B && n.code == "flow.revision-conflict") {
1650
1686
  if (!t && await this.#t.recover(e)) {
1651
- t = !0;
1687
+ t = !0, e.changeId = crypto.randomUUID();
1652
1688
  continue;
1653
1689
  }
1654
- t && await this.#t.recover(e), this.#u(e), this.#t.current(e) && this.#r({
1655
- kind: "error",
1656
- message: this.#n.t("notice.draftConflict")
1657
- });
1658
- } else this.#u(e), this.#t.current(e) && this.#r(x(n, this.#n.t));
1690
+ t && await this.#t.recover(e), this.#u(e);
1691
+ } else {
1692
+ if (!(n instanceof B) && !t) {
1693
+ let n = this.#a?.revisionId;
1694
+ if (await this.#t.recover(e)) {
1695
+ t = !0, e.active && this.#a?.revisionId != n && (e.changeId = crypto.randomUUID());
1696
+ continue;
1697
+ }
1698
+ }
1699
+ this.#u(e), this.#t.current(e) && this.#r(D(n, this.#n.t));
1700
+ }
1659
1701
  return;
1660
1702
  }
1661
1703
  }
@@ -1663,28 +1705,28 @@ var Dt = class {
1663
1705
  #l(e, t, n) {
1664
1706
  let r = {
1665
1707
  ...n.revision,
1666
- content: P(t, e.changes).content
1708
+ content: V(t, e.changes).content
1667
1709
  };
1668
1710
  this.#o = this.#o.filter((t) => t !== e), this.#a = r;
1669
1711
  let i = this.#t.diagnostics(), a = this.#o.length == 0 && i?.revisionId == r.revisionId;
1670
1712
  return this.#t.apply(this.project(r), a), this.#t.headChanged(e.flowId, r.revisionId), r;
1671
1713
  }
1672
1714
  #u(e) {
1673
- this.#o = this.#o.filter((t) => t !== e), !(!this.#t.current(e) || this.#a == null) && this.#t.apply(this.project(this.#a));
1715
+ e.active = !1, this.#o = this.#o.filter((t) => t !== e), !(!this.#t.current(e) || this.#a == null) && this.#t.apply(this.project(this.#a));
1674
1716
  }
1675
- }, Ot = 50, kt = {
1717
+ }, jt = 50, Mt = {
1676
1718
  failed: !1,
1677
1719
  loaded: !1,
1678
1720
  loading: !0,
1679
1721
  loadingMore: !1,
1680
1722
  loadMoreFailed: !1,
1681
1723
  flows: []
1682
- }, At = class {
1724
+ }, Nt = class {
1683
1725
  #e;
1684
1726
  #t;
1685
- #n = new N();
1727
+ #n = new I();
1686
1728
  #r;
1687
- #i = t(kt);
1729
+ #i = t(Mt);
1688
1730
  #a = !1;
1689
1731
  constructor(t, n, r) {
1690
1732
  this.#e = t, this.#t = r, this.#r = n, this.$ = {
@@ -1726,7 +1768,7 @@ var Dt = class {
1726
1768
  try {
1727
1769
  let t = await this.#e.listFlows({
1728
1770
  includeTotal: !0,
1729
- limit: Ot
1771
+ limit: jt
1730
1772
  });
1731
1773
  if (!e()) return;
1732
1774
  this.#o({
@@ -1741,7 +1783,7 @@ var Dt = class {
1741
1783
  this.#o({
1742
1784
  failed: !0,
1743
1785
  loading: !1
1744
- }), this.#r(x(t, this.#t.t));
1786
+ }), this.#r(D(t, this.#t.t));
1745
1787
  }
1746
1788
  }
1747
1789
  async loadMore() {
@@ -1755,7 +1797,7 @@ var Dt = class {
1755
1797
  try {
1756
1798
  let e = await this.#e.listFlows({
1757
1799
  cursor: t,
1758
- limit: Ot
1800
+ limit: jt
1759
1801
  });
1760
1802
  if (!n()) return;
1761
1803
  let r = new Set(this.#i.value.flows.map((e) => e.flowId));
@@ -1769,7 +1811,7 @@ var Dt = class {
1769
1811
  this.#o({
1770
1812
  loadingMore: !1,
1771
1813
  loadMoreFailed: !0
1772
- }), this.#r(x(e, this.#t.t));
1814
+ }), this.#r(D(e, this.#t.t));
1773
1815
  }
1774
1816
  }
1775
1817
  async create(e) {
@@ -1811,7 +1853,7 @@ var Dt = class {
1811
1853
  ...e
1812
1854
  });
1813
1855
  }
1814
- }, jt = class {
1856
+ }, Pt = class {
1815
1857
  #e;
1816
1858
  #t;
1817
1859
  #n;
@@ -1862,9 +1904,9 @@ var Dt = class {
1862
1904
  message: this.#t.t("notice.layoutConflict")
1863
1905
  });
1864
1906
  } catch (e) {
1865
- !this.#o && n() && this.#n(x(e, this.#t.t));
1907
+ !this.#o && n() && this.#n(D(e, this.#t.t));
1866
1908
  }
1867
- else this.#c(a, t), this.#n(x(r, this.#t.t));
1909
+ else this.#c(a, t), this.#n(D(r, this.#t.t));
1868
1910
  }
1869
1911
  }), await this.#i;
1870
1912
  }
@@ -1876,21 +1918,21 @@ var Dt = class {
1876
1918
  value: n
1877
1919
  });
1878
1920
  }
1879
- }, Mt = {
1921
+ }, Ft = {
1880
1922
  checkLoading: !1,
1881
1923
  selectedNodeIds: [],
1882
1924
  workspaceLoadFailed: !1,
1883
1925
  workspaceLoading: !1
1884
1926
  };
1885
- function Nt(e) {
1927
+ function It(e) {
1886
1928
  return e.workspaceLoading ? "loading" : e.busy == "designer" ? "saving" : e.draft == null ? "noDraft" : "saved";
1887
1929
  }
1888
- function Z(e, t) {
1930
+ function Q(e, t) {
1889
1931
  if (t.phase != null) return t.phase;
1890
1932
  let n = e?.content.modules[t.moduleId];
1891
1933
  return n == null ? "failed" : t.source == n.source ? "saved" : "dirty";
1892
1934
  }
1893
- function Q(e, t, n) {
1935
+ function $(e, t, n) {
1894
1936
  if (e == null || t == null || n.length != 1) return;
1895
1937
  let r = e.node(t, n[0]);
1896
1938
  if (!(r?.kind != "task" || r.definition == null || !("moduleId" in r.definition) || r.module == null)) return {
@@ -1898,9 +1940,9 @@ function Q(e, t, n) {
1898
1940
  source: r.module.source
1899
1941
  };
1900
1942
  }
1901
- var Pt = class {
1943
+ var Lt = class {
1902
1944
  #e;
1903
- #t = t(Mt);
1945
+ #t = t(Ft);
1904
1946
  #n;
1905
1947
  constructor(t, r) {
1906
1948
  let i = e(this.#t, (e) => e.busy), a = e(this.#t, (e) => e.checkLoading), o = e(this.#t, (e) => e.diagnosticFocus), s = e(this.#t, (e) => e.diagnostics), c = e(this.#t, (e) => e.draft), l = e(this.#t, (e) => {
@@ -1908,25 +1950,25 @@ var Pt = class {
1908
1950
  let { phase: t, ...n } = e.moduleEditor;
1909
1951
  return {
1910
1952
  ...n,
1911
- status: Z(e.draft, e.moduleEditor)
1953
+ status: Q(e.draft, e.moduleEditor)
1912
1954
  };
1913
- }), u = e(this.#t, (e) => e.nodeFocus), d = e(this.#t, (e) => e.presentation), f = e(this.#t, (e) => e.flowId), p = e(this.#t, (e) => e.live), m = e(this.#t, (e) => e.draft == null ? void 0 : z(e.draft)), h = e(this.#t, (e) => e.selectedNodeIds), g = e(this.#t, (e) => e.target), _ = e(this.#t, (e) => e.workspaceLoadFailed), v = e(this.#t, (e) => e.workspaceLoading);
1955
+ }), u = e(this.#t, (e) => e.nodeFocus), d = e(this.#t, (e) => e.presentation), f = e(this.#t, (e) => e.flowId), p = e(this.#t, (e) => e.live), m = e(this.#t, (e) => e.draft == null ? void 0 : L(e.draft)), h = e(this.#t, (e) => e.selectedNodeIds), g = e(this.#t, (e) => e.target), _ = e(this.#t, (e) => e.workspaceLoadFailed), v = e(this.#t, (e) => e.workspaceLoading);
1914
1956
  this.#e = e(this.#t, (e) => ({
1915
- revision: e.draft == null ? void 0 : z(e.draft),
1957
+ revision: e.draft == null ? void 0 : L(e.draft),
1916
1958
  target: e.target
1917
1959
  }), { equal: (e, t) => e.revision === t.revision && e.target === t.target });
1918
1960
  let y = e(this.#t, (e) => {
1919
- if (e.draft != null && e.target != null && e.selectedNodeIds.length == 1) return z(e.draft).selection(e.target, e.selectedNodeIds[0]);
1961
+ if (e.draft != null && e.target != null && e.selectedNodeIds.length == 1) return L(e.draft).selection(e.target, e.selectedNodeIds[0]);
1920
1962
  });
1921
1963
  this.$ = {
1922
1964
  addNodeOptions: n((e) => {
1923
1965
  let { revision: n, target: r } = e(this.#e);
1924
- return Ae(n?.revision, r, e(t.t$));
1966
+ return Pe(n?.revision, r, e(t.t$));
1925
1967
  }),
1926
1968
  busy: i,
1927
1969
  checkLoading: a,
1928
1970
  diagnosticFocus: o,
1929
- diagnosticItems: e(this.#t, (e) => Ce(e.draft == null ? void 0 : z(e.draft), e.target, e.diagnostics)),
1971
+ diagnosticItems: e(this.#t, (e) => E(e.draft == null ? void 0 : L(e.draft), e.target, e.diagnostics)),
1930
1972
  diagnostics: s,
1931
1973
  draft: c,
1932
1974
  flow: n((e) => {
@@ -1941,7 +1983,7 @@ var Pt = class {
1941
1983
  flowNextCursor: r.$.nextCursor,
1942
1984
  flowTotal: r.$.total,
1943
1985
  flows: r.$.flows,
1944
- inspectorDiagnostics: e(this.#t, (e) => De(e.draft == null ? void 0 : z(e.draft), e.target, e.diagnostics, y.value)),
1986
+ inspectorDiagnostics: e(this.#t, (e) => te(e.draft == null ? void 0 : L(e.draft), e.target, e.diagnostics, y.value)),
1945
1987
  live: p,
1946
1988
  moduleDiagnostics: e(this.#t, (e) => {
1947
1989
  let t = e.moduleEditor?.moduleId;
@@ -1953,11 +1995,11 @@ var Pt = class {
1953
1995
  revision: m,
1954
1996
  selection: y,
1955
1997
  selectedNodeIds: h,
1956
- status: e(this.#t, Nt),
1998
+ status: e(this.#t, It),
1957
1999
  target: g,
1958
2000
  targetFlow: n((e) => e(g)?.kind == "flow" ? e(r.$.flows).find((t) => t.flowId == e(f)) : void 0),
1959
2001
  targetName: e(this.#t, (e) => {
1960
- if (e.target != null) return e.target.kind == "flow" ? r.flow(e.flowId ?? "")?.name : e.draft == null ? e.target.id : z(e.draft).subflow(e.target.id)?.name ?? e.target.id;
2002
+ if (e.target != null) return e.target.kind == "flow" ? r.flow(e.flowId ?? "")?.name : e.draft == null ? e.target.id : L(e.draft).subflow(e.target.id)?.name ?? e.target.id;
1961
2003
  }),
1962
2004
  workspaceLoadFailed: _,
1963
2005
  workspaceLoading: v
@@ -1976,17 +2018,16 @@ var Pt = class {
1976
2018
  for (let e of Object.values(this.$)) this.#n.has(e) || e.dispose();
1977
2019
  this.#e.dispose(), this.#t.dispose();
1978
2020
  }
1979
- }, Ft = 250;
1980
- function It(e, t) {
2021
+ };
2022
+ //#endregion
2023
+ //#region src/workbench/browser/runtime/stores/workspaceStore.ts
2024
+ function Rt(e, t) {
1981
2025
  if (t != null) return t.kind == "flow" || e.subflow(t.id) != null ? t : { kind: "flow" };
1982
2026
  }
1983
- function $(e, t) {
1984
- return e?.kind == t?.kind ? e?.kind != "subflow" || t?.kind == "subflow" && e.id == t.id : !1;
1985
- }
1986
- var Lt = class {
2027
+ var zt = class {
1987
2028
  #e;
1988
2029
  #t;
1989
- #n = new N();
2030
+ #n = new I();
1990
2031
  #r;
1991
2032
  #i;
1992
2033
  #a;
@@ -1997,36 +2038,33 @@ var Lt = class {
1997
2038
  #u;
1998
2039
  #d = 0;
1999
2040
  #f = 0;
2000
- #p;
2001
- #m = 0;
2041
+ #p = !1;
2042
+ #m = !1;
2002
2043
  #h = !1;
2003
- #g = !1;
2004
- #_ = !1;
2005
- #v = !1;
2006
- #y = 0;
2007
- #b;
2008
- #x;
2009
- constructor(e, t, n = it, r = T(), i = () => {}) {
2010
- this.#e = e, this.#c = t, this.#i = n, this.#r = r, this.#s = i, this.#o = new At(e, t, r), this.#l = new Pt(r, this.#o), this.#t = new Dt(e, t, r, {
2011
- apply: (e, t) => this.#w(e, t),
2044
+ #g = 0;
2045
+ #_;
2046
+ #v;
2047
+ constructor(e, t, n = ct, r = R(), i = () => {}) {
2048
+ this.#e = e, this.#c = t, this.#i = n, this.#r = r, this.#s = i, this.#o = new Nt(e, t, r), this.#l = new Lt(r, this.#o), this.#t = new At(e, t, r, {
2049
+ apply: (e, t) => this.#x(e, t),
2012
2050
  beforeChange: (e) => {
2013
- this.#M(), this.#h = !1, e && (this.#B({ busy: "designer" }), this.#c(void 0));
2051
+ e && (this.#N({ busy: "designer" }), this.#c(void 0));
2014
2052
  },
2015
- check: () => void this.#E(),
2016
- current: (e) => this.#z(e),
2053
+ check: () => void this.#C(),
2054
+ current: (e) => this.#M(e),
2017
2055
  diagnostics: () => this.#l.value.diagnostics,
2018
2056
  finishChanges: () => {
2019
- !this.#_ && this.#l.value.busy == "designer" && this.#B({ busy: void 0 });
2057
+ !this.#m && this.#l.value.busy == "designer" && this.#N({ busy: void 0 });
2020
2058
  },
2021
- headChanged: (e, t) => this.#N(e, t),
2022
- recover: (e) => this.#O(e, !0)
2023
- }), this.#a = new jt(e, t, (e) => this.#B({ presentation: e }), r), this.$ = this.#l.$;
2059
+ headChanged: (e, t) => this.#E(e, t),
2060
+ recover: (e) => this.#T(e, !0)
2061
+ }), this.#a = new Pt(e, t, (e) => this.#N({ presentation: e }), r), this.$ = this.#l.$;
2024
2062
  }
2025
2063
  dispose() {
2026
- this.#M(), this.#_ = !0, this.#n.invalidate(), this.#a.dispose(), this.#b?.(), this.#x?.(), this.#l.dispose(), this.#o.dispose();
2064
+ this.#m = !0, this.#n.invalidate(), this.#a.dispose(), this.#_?.(), this.#v?.(), this.#l.dispose(), this.#o.dispose();
2027
2065
  }
2028
2066
  async start(e) {
2029
- this.#b ??= this.#e.watchFlowCatalog(() => void this.reloadFlows()), await this.reloadFlows(), await this.selectFlow(e);
2067
+ this.#_ ??= this.#e.watchFlowCatalog(() => void this.reloadFlows()), await this.reloadFlows(), await this.selectFlow(e);
2030
2068
  }
2031
2069
  async reloadFlows() {
2032
2070
  await this.#o.reload();
@@ -2035,10 +2073,9 @@ var Lt = class {
2035
2073
  await this.#o.loadMore();
2036
2074
  }
2037
2075
  async selectFlow(e) {
2038
- if (!this.#F()) return !1;
2039
- this.#M();
2076
+ if (!this.#O()) return !1;
2040
2077
  let t = this.#n.begin();
2041
- if (this.#t.reset(), this.#a.reset(), this.#f = 0, this.#h = !1, this.#g = !1, this.#v = !1, this.#x?.(), this.#x = void 0, this.#B({
2078
+ if (this.#t.reset(), this.#a.reset(), this.#f = 0, this.#p = !1, this.#h = !1, this.#v?.(), this.#v = void 0, this.#N({
2042
2079
  checkLoading: !1,
2043
2080
  diagnosticFocus: void 0,
2044
2081
  diagnostics: void 0,
@@ -2061,78 +2098,78 @@ var Lt = class {
2061
2098
  this.#e.getPresentation(e)
2062
2099
  ]);
2063
2100
  if (!t()) return !1;
2064
- this.#t.reset(i), this.#a.reset(o), this.#o.include(r), this.#B({
2101
+ this.#t.reset(i), this.#a.reset(o), this.#o.include(r), this.#N({
2065
2102
  draft: i,
2066
2103
  live: a,
2067
2104
  presentation: o,
2068
2105
  target: { kind: "flow" },
2069
2106
  workspaceLoadFailed: !1,
2070
2107
  workspaceLoading: !1
2071
- }), this.#E(), this.#x = this.#e.watchFlow(e, (e) => {
2072
- !this.#_ && e != this.#t.committed?.revisionId && this.#D(e);
2108
+ }), this.#C(), this.#v = this.#e.watchFlow(e, (e) => {
2109
+ !this.#m && e != this.#t.committed?.revisionId && this.#w(e);
2073
2110
  }, this.#s);
2074
2111
  } catch (e) {
2075
- return t() ? (this.#B({
2112
+ return t() ? (this.#N({
2076
2113
  workspaceLoadFailed: !0,
2077
2114
  workspaceLoading: !1
2078
- }), this.#c(x(e, this.#r.t)), !1) : !1;
2115
+ }), this.#c(D(e, this.#r.t)), !1) : !1;
2079
2116
  }
2080
2117
  return !0;
2081
2118
  }
2082
2119
  selectTarget(e) {
2083
- return this.#F() ? (this.#M(), this.#B({
2120
+ return this.#O() ? (this.#N({
2084
2121
  diagnosticFocus: void 0,
2085
2122
  diagnostics: void 0,
2086
2123
  moduleEditor: void 0,
2087
2124
  nodeFocus: void 0,
2088
2125
  selectedNodeIds: [],
2089
2126
  target: e
2090
- }), this.#E(), !0) : !1;
2127
+ }), this.#C(), !0) : !1;
2091
2128
  }
2092
2129
  selectNodes(e) {
2093
- return e.length == this.#l.value.selectedNodeIds.length && e.every((e, t) => e == this.#l.value.selectedNodeIds[t]) ? !0 : this.#F() ? (this.#M(), this.#B({
2130
+ return e.length == this.#l.value.selectedNodeIds.length && e.every((e, t) => e == this.#l.value.selectedNodeIds[t]) ? !0 : this.#O() ? (this.#N({
2094
2131
  diagnosticFocus: void 0,
2095
- moduleEditor: Q(this.#l.value.draft == null ? void 0 : z(this.#l.value.draft), this.#l.value.target, e),
2132
+ moduleEditor: $(this.#l.value.draft == null ? void 0 : L(this.#l.value.draft), this.#l.value.target, e),
2096
2133
  nodeFocus: void 0,
2097
2134
  selectedNodeIds: e
2098
2135
  }), !0) : !1;
2099
2136
  }
2100
2137
  async createFlow(e, t) {
2101
- if (this.#F()) {
2102
- this.#B({ busy: "flow" }), this.#c(void 0);
2138
+ if (this.#O()) {
2139
+ this.#N({ busy: "flow" }), this.#c(void 0);
2103
2140
  try {
2104
2141
  if (t == null) return await this.#o.create(e);
2105
2142
  let n = await this.#e.getFlow(await t(e));
2106
2143
  return this.#o.insert(n), n;
2107
2144
  } catch (e) {
2108
- this.#_ || this.#c(x(e, this.#r.t));
2145
+ this.#m || this.#c(D(e, this.#r.t));
2109
2146
  } finally {
2110
- this.#B({ busy: void 0 });
2147
+ this.#N({ busy: void 0 });
2111
2148
  }
2112
2149
  }
2113
2150
  }
2114
2151
  async deleteFlow(e) {
2115
- if (!this.#F()) return !1;
2152
+ if (!this.#O()) return !1;
2116
2153
  let t = this.#o.flow(e);
2117
2154
  if (t == null || t.status == "retiring") return !1;
2118
- this.#B({ busy: "flow" }), this.#c(void 0);
2155
+ this.#N({ busy: "flow" }), this.#c(void 0);
2119
2156
  try {
2120
- return await this.#e.deleteFlow(e), !this.#_ && (this.#o.remove(e), this.#c({
2157
+ return await this.#e.deleteFlow(e), !this.#m && (this.#o.remove(e), this.#c({
2121
2158
  kind: "success",
2122
2159
  message: this.#r.t("notice.flowDeleteAccepted", { name: t.name })
2123
2160
  }), !0);
2124
2161
  } catch (e) {
2125
- return this.#_ || this.#c(x(e, this.#r.t)), !1;
2162
+ return this.#m || this.#c(D(e, this.#r.t)), !1;
2126
2163
  } finally {
2127
- this.#B({ busy: void 0 });
2164
+ this.#N({ busy: void 0 });
2128
2165
  }
2129
2166
  }
2130
2167
  async createResource(e) {
2131
- if (!this.#F() || this.#l.value.draft == null) return !1;
2168
+ if (!this.#O() || this.#l.value.draft == null) return !1;
2132
2169
  let t = this.#i();
2133
- this.#B({ busy: "resource" }), this.#c(void 0);
2134
- let n = await this.#C(ge(t, e), !1);
2135
- return this.#B({ busy: void 0 }), n != null && (this.selectTarget({
2170
+ this.#N({ busy: "resource" }), this.#c(void 0);
2171
+ let n = await this.#b(oe(t, e), !1);
2172
+ return this.#N({ busy: void 0 }), n != null && (this.selectTarget({
2136
2173
  id: t,
2137
2174
  kind: "subflow"
2138
2175
  }), this.#c({
@@ -2144,53 +2181,53 @@ var Lt = class {
2144
2181
  let n = this.#o.flow(e), r = t.trim();
2145
2182
  if (n == null || r.length == 0) return !1;
2146
2183
  if (n.name == r) return !0;
2147
- this.#B({ busy: "flow" }), this.#c(void 0);
2184
+ this.#N({ busy: "flow" }), this.#c(void 0);
2148
2185
  let i;
2149
2186
  try {
2150
2187
  i = await this.#e.renameFlow(e, r), i != null && this.#o.include(i);
2151
2188
  } catch (e) {
2152
- this.#_ || this.#c(x(e, this.#r.t));
2189
+ this.#m || this.#c(D(e, this.#r.t));
2153
2190
  }
2154
- return this.#B({ busy: void 0 }), i != null && (this.#c({
2191
+ return this.#N({ busy: void 0 }), i != null && (this.#c({
2155
2192
  kind: "success",
2156
2193
  message: this.#r.t("notice.flowRenamed", { name: r })
2157
2194
  }), !0);
2158
2195
  }
2159
2196
  async addNode(e, t, n) {
2160
- if (!this.#F()) return;
2197
+ if (!this.#O()) return;
2161
2198
  let r = this.#l.value.draft, i = this.#l.value.target;
2162
2199
  if (r == null || i == null) return;
2163
2200
  let a = this.#i();
2164
- if (e.kind == "comment") return await this.#S(i, a, t);
2165
- let o = z(r), s = S(e, o, i, this.#r.t);
2201
+ if (e.kind == "comment") return await this.#y(i, a, t);
2202
+ let o = L(r), s = ee(e, o, i, this.#r.t);
2166
2203
  if (s == null) return;
2167
- let c = be(o, i, a, s, this.#i);
2204
+ let c = je(o, i, a, s, this.#i);
2168
2205
  if (c == null) return;
2169
- let l = n == null ? c : [...c, ...$e(P(r, c).content, i, n(a))], u = this.#C(l);
2206
+ let l = n == null ? c : [...c, ...rt(V(r, c).content, i, n(a))], u = this.#b(l);
2170
2207
  this.selectNodes([a]);
2171
2208
  let d = this.moveNodes({ [a]: t });
2172
- if (await u != null && (await d, !this.#_)) return this.#B({ nodeFocus: {
2209
+ if (await u != null && (await d, !this.#m)) return this.#N({ nodeFocus: {
2173
2210
  nodeId: a,
2174
- requestId: ++this.#y
2211
+ requestId: ++this.#g
2175
2212
  } }), a;
2176
2213
  }
2177
2214
  async connect(e) {
2178
2215
  let t = this.$.revision.value, n = this.#l.value.target;
2179
2216
  if (t == null || n == null) return;
2180
- let r = $e(t.revision.content, n, e);
2181
- r.length > 0 && await this.#C(r);
2217
+ let r = rt(t.revision.content, n, e);
2218
+ r.length > 0 && await this.#b(r);
2182
2219
  }
2183
2220
  async disconnect(e) {
2184
2221
  let t = this.$.revision.value, n = this.#l.value.target;
2185
2222
  if (t == null || n == null) return;
2186
- let r = et(t.revision.content, n, e);
2187
- r.length > 0 && await this.#C(r);
2223
+ let r = it(t.revision.content, n, e);
2224
+ r.length > 0 && await this.#b(r);
2188
2225
  }
2189
2226
  async deleteSelectedNodes() {
2190
- if (!this.#F()) return;
2227
+ if (!this.#O()) return;
2191
2228
  let e = this.$.revision.value, t = this.#l.value.target;
2192
2229
  if (e == null || t == null || this.#l.value.selectedNodeIds.length == 0) return;
2193
- let n = te(this.#l.value.presentation?.value ?? {}, t), r = new Set(this.#l.value.selectedNodeIds.filter((e) => n.has(e))), i = xe(e, t, this.#l.value.selectedNodeIds), a = i.length == 0 ? void 0 : this.#C(i), o = r.size == 0 ? void 0 : this.#T((e) => y(e, t, r));
2230
+ let n = w(this.#l.value.presentation?.value ?? {}, t), r = new Set(this.#l.value.selectedNodeIds.filter((e) => n.has(e))), i = Ce(e, t, this.#l.value.selectedNodeIds), a = i.length == 0 ? void 0 : this.#b(i), o = r.size == 0 ? void 0 : this.#S((e) => S(e, t, r));
2194
2231
  this.selectNodes([]), (a == null || await a != null) && await o;
2195
2232
  }
2196
2233
  copySelectedNodes() {
@@ -2198,33 +2235,33 @@ var Lt = class {
2198
2235
  if (e == null || t == null || this.#l.value.selectedNodeIds.length == 0) return;
2199
2236
  let n = new Set(this.#l.value.selectedNodeIds);
2200
2237
  this.#u = {
2201
- comments: this.#P().nodes.flatMap((e) => e.kind == "comment" && n.has(e.id) ? [{
2238
+ comments: this.#D().nodes.flatMap((e) => e.kind == "comment" && n.has(e.id) ? [{
2202
2239
  content: e.content,
2203
2240
  position: e.position,
2204
2241
  sourceId: e.id,
2205
2242
  title: e.title
2206
2243
  }] : []),
2207
- nodes: Ee(e, t, this.#l.value.selectedNodeIds)
2244
+ nodes: _e(e, t, this.#l.value.selectedNodeIds)
2208
2245
  };
2209
2246
  }
2210
2247
  async pasteNodes(e) {
2211
- if (!this.#F()) return;
2248
+ if (!this.#O()) return;
2212
2249
  let t = this.$.revision.value, n = this.#l.value.target;
2213
2250
  if (t == null || n == null || this.#u == null) return;
2214
- let r = Oe(t, n, this.#u.nodes, this.#i), i = r.changes.length == 0 ? void 0 : this.#C(r.changes), a = this.#u.comments.map((e) => ({
2251
+ let r = ke(t, n, this.#u.nodes, this.#i), i = r.changes.length == 0 ? void 0 : this.#b(r.changes), a = this.#u.comments.map((e) => ({
2215
2252
  ...e,
2216
2253
  nodeId: this.#i()
2217
2254
  }));
2218
2255
  if (r.nodeIds.length == 0 && a.length == 0) return;
2219
- let o = new Map(this.#P().nodes.map((e) => [e.id, e])), s = Object.fromEntries(r.sourceIds.map((t, n) => {
2256
+ let o = new Map(this.#D().nodes.map((e) => [e.id, e])), s = Object.fromEntries(r.sourceIds.map((t, n) => {
2220
2257
  let i = e?.[t] ?? o.get(t)?.position;
2221
2258
  return [r.nodeIds[n], {
2222
2259
  x: (i?.x ?? 80) + 40,
2223
2260
  y: (i?.y ?? 80) + 40
2224
2261
  }];
2225
- })), c = this.#T((e) => {
2226
- let t = k(e, n, s);
2227
- for (let e of a) t = I(t, n, e.nodeId, {
2262
+ })), c = this.#S((e) => {
2263
+ let t = j(e, n, s);
2264
+ for (let e of a) t = z(t, n, e.nodeId, {
2228
2265
  content: e.content,
2229
2266
  position: {
2230
2267
  x: e.position.x + 40,
@@ -2242,56 +2279,66 @@ var Lt = class {
2242
2279
  async saveNodeSettings(e, t) {
2243
2280
  let n = this.$.revision.value, r = this.#l.value.target;
2244
2281
  if (n == null || r == null) return !1;
2245
- let i = ke(n, r, e, t);
2246
- return i != null && await this.#C(i) != null;
2282
+ let i = he(n, r, e, t);
2283
+ return i != null && await this.#b(i) != null;
2247
2284
  }
2248
2285
  async saveNodeDescription(e, t) {
2249
2286
  let n = this.$.revision.value, r = this.#l.value.target;
2250
2287
  if (n == null || r == null) return !1;
2251
- let i = ye(n, r, e, t);
2252
- return i != null && await this.#C(i) != null;
2288
+ let i = Te(n, r, e, t);
2289
+ return i != null && await this.#b(i) != null;
2253
2290
  }
2254
2291
  async saveNodeIcon(e, t) {
2255
2292
  let n = this.$.revision.value, r = this.#l.value.target;
2256
2293
  if (n == null || r == null) return !1;
2257
- let i = ve(n, r, e, t);
2258
- return i != null && await this.#C(i) != null;
2294
+ let i = xe(n, r, e, t);
2295
+ return i != null && await this.#b(i) != null;
2259
2296
  }
2260
2297
  async saveNodeTitle(e, t) {
2261
2298
  let n = this.$.revision.value, r = this.#l.value.target;
2262
2299
  if (n == null || r == null) return !1;
2263
- let i = me(n, r, e, t);
2264
- return i != null && await this.#C(i) != null;
2300
+ let i = ge(n, r, e, t);
2301
+ return i != null && await this.#b(i) != null;
2265
2302
  }
2266
2303
  async setInputValue(e, t, n) {
2267
2304
  let r = this.$.revision.value, i = this.#l.value.target;
2268
2305
  if (r == null || i == null) return !1;
2269
- let a = F(r, i, e, t, n);
2270
- return a != null && await this.#C(a) != null;
2306
+ let a = le(r, i, e, t, n);
2307
+ return a != null && await this.#b(a) != null;
2271
2308
  }
2272
2309
  async setInputVariable(e, t, n) {
2273
2310
  let r = this.$.revision.value, i = this.#l.value.target;
2274
2311
  if (r == null || i == null) return !1;
2275
- let a = n == null ? F(r, i, e, t, void 0) : _e(r, i, e, t, n, this.#i());
2276
- return a != null && await this.#C(a) != null;
2312
+ let a = n == null ? le(r, i, e, t, void 0) : ye(r, i, e, t, n, this.#i());
2313
+ return a != null && await this.#b(a) != null;
2277
2314
  }
2278
2315
  async saveCondition(e, t) {
2279
2316
  let n = this.$.revision.value, r = this.#l.value.target;
2280
2317
  if (n == null || r == null) return !1;
2281
- let i = Se(n, r, e, t);
2282
- return i != null && await this.#C(i) != null;
2318
+ let i = me(n, r, e, t);
2319
+ return i != null && await this.#b(i) != null;
2283
2320
  }
2284
2321
  async saveValue(e, t) {
2285
2322
  let n = this.$.revision.value, r = this.#l.value.target;
2286
2323
  if (n == null || r == null) return !1;
2287
- let i = Me(n, r, e, t);
2288
- return i != null && await this.#C(i) != null;
2324
+ let i = ce(n, r, e, t);
2325
+ return i != null && await this.#b(i) != null;
2326
+ }
2327
+ async saveWait(e, t) {
2328
+ let n = this.$.revision.value, r = this.#l.value.target;
2329
+ if (n == null || r?.kind != "flow") return !1;
2330
+ let i = Fe(n, r, e, t);
2331
+ return i != null && await this.#b(i) != null;
2332
+ }
2333
+ async setWaitNotification(e, t) {
2334
+ let n = this.$.revision.value, r = n == null ? void 0 : Me(n, e, t, this.#i());
2335
+ return r != null && await this.#b(r) != null;
2289
2336
  }
2290
2337
  async saveComment(e, t) {
2291
2338
  let n = this.#l.value.target;
2292
2339
  if (n == null) return;
2293
- let r = this.#P().nodes.find((t) => t.id == e)?.position;
2294
- r != null && await this.#T((i) => I(i, n, e, {
2340
+ let r = this.#D().nodes.find((t) => t.id == e)?.position;
2341
+ r != null && await this.#S((i) => z(i, n, e, {
2295
2342
  ...t,
2296
2343
  position: r
2297
2344
  }));
@@ -2299,60 +2346,66 @@ var Lt = class {
2299
2346
  async saveTaskSettings(e, t) {
2300
2347
  let n = this.$.revision.value, r = this.#l.value.target;
2301
2348
  if (n == null || r == null) return !1;
2302
- let i = he(n, r, e, t);
2303
- return i != null && await this.#C(i) != null;
2349
+ let i = Ne(n, r, e, t);
2350
+ return i != null && await this.#b(i) != null;
2304
2351
  }
2305
2352
  async saveCodeTaskPorts(e, t) {
2306
2353
  let n = this.$.revision.value, r = this.#l.value.target;
2307
2354
  if (n == null || r == null) return !1;
2308
- let i = we(n, r, e, t);
2309
- return i != null && await this.#C(i) != null;
2355
+ let i = de(n, r, e, t);
2356
+ return i != null && await this.#b(i) != null;
2357
+ }
2358
+ async saveTaskAdditionalInputs(e, t) {
2359
+ let n = this.$.revision.value, r = this.#l.value.target;
2360
+ if (n == null || r == null) return !1;
2361
+ let i = Ie(n, r, e, t);
2362
+ return i != null && await this.#b(i) != null;
2310
2363
  }
2311
2364
  async setConnectorConnection(e, t) {
2312
2365
  let n = this.$.revision.value;
2313
2366
  if (n == null) return !1;
2314
- let r = fe(n.revision.content, e, t);
2315
- return r != null && await this.#C(r) != null;
2367
+ let r = k(n.revision.content, e, t);
2368
+ return r != null && await this.#b(r) != null;
2316
2369
  }
2317
2370
  async saveTriggerSettings(e, t) {
2318
2371
  let n = this.$.revision.value, r = this.#l.value.target;
2319
2372
  if (n == null || r?.kind != "flow") return !1;
2320
- let i = re(n.revision.content, r, e, t);
2321
- return i != null && await this.#C(i) != null;
2373
+ let i = ne(n.revision.content, r, e, t);
2374
+ return i != null && await this.#b(i) != null;
2322
2375
  }
2323
2376
  async saveTriggerConfig(e, t, n) {
2324
2377
  let r = this.$.revision.value, i = this.#l.value.target;
2325
2378
  if (r == null || i?.kind != "flow") return !1;
2326
- let a = E(r.revision.content, i, e, t, n);
2327
- return a != null && await this.#C(a) != null;
2379
+ let a = ie(r.revision.content, i, e, t, n);
2380
+ return a != null && await this.#b(a) != null;
2328
2381
  }
2329
2382
  async saveTriggerSchedule(e, t) {
2330
2383
  let n = this.$.revision.value, r = this.#l.value.target;
2331
2384
  if (n == null || r?.kind != "flow") return !1;
2332
- let i = Te(n.revision.content, r, e, t);
2333
- return i != null && await this.#C(i) != null;
2385
+ let i = P(n.revision.content, r, e, t);
2386
+ return i != null && await this.#b(i) != null;
2334
2387
  }
2335
2388
  async saveWebhook(e, t) {
2336
2389
  let n = this.$.revision.value, r = this.#l.value.target;
2337
2390
  if (n == null || r?.kind != "flow") return !1;
2338
- let i = de(n, r, e, t);
2339
- return i != null && await this.#C(i) != null;
2391
+ let i = F(n, r, e, t);
2392
+ return i != null && await this.#b(i) != null;
2340
2393
  }
2341
2394
  async setTriggerConnection(e, t) {
2342
2395
  let n = this.$.revision.value, r = this.#l.value.target;
2343
2396
  if (n == null || r?.kind != "flow") return !1;
2344
- let i = pe(n.revision.content, r, e, t);
2345
- return i != null && await this.#C(i) != null;
2397
+ let i = re(n.revision.content, r, e, t);
2398
+ return i != null && await this.#b(i) != null;
2346
2399
  }
2347
2400
  async saveSubflowSettings(e, t) {
2348
2401
  let n = this.$.revision.value;
2349
2402
  if (n == null) return !1;
2350
- let r = Ne(n, e, t);
2351
- return r != null && await this.#C(r) != null;
2403
+ let r = ae(n, e, t);
2404
+ return r != null && await this.#b(r) != null;
2352
2405
  }
2353
2406
  updateModuleSource(e) {
2354
2407
  let t = this.#l.value.moduleEditor;
2355
- t != null && t.source != e && this.#B({ moduleEditor: {
2408
+ t != null && t.source != e && this.#N({ moduleEditor: {
2356
2409
  ...t,
2357
2410
  phase: void 0,
2358
2411
  source: e
@@ -2363,10 +2416,10 @@ var Lt = class {
2363
2416
  if (e == null) return;
2364
2417
  let t = this.#l.value.draft?.content.modules[e.moduleId];
2365
2418
  if (t == null) {
2366
- this.#B({ moduleEditor: void 0 });
2419
+ this.#N({ moduleEditor: void 0 });
2367
2420
  return;
2368
2421
  }
2369
- this.#B({ moduleEditor: {
2422
+ this.#N({ moduleEditor: {
2370
2423
  moduleId: e.moduleId,
2371
2424
  source: t.source
2372
2425
  } });
@@ -2374,104 +2427,104 @@ var Lt = class {
2374
2427
  async saveModuleEditor() {
2375
2428
  let e = this.#l.value.moduleEditor;
2376
2429
  if (e == null || e.phase == "saving") return !1;
2377
- this.#B({ moduleEditor: {
2430
+ this.#N({ moduleEditor: {
2378
2431
  ...e,
2379
2432
  phase: "saving"
2380
2433
  } });
2381
- let t = await nt(e.source);
2382
- if (this.#_) return !1;
2383
- let n = await this.#C(rt(e.moduleId, e.source, t));
2384
- return !this.#_ && this.#l.value.moduleEditor?.moduleId == e.moduleId && this.#B({ moduleEditor: {
2434
+ let t = await ot(e.source);
2435
+ if (this.#m) return !1;
2436
+ let n = this.#l.value.draft?.content.modules[e.moduleId];
2437
+ if (n == null) return !1;
2438
+ let r = await this.#b(st(e.moduleId, n.source, n.imports, e.source, t));
2439
+ return !this.#m && this.#l.value.moduleEditor?.moduleId == e.moduleId && this.#N({ moduleEditor: {
2385
2440
  ...this.#l.value.moduleEditor,
2386
- phase: n == null ? "failed" : void 0
2387
- } }), n != null;
2441
+ phase: r == null ? "failed" : void 0
2442
+ } }), r != null;
2388
2443
  }
2389
2444
  async moveNodes(e, t = "detail") {
2390
2445
  let n = this.#l.value.target;
2391
- n != null && await this.#T((r) => k(r, n, e, t));
2446
+ n != null && await this.#S((r) => j(r, n, e, t));
2392
2447
  }
2393
2448
  async moveViewport(e, t = "detail") {
2394
2449
  let n = this.#l.value.target;
2395
- if (n == null) return;
2396
- let r = this.#P().viewport;
2397
- (r.x != e.x || r.y != e.y || r.zoom != e.zoom) && this.#M(), await this.#T((r) => O(r, n, e, t));
2450
+ n != null && await this.#S((r) => A(r, n, e, t));
2398
2451
  }
2399
2452
  async check() {
2400
- await this.#E();
2453
+ await this.#C();
2401
2454
  }
2402
2455
  async refreshFlows() {
2403
2456
  await this.reloadFlows();
2404
2457
  }
2405
2458
  updateLive(e) {
2406
- e.flowId == this.#l.value.flowId && this.#B({ live: e });
2459
+ e.flowId == this.#l.value.flowId && this.#N({ live: e });
2407
2460
  }
2408
2461
  locateNode(e) {
2409
2462
  let t = this.$.revision.value, n = this.#l.value.target;
2410
- return t == null || n == null || t.node(n, e) == null || !this.selectNodes([e]) ? !1 : (this.#B({ nodeFocus: {
2463
+ return t == null || n == null || t.node(n, e) == null || !this.selectNodes([e]) ? !1 : (this.#N({ nodeFocus: {
2411
2464
  nodeId: e,
2412
- requestId: ++this.#y
2465
+ requestId: ++this.#g
2413
2466
  } }), !0);
2414
2467
  }
2415
2468
  locateDiagnostic(e) {
2416
- return e.location == null || !this.selectNodes([e.location.nodeId]) ? !1 : (this.#B({ diagnosticFocus: {
2469
+ return e.location == null || !this.selectNodes([e.location.nodeId]) ? !1 : (this.#N({ diagnosticFocus: {
2417
2470
  ...e.location,
2418
2471
  diagnostic: e.diagnostic,
2419
2472
  requestId: ++this.#d
2420
2473
  } }), !0);
2421
2474
  }
2422
- async #S(e, t, n) {
2423
- let r = Math.max(0, ...this.#P().nodes.flatMap((e) => {
2475
+ async #y(e, t, n) {
2476
+ let r = Math.max(0, ...this.#D().nodes.flatMap((e) => {
2424
2477
  if (e.kind != "comment") return [];
2425
2478
  let t = /#(\d+)$/.exec(e.title);
2426
2479
  return t == null ? [] : [Number(t[1])];
2427
- })), i = this.#T((i) => I(i, e, t, {
2480
+ })), i = this.#S((i) => z(i, e, t, {
2428
2481
  content: "",
2429
2482
  position: n,
2430
2483
  title: this.#r.t("addNode.commentName", { number: r + 1 })
2431
2484
  }));
2432
- if (this.selectNodes([t]), await i, !this.#_) return t;
2485
+ if (this.selectNodes([t]), await i, !this.#m) return t;
2433
2486
  }
2434
- async #C(e, t = !0) {
2487
+ async #b(e, t = !0) {
2435
2488
  let n = this.#l.value.flowId, r = this.#l.value.draft;
2436
- if (n != null && r != null) return await this.#t.change({
2489
+ if (n != null && r != null) return e.length == 0 ? r : await this.#t.change({
2437
2490
  current: this.#n.capture(),
2438
2491
  flowId: n
2439
2492
  }, r, e, t);
2440
2493
  }
2441
- #w(e, t = !1) {
2442
- let n = this.#l.value.draft, { revision: r, selectedNodeIds: i, target: a } = this.#I(e), o = this.#l.value.moduleEditor;
2443
- return this.#B({
2494
+ #x(e, t = !1) {
2495
+ let n = this.#l.value.draft, { revision: r, selectedNodeIds: i, target: a } = this.#k(e), o = this.#l.value.moduleEditor;
2496
+ return this.#N({
2444
2497
  diagnostics: t ? this.#l.value.diagnostics : void 0,
2445
2498
  draft: e,
2446
- moduleEditor: o != null && n != null && Z(n, o) != "saved" ? o : Q(r, a, i),
2499
+ moduleEditor: o != null && n != null && Q(n, o) != "saved" ? o : $(r, a, i),
2447
2500
  selectedNodeIds: i,
2448
2501
  target: a
2449
2502
  }), r;
2450
2503
  }
2451
- async #T(e) {
2452
- if (this.#_) return;
2504
+ async #S(e) {
2505
+ if (this.#m) return;
2453
2506
  let t = this.#l.value.flowId, n = this.#l.value.presentation;
2454
2507
  t != null && n != null && await this.#a.change(t, n, this.#o.capture(), e);
2455
2508
  }
2456
- async #E() {
2457
- if (this.#_) return;
2509
+ async #C() {
2510
+ if (this.#m) return;
2458
2511
  let e = this.#l.value.flowId, t = this.#l.value.draft, n = this.#l.value.target;
2459
2512
  if (e == null || t == null || n == null) {
2460
- n ?? this.#B({
2513
+ n ?? this.#N({
2461
2514
  checkLoading: !1,
2462
2515
  diagnostics: void 0
2463
2516
  });
2464
2517
  return;
2465
2518
  }
2466
- this.#B({
2519
+ this.#N({
2467
2520
  checkLoading: !0,
2468
2521
  diagnosticFocus: void 0
2469
2522
  });
2470
2523
  try {
2471
2524
  let n = await this.#e.checkFlow(e, t.revisionId);
2472
- if (!this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId) {
2525
+ if (!this.#m && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId) {
2473
2526
  let e = this.#l.value.live;
2474
- this.#B({
2527
+ this.#N({
2475
2528
  diagnostics: n,
2476
2529
  live: e == null ? void 0 : {
2477
2530
  ...e,
@@ -2480,16 +2533,16 @@ var Lt = class {
2480
2533
  });
2481
2534
  }
2482
2535
  } catch (n) {
2483
- !this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#c(x(n, this.#r.t));
2536
+ !this.#m && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#c(D(n, this.#r.t));
2484
2537
  } finally {
2485
- !this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#B({ checkLoading: !1 });
2538
+ !this.#m && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#N({ checkLoading: !1 });
2486
2539
  }
2487
2540
  }
2488
- async #D(e) {
2489
- if (this.#_) return;
2541
+ async #w(e) {
2542
+ if (this.#m) return;
2490
2543
  let t = this.#l.value.flowId;
2491
- if (t == null || (this.#f += 1, e != null && (this.#g = !0, this.#t.changing || (this.#h = !0)), this.#v)) return;
2492
- this.#v = !0;
2544
+ if (t == null || (this.#f += 1, e != null && (this.#p = !0), this.#h)) return;
2545
+ this.#h = !0;
2493
2546
  let n = {
2494
2547
  current: this.#n.capture(),
2495
2548
  flowId: t
@@ -2498,144 +2551,83 @@ var Lt = class {
2498
2551
  let e;
2499
2552
  do {
2500
2553
  e = this.#f;
2501
- let t = this.#h, r = this.#m, i = this.#g;
2502
- this.#h = !1, this.#g = !1, await this.#O(n, !1, i, t, r);
2503
- } while (this.#z(n) && e != this.#f);
2504
- }), this.#z(n) && (this.#v = !1);
2554
+ let t = this.#p;
2555
+ this.#p = !1, await this.#T(n, !1, t);
2556
+ } while (this.#M(n) && e != this.#f);
2557
+ }), this.#M(n) && (this.#h = !1);
2505
2558
  }
2506
- async #O(e, t, n = !1, r = !1, i = this.#m) {
2559
+ async #T(e, t, n = !1) {
2507
2560
  try {
2508
- let t = r ? this.#l.value.target : void 0, a = this.#t.committed;
2509
- if (a == null) return !1;
2510
- let o = await this.#e.syncDraft(e.flowId, a.revisionId);
2511
- if (!this.#z(e)) return !1;
2512
- if (o.kind == "changes" && o.revisions.length == 0) return !0;
2513
- let s;
2514
- try {
2515
- s = this.#k(a, o);
2516
- } catch {
2517
- if (o = await this.#e.syncDraft(e.flowId), !this.#z(e)) return !1;
2518
- s = this.#k(a, o);
2519
- }
2520
- if (s.revisionId == a.revisionId) return !0;
2521
- let c = o.kind == "changes" && t != null ? Tt(z(a), z(s), t, o.revisions.flatMap((e) => e.operations)) : void 0;
2522
- o.kind == "snapshot" && this.#M();
2523
- let l = this.#L(s, !1);
2524
- return this.#N(e.flowId, s.revisionId), o.kind == "changes" && o.revisions.length > 0 && t != null && c != null && i == this.#m && this.#A(e, t, c, i), n && (this.#c({
2525
- kind: l ? "error" : "success",
2526
- message: this.#r.t(l ? "notice.moduleUpdated" : "notice.draftUpdated")
2527
- }), this.#E()), !0;
2561
+ let t = this.#t.committed;
2562
+ if (t == null) return !1;
2563
+ let r = await this.#e.syncDraft(e.flowId);
2564
+ if (!this.#M(e)) return !1;
2565
+ let i = r.draft;
2566
+ if (i.revisionId == t.revisionId) return !0;
2567
+ let a = this.#A(i, !1);
2568
+ return this.#E(e.flowId, i.revisionId), n && (this.#c({
2569
+ kind: a ? "error" : "success",
2570
+ message: this.#r.t(a ? "notice.moduleUpdated" : "notice.draftUpdated")
2571
+ }), this.#C()), !0;
2528
2572
  } catch (n) {
2529
- return t && this.#z(e) && this.#c(x(n, this.#r.t)), !1;
2530
- }
2531
- }
2532
- #k(e, t) {
2533
- if (t.kind == "snapshot") return t.draft;
2534
- let n = e;
2535
- for (let e of t.revisions) {
2536
- if (e.revision.parentRevisionId != n.revisionId) throw Error("Invalid Draft revision chain.");
2537
- n = {
2538
- ...e.revision,
2539
- content: P(n, e.operations).content
2540
- };
2573
+ return t && this.#M(e) && this.#c(D(n, this.#r.t)), !1;
2541
2574
  }
2542
- return n;
2543
- }
2544
- #A(e, t, n, r) {
2545
- let i = this.#l.value;
2546
- if (!this.#z(e) || r != this.#m || !$(i.target, t)) return;
2547
- let a = this.#p;
2548
- if (a != null) {
2549
- if (a.flowId != e.flowId || !$(a.target, t)) {
2550
- this.#M();
2551
- return;
2552
- }
2553
- for (let e of n) a.targets.add(e);
2554
- globalThis.clearTimeout(a.timer), a.timer = globalThis.setTimeout(() => this.#j(), Ft);
2555
- return;
2556
- }
2557
- n.size == 0 || i.selectedNodeIds.length > 0 || (this.#p = {
2558
- current: e.current,
2559
- generation: r,
2560
- flowId: e.flowId,
2561
- target: t,
2562
- targets: new Set(n),
2563
- timer: globalThis.setTimeout(() => this.#j(), Ft),
2564
- viewport: this.#P().viewport
2565
- });
2566
2575
  }
2567
- #j() {
2568
- let e = this.#p;
2569
- if (this.#p = void 0, e == null || !e.current() || e.generation != this.#m) return;
2570
- let t = this.#l.value;
2571
- if (t.flowId != e.flowId || !$(t.target, e.target) || t.selectedNodeIds.length > 0) return;
2572
- let n = this.#P().viewport;
2573
- if (n.x != e.viewport.x || n.y != e.viewport.y || n.zoom != e.viewport.zoom || t.draft == null) return;
2574
- let r = z(t.draft), i = [...e.targets].filter((t) => r.selection(e.target, t) != null);
2575
- i.length == 1 && this.#B({ nodeFocus: {
2576
- nodeId: i[0],
2577
- requestId: ++this.#y
2578
- } });
2579
- }
2580
- #M() {
2581
- this.#m += 1, this.#p != null && globalThis.clearTimeout(this.#p.timer), this.#p = void 0;
2582
- }
2583
- #N(e, t) {
2576
+ #E(e, t) {
2584
2577
  this.#o.advanceHead(e, t);
2585
2578
  }
2586
- #P() {
2579
+ #D() {
2587
2580
  let e = this.#l.value;
2588
- return A(e.draft, e.target, e.presentation?.value, e.diagnostics?.diagnostics, {}, {}, this.#r.t);
2581
+ return M(e.draft, e.target, e.presentation?.value, e.diagnostics?.diagnostics, {}, {}, this.#r.t);
2589
2582
  }
2590
- #F() {
2583
+ #O() {
2591
2584
  let e = this.#l.value.moduleEditor;
2592
- return e == null || Z(this.#l.value.draft, e) == "saved" || (this.#c({
2585
+ return e == null || Q(this.#l.value.draft, e) == "saved" || (this.#c({
2593
2586
  kind: "error",
2594
2587
  message: this.#r.t("notice.unsavedCode")
2595
2588
  }), !1);
2596
2589
  }
2597
- #I(e) {
2598
- let t = z(e), n = It(t, this.#l.value.target);
2590
+ #k(e) {
2591
+ let t = L(e), n = Rt(t, this.#l.value.target);
2599
2592
  return {
2600
2593
  revision: t,
2601
2594
  selectedNodeIds: this.#l.value.selectedNodeIds.filter((e) => n != null && t.selection(n, e) != null),
2602
2595
  target: n
2603
2596
  };
2604
2597
  }
2605
- #L(e, t) {
2606
- this.#t.replaceCommitted(e);
2607
- let n = this.#t.project(e), r = this.#l.value.moduleEditor, i = r != null && Z(this.#l.value.draft, r) != "saved", a = this.#I(n), o = a.target;
2608
- return this.#B({
2598
+ #A(e, t) {
2599
+ let n = this.#t.replaceCommitted(e), r = this.#l.value.moduleEditor, i = r != null && Q(this.#l.value.draft, r) != "saved", a = this.#k(n), o = a.target;
2600
+ return this.#N({
2609
2601
  diagnostics: t ? this.#l.value.diagnostics : void 0,
2610
2602
  draft: n,
2611
- moduleEditor: this.#R(a.revision, o, a.selectedNodeIds),
2603
+ moduleEditor: this.#j(a.revision, o, a.selectedNodeIds),
2612
2604
  selectedNodeIds: a.selectedNodeIds,
2613
2605
  target: o
2614
2606
  }), i;
2615
2607
  }
2616
- #R(e, t, n) {
2608
+ #j(e, t, n) {
2617
2609
  let r = this.#l.value.moduleEditor;
2618
- return r == null || Z(this.#l.value.draft, r) == "saved" ? Q(e, t, n) : {
2610
+ return r == null || Q(this.#l.value.draft, r) == "saved" ? $(e, t, n) : {
2619
2611
  ...r,
2620
2612
  phase: "failed"
2621
2613
  };
2622
2614
  }
2623
- #z(e) {
2624
- return !this.#_ && e.flowId == this.#l.value.flowId && e.current();
2615
+ #M(e) {
2616
+ return !this.#m && e.flowId == this.#l.value.flowId && e.current();
2625
2617
  }
2626
- #B(e) {
2627
- this.#_ || this.#l.set(e);
2618
+ #N(e) {
2619
+ this.#m || this.#l.set(e);
2628
2620
  }
2629
2621
  };
2630
2622
  //#endregion
2631
2623
  //#region src/workbench/browser/runtime/stores/workbenchStore.ts
2632
- function Rt(e) {
2624
+ function Bt(e) {
2633
2625
  return new Map(e.nodes.map((e) => [e.id, e]));
2634
2626
  }
2635
- function zt(e, t) {
2636
- return e == null || t == null ? [] : z(e).designerInputs(t);
2627
+ function Vt(e, t) {
2628
+ return e == null || t == null ? [] : L(e).designerInputs(t);
2637
2629
  }
2638
- function Bt(e, t, n, r, i) {
2630
+ function Ht(e, t, n, r, i) {
2639
2631
  if (e == null || t?.kind != "flow" || n?.revisionId != e.revisionId || n.flowId != e.flowId) return /* @__PURE__ */ new Map();
2640
2632
  let a = r.find((t) => t.kind == "run.started" && t.payload.flowId == e.flowId)?.payload.scopeId;
2641
2633
  return typeof a == "string" ? new Map(r.flatMap((t) => {
@@ -2643,7 +2635,7 @@ function Bt(e, t, n, r, i) {
2643
2635
  return t.payload.scopeId == a && t.payload.flowId == e.flowId && typeof n == "string" && i.has(n) ? [[t.sequence, n]] : [];
2644
2636
  })) : /* @__PURE__ */ new Map();
2645
2637
  }
2646
- var Vt = { openExternalPage: async () => !1 }, Ht = class {
2638
+ var Ut = { openExternalPage: async () => !1 }, Wt = class {
2647
2639
  #e;
2648
2640
  #t;
2649
2641
  #n;
@@ -2654,38 +2646,49 @@ var Vt = { openExternalPage: async () => !1 }, Ht = class {
2654
2646
  #s;
2655
2647
  #c;
2656
2648
  #l;
2657
- constructor(r, i, a = () => crypto.randomUUID(), o = T(), s = Vt, c = !0) {
2658
- this.#t = new N(), this.#r = t(), this.#a = t([]), this.#o = t(!1), this.#s = t(!1), this.#c = new N(), this.#l = !1, this.provideAddNodeOptions = async (e, t) => await this.#u([this.triggers.provideAddNodeOptions(e, t), this.connectors.provideAddNodeOptions(e, t)], t), this.browseAddNodeOptions = async (e) => await this.#u([this.triggers.browseAddNodeOptions(e), this.connectors.browseAddNodeOptions(e)], e), this.provideAddNodeOptionChoices = async (e, t) => {
2649
+ constructor(r, i, a = () => crypto.randomUUID(), o = R(), s = Ut, c = !0) {
2650
+ this.#t = new I(), this.#r = t(), this.#a = t([]), this.#o = t(!1), this.#s = t(!1), this.#c = new I(), this.#l = !1, this.provideAddNodeOptions = async (e, t) => await this.#u([this.triggers.provideAddNodeOptions(e, t), this.connectors.provideAddNodeOptions(e, t)], t), this.browseAddNodeOptions = async (e) => await this.#u([this.triggers.browseAddNodeOptions(e), this.connectors.browseAddNodeOptions(e)], e), this.provideAddNodeOptionChoices = async (e, t) => {
2659
2651
  if (!e.startsWith("trigger:")) return await this.connectors.provideAddNodeOptionChoices(e, t);
2660
2652
  }, this.#e = r, this.#n = o, this.#i = c;
2661
2653
  let l = (e) => {
2662
2654
  this.#l || this.#r.set(e);
2663
2655
  };
2664
- this.runs = new D(r, l, o), this.workspace = new Lt(r, l, it, o, (e) => void this.#d(r, e)), this.connectors = new yt(r, this.workspace, l, s, o), this.triggers = new Ct(r, this.workspace, l, s, o), this.publications = new ct(r, this.workspace, l, i, a, o), this.runRequests = new pt(r, this.runs, l, o, a);
2665
- let u = /* @__PURE__ */ new Map(), d, f = n((e) => {
2656
+ this.runs = new Le(r, l, o), this.workspace = new zt(r, l, ct, o, (e) => {
2657
+ e.kind == "run.created" ? this.#d(r, e) : this.runs.changed(e.runId);
2658
+ }), this.connectors = new wt(r, this.workspace, l, s, o), this.triggers = new Ot(r, this.workspace, l, s, o), this.publications = new ft(r, this.workspace, l, i, a, o), this.runRequests = new _t(r, this.runs, l, o, a);
2659
+ let u = n((e) => {
2660
+ let t = e(this.workspace.$.diagnostics);
2661
+ if (t == null) return;
2662
+ let n = e(this.connectors.$.diagnostics);
2663
+ return n.length == 0 ? t : {
2664
+ ...t,
2665
+ diagnostics: [...t.diagnostics, ...n],
2666
+ valid: !1
2667
+ };
2668
+ }), d = /* @__PURE__ */ new Map(), f, p = n((e) => {
2666
2669
  let t = e(this.workspace.$.draft);
2667
- d != t?.flowId && (u.clear(), d = t?.flowId);
2668
- let n = e(this.workspace.$.target), r = e(this.workspace.$.presentation)?.value, i = e(this.workspace.$.diagnostics)?.diagnostics, a = e(this.connectors.$.actions), s = e(this.connectors.$.catalogs), c = e(o.t$), l = e(this.runs.$.run), f = e(this.runs.$.events), p = e(this.#a), m = e(this.#o), h = e(this.#s), g = n == null ? "" : n.kind == "flow" ? "flow" : `subflow:${n.id}`, _ = [
2669
- ...zt(t, n),
2670
- r == null || n == null ? void 0 : j(r, n),
2670
+ f != t?.flowId && (d.clear(), f = t?.flowId);
2671
+ let n = e(this.workspace.$.target), r = e(this.workspace.$.presentation)?.value, i = e(u)?.diagnostics ?? e(this.connectors.$.diagnostics), a = e(this.connectors.$.actions), s = e(this.connectors.$.catalogs), c = e(o.t$), l = e(this.runs.$.run), p = e(this.runs.$.events), m = e(this.#a), h = e(this.#o), g = e(this.#s), _ = n == null ? "" : n.kind == "flow" ? "flow" : `subflow:${n.id}`, v = [
2672
+ ...Vt(t, n),
2673
+ r == null || n == null ? void 0 : N(r, n),
2671
2674
  i,
2672
2675
  a,
2673
2676
  s,
2674
2677
  c,
2675
2678
  l,
2676
- f,
2677
2679
  p,
2678
2680
  m,
2679
2681
  h,
2682
+ g,
2680
2683
  ...l == null ? [] : [t?.revisionId]
2681
- ], v = u.get(g);
2682
- if (v != null && v.inputs.length == _.length && v.inputs.every((e, t) => e === _[t])) return v.graph;
2683
- let y = A(t, n, r, i, a, s, c, l, f, p, m, h, this.#i);
2684
- return u.set(g, {
2685
- graph: y,
2686
- inputs: _
2687
- }), y;
2688
- }), p = e(f, Rt);
2684
+ ], y = d.get(_);
2685
+ if (y != null && y.inputs.length == v.length && y.inputs.every((e, t) => e === v[t])) return y.graph;
2686
+ let b = M(t, n, r, i, a, s, c, l, p, m, h, g, this.#i);
2687
+ return d.set(_, {
2688
+ graph: b,
2689
+ inputs: v
2690
+ }), b;
2691
+ }), m = e(p, Bt);
2689
2692
  this.$ = {
2690
2693
  busy: n((e) => {
2691
2694
  let t = e(this.workspace.$.busy);
@@ -2696,13 +2699,15 @@ var Vt = { openExternalPage: async () => !1 }, Ht = class {
2696
2699
  if (e(this.publications.$.rollingBackPublicationId) != null) return "rollback";
2697
2700
  if (e(this.publications.$.changingTriggerId) != null) return "trigger";
2698
2701
  }),
2699
- designer: f,
2700
- designerNodeById: p,
2702
+ diagnosticItems: n((e) => E(e(this.workspace.$.revision), e(this.workspace.$.target), e(u))),
2703
+ diagnostics: u,
2704
+ designer: p,
2705
+ designerNodeById: m,
2701
2706
  notice: this.#r,
2702
- runEventNodes: n((e) => Bt(e(this.workspace.$.draft), e(this.workspace.$.target), e(this.runs.$.run), e(this.runs.$.events), e(p))),
2707
+ runEventNodes: n((e) => Ht(e(this.workspace.$.draft), e(this.workspace.$.target), e(this.runs.$.run), e(this.runs.$.events), e(m))),
2703
2708
  selectedDesignerNode: n((e) => {
2704
2709
  let t = e(this.workspace.$.selectedNodeIds);
2705
- return t.length == 1 ? e(p).get(t[0]) : void 0;
2710
+ return t.length == 1 ? e(m).get(t[0]) : void 0;
2706
2711
  }),
2707
2712
  variableNames: this.#a,
2708
2713
  variableNamesLoaded: this.#o,
@@ -2732,7 +2737,7 @@ var Vt = { openExternalPage: async () => !1 }, Ht = class {
2732
2737
  if (!e() || this.#l) return;
2733
2738
  this.#a.set(t.map((e) => e.name)), this.#o.set(!0);
2734
2739
  } catch (t) {
2735
- e() && !this.#l && this.#r.set(x(t, this.#n.t));
2740
+ e() && !this.#l && this.#r.set(D(t, this.#n.t));
2736
2741
  } finally {
2737
2742
  e() && !this.#l && this.#s.set(!1);
2738
2743
  }
@@ -2758,6 +2763,10 @@ var Vt = { openExternalPage: async () => !1 }, Ht = class {
2758
2763
  let t = this.$.runEventNodes.value.get(e);
2759
2764
  return t != null && this.workspace.locateNode(t);
2760
2765
  }
2766
+ locateRunWait() {
2767
+ let e = this.runs.$.run.value;
2768
+ return e?.status == "waiting" && "waiting" in e && e.waiting != null && this.workspace.locateNode(e.waiting.nodeId);
2769
+ }
2761
2770
  async addNode(e, t, n) {
2762
2771
  if (e.kind == "trigger" && "trigger" in e && e.trigger.kind == "connect") {
2763
2772
  await this.triggers.connect(e.trigger.provider);
@@ -2771,7 +2780,7 @@ var Vt = { openExternalPage: async () => !1 }, Ht = class {
2771
2780
  if (t.aborted || this.#l) return;
2772
2781
  let r = n.filter((e) => e.status == "rejected");
2773
2782
  if (r.length > 0 && r.length == n.length) throw r[0].reason;
2774
- return r.length > 0 && this.#r.set(x(r[0].reason, this.#n.t)), n.flatMap((e) => e.status == "fulfilled" ? e.value ?? [] : []);
2783
+ return r.length > 0 && this.#r.set(D(r[0].reason, this.#n.t)), n.flatMap((e) => e.status == "fulfilled" ? e.value ?? [] : []);
2775
2784
  }
2776
2785
  async refreshSelectedConnector(e = !1) {
2777
2786
  await this.connectors.refresh(e);
@@ -2796,13 +2805,13 @@ var Vt = { openExternalPage: async () => !1 }, Ht = class {
2796
2805
  return;
2797
2806
  }
2798
2807
  }
2799
- }, Ut = ze(() => import("./flowWorkspace-BZ_eiQNR.js").then((e) => e.t));
2800
- function Wt({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i, pending: a = !1, title: o, token: s, tokenLabel: f }) {
2801
- let g = s != null && f != null && i != null, _ = s ?? "", v = /* @__PURE__ */ G(Ve, { children: [
2802
- /* @__PURE__ */ W("div", {
2808
+ }, Gt = Ue(() => import("./flowWorkspace-VnS8nLMT.js").then((e) => e.t));
2809
+ function Kt({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i, pending: a = !1, title: o, token: s, tokenLabel: u }) {
2810
+ let m = s != null && u != null && i != null, h = s ?? "", _ = /* @__PURE__ */ q(Ge, { children: [
2811
+ /* @__PURE__ */ K("div", {
2803
2812
  "aria-hidden": "true",
2804
2813
  className: "flex size-10 items-center justify-center rounded-lg bg-muted text-muted-foreground",
2805
- children: /* @__PURE__ */ G("svg", {
2814
+ children: /* @__PURE__ */ q("svg", {
2806
2815
  className: "size-5",
2807
2816
  fill: "none",
2808
2817
  stroke: "currentColor",
@@ -2810,40 +2819,40 @@ function Wt({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
2810
2819
  strokeLinejoin: "round",
2811
2820
  strokeWidth: "1.8",
2812
2821
  viewBox: "0 0 24 24",
2813
- children: [/* @__PURE__ */ W("rect", {
2822
+ children: [/* @__PURE__ */ K("rect", {
2814
2823
  height: "9",
2815
2824
  rx: "2",
2816
2825
  width: "14",
2817
2826
  x: "5",
2818
2827
  y: "11"
2819
- }), /* @__PURE__ */ W("path", { d: "M8 11V8a4 4 0 0 1 8 0v3" })]
2828
+ }), /* @__PURE__ */ K("path", { d: "M8 11V8a4 4 0 0 1 8 0v3" })]
2820
2829
  })
2821
2830
  }),
2822
- /* @__PURE__ */ G("header", {
2831
+ /* @__PURE__ */ q("header", {
2823
2832
  className: "flex flex-col gap-2",
2824
- children: [/* @__PURE__ */ W("h1", {
2833
+ children: [/* @__PURE__ */ K("h1", {
2825
2834
  className: "text-xl font-semibold tracking-tight text-balance",
2826
2835
  children: o
2827
- }), /* @__PURE__ */ W("p", {
2836
+ }), /* @__PURE__ */ K("p", {
2828
2837
  className: "text-sm/relaxed text-muted-foreground text-pretty",
2829
2838
  children: t
2830
2839
  })]
2831
2840
  }),
2832
- g && /* @__PURE__ */ W(h, { children: /* @__PURE__ */ G(u, {
2841
+ m && /* @__PURE__ */ K(f, { children: /* @__PURE__ */ q(d, {
2833
2842
  "data-invalid": n != null,
2834
2843
  children: [
2835
- /* @__PURE__ */ W(m, {
2844
+ /* @__PURE__ */ K(p, {
2836
2845
  htmlFor: "session-token",
2837
- children: f
2846
+ children: u
2838
2847
  }),
2839
- /* @__PURE__ */ W(c, {
2848
+ /* @__PURE__ */ K(l, {
2840
2849
  autoComplete: "username",
2841
2850
  name: "username",
2842
2851
  type: "hidden",
2843
2852
  value: "open-flow",
2844
2853
  readOnly: !0
2845
2854
  }),
2846
- /* @__PURE__ */ W(c, {
2855
+ /* @__PURE__ */ K(l, {
2847
2856
  autoComplete: "current-password",
2848
2857
  "aria-invalid": n != null,
2849
2858
  autoFocus: !0,
@@ -2853,135 +2862,137 @@ function Wt({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
2853
2862
  onChange: (e) => i?.(e.target.value),
2854
2863
  spellCheck: !1,
2855
2864
  type: "password",
2856
- value: _
2865
+ value: h
2857
2866
  }),
2858
- n != null && /* @__PURE__ */ W(l, { children: n })
2867
+ n != null && /* @__PURE__ */ K(y, { children: n })
2859
2868
  ]
2860
2869
  }) }),
2861
- e != null && r != null && /* @__PURE__ */ G(p, {
2862
- disabled: a || g && _.length == 0,
2870
+ e != null && r != null && /* @__PURE__ */ q(c, {
2871
+ disabled: a || m && h.length == 0,
2863
2872
  size: "lg",
2864
2873
  type: "submit",
2865
- children: [a && /* @__PURE__ */ W(d, {
2874
+ children: [a && /* @__PURE__ */ K(g, {
2866
2875
  "aria-label": e,
2867
2876
  "data-icon": "inline-start"
2868
2877
  }), e]
2869
2878
  }),
2870
- a && e == null && /* @__PURE__ */ W(d, { "aria-label": t })
2871
- ] }), y = "m-auto flex w-full max-w-[420px] flex-col gap-5 rounded-xl bg-card p-6 shadow-lg shadow-black/10";
2872
- return /* @__PURE__ */ W("main", {
2879
+ a && e == null && /* @__PURE__ */ K(g, { "aria-label": t })
2880
+ ] }), v = "m-auto flex w-full max-w-[420px] flex-col gap-5 rounded-xl bg-card p-6 shadow-lg shadow-black/10";
2881
+ return /* @__PURE__ */ K("main", {
2873
2882
  className: "open-flow-workbench",
2874
- children: /* @__PURE__ */ W("div", {
2883
+ children: /* @__PURE__ */ K("div", {
2875
2884
  className: "grid h-full overflow-auto bg-muted/20 p-4",
2876
- children: r == null ? /* @__PURE__ */ W("section", {
2885
+ children: r == null ? /* @__PURE__ */ K("section", {
2877
2886
  "aria-busy": a,
2878
- className: y,
2879
- children: v
2880
- }) : /* @__PURE__ */ W("form", {
2887
+ className: v,
2888
+ children: _
2889
+ }) : /* @__PURE__ */ K("form", {
2881
2890
  "aria-busy": a,
2882
- className: y,
2891
+ className: v,
2883
2892
  onSubmit: r,
2884
- children: v
2893
+ children: _
2885
2894
  })
2886
2895
  })
2887
2896
  });
2888
2897
  }
2889
- function Gt({ host: e, store: t }) {
2898
+ function qt({ host: e, store: t }) {
2890
2899
  let n = a(t.$.notice);
2891
- return H(() => e.notify(n), [e, n]), H(() => () => e.notify(void 0), [e]), null;
2900
+ return W(() => e.notify(n), [e, n]), W(() => () => e.notify(void 0), [e]), null;
2892
2901
  }
2893
- function Kt({ createFlow: e, createFlowDisabled: t, createFlowField: n, flowBadges: r, hrefFor: i, hostAction: o, hostTitle: s, language: c, navigation: l, onConfigureConnector: u, onHostAction: d, onLanguageChange: f, store: p, theme: m }) {
2894
- let h = a(p.workspace.$.flowId);
2895
- return /* @__PURE__ */ W("div", {
2902
+ function Jt({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowField: r, flowBadges: i, hrefFor: o, hostAction: s, hostTitle: c, language: l, navigation: u, onConfigureConnector: d, onHostAction: f, onLanguageChange: p, store: m, theme: h }) {
2903
+ let g = a(m.workspace.$.flowId);
2904
+ return /* @__PURE__ */ K("div", {
2896
2905
  className: "app-shell",
2897
- children: h == null ? /* @__PURE__ */ W(Ye, {
2898
- createFlowDisabled: t,
2899
- createFlowField: n,
2900
- flowBadges: r,
2901
- hrefForFlow: (e) => i({
2906
+ children: g == null ? /* @__PURE__ */ K($e, {
2907
+ catalogWidth: e,
2908
+ createFlowDisabled: n,
2909
+ createFlowField: r,
2910
+ flowBadges: i,
2911
+ hrefForFlow: (e) => o({
2902
2912
  flowId: e.flowId,
2903
2913
  view: "design"
2904
2914
  }),
2905
- hostAction: o,
2906
- hostTitle: s,
2907
- language: c,
2908
- onCreateFlow: (t) => l.createFlow(t, e),
2909
- onHostAction: d,
2910
- onLanguageChange: f,
2911
- onSelectFlow: (e) => void l.selectFlow(e),
2912
- store: p
2913
- }) : /* @__PURE__ */ W(Re, {
2914
- fallback: /* @__PURE__ */ W("main", {
2915
+ hostAction: s,
2916
+ hostTitle: c,
2917
+ language: l,
2918
+ onCreateFlow: (e) => u.createFlow(e, t),
2919
+ onHostAction: f,
2920
+ onLanguageChange: p,
2921
+ onSelectFlow: (e) => void u.selectFlow(e),
2922
+ store: m
2923
+ }) : /* @__PURE__ */ K(He, {
2924
+ fallback: /* @__PURE__ */ K("main", {
2915
2925
  "aria-busy": "true",
2916
2926
  className: "workspace"
2917
2927
  }),
2918
- children: /* @__PURE__ */ W(Ut, {
2919
- hostAction: o,
2920
- hostTitle: s,
2921
- hrefFor: i,
2922
- navigation: l,
2923
- onConfigureConnector: u,
2924
- onHostAction: d,
2925
- store: p,
2926
- theme: m
2928
+ children: /* @__PURE__ */ K(Gt, {
2929
+ hostAction: s,
2930
+ hostTitle: c,
2931
+ hrefFor: o,
2932
+ navigation: u,
2933
+ onConfigureConnector: d,
2934
+ onHostAction: f,
2935
+ store: m,
2936
+ theme: h
2927
2937
  })
2928
2938
  })
2929
2939
  });
2930
2940
  }
2931
- function qt({ createFlow: e, createFlowDisabled: t, createFlowField: n, flowBadges: r, host: i, hostAction: a, hostTitle: s, hrefFor: c, language: l, location: u, onConfigureConnector: d, onHostAction: f, onLanguageChange: p, onNavigate: m, preferences: h, theme: g, variables: _ = !0 }) {
2932
- let v = Be(m);
2933
- v.current = m;
2934
- let [{ i18n: y, navigation: b, store: x }] = U(() => {
2935
- let e = T(l), t = new Ht(new ue((e, t) => i.request(e, t), (e, t) => i.subscribeFlow(e, t), (e) => i.subscribeFlowCatalog(e)), h, () => crypto.randomUUID(), e, i, _);
2941
+ function Yt({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowField: r, flowBadges: i, host: a, hostAction: s, hostTitle: c, hrefFor: l, language: u, location: d, onConfigureConnector: f, onHostAction: p, onLanguageChange: m, onNavigate: h, preferences: g, theme: _, variables: v = !0 }) {
2942
+ let y = We(h);
2943
+ y.current = h;
2944
+ let [{ i18n: b, navigation: x, store: S }] = G(() => {
2945
+ let e = R(u), t = new Wt(new Ee((e, t) => a.request(e, t), (e, t) => a.subscribeFlow(e, t), (e) => a.subscribeFlowCatalog(e)), g, () => crypto.randomUUID(), e, a, v);
2936
2946
  return {
2937
2947
  i18n: e,
2938
- navigation: new He(t, u, (e, t) => v.current(e, t)),
2948
+ navigation: new Ke(t, d, (e, t) => y.current(e, t)),
2939
2949
  store: t
2940
2950
  };
2941
2951
  });
2942
- return H(() => {
2943
- b.start();
2952
+ return W(() => {
2953
+ x.start();
2944
2954
  let e = () => {
2945
- x.connectors.refreshAfterAuthorization(), x.triggers.refreshAfterAuthorization(), x.refreshVariableNames();
2955
+ S.connectors.refreshAfterAuthorization(), S.triggers.refreshAfterAuthorization(), S.refreshVariableNames();
2946
2956
  };
2947
2957
  return globalThis.addEventListener("focus", e), () => {
2948
- globalThis.removeEventListener("focus", e), b.dispose(), x.dispose(), y.dispose();
2958
+ globalThis.removeEventListener("focus", e), x.dispose(), S.dispose(), b.dispose();
2949
2959
  };
2950
2960
  }, [
2951
- y,
2952
2961
  b,
2953
- x
2954
- ]), H(() => void b.apply(u), [u, b]), H(() => {
2955
- y.lang != l && y.switchLang(l);
2956
- }, [y, l]), /* @__PURE__ */ W(o, {
2957
- i18n: y,
2958
- children: /* @__PURE__ */ G("div", {
2962
+ x,
2963
+ S
2964
+ ]), W(() => void x.apply(d), [d, x]), W(() => {
2965
+ b.lang != u && b.switchLang(u);
2966
+ }, [b, u]), /* @__PURE__ */ K(o, {
2967
+ i18n: b,
2968
+ children: /* @__PURE__ */ q("div", {
2959
2969
  className: "open-flow-theme open-flow-workbench",
2960
- "data-theme": g,
2961
- children: [/* @__PURE__ */ W(Gt, {
2962
- host: i,
2963
- store: x
2964
- }), /* @__PURE__ */ W(Kt, {
2965
- createFlow: e,
2966
- createFlowDisabled: t,
2967
- createFlowField: n,
2968
- flowBadges: r,
2969
- hostAction: a,
2970
- hostTitle: s,
2971
- hrefFor: c,
2972
- language: l,
2973
- navigation: b,
2974
- onConfigureConnector: d,
2975
- onHostAction: f,
2976
- onLanguageChange: p,
2977
- store: x,
2978
- theme: g
2970
+ "data-theme": _,
2971
+ children: [/* @__PURE__ */ K(qt, {
2972
+ host: a,
2973
+ store: S
2974
+ }), /* @__PURE__ */ K(Jt, {
2975
+ catalogWidth: e,
2976
+ createFlow: t,
2977
+ createFlowDisabled: n,
2978
+ createFlowField: r,
2979
+ flowBadges: i,
2980
+ hostAction: s,
2981
+ hostTitle: c,
2982
+ hrefFor: l,
2983
+ language: u,
2984
+ navigation: x,
2985
+ onConfigureConnector: f,
2986
+ onHostAction: p,
2987
+ onLanguageChange: m,
2988
+ store: S,
2989
+ theme: _
2979
2990
  })]
2980
2991
  })
2981
2992
  });
2982
2993
  }
2983
- function Jt({ sessionKey: e, ...t }) {
2984
- return /* @__PURE__ */ W(qt, { ...t }, e);
2994
+ function Xt({ sessionKey: e, ...t }) {
2995
+ return /* @__PURE__ */ K(Yt, { ...t }, e);
2985
2996
  }
2986
2997
  //#endregion
2987
- export { Wt as OpenFlowSessionGate, Jt as OpenFlowWorkbench, Ie as isWorkbenchLanguage, Le as resolveWorkbenchLanguage, Fe as workbenchLanguageNames, V as workbenchLanguages };
2998
+ export { Kt as OpenFlowSessionGate, Xt as OpenFlowWorkbench, Be as isWorkbenchLanguage, Ve as resolveWorkbenchLanguage, ze as workbenchLanguageNames, Re as workbenchLanguages };