@motiadev/plugin-states 0.9.4-beta.151-154330 → 0.9.4-beta.151-160668
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.cjs +80 -4
- package/dist/index.js +929 -852
- package/dist/plugin-states.css +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,278 +1,310 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import
|
|
3
|
-
import { useThemeStore as
|
|
4
|
-
var he = { exports: {} },
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
import * as D from "react";
|
|
2
|
+
import W, { forwardRef as _t, createElement as Te, useState as P, useCallback as K, useEffect as Y, createContext as Yt, useContext as te, isValidElement as qt, useRef as V, useMemo as ue, memo as Fe } from "react";
|
|
3
|
+
import { useThemeStore as Bt, Button as ye, Sidebar as Wt, Input as Kt, Table as Gt, TableHeader as Xt, TableRow as Ke, TableHead as pe, Checkbox as Ge, TableBody as Qt, cn as er, TableCell as ge } from "@motiadev/ui";
|
|
4
|
+
var he = { exports: {} }, se = {};
|
|
5
|
+
/**
|
|
6
|
+
* @license React
|
|
7
|
+
* react-jsx-runtime.production.js
|
|
8
|
+
*
|
|
9
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
10
|
+
*
|
|
11
|
+
* This source code is licensed under the MIT license found in the
|
|
12
|
+
* LICENSE file in the root directory of this source tree.
|
|
13
|
+
*/
|
|
14
|
+
var Xe;
|
|
15
|
+
function tr() {
|
|
16
|
+
if (Xe) return se;
|
|
17
|
+
Xe = 1;
|
|
9
18
|
var e = Symbol.for("react.transitional.element"), t = Symbol.for("react.fragment");
|
|
10
|
-
function r(n,
|
|
19
|
+
function r(n, s, o) {
|
|
11
20
|
var c = null;
|
|
12
|
-
if (
|
|
13
|
-
|
|
14
|
-
for (var l in
|
|
15
|
-
l !== "key" && (
|
|
16
|
-
} else
|
|
17
|
-
return
|
|
21
|
+
if (o !== void 0 && (c = "" + o), s.key !== void 0 && (c = "" + s.key), "key" in s) {
|
|
22
|
+
o = {};
|
|
23
|
+
for (var l in s)
|
|
24
|
+
l !== "key" && (o[l] = s[l]);
|
|
25
|
+
} else o = s;
|
|
26
|
+
return s = o.ref, {
|
|
18
27
|
$$typeof: e,
|
|
19
28
|
type: n,
|
|
20
29
|
key: c,
|
|
21
|
-
ref:
|
|
22
|
-
props:
|
|
30
|
+
ref: s !== void 0 ? s : null,
|
|
31
|
+
props: o
|
|
23
32
|
};
|
|
24
33
|
}
|
|
25
|
-
return
|
|
26
|
-
}
|
|
27
|
-
var
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
34
|
+
return se.Fragment = t, se.jsx = r, se.jsxs = r, se;
|
|
35
|
+
}
|
|
36
|
+
var oe = {};
|
|
37
|
+
/**
|
|
38
|
+
* @license React
|
|
39
|
+
* react-jsx-runtime.development.js
|
|
40
|
+
*
|
|
41
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
42
|
+
*
|
|
43
|
+
* This source code is licensed under the MIT license found in the
|
|
44
|
+
* LICENSE file in the root directory of this source tree.
|
|
45
|
+
*/
|
|
46
|
+
var Qe;
|
|
47
|
+
function rr() {
|
|
48
|
+
return Qe || (Qe = 1, process.env.NODE_ENV !== "production" && function() {
|
|
49
|
+
function e(i) {
|
|
50
|
+
if (i == null) return null;
|
|
51
|
+
if (typeof i == "function")
|
|
52
|
+
return i.$$typeof === C ? null : i.displayName || i.name || null;
|
|
53
|
+
if (typeof i == "string") return i;
|
|
54
|
+
switch (i) {
|
|
55
|
+
case A:
|
|
38
56
|
return "Fragment";
|
|
39
|
-
case
|
|
57
|
+
case N:
|
|
40
58
|
return "Profiler";
|
|
41
|
-
case
|
|
59
|
+
case f:
|
|
42
60
|
return "StrictMode";
|
|
43
|
-
case
|
|
61
|
+
case m:
|
|
44
62
|
return "Suspense";
|
|
45
|
-
case
|
|
63
|
+
case w:
|
|
46
64
|
return "SuspenseList";
|
|
47
|
-
case
|
|
65
|
+
case _:
|
|
48
66
|
return "Activity";
|
|
49
67
|
}
|
|
50
|
-
if (typeof
|
|
51
|
-
switch (typeof
|
|
68
|
+
if (typeof i == "object")
|
|
69
|
+
switch (typeof i.tag == "number" && console.error(
|
|
52
70
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
53
|
-
),
|
|
54
|
-
case
|
|
71
|
+
), i.$$typeof) {
|
|
72
|
+
case O:
|
|
55
73
|
return "Portal";
|
|
56
|
-
case
|
|
57
|
-
return
|
|
58
|
-
case
|
|
59
|
-
return (
|
|
60
|
-
case
|
|
61
|
-
var
|
|
62
|
-
return
|
|
63
|
-
case
|
|
64
|
-
return
|
|
65
|
-
case
|
|
66
|
-
|
|
74
|
+
case M:
|
|
75
|
+
return (i.displayName || "Context") + ".Provider";
|
|
76
|
+
case E:
|
|
77
|
+
return (i._context.displayName || "Context") + ".Consumer";
|
|
78
|
+
case b:
|
|
79
|
+
var p = i.render;
|
|
80
|
+
return i = i.displayName, i || (i = p.displayName || p.name || "", i = i !== "" ? "ForwardRef(" + i + ")" : "ForwardRef"), i;
|
|
81
|
+
case y:
|
|
82
|
+
return p = i.displayName || null, p !== null ? p : e(i.type) || "Memo";
|
|
83
|
+
case H:
|
|
84
|
+
p = i._payload, i = i._init;
|
|
67
85
|
try {
|
|
68
|
-
return e(
|
|
86
|
+
return e(i(p));
|
|
69
87
|
} catch {
|
|
70
88
|
}
|
|
71
89
|
}
|
|
72
90
|
return null;
|
|
73
91
|
}
|
|
74
|
-
function t(
|
|
75
|
-
return "" +
|
|
92
|
+
function t(i) {
|
|
93
|
+
return "" + i;
|
|
76
94
|
}
|
|
77
|
-
function r(
|
|
95
|
+
function r(i) {
|
|
78
96
|
try {
|
|
79
|
-
t(
|
|
80
|
-
var
|
|
97
|
+
t(i);
|
|
98
|
+
var p = !1;
|
|
81
99
|
} catch {
|
|
82
|
-
|
|
100
|
+
p = !0;
|
|
83
101
|
}
|
|
84
|
-
if (
|
|
85
|
-
|
|
86
|
-
var
|
|
87
|
-
return
|
|
88
|
-
|
|
102
|
+
if (p) {
|
|
103
|
+
p = console;
|
|
104
|
+
var x = p.error, h = typeof Symbol == "function" && Symbol.toStringTag && i[Symbol.toStringTag] || i.constructor.name || "Object";
|
|
105
|
+
return x.call(
|
|
106
|
+
p,
|
|
89
107
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
90
|
-
|
|
91
|
-
), t(
|
|
108
|
+
h
|
|
109
|
+
), t(i);
|
|
92
110
|
}
|
|
93
111
|
}
|
|
94
|
-
function n(
|
|
95
|
-
if (
|
|
96
|
-
if (typeof
|
|
112
|
+
function n(i) {
|
|
113
|
+
if (i === A) return "<>";
|
|
114
|
+
if (typeof i == "object" && i !== null && i.$$typeof === H)
|
|
97
115
|
return "<...>";
|
|
98
116
|
try {
|
|
99
|
-
var
|
|
100
|
-
return
|
|
117
|
+
var p = e(i);
|
|
118
|
+
return p ? "<" + p + ">" : "<...>";
|
|
101
119
|
} catch {
|
|
102
120
|
return "<...>";
|
|
103
121
|
}
|
|
104
122
|
}
|
|
105
|
-
function
|
|
106
|
-
var
|
|
107
|
-
return
|
|
123
|
+
function s() {
|
|
124
|
+
var i = $.A;
|
|
125
|
+
return i === null ? null : i.getOwner();
|
|
108
126
|
}
|
|
109
|
-
function
|
|
127
|
+
function o() {
|
|
110
128
|
return Error("react-stack-top-frame");
|
|
111
129
|
}
|
|
112
|
-
function c(
|
|
113
|
-
if (
|
|
114
|
-
var
|
|
115
|
-
if (
|
|
130
|
+
function c(i) {
|
|
131
|
+
if (L.call(i, "key")) {
|
|
132
|
+
var p = Object.getOwnPropertyDescriptor(i, "key").get;
|
|
133
|
+
if (p && p.isReactWarning) return !1;
|
|
116
134
|
}
|
|
117
|
-
return
|
|
135
|
+
return i.key !== void 0;
|
|
118
136
|
}
|
|
119
|
-
function l(
|
|
120
|
-
function
|
|
121
|
-
|
|
137
|
+
function l(i, p) {
|
|
138
|
+
function x() {
|
|
139
|
+
j || (j = !0, console.error(
|
|
122
140
|
"%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)",
|
|
123
|
-
|
|
141
|
+
p
|
|
124
142
|
));
|
|
125
143
|
}
|
|
126
|
-
|
|
127
|
-
get:
|
|
144
|
+
x.isReactWarning = !0, Object.defineProperty(i, "key", {
|
|
145
|
+
get: x,
|
|
128
146
|
configurable: !0
|
|
129
147
|
});
|
|
130
148
|
}
|
|
131
149
|
function g() {
|
|
132
|
-
var
|
|
133
|
-
return
|
|
150
|
+
var i = e(this.type);
|
|
151
|
+
return R[i] || (R[i] = !0, console.error(
|
|
134
152
|
"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."
|
|
135
|
-
)),
|
|
153
|
+
)), i = this.props.ref, i !== void 0 ? i : null;
|
|
136
154
|
}
|
|
137
|
-
function u(
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
}, (U !== void 0 ? U : null) !== null ? Object.defineProperty(s, "ref", {
|
|
155
|
+
function u(i, p, x, h, k, q, Se, Oe) {
|
|
156
|
+
return x = q.ref, i = {
|
|
157
|
+
$$typeof: T,
|
|
158
|
+
type: i,
|
|
159
|
+
key: p,
|
|
160
|
+
props: q,
|
|
161
|
+
_owner: k
|
|
162
|
+
}, (x !== void 0 ? x : null) !== null ? Object.defineProperty(i, "ref", {
|
|
146
163
|
enumerable: !1,
|
|
147
164
|
get: g
|
|
148
|
-
}) : Object.defineProperty(
|
|
165
|
+
}) : Object.defineProperty(i, "ref", { enumerable: !1, value: null }), i._store = {}, Object.defineProperty(i._store, "validated", {
|
|
149
166
|
configurable: !1,
|
|
150
167
|
enumerable: !1,
|
|
151
168
|
writable: !0,
|
|
152
169
|
value: 0
|
|
153
|
-
}), Object.defineProperty(
|
|
170
|
+
}), Object.defineProperty(i, "_debugInfo", {
|
|
154
171
|
configurable: !1,
|
|
155
172
|
enumerable: !1,
|
|
156
173
|
writable: !0,
|
|
157
174
|
value: null
|
|
158
|
-
}), Object.defineProperty(
|
|
175
|
+
}), Object.defineProperty(i, "_debugStack", {
|
|
159
176
|
configurable: !1,
|
|
160
177
|
enumerable: !1,
|
|
161
178
|
writable: !0,
|
|
162
|
-
value:
|
|
163
|
-
}), Object.defineProperty(
|
|
179
|
+
value: Se
|
|
180
|
+
}), Object.defineProperty(i, "_debugTask", {
|
|
164
181
|
configurable: !1,
|
|
165
182
|
enumerable: !1,
|
|
166
183
|
writable: !0,
|
|
167
|
-
value:
|
|
168
|
-
}), Object.freeze && (Object.freeze(
|
|
184
|
+
value: Oe
|
|
185
|
+
}), Object.freeze && (Object.freeze(i.props), Object.freeze(i)), i;
|
|
169
186
|
}
|
|
170
|
-
function d(
|
|
171
|
-
var
|
|
172
|
-
if (
|
|
173
|
-
if (
|
|
174
|
-
if (
|
|
175
|
-
for (
|
|
176
|
-
v(
|
|
177
|
-
Object.freeze && Object.freeze(
|
|
187
|
+
function d(i, p, x, h, k, q, Se, Oe) {
|
|
188
|
+
var J = p.children;
|
|
189
|
+
if (J !== void 0)
|
|
190
|
+
if (h)
|
|
191
|
+
if (U(J)) {
|
|
192
|
+
for (h = 0; h < J.length; h++)
|
|
193
|
+
v(J[h]);
|
|
194
|
+
Object.freeze && Object.freeze(J);
|
|
178
195
|
} else
|
|
179
196
|
console.error(
|
|
180
197
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
181
198
|
);
|
|
182
|
-
else v(
|
|
183
|
-
if (
|
|
184
|
-
|
|
185
|
-
var re = Object.keys(
|
|
186
|
-
return
|
|
199
|
+
else v(J);
|
|
200
|
+
if (L.call(p, "key")) {
|
|
201
|
+
J = e(i);
|
|
202
|
+
var re = Object.keys(p).filter(function(Jt) {
|
|
203
|
+
return Jt !== "key";
|
|
187
204
|
});
|
|
188
|
-
|
|
205
|
+
h = 0 < re.length ? "{key: someKey, " + re.join(": ..., ") + ": ...}" : "{key: someKey}", Z[J + h] || (re = 0 < re.length ? "{" + re.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
189
206
|
`A props object containing a "key" prop is being spread into JSX:
|
|
190
207
|
let props = %s;
|
|
191
208
|
<%s {...props} />
|
|
192
209
|
React keys must be passed directly to JSX without using spread:
|
|
193
210
|
let props = %s;
|
|
194
211
|
<%s key={someKey} {...props} />`,
|
|
195
|
-
|
|
196
|
-
|
|
212
|
+
h,
|
|
213
|
+
J,
|
|
197
214
|
re,
|
|
198
|
-
|
|
199
|
-
),
|
|
215
|
+
J
|
|
216
|
+
), Z[J + h] = !0);
|
|
200
217
|
}
|
|
201
|
-
if (
|
|
202
|
-
|
|
203
|
-
for (var Ee in
|
|
204
|
-
Ee !== "key" && (
|
|
205
|
-
} else
|
|
206
|
-
return
|
|
207
|
-
|
|
208
|
-
typeof
|
|
218
|
+
if (J = null, x !== void 0 && (r(x), J = "" + x), c(p) && (r(p.key), J = "" + p.key), "key" in p) {
|
|
219
|
+
x = {};
|
|
220
|
+
for (var Ee in p)
|
|
221
|
+
Ee !== "key" && (x[Ee] = p[Ee]);
|
|
222
|
+
} else x = p;
|
|
223
|
+
return J && l(
|
|
224
|
+
x,
|
|
225
|
+
typeof i == "function" ? i.displayName || i.name || "Unknown" : i
|
|
209
226
|
), u(
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
227
|
+
i,
|
|
228
|
+
J,
|
|
229
|
+
q,
|
|
230
|
+
k,
|
|
231
|
+
s(),
|
|
232
|
+
x,
|
|
233
|
+
Se,
|
|
234
|
+
Oe
|
|
216
235
|
);
|
|
217
236
|
}
|
|
218
|
-
function v(
|
|
219
|
-
|
|
220
|
-
}
|
|
221
|
-
function E(s) {
|
|
222
|
-
return typeof s == "object" && s !== null && s.$$typeof === C;
|
|
237
|
+
function v(i) {
|
|
238
|
+
typeof i == "object" && i !== null && i.$$typeof === T && i._store && (i._store.validated = 1);
|
|
223
239
|
}
|
|
224
|
-
var
|
|
240
|
+
var S = W, T = Symbol.for("react.transitional.element"), O = Symbol.for("react.portal"), A = Symbol.for("react.fragment"), f = Symbol.for("react.strict_mode"), N = Symbol.for("react.profiler"), E = Symbol.for("react.consumer"), M = Symbol.for("react.context"), b = Symbol.for("react.forward_ref"), m = Symbol.for("react.suspense"), w = Symbol.for("react.suspense_list"), y = Symbol.for("react.memo"), H = Symbol.for("react.lazy"), _ = Symbol.for("react.activity"), C = Symbol.for("react.client.reference"), $ = S.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, L = Object.prototype.hasOwnProperty, U = Array.isArray, F = console.createTask ? console.createTask : function() {
|
|
225
241
|
return null;
|
|
226
242
|
};
|
|
227
|
-
|
|
228
|
-
react_stack_bottom_frame: function(
|
|
229
|
-
return
|
|
243
|
+
S = {
|
|
244
|
+
react_stack_bottom_frame: function(i) {
|
|
245
|
+
return i();
|
|
230
246
|
}
|
|
231
247
|
};
|
|
232
|
-
var
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
)(),
|
|
236
|
-
|
|
237
|
-
var
|
|
248
|
+
var j, R = {}, I = S.react_stack_bottom_frame.bind(
|
|
249
|
+
S,
|
|
250
|
+
o
|
|
251
|
+
)(), z = F(n(o)), Z = {};
|
|
252
|
+
oe.Fragment = A, oe.jsx = function(i, p, x, h, k) {
|
|
253
|
+
var q = 1e4 > $.recentlyCreatedOwnerStacks++;
|
|
238
254
|
return d(
|
|
239
|
-
|
|
240
|
-
h,
|
|
255
|
+
i,
|
|
241
256
|
p,
|
|
257
|
+
x,
|
|
242
258
|
!1,
|
|
243
|
-
|
|
244
|
-
|
|
259
|
+
h,
|
|
260
|
+
k,
|
|
261
|
+
q ? Error("react-stack-top-frame") : I,
|
|
262
|
+
q ? F(n(i)) : z
|
|
245
263
|
);
|
|
246
|
-
},
|
|
247
|
-
var
|
|
264
|
+
}, oe.jsxs = function(i, p, x, h, k) {
|
|
265
|
+
var q = 1e4 > $.recentlyCreatedOwnerStacks++;
|
|
248
266
|
return d(
|
|
249
|
-
|
|
250
|
-
h,
|
|
267
|
+
i,
|
|
251
268
|
p,
|
|
269
|
+
x,
|
|
252
270
|
!0,
|
|
253
|
-
|
|
254
|
-
|
|
271
|
+
h,
|
|
272
|
+
k,
|
|
273
|
+
q ? Error("react-stack-top-frame") : I,
|
|
274
|
+
q ? F(n(i)) : z
|
|
255
275
|
);
|
|
256
276
|
};
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
var
|
|
260
|
-
function
|
|
261
|
-
return
|
|
262
|
-
}
|
|
263
|
-
var a =
|
|
264
|
-
|
|
277
|
+
}()), oe;
|
|
278
|
+
}
|
|
279
|
+
var et;
|
|
280
|
+
function nr() {
|
|
281
|
+
return et || (et = 1, process.env.NODE_ENV === "production" ? he.exports = tr() : he.exports = rr()), he.exports;
|
|
282
|
+
}
|
|
283
|
+
var a = nr();
|
|
284
|
+
/**
|
|
285
|
+
* @license lucide-react v0.545.0 - ISC
|
|
286
|
+
*
|
|
287
|
+
* This source code is licensed under the ISC license.
|
|
288
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
289
|
+
*/
|
|
290
|
+
const ar = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), sr = (e) => e.replace(
|
|
265
291
|
/^([A-Z])|[\s-_]+(\w)/g,
|
|
266
292
|
(t, r, n) => n ? n.toUpperCase() : r.toLowerCase()
|
|
267
|
-
),
|
|
268
|
-
const t =
|
|
293
|
+
), tt = (e) => {
|
|
294
|
+
const t = sr(e);
|
|
269
295
|
return t.charAt(0).toUpperCase() + t.slice(1);
|
|
270
|
-
},
|
|
296
|
+
}, Rt = (...e) => e.filter((t, r, n) => !!t && t.trim() !== "" && n.indexOf(t) === r).join(" ").trim(), or = (e) => {
|
|
271
297
|
for (const t in e)
|
|
272
298
|
if (t.startsWith("aria-") || t === "role" || t === "title")
|
|
273
299
|
return !0;
|
|
274
300
|
};
|
|
275
|
-
|
|
301
|
+
/**
|
|
302
|
+
* @license lucide-react v0.545.0 - ISC
|
|
303
|
+
*
|
|
304
|
+
* This source code is licensed under the ISC license.
|
|
305
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
306
|
+
*/
|
|
307
|
+
var ir = {
|
|
276
308
|
xmlns: "http://www.w3.org/2000/svg",
|
|
277
309
|
width: 24,
|
|
278
310
|
height: 24,
|
|
@@ -283,118 +315,154 @@ var sr = {
|
|
|
283
315
|
strokeLinecap: "round",
|
|
284
316
|
strokeLinejoin: "round"
|
|
285
317
|
};
|
|
286
|
-
|
|
318
|
+
/**
|
|
319
|
+
* @license lucide-react v0.545.0 - ISC
|
|
320
|
+
*
|
|
321
|
+
* This source code is licensed under the ISC license.
|
|
322
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
323
|
+
*/
|
|
324
|
+
const cr = _t(
|
|
287
325
|
({
|
|
288
326
|
color: e = "currentColor",
|
|
289
327
|
size: t = 24,
|
|
290
328
|
strokeWidth: r = 2,
|
|
291
329
|
absoluteStrokeWidth: n,
|
|
292
|
-
className:
|
|
293
|
-
children:
|
|
330
|
+
className: s = "",
|
|
331
|
+
children: o,
|
|
294
332
|
iconNode: c,
|
|
295
333
|
...l
|
|
296
|
-
}, g) =>
|
|
334
|
+
}, g) => Te(
|
|
297
335
|
"svg",
|
|
298
336
|
{
|
|
299
337
|
ref: g,
|
|
300
|
-
...
|
|
338
|
+
...ir,
|
|
301
339
|
width: t,
|
|
302
340
|
height: t,
|
|
303
341
|
stroke: e,
|
|
304
342
|
strokeWidth: n ? Number(r) * 24 / Number(t) : r,
|
|
305
|
-
className:
|
|
306
|
-
...!
|
|
343
|
+
className: Rt("lucide", s),
|
|
344
|
+
...!o && !or(l) && { "aria-hidden": "true" },
|
|
307
345
|
...l
|
|
308
346
|
},
|
|
309
347
|
[
|
|
310
|
-
...c.map(([u, d]) =>
|
|
311
|
-
...Array.isArray(
|
|
348
|
+
...c.map(([u, d]) => Te(u, d)),
|
|
349
|
+
...Array.isArray(o) ? o : [o]
|
|
312
350
|
]
|
|
313
351
|
)
|
|
314
352
|
);
|
|
353
|
+
/**
|
|
354
|
+
* @license lucide-react v0.545.0 - ISC
|
|
355
|
+
*
|
|
356
|
+
* This source code is licensed under the ISC license.
|
|
357
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
358
|
+
*/
|
|
315
359
|
const X = (e, t) => {
|
|
316
360
|
const r = _t(
|
|
317
|
-
({ className: n, ...
|
|
318
|
-
ref:
|
|
361
|
+
({ className: n, ...s }, o) => Te(cr, {
|
|
362
|
+
ref: o,
|
|
319
363
|
iconNode: t,
|
|
320
|
-
className:
|
|
321
|
-
`lucide-${
|
|
364
|
+
className: Rt(
|
|
365
|
+
`lucide-${ar(tt(e))}`,
|
|
322
366
|
`lucide-${e}`,
|
|
323
367
|
n
|
|
324
368
|
),
|
|
325
|
-
...
|
|
369
|
+
...s
|
|
326
370
|
})
|
|
327
371
|
);
|
|
328
|
-
return r.displayName =
|
|
372
|
+
return r.displayName = tt(e), r;
|
|
329
373
|
};
|
|
330
|
-
|
|
374
|
+
/**
|
|
375
|
+
* @license lucide-react v0.545.0 - ISC
|
|
376
|
+
*
|
|
377
|
+
* This source code is licensed under the ISC license.
|
|
378
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
379
|
+
*/
|
|
380
|
+
const lr = [
|
|
331
381
|
["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
|
|
332
382
|
["path", { d: "M21 3v5h-5", key: "1q7to0" }],
|
|
333
383
|
["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
|
|
334
384
|
["path", { d: "M8 16H3v5", key: "1cv678" }]
|
|
335
|
-
],
|
|
336
|
-
|
|
385
|
+
], ur = X("refresh-cw", lr);
|
|
386
|
+
/**
|
|
387
|
+
* @license lucide-react v0.545.0 - ISC
|
|
388
|
+
*
|
|
389
|
+
* This source code is licensed under the ISC license.
|
|
390
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
391
|
+
*/
|
|
392
|
+
const dr = [
|
|
337
393
|
["path", { d: "m21 21-4.34-4.34", key: "14j7rj" }],
|
|
338
394
|
["circle", { cx: "11", cy: "11", r: "8", key: "4ej97u" }]
|
|
339
|
-
],
|
|
340
|
-
|
|
395
|
+
], fr = X("search", dr);
|
|
396
|
+
/**
|
|
397
|
+
* @license lucide-react v0.545.0 - ISC
|
|
398
|
+
*
|
|
399
|
+
* This source code is licensed under the ISC license.
|
|
400
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
401
|
+
*/
|
|
402
|
+
const pr = [
|
|
341
403
|
["path", { d: "M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6", key: "miytrc" }],
|
|
342
404
|
["path", { d: "M3 6h18", key: "d0wm0j" }],
|
|
343
405
|
["path", { d: "M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2", key: "e791ji" }]
|
|
344
|
-
],
|
|
345
|
-
|
|
406
|
+
], gr = X("trash", pr);
|
|
407
|
+
/**
|
|
408
|
+
* @license lucide-react v0.545.0 - ISC
|
|
409
|
+
*
|
|
410
|
+
* This source code is licensed under the ISC license.
|
|
411
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
412
|
+
*/
|
|
413
|
+
const hr = [
|
|
346
414
|
["path", { d: "M18 6 6 18", key: "1bl5f8" }],
|
|
347
415
|
["path", { d: "m6 6 12 12", key: "d8bk6v" }]
|
|
348
|
-
],
|
|
349
|
-
const [e, t] = P([]), r =
|
|
350
|
-
fetch("/__motia/state").then(async (
|
|
351
|
-
if (
|
|
352
|
-
return
|
|
353
|
-
throw await
|
|
354
|
-
}).then(t).catch((
|
|
355
|
-
}, []), n = (
|
|
416
|
+
], Mt = X("x", hr), vr = () => {
|
|
417
|
+
const [e, t] = P([]), r = K(() => {
|
|
418
|
+
fetch("/__motia/state").then(async (s) => {
|
|
419
|
+
if (s.ok)
|
|
420
|
+
return s.json();
|
|
421
|
+
throw await s.json();
|
|
422
|
+
}).then(t).catch((s) => console.error(s));
|
|
423
|
+
}, []), n = (s) => {
|
|
356
424
|
fetch("/__motia/state/delete", {
|
|
357
425
|
method: "POST",
|
|
358
426
|
headers: { "Content-Type": "application/json" },
|
|
359
|
-
body: JSON.stringify({ ids:
|
|
427
|
+
body: JSON.stringify({ ids: s })
|
|
360
428
|
}).then(() => r());
|
|
361
429
|
};
|
|
362
430
|
return Y(() => {
|
|
363
431
|
r();
|
|
364
432
|
}, [r]), { items: e, deleteItems: n, refetch: r };
|
|
365
|
-
},
|
|
433
|
+
}, rt = (e) => {
|
|
366
434
|
let t;
|
|
367
435
|
const r = /* @__PURE__ */ new Set(), n = (u, d) => {
|
|
368
436
|
const v = typeof u == "function" ? u(t) : u;
|
|
369
437
|
if (!Object.is(v, t)) {
|
|
370
|
-
const
|
|
371
|
-
t = d ?? (typeof v != "object" || v === null) ? v : Object.assign({}, t, v), r.forEach((
|
|
438
|
+
const S = t;
|
|
439
|
+
t = d ?? (typeof v != "object" || v === null) ? v : Object.assign({}, t, v), r.forEach((T) => T(t, S));
|
|
372
440
|
}
|
|
373
|
-
},
|
|
441
|
+
}, s = () => t, l = { setState: n, getState: s, getInitialState: () => g, subscribe: (u) => (r.add(u), () => r.delete(u)) }, g = t = e(n, s, l);
|
|
374
442
|
return l;
|
|
375
|
-
},
|
|
376
|
-
function
|
|
377
|
-
const r =
|
|
443
|
+
}, mr = (e) => e ? rt(e) : rt, yr = (e) => e;
|
|
444
|
+
function jr(e, t = yr) {
|
|
445
|
+
const r = W.useSyncExternalStore(
|
|
378
446
|
e.subscribe,
|
|
379
|
-
|
|
380
|
-
|
|
447
|
+
W.useCallback(() => t(e.getState()), [e, t]),
|
|
448
|
+
W.useCallback(() => t(e.getInitialState()), [e, t])
|
|
381
449
|
);
|
|
382
|
-
return
|
|
450
|
+
return W.useDebugValue(r), r;
|
|
383
451
|
}
|
|
384
452
|
const br = (e) => {
|
|
385
|
-
const t =
|
|
453
|
+
const t = mr(e), r = (n) => jr(t, n);
|
|
386
454
|
return Object.assign(r, t), r;
|
|
387
|
-
},
|
|
455
|
+
}, wr = (e) => br, nt = wr()((e) => ({
|
|
388
456
|
selectedStateId: void 0,
|
|
389
457
|
selectStateId: (t) => e({ selectedStateId: t })
|
|
390
458
|
}));
|
|
391
|
-
function
|
|
392
|
-
function o
|
|
393
|
-
return
|
|
394
|
-
c(
|
|
459
|
+
function xr(e, t, r, n) {
|
|
460
|
+
function s(o) {
|
|
461
|
+
return o instanceof r ? o : new r(function(c) {
|
|
462
|
+
c(o);
|
|
395
463
|
});
|
|
396
464
|
}
|
|
397
|
-
return new (r || (r = Promise))(function(
|
|
465
|
+
return new (r || (r = Promise))(function(o, c) {
|
|
398
466
|
function l(d) {
|
|
399
467
|
try {
|
|
400
468
|
u(n.next(d));
|
|
@@ -410,12 +478,12 @@ function wr(e, t, r, n) {
|
|
|
410
478
|
}
|
|
411
479
|
}
|
|
412
480
|
function u(d) {
|
|
413
|
-
d.done ?
|
|
481
|
+
d.done ? o(d.value) : s(d.value).then(l, g);
|
|
414
482
|
}
|
|
415
483
|
u((n = n.apply(e, [])).next());
|
|
416
484
|
});
|
|
417
485
|
}
|
|
418
|
-
var
|
|
486
|
+
var Cr = function() {
|
|
419
487
|
var e = document.getSelection();
|
|
420
488
|
if (!e.rangeCount)
|
|
421
489
|
return function() {
|
|
@@ -433,33 +501,33 @@ var xr = function() {
|
|
|
433
501
|
break;
|
|
434
502
|
}
|
|
435
503
|
return e.removeAllRanges(), function() {
|
|
436
|
-
e.type === "Caret" && e.removeAllRanges(), e.rangeCount || r.forEach(function(
|
|
437
|
-
e.addRange(
|
|
504
|
+
e.type === "Caret" && e.removeAllRanges(), e.rangeCount || r.forEach(function(s) {
|
|
505
|
+
e.addRange(s);
|
|
438
506
|
}), t && t.focus();
|
|
439
507
|
};
|
|
440
|
-
},
|
|
508
|
+
}, Sr = Cr, at = {
|
|
441
509
|
"text/plain": "Text",
|
|
442
510
|
"text/html": "Url",
|
|
443
511
|
default: "Text"
|
|
444
|
-
},
|
|
512
|
+
}, Or = "Copy to clipboard: #{key}, Enter";
|
|
445
513
|
function Er(e) {
|
|
446
514
|
var t = (/mac os x/i.test(navigator.userAgent) ? "⌘" : "Ctrl") + "+C";
|
|
447
515
|
return e.replace(/#{\s*key\s*}/g, t);
|
|
448
516
|
}
|
|
449
|
-
function
|
|
450
|
-
var r, n,
|
|
517
|
+
function kr(e, t) {
|
|
518
|
+
var r, n, s, o, c, l, g = !1;
|
|
451
519
|
t || (t = {}), r = t.debug || !1;
|
|
452
520
|
try {
|
|
453
|
-
|
|
521
|
+
s = Sr(), o = document.createRange(), c = document.getSelection(), l = document.createElement("span"), l.textContent = e, l.ariaHidden = "true", l.style.all = "unset", l.style.position = "fixed", l.style.top = 0, l.style.clip = "rect(0, 0, 0, 0)", l.style.whiteSpace = "pre", l.style.webkitUserSelect = "text", l.style.MozUserSelect = "text", l.style.msUserSelect = "text", l.style.userSelect = "text", l.addEventListener("copy", function(d) {
|
|
454
522
|
if (d.stopPropagation(), t.format)
|
|
455
523
|
if (d.preventDefault(), typeof d.clipboardData > "u") {
|
|
456
524
|
r && console.warn("unable to use e.clipboardData"), r && console.warn("trying IE specific stuff"), window.clipboardData.clearData();
|
|
457
|
-
var v =
|
|
525
|
+
var v = at[t.format] || at.default;
|
|
458
526
|
window.clipboardData.setData(v, e);
|
|
459
527
|
} else
|
|
460
528
|
d.clipboardData.clearData(), d.clipboardData.setData(t.format, e);
|
|
461
529
|
t.onCopy && (d.preventDefault(), t.onCopy(d.clipboardData));
|
|
462
|
-
}), document.body.appendChild(l),
|
|
530
|
+
}), document.body.appendChild(l), o.selectNodeContents(l), c.addRange(o);
|
|
463
531
|
var u = document.execCommand("copy");
|
|
464
532
|
if (!u)
|
|
465
533
|
throw new Error("copy command was unsuccessful");
|
|
@@ -469,21 +537,21 @@ function Or(e, t) {
|
|
|
469
537
|
try {
|
|
470
538
|
window.clipboardData.setData(t.format || "text", e), t.onCopy && t.onCopy(window.clipboardData), g = !0;
|
|
471
539
|
} catch (v) {
|
|
472
|
-
r && console.error("unable to copy using clipboardData: ", v), r && console.error("falling back to prompt"), n = Er("message" in t ? t.message :
|
|
540
|
+
r && console.error("unable to copy using clipboardData: ", v), r && console.error("falling back to prompt"), n = Er("message" in t ? t.message : Or), window.prompt(n, e);
|
|
473
541
|
}
|
|
474
542
|
} finally {
|
|
475
|
-
c && (typeof c.removeRange == "function" ? c.removeRange(
|
|
543
|
+
c && (typeof c.removeRange == "function" ? c.removeRange(o) : c.removeAllRanges()), l && document.body.removeChild(l), s();
|
|
476
544
|
}
|
|
477
545
|
return g;
|
|
478
546
|
}
|
|
479
|
-
var
|
|
547
|
+
var Ar = kr;
|
|
480
548
|
function Q(e) {
|
|
481
549
|
return Object.prototype.toString.call(e) === "[object Object]";
|
|
482
550
|
}
|
|
483
551
|
function ce(e) {
|
|
484
552
|
return Array.isArray(e) ? e.length : Q(e) ? Object.keys(e).length : 0;
|
|
485
553
|
}
|
|
486
|
-
function
|
|
554
|
+
function Nr(e, t) {
|
|
487
555
|
if (typeof e == "string")
|
|
488
556
|
return e;
|
|
489
557
|
try {
|
|
@@ -504,89 +572,89 @@ function Ar(e, t) {
|
|
|
504
572
|
return `${r.name}: ${r.message}` || "JSON.stringify failed";
|
|
505
573
|
}
|
|
506
574
|
}
|
|
507
|
-
function
|
|
508
|
-
return
|
|
575
|
+
function Tr(e) {
|
|
576
|
+
return xr(this, void 0, void 0, function* () {
|
|
509
577
|
try {
|
|
510
578
|
yield navigator.clipboard.writeText(e);
|
|
511
579
|
} catch {
|
|
512
|
-
|
|
580
|
+
Ar(e);
|
|
513
581
|
}
|
|
514
582
|
});
|
|
515
583
|
}
|
|
516
|
-
function
|
|
517
|
-
if (
|
|
518
|
-
return !!
|
|
584
|
+
function st(e, t, r, n, s, o) {
|
|
585
|
+
if (o && o.collapsed !== void 0)
|
|
586
|
+
return !!o.collapsed;
|
|
519
587
|
if (typeof n == "boolean")
|
|
520
588
|
return n;
|
|
521
589
|
if (typeof n == "number" && t > n)
|
|
522
590
|
return !0;
|
|
523
591
|
const c = ce(e);
|
|
524
592
|
if (typeof n == "function") {
|
|
525
|
-
const l =
|
|
593
|
+
const l = Ue(n, [{ node: e, depth: t, indexOrName: r, size: c }]);
|
|
526
594
|
if (typeof l == "boolean")
|
|
527
595
|
return l;
|
|
528
596
|
}
|
|
529
|
-
return !!(Array.isArray(e) && c >
|
|
597
|
+
return !!(Array.isArray(e) && c > s || Q(e) && c > s);
|
|
530
598
|
}
|
|
531
|
-
function ot(e, t, r, n,
|
|
532
|
-
if (
|
|
533
|
-
return !!
|
|
599
|
+
function ot(e, t, r, n, s, o) {
|
|
600
|
+
if (o && o.collapsed !== void 0)
|
|
601
|
+
return !!o.collapsed;
|
|
534
602
|
if (typeof n == "boolean")
|
|
535
603
|
return n;
|
|
536
604
|
if (typeof n == "number" && t > n)
|
|
537
605
|
return !0;
|
|
538
606
|
const c = Math.ceil(e.length / 100);
|
|
539
607
|
if (typeof n == "function") {
|
|
540
|
-
const l =
|
|
608
|
+
const l = Ue(n, [{ node: e, depth: t, indexOrName: r, size: c }]);
|
|
541
609
|
if (typeof l == "boolean")
|
|
542
610
|
return l;
|
|
543
611
|
}
|
|
544
|
-
return !!(Array.isArray(e) && c >
|
|
612
|
+
return !!(Array.isArray(e) && c > s || Q(e) && c > s);
|
|
545
613
|
}
|
|
546
614
|
function ae(e, t, r) {
|
|
547
615
|
return typeof e == "boolean" ? e : !!(typeof e == "number" && t > e || e === "collapsed" && r || e === "expanded" && !r);
|
|
548
616
|
}
|
|
549
|
-
function
|
|
617
|
+
function Ue(e, t) {
|
|
550
618
|
try {
|
|
551
619
|
return e(...t);
|
|
552
620
|
} catch (r) {
|
|
553
621
|
reportError(r);
|
|
554
622
|
}
|
|
555
623
|
}
|
|
556
|
-
function
|
|
624
|
+
function It(e) {
|
|
557
625
|
if (e === !0 || Q(e) && e.add === !0)
|
|
558
626
|
return !0;
|
|
559
627
|
}
|
|
560
|
-
function
|
|
628
|
+
function it(e) {
|
|
561
629
|
if (e === !0 || Q(e) && e.edit === !0)
|
|
562
630
|
return !0;
|
|
563
631
|
}
|
|
564
|
-
function
|
|
632
|
+
function ze(e) {
|
|
565
633
|
if (e === !0 || Q(e) && e.delete === !0)
|
|
566
634
|
return !0;
|
|
567
635
|
}
|
|
568
636
|
function _r(e) {
|
|
569
637
|
return typeof e == "function";
|
|
570
638
|
}
|
|
571
|
-
function
|
|
639
|
+
function Pt(e) {
|
|
572
640
|
return !e || e.add === void 0 || !!e.add;
|
|
573
641
|
}
|
|
574
|
-
function
|
|
642
|
+
function ct(e) {
|
|
575
643
|
return !e || e.edit === void 0 || !!e.edit;
|
|
576
644
|
}
|
|
577
|
-
function
|
|
645
|
+
function Ze(e) {
|
|
578
646
|
return !e || e.delete === void 0 || !!e.delete;
|
|
579
647
|
}
|
|
580
648
|
function we(e) {
|
|
581
649
|
return !e || e.enableClipboard === void 0 || !!e.enableClipboard;
|
|
582
650
|
}
|
|
583
|
-
function
|
|
651
|
+
function Rr(e) {
|
|
584
652
|
return !e || e.matchesURL === void 0 || !!e.matchesURL;
|
|
585
653
|
}
|
|
586
|
-
function
|
|
654
|
+
function Mr(e, t) {
|
|
587
655
|
return e === "string" ? t.trim().replace(/^\"([\s\S]+?)\"$/, "$1") : t;
|
|
588
656
|
}
|
|
589
|
-
var
|
|
657
|
+
var lt;
|
|
590
658
|
function _e() {
|
|
591
659
|
return _e = Object.assign ? Object.assign.bind() : function(e) {
|
|
592
660
|
for (var t = 1; t < arguments.length; t++) {
|
|
@@ -597,437 +665,437 @@ function _e() {
|
|
|
597
665
|
return e;
|
|
598
666
|
}, _e.apply(this, arguments);
|
|
599
667
|
}
|
|
600
|
-
var
|
|
601
|
-
return /* @__PURE__ */
|
|
668
|
+
var Je = function(t) {
|
|
669
|
+
return /* @__PURE__ */ D.createElement("svg", _e({
|
|
602
670
|
xmlns: "http://www.w3.org/2000/svg",
|
|
603
671
|
width: 16,
|
|
604
672
|
height: 16,
|
|
605
673
|
fill: "none",
|
|
606
674
|
viewBox: "0 0 16 16"
|
|
607
|
-
}, t),
|
|
675
|
+
}, t), lt || (lt = /* @__PURE__ */ D.createElement("path", {
|
|
608
676
|
fill: "currentColor",
|
|
609
677
|
d: "M12.473 5.806a.666.666 0 0 0-.946 0L8.473 8.86a.667.667 0 0 1-.946 0L4.473 5.806a.667.667 0 1 0-.946.94l3.06 3.06a2 2 0 0 0 2.826 0l3.06-3.06a.667.667 0 0 0 0-.94Z"
|
|
610
678
|
})));
|
|
611
|
-
},
|
|
612
|
-
function
|
|
613
|
-
return
|
|
679
|
+
}, ut;
|
|
680
|
+
function Re() {
|
|
681
|
+
return Re = Object.assign ? Object.assign.bind() : function(e) {
|
|
614
682
|
for (var t = 1; t < arguments.length; t++) {
|
|
615
683
|
var r = arguments[t];
|
|
616
684
|
for (var n in r)
|
|
617
685
|
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
618
686
|
}
|
|
619
687
|
return e;
|
|
620
|
-
},
|
|
688
|
+
}, Re.apply(this, arguments);
|
|
621
689
|
}
|
|
622
|
-
var
|
|
623
|
-
return /* @__PURE__ */
|
|
690
|
+
var Ir = function(t) {
|
|
691
|
+
return /* @__PURE__ */ D.createElement("svg", Re({
|
|
624
692
|
xmlns: "http://www.w3.org/2000/svg",
|
|
625
693
|
width: 24,
|
|
626
694
|
height: 24,
|
|
627
695
|
fill: "none",
|
|
628
696
|
viewBox: "0 0 24 24"
|
|
629
|
-
}, t),
|
|
697
|
+
}, t), ut || (ut = /* @__PURE__ */ D.createElement("path", {
|
|
630
698
|
fill: "currentColor",
|
|
631
699
|
d: "M17.542 2.5h-4.75a3.963 3.963 0 0 0-3.959 3.958v4.75a3.963 3.963 0 0 0 3.959 3.959h4.75a3.963 3.963 0 0 0 3.958-3.959v-4.75A3.963 3.963 0 0 0 17.542 2.5Zm2.375 8.708a2.378 2.378 0 0 1-2.375 2.375h-4.75a2.378 2.378 0 0 1-2.375-2.375v-4.75a2.378 2.378 0 0 1 2.375-2.375h4.75a2.378 2.378 0 0 1 2.375 2.375v4.75Zm-4.75 6.334a3.963 3.963 0 0 1-3.959 3.958h-4.75A3.963 3.963 0 0 1 2.5 17.542v-4.75a3.963 3.963 0 0 1 3.958-3.959.791.791 0 1 1 0 1.584 2.378 2.378 0 0 0-2.375 2.375v4.75a2.378 2.378 0 0 0 2.375 2.375h4.75a2.378 2.378 0 0 0 2.375-2.375.792.792 0 1 1 1.584 0Z"
|
|
632
700
|
})));
|
|
633
|
-
},
|
|
634
|
-
function
|
|
635
|
-
return
|
|
701
|
+
}, dt, ft;
|
|
702
|
+
function Me() {
|
|
703
|
+
return Me = Object.assign ? Object.assign.bind() : function(e) {
|
|
636
704
|
for (var t = 1; t < arguments.length; t++) {
|
|
637
705
|
var r = arguments[t];
|
|
638
706
|
for (var n in r)
|
|
639
707
|
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
640
708
|
}
|
|
641
709
|
return e;
|
|
642
|
-
},
|
|
710
|
+
}, Me.apply(this, arguments);
|
|
643
711
|
}
|
|
644
|
-
var
|
|
645
|
-
return /* @__PURE__ */
|
|
712
|
+
var Pr = function(t) {
|
|
713
|
+
return /* @__PURE__ */ D.createElement("svg", Me({
|
|
646
714
|
xmlns: "http://www.w3.org/2000/svg",
|
|
647
715
|
width: 24,
|
|
648
716
|
height: 24,
|
|
649
717
|
fill: "none",
|
|
650
718
|
viewBox: "0 0 24 24"
|
|
651
|
-
}, t),
|
|
719
|
+
}, t), dt || (dt = /* @__PURE__ */ D.createElement("path", {
|
|
652
720
|
fill: "currentColor",
|
|
653
721
|
d: "M17.25 3H6.75A3.755 3.755 0 0 0 3 6.75v10.5A3.754 3.754 0 0 0 6.75 21h10.5A3.754 3.754 0 0 0 21 17.25V6.75A3.755 3.755 0 0 0 17.25 3Zm2.25 14.25a2.25 2.25 0 0 1-2.25 2.25H6.75a2.25 2.25 0 0 1-2.25-2.25V6.75A2.25 2.25 0 0 1 6.75 4.5h10.5a2.25 2.25 0 0 1 2.25 2.25v10.5Z"
|
|
654
|
-
})),
|
|
722
|
+
})), ft || (ft = /* @__PURE__ */ D.createElement("path", {
|
|
655
723
|
fill: "#14C786",
|
|
656
724
|
d: "M10.312 14.45 7.83 11.906a.625.625 0 0 0-.896 0 .659.659 0 0 0 0 .918l2.481 2.546a1.264 1.264 0 0 0 .896.381 1.237 1.237 0 0 0 .895-.38l5.858-6.011a.658.658 0 0 0 0-.919.625.625 0 0 0-.896 0l-5.857 6.01Z"
|
|
657
725
|
})));
|
|
658
726
|
};
|
|
659
727
|
function xe({ node: e, nodeMeta: t }) {
|
|
660
|
-
const { customizeCopy: r, CopyComponent: n, CopiedComponent:
|
|
728
|
+
const { customizeCopy: r, CopyComponent: n, CopiedComponent: s } = te(ee), [o, c] = P(!1), l = (g) => {
|
|
661
729
|
g.stopPropagation();
|
|
662
730
|
const u = r(e, t);
|
|
663
|
-
typeof u == "string" && u &&
|
|
731
|
+
typeof u == "string" && u && Tr(u), c(!0), setTimeout(() => c(!1), 3e3);
|
|
664
732
|
};
|
|
665
|
-
return
|
|
733
|
+
return o ? typeof s == "function" ? a.jsx(s, { className: "json-view--copy", style: { display: "inline-block" } }) : a.jsx(Pr, { className: "json-view--copy", style: { display: "inline-block" } }) : typeof n == "function" ? a.jsx(n, { onClick: l, className: "json-view--copy" }) : a.jsx(Ir, { onClick: l, className: "json-view--copy" });
|
|
666
734
|
}
|
|
667
|
-
function
|
|
668
|
-
const { displayArrayIndex: l } = te(ee), g = Array.isArray(
|
|
669
|
-
return a.jsxs("div", Object.assign({ className: "json-view--pair" }, { children: [!g || g && l ? a.jsxs(a.Fragment, { children: [a.jsx("span", Object.assign({ className: typeof e == "number" ? "json-view--index" : "json-view--property" }, { children: e })), ":", " "] }) : a.jsx(a.Fragment, {}), a.jsx(
|
|
735
|
+
function Ie({ indexOrName: e, value: t, depth: r, deleteHandle: n, editHandle: s, parent: o, parentPath: c }) {
|
|
736
|
+
const { displayArrayIndex: l } = te(ee), g = Array.isArray(o);
|
|
737
|
+
return a.jsxs("div", Object.assign({ className: "json-view--pair" }, { children: [!g || g && l ? a.jsxs(a.Fragment, { children: [a.jsx("span", Object.assign({ className: typeof e == "number" ? "json-view--index" : "json-view--property" }, { children: e })), ":", " "] }) : a.jsx(a.Fragment, {}), a.jsx(Dt, { node: t, depth: r + 1, deleteHandle: (u, d) => n(u, d), editHandle: (u, d, v, S) => s(u, d, v, S), parent: o, indexOrName: e, parentPath: c })] }));
|
|
670
738
|
}
|
|
671
|
-
var
|
|
672
|
-
function
|
|
673
|
-
return
|
|
739
|
+
var pt, gt;
|
|
740
|
+
function Pe() {
|
|
741
|
+
return Pe = Object.assign ? Object.assign.bind() : function(e) {
|
|
674
742
|
for (var t = 1; t < arguments.length; t++) {
|
|
675
743
|
var r = arguments[t];
|
|
676
744
|
for (var n in r)
|
|
677
745
|
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
678
746
|
}
|
|
679
747
|
return e;
|
|
680
|
-
},
|
|
748
|
+
}, Pe.apply(this, arguments);
|
|
681
749
|
}
|
|
682
|
-
var
|
|
683
|
-
return /* @__PURE__ */
|
|
750
|
+
var Ye = function(t) {
|
|
751
|
+
return /* @__PURE__ */ D.createElement("svg", Pe({
|
|
684
752
|
xmlns: "http://www.w3.org/2000/svg",
|
|
685
753
|
width: 24,
|
|
686
754
|
height: 24,
|
|
687
755
|
fill: "none",
|
|
688
756
|
viewBox: "0 0 24 24"
|
|
689
|
-
}, t),
|
|
757
|
+
}, t), pt || (pt = /* @__PURE__ */ D.createElement("path", {
|
|
690
758
|
fill: "currentColor",
|
|
691
759
|
d: "M18.75 6h-2.325a3.757 3.757 0 0 0-3.675-3h-1.5a3.757 3.757 0 0 0-3.675 3H5.25a.75.75 0 0 0 0 1.5H6v9.75A3.754 3.754 0 0 0 9.75 21h4.5A3.754 3.754 0 0 0 18 17.25V7.5h.75a.75.75 0 1 0 0-1.5Zm-7.5-1.5h1.5A2.255 2.255 0 0 1 14.872 6H9.128a2.255 2.255 0 0 1 2.122-1.5Zm5.25 12.75a2.25 2.25 0 0 1-2.25 2.25h-4.5a2.25 2.25 0 0 1-2.25-2.25V7.5h9v9.75Z"
|
|
692
|
-
})),
|
|
760
|
+
})), gt || (gt = /* @__PURE__ */ D.createElement("path", {
|
|
693
761
|
fill: "#DA0000",
|
|
694
762
|
d: "M10.5 16.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 1 0-1.5 0v4.5a.75.75 0 0 0 .75.75ZM13.5 16.5a.75.75 0 0 0 .75-.75v-4.5a.75.75 0 1 0-1.5 0v4.5a.75.75 0 0 0 .75.75Z"
|
|
695
763
|
})));
|
|
696
|
-
},
|
|
697
|
-
function
|
|
698
|
-
return
|
|
764
|
+
}, ht, vt;
|
|
765
|
+
function $e() {
|
|
766
|
+
return $e = Object.assign ? Object.assign.bind() : function(e) {
|
|
699
767
|
for (var t = 1; t < arguments.length; t++) {
|
|
700
768
|
var r = arguments[t];
|
|
701
769
|
for (var n in r)
|
|
702
770
|
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
703
771
|
}
|
|
704
772
|
return e;
|
|
705
|
-
},
|
|
773
|
+
}, $e.apply(this, arguments);
|
|
706
774
|
}
|
|
707
|
-
var
|
|
708
|
-
return /* @__PURE__ */
|
|
775
|
+
var $t = function(t) {
|
|
776
|
+
return /* @__PURE__ */ D.createElement("svg", $e({
|
|
709
777
|
xmlns: "http://www.w3.org/2000/svg",
|
|
710
778
|
width: 24,
|
|
711
779
|
height: 24,
|
|
712
780
|
fill: "none",
|
|
713
781
|
viewBox: "0 0 24 24"
|
|
714
|
-
}, t),
|
|
782
|
+
}, t), ht || (ht = /* @__PURE__ */ D.createElement("path", {
|
|
715
783
|
fill: "currentColor",
|
|
716
784
|
d: "M21 6.75v10.5A3.754 3.754 0 0 1 17.25 21H6.75A3.754 3.754 0 0 1 3 17.25V6.75A3.754 3.754 0 0 1 6.75 3h10.5A3.754 3.754 0 0 1 21 6.75Zm-1.5 0c0-1.24-1.01-2.25-2.25-2.25H6.75C5.51 4.5 4.5 5.51 4.5 6.75v10.5c0 1.24 1.01 2.25 2.25 2.25h10.5c1.24 0 2.25-1.01 2.25-2.25V6.75Z"
|
|
717
|
-
})),
|
|
785
|
+
})), vt || (vt = /* @__PURE__ */ D.createElement("path", {
|
|
718
786
|
fill: "#14C786",
|
|
719
787
|
d: "M15 12.75a.75.75 0 1 0 0-1.5h-2.25V9a.75.75 0 1 0-1.5 0v2.25H9a.75.75 0 1 0 0 1.5h2.25V15a.75.75 0 1 0 1.5 0v-2.25H15Z"
|
|
720
788
|
})));
|
|
721
|
-
},
|
|
722
|
-
function
|
|
723
|
-
return
|
|
789
|
+
}, mt, yt;
|
|
790
|
+
function De() {
|
|
791
|
+
return De = Object.assign ? Object.assign.bind() : function(e) {
|
|
724
792
|
for (var t = 1; t < arguments.length; t++) {
|
|
725
793
|
var r = arguments[t];
|
|
726
794
|
for (var n in r)
|
|
727
795
|
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
728
796
|
}
|
|
729
797
|
return e;
|
|
730
|
-
},
|
|
798
|
+
}, De.apply(this, arguments);
|
|
731
799
|
}
|
|
732
|
-
var
|
|
733
|
-
return /* @__PURE__ */
|
|
800
|
+
var qe = function(t) {
|
|
801
|
+
return /* @__PURE__ */ D.createElement("svg", De({
|
|
734
802
|
xmlns: "http://www.w3.org/2000/svg",
|
|
735
803
|
width: 24,
|
|
736
804
|
height: 24,
|
|
737
805
|
fill: "none",
|
|
738
806
|
viewBox: "0 0 24 24"
|
|
739
|
-
}, t),
|
|
807
|
+
}, t), mt || (mt = /* @__PURE__ */ D.createElement("path", {
|
|
740
808
|
fill: "currentColor",
|
|
741
809
|
d: "M12 3a9 9 0 1 0 9 9 9.01 9.01 0 0 0-9-9Zm0 16.5a7.5 7.5 0 1 1 7.5-7.5 7.509 7.509 0 0 1-7.5 7.5Z"
|
|
742
|
-
})),
|
|
810
|
+
})), yt || (yt = /* @__PURE__ */ D.createElement("path", {
|
|
743
811
|
fill: "#14C786",
|
|
744
812
|
d: "m10.85 13.96-1.986-2.036a.5.5 0 0 0-.716 0 .527.527 0 0 0 0 .735l1.985 2.036a1.01 1.01 0 0 0 .717.305.99.99 0 0 0 .716-.305l4.686-4.808a.526.526 0 0 0 0-.735.5.5 0 0 0-.716 0l-4.687 4.809Z"
|
|
745
813
|
})));
|
|
746
|
-
},
|
|
747
|
-
function
|
|
748
|
-
return
|
|
814
|
+
}, jt, bt;
|
|
815
|
+
function Le() {
|
|
816
|
+
return Le = Object.assign ? Object.assign.bind() : function(e) {
|
|
749
817
|
for (var t = 1; t < arguments.length; t++) {
|
|
750
818
|
var r = arguments[t];
|
|
751
819
|
for (var n in r)
|
|
752
820
|
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
753
821
|
}
|
|
754
822
|
return e;
|
|
755
|
-
},
|
|
823
|
+
}, Le.apply(this, arguments);
|
|
756
824
|
}
|
|
757
|
-
var
|
|
758
|
-
return /* @__PURE__ */
|
|
825
|
+
var Be = function(t) {
|
|
826
|
+
return /* @__PURE__ */ D.createElement("svg", Le({
|
|
759
827
|
xmlns: "http://www.w3.org/2000/svg",
|
|
760
828
|
width: 24,
|
|
761
829
|
height: 24,
|
|
762
830
|
fill: "none",
|
|
763
831
|
viewBox: "0 0 24 24"
|
|
764
|
-
}, t),
|
|
832
|
+
}, t), jt || (jt = /* @__PURE__ */ D.createElement("path", {
|
|
765
833
|
fill: "#DA0000",
|
|
766
834
|
d: "M15 9a.75.75 0 0 0-1.06 0L12 10.94 10.06 9A.75.75 0 0 0 9 10.06L10.94 12 9 13.94A.75.75 0 0 0 10.06 15L12 13.06 13.94 15A.75.75 0 0 0 15 13.94L13.06 12 15 10.06A.75.75 0 0 0 15 9Z"
|
|
767
|
-
})), bt || (bt = /* @__PURE__ */
|
|
835
|
+
})), bt || (bt = /* @__PURE__ */ D.createElement("path", {
|
|
768
836
|
fill: "currentColor",
|
|
769
837
|
d: "M12 3a9 9 0 1 0 9 9 9.01 9.01 0 0 0-9-9Zm0 16.5a7.5 7.5 0 1 1 7.5-7.5 7.509 7.509 0 0 1-7.5 7.5Z"
|
|
770
838
|
})));
|
|
771
839
|
};
|
|
772
|
-
function
|
|
773
|
-
const { enableClipboard: u, src: d, onEdit: v, onChange:
|
|
774
|
-
e[
|
|
840
|
+
function $r({ originNode: e, node: t, depth: r, index: n, deleteHandle: s, customOptions: o, startIndex: c, parent: l, parentPath: g }) {
|
|
841
|
+
const { enableClipboard: u, src: d, onEdit: v, onChange: S, forceUpdate: T, displaySize: O, CustomOperation: A } = te(ee), f = [...g, String(n)], [N, E] = P(!0), M = K((w, y, H) => {
|
|
842
|
+
e[w] = y, v && v({
|
|
775
843
|
newValue: y,
|
|
776
|
-
oldValue:
|
|
844
|
+
oldValue: H,
|
|
777
845
|
depth: r,
|
|
778
846
|
src: d,
|
|
779
|
-
indexOrName:
|
|
847
|
+
indexOrName: w,
|
|
780
848
|
parentType: "array",
|
|
781
849
|
parentPath: g
|
|
782
|
-
}),
|
|
783
|
-
}, [t, v,
|
|
784
|
-
e.splice(
|
|
785
|
-
}, m = a.jsxs(a.Fragment, { children: [!
|
|
786
|
-
return a.jsxs("div", { children: [a.jsx("span", { children: "[" }), m,
|
|
850
|
+
}), S && S({ type: "edit", depth: r, src: d, indexOrName: w, parentType: "array", parentPath: g }), T();
|
|
851
|
+
}, [t, v, S, T]), b = (w) => {
|
|
852
|
+
e.splice(w, 1), s && s(w, g), T();
|
|
853
|
+
}, m = a.jsxs(a.Fragment, { children: [!N && a.jsxs("span", Object.assign({ onClick: () => E(!0), className: "jv-size-chevron" }, { children: [ae(O, r, N) && a.jsxs("span", Object.assign({ className: "jv-size" }, { children: [ce(t), " Items"] })), a.jsx(Je, { className: "jv-chevron" })] })), !N && u && we(o) && a.jsx(xe, { node: t, nodeMeta: { depth: r, indexOrName: n, parent: l, parentPath: g, currentPath: f } }), typeof A == "function" ? a.jsx(A, { node: t }) : null] });
|
|
854
|
+
return a.jsxs("div", { children: [a.jsx("span", { children: "[" }), m, N ? a.jsxs("button", Object.assign({ onClick: () => E(!1), className: "jv-button" }, { children: [c, " ... ", c + t.length - 1] })) : a.jsx("div", Object.assign({ className: "jv-indent" }, { children: t.map((w, y) => a.jsx(Ie, { indexOrName: y + c, value: w, depth: r, parent: t, deleteHandle: b, editHandle: M, parentPath: g }, String(n) + String(y))) })), a.jsx("span", { children: "]" })] });
|
|
787
855
|
}
|
|
788
|
-
function
|
|
856
|
+
function Dr({ node: e, depth: t, deleteHandle: r, indexOrName: n, customOptions: s, parent: o, parentPath: c }) {
|
|
789
857
|
const l = typeof n < "u" ? [...c, String(n)] : c, g = [];
|
|
790
|
-
for (let
|
|
791
|
-
g.push(e.slice(
|
|
792
|
-
const { collapsed: u, enableClipboard: d, collapseObjectsAfterLength: v, editable:
|
|
858
|
+
for (let j = 0; j < e.length; j += 100)
|
|
859
|
+
g.push(e.slice(j, j + 100));
|
|
860
|
+
const { collapsed: u, enableClipboard: d, collapseObjectsAfterLength: v, editable: S, onDelete: T, src: O, onAdd: A, CustomOperation: f, onChange: N, forceUpdate: E, displaySize: M } = te(ee), [b, m] = P(ot(e, t, n, u, v, s));
|
|
793
861
|
Y(() => {
|
|
794
|
-
m(ot(e, t, n, u, v,
|
|
862
|
+
m(ot(e, t, n, u, v, s));
|
|
795
863
|
}, [u, v]);
|
|
796
|
-
const [
|
|
797
|
-
y(!1), r && r(n, c),
|
|
864
|
+
const [w, y] = P(!1), H = () => {
|
|
865
|
+
y(!1), r && r(n, c), T && T({ value: e, depth: t, src: O, indexOrName: n, parentType: "array", parentPath: c }), N && N({
|
|
798
866
|
type: "delete",
|
|
799
867
|
depth: t,
|
|
800
|
-
src:
|
|
868
|
+
src: O,
|
|
801
869
|
indexOrName: n,
|
|
802
870
|
parentType: "array",
|
|
803
871
|
parentPath: c
|
|
804
872
|
});
|
|
805
|
-
}, [
|
|
806
|
-
const
|
|
807
|
-
|
|
808
|
-
},
|
|
809
|
-
y(!1),
|
|
810
|
-
},
|
|
811
|
-
|
|
812
|
-
} }), !
|
|
813
|
-
return a.jsxs(a.Fragment, { children: [a.jsx("span", { children: "[" }),
|
|
814
|
-
}
|
|
815
|
-
function
|
|
816
|
-
const { collapsed: l, onCollapse: g, enableClipboard: u, ignoreLargeArray: d, collapseObjectsAfterLength: v, editable:
|
|
873
|
+
}, [_, C] = P(!1), $ = () => {
|
|
874
|
+
const j = e;
|
|
875
|
+
j.push(null), A && A({ indexOrName: j.length - 1, depth: t, src: O, parentType: "array", parentPath: c }), N && N({ type: "add", indexOrName: j.length - 1, depth: t, src: O, parentType: "array", parentPath: c }), E();
|
|
876
|
+
}, L = w || _, U = () => {
|
|
877
|
+
y(!1), C(!1);
|
|
878
|
+
}, F = a.jsxs(a.Fragment, { children: [!b && !L && a.jsxs("span", Object.assign({ onClick: () => m(!0), className: "jv-size-chevron" }, { children: [ae(M, t, b) && a.jsxs("span", Object.assign({ className: "jv-size" }, { children: [e.length, " Items"] })), a.jsx(Je, { className: "jv-chevron" })] })), L && a.jsx(qe, { className: "json-view--edit", style: { display: "inline-block" }, onClick: _ ? $ : H }), L && a.jsx(Be, { className: "json-view--edit", style: { display: "inline-block" }, onClick: U }), !b && !L && d && we(s) && a.jsx(xe, { node: e, nodeMeta: { depth: t, indexOrName: n, parent: o, parentPath: c, currentPath: l } }), !b && !L && It(S) && Pt(s) && a.jsx($t, { className: "json-view--edit", onClick: () => {
|
|
879
|
+
$();
|
|
880
|
+
} }), !b && !L && ze(S) && Ze(s) && r && a.jsx(Ye, { className: "json-view--edit", onClick: () => y(!0) }), typeof f == "function" ? a.jsx(f, { node: e }) : null] });
|
|
881
|
+
return a.jsxs(a.Fragment, { children: [a.jsx("span", { children: "[" }), F, b ? a.jsx("button", Object.assign({ onClick: () => m(!1), className: "jv-button" }, { children: "..." })) : a.jsx("div", Object.assign({ className: "jv-indent" }, { children: g.map((j, R) => a.jsx($r, { originNode: e, node: j, depth: t, index: R, startIndex: R * 100, deleteHandle: r, customOptions: s, parentPath: c }, String(n) + String(R))) })), a.jsx("span", { children: "]" }), b && ae(M, t, b) && a.jsxs("span", Object.assign({ onClick: () => m(!1), className: "jv-size" }, { children: [e.length, " Items"] }))] });
|
|
882
|
+
}
|
|
883
|
+
function Lr({ node: e, depth: t, indexOrName: r, deleteHandle: n, customOptions: s, parent: o, parentPath: c }) {
|
|
884
|
+
const { collapsed: l, onCollapse: g, enableClipboard: u, ignoreLargeArray: d, collapseObjectsAfterLength: v, editable: S, onDelete: T, src: O, onAdd: A, onEdit: f, onChange: N, forceUpdate: E, displaySize: M, CustomOperation: b } = te(ee), m = typeof r < "u" ? [...c, String(r)] : c;
|
|
817
885
|
if (!d && Array.isArray(e) && e.length > 100)
|
|
818
|
-
return a.jsx(
|
|
819
|
-
const
|
|
820
|
-
g?.({ isCollapsing: !
|
|
886
|
+
return a.jsx(Dr, { node: e, depth: t, indexOrName: r, deleteHandle: n, customOptions: s, parentPath: m });
|
|
887
|
+
const w = Q(e), [y, H] = P(st(e, t, r, l, v, s)), _ = (h) => {
|
|
888
|
+
g?.({ isCollapsing: !h, node: e, depth: t, indexOrName: r }), H(h);
|
|
821
889
|
};
|
|
822
890
|
Y(() => {
|
|
823
|
-
|
|
891
|
+
_(st(e, t, r, l, v, s));
|
|
824
892
|
}, [l, v]);
|
|
825
|
-
const
|
|
826
|
-
Array.isArray(e) ? e[+
|
|
827
|
-
newValue:
|
|
828
|
-
oldValue:
|
|
893
|
+
const C = K((h, k, q) => {
|
|
894
|
+
Array.isArray(e) ? e[+h] = k : e && (e[h] = k), f && f({
|
|
895
|
+
newValue: k,
|
|
896
|
+
oldValue: q,
|
|
829
897
|
depth: t,
|
|
830
|
-
src:
|
|
831
|
-
indexOrName:
|
|
832
|
-
parentType:
|
|
898
|
+
src: O,
|
|
899
|
+
indexOrName: h,
|
|
900
|
+
parentType: w ? "object" : "array",
|
|
833
901
|
parentPath: m
|
|
834
|
-
}),
|
|
835
|
-
}, [e, f,
|
|
836
|
-
Array.isArray(e) ? e.splice(+
|
|
837
|
-
}, [
|
|
838
|
-
|
|
902
|
+
}), N && N({ type: "edit", depth: t, src: O, indexOrName: h, parentType: w ? "object" : "array", parentPath: m }), E();
|
|
903
|
+
}, [e, f, N, E]), $ = (h) => {
|
|
904
|
+
Array.isArray(e) ? e.splice(+h, 1) : e && delete e[h], E();
|
|
905
|
+
}, [L, U] = P(!1), F = () => {
|
|
906
|
+
U(!1), n && n(r, m), T && T({ value: e, depth: t, src: O, indexOrName: r, parentType: w ? "object" : "array", parentPath: m }), N && N({
|
|
839
907
|
type: "delete",
|
|
840
908
|
depth: t,
|
|
841
|
-
src:
|
|
909
|
+
src: O,
|
|
842
910
|
indexOrName: r,
|
|
843
|
-
parentType:
|
|
911
|
+
parentType: w ? "object" : "array",
|
|
844
912
|
parentPath: m
|
|
845
913
|
});
|
|
846
|
-
}, [
|
|
847
|
-
var
|
|
848
|
-
if (
|
|
849
|
-
const
|
|
850
|
-
|
|
914
|
+
}, [j, R] = P(!1), I = V(null), z = () => {
|
|
915
|
+
var h;
|
|
916
|
+
if (w) {
|
|
917
|
+
const k = (h = I.current) === null || h === void 0 ? void 0 : h.value;
|
|
918
|
+
k && (e[k] = null, I.current && (I.current.value = ""), R(!1), A && A({ indexOrName: k, depth: t, src: O, parentType: "object", parentPath: m }), N && N({ type: "add", indexOrName: k, depth: t, src: O, parentType: "object", parentPath: m }));
|
|
851
919
|
} else if (Array.isArray(e)) {
|
|
852
|
-
const
|
|
853
|
-
|
|
920
|
+
const k = e;
|
|
921
|
+
k.push(null), A && A({ indexOrName: k.length - 1, depth: t, src: O, parentType: "array", parentPath: m }), N && N({ type: "add", indexOrName: k.length - 1, depth: t, src: O, parentType: "array", parentPath: m });
|
|
854
922
|
}
|
|
855
|
-
|
|
856
|
-
},
|
|
857
|
-
|
|
858
|
-
},
|
|
859
|
-
|
|
860
|
-
},
|
|
861
|
-
|
|
862
|
-
var
|
|
863
|
-
return (
|
|
864
|
-
})) :
|
|
865
|
-
} }), !y && !
|
|
866
|
-
return Array.isArray(e) ? a.jsxs(a.Fragment, { children: [a.jsx("span", { children: "[" }),
|
|
867
|
-
}
|
|
868
|
-
const
|
|
869
|
-
let { collapseStringMode:
|
|
923
|
+
E();
|
|
924
|
+
}, Z = (h) => {
|
|
925
|
+
h.key === "Enter" ? (h.preventDefault(), z()) : h.key === "Escape" && p();
|
|
926
|
+
}, i = L || j, p = () => {
|
|
927
|
+
U(!1), R(!1);
|
|
928
|
+
}, x = a.jsxs(a.Fragment, { children: [!y && !i && a.jsxs("span", Object.assign({ onClick: () => _(!0), className: "jv-size-chevron" }, { children: [ae(M, t, y) && a.jsxs("span", Object.assign({ className: "jv-size" }, { children: [ce(e), " Items"] })), a.jsx(Je, { className: "jv-chevron" })] })), j && w && a.jsx("input", { className: "json-view--input", placeholder: "property", ref: I, onKeyDown: Z }), i && a.jsx(qe, { className: "json-view--edit", style: { display: "inline-block" }, onClick: j ? z : F }), i && a.jsx(Be, { className: "json-view--edit", style: { display: "inline-block" }, onClick: p }), !y && !i && u && we(s) && a.jsx(xe, { node: e, nodeMeta: { depth: t, indexOrName: r, parent: o, parentPath: c, currentPath: m } }), !y && !i && It(S) && Pt(s) && a.jsx($t, { className: "json-view--edit", onClick: () => {
|
|
929
|
+
w ? (R(!0), setTimeout(() => {
|
|
930
|
+
var h;
|
|
931
|
+
return (h = I.current) === null || h === void 0 ? void 0 : h.focus();
|
|
932
|
+
})) : z();
|
|
933
|
+
} }), !y && !i && ze(S) && Ze(s) && n && a.jsx(Ye, { className: "json-view--edit", onClick: () => U(!0) }), typeof b == "function" ? a.jsx(b, { node: e }) : null] });
|
|
934
|
+
return Array.isArray(e) ? a.jsxs(a.Fragment, { children: [a.jsx("span", { children: "[" }), x, y ? a.jsx("button", Object.assign({ onClick: () => _(!1), className: "jv-button" }, { children: "..." })) : a.jsx("div", Object.assign({ className: "jv-indent" }, { children: e.map((h, k) => a.jsx(Ie, { indexOrName: k, value: h, depth: t, parent: e, deleteHandle: $, editHandle: C, parentPath: m }, String(r) + String(k))) })), a.jsx("span", { children: "]" }), y && ae(M, t, y) && a.jsxs("span", Object.assign({ onClick: () => _(!1), className: "jv-size" }, { children: [ce(e), " Items"] }))] }) : w ? a.jsxs(a.Fragment, { children: [a.jsx("span", { children: "{" }), x, y ? a.jsx("button", Object.assign({ onClick: () => _(!1), className: "jv-button" }, { children: "..." })) : a.jsx("div", Object.assign({ className: "jv-indent" }, { children: Object.entries(e).map(([h, k]) => a.jsx(Ie, { indexOrName: h, value: k, depth: t, parent: e, deleteHandle: $, editHandle: C, parentPath: m }, String(r) + String(h))) })), a.jsx("span", { children: "}" }), y && ae(M, t, y) && a.jsxs("span", Object.assign({ onClick: () => _(!1), className: "jv-size" }, { children: [ce(e), " Items"] }))] }) : a.jsx("span", { children: String(e) });
|
|
935
|
+
}
|
|
936
|
+
const Vr = W.forwardRef(({ str: e, className: t, ctrlClick: r }, n) => {
|
|
937
|
+
let { collapseStringMode: s, collapseStringsAfterLength: o, customizeCollapseStringUI: c } = te(ee);
|
|
870
938
|
const [l, g] = P(!0), u = V(null);
|
|
871
|
-
|
|
872
|
-
const d = e.replace(/\s+/g, " "), v = typeof c == "function" ? c(d, l) : typeof c == "string" ? c : "...",
|
|
873
|
-
var
|
|
874
|
-
if ((
|
|
875
|
-
r(
|
|
939
|
+
o = o > 0 ? o : 0;
|
|
940
|
+
const d = e.replace(/\s+/g, " "), v = typeof c == "function" ? c(d, l) : typeof c == "string" ? c : "...", S = (T) => {
|
|
941
|
+
var O;
|
|
942
|
+
if ((T.ctrlKey || T.metaKey) && r)
|
|
943
|
+
r(T);
|
|
876
944
|
else {
|
|
877
|
-
const
|
|
878
|
-
if (
|
|
945
|
+
const A = window.getSelection();
|
|
946
|
+
if (A && A.anchorOffset !== A.focusOffset && ((O = A.anchorNode) === null || O === void 0 ? void 0 : O.parentElement) === u.current)
|
|
879
947
|
return;
|
|
880
948
|
g(!l);
|
|
881
949
|
}
|
|
882
950
|
};
|
|
883
|
-
if (e.length <=
|
|
951
|
+
if (e.length <= o)
|
|
884
952
|
return a.jsxs("span", Object.assign({ ref: u, className: t, onClick: r }, { children: ['"', e, '"'] }));
|
|
885
|
-
if (
|
|
886
|
-
return e.length <= 10 ? a.jsxs("span", Object.assign({ ref: u, className: t, onClick: r }, { children: ['"', e, '"'] })) : a.jsxs("span", Object.assign({ ref: u, onClick:
|
|
887
|
-
if (
|
|
888
|
-
return a.jsxs("span", Object.assign({ ref: u, onClick:
|
|
889
|
-
if (
|
|
890
|
-
let
|
|
953
|
+
if (s === "address")
|
|
954
|
+
return e.length <= 10 ? a.jsxs("span", Object.assign({ ref: u, className: t, onClick: r }, { children: ['"', e, '"'] })) : a.jsxs("span", Object.assign({ ref: u, onClick: S, className: t + " cursor-pointer" }, { children: ['"', l ? [d.slice(0, 6), v, d.slice(-4)] : e, '"'] }));
|
|
955
|
+
if (s === "directly")
|
|
956
|
+
return a.jsxs("span", Object.assign({ ref: u, onClick: S, className: t + " cursor-pointer" }, { children: ['"', l ? [d.slice(0, o), v] : e, '"'] }));
|
|
957
|
+
if (s === "word") {
|
|
958
|
+
let T = o, O = o + 1, A = d, f = 1;
|
|
891
959
|
for (; ; ) {
|
|
892
|
-
if (/\W/.test(e[
|
|
893
|
-
|
|
960
|
+
if (/\W/.test(e[T])) {
|
|
961
|
+
A = e.slice(0, T);
|
|
894
962
|
break;
|
|
895
963
|
}
|
|
896
|
-
if (/\W/.test(e[
|
|
897
|
-
|
|
964
|
+
if (/\W/.test(e[O])) {
|
|
965
|
+
A = e.slice(0, O);
|
|
898
966
|
break;
|
|
899
967
|
}
|
|
900
968
|
if (f === 6) {
|
|
901
|
-
|
|
969
|
+
A = e.slice(0, o);
|
|
902
970
|
break;
|
|
903
971
|
}
|
|
904
|
-
f++,
|
|
972
|
+
f++, T--, O++;
|
|
905
973
|
}
|
|
906
|
-
return a.jsxs("span", Object.assign({ ref: u, onClick:
|
|
974
|
+
return a.jsxs("span", Object.assign({ ref: u, onClick: S, className: t + " cursor-pointer" }, { children: ['"', l ? [A, v] : e, '"'] }));
|
|
907
975
|
}
|
|
908
976
|
return a.jsxs("span", Object.assign({ ref: u, className: t }, { children: ['"', e, '"'] }));
|
|
909
977
|
});
|
|
910
|
-
var
|
|
911
|
-
function
|
|
912
|
-
return
|
|
978
|
+
var wt;
|
|
979
|
+
function Ve() {
|
|
980
|
+
return Ve = Object.assign ? Object.assign.bind() : function(e) {
|
|
913
981
|
for (var t = 1; t < arguments.length; t++) {
|
|
914
982
|
var r = arguments[t];
|
|
915
983
|
for (var n in r)
|
|
916
984
|
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
917
985
|
}
|
|
918
986
|
return e;
|
|
919
|
-
},
|
|
987
|
+
}, Ve.apply(this, arguments);
|
|
920
988
|
}
|
|
921
|
-
var
|
|
922
|
-
return /* @__PURE__ */
|
|
989
|
+
var Hr = function(t) {
|
|
990
|
+
return /* @__PURE__ */ D.createElement("svg", Ve({
|
|
923
991
|
xmlns: "http://www.w3.org/2000/svg",
|
|
924
992
|
width: 24,
|
|
925
993
|
height: 24,
|
|
926
994
|
fill: "none",
|
|
927
995
|
viewBox: "0 0 24 24"
|
|
928
|
-
}, t),
|
|
996
|
+
}, t), wt || (wt = /* @__PURE__ */ D.createElement("path", {
|
|
929
997
|
fill: "currentColor",
|
|
930
998
|
d: "M17.25 3H6.75A3.754 3.754 0 0 0 3 6.75v10.5A3.754 3.754 0 0 0 6.75 21h10.5A3.754 3.754 0 0 0 21 17.25V6.75A3.754 3.754 0 0 0 17.25 3Zm2.25 14.25c0 1.24-1.01 2.25-2.25 2.25H6.75c-1.24 0-2.25-1.01-2.25-2.25V6.75c0-1.24 1.01-2.25 2.25-2.25h10.5c1.24 0 2.25 1.01 2.25 2.25v10.5Zm-6.09-9.466-5.031 5.03a2.981 2.981 0 0 0-.879 2.121v1.19c0 .415.336.75.75.75h1.19c.8 0 1.554-.312 2.12-.879l5.03-5.03a2.252 2.252 0 0 0 0-3.182c-.85-.85-2.331-.85-3.18 0Zm-2.91 7.151c-.28.28-.666.44-1.06.44H9v-.44c0-.4.156-.777.44-1.06l3.187-3.188 1.06 1.061-3.187 3.188Zm5.03-5.03-.782.783-1.06-1.061.782-.782a.766.766 0 0 1 1.06 0 .75.75 0 0 1 0 1.06Z"
|
|
931
999
|
})));
|
|
932
|
-
},
|
|
933
|
-
function
|
|
934
|
-
return
|
|
1000
|
+
}, xt, Ct;
|
|
1001
|
+
function He() {
|
|
1002
|
+
return He = Object.assign ? Object.assign.bind() : function(e) {
|
|
935
1003
|
for (var t = 1; t < arguments.length; t++) {
|
|
936
1004
|
var r = arguments[t];
|
|
937
1005
|
for (var n in r)
|
|
938
1006
|
Object.prototype.hasOwnProperty.call(r, n) && (e[n] = r[n]);
|
|
939
1007
|
}
|
|
940
1008
|
return e;
|
|
941
|
-
},
|
|
1009
|
+
}, He.apply(this, arguments);
|
|
942
1010
|
}
|
|
943
|
-
var
|
|
944
|
-
return /* @__PURE__ */
|
|
1011
|
+
var Fr = function(t) {
|
|
1012
|
+
return /* @__PURE__ */ D.createElement("svg", He({
|
|
945
1013
|
xmlns: "http://www.w3.org/2000/svg",
|
|
946
1014
|
width: 24,
|
|
947
1015
|
height: 24,
|
|
948
1016
|
fill: "none",
|
|
949
1017
|
viewBox: "0 0 24 24"
|
|
950
|
-
}, t),
|
|
1018
|
+
}, t), xt || (xt = /* @__PURE__ */ D.createElement("path", {
|
|
951
1019
|
fill: "currentColor",
|
|
952
1020
|
d: "M6.75 3h5.5v1.5h-5.5C5.51 4.5 4.5 5.51 4.5 6.75v10.5c0 1.24 1.01 2.25 2.25 2.25h10.5c1.24 0 2.25-1.01 2.25-2.25v-5.5H21v5.5A3.754 3.754 0 0 1 17.25 21H6.75A3.754 3.754 0 0 1 3 17.25V6.75A3.754 3.754 0 0 1 6.75 3Z"
|
|
953
|
-
})),
|
|
1021
|
+
})), Ct || (Ct = /* @__PURE__ */ D.createElement("path", {
|
|
954
1022
|
fill: "currentColor",
|
|
955
1023
|
d: "M20.013 3h-3.946a.987.987 0 0 0 0 1.973h1.564l-6.342 6.342a1.004 1.004 0 0 0 0 1.396 1.004 1.004 0 0 0 1.396 0l6.342-6.342v1.564a.987.987 0 0 0 1.973 0V3.987A.987.987 0 0 0 20.013 3Z"
|
|
956
1024
|
})));
|
|
957
1025
|
};
|
|
958
|
-
function
|
|
959
|
-
const { collapseStringsAfterLength: l, enableClipboard: g, editable: u, src: d, onDelete: v, onChange:
|
|
960
|
-
let
|
|
961
|
-
if (typeof
|
|
962
|
-
if (
|
|
963
|
-
return
|
|
964
|
-
if (_r(
|
|
965
|
-
const m =
|
|
1026
|
+
function Dt({ node: e, depth: t, deleteHandle: r, indexOrName: n, parent: s, editHandle: o, parentPath: c }) {
|
|
1027
|
+
const { collapseStringsAfterLength: l, enableClipboard: g, editable: u, src: d, onDelete: v, onChange: S, customizeNode: T, matchesURL: O, urlRegExp: A, EditComponent: f, DoneComponent: N, CancelComponent: E, CustomOperation: M } = te(ee);
|
|
1028
|
+
let b;
|
|
1029
|
+
if (typeof T == "function" && (b = Ue(T, [{ node: e, depth: t, indexOrName: n }])), b) {
|
|
1030
|
+
if (qt(b))
|
|
1031
|
+
return b;
|
|
1032
|
+
if (_r(b)) {
|
|
1033
|
+
const m = b;
|
|
966
1034
|
return a.jsx(m, { node: e, depth: t, indexOrName: n });
|
|
967
1035
|
}
|
|
968
1036
|
}
|
|
969
1037
|
if (Array.isArray(e) || Q(e))
|
|
970
|
-
return a.jsx(
|
|
1038
|
+
return a.jsx(Lr, { parent: s, node: e, depth: t, indexOrName: n, deleteHandle: r, parentPath: c, customOptions: typeof b == "object" ? b : void 0 });
|
|
971
1039
|
{
|
|
972
|
-
const m = typeof e,
|
|
973
|
-
|
|
974
|
-
var
|
|
975
|
-
(
|
|
1040
|
+
const m = typeof e, w = typeof n < "u" ? [...c, String(n)] : c, [y, H] = P(!1), [_, C] = P(!1), $ = V(null), L = () => {
|
|
1041
|
+
H(!0), setTimeout(() => {
|
|
1042
|
+
var h, k;
|
|
1043
|
+
(h = window.getSelection()) === null || h === void 0 || h.selectAllChildren($.current), (k = $.current) === null || k === void 0 || k.focus();
|
|
976
1044
|
});
|
|
977
|
-
},
|
|
978
|
-
let
|
|
1045
|
+
}, U = K(() => {
|
|
1046
|
+
let h = $.current.innerText;
|
|
979
1047
|
try {
|
|
980
|
-
const
|
|
981
|
-
|
|
1048
|
+
const k = JSON.parse(h);
|
|
1049
|
+
o && o(n, k, e, c);
|
|
982
1050
|
} catch {
|
|
983
|
-
const
|
|
984
|
-
|
|
1051
|
+
const q = Mr(m, h);
|
|
1052
|
+
o && o(n, q, e, c);
|
|
985
1053
|
}
|
|
986
|
-
|
|
987
|
-
}, [
|
|
988
|
-
|
|
989
|
-
},
|
|
990
|
-
|
|
1054
|
+
H(!1);
|
|
1055
|
+
}, [o, n, e, c, m]), F = () => {
|
|
1056
|
+
H(!1), C(!1);
|
|
1057
|
+
}, j = () => {
|
|
1058
|
+
C(!1), r && r(n, c), v && v({
|
|
991
1059
|
value: e,
|
|
992
1060
|
depth: t,
|
|
993
1061
|
src: d,
|
|
994
1062
|
indexOrName: n,
|
|
995
|
-
parentType: Array.isArray(
|
|
1063
|
+
parentType: Array.isArray(s) ? "array" : "object",
|
|
996
1064
|
parentPath: c
|
|
997
|
-
}),
|
|
1065
|
+
}), S && S({
|
|
998
1066
|
depth: t,
|
|
999
1067
|
src: d,
|
|
1000
1068
|
indexOrName: n,
|
|
1001
|
-
parentType: Array.isArray(
|
|
1069
|
+
parentType: Array.isArray(s) ? "array" : "object",
|
|
1002
1070
|
type: "delete",
|
|
1003
1071
|
parentPath: c
|
|
1004
1072
|
});
|
|
1005
|
-
},
|
|
1006
|
-
|
|
1007
|
-
}, [
|
|
1008
|
-
(
|
|
1009
|
-
} : void 0,
|
|
1010
|
-
let
|
|
1073
|
+
}, R = K((h) => {
|
|
1074
|
+
h.key === "Enter" ? (h.preventDefault(), U()) : h.key === "Escape" && F();
|
|
1075
|
+
}, [U]), I = y || _, z = !I && it(u) && ct(b) && o ? (h) => {
|
|
1076
|
+
(h.ctrlKey || h.metaKey) && L();
|
|
1077
|
+
} : void 0, Z = a.jsxs(a.Fragment, { children: [I && (typeof N == "function" ? a.jsx(N, { className: "json-view--edit", style: { display: "inline-block" }, onClick: _ ? j : U }) : a.jsx(qe, { className: "json-view--edit", style: { display: "inline-block" }, onClick: _ ? j : U })), I && (typeof E == "function" ? a.jsx(E, { className: "json-view--edit", style: { display: "inline-block" }, onClick: F }) : a.jsx(Be, { className: "json-view--edit", style: { display: "inline-block" }, onClick: F })), !I && g && we(b) && a.jsx(xe, { node: e, nodeMeta: { depth: t, indexOrName: n, parent: s, parentPath: c, currentPath: w } }), !I && O && m === "string" && A.test(e) && Rr(b) && a.jsx("a", Object.assign({ href: e, target: "_blank", className: "json-view--link" }, { children: a.jsx(Fr, {}) })), !I && it(u) && ct(b) && o && (typeof f == "function" ? a.jsx(f, { className: "json-view--edit", onClick: L }) : a.jsx(Hr, { className: "json-view--edit", onClick: L })), !I && ze(u) && Ze(b) && r && a.jsx(Ye, { className: "json-view--edit", onClick: () => C(!0) }), typeof M == "function" ? a.jsx(M, { node: e }) : null] });
|
|
1078
|
+
let i = "json-view--string";
|
|
1011
1079
|
switch (m) {
|
|
1012
1080
|
case "number":
|
|
1013
1081
|
case "bigint":
|
|
1014
|
-
|
|
1082
|
+
i = "json-view--number";
|
|
1015
1083
|
break;
|
|
1016
1084
|
case "boolean":
|
|
1017
|
-
|
|
1085
|
+
i = "json-view--boolean";
|
|
1018
1086
|
break;
|
|
1019
1087
|
case "object":
|
|
1020
|
-
|
|
1088
|
+
i = "json-view--null";
|
|
1021
1089
|
break;
|
|
1022
1090
|
}
|
|
1023
|
-
typeof
|
|
1024
|
-
let
|
|
1025
|
-
m === "bigint" && (
|
|
1026
|
-
const
|
|
1027
|
-
return m === "string" ? a.jsxs(a.Fragment, { children: [y ?
|
|
1091
|
+
typeof b?.className == "string" && (i += " " + b.className), _ && (i += " json-view--deleting");
|
|
1092
|
+
let p = String(e);
|
|
1093
|
+
m === "bigint" && (p += "n");
|
|
1094
|
+
const x = ue(() => a.jsx("span", { contentEditable: !0, className: i, dangerouslySetInnerHTML: { __html: m === "string" ? `"${p}"` : p }, ref: $, onKeyDown: R }), [p, m, R]);
|
|
1095
|
+
return m === "string" ? a.jsxs(a.Fragment, { children: [y ? x : e.length > l ? a.jsx(Vr, { str: e, ref: $, className: i, ctrlClick: z }) : a.jsxs("span", Object.assign({ className: i, onClick: z }, { children: ['"', p, '"'] })), Z] }) : a.jsxs(a.Fragment, { children: [y ? x : a.jsx("span", Object.assign({ className: i, onClick: z }, { children: p })), Z] });
|
|
1028
1096
|
}
|
|
1029
1097
|
}
|
|
1030
|
-
const
|
|
1098
|
+
const Lt = /^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^&*?.\s])?\.)+[a-z]{2,6}\/?/, ee = Yt({
|
|
1031
1099
|
src: void 0,
|
|
1032
1100
|
collapseStringsAfterLength: 99,
|
|
1033
1101
|
collapseStringMode: "directly",
|
|
@@ -1044,12 +1112,12 @@ const Dt = /^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^
|
|
|
1044
1112
|
forceUpdate: () => {
|
|
1045
1113
|
},
|
|
1046
1114
|
customizeNode: void 0,
|
|
1047
|
-
customizeCopy: (
|
|
1048
|
-
}
|
|
1115
|
+
customizeCopy: () => {
|
|
1116
|
+
},
|
|
1049
1117
|
displaySize: void 0,
|
|
1050
1118
|
displayArrayIndex: !0,
|
|
1051
1119
|
matchesURL: !1,
|
|
1052
|
-
urlRegExp:
|
|
1120
|
+
urlRegExp: Lt,
|
|
1053
1121
|
ignoreLargeArray: !1,
|
|
1054
1122
|
CopyComponent: void 0,
|
|
1055
1123
|
CopiedComponent: void 0,
|
|
@@ -1058,73 +1126,97 @@ const Dt = /^(((ht|f)tps?):\/\/)?([^!@#$%^&*?.\s-]([^!@#$%^&*?.\s]{0,63}[^!@#$%^
|
|
|
1058
1126
|
DoneComponent: void 0,
|
|
1059
1127
|
CustomOperation: void 0
|
|
1060
1128
|
});
|
|
1061
|
-
function
|
|
1062
|
-
const [
|
|
1063
|
-
return Y(() =>
|
|
1064
|
-
src:
|
|
1129
|
+
function Ur({ src: e, collapseStringsAfterLength: t = 99, collapseStringMode: r = "directly", customizeCollapseStringUI: n, collapseObjectsAfterLength: s = 99, collapsed: o, onCollapse: c, enableClipboard: l = !0, editable: g = !1, onEdit: u, onDelete: d, onAdd: v, onChange: S, dark: T = !1, theme: O = "default", customizeNode: A, customizeCopy: f = (F) => Nr(F), displaySize: N, displayArrayIndex: E = !0, style: M, className: b, matchesURL: m = !1, urlRegExp: w = Lt, ignoreLargeArray: y = !1, CopyComponent: H, CopiedComponent: _, EditComponent: C, CancelComponent: $, DoneComponent: L, CustomOperation: U }) {
|
|
1130
|
+
const [F, j] = P(0), R = K(() => j((Z) => ++Z), []), [I, z] = P(e);
|
|
1131
|
+
return Y(() => z(e), [e]), a.jsx(ee.Provider, Object.assign({ value: {
|
|
1132
|
+
src: I,
|
|
1065
1133
|
collapseStringsAfterLength: t,
|
|
1066
1134
|
collapseStringMode: r,
|
|
1067
1135
|
customizeCollapseStringUI: n,
|
|
1068
|
-
collapseObjectsAfterLength:
|
|
1069
|
-
collapsed:
|
|
1136
|
+
collapseObjectsAfterLength: s,
|
|
1137
|
+
collapsed: o,
|
|
1070
1138
|
onCollapse: c,
|
|
1071
1139
|
enableClipboard: l,
|
|
1072
1140
|
editable: g,
|
|
1073
1141
|
onEdit: u,
|
|
1074
1142
|
onDelete: d,
|
|
1075
1143
|
onAdd: v,
|
|
1076
|
-
onChange:
|
|
1077
|
-
forceUpdate:
|
|
1078
|
-
customizeNode:
|
|
1144
|
+
onChange: S,
|
|
1145
|
+
forceUpdate: R,
|
|
1146
|
+
customizeNode: A,
|
|
1079
1147
|
customizeCopy: f,
|
|
1080
|
-
displaySize:
|
|
1081
|
-
displayArrayIndex:
|
|
1148
|
+
displaySize: N,
|
|
1149
|
+
displayArrayIndex: E,
|
|
1082
1150
|
matchesURL: m,
|
|
1083
|
-
urlRegExp:
|
|
1151
|
+
urlRegExp: w,
|
|
1084
1152
|
ignoreLargeArray: y,
|
|
1085
|
-
CopyComponent:
|
|
1086
|
-
CopiedComponent:
|
|
1087
|
-
EditComponent:
|
|
1088
|
-
CancelComponent:
|
|
1089
|
-
DoneComponent:
|
|
1090
|
-
CustomOperation:
|
|
1091
|
-
} }, { children: a.jsx("code", Object.assign({ className: "json-view" + (
|
|
1092
|
-
|
|
1093
|
-
newValue:
|
|
1094
|
-
oldValue:
|
|
1153
|
+
CopyComponent: H,
|
|
1154
|
+
CopiedComponent: _,
|
|
1155
|
+
EditComponent: C,
|
|
1156
|
+
CancelComponent: $,
|
|
1157
|
+
DoneComponent: L,
|
|
1158
|
+
CustomOperation: U
|
|
1159
|
+
} }, { children: a.jsx("code", Object.assign({ className: "json-view" + (T ? " dark" : "") + (O && O !== "default" ? " json-view_" + O : "") + (b ? " " + b : ""), style: M }, { children: a.jsx(Dt, { node: I, depth: 1, editHandle: (Z, i, p, x) => {
|
|
1160
|
+
z(i), u && u({
|
|
1161
|
+
newValue: i,
|
|
1162
|
+
oldValue: p,
|
|
1095
1163
|
depth: 1,
|
|
1096
|
-
src:
|
|
1097
|
-
indexOrName:
|
|
1164
|
+
src: I,
|
|
1165
|
+
indexOrName: Z,
|
|
1098
1166
|
parentType: null,
|
|
1099
|
-
parentPath:
|
|
1100
|
-
}),
|
|
1101
|
-
}, deleteHandle: (
|
|
1102
|
-
|
|
1103
|
-
value:
|
|
1167
|
+
parentPath: x
|
|
1168
|
+
}), S && S({ type: "edit", depth: 1, src: I, indexOrName: Z, parentType: null, parentPath: x });
|
|
1169
|
+
}, deleteHandle: (Z, i) => {
|
|
1170
|
+
z(void 0), d && d({
|
|
1171
|
+
value: I,
|
|
1104
1172
|
depth: 1,
|
|
1105
|
-
src:
|
|
1106
|
-
indexOrName:
|
|
1173
|
+
src: I,
|
|
1174
|
+
indexOrName: Z,
|
|
1107
1175
|
parentType: null,
|
|
1108
|
-
parentPath:
|
|
1109
|
-
}),
|
|
1176
|
+
parentPath: i
|
|
1177
|
+
}), S && S({
|
|
1110
1178
|
depth: 1,
|
|
1111
|
-
src:
|
|
1112
|
-
indexOrName:
|
|
1179
|
+
src: I,
|
|
1180
|
+
indexOrName: Z,
|
|
1113
1181
|
parentType: null,
|
|
1114
1182
|
type: "delete",
|
|
1115
|
-
parentPath:
|
|
1183
|
+
parentPath: i
|
|
1116
1184
|
});
|
|
1117
1185
|
}, parentPath: [] }) })) }));
|
|
1118
1186
|
}
|
|
1119
|
-
const
|
|
1120
|
-
|
|
1187
|
+
const zr = ({ state: e }) => /* @__PURE__ */ a.jsx(Ur, { src: e.value, theme: "default" });
|
|
1188
|
+
/**
|
|
1189
|
+
* @license lucide-react v0.545.0 - ISC
|
|
1190
|
+
*
|
|
1191
|
+
* This source code is licensed under the ISC license.
|
|
1192
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1193
|
+
*/
|
|
1194
|
+
const Zr = [
|
|
1121
1195
|
["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
|
|
1122
1196
|
["line", { x1: "12", x2: "12", y1: "8", y2: "12", key: "1pkeuh" }],
|
|
1123
1197
|
["line", { x1: "12", x2: "12.01", y1: "16", y2: "16", key: "4dfq90" }]
|
|
1124
|
-
],
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1198
|
+
], St = X("circle-alert", Zr);
|
|
1199
|
+
/**
|
|
1200
|
+
* @license lucide-react v0.545.0 - ISC
|
|
1201
|
+
*
|
|
1202
|
+
* This source code is licensed under the ISC license.
|
|
1203
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1204
|
+
*/
|
|
1205
|
+
const Jr = [["path", { d: "M20 6 9 17l-5-5", key: "1gmf2c" }]], Yr = X("check", Jr);
|
|
1206
|
+
/**
|
|
1207
|
+
* @license lucide-react v0.545.0 - ISC
|
|
1208
|
+
*
|
|
1209
|
+
* This source code is licensed under the ISC license.
|
|
1210
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1211
|
+
*/
|
|
1212
|
+
const qr = [["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]], Br = X("loader-circle", qr);
|
|
1213
|
+
/**
|
|
1214
|
+
* @license lucide-react v0.545.0 - ISC
|
|
1215
|
+
*
|
|
1216
|
+
* This source code is licensed under the ISC license.
|
|
1217
|
+
* See the LICENSE file in the root directory of this source tree.
|
|
1218
|
+
*/
|
|
1219
|
+
const Wr = [
|
|
1128
1220
|
[
|
|
1129
1221
|
"path",
|
|
1130
1222
|
{
|
|
@@ -1134,107 +1226,93 @@ const Br = [
|
|
|
1134
1226
|
],
|
|
1135
1227
|
["path", { d: "M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7", key: "1ydtos" }],
|
|
1136
1228
|
["path", { d: "M7 3v4a1 1 0 0 0 1 1h7", key: "t51u73" }]
|
|
1137
|
-
],
|
|
1138
|
-
function St(e, t) {
|
|
1139
|
-
(t == null || t > e.length) && (t = e.length);
|
|
1140
|
-
for (var r = 0, n = Array(t); r < t; r++) n[r] = e[r];
|
|
1141
|
-
return n;
|
|
1142
|
-
}
|
|
1143
|
-
function Kr(e) {
|
|
1144
|
-
if (Array.isArray(e)) return e;
|
|
1145
|
-
}
|
|
1229
|
+
], Kr = X("save", Wr);
|
|
1146
1230
|
function Gr(e, t, r) {
|
|
1147
|
-
return
|
|
1231
|
+
return t in e ? Object.defineProperty(e, t, {
|
|
1148
1232
|
value: r,
|
|
1149
1233
|
enumerable: !0,
|
|
1150
1234
|
configurable: !0,
|
|
1151
1235
|
writable: !0
|
|
1152
1236
|
}) : e[t] = r, e;
|
|
1153
1237
|
}
|
|
1154
|
-
function
|
|
1155
|
-
var r = e == null ? null : typeof Symbol < "u" && e[Symbol.iterator] || e["@@iterator"];
|
|
1156
|
-
if (r != null) {
|
|
1157
|
-
var n, o, i, c, l = [], g = !0, u = !1;
|
|
1158
|
-
try {
|
|
1159
|
-
if (i = (r = r.call(e)).next, t !== 0) for (; !(g = (n = i.call(r)).done) && (l.push(n.value), l.length !== t); g = !0) ;
|
|
1160
|
-
} catch (d) {
|
|
1161
|
-
u = !0, o = d;
|
|
1162
|
-
} finally {
|
|
1163
|
-
try {
|
|
1164
|
-
if (!g && r.return != null && (c = r.return(), Object(c) !== c)) return;
|
|
1165
|
-
} finally {
|
|
1166
|
-
if (u) throw o;
|
|
1167
|
-
}
|
|
1168
|
-
}
|
|
1169
|
-
return l;
|
|
1170
|
-
}
|
|
1171
|
-
}
|
|
1172
|
-
function Qr() {
|
|
1173
|
-
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1174
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1175
|
-
}
|
|
1176
|
-
function Et(e, t) {
|
|
1238
|
+
function Ot(e, t) {
|
|
1177
1239
|
var r = Object.keys(e);
|
|
1178
1240
|
if (Object.getOwnPropertySymbols) {
|
|
1179
1241
|
var n = Object.getOwnPropertySymbols(e);
|
|
1180
|
-
t && (n = n.filter(function(
|
|
1181
|
-
return Object.getOwnPropertyDescriptor(e,
|
|
1242
|
+
t && (n = n.filter(function(s) {
|
|
1243
|
+
return Object.getOwnPropertyDescriptor(e, s).enumerable;
|
|
1182
1244
|
})), r.push.apply(r, n);
|
|
1183
1245
|
}
|
|
1184
1246
|
return r;
|
|
1185
1247
|
}
|
|
1186
|
-
function
|
|
1248
|
+
function Et(e) {
|
|
1187
1249
|
for (var t = 1; t < arguments.length; t++) {
|
|
1188
1250
|
var r = arguments[t] != null ? arguments[t] : {};
|
|
1189
|
-
t % 2 ?
|
|
1251
|
+
t % 2 ? Ot(Object(r), !0).forEach(function(n) {
|
|
1190
1252
|
Gr(e, n, r[n]);
|
|
1191
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) :
|
|
1253
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : Ot(Object(r)).forEach(function(n) {
|
|
1192
1254
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1193
1255
|
});
|
|
1194
1256
|
}
|
|
1195
1257
|
return e;
|
|
1196
1258
|
}
|
|
1197
|
-
function
|
|
1259
|
+
function Xr(e, t) {
|
|
1198
1260
|
if (e == null) return {};
|
|
1199
|
-
var r, n
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
}
|
|
1204
|
-
return o;
|
|
1261
|
+
var r = {}, n = Object.keys(e), s, o;
|
|
1262
|
+
for (o = 0; o < n.length; o++)
|
|
1263
|
+
s = n[o], !(t.indexOf(s) >= 0) && (r[s] = e[s]);
|
|
1264
|
+
return r;
|
|
1205
1265
|
}
|
|
1206
|
-
function
|
|
1266
|
+
function Qr(e, t) {
|
|
1207
1267
|
if (e == null) return {};
|
|
1208
|
-
var r =
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1268
|
+
var r = Xr(e, t), n, s;
|
|
1269
|
+
if (Object.getOwnPropertySymbols) {
|
|
1270
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
1271
|
+
for (s = 0; s < o.length; s++)
|
|
1272
|
+
n = o[s], !(t.indexOf(n) >= 0) && Object.prototype.propertyIsEnumerable.call(e, n) && (r[n] = e[n]);
|
|
1212
1273
|
}
|
|
1213
1274
|
return r;
|
|
1214
1275
|
}
|
|
1276
|
+
function en(e, t) {
|
|
1277
|
+
return tn(e) || rn(e, t) || nn(e, t) || an();
|
|
1278
|
+
}
|
|
1279
|
+
function tn(e) {
|
|
1280
|
+
if (Array.isArray(e)) return e;
|
|
1281
|
+
}
|
|
1215
1282
|
function rn(e, t) {
|
|
1216
|
-
|
|
1283
|
+
if (!(typeof Symbol > "u" || !(Symbol.iterator in Object(e)))) {
|
|
1284
|
+
var r = [], n = !0, s = !1, o = void 0;
|
|
1285
|
+
try {
|
|
1286
|
+
for (var c = e[Symbol.iterator](), l; !(n = (l = c.next()).done) && (r.push(l.value), !(t && r.length === t)); n = !0)
|
|
1287
|
+
;
|
|
1288
|
+
} catch (g) {
|
|
1289
|
+
s = !0, o = g;
|
|
1290
|
+
} finally {
|
|
1291
|
+
try {
|
|
1292
|
+
!n && c.return != null && c.return();
|
|
1293
|
+
} finally {
|
|
1294
|
+
if (s) throw o;
|
|
1295
|
+
}
|
|
1296
|
+
}
|
|
1297
|
+
return r;
|
|
1298
|
+
}
|
|
1217
1299
|
}
|
|
1218
1300
|
function nn(e, t) {
|
|
1219
|
-
if (
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
if (
|
|
1224
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
1301
|
+
if (e) {
|
|
1302
|
+
if (typeof e == "string") return kt(e, t);
|
|
1303
|
+
var r = Object.prototype.toString.call(e).slice(8, -1);
|
|
1304
|
+
if (r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set") return Array.from(e);
|
|
1305
|
+
if (r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)) return kt(e, t);
|
|
1225
1306
|
}
|
|
1226
|
-
return (t === "string" ? String : Number)(e);
|
|
1227
1307
|
}
|
|
1228
|
-
function
|
|
1229
|
-
|
|
1230
|
-
|
|
1308
|
+
function kt(e, t) {
|
|
1309
|
+
(t == null || t > e.length) && (t = e.length);
|
|
1310
|
+
for (var r = 0, n = new Array(t); r < t; r++) n[r] = e[r];
|
|
1311
|
+
return n;
|
|
1231
1312
|
}
|
|
1232
|
-
function
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
var r = {}.toString.call(e).slice(8, -1);
|
|
1236
|
-
return r === "Object" && e.constructor && (r = e.constructor.name), r === "Map" || r === "Set" ? Array.from(e) : r === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? St(e, t) : void 0;
|
|
1237
|
-
}
|
|
1313
|
+
function an() {
|
|
1314
|
+
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1315
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1238
1316
|
}
|
|
1239
1317
|
function sn(e, t, r) {
|
|
1240
1318
|
return t in e ? Object.defineProperty(e, t, {
|
|
@@ -1244,79 +1322,79 @@ function sn(e, t, r) {
|
|
|
1244
1322
|
writable: !0
|
|
1245
1323
|
}) : e[t] = r, e;
|
|
1246
1324
|
}
|
|
1247
|
-
function
|
|
1325
|
+
function At(e, t) {
|
|
1248
1326
|
var r = Object.keys(e);
|
|
1249
1327
|
if (Object.getOwnPropertySymbols) {
|
|
1250
1328
|
var n = Object.getOwnPropertySymbols(e);
|
|
1251
|
-
t && (n = n.filter(function(
|
|
1252
|
-
return Object.getOwnPropertyDescriptor(e,
|
|
1329
|
+
t && (n = n.filter(function(s) {
|
|
1330
|
+
return Object.getOwnPropertyDescriptor(e, s).enumerable;
|
|
1253
1331
|
})), r.push.apply(r, n);
|
|
1254
1332
|
}
|
|
1255
1333
|
return r;
|
|
1256
1334
|
}
|
|
1257
|
-
function
|
|
1335
|
+
function Nt(e) {
|
|
1258
1336
|
for (var t = 1; t < arguments.length; t++) {
|
|
1259
1337
|
var r = arguments[t] != null ? arguments[t] : {};
|
|
1260
|
-
t % 2 ?
|
|
1338
|
+
t % 2 ? At(Object(r), !0).forEach(function(n) {
|
|
1261
1339
|
sn(e, n, r[n]);
|
|
1262
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) :
|
|
1340
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(r)) : At(Object(r)).forEach(function(n) {
|
|
1263
1341
|
Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(r, n));
|
|
1264
1342
|
});
|
|
1265
1343
|
}
|
|
1266
1344
|
return e;
|
|
1267
1345
|
}
|
|
1268
|
-
function
|
|
1346
|
+
function on() {
|
|
1269
1347
|
for (var e = arguments.length, t = new Array(e), r = 0; r < e; r++)
|
|
1270
1348
|
t[r] = arguments[r];
|
|
1271
1349
|
return function(n) {
|
|
1272
|
-
return t.reduceRight(function(
|
|
1273
|
-
return
|
|
1350
|
+
return t.reduceRight(function(s, o) {
|
|
1351
|
+
return o(s);
|
|
1274
1352
|
}, n);
|
|
1275
1353
|
};
|
|
1276
1354
|
}
|
|
1277
1355
|
function ie(e) {
|
|
1278
1356
|
return function t() {
|
|
1279
|
-
for (var r = this, n = arguments.length,
|
|
1280
|
-
o
|
|
1281
|
-
return
|
|
1357
|
+
for (var r = this, n = arguments.length, s = new Array(n), o = 0; o < n; o++)
|
|
1358
|
+
s[o] = arguments[o];
|
|
1359
|
+
return s.length >= e.length ? e.apply(this, s) : function() {
|
|
1282
1360
|
for (var c = arguments.length, l = new Array(c), g = 0; g < c; g++)
|
|
1283
1361
|
l[g] = arguments[g];
|
|
1284
|
-
return t.apply(r, [].concat(
|
|
1362
|
+
return t.apply(r, [].concat(s, l));
|
|
1285
1363
|
};
|
|
1286
1364
|
};
|
|
1287
1365
|
}
|
|
1288
|
-
function
|
|
1366
|
+
function je(e) {
|
|
1289
1367
|
return {}.toString.call(e).includes("Object");
|
|
1290
1368
|
}
|
|
1291
|
-
function
|
|
1369
|
+
function cn(e) {
|
|
1292
1370
|
return !Object.keys(e).length;
|
|
1293
1371
|
}
|
|
1294
1372
|
function de(e) {
|
|
1295
1373
|
return typeof e == "function";
|
|
1296
1374
|
}
|
|
1297
|
-
function
|
|
1375
|
+
function ln(e, t) {
|
|
1298
1376
|
return Object.prototype.hasOwnProperty.call(e, t);
|
|
1299
1377
|
}
|
|
1300
|
-
function
|
|
1301
|
-
return
|
|
1302
|
-
return !
|
|
1378
|
+
function un(e, t) {
|
|
1379
|
+
return je(t) || G("changeType"), Object.keys(t).some(function(r) {
|
|
1380
|
+
return !ln(e, r);
|
|
1303
1381
|
}) && G("changeField"), t;
|
|
1304
1382
|
}
|
|
1305
|
-
function
|
|
1383
|
+
function dn(e) {
|
|
1306
1384
|
de(e) || G("selectorType");
|
|
1307
1385
|
}
|
|
1308
|
-
function
|
|
1309
|
-
de(e) ||
|
|
1386
|
+
function fn(e) {
|
|
1387
|
+
de(e) || je(e) || G("handlerType"), je(e) && Object.values(e).some(function(t) {
|
|
1310
1388
|
return !de(t);
|
|
1311
1389
|
}) && G("handlersType");
|
|
1312
1390
|
}
|
|
1313
|
-
function
|
|
1314
|
-
e || G("initialIsRequired"),
|
|
1391
|
+
function pn(e) {
|
|
1392
|
+
e || G("initialIsRequired"), je(e) || G("initialType"), cn(e) && G("initialContent");
|
|
1315
1393
|
}
|
|
1316
|
-
function
|
|
1394
|
+
function gn(e, t) {
|
|
1317
1395
|
throw new Error(e[t] || e.default);
|
|
1318
1396
|
}
|
|
1319
|
-
var
|
|
1397
|
+
var hn = {
|
|
1320
1398
|
initialIsRequired: "initial state is required",
|
|
1321
1399
|
initialType: "initial state should be an object",
|
|
1322
1400
|
initialContent: "initial state shouldn't be an empty object",
|
|
@@ -1326,18 +1404,18 @@ var vn = {
|
|
|
1326
1404
|
changeType: "provided value of changes should be an object",
|
|
1327
1405
|
changeField: 'it seams you want to change a field in the state which is not specified in the "initial" state',
|
|
1328
1406
|
default: "an unknown error accured in `state-local` package"
|
|
1329
|
-
}, G = ie(
|
|
1330
|
-
changes:
|
|
1331
|
-
selector:
|
|
1332
|
-
handler:
|
|
1333
|
-
initial:
|
|
1407
|
+
}, G = ie(gn)(hn), ve = {
|
|
1408
|
+
changes: un,
|
|
1409
|
+
selector: dn,
|
|
1410
|
+
handler: fn,
|
|
1411
|
+
initial: pn
|
|
1334
1412
|
};
|
|
1335
|
-
function
|
|
1413
|
+
function vn(e) {
|
|
1336
1414
|
var t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1337
1415
|
ve.initial(e), ve.handler(t);
|
|
1338
1416
|
var r = {
|
|
1339
1417
|
current: e
|
|
1340
|
-
}, n = ie(jn)(r, t),
|
|
1418
|
+
}, n = ie(jn)(r, t), s = ie(yn)(r), o = ie(ve.changes)(e), c = ie(mn)(r);
|
|
1341
1419
|
function l() {
|
|
1342
1420
|
var u = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function(d) {
|
|
1343
1421
|
return d;
|
|
@@ -1345,57 +1423,57 @@ function mn(e) {
|
|
|
1345
1423
|
return ve.selector(u), u(r.current);
|
|
1346
1424
|
}
|
|
1347
1425
|
function g(u) {
|
|
1348
|
-
|
|
1426
|
+
on(n, s, o, c)(u);
|
|
1349
1427
|
}
|
|
1350
1428
|
return [l, g];
|
|
1351
1429
|
}
|
|
1352
|
-
function
|
|
1430
|
+
function mn(e, t) {
|
|
1353
1431
|
return de(t) ? t(e.current) : t;
|
|
1354
1432
|
}
|
|
1355
|
-
function
|
|
1356
|
-
return e.current =
|
|
1433
|
+
function yn(e, t) {
|
|
1434
|
+
return e.current = Nt(Nt({}, e.current), t), t;
|
|
1357
1435
|
}
|
|
1358
1436
|
function jn(e, t, r) {
|
|
1359
1437
|
return de(t) ? t(e.current) : Object.keys(r).forEach(function(n) {
|
|
1360
|
-
var
|
|
1361
|
-
return (
|
|
1438
|
+
var s;
|
|
1439
|
+
return (s = t[n]) === null || s === void 0 ? void 0 : s.call(t, e.current[n]);
|
|
1362
1440
|
}), r;
|
|
1363
1441
|
}
|
|
1364
|
-
var
|
|
1365
|
-
create:
|
|
1366
|
-
},
|
|
1442
|
+
var bn = {
|
|
1443
|
+
create: vn
|
|
1444
|
+
}, wn = {
|
|
1367
1445
|
paths: {
|
|
1368
|
-
vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.
|
|
1446
|
+
vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.52.2/min/vs"
|
|
1369
1447
|
}
|
|
1370
1448
|
};
|
|
1371
|
-
function
|
|
1449
|
+
function xn(e) {
|
|
1372
1450
|
return function t() {
|
|
1373
|
-
for (var r = this, n = arguments.length,
|
|
1374
|
-
o
|
|
1375
|
-
return
|
|
1451
|
+
for (var r = this, n = arguments.length, s = new Array(n), o = 0; o < n; o++)
|
|
1452
|
+
s[o] = arguments[o];
|
|
1453
|
+
return s.length >= e.length ? e.apply(this, s) : function() {
|
|
1376
1454
|
for (var c = arguments.length, l = new Array(c), g = 0; g < c; g++)
|
|
1377
1455
|
l[g] = arguments[g];
|
|
1378
|
-
return t.apply(r, [].concat(
|
|
1456
|
+
return t.apply(r, [].concat(s, l));
|
|
1379
1457
|
};
|
|
1380
1458
|
};
|
|
1381
1459
|
}
|
|
1382
|
-
function
|
|
1460
|
+
function Cn(e) {
|
|
1383
1461
|
return {}.toString.call(e).includes("Object");
|
|
1384
1462
|
}
|
|
1385
|
-
function
|
|
1386
|
-
return e ||
|
|
1463
|
+
function Sn(e) {
|
|
1464
|
+
return e || Tt("configIsRequired"), Cn(e) || Tt("configType"), e.urls ? (On(), {
|
|
1387
1465
|
paths: {
|
|
1388
1466
|
vs: e.urls.monacoBase
|
|
1389
1467
|
}
|
|
1390
1468
|
}) : e;
|
|
1391
1469
|
}
|
|
1392
1470
|
function On() {
|
|
1393
|
-
console.warn(
|
|
1471
|
+
console.warn(Vt.deprecation);
|
|
1394
1472
|
}
|
|
1395
|
-
function
|
|
1473
|
+
function En(e, t) {
|
|
1396
1474
|
throw new Error(e[t] || e.default);
|
|
1397
1475
|
}
|
|
1398
|
-
var
|
|
1476
|
+
var Vt = {
|
|
1399
1477
|
configIsRequired: "the configuration object is required",
|
|
1400
1478
|
configType: "the configuration object should be an object",
|
|
1401
1479
|
default: "an unknown error accured in `@monaco-editor/loader` package",
|
|
@@ -1409,294 +1487,293 @@ var Lt = {
|
|
|
1409
1487
|
|
|
1410
1488
|
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
1411
1489
|
`
|
|
1412
|
-
},
|
|
1413
|
-
config:
|
|
1414
|
-
},
|
|
1490
|
+
}, Tt = xn(En)(Vt), kn = {
|
|
1491
|
+
config: Sn
|
|
1492
|
+
}, An = function() {
|
|
1415
1493
|
for (var t = arguments.length, r = new Array(t), n = 0; n < t; n++)
|
|
1416
1494
|
r[n] = arguments[n];
|
|
1417
|
-
return function(
|
|
1418
|
-
return r.reduceRight(function(
|
|
1419
|
-
return c(
|
|
1420
|
-
},
|
|
1495
|
+
return function(s) {
|
|
1496
|
+
return r.reduceRight(function(o, c) {
|
|
1497
|
+
return c(o);
|
|
1498
|
+
}, s);
|
|
1421
1499
|
};
|
|
1422
1500
|
};
|
|
1423
|
-
function
|
|
1501
|
+
function Ht(e, t) {
|
|
1424
1502
|
return Object.keys(t).forEach(function(r) {
|
|
1425
|
-
t[r] instanceof Object && e[r] && Object.assign(t[r],
|
|
1426
|
-
}),
|
|
1503
|
+
t[r] instanceof Object && e[r] && Object.assign(t[r], Ht(e[r], t[r]));
|
|
1504
|
+
}), Et(Et({}, e), t);
|
|
1427
1505
|
}
|
|
1428
|
-
var
|
|
1506
|
+
var Nn = {
|
|
1429
1507
|
type: "cancelation",
|
|
1430
1508
|
msg: "operation is manually canceled"
|
|
1431
1509
|
};
|
|
1432
|
-
function
|
|
1433
|
-
var t = !1, r = new Promise(function(n,
|
|
1434
|
-
e.then(function(
|
|
1435
|
-
return t ?
|
|
1436
|
-
}), e.catch(
|
|
1510
|
+
function ke(e) {
|
|
1511
|
+
var t = !1, r = new Promise(function(n, s) {
|
|
1512
|
+
e.then(function(o) {
|
|
1513
|
+
return t ? s(Nn) : n(o);
|
|
1514
|
+
}), e.catch(s);
|
|
1437
1515
|
});
|
|
1438
1516
|
return r.cancel = function() {
|
|
1439
1517
|
return t = !0;
|
|
1440
1518
|
}, r;
|
|
1441
1519
|
}
|
|
1442
|
-
var Tn =
|
|
1443
|
-
config:
|
|
1520
|
+
var Tn = bn.create({
|
|
1521
|
+
config: wn,
|
|
1444
1522
|
isInitialized: !1,
|
|
1445
1523
|
resolve: null,
|
|
1446
1524
|
reject: null,
|
|
1447
1525
|
monaco: null
|
|
1448
|
-
}),
|
|
1449
|
-
function
|
|
1450
|
-
var t =
|
|
1451
|
-
Ce(function(
|
|
1526
|
+
}), Ft = en(Tn, 2), fe = Ft[0], Ce = Ft[1];
|
|
1527
|
+
function _n(e) {
|
|
1528
|
+
var t = kn.config(e), r = t.monaco, n = Qr(t, ["monaco"]);
|
|
1529
|
+
Ce(function(s) {
|
|
1452
1530
|
return {
|
|
1453
|
-
config:
|
|
1531
|
+
config: Ht(s.config, n),
|
|
1454
1532
|
monaco: r
|
|
1455
1533
|
};
|
|
1456
1534
|
});
|
|
1457
1535
|
}
|
|
1458
|
-
function
|
|
1536
|
+
function Rn() {
|
|
1459
1537
|
var e = fe(function(t) {
|
|
1460
|
-
var r = t.monaco, n = t.isInitialized,
|
|
1538
|
+
var r = t.monaco, n = t.isInitialized, s = t.resolve;
|
|
1461
1539
|
return {
|
|
1462
1540
|
monaco: r,
|
|
1463
1541
|
isInitialized: n,
|
|
1464
|
-
resolve:
|
|
1542
|
+
resolve: s
|
|
1465
1543
|
};
|
|
1466
1544
|
});
|
|
1467
1545
|
if (!e.isInitialized) {
|
|
1468
1546
|
if (Ce({
|
|
1469
1547
|
isInitialized: !0
|
|
1470
1548
|
}), e.monaco)
|
|
1471
|
-
return e.resolve(e.monaco),
|
|
1549
|
+
return e.resolve(e.monaco), ke(Ae);
|
|
1472
1550
|
if (window.monaco && window.monaco.editor)
|
|
1473
|
-
return
|
|
1474
|
-
|
|
1551
|
+
return Ut(window.monaco), e.resolve(window.monaco), ke(Ae);
|
|
1552
|
+
An(Mn, Pn)($n);
|
|
1475
1553
|
}
|
|
1476
|
-
return
|
|
1554
|
+
return ke(Ae);
|
|
1477
1555
|
}
|
|
1478
|
-
function
|
|
1556
|
+
function Mn(e) {
|
|
1479
1557
|
return document.body.appendChild(e);
|
|
1480
1558
|
}
|
|
1481
|
-
function
|
|
1559
|
+
function In(e) {
|
|
1482
1560
|
var t = document.createElement("script");
|
|
1483
1561
|
return e && (t.src = e), t;
|
|
1484
1562
|
}
|
|
1485
|
-
function
|
|
1563
|
+
function Pn(e) {
|
|
1486
1564
|
var t = fe(function(n) {
|
|
1487
|
-
var
|
|
1565
|
+
var s = n.config, o = n.reject;
|
|
1488
1566
|
return {
|
|
1489
|
-
config:
|
|
1490
|
-
reject:
|
|
1567
|
+
config: s,
|
|
1568
|
+
reject: o
|
|
1491
1569
|
};
|
|
1492
|
-
}), r =
|
|
1570
|
+
}), r = In("".concat(t.config.paths.vs, "/loader.js"));
|
|
1493
1571
|
return r.onload = function() {
|
|
1494
1572
|
return e();
|
|
1495
1573
|
}, r.onerror = t.reject, r;
|
|
1496
1574
|
}
|
|
1497
|
-
function
|
|
1575
|
+
function $n() {
|
|
1498
1576
|
var e = fe(function(r) {
|
|
1499
|
-
var n = r.config,
|
|
1577
|
+
var n = r.config, s = r.resolve, o = r.reject;
|
|
1500
1578
|
return {
|
|
1501
1579
|
config: n,
|
|
1502
|
-
resolve:
|
|
1503
|
-
reject:
|
|
1580
|
+
resolve: s,
|
|
1581
|
+
reject: o
|
|
1504
1582
|
};
|
|
1505
1583
|
}), t = window.require;
|
|
1506
1584
|
t.config(e.config), t(["vs/editor/editor.main"], function(r) {
|
|
1507
|
-
|
|
1508
|
-
Ft(n), e.resolve(n);
|
|
1585
|
+
Ut(r), e.resolve(r);
|
|
1509
1586
|
}, function(r) {
|
|
1510
1587
|
e.reject(r);
|
|
1511
1588
|
});
|
|
1512
1589
|
}
|
|
1513
|
-
function
|
|
1590
|
+
function Ut(e) {
|
|
1514
1591
|
fe().monaco || Ce({
|
|
1515
1592
|
monaco: e
|
|
1516
1593
|
});
|
|
1517
1594
|
}
|
|
1518
|
-
function
|
|
1595
|
+
function Dn() {
|
|
1519
1596
|
return fe(function(e) {
|
|
1520
1597
|
var t = e.monaco;
|
|
1521
1598
|
return t;
|
|
1522
1599
|
});
|
|
1523
1600
|
}
|
|
1524
|
-
var
|
|
1601
|
+
var Ae = new Promise(function(e, t) {
|
|
1525
1602
|
return Ce({
|
|
1526
1603
|
resolve: e,
|
|
1527
1604
|
reject: t
|
|
1528
1605
|
});
|
|
1529
|
-
}),
|
|
1530
|
-
config:
|
|
1531
|
-
init:
|
|
1532
|
-
__getMonacoInstance:
|
|
1533
|
-
},
|
|
1534
|
-
function
|
|
1535
|
-
return
|
|
1536
|
-
}
|
|
1537
|
-
var
|
|
1538
|
-
function
|
|
1539
|
-
return
|
|
1540
|
-
}
|
|
1541
|
-
var
|
|
1542
|
-
function
|
|
1606
|
+
}), be = {
|
|
1607
|
+
config: _n,
|
|
1608
|
+
init: Rn,
|
|
1609
|
+
__getMonacoInstance: Dn
|
|
1610
|
+
}, Ln = { wrapper: { display: "flex", position: "relative", textAlign: "initial" }, fullWidth: { width: "100%" }, hide: { display: "none" } }, Ne = Ln, Vn = { container: { display: "flex", height: "100%", width: "100%", justifyContent: "center", alignItems: "center" } }, Hn = Vn;
|
|
1611
|
+
function Fn({ children: e }) {
|
|
1612
|
+
return W.createElement("div", { style: Hn.container }, e);
|
|
1613
|
+
}
|
|
1614
|
+
var Un = Fn, zn = Un;
|
|
1615
|
+
function Zn({ width: e, height: t, isEditorReady: r, loading: n, _ref: s, className: o, wrapperProps: c }) {
|
|
1616
|
+
return W.createElement("section", { style: { ...Ne.wrapper, width: e, height: t }, ...c }, !r && W.createElement(zn, null, n), W.createElement("div", { ref: s, style: { ...Ne.fullWidth, ...!r && Ne.hide }, className: o }));
|
|
1617
|
+
}
|
|
1618
|
+
var Jn = Zn, zt = Fe(Jn);
|
|
1619
|
+
function Yn(e) {
|
|
1543
1620
|
Y(e, []);
|
|
1544
1621
|
}
|
|
1545
|
-
var
|
|
1546
|
-
function
|
|
1622
|
+
var We = Yn;
|
|
1623
|
+
function qn(e, t, r = !0) {
|
|
1547
1624
|
let n = V(!0);
|
|
1548
1625
|
Y(n.current || !r ? () => {
|
|
1549
1626
|
n.current = !1;
|
|
1550
1627
|
} : e, t);
|
|
1551
1628
|
}
|
|
1552
|
-
var
|
|
1629
|
+
var B = qn;
|
|
1553
1630
|
function le() {
|
|
1554
1631
|
}
|
|
1555
1632
|
function ne(e, t, r, n) {
|
|
1556
|
-
return
|
|
1633
|
+
return Bn(e, n) || Wn(e, t, r, n);
|
|
1557
1634
|
}
|
|
1558
|
-
function
|
|
1559
|
-
return e.editor.getModel(
|
|
1635
|
+
function Bn(e, t) {
|
|
1636
|
+
return e.editor.getModel(Zt(e, t));
|
|
1560
1637
|
}
|
|
1561
|
-
function
|
|
1562
|
-
return e.editor.createModel(t, r, n ?
|
|
1638
|
+
function Wn(e, t, r, n) {
|
|
1639
|
+
return e.editor.createModel(t, r, n ? Zt(e, n) : void 0);
|
|
1563
1640
|
}
|
|
1564
|
-
function
|
|
1641
|
+
function Zt(e, t) {
|
|
1565
1642
|
return e.Uri.parse(t);
|
|
1566
1643
|
}
|
|
1567
|
-
function
|
|
1568
|
-
let [
|
|
1569
|
-
|
|
1570
|
-
let
|
|
1571
|
-
return
|
|
1572
|
-
}),
|
|
1573
|
-
if (
|
|
1574
|
-
let
|
|
1575
|
-
|
|
1644
|
+
function Kn({ original: e, modified: t, language: r, originalLanguage: n, modifiedLanguage: s, originalModelPath: o, modifiedModelPath: c, keepCurrentOriginalModel: l = !1, keepCurrentModifiedModel: g = !1, theme: u = "light", loading: d = "Loading...", options: v = {}, height: S = "100%", width: T = "100%", className: O, wrapperProps: A = {}, beforeMount: f = le, onMount: N = le }) {
|
|
1645
|
+
let [E, M] = P(!1), [b, m] = P(!0), w = V(null), y = V(null), H = V(null), _ = V(N), C = V(f), $ = V(!1);
|
|
1646
|
+
We(() => {
|
|
1647
|
+
let j = be.init();
|
|
1648
|
+
return j.then((R) => (y.current = R) && m(!1)).catch((R) => R?.type !== "cancelation" && console.error("Monaco initialization: error:", R)), () => w.current ? F() : j.cancel();
|
|
1649
|
+
}), B(() => {
|
|
1650
|
+
if (w.current && y.current) {
|
|
1651
|
+
let j = w.current.getOriginalEditor(), R = ne(y.current, e || "", n || r || "text", o || "");
|
|
1652
|
+
R !== j.getModel() && j.setModel(R);
|
|
1576
1653
|
}
|
|
1577
|
-
}, [
|
|
1578
|
-
if (
|
|
1579
|
-
let
|
|
1580
|
-
|
|
1654
|
+
}, [o], E), B(() => {
|
|
1655
|
+
if (w.current && y.current) {
|
|
1656
|
+
let j = w.current.getModifiedEditor(), R = ne(y.current, t || "", s || r || "text", c || "");
|
|
1657
|
+
R !== j.getModel() && j.setModel(R);
|
|
1581
1658
|
}
|
|
1582
|
-
}, [c],
|
|
1583
|
-
let
|
|
1584
|
-
|
|
1585
|
-
}, [t],
|
|
1586
|
-
|
|
1587
|
-
}, [e],
|
|
1588
|
-
let { original:
|
|
1589
|
-
y.current.editor.setModelLanguage(
|
|
1590
|
-
}, [r, n,
|
|
1659
|
+
}, [c], E), B(() => {
|
|
1660
|
+
let j = w.current.getModifiedEditor();
|
|
1661
|
+
j.getOption(y.current.editor.EditorOption.readOnly) ? j.setValue(t || "") : t !== j.getValue() && (j.executeEdits("", [{ range: j.getModel().getFullModelRange(), text: t || "", forceMoveMarkers: !0 }]), j.pushUndoStop());
|
|
1662
|
+
}, [t], E), B(() => {
|
|
1663
|
+
w.current?.getModel()?.original.setValue(e || "");
|
|
1664
|
+
}, [e], E), B(() => {
|
|
1665
|
+
let { original: j, modified: R } = w.current.getModel();
|
|
1666
|
+
y.current.editor.setModelLanguage(j, n || r || "text"), y.current.editor.setModelLanguage(R, s || r || "text");
|
|
1667
|
+
}, [r, n, s], E), B(() => {
|
|
1591
1668
|
y.current?.editor.setTheme(u);
|
|
1592
|
-
}, [u],
|
|
1593
|
-
|
|
1594
|
-
}, [v],
|
|
1595
|
-
let
|
|
1669
|
+
}, [u], E), B(() => {
|
|
1670
|
+
w.current?.updateOptions(v);
|
|
1671
|
+
}, [v], E);
|
|
1672
|
+
let L = K(() => {
|
|
1596
1673
|
if (!y.current) return;
|
|
1597
|
-
|
|
1598
|
-
let
|
|
1599
|
-
|
|
1600
|
-
}, [r, t,
|
|
1601
|
-
|
|
1602
|
-
}, [v, u,
|
|
1674
|
+
C.current(y.current);
|
|
1675
|
+
let j = ne(y.current, e || "", n || r || "text", o || ""), R = ne(y.current, t || "", s || r || "text", c || "");
|
|
1676
|
+
w.current?.setModel({ original: j, modified: R });
|
|
1677
|
+
}, [r, t, s, e, n, o, c]), U = K(() => {
|
|
1678
|
+
!$.current && H.current && (w.current = y.current.editor.createDiffEditor(H.current, { automaticLayout: !0, ...v }), L(), y.current?.editor.setTheme(u), M(!0), $.current = !0);
|
|
1679
|
+
}, [v, u, L]);
|
|
1603
1680
|
Y(() => {
|
|
1604
|
-
|
|
1605
|
-
}, [
|
|
1606
|
-
!
|
|
1607
|
-
}, [
|
|
1608
|
-
function
|
|
1609
|
-
let
|
|
1610
|
-
l ||
|
|
1681
|
+
E && _.current(w.current, y.current);
|
|
1682
|
+
}, [E]), Y(() => {
|
|
1683
|
+
!b && !E && U();
|
|
1684
|
+
}, [b, E, U]);
|
|
1685
|
+
function F() {
|
|
1686
|
+
let j = w.current?.getModel();
|
|
1687
|
+
l || j?.original?.dispose(), g || j?.modified?.dispose(), w.current?.dispose();
|
|
1611
1688
|
}
|
|
1612
|
-
return
|
|
1689
|
+
return W.createElement(zt, { width: T, height: S, isEditorReady: E, loading: d, _ref: H, className: O, wrapperProps: A });
|
|
1613
1690
|
}
|
|
1614
|
-
var
|
|
1615
|
-
|
|
1616
|
-
function
|
|
1617
|
-
let [e, t] = P(
|
|
1618
|
-
return
|
|
1691
|
+
var Gn = Kn;
|
|
1692
|
+
Fe(Gn);
|
|
1693
|
+
function Xn() {
|
|
1694
|
+
let [e, t] = P(be.__getMonacoInstance());
|
|
1695
|
+
return We(() => {
|
|
1619
1696
|
let r;
|
|
1620
|
-
return e || (r =
|
|
1697
|
+
return e || (r = be.init(), r.then((n) => {
|
|
1621
1698
|
t(n);
|
|
1622
1699
|
})), () => r?.cancel();
|
|
1623
1700
|
}), e;
|
|
1624
1701
|
}
|
|
1625
|
-
var
|
|
1626
|
-
function
|
|
1702
|
+
var Qn = Xn;
|
|
1703
|
+
function ea(e) {
|
|
1627
1704
|
let t = V();
|
|
1628
1705
|
return Y(() => {
|
|
1629
1706
|
t.current = e;
|
|
1630
1707
|
}, [e]), t.current;
|
|
1631
1708
|
}
|
|
1632
|
-
var
|
|
1633
|
-
function
|
|
1634
|
-
let [m,
|
|
1635
|
-
|
|
1636
|
-
let
|
|
1637
|
-
return
|
|
1638
|
-
}),
|
|
1639
|
-
let
|
|
1640
|
-
|
|
1641
|
-
}, [
|
|
1642
|
-
|
|
1643
|
-
}, [u], m),
|
|
1644
|
-
!
|
|
1645
|
-
}, [n], m),
|
|
1646
|
-
let
|
|
1647
|
-
|
|
1648
|
-
}, [
|
|
1649
|
-
l !== void 0 &&
|
|
1650
|
-
}, [l], m),
|
|
1651
|
-
|
|
1709
|
+
var ta = ea, me = /* @__PURE__ */ new Map();
|
|
1710
|
+
function ra({ defaultValue: e, defaultLanguage: t, defaultPath: r, value: n, language: s, path: o, theme: c = "light", line: l, loading: g = "Loading...", options: u = {}, overrideServices: d = {}, saveViewState: v = !0, keepCurrentModel: S = !1, width: T = "100%", height: O = "100%", className: A, wrapperProps: f = {}, beforeMount: N = le, onMount: E = le, onChange: M, onValidate: b = le }) {
|
|
1711
|
+
let [m, w] = P(!1), [y, H] = P(!0), _ = V(null), C = V(null), $ = V(null), L = V(E), U = V(N), F = V(), j = V(n), R = ta(o), I = V(!1), z = V(!1);
|
|
1712
|
+
We(() => {
|
|
1713
|
+
let p = be.init();
|
|
1714
|
+
return p.then((x) => (_.current = x) && H(!1)).catch((x) => x?.type !== "cancelation" && console.error("Monaco initialization: error:", x)), () => C.current ? i() : p.cancel();
|
|
1715
|
+
}), B(() => {
|
|
1716
|
+
let p = ne(_.current, e || n || "", t || s || "", o || r || "");
|
|
1717
|
+
p !== C.current?.getModel() && (v && me.set(R, C.current?.saveViewState()), C.current?.setModel(p), v && C.current?.restoreViewState(me.get(o)));
|
|
1718
|
+
}, [o], m), B(() => {
|
|
1719
|
+
C.current?.updateOptions(u);
|
|
1720
|
+
}, [u], m), B(() => {
|
|
1721
|
+
!C.current || n === void 0 || (C.current.getOption(_.current.editor.EditorOption.readOnly) ? C.current.setValue(n) : n !== C.current.getValue() && (z.current = !0, C.current.executeEdits("", [{ range: C.current.getModel().getFullModelRange(), text: n, forceMoveMarkers: !0 }]), C.current.pushUndoStop(), z.current = !1));
|
|
1722
|
+
}, [n], m), B(() => {
|
|
1723
|
+
let p = C.current?.getModel();
|
|
1724
|
+
p && s && _.current?.editor.setModelLanguage(p, s);
|
|
1725
|
+
}, [s], m), B(() => {
|
|
1726
|
+
l !== void 0 && C.current?.revealLine(l);
|
|
1727
|
+
}, [l], m), B(() => {
|
|
1728
|
+
_.current?.editor.setTheme(c);
|
|
1652
1729
|
}, [c], m);
|
|
1653
|
-
let
|
|
1654
|
-
if (!(
|
|
1655
|
-
|
|
1656
|
-
let
|
|
1657
|
-
|
|
1730
|
+
let Z = K(() => {
|
|
1731
|
+
if (!(!$.current || !_.current) && !I.current) {
|
|
1732
|
+
U.current(_.current);
|
|
1733
|
+
let p = o || r, x = ne(_.current, n || e || "", t || s || "", p || "");
|
|
1734
|
+
C.current = _.current?.editor.create($.current, { model: x, automaticLayout: !0, ...u }, d), v && C.current.restoreViewState(me.get(p)), _.current.editor.setTheme(c), l !== void 0 && C.current.revealLine(l), w(!0), I.current = !0;
|
|
1658
1735
|
}
|
|
1659
|
-
}, [e, t, r, n,
|
|
1736
|
+
}, [e, t, r, n, s, o, u, d, v, c, l]);
|
|
1660
1737
|
Y(() => {
|
|
1661
|
-
m &&
|
|
1738
|
+
m && L.current(C.current, _.current);
|
|
1662
1739
|
}, [m]), Y(() => {
|
|
1663
|
-
!y && !m &&
|
|
1664
|
-
}, [y, m,
|
|
1665
|
-
m &&
|
|
1666
|
-
|
|
1740
|
+
!y && !m && Z();
|
|
1741
|
+
}, [y, m, Z]), j.current = n, Y(() => {
|
|
1742
|
+
m && M && (F.current?.dispose(), F.current = C.current?.onDidChangeModelContent((p) => {
|
|
1743
|
+
z.current || M(C.current.getValue(), p);
|
|
1667
1744
|
}));
|
|
1668
|
-
}, [m,
|
|
1745
|
+
}, [m, M]), Y(() => {
|
|
1669
1746
|
if (m) {
|
|
1670
|
-
let
|
|
1671
|
-
let
|
|
1672
|
-
if (
|
|
1673
|
-
let
|
|
1674
|
-
|
|
1747
|
+
let p = _.current.editor.onDidChangeMarkers((x) => {
|
|
1748
|
+
let h = C.current.getModel()?.uri;
|
|
1749
|
+
if (h && x.find((k) => k.path === h.path)) {
|
|
1750
|
+
let k = _.current.editor.getModelMarkers({ resource: h });
|
|
1751
|
+
b?.(k);
|
|
1675
1752
|
}
|
|
1676
1753
|
});
|
|
1677
1754
|
return () => {
|
|
1678
|
-
|
|
1755
|
+
p?.dispose();
|
|
1679
1756
|
};
|
|
1680
1757
|
}
|
|
1681
1758
|
return () => {
|
|
1682
1759
|
};
|
|
1683
|
-
}, [m,
|
|
1684
|
-
function
|
|
1685
|
-
|
|
1760
|
+
}, [m, b]);
|
|
1761
|
+
function i() {
|
|
1762
|
+
F.current?.dispose(), S ? v && me.set(o, C.current.saveViewState()) : C.current.getModel()?.dispose(), C.current.dispose();
|
|
1686
1763
|
}
|
|
1687
|
-
return
|
|
1764
|
+
return W.createElement(zt, { width: T, height: O, isEditorReady: m, loading: g, _ref: $, className: A, wrapperProps: f });
|
|
1688
1765
|
}
|
|
1689
|
-
var
|
|
1690
|
-
const
|
|
1766
|
+
var na = ra, aa = Fe(na), sa = aa;
|
|
1767
|
+
const oa = ({
|
|
1691
1768
|
value: e,
|
|
1692
1769
|
height: t = 300,
|
|
1693
1770
|
schema: r,
|
|
1694
1771
|
onChange: n,
|
|
1695
|
-
onValidate:
|
|
1696
|
-
language:
|
|
1772
|
+
onValidate: s,
|
|
1773
|
+
language: o = "json",
|
|
1697
1774
|
readOnly: c = !1
|
|
1698
1775
|
}) => {
|
|
1699
|
-
const l =
|
|
1776
|
+
const l = Qn(), g = Bt((d) => d.theme), u = ue(() => g === "dark" ? "vs-dark" : "light", [g]);
|
|
1700
1777
|
return Y(() => {
|
|
1701
1778
|
l && (l.languages.typescript.javascriptDefaults.setCompilerOptions({ isolatedModules: !0 }), l.languages.json.jsonDefaults.setDiagnosticsOptions({
|
|
1702
1779
|
schemas: r ? [
|
|
@@ -1707,18 +1784,18 @@ const ca = ({
|
|
|
1707
1784
|
}
|
|
1708
1785
|
] : []
|
|
1709
1786
|
}));
|
|
1710
|
-
}, [l, r,
|
|
1711
|
-
|
|
1787
|
+
}, [l, r, o]), /* @__PURE__ */ a.jsx(
|
|
1788
|
+
sa,
|
|
1712
1789
|
{
|
|
1713
1790
|
"data-testid": "json-editor",
|
|
1714
1791
|
height: t,
|
|
1715
|
-
language:
|
|
1792
|
+
language: o,
|
|
1716
1793
|
value: e,
|
|
1717
1794
|
theme: u,
|
|
1718
1795
|
onChange: (d) => {
|
|
1719
|
-
d ||
|
|
1796
|
+
d || s?.(!1), n?.(d ?? "");
|
|
1720
1797
|
},
|
|
1721
|
-
onValidate: (d) =>
|
|
1798
|
+
onValidate: (d) => s?.(d.length === 0),
|
|
1722
1799
|
options: {
|
|
1723
1800
|
readOnly: c,
|
|
1724
1801
|
scrollBeyondLastLine: !1,
|
|
@@ -1726,14 +1803,14 @@ const ca = ({
|
|
|
1726
1803
|
}
|
|
1727
1804
|
}
|
|
1728
1805
|
);
|
|
1729
|
-
},
|
|
1730
|
-
const [t, r] = P(!1), [n,
|
|
1806
|
+
}, ia = ({ state: e }) => {
|
|
1807
|
+
const [t, r] = P(!1), [n, s] = P(!0), [o, c] = P(JSON.stringify(e.value, null, 2)), [l, g] = P(!1), [u, d] = P("idle"), v = V(JSON.stringify(e.value, null, 2));
|
|
1731
1808
|
Y(() => {
|
|
1732
1809
|
c(JSON.stringify(e.value, null, 2));
|
|
1733
1810
|
}, [e.value]);
|
|
1734
|
-
const
|
|
1811
|
+
const S = K((f) => {
|
|
1735
1812
|
g(f !== v.current), c(f), d("idle");
|
|
1736
|
-
}, []),
|
|
1813
|
+
}, []), T = async () => {
|
|
1737
1814
|
if (!(!n || !l))
|
|
1738
1815
|
try {
|
|
1739
1816
|
r(!0), d("idle");
|
|
@@ -1745,12 +1822,12 @@ const ca = ({
|
|
|
1745
1822
|
body: JSON.stringify({
|
|
1746
1823
|
key: e.key,
|
|
1747
1824
|
groupId: e.groupId,
|
|
1748
|
-
value: JSON.parse(
|
|
1825
|
+
value: JSON.parse(o)
|
|
1749
1826
|
})
|
|
1750
1827
|
});
|
|
1751
1828
|
if (!f.ok)
|
|
1752
1829
|
throw new Error(`HTTP error! status: ${f.status}`);
|
|
1753
|
-
v.current =
|
|
1830
|
+
v.current = o, d("success"), g(!1), setTimeout(() => {
|
|
1754
1831
|
d("idle");
|
|
1755
1832
|
}, 3e3);
|
|
1756
1833
|
} catch (f) {
|
|
@@ -1758,13 +1835,13 @@ const ca = ({
|
|
|
1758
1835
|
} finally {
|
|
1759
1836
|
r(!1);
|
|
1760
1837
|
}
|
|
1761
|
-
},
|
|
1838
|
+
}, O = K(() => {
|
|
1762
1839
|
c(JSON.stringify(e.value, null, 2)), g(!1), d("idle");
|
|
1763
|
-
}, [e.value]),
|
|
1764
|
-
/* @__PURE__ */ a.jsx(
|
|
1840
|
+
}, [e.value]), A = ue(() => u === "success" ? /* @__PURE__ */ a.jsx("div", { className: "bg-green-50 dark:bg-green-950/20 border border-green-200 dark:border-green-800 rounded-lg p-2", children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 text-green-700 dark:text-green-400 text-sm", children: [
|
|
1841
|
+
/* @__PURE__ */ a.jsx(Yr, { className: "w-4 h-4" }),
|
|
1765
1842
|
"State saved successfully!"
|
|
1766
1843
|
] }) }) : u === "error" ? /* @__PURE__ */ a.jsx("div", { className: "bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-800 rounded-lg p-2", children: /* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2 text-red-700 dark:text-red-400 text-sm", children: [
|
|
1767
|
-
/* @__PURE__ */ a.jsx(
|
|
1844
|
+
/* @__PURE__ */ a.jsx(St, { className: "w-4 h-4" }),
|
|
1768
1845
|
"Failed to save state. Please try again."
|
|
1769
1846
|
] }) }) : /* @__PURE__ */ a.jsx("div", { className: "text-xs text-muted-foreground", children: l ? /* @__PURE__ */ a.jsxs("span", { className: "flex items-center gap-1", children: [
|
|
1770
1847
|
/* @__PURE__ */ a.jsx("div", { className: "w-2 h-2 bg-orange-500 rounded-full" }),
|
|
@@ -1777,35 +1854,35 @@ const ca = ({
|
|
|
1777
1854
|
/* @__PURE__ */ a.jsx("p", { className: "text-xs text-muted-foreground", children: "Modify the state value using the JSON editor below." }),
|
|
1778
1855
|
/* @__PURE__ */ a.jsx("div", { className: "space-y-3 pt-2 flex flex-col", children: /* @__PURE__ */ a.jsxs("div", { className: "relative flex-1", children: [
|
|
1779
1856
|
/* @__PURE__ */ a.jsx(
|
|
1780
|
-
|
|
1857
|
+
oa,
|
|
1781
1858
|
{
|
|
1782
|
-
value:
|
|
1783
|
-
onChange:
|
|
1784
|
-
onValidate:
|
|
1859
|
+
value: o,
|
|
1860
|
+
onChange: S,
|
|
1861
|
+
onValidate: s,
|
|
1785
1862
|
height: "calc(100vh - 300px)"
|
|
1786
1863
|
}
|
|
1787
1864
|
),
|
|
1788
1865
|
!n && /* @__PURE__ */ a.jsxs("div", { className: "absolute top-2 right-2 bg-destructive/90 text-destructive-foreground px-2 py-1 rounded text-xs flex items-center gap-1", children: [
|
|
1789
|
-
/* @__PURE__ */ a.jsx(
|
|
1866
|
+
/* @__PURE__ */ a.jsx(St, { className: "w-3 h-3" }),
|
|
1790
1867
|
"Invalid JSON"
|
|
1791
1868
|
] })
|
|
1792
1869
|
] }) }),
|
|
1793
1870
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center justify-between pt-2", children: [
|
|
1794
|
-
|
|
1871
|
+
A,
|
|
1795
1872
|
/* @__PURE__ */ a.jsxs("div", { className: "flex items-center gap-2", children: [
|
|
1796
|
-
l && /* @__PURE__ */ a.jsx(ye, { variant: "secondary", onClick:
|
|
1873
|
+
l && /* @__PURE__ */ a.jsx(ye, { variant: "secondary", onClick: O, disabled: t, children: "Reset" }),
|
|
1797
1874
|
/* @__PURE__ */ a.jsx(
|
|
1798
1875
|
ye,
|
|
1799
1876
|
{
|
|
1800
|
-
onClick:
|
|
1877
|
+
onClick: T,
|
|
1801
1878
|
variant: "accent",
|
|
1802
1879
|
disabled: t || !n || !l,
|
|
1803
1880
|
"data-testid": "state-save-button",
|
|
1804
1881
|
children: t ? /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1805
|
-
/* @__PURE__ */ a.jsx(
|
|
1882
|
+
/* @__PURE__ */ a.jsx(Br, { className: "w-3 h-3 animate-spin mr-1" }),
|
|
1806
1883
|
"Saving..."
|
|
1807
1884
|
] }) : /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1808
|
-
/* @__PURE__ */ a.jsx(
|
|
1885
|
+
/* @__PURE__ */ a.jsx(Kr, { className: "w-3 h-3 mr-1" }),
|
|
1809
1886
|
"Save Changes"
|
|
1810
1887
|
] })
|
|
1811
1888
|
}
|
|
@@ -1813,8 +1890,8 @@ const ca = ({
|
|
|
1813
1890
|
] })
|
|
1814
1891
|
] })
|
|
1815
1892
|
] });
|
|
1816
|
-
},
|
|
1817
|
-
|
|
1893
|
+
}, ca = ({ state: e, onClose: t }) => /* @__PURE__ */ a.jsx(
|
|
1894
|
+
Wt,
|
|
1818
1895
|
{
|
|
1819
1896
|
onClose: t,
|
|
1820
1897
|
title: "State Details",
|
|
@@ -1822,85 +1899,85 @@ const ca = ({
|
|
|
1822
1899
|
tabs: [
|
|
1823
1900
|
{
|
|
1824
1901
|
label: "Overview",
|
|
1825
|
-
content: /* @__PURE__ */ a.jsx(
|
|
1902
|
+
content: /* @__PURE__ */ a.jsx(zr, { state: e })
|
|
1826
1903
|
},
|
|
1827
1904
|
{
|
|
1828
1905
|
label: "Editor",
|
|
1829
|
-
content: /* @__PURE__ */ a.jsx(
|
|
1906
|
+
content: /* @__PURE__ */ a.jsx(ia, { state: e })
|
|
1830
1907
|
}
|
|
1831
1908
|
],
|
|
1832
|
-
actions: [{ icon: /* @__PURE__ */ a.jsx(
|
|
1909
|
+
actions: [{ icon: /* @__PURE__ */ a.jsx(Mt, {}), onClick: t, label: "Close" }]
|
|
1833
1910
|
}
|
|
1834
|
-
),
|
|
1835
|
-
const e =
|
|
1911
|
+
), da = () => {
|
|
1912
|
+
const e = nt((f) => f.selectedStateId), t = nt((f) => f.selectStateId), { items: r, deleteItems: n, refetch: s } = vr(), [o, c] = P(""), l = ue(() => r.filter((f) => f.groupId.toLowerCase().includes(o.toLowerCase()) || f.key.toLowerCase().includes(o.toLowerCase())), [r, o]), g = ue(
|
|
1836
1913
|
() => e ? l.find((f) => `${f.groupId}:${f.key}` === e) : null,
|
|
1837
1914
|
[l, e]
|
|
1838
|
-
), [u, d] = P(/* @__PURE__ */ new Set()), v = (f) => t(`${f.groupId}:${f.key}`),
|
|
1915
|
+
), [u, d] = P(/* @__PURE__ */ new Set()), v = (f) => t(`${f.groupId}:${f.key}`), S = () => t(void 0), T = () => {
|
|
1839
1916
|
n(Array.from(u)), d(/* @__PURE__ */ new Set());
|
|
1840
|
-
},
|
|
1841
|
-
const
|
|
1842
|
-
d((
|
|
1843
|
-
const
|
|
1844
|
-
return
|
|
1917
|
+
}, O = (f) => {
|
|
1918
|
+
const N = u.has(`${f.groupId}:${f.key}`);
|
|
1919
|
+
d((E) => {
|
|
1920
|
+
const M = new Set(E);
|
|
1921
|
+
return N ? M.delete(`${f.groupId}:${f.key}`) : M.add(`${f.groupId}:${f.key}`), M;
|
|
1845
1922
|
});
|
|
1846
|
-
},
|
|
1847
|
-
d((
|
|
1848
|
-
const
|
|
1849
|
-
return f ? l.forEach((
|
|
1923
|
+
}, A = (f) => {
|
|
1924
|
+
d((N) => {
|
|
1925
|
+
const E = new Set(N);
|
|
1926
|
+
return f ? l.forEach((M) => E.add(`${M.groupId}:${M.key}`)) : l.forEach((M) => E.delete(`${M.groupId}:${M.key}`)), E;
|
|
1850
1927
|
});
|
|
1851
1928
|
};
|
|
1852
1929
|
return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
|
|
1853
|
-
g && /* @__PURE__ */ a.jsx(
|
|
1930
|
+
g && /* @__PURE__ */ a.jsx(ca, { state: g, onClose: S }),
|
|
1854
1931
|
/* @__PURE__ */ a.jsxs("div", { className: "grid grid-rows-[auto_1fr] h-full", "data-testid": "states-container", children: [
|
|
1855
1932
|
/* @__PURE__ */ a.jsxs("div", { className: "flex p-2 border-b gap-2", "data-testid": "logs-search-container", children: [
|
|
1856
1933
|
/* @__PURE__ */ a.jsxs("div", { className: "flex-1 relative", children: [
|
|
1857
1934
|
/* @__PURE__ */ a.jsx(
|
|
1858
|
-
|
|
1935
|
+
Kt,
|
|
1859
1936
|
{
|
|
1860
1937
|
variant: "shade",
|
|
1861
|
-
value:
|
|
1938
|
+
value: o,
|
|
1862
1939
|
onChange: (f) => c(f.target.value),
|
|
1863
1940
|
className: "px-9 font-medium",
|
|
1864
1941
|
placeholder: "Search by Group ID or Key"
|
|
1865
1942
|
}
|
|
1866
1943
|
),
|
|
1867
|
-
/* @__PURE__ */ a.jsx(
|
|
1944
|
+
/* @__PURE__ */ a.jsx(fr, { className: "absolute left-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground/50" }),
|
|
1868
1945
|
/* @__PURE__ */ a.jsx(
|
|
1869
|
-
|
|
1946
|
+
Mt,
|
|
1870
1947
|
{
|
|
1871
1948
|
className: "cursor-pointer absolute right-3 top-1/2 -translate-y-1/2 w-4 h-4 text-muted-foreground/50 hover:text-muted-foreground",
|
|
1872
1949
|
onClick: () => c("")
|
|
1873
1950
|
}
|
|
1874
1951
|
)
|
|
1875
1952
|
] }),
|
|
1876
|
-
/* @__PURE__ */ a.jsxs(ye, { variant: "default", className: "h-[34px]", disabled: u.size === 0, onClick:
|
|
1877
|
-
/* @__PURE__ */ a.jsx(
|
|
1953
|
+
/* @__PURE__ */ a.jsxs(ye, { variant: "default", className: "h-[34px]", disabled: u.size === 0, onClick: T, children: [
|
|
1954
|
+
/* @__PURE__ */ a.jsx(gr, {}),
|
|
1878
1955
|
" Delete"
|
|
1879
1956
|
] }),
|
|
1880
|
-
/* @__PURE__ */ a.jsx(ye, { variant: "default", className: "h-[34px]", onClick:
|
|
1957
|
+
/* @__PURE__ */ a.jsx(ye, { variant: "default", className: "h-[34px]", onClick: s, children: /* @__PURE__ */ a.jsx(ur, { className: "w-4 h-4 text-muted-foreground" }) })
|
|
1881
1958
|
] }),
|
|
1882
|
-
/* @__PURE__ */ a.jsxs(
|
|
1883
|
-
/* @__PURE__ */ a.jsx(
|
|
1884
|
-
/* @__PURE__ */ a.jsx(pe, { children: /* @__PURE__ */ a.jsx(
|
|
1959
|
+
/* @__PURE__ */ a.jsxs(Gt, { children: [
|
|
1960
|
+
/* @__PURE__ */ a.jsx(Xt, { className: "sticky top-0 bg-background/20 backdrop-blur-sm", children: /* @__PURE__ */ a.jsxs(Ke, { children: [
|
|
1961
|
+
/* @__PURE__ */ a.jsx(pe, { children: /* @__PURE__ */ a.jsx(Ge, { onClick: (f) => f.stopPropagation(), onCheckedChange: A }) }),
|
|
1885
1962
|
/* @__PURE__ */ a.jsx(pe, { className: "rounded-0", children: "Group ID" }),
|
|
1886
1963
|
/* @__PURE__ */ a.jsx(pe, { children: "Key" }),
|
|
1887
1964
|
/* @__PURE__ */ a.jsx(pe, { children: "Type" })
|
|
1888
1965
|
] }) }),
|
|
1889
|
-
/* @__PURE__ */ a.jsx(
|
|
1890
|
-
|
|
1966
|
+
/* @__PURE__ */ a.jsx(Qt, { children: l.map((f) => /* @__PURE__ */ a.jsxs(
|
|
1967
|
+
Ke,
|
|
1891
1968
|
{
|
|
1892
1969
|
"data-testid": `item-${f}`,
|
|
1893
1970
|
onClick: () => v(f),
|
|
1894
|
-
className:
|
|
1971
|
+
className: er(
|
|
1895
1972
|
"font-mono font-semibold cursor-pointer border-0",
|
|
1896
1973
|
g === f ? "bg-muted-foreground/10 hover:bg-muted-foreground/20" : "hover:bg-muted-foreground/10"
|
|
1897
1974
|
),
|
|
1898
1975
|
children: [
|
|
1899
|
-
/* @__PURE__ */ a.jsx(ge, { onClick: (
|
|
1900
|
-
|
|
1976
|
+
/* @__PURE__ */ a.jsx(ge, { onClick: (N) => N.stopPropagation(), children: /* @__PURE__ */ a.jsx(
|
|
1977
|
+
Ge,
|
|
1901
1978
|
{
|
|
1902
1979
|
checked: u.has(`${f.groupId}:${f.key}`),
|
|
1903
|
-
onClick: () =>
|
|
1980
|
+
onClick: () => O(f)
|
|
1904
1981
|
}
|
|
1905
1982
|
) }),
|
|
1906
1983
|
/* @__PURE__ */ a.jsx(ge, { className: "hover:bg-transparent", children: f.groupId }),
|
|
@@ -1915,5 +1992,5 @@ const ca = ({
|
|
|
1915
1992
|
] });
|
|
1916
1993
|
};
|
|
1917
1994
|
export {
|
|
1918
|
-
|
|
1995
|
+
da as StatesPage
|
|
1919
1996
|
};
|