@oomol-lab/open-flow 0.1.0-beta.30 → 0.1.0-beta.31
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.
- package/dist/browser/{createResourceDialog-_y2xHaUA.js → createResourceDialog-FBRnCMK6.js} +1 -1
- package/dist/browser/{editorComponent-Dq4IKp5R.js → editorComponent-CyH2o-Ji.js} +21 -0
- package/dist/browser/flow-authoring.js +68 -72
- package/dist/browser/flow-change.d.ts +3 -3
- package/dist/browser/flow-change.js +796 -792
- package/dist/browser/{flowChanges-AdN0Iqma.js → flowChanges-ScpWTKtQ.js} +581 -592
- package/dist/browser/{flowWorkspace-BrtzLKWB.js → flowWorkspace-CY1r6dwz.js} +26551 -26516
- package/dist/browser/{inputValues-DJfFraxG.js → inputValues-C21gYJuc.js} +1 -1
- package/dist/browser/ui.css +1 -1
- package/dist/browser/workbench.css +1 -1
- package/dist/browser/workbench.js +6 -6
- package/dist/browser/{workbenchSelect-BDPIQxYK.js → workbenchSelect-DAaGuZwP.js} +110 -106
- package/dist/common/control-api-conformance.js +80 -78
- package/dist/common/control-api.d.ts +15 -1
- package/dist/common/control-api.js +158 -153
- package/dist/common/control-requests.d.ts +6 -0
- package/dist/common/control-requests.js +761 -772
- package/dist/common/flow-encoding.js +757 -752
- package/dist/common/flow-semantics.js +260 -263
- package/dist/common/mcp.d.ts +1 -0
- package/dist/common/mcp.js +120 -114
- package/dist/common/provider-triggers.js +1284 -1283
- package/dist/common/scheduler.d.ts +7 -1
- package/dist/common/scheduler.js +696 -690
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { a as e, i as t, l as n, t as r } from "./dist-Dz6Nglsd.js";
|
|
2
2
|
import { i, t as a } from "./main-BDnNHhkU.js";
|
|
3
|
-
import { $ as o, $n as s, $t as c, A as l, Bn as u, Ct as d, D as f, En as p, Et as m, F as h, Fn as g, G as _, Gn as
|
|
4
|
-
import { A as gt, D as _t, M as vt, O as yt, _ as bt, g as xt, i as St, k as Ct } from "./editorComponent-
|
|
5
|
-
import { A as wt, B as Tt, C as Et, D as Dt, E as Ot, F as kt, I as At, L as jt, M as Mt, N as Nt, O as Pt, P as Ft, R as j, S as It, T as Lt, V as Rt, b as zt, j as Bt, k as Vt, n as Ht, v as Ut, y as Wt, z as Gt } from "./workbenchSelect-
|
|
3
|
+
import { $ as o, $n as s, $t as c, A as l, Bn as u, Ct as d, D as f, En as p, Et as m, F as h, Fn as g, G as _, Gn as v, H as y, Hn as b, I as x, J as ee, K as te, Kn as S, L as ne, M as C, N as re, O as w, Ot as ie, P as ae, Pn as T, Q as oe, R as E, Sn as se, St as ce, U as D, Un as le, V as ue, Vn as O, W as de, Wn as k, X as fe, Xn as pe, Y as me, Yn as he, Z as ge, Zn as _e, a as ve, ar as ye, at as be, c as xe, cn as Se, ct as Ce, d as we, dr as Te, dt as Ee, er as De, et as Oe, fn as ke, ft as Ae, gn as je, gt as Me, hn as Ne, ht as Pe, i as Fe, it as Ie, j as Le, jt as Re, kt as ze, l as Be, ln as Ve, lt as He, n as Ue, nr as We, nt as Ge, o as Ke, on as qe, or as Je, ot as Ye, q as Xe, qn as Ze, rn as Qe, rr as $e, rt as et, sn as tt, sr as nt, st as rt, t as A, tn as it, tr as at, tt as ot, u as st, un as ct, ur as lt, ut, v as dt, vt as ft, xn as pt, xt as mt, zn as ht } from "./lite-BuKZ8joP.js";
|
|
4
|
+
import { A as gt, D as _t, M as vt, O as yt, _ as bt, g as xt, i as St, k as Ct } from "./editorComponent-CyH2o-Ji.js";
|
|
5
|
+
import { A as wt, B as Tt, C as Et, D as Dt, E as Ot, F as kt, I as At, L as jt, M as Mt, N as Nt, O as Pt, P as Ft, R as j, S as It, T as Lt, V as Rt, b as zt, j as Bt, k as Vt, n as Ht, v as Ut, y as Wt, z as Gt } from "./workbenchSelect-DAaGuZwP.js";
|
|
6
6
|
import { s as Kt } from "./value-DPg_9yXB.js";
|
|
7
7
|
import { a as qt, i as Jt } from "./dist-CoszrK7m.js";
|
|
8
8
|
import "./lib-C5Ipyfps.js";
|
|
@@ -937,6 +937,7 @@ function Er(e) {
|
|
|
937
937
|
let t = R(e);
|
|
938
938
|
B(t, [
|
|
939
939
|
"action",
|
|
940
|
+
"comment",
|
|
940
941
|
"resolutionAccepted",
|
|
941
942
|
"resolvedAt",
|
|
942
943
|
"runId",
|
|
@@ -945,8 +946,9 @@ function Er(e) {
|
|
|
945
946
|
"waitId"
|
|
946
947
|
]);
|
|
947
948
|
let n = t.action, r = t.resolvedAt;
|
|
948
|
-
return t.version != 1 || typeof t.resolutionAccepted != "boolean" || n !== null && n != "approve" && n != "continue" && n != "reject" || r !== null && typeof r != "string" || n === null != (r === null) || t.resolutionAccepted && n === null ? L() : {
|
|
949
|
+
return t.version != 1 || typeof t.resolutionAccepted != "boolean" || t.comment !== null && typeof t.comment != "string" || n !== null && n != "approve" && n != "continue" && n != "reject" || r !== null && typeof r != "string" || n === null != (r === null) || t.resolutionAccepted && n === null ? L() : {
|
|
949
950
|
action: n,
|
|
951
|
+
comment: t.comment,
|
|
950
952
|
resolutionAccepted: t.resolutionAccepted,
|
|
951
953
|
resolvedAt: r,
|
|
952
954
|
runId: z(t.runId),
|
|
@@ -1063,11 +1065,12 @@ function kr(e) {
|
|
|
1063
1065
|
};
|
|
1064
1066
|
case "run.resolved": {
|
|
1065
1067
|
let e = i.action;
|
|
1066
|
-
return e !== "approve" && e !== "continue" && e !== "reject" ? L() : {
|
|
1068
|
+
return e !== "approve" && e !== "continue" && e !== "reject" || i.comment !== null && typeof i.comment != "string" ? L() : {
|
|
1067
1069
|
...r,
|
|
1068
1070
|
kind: a,
|
|
1069
1071
|
payload: {
|
|
1070
1072
|
action: e,
|
|
1073
|
+
comment: i.comment,
|
|
1071
1074
|
resolvedAt: z(i.resolvedAt),
|
|
1072
1075
|
waitId: z(i.waitId)
|
|
1073
1076
|
}
|
|
@@ -1575,10 +1578,11 @@ var Nr = class {
|
|
|
1575
1578
|
method: "POST"
|
|
1576
1579
|
}));
|
|
1577
1580
|
}
|
|
1578
|
-
async resolveRunWait(e, t, n) {
|
|
1581
|
+
async resolveRunWait(e, t, n, r) {
|
|
1579
1582
|
return Er(await this.request(`/v1/runs/${V(e)}/waits/${V(t)}/resolve`, {
|
|
1580
1583
|
body: JSON.stringify({
|
|
1581
1584
|
action: n,
|
|
1585
|
+
comment: r,
|
|
1582
1586
|
version: 1
|
|
1583
1587
|
}),
|
|
1584
1588
|
method: "POST"
|
|
@@ -1959,7 +1963,7 @@ function Br({ value: e, onChange: t, disabled: n = !1, allowedEvents: r }) {
|
|
|
1959
1963
|
label: e,
|
|
1960
1964
|
group: "custom"
|
|
1961
1965
|
}))], h = s.trim().toLocaleLowerCase(), g = m.filter((e) => `${e.label} ${e.id}`.toLocaleLowerCase().includes(h)), _ = r == null ? [] : e.filter((e) => !r.includes(e));
|
|
1962
|
-
function
|
|
1966
|
+
function v() {
|
|
1963
1967
|
let n = l.trim();
|
|
1964
1968
|
if (!/^[a-z][a-z0-9_.]{0,127}$/.test(n) || n == "card.action.trigger" || n == "app_ticket") {
|
|
1965
1969
|
p(!0);
|
|
@@ -2065,13 +2069,13 @@ function Br({ value: e, onChange: t, disabled: n = !1, allowedEvents: r }) {
|
|
|
2065
2069
|
d(e.target.value), p(!1);
|
|
2066
2070
|
},
|
|
2067
2071
|
onKeyDown: (t) => {
|
|
2068
|
-
t.key == "Enter" && (t.preventDefault(), !n && l.trim() && e.length < 200 &&
|
|
2072
|
+
t.key == "Enter" && (t.preventDefault(), !n && l.trim() && e.length < 200 && v());
|
|
2069
2073
|
}
|
|
2070
2074
|
}), /* @__PURE__ */ M(u, {
|
|
2071
2075
|
type: "button",
|
|
2072
2076
|
variant: "outline",
|
|
2073
2077
|
disabled: n || !l.trim() || e.length >= 200,
|
|
2074
|
-
onClick:
|
|
2078
|
+
onClick: v,
|
|
2075
2079
|
children: a("eventSources.addCustom")
|
|
2076
2080
|
})]
|
|
2077
2081
|
}),
|
|
@@ -2123,7 +2127,7 @@ function Hr({ client: e, teams: t }) {
|
|
|
2123
2127
|
m(!1);
|
|
2124
2128
|
}
|
|
2125
2129
|
}
|
|
2126
|
-
async function
|
|
2130
|
+
async function v(t) {
|
|
2127
2131
|
m(!0);
|
|
2128
2132
|
try {
|
|
2129
2133
|
await e.deleteEventSource(t.sourceId, t.revision), f(void 0), await g();
|
|
@@ -2269,7 +2273,7 @@ function Hr({ client: e, teams: t }) {
|
|
|
2269
2273
|
variant: "destructive",
|
|
2270
2274
|
size: "sm",
|
|
2271
2275
|
disabled: p,
|
|
2272
|
-
onClick: () => void
|
|
2276
|
+
onClick: () => void v(t),
|
|
2273
2277
|
children: n("eventSources.delete")
|
|
2274
2278
|
}),
|
|
2275
2279
|
/* @__PURE__ */ M(u, {
|
|
@@ -2293,12 +2297,12 @@ function Hr({ client: e, teams: t }) {
|
|
|
2293
2297
|
});
|
|
2294
2298
|
}
|
|
2295
2299
|
function Ur({ source: e, existingNames: t = [], fixedTeamId: n, onPendingChange: r, client: a, teams: o, onSaved: s, onCancel: c }) {
|
|
2296
|
-
let l = i(), [d, f] = F(e == null ? 1 : 2), [p, m] = F(e?.name ?? l("eventSources.defaultName")), [h, g] = F(!1), [_,
|
|
2300
|
+
let l = i(), [d, f] = F(e == null ? 1 : 2), [p, m] = F(e?.name ?? l("eventSources.defaultName")), [h, g] = F(!1), [_, v] = F(e?.teamId ?? n ?? o[0]?.id ?? ""), [y, b] = F(e?.connectionId ?? ""), [x, ee] = F(), [te, S] = F(), [ne, C] = F(), [re, w] = F(), ie = rn(!1), [ae, T] = F(0), [oe, E] = F(""), [se, ce] = F(""), [D, le] = F(e?.eventTypes ?? ["im.message.receive_v1"]), [ue, de] = F(e?.manageSubscriptions ?? !1), [k, fe] = F(!1), [pe, me] = F();
|
|
2297
2301
|
$t(() => {
|
|
2298
2302
|
if (e != null) return;
|
|
2299
2303
|
let t = new AbortController();
|
|
2300
|
-
return
|
|
2301
|
-
t.signal.aborted ||
|
|
2304
|
+
return ee(void 0), S(void 0), a.listEventSourceConnections(_ || null, t.signal).then((e) => {
|
|
2305
|
+
t.signal.aborted || ee(e);
|
|
2302
2306
|
}, (e) => {
|
|
2303
2307
|
t.signal.aborted || S(Lr(e, l).message);
|
|
2304
2308
|
}), () => t.abort();
|
|
@@ -2330,10 +2334,10 @@ function Ur({ source: e, existingNames: t = [], fixedTeamId: n, onPendingChange:
|
|
|
2330
2334
|
};
|
|
2331
2335
|
return window.addEventListener("focus", e), () => window.removeEventListener("focus", e);
|
|
2332
2336
|
}, []);
|
|
2333
|
-
let he =
|
|
2337
|
+
let he = x?.find((e) => e.connectionId == y && e.status == "active"), ge = e?.appId ?? he?.providerAccountId, _e = ge != null && /^cli_[a-zA-Z0-9]+$/.test(ge);
|
|
2334
2338
|
function ve(e) {
|
|
2335
|
-
if (
|
|
2336
|
-
let n =
|
|
2339
|
+
if (b(e), h) return;
|
|
2340
|
+
let n = x?.find((t) => t.connectionId == e);
|
|
2337
2341
|
if (n == null) return;
|
|
2338
2342
|
let r = l("eventSources.appSourceName", { name: n.displayName }).slice(0, 120), i = r;
|
|
2339
2343
|
for (let e = 2; t.includes(i); e += 1) i = `${r} ${e}`;
|
|
@@ -2351,7 +2355,7 @@ function Ur({ source: e, existingNames: t = [], fixedTeamId: n, onPendingChange:
|
|
|
2351
2355
|
let t = e == null ? await a.createEventSource({
|
|
2352
2356
|
version: 1,
|
|
2353
2357
|
name: p,
|
|
2354
|
-
connectionId:
|
|
2358
|
+
connectionId: y,
|
|
2355
2359
|
teamId: _ || null,
|
|
2356
2360
|
verificationToken: oe,
|
|
2357
2361
|
encryptKey: se,
|
|
@@ -2404,20 +2408,20 @@ function Ur({ source: e, existingNames: t = [], fixedTeamId: n, onPendingChange:
|
|
|
2404
2408
|
})),
|
|
2405
2409
|
disabled: k,
|
|
2406
2410
|
onChange: (e) => {
|
|
2407
|
-
|
|
2411
|
+
v(e), b("");
|
|
2408
2412
|
}
|
|
2409
2413
|
}),
|
|
2410
2414
|
/* @__PURE__ */ M(Wr, {
|
|
2411
2415
|
label: l("eventSources.feishuApp"),
|
|
2412
|
-
value:
|
|
2413
|
-
options: (
|
|
2416
|
+
value: y,
|
|
2417
|
+
options: (x ?? []).filter((e) => e.status == "active").map((e) => ({
|
|
2414
2418
|
value: e.connectionId,
|
|
2415
2419
|
label: e.displayName
|
|
2416
2420
|
})),
|
|
2417
|
-
disabled: k ||
|
|
2421
|
+
disabled: k || x == null,
|
|
2418
2422
|
onChange: ve
|
|
2419
2423
|
}),
|
|
2420
|
-
|
|
2424
|
+
x != null && !x.some((e) => e.status == "active") && /* @__PURE__ */ M("p", {
|
|
2421
2425
|
className: "m-0 text-sm leading-5 text-muted-foreground",
|
|
2422
2426
|
children: l("eventSources.noApplications")
|
|
2423
2427
|
}),
|
|
@@ -2456,10 +2460,10 @@ function Ur({ source: e, existingNames: t = [], fixedTeamId: n, onPendingChange:
|
|
|
2456
2460
|
className: "m-0 text-sm text-destructive",
|
|
2457
2461
|
children: re
|
|
2458
2462
|
}),
|
|
2459
|
-
|
|
2463
|
+
te != null && /* @__PURE__ */ M("p", {
|
|
2460
2464
|
role: "alert",
|
|
2461
2465
|
className: "m-0 text-sm text-destructive",
|
|
2462
|
-
children:
|
|
2466
|
+
children: te
|
|
2463
2467
|
}),
|
|
2464
2468
|
he != null && !_e && /* @__PURE__ */ M("p", {
|
|
2465
2469
|
role: "alert",
|
|
@@ -2636,7 +2640,7 @@ function Wr({ label: e, value: t, options: n, disabled: r, onChange: i }) {
|
|
|
2636
2640
|
//#endregion
|
|
2637
2641
|
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+fa6c2f29eeb10566/node_modules/@base-ui/react/esm/use-render/useRender.js
|
|
2638
2642
|
function Gr(e) {
|
|
2639
|
-
return
|
|
2643
|
+
return v(e.defaultTagName ?? "div", e, e);
|
|
2640
2644
|
}
|
|
2641
2645
|
//#endregion
|
|
2642
2646
|
//#region src/ui/browser/badge.tsx
|
|
@@ -2654,7 +2658,7 @@ var Kr = le("group/badge inline-flex h-5 w-fit shrink-0 items-center justify-cen
|
|
|
2654
2658
|
function qr({ className: e, variant: t = "default", render: n, ...r }) {
|
|
2655
2659
|
return Gr({
|
|
2656
2660
|
defaultTagName: "span",
|
|
2657
|
-
props: at({ className:
|
|
2661
|
+
props: at({ className: b(Kr({ variant: t }), e) }, r),
|
|
2658
2662
|
render: n,
|
|
2659
2663
|
state: {
|
|
2660
2664
|
slot: "badge",
|
|
@@ -2782,15 +2786,15 @@ var ai = /*#__PURE__*/ function(e) {
|
|
|
2782
2786
|
},
|
|
2783
2787
|
...ke
|
|
2784
2788
|
}, si = /*#__PURE__*/ P.forwardRef(function(e, t) {
|
|
2785
|
-
let { render: n, className: r, id: i, label: a, nativeButton: o = !1, disabled: s = !1, closeOnClick: c = !1, checked: l, defaultChecked: u, onCheckedChange: d, style: f, ...p } = e, m = we({ label: a }), h = Yr(!0), g = T(i), { store: _ } = Zr(),
|
|
2789
|
+
let { render: n, className: r, id: i, label: a, nativeButton: o = !1, disabled: s = !1, closeOnClick: c = !1, checked: l, defaultChecked: u, onCheckedChange: d, style: f, ...p } = e, m = we({ label: a }), h = Yr(!0), g = T(i), { store: _ } = Zr(), y = _.useState("isActive", m.index), b = _.useState("itemProps"), [x, ee] = ht({
|
|
2786
2790
|
controlled: l,
|
|
2787
2791
|
default: u ?? !1,
|
|
2788
2792
|
name: "MenuCheckboxItem",
|
|
2789
2793
|
state: "checked"
|
|
2790
|
-
}), { getItemProps:
|
|
2794
|
+
}), { getItemProps: te, itemRef: S } = ii({
|
|
2791
2795
|
closeOnClick: c,
|
|
2792
2796
|
disabled: s,
|
|
2793
|
-
highlighted:
|
|
2797
|
+
highlighted: y,
|
|
2794
2798
|
id: g,
|
|
2795
2799
|
store: _,
|
|
2796
2800
|
nativeButton: o,
|
|
@@ -2798,30 +2802,30 @@ var ai = /*#__PURE__*/ function(e) {
|
|
|
2798
2802
|
itemMetadata: ri
|
|
2799
2803
|
}), ne = P.useMemo(() => ({
|
|
2800
2804
|
disabled: s,
|
|
2801
|
-
highlighted:
|
|
2802
|
-
checked:
|
|
2805
|
+
highlighted: y,
|
|
2806
|
+
checked: x
|
|
2803
2807
|
}), [
|
|
2804
2808
|
s,
|
|
2805
|
-
|
|
2806
|
-
|
|
2809
|
+
y,
|
|
2810
|
+
x
|
|
2807
2811
|
]), C = ye((e) => {
|
|
2808
2812
|
let t = {
|
|
2809
2813
|
...Ne(se, e.nativeEvent),
|
|
2810
2814
|
preventUnmountOnClose: () => {}
|
|
2811
2815
|
};
|
|
2812
|
-
d?.(!
|
|
2813
|
-
}), re =
|
|
2816
|
+
d?.(!x, t), !t.isCanceled && ee((e) => !e);
|
|
2817
|
+
}), re = v("div", e, {
|
|
2814
2818
|
state: ne,
|
|
2815
2819
|
stateAttributesMapping: oi,
|
|
2816
2820
|
props: [
|
|
2817
|
-
|
|
2821
|
+
b,
|
|
2818
2822
|
{
|
|
2819
2823
|
role: "menuitemcheckbox",
|
|
2820
|
-
"aria-checked":
|
|
2824
|
+
"aria-checked": x,
|
|
2821
2825
|
onClick: C
|
|
2822
2826
|
},
|
|
2823
2827
|
p,
|
|
2824
|
-
|
|
2828
|
+
te
|
|
2825
2829
|
],
|
|
2826
2830
|
ref: [
|
|
2827
2831
|
S,
|
|
@@ -2852,7 +2856,7 @@ var ci = /*#__PURE__*/ P.forwardRef(function(e, t) {
|
|
|
2852
2856
|
highlighted: s.highlighted,
|
|
2853
2857
|
transitionStatus: l
|
|
2854
2858
|
};
|
|
2855
|
-
return
|
|
2859
|
+
return v("span", e, {
|
|
2856
2860
|
state: d,
|
|
2857
2861
|
ref: [t, c],
|
|
2858
2862
|
stateAttributesMapping: oi,
|
|
@@ -2876,7 +2880,7 @@ function ui() {
|
|
|
2876
2880
|
//#endregion
|
|
2877
2881
|
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+fa6c2f29eeb10566/node_modules/@base-ui/react/esm/menu/group/MenuGroup.js
|
|
2878
2882
|
var di = /*#__PURE__*/ P.forwardRef(function(e, t) {
|
|
2879
|
-
let { render: n, className: r, style: i, ...a } = e, [o, s] = P.useState(void 0), c = P.useMemo(() => ({ setLabelId: s }), [s]), l =
|
|
2883
|
+
let { render: n, className: r, style: i, ...a } = e, [o, s] = P.useState(void 0), c = P.useMemo(() => ({ setLabelId: s }), [s]), l = v("div", e, {
|
|
2880
2884
|
ref: t,
|
|
2881
2885
|
props: {
|
|
2882
2886
|
role: "group",
|
|
@@ -2896,7 +2900,7 @@ var fi = /*#__PURE__*/ P.forwardRef(function(e, t) {
|
|
|
2896
2900
|
let { className: n, render: r, id: i, style: a, ...o } = e, s = T(i), { setLabelId: c } = ui();
|
|
2897
2901
|
return We(() => (c(s), () => {
|
|
2898
2902
|
c(void 0);
|
|
2899
|
-
}), [c, s]),
|
|
2903
|
+
}), [c, s]), v("div", e, {
|
|
2900
2904
|
ref: t,
|
|
2901
2905
|
props: {
|
|
2902
2906
|
id: s,
|
|
@@ -2909,7 +2913,7 @@ process.env.NODE_ENV !== "production" && (fi.displayName = "MenuGroupLabel");
|
|
|
2909
2913
|
//#endregion
|
|
2910
2914
|
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+fa6c2f29eeb10566/node_modules/@base-ui/react/esm/menu/item/MenuItem.js
|
|
2911
2915
|
var pi = /*#__PURE__*/ P.forwardRef(function(e, t) {
|
|
2912
|
-
let { render: n, className: r, id: i, label: a, nativeButton: o = !1, disabled: s = !1, closeOnClick: c = !0, style: l, ...u } = e, d = we({ label: a }), f = Yr(!0), p = T(i), { store: m } = Zr(), h = m.useState("isActive", d.index), g = m.useState("itemProps"), { getItemProps: _, itemRef:
|
|
2916
|
+
let { render: n, className: r, id: i, label: a, nativeButton: o = !1, disabled: s = !1, closeOnClick: c = !0, style: l, ...u } = e, d = we({ label: a }), f = Yr(!0), p = T(i), { store: m } = Zr(), h = m.useState("isActive", d.index), g = m.useState("itemProps"), { getItemProps: _, itemRef: y } = ii({
|
|
2913
2917
|
closeOnClick: c,
|
|
2914
2918
|
disabled: s,
|
|
2915
2919
|
highlighted: h,
|
|
@@ -2919,7 +2923,7 @@ var pi = /*#__PURE__*/ P.forwardRef(function(e, t) {
|
|
|
2919
2923
|
nodeId: f?.context.nodeId,
|
|
2920
2924
|
itemMetadata: ri
|
|
2921
2925
|
});
|
|
2922
|
-
return
|
|
2926
|
+
return v("div", e, {
|
|
2923
2927
|
state: {
|
|
2924
2928
|
disabled: s,
|
|
2925
2929
|
highlighted: h
|
|
@@ -2930,7 +2934,7 @@ var pi = /*#__PURE__*/ P.forwardRef(function(e, t) {
|
|
|
2930
2934
|
_
|
|
2931
2935
|
],
|
|
2932
2936
|
ref: [
|
|
2933
|
-
|
|
2937
|
+
y,
|
|
2934
2938
|
t,
|
|
2935
2939
|
d.ref
|
|
2936
2940
|
]
|
|
@@ -2943,7 +2947,7 @@ var mi = {
|
|
|
2943
2947
|
...ue,
|
|
2944
2948
|
...ke
|
|
2945
2949
|
}, hi = /*#__PURE__*/ P.forwardRef(function(e, t) {
|
|
2946
|
-
let { render: n, className: r, style: i, finalFocus: a, ...o } = e, { store: s } = Zr(), { side: c, align: l } = Yr(), u = f(!0) != null, d = s.useState("open"), p = s.useState("transitionStatus"), m = s.useState("popupProps"), h = s.useState("mounted"), g = s.useState("instantType"), _ = s.useState("activeTriggerElement"),
|
|
2950
|
+
let { render: n, className: r, style: i, finalFocus: a, ...o } = e, { store: s } = Zr(), { side: c, align: l } = Yr(), u = f(!0) != null, d = s.useState("open"), p = s.useState("transitionStatus"), m = s.useState("popupProps"), h = s.useState("mounted"), g = s.useState("instantType"), _ = s.useState("activeTriggerElement"), y = s.useState("parent"), b = s.useState("lastOpenChangeReason"), x = s.useState("rootId"), ee = s.useState("floatingRootContext"), te = s.useState("floatingTreeRoot"), S = s.useState("closeDelay"), ne = s.useState("activeTriggerElement"), C = y.type === "context-menu";
|
|
2947
2951
|
Ve({
|
|
2948
2952
|
open: d,
|
|
2949
2953
|
ref: s.context.popupRef,
|
|
@@ -2954,13 +2958,13 @@ var mi = {
|
|
|
2954
2958
|
function e(e) {
|
|
2955
2959
|
s.setOpen(!1, Ne(e.reason, e.domEvent));
|
|
2956
2960
|
}
|
|
2957
|
-
return
|
|
2958
|
-
|
|
2961
|
+
return te.events.on("close", e), () => {
|
|
2962
|
+
te.events.off("close", e);
|
|
2959
2963
|
};
|
|
2960
|
-
}, [
|
|
2964
|
+
}, [te.events, s]);
|
|
2961
2965
|
let re = s.useState("hoverEnabled"), w = s.useState("disabled");
|
|
2962
|
-
Ct(
|
|
2963
|
-
enabled: re && !w && !C &&
|
|
2966
|
+
Ct(ee, {
|
|
2967
|
+
enabled: re && !w && !C && y.type !== "menubar",
|
|
2964
2968
|
closeDelay: S
|
|
2965
2969
|
});
|
|
2966
2970
|
let ie = {
|
|
@@ -2968,11 +2972,11 @@ var mi = {
|
|
|
2968
2972
|
side: c,
|
|
2969
2973
|
align: l,
|
|
2970
2974
|
open: d,
|
|
2971
|
-
nested:
|
|
2975
|
+
nested: y.type === "menu",
|
|
2972
2976
|
instant: g
|
|
2973
2977
|
}, ae = P.useCallback((e) => {
|
|
2974
2978
|
s.set("popupElement", e);
|
|
2975
|
-
}, [s]), T =
|
|
2979
|
+
}, [s]), T = v("div", e, {
|
|
2976
2980
|
state: ie,
|
|
2977
2981
|
ref: [
|
|
2978
2982
|
t,
|
|
@@ -2987,20 +2991,20 @@ var mi = {
|
|
|
2987
2991
|
} },
|
|
2988
2992
|
Le(p),
|
|
2989
2993
|
o,
|
|
2990
|
-
{ "data-rootownerid":
|
|
2994
|
+
{ "data-rootownerid": x }
|
|
2991
2995
|
]
|
|
2992
|
-
}), oe =
|
|
2993
|
-
return (_ ||
|
|
2994
|
-
context:
|
|
2996
|
+
}), oe = y.type === void 0 || C;
|
|
2997
|
+
return (_ || y.type === "menubar" && b !== "outside-press") && (oe = !0), /*#__PURE__*/ M(be, {
|
|
2998
|
+
context: ee,
|
|
2995
2999
|
modal: C,
|
|
2996
3000
|
disabled: !h,
|
|
2997
3001
|
returnFocus: a === void 0 ? oe : a,
|
|
2998
|
-
initialFocus:
|
|
3002
|
+
initialFocus: y.type !== "menu",
|
|
2999
3003
|
restoreFocus: !0,
|
|
3000
|
-
externalTree:
|
|
3004
|
+
externalTree: y.type === "menubar" ? void 0 : te,
|
|
3001
3005
|
previousFocusableElement: ne,
|
|
3002
|
-
nextFocusableElement:
|
|
3003
|
-
beforeContentFocusGuardRef:
|
|
3006
|
+
nextFocusableElement: y.type === void 0 ? s.context.triggerFocusTargetRef : void 0,
|
|
3007
|
+
beforeContentFocusGuardRef: y.type === void 0 ? s.context.beforeContentFocusGuardRef : void 0,
|
|
3004
3008
|
children: T
|
|
3005
3009
|
});
|
|
3006
3010
|
});
|
|
@@ -3030,14 +3034,14 @@ process.env.NODE_ENV !== "production" && (vi.displayName = "MenuPortal");
|
|
|
3030
3034
|
//#endregion
|
|
3031
3035
|
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+fa6c2f29eeb10566/node_modules/@base-ui/react/esm/menu/positioner/MenuPositioner.js
|
|
3032
3036
|
var yi = /*#__PURE__*/ P.forwardRef(function(e, t) {
|
|
3033
|
-
let { anchor: n, positionMethod: r = "absolute", className: i, render: a, side: o, align: s, sideOffset: c = 0, alignOffset: u = 0, collisionBoundary: d = "clipping-ancestors", collisionPadding: f = 5, arrowPadding: m = 5, sticky: h = !1, disableAnchorTracking: g = !1, collisionAvoidance: _ = Pe, style:
|
|
3037
|
+
let { anchor: n, positionMethod: r = "absolute", className: i, render: a, side: o, align: s, sideOffset: c = 0, alignOffset: u = 0, collisionBoundary: d = "clipping-ancestors", collisionPadding: f = 5, arrowPadding: m = 5, sticky: h = !1, disableAnchorTracking: g = !1, collisionAvoidance: _ = Pe, style: v, ...y } = e, { store: b } = Zr(), ee = _i(), te = $r(!0), S = b.useState("parent"), ie = b.useState("floatingRootContext"), T = b.useState("floatingTreeRoot"), oe = b.useState("mounted"), E = b.useState("open"), se = b.useState("modal"), ce = b.useState("openMethod"), D = b.useState("activeTriggerElement"), le = b.useState("transitionStatus"), ue = b.useState("positionerElement"), O = b.useState("instantType"), de = b.useState("hasViewport"), k = b.useState("lastOpenChangeReason"), fe = b.useState("floatingNodeId"), pe = b.useState("floatingParentNodeId"), me = ie.useState("domReferenceElement"), he = P.useRef(null), ge = ct(ue, !1, !1), _e = n, ve = c, ye = u, be = s, xe = _;
|
|
3034
3038
|
S.type === "context-menu" && (_e = n ?? S.context?.anchor, be ??= "start", !o && be !== "center" && (ye = e.alignOffset ?? 2, ve = e.sideOffset ?? -5));
|
|
3035
3039
|
let Se = o, Ce = be;
|
|
3036
3040
|
S.type === "menu" ? (Se ??= "inline-end", Ce ??= "start", xe = e.collisionAvoidance ?? Me) : S.type === "menubar" && (Se ??= "bottom", Ce ??= "start");
|
|
3037
3041
|
let we = S.type === "context-menu", Te = re({
|
|
3038
3042
|
anchor: _e,
|
|
3039
3043
|
floatingRootContext: ie,
|
|
3040
|
-
positionMethod:
|
|
3044
|
+
positionMethod: te ? "fixed" : r,
|
|
3041
3045
|
mounted: oe,
|
|
3042
3046
|
side: Se,
|
|
3043
3047
|
sideOffset: ve,
|
|
@@ -3048,7 +3052,7 @@ var yi = /*#__PURE__*/ P.forwardRef(function(e, t) {
|
|
|
3048
3052
|
collisionPadding: f,
|
|
3049
3053
|
sticky: h,
|
|
3050
3054
|
nodeId: fe,
|
|
3051
|
-
keepMounted:
|
|
3055
|
+
keepMounted: ee,
|
|
3052
3056
|
disableAnchorTracking: g,
|
|
3053
3057
|
collisionAvoidance: xe,
|
|
3054
3058
|
shiftCrossAxis: we && !("side" in xe && xe.side === "flip"),
|
|
@@ -3057,37 +3061,37 @@ var yi = /*#__PURE__*/ P.forwardRef(function(e, t) {
|
|
|
3057
3061
|
});
|
|
3058
3062
|
P.useEffect(() => {
|
|
3059
3063
|
function e(e) {
|
|
3060
|
-
e.open && (e.parentNodeId === fe &&
|
|
3064
|
+
e.open && (e.parentNodeId === fe && b.set("hoverEnabled", !1), e.nodeId !== fe && e.parentNodeId === b.select("floatingParentNodeId") && b.setOpen(!1, Ne(p)));
|
|
3061
3065
|
}
|
|
3062
3066
|
return T.events.on("menuopenchange", e), () => {
|
|
3063
3067
|
T.events.off("menuopenchange", e);
|
|
3064
3068
|
};
|
|
3065
3069
|
}, [
|
|
3066
|
-
|
|
3070
|
+
b,
|
|
3067
3071
|
T.events,
|
|
3068
3072
|
fe
|
|
3069
3073
|
]), P.useEffect(() => {
|
|
3070
|
-
if (
|
|
3074
|
+
if (b.select("floatingParentNodeId") == null) return;
|
|
3071
3075
|
function e(e) {
|
|
3072
|
-
if (e.open || e.nodeId !==
|
|
3076
|
+
if (e.open || e.nodeId !== b.select("floatingParentNodeId")) return;
|
|
3073
3077
|
let t = e.reason ?? "sibling-open";
|
|
3074
|
-
|
|
3078
|
+
b.setOpen(!1, Ne(t));
|
|
3075
3079
|
}
|
|
3076
3080
|
return T.events.on("menuopenchange", e), () => {
|
|
3077
3081
|
T.events.off("menuopenchange", e);
|
|
3078
3082
|
};
|
|
3079
|
-
}, [T.events,
|
|
3083
|
+
}, [T.events, b]);
|
|
3080
3084
|
let Ee = Re();
|
|
3081
3085
|
P.useEffect(() => {
|
|
3082
3086
|
E || Ee.clear();
|
|
3083
3087
|
}, [E, Ee]), P.useEffect(() => {
|
|
3084
3088
|
function e(e) {
|
|
3085
|
-
if (!(!E || e.nodeId !==
|
|
3089
|
+
if (!(!E || e.nodeId !== b.select("floatingParentNodeId"))) {
|
|
3086
3090
|
if (e.target && D && D !== e.target) {
|
|
3087
|
-
let e =
|
|
3091
|
+
let e = b.select("closeDelay");
|
|
3088
3092
|
e > 0 ? Ee.isStarted() || Ee.start(e, () => {
|
|
3089
|
-
|
|
3090
|
-
}) :
|
|
3093
|
+
b.setOpen(!1, Ne(p));
|
|
3094
|
+
}) : b.setOpen(!1, Ne(p));
|
|
3091
3095
|
} else Ee.clear();
|
|
3092
3096
|
}
|
|
3093
3097
|
}
|
|
@@ -3098,29 +3102,29 @@ var yi = /*#__PURE__*/ P.forwardRef(function(e, t) {
|
|
|
3098
3102
|
T.events,
|
|
3099
3103
|
E,
|
|
3100
3104
|
D,
|
|
3101
|
-
|
|
3105
|
+
b,
|
|
3102
3106
|
Ee
|
|
3103
3107
|
]), P.useEffect(() => {
|
|
3104
3108
|
let e = {
|
|
3105
3109
|
open: E,
|
|
3106
3110
|
nodeId: fe,
|
|
3107
3111
|
parentNodeId: pe,
|
|
3108
|
-
reason:
|
|
3112
|
+
reason: b.select("lastOpenChangeReason")
|
|
3109
3113
|
};
|
|
3110
3114
|
T.events.emit("menuopenchange", e);
|
|
3111
3115
|
}, [
|
|
3112
3116
|
T.events,
|
|
3113
3117
|
E,
|
|
3114
|
-
|
|
3118
|
+
b,
|
|
3115
3119
|
fe,
|
|
3116
3120
|
pe
|
|
3117
3121
|
]), We(() => {
|
|
3118
3122
|
let e = me, t = he.current;
|
|
3119
3123
|
if (e && (he.current = e), t && e && e !== t) {
|
|
3120
|
-
|
|
3124
|
+
b.set("instantType", void 0);
|
|
3121
3125
|
let e = new AbortController();
|
|
3122
3126
|
return ge(() => {
|
|
3123
|
-
|
|
3127
|
+
b.set("instantType", "trigger-change");
|
|
3124
3128
|
}, e.signal), () => {
|
|
3125
3129
|
e.abort();
|
|
3126
3130
|
};
|
|
@@ -3128,7 +3132,7 @@ var yi = /*#__PURE__*/ P.forwardRef(function(e, t) {
|
|
|
3128
3132
|
}, [
|
|
3129
3133
|
me,
|
|
3130
3134
|
ge,
|
|
3131
|
-
|
|
3135
|
+
b
|
|
3132
3136
|
]);
|
|
3133
3137
|
let De = {
|
|
3134
3138
|
open: E,
|
|
@@ -3142,8 +3146,8 @@ var yi = /*#__PURE__*/ P.forwardRef(function(e, t) {
|
|
|
3142
3146
|
let ke = l(e, De, {
|
|
3143
3147
|
styles: Te.positionerStyles,
|
|
3144
3148
|
transitionStatus: le,
|
|
3145
|
-
props:
|
|
3146
|
-
refs: [t,
|
|
3149
|
+
props: y,
|
|
3150
|
+
refs: [t, b.useStateSetter("positionerElement")],
|
|
3147
3151
|
hidden: !oe,
|
|
3148
3152
|
inert: !E
|
|
3149
3153
|
}), Ae = oe && S.type !== "menu" && (S.type !== "menubar" && se && k !== "trigger-hover" || S.type === "menubar" && S.context.modal), je = null;
|
|
@@ -3155,9 +3159,9 @@ var yi = /*#__PURE__*/ P.forwardRef(function(e, t) {
|
|
|
3155
3159
|
cutout: je
|
|
3156
3160
|
}), /*#__PURE__*/ M(Ye, {
|
|
3157
3161
|
id: fe,
|
|
3158
|
-
children: /*#__PURE__*/ M(
|
|
3159
|
-
elementsRef:
|
|
3160
|
-
labelsRef:
|
|
3162
|
+
children: /*#__PURE__*/ M(x, {
|
|
3163
|
+
elementsRef: b.context.itemDomElements,
|
|
3164
|
+
labelsRef: b.context.itemLabels,
|
|
3161
3165
|
children: ke
|
|
3162
3166
|
})
|
|
3163
3167
|
})]
|
|
@@ -3182,7 +3186,7 @@ var Si = /*#__PURE__*/ P.memo(/*#__PURE__*/ P.forwardRef(function(e, t) {
|
|
|
3182
3186
|
name: "MenuRadioGroup"
|
|
3183
3187
|
}), f = ye(o), p = ye((e, t) => {
|
|
3184
3188
|
f?.(e, t), !t.isCanceled && d(e);
|
|
3185
|
-
}), m =
|
|
3189
|
+
}), m = v("div", e, {
|
|
3186
3190
|
state: { disabled: s },
|
|
3187
3191
|
ref: t,
|
|
3188
3192
|
props: {
|
|
@@ -3217,9 +3221,9 @@ function wi() {
|
|
|
3217
3221
|
//#endregion
|
|
3218
3222
|
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+fa6c2f29eeb10566/node_modules/@base-ui/react/esm/menu/radio-item/MenuRadioItem.js
|
|
3219
3223
|
var Ti = /*#__PURE__*/ P.forwardRef(function(e, t) {
|
|
3220
|
-
let { render: n, className: r, id: i, label: a, nativeButton: o = !1, disabled: s = !1, closeOnClick: c = !1, value: l, style: u, ...d } = e, f = we({ label: a }), p = Yr(!0), m = T(i), { store: h } = Zr(), g = h.useState("isActive", f.index), _ = h.useState("itemProps"), { value:
|
|
3224
|
+
let { render: n, className: r, id: i, label: a, nativeButton: o = !1, disabled: s = !1, closeOnClick: c = !1, value: l, style: u, ...d } = e, f = we({ label: a }), p = Yr(!0), m = T(i), { store: h } = Zr(), g = h.useState("isActive", f.index), _ = h.useState("itemProps"), { value: y, setValue: b, disabled: x } = xi(), ee = x || s, te = y === l, { getItemProps: S, itemRef: ne } = ii({
|
|
3221
3225
|
closeOnClick: c,
|
|
3222
|
-
disabled:
|
|
3226
|
+
disabled: ee,
|
|
3223
3227
|
highlighted: g,
|
|
3224
3228
|
id: m,
|
|
3225
3229
|
store: h,
|
|
@@ -3227,27 +3231,27 @@ var Ti = /*#__PURE__*/ P.forwardRef(function(e, t) {
|
|
|
3227
3231
|
nodeId: p?.context.nodeId,
|
|
3228
3232
|
itemMetadata: ri
|
|
3229
3233
|
}), C = P.useMemo(() => ({
|
|
3230
|
-
disabled:
|
|
3234
|
+
disabled: ee,
|
|
3231
3235
|
highlighted: g,
|
|
3232
|
-
checked:
|
|
3236
|
+
checked: te
|
|
3233
3237
|
}), [
|
|
3234
|
-
|
|
3238
|
+
ee,
|
|
3235
3239
|
g,
|
|
3236
|
-
|
|
3240
|
+
te
|
|
3237
3241
|
]), re = ye((e) => {
|
|
3238
3242
|
let t = {
|
|
3239
3243
|
...Ne(se, e.nativeEvent),
|
|
3240
3244
|
preventUnmountOnClose: () => {}
|
|
3241
3245
|
};
|
|
3242
|
-
|
|
3243
|
-
}), w =
|
|
3246
|
+
b(l, t);
|
|
3247
|
+
}), w = v("div", e, {
|
|
3244
3248
|
state: C,
|
|
3245
3249
|
stateAttributesMapping: oi,
|
|
3246
3250
|
props: [
|
|
3247
3251
|
_,
|
|
3248
3252
|
{
|
|
3249
3253
|
role: "menuitemradio",
|
|
3250
|
-
"aria-checked":
|
|
3254
|
+
"aria-checked": te,
|
|
3251
3255
|
onClick: re
|
|
3252
3256
|
},
|
|
3253
3257
|
d,
|
|
@@ -3282,7 +3286,7 @@ var Ei = /*#__PURE__*/ P.forwardRef(function(e, t) {
|
|
|
3282
3286
|
highlighted: s.highlighted,
|
|
3283
3287
|
transitionStatus: l
|
|
3284
3288
|
};
|
|
3285
|
-
return
|
|
3289
|
+
return v("span", e, {
|
|
3286
3290
|
state: d,
|
|
3287
3291
|
stateAttributesMapping: oi,
|
|
3288
3292
|
ref: [t, c],
|
|
@@ -3402,49 +3406,49 @@ function Ni() {
|
|
|
3402
3406
|
//#endregion
|
|
3403
3407
|
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+fa6c2f29eeb10566/node_modules/@base-ui/react/esm/menu/root/MenuRoot.js
|
|
3404
3408
|
var Pi = ce(function(e) {
|
|
3405
|
-
let { children: t, open: n, onOpenChange: r, onOpenChangeComplete: i, defaultOpen: a = !1, disabled: s = !1, modal: c, loopFocus: l = !0, orientation: u = "vertical", actionsRef: d, closeParentOnEsc: f = !1, handle: p, triggerId: m, defaultTriggerId:
|
|
3409
|
+
let { children: t, open: n, onOpenChange: r, onOpenChangeComplete: i, defaultOpen: a = !1, disabled: s = !1, modal: c, loopFocus: l = !0, orientation: u = "vertical", actionsRef: d, closeParentOnEsc: f = !1, handle: p, triggerId: m, defaultTriggerId: v = null, highlightItemOnHover: y = !0 } = e, b = $r(!0), x = Zr(!0), ne = Oi(!0), C = Ni(), re = P.useMemo(() => C && x ? {
|
|
3406
3410
|
type: "menu",
|
|
3407
|
-
store:
|
|
3411
|
+
store: x.store
|
|
3408
3412
|
} : ne ? {
|
|
3409
3413
|
type: "menubar",
|
|
3410
3414
|
context: ne
|
|
3411
|
-
} :
|
|
3415
|
+
} : b && !x ? {
|
|
3412
3416
|
type: "context-menu",
|
|
3413
|
-
context:
|
|
3417
|
+
context: b
|
|
3414
3418
|
} : { type: void 0 }, [
|
|
3415
|
-
y,
|
|
3416
3419
|
b,
|
|
3420
|
+
x,
|
|
3417
3421
|
ne,
|
|
3418
3422
|
C
|
|
3419
3423
|
]), w = Ai.useStore(p?.store, {
|
|
3420
3424
|
open: a,
|
|
3421
3425
|
openProp: n,
|
|
3422
|
-
activeTriggerId:
|
|
3426
|
+
activeTriggerId: v,
|
|
3423
3427
|
triggerIdProp: m,
|
|
3424
3428
|
parent: re
|
|
3425
3429
|
});
|
|
3426
3430
|
ie(() => {
|
|
3427
3431
|
n === void 0 && w.state.open === !1 && a === !0 && w.update({
|
|
3428
3432
|
open: !0,
|
|
3429
|
-
activeTriggerId:
|
|
3433
|
+
activeTriggerId: v
|
|
3430
3434
|
});
|
|
3431
3435
|
}), w.useControlledProp("openProp", n), w.useControlledProp("triggerIdProp", m), w.useContextCallback("onOpenChangeComplete", i);
|
|
3432
3436
|
let ae = w.useState("floatingTreeRoot"), T = Ce(ae), oe = He();
|
|
3433
3437
|
We(() => {
|
|
3434
|
-
|
|
3438
|
+
b && !x ? w.update({
|
|
3435
3439
|
parent: {
|
|
3436
3440
|
type: "context-menu",
|
|
3437
|
-
context:
|
|
3441
|
+
context: b
|
|
3438
3442
|
},
|
|
3439
3443
|
floatingNodeId: T,
|
|
3440
3444
|
floatingParentNodeId: oe
|
|
3441
|
-
}) :
|
|
3445
|
+
}) : x && w.update({
|
|
3442
3446
|
floatingNodeId: T,
|
|
3443
3447
|
floatingParentNodeId: oe
|
|
3444
3448
|
});
|
|
3445
3449
|
}, [
|
|
3446
|
-
y,
|
|
3447
3450
|
b,
|
|
3451
|
+
x,
|
|
3448
3452
|
T,
|
|
3449
3453
|
oe,
|
|
3450
3454
|
w
|
|
@@ -3535,7 +3539,7 @@ var Pi = ce(function(e) {
|
|
|
3535
3539
|
return O.type !== "context-menu" || he.current?.type === "contextmenu" || xe.current;
|
|
3536
3540
|
},
|
|
3537
3541
|
externalTree: ge ? ae : void 0
|
|
3538
|
-
}), Pe =
|
|
3542
|
+
}), Pe = te(Ae, { role: "menu" }), Fe = h(), Ie = P.useCallback((e) => {
|
|
3539
3543
|
w.select("activeIndex") !== e && w.set("activeIndex", e);
|
|
3540
3544
|
}, [w]), Le = Xe(Ae, {
|
|
3541
3545
|
enabled: !le,
|
|
@@ -3550,7 +3554,7 @@ var Pi = ce(function(e) {
|
|
|
3550
3554
|
onNavigate: Ie,
|
|
3551
3555
|
openOnArrowKeyDown: O.type !== "context-menu",
|
|
3552
3556
|
externalTree: ge ? ae : void 0,
|
|
3553
|
-
focusItemOnHover:
|
|
3557
|
+
focusItemOnHover: y
|
|
3554
3558
|
}), ze = P.useCallback((e) => {
|
|
3555
3559
|
w.context.typingRef.current = e;
|
|
3556
3560
|
}, [w]), Be = _(Ae, {
|
|
@@ -3562,7 +3566,7 @@ var Pi = ce(function(e) {
|
|
|
3562
3566
|
E && e !== k && w.set("activeIndex", e);
|
|
3563
3567
|
},
|
|
3564
3568
|
onTypingChange: ze
|
|
3565
|
-
}), { getReferenceProps: Ve, getFloatingProps: Ue, getItemProps: Ge, getTriggerProps: Ke } =
|
|
3569
|
+
}), { getReferenceProps: Ve, getFloatingProps: Ue, getItemProps: Ge, getTriggerProps: Ke } = ee([
|
|
3566
3570
|
Me,
|
|
3567
3571
|
Pe,
|
|
3568
3572
|
Le,
|
|
@@ -3656,7 +3660,7 @@ function Ii(e = {}) {
|
|
|
3656
3660
|
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+fa6c2f29eeb10566/node_modules/@base-ui/react/esm/internals/composite/item/CompositeItem.js
|
|
3657
3661
|
function Li(e) {
|
|
3658
3662
|
let { render: t, className: n, style: r, state: i = Ze, props: a = S, refs: o = S, metadata: s, stateAttributesMapping: c, tag: l = "div", ...u } = e, { compositeProps: d, compositeRef: f } = Ii({ metadata: s });
|
|
3659
|
-
return
|
|
3663
|
+
return v(l, e, {
|
|
3660
3664
|
state: i,
|
|
3661
3665
|
ref: [...o, f],
|
|
3662
3666
|
props: [
|
|
@@ -3697,7 +3701,7 @@ function zi(e) {
|
|
|
3697
3701
|
var Bi = 2, Vi = d(function(e, t) {
|
|
3698
3702
|
let { render: n, className: r, disabled: i = !1, nativeButton: a = !0, id: o, openOnHover: l, delay: u = 100, closeDelay: d = 0, handle: f, payload: p, style: m, ...h } = e, g = Zr(!0), _ = f?.store ?? g?.store;
|
|
3699
3703
|
if (!_) throw Error(process.env.NODE_ENV === "production" ? De(85) : "Base UI: <Menu.Trigger> must be either used within a <Menu.Root> component or provided with a handle.");
|
|
3700
|
-
let
|
|
3704
|
+
let b = T(o), x = _.useState("isTriggerActive", b), te = _.useState("floatingRootContext"), S = _.useState("isOpenedByTrigger", b), ne = P.useRef(null), C = Ui(), re = s(!0), w = ut(), ie = P.useMemo(() => w ?? new Ee(), [w]), ae = Ce(ie), oe = He(), { registerTrigger: se, isMountedByThisTrigger: ce } = ot(b, ne, _, {
|
|
3701
3705
|
payload: p,
|
|
3702
3706
|
closeDelay: d,
|
|
3703
3707
|
parent: C,
|
|
@@ -3734,7 +3738,7 @@ var Bi = 2, Vi = d(function(e, t) {
|
|
|
3734
3738
|
pe,
|
|
3735
3739
|
_
|
|
3736
3740
|
]);
|
|
3737
|
-
let me = D && C.context.hasSubmenuOpen, he = yt(
|
|
3741
|
+
let me = D && C.context.hasSubmenuOpen, he = yt(te, {
|
|
3738
3742
|
enabled: (l ?? me) && !ue && C.type !== "context-menu" && (!D || me && !ce),
|
|
3739
3743
|
handleClose: _t({ blockPointerEvents: !D }),
|
|
3740
3744
|
mouseOnly: !0,
|
|
@@ -3743,19 +3747,19 @@ var Bi = 2, Vi = d(function(e, t) {
|
|
|
3743
3747
|
delay: { close: d },
|
|
3744
3748
|
triggerElementRef: ne,
|
|
3745
3749
|
externalTree: ie,
|
|
3746
|
-
isActiveTrigger:
|
|
3750
|
+
isActiveTrigger: x,
|
|
3747
3751
|
isClosing: () => _.select("transitionStatus") === "ending"
|
|
3748
|
-
}), ge = Hi(S, _.select("lastOpenChangeReason")), ve = Ie(
|
|
3752
|
+
}), ge = Hi(S, _.select("lastOpenChangeReason")), ve = Ie(te, {
|
|
3749
3753
|
enabled: !ue && C.type !== "context-menu",
|
|
3750
3754
|
event: S && D ? "click" : "mousedown",
|
|
3751
3755
|
toggle: !0,
|
|
3752
3756
|
ignoreMouse: !1,
|
|
3753
3757
|
stickIfOpen: C.type === void 0 && ge
|
|
3754
|
-
}), be = gt(
|
|
3758
|
+
}), be = gt(te, { enabled: !ue && me }), xe = zi({
|
|
3755
3759
|
open: S,
|
|
3756
3760
|
enabled: D,
|
|
3757
3761
|
mouseDownAction: "open"
|
|
3758
|
-
}), Se =
|
|
3762
|
+
}), Se = ee([ve, be]), we = {
|
|
3759
3763
|
disabled: ue,
|
|
3760
3764
|
open: S
|
|
3761
3765
|
}, Te = _.useState("triggerProps", ce), Oe = [
|
|
@@ -3770,7 +3774,7 @@ var Bi = 2, Vi = d(function(e, t) {
|
|
|
3770
3774
|
Te,
|
|
3771
3775
|
{
|
|
3772
3776
|
"aria-haspopup": "menu",
|
|
3773
|
-
id:
|
|
3777
|
+
id: b,
|
|
3774
3778
|
onMouseDown: (e) => {
|
|
3775
3779
|
_.select("open") || (fe.start(200, () => {
|
|
3776
3780
|
_.context.allowMouseUpTriggerRef.current = !0;
|
|
@@ -3781,9 +3785,9 @@ var Bi = 2, Vi = d(function(e, t) {
|
|
|
3781
3785
|
xe,
|
|
3782
3786
|
h,
|
|
3783
3787
|
O
|
|
3784
|
-
], { preFocusGuardRef: Ae, handlePreFocusGuardFocus: Me, handleFocusTargetFocus: Ne } = xt(_, ne), Pe =
|
|
3788
|
+
], { preFocusGuardRef: Ae, handlePreFocusGuardFocus: Me, handleFocusTargetFocus: Ne } = xt(_, ne), Pe = v("button", e, {
|
|
3785
3789
|
enabled: !D,
|
|
3786
|
-
stateAttributesMapping:
|
|
3790
|
+
stateAttributesMapping: y,
|
|
3787
3791
|
state: we,
|
|
3788
3792
|
ref: Oe,
|
|
3789
3793
|
props: ke
|
|
@@ -3796,18 +3800,18 @@ var Bi = 2, Vi = d(function(e, t) {
|
|
|
3796
3800
|
state: we,
|
|
3797
3801
|
refs: Oe,
|
|
3798
3802
|
props: ke,
|
|
3799
|
-
stateAttributesMapping:
|
|
3803
|
+
stateAttributesMapping: y
|
|
3800
3804
|
}) : S ? /*#__PURE__*/ N(P.Fragment, { children: [
|
|
3801
3805
|
/*#__PURE__*/ M(ft, {
|
|
3802
3806
|
ref: Ae,
|
|
3803
3807
|
onFocus: Me
|
|
3804
|
-
}, `${
|
|
3805
|
-
/*#__PURE__*/ M(P.Fragment, { children: Pe },
|
|
3808
|
+
}, `${b}-pre-focus-guard`),
|
|
3809
|
+
/*#__PURE__*/ M(P.Fragment, { children: Pe }, b),
|
|
3806
3810
|
/*#__PURE__*/ M(ft, {
|
|
3807
3811
|
ref: _.context.triggerFocusTargetRef,
|
|
3808
3812
|
onFocus: Ne
|
|
3809
|
-
}, `${
|
|
3810
|
-
] }) : /*#__PURE__*/ M(P.Fragment, { children: Pe },
|
|
3813
|
+
}, `${b}-post-focus-guard`)
|
|
3814
|
+
] }) : /*#__PURE__*/ M(P.Fragment, { children: Pe }, b);
|
|
3811
3815
|
});
|
|
3812
3816
|
process.env.NODE_ENV !== "production" && (Vi.displayName = "MenuTrigger");
|
|
3813
3817
|
function Hi(e, t) {
|
|
@@ -3844,15 +3848,15 @@ function Wi(e) {
|
|
|
3844
3848
|
//#endregion
|
|
3845
3849
|
//#region ../../node_modules/.bun/@base-ui+react@1.4.1+fa6c2f29eeb10566/node_modules/@base-ui/react/esm/menu/submenu-trigger/MenuSubmenuTrigger.js
|
|
3846
3850
|
var Gi = /*#__PURE__*/ P.forwardRef(function(e, t) {
|
|
3847
|
-
let { render: n, className: r, label: i, id: a, nativeButton: o = !1, openOnHover: s = !0, delay: c = 100, closeDelay: l = 0, disabled: u = !1, style: d, ...f } = e, p = we(), m = Yr(), { store: h } = Zr(), g = T(a), _ = h.useState("open"),
|
|
3848
|
-
let t =
|
|
3851
|
+
let { render: n, className: r, label: i, id: a, nativeButton: o = !1, openOnHover: s = !0, delay: c = 100, closeDelay: l = 0, disabled: u = !1, style: d, ...f } = e, p = we(), m = Yr(), { store: h } = Zr(), g = T(a), _ = h.useState("open"), y = h.useState("floatingRootContext"), b = h.useState("floatingTreeRoot"), x = Ge(g, h), te = P.useCallback((e) => {
|
|
3852
|
+
let t = x(e);
|
|
3849
3853
|
return e !== null && h.select("open") && h.select("activeTriggerId") == null && h.update({
|
|
3850
3854
|
activeTriggerId: g,
|
|
3851
3855
|
activeTriggerElement: e,
|
|
3852
3856
|
closeDelay: l
|
|
3853
3857
|
}), t;
|
|
3854
3858
|
}, [
|
|
3855
|
-
|
|
3859
|
+
x,
|
|
3856
3860
|
l,
|
|
3857
3861
|
h,
|
|
3858
3862
|
g
|
|
@@ -3884,7 +3888,7 @@ var Gi = /*#__PURE__*/ P.forwardRef(function(e, t) {
|
|
|
3884
3888
|
nativeButton: o,
|
|
3885
3889
|
itemMetadata: ae,
|
|
3886
3890
|
nodeId: m?.context.nodeId
|
|
3887
|
-
}), le = h.useState("hoverEnabled"), ue = re.useState("allowMouseEnter"), O = yt(
|
|
3891
|
+
}), le = h.useState("hoverEnabled"), ue = re.useState("allowMouseEnter"), O = yt(y, {
|
|
3888
3892
|
enabled: le && s && !E,
|
|
3889
3893
|
handleClose: _t({ blockPointerEvents: !0 }),
|
|
3890
3894
|
mouseOnly: !0,
|
|
@@ -3895,16 +3899,16 @@ var Gi = /*#__PURE__*/ P.forwardRef(function(e, t) {
|
|
|
3895
3899
|
close: l
|
|
3896
3900
|
} : 0,
|
|
3897
3901
|
triggerElementRef: S,
|
|
3898
|
-
externalTree:
|
|
3902
|
+
externalTree: b,
|
|
3899
3903
|
isClosing: () => h.select("transitionStatus") === "ending"
|
|
3900
|
-
}), de = Ie(
|
|
3904
|
+
}), de = Ie(y, {
|
|
3901
3905
|
enabled: !E,
|
|
3902
3906
|
event: "mousedown",
|
|
3903
3907
|
toggle: !s,
|
|
3904
3908
|
ignoreMouse: s,
|
|
3905
3909
|
stickIfOpen: !1
|
|
3906
|
-
}), k =
|
|
3907
|
-
return delete fe.id,
|
|
3910
|
+
}), k = ee([de]), fe = h.useState("triggerProps", !0);
|
|
3911
|
+
return delete fe.id, v("div", e, {
|
|
3908
3912
|
state: {
|
|
3909
3913
|
disabled: E,
|
|
3910
3914
|
highlighted: ie,
|
|
@@ -3929,7 +3933,7 @@ var Gi = /*#__PURE__*/ P.forwardRef(function(e, t) {
|
|
|
3929
3933
|
t,
|
|
3930
3934
|
p.ref,
|
|
3931
3935
|
ce,
|
|
3932
|
-
|
|
3936
|
+
te,
|
|
3933
3937
|
ne
|
|
3934
3938
|
]
|
|
3935
3939
|
});
|
|
@@ -4005,7 +4009,7 @@ function Zi({ align: e = "start", alignOffset: t = 0, container: n, side: r = "b
|
|
|
4005
4009
|
sideOffset: i,
|
|
4006
4010
|
children: /* @__PURE__ */ M(hi, {
|
|
4007
4011
|
"data-slot": "dropdown-menu-content",
|
|
4008
|
-
className:
|
|
4012
|
+
className: b("z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto overscroll-contain rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:animate-none motion-reduce:transition-none", a),
|
|
4009
4013
|
...o
|
|
4010
4014
|
})
|
|
4011
4015
|
})
|
|
@@ -4021,7 +4025,7 @@ function $i({ className: e, inset: t, ...n }) {
|
|
|
4021
4025
|
return /* @__PURE__ */ M(fi, {
|
|
4022
4026
|
"data-slot": "dropdown-menu-label",
|
|
4023
4027
|
"data-inset": t,
|
|
4024
|
-
className:
|
|
4028
|
+
className: b("px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7", e),
|
|
4025
4029
|
...n
|
|
4026
4030
|
});
|
|
4027
4031
|
}
|
|
@@ -4030,7 +4034,7 @@ function ea({ className: e, inset: t, variant: n = "default", ...r }) {
|
|
|
4030
4034
|
"data-slot": "dropdown-menu-item",
|
|
4031
4035
|
"data-inset": t,
|
|
4032
4036
|
"data-variant": n,
|
|
4033
|
-
className:
|
|
4037
|
+
className: b("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive", e),
|
|
4034
4038
|
...r
|
|
4035
4039
|
});
|
|
4036
4040
|
}
|
|
@@ -4044,7 +4048,7 @@ function na({ className: e, inset: t, children: n, ...r }) {
|
|
|
4044
4048
|
return /* @__PURE__ */ N(Gi, {
|
|
4045
4049
|
"data-slot": "dropdown-menu-sub-trigger",
|
|
4046
4050
|
"data-inset": t,
|
|
4047
|
-
className:
|
|
4051
|
+
className: b("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", e),
|
|
4048
4052
|
...r,
|
|
4049
4053
|
children: [n, /* @__PURE__ */ M(sn, { className: "ml-auto" })]
|
|
4050
4054
|
});
|
|
@@ -4052,7 +4056,7 @@ function na({ className: e, inset: t, children: n, ...r }) {
|
|
|
4052
4056
|
function ra({ align: e = "start", alignOffset: t = -3, side: n = "right", sideOffset: r = 0, className: i, ...a }) {
|
|
4053
4057
|
return /* @__PURE__ */ M(Zi, {
|
|
4054
4058
|
"data-slot": "dropdown-menu-sub-content",
|
|
4055
|
-
className:
|
|
4059
|
+
className: b("w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95 motion-reduce:animate-none motion-reduce:transition-none", i),
|
|
4056
4060
|
align: e,
|
|
4057
4061
|
alignOffset: t,
|
|
4058
4062
|
side: n,
|
|
@@ -4064,7 +4068,7 @@ function ia({ className: e, children: t, checked: n, inset: r, ...i }) {
|
|
|
4064
4068
|
return /* @__PURE__ */ N(si, {
|
|
4065
4069
|
"data-slot": "dropdown-menu-checkbox-item",
|
|
4066
4070
|
"data-inset": r,
|
|
4067
|
-
className:
|
|
4071
|
+
className: b("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", e),
|
|
4068
4072
|
checked: n,
|
|
4069
4073
|
...i,
|
|
4070
4074
|
children: [/* @__PURE__ */ M("span", {
|
|
@@ -4087,7 +4091,7 @@ function oa({ className: e, children: t, inset: n, ...r }) {
|
|
|
4087
4091
|
return /* @__PURE__ */ N(Ti, {
|
|
4088
4092
|
"data-slot": "dropdown-menu-radio-item",
|
|
4089
4093
|
"data-inset": n,
|
|
4090
|
-
className:
|
|
4094
|
+
className: b("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", e),
|
|
4091
4095
|
...r,
|
|
4092
4096
|
children: [/* @__PURE__ */ M("span", {
|
|
4093
4097
|
className: "pointer-events-none absolute inset-y-0 right-2 flex items-center justify-center",
|
|
@@ -4102,7 +4106,7 @@ function oa({ className: e, children: t, inset: n, ...r }) {
|
|
|
4102
4106
|
function sa({ className: e, ...t }) {
|
|
4103
4107
|
return /* @__PURE__ */ M(st, {
|
|
4104
4108
|
"data-slot": "dropdown-menu-separator",
|
|
4105
|
-
className:
|
|
4109
|
+
className: b("-mx-1 my-1 h-px bg-border", e),
|
|
4106
4110
|
...t
|
|
4107
4111
|
});
|
|
4108
4112
|
}
|
|
@@ -4111,14 +4115,14 @@ function sa({ className: e, ...t }) {
|
|
|
4111
4115
|
function ca({ className: e, ...t }) {
|
|
4112
4116
|
return /* @__PURE__ */ M("div", {
|
|
4113
4117
|
"data-slot": "empty",
|
|
4114
|
-
className:
|
|
4118
|
+
className: b("flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance", e),
|
|
4115
4119
|
...t
|
|
4116
4120
|
});
|
|
4117
4121
|
}
|
|
4118
4122
|
function la({ className: e, ...t }) {
|
|
4119
4123
|
return /* @__PURE__ */ M("div", {
|
|
4120
4124
|
"data-slot": "empty-header",
|
|
4121
|
-
className:
|
|
4125
|
+
className: b("flex max-w-sm flex-col items-center gap-2", e),
|
|
4122
4126
|
...t
|
|
4123
4127
|
});
|
|
4124
4128
|
}
|
|
@@ -4133,7 +4137,7 @@ function da({ className: e, variant: t = "default", ...n }) {
|
|
|
4133
4137
|
return /* @__PURE__ */ M("div", {
|
|
4134
4138
|
"data-slot": "empty-icon",
|
|
4135
4139
|
"data-variant": t,
|
|
4136
|
-
className:
|
|
4140
|
+
className: b(ua({
|
|
4137
4141
|
variant: t,
|
|
4138
4142
|
className: e
|
|
4139
4143
|
})),
|
|
@@ -4143,21 +4147,21 @@ function da({ className: e, variant: t = "default", ...n }) {
|
|
|
4143
4147
|
function fa({ className: e, ...t }) {
|
|
4144
4148
|
return /* @__PURE__ */ M("div", {
|
|
4145
4149
|
"data-slot": "empty-title",
|
|
4146
|
-
className:
|
|
4150
|
+
className: b("text-sm font-medium tracking-tight", e),
|
|
4147
4151
|
...t
|
|
4148
4152
|
});
|
|
4149
4153
|
}
|
|
4150
4154
|
function pa({ className: e, ...t }) {
|
|
4151
4155
|
return /* @__PURE__ */ M("div", {
|
|
4152
4156
|
"data-slot": "empty-description",
|
|
4153
|
-
className:
|
|
4157
|
+
className: b("text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary", e),
|
|
4154
4158
|
...t
|
|
4155
4159
|
});
|
|
4156
4160
|
}
|
|
4157
4161
|
function ma({ className: e, ...t }) {
|
|
4158
4162
|
return /* @__PURE__ */ M("div", {
|
|
4159
4163
|
"data-slot": "empty-content",
|
|
4160
|
-
className:
|
|
4164
|
+
className: b("flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance", e),
|
|
4161
4165
|
...t
|
|
4162
4166
|
});
|
|
4163
4167
|
}
|
|
@@ -4166,7 +4170,7 @@ function ma({ className: e, ...t }) {
|
|
|
4166
4170
|
function ha({ className: e, ...t }) {
|
|
4167
4171
|
return /* @__PURE__ */ M("div", {
|
|
4168
4172
|
"data-slot": "skeleton",
|
|
4169
|
-
className:
|
|
4173
|
+
className: b("animate-pulse rounded-md bg-muted motion-reduce:animate-none", e),
|
|
4170
4174
|
...t
|
|
4171
4175
|
});
|
|
4172
4176
|
}
|
|
@@ -4436,16 +4440,8 @@ function Oa(e, t, n) {
|
|
|
4436
4440
|
return [{
|
|
4437
4441
|
kind: "graph.node.create",
|
|
4438
4442
|
node: {
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
jsonSchema: {},
|
|
4442
|
-
nullable: !0,
|
|
4443
|
-
value: null
|
|
4444
|
-
},
|
|
4445
|
-
inputs: { value: {
|
|
4446
|
-
kind: "value",
|
|
4447
|
-
value: null
|
|
4448
|
-
} },
|
|
4443
|
+
inputDefinitions: [],
|
|
4444
|
+
inputs: {},
|
|
4449
4445
|
kind: "wait",
|
|
4450
4446
|
name: n,
|
|
4451
4447
|
prompt: n
|
|
@@ -4458,16 +4454,8 @@ function ka(e, t, n) {
|
|
|
4458
4454
|
return [{
|
|
4459
4455
|
kind: "graph.node.create",
|
|
4460
4456
|
node: {
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
jsonSchema: {},
|
|
4464
|
-
nullable: !0,
|
|
4465
|
-
value: null
|
|
4466
|
-
},
|
|
4467
|
-
inputs: { value: {
|
|
4468
|
-
kind: "value",
|
|
4469
|
-
value: null
|
|
4470
|
-
} },
|
|
4457
|
+
inputDefinitions: [],
|
|
4458
|
+
inputs: {},
|
|
4471
4459
|
kind: "approval",
|
|
4472
4460
|
name: n,
|
|
4473
4461
|
prompt: n
|
|
@@ -7469,7 +7457,7 @@ function hu(e, t) {
|
|
|
7469
7457
|
case "subflow": return Et(e.subflows[t.subflowId]?.inputs ?? []);
|
|
7470
7458
|
case "task": return Et([...t.task == null ? e.tasks[t.taskId]?.inputs ?? [] : t.task.inputs, ...t.additionalInputs ?? []]);
|
|
7471
7459
|
case "approval":
|
|
7472
|
-
case "wait": return
|
|
7460
|
+
case "wait": return Et(t.inputDefinitions);
|
|
7473
7461
|
case "cron":
|
|
7474
7462
|
case "integration":
|
|
7475
7463
|
case "poll":
|
|
@@ -7480,47 +7468,38 @@ function hu(e, t) {
|
|
|
7480
7468
|
function gu(e) {
|
|
7481
7469
|
return e.kind == "wait" ? ["continue"] : ["approve", "reject"];
|
|
7482
7470
|
}
|
|
7483
|
-
|
|
7484
|
-
|
|
7471
|
+
var _u = (e) => ({
|
|
7472
|
+
nullable: !1,
|
|
7473
|
+
jsonSchema: {
|
|
7474
|
+
type: "object",
|
|
7475
|
+
properties: e,
|
|
7476
|
+
required: Object.keys(e),
|
|
7477
|
+
additionalProperties: !1
|
|
7478
|
+
}
|
|
7479
|
+
});
|
|
7480
|
+
function vu(e) {
|
|
7481
|
+
let t = gu(e), n = {
|
|
7482
|
+
type: "object",
|
|
7483
|
+
properties: Object.fromEntries(e.inputDefinitions.map((e) => [e.handle, {}])),
|
|
7484
|
+
required: e.inputDefinitions.map((e) => e.handle),
|
|
7485
|
+
additionalProperties: !1
|
|
7486
|
+
};
|
|
7485
7487
|
return {
|
|
7486
|
-
pending: {
|
|
7487
|
-
|
|
7488
|
-
|
|
7489
|
-
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
|
|
7494
|
-
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
action: { enum: t },
|
|
7499
|
-
url: { type: "string" }
|
|
7500
|
-
},
|
|
7501
|
-
required: ["action", "url"],
|
|
7502
|
-
additionalProperties: !1
|
|
7503
|
-
}
|
|
7504
|
-
},
|
|
7505
|
-
expiresAt: { type: "string" }
|
|
7506
|
-
},
|
|
7507
|
-
required: [
|
|
7508
|
-
"value",
|
|
7509
|
-
"prompt",
|
|
7510
|
-
"actions",
|
|
7511
|
-
"expiresAt"
|
|
7512
|
-
],
|
|
7513
|
-
additionalProperties: !1
|
|
7514
|
-
}
|
|
7515
|
-
},
|
|
7516
|
-
...Object.fromEntries(t.map((t) => [t, {
|
|
7517
|
-
jsonSchema: e.input.jsonSchema,
|
|
7518
|
-
nullable: e.input.nullable,
|
|
7519
|
-
...e.input.description == null ? {} : { description: e.input.description }
|
|
7520
|
-
}]))
|
|
7488
|
+
pending: _u({
|
|
7489
|
+
inputs: n,
|
|
7490
|
+
prompt: { type: "string" },
|
|
7491
|
+
...Object.fromEntries(t.map((e) => [`${e}Url`, { type: "string" }])),
|
|
7492
|
+
expiresAt: { type: "string" }
|
|
7493
|
+
}),
|
|
7494
|
+
...Object.fromEntries(t.map((e) => [e, _u({
|
|
7495
|
+
inputs: n,
|
|
7496
|
+
action: { const: e },
|
|
7497
|
+
resolvedAt: { type: "string" },
|
|
7498
|
+
comment: { type: ["string", "null"] }
|
|
7499
|
+
})]))
|
|
7521
7500
|
};
|
|
7522
7501
|
}
|
|
7523
|
-
function
|
|
7502
|
+
function yu(e, t) {
|
|
7524
7503
|
switch (t.kind) {
|
|
7525
7504
|
case "condition": {
|
|
7526
7505
|
let e = [...t.cases.map((e) => e.output), ...t.defaultOutput == null ? [] : [t.defaultOutput]];
|
|
@@ -7530,7 +7509,7 @@ function vu(e, t) {
|
|
|
7530
7509
|
case "subflow": return Et(e.subflows[t.subflowId]?.outputs ?? []);
|
|
7531
7510
|
case "task": return Et(t.task == null ? e.tasks[t.taskId]?.outputs ?? [] : t.task.outputs);
|
|
7532
7511
|
case "approval":
|
|
7533
|
-
case "wait": return
|
|
7512
|
+
case "wait": return vu(t);
|
|
7534
7513
|
case "cron":
|
|
7535
7514
|
case "integration":
|
|
7536
7515
|
case "poll":
|
|
@@ -7538,11 +7517,11 @@ function vu(e, t) {
|
|
|
7538
7517
|
case "webhook": return pu(t);
|
|
7539
7518
|
}
|
|
7540
7519
|
}
|
|
7541
|
-
function
|
|
7520
|
+
function bu(e, t, n, r) {
|
|
7542
7521
|
let i = t.nodes[n];
|
|
7543
|
-
return i == null ? void 0 :
|
|
7522
|
+
return i == null ? void 0 : yu(e, i)[r]?.description;
|
|
7544
7523
|
}
|
|
7545
|
-
function
|
|
7524
|
+
function xu(e) {
|
|
7546
7525
|
let t = new Map(Object.keys(e.nodes).map((e) => [e, /* @__PURE__ */ new Set()])), n = /* @__PURE__ */ new Map();
|
|
7547
7526
|
for (let r of e.edges) {
|
|
7548
7527
|
if (!t.has(r.source) || !t.has(r.target)) continue;
|
|
@@ -7561,25 +7540,25 @@ function bu(e) {
|
|
|
7561
7540
|
}
|
|
7562
7541
|
return [...r, ...[...t.keys()].toSorted()];
|
|
7563
7542
|
}
|
|
7564
|
-
var
|
|
7565
|
-
function
|
|
7543
|
+
var Su = /* @__PURE__ */ new WeakMap();
|
|
7544
|
+
function Cu(e, t) {
|
|
7566
7545
|
return Object.entries(e).every(([e, n]) => t[e] == n);
|
|
7567
7546
|
}
|
|
7568
|
-
function
|
|
7547
|
+
function wu(e, t) {
|
|
7569
7548
|
return Object.entries(e).every(([e, n]) => t[e] == null || t[e] == n);
|
|
7570
7549
|
}
|
|
7571
|
-
function
|
|
7550
|
+
function Tu(e, t) {
|
|
7572
7551
|
return JSON.stringify([e, t]);
|
|
7573
7552
|
}
|
|
7574
|
-
function
|
|
7575
|
-
let t =
|
|
7553
|
+
function Eu(e) {
|
|
7554
|
+
let t = Su.get(e);
|
|
7576
7555
|
if (t != null) return t;
|
|
7577
7556
|
let n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map();
|
|
7578
7557
|
for (let t of e.edges) {
|
|
7579
7558
|
let e = a.get(t.target) ?? [];
|
|
7580
7559
|
e.push(t), a.set(t.target, e);
|
|
7581
7560
|
}
|
|
7582
|
-
let o =
|
|
7561
|
+
let o = xu(e), s = !0;
|
|
7583
7562
|
for (; s;) {
|
|
7584
7563
|
s = !1;
|
|
7585
7564
|
for (let t of o) {
|
|
@@ -7587,21 +7566,21 @@ function Tu(e) {
|
|
|
7587
7566
|
for (let t of c) {
|
|
7588
7567
|
l.add(t.source);
|
|
7589
7568
|
for (let e of i.get(t.source) ?? []) u.add(e);
|
|
7590
|
-
mu(e.nodes[t.source]) && t.sourceHandle != null && u.add(
|
|
7569
|
+
mu(e.nodes[t.source]) && t.sourceHandle != null && u.add(Tu(t.source, t.sourceHandle));
|
|
7591
7570
|
for (let e of r.get(t.source) ?? []) l.add(e);
|
|
7592
7571
|
for (let r of n.get(t.source) ?? []) {
|
|
7593
7572
|
let n = t.sourceHandle == null || mu(e.nodes[t.source]) && t.sourceHandle == "pending" ? r : {
|
|
7594
7573
|
...r,
|
|
7595
7574
|
[t.source]: t.sourceHandle
|
|
7596
7575
|
};
|
|
7597
|
-
if (!d.some((e) =>
|
|
7598
|
-
for (let e = d.length - 1; e >= 0; e--)
|
|
7576
|
+
if (!d.some((e) => Cu(e, n))) {
|
|
7577
|
+
for (let e = d.length - 1; e >= 0; e--) Cu(n, d[e]) && d.splice(e, 1);
|
|
7599
7578
|
d.push(n);
|
|
7600
7579
|
}
|
|
7601
7580
|
}
|
|
7602
7581
|
}
|
|
7603
7582
|
let f = c.length == 0 ? "inputs" in o ? [{}] : [{ $trigger: t }] : d, p = n.get(t) ?? [];
|
|
7604
|
-
(l.size != (r.get(t)?.size ?? 0) || u.size != (i.get(t)?.size ?? 0) || f.length != p.length || f.some((e) => !p.some((t) =>
|
|
7583
|
+
(l.size != (r.get(t)?.size ?? 0) || u.size != (i.get(t)?.size ?? 0) || f.length != p.length || f.some((e) => !p.some((t) => Cu(t, e) && Cu(e, t)))) && (s = !0), r.set(t, l), i.set(t, u), n.set(t, f);
|
|
7605
7584
|
}
|
|
7606
7585
|
}
|
|
7607
7586
|
let c = {
|
|
@@ -7609,9 +7588,9 @@ function Tu(e) {
|
|
|
7609
7588
|
paths: n,
|
|
7610
7589
|
resolutionOutputs: i
|
|
7611
7590
|
};
|
|
7612
|
-
return
|
|
7591
|
+
return Su.set(e, c), c;
|
|
7613
7592
|
}
|
|
7614
|
-
function
|
|
7593
|
+
function Du(e, t, n) {
|
|
7615
7594
|
if (n.kind != "node") return [{}];
|
|
7616
7595
|
let r = e.nodes[n.nodeId], i = t.get(n.nodeId) ?? [];
|
|
7617
7596
|
return r?.kind == "condition" || mu(r) && n.output != "pending" ? i.map((e) => ({
|
|
@@ -7619,61 +7598,61 @@ function Eu(e, t, n) {
|
|
|
7619
7598
|
[n.nodeId]: n.output
|
|
7620
7599
|
})) : i;
|
|
7621
7600
|
}
|
|
7622
|
-
function
|
|
7601
|
+
function Ou(e, t, n, r) {
|
|
7623
7602
|
if (n.kind == "value") return !0;
|
|
7624
7603
|
let { ancestors: i, paths: a } = r;
|
|
7625
|
-
if (t != null && n.sources.some((e) => e.kind == "node" && !i.get(t)?.has(e.nodeId)) || t != null && n.sources.some((n) => n.kind == "node" && mu(e.nodes[n.nodeId]) && !r.resolutionOutputs.get(t)?.has(
|
|
7626
|
-
let o = n.sources.map((t) =>
|
|
7604
|
+
if (t != null && n.sources.some((e) => e.kind == "node" && !i.get(t)?.has(e.nodeId)) || t != null && n.sources.some((n) => n.kind == "node" && mu(e.nodes[n.nodeId]) && !r.resolutionOutputs.get(t)?.has(Tu(n.nodeId, n.output)))) return !1;
|
|
7605
|
+
let o = n.sources.map((t) => Du(e, a, t)), s = t == null ? [{}] : a.get(t) ?? [];
|
|
7627
7606
|
for (let [e, r] of o.entries()) for (let [a, c] of o.slice(e + 1).entries()) {
|
|
7628
7607
|
let o = n.sources[e], l = n.sources[e + a + 1];
|
|
7629
7608
|
if (!(t != null && o.kind == "node" && l.kind == "node" && o.nodeId != l.nodeId && !i.get(o.nodeId)?.has(l.nodeId) && !i.get(l.nodeId)?.has(o.nodeId))) for (let e of r) for (let t of s) {
|
|
7630
|
-
if (!
|
|
7609
|
+
if (!wu(e, t)) continue;
|
|
7631
7610
|
let n = {
|
|
7632
7611
|
...t,
|
|
7633
7612
|
...e
|
|
7634
7613
|
};
|
|
7635
|
-
if (c.some((e) =>
|
|
7614
|
+
if (c.some((e) => wu(e, n))) return !1;
|
|
7636
7615
|
}
|
|
7637
7616
|
}
|
|
7638
7617
|
return !0;
|
|
7639
7618
|
}
|
|
7640
|
-
function
|
|
7619
|
+
function ku(e, t, n, r, i) {
|
|
7641
7620
|
let a = t.nodes[i.nodeId], o = t.nodes[n];
|
|
7642
7621
|
if (a == null) return { kind: "source-missing" };
|
|
7643
7622
|
if (o == null) return { kind: "not-ready" };
|
|
7644
|
-
let s =
|
|
7623
|
+
let s = yu(e, a)[i.output], c = hu(e, o)[r];
|
|
7645
7624
|
if (s == null) return { kind: "output-missing" };
|
|
7646
7625
|
if (c == null) return { kind: "not-ready" };
|
|
7647
|
-
let l =
|
|
7648
|
-
if (l.ancestors.get(n)?.has(i.nodeId) !== !0 || mu(a) && !l.resolutionOutputs.get(n)?.has(
|
|
7626
|
+
let l = Eu(t);
|
|
7627
|
+
if (l.ancestors.get(n)?.has(i.nodeId) !== !0 || mu(a) && !l.resolutionOutputs.get(n)?.has(Tu(i.nodeId, i.output))) return { kind: "not-ready" };
|
|
7649
7628
|
let u = cu(s, c);
|
|
7650
7629
|
return u.kind == "compatible" ? { kind: "available" } : u.kind == "incompatible" ? {
|
|
7651
7630
|
kind: "schema",
|
|
7652
7631
|
mismatch: u.mismatch
|
|
7653
7632
|
} : { kind: "schema-error" };
|
|
7654
7633
|
}
|
|
7655
|
-
function
|
|
7656
|
-
let a = i.map((i) =>
|
|
7634
|
+
function Au(e, t, n, r, i) {
|
|
7635
|
+
let a = i.map((i) => ku(e, t, n, r, i));
|
|
7657
7636
|
return {
|
|
7658
|
-
conflict: a.length > 1 && a.every((e) => e.kind == "available") && !
|
|
7637
|
+
conflict: a.length > 1 && a.every((e) => e.kind == "available") && !Ou(t, n, {
|
|
7659
7638
|
kind: "sources",
|
|
7660
7639
|
sources: i.map((e) => ({
|
|
7661
7640
|
kind: "node",
|
|
7662
7641
|
...e
|
|
7663
7642
|
}))
|
|
7664
|
-
},
|
|
7643
|
+
}, Eu(t)),
|
|
7665
7644
|
sources: a
|
|
7666
7645
|
};
|
|
7667
7646
|
}
|
|
7668
|
-
function
|
|
7647
|
+
function ju(e, t, n, r) {
|
|
7669
7648
|
let i = t.nodes[n], a = i == null ? void 0 : hu(e, i)[r];
|
|
7670
7649
|
if (a == null) return {};
|
|
7671
|
-
let o =
|
|
7650
|
+
let o = Eu(t);
|
|
7672
7651
|
return Object.fromEntries([...o.ancestors.get(n) ?? []].flatMap((r) => {
|
|
7673
7652
|
let i = t.nodes[r];
|
|
7674
7653
|
if (i == null) return [];
|
|
7675
|
-
let s = Object.entries(
|
|
7676
|
-
if (!
|
|
7654
|
+
let s = Object.entries(yu(e, i)).flatMap(([e, i]) => {
|
|
7655
|
+
if (!Ou(t, n, {
|
|
7677
7656
|
kind: "sources",
|
|
7678
7657
|
sources: [{
|
|
7679
7658
|
kind: "node",
|
|
@@ -7810,11 +7789,11 @@ var Q = Mt(() => Gt([Pt(), jt({
|
|
|
7810
7789
|
}).transform(({ title: e, default: t, examples: n, readOnly: r, writeOnly: i, deprecated: a, $comment: o, ...s }) => s)]));
|
|
7811
7790
|
//#endregion
|
|
7812
7791
|
//#region src/flow/common/semantics.ts
|
|
7813
|
-
function
|
|
7792
|
+
function Mu(e) {
|
|
7814
7793
|
return Object.keys(e).toSorted().map((t) => [t, e[t]]);
|
|
7815
7794
|
}
|
|
7816
|
-
function
|
|
7817
|
-
if (t != null) return
|
|
7795
|
+
function Nu(e, t) {
|
|
7796
|
+
if (t != null) return Nu(Pu(e, t));
|
|
7818
7797
|
let n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set();
|
|
7819
7798
|
function s(e) {
|
|
7820
7799
|
n.add(e);
|
|
@@ -7829,7 +7808,7 @@ function Mu(e, t) {
|
|
|
7829
7808
|
for (let t of Object.values(e)) if (t.kind == "sources") for (let e of t.sources) e.kind == "binding" && (r.add(e.bindingId), s(e.bindingId));
|
|
7830
7809
|
}
|
|
7831
7810
|
function u(t) {
|
|
7832
|
-
for (let [, n] of
|
|
7811
|
+
for (let [, n] of Mu(t.nodes)) switch ("inputs" in n && l(n.inputs), n.kind) {
|
|
7833
7812
|
case "condition": break;
|
|
7834
7813
|
case "subflow":
|
|
7835
7814
|
d(n.subflowId);
|
|
@@ -7863,7 +7842,7 @@ function Mu(e, t) {
|
|
|
7863
7842
|
tasks: o
|
|
7864
7843
|
};
|
|
7865
7844
|
}
|
|
7866
|
-
function
|
|
7845
|
+
function Pu(e, t) {
|
|
7867
7846
|
let n = e.document.graph, r = /* @__PURE__ */ new Set([t]);
|
|
7868
7847
|
for (let e of r) for (let t of n.edges) t.source == e && r.add(t.target);
|
|
7869
7848
|
function i(e, t) {
|
|
@@ -7892,7 +7871,7 @@ function Nu(e, t) {
|
|
|
7892
7871
|
edges: n.edges.filter((e) => r.has(e.source))
|
|
7893
7872
|
}
|
|
7894
7873
|
}
|
|
7895
|
-
}, { bindings: s } =
|
|
7874
|
+
}, { bindings: s } = Nu(o);
|
|
7896
7875
|
return {
|
|
7897
7876
|
...o,
|
|
7898
7877
|
document: {
|
|
@@ -7901,7 +7880,7 @@ function Nu(e, t) {
|
|
|
7901
7880
|
}
|
|
7902
7881
|
};
|
|
7903
7882
|
}
|
|
7904
|
-
function
|
|
7883
|
+
function Fu(e) {
|
|
7905
7884
|
return Object.values(e.tasks).flatMap((t) => {
|
|
7906
7885
|
if (t.executor.kind != "agent") return [];
|
|
7907
7886
|
let n = t.executor.notification == null ? void 0 : e.tasks[t.executor.notification.taskId]?.executor;
|
|
@@ -7912,12 +7891,12 @@ function Pu(e) {
|
|
|
7912
7891
|
}));
|
|
7913
7892
|
});
|
|
7914
7893
|
}
|
|
7915
|
-
function
|
|
7894
|
+
function Iu(e) {
|
|
7916
7895
|
return [e.graph, ...Object.values(e.subflows).map((e) => e.graph)].flatMap((e) => Object.values(e.nodes).flatMap((e) => e.kind == "task" && e.task != null ? e.task.capabilities ?? [] : []));
|
|
7917
7896
|
}
|
|
7918
7897
|
//#endregion
|
|
7919
7898
|
//#region src/workbench/browser/runtime/revisionView.ts
|
|
7920
|
-
var
|
|
7899
|
+
var Lu = /* @__PURE__ */ new WeakMap(), Ru = class {
|
|
7921
7900
|
#e;
|
|
7922
7901
|
#t;
|
|
7923
7902
|
#n = /* @__PURE__ */ new WeakMap();
|
|
@@ -7927,7 +7906,7 @@ var Iu = /* @__PURE__ */ new WeakMap(), Lu = class {
|
|
|
7927
7906
|
this.revision = e, this.#e = e.content.document, this.#t = e.content.modules;
|
|
7928
7907
|
let t = /* @__PURE__ */ new Set();
|
|
7929
7908
|
for (let e of Object.values(this.#e.tasks)) e.executor.kind == "connector" && t.add(e.executor.action);
|
|
7930
|
-
for (let e of [...
|
|
7909
|
+
for (let e of [...Iu(this.#e), ...Fu(this.#e)]) t.add(e.action);
|
|
7931
7910
|
this.connectorActionIds = t;
|
|
7932
7911
|
}
|
|
7933
7912
|
subflow(e) {
|
|
@@ -7946,14 +7925,14 @@ var Iu = /* @__PURE__ */ new WeakMap(), Lu = class {
|
|
|
7946
7925
|
conflict: !1,
|
|
7947
7926
|
sources: []
|
|
7948
7927
|
} : void 0, d, f = {
|
|
7949
|
-
check: () => u ??=
|
|
7950
|
-
candidates: () => d ??=
|
|
7928
|
+
check: () => u ??= Au(this.#e, r, t, n, l),
|
|
7929
|
+
candidates: () => d ??= ju(this.#e, r, t, n)
|
|
7951
7930
|
};
|
|
7952
7931
|
return i ?? this.#r.set(r, i = /* @__PURE__ */ new Map()), i.set(a, f), f;
|
|
7953
7932
|
}
|
|
7954
7933
|
outputDescription(e, t, n) {
|
|
7955
7934
|
let r = this.graph(e);
|
|
7956
|
-
return r == null ? void 0 :
|
|
7935
|
+
return r == null ? void 0 : bu(this.#e, r, t, n);
|
|
7957
7936
|
}
|
|
7958
7937
|
designerInputs(e) {
|
|
7959
7938
|
let t = e.kind == "flow" ? { graph: this.#e.graph } : this.#e.subflows[e.id];
|
|
@@ -8080,13 +8059,13 @@ var Iu = /* @__PURE__ */ new WeakMap(), Lu = class {
|
|
|
8080
8059
|
return !1;
|
|
8081
8060
|
}
|
|
8082
8061
|
};
|
|
8083
|
-
function
|
|
8084
|
-
let t =
|
|
8085
|
-
return t ?? (t = new
|
|
8062
|
+
function zu(e) {
|
|
8063
|
+
let t = Lu.get(e);
|
|
8064
|
+
return t ?? (t = new Ru(e), Lu.set(e, t)), t;
|
|
8086
8065
|
}
|
|
8087
8066
|
//#endregion
|
|
8088
8067
|
//#region src/workbench/browser/runtime/runs/runStore.ts
|
|
8089
|
-
var
|
|
8068
|
+
var Bu = {}, Vu = {
|
|
8090
8069
|
eventCursor: 0,
|
|
8091
8070
|
eventFilter: "all",
|
|
8092
8071
|
events: [],
|
|
@@ -8101,34 +8080,34 @@ var zu = {}, Bu = {
|
|
|
8101
8080
|
resolvingActions: /* @__PURE__ */ new Map(),
|
|
8102
8081
|
runById: /* @__PURE__ */ new Map(),
|
|
8103
8082
|
runIds: []
|
|
8104
|
-
},
|
|
8105
|
-
function
|
|
8083
|
+
}, Hu = 100, Uu = 500, Wu = 1200, Gu = 6e4;
|
|
8084
|
+
function Ku(e) {
|
|
8106
8085
|
return e?.status == "queued" || e?.status == "starting" || e?.status == "running" || e?.status == "waiting";
|
|
8107
8086
|
}
|
|
8108
|
-
function
|
|
8087
|
+
function qu(e) {
|
|
8109
8088
|
return e.selectedRunId == null ? void 0 : e.runById.get(e.selectedRunId);
|
|
8110
8089
|
}
|
|
8111
|
-
function
|
|
8112
|
-
let n = new Map(t.map((e) => [e.runId, e])), r = t.map((e) => e.runId), i =
|
|
8113
|
-
return i != null && (!
|
|
8090
|
+
function Ju(e, t) {
|
|
8091
|
+
let n = new Map(t.map((e) => [e.runId, e])), r = t.map((e) => e.runId), i = qu(e);
|
|
8092
|
+
return i != null && (!Yu(e.target?.filter ?? Bu) && !n.has(i.runId) && r.unshift(i.runId), n.set(i.runId, i)), {
|
|
8114
8093
|
runById: n,
|
|
8115
8094
|
runIds: r
|
|
8116
8095
|
};
|
|
8117
8096
|
}
|
|
8118
|
-
function
|
|
8097
|
+
function Yu(e) {
|
|
8119
8098
|
return Object.values(e).some((e) => e != null);
|
|
8120
8099
|
}
|
|
8121
|
-
function
|
|
8100
|
+
function Xu(e, t) {
|
|
8122
8101
|
return new Map(e.runById).set(t.runId, t);
|
|
8123
8102
|
}
|
|
8124
|
-
var
|
|
8103
|
+
var Zu = class {
|
|
8125
8104
|
#e = new so();
|
|
8126
8105
|
#t;
|
|
8127
8106
|
#n;
|
|
8128
8107
|
#r = new so();
|
|
8129
8108
|
#i = new so();
|
|
8130
8109
|
#a;
|
|
8131
|
-
#o = n(
|
|
8110
|
+
#o = n(Vu);
|
|
8132
8111
|
#s;
|
|
8133
8112
|
constructor(t, n, i = bt()) {
|
|
8134
8113
|
this.#t = t, this.#n = i, this.#a = n, this.$ = {
|
|
@@ -8137,7 +8116,7 @@ var Xu = class {
|
|
|
8137
8116
|
events: e(this.#o, (e) => e.events),
|
|
8138
8117
|
eventsExpiresAt: e(this.#o, (e) => e.eventsExpiresAt),
|
|
8139
8118
|
externalRunId: e(this.#o, (e) => e.externalRunId),
|
|
8140
|
-
filter: e(this.#o, (e) => e.target?.filter ??
|
|
8119
|
+
filter: e(this.#o, (e) => e.target?.filter ?? Bu),
|
|
8141
8120
|
historyComplete: e(this.#o, (e) => e.historyComplete),
|
|
8142
8121
|
loadFailed: e(this.#o, (e) => e.loadFailed),
|
|
8143
8122
|
loading: e(this.#o, (e) => e.loading),
|
|
@@ -8148,7 +8127,7 @@ var Xu = class {
|
|
|
8148
8127
|
refreshing: e(this.#o, (e) => e.refreshing),
|
|
8149
8128
|
result: e(this.#o, (e) => e.result),
|
|
8150
8129
|
resolvingActions: e(this.#o, (e) => e.resolvingActions),
|
|
8151
|
-
run: e(this.#o,
|
|
8130
|
+
run: e(this.#o, qu),
|
|
8152
8131
|
runs: e(this.#o, (e) => e.runIds.flatMap((t) => {
|
|
8153
8132
|
let n = e.runById.get(t);
|
|
8154
8133
|
return n == null ? [] : [n];
|
|
@@ -8161,10 +8140,10 @@ var Xu = class {
|
|
|
8161
8140
|
this.#o.dispose();
|
|
8162
8141
|
}
|
|
8163
8142
|
reset() {
|
|
8164
|
-
this.#e.invalidate(), this.#r.invalidate(), this.#i.invalidate(), this.#f(), this.#o.set(
|
|
8143
|
+
this.#e.invalidate(), this.#r.invalidate(), this.#i.invalidate(), this.#f(), this.#o.set(Vu);
|
|
8165
8144
|
}
|
|
8166
8145
|
async load(e) {
|
|
8167
|
-
let t = this.#o.value, n = t.loaded && t.target?.flowId == e, r = t.target?.flowId == e ? t.target.filter :
|
|
8146
|
+
let t = this.#o.value, n = t.loaded && t.target?.flowId == e, r = t.target?.flowId == e ? t.target.filter : Bu, i = this.#r.begin();
|
|
8168
8147
|
if (n) {
|
|
8169
8148
|
this.#p({
|
|
8170
8149
|
loadFailed: !1,
|
|
@@ -8179,7 +8158,7 @@ var Xu = class {
|
|
|
8179
8158
|
});
|
|
8180
8159
|
if (!i() || this.#o.value.target?.flowId != e) return;
|
|
8181
8160
|
this.#p({
|
|
8182
|
-
...
|
|
8161
|
+
...Ju(this.#o.value, t.runs),
|
|
8183
8162
|
nextCursor: t.nextCursor,
|
|
8184
8163
|
refreshing: !1
|
|
8185
8164
|
});
|
|
@@ -8190,9 +8169,9 @@ var Xu = class {
|
|
|
8190
8169
|
return;
|
|
8191
8170
|
}
|
|
8192
8171
|
this.#i.invalidate(), this.#f();
|
|
8193
|
-
let a =
|
|
8172
|
+
let a = qu(t)?.flowId == e ? t.cancelingRunId : void 0;
|
|
8194
8173
|
t.cancelingRunId != null && a == null && this.#e.invalidate(), this.#o.set({
|
|
8195
|
-
...
|
|
8174
|
+
...Vu,
|
|
8196
8175
|
...a == null ? {} : { cancelingRunId: a },
|
|
8197
8176
|
eventFilter: t.eventFilter,
|
|
8198
8177
|
loading: !0,
|
|
@@ -8208,7 +8187,7 @@ var Xu = class {
|
|
|
8208
8187
|
});
|
|
8209
8188
|
if (!i()) return;
|
|
8210
8189
|
this.#p({
|
|
8211
|
-
...
|
|
8190
|
+
...Ju(this.#o.value, t.runs),
|
|
8212
8191
|
loaded: !0,
|
|
8213
8192
|
loadFailed: !1,
|
|
8214
8193
|
loading: !1,
|
|
@@ -8248,7 +8227,7 @@ var Xu = class {
|
|
|
8248
8227
|
});
|
|
8249
8228
|
if (!n() || this.#o.value.target != r) return;
|
|
8250
8229
|
this.#p({
|
|
8251
|
-
...
|
|
8230
|
+
...Ju(this.#o.value, i.runs),
|
|
8252
8231
|
loaded: !0,
|
|
8253
8232
|
loading: !1,
|
|
8254
8233
|
nextCursor: i.nextCursor
|
|
@@ -8306,7 +8285,7 @@ var Xu = class {
|
|
|
8306
8285
|
e.target != null && (e.loadFailed ? await this.applyFilter(e.target.filter) : await this.load(e.target.flowId));
|
|
8307
8286
|
}
|
|
8308
8287
|
retryObservation() {
|
|
8309
|
-
let e =
|
|
8288
|
+
let e = qu(this.#o.value);
|
|
8310
8289
|
if (e == null) return;
|
|
8311
8290
|
let t = this.#i.begin();
|
|
8312
8291
|
this.#f(), this.#p({ observationFailed: !1 }), this.#l(e, t);
|
|
@@ -8315,8 +8294,8 @@ var Xu = class {
|
|
|
8315
8294
|
this.#p({ eventFilter: e });
|
|
8316
8295
|
}
|
|
8317
8296
|
async cancel() {
|
|
8318
|
-
let e =
|
|
8319
|
-
if (!
|
|
8297
|
+
let e = qu(this.#o.value);
|
|
8298
|
+
if (!Ku(e) || this.#o.value.cancelingRunId != null || this.#o.value.resolvingActions.size > 0) return;
|
|
8320
8299
|
let t = this.#e.begin();
|
|
8321
8300
|
this.#p({ cancelingRunId: e.runId });
|
|
8322
8301
|
try {
|
|
@@ -8328,7 +8307,7 @@ var Xu = class {
|
|
|
8328
8307
|
...i,
|
|
8329
8308
|
status: n.status
|
|
8330
8309
|
};
|
|
8331
|
-
if (this.#p({ runById:
|
|
8310
|
+
if (this.#p({ runById: Xu(r, a) }), r.selectedRunId != e.runId) return;
|
|
8332
8311
|
let o = this.#i.begin();
|
|
8333
8312
|
this.#f(), await this.#l(a, o);
|
|
8334
8313
|
} catch (e) {
|
|
@@ -8337,23 +8316,23 @@ var Xu = class {
|
|
|
8337
8316
|
t() && this.#o.value.cancelingRunId == e.runId && this.#p({ cancelingRunId: void 0 });
|
|
8338
8317
|
}
|
|
8339
8318
|
}
|
|
8340
|
-
async resolve(e, t) {
|
|
8341
|
-
let
|
|
8342
|
-
if (!(
|
|
8319
|
+
async resolve(e, t, n) {
|
|
8320
|
+
let r = qu(this.#o.value), i = r != null && "waits" in r ? r.waits.find((t) => t.waitId == e) : void 0;
|
|
8321
|
+
if (!(r == null || i == null || this.#o.value.cancelingRunId != null || this.#o.value.resolvingActions.has(e) || !i.actions.some((e) => e == t))) {
|
|
8343
8322
|
this.#p({ resolvingActions: new Map(this.#o.value.resolvingActions).set(e, t) });
|
|
8344
8323
|
try {
|
|
8345
|
-
let
|
|
8346
|
-
if (
|
|
8347
|
-
let
|
|
8348
|
-
...
|
|
8349
|
-
waits:
|
|
8350
|
-
status:
|
|
8324
|
+
let a = await this.#t.resolveRunWait(r.runId, i.waitId, t, n), o = this.#o.value, s = qu(o);
|
|
8325
|
+
if (s?.runId != r.runId || !("waits" in s)) return;
|
|
8326
|
+
let c = {
|
|
8327
|
+
...s,
|
|
8328
|
+
waits: s.waits.filter((t) => t.waitId != e),
|
|
8329
|
+
status: a.status
|
|
8351
8330
|
};
|
|
8352
|
-
this.#p({ runById:
|
|
8353
|
-
let
|
|
8354
|
-
|
|
8331
|
+
this.#p({ runById: Xu(o, c) }), this.retryObservation();
|
|
8332
|
+
let l = this.#o.value.target;
|
|
8333
|
+
l != null && this.#u(l);
|
|
8355
8334
|
} catch (e) {
|
|
8356
|
-
this.#o.value.selectedRunId ==
|
|
8335
|
+
this.#o.value.selectedRunId == r.runId && this.#a(Lr(e, this.#n.t));
|
|
8357
8336
|
} finally {
|
|
8358
8337
|
let t = new Map(this.#o.value.resolvingActions);
|
|
8359
8338
|
t.delete(e), this.#p({ resolvingActions: t });
|
|
@@ -8378,15 +8357,15 @@ var Xu = class {
|
|
|
8378
8357
|
follow(e, t) {
|
|
8379
8358
|
if (!t()) return !1;
|
|
8380
8359
|
let n = this.#o.value, r = n.target?.flowId == e.flowId ? n.target : {
|
|
8381
|
-
filter:
|
|
8360
|
+
filter: Bu,
|
|
8382
8361
|
flowId: e.flowId
|
|
8383
|
-
}, i =
|
|
8362
|
+
}, i = Yu(r.filter);
|
|
8384
8363
|
return this.#p({
|
|
8385
8364
|
events: [],
|
|
8386
8365
|
externalRunId: void 0,
|
|
8387
8366
|
loaded: !0,
|
|
8388
8367
|
result: void 0,
|
|
8389
|
-
runById:
|
|
8368
|
+
runById: Xu(n, e),
|
|
8390
8369
|
runIds: i ? n.runIds.filter((t) => t != e.runId) : [e.runId, ...n.runIds.filter((t) => t != e.runId)],
|
|
8391
8370
|
selectedRunId: e.runId,
|
|
8392
8371
|
target: r
|
|
@@ -8409,7 +8388,7 @@ var Xu = class {
|
|
|
8409
8388
|
observationFailed: !1,
|
|
8410
8389
|
resolvingActions: /* @__PURE__ */ new Map(),
|
|
8411
8390
|
result: void 0,
|
|
8412
|
-
runById:
|
|
8391
|
+
runById: Xu(n, e),
|
|
8413
8392
|
selectedRunId: e.runId
|
|
8414
8393
|
}), this.#l(e, t);
|
|
8415
8394
|
}
|
|
@@ -8421,7 +8400,7 @@ var Xu = class {
|
|
|
8421
8400
|
let a = this.#o.value.eventCursor, [o, s] = yield* an.tryPromise({
|
|
8422
8401
|
try: (t) => Promise.allSettled([this.#t.getRun(e.runId, t), this.#t.getRunEvents(e.runId, {
|
|
8423
8402
|
after: a,
|
|
8424
|
-
limit:
|
|
8403
|
+
limit: Hu
|
|
8425
8404
|
}, t)]),
|
|
8426
8405
|
catch: (e) => e
|
|
8427
8406
|
});
|
|
@@ -8433,7 +8412,7 @@ var Xu = class {
|
|
|
8433
8412
|
this.#p({
|
|
8434
8413
|
eventsExpiresAt: void 0,
|
|
8435
8414
|
historyComplete: !1,
|
|
8436
|
-
runById:
|
|
8415
|
+
runById: Xu(this.#o.value, c)
|
|
8437
8416
|
}), yield* an.tryPromise({
|
|
8438
8417
|
try: (e) => this.#d(c, t, e),
|
|
8439
8418
|
catch: (e) => e
|
|
@@ -8446,14 +8425,14 @@ var Xu = class {
|
|
|
8446
8425
|
events: [...this.#o.value.events, ...l.events],
|
|
8447
8426
|
eventsExpiresAt: l.eventsExpiresAt,
|
|
8448
8427
|
historyComplete: l.historyComplete,
|
|
8449
|
-
runById:
|
|
8428
|
+
runById: Xu(this.#o.value, c)
|
|
8450
8429
|
}), yield* an.tryPromise({
|
|
8451
8430
|
try: (e) => this.#d(c, t, e),
|
|
8452
8431
|
catch: (e) => e
|
|
8453
8432
|
}), yield* on.succeed(n, void 0), vr(c.status) && l.done) return;
|
|
8454
8433
|
let u = c.status == "queued" || c.status == "starting";
|
|
8455
8434
|
i = u && c.status == r.status ? i + 1 : 0;
|
|
8456
|
-
let d = vr(c.status) || l.events.length ==
|
|
8435
|
+
let d = vr(c.status) || l.events.length == Hu ? 0 : c.status == "waiting" ? Gu : u ? Math.min(Wu, Uu * 2 ** Math.max(0, i - 1)) : Wu;
|
|
8457
8436
|
r = c, yield* an.sleep(d);
|
|
8458
8437
|
}
|
|
8459
8438
|
}).pipe(an.catch((n) => an.sync(() => {
|
|
@@ -8473,7 +8452,7 @@ var Xu = class {
|
|
|
8473
8452
|
});
|
|
8474
8453
|
if (!t() || this.#o.value.target != e) return;
|
|
8475
8454
|
this.#p({
|
|
8476
|
-
...
|
|
8455
|
+
...Ju(this.#o.value, n.runs),
|
|
8477
8456
|
loaded: !0,
|
|
8478
8457
|
loadingMore: !1,
|
|
8479
8458
|
nextCursor: n.nextCursor,
|
|
@@ -8497,7 +8476,7 @@ var Xu = class {
|
|
|
8497
8476
|
...e
|
|
8498
8477
|
});
|
|
8499
8478
|
}
|
|
8500
|
-
},
|
|
8479
|
+
}, Qu = {
|
|
8501
8480
|
"17track": "https://static.oomol.com/logo/third-party/17track.svg",
|
|
8502
8481
|
"7_shifts": "https://static.oomol.com/logo/third-party/7_shifts.png",
|
|
8503
8482
|
ably: "https://static.oomol.com/logo/third-party/ably.svg",
|
|
@@ -10019,25 +9998,25 @@ var Xu = class {
|
|
|
10019
9998
|
speedtest_tracker: "https://static.oomol.com/logo/third-party/speedtest_tracker.png",
|
|
10020
9999
|
bloomerang: "https://static.oomol.com/logo/third-party/bloomerang.png",
|
|
10021
10000
|
coupontools: "https://static.oomol.com/logo/third-party/coupontools.png"
|
|
10022
|
-
},
|
|
10001
|
+
}, $u = {
|
|
10023
10002
|
img: "ContentIcon_img_eb462",
|
|
10024
10003
|
initials: "ContentIcon_initials_eb462"
|
|
10025
|
-
},
|
|
10004
|
+
}, ed = {
|
|
10026
10005
|
icon: "IconifyIcon_icon_e957a",
|
|
10027
10006
|
external: "IconifyIcon_external_e957a"
|
|
10028
10007
|
};
|
|
10029
10008
|
//#endregion
|
|
10030
10009
|
//#region ../../node_modules/.bun/@iconify+utils@3.1.4/node_modules/@iconify/utils/lib/svg/url.js
|
|
10031
|
-
function
|
|
10010
|
+
function td(e) {
|
|
10032
10011
|
return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
|
|
10033
10012
|
}
|
|
10034
10013
|
//#endregion
|
|
10035
10014
|
//#region ../../node_modules/.bun/@iconify+utils@3.1.4/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.js
|
|
10036
|
-
function
|
|
10015
|
+
function nd(e) {
|
|
10037
10016
|
let t = e.startsWith("<svg>") ? e.replace("<svg>", "<svg >") : e;
|
|
10038
|
-
return !t.includes(" xmlns:xlink=") && t.includes(" xlink:") && (t = t.replace("<svg ", "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" ")), t.includes(" xmlns=") || (t = t.replace("<svg ", "<svg xmlns=\"http://www.w3.org/2000/svg\" ")),
|
|
10017
|
+
return !t.includes(" xmlns:xlink=") && t.includes(" xlink:") && (t = t.replace("<svg ", "<svg xmlns:xlink=\"http://www.w3.org/1999/xlink\" ")), t.includes(" xmlns=") || (t = t.replace("<svg ", "<svg xmlns=\"http://www.w3.org/2000/svg\" ")), td(t);
|
|
10039
10018
|
}
|
|
10040
|
-
var
|
|
10019
|
+
var rd = {
|
|
10041
10020
|
"skill-icons": {
|
|
10042
10021
|
prefix: "skill-icons",
|
|
10043
10022
|
icons: {
|
|
@@ -10053,29 +10032,29 @@ var nd = {
|
|
|
10053
10032
|
width: 36,
|
|
10054
10033
|
height: 36
|
|
10055
10034
|
}
|
|
10056
|
-
},
|
|
10057
|
-
function
|
|
10058
|
-
let t =
|
|
10035
|
+
}, id = null, ad = /* @__PURE__ */ new Map();
|
|
10036
|
+
function od(e) {
|
|
10037
|
+
let t = ad.get(e);
|
|
10059
10038
|
return t || (t = (e == "carbon" ? import("./carbon-Cn-DTyjG.js").then(({ default: e }) => ({
|
|
10060
10039
|
icons: e,
|
|
10061
10040
|
chars: {},
|
|
10062
10041
|
info: e.info,
|
|
10063
10042
|
metadata: { categories: e.categories }
|
|
10064
10043
|
})) : import("./_virtual_open-flow-twemoji-CpHJOEsk.js").then((e) => e.default)).catch((t) => {
|
|
10065
|
-
throw
|
|
10066
|
-
}),
|
|
10044
|
+
throw ad.delete(e), t;
|
|
10045
|
+
}), ad.set(e, t)), t;
|
|
10067
10046
|
}
|
|
10068
|
-
var
|
|
10069
|
-
let [t, n] = F(
|
|
10070
|
-
if (
|
|
10071
|
-
r.current && n(
|
|
10047
|
+
var sd = Xt(null), cd = ({ children: e }) => {
|
|
10048
|
+
let [t, n] = F(id), r = rn(!0), i = Zt(async (e) => {
|
|
10049
|
+
if (id?.[e]) {
|
|
10050
|
+
r.current && n(id);
|
|
10072
10051
|
return;
|
|
10073
10052
|
}
|
|
10074
|
-
let t = await
|
|
10075
|
-
|
|
10076
|
-
...
|
|
10053
|
+
let t = await od(e);
|
|
10054
|
+
id = {
|
|
10055
|
+
...id,
|
|
10077
10056
|
[e]: t
|
|
10078
|
-
}, r.current && n(
|
|
10057
|
+
}, r.current && n(id);
|
|
10079
10058
|
}, []);
|
|
10080
10059
|
$t(() => (r.current = !0, () => {
|
|
10081
10060
|
r.current = !1;
|
|
@@ -10084,24 +10063,24 @@ var od = Xt(null), sd = ({ children: e }) => {
|
|
|
10084
10063
|
data: t,
|
|
10085
10064
|
loadCollection: i
|
|
10086
10065
|
}), [t, i]);
|
|
10087
|
-
return /* @__PURE__ */ M(
|
|
10066
|
+
return /* @__PURE__ */ M(sd.Provider, {
|
|
10088
10067
|
value: a,
|
|
10089
10068
|
children: e
|
|
10090
10069
|
});
|
|
10091
10070
|
};
|
|
10092
|
-
function cd() {
|
|
10093
|
-
return Qt(od)?.data ?? null;
|
|
10094
|
-
}
|
|
10095
10071
|
function ld() {
|
|
10096
|
-
return Qt(
|
|
10072
|
+
return Qt(sd)?.data ?? null;
|
|
10073
|
+
}
|
|
10074
|
+
function ud() {
|
|
10075
|
+
return Qt(sd)?.loadCollection;
|
|
10097
10076
|
}
|
|
10098
10077
|
//#endregion
|
|
10099
10078
|
//#region src/ui/browser/icons/IconifyIcon.tsx
|
|
10100
|
-
function
|
|
10079
|
+
function dd(e) {
|
|
10101
10080
|
return e == "carbon" || e == "twemoji";
|
|
10102
10081
|
}
|
|
10103
|
-
var
|
|
10104
|
-
let a =
|
|
10082
|
+
var fd = ({ collection: e, icon: t, color: n, className: r, onError: i }) => {
|
|
10083
|
+
let a = ld(!0), o = ud(), s = dd(e) ? e : void 0, c = s != null && !a?.[s];
|
|
10105
10084
|
$t(() => {
|
|
10106
10085
|
c && s && o?.(s).catch((e) => i?.(e));
|
|
10107
10086
|
}, [
|
|
@@ -10110,52 +10089,52 @@ var dd = ({ collection: e, icon: t, color: n, className: r, onError: i }) => {
|
|
|
10110
10089
|
o,
|
|
10111
10090
|
i
|
|
10112
10091
|
]);
|
|
10113
|
-
let l = nn(() =>
|
|
10092
|
+
let l = nn(() => bd(e, t, void 0, a), [
|
|
10114
10093
|
a,
|
|
10115
10094
|
e,
|
|
10116
10095
|
t
|
|
10117
10096
|
]);
|
|
10118
|
-
return l ? /* @__PURE__ */ M(
|
|
10097
|
+
return l ? /* @__PURE__ */ M(yd, {
|
|
10119
10098
|
url: l,
|
|
10120
10099
|
collection: e,
|
|
10121
10100
|
icon: t,
|
|
10122
10101
|
color: n,
|
|
10123
10102
|
className: r
|
|
10124
|
-
}) : c ? /* @__PURE__ */ M("i", {}) : /* @__PURE__ */ M(
|
|
10103
|
+
}) : c ? /* @__PURE__ */ M("i", {}) : /* @__PURE__ */ M(pd, {
|
|
10125
10104
|
collection: e,
|
|
10126
10105
|
icon: t,
|
|
10127
10106
|
color: n,
|
|
10128
10107
|
className: r,
|
|
10129
10108
|
onError: i
|
|
10130
10109
|
});
|
|
10131
|
-
},
|
|
10110
|
+
}, pd = ({ collection: e, icon: t, color: n, className: r, onError: i }) => {
|
|
10132
10111
|
let [a, o] = F(void 0);
|
|
10133
10112
|
return tn(() => {
|
|
10134
10113
|
let n = !1;
|
|
10135
|
-
return
|
|
10136
|
-
n || o(
|
|
10114
|
+
return gd(e, t).then((e) => {
|
|
10115
|
+
n || o(xd(e.width, e.height, e));
|
|
10137
10116
|
}).catch((e) => {
|
|
10138
10117
|
n || (o(void 0), i?.(e));
|
|
10139
10118
|
}), () => {
|
|
10140
10119
|
n = !0;
|
|
10141
10120
|
};
|
|
10142
10121
|
}, [e, t]), a ? /* @__PURE__ */ M("i", {
|
|
10143
|
-
className: k(r,
|
|
10122
|
+
className: k(r, ed.icon, !a.includes("currentColor") && "is-colored"),
|
|
10144
10123
|
style: {
|
|
10145
10124
|
color: n,
|
|
10146
10125
|
"--icon": `url("${a}")`
|
|
10147
10126
|
}
|
|
10148
10127
|
}) : /* @__PURE__ */ M("i", {});
|
|
10149
|
-
},
|
|
10150
|
-
let n = `${e}:${t}`, r =
|
|
10128
|
+
}, md = /* @__PURE__ */ new Map(), hd = /* @__PURE__ */ new Map(), gd = (e, t) => {
|
|
10129
|
+
let n = `${e}:${t}`, r = md.get(n);
|
|
10151
10130
|
if (r) return Promise.resolve(r);
|
|
10152
|
-
let i =
|
|
10131
|
+
let i = hd.get(n);
|
|
10153
10132
|
if (i) return i;
|
|
10154
|
-
let a =
|
|
10155
|
-
return
|
|
10156
|
-
},
|
|
10157
|
-
|
|
10158
|
-
let n = await fetch(
|
|
10133
|
+
let a = vd(e, t).then((e) => (md.set(n, e), e)).finally(() => hd.delete(n));
|
|
10134
|
+
return hd.set(n, a), a;
|
|
10135
|
+
}, _d = new URL("https://api.iconify.design/codicon.json?icons=close"), vd = async (e, t) => {
|
|
10136
|
+
_d.pathname = `/${e}.json`, _d.searchParams.set("icons", t);
|
|
10137
|
+
let n = await fetch(_d.href);
|
|
10159
10138
|
if (!n.ok) throw Error(`Failed to fetch ${e}:${t}: ${n.statusText}. Status: ${n.status}`);
|
|
10160
10139
|
let r = await n.json();
|
|
10161
10140
|
if (typeof r == "number") throw Error(`Failed to fetch ${e}:${t}: ${n.statusText}. Status: ${r}`);
|
|
@@ -10166,53 +10145,53 @@ var dd = ({ collection: e, icon: t, color: n, className: r, onError: i }) => {
|
|
|
10166
10145
|
i.width ||= e, i.height ||= t;
|
|
10167
10146
|
}
|
|
10168
10147
|
return i;
|
|
10169
|
-
},
|
|
10170
|
-
className: k(n,
|
|
10148
|
+
}, yd = ({ url: e, color: t, className: n }) => /* @__PURE__ */ M("i", {
|
|
10149
|
+
className: k(n, ed.icon, !e.includes("currentColor") && "is-colored"),
|
|
10171
10150
|
style: {
|
|
10172
10151
|
color: t,
|
|
10173
10152
|
"--icon": `url("${e}")`
|
|
10174
10153
|
}
|
|
10175
|
-
}),
|
|
10176
|
-
r ||=
|
|
10154
|
+
}), bd = (e, t, n, r) => {
|
|
10155
|
+
r ||= id;
|
|
10177
10156
|
let i, a;
|
|
10178
10157
|
if (r) {
|
|
10179
10158
|
let n = r[e];
|
|
10180
10159
|
n && (a = n.icons, i = a.icons[t]);
|
|
10181
10160
|
}
|
|
10182
|
-
if (a || (a =
|
|
10183
|
-
let r =
|
|
10184
|
-
if (r) return
|
|
10161
|
+
if (a || (a = rd[e], i = a && a.icons[t]), !i) {
|
|
10162
|
+
let r = md.get(`${e}:${t}`);
|
|
10163
|
+
if (r) return xd(r.width, r.height, r, n);
|
|
10185
10164
|
}
|
|
10186
|
-
if (i && a) return
|
|
10165
|
+
if (i && a) return xd(i.width || a.width, i.height || a.height, i, n);
|
|
10187
10166
|
};
|
|
10188
|
-
function
|
|
10167
|
+
function xd(e, t, n, r) {
|
|
10189
10168
|
e ||= 16, t ||= 16;
|
|
10190
10169
|
let i = `<svg xmlns="http://www.w3.org/2000/svg" viewBox="${`0 0 ${e} ${t}`}" width="1em" height="1em">${n.body}</svg>`;
|
|
10191
|
-
return r && (i = i.replace(/currentColor/g, r)), `data:image/svg+xml;utf8,${
|
|
10170
|
+
return r && (i = i.replace(/currentColor/g, r)), `data:image/svg+xml;utf8,${nd(i)}`;
|
|
10192
10171
|
}
|
|
10193
10172
|
//#endregion
|
|
10194
10173
|
//#region src/ui/browser/icons/ContentIcon.tsx
|
|
10195
|
-
var
|
|
10196
|
-
let a = nn(() =>
|
|
10197
|
-
return o?.startsWith(
|
|
10174
|
+
var Sd = ({ src: e, className: t, fallback: n = null, loading: r = "lazy", decoding: i = "async" }) => {
|
|
10175
|
+
let a = nn(() => Dd(e), [e]), o = a?.source ?? e, s = nn(() => Od(o), [o]), [c, l] = F(), u = () => l(o);
|
|
10176
|
+
return o?.startsWith(Cd) ? /* @__PURE__ */ M("span", {
|
|
10198
10177
|
"data-icon-kind": "initials",
|
|
10199
10178
|
"aria-hidden": "true",
|
|
10200
|
-
className: k(
|
|
10201
|
-
children: /* @__PURE__ */ M("span", { children: o.slice(
|
|
10202
|
-
}) : o ? o === c ? a == null ? n : /* @__PURE__ */ M(
|
|
10179
|
+
className: k($u.initials, t),
|
|
10180
|
+
children: /* @__PURE__ */ M("span", { children: o.slice(Cd.length) })
|
|
10181
|
+
}) : o ? o === c ? a == null ? n : /* @__PURE__ */ M(Sd, {
|
|
10203
10182
|
className: t,
|
|
10204
10183
|
fallback: n,
|
|
10205
10184
|
src: a.fallback,
|
|
10206
10185
|
loading: r,
|
|
10207
10186
|
decoding: i
|
|
10208
|
-
}) : s ? /* @__PURE__ */ M(
|
|
10187
|
+
}) : s ? /* @__PURE__ */ M(fd, {
|
|
10209
10188
|
collection: s.collection,
|
|
10210
10189
|
icon: s.icon,
|
|
10211
10190
|
color: s.color,
|
|
10212
10191
|
className: t,
|
|
10213
10192
|
onError: u
|
|
10214
10193
|
}) : /* @__PURE__ */ M("img", {
|
|
10215
|
-
className: k(
|
|
10194
|
+
className: k($u.img, t),
|
|
10216
10195
|
src: o,
|
|
10217
10196
|
alt: "",
|
|
10218
10197
|
decoding: i,
|
|
@@ -10220,19 +10199,19 @@ var xd = ({ src: e, className: t, fallback: n = null, loading: r = "lazy", decod
|
|
|
10220
10199
|
referrerPolicy: "no-referrer",
|
|
10221
10200
|
onError: u
|
|
10222
10201
|
}) : n;
|
|
10223
|
-
},
|
|
10224
|
-
function
|
|
10225
|
-
return `${
|
|
10202
|
+
}, Cd = "data:application/vnd.open-flow.initials,";
|
|
10203
|
+
function wd(e) {
|
|
10204
|
+
return `${Cd}${e}`;
|
|
10226
10205
|
}
|
|
10227
|
-
var
|
|
10228
|
-
function
|
|
10229
|
-
return `${
|
|
10206
|
+
var Td = "data:application/vnd.open-flow.image-icon+json,";
|
|
10207
|
+
function Ed(e, t) {
|
|
10208
|
+
return `${Td}${encodeURIComponent(JSON.stringify({
|
|
10230
10209
|
fallback: t,
|
|
10231
10210
|
source: e
|
|
10232
10211
|
}))}`;
|
|
10233
10212
|
}
|
|
10234
|
-
function
|
|
10235
|
-
if (e?.startsWith(
|
|
10213
|
+
function Dd(e) {
|
|
10214
|
+
if (e?.startsWith(Td)) try {
|
|
10236
10215
|
let t = JSON.parse(decodeURIComponent(e.slice(47)));
|
|
10237
10216
|
if (typeof t.fallback == "string" && typeof t.source == "string") return {
|
|
10238
10217
|
fallback: t.fallback,
|
|
@@ -10242,7 +10221,7 @@ function Ed(e) {
|
|
|
10242
10221
|
return;
|
|
10243
10222
|
}
|
|
10244
10223
|
}
|
|
10245
|
-
function
|
|
10224
|
+
function Od(e) {
|
|
10246
10225
|
if (e && e.length > 2 && e[0] === ":" && e.endsWith(":")) {
|
|
10247
10226
|
let [, t, n, r] = e.split(":");
|
|
10248
10227
|
if (t && n) return {
|
|
@@ -10255,22 +10234,22 @@ function Dd(e) {
|
|
|
10255
10234
|
}
|
|
10256
10235
|
//#endregion
|
|
10257
10236
|
//#region src/workbench/browser/runtime/providerIcon.ts
|
|
10258
|
-
function
|
|
10259
|
-
let n =
|
|
10260
|
-
return r == null ? n :
|
|
10237
|
+
function kd(e, t = Qu) {
|
|
10238
|
+
let n = wd(jd(e.serviceName)), r = Ad(e, t);
|
|
10239
|
+
return r == null ? n : Ed(r, n);
|
|
10261
10240
|
}
|
|
10262
|
-
function
|
|
10241
|
+
function Ad(e, t = Qu) {
|
|
10263
10242
|
let n = e.icon?.trim();
|
|
10264
10243
|
if (n) return n;
|
|
10265
10244
|
let r = t[e.serviceId]?.trim();
|
|
10266
10245
|
if (r) return r;
|
|
10267
|
-
let i =
|
|
10246
|
+
let i = Md(e.homepageUrl);
|
|
10268
10247
|
return i == null ? void 0 : `https://www.google.com/s2/favicons?sz=64&domain=${encodeURIComponent(i)}`;
|
|
10269
10248
|
}
|
|
10270
|
-
function
|
|
10249
|
+
function jd(e) {
|
|
10271
10250
|
return e.split(/\s+/).map((e) => e[0]).join("").slice(0, 2).toUpperCase() || "?";
|
|
10272
10251
|
}
|
|
10273
|
-
function
|
|
10252
|
+
function Md(e) {
|
|
10274
10253
|
if (e) try {
|
|
10275
10254
|
return new URL(e).hostname || void 0;
|
|
10276
10255
|
} catch {
|
|
@@ -10279,14 +10258,14 @@ function jd(e) {
|
|
|
10279
10258
|
}
|
|
10280
10259
|
//#endregion
|
|
10281
10260
|
//#region src/workbench/browser/runtime/workspace.ts
|
|
10282
|
-
function
|
|
10283
|
-
let n = e.authenticated && t != null ?
|
|
10261
|
+
function Nd(e, t) {
|
|
10262
|
+
let n = e.authenticated && t != null ? Pd(t).preferred : void 0;
|
|
10284
10263
|
return {
|
|
10285
10264
|
...e,
|
|
10286
10265
|
...n == null ? {} : { defaultConnection: n }
|
|
10287
10266
|
};
|
|
10288
10267
|
}
|
|
10289
|
-
function
|
|
10268
|
+
function Pd(e) {
|
|
10290
10269
|
let t = [], n = /* @__PURE__ */ new Map(), r;
|
|
10291
10270
|
for (let i of e) n.set(i.connectionId, i), i.status == "active" && (t.push(i), i.isDefault && (r = i));
|
|
10292
10271
|
return {
|
|
@@ -10296,7 +10275,7 @@ function Nd(e) {
|
|
|
10296
10275
|
preferred: r ?? (t.length == 1 ? t[0] : void 0)
|
|
10297
10276
|
};
|
|
10298
10277
|
}
|
|
10299
|
-
function
|
|
10278
|
+
function Fd(e, t) {
|
|
10300
10279
|
if (e.node.name != null) return e.node.name;
|
|
10301
10280
|
switch (e.kind) {
|
|
10302
10281
|
case "condition": return t?.("addNode.condition") ?? "Condition";
|
|
@@ -10307,7 +10286,7 @@ function Pd(e, t) {
|
|
|
10307
10286
|
case "task": return e.definition?.name ?? (e.node.task == null ? e.node.taskId : e.node.task.moduleId);
|
|
10308
10287
|
}
|
|
10309
10288
|
}
|
|
10310
|
-
function
|
|
10289
|
+
function Id(e) {
|
|
10311
10290
|
switch (e.kind) {
|
|
10312
10291
|
case "condition": return ":carbon:child-node:";
|
|
10313
10292
|
case "subflow": return ":carbon:subflow:";
|
|
@@ -10323,43 +10302,43 @@ function Fd(e) {
|
|
|
10323
10302
|
function $(e) {
|
|
10324
10303
|
if (!(typeof e != "object" || !e || Array.isArray(e))) return e;
|
|
10325
10304
|
}
|
|
10326
|
-
function
|
|
10305
|
+
function Ld(e) {
|
|
10327
10306
|
return typeof e == "number" && Number.isFinite(e) ? e : void 0;
|
|
10328
10307
|
}
|
|
10329
|
-
function
|
|
10308
|
+
function Rd(e, t) {
|
|
10330
10309
|
let n = $(e.designer);
|
|
10331
|
-
if (n?.version == 1) return
|
|
10310
|
+
if (n?.version == 1) return lf(n, t);
|
|
10332
10311
|
}
|
|
10333
|
-
function
|
|
10312
|
+
function zd(e, t) {
|
|
10334
10313
|
return ((e) => Object.fromEntries(Object.entries($(e) ?? {}).flatMap(([e, t]) => {
|
|
10335
|
-
let n = $(t), r =
|
|
10314
|
+
let n = $(t), r = Ld(n?.x), i = Ld(n?.y);
|
|
10336
10315
|
return r == null || i == null ? [] : [[e, {
|
|
10337
10316
|
x: r,
|
|
10338
10317
|
y: i
|
|
10339
10318
|
}]];
|
|
10340
|
-
})))(
|
|
10319
|
+
})))(Rd(e, t)?.nodes);
|
|
10341
10320
|
}
|
|
10342
|
-
function
|
|
10343
|
-
let n =
|
|
10321
|
+
function Bd(e, t) {
|
|
10322
|
+
let n = zd(e, t), r = Rd(e, t)?.order, i = Array.isArray(r) ? r.flatMap((e) => typeof e == "string" && n[e] != null ? [e] : []) : [];
|
|
10344
10323
|
return [.../* @__PURE__ */ new Set([...i, ...Object.keys(n)])];
|
|
10345
10324
|
}
|
|
10346
|
-
function
|
|
10347
|
-
let n = $(
|
|
10325
|
+
function Vd(e, t) {
|
|
10326
|
+
let n = $(Rd(e, t)?.viewport), r = Ld(n?.x), i = Ld(n?.y), a = Ld(n?.zoom);
|
|
10348
10327
|
return r == null || i == null || a == null || a <= 0 ? void 0 : {
|
|
10349
10328
|
x: r,
|
|
10350
10329
|
y: i,
|
|
10351
10330
|
zoom: a
|
|
10352
10331
|
};
|
|
10353
10332
|
}
|
|
10354
|
-
function
|
|
10355
|
-
return
|
|
10333
|
+
function Hd(e, t) {
|
|
10334
|
+
return Vd(e, t) ?? {
|
|
10356
10335
|
x: 0,
|
|
10357
10336
|
y: 0,
|
|
10358
10337
|
zoom: 1
|
|
10359
10338
|
};
|
|
10360
10339
|
}
|
|
10361
|
-
function
|
|
10362
|
-
let r = $(
|
|
10340
|
+
function Ud(e, t, n) {
|
|
10341
|
+
let r = $(Rd(e, t)?.comments) ?? {};
|
|
10363
10342
|
return Object.fromEntries(Object.entries(r).flatMap(([e, t]) => {
|
|
10364
10343
|
let r = $(t), i = typeof r?.title == "string" ? r.title : void 0, a = typeof r?.content == "string" ? r.content : void 0;
|
|
10365
10344
|
return i == null || a == null ? [] : [[e, {
|
|
@@ -10372,7 +10351,7 @@ function Hd(e, t, n) {
|
|
|
10372
10351
|
}]];
|
|
10373
10352
|
}));
|
|
10374
10353
|
}
|
|
10375
|
-
function
|
|
10354
|
+
function Wd(e, t, n, r) {
|
|
10376
10355
|
return JSON.stringify([
|
|
10377
10356
|
e,
|
|
10378
10357
|
t,
|
|
@@ -10380,7 +10359,7 @@ function Ud(e, t, n, r) {
|
|
|
10380
10359
|
r
|
|
10381
10360
|
]);
|
|
10382
10361
|
}
|
|
10383
|
-
function
|
|
10362
|
+
function Gd(e) {
|
|
10384
10363
|
if (e.kind == "trigger") return {
|
|
10385
10364
|
inputs: /* @__PURE__ */ new Map(),
|
|
10386
10365
|
outputs: new Map(Object.entries(pu(e.trigger)))
|
|
@@ -10413,13 +10392,13 @@ function Wd(e) {
|
|
|
10413
10392
|
break;
|
|
10414
10393
|
case "approval":
|
|
10415
10394
|
case "wait":
|
|
10416
|
-
|
|
10417
|
-
defaultValue:
|
|
10418
|
-
description:
|
|
10419
|
-
jsonSchema:
|
|
10420
|
-
nullable:
|
|
10395
|
+
for (let n of e.node.inputDefinitions) t.set(n.handle, {
|
|
10396
|
+
defaultValue: n.value,
|
|
10397
|
+
description: n.description,
|
|
10398
|
+
jsonSchema: n.jsonSchema,
|
|
10399
|
+
nullable: n.nullable
|
|
10421
10400
|
});
|
|
10422
|
-
for (let [t, r] of Object.entries(
|
|
10401
|
+
for (let [t, r] of Object.entries(vu(e.node))) n.set(t, r);
|
|
10423
10402
|
break;
|
|
10424
10403
|
case "subflow": {
|
|
10425
10404
|
let r = e.definition;
|
|
@@ -10465,7 +10444,7 @@ function Wd(e) {
|
|
|
10465
10444
|
outputs: n
|
|
10466
10445
|
};
|
|
10467
10446
|
}
|
|
10468
|
-
function
|
|
10447
|
+
function Kd(e) {
|
|
10469
10448
|
switch (e) {
|
|
10470
10449
|
case "endsWith": return "ends with";
|
|
10471
10450
|
case "hasKey": return "has key";
|
|
@@ -10489,7 +10468,7 @@ function Gd(e) {
|
|
|
10489
10468
|
case "contains": return e;
|
|
10490
10469
|
}
|
|
10491
10470
|
}
|
|
10492
|
-
function
|
|
10471
|
+
function qd(e, t, n) {
|
|
10493
10472
|
let r = e.kind == "flow" ? `/document/graph/nodes/${t.id}` : `/document/subflows/${e.id}/graph/nodes/${t.id}`, i = [r];
|
|
10494
10473
|
if (t.kind == "task") {
|
|
10495
10474
|
t.node.task == null ? i.push(`/document/tasks/${t.node.taskId}`) : i.push(`${r}/task`);
|
|
@@ -10498,7 +10477,7 @@ function Kd(e, t, n) {
|
|
|
10498
10477
|
} else t.kind == "subflow" && i.push(`/document/subflows/${t.node.subflowId}`);
|
|
10499
10478
|
return n.filter((e) => i.some((t) => e.path.startsWith(t))).length;
|
|
10500
10479
|
}
|
|
10501
|
-
function
|
|
10480
|
+
function Jd(e, t, n, r) {
|
|
10502
10481
|
if (t.kind != "flow" || n?.flowId != e.revision.flowId || n.revisionId != e.revision.revisionId) return { nodes: /* @__PURE__ */ new Map() };
|
|
10503
10482
|
let i = n.status == "queued" || n.status == "starting" || n.status == "running" || n.status == "waiting", a = /* @__PURE__ */ new Map();
|
|
10504
10483
|
if ("waits" in n) for (let e of n.waits) a.set(e.nodeId, {
|
|
@@ -10597,10 +10576,10 @@ function qd(e, t, n, r) {
|
|
|
10597
10576
|
status: i ? "running" : "idle"
|
|
10598
10577
|
};
|
|
10599
10578
|
}
|
|
10600
|
-
function
|
|
10579
|
+
function Yd(e, t, n) {
|
|
10601
10580
|
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]}`;
|
|
10602
10581
|
}
|
|
10603
|
-
function
|
|
10582
|
+
function Xd(e) {
|
|
10604
10583
|
switch (e.kind) {
|
|
10605
10584
|
case "manual": return ":carbon:play:";
|
|
10606
10585
|
case "cron": return ":carbon:time:";
|
|
@@ -10609,11 +10588,11 @@ function Yd(e) {
|
|
|
10609
10588
|
case "webhook": return ":carbon:webhook:";
|
|
10610
10589
|
}
|
|
10611
10590
|
}
|
|
10612
|
-
function
|
|
10591
|
+
function Zd(e, t) {
|
|
10613
10592
|
let n = `/document/graph/nodes/${e}`;
|
|
10614
10593
|
return t.filter((e) => e.code != "trigger.config-incomplete" && (e.path == n || e.path.startsWith(`${n}/`)));
|
|
10615
10594
|
}
|
|
10616
|
-
function
|
|
10595
|
+
function Qd(e, t) {
|
|
10617
10596
|
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 : [];
|
|
10618
10597
|
for (let e of a) {
|
|
10619
10598
|
if (typeof e != "object" || !e || Array.isArray(e)) continue;
|
|
@@ -10621,7 +10600,7 @@ function Zd(e, t) {
|
|
|
10621
10600
|
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;
|
|
10622
10601
|
let o = a.sourceHandle == null ? "$out" : `$branch:${a.sourceHandle}`;
|
|
10623
10602
|
n.push({
|
|
10624
|
-
id:
|
|
10603
|
+
id: Wd(a.source, o, a.target, "$in"),
|
|
10625
10604
|
source: a.source,
|
|
10626
10605
|
sourceHandle: o,
|
|
10627
10606
|
target: a.target,
|
|
@@ -10634,7 +10613,7 @@ function Zd(e, t) {
|
|
|
10634
10613
|
edges: n
|
|
10635
10614
|
};
|
|
10636
10615
|
}
|
|
10637
|
-
function
|
|
10616
|
+
function $d(e, t, n) {
|
|
10638
10617
|
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();
|
|
10639
10618
|
for (let e = 0; e < s.length; e += 1) {
|
|
10640
10619
|
let t = s[e];
|
|
@@ -10653,14 +10632,14 @@ function Qd(e, t, n) {
|
|
|
10653
10632
|
ordered: a
|
|
10654
10633
|
};
|
|
10655
10634
|
}
|
|
10656
|
-
function
|
|
10635
|
+
function ef(e, t, n) {
|
|
10657
10636
|
if (!("inputs" in t)) return [];
|
|
10658
10637
|
let r = [];
|
|
10659
10638
|
for (let [i, a] of n.inputs) {
|
|
10660
10639
|
let n = t.inputs[i], o = [], s = /* @__PURE__ */ new Set();
|
|
10661
10640
|
if (n?.kind == "sources") for (let t of n.sources) {
|
|
10662
10641
|
if (t.kind != "node") continue;
|
|
10663
|
-
let n = t.nodeId, r = t.output, a =
|
|
10642
|
+
let n = t.nodeId, r = t.output, a = Wd(n, r, e, i);
|
|
10664
10643
|
s.has(a) || (s.add(a), o.push({
|
|
10665
10644
|
nodeId: n,
|
|
10666
10645
|
output: r
|
|
@@ -10675,10 +10654,10 @@ function $d(e, t, n) {
|
|
|
10675
10654
|
}
|
|
10676
10655
|
return r;
|
|
10677
10656
|
}
|
|
10678
|
-
function
|
|
10657
|
+
function tf(e) {
|
|
10679
10658
|
return [...e.outputs].map(([e, t]) => Object.assign({ handle: e }, t));
|
|
10680
10659
|
}
|
|
10681
|
-
function
|
|
10660
|
+
function nf(e, t) {
|
|
10682
10661
|
if (e.kind != "task" || e.definition == null) return t;
|
|
10683
10662
|
let n = new Map(t.map((e) => [e.handle, e])), r = [];
|
|
10684
10663
|
for (let t of e.definition.inputs) {
|
|
@@ -10691,7 +10670,7 @@ function tf(e, t) {
|
|
|
10691
10670
|
}
|
|
10692
10671
|
return r.push(...n.values()), r;
|
|
10693
10672
|
}
|
|
10694
|
-
function
|
|
10673
|
+
function rf(e, t) {
|
|
10695
10674
|
if (e.kind != "task" || e.definition == null) return t;
|
|
10696
10675
|
let n = new Map(t.map((e) => [e.handle, e])), r = [];
|
|
10697
10676
|
for (let t of e.definition.outputs) {
|
|
@@ -10704,8 +10683,8 @@ function nf(e, t) {
|
|
|
10704
10683
|
}
|
|
10705
10684
|
return r.push(...n.values()), r;
|
|
10706
10685
|
}
|
|
10707
|
-
function
|
|
10708
|
-
let a =
|
|
10686
|
+
function af(e, t, n, r, i) {
|
|
10687
|
+
let a = Zd(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;
|
|
10709
10688
|
switch (t.kind) {
|
|
10710
10689
|
case "manual":
|
|
10711
10690
|
c = {
|
|
@@ -10742,10 +10721,10 @@ function rf(e, t, n, r, i) {
|
|
|
10742
10721
|
description: t.description,
|
|
10743
10722
|
diagnostics: a.length,
|
|
10744
10723
|
connectionRequired: o,
|
|
10745
|
-
icon: t.icon ?? (t.kind == "integration" || t.kind == "poll" ?
|
|
10724
|
+
icon: t.icon ?? (t.kind == "integration" || t.kind == "poll" ? kd(s ?? {
|
|
10746
10725
|
serviceId: t.definition.provider,
|
|
10747
10726
|
serviceName: t.definition.provider
|
|
10748
|
-
}) :
|
|
10727
|
+
}) : Xd(t)),
|
|
10749
10728
|
id: e,
|
|
10750
10729
|
inputs: [],
|
|
10751
10730
|
kind: "trigger",
|
|
@@ -10755,17 +10734,17 @@ function rf(e, t, n, r, i) {
|
|
|
10755
10734
|
title: t.name
|
|
10756
10735
|
};
|
|
10757
10736
|
}
|
|
10758
|
-
function
|
|
10759
|
-
let a = t.node, o =
|
|
10737
|
+
function of(e, t, n, r, i) {
|
|
10738
|
+
let a = t.node, o = nf(t, ef(e, a, n)), s = rf(t, tf(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 = {
|
|
10760
10739
|
description: a.description,
|
|
10761
|
-
diagnostics:
|
|
10762
|
-
icon: a.icon ?? (u == null ?
|
|
10740
|
+
diagnostics: qd(i.target, t, i.diagnostics),
|
|
10741
|
+
icon: a.icon ?? (u == null ? Id(t) : kd(u)),
|
|
10763
10742
|
id: e,
|
|
10764
10743
|
inputs: o,
|
|
10765
10744
|
outputs: s,
|
|
10766
10745
|
position: r,
|
|
10767
10746
|
...h == null ? {} : { run: h },
|
|
10768
|
-
title:
|
|
10747
|
+
title: Fd(t, i.t)
|
|
10769
10748
|
};
|
|
10770
10749
|
switch (a.kind) {
|
|
10771
10750
|
case "condition": return {
|
|
@@ -10774,7 +10753,7 @@ function af(e, t, n, r, i) {
|
|
|
10774
10753
|
cases: a.cases.map((e) => ({
|
|
10775
10754
|
expressions: e.expressions.map((e) => ({
|
|
10776
10755
|
input: e.input,
|
|
10777
|
-
operator:
|
|
10756
|
+
operator: Kd(e.operator),
|
|
10778
10757
|
value: e.value
|
|
10779
10758
|
})),
|
|
10780
10759
|
output: e.output,
|
|
@@ -10794,13 +10773,13 @@ function af(e, t, n, r, i) {
|
|
|
10794
10773
|
return t == null || "group" in t ? [] : [t];
|
|
10795
10774
|
}),
|
|
10796
10775
|
kind: a.kind,
|
|
10797
|
-
executorName:
|
|
10776
|
+
executorName: Yd(c, u?.serviceName, i.t),
|
|
10798
10777
|
connectionRequired: m,
|
|
10799
10778
|
...c != null && "executor" in c && c.executor.kind == "agent" ? { tools: c.executor.tools.map((e) => {
|
|
10800
10779
|
let t = i.connectorActions[e.action], n = t?.serviceId ?? e.action.split(".")[0], r = t?.serviceName ?? n;
|
|
10801
10780
|
return {
|
|
10802
10781
|
id: e.id,
|
|
10803
|
-
icon:
|
|
10782
|
+
icon: kd(t ?? {
|
|
10804
10783
|
serviceId: n,
|
|
10805
10784
|
serviceName: r
|
|
10806
10785
|
}),
|
|
@@ -10821,8 +10800,8 @@ function af(e, t, n, r, i) {
|
|
|
10821
10800
|
};
|
|
10822
10801
|
}
|
|
10823
10802
|
}
|
|
10824
|
-
function
|
|
10825
|
-
let u = e == null ? void 0 :
|
|
10803
|
+
function sf(e, t, n = {}, r = [], i = {}, a = {}, o, s, c = [], l = {}) {
|
|
10804
|
+
let u = e == null ? void 0 : zu(e), d = u == null || t == null ? void 0 : u.graph(t);
|
|
10826
10805
|
if (u == null || t == null || d == null) return {
|
|
10827
10806
|
edges: [],
|
|
10828
10807
|
nodes: [],
|
|
@@ -10832,7 +10811,7 @@ function of(e, t, n = {}, r = [], i = {}, a = {}, o, s, c = [], l = {}) {
|
|
|
10832
10811
|
zoom: 1
|
|
10833
10812
|
}
|
|
10834
10813
|
};
|
|
10835
|
-
let f =
|
|
10814
|
+
let f = Jd(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, Gd(t)])), _ = Qd(d, h), v = $d(h, _.dependencies, _.dependents), y = zd(n, t), b = $(Rd(n, t)?.hiddenNodeContent), x = {
|
|
10836
10815
|
connectionCatalogs: a,
|
|
10837
10816
|
connectorActions: i,
|
|
10838
10817
|
diagnostics: r,
|
|
@@ -10840,49 +10819,49 @@ function of(e, t, n = {}, r = [], i = {}, a = {}, o, s, c = [], l = {}) {
|
|
|
10840
10819
|
runNodes: f.nodes,
|
|
10841
10820
|
t: o,
|
|
10842
10821
|
target: t
|
|
10843
|
-
},
|
|
10844
|
-
for (let e of
|
|
10845
|
-
let t =
|
|
10846
|
-
|
|
10847
|
-
let i =
|
|
10822
|
+
}, ee = /* @__PURE__ */ new Map(), te = [];
|
|
10823
|
+
for (let e of v.ordered) {
|
|
10824
|
+
let t = v.depth.get(e) ?? 0, n = ee.get(t) ?? 0;
|
|
10825
|
+
ee.set(t, n + 1);
|
|
10826
|
+
let i = y[e] ?? {
|
|
10848
10827
|
x: 80 + t * 500,
|
|
10849
10828
|
y: 80 + n * 240
|
|
10850
10829
|
}, a = m.get(e);
|
|
10851
10830
|
if (a.kind == "trigger") {
|
|
10852
|
-
|
|
10853
|
-
...
|
|
10854
|
-
contentHidden:
|
|
10831
|
+
te.push({
|
|
10832
|
+
...af(e, a.trigger, i, r, l),
|
|
10833
|
+
contentHidden: b?.[e] === !0
|
|
10855
10834
|
});
|
|
10856
10835
|
continue;
|
|
10857
10836
|
}
|
|
10858
|
-
let o =
|
|
10859
|
-
|
|
10837
|
+
let o = of(e, a, g.get(e), i, x);
|
|
10838
|
+
te.push({
|
|
10860
10839
|
...o,
|
|
10861
|
-
contentHidden:
|
|
10840
|
+
contentHidden: b?.[e] === !0
|
|
10862
10841
|
});
|
|
10863
10842
|
}
|
|
10864
|
-
for (let [e, r] of Object.entries(
|
|
10843
|
+
for (let [e, r] of Object.entries(Ud(n, t, y)).toSorted(([e], [t]) => e.localeCompare(t))) te.push({
|
|
10865
10844
|
...r,
|
|
10866
10845
|
id: e,
|
|
10867
10846
|
kind: "comment",
|
|
10868
|
-
contentHidden:
|
|
10847
|
+
contentHidden: b?.[e] === !0
|
|
10869
10848
|
});
|
|
10870
|
-
let S = new Map(
|
|
10871
|
-
return
|
|
10849
|
+
let S = new Map(Bd(n, t).map((e, t) => [e, t]));
|
|
10850
|
+
return te.sort((e, t) => (S.get(e.id) ?? -1) - (S.get(t.id) ?? -1)), {
|
|
10872
10851
|
edges: _.edges,
|
|
10873
|
-
nodes:
|
|
10852
|
+
nodes: te,
|
|
10874
10853
|
...f.status == null ? {} : { runStatus: f.status },
|
|
10875
|
-
viewport:
|
|
10854
|
+
viewport: Hd(n, t)
|
|
10876
10855
|
};
|
|
10877
10856
|
}
|
|
10878
|
-
function
|
|
10857
|
+
function cf(e) {
|
|
10879
10858
|
let t = $(e.designer);
|
|
10880
10859
|
return t?.version == 1 ? t : { version: 1 };
|
|
10881
10860
|
}
|
|
10882
|
-
function
|
|
10861
|
+
function lf(e, t) {
|
|
10883
10862
|
return t.kind == "flow" ? $(e.flow) : $($(e.subflows)?.[t.id]);
|
|
10884
10863
|
}
|
|
10885
|
-
function
|
|
10864
|
+
function uf(e, t, n) {
|
|
10886
10865
|
if (t.kind == "flow") return {
|
|
10887
10866
|
...e,
|
|
10888
10867
|
flow: n,
|
|
@@ -10898,17 +10877,17 @@ function lf(e, t, n) {
|
|
|
10898
10877
|
version: 1
|
|
10899
10878
|
};
|
|
10900
10879
|
}
|
|
10901
|
-
function
|
|
10880
|
+
function df(e, t) {
|
|
10902
10881
|
let n = {
|
|
10903
|
-
...
|
|
10904
|
-
viewport: { ...
|
|
10905
|
-
nodes:
|
|
10906
|
-
order:
|
|
10882
|
+
...Rd(e, t),
|
|
10883
|
+
viewport: { ...Hd(e, t) },
|
|
10884
|
+
nodes: zd(e, t),
|
|
10885
|
+
order: Bd(e, t)
|
|
10907
10886
|
};
|
|
10908
10887
|
return delete n.layouts, n;
|
|
10909
10888
|
}
|
|
10910
|
-
function
|
|
10911
|
-
let r =
|
|
10889
|
+
function ff(e, t, n) {
|
|
10890
|
+
let r = cf(e), i = df(e, t), a = $(i.nodes) ?? {}, o = [...Bd(e, t)];
|
|
10912
10891
|
for (let e of Object.keys(n)) o.includes(e) || o.push(e);
|
|
10913
10892
|
let s = {
|
|
10914
10893
|
...a,
|
|
@@ -10919,29 +10898,29 @@ function df(e, t, n) {
|
|
|
10919
10898
|
};
|
|
10920
10899
|
return {
|
|
10921
10900
|
...e,
|
|
10922
|
-
designer:
|
|
10901
|
+
designer: uf(r, t, {
|
|
10923
10902
|
...i,
|
|
10924
10903
|
nodes: s,
|
|
10925
10904
|
order: o
|
|
10926
10905
|
})
|
|
10927
10906
|
};
|
|
10928
10907
|
}
|
|
10929
|
-
function
|
|
10930
|
-
if ($(
|
|
10931
|
-
let i =
|
|
10908
|
+
function pf(e, t, n, r) {
|
|
10909
|
+
if ($(Rd(e, t)?.hiddenNodeContent)?.[n] === !0 === r) return e;
|
|
10910
|
+
let i = df(e, t), a = { ...$(i.hiddenNodeContent) };
|
|
10932
10911
|
return r ? a[n] = !0 : delete a[n], {
|
|
10933
10912
|
...e,
|
|
10934
|
-
designer:
|
|
10913
|
+
designer: uf(cf(e), t, {
|
|
10935
10914
|
...i,
|
|
10936
10915
|
hiddenNodeContent: a
|
|
10937
10916
|
})
|
|
10938
10917
|
};
|
|
10939
10918
|
}
|
|
10940
|
-
function
|
|
10941
|
-
let i =
|
|
10919
|
+
function mf(e, t, n, r) {
|
|
10920
|
+
let i = ff(e, t, { [n]: r.position }), a = cf(i), o = lf(a, t) ?? {}, s = $(o.comments) ?? {};
|
|
10942
10921
|
return {
|
|
10943
10922
|
...i,
|
|
10944
|
-
designer:
|
|
10923
|
+
designer: uf(a, t, {
|
|
10945
10924
|
...o,
|
|
10946
10925
|
comments: {
|
|
10947
10926
|
...s,
|
|
@@ -10953,13 +10932,13 @@ function pf(e, t, n, r) {
|
|
|
10953
10932
|
})
|
|
10954
10933
|
};
|
|
10955
10934
|
}
|
|
10956
|
-
function
|
|
10957
|
-
let r =
|
|
10935
|
+
function hf(e, t, n) {
|
|
10936
|
+
let r = cf(e), i = df(e, t), a = { ...$(i.comments) }, o = { ...$(i.nodes) };
|
|
10958
10937
|
for (let e of n) delete a[e], delete o[e];
|
|
10959
|
-
let s =
|
|
10938
|
+
let s = Bd(e, t).filter((e) => !n.has(e));
|
|
10960
10939
|
return {
|
|
10961
10940
|
...e,
|
|
10962
|
-
designer:
|
|
10941
|
+
designer: uf(r, t, {
|
|
10963
10942
|
...i,
|
|
10964
10943
|
comments: a,
|
|
10965
10944
|
nodes: o,
|
|
@@ -10967,16 +10946,16 @@ function mf(e, t, n) {
|
|
|
10967
10946
|
})
|
|
10968
10947
|
};
|
|
10969
10948
|
}
|
|
10970
|
-
function
|
|
10971
|
-
return new Set(Object.keys($(
|
|
10949
|
+
function gf(e, t) {
|
|
10950
|
+
return new Set(Object.keys($(Rd(e, t)?.comments) ?? {}));
|
|
10972
10951
|
}
|
|
10973
|
-
function
|
|
10974
|
-
let r =
|
|
10952
|
+
function _f(e, t, n) {
|
|
10953
|
+
let r = Vd(e, t);
|
|
10975
10954
|
if (r?.x == n.x && r.y == n.y && r.zoom == n.zoom) return e;
|
|
10976
|
-
let i =
|
|
10955
|
+
let i = cf(e), a = df(e, t);
|
|
10977
10956
|
return {
|
|
10978
10957
|
...e,
|
|
10979
|
-
designer:
|
|
10958
|
+
designer: uf(i, t, {
|
|
10980
10959
|
...a,
|
|
10981
10960
|
viewport: {
|
|
10982
10961
|
x: n.x,
|
|
@@ -10986,7 +10965,7 @@ function gf(e, t, n) {
|
|
|
10986
10965
|
})
|
|
10987
10966
|
};
|
|
10988
10967
|
}
|
|
10989
|
-
function
|
|
10968
|
+
function vf(e, t, n) {
|
|
10990
10969
|
let r = e.kind == "node.started" ? e.payload.nodeTitle : void 0;
|
|
10991
10970
|
if (typeof r == "string") return r;
|
|
10992
10971
|
let i = "executionId" in e.payload ? e.payload.executionId : void 0;
|
|
@@ -10997,8 +10976,8 @@ function _f(e, t, n) {
|
|
|
10997
10976
|
let a = e.payload.nodeId;
|
|
10998
10977
|
return typeof a == "string" ? n?.get(a) ?? a : e.kind.startsWith("run.") ? t?.("run.flowSubject") ?? "Flow run" : t?.("run.nodeSubject") ?? "Node";
|
|
10999
10978
|
}
|
|
11000
|
-
function
|
|
11001
|
-
let r =
|
|
10979
|
+
function yf(e, t, n) {
|
|
10980
|
+
let r = df(e, n), i = df(t, n), a = /* @__PURE__ */ new Set();
|
|
11002
10981
|
for (let e of [
|
|
11003
10982
|
"nodes",
|
|
11004
10983
|
"comments",
|
|
@@ -11016,13 +10995,13 @@ function vf(e, t, n) {
|
|
|
11016
10995
|
before: o(r),
|
|
11017
10996
|
after: o(i),
|
|
11018
10997
|
nodeIds: [...a],
|
|
11019
|
-
beforeOrder:
|
|
11020
|
-
afterOrder:
|
|
10998
|
+
beforeOrder: Bd(e, n),
|
|
10999
|
+
afterOrder: Bd(t, n)
|
|
11021
11000
|
};
|
|
11022
11001
|
}
|
|
11023
|
-
function
|
|
11002
|
+
function bf(e, t, n, r) {
|
|
11024
11003
|
if (n.nodeIds.length == 0) return e;
|
|
11025
|
-
let i =
|
|
11004
|
+
let i = df(e, t), a = r ? n.after : n.before;
|
|
11026
11005
|
for (let e of [
|
|
11027
11006
|
"nodes",
|
|
11028
11007
|
"comments",
|
|
@@ -11034,17 +11013,17 @@ function yf(e, t, n, r) {
|
|
|
11034
11013
|
}
|
|
11035
11014
|
return i.order = [...r ? n.afterOrder : n.beforeOrder], {
|
|
11036
11015
|
...e,
|
|
11037
|
-
designer:
|
|
11016
|
+
designer: uf(cf(e), t, i)
|
|
11038
11017
|
};
|
|
11039
11018
|
}
|
|
11040
11019
|
//#endregion
|
|
11041
11020
|
//#region src/workbench/browser/runtime/stores/resource.ts
|
|
11042
|
-
var
|
|
11043
|
-
function
|
|
11044
|
-
let n =
|
|
11045
|
-
return n ?? (n = e(t, (e) => e.data),
|
|
11021
|
+
var xf = /* @__PURE__ */ new WeakMap();
|
|
11022
|
+
function Sf(t) {
|
|
11023
|
+
let n = xf.get(t);
|
|
11024
|
+
return n ?? (n = e(t, (e) => e.data), xf.set(t, n)), n;
|
|
11046
11025
|
}
|
|
11047
|
-
var
|
|
11026
|
+
var Cf = class {
|
|
11048
11027
|
#e;
|
|
11049
11028
|
#t;
|
|
11050
11029
|
#n;
|
|
@@ -11134,7 +11113,7 @@ var Sf = class {
|
|
|
11134
11113
|
}), this.#e.dispose();
|
|
11135
11114
|
}
|
|
11136
11115
|
};
|
|
11137
|
-
function
|
|
11116
|
+
function wf(e, t, n = !1) {
|
|
11138
11117
|
return new Promise((r, i) => {
|
|
11139
11118
|
let a, o = () => {
|
|
11140
11119
|
a?.(), t?.removeEventListener("abort", s);
|
|
@@ -11147,7 +11126,7 @@ function Cf(e, t, n = !1) {
|
|
|
11147
11126
|
c() || (a = e.subscribe(c), t?.addEventListener("abort", s, { once: !0 }), c());
|
|
11148
11127
|
});
|
|
11149
11128
|
}
|
|
11150
|
-
function
|
|
11129
|
+
function Tf(e, t, n) {
|
|
11151
11130
|
if (!t.aborted) {
|
|
11152
11131
|
if ("then" in e) n({
|
|
11153
11132
|
data: void 0,
|
|
@@ -11176,8 +11155,8 @@ function wf(e, t, n) {
|
|
|
11176
11155
|
}
|
|
11177
11156
|
//#endregion
|
|
11178
11157
|
//#region src/workbench/browser/runtime/stores/optionSource.ts
|
|
11179
|
-
function
|
|
11180
|
-
return "then" in e ? e.then((e) => e === void 0 ? void 0 : n(e)) :
|
|
11158
|
+
function Ef(e, t, n) {
|
|
11159
|
+
return "then" in e ? e.then((e) => e === void 0 ? void 0 : n(e)) : Df(t, (t) => {
|
|
11181
11160
|
let r = t(e);
|
|
11182
11161
|
return {
|
|
11183
11162
|
...r,
|
|
@@ -11185,12 +11164,12 @@ function Tf(e, t, n) {
|
|
|
11185
11164
|
};
|
|
11186
11165
|
});
|
|
11187
11166
|
}
|
|
11188
|
-
function
|
|
11167
|
+
function Df(e, n) {
|
|
11189
11168
|
let r = t(n);
|
|
11190
11169
|
return e.addEventListener("abort", () => r.dispose(), { once: !0 }), r;
|
|
11191
11170
|
}
|
|
11192
|
-
function
|
|
11193
|
-
return
|
|
11171
|
+
function Of(e, t) {
|
|
11172
|
+
return Df(e, (e) => {
|
|
11194
11173
|
let n = t.map((t) => e(t));
|
|
11195
11174
|
return {
|
|
11196
11175
|
data: n.every((e) => e.data === void 0) ? void 0 : n.flatMap((e) => e.data ?? []),
|
|
@@ -11201,7 +11180,7 @@ function Df(e, t) {
|
|
|
11201
11180
|
}
|
|
11202
11181
|
//#endregion
|
|
11203
11182
|
//#region src/trigger/providers/feishu/config.ts
|
|
11204
|
-
function
|
|
11183
|
+
function kf(e) {
|
|
11205
11184
|
if (e.length != 0) {
|
|
11206
11185
|
if (e.every((e) => e.startsWith("drive.file."))) return "document";
|
|
11207
11186
|
if (e.every((e) => e == "calendar.calendar.event.changed_v4")) return "calendar";
|
|
@@ -11213,12 +11192,12 @@ function Of(e) {
|
|
|
11213
11192
|
].includes(e))) return "approval";
|
|
11214
11193
|
}
|
|
11215
11194
|
}
|
|
11216
|
-
function
|
|
11195
|
+
function Af(e) {
|
|
11217
11196
|
return e.length > 0 && e.every((e) => ["im.message.receive_v1", "im.chat.member.bot.added_v1"].includes(e));
|
|
11218
11197
|
}
|
|
11219
11198
|
//#endregion
|
|
11220
11199
|
//#region src/workbench/browser/runtime/editor/addNodeOptions.ts
|
|
11221
|
-
function
|
|
11200
|
+
function jf(e) {
|
|
11222
11201
|
let t = /* @__PURE__ */ new Map(), n = (e) => {
|
|
11223
11202
|
t.set(e.id, e);
|
|
11224
11203
|
for (let t of e.choices ?? []) n(t.option);
|
|
@@ -11226,7 +11205,7 @@ function Af(e) {
|
|
|
11226
11205
|
for (let t of e) n(t);
|
|
11227
11206
|
return t;
|
|
11228
11207
|
}
|
|
11229
|
-
function
|
|
11208
|
+
function Mf(e) {
|
|
11230
11209
|
let t = e("addNode.blocks");
|
|
11231
11210
|
return [
|
|
11232
11211
|
{
|
|
@@ -11365,9 +11344,9 @@ function jf(e) {
|
|
|
11365
11344
|
}
|
|
11366
11345
|
];
|
|
11367
11346
|
}
|
|
11368
|
-
function
|
|
11347
|
+
function Nf(e, t, n) {
|
|
11369
11348
|
if (e == null || t == null) return [];
|
|
11370
|
-
let r =
|
|
11349
|
+
let r = Mf(n);
|
|
11371
11350
|
if (t.kind != "flow") return r.filter((e) => e.kind != "agent");
|
|
11372
11351
|
let i = n("addNode.triggers"), a = [
|
|
11373
11352
|
{
|
|
@@ -11448,9 +11427,9 @@ function Mf(e, t, n) {
|
|
|
11448
11427
|
},
|
|
11449
11428
|
...r
|
|
11450
11429
|
];
|
|
11451
|
-
return Object.values(
|
|
11430
|
+
return Object.values(zu(e).graph(t)?.nodes ?? {}).some((e) => e.kind == "manual") ? a.filter((e) => e.id != "trigger:manual") : a;
|
|
11452
11431
|
}
|
|
11453
|
-
function
|
|
11432
|
+
function Pf(e, t, n, r) {
|
|
11454
11433
|
switch (e.kind) {
|
|
11455
11434
|
case "new-task": return {
|
|
11456
11435
|
kind: "code",
|
|
@@ -11520,41 +11499,41 @@ function Nf(e, t, n, r) {
|
|
|
11520
11499
|
}
|
|
11521
11500
|
//#endregion
|
|
11522
11501
|
//#region src/manifest/common/meta/block/generateTyping.ts
|
|
11523
|
-
function
|
|
11524
|
-
return e === "typescript" ?
|
|
11502
|
+
function Ff(e, t, n) {
|
|
11503
|
+
return e === "typescript" ? Bf(t, n) + "\n" : Vf(t, n) + "\n";
|
|
11525
11504
|
}
|
|
11526
|
-
var
|
|
11527
|
-
function
|
|
11528
|
-
return !e || typeof e != "object" ? !1 : e.contentMediaType === "oomol/artifact" ? !0 : Array.isArray(e.anyOf) ? e.anyOf.some(
|
|
11505
|
+
var If = /* @__PURE__ */ new Set(["color", "text"]), Lf = (e) => e.includes(" | ") ? `(${e})` : e;
|
|
11506
|
+
function Rf(e) {
|
|
11507
|
+
return !e || typeof e != "object" ? !1 : e.contentMediaType === "oomol/artifact" ? !0 : Array.isArray(e.anyOf) ? e.anyOf.some(Rf) : e.type === "object" ? Object.values(e.properties || {}).some(Rf) : e.type === "array" && Rf(e.items);
|
|
11529
11508
|
}
|
|
11530
|
-
function
|
|
11531
|
-
return [...e, ...t].some((e) =>
|
|
11509
|
+
function zf(e, t) {
|
|
11510
|
+
return [...e, ...t].some((e) => Rf(e.json_schema));
|
|
11532
11511
|
}
|
|
11533
|
-
function
|
|
11512
|
+
function Bf(e = [], t = []) {
|
|
11534
11513
|
let n = ["type Inputs = {"];
|
|
11535
|
-
for (let t of e) n.push(` ${t.handle}: ${
|
|
11514
|
+
for (let t of e) n.push(` ${t.handle}: ${Hf(t.json_schema, t.nullable)};`);
|
|
11536
11515
|
n.push("};"), n.push("type Outputs = {");
|
|
11537
|
-
for (let e of t) n.push(` ${e.handle}: ${
|
|
11538
|
-
return n.push("};"),
|
|
11516
|
+
for (let e of t) n.push(` ${e.handle}: ${Hf(e.json_schema, e.nullable)};`);
|
|
11517
|
+
return n.push("};"), zf(e, t) && n.unshift("import type { ArtifactRef } from '@oomol-lab/open-flow'", ""), n.join("\n");
|
|
11539
11518
|
}
|
|
11540
|
-
function
|
|
11519
|
+
function Vf(e = [], t = []) {
|
|
11541
11520
|
let n = ["@typedef {{"];
|
|
11542
|
-
for (let t of e) n.push(` ${t.handle}: ${
|
|
11521
|
+
for (let t of e) n.push(` ${t.handle}: ${Hf(t.json_schema, t.nullable)};`);
|
|
11543
11522
|
n.push("}} Inputs;"), n.push("@typedef {{");
|
|
11544
|
-
for (let e of t) n.push(` ${e.handle}: ${
|
|
11545
|
-
n.push("}} Outputs;"),
|
|
11523
|
+
for (let e of t) n.push(` ${e.handle}: ${Hf(e.json_schema, e.nullable)};`);
|
|
11524
|
+
n.push("}} Outputs;"), zf(e, t) && n.unshift("@import { ArtifactRef } from \"@oomol-lab/open-flow\"");
|
|
11546
11525
|
let r = n.map((e) => ` * ${e}`);
|
|
11547
11526
|
return r.unshift("/**"), r.push(" */"), r.join("\n");
|
|
11548
11527
|
}
|
|
11549
|
-
function
|
|
11528
|
+
function Hf(e, t) {
|
|
11550
11529
|
if (!e) return "unknown";
|
|
11551
11530
|
switch (e.contentMediaType) {
|
|
11552
11531
|
case "oomol/bin": return t ? "Uint8Array | null" : "Uint8Array";
|
|
11553
11532
|
case "oomol/artifact": return t ? "ArtifactRef | null" : "ArtifactRef";
|
|
11554
11533
|
}
|
|
11555
|
-
if (
|
|
11556
|
-
if (Array.isArray(e.anyOf)) return
|
|
11557
|
-
if (Array.isArray(e.enum)) return
|
|
11534
|
+
if (If.has(e["ui:widget"])) return t ? "string | null" : "string";
|
|
11535
|
+
if (Array.isArray(e.anyOf)) return Uf((t ? e.anyOf.concat({ type: "null" }) : e.anyOf).map((e) => Lf(Hf(e, !1)))) || "unknown";
|
|
11536
|
+
if (Array.isArray(e.enum)) return Uf((t ? e.enum.concat(null) : e.enum).map((e) => JSON.stringify(e))) || "unknown";
|
|
11558
11537
|
switch (e.type) {
|
|
11559
11538
|
case "null": return "null";
|
|
11560
11539
|
case "boolean": return t ? "boolean | null" : "boolean";
|
|
@@ -11564,35 +11543,35 @@ function Vf(e, t) {
|
|
|
11564
11543
|
case "object": {
|
|
11565
11544
|
let n = Object.keys(e.properties || {});
|
|
11566
11545
|
if (n.length === 0) return "Record<string, unknown>";
|
|
11567
|
-
let r = Array.isArray(e?.required) ? new Set(e.required) : /* @__PURE__ */ new Set(), i = `{ ${n.map((t) => `${JSON.stringify(t)}${r.has(t) ? "" : "?"}: ${
|
|
11546
|
+
let r = Array.isArray(e?.required) ? new Set(e.required) : /* @__PURE__ */ new Set(), i = `{ ${n.map((t) => `${JSON.stringify(t)}${r.has(t) ? "" : "?"}: ${Hf(e.properties[t], !1)}`).join("; ")} }`;
|
|
11568
11547
|
return t ? `${i} | null` : i;
|
|
11569
11548
|
}
|
|
11570
11549
|
case "array":
|
|
11571
11550
|
if (e.uniqueItems && Array.isArray(e.items?.enum)) {
|
|
11572
|
-
let n = `${
|
|
11551
|
+
let n = `${Lf(Hf(e.items, !1))}[]`;
|
|
11573
11552
|
return t ? `${n} | null` : n;
|
|
11574
11553
|
}
|
|
11575
11554
|
{
|
|
11576
|
-
let n = `${
|
|
11555
|
+
let n = `${Lf(Hf(e.items, !1))}[]`;
|
|
11577
11556
|
return t ? `${n} | null` : n;
|
|
11578
11557
|
}
|
|
11579
11558
|
default: return "unknown";
|
|
11580
11559
|
}
|
|
11581
11560
|
}
|
|
11582
|
-
function
|
|
11561
|
+
function Uf(e) {
|
|
11583
11562
|
let t = Array.from(new Set(e.filter((e) => !!e)));
|
|
11584
11563
|
return t.length === 0 || t.includes("unknown") ? "unknown" : t.join(" | ");
|
|
11585
11564
|
}
|
|
11586
11565
|
//#endregion
|
|
11587
11566
|
//#region src/workbench/browser/runtime/editor/flowChanges.ts
|
|
11588
|
-
function
|
|
11567
|
+
function Wf(e, t) {
|
|
11589
11568
|
return {
|
|
11590
11569
|
...e,
|
|
11591
11570
|
content: Ut(e.content, t)
|
|
11592
11571
|
};
|
|
11593
11572
|
}
|
|
11594
|
-
function
|
|
11595
|
-
let r =
|
|
11573
|
+
function Gf(e, t = [], n = {}) {
|
|
11574
|
+
let r = Ff("javascript", e.inputs.flatMap((e) => "handle" in e ? [{
|
|
11596
11575
|
handle: e.handle,
|
|
11597
11576
|
json_schema: e.jsonSchema,
|
|
11598
11577
|
nullable: e.nullable
|
|
@@ -11602,7 +11581,7 @@ function Wf(e, t = [], n = {}) {
|
|
|
11602
11581
|
nullable: e.nullable
|
|
11603
11582
|
}] : [])), i = [], a = /* @__PURE__ */ new Map();
|
|
11604
11583
|
for (let e of t) {
|
|
11605
|
-
let t = n[e.action], r = t?.inputSchema == null ? "Record<string, unknown>" :
|
|
11584
|
+
let t = n[e.action], r = t?.inputSchema == null ? "Record<string, unknown>" : Hf(t.inputSchema, !1), o = t?.outputSchema == null ? "unknown" : Hf(t.outputSchema, !1), s = `{ connectionId: ${e.connections.map((e) => JSON.stringify(e.connectionId)).join(" | ") || "never"}; connectionAlias?: never } | { connectionAlias: ${e.connections.flatMap((e) => e.alias == null ? [] : [JSON.stringify(e.alias)]).join(" | ") || "never"}; connectionId?: never }`, c = `(...args: ${e.connections.length > 0 && e.connectionId == null ? `[input: {} extends ${r} ? ${r} | undefined : ${r}, options: ${s}]` : `{} extends ${r} ? [input?: ${r}, options?: ${s}] : [input: ${r}, options?: ${s}]`}) => Promise<${o}>`;
|
|
11606
11585
|
i.push(`${JSON.stringify(e.action)}: ${c}`);
|
|
11607
11586
|
let l = e.action.indexOf("."), u = e.action.slice(0, l), d = a.get(u) ?? [];
|
|
11608
11587
|
d.push(`${JSON.stringify(e.action.slice(l + 1))}: ${c}`), a.set(u, d);
|
|
@@ -11610,7 +11589,7 @@ function Wf(e, t = [], n = {}) {
|
|
|
11610
11589
|
for (let [e, t] of a) i.push(`${JSON.stringify(e)}: { ${t.join("; ")} }`);
|
|
11611
11590
|
return `${r}/** @typedef {import("@oomol-lab/open-flow").TaskContext<{ ${i.join("; ").replaceAll("*/", "*\\/")} }>} TaskContext */\n`;
|
|
11612
11591
|
}
|
|
11613
|
-
function
|
|
11592
|
+
function Kf(e) {
|
|
11614
11593
|
return {
|
|
11615
11594
|
executor: {
|
|
11616
11595
|
action: e.actionId,
|
|
@@ -11622,7 +11601,7 @@ function Gf(e) {
|
|
|
11622
11601
|
outputs: Object.entries(e.outputs).map(([e, t]) => Object.assign({ handle: e }, t))
|
|
11623
11602
|
};
|
|
11624
11603
|
}
|
|
11625
|
-
function
|
|
11604
|
+
function qf(e, t, n) {
|
|
11626
11605
|
return {
|
|
11627
11606
|
id: n,
|
|
11628
11607
|
name: `${e.actionId.replace(/[^a-zA-Z0-9_]/g, "_").slice(0, 48)}_${n.slice(0, 8)}`,
|
|
@@ -11633,7 +11612,7 @@ function Kf(e, t, n) {
|
|
|
11633
11612
|
inputs: Object.entries(e.inputs).map(([e, { value: t, ...n }]) => Object.assign({ handle: e }, n, { source: { kind: "model" } }))
|
|
11634
11613
|
};
|
|
11635
11614
|
}
|
|
11636
|
-
function
|
|
11615
|
+
function Jf(e, t) {
|
|
11637
11616
|
return [{
|
|
11638
11617
|
kind: "subflow.create",
|
|
11639
11618
|
subflow: {
|
|
@@ -11661,7 +11640,7 @@ function qf(e, t) {
|
|
|
11661
11640
|
subflowId: e
|
|
11662
11641
|
}];
|
|
11663
11642
|
}
|
|
11664
|
-
function
|
|
11643
|
+
function Yf(e, t, n) {
|
|
11665
11644
|
let r = e.graph(t);
|
|
11666
11645
|
if (r == null) return n;
|
|
11667
11646
|
let i = new Set(Object.values(r.nodes).flatMap((e) => e.name == null ? [] : [e.name]));
|
|
@@ -11677,7 +11656,7 @@ function Jf(e, t, n) {
|
|
|
11677
11656
|
};
|
|
11678
11657
|
});
|
|
11679
11658
|
}
|
|
11680
|
-
function
|
|
11659
|
+
function Xf(e, t, n, r, i) {
|
|
11681
11660
|
let a;
|
|
11682
11661
|
switch (r.kind) {
|
|
11683
11662
|
case "code":
|
|
@@ -11702,7 +11681,7 @@ function Yf(e, t, n, r, i) {
|
|
|
11702
11681
|
a = Ca(t, {
|
|
11703
11682
|
nodeId: n,
|
|
11704
11683
|
taskId: i()
|
|
11705
|
-
},
|
|
11684
|
+
}, Kf(r.action));
|
|
11706
11685
|
break;
|
|
11707
11686
|
case "condition":
|
|
11708
11687
|
a = Ea(t, n, r.name);
|
|
@@ -11719,7 +11698,7 @@ function Yf(e, t, n, r, i) {
|
|
|
11719
11698
|
case "subflow": {
|
|
11720
11699
|
let i = e.subflow(r.subflowId);
|
|
11721
11700
|
if (i == null) return;
|
|
11722
|
-
a =
|
|
11701
|
+
a = mp(t, n, r.subflowId, i.inputs);
|
|
11723
11702
|
break;
|
|
11724
11703
|
}
|
|
11725
11704
|
case "manual":
|
|
@@ -11756,12 +11735,12 @@ function Yf(e, t, n, r, i) {
|
|
|
11756
11735
|
...r.connectionId == null ? {} : { connectionId: r.connectionId }
|
|
11757
11736
|
});
|
|
11758
11737
|
}
|
|
11759
|
-
return a == null ? void 0 :
|
|
11738
|
+
return a == null ? void 0 : Yf(e, t, a);
|
|
11760
11739
|
}
|
|
11761
|
-
function
|
|
11740
|
+
function Zf(e, t, n) {
|
|
11762
11741
|
return Ma(e.revision.content, t, n);
|
|
11763
11742
|
}
|
|
11764
|
-
function
|
|
11743
|
+
function Qf(e, t, n) {
|
|
11765
11744
|
let r = e.graph(t)?.nodes ?? {}, i = Object.fromEntries(n.flatMap((e) => r[e] == null ? [] : [[e, r[e]]]));
|
|
11766
11745
|
return {
|
|
11767
11746
|
edges: (e.graph(t)?.edges ?? []).filter((e) => i[e.source] != null && i[e.target] != null),
|
|
@@ -11778,7 +11757,7 @@ function Zf(e, t, n) {
|
|
|
11778
11757
|
nodes: i
|
|
11779
11758
|
};
|
|
11780
11759
|
}
|
|
11781
|
-
function
|
|
11760
|
+
function $f(e, t, n, r) {
|
|
11782
11761
|
if (e.graph(t) == null) return {
|
|
11783
11762
|
changes: [],
|
|
11784
11763
|
nodeIds: [],
|
|
@@ -11901,15 +11880,15 @@ function Qf(e, t, n, r) {
|
|
|
11901
11880
|
});
|
|
11902
11881
|
}
|
|
11903
11882
|
return {
|
|
11904
|
-
changes:
|
|
11883
|
+
changes: Yf(e, t, c),
|
|
11905
11884
|
nodeIds: [...s.values()],
|
|
11906
11885
|
sourceIds: o
|
|
11907
11886
|
};
|
|
11908
11887
|
}
|
|
11909
|
-
function
|
|
11888
|
+
function ep(e, t, n, r) {
|
|
11910
11889
|
return Na(e.revision.content, t, n, r);
|
|
11911
11890
|
}
|
|
11912
|
-
function
|
|
11891
|
+
function tp(e, t, n, r) {
|
|
11913
11892
|
let i = e.node(t, n)?.node;
|
|
11914
11893
|
if (i != null) return i.description == r ? [] : [{
|
|
11915
11894
|
before: i.description,
|
|
@@ -11920,7 +11899,7 @@ function ep(e, t, n, r) {
|
|
|
11920
11899
|
value: r
|
|
11921
11900
|
}];
|
|
11922
11901
|
}
|
|
11923
|
-
function
|
|
11902
|
+
function np(e, t, n, r) {
|
|
11924
11903
|
let i = e.node(t, n)?.node;
|
|
11925
11904
|
if (i != null) return i.icon == r ? [] : [{
|
|
11926
11905
|
before: i.icon,
|
|
@@ -11931,7 +11910,7 @@ function tp(e, t, n, r) {
|
|
|
11931
11910
|
value: r
|
|
11932
11911
|
}];
|
|
11933
11912
|
}
|
|
11934
|
-
function
|
|
11913
|
+
function rp(e, t, n, r) {
|
|
11935
11914
|
let i = e.node(t, n)?.node;
|
|
11936
11915
|
if (i == null || i.kind == "manual") return;
|
|
11937
11916
|
let a = "inputs" in i ? r : r ?? i.name;
|
|
@@ -11944,17 +11923,17 @@ function np(e, t, n, r) {
|
|
|
11944
11923
|
value: a
|
|
11945
11924
|
}];
|
|
11946
11925
|
}
|
|
11947
|
-
function
|
|
11926
|
+
function ip(e, t, n, r, i) {
|
|
11948
11927
|
let a = e.graph(t)?.nodes[n];
|
|
11949
11928
|
if (!(i === void 0 && a != null && "inputs" in a && a.inputs[r] == null)) return Pa(e.revision.content, t, n, r, i);
|
|
11950
11929
|
}
|
|
11951
|
-
function
|
|
11930
|
+
function ap(e, t, n, r, i, a) {
|
|
11952
11931
|
return La(e.revision.content, t, n, r, i, a);
|
|
11953
11932
|
}
|
|
11954
|
-
function
|
|
11933
|
+
function op(e, t, n, r) {
|
|
11955
11934
|
let i = e.graph(t), a = i?.nodes[n];
|
|
11956
11935
|
if (i == null || a?.kind != "condition") return;
|
|
11957
|
-
let o = Object.fromEntries([...a.cases.map((e) => [e.output, !0]), ...a.defaultOutput == null ? [] : [[a.defaultOutput, !0]]]), s = Object.fromEntries([...r.cases.map((e) => [e.output, !0]), ...r.defaultOutput == null ? [] : [[r.defaultOutput, !0]]]), c = a.input.handle == r.input.handle ? void 0 : [a.input.handle, r.input.handle], l =
|
|
11936
|
+
let o = Object.fromEntries([...a.cases.map((e) => [e.output, !0]), ...a.defaultOutput == null ? [] : [[a.defaultOutput, !0]]]), s = Object.fromEntries([...r.cases.map((e) => [e.output, !0]), ...r.defaultOutput == null ? [] : [[r.defaultOutput, !0]]]), c = a.input.handle == r.input.handle ? void 0 : [a.input.handle, r.input.handle], l = gp(Object.keys(o).map((e) => ({ handle: e })), Object.keys(s).map((e) => ({ handle: e }))), u = new Set(Object.keys(s)), d = [];
|
|
11958
11937
|
for (let e of i.edges) {
|
|
11959
11938
|
if (e.source != n || e.sourceHandle == null) continue;
|
|
11960
11939
|
let r = l != null && e.sourceHandle == l[0] ? l[1] : e.sourceHandle;
|
|
@@ -12003,11 +11982,11 @@ function ap(e, t, n, r) {
|
|
|
12003
11982
|
value: r
|
|
12004
11983
|
});
|
|
12005
11984
|
}
|
|
12006
|
-
d.push(...
|
|
11985
|
+
d.push(...yp(o.inputs, i, t, e));
|
|
12007
11986
|
}
|
|
12008
11987
|
return Ra(e.revision.content, d);
|
|
12009
11988
|
}
|
|
12010
|
-
function
|
|
11989
|
+
function sp(e, t, n, r) {
|
|
12011
11990
|
let i = e.node(t, n)?.node;
|
|
12012
11991
|
if (i?.kind != "value") return;
|
|
12013
11992
|
let a = r.map((e) => ({
|
|
@@ -12025,12 +12004,18 @@ function op(e, t, n, r) {
|
|
|
12025
12004
|
value: a
|
|
12026
12005
|
}];
|
|
12027
12006
|
}
|
|
12028
|
-
function
|
|
12007
|
+
function cp(e, t, n, r) {
|
|
12029
12008
|
if (t.kind != "flow") return;
|
|
12030
12009
|
let i = e.graph(t), a = i?.nodes[n];
|
|
12031
12010
|
if (i == null || a?.kind != "approval" && a?.kind != "wait") return;
|
|
12032
|
-
let o = {
|
|
12033
|
-
|
|
12011
|
+
let o = {
|
|
12012
|
+
inputDefinitions: a.inputDefinitions,
|
|
12013
|
+
prompt: a.prompt
|
|
12014
|
+
}, s = {
|
|
12015
|
+
inputDefinitions: r.inputDefinitions ?? a.inputDefinitions,
|
|
12016
|
+
prompt: r.prompt
|
|
12017
|
+
}, c = [];
|
|
12018
|
+
if (a.name != r.name && c.push({
|
|
12034
12019
|
before: a.name,
|
|
12035
12020
|
field: "name",
|
|
12036
12021
|
kind: "graph.node.field.set",
|
|
@@ -12043,9 +12028,11 @@ function sp(e, t, n, r) {
|
|
|
12043
12028
|
nodeId: n,
|
|
12044
12029
|
target: t,
|
|
12045
12030
|
value: s
|
|
12046
|
-
}),
|
|
12031
|
+
}), A(o.inputDefinitions, s.inputDefinitions)) return c;
|
|
12032
|
+
let l = _p(a.inputs, o.inputDefinitions, s.inputDefinitions);
|
|
12033
|
+
return c.push(...yp(a.inputs, l, t, n)), Ra(e.revision.content, c);
|
|
12047
12034
|
}
|
|
12048
|
-
function
|
|
12035
|
+
function lp(e, t, n, r) {
|
|
12049
12036
|
let i = e.graph(t)?.nodes[n];
|
|
12050
12037
|
if (i?.kind == "task") switch (r.kind) {
|
|
12051
12038
|
case "agent": return i.taskId == null || !A(e.task(i.taskId), r.before) ? void 0 : [{
|
|
@@ -12054,7 +12041,7 @@ function cp(e, t, n, r) {
|
|
|
12054
12041
|
before: r.before,
|
|
12055
12042
|
value: r.task
|
|
12056
12043
|
}];
|
|
12057
|
-
case "code": return i.task == null ? void 0 :
|
|
12044
|
+
case "code": return i.task == null ? void 0 : bp(e, t, n, {
|
|
12058
12045
|
...i.task,
|
|
12059
12046
|
name: r.name
|
|
12060
12047
|
});
|
|
@@ -12087,31 +12074,31 @@ function cp(e, t, n, r) {
|
|
|
12087
12074
|
}
|
|
12088
12075
|
}
|
|
12089
12076
|
}
|
|
12090
|
-
function
|
|
12077
|
+
function up(e, t, n, r) {
|
|
12091
12078
|
let i = e.node(t, n);
|
|
12092
12079
|
if (i?.kind == "task" && i.node.taskId != null && i.definition != null && "executor" in i.definition && i.definition.executor.kind == "agent") {
|
|
12093
|
-
let a =
|
|
12080
|
+
let a = bp(e, t, n, {
|
|
12094
12081
|
...i.definition,
|
|
12095
12082
|
...r
|
|
12096
12083
|
});
|
|
12097
12084
|
return a == null ? void 0 : Ra(e.revision.content, a);
|
|
12098
12085
|
}
|
|
12099
12086
|
if (i?.kind != "task" || i.node.task == null || i.module == null || A(i.node.task.inputs, r.inputs) && A(i.node.task.outputs, r.outputs)) return;
|
|
12100
|
-
let a =
|
|
12087
|
+
let a = bp(e, t, n, {
|
|
12101
12088
|
...i.node.task,
|
|
12102
12089
|
...r
|
|
12103
12090
|
});
|
|
12104
12091
|
if (a != null) return Ra(e.revision.content, a);
|
|
12105
12092
|
}
|
|
12106
|
-
function
|
|
12093
|
+
function dp(e, t, n, r) {
|
|
12107
12094
|
let i = e.node(t, n);
|
|
12108
12095
|
if (i?.kind != "task" || i.node.task != null || i.definition == null) return;
|
|
12109
12096
|
let a = i.node;
|
|
12110
12097
|
if (A(a.additionalInputs ?? [], r)) return;
|
|
12111
|
-
let o =
|
|
12098
|
+
let o = gp(a.additionalInputs ?? [], r), s = new Set(i.definition.inputs.flatMap((e) => "handle" in e ? [e.handle] : []).concat(r.map((e) => e.handle))), c = Object.assign({}, a.inputs);
|
|
12112
12099
|
o != null && Object.hasOwn(c, o[0]) && (c[o[1]] = c[o[0]], delete c[o[0]]);
|
|
12113
12100
|
for (let e of Object.keys(c)) s.has(e) || delete c[e];
|
|
12114
|
-
|
|
12101
|
+
vp(c, a.additionalInputs ?? [], r, o);
|
|
12115
12102
|
let l = r.length == 0 ? void 0 : r;
|
|
12116
12103
|
return Ra(e.revision.content, [{
|
|
12117
12104
|
before: a.additionalInputs,
|
|
@@ -12119,9 +12106,9 @@ function up(e, t, n, r) {
|
|
|
12119
12106
|
nodeId: n,
|
|
12120
12107
|
target: t,
|
|
12121
12108
|
value: l
|
|
12122
|
-
}, ...
|
|
12109
|
+
}, ...yp(a.inputs, c, t, n)]);
|
|
12123
12110
|
}
|
|
12124
|
-
function
|
|
12111
|
+
function fp(e, t, n, r) {
|
|
12125
12112
|
let i = e.trigger(n);
|
|
12126
12113
|
if (i == null || i.kind != "webhook") return;
|
|
12127
12114
|
let a = {
|
|
@@ -12139,7 +12126,7 @@ function dp(e, t, n, r) {
|
|
|
12139
12126
|
value: o
|
|
12140
12127
|
}];
|
|
12141
12128
|
}
|
|
12142
|
-
function
|
|
12129
|
+
function pp(e, t, n) {
|
|
12143
12130
|
let r = e.subflow(t);
|
|
12144
12131
|
if (r == null) return;
|
|
12145
12132
|
let i = {
|
|
@@ -12154,11 +12141,11 @@ function fp(e, t, n) {
|
|
|
12154
12141
|
subflowId: t
|
|
12155
12142
|
}];
|
|
12156
12143
|
}
|
|
12157
|
-
function
|
|
12144
|
+
function mp(e, t, n, r) {
|
|
12158
12145
|
return [{
|
|
12159
12146
|
kind: "graph.node.create",
|
|
12160
12147
|
node: {
|
|
12161
|
-
inputs:
|
|
12148
|
+
inputs: hp(r),
|
|
12162
12149
|
kind: "subflow",
|
|
12163
12150
|
subflowId: n
|
|
12164
12151
|
},
|
|
@@ -12166,17 +12153,24 @@ function pp(e, t, n, r) {
|
|
|
12166
12153
|
target: e
|
|
12167
12154
|
}];
|
|
12168
12155
|
}
|
|
12169
|
-
function
|
|
12156
|
+
function hp(e) {
|
|
12170
12157
|
return Object.fromEntries(e.flatMap((e) => "handle" in e && Object.hasOwn(e, "value") ? [[e.handle, {
|
|
12171
12158
|
kind: "value",
|
|
12172
12159
|
value: e.value
|
|
12173
12160
|
}]] : []));
|
|
12174
12161
|
}
|
|
12175
|
-
function
|
|
12162
|
+
function gp(e, t) {
|
|
12176
12163
|
let n = new Set(e.flatMap((e) => "handle" in e ? [e.handle] : [])), r = new Set(t.flatMap((e) => "handle" in e ? [e.handle] : [])), i = [...n].filter((e) => !r.has(e)), a = [...r].filter((e) => !n.has(e));
|
|
12177
12164
|
return i.length == 1 && a.length == 1 ? [i[0], a[0]] : void 0;
|
|
12178
12165
|
}
|
|
12179
|
-
function
|
|
12166
|
+
function _p(e, t, n, r = gp(t, n)) {
|
|
12167
|
+
let i = { ...e };
|
|
12168
|
+
r != null && Object.hasOwn(i, r[0]) && (i[r[1]] = i[r[0]], delete i[r[0]]);
|
|
12169
|
+
let a = new Set(n.flatMap((e) => "handle" in e ? [e.handle] : []));
|
|
12170
|
+
for (let e of Object.keys(i)) a.has(e) || delete i[e];
|
|
12171
|
+
return vp(i, t, n, r), i;
|
|
12172
|
+
}
|
|
12173
|
+
function vp(e, t, n, r) {
|
|
12180
12174
|
for (let i of n) {
|
|
12181
12175
|
if (!("handle" in i)) continue;
|
|
12182
12176
|
let n = r?.[1] === i.handle ? r[0] : i.handle, a = t.find((e) => "handle" in e && e.handle === n), o = e[i.handle];
|
|
@@ -12188,7 +12182,7 @@ function gp(e, t, n, r) {
|
|
|
12188
12182
|
};
|
|
12189
12183
|
}
|
|
12190
12184
|
}
|
|
12191
|
-
function
|
|
12185
|
+
function yp(e, t, n, r) {
|
|
12192
12186
|
let i = /* @__PURE__ */ new Set([...Object.keys(e), ...Object.keys(t)]), a = [];
|
|
12193
12187
|
for (let o of i) A(e[o], t[o]) || a.push({
|
|
12194
12188
|
before: e[o],
|
|
@@ -12200,12 +12194,12 @@ function _p(e, t, n, r) {
|
|
|
12200
12194
|
});
|
|
12201
12195
|
return a;
|
|
12202
12196
|
}
|
|
12203
|
-
function
|
|
12197
|
+
function bp(e, t, n, r) {
|
|
12204
12198
|
let i = e.graph(t), a = i?.nodes[n];
|
|
12205
12199
|
if (i == null || a?.kind != "task") return;
|
|
12206
12200
|
let o = a.task ?? e.task(a.taskId);
|
|
12207
12201
|
if (o == null) return;
|
|
12208
|
-
let s =
|
|
12202
|
+
let s = gp(o.inputs, r.inputs), c = gp(o.outputs, r.outputs), l = new Set(r.inputs.flatMap((e) => "handle" in e ? [e.handle] : [])), u = new Set(r.outputs.flatMap((e) => "handle" in e ? [e.handle] : [])), d = [];
|
|
12209
12203
|
for (let e of i.edges) {
|
|
12210
12204
|
if (e.source != n || e.sourceHandle == null) continue;
|
|
12211
12205
|
let r = c != null && e.sourceHandle == c[0] ? c[1] : e.sourceHandle;
|
|
@@ -12222,14 +12216,9 @@ function vp(e, t, n, r) {
|
|
|
12222
12216
|
target: t
|
|
12223
12217
|
}));
|
|
12224
12218
|
}
|
|
12225
|
-
for (let [e,
|
|
12226
|
-
if (!("inputs" in
|
|
12227
|
-
let i = { ...
|
|
12228
|
-
if (e == n) {
|
|
12229
|
-
s != null && Object.hasOwn(i, s[0]) && (i[s[1]] = i[s[0]], delete i[s[0]]);
|
|
12230
|
-
for (let e of Object.keys(i)) l.has(e) || delete i[e];
|
|
12231
|
-
gp(i, o.inputs, r.inputs, s);
|
|
12232
|
-
}
|
|
12219
|
+
for (let [e, l] of Object.entries(i.nodes)) {
|
|
12220
|
+
if (!("inputs" in l)) continue;
|
|
12221
|
+
let i = e == n ? _p(l.inputs, o.inputs, r.inputs, s) : { ...l.inputs };
|
|
12233
12222
|
for (let [e, t] of Object.entries(i)) {
|
|
12234
12223
|
if (t.kind != "sources") continue;
|
|
12235
12224
|
let r = t.sources.map((e) => e.kind != "node" || e.nodeId != n ? e : c != null && e.output == c[0] ? {
|
|
@@ -12264,7 +12253,7 @@ function vp(e, t, n, r) {
|
|
|
12264
12253
|
value: i
|
|
12265
12254
|
});
|
|
12266
12255
|
}
|
|
12267
|
-
d.push(...
|
|
12256
|
+
d.push(...yp(l.inputs, i, t, e));
|
|
12268
12257
|
}
|
|
12269
12258
|
if (a.task == null && "executor" in r && r.executor.kind == "agent" && "executor" in o) {
|
|
12270
12259
|
let e = r.executor, t = (e) => e.kind == "input" ? s != null && e.input == s[0] ? {
|
|
@@ -12301,4 +12290,4 @@ function vp(e, t, n, r) {
|
|
|
12301
12290
|
return d;
|
|
12302
12291
|
}
|
|
12303
12292
|
//#endregion
|
|
12304
|
-
export {
|
|
12293
|
+
export { ld as $, pi as $t, Df as A, da as At, vf as B, sa as Bt, Pf as C, _a as Ct, Af as D, ma as Dt, kf as E, ca as Et, Nd as F, Qi as Ft, pf as G, Wi as Gt, bf as H, ra as Ht, yf as I, ea as It, kd as J, Ii as Jt, ff as K, Ri as Kt, gf as L, $i as Lt, Tf as M, Yi as Mt, Sf as N, ia as Nt, Of as O, pa as Ot, wf as P, Zi as Pt, ud as Q, hi as Qt, Pd as R, aa as Rt, fp as S, sn as Sn, Ha as St, jf as T, ha as Tt, mf as U, na as Ut, hf as V, ta as Vt, _f as W, Xi as Wt, fd as X, yi as Xt, Sd as Y, Pi as Yt, cd as Z, vi as Zt, pp as _, gn as _n, qa as _t, Qf as a, qr as an, vu as at, up as b, cn as bn, Ua as bt, $f as c, Wr as cn, lu as ct, op as d, Lr as dn, to as dt, di as en, Zu as et, tp as f, Fr as fn, ao as ft, cp as g, L as gn, xa as gt, ep as h, On as hn, Za as ht, Gf as i, Zr as in, Nu as it, Cf as j, fa as jt, Ef as k, la as kt, ip as l, Br as ln, lo as lt, rp as m, Gn as mn, Qa as mt, qf as n, $r as nn, Yu as nt, Jf as o, Vr as on, fu as ot, np as p, Or as pn, $a as pt, Rd as q, Li as qt, Wf as r, Xr as rn, zu as rt, Zf as s, Ur as sn, tu as st, Xf as t, Qr as tn, Ku as tt, ap as u, Rr as un, so as ut, lp as v, R as vn, Ba as vt, Nf as w, ga as wt, sp as x, I as xn, Va as xt, dp as y, z as yn, Ia as yt, sf as z, oa as zt };
|