superleap-code-editor 1.0.2 → 1.0.3

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/index.esm.js CHANGED
@@ -1,386 +1,720 @@
1
- import K, { useState as C, useCallback as _, useEffect as G } from "react";
2
- import me from "@monaco-editor/react";
3
- import { Tooltip as X, Button as D, Splitter as F, Alert as he, Tree as pe } from "antd";
4
- import { Alert as Ve, Button as qe, Splitter as Je, Tooltip as Ge, Tree as Xe } from "antd";
5
- import { IconFolderOpen as ee, IconDatabase as ge, IconCode as ve, IconHistory as xe, IconFlask as Ee, IconSettings as ye, IconPlus as be, IconFile as je } from "@tabler/icons-react";
6
- var N = { exports: {} }, k = {};
1
+ import ne, { useState as $, useCallback as A, useEffect as Oe } from "react";
2
+ import yr from "@monaco-editor/react";
3
+ import { Tooltip as Pe, Button as te, Splitter as k, Alert as Er, Tree as br } from "antd";
4
+ import { Alert as Hr, Button as Xr, Splitter as Zr, Tooltip as Qr, Tree as et } from "antd";
5
+ import { IconFolderOpen as Ae, IconDatabase as xr, IconCode as Fr, IconHistory as Rr, IconFlask as wr, IconSettings as _r, IconPlus as jr, IconFile as Cr } from "@tabler/icons-react";
6
+ var q = { exports: {} }, L = {};
7
7
  /**
8
8
  * @license React
9
- * react-jsx-runtime.production.js
9
+ * react-jsx-runtime.production.min.js
10
10
  *
11
- * Copyright (c) Meta Platforms, Inc. and affiliates.
11
+ * Copyright (c) Facebook, Inc. and its affiliates.
12
12
  *
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 H;
17
- function Fe() {
18
- if (H) return k;
19
- H = 1;
20
- var i = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
21
- function r(n, a, l) {
22
- var d = null;
23
- if (l !== void 0 && (d = "" + l), a.key !== void 0 && (d = "" + a.key), "key" in a) {
24
- l = {};
25
- for (var p in a)
26
- p !== "key" && (l[p] = a[p]);
27
- } else l = a;
28
- return a = l.ref, {
29
- $$typeof: i,
30
- type: n,
31
- key: d,
32
- ref: a !== void 0 ? a : null,
33
- props: l
34
- };
16
+ var ke;
17
+ function Tr() {
18
+ if (ke) return L;
19
+ ke = 1;
20
+ var o = ne, t = Symbol.for("react.element"), a = Symbol.for("react.fragment"), i = Object.prototype.hasOwnProperty, d = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, b = { key: !0, ref: !0, __self: !0, __source: !0 };
21
+ function x(F, m, j) {
22
+ var u, R = {}, w = null, S = null;
23
+ j !== void 0 && (w = "" + j), m.key !== void 0 && (w = "" + m.key), m.ref !== void 0 && (S = m.ref);
24
+ for (u in m) i.call(m, u) && !b.hasOwnProperty(u) && (R[u] = m[u]);
25
+ if (F && F.defaultProps) for (u in m = F.defaultProps, m) R[u] === void 0 && (R[u] = m[u]);
26
+ return { $$typeof: t, type: F, key: w, ref: S, props: R, _owner: d.current };
35
27
  }
36
- return k.Fragment = t, k.jsx = r, k.jsxs = r, k;
28
+ return L.Fragment = a, L.jsx = x, L.jsxs = x, L;
37
29
  }
38
- var S = {};
30
+ var W = {};
39
31
  /**
40
32
  * @license React
41
33
  * react-jsx-runtime.development.js
42
34
  *
43
- * Copyright (c) Meta Platforms, Inc. and affiliates.
35
+ * Copyright (c) Facebook, Inc. and its affiliates.
44
36
  *
45
37
  * This source code is licensed under the MIT license found in the
46
38
  * LICENSE file in the root directory of this source tree.
47
39
  */
