superleap-code-editor 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/layout/sidebar.d.ts +1 -0
- package/dist/components/layout/sidebar.d.ts.map +1 -1
- package/dist/index.cjs.js +38 -9
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +991 -580
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import ne, { useState as
|
|
2
|
-
import
|
|
3
|
-
import { Tooltip as Pe, Button as
|
|
4
|
-
import { Alert as
|
|
5
|
-
import { IconFolderOpen as
|
|
6
|
-
var q = { exports: {} },
|
|
1
|
+
import ne, { useState as I, useCallback as A, useEffect as Te, useMemo as Nt } from "react";
|
|
2
|
+
import Ct from "@monaco-editor/react";
|
|
3
|
+
import { Tooltip as Pe, Button as re, Splitter as O, Alert as Rt, Tree as Ft } from "antd";
|
|
4
|
+
import { Alert as br, Button as yr, Splitter as jr, Tooltip as wr, Tree as Er } from "antd";
|
|
5
|
+
import { IconFolderOpen as De, IconDatabase as Ae, IconCode as ze, IconHistory as $e, IconFlask as _t, IconSettings as Le, IconPlus as St, IconFile as Tt, IconEyeOff as Pt, IconEye as Ot, IconPlayerPlay as Me, IconDownload as It, IconDeviceFloppy as kt, IconSearch as Be, IconChevronRight as Dt, IconBook as At, IconRefresh as zt, IconAlertTriangle as $t, IconCircleCheck as Lt, IconCircleX as Mt, IconUser as Bt, IconClock as Wt, IconRotate as Vt } from "@tabler/icons-react";
|
|
6
|
+
var q = { exports: {} }, $ = {};
|
|
7
7
|
/**
|
|
8
8
|
* @license React
|
|
9
9
|
* react-jsx-runtime.production.min.js
|
|
@@ -13,21 +13,21 @@ var q = { exports: {} }, L = {};
|
|
|
13
13
|
* This source code is licensed under the MIT license found in the
|
|
14
14
|
* LICENSE file in the root directory of this source tree.
|
|
15
15
|
*/
|
|
16
|
-
var
|
|
17
|
-
function
|
|
18
|
-
if (
|
|
19
|
-
|
|
20
|
-
var o = ne,
|
|
21
|
-
function
|
|
22
|
-
var
|
|
23
|
-
|
|
24
|
-
for (
|
|
25
|
-
if (
|
|
26
|
-
return { $$typeof:
|
|
16
|
+
var Oe;
|
|
17
|
+
function Yt() {
|
|
18
|
+
if (Oe) return $;
|
|
19
|
+
Oe = 1;
|
|
20
|
+
var o = ne, r = Symbol.for("react.element"), s = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, c = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, g = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
21
|
+
function j(w, x, N) {
|
|
22
|
+
var d, E = {}, C = null, S = null;
|
|
23
|
+
N !== void 0 && (C = "" + N), x.key !== void 0 && (C = "" + x.key), x.ref !== void 0 && (S = x.ref);
|
|
24
|
+
for (d in x) i.call(x, d) && !g.hasOwnProperty(d) && (E[d] = x[d]);
|
|
25
|
+
if (w && w.defaultProps) for (d in x = w.defaultProps, x) E[d] === void 0 && (E[d] = x[d]);
|
|
26
|
+
return { $$typeof: r, type: w, key: C, ref: S, props: E, _owner: c.current };
|
|
27
27
|
}
|
|
28
|
-
return
|
|
28
|
+
return $.Fragment = s, $.jsx = j, $.jsxs = j, $;
|
|
29
29
|
}
|
|
30
|
-
var
|
|
30
|
+
var L = {};
|
|
31
31
|
/**
|
|
32
32
|
* @license React
|
|
33
33
|
* react-jsx-runtime.development.js
|
|
@@ -38,53 +38,53 @@ var W = {};
|
|
|
38
38
|
* LICENSE file in the root directory of this source tree.
|
|
39
39
|
*/
|
|
40
40
|
var Ie;
|
|
41
|
-
function
|
|
41
|
+
function Ut() {
|
|
42
42
|
return Ie || (Ie = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
43
|
-
var o = ne,
|
|
44
|
-
function
|
|
43
|
+
var o = ne, r = Symbol.for("react.element"), s = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), c = Symbol.for("react.strict_mode"), g = Symbol.for("react.profiler"), j = Symbol.for("react.provider"), w = Symbol.for("react.context"), x = Symbol.for("react.forward_ref"), N = Symbol.for("react.suspense"), d = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), C = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), M = Symbol.iterator, H = "@@iterator";
|
|
44
|
+
function J(e) {
|
|
45
45
|
if (e === null || typeof e != "object")
|
|
46
46
|
return null;
|
|
47
|
-
var
|
|
48
|
-
return typeof
|
|
47
|
+
var n = M && e[M] || e[H];
|
|
48
|
+
return typeof n == "function" ? n : null;
|
|
49
49
|
}
|
|
50
|
-
var
|
|
50
|
+
var v = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
51
51
|
function h(e) {
|
|
52
52
|
{
|
|
53
|
-
for (var
|
|
54
|
-
|
|
55
|
-
|
|
53
|
+
for (var n = arguments.length, a = new Array(n > 1 ? n - 1 : 0), l = 1; l < n; l++)
|
|
54
|
+
a[l - 1] = arguments[l];
|
|
55
|
+
Ue("error", e, a);
|
|
56
56
|
}
|
|
57
57
|
}
|
|
58
|
-
function
|
|
58
|
+
function Ue(e, n, a) {
|
|
59
59
|
{
|
|
60
|
-
var
|
|
61
|
-
|
|
62
|
-
var p =
|
|
60
|
+
var l = v.ReactDebugCurrentFrame, m = l.getStackAddendum();
|
|
61
|
+
m !== "" && (n += "%s", a = a.concat([m]));
|
|
62
|
+
var p = a.map(function(f) {
|
|
63
63
|
return String(f);
|
|
64
64
|
});
|
|
65
|
-
p.unshift("Warning: " +
|
|
65
|
+
p.unshift("Warning: " + n), Function.prototype.apply.call(console[e], console, p);
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
|
-
var
|
|
68
|
+
var qe = !1, He = !1, Je = !1, Ge = !1, Ke = !1, ae;
|
|
69
69
|
ae = Symbol.for("react.module.reference");
|
|
70
|
-
function
|
|
71
|
-
return !!(typeof e == "string" || typeof e == "function" || e === i || e ===
|
|
70
|
+
function Xe(e) {
|
|
71
|
+
return !!(typeof e == "string" || typeof e == "function" || e === i || e === g || Ke || e === c || e === N || e === d || Ge || e === S || qe || He || Je || typeof e == "object" && e !== null && (e.$$typeof === C || e.$$typeof === E || e.$$typeof === j || e.$$typeof === w || e.$$typeof === x || // This needs to include all possible module reference object
|
|
72
72
|
// types supported by any Flight configuration anywhere since
|
|
73
73
|
// we don't know which Flight build this will end up being used
|
|
74
74
|
// with.
|
|
75
75
|
e.$$typeof === ae || e.getModuleId !== void 0));
|
|
76
76
|
}
|
|
77
|
-
function
|
|
78
|
-
var
|
|
79
|
-
if (
|
|
80
|
-
return
|
|
81
|
-
var
|
|
82
|
-
return
|
|
77
|
+
function Ze(e, n, a) {
|
|
78
|
+
var l = e.displayName;
|
|
79
|
+
if (l)
|
|
80
|
+
return l;
|
|
81
|
+
var m = n.displayName || n.name || "";
|
|
82
|
+
return m !== "" ? a + "(" + m + ")" : a;
|
|
83
83
|
}
|
|
84
|
-
function
|
|
84
|
+
function ie(e) {
|
|
85
85
|
return e.displayName || "Context";
|
|
86
86
|
}
|
|
87
|
-
function
|
|
87
|
+
function T(e) {
|
|
88
88
|
if (e == null)
|
|
89
89
|
return null;
|
|
90
90
|
if (typeof e.tag == "number" && h("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
@@ -94,34 +94,34 @@ function Sr() {
|
|
|
94
94
|
switch (e) {
|
|
95
95
|
case i:
|
|
96
96
|
return "Fragment";
|
|
97
|
-
case
|
|
97
|
+
case s:
|
|
98
98
|
return "Portal";
|
|
99
|
-
case
|
|
99
|
+
case g:
|
|
100
100
|
return "Profiler";
|
|
101
|
-
case
|
|
101
|
+
case c:
|
|
102
102
|
return "StrictMode";
|
|
103
|
-
case
|
|
103
|
+
case N:
|
|
104
104
|
return "Suspense";
|
|
105
|
-
case
|
|
105
|
+
case d:
|
|
106
106
|
return "SuspenseList";
|
|
107
107
|
}
|
|
108
108
|
if (typeof e == "object")
|
|
109
109
|
switch (e.$$typeof) {
|
|
110
|
-
case
|
|
111
|
-
var r = e;
|
|
112
|
-
return oe(r) + ".Consumer";
|
|
113
|
-
case x:
|
|
110
|
+
case w:
|
|
114
111
|
var n = e;
|
|
115
|
-
return
|
|
116
|
-
case
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
return
|
|
121
|
-
case
|
|
122
|
-
var
|
|
112
|
+
return ie(n) + ".Consumer";
|
|
113
|
+
case j:
|
|
114
|
+
var a = e;
|
|
115
|
+
return ie(a._context) + ".Provider";
|
|
116
|
+
case x:
|
|
117
|
+
return Ze(e, e.render, "ForwardRef");
|
|
118
|
+
case E:
|
|
119
|
+
var l = e.displayName || null;
|
|
120
|
+
return l !== null ? l : T(e.type) || "Memo";
|
|
121
|
+
case C: {
|
|
122
|
+
var m = e, p = m._payload, f = m._init;
|
|
123
123
|
try {
|
|
124
|
-
return
|
|
124
|
+
return T(f(p));
|
|
125
125
|
} catch {
|
|
126
126
|
return null;
|
|
127
127
|
}
|
|
@@ -129,14 +129,14 @@ function Sr() {
|
|
|
129
129
|
}
|
|
130
130
|
return null;
|
|
131
131
|
}
|
|
132
|
-
var P = Object.assign,
|
|
132
|
+
var P = Object.assign, z = 0, oe, le, ce, de, ue, fe, me;
|
|
133
133
|
function he() {
|
|
134
134
|
}
|
|
135
135
|
he.__reactDisabledLog = !0;
|
|
136
|
-
function
|
|
136
|
+
function Qe() {
|
|
137
137
|
{
|
|
138
|
-
if (
|
|
139
|
-
|
|
138
|
+
if (z === 0) {
|
|
139
|
+
oe = console.log, le = console.info, ce = console.warn, de = console.error, ue = console.group, fe = console.groupCollapsed, me = console.groupEnd;
|
|
140
140
|
var e = {
|
|
141
141
|
configurable: !0,
|
|
142
142
|
enumerable: !0,
|
|
@@ -153,12 +153,12 @@ function Sr() {
|
|
|
153
153
|
groupEnd: e
|
|
154
154
|
});
|
|
155
155
|
}
|
|
156
|
-
|
|
156
|
+
z++;
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
|
-
function
|
|
159
|
+
function et() {
|
|
160
160
|
{
|
|
161
|
-
if (
|
|
161
|
+
if (z--, z === 0) {
|
|
162
162
|
var e = {
|
|
163
163
|
configurable: !0,
|
|
164
164
|
enumerable: !0,
|
|
@@ -166,7 +166,7 @@ function Sr() {
|
|
|
166
166
|
};
|
|
167
167
|
Object.defineProperties(console, {
|
|
168
168
|
log: P({}, e, {
|
|
169
|
-
value:
|
|
169
|
+
value: oe
|
|
170
170
|
}),
|
|
171
171
|
info: P({}, e, {
|
|
172
172
|
value: le
|
|
@@ -175,57 +175,57 @@ function Sr() {
|
|
|
175
175
|
value: ce
|
|
176
176
|
}),
|
|
177
177
|
error: P({}, e, {
|
|
178
|
-
value:
|
|
178
|
+
value: de
|
|
179
179
|
}),
|
|
180
180
|
group: P({}, e, {
|
|
181
|
-
value:
|
|
181
|
+
value: ue
|
|
182
182
|
}),
|
|
183
183
|
groupCollapsed: P({}, e, {
|
|
184
|
-
value:
|
|
184
|
+
value: fe
|
|
185
185
|
}),
|
|
186
186
|
groupEnd: P({}, e, {
|
|
187
|
-
value:
|
|
187
|
+
value: me
|
|
188
188
|
})
|
|
189
189
|
});
|
|
190
190
|
}
|
|
191
|
-
|
|
191
|
+
z < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
192
192
|
}
|
|
193
193
|
}
|
|
194
|
-
var
|
|
195
|
-
function
|
|
194
|
+
var G = v.ReactCurrentDispatcher, K;
|
|
195
|
+
function B(e, n, a) {
|
|
196
196
|
{
|
|
197
|
-
if (
|
|
197
|
+
if (K === void 0)
|
|
198
198
|
try {
|
|
199
199
|
throw Error();
|
|
200
|
-
} catch (
|
|
201
|
-
var
|
|
202
|
-
|
|
200
|
+
} catch (m) {
|
|
201
|
+
var l = m.stack.trim().match(/\n( *(at )?)/);
|
|
202
|
+
K = l && l[1] || "";
|
|
203
203
|
}
|
|
204
204
|
return `
|
|
205
|
-
` +
|
|
205
|
+
` + K + e;
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
var X = !1,
|
|
208
|
+
var X = !1, W;
|
|
209
209
|
{
|
|
210
|
-
var
|
|
211
|
-
|
|
210
|
+
var tt = typeof WeakMap == "function" ? WeakMap : Map;
|
|
211
|
+
W = new tt();
|
|
212
212
|
}
|
|
213
|
-
function pe(e,
|
|
213
|
+
function pe(e, n) {
|
|
214
214
|
if (!e || X)
|
|
215
215
|
return "";
|
|
216
216
|
{
|
|
217
|
-
var
|
|
218
|
-
if (
|
|
219
|
-
return
|
|
217
|
+
var a = W.get(e);
|
|
218
|
+
if (a !== void 0)
|
|
219
|
+
return a;
|
|
220
220
|
}
|
|
221
|
-
var
|
|
221
|
+
var l;
|
|
222
222
|
X = !0;
|
|
223
|
-
var
|
|
223
|
+
var m = Error.prepareStackTrace;
|
|
224
224
|
Error.prepareStackTrace = void 0;
|
|
225
225
|
var p;
|
|
226
|
-
p =
|
|
226
|
+
p = G.current, G.current = null, Qe();
|
|
227
227
|
try {
|
|
228
|
-
if (
|
|
228
|
+
if (n) {
|
|
229
229
|
var f = function() {
|
|
230
230
|
throw Error();
|
|
231
231
|
};
|
|
@@ -236,249 +236,249 @@ function Sr() {
|
|
|
236
236
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
237
237
|
try {
|
|
238
238
|
Reflect.construct(f, []);
|
|
239
|
-
} catch (
|
|
240
|
-
|
|
239
|
+
} catch (_) {
|
|
240
|
+
l = _;
|
|
241
241
|
}
|
|
242
242
|
Reflect.construct(e, [], f);
|
|
243
243
|
} else {
|
|
244
244
|
try {
|
|
245
245
|
f.call();
|
|
246
|
-
} catch (
|
|
247
|
-
|
|
246
|
+
} catch (_) {
|
|
247
|
+
l = _;
|
|
248
248
|
}
|
|
249
249
|
e.call(f.prototype);
|
|
250
250
|
}
|
|
251
251
|
} else {
|
|
252
252
|
try {
|
|
253
253
|
throw Error();
|
|
254
|
-
} catch (
|
|
255
|
-
|
|
254
|
+
} catch (_) {
|
|
255
|
+
l = _;
|
|
256
256
|
}
|
|
257
257
|
e();
|
|
258
258
|
}
|
|
259
|
-
} catch (
|
|
260
|
-
if (
|
|
261
|
-
for (var
|
|
262
|
-
`),
|
|
263
|
-
`),
|
|
264
|
-
|
|
265
|
-
for (;
|
|
266
|
-
if (
|
|
267
|
-
if (
|
|
259
|
+
} catch (_) {
|
|
260
|
+
if (_ && l && typeof _.stack == "string") {
|
|
261
|
+
for (var u = _.stack.split(`
|
|
262
|
+
`), R = l.stack.split(`
|
|
263
|
+
`), b = u.length - 1, y = R.length - 1; b >= 1 && y >= 0 && u[b] !== R[y]; )
|
|
264
|
+
y--;
|
|
265
|
+
for (; b >= 1 && y >= 0; b--, y--)
|
|
266
|
+
if (u[b] !== R[y]) {
|
|
267
|
+
if (b !== 1 || y !== 1)
|
|
268
268
|
do
|
|
269
|
-
if (
|
|
270
|
-
var
|
|
271
|
-
` +
|
|
272
|
-
return e.displayName &&
|
|
269
|
+
if (b--, y--, y < 0 || u[b] !== R[y]) {
|
|
270
|
+
var F = `
|
|
271
|
+
` + u[b].replace(" at new ", " at ");
|
|
272
|
+
return e.displayName && F.includes("<anonymous>") && (F = F.replace("<anonymous>", e.displayName)), typeof e == "function" && W.set(e, F), F;
|
|
273
273
|
}
|
|
274
|
-
while (
|
|
274
|
+
while (b >= 1 && y >= 0);
|
|
275
275
|
break;
|
|
276
276
|
}
|
|
277
277
|
}
|
|
278
278
|
} finally {
|
|
279
|
-
X = !1,
|
|
279
|
+
X = !1, G.current = p, et(), Error.prepareStackTrace = m;
|
|
280
280
|
}
|
|
281
|
-
var D = e ? e.displayName || e.name : "", Se = D ?
|
|
282
|
-
return typeof e == "function" &&
|
|
281
|
+
var D = e ? e.displayName || e.name : "", Se = D ? B(D) : "";
|
|
282
|
+
return typeof e == "function" && W.set(e, Se), Se;
|
|
283
283
|
}
|
|
284
|
-
function
|
|
284
|
+
function rt(e, n, a) {
|
|
285
285
|
return pe(e, !1);
|
|
286
286
|
}
|
|
287
|
-
function
|
|
288
|
-
var
|
|
289
|
-
return !!(
|
|
287
|
+
function nt(e) {
|
|
288
|
+
var n = e.prototype;
|
|
289
|
+
return !!(n && n.isReactComponent);
|
|
290
290
|
}
|
|
291
|
-
function
|
|
291
|
+
function V(e, n, a) {
|
|
292
292
|
if (e == null)
|
|
293
293
|
return "";
|
|
294
294
|
if (typeof e == "function")
|
|
295
|
-
return pe(e,
|
|
295
|
+
return pe(e, nt(e));
|
|
296
296
|
if (typeof e == "string")
|
|
297
|
-
return
|
|
297
|
+
return B(e);
|
|
298
298
|
switch (e) {
|
|
299
|
-
case
|
|
300
|
-
return
|
|
301
|
-
case
|
|
302
|
-
return
|
|
299
|
+
case N:
|
|
300
|
+
return B("Suspense");
|
|
301
|
+
case d:
|
|
302
|
+
return B("SuspenseList");
|
|
303
303
|
}
|
|
304
304
|
if (typeof e == "object")
|
|
305
305
|
switch (e.$$typeof) {
|
|
306
|
-
case
|
|
307
|
-
return
|
|
308
|
-
case
|
|
309
|
-
return
|
|
310
|
-
case
|
|
311
|
-
var
|
|
306
|
+
case x:
|
|
307
|
+
return rt(e.render);
|
|
308
|
+
case E:
|
|
309
|
+
return V(e.type, n, a);
|
|
310
|
+
case C: {
|
|
311
|
+
var l = e, m = l._payload, p = l._init;
|
|
312
312
|
try {
|
|
313
|
-
return
|
|
313
|
+
return V(p(m), n, a);
|
|
314
314
|
} catch {
|
|
315
315
|
}
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
return "";
|
|
319
319
|
}
|
|
320
|
-
var
|
|
320
|
+
var Y = Object.prototype.hasOwnProperty, xe = {}, ve = v.ReactDebugCurrentFrame;
|
|
321
321
|
function U(e) {
|
|
322
322
|
if (e) {
|
|
323
|
-
var
|
|
324
|
-
|
|
323
|
+
var n = e._owner, a = V(e.type, e._source, n ? n.type : null);
|
|
324
|
+
ve.setExtraStackFrame(a);
|
|
325
325
|
} else
|
|
326
|
-
|
|
326
|
+
ve.setExtraStackFrame(null);
|
|
327
327
|
}
|
|
328
|
-
function
|
|
328
|
+
function st(e, n, a, l, m) {
|
|
329
329
|
{
|
|
330
|
-
var p = Function.call.bind(
|
|
330
|
+
var p = Function.call.bind(Y);
|
|
331
331
|
for (var f in e)
|
|
332
332
|
if (p(e, f)) {
|
|
333
|
-
var
|
|
333
|
+
var u = void 0;
|
|
334
334
|
try {
|
|
335
335
|
if (typeof e[f] != "function") {
|
|
336
|
-
var
|
|
337
|
-
throw
|
|
336
|
+
var R = Error((l || "React class") + ": " + a + " type `" + f + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[f] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
337
|
+
throw R.name = "Invariant Violation", R;
|
|
338
338
|
}
|
|
339
|
-
|
|
340
|
-
} catch (
|
|
341
|
-
|
|
339
|
+
u = e[f](n, f, l, a, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
340
|
+
} catch (b) {
|
|
341
|
+
u = b;
|
|
342
342
|
}
|
|
343
|
-
|
|
343
|
+
u && !(u instanceof Error) && (U(m), h("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", l || "React class", a, f, typeof u), U(null)), u instanceof Error && !(u.message in xe) && (xe[u.message] = !0, U(m), h("Failed %s type: %s", a, u.message), U(null));
|
|
344
344
|
}
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
|
-
var
|
|
347
|
+
var at = Array.isArray;
|
|
348
348
|
function Z(e) {
|
|
349
|
-
return
|
|
349
|
+
return at(e);
|
|
350
350
|
}
|
|
351
|
-
function
|
|
351
|
+
function it(e) {
|
|
352
352
|
{
|
|
353
|
-
var
|
|
354
|
-
return
|
|
353
|
+
var n = typeof Symbol == "function" && Symbol.toStringTag, a = n && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
354
|
+
return a;
|
|
355
355
|
}
|
|
356
356
|
}
|
|
357
|
-
function
|
|
357
|
+
function ot(e) {
|
|
358
358
|
try {
|
|
359
|
-
return
|
|
359
|
+
return ge(e), !1;
|
|
360
360
|
} catch {
|
|
361
361
|
return !0;
|
|
362
362
|
}
|
|
363
363
|
}
|
|
364
|
-
function
|
|
364
|
+
function ge(e) {
|
|
365
365
|
return "" + e;
|
|
366
366
|
}
|
|
367
|
-
function
|
|
368
|
-
if (
|
|
369
|
-
return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",
|
|
367
|
+
function be(e) {
|
|
368
|
+
if (ot(e))
|
|
369
|
+
return h("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", it(e)), ge(e);
|
|
370
370
|
}
|
|
371
|
-
var
|
|
371
|
+
var ye = v.ReactCurrentOwner, lt = {
|
|
372
372
|
key: !0,
|
|
373
373
|
ref: !0,
|
|
374
374
|
__self: !0,
|
|
375
375
|
__source: !0
|
|
376
|
-
},
|
|
377
|
-
function
|
|
378
|
-
if (
|
|
379
|
-
var
|
|
380
|
-
if (
|
|
376
|
+
}, je, we;
|
|
377
|
+
function ct(e) {
|
|
378
|
+
if (Y.call(e, "ref")) {
|
|
379
|
+
var n = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
380
|
+
if (n && n.isReactWarning)
|
|
381
381
|
return !1;
|
|
382
382
|
}
|
|
383
383
|
return e.ref !== void 0;
|
|
384
384
|
}
|
|
385
|
-
function
|
|
386
|
-
if (
|
|
387
|
-
var
|
|
388
|
-
if (
|
|
385
|
+
function dt(e) {
|
|
386
|
+
if (Y.call(e, "key")) {
|
|
387
|
+
var n = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
388
|
+
if (n && n.isReactWarning)
|
|
389
389
|
return !1;
|
|
390
390
|
}
|
|
391
391
|
return e.key !== void 0;
|
|
392
392
|
}
|
|
393
|
-
function
|
|
394
|
-
typeof e.ref == "string" &&
|
|
393
|
+
function ut(e, n) {
|
|
394
|
+
typeof e.ref == "string" && ye.current;
|
|
395
395
|
}
|
|
396
|
-
function
|
|
396
|
+
function ft(e, n) {
|
|
397
397
|
{
|
|
398
|
-
var
|
|
399
|
-
|
|
398
|
+
var a = function() {
|
|
399
|
+
je || (je = !0, h("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", n));
|
|
400
400
|
};
|
|
401
|
-
|
|
402
|
-
get:
|
|
401
|
+
a.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
402
|
+
get: a,
|
|
403
403
|
configurable: !0
|
|
404
404
|
});
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
|
-
function
|
|
407
|
+
function mt(e, n) {
|
|
408
408
|
{
|
|
409
|
-
var
|
|
410
|
-
|
|
409
|
+
var a = function() {
|
|
410
|
+
we || (we = !0, h("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", n));
|
|
411
411
|
};
|
|
412
|
-
|
|
413
|
-
get:
|
|
412
|
+
a.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
413
|
+
get: a,
|
|
414
414
|
configurable: !0
|
|
415
415
|
});
|
|
416
416
|
}
|
|
417
417
|
}
|
|
418
|
-
var
|
|
419
|
-
var
|
|
418
|
+
var ht = function(e, n, a, l, m, p, f) {
|
|
419
|
+
var u = {
|
|
420
420
|
// This tag allows us to uniquely identify this as a React Element
|
|
421
|
-
$$typeof:
|
|
421
|
+
$$typeof: r,
|
|
422
422
|
// Built-in properties that belong on the element
|
|
423
423
|
type: e,
|
|
424
|
-
key:
|
|
425
|
-
ref:
|
|
424
|
+
key: n,
|
|
425
|
+
ref: a,
|
|
426
426
|
props: f,
|
|
427
427
|
// Record the component responsible for creating this element.
|
|
428
428
|
_owner: p
|
|
429
429
|
};
|
|
430
|
-
return
|
|
430
|
+
return u._store = {}, Object.defineProperty(u._store, "validated", {
|
|
431
431
|
configurable: !1,
|
|
432
432
|
enumerable: !1,
|
|
433
433
|
writable: !0,
|
|
434
434
|
value: !1
|
|
435
|
-
}), Object.defineProperty(
|
|
435
|
+
}), Object.defineProperty(u, "_self", {
|
|
436
436
|
configurable: !1,
|
|
437
437
|
enumerable: !1,
|
|
438
438
|
writable: !1,
|
|
439
|
-
value:
|
|
440
|
-
}), Object.defineProperty(
|
|
439
|
+
value: l
|
|
440
|
+
}), Object.defineProperty(u, "_source", {
|
|
441
441
|
configurable: !1,
|
|
442
442
|
enumerable: !1,
|
|
443
443
|
writable: !1,
|
|
444
|
-
value:
|
|
445
|
-
}), Object.freeze && (Object.freeze(
|
|
444
|
+
value: m
|
|
445
|
+
}), Object.freeze && (Object.freeze(u.props), Object.freeze(u)), u;
|
|
446
446
|
};
|
|
447
|
-
function
|
|
447
|
+
function pt(e, n, a, l, m) {
|
|
448
448
|
{
|
|
449
|
-
var p, f = {},
|
|
450
|
-
|
|
451
|
-
for (p in
|
|
452
|
-
|
|
449
|
+
var p, f = {}, u = null, R = null;
|
|
450
|
+
a !== void 0 && (be(a), u = "" + a), dt(n) && (be(n.key), u = "" + n.key), ct(n) && (R = n.ref, ut(n, m));
|
|
451
|
+
for (p in n)
|
|
452
|
+
Y.call(n, p) && !lt.hasOwnProperty(p) && (f[p] = n[p]);
|
|
453
453
|
if (e && e.defaultProps) {
|
|
454
|
-
var
|
|
455
|
-
for (p in
|
|
456
|
-
f[p] === void 0 && (f[p] =
|
|
454
|
+
var b = e.defaultProps;
|
|
455
|
+
for (p in b)
|
|
456
|
+
f[p] === void 0 && (f[p] = b[p]);
|
|
457
457
|
}
|
|
458
|
-
if (
|
|
459
|
-
var
|
|
460
|
-
|
|
458
|
+
if (u || R) {
|
|
459
|
+
var y = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
460
|
+
u && ft(f, y), R && mt(f, y);
|
|
461
461
|
}
|
|
462
|
-
return
|
|
462
|
+
return ht(e, u, R, m, l, ye.current, f);
|
|
463
463
|
}
|
|
464
464
|
}
|
|
465
|
-
var Q =
|
|
466
|
-
function
|
|
465
|
+
var Q = v.ReactCurrentOwner, Ee = v.ReactDebugCurrentFrame;
|
|
466
|
+
function k(e) {
|
|
467
467
|
if (e) {
|
|
468
|
-
var
|
|
469
|
-
|
|
468
|
+
var n = e._owner, a = V(e.type, e._source, n ? n.type : null);
|
|
469
|
+
Ee.setExtraStackFrame(a);
|
|
470
470
|
} else
|
|
471
|
-
|
|
471
|
+
Ee.setExtraStackFrame(null);
|
|
472
472
|
}
|
|
473
473
|
var ee;
|
|
474
474
|
ee = !1;
|
|
475
|
-
function
|
|
476
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
475
|
+
function te(e) {
|
|
476
|
+
return typeof e == "object" && e !== null && e.$$typeof === r;
|
|
477
477
|
}
|
|
478
|
-
function
|
|
478
|
+
function Ne() {
|
|
479
479
|
{
|
|
480
480
|
if (Q.current) {
|
|
481
|
-
var e =
|
|
481
|
+
var e = T(Q.current.type);
|
|
482
482
|
if (e)
|
|
483
483
|
return `
|
|
484
484
|
|
|
@@ -487,256 +487,256 @@ Check the render method of \`` + e + "`.";
|
|
|
487
487
|
return "";
|
|
488
488
|
}
|
|
489
489
|
}
|
|
490
|
-
function
|
|
490
|
+
function xt(e) {
|
|
491
491
|
return "";
|
|
492
492
|
}
|
|
493
|
-
var
|
|
494
|
-
function
|
|
493
|
+
var Ce = {};
|
|
494
|
+
function vt(e) {
|
|
495
495
|
{
|
|
496
|
-
var
|
|
497
|
-
if (!
|
|
498
|
-
var
|
|
499
|
-
|
|
496
|
+
var n = Ne();
|
|
497
|
+
if (!n) {
|
|
498
|
+
var a = typeof e == "string" ? e : e.displayName || e.name;
|
|
499
|
+
a && (n = `
|
|
500
500
|
|
|
501
|
-
Check the top-level render call using <` +
|
|
501
|
+
Check the top-level render call using <` + a + ">.");
|
|
502
502
|
}
|
|
503
|
-
return
|
|
503
|
+
return n;
|
|
504
504
|
}
|
|
505
505
|
}
|
|
506
|
-
function
|
|
506
|
+
function Re(e, n) {
|
|
507
507
|
{
|
|
508
508
|
if (!e._store || e._store.validated || e.key != null)
|
|
509
509
|
return;
|
|
510
510
|
e._store.validated = !0;
|
|
511
|
-
var
|
|
512
|
-
if (
|
|
511
|
+
var a = vt(n);
|
|
512
|
+
if (Ce[a])
|
|
513
513
|
return;
|
|
514
|
-
|
|
515
|
-
var
|
|
516
|
-
e && e._owner && e._owner !== Q.current && (
|
|
514
|
+
Ce[a] = !0;
|
|
515
|
+
var l = "";
|
|
516
|
+
e && e._owner && e._owner !== Q.current && (l = " It was passed a child from " + T(e._owner.type) + "."), k(e), h('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', a, l), k(null);
|
|
517
517
|
}
|
|
518
518
|
}
|
|
519
|
-
function
|
|
519
|
+
function Fe(e, n) {
|
|
520
520
|
{
|
|
521
521
|
if (typeof e != "object")
|
|
522
522
|
return;
|
|
523
523
|
if (Z(e))
|
|
524
|
-
for (var
|
|
525
|
-
var
|
|
526
|
-
|
|
524
|
+
for (var a = 0; a < e.length; a++) {
|
|
525
|
+
var l = e[a];
|
|
526
|
+
te(l) && Re(l, n);
|
|
527
527
|
}
|
|
528
|
-
else if (
|
|
528
|
+
else if (te(e))
|
|
529
529
|
e._store && (e._store.validated = !0);
|
|
530
530
|
else if (e) {
|
|
531
|
-
var
|
|
532
|
-
if (typeof
|
|
533
|
-
for (var p =
|
|
534
|
-
|
|
531
|
+
var m = J(e);
|
|
532
|
+
if (typeof m == "function" && m !== e.entries)
|
|
533
|
+
for (var p = m.call(e), f; !(f = p.next()).done; )
|
|
534
|
+
te(f.value) && Re(f.value, n);
|
|
535
535
|
}
|
|
536
536
|
}
|
|
537
537
|
}
|
|
538
|
-
function
|
|
538
|
+
function gt(e) {
|
|
539
539
|
{
|
|
540
|
-
var
|
|
541
|
-
if (
|
|
540
|
+
var n = e.type;
|
|
541
|
+
if (n == null || typeof n == "string")
|
|
542
542
|
return;
|
|
543
|
-
var
|
|
544
|
-
if (typeof
|
|
545
|
-
|
|
546
|
-
else if (typeof
|
|
543
|
+
var a;
|
|
544
|
+
if (typeof n == "function")
|
|
545
|
+
a = n.propTypes;
|
|
546
|
+
else if (typeof n == "object" && (n.$$typeof === x || // Note: Memo only checks outer props here.
|
|
547
547
|
// Inner props are checked in the reconciler.
|
|
548
|
-
|
|
549
|
-
|
|
548
|
+
n.$$typeof === E))
|
|
549
|
+
a = n.propTypes;
|
|
550
550
|
else
|
|
551
551
|
return;
|
|
552
|
-
if (
|
|
553
|
-
var
|
|
554
|
-
|
|
555
|
-
} else if (
|
|
552
|
+
if (a) {
|
|
553
|
+
var l = T(n);
|
|
554
|
+
st(a, e.props, "prop", l, e);
|
|
555
|
+
} else if (n.PropTypes !== void 0 && !ee) {
|
|
556
556
|
ee = !0;
|
|
557
|
-
var
|
|
558
|
-
h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",
|
|
557
|
+
var m = T(n);
|
|
558
|
+
h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", m || "Unknown");
|
|
559
559
|
}
|
|
560
|
-
typeof
|
|
560
|
+
typeof n.getDefaultProps == "function" && !n.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
561
561
|
}
|
|
562
562
|
}
|
|
563
|
-
function
|
|
563
|
+
function bt(e) {
|
|
564
564
|
{
|
|
565
|
-
for (var
|
|
566
|
-
var
|
|
567
|
-
if (
|
|
568
|
-
|
|
565
|
+
for (var n = Object.keys(e.props), a = 0; a < n.length; a++) {
|
|
566
|
+
var l = n[a];
|
|
567
|
+
if (l !== "children" && l !== "key") {
|
|
568
|
+
k(e), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", l), k(null);
|
|
569
569
|
break;
|
|
570
570
|
}
|
|
571
571
|
}
|
|
572
|
-
e.ref !== null && (
|
|
572
|
+
e.ref !== null && (k(e), h("Invalid attribute `ref` supplied to `React.Fragment`."), k(null));
|
|
573
573
|
}
|
|
574
574
|
}
|
|
575
|
-
function
|
|
575
|
+
function _e(e, n, a, l, m, p) {
|
|
576
576
|
{
|
|
577
|
-
var f =
|
|
577
|
+
var f = Xe(e);
|
|
578
578
|
if (!f) {
|
|
579
|
-
var
|
|
580
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (
|
|
581
|
-
var
|
|
582
|
-
|
|
583
|
-
var
|
|
584
|
-
e === null ?
|
|
579
|
+
var u = "";
|
|
580
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (u += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
581
|
+
var R = xt();
|
|
582
|
+
R ? u += R : u += Ne();
|
|
583
|
+
var b;
|
|
584
|
+
e === null ? b = "null" : Z(e) ? b = "array" : e !== void 0 && e.$$typeof === r ? (b = "<" + (T(e.type) || "Unknown") + " />", u = " Did you accidentally export a JSX literal instead of a component?") : b = typeof e, h("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", b, u);
|
|
585
585
|
}
|
|
586
|
-
var
|
|
587
|
-
if (
|
|
588
|
-
return
|
|
586
|
+
var y = pt(e, n, a, m, p);
|
|
587
|
+
if (y == null)
|
|
588
|
+
return y;
|
|
589
589
|
if (f) {
|
|
590
|
-
var
|
|
591
|
-
if (
|
|
592
|
-
if (
|
|
593
|
-
if (Z(
|
|
594
|
-
for (var D = 0; D <
|
|
595
|
-
|
|
596
|
-
Object.freeze && Object.freeze(
|
|
590
|
+
var F = n.children;
|
|
591
|
+
if (F !== void 0)
|
|
592
|
+
if (l)
|
|
593
|
+
if (Z(F)) {
|
|
594
|
+
for (var D = 0; D < F.length; D++)
|
|
595
|
+
Fe(F[D], e);
|
|
596
|
+
Object.freeze && Object.freeze(F);
|
|
597
597
|
} else
|
|
598
598
|
h("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
599
599
|
else
|
|
600
|
-
|
|
600
|
+
Fe(F, e);
|
|
601
601
|
}
|
|
602
|
-
return e === i ?
|
|
602
|
+
return e === i ? bt(y) : gt(y), y;
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
|
-
function
|
|
606
|
-
return
|
|
605
|
+
function yt(e, n, a) {
|
|
606
|
+
return _e(e, n, a, !0);
|
|
607
607
|
}
|
|
608
|
-
function
|
|
609
|
-
return
|
|
608
|
+
function jt(e, n, a) {
|
|
609
|
+
return _e(e, n, a, !1);
|
|
610
610
|
}
|
|
611
|
-
var
|
|
612
|
-
|
|
613
|
-
})()),
|
|
611
|
+
var wt = jt, Et = yt;
|
|
612
|
+
L.Fragment = i, L.jsx = wt, L.jsxs = Et;
|
|
613
|
+
})()), L;
|
|
614
614
|
}
|
|
615
|
-
var
|
|
616
|
-
function
|
|
617
|
-
return
|
|
615
|
+
var ke;
|
|
616
|
+
function qt() {
|
|
617
|
+
return ke || (ke = 1, process.env.NODE_ENV === "production" ? q.exports = Yt() : q.exports = Ut()), q.exports;
|
|
618
618
|
}
|
|
619
|
-
var
|
|
620
|
-
function
|
|
621
|
-
const [
|
|
619
|
+
var t = qt();
|
|
620
|
+
function Ht(o) {
|
|
621
|
+
const [r, s] = I([]), [i, c] = I(null), [g, j] = I(""), [w, x] = I(!1), [N, d] = I(null), E = A(async () => {
|
|
622
622
|
try {
|
|
623
|
-
|
|
624
|
-
const
|
|
625
|
-
if (
|
|
626
|
-
const h =
|
|
627
|
-
h &&
|
|
623
|
+
x(!0), d(null);
|
|
624
|
+
const v = await o.getFiles();
|
|
625
|
+
if (s(v), !i && v.length > 0) {
|
|
626
|
+
const h = We(v);
|
|
627
|
+
h && c(h.id);
|
|
628
628
|
}
|
|
629
|
-
} catch (
|
|
630
|
-
|
|
629
|
+
} catch (v) {
|
|
630
|
+
d(v instanceof Error ? v.message : "Failed to load files");
|
|
631
631
|
} finally {
|
|
632
|
-
|
|
632
|
+
x(!1);
|
|
633
633
|
}
|
|
634
|
-
}, [o, i]),
|
|
635
|
-
async (
|
|
634
|
+
}, [o, i]), C = A(
|
|
635
|
+
async (v) => {
|
|
636
636
|
try {
|
|
637
|
-
|
|
638
|
-
const h = await o.getFileContent(
|
|
639
|
-
|
|
637
|
+
x(!0), d(null);
|
|
638
|
+
const h = await o.getFileContent(v);
|
|
639
|
+
j(h);
|
|
640
640
|
} catch (h) {
|
|
641
|
-
|
|
641
|
+
d(
|
|
642
642
|
h instanceof Error ? h.message : "Failed to load file content"
|
|
643
|
-
),
|
|
643
|
+
), j("");
|
|
644
644
|
} finally {
|
|
645
|
-
|
|
645
|
+
x(!1);
|
|
646
646
|
}
|
|
647
647
|
},
|
|
648
648
|
[o]
|
|
649
649
|
), S = A(
|
|
650
|
-
async (
|
|
650
|
+
async (v) => {
|
|
651
651
|
if (i)
|
|
652
652
|
try {
|
|
653
|
-
|
|
654
|
-
(h) =>
|
|
653
|
+
d(null), await o.updateFileContent(i, v), j(v), s(
|
|
654
|
+
(h) => Ye(h, i, { content: v })
|
|
655
655
|
);
|
|
656
656
|
} catch (h) {
|
|
657
|
-
|
|
657
|
+
d(
|
|
658
658
|
h instanceof Error ? h.message : "Failed to update file content"
|
|
659
659
|
);
|
|
660
660
|
}
|
|
661
661
|
},
|
|
662
662
|
[i, o]
|
|
663
|
-
),
|
|
664
|
-
(
|
|
665
|
-
|
|
663
|
+
), M = A(
|
|
664
|
+
(v) => {
|
|
665
|
+
c(v), C(v);
|
|
666
666
|
},
|
|
667
|
-
[
|
|
668
|
-
),
|
|
669
|
-
|
|
670
|
-
}, [
|
|
671
|
-
(
|
|
672
|
-
[
|
|
667
|
+
[C]
|
|
668
|
+
), H = A(() => {
|
|
669
|
+
E();
|
|
670
|
+
}, [E]), J = A(
|
|
671
|
+
(v) => Ve(r, v),
|
|
672
|
+
[r]
|
|
673
673
|
);
|
|
674
|
-
return
|
|
675
|
-
|
|
676
|
-
}, [
|
|
677
|
-
i &&
|
|
678
|
-
}, [i,
|
|
679
|
-
files:
|
|
674
|
+
return Te(() => {
|
|
675
|
+
E();
|
|
676
|
+
}, [E]), Te(() => {
|
|
677
|
+
i && C(i);
|
|
678
|
+
}, [i, C]), {
|
|
679
|
+
files: r,
|
|
680
680
|
activeFile: i,
|
|
681
|
-
fileContent:
|
|
682
|
-
loading:
|
|
683
|
-
error:
|
|
684
|
-
setActiveFile:
|
|
681
|
+
fileContent: g,
|
|
682
|
+
loading: w,
|
|
683
|
+
error: N,
|
|
684
|
+
setActiveFile: M,
|
|
685
685
|
updateFileContent: S,
|
|
686
|
-
refreshFiles:
|
|
687
|
-
getFileById:
|
|
686
|
+
refreshFiles: H,
|
|
687
|
+
getFileById: J
|
|
688
688
|
};
|
|
689
689
|
}
|
|
690
|
-
function
|
|
691
|
-
for (const
|
|
692
|
-
if (
|
|
693
|
-
return
|
|
694
|
-
if (
|
|
695
|
-
const
|
|
696
|
-
if (
|
|
690
|
+
function We(o) {
|
|
691
|
+
for (const r of o) {
|
|
692
|
+
if (r.type === "file")
|
|
693
|
+
return r;
|
|
694
|
+
if (r.children) {
|
|
695
|
+
const s = We(r.children);
|
|
696
|
+
if (s) return s;
|
|
697
697
|
}
|
|
698
698
|
}
|
|
699
699
|
return null;
|
|
700
700
|
}
|
|
701
|
-
function
|
|
702
|
-
for (const
|
|
703
|
-
if (
|
|
704
|
-
if (
|
|
705
|
-
const i =
|
|
701
|
+
function Ve(o, r) {
|
|
702
|
+
for (const s of o) {
|
|
703
|
+
if (s.id === r) return s;
|
|
704
|
+
if (s.children) {
|
|
705
|
+
const i = Ve(s.children, r);
|
|
706
706
|
if (i) return i;
|
|
707
707
|
}
|
|
708
708
|
}
|
|
709
709
|
return null;
|
|
710
710
|
}
|
|
711
|
-
function
|
|
712
|
-
return o.map((i) => i.id ===
|
|
711
|
+
function Ye(o, r, s) {
|
|
712
|
+
return o.map((i) => i.id === r ? { ...i, ...s } : i.children ? {
|
|
713
713
|
...i,
|
|
714
|
-
children:
|
|
714
|
+
children: Ye(i.children, r, s)
|
|
715
715
|
} : i);
|
|
716
716
|
}
|
|
717
|
-
class
|
|
717
|
+
class Jt {
|
|
718
718
|
config;
|
|
719
719
|
files = [];
|
|
720
|
-
constructor(
|
|
721
|
-
this.config =
|
|
720
|
+
constructor(r) {
|
|
721
|
+
this.config = r;
|
|
722
722
|
}
|
|
723
723
|
async getFiles() {
|
|
724
724
|
return this.files.length === 0 && await this.loadFiles(), this.files;
|
|
725
725
|
}
|
|
726
|
-
async getFileContent(
|
|
727
|
-
if (
|
|
726
|
+
async getFileContent(r) {
|
|
727
|
+
if (r === "main-function")
|
|
728
728
|
return await this.config.fetchFunction(
|
|
729
729
|
this.config.functionId,
|
|
730
730
|
this.config.version
|
|
731
731
|
);
|
|
732
|
-
throw new Error(`File ${
|
|
732
|
+
throw new Error(`File ${r} not found`);
|
|
733
733
|
}
|
|
734
|
-
async updateFileContent(
|
|
735
|
-
const i = this.findFileById(
|
|
736
|
-
i && (i.content =
|
|
734
|
+
async updateFileContent(r, s) {
|
|
735
|
+
const i = this.findFileById(r);
|
|
736
|
+
i && (i.content = s), console.log(`Updated file ${r} with content:`, s);
|
|
737
737
|
}
|
|
738
|
-
async getFileMetadata(
|
|
739
|
-
return this.findFileById(
|
|
738
|
+
async getFileMetadata(r) {
|
|
739
|
+
return this.findFileById(r)?.metadata || {};
|
|
740
740
|
}
|
|
741
741
|
async loadFiles() {
|
|
742
742
|
this.files = [
|
|
@@ -755,11 +755,11 @@ class kr {
|
|
|
755
755
|
name: "versions",
|
|
756
756
|
type: "folder",
|
|
757
757
|
path: "/versions",
|
|
758
|
-
children: this.config.versionList.map((
|
|
759
|
-
id: `version-${
|
|
760
|
-
name: `v${
|
|
758
|
+
children: this.config.versionList.map((r) => ({
|
|
759
|
+
id: `version-${r}`,
|
|
760
|
+
name: `v${r}.js`,
|
|
761
761
|
type: "file",
|
|
762
|
-
path: `/versions/v${
|
|
762
|
+
path: `/versions/v${r}.js`,
|
|
763
763
|
metadata: {
|
|
764
764
|
language: "javascript"
|
|
765
765
|
}
|
|
@@ -767,43 +767,43 @@ class kr {
|
|
|
767
767
|
}
|
|
768
768
|
];
|
|
769
769
|
}
|
|
770
|
-
findFileById(
|
|
771
|
-
const
|
|
772
|
-
for (const
|
|
773
|
-
if (
|
|
774
|
-
if (
|
|
775
|
-
const
|
|
776
|
-
if (
|
|
770
|
+
findFileById(r) {
|
|
771
|
+
const s = (i) => {
|
|
772
|
+
for (const c of i) {
|
|
773
|
+
if (c.id === r) return c;
|
|
774
|
+
if (c.children) {
|
|
775
|
+
const g = s(c.children);
|
|
776
|
+
if (g) return g;
|
|
777
777
|
}
|
|
778
778
|
}
|
|
779
779
|
return null;
|
|
780
780
|
};
|
|
781
|
-
return
|
|
781
|
+
return s(this.files);
|
|
782
782
|
}
|
|
783
783
|
}
|
|
784
|
-
class
|
|
784
|
+
class Gt {
|
|
785
785
|
config;
|
|
786
786
|
files = [];
|
|
787
|
-
constructor(
|
|
788
|
-
this.config =
|
|
787
|
+
constructor(r) {
|
|
788
|
+
this.config = r, this.initializeFiles();
|
|
789
789
|
}
|
|
790
790
|
async getFiles() {
|
|
791
791
|
return this.files;
|
|
792
792
|
}
|
|
793
|
-
async getFileContent(
|
|
794
|
-
if (
|
|
793
|
+
async getFileContent(r) {
|
|
794
|
+
if (r === "form-code")
|
|
795
795
|
return this.config.codeContent;
|
|
796
|
-
throw new Error(`File ${
|
|
796
|
+
throw new Error(`File ${r} not found`);
|
|
797
797
|
}
|
|
798
|
-
async updateFileContent(
|
|
799
|
-
if (
|
|
800
|
-
this.config.codeContent =
|
|
801
|
-
const i = this.files.find((
|
|
802
|
-
i && (i.content =
|
|
798
|
+
async updateFileContent(r, s) {
|
|
799
|
+
if (r === "form-code") {
|
|
800
|
+
this.config.codeContent = s;
|
|
801
|
+
const i = this.files.find((c) => c.id === r);
|
|
802
|
+
i && (i.content = s);
|
|
803
803
|
}
|
|
804
804
|
}
|
|
805
|
-
async getFileMetadata(
|
|
806
|
-
return this.findFileById(
|
|
805
|
+
async getFileMetadata(r) {
|
|
806
|
+
return this.findFileById(r)?.metadata || {};
|
|
807
807
|
}
|
|
808
808
|
initializeFiles() {
|
|
809
809
|
this.files = [
|
|
@@ -820,25 +820,25 @@ class Ir {
|
|
|
820
820
|
}
|
|
821
821
|
];
|
|
822
822
|
}
|
|
823
|
-
findFileById(
|
|
824
|
-
return this.files.find((
|
|
823
|
+
findFileById(r) {
|
|
824
|
+
return this.files.find((s) => s.id === r) || null;
|
|
825
825
|
}
|
|
826
826
|
}
|
|
827
|
-
class
|
|
827
|
+
class Kt {
|
|
828
828
|
config;
|
|
829
829
|
files = [];
|
|
830
|
-
constructor(
|
|
831
|
-
this.config =
|
|
830
|
+
constructor(r) {
|
|
831
|
+
this.config = r, this.initializeFiles();
|
|
832
832
|
}
|
|
833
833
|
async getFiles() {
|
|
834
834
|
return this.files;
|
|
835
835
|
}
|
|
836
|
-
async getFileContent(
|
|
837
|
-
const
|
|
838
|
-
if (!
|
|
839
|
-
throw new Error(`File ${
|
|
836
|
+
async getFileContent(r) {
|
|
837
|
+
const s = this.findFileById(r);
|
|
838
|
+
if (!s || !s.metadata?.url)
|
|
839
|
+
throw new Error(`File ${r} not found`);
|
|
840
840
|
try {
|
|
841
|
-
const i = await fetch(
|
|
841
|
+
const i = await fetch(s.metadata.url);
|
|
842
842
|
if (!i.ok)
|
|
843
843
|
throw new Error(`Failed to fetch file: ${i.statusText}`);
|
|
844
844
|
return await i.text();
|
|
@@ -846,58 +846,58 @@ class Dr {
|
|
|
846
846
|
throw new Error(`Error fetching file content: ${i}`);
|
|
847
847
|
}
|
|
848
848
|
}
|
|
849
|
-
async updateFileContent(
|
|
850
|
-
console.log(`Would save file ${
|
|
851
|
-
const i = this.findFileById(
|
|
852
|
-
i && (i.content =
|
|
849
|
+
async updateFileContent(r, s) {
|
|
850
|
+
console.log(`Would save file ${r} content to backend:`, s);
|
|
851
|
+
const i = this.findFileById(r);
|
|
852
|
+
i && (i.content = s);
|
|
853
853
|
}
|
|
854
|
-
async getFileMetadata(
|
|
855
|
-
return this.findFileById(
|
|
854
|
+
async getFileMetadata(r) {
|
|
855
|
+
return this.findFileById(r)?.metadata || {};
|
|
856
856
|
}
|
|
857
857
|
initializeFiles() {
|
|
858
|
-
this.files = this.config.fileUrls.map((
|
|
859
|
-
id: `url-file-${
|
|
860
|
-
name:
|
|
858
|
+
this.files = this.config.fileUrls.map((r, s) => ({
|
|
859
|
+
id: `url-file-${s}`,
|
|
860
|
+
name: r.name,
|
|
861
861
|
type: "file",
|
|
862
|
-
path: `/${
|
|
862
|
+
path: `/${r.name}`,
|
|
863
863
|
metadata: {
|
|
864
|
-
language:
|
|
865
|
-
url:
|
|
864
|
+
language: r.type,
|
|
865
|
+
url: r.url,
|
|
866
866
|
lastModified: /* @__PURE__ */ new Date()
|
|
867
867
|
}
|
|
868
868
|
}));
|
|
869
869
|
}
|
|
870
|
-
findFileById(
|
|
871
|
-
return this.files.find((
|
|
870
|
+
findFileById(r) {
|
|
871
|
+
return this.files.find((s) => s.id === r) || null;
|
|
872
872
|
}
|
|
873
873
|
}
|
|
874
|
-
function
|
|
874
|
+
function Xt(o) {
|
|
875
875
|
if (o.workflowConfig)
|
|
876
|
-
return new
|
|
876
|
+
return new Jt(o.workflowConfig);
|
|
877
877
|
if (o.formConfig)
|
|
878
|
-
return new
|
|
878
|
+
return new Gt(o.formConfig);
|
|
879
879
|
if (o.urlConfig)
|
|
880
|
-
return new
|
|
880
|
+
return new Kt(o.urlConfig);
|
|
881
881
|
throw new Error("No valid configuration provided");
|
|
882
882
|
}
|
|
883
|
-
const
|
|
883
|
+
const Zt = ({
|
|
884
884
|
value: o,
|
|
885
|
-
onChange:
|
|
886
|
-
language:
|
|
885
|
+
onChange: r,
|
|
886
|
+
language: s = "javascript",
|
|
887
887
|
filename: i,
|
|
888
|
-
readOnly:
|
|
889
|
-
loading:
|
|
888
|
+
readOnly: c = !1,
|
|
889
|
+
loading: g = !1
|
|
890
890
|
}) => {
|
|
891
|
-
const
|
|
892
|
-
|
|
891
|
+
const j = (w) => {
|
|
892
|
+
w !== void 0 && r(w);
|
|
893
893
|
};
|
|
894
|
-
return /* @__PURE__ */
|
|
895
|
-
|
|
894
|
+
return /* @__PURE__ */ t.jsx("div", { className: "h-full w-full", children: /* @__PURE__ */ t.jsx(
|
|
895
|
+
Ct,
|
|
896
896
|
{
|
|
897
897
|
height: "100%",
|
|
898
|
-
defaultLanguage:
|
|
898
|
+
defaultLanguage: s,
|
|
899
899
|
defaultValue: o,
|
|
900
|
-
onChange:
|
|
900
|
+
onChange: j,
|
|
901
901
|
theme: "vs-light",
|
|
902
902
|
options: {
|
|
903
903
|
minimap: {
|
|
@@ -910,154 +910,158 @@ const Nr = ({
|
|
|
910
910
|
top: 16
|
|
911
911
|
},
|
|
912
912
|
scrollBeyondLastLine: !1,
|
|
913
|
-
readOnly:
|
|
913
|
+
readOnly: c
|
|
914
914
|
}
|
|
915
915
|
}
|
|
916
916
|
) });
|
|
917
|
-
},
|
|
917
|
+
}, Qt = [
|
|
918
|
+
{
|
|
919
|
+
id: "explorer",
|
|
920
|
+
icon: De,
|
|
921
|
+
label: "Files"
|
|
922
|
+
},
|
|
923
|
+
{
|
|
924
|
+
id: "data",
|
|
925
|
+
icon: Ae,
|
|
926
|
+
label: "Data"
|
|
927
|
+
},
|
|
928
|
+
{
|
|
929
|
+
id: "functions",
|
|
930
|
+
icon: ze,
|
|
931
|
+
label: "Functions"
|
|
932
|
+
},
|
|
933
|
+
{
|
|
934
|
+
id: "versions",
|
|
935
|
+
icon: $e,
|
|
936
|
+
label: "Versions"
|
|
937
|
+
},
|
|
938
|
+
{
|
|
939
|
+
id: "tests",
|
|
940
|
+
icon: _t,
|
|
941
|
+
label: "Tests"
|
|
942
|
+
}
|
|
943
|
+
], er = ({
|
|
918
944
|
activePanel: o,
|
|
919
|
-
setActivePanel:
|
|
945
|
+
setActivePanel: r,
|
|
946
|
+
allowedRoutes: s = ["explorer"]
|
|
920
947
|
}) => {
|
|
921
|
-
const
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
label: "Data"
|
|
931
|
-
},
|
|
932
|
-
{
|
|
933
|
-
id: "functions",
|
|
934
|
-
icon: Fr,
|
|
935
|
-
label: "Functions"
|
|
936
|
-
},
|
|
937
|
-
{
|
|
938
|
-
id: "versions",
|
|
939
|
-
icon: Rr,
|
|
940
|
-
label: "Versions"
|
|
941
|
-
},
|
|
942
|
-
{
|
|
943
|
-
id: "tests",
|
|
944
|
-
icon: wr,
|
|
945
|
-
label: "Tests"
|
|
946
|
-
}
|
|
947
|
-
];
|
|
948
|
-
return /* @__PURE__ */ l.jsxs("div", { className: "w-14 border-r border-slate-200 bg-white flex flex-col gap-4 items-center py-4", children: [
|
|
949
|
-
a.map((i) => {
|
|
950
|
-
const d = i.icon;
|
|
951
|
-
return /* @__PURE__ */ l.jsx(Pe, { title: i.label, placement: "right", children: /* @__PURE__ */ l.jsx(
|
|
952
|
-
te,
|
|
948
|
+
const i = Nt(
|
|
949
|
+
() => Qt.filter((c) => s.includes(c.id)),
|
|
950
|
+
[s]
|
|
951
|
+
);
|
|
952
|
+
return /* @__PURE__ */ t.jsxs("div", { className: "w-14 border-r border-slate-200 bg-white flex flex-col gap-4 items-center py-4", children: [
|
|
953
|
+
i.map((c) => {
|
|
954
|
+
const g = c.icon;
|
|
955
|
+
return /* @__PURE__ */ t.jsx(Pe, { title: c.label, placement: "right", children: /* @__PURE__ */ t.jsx(
|
|
956
|
+
re,
|
|
953
957
|
{
|
|
954
|
-
type: o ===
|
|
955
|
-
icon: /* @__PURE__ */
|
|
956
|
-
onClick: () =>
|
|
958
|
+
type: o === c.id ? "primary" : "text",
|
|
959
|
+
icon: /* @__PURE__ */ t.jsx(g, { size: 16 }),
|
|
960
|
+
onClick: () => r(c.id)
|
|
957
961
|
}
|
|
958
|
-
) },
|
|
962
|
+
) }, c.id);
|
|
959
963
|
}),
|
|
960
|
-
/* @__PURE__ */
|
|
964
|
+
/* @__PURE__ */ t.jsx("div", { className: "mt-auto", children: /* @__PURE__ */ t.jsx(Pe, { title: "Settings", placement: "right", children: /* @__PURE__ */ t.jsx(re, { type: "text", icon: /* @__PURE__ */ t.jsx(Le, { size: 20 }) }) }) })
|
|
961
965
|
] });
|
|
962
|
-
},
|
|
966
|
+
}, tr = ({
|
|
963
967
|
leftPanel: o,
|
|
964
|
-
editor:
|
|
965
|
-
rightPanel:
|
|
968
|
+
editor: r,
|
|
969
|
+
rightPanel: s,
|
|
966
970
|
activePanel: i,
|
|
967
|
-
setActivePanel:
|
|
968
|
-
}) => /* @__PURE__ */
|
|
969
|
-
/* @__PURE__ */
|
|
970
|
-
/* @__PURE__ */
|
|
971
|
-
|
|
971
|
+
setActivePanel: c
|
|
972
|
+
}) => /* @__PURE__ */ t.jsxs("div", { className: "flex flex-1 overflow-hidden", children: [
|
|
973
|
+
/* @__PURE__ */ t.jsx(er, { activePanel: i, setActivePanel: c }),
|
|
974
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex-1", children: s ? /* @__PURE__ */ t.jsxs(
|
|
975
|
+
O,
|
|
972
976
|
{
|
|
973
977
|
style: { height: "100%" },
|
|
974
|
-
onResize: (
|
|
978
|
+
onResize: (g) => console.log(g),
|
|
975
979
|
children: [
|
|
976
|
-
/* @__PURE__ */
|
|
977
|
-
|
|
980
|
+
/* @__PURE__ */ t.jsx(
|
|
981
|
+
O.Panel,
|
|
978
982
|
{
|
|
979
983
|
defaultSize: "25%",
|
|
980
984
|
min: "15%",
|
|
981
985
|
max: "40%",
|
|
982
986
|
className: "bg-white border-r border-slate-200",
|
|
983
987
|
collapsible: !0,
|
|
984
|
-
children: /* @__PURE__ */
|
|
988
|
+
children: /* @__PURE__ */ t.jsx("div", { className: "h-full overflow-y-auto", children: o })
|
|
985
989
|
}
|
|
986
990
|
),
|
|
987
|
-
/* @__PURE__ */
|
|
988
|
-
/* @__PURE__ */
|
|
989
|
-
|
|
991
|
+
/* @__PURE__ */ t.jsx(O.Panel, { defaultSize: "50%", min: "30%", children: r }),
|
|
992
|
+
/* @__PURE__ */ t.jsx(
|
|
993
|
+
O.Panel,
|
|
990
994
|
{
|
|
991
995
|
defaultSize: "25%",
|
|
992
996
|
min: "20%",
|
|
993
997
|
max: "50%",
|
|
994
998
|
className: "bg-white border-l border-slate-200",
|
|
995
|
-
children: /* @__PURE__ */
|
|
999
|
+
children: /* @__PURE__ */ t.jsx("div", { className: "h-full overflow-y-auto", children: s })
|
|
996
1000
|
}
|
|
997
1001
|
)
|
|
998
1002
|
]
|
|
999
1003
|
}
|
|
1000
|
-
) : /* @__PURE__ */
|
|
1001
|
-
/* @__PURE__ */
|
|
1002
|
-
|
|
1004
|
+
) : /* @__PURE__ */ t.jsxs(O, { style: { height: "100%" }, children: [
|
|
1005
|
+
/* @__PURE__ */ t.jsx(
|
|
1006
|
+
O.Panel,
|
|
1003
1007
|
{
|
|
1004
1008
|
defaultSize: "25%",
|
|
1005
1009
|
min: "15%",
|
|
1006
1010
|
max: "40%",
|
|
1007
1011
|
className: "bg-white border-r border-slate-200",
|
|
1008
|
-
children: /* @__PURE__ */
|
|
1012
|
+
children: /* @__PURE__ */ t.jsx("div", { className: "h-full overflow-y-auto", children: o })
|
|
1009
1013
|
}
|
|
1010
1014
|
),
|
|
1011
|
-
/* @__PURE__ */
|
|
1015
|
+
/* @__PURE__ */ t.jsx(O.Panel, { defaultSize: "75%", min: "60%", children: r })
|
|
1012
1016
|
] }) })
|
|
1013
|
-
] }),
|
|
1017
|
+
] }), rr = ({
|
|
1014
1018
|
files: o,
|
|
1015
|
-
activeFile:
|
|
1016
|
-
onFileSelect:
|
|
1019
|
+
activeFile: r,
|
|
1020
|
+
onFileSelect: s,
|
|
1017
1021
|
loading: i = !1,
|
|
1018
|
-
error:
|
|
1019
|
-
onRefresh:
|
|
1022
|
+
error: c = null,
|
|
1023
|
+
onRefresh: g
|
|
1020
1024
|
}) => {
|
|
1021
|
-
const
|
|
1022
|
-
title:
|
|
1023
|
-
key:
|
|
1024
|
-
icon:
|
|
1025
|
-
isLeaf:
|
|
1026
|
-
children:
|
|
1027
|
-
metadata:
|
|
1028
|
-
})),
|
|
1029
|
-
|
|
1025
|
+
const j = (N) => N.map((d) => ({
|
|
1026
|
+
title: d.name,
|
|
1027
|
+
key: d.id,
|
|
1028
|
+
icon: d.type === "file" ? /* @__PURE__ */ t.jsx(Tt, { size: 16, className: "text-slate-500 flex" }) : /* @__PURE__ */ t.jsx(De, { size: 16, className: "text-slate-500 flex" }),
|
|
1029
|
+
isLeaf: d.type === "file",
|
|
1030
|
+
children: d.children ? j(d.children) : void 0,
|
|
1031
|
+
metadata: d.metadata
|
|
1032
|
+
})), w = j(o), x = (N, d) => {
|
|
1033
|
+
d?.node.isLeaf && d.node.key && s(d.node.key);
|
|
1030
1034
|
};
|
|
1031
|
-
return /* @__PURE__ */
|
|
1032
|
-
/* @__PURE__ */
|
|
1033
|
-
/* @__PURE__ */
|
|
1034
|
-
/* @__PURE__ */
|
|
1035
|
-
|
|
1035
|
+
return /* @__PURE__ */ t.jsxs("div", { className: "h-full", children: [
|
|
1036
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between p-4 border-b border-slate-200", children: [
|
|
1037
|
+
/* @__PURE__ */ t.jsx("h2", { className: "font-medium text-sm", children: "Files" }),
|
|
1038
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex items-center gap-2", children: g && /* @__PURE__ */ t.jsx(
|
|
1039
|
+
re,
|
|
1036
1040
|
{
|
|
1037
1041
|
type: "text",
|
|
1038
|
-
icon: /* @__PURE__ */
|
|
1039
|
-
onClick:
|
|
1042
|
+
icon: /* @__PURE__ */ t.jsx(St, { size: 16 }),
|
|
1043
|
+
onClick: g,
|
|
1040
1044
|
loading: i,
|
|
1041
1045
|
title: "Refresh files"
|
|
1042
1046
|
}
|
|
1043
1047
|
) })
|
|
1044
1048
|
] }),
|
|
1045
|
-
/* @__PURE__ */
|
|
1046
|
-
|
|
1047
|
-
|
|
1049
|
+
/* @__PURE__ */ t.jsxs("div", { className: "p-2", children: [
|
|
1050
|
+
c && /* @__PURE__ */ t.jsx(
|
|
1051
|
+
Rt,
|
|
1048
1052
|
{
|
|
1049
1053
|
message: "Error loading files",
|
|
1050
|
-
description:
|
|
1054
|
+
description: c,
|
|
1051
1055
|
type: "error",
|
|
1052
1056
|
className: "mb-2"
|
|
1053
1057
|
}
|
|
1054
1058
|
),
|
|
1055
|
-
/* @__PURE__ */
|
|
1056
|
-
|
|
1059
|
+
/* @__PURE__ */ t.jsx(
|
|
1060
|
+
Ft,
|
|
1057
1061
|
{
|
|
1058
|
-
treeData:
|
|
1059
|
-
onSelect:
|
|
1060
|
-
selectedKeys:
|
|
1062
|
+
treeData: w,
|
|
1063
|
+
onSelect: x,
|
|
1064
|
+
selectedKeys: r ? [r] : [],
|
|
1061
1065
|
showIcon: !0,
|
|
1062
1066
|
defaultExpandAll: !0,
|
|
1063
1067
|
showLine: !0,
|
|
@@ -1066,116 +1070,523 @@ const Nr = ({
|
|
|
1066
1070
|
)
|
|
1067
1071
|
] })
|
|
1068
1072
|
] });
|
|
1069
|
-
},
|
|
1073
|
+
}, se = ({
|
|
1070
1074
|
config: o,
|
|
1071
|
-
rightPanel:
|
|
1075
|
+
rightPanel: r = !1
|
|
1072
1076
|
}) => {
|
|
1073
|
-
const
|
|
1074
|
-
() =>
|
|
1077
|
+
const s = ne.useMemo(
|
|
1078
|
+
() => Xt(o),
|
|
1075
1079
|
[o]
|
|
1076
1080
|
);
|
|
1077
1081
|
console.log({ config: o });
|
|
1078
1082
|
const {
|
|
1079
1083
|
files: i,
|
|
1080
|
-
activeFile:
|
|
1081
|
-
fileContent:
|
|
1082
|
-
loading:
|
|
1083
|
-
error:
|
|
1084
|
-
setActiveFile:
|
|
1085
|
-
updateFileContent:
|
|
1086
|
-
refreshFiles:
|
|
1087
|
-
getFileById:
|
|
1088
|
-
} =
|
|
1089
|
-
return /* @__PURE__ */
|
|
1090
|
-
|
|
1084
|
+
activeFile: c,
|
|
1085
|
+
fileContent: g,
|
|
1086
|
+
loading: j,
|
|
1087
|
+
error: w,
|
|
1088
|
+
setActiveFile: x,
|
|
1089
|
+
updateFileContent: N,
|
|
1090
|
+
refreshFiles: d,
|
|
1091
|
+
getFileById: E
|
|
1092
|
+
} = Ht(s), C = c ? E(c) : null, S = C?.metadata?.language || "javascript";
|
|
1093
|
+
return /* @__PURE__ */ t.jsx(
|
|
1094
|
+
tr,
|
|
1091
1095
|
{
|
|
1092
|
-
leftPanel: /* @__PURE__ */
|
|
1093
|
-
|
|
1096
|
+
leftPanel: /* @__PURE__ */ t.jsx(
|
|
1097
|
+
rr,
|
|
1094
1098
|
{
|
|
1095
1099
|
files: i,
|
|
1096
|
-
activeFile:
|
|
1097
|
-
onFileSelect:
|
|
1098
|
-
loading:
|
|
1099
|
-
error:
|
|
1100
|
-
onRefresh:
|
|
1100
|
+
activeFile: c,
|
|
1101
|
+
onFileSelect: x,
|
|
1102
|
+
loading: j,
|
|
1103
|
+
error: w,
|
|
1104
|
+
onRefresh: d
|
|
1101
1105
|
}
|
|
1102
1106
|
),
|
|
1103
|
-
editor: /* @__PURE__ */
|
|
1104
|
-
|
|
1107
|
+
editor: /* @__PURE__ */ t.jsx(
|
|
1108
|
+
Zt,
|
|
1105
1109
|
{
|
|
1106
|
-
value:
|
|
1107
|
-
onChange:
|
|
1110
|
+
value: g,
|
|
1111
|
+
onChange: N,
|
|
1108
1112
|
language: S,
|
|
1109
|
-
filename:
|
|
1113
|
+
filename: C?.name,
|
|
1110
1114
|
readOnly: o.settings?.readOnly,
|
|
1111
|
-
loading:
|
|
1115
|
+
loading: j
|
|
1112
1116
|
}
|
|
1113
1117
|
),
|
|
1114
|
-
rightPanel:
|
|
1118
|
+
rightPanel: r,
|
|
1115
1119
|
activePanel: "explorer",
|
|
1116
1120
|
setActivePanel: () => {
|
|
1117
1121
|
}
|
|
1118
1122
|
}
|
|
1119
1123
|
);
|
|
1120
|
-
},
|
|
1124
|
+
}, or = ({
|
|
1121
1125
|
functionId: o,
|
|
1122
|
-
version:
|
|
1123
|
-
versionList:
|
|
1126
|
+
version: r,
|
|
1127
|
+
versionList: s,
|
|
1124
1128
|
fetchFunction: i,
|
|
1125
|
-
fetchVersionList:
|
|
1129
|
+
fetchVersionList: c
|
|
1126
1130
|
}) => {
|
|
1127
|
-
const
|
|
1131
|
+
const g = {
|
|
1128
1132
|
workflowConfig: {
|
|
1129
1133
|
functionId: o,
|
|
1130
|
-
version:
|
|
1131
|
-
versionList:
|
|
1134
|
+
version: r,
|
|
1135
|
+
versionList: s,
|
|
1132
1136
|
fetchFunction: i,
|
|
1133
|
-
fetchVersionList:
|
|
1137
|
+
fetchVersionList: c
|
|
1134
1138
|
}
|
|
1135
1139
|
};
|
|
1136
|
-
return /* @__PURE__ */
|
|
1137
|
-
},
|
|
1140
|
+
return /* @__PURE__ */ t.jsx(se, { config: g });
|
|
1141
|
+
}, lr = ({
|
|
1138
1142
|
codeContent: o,
|
|
1139
|
-
fileName:
|
|
1140
|
-
language:
|
|
1143
|
+
fileName: r = "code.js",
|
|
1144
|
+
language: s = "javascript",
|
|
1141
1145
|
readOnly: i = !1
|
|
1142
1146
|
}) => {
|
|
1143
|
-
const
|
|
1147
|
+
const c = {
|
|
1144
1148
|
formConfig: {
|
|
1145
1149
|
codeContent: o,
|
|
1146
|
-
fileName:
|
|
1147
|
-
language:
|
|
1150
|
+
fileName: r,
|
|
1151
|
+
language: s
|
|
1148
1152
|
},
|
|
1149
1153
|
settings: {
|
|
1150
1154
|
readOnly: i
|
|
1151
1155
|
}
|
|
1152
1156
|
};
|
|
1153
|
-
return /* @__PURE__ */
|
|
1154
|
-
},
|
|
1155
|
-
const
|
|
1157
|
+
return /* @__PURE__ */ t.jsx(se, { config: c });
|
|
1158
|
+
}, cr = ({ fileUrls: o, rightPanel: r }) => {
|
|
1159
|
+
const s = {
|
|
1156
1160
|
urlConfig: {
|
|
1157
1161
|
fileUrls: o
|
|
1158
1162
|
}
|
|
1159
1163
|
};
|
|
1160
|
-
return /* @__PURE__ */
|
|
1161
|
-
},
|
|
1164
|
+
return /* @__PURE__ */ t.jsx(se, { config: s, rightPanel: r });
|
|
1165
|
+
}, dr = ({
|
|
1166
|
+
activeFile: o,
|
|
1167
|
+
showPreview: r,
|
|
1168
|
+
setShowPreview: s
|
|
1169
|
+
}) => /* @__PURE__ */ t.jsxs("div", { className: "h-14 border-b border-slate-200 bg-white px-4 flex items-center justify-between", children: [
|
|
1170
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center", children: [
|
|
1171
|
+
/* @__PURE__ */ t.jsx("h1", { className: "text-lg font-semibold text-slate-900 mr-4", children: "CRM Code Editor" }),
|
|
1172
|
+
/* @__PURE__ */ t.jsx("span", { className: "text-sm text-slate-500 px-2 py-1 bg-slate-100 rounded-md", children: o })
|
|
1173
|
+
] }),
|
|
1174
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center space-x-2", children: [
|
|
1175
|
+
/* @__PURE__ */ t.jsx(
|
|
1176
|
+
"button",
|
|
1177
|
+
{
|
|
1178
|
+
className: "p-1.5 hover:bg-slate-100 rounded-md text-slate-600",
|
|
1179
|
+
onClick: () => s(!r),
|
|
1180
|
+
title: r ? "Hide Preview" : "Show Preview",
|
|
1181
|
+
children: r ? /* @__PURE__ */ t.jsx(Pt, { size: 18 }) : /* @__PURE__ */ t.jsx(Ot, { size: 18 })
|
|
1182
|
+
}
|
|
1183
|
+
),
|
|
1184
|
+
/* @__PURE__ */ t.jsx(
|
|
1185
|
+
"button",
|
|
1186
|
+
{
|
|
1187
|
+
className: "p-1.5 hover:bg-slate-100 rounded-md text-slate-600",
|
|
1188
|
+
title: "Version History",
|
|
1189
|
+
children: /* @__PURE__ */ t.jsx($e, { size: 18 })
|
|
1190
|
+
}
|
|
1191
|
+
),
|
|
1192
|
+
/* @__PURE__ */ t.jsx(
|
|
1193
|
+
"button",
|
|
1194
|
+
{
|
|
1195
|
+
className: "p-1.5 hover:bg-slate-100 rounded-md text-slate-600",
|
|
1196
|
+
title: "Run Code",
|
|
1197
|
+
children: /* @__PURE__ */ t.jsx(Me, { size: 18 })
|
|
1198
|
+
}
|
|
1199
|
+
),
|
|
1200
|
+
/* @__PURE__ */ t.jsx(
|
|
1201
|
+
"button",
|
|
1202
|
+
{
|
|
1203
|
+
className: "p-1.5 hover:bg-slate-100 rounded-md text-slate-600",
|
|
1204
|
+
title: "Export",
|
|
1205
|
+
children: /* @__PURE__ */ t.jsx(It, { size: 18 })
|
|
1206
|
+
}
|
|
1207
|
+
),
|
|
1208
|
+
/* @__PURE__ */ t.jsxs("button", { className: "ml-2 px-3 py-1.5 bg-slate-900 text-white rounded-md flex items-center text-sm hover:bg-slate-800", children: [
|
|
1209
|
+
/* @__PURE__ */ t.jsx(kt, { size: 16, className: "mr-1.5" }),
|
|
1210
|
+
" Save"
|
|
1211
|
+
] }),
|
|
1212
|
+
/* @__PURE__ */ t.jsxs("div", { className: "ml-2 px-3 py-1.5 bg-emerald-100 text-emerald-800 rounded-md flex items-center text-sm", children: [
|
|
1213
|
+
/* @__PURE__ */ t.jsx("span", { className: "w-2 h-2 bg-emerald-500 rounded-full mr-1.5" }),
|
|
1214
|
+
" ",
|
|
1215
|
+
"Draft"
|
|
1216
|
+
] })
|
|
1217
|
+
] })
|
|
1218
|
+
] }), ur = () => {
|
|
1219
|
+
const o = [
|
|
1220
|
+
{
|
|
1221
|
+
name: "Lead",
|
|
1222
|
+
fields: ["id", "name", "email", "phone", "status", "createdAt"],
|
|
1223
|
+
expanded: !0
|
|
1224
|
+
},
|
|
1225
|
+
{
|
|
1226
|
+
name: "Contact",
|
|
1227
|
+
fields: ["id", "firstName", "lastName", "email", "phone"],
|
|
1228
|
+
expanded: !1
|
|
1229
|
+
},
|
|
1230
|
+
{
|
|
1231
|
+
name: "Account",
|
|
1232
|
+
fields: ["id", "name", "industry", "website", "employees"],
|
|
1233
|
+
expanded: !1
|
|
1234
|
+
},
|
|
1235
|
+
{
|
|
1236
|
+
name: "Opportunity",
|
|
1237
|
+
fields: ["id", "name", "amount", "stage", "closeDate"],
|
|
1238
|
+
expanded: !1
|
|
1239
|
+
}
|
|
1240
|
+
];
|
|
1241
|
+
return /* @__PURE__ */ t.jsxs("div", { className: "h-full", children: [
|
|
1242
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex items-center justify-between p-4 border-b border-slate-200", children: /* @__PURE__ */ t.jsx("h2", { className: "font-medium text-sm", children: "Data Explorer" }) }),
|
|
1243
|
+
/* @__PURE__ */ t.jsxs("div", { className: "p-3", children: [
|
|
1244
|
+
/* @__PURE__ */ t.jsxs("div", { className: "relative mb-3", children: [
|
|
1245
|
+
/* @__PURE__ */ t.jsx(
|
|
1246
|
+
Be,
|
|
1247
|
+
{
|
|
1248
|
+
size: 16,
|
|
1249
|
+
className: "absolute left-2.5 top-2.5 text-slate-400"
|
|
1250
|
+
}
|
|
1251
|
+
),
|
|
1252
|
+
/* @__PURE__ */ t.jsx(
|
|
1253
|
+
"input",
|
|
1254
|
+
{
|
|
1255
|
+
type: "text",
|
|
1256
|
+
placeholder: "Search objects...",
|
|
1257
|
+
className: "w-full pl-8 pr-3 py-2 text-sm border border-slate-200 rounded-md focus:outline-none focus:ring-2 focus:ring-slate-300"
|
|
1258
|
+
}
|
|
1259
|
+
)
|
|
1260
|
+
] }),
|
|
1261
|
+
/* @__PURE__ */ t.jsx("div", { children: o.map((r) => /* @__PURE__ */ t.jsxs("div", { className: "mb-1", children: [
|
|
1262
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center p-2 hover:bg-slate-50 rounded-md cursor-pointer", children: [
|
|
1263
|
+
/* @__PURE__ */ t.jsx(
|
|
1264
|
+
Dt,
|
|
1265
|
+
{
|
|
1266
|
+
size: 16,
|
|
1267
|
+
className: `mr-1 text-slate-400 transition-transform ${r.expanded ? "rotate-90" : ""}`
|
|
1268
|
+
}
|
|
1269
|
+
),
|
|
1270
|
+
/* @__PURE__ */ t.jsx(Ae, { size: 16, className: "mr-2 text-slate-500" }),
|
|
1271
|
+
/* @__PURE__ */ t.jsx("span", { className: "text-sm font-medium", children: r.name })
|
|
1272
|
+
] }),
|
|
1273
|
+
r.expanded && /* @__PURE__ */ t.jsx("div", { className: "ml-7 border-l border-slate-200 pl-2", children: r.fields.map((s) => /* @__PURE__ */ t.jsx(
|
|
1274
|
+
"div",
|
|
1275
|
+
{
|
|
1276
|
+
className: "flex items-center p-1.5 hover:bg-slate-50 rounded-md cursor-pointer",
|
|
1277
|
+
children: /* @__PURE__ */ t.jsx("span", { className: "text-xs text-slate-600", children: s })
|
|
1278
|
+
},
|
|
1279
|
+
s
|
|
1280
|
+
)) })
|
|
1281
|
+
] }, r.name)) })
|
|
1282
|
+
] })
|
|
1283
|
+
] });
|
|
1284
|
+
}, fr = () => {
|
|
1285
|
+
const o = [
|
|
1286
|
+
{
|
|
1287
|
+
name: "formatCurrency",
|
|
1288
|
+
description: "Format a number as currency",
|
|
1289
|
+
category: "Formatting"
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
name: "calculateDiscount",
|
|
1293
|
+
description: "Calculate discount based on amount",
|
|
1294
|
+
category: "Calculations"
|
|
1295
|
+
},
|
|
1296
|
+
{
|
|
1297
|
+
name: "getLeadData",
|
|
1298
|
+
description: "Fetch lead data from CRM",
|
|
1299
|
+
category: "Data Access"
|
|
1300
|
+
},
|
|
1301
|
+
{
|
|
1302
|
+
name: "updateContact",
|
|
1303
|
+
description: "Update contact information",
|
|
1304
|
+
category: "Data Modification"
|
|
1305
|
+
},
|
|
1306
|
+
{
|
|
1307
|
+
name: "sendEmail",
|
|
1308
|
+
description: "Send an email to a contact",
|
|
1309
|
+
category: "Communication"
|
|
1310
|
+
},
|
|
1311
|
+
{
|
|
1312
|
+
name: "validateEmail",
|
|
1313
|
+
description: "Validate email format",
|
|
1314
|
+
category: "Validation"
|
|
1315
|
+
}
|
|
1316
|
+
];
|
|
1317
|
+
return /* @__PURE__ */ t.jsxs("div", { className: "h-full", children: [
|
|
1318
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex items-center justify-between p-4 border-b border-slate-200", children: /* @__PURE__ */ t.jsx("h2", { className: "font-medium text-sm", children: "Function Library" }) }),
|
|
1319
|
+
/* @__PURE__ */ t.jsxs("div", { className: "p-3", children: [
|
|
1320
|
+
/* @__PURE__ */ t.jsxs("div", { className: "relative mb-3", children: [
|
|
1321
|
+
/* @__PURE__ */ t.jsx(
|
|
1322
|
+
Be,
|
|
1323
|
+
{
|
|
1324
|
+
size: 16,
|
|
1325
|
+
className: "absolute left-2.5 top-2.5 text-slate-400"
|
|
1326
|
+
}
|
|
1327
|
+
),
|
|
1328
|
+
/* @__PURE__ */ t.jsx(
|
|
1329
|
+
"input",
|
|
1330
|
+
{
|
|
1331
|
+
type: "text",
|
|
1332
|
+
placeholder: "Search functions...",
|
|
1333
|
+
className: "w-full pl-8 pr-3 py-2 text-sm border border-slate-200 rounded-md focus:outline-none focus:ring-2 focus:ring-slate-300"
|
|
1334
|
+
}
|
|
1335
|
+
)
|
|
1336
|
+
] }),
|
|
1337
|
+
/* @__PURE__ */ t.jsx("div", { children: o.map((r) => /* @__PURE__ */ t.jsxs(
|
|
1338
|
+
"div",
|
|
1339
|
+
{
|
|
1340
|
+
className: "p-2 border border-slate-200 rounded-md mb-2 hover:bg-slate-50 cursor-pointer",
|
|
1341
|
+
children: [
|
|
1342
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1343
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center", children: [
|
|
1344
|
+
/* @__PURE__ */ t.jsx(ze, { size: 16, className: "mr-2 text-slate-500" }),
|
|
1345
|
+
/* @__PURE__ */ t.jsx("span", { className: "text-sm font-medium", children: r.name })
|
|
1346
|
+
] }),
|
|
1347
|
+
/* @__PURE__ */ t.jsx("span", { className: "text-xs bg-slate-100 px-2 py-0.5 rounded text-slate-600", children: r.category })
|
|
1348
|
+
] }),
|
|
1349
|
+
/* @__PURE__ */ t.jsx("p", { className: "text-xs text-slate-500 mt-1", children: r.description })
|
|
1350
|
+
]
|
|
1351
|
+
},
|
|
1352
|
+
r.name
|
|
1353
|
+
)) }),
|
|
1354
|
+
/* @__PURE__ */ t.jsxs("div", { className: "mt-4 p-3 bg-slate-50 rounded-md border border-slate-200 flex items-center", children: [
|
|
1355
|
+
/* @__PURE__ */ t.jsx(At, { size: 16, className: "text-slate-500 mr-2" }),
|
|
1356
|
+
/* @__PURE__ */ t.jsx("span", { className: "text-xs text-slate-600", children: "Browse documentation for more functions and examples" })
|
|
1357
|
+
] })
|
|
1358
|
+
] })
|
|
1359
|
+
] });
|
|
1360
|
+
}, mr = ({ code: o }) => {
|
|
1361
|
+
const [r, s] = I(null), [i, c] = I(!1), g = "body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; padding: 1rem; }", w = ((d) => d.replace(
|
|
1362
|
+
/import\s+.*axios.*from\s+['"]axios['"];?/g,
|
|
1363
|
+
"// Axios imports removed for preview"
|
|
1364
|
+
).replace(/axios\./g, "/* axios. */").replace(/fetch\(/g, "/* fetch( */"))(o), x = `
|
|
1365
|
+
<!DOCTYPE html>
|
|
1366
|
+
<html>
|
|
1367
|
+
<head>
|
|
1368
|
+
<style>${g}</style>
|
|
1369
|
+
</head>
|
|
1370
|
+
<body>
|
|
1371
|
+
<div id="root"></div>
|
|
1372
|
+
<script>
|
|
1373
|
+
try {
|
|
1374
|
+
// Disable network requests in the preview
|
|
1375
|
+
window.fetch = function() {
|
|
1376
|
+
console.log('Network requests are disabled in preview');
|
|
1377
|
+
return Promise.reject(new Error('Network requests are disabled in preview'));
|
|
1378
|
+
};
|
|
1379
|
+
const preview = () => {
|
|
1380
|
+
const output = document.getElementById('root');
|
|
1381
|
+
output.innerHTML = '<div style="padding: 20px;">Preview will appear here</div>';
|
|
1382
|
+
if (${w.includes("console.log")}) {
|
|
1383
|
+
output.innerHTML += '<div style="padding: 10px; background: #f0f0f0; border-radius: 4px; margin-top: 10px;">Console output would appear here</div>';
|
|
1384
|
+
}
|
|
1385
|
+
};
|
|
1386
|
+
preview();
|
|
1387
|
+
} catch (e) {
|
|
1388
|
+
document.getElementById('root').innerHTML = '<div style="color: red; padding: 20px;">Error: ' + e.message + '</div>';
|
|
1389
|
+
}
|
|
1390
|
+
<\/script>
|
|
1391
|
+
</body>
|
|
1392
|
+
</html>
|
|
1393
|
+
`, N = () => {
|
|
1394
|
+
c(!0), s(null), setTimeout(() => c(!1), 300);
|
|
1395
|
+
};
|
|
1396
|
+
return /* @__PURE__ */ t.jsxs("div", { className: "h-full flex flex-col", children: [
|
|
1397
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between p-4 border-b border-slate-200", children: [
|
|
1398
|
+
/* @__PURE__ */ t.jsx("h2", { className: "font-medium text-sm", children: "Preview" }),
|
|
1399
|
+
/* @__PURE__ */ t.jsx(
|
|
1400
|
+
"button",
|
|
1401
|
+
{
|
|
1402
|
+
className: "p-1 hover:bg-slate-100 rounded-md",
|
|
1403
|
+
onClick: N,
|
|
1404
|
+
children: /* @__PURE__ */ t.jsx(zt, { size: 16, className: i ? "animate-spin" : "" })
|
|
1405
|
+
}
|
|
1406
|
+
)
|
|
1407
|
+
] }),
|
|
1408
|
+
/* @__PURE__ */ t.jsx("div", { className: "flex-1 bg-white overflow-auto", children: r ? /* @__PURE__ */ t.jsxs("div", { className: "p-4 bg-red-50 border border-red-200 rounded-md flex items-start", children: [
|
|
1409
|
+
/* @__PURE__ */ t.jsx($t, { size: 16, className: "text-red-500 mr-2 mt-0.5" }),
|
|
1410
|
+
/* @__PURE__ */ t.jsxs("div", { children: [
|
|
1411
|
+
/* @__PURE__ */ t.jsx("p", { className: "text-sm font-medium text-red-800", children: "Preview Error" }),
|
|
1412
|
+
/* @__PURE__ */ t.jsx("p", { className: "text-xs text-red-600", children: r })
|
|
1413
|
+
] })
|
|
1414
|
+
] }) : /* @__PURE__ */ t.jsx(
|
|
1415
|
+
"iframe",
|
|
1416
|
+
{
|
|
1417
|
+
title: "Preview",
|
|
1418
|
+
className: "w-full h-full",
|
|
1419
|
+
srcDoc: x,
|
|
1420
|
+
sandbox: "allow-scripts",
|
|
1421
|
+
onError: () => s("Failed to load preview")
|
|
1422
|
+
}
|
|
1423
|
+
) })
|
|
1424
|
+
] });
|
|
1425
|
+
}, hr = () => {
|
|
1426
|
+
const o = [
|
|
1427
|
+
{
|
|
1428
|
+
id: "1",
|
|
1429
|
+
name: "Should format currency correctly",
|
|
1430
|
+
status: "passed",
|
|
1431
|
+
duration: "12ms"
|
|
1432
|
+
},
|
|
1433
|
+
{
|
|
1434
|
+
id: "2",
|
|
1435
|
+
name: "Should calculate discount",
|
|
1436
|
+
status: "passed",
|
|
1437
|
+
duration: "8ms"
|
|
1438
|
+
},
|
|
1439
|
+
{
|
|
1440
|
+
id: "3",
|
|
1441
|
+
name: "Should validate email format",
|
|
1442
|
+
status: "failed",
|
|
1443
|
+
duration: "5ms",
|
|
1444
|
+
error: "Expected true but received false"
|
|
1445
|
+
},
|
|
1446
|
+
{
|
|
1447
|
+
id: "4",
|
|
1448
|
+
name: "Should handle empty input",
|
|
1449
|
+
status: "passed",
|
|
1450
|
+
duration: "3ms"
|
|
1451
|
+
}
|
|
1452
|
+
];
|
|
1453
|
+
return /* @__PURE__ */ t.jsxs("div", { className: "h-full", children: [
|
|
1454
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between p-4 border-b border-slate-200", children: [
|
|
1455
|
+
/* @__PURE__ */ t.jsx("h2", { className: "font-medium text-sm", children: "Test Runner" }),
|
|
1456
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center", children: [
|
|
1457
|
+
/* @__PURE__ */ t.jsx("button", { className: "p-1 hover:bg-slate-100 rounded-md mr-1", children: /* @__PURE__ */ t.jsx(Le, { size: 14 }) }),
|
|
1458
|
+
/* @__PURE__ */ t.jsxs("button", { className: "bg-slate-900 text-white text-xs px-2 py-1 rounded-md flex items-center", children: [
|
|
1459
|
+
/* @__PURE__ */ t.jsx(Me, { size: 12, className: "mr-1" }),
|
|
1460
|
+
" Run Tests"
|
|
1461
|
+
] })
|
|
1462
|
+
] })
|
|
1463
|
+
] }),
|
|
1464
|
+
/* @__PURE__ */ t.jsxs("div", { className: "p-3", children: [
|
|
1465
|
+
/* @__PURE__ */ t.jsxs("div", { className: "mb-3 p-2 bg-slate-50 rounded-md border border-slate-200", children: [
|
|
1466
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex justify-between items-center", children: [
|
|
1467
|
+
/* @__PURE__ */ t.jsx("span", { className: "text-sm font-medium", children: "Test Summary" }),
|
|
1468
|
+
/* @__PURE__ */ t.jsx("span", { className: "text-xs", children: "3 passed, 1 failed, 4 total" })
|
|
1469
|
+
] }),
|
|
1470
|
+
/* @__PURE__ */ t.jsx("div", { className: "w-full h-2 bg-slate-200 rounded-full mt-2 overflow-hidden", children: /* @__PURE__ */ t.jsx(
|
|
1471
|
+
"div",
|
|
1472
|
+
{
|
|
1473
|
+
className: "h-full bg-emerald-500",
|
|
1474
|
+
style: {
|
|
1475
|
+
width: "75%"
|
|
1476
|
+
}
|
|
1477
|
+
}
|
|
1478
|
+
) })
|
|
1479
|
+
] }),
|
|
1480
|
+
/* @__PURE__ */ t.jsx("div", { children: o.map((r) => /* @__PURE__ */ t.jsxs(
|
|
1481
|
+
"div",
|
|
1482
|
+
{
|
|
1483
|
+
className: `p-2 mb-2 rounded-md ${r.status === "failed" ? "bg-red-50 border border-red-100" : "bg-slate-50 border border-slate-200"}`,
|
|
1484
|
+
children: [
|
|
1485
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1486
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center", children: [
|
|
1487
|
+
r.status === "passed" ? /* @__PURE__ */ t.jsx(
|
|
1488
|
+
Lt,
|
|
1489
|
+
{
|
|
1490
|
+
size: 16,
|
|
1491
|
+
className: "text-emerald-500 mr-2"
|
|
1492
|
+
}
|
|
1493
|
+
) : /* @__PURE__ */ t.jsx(Mt, { size: 16, className: "text-red-500 mr-2" }),
|
|
1494
|
+
/* @__PURE__ */ t.jsx("span", { className: "text-sm", children: r.name })
|
|
1495
|
+
] }),
|
|
1496
|
+
/* @__PURE__ */ t.jsx("span", { className: "text-xs text-slate-500", children: r.duration })
|
|
1497
|
+
] }),
|
|
1498
|
+
r.error && /* @__PURE__ */ t.jsx("div", { className: "mt-2 text-xs text-red-600 bg-red-50 p-2 rounded", children: r.error })
|
|
1499
|
+
]
|
|
1500
|
+
},
|
|
1501
|
+
r.id
|
|
1502
|
+
)) }),
|
|
1503
|
+
/* @__PURE__ */ t.jsx("div", { className: "mt-4", children: /* @__PURE__ */ t.jsx("button", { className: "w-full py-2 border border-dashed border-slate-300 rounded-md text-sm text-slate-500 hover:bg-slate-50", children: "+ Add New Test Case" }) })
|
|
1504
|
+
] })
|
|
1505
|
+
] });
|
|
1506
|
+
}, pr = () => {
|
|
1507
|
+
const o = [
|
|
1508
|
+
{
|
|
1509
|
+
id: "v1",
|
|
1510
|
+
name: "Initial version",
|
|
1511
|
+
author: "John Doe",
|
|
1512
|
+
timestamp: "Today, 2:30 PM",
|
|
1513
|
+
current: !0
|
|
1514
|
+
},
|
|
1515
|
+
{
|
|
1516
|
+
id: "v2",
|
|
1517
|
+
name: "Added form validation",
|
|
1518
|
+
author: "John Doe",
|
|
1519
|
+
timestamp: "Today, 1:15 PM",
|
|
1520
|
+
current: !1
|
|
1521
|
+
},
|
|
1522
|
+
{
|
|
1523
|
+
id: "v3",
|
|
1524
|
+
name: "Fixed API integration",
|
|
1525
|
+
author: "Sarah Smith",
|
|
1526
|
+
timestamp: "Yesterday, 4:45 PM",
|
|
1527
|
+
current: !1
|
|
1528
|
+
},
|
|
1529
|
+
{
|
|
1530
|
+
id: "v4",
|
|
1531
|
+
name: "Initial setup",
|
|
1532
|
+
author: "Sarah Smith",
|
|
1533
|
+
timestamp: "Yesterday, 11:30 AM",
|
|
1534
|
+
current: !1
|
|
1535
|
+
}
|
|
1536
|
+
];
|
|
1537
|
+
return /* @__PURE__ */ t.jsxs("div", { className: "h-full", children: [
|
|
1538
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between p-4 border-b border-slate-200", children: [
|
|
1539
|
+
/* @__PURE__ */ t.jsx("h2", { className: "font-medium text-sm", children: "Version History" }),
|
|
1540
|
+
/* @__PURE__ */ t.jsx("button", { className: "text-xs text-slate-500 hover:text-slate-800", children: "Save Version" })
|
|
1541
|
+
] }),
|
|
1542
|
+
/* @__PURE__ */ t.jsx("div", { className: "p-2", children: o.map((r) => /* @__PURE__ */ t.jsxs(
|
|
1543
|
+
"div",
|
|
1544
|
+
{
|
|
1545
|
+
className: `p-3 mb-2 rounded-md ${r.current ? "bg-slate-100 border border-slate-200" : "hover:bg-slate-50 cursor-pointer"}`,
|
|
1546
|
+
children: [
|
|
1547
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center justify-between", children: [
|
|
1548
|
+
/* @__PURE__ */ t.jsx("span", { className: "text-sm font-medium", children: r.name }),
|
|
1549
|
+
r.current && /* @__PURE__ */ t.jsx("span", { className: "text-xs bg-emerald-100 text-emerald-800 px-2 py-0.5 rounded", children: "Current" })
|
|
1550
|
+
] }),
|
|
1551
|
+
/* @__PURE__ */ t.jsxs("div", { className: "flex items-center mt-1 text-xs text-slate-500", children: [
|
|
1552
|
+
/* @__PURE__ */ t.jsx(Bt, { size: 12, className: "mr-1" }),
|
|
1553
|
+
/* @__PURE__ */ t.jsx("span", { className: "mr-3", children: r.author }),
|
|
1554
|
+
/* @__PURE__ */ t.jsx(Wt, { size: 12, className: "mr-1" }),
|
|
1555
|
+
/* @__PURE__ */ t.jsx("span", { children: r.timestamp })
|
|
1556
|
+
] }),
|
|
1557
|
+
!r.current && /* @__PURE__ */ t.jsx("div", { className: "mt-2", children: /* @__PURE__ */ t.jsxs("button", { className: "text-xs flex items-center text-slate-600 hover:text-slate-900", children: [
|
|
1558
|
+
/* @__PURE__ */ t.jsx(Vt, { size: 12, className: "mr-1" }),
|
|
1559
|
+
" Restore this version"
|
|
1560
|
+
] }) })
|
|
1561
|
+
]
|
|
1562
|
+
},
|
|
1563
|
+
r.id
|
|
1564
|
+
)) })
|
|
1565
|
+
] });
|
|
1566
|
+
}, xr = "1.0.0";
|
|
1162
1567
|
export {
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1568
|
+
br as Alert,
|
|
1569
|
+
yr as Button,
|
|
1570
|
+
Zt as CodeEditor,
|
|
1571
|
+
se as CodeEditorWrapper,
|
|
1572
|
+
ur as DataExplorer,
|
|
1573
|
+
tr as EditorLayout,
|
|
1574
|
+
rr as FileExplorer,
|
|
1575
|
+
lr as FormCodeEditor,
|
|
1576
|
+
Gt as FormFileProvider,
|
|
1577
|
+
fr as FunctionLibrary,
|
|
1578
|
+
dr as Header,
|
|
1579
|
+
mr as PreviewPanel,
|
|
1580
|
+
jr as Splitter,
|
|
1581
|
+
hr as TestRunner,
|
|
1582
|
+
wr as Tooltip,
|
|
1583
|
+
Er as Tree,
|
|
1584
|
+
cr as URLCodeEditor,
|
|
1585
|
+
Kt as URLFileProvider,
|
|
1586
|
+
xr as VERSION,
|
|
1587
|
+
pr as VersionHistory,
|
|
1588
|
+
or as WorkflowCodeEditor,
|
|
1589
|
+
Jt as WorkflowFileProvider,
|
|
1590
|
+
Xt as createFileProvider,
|
|
1591
|
+
Ht as useFileManager
|
|
1181
1592
|
};
|