@oomol-lab/open-flow 0.1.0-beta.37 → 0.1.0-beta.39

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/browser/{createResourceDialog-DRB0OEtr.js → createResourceDialog-DnlKSqIs.js} +1 -1
  2. package/dist/browser/{editorComponent-B-FXsvGH.js → editorComponent-T-GmTa-C.js} +451 -271
  3. package/dist/browser/flow-authoring-node.d.ts +5 -2
  4. package/dist/browser/flow-authoring.js +12285 -1916
  5. package/dist/browser/flow-change.d.ts +5 -4
  6. package/dist/browser/flow-change.js +1926 -1760
  7. package/dist/browser/{flowChanges-Bc3Jncg9.js → flowChanges-BXqN4jyH.js} +7815 -7673
  8. package/dist/browser/{flowWorkspace-JCjjQZzW.js → flowWorkspace-a5QLISui.js} +12019 -11571
  9. package/dist/browser/{inputValues-eKZ3xev7.js → inputValues-Do4FrC_6.js} +1 -1
  10. package/dist/browser/licenses.md +1 -1
  11. package/dist/browser/{typeScriptSession-DnAmJCzu.js → typeScriptSession-vC9uPDVV.js} +1 -1
  12. package/dist/browser/ui.css +1 -1
  13. package/dist/browser/webhook-method.d.ts +3 -0
  14. package/dist/browser/workbench.css +1 -1
  15. package/dist/browser/workbench.js +957 -871
  16. package/dist/browser/{workbenchSelect-DNteZJYP.js → workbenchSelect-Dx2Y46cD.js} +1744 -1569
  17. package/dist/common/connectorDecoders.d.ts +8 -0
  18. package/dist/common/control-api-conformance.d.ts +46 -1
  19. package/dist/common/control-api-conformance.js +6367 -2307
  20. package/dist/common/control-api.d.ts +42 -12
  21. package/dist/common/control-api.js +5658 -2942
  22. package/dist/common/control-requests.d.ts +15 -0
  23. package/dist/common/control-requests.js +5153 -1952
  24. package/dist/common/flow-connectionUsage.d.ts +12 -0
  25. package/dist/common/flow-encoding.d.ts +0 -6
  26. package/dist/common/flow-encoding.js +1773 -1759
  27. package/dist/common/flow-semantics.d.ts +2 -0
  28. package/dist/common/flow-semantics.js +3443 -3246
  29. package/dist/common/flowInspection.d.ts +90 -1
  30. package/dist/common/integration-trigger.js +2396 -2229
  31. package/dist/common/mcp.d.ts +176 -7
  32. package/dist/common/mcp.js +5109 -2716
  33. package/dist/common/poll-trigger.js +1641 -1474
  34. package/dist/common/provider-triggers.js +2800 -2694
  35. package/dist/common/providerAccess.d.ts +20 -0
  36. package/dist/common/scheduler.js +2383 -2212
  37. package/dist/common/trigger-catalog.d.ts +2 -0
  38. package/dist/common/trigger-contract.d.ts +2 -0
  39. package/dist/common/webhook-trigger.d.ts +3 -1
  40. package/dist/common/webhook-trigger.js +7014 -78
  41. package/package.json +1 -1
  42. package/dist/browser/lib-GrGxYjsJ.js +0 -7855
@@ -1,19 +1,19 @@
1
1
  import { a as e, i as t, l as n } from "./dist-Dz6Nglsd.js";
2
2
  import { a as r, i, r as a, t as o } from "./main-BDnNHhkU.js";
3
3
  import { Bn as s, Hn as c, kt as l, t as u } from "./lite-BA96NG4M.js";
4
- import { E as d, M as f, N as p, O as m, P as h, T as g, _, h as v, j as y, k as b, m as x, w as S } from "./editorComponent-B-FXsvGH.js";
5
- import { $t as C, Bt as w, E as T, G as E, Gt as ee, H as D, Ht as O, K as te, Kt as ne, M as k, N as A, O as j, Qt as M, R as re, Rt as ie, S as ae, T as N, U as P, Ut as oe, V as F, Vt as se, W as ce, Wt as le, X as ue, Y as I, Z as de, Zt as L, _ as fe, a as pe, an as me, at as he, b as ge, c as _e, cn as ve, ct as ye, d as be, dt as xe, en as Se, f as Ce, g as we, h as Te, i as Ee, in as De, it as Oe, j as R, k as ke, l as Ae, lt as z, m as je, nn as Me, o as Ne, on as B, ot as Pe, p as Fe, r as V, rn as H, rt as Ie, s as Le, sn as U, st as Re, t as ze, tn as Be, tt as Ve, u as He, ut as Ue, v as We, w as Ge, x as Ke, y as qe, zt as W } from "./flowChanges-Bc3Jncg9.js";
6
- import { C as Je, D as Ye, O as Xe, _ as Ze, a as Qe, c as $e, d as et, f as tt, g as nt, h as rt, i as it, l as at, m as ot, n as st, o as ct, r as lt, s as ut, t as dt, v as ft, w as pt } from "./workbenchSelect-DNteZJYP.js";
7
- import { c as mt, d as ht, l as gt, u as _t } from "./value-B_yE9ean.js";
8
- import { a as G } from "./dist-CoszrK7m.js";
9
- import { Fragment as vt, jsx as K, jsxs as q } from "react/jsx-runtime";
10
- import { Suspense as yt, lazy as bt, useEffect as xt, useRef as St, useState as J } from "react";
11
- import * as Ct from "effect/Cause";
12
- import * as Y from "effect/Effect";
13
- import * as wt from "effect/Exit";
14
- import * as Tt from "effect/Fiber";
4
+ import { E as d, M as f, N as p, O as m, P as h, T as g, _, h as v, j as y, k as b, m as x, w as S } from "./editorComponent-T-GmTa-C.js";
5
+ import { $ as C, At as w, E as T, Ft as E, Gt as ee, H as D, Ht as O, It as te, J as ne, Jt as re, Kt as k, Lt as ie, M as A, Mt as ae, N as j, Nt as oe, O as M, Pt as se, Q as N, R as ce, S as le, T as ue, U as de, Ut as fe, V as P, W as pe, Wt as F, X as me, Xt as he, Y as ge, Yt as _e, Z as ve, Zt as ye, _ as be, a as xe, an as Se, b as Ce, c as we, cn as I, d as Te, et as Ee, f as De, g as Oe, h as ke, i as Ae, in as L, j as R, jt as je, k as Me, kt as Ne, l as Pe, ln as Fe, m as Ie, nn as Le, nt as Re, o as ze, on as Be, p as Ve, qt as He, r as z, rn as Ue, s as We, sn as B, t as Ge, tn as Ke, tt as qe, u as Je, v as Ye, w as Xe, x as Ze, y as Qe } from "./flowChanges-BXqN4jyH.js";
6
+ import { C as $e, D as et, O as tt, _ as nt, a as rt, c as it, d as at, f as ot, g as st, h as ct, i as lt, l as ut, m as dt, n as ft, o as pt, r as mt, s as ht, t as gt, v as _t, w as vt } from "./workbenchSelect-Dx2Y46cD.js";
7
+ import { a as V } from "./dist-CoszrK7m.js";
8
+ import { c as yt, d as bt, l as xt, u as St } from "./value-B_yE9ean.js";
9
+ import { Fragment as Ct, jsx as H, jsxs as U } from "react/jsx-runtime";
10
+ import { Suspense as wt, lazy as Tt, useEffect as Et, useRef as Dt, useState as W } from "react";
11
+ import * as Ot from "effect/Cause";
12
+ import * as G from "effect/Effect";
13
+ import * as kt from "effect/Exit";
14
+ import * as At from "effect/Fiber";
15
15
  //#region src/workbench/browser/runtime/navigation.ts