48
- var Z;
49
- function we() {
50
- return Z || (Z = 1, process.env.NODE_ENV !== "production" && (function() {
51
- function i(e) {
52
- if (e == null) return null;
53
- if (typeof e == "function")
54
- return e.$$typeof === fe ? null : e.displayName || e.name || null;
55
- if (typeof e == "string") return e;
40
+ var Ie;
41
+ function Sr() {
42
+ return Ie || (Ie = 1, process.env.NODE_ENV !== "production" && (function() {
43
+ var o = ne, t = Symbol.for("react.element"), a = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), d = Symbol.for("react.strict_mode"), b = Symbol.for("react.profiler"), x = Symbol.for("react.provider"), F = Symbol.for("react.context"), m = Symbol.for("react.forward_ref"), j = Symbol.for("react.suspense"), u = Symbol.for("react.suspense_list"), R = Symbol.for("react.memo"), w = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), B = Symbol.iterator, J = "@@iterator";
44
+ function G(e) {
45
+ if (e === null || typeof e != "object")
46
+ return null;
47
+ var r = B && e[B] || e[J];
48
+ return typeof r == "function" ? r : null;
49
+ }
50
+ var g = o.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
51
+ function h(e) {
52
+ {
53
+ for (var r = arguments.length, n = new Array(r > 1 ? r - 1 : 0), s = 1; s < r; s++)
54
+ n[s - 1] = arguments[s];
55
+ We("error", e, n);
56
+ }
57
+ }
58
+ function We(e, r, n) {
59
+ {
60
+ var s = g.ReactDebugCurrentFrame, v = s.getStackAddendum();
61
+ v !== "" && (r += "%s", n = n.concat([v]));
62
+ var p = n.map(function(f) {
63
+ return String(f);
64
+ });
65
+ p.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, p);
66
+ }
67
+ }
68
+ var Be = !1, Me = !1, Ye = !1, ze = !1, Ve = !1, ae;
69
+ ae = Symbol.for("react.module.reference");
70
+ function Ue(e) {
71
+ return !!(typeof e == "string" || typeof e == "function" || e === i || e === b || Ve || e === d || e === j || e === u || ze || e === S || Be || Me || Ye || typeof e == "object" && e !== null && (e.$$typeof === w || e.$$typeof === R || e.$$typeof === x || e.$$typeof === F || e.$$typeof === m || // This needs to include all possible module reference object
72
+ // types supported by any Flight configuration anywhere since
73
+ // we don't know which Flight build this will end up being used
74
+ // with.
75
+ e.$$typeof === ae || e.getModuleId !== void 0));
76
+ }
77
+ function qe(e, r, n) {
78
+ var s = e.displayName;
79
+ if (s)
80
+ return s;
81
+ var v = r.displayName || r.name || "";
82
+ return v !== "" ? n + "(" + v + ")" : n;
83
+ }
84
+ function oe(e) {
85
+ return e.displayName || "Context";
86
+ }
87
+ function O(e) {
88
+ if (e == null)
89
+ return null;
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")
91
+ return e.displayName || e.name || null;
92
+ if (typeof e == "string")
93
+ return e;
56
94
  switch (e) {
57
- case T:
95
+ case i:
58
96
  return "Fragment";
59
- case u:
97
+ case a:
98
+ return "Portal";
99
+ case b:
60
100
  return "Profiler";
61
- case O:
101
+ case d:
62
102
  return "StrictMode";
63
- case ae:
103
+ case j:
64
104
  return "Suspense";
65
- case se:
105
+ case u:
66
106
  return "SuspenseList";
67
- case ce:
68
- return "Activity";
69
107
  }
70
108
  if (typeof e == "object")
71
- switch (typeof e.tag == "number" && console.error(
72
- "Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
73
- ), e.$$typeof) {
74
- case A:
75
- return "Portal";
76
- case ie:
77
- return (e.displayName || "Context") + ".Provider";
78
- case g:
79
- return (e._context.displayName || "Context") + ".Consumer";
80
- case oe:
81
- var s = e.render;
82
- return e = e.displayName, e || (e = s.displayName || s.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
83
- case le:
84
- return s = e.displayName || null, s !== null ? s : i(e.type) || "Memo";
85
- case M:
86
- s = e._payload, e = e._init;
109
+ switch (e.$$typeof) {
110
+ case F:
111
+ var r = e;
112
+ return oe(r) + ".Consumer";
113
+ case x:
114
+ var n = e;
115
+ return oe(n._context) + ".Provider";
116
+ case m:
117
+ return qe(e, e.render, "ForwardRef");
118
+ case R:
119
+ var s = e.displayName || null;
120
+ return s !== null ? s : O(e.type) || "Memo";
121
+ case w: {
122
+ var v = e, p = v._payload, f = v._init;
87
123
  try {
88
- return i(e(s));
124
+ return O(f(p));
89
125
  } catch {
126
+ return null;
90
127
  }
128
+ }
91
129
  }
92
130
  return null;
93
131
  }
94
- function t(e) {
95
- return "" + e;
132
+ var P = Object.assign, N = 0, se, le, ce, ue, fe, de, ve;
133
+ function he() {
96
134
  }
97
- function r(e) {
135
+ he.__reactDisabledLog = !0;
136
+ function Je() {
137
+ {
138
+ if (N === 0) {
139
+ se = console.log, le = console.info, ce = console.warn, ue = console.error, fe = console.group, de = console.groupCollapsed, ve = console.groupEnd;
140
+ var e = {
141
+ configurable: !0,
142
+ enumerable: !0,
143
+ value: he,
144
+ writable: !0
145
+ };
146
+ Object.defineProperties(console, {
147
+ info: e,
148
+ log: e,
149
+ warn: e,
150
+ error: e,
151
+ group: e,
152
+ groupCollapsed: e,
153
+ groupEnd: e
154
+ });
155
+ }
156
+ N++;
157
+ }
158
+ }
159
+ function Ge() {
160
+ {
161
+ if (N--, N === 0) {
162
+ var e = {
163
+ configurable: !0,
164
+ enumerable: !0,
165
+ writable: !0
166
+ };
167
+ Object.defineProperties(console, {
168
+ log: P({}, e, {
169
+ value: se
170
+ }),
171
+ info: P({}, e, {
172
+ value: le
173
+ }),
174
+ warn: P({}, e, {
175
+ value: ce
176
+ }),
177
+ error: P({}, e, {
178
+ value: ue
179
+ }),
180
+ group: P({}, e, {
181
+ value: fe
182
+ }),
183
+ groupCollapsed: P({}, e, {
184
+ value: de
185
+ }),
186
+ groupEnd: P({}, e, {
187
+ value: ve
188
+ })
189
+ });
190
+ }
191
+ N < 0 && h("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
192
+ }
193
+ }
194
+ var K = g.ReactCurrentDispatcher, H;
195
+ function M(e, r, n) {
196
+ {
197
+ if (H === void 0)
198
+ try {
199
+ throw Error();
200
+ } catch (v) {
201
+ var s = v.stack.trim().match(/\n( *(at )?)/);
202
+ H = s && s[1] || "";
203
+ }
204
+ return `
205
+ ` + H + e;
206
+ }
207
+ }
208
+ var X = !1, Y;
209
+ {
210
+ var Ke = typeof WeakMap == "function" ? WeakMap : Map;
211
+ Y = new Ke();
212
+ }
213
+ function pe(e, r) {
214
+ if (!e || X)
215
+ return "";
216
+ {
217
+ var n = Y.get(e);
218
+ if (n !== void 0)
219
+ return n;
220
+ }
221
+ var s;
222
+ X = !0;
223
+ var v = Error.prepareStackTrace;
224
+ Error.prepareStackTrace = void 0;
225
+ var p;
226
+ p = K.current, K.current = null, Je();
98
227
  try {
99
- t(e);
100
- var s = !1;
101
- } catch {
102
- s = !0;
103
- }
104
- if (s) {
105
- s = console;
106
- var f = s.error, m = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
107
- return f.call(
108
- s,
109
- "The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
110
- m
111
- ), t(e);
112
- }
113
- }
114
- function n(e) {
115
- if (e === T) return "<>";
116
- if (typeof e == "object" && e !== null && e.$$typeof === M)
117
- return "<...>";
228
+ if (r) {
229
+ var f = function() {
230
+ throw Error();
231
+ };
232
+ if (Object.defineProperty(f.prototype, "props", {
233
+ set: function() {
234
+ throw Error();
235
+ }
236
+ }), typeof Reflect == "object" && Reflect.construct) {
237
+ try {
238
+ Reflect.construct(f, []);
239
+ } catch (T) {
240
+ s = T;
241
+ }
242
+ Reflect.construct(e, [], f);
243
+ } else {
244
+ try {
245
+ f.call();
246
+ } catch (T) {
247
+ s = T;
248
+ }
249
+ e.call(f.prototype);
250
+ }
251
+ } else {
252
+ try {
253
+ throw Error();
254
+ } catch (T) {
255
+ s = T;
256
+ }
257
+ e();
258
+ }
259
+ } catch (T) {
260
+ if (T && s && typeof T.stack == "string") {
261
+ for (var c = T.stack.split(`
262
+ `), _ = s.stack.split(`
263
+ `), y = c.length - 1, E = _.length - 1; y >= 1 && E >= 0 && c[y] !== _[E]; )
264
+ E--;
265
+ for (; y >= 1 && E >= 0; y--, E--)
266
+ if (c[y] !== _[E]) {
267
+ if (y !== 1 || E !== 1)
268
+ do
269
+ if (y--, E--, E < 0 || c[y] !== _[E]) {
270
+ var C = `
271
+ ` + c[y].replace(" at new ", " at ");
272
+ return e.displayName && C.includes("<anonymous>") && (C = C.replace("<anonymous>", e.displayName)), typeof e == "function" && Y.set(e, C), C;
273
+ }
274
+ while (y >= 1 && E >= 0);
275
+ break;
276
+ }
277
+ }
278
+ } finally {
279
+ X = !1, K.current = p, Ge(), Error.prepareStackTrace = v;
280
+ }
281
+ var D = e ? e.displayName || e.name : "", Se = D ? M(D) : "";
282
+ return typeof e == "function" && Y.set(e, Se), Se;
283
+ }
284
+ function He(e, r, n) {
285
+ return pe(e, !1);
286
+ }
287
+ function Xe(e) {
288
+ var r = e.prototype;
289
+ return !!(r && r.isReactComponent);
290
+ }
291
+ function z(e, r, n) {
292
+ if (e == null)
293
+ return "";
294
+ if (typeof e == "function")
295
+ return pe(e, Xe(e));
296
+ if (typeof e == "string")
297
+ return M(e);
298
+ switch (e) {
299
+ case j:
300
+ return M("Suspense");
301
+ case u:
302
+ return M("SuspenseList");
303
+ }
304
+ if (typeof e == "object")
305
+ switch (e.$$typeof) {
306
+ case m:
307
+ return He(e.render);
308
+ case R:
309
+ return z(e.type, r, n);
310
+ case w: {
311
+ var s = e, v = s._payload, p = s._init;
312
+ try {
313
+ return z(p(v), r, n);
314
+ } catch {
315
+ }
316
+ }
317
+ }
318
+ return "";
319
+ }
320
+ var V = Object.prototype.hasOwnProperty, me = {}, ge = g.ReactDebugCurrentFrame;
321
+ function U(e) {
322
+ if (e) {
323
+ var r = e._owner, n = z(e.type, e._source, r ? r.type : null);
324
+ ge.setExtraStackFrame(n);
325
+ } else
326
+ ge.setExtraStackFrame(null);
327
+ }
328
+ function Ze(e, r, n, s, v) {
329
+ {
330
+ var p = Function.call.bind(V);
331
+ for (var f in e)
332
+ if (p(e, f)) {
333
+ var c = void 0;
334
+ try {
335
+ if (typeof e[f] != "function") {
336
+ var _ = Error((s || "React class") + ": " + n + " 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 _.name = "Invariant Violation", _;
338
+ }
339
+ c = e[f](r, f, s, n, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
340
+ } catch (y) {
341
+ c = y;
342
+ }
343
+ c && !(c instanceof Error) && (U(v), 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).", s || "React class", n, f, typeof c), U(null)), c instanceof Error && !(c.message in me) && (me[c.message] = !0, U(v), h("Failed %s type: %s", n, c.message), U(null));
344
+ }
345
+ }
346
+ }
347
+ var Qe = Array.isArray;
348
+ function Z(e) {
349
+ return Qe(e);
350
+ }
351
+ function er(e) {
352
+ {
353
+ var r = typeof Symbol == "function" && Symbol.toStringTag, n = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
354
+ return n;
355
+ }
356
+ }
357
+ function rr(e) {
118
358
  try {
119
- var s = i(e);
120
- return s ? "<" + s + ">" : "<...>";
359
+ return ye(e), !1;
121
360
  } catch {
122
- return "<...>";
361
+ return !0;
123
362
  }
124
363
  }
125
- function a() {
126
- var e = P.A;
127
- return e === null ? null : e.getOwner();
364
+ function ye(e) {
365
+ return "" + e;
128
366
  }
129
- function l() {
130
- return Error("react-stack-top-frame");
367
+ function Ee(e) {
368
+ if (rr(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.", er(e)), ye(e);
131
370
  }
132
- function d(e) {
133
- if (B.call(e, "key")) {
134
- var s = Object.getOwnPropertyDescriptor(e, "key").get;
135
- if (s && s.isReactWarning) return !1;
371
+ var be = g.ReactCurrentOwner, tr = {
372
+ key: !0,
373
+ ref: !0,
374
+ __self: !0,
375
+ __source: !0
376
+ }, xe, Fe;
377
+ function nr(e) {
378
+ if (V.call(e, "ref")) {
379
+ var r = Object.getOwnPropertyDescriptor(e, "ref").get;
380
+ if (r && r.isReactWarning)
381
+ return !1;
382
+ }
383
+ return e.ref !== void 0;
384
+ }
385
+ function ir(e) {
386
+ if (V.call(e, "key")) {
387
+ var r = Object.getOwnPropertyDescriptor(e, "key").get;
388
+ if (r && r.isReactWarning)
389
+ return !1;
136
390
  }
137
391
  return e.key !== void 0;
138
392
  }
139
- function p(e, s) {
140
- function f() {
141
- W || (W = !0, console.error(
142
- "%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://react.dev/link/special-props)",
143
- s
144
- ));
145
- }
146
- f.isReactWarning = !0, Object.defineProperty(e, "key", {
147
- get: f,
148
- configurable: !0
149
- });
150
- }
151
- function x() {
152
- var e = i(this.type);
153
- return U[e] || (U[e] = !0, console.error(
154
- "Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
155
- )), e = this.props.ref, e !== void 0 ? e : null;
156
- }
157
- function b(e, s, f, m, j, E, $, L) {
158
- return f = E.ref, e = {
159
- $$typeof: w,
393
+ function ar(e, r) {
394
+ typeof e.ref == "string" && be.current;
395
+ }
396
+ function or(e, r) {
397
+ {
398
+ var n = function() {
399
+ xe || (xe = !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)", r));
400
+ };
401
+ n.isReactWarning = !0, Object.defineProperty(e, "key", {
402
+ get: n,
403
+ configurable: !0
404
+ });
405
+ }
406
+ }
407
+ function sr(e, r) {
408
+ {
409
+ var n = function() {
410
+ Fe || (Fe = !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)", r));
411
+ };
412
+ n.isReactWarning = !0, Object.defineProperty(e, "ref", {
413
+ get: n,
414
+ configurable: !0
415
+ });
416
+ }
417
+ }
418
+ var lr = function(e, r, n, s, v, p, f) {
419
+ var c = {
420
+ // This tag allows us to uniquely identify this as a React Element
421
+ $$typeof: t,
422
+ // Built-in properties that belong on the element
160
423
  type: e,
161
- key: s,
162
- props: E,
163
- _owner: j
164
- }, (f !== void 0 ? f : null) !== null ? Object.defineProperty(e, "ref", {
165
- enumerable: !1,
166
- get: x
167
- }) : Object.defineProperty(e, "ref", { enumerable: !1, value: null }), e._store = {}, Object.defineProperty(e._store, "validated", {
424
+ key: r,
425
+ ref: n,
426
+ props: f,
427
+ // Record the component responsible for creating this element.
428
+ _owner: p
429
+ };
430
+ return c._store = {}, Object.defineProperty(c._store, "validated", {
168
431
  configurable: !1,
169
432
  enumerable: !1,
170
433
  writable: !0,
171
- value: 0
172
- }), Object.defineProperty(e, "_debugInfo", {
434
+ value: !1
435
+ }), Object.defineProperty(c, "_self", {
173
436
  configurable: !1,
174
437
  enumerable: !1,
175
- writable: !0,
176
- value: null
177
- }), Object.defineProperty(e, "_debugStack", {
178
- configurable: !1,
179
- enumerable: !1,
180
- writable: !0,
181
- value: $
182
- }), Object.defineProperty(e, "_debugTask", {
438
+ writable: !1,
439
+ value: s
440
+ }), Object.defineProperty(c, "_source", {
183
441
  configurable: !1,
184
442
  enumerable: !1,
185
- writable: !0,
186
- value: L
187
- }), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
188
- }
189
- function c(e, s, f, m, j, E, $, L) {
190
- var h = s.children;
191
- if (h !== void 0)
192
- if (m)
193
- if (ue(h)) {
194
- for (m = 0; m < h.length; m++)
195
- y(h[m]);
196
- Object.freeze && Object.freeze(h);
197
- } else
198
- console.error(
199
- "React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
200
- );
201
- else y(h);
202
- if (B.call(s, "key")) {
203
- h = i(e);
204
- var R = Object.keys(s).filter(function(de) {
205
- return de !== "key";
206
- });
207
- m = 0 < R.length ? "{key: someKey, " + R.join(": ..., ") + ": ...}" : "{key: someKey}", J[h + m] || (R = 0 < R.length ? "{" + R.join(": ..., ") + ": ...}" : "{}", console.error(
208
- `A props object containing a "key" prop is being spread into JSX:
209
- let props = %s;
210
- <%s {...props} />
211
- React keys must be passed directly to JSX without using spread:
212
- let props = %s;
213
- <%s key={someKey} {...props} />`,
214
- m,
215
- h,
216
- R,
217
- h
218
- ), J[h + m] = !0);
219
- }
220
- if (h = null, f !== void 0 && (r(f), h = "" + f), d(s) && (r(s.key), h = "" + s.key), "key" in s) {
221
- f = {};
222
- for (var z in s)
223
- z !== "key" && (f[z] = s[z]);
224
- } else f = s;
225
- return h && p(
226
- f,
227
- typeof e == "function" ? e.displayName || e.name || "Unknown" : e
228
- ), b(
229
- e,
230
- h,
231
- E,
232
- j,
233
- a(),
234
- f,
235
- $,
236
- L
237
- );
443
+ writable: !1,
444
+ value: v
445
+ }), Object.freeze && (Object.freeze(c.props), Object.freeze(c)), c;
446
+ };
447
+ function cr(e, r, n, s, v) {
448
+ {
449
+ var p, f = {}, c = null, _ = null;
450
+ n !== void 0 && (Ee(n), c = "" + n), ir(r) && (Ee(r.key), c = "" + r.key), nr(r) && (_ = r.ref, ar(r, v));
451
+ for (p in r)
452
+ V.call(r, p) && !tr.hasOwnProperty(p) && (f[p] = r[p]);
453
+ if (e && e.defaultProps) {
454
+ var y = e.defaultProps;
455
+ for (p in y)
456
+ f[p] === void 0 && (f[p] = y[p]);
457
+ }
458
+ if (c || _) {
459
+ var E = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
460
+ c && or(f, E), _ && sr(f, E);
461
+ }
462
+ return lr(e, c, _, v, s, be.current, f);
463
+ }
238
464
  }
239
- function y(e) {
240
- typeof e == "object" && e !== null && e.$$typeof === w && e._store && (e._store.validated = 1);
465
+ var Q = g.ReactCurrentOwner, Re = g.ReactDebugCurrentFrame;
466
+ function I(e) {
467
+ if (e) {
468
+ var r = e._owner, n = z(e.type, e._source, r ? r.type : null);
469
+ Re.setExtraStackFrame(n);
470
+ } else
471
+ Re.setExtraStackFrame(null);
241
472
  }
242
- var v = K, w = Symbol.for("react.transitional.element"), A = Symbol.for("react.portal"), T = Symbol.for("react.fragment"), O = Symbol.for("react.strict_mode"), u = Symbol.for("react.profiler"), g = Symbol.for("react.consumer"), ie = Symbol.for("react.context"), oe = Symbol.for("react.forward_ref"), ae = Symbol.for("react.suspense"), se = Symbol.for("react.suspense_list"), le = Symbol.for("react.memo"), M = Symbol.for("react.lazy"), ce = Symbol.for("react.activity"), fe = Symbol.for("react.client.reference"), P = v.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, B = Object.prototype.hasOwnProperty, ue = Array.isArray, I = console.createTask ? console.createTask : function() {
243
- return null;
244
- };
245
- v = {
246
- react_stack_bottom_frame: function(e) {
247
- return e();
473
+ var ee;
474
+ ee = !1;
475
+ function re(e) {
476
+ return typeof e == "object" && e !== null && e.$$typeof === t;
477
+ }
478
+ function we() {
479
+ {
480
+ if (Q.current) {
481
+ var e = O(Q.current.type);
482
+ if (e)
483
+ return `
484
+
485
+ Check the render method of \`` + e + "`.";
486
+ }
487
+ return "";
248
488
  }
249
- };
250
- var W, U = {}, V = v.react_stack_bottom_frame.bind(
251
- v,
252
- l
253
- )(), q = I(n(l)), J = {};
254
- S.Fragment = T, S.jsx = function(e, s, f, m, j) {
255
- var E = 1e4 > P.recentlyCreatedOwnerStacks++;
256
- return c(
257
- e,
258
- s,
259
- f,
260
- !1,
261
- m,
262
- j,
263
- E ? Error("react-stack-top-frame") : V,
264
- E ? I(n(e)) : q
265
- );
266
- }, S.jsxs = function(e, s, f, m, j) {
267
- var E = 1e4 > P.recentlyCreatedOwnerStacks++;
268
- return c(
269
- e,
270
- s,
271
- f,
272
- !0,
273
- m,
274
- j,
275
- E ? Error("react-stack-top-frame") : V,
276
- E ? I(n(e)) : q
277
- );
278
- };
279
- })()), S;
489
+ }
490
+ function ur(e) {
491
+ return "";
492
+ }
493
+ var _e = {};
494
+ function fr(e) {
495
+ {
496
+ var r = we();
497
+ if (!r) {
498
+ var n = typeof e == "string" ? e : e.displayName || e.name;
499
+ n && (r = `
500
+
501
+ Check the top-level render call using <` + n + ">.");
502
+ }
503
+ return r;
504
+ }
505
+ }
506
+ function je(e, r) {
507
+ {
508
+ if (!e._store || e._store.validated || e.key != null)
509
+ return;
510
+ e._store.validated = !0;
511
+ var n = fr(r);
512
+ if (_e[n])
513
+ return;
514
+ _e[n] = !0;
515
+ var s = "";
516
+ e && e._owner && e._owner !== Q.current && (s = " It was passed a child from " + O(e._owner.type) + "."), I(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.', n, s), I(null);
517
+ }
518
+ }
519
+ function Ce(e, r) {
520
+ {
521
+ if (typeof e != "object")
522
+ return;
523
+ if (Z(e))
524
+ for (var n = 0; n < e.length; n++) {
525
+ var s = e[n];
526
+ re(s) && je(s, r);
527
+ }
528
+ else if (re(e))
529
+ e._store && (e._store.validated = !0);
530
+ else if (e) {
531
+ var v = G(e);
532
+ if (typeof v == "function" && v !== e.entries)
533
+ for (var p = v.call(e), f; !(f = p.next()).done; )
534
+ re(f.value) && je(f.value, r);
535
+ }
536
+ }
537
+ }
538
+ function dr(e) {
539
+ {
540
+ var r = e.type;
541
+ if (r == null || typeof r == "string")
542
+ return;
543
+ var n;
544
+ if (typeof r == "function")
545
+ n = r.propTypes;
546
+ else if (typeof r == "object" && (r.$$typeof === m || // Note: Memo only checks outer props here.
547
+ // Inner props are checked in the reconciler.
548
+ r.$$typeof === R))
549
+ n = r.propTypes;
550
+ else
551
+ return;
552
+ if (n) {
553
+ var s = O(r);
554
+ Ze(n, e.props, "prop", s, e);
555
+ } else if (r.PropTypes !== void 0 && !ee) {
556
+ ee = !0;
557
+ var v = O(r);
558
+ h("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", v || "Unknown");
559
+ }
560
+ typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && h("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
561
+ }
562
+ }
563
+ function vr(e) {
564
+ {
565
+ for (var r = Object.keys(e.props), n = 0; n < r.length; n++) {
566
+ var s = r[n];
567
+ if (s !== "children" && s !== "key") {
568
+ I(e), h("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", s), I(null);
569
+ break;
570
+ }
571
+ }
572
+ e.ref !== null && (I(e), h("Invalid attribute `ref` supplied to `React.Fragment`."), I(null));
573
+ }
574
+ }
575
+ function Te(e, r, n, s, v, p) {
576
+ {
577
+ var f = Ue(e);
578
+ if (!f) {
579
+ var c = "";
580
+ (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (c += " 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 _ = ur();
582
+ _ ? c += _ : c += we();
583
+ var y;
584
+ e === null ? y = "null" : Z(e) ? y = "array" : e !== void 0 && e.$$typeof === t ? (y = "<" + (O(e.type) || "Unknown") + " />", c = " Did you accidentally export a JSX literal instead of a component?") : y = 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", y, c);
585
+ }
586
+ var E = cr(e, r, n, v, p);
587
+ if (E == null)
588
+ return E;
589
+ if (f) {
590
+ var C = r.children;
591
+ if (C !== void 0)
592
+ if (s)
593
+ if (Z(C)) {
594
+ for (var D = 0; D < C.length; D++)
595
+ Ce(C[D], e);
596
+ Object.freeze && Object.freeze(C);
597
+ } else
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
+ else
600
+ Ce(C, e);
601
+ }
602
+ return e === i ? vr(E) : dr(E), E;
603
+ }
604
+ }
605
+ function hr(e, r, n) {
606
+ return Te(e, r, n, !0);
607
+ }
608
+ function pr(e, r, n) {
609
+ return Te(e, r, n, !1);
610
+ }
611
+ var mr = pr, gr = hr;
612
+ W.Fragment = i, W.jsx = mr, W.jsxs = gr;
613
+ })()), W;
280
614
  }
281
- var Q;
282
- function Re() {
283
- return Q || (Q = 1, process.env.NODE_ENV === "production" ? N.exports = Fe() : N.exports = we()), N.exports;
615
+ var De;
616
+ function Or() {
617
+ return De || (De = 1, process.env.NODE_ENV === "production" ? q.exports = Tr() : q.exports = Sr()), q.exports;
284
618
  }
285
- var o = Re();
286
- function _e(i) {
287
- const [t, r] = C([]), [n, a] = C(null), [l, d] = C(""), [p, x] = C(!1), [b, c] = C(null), y = _(async () => {
619
+ var l = Or();
620
+ function Pr(o) {
621
+ const [t, a] = $([]), [i, d] = $(null), [b, x] = $(""), [F, m] = $(!1), [j, u] = $(null), R = A(async () => {
288
622
  try {
289
- x(!0), c(null);
290
- const u = await i.getFiles();
291
- if (r(u), !n && u.length > 0) {
292
- const g = te(u);
293
- g && a(g.id);
294
- }
295
- } catch (u) {
296
- c(u instanceof Error ? u.message : "Failed to load files");
623
+ m(!0), u(null);
624
+ const g = await o.getFiles();
625
+ if (a(g), !i && g.length > 0) {
626
+ const h = Ne(g);
627
+ h && d(h.id);
628
+ }
629
+ } catch (g) {
630
+ u(g instanceof Error ? g.message : "Failed to load files");
297
631
  } finally {
298
- x(!1);
632
+ m(!1);
299
633
  }
300
- }, [i, n]), v = _(
301
- async (u) => {
634
+ }, [o, i]), w = A(
635
+ async (g) => {
302
636
  try {
303
- x(!0), c(null);
304
- const g = await i.getFileContent(u);
305
- d(g);
306
- } catch (g) {
307
- c(
308
- g instanceof Error ? g.message : "Failed to load file content"
309
- ), d("");
637
+ m(!0), u(null);
638
+ const h = await o.getFileContent(g);
639
+ x(h);
640
+ } catch (h) {
641
+ u(
642
+ h instanceof Error ? h.message : "Failed to load file content"
643
+ ), x("");
310
644
  } finally {
311
- x(!1);
645
+ m(!1);
312
646
  }
313
647
  },
314
- [i]
315
- ), w = _(
316
- async (u) => {
317
- if (n)
648
+ [o]
649
+ ), S = A(
650
+ async (g) => {
651
+ if (i)
318
652
  try {
319
- c(null), await i.updateFileContent(n, u), d(u), r(
320
- (g) => ne(g, n, { content: u })
653
+ u(null), await o.updateFileContent(i, g), x(g), a(
654
+ (h) => Le(h, i, { content: g })
321
655
  );
322
- } catch (g) {
323
- c(
324
- g instanceof Error ? g.message : "Failed to update file content"
656
+ } catch (h) {
657
+ u(
658
+ h instanceof Error ? h.message : "Failed to update file content"
325
659
  );
326
660
  }
327
661
  },
328
- [n, i]
329
- ), A = _(
330
- (u) => {
331
- a(u), v(u);
662
+ [i, o]
663
+ ), B = A(
664
+ (g) => {
665
+ d(g), w(g);
332
666
  },
333
- [v]
334
- ), T = _(() => {
335
- y();
336
- }, [y]), O = _(
337
- (u) => re(t, u),
667
+ [w]
668
+ ), J = A(() => {
669
+ R();
670
+ }, [R]), G = A(
671
+ (g) => $e(t, g),
338
672
  [t]
339
673
  );
340
- return G(() => {
341
- y();
342
- }, [y]), G(() => {
343
- n && v(n);
344
- }, [n, v]), {
674
+ return Oe(() => {
675
+ R();
676
+ }, [R]), Oe(() => {
677
+ i && w(i);
678
+ }, [i, w]), {
345
679
  files: t,
346
- activeFile: n,
347
- fileContent: l,
348
- loading: p,
349
- error: b,
350
- setActiveFile: A,
351
- updateFileContent: w,
352
- refreshFiles: T,
353
- getFileById: O
680
+ activeFile: i,
681
+ fileContent: b,
682
+ loading: F,
683
+ error: j,
684
+ setActiveFile: B,
685
+ updateFileContent: S,
686
+ refreshFiles: J,
687
+ getFileById: G
354
688
  };
355
689
  }
356
- function te(i) {
357
- for (const t of i) {
690
+ function Ne(o) {
691
+ for (const t of o) {
358
692
  if (t.type === "file")
359
693
  return t;
360
694
  if (t.children) {
361
- const r = te(t.children);
362
- if (r) return r;
695
+ const a = Ne(t.children);
696
+ if (a) return a;
363
697
  }
364
698
  }
365
699
  return null;
366
700
  }
367
- function re(i, t) {
368
- for (const r of i) {
369
- if (r.id === t) return r;
370
- if (r.children) {
371
- const n = re(r.children, t);
372
- if (n) return n;
701
+ function $e(o, t) {
702
+ for (const a of o) {
703
+ if (a.id === t) return a;
704
+ if (a.children) {
705
+ const i = $e(a.children, t);
706
+ if (i) return i;
373
707
  }
374
708
  }
375
709
  return null;
376
710
  }
377
- function ne(i, t, r) {
378
- return i.map((n) => n.id === t ? { ...n, ...r } : n.children ? {
379
- ...n,
380
- children: ne(n.children, t, r)
381
- } : n);
711
+ function Le(o, t, a) {
712
+ return o.map((i) => i.id === t ? { ...i, ...a } : i.children ? {
713
+ ...i,
714
+ children: Le(i.children, t, a)
715
+ } : i);
382
716
  }
383
- class Te {
717
+ class kr {
384
718
  config;
385
719
  files = [];
386
720
  constructor(t) {
@@ -397,9 +731,9 @@ class Te {
397
731
  );
398
732
  throw new Error(`File ${t} not found`);
399
733
  }
400
- async updateFileContent(t, r) {
401
- const n = this.findFileById(t);
402
- n && (n.content = r), console.log(`Updated file ${t} with content:`, r);
734
+ async updateFileContent(t, a) {
735
+ const i = this.findFileById(t);
736
+ i && (i.content = a), console.log(`Updated file ${t} with content:`, a);
403
737
  }
404
738
  async getFileMetadata(t) {
405
739
  return this.findFileById(t)?.metadata || {};
@@ -434,20 +768,20 @@ class Te {
434
768
  ];
435
769
  }
436
770
  findFileById(t) {
437
- const r = (n) => {
438
- for (const a of n) {
439
- if (a.id === t) return a;
440
- if (a.children) {
441
- const l = r(a.children);
442
- if (l) return l;
771
+ const a = (i) => {
772
+ for (const d of i) {
773
+ if (d.id === t) return d;
774
+ if (d.children) {
775
+ const b = a(d.children);
776
+ if (b) return b;
443
777
  }
444
778
  }
445
779
  return null;
446
780
  };
447
- return r(this.files);
781
+ return a(this.files);
448
782
  }
449
783
  }
450
- class Ce {
784
+ class Ir {
451
785
  config;
452
786
  files = [];
453
787
  constructor(t) {
@@ -461,11 +795,11 @@ class Ce {
461
795
  return this.config.codeContent;
462
796
  throw new Error(`File ${t} not found`);
463
797
  }
464
- async updateFileContent(t, r) {
798
+ async updateFileContent(t, a) {
465
799
  if (t === "form-code") {
466
- this.config.codeContent = r;
467
- const n = this.files.find((a) => a.id === t);
468
- n && (n.content = r);
800
+ this.config.codeContent = a;
801
+ const i = this.files.find((d) => d.id === t);
802
+ i && (i.content = a);
469
803
  }
470
804
  }
471
805
  async getFileMetadata(t) {
@@ -487,10 +821,10 @@ class Ce {
487
821
  ];
488
822
  }
489
823
  findFileById(t) {
490
- return this.files.find((r) => r.id === t) || null;
824
+ return this.files.find((a) => a.id === t) || null;
491
825
  }
492
826
  }
493
- class ke {
827
+ class Dr {
494
828
  config;
495
829
  files = [];
496
830
  constructor(t) {
@@ -500,29 +834,29 @@ class ke {
500
834
  return this.files;
501
835
  }
502
836
  async getFileContent(t) {
503
- const r = this.findFileById(t);
504
- if (!r || !r.metadata?.url)
837
+ const a = this.findFileById(t);
838
+ if (!a || !a.metadata?.url)
505
839
  throw new Error(`File ${t} not found`);
506
840
  try {
507
- const n = await fetch(r.metadata.url);
508
- if (!n.ok)
509
- throw new Error(`Failed to fetch file: ${n.statusText}`);
510
- return await n.text();
511
- } catch (n) {
512
- throw new Error(`Error fetching file content: ${n}`);
841
+ const i = await fetch(a.metadata.url);
842
+ if (!i.ok)
843
+ throw new Error(`Failed to fetch file: ${i.statusText}`);
844
+ return await i.text();
845
+ } catch (i) {
846
+ throw new Error(`Error fetching file content: ${i}`);
513
847
  }
514
848
  }
515
- async updateFileContent(t, r) {
516
- console.log(`Would save file ${t} content to backend:`, r);
517
- const n = this.findFileById(t);
518
- n && (n.content = r);
849
+ async updateFileContent(t, a) {
850
+ console.log(`Would save file ${t} content to backend:`, a);
851
+ const i = this.findFileById(t);
852
+ i && (i.content = a);
519
853
  }
520
854
  async getFileMetadata(t) {
521
855
  return this.findFileById(t)?.metadata || {};
522
856
  }
523
857
  initializeFiles() {
524
- this.files = this.config.fileUrls.map((t, r) => ({
525
- id: `url-file-${r}`,
858
+ this.files = this.config.fileUrls.map((t, a) => ({
859
+ id: `url-file-${a}`,
526
860
  name: t.name,
527
861
  type: "file",
528
862
  path: `/${t.name}`,
@@ -534,36 +868,36 @@ class ke {
534
868
  }));
535
869
  }
536
870
  findFileById(t) {
537
- return this.files.find((r) => r.id === t) || null;
871
+ return this.files.find((a) => a.id === t) || null;
538
872
  }
539
873
  }
540
- function Se(i) {
541
- if (i.workflowConfig)
542
- return new Te(i.workflowConfig);
543
- if (i.formConfig)
544
- return new Ce(i.formConfig);
545
- if (i.urlConfig)
546
- return new ke(i.urlConfig);
874
+ function Ar(o) {
875
+ if (o.workflowConfig)
876
+ return new kr(o.workflowConfig);
877
+ if (o.formConfig)
878
+ return new Ir(o.formConfig);
879
+ if (o.urlConfig)
880
+ return new Dr(o.urlConfig);
547
881
  throw new Error("No valid configuration provided");
548
882
  }
549
- const Ne = ({
550
- value: i,
883
+ const Nr = ({
884
+ value: o,
551
885
  onChange: t,
552
- language: r = "javascript",
553
- filename: n,
554
- readOnly: a = !1,
555
- loading: l = !1
886
+ language: a = "javascript",
887
+ filename: i,
888
+ readOnly: d = !1,
889
+ loading: b = !1
556
890
  }) => {
557
- const d = (p) => {
558
- p !== void 0 && t(p);
891
+ const x = (F) => {
892
+ F !== void 0 && t(F);
559
893
  };
560
- return /* @__PURE__ */ o.jsx("div", { className: "h-full w-full", children: /* @__PURE__ */ o.jsx(
561
- me,
894
+ return /* @__PURE__ */ l.jsx("div", { className: "h-full w-full", children: /* @__PURE__ */ l.jsx(
895
+ yr,
562
896
  {
563
897
  height: "100%",
564
- defaultLanguage: r,
565
- defaultValue: i,
566
- onChange: d,
898
+ defaultLanguage: a,
899
+ defaultValue: o,
900
+ onChange: x,
567
901
  theme: "vs-light",
568
902
  options: {
569
903
  minimap: {
@@ -576,153 +910,153 @@ const Ne = ({
576
910
  top: 16
577
911
  },
578
912
  scrollBeyondLastLine: !1,
579
- readOnly: a
913
+ readOnly: d
580
914
  }
581
915
  }
582
916
  ) });
583
- }, Ae = ({
584
- activePanel: i,
917
+ }, $r = ({
918
+ activePanel: o,
585
919
  setActivePanel: t
586
920
  }) => {
587
- const r = [
921
+ const a = [
588
922
  {
589
923
  id: "explorer",
590
- icon: ee,
924
+ icon: Ae,
591
925
  label: "Files"
592
926
  },
593
927
  {
594
928
  id: "data",
595
- icon: ge,
929
+ icon: xr,
596
930
  label: "Data"
597
931
  },
598
932
  {
599
933
  id: "functions",
600
- icon: ve,
934
+ icon: Fr,
601
935
  label: "Functions"
602
936
  },
603
937
  {
604
938
  id: "versions",
605
- icon: xe,
939
+ icon: Rr,
606
940
  label: "Versions"
607
941
  },
608
942
  {
609
943
  id: "tests",
610
- icon: Ee,
944
+ icon: wr,
611
945
  label: "Tests"
612
946
  }
613
947
  ];
614
- return /* @__PURE__ */ o.jsxs("div", { className: "w-14 border-r border-slate-200 bg-white flex flex-col gap-4 items-center py-4", children: [
615
- r.map((n) => {
616
- const a = n.icon;
617
- return /* @__PURE__ */ o.jsx(X, { title: n.label, placement: "right", children: /* @__PURE__ */ o.jsx(
618
- D,
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,
619
953
  {
620
- type: i === n.id ? "primary" : "text",
621
- icon: /* @__PURE__ */ o.jsx(a, { size: 16 }),
622
- onClick: () => t(n.id)
954
+ type: o === i.id ? "primary" : "text",
955
+ icon: /* @__PURE__ */ l.jsx(d, { size: 16 }),
956
+ onClick: () => t(i.id)
623
957
  }
624
- ) }, n.id);
958
+ ) }, i.id);
625
959
  }),
626
- /* @__PURE__ */ o.jsx("div", { className: "mt-auto", children: /* @__PURE__ */ o.jsx(X, { title: "Settings", placement: "right", children: /* @__PURE__ */ o.jsx(D, { type: "text", icon: /* @__PURE__ */ o.jsx(ye, { size: 20 }) }) }) })
960
+ /* @__PURE__ */ l.jsx("div", { className: "mt-auto", children: /* @__PURE__ */ l.jsx(Pe, { title: "Settings", placement: "right", children: /* @__PURE__ */ l.jsx(te, { type: "text", icon: /* @__PURE__ */ l.jsx(_r, { size: 20 }) }) }) })
627
961
  ] });
628
- }, Oe = ({
629
- leftPanel: i,
962
+ }, Lr = ({
963
+ leftPanel: o,
630
964
  editor: t,
631
- rightPanel: r,
632
- activePanel: n,
633
- setActivePanel: a
634
- }) => /* @__PURE__ */ o.jsxs("div", { className: "flex flex-1 overflow-hidden", children: [
635
- /* @__PURE__ */ o.jsx(Ae, { activePanel: n, setActivePanel: a }),
636
- /* @__PURE__ */ o.jsx("div", { className: "flex-1", children: r ? /* @__PURE__ */ o.jsxs(
637
- F,
965
+ rightPanel: a,
966
+ activePanel: i,
967
+ setActivePanel: d
968
+ }) => /* @__PURE__ */ l.jsxs("div", { className: "flex flex-1 overflow-hidden", children: [
969
+ /* @__PURE__ */ l.jsx($r, { activePanel: i, setActivePanel: d }),
970
+ /* @__PURE__ */ l.jsx("div", { className: "flex-1", children: a ? /* @__PURE__ */ l.jsxs(
971
+ k,
638
972
  {
639
973
  style: { height: "100%" },
640
- onResize: (l) => console.log(l),
974
+ onResize: (b) => console.log(b),
641
975
  children: [
642
- /* @__PURE__ */ o.jsx(
643
- F.Panel,
976
+ /* @__PURE__ */ l.jsx(
977
+ k.Panel,
644
978
  {
645
979
  defaultSize: "25%",
646
980
  min: "15%",
647
981
  max: "40%",
648
982
  className: "bg-white border-r border-slate-200",
649
983
  collapsible: !0,
650
- children: /* @__PURE__ */ o.jsx("div", { className: "h-full overflow-y-auto", children: i })
984
+ children: /* @__PURE__ */ l.jsx("div", { className: "h-full overflow-y-auto", children: o })
651
985
  }
652
986
  ),
653
- /* @__PURE__ */ o.jsx(F.Panel, { defaultSize: "50%", min: "30%", children: t }),
654
- /* @__PURE__ */ o.jsx(
655
- F.Panel,
987
+ /* @__PURE__ */ l.jsx(k.Panel, { defaultSize: "50%", min: "30%", children: t }),
988
+ /* @__PURE__ */ l.jsx(
989
+ k.Panel,
656
990
  {
657
991
  defaultSize: "25%",
658
992
  min: "20%",
659
993
  max: "50%",
660
994
  className: "bg-white border-l border-slate-200",
661
- children: /* @__PURE__ */ o.jsx("div", { className: "h-full overflow-y-auto", children: r })
995
+ children: /* @__PURE__ */ l.jsx("div", { className: "h-full overflow-y-auto", children: a })
662
996
  }
663
997
  )
664
998
  ]
665
999
  }
666
- ) : /* @__PURE__ */ o.jsxs(F, { style: { height: "100%" }, children: [
667
- /* @__PURE__ */ o.jsx(
668
- F.Panel,
1000
+ ) : /* @__PURE__ */ l.jsxs(k, { style: { height: "100%" }, children: [
1001
+ /* @__PURE__ */ l.jsx(
1002
+ k.Panel,
669
1003
  {
670
1004
  defaultSize: "25%",
671
1005
  min: "15%",
672
1006
  max: "40%",
673
1007
  className: "bg-white border-r border-slate-200",
674
- children: /* @__PURE__ */ o.jsx("div", { className: "h-full overflow-y-auto", children: i })
1008
+ children: /* @__PURE__ */ l.jsx("div", { className: "h-full overflow-y-auto", children: o })
675
1009
  }
676
1010
  ),
677
- /* @__PURE__ */ o.jsx(F.Panel, { defaultSize: "75%", min: "60%", children: t })
1011
+ /* @__PURE__ */ l.jsx(k.Panel, { defaultSize: "75%", min: "60%", children: t })
678
1012
  ] }) })
679
- ] }), Pe = ({
680
- files: i,
1013
+ ] }), Wr = ({
1014
+ files: o,
681
1015
  activeFile: t,
682
- onFileSelect: r,
683
- loading: n = !1,
684
- error: a = null,
685
- onRefresh: l
1016
+ onFileSelect: a,
1017
+ loading: i = !1,
1018
+ error: d = null,
1019
+ onRefresh: b
686
1020
  }) => {
687
- const d = (b) => b.map((c) => ({
688
- title: c.name,
689
- key: c.id,
690
- icon: c.type === "file" ? /* @__PURE__ */ o.jsx(je, { size: 16, className: "text-slate-500 flex" }) : /* @__PURE__ */ o.jsx(ee, { size: 16, className: "text-slate-500 flex" }),
691
- isLeaf: c.type === "file",
692
- children: c.children ? d(c.children) : void 0,
693
- metadata: c.metadata
694
- })), p = d(i), x = (b, c) => {
695
- c?.node.isLeaf && c.node.key && r(c.node.key);
1021
+ const x = (j) => j.map((u) => ({
1022
+ title: u.name,
1023
+ key: u.id,
1024
+ icon: u.type === "file" ? /* @__PURE__ */ l.jsx(Cr, { size: 16, className: "text-slate-500 flex" }) : /* @__PURE__ */ l.jsx(Ae, { size: 16, className: "text-slate-500 flex" }),
1025
+ isLeaf: u.type === "file",
1026
+ children: u.children ? x(u.children) : void 0,
1027
+ metadata: u.metadata
1028
+ })), F = x(o), m = (j, u) => {
1029
+ u?.node.isLeaf && u.node.key && a(u.node.key);
696
1030
  };
697
- return /* @__PURE__ */ o.jsxs("div", { className: "h-full", children: [
698
- /* @__PURE__ */ o.jsxs("div", { className: "flex items-center justify-between p-4 border-b border-slate-200", children: [
699
- /* @__PURE__ */ o.jsx("h2", { className: "font-medium text-sm", children: "Files" }),
700
- /* @__PURE__ */ o.jsx("div", { className: "flex items-center gap-2", children: l && /* @__PURE__ */ o.jsx(
701
- D,
1031
+ return /* @__PURE__ */ l.jsxs("div", { className: "h-full", children: [
1032
+ /* @__PURE__ */ l.jsxs("div", { className: "flex items-center justify-between p-4 border-b border-slate-200", children: [
1033
+ /* @__PURE__ */ l.jsx("h2", { className: "font-medium text-sm", children: "Files" }),
1034
+ /* @__PURE__ */ l.jsx("div", { className: "flex items-center gap-2", children: b && /* @__PURE__ */ l.jsx(
1035
+ te,
702
1036
  {
703
1037
  type: "text",
704
- icon: /* @__PURE__ */ o.jsx(be, { size: 16 }),
705
- onClick: l,
706
- loading: n,
1038
+ icon: /* @__PURE__ */ l.jsx(jr, { size: 16 }),
1039
+ onClick: b,
1040
+ loading: i,
707
1041
  title: "Refresh files"
708
1042
  }
709
1043
  ) })
710
1044
  ] }),
711
- /* @__PURE__ */ o.jsxs("div", { className: "p-2", children: [
712
- a && /* @__PURE__ */ o.jsx(
713
- he,
1045
+ /* @__PURE__ */ l.jsxs("div", { className: "p-2", children: [
1046
+ d && /* @__PURE__ */ l.jsx(
1047
+ Er,
714
1048
  {
715
1049
  message: "Error loading files",
716
- description: a,
1050
+ description: d,
717
1051
  type: "error",
718
1052
  className: "mb-2"
719
1053
  }
720
1054
  ),
721
- /* @__PURE__ */ o.jsx(
722
- pe,
1055
+ /* @__PURE__ */ l.jsx(
1056
+ br,
723
1057
  {
724
- treeData: p,
725
- onSelect: x,
1058
+ treeData: F,
1059
+ onSelect: m,
726
1060
  selectedKeys: t ? [t] : [],
727
1061
  showIcon: !0,
728
1062
  defaultExpandAll: !0,
@@ -732,49 +1066,49 @@ const Ne = ({
732
1066
  )
733
1067
  ] })
734
1068
  ] });
735
- }, Y = ({
736
- config: i,
1069
+ }, ie = ({
1070
+ config: o,
737
1071
  rightPanel: t = !1
738
1072
  }) => {
739
- const r = K.useMemo(
740
- () => Se(i),
741
- [i]
1073
+ const a = ne.useMemo(
1074
+ () => Ar(o),
1075
+ [o]
742
1076
  );
743
- console.log({ config: i });
1077
+ console.log({ config: o });
744
1078
  const {
745
- files: n,
746
- activeFile: a,
747
- fileContent: l,
748
- loading: d,
749
- error: p,
750
- setActiveFile: x,
751
- updateFileContent: b,
752
- refreshFiles: c,
753
- getFileById: y
754
- } = _e(r), v = a ? y(a) : null, w = v?.metadata?.language || "javascript";
755
- return /* @__PURE__ */ o.jsx(
756
- Oe,
1079
+ files: i,
1080
+ activeFile: d,
1081
+ fileContent: b,
1082
+ loading: x,
1083
+ error: F,
1084
+ setActiveFile: m,
1085
+ updateFileContent: j,
1086
+ refreshFiles: u,
1087
+ getFileById: R
1088
+ } = Pr(a), w = d ? R(d) : null, S = w?.metadata?.language || "javascript";
1089
+ return /* @__PURE__ */ l.jsx(
1090
+ Lr,
757
1091
  {
758
- leftPanel: /* @__PURE__ */ o.jsx(
759
- Pe,
1092
+ leftPanel: /* @__PURE__ */ l.jsx(
1093
+ Wr,
760
1094
  {
761
- files: n,
762
- activeFile: a,
763
- onFileSelect: x,
764
- loading: d,
765
- error: p,
766
- onRefresh: c
1095
+ files: i,
1096
+ activeFile: d,
1097
+ onFileSelect: m,
1098
+ loading: x,
1099
+ error: F,
1100
+ onRefresh: u
767
1101
  }
768
1102
  ),
769
- editor: /* @__PURE__ */ o.jsx(
770
- Ne,
1103
+ editor: /* @__PURE__ */ l.jsx(
1104
+ Nr,
771
1105
  {
772
- value: l,
773
- onChange: b,
774
- language: w,
775
- filename: v?.name,
776
- readOnly: i.settings?.readOnly,
777
- loading: d
1106
+ value: b,
1107
+ onChange: j,
1108
+ language: S,
1109
+ filename: w?.name,
1110
+ readOnly: o.settings?.readOnly,
1111
+ loading: x
778
1112
  }
779
1113
  ),
780
1114
  rightPanel: t,
@@ -783,65 +1117,65 @@ const Ne = ({
783
1117
  }
784
1118
  }
785
1119
  );
786
- }, De = ({
787
- functionId: i,
1120
+ }, Vr = ({
1121
+ functionId: o,
788
1122
  version: t,
789
- versionList: r,
790
- fetchFunction: n,
791
- fetchVersionList: a
1123
+ versionList: a,
1124
+ fetchFunction: i,
1125
+ fetchVersionList: d
792
1126
  }) => {
793
- const l = {
1127
+ const b = {
794
1128
  workflowConfig: {
795
- functionId: i,
1129
+ functionId: o,
796
1130
  version: t,
797
- versionList: r,
798
- fetchFunction: n,
799
- fetchVersionList: a
1131
+ versionList: a,
1132
+ fetchFunction: i,
1133
+ fetchVersionList: d
800
1134
  }
801
1135
  };
802
- return /* @__PURE__ */ o.jsx(Y, { config: l });
803
- }, Ye = ({
804
- codeContent: i,
1136
+ return /* @__PURE__ */ l.jsx(ie, { config: b });
1137
+ }, Ur = ({
1138
+ codeContent: o,
805
1139
  fileName: t = "code.js",
806
- language: r = "javascript",
807
- readOnly: n = !1
1140
+ language: a = "javascript",
1141
+ readOnly: i = !1
808
1142
  }) => {
809
- const a = {
1143
+ const d = {
810
1144
  formConfig: {
811
- codeContent: i,
1145
+ codeContent: o,
812
1146
  fileName: t,
813
- language: r
1147
+ language: a
814
1148
  },
815
1149
  settings: {
816
- readOnly: n
1150
+ readOnly: i
817
1151
  }
818
1152
  };
819
- return /* @__PURE__ */ o.jsx(Y, { config: a });
820
- }, Me = ({ fileUrls: i, rightPanel: t }) => {
821
- const r = {
1153
+ return /* @__PURE__ */ l.jsx(ie, { config: d });
1154
+ }, qr = ({ fileUrls: o, rightPanel: t }) => {
1155
+ const a = {
822
1156
  urlConfig: {
823
- fileUrls: i
1157
+ fileUrls: o
824
1158
  }
825
1159
  };
826
- return /* @__PURE__ */ o.jsx(Y, { config: r, rightPanel: t });
827
- }, Be = "1.0.0";
1160
+ return /* @__PURE__ */ l.jsx(ie, { config: a, rightPanel: t });
1161
+ }, Jr = "1.0.0";
828
1162
  export {
829
- Ve as Alert,
830
- qe as Button,
831
- Ne as CodeEditor,
832
- Y as CodeEditorWrapper,
833
- Oe as EditorLayout,
834
- Pe as FileExplorer,
835
- Ye as FormCodeEditor,
836
- Ce as FormFileProvider,
837
- Je as Splitter,
838
- Ge as Tooltip,
839
- Xe as Tree,
840
- Me as URLCodeEditor,
841
- ke as URLFileProvider,
842
- Be as VERSION,
843
- De as WorkflowCodeEditor,
844
- Te as WorkflowFileProvider,
845
- Se as createFileProvider,
846
- _e as useFileManager
1163
+ Hr as Alert,
1164
+ Xr as Button,
1165
+ Nr as CodeEditor,
1166
+ ie as CodeEditorWrapper,
1167
+ Lr as EditorLayout,
1168
+ Wr as FileExplorer,
1169
+ Ur as FormCodeEditor,
1170
+ Ir as FormFileProvider,
1171
+ Zr as Splitter,
1172
+ Qr as Tooltip,
1173
+ et as Tree,
1174
+ qr as URLCodeEditor,
1175
+ Dr as URLFileProvider,
1176
+ Jr as VERSION,
1177
+ Vr as WorkflowCodeEditor,
1178
+ kr as WorkflowFileProvider,
1179
+ Ar as createFileProvider,
1180
+ Pr as useFileManager
847
1181
  };