@pstdio/workbench 0.1.0
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/README.md +343 -0
- package/dist/context-key-service-C--cHa0B.js +447 -0
- package/dist/context-key-service-C--cHa0B.js.map +1 -0
- package/dist/core.d.ts +1885 -0
- package/dist/core.js +64 -0
- package/dist/core.js.map +1 -0
- package/dist/extensions.d.ts +1934 -0
- package/dist/extensions.js +1728 -0
- package/dist/extensions.js.map +1 -0
- package/dist/file-renderer-view-DrrhYnb_.js +171 -0
- package/dist/file-renderer-view-DrrhYnb_.js.map +1 -0
- package/dist/icon-B9XolQG8.js +35 -0
- package/dist/icon-B9XolQG8.js.map +1 -0
- package/dist/index.d.ts +1885 -0
- package/dist/index.js +64 -0
- package/dist/index.js.map +1 -0
- package/dist/react.d.ts +2020 -0
- package/dist/react.js +3905 -0
- package/dist/react.js.map +1 -0
- package/dist/storage.d.ts +128 -0
- package/dist/storage.js +87 -0
- package/dist/storage.js.map +1 -0
- package/dist/surface-reconcile-DkRf01ro.js +260 -0
- package/dist/surface-reconcile-DkRf01ro.js.map +1 -0
- package/dist/testing.d.ts +1620 -0
- package/dist/testing.js +46 -0
- package/dist/testing.js.map +1 -0
- package/dist/webview-runtime.d.ts +10 -0
- package/dist/webview-runtime.js +31 -0
- package/dist/webview-runtime.js.map +1 -0
- package/dist/workbench-core-DFpwi8Lo.js +2264 -0
- package/dist/workbench-core-DFpwi8Lo.js.map +1 -0
- package/dist/workbench-menu-paths-CQVH6z4_.js +11 -0
- package/dist/workbench-menu-paths-CQVH6z4_.js.map +1 -0
- package/package.json +95 -0
package/dist/react.js
ADDED
|
@@ -0,0 +1,3905 @@
|
|
|
1
|
+
import { o as yo, m as wt, e as kn, j as vo, w as So, k as wo, h as xo, i as Po, s as Ut } from "./context-key-service-C--cHa0B.js";
|
|
2
|
+
import { d as Qc } from "./context-key-service-C--cHa0B.js";
|
|
3
|
+
import { jsx as a, jsxs as W, Fragment as Tn } from "react/jsx-runtime";
|
|
4
|
+
import { c as C } from "react/compiler-runtime";
|
|
5
|
+
import { Box as j, Center as zt, Flex as le, Tabs as Tt, Text as oe, CloseButton as _n, Menu as ue, Portal as Dt, IconButton as Ye, HStack as Le, Textarea as Rn, Input as Wn, Button as Oe, Stack as ae, Dialog as pe, Skeleton as Io, Spinner as Co, Grid as ko } from "@chakra-ui/react";
|
|
6
|
+
import { ScrollArea as ze, useTabVisibilityStore as To, filterVisibleTabs as _o, buildTabVisibilityMenuActions as Ro, ListRow as An, Tooltip as Qe, Breadcrumb as Wo, SessionIndicator as Ao, Checkbox as En, useThemePreference as $n, Palette as Eo, PaletteShortcut as st, toaster as ft, ParamEditor as Hn, EmptyState as gt, TreeList as $t, useTreeListVisibilityStore as tt, filterVisibleNodes as Gt, filterVisibleSections as $o, buildTreeVisibilityMenuActions as Ho, resolveVisibility as Mo, Header as Ve, AttachedPanel as No, BubbleButton as Bo, BubblePanel as Oo, ResizableSplitLayout as rt, defaultThemePreferences as zo, ChakraProvider as Do, psTheme as Lo, FileIconThemePreferenceProvider as Vo, ThemePreferenceProvider as Fo, Toaster as Ko } from "@pstdio/ui";
|
|
7
|
+
import { useStore as jo } from "zustand";
|
|
8
|
+
import { useRef as me, useLayoutEffect as Lt, useState as U, useEffect as re, Fragment as Vt, createContext as Mn, useContext as Nn, useSyncExternalStore as Bn, createElement as it, Suspense as qo, lazy as Uo } from "react";
|
|
9
|
+
import { W as L } from "./icon-B9XolQG8.js";
|
|
10
|
+
import { w as pt, b as Go, r as Xo, c as Xt, d as Yt, a as Yo } from "./workbench-menu-paths-CQVH6z4_.js";
|
|
11
|
+
import { Terminal as Qo, Search as Zo, CircleDot as Jo, Circle as er, ChevronDown as tr, Minimize2 as nr, MessageCircle as or } from "lucide-react";
|
|
12
|
+
import { g as xt } from "./surface-reconcile-DkRf01ro.js";
|
|
13
|
+
import { createPortal as On } from "react-dom";
|
|
14
|
+
import { useHotkeys as rr } from "@tanstack/react-hotkeys";
|
|
15
|
+
import { DiffBubble as ir } from "@pstdio/ui/diff";
|
|
16
|
+
import { Terminal as sr } from "@pstdio/ui/terminal";
|
|
17
|
+
import { useDataRendererStore as Qt, DataRenderer as lr, isAttributesSource as ar } from "@pstdio/ui/data-renderer";
|
|
18
|
+
const $ = (t, e) => jo(t, e), qe = {
|
|
19
|
+
activityBar: "var(--chakra-colors-bg-muted)",
|
|
20
|
+
sideBar: "var(--chakra-colors-bg-subtle)",
|
|
21
|
+
main: "var(--chakra-colors-bg)",
|
|
22
|
+
panel: "var(--chakra-colors-bg-panel)",
|
|
23
|
+
statusBar: "var(--chakra-colors-bg-subtle)"
|
|
24
|
+
}, Ce = (t, e) => `var(--chakra-colors-vscode-${t.replaceAll(".", "-")}, ${e})`, F = {
|
|
25
|
+
activityBar: Ce("activityBar.background", Ce("sideBar.background", qe.activityBar)),
|
|
26
|
+
sideBar: Ce("sideBar.background", qe.sideBar),
|
|
27
|
+
main: Ce("editor.background", qe.main),
|
|
28
|
+
panel: Ce("panel.background", qe.panel),
|
|
29
|
+
statusBar: Ce("statusBar.background", Ce("sideBar.background", qe.statusBar)),
|
|
30
|
+
widget: Ce("editorWidget.background", Ce("panel.background", qe.panel))
|
|
31
|
+
}, cr = {
|
|
32
|
+
nav: F.main,
|
|
33
|
+
activity: F.activityBar,
|
|
34
|
+
"left-header": F.sideBar,
|
|
35
|
+
left: F.sideBar,
|
|
36
|
+
"main-header": F.main,
|
|
37
|
+
"main-left": F.panel,
|
|
38
|
+
main: F.main,
|
|
39
|
+
"main-right": F.panel,
|
|
40
|
+
"secondary-header": F.panel,
|
|
41
|
+
secondary: F.panel,
|
|
42
|
+
status: F.statusBar,
|
|
43
|
+
overlay: F.widget,
|
|
44
|
+
"floating-header": F.widget,
|
|
45
|
+
floating: F.widget
|
|
46
|
+
}, dr = Ce("focusBorder", "var(--chakra-colors-color-palette-focus-ring)"), ur = F.widget, mr = (t) => cr[t], Zt = (t) => {
|
|
47
|
+
const e = C(3), {
|
|
48
|
+
label: n
|
|
49
|
+
} = t;
|
|
50
|
+
let o;
|
|
51
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ a(L, { name: "circle-alert", size: 20 }), e[0] = o) : o = e[0];
|
|
52
|
+
let r;
|
|
53
|
+
return e[1] !== n ? (r = /* @__PURE__ */ a(zt, { h: "full", w: "full", color: "fg.muted", p: "md", "aria-label": n, children: o }), e[1] = n, e[2] = r) : r = e[2], r;
|
|
54
|
+
}, fr = (t) => {
|
|
55
|
+
const e = C(2), {
|
|
56
|
+
children: n
|
|
57
|
+
} = t;
|
|
58
|
+
let o;
|
|
59
|
+
return e[0] !== n ? (o = /* @__PURE__ */ a(j, { flex: "1", minW: "0", minH: "0", w: "full", h: "full", overflow: "hidden", children: n }), e[0] = n, e[1] = o) : o = e[1], o;
|
|
60
|
+
}, hr = (t) => {
|
|
61
|
+
const e = C(8), {
|
|
62
|
+
workbench: n,
|
|
63
|
+
rendererId: o,
|
|
64
|
+
workbenchInput: r
|
|
65
|
+
} = t, i = me(null);
|
|
66
|
+
let s, c;
|
|
67
|
+
e[0] !== o || e[1] !== n || e[2] !== r ? (s = () => {
|
|
68
|
+
const u = i.current;
|
|
69
|
+
if (!u)
|
|
70
|
+
return;
|
|
71
|
+
const m = n.renderers.claim(o, u, r);
|
|
72
|
+
return () => m.dispose();
|
|
73
|
+
}, c = [n, o, r], e[0] = o, e[1] = n, e[2] = r, e[3] = s, e[4] = c) : (s = e[3], c = e[4]), Lt(s, c);
|
|
74
|
+
let d;
|
|
75
|
+
e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = {
|
|
76
|
+
display: "contents"
|
|
77
|
+
}, e[5] = d) : d = e[5];
|
|
78
|
+
let l;
|
|
79
|
+
return e[6] !== o ? (l = /* @__PURE__ */ a("div", { ref: i, style: d, "data-workbench-keep-alive-slot": o }), e[6] = o, e[7] = l) : l = e[7], l;
|
|
80
|
+
}, br = () => {
|
|
81
|
+
}, gr = (t, e) => t.keepAlive ? /* @__PURE__ */ a(hr, { workbench: e.workbench, rendererId: t.id, workbenchInput: e }) : t.render(e), Jt = (t) => {
|
|
82
|
+
const e = C(4), {
|
|
83
|
+
workbench: n,
|
|
84
|
+
placement: o
|
|
85
|
+
} = t, r = t.widget ?? n.layout.getWidget(o.contributionId), i = $(n.renderers.store, (g) => g.renderers[r?.rendererId ?? ""]);
|
|
86
|
+
if (!r) {
|
|
87
|
+
let g;
|
|
88
|
+
return e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ a(Zt, { label: "Widget contribution is no longer registered." }), e[0] = g) : g = e[0], g;
|
|
89
|
+
}
|
|
90
|
+
const s = j, c = "flex", d = "1 0 auto", l = "0", u = "0", m = "full", f = "hidden", h = i ? /* @__PURE__ */ a(fr, { children: gr(i, {
|
|
91
|
+
workbench: n,
|
|
92
|
+
widget: r,
|
|
93
|
+
placement: o,
|
|
94
|
+
refresh: br
|
|
95
|
+
}) }) : /* @__PURE__ */ a(Zt, { label: `No renderer registered for ${r.rendererId}.` });
|
|
96
|
+
let b;
|
|
97
|
+
return e[1] !== s || e[2] !== h ? (b = /* @__PURE__ */ a(s, { display: c, flex: d, minW: l, minH: u, w: m, overflow: f, children: h }), e[1] = s, e[2] = h, e[3] = b) : b = e[3], b;
|
|
98
|
+
}, pr = /* @__PURE__ */ new Set(["nav", "left-header", "main-header", "secondary-header", "floating-header", "status"]), yr = {
|
|
99
|
+
display: "flex",
|
|
100
|
+
flexDirection: "column",
|
|
101
|
+
minH: "100%",
|
|
102
|
+
position: "relative"
|
|
103
|
+
}, vr = {
|
|
104
|
+
display: "flex",
|
|
105
|
+
alignItems: "stretch",
|
|
106
|
+
h: "full",
|
|
107
|
+
minH: "100%",
|
|
108
|
+
position: "relative"
|
|
109
|
+
}, zn = (t, e) => t.find((n) => n.widgetId === e) ?? t[0], Sr = (t, e) => {
|
|
110
|
+
const n = zn(t, e);
|
|
111
|
+
return n ? t.filter((o) => o.widgetId === n.widgetId || o.mountStrategy === "keep-mounted") : [];
|
|
112
|
+
}, wr = (t, e) => {
|
|
113
|
+
const n = t.widgetId === e;
|
|
114
|
+
return {
|
|
115
|
+
active: n,
|
|
116
|
+
display: "flex",
|
|
117
|
+
pointerEvents: n ? "auto" : "none",
|
|
118
|
+
position: n ? "relative" : "absolute",
|
|
119
|
+
visibility: n ? "visible" : "hidden"
|
|
120
|
+
};
|
|
121
|
+
}, xr = (t) => ({
|
|
122
|
+
widgetId: t.id,
|
|
123
|
+
contributionId: t.id,
|
|
124
|
+
title: t.title,
|
|
125
|
+
closable: !1
|
|
126
|
+
}), ye = (t) => {
|
|
127
|
+
const e = C(69), {
|
|
128
|
+
workbench: n,
|
|
129
|
+
area: o,
|
|
130
|
+
title: r,
|
|
131
|
+
pointerEvents: i,
|
|
132
|
+
transparent: s
|
|
133
|
+
} = t, c = i === void 0 ? "auto" : i, d = s === void 0 ? !1 : s;
|
|
134
|
+
let l;
|
|
135
|
+
e[0] !== o ? (l = (q) => q.layout.areas[o], e[0] = o, e[1] = l) : l = e[1];
|
|
136
|
+
const u = $(n.layout.store, l), m = $(n.layout.store, Pr);
|
|
137
|
+
let f, h, b, g, p, v, y, S, w, P, x, k, I, A, H, M, T, N, _, D, O, z, R, K, G;
|
|
138
|
+
if (e[2] !== o || e[3] !== u.activeWidgetId || e[4] !== u.widgets || e[5] !== m || e[6] !== c || e[7] !== r || e[8] !== d || e[9] !== n) {
|
|
139
|
+
N = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
|
|
140
|
+
e: {
|
|
141
|
+
const q = zn(u.widgets, u.activeWidgetId), J = q ? void 0 : n.layout.getPlaceholder(o), ce = q ?? (J ? xr(J) : void 0), fe = q ? Sr(u.widgets, q.widgetId) : [];
|
|
142
|
+
if (!ce) {
|
|
143
|
+
N = null;
|
|
144
|
+
break e;
|
|
145
|
+
}
|
|
146
|
+
let ee;
|
|
147
|
+
e[35] !== o ? (ee = pr.has(o), e[35] = o, e[36] = ee) : ee = e[36];
|
|
148
|
+
const ie = ee, he = () => {
|
|
149
|
+
q && q.widgetId !== m && n.layout.activateWidget(q.widgetId);
|
|
150
|
+
};
|
|
151
|
+
h = le, v = "section", y = "column", S = "full", w = "0", P = "0", x = "full", e[37] !== o || e[38] !== d ? (k = d ? "transparent" : mr(o), e[37] = o, e[38] = d, e[39] = k) : k = e[39], I = "hidden", A = c, H = r ?? o, M = he, T = he, f = ze, _ = "1", D = "0", O = "0", z = "full", R = "xs", K = !ie, G = ie, e[40] !== ie ? (b = ie ? {
|
|
152
|
+
justifyContent: "center"
|
|
153
|
+
} : void 0, e[40] = ie, e[41] = b) : b = e[41], g = ie ? vr : yr, p = J ? /* @__PURE__ */ a(Jt, { workbench: n, placement: ce, widget: J }) : fe.map((Y) => {
|
|
154
|
+
const te = wr(Y, q?.widgetId);
|
|
155
|
+
return /* @__PURE__ */ a(j, { display: te.display, flex: te.active ? "1 0 auto" : void 0, h: te.active ? void 0 : "full", inset: te.active ? void 0 : "0", minH: "0", minW: "0", overflow: "hidden", pointerEvents: te.pointerEvents, position: te.position, visibility: te.visibility, w: "full", children: /* @__PURE__ */ a(Jt, { workbench: n, placement: Y }) }, Y.widgetId);
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
e[2] = o, e[3] = u.activeWidgetId, e[4] = u.widgets, e[5] = m, e[6] = c, e[7] = r, e[8] = d, e[9] = n, e[10] = f, e[11] = h, e[12] = b, e[13] = g, e[14] = p, e[15] = v, e[16] = y, e[17] = S, e[18] = w, e[19] = P, e[20] = x, e[21] = k, e[22] = I, e[23] = A, e[24] = H, e[25] = M, e[26] = T, e[27] = N, e[28] = _, e[29] = D, e[30] = O, e[31] = z, e[32] = R, e[33] = K, e[34] = G;
|
|
159
|
+
} else
|
|
160
|
+
f = e[10], h = e[11], b = e[12], g = e[13], p = e[14], v = e[15], y = e[16], S = e[17], w = e[18], P = e[19], x = e[20], k = e[21], I = e[22], A = e[23], H = e[24], M = e[25], T = e[26], N = e[27], _ = e[28], D = e[29], O = e[30], z = e[31], R = e[32], K = e[33], G = e[34];
|
|
161
|
+
if (N !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
|
|
162
|
+
return N;
|
|
163
|
+
let V;
|
|
164
|
+
e[42] !== f || e[43] !== b || e[44] !== g || e[45] !== p || e[46] !== _ || e[47] !== D || e[48] !== O || e[49] !== z || e[50] !== R || e[51] !== K || e[52] !== G ? (V = /* @__PURE__ */ a(f, { flex: _, minH: D, minW: O, w: z, size: R, showVerticalScrollbar: K, showHorizontalScrollbar: G, viewportProps: b, contentProps: g, children: p }), e[42] = f, e[43] = b, e[44] = g, e[45] = p, e[46] = _, e[47] = D, e[48] = O, e[49] = z, e[50] = R, e[51] = K, e[52] = G, e[53] = V) : V = e[53];
|
|
165
|
+
let X;
|
|
166
|
+
return e[54] !== h || e[55] !== v || e[56] !== y || e[57] !== S || e[58] !== w || e[59] !== P || e[60] !== x || e[61] !== k || e[62] !== I || e[63] !== A || e[64] !== H || e[65] !== M || e[66] !== T || e[67] !== V ? (X = /* @__PURE__ */ a(h, { as: v, direction: y, h: S, minH: w, minW: P, w: x, bg: k, overflow: I, pointerEvents: A, "aria-label": H, onPointerDown: M, onFocusCapture: T, children: V }), e[54] = h, e[55] = v, e[56] = y, e[57] = S, e[58] = w, e[59] = P, e[60] = x, e[61] = k, e[62] = I, e[63] = A, e[64] = H, e[65] = M, e[66] = T, e[67] = V, e[68] = X) : X = e[68], X;
|
|
167
|
+
};
|
|
168
|
+
function Pr(t) {
|
|
169
|
+
return t.layout.activeWidgetId;
|
|
170
|
+
}
|
|
171
|
+
const Ir = (t) => {
|
|
172
|
+
const e = t.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[-_]+/g, " ").trim();
|
|
173
|
+
return e.charAt(0).toUpperCase() + e.slice(1);
|
|
174
|
+
}, Dn = (t) => typeof t == "object" && t !== null && !Array.isArray(t), Cr = (t) => t == null ? "" : typeof t == "string" ? t : typeof t == "number" || typeof t == "boolean" ? String(t) : JSON.stringify(t), kr = (t) => t.replace(/[^a-zA-Z0-9]+([a-zA-Z0-9])/g, (e, n) => n.toUpperCase()).replace(/^[A-Z]/, (e) => e.toLowerCase()), Tr = (t, e) => {
|
|
175
|
+
const n = t?.[e];
|
|
176
|
+
if (typeof n == "string") return n;
|
|
177
|
+
if (typeof n == "number") return String(n);
|
|
178
|
+
}, _r = (t, e) => {
|
|
179
|
+
const n = e?.resource;
|
|
180
|
+
if (!n) return;
|
|
181
|
+
const o = Tr(n.metadata, t.key);
|
|
182
|
+
if (o !== void 0) return o;
|
|
183
|
+
if (t.key === `${kr(n.kind)}Id`) return n.id ?? n.uri;
|
|
184
|
+
if (t.type === "resource" && (!t.resourceType || t.resourceType === n.kind)) return n;
|
|
185
|
+
}, Rr = (t) => {
|
|
186
|
+
if (!t) return t;
|
|
187
|
+
const e = /* @__PURE__ */ new Set();
|
|
188
|
+
return t.filter((n) => e.has(n.value) ? !1 : (e.add(n.value), !0));
|
|
189
|
+
}, Ze = (t) => Object.keys(t ?? {}).length > 0, Ft = (t) => Object.entries(t ?? {}).map(([e, n]) => ({
|
|
190
|
+
...n,
|
|
191
|
+
options: Rr(n.options),
|
|
192
|
+
key: e,
|
|
193
|
+
label: n.label ?? Ir(e)
|
|
194
|
+
})), Wr = (t, e, n) => {
|
|
195
|
+
const o = Dn(e) ? e : {}, r = {};
|
|
196
|
+
for (const i of Ft(t)) {
|
|
197
|
+
const s = Object.hasOwn(o, i.key) ? o[i.key] : _r(i, n) ?? i.defaultValue;
|
|
198
|
+
if (i.type === "boolean") {
|
|
199
|
+
r[i.key] = s === void 0 ? void 0 : s === !0 || s === "true";
|
|
200
|
+
continue;
|
|
201
|
+
}
|
|
202
|
+
if (i.type === "multi-select") {
|
|
203
|
+
r[i.key] = Array.isArray(s) ? s.map(String) : [];
|
|
204
|
+
continue;
|
|
205
|
+
}
|
|
206
|
+
r[i.key] = Cr(s);
|
|
207
|
+
}
|
|
208
|
+
return r;
|
|
209
|
+
}, Ar = (t) => t === void 0 || t === "" || Array.isArray(t) && t.length === 0, Er = (t, e) => {
|
|
210
|
+
if (typeof e != "string") return e;
|
|
211
|
+
try {
|
|
212
|
+
return JSON.parse(e);
|
|
213
|
+
} catch {
|
|
214
|
+
throw new Error(`Invalid JSON for ${t.label}`);
|
|
215
|
+
}
|
|
216
|
+
}, $r = (t, e) => {
|
|
217
|
+
if (t.type === "number") {
|
|
218
|
+
const n = Number(e);
|
|
219
|
+
if (!Number.isFinite(n)) throw new Error(`Invalid number for ${t.label}`);
|
|
220
|
+
return n;
|
|
221
|
+
}
|
|
222
|
+
return t.type === "boolean" ? e === !0 || e === "true" : t.type === "json" || t.type === "resource" || t.type === "repo" || t.type === "harness" ? Er(t, e) : t.type === "multi-select" ? Array.isArray(e) ? e : String(e).split(",").filter(Boolean) : String(e ?? "");
|
|
223
|
+
}, Hr = (t, e) => {
|
|
224
|
+
const n = {};
|
|
225
|
+
for (const o of Ft(t)) {
|
|
226
|
+
const r = e[o.key];
|
|
227
|
+
if (Ar(r)) {
|
|
228
|
+
if (o.required) throw new Error(`Missing required parameter: ${o.label}`);
|
|
229
|
+
continue;
|
|
230
|
+
}
|
|
231
|
+
n[o.key] = $r(o, r);
|
|
232
|
+
}
|
|
233
|
+
return n;
|
|
234
|
+
}, Mr = (t, e) => ({
|
|
235
|
+
...Dn(t) ? t : {},
|
|
236
|
+
...e
|
|
237
|
+
}), Nr = (t) => t.join("/"), Br = wo(""), Or = (t) => t === vo || t === So || t.startsWith(Br), zr = (t) => {
|
|
238
|
+
const e = {};
|
|
239
|
+
for (const [n, o] of Object.entries(t))
|
|
240
|
+
Or(n) || (e[n] = o);
|
|
241
|
+
return e;
|
|
242
|
+
}, Dr = (t, e) => ({
|
|
243
|
+
...e ? zr(t.contextValues) : t.contextValues,
|
|
244
|
+
...kn(e?.resource)
|
|
245
|
+
}), Be = (t, e, n) => {
|
|
246
|
+
const o = Dr(t, n);
|
|
247
|
+
return [...t.itemsByPath[Nr(e)] ?? []].sort((r, i) => {
|
|
248
|
+
const s = r.order ?? 0, c = i.order ?? 0;
|
|
249
|
+
return s - c || yo(r, i);
|
|
250
|
+
}).filter((r) => wt(o, r.when)).map((r, i) => {
|
|
251
|
+
const s = t.commands[r.commandId];
|
|
252
|
+
if (!s) return null;
|
|
253
|
+
const c = r.args;
|
|
254
|
+
return s.handler.isVisible?.(c) === !1 ? null : {
|
|
255
|
+
id: `${r.commandId}:${i}`,
|
|
256
|
+
commandId: s.command.id,
|
|
257
|
+
label: r.label ?? s.command.label,
|
|
258
|
+
...r.description ?? s.command.description ? {
|
|
259
|
+
description: r.description ?? s.command.description
|
|
260
|
+
} : {},
|
|
261
|
+
icon: r.icon ?? s.command.icon,
|
|
262
|
+
...r.iconSrc ? {
|
|
263
|
+
iconSrc: r.iconSrc
|
|
264
|
+
} : {},
|
|
265
|
+
...r.overflowLabel ? {
|
|
266
|
+
overflowLabel: r.overflowLabel
|
|
267
|
+
} : {},
|
|
268
|
+
group: r.group,
|
|
269
|
+
args: c,
|
|
270
|
+
disabled: r.readOnly === !0 || s.handler.isEnabled?.(c) === !1,
|
|
271
|
+
...r.readOnly ? {
|
|
272
|
+
readOnly: !0
|
|
273
|
+
} : {}
|
|
274
|
+
};
|
|
275
|
+
}).filter((r) => r !== null);
|
|
276
|
+
}, Fc = (t, e, n) => Be({
|
|
277
|
+
itemsByPath: t.layout.menuStore.getState().itemsByPath,
|
|
278
|
+
commands: t.commands.store.getState().commands,
|
|
279
|
+
contextValues: t.context.store.getState().values
|
|
280
|
+
}, e, n), Lr = (t, e) => `${t}:${e.contributionId}`, Vr = (t, e) => e && t.some((o) => o.widgetId === e) ? e : t[0]?.widgetId, Ln = (t) => t.closable === !0, Ge = (t, e = {}) => e.hasLeadingActions === !0 || t.length > 1 || t.some(Ln), lt = (t) => {
|
|
281
|
+
const e = C(37), {
|
|
282
|
+
workbench: n,
|
|
283
|
+
area: o,
|
|
284
|
+
visibilityStorageKey: r
|
|
285
|
+
} = t, i = $(n.commands.store, Fr), s = $(n.context.store, Kr), c = $(n.layout.menuStore, jr);
|
|
286
|
+
let d;
|
|
287
|
+
e[0] !== o ? (d = (E) => E.layout.areas[o], e[0] = o, e[1] = d) : d = e[1];
|
|
288
|
+
const l = $(n.layout.store, d), u = l.widgets, f = To(r ?? o, qr), h = f.tabOverrides;
|
|
289
|
+
let b;
|
|
290
|
+
e[2] !== o ? (b = (E) => Lr(o, E), e[2] = o, e[3] = b) : b = e[3];
|
|
291
|
+
const g = b, p = _o(u, h, g), [v, y] = U(null), [S, w] = U(!1);
|
|
292
|
+
let P;
|
|
293
|
+
e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (P = {
|
|
294
|
+
x: 0,
|
|
295
|
+
y: 0
|
|
296
|
+
}, e[4] = P) : P = e[4];
|
|
297
|
+
const [x, k] = U(P);
|
|
298
|
+
let I;
|
|
299
|
+
e[5] !== n.resources ? (I = (E) => {
|
|
300
|
+
const Z = E.resource?.icon ?? (E.resource ? n.resources.getKind(E.resource.kind)?.icon : void 0);
|
|
301
|
+
return Z ? /* @__PURE__ */ a(L, { name: Z, size: 14 }) : void 0;
|
|
302
|
+
}, e[5] = n.resources, e[6] = I) : I = e[6];
|
|
303
|
+
const A = I;
|
|
304
|
+
let H, M;
|
|
305
|
+
e[7] !== f ? (H = (E, Z) => f.toggleTab(E, Z), M = () => f.reset(), e[7] = f, e[8] = H, e[9] = M) : (H = e[8], M = e[9]);
|
|
306
|
+
let T, N, _;
|
|
307
|
+
e[10] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (T = /* @__PURE__ */ a(L, { name: "eye", size: 14 }), N = /* @__PURE__ */ a(L, { name: "eye-off", size: 14 }), _ = /* @__PURE__ */ a(L, { name: "rotate-ccw", size: 14 }), e[10] = T, e[11] = N, e[12] = _) : (T = e[10], N = e[11], _ = e[12]);
|
|
308
|
+
const D = Ro(u, h, {
|
|
309
|
+
onToggleTab: H,
|
|
310
|
+
onResetAll: M
|
|
311
|
+
}, g, {
|
|
312
|
+
visibleIcon: T,
|
|
313
|
+
hiddenIcon: N,
|
|
314
|
+
resetIcon: _
|
|
315
|
+
}, A), O = D.length > 0, z = Be({
|
|
316
|
+
itemsByPath: c,
|
|
317
|
+
commands: i,
|
|
318
|
+
contextValues: s
|
|
319
|
+
}, pt(o)), R = Ge(p, {
|
|
320
|
+
hasLeadingActions: z.length > 0
|
|
321
|
+
});
|
|
322
|
+
let K;
|
|
323
|
+
e[13] !== O ? (K = (E) => {
|
|
324
|
+
O && (E.preventDefault(), k({
|
|
325
|
+
x: E.clientX,
|
|
326
|
+
y: E.clientY
|
|
327
|
+
}), w(!0));
|
|
328
|
+
}, e[13] = O, e[14] = K) : K = e[14];
|
|
329
|
+
const G = K;
|
|
330
|
+
let V, X;
|
|
331
|
+
if (e[15] !== v ? (V = () => {
|
|
332
|
+
if (!v)
|
|
333
|
+
return;
|
|
334
|
+
const E = (Z) => {
|
|
335
|
+
Z.deltaY === 0 || v.scrollWidth <= v.clientWidth || (v.scrollLeft = v.scrollLeft + Z.deltaY, Z.preventDefault());
|
|
336
|
+
};
|
|
337
|
+
return v.addEventListener("wheel", E, {
|
|
338
|
+
passive: !1
|
|
339
|
+
}), () => v.removeEventListener("wheel", E);
|
|
340
|
+
}, X = [v], e[15] = v, e[16] = V, e[17] = X) : (V = e[16], X = e[17]), re(V, X), !R)
|
|
341
|
+
return null;
|
|
342
|
+
const q = Vr(p, l.activeWidgetId);
|
|
343
|
+
let J;
|
|
344
|
+
e[18] !== i || e[19] !== n.commandPalette || e[20] !== n.commands ? (J = (E) => {
|
|
345
|
+
const Z = i[E.commandId]?.command;
|
|
346
|
+
if (Z && Ze(Z.params)) {
|
|
347
|
+
n.commandPalette.requestParams({
|
|
348
|
+
record: {
|
|
349
|
+
command: Z
|
|
350
|
+
},
|
|
351
|
+
label: E.label,
|
|
352
|
+
args: E.args
|
|
353
|
+
});
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
n.commands.executeCommand(E.commandId, E.args).catch(Ur);
|
|
357
|
+
}, e[18] = i, e[19] = n.commandPalette, e[20] = n.commands, e[21] = J) : J = e[21];
|
|
358
|
+
const ce = J, fe = Tt;
|
|
359
|
+
let ee;
|
|
360
|
+
e[22] !== n.layout ? (ee = (E) => n.layout.activateWidget(E.value), e[22] = n.layout, e[23] = ee) : ee = e[23];
|
|
361
|
+
const ie = "subtle", he = "gray", Y = "start", te = "sm", se = "stretch", ve = "1 1 auto", xe = "full", Se = "0", ke = "full", be = "relative", ne = "1", ge = O ? G : void 0;
|
|
362
|
+
let de;
|
|
363
|
+
e[24] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (de = {
|
|
364
|
+
h: "full"
|
|
365
|
+
}, e[24] = de) : de = e[24];
|
|
366
|
+
let Te;
|
|
367
|
+
e[25] !== ce ? (Te = (E) => /* @__PURE__ */ a(Qe, { content: E.label, children: /* @__PURE__ */ a(Ye, { size: "2xs", variant: "ghost", "aria-label": E.label, disabled: E.disabled, flexShrink: 0, onPointerDown: Gr, onClick: (Z) => {
|
|
368
|
+
Z.stopPropagation(), ce(E);
|
|
369
|
+
}, children: /* @__PURE__ */ a(L, { name: E.icon ?? "plus", size: 14 }) }) }, E.id), e[25] = ce, e[26] = Te) : Te = e[26];
|
|
370
|
+
const We = z.map(Te), Ae = p.map((E) => {
|
|
371
|
+
const Z = Ln(E), $e = E.widgetId === q, Ie = E.title ?? E.contributionId, _e = E.resource?.icon ?? (E.resource ? n.resources.getKind(E.resource.kind)?.icon : void 0);
|
|
372
|
+
return /* @__PURE__ */ W(Tt.Trigger, { value: E.widgetId, h: "1.25rem", maxW: "12rem", minW: "0", flexShrink: 0, gap: "2xs", px: "xs", py: "0", borderRadius: "2xs", borderWidth: "1px", borderColor: "border.subtle", textStyle: "label/XS/medium", title: Ie, className: "group", _selected: {
|
|
373
|
+
color: "fg",
|
|
374
|
+
borderColor: "border.subtle"
|
|
375
|
+
}, _hover: $e ? void 0 : {
|
|
376
|
+
bg: "bg.hover",
|
|
377
|
+
borderColor: "border.subtle",
|
|
378
|
+
color: "fg"
|
|
379
|
+
}, children: [
|
|
380
|
+
_e ? /* @__PURE__ */ a(L, { name: _e, size: 12, flexShrink: 0, color: "fg.muted" }) : null,
|
|
381
|
+
/* @__PURE__ */ a(oe, { as: "span", minW: "0", truncate: !0, children: Ie }),
|
|
382
|
+
Z ? /* @__PURE__ */ a(_n, { as: "span", role: "button", "aria-label": `Close ${Ie}`, size: "2xs", boxSize: "1rem", minW: "1rem", p: "0", borderRadius: "2xs", flexShrink: 0, me: "-1", opacity: $e ? "1" : "0", pointerEvents: $e ? "auto" : "none", color: "fg.muted", _groupHover: {
|
|
383
|
+
opacity: "1",
|
|
384
|
+
pointerEvents: "auto"
|
|
385
|
+
}, _groupFocusWithin: {
|
|
386
|
+
opacity: "1",
|
|
387
|
+
pointerEvents: "auto"
|
|
388
|
+
}, _hover: {
|
|
389
|
+
bg: "transparent",
|
|
390
|
+
color: "fg"
|
|
391
|
+
}, _active: {
|
|
392
|
+
bg: "transparent"
|
|
393
|
+
}, transition: "opacity 120ms ease", onPointerDown: Xr, onClick: (He) => {
|
|
394
|
+
He.stopPropagation(), n.layout.closeWidget(E.widgetId);
|
|
395
|
+
} }) : null
|
|
396
|
+
] }, E.widgetId);
|
|
397
|
+
});
|
|
398
|
+
let Pe;
|
|
399
|
+
e[27] !== We || e[28] !== Ae ? (Pe = /* @__PURE__ */ a(ze, { viewportRef: y, size: "xs", h: "full", w: "max-content", maxW: "full", minW: "0", showVerticalScrollbar: !1, showHorizontalScrollbar: !0, contentProps: de, children: /* @__PURE__ */ W(Tt.List, { h: "full", minH: "0", minW: "max-content", alignItems: "center", gap: "2xs", justifyContent: "flex-start", children: [
|
|
400
|
+
We,
|
|
401
|
+
Ae
|
|
402
|
+
] }) }), e[27] = We, e[28] = Ae, e[29] = Pe) : Pe = e[29];
|
|
403
|
+
const Ee = O ? /* @__PURE__ */ a(ue.Root, { open: S, onOpenChange: (E) => w(E.open), positioning: {
|
|
404
|
+
placement: "bottom-start",
|
|
405
|
+
getAnchorRect: () => ({
|
|
406
|
+
x: x.x,
|
|
407
|
+
y: x.y,
|
|
408
|
+
width: 0,
|
|
409
|
+
height: 0
|
|
410
|
+
})
|
|
411
|
+
}, children: /* @__PURE__ */ a(Dt, { children: /* @__PURE__ */ a(ue.Positioner, { children: /* @__PURE__ */ a(ue.Content, { minW: "220px", bg: "bg", children: D.map(Yr) }) }) }) }) : null;
|
|
412
|
+
let we;
|
|
413
|
+
return e[30] !== q || e[31] !== fe.Root || e[32] !== ee || e[33] !== ge || e[34] !== Pe || e[35] !== Ee ? (we = /* @__PURE__ */ W(fe.Root, { value: q, onValueChange: ee, variant: ie, colorPalette: he, justify: Y, size: te, alignSelf: se, flex: ve, maxW: xe, minW: Se, h: ke, position: be, zIndex: ne, onContextMenu: ge, children: [
|
|
414
|
+
Pe,
|
|
415
|
+
Ee
|
|
416
|
+
] }), e[30] = q, e[31] = fe.Root, e[32] = ee, e[33] = ge, e[34] = Pe, e[35] = Ee, e[36] = we) : we = e[36], we;
|
|
417
|
+
};
|
|
418
|
+
function Fr(t) {
|
|
419
|
+
return t.commands;
|
|
420
|
+
}
|
|
421
|
+
function Kr(t) {
|
|
422
|
+
return t.values;
|
|
423
|
+
}
|
|
424
|
+
function jr(t) {
|
|
425
|
+
return t.itemsByPath;
|
|
426
|
+
}
|
|
427
|
+
function qr(t) {
|
|
428
|
+
return t;
|
|
429
|
+
}
|
|
430
|
+
function Ur() {
|
|
431
|
+
}
|
|
432
|
+
function Gr(t) {
|
|
433
|
+
return t.stopPropagation();
|
|
434
|
+
}
|
|
435
|
+
function Xr(t) {
|
|
436
|
+
return t.stopPropagation();
|
|
437
|
+
}
|
|
438
|
+
function Yr(t) {
|
|
439
|
+
return /* @__PURE__ */ a(ue.Item, { value: t.key, asChild: !0, children: /* @__PURE__ */ a(An, { asChild: !0, variant: "full-width", label: t.label, icon: t.icon, endContent: t.endContent, disabled: t.isDisabled, onActivate: t.onClick }) }, t.key);
|
|
440
|
+
}
|
|
441
|
+
const Qr = (t) => t.resource?.kind === "session" && typeof t.resource.metadata?.status == "string" ? t.resource.metadata.status : void 0, Zr = (t) => {
|
|
442
|
+
const e = C(6), {
|
|
443
|
+
item: n
|
|
444
|
+
} = t;
|
|
445
|
+
let o;
|
|
446
|
+
e[0] !== n ? (o = Qr(n), e[0] = n, e[1] = o) : o = e[1];
|
|
447
|
+
const r = o;
|
|
448
|
+
if (n.resource?.kind === "session") {
|
|
449
|
+
let s;
|
|
450
|
+
return e[2] !== r ? (s = /* @__PURE__ */ a(Ao, { status: r, boxSize: "14px" }), e[2] = r, e[3] = s) : s = e[3], s;
|
|
451
|
+
}
|
|
452
|
+
if (!n.icon)
|
|
453
|
+
return null;
|
|
454
|
+
let i;
|
|
455
|
+
return e[4] !== n.icon ? (i = /* @__PURE__ */ a(oe, { as: "span", "aria-hidden": "true", color: "fg.muted", display: "inline-flex", flexShrink: 0, children: /* @__PURE__ */ a(L, { name: n.icon, size: 14 }) }), e[4] = n.icon, e[5] = i) : i = e[5], i;
|
|
456
|
+
}, Jr = (t) => {
|
|
457
|
+
const e = C(7), {
|
|
458
|
+
item: n
|
|
459
|
+
} = t, o = n.title;
|
|
460
|
+
let r;
|
|
461
|
+
e[0] !== n ? (r = /* @__PURE__ */ a(Zr, { item: n }), e[0] = n, e[1] = r) : r = e[1];
|
|
462
|
+
let i;
|
|
463
|
+
e[2] !== o ? (i = /* @__PURE__ */ a(oe, { as: "span", minW: "0", maxW: "15rem", truncate: !0, children: o }), e[2] = o, e[3] = i) : i = e[3];
|
|
464
|
+
let s;
|
|
465
|
+
return e[4] !== r || e[5] !== i ? (s = /* @__PURE__ */ W(Le, { as: "span", gap: "2xs", minW: "0", children: [
|
|
466
|
+
r,
|
|
467
|
+
i
|
|
468
|
+
] }), e[4] = r, e[5] = i, e[6] = s) : s = e[6], s;
|
|
469
|
+
}, ei = (t) => (t ?? []).map((e) => ({
|
|
470
|
+
title: /* @__PURE__ */ a(Jr, { item: e }),
|
|
471
|
+
url: e.url,
|
|
472
|
+
onClick: e.onClick
|
|
473
|
+
})), ti = (t) => {
|
|
474
|
+
const e = C(4), {
|
|
475
|
+
workbench: n
|
|
476
|
+
} = t, o = $(n.breadcrumbs.store, ni) ?? [];
|
|
477
|
+
if (o.length === 0)
|
|
478
|
+
return null;
|
|
479
|
+
let r;
|
|
480
|
+
e[0] !== o ? (r = ei(o), e[0] = o, e[1] = r) : r = e[1];
|
|
481
|
+
let i;
|
|
482
|
+
return e[2] !== r ? (i = /* @__PURE__ */ a(Wo, { items: r, separator: "/", separatorGap: "xs", display: "flex", h: "full" }), e[2] = r, e[3] = i) : i = e[3], i;
|
|
483
|
+
};
|
|
484
|
+
function ni(t) {
|
|
485
|
+
return t.items;
|
|
486
|
+
}
|
|
487
|
+
const Kt = "search", Pt = "command", Vn = "theme", jt = "mode", oi = [{
|
|
488
|
+
id: Kt
|
|
489
|
+
}, {
|
|
490
|
+
id: Pt,
|
|
491
|
+
inputPrefix: ">"
|
|
492
|
+
}], Je = (t) => t === Vn, at = (t) => t === jt, Fn = (t) => Je(t) || at(t), ri = (t) => {
|
|
493
|
+
if (Je(t)) return Vn;
|
|
494
|
+
if (at(t)) return jt;
|
|
495
|
+
}, ii = (t) => {
|
|
496
|
+
if (!Fn(t))
|
|
497
|
+
return oi;
|
|
498
|
+
}, si = (t) => Je(t.view) ? t.themeInitialActiveIndex : at(t.view) ? t.modeInitialActiveIndex : 0, li = (t) => Je(t.view) ? /* @__PURE__ */ a(L, { name: "Palette", size: 16 }) : at(t.view) ? /* @__PURE__ */ a(L, { name: "PanelTop", size: 16 }) : t.mode === Pt ? /* @__PURE__ */ a(Qo, { size: 16, "aria-hidden": "true" }) : /* @__PURE__ */ a(Zo, { size: 16, "aria-hidden": "true" }), ai = (t) => Je(t.view) ? "Search themes" : at(t.view) ? "Search modes" : t.mode === Pt ? "Run command" : "Search resources", ci = 25, di = 150, ui = (t) => {
|
|
499
|
+
const e = C(12), {
|
|
500
|
+
workbench: n,
|
|
501
|
+
query: o,
|
|
502
|
+
open: r,
|
|
503
|
+
onClose: i
|
|
504
|
+
} = t, s = $(n.commandPaletteResources.store, mi);
|
|
505
|
+
let c;
|
|
506
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = [], e[0] = c) : c = e[0];
|
|
507
|
+
const [d, l] = U(c);
|
|
508
|
+
let u;
|
|
509
|
+
e[1] !== i || e[2] !== r || e[3] !== o || e[4] !== n.commandPaletteResources ? (u = () => {
|
|
510
|
+
if (!r) {
|
|
511
|
+
l([]);
|
|
512
|
+
return;
|
|
513
|
+
}
|
|
514
|
+
let f = !1;
|
|
515
|
+
const h = setTimeout(() => {
|
|
516
|
+
n.commandPaletteResources.queryProviders({
|
|
517
|
+
query: o,
|
|
518
|
+
limit: ci
|
|
519
|
+
}).then((b) => {
|
|
520
|
+
f || l(b.flatMap((g) => g.results.map((p) => ({
|
|
521
|
+
id: `workbench-command-palette-resource:${p.id}`,
|
|
522
|
+
mode: Kt,
|
|
523
|
+
label: p.label,
|
|
524
|
+
searchText: `${o} ${p.label} ${(p.keywords ?? []).join(" ")}`.trim(),
|
|
525
|
+
description: p.description,
|
|
526
|
+
group: p.group ?? g.title,
|
|
527
|
+
icon: p.icon ? /* @__PURE__ */ a(L, { name: p.icon }) : void 0,
|
|
528
|
+
onActivate: () => {
|
|
529
|
+
i(), Promise.resolve(p.activate()).catch(fi);
|
|
530
|
+
}
|
|
531
|
+
}))));
|
|
532
|
+
});
|
|
533
|
+
}, di);
|
|
534
|
+
return () => {
|
|
535
|
+
f = !0, clearTimeout(h);
|
|
536
|
+
};
|
|
537
|
+
}, e[1] = i, e[2] = r, e[3] = o, e[4] = n.commandPaletteResources, e[5] = u) : u = e[5];
|
|
538
|
+
let m;
|
|
539
|
+
return e[6] !== i || e[7] !== r || e[8] !== o || e[9] !== s || e[10] !== n ? (m = [n, o, r, s, i], e[6] = i, e[7] = r, e[8] = o, e[9] = s, e[10] = n, e[11] = m) : m = e[11], re(u, m), d;
|
|
540
|
+
};
|
|
541
|
+
function mi(t) {
|
|
542
|
+
return t.refreshToken;
|
|
543
|
+
}
|
|
544
|
+
function fi() {
|
|
545
|
+
}
|
|
546
|
+
const ct = (t) => typeof t == "string" ? t : "", hi = (t) => Array.isArray(t) ? t : [], Fe = (t) => {
|
|
547
|
+
const e = C(8), n = t.entry.required ? " *" : "";
|
|
548
|
+
let o;
|
|
549
|
+
e[0] !== t.entry.label || e[1] !== n ? (o = /* @__PURE__ */ W(oe, { textStyle: "label/S/medium", children: [
|
|
550
|
+
t.entry.label,
|
|
551
|
+
n
|
|
552
|
+
] }), e[0] = t.entry.label, e[1] = n, e[2] = o) : o = e[2];
|
|
553
|
+
let r;
|
|
554
|
+
e[3] !== t.entry.description ? (r = t.entry.description ? /* @__PURE__ */ a(oe, { textStyle: "paragraph/XS/regular", color: "fg.muted", children: t.entry.description }) : null, e[3] = t.entry.description, e[4] = r) : r = e[4];
|
|
555
|
+
let i;
|
|
556
|
+
return e[5] !== o || e[6] !== r ? (i = /* @__PURE__ */ W(ae, { gap: "2xs", children: [
|
|
557
|
+
o,
|
|
558
|
+
r
|
|
559
|
+
] }), e[5] = o, e[6] = r, e[7] = i) : i = e[7], i;
|
|
560
|
+
}, Kn = (t) => {
|
|
561
|
+
const e = C(13);
|
|
562
|
+
let n;
|
|
563
|
+
e[0] !== t.entry ? (n = /* @__PURE__ */ a(Fe, { entry: t.entry }), e[0] = t.entry, e[1] = n) : n = e[1];
|
|
564
|
+
let o;
|
|
565
|
+
e[2] !== t.value ? (o = ct(t.value), e[2] = t.value, e[3] = o) : o = e[3];
|
|
566
|
+
let r;
|
|
567
|
+
e[4] !== t ? (r = (c) => t.onChange(c.target.value), e[4] = t, e[5] = r) : r = e[5];
|
|
568
|
+
let i;
|
|
569
|
+
e[6] !== t.disabled || e[7] !== o || e[8] !== r ? (i = /* @__PURE__ */ a(Wn, { size: "sm", value: o, onChange: r, disabled: t.disabled }), e[6] = t.disabled, e[7] = o, e[8] = r, e[9] = i) : i = e[9];
|
|
570
|
+
let s;
|
|
571
|
+
return e[10] !== n || e[11] !== i ? (s = /* @__PURE__ */ W(ae, { gap: "2xs", children: [
|
|
572
|
+
n,
|
|
573
|
+
i
|
|
574
|
+
] }), e[10] = n, e[11] = i, e[12] = s) : s = e[12], s;
|
|
575
|
+
}, bi = (t) => {
|
|
576
|
+
const e = C(13);
|
|
577
|
+
let n;
|
|
578
|
+
e[0] !== t.entry ? (n = /* @__PURE__ */ a(Fe, { entry: t.entry }), e[0] = t.entry, e[1] = n) : n = e[1];
|
|
579
|
+
let o;
|
|
580
|
+
e[2] !== t.value ? (o = ct(t.value), e[2] = t.value, e[3] = o) : o = e[3];
|
|
581
|
+
let r;
|
|
582
|
+
e[4] !== t ? (r = (c) => t.onChange(c.target.value), e[4] = t, e[5] = r) : r = e[5];
|
|
583
|
+
let i;
|
|
584
|
+
e[6] !== t.disabled || e[7] !== o || e[8] !== r ? (i = /* @__PURE__ */ a(Wn, { size: "sm", type: "number", inputMode: "decimal", value: o, onChange: r, disabled: t.disabled }), e[6] = t.disabled, e[7] = o, e[8] = r, e[9] = i) : i = e[9];
|
|
585
|
+
let s;
|
|
586
|
+
return e[10] !== n || e[11] !== i ? (s = /* @__PURE__ */ W(ae, { gap: "2xs", children: [
|
|
587
|
+
n,
|
|
588
|
+
i
|
|
589
|
+
] }), e[10] = n, e[11] = i, e[12] = s) : s = e[12], s;
|
|
590
|
+
}, gi = (t) => {
|
|
591
|
+
const e = C(13);
|
|
592
|
+
let n;
|
|
593
|
+
e[0] !== t.entry ? (n = /* @__PURE__ */ a(Fe, { entry: t.entry }), e[0] = t.entry, e[1] = n) : n = e[1];
|
|
594
|
+
let o;
|
|
595
|
+
e[2] !== t.value ? (o = ct(t.value), e[2] = t.value, e[3] = o) : o = e[3];
|
|
596
|
+
let r;
|
|
597
|
+
e[4] !== t ? (r = (c) => t.onChange(c.target.value), e[4] = t, e[5] = r) : r = e[5];
|
|
598
|
+
let i;
|
|
599
|
+
e[6] !== t.disabled || e[7] !== o || e[8] !== r ? (i = /* @__PURE__ */ a(Rn, { size: "sm", minH: "120px", value: o, onChange: r, disabled: t.disabled }), e[6] = t.disabled, e[7] = o, e[8] = r, e[9] = i) : i = e[9];
|
|
600
|
+
let s;
|
|
601
|
+
return e[10] !== n || e[11] !== i ? (s = /* @__PURE__ */ W(ae, { gap: "2xs", children: [
|
|
602
|
+
n,
|
|
603
|
+
i
|
|
604
|
+
] }), e[10] = n, e[11] = i, e[12] = s) : s = e[12], s;
|
|
605
|
+
}, pi = (t) => {
|
|
606
|
+
const e = C(24);
|
|
607
|
+
let n;
|
|
608
|
+
e[0] !== t.value ? (n = ct(t.value), e[0] = t.value, e[1] = n) : n = e[1];
|
|
609
|
+
const o = n;
|
|
610
|
+
let r;
|
|
611
|
+
e[2] !== t.entry.options || e[3] !== o ? (r = t.entry.options?.find((b) => b.value === o)?.label ?? o, e[2] = t.entry.options, e[3] = o, e[4] = r) : r = e[4];
|
|
612
|
+
const i = r;
|
|
613
|
+
if (!t.entry.options?.length) {
|
|
614
|
+
let b;
|
|
615
|
+
return e[5] !== t ? (b = /* @__PURE__ */ a(Kn, { ...t }), e[5] = t, e[6] = b) : b = e[6], b;
|
|
616
|
+
}
|
|
617
|
+
let s;
|
|
618
|
+
e[7] !== t.entry ? (s = /* @__PURE__ */ a(Fe, { entry: t.entry }), e[7] = t.entry, e[8] = s) : s = e[8];
|
|
619
|
+
const c = i || "Select...";
|
|
620
|
+
let d;
|
|
621
|
+
e[9] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (d = /* @__PURE__ */ a(tr, { size: 14, "aria-hidden": "true" }), e[9] = d) : d = e[9];
|
|
622
|
+
let l;
|
|
623
|
+
e[10] !== t.disabled || e[11] !== c ? (l = /* @__PURE__ */ a(ue.Trigger, { asChild: !0, children: /* @__PURE__ */ W(Oe, { size: "sm", variant: "outline", justifyContent: "space-between", disabled: t.disabled, children: [
|
|
624
|
+
c,
|
|
625
|
+
d
|
|
626
|
+
] }) }), e[10] = t.disabled, e[11] = c, e[12] = l) : l = e[12];
|
|
627
|
+
let u;
|
|
628
|
+
e[13] !== t || e[14] !== o ? (u = t.entry.options.map((b) => /* @__PURE__ */ a(ue.Item, { value: b.value, onClick: () => t.onChange(b.value), children: /* @__PURE__ */ W(Le, { gap: "2", minW: "0", children: [
|
|
629
|
+
o === b.value ? /* @__PURE__ */ a(Jo, { size: 14, "aria-hidden": "true" }) : /* @__PURE__ */ a(er, { size: 14, "aria-hidden": "true" }),
|
|
630
|
+
/* @__PURE__ */ a(oe, { truncate: !0, children: b.label })
|
|
631
|
+
] }) }, b.value)), e[13] = t, e[14] = o, e[15] = u) : u = e[15];
|
|
632
|
+
let m;
|
|
633
|
+
e[16] !== u ? (m = /* @__PURE__ */ a(ue.Positioner, { children: /* @__PURE__ */ a(ue.Content, { children: u }) }), e[16] = u, e[17] = m) : m = e[17];
|
|
634
|
+
let f;
|
|
635
|
+
e[18] !== l || e[19] !== m ? (f = /* @__PURE__ */ W(ue.Root, { children: [
|
|
636
|
+
l,
|
|
637
|
+
m
|
|
638
|
+
] }), e[18] = l, e[19] = m, e[20] = f) : f = e[20];
|
|
639
|
+
let h;
|
|
640
|
+
return e[21] !== s || e[22] !== f ? (h = /* @__PURE__ */ W(ae, { gap: "2xs", children: [
|
|
641
|
+
s,
|
|
642
|
+
f
|
|
643
|
+
] }), e[21] = s, e[22] = f, e[23] = h) : h = e[23], h;
|
|
644
|
+
}, yi = (t) => {
|
|
645
|
+
const e = C(19);
|
|
646
|
+
let n, o, r, i, s, c, d;
|
|
647
|
+
if (e[0] !== t) {
|
|
648
|
+
d = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
|
|
649
|
+
e: {
|
|
650
|
+
const m = hi(t.value);
|
|
651
|
+
if (!t.entry.options?.length) {
|
|
652
|
+
d = /* @__PURE__ */ a(jn, { ...t });
|
|
653
|
+
break e;
|
|
654
|
+
}
|
|
655
|
+
const f = (h, b) => {
|
|
656
|
+
t.onChange(b === !0 ? Array.from(/* @__PURE__ */ new Set([...m, h])) : m.filter((g) => g !== h));
|
|
657
|
+
};
|
|
658
|
+
o = ae, s = "2xs", e[8] !== t.entry ? (c = /* @__PURE__ */ a(Fe, { entry: t.entry }), e[8] = t.entry, e[9] = c) : c = e[9], n = ae, r = "2xs", i = t.entry.options.map((h) => /* @__PURE__ */ a(En, { size: "sm", checked: m.includes(h.value), disabled: t.disabled, onCheckedChange: (b) => f(h.value, b.checked), children: h.label }, h.value));
|
|
659
|
+
}
|
|
660
|
+
e[0] = t, e[1] = n, e[2] = o, e[3] = r, e[4] = i, e[5] = s, e[6] = c, e[7] = d;
|
|
661
|
+
} else
|
|
662
|
+
n = e[1], o = e[2], r = e[3], i = e[4], s = e[5], c = e[6], d = e[7];
|
|
663
|
+
if (d !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
|
|
664
|
+
return d;
|
|
665
|
+
let l;
|
|
666
|
+
e[10] !== n || e[11] !== r || e[12] !== i ? (l = /* @__PURE__ */ a(n, { gap: r, children: i }), e[10] = n, e[11] = r, e[12] = i, e[13] = l) : l = e[13];
|
|
667
|
+
let u;
|
|
668
|
+
return e[14] !== o || e[15] !== s || e[16] !== c || e[17] !== l ? (u = /* @__PURE__ */ W(o, { gap: s, children: [
|
|
669
|
+
c,
|
|
670
|
+
l
|
|
671
|
+
] }), e[14] = o, e[15] = s, e[16] = c, e[17] = l, e[18] = u) : u = e[18], u;
|
|
672
|
+
}, vi = (t) => {
|
|
673
|
+
const e = C(11);
|
|
674
|
+
let n;
|
|
675
|
+
e[0] !== t.entry ? (n = /* @__PURE__ */ a(Fe, { entry: t.entry }), e[0] = t.entry, e[1] = n) : n = e[1];
|
|
676
|
+
const o = t.value === !0;
|
|
677
|
+
let r;
|
|
678
|
+
e[2] !== t ? (r = (c) => t.onChange(c.checked === !0), e[2] = t, e[3] = r) : r = e[3];
|
|
679
|
+
let i;
|
|
680
|
+
e[4] !== t.disabled || e[5] !== o || e[6] !== r ? (i = /* @__PURE__ */ a(En, { size: "sm", checked: o, disabled: t.disabled, onCheckedChange: r, children: "Enabled" }), e[4] = t.disabled, e[5] = o, e[6] = r, e[7] = i) : i = e[7];
|
|
681
|
+
let s;
|
|
682
|
+
return e[8] !== n || e[9] !== i ? (s = /* @__PURE__ */ W(ae, { gap: "2xs", children: [
|
|
683
|
+
n,
|
|
684
|
+
i
|
|
685
|
+
] }), e[8] = n, e[9] = i, e[10] = s) : s = e[10], s;
|
|
686
|
+
}, jn = (t) => {
|
|
687
|
+
const e = C(13);
|
|
688
|
+
let n;
|
|
689
|
+
e[0] !== t.entry ? (n = /* @__PURE__ */ a(Fe, { entry: t.entry }), e[0] = t.entry, e[1] = n) : n = e[1];
|
|
690
|
+
let o;
|
|
691
|
+
e[2] !== t.value ? (o = ct(t.value), e[2] = t.value, e[3] = o) : o = e[3];
|
|
692
|
+
let r;
|
|
693
|
+
e[4] !== t ? (r = (c) => t.onChange(c.target.value), e[4] = t, e[5] = r) : r = e[5];
|
|
694
|
+
let i;
|
|
695
|
+
e[6] !== t.disabled || e[7] !== o || e[8] !== r ? (i = /* @__PURE__ */ a(Rn, { size: "sm", minH: "88px", fontFamily: "mono", value: o, placeholder: "JSON value", onChange: r, disabled: t.disabled }), e[6] = t.disabled, e[7] = o, e[8] = r, e[9] = i) : i = e[9];
|
|
696
|
+
let s;
|
|
697
|
+
return e[10] !== n || e[11] !== i ? (s = /* @__PURE__ */ W(ae, { gap: "2xs", children: [
|
|
698
|
+
n,
|
|
699
|
+
i
|
|
700
|
+
] }), e[10] = n, e[11] = i, e[12] = s) : s = e[12], s;
|
|
701
|
+
}, Si = (t) => {
|
|
702
|
+
const e = C(14);
|
|
703
|
+
if (t.entry.type === "longtext") {
|
|
704
|
+
let o;
|
|
705
|
+
return e[0] !== t ? (o = /* @__PURE__ */ a(gi, { ...t }), e[0] = t, e[1] = o) : o = e[1], o;
|
|
706
|
+
}
|
|
707
|
+
if (t.entry.type === "number") {
|
|
708
|
+
let o;
|
|
709
|
+
return e[2] !== t ? (o = /* @__PURE__ */ a(bi, { ...t }), e[2] = t, e[3] = o) : o = e[3], o;
|
|
710
|
+
}
|
|
711
|
+
if (t.entry.type === "boolean") {
|
|
712
|
+
let o;
|
|
713
|
+
return e[4] !== t ? (o = /* @__PURE__ */ a(vi, { ...t }), e[4] = t, e[5] = o) : o = e[5], o;
|
|
714
|
+
}
|
|
715
|
+
if (t.entry.type === "select" || t.entry.type === "template") {
|
|
716
|
+
let o;
|
|
717
|
+
return e[6] !== t ? (o = /* @__PURE__ */ a(pi, { ...t }), e[6] = t, e[7] = o) : o = e[7], o;
|
|
718
|
+
}
|
|
719
|
+
if (t.entry.type === "multi-select") {
|
|
720
|
+
let o;
|
|
721
|
+
return e[8] !== t ? (o = /* @__PURE__ */ a(yi, { ...t }), e[8] = t, e[9] = o) : o = e[9], o;
|
|
722
|
+
}
|
|
723
|
+
if (t.entry.type === "json" || t.entry.type === "resource" || t.entry.type === "repo" || t.entry.type === "harness") {
|
|
724
|
+
let o;
|
|
725
|
+
return e[10] !== t ? (o = /* @__PURE__ */ a(jn, { ...t }), e[10] = t, e[11] = o) : o = e[11], o;
|
|
726
|
+
}
|
|
727
|
+
let n;
|
|
728
|
+
return e[12] !== t ? (n = /* @__PURE__ */ a(Kn, { ...t }), e[12] = t, e[13] = n) : n = e[13], n;
|
|
729
|
+
}, wi = (t, e) => t.type === "boolean" ? e !== void 0 : (Array.isArray(e) || typeof e == "string") && e.length > 0, qn = (t) => {
|
|
730
|
+
const {
|
|
731
|
+
request: e,
|
|
732
|
+
renderParamField: n,
|
|
733
|
+
onClose: o,
|
|
734
|
+
onRun: r
|
|
735
|
+
} = t, [i, s] = U({}), [c, d] = U(), [l, u] = U(!1), m = Ft(e?.record.command.params);
|
|
736
|
+
re(() => {
|
|
737
|
+
s(Wr(e?.record.command.params, e?.args, e?.context)), d(void 0), u(!1);
|
|
738
|
+
}, [e]);
|
|
739
|
+
const f = () => {
|
|
740
|
+
l || o();
|
|
741
|
+
}, h = (p, v) => {
|
|
742
|
+
s((y) => ({
|
|
743
|
+
...y,
|
|
744
|
+
[p]: v
|
|
745
|
+
}));
|
|
746
|
+
}, b = async () => {
|
|
747
|
+
if (!(!e || l)) {
|
|
748
|
+
u(!0), d(void 0);
|
|
749
|
+
try {
|
|
750
|
+
const p = Hr(e.record.command.params, i);
|
|
751
|
+
await r({
|
|
752
|
+
commandId: e.record.command.id,
|
|
753
|
+
args: Mr(e.args, p),
|
|
754
|
+
context: e.context,
|
|
755
|
+
label: e.label
|
|
756
|
+
}), o();
|
|
757
|
+
} catch (p) {
|
|
758
|
+
d(p instanceof Error ? p.message : "Command failed.");
|
|
759
|
+
} finally {
|
|
760
|
+
u(!1);
|
|
761
|
+
}
|
|
762
|
+
}
|
|
763
|
+
}, g = m.every((p) => !p.required || wi(p, i[p.key]));
|
|
764
|
+
return /* @__PURE__ */ W(pe.Root, { open: e !== null, size: "lg", scrollBehavior: "inside", onOpenChange: (p) => !p.open && f(), children: [
|
|
765
|
+
/* @__PURE__ */ a(pe.Backdrop, {}),
|
|
766
|
+
/* @__PURE__ */ a(pe.Positioner, { children: /* @__PURE__ */ W(pe.Content, { display: "flex", flexDirection: "column", maxH: "calc(100% - 48px)", children: [
|
|
767
|
+
/* @__PURE__ */ W(pe.Header, { children: [
|
|
768
|
+
/* @__PURE__ */ W(ae, { gap: "2xs", minW: "0", children: [
|
|
769
|
+
/* @__PURE__ */ a(oe, { textStyle: "heading/M/semibold", children: e?.label ?? "Run command" }),
|
|
770
|
+
e?.record.command.description ? /* @__PURE__ */ a(oe, { textStyle: "paragraph/XS/regular", color: "fg.muted", truncate: !0, children: e.record.command.description }) : null
|
|
771
|
+
] }),
|
|
772
|
+
/* @__PURE__ */ a(pe.CloseTrigger, { asChild: !0, children: /* @__PURE__ */ a(_n, { size: "sm", disabled: l }) })
|
|
773
|
+
] }),
|
|
774
|
+
/* @__PURE__ */ a(pe.Body, { flex: "1", minH: "0", p: "0", children: /* @__PURE__ */ a(ze, { h: "full", contentProps: {
|
|
775
|
+
p: "md"
|
|
776
|
+
}, children: /* @__PURE__ */ W(ae, { gap: "md", children: [
|
|
777
|
+
m.map((p) => {
|
|
778
|
+
const v = {
|
|
779
|
+
entry: p,
|
|
780
|
+
value: i[p.key],
|
|
781
|
+
disabled: l,
|
|
782
|
+
onChange: (S) => h(p.key, S)
|
|
783
|
+
}, y = n?.({
|
|
784
|
+
...v,
|
|
785
|
+
context: e?.context
|
|
786
|
+
});
|
|
787
|
+
return /* @__PURE__ */ a(Vt, { children: y ?? /* @__PURE__ */ a(Si, { ...v }) }, p.key);
|
|
788
|
+
}),
|
|
789
|
+
c ? /* @__PURE__ */ a(oe, { textStyle: "paragraph/S/regular", color: "fg.error", children: c }) : null
|
|
790
|
+
] }) }) }),
|
|
791
|
+
/* @__PURE__ */ a(pe.Footer, { children: /* @__PURE__ */ W(Le, { gap: "2", children: [
|
|
792
|
+
/* @__PURE__ */ a(Oe, { size: "sm", variant: "ghost", disabled: l, onClick: f, children: "Cancel" }),
|
|
793
|
+
/* @__PURE__ */ a(Oe, { size: "sm", variant: "primary", disabled: !g, loading: l, onClick: () => {
|
|
794
|
+
b();
|
|
795
|
+
}, children: e?.submitLabel ?? "Run" })
|
|
796
|
+
] }) })
|
|
797
|
+
] }) })
|
|
798
|
+
] });
|
|
799
|
+
}, xi = (t) => t.label ?? t.id, Pi = (t, e) => {
|
|
800
|
+
const n = e.findIndex((o) => o.id === t);
|
|
801
|
+
return Math.max(n, 0);
|
|
802
|
+
}, Ii = (t) => {
|
|
803
|
+
const {
|
|
804
|
+
onClose: e,
|
|
805
|
+
workbench: n
|
|
806
|
+
} = t, o = n.modes.getActiveModeId();
|
|
807
|
+
return n.modes.listModes().map((r) => {
|
|
808
|
+
const i = xi(r);
|
|
809
|
+
return {
|
|
810
|
+
id: `mode:${r.id}`,
|
|
811
|
+
modeId: r.id,
|
|
812
|
+
mode: jt,
|
|
813
|
+
label: i,
|
|
814
|
+
searchText: `mode workbench ${r.id} ${i}`,
|
|
815
|
+
group: "Modes",
|
|
816
|
+
icon: /* @__PURE__ */ a(L, { name: "PanelTop" }),
|
|
817
|
+
isSelected: r.id === o,
|
|
818
|
+
onActivate: () => {
|
|
819
|
+
n.modes.setActiveMode(r.id), e();
|
|
820
|
+
}
|
|
821
|
+
};
|
|
822
|
+
});
|
|
823
|
+
}, Ci = (t) => {
|
|
824
|
+
const {
|
|
825
|
+
entry: e,
|
|
826
|
+
onClose: n,
|
|
827
|
+
workbench: o
|
|
828
|
+
} = t, {
|
|
829
|
+
resource: r
|
|
830
|
+
} = e, i = e.resource.label ?? e.resource.uri, s = o.resources.getKind(r.kind), c = r.icon ?? s?.icon;
|
|
831
|
+
return {
|
|
832
|
+
id: `workbench-resource:${r.uri}`,
|
|
833
|
+
resourceUri: r.uri,
|
|
834
|
+
mode: Kt,
|
|
835
|
+
label: i,
|
|
836
|
+
searchText: e.searchText ?? i,
|
|
837
|
+
description: e.description,
|
|
838
|
+
group: e.group,
|
|
839
|
+
icon: c ? /* @__PURE__ */ a(L, { name: c }) : void 0,
|
|
840
|
+
onActivate: () => {
|
|
841
|
+
n(), Promise.resolve(e.activate ? e.activate(r) : o.resources.openResource(r, s?.paletteOpenInput)).catch(() => {
|
|
842
|
+
});
|
|
843
|
+
}
|
|
844
|
+
};
|
|
845
|
+
}, ki = (t) => {
|
|
846
|
+
const {
|
|
847
|
+
onClose: e,
|
|
848
|
+
query: n,
|
|
849
|
+
workbench: o
|
|
850
|
+
} = t;
|
|
851
|
+
return o.resources.listResources(n).map((r) => Ci({
|
|
852
|
+
workbench: o,
|
|
853
|
+
entry: r,
|
|
854
|
+
onClose: e
|
|
855
|
+
}));
|
|
856
|
+
}, Ti = "theme", _i = (t) => t === "pstdio-light" ? "Sun" : t === "pstdio-dark" ? "Moon" : "Palette", Ht = (t) => t.title ?? t.id, Ri = (t, e) => {
|
|
857
|
+
const n = e.findIndex((o) => o.id === t);
|
|
858
|
+
return Math.max(n, 0);
|
|
859
|
+
}, Wi = {
|
|
860
|
+
light: "Light",
|
|
861
|
+
dark: "Dark"
|
|
862
|
+
}, Ai = (t, e) => t.mode !== e.mode ? t.mode === "light" ? -1 : 1 : Ht(t).localeCompare(Ht(e)), Ei = (t) => {
|
|
863
|
+
const {
|
|
864
|
+
onClose: e,
|
|
865
|
+
setThemePreference: n,
|
|
866
|
+
themePreference: o,
|
|
867
|
+
themePreferences: r
|
|
868
|
+
} = t;
|
|
869
|
+
return [...r].sort(Ai).map((i) => {
|
|
870
|
+
const s = Ht(i);
|
|
871
|
+
return {
|
|
872
|
+
id: `theme:${i.id}`,
|
|
873
|
+
themePreference: i.id,
|
|
874
|
+
mode: Ti,
|
|
875
|
+
label: s,
|
|
876
|
+
searchText: `theme color appearance ${i.mode} ${i.id} ${s}`,
|
|
877
|
+
group: Wi[i.mode],
|
|
878
|
+
icon: /* @__PURE__ */ a(L, { name: _i(i.id) }),
|
|
879
|
+
isSelected: i.id === o,
|
|
880
|
+
onActivate: () => {
|
|
881
|
+
n(i.id), e();
|
|
882
|
+
}
|
|
883
|
+
};
|
|
884
|
+
});
|
|
885
|
+
}, _t = (t, e) => {
|
|
886
|
+
const n = e.current;
|
|
887
|
+
e.current = null, n && t(n.baseTheme);
|
|
888
|
+
}, $i = (t, e) => [e, t.id, t.description, t.category].filter(Boolean).join(" "), Hi = (t) => new Map(t.keybindings.listActiveKeybindings().map((e) => [e.commandId, e.keybinding])), Mi = (t) => t ? /* @__PURE__ */ a(st, { binding: t }) : void 0, Ni = (t) => t instanceof Error ? t.message : "Command failed.", Bi = (t) => {
|
|
889
|
+
const e = t.getPrimaryResource();
|
|
890
|
+
return e ? {
|
|
891
|
+
resource: e
|
|
892
|
+
} : void 0;
|
|
893
|
+
}, Un = async (t) => {
|
|
894
|
+
const {
|
|
895
|
+
args: e,
|
|
896
|
+
commandId: n,
|
|
897
|
+
context: o,
|
|
898
|
+
label: r,
|
|
899
|
+
workbench: i
|
|
900
|
+
} = t;
|
|
901
|
+
try {
|
|
902
|
+
await i.commands.executeCommand(n, e, o);
|
|
903
|
+
} catch (s) {
|
|
904
|
+
i.notifications.show({
|
|
905
|
+
level: "error",
|
|
906
|
+
title: `${r} failed`,
|
|
907
|
+
message: Ni(s)
|
|
908
|
+
});
|
|
909
|
+
}
|
|
910
|
+
}, Oi = (t) => {
|
|
911
|
+
const {
|
|
912
|
+
action: e,
|
|
913
|
+
onClose: n,
|
|
914
|
+
onRequestParams: o,
|
|
915
|
+
record: r,
|
|
916
|
+
workbench: i,
|
|
917
|
+
shortcutByCommandId: s
|
|
918
|
+
} = t, c = e?.args;
|
|
919
|
+
if (!i.commands.isCommandVisible(r.command.id, c)) return null;
|
|
920
|
+
const d = e?.label ?? r.command.label, l = e?.icon ?? r.command.icon, u = e?.group ?? r.command.category;
|
|
921
|
+
return {
|
|
922
|
+
id: `workbench-command:${r.command.id}`,
|
|
923
|
+
commandId: r.command.id,
|
|
924
|
+
mode: Pt,
|
|
925
|
+
label: d,
|
|
926
|
+
searchText: $i(r.command, d),
|
|
927
|
+
description: r.command.description,
|
|
928
|
+
group: u,
|
|
929
|
+
icon: l ? /* @__PURE__ */ a(L, { name: l }) : void 0,
|
|
930
|
+
shortcut: Mi(s.get(r.command.id)),
|
|
931
|
+
onActivate: () => {
|
|
932
|
+
const m = Bi(i);
|
|
933
|
+
if (n(), Ze(r.command.params) && o) {
|
|
934
|
+
o({
|
|
935
|
+
record: r,
|
|
936
|
+
action: e,
|
|
937
|
+
label: d,
|
|
938
|
+
args: c,
|
|
939
|
+
context: m
|
|
940
|
+
});
|
|
941
|
+
return;
|
|
942
|
+
}
|
|
943
|
+
Un({
|
|
944
|
+
workbench: i,
|
|
945
|
+
commandId: r.command.id,
|
|
946
|
+
args: c,
|
|
947
|
+
context: m,
|
|
948
|
+
label: d
|
|
949
|
+
});
|
|
950
|
+
}
|
|
951
|
+
};
|
|
952
|
+
}, en = (t) => t.action?.group ?? t.record.command.category ?? "", tn = (t) => t.action?.order ?? 0, zi = (t, e) => {
|
|
953
|
+
const n = en(t).localeCompare(en(e));
|
|
954
|
+
return n !== 0 ? n : tn(t) - tn(e);
|
|
955
|
+
}, Di = (t, e) => e ? t.layout.listMenuItems(e).filter((n) => t.context.matches(n.when)).map((n) => {
|
|
956
|
+
const o = t.commands.getCommand(n.commandId);
|
|
957
|
+
return o ? {
|
|
958
|
+
record: o,
|
|
959
|
+
action: n
|
|
960
|
+
} : null;
|
|
961
|
+
}).filter((n) => n !== null) : t.commands.listCommands().map((n) => ({
|
|
962
|
+
record: n,
|
|
963
|
+
action: void 0
|
|
964
|
+
})), Li = (t) => {
|
|
965
|
+
const {
|
|
966
|
+
menuPath: e,
|
|
967
|
+
onClose: n,
|
|
968
|
+
onRequestParams: o,
|
|
969
|
+
workbench: r
|
|
970
|
+
} = t, i = Hi(r);
|
|
971
|
+
return Di(r, e).sort(zi).map(({
|
|
972
|
+
record: s,
|
|
973
|
+
action: c
|
|
974
|
+
}) => Oi({
|
|
975
|
+
workbench: r,
|
|
976
|
+
record: s,
|
|
977
|
+
action: c,
|
|
978
|
+
shortcutByCommandId: i,
|
|
979
|
+
onClose: n,
|
|
980
|
+
onRequestParams: o
|
|
981
|
+
})).filter((s) => s !== null);
|
|
982
|
+
}, Vi = (t) => {
|
|
983
|
+
const {
|
|
984
|
+
workbench: e,
|
|
985
|
+
open: n,
|
|
986
|
+
menuPath: o = Go,
|
|
987
|
+
initialQuery: r = "",
|
|
988
|
+
renderParamField: i,
|
|
989
|
+
onClose: s
|
|
990
|
+
} = t, {
|
|
991
|
+
themePreference: c,
|
|
992
|
+
themePreferences: d,
|
|
993
|
+
setThemePreference: l
|
|
994
|
+
} = $n(), u = $(e.commandPalette.store, (_) => _.view), m = me(null), f = $(e.commandPalette.store, (_) => _.paramsRequest), [h, b] = U(r), g = ui({
|
|
995
|
+
workbench: e,
|
|
996
|
+
query: h,
|
|
997
|
+
open: n,
|
|
998
|
+
onClose: s
|
|
999
|
+
}), p = () => {
|
|
1000
|
+
_t(l, m), s();
|
|
1001
|
+
}, v = () => {
|
|
1002
|
+
_t(l, m), e.commandPalette.open({
|
|
1003
|
+
view: "main"
|
|
1004
|
+
});
|
|
1005
|
+
}, y = () => {
|
|
1006
|
+
m.current = null, s();
|
|
1007
|
+
}, S = Li({
|
|
1008
|
+
workbench: e,
|
|
1009
|
+
menuPath: o,
|
|
1010
|
+
onClose: s,
|
|
1011
|
+
onRequestParams: (_) => e.commandPalette.requestParams(_)
|
|
1012
|
+
}), w = ki({
|
|
1013
|
+
workbench: e,
|
|
1014
|
+
query: r,
|
|
1015
|
+
onClose: s
|
|
1016
|
+
}), P = Ei({
|
|
1017
|
+
themePreference: c,
|
|
1018
|
+
themePreferences: d,
|
|
1019
|
+
setThemePreference: l,
|
|
1020
|
+
onClose: y
|
|
1021
|
+
}), x = Ii({
|
|
1022
|
+
workbench: e,
|
|
1023
|
+
onClose: s
|
|
1024
|
+
}), k = [...w, ...g, ...S, ...P, ...x], I = Ri(c, d), A = Pi(e.modes.getActiveModeId(), e.modes.listModes()), H = Je(u), M = si({
|
|
1025
|
+
view: u,
|
|
1026
|
+
themeInitialActiveIndex: I,
|
|
1027
|
+
modeInitialActiveIndex: A
|
|
1028
|
+
}), T = ri(u), N = ii(u);
|
|
1029
|
+
return re(() => {
|
|
1030
|
+
n && b(r);
|
|
1031
|
+
}, [r, n]), re(() => {
|
|
1032
|
+
if (n && H) {
|
|
1033
|
+
m.current || (m.current = {
|
|
1034
|
+
baseTheme: c
|
|
1035
|
+
});
|
|
1036
|
+
return;
|
|
1037
|
+
}
|
|
1038
|
+
_t(l, m);
|
|
1039
|
+
}, [H, n, l, c]), /* @__PURE__ */ W(Tn, { children: [
|
|
1040
|
+
/* @__PURE__ */ a(j, { display: "contents", css: {
|
|
1041
|
+
"& [data-scope=dialog][data-part=backdrop], & [data-scope=dialog][data-part=positioner]": {
|
|
1042
|
+
position: "absolute",
|
|
1043
|
+
inset: "0"
|
|
1044
|
+
},
|
|
1045
|
+
"& [data-scope=dialog][data-part=positioner]": {
|
|
1046
|
+
alignItems: "center",
|
|
1047
|
+
justifyContent: "center",
|
|
1048
|
+
h: "full",
|
|
1049
|
+
minH: "0",
|
|
1050
|
+
padding: "md",
|
|
1051
|
+
w: "full"
|
|
1052
|
+
},
|
|
1053
|
+
"& [data-scope=dialog][data-part=content]": {
|
|
1054
|
+
background: ur
|
|
1055
|
+
}
|
|
1056
|
+
}, children: /* @__PURE__ */ a(Eo, { open: n, entries: k, initialQuery: r, initialActiveIndex: M, mode: T, modes: N, resetKey: `${u}:${r}`, inputIcon: ({
|
|
1057
|
+
mode: _
|
|
1058
|
+
}) => li({
|
|
1059
|
+
view: u,
|
|
1060
|
+
mode: _
|
|
1061
|
+
}), placeholder: ({
|
|
1062
|
+
mode: _
|
|
1063
|
+
}) => ai({
|
|
1064
|
+
view: u,
|
|
1065
|
+
mode: _
|
|
1066
|
+
}), emptyLabel: "No results found.", onActiveEntryChange: (_) => {
|
|
1067
|
+
if (!n || !H) return;
|
|
1068
|
+
const D = _;
|
|
1069
|
+
!D?.themePreference || D.themePreference === c || l(D.themePreference);
|
|
1070
|
+
}, onQueryChange: b, onClose: p, onEscape: (_) => Fn(u) ? (v(), !0) : _.query.length > 0 ? (_.setQuery(""), _.setActiveIndex(0), !0) : (p(), !0) }) }),
|
|
1071
|
+
/* @__PURE__ */ a(qn, { request: f, renderParamField: i, onClose: () => e.commandPalette.clearParams(), onRun: (_) => Un({
|
|
1072
|
+
workbench: e,
|
|
1073
|
+
..._
|
|
1074
|
+
}) })
|
|
1075
|
+
] });
|
|
1076
|
+
}, dt = (t) => {
|
|
1077
|
+
const e = C(16);
|
|
1078
|
+
let n, o, r, i;
|
|
1079
|
+
e[0] !== t ? ({
|
|
1080
|
+
workbench: i,
|
|
1081
|
+
area: n,
|
|
1082
|
+
children: r,
|
|
1083
|
+
...o
|
|
1084
|
+
} = t, e[0] = t, e[1] = n, e[2] = o, e[3] = r, e[4] = i) : (n = e[1], o = e[2], r = e[3], i = e[4]);
|
|
1085
|
+
const s = $(i.focus.store, Fi), c = me(null);
|
|
1086
|
+
let d, l;
|
|
1087
|
+
e[5] !== s || e[6] !== n ? (d = () => {
|
|
1088
|
+
const f = c.current;
|
|
1089
|
+
!f || s !== n || f.contains(document.activeElement) || f.focus({
|
|
1090
|
+
preventScroll: !0
|
|
1091
|
+
});
|
|
1092
|
+
}, l = [s, n], e[5] = s, e[6] = n, e[7] = d, e[8] = l) : (d = e[7], l = e[8]), re(d, l);
|
|
1093
|
+
let u;
|
|
1094
|
+
e[9] !== n || e[10] !== i.focus ? (u = () => i.focus.setActiveArea(n), e[9] = n, e[10] = i.focus, e[11] = u) : u = e[11];
|
|
1095
|
+
let m;
|
|
1096
|
+
return e[12] !== o || e[13] !== r || e[14] !== u ? (m = /* @__PURE__ */ a(j, { ref: c, tabIndex: -1, outline: "none", onFocusCapture: u, ...o, children: r }), e[12] = o, e[13] = r, e[14] = u, e[15] = m) : m = e[15], m;
|
|
1097
|
+
};
|
|
1098
|
+
function Fi(t) {
|
|
1099
|
+
return t.activeArea;
|
|
1100
|
+
}
|
|
1101
|
+
const Mt = (t) => t.group === "kernel", nn = (t) => t.group === "overflow" || Mt(t), Ki = (t, e) => {
|
|
1102
|
+
if (!e || t.length === 0) return t;
|
|
1103
|
+
const [n, ...o] = t;
|
|
1104
|
+
return n ? [{
|
|
1105
|
+
...n,
|
|
1106
|
+
separatorBefore: !0
|
|
1107
|
+
}, ...o] : o;
|
|
1108
|
+
}, ji = (t) => {
|
|
1109
|
+
const e = t.filter((o) => !Mt(o)), n = t.filter(Mt);
|
|
1110
|
+
return [...e, ...Ki(n, e.length > 0)];
|
|
1111
|
+
}, qi = (t) => ({
|
|
1112
|
+
inlineItems: t.filter((e) => !nn(e)),
|
|
1113
|
+
overflowItems: ji(t.filter(nn))
|
|
1114
|
+
}), Ui = (t) => t.find((e) => e.overflowLabel)?.overflowLabel ?? "More header actions", Gi = (t) => t ? {
|
|
1115
|
+
resource: t
|
|
1116
|
+
} : void 0, Xi = (t) => {
|
|
1117
|
+
const e = C(23), {
|
|
1118
|
+
item: n,
|
|
1119
|
+
onSelect: o
|
|
1120
|
+
} = t;
|
|
1121
|
+
let r;
|
|
1122
|
+
e[0] !== n || e[1] !== o ? (r = () => o(n), e[0] = n, e[1] = o, e[2] = r) : r = e[2];
|
|
1123
|
+
const i = r;
|
|
1124
|
+
if (n.group === "primary" || !n.icon) {
|
|
1125
|
+
const l = n.group === "primary" ? "primary" : "subtle";
|
|
1126
|
+
let u;
|
|
1127
|
+
e[3] !== n.icon ? (u = n.icon ? /* @__PURE__ */ a(L, { name: n.icon, size: 14 }) : null, e[3] = n.icon, e[4] = u) : u = e[4];
|
|
1128
|
+
let m;
|
|
1129
|
+
return e[5] !== n.disabled || e[6] !== n.id || e[7] !== n.label || e[8] !== i || e[9] !== l || e[10] !== u ? (m = /* @__PURE__ */ W(Oe, { size: "xs", variant: l, disabled: n.disabled, onClick: i, children: [
|
|
1130
|
+
u,
|
|
1131
|
+
n.label
|
|
1132
|
+
] }, n.id), e[5] = n.disabled, e[6] = n.id, e[7] = n.label, e[8] = i, e[9] = l, e[10] = u, e[11] = m) : m = e[11], m;
|
|
1133
|
+
}
|
|
1134
|
+
let s;
|
|
1135
|
+
e[12] !== n.icon ? (s = /* @__PURE__ */ a(L, { name: n.icon, size: 16 }), e[12] = n.icon, e[13] = s) : s = e[13];
|
|
1136
|
+
let c;
|
|
1137
|
+
e[14] !== n.disabled || e[15] !== n.label || e[16] !== i || e[17] !== s ? (c = /* @__PURE__ */ a(Ye, { size: "xs", variant: "ghost", "aria-label": n.label, disabled: n.disabled, onClick: i, children: s }), e[14] = n.disabled, e[15] = n.label, e[16] = i, e[17] = s, e[18] = c) : c = e[18];
|
|
1138
|
+
let d;
|
|
1139
|
+
return e[19] !== n.id || e[20] !== n.label || e[21] !== c ? (d = /* @__PURE__ */ a(Qe, { content: n.label, children: c }, n.id), e[19] = n.id, e[20] = n.label, e[21] = c, e[22] = d) : d = e[22], d;
|
|
1140
|
+
}, Nt = (t) => {
|
|
1141
|
+
const e = C(28), {
|
|
1142
|
+
menuPath: n,
|
|
1143
|
+
workbench: o
|
|
1144
|
+
} = t, r = $(o.commands.store, Yi), i = $(o.context.store, Qi), s = $(o.layout.menuStore, Zi), c = $(o.layout.store, Ji);
|
|
1145
|
+
let d, l, u, m, f, h, b;
|
|
1146
|
+
if (e[0] !== r || e[1] !== i || e[2] !== s || e[3] !== n || e[4] !== c || e[5] !== o.commandPalette || e[6] !== o.commands) {
|
|
1147
|
+
b = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
|
|
1148
|
+
e: {
|
|
1149
|
+
const p = Be({
|
|
1150
|
+
itemsByPath: s,
|
|
1151
|
+
commands: r,
|
|
1152
|
+
contextValues: i
|
|
1153
|
+
}, n, {
|
|
1154
|
+
resource: c
|
|
1155
|
+
}), {
|
|
1156
|
+
inlineItems: v,
|
|
1157
|
+
overflowItems: y
|
|
1158
|
+
} = qi(p);
|
|
1159
|
+
let S;
|
|
1160
|
+
e[14] !== r || e[15] !== c || e[16] !== o.commandPalette || e[17] !== o.commands ? (S = (x) => {
|
|
1161
|
+
const k = r[x.commandId]?.command, I = x.args, A = Gi(c);
|
|
1162
|
+
if (k && Ze(k.params)) {
|
|
1163
|
+
o.commandPalette.requestParams({
|
|
1164
|
+
record: {
|
|
1165
|
+
command: k
|
|
1166
|
+
},
|
|
1167
|
+
label: x.label,
|
|
1168
|
+
args: I,
|
|
1169
|
+
context: A
|
|
1170
|
+
});
|
|
1171
|
+
return;
|
|
1172
|
+
}
|
|
1173
|
+
o.commands.executeCommand(x.commandId, I, A).catch(es);
|
|
1174
|
+
}, e[14] = r, e[15] = c, e[16] = o.commandPalette, e[17] = o.commands, e[18] = S) : S = e[18];
|
|
1175
|
+
const w = S;
|
|
1176
|
+
if (p.length === 0) {
|
|
1177
|
+
b = null;
|
|
1178
|
+
break e;
|
|
1179
|
+
}
|
|
1180
|
+
d = Le, l = 0, u = "2xs", m = "0";
|
|
1181
|
+
let P;
|
|
1182
|
+
e[19] !== w ? (P = (x) => /* @__PURE__ */ a(Xi, { item: x, onSelect: w }, x.id), e[19] = w, e[20] = P) : P = e[20], f = v.map(P), h = y.length > 0 ? /* @__PURE__ */ W(ue.Root, { children: [
|
|
1183
|
+
/* @__PURE__ */ a(ue.Trigger, { asChild: !0, children: /* @__PURE__ */ a(Ye, { size: "xs", variant: "ghost", "aria-label": Ui(y), children: /* @__PURE__ */ a(L, { name: "MoreHorizontal", size: 16 }) }) }),
|
|
1184
|
+
/* @__PURE__ */ a(Dt, { children: /* @__PURE__ */ a(ue.Positioner, { children: /* @__PURE__ */ a(ue.Content, { minW: "220px", bg: "bg", children: y.map((x) => /* @__PURE__ */ W(Vt, { children: [
|
|
1185
|
+
x.separatorBefore ? /* @__PURE__ */ a(ue.Separator, {}) : null,
|
|
1186
|
+
/* @__PURE__ */ a(ue.Item, { value: x.id, asChild: !0, children: /* @__PURE__ */ a(An, { asChild: !0, variant: "full-width", id: x.id, label: x.label, icon: x.icon ? /* @__PURE__ */ a(L, { name: x.icon, size: 16 }) : void 0, disabled: x.disabled, onActivate: () => w(x) }) })
|
|
1187
|
+
] }, x.id)) }) }) })
|
|
1188
|
+
] }) : null;
|
|
1189
|
+
}
|
|
1190
|
+
e[0] = r, e[1] = i, e[2] = s, e[3] = n, e[4] = c, e[5] = o.commandPalette, e[6] = o.commands, e[7] = d, e[8] = l, e[9] = u, e[10] = m, e[11] = f, e[12] = h, e[13] = b;
|
|
1191
|
+
} else
|
|
1192
|
+
d = e[7], l = e[8], u = e[9], m = e[10], f = e[11], h = e[12], b = e[13];
|
|
1193
|
+
if (b !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
|
|
1194
|
+
return b;
|
|
1195
|
+
let g;
|
|
1196
|
+
return e[21] !== d || e[22] !== l || e[23] !== u || e[24] !== m || e[25] !== f || e[26] !== h ? (g = /* @__PURE__ */ W(d, { flexShrink: l, gap: u, minW: m, children: [
|
|
1197
|
+
f,
|
|
1198
|
+
h
|
|
1199
|
+
] }), e[21] = d, e[22] = l, e[23] = u, e[24] = m, e[25] = f, e[26] = h, e[27] = g) : g = e[27], g;
|
|
1200
|
+
};
|
|
1201
|
+
function Yi(t) {
|
|
1202
|
+
return t.commands;
|
|
1203
|
+
}
|
|
1204
|
+
function Qi(t) {
|
|
1205
|
+
return t.values;
|
|
1206
|
+
}
|
|
1207
|
+
function Zi(t) {
|
|
1208
|
+
return t.itemsByPath;
|
|
1209
|
+
}
|
|
1210
|
+
function Ji(t) {
|
|
1211
|
+
return xt(t.layout, "primary");
|
|
1212
|
+
}
|
|
1213
|
+
function es() {
|
|
1214
|
+
}
|
|
1215
|
+
const Gn = Mn(void 0), Kc = () => Nn(Gn), ts = (t) => {
|
|
1216
|
+
const e = C(4), {
|
|
1217
|
+
workbench: n
|
|
1218
|
+
} = t, o = $(n.renderers.store, ns), r = $(n.renderers.store, os), i = $(n.renderers.store, rs);
|
|
1219
|
+
let s;
|
|
1220
|
+
return e[0] !== i || e[1] !== r || e[2] !== o ? (s = /* @__PURE__ */ a(Vt, { children: Object.values(o).map((c) => {
|
|
1221
|
+
if (!c.keepAlive)
|
|
1222
|
+
return null;
|
|
1223
|
+
const d = r[c.id]?.host;
|
|
1224
|
+
return d ? On(/* @__PURE__ */ a(Gn.Provider, { value: i[c.id], children: c.render() }), d, c.id) : null;
|
|
1225
|
+
}) }), e[0] = i, e[1] = r, e[2] = o, e[3] = s) : s = e[3], s;
|
|
1226
|
+
};
|
|
1227
|
+
function ns(t) {
|
|
1228
|
+
return t.renderers;
|
|
1229
|
+
}
|
|
1230
|
+
function os(t) {
|
|
1231
|
+
return t.hosts;
|
|
1232
|
+
}
|
|
1233
|
+
function rs(t) {
|
|
1234
|
+
return t.claims;
|
|
1235
|
+
}
|
|
1236
|
+
const is = (t) => {
|
|
1237
|
+
const e = C(3);
|
|
1238
|
+
let n;
|
|
1239
|
+
e[0] !== t ? (n = t.map(ss), e[0] = t, e[1] = n) : n = e[1];
|
|
1240
|
+
const o = n;
|
|
1241
|
+
let r;
|
|
1242
|
+
e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (r = {
|
|
1243
|
+
ignoreInputs: !0,
|
|
1244
|
+
preventDefault: !0,
|
|
1245
|
+
stopPropagation: !0
|
|
1246
|
+
}, e[2] = r) : r = e[2], rr(o, r);
|
|
1247
|
+
};
|
|
1248
|
+
function ss(t) {
|
|
1249
|
+
return {
|
|
1250
|
+
hotkey: t.hotkey,
|
|
1251
|
+
callback: (e) => {
|
|
1252
|
+
e.preventDefault(), t.execute();
|
|
1253
|
+
},
|
|
1254
|
+
options: {
|
|
1255
|
+
enabled: t.enabled,
|
|
1256
|
+
ignoreInputs: t.ignoreInputs,
|
|
1257
|
+
preventDefault: !0,
|
|
1258
|
+
stopPropagation: !0
|
|
1259
|
+
}
|
|
1260
|
+
};
|
|
1261
|
+
}
|
|
1262
|
+
const ls = {
|
|
1263
|
+
alt: "Alt",
|
|
1264
|
+
cmd: "Meta",
|
|
1265
|
+
command: "Meta",
|
|
1266
|
+
ctrl: "Control",
|
|
1267
|
+
control: "Control",
|
|
1268
|
+
meta: "Meta",
|
|
1269
|
+
mod: "Mod",
|
|
1270
|
+
option: "Alt",
|
|
1271
|
+
shift: "Shift"
|
|
1272
|
+
}, as = (t) => t.split("+").map((e) => {
|
|
1273
|
+
const n = e.trim(), o = ls[n.toLowerCase()];
|
|
1274
|
+
return o || (n.length === 1 ? n.toUpperCase() : n.slice(0, 1).toUpperCase() + n.slice(1));
|
|
1275
|
+
}).join("+"), cs = (t) => {
|
|
1276
|
+
const e = xo(t).map(as);
|
|
1277
|
+
return e.length === 1 ? e[0] ?? "" : e;
|
|
1278
|
+
}, ds = (t) => {
|
|
1279
|
+
const {
|
|
1280
|
+
workbench: e,
|
|
1281
|
+
disabled: n = !1,
|
|
1282
|
+
commandIds: o
|
|
1283
|
+
} = t, r = o ? new Set(o) : void 0;
|
|
1284
|
+
return e.keybindings.listActiveKeybindings().flatMap((i) => {
|
|
1285
|
+
if (r && !r.has(i.commandId)) return [];
|
|
1286
|
+
const s = e.commands.getCommand(i.commandId);
|
|
1287
|
+
if (!s) return [];
|
|
1288
|
+
const c = !n && e.commands.isCommandVisible(s.command.id, i.args) && e.commands.isCommandEnabled(s.command.id, i.args);
|
|
1289
|
+
return [{
|
|
1290
|
+
commandId: s.command.id,
|
|
1291
|
+
hotkey: cs(i.keybinding),
|
|
1292
|
+
enabled: c,
|
|
1293
|
+
ignoreInputs: !0,
|
|
1294
|
+
execute: () => e.commands.executeCommand(s.command.id, i.args)
|
|
1295
|
+
}];
|
|
1296
|
+
});
|
|
1297
|
+
}, us = (t) => {
|
|
1298
|
+
const e = C(4), {
|
|
1299
|
+
workbench: n,
|
|
1300
|
+
disabled: o,
|
|
1301
|
+
commandIds: r
|
|
1302
|
+
} = t;
|
|
1303
|
+
$(n.keybindings.store, ms), $(n.context.store, fs), $(n.commands.store, hs);
|
|
1304
|
+
let i;
|
|
1305
|
+
return e[0] !== r || e[1] !== o || e[2] !== n ? (i = ds({
|
|
1306
|
+
workbench: n,
|
|
1307
|
+
disabled: o,
|
|
1308
|
+
commandIds: r
|
|
1309
|
+
}), e[0] = r, e[1] = o, e[2] = n, e[3] = i) : i = e[3], is(i), null;
|
|
1310
|
+
};
|
|
1311
|
+
function ms(t) {
|
|
1312
|
+
return t.keybindings;
|
|
1313
|
+
}
|
|
1314
|
+
function fs(t) {
|
|
1315
|
+
return t.values;
|
|
1316
|
+
}
|
|
1317
|
+
function hs(t) {
|
|
1318
|
+
return t.commands;
|
|
1319
|
+
}
|
|
1320
|
+
const bs = (t) => {
|
|
1321
|
+
const {
|
|
1322
|
+
action: e,
|
|
1323
|
+
workbench: n
|
|
1324
|
+
} = t;
|
|
1325
|
+
n.commands.executeCommand(e.commandId, e.args).catch(() => {
|
|
1326
|
+
});
|
|
1327
|
+
}, gs = (t) => {
|
|
1328
|
+
const e = C(4), {
|
|
1329
|
+
workbench: n
|
|
1330
|
+
} = t;
|
|
1331
|
+
let o;
|
|
1332
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (o = /* @__PURE__ */ new Set(), e[0] = o) : o = e[0];
|
|
1333
|
+
const r = me(o);
|
|
1334
|
+
let i, s;
|
|
1335
|
+
return e[1] !== n ? (i = () => {
|
|
1336
|
+
const c = (l) => {
|
|
1337
|
+
const u = l.actions?.[0], m = u ? {
|
|
1338
|
+
label: u.title,
|
|
1339
|
+
onClick: () => bs({
|
|
1340
|
+
action: u,
|
|
1341
|
+
workbench: n
|
|
1342
|
+
})
|
|
1343
|
+
} : void 0, f = {
|
|
1344
|
+
id: l.id,
|
|
1345
|
+
type: l.level,
|
|
1346
|
+
title: l.title,
|
|
1347
|
+
description: l.message,
|
|
1348
|
+
action: m,
|
|
1349
|
+
closable: !0,
|
|
1350
|
+
onStatusChange: (h) => {
|
|
1351
|
+
h.status === "unmounted" && n.notifications.dismiss(l.id);
|
|
1352
|
+
}
|
|
1353
|
+
};
|
|
1354
|
+
if (r.current.has(l.id)) {
|
|
1355
|
+
ft.update(l.id, f);
|
|
1356
|
+
return;
|
|
1357
|
+
}
|
|
1358
|
+
r.current.add(l.id), ft.create(f);
|
|
1359
|
+
};
|
|
1360
|
+
for (const l of n.notifications.listNotifications())
|
|
1361
|
+
c(l);
|
|
1362
|
+
const d = n.notifications.subscribe((l) => {
|
|
1363
|
+
if (l.type === "show") {
|
|
1364
|
+
c(l.notification);
|
|
1365
|
+
return;
|
|
1366
|
+
}
|
|
1367
|
+
r.current.delete(l.id), ft.dismiss(l.id);
|
|
1368
|
+
});
|
|
1369
|
+
return () => {
|
|
1370
|
+
d.dispose();
|
|
1371
|
+
for (const l of r.current)
|
|
1372
|
+
ft.dismiss(l);
|
|
1373
|
+
r.current.clear();
|
|
1374
|
+
};
|
|
1375
|
+
}, s = [n], e[1] = n, e[2] = i, e[3] = s) : (i = e[2], s = e[3]), re(i, s), null;
|
|
1376
|
+
}, ps = [{
|
|
1377
|
+
id: "true",
|
|
1378
|
+
name: "On"
|
|
1379
|
+
}, {
|
|
1380
|
+
id: "false",
|
|
1381
|
+
name: "Off"
|
|
1382
|
+
}], Xn = (t) => {
|
|
1383
|
+
const n = (t.split(".").at(-1) ?? t).replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/[-_]/g, " ");
|
|
1384
|
+
return n.charAt(0).toUpperCase() + n.slice(1);
|
|
1385
|
+
}, on = (t) => t.map((e) => ({
|
|
1386
|
+
id: String(e),
|
|
1387
|
+
name: Xn(String(e))
|
|
1388
|
+
})), ys = (t) => {
|
|
1389
|
+
const {
|
|
1390
|
+
name: e,
|
|
1391
|
+
schema: n
|
|
1392
|
+
} = t, o = t.label ?? Xn(e), r = n.description, i = t.value ?? n.default, s = {
|
|
1393
|
+
id: e,
|
|
1394
|
+
name: o,
|
|
1395
|
+
description: r
|
|
1396
|
+
};
|
|
1397
|
+
if (n.type === "number")
|
|
1398
|
+
return {
|
|
1399
|
+
...s,
|
|
1400
|
+
type: "number",
|
|
1401
|
+
defaultValue: Number(i ?? 0)
|
|
1402
|
+
};
|
|
1403
|
+
if (n.type === "boolean")
|
|
1404
|
+
return {
|
|
1405
|
+
...s,
|
|
1406
|
+
type: "selection",
|
|
1407
|
+
defaultValue: String(!!i),
|
|
1408
|
+
options: ps
|
|
1409
|
+
};
|
|
1410
|
+
if (n.type === "string")
|
|
1411
|
+
return n.enum ? {
|
|
1412
|
+
...s,
|
|
1413
|
+
type: "selection",
|
|
1414
|
+
defaultValue: String(i ?? ""),
|
|
1415
|
+
options: on(n.enum)
|
|
1416
|
+
} : {
|
|
1417
|
+
...s,
|
|
1418
|
+
type: "text",
|
|
1419
|
+
defaultValue: String(i ?? ""),
|
|
1420
|
+
singleLine: !0
|
|
1421
|
+
};
|
|
1422
|
+
if (n.type === "array" && n.enum) {
|
|
1423
|
+
const c = Array.isArray(i) ? i.map(String) : [];
|
|
1424
|
+
return {
|
|
1425
|
+
...s,
|
|
1426
|
+
type: "selection",
|
|
1427
|
+
multiSelect: !0,
|
|
1428
|
+
defaultValue: c,
|
|
1429
|
+
options: on(n.enum)
|
|
1430
|
+
};
|
|
1431
|
+
}
|
|
1432
|
+
}, vs = (t) => t.map(ys).filter((e) => e !== void 0), Ss = (t, e) => t.type === "boolean" ? e === "true" : t.type === "number" ? Number(e) : t.type === "array" ? Array.isArray(e) ? e.map(String) : [] : String(e), ws = (t) => typeof t == "string" ? {
|
|
1433
|
+
name: t
|
|
1434
|
+
} : t, xs = (t) => {
|
|
1435
|
+
const e = C(34), {
|
|
1436
|
+
preferences: n,
|
|
1437
|
+
names: o,
|
|
1438
|
+
resolveScopeId: r,
|
|
1439
|
+
mode: i
|
|
1440
|
+
} = t, s = i === void 0 ? "live" : i;
|
|
1441
|
+
let c;
|
|
1442
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = {}, e[0] = c) : c = e[0];
|
|
1443
|
+
const [d, l] = U(c), [u, m] = U(0);
|
|
1444
|
+
let f;
|
|
1445
|
+
e[1] !== r ? (f = (O) => ({
|
|
1446
|
+
scope: O,
|
|
1447
|
+
scopeId: r?.(O)
|
|
1448
|
+
}), e[1] = r, e[2] = f) : f = e[2];
|
|
1449
|
+
const h = f;
|
|
1450
|
+
let b, g;
|
|
1451
|
+
if (e[3] !== o || e[4] !== n || e[5] !== h) {
|
|
1452
|
+
b = [];
|
|
1453
|
+
for (const O of o) {
|
|
1454
|
+
const {
|
|
1455
|
+
name: z,
|
|
1456
|
+
label: R
|
|
1457
|
+
} = ws(O), K = n.getSchema(z);
|
|
1458
|
+
K && b.push({
|
|
1459
|
+
name: z,
|
|
1460
|
+
label: R,
|
|
1461
|
+
schema: K,
|
|
1462
|
+
value: n.getValue(z, h(K.scope))
|
|
1463
|
+
});
|
|
1464
|
+
}
|
|
1465
|
+
g = vs(b), e[3] = o, e[4] = n, e[5] = h, e[6] = b, e[7] = g;
|
|
1466
|
+
} else
|
|
1467
|
+
b = e[6], g = e[7];
|
|
1468
|
+
const p = g;
|
|
1469
|
+
let v;
|
|
1470
|
+
e[8] !== b ? (v = new Map(b.map(Ps)), e[8] = b, e[9] = v) : v = e[9];
|
|
1471
|
+
const y = v;
|
|
1472
|
+
let S;
|
|
1473
|
+
e[10] !== n || e[11] !== y || e[12] !== h ? (S = (O, z) => {
|
|
1474
|
+
const R = y.get(O);
|
|
1475
|
+
R && n.setValue(O, Ss(R, z), h(R.scope));
|
|
1476
|
+
}, e[10] = n, e[11] = y, e[12] = h, e[13] = S) : S = e[13];
|
|
1477
|
+
const w = S;
|
|
1478
|
+
let P;
|
|
1479
|
+
e[14] !== s || e[15] !== w ? (P = (O, z) => {
|
|
1480
|
+
if (s === "apply") {
|
|
1481
|
+
l((R) => ({
|
|
1482
|
+
...R,
|
|
1483
|
+
[O]: z
|
|
1484
|
+
}));
|
|
1485
|
+
return;
|
|
1486
|
+
}
|
|
1487
|
+
w(O, z);
|
|
1488
|
+
}, e[14] = s, e[15] = w, e[16] = P) : P = e[16];
|
|
1489
|
+
const x = P;
|
|
1490
|
+
let k;
|
|
1491
|
+
e[17] !== w || e[18] !== d ? (k = () => {
|
|
1492
|
+
for (const [O, z] of Object.entries(d))
|
|
1493
|
+
w(O, z);
|
|
1494
|
+
l({}), m(Is);
|
|
1495
|
+
}, e[17] = w, e[18] = d, e[19] = k) : k = e[19];
|
|
1496
|
+
const I = k;
|
|
1497
|
+
let A;
|
|
1498
|
+
e[20] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (A = () => {
|
|
1499
|
+
l({}), m(Cs);
|
|
1500
|
+
}, e[20] = A) : A = e[20];
|
|
1501
|
+
const H = A;
|
|
1502
|
+
let M;
|
|
1503
|
+
e[21] !== d ? (M = Object.keys(d), e[21] = d, e[22] = M) : M = e[22];
|
|
1504
|
+
const T = M.length > 0;
|
|
1505
|
+
let N;
|
|
1506
|
+
e[23] !== u || e[24] !== x || e[25] !== p ? (N = /* @__PURE__ */ a(Hn, { params: p, onChange: x, fullWidth: !0 }, u), e[23] = u, e[24] = x, e[25] = p, e[26] = N) : N = e[26];
|
|
1507
|
+
let _;
|
|
1508
|
+
e[27] !== T || e[28] !== s || e[29] !== I ? (_ = s === "apply" && /* @__PURE__ */ W(Le, { gap: "sm", children: [
|
|
1509
|
+
/* @__PURE__ */ a(Oe, { size: "sm", onClick: I, disabled: !T, children: "Save" }),
|
|
1510
|
+
/* @__PURE__ */ a(Oe, { size: "sm", variant: "outline", onClick: H, disabled: !T, children: "Discard" })
|
|
1511
|
+
] }), e[27] = T, e[28] = s, e[29] = I, e[30] = _) : _ = e[30];
|
|
1512
|
+
let D;
|
|
1513
|
+
return e[31] !== N || e[32] !== _ ? (D = /* @__PURE__ */ W(ae, { gap: "md", maxW: "640px", children: [
|
|
1514
|
+
N,
|
|
1515
|
+
_
|
|
1516
|
+
] }), e[31] = N, e[32] = _, e[33] = D) : D = e[33], D;
|
|
1517
|
+
};
|
|
1518
|
+
function Ps(t) {
|
|
1519
|
+
return [t.name, t.schema];
|
|
1520
|
+
}
|
|
1521
|
+
function Is(t) {
|
|
1522
|
+
return t + 1;
|
|
1523
|
+
}
|
|
1524
|
+
function Cs(t) {
|
|
1525
|
+
return t + 1;
|
|
1526
|
+
}
|
|
1527
|
+
const qt = (t, e) => ({
|
|
1528
|
+
...t.context.snapshot(),
|
|
1529
|
+
...kn(e?.resource)
|
|
1530
|
+
}), Yn = (t, e, n) => wt(n, t.command.when) ? t.handler.isVisible?.(e) !== !1 : !1, ks = async (t) => {
|
|
1531
|
+
const {
|
|
1532
|
+
action: e,
|
|
1533
|
+
args: n,
|
|
1534
|
+
context: o,
|
|
1535
|
+
workbench: r
|
|
1536
|
+
} = t, i = e.commandId ? r.commands.getCommand(e.commandId) : void 0, s = n ?? e.args;
|
|
1537
|
+
await (i ? r.commands.executeCommand(i.command.id, s, o) : e.run?.(s));
|
|
1538
|
+
}, yt = async (t) => {
|
|
1539
|
+
const {
|
|
1540
|
+
action: e,
|
|
1541
|
+
args: n,
|
|
1542
|
+
context: o,
|
|
1543
|
+
onCommandError: r,
|
|
1544
|
+
workbench: i
|
|
1545
|
+
} = t;
|
|
1546
|
+
try {
|
|
1547
|
+
await ks({
|
|
1548
|
+
action: e,
|
|
1549
|
+
args: n,
|
|
1550
|
+
context: o,
|
|
1551
|
+
workbench: i
|
|
1552
|
+
});
|
|
1553
|
+
} catch (s) {
|
|
1554
|
+
throw r?.(s), s;
|
|
1555
|
+
}
|
|
1556
|
+
}, It = (t, e) => {
|
|
1557
|
+
if (e.commandId)
|
|
1558
|
+
return t.commands.getCommand(e.commandId);
|
|
1559
|
+
}, Qn = (t, e, n) => {
|
|
1560
|
+
if (!wt(n, e.when)) return !1;
|
|
1561
|
+
const o = It(t, e);
|
|
1562
|
+
return e.commandId && !o ? !1 : o ? Yn(o, e.args, n) : !0;
|
|
1563
|
+
}, Zn = (t, e) => {
|
|
1564
|
+
if (e.disabled) return !1;
|
|
1565
|
+
const n = It(t, e);
|
|
1566
|
+
return n ? t.commands.isCommandEnabled(n.command.id, e.args) : !0;
|
|
1567
|
+
}, Ts = (t) => {
|
|
1568
|
+
const {
|
|
1569
|
+
icon: e,
|
|
1570
|
+
iconSrc: n
|
|
1571
|
+
} = t;
|
|
1572
|
+
return n ? /* @__PURE__ */ a(j, { boxSize: "16px", bg: "white", borderRadius: "4px", p: "1px", display: "grid", placeItems: "center", children: /* @__PURE__ */ a("img", { src: n, alt: "", "aria-hidden": "true", width: 14, height: 14, style: {
|
|
1573
|
+
display: "block",
|
|
1574
|
+
width: "100%",
|
|
1575
|
+
height: "100%",
|
|
1576
|
+
objectFit: "contain"
|
|
1577
|
+
} }) }) : e ? /* @__PURE__ */ a(L, { name: e }) : void 0;
|
|
1578
|
+
}, _s = (t) => {
|
|
1579
|
+
const {
|
|
1580
|
+
binding: e,
|
|
1581
|
+
external: n
|
|
1582
|
+
} = t;
|
|
1583
|
+
if (n) return /* @__PURE__ */ a(L, { name: "ArrowUpRight", size: 14, color: "fg.muted" });
|
|
1584
|
+
if (e) return /* @__PURE__ */ a(st, { binding: e });
|
|
1585
|
+
}, Rs = (t, e) => {
|
|
1586
|
+
if (!e || t.length === 0) return t;
|
|
1587
|
+
const [n, ...o] = t;
|
|
1588
|
+
return [{
|
|
1589
|
+
...n,
|
|
1590
|
+
separatorBefore: !0
|
|
1591
|
+
}, ...o];
|
|
1592
|
+
}, Ws = (t) => t === "kernel", As = (t) => {
|
|
1593
|
+
const {
|
|
1594
|
+
context: e,
|
|
1595
|
+
menuPath: n,
|
|
1596
|
+
onCommandError: o,
|
|
1597
|
+
onRequestParams: r,
|
|
1598
|
+
workbench: i
|
|
1599
|
+
} = t, s = qt(i, e), c = new Map(i.keybindings.listActiveKeybindings().map((u) => [u.commandId, u.keybinding])), d = [], l = [];
|
|
1600
|
+
for (const [u, m] of i.layout.listMenuItems(n).entries()) {
|
|
1601
|
+
if (!wt(s, m.when)) continue;
|
|
1602
|
+
const f = i.commands.getCommand(m.commandId);
|
|
1603
|
+
if (!f) continue;
|
|
1604
|
+
const h = m.args;
|
|
1605
|
+
if (!Yn(f, h, s)) continue;
|
|
1606
|
+
const b = m.icon ?? f.command.icon, g = c.get(f.command.id), p = m.readOnly === !0, v = m.label ?? f.command.label, y = Ze(f.command.params) && r ? () => r({
|
|
1607
|
+
request: {
|
|
1608
|
+
record: {
|
|
1609
|
+
command: f.command
|
|
1610
|
+
},
|
|
1611
|
+
label: v,
|
|
1612
|
+
args: h,
|
|
1613
|
+
context: e
|
|
1614
|
+
},
|
|
1615
|
+
run: async (w) => {
|
|
1616
|
+
try {
|
|
1617
|
+
await i.commands.executeCommand(f.command.id, w, e);
|
|
1618
|
+
} catch (P) {
|
|
1619
|
+
throw o?.(P), P;
|
|
1620
|
+
}
|
|
1621
|
+
}
|
|
1622
|
+
}) : void 0, S = {
|
|
1623
|
+
id: `${m.commandId}:${u}`,
|
|
1624
|
+
label: v,
|
|
1625
|
+
description: m.description ?? f.command.description,
|
|
1626
|
+
icon: Ts({
|
|
1627
|
+
icon: b,
|
|
1628
|
+
iconSrc: m.iconSrc
|
|
1629
|
+
}),
|
|
1630
|
+
endContent: _s({
|
|
1631
|
+
external: m.external,
|
|
1632
|
+
binding: g
|
|
1633
|
+
}),
|
|
1634
|
+
disabled: p || !i.commands.isCommandEnabled(f.command.id, h),
|
|
1635
|
+
readOnly: p,
|
|
1636
|
+
onAction: p ? void 0 : () => {
|
|
1637
|
+
if (y) {
|
|
1638
|
+
y();
|
|
1639
|
+
return;
|
|
1640
|
+
}
|
|
1641
|
+
i.commands.executeCommand(f.command.id, h, e).catch((w) => o?.(w));
|
|
1642
|
+
}
|
|
1643
|
+
};
|
|
1644
|
+
Ws(m.group) ? l.push(S) : d.push(S);
|
|
1645
|
+
}
|
|
1646
|
+
return {
|
|
1647
|
+
regularItems: d,
|
|
1648
|
+
kernelItems: l
|
|
1649
|
+
};
|
|
1650
|
+
}, Es = (t) => {
|
|
1651
|
+
const {
|
|
1652
|
+
actions: e = [],
|
|
1653
|
+
context: n,
|
|
1654
|
+
onCommandError: o,
|
|
1655
|
+
onRequestParams: r,
|
|
1656
|
+
workbench: i
|
|
1657
|
+
} = t, s = qt(i, n), c = new Map(i.keybindings.listActiveKeybindings().map((l) => [l.commandId, l.keybinding])), d = [];
|
|
1658
|
+
for (const l of e) {
|
|
1659
|
+
if (!Qn(i, l, s)) continue;
|
|
1660
|
+
const u = It(i, l), m = l.label ?? u?.command.label;
|
|
1661
|
+
if (!m) continue;
|
|
1662
|
+
const f = l.icon ?? u?.command.icon, h = !Zn(i, l), b = l.commandId ? c.get(l.commandId) : void 0, g = Ze(l.params) && r ? () => r({
|
|
1663
|
+
request: {
|
|
1664
|
+
record: {
|
|
1665
|
+
command: {
|
|
1666
|
+
id: l.commandId ?? l.id,
|
|
1667
|
+
label: m,
|
|
1668
|
+
params: l.params
|
|
1669
|
+
}
|
|
1670
|
+
},
|
|
1671
|
+
label: m,
|
|
1672
|
+
submitLabel: l.submitLabel,
|
|
1673
|
+
args: l.args,
|
|
1674
|
+
context: n
|
|
1675
|
+
},
|
|
1676
|
+
run: (p) => yt({
|
|
1677
|
+
action: l,
|
|
1678
|
+
args: p,
|
|
1679
|
+
context: n,
|
|
1680
|
+
workbench: i,
|
|
1681
|
+
onCommandError: o
|
|
1682
|
+
})
|
|
1683
|
+
}) : void 0;
|
|
1684
|
+
d.push({
|
|
1685
|
+
id: l.id,
|
|
1686
|
+
label: m,
|
|
1687
|
+
icon: f ? /* @__PURE__ */ a(L, { name: f }) : void 0,
|
|
1688
|
+
endContent: b ? /* @__PURE__ */ a(st, { binding: b }) : void 0,
|
|
1689
|
+
disabled: h,
|
|
1690
|
+
onAction: () => {
|
|
1691
|
+
if (!h) {
|
|
1692
|
+
if (g) {
|
|
1693
|
+
g();
|
|
1694
|
+
return;
|
|
1695
|
+
}
|
|
1696
|
+
yt({
|
|
1697
|
+
action: l,
|
|
1698
|
+
context: n,
|
|
1699
|
+
workbench: i,
|
|
1700
|
+
onCommandError: o
|
|
1701
|
+
}).catch(() => {
|
|
1702
|
+
});
|
|
1703
|
+
}
|
|
1704
|
+
}
|
|
1705
|
+
});
|
|
1706
|
+
}
|
|
1707
|
+
return d;
|
|
1708
|
+
}, $s = (t) => {
|
|
1709
|
+
const e = Es(t), {
|
|
1710
|
+
regularItems: n,
|
|
1711
|
+
kernelItems: o
|
|
1712
|
+
} = t.menuPath ? As({
|
|
1713
|
+
...t,
|
|
1714
|
+
menuPath: t.menuPath
|
|
1715
|
+
}) : {
|
|
1716
|
+
regularItems: [],
|
|
1717
|
+
kernelItems: []
|
|
1718
|
+
}, r = [...e, ...n];
|
|
1719
|
+
return [...r, ...Rs(o, r.length > 0)];
|
|
1720
|
+
}, Jn = (t) => {
|
|
1721
|
+
const {
|
|
1722
|
+
actions: e = [],
|
|
1723
|
+
context: n,
|
|
1724
|
+
onCommandError: o,
|
|
1725
|
+
onRequestParams: r,
|
|
1726
|
+
workbench: i
|
|
1727
|
+
} = t, s = qt(i, n), c = new Map(i.keybindings.listActiveKeybindings().map((l) => [l.commandId, l.keybinding])), d = [];
|
|
1728
|
+
for (const l of e) {
|
|
1729
|
+
if (!Qn(i, l, s) || !Zn(i, l)) continue;
|
|
1730
|
+
const u = It(i, l), m = l.label ?? u?.command.label;
|
|
1731
|
+
if (!m) continue;
|
|
1732
|
+
const f = l.icon ?? u?.command.icon, h = l.commandId ? c.get(l.commandId) : void 0, b = Ze(l.params) && r ? () => r({
|
|
1733
|
+
request: {
|
|
1734
|
+
record: {
|
|
1735
|
+
command: {
|
|
1736
|
+
id: l.commandId ?? l.id,
|
|
1737
|
+
label: m,
|
|
1738
|
+
params: l.params
|
|
1739
|
+
}
|
|
1740
|
+
},
|
|
1741
|
+
label: m,
|
|
1742
|
+
submitLabel: l.submitLabel,
|
|
1743
|
+
args: l.args,
|
|
1744
|
+
context: n
|
|
1745
|
+
},
|
|
1746
|
+
run: (g) => yt({
|
|
1747
|
+
action: l,
|
|
1748
|
+
args: g,
|
|
1749
|
+
context: n,
|
|
1750
|
+
workbench: i,
|
|
1751
|
+
onCommandError: o
|
|
1752
|
+
})
|
|
1753
|
+
}) : void 0;
|
|
1754
|
+
d.push({
|
|
1755
|
+
id: l.id,
|
|
1756
|
+
label: m,
|
|
1757
|
+
icon: f ? /* @__PURE__ */ a(L, { name: f }) : void 0,
|
|
1758
|
+
tooltip: h ? /* @__PURE__ */ W(Le, { gap: "2", children: [
|
|
1759
|
+
/* @__PURE__ */ a(oe, { children: m }),
|
|
1760
|
+
/* @__PURE__ */ a(st, { binding: h })
|
|
1761
|
+
] }) : void 0,
|
|
1762
|
+
onAction: () => {
|
|
1763
|
+
if (b) {
|
|
1764
|
+
b();
|
|
1765
|
+
return;
|
|
1766
|
+
}
|
|
1767
|
+
yt({
|
|
1768
|
+
action: l,
|
|
1769
|
+
context: n,
|
|
1770
|
+
workbench: i,
|
|
1771
|
+
onCommandError: o
|
|
1772
|
+
}).catch(() => {
|
|
1773
|
+
});
|
|
1774
|
+
}
|
|
1775
|
+
});
|
|
1776
|
+
}
|
|
1777
|
+
return d;
|
|
1778
|
+
}, Hs = (t) => {
|
|
1779
|
+
const e = [...new Set(t)];
|
|
1780
|
+
if (e.length !== 0)
|
|
1781
|
+
return e.length === 1 ? e[0] : e;
|
|
1782
|
+
}, eo = (t) => {
|
|
1783
|
+
if (t.resource) return t.resource.uri;
|
|
1784
|
+
if (t.target?.kind === "resource") return t.target.resource.uri;
|
|
1785
|
+
}, to = (t, e) => t.flatMap((n) => [n, ...to([...n.children ?? [], ...e[n.id] ?? []], e)]), no = (t, e) => t.flatMap((n) => to(n.nodes, e)), Ms = (t, e, n) => {
|
|
1786
|
+
const o = no(t, e);
|
|
1787
|
+
for (const r of n) {
|
|
1788
|
+
const i = o.filter((s) => s.id === r || eo(s) === r).map((s) => s.id);
|
|
1789
|
+
if (i.length > 0) return Hs(i);
|
|
1790
|
+
}
|
|
1791
|
+
}, Ns = (t, e, n) => no(t, n).find((o) => o.id === e), rn = (t) => {
|
|
1792
|
+
const {
|
|
1793
|
+
sections: e,
|
|
1794
|
+
childrenByNodeId: n,
|
|
1795
|
+
activeNodeId: o,
|
|
1796
|
+
activeResource: r,
|
|
1797
|
+
selectedNodeId: i
|
|
1798
|
+
} = t;
|
|
1799
|
+
if (o) return o;
|
|
1800
|
+
const s = Po(r), c = Ms(e, n, s);
|
|
1801
|
+
if (c) return c;
|
|
1802
|
+
if (!i) return;
|
|
1803
|
+
const d = Ns(e, i, n), l = d ? eo(d) : void 0;
|
|
1804
|
+
if (!(s.length > 0 && l))
|
|
1805
|
+
return i;
|
|
1806
|
+
}, Bs = (t) => t.isContainer !== !0 && (t.children ?? []).length === 0, Os = (t) => t.every((e) => e.nodes.every(Bs)), oo = (t, e, n) => {
|
|
1807
|
+
for (const o of t) {
|
|
1808
|
+
if (o.id === e) return o;
|
|
1809
|
+
const r = oo([...o.children ?? [], ...n[o.id] ?? []], e, n);
|
|
1810
|
+
if (r) return r;
|
|
1811
|
+
}
|
|
1812
|
+
return null;
|
|
1813
|
+
}, sn = (t, e, n) => {
|
|
1814
|
+
for (const o of t) {
|
|
1815
|
+
const r = oo(o.nodes, e, n);
|
|
1816
|
+
if (r) return r;
|
|
1817
|
+
}
|
|
1818
|
+
return null;
|
|
1819
|
+
}, zs = (t, e) => e ? /* @__PURE__ */ a(Qe, { content: e, openDelay: 300, children: /* @__PURE__ */ a(j, { as: "span", display: "inline-flex", alignItems: "center", justifyContent: "center", children: t }) }) : t, Ds = (t) => {
|
|
1820
|
+
let e;
|
|
1821
|
+
return t.iconElement !== void 0 ? e = t.iconElement : t.icon && (e = /* @__PURE__ */ a(L, { name: t.icon })), e === void 0 ? void 0 : zs(e, t.iconTooltip);
|
|
1822
|
+
}, Ls = (t) => {
|
|
1823
|
+
if (t.target) return {
|
|
1824
|
+
id: "target",
|
|
1825
|
+
payload: t.target
|
|
1826
|
+
};
|
|
1827
|
+
if (t.resource) return {
|
|
1828
|
+
id: "resource",
|
|
1829
|
+
payload: t.resource
|
|
1830
|
+
};
|
|
1831
|
+
}, Vs = (t) => {
|
|
1832
|
+
if (t.resource) return t.resource;
|
|
1833
|
+
if (t.target?.kind === "resource") return t.target.resource;
|
|
1834
|
+
}, Fs = (t) => {
|
|
1835
|
+
if (t)
|
|
1836
|
+
return /* @__PURE__ */ a(j, { opacity: "0", pointerEvents: "none", display: "inline-flex", alignItems: "center", transition: "opacity 120ms ease", _groupHover: {
|
|
1837
|
+
opacity: "1"
|
|
1838
|
+
}, children: /* @__PURE__ */ a(st, { binding: t }) });
|
|
1839
|
+
}, Ks = (t, e, n) => {
|
|
1840
|
+
if (t.endContent !== void 0) return t.endContent;
|
|
1841
|
+
const o = Fs(n);
|
|
1842
|
+
if (o) return o;
|
|
1843
|
+
const r = e?.metadata?.diffAdditions, i = e?.metadata?.diffDeletions;
|
|
1844
|
+
if (!(e?.kind !== "workspace" || typeof r != "number" || typeof i != "number"))
|
|
1845
|
+
return /* @__PURE__ */ a(ir, { additions: r, deletions: i, variant: "ghost", size: "small" });
|
|
1846
|
+
}, js = (t) => {
|
|
1847
|
+
if (!(!t.emptyState || t.nodes.length > 0))
|
|
1848
|
+
return {
|
|
1849
|
+
id: `${t.id}:empty`,
|
|
1850
|
+
label: t.emptyState.title,
|
|
1851
|
+
description: t.emptyState.description,
|
|
1852
|
+
icon: t.emptyState.icon ? /* @__PURE__ */ a(L, { name: t.emptyState.icon }) : void 0,
|
|
1853
|
+
disabled: !0,
|
|
1854
|
+
rowVariant: "empty-state"
|
|
1855
|
+
};
|
|
1856
|
+
}, ro = (t, e, n) => {
|
|
1857
|
+
const o = Ls(t), r = Vs(t), i = r ? {
|
|
1858
|
+
resource: r
|
|
1859
|
+
} : void 0, s = $s({
|
|
1860
|
+
actions: t.contextMenuActions,
|
|
1861
|
+
menuPath: t.contextMenuPath ?? t.menuPath ?? (r ? Xo(r.kind) : void 0),
|
|
1862
|
+
workbench: n.workbench,
|
|
1863
|
+
context: i,
|
|
1864
|
+
onCommandError: n.onCommandError,
|
|
1865
|
+
onRequestParams: n.onRequestParams
|
|
1866
|
+
}), c = t.menuPath && s.length > 0 ? s : void 0, d = new Map(n.workbench.keybindings.listActiveKeybindings().map((m) => [m.commandId, m.keybinding])), l = t.commandId ? d.get(t.commandId) : void 0;
|
|
1867
|
+
return {
|
|
1868
|
+
id: t.id,
|
|
1869
|
+
label: t.label,
|
|
1870
|
+
description: t.description,
|
|
1871
|
+
icon: Ds(t),
|
|
1872
|
+
iconColor: t.iconColor,
|
|
1873
|
+
disabled: t.disabled,
|
|
1874
|
+
rowVariant: t.rowVariant,
|
|
1875
|
+
canHide: t.canHide,
|
|
1876
|
+
hiddenByDefault: t.hiddenByDefault,
|
|
1877
|
+
actions: Jn({
|
|
1878
|
+
actions: t.actions,
|
|
1879
|
+
workbench: n.workbench,
|
|
1880
|
+
context: i,
|
|
1881
|
+
onCommandError: n.onCommandError,
|
|
1882
|
+
onRequestParams: n.onRequestParams
|
|
1883
|
+
}),
|
|
1884
|
+
endContent: Ks(t, r, l),
|
|
1885
|
+
menuItems: c,
|
|
1886
|
+
contextMenuItems: s.length > 0 ? s : void 0,
|
|
1887
|
+
...t.menuPlacement ? {
|
|
1888
|
+
menuPlacement: t.menuPlacement
|
|
1889
|
+
} : {},
|
|
1890
|
+
isContainer: t.collapsible,
|
|
1891
|
+
isNavigable: !!o,
|
|
1892
|
+
navigationIntent: o,
|
|
1893
|
+
children: [...t.children ?? [], ...e[t.id] ?? []].map((m) => ro(m, e, n))
|
|
1894
|
+
};
|
|
1895
|
+
}, Rt = (t, e, n) => {
|
|
1896
|
+
const o = js(t);
|
|
1897
|
+
return {
|
|
1898
|
+
id: t.id,
|
|
1899
|
+
label: t.label,
|
|
1900
|
+
actions: Jn({
|
|
1901
|
+
actions: t.actions,
|
|
1902
|
+
workbench: n.workbench,
|
|
1903
|
+
onCommandError: n.onCommandError,
|
|
1904
|
+
onRequestParams: n.onRequestParams
|
|
1905
|
+
}),
|
|
1906
|
+
collapsible: t.collapsible,
|
|
1907
|
+
canHide: t.canHide,
|
|
1908
|
+
hiddenByDefault: t.hiddenByDefault,
|
|
1909
|
+
nodes: o ? [o] : t.nodes.map((r) => ro(r, e, n))
|
|
1910
|
+
};
|
|
1911
|
+
}, qs = ["70%", "50%", "82%", "60%", "44%", "76%"], Us = () => {
|
|
1912
|
+
const t = C(1);
|
|
1913
|
+
let e;
|
|
1914
|
+
return t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ a(ae, { gap: "sm", px: "sm", py: "xs", "aria-hidden": !0, children: qs.map(Xs) }), t[0] = e) : e = t[0], e;
|
|
1915
|
+
}, Gs = (t) => {
|
|
1916
|
+
const e = C(15), {
|
|
1917
|
+
loading: n,
|
|
1918
|
+
moduleLoading: o,
|
|
1919
|
+
sections: r,
|
|
1920
|
+
backgroundContextActions: i,
|
|
1921
|
+
activeNodeId: s,
|
|
1922
|
+
expandedNodeIds: c,
|
|
1923
|
+
expandedSectionIds: d,
|
|
1924
|
+
scrollRef: l,
|
|
1925
|
+
onToggleSection: u,
|
|
1926
|
+
onToggleNode: m,
|
|
1927
|
+
onNavigate: f
|
|
1928
|
+
} = t;
|
|
1929
|
+
if (n)
|
|
1930
|
+
return null;
|
|
1931
|
+
if (o) {
|
|
1932
|
+
let g;
|
|
1933
|
+
return e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ a(Us, {}), e[0] = g) : g = e[0], g;
|
|
1934
|
+
}
|
|
1935
|
+
if (r.length === 0 && (i?.length ?? 0) === 0) {
|
|
1936
|
+
let g;
|
|
1937
|
+
return e[1] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = /* @__PURE__ */ a(gt, { minH: "12rem", title: "No tree items" }), e[1] = g) : g = e[1], g;
|
|
1938
|
+
}
|
|
1939
|
+
let h;
|
|
1940
|
+
e[2] !== r ? (h = Os(r), e[2] = r, e[3] = h) : h = e[3];
|
|
1941
|
+
let b;
|
|
1942
|
+
return e[4] !== s || e[5] !== i || e[6] !== c || e[7] !== d || e[8] !== f || e[9] !== m || e[10] !== u || e[11] !== l || e[12] !== r || e[13] !== h ? (b = /* @__PURE__ */ a($t, { sections: r, backgroundContextActions: i, expandedNodeIds: c, expandedSectionIds: d, activeNodeId: s, rowVariant: "compact", sectionGap: "md", nodeGap: "1px", virtualize: h, scrollRef: l, onToggleSection: u, onToggleNode: m, onNavigate: f }), e[4] = s, e[5] = i, e[6] = c, e[7] = d, e[8] = f, e[9] = m, e[10] = u, e[11] = l, e[12] = r, e[13] = h, e[14] = b) : b = e[14], b;
|
|
1943
|
+
};
|
|
1944
|
+
function Xs(t, e) {
|
|
1945
|
+
return /* @__PURE__ */ a(Io, { height: "4", width: t, borderRadius: "xs" }, `${t}-${e}`);
|
|
1946
|
+
}
|
|
1947
|
+
const Ys = (t, e, n) => n instanceof Error && n.message === `Tree renderer not registered: ${e}` && !t.getTreeRenderer(e), Qs = (t, e) => t !== e, Zs = (t, e) => {
|
|
1948
|
+
const n = t.getTreeRenderer(e);
|
|
1949
|
+
if (n)
|
|
1950
|
+
for (const o of n.defaultExpandedSectionIds ?? [])
|
|
1951
|
+
t.setSectionExpanded(e, o, !0);
|
|
1952
|
+
}, Js = async (t, e, n = {}) => {
|
|
1953
|
+
if (!t.getTreeRenderer(e)) return null;
|
|
1954
|
+
try {
|
|
1955
|
+
const [o, r, i] = await Promise.all([t.getHeader(e, n), t.getBody(e, n), t.getFooter(e, n)]);
|
|
1956
|
+
return {
|
|
1957
|
+
header: o,
|
|
1958
|
+
body: r,
|
|
1959
|
+
footer: i
|
|
1960
|
+
};
|
|
1961
|
+
} catch (o) {
|
|
1962
|
+
if (Ys(t, e, o)) return null;
|
|
1963
|
+
throw o;
|
|
1964
|
+
}
|
|
1965
|
+
}, el = (t) => (t.kind === "compound" ? t.targets : [t]).some((n) => n.kind !== "command"), tl = (t, e) => typeof t == "string" ? t : e, nl = (t) => t.canHide === !0 || t.hiddenByDefault === !0, ol = (t, e) => t === "shown" ? e.hiddenIcon : e.visibleIcon, rl = (t, e, n, o) => {
|
|
1966
|
+
if (!nl(t)) return;
|
|
1967
|
+
const r = t.hiddenByDefault === !0, i = Mo(e[t.id], r), s = tl(t.label, t.id), c = t.contextMenuItems ?? [];
|
|
1968
|
+
return {
|
|
1969
|
+
id: `tree-visibility:${t.id}`,
|
|
1970
|
+
label: i === "shown" ? `Hide ${s}` : `Show ${s}`,
|
|
1971
|
+
icon: ol(i, o),
|
|
1972
|
+
...c.length > 0 ? {
|
|
1973
|
+
separatorBefore: !0
|
|
1974
|
+
} : {},
|
|
1975
|
+
onAction: () => n.onToggleNode(t.id, r)
|
|
1976
|
+
};
|
|
1977
|
+
}, ln = (t, e, n, o) => {
|
|
1978
|
+
let r = !1;
|
|
1979
|
+
const i = t.map((s) => {
|
|
1980
|
+
const c = rl(s, e, n, o);
|
|
1981
|
+
return c ? (r = !0, {
|
|
1982
|
+
...s,
|
|
1983
|
+
contextMenuItems: [...s.contextMenuItems ?? [], c]
|
|
1984
|
+
}) : s;
|
|
1985
|
+
});
|
|
1986
|
+
return r ? i : t;
|
|
1987
|
+
}, il = (t, e, n) => {
|
|
1988
|
+
const o = C(22), r = tt(t, sl), i = tt(t, ll), s = tt(t, al), c = tt(t, cl), d = tt(t, dl);
|
|
1989
|
+
let l, u, m, f;
|
|
1990
|
+
if (o[0] !== n || o[1] !== i || o[2] !== e.footerNodes || o[3] !== e.headerNodes || o[4] !== e.sections || o[5] !== d || o[6] !== r || o[7] !== c || o[8] !== s) {
|
|
1991
|
+
const g = {
|
|
1992
|
+
onToggleSection: s,
|
|
1993
|
+
onToggleNode: c,
|
|
1994
|
+
onResetAll: d
|
|
1995
|
+
}, p = ln(e.headerNodes, i, g, n), v = ln(e.footerNodes, i, g, n);
|
|
1996
|
+
m = Gt(p, i);
|
|
1997
|
+
let y;
|
|
1998
|
+
o[13] !== i || o[14] !== e.sections || o[15] !== r ? (y = $o(e.sections, r, i), o[13] = i, o[14] = e.sections, o[15] = r, o[16] = y) : y = o[16], f = y, u = Gt(v, i), l = Ho({
|
|
1999
|
+
headerNodes: e.headerNodes,
|
|
2000
|
+
sections: e.sections,
|
|
2001
|
+
footerNodes: e.footerNodes
|
|
2002
|
+
}, r, i, g, n), o[0] = n, o[1] = i, o[2] = e.footerNodes, o[3] = e.headerNodes, o[4] = e.sections, o[5] = d, o[6] = r, o[7] = c, o[8] = s, o[9] = l, o[10] = u, o[11] = m, o[12] = f;
|
|
2003
|
+
} else
|
|
2004
|
+
l = o[9], u = o[10], m = o[11], f = o[12];
|
|
2005
|
+
const h = l;
|
|
2006
|
+
let b;
|
|
2007
|
+
return o[17] !== h || o[18] !== u || o[19] !== m || o[20] !== f ? (b = {
|
|
2008
|
+
visibleHeaderNodes: m,
|
|
2009
|
+
visibleSections: f,
|
|
2010
|
+
visibleFooterNodes: u,
|
|
2011
|
+
backgroundContextActions: h
|
|
2012
|
+
}, o[17] = h, o[18] = u, o[19] = m, o[20] = f, o[21] = b) : b = o[21], b;
|
|
2013
|
+
};
|
|
2014
|
+
function sl(t) {
|
|
2015
|
+
return t.sectionOverrides;
|
|
2016
|
+
}
|
|
2017
|
+
function ll(t) {
|
|
2018
|
+
return t.nodeOverrides;
|
|
2019
|
+
}
|
|
2020
|
+
function al(t) {
|
|
2021
|
+
return t.toggleSection;
|
|
2022
|
+
}
|
|
2023
|
+
function cl(t) {
|
|
2024
|
+
return t.toggleNode;
|
|
2025
|
+
}
|
|
2026
|
+
function dl(t) {
|
|
2027
|
+
return t.reset;
|
|
2028
|
+
}
|
|
2029
|
+
const ul = {
|
|
2030
|
+
expandedNodeIds: [],
|
|
2031
|
+
expandedSectionIds: []
|
|
2032
|
+
}, Wt = "__header__", At = "__footer__", Ue = (t, e) => ({
|
|
2033
|
+
id: t,
|
|
2034
|
+
nodes: e
|
|
2035
|
+
}), ml = (t, e) => t.find((n) => n.widgetId === e) ?? t[0], fl = (t) => ml(t.areas.overlay.widgets, t.areas.overlay.activeWidgetId)?.resource ?? xt(t, "primary"), io = (t) => {
|
|
2036
|
+
const e = C(128), {
|
|
2037
|
+
workbench: n,
|
|
2038
|
+
treeViewId: o,
|
|
2039
|
+
activeNodeId: r,
|
|
2040
|
+
resource: i,
|
|
2041
|
+
viewId: s,
|
|
2042
|
+
renderParamField: c,
|
|
2043
|
+
onOpenResourceError: d
|
|
2044
|
+
} = t, l = me(null);
|
|
2045
|
+
let u;
|
|
2046
|
+
e[0] !== o || e[1] !== n.renderers ? (u = n.renderers.getTreeRenderer(o), e[0] = o, e[1] = n.renderers, e[2] = u) : u = e[2];
|
|
2047
|
+
const m = u, f = $(n.renderers.treeStore, (B) => B.statesByTreeId[o]) ?? ul, h = $(n.layout.store, hl);
|
|
2048
|
+
let b;
|
|
2049
|
+
e[3] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (b = [], e[3] = b) : b = e[3];
|
|
2050
|
+
const [g, p] = U(b);
|
|
2051
|
+
let v;
|
|
2052
|
+
e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = [], e[4] = v) : v = e[4];
|
|
2053
|
+
const [y, S] = U(v);
|
|
2054
|
+
let w;
|
|
2055
|
+
e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (w = [], e[5] = w) : w = e[5];
|
|
2056
|
+
const [P, x] = U(w);
|
|
2057
|
+
let k;
|
|
2058
|
+
e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (k = {}, e[6] = k) : k = e[6];
|
|
2059
|
+
const [I, A] = U(k), [H, M] = U(!0), [T, N] = U(null), _ = me(null);
|
|
2060
|
+
let D;
|
|
2061
|
+
e[7] !== i || e[8] !== o || e[9] !== s || e[10] !== n.renderers ? (D = () => {
|
|
2062
|
+
let B = !1;
|
|
2063
|
+
Zs(n.renderers, o);
|
|
2064
|
+
const Q = () => {
|
|
2065
|
+
Qs(_.current, o) && M(!0), Js(n.renderers, o, {
|
|
2066
|
+
resource: i,
|
|
2067
|
+
viewId: s
|
|
2068
|
+
}).then((Ne) => {
|
|
2069
|
+
if (!B) {
|
|
2070
|
+
if (_.current = o, !Ne) {
|
|
2071
|
+
p([]), S([]), x([]), A({}), M(!1);
|
|
2072
|
+
return;
|
|
2073
|
+
}
|
|
2074
|
+
p(Ne.header), S(Ne.body), x(Ne.footer), A({}), M(!1);
|
|
2075
|
+
}
|
|
2076
|
+
});
|
|
2077
|
+
};
|
|
2078
|
+
Q();
|
|
2079
|
+
const Me = n.renderers.onDidRefresh((Ne) => {
|
|
2080
|
+
Ne.treeId === o && Q();
|
|
2081
|
+
});
|
|
2082
|
+
return () => {
|
|
2083
|
+
B = !0, Me.dispose();
|
|
2084
|
+
};
|
|
2085
|
+
}, e[7] = i, e[8] = o, e[9] = s, e[10] = n.renderers, e[11] = D) : D = e[11];
|
|
2086
|
+
let O;
|
|
2087
|
+
e[12] !== i || e[13] !== o || e[14] !== s || e[15] !== n ? (O = [i, s, n, o], e[12] = i, e[13] = o, e[14] = s, e[15] = n, e[16] = O) : O = e[16], re(D, O);
|
|
2088
|
+
let z, R, K;
|
|
2089
|
+
if (e[17] !== y || e[18] !== I || e[19] !== P || e[20] !== g || e[21] !== d || e[22] !== n) {
|
|
2090
|
+
const B = {
|
|
2091
|
+
workbench: n,
|
|
2092
|
+
onCommandError: d,
|
|
2093
|
+
onRequestParams: N
|
|
2094
|
+
};
|
|
2095
|
+
R = y.map((Q) => Rt(Q, I, B)), z = g.length > 0 ? Rt(Ue(Wt, g), I, B) : void 0, K = P.length > 0 ? Rt(Ue(At, P), I, B) : void 0, e[17] = y, e[18] = I, e[19] = P, e[20] = g, e[21] = d, e[22] = n, e[23] = z, e[24] = R, e[25] = K;
|
|
2096
|
+
} else
|
|
2097
|
+
z = e[23], R = e[24], K = e[25];
|
|
2098
|
+
const G = K;
|
|
2099
|
+
let V;
|
|
2100
|
+
e[26] !== z?.nodes ? (V = z?.nodes ?? [], e[26] = z?.nodes, e[27] = V) : V = e[27];
|
|
2101
|
+
let X;
|
|
2102
|
+
e[28] !== G?.nodes ? (X = G?.nodes ?? [], e[28] = G?.nodes, e[29] = X) : X = e[29];
|
|
2103
|
+
let q;
|
|
2104
|
+
e[30] !== R || e[31] !== V || e[32] !== X ? (q = {
|
|
2105
|
+
headerNodes: V,
|
|
2106
|
+
sections: R,
|
|
2107
|
+
footerNodes: X
|
|
2108
|
+
}, e[30] = R, e[31] = V, e[32] = X, e[33] = q) : q = e[33];
|
|
2109
|
+
let J;
|
|
2110
|
+
e[34] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (J = {
|
|
2111
|
+
visibleIcon: /* @__PURE__ */ a(L, { name: "eye", size: 14 }),
|
|
2112
|
+
hiddenIcon: /* @__PURE__ */ a(L, { name: "eye-off", size: 14 }),
|
|
2113
|
+
resetIcon: /* @__PURE__ */ a(L, { name: "rotate-ccw", size: 14 })
|
|
2114
|
+
}, e[34] = J) : J = e[34];
|
|
2115
|
+
const {
|
|
2116
|
+
visibleHeaderNodes: ce,
|
|
2117
|
+
visibleSections: fe,
|
|
2118
|
+
visibleFooterNodes: ee,
|
|
2119
|
+
backgroundContextActions: ie
|
|
2120
|
+
} = il(o, q, J);
|
|
2121
|
+
if (!m) {
|
|
2122
|
+
let B;
|
|
2123
|
+
return e[35] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (B = /* @__PURE__ */ a(oe, { textStyle: "paragraph/S/regular", color: "fg.muted", p: "sm", children: "Tree renderer is no longer registered." }), e[35] = B) : B = e[35], B;
|
|
2124
|
+
}
|
|
2125
|
+
let he;
|
|
2126
|
+
e[36] !== y || e[37] !== I || e[38] !== P || e[39] !== g || e[40] !== i || e[41] !== f.expandedNodeIds || e[42] !== o || e[43] !== s || e[44] !== n.renderers ? (he = (B) => {
|
|
2127
|
+
const Q = sn(y, B, I) ?? sn([Ue(Wt, g), Ue(At, P)], B, I);
|
|
2128
|
+
if (!Q)
|
|
2129
|
+
return;
|
|
2130
|
+
const Me = f.expandedNodeIds.includes(B);
|
|
2131
|
+
n.renderers.setNodeExpanded(o, B, !Me), !(Me || I[B]) && (Q.children || n.renderers.getChildren(o, Q, {
|
|
2132
|
+
resource: i,
|
|
2133
|
+
viewId: s
|
|
2134
|
+
}).then((Ne) => {
|
|
2135
|
+
A((po) => ({
|
|
2136
|
+
...po,
|
|
2137
|
+
[B]: Ne
|
|
2138
|
+
}));
|
|
2139
|
+
}));
|
|
2140
|
+
}, e[36] = y, e[37] = I, e[38] = P, e[39] = g, e[40] = i, e[41] = f.expandedNodeIds, e[42] = o, e[43] = s, e[44] = n.renderers, e[45] = he) : he = e[45];
|
|
2141
|
+
const Y = he;
|
|
2142
|
+
let te;
|
|
2143
|
+
e[46] !== f.expandedSectionIds || e[47] !== o || e[48] !== n.renderers ? (te = (B) => {
|
|
2144
|
+
const Q = f.expandedSectionIds.includes(B);
|
|
2145
|
+
n.renderers.setSectionExpanded(o, B, !Q);
|
|
2146
|
+
}, e[46] = f.expandedSectionIds, e[47] = o, e[48] = n.renderers, e[49] = te) : te = e[49];
|
|
2147
|
+
const se = te;
|
|
2148
|
+
let ve;
|
|
2149
|
+
e[50] !== d || e[51] !== o || e[52] !== n.renderers || e[53] !== n.resources ? (ve = (B, Q) => {
|
|
2150
|
+
n.renderers.setSelectedNode(o, B), n.resources.openResource(Q, {
|
|
2151
|
+
replaceActive: !0
|
|
2152
|
+
}).catch(d);
|
|
2153
|
+
}, e[50] = d, e[51] = o, e[52] = n.renderers, e[53] = n.resources, e[54] = ve) : ve = e[54];
|
|
2154
|
+
const xe = ve;
|
|
2155
|
+
let Se;
|
|
2156
|
+
e[55] !== d || e[56] !== o || e[57] !== n.navigation || e[58] !== n.renderers ? (Se = (B, Q) => {
|
|
2157
|
+
el(Q) && n.renderers.setSelectedNode(o, B), n.navigation.openTarget(Q).catch(d);
|
|
2158
|
+
}, e[55] = d, e[56] = o, e[57] = n.navigation, e[58] = n.renderers, e[59] = Se) : Se = e[59];
|
|
2159
|
+
const ke = Se;
|
|
2160
|
+
let be;
|
|
2161
|
+
e[60] !== xe || e[61] !== ke ? (be = (B, Q) => {
|
|
2162
|
+
if (Q?.id === "target") {
|
|
2163
|
+
ke(B, Q.payload);
|
|
2164
|
+
return;
|
|
2165
|
+
}
|
|
2166
|
+
if (Q?.id !== "resource")
|
|
2167
|
+
return;
|
|
2168
|
+
const Me = Q.payload;
|
|
2169
|
+
!Me || typeof Me != "object" || xe(B, Me);
|
|
2170
|
+
}, e[60] = xe, e[61] = ke, e[62] = be) : be = e[62];
|
|
2171
|
+
const ne = be;
|
|
2172
|
+
let ge;
|
|
2173
|
+
e[63] !== z || e[64] !== ce ? (ge = z && ce.length > 0 ? [{
|
|
2174
|
+
...z,
|
|
2175
|
+
nodes: ce
|
|
2176
|
+
}] : [], e[63] = z, e[64] = ce, e[65] = ge) : ge = e[65];
|
|
2177
|
+
const de = ge;
|
|
2178
|
+
let Te;
|
|
2179
|
+
e[66] !== G || e[67] !== ee ? (Te = G && ee.length > 0 ? [{
|
|
2180
|
+
...G,
|
|
2181
|
+
nodes: ee
|
|
2182
|
+
}] : [], e[66] = G, e[67] = ee, e[68] = Te) : Te = e[68];
|
|
2183
|
+
const We = Te;
|
|
2184
|
+
let Ae;
|
|
2185
|
+
e[69] !== r || e[70] !== h || e[71] !== y || e[72] !== I || e[73] !== f.selectedNodeId ? (Ae = rn({
|
|
2186
|
+
sections: y,
|
|
2187
|
+
childrenByNodeId: I,
|
|
2188
|
+
activeNodeId: r,
|
|
2189
|
+
activeResource: h,
|
|
2190
|
+
selectedNodeId: f.selectedNodeId
|
|
2191
|
+
}), e[69] = r, e[70] = h, e[71] = y, e[72] = I, e[73] = f.selectedNodeId, e[74] = Ae) : Ae = e[74];
|
|
2192
|
+
const Pe = Ae;
|
|
2193
|
+
let Ee;
|
|
2194
|
+
e[75] !== r || e[76] !== h || e[77] !== I || e[78] !== P || e[79] !== g || e[80] !== f.selectedNodeId ? (Ee = rn({
|
|
2195
|
+
sections: [Ue(Wt, g), Ue(At, P)],
|
|
2196
|
+
childrenByNodeId: I,
|
|
2197
|
+
activeNodeId: r,
|
|
2198
|
+
activeResource: h,
|
|
2199
|
+
selectedNodeId: f.selectedNodeId
|
|
2200
|
+
}), e[75] = r, e[76] = h, e[77] = I, e[78] = P, e[79] = g, e[80] = f.selectedNodeId, e[81] = Ee) : Ee = e[81];
|
|
2201
|
+
const we = Ee;
|
|
2202
|
+
let E;
|
|
2203
|
+
e[82] !== de || e[83] !== H || e[84] !== ne || e[85] !== we || e[86] !== Y || e[87] !== se || e[88] !== f.expandedNodeIds || e[89] !== f.expandedSectionIds ? (E = !H && de.length > 0 ? /* @__PURE__ */ a(le, { bg: F.sideBar, flexShrink: 0, children: /* @__PURE__ */ a($t, { sections: de, expandedNodeIds: f.expandedNodeIds, expandedSectionIds: f.expandedSectionIds, activeNodeId: we, rowVariant: "compact", nodeGap: "1px", onToggleSection: se, onToggleNode: Y, onNavigate: (B) => ne(B.nodeId, B.intent) }) }) : null, e[82] = de, e[83] = H, e[84] = ne, e[85] = we, e[86] = Y, e[87] = se, e[88] = f.expandedNodeIds, e[89] = f.expandedSectionIds, e[90] = E) : E = e[90];
|
|
2204
|
+
let Z, $e;
|
|
2205
|
+
e[91] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (Z = {
|
|
2206
|
+
display: "block",
|
|
2207
|
+
style: {
|
|
2208
|
+
overflowX: "hidden"
|
|
2209
|
+
}
|
|
2210
|
+
}, $e = {
|
|
2211
|
+
style: {
|
|
2212
|
+
minWidth: "100%",
|
|
2213
|
+
width: "100%",
|
|
2214
|
+
minHeight: "100%",
|
|
2215
|
+
display: "flex",
|
|
2216
|
+
flexDirection: "column"
|
|
2217
|
+
}
|
|
2218
|
+
}, e[91] = Z, e[92] = $e) : (Z = e[91], $e = e[92]);
|
|
2219
|
+
let Ie;
|
|
2220
|
+
e[93] !== ne ? (Ie = (B) => ne(B.nodeId, B.intent), e[93] = ne, e[94] = Ie) : Ie = e[94];
|
|
2221
|
+
let _e;
|
|
2222
|
+
e[95] !== ie || e[96] !== Pe || e[97] !== H || e[98] !== Ie || e[99] !== Y || e[100] !== se || e[101] !== f.expandedNodeIds || e[102] !== f.expandedSectionIds || e[103] !== f.loading || e[104] !== fe ? (_e = /* @__PURE__ */ a(ze, { flex: "1", minH: "0", w: "full", viewportRef: l, viewportProps: Z, contentProps: $e, children: /* @__PURE__ */ a(j, { w: "full", minW: "0", flex: "1 0 auto", display: "flex", flexDirection: "column", children: /* @__PURE__ */ a(Gs, { loading: H, moduleLoading: f.loading, sections: fe, backgroundContextActions: ie, activeNodeId: Pe, expandedNodeIds: f.expandedNodeIds, expandedSectionIds: f.expandedSectionIds, scrollRef: l, onToggleSection: se, onToggleNode: Y, onNavigate: Ie }) }) }), e[95] = ie, e[96] = Pe, e[97] = H, e[98] = Ie, e[99] = Y, e[100] = se, e[101] = f.expandedNodeIds, e[102] = f.expandedSectionIds, e[103] = f.loading, e[104] = fe, e[105] = _e) : _e = e[105];
|
|
2223
|
+
let He;
|
|
2224
|
+
e[106] !== We || e[107] !== H || e[108] !== ne || e[109] !== we || e[110] !== Y || e[111] !== se || e[112] !== f.expandedNodeIds || e[113] !== f.expandedSectionIds ? (He = !H && We.length > 0 ? /* @__PURE__ */ a(le, { bg: F.sideBar, flexShrink: 0, children: /* @__PURE__ */ a($t, { sections: We, expandedNodeIds: f.expandedNodeIds, expandedSectionIds: f.expandedSectionIds, activeNodeId: we, rowVariant: "compact", nodeGap: "1px", onToggleSection: se, onToggleNode: Y, onNavigate: (B) => ne(B.nodeId, B.intent) }) }) : null, e[106] = We, e[107] = H, e[108] = ne, e[109] = we, e[110] = Y, e[111] = se, e[112] = f.expandedNodeIds, e[113] = f.expandedSectionIds, e[114] = He) : He = e[114];
|
|
2225
|
+
const kt = T?.request ?? null;
|
|
2226
|
+
let ut;
|
|
2227
|
+
e[115] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (ut = () => N(null), e[115] = ut) : ut = e[115];
|
|
2228
|
+
let Ke;
|
|
2229
|
+
e[116] !== T ? (Ke = async (B) => {
|
|
2230
|
+
const {
|
|
2231
|
+
args: Q
|
|
2232
|
+
} = B;
|
|
2233
|
+
await T?.run(Q);
|
|
2234
|
+
}, e[116] = T, e[117] = Ke) : Ke = e[117];
|
|
2235
|
+
let je;
|
|
2236
|
+
e[118] !== c || e[119] !== kt || e[120] !== Ke ? (je = /* @__PURE__ */ a(qn, { request: kt, renderParamField: c, onClose: ut, onRun: Ke }), e[118] = c, e[119] = kt, e[120] = Ke, e[121] = je) : je = e[121];
|
|
2237
|
+
let mt;
|
|
2238
|
+
return e[122] !== E || e[123] !== _e || e[124] !== He || e[125] !== je || e[126] !== m.title ? (mt = /* @__PURE__ */ W(le, { as: "section", direction: "column", h: "full", minH: "0", minW: "0", "aria-label": m.title, children: [
|
|
2239
|
+
E,
|
|
2240
|
+
_e,
|
|
2241
|
+
He,
|
|
2242
|
+
je
|
|
2243
|
+
] }), e[122] = E, e[123] = _e, e[124] = He, e[125] = je, e[126] = m.title, e[127] = mt) : mt = e[127], mt;
|
|
2244
|
+
};
|
|
2245
|
+
function hl(t) {
|
|
2246
|
+
return fl(t.layout);
|
|
2247
|
+
}
|
|
2248
|
+
const bl = (t) => t ? `calc(${t} + 0.75rem)` : "3", gl = (t) => t ? `calc(${t} + 1.5rem)` : "6", pl = () => {
|
|
2249
|
+
const t = C(1);
|
|
2250
|
+
let e;
|
|
2251
|
+
return t[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (e = /* @__PURE__ */ a(j, { flex: "1", minW: "0", children: /* @__PURE__ */ a(oe, { textStyle: "label/S/medium", color: "fg", truncate: !0, children: "Session" }) }), t[0] = e) : e = t[0], e;
|
|
2252
|
+
}, so = (t) => {
|
|
2253
|
+
const e = C(2), {
|
|
2254
|
+
header: n
|
|
2255
|
+
} = t;
|
|
2256
|
+
let o;
|
|
2257
|
+
return e[0] !== n ? (o = n ?? /* @__PURE__ */ a(pl, {}), e[0] = n, e[1] = o) : o = e[1], o;
|
|
2258
|
+
}, yl = (t) => {
|
|
2259
|
+
const e = C(15), {
|
|
2260
|
+
workbench: n,
|
|
2261
|
+
contentSlotRef: o,
|
|
2262
|
+
header: r
|
|
2263
|
+
} = t;
|
|
2264
|
+
let i;
|
|
2265
|
+
e[0] !== r ? (i = /* @__PURE__ */ a(so, { header: r }), e[0] = r, e[1] = i) : i = e[1];
|
|
2266
|
+
let s;
|
|
2267
|
+
e[2] !== n.sessionPanel ? (s = () => n.sessionPanel.setMode("bubble"), e[2] = n.sessionPanel, e[3] = s) : s = e[3];
|
|
2268
|
+
let c;
|
|
2269
|
+
e[4] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (c = /* @__PURE__ */ a(nr, { size: 16 }), e[4] = c) : c = e[4];
|
|
2270
|
+
let d;
|
|
2271
|
+
e[5] !== s ? (d = /* @__PURE__ */ a(Qe, { content: "Detach panel", children: /* @__PURE__ */ a(Ye, { size: "xs", variant: "ghost", "aria-label": "Detach panel", onClick: s, children: c }) }), e[5] = s, e[6] = d) : d = e[6];
|
|
2272
|
+
let l;
|
|
2273
|
+
e[7] !== i || e[8] !== d ? (l = /* @__PURE__ */ W(Ve, { variant: "main", flexShrink: 0, gap: "sm", children: [
|
|
2274
|
+
i,
|
|
2275
|
+
d
|
|
2276
|
+
] }), e[7] = i, e[8] = d, e[9] = l) : l = e[9];
|
|
2277
|
+
let u;
|
|
2278
|
+
e[10] !== o ? (u = /* @__PURE__ */ a(le, { ref: o, flex: "1", minH: 0, direction: "column" }), e[10] = o, e[11] = u) : u = e[11];
|
|
2279
|
+
let m;
|
|
2280
|
+
return e[12] !== l || e[13] !== u ? (m = /* @__PURE__ */ a(No, { "data-testid": "workbench-session-attached-panel", width: "full", minWidth: "0", bg: F.widget, header: l, children: u }), e[12] = l, e[13] = u, e[14] = m) : m = e[14], m;
|
|
2281
|
+
}, vl = (t) => {
|
|
2282
|
+
const e = C(27), {
|
|
2283
|
+
workbench: n,
|
|
2284
|
+
contentSlotRef: o,
|
|
2285
|
+
bottomOffset: r,
|
|
2286
|
+
header: i
|
|
2287
|
+
} = t, s = n.sessionPanel.getMode();
|
|
2288
|
+
if (s === "attached")
|
|
2289
|
+
return null;
|
|
2290
|
+
if (s === "closed") {
|
|
2291
|
+
let b;
|
|
2292
|
+
e[0] !== r ? (b = gl(r), e[0] = r, e[1] = b) : b = e[1];
|
|
2293
|
+
let g;
|
|
2294
|
+
e[2] !== b ? (g = {
|
|
2295
|
+
bottom: b
|
|
2296
|
+
}, e[2] = b, e[3] = g) : g = e[3];
|
|
2297
|
+
let p;
|
|
2298
|
+
e[4] !== n.sessionPanel ? (p = () => n.sessionPanel.setMode("bubble"), e[4] = n.sessionPanel, e[5] = p) : p = e[5];
|
|
2299
|
+
let v;
|
|
2300
|
+
e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (v = /* @__PURE__ */ a(or, { size: 20, strokeWidth: 2 }), e[6] = v) : v = e[6];
|
|
2301
|
+
let y;
|
|
2302
|
+
return e[7] !== g || e[8] !== p ? (y = /* @__PURE__ */ a(Bo, { "aria-label": "Open session panel", containerProps: g, tooltip: "Open session panel", onClick: p, children: v }), e[7] = g, e[8] = p, e[9] = y) : y = e[9], y;
|
|
2303
|
+
}
|
|
2304
|
+
let c;
|
|
2305
|
+
e[10] !== r ? (c = bl(r), e[10] = r, e[11] = c) : c = e[11];
|
|
2306
|
+
let d;
|
|
2307
|
+
e[12] !== c ? (d = {
|
|
2308
|
+
bottom: c,
|
|
2309
|
+
bg: F.widget
|
|
2310
|
+
}, e[12] = c, e[13] = d) : d = e[13];
|
|
2311
|
+
let l, u;
|
|
2312
|
+
e[14] !== n.sessionPanel ? (l = () => n.sessionPanel.setMode("closed"), u = () => n.sessionPanel.setMode("attached"), e[14] = n.sessionPanel, e[15] = l, e[16] = u) : (l = e[15], u = e[16]);
|
|
2313
|
+
let m;
|
|
2314
|
+
e[17] !== i ? (m = /* @__PURE__ */ a(so, { header: i }), e[17] = i, e[18] = m) : m = e[18];
|
|
2315
|
+
let f;
|
|
2316
|
+
e[19] !== o ? (f = /* @__PURE__ */ a(le, { ref: o, flex: "1", minH: 0, direction: "column" }), e[19] = o, e[20] = f) : f = e[20];
|
|
2317
|
+
let h;
|
|
2318
|
+
return e[21] !== d || e[22] !== l || e[23] !== u || e[24] !== m || e[25] !== f ? (h = /* @__PURE__ */ a(Oo, { isOpen: !0, "aria-label": "Session", testId: "workbench-session-bubble", closeLabel: "Minimize panel", containerProps: d, popOutLabel: "Attach panel", onClose: l, onPopOut: u, menu: m, children: f }), e[21] = d, e[22] = l, e[23] = u, e[24] = m, e[25] = f, e[26] = h) : h = e[26], h;
|
|
2319
|
+
}, lo = (t) => {
|
|
2320
|
+
const e = C(4);
|
|
2321
|
+
let n, o, r;
|
|
2322
|
+
return e[0] !== t.store ? (n = (i) => t.store.subscribe(() => i()), o = () => t.store.getState().revision, r = () => t.store.getState().revision, e[0] = t.store, e[1] = n, e[2] = o, e[3] = r) : (n = e[1], o = e[2], r = e[3]), Bn(n, o, r);
|
|
2323
|
+
}, vt = (t) => {
|
|
2324
|
+
const e = C(2);
|
|
2325
|
+
let n;
|
|
2326
|
+
return e[0] !== t.children ? (n = /* @__PURE__ */ a(le, { h: "full", minH: "0", align: "center", justify: "center", p: "lg", children: t.children }), e[0] = t.children, e[1] = n) : n = e[1], n;
|
|
2327
|
+
}, ao = (t) => {
|
|
2328
|
+
const e = C(3);
|
|
2329
|
+
let n;
|
|
2330
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (n = {
|
|
2331
|
+
h: "full",
|
|
2332
|
+
minH: "full"
|
|
2333
|
+
}, e[0] = n) : n = e[0];
|
|
2334
|
+
let o;
|
|
2335
|
+
return e[1] !== t.children ? (o = /* @__PURE__ */ a(ze, { h: "full", minH: "0", contentProps: n, children: /* @__PURE__ */ a(j, { h: "full", minH: "full", children: t.children }) }), e[1] = t.children, e[2] = o) : o = e[2], o;
|
|
2336
|
+
}, Sl = (t) => {
|
|
2337
|
+
const e = C(13), {
|
|
2338
|
+
panel: n,
|
|
2339
|
+
itemId: o,
|
|
2340
|
+
input: r
|
|
2341
|
+
} = t;
|
|
2342
|
+
let i;
|
|
2343
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = {
|
|
2344
|
+
status: "loading"
|
|
2345
|
+
}, e[0] = i) : i = e[0];
|
|
2346
|
+
const [s, c] = U(i);
|
|
2347
|
+
let d, l;
|
|
2348
|
+
if (e[1] !== o || e[2] !== n ? (d = () => {
|
|
2349
|
+
let h = !0;
|
|
2350
|
+
return c({
|
|
2351
|
+
status: "loading"
|
|
2352
|
+
}), Promise.resolve(n.items()).then((b) => {
|
|
2353
|
+
if (!h)
|
|
2354
|
+
return;
|
|
2355
|
+
const g = b.find((p) => n.itemId(p) === o);
|
|
2356
|
+
c(g === void 0 ? {
|
|
2357
|
+
status: "missing"
|
|
2358
|
+
} : {
|
|
2359
|
+
status: "ready",
|
|
2360
|
+
item: g
|
|
2361
|
+
});
|
|
2362
|
+
}), () => {
|
|
2363
|
+
h = !1;
|
|
2364
|
+
};
|
|
2365
|
+
}, l = [n, o], e[1] = o, e[2] = n, e[3] = d, e[4] = l) : (d = e[3], l = e[4]), re(d, l), s.status === "loading") {
|
|
2366
|
+
let h;
|
|
2367
|
+
return e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ a(vt, { children: /* @__PURE__ */ a(Co, { size: "sm" }) }), e[5] = h) : h = e[5], h;
|
|
2368
|
+
}
|
|
2369
|
+
if (s.status === "missing") {
|
|
2370
|
+
let h;
|
|
2371
|
+
return e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (h = /* @__PURE__ */ a(vt, { children: /* @__PURE__ */ a(gt, { title: "Item not found" }) }), e[6] = h) : h = e[6], h;
|
|
2372
|
+
}
|
|
2373
|
+
let u;
|
|
2374
|
+
e[7] !== r || e[8] !== n || e[9] !== s.item ? (u = n.renderItem(s.item, r), e[7] = r, e[8] = n, e[9] = s.item, e[10] = u) : u = e[10];
|
|
2375
|
+
const m = u;
|
|
2376
|
+
let f;
|
|
2377
|
+
return e[11] !== m ? (f = /* @__PURE__ */ a(ao, { children: m }), e[11] = m, e[12] = f) : f = e[12], f;
|
|
2378
|
+
}, co = (t) => {
|
|
2379
|
+
const e = C(31), {
|
|
2380
|
+
input: n,
|
|
2381
|
+
settings: o,
|
|
2382
|
+
resolveScopeId: r
|
|
2383
|
+
} = t, i = lo(o), s = n.placement.resource, c = typeof s?.metadata?.panelId == "string" ? s.metadata.panelId : void 0, d = typeof s?.metadata?.itemId == "string" ? s.metadata.itemId : void 0;
|
|
2384
|
+
let l, u;
|
|
2385
|
+
if (e[0] !== n || e[1] !== c || e[2] !== o) {
|
|
2386
|
+
u = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
|
|
2387
|
+
e: {
|
|
2388
|
+
if (l = c ? o.getPanel(c) : void 0, !l) {
|
|
2389
|
+
let y;
|
|
2390
|
+
e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (y = /* @__PURE__ */ a(vt, { children: /* @__PURE__ */ a(gt, { title: "Select a settings entry", description: "Pick an item from the settings sidebar." }) }), e[5] = y) : y = e[5], u = y;
|
|
2391
|
+
break e;
|
|
2392
|
+
}
|
|
2393
|
+
if (l.kind === "custom") {
|
|
2394
|
+
const y = l.render(n);
|
|
2395
|
+
let S;
|
|
2396
|
+
e[6] !== y ? (S = /* @__PURE__ */ a(ao, { children: y }), e[6] = y, e[7] = S) : S = e[7], u = S;
|
|
2397
|
+
break e;
|
|
2398
|
+
}
|
|
2399
|
+
}
|
|
2400
|
+
e[0] = n, e[1] = c, e[2] = o, e[3] = l, e[4] = u;
|
|
2401
|
+
} else
|
|
2402
|
+
l = e[3], u = e[4];
|
|
2403
|
+
if (u !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
|
|
2404
|
+
return u;
|
|
2405
|
+
if (l.kind === "collection") {
|
|
2406
|
+
if (!d) {
|
|
2407
|
+
let w;
|
|
2408
|
+
return e[8] !== l.title ? (w = /* @__PURE__ */ a(vt, { children: /* @__PURE__ */ a(gt, { title: l.title }) }), e[8] = l.title, e[9] = w) : w = e[9], w;
|
|
2409
|
+
}
|
|
2410
|
+
const y = `${s?.uri ?? d}:${i}`;
|
|
2411
|
+
let S;
|
|
2412
|
+
return e[10] !== n || e[11] !== d || e[12] !== l || e[13] !== y ? (S = /* @__PURE__ */ a(Sl, { panel: l, itemId: d, input: n }, y), e[10] = n, e[11] = d, e[12] = l, e[13] = y, e[14] = S) : S = e[14], S;
|
|
2413
|
+
}
|
|
2414
|
+
let m;
|
|
2415
|
+
e[15] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (m = {
|
|
2416
|
+
p: "lg",
|
|
2417
|
+
display: "flex",
|
|
2418
|
+
flexDirection: "column",
|
|
2419
|
+
gap: "md"
|
|
2420
|
+
}, e[15] = m) : m = e[15];
|
|
2421
|
+
let f;
|
|
2422
|
+
e[16] !== l.title ? (f = /* @__PURE__ */ a(oe, { textStyle: "heading/M/semibold", children: l.title }), e[16] = l.title, e[17] = f) : f = e[17];
|
|
2423
|
+
let h;
|
|
2424
|
+
e[18] !== l.description ? (h = l.description && /* @__PURE__ */ a(oe, { textStyle: "paragraph/S/regular", color: "fg.muted", maxW: "640px", children: l.description }), e[18] = l.description, e[19] = h) : h = e[19];
|
|
2425
|
+
let b;
|
|
2426
|
+
e[20] !== f || e[21] !== h ? (b = /* @__PURE__ */ W(ae, { gap: "xs", children: [
|
|
2427
|
+
f,
|
|
2428
|
+
h
|
|
2429
|
+
] }), e[20] = f, e[21] = h, e[22] = b) : b = e[22];
|
|
2430
|
+
const g = l.save ?? "live";
|
|
2431
|
+
let p;
|
|
2432
|
+
e[23] !== n.workbench.preferences || e[24] !== l.preferences || e[25] !== r || e[26] !== g ? (p = /* @__PURE__ */ a(xs, { preferences: n.workbench.preferences, names: l.preferences, resolveScopeId: r, mode: g }), e[23] = n.workbench.preferences, e[24] = l.preferences, e[25] = r, e[26] = g, e[27] = p) : p = e[27];
|
|
2433
|
+
let v;
|
|
2434
|
+
return e[28] !== b || e[29] !== p ? (v = /* @__PURE__ */ W(ze, { h: "full", minH: "0", contentProps: m, children: [
|
|
2435
|
+
b,
|
|
2436
|
+
p
|
|
2437
|
+
] }), e[28] = b, e[29] = p, e[30] = v) : v = e[30], v;
|
|
2438
|
+
}, wl = (t) => {
|
|
2439
|
+
const e = C(12), {
|
|
2440
|
+
input: n,
|
|
2441
|
+
settings: o,
|
|
2442
|
+
navTreeId: r,
|
|
2443
|
+
resolveScopeId: i
|
|
2444
|
+
} = t;
|
|
2445
|
+
lo(o);
|
|
2446
|
+
const s = n.placement.resource, c = s?.uri;
|
|
2447
|
+
let d;
|
|
2448
|
+
e[0] !== n.workbench || e[1] !== r || e[2] !== s || e[3] !== c ? (d = /* @__PURE__ */ a(j, { h: "full", minH: "0", minW: "0", w: "full", bg: "bg.subtle", children: /* @__PURE__ */ a(io, { workbench: n.workbench, treeViewId: r, resource: s, activeNodeId: c }) }), e[0] = n.workbench, e[1] = r, e[2] = s, e[3] = c, e[4] = d) : d = e[4];
|
|
2449
|
+
const l = d;
|
|
2450
|
+
let u;
|
|
2451
|
+
e[5] !== n || e[6] !== i || e[7] !== o ? (u = /* @__PURE__ */ a(j, { flex: "1", h: "full", minH: "0", minW: "0", children: /* @__PURE__ */ a(co, { input: n, settings: o, resolveScopeId: i }) }), e[5] = n, e[6] = i, e[7] = o, e[8] = u) : u = e[8];
|
|
2452
|
+
const m = u;
|
|
2453
|
+
let f;
|
|
2454
|
+
return e[9] !== m || e[10] !== l ? (f = /* @__PURE__ */ a(rt, { position: "absolute", inset: "0", minH: "0", minW: "0", resizableSide: "left", resizablePanel: l, contentPanel: m, defaultSizePx: 260, minSizePx: 220, maxSizePx: 420, contentMinSizePx: 360, collapsible: !1, resizeLabel: "Resize settings navigation", showResizeSeparator: !0 }), e[9] = m, e[10] = l, e[11] = f) : f = e[11], f;
|
|
2455
|
+
}, Xe = "workbench-settings", uo = (t) => ({
|
|
2456
|
+
kind: Xe,
|
|
2457
|
+
uri: `${Xe}://panel/${t.id}`,
|
|
2458
|
+
id: t.id,
|
|
2459
|
+
label: t.title,
|
|
2460
|
+
icon: t.icon,
|
|
2461
|
+
metadata: {
|
|
2462
|
+
panelId: t.id
|
|
2463
|
+
}
|
|
2464
|
+
}), xl = (t, e) => ({
|
|
2465
|
+
kind: Xe,
|
|
2466
|
+
uri: `${Xe}://item/${t}/${e.id}`,
|
|
2467
|
+
id: `${t}::${e.id}`,
|
|
2468
|
+
label: e.label,
|
|
2469
|
+
icon: e.icon,
|
|
2470
|
+
metadata: {
|
|
2471
|
+
panelId: t,
|
|
2472
|
+
itemId: e.id
|
|
2473
|
+
}
|
|
2474
|
+
}), mo = (t, e) => (t ?? "project") !== "project" || e, ot = "settings", fo = (t) => t?.map((e) => ({
|
|
2475
|
+
id: e.id,
|
|
2476
|
+
label: e.label,
|
|
2477
|
+
icon: e.icon,
|
|
2478
|
+
run: e.run
|
|
2479
|
+
})), an = (t, e) => {
|
|
2480
|
+
const n = t.itemId(e), o = t.itemLabel(e), r = t.itemIcon?.(e), i = xl(t.id, {
|
|
2481
|
+
id: n,
|
|
2482
|
+
label: o,
|
|
2483
|
+
icon: r
|
|
2484
|
+
});
|
|
2485
|
+
return {
|
|
2486
|
+
id: i.uri,
|
|
2487
|
+
label: o,
|
|
2488
|
+
icon: r,
|
|
2489
|
+
resource: i
|
|
2490
|
+
};
|
|
2491
|
+
}, Pl = (t, e) => {
|
|
2492
|
+
const n = (o) => {
|
|
2493
|
+
const r = e?.indexOf(o) ?? -1;
|
|
2494
|
+
return r === -1 ? Number.POSITIVE_INFINITY : r;
|
|
2495
|
+
};
|
|
2496
|
+
return [...t].sort((o, r) => n(o) - n(r));
|
|
2497
|
+
}, Il = async (t) => {
|
|
2498
|
+
const e = await Promise.resolve(t.items()).catch(() => []);
|
|
2499
|
+
if (!t.groupBy) return e.map((r) => an(t, r));
|
|
2500
|
+
const n = t.groupBy, o = /* @__PURE__ */ new Map();
|
|
2501
|
+
for (const r of e) {
|
|
2502
|
+
const i = n.key(r), s = o.get(i) ?? [];
|
|
2503
|
+
s.push(r), o.set(i, s);
|
|
2504
|
+
}
|
|
2505
|
+
return Pl([...o.keys()], n.order).map((r) => ({
|
|
2506
|
+
id: `${t.id}:group:${r}`,
|
|
2507
|
+
label: n.label(r),
|
|
2508
|
+
icon: n.icon?.(r),
|
|
2509
|
+
collapsible: !0,
|
|
2510
|
+
children: (o.get(r) ?? []).map((i) => an(t, i))
|
|
2511
|
+
}));
|
|
2512
|
+
}, Cl = async (t) => {
|
|
2513
|
+
if (t.kind === "collection")
|
|
2514
|
+
return {
|
|
2515
|
+
id: `settings-collection:${t.id}`,
|
|
2516
|
+
label: t.title,
|
|
2517
|
+
icon: t.icon,
|
|
2518
|
+
collapsible: !0,
|
|
2519
|
+
actions: fo(t.actions),
|
|
2520
|
+
children: await Il(t)
|
|
2521
|
+
};
|
|
2522
|
+
const e = uo(t);
|
|
2523
|
+
return {
|
|
2524
|
+
id: e.uri,
|
|
2525
|
+
label: t.title,
|
|
2526
|
+
icon: t.icon,
|
|
2527
|
+
resource: e
|
|
2528
|
+
};
|
|
2529
|
+
}, kl = async (t) => {
|
|
2530
|
+
const {
|
|
2531
|
+
settings: e,
|
|
2532
|
+
hasProjectScope: n
|
|
2533
|
+
} = t, o = e.listSections(), r = new Map(o.map((l) => [l.id, l])), i = e.listPanels().filter((l) => mo(l.scope, n)), s = /* @__PURE__ */ new Map();
|
|
2534
|
+
for (const l of i) {
|
|
2535
|
+
const u = l.section && r.has(l.section) ? l.section : ot, m = s.get(u) ?? [];
|
|
2536
|
+
m.push(l), s.set(u, m);
|
|
2537
|
+
}
|
|
2538
|
+
const c = o.map((l) => l.id);
|
|
2539
|
+
s.has(ot) && !r.has(ot) && c.push(ot);
|
|
2540
|
+
const d = [];
|
|
2541
|
+
for (const l of c) {
|
|
2542
|
+
const u = r.get(l);
|
|
2543
|
+
if (u?.scope === "project" && !n) continue;
|
|
2544
|
+
const m = s.get(l) ?? [], f = fo(u?.actions);
|
|
2545
|
+
if (m.length === 0 && !f) continue;
|
|
2546
|
+
const h = [];
|
|
2547
|
+
for (const b of m) h.push(await Cl(b));
|
|
2548
|
+
d.push({
|
|
2549
|
+
id: l,
|
|
2550
|
+
label: u?.title,
|
|
2551
|
+
actions: f,
|
|
2552
|
+
nodes: h
|
|
2553
|
+
});
|
|
2554
|
+
}
|
|
2555
|
+
return d;
|
|
2556
|
+
}, Tl = "workbench.settings", _l = "workbench.settings.nav", Rl = "workbench.settings.panel", Wl = "workbench.settings.open", cn = Tl, dn = "workbench.settings.renderer", un = "workbench.settings.panel.renderer", ht = "workbench.settings.navigation", jc = (t = {}) => {
|
|
2557
|
+
const e = t.title ?? "Settings", n = () => t.resolveScopeId?.("project") !== void 0;
|
|
2558
|
+
return {
|
|
2559
|
+
id: "workbench.settings.surface",
|
|
2560
|
+
activate(o) {
|
|
2561
|
+
return o.renderers.registerTreeRenderer({
|
|
2562
|
+
id: ht,
|
|
2563
|
+
title: e,
|
|
2564
|
+
// Settings sections read as a single scannable list, so every section starts expanded.
|
|
2565
|
+
defaultExpandedSectionIds: [...o.settings.listSections().map((r) => r.id), ot],
|
|
2566
|
+
getBody: () => kl({
|
|
2567
|
+
settings: o.settings,
|
|
2568
|
+
hasProjectScope: n()
|
|
2569
|
+
}),
|
|
2570
|
+
getChildren: () => []
|
|
2571
|
+
}), o.layout.registerWidget({
|
|
2572
|
+
id: _l,
|
|
2573
|
+
title: `${e} navigation`,
|
|
2574
|
+
area: "left",
|
|
2575
|
+
singleton: !0,
|
|
2576
|
+
rendererId: ht
|
|
2577
|
+
}), o.layout.registerWidget({
|
|
2578
|
+
id: Rl,
|
|
2579
|
+
title: e,
|
|
2580
|
+
area: "main",
|
|
2581
|
+
singleton: !0,
|
|
2582
|
+
rendererId: un
|
|
2583
|
+
}), o.renderers.registerRenderer({
|
|
2584
|
+
id: un,
|
|
2585
|
+
render: (r) => /* @__PURE__ */ a(co, { input: r, settings: o.settings, resolveScopeId: t.resolveScopeId })
|
|
2586
|
+
}), o.layout.registerWidget({
|
|
2587
|
+
id: cn,
|
|
2588
|
+
title: e,
|
|
2589
|
+
area: "overlay",
|
|
2590
|
+
singleton: !0,
|
|
2591
|
+
closable: !0,
|
|
2592
|
+
rendererId: dn,
|
|
2593
|
+
config: {
|
|
2594
|
+
size: "xl",
|
|
2595
|
+
scrollBehavior: "inside",
|
|
2596
|
+
contentHeight: "80vh"
|
|
2597
|
+
}
|
|
2598
|
+
}), o.renderers.registerRenderer({
|
|
2599
|
+
id: dn,
|
|
2600
|
+
render: (r) => /* @__PURE__ */ a(wl, { input: r, settings: o.settings, navTreeId: ht, title: e, resolveScopeId: t.resolveScopeId })
|
|
2601
|
+
}), o.resources.registerKind({
|
|
2602
|
+
kind: Xe,
|
|
2603
|
+
label: "Settings",
|
|
2604
|
+
icon: Ut.settings
|
|
2605
|
+
}), o.resources.registerOpener({
|
|
2606
|
+
id: "workbench.settings.opener",
|
|
2607
|
+
canOpen: (r) => r.kind === Xe,
|
|
2608
|
+
open: (r) => o.layout.openWidget(cn, {
|
|
2609
|
+
resource: r,
|
|
2610
|
+
title: r.label
|
|
2611
|
+
})
|
|
2612
|
+
}), o.commands.registerCommand({
|
|
2613
|
+
id: Wl,
|
|
2614
|
+
label: "Open settings",
|
|
2615
|
+
category: "Settings",
|
|
2616
|
+
icon: Ut.settings
|
|
2617
|
+
}, {
|
|
2618
|
+
execute: () => {
|
|
2619
|
+
const r = o.settings.listPanels().find((i) => mo(i.scope, n()));
|
|
2620
|
+
if (r)
|
|
2621
|
+
return o.resources.openResource(uo(r), {
|
|
2622
|
+
replaceActive: !0
|
|
2623
|
+
});
|
|
2624
|
+
}
|
|
2625
|
+
}), {
|
|
2626
|
+
dispose: o.settings.store.subscribe(() => o.renderers.refresh(ht))
|
|
2627
|
+
};
|
|
2628
|
+
}
|
|
2629
|
+
};
|
|
2630
|
+
}, Al = (t) => {
|
|
2631
|
+
const e = t?.metadata?.workspacePath;
|
|
2632
|
+
return typeof e == "string" && e.length > 0 ? e : void 0;
|
|
2633
|
+
}, El = (t, e) => {
|
|
2634
|
+
const n = Al(e);
|
|
2635
|
+
return n && !t.cwd ? {
|
|
2636
|
+
...t,
|
|
2637
|
+
cwd: n
|
|
2638
|
+
} : t;
|
|
2639
|
+
}, $l = (t, e = {}) => ({
|
|
2640
|
+
async openSession(n) {
|
|
2641
|
+
const {
|
|
2642
|
+
sessionId: o
|
|
2643
|
+
} = await t.open({
|
|
2644
|
+
request: El(n, e.getResource?.()),
|
|
2645
|
+
title: e.getTitle?.()
|
|
2646
|
+
});
|
|
2647
|
+
return {
|
|
2648
|
+
id: o,
|
|
2649
|
+
write: (r) => t.write({
|
|
2650
|
+
sessionId: o,
|
|
2651
|
+
data: r
|
|
2652
|
+
}),
|
|
2653
|
+
resize: (r, i) => t.resize({
|
|
2654
|
+
sessionId: o,
|
|
2655
|
+
cols: r,
|
|
2656
|
+
rows: i
|
|
2657
|
+
}),
|
|
2658
|
+
kill: (r) => t.kill({
|
|
2659
|
+
sessionId: o,
|
|
2660
|
+
signal: r
|
|
2661
|
+
}),
|
|
2662
|
+
onData: (r) => t.subscribe(o, {
|
|
2663
|
+
onData: r
|
|
2664
|
+
}),
|
|
2665
|
+
onExit: (r) => t.subscribe(o, {
|
|
2666
|
+
onExit: r
|
|
2667
|
+
}),
|
|
2668
|
+
onError: (r) => t.subscribe(o, {
|
|
2669
|
+
onError: r
|
|
2670
|
+
})
|
|
2671
|
+
};
|
|
2672
|
+
}
|
|
2673
|
+
}), Hl = (t) => {
|
|
2674
|
+
const {
|
|
2675
|
+
placement: e,
|
|
2676
|
+
workbench: n
|
|
2677
|
+
} = t, {
|
|
2678
|
+
themePreference: o
|
|
2679
|
+
} = $n(), r = me(e);
|
|
2680
|
+
r.current = e;
|
|
2681
|
+
const [i] = U(() => $l(n.terminal, {
|
|
2682
|
+
getResource: () => r.current.resource,
|
|
2683
|
+
getTitle: () => r.current.title
|
|
2684
|
+
})), [s, c] = U(), d = $(n.terminal.store, (l) => s ? l.sessionsById[s]?.title : void 0);
|
|
2685
|
+
return re(() => {
|
|
2686
|
+
!s || !d || n.layout.updateWidgetPlacement(e.widgetId, {
|
|
2687
|
+
title: d
|
|
2688
|
+
});
|
|
2689
|
+
}, [s, d, e.widgetId, n.layout]), n.terminal.isAvailable() ? /* @__PURE__ */ a(j, { h: "full", minH: "0", minW: "0", w: "full", children: /* @__PURE__ */ a(sr, { bridge: i, theme: /dark/i.test(o) ? "dark" : "light", onSessionOpen: c }) }) : /* @__PURE__ */ a(zt, { h: "full", px: "md", children: /* @__PURE__ */ a(oe, { textStyle: "paragraph/S/regular", color: "fg.muted", children: "Terminal sessions are not available in this workbench host." }) });
|
|
2690
|
+
}, Ct = "workbench.terminal", mn = "workbench.terminal.open", fn = "workbench.terminal.renderer", hn = "workbench.terminal.launcher.renderer", St = "workbench.terminal.launcher", Ml = (t) => {
|
|
2691
|
+
const e = t.layout.getLayout().areas.secondary.widgets.find((n) => n.contributionId === St);
|
|
2692
|
+
return e || t.layout.openWidget(St, {
|
|
2693
|
+
hiddenByDefault: !0,
|
|
2694
|
+
pinned: !0,
|
|
2695
|
+
title: "Terminal"
|
|
2696
|
+
});
|
|
2697
|
+
}, Nl = /^Terminal (\d+)$/, Bl = (t) => {
|
|
2698
|
+
const e = t.layout.getLayout().areas.secondary.widgets.filter((o) => o.contributionId === Ct).map((o) => Nl.exec(o.title ?? "")?.[1]).filter((o) => o !== void 0).map((o) => Number.parseInt(o, 10));
|
|
2699
|
+
return `Terminal ${Math.max(0, ...e) + 1}`;
|
|
2700
|
+
}, Ol = (t, e = {}) => {
|
|
2701
|
+
Ml(t);
|
|
2702
|
+
const n = t.layout.openWidget(Ct, {
|
|
2703
|
+
...e,
|
|
2704
|
+
title: e.title ?? Bl(t)
|
|
2705
|
+
});
|
|
2706
|
+
return t.layout.setAreaVisible("secondary", !0), t.panels.setOpen("secondary", !0), n;
|
|
2707
|
+
}, qc = () => ({
|
|
2708
|
+
id: "workbench.terminal.surface",
|
|
2709
|
+
activate(t) {
|
|
2710
|
+
return [t.layout.registerWidget({
|
|
2711
|
+
id: Ct,
|
|
2712
|
+
title: "Terminal",
|
|
2713
|
+
area: "secondary",
|
|
2714
|
+
singleton: !1,
|
|
2715
|
+
reuse: "none",
|
|
2716
|
+
closable: !0,
|
|
2717
|
+
mountStrategy: "keep-mounted",
|
|
2718
|
+
rendererId: fn,
|
|
2719
|
+
areaSize: {
|
|
2720
|
+
defaultPx: 240,
|
|
2721
|
+
minPx: 120
|
|
2722
|
+
}
|
|
2723
|
+
}), t.renderers.registerRenderer({
|
|
2724
|
+
id: fn,
|
|
2725
|
+
render: (e) => /* @__PURE__ */ a(Hl, { placement: e.placement, workbench: e.workbench })
|
|
2726
|
+
}), t.renderers.registerRenderer({
|
|
2727
|
+
id: hn,
|
|
2728
|
+
render: () => null
|
|
2729
|
+
}), t.layout.registerWidget({
|
|
2730
|
+
id: St,
|
|
2731
|
+
title: "Terminal",
|
|
2732
|
+
area: "secondary",
|
|
2733
|
+
singleton: !0,
|
|
2734
|
+
closable: !1,
|
|
2735
|
+
hiddenByDefault: !0,
|
|
2736
|
+
rendererId: hn,
|
|
2737
|
+
areaSize: {
|
|
2738
|
+
defaultPx: 240,
|
|
2739
|
+
minPx: 120
|
|
2740
|
+
}
|
|
2741
|
+
}), t.commands.registerCommand({
|
|
2742
|
+
id: mn,
|
|
2743
|
+
label: "Open terminal",
|
|
2744
|
+
category: "Terminal",
|
|
2745
|
+
icon: "SquareTerminal"
|
|
2746
|
+
}, {
|
|
2747
|
+
execute: () => Ol(t)
|
|
2748
|
+
}), t.layout.registerMenuItem(pt("secondary"), {
|
|
2749
|
+
commandId: mn,
|
|
2750
|
+
label: "New terminal",
|
|
2751
|
+
icon: "Plus",
|
|
2752
|
+
order: -100
|
|
2753
|
+
})];
|
|
2754
|
+
}
|
|
2755
|
+
}), zl = (t) => {
|
|
2756
|
+
const e = C(2), n = $(t.themes.store, Dl);
|
|
2757
|
+
let o;
|
|
2758
|
+
return e[0] !== n ? (o = [...zo, ...n], e[0] = n, e[1] = o) : o = e[1], o;
|
|
2759
|
+
};
|
|
2760
|
+
function Dl(t) {
|
|
2761
|
+
return t.themes;
|
|
2762
|
+
}
|
|
2763
|
+
const bn = Mn(!1), Ll = (t) => {
|
|
2764
|
+
const e = C(9), {
|
|
2765
|
+
children: n,
|
|
2766
|
+
initialThemePreference: o,
|
|
2767
|
+
themePreferences: r,
|
|
2768
|
+
fileIconThemePreferences: i
|
|
2769
|
+
} = t;
|
|
2770
|
+
if (Nn(bn))
|
|
2771
|
+
return n;
|
|
2772
|
+
let c;
|
|
2773
|
+
e[0] !== n ? (c = /* @__PURE__ */ a(Do, { value: Lo, children: n }), e[0] = n, e[1] = c) : c = e[1];
|
|
2774
|
+
let d;
|
|
2775
|
+
e[2] !== i || e[3] !== c ? (d = /* @__PURE__ */ a(Vo, { themePreferences: i, children: c }), e[2] = i, e[3] = c, e[4] = d) : d = e[4];
|
|
2776
|
+
let l;
|
|
2777
|
+
return e[5] !== o || e[6] !== d || e[7] !== r ? (l = /* @__PURE__ */ a(bn, { value: !0, children: /* @__PURE__ */ a(Fo, { initialPreference: o, themePreferences: r, children: d }) }), e[5] = o, e[6] = d, e[7] = r, e[8] = l) : l = e[8], l;
|
|
2778
|
+
}, Vl = (t) => {
|
|
2779
|
+
const e = C(6);
|
|
2780
|
+
let n, o;
|
|
2781
|
+
e[0] !== t ? ({
|
|
2782
|
+
children: o,
|
|
2783
|
+
...n
|
|
2784
|
+
} = t, e[0] = t, e[1] = n, e[2] = o) : (n = e[1], o = e[2]);
|
|
2785
|
+
let r;
|
|
2786
|
+
return e[3] !== n || e[4] !== o ? (r = /* @__PURE__ */ a(j, { ...n, children: o }), e[3] = n, e[4] = o, e[5] = r) : r = e[5], r;
|
|
2787
|
+
}, Fl = (t) => typeof t == "object" && t !== null && !Array.isArray(t), Re = (t, e) => {
|
|
2788
|
+
const n = t[e];
|
|
2789
|
+
return typeof n == "string" ? n : void 0;
|
|
2790
|
+
}, nt = (t, e) => {
|
|
2791
|
+
const n = t[e];
|
|
2792
|
+
return typeof n == "boolean" ? n : void 0;
|
|
2793
|
+
}, Kl = (t) => {
|
|
2794
|
+
if (!Fl(t)) return {};
|
|
2795
|
+
const e = {}, n = Re(t, "size"), o = Re(t, "placement"), r = Re(t, "scrollBehavior"), i = nt(t, "closeOnEscape"), s = nt(t, "closeOnInteractOutside"), c = nt(t, "modal"), d = nt(t, "preventScroll"), l = nt(t, "trapFocus"), u = Re(t, "motionPreset"), m = Re(t, "role"), f = Re(t, "contentHeight"), h = Re(t, "contentMaxHeight"), b = Re(t, "contentMinHeight"), g = Re(t, "closeTriggerTop");
|
|
2796
|
+
return n && (e.size = n), o && (e.placement = o), r && (e.scrollBehavior = r), i !== void 0 && (e.closeOnEscape = i), s !== void 0 && (e.closeOnInteractOutside = s), c !== void 0 && (e.modal = c), d !== void 0 && (e.preventScroll = d), l !== void 0 && (e.trapFocus = l), u && (e.motionPreset = u), m && (e.role = m), f && (e.contentHeight = f), h && (e.contentMaxHeight = h), b && (e.contentMinHeight = b), g && (e.closeTriggerTop = g), e;
|
|
2797
|
+
}, jl = (t, e) => {
|
|
2798
|
+
const n = t.closable === !0, o = Kl(e);
|
|
2799
|
+
return {
|
|
2800
|
+
size: "xl",
|
|
2801
|
+
scrollBehavior: "inside",
|
|
2802
|
+
modal: !0,
|
|
2803
|
+
preventScroll: !0,
|
|
2804
|
+
trapFocus: !0,
|
|
2805
|
+
...o,
|
|
2806
|
+
closeOnEscape: n && (o.closeOnEscape ?? !0),
|
|
2807
|
+
closeOnInteractOutside: n && (o.closeOnInteractOutside ?? !0)
|
|
2808
|
+
};
|
|
2809
|
+
}, ql = (t, e) => t.find((n) => n.widgetId === e) ?? t[0], Ul = (t, e) => {
|
|
2810
|
+
if (t) return {
|
|
2811
|
+
open: !0,
|
|
2812
|
+
placement: t
|
|
2813
|
+
};
|
|
2814
|
+
if (e) return {
|
|
2815
|
+
open: !1,
|
|
2816
|
+
placement: e
|
|
2817
|
+
};
|
|
2818
|
+
}, Gl = (t) => {
|
|
2819
|
+
const e = C(3);
|
|
2820
|
+
let n;
|
|
2821
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (n = /* @__PURE__ */ a(L, { name: "circle-alert", size: 20 }), e[0] = n) : n = e[0];
|
|
2822
|
+
let o;
|
|
2823
|
+
return e[1] !== t.label ? (o = /* @__PURE__ */ a(zt, { h: "full", w: "full", color: "fg.muted", p: "md", "aria-label": t.label, children: n }), e[1] = t.label, e[2] = o) : o = e[2], o;
|
|
2824
|
+
}, Xl = (t) => {
|
|
2825
|
+
const e = C(23), {
|
|
2826
|
+
workbench: n
|
|
2827
|
+
} = t, o = $(n.layout.store, Yl), r = $(n.renderers.store, Ql), [i, s] = U(), c = ql(o.widgets, o.activeWidgetId), d = Ul(c, i);
|
|
2828
|
+
if (re(() => {
|
|
2829
|
+
c && s(void 0);
|
|
2830
|
+
}, [c]), !d)
|
|
2831
|
+
return null;
|
|
2832
|
+
const {
|
|
2833
|
+
open: l,
|
|
2834
|
+
placement: u
|
|
2835
|
+
} = d, m = n.layout.getWidget(u.contributionId), f = jl(u, m?.config), {
|
|
2836
|
+
contentHeight: h,
|
|
2837
|
+
contentMaxHeight: b,
|
|
2838
|
+
contentMinHeight: g,
|
|
2839
|
+
closeTriggerTop: p,
|
|
2840
|
+
...v
|
|
2841
|
+
} = f, y = m ? r[m.rendererId] : void 0, S = l && u.closable === !0, w = u.title ?? m?.title ?? "overlay";
|
|
2842
|
+
if (m && y?.keepAlive)
|
|
2843
|
+
throw new Error(`Widget ${m.id} uses keep-alive renderer ${y.id} in the overlay area; overlay widgets cannot reuse keep-alive hosts.`);
|
|
2844
|
+
const P = m && y ? y.render({
|
|
2845
|
+
workbench: n,
|
|
2846
|
+
widget: m,
|
|
2847
|
+
placement: u,
|
|
2848
|
+
refresh: Zl
|
|
2849
|
+
}) : /* @__PURE__ */ a(Gl, { label: m ? `No renderer registered for ${m.rendererId}.` : "Widget contribution is no longer registered." });
|
|
2850
|
+
let x;
|
|
2851
|
+
e[0] !== S || e[1] !== u || e[2] !== n.layout ? (x = (_) => {
|
|
2852
|
+
!_.open && S && (s(u), n.layout.closeWidget(u.widgetId));
|
|
2853
|
+
}, e[0] = S, e[1] = u, e[2] = n.layout, e[3] = x) : x = e[3];
|
|
2854
|
+
const k = x;
|
|
2855
|
+
let I;
|
|
2856
|
+
e[4] !== u ? (I = () => {
|
|
2857
|
+
s((_) => _?.widgetId === u.widgetId ? void 0 : _);
|
|
2858
|
+
}, e[4] = u, e[5] = I) : I = e[5];
|
|
2859
|
+
const A = I;
|
|
2860
|
+
let H;
|
|
2861
|
+
e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (H = /* @__PURE__ */ a(pe.Backdrop, { position: "fixed", inset: "0" }), e[6] = H) : H = e[6];
|
|
2862
|
+
let M;
|
|
2863
|
+
e[7] !== S || e[8] !== w || e[9] !== p ? (M = S ? /* @__PURE__ */ a(pe.CloseTrigger, { "aria-label": `Close ${w}`, alignItems: "center", borderRadius: "sm", color: "fg.muted", cursor: "pointer", display: "inline-flex", h: "5", insetEnd: "1", justifyContent: "center", position: "absolute", top: p ?? "1", w: "5", zIndex: "1", _hover: {
|
|
2864
|
+
bg: "bg.subtle",
|
|
2865
|
+
color: "fg"
|
|
2866
|
+
}, children: /* @__PURE__ */ a(L, { name: "x", size: 16 }) }) : null, e[7] = S, e[8] = w, e[9] = p, e[10] = M) : M = e[10];
|
|
2867
|
+
let T;
|
|
2868
|
+
e[11] !== P || e[12] !== h || e[13] !== b || e[14] !== g || e[15] !== M ? (T = /* @__PURE__ */ W(Dt, { children: [
|
|
2869
|
+
H,
|
|
2870
|
+
/* @__PURE__ */ a(pe.Positioner, { position: "fixed", inset: "0", overflow: "auto", children: /* @__PURE__ */ W(pe.Content, { position: "relative", overflow: "hidden", borderWidth: "1px", borderColor: "border.subtle", h, maxH: b, minH: g, children: [
|
|
2871
|
+
P,
|
|
2872
|
+
M
|
|
2873
|
+
] }) })
|
|
2874
|
+
] }), e[11] = P, e[12] = h, e[13] = b, e[14] = g, e[15] = M, e[16] = T) : T = e[16];
|
|
2875
|
+
let N;
|
|
2876
|
+
return e[17] !== v || e[18] !== A || e[19] !== k || e[20] !== l || e[21] !== T ? (N = /* @__PURE__ */ a(pe.Root, { ...v, open: l, onExitComplete: A, onOpenChange: k, children: T }), e[17] = v, e[18] = A, e[19] = k, e[20] = l, e[21] = T, e[22] = N) : N = e[22], N;
|
|
2877
|
+
};
|
|
2878
|
+
function Yl(t) {
|
|
2879
|
+
return t.layout.areas.overlay;
|
|
2880
|
+
}
|
|
2881
|
+
function Ql(t) {
|
|
2882
|
+
return t.renderers;
|
|
2883
|
+
}
|
|
2884
|
+
function Zl() {
|
|
2885
|
+
}
|
|
2886
|
+
const Jl = (t, e) => {
|
|
2887
|
+
t.resources.openResource({
|
|
2888
|
+
kind: e.type,
|
|
2889
|
+
uri: `pstdio://extension-resource/${encodeURIComponent(e.type)}/${encodeURIComponent(e.id)}`,
|
|
2890
|
+
id: e.id,
|
|
2891
|
+
label: e.label
|
|
2892
|
+
}, {
|
|
2893
|
+
replaceActive: !0
|
|
2894
|
+
}).catch(() => {
|
|
2895
|
+
});
|
|
2896
|
+
}, ea = {
|
|
2897
|
+
params: [],
|
|
2898
|
+
groups: [],
|
|
2899
|
+
values: {},
|
|
2900
|
+
readOnly: !1,
|
|
2901
|
+
loading: !0
|
|
2902
|
+
}, ta = (t) => {
|
|
2903
|
+
const e = C(30), {
|
|
2904
|
+
workbench: n,
|
|
2905
|
+
contribution: o,
|
|
2906
|
+
placement: r
|
|
2907
|
+
} = t, i = r.resource, [s, c] = U(ea), d = me(0);
|
|
2908
|
+
let l;
|
|
2909
|
+
e[0] !== o || e[1] !== i || e[2] !== n.renderers ? (l = () => {
|
|
2910
|
+
let S = !1;
|
|
2911
|
+
const w = () => {
|
|
2912
|
+
d.current = d.current + 1;
|
|
2913
|
+
const k = d.current;
|
|
2914
|
+
Promise.resolve(o.executeQuery(i)).then((I) => {
|
|
2915
|
+
if (S || d.current !== k)
|
|
2916
|
+
return;
|
|
2917
|
+
const A = {
|
|
2918
|
+
...o.defaultValues ?? {},
|
|
2919
|
+
...I.values ?? {}
|
|
2920
|
+
};
|
|
2921
|
+
c({
|
|
2922
|
+
params: I.params ?? [],
|
|
2923
|
+
groups: I.groups ?? [],
|
|
2924
|
+
values: A,
|
|
2925
|
+
readOnly: !!I.readOnly,
|
|
2926
|
+
loading: !1
|
|
2927
|
+
});
|
|
2928
|
+
});
|
|
2929
|
+
};
|
|
2930
|
+
w();
|
|
2931
|
+
const P = o.subscribe?.(w), x = n.renderers.onDidRefreshControlsRenderer((k) => {
|
|
2932
|
+
k.controlsRendererId === o.id && w();
|
|
2933
|
+
});
|
|
2934
|
+
return () => {
|
|
2935
|
+
S = !0, typeof P == "function" ? P() : P?.dispose(), x.dispose();
|
|
2936
|
+
};
|
|
2937
|
+
}, e[0] = o, e[1] = i, e[2] = n.renderers, e[3] = l) : l = e[3];
|
|
2938
|
+
let u;
|
|
2939
|
+
e[4] !== o || e[5] !== i || e[6] !== n ? (u = [o, i, n], e[4] = o, e[5] = i, e[6] = n, e[7] = u) : u = e[7], re(l, u);
|
|
2940
|
+
const m = s.readOnly || !o.updateValue && !o.apply, f = s.params.length > 0 || s.groups.length > 0, h = !m && (!!o.apply || !!o.reset);
|
|
2941
|
+
let b;
|
|
2942
|
+
e[8] !== o || e[9] !== i ? (b = (S, w) => {
|
|
2943
|
+
c((P) => {
|
|
2944
|
+
const x = {
|
|
2945
|
+
...P.values,
|
|
2946
|
+
[S]: w
|
|
2947
|
+
};
|
|
2948
|
+
return o.updateValue && o.updateValue({
|
|
2949
|
+
controlId: S,
|
|
2950
|
+
value: w,
|
|
2951
|
+
values: x,
|
|
2952
|
+
resource: i
|
|
2953
|
+
}), {
|
|
2954
|
+
...P,
|
|
2955
|
+
values: x
|
|
2956
|
+
};
|
|
2957
|
+
});
|
|
2958
|
+
}, e[8] = o, e[9] = i, e[10] = b) : b = e[10];
|
|
2959
|
+
const g = b;
|
|
2960
|
+
let p;
|
|
2961
|
+
e[11] !== o.emptyDescription || e[12] !== o.emptyTitle || e[13] !== g || e[14] !== f || e[15] !== m || e[16] !== s.groups || e[17] !== s.loading || e[18] !== s.params || e[19] !== s.values || e[20] !== n ? (p = /* @__PURE__ */ a(ze, { flex: "1", minH: "0", minW: "0", w: "full", size: "xs", children: s.loading ? /* @__PURE__ */ a(j, { p: "md", children: /* @__PURE__ */ a(oe, { textStyle: "label/S/regular", color: "fg.muted", children: "Loading…" }) }) : f ? /* @__PURE__ */ a(Hn, { params: s.params, groups: s.groups, defaultValues: s.values, readOnly: m, onChange: g, onOpenResource: (S) => Jl(n, S) }) : /* @__PURE__ */ W(j, { p: "md", children: [
|
|
2962
|
+
/* @__PURE__ */ a(oe, { textStyle: "label/M/medium", color: "fg", children: o.emptyTitle || "No controls" }),
|
|
2963
|
+
o.emptyDescription ? /* @__PURE__ */ a(oe, { textStyle: "label/S/regular", color: "fg.muted", mt: "2xs", children: o.emptyDescription }) : null
|
|
2964
|
+
] }) }), e[11] = o.emptyDescription, e[12] = o.emptyTitle, e[13] = g, e[14] = f, e[15] = m, e[16] = s.groups, e[17] = s.loading, e[18] = s.params, e[19] = s.values, e[20] = n, e[21] = p) : p = e[21];
|
|
2965
|
+
let v;
|
|
2966
|
+
e[22] !== o || e[23] !== i || e[24] !== h || e[25] !== s.values ? (v = h ? /* @__PURE__ */ W(le, { borderTopWidth: "1px", borderColor: "border.muted", px: "sm", py: "xs", gap: "xs", justifyContent: "flex-end", children: [
|
|
2967
|
+
o.reset ? /* @__PURE__ */ a(Oe, { size: "xs", variant: "ghost", onClick: () => {
|
|
2968
|
+
o.reset?.({
|
|
2969
|
+
resource: i
|
|
2970
|
+
});
|
|
2971
|
+
}, children: "Reset" }) : null,
|
|
2972
|
+
o.apply ? /* @__PURE__ */ a(Oe, { size: "xs", variant: "subtle", onClick: () => {
|
|
2973
|
+
o.apply?.({
|
|
2974
|
+
values: s.values,
|
|
2975
|
+
resource: i
|
|
2976
|
+
});
|
|
2977
|
+
}, children: "Apply" }) : null
|
|
2978
|
+
] }) : null, e[22] = o, e[23] = i, e[24] = h, e[25] = s.values, e[26] = v) : v = e[26];
|
|
2979
|
+
let y;
|
|
2980
|
+
return e[27] !== p || e[28] !== v ? (y = /* @__PURE__ */ W(ae, { h: "full", minH: "0", gap: "0", bg: "bg", overflow: "hidden", children: [
|
|
2981
|
+
p,
|
|
2982
|
+
v
|
|
2983
|
+
] }), e[27] = p, e[28] = v, e[29] = y) : y = e[29], y;
|
|
2984
|
+
}, gn = /* @__PURE__ */ new WeakSet(), na = (t) => {
|
|
2985
|
+
gn.has(t) || (gn.add(t), t.renderers.setControlsRendererImplementation(({
|
|
2986
|
+
workbench: e,
|
|
2987
|
+
placement: n,
|
|
2988
|
+
controlsRendererId: o
|
|
2989
|
+
}) => {
|
|
2990
|
+
const r = e.renderers.getControlsRenderer(o);
|
|
2991
|
+
return r ? it(ta, {
|
|
2992
|
+
workbench: e,
|
|
2993
|
+
contribution: r,
|
|
2994
|
+
placement: n
|
|
2995
|
+
}) : null;
|
|
2996
|
+
}));
|
|
2997
|
+
}, oa = () => {
|
|
2998
|
+
let t = 0;
|
|
2999
|
+
return {
|
|
3000
|
+
next: () => (t += 1, t),
|
|
3001
|
+
isLatest: (e) => e === t
|
|
3002
|
+
};
|
|
3003
|
+
}, ra = (t) => {
|
|
3004
|
+
const e = t.resource?.metadata, n = e?.projectId;
|
|
3005
|
+
if (typeof n == "string") return n;
|
|
3006
|
+
const o = e?.favoriteScope;
|
|
3007
|
+
if (!o || typeof o != "object" || Array.isArray(o)) return;
|
|
3008
|
+
const r = o;
|
|
3009
|
+
return r.scope === "project" && typeof r.projectId == "string" ? r.projectId : void 0;
|
|
3010
|
+
}, ia = (t, e) => {
|
|
3011
|
+
const n = `pstdio:workbench:dataRenderer:${t}:${e.widgetId}`, o = ra(e);
|
|
3012
|
+
return o ? `${n}:project:${o}` : n;
|
|
3013
|
+
}, sa = {
|
|
3014
|
+
display: "flex",
|
|
3015
|
+
flexDirection: "column",
|
|
3016
|
+
minH: "100%"
|
|
3017
|
+
}, la = (t) => {
|
|
3018
|
+
const e = C(6), {
|
|
3019
|
+
children: n,
|
|
3020
|
+
usesInternalScroll: o
|
|
3021
|
+
} = t, r = o ? "relative" : void 0;
|
|
3022
|
+
let i;
|
|
3023
|
+
e[0] !== n || e[1] !== o ? (i = o ? /* @__PURE__ */ a(j, { position: "absolute", inset: "0", minH: "0", minW: "0", overflow: "hidden", children: n }) : /* @__PURE__ */ a(ze, { flex: "1", minH: "0", minW: "0", w: "full", size: "xs", contentProps: sa, children: n }), e[0] = n, e[1] = o, e[2] = i) : i = e[2];
|
|
3024
|
+
let s;
|
|
3025
|
+
return e[3] !== r || e[4] !== i ? (s = /* @__PURE__ */ a(ae, { h: "full", minH: "0", gap: "0", bg: "bg", overflow: "hidden", position: r, children: i }), e[3] = r, e[4] = i, e[5] = s) : s = e[5], s;
|
|
3026
|
+
}, aa = () => () => {
|
|
3027
|
+
}, ca = (t) => {
|
|
3028
|
+
const e = C(3), n = ar(t) ? t : void 0, o = n ? void 0 : t, r = n ? n.subscribe : aa;
|
|
3029
|
+
let i;
|
|
3030
|
+
e[0] !== o || e[1] !== n ? (i = n ? n.getSnapshot : () => o, e[0] = o, e[1] = n, e[2] = i) : i = e[2];
|
|
3031
|
+
const s = i;
|
|
3032
|
+
return Bn(r, s, s);
|
|
3033
|
+
}, da = (t) => {
|
|
3034
|
+
const e = C(40), {
|
|
3035
|
+
workbench: n,
|
|
3036
|
+
contribution: o,
|
|
3037
|
+
placement: r
|
|
3038
|
+
} = t, i = ca(o.attributes);
|
|
3039
|
+
let s;
|
|
3040
|
+
e[0] !== o.id || e[1] !== r ? (s = ia(o.id, r), e[0] = o.id, e[1] = r, e[2] = s) : s = e[2];
|
|
3041
|
+
const c = s;
|
|
3042
|
+
let d;
|
|
3043
|
+
e[3] !== o.defaultFilters || e[4] !== o.defaultSettings ? (d = {
|
|
3044
|
+
settings: o.defaultSettings,
|
|
3045
|
+
filters: o.defaultFilters
|
|
3046
|
+
}, e[3] = o.defaultFilters, e[4] = o.defaultSettings, e[5] = d) : d = e[5];
|
|
3047
|
+
const l = d, u = Qt(c, ua, l), m = Qt(c, ma, l);
|
|
3048
|
+
let f;
|
|
3049
|
+
e[6] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (f = [], e[6] = f) : f = e[6];
|
|
3050
|
+
const [h, b] = U(f);
|
|
3051
|
+
let g;
|
|
3052
|
+
e[7] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = oa(), e[7] = g) : g = e[7];
|
|
3053
|
+
const p = me(g);
|
|
3054
|
+
let v;
|
|
3055
|
+
e[8] !== o || e[9] !== m || e[10] !== u || e[11] !== n.renderers ? (v = () => {
|
|
3056
|
+
let I = !1;
|
|
3057
|
+
const A = () => {
|
|
3058
|
+
const T = p.current.next(), N = {
|
|
3059
|
+
settings: u,
|
|
3060
|
+
filters: m
|
|
3061
|
+
};
|
|
3062
|
+
Promise.resolve(o.executeQuery(N)).then((_) => {
|
|
3063
|
+
I || !p.current.isLatest(T) || b(_);
|
|
3064
|
+
});
|
|
3065
|
+
};
|
|
3066
|
+
A();
|
|
3067
|
+
const H = o.subscribe?.(A), M = n.renderers.onDidRefreshDataRenderer((T) => {
|
|
3068
|
+
T.dataRendererId === o.id && A();
|
|
3069
|
+
});
|
|
3070
|
+
return () => {
|
|
3071
|
+
I = !0, typeof H == "function" ? H() : H?.dispose(), M.dispose();
|
|
3072
|
+
};
|
|
3073
|
+
}, e[8] = o, e[9] = m, e[10] = u, e[11] = n.renderers, e[12] = v) : v = e[12];
|
|
3074
|
+
let y;
|
|
3075
|
+
e[13] !== o || e[14] !== m || e[15] !== u || e[16] !== n ? (y = [o, m, u, n], e[13] = o, e[14] = m, e[15] = u, e[16] = n, e[17] = y) : y = e[17], re(v, y);
|
|
3076
|
+
let S;
|
|
3077
|
+
e[18] !== o || e[19] !== n.resources ? (S = (I) => {
|
|
3078
|
+
if (o.onRowClick) {
|
|
3079
|
+
o.onRowClick(I);
|
|
3080
|
+
return;
|
|
3081
|
+
}
|
|
3082
|
+
const A = I.resource;
|
|
3083
|
+
A && typeof A == "object" && "kind" in A && "uri" in A && n.resources.openResource(A, {
|
|
3084
|
+
replaceActive: !0
|
|
3085
|
+
});
|
|
3086
|
+
}, e[18] = o, e[19] = n.resources, e[20] = S) : S = e[20];
|
|
3087
|
+
const w = S, P = u.viewMode === "board";
|
|
3088
|
+
let x;
|
|
3089
|
+
e[21] !== i || e[22] !== o.defaultFilters || e[23] !== o.defaultSettings || e[24] !== o.emptyDescription || e[25] !== o.emptyTitle || e[26] !== o.getBoardColumnConfig || e[27] !== o.getRowContextMenuActions || e[28] !== o.hideToolbar || e[29] !== o.onAttributeChange || e[30] !== o.onColumnAction || e[31] !== o.onCreateRow || e[32] !== o.onReorder || e[33] !== w || e[34] !== h || e[35] !== c ? (x = /* @__PURE__ */ a(lr, { rows: h, storageKey: c, attributes: i, defaultSettings: o.defaultSettings, defaultFilters: o.defaultFilters, emptyTitle: o.emptyTitle, emptyDescription: o.emptyDescription, getBoardColumnConfig: o.getBoardColumnConfig, hideToolbar: o.hideToolbar, onRowClick: w, onAttributeChange: o.onAttributeChange, onReorder: o.onReorder, onCreateRow: o.onCreateRow, onColumnAction: o.onColumnAction, getRowContextMenuActions: o.getRowContextMenuActions }), e[21] = i, e[22] = o.defaultFilters, e[23] = o.defaultSettings, e[24] = o.emptyDescription, e[25] = o.emptyTitle, e[26] = o.getBoardColumnConfig, e[27] = o.getRowContextMenuActions, e[28] = o.hideToolbar, e[29] = o.onAttributeChange, e[30] = o.onColumnAction, e[31] = o.onCreateRow, e[32] = o.onReorder, e[33] = w, e[34] = h, e[35] = c, e[36] = x) : x = e[36];
|
|
3090
|
+
let k;
|
|
3091
|
+
return e[37] !== P || e[38] !== x ? (k = /* @__PURE__ */ a(la, { usesInternalScroll: P, children: x }), e[37] = P, e[38] = x, e[39] = k) : k = e[39], k;
|
|
3092
|
+
};
|
|
3093
|
+
function ua(t) {
|
|
3094
|
+
return t.settings;
|
|
3095
|
+
}
|
|
3096
|
+
function ma(t) {
|
|
3097
|
+
return t.filters;
|
|
3098
|
+
}
|
|
3099
|
+
const pn = /* @__PURE__ */ new WeakSet(), fa = (t) => {
|
|
3100
|
+
pn.has(t) || (pn.add(t), t.renderers.setDataRendererImplementation(({
|
|
3101
|
+
workbench: e,
|
|
3102
|
+
placement: n,
|
|
3103
|
+
dataRendererId: o
|
|
3104
|
+
}) => {
|
|
3105
|
+
const r = e.renderers.getDataRenderer(o);
|
|
3106
|
+
return r ? it(da, {
|
|
3107
|
+
workbench: e,
|
|
3108
|
+
contribution: r,
|
|
3109
|
+
placement: n
|
|
3110
|
+
}) : null;
|
|
3111
|
+
}));
|
|
3112
|
+
}, ha = Uo(() => import("./file-renderer-view-DrrhYnb_.js").then((t) => ({
|
|
3113
|
+
default: t.WorkbenchFileRendererView
|
|
3114
|
+
}))), yn = /* @__PURE__ */ new WeakSet(), ba = (t) => {
|
|
3115
|
+
yn.has(t) || (yn.add(t), t.renderers.setFileRendererImplementation(({
|
|
3116
|
+
workbench: e,
|
|
3117
|
+
placement: n,
|
|
3118
|
+
fileRendererId: o
|
|
3119
|
+
}) => {
|
|
3120
|
+
const r = e.renderers.getFileRenderer(o);
|
|
3121
|
+
return r ? it(qo, {
|
|
3122
|
+
fallback: null
|
|
3123
|
+
}, it(ha, {
|
|
3124
|
+
workbench: e,
|
|
3125
|
+
contribution: r,
|
|
3126
|
+
placement: n
|
|
3127
|
+
})) : null;
|
|
3128
|
+
}));
|
|
3129
|
+
}, vn = /* @__PURE__ */ new WeakMap(), ga = (t, e = {}) => {
|
|
3130
|
+
const n = vn.get(t);
|
|
3131
|
+
if (n) {
|
|
3132
|
+
n.renderParamField = e.renderParamField;
|
|
3133
|
+
return;
|
|
3134
|
+
}
|
|
3135
|
+
const o = {
|
|
3136
|
+
renderParamField: e.renderParamField
|
|
3137
|
+
};
|
|
3138
|
+
vn.set(t, o), t.renderers.setTreeRendererImplementation(({
|
|
3139
|
+
workbench: r,
|
|
3140
|
+
placement: i,
|
|
3141
|
+
treeId: s
|
|
3142
|
+
}) => it(io, {
|
|
3143
|
+
workbench: r,
|
|
3144
|
+
treeViewId: s,
|
|
3145
|
+
resource: i.resource,
|
|
3146
|
+
viewId: i.contributionId,
|
|
3147
|
+
renderParamField: o.renderParamField
|
|
3148
|
+
}));
|
|
3149
|
+
}, pa = (t) => $(t.fileIconThemes.store, ya);
|
|
3150
|
+
function ya(t) {
|
|
3151
|
+
return t.themes;
|
|
3152
|
+
}
|
|
3153
|
+
const et = (t) => {
|
|
3154
|
+
const e = C(1), {
|
|
3155
|
+
workbench: n,
|
|
3156
|
+
area: o
|
|
3157
|
+
} = t;
|
|
3158
|
+
if (!n.layout.getAreaHeaderBorderBottom(o))
|
|
3159
|
+
return null;
|
|
3160
|
+
let r;
|
|
3161
|
+
return e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (r = /* @__PURE__ */ a(j, { position: "absolute", insetInline: "0", bottom: "0", h: "1px", bg: "border.subtle", pointerEvents: "none", zIndex: "0" }), e[0] = r) : r = e[0], r;
|
|
3162
|
+
}, va = 240, Sa = 128, wa = 420, xa = 240, Sn = 24, Pa = 72, bt = (t, e, n) => Math.min(Math.max(t, e), n), Ia = (t) => ({
|
|
3163
|
+
defaultPx: t?.defaultPx ?? va,
|
|
3164
|
+
minPx: t?.minPx ?? Sa,
|
|
3165
|
+
maxPx: t?.maxPx ?? wa
|
|
3166
|
+
}), wn = (t, e) => {
|
|
3167
|
+
const n = t?.getBoundingClientRect().height ?? 0;
|
|
3168
|
+
return n <= 0 ? e.maxPx : Math.max(e.minPx, Math.min(e.maxPx, n - xa));
|
|
3169
|
+
}, Ca = (t) => {
|
|
3170
|
+
const e = C(39), {
|
|
3171
|
+
areaSize: n,
|
|
3172
|
+
bodyNode: o,
|
|
3173
|
+
collapsible: r,
|
|
3174
|
+
onCollapsedChange: i,
|
|
3175
|
+
onSizeChange: s
|
|
3176
|
+
} = t, c = r === void 0 ? !0 : r;
|
|
3177
|
+
let d, l, u;
|
|
3178
|
+
e[0] !== n || e[1] !== o ? (l = Ia(n), d = bt(l.defaultPx, l.minPx, l.maxPx), u = wn(o, l), e[0] = n, e[1] = o, e[2] = d, e[3] = l, e[4] = u) : (d = e[2], l = e[3], u = e[4]);
|
|
3179
|
+
const m = u, f = me(ka), [h, b] = U(d);
|
|
3180
|
+
let g, p;
|
|
3181
|
+
e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (g = () => () => f.current(), p = [], e[5] = g, e[6] = p) : (g = e[5], p = e[6]), re(g, p);
|
|
3182
|
+
let v, y;
|
|
3183
|
+
e[7] !== d ? (v = () => {
|
|
3184
|
+
b(d);
|
|
3185
|
+
}, y = [d], e[7] = d, e[8] = v, e[9] = y) : (v = e[8], y = e[9]), re(v, y);
|
|
3186
|
+
let S, w;
|
|
3187
|
+
e[10] !== m || e[11] !== l.minPx ? (S = () => {
|
|
3188
|
+
b((T) => bt(T, l.minPx, m));
|
|
3189
|
+
}, w = [m, l.minPx], e[10] = m, e[11] = l.minPx, e[12] = S, e[13] = w) : (S = e[12], w = e[13]), re(S, w);
|
|
3190
|
+
let P;
|
|
3191
|
+
e[14] !== m || e[15] !== i || e[16] !== s || e[17] !== l.minPx ? (P = (T) => {
|
|
3192
|
+
i(!1);
|
|
3193
|
+
const N = bt(T, l.minPx, m);
|
|
3194
|
+
b(N), s?.(N);
|
|
3195
|
+
}, e[14] = m, e[15] = i, e[16] = s, e[17] = l.minPx, e[18] = P) : P = e[18];
|
|
3196
|
+
const x = P;
|
|
3197
|
+
let k;
|
|
3198
|
+
e[19] !== o || e[20] !== c || e[21] !== h || e[22] !== i || e[23] !== x || e[24] !== l ? (k = (T) => {
|
|
3199
|
+
if (T.button !== 0)
|
|
3200
|
+
return;
|
|
3201
|
+
T.preventDefault(), f.current();
|
|
3202
|
+
const N = T.currentTarget, _ = T.clientY, D = h, O = document.body.style.cursor, z = document.body.style.userSelect;
|
|
3203
|
+
let R = D, K = !1;
|
|
3204
|
+
const G = (X) => {
|
|
3205
|
+
const q = D - (X.clientY - _);
|
|
3206
|
+
K = c && q <= Pa, R = K ? l.minPx : bt(q, l.minPx, wn(o, l)), b(R);
|
|
3207
|
+
}, V = () => {
|
|
3208
|
+
window.removeEventListener("pointermove", G), window.removeEventListener("pointerup", V), window.removeEventListener("pointercancel", V), window.removeEventListener("blur", V), document.body.style.cursor = O, document.body.style.userSelect = z, N.hasPointerCapture(T.pointerId) && N.releasePointerCapture(T.pointerId), f.current = Ta, K ? i(!0) : x(R);
|
|
3209
|
+
};
|
|
3210
|
+
f.current = V, N.setPointerCapture(T.pointerId), document.body.style.cursor = "row-resize", document.body.style.userSelect = "none", window.addEventListener("pointermove", G), window.addEventListener("pointerup", V, {
|
|
3211
|
+
once: !0
|
|
3212
|
+
}), window.addEventListener("pointercancel", V, {
|
|
3213
|
+
once: !0
|
|
3214
|
+
}), window.addEventListener("blur", V, {
|
|
3215
|
+
once: !0
|
|
3216
|
+
});
|
|
3217
|
+
}, e[19] = o, e[20] = c, e[21] = h, e[22] = i, e[23] = x, e[24] = l, e[25] = k) : k = e[25];
|
|
3218
|
+
const I = k;
|
|
3219
|
+
let A;
|
|
3220
|
+
e[26] !== c || e[27] !== h || e[28] !== m || e[29] !== i || e[30] !== x || e[31] !== l.minPx ? (A = (T) => {
|
|
3221
|
+
T.key === "ArrowUp" ? (T.preventDefault(), x(h + Sn)) : T.key === "ArrowDown" ? (T.preventDefault(), x(h - Sn)) : T.key === "Home" ? (T.preventDefault(), c ? i(!0) : x(l.minPx)) : T.key === "End" && (T.preventDefault(), x(m));
|
|
3222
|
+
}, e[26] = c, e[27] = h, e[28] = m, e[29] = i, e[30] = x, e[31] = l.minPx, e[32] = A) : A = e[32];
|
|
3223
|
+
const H = A;
|
|
3224
|
+
let M;
|
|
3225
|
+
return e[33] !== h || e[34] !== m || e[35] !== H || e[36] !== I || e[37] !== l.minPx ? (M = {
|
|
3226
|
+
height: h,
|
|
3227
|
+
maxHeight: m,
|
|
3228
|
+
minHeight: l.minPx,
|
|
3229
|
+
onPointerDown: I,
|
|
3230
|
+
onKeyDown: H
|
|
3231
|
+
}, e[33] = h, e[34] = m, e[35] = H, e[36] = I, e[37] = l.minPx, e[38] = M) : M = e[38], M;
|
|
3232
|
+
};
|
|
3233
|
+
function ka() {
|
|
3234
|
+
}
|
|
3235
|
+
function Ta() {
|
|
3236
|
+
}
|
|
3237
|
+
const Bt = (t, ...e) => e.every((n) => t.layout.getAreaCollapsible(n)), Ot = (t, e, n) => {
|
|
3238
|
+
t.panels.setOpen(e, n), t.layout.setAreaVisible(e, n);
|
|
3239
|
+
}, _a = (t) => {
|
|
3240
|
+
const e = C(20), n = $(t.layout.store, Ra), o = $(t.layout.store, Wa), r = $(t.panels.store, Aa);
|
|
3241
|
+
let i;
|
|
3242
|
+
e[0] !== n || e[1] !== o ? (i = (v) => n[v].widgets.length > 0 || !!o[v], e[0] = n, e[1] = o, e[2] = i) : i = e[2];
|
|
3243
|
+
const s = i;
|
|
3244
|
+
let c;
|
|
3245
|
+
e[3] !== n.main.activeWidgetId || e[4] !== n.main.widgets ? (c = n.main.widgets.find((v) => v.widgetId === n.main.activeWidgetId) ?? n.main.widgets[0], e[3] = n.main.activeWidgetId, e[4] = n.main.widgets, e[5] = c) : c = e[5];
|
|
3246
|
+
const l = !!c?.resource;
|
|
3247
|
+
let u;
|
|
3248
|
+
e[6] !== s || e[7] !== l || e[8] !== r || e[9] !== t ? (u = (v, y, S) => {
|
|
3249
|
+
const w = S === void 0 ? !1 : S, P = y ? Bt(t, y, v) : Bt(t, v), x = r[v] ?? !0;
|
|
3250
|
+
return {
|
|
3251
|
+
has: (s(v) || (y ? s(y) : !1)) && (!w || l),
|
|
3252
|
+
hasHeader: y ? s(y) : !1,
|
|
3253
|
+
collapsible: P,
|
|
3254
|
+
collapsed: !x && P,
|
|
3255
|
+
onOpen: () => Ot(t, v, !0),
|
|
3256
|
+
onCollapsedChange: (I) => {
|
|
3257
|
+
(!I || P) && Ot(t, v, !I);
|
|
3258
|
+
}
|
|
3259
|
+
};
|
|
3260
|
+
}, e[6] = s, e[7] = l, e[8] = r, e[9] = t, e[10] = u) : u = e[10];
|
|
3261
|
+
const m = u, f = s("main-header");
|
|
3262
|
+
let h, b, g;
|
|
3263
|
+
e[11] !== m ? (h = m("main-left", void 0, !0), b = m("main-right", void 0, !0), g = m("secondary", "secondary-header"), e[11] = m, e[12] = h, e[13] = b, e[14] = g) : (h = e[12], b = e[13], g = e[14]);
|
|
3264
|
+
let p;
|
|
3265
|
+
return e[15] !== f || e[16] !== h || e[17] !== b || e[18] !== g ? (p = {
|
|
3266
|
+
hasMainHeader: f,
|
|
3267
|
+
mainLeft: h,
|
|
3268
|
+
mainRight: b,
|
|
3269
|
+
mainBottom: g
|
|
3270
|
+
}, e[15] = f, e[16] = h, e[17] = b, e[18] = g, e[19] = p) : p = e[19], p;
|
|
3271
|
+
};
|
|
3272
|
+
function Ra(t) {
|
|
3273
|
+
return t.layout.areas;
|
|
3274
|
+
}
|
|
3275
|
+
function Wa(t) {
|
|
3276
|
+
return t.placeholders;
|
|
3277
|
+
}
|
|
3278
|
+
function Aa(t) {
|
|
3279
|
+
return t.openByAreaId;
|
|
3280
|
+
}
|
|
3281
|
+
const Ea = (t) => {
|
|
3282
|
+
const e = C(24), {
|
|
3283
|
+
workbench: n,
|
|
3284
|
+
hasMainBottomHeader: o,
|
|
3285
|
+
hasMainBottomContentTabs: r,
|
|
3286
|
+
bottomResize: i
|
|
3287
|
+
} = t, s = i.minHeight, c = i.maxHeight;
|
|
3288
|
+
let d;
|
|
3289
|
+
e[0] !== i.height ? (d = Math.round(i.height), e[0] = i.height, e[1] = d) : d = e[1];
|
|
3290
|
+
let l, u, m;
|
|
3291
|
+
e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = {
|
|
3292
|
+
content: '""',
|
|
3293
|
+
position: "absolute",
|
|
3294
|
+
insetInline: 0,
|
|
3295
|
+
top: "50%",
|
|
3296
|
+
h: "1px",
|
|
3297
|
+
bg: "border.subtle",
|
|
3298
|
+
transform: "translateY(-50%)"
|
|
3299
|
+
}, u = {
|
|
3300
|
+
_before: {
|
|
3301
|
+
bg: "border.emphasized"
|
|
3302
|
+
}
|
|
3303
|
+
}, m = {
|
|
3304
|
+
_before: {
|
|
3305
|
+
bg: dr,
|
|
3306
|
+
h: "2px"
|
|
3307
|
+
}
|
|
3308
|
+
}, e[2] = l, e[3] = u, e[4] = m) : (l = e[2], u = e[3], m = e[4]);
|
|
3309
|
+
let f;
|
|
3310
|
+
e[5] !== i.maxHeight || e[6] !== i.minHeight || e[7] !== i.onKeyDown || e[8] !== i.onPointerDown || e[9] !== d ? (f = /* @__PURE__ */ a(j, { role: "separator", "aria-label": "Resize main-bottom panel", "aria-orientation": "horizontal", "aria-valuemin": s, "aria-valuemax": c, "aria-valuenow": d, tabIndex: 0, position: "relative", zIndex: "1", cursor: "row-resize", touchAction: "none", outline: "none", onPointerDown: i.onPointerDown, onKeyDown: i.onKeyDown, _before: l, _hover: u, _focusVisible: m }), e[5] = i.maxHeight, e[6] = i.minHeight, e[7] = i.onKeyDown, e[8] = i.onPointerDown, e[9] = d, e[10] = f) : f = e[10];
|
|
3311
|
+
let h;
|
|
3312
|
+
e[11] !== r || e[12] !== o || e[13] !== n ? (h = o || r ? /* @__PURE__ */ W(Ve, { variant: "main", bg: F.panel, position: "relative", flexShrink: 0, gap: "xs", overflow: "hidden", overflowY: "hidden", children: [
|
|
3313
|
+
/* @__PURE__ */ a(lt, { workbench: n, area: "secondary" }),
|
|
3314
|
+
o ? /* @__PURE__ */ a(j, { flex: "1", h: "full", minW: "0", overflow: "hidden", children: /* @__PURE__ */ a(ye, { workbench: n, area: "secondary-header", title: "Main bottom header", showHeader: !1 }) }) : null,
|
|
3315
|
+
/* @__PURE__ */ a(et, { workbench: n, area: "secondary-header" })
|
|
3316
|
+
] }) : null, e[11] = r, e[12] = o, e[13] = n, e[14] = h) : h = e[14];
|
|
3317
|
+
let b;
|
|
3318
|
+
e[15] !== n ? (b = /* @__PURE__ */ a(j, { flex: "1", minH: "0", minW: "0", overflow: "hidden", children: /* @__PURE__ */ a(ye, { workbench: n, area: "secondary", title: "Main bottom" }) }), e[15] = n, e[16] = b) : b = e[16];
|
|
3319
|
+
let g;
|
|
3320
|
+
e[17] !== h || e[18] !== b || e[19] !== n ? (g = /* @__PURE__ */ W(dt, { workbench: n, area: "panel", as: "section", bg: F.panel, minH: "0", minW: "0", overflow: "hidden", display: "flex", flexDirection: "column", children: [
|
|
3321
|
+
h,
|
|
3322
|
+
b
|
|
3323
|
+
] }), e[17] = h, e[18] = b, e[19] = n, e[20] = g) : g = e[20];
|
|
3324
|
+
let p;
|
|
3325
|
+
return e[21] !== f || e[22] !== g ? (p = /* @__PURE__ */ W(Tn, { children: [
|
|
3326
|
+
f,
|
|
3327
|
+
g
|
|
3328
|
+
] }), e[21] = f, e[22] = g, e[23] = p) : p = e[23], p;
|
|
3329
|
+
}, $a = (t) => {
|
|
3330
|
+
const e = C(19), {
|
|
3331
|
+
workbench: n,
|
|
3332
|
+
hasTop: o,
|
|
3333
|
+
showLeftPanelOpener: r,
|
|
3334
|
+
onOpenLeftPanel: i
|
|
3335
|
+
} = t, s = $(n.commands.store, za), c = $(n.context.store, Da), d = $(n.layout.menuStore, La), l = $(n.layout.store, Va), u = $(n.breadcrumbs.store, Fa) ?? [], m = {
|
|
3336
|
+
itemsByPath: d,
|
|
3337
|
+
commands: s,
|
|
3338
|
+
contextValues: c
|
|
3339
|
+
}, f = {
|
|
3340
|
+
resource: l
|
|
3341
|
+
}, h = Be(m, Xt, f).length > 0, b = Be(m, Yt, f).length > 0, g = u.length > 0, p = o || g;
|
|
3342
|
+
if (!r && !h && !p && !b)
|
|
3343
|
+
return null;
|
|
3344
|
+
let v;
|
|
3345
|
+
e[0] !== i || e[1] !== r ? (v = r ? /* @__PURE__ */ a(Qe, { content: "Show left side panel", children: /* @__PURE__ */ a(Ye, { variant: "ghost", size: "xs", "aria-label": "Show left side panel", flexShrink: 0, onClick: i, children: /* @__PURE__ */ a(L, { name: "PanelLeft", size: 16 }) }) }) : null, e[0] = i, e[1] = r, e[2] = v) : v = e[2];
|
|
3346
|
+
let y;
|
|
3347
|
+
e[3] !== n ? (y = /* @__PURE__ */ a(Nt, { workbench: n, menuPath: Xt }), e[3] = n, e[4] = y) : y = e[4];
|
|
3348
|
+
let S;
|
|
3349
|
+
e[5] !== g || e[6] !== p || e[7] !== o || e[8] !== n ? (S = p ? /* @__PURE__ */ W(j, { flex: "1", h: "full", minW: "0", overflow: "hidden", children: [
|
|
3350
|
+
o ? /* @__PURE__ */ a(ye, { workbench: n, area: "nav", title: "Top", showHeader: !1 }) : null,
|
|
3351
|
+
!o && g ? /* @__PURE__ */ a(ti, { workbench: n }) : null
|
|
3352
|
+
] }) : null, e[5] = g, e[6] = p, e[7] = o, e[8] = n, e[9] = S) : S = e[9];
|
|
3353
|
+
let w, P;
|
|
3354
|
+
e[10] !== n ? (w = /* @__PURE__ */ a(Nt, { workbench: n, menuPath: Yt }), P = /* @__PURE__ */ a(et, { workbench: n, area: "nav" }), e[10] = n, e[11] = w, e[12] = P) : (w = e[11], P = e[12]);
|
|
3355
|
+
let x;
|
|
3356
|
+
return e[13] !== v || e[14] !== y || e[15] !== S || e[16] !== w || e[17] !== P ? (x = /* @__PURE__ */ W(Ve, { variant: "main", bg: F.main, position: "relative", flexShrink: 0, gap: "xs", overflow: "hidden", overflowY: "hidden", children: [
|
|
3357
|
+
v,
|
|
3358
|
+
y,
|
|
3359
|
+
S,
|
|
3360
|
+
w,
|
|
3361
|
+
P
|
|
3362
|
+
] }), e[13] = v, e[14] = y, e[15] = S, e[16] = w, e[17] = P, e[18] = x) : x = e[18], x;
|
|
3363
|
+
}, Ha = (t) => {
|
|
3364
|
+
const e = C(12), {
|
|
3365
|
+
workbench: n,
|
|
3366
|
+
hasHeader: o
|
|
3367
|
+
} = t, r = $(n.layout.store, Ka);
|
|
3368
|
+
let i;
|
|
3369
|
+
e[0] !== r ? (i = Ge(r), e[0] = r, e[1] = i) : i = e[1];
|
|
3370
|
+
const c = o || i;
|
|
3371
|
+
let d;
|
|
3372
|
+
e[2] !== o || e[3] !== c || e[4] !== n ? (d = c ? /* @__PURE__ */ W(Ve, { variant: "main", bg: F.sideBar, position: "relative", flexShrink: 0, gap: "xs", overflowX: "hidden", px: "0", h: "auto", minH: "2.5rem", alignItems: "stretch", children: [
|
|
3373
|
+
/* @__PURE__ */ a(lt, { workbench: n, area: "left" }),
|
|
3374
|
+
o ? /* @__PURE__ */ a(j, { flex: "1", minW: "0", overflowX: "hidden", children: /* @__PURE__ */ a(ye, { workbench: n, area: "left-header", title: "Left header", showHeader: !1 }) }) : null,
|
|
3375
|
+
/* @__PURE__ */ a(et, { workbench: n, area: "left-header" })
|
|
3376
|
+
] }) : null, e[2] = o, e[3] = c, e[4] = n, e[5] = d) : d = e[5];
|
|
3377
|
+
let l;
|
|
3378
|
+
e[6] !== n ? (l = /* @__PURE__ */ a(j, { flex: "1", minH: "0", minW: "0", overflow: "hidden", children: /* @__PURE__ */ a(ye, { workbench: n, area: "left", title: "Left", showHeader: !1 }) }), e[6] = n, e[7] = l) : l = e[7];
|
|
3379
|
+
let u;
|
|
3380
|
+
return e[8] !== d || e[9] !== l || e[10] !== n ? (u = /* @__PURE__ */ W(dt, { workbench: n, area: "sideBar", as: "aside", bg: F.sideBar, display: "flex", flexDirection: "column", h: "full", minH: "0", minW: "0", overflow: "hidden", w: "full", children: [
|
|
3381
|
+
d,
|
|
3382
|
+
l
|
|
3383
|
+
] }), e[8] = d, e[9] = l, e[10] = n, e[11] = u) : u = e[11], u;
|
|
3384
|
+
}, ho = "1.75rem", Ma = (t) => {
|
|
3385
|
+
const e = C(5), {
|
|
3386
|
+
workbench: n
|
|
3387
|
+
} = t;
|
|
3388
|
+
let o;
|
|
3389
|
+
e[0] !== n ? (o = /* @__PURE__ */ a(ye, { workbench: n, area: "activity", title: "Activity bar", showHeader: !1 }), e[0] = n, e[1] = o) : o = e[1];
|
|
3390
|
+
let r;
|
|
3391
|
+
return e[2] !== o || e[3] !== n ? (r = /* @__PURE__ */ a(dt, { workbench: n, area: "activityBar", as: "nav", bg: F.activityBar, borderRightWidth: "1px", borderColor: "border.subtle", flexShrink: 0, h: "full", minH: "0", overflow: "hidden", w: "3.5rem", children: o }), e[2] = o, e[3] = n, e[4] = r) : r = e[4], r;
|
|
3392
|
+
}, Na = (t) => {
|
|
3393
|
+
const e = C(10), {
|
|
3394
|
+
workbench: n
|
|
3395
|
+
} = t, o = $(n.layout.store, ja);
|
|
3396
|
+
let r;
|
|
3397
|
+
e[0] !== o ? (r = Ge(o), e[0] = o, e[1] = r) : r = e[1];
|
|
3398
|
+
const i = r;
|
|
3399
|
+
let s;
|
|
3400
|
+
e[2] !== i || e[3] !== n ? (s = i ? /* @__PURE__ */ W(Ve, { variant: "main", bg: F.panel, position: "relative", flexShrink: 0, gap: "xs", overflow: "hidden", overflowY: "hidden", children: [
|
|
3401
|
+
/* @__PURE__ */ a(lt, { workbench: n, area: "main-right" }),
|
|
3402
|
+
/* @__PURE__ */ a(et, { workbench: n, area: "main-right" })
|
|
3403
|
+
] }) : null, e[2] = i, e[3] = n, e[4] = s) : s = e[4];
|
|
3404
|
+
let c;
|
|
3405
|
+
e[5] !== n ? (c = /* @__PURE__ */ a(j, { flex: "1", minH: "0", minW: "0", overflow: "hidden", children: /* @__PURE__ */ a(ye, { workbench: n, area: "main-right", title: "Main right", showHeader: !1 }) }), e[5] = n, e[6] = c) : c = e[6];
|
|
3406
|
+
let d;
|
|
3407
|
+
return e[7] !== s || e[8] !== c ? (d = /* @__PURE__ */ W(le, { as: "aside", direction: "column", h: "full", minH: "0", minW: "0", overflow: "hidden", w: "full", children: [
|
|
3408
|
+
s,
|
|
3409
|
+
c
|
|
3410
|
+
] }), e[7] = s, e[8] = c, e[9] = d) : d = e[9], d;
|
|
3411
|
+
}, Ba = (t) => {
|
|
3412
|
+
const e = C(10), {
|
|
3413
|
+
workbench: n
|
|
3414
|
+
} = t, o = $(n.layout.store, qa);
|
|
3415
|
+
let r;
|
|
3416
|
+
e[0] !== o ? (r = Ge(o), e[0] = o, e[1] = r) : r = e[1];
|
|
3417
|
+
const i = r;
|
|
3418
|
+
let s;
|
|
3419
|
+
e[2] !== i || e[3] !== n ? (s = i ? /* @__PURE__ */ W(Ve, { variant: "main", bg: F.panel, position: "relative", flexShrink: 0, gap: "xs", overflow: "hidden", overflowY: "hidden", children: [
|
|
3420
|
+
/* @__PURE__ */ a(lt, { workbench: n, area: "main-left" }),
|
|
3421
|
+
/* @__PURE__ */ a(et, { workbench: n, area: "main-left" })
|
|
3422
|
+
] }) : null, e[2] = i, e[3] = n, e[4] = s) : s = e[4];
|
|
3423
|
+
let c;
|
|
3424
|
+
e[5] !== n ? (c = /* @__PURE__ */ a(j, { flex: "1", minH: "0", minW: "0", overflow: "hidden", children: /* @__PURE__ */ a(ye, { workbench: n, area: "main-left", title: "Main left", showHeader: !1 }) }), e[5] = n, e[6] = c) : c = e[6];
|
|
3425
|
+
let d;
|
|
3426
|
+
return e[7] !== s || e[8] !== c ? (d = /* @__PURE__ */ W(le, { as: "aside", direction: "column", h: "full", minH: "0", minW: "0", overflow: "hidden", w: "full", children: [
|
|
3427
|
+
s,
|
|
3428
|
+
c
|
|
3429
|
+
] }), e[7] = s, e[8] = c, e[9] = d) : d = e[9], d;
|
|
3430
|
+
}, Oa = (t) => {
|
|
3431
|
+
const e = C(5), {
|
|
3432
|
+
workbench: n
|
|
3433
|
+
} = t;
|
|
3434
|
+
let o;
|
|
3435
|
+
e[0] !== n ? (o = /* @__PURE__ */ a(ye, { workbench: n, area: "status", title: "Status", showHeader: !1 }), e[0] = n, e[1] = o) : o = e[1];
|
|
3436
|
+
let r;
|
|
3437
|
+
return e[2] !== o || e[3] !== n ? (r = /* @__PURE__ */ a(dt, { workbench: n, area: "statusBar", as: "footer", bg: F.statusBar, borderTopWidth: "1px", borderColor: "border.subtle", flexShrink: 0, h: ho, minH: "0", minW: "0", overflow: "hidden", children: o }), e[2] = o, e[3] = n, e[4] = r) : r = e[4], r;
|
|
3438
|
+
};
|
|
3439
|
+
function za(t) {
|
|
3440
|
+
return t.commands;
|
|
3441
|
+
}
|
|
3442
|
+
function Da(t) {
|
|
3443
|
+
return t.values;
|
|
3444
|
+
}
|
|
3445
|
+
function La(t) {
|
|
3446
|
+
return t.itemsByPath;
|
|
3447
|
+
}
|
|
3448
|
+
function Va(t) {
|
|
3449
|
+
return xt(t.layout, "primary");
|
|
3450
|
+
}
|
|
3451
|
+
function Fa(t) {
|
|
3452
|
+
return t.items;
|
|
3453
|
+
}
|
|
3454
|
+
function Ka(t) {
|
|
3455
|
+
return t.layout.areas.left.widgets;
|
|
3456
|
+
}
|
|
3457
|
+
function ja(t) {
|
|
3458
|
+
return t.layout.areas["main-right"].widgets;
|
|
3459
|
+
}
|
|
3460
|
+
function qa(t) {
|
|
3461
|
+
return t.layout.areas["main-left"].widgets;
|
|
3462
|
+
}
|
|
3463
|
+
const xn = 320, Ua = {
|
|
3464
|
+
defaultPx: 240,
|
|
3465
|
+
minPx: 180,
|
|
3466
|
+
maxPx: 420
|
|
3467
|
+
}, Ga = {
|
|
3468
|
+
defaultPx: 320,
|
|
3469
|
+
minPx: 240,
|
|
3470
|
+
maxPx: 520
|
|
3471
|
+
}, bo = Yo("main"), Pn = (t, e) => ({
|
|
3472
|
+
defaultPx: t?.defaultPx ?? e.defaultPx,
|
|
3473
|
+
minPx: t?.minPx ?? e.minPx,
|
|
3474
|
+
maxPx: t ? t.maxPx : e.maxPx
|
|
3475
|
+
}), Xa = (t) => {
|
|
3476
|
+
const e = C(13), {
|
|
3477
|
+
openers: n
|
|
3478
|
+
} = t;
|
|
3479
|
+
let o, r, i, s, c, d;
|
|
3480
|
+
if (e[0] !== n) {
|
|
3481
|
+
d = /* @__PURE__ */ Symbol.for("react.early_return_sentinel");
|
|
3482
|
+
e: {
|
|
3483
|
+
const u = n.filter(tc);
|
|
3484
|
+
if (u.length === 0) {
|
|
3485
|
+
d = null;
|
|
3486
|
+
break e;
|
|
3487
|
+
}
|
|
3488
|
+
o = Le, r = 0, i = "2xs", s = "0", c = u.map(nc);
|
|
3489
|
+
}
|
|
3490
|
+
e[0] = n, e[1] = o, e[2] = r, e[3] = i, e[4] = s, e[5] = c, e[6] = d;
|
|
3491
|
+
} else
|
|
3492
|
+
o = e[1], r = e[2], i = e[3], s = e[4], c = e[5], d = e[6];
|
|
3493
|
+
if (d !== /* @__PURE__ */ Symbol.for("react.early_return_sentinel"))
|
|
3494
|
+
return d;
|
|
3495
|
+
let l;
|
|
3496
|
+
return e[7] !== o || e[8] !== r || e[9] !== i || e[10] !== s || e[11] !== c ? (l = /* @__PURE__ */ a(o, { flexShrink: r, gap: i, minW: s, children: c }), e[7] = o, e[8] = r, e[9] = i, e[10] = s, e[11] = c, e[12] = l) : l = e[12], l;
|
|
3497
|
+
}, Ya = {
|
|
3498
|
+
label: "Show main-bottom panel",
|
|
3499
|
+
icon: "PanelBottom"
|
|
3500
|
+
}, Qa = /* @__PURE__ */ new Set([St, Ct]), Za = (t) => t.length > 0 && t.every((e) => Qa.has(e.contributionId)) ? {
|
|
3501
|
+
label: "Show terminal panel",
|
|
3502
|
+
icon: "SquareTerminal"
|
|
3503
|
+
} : Ya, Ja = (t) => {
|
|
3504
|
+
const e = C(35), {
|
|
3505
|
+
workbench: n,
|
|
3506
|
+
hasMainHeader: o,
|
|
3507
|
+
hasMainContentTabs: r,
|
|
3508
|
+
showMainLeftOpener: i,
|
|
3509
|
+
showMainRightOpener: s,
|
|
3510
|
+
showMainBottomOpener: c,
|
|
3511
|
+
mainBottomPanelOpener: d,
|
|
3512
|
+
onOpenMainLeftPanel: l,
|
|
3513
|
+
onOpenMainRightPanel: u,
|
|
3514
|
+
onOpenMainBottomPanel: m
|
|
3515
|
+
} = t;
|
|
3516
|
+
let f;
|
|
3517
|
+
e[0] !== l || e[1] !== i ? (f = {
|
|
3518
|
+
id: "main-left",
|
|
3519
|
+
label: "Show main-left panel",
|
|
3520
|
+
icon: "PanelLeft",
|
|
3521
|
+
show: i,
|
|
3522
|
+
onOpen: l
|
|
3523
|
+
}, e[0] = l, e[1] = i, e[2] = f) : f = e[2];
|
|
3524
|
+
let h;
|
|
3525
|
+
e[3] !== d.icon || e[4] !== d.label || e[5] !== m || e[6] !== c ? (h = {
|
|
3526
|
+
id: "main-bottom",
|
|
3527
|
+
label: d.label,
|
|
3528
|
+
icon: d.icon,
|
|
3529
|
+
show: c,
|
|
3530
|
+
onOpen: m
|
|
3531
|
+
}, e[3] = d.icon, e[4] = d.label, e[5] = m, e[6] = c, e[7] = h) : h = e[7];
|
|
3532
|
+
let b;
|
|
3533
|
+
e[8] !== u || e[9] !== s ? (b = {
|
|
3534
|
+
id: "main-right",
|
|
3535
|
+
label: "Show main-right panel",
|
|
3536
|
+
icon: "PanelRight",
|
|
3537
|
+
show: s,
|
|
3538
|
+
onOpen: u
|
|
3539
|
+
}, e[8] = u, e[9] = s, e[10] = b) : b = e[10];
|
|
3540
|
+
let g;
|
|
3541
|
+
e[11] !== f || e[12] !== h || e[13] !== b ? (g = [f, h, b], e[11] = f, e[12] = h, e[13] = b, e[14] = g) : g = e[14];
|
|
3542
|
+
const p = g;
|
|
3543
|
+
let v;
|
|
3544
|
+
e[15] !== n ? (v = /* @__PURE__ */ a(lt, { workbench: n, area: "main" }), e[15] = n, e[16] = v) : v = e[16];
|
|
3545
|
+
const y = o || !r ? "1" : "0";
|
|
3546
|
+
let S;
|
|
3547
|
+
e[17] !== o || e[18] !== n ? (S = o ? /* @__PURE__ */ a(ye, { workbench: n, area: "main-header", title: "Main header", showHeader: !1 }) : null, e[17] = o, e[18] = n, e[19] = S) : S = e[19];
|
|
3548
|
+
let w;
|
|
3549
|
+
e[20] !== y || e[21] !== S ? (w = /* @__PURE__ */ a(j, { flex: y, h: "full", minW: "0", overflow: "hidden", children: S }), e[20] = y, e[21] = S, e[22] = w) : w = e[22];
|
|
3550
|
+
let P;
|
|
3551
|
+
e[23] !== n ? (P = /* @__PURE__ */ a(Nt, { workbench: n, menuPath: bo }), e[23] = n, e[24] = P) : P = e[24];
|
|
3552
|
+
let x;
|
|
3553
|
+
e[25] !== p ? (x = /* @__PURE__ */ a(Xa, { openers: p }), e[25] = p, e[26] = x) : x = e[26];
|
|
3554
|
+
let k;
|
|
3555
|
+
e[27] !== n ? (k = /* @__PURE__ */ a(et, { workbench: n, area: "main-header" }), e[27] = n, e[28] = k) : k = e[28];
|
|
3556
|
+
let I;
|
|
3557
|
+
return e[29] !== k || e[30] !== v || e[31] !== w || e[32] !== P || e[33] !== x ? (I = /* @__PURE__ */ W(Ve, { variant: "main", h: "2rem", bg: F.main, position: "relative", flexShrink: 0, gap: "xs", overflow: "hidden", overflowY: "hidden", children: [
|
|
3558
|
+
v,
|
|
3559
|
+
w,
|
|
3560
|
+
P,
|
|
3561
|
+
x,
|
|
3562
|
+
k
|
|
3563
|
+
] }), e[29] = k, e[30] = v, e[31] = w, e[32] = P, e[33] = x, e[34] = I) : I = e[34], I;
|
|
3564
|
+
}, ec = (t) => {
|
|
3565
|
+
const e = C(83), {
|
|
3566
|
+
workbench: n
|
|
3567
|
+
} = t, {
|
|
3568
|
+
hasMainHeader: o,
|
|
3569
|
+
mainLeft: r,
|
|
3570
|
+
mainRight: i,
|
|
3571
|
+
mainBottom: s
|
|
3572
|
+
} = _a(n), [c, d] = U(null);
|
|
3573
|
+
let l;
|
|
3574
|
+
e[0] !== n.layout ? (l = n.layout.getAreaSize("secondary"), e[0] = n.layout, e[1] = l) : l = e[1];
|
|
3575
|
+
let u;
|
|
3576
|
+
e[2] !== n.layout ? (u = (de) => n.layout.setAreaSize("secondary", de), e[2] = n.layout, e[3] = u) : u = e[3];
|
|
3577
|
+
let m;
|
|
3578
|
+
e[4] !== c || e[5] !== s.collapsible || e[6] !== s.onCollapsedChange || e[7] !== l || e[8] !== u ? (m = {
|
|
3579
|
+
bodyNode: c,
|
|
3580
|
+
areaSize: l,
|
|
3581
|
+
collapsible: s.collapsible,
|
|
3582
|
+
onCollapsedChange: s.onCollapsedChange,
|
|
3583
|
+
onSizeChange: u
|
|
3584
|
+
}, e[4] = c, e[5] = s.collapsible, e[6] = s.onCollapsedChange, e[7] = l, e[8] = u, e[9] = m) : m = e[9];
|
|
3585
|
+
const f = Ca(m), h = $(n.layout.store, oc), b = s.has && (!s.collapsed || !s.collapsible), g = r.has && r.collapsed && r.collapsible, p = i.has && i.collapsed && i.collapsible, v = s.has && s.collapsed && s.collapsible, y = $(n.commands.store, rc), S = $(n.context.store, ic), w = $(n.layout.menuStore, sc), P = h.main.widgets;
|
|
3586
|
+
let x;
|
|
3587
|
+
e[10] !== y || e[11] !== S || e[12] !== w ? (x = Be({
|
|
3588
|
+
itemsByPath: w,
|
|
3589
|
+
commands: y,
|
|
3590
|
+
contextValues: S
|
|
3591
|
+
}, pt("main")), e[10] = y, e[11] = S, e[12] = w, e[13] = x) : x = e[13];
|
|
3592
|
+
const k = x.length > 0;
|
|
3593
|
+
let I;
|
|
3594
|
+
e[14] !== h.main.widgets || e[15] !== k ? (I = Ge(P, {
|
|
3595
|
+
hasLeadingActions: k
|
|
3596
|
+
}), e[14] = h.main.widgets, e[15] = k, e[16] = I) : I = e[16];
|
|
3597
|
+
const A = I, H = $(n.layout.store, lc);
|
|
3598
|
+
let M;
|
|
3599
|
+
e[17] !== y || e[18] !== S || e[19] !== w || e[20] !== H ? (M = Be({
|
|
3600
|
+
itemsByPath: w,
|
|
3601
|
+
commands: y,
|
|
3602
|
+
contextValues: S
|
|
3603
|
+
}, bo, {
|
|
3604
|
+
resource: H
|
|
3605
|
+
}), e[17] = y, e[18] = S, e[19] = w, e[20] = H, e[21] = M) : M = e[21];
|
|
3606
|
+
const T = M.length > 0, N = h.secondary.widgets;
|
|
3607
|
+
let _;
|
|
3608
|
+
e[22] !== y || e[23] !== S || e[24] !== w ? (_ = Be({
|
|
3609
|
+
itemsByPath: w,
|
|
3610
|
+
commands: y,
|
|
3611
|
+
contextValues: S
|
|
3612
|
+
}, pt("secondary")), e[22] = y, e[23] = S, e[24] = w, e[25] = _) : _ = e[25];
|
|
3613
|
+
const D = _.length > 0;
|
|
3614
|
+
let O;
|
|
3615
|
+
e[26] !== h.secondary.widgets || e[27] !== D ? (O = Ge(N, {
|
|
3616
|
+
hasLeadingActions: D
|
|
3617
|
+
}), e[26] = h.secondary.widgets, e[27] = D, e[28] = O) : O = e[28];
|
|
3618
|
+
const z = O;
|
|
3619
|
+
let R;
|
|
3620
|
+
e[29] !== h.secondary.widgets ? (R = Za(h.secondary.widgets), e[29] = h.secondary.widgets, e[30] = R) : R = e[30];
|
|
3621
|
+
const K = R, G = o || A || T || g || p || v;
|
|
3622
|
+
let V;
|
|
3623
|
+
e[31] !== n.layout ? (V = Pn(n.layout.getAreaSize("main-left"), Ua), e[31] = n.layout, e[32] = V) : V = e[32];
|
|
3624
|
+
const X = V;
|
|
3625
|
+
let q;
|
|
3626
|
+
e[33] !== n.layout ? (q = Pn(n.layout.getAreaSize("main-right"), Ga), e[33] = n.layout, e[34] = q) : q = e[34];
|
|
3627
|
+
const J = q, ce = G ? "auto" : void 0, fe = b ? "8px" : void 0, ee = b ? `minmax(0, ${f.height}px)` : void 0;
|
|
3628
|
+
let ie;
|
|
3629
|
+
e[35] !== ce || e[36] !== fe || e[37] !== ee ? (ie = [ce, "minmax(0, 1fr)", fe, ee].filter(Boolean), e[35] = ce, e[36] = fe, e[37] = ee, e[38] = ie) : ie = e[38];
|
|
3630
|
+
const he = ie.join(" ");
|
|
3631
|
+
let Y;
|
|
3632
|
+
e[39] !== n ? (Y = /* @__PURE__ */ a(ye, { workbench: n, area: "main", title: "Main", showHeader: !1 }), e[39] = n, e[40] = Y) : Y = e[40];
|
|
3633
|
+
let te;
|
|
3634
|
+
e[41] !== Y || e[42] !== n ? (te = /* @__PURE__ */ a(dt, { workbench: n, area: "main", bg: F.main, flex: "1", h: "full", minH: "0", minW: "0", w: "full", overflow: "hidden", children: Y }), e[41] = Y, e[42] = n, e[43] = te) : te = e[43];
|
|
3635
|
+
const se = te;
|
|
3636
|
+
let ve;
|
|
3637
|
+
e[44] !== se || e[45] !== i.collapsed || e[46] !== i.collapsible || e[47] !== i.has || e[48] !== i.onCollapsedChange || e[49] !== J || e[50] !== n ? (ve = i.has ? /* @__PURE__ */ a(rt, { minH: "0", minW: "0", resizableSide: "right", resizablePanel: /* @__PURE__ */ a(Na, { workbench: n }), contentPanel: se, collapsed: i.collapsed && i.collapsible, collapsible: i.collapsible, defaultSizePx: J.defaultPx, minSizePx: J.minPx, maxSizePx: J.maxPx, contentMinSizePx: xn, resizeLabel: "Resize main-right panel", showResizeSeparator: !0, onSizeChange: (de) => n.layout.setAreaSize("main-right", de), onCollapsedChange: i.onCollapsedChange }) : se, e[44] = se, e[45] = i.collapsed, e[46] = i.collapsible, e[47] = i.has, e[48] = i.onCollapsedChange, e[49] = J, e[50] = n, e[51] = ve) : ve = e[51];
|
|
3638
|
+
const xe = ve;
|
|
3639
|
+
let Se;
|
|
3640
|
+
e[52] !== xe || e[53] !== r.collapsed || e[54] !== r.collapsible || e[55] !== r.has || e[56] !== r.onCollapsedChange || e[57] !== X || e[58] !== n ? (Se = r.has ? /* @__PURE__ */ a(rt, { minH: "0", minW: "0", resizableSide: "left", resizablePanel: /* @__PURE__ */ a(Ba, { workbench: n }), contentPanel: xe, collapsed: r.collapsed && r.collapsible, collapsible: r.collapsible, defaultSizePx: X.defaultPx, minSizePx: X.minPx, maxSizePx: X.maxPx, contentMinSizePx: xn, resizeLabel: "Resize main-left panel", showResizeSeparator: !0, onSizeChange: (de) => n.layout.setAreaSize("main-left", de), onCollapsedChange: r.onCollapsedChange }) : xe, e[52] = xe, e[53] = r.collapsed, e[54] = r.collapsible, e[55] = r.has, e[56] = r.onCollapsedChange, e[57] = X, e[58] = n, e[59] = Se) : Se = e[59];
|
|
3641
|
+
const ke = Se;
|
|
3642
|
+
let be;
|
|
3643
|
+
e[60] !== A || e[61] !== o || e[62] !== s.onOpen || e[63] !== K || e[64] !== r.onOpen || e[65] !== i.onOpen || e[66] !== v || e[67] !== G || e[68] !== g || e[69] !== p || e[70] !== n ? (be = G ? /* @__PURE__ */ a(Ja, { workbench: n, hasMainHeader: o, hasMainContentTabs: A, showMainLeftOpener: g, showMainRightOpener: p, showMainBottomOpener: v, mainBottomPanelOpener: K, onOpenMainLeftPanel: r.onOpen, onOpenMainRightPanel: i.onOpen, onOpenMainBottomPanel: s.onOpen }) : null, e[60] = A, e[61] = o, e[62] = s.onOpen, e[63] = K, e[64] = r.onOpen, e[65] = i.onOpen, e[66] = v, e[67] = G, e[68] = g, e[69] = p, e[70] = n, e[71] = be) : be = e[71];
|
|
3644
|
+
let ne;
|
|
3645
|
+
e[72] !== f || e[73] !== z || e[74] !== s.hasHeader || e[75] !== b || e[76] !== n ? (ne = b ? /* @__PURE__ */ a(Ea, { workbench: n, hasMainBottomHeader: s.hasHeader, hasMainBottomContentTabs: z, bottomResize: f }) : null, e[72] = f, e[73] = z, e[74] = s.hasHeader, e[75] = b, e[76] = n, e[77] = ne) : ne = e[77];
|
|
3646
|
+
let ge;
|
|
3647
|
+
return e[78] !== he || e[79] !== ke || e[80] !== be || e[81] !== ne ? (ge = /* @__PURE__ */ W(ko, { ref: d, as: "main", gridTemplateRows: he, h: "full", minH: "0", minW: "0", w: "full", children: [
|
|
3648
|
+
be,
|
|
3649
|
+
ke,
|
|
3650
|
+
ne
|
|
3651
|
+
] }), e[78] = he, e[79] = ke, e[80] = be, e[81] = ne, e[82] = ge) : ge = e[82], ge;
|
|
3652
|
+
};
|
|
3653
|
+
function tc(t) {
|
|
3654
|
+
return t.show;
|
|
3655
|
+
}
|
|
3656
|
+
function nc(t) {
|
|
3657
|
+
return /* @__PURE__ */ a(Qe, { content: t.label, children: /* @__PURE__ */ a(Ye, { variant: "ghost", size: "xs", "aria-label": t.label, flexShrink: 0, onClick: t.onOpen, children: /* @__PURE__ */ a(L, { name: t.icon, size: 16 }) }) }, t.id);
|
|
3658
|
+
}
|
|
3659
|
+
function oc(t) {
|
|
3660
|
+
return t.layout.areas;
|
|
3661
|
+
}
|
|
3662
|
+
function rc(t) {
|
|
3663
|
+
return t.commands;
|
|
3664
|
+
}
|
|
3665
|
+
function ic(t) {
|
|
3666
|
+
return t.values;
|
|
3667
|
+
}
|
|
3668
|
+
function sc(t) {
|
|
3669
|
+
return t.itemsByPath;
|
|
3670
|
+
}
|
|
3671
|
+
function lc(t) {
|
|
3672
|
+
return xt(t.layout, "primary");
|
|
3673
|
+
}
|
|
3674
|
+
const ac = 448, cc = 320, dc = (t) => {
|
|
3675
|
+
const e = C(5), {
|
|
3676
|
+
workbench: n,
|
|
3677
|
+
hasFloatingPanel: o,
|
|
3678
|
+
mounted: r,
|
|
3679
|
+
sessionHost: i
|
|
3680
|
+
} = t;
|
|
3681
|
+
if (!o || !r || !i)
|
|
3682
|
+
return null;
|
|
3683
|
+
let s;
|
|
3684
|
+
e[0] !== n ? (s = /* @__PURE__ */ a(ye, { workbench: n, area: "floating", title: "Session", showHeader: !1, transparent: !0 }), e[0] = n, e[1] = s) : s = e[1];
|
|
3685
|
+
let c;
|
|
3686
|
+
return e[2] !== i || e[3] !== s ? (c = On(s, i), e[2] = i, e[3] = s, e[4] = c) : c = e[4], c;
|
|
3687
|
+
}, uc = (t) => {
|
|
3688
|
+
const e = C(2), {
|
|
3689
|
+
workbench: n,
|
|
3690
|
+
hasFloatingHeader: o
|
|
3691
|
+
} = t;
|
|
3692
|
+
if (!o)
|
|
3693
|
+
return null;
|
|
3694
|
+
let r;
|
|
3695
|
+
return e[0] !== n ? (r = /* @__PURE__ */ a(j, { alignItems: "center", display: "flex", flex: "1", h: "full", minW: "0", overflow: "hidden", w: "full", children: /* @__PURE__ */ a(ye, { workbench: n, area: "floating-header", title: "Floating header", showHeader: !1, transparent: !0 }) }), e[0] = n, e[1] = r) : r = e[1], r;
|
|
3696
|
+
}, mc = (t) => {
|
|
3697
|
+
const e = C(13), {
|
|
3698
|
+
workbench: n,
|
|
3699
|
+
attached: o,
|
|
3700
|
+
contentPanel: r,
|
|
3701
|
+
contentMinSizePx: i,
|
|
3702
|
+
header: s,
|
|
3703
|
+
onAttachedSlotChange: c,
|
|
3704
|
+
onCollapseToBubble: d
|
|
3705
|
+
} = t;
|
|
3706
|
+
let l;
|
|
3707
|
+
e[0] !== s || e[1] !== c || e[2] !== n ? (l = /* @__PURE__ */ a(yl, { workbench: n, contentSlotRef: c, header: s }), e[0] = s, e[1] = c, e[2] = n, e[3] = l) : l = e[3];
|
|
3708
|
+
const u = !o;
|
|
3709
|
+
let m;
|
|
3710
|
+
e[4] !== o || e[5] !== d ? (m = (h) => {
|
|
3711
|
+
o && h && d();
|
|
3712
|
+
}, e[4] = o, e[5] = d, e[6] = m) : m = e[6];
|
|
3713
|
+
let f;
|
|
3714
|
+
return e[7] !== i || e[8] !== r || e[9] !== l || e[10] !== u || e[11] !== m ? (f = /* @__PURE__ */ a(rt, { h: "full", minH: "0", minW: "0", w: "full", resizableSide: "right", contentPanel: r, resizablePanel: l, collapsed: u, defaultSizePx: ac, minSizePx: cc, contentMinSizePx: i, resizeLabel: "Resize session panel", showResizeSeparator: !0, onCollapsedChange: m }), e[7] = i, e[8] = r, e[9] = l, e[10] = u, e[11] = m, e[12] = f) : f = e[12], f;
|
|
3715
|
+
}, fc = ["a[href]", "button", "input", "select", "textarea", "[contenteditable='true']", "[role='button']", "[role='checkbox']", "[role='menuitem']", "[role='option']", "[role='radio']", "[role='switch']", "[tabindex]:not([tabindex='-1'])"].join(","), hc = (t) => typeof t?.closest == "function", bc = (t, e) => t === e ? !0 : hc(t) ? !t.closest(fc) : !1, go = (t) => {
|
|
3716
|
+
t?.focus({
|
|
3717
|
+
preventScroll: !0
|
|
3718
|
+
});
|
|
3719
|
+
}, gc = (t) => {
|
|
3720
|
+
const e = C(4), {
|
|
3721
|
+
children: n
|
|
3722
|
+
} = t, o = me(null);
|
|
3723
|
+
let r, i;
|
|
3724
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (r = () => {
|
|
3725
|
+
go(o.current);
|
|
3726
|
+
}, i = [], e[0] = r, e[1] = i) : (r = e[0], i = e[1]), Lt(r, i);
|
|
3727
|
+
let s;
|
|
3728
|
+
return e[2] !== n ? (s = /* @__PURE__ */ a(le, { ref: o, h: "full", minH: "0", minW: "0", w: "full", tabIndex: -1, outline: "none", onPointerDown: yc, children: n }), e[2] = n, e[3] = s) : s = e[3], s;
|
|
3729
|
+
}, pc = (t) => {
|
|
3730
|
+
const e = C(10), {
|
|
3731
|
+
workbench: n,
|
|
3732
|
+
showAttachedSessionPanel: o,
|
|
3733
|
+
workbenchFrame: r,
|
|
3734
|
+
floatingHeader: i,
|
|
3735
|
+
contentMinSizePx: s,
|
|
3736
|
+
onAttachedSlotChange: c
|
|
3737
|
+
} = t;
|
|
3738
|
+
let d;
|
|
3739
|
+
e[0] !== n.sessionPanel ? (d = () => n.sessionPanel.setMode("bubble"), e[0] = n.sessionPanel, e[1] = d) : d = e[1];
|
|
3740
|
+
let l;
|
|
3741
|
+
return e[2] !== s || e[3] !== i || e[4] !== c || e[5] !== o || e[6] !== d || e[7] !== n || e[8] !== r ? (l = /* @__PURE__ */ a(gc, { children: /* @__PURE__ */ a(mc, { workbench: n, attached: o, contentPanel: r, contentMinSizePx: s, header: i, onAttachedSlotChange: c, onCollapseToBubble: d }) }), e[2] = s, e[3] = i, e[4] = c, e[5] = o, e[6] = d, e[7] = n, e[8] = r, e[9] = l) : l = e[9], l;
|
|
3742
|
+
};
|
|
3743
|
+
function yc(t) {
|
|
3744
|
+
bc(t.target, t.currentTarget) && go(t.currentTarget);
|
|
3745
|
+
}
|
|
3746
|
+
const Et = "left", vc = 240, Sc = 200, In = 320, wc = (t) => {
|
|
3747
|
+
const e = t.layout.getAreaSize("left");
|
|
3748
|
+
return {
|
|
3749
|
+
defaultPx: e?.defaultPx ?? vc,
|
|
3750
|
+
minPx: e?.minPx ?? Sc,
|
|
3751
|
+
maxPx: e?.maxPx
|
|
3752
|
+
};
|
|
3753
|
+
}, xc = () => {
|
|
3754
|
+
if (typeof document > "u") return null;
|
|
3755
|
+
const t = document.createElement("div");
|
|
3756
|
+
return t.style.display = "contents", t.dataset.workbenchSessionPanelHost = "", t;
|
|
3757
|
+
}, Pc = (t) => t.showAttachedSessionPanel ? t.sessionAttachedSlot : t.showBubbleSessionPanel ? t.sessionBubbleSlot : null, De = (t, e, n) => t.areas[n].widgets.length > 0 || !!e[n], Ic = (t, e) => ({
|
|
3758
|
+
layout: t,
|
|
3759
|
+
hasTopWidgets: De(t, e, "nav"),
|
|
3760
|
+
hasActivityBarWidgets: De(t, e, "activity"),
|
|
3761
|
+
hasLeftHeaderWidgets: De(t, e, "left-header"),
|
|
3762
|
+
hasLeftWidgets: De(t, e, "left"),
|
|
3763
|
+
hasStatusWidgets: De(t, e, "status"),
|
|
3764
|
+
hasFloatingHeaderWidgets: De(t, e, "floating-header"),
|
|
3765
|
+
hasFloatingWidgets: De(t, e, "floating")
|
|
3766
|
+
}), Cc = (t) => {
|
|
3767
|
+
const {
|
|
3768
|
+
workbench: e,
|
|
3769
|
+
renderParamField: n
|
|
3770
|
+
} = t;
|
|
3771
|
+
ga(e, {
|
|
3772
|
+
renderParamField: n
|
|
3773
|
+
}), fa(e), ba(e), na(e);
|
|
3774
|
+
const [o, r] = U(null), [i, s] = U(null), c = me(null);
|
|
3775
|
+
c.current || (c.current = xc());
|
|
3776
|
+
const d = $(e.layout.store, (R) => R.layout), l = $(e.layout.store, (R) => R.placeholders), u = $(e.sessionPanel.store, (R) => R.mode), m = $(e.commandPalette.store, (R) => R.open), f = $(e.commandPalette.store, (R) => R.initialQuery), h = $(e.panels.store, (R) => R.openByAreaId[Et] ?? !0), {
|
|
3777
|
+
hasActivityBarWidgets: b,
|
|
3778
|
+
hasFloatingHeaderWidgets: g,
|
|
3779
|
+
hasFloatingWidgets: p,
|
|
3780
|
+
hasLeftHeaderWidgets: v,
|
|
3781
|
+
hasLeftWidgets: y,
|
|
3782
|
+
hasStatusWidgets: S,
|
|
3783
|
+
hasTopWidgets: w
|
|
3784
|
+
} = Ic(d, l), P = g || p, x = y || v, k = Bt(e, "left-header", "left"), I = wc(e), A = P && u === "attached", H = P && u === "bubble", M = P && u !== "closed", T = (R, K) => Ot(e, R, K), N = /* @__PURE__ */ a(uc, { workbench: e, hasFloatingHeader: g }), _ = Pc({
|
|
3785
|
+
showAttachedSessionPanel: A,
|
|
3786
|
+
showBubbleSessionPanel: H,
|
|
3787
|
+
sessionAttachedSlot: o,
|
|
3788
|
+
sessionBubbleSlot: i
|
|
3789
|
+
});
|
|
3790
|
+
Lt(() => {
|
|
3791
|
+
const R = c.current;
|
|
3792
|
+
R && (_ ? R.parentNode !== _ && _.appendChild(R) : !M && R.parentNode && R.parentNode.removeChild(R));
|
|
3793
|
+
}, [_, M]);
|
|
3794
|
+
const D = /* @__PURE__ */ W(le, { direction: "column", h: "full", minH: "0", minW: "0", w: "full", children: [
|
|
3795
|
+
/* @__PURE__ */ a($a, { workbench: e, hasTop: w, showLeftPanelOpener: !!(x && !h && k), onOpenLeftPanel: () => T(Et, !0) }),
|
|
3796
|
+
/* @__PURE__ */ a(le, { flex: "1", minH: "0", minW: "0", overflow: "hidden", children: /* @__PURE__ */ a(ec, { workbench: e }) })
|
|
3797
|
+
] }), O = x ? /* @__PURE__ */ a(rt, { flex: "1", minH: "0", minW: "0", resizablePanel: /* @__PURE__ */ a(Ha, { workbench: e, hasHeader: v }), contentPanel: D, collapsed: !h && k, collapsible: k, defaultSizePx: I.defaultPx, minSizePx: I.minPx, maxSizePx: I.maxPx, contentMinSizePx: In, resizeLabel: "Resize sidebar", showResizeSeparator: !0, onSizeChange: (R) => e.layout.setAreaSize("left", R), onCollapsedChange: (R) => {
|
|
3798
|
+
(!R || k) && T(Et, !R);
|
|
3799
|
+
} }) : D, z = /* @__PURE__ */ W(le, { direction: "column", position: "relative", h: "full", minH: "0", minW: "0", w: "full", bg: F.main, color: "fg", children: [
|
|
3800
|
+
/* @__PURE__ */ W(le, { flex: "1", minH: "0", minW: "0", overflow: "hidden", position: "relative", children: [
|
|
3801
|
+
b ? /* @__PURE__ */ a(Ma, { workbench: e }) : null,
|
|
3802
|
+
/* @__PURE__ */ a(le, { flex: "1", minH: "0", minW: "0", overflow: "hidden", position: "relative", children: O })
|
|
3803
|
+
] }),
|
|
3804
|
+
S ? /* @__PURE__ */ a(Oa, { workbench: e }) : null,
|
|
3805
|
+
/* @__PURE__ */ a(Xl, { workbench: e }),
|
|
3806
|
+
P ? /* @__PURE__ */ a(vl, { workbench: e, contentSlotRef: s, bottomOffset: S ? ho : void 0, header: N }) : null,
|
|
3807
|
+
/* @__PURE__ */ a(Vi, { workbench: e, open: m, initialQuery: f, renderParamField: n, onClose: () => e.commandPalette.close() }),
|
|
3808
|
+
/* @__PURE__ */ a(us, { workbench: e }),
|
|
3809
|
+
/* @__PURE__ */ a(gs, { workbench: e })
|
|
3810
|
+
] });
|
|
3811
|
+
return /* @__PURE__ */ W(Vl, { h: "full", minH: "0", minW: "0", w: "full", children: [
|
|
3812
|
+
/* @__PURE__ */ a(pc, { workbench: e, showAttachedSessionPanel: A, workbenchFrame: z, floatingHeader: N, contentMinSizePx: In, onAttachedSlotChange: r }),
|
|
3813
|
+
/* @__PURE__ */ a(dc, { workbench: e, hasFloatingPanel: P, mounted: M, sessionHost: c.current }),
|
|
3814
|
+
/* @__PURE__ */ a(ts, { workbench: e })
|
|
3815
|
+
] });
|
|
3816
|
+
}, Uc = (t) => {
|
|
3817
|
+
const e = C(7), n = zl(t.workbench), o = pa(t.workbench);
|
|
3818
|
+
let r;
|
|
3819
|
+
e[0] !== t ? (r = /* @__PURE__ */ a(Cc, { ...t }), e[0] = t, e[1] = r) : r = e[1];
|
|
3820
|
+
let i;
|
|
3821
|
+
e[2] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ a(Ko, {}), e[2] = i) : i = e[2];
|
|
3822
|
+
let s;
|
|
3823
|
+
return e[3] !== o || e[4] !== r || e[5] !== n ? (s = /* @__PURE__ */ W(Ll, { themePreferences: n, fileIconThemePreferences: o, children: [
|
|
3824
|
+
r,
|
|
3825
|
+
i
|
|
3826
|
+
] }), e[3] = o, e[4] = r, e[5] = n, e[6] = s) : s = e[6], s;
|
|
3827
|
+
}, Cn = (t) => {
|
|
3828
|
+
for (const e of t.values()) e.disposable.dispose();
|
|
3829
|
+
t.clear();
|
|
3830
|
+
}, kc = (t, e, n) => {
|
|
3831
|
+
const o = new Set(n.map((r) => r.id));
|
|
3832
|
+
for (const [r, i] of e)
|
|
3833
|
+
o.has(r) || (i.disposable.dispose(), e.delete(r));
|
|
3834
|
+
for (const r of n)
|
|
3835
|
+
e.has(r.id) || e.set(r.id, {
|
|
3836
|
+
disposable: t.registerModule(r)
|
|
3837
|
+
});
|
|
3838
|
+
}, Gc = (t) => {
|
|
3839
|
+
const e = C(7), {
|
|
3840
|
+
workbench: n,
|
|
3841
|
+
modules: o
|
|
3842
|
+
} = t, r = me(n);
|
|
3843
|
+
let i;
|
|
3844
|
+
e[0] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (i = /* @__PURE__ */ new Map(), e[0] = i) : i = e[0];
|
|
3845
|
+
const s = me(i);
|
|
3846
|
+
let c, d;
|
|
3847
|
+
e[1] !== o || e[2] !== n ? (c = () => {
|
|
3848
|
+
r.current !== n && (Cn(s.current), r.current = n), kc(n, s.current, o);
|
|
3849
|
+
}, d = [o, n], e[1] = o, e[2] = n, e[3] = c, e[4] = d) : (c = e[3], d = e[4]), re(c, d);
|
|
3850
|
+
let l, u;
|
|
3851
|
+
return e[5] === /* @__PURE__ */ Symbol.for("react.memo_cache_sentinel") ? (l = () => () => Cn(s.current), u = [], e[5] = l, e[6] = u) : (l = e[5], u = e[6]), re(l, u), null;
|
|
3852
|
+
};
|
|
3853
|
+
export {
|
|
3854
|
+
Xe as SETTINGS_RESOURCE_KIND,
|
|
3855
|
+
_l as WORKBENCH_SETTINGS_NAV_WIDGET_ID,
|
|
3856
|
+
Wl as WORKBENCH_SETTINGS_OPEN_COMMAND_ID,
|
|
3857
|
+
Rl as WORKBENCH_SETTINGS_PANEL_WIDGET_ID,
|
|
3858
|
+
Tl as WORKBENCH_SETTINGS_WIDGET_ID,
|
|
3859
|
+
St as WORKBENCH_TERMINAL_LAUNCHER_WIDGET_ID,
|
|
3860
|
+
mn as WORKBENCH_TERMINAL_OPEN_COMMAND_ID,
|
|
3861
|
+
Ct as WORKBENCH_TERMINAL_WIDGET_ID,
|
|
3862
|
+
Uc as Workbench,
|
|
3863
|
+
ye as WorkbenchArea,
|
|
3864
|
+
lt as WorkbenchAreaTabs,
|
|
3865
|
+
ti as WorkbenchBreadcrumbView,
|
|
3866
|
+
Gn as WorkbenchClaimContext,
|
|
3867
|
+
Vi as WorkbenchCommandPalette,
|
|
3868
|
+
dt as WorkbenchFocusRegion,
|
|
3869
|
+
Nt as WorkbenchHeaderActions,
|
|
3870
|
+
L as WorkbenchIcon,
|
|
3871
|
+
ts as WorkbenchKeepAliveLayer,
|
|
3872
|
+
us as WorkbenchKeybindingDispatcher,
|
|
3873
|
+
Gc as WorkbenchModuleHost,
|
|
3874
|
+
gs as WorkbenchNotificationHost,
|
|
3875
|
+
Xl as WorkbenchOverlayLayer,
|
|
3876
|
+
xs as WorkbenchPreferencesForm,
|
|
3877
|
+
yl as WorkbenchSessionAttachedPanel,
|
|
3878
|
+
vl as WorkbenchSessionBubbleContainer,
|
|
3879
|
+
Hl as WorkbenchTerminalPanel,
|
|
3880
|
+
Ll as WorkbenchThemeProvider,
|
|
3881
|
+
Vl as WorkbenchThemeScope,
|
|
3882
|
+
io as WorkbenchTreeView,
|
|
3883
|
+
Jt as WorkbenchWidgetHost,
|
|
3884
|
+
kl as buildSettingsTreeBody,
|
|
3885
|
+
$l as createControllerTerminalBridge,
|
|
3886
|
+
$s as createTreeContextMenuItems,
|
|
3887
|
+
ds as createWorkbenchHotkeyRegistrations,
|
|
3888
|
+
Qc as createWorkbenchRendererRegistry,
|
|
3889
|
+
jc as createWorkbenchSettingsModule,
|
|
3890
|
+
qc as createWorkbenchTerminalModule,
|
|
3891
|
+
Cn as disposeWorkbenchModuleHostRegistrations,
|
|
3892
|
+
mo as isSettingsScopeVisible,
|
|
3893
|
+
Fc as listWorkbenchMenuItems,
|
|
3894
|
+
cs as normalizeWorkbenchKeybinding,
|
|
3895
|
+
Ol as openWorkbenchTerminal,
|
|
3896
|
+
Ss as paramValueToPreference,
|
|
3897
|
+
vs as preferenceSchemaToParams,
|
|
3898
|
+
xl as settingsItemResource,
|
|
3899
|
+
uo as settingsPanelResource,
|
|
3900
|
+
kc as syncWorkbenchModuleHostRegistrations,
|
|
3901
|
+
Kc as useWorkbenchClaim,
|
|
3902
|
+
$ as useWorkbenchStore,
|
|
3903
|
+
zl as useWorkbenchThemePreferences
|
|
3904
|
+
};
|
|
3905
|
+
//# sourceMappingURL=react.js.map
|