16
- var Et = class {
16
+ var jt = class {
17
17
  #e;
18
18
  #t;
19
19
  #n;
@@ -72,7 +72,7 @@ var Et = class {
72
72
  this.#s = !0, await this.#n.selectFlow(void 0), e == this.#i && (this.#u("design", !1), this.#s = !1);
73
73
  }
74
74
  async apply(e) {
75
- if (Dt(e, this.#t)) return;
75
+ if (Mt(e, this.#t)) return;
76
76
  this.#t = e;
77
77
  let t = ++this.#i;
78
78
  this.#s = !0;
@@ -88,39 +88,39 @@ var Et = class {
88
88
  flowId: n,
89
89
  view: n == null ? "design" : e
90
90
  };
91
- Dt(r, this.#t) || (this.#t = r, this.#e(r, { replace: t })), this.#r.set(r.view);
91
+ Mt(r, this.#t) || (this.#t = r, this.#e(r, { replace: t })), this.#r.set(r.view);
92
92
  }
93
93
  };
94
- function Dt(e, t) {
94
+ function Mt(e, t) {
95
95
  return e.flowId == t.flowId && e.view == t.view;
96
96
  }
97
97
  //#endregion
98
98
  //#region src/workbench/browser/runtime/shell/resourceBrowser.tsx
99
- var Ot = bt(() => import("./createResourceDialog-DRB0OEtr.js")), kt = ht.map((e) => ({
100
- label: _t[e],
99
+ var Nt = Tt(() => import("./createResourceDialog-DnlKSqIs.js")), Pt = bt.map((e) => ({
100
+ label: St[e],
101
101
  value: e
102
- })), At = 44, jt = -12, Mt = 8, Nt = "a, button, input, select, textarea, [data-slot=\"tooltip-trigger\"]";
103
- function Pt({ language: e, onLanguageChange: t }) {
104
- let n = i(), [r, a] = J(null);
105
- return t == null ? null : /* @__PURE__ */ q("div", {
102
+ })), Ft = 44, It = -12, Lt = 8, Rt = "a, button, input, select, textarea, [data-slot=\"tooltip-trigger\"]";
103
+ function zt({ language: e, onLanguageChange: t }) {
104
+ let n = i(), [r, a] = W(null);
105
+ return t == null ? null : /* @__PURE__ */ U("div", {
106
106
  className: "resource-language",
107
107
  ref: a,
108
- children: [/* @__PURE__ */ K("span", {
108
+ children: [/* @__PURE__ */ H("span", {
109
109
  className: "sr-only",
110
110
  children: n("language.label")
111
- }), /* @__PURE__ */ K(dt, {
111
+ }), /* @__PURE__ */ H(gt, {
112
112
  ariaLabel: n("language.label"),
113
113
  onValueChange: (e) => t(e),
114
- options: kt,
114
+ options: Pt,
115
115
  portalRoot: r,
116
116
  value: e
117
117
  })]
118
118
  });
119
119
  }
120
- function Ft(e) {
120
+ function Bt(e) {
121
121
  return e.length <= 20 ? e : `${e.slice(0, 10)}…${e.slice(-6)}`;
122
122
  }
123
- function It(e, t) {
123
+ function Vt(e, t) {
124
124
  let n = new Date(e), r = /* @__PURE__ */ new Date();
125
125
  return n.toLocaleString(t, {
126
126
  day: "numeric",
@@ -130,51 +130,51 @@ function It(e, t) {
130
130
  year: n.getFullYear() == r.getFullYear() ? void 0 : "numeric"
131
131
  });
132
132
  }
133
- function Lt(e) {
134
- return e.target instanceof Element && e.target.closest(Nt) != null;
133
+ function Ht(e) {
134
+ return e.target instanceof Element && e.target.closest(Rt) != null;
135
135
  }
136
- function Rt({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
137
- let [f, p] = J(null), h = St(null), y = St(null), C = St(null), w = St(null), T = a(), E = i(), [ee, D] = J("idle"), [O, te] = J(n.name), [ne, k] = J(!1), [A, j] = J(), M = n.live != null && n.live.revisionId != n.draftRevisionId, re = n.status == "retiring" ? "resource.retiring" : n.live == null ? "resource.notPublished" : M ? "resource.unpublishedChanges" : "resource.isPublished", ae = n.status == "retiring" ? "danger" : n.live == null ? "neutral" : M ? "running" : "success";
138
- async function N(e) {
139
- j(e == "publish" ? "publish" : "enabled");
136
+ function Ut({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
137
+ let [f, p] = W(null), h = Dt(null), y = Dt(null), C = Dt(null), w = Dt(null), T = a(), E = i(), [ee, D] = W("idle"), [O, te] = W(n.name), [ne, re] = W(!1), [k, ie] = W(), A = n.live != null && n.live.revisionId != n.draftRevisionId, ae = n.status == "retiring" ? "resource.retiring" : n.live == null ? "resource.notPublished" : A ? "resource.unpublishedChanges" : "resource.isPublished", j = n.status == "retiring" ? "danger" : n.live == null ? "neutral" : A ? "running" : "success";
138
+ async function oe(e) {
139
+ ie(e == "publish" ? "publish" : "enabled");
140
140
  try {
141
141
  e == "publish" ? await u.workspace.publishFlow(n) : await u.workspace.setFlowEnabled(n, e);
142
142
  } finally {
143
- j(void 0);
143
+ ie(void 0);
144
144
  }
145
145
  }
146
- let P = pt(O);
147
- async function oe(e) {
146
+ let M = vt(O);
147
+ async function se(e) {
148
148
  e.preventDefault();
149
149
  let t = O.trim();
150
- pt(t) == null && await u.workspace.renameFlow(n.flowId, t) && D("idle");
150
+ vt(t) == null && await u.workspace.renameFlow(n.flowId, t) && D("idle");
151
151
  }
152
- async function F() {
152
+ async function N() {
153
153
  await u.workspace.deleteFlow(n.flowId) && D("idle");
154
154
  }
155
- function se(e) {
156
- Lt(e) || o(n);
155
+ function ce(e) {
156
+ Ht(e) || o(n);
157
157
  }
158
- return /* @__PURE__ */ q("div", {
158
+ return /* @__PURE__ */ U("div", {
159
159
  className: "resource-item-row",
160
160
  ref: p,
161
161
  children: [
162
- /* @__PURE__ */ q("div", {
162
+ /* @__PURE__ */ U("div", {
163
163
  className: "resource-list-row flow-columns",
164
- onClick: se,
164
+ onClick: ce,
165
165
  children: [
166
- /* @__PURE__ */ q("span", {
166
+ /* @__PURE__ */ U("span", {
167
167
  className: "resource-primary-cell",
168
- children: [/* @__PURE__ */ K("span", {
168
+ children: [/* @__PURE__ */ H("span", {
169
169
  "aria-hidden": "true",
170
170
  className: "resource-flow-icon",
171
- children: /* @__PURE__ */ K("i", { className: "i-lucide-light:workflow" })
172
- }), /* @__PURE__ */ q("span", {
171
+ children: /* @__PURE__ */ H("i", { className: "i-lucide-light:workflow" })
172
+ }), /* @__PURE__ */ U("span", {
173
173
  className: "resource-primary-copy",
174
- children: [/* @__PURE__ */ q("span", {
174
+ children: [/* @__PURE__ */ U("span", {
175
175
  className: "resource-primary-heading",
176
176
  ref: h,
177
- children: [/* @__PURE__ */ K(s, {
177
+ children: [/* @__PURE__ */ H(s, {
178
178
  "aria-disabled": n.status == "retiring",
179
179
  className: "resource-primary-title",
180
180
  nativeButton: !1,
@@ -183,33 +183,33 @@ function Rt({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
183
183
  e.preventDefault();
184
184
  return;
185
185
  }
186
- ie(e, () => o(n));
186
+ Ne(e, () => o(n));
187
187
  },
188
- render: /* @__PURE__ */ K("a", { href: n.status == "retiring" ? void 0 : r }),
188
+ render: /* @__PURE__ */ H("a", { href: n.status == "retiring" ? void 0 : r }),
189
189
  tabIndex: n.status == "retiring" ? -1 : void 0,
190
190
  title: n.name,
191
191
  variant: "link",
192
192
  children: n.name
193
- }), n.status == "active" && /* @__PURE__ */ q(g, {
193
+ }), n.status == "active" && /* @__PURE__ */ U(g, {
194
194
  onOpenChange: (e) => {
195
195
  D(e ? "rename" : "idle"), e && te(n.name);
196
196
  },
197
197
  open: ee == "rename",
198
- children: [/* @__PURE__ */ K(b, {
199
- render: /* @__PURE__ */ K(s, {
198
+ children: [/* @__PURE__ */ H(b, {
199
+ render: /* @__PURE__ */ H(s, {
200
200
  "aria-label": E("sidebar.renameFlow", { name: n.name }),
201
201
  className: "resource-rename-trigger",
202
202
  size: "icon-xs",
203
203
  type: "button",
204
204
  variant: "ghost"
205
205
  }),
206
- children: /* @__PURE__ */ K("i", {
206
+ children: /* @__PURE__ */ H("i", {
207
207
  "aria-hidden": "true",
208
208
  className: "i-lucide-light:pencil"
209
209
  })
210
- }), /* @__PURE__ */ q(d, {
210
+ }), /* @__PURE__ */ U(d, {
211
211
  align: "start",
212
- alignOffset: jt,
212
+ alignOffset: It,
213
213
  anchor: h,
214
214
  className: "resource-rename-popover",
215
215
  collisionBoundary: [],
@@ -217,27 +217,27 @@ function Rt({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
217
217
  initialFocus: C,
218
218
  positionMethod: "fixed",
219
219
  side: "top",
220
- sideOffset: ({ anchor: e, positioner: t }) => -(e.height + t.height) / 2 - Mt,
221
- children: [/* @__PURE__ */ K(m, {
220
+ sideOffset: ({ anchor: e, positioner: t }) => -(e.height + t.height) / 2 - Lt,
221
+ children: [/* @__PURE__ */ H(m, {
222
222
  className: "sr-only",
223
223
  children: E("sidebar.renameFlow", { name: n.name })
224
- }), /* @__PURE__ */ q("form", {
224
+ }), /* @__PURE__ */ U("form", {
225
225
  className: "resource-rename-form",
226
- onSubmit: (e) => void oe(e),
226
+ onSubmit: (e) => void se(e),
227
227
  children: [
228
- /* @__PURE__ */ q(tt, {
228
+ /* @__PURE__ */ U(ot, {
229
229
  className: "min-w-0 flex-1",
230
- "data-invalid": O.length > 0 && P != null,
230
+ "data-invalid": O.length > 0 && M != null,
231
231
  children: [
232
- /* @__PURE__ */ K(nt, {
232
+ /* @__PURE__ */ H(st, {
233
233
  className: "sr-only",
234
234
  htmlFor: `rename-flow-${n.flowId}`,
235
235
  children: E("resource.flowName")
236
236
  }),
237
- /* @__PURE__ */ K(l, {
237
+ /* @__PURE__ */ H(l, {
238
238
  autoComplete: "off",
239
- "aria-invalid": O.length > 0 && P != null,
240
- "aria-describedby": O.length > 0 && P != null ? `rename-error-${n.flowId}` : void 0,
239
+ "aria-invalid": O.length > 0 && M != null,
240
+ "aria-describedby": O.length > 0 && M != null ? `rename-error-${n.flowId}` : void 0,
241
241
  id: `rename-flow-${n.flowId}`,
242
242
  name: "flow-name",
243
243
  onChange: (e) => te(e.target.value),
@@ -245,21 +245,21 @@ function Rt({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
245
245
  required: !0,
246
246
  value: O
247
247
  }),
248
- O.length > 0 && P != null && /* @__PURE__ */ K(ot, {
248
+ O.length > 0 && M != null && /* @__PURE__ */ H(dt, {
249
249
  id: `rename-error-${n.flowId}`,
250
- children: E(`resource.nameIssue.${P}`, { max: 80 })
250
+ children: E(`resource.nameIssue.${M}`, { max: 80 })
251
251
  })
252
252
  ]
253
253
  }),
254
- /* @__PURE__ */ K(s, {
254
+ /* @__PURE__ */ H(s, {
255
255
  onClick: () => D("idle"),
256
256
  size: "sm",
257
257
  type: "button",
258
258
  variant: "ghost",
259
259
  children: E("common.cancel")
260
260
  }),
261
- /* @__PURE__ */ K(s, {
262
- disabled: t != null || P != null,
261
+ /* @__PURE__ */ H(s, {
262
+ disabled: t != null || M != null,
263
263
  size: "sm",
264
264
  type: "submit",
265
265
  children: E("common.save")
@@ -268,58 +268,58 @@ function Rt({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
268
268
  })]
269
269
  })]
270
270
  })]
271
- }), e != null && /* @__PURE__ */ K("span", {
271
+ }), e != null && /* @__PURE__ */ H("span", {
272
272
  className: "resource-team-label",
273
273
  title: e,
274
274
  children: e
275
275
  })]
276
276
  })]
277
277
  }),
278
- /* @__PURE__ */ K("span", {
278
+ /* @__PURE__ */ H("span", {
279
279
  className: "resource-flow-id-cell",
280
- children: /* @__PURE__ */ q(x, { children: [/* @__PURE__ */ K(_, {
281
- render: /* @__PURE__ */ K("code", {
280
+ children: /* @__PURE__ */ U(x, { children: [/* @__PURE__ */ H(_, {
281
+ render: /* @__PURE__ */ H("code", {
282
282
  className: "resource-flow-id",
283
283
  tabIndex: 0,
284
284
  translate: "no"
285
285
  }),
286
- children: Ft(n.flowId)
287
- }), /* @__PURE__ */ q(v, {
286
+ children: Bt(n.flowId)
287
+ }), /* @__PURE__ */ U(v, {
288
288
  align: "start",
289
- alignOffset: At,
289
+ alignOffset: Ft,
290
290
  className: "resource-flow-id-tooltip",
291
291
  collisionBoundary: [],
292
292
  container: f,
293
293
  positionMethod: "fixed",
294
294
  side: "top",
295
295
  sideOffset: 6,
296
- children: [/* @__PURE__ */ K(s, {
296
+ children: [/* @__PURE__ */ H(s, {
297
297
  "aria-label": E(ne ? "resource.flowIdCopied" : "resource.copyFlowId"),
298
298
  className: "resource-tooltip-icon-button",
299
299
  onClick: () => {
300
- navigator.clipboard.writeText(n.flowId).then(() => k(!0));
300
+ navigator.clipboard.writeText(n.flowId).then(() => re(!0));
301
301
  },
302
302
  size: "icon-xs",
303
303
  type: "button",
304
304
  variant: "ghost",
305
- children: /* @__PURE__ */ K("i", {
305
+ children: /* @__PURE__ */ H("i", {
306
306
  "aria-hidden": "true",
307
307
  className: "i-lucide-light:copy"
308
308
  })
309
- }), /* @__PURE__ */ K("code", {
309
+ }), /* @__PURE__ */ H("code", {
310
310
  translate: "no",
311
311
  children: n.flowId
312
312
  })]
313
313
  })] })
314
314
  }),
315
- /* @__PURE__ */ q(x, { children: [/* @__PURE__ */ K(_, {
316
- render: /* @__PURE__ */ K("time", {
315
+ /* @__PURE__ */ U(x, { children: [/* @__PURE__ */ H(_, {
316
+ render: /* @__PURE__ */ H("time", {
317
317
  className: "resource-updated-at",
318
318
  dateTime: n.updatedAt,
319
319
  tabIndex: 0
320
320
  }),
321
- children: It(n.updatedAt, T)
322
- }), /* @__PURE__ */ K(v, {
321
+ children: Vt(n.updatedAt, T)
322
+ }), /* @__PURE__ */ H(v, {
323
323
  align: "center",
324
324
  collisionBoundary: [],
325
325
  container: f,
@@ -328,63 +328,63 @@ function Rt({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
328
328
  sideOffset: 6,
329
329
  children: new Date(n.updatedAt).toLocaleString(T)
330
330
  })] }),
331
- /* @__PURE__ */ q("span", {
331
+ /* @__PURE__ */ U("span", {
332
332
  className: "resource-status",
333
333
  children: [
334
- /* @__PURE__ */ K("span", {
334
+ /* @__PURE__ */ H("span", {
335
335
  "aria-hidden": "true",
336
- className: c("status-dot", ae)
336
+ className: c("status-dot", j)
337
337
  }),
338
- E(re),
339
- n.live != null && /* @__PURE__ */ q(vt, { children: [/* @__PURE__ */ K("span", {
338
+ E(ae),
339
+ n.live != null && /* @__PURE__ */ U(Ct, { children: [/* @__PURE__ */ H("span", {
340
340
  "aria-hidden": "true",
341
341
  className: "resource-status-separator",
342
342
  children: "·"
343
- }), /* @__PURE__ */ K("span", { children: E(n.live.enabled ? "resource.enabled" : "resource.disabled") })] })
343
+ }), /* @__PURE__ */ H("span", { children: E(n.live.enabled ? "resource.enabled" : "resource.disabled") })] })
344
344
  ]
345
345
  })
346
346
  ]
347
347
  }),
348
- /* @__PURE__ */ q("div", {
348
+ /* @__PURE__ */ U("div", {
349
349
  className: "resource-live-controls",
350
- "aria-busy": A != null,
351
- onClick: se,
350
+ "aria-busy": k != null,
351
+ onClick: ce,
352
352
  children: [
353
- n.live != null && /* @__PURE__ */ K(S, {
353
+ n.live != null && /* @__PURE__ */ H(S, {
354
354
  "aria-label": E("resource.enableFlow", { name: n.name }),
355
355
  checked: n.live.enabled,
356
- disabled: n.status != "active" || t != null || A != null,
357
- onCheckedChange: (e) => void N(e),
356
+ disabled: n.status != "active" || t != null || k != null,
357
+ onCheckedChange: (e) => void oe(e),
358
358
  size: "sm",
359
359
  title: E("resource.enabledHint")
360
360
  }),
361
- n.status == "active" && /* @__PURE__ */ K(s, {
361
+ n.status == "active" && /* @__PURE__ */ H(s, {
362
362
  onClick: () => o(n),
363
363
  size: "sm",
364
364
  variant: "outline",
365
365
  children: E("resource.edit")
366
366
  }),
367
- /* @__PURE__ */ K(s, {
368
- disabled: n.status != "active" || t != null || A != null || n.live != null && !M,
369
- onClick: () => void N("publish"),
367
+ /* @__PURE__ */ H(s, {
368
+ disabled: n.status != "active" || t != null || k != null || n.live != null && !A,
369
+ onClick: () => void oe("publish"),
370
370
  size: "sm",
371
371
  variant: "outline",
372
- children: E(A == "publish" ? "workspace.publishing" : n.live == null ? "resource.publish" : "resource.publishUpdate")
372
+ children: E(k == "publish" ? "workspace.publishing" : n.live == null ? "resource.publish" : "resource.publishUpdate")
373
373
  }),
374
- n.status == "active" && /* @__PURE__ */ q(x, { children: [/* @__PURE__ */ K(_, {
375
- render: /* @__PURE__ */ K(s, {
374
+ n.status == "active" && /* @__PURE__ */ U(x, { children: [/* @__PURE__ */ H(_, {
375
+ render: /* @__PURE__ */ H(s, {
376
376
  "aria-label": E("sidebar.deleteFlow", { name: n.name }),
377
377
  ref: y,
378
- disabled: t != null || A != null,
378
+ disabled: t != null || k != null,
379
379
  onClick: () => D("delete"),
380
380
  size: "icon-sm",
381
381
  variant: "destructive"
382
382
  }),
383
- children: /* @__PURE__ */ K("i", {
383
+ children: /* @__PURE__ */ H("i", {
384
384
  "aria-hidden": "true",
385
385
  className: "i-lucide-light:trash-2"
386
386
  })
387
- }), /* @__PURE__ */ K(v, {
387
+ }), /* @__PURE__ */ H(v, {
388
388
  align: "center",
389
389
  collisionBoundary: [],
390
390
  container: f,
@@ -394,25 +394,25 @@ function Rt({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
394
394
  })] })
395
395
  ]
396
396
  }),
397
- /* @__PURE__ */ K(lt, {
397
+ /* @__PURE__ */ H(mt, {
398
398
  open: ee == "delete",
399
399
  onOpenChange: (e) => {
400
400
  e || D("idle");
401
401
  },
402
- children: /* @__PURE__ */ q(Qe, {
402
+ children: /* @__PURE__ */ U(rt, {
403
403
  container: f,
404
404
  initialFocus: w,
405
405
  finalFocus: y,
406
406
  showCloseButton: !1,
407
- children: [/* @__PURE__ */ q($e, { children: [/* @__PURE__ */ K(at, { children: E("sidebar.deleteFlowConfirm", { name: n.name }) }), /* @__PURE__ */ K(ct, { children: E("resource.deleteDescription") })] }), /* @__PURE__ */ q(ut, { children: [/* @__PURE__ */ K(it, {
408
- render: /* @__PURE__ */ K(s, {
407
+ children: [/* @__PURE__ */ U(it, { children: [/* @__PURE__ */ H(ut, { children: E("sidebar.deleteFlowConfirm", { name: n.name }) }), /* @__PURE__ */ H(pt, { children: E("resource.deleteDescription") })] }), /* @__PURE__ */ U(ht, { children: [/* @__PURE__ */ H(lt, {
408
+ render: /* @__PURE__ */ H(s, {
409
409
  ref: w,
410
410
  variant: "outline"
411
411
  }),
412
412
  children: E("common.cancel")
413
- }), /* @__PURE__ */ K(s, {
413
+ }), /* @__PURE__ */ H(s, {
414
414
  disabled: t != null,
415
- onClick: () => void F(),
415
+ onClick: () => void N(),
416
416
  variant: "destructive",
417
417
  children: E(t == "flow" ? "common.deleting" : "common.delete")
418
418
  })] })]
@@ -421,87 +421,87 @@ function Rt({ badge: e, busy: t, flow: n, href: r, onSelect: o, store: u }) {
421
421
  ]
422
422
  });
423
423
  }
424
- function zt() {
425
- return /* @__PURE__ */ q("div", {
424
+ function Wt() {
425
+ return /* @__PURE__ */ U("div", {
426
426
  "aria-hidden": "true",
427
427
  className: "resource-item-row",
428
- children: [/* @__PURE__ */ q("div", {
428
+ children: [/* @__PURE__ */ U("div", {
429
429
  className: "resource-list-row resource-skeleton-row flow-columns",
430
430
  children: [
431
- /* @__PURE__ */ q("span", {
431
+ /* @__PURE__ */ U("span", {
432
432
  className: "resource-skeleton-copy",
433
- children: [/* @__PURE__ */ K(W, { className: "h-3.5 w-36 max-w-full" }), /* @__PURE__ */ K(W, { className: "h-3 w-24 max-w-full" })]
433
+ children: [/* @__PURE__ */ H(w, { className: "h-3.5 w-36 max-w-full" }), /* @__PURE__ */ H(w, { className: "h-3 w-24 max-w-full" })]
434
434
  }),
435
- /* @__PURE__ */ K(W, { className: "h-3 w-36 max-w-full" }),
436
- /* @__PURE__ */ K(W, { className: "h-3 w-28 max-w-full" }),
437
- /* @__PURE__ */ K(W, { className: "h-3 w-16" })
435
+ /* @__PURE__ */ H(w, { className: "h-3 w-36 max-w-full" }),
436
+ /* @__PURE__ */ H(w, { className: "h-3 w-28 max-w-full" }),
437
+ /* @__PURE__ */ H(w, { className: "h-3 w-16" })
438
438
  ]
439
- }), /* @__PURE__ */ q("div", {
439
+ }), /* @__PURE__ */ U("div", {
440
440
  className: "resource-live-controls",
441
- children: [/* @__PURE__ */ K(W, { className: "h-7 w-16" }), /* @__PURE__ */ K(W, { className: "h-7 w-14" })]
441
+ children: [/* @__PURE__ */ H(w, { className: "h-7 w-16" }), /* @__PURE__ */ H(w, { className: "h-7 w-14" })]
442
442
  })]
443
443
  });
444
444
  }
445
- function Bt({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBadges: a, hrefForFlow: o, hostAction: l, hostTitle: u, language: d, onCreateFlow: m, onHostAction: h, onLanguageChange: g, onSelectFlow: _, store: v }) {
446
- let b = i(), x = r(v.workspace.$.busy), S = r(v.workspace.$.flowLoadFailed), C = r(v.workspace.$.flowLoadMoreFailed), T = r(v.workspace.$.flowLoading), E = r(v.workspace.$.flowLoadingMore), D = r(v.workspace.$.flowNextCursor), te = r(v.workspace.$.flowRefreshing), ne = r(v.workspace.$.flows), k = r(v.workspace.$.flowTotal), [A, j] = J(!1), [M, re] = J(""), [ie, ae] = J(""), N = M.trim().toLocaleLowerCase(), P = ne.filter((e) => e.name.toLocaleLowerCase().includes(N));
447
- async function F(e) {
445
+ function Gt({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBadges: a, hrefForFlow: o, hostAction: l, hostTitle: u, language: d, onCreateFlow: m, onHostAction: h, onLanguageChange: g, onSelectFlow: _, store: v }) {
446
+ let b = i(), x = r(v.workspace.$.busy), S = r(v.workspace.$.flowLoadFailed), C = r(v.workspace.$.flowLoadMoreFailed), w = r(v.workspace.$.flowLoading), T = r(v.workspace.$.flowLoadingMore), ee = r(v.workspace.$.flowNextCursor), D = r(v.workspace.$.flowRefreshing), O = r(v.workspace.$.flows), ne = r(v.workspace.$.flowTotal), [re, k] = W(!1), [ie, A] = W(""), [j, M] = W(""), N = ie.trim().toLocaleLowerCase(), ce = O.filter((e) => e.name.toLocaleLowerCase().includes(N));
447
+ async function le(e) {
448
448
  e.preventDefault();
449
- let t = ie.trim();
450
- pt(t) != null || !await m(t) || (j(!1), ae(""));
449
+ let t = j.trim();
450
+ vt(t) != null || !await m(t) || (k(!1), M(""));
451
451
  }
452
- return /* @__PURE__ */ K("main", {
452
+ return /* @__PURE__ */ H("main", {
453
453
  className: "resource-browser",
454
454
  "data-tooltip-portal": !0,
455
- children: /* @__PURE__ */ q("div", {
455
+ children: /* @__PURE__ */ U("div", {
456
456
  className: c("resource-page", e != "default" && "resource-page-full"),
457
457
  children: [
458
- /* @__PURE__ */ K("h1", {
458
+ /* @__PURE__ */ H("h1", {
459
459
  className: "sr-only",
460
460
  children: b("resource.flows")
461
461
  }),
462
- /* @__PURE__ */ q("section", {
462
+ /* @__PURE__ */ U("section", {
463
463
  "aria-labelledby": "flow-list-title",
464
464
  className: "resource-list-section rounded-lg",
465
465
  children: [
466
- /* @__PURE__ */ q("div", {
466
+ /* @__PURE__ */ U("div", {
467
467
  className: "resource-list-title",
468
- children: [/* @__PURE__ */ q("div", {
468
+ children: [/* @__PURE__ */ U("div", {
469
469
  className: "resource-list-heading",
470
- children: [/* @__PURE__ */ K("h2", {
470
+ children: [/* @__PURE__ */ H("h2", {
471
471
  id: "flow-list-title",
472
472
  children: b("resource.all")
473
- }), !T && /* @__PURE__ */ K("span", { children: b("resource.flowCount", { count: k ?? ne.length }) })]
474
- }), /* @__PURE__ */ q("div", {
473
+ }), !w && /* @__PURE__ */ H("span", { children: b("resource.flowCount", { count: ne ?? O.length }) })]
474
+ }), /* @__PURE__ */ U("div", {
475
475
  className: "resource-list-actions",
476
476
  children: [
477
- /* @__PURE__ */ K(Pt, {
477
+ /* @__PURE__ */ H(zt, {
478
478
  language: d,
479
479
  onLanguageChange: g
480
480
  }),
481
- /* @__PURE__ */ q(y, {
481
+ /* @__PURE__ */ U(y, {
482
482
  className: "w-full sm:w-56",
483
- children: [/* @__PURE__ */ K(f, { children: /* @__PURE__ */ K(st, {
483
+ children: [/* @__PURE__ */ H(f, { children: /* @__PURE__ */ H(ft, {
484
484
  name: "search",
485
485
  size: 17
486
- }) }), /* @__PURE__ */ K(p, {
486
+ }) }), /* @__PURE__ */ H(p, {
487
487
  autoComplete: "off",
488
488
  "aria-label": b("resource.searchByName"),
489
489
  name: "flow-search",
490
- onChange: (e) => re(e.target.value),
490
+ onChange: (e) => A(e.target.value),
491
491
  placeholder: b("resource.searchByName"),
492
- value: M
492
+ value: ie
493
493
  })]
494
494
  }),
495
- /* @__PURE__ */ q(s, {
495
+ /* @__PURE__ */ U(s, {
496
496
  className: "pr-3",
497
497
  disabled: x != null,
498
- onClick: () => j(!0),
499
- children: [/* @__PURE__ */ K(st, {
498
+ onClick: () => k(!0),
499
+ children: [/* @__PURE__ */ H(ft, {
500
500
  "data-icon": "inline-start",
501
501
  name: "plus"
502
502
  }), b("resource.newFlow")]
503
503
  }),
504
- l != null && u != null && h != null && /* @__PURE__ */ K(xe, {
504
+ l != null && u != null && h != null && /* @__PURE__ */ H(Re, {
505
505
  action: l,
506
506
  onAction: h,
507
507
  title: u
@@ -509,69 +509,69 @@ function Bt({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBa
509
509
  ]
510
510
  })]
511
511
  }),
512
- /* @__PURE__ */ q("div", {
512
+ /* @__PURE__ */ U("div", {
513
513
  "aria-hidden": "true",
514
514
  className: "resource-list-columns-shell",
515
- children: [/* @__PURE__ */ q("div", {
515
+ children: [/* @__PURE__ */ U("div", {
516
516
  className: "resource-list-columns flow-columns",
517
517
  children: [
518
- /* @__PURE__ */ K("span", { children: b("resource.name") }),
519
- /* @__PURE__ */ K("span", {
518
+ /* @__PURE__ */ H("span", { children: b("resource.name") }),
519
+ /* @__PURE__ */ H("span", {
520
520
  className: "resource-flow-id-heading",
521
521
  children: b("resource.flowId")
522
522
  }),
523
- /* @__PURE__ */ K("span", {
523
+ /* @__PURE__ */ H("span", {
524
524
  className: "resource-updated-heading",
525
525
  children: b("resource.updated")
526
526
  }),
527
- /* @__PURE__ */ K("span", { children: b("resource.status") })
527
+ /* @__PURE__ */ H("span", { children: b("resource.status") })
528
528
  ]
529
- }), /* @__PURE__ */ K("span", {
529
+ }), /* @__PURE__ */ H("span", {
530
530
  className: "resource-actions-heading",
531
531
  children: b("resource.actions")
532
532
  })]
533
533
  }),
534
- /* @__PURE__ */ K("div", {
534
+ /* @__PURE__ */ H("div", {
535
535
  className: "resource-list",
536
- children: T ? Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ K(zt, {}, t)) : S ? /* @__PURE__ */ q(w, {
536
+ children: w ? Array.from({ length: 5 }, (e, t) => /* @__PURE__ */ H(Wt, {}, t)) : S ? /* @__PURE__ */ U(je, {
537
537
  className: "min-h-64",
538
538
  role: "alert",
539
- children: [/* @__PURE__ */ q(oe, { children: [
540
- /* @__PURE__ */ K(le, {
539
+ children: [/* @__PURE__ */ U(se, { children: [
540
+ /* @__PURE__ */ H(E, {
541
541
  variant: "icon",
542
- children: /* @__PURE__ */ K(st, {
542
+ children: /* @__PURE__ */ H(ft, {
543
543
  name: "alert",
544
544
  size: 20
545
545
  })
546
546
  }),
547
- /* @__PURE__ */ K(ee, { children: b("resource.flowsLoadFailed") }),
548
- /* @__PURE__ */ K(O, { children: b("resource.flowsLoadFailedDescription") })
549
- ] }), /* @__PURE__ */ K(se, { children: /* @__PURE__ */ K(s, {
547
+ /* @__PURE__ */ H(te, { children: b("resource.flowsLoadFailed") }),
548
+ /* @__PURE__ */ H(oe, { children: b("resource.flowsLoadFailedDescription") })
549
+ ] }), /* @__PURE__ */ H(ae, { children: /* @__PURE__ */ H(s, {
550
550
  onClick: () => void v.retryFlows(),
551
551
  variant: "outline",
552
552
  children: b("empty.retry")
553
553
  }) })]
554
- }) : P.length == 0 ? /* @__PURE__ */ q(w, {
554
+ }) : ce.length == 0 ? /* @__PURE__ */ U(je, {
555
555
  className: "min-h-64",
556
- children: [/* @__PURE__ */ q(oe, { children: [
557
- /* @__PURE__ */ K(le, {
556
+ children: [/* @__PURE__ */ U(se, { children: [
557
+ /* @__PURE__ */ H(E, {
558
558
  variant: "icon",
559
- children: /* @__PURE__ */ K(st, {
559
+ children: /* @__PURE__ */ H(ft, {
560
560
  name: "flow",
561
561
  size: 20
562
562
  })
563
563
  }),
564
- /* @__PURE__ */ K(ee, { children: b(N.length == 0 ? "resource.noFlows" : "resource.noMatchingFlows") }),
565
- /* @__PURE__ */ K(O, { children: b(N.length == 0 ? "resource.noFlowsDescription" : "resource.noMatchingDescription") })
566
- ] }), N.length == 0 && /* @__PURE__ */ K(se, { children: /* @__PURE__ */ q(s, {
567
- onClick: () => j(!0),
564
+ /* @__PURE__ */ H(te, { children: b(N.length == 0 ? "resource.noFlows" : "resource.noMatchingFlows") }),
565
+ /* @__PURE__ */ H(oe, { children: b(N.length == 0 ? "resource.noFlowsDescription" : "resource.noMatchingDescription") })
566
+ ] }), N.length == 0 && /* @__PURE__ */ H(ae, { children: /* @__PURE__ */ U(s, {
567
+ onClick: () => k(!0),
568
568
  variant: "outline",
569
- children: [/* @__PURE__ */ K(st, {
569
+ children: [/* @__PURE__ */ H(ft, {
570
570
  "data-icon": "inline-start",
571
571
  name: "plus"
572
572
  }), b("resource.newFlow")]
573
573
  }) })]
574
- }) : P.map((e) => /* @__PURE__ */ K(Rt, {
574
+ }) : ce.map((e) => /* @__PURE__ */ H(Ut, {
575
575
  badge: a?.[e.flowId],
576
576
  busy: x,
577
577
  flow: e,
@@ -580,29 +580,29 @@ function Bt({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBa
580
580
  store: v
581
581
  }, e.flowId))
582
582
  }),
583
- D != null && /* @__PURE__ */ K("div", {
583
+ ee != null && /* @__PURE__ */ H("div", {
584
584
  className: "resource-list-footer",
585
- children: /* @__PURE__ */ K(s, {
586
- disabled: E || te,
585
+ children: /* @__PURE__ */ H(s, {
586
+ disabled: T || D,
587
587
  onClick: () => void v.workspace.loadMoreFlows(),
588
588
  variant: "outline",
589
- children: b(E ? "resource.loadingMore" : C ? "resource.retryLoadMore" : "resource.loadMore")
589
+ children: b(T ? "resource.loadingMore" : C ? "resource.retryLoadMore" : "resource.loadMore")
590
590
  })
591
591
  })
592
592
  ]
593
593
  }),
594
- A && /* @__PURE__ */ K(yt, {
594
+ re && /* @__PURE__ */ H(wt, {
595
595
  fallback: null,
596
- children: /* @__PURE__ */ K(Ot, {
596
+ children: /* @__PURE__ */ H(Nt, {
597
597
  disabled: t,
598
598
  field: n,
599
599
  id: "flow-name",
600
- issue: pt(ie),
600
+ issue: vt(j),
601
601
  label: b("resource.flowName"),
602
- name: ie,
603
- onNameChange: ae,
604
- onOpenChange: j,
605
- onSubmit: (e) => void F(e),
602
+ name: j,
603
+ onNameChange: M,
604
+ onOpenChange: k,
605
+ onSubmit: (e) => void le(e),
606
606
  pending: x == "flow",
607
607
  title: b("resource.newFlow")
608
608
  })
@@ -613,28 +613,28 @@ function Bt({ catalogWidth: e, createFlowDisabled: t, createFlowField: n, flowBa
613
613
  }
614
614
  //#endregion
615
615
  //#region ../../node_modules/.bun/dequal@2.0.3/node_modules/dequal/dist/index.mjs
616
- var Vt = Object.prototype.hasOwnProperty;
617
- function Ht(e, t, n) {
618
- for (n of e.keys()) if (Ut(n, t)) return n;
616
+ var Kt = Object.prototype.hasOwnProperty;
617
+ function qt(e, t, n) {
618
+ for (n of e.keys()) if (K(n, t)) return n;
619
619
  }
620
- function Ut(e, t) {
620
+ function K(e, t) {
621
621
  var n, r, i;
622
622
  if (e === t) return !0;
623
623
  if (e && t && (n = e.constructor) === t.constructor) {
624
624
  if (n === Date) return e.getTime() === t.getTime();
625
625
  if (n === RegExp) return e.toString() === t.toString();
626
626
  if (n === Array) {
627
- if ((r = e.length) === t.length) for (; r-- && Ut(e[r], t[r]););
627
+ if ((r = e.length) === t.length) for (; r-- && K(e[r], t[r]););
628
628
  return r === -1;
629
629
  }
630
630
  if (n === Set) {
631
631
  if (e.size !== t.size) return !1;
632
- for (r of e) if (i = r, i && typeof i == "object" && (i = Ht(t, i), !i) || !t.has(i)) return !1;
632
+ for (r of e) if (i = r, i && typeof i == "object" && (i = qt(t, i), !i) || !t.has(i)) return !1;
633
633
  return !0;
634
634
  }
635
635
  if (n === Map) {
636
636
  if (e.size !== t.size) return !1;
637
- for (r of e) if (i = r[0], i && typeof i == "object" && (i = Ht(t, i), !i) || !Ut(r[1], t.get(i))) return !1;
637
+ for (r of e) if (i = r[0], i && typeof i == "object" && (i = qt(t, i), !i) || !K(r[1], t.get(i))) return !1;
638
638
  return !0;
639
639
  }
640
640
  if (n === ArrayBuffer) e = new Uint8Array(e), t = new Uint8Array(t);
@@ -647,7 +647,7 @@ function Ut(e, t) {
647
647
  return r === -1;
648
648
  }
649
649
  if (!n || typeof e == "object") {
650
- for (n in r = 0, e) if (Vt.call(e, n) && ++r && !Vt.call(t, n) || !(n in t) || !Ut(e[n], t[n])) return !1;
650
+ for (n in r = 0, e) if (Kt.call(e, n) && ++r && !Kt.call(t, n) || !(n in t) || !K(e[n], t[n])) return !1;
651
651
  return Object.keys(t).length === r;
652
652
  }
653
653
  }
@@ -655,7 +655,7 @@ function Ut(e, t) {
655
655
  }
656
656
  //#endregion
657
657
  //#region ../../node_modules/.bun/nanoid@6.0.1/node_modules/nanoid/index.browser.js
658
- var Wt = (e) => crypto.getRandomValues(new Uint8Array(e)), Gt = (e, t, n) => {
658
+ var Jt = (e) => crypto.getRandomValues(new Uint8Array(e)), Yt = (e, t, n) => {
659
659
  let r = 256 - 256 % e.length;
660
660
  if (r === 256) {
661
661
  let r = e.length - 1;
@@ -677,29 +677,29 @@ var Wt = (e) => crypto.getRandomValues(new Uint8Array(e)), Gt = (e, t, n) => {
677
677
  for (; s--;) if (t[s] < r && (o += e[t[s] % e.length], o.length >= a)) return o;
678
678
  }
679
679
  };
680
- }, Kt = (e, t = 21) => Gt(e, t | 0, Wt);
680
+ }, Xt = (e, t = 21) => Yt(e, t | 0, Jt);
681
681
  //#endregion
682
682
  //#region src/flow/common/edgeChanges.ts
683
- function qt(e, t, n) {
684
- return Yt(e, t)?.edges.some((e) => u(e, n)) ? [] : [{
683
+ function Zt(e, t, n) {
684
+ return $t(e, t)?.edges.some((e) => u(e, n)) ? [] : [{
685
685
  edge: n,
686
686
  kind: "graph.edge.connect",
687
687
  target: t
688
688
  }];
689
689
  }
690
- function Jt(e, t, n) {
691
- return Yt(e, t)?.edges.some((e) => u(e, n)) ? [{
690
+ function Qt(e, t, n) {
691
+ return $t(e, t)?.edges.some((e) => u(e, n)) ? [{
692
692
  edge: n,
693
693
  kind: "graph.edge.disconnect",
694
694
  target: t
695
695
  }] : [];
696
696
  }
697
- function Yt(e, t) {
697
+ function $t(e, t) {
698
698
  return t.kind == "flow" ? e.document.graph : e.document.subflows[t.id]?.graph;
699
699
  }
700
700
  //#endregion
701
701
  //#region src/flow/common/moduleChanges.ts
702
- async function Xt(e) {
702
+ async function en(e) {
703
703
  try {
704
704
  let { parse: t } = await import("./lib-C5Ipyfps.js").then((e) => e.t), n = t(e, {
705
705
  errorRecovery: !0,
@@ -715,7 +715,7 @@ async function Xt(e) {
715
715
  return [];
716
716
  }
717
717
  }
718
- function Zt(e, t, n, r, i) {
718
+ function tn(e, t, n, r, i) {
719
719
  return [{
720
720
  beforeImports: n,
721
721
  beforeSource: t,
@@ -725,51 +725,51 @@ function Zt(e, t, n, r, i) {
725
725
  source: r
726
726
  }];
727
727
  }
728
- var Qt = Kt("23456789abcdefghjkmnpqrstuvwxyz", 10);
728
+ var nn = Xt("23456789abcdefghjkmnpqrstuvwxyz", 10);
729
729
  //#endregion
730
730
  //#region src/workbench/browser/runtime/canvasPresentation.ts
731
- function X(e) {
731
+ function q(e) {
732
732
  if (!(typeof e != "object" || !e || Array.isArray(e))) return e;
733
733
  }
734
- function $t(e) {
734
+ function rn(e) {
735
735
  return typeof e == "number" && Number.isFinite(e) ? e : void 0;
736
736
  }
737
- function Z(e, t) {
738
- let n = X(e.designer);
739
- if (n?.version == 1) return on(n, t);
737
+ function J(e, t) {
738
+ let n = q(e.designer);
739
+ if (n?.version == 1) return ln(n, t);
740
740
  }
741
- function en(e, t) {
742
- return ((e) => Object.fromEntries(Object.entries(X(e) ?? {}).flatMap(([e, t]) => {
743
- let n = X(t), r = $t(n?.x), i = $t(n?.y);
741
+ function an(e, t) {
742
+ return ((e) => Object.fromEntries(Object.entries(q(e) ?? {}).flatMap(([e, t]) => {
743
+ let n = q(t), r = rn(n?.x), i = rn(n?.y);
744
744
  return r == null || i == null ? [] : [[e, {
745
745
  x: r,
746
746
  y: i
747
747
  }]];
748
- })))(Z(e, t)?.nodes);
748
+ })))(J(e, t)?.nodes);
749
749
  }
750
- function Q(e, t) {
751
- let n = en(e, t), r = Z(e, t)?.order, i = Array.isArray(r) ? r.flatMap((e) => typeof e == "string" && n[e] != null ? [e] : []) : [];
750
+ function Y(e, t) {
751
+ let n = an(e, t), r = J(e, t)?.order, i = Array.isArray(r) ? r.flatMap((e) => typeof e == "string" && n[e] != null ? [e] : []) : [];
752
752
  return [.../* @__PURE__ */ new Set([...i, ...Object.keys(n)])];
753
753
  }
754
- function tn(e, t) {
755
- let n = X(Z(e, t)?.viewport), r = $t(n?.x), i = $t(n?.y), a = $t(n?.zoom);
754
+ function on(e, t) {
755
+ let n = q(J(e, t)?.viewport), r = rn(n?.x), i = rn(n?.y), a = rn(n?.zoom);
756
756
  return r == null || i == null || a == null || a <= 0 ? void 0 : {
757
757
  x: r,
758
758
  y: i,
759
759
  zoom: a
760
760
  };
761
761
  }
762
- function nn(e, t) {
763
- return tn(e, t) ?? {
762
+ function sn(e, t) {
763
+ return on(e, t) ?? {
764
764
  x: 0,
765
765
  y: 0,
766
766
  zoom: 1
767
767
  };
768
768
  }
769
- function rn(e, t, n) {
770
- let r = X(Z(e, t)?.comments) ?? {};
769
+ function cn(e, t, n) {
770
+ let r = q(J(e, t)?.comments) ?? {};
771
771
  return Object.fromEntries(Object.entries(r).flatMap(([e, t]) => {
772
- let r = X(t), i = typeof r?.title == "string" ? r.title : void 0, a = typeof r?.content == "string" ? r.content : void 0;
772
+ let r = q(t), i = typeof r?.title == "string" ? r.title : void 0, a = typeof r?.content == "string" ? r.content : void 0;
773
773
  return i == null || a == null ? [] : [[e, {
774
774
  content: a,
775
775
  position: n[e] ?? {
@@ -780,20 +780,20 @@ function rn(e, t, n) {
780
780
  }]];
781
781
  }));
782
782
  }
783
- function an(e) {
784
- let t = X(e.designer);
783
+ function X(e) {
784
+ let t = q(e.designer);
785
785
  return t?.version == 1 ? t : { version: 1 };
786
786
  }
787
- function on(e, t) {
788
- return t.kind == "flow" ? X(e.flow) : X(X(e.subflows)?.[t.id]);
787
+ function ln(e, t) {
788
+ return t.kind == "flow" ? q(e.flow) : q(q(e.subflows)?.[t.id]);
789
789
  }
790
- function sn(e, t, n) {
790
+ function Z(e, t, n) {
791
791
  if (t.kind == "flow") return {
792
792
  ...e,
793
793
  flow: n,
794
794
  version: 1
795
795
  };
796
- let r = X(e.subflows) ?? {};
796
+ let r = q(e.subflows) ?? {};
797
797
  return {
798
798
  ...e,
799
799
  subflows: {
@@ -803,17 +803,17 @@ function sn(e, t, n) {
803
803
  version: 1
804
804
  };
805
805
  }
806
- function $(e, t) {
806
+ function Q(e, t) {
807
807
  let n = {
808
- ...Z(e, t),
809
- viewport: { ...nn(e, t) },
810
- nodes: en(e, t),
811
- order: Q(e, t)
808
+ ...J(e, t),
809
+ viewport: { ...sn(e, t) },
810
+ nodes: an(e, t),
811
+ order: Y(e, t)
812
812
  };
813
813
  return delete n.layouts, n;
814
814
  }
815
- function cn(e, t, n) {
816
- let r = an(e), i = $(e, t), a = X(i.nodes) ?? {}, o = [...Q(e, t)];
815
+ function un(e, t, n) {
816
+ let r = X(e), i = Q(e, t), a = q(i.nodes) ?? {}, o = [...Y(e, t)];
817
817
  for (let e of Object.keys(n)) o.includes(e) || o.push(e);
818
818
  let s = {
819
819
  ...a,
@@ -824,29 +824,29 @@ function cn(e, t, n) {
824
824
  };
825
825
  return {
826
826
  ...e,
827
- designer: sn(r, t, {
827
+ designer: Z(r, t, {
828
828
  ...i,
829
829
  nodes: s,
830
830
  order: o
831
831
  })
832
832
  };
833
833
  }
834
- function ln(e, t, n, r) {
835
- if (X(Z(e, t)?.hiddenNodeContent)?.[n] === !0 === r) return e;
836
- let i = $(e, t), a = { ...X(i.hiddenNodeContent) };
834
+ function dn(e, t, n, r) {
835
+ if (q(J(e, t)?.hiddenNodeContent)?.[n] === !0 === r) return e;
836
+ let i = Q(e, t), a = { ...q(i.hiddenNodeContent) };
837
837
  return r ? a[n] = !0 : delete a[n], {
838
838
  ...e,
839
- designer: sn(an(e), t, {
839
+ designer: Z(X(e), t, {
840
840
  ...i,
841
841
  hiddenNodeContent: a
842
842
  })
843
843
  };
844
844
  }
845
- function un(e, t, n, r) {
846
- let i = cn(e, t, { [n]: r.position }), a = an(i), o = on(a, t) ?? {}, s = X(o.comments) ?? {};
845
+ function fn(e, t, n, r) {
846
+ let i = un(e, t, { [n]: r.position }), a = X(i), o = ln(a, t) ?? {}, s = q(o.comments) ?? {};
847
847
  return {
848
848
  ...i,
849
- designer: sn(a, t, {
849
+ designer: Z(a, t, {
850
850
  ...o,
851
851
  comments: {
852
852
  ...s,
@@ -858,13 +858,13 @@ function un(e, t, n, r) {
858
858
  })
859
859
  };
860
860
  }
861
- function dn(e, t, n) {
862
- let r = an(e), i = $(e, t), a = { ...X(i.comments) }, o = { ...X(i.nodes) };
861
+ function pn(e, t, n) {
862
+ let r = X(e), i = Q(e, t), a = { ...q(i.comments) }, o = { ...q(i.nodes) };
863
863
  for (let e of n) delete a[e], delete o[e];
864
- let s = Q(e, t).filter((e) => !n.has(e));
864
+ let s = Y(e, t).filter((e) => !n.has(e));
865
865
  return {
866
866
  ...e,
867
- designer: sn(r, t, {
867
+ designer: Z(r, t, {
868
868
  ...i,
869
869
  comments: a,
870
870
  nodes: o,
@@ -872,16 +872,16 @@ function dn(e, t, n) {
872
872
  })
873
873
  };
874
874
  }
875
- function fn(e, t) {
876
- return new Set(Object.keys(X(Z(e, t)?.comments) ?? {}));
875
+ function mn(e, t) {
876
+ return new Set(Object.keys(q(J(e, t)?.comments) ?? {}));
877
877
  }
878
- function pn(e, t, n) {
879
- let r = tn(e, t);
878
+ function hn(e, t, n) {
879
+ let r = on(e, t);
880
880
  if (r?.x == n.x && r.y == n.y && r.zoom == n.zoom) return e;
881
- let i = an(e), a = $(e, t);
881
+ let i = X(e), a = Q(e, t);
882
882
  return {
883
883
  ...e,
884
- designer: sn(i, t, {
884
+ designer: Z(i, t, {
885
885
  ...a,
886
886
  viewport: {
887
887
  x: n.x,
@@ -891,52 +891,71 @@ function pn(e, t, n) {
891
891
  })
892
892
  };
893
893
  }
894
- function mn(e, t, n) {
895
- let r = $(e, n), i = $(t, n), a = /* @__PURE__ */ new Set();
894
+ function gn(e, t, n) {
895
+ let r = Q(e, n), i = Q(t, n), a = /* @__PURE__ */ new Set();
896
896
  for (let e of [
897
897
  "nodes",
898
898
  "comments",
899
899
  "hiddenNodeContent"
900
900
  ]) {
901
- let t = X(r[e]) ?? {}, n = X(i[e]) ?? {};
901
+ let t = q(r[e]) ?? {}, n = q(i[e]) ?? {};
902
902
  for (let e of /* @__PURE__ */ new Set([...Object.keys(t), ...Object.keys(n)])) u(t[e], n[e]) || a.add(e);
903
903
  }
904
904
  let o = (e) => Object.fromEntries([
905
905
  "nodes",
906
906
  "comments",
907
907
  "hiddenNodeContent"
908
- ].map((t) => [t, Object.fromEntries(Object.entries(X(e[t]) ?? {}).filter(([e]) => a.has(e)))]));
908
+ ].map((t) => [t, Object.fromEntries(Object.entries(q(e[t]) ?? {}).filter(([e]) => a.has(e)))]));
909
909
  return {
910
910
  before: o(r),
911
911
  after: o(i),
912
912
  nodeIds: [...a],
913
- beforeOrder: Q(e, n),
914
- afterOrder: Q(t, n)
913
+ beforeOrder: Y(e, n),
914
+ afterOrder: Y(t, n)
915
915
  };
916
916
  }
917
- function hn(e, t, n, r) {
917
+ function _n(e, t, n, r) {
918
918
  if (n.nodeIds.length == 0) return e;
919
- let i = $(e, t), a = r ? n.after : n.before;
919
+ let i = Q(e, t), a = r ? n.after : n.before;
920
920
  for (let e of [
921
921
  "nodes",
922
922
  "comments",
923
923
  "hiddenNodeContent"
924
924
  ]) {
925
- let t = { ...X(i[e]) }, r = X(a[e]) ?? {};
925
+ let t = { ...q(i[e]) }, r = q(a[e]) ?? {};
926
926
  for (let e of n.nodeIds) r[e] == null ? delete t[e] : t[e] = r[e];
927
927
  i[e] = t;
928
928
  }
929
929
  return i.order = [...r ? n.afterOrder : n.beforeOrder], {
930
930
  ...e,
931
- designer: sn(an(e), t, i)
931
+ designer: Z(X(e), t, i)
932
+ };
933
+ }
934
+ function vn(e, t) {
935
+ return q(J(e, t)?.hiddenNodeContent);
936
+ }
937
+ //#endregion
938
+ //#region src/workbench/browser/runtime/connectionCatalog.ts
939
+ function yn(e, t) {
940
+ let n = e.authenticated && t != null ? $(t).preferred : void 0;
941
+ return {
942
+ ...e,
943
+ ...n == null ? {} : { defaultConnection: n }
932
944
  };
933
945
  }
934
- function gn(e, t) {
935
- return X(Z(e, t)?.hiddenNodeContent);
946
+ function $(e) {
947
+ let t = [], n = /* @__PURE__ */ new Map(), r;
948
+ for (let i of e) n.set(i.connectionId, i), i.status == "active" && (t.push(i), i.isDefault && (r = i));
949
+ return {
950
+ active: t,
951
+ all: e,
952
+ byId: n,
953
+ preferred: r ?? (t.length == 1 ? t[0] : void 0)
954
+ };
936
955
  }
937
956
  //#endregion
938
957
  //#region src/workbench/browser/runtime/publications/publicationStore.ts
939
- var _n = {
958
+ var bn = {
940
959
  activities: [],
941
960
  activitiesLoadFailed: !1,
942
961
  activitiesLoading: !1,
@@ -951,25 +970,25 @@ var _n = {
951
970
  publications: [],
952
971
  publishing: !1,
953
972
  refreshing: !1
954
- }, vn = 20, yn = 50, bn = 750;
955
- function xn(e, t) {
973
+ }, xn = 20, Sn = 50, Cn = 750;
974
+ function wn(e, t) {
956
975
  return e?.flowId == t.flowId;
957
976
  }
958
- var Sn = class {
977
+ var Tn = class {
959
978
  #e;
960
979
  #t;
961
980
  #n;
962
- #r = new I();
963
- #i = new I();
981
+ #r = new D();
982
+ #i = new D();
964
983
  #a;
965
- #o = new I();
966
- #s = new I();
984
+ #o = new D();
985
+ #s = new D();
967
986
  #c;
968
- #l = n(_n);
987
+ #l = n(bn);
969
988
  #u;
970
989
  #d;
971
990
  #f;
972
- constructor(t, n, r, i, a = C, o = h()) {
991
+ constructor(t, n, r, i, a = F, o = h()) {
973
992
  this.#e = t, this.#t = a, this.#n = o, this.#a = i, this.#c = r, this.#u = n, this.$ = {
974
993
  activities: e(this.#l, (e) => e.activities),
975
994
  activitiesLoadFailed: e(this.#l, (e) => e.activitiesLoadFailed),
@@ -1003,17 +1022,17 @@ var Sn = class {
1003
1022
  this.#l.dispose();
1004
1023
  }
1005
1024
  reset() {
1006
- this.#r.invalidate(), this.#i.invalidate(), this.#y(), this.#o.invalidate(), this.#s.invalidate(), this.#f = void 0, this.#l.set(_n);
1025
+ this.#r.invalidate(), this.#i.invalidate(), this.#y(), this.#o.invalidate(), this.#s.invalidate(), this.#f = void 0, this.#l.set(bn);
1007
1026
  }
1008
1027
  async load(e) {
1009
- let t = { flowId: e }, n = this.#l.value, r = n.loaded && xn(n.target, t), i = this.#r.begin();
1010
- xn(n.target, t) || (this.#i.invalidate(), this.#y(), this.#f = void 0), r ? this.#S({
1028
+ let t = { flowId: e }, n = this.#l.value, r = n.loaded && wn(n.target, t), i = this.#r.begin();
1029
+ wn(n.target, t) || (this.#i.invalidate(), this.#y(), this.#f = void 0), r ? this.#S({
1011
1030
  loadFailed: !1,
1012
1031
  loadingMore: !1,
1013
1032
  loadMoreFailed: !1,
1014
1033
  refreshing: !0
1015
1034
  }) : this.#l.set({
1016
- ..._n,
1035
+ ...bn,
1017
1036
  loading: !0,
1018
1037
  target: t
1019
1038
  });
@@ -1043,7 +1062,7 @@ var Sn = class {
1043
1062
  loadFailed: !r,
1044
1063
  loading: !1,
1045
1064
  refreshing: !1
1046
- }), this.#c(L(e, this.#n.t));
1065
+ }), this.#c(O(e, this.#n.t));
1047
1066
  }
1048
1067
  }
1049
1068
  async loadMore() {
@@ -1057,7 +1076,7 @@ var Sn = class {
1057
1076
  try {
1058
1077
  let e = await this.#e.listPublications(n.flowId, {
1059
1078
  cursor: t,
1060
- limit: yn
1079
+ limit: Sn
1061
1080
  });
1062
1081
  if (!r()) return;
1063
1082
  let i = new Set(this.#l.value.publications.map((e) => e.publicationId));
@@ -1072,7 +1091,7 @@ var Sn = class {
1072
1091
  this.#S({
1073
1092
  loadMoreFailed: !0,
1074
1093
  loadingMore: !1
1075
- }), this.#c(L(e, this.#n.t));
1094
+ }), this.#c(O(e, this.#n.t));
1076
1095
  }
1077
1096
  }
1078
1097
  async publish() {
@@ -1099,7 +1118,7 @@ var Sn = class {
1099
1118
  publishing: e.status == "pending"
1100
1119
  }), await this.#_(r, e, s, t.name)) : !1;
1101
1120
  } catch (e) {
1102
- return s() ? (e instanceof U && e.code == "live.conflict" && await this.#m(r), this.#c(L(e, this.#n.t)), !1) : !1;
1121
+ return s() ? (e instanceof I && e.code == "live.conflict" && await this.#m(r), this.#c(O(e, this.#n.t)), !1) : !1;
1103
1122
  } finally {
1104
1123
  s() && this.#S({ publishing: !1 });
1105
1124
  }
@@ -1125,7 +1144,7 @@ var Sn = class {
1125
1144
  message: this.#n.t("notice.rolledBack", { revision: e.revisionId })
1126
1145
  }), !0);
1127
1146
  } catch (e) {
1128
- return s() ? (e instanceof U && e.code == "live.conflict" && await this.#m(r), this.#c(L(e, this.#n.t)), !1) : !1;
1147
+ return s() ? (e instanceof I && e.code == "live.conflict" && await this.#m(r), this.#c(O(e, this.#n.t)), !1) : !1;
1129
1148
  } finally {
1130
1149
  s() && this.#S({ rollingBackPublicationId: void 0 });
1131
1150
  }
@@ -1160,13 +1179,13 @@ var Sn = class {
1160
1179
  testingTriggerId: void 0,
1161
1180
  testResult: void 0
1162
1181
  });
1163
- let [r, i] = await Promise.allSettled([this.#e.getFlowTriggerBinding(t.flowId, e), this.#e.listFlowTriggerActivities(t.flowId, e, { limit: vn })]);
1182
+ let [r, i] = await Promise.allSettled([this.#e.getFlowTriggerBinding(t.flowId, e), this.#e.listFlowTriggerActivities(t.flowId, e, { limit: xn })]);
1164
1183
  if (n()) {
1165
1184
  if (r.status == "rejected") {
1166
1185
  this.#S({
1167
1186
  activitiesLoading: !1,
1168
1187
  detailLoading: !1
1169
- }), this.#c(L(r.reason, this.#n.t));
1188
+ }), this.#c(O(r.reason, this.#n.t));
1170
1189
  return;
1171
1190
  }
1172
1191
  this.#S({
@@ -1180,7 +1199,7 @@ var Sn = class {
1180
1199
  }) : (this.#S({
1181
1200
  activitiesLoadFailed: !0,
1182
1201
  activitiesLoading: !1
1183
- }), this.#c(L(i.reason, this.#n.t)));
1202
+ }), this.#c(O(i.reason, this.#n.t)));
1184
1203
  }
1185
1204
  }
1186
1205
  async loadMoreTriggerActivities() {
@@ -1194,7 +1213,7 @@ var Sn = class {
1194
1213
  try {
1195
1214
  let e = await this.#e.listFlowTriggerActivities(r.flowId, n, {
1196
1215
  cursor: t,
1197
- limit: vn
1216
+ limit: xn
1198
1217
  });
1199
1218
  if (!i() || this.#l.value.selectedTriggerId != n) return;
1200
1219
  let a = new Set(this.#l.value.activities.map((e) => e.activityId));
@@ -1209,7 +1228,7 @@ var Sn = class {
1209
1228
  this.#S({
1210
1229
  activitiesLoadFailed: !0,
1211
1230
  activitiesLoadingMore: !1
1212
- }), this.#c(L(e, this.#n.t));
1231
+ }), this.#c(O(e, this.#n.t));
1213
1232
  }
1214
1233
  }
1215
1234
  async testTrigger() {
@@ -1224,7 +1243,7 @@ var Sn = class {
1224
1243
  let e = await this.#e.testFlowPollTrigger(n.flowId, t);
1225
1244
  return !i() || this.#l.value.selectedTriggerId != t ? !1 : (this.#S({ testResult: e }), !0);
1226
1245
  } catch (e) {
1227
- return i() && this.#l.value.selectedTriggerId == t && this.#c(L(e, this.#n.t)), !1;
1246
+ return i() && this.#l.value.selectedTriggerId == t && this.#c(O(e, this.#n.t)), !1;
1228
1247
  } finally {
1229
1248
  i() && this.#l.value.selectedTriggerId == t && this.#S({ testingTriggerId: void 0 });
1230
1249
  }
@@ -1243,16 +1262,16 @@ var Sn = class {
1243
1262
  message: this.#n.t(e.operatorState == "active" ? "notice.triggerPaused" : "notice.triggerResumed")
1244
1263
  }), !0) : !1;
1245
1264
  } catch (e) {
1246
- return n() && this.#c(L(e, this.#n.t)), !1;
1265
+ return n() && this.#c(O(e, this.#n.t)), !1;
1247
1266
  } finally {
1248
1267
  n() && this.#S({ changingTriggerId: void 0 });
1249
1268
  }
1250
1269
  }
1251
1270
  async #p(e, t) {
1252
1271
  let n = this.#r.begin(), [r, i, a] = await this.#h(e, t).catch((t) => {
1253
- throw n() && xn(this.#l.value.target, e) && this.#S({ refreshing: !1 }), t;
1272
+ throw n() && wn(this.#l.value.target, e) && this.#S({ refreshing: !1 }), t;
1254
1273
  });
1255
- t?.throwIfAborted(), n() && this.#u.updateLive(r), n() && xn(this.#l.value.target, e) && this.#S({
1274
+ t?.throwIfAborted(), n() && this.#u.updateLive(r), n() && wn(this.#l.value.target, e) && this.#S({
1256
1275
  bindings: a,
1257
1276
  live: r,
1258
1277
  loaded: !0,
@@ -1276,7 +1295,7 @@ var Sn = class {
1276
1295
  this.#e.getLive(e.flowId, t),
1277
1296
  this.#e.listPublications(e.flowId, {
1278
1297
  includeTotal: !0,
1279
- limit: yn
1298
+ limit: Sn
1280
1299
  }, t),
1281
1300
  this.#e.listFlowTriggerBindings(e.flowId, t)
1282
1301
  ]);
@@ -1286,7 +1305,7 @@ var Sn = class {
1286
1305
  if (t != null && t != "") try {
1287
1306
  return await this.#e.getPublishOperation(e.flowId, t);
1288
1307
  } catch (t) {
1289
- if (t instanceof U && t.code == "publication.operation-not-found") {
1308
+ if (t instanceof I && t.code == "publication.operation-not-found") {
1290
1309
  this.#a.setItem(this.#b(e.flowId), "");
1291
1310
  return;
1292
1311
  }
@@ -1295,7 +1314,7 @@ var Sn = class {
1295
1314
  }
1296
1315
  async #_(e, t, n, r) {
1297
1316
  this.#y();
1298
- let i = Y.runFork(Y.gen({ self: this }, function* () {
1317
+ let i = G.runFork(G.gen({ self: this }, function* () {
1299
1318
  let i = yield* this.#v(e, t, n);
1300
1319
  if (i == null || !n()) return !1;
1301
1320
  if (this.#f = void 0, this.#x(e, {
@@ -1305,11 +1324,11 @@ var Sn = class {
1305
1324
  kind: "error",
1306
1325
  message: i.issue.message
1307
1326
  }), !1;
1308
- let a = yield* Y.tryPromise({
1327
+ let a = yield* G.tryPromise({
1309
1328
  try: (t) => this.#p(e, t),
1310
1329
  catch: (e) => e
1311
- }).pipe(Y.match({
1312
- onFailure: (e) => (n() && this.#c(L(e, this.#n.t)), !1),
1330
+ }).pipe(G.match({
1331
+ onFailure: (e) => (n() && this.#c(O(e, this.#n.t)), !1),
1313
1332
  onSuccess: () => !0
1314
1333
  }));
1315
1334
  return n() ? (a && this.#c({
@@ -1318,34 +1337,34 @@ var Sn = class {
1318
1337
  }), !0) : !1;
1319
1338
  }));
1320
1339
  this.#d = i;
1321
- let a = await Y.runPromiseExit(Tt.join(i));
1322
- if (wt.isSuccess(a)) return a.value;
1323
- if (Ct.hasInterruptsOnly(a.cause)) return !1;
1324
- throw Ct.squash(a.cause);
1340
+ let a = await G.runPromiseExit(At.join(i));
1341
+ if (kt.isSuccess(a)) return a.value;
1342
+ if (Ot.hasInterruptsOnly(a.cause)) return !1;
1343
+ throw Ot.squash(a.cause);
1325
1344
  }
1326
1345
  #v(e, t, n) {
1327
- return Y.gen({ self: this }, function* () {
1346
+ return G.gen({ self: this }, function* () {
1328
1347
  let r = t;
1329
1348
  for (; r.status == "pending";) {
1330
- if (yield* Y.sleep(bn), !n()) return;
1331
- let t = yield* Y.tryPromise({
1349
+ if (yield* G.sleep(Cn), !n()) return;
1350
+ let t = yield* G.tryPromise({
1332
1351
  try: (t) => this.#e.getPublishOperation(e.flowId, r.operationId, t),
1333
1352
  catch: (e) => e
1334
- }).pipe(Y.match({
1353
+ }).pipe(G.match({
1335
1354
  onFailure: (e) => ({ error: e }),
1336
1355
  onSuccess: (e) => ({ value: e })
1337
1356
  }));
1338
1357
  if (!n()) return;
1339
1358
  if ("error" in t) {
1340
1359
  let n = t.error;
1341
- if (n instanceof U && n.code == "publication.operation-not-found") {
1360
+ if (n instanceof I && n.code == "publication.operation-not-found") {
1342
1361
  this.#a.setItem(this.#b(e.flowId), ""), this.#x(e, {
1343
1362
  operation: void 0,
1344
1363
  publishing: !1
1345
- }), this.#c(L(n, this.#n.t));
1364
+ }), this.#c(O(n, this.#n.t));
1346
1365
  return;
1347
1366
  }
1348
- this.#c(L(n, this.#n.t));
1367
+ this.#c(O(n, this.#n.t));
1349
1368
  continue;
1350
1369
  }
1351
1370
  r = t.value, this.#x(e, { operation: r });
@@ -1360,8 +1379,8 @@ var Sn = class {
1360
1379
  return `publish-operation:${e}`;
1361
1380
  }
1362
1381
  #x(e, t) {
1363
- xn(this.#l.value.target, e) ? this.#S(t) : this.#l.set({
1364
- ..._n,
1382
+ wn(this.#l.value.target, e) ? this.#S(t) : this.#l.set({
1383
+ ...bn,
1365
1384
  ...t,
1366
1385
  target: e
1367
1386
  });
@@ -1372,22 +1391,22 @@ var Sn = class {
1372
1391
  ...e
1373
1392
  });
1374
1393
  }
1375
- }, Cn = { starting: !1 };
1376
- function wn(e) {
1394
+ }, En = { starting: !1 };
1395
+ function Dn(e) {
1377
1396
  switch (e.kind) {
1378
1397
  case "condition": return {};
1379
- case "subflow": return Je(e.definition?.inputs ?? []);
1380
- case "task": return Je(e.definition?.inputs ?? []);
1398
+ case "subflow": return $e(e.definition?.inputs ?? []);
1399
+ case "task": return $e(e.definition?.inputs ?? []);
1381
1400
  case "value": return {};
1382
1401
  case "approval":
1383
- case "wait": return Je(e.node.inputDefinitions);
1402
+ case "wait": return $e(e.node.inputDefinitions);
1384
1403
  }
1385
1404
  }
1386
- function Tn(e) {
1405
+ function On(e) {
1387
1406
  return e.node.name == null ? e.kind == "task" || e.kind == "subflow" ? e.definition?.name ?? e.id : e.id : e.node.name;
1388
1407
  }
1389
- function En(e, t) {
1390
- let n = F(e), r = n.graph({ kind: "flow" });
1408
+ function kn(e, t) {
1409
+ let n = P(e), r = n.graph({ kind: "flow" });
1391
1410
  if (r == null) return [];
1392
1411
  let i = /* @__PURE__ */ new Set([t]), a = [t];
1393
1412
  for (; a.length > 0;) {
@@ -1397,11 +1416,11 @@ function En(e, t) {
1397
1416
  return Object.entries(r.nodes).filter(([e]) => i.has(e)).toSorted(([e], [t]) => e.localeCompare(t)).flatMap(([e, t]) => {
1398
1417
  let r = n.resolveNode(e, t);
1399
1418
  if (r.kind == "trigger") return r.trigger.kind == "manual" || r.trigger.kind == "cron" ? [] : [{
1400
- definitions: ce(r.trigger),
1419
+ definitions: _e(r.trigger),
1401
1420
  nodeId: e,
1402
1421
  title: r.trigger.name
1403
1422
  }];
1404
- let i = Object.entries(wn(r)).filter(([e, t]) => r.node.inputs[e] == null && !Object.hasOwn(t, "value")).toSorted(([e], [t]) => e.localeCompare(t)).map(([e, t]) => Object.assign({
1423
+ let i = Object.entries(Dn(r)).filter(([e, t]) => r.node.inputs[e] == null && !Object.hasOwn(t, "value")).toSorted(([e], [t]) => e.localeCompare(t)).map(([e, t]) => Object.assign({
1405
1424
  handle: e,
1406
1425
  jsonSchema: t.jsonSchema,
1407
1426
  nullable: t.nullable
@@ -1409,18 +1428,18 @@ function En(e, t) {
1409
1428
  return i.length == 0 ? [] : [{
1410
1429
  definitions: i,
1411
1430
  nodeId: e,
1412
- title: Tn(r)
1431
+ title: On(r)
1413
1432
  }];
1414
1433
  });
1415
1434
  }
1416
- function Dn(e) {
1435
+ function An(e) {
1417
1436
  return JSON.stringify(e.map((e) => [e.nodeId, e.definitions.map((e) => [
1418
1437
  e.handle,
1419
1438
  e.jsonSchema,
1420
1439
  e.nullable
1421
1440
  ])]));
1422
1441
  }
1423
- async function On(e, t, n) {
1442
+ async function jn(e, t, n) {
1424
1443
  let { FlowRunInputEditorStore: r } = await import("./flowRunInputEditorStore-Bgb5vSeS.js").then((e) => e.n);
1425
1444
  return e.map((e) => {
1426
1445
  let i = new r(e.definitions, t);
@@ -1431,31 +1450,31 @@ async function On(e, t, n) {
1431
1450
  };
1432
1451
  });
1433
1452
  }
1434
- function kn(e) {
1453
+ function Mn(e) {
1435
1454
  return Object.fromEntries(e.map((e) => [e.nodeId, e.editor.values()]));
1436
1455
  }
1437
- function An(e, t) {
1438
- return F(e).graph({ kind: "flow" })?.nodes[t]?.kind === "cron" ? { scheduledAt: (/* @__PURE__ */ new Date()).toISOString() } : {};
1456
+ function Nn(e, t) {
1457
+ return P(e).graph({ kind: "flow" })?.nodes[t]?.kind === "cron" ? { scheduledAt: (/* @__PURE__ */ new Date()).toISOString() } : {};
1439
1458
  }
1440
- function jn(e, t, n) {
1459
+ function Pn(e, t, n) {
1441
1460
  return {
1442
1461
  inputs: Object.fromEntries(e.filter((e) => e.nodeId != t).map((e) => [e.nodeId, e.editor.values()])),
1443
- outputs: e.find((e) => e.nodeId == t)?.editor.values() ?? An(n, t)
1462
+ outputs: e.find((e) => e.nodeId == t)?.editor.values() ?? Nn(n, t)
1444
1463
  };
1445
1464
  }
1446
- var Mn = class {
1465
+ var Fn = class {
1447
1466
  #e;
1448
1467
  #t;
1449
1468
  #n;
1450
1469
  #r;
1451
- #i = new I();
1452
- #a = new I();
1470
+ #i = new D();
1471
+ #a = new D();
1453
1472
  #o;
1454
1473
  #s = /* @__PURE__ */ new Map();
1455
1474
  #c;
1456
- #l = n(Cn);
1475
+ #l = n(En);
1457
1476
  #u;
1458
- constructor(t, n, r, i, a = h(), o = C) {
1477
+ constructor(t, n, r, i, a = h(), o = F) {
1459
1478
  this.#e = i, this.#t = t, this.#o = n, this.#c = r, this.#r = a, this.#n = o, this.$ = {
1460
1479
  inputRequest: e(this.#l, (e) => e.inputRequest),
1461
1480
  starting: e(this.#l, (e) => e.starting),
@@ -1470,14 +1489,14 @@ var Mn = class {
1470
1489
  reset() {
1471
1490
  this.#i.invalidate(), this.#a.invalidate(), this.#u = void 0;
1472
1491
  let e = this.#l.value.inputRequest;
1473
- this.#h(e), this.#l.set(Cn), this.#p(e);
1492
+ this.#h(e), this.#l.set(En), this.#p(e);
1474
1493
  }
1475
1494
  async requestDraft(e, t, n) {
1476
1495
  let r = this.#a.begin();
1477
1496
  try {
1478
1497
  return await this.#d("draft", e, t, t.revisionId, r, void 0, n);
1479
1498
  } catch (e) {
1480
- return r() && this.#c(L(e, this.#r.t)), "unavailable";
1499
+ return r() && this.#c(O(e, this.#r.t)), "unavailable";
1481
1500
  } finally {
1482
1501
  r() && this.#g({ starting: !1 });
1483
1502
  }
@@ -1487,16 +1506,16 @@ var Mn = class {
1487
1506
  try {
1488
1507
  return await this.#d("draft", e, t, t.revisionId, r, void 0, n, !0);
1489
1508
  } catch (e) {
1490
- return r() && this.#c(L(e, this.#r.t)), "unavailable";
1509
+ return r() && this.#c(O(e, this.#r.t)), "unavailable";
1491
1510
  } finally {
1492
1511
  r() && this.#g({ starting: !1 });
1493
1512
  }
1494
1513
  }
1495
1514
  inputStatus(e, t, n) {
1496
- let r = En(t, n);
1515
+ let r = kn(t, n);
1497
1516
  if (r.length == 0) return "none";
1498
1517
  let i = this.#s.get(this.#m(e, n));
1499
- return i?.valid == 1 && i.signature == Dn(r) ? "ready" : "missing";
1518
+ return i?.valid == 1 && i.signature == An(r) ? "ready" : "missing";
1500
1519
  }
1501
1520
  async requestLive(e) {
1502
1521
  let t = this.#a.begin();
@@ -1507,7 +1526,7 @@ var Mn = class {
1507
1526
  let r = await this.#t.getRevision(e.flowId, n.revisionId);
1508
1527
  return t() ? await this.#d("live", e, r, n.revisionId, t, n.publicationId) : "unavailable";
1509
1528
  } catch (e) {
1510
- return t() && this.#c(L(e, this.#r.t)), "unavailable";
1529
+ return t() && this.#c(O(e, this.#r.t)), "unavailable";
1511
1530
  } finally {
1512
1531
  t() && this.#g({ starting: !1 });
1513
1532
  }
@@ -1524,7 +1543,7 @@ var Mn = class {
1524
1543
  attempted: !0
1525
1544
  } }), !1;
1526
1545
  this.#h(e);
1527
- let { inputs: t, outputs: n } = jn(e.groups, e.triggerId, e.revision), r = await this.#f(e.source, e.flow, e.revisionId, {
1546
+ let { inputs: t, outputs: n } = Pn(e.groups, e.triggerId, e.revision), r = await this.#f(e.source, e.flow, e.revisionId, {
1528
1547
  nodeId: e.triggerId,
1529
1548
  outputs: n
1530
1549
  }, t, e.publicationId);
@@ -1536,7 +1555,7 @@ var Mn = class {
1536
1555
  let r = this.#a.begin();
1537
1556
  this.#h(n), this.#g({ starting: !0 });
1538
1557
  try {
1539
- let i = En(n.revision, e), a = this.#s.get(this.#m(n.flow.flowId, e)), o = await On(i, this.#r.lang$, a?.values);
1558
+ let i = kn(n.revision, e), a = this.#s.get(this.#m(n.flow.flowId, e)), o = await jn(i, this.#r.lang$, a?.values);
1540
1559
  if (!r() || this.#l.value.inputRequest !== n) {
1541
1560
  for (let e of o) e.editor.dispose();
1542
1561
  return;
@@ -1550,7 +1569,7 @@ var Mn = class {
1550
1569
  valid: s
1551
1570
  } }), this.#p(n);
1552
1571
  } catch (e) {
1553
- r() && this.#c(L(e, this.#r.t));
1572
+ r() && this.#c(O(e, this.#r.t));
1554
1573
  } finally {
1555
1574
  r() && this.#g({ starting: !1 });
1556
1575
  }
@@ -1562,7 +1581,7 @@ var Mn = class {
1562
1581
  starting: !c,
1563
1582
  submitting: void 0
1564
1583
  }), this.#p(l);
1565
- let u = F(r).graph({ kind: "flow" }), d = Object.entries(u?.nodes ?? {}).flatMap(([e, t]) => "inputs" in t ? [] : [{
1584
+ let u = P(r).graph({ kind: "flow" }), d = Object.entries(u?.nodes ?? {}).flatMap(([e, t]) => "inputs" in t ? [] : [{
1566
1585
  nodeId: e,
1567
1586
  title: t.name
1568
1587
  }]);
@@ -1575,17 +1594,17 @@ var Mn = class {
1575
1594
  kind: "error",
1576
1595
  message: this.#r.t("runInput.selectTrigger")
1577
1596
  }), "unavailable";
1578
- let p = f == null ? [] : En(r, f.nodeId), m = Dn(p), h = f == null ? void 0 : this.#s.get(this.#m(n.flowId, f.nodeId)), g = f == null ? [] : await On(p, this.#r.lang$, h?.values);
1597
+ let p = f == null ? [] : kn(r, f.nodeId), m = An(p), h = f == null ? void 0 : this.#s.get(this.#m(n.flowId, f.nodeId)), g = f == null ? [] : await jn(p, this.#r.lang$, h?.values);
1579
1598
  if (!a()) {
1580
1599
  for (let e of g) e.editor.dispose();
1581
1600
  return "unavailable";
1582
1601
  }
1583
1602
  if (!c && f != null && g.length == 0) return await this.#f(e, n, i, {
1584
1603
  nodeId: f.nodeId,
1585
- outputs: An(r, f.nodeId)
1604
+ outputs: Nn(r, f.nodeId)
1586
1605
  }, {}, o) ? "started" : "unavailable";
1587
1606
  if (!c && f != null && h?.valid == 1 && h.signature == m && g.every((e) => e.editor.valid$.value)) {
1588
- let t = jn(g, f.nodeId, r);
1607
+ let t = Pn(g, f.nodeId, r);
1589
1608
  for (let e of g) e.editor.dispose();
1590
1609
  return await this.#f(e, n, i, {
1591
1610
  nodeId: f.nodeId,
@@ -1647,7 +1666,7 @@ var Mn = class {
1647
1666
  });
1648
1667
  return !o() || !s() ? !1 : (this.#u = void 0, this.#o.follow(d, s));
1649
1668
  } catch (e) {
1650
- return o() && s() && this.#c(L(e, this.#r.t)), !1;
1669
+ return o() && s() && this.#c(O(e, this.#r.t)), !1;
1651
1670
  } finally {
1652
1671
  o() && this.#g({
1653
1672
  starting: !1,
@@ -1666,9 +1685,9 @@ var Mn = class {
1666
1685
  }
1667
1686
  #h(e) {
1668
1687
  e?.triggerId != null && e.groups.length != 0 && this.#s.set(this.#m(e.flow.flowId, e.triggerId), {
1669
- signature: Dn(En(e.revision, e.triggerId)),
1688
+ signature: An(kn(e.revision, e.triggerId)),
1670
1689
  valid: e.valid.value,
1671
- values: kn(e.groups)
1690
+ values: Mn(e.groups)
1672
1691
  });
1673
1692
  }
1674
1693
  #g(e) {
@@ -1680,22 +1699,22 @@ var Mn = class {
1680
1699
  };
1681
1700
  //#endregion
1682
1701
  //#region src/workbench/browser/runtime/workspace.ts
1683
- function Nn(e, t) {
1702
+ function In(e, t) {
1684
1703
  if (e.node.icon != null) return e.node.icon;
1685
- if (e.kind != "task" || e.definition == null || !("executor" in e.definition) || e.definition.executor.kind != "connector") return In(e);
1704
+ if (e.kind != "task" || e.definition == null || !("executor" in e.definition) || e.definition.executor.kind != "connector") return zn(e);
1686
1705
  let n = t[e.definition.executor.action];
1687
- return n == null ? In(e) : A(n);
1706
+ return n == null ? zn(e) : j(n);
1688
1707
  }
1689
- function Pn(e, t) {
1708
+ function Ln(e, t) {
1690
1709
  return e.kind == "trigger" ? {
1691
- icon: Gn(e.trigger, t.providers),
1710
+ icon: Jn(e.trigger, t.providers),
1692
1711
  title: e.trigger.name
1693
1712
  } : {
1694
- icon: Nn(e, t.connectorActions),
1695
- title: Fn(e, t.t)
1713
+ icon: In(e, t.connectorActions),
1714
+ title: Rn(e, t.t)
1696
1715
  };
1697
1716
  }
1698
- function Fn(e, t) {
1717
+ function Rn(e, t) {
1699
1718
  if (e.node.name != null) return e.node.name;
1700
1719
  switch (e.kind) {
1701
1720
  case "condition": return t?.("addNode.condition") ?? "Condition";
@@ -1706,7 +1725,7 @@ function Fn(e, t) {
1706
1725
  case "task": return e.definition?.name ?? (e.node.task == null ? e.node.taskId : e.node.task.moduleId);
1707
1726
  }
1708
1727
  }
1709
- function In(e) {
1728
+ function zn(e) {
1710
1729
  switch (e.kind) {
1711
1730
  case "condition": return ":carbon:child-node:";
1712
1731
  case "subflow": return ":carbon:subflow:";
@@ -1719,7 +1738,7 @@ function In(e) {
1719
1738
  }
1720
1739
  }
1721
1740
  }
1722
- function Ln(e, t, n, r) {
1741
+ function Bn(e, t, n, r) {
1723
1742
  return JSON.stringify([
1724
1743
  e,
1725
1744
  t,
@@ -1727,10 +1746,10 @@ function Ln(e, t, n, r) {
1727
1746
  r
1728
1747
  ]);
1729
1748
  }
1730
- function Rn(e) {
1749
+ function Vn(e) {
1731
1750
  if (e.kind == "trigger") return {
1732
1751
  inputs: /* @__PURE__ */ new Map(),
1733
- outputs: new Map(Object.entries(E(e.trigger)))
1752
+ outputs: new Map(Object.entries(he(e.trigger)))
1734
1753
  };
1735
1754
  let t = new Map(Object.keys(e.node.inputs).map((e) => [e, {}])), n = /* @__PURE__ */ new Map();
1736
1755
  switch (e.kind) {
@@ -1753,7 +1772,7 @@ function Rn(e) {
1753
1772
  jsonSchema: n.jsonSchema,
1754
1773
  nullable: n.nullable
1755
1774
  });
1756
- for (let [t, r] of Object.entries(P(e.node))) n.set(t, r);
1775
+ for (let [t, r] of Object.entries(He(e.node))) n.set(t, r);
1757
1776
  break;
1758
1777
  case "subflow": {
1759
1778
  let r = e.definition;
@@ -1799,7 +1818,7 @@ function Rn(e) {
1799
1818
  outputs: n
1800
1819
  };
1801
1820
  }
1802
- function zn(e) {
1821
+ function Hn(e) {
1803
1822
  switch (e) {
1804
1823
  case "endsWith": return "ends with";
1805
1824
  case "hasKey": return "has key";
@@ -1823,7 +1842,7 @@ function zn(e) {
1823
1842
  case "contains": return e;
1824
1843
  }
1825
1844
  }
1826
- function Bn(e, t) {
1845
+ function Un(e, t) {
1827
1846
  if (e.kind == "value") return JSON.stringify(e.value) ?? "…";
1828
1847
  let n = e.source;
1829
1848
  if (n.kind == "flow") return n.input;
@@ -1831,14 +1850,14 @@ function Bn(e, t) {
1831
1850
  kind: "environment",
1832
1851
  label: t.t?.("nodeInput.variable") ?? "Env"
1833
1852
  };
1834
- let r = t.nodes.get(n.nodeId), i = r == null ? void 0 : Pn(r, t);
1853
+ let r = t.nodes.get(n.nodeId), i = r == null ? void 0 : Ln(r, t);
1835
1854
  return {
1836
1855
  icon: i?.icon,
1837
1856
  kind: "node",
1838
- label: `${i?.title ?? n.nodeId} · ${Ve(n)}`
1857
+ label: `${i?.title ?? n.nodeId} · ${re(n)}`
1839
1858
  };
1840
1859
  }
1841
- function Vn(e, t, n) {
1860
+ function Wn(e, t, n) {
1842
1861
  let r = e.kind == "flow" ? `/document/graph/nodes/${t.id}` : `/document/subflows/${e.id}/graph/nodes/${t.id}`, i = [r];
1843
1862
  if (t.kind == "task") {
1844
1863
  t.node.task == null ? i.push(`/document/tasks/${t.node.taskId}`) : i.push(`${r}/task`);
@@ -1847,7 +1866,7 @@ function Vn(e, t, n) {
1847
1866
  } else t.kind == "subflow" && i.push(`/document/subflows/${t.node.subflowId}`);
1848
1867
  return n.filter((e) => i.some((t) => e.path.startsWith(t))).length;
1849
1868
  }
1850
- function Hn(e, t, n, r) {
1869
+ function Gn(e, t, n, r) {
1851
1870
  if (t.kind != "flow" || n?.flowId != e.revision.flowId || n.revisionId != e.revision.revisionId) return { nodes: /* @__PURE__ */ new Map() };
1852
1871
  let i = n.status == "queued" || n.status == "starting" || n.status == "running" || n.status == "waiting", a = /* @__PURE__ */ new Map();
1853
1872
  if ("waits" in n) for (let e of n.waits) a.set(e.nodeId, {
@@ -1946,10 +1965,10 @@ function Hn(e, t, n, r) {
1946
1965
  status: i ? "running" : "idle"
1947
1966
  };
1948
1967
  }
1949
- function Un(e, t, n) {
1968
+ function Kn(e, t, n) {
1950
1969
  if (e != null) return "moduleId" in e ? n?.("designer.executorJavaScript") ?? "javascript" : e.executor.kind == "agent" ? "Agent" : e.executor.kind == "llm" ? n?.("designer.executorLlm") ?? "llm" : `${n?.("designer.executorConnector") ?? "connector"} · ${t ?? e.executor.action.split(".")[0]}`;
1951
1970
  }
1952
- function Wn(e) {
1971
+ function qn(e) {
1953
1972
  switch (e.kind) {
1954
1973
  case "manual": return ":carbon:play:";
1955
1974
  case "cron": return ":carbon:time:";
@@ -1958,17 +1977,17 @@ function Wn(e) {
1958
1977
  case "webhook": return ":carbon:webhook:";
1959
1978
  }
1960
1979
  }
1961
- function Gn(e, t) {
1962
- return e.icon == null ? e.kind != "integration" && e.kind != "poll" ? Wn(e) : A(t[e.definition.provider] ?? {
1980
+ function Jn(e, t) {
1981
+ return e.icon == null ? e.kind != "integration" && e.kind != "poll" ? qn(e) : j(t[e.definition.provider] ?? {
1963
1982
  serviceId: e.definition.provider,
1964
1983
  serviceName: e.definition.provider
1965
1984
  }) : e.icon;
1966
1985
  }
1967
- function Kn(e, t) {
1986
+ function Yn(e, t) {
1968
1987
  let n = `/document/graph/nodes/${e}`;
1969
1988
  return t.filter((e) => e.code != "trigger.config-incomplete" && (e.path == n || e.path.startsWith(`${n}/`)));
1970
1989
  }
1971
- function qn(e, t) {
1990
+ function Xn(e, t) {
1972
1991
  let n = [], r = new Map([...t].map((e) => [e, /* @__PURE__ */ new Set()])), i = new Map([...t].map((e) => [e, /* @__PURE__ */ new Set()])), a = Array.isArray(e.edges) ? e.edges : [];
1973
1992
  for (let e of a) {
1974
1993
  if (typeof e != "object" || !e || Array.isArray(e)) continue;
@@ -1976,7 +1995,7 @@ function qn(e, t) {
1976
1995
  if (typeof a.source != "string" || typeof a.target != "string" || a.sourceHandle != null && typeof a.sourceHandle != "string" || !t.has(a.source) || !t.has(a.target)) continue;
1977
1996
  let o = a.sourceHandle == null ? "$out" : `$branch:${a.sourceHandle}`;
1978
1997
  n.push({
1979
- id: Ln(a.source, o, a.target, "$in"),
1998
+ id: Bn(a.source, o, a.target, "$in"),
1980
1999
  source: a.source,
1981
2000
  sourceHandle: o,
1982
2001
  target: a.target,
@@ -1989,7 +2008,7 @@ function qn(e, t) {
1989
2008
  edges: n
1990
2009
  };
1991
2010
  }
1992
- function Jn(e, t, n) {
2011
+ function Zn(e, t, n) {
1993
2012
  let r = new Map([...t].map(([e, t]) => [e, t.size])), i = /* @__PURE__ */ new Map(), a = [], o = /* @__PURE__ */ new Set(), s = [...r].filter(([, e]) => e == 0).map(([e]) => e).toSorted();
1994
2013
  for (let e = 0; e < s.length; e += 1) {
1995
2014
  let t = s[e];
@@ -2008,14 +2027,14 @@ function Jn(e, t, n) {
2008
2027
  ordered: a
2009
2028
  };
2010
2029
  }
2011
- function Yn(e, t, n) {
2030
+ function Qn(e, t, n) {
2012
2031
  if (!("inputs" in t)) return [];
2013
2032
  let r = [];
2014
2033
  for (let [i, a] of n.inputs) {
2015
2034
  let n = t.inputs[i], o = [], s = /* @__PURE__ */ new Set();
2016
2035
  if (n?.kind == "sources") for (let t of n.sources) {
2017
2036
  if (t.kind != "node") continue;
2018
- let n = t.nodeId, r = t.output, a = Ln(n, r, e, i);
2037
+ let n = t.nodeId, r = t.output, a = Bn(n, r, e, i);
2019
2038
  s.has(a) || (s.add(a), o.push({
2020
2039
  nodeId: n,
2021
2040
  output: r
@@ -2030,10 +2049,10 @@ function Yn(e, t, n) {
2030
2049
  }
2031
2050
  return r;
2032
2051
  }
2033
- function Xn(e) {
2052
+ function $n(e) {
2034
2053
  return [...e.outputs].map(([e, t]) => Object.assign({ handle: e }, t));
2035
2054
  }
2036
- function Zn(e, t) {
2055
+ function er(e, t) {
2037
2056
  if (e.kind != "task" || e.definition == null) return t;
2038
2057
  let n = new Map(t.map((e) => [e.handle, e])), r = [];
2039
2058
  for (let t of e.definition.inputs) {
@@ -2046,7 +2065,7 @@ function Zn(e, t) {
2046
2065
  }
2047
2066
  return r.push(...n.values()), r;
2048
2067
  }
2049
- function Qn(e, t) {
2068
+ function tr(e, t) {
2050
2069
  if (e.kind != "task" || e.definition == null) return t;
2051
2070
  let n = new Map(t.map((e) => [e.handle, e])), r = [];
2052
2071
  for (let t of e.definition.outputs) {
@@ -2059,8 +2078,8 @@ function Qn(e, t) {
2059
2078
  }
2060
2079
  return r.push(...n.values()), r;
2061
2080
  }
2062
- function $n(e, t, n, r, i) {
2063
- let a = Kn(e, r), o = a.some((e) => e.code == "trigger.connection-missing" || e.code == "trigger.connection-invalid"), s = t.kind == "integration" || t.kind == "poll" ? i[t.definition.provider] : void 0, c;
2081
+ function nr(e, t, n, r, i) {
2082
+ let a = Yn(e, r), o = a.some((e) => e.code == "trigger.connection-missing" || e.code == "trigger.connection-invalid"), s = t.kind == "integration" || t.kind == "poll" ? i[t.definition.provider] : void 0, c;
2064
2083
  switch (t.kind) {
2065
2084
  case "manual":
2066
2085
  c = {
@@ -2097,27 +2116,27 @@ function $n(e, t, n, r, i) {
2097
2116
  description: t.description,
2098
2117
  diagnostics: a.length,
2099
2118
  connectionRequired: o,
2100
- icon: Gn(t, i),
2119
+ icon: Jn(t, i),
2101
2120
  id: e,
2102
2121
  inputs: [],
2103
2122
  kind: "trigger",
2104
- outputs: Object.entries(E(t)).map(([e, t]) => Object.assign({ handle: e }, t)),
2123
+ outputs: Object.entries(he(t)).map(([e, t]) => Object.assign({ handle: e }, t)),
2105
2124
  presentation: c,
2106
2125
  position: n,
2107
2126
  title: t.name
2108
2127
  };
2109
2128
  }
2110
- function er(e, t, n, r, i) {
2111
- let a = t.node, o = Zn(t, Yn(e, a, n)), s = Qn(t, Xn(n)), c = t.kind == "task" ? t.definition : void 0, l = c != null && "executor" in c && c.executor.kind == "connector" ? c.executor : void 0, u = l == null ? void 0 : i.connectorActions[l.action], d = u == null ? void 0 : i.connectionCatalogs[u.serviceId], f = l?.connectionId, p = f == null ? void 0 : d?.byId.get(f), m = u?.authenticated == 1 && (l?.connectionId == null || d != null && p?.status != "active"), h = i.runNodes.get(e), g = {
2129
+ function rr(e, t, n, r, i) {
2130
+ let a = t.node, o = er(t, Qn(e, a, n)), s = tr(t, $n(n)), c = t.kind == "task" ? t.definition : void 0, l = c != null && "executor" in c && c.executor.kind == "connector" ? c.executor : void 0, u = l == null ? void 0 : i.connectorActions[l.action], d = u == null ? void 0 : i.connectionCatalogs[u.serviceId], f = l?.connectionId, p = f == null ? void 0 : d?.byId.get(f), m = u?.authenticated == 1 && (l?.connectionId == null || d != null && p?.status != "active"), h = i.runNodes.get(e), g = {
2112
2131
  description: a.description,
2113
- diagnostics: Vn(i.target, t, i.diagnostics),
2114
- icon: Nn(t, i.connectorActions),
2132
+ diagnostics: Wn(i.target, t, i.diagnostics),
2133
+ icon: In(t, i.connectorActions),
2115
2134
  id: e,
2116
2135
  inputs: o,
2117
2136
  outputs: s,
2118
2137
  position: r,
2119
2138
  ...h == null ? {} : { run: h },
2120
- title: Fn(t, i.t)
2139
+ title: Rn(t, i.t)
2121
2140
  };
2122
2141
  switch (a.kind) {
2123
2142
  case "condition": return {
@@ -2126,9 +2145,9 @@ function er(e, t, n, r, i) {
2126
2145
  cases: a.cases.map((e) => ({
2127
2146
  ...e.description == null ? {} : { description: e.description },
2128
2147
  groups: e.groups.map((e) => ({ expressions: e.expressions.map((e) => ({
2129
- left: Bn(e.left, i),
2130
- operator: zn(e.operator),
2131
- right: e.right == null ? void 0 : Bn(e.right, i)
2148
+ left: Un(e.left, i),
2149
+ operator: Hn(e.operator),
2150
+ right: e.right == null ? void 0 : Un(e.right, i)
2132
2151
  })) })),
2133
2152
  output: e.output
2134
2153
  })),
@@ -2147,13 +2166,13 @@ function er(e, t, n, r, i) {
2147
2166
  return t == null || "group" in t ? [] : [t];
2148
2167
  }),
2149
2168
  kind: a.kind,
2150
- executorName: Un(c, u?.serviceName, i.t),
2169
+ executorName: Kn(c, u?.serviceName, i.t),
2151
2170
  connectionRequired: m,
2152
2171
  ...c != null && "executor" in c && c.executor.kind == "agent" ? { tools: c.executor.tools.map((e) => {
2153
2172
  let t = i.connectorActions[e.action], n = t?.serviceId ?? e.action.split(".")[0], r = t?.serviceName ?? n;
2154
2173
  return {
2155
2174
  id: e.id,
2156
- icon: A(t ?? {
2175
+ icon: j(t ?? {
2157
2176
  serviceId: n,
2158
2177
  serviceName: r
2159
2178
  }),
@@ -2174,8 +2193,8 @@ function er(e, t, n, r, i) {
2174
2193
  };
2175
2194
  }
2176
2195
  }
2177
- function tr(e, t, n = {}, r = [], i = {}, a = {}, o, s, c = [], l = {}) {
2178
- let u = e == null ? void 0 : F(e), d = u == null || t == null ? void 0 : u.graph(t);
2196
+ function ir(e, t, n = {}, r = [], i = {}, a = {}, o, s, c = [], l = {}) {
2197
+ let u = e == null ? void 0 : P(e), d = u == null || t == null ? void 0 : u.graph(t);
2179
2198
  if (u == null || t == null || d == null) return {
2180
2199
  edges: [],
2181
2200
  nodes: [],
@@ -2185,7 +2204,7 @@ function tr(e, t, n = {}, r = [], i = {}, a = {}, o, s, c = [], l = {}) {
2185
2204
  zoom: 1
2186
2205
  }
2187
2206
  };
2188
- let f = Hn(u, t, s, c), p = Object.entries(d.nodes), m = new Map(p.map(([e, t]) => [e, u.resolveNode(e, t)])), h = new Set(p.map(([e]) => e)), g = new Map([...m].map(([e, t]) => [e, Rn(t)])), _ = qn(d, h), v = Jn(h, _.dependencies, _.dependents), y = en(n, t), b = gn(n, t), x = {
2207
+ let f = Gn(u, t, s, c), p = Object.entries(d.nodes), m = new Map(p.map(([e, t]) => [e, u.resolveNode(e, t)])), h = new Set(p.map(([e]) => e)), g = new Map([...m].map(([e, t]) => [e, Vn(t)])), _ = Xn(d, h), v = Zn(h, _.dependencies, _.dependents), y = an(n, t), b = vn(n, t), x = {
2189
2208
  connectionCatalogs: a,
2190
2209
  connectorActions: i,
2191
2210
  diagnostics: r,
@@ -2205,128 +2224,128 @@ function tr(e, t, n = {}, r = [], i = {}, a = {}, o, s, c = [], l = {}) {
2205
2224
  }, a = m.get(e);
2206
2225
  if (a.kind == "trigger") {
2207
2226
  C.push({
2208
- ...$n(e, a.trigger, i, r, l),
2227
+ ...nr(e, a.trigger, i, r, l),
2209
2228
  contentHidden: b?.[e] === !0
2210
2229
  });
2211
2230
  continue;
2212
2231
  }
2213
- let o = er(e, a, g.get(e), i, x);
2232
+ let o = rr(e, a, g.get(e), i, x);
2214
2233
  C.push({
2215
2234
  ...o,
2216
2235
  contentHidden: b?.[e] === !0
2217
2236
  });
2218
2237
  }
2219
- for (let [e, r] of Object.entries(rn(n, t, y)).toSorted(([e], [t]) => e.localeCompare(t))) C.push({
2238
+ for (let [e, r] of Object.entries(cn(n, t, y)).toSorted(([e], [t]) => e.localeCompare(t))) C.push({
2220
2239
  ...r,
2221
2240
  id: e,
2222
2241
  kind: "comment",
2223
2242
  contentHidden: b?.[e] === !0
2224
2243
  });
2225
- let w = new Map(Q(n, t).map((e, t) => [e, t]));
2244
+ let w = new Map(Y(n, t).map((e, t) => [e, t]));
2226
2245
  return C.sort((e, t) => (w.get(e.id) ?? -1) - (w.get(t.id) ?? -1)), {
2227
2246
  edges: _.edges,
2228
2247
  nodes: C,
2229
2248
  ...f.status == null ? {} : { runStatus: f.status },
2230
- viewport: nn(n, t)
2249
+ viewport: sn(n, t)
2231
2250
  };
2232
2251
  }
2233
2252
  //#endregion
2234
2253
  //#region src/connector/common/actionSchema.ts
2235
- function nr(e, t) {
2236
- let n = rr(e);
2254
+ function ar(e, t) {
2255
+ let n = or(e);
2237
2256
  return {
2238
2257
  inputs: n,
2239
2258
  initialInputs: n.flatMap((e) => e.value === void 0 ? [] : [{
2240
2259
  handle: e.handle,
2241
2260
  value: e.value
2242
2261
  }]),
2243
- outputs: ir(t)
2262
+ outputs: sr(t)
2244
2263
  };
2245
2264
  }
2246
- function rr(e) {
2247
- let t = G(e);
2265
+ function or(e) {
2266
+ let t = V(e);
2248
2267
  if (t == null || t.type != "object" && t.properties == null) throw Error("Connector action inputSchema must be an object schema.");
2249
- let n = G(t.properties);
2268
+ let n = V(t.properties);
2250
2269
  if (n == null) return [];
2251
- let r = cr(t.required);
2270
+ let r = dr(t.required);
2252
2271
  return Object.entries(n).map(([e, n]) => {
2253
- let i = !r.has(e) || lr(n, t);
2272
+ let i = !r.has(e) || fr(n, t);
2254
2273
  return {
2255
- description: or(t, n),
2274
+ description: lr(t, n),
2256
2275
  handle: e,
2257
- json_schema: ar(t, n),
2276
+ json_schema: cr(t, n),
2258
2277
  nullable: i,
2259
- value: sr(t, n, i)
2278
+ value: ur(t, n, i)
2260
2279
  };
2261
2280
  });
2262
2281
  }
2263
- function ir(e) {
2264
- let t = G(e), n = G(t?.properties);
2282
+ function sr(e) {
2283
+ let t = V(e), n = V(t?.properties);
2265
2284
  if (t != null && (t.type == "object" || n != null)) {
2266
2285
  if (n == null) return [];
2267
- let e = cr(t.required);
2286
+ let e = dr(t.required);
2268
2287
  return Object.entries(n).map(([n, r]) => ({
2269
- description: or(t, r),
2288
+ description: lr(t, r),
2270
2289
  handle: n,
2271
- json_schema: ar(t, r),
2272
- nullable: !e.has(n) || lr(r, t)
2290
+ json_schema: cr(t, r),
2291
+ nullable: !e.has(n) || fr(r, t)
2273
2292
  }));
2274
2293
  }
2275
2294
  return [{
2276
- description: or(t, e),
2295
+ description: lr(t, e),
2277
2296
  handle: "output",
2278
2297
  json_schema: e,
2279
- nullable: lr(e)
2298
+ nullable: fr(e)
2280
2299
  }];
2281
2300
  }
2282
- function ar(e, t) {
2283
- let n = G(t);
2301
+ function cr(e, t) {
2302
+ let n = V(t);
2284
2303
  if (n == null) return t;
2285
2304
  let r = Object.assign({}, n);
2286
2305
  return r.$defs == null && e.$defs != null && (r.$defs = e.$defs), r.definitions == null && e.definitions != null && (r.definitions = e.definitions), r;
2287
2306
  }
2288
- function or(e, t) {
2289
- for (let n of ur(e, t)) if (typeof n.description == "string") return n.description;
2307
+ function lr(e, t) {
2308
+ for (let n of pr(e, t)) if (typeof n.description == "string") return n.description;
2290
2309
  }
2291
- function sr(e, t, n) {
2292
- for (let n of ur(e, t)) if (Object.hasOwn(n, "default")) return n.default;
2310
+ function ur(e, t, n) {
2311
+ for (let n of pr(e, t)) if (Object.hasOwn(n, "default")) return n.default;
2293
2312
  return n ? null : void 0;
2294
2313
  }
2295
- function cr(e) {
2314
+ function dr(e) {
2296
2315
  return Array.isArray(e) ? new Set(e.filter((e) => typeof e == "string")) : /* @__PURE__ */ new Set();
2297
2316
  }
2298
- function lr(e, t = e, n = /* @__PURE__ */ new Set()) {
2299
- let r = G(e);
2317
+ function fr(e, t = e, n = /* @__PURE__ */ new Set()) {
2318
+ let r = V(e);
2300
2319
  if (r == null) return !1;
2301
2320
  if (Object.hasOwn(r, "type")) return r.type == "null" || Array.isArray(r.type) && r.type.includes("null");
2302
2321
  if (Object.hasOwn(r, "enum")) return Array.isArray(r.enum) && r.enum.includes(null);
2303
- for (let e of ["anyOf", "oneOf"]) if (Object.hasOwn(r, e)) return Array.isArray(r[e]) && r[e].some((e) => lr(e, t, n));
2322
+ for (let e of ["anyOf", "oneOf"]) if (Object.hasOwn(r, e)) return Array.isArray(r[e]) && r[e].some((e) => fr(e, t, n));
2304
2323
  let i = typeof r.$ref == "string" ? r.$ref : void 0;
2305
2324
  if (i == null || n.has(i)) return !1;
2306
- let a = dr(t, i);
2325
+ let a = mr(t, i);
2307
2326
  if (a === void 0) return !1;
2308
2327
  let o = new Set(n);
2309
- return o.add(i), lr(a, t, o);
2328
+ return o.add(i), fr(a, t, o);
2310
2329
  }
2311
- function ur(e, t) {
2330
+ function pr(e, t) {
2312
2331
  let n = [], r = /* @__PURE__ */ new Set(), i = t;
2313
2332
  for (;;) {
2314
- let t = G(i);
2333
+ let t = V(i);
2315
2334
  if (t == null) return n;
2316
2335
  n.push(t);
2317
2336
  let a = typeof t.$ref == "string" ? t.$ref : void 0;
2318
2337
  if (a == null || r.has(a)) return n;
2319
- let o = dr(e, a);
2338
+ let o = mr(e, a);
2320
2339
  if (o === void 0) return n;
2321
2340
  r.add(a), i = o;
2322
2341
  }
2323
2342
  }
2324
- function dr(e, t) {
2343
+ function mr(e, t) {
2325
2344
  if (t == "#") return e;
2326
2345
  if (!t.startsWith("#/")) return;
2327
2346
  let n = e;
2328
2347
  for (let e of t.slice(2).split("/")) {
2329
- let t = G(n), r = e.replaceAll("~1", "/").replaceAll("~0", "~");
2348
+ let t = V(n), r = e.replaceAll("~1", "/").replaceAll("~0", "~");
2330
2349
  if (t == null || !Object.hasOwn(t, r)) return;
2331
2350
  n = t[r];
2332
2351
  }
@@ -2334,15 +2353,15 @@ function dr(e, t) {
2334
2353
  }
2335
2354
  //#endregion
2336
2355
  //#region src/workbench/browser/runtime/stores/proxyCatalog.ts
2337
- function fr(e, t) {
2338
- let n = me(e);
2339
- if (n.success === !1) throw new U(502, typeof n.errorCode == "string" ? n.errorCode : "connector.unavailable", typeof n.message == "string" ? n.message : "Connector request failed.");
2340
- if (n.success !== !0 || !Array.isArray(n.data)) return H();
2341
- for (let e of n.data) t(me(e));
2356
+ function hr(e, t) {
2357
+ let n = Be(e);
2358
+ if (n.success === !1) throw new I(502, typeof n.errorCode == "string" ? n.errorCode : "connector.unavailable", typeof n.message == "string" ? n.message : "Connector request failed.");
2359
+ if (n.success !== !0 || !Array.isArray(n.data)) return L();
2360
+ if (t != null) for (let e of n.data) t(Be(e));
2342
2361
  return n;
2343
2362
  }
2344
- function pr(e) {
2345
- return !Array.isArray(e.authTypes) || e.authTypes.some((e) => typeof e != "string") ? H() : {
2363
+ function gr(e) {
2364
+ return !Array.isArray(e.authTypes) || e.authTypes.some((e) => typeof e != "string") ? L() : {
2346
2365
  serviceId: B(e.service),
2347
2366
  serviceName: B(e.displayName),
2348
2367
  noSetup: e.authTypes.length == 1 && e.authTypes[0] == "no_auth",
@@ -2350,38 +2369,22 @@ function pr(e) {
2350
2369
  ...e.homepageUrl == null || e.homepageUrl === "" ? {} : { homepageUrl: B(e.homepageUrl) }
2351
2370
  };
2352
2371
  }
2353
- function mr(e) {
2354
- return typeof e.isDefault != "boolean" || typeof e.status != "string" || ![
2355
- "active",
2356
- "disconnected",
2357
- "error",
2358
- "reauth_required"
2359
- ].includes(e.status) ? H() : {
2360
- connectionId: B(e.id),
2361
- serviceId: B(e.service),
2362
- displayName: B(e.displayName),
2363
- isDefault: e.isDefault,
2364
- status: e.status,
2365
- ...e.alias == null ? {} : { alias: B(e.alias) },
2366
- ...e.marketplace == null ? {} : { builtInAccount: !0 }
2367
- };
2372
+ function _r(e) {
2373
+ if (B(e.id), B(e.service), B(e.name), typeof e.description != "string") return L();
2374
+ ar(e.inputSchema, e.outputSchema);
2368
2375
  }
2369
- function hr(e) {
2370
- if (B(e.id), B(e.service), B(e.name), typeof e.description != "string") return H();
2371
- nr(e.inputSchema, e.outputSchema);
2372
- }
2373
- function gr(e) {
2376
+ function vr(e) {
2374
2377
  return {
2375
2378
  nullable: e.nullable,
2376
- jsonSchema: De(e.json_schema),
2379
+ jsonSchema: Se(e.json_schema),
2377
2380
  ...e.description == null ? {} : { description: e.description },
2378
- ...e.value === void 0 ? {} : { value: De(e.value) }
2381
+ ...e.value === void 0 ? {} : { value: Se(e.value) }
2379
2382
  };
2380
2383
  }
2381
- function _r(e, t) {
2384
+ function yr(e, t) {
2382
2385
  let n = t.data.find((t) => t.service == e.service);
2383
- if (n == null) return H();
2384
- let r = pr(n), i = nr(e.inputSchema, e.outputSchema);
2386
+ if (n == null) return L();
2387
+ let r = gr(n), i = ar(e.inputSchema, e.outputSchema);
2385
2388
  return {
2386
2389
  serviceId: r.serviceId,
2387
2390
  serviceName: r.serviceName,
@@ -2392,19 +2395,19 @@ function _r(e, t) {
2392
2395
  name: B(e.name),
2393
2396
  description: e.description,
2394
2397
  authenticated: !n.authTypes.includes("no_auth"),
2395
- inputSchema: De(e.inputSchema),
2396
- outputSchema: De(e.outputSchema),
2397
- inputs: Object.fromEntries(i.inputs.map((e) => [e.handle, gr(e)])),
2398
- outputs: Object.fromEntries(i.outputs.map((e) => [e.handle, gr(e)]))
2398
+ inputSchema: Se(e.inputSchema),
2399
+ outputSchema: Se(e.outputSchema),
2400
+ inputs: Object.fromEntries(i.inputs.map((e) => [e.handle, vr(e)])),
2401
+ outputs: Object.fromEntries(i.outputs.map((e) => [e.handle, vr(e)]))
2399
2402
  };
2400
2403
  }
2401
2404
  //#endregion
2402
2405
  //#region src/workbench/browser/runtime/stores/catalogStores.ts
2403
- function vr(e) {
2404
- let t = me(e);
2405
- return t.version != 1 || !Array.isArray(t.actions) ? H() : t.actions.map(Se);
2406
+ function br(e) {
2407
+ let t = Be(e);
2408
+ return t.version != 1 || !Array.isArray(t.actions) ? L() : t.actions.map(Le);
2406
2409
  }
2407
- var yr = (...e) => JSON.stringify(e), br = class {
2410
+ var xr = (...e) => JSON.stringify(e), Sr = class {
2408
2411
  constructor(e, t, n) {
2409
2412
  this.client = e, this.kind = t, this.options = n, this.entries = /* @__PURE__ */ new Map();
2410
2413
  }
@@ -2415,15 +2418,13 @@ var yr = (...e) => JSON.stringify(e), br = class {
2415
2418
  ...t == null ? {} : { locale: t }
2416
2419
  }), a = `/v1/connector/proxy/${this.kind}${i.size ? `?${i}` : ""}`, o = this.entries.get(a);
2417
2420
  if (o == null) {
2418
- let e = (e) => fr(e, this.kind == "providers" ? pr : this.kind == "apps" ? mr : (e) => {
2419
- if (hr(e), e.service != n) return H();
2420
- });
2421
- o = new ke((t, n) => this.client.readProxyCatalog({
2421
+ let e = (e) => hr(e, this.kind == "providers" ? gr : void 0);
2422
+ o = new Me((t, n) => this.client.readProxyCatalog({
2422
2423
  path: a,
2423
2424
  decode: e
2424
2425
  }, t, n), this.kind == "providers" ? 3e5 : 3e4, this.options == null ? void 0 : {
2425
2426
  key: `open-flow:proxy:${this.kind}:v1:${encodeURIComponent(this.options.namespace)}:${a}`,
2426
- storage: () => this.kind == "apps" ? this.options.sessionStorage ?? window.sessionStorage : this.options.localStorage ?? window.localStorage,
2427
+ storage: () => this.options.localStorage ?? window.localStorage,
2427
2428
  decode: e
2428
2429
  }), this.entries.set(a, o);
2429
2430
  }
@@ -2439,7 +2440,7 @@ var yr = (...e) => JSON.stringify(e), br = class {
2439
2440
  for (let e of this.entries.values()) e.dispose();
2440
2441
  this.entries.clear();
2441
2442
  }
2442
- }, xr = class {
2443
+ }, Cr = class {
2443
2444
  constructor() {
2444
2445
  this.entries = /* @__PURE__ */ new Map();
2445
2446
  }
@@ -2477,13 +2478,13 @@ var yr = (...e) => JSON.stringify(e), br = class {
2477
2478
  for (let e of this.entries.values()) e.dispose();
2478
2479
  this.entries.clear();
2479
2480
  }
2480
- }, Sr = class {
2481
- #e = new xr();
2481
+ }, wr = class {
2482
+ #e = new Cr();
2482
2483
  constructor(e, t) {
2483
- this.raw = new br(e, "providers", t);
2484
+ this.raw = new Sr(e, "providers", t);
2484
2485
  }
2485
2486
  get(e, t = "en", n = !1) {
2486
- return this.#e.get(yr(e, t), [this.raw.get(e, t, void 0, n)], (e) => e.data.map(pr));
2487
+ return this.#e.get(xr(e, t), [this.raw.get(e, t, void 0, n)], (e) => e.data.map(gr));
2487
2488
  }
2488
2489
  retryFailed() {
2489
2490
  this.raw.retryFailed();
@@ -2494,50 +2495,79 @@ var yr = (...e) => JSON.stringify(e), br = class {
2494
2495
  dispose() {
2495
2496
  this.#e.dispose(), this.raw.dispose();
2496
2497
  }
2497
- }, Cr = class {
2498
- #e;
2499
- #t = new xr();
2498
+ }, Tr = class {
2499
+ #e = /* @__PURE__ */ new Map();
2500
+ #t = /* @__PURE__ */ new Map();
2500
2501
  constructor(e, t) {
2501
- this.#e = new br(e, "apps", t);
2502
+ this.client = e, this.options = t;
2502
2503
  }
2503
- get(e, t, n = !1) {
2504
- return this.#t.get(yr(t, e), [this.#e.get(t, void 0, void 0, n)], (t) => t.data.filter((t) => e == null || t.service == e).map(mr));
2504
+ get(t, n, r = !1) {
2505
+ let i = this.#e.get(n);
2506
+ if (i == null) {
2507
+ let e = ee(n);
2508
+ i = new Me((t, n) => this.client.readCatalog(e, t, n), 3e4, this.options == null ? void 0 : {
2509
+ key: `open-flow:connections:v1:${encodeURIComponent(this.options.namespace)}:${e.path}`,
2510
+ storage: () => this.options.sessionStorage ?? window.sessionStorage,
2511
+ decode: (e) => Array.isArray(e) ? e.map(Ke) : L()
2512
+ }), this.#e.set(n, i);
2513
+ }
2514
+ let a = i.get(r);
2515
+ if (t == null) return a;
2516
+ let o = xr(n, t), s = this.#t.get(o);
2517
+ return s ?? (s = e(a, (e) => ({
2518
+ ...e,
2519
+ data: e.data?.filter((e) => e.serviceId == t)
2520
+ })), this.#t.set(o, s)), s;
2505
2521
  }
2506
2522
  retryFailed() {
2507
- this.#e.retryFailed();
2523
+ for (let e of this.#e.values()) e.state.value.error != null && e.refresh();
2508
2524
  }
2509
2525
  refreshFlow(e) {
2510
- this.#e.refreshFlow(e);
2526
+ this.#e.get(e)?.refresh(!0);
2511
2527
  }
2512
2528
  dispose() {
2513
- this.#t.dispose(), this.#e.dispose();
2529
+ for (let e of this.#t.values()) e.dispose();
2530
+ this.#t.clear();
2531
+ for (let e of this.#e.values()) e.dispose();
2532
+ this.#e.clear();
2514
2533
  }
2515
- }, wr = class {
2534
+ }, Er = class {
2516
2535
  #e;
2517
- #t = new xr();
2536
+ #t = new Cr();
2518
2537
  #n = /* @__PURE__ */ new Map();
2519
2538
  #r = /* @__PURE__ */ new Set();
2520
2539
  #i = /* @__PURE__ */ new WeakMap();
2521
2540
  constructor(e, t, n) {
2522
- this.client = e, this.providers = t, this.#e = new br(e, "actions", n);
2541
+ this.client = e, this.providers = t, this.#e = new Sr(e, "actions", n);
2523
2542
  }
2524
2543
  get(e, t, n = "en", r = !1) {
2525
- return this.#t.get(yr(t, e, n), [this.#e.get(t, n, e, r), this.providers.raw.get(t, n)], (e, t) => e.data.map((e) => _r(e, t)));
2526
- }
2527
- detail(e, t, n = "en", r = !1) {
2528
- let i = new URLSearchParams({
2529
- ...t == null ? {} : { flowId: t },
2530
- locale: n
2531
- }), a = `/v1/connector/action-metadata/${encodeURIComponent(e)}?${i}`, o = this.#n.get(a);
2532
- return o ?? (o = new ke((t, n) => this.client.readCatalog({
2533
- path: a,
2534
- decode: (t) => {
2535
- let n = me(t);
2536
- if (n.version != 1) return H();
2537
- let r = Se(n.action);
2538
- return r.actionId == e ? r : H();
2544
+ return this.#t.get(xr(t, e, n), [this.#e.get(t, n, e, r), this.providers.raw.get(t, n)], (t, n) => t.data.flatMap((t) => {
2545
+ try {
2546
+ let r = Be(t);
2547
+ return _r(r), r.service == e ? [yr(r, n)] : L();
2548
+ } catch (n) {
2549
+ return console.warn("Could not load Connector Action.", {
2550
+ serviceId: e,
2551
+ actionId: t?.id,
2552
+ error: n
2553
+ }), [];
2539
2554
  }
2540
- }, t, n), 3e4), this.#n.set(a, o)), o.get(r);
2555
+ }));
2556
+ }
2557
+ detail(t, n, r = "en", i = !1) {
2558
+ let a = t.split(".")[0], o = this.get(a, n, r, i), s = xr(n, t, r), c = this.#n.get(s);
2559
+ if (c == null) {
2560
+ let n = new I(404, "connector.action-not-found", `Connector Action "${t}" was not found.`);
2561
+ c = e(o, (e) => {
2562
+ let r = e.data?.find((e) => e.actionId == t);
2563
+ return {
2564
+ data: r,
2565
+ refreshing: e.refreshing,
2566
+ error: e.error ?? (e.data != null && r == null && !e.refreshing ? n : void 0)
2567
+ };
2568
+ }), this.#n.set(s, c);
2569
+ }
2570
+ return c;
2541
2571
  }
2542
2572
  search(e, t, n, r) {
2543
2573
  let i = new URLSearchParams({
@@ -2555,19 +2585,17 @@ var yr = (...e) => JSON.stringify(e), br = class {
2555
2585
  }
2556
2586
  let s = o.get(a);
2557
2587
  if (s != null) return s.refresh(), s;
2558
- let c = new ke((e, t) => this.client.readCatalog({
2588
+ let c = new Me((e, t) => this.client.readCatalog({
2559
2589
  path: `/v1/connector/action-metadata?${i}`,
2560
- decode: vr
2590
+ decode: br
2561
2591
  }, null, t), 3e4);
2562
2592
  return r.aborted ? c.dispose() : (o.set(a, c), this.#r.add(c)), c;
2563
2593
  }
2564
2594
  retryFailed() {
2565
2595
  this.#e.retryFailed();
2566
- for (let e of this.#n.values()) e.state.value.error != null && e.refresh();
2567
2596
  }
2568
2597
  refreshFlow(e) {
2569
2598
  this.#e.refreshFlow(e);
2570
- for (let [t, n] of this.#n) new URL(t, "https://open-flow.invalid").searchParams.get("flowId") == e && n.refresh(!0);
2571
2599
  }
2572
2600
  dispose() {
2573
2601
  for (let e of this.#r) e.dispose();
@@ -2575,9 +2603,9 @@ var yr = (...e) => JSON.stringify(e), br = class {
2575
2603
  for (let e of this.#n.values()) e.dispose();
2576
2604
  this.#n.clear(), this.#t.dispose(), this.#e.dispose();
2577
2605
  }
2578
- }, Tr = class {
2606
+ }, Dr = class {
2579
2607
  constructor(e, t) {
2580
- this.providers = new Sr(e, t), this.actions = new wr(e, this.providers, t), this.connections = new Cr(e, t);
2608
+ this.providers = new wr(e, t), this.actions = new Er(e, this.providers, t), this.connections = new Tr(e, t);
2581
2609
  }
2582
2610
  dispose() {
2583
2611
  this.actions.dispose(), this.connections.dispose(), this.providers.dispose();
@@ -2585,38 +2613,38 @@ var yr = (...e) => JSON.stringify(e), br = class {
2585
2613
  refreshFlow(e) {
2586
2614
  this.actions.refreshFlow(e), this.connections.refreshFlow(e), this.providers.refreshFlow(e);
2587
2615
  }
2588
- }, Er = {
2616
+ }, Or = {
2589
2617
  candidates: {},
2590
2618
  candidateErrors: [],
2591
2619
  loading: !1,
2592
2620
  loadingCandidates: []
2593
- }, Dr = class {
2621
+ }, kr = class {
2594
2622
  #e;
2595
2623
  #t;
2596
2624
  #n;
2597
2625
  #r;
2626
+ #i;
2627
+ #a;
2598
2628
  constructor(e, t, r = h(), i = () => {}) {
2599
- this.client = e, this.setNotice = t, this.i18n = r, this.onSaved = i, this.#e = n(Er), this.#n = 0, this.#r = !1, this.$ = this.#e;
2629
+ this.client = e, this.setNotice = t, this.i18n = r, this.onSaved = i, this.#e = n(Or), this.#n = 0, this.#r = !1, this.#i = new AbortController(), this.#a = /* @__PURE__ */ new Map(), this.$ = this.#e;
2600
2630
  }
2601
2631
  async load(e) {
2602
2632
  let t = e != null && e == this.#t && this.#e.value.access != null, n = ++this.#n;
2603
- if (this.#t = e, t || this.#e.set(e == null ? Er : {
2604
- ...Er,
2633
+ if (this.#t = e, t || (this.#i.abort(), this.#i = new AbortController(), this.#a.clear(), this.#e.set(e == null ? Or : {
2634
+ ...Or,
2605
2635
  loading: !0
2606
- }), e != null) try {
2607
- let r = await this.client.getConnectorAccess(e);
2636
+ })), e != null) try {
2637
+ let t = await this.client.getConnectorAccess(e);
2608
2638
  if (!this.#r && n == this.#n) {
2609
- let e = this.#e.value, n = e.access != null && e.access.accessRevision > r.accessRevision ? e.access : r;
2610
- this.#e.set(t ? {
2639
+ let e = this.#e.value, n = e.access != null && e.access.accessRevision > t.accessRevision ? e.access : t;
2640
+ this.#e.set({
2611
2641
  ...e,
2612
- access: n
2613
- } : {
2614
- ...Er,
2615
- access: n
2642
+ access: n,
2643
+ loading: !1
2616
2644
  });
2617
2645
  }
2618
2646
  } catch (e) {
2619
- !this.#r && n == this.#n && (t || this.#e.set(Er), this.setNotice(L(e, this.i18n.t)));
2647
+ !this.#r && n == this.#n && (t || this.#e.set(Or), this.setNotice(O(e, this.i18n.t)));
2620
2648
  }
2621
2649
  }
2622
2650
  changed(e) {
@@ -2625,89 +2653,127 @@ var yr = (...e) => JSON.stringify(e), br = class {
2625
2653
  configure(e) {
2626
2654
  this.#r || this.#t == null || (this.#e.set({
2627
2655
  ...this.#e.value,
2628
- configuration: { providerId: e }
2629
- }), this.loadCandidates(e));
2656
+ configuration: e == null ? {} : { providerId: e }
2657
+ }), e != null && this.loadCandidates([e], !0));
2658
+ }
2659
+ closeConfiguration() {
2660
+ this.#e.set({
2661
+ ...this.#e.value,
2662
+ configuration: void 0
2663
+ });
2630
2664
  }
2631
- async loadCandidates(e) {
2632
- let t = this.#t, n = this.#e.value;
2633
- if (!(t == null || n.access?.mode != "selectable" || n.loadingCandidates.includes(e))) {
2665
+ async loadCandidates(e, t = !1) {
2666
+ let n = this.#t, r = this.#e.value;
2667
+ if (this.#r || n == null || r.access?.mode != "selectable") return;
2668
+ let i = e.flatMap((e) => this.#a.get(e) ?? []), a = [...new Set(e)].filter((e) => !this.#a.has(e) && (t || r.candidates[e] == null && !r.candidateErrors.includes(e)));
2669
+ if (a.length == 0) {
2670
+ await Promise.all(i);
2671
+ return;
2672
+ }
2673
+ let o = Promise.withResolvers();
2674
+ for (let e of a) this.#a.set(e, o.promise);
2675
+ let s = this.#i.signal;
2676
+ this.#e.set({
2677
+ ...r,
2678
+ candidateErrors: r.candidateErrors.filter((e) => !a.includes(e)),
2679
+ loadingCandidates: [...r.loadingCandidates, ...a]
2680
+ });
2681
+ try {
2682
+ let e = await this.client.listProviderAccessBindingCandidates(n, a, s);
2683
+ if (s.aborted) return;
2684
+ let t = this.#e.value, r = { ...t.candidates }, i = [...t.candidateErrors];
2685
+ for (let t of e.results) "error" in t ? i.push(t.providerId) : r[t.providerId] = t;
2634
2686
  this.#e.set({
2635
- ...n,
2636
- candidateErrors: n.candidateErrors.filter((t) => t != e),
2637
- loadingCandidates: [...n.loadingCandidates, e]
2687
+ ...t,
2688
+ candidates: r,
2689
+ candidateErrors: i,
2690
+ loadingCandidates: t.loadingCandidates.filter((e) => !a.includes(e))
2638
2691
  });
2639
- try {
2640
- let n = await this.client.listProviderAccessBindingCandidates(t, e);
2641
- if (this.#r || t != this.#t) return;
2642
- let r = this.#e.value;
2643
- this.#e.set({
2644
- ...r,
2645
- candidates: {
2646
- ...r.candidates,
2647
- [e]: n
2648
- },
2649
- loadingCandidates: r.loadingCandidates.filter((t) => t != e)
2650
- });
2651
- } catch (n) {
2652
- if (this.#r || t != this.#t) return;
2653
- let r = this.#e.value;
2654
- this.#e.set({
2655
- ...r,
2656
- candidateErrors: [...r.candidateErrors.filter((t) => t != e), e],
2657
- loadingCandidates: r.loadingCandidates.filter((t) => t != e)
2658
- }), this.setNotice(L(n, this.i18n.t));
2659
- }
2692
+ let o = e.results.find((e) => "error" in e);
2693
+ o != null && "error" in o && this.setNotice(O(new I(502, o.error.code, o.error.message), this.i18n.t));
2694
+ } catch (e) {
2695
+ if (s.aborted) return;
2696
+ let t = this.#e.value;
2697
+ this.#e.set({
2698
+ ...t,
2699
+ candidateErrors: [...t.candidateErrors, ...a],
2700
+ loadingCandidates: t.loadingCandidates.filter((e) => !a.includes(e))
2701
+ }), this.setNotice(O(e, this.i18n.t));
2702
+ } finally {
2703
+ for (let e of a) this.#a.get(e) == o.promise && this.#a.delete(e);
2704
+ o.resolve();
2660
2705
  }
2706
+ await Promise.all(i);
2661
2707
  }
2662
2708
  async select(e, t, n = !0) {
2663
2709
  let r = this.#t, i = this.#e.value.access;
2664
- if (r == null || i?.mode != "selectable" || this.#e.value.savingProviderId != null) return !1;
2710
+ if (this.#r || r == null || i?.mode != "selectable" || this.#e.value.savingProviderId != null) return !1;
2665
2711
  this.#e.set({
2666
2712
  ...this.#e.value,
2667
- savingProviderId: e
2713
+ savingProviderId: e,
2714
+ pendingSelection: {
2715
+ providerId: e,
2716
+ accessBindingId: t,
2717
+ selected: n
2718
+ }
2668
2719
  });
2669
2720
  try {
2670
2721
  let a = n ? await this.client.addProviderAccessBinding(r, e, t, i.accessRevision) : await this.client.removeProviderAccessBinding(r, e, t, i.accessRevision);
2671
- if (!this.#r && r == this.#t) return this.#e.set({
2672
- ...this.#e.value,
2673
- access: a,
2674
- savingProviderId: void 0
2675
- }), this.onSaved(r), !0;
2722
+ if (!this.#r && r == this.#t) {
2723
+ let e = this.#e.value.access;
2724
+ return this.#e.set({
2725
+ ...this.#e.value,
2726
+ access: e != null && e.accessRevision > a.accessRevision ? e : a,
2727
+ savingProviderId: void 0,
2728
+ pendingSelection: void 0
2729
+ }), this.onSaved(r), !0;
2730
+ }
2676
2731
  } catch (e) {
2677
2732
  if (this.#r || r != this.#t) return !1;
2678
2733
  this.#e.set({
2679
2734
  ...this.#e.value,
2680
- savingProviderId: void 0
2681
- }), this.setNotice(L(e, this.i18n.t)), await this.load(r);
2735
+ savingProviderId: void 0,
2736
+ pendingSelection: void 0
2737
+ }), this.setNotice(O(e, this.i18n.t)), await this.load(r);
2682
2738
  }
2683
2739
  return !1;
2684
2740
  }
2741
+ async setService(e, t) {
2742
+ let n = this.#t, r = this.#e.value.access;
2743
+ if (this.#r || n == null || r?.mode != "selectable" || this.#e.value.savingProviderId != null) return !1;
2744
+ this.#e.set({
2745
+ ...this.#e.value,
2746
+ savingProviderId: e
2747
+ });
2748
+ try {
2749
+ if (t) {
2750
+ if (await this.loadCandidates([e], !0), this.#r || n != this.#t) return !1;
2751
+ if (this.#e.value.candidateErrors.includes(e)) return this.#e.set({
2752
+ ...this.#e.value,
2753
+ savingProviderId: void 0
2754
+ }), !1;
2755
+ }
2756
+ let i = t && !r.bindings.some((t) => t.providerId == e) ? this.#e.value.candidates[e]?.candidates.find((e) => e.isDefault) : void 0, a = i == null ? await this.client.setConnectorService(n, e, t, r.accessRevision) : await this.client.addProviderAccessBinding(n, e, i.accessBindingId, r.accessRevision);
2757
+ if (this.#r || n != this.#t) return !1;
2758
+ let o = this.#e.value.access;
2759
+ return this.#e.set({
2760
+ ...this.#e.value,
2761
+ access: o != null && o.accessRevision > a.accessRevision ? o : a,
2762
+ savingProviderId: void 0,
2763
+ ...!t && this.#e.value.configuration?.providerId == e ? { configuration: {} } : {}
2764
+ }), this.onSaved(n), t && this.configure(e), !0;
2765
+ } catch (e) {
2766
+ return this.#r || n != this.#t ? !1 : (this.#e.set({
2767
+ ...this.#e.value,
2768
+ savingProviderId: void 0,
2769
+ pendingSelection: void 0
2770
+ }), this.setNotice(O(e, this.i18n.t)), await this.load(n), !1);
2771
+ }
2772
+ }
2685
2773
  dispose() {
2686
- this.#r = !0, this.#n += 1, this.#e.dispose();
2774
+ this.#r = !0, this.#i.abort(), this.#a.clear(), this.#n += 1, this.#e.dispose();
2687
2775
  }
2688
- };
2689
- //#endregion
2690
- //#region src/workbench/browser/runtime/connectionCatalog.ts
2691
- function Or(e, t) {
2692
- let n = e.authenticated && t != null ? kr(t).preferred : void 0;
2693
- return {
2694
- ...e,
2695
- ...n == null ? {} : { defaultConnection: n }
2696
- };
2697
- }
2698
- function kr(e) {
2699
- let t = [], n = /* @__PURE__ */ new Map(), r;
2700
- for (let i of e) n.set(i.connectionId, i), i.status == "active" && (t.push(i), i.isDefault && (r = i));
2701
- return {
2702
- active: t,
2703
- all: e,
2704
- byId: n,
2705
- preferred: r ?? (t.length == 1 ? t[0] : void 0)
2706
- };
2707
- }
2708
- //#endregion
2709
- //#region src/workbench/browser/runtime/stores/connectorStore.ts
2710
- var Ar = {};
2776
+ }, Ar = {};
2711
2777
  function jr(e) {
2712
2778
  return Object.entries(e).map(([e, t]) => ({
2713
2779
  description: t.description,
@@ -2723,7 +2789,7 @@ function Mr(e, t) {
2723
2789
  service: e.serviceName
2724
2790
  }) : e.description,
2725
2791
  group: t("addNode.connectorActions"),
2726
- icon: A(e),
2792
+ icon: j(e),
2727
2793
  id: `connector:${e.actionId}`,
2728
2794
  inputs: jr(e.inputs),
2729
2795
  kind: "connector",
@@ -2750,7 +2816,7 @@ function Nr(e, t) {
2750
2816
  choices: r,
2751
2817
  description: t(r.length == 1 ? "addNode.connectorActionCountOne" : "addNode.connectorActionCount", { count: r.length }),
2752
2818
  group: t("addNode.connectorActions"),
2753
- icon: A(n),
2819
+ icon: j(n),
2754
2820
  id: `connector-provider:${n.serviceId}`,
2755
2821
  inputs: [],
2756
2822
  kind: "connector-group",
@@ -2765,7 +2831,7 @@ function Pr(e, t) {
2765
2831
  choices: [],
2766
2832
  description: t("addNode.connectorBrowseActions"),
2767
2833
  group: t("addNode.connectorActions"),
2768
- icon: A(e),
2834
+ icon: j(e),
2769
2835
  id: `connector-provider:${e.serviceId}`,
2770
2836
  inputs: [],
2771
2837
  kind: "connector-group",
@@ -2790,7 +2856,7 @@ function Fr(e, t) {
2790
2856
  function Ir(e, t, n) {
2791
2857
  if (e == null) return [];
2792
2858
  let r = [];
2793
- for (let i of [...D(e.revision.content).tasks].toSorted()) {
2859
+ for (let i of [...qe(e.revision.content).tasks].toSorted()) {
2794
2860
  let a = e.task(i);
2795
2861
  if (a?.executor.kind != "connector") continue;
2796
2862
  let o = t[a.executor.action];
@@ -2826,12 +2892,12 @@ var Lr = class {
2826
2892
  #h;
2827
2893
  #g;
2828
2894
  constructor(r, i, a, o, s = h(), c = i.catalogs) {
2829
- this.data = c, this.#i = /* @__PURE__ */ new Set(), this.#a = new I(), this.#o = new I(), this.#d = n(Ar), this.#f = n([]), this.#p = n([]), this.#g = !1, this.loadConnections = async (e) => {
2895
+ this.data = c, this.#i = /* @__PURE__ */ new Set(), this.#a = new D(), this.#o = new D(), this.#d = n(Ar), this.#f = n([]), this.#p = n([]), this.#g = !1, this.loadConnections = async (e) => {
2830
2896
  let t = this.#m.$.flowId.value;
2831
- this.#g || t == null || await k(this.data.connections.get(void 0), e);
2897
+ this.#g || t == null || await A(this.data.connections.get(void 0), e);
2832
2898
  }, this.browseAddNodeOptions = (e) => {
2833
2899
  let t = this.data.providers.get(void 0, this.#n);
2834
- return j(e, (e) => {
2900
+ return M(e, (e) => {
2835
2901
  let n = e(t), r = e(this.#t.t$);
2836
2902
  return {
2837
2903
  ...n,
@@ -2840,11 +2906,11 @@ var Lr = class {
2840
2906
  });
2841
2907
  }, this.provideAddNodeOptionChoices = (e, t) => {
2842
2908
  let n = e.slice(19), r = this.data.actions.get(n, void 0, this.#n), i = this.data.providers.get(void 0, this.#n);
2843
- return j(t, (e) => {
2909
+ return M(t, (e) => {
2844
2910
  let t = e(r), a = e(i).data?.find((e) => e.serviceId == n), o = e(this.#t.t$);
2845
2911
  return {
2846
2912
  ...t,
2847
- data: t.data?.map((e) => Mr(Or({
2913
+ data: t.data?.map((e) => Mr(yn({
2848
2914
  ...e,
2849
2915
  ...a == null ? {} : {
2850
2916
  serviceName: a.serviceName,
@@ -2855,17 +2921,17 @@ var Lr = class {
2855
2921
  });
2856
2922
  }, this.provideAddNodeOptions = (e, t, n = t) => {
2857
2923
  let r = e.trim();
2858
- if (r.length == 0) return j(t, (e) => ({
2924
+ if (r.length == 0) return M(t, (e) => ({
2859
2925
  data: Nr(Object.values(e(this.$.actions)), e(this.#t.t$)),
2860
2926
  refreshing: !1,
2861
2927
  error: void 0
2862
2928
  }));
2863
2929
  let i = this.data.actions.search(r, void 0, this.#n, n).get();
2864
- return j(t, (e) => {
2930
+ return M(t, (e) => {
2865
2931
  let t = e(i), n = e(this.#t.t$);
2866
2932
  return {
2867
2933
  ...t,
2868
- data: t.data?.map((e) => Mr(Or(e, void 0), n))
2934
+ data: t.data?.map((e) => Mr(yn(e, void 0), n))
2869
2935
  };
2870
2936
  });
2871
2937
  }, this.retryCatalog = () => {
@@ -2875,13 +2941,13 @@ var Lr = class {
2875
2941
  let t = e(i.$.flowId);
2876
2942
  return Object.fromEntries(e(this.#f).flatMap((n) => {
2877
2943
  let r = e(R(this.data.actions.detail(n, t, this.#n)));
2878
- return r == null ? [] : [[n, Or(r, e(R(this.data.connections.get(r.serviceId, t))))]];
2944
+ return r == null ? [] : [[n, yn(r, e(R(this.data.connections.get(r.serviceId, t))))]];
2879
2945
  }));
2880
2946
  }), u = t((e) => {
2881
2947
  let t = e(i.$.flowId);
2882
2948
  return Object.fromEntries(e(this.#p).flatMap((n) => {
2883
2949
  let r = e(R(this.data.connections.get(n, t)));
2884
- return r == null ? [] : [[n, kr(r)]];
2950
+ return r == null ? [] : [[n, $(r)]];
2885
2951
  }));
2886
2952
  });
2887
2953
  this.#l = t((e) => {
@@ -2891,13 +2957,13 @@ var Lr = class {
2891
2957
  return {
2892
2958
  action: r,
2893
2959
  actionError: o == null ? void 0 : {
2894
- ...o instanceof U ? { code: o.code } : {},
2895
- message: L(o, this.#t.t).message
2960
+ ...o instanceof I ? { code: o.code } : {},
2961
+ message: O(o, this.#t.t).message
2896
2962
  },
2897
2963
  activeConnections: a?.active,
2898
2964
  authorizationPending: r != null && n.authorizationServiceId == r.serviceId,
2899
2965
  connection: c,
2900
- connectionError: s == null ? void 0 : L(s, this.#t.t).message
2966
+ connectionError: s == null ? void 0 : O(s, this.#t.t).message
2901
2967
  };
2902
2968
  }), this.$ = {
2903
2969
  pickerConnections: t((e) => e(i.$.flowId) == null ? [] : e(R(this.data.connections.get(void 0))) ?? []),
@@ -2933,10 +2999,10 @@ var Lr = class {
2933
2999
  let t = this.#m.$.flowId.value;
2934
3000
  if (t == null || this.#g) throw Error("Connector Action cannot be resolved without an active Flow.");
2935
3001
  await Promise.resolve();
2936
- let n = await k(this.data.actions.detail(e, t, this.#n), void 0, !0), r = n.authenticated ? await k(this.data.connections.get(n.serviceId, t), void 0, !0) : [];
3002
+ let n = await A(this.data.actions.detail(e, t, this.#n), void 0, !0), r = n.authenticated ? await A(this.data.connections.get(n.serviceId, t), void 0, !0) : [];
2937
3003
  return this.#b(this.#f, [e]), n.authenticated && this.#b(this.#p, [n.serviceId]), {
2938
- action: Or(n, r),
2939
- connections: kr(r).active
3004
+ action: yn(n, r),
3005
+ connections: $(r).active
2940
3006
  };
2941
3007
  }
2942
3008
  async refresh(e = !1) {
@@ -2958,13 +3024,13 @@ var Lr = class {
2958
3024
  });
2959
3025
  try {
2960
3026
  await Promise.resolve();
2961
- let a = await k(i, void 0, e);
3027
+ let a = await A(i, void 0, e);
2962
3028
  if (!this.#S(t, n)) return;
2963
3029
  this.#b(this.#f, [a.actionId]), a.authenticated && await this.#_(n, r, a.serviceId, e, t);
2964
3030
  } catch (e) {
2965
3031
  this.#S(t, n) && this.#x({ actionError: {
2966
3032
  actionId: r.actionId,
2967
- message: L(e, this.#t.t).message
3033
+ message: O(e, this.#t.t).message
2968
3034
  } });
2969
3035
  } finally {
2970
3036
  this.#S(t, n) && this.#d.value.actionLoading == r.actionId && this.#x({ actionLoading: void 0 });
@@ -2972,11 +3038,11 @@ var Lr = class {
2972
3038
  }
2973
3039
  async loadCodeConnections(e, t) {
2974
3040
  let n = this.#m.$.flowId.value;
2975
- n == null || this.#g || (await k(this.data.connections.get(e, n), t), !(t.aborted || this.#g || n != this.#m.$.flowId.value) && this.#b(this.#p, [e]));
3041
+ n == null || this.#g || (await A(this.data.connections.get(e, n), t), !(t.aborted || this.#g || n != this.#m.$.flowId.value) && this.#b(this.#p, [e]));
2976
3042
  }
2977
3043
  async loadCodeAction(e, t) {
2978
3044
  let n = this.#n, r = this.#m.$.flowId.value;
2979
- r == null || this.#g || (await k(this.data.actions.detail(e, r, n), t), !(t.aborted || this.#g || n != this.#n || r != this.#m.$.flowId.value) && this.#b(this.#f, [e]));
3045
+ r == null || this.#g || (await A(this.data.actions.detail(e, r, n), t), !(t.aborted || this.#g || n != this.#n || r != this.#m.$.flowId.value) && this.#b(this.#f, [e]));
2980
3046
  }
2981
3047
  async connect(e) {
2982
3048
  if (this.#g) return;
@@ -2997,7 +3063,7 @@ var Lr = class {
2997
3063
  serviceId: e
2998
3064
  }, this.#x({ authorizationServiceId: e });
2999
3065
  } catch (e) {
3000
- this.#g || this.#u(L(e, this.#t.t));
3066
+ this.#g || this.#u(O(e, this.#t.t));
3001
3067
  }
3002
3068
  }
3003
3069
  async setConnection(e, t) {
@@ -3023,16 +3089,16 @@ var Lr = class {
3023
3089
  let i;
3024
3090
  try {
3025
3091
  let r = this.data.connections.get(t, e, n);
3026
- await Promise.resolve(), i = await k(r, void 0, n);
3092
+ await Promise.resolve(), i = await A(r, void 0, n);
3027
3093
  } catch (n) {
3028
3094
  this.#S(r, e) && this.#x({ connectionError: {
3029
- message: L(n, this.#t.t).message,
3095
+ message: O(n, this.#t.t).message,
3030
3096
  serviceId: t
3031
3097
  } });
3032
3098
  return;
3033
3099
  }
3034
3100
  if (!this.#S(r, e)) return;
3035
- let a = kr(i);
3101
+ let a = $(i);
3036
3102
  return this.#b(this.#p, [t]), a;
3037
3103
  }
3038
3104
  async #y(e, t, n) {
@@ -3060,7 +3126,7 @@ var Lr = class {
3060
3126
  if (r.length > 0) {
3061
3127
  for (let e of r) this.#i.add(e);
3062
3128
  try {
3063
- let n = await Promise.all(r.map((e) => k(this.data.actions.detail(e, t, this.#n))));
3129
+ let n = await Promise.all(r.map((e) => A(this.data.actions.detail(e, t, this.#n))));
3064
3130
  if (!this.#S(e, t)) return;
3065
3131
  this.#b(this.#f, n.map((e) => e.actionId));
3066
3132
  } catch {
@@ -3071,7 +3137,7 @@ var Lr = class {
3071
3137
  }
3072
3138
  if (!this.#S(e, t)) return;
3073
3139
  let i = /* @__PURE__ */ new Set();
3074
- for (let e of D(n.revision.content).tasks) {
3140
+ for (let e of qe(n.revision.content).tasks) {
3075
3141
  let t = n.task(e);
3076
3142
  if (t?.executor.kind != "connector") continue;
3077
3143
  let r = this.$.actions.value[t.executor.action];
@@ -3101,11 +3167,11 @@ var zr = class {
3101
3167
  let t = this.#t.get(e);
3102
3168
  if (t == null) {
3103
3169
  let n = (t) => {
3104
- let n = Me(t);
3170
+ let n = k(t);
3105
3171
  if (n.locale != e) throw Error("Unexpected Trigger catalog language.");
3106
3172
  return n;
3107
3173
  }, r = this.host.triggerCatalogCache;
3108
- t = new ke((t, r) => this.client.readCatalog({
3174
+ t = new Me((t, r) => this.client.readCatalog({
3109
3175
  path: `/v1/trigger-keys/catalog?locale=${encodeURIComponent(e)}`,
3110
3176
  decode: n
3111
3177
  }, t, r), 3e5, r == null ? void 0 : {
@@ -3146,7 +3212,7 @@ function Ur(e, t, n) {
3146
3212
  return {
3147
3213
  description: n?.description ?? e.description,
3148
3214
  group: t.t("addNode.integrationTriggers"),
3149
- icon: A({
3215
+ icon: j({
3150
3216
  serviceId: e.provider,
3151
3217
  serviceName: e.provider
3152
3218
  }),
@@ -3179,17 +3245,17 @@ var Wr = class {
3179
3245
  #c;
3180
3246
  #l;
3181
3247
  constructor(r, i, a, o, s = h()) {
3182
- this.#r = new I(), this.#i = /* @__PURE__ */ new Set(), this.#s = n(Br), this.#l = !1, this.browseAddNodeOptions = (e) => this.#u("", e), this.provideAddNodeOptions = (e, t) => this.#u(e, t), this.catalog = new zr(r, gt([s.lang]), o), this.#e = r, this.#t = o, this.#n = s, this.#o = a, this.#c = i, this.#a = t((e) => {
3248
+ this.#r = new D(), this.#i = /* @__PURE__ */ new Set(), this.#s = n(Br), this.#l = !1, this.browseAddNodeOptions = (e) => this.#u("", e), this.provideAddNodeOptions = (e, t) => this.#u(e, t), this.catalog = new zr(r, xt([s.lang]), o), this.#e = r, this.#t = o, this.#n = s, this.#o = a, this.#c = i, this.#a = t((e) => {
3183
3249
  let t = e(i.$.selection), n = Hr(t, i), r = e(this.#s);
3184
3250
  if (t?.kind != "trigger") return { authorizationPending: !1 };
3185
3251
  let a = t.trigger;
3186
3252
  if (a.kind != "poll" && a.kind != "integration") return { authorizationPending: !1 };
3187
- let o = n == null ? void 0 : e(i.catalogs.connections.get(n.provider, e(i.$.flowId))).data, s = o == null ? void 0 : kr(o), c = n == null ? void 0 : e(i.catalogs.connections.get(n.provider, e(i.$.flowId))).error;
3253
+ let o = n == null ? void 0 : e(i.catalogs.connections.get(n.provider, e(i.$.flowId))).data, s = o == null ? void 0 : $(o), c = n == null ? void 0 : e(i.catalogs.connections.get(n.provider, e(i.$.flowId))).error;
3188
3254
  return {
3189
3255
  activeConnections: s?.active,
3190
3256
  authorizationPending: r.authorizationProvider == n?.provider,
3191
3257
  connection: n?.connectionId == null ? void 0 : s?.byId.get(n.connectionId),
3192
- connectionError: c == null ? void 0 : L(c, this.#n.t).message,
3258
+ connectionError: c == null ? void 0 : O(c, this.#n.t).message,
3193
3259
  definition: a.definition
3194
3260
  };
3195
3261
  }), this.$ = {
@@ -3211,7 +3277,7 @@ var Wr = class {
3211
3277
  }
3212
3278
  #u(e, t) {
3213
3279
  let n = this.catalog.get(), r = e.trim().toLowerCase();
3214
- return j(t, (e) => {
3280
+ return M(t, (e) => {
3215
3281
  let t = e(n);
3216
3282
  e(this.#n.t$);
3217
3283
  let i = e(this.#c.$.flowId) != null && e(this.#c.$.target)?.kind == "flow", a = t.data, o = a?.definitions.filter((e) => !r || [
@@ -3243,11 +3309,11 @@ var Wr = class {
3243
3309
  });
3244
3310
  try {
3245
3311
  let i = this.#c.catalogs.connections.get(r.provider, n, e || this.#i.has(r.provider));
3246
- if (await Promise.resolve(), await k(i, void 0, e || this.#i.has(r.provider)), !this.#f(t, n)) return;
3312
+ if (await Promise.resolve(), await A(i, void 0, e || this.#i.has(r.provider)), !this.#f(t, n)) return;
3247
3313
  this.#i.delete(r.provider);
3248
3314
  } catch (e) {
3249
3315
  this.#f(t, n) && this.#d({ connectionError: {
3250
- message: L(e, this.#n.t).message,
3316
+ message: O(e, this.#n.t).message,
3251
3317
  provider: r.provider
3252
3318
  } });
3253
3319
  } finally {
@@ -3266,7 +3332,7 @@ var Wr = class {
3266
3332
  }
3267
3333
  !this.#l && t == this.#c.$.flowId.value && this.#d({ authorizationProvider: e });
3268
3334
  } catch (e) {
3269
- this.#l || this.#o(L(e, this.#n.t));
3335
+ this.#l || this.#o(O(e, this.#n.t));
3270
3336
  }
3271
3337
  }
3272
3338
  async setConnection(e, t) {
@@ -3292,7 +3358,7 @@ var Wr = class {
3292
3358
  function Gr(e, t) {
3293
3359
  let n = e, r = [];
3294
3360
  for (let e of t) {
3295
- let t = ft(n, [e]), i = [];
3361
+ let t = _t(n, [e]), i = [];
3296
3362
  switch (e.kind) {
3297
3363
  case "graph.node.create":
3298
3364
  i.push({
@@ -3551,7 +3617,7 @@ function Kr(e, t, n) {
3551
3617
  let r = e.graph(t)?.nodes ?? {}, i = Object.fromEntries(n.flatMap((e) => r[e] == null ? [] : [[e, r[e]]]));
3552
3618
  return {
3553
3619
  edges: (e.graph(t)?.edges ?? []).filter((e) => i[e.source] != null && i[e.target] != null),
3554
- bindings: Object.fromEntries(Object.values(i).flatMap((t) => "inputs" in t ? Object.values(Xe(t)).flatMap((t) => t.kind == "sources" ? t.sources.flatMap((t) => {
3620
+ bindings: Object.fromEntries(Object.values(i).flatMap((t) => "inputs" in t ? Object.values(tt(t)).flatMap((t) => t.kind == "sources" ? t.sources.flatMap((t) => {
3555
3621
  if (t.kind != "binding") return [];
3556
3622
  let n = e.binding(t.bindingId);
3557
3623
  return n?.kind == "variable" ? [[t.bindingId, n]] : [];
@@ -3573,7 +3639,7 @@ function qr(e, t, n, r) {
3573
3639
  let i = Object.values(e.graph(t)?.nodes ?? {}).some((e) => e.kind === "manual"), a = Object.entries(n.nodes).filter(([, e]) => (t.kind == "flow" || "inputs" in e) && (e.kind !== "manual" || !i) && (e.kind != "task" || e.task == null || n.modules[e.task.moduleId] != null)), o = a.map(([e]) => e), s = new Map(o.map((e) => [e, r()])), c = [], l = /* @__PURE__ */ new Map();
3574
3640
  for (let [, e] of a) {
3575
3641
  if (!("inputs" in e)) continue;
3576
- let t = Object.values(Xe(e));
3642
+ let t = Object.values(tt(e));
3577
3643
  for (let e of t) if (e.kind == "sources") for (let t of e.sources) t.kind != "binding" || n.bindings[t.bindingId]?.kind != "variable" || l.has(t.bindingId) || l.set(t.bindingId, r());
3578
3644
  }
3579
3645
  for (let [e, t] of l) {
@@ -3647,7 +3713,7 @@ function qr(e, t, n, r) {
3647
3713
  ...o,
3648
3714
  inputs: u
3649
3715
  };
3650
- if (o.kind == "condition" && (d = Ye(o, (e) => e.kind == "node" ? {
3716
+ if (o.kind == "condition" && (d = et(o, (e) => e.kind == "node" ? {
3651
3717
  ...e,
3652
3718
  nodeId: s.get(e.nodeId) ?? e.nodeId
3653
3719
  } : e.kind == "binding" ? {
@@ -3693,7 +3759,7 @@ function qr(e, t, n, r) {
3693
3759
  });
3694
3760
  }
3695
3761
  return {
3696
- changes: Ne(e, t, c),
3762
+ changes: ze(e, t, c),
3697
3763
  nodeIds: [...s.values()],
3698
3764
  sourceIds: o
3699
3765
  };
@@ -3791,15 +3857,15 @@ var Xr = class {
3791
3857
  this.#a = e;
3792
3858
  let t = e, n = [];
3793
3859
  for (let e of this.#o) try {
3794
- t = V(t, e.changes), n.push(e);
3860
+ t = z(t, e.changes), n.push(e);
3795
3861
  } catch (t) {
3796
- if (!(t instanceof Ze)) throw t;
3862
+ if (!(t instanceof nt)) throw t;
3797
3863
  e.active = !1;
3798
3864
  }
3799
3865
  return this.#o = n, t;
3800
3866
  }
3801
3867
  project(e) {
3802
- return this.#o.reduce((e, t) => V(e, t.changes), e);
3868
+ return this.#o.reduce((e, t) => z(e, t.changes), e);
3803
3869
  }
3804
3870
  async settled() {
3805
3871
  await this.#s;
@@ -3819,7 +3885,7 @@ var Xr = class {
3819
3885
  let o = {
3820
3886
  ...e,
3821
3887
  active: !0,
3822
- changeId: C(),
3888
+ changeId: F(),
3823
3889
  changes: n,
3824
3890
  started: !1
3825
3891
  };
@@ -3844,21 +3910,21 @@ var Xr = class {
3844
3910
  let r = this.#l(e, n, t);
3845
3911
  return this.#o.length == 0 && this.#t.check(), r;
3846
3912
  } catch (n) {
3847
- if (n instanceof U && n.code == "flow.revision-conflict") {
3913
+ if (n instanceof I && n.code == "flow.revision-conflict") {
3848
3914
  if (!t && await this.#t.recover(e)) {
3849
- t = !0, e.changeId = C();
3915
+ t = !0, e.changeId = F();
3850
3916
  continue;
3851
3917
  }
3852
3918
  t && await this.#t.recover(e), this.#u(e);
3853
3919
  } else {
3854
- if (!(n instanceof U) && !t) {
3920
+ if (!(n instanceof I) && !t) {
3855
3921
  let n = this.#a?.revisionId;
3856
3922
  if (await this.#t.recover(e)) {
3857
- t = !0, e.active && this.#a?.revisionId != n && (e.changeId = C());
3923
+ t = !0, e.active && this.#a?.revisionId != n && (e.changeId = F());
3858
3924
  continue;
3859
3925
  }
3860
3926
  }
3861
- this.#u(e), this.#t.current(e) && this.#r(L(n, this.#n.t));
3927
+ this.#u(e), this.#t.current(e) && this.#r(O(n, this.#n.t));
3862
3928
  }
3863
3929
  return;
3864
3930
  }
@@ -3867,7 +3933,7 @@ var Xr = class {
3867
3933
  #l(e, t, n) {
3868
3934
  let r = {
3869
3935
  ...n.revision,
3870
- content: V(t, e.changes).content
3936
+ content: z(t, e.changes).content
3871
3937
  };
3872
3938
  return this.#o = this.#o.filter((t) => t !== e), this.#a = r, this.#t.apply(this.project(r)), this.#t.headChanged(e.flowId, r.revisionId), r;
3873
3939
  }
@@ -3885,7 +3951,7 @@ var Xr = class {
3885
3951
  }, $r = class {
3886
3952
  #e;
3887
3953
  #t;
3888
- #n = new I();
3954
+ #n = new D();
3889
3955
  #r;
3890
3956
  #i = n(Qr);
3891
3957
  #a = new AbortController();
@@ -3951,7 +4017,7 @@ var Xr = class {
3951
4017
  failed: !t,
3952
4018
  loading: !1,
3953
4019
  refreshing: !1
3954
- }), this.#r(L(n, this.#t.t));
4020
+ }), this.#r(O(n, this.#t.t));
3955
4021
  }
3956
4022
  }
3957
4023
  async loadMore() {
@@ -3979,7 +4045,7 @@ var Xr = class {
3979
4045
  this.#c({
3980
4046
  loadingMore: !1,
3981
4047
  loadMoreFailed: !0
3982
- }), this.#r(L(e, this.#t.t));
4048
+ }), this.#r(O(e, this.#t.t));
3983
4049
  }
3984
4050
  }
3985
4051
  async setEnabled(e, t) {
@@ -3989,7 +4055,7 @@ var Xr = class {
3989
4055
  let n = await this.#e.setFlowEnabled(e.flowId, e.live.publicationId, t);
3990
4056
  this.#s || this.include(n);
3991
4057
  } catch (e) {
3992
- this.#s || (this.#r(L(e, this.#t.t)), await this.reload());
4058
+ this.#s || (this.#r(O(e, this.#t.t)), await this.reload());
3993
4059
  } finally {
3994
4060
  this.#o.delete(e.flowId);
3995
4061
  }
@@ -4001,9 +4067,9 @@ var Xr = class {
4001
4067
  try {
4002
4068
  let t = await this.#e.publishFlow(e.flowId, e.draftRevisionId, e.live?.publicationId ?? null);
4003
4069
  if (this.#s) return;
4004
- let n = await Y.runPromise(Y.gen({ self: this }, function* () {
4070
+ let n = await G.runPromise(G.gen({ self: this }, function* () {
4005
4071
  let n = t;
4006
- for (; n.status == "pending";) yield* Y.sleep(1e3), n = yield* Y.tryPromise((t) => this.#e.getPublishOperation(e.flowId, n.operationId, t));
4072
+ for (; n.status == "pending";) yield* G.sleep(1e3), n = yield* G.tryPromise((t) => this.#e.getPublishOperation(e.flowId, n.operationId, t));
4007
4073
  return n;
4008
4074
  }), { signal: this.#a.signal });
4009
4075
  if (this.#s) return;
@@ -4015,7 +4081,7 @@ var Xr = class {
4015
4081
  message: this.#t.t("notice.published", { name: e.name })
4016
4082
  }), this.include(await this.#e.getFlow(e.flowId));
4017
4083
  } catch (e) {
4018
- this.#s || this.#r(L(e, this.#t.t));
4084
+ this.#s || this.#r(O(e, this.#t.t));
4019
4085
  } finally {
4020
4086
  this.#o.delete(e.flowId);
4021
4087
  }
@@ -4124,11 +4190,11 @@ var Xr = class {
4124
4190
  phase: "saving"
4125
4191
  }, this.#c();
4126
4192
  try {
4127
- let t = await Xt(i);
4193
+ let t = await en(i);
4128
4194
  if (this.#n || !e()) return !1;
4129
4195
  let a = this.#r.value.draft?.content.modules[n];
4130
4196
  if (a == null || a.source != r.base.source || JSON.stringify(a.imports) != JSON.stringify(r.base.imports)) throw Error(this.#o.t("notice.moduleUpdated"));
4131
- let o = i == a.source && JSON.stringify(t) == JSON.stringify(a.imports) ? this.#r.value.draft : await this.changeDraft(Zt(n, r.base.source, r.base.imports, i, t));
4197
+ let o = i == a.source && JSON.stringify(t) == JSON.stringify(a.imports) ? this.#r.value.draft : await this.changeDraft(tn(n, r.base.source, r.base.imports, i, t));
4132
4198
  if (this.#n || !e()) return !1;
4133
4199
  let s = this.#e.get(n);
4134
4200
  if (s == null) continue;
@@ -4152,7 +4218,7 @@ var Xr = class {
4152
4218
  r != null && (r.editor = {
4153
4219
  ...r.editor,
4154
4220
  phase: "failed"
4155
- }), this.#a(L(t, this.#o.t));
4221
+ }), this.#a(O(t, this.#o.t));
4156
4222
  }
4157
4223
  this.#c();
4158
4224
  }
@@ -4216,7 +4282,7 @@ var Xr = class {
4216
4282
  this.#c(a, r), o = !0;
4217
4283
  } catch (r) {
4218
4284
  if (this.#o || !n()) return;
4219
- if (r instanceof U && r.code == "flow.presentation-conflict") try {
4285
+ if (r instanceof I && r.code == "flow.presentation-conflict") try {
4220
4286
  let t = await this.#e.getPresentation(e);
4221
4287
  if (this.#o || !n()) return;
4222
4288
  this.#c(a, t), this.#n({
@@ -4224,9 +4290,9 @@ var Xr = class {
4224
4290
  message: this.#t.t("notice.layoutConflict")
4225
4291
  });
4226
4292
  } catch (e) {
4227
- !this.#o && n() && this.#c(a, t), !this.#o && n() && this.#n(L(e, this.#t.t));
4293
+ !this.#o && n() && this.#c(a, t), !this.#o && n() && this.#n(O(e, this.#t.t));
4228
4294
  }
4229
- else this.#c(a, t), this.#n(L(r, this.#t.t));
4295
+ else this.#c(a, t), this.#n(O(r, this.#t.t));
4230
4296
  }
4231
4297
  }), await this.#i, o;
4232
4298
  }
@@ -4273,23 +4339,23 @@ var oi = class {
4273
4339
  ...n,
4274
4340
  status: ii(e.draft, e.moduleEditor)
4275
4341
  };
4276
- }), 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 : F(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.workspaceLoadProblem), y = e(this.#t, (e) => e.workspaceLoading), b = e(this.#t, (e) => e.workspaceRepairing);
4342
+ }), 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 : P(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.workspaceLoadProblem), y = e(this.#t, (e) => e.workspaceLoading), b = e(this.#t, (e) => e.workspaceRepairing);
4277
4343
  this.#e = e(this.#t, (e) => ({
4278
- revision: e.draft == null ? void 0 : F(e.draft),
4344
+ revision: e.draft == null ? void 0 : P(e.draft),
4279
4345
  target: e.target
4280
4346
  }), { equal: (e, t) => e.revision === t.revision && e.target === t.target });
4281
4347
  let x = e(this.#t, (e) => {
4282
- if (e.draft != null && e.target != null && e.selectedNodeIds.length == 1) return F(e.draft).selection(e.target, e.selectedNodeIds[0]);
4348
+ if (e.draft != null && e.target != null && e.selectedNodeIds.length == 1) return P(e.draft).selection(e.target, e.selectedNodeIds[0]);
4283
4349
  });
4284
4350
  this.$ = {
4285
4351
  addNodeOptions: t((e) => {
4286
4352
  let { revision: t, target: r } = e(this.#e);
4287
- return ae(t?.revision, r, e(n.t$));
4353
+ return le(t?.revision, r, e(n.t$));
4288
4354
  }),
4289
4355
  busy: i,
4290
4356
  checkLoading: a,
4291
4357
  diagnosticFocus: o,
4292
- diagnosticItems: e(this.#t, (e) => de(e.draft == null ? void 0 : F(e.draft), e.target, e.diagnostics)),
4358
+ diagnosticItems: e(this.#t, (e) => pe(e.draft == null ? void 0 : P(e.draft), e.target, e.diagnostics)),
4293
4359
  diagnostics: s,
4294
4360
  draft: c,
4295
4361
  flow: t((e) => {
@@ -4305,7 +4371,7 @@ var oi = class {
4305
4371
  flowRefreshing: r.$.refreshing,
4306
4372
  flowTotal: r.$.total,
4307
4373
  flows: r.$.flows,
4308
- inspectorDiagnostics: e(this.#t, (e) => ue(e.draft == null ? void 0 : F(e.draft), e.target, e.diagnostics, x.value)),
4374
+ inspectorDiagnostics: e(this.#t, (e) => de(e.draft == null ? void 0 : P(e.draft), e.target, e.diagnostics, x.value)),
4309
4375
  live: p,
4310
4376
  moduleEditor: l,
4311
4377
  nodeFocus: u,
@@ -4317,7 +4383,7 @@ var oi = class {
4317
4383
  target: g,
4318
4384
  targetFlow: t((e) => e(g)?.kind == "flow" ? e(r.$.flows).find((t) => t.flowId == e(f)) : void 0),
4319
4385
  targetName: e(this.#t, (e) => {
4320
- if (e.target != null) return e.target.kind == "flow" ? r.flow(e.flowId ?? "")?.name : e.draft == null ? e.target.id : F(e.draft).subflow(e.target.id)?.name ?? e.target.id;
4386
+ if (e.target != null) return e.target.kind == "flow" ? r.flow(e.flowId ?? "")?.name : e.draft == null ? e.target.id : P(e.draft).subflow(e.target.id)?.name ?? e.target.id;
4321
4387
  }),
4322
4388
  workspaceLoadFailed: _,
4323
4389
  workspaceLoadProblem: v,
@@ -4349,7 +4415,8 @@ var oi = class {
4349
4415
  option: "history.deleted.option",
4350
4416
  case: "history.deleted.case",
4351
4417
  condition: "history.deleted.condition",
4352
- conditionGroup: "history.deleted.conditionGroup"
4418
+ conditionGroup: "history.deleted.conditionGroup",
4419
+ webhookBody: "history.deleted.webhookBody"
4353
4420
  };
4354
4421
  function li(e, t) {
4355
4422
  if (t != null) return t.kind == "flow" || e.subflow(t.id) != null ? t : { kind: "flow" };
@@ -4379,8 +4446,8 @@ var ui = class {
4379
4446
  #x;
4380
4447
  #S;
4381
4448
  #C;
4382
- constructor(e, t, n = Qt, r = h(), i = () => {}, a = new Tr(e), o = () => {}, s = () => {}) {
4383
- this.catalogs = a, this.flowCreated = o, this.accessChanged = s, this.#n = new I(), this.#d = new Jr(), this.history$ = this.#d.state$, this.#m = 0, this.#h = 0, this.#g = !1, this.#_ = !1, this.#v = !1, this.#y = !1, this.#b = 0, this.#e = e, this.#c = t, this.#i = n, this.#r = r, this.#s = i, this.#o = new $r(e, t, r), this.#l = new oi(r, this.#o), this.#u = new ei(this.#l, this.#n, (e) => this.#O(e, !1), t, r), this.#t = new Xr(e, t, r, {
4449
+ constructor(e, t, n = nn, r = h(), i = () => {}, a = new Dr(e), o = () => {}, s = () => {}) {
4450
+ this.catalogs = a, this.flowCreated = o, this.accessChanged = s, this.#n = new D(), this.#d = new Jr(), this.history$ = this.#d.state$, this.#m = 0, this.#h = 0, this.#g = !1, this.#_ = !1, this.#v = !1, this.#y = !1, this.#b = 0, this.#e = e, this.#c = t, this.#i = n, this.#r = r, this.#s = i, this.#o = new $r(e, t, r), this.#l = new oi(r, this.#o), this.#u = new ei(this.#l, this.#n, (e) => this.#O(e, !1), t, r), this.#t = new Xr(e, t, r, {
4384
4451
  apply: (e) => this.#A(e, "local"),
4385
4452
  beforeChange: (e) => {
4386
4453
  e && this.#V({ busy: "designer" });
@@ -4462,12 +4529,12 @@ var ui = class {
4462
4529
  } catch (e) {
4463
4530
  if (!t()) return !1;
4464
4531
  this.#C?.(), this.#C = void 0;
4465
- let n = e instanceof U && e.code == ve.flowUpgradeRequired ? "upgrade" : e instanceof U && (e.code == ve.flowRepairRequired || e.code == ve.flowInvalid) ? "repair" : "failed";
4532
+ let n = e instanceof I && e.code == Fe.flowUpgradeRequired ? "upgrade" : e instanceof I && (e.code == Fe.flowRepairRequired || e.code == Fe.flowInvalid) ? "repair" : "failed";
4466
4533
  return this.#V({
4467
4534
  workspaceLoadFailed: !0,
4468
4535
  workspaceLoadProblem: {
4469
4536
  kind: n,
4470
- ...n == "failed" ? { message: L(e, this.#r.t).message } : {}
4537
+ ...n == "failed" ? { message: O(e, this.#r.t).message } : {}
4471
4538
  },
4472
4539
  workspaceLoading: !1
4473
4540
  }), !1;
@@ -4489,14 +4556,14 @@ var ui = class {
4489
4556
  await this.#e.repairDraft(e, n.expectedRevisionId, n.changeId), this.#x = void 0, await this.selectFlow(e);
4490
4557
  } catch (t) {
4491
4558
  if (this.#_) return;
4492
- if (t instanceof U && t.code == ve.flowRevisionConflict) {
4559
+ if (t instanceof I && t.code == Fe.flowRevisionConflict) {
4493
4560
  this.#x = void 0, await this.selectFlow(e);
4494
4561
  return;
4495
4562
  }
4496
4563
  this.#V({
4497
4564
  workspaceLoadProblem: {
4498
4565
  kind: this.#l.value.workspaceLoadProblem?.kind == "upgrade" ? "upgrade" : "repair",
4499
- message: L(t, this.#r.t).message
4566
+ message: O(t, this.#r.t).message
4500
4567
  },
4501
4568
  workspaceRepairing: !1
4502
4569
  });
@@ -4507,7 +4574,7 @@ var ui = class {
4507
4574
  let n = await this.#e.getLive(e);
4508
4575
  t() && this.#l.value.flowId == e && this.#V({ live: n });
4509
4576
  } catch (n) {
4510
- t() && this.#l.value.flowId == e && this.#c(L(n, this.#r.t));
4577
+ t() && this.#l.value.flowId == e && this.#c(O(n, this.#r.t));
4511
4578
  }
4512
4579
  }
4513
4580
  selectTarget(e) {
@@ -4523,7 +4590,7 @@ var ui = class {
4523
4590
  selectNodes(e) {
4524
4591
  return e.length == this.#l.value.selectedNodeIds.length && e.every((e, t) => e == this.#l.value.selectedNodeIds[t]) ? !0 : (this.#u.flush(), this.#V({
4525
4592
  diagnosticFocus: void 0,
4526
- moduleEditor: ai(this.#l.value.draft == null ? void 0 : F(this.#l.value.draft), this.#l.value.target, e),
4593
+ moduleEditor: ai(this.#l.value.draft == null ? void 0 : P(this.#l.value.draft), this.#l.value.target, e),
4527
4594
  nodeFocus: void 0,
4528
4595
  selectedNodeIds: e
4529
4596
  }), !0);
@@ -4536,7 +4603,7 @@ var ui = class {
4536
4603
  let n = await this.#e.getFlow(await t(e));
4537
4604
  return this.#o.insert(n), n;
4538
4605
  } catch (e) {
4539
- this.#_ || this.#c(L(e, this.#r.t));
4606
+ this.#_ || this.#c(O(e, this.#r.t));
4540
4607
  } finally {
4541
4608
  this.#V({ busy: void 0 });
4542
4609
  }
@@ -4553,7 +4620,7 @@ var ui = class {
4553
4620
  message: this.#r.t("notice.flowDeleteAccepted", { name: t.name })
4554
4621
  }), !0);
4555
4622
  } catch (e) {
4556
- return this.#_ || this.#c(L(e, this.#r.t)), !1;
4623
+ return this.#_ || this.#c(O(e, this.#r.t)), !1;
4557
4624
  } finally {
4558
4625
  this.#V({ busy: void 0 });
4559
4626
  }
@@ -4562,7 +4629,7 @@ var ui = class {
4562
4629
  if (!await this.saveModuleEditor() || this.#l.value.draft == null) return !1;
4563
4630
  let t = this.#i();
4564
4631
  this.#V({ busy: "resource" });
4565
- let n = await this.#O(Ee(t, e), !1);
4632
+ let n = await this.#O(Ae(t, e), !1);
4566
4633
  return this.#V({ busy: void 0 }), n != null && (this.selectTarget({
4567
4634
  id: t,
4568
4635
  kind: "subflow"
@@ -4580,7 +4647,7 @@ var ui = class {
4580
4647
  try {
4581
4648
  i = await this.#e.renameFlow(e, r), i != null && this.#o.include(i);
4582
4649
  } catch (e) {
4583
- this.#_ || this.#c(L(e, this.#r.t));
4650
+ this.#_ || this.#c(O(e, this.#r.t));
4584
4651
  }
4585
4652
  return this.#V({ busy: void 0 }), i != null && (this.#c({
4586
4653
  kind: "success",
@@ -4593,28 +4660,28 @@ var ui = class {
4593
4660
  if (r == null || i == null) return;
4594
4661
  let a = this.#i();
4595
4662
  if (e.kind == "comment") return await this.#T(i, a, t);
4596
- let o = F(r), s = Ke(e, o, i, this.#r.t);
4663
+ let o = P(r), s = Ze(e, o, i, this.#r.t);
4597
4664
  if (s == null) return;
4598
4665
  if (s.kind == "provider-trigger" && s.connectionId == null && s.definition.key != "feishu_app_bot.on_event") {
4599
4666
  try {
4600
- let e = await k(this.catalogs.connections.get(s.definition.provider, r.flowId));
4667
+ let e = await A(this.catalogs.connections.get(s.definition.provider, r.flowId));
4601
4668
  s = {
4602
4669
  ...s,
4603
- connectionId: kr(e).preferred?.connectionId
4670
+ connectionId: $(e).preferred?.connectionId
4604
4671
  };
4605
4672
  } catch (e) {
4606
- !this.#_ && this.#l.value.draft == r && this.#c(L(e, this.#r.t));
4673
+ !this.#_ && this.#l.value.draft == r && this.#c(O(e, this.#r.t));
4607
4674
  }
4608
4675
  if (this.#_ || this.#l.value.draft != r || this.#l.value.target != i) return;
4609
4676
  }
4610
- let c = n?.(a), l = ze(o, i, a, s, this.#i);
4677
+ let c = n?.(a), l = Ge(o, i, a, s, this.#i);
4611
4678
  if (l == null) return;
4612
- let u = c == null ? l : [...l, ...qt(V(r, l).content, i, {
4679
+ let u = c == null ? l : [...l, ...Zt(z(r, l).content, i, {
4613
4680
  source: c.source,
4614
4681
  target: c.target,
4615
4682
  ...c.sourceHandle.startsWith("$branch:") ? { sourceHandle: c.sourceHandle.slice(8) } : {}
4616
4683
  })];
4617
- if (await this.#N("add", 1, u, (e) => cn(e, i, { [a]: t }), [a]) && !this.#_) return this.#V({ nodeFocus: {
4684
+ if (await this.#N("add", 1, u, (e) => un(e, i, { [a]: t }), [a]) && !this.#_) return this.#V({ nodeFocus: {
4618
4685
  nodeId: a,
4619
4686
  requestId: ++this.#b
4620
4687
  } }), a;
@@ -4622,7 +4689,7 @@ var ui = class {
4622
4689
  async connect(e) {
4623
4690
  let t = this.$.revision.value, n = this.#l.value.target;
4624
4691
  if (t == null || n == null) return;
4625
- let r = qt(t.revision.content, n, {
4692
+ let r = Zt(t.revision.content, n, {
4626
4693
  source: e.source,
4627
4694
  target: e.target,
4628
4695
  ...e.sourceHandle.startsWith("$branch:") ? { sourceHandle: e.sourceHandle.slice(8) } : {}
@@ -4632,7 +4699,7 @@ var ui = class {
4632
4699
  async disconnect(e) {
4633
4700
  let t = this.$.revision.value, n = this.#l.value.target;
4634
4701
  if (t == null || n == null) return;
4635
- let r = Jt(t.revision.content, n, {
4702
+ let r = Qt(t.revision.content, n, {
4636
4703
  source: e.source,
4637
4704
  target: e.target,
4638
4705
  ...e.sourceHandle.startsWith("$branch:") ? { sourceHandle: e.sourceHandle.slice(8) } : {}
@@ -4643,10 +4710,10 @@ var ui = class {
4643
4710
  if (!await this.saveModuleEditor()) return;
4644
4711
  let e = this.$.revision.value, t = this.#l.value.target;
4645
4712
  if (e == null || t == null || this.#l.value.selectedNodeIds.length == 0) return;
4646
- let n = [...this.#l.value.selectedNodeIds], r = fn(this.#l.value.presentation?.value ?? {}, t), i = new Set(this.#l.value.selectedNodeIds.filter((e) => r.has(e))), a = pe(e, t, this.#l.value.selectedNodeIds);
4713
+ let n = [...this.#l.value.selectedNodeIds], r = mn(this.#l.value.presentation?.value ?? {}, t), i = new Set(this.#l.value.selectedNodeIds.filter((e) => r.has(e))), a = xe(e, t, this.#l.value.selectedNodeIds);
4647
4714
  await this.#N("delete", this.#l.value.selectedNodeIds.length, a, (e) => {
4648
- let r = i.size == 0 ? e : dn(e, t, i);
4649
- for (let e of n) r = ln(r, t, e, !1);
4715
+ let r = i.size == 0 ? e : pn(e, t, i);
4716
+ for (let e of n) r = dn(r, t, e, !1);
4650
4717
  return r;
4651
4718
  }, []);
4652
4719
  }
@@ -4687,9 +4754,9 @@ var ui = class {
4687
4754
  }];
4688
4755
  }));
4689
4756
  await this.#N("paste", c.size, a.changes, (e) => {
4690
- let n = cn(e, r, f);
4691
- for (let [e, t] of a.sourceIds.entries()) i.has(t) && (n = ln(n, r, a.nodeIds[e], !0));
4692
- for (let e of o) i.has(e.sourceId) && (n = ln(n, r, e.nodeId, !0)), n = un(n, r, e.nodeId, {
4757
+ let n = un(e, r, f);
4758
+ for (let [e, t] of a.sourceIds.entries()) i.has(t) && (n = dn(n, r, a.nodeIds[e], !0));
4759
+ for (let e of o) i.has(e.sourceId) && (n = dn(n, r, e.nodeId, !0)), n = fn(n, r, e.nodeId, {
4693
4760
  content: e.content,
4694
4761
  position: {
4695
4762
  x: e.position.x + t.x * d,
@@ -4706,36 +4773,36 @@ var ui = class {
4706
4773
  async saveNodeSettings(e, t) {
4707
4774
  let n = this.$.revision.value, r = this.#l.value.target;
4708
4775
  if (n == null || r == null) return !1;
4709
- let i = Fe(n, r, e, t);
4776
+ let i = Ve(n, r, e, t);
4710
4777
  return i != null && await this.#E(i) != null;
4711
4778
  }
4712
4779
  async saveNodeDescription(e, t) {
4713
4780
  let n = this.$.revision.value, r = this.#l.value.target;
4714
4781
  if (n == null || r == null) return !1;
4715
- let i = He(n, r, e, t);
4782
+ let i = Je(n, r, e, t);
4716
4783
  return i != null && await this.#E(i) != null;
4717
4784
  }
4718
4785
  async saveNodeIcon(e, t) {
4719
4786
  let n = this.$.revision.value, r = this.#l.value.target;
4720
4787
  if (n == null || r == null) return !1;
4721
- let i = be(n, r, e, t);
4788
+ let i = Te(n, r, e, t);
4722
4789
  return i != null && await this.#E(i) != null;
4723
4790
  }
4724
4791
  async saveNodeTitle(e, t) {
4725
4792
  let n = this.$.revision.value, r = this.#l.value.target;
4726
4793
  if (n == null || r == null) return !1;
4727
- let i = Ce(n, r, e, t);
4794
+ let i = De(n, r, e, t);
4728
4795
  return i != null && await this.#E(i) != null;
4729
4796
  }
4730
4797
  async setInputValue(e, t, n, r) {
4731
4798
  let i = this.$.revision.value, a = this.#l.value.target;
4732
4799
  if (i == null || a == null) return !1;
4733
- let o = Le(i, a, e, t, n);
4800
+ let o = We(i, a, e, t, n);
4734
4801
  return o != null && await this.#E(o, r) != null;
4735
4802
  }
4736
4803
  async resetInputs(e, t) {
4737
4804
  let n = this.$.revision.value, r = this.#l.value.target;
4738
- return n == null || r == null ? !1 : await this.#E(Oe(n.revision.content, r, e, t)) != null;
4805
+ return n == null || r == null ? !1 : await this.#E(ge(n.revision.content, r, e, t)) != null;
4739
4806
  }
4740
4807
  async resetTriggerConfig(e, t) {
4741
4808
  let n = this.$.revision.value, r = this.#l.value.target;
@@ -4753,7 +4820,7 @@ var ui = class {
4753
4820
  }
4754
4821
  async setInputSource(e, t, n) {
4755
4822
  let r = this.$.revision.value, i = this.#l.value.target;
4756
- return r == null || i == null ? !1 : await this.#E(Re(r.revision.content, i, e, t, [{
4823
+ return r == null || i == null ? !1 : await this.#E(ve(r.revision.content, i, e, t, [{
4757
4824
  kind: "node",
4758
4825
  ...n
4759
4826
  }])) != null;
@@ -4761,36 +4828,36 @@ var ui = class {
4761
4828
  async setInputVariable(e, t, n) {
4762
4829
  let r = this.$.revision.value, i = this.#l.value.target;
4763
4830
  if (r == null || i == null) return !1;
4764
- let a = n == null ? Le(r, i, e, t, void 0) : _e(r, i, e, t, n, this.#i());
4831
+ let a = n == null ? We(r, i, e, t, void 0) : we(r, i, e, t, n, this.#i());
4765
4832
  return a != null && await this.#E(a) != null;
4766
4833
  }
4767
4834
  async saveCondition(e, t, n) {
4768
4835
  let r = this.$.revision.value, i = this.#l.value.target;
4769
4836
  if (r == null || i == null) return !1;
4770
- let a = Ae(r, i, e, t);
4837
+ let a = Pe(r, i, e, t);
4771
4838
  return a != null && await this.#E(a, n) != null;
4772
4839
  }
4773
4840
  async saveValue(e, t, n) {
4774
4841
  let r = this.$.revision.value, i = this.#l.value.target;
4775
4842
  if (r == null || i == null) return !1;
4776
- let a = qe(r, i, e, t);
4843
+ let a = Qe(r, i, e, t);
4777
4844
  return a != null && await this.#E(a, n) != null;
4778
4845
  }
4779
4846
  async saveResolution(e, t, n, r) {
4780
4847
  let i = this.$.revision.value, a = this.#l.value.target;
4781
4848
  if (i == null || a?.kind != "flow") return !1;
4782
- let o = je(i, a, e, t, r);
4849
+ let o = Ie(i, a, e, t, r);
4783
4850
  return o != null && await this.#E(o, n) != null;
4784
4851
  }
4785
4852
  async saveNodeContentHidden(e, t) {
4786
4853
  let n = this.#l.value.target, r = this.#R().nodes.find((t) => t.id == e);
4787
- n != null && r != null && r.kind != "condition" && await this.#N("edit", 1, [], (r) => ln(r, n, e, t));
4854
+ n != null && r != null && r.kind != "condition" && await this.#N("edit", 1, [], (r) => dn(r, n, e, t));
4788
4855
  }
4789
4856
  async saveComment(e, t) {
4790
4857
  let n = this.#l.value.target;
4791
4858
  if (n == null) return;
4792
4859
  let r = this.#R().nodes.find((t) => t.id == e)?.position;
4793
- r != null && await this.#N("edit", 1, [], (i) => un(i, n, e, {
4860
+ r != null && await this.#N("edit", 1, [], (i) => fn(i, n, e, {
4794
4861
  ...t,
4795
4862
  position: r
4796
4863
  }));
@@ -4798,31 +4865,25 @@ var ui = class {
4798
4865
  async saveTaskSettings(e, t) {
4799
4866
  let n = this.$.revision.value, r = this.#l.value.target;
4800
4867
  if (n == null || r == null) return !1;
4801
- let i = we(n, r, e, t);
4868
+ let i = Oe(n, r, e, t);
4802
4869
  return i != null && await this.#E(i) != null;
4803
4870
  }
4804
- async saveCodeActions(e, t) {
4805
- let n = this.$.revision.value, r = this.#l.value.target;
4806
- if (n == null || r == null) return !1;
4807
- let i = he(n.revision.content, r, e, t);
4808
- return i == null || await this.#E(i) != null;
4809
- }
4810
4871
  async saveTaskPorts(e, t, n, r) {
4811
4872
  let i = this.$.revision.value, a = this.#l.value.target;
4812
4873
  if (i == null || a == null) return !1;
4813
- let o = We(i, a, e, t, r);
4874
+ let o = Ye(i, a, e, t, r);
4814
4875
  return o != null && await this.#E(o, n) != null;
4815
4876
  }
4816
4877
  async saveTaskAdditionalInputs(e, t, n, r) {
4817
4878
  let i = this.$.revision.value, a = this.#l.value.target;
4818
4879
  if (i == null || a == null) return !1;
4819
- let o = fe(i, a, e, t, r);
4880
+ let o = be(i, a, e, t, r);
4820
4881
  return o != null && await this.#E(o, n) != null;
4821
4882
  }
4822
4883
  async setConnectorConnection(e, t) {
4823
4884
  let n = this.$.revision.value;
4824
4885
  if (n == null) return !1;
4825
- let r = Pe(n.revision.content, e, t);
4886
+ let r = me(n.revision.content, e, t);
4826
4887
  return r != null && await this.#E(r) != null;
4827
4888
  }
4828
4889
  get eventSourceClient() {
@@ -4838,15 +4899,15 @@ var ui = class {
4838
4899
  if (n == null || r?.kind != "flow") return !1;
4839
4900
  let i = n.graph(r)?.nodes[e];
4840
4901
  if (i?.kind != "integration" || i.definition.key != "feishu_app_bot.on_event" || t.provider != i.definition.provider) return !1;
4841
- let a = ye(n.revision.content, r, e, t.connectionId);
4902
+ let a = N(n.revision.content, r, e, t.connectionId);
4842
4903
  if (a == null) return !1;
4843
- let o = Be(i.config.sourceId, void 0) != t.sourceId;
4904
+ let o = Ue(i.config.sourceId, void 0) != t.sourceId;
4844
4905
  return await this.#E([
4845
4906
  ...a,
4846
- ...z(n.revision.content, r, e, "sourceId", t.sourceId) ?? [],
4847
- ...o ? z(n.revision.content, r, e, "eventTypes", []) ?? [] : [],
4848
- ...o ? z(n.revision.content, r, e, "resource", void 0) ?? [] : [],
4849
- ...o ? z(n.revision.content, r, e, "chatIds", void 0) ?? [] : []
4907
+ ...C(n.revision.content, r, e, "sourceId", t.sourceId) ?? [],
4908
+ ...o ? C(n.revision.content, r, e, "eventTypes", []) ?? [] : [],
4909
+ ...o ? C(n.revision.content, r, e, "resource", void 0) ?? [] : [],
4910
+ ...o ? C(n.revision.content, r, e, "chatIds", void 0) ?? [] : []
4850
4911
  ]) != null;
4851
4912
  }
4852
4913
  async loadTriggerConfigOptions(e, t, n) {
@@ -4857,41 +4918,41 @@ var ui = class {
4857
4918
  async saveTriggerConfig(e, t, n) {
4858
4919
  let r = this.$.revision.value, i = this.#l.value.target;
4859
4920
  if (r == null || i?.kind != "flow") return !1;
4860
- let a = z(r.revision.content, i, e, t, n);
4921
+ let a = C(r.revision.content, i, e, t, n);
4861
4922
  if (a == null) return !1;
4862
4923
  let o = r.graph(i)?.nodes[e];
4863
4924
  if (a.length > 0 && o?.kind == "integration" && o.definition.key == "feishu_app_bot.on_event" && t == "eventTypes") {
4864
4925
  let t = Array.isArray(n) ? n.filter((e) => typeof e == "string") : [];
4865
- N(t) || (a = [...a, ...z(r.revision.content, i, e, "chatIds", void 0) ?? []]);
4866
- let s = Be(o.config.resource, void 0);
4867
- te(s) && s.kind != Ge(t) && (a = [...a, ...z(r.revision.content, i, e, "resource", void 0) ?? []]);
4926
+ ue(t) || (a = [...a, ...C(r.revision.content, i, e, "chatIds", void 0) ?? []]);
4927
+ let s = Ue(o.config.resource, void 0);
4928
+ ye(s) && s.kind != Xe(t) && (a = [...a, ...C(r.revision.content, i, e, "resource", void 0) ?? []]);
4868
4929
  }
4869
- return a.length > 0 && o?.kind == "poll" && o.definition.key == "linear.on_issue_changed" && t == "teamId" ? await this.#E([...a, ...z(r.revision.content, i, e, "stateIds", void 0) ?? []]) != null : await this.#E(a) != null;
4930
+ return a.length > 0 && o?.kind == "poll" && o.definition.key == "linear.on_issue_changed" && t == "teamId" ? await this.#E([...a, ...C(r.revision.content, i, e, "stateIds", void 0) ?? []]) != null : await this.#E(a) != null;
4870
4931
  }
4871
4932
  async saveTriggerSchedule(e, t) {
4872
4933
  let n = this.$.revision.value, r = this.#l.value.target;
4873
4934
  if (n == null || r?.kind != "flow") return !1;
4874
- let i = Ue(n.revision.content, r, e, t);
4935
+ let i = Ee(n.revision.content, r, e, t);
4875
4936
  return i != null && await this.#E(i) != null;
4876
4937
  }
4877
4938
  async saveWebhook(e, t, n) {
4878
4939
  let r = this.$.revision.value, i = this.#l.value.target;
4879
4940
  if (r == null || i?.kind != "flow") return !1;
4880
- let a = ge(r, i, e, t);
4941
+ let a = Ce(r, i, e, t);
4881
4942
  return a != null && await this.#E(a, n) != null;
4882
4943
  }
4883
4944
  async setTriggerConnection(e, t) {
4884
4945
  let n = this.$.revision.value, r = this.#l.value.target;
4885
4946
  if (n == null || r?.kind != "flow") return !1;
4886
- let i = ye(n.revision.content, r, e, t);
4947
+ let i = N(n.revision.content, r, e, t);
4887
4948
  if (i == null) return !1;
4888
4949
  let a = n.graph(r)?.nodes[e];
4889
- return i.length > 0 && a?.kind == "poll" && a.definition.key == "linear.on_issue_changed" ? await this.#E([...i, ...["teamId", "stateIds"].flatMap((t) => z(n.revision.content, r, e, t, void 0) ?? [])]) != null : await this.#E(i) != null;
4950
+ return i.length > 0 && a?.kind == "poll" && a.definition.key == "linear.on_issue_changed" ? await this.#E([...i, ...["teamId", "stateIds"].flatMap((t) => C(n.revision.content, r, e, t, void 0) ?? [])]) != null : await this.#E(i) != null;
4890
4951
  }
4891
4952
  async saveSubflowSettings(e, t) {
4892
4953
  let n = this.$.revision.value;
4893
4954
  if (n == null) return !1;
4894
- let r = Te(n, e, t);
4955
+ let r = ke(n, e, t);
4895
4956
  return r != null && await this.#E(r) != null;
4896
4957
  }
4897
4958
  updateModuleSource(e) {
@@ -4913,11 +4974,11 @@ var ui = class {
4913
4974
  }
4914
4975
  async moveNodes(e) {
4915
4976
  let t = this.#l.value.target;
4916
- t != null && await this.#N("move", Object.keys(e).length, [], (n) => cn(n, t, e));
4977
+ t != null && await this.#N("move", Object.keys(e).length, [], (n) => un(n, t, e));
4917
4978
  }
4918
4979
  async moveViewport(e) {
4919
4980
  let t = this.#l.value.target;
4920
- t != null && await this.#j((n) => pn(n, t, e), !0);
4981
+ t != null && await this.#j((n) => hn(n, t, e), !0);
4921
4982
  }
4922
4983
  async check() {
4923
4984
  await this.#F();
@@ -4930,7 +4991,7 @@ var ui = class {
4930
4991
  }
4931
4992
  locateNode(e, { preserveSelection: t = !1 } = {}) {
4932
4993
  let n = this.$.revision.value, r = this.#l.value.target;
4933
- return n == null || r == null || n.node(r, e) == null && !fn(this.#l.value.presentation?.value ?? {}, r).has(e) || !t && !this.selectNodes([e]) ? !1 : (this.#V({ nodeFocus: {
4994
+ return n == null || r == null || n.node(r, e) == null && !mn(this.#l.value.presentation?.value ?? {}, r).has(e) || !t && !this.selectNodes([e]) ? !1 : (this.#V({ nodeFocus: {
4934
4995
  nodeId: e,
4935
4996
  requestId: ++this.#b
4936
4997
  } }), !0);
@@ -4948,7 +5009,7 @@ var ui = class {
4948
5009
  let t = /#(\d+)$/.exec(e.title);
4949
5010
  return t == null ? [] : [Number(t[1])];
4950
5011
  }));
4951
- if (!(!await this.#N("add", 1, [], (i) => un(i, e, t, {
5012
+ if (!(!await this.#N("add", 1, [], (i) => fn(i, e, t, {
4952
5013
  content: "",
4953
5014
  position: n,
4954
5015
  title: this.#r.t("addNode.commentName", { number: r + 1 })
@@ -4973,7 +5034,7 @@ var ui = class {
4973
5034
  if (this.#_ || (this.#d.applying || this.#d.failed) && !n) return;
4974
5035
  let r = this.#l.value.flowId, i = this.#l.value.draft;
4975
5036
  if (r == null || i == null) return;
4976
- if (e.length == 0 || u(V(i, e).content, i.content)) return i;
5037
+ if (e.length == 0 || u(z(i, e).content, i.content)) return i;
4977
5038
  let a = !n && this.#d.clear(), o = this.#n.capture();
4978
5039
  this.#d.pending++, this.#d.publish();
4979
5040
  try {
@@ -4995,7 +5056,7 @@ var ui = class {
4995
5056
  for (let t = 0; t < 2 && e(); t += 1) {
4996
5057
  let t = this.#l.value.draft;
4997
5058
  if (t == null) return;
4998
- let n = Ie(t.content);
5059
+ let n = ne(t.content);
4999
5060
  if (n.length == 0) {
5000
5061
  this.#F();
5001
5062
  return;
@@ -5042,8 +5103,8 @@ var ui = class {
5042
5103
  if (this.#_ || this.#d.applying || this.#d.failed) return !1;
5043
5104
  let { draft: o, target: s, presentation: c, selectedNodeIds: l } = this.#l.value;
5044
5105
  if (o == null || s == null || c == null) return !1;
5045
- let d = r?.(c.value) ?? c.value, f = mn(c.value, d, s);
5046
- if (u(V(o, n).content, o.content) && f.nodeIds.length == 0) return !0;
5106
+ let d = r?.(c.value) ?? c.value, f = gn(c.value, d, s);
5107
+ if (u(z(o, n).content, o.content) && f.nodeIds.length == 0) return !0;
5047
5108
  let p = this.#d.generation, m = Gr(o.content, n);
5048
5109
  this.#d.pending++;
5049
5110
  let h = {
@@ -5065,7 +5126,7 @@ var ui = class {
5065
5126
  let [s, c] = await Promise.all([e, t]), l = s != null && c && (!g || p == this.#d.generation);
5066
5127
  return l && g && a != null && this.history$.value.undo === h && this.#D(a, h), l;
5067
5128
  } catch (e) {
5068
- return this.#c(L(e, this.#r.t)), this.retryHistorySync(), !1;
5129
+ return this.#c(O(e, this.#r.t)), this.retryHistorySync(), !1;
5069
5130
  } finally {
5070
5131
  this.#d.pending--, this.#_ || this.#d.publish();
5071
5132
  }
@@ -5084,10 +5145,10 @@ var ui = class {
5084
5145
  let r = this.#d.generation;
5085
5146
  this.#d.applying = !0, this.#d.publish();
5086
5147
  try {
5087
- let [t, i] = await Promise.all([this.#O(e ? n.forward : n.inverse, !0, !0), this.#j((t) => hn(t, n.target, n.presentation, e), !0)]);
5148
+ let [t, i] = await Promise.all([this.#O(e ? n.forward : n.inverse, !0, !0), this.#j((t) => _n(t, n.target, n.presentation, e), !0)]);
5088
5149
  t != null && i && r == this.#d.generation && (this.selectNodes(e ? n.afterSelection : n.beforeSelection), this.#d.complete(e));
5089
5150
  } catch (e) {
5090
- this.#c(L(e, this.#r.t)), this.retryHistorySync();
5151
+ this.#c(O(e, this.#r.t)), this.retryHistorySync();
5091
5152
  } finally {
5092
5153
  this.#d.applying = !1, this.#_ || this.#d.publish();
5093
5154
  }
@@ -5144,7 +5205,7 @@ var ui = class {
5144
5205
  });
5145
5206
  }
5146
5207
  } catch (n) {
5147
- !this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#c(L(n, this.#r.t));
5208
+ !this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#c(O(n, this.#r.t));
5148
5209
  } finally {
5149
5210
  !this.#_ && e == this.#l.value.flowId && t.revisionId == this.#l.value.draft?.revisionId && this.#V({ checkLoading: !1 });
5150
5211
  }
@@ -5185,15 +5246,15 @@ var ui = class {
5185
5246
  message: this.#r.t(o ? "notice.moduleUpdated" : "notice.draftUpdated")
5186
5247
  }), this.#F(), !0;
5187
5248
  } catch (n) {
5188
- return t && this.#B(e) && this.#c(L(n, this.#r.t)), !1;
5249
+ return t && this.#B(e) && this.#c(O(n, this.#r.t)), !1;
5189
5250
  }
5190
5251
  }
5191
5252
  #R() {
5192
5253
  let e = this.#l.value;
5193
- return tr(e.draft, e.target, e.presentation?.value, e.diagnostics?.diagnostics, {}, {}, this.#r.t);
5254
+ return ir(e.draft, e.target, e.presentation?.value, e.diagnostics?.diagnostics, {}, {}, this.#r.t);
5194
5255
  }
5195
5256
  #z(e) {
5196
- let t = F(e), n = li(t, this.#l.value.target);
5257
+ let t = P(e), n = li(t, this.#l.value.target);
5197
5258
  return {
5198
5259
  revision: t,
5199
5260
  selectedNodeIds: this.#l.value.selectedNodeIds.filter((e) => n != null && t.selection(n, e) != null),
@@ -5218,7 +5279,7 @@ function di(e) {
5218
5279
  return new Map(e.nodes.map((e) => [e.id, e]));
5219
5280
  }
5220
5281
  function fi(e, t) {
5221
- return e == null || t == null ? [] : F(e).designerInputs(t);
5282
+ return e == null || t == null ? [] : P(e).designerInputs(t);
5222
5283
  }
5223
5284
  function pi(e, t, n, r, i) {
5224
5285
  if (e == null || t?.kind != "flow" || n?.revisionId != e.revisionId || n.flowId != e.flowId) return /* @__PURE__ */ new Map();
@@ -5246,21 +5307,22 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5246
5307
  #d;
5247
5308
  #f;
5248
5309
  #p;
5249
- constructor(r, i, a = C, o = h(), s = mi, c = !0) {
5250
- this.#t = new I(), this.#r = n(), this.#a = n([]), this.#o = n(!1), this.#s = n(!1), this.#c = !0, this.#u = !1, this.#d = !1, this.#p = Promise.resolve(), this.retryCatalog = () => {
5310
+ #m;
5311
+ constructor(r, i, a = F, o = h(), s = mi, c = !0) {
5312
+ this.#t = new D(), this.#r = n(), this.#a = n([]), this.#o = n(!1), this.#s = n(!1), this.#c = !0, this.#u = n([]), this.#d = !1, this.#f = !1, this.#m = Promise.resolve(), this.retryCatalog = () => {
5251
5313
  this.connectors.retryCatalog(), this.triggers.catalog.retry();
5252
5314
  }, this.provideAddNodeOptions = (e, t, n = t) => T(t, [this.triggers.provideAddNodeOptions(e, t), this.connectors.provideAddNodeOptions(e, t, n)]), this.browseAddNodeOptions = (e) => T(e, [this.triggers.browseAddNodeOptions(e), this.connectors.browseAddNodeOptions(e)]), this.provideAddNodeOptionChoices = (e, t) => this.connectors.provideAddNodeOptionChoices(e, t), this.preferences = i, this.#e = r, this.results = r, this.#n = o, this.#i = c;
5253
5315
  let l = (e) => {
5254
- this.#u || this.#r.set(e);
5316
+ this.#d || this.#r.set(e);
5255
5317
  };
5256
- this.connectorAccess = new Dr(r, l, o, (e) => this.workspace.catalogs.refreshFlow(e)), this.runs = new re(r, l, o), this.workspace = new ui(r, l, Qt, o, (e) => {
5257
- e.kind == "run.created" ? this.#g(r, e) : this.runs.changed(e.runId);
5258
- }, new Tr(r, s.connectorCache), (e) => void this.#m(e), (e) => {
5318
+ this.connectorAccess = new kr(r, l, o, (e) => this.workspace.catalogs.refreshFlow(e)), this.runs = new ce(r, l, o), this.workspace = new ui(r, l, nn, o, (e) => {
5319
+ e.kind == "run.created" ? this.#_(r, e) : this.runs.changed(e.runId);
5320
+ }, new Dr(r, s.connectorCache), (e) => void this.#h(e), (e) => {
5259
5321
  this.connectorAccess.changed(e), this.workspace.catalogs.refreshFlow(e);
5260
- }), this.#f = this.workspace.$.flowId.reaction((e) => {
5261
- this.#p = this.connectorAccess.load(e);
5262
- }), this.connectors = new Lr(r, this.workspace, l, s, o), this.triggers = new Wr(r, this.workspace, l, s, o), this.publications = new Sn(r, this.workspace, l, i, a, o), this.runRequests = new Mn(r, this.runs, l, async (e) => {
5263
- if (!(e != this.workspace.$.flowId.value || !await this.workspace.saveModuleEditor() || this.#u || e != this.workspace.$.flowId.value)) return this.workspace.$.draft.value?.revisionId;
5322
+ }), this.#p = this.workspace.$.flowId.reaction((e) => {
5323
+ this.#m = this.connectorAccess.load(e);
5324
+ }), this.connectors = new Lr(r, this.workspace, l, s, o), this.triggers = new Wr(r, this.workspace, l, s, o), this.publications = new Tn(r, this.workspace, l, i, a, o), this.runRequests = new Fn(r, this.runs, l, async (e) => {
5325
+ if (!(e != this.workspace.$.flowId.value || !await this.workspace.saveModuleEditor() || this.#d || e != this.workspace.$.flowId.value)) return this.workspace.$.draft.value?.revisionId;
5264
5326
  }, o, a);
5265
5327
  let u = t((e) => {
5266
5328
  let t = e(this.workspace.$.diagnostics);
@@ -5276,7 +5338,7 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5276
5338
  f != t?.flowId && (d.clear(), f = t?.flowId);
5277
5339
  let n = e(this.workspace.$.target), r = e(this.workspace.$.presentation)?.value, i = e(u)?.diagnostics ?? e(this.connectors.$.diagnostics), a = t == null ? void 0 : e(R(this.workspace.catalogs.providers.get(t.flowId, o.lang))), s = Object.fromEntries((a ?? []).map((e) => [e.serviceId, e])), c = e(this.connectors.$.actions), l = e(this.connectors.$.catalogs), p = e(o.t$), m = e(this.runs.$.run), h = e(this.runs.$.events), g = n == null ? "" : n.kind == "flow" ? "flow" : `subflow:${n.id}`, _ = [
5278
5340
  ...fi(t, n),
5279
- r == null || n == null ? void 0 : Z(r, n),
5341
+ r == null || n == null ? void 0 : J(r, n),
5280
5342
  i,
5281
5343
  c,
5282
5344
  a,
@@ -5287,13 +5349,19 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5287
5349
  ...m == null ? [] : [t?.revisionId]
5288
5350
  ], v = d.get(g);
5289
5351
  if (v != null && v.inputs.length == _.length && v.inputs.every((e, t) => e === _[t])) return v.graph;
5290
- let y = tr(t, n, r, i, c, l, p, m, h, s);
5352
+ let y = ir(t, n, r, i, c, l, p, m, h, s);
5291
5353
  return d.set(g, {
5292
5354
  graph: y,
5293
5355
  inputs: _
5294
5356
  }), y;
5295
5357
  }), m = e(p, di);
5296
5358
  this.$ = {
5359
+ connectorSetupPending: t((e) => {
5360
+ let t = e(this.workspace.$.flowId), n = e(this.workspace.$.target), r = e(this.workspace.$.selection);
5361
+ if (r?.kind != "task" || r.definition == null || !("executor" in r.definition) || r.definition.executor.kind != "connector") return !1;
5362
+ let i = r.definition.executor.action;
5363
+ return e(this.#u).some((e) => e.flowId == t && K(e.target, n) && e.actionId == i && (e.nodeId == null || e.nodeId == r.id));
5364
+ }),
5297
5365
  busy: t((e) => {
5298
5366
  let t = e(this.workspace.$.busy);
5299
5367
  if (t != null) return t;
@@ -5303,11 +5371,11 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5303
5371
  if (e(this.publications.$.rollingBackPublicationId) != null) return "rollback";
5304
5372
  if (e(this.publications.$.changingTriggerId) != null) return "trigger";
5305
5373
  }),
5306
- diagnosticItems: t((e) => de(e(this.workspace.$.revision), e(this.workspace.$.target), e(u))),
5374
+ diagnosticItems: t((e) => pe(e(this.workspace.$.revision), e(this.workspace.$.target), e(u))),
5307
5375
  diagnostics: u,
5308
5376
  designer: p,
5309
5377
  designerNodeById: m,
5310
- sourceNodeIcons: e(p, (e) => Object.fromEntries(e.nodes.flatMap((e) => "icon" in e ? [[e.id, e.icon]] : [])), { equal: Ut }),
5378
+ sourceNodeIcons: e(p, (e) => Object.fromEntries(e.nodes.flatMap((e) => "icon" in e ? [[e.id, e.icon]] : [])), { equal: K }),
5311
5379
  notice: this.#r,
5312
5380
  runEventNodes: t((e) => pi(e(this.workspace.$.draft), e(this.workspace.$.target), e(this.runs.$.run), e(this.runs.$.events), e(m))),
5313
5381
  selectedDesignerNode: t((e) => {
@@ -5320,57 +5388,57 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5320
5388
  };
5321
5389
  }
5322
5390
  dispose() {
5323
- this.#u = !0, this.#f(), this.#t.invalidate();
5391
+ this.#d = !0, this.#p(), this.#t.invalidate();
5324
5392
  for (let e of Object.values(this.$)) e.dispose();
5325
5393
  this.connectors.dispose(), this.connectorAccess.dispose(), this.publications.dispose(), this.runRequests.dispose(), this.runs.dispose(), this.triggers.dispose(), this.workspace.dispose(), this.#a.dispose(), this.#o.dispose(), this.#s.dispose();
5326
5394
  }
5327
5395
  async start(e) {
5328
- this.#t.invalidate(), this.connectors.reset(), this.triggers.reset(), this.publications.reset(), this.runRequests.reset(), this.runs.reset(), await this.workspace.start(e), await this.#p;
5396
+ this.#t.invalidate(), this.connectors.reset(), this.triggers.reset(), this.publications.reset(), this.runRequests.reset(), this.runs.reset(), await this.workspace.start(e), await this.#m;
5329
5397
  }
5330
5398
  async retryFlows() {
5331
5399
  await this.workspace.reloadFlows();
5332
5400
  }
5333
5401
  dismissNotice() {
5334
- this.#u || this.#r.set(void 0);
5402
+ this.#d || this.#r.set(void 0);
5335
5403
  }
5336
5404
  invalidateVariableNames() {
5337
5405
  this.#c = !0;
5338
5406
  }
5339
5407
  async refreshVariableNames() {
5340
- if (!(this.#u || !this.#i)) {
5408
+ if (!(this.#d || !this.#i)) {
5341
5409
  if (this.#l != null) return this.#l;
5342
5410
  if (this.#c) return this.#c = !1, this.#s.set(!0), this.#l = (async () => {
5343
5411
  try {
5344
5412
  let { variables: e } = await this.#e.listVariables();
5345
- if (this.#u) return;
5413
+ if (this.#d) return;
5346
5414
  this.#a.set(e.map((e) => e.name)), this.#o.set(!0);
5347
5415
  } catch (e) {
5348
- this.#c = !0, this.#u || this.#r.set(L(e, this.#n.t));
5416
+ this.#c = !0, this.#d || this.#r.set(O(e, this.#n.t));
5349
5417
  } finally {
5350
- this.#l = void 0, this.#u || this.#s.set(!1);
5418
+ this.#l = void 0, this.#d || this.#s.set(!1);
5351
5419
  }
5352
5420
  })(), this.#l;
5353
5421
  }
5354
5422
  }
5355
5423
  async selectFlow(e) {
5356
- if (this.#u) return !1;
5424
+ if (this.#d) return !1;
5357
5425
  this.#t.invalidate();
5358
5426
  let t = this.workspace.$.flowId.value, n = this.#r.value;
5359
- return !await this.workspace.selectFlow(e) || this.#u ? !1 : (e != t && this.#r.value === n && this.#r.set(void 0), this.connectors.reset(), this.triggers.reset(), this.publications.reset(), this.runRequests.reset(), this.runs.reset(), await this.#p, !0);
5427
+ return !await this.workspace.selectFlow(e) || this.#d ? !1 : (e != t && this.#r.value === n && this.#r.set(void 0), this.connectors.reset(), this.triggers.reset(), this.publications.reset(), this.runRequests.reset(), this.runs.reset(), await this.#m, !0);
5360
5428
  }
5361
- async #m(e) {
5362
- if (!(this.#u || this.#d || this.workspace.$.flowId.value != null)) {
5363
- this.#d = !0;
5429
+ async #h(e) {
5430
+ if (!(this.#d || this.#f || this.workspace.$.flowId.value != null)) {
5431
+ this.#f = !0;
5364
5432
  try {
5365
5433
  await this.selectFlow(e);
5366
5434
  } finally {
5367
- this.#d = !1;
5435
+ this.#f = !1;
5368
5436
  }
5369
5437
  }
5370
5438
  }
5371
5439
  async createFlow(e, t) {
5372
5440
  let n = await this.workspace.createFlow(e, t);
5373
- return this.#u || n == null ? !1 : (await this.selectFlow(n.flowId), this.#u || this.#r.set({
5441
+ return this.#d || n == null ? !1 : (await this.selectFlow(n.flowId), this.#d || this.#r.set({
5374
5442
  kind: "success",
5375
5443
  message: this.#n.t("notice.created", { name: n.name })
5376
5444
  }), !0);
@@ -5391,12 +5459,13 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5391
5459
  return t == null || !("waits" in t) || !t.waits.some((t) => t.nodeId == e) ? !1 : this.workspace.locateNode(e);
5392
5460
  }
5393
5461
  async addNode(e, t, n) {
5462
+ let r;
5394
5463
  try {
5395
5464
  if (e.kind == "trigger" && "trigger" in e && e.trigger.kind == "connect") {
5396
5465
  await this.triggers.connect(e.trigger.provider);
5397
5466
  return;
5398
5467
  }
5399
- let r = this.workspace.$.flowId.value, i = this.workspace.$.target.value;
5468
+ let i = this.workspace.$.flowId.value, a = this.workspace.$.target.value;
5400
5469
  if (e.kind == "connector") {
5401
5470
  let { defaultConnection: t, ...n } = e.connector;
5402
5471
  e = {
@@ -5404,26 +5473,35 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5404
5473
  connector: n
5405
5474
  };
5406
5475
  }
5407
- let a = await this.workspace.addNode(e, t, n);
5408
- return a != null && e.kind == "connector" && r != null && i != null && this.#h(r, i, a, e.connector), a != null && e.kind == "trigger" && this.triggers.refresh(), a;
5476
+ let o = e.kind == "connector" && i != null && a != null ? {
5477
+ flowId: i,
5478
+ target: a,
5479
+ actionId: e.connector.actionId,
5480
+ nodeId: void 0
5481
+ } : void 0;
5482
+ o != null && (this.#u.set([...this.#u.value, o]), r = () => this.#u.set(this.#u.value.filter((e) => e !== o)));
5483
+ let s = await this.workspace.addNode(e, t, n);
5484
+ return s != null && e.kind == "connector" && o != null && (o.nodeId = s, this.#u.set([...this.#u.value]), this.#g(o.flowId, o.target, s, e.connector).finally(r), r = void 0), s != null && e.kind == "trigger" && this.triggers.refresh(), s;
5409
5485
  } catch (e) {
5410
- this.#u || this.#r.set(L(e, this.#n.t));
5486
+ this.#d || this.#r.set(O(e, this.#n.t));
5411
5487
  return;
5488
+ } finally {
5489
+ r?.();
5412
5490
  }
5413
5491
  }
5414
- async #h(e, t, n, r) {
5492
+ async #g(e, t, n, r) {
5415
5493
  try {
5416
- if (this.#u || e != this.workspace.$.flowId.value) return;
5494
+ if (this.#d || e != this.workspace.$.flowId.value) return;
5417
5495
  let i = await this.prepareConnectorAction(r);
5418
- if (i == null || this.#u || e != this.workspace.$.flowId.value) return;
5496
+ if (i == null || this.#d || e != this.workspace.$.flowId.value) return;
5419
5497
  let a = this.workspace.$.revision.value?.node(t, n);
5420
5498
  if (a?.kind != "task" || a.node.task != null) return;
5421
5499
  let o = this.workspace.$.revision.value?.task(a.node.taskId)?.executor;
5422
5500
  if (o?.kind != "connector" || o.action != r.actionId || o.connectionId != null) return;
5423
5501
  let s = i.action.defaultConnection;
5424
- s != null && await this.workspace.setConnectorConnection(a.node.taskId, s.connectionId), !this.#u && e == this.workspace.$.flowId.value && await this.connectors.refresh();
5502
+ s != null && await this.workspace.setConnectorConnection(a.node.taskId, s.connectionId), !this.#d && e == this.workspace.$.flowId.value && await this.connectors.refresh();
5425
5503
  } catch (t) {
5426
- !this.#u && e == this.workspace.$.flowId.value && this.#r.set(L(t, this.#n.t));
5504
+ !this.#d && e == this.workspace.$.flowId.value && this.#r.set(O(t, this.#n.t));
5427
5505
  }
5428
5506
  }
5429
5507
  async prepareConnectorAction(e) {
@@ -5435,34 +5513,42 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5435
5513
  };
5436
5514
  if (!e.authenticated) {
5437
5515
  let n = await this.connectors.resolveAction(e.actionId);
5438
- return this.#u || t != this.workspace.$.flowId.value ? void 0 : n;
5516
+ return this.#d || t != this.workspace.$.flowId.value ? void 0 : n;
5439
5517
  }
5440
- if (this.connectorAccess.$.value.access ?? await this.connectorAccess.load(t), this.#u || t != this.workspace.$.flowId.value) return;
5518
+ if (this.connectorAccess.$.value.access ?? await this.connectorAccess.load(t), this.#d || t != this.workspace.$.flowId.value) return;
5441
5519
  let a = this.connectorAccess.$.value.access;
5442
5520
  if (a == null) return i;
5443
- let o;
5444
- if (a?.mode == "selectable") {
5445
- if (this.connectorAccess.$.value.candidates[e.serviceId] ?? await this.connectorAccess.loadCandidates(e.serviceId), this.#u || t != this.workspace.$.flowId.value) return;
5446
- let n = this.connectorAccess.$.value.candidates[e.serviceId]?.candidates.filter((t) => t.permissions == null || t.permissions.allActions || t.permissions.actionIds.includes(e.actionId));
5447
- if (n == null) return i;
5448
- let r = new Set(a.bindings.filter((t) => t.providerId == e.serviceId && t.status == "active").map((e) => e.accessBindingId));
5449
- if (n != null && !n.some((e) => r.has(e.accessBindingId))) {
5450
- let r = n.find((e) => e.isDefault) ?? (n.length == 1 ? n[0] : void 0);
5451
- if (r != null) {
5452
- if (!await this.connectorAccess.select(e.serviceId, r.accessBindingId)) return this.#u || t != this.workspace.$.flowId.value ? void 0 : i;
5453
- a = this.connectorAccess.$.value.access;
5454
- }
5521
+ let o = await this.connectors.resolveAction(e.actionId);
5522
+ if (!(this.#d || t != this.workspace.$.flowId.value)) {
5523
+ if (a.mode == "selectable") {
5524
+ if (await this.connectorAccess.loadCandidates([e.serviceId]), this.#d || t != this.workspace.$.flowId.value) return;
5525
+ let n = this.connectorAccess.$.value.candidates[e.serviceId]?.candidates;
5526
+ if (n == null) return i;
5527
+ let r = new Set(n.filter((t) => t.permissions == null || t.permissions.allActions || t.permissions.actionIds.includes(e.actionId)).map((e) => e.connectionId)), a = o.connections.filter((e) => r.has(e.connectionId));
5528
+ return {
5529
+ action: yn(o.action, a),
5530
+ connections: a
5531
+ };
5455
5532
  }
5456
- o = n?.some((e) => a?.bindings.some((t) => t.accessBindingId == e.accessBindingId && t.status == "active"));
5533
+ return o;
5457
5534
  }
5458
- if (this.#u || t != this.workspace.$.flowId.value) return;
5459
- let s = a?.bindings.some((t) => t.providerId == e.serviceId && t.status == "active") ?? !1;
5460
- if (a?.mode != "implicit" && !(o ?? s)) return i;
5461
- this.workspace.catalogs.refreshFlow(t);
5462
- let c = await this.connectors.resolveAction(e.actionId);
5463
- if (!(this.#u || t != this.workspace.$.flowId.value)) {
5464
- if (c.action.serviceId != e.serviceId) throw Error("Connector Action Provider changed while access was being configured.");
5465
- return c;
5535
+ }
5536
+ async publishedConnectionUsage(e, t, n, r) {
5537
+ let [i, a] = await Promise.all([this.#e.getConnectorAccess(e, r, t), this.#e.getRevision(e, n, r)]);
5538
+ return {
5539
+ publicationId: t,
5540
+ access: i,
5541
+ revision: P(a)
5542
+ };
5543
+ }
5544
+ async removeConnectionUsage(e) {
5545
+ if (!await this.workspace.saveModuleEditor()) return !1;
5546
+ let t = this.workspace.$.flowId.value, n = this.workspace.$.revision.value, r = this.connectorAccess.$.value.access;
5547
+ if (t == null || n == null || r == null) return !1;
5548
+ try {
5549
+ return await this.#e.removeConnectionUsage(t, e, n.revision.revisionId, r.accessRevision, F()), t != this.workspace.$.flowId.value || this.#d ? !1 : (await this.workspace.selectFlow(t), await this.connectorAccess.load(t), !0);
5550
+ } catch (e) {
5551
+ return this.#r.set(O(e, this.#n.t)), !1;
5466
5552
  }
5467
5553
  }
5468
5554
  async refreshSelectedConnector(e = !1) {
@@ -5470,13 +5556,13 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5470
5556
  }
5471
5557
  async requestDraftRun(e) {
5472
5558
  let t = this.workspace.$.flowId.value;
5473
- if (!await this.workspace.saveDraft() || this.#u || t != this.workspace.$.flowId.value) return "unavailable";
5559
+ if (!await this.workspace.saveDraft() || this.#d || t != this.workspace.$.flowId.value) return "unavailable";
5474
5560
  let n = this.workspace.$.targetFlow.value, r = this.workspace.$.draft.value;
5475
5561
  return n == null || r == null ? "unavailable" : await this.runRequests.requestDraft(n, r, e);
5476
5562
  }
5477
5563
  async editDraftRunInputs(e) {
5478
5564
  let t = this.workspace.$.flowId.value;
5479
- if (!await this.workspace.saveDraft() || this.#u || t != this.workspace.$.flowId.value) return "unavailable";
5565
+ if (!await this.workspace.saveDraft() || this.#d || t != this.workspace.$.flowId.value) return "unavailable";
5480
5566
  let n = this.workspace.$.targetFlow.value, r = this.workspace.$.draft.value;
5481
5567
  return n == null || r == null ? "unavailable" : await this.runRequests.editDraft(n, r, e);
5482
5568
  }
@@ -5484,25 +5570,25 @@ var mi = { openExternalPage: async () => !1 }, hi = class {
5484
5570
  let e = this.workspace.$.targetFlow.value;
5485
5571
  return e == null ? "unavailable" : await this.runRequests.requestLive(e);
5486
5572
  }
5487
- async #g(e, t) {
5573
+ async #_(e, t) {
5488
5574
  let n = this.workspace.$.target.value;
5489
- if (this.#u || this.runRequests.$.submitting.value != null || n?.kind != "flow" || this.workspace.$.flowId.value != t.flowId) return;
5575
+ if (this.#d || this.runRequests.$.submitting.value != null || n?.kind != "flow" || this.workspace.$.flowId.value != t.flowId) return;
5490
5576
  let r = this.#t.begin();
5491
5577
  try {
5492
5578
  let n = await e.getRun(t.runId), i = this.workspace.$.target.value;
5493
- if (!r() || this.#u || i?.kind != "flow" || this.workspace.$.flowId.value != t.flowId || n.flowId != t.flowId || n.runId != t.runId) return;
5579
+ if (!r() || this.#d || i?.kind != "flow" || this.workspace.$.flowId.value != t.flowId || n.flowId != t.flowId || n.runId != t.runId) return;
5494
5580
  this.runs.followExternal(n);
5495
5581
  } catch {
5496
5582
  return;
5497
5583
  }
5498
5584
  }
5499
- }, gi = bt(() => import("./flowWorkspace-JCjjQZzW.js").then((e) => e.t));
5585
+ }, gi = Tt(() => import("./flowWorkspace-a5QLISui.js").then((e) => e.t));
5500
5586
  function _i({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i, pending: a = !1, title: o, token: c, tokenLabel: u }) {
5501
- let d = c != null && u != null && i != null, f = c ?? "", p = /* @__PURE__ */ q(vt, { children: [
5502
- /* @__PURE__ */ K("div", {
5587
+ let d = c != null && u != null && i != null, f = c ?? "", p = /* @__PURE__ */ U(Ct, { children: [
5588
+ /* @__PURE__ */ H("div", {
5503
5589
  "aria-hidden": "true",
5504
5590
  className: "flex size-10 items-center justify-center rounded-lg bg-muted text-muted-foreground",
5505
- children: /* @__PURE__ */ q("svg", {
5591
+ children: /* @__PURE__ */ U("svg", {
5506
5592
  className: "size-5",
5507
5593
  fill: "none",
5508
5594
  stroke: "currentColor",
@@ -5510,40 +5596,40 @@ function _i({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
5510
5596
  strokeLinejoin: "round",
5511
5597
  strokeWidth: "1.8",
5512
5598
  viewBox: "0 0 24 24",
5513
- children: [/* @__PURE__ */ K("rect", {
5599
+ children: [/* @__PURE__ */ H("rect", {
5514
5600
  height: "9",
5515
5601
  rx: "2",
5516
5602
  width: "14",
5517
5603
  x: "5",
5518
5604
  y: "11"
5519
- }), /* @__PURE__ */ K("path", { d: "M8 11V8a4 4 0 0 1 8 0v3" })]
5605
+ }), /* @__PURE__ */ H("path", { d: "M8 11V8a4 4 0 0 1 8 0v3" })]
5520
5606
  })
5521
5607
  }),
5522
- /* @__PURE__ */ q("header", {
5608
+ /* @__PURE__ */ U("header", {
5523
5609
  className: "flex flex-col gap-2",
5524
- children: [/* @__PURE__ */ K("h1", {
5610
+ children: [/* @__PURE__ */ H("h1", {
5525
5611
  className: "text-xl font-semibold tracking-tight text-balance",
5526
5612
  children: o
5527
- }), /* @__PURE__ */ K("p", {
5613
+ }), /* @__PURE__ */ H("p", {
5528
5614
  className: "text-sm/relaxed text-muted-foreground text-pretty",
5529
5615
  children: t
5530
5616
  })]
5531
5617
  }),
5532
- d && /* @__PURE__ */ K(rt, { children: /* @__PURE__ */ q(tt, {
5618
+ d && /* @__PURE__ */ H(ct, { children: /* @__PURE__ */ U(ot, {
5533
5619
  "data-invalid": n != null,
5534
5620
  children: [
5535
- /* @__PURE__ */ K(nt, {
5621
+ /* @__PURE__ */ H(st, {
5536
5622
  htmlFor: "session-token",
5537
5623
  children: u
5538
5624
  }),
5539
- /* @__PURE__ */ K(l, {
5625
+ /* @__PURE__ */ H(l, {
5540
5626
  autoComplete: "username",
5541
5627
  name: "username",
5542
5628
  type: "hidden",
5543
5629
  value: "open-flow",
5544
5630
  readOnly: !0
5545
5631
  }),
5546
- /* @__PURE__ */ K(l, {
5632
+ /* @__PURE__ */ H(l, {
5547
5633
  autoComplete: "current-password",
5548
5634
  "aria-invalid": n != null,
5549
5635
  autoFocus: !0,
@@ -5555,29 +5641,29 @@ function _i({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
5555
5641
  type: "password",
5556
5642
  value: f
5557
5643
  }),
5558
- n != null && /* @__PURE__ */ K(ot, { children: n })
5644
+ n != null && /* @__PURE__ */ H(dt, { children: n })
5559
5645
  ]
5560
5646
  }) }),
5561
- e != null && r != null && /* @__PURE__ */ q(s, {
5647
+ e != null && r != null && /* @__PURE__ */ U(s, {
5562
5648
  disabled: a || d && f.length == 0,
5563
5649
  size: "lg",
5564
5650
  type: "submit",
5565
- children: [a && /* @__PURE__ */ K(et, {
5651
+ children: [a && /* @__PURE__ */ H(at, {
5566
5652
  "aria-label": e,
5567
5653
  "data-icon": "inline-start"
5568
5654
  }), e]
5569
5655
  }),
5570
- a && e == null && /* @__PURE__ */ K(et, { "aria-label": t })
5656
+ a && e == null && /* @__PURE__ */ H(at, { "aria-label": t })
5571
5657
  ] }), m = "m-auto flex w-full max-w-[420px] flex-col gap-5 rounded-xl bg-card p-6 shadow-lg shadow-black/10";
5572
- return /* @__PURE__ */ K("main", {
5658
+ return /* @__PURE__ */ H("main", {
5573
5659
  className: "open-flow-workbench",
5574
- children: /* @__PURE__ */ K("div", {
5660
+ children: /* @__PURE__ */ H("div", {
5575
5661
  className: "grid h-full overflow-auto bg-muted/20 p-4",
5576
- children: r == null ? /* @__PURE__ */ K("section", {
5662
+ children: r == null ? /* @__PURE__ */ H("section", {
5577
5663
  "aria-busy": a,
5578
5664
  className: m,
5579
5665
  children: p
5580
- }) : /* @__PURE__ */ K("form", {
5666
+ }) : /* @__PURE__ */ H("form", {
5581
5667
  "aria-busy": a,
5582
5668
  className: m,
5583
5669
  onSubmit: r,
@@ -5587,14 +5673,14 @@ function _i({ action: e, description: t, error: n, onSubmit: r, onTokenChange: i
5587
5673
  });
5588
5674
  }
5589
5675
  function vi({ host: e, store: t }) {
5590
- let [n] = J(() => e.notify.bind(e)), i = r(t.$.notice);
5591
- return xt(() => n(i), [n, i]), xt(() => () => n(void 0), [n]), null;
5676
+ let [n] = W(() => e.notify.bind(e)), i = r(t.$.notice);
5677
+ return Et(() => n(i), [n, i]), Et(() => () => n(void 0), [n]), null;
5592
5678
  }
5593
5679
  function yi({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowField: i, flowBadges: a, hrefFor: o, hostAction: s, hostTitle: c, language: l, navigation: u, onConfigureConnector: d, onManageConnectorAccess: f, onHostAction: p, onLanguageChange: m, store: h, theme: g }) {
5594
5680
  let _ = r(h.workspace.$.flowId);
5595
- return /* @__PURE__ */ K("div", {
5681
+ return /* @__PURE__ */ H("div", {
5596
5682
  className: "app-shell",
5597
- children: _ == null ? /* @__PURE__ */ K(Bt, {
5683
+ children: _ == null ? /* @__PURE__ */ H(Gt, {
5598
5684
  catalogWidth: e,
5599
5685
  createFlowDisabled: n,
5600
5686
  createFlowField: i,
@@ -5611,12 +5697,12 @@ function yi({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowF
5611
5697
  onLanguageChange: m,
5612
5698
  onSelectFlow: (e) => void u.selectFlow(e),
5613
5699
  store: h
5614
- }) : /* @__PURE__ */ K(yt, {
5615
- fallback: /* @__PURE__ */ K("main", {
5700
+ }) : /* @__PURE__ */ H(wt, {
5701
+ fallback: /* @__PURE__ */ H("main", {
5616
5702
  "aria-busy": "true",
5617
5703
  className: "workspace"
5618
5704
  }),
5619
- children: /* @__PURE__ */ K(gi, {
5705
+ children: /* @__PURE__ */ H(gi, {
5620
5706
  hostAction: s,
5621
5707
  hostTitle: c,
5622
5708
  hrefFor: o,
@@ -5631,43 +5717,43 @@ function yi({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowF
5631
5717
  });
5632
5718
  }
5633
5719
  function bi({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowField: r, flowBadges: i, host: a, hostAction: s, hostTitle: c, hrefFor: l, language: u, location: d, onConfigureConnector: f, onManageConnectorAccess: p, onHostAction: m, onLanguageChange: g, onNavigate: _, preferences: v, theme: y, variables: b = !0 }) {
5634
- let x = St(_);
5720
+ let x = Dt(_);
5635
5721
  x.current = _;
5636
- let [{ i18n: S, navigation: w, store: T }] = J(() => {
5637
- let e = h(u), t = new hi(new M((e, t) => a.request(e, t), (e, t) => a.subscribeFlow(e, t), (e) => a.subscribeFlowCatalog(e)), v, C, e, a, b);
5722
+ let [{ i18n: S, navigation: C, store: w }] = W(() => {
5723
+ let e = h(u), t = new hi(new fe((e, t) => a.request(e, t), (e, t) => a.subscribeFlow(e, t), (e) => a.subscribeFlowCatalog(e)), v, F, e, a, b);
5638
5724
  return {
5639
5725
  i18n: e,
5640
- navigation: new Et(t, d, (e, t) => x.current(e, t)),
5726
+ navigation: new jt(t, d, (e, t) => x.current(e, t)),
5641
5727
  store: t
5642
5728
  };
5643
5729
  });
5644
- return xt(() => {
5645
- w.start();
5730
+ return Et(() => {
5731
+ C.start();
5646
5732
  let e = () => {
5647
- T.connectors.refreshAfterAuthorization(), T.triggers.refreshAfterAuthorization(), T.invalidateVariableNames();
5733
+ w.connectors.refreshAfterAuthorization(), w.triggers.refreshAfterAuthorization(), w.invalidateVariableNames();
5648
5734
  };
5649
5735
  return globalThis.addEventListener("focus", e), () => {
5650
- globalThis.removeEventListener("focus", e), w.dispose(), T.dispose(), S.dispose();
5736
+ globalThis.removeEventListener("focus", e), C.dispose(), w.dispose(), S.dispose();
5651
5737
  };
5652
5738
  }, [
5653
5739
  S,
5654
- w,
5655
- T
5656
- ]), xt(() => void w.apply(d), [d, w]), xt(() => {
5657
- T.triggers.catalog.setLanguage(u), T.connectors.setLanguage(u), S.lang != u && S.switchLang(u);
5740
+ C,
5741
+ w
5742
+ ]), Et(() => void C.apply(d), [d, C]), Et(() => {
5743
+ w.triggers.catalog.setLanguage(u), w.connectors.setLanguage(u), S.lang != u && S.switchLang(u);
5658
5744
  }, [
5659
5745
  S,
5660
5746
  u,
5661
- T
5662
- ]), /* @__PURE__ */ K(o, {
5747
+ w
5748
+ ]), /* @__PURE__ */ H(o, {
5663
5749
  i18n: S,
5664
- children: /* @__PURE__ */ q("div", {
5750
+ children: /* @__PURE__ */ U("div", {
5665
5751
  className: "open-flow-theme open-flow-workbench",
5666
5752
  "data-theme": y,
5667
- children: [/* @__PURE__ */ K(vi, {
5753
+ children: [/* @__PURE__ */ H(vi, {
5668
5754
  host: a,
5669
- store: T
5670
- }), /* @__PURE__ */ K(yi, {
5755
+ store: w
5756
+ }), /* @__PURE__ */ H(yi, {
5671
5757
  catalogWidth: e,
5672
5758
  createFlow: t,
5673
5759
  createFlowDisabled: n,
@@ -5677,19 +5763,19 @@ function bi({ catalogWidth: e, createFlow: t, createFlowDisabled: n, createFlowF
5677
5763
  hostTitle: c,
5678
5764
  hrefFor: l,
5679
5765
  language: u,
5680
- navigation: w,
5766
+ navigation: C,
5681
5767
  onConfigureConnector: f,
5682
5768
  onManageConnectorAccess: p,
5683
5769
  onHostAction: m,
5684
5770
  onLanguageChange: g,
5685
- store: T,
5771
+ store: w,
5686
5772
  theme: y
5687
5773
  })]
5688
5774
  })
5689
5775
  });
5690
5776
  }
5691
5777
  function xi({ sessionKey: e, ...t }) {
5692
- return /* @__PURE__ */ K(bi, { ...t }, e);
5778
+ return /* @__PURE__ */ H(bi, { ...t }, e);
5693
5779
  }
5694
5780
  //#endregion
5695
- export { ne as EventSourcesPage, _i as OpenFlowSessionGate, xi as OpenFlowWorkbench, mt as isWorkbenchLanguage, gt as resolveWorkbenchLanguage, _t as workbenchLanguageNames, ht as workbenchLanguages };
5781
+ export { ie as EventSourcesPage, _i as OpenFlowSessionGate, xi as OpenFlowWorkbench, yt as isWorkbenchLanguage, xt as resolveWorkbenchLanguage, St as workbenchLanguageNames, bt as workbenchLanguages };