@devtable/settings-form 8.13.2 → 8.13.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/settings-form.es.js
CHANGED
|
@@ -1,94 +1,95 @@
|
|
|
1
|
-
import { Box as
|
|
2
|
-
import { showNotification as
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
import { Recycle as
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import { useForm as
|
|
10
|
-
import { useBoolean as
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
1
|
+
import { Box as F, TextInput as D, Divider as Te, Group as O, NumberInput as $r, PasswordInput as de, Button as T, Modal as ne, Stack as ze, SegmentedControl as Yr, useMantineTheme as Kr, Tooltip as Br, Text as ue, LoadingOverlay as Oe, Table as Ae, Select as Gr, Switch as Hr } from "@mantine/core";
|
|
2
|
+
import { showNotification as W, updateNotification as x } from "@mantine/notifications";
|
|
3
|
+
import * as ee from "react";
|
|
4
|
+
import H, { useEffect as cr, forwardRef as ke, useState as lr, useMemo as ur } from "react";
|
|
5
|
+
import { Recycle as Jr, PlaylistAdd as xe, Trash as De, Edit as Xr } from "tabler-icons-react";
|
|
6
|
+
import Qr from "axios";
|
|
7
|
+
import Zr from "crypto-js";
|
|
8
|
+
import et from "lodash";
|
|
9
|
+
import { useForm as J, Controller as R } from "react-hook-form";
|
|
10
|
+
import { useBoolean as rt, useRequest as G } from "ahooks";
|
|
11
|
+
import tt, { loader as Ee } from "@monaco-editor/react";
|
|
12
|
+
import * as nt from "monaco-editor";
|
|
13
|
+
import it from "monaco-editor/esm/vs/editor/editor.worker?worker";
|
|
14
|
+
import at from "monaco-editor/esm/vs/language/css/css.worker?worker";
|
|
15
|
+
import ot from "monaco-editor/esm/vs/language/html/html.worker?worker";
|
|
16
|
+
import st from "monaco-editor/esm/vs/language/json/json.worker?worker";
|
|
17
|
+
import ct from "monaco-editor/esm/vs/language/typescript/ts.worker?worker";
|
|
18
|
+
import { useModals as fe, closeAllModals as lt } from "@mantine/modals";
|
|
19
|
+
function ut(t) {
|
|
20
|
+
t = t || {};
|
|
21
|
+
const n = Object.keys(t).sort(), a = [];
|
|
22
|
+
for (let o = 0; o < n.length; o++) {
|
|
23
|
+
const l = n[o];
|
|
24
|
+
if (l != "authentication" && t[l])
|
|
25
|
+
a.push(n[o] + "=" + (typeof t[l] == "object" ? JSON.stringify(t[l]) : t[l]));
|
|
25
26
|
else {
|
|
26
|
-
const
|
|
27
|
-
for (let c = 0; c <
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
const s = Object.keys(t[l]).sort();
|
|
28
|
+
for (let c = 0; c < s.length; c++) {
|
|
29
|
+
const d = s[c];
|
|
30
|
+
d != "sign" && t[l][d] && a.push(
|
|
31
|
+
s[c] + "=" + (typeof t[l][d] == "object" ? JSON.stringify(t[l][d]) : t[l][d])
|
|
31
32
|
);
|
|
32
33
|
}
|
|
33
34
|
}
|
|
34
35
|
}
|
|
35
|
-
return
|
|
36
|
+
return a.sort().join("&");
|
|
36
37
|
}
|
|
37
|
-
function
|
|
38
|
-
let
|
|
39
|
-
return
|
|
38
|
+
function dt(t, n) {
|
|
39
|
+
let a = ut(t);
|
|
40
|
+
return a += "&key=" + n, Zr.MD5(a).toString().toUpperCase();
|
|
40
41
|
}
|
|
41
|
-
const
|
|
42
|
+
const C = {
|
|
42
43
|
baseURL: "http://localhost:31200",
|
|
43
44
|
app_id: "",
|
|
44
45
|
app_secret: "",
|
|
45
|
-
getAuthentication(
|
|
46
|
+
getAuthentication(t) {
|
|
46
47
|
if (!this.app_id || !this.app_secret)
|
|
47
48
|
return;
|
|
48
|
-
const
|
|
49
|
+
const n = new Date().getTime().toString();
|
|
49
50
|
return {
|
|
50
51
|
app_id: this.app_id,
|
|
51
|
-
nonce_str:
|
|
52
|
-
sign:
|
|
52
|
+
nonce_str: n,
|
|
53
|
+
sign: dt(
|
|
53
54
|
{
|
|
54
55
|
app_id: this.app_id,
|
|
55
|
-
nonce_str:
|
|
56
|
-
...
|
|
56
|
+
nonce_str: n,
|
|
57
|
+
...t
|
|
57
58
|
},
|
|
58
59
|
this.app_secret
|
|
59
60
|
)
|
|
60
61
|
};
|
|
61
62
|
},
|
|
62
|
-
getRequest(
|
|
63
|
-
return (
|
|
64
|
-
const
|
|
63
|
+
getRequest(t) {
|
|
64
|
+
return (n, a, o = {}) => {
|
|
65
|
+
const l = window.localStorage.getItem("token"), s = {
|
|
65
66
|
"X-Requested-With": "XMLHttpRequest",
|
|
66
67
|
"Content-Type": o.string ? "application/x-www-form-urlencoded" : "application/json",
|
|
67
|
-
authorization:
|
|
68
|
+
authorization: l ? `bearer ${l}` : "",
|
|
68
69
|
...o.headers
|
|
69
70
|
}, c = {
|
|
70
71
|
baseURL: this.baseURL,
|
|
71
|
-
method:
|
|
72
|
-
url:
|
|
73
|
-
params:
|
|
74
|
-
headers:
|
|
72
|
+
method: t,
|
|
73
|
+
url: n,
|
|
74
|
+
params: t === "GET" ? a : o.params,
|
|
75
|
+
headers: s
|
|
75
76
|
};
|
|
76
|
-
return ["POST", "PUT"].includes(
|
|
77
|
+
return ["POST", "PUT"].includes(t) && (c.data = o.string ? JSON.stringify(a) : a, c.data.authentication = this.getAuthentication(c.data)), Qr(c).then((d) => d.data).catch((d) => et.has(d, "response.data.detail.message") ? Promise.reject(new Error(d.response.data.detail.message)) : Promise.reject(d));
|
|
77
78
|
};
|
|
78
79
|
}
|
|
79
80
|
};
|
|
80
|
-
function
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
const
|
|
84
|
-
login: async (
|
|
85
|
-
const
|
|
86
|
-
name:
|
|
87
|
-
password:
|
|
81
|
+
function pe(t) {
|
|
82
|
+
C.baseURL !== t.apiBaseURL && (C.baseURL = t.apiBaseURL), t.app_id && (C.app_id = t.app_id), t.app_secret && (C.app_secret = t.app_secret);
|
|
83
|
+
}
|
|
84
|
+
const ft = {
|
|
85
|
+
login: async (t, n) => {
|
|
86
|
+
const a = {
|
|
87
|
+
name: t,
|
|
88
|
+
password: n
|
|
88
89
|
};
|
|
89
|
-
return await
|
|
90
|
+
return await C.getRequest("POST")("/account/login", a);
|
|
90
91
|
},
|
|
91
|
-
list: async () => await
|
|
92
|
+
list: async () => await C.getRequest("POST")("/account/list", {
|
|
92
93
|
filter: {},
|
|
93
94
|
sort: [
|
|
94
95
|
{
|
|
@@ -101,34 +102,34 @@ const pn = {
|
|
|
101
102
|
pagesize: 100
|
|
102
103
|
}
|
|
103
104
|
}),
|
|
104
|
-
get: async () => await
|
|
105
|
-
update: async (
|
|
106
|
-
const
|
|
107
|
-
name:
|
|
108
|
-
email:
|
|
105
|
+
get: async () => await C.getRequest("GET")("/account/get", {}),
|
|
106
|
+
update: async (t, n) => {
|
|
107
|
+
const a = {
|
|
108
|
+
name: t,
|
|
109
|
+
email: n
|
|
109
110
|
};
|
|
110
|
-
return await
|
|
111
|
+
return await C.getRequest("PUT")("/account/update", a);
|
|
111
112
|
},
|
|
112
|
-
changepassword: async (
|
|
113
|
-
const
|
|
114
|
-
old_password:
|
|
115
|
-
new_password:
|
|
113
|
+
changepassword: async (t, n) => {
|
|
114
|
+
const a = {
|
|
115
|
+
old_password: t,
|
|
116
|
+
new_password: n
|
|
116
117
|
};
|
|
117
|
-
return await
|
|
118
|
+
return await C.getRequest("POST")("/account/changepassword", a);
|
|
118
119
|
},
|
|
119
|
-
create: async (
|
|
120
|
-
name:
|
|
121
|
-
email:
|
|
122
|
-
password:
|
|
120
|
+
create: async (t, n, a, o) => await C.getRequest("POST")("/account/create", {
|
|
121
|
+
name: t,
|
|
122
|
+
email: n,
|
|
123
|
+
password: a,
|
|
123
124
|
role_id: o
|
|
124
125
|
}),
|
|
125
|
-
edit: async (
|
|
126
|
-
delete: async (
|
|
127
|
-
if (!!
|
|
128
|
-
return
|
|
126
|
+
edit: async (t) => (t.reset_password || (t.new_password = void 0), await C.getRequest("PUT")("/account/edit", t)),
|
|
127
|
+
delete: async (t) => {
|
|
128
|
+
if (!!t)
|
|
129
|
+
return C.getRequest("POST")("/account/delete", { id: t });
|
|
129
130
|
}
|
|
130
|
-
},
|
|
131
|
-
list: async () => await
|
|
131
|
+
}, pt = {
|
|
132
|
+
list: async () => await C.getRequest("POST")("/api/key/list", {
|
|
132
133
|
filter: {
|
|
133
134
|
search: ""
|
|
134
135
|
},
|
|
@@ -143,16 +144,16 @@ const pn = {
|
|
|
143
144
|
pagesize: 100
|
|
144
145
|
}
|
|
145
146
|
}),
|
|
146
|
-
create: async (
|
|
147
|
-
name:
|
|
148
|
-
role_id:
|
|
147
|
+
create: async (t, n) => C.getRequest("POST")("/api/key/create", {
|
|
148
|
+
name: t,
|
|
149
|
+
role_id: n
|
|
149
150
|
}),
|
|
150
|
-
delete: async (
|
|
151
|
-
if (!!
|
|
152
|
-
return
|
|
151
|
+
delete: async (t) => {
|
|
152
|
+
if (!!t)
|
|
153
|
+
return C.getRequest("POST")("/api/key/delete", { id: t });
|
|
153
154
|
}
|
|
154
|
-
},
|
|
155
|
-
list: async () => await
|
|
155
|
+
}, gt = {
|
|
156
|
+
list: async () => await C.getRequest("POST")("/datasource/list", {
|
|
156
157
|
filter: {},
|
|
157
158
|
sort: [
|
|
158
159
|
{
|
|
@@ -165,29 +166,29 @@ const pn = {
|
|
|
165
166
|
pagesize: 100
|
|
166
167
|
}
|
|
167
168
|
}),
|
|
168
|
-
create: async (
|
|
169
|
-
type:
|
|
170
|
-
key:
|
|
171
|
-
config:
|
|
169
|
+
create: async (t, n, a) => await C.getRequest("POST")("/datasource/create", {
|
|
170
|
+
type: t,
|
|
171
|
+
key: n,
|
|
172
|
+
config: a
|
|
172
173
|
}),
|
|
173
|
-
delete: async (
|
|
174
|
-
await
|
|
174
|
+
delete: async (t) => {
|
|
175
|
+
await C.getRequest("POST")("/datasource/delete", { id: t });
|
|
175
176
|
}
|
|
176
|
-
},
|
|
177
|
-
list: async () => await
|
|
178
|
-
},
|
|
179
|
-
datasource:
|
|
180
|
-
account:
|
|
181
|
-
role:
|
|
182
|
-
api_key:
|
|
183
|
-
},
|
|
177
|
+
}, mt = {
|
|
178
|
+
list: async () => await C.getRequest("GET")("/role/list", {})
|
|
179
|
+
}, j = {
|
|
180
|
+
datasource: gt,
|
|
181
|
+
account: ft,
|
|
182
|
+
role: mt,
|
|
183
|
+
api_key: pt
|
|
184
|
+
}, X = {
|
|
184
185
|
size: "sm",
|
|
185
186
|
spacing: "md",
|
|
186
187
|
button: {
|
|
187
188
|
size: "xs"
|
|
188
189
|
}
|
|
189
190
|
};
|
|
190
|
-
var
|
|
191
|
+
var ge = { exports: {} }, re = {};
|
|
191
192
|
/**
|
|
192
193
|
* @license React
|
|
193
194
|
* react-jsx-runtime.production.min.js
|
|
@@ -197,25 +198,25 @@ var ir = { exports: {} }, Le = {};
|
|
|
197
198
|
* This source code is licensed under the MIT license found in the
|
|
198
199
|
* LICENSE file in the root directory of this source tree.
|
|
199
200
|
*/
|
|
200
|
-
var
|
|
201
|
-
function
|
|
202
|
-
if (
|
|
203
|
-
return
|
|
204
|
-
|
|
205
|
-
var
|
|
206
|
-
function c(
|
|
207
|
-
var
|
|
208
|
-
|
|
209
|
-
for (
|
|
210
|
-
o.call(
|
|
211
|
-
if (
|
|
212
|
-
for (
|
|
213
|
-
|
|
214
|
-
return { $$typeof:
|
|
201
|
+
var ar;
|
|
202
|
+
function ht() {
|
|
203
|
+
if (ar)
|
|
204
|
+
return re;
|
|
205
|
+
ar = 1;
|
|
206
|
+
var t = H, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), o = Object.prototype.hasOwnProperty, l = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
207
|
+
function c(d, p, b) {
|
|
208
|
+
var S, m = {}, f = null, z = null;
|
|
209
|
+
b !== void 0 && (f = "" + b), p.key !== void 0 && (f = "" + p.key), p.ref !== void 0 && (z = p.ref);
|
|
210
|
+
for (S in p)
|
|
211
|
+
o.call(p, S) && !s.hasOwnProperty(S) && (m[S] = p[S]);
|
|
212
|
+
if (d && d.defaultProps)
|
|
213
|
+
for (S in p = d.defaultProps, p)
|
|
214
|
+
m[S] === void 0 && (m[S] = p[S]);
|
|
215
|
+
return { $$typeof: n, type: d, key: f, ref: z, props: m, _owner: l.current };
|
|
215
216
|
}
|
|
216
|
-
return
|
|
217
|
+
return re.Fragment = a, re.jsx = c, re.jsxs = c, re;
|
|
217
218
|
}
|
|
218
|
-
var
|
|
219
|
+
var te = {};
|
|
219
220
|
/**
|
|
220
221
|
* @license React
|
|
221
222
|
* react-jsx-runtime.development.js
|
|
@@ -225,87 +226,87 @@ var Ue = {};
|
|
|
225
226
|
* This source code is licensed under the MIT license found in the
|
|
226
227
|
* LICENSE file in the root directory of this source tree.
|
|
227
228
|
*/
|
|
228
|
-
var
|
|
229
|
-
function
|
|
230
|
-
return
|
|
231
|
-
var
|
|
232
|
-
function
|
|
233
|
-
if (
|
|
229
|
+
var or;
|
|
230
|
+
function vt() {
|
|
231
|
+
return or || (or = 1, process.env.NODE_ENV !== "production" && function() {
|
|
232
|
+
var t = H, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), o = Symbol.for("react.fragment"), l = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), c = Symbol.for("react.provider"), d = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), b = Symbol.for("react.suspense"), S = Symbol.for("react.suspense_list"), m = Symbol.for("react.memo"), f = Symbol.for("react.lazy"), z = Symbol.for("react.offscreen"), q = Symbol.iterator, $ = "@@iterator";
|
|
233
|
+
function he(e) {
|
|
234
|
+
if (e === null || typeof e != "object")
|
|
234
235
|
return null;
|
|
235
|
-
var
|
|
236
|
-
return typeof
|
|
236
|
+
var i = q && e[q] || e[$];
|
|
237
|
+
return typeof i == "function" ? i : null;
|
|
237
238
|
}
|
|
238
|
-
var
|
|
239
|
-
function
|
|
239
|
+
var U = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
240
|
+
function A(e) {
|
|
240
241
|
{
|
|
241
|
-
for (var
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
for (var i = arguments.length, u = new Array(i > 1 ? i - 1 : 0), g = 1; g < i; g++)
|
|
243
|
+
u[g - 1] = arguments[g];
|
|
244
|
+
dr("error", e, u);
|
|
244
245
|
}
|
|
245
246
|
}
|
|
246
|
-
function
|
|
247
|
+
function dr(e, i, u) {
|
|
247
248
|
{
|
|
248
|
-
var
|
|
249
|
-
|
|
250
|
-
var
|
|
251
|
-
return String(
|
|
249
|
+
var g = U.ReactDebugCurrentFrame, _ = g.getStackAddendum();
|
|
250
|
+
_ !== "" && (i += "%s", u = u.concat([_]));
|
|
251
|
+
var y = u.map(function(w) {
|
|
252
|
+
return String(w);
|
|
252
253
|
});
|
|
253
|
-
|
|
254
|
+
y.unshift("Warning: " + i), Function.prototype.apply.call(console[e], console, y);
|
|
254
255
|
}
|
|
255
256
|
}
|
|
256
|
-
var
|
|
257
|
-
|
|
258
|
-
function
|
|
259
|
-
return !!(typeof
|
|
257
|
+
var fr = !1, pr = !1, gr = !1, mr = !1, hr = !1, Ie;
|
|
258
|
+
Ie = Symbol.for("react.module.reference");
|
|
259
|
+
function vr(e) {
|
|
260
|
+
return !!(typeof e == "string" || typeof e == "function" || e === o || e === s || hr || e === l || e === b || e === S || mr || e === z || fr || pr || gr || typeof e == "object" && e !== null && (e.$$typeof === f || e.$$typeof === m || e.$$typeof === c || e.$$typeof === d || e.$$typeof === p || e.$$typeof === Ie || e.getModuleId !== void 0));
|
|
260
261
|
}
|
|
261
|
-
function
|
|
262
|
-
var
|
|
263
|
-
if (
|
|
264
|
-
return
|
|
265
|
-
var
|
|
266
|
-
return
|
|
262
|
+
function br(e, i, u) {
|
|
263
|
+
var g = e.displayName;
|
|
264
|
+
if (g)
|
|
265
|
+
return g;
|
|
266
|
+
var _ = i.displayName || i.name || "";
|
|
267
|
+
return _ !== "" ? u + "(" + _ + ")" : u;
|
|
267
268
|
}
|
|
268
|
-
function
|
|
269
|
-
return
|
|
269
|
+
function Fe(e) {
|
|
270
|
+
return e.displayName || "Context";
|
|
270
271
|
}
|
|
271
|
-
function
|
|
272
|
-
if (
|
|
272
|
+
function L(e) {
|
|
273
|
+
if (e == null)
|
|
273
274
|
return null;
|
|
274
|
-
if (typeof
|
|
275
|
-
return
|
|
276
|
-
if (typeof
|
|
277
|
-
return
|
|
278
|
-
switch (
|
|
275
|
+
if (typeof e.tag == "number" && A("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
276
|
+
return e.displayName || e.name || null;
|
|
277
|
+
if (typeof e == "string")
|
|
278
|
+
return e;
|
|
279
|
+
switch (e) {
|
|
279
280
|
case o:
|
|
280
281
|
return "Fragment";
|
|
281
|
-
case
|
|
282
|
+
case a:
|
|
282
283
|
return "Portal";
|
|
283
|
-
case i:
|
|
284
|
-
return "Profiler";
|
|
285
284
|
case s:
|
|
285
|
+
return "Profiler";
|
|
286
|
+
case l:
|
|
286
287
|
return "StrictMode";
|
|
287
|
-
case m:
|
|
288
|
-
return "Suspense";
|
|
289
288
|
case b:
|
|
289
|
+
return "Suspense";
|
|
290
|
+
case S:
|
|
290
291
|
return "SuspenseList";
|
|
291
292
|
}
|
|
292
|
-
if (typeof
|
|
293
|
-
switch (
|
|
294
|
-
case u:
|
|
295
|
-
var f = n;
|
|
296
|
-
return ye(f) + ".Consumer";
|
|
297
|
-
case c:
|
|
298
|
-
var y = n;
|
|
299
|
-
return ye(y._context) + ".Provider";
|
|
293
|
+
if (typeof e == "object")
|
|
294
|
+
switch (e.$$typeof) {
|
|
300
295
|
case d:
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
296
|
+
var i = e;
|
|
297
|
+
return Fe(i) + ".Consumer";
|
|
298
|
+
case c:
|
|
299
|
+
var u = e;
|
|
300
|
+
return Fe(u._context) + ".Provider";
|
|
301
|
+
case p:
|
|
302
|
+
return br(e, e.render, "ForwardRef");
|
|
303
|
+
case m:
|
|
304
|
+
var g = e.displayName || null;
|
|
305
|
+
return g !== null ? g : L(e.type) || "Memo";
|
|
306
|
+
case f: {
|
|
307
|
+
var _ = e, y = _._payload, w = _._init;
|
|
307
308
|
try {
|
|
308
|
-
return
|
|
309
|
+
return L(w(y));
|
|
309
310
|
} catch {
|
|
310
311
|
return null;
|
|
311
312
|
}
|
|
@@ -313,512 +314,512 @@ function yn() {
|
|
|
313
314
|
}
|
|
314
315
|
return null;
|
|
315
316
|
}
|
|
316
|
-
var
|
|
317
|
-
function
|
|
317
|
+
var Y = Object.assign, Q = 0, qe, Le, Me, Ne, Ue, We, Ve;
|
|
318
|
+
function $e() {
|
|
318
319
|
}
|
|
319
|
-
|
|
320
|
-
function
|
|
320
|
+
$e.__reactDisabledLog = !0;
|
|
321
|
+
function wr() {
|
|
321
322
|
{
|
|
322
|
-
if (
|
|
323
|
-
|
|
324
|
-
var
|
|
323
|
+
if (Q === 0) {
|
|
324
|
+
qe = console.log, Le = console.info, Me = console.warn, Ne = console.error, Ue = console.group, We = console.groupCollapsed, Ve = console.groupEnd;
|
|
325
|
+
var e = {
|
|
325
326
|
configurable: !0,
|
|
326
327
|
enumerable: !0,
|
|
327
|
-
value:
|
|
328
|
+
value: $e,
|
|
328
329
|
writable: !0
|
|
329
330
|
};
|
|
330
331
|
Object.defineProperties(console, {
|
|
331
|
-
info:
|
|
332
|
-
log:
|
|
333
|
-
warn:
|
|
334
|
-
error:
|
|
335
|
-
group:
|
|
336
|
-
groupCollapsed:
|
|
337
|
-
groupEnd:
|
|
332
|
+
info: e,
|
|
333
|
+
log: e,
|
|
334
|
+
warn: e,
|
|
335
|
+
error: e,
|
|
336
|
+
group: e,
|
|
337
|
+
groupCollapsed: e,
|
|
338
|
+
groupEnd: e
|
|
338
339
|
});
|
|
339
340
|
}
|
|
340
|
-
|
|
341
|
+
Q++;
|
|
341
342
|
}
|
|
342
343
|
}
|
|
343
|
-
function
|
|
344
|
+
function Sr() {
|
|
344
345
|
{
|
|
345
|
-
if (
|
|
346
|
-
var
|
|
346
|
+
if (Q--, Q === 0) {
|
|
347
|
+
var e = {
|
|
347
348
|
configurable: !0,
|
|
348
349
|
enumerable: !0,
|
|
349
350
|
writable: !0
|
|
350
351
|
};
|
|
351
352
|
Object.defineProperties(console, {
|
|
352
|
-
log:
|
|
353
|
-
value:
|
|
353
|
+
log: Y({}, e, {
|
|
354
|
+
value: qe
|
|
354
355
|
}),
|
|
355
|
-
info:
|
|
356
|
-
value:
|
|
356
|
+
info: Y({}, e, {
|
|
357
|
+
value: Le
|
|
357
358
|
}),
|
|
358
|
-
warn:
|
|
359
|
-
value:
|
|
359
|
+
warn: Y({}, e, {
|
|
360
|
+
value: Me
|
|
360
361
|
}),
|
|
361
|
-
error:
|
|
362
|
-
value:
|
|
362
|
+
error: Y({}, e, {
|
|
363
|
+
value: Ne
|
|
363
364
|
}),
|
|
364
|
-
group:
|
|
365
|
-
value:
|
|
365
|
+
group: Y({}, e, {
|
|
366
|
+
value: Ue
|
|
366
367
|
}),
|
|
367
|
-
groupCollapsed:
|
|
368
|
-
value:
|
|
368
|
+
groupCollapsed: Y({}, e, {
|
|
369
|
+
value: We
|
|
369
370
|
}),
|
|
370
|
-
groupEnd:
|
|
371
|
-
value:
|
|
371
|
+
groupEnd: Y({}, e, {
|
|
372
|
+
value: Ve
|
|
372
373
|
})
|
|
373
374
|
});
|
|
374
375
|
}
|
|
375
|
-
|
|
376
|
+
Q < 0 && A("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
376
377
|
}
|
|
377
378
|
}
|
|
378
|
-
var
|
|
379
|
-
function
|
|
379
|
+
var ve = U.ReactCurrentDispatcher, be;
|
|
380
|
+
function ie(e, i, u) {
|
|
380
381
|
{
|
|
381
|
-
if (
|
|
382
|
+
if (be === void 0)
|
|
382
383
|
try {
|
|
383
384
|
throw Error();
|
|
384
|
-
} catch (
|
|
385
|
-
var
|
|
386
|
-
|
|
385
|
+
} catch (_) {
|
|
386
|
+
var g = _.stack.trim().match(/\n( *(at )?)/);
|
|
387
|
+
be = g && g[1] || "";
|
|
387
388
|
}
|
|
388
389
|
return `
|
|
389
|
-
` +
|
|
390
|
+
` + be + e;
|
|
390
391
|
}
|
|
391
392
|
}
|
|
392
|
-
var
|
|
393
|
+
var we = !1, ae;
|
|
393
394
|
{
|
|
394
|
-
var
|
|
395
|
-
|
|
395
|
+
var _r = typeof WeakMap == "function" ? WeakMap : Map;
|
|
396
|
+
ae = new _r();
|
|
396
397
|
}
|
|
397
|
-
function
|
|
398
|
-
if (!
|
|
398
|
+
function Ye(e, i) {
|
|
399
|
+
if (!e || we)
|
|
399
400
|
return "";
|
|
400
401
|
{
|
|
401
|
-
var
|
|
402
|
-
if (
|
|
403
|
-
return
|
|
402
|
+
var u = ae.get(e);
|
|
403
|
+
if (u !== void 0)
|
|
404
|
+
return u;
|
|
404
405
|
}
|
|
405
|
-
var
|
|
406
|
-
|
|
407
|
-
var
|
|
406
|
+
var g;
|
|
407
|
+
we = !0;
|
|
408
|
+
var _ = Error.prepareStackTrace;
|
|
408
409
|
Error.prepareStackTrace = void 0;
|
|
409
|
-
var
|
|
410
|
-
|
|
410
|
+
var y;
|
|
411
|
+
y = ve.current, ve.current = null, wr();
|
|
411
412
|
try {
|
|
412
|
-
if (
|
|
413
|
-
var
|
|
413
|
+
if (i) {
|
|
414
|
+
var w = function() {
|
|
414
415
|
throw Error();
|
|
415
416
|
};
|
|
416
|
-
if (Object.defineProperty(
|
|
417
|
+
if (Object.defineProperty(w.prototype, "props", {
|
|
417
418
|
set: function() {
|
|
418
419
|
throw Error();
|
|
419
420
|
}
|
|
420
421
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
421
422
|
try {
|
|
422
|
-
Reflect.construct(
|
|
423
|
-
} catch (
|
|
424
|
-
|
|
423
|
+
Reflect.construct(w, []);
|
|
424
|
+
} catch (M) {
|
|
425
|
+
g = M;
|
|
425
426
|
}
|
|
426
|
-
Reflect.construct(
|
|
427
|
+
Reflect.construct(e, [], w);
|
|
427
428
|
} else {
|
|
428
429
|
try {
|
|
429
|
-
|
|
430
|
-
} catch (
|
|
431
|
-
|
|
430
|
+
w.call();
|
|
431
|
+
} catch (M) {
|
|
432
|
+
g = M;
|
|
432
433
|
}
|
|
433
|
-
|
|
434
|
+
e.call(w.prototype);
|
|
434
435
|
}
|
|
435
436
|
} else {
|
|
436
437
|
try {
|
|
437
438
|
throw Error();
|
|
438
|
-
} catch (
|
|
439
|
-
|
|
439
|
+
} catch (M) {
|
|
440
|
+
g = M;
|
|
440
441
|
}
|
|
441
|
-
|
|
442
|
+
e();
|
|
442
443
|
}
|
|
443
|
-
} catch (
|
|
444
|
-
if (
|
|
445
|
-
for (var
|
|
446
|
-
`),
|
|
447
|
-
`),
|
|
448
|
-
|
|
449
|
-
for (;
|
|
450
|
-
if (
|
|
451
|
-
if (
|
|
444
|
+
} catch (M) {
|
|
445
|
+
if (M && g && typeof M.stack == "string") {
|
|
446
|
+
for (var h = M.stack.split(`
|
|
447
|
+
`), k = g.stack.split(`
|
|
448
|
+
`), P = h.length - 1, E = k.length - 1; P >= 1 && E >= 0 && h[P] !== k[E]; )
|
|
449
|
+
E--;
|
|
450
|
+
for (; P >= 1 && E >= 0; P--, E--)
|
|
451
|
+
if (h[P] !== k[E]) {
|
|
452
|
+
if (P !== 1 || E !== 1)
|
|
452
453
|
do
|
|
453
|
-
if (
|
|
454
|
-
var
|
|
455
|
-
` +
|
|
456
|
-
return
|
|
454
|
+
if (P--, E--, E < 0 || h[P] !== k[E]) {
|
|
455
|
+
var I = `
|
|
456
|
+
` + h[P].replace(" at new ", " at ");
|
|
457
|
+
return e.displayName && I.includes("<anonymous>") && (I = I.replace("<anonymous>", e.displayName)), typeof e == "function" && ae.set(e, I), I;
|
|
457
458
|
}
|
|
458
|
-
while (
|
|
459
|
+
while (P >= 1 && E >= 0);
|
|
459
460
|
break;
|
|
460
461
|
}
|
|
461
462
|
}
|
|
462
463
|
} finally {
|
|
463
|
-
|
|
464
|
+
we = !1, ve.current = y, Sr(), Error.prepareStackTrace = _;
|
|
464
465
|
}
|
|
465
|
-
var
|
|
466
|
-
return typeof
|
|
466
|
+
var B = e ? e.displayName || e.name : "", ir = B ? ie(B) : "";
|
|
467
|
+
return typeof e == "function" && ae.set(e, ir), ir;
|
|
467
468
|
}
|
|
468
|
-
function
|
|
469
|
-
return
|
|
469
|
+
function yr(e, i, u) {
|
|
470
|
+
return Ye(e, !1);
|
|
470
471
|
}
|
|
471
|
-
function
|
|
472
|
-
var
|
|
473
|
-
return !!(
|
|
472
|
+
function Rr(e) {
|
|
473
|
+
var i = e.prototype;
|
|
474
|
+
return !!(i && i.isReactComponent);
|
|
474
475
|
}
|
|
475
|
-
function
|
|
476
|
-
if (
|
|
476
|
+
function oe(e, i, u) {
|
|
477
|
+
if (e == null)
|
|
477
478
|
return "";
|
|
478
|
-
if (typeof
|
|
479
|
-
return
|
|
480
|
-
if (typeof
|
|
481
|
-
return
|
|
482
|
-
switch (
|
|
483
|
-
case m:
|
|
484
|
-
return j("Suspense");
|
|
479
|
+
if (typeof e == "function")
|
|
480
|
+
return Ye(e, Rr(e));
|
|
481
|
+
if (typeof e == "string")
|
|
482
|
+
return ie(e);
|
|
483
|
+
switch (e) {
|
|
485
484
|
case b:
|
|
486
|
-
return
|
|
485
|
+
return ie("Suspense");
|
|
486
|
+
case S:
|
|
487
|
+
return ie("SuspenseList");
|
|
487
488
|
}
|
|
488
|
-
if (typeof
|
|
489
|
-
switch (
|
|
490
|
-
case
|
|
491
|
-
return
|
|
492
|
-
case
|
|
493
|
-
return
|
|
494
|
-
case
|
|
495
|
-
var
|
|
489
|
+
if (typeof e == "object")
|
|
490
|
+
switch (e.$$typeof) {
|
|
491
|
+
case p:
|
|
492
|
+
return yr(e.render);
|
|
493
|
+
case m:
|
|
494
|
+
return oe(e.type, i, u);
|
|
495
|
+
case f: {
|
|
496
|
+
var g = e, _ = g._payload, y = g._init;
|
|
496
497
|
try {
|
|
497
|
-
return
|
|
498
|
+
return oe(y(_), i, u);
|
|
498
499
|
} catch {
|
|
499
500
|
}
|
|
500
501
|
}
|
|
501
502
|
}
|
|
502
503
|
return "";
|
|
503
504
|
}
|
|
504
|
-
var
|
|
505
|
-
function
|
|
506
|
-
if (
|
|
507
|
-
var
|
|
508
|
-
|
|
505
|
+
var se = Object.prototype.hasOwnProperty, Ke = {}, Be = U.ReactDebugCurrentFrame;
|
|
506
|
+
function ce(e) {
|
|
507
|
+
if (e) {
|
|
508
|
+
var i = e._owner, u = oe(e.type, e._source, i ? i.type : null);
|
|
509
|
+
Be.setExtraStackFrame(u);
|
|
509
510
|
} else
|
|
510
|
-
|
|
511
|
+
Be.setExtraStackFrame(null);
|
|
511
512
|
}
|
|
512
|
-
function
|
|
513
|
+
function Pr(e, i, u, g, _) {
|
|
513
514
|
{
|
|
514
|
-
var
|
|
515
|
-
for (var
|
|
516
|
-
if (
|
|
517
|
-
var
|
|
515
|
+
var y = Function.call.bind(se);
|
|
516
|
+
for (var w in e)
|
|
517
|
+
if (y(e, w)) {
|
|
518
|
+
var h = void 0;
|
|
518
519
|
try {
|
|
519
|
-
if (typeof
|
|
520
|
-
var
|
|
521
|
-
throw
|
|
520
|
+
if (typeof e[w] != "function") {
|
|
521
|
+
var k = Error((g || "React class") + ": " + u + " type `" + w + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[w] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
522
|
+
throw k.name = "Invariant Violation", k;
|
|
522
523
|
}
|
|
523
|
-
|
|
524
|
-
} catch (
|
|
525
|
-
|
|
524
|
+
h = e[w](i, w, g, u, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
525
|
+
} catch (P) {
|
|
526
|
+
h = P;
|
|
526
527
|
}
|
|
527
|
-
|
|
528
|
+
h && !(h instanceof Error) && (ce(_), A("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", g || "React class", u, w, typeof h), ce(null)), h instanceof Error && !(h.message in Ke) && (Ke[h.message] = !0, ce(_), A("Failed %s type: %s", u, h.message), ce(null));
|
|
528
529
|
}
|
|
529
530
|
}
|
|
530
531
|
}
|
|
531
|
-
var
|
|
532
|
-
function
|
|
533
|
-
return
|
|
532
|
+
var Er = Array.isArray;
|
|
533
|
+
function Se(e) {
|
|
534
|
+
return Er(e);
|
|
534
535
|
}
|
|
535
|
-
function
|
|
536
|
+
function Cr(e) {
|
|
536
537
|
{
|
|
537
|
-
var
|
|
538
|
-
return
|
|
538
|
+
var i = typeof Symbol == "function" && Symbol.toStringTag, u = i && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
539
|
+
return u;
|
|
539
540
|
}
|
|
540
541
|
}
|
|
541
|
-
function
|
|
542
|
+
function Tr(e) {
|
|
542
543
|
try {
|
|
543
|
-
return
|
|
544
|
+
return Ge(e), !1;
|
|
544
545
|
} catch {
|
|
545
546
|
return !0;
|
|
546
547
|
}
|
|
547
548
|
}
|
|
548
|
-
function
|
|
549
|
-
return "" +
|
|
549
|
+
function Ge(e) {
|
|
550
|
+
return "" + e;
|
|
550
551
|
}
|
|
551
|
-
function
|
|
552
|
-
if (
|
|
553
|
-
return
|
|
552
|
+
function He(e) {
|
|
553
|
+
if (Tr(e))
|
|
554
|
+
return A("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Cr(e)), Ge(e);
|
|
554
555
|
}
|
|
555
|
-
var
|
|
556
|
+
var Z = U.ReactCurrentOwner, zr = {
|
|
556
557
|
key: !0,
|
|
557
558
|
ref: !0,
|
|
558
559
|
__self: !0,
|
|
559
560
|
__source: !0
|
|
560
|
-
},
|
|
561
|
-
|
|
562
|
-
function
|
|
563
|
-
if (
|
|
564
|
-
var
|
|
565
|
-
if (
|
|
561
|
+
}, Je, Xe, _e;
|
|
562
|
+
_e = {};
|
|
563
|
+
function Or(e) {
|
|
564
|
+
if (se.call(e, "ref")) {
|
|
565
|
+
var i = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
566
|
+
if (i && i.isReactWarning)
|
|
566
567
|
return !1;
|
|
567
568
|
}
|
|
568
|
-
return
|
|
569
|
+
return e.ref !== void 0;
|
|
569
570
|
}
|
|
570
|
-
function
|
|
571
|
-
if (
|
|
572
|
-
var
|
|
573
|
-
if (
|
|
571
|
+
function Ar(e) {
|
|
572
|
+
if (se.call(e, "key")) {
|
|
573
|
+
var i = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
574
|
+
if (i && i.isReactWarning)
|
|
574
575
|
return !1;
|
|
575
576
|
}
|
|
576
|
-
return
|
|
577
|
+
return e.key !== void 0;
|
|
577
578
|
}
|
|
578
|
-
function
|
|
579
|
-
if (typeof
|
|
580
|
-
var
|
|
581
|
-
|
|
579
|
+
function kr(e, i) {
|
|
580
|
+
if (typeof e.ref == "string" && Z.current && i && Z.current.stateNode !== i) {
|
|
581
|
+
var u = L(Z.current.type);
|
|
582
|
+
_e[u] || (A('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', L(Z.current.type), e.ref), _e[u] = !0);
|
|
582
583
|
}
|
|
583
584
|
}
|
|
584
|
-
function
|
|
585
|
+
function xr(e, i) {
|
|
585
586
|
{
|
|
586
|
-
var
|
|
587
|
-
|
|
587
|
+
var u = function() {
|
|
588
|
+
Je || (Je = !0, A("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", i));
|
|
588
589
|
};
|
|
589
|
-
|
|
590
|
-
get:
|
|
590
|
+
u.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
591
|
+
get: u,
|
|
591
592
|
configurable: !0
|
|
592
593
|
});
|
|
593
594
|
}
|
|
594
595
|
}
|
|
595
|
-
function
|
|
596
|
+
function Dr(e, i) {
|
|
596
597
|
{
|
|
597
|
-
var
|
|
598
|
-
|
|
598
|
+
var u = function() {
|
|
599
|
+
Xe || (Xe = !0, A("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", i));
|
|
599
600
|
};
|
|
600
|
-
|
|
601
|
-
get:
|
|
601
|
+
u.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
602
|
+
get: u,
|
|
602
603
|
configurable: !0
|
|
603
604
|
});
|
|
604
605
|
}
|
|
605
606
|
}
|
|
606
|
-
var
|
|
607
|
-
var
|
|
608
|
-
$$typeof:
|
|
609
|
-
type:
|
|
610
|
-
key:
|
|
611
|
-
ref:
|
|
612
|
-
props:
|
|
613
|
-
_owner:
|
|
607
|
+
var jr = function(e, i, u, g, _, y, w) {
|
|
608
|
+
var h = {
|
|
609
|
+
$$typeof: n,
|
|
610
|
+
type: e,
|
|
611
|
+
key: i,
|
|
612
|
+
ref: u,
|
|
613
|
+
props: w,
|
|
614
|
+
_owner: y
|
|
614
615
|
};
|
|
615
|
-
return
|
|
616
|
+
return h._store = {}, Object.defineProperty(h._store, "validated", {
|
|
616
617
|
configurable: !1,
|
|
617
618
|
enumerable: !1,
|
|
618
619
|
writable: !0,
|
|
619
620
|
value: !1
|
|
620
|
-
}), Object.defineProperty(
|
|
621
|
+
}), Object.defineProperty(h, "_self", {
|
|
621
622
|
configurable: !1,
|
|
622
623
|
enumerable: !1,
|
|
623
624
|
writable: !1,
|
|
624
|
-
value:
|
|
625
|
-
}), Object.defineProperty(
|
|
625
|
+
value: g
|
|
626
|
+
}), Object.defineProperty(h, "_source", {
|
|
626
627
|
configurable: !1,
|
|
627
628
|
enumerable: !1,
|
|
628
629
|
writable: !1,
|
|
629
|
-
value:
|
|
630
|
-
}), Object.freeze && (Object.freeze(
|
|
630
|
+
value: _
|
|
631
|
+
}), Object.freeze && (Object.freeze(h.props), Object.freeze(h)), h;
|
|
631
632
|
};
|
|
632
|
-
function
|
|
633
|
+
function Ir(e, i, u, g, _) {
|
|
633
634
|
{
|
|
634
|
-
var
|
|
635
|
-
|
|
636
|
-
for (
|
|
637
|
-
|
|
638
|
-
if (
|
|
639
|
-
var
|
|
640
|
-
for (
|
|
641
|
-
|
|
635
|
+
var y, w = {}, h = null, k = null;
|
|
636
|
+
u !== void 0 && (He(u), h = "" + u), Ar(i) && (He(i.key), h = "" + i.key), Or(i) && (k = i.ref, kr(i, _));
|
|
637
|
+
for (y in i)
|
|
638
|
+
se.call(i, y) && !zr.hasOwnProperty(y) && (w[y] = i[y]);
|
|
639
|
+
if (e && e.defaultProps) {
|
|
640
|
+
var P = e.defaultProps;
|
|
641
|
+
for (y in P)
|
|
642
|
+
w[y] === void 0 && (w[y] = P[y]);
|
|
642
643
|
}
|
|
643
|
-
if (
|
|
644
|
-
var
|
|
645
|
-
|
|
644
|
+
if (h || k) {
|
|
645
|
+
var E = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
646
|
+
h && xr(w, E), k && Dr(w, E);
|
|
646
647
|
}
|
|
647
|
-
return
|
|
648
|
+
return jr(e, h, k, _, g, Z.current, w);
|
|
648
649
|
}
|
|
649
650
|
}
|
|
650
|
-
var
|
|
651
|
-
function
|
|
652
|
-
if (
|
|
653
|
-
var
|
|
654
|
-
|
|
651
|
+
var ye = U.ReactCurrentOwner, Qe = U.ReactDebugCurrentFrame;
|
|
652
|
+
function K(e) {
|
|
653
|
+
if (e) {
|
|
654
|
+
var i = e._owner, u = oe(e.type, e._source, i ? i.type : null);
|
|
655
|
+
Qe.setExtraStackFrame(u);
|
|
655
656
|
} else
|
|
656
|
-
|
|
657
|
+
Qe.setExtraStackFrame(null);
|
|
657
658
|
}
|
|
658
|
-
var
|
|
659
|
-
|
|
660
|
-
function
|
|
661
|
-
return typeof
|
|
659
|
+
var Re;
|
|
660
|
+
Re = !1;
|
|
661
|
+
function Pe(e) {
|
|
662
|
+
return typeof e == "object" && e !== null && e.$$typeof === n;
|
|
662
663
|
}
|
|
663
|
-
function
|
|
664
|
+
function Ze() {
|
|
664
665
|
{
|
|
665
|
-
if (
|
|
666
|
-
var
|
|
667
|
-
if (
|
|
666
|
+
if (ye.current) {
|
|
667
|
+
var e = L(ye.current.type);
|
|
668
|
+
if (e)
|
|
668
669
|
return `
|
|
669
670
|
|
|
670
|
-
Check the render method of \`` +
|
|
671
|
+
Check the render method of \`` + e + "`.";
|
|
671
672
|
}
|
|
672
673
|
return "";
|
|
673
674
|
}
|
|
674
675
|
}
|
|
675
|
-
function
|
|
676
|
+
function Fr(e) {
|
|
676
677
|
{
|
|
677
|
-
if (
|
|
678
|
-
var
|
|
678
|
+
if (e !== void 0) {
|
|
679
|
+
var i = e.fileName.replace(/^.*[\\\/]/, ""), u = e.lineNumber;
|
|
679
680
|
return `
|
|
680
681
|
|
|
681
|
-
Check your code at ` +
|
|
682
|
+
Check your code at ` + i + ":" + u + ".";
|
|
682
683
|
}
|
|
683
684
|
return "";
|
|
684
685
|
}
|
|
685
686
|
}
|
|
686
|
-
var
|
|
687
|
-
function
|
|
687
|
+
var er = {};
|
|
688
|
+
function qr(e) {
|
|
688
689
|
{
|
|
689
|
-
var
|
|
690
|
-
if (!
|
|
691
|
-
var
|
|
692
|
-
|
|
690
|
+
var i = Ze();
|
|
691
|
+
if (!i) {
|
|
692
|
+
var u = typeof e == "string" ? e : e.displayName || e.name;
|
|
693
|
+
u && (i = `
|
|
693
694
|
|
|
694
|
-
Check the top-level render call using <` +
|
|
695
|
+
Check the top-level render call using <` + u + ">.");
|
|
695
696
|
}
|
|
696
|
-
return
|
|
697
|
+
return i;
|
|
697
698
|
}
|
|
698
699
|
}
|
|
699
|
-
function
|
|
700
|
+
function rr(e, i) {
|
|
700
701
|
{
|
|
701
|
-
if (!
|
|
702
|
+
if (!e._store || e._store.validated || e.key != null)
|
|
702
703
|
return;
|
|
703
|
-
|
|
704
|
-
var
|
|
705
|
-
if (
|
|
704
|
+
e._store.validated = !0;
|
|
705
|
+
var u = qr(i);
|
|
706
|
+
if (er[u])
|
|
706
707
|
return;
|
|
707
|
-
|
|
708
|
-
var
|
|
709
|
-
|
|
708
|
+
er[u] = !0;
|
|
709
|
+
var g = "";
|
|
710
|
+
e && e._owner && e._owner !== ye.current && (g = " It was passed a child from " + L(e._owner.type) + "."), K(e), A('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', u, g), K(null);
|
|
710
711
|
}
|
|
711
712
|
}
|
|
712
|
-
function
|
|
713
|
+
function tr(e, i) {
|
|
713
714
|
{
|
|
714
|
-
if (typeof
|
|
715
|
+
if (typeof e != "object")
|
|
715
716
|
return;
|
|
716
|
-
if (
|
|
717
|
-
for (var
|
|
718
|
-
var
|
|
719
|
-
|
|
717
|
+
if (Se(e))
|
|
718
|
+
for (var u = 0; u < e.length; u++) {
|
|
719
|
+
var g = e[u];
|
|
720
|
+
Pe(g) && rr(g, i);
|
|
720
721
|
}
|
|
721
|
-
else if (
|
|
722
|
-
|
|
723
|
-
else if (
|
|
724
|
-
var
|
|
725
|
-
if (typeof
|
|
726
|
-
for (var
|
|
727
|
-
|
|
722
|
+
else if (Pe(e))
|
|
723
|
+
e._store && (e._store.validated = !0);
|
|
724
|
+
else if (e) {
|
|
725
|
+
var _ = he(e);
|
|
726
|
+
if (typeof _ == "function" && _ !== e.entries)
|
|
727
|
+
for (var y = _.call(e), w; !(w = y.next()).done; )
|
|
728
|
+
Pe(w.value) && rr(w.value, i);
|
|
728
729
|
}
|
|
729
730
|
}
|
|
730
731
|
}
|
|
731
|
-
function
|
|
732
|
+
function Lr(e) {
|
|
732
733
|
{
|
|
733
|
-
var
|
|
734
|
-
if (
|
|
734
|
+
var i = e.type;
|
|
735
|
+
if (i == null || typeof i == "string")
|
|
735
736
|
return;
|
|
736
|
-
var
|
|
737
|
-
if (typeof
|
|
738
|
-
|
|
739
|
-
else if (typeof
|
|
740
|
-
|
|
737
|
+
var u;
|
|
738
|
+
if (typeof i == "function")
|
|
739
|
+
u = i.propTypes;
|
|
740
|
+
else if (typeof i == "object" && (i.$$typeof === p || i.$$typeof === m))
|
|
741
|
+
u = i.propTypes;
|
|
741
742
|
else
|
|
742
743
|
return;
|
|
743
|
-
if (
|
|
744
|
-
var
|
|
745
|
-
|
|
746
|
-
} else if (
|
|
747
|
-
|
|
748
|
-
var
|
|
749
|
-
|
|
744
|
+
if (u) {
|
|
745
|
+
var g = L(i);
|
|
746
|
+
Pr(u, e.props, "prop", g, e);
|
|
747
|
+
} else if (i.PropTypes !== void 0 && !Re) {
|
|
748
|
+
Re = !0;
|
|
749
|
+
var _ = L(i);
|
|
750
|
+
A("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", _ || "Unknown");
|
|
750
751
|
}
|
|
751
|
-
typeof
|
|
752
|
+
typeof i.getDefaultProps == "function" && !i.getDefaultProps.isReactClassApproved && A("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
752
753
|
}
|
|
753
754
|
}
|
|
754
|
-
function
|
|
755
|
+
function Mr(e) {
|
|
755
756
|
{
|
|
756
|
-
for (var
|
|
757
|
-
var
|
|
758
|
-
if (
|
|
759
|
-
|
|
757
|
+
for (var i = Object.keys(e.props), u = 0; u < i.length; u++) {
|
|
758
|
+
var g = i[u];
|
|
759
|
+
if (g !== "children" && g !== "key") {
|
|
760
|
+
K(e), A("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", g), K(null);
|
|
760
761
|
break;
|
|
761
762
|
}
|
|
762
763
|
}
|
|
763
|
-
|
|
764
|
+
e.ref !== null && (K(e), A("Invalid attribute `ref` supplied to `React.Fragment`."), K(null));
|
|
764
765
|
}
|
|
765
766
|
}
|
|
766
|
-
function
|
|
767
|
+
function nr(e, i, u, g, _, y) {
|
|
767
768
|
{
|
|
768
|
-
var
|
|
769
|
-
if (!
|
|
770
|
-
var
|
|
771
|
-
(
|
|
772
|
-
var
|
|
773
|
-
|
|
774
|
-
var
|
|
775
|
-
|
|
769
|
+
var w = vr(e);
|
|
770
|
+
if (!w) {
|
|
771
|
+
var h = "";
|
|
772
|
+
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (h += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
773
|
+
var k = Fr(_);
|
|
774
|
+
k ? h += k : h += Ze();
|
|
775
|
+
var P;
|
|
776
|
+
e === null ? P = "null" : Se(e) ? P = "array" : e !== void 0 && e.$$typeof === n ? (P = "<" + (L(e.type) || "Unknown") + " />", h = " Did you accidentally export a JSX literal instead of a component?") : P = typeof e, A("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", P, h);
|
|
776
777
|
}
|
|
777
|
-
var
|
|
778
|
-
if (
|
|
779
|
-
return
|
|
780
|
-
if (
|
|
781
|
-
var
|
|
782
|
-
if (
|
|
783
|
-
if (
|
|
784
|
-
if (
|
|
785
|
-
for (var
|
|
786
|
-
|
|
787
|
-
Object.freeze && Object.freeze(
|
|
778
|
+
var E = Ir(e, i, u, _, y);
|
|
779
|
+
if (E == null)
|
|
780
|
+
return E;
|
|
781
|
+
if (w) {
|
|
782
|
+
var I = i.children;
|
|
783
|
+
if (I !== void 0)
|
|
784
|
+
if (g)
|
|
785
|
+
if (Se(I)) {
|
|
786
|
+
for (var B = 0; B < I.length; B++)
|
|
787
|
+
tr(I[B], e);
|
|
788
|
+
Object.freeze && Object.freeze(I);
|
|
788
789
|
} else
|
|
789
|
-
|
|
790
|
+
A("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
790
791
|
else
|
|
791
|
-
|
|
792
|
+
tr(I, e);
|
|
792
793
|
}
|
|
793
|
-
return
|
|
794
|
+
return e === o ? Mr(E) : Lr(E), E;
|
|
794
795
|
}
|
|
795
796
|
}
|
|
796
|
-
function
|
|
797
|
-
return
|
|
797
|
+
function Nr(e, i, u) {
|
|
798
|
+
return nr(e, i, u, !0);
|
|
798
799
|
}
|
|
799
|
-
function
|
|
800
|
-
return
|
|
800
|
+
function Ur(e, i, u) {
|
|
801
|
+
return nr(e, i, u, !1);
|
|
801
802
|
}
|
|
802
|
-
var
|
|
803
|
-
|
|
804
|
-
}()),
|
|
803
|
+
var Wr = Ur, Vr = Nr;
|
|
804
|
+
te.Fragment = o, te.jsx = Wr, te.jsxs = Vr;
|
|
805
|
+
}()), te;
|
|
805
806
|
}
|
|
806
|
-
(function(
|
|
807
|
-
process.env.NODE_ENV === "production" ?
|
|
808
|
-
})(
|
|
809
|
-
const
|
|
810
|
-
function
|
|
811
|
-
submit:
|
|
812
|
-
styles:
|
|
813
|
-
type:
|
|
807
|
+
(function(t) {
|
|
808
|
+
process.env.NODE_ENV === "production" ? t.exports = ht() : t.exports = vt();
|
|
809
|
+
})(ge);
|
|
810
|
+
const N = ge.exports.Fragment, r = ge.exports.jsx, v = ge.exports.jsxs;
|
|
811
|
+
function bt({
|
|
812
|
+
submit: t,
|
|
813
|
+
styles: n = X,
|
|
814
|
+
type: a
|
|
814
815
|
}) {
|
|
815
816
|
const {
|
|
816
817
|
control: o,
|
|
817
|
-
setValue:
|
|
818
|
-
handleSubmit:
|
|
819
|
-
} =
|
|
818
|
+
setValue: l,
|
|
819
|
+
handleSubmit: s
|
|
820
|
+
} = J({
|
|
820
821
|
defaultValues: {
|
|
821
|
-
type:
|
|
822
|
+
type: a,
|
|
822
823
|
key: "",
|
|
823
824
|
config: {
|
|
824
825
|
host: "",
|
|
@@ -829,38 +830,38 @@ function bn({
|
|
|
829
830
|
}
|
|
830
831
|
}
|
|
831
832
|
});
|
|
832
|
-
return
|
|
833
|
-
|
|
834
|
-
}, [
|
|
833
|
+
return cr(() => {
|
|
834
|
+
l("type", a);
|
|
835
|
+
}, [l, a]), /* @__PURE__ */ r(F, {
|
|
835
836
|
mx: "auto",
|
|
836
|
-
children: /* @__PURE__ */
|
|
837
|
-
onSubmit:
|
|
838
|
-
children: [/* @__PURE__ */
|
|
837
|
+
children: /* @__PURE__ */ v("form", {
|
|
838
|
+
onSubmit: s(t),
|
|
839
|
+
children: [/* @__PURE__ */ r(R, {
|
|
839
840
|
name: "key",
|
|
840
841
|
control: o,
|
|
841
842
|
render: ({
|
|
842
843
|
field: c
|
|
843
|
-
}) => /* @__PURE__ */
|
|
844
|
-
mb:
|
|
845
|
-
size:
|
|
844
|
+
}) => /* @__PURE__ */ r(D, {
|
|
845
|
+
mb: n.spacing,
|
|
846
|
+
size: n.size,
|
|
846
847
|
required: !0,
|
|
847
848
|
label: "Name",
|
|
848
849
|
placeholder: "A unique name",
|
|
849
850
|
...c
|
|
850
851
|
})
|
|
851
|
-
}), /* @__PURE__ */
|
|
852
|
+
}), /* @__PURE__ */ r(Te, {
|
|
852
853
|
label: "Connection Info",
|
|
853
854
|
labelPosition: "center"
|
|
854
|
-
}), /* @__PURE__ */
|
|
855
|
+
}), /* @__PURE__ */ v(O, {
|
|
855
856
|
grow: !0,
|
|
856
|
-
children: [/* @__PURE__ */
|
|
857
|
+
children: [/* @__PURE__ */ r(R, {
|
|
857
858
|
name: "config.host",
|
|
858
859
|
control: o,
|
|
859
860
|
render: ({
|
|
860
861
|
field: c
|
|
861
|
-
}) => /* @__PURE__ */
|
|
862
|
-
mb:
|
|
863
|
-
size:
|
|
862
|
+
}) => /* @__PURE__ */ r(D, {
|
|
863
|
+
mb: n.spacing,
|
|
864
|
+
size: n.size,
|
|
864
865
|
required: !0,
|
|
865
866
|
label: "Host",
|
|
866
867
|
sx: {
|
|
@@ -868,14 +869,14 @@ function bn({
|
|
|
868
869
|
},
|
|
869
870
|
...c
|
|
870
871
|
})
|
|
871
|
-
}), /* @__PURE__ */
|
|
872
|
+
}), /* @__PURE__ */ r(R, {
|
|
872
873
|
name: "config.port",
|
|
873
874
|
control: o,
|
|
874
875
|
render: ({
|
|
875
876
|
field: c
|
|
876
|
-
}) => /* @__PURE__ */
|
|
877
|
-
mb:
|
|
878
|
-
size:
|
|
877
|
+
}) => /* @__PURE__ */ r($r, {
|
|
878
|
+
mb: n.spacing,
|
|
879
|
+
size: n.size,
|
|
879
880
|
required: !0,
|
|
880
881
|
label: "Port",
|
|
881
882
|
hideControls: !0,
|
|
@@ -885,1482 +886,76 @@ function bn({
|
|
|
885
886
|
...c
|
|
886
887
|
})
|
|
887
888
|
})]
|
|
888
|
-
}), /* @__PURE__ */
|
|
889
|
+
}), /* @__PURE__ */ r(R, {
|
|
889
890
|
name: "config.username",
|
|
890
891
|
control: o,
|
|
891
892
|
render: ({
|
|
892
893
|
field: c
|
|
893
|
-
}) => /* @__PURE__ */
|
|
894
|
-
mb:
|
|
895
|
-
size:
|
|
894
|
+
}) => /* @__PURE__ */ r(D, {
|
|
895
|
+
mb: n.spacing,
|
|
896
|
+
size: n.size,
|
|
896
897
|
required: !0,
|
|
897
898
|
label: "Username",
|
|
898
899
|
...c
|
|
899
900
|
})
|
|
900
|
-
}), /* @__PURE__ */
|
|
901
|
+
}), /* @__PURE__ */ r(R, {
|
|
901
902
|
name: "config.password",
|
|
902
903
|
control: o,
|
|
903
904
|
render: ({
|
|
904
905
|
field: c
|
|
905
|
-
}) => /* @__PURE__ */
|
|
906
|
-
mb:
|
|
907
|
-
size:
|
|
906
|
+
}) => /* @__PURE__ */ r(de, {
|
|
907
|
+
mb: n.spacing,
|
|
908
|
+
size: n.size,
|
|
908
909
|
required: !0,
|
|
909
910
|
label: "Password",
|
|
910
911
|
...c
|
|
911
912
|
})
|
|
912
|
-
}), /* @__PURE__ */
|
|
913
|
+
}), /* @__PURE__ */ r(R, {
|
|
913
914
|
name: "config.database",
|
|
914
915
|
control: o,
|
|
915
916
|
render: ({
|
|
916
917
|
field: c
|
|
917
|
-
}) => /* @__PURE__ */
|
|
918
|
-
mb:
|
|
919
|
-
size:
|
|
918
|
+
}) => /* @__PURE__ */ r(D, {
|
|
919
|
+
mb: n.spacing,
|
|
920
|
+
size: n.size,
|
|
920
921
|
required: !0,
|
|
921
922
|
label: "Database",
|
|
922
923
|
...c
|
|
923
924
|
})
|
|
924
|
-
}), /* @__PURE__ */
|
|
925
|
+
}), /* @__PURE__ */ r(O, {
|
|
925
926
|
position: "right",
|
|
926
|
-
mt:
|
|
927
|
-
children: /* @__PURE__ */
|
|
927
|
+
mt: n.spacing,
|
|
928
|
+
children: /* @__PURE__ */ r(T, {
|
|
928
929
|
type: "submit",
|
|
929
|
-
size:
|
|
930
|
+
size: n.button.size,
|
|
930
931
|
children: "Save"
|
|
931
932
|
})
|
|
932
933
|
})]
|
|
933
934
|
})
|
|
934
935
|
});
|
|
935
936
|
}
|
|
936
|
-
function wn(e, r, t) {
|
|
937
|
-
return r in e ? Object.defineProperty(e, r, {
|
|
938
|
-
value: t,
|
|
939
|
-
enumerable: !0,
|
|
940
|
-
configurable: !0,
|
|
941
|
-
writable: !0
|
|
942
|
-
}) : e[r] = t, e;
|
|
943
|
-
}
|
|
944
|
-
function Jr(e, r) {
|
|
945
|
-
var t = Object.keys(e);
|
|
946
|
-
if (Object.getOwnPropertySymbols) {
|
|
947
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
948
|
-
r && (o = o.filter(function(s) {
|
|
949
|
-
return Object.getOwnPropertyDescriptor(e, s).enumerable;
|
|
950
|
-
})), t.push.apply(t, o);
|
|
951
|
-
}
|
|
952
|
-
return t;
|
|
953
|
-
}
|
|
954
|
-
function Xr(e) {
|
|
955
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
956
|
-
var t = arguments[r] != null ? arguments[r] : {};
|
|
957
|
-
r % 2 ? Jr(Object(t), !0).forEach(function(o) {
|
|
958
|
-
wn(e, o, t[o]);
|
|
959
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Jr(Object(t)).forEach(function(o) {
|
|
960
|
-
Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(t, o));
|
|
961
|
-
});
|
|
962
|
-
}
|
|
963
|
-
return e;
|
|
964
|
-
}
|
|
965
|
-
function Sn(e, r) {
|
|
966
|
-
if (e == null)
|
|
967
|
-
return {};
|
|
968
|
-
var t = {}, o = Object.keys(e), s, i;
|
|
969
|
-
for (i = 0; i < o.length; i++)
|
|
970
|
-
s = o[i], !(r.indexOf(s) >= 0) && (t[s] = e[s]);
|
|
971
|
-
return t;
|
|
972
|
-
}
|
|
973
|
-
function En(e, r) {
|
|
974
|
-
if (e == null)
|
|
975
|
-
return {};
|
|
976
|
-
var t = Sn(e, r), o, s;
|
|
977
|
-
if (Object.getOwnPropertySymbols) {
|
|
978
|
-
var i = Object.getOwnPropertySymbols(e);
|
|
979
|
-
for (s = 0; s < i.length; s++)
|
|
980
|
-
o = i[s], !(r.indexOf(o) >= 0) && (!Object.prototype.propertyIsEnumerable.call(e, o) || (t[o] = e[o]));
|
|
981
|
-
}
|
|
982
|
-
return t;
|
|
983
|
-
}
|
|
984
|
-
function Tn(e, r) {
|
|
985
|
-
return On(e) || Pn(e, r) || Rn(e, r) || _n();
|
|
986
|
-
}
|
|
987
|
-
function On(e) {
|
|
988
|
-
if (Array.isArray(e))
|
|
989
|
-
return e;
|
|
990
|
-
}
|
|
991
|
-
function Pn(e, r) {
|
|
992
|
-
if (!(typeof Symbol > "u" || !(Symbol.iterator in Object(e)))) {
|
|
993
|
-
var t = [], o = !0, s = !1, i = void 0;
|
|
994
|
-
try {
|
|
995
|
-
for (var c = e[Symbol.iterator](), u; !(o = (u = c.next()).done) && (t.push(u.value), !(r && t.length === r)); o = !0)
|
|
996
|
-
;
|
|
997
|
-
} catch (d) {
|
|
998
|
-
s = !0, i = d;
|
|
999
|
-
} finally {
|
|
1000
|
-
try {
|
|
1001
|
-
!o && c.return != null && c.return();
|
|
1002
|
-
} finally {
|
|
1003
|
-
if (s)
|
|
1004
|
-
throw i;
|
|
1005
|
-
}
|
|
1006
|
-
}
|
|
1007
|
-
return t;
|
|
1008
|
-
}
|
|
1009
|
-
}
|
|
1010
|
-
function Rn(e, r) {
|
|
1011
|
-
if (!!e) {
|
|
1012
|
-
if (typeof e == "string")
|
|
1013
|
-
return Qr(e, r);
|
|
1014
|
-
var t = Object.prototype.toString.call(e).slice(8, -1);
|
|
1015
|
-
if (t === "Object" && e.constructor && (t = e.constructor.name), t === "Map" || t === "Set")
|
|
1016
|
-
return Array.from(e);
|
|
1017
|
-
if (t === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))
|
|
1018
|
-
return Qr(e, r);
|
|
1019
|
-
}
|
|
1020
|
-
}
|
|
1021
|
-
function Qr(e, r) {
|
|
1022
|
-
(r == null || r > e.length) && (r = e.length);
|
|
1023
|
-
for (var t = 0, o = new Array(r); t < r; t++)
|
|
1024
|
-
o[t] = e[t];
|
|
1025
|
-
return o;
|
|
1026
|
-
}
|
|
1027
|
-
function _n() {
|
|
1028
|
-
throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
1029
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`);
|
|
1030
|
-
}
|
|
1031
|
-
function xn(e, r, t) {
|
|
1032
|
-
return r in e ? Object.defineProperty(e, r, {
|
|
1033
|
-
value: t,
|
|
1034
|
-
enumerable: !0,
|
|
1035
|
-
configurable: !0,
|
|
1036
|
-
writable: !0
|
|
1037
|
-
}) : e[r] = t, e;
|
|
1038
|
-
}
|
|
1039
|
-
function Zr(e, r) {
|
|
1040
|
-
var t = Object.keys(e);
|
|
1041
|
-
if (Object.getOwnPropertySymbols) {
|
|
1042
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
1043
|
-
r && (o = o.filter(function(s) {
|
|
1044
|
-
return Object.getOwnPropertyDescriptor(e, s).enumerable;
|
|
1045
|
-
})), t.push.apply(t, o);
|
|
1046
|
-
}
|
|
1047
|
-
return t;
|
|
1048
|
-
}
|
|
1049
|
-
function et(e) {
|
|
1050
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
1051
|
-
var t = arguments[r] != null ? arguments[r] : {};
|
|
1052
|
-
r % 2 ? Zr(Object(t), !0).forEach(function(o) {
|
|
1053
|
-
xn(e, o, t[o]);
|
|
1054
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : Zr(Object(t)).forEach(function(o) {
|
|
1055
|
-
Object.defineProperty(e, o, Object.getOwnPropertyDescriptor(t, o));
|
|
1056
|
-
});
|
|
1057
|
-
}
|
|
1058
|
-
return e;
|
|
1059
|
-
}
|
|
1060
|
-
function Cn() {
|
|
1061
|
-
for (var e = arguments.length, r = new Array(e), t = 0; t < e; t++)
|
|
1062
|
-
r[t] = arguments[t];
|
|
1063
|
-
return function(o) {
|
|
1064
|
-
return r.reduceRight(function(s, i) {
|
|
1065
|
-
return i(s);
|
|
1066
|
-
}, o);
|
|
1067
|
-
};
|
|
1068
|
-
}
|
|
1069
|
-
function We(e) {
|
|
1070
|
-
return function r() {
|
|
1071
|
-
for (var t = this, o = arguments.length, s = new Array(o), i = 0; i < o; i++)
|
|
1072
|
-
s[i] = arguments[i];
|
|
1073
|
-
return s.length >= e.length ? e.apply(this, s) : function() {
|
|
1074
|
-
for (var c = arguments.length, u = new Array(c), d = 0; d < c; d++)
|
|
1075
|
-
u[d] = arguments[d];
|
|
1076
|
-
return r.apply(t, [].concat(s, u));
|
|
1077
|
-
};
|
|
1078
|
-
};
|
|
1079
|
-
}
|
|
1080
|
-
function er(e) {
|
|
1081
|
-
return {}.toString.call(e).includes("Object");
|
|
1082
|
-
}
|
|
1083
|
-
function jn(e) {
|
|
1084
|
-
return !Object.keys(e).length;
|
|
1085
|
-
}
|
|
1086
|
-
function Ve(e) {
|
|
1087
|
-
return typeof e == "function";
|
|
1088
|
-
}
|
|
1089
|
-
function An(e, r) {
|
|
1090
|
-
return Object.prototype.hasOwnProperty.call(e, r);
|
|
1091
|
-
}
|
|
1092
|
-
function Mn(e, r) {
|
|
1093
|
-
return er(r) || Re("changeType"), Object.keys(r).some(function(t) {
|
|
1094
|
-
return !An(e, t);
|
|
1095
|
-
}) && Re("changeField"), r;
|
|
1096
|
-
}
|
|
1097
|
-
function In(e) {
|
|
1098
|
-
Ve(e) || Re("selectorType");
|
|
1099
|
-
}
|
|
1100
|
-
function zn(e) {
|
|
1101
|
-
Ve(e) || er(e) || Re("handlerType"), er(e) && Object.values(e).some(function(r) {
|
|
1102
|
-
return !Ve(r);
|
|
1103
|
-
}) && Re("handlersType");
|
|
1104
|
-
}
|
|
1105
|
-
function kn(e) {
|
|
1106
|
-
e || Re("initialIsRequired"), er(e) || Re("initialType"), jn(e) && Re("initialContent");
|
|
1107
|
-
}
|
|
1108
|
-
function Dn(e, r) {
|
|
1109
|
-
throw new Error(e[r] || e.default);
|
|
1110
|
-
}
|
|
1111
|
-
var qn = {
|
|
1112
|
-
initialIsRequired: "initial state is required",
|
|
1113
|
-
initialType: "initial state should be an object",
|
|
1114
|
-
initialContent: "initial state shouldn't be an empty object",
|
|
1115
|
-
handlerType: "handler should be an object or a function",
|
|
1116
|
-
handlersType: "all handlers should be a functions",
|
|
1117
|
-
selectorType: "selector should be a function",
|
|
1118
|
-
changeType: "provided value of changes should be an object",
|
|
1119
|
-
changeField: 'it seams you want to change a field in the state which is not specified in the "initial" state',
|
|
1120
|
-
default: "an unknown error accured in `state-local` package"
|
|
1121
|
-
}, Re = We(Dn)(qn), Je = {
|
|
1122
|
-
changes: Mn,
|
|
1123
|
-
selector: In,
|
|
1124
|
-
handler: zn,
|
|
1125
|
-
initial: kn
|
|
1126
|
-
};
|
|
1127
|
-
function Fn(e) {
|
|
1128
|
-
var r = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
1129
|
-
Je.initial(e), Je.handler(r);
|
|
1130
|
-
var t = {
|
|
1131
|
-
current: e
|
|
1132
|
-
}, o = We(Un)(t, r), s = We(Ln)(t), i = We(Je.changes)(e), c = We($n)(t);
|
|
1133
|
-
function u() {
|
|
1134
|
-
var m = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : function(b) {
|
|
1135
|
-
return b;
|
|
1136
|
-
};
|
|
1137
|
-
return Je.selector(m), m(t.current);
|
|
1138
|
-
}
|
|
1139
|
-
function d(m) {
|
|
1140
|
-
Cn(o, s, i, c)(m);
|
|
1141
|
-
}
|
|
1142
|
-
return [u, d];
|
|
1143
|
-
}
|
|
1144
|
-
function $n(e, r) {
|
|
1145
|
-
return Ve(r) ? r(e.current) : r;
|
|
1146
|
-
}
|
|
1147
|
-
function Ln(e, r) {
|
|
1148
|
-
return e.current = et(et({}, e.current), r), r;
|
|
1149
|
-
}
|
|
1150
|
-
function Un(e, r, t) {
|
|
1151
|
-
return Ve(r) ? r(e.current) : Object.keys(t).forEach(function(o) {
|
|
1152
|
-
var s;
|
|
1153
|
-
return (s = r[o]) === null || s === void 0 ? void 0 : s.call(r, e.current[o]);
|
|
1154
|
-
}), t;
|
|
1155
|
-
}
|
|
1156
|
-
var Wn = {
|
|
1157
|
-
create: Fn
|
|
1158
|
-
}, Yn = {
|
|
1159
|
-
paths: {
|
|
1160
|
-
vs: "https://cdn.jsdelivr.net/npm/monaco-editor@0.33.0/min/vs"
|
|
1161
|
-
}
|
|
1162
|
-
};
|
|
1163
|
-
function Nn(e) {
|
|
1164
|
-
return function r() {
|
|
1165
|
-
for (var t = this, o = arguments.length, s = new Array(o), i = 0; i < o; i++)
|
|
1166
|
-
s[i] = arguments[i];
|
|
1167
|
-
return s.length >= e.length ? e.apply(this, s) : function() {
|
|
1168
|
-
for (var c = arguments.length, u = new Array(c), d = 0; d < c; d++)
|
|
1169
|
-
u[d] = arguments[d];
|
|
1170
|
-
return r.apply(t, [].concat(s, u));
|
|
1171
|
-
};
|
|
1172
|
-
};
|
|
1173
|
-
}
|
|
1174
|
-
function Vn(e) {
|
|
1175
|
-
return {}.toString.call(e).includes("Object");
|
|
1176
|
-
}
|
|
1177
|
-
function Bn(e) {
|
|
1178
|
-
return e || rt("configIsRequired"), Vn(e) || rt("configType"), e.urls ? (Kn(), {
|
|
1179
|
-
paths: {
|
|
1180
|
-
vs: e.urls.monacoBase
|
|
1181
|
-
}
|
|
1182
|
-
}) : e;
|
|
1183
|
-
}
|
|
1184
|
-
function Kn() {
|
|
1185
|
-
console.warn(gt.deprecation);
|
|
1186
|
-
}
|
|
1187
|
-
function Hn(e, r) {
|
|
1188
|
-
throw new Error(e[r] || e.default);
|
|
1189
|
-
}
|
|
1190
|
-
var gt = {
|
|
1191
|
-
configIsRequired: "the configuration object is required",
|
|
1192
|
-
configType: "the configuration object should be an object",
|
|
1193
|
-
default: "an unknown error accured in `@monaco-editor/loader` package",
|
|
1194
|
-
deprecation: `Deprecation warning!
|
|
1195
|
-
You are using deprecated way of configuration.
|
|
1196
|
-
|
|
1197
|
-
Instead of using
|
|
1198
|
-
monaco.config({ urls: { monacoBase: '...' } })
|
|
1199
|
-
use
|
|
1200
|
-
monaco.config({ paths: { vs: '...' } })
|
|
1201
|
-
|
|
1202
|
-
For more please check the link https://github.com/suren-atoyan/monaco-loader#config
|
|
1203
|
-
`
|
|
1204
|
-
}, rt = Nn(Hn)(gt), Gn = {
|
|
1205
|
-
config: Bn
|
|
1206
|
-
}, Jn = function() {
|
|
1207
|
-
for (var r = arguments.length, t = new Array(r), o = 0; o < r; o++)
|
|
1208
|
-
t[o] = arguments[o];
|
|
1209
|
-
return function(s) {
|
|
1210
|
-
return t.reduceRight(function(i, c) {
|
|
1211
|
-
return c(i);
|
|
1212
|
-
}, s);
|
|
1213
|
-
};
|
|
1214
|
-
};
|
|
1215
|
-
function ht(e, r) {
|
|
1216
|
-
return Object.keys(r).forEach(function(t) {
|
|
1217
|
-
r[t] instanceof Object && e[t] && Object.assign(r[t], ht(e[t], r[t]));
|
|
1218
|
-
}), Xr(Xr({}, e), r);
|
|
1219
|
-
}
|
|
1220
|
-
var Xn = {
|
|
1221
|
-
type: "cancelation",
|
|
1222
|
-
msg: "operation is manually canceled"
|
|
1223
|
-
};
|
|
1224
|
-
function pr(e) {
|
|
1225
|
-
var r = !1, t = new Promise(function(o, s) {
|
|
1226
|
-
e.then(function(i) {
|
|
1227
|
-
return r ? s(Xn) : o(i);
|
|
1228
|
-
}), e.catch(s);
|
|
1229
|
-
});
|
|
1230
|
-
return t.cancel = function() {
|
|
1231
|
-
return r = !0;
|
|
1232
|
-
}, t;
|
|
1233
|
-
}
|
|
1234
|
-
var Qn = Wn.create({
|
|
1235
|
-
config: Yn,
|
|
1236
|
-
isInitialized: !1,
|
|
1237
|
-
resolve: null,
|
|
1238
|
-
reject: null,
|
|
1239
|
-
monaco: null
|
|
1240
|
-
}), mt = Tn(Qn, 2), Ke = mt[0], ar = mt[1];
|
|
1241
|
-
function Zn(e) {
|
|
1242
|
-
var r = Gn.config(e), t = r.monaco, o = En(r, ["monaco"]);
|
|
1243
|
-
ar(function(s) {
|
|
1244
|
-
return {
|
|
1245
|
-
config: ht(s.config, o),
|
|
1246
|
-
monaco: t
|
|
1247
|
-
};
|
|
1248
|
-
});
|
|
1249
|
-
}
|
|
1250
|
-
function eo() {
|
|
1251
|
-
var e = Ke(function(r) {
|
|
1252
|
-
var t = r.monaco, o = r.isInitialized, s = r.resolve;
|
|
1253
|
-
return {
|
|
1254
|
-
monaco: t,
|
|
1255
|
-
isInitialized: o,
|
|
1256
|
-
resolve: s
|
|
1257
|
-
};
|
|
1258
|
-
});
|
|
1259
|
-
if (!e.isInitialized) {
|
|
1260
|
-
if (ar({
|
|
1261
|
-
isInitialized: !0
|
|
1262
|
-
}), e.monaco)
|
|
1263
|
-
return e.resolve(e.monaco), pr(gr);
|
|
1264
|
-
if (window.monaco && window.monaco.editor)
|
|
1265
|
-
return vt(window.monaco), e.resolve(window.monaco), pr(gr);
|
|
1266
|
-
Jn(ro, no)(oo);
|
|
1267
|
-
}
|
|
1268
|
-
return pr(gr);
|
|
1269
|
-
}
|
|
1270
|
-
function ro(e) {
|
|
1271
|
-
return document.body.appendChild(e);
|
|
1272
|
-
}
|
|
1273
|
-
function to(e) {
|
|
1274
|
-
var r = document.createElement("script");
|
|
1275
|
-
return e && (r.src = e), r;
|
|
1276
|
-
}
|
|
1277
|
-
function no(e) {
|
|
1278
|
-
var r = Ke(function(o) {
|
|
1279
|
-
var s = o.config, i = o.reject;
|
|
1280
|
-
return {
|
|
1281
|
-
config: s,
|
|
1282
|
-
reject: i
|
|
1283
|
-
};
|
|
1284
|
-
}), t = to("".concat(r.config.paths.vs, "/loader.js"));
|
|
1285
|
-
return t.onload = function() {
|
|
1286
|
-
return e();
|
|
1287
|
-
}, t.onerror = r.reject, t;
|
|
1288
|
-
}
|
|
1289
|
-
function oo() {
|
|
1290
|
-
var e = Ke(function(t) {
|
|
1291
|
-
var o = t.config, s = t.resolve, i = t.reject;
|
|
1292
|
-
return {
|
|
1293
|
-
config: o,
|
|
1294
|
-
resolve: s,
|
|
1295
|
-
reject: i
|
|
1296
|
-
};
|
|
1297
|
-
}), r = window.require;
|
|
1298
|
-
r.config(e.config), r(["vs/editor/editor.main"], function(t) {
|
|
1299
|
-
vt(t), e.resolve(t);
|
|
1300
|
-
}, function(t) {
|
|
1301
|
-
e.reject(t);
|
|
1302
|
-
});
|
|
1303
|
-
}
|
|
1304
|
-
function vt(e) {
|
|
1305
|
-
Ke().monaco || ar({
|
|
1306
|
-
monaco: e
|
|
1307
|
-
});
|
|
1308
|
-
}
|
|
1309
|
-
function io() {
|
|
1310
|
-
return Ke(function(e) {
|
|
1311
|
-
var r = e.monaco;
|
|
1312
|
-
return r;
|
|
1313
|
-
});
|
|
1314
|
-
}
|
|
1315
|
-
var gr = new Promise(function(e, r) {
|
|
1316
|
-
return ar({
|
|
1317
|
-
resolve: e,
|
|
1318
|
-
reject: r
|
|
1319
|
-
});
|
|
1320
|
-
}), Ye = {
|
|
1321
|
-
config: Zn,
|
|
1322
|
-
init: eo,
|
|
1323
|
-
__getMonacoInstance: io
|
|
1324
|
-
}, S = { exports: {} }, hr = { exports: {} }, U = {};
|
|
1325
|
-
/** @license React v16.13.1
|
|
1326
|
-
* react-is.production.min.js
|
|
1327
|
-
*
|
|
1328
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1329
|
-
*
|
|
1330
|
-
* This source code is licensed under the MIT license found in the
|
|
1331
|
-
* LICENSE file in the root directory of this source tree.
|
|
1332
|
-
*/
|
|
1333
|
-
var tt;
|
|
1334
|
-
function ao() {
|
|
1335
|
-
if (tt)
|
|
1336
|
-
return U;
|
|
1337
|
-
tt = 1;
|
|
1338
|
-
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, s = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, c = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, m = e ? Symbol.for("react.concurrent_mode") : 60111, b = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, v = e ? Symbol.for("react.suspense_list") : 60120, x = e ? Symbol.for("react.memo") : 60115, Y = e ? Symbol.for("react.lazy") : 60116, k = e ? Symbol.for("react.block") : 60121, G = e ? Symbol.for("react.fundamental") : 60117, K = e ? Symbol.for("react.responder") : 60118, D = e ? Symbol.for("react.scope") : 60119;
|
|
1339
|
-
function H(p) {
|
|
1340
|
-
if (typeof p == "object" && p !== null) {
|
|
1341
|
-
var X = p.$$typeof;
|
|
1342
|
-
switch (X) {
|
|
1343
|
-
case r:
|
|
1344
|
-
switch (p = p.type, p) {
|
|
1345
|
-
case d:
|
|
1346
|
-
case m:
|
|
1347
|
-
case o:
|
|
1348
|
-
case i:
|
|
1349
|
-
case s:
|
|
1350
|
-
case h:
|
|
1351
|
-
return p;
|
|
1352
|
-
default:
|
|
1353
|
-
switch (p = p && p.$$typeof, p) {
|
|
1354
|
-
case u:
|
|
1355
|
-
case b:
|
|
1356
|
-
case Y:
|
|
1357
|
-
case x:
|
|
1358
|
-
case c:
|
|
1359
|
-
return p;
|
|
1360
|
-
default:
|
|
1361
|
-
return X;
|
|
1362
|
-
}
|
|
1363
|
-
}
|
|
1364
|
-
case t:
|
|
1365
|
-
return X;
|
|
1366
|
-
}
|
|
1367
|
-
}
|
|
1368
|
-
}
|
|
1369
|
-
function N(p) {
|
|
1370
|
-
return H(p) === m;
|
|
1371
|
-
}
|
|
1372
|
-
return U.AsyncMode = d, U.ConcurrentMode = m, U.ContextConsumer = u, U.ContextProvider = c, U.Element = r, U.ForwardRef = b, U.Fragment = o, U.Lazy = Y, U.Memo = x, U.Portal = t, U.Profiler = i, U.StrictMode = s, U.Suspense = h, U.isAsyncMode = function(p) {
|
|
1373
|
-
return N(p) || H(p) === d;
|
|
1374
|
-
}, U.isConcurrentMode = N, U.isContextConsumer = function(p) {
|
|
1375
|
-
return H(p) === u;
|
|
1376
|
-
}, U.isContextProvider = function(p) {
|
|
1377
|
-
return H(p) === c;
|
|
1378
|
-
}, U.isElement = function(p) {
|
|
1379
|
-
return typeof p == "object" && p !== null && p.$$typeof === r;
|
|
1380
|
-
}, U.isForwardRef = function(p) {
|
|
1381
|
-
return H(p) === b;
|
|
1382
|
-
}, U.isFragment = function(p) {
|
|
1383
|
-
return H(p) === o;
|
|
1384
|
-
}, U.isLazy = function(p) {
|
|
1385
|
-
return H(p) === Y;
|
|
1386
|
-
}, U.isMemo = function(p) {
|
|
1387
|
-
return H(p) === x;
|
|
1388
|
-
}, U.isPortal = function(p) {
|
|
1389
|
-
return H(p) === t;
|
|
1390
|
-
}, U.isProfiler = function(p) {
|
|
1391
|
-
return H(p) === i;
|
|
1392
|
-
}, U.isStrictMode = function(p) {
|
|
1393
|
-
return H(p) === s;
|
|
1394
|
-
}, U.isSuspense = function(p) {
|
|
1395
|
-
return H(p) === h;
|
|
1396
|
-
}, U.isValidElementType = function(p) {
|
|
1397
|
-
return typeof p == "string" || typeof p == "function" || p === o || p === m || p === i || p === s || p === h || p === v || typeof p == "object" && p !== null && (p.$$typeof === Y || p.$$typeof === x || p.$$typeof === c || p.$$typeof === u || p.$$typeof === b || p.$$typeof === G || p.$$typeof === K || p.$$typeof === D || p.$$typeof === k);
|
|
1398
|
-
}, U.typeOf = H, U;
|
|
1399
|
-
}
|
|
1400
|
-
var W = {};
|
|
1401
|
-
/** @license React v16.13.1
|
|
1402
|
-
* react-is.development.js
|
|
1403
|
-
*
|
|
1404
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1405
|
-
*
|
|
1406
|
-
* This source code is licensed under the MIT license found in the
|
|
1407
|
-
* LICENSE file in the root directory of this source tree.
|
|
1408
|
-
*/
|
|
1409
|
-
var nt;
|
|
1410
|
-
function so() {
|
|
1411
|
-
return nt || (nt = 1, process.env.NODE_ENV !== "production" && function() {
|
|
1412
|
-
var e = typeof Symbol == "function" && Symbol.for, r = e ? Symbol.for("react.element") : 60103, t = e ? Symbol.for("react.portal") : 60106, o = e ? Symbol.for("react.fragment") : 60107, s = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, c = e ? Symbol.for("react.provider") : 60109, u = e ? Symbol.for("react.context") : 60110, d = e ? Symbol.for("react.async_mode") : 60111, m = e ? Symbol.for("react.concurrent_mode") : 60111, b = e ? Symbol.for("react.forward_ref") : 60112, h = e ? Symbol.for("react.suspense") : 60113, v = e ? Symbol.for("react.suspense_list") : 60120, x = e ? Symbol.for("react.memo") : 60115, Y = e ? Symbol.for("react.lazy") : 60116, k = e ? Symbol.for("react.block") : 60121, G = e ? Symbol.for("react.fundamental") : 60117, K = e ? Symbol.for("react.responder") : 60118, D = e ? Symbol.for("react.scope") : 60119;
|
|
1413
|
-
function H(w) {
|
|
1414
|
-
return typeof w == "string" || typeof w == "function" || w === o || w === m || w === i || w === s || w === h || w === v || typeof w == "object" && w !== null && (w.$$typeof === Y || w.$$typeof === x || w.$$typeof === c || w.$$typeof === u || w.$$typeof === b || w.$$typeof === G || w.$$typeof === K || w.$$typeof === D || w.$$typeof === k);
|
|
1415
|
-
}
|
|
1416
|
-
function N(w) {
|
|
1417
|
-
if (typeof w == "object" && w !== null) {
|
|
1418
|
-
var he = w.$$typeof;
|
|
1419
|
-
switch (he) {
|
|
1420
|
-
case r:
|
|
1421
|
-
var je = w.type;
|
|
1422
|
-
switch (je) {
|
|
1423
|
-
case d:
|
|
1424
|
-
case m:
|
|
1425
|
-
case o:
|
|
1426
|
-
case i:
|
|
1427
|
-
case s:
|
|
1428
|
-
case h:
|
|
1429
|
-
return je;
|
|
1430
|
-
default:
|
|
1431
|
-
var Ce = je && je.$$typeof;
|
|
1432
|
-
switch (Ce) {
|
|
1433
|
-
case u:
|
|
1434
|
-
case b:
|
|
1435
|
-
case Y:
|
|
1436
|
-
case x:
|
|
1437
|
-
case c:
|
|
1438
|
-
return Ce;
|
|
1439
|
-
default:
|
|
1440
|
-
return he;
|
|
1441
|
-
}
|
|
1442
|
-
}
|
|
1443
|
-
case t:
|
|
1444
|
-
return he;
|
|
1445
|
-
}
|
|
1446
|
-
}
|
|
1447
|
-
}
|
|
1448
|
-
var p = d, X = m, ee = u, Se = c, Q = r, $ = b, ge = o, ye = Y, ie = x, z = t, B = i, te = s, pe = h, Ee = !1;
|
|
1449
|
-
function Pe(w) {
|
|
1450
|
-
return Ee || (Ee = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), l(w) || N(w) === d;
|
|
1451
|
-
}
|
|
1452
|
-
function l(w) {
|
|
1453
|
-
return N(w) === m;
|
|
1454
|
-
}
|
|
1455
|
-
function g(w) {
|
|
1456
|
-
return N(w) === u;
|
|
1457
|
-
}
|
|
1458
|
-
function T(w) {
|
|
1459
|
-
return N(w) === c;
|
|
1460
|
-
}
|
|
1461
|
-
function O(w) {
|
|
1462
|
-
return typeof w == "object" && w !== null && w.$$typeof === r;
|
|
1463
|
-
}
|
|
1464
|
-
function P(w) {
|
|
1465
|
-
return N(w) === b;
|
|
1466
|
-
}
|
|
1467
|
-
function C(w) {
|
|
1468
|
-
return N(w) === o;
|
|
1469
|
-
}
|
|
1470
|
-
function R(w) {
|
|
1471
|
-
return N(w) === Y;
|
|
1472
|
-
}
|
|
1473
|
-
function _(w) {
|
|
1474
|
-
return N(w) === x;
|
|
1475
|
-
}
|
|
1476
|
-
function j(w) {
|
|
1477
|
-
return N(w) === t;
|
|
1478
|
-
}
|
|
1479
|
-
function F(w) {
|
|
1480
|
-
return N(w) === i;
|
|
1481
|
-
}
|
|
1482
|
-
function A(w) {
|
|
1483
|
-
return N(w) === s;
|
|
1484
|
-
}
|
|
1485
|
-
function ae(w) {
|
|
1486
|
-
return N(w) === h;
|
|
1487
|
-
}
|
|
1488
|
-
W.AsyncMode = p, W.ConcurrentMode = X, W.ContextConsumer = ee, W.ContextProvider = Se, W.Element = Q, W.ForwardRef = $, W.Fragment = ge, W.Lazy = ye, W.Memo = ie, W.Portal = z, W.Profiler = B, W.StrictMode = te, W.Suspense = pe, W.isAsyncMode = Pe, W.isConcurrentMode = l, W.isContextConsumer = g, W.isContextProvider = T, W.isElement = O, W.isForwardRef = P, W.isFragment = C, W.isLazy = R, W.isMemo = _, W.isPortal = j, W.isProfiler = F, W.isStrictMode = A, W.isSuspense = ae, W.isValidElementType = H, W.typeOf = N;
|
|
1489
|
-
}()), W;
|
|
1490
|
-
}
|
|
1491
|
-
var ot;
|
|
1492
|
-
function yt() {
|
|
1493
|
-
return ot || (ot = 1, function(e) {
|
|
1494
|
-
process.env.NODE_ENV === "production" ? e.exports = ao() : e.exports = so();
|
|
1495
|
-
}(hr)), hr.exports;
|
|
1496
|
-
}
|
|
1497
|
-
/*
|
|
1498
|
-
object-assign
|
|
1499
|
-
(c) Sindre Sorhus
|
|
1500
|
-
@license MIT
|
|
1501
|
-
*/
|
|
1502
|
-
var mr, it;
|
|
1503
|
-
function co() {
|
|
1504
|
-
if (it)
|
|
1505
|
-
return mr;
|
|
1506
|
-
it = 1;
|
|
1507
|
-
var e = Object.getOwnPropertySymbols, r = Object.prototype.hasOwnProperty, t = Object.prototype.propertyIsEnumerable;
|
|
1508
|
-
function o(i) {
|
|
1509
|
-
if (i == null)
|
|
1510
|
-
throw new TypeError("Object.assign cannot be called with null or undefined");
|
|
1511
|
-
return Object(i);
|
|
1512
|
-
}
|
|
1513
|
-
function s() {
|
|
1514
|
-
try {
|
|
1515
|
-
if (!Object.assign)
|
|
1516
|
-
return !1;
|
|
1517
|
-
var i = new String("abc");
|
|
1518
|
-
if (i[5] = "de", Object.getOwnPropertyNames(i)[0] === "5")
|
|
1519
|
-
return !1;
|
|
1520
|
-
for (var c = {}, u = 0; u < 10; u++)
|
|
1521
|
-
c["_" + String.fromCharCode(u)] = u;
|
|
1522
|
-
var d = Object.getOwnPropertyNames(c).map(function(b) {
|
|
1523
|
-
return c[b];
|
|
1524
|
-
});
|
|
1525
|
-
if (d.join("") !== "0123456789")
|
|
1526
|
-
return !1;
|
|
1527
|
-
var m = {};
|
|
1528
|
-
return "abcdefghijklmnopqrst".split("").forEach(function(b) {
|
|
1529
|
-
m[b] = b;
|
|
1530
|
-
}), Object.keys(Object.assign({}, m)).join("") === "abcdefghijklmnopqrst";
|
|
1531
|
-
} catch {
|
|
1532
|
-
return !1;
|
|
1533
|
-
}
|
|
1534
|
-
}
|
|
1535
|
-
return mr = s() ? Object.assign : function(i, c) {
|
|
1536
|
-
for (var u, d = o(i), m, b = 1; b < arguments.length; b++) {
|
|
1537
|
-
u = Object(arguments[b]);
|
|
1538
|
-
for (var h in u)
|
|
1539
|
-
r.call(u, h) && (d[h] = u[h]);
|
|
1540
|
-
if (e) {
|
|
1541
|
-
m = e(u);
|
|
1542
|
-
for (var v = 0; v < m.length; v++)
|
|
1543
|
-
t.call(u, m[v]) && (d[m[v]] = u[m[v]]);
|
|
1544
|
-
}
|
|
1545
|
-
}
|
|
1546
|
-
return d;
|
|
1547
|
-
}, mr;
|
|
1548
|
-
}
|
|
1549
|
-
var vr, at;
|
|
1550
|
-
function Mr() {
|
|
1551
|
-
if (at)
|
|
1552
|
-
return vr;
|
|
1553
|
-
at = 1;
|
|
1554
|
-
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
|
|
1555
|
-
return vr = e, vr;
|
|
1556
|
-
}
|
|
1557
|
-
var yr, st;
|
|
1558
|
-
function bt() {
|
|
1559
|
-
return st || (st = 1, yr = Function.call.bind(Object.prototype.hasOwnProperty)), yr;
|
|
1560
|
-
}
|
|
1561
|
-
var br, ct;
|
|
1562
|
-
function uo() {
|
|
1563
|
-
if (ct)
|
|
1564
|
-
return br;
|
|
1565
|
-
ct = 1;
|
|
1566
|
-
var e = function() {
|
|
1567
|
-
};
|
|
1568
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1569
|
-
var r = Mr(), t = {}, o = bt();
|
|
1570
|
-
e = function(i) {
|
|
1571
|
-
var c = "Warning: " + i;
|
|
1572
|
-
typeof console < "u" && console.error(c);
|
|
1573
|
-
try {
|
|
1574
|
-
throw new Error(c);
|
|
1575
|
-
} catch {
|
|
1576
|
-
}
|
|
1577
|
-
};
|
|
1578
|
-
}
|
|
1579
|
-
function s(i, c, u, d, m) {
|
|
1580
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1581
|
-
for (var b in i)
|
|
1582
|
-
if (o(i, b)) {
|
|
1583
|
-
var h;
|
|
1584
|
-
try {
|
|
1585
|
-
if (typeof i[b] != "function") {
|
|
1586
|
-
var v = Error(
|
|
1587
|
-
(d || "React class") + ": " + u + " type `" + b + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[b] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
|
|
1588
|
-
);
|
|
1589
|
-
throw v.name = "Invariant Violation", v;
|
|
1590
|
-
}
|
|
1591
|
-
h = i[b](c, b, d, u, null, r);
|
|
1592
|
-
} catch (Y) {
|
|
1593
|
-
h = Y;
|
|
1594
|
-
}
|
|
1595
|
-
if (h && !(h instanceof Error) && e(
|
|
1596
|
-
(d || "React class") + ": type specification of " + u + " `" + b + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof h + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
|
|
1597
|
-
), h instanceof Error && !(h.message in t)) {
|
|
1598
|
-
t[h.message] = !0;
|
|
1599
|
-
var x = m ? m() : "";
|
|
1600
|
-
e(
|
|
1601
|
-
"Failed " + u + " type: " + h.message + (x != null ? x : "")
|
|
1602
|
-
);
|
|
1603
|
-
}
|
|
1604
|
-
}
|
|
1605
|
-
}
|
|
1606
|
-
}
|
|
1607
|
-
return s.resetWarningCache = function() {
|
|
1608
|
-
process.env.NODE_ENV !== "production" && (t = {});
|
|
1609
|
-
}, br = s, br;
|
|
1610
|
-
}
|
|
1611
|
-
var wr, ut;
|
|
1612
|
-
function lo() {
|
|
1613
|
-
if (ut)
|
|
1614
|
-
return wr;
|
|
1615
|
-
ut = 1;
|
|
1616
|
-
var e = yt(), r = co(), t = Mr(), o = bt(), s = uo(), i = function() {
|
|
1617
|
-
};
|
|
1618
|
-
process.env.NODE_ENV !== "production" && (i = function(u) {
|
|
1619
|
-
var d = "Warning: " + u;
|
|
1620
|
-
typeof console < "u" && console.error(d);
|
|
1621
|
-
try {
|
|
1622
|
-
throw new Error(d);
|
|
1623
|
-
} catch {
|
|
1624
|
-
}
|
|
1625
|
-
});
|
|
1626
|
-
function c() {
|
|
1627
|
-
return null;
|
|
1628
|
-
}
|
|
1629
|
-
return wr = function(u, d) {
|
|
1630
|
-
var m = typeof Symbol == "function" && Symbol.iterator, b = "@@iterator";
|
|
1631
|
-
function h(l) {
|
|
1632
|
-
var g = l && (m && l[m] || l[b]);
|
|
1633
|
-
if (typeof g == "function")
|
|
1634
|
-
return g;
|
|
1635
|
-
}
|
|
1636
|
-
var v = "<<anonymous>>", x = {
|
|
1637
|
-
array: K("array"),
|
|
1638
|
-
bigint: K("bigint"),
|
|
1639
|
-
bool: K("boolean"),
|
|
1640
|
-
func: K("function"),
|
|
1641
|
-
number: K("number"),
|
|
1642
|
-
object: K("object"),
|
|
1643
|
-
string: K("string"),
|
|
1644
|
-
symbol: K("symbol"),
|
|
1645
|
-
any: D(),
|
|
1646
|
-
arrayOf: H,
|
|
1647
|
-
element: N(),
|
|
1648
|
-
elementType: p(),
|
|
1649
|
-
instanceOf: X,
|
|
1650
|
-
node: $(),
|
|
1651
|
-
objectOf: Se,
|
|
1652
|
-
oneOf: ee,
|
|
1653
|
-
oneOfType: Q,
|
|
1654
|
-
shape: ye,
|
|
1655
|
-
exact: ie
|
|
1656
|
-
};
|
|
1657
|
-
function Y(l, g) {
|
|
1658
|
-
return l === g ? l !== 0 || 1 / l === 1 / g : l !== l && g !== g;
|
|
1659
|
-
}
|
|
1660
|
-
function k(l, g) {
|
|
1661
|
-
this.message = l, this.data = g && typeof g == "object" ? g : {}, this.stack = "";
|
|
1662
|
-
}
|
|
1663
|
-
k.prototype = Error.prototype;
|
|
1664
|
-
function G(l) {
|
|
1665
|
-
if (process.env.NODE_ENV !== "production")
|
|
1666
|
-
var g = {}, T = 0;
|
|
1667
|
-
function O(C, R, _, j, F, A, ae) {
|
|
1668
|
-
if (j = j || v, A = A || _, ae !== t) {
|
|
1669
|
-
if (d) {
|
|
1670
|
-
var w = new Error(
|
|
1671
|
-
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
|
|
1672
|
-
);
|
|
1673
|
-
throw w.name = "Invariant Violation", w;
|
|
1674
|
-
} else if (process.env.NODE_ENV !== "production" && typeof console < "u") {
|
|
1675
|
-
var he = j + ":" + _;
|
|
1676
|
-
!g[he] && T < 3 && (i(
|
|
1677
|
-
"You are manually calling a React.PropTypes validation function for the `" + A + "` prop on `" + j + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
|
|
1678
|
-
), g[he] = !0, T++);
|
|
1679
|
-
}
|
|
1680
|
-
}
|
|
1681
|
-
return R[_] == null ? C ? R[_] === null ? new k("The " + F + " `" + A + "` is marked as required " + ("in `" + j + "`, but its value is `null`.")) : new k("The " + F + " `" + A + "` is marked as required in " + ("`" + j + "`, but its value is `undefined`.")) : null : l(R, _, j, F, A);
|
|
1682
|
-
}
|
|
1683
|
-
var P = O.bind(null, !1);
|
|
1684
|
-
return P.isRequired = O.bind(null, !0), P;
|
|
1685
|
-
}
|
|
1686
|
-
function K(l) {
|
|
1687
|
-
function g(T, O, P, C, R, _) {
|
|
1688
|
-
var j = T[O], F = te(j);
|
|
1689
|
-
if (F !== l) {
|
|
1690
|
-
var A = pe(j);
|
|
1691
|
-
return new k(
|
|
1692
|
-
"Invalid " + C + " `" + R + "` of type " + ("`" + A + "` supplied to `" + P + "`, expected ") + ("`" + l + "`."),
|
|
1693
|
-
{ expectedType: l }
|
|
1694
|
-
);
|
|
1695
|
-
}
|
|
1696
|
-
return null;
|
|
1697
|
-
}
|
|
1698
|
-
return G(g);
|
|
1699
|
-
}
|
|
1700
|
-
function D() {
|
|
1701
|
-
return G(c);
|
|
1702
|
-
}
|
|
1703
|
-
function H(l) {
|
|
1704
|
-
function g(T, O, P, C, R) {
|
|
1705
|
-
if (typeof l != "function")
|
|
1706
|
-
return new k("Property `" + R + "` of component `" + P + "` has invalid PropType notation inside arrayOf.");
|
|
1707
|
-
var _ = T[O];
|
|
1708
|
-
if (!Array.isArray(_)) {
|
|
1709
|
-
var j = te(_);
|
|
1710
|
-
return new k("Invalid " + C + " `" + R + "` of type " + ("`" + j + "` supplied to `" + P + "`, expected an array."));
|
|
1711
|
-
}
|
|
1712
|
-
for (var F = 0; F < _.length; F++) {
|
|
1713
|
-
var A = l(_, F, P, C, R + "[" + F + "]", t);
|
|
1714
|
-
if (A instanceof Error)
|
|
1715
|
-
return A;
|
|
1716
|
-
}
|
|
1717
|
-
return null;
|
|
1718
|
-
}
|
|
1719
|
-
return G(g);
|
|
1720
|
-
}
|
|
1721
|
-
function N() {
|
|
1722
|
-
function l(g, T, O, P, C) {
|
|
1723
|
-
var R = g[T];
|
|
1724
|
-
if (!u(R)) {
|
|
1725
|
-
var _ = te(R);
|
|
1726
|
-
return new k("Invalid " + P + " `" + C + "` of type " + ("`" + _ + "` supplied to `" + O + "`, expected a single ReactElement."));
|
|
1727
|
-
}
|
|
1728
|
-
return null;
|
|
1729
|
-
}
|
|
1730
|
-
return G(l);
|
|
1731
|
-
}
|
|
1732
|
-
function p() {
|
|
1733
|
-
function l(g, T, O, P, C) {
|
|
1734
|
-
var R = g[T];
|
|
1735
|
-
if (!e.isValidElementType(R)) {
|
|
1736
|
-
var _ = te(R);
|
|
1737
|
-
return new k("Invalid " + P + " `" + C + "` of type " + ("`" + _ + "` supplied to `" + O + "`, expected a single ReactElement type."));
|
|
1738
|
-
}
|
|
1739
|
-
return null;
|
|
1740
|
-
}
|
|
1741
|
-
return G(l);
|
|
1742
|
-
}
|
|
1743
|
-
function X(l) {
|
|
1744
|
-
function g(T, O, P, C, R) {
|
|
1745
|
-
if (!(T[O] instanceof l)) {
|
|
1746
|
-
var _ = l.name || v, j = Pe(T[O]);
|
|
1747
|
-
return new k("Invalid " + C + " `" + R + "` of type " + ("`" + j + "` supplied to `" + P + "`, expected ") + ("instance of `" + _ + "`."));
|
|
1748
|
-
}
|
|
1749
|
-
return null;
|
|
1750
|
-
}
|
|
1751
|
-
return G(g);
|
|
1752
|
-
}
|
|
1753
|
-
function ee(l) {
|
|
1754
|
-
if (!Array.isArray(l))
|
|
1755
|
-
return process.env.NODE_ENV !== "production" && (arguments.length > 1 ? i(
|
|
1756
|
-
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
|
|
1757
|
-
) : i("Invalid argument supplied to oneOf, expected an array.")), c;
|
|
1758
|
-
function g(T, O, P, C, R) {
|
|
1759
|
-
for (var _ = T[O], j = 0; j < l.length; j++)
|
|
1760
|
-
if (Y(_, l[j]))
|
|
1761
|
-
return null;
|
|
1762
|
-
var F = JSON.stringify(l, function(ae, w) {
|
|
1763
|
-
var he = pe(w);
|
|
1764
|
-
return he === "symbol" ? String(w) : w;
|
|
1765
|
-
});
|
|
1766
|
-
return new k("Invalid " + C + " `" + R + "` of value `" + String(_) + "` " + ("supplied to `" + P + "`, expected one of " + F + "."));
|
|
1767
|
-
}
|
|
1768
|
-
return G(g);
|
|
1769
|
-
}
|
|
1770
|
-
function Se(l) {
|
|
1771
|
-
function g(T, O, P, C, R) {
|
|
1772
|
-
if (typeof l != "function")
|
|
1773
|
-
return new k("Property `" + R + "` of component `" + P + "` has invalid PropType notation inside objectOf.");
|
|
1774
|
-
var _ = T[O], j = te(_);
|
|
1775
|
-
if (j !== "object")
|
|
1776
|
-
return new k("Invalid " + C + " `" + R + "` of type " + ("`" + j + "` supplied to `" + P + "`, expected an object."));
|
|
1777
|
-
for (var F in _)
|
|
1778
|
-
if (o(_, F)) {
|
|
1779
|
-
var A = l(_, F, P, C, R + "." + F, t);
|
|
1780
|
-
if (A instanceof Error)
|
|
1781
|
-
return A;
|
|
1782
|
-
}
|
|
1783
|
-
return null;
|
|
1784
|
-
}
|
|
1785
|
-
return G(g);
|
|
1786
|
-
}
|
|
1787
|
-
function Q(l) {
|
|
1788
|
-
if (!Array.isArray(l))
|
|
1789
|
-
return process.env.NODE_ENV !== "production" && i("Invalid argument supplied to oneOfType, expected an instance of array."), c;
|
|
1790
|
-
for (var g = 0; g < l.length; g++) {
|
|
1791
|
-
var T = l[g];
|
|
1792
|
-
if (typeof T != "function")
|
|
1793
|
-
return i(
|
|
1794
|
-
"Invalid argument supplied to oneOfType. Expected an array of check functions, but received " + Ee(T) + " at index " + g + "."
|
|
1795
|
-
), c;
|
|
1796
|
-
}
|
|
1797
|
-
function O(P, C, R, _, j) {
|
|
1798
|
-
for (var F = [], A = 0; A < l.length; A++) {
|
|
1799
|
-
var ae = l[A], w = ae(P, C, R, _, j, t);
|
|
1800
|
-
if (w == null)
|
|
1801
|
-
return null;
|
|
1802
|
-
w.data && o(w.data, "expectedType") && F.push(w.data.expectedType);
|
|
1803
|
-
}
|
|
1804
|
-
var he = F.length > 0 ? ", expected one of type [" + F.join(", ") + "]" : "";
|
|
1805
|
-
return new k("Invalid " + _ + " `" + j + "` supplied to " + ("`" + R + "`" + he + "."));
|
|
1806
|
-
}
|
|
1807
|
-
return G(O);
|
|
1808
|
-
}
|
|
1809
|
-
function $() {
|
|
1810
|
-
function l(g, T, O, P, C) {
|
|
1811
|
-
return z(g[T]) ? null : new k("Invalid " + P + " `" + C + "` supplied to " + ("`" + O + "`, expected a ReactNode."));
|
|
1812
|
-
}
|
|
1813
|
-
return G(l);
|
|
1814
|
-
}
|
|
1815
|
-
function ge(l, g, T, O, P) {
|
|
1816
|
-
return new k(
|
|
1817
|
-
(l || "React class") + ": " + g + " type `" + T + "." + O + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + P + "`."
|
|
1818
|
-
);
|
|
1819
|
-
}
|
|
1820
|
-
function ye(l) {
|
|
1821
|
-
function g(T, O, P, C, R) {
|
|
1822
|
-
var _ = T[O], j = te(_);
|
|
1823
|
-
if (j !== "object")
|
|
1824
|
-
return new k("Invalid " + C + " `" + R + "` of type `" + j + "` " + ("supplied to `" + P + "`, expected `object`."));
|
|
1825
|
-
for (var F in l) {
|
|
1826
|
-
var A = l[F];
|
|
1827
|
-
if (typeof A != "function")
|
|
1828
|
-
return ge(P, C, R, F, pe(A));
|
|
1829
|
-
var ae = A(_, F, P, C, R + "." + F, t);
|
|
1830
|
-
if (ae)
|
|
1831
|
-
return ae;
|
|
1832
|
-
}
|
|
1833
|
-
return null;
|
|
1834
|
-
}
|
|
1835
|
-
return G(g);
|
|
1836
|
-
}
|
|
1837
|
-
function ie(l) {
|
|
1838
|
-
function g(T, O, P, C, R) {
|
|
1839
|
-
var _ = T[O], j = te(_);
|
|
1840
|
-
if (j !== "object")
|
|
1841
|
-
return new k("Invalid " + C + " `" + R + "` of type `" + j + "` " + ("supplied to `" + P + "`, expected `object`."));
|
|
1842
|
-
var F = r({}, T[O], l);
|
|
1843
|
-
for (var A in F) {
|
|
1844
|
-
var ae = l[A];
|
|
1845
|
-
if (o(l, A) && typeof ae != "function")
|
|
1846
|
-
return ge(P, C, R, A, pe(ae));
|
|
1847
|
-
if (!ae)
|
|
1848
|
-
return new k(
|
|
1849
|
-
"Invalid " + C + " `" + R + "` key `" + A + "` supplied to `" + P + "`.\nBad object: " + JSON.stringify(T[O], null, " ") + `
|
|
1850
|
-
Valid keys: ` + JSON.stringify(Object.keys(l), null, " ")
|
|
1851
|
-
);
|
|
1852
|
-
var w = ae(_, A, P, C, R + "." + A, t);
|
|
1853
|
-
if (w)
|
|
1854
|
-
return w;
|
|
1855
|
-
}
|
|
1856
|
-
return null;
|
|
1857
|
-
}
|
|
1858
|
-
return G(g);
|
|
1859
|
-
}
|
|
1860
|
-
function z(l) {
|
|
1861
|
-
switch (typeof l) {
|
|
1862
|
-
case "number":
|
|
1863
|
-
case "string":
|
|
1864
|
-
case "undefined":
|
|
1865
|
-
return !0;
|
|
1866
|
-
case "boolean":
|
|
1867
|
-
return !l;
|
|
1868
|
-
case "object":
|
|
1869
|
-
if (Array.isArray(l))
|
|
1870
|
-
return l.every(z);
|
|
1871
|
-
if (l === null || u(l))
|
|
1872
|
-
return !0;
|
|
1873
|
-
var g = h(l);
|
|
1874
|
-
if (g) {
|
|
1875
|
-
var T = g.call(l), O;
|
|
1876
|
-
if (g !== l.entries) {
|
|
1877
|
-
for (; !(O = T.next()).done; )
|
|
1878
|
-
if (!z(O.value))
|
|
1879
|
-
return !1;
|
|
1880
|
-
} else
|
|
1881
|
-
for (; !(O = T.next()).done; ) {
|
|
1882
|
-
var P = O.value;
|
|
1883
|
-
if (P && !z(P[1]))
|
|
1884
|
-
return !1;
|
|
1885
|
-
}
|
|
1886
|
-
} else
|
|
1887
|
-
return !1;
|
|
1888
|
-
return !0;
|
|
1889
|
-
default:
|
|
1890
|
-
return !1;
|
|
1891
|
-
}
|
|
1892
|
-
}
|
|
1893
|
-
function B(l, g) {
|
|
1894
|
-
return l === "symbol" ? !0 : g ? g["@@toStringTag"] === "Symbol" || typeof Symbol == "function" && g instanceof Symbol : !1;
|
|
1895
|
-
}
|
|
1896
|
-
function te(l) {
|
|
1897
|
-
var g = typeof l;
|
|
1898
|
-
return Array.isArray(l) ? "array" : l instanceof RegExp ? "object" : B(g, l) ? "symbol" : g;
|
|
1899
|
-
}
|
|
1900
|
-
function pe(l) {
|
|
1901
|
-
if (typeof l > "u" || l === null)
|
|
1902
|
-
return "" + l;
|
|
1903
|
-
var g = te(l);
|
|
1904
|
-
if (g === "object") {
|
|
1905
|
-
if (l instanceof Date)
|
|
1906
|
-
return "date";
|
|
1907
|
-
if (l instanceof RegExp)
|
|
1908
|
-
return "regexp";
|
|
1909
|
-
}
|
|
1910
|
-
return g;
|
|
1911
|
-
}
|
|
1912
|
-
function Ee(l) {
|
|
1913
|
-
var g = pe(l);
|
|
1914
|
-
switch (g) {
|
|
1915
|
-
case "array":
|
|
1916
|
-
case "object":
|
|
1917
|
-
return "an " + g;
|
|
1918
|
-
case "boolean":
|
|
1919
|
-
case "date":
|
|
1920
|
-
case "regexp":
|
|
1921
|
-
return "a " + g;
|
|
1922
|
-
default:
|
|
1923
|
-
return g;
|
|
1924
|
-
}
|
|
1925
|
-
}
|
|
1926
|
-
function Pe(l) {
|
|
1927
|
-
return !l.constructor || !l.constructor.name ? v : l.constructor.name;
|
|
1928
|
-
}
|
|
1929
|
-
return x.checkPropTypes = s, x.resetWarningCache = s.resetWarningCache, x.PropTypes = x, x;
|
|
1930
|
-
}, wr;
|
|
1931
|
-
}
|
|
1932
|
-
var Sr, lt;
|
|
1933
|
-
function fo() {
|
|
1934
|
-
if (lt)
|
|
1935
|
-
return Sr;
|
|
1936
|
-
lt = 1;
|
|
1937
|
-
var e = Mr();
|
|
1938
|
-
function r() {
|
|
1939
|
-
}
|
|
1940
|
-
function t() {
|
|
1941
|
-
}
|
|
1942
|
-
return t.resetWarningCache = r, Sr = function() {
|
|
1943
|
-
function o(c, u, d, m, b, h) {
|
|
1944
|
-
if (h !== e) {
|
|
1945
|
-
var v = new Error(
|
|
1946
|
-
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types"
|
|
1947
|
-
);
|
|
1948
|
-
throw v.name = "Invariant Violation", v;
|
|
1949
|
-
}
|
|
1950
|
-
}
|
|
1951
|
-
o.isRequired = o;
|
|
1952
|
-
function s() {
|
|
1953
|
-
return o;
|
|
1954
|
-
}
|
|
1955
|
-
var i = {
|
|
1956
|
-
array: o,
|
|
1957
|
-
bigint: o,
|
|
1958
|
-
bool: o,
|
|
1959
|
-
func: o,
|
|
1960
|
-
number: o,
|
|
1961
|
-
object: o,
|
|
1962
|
-
string: o,
|
|
1963
|
-
symbol: o,
|
|
1964
|
-
any: o,
|
|
1965
|
-
arrayOf: s,
|
|
1966
|
-
element: o,
|
|
1967
|
-
elementType: o,
|
|
1968
|
-
instanceOf: s,
|
|
1969
|
-
node: o,
|
|
1970
|
-
objectOf: s,
|
|
1971
|
-
oneOf: s,
|
|
1972
|
-
oneOfType: s,
|
|
1973
|
-
shape: s,
|
|
1974
|
-
exact: s,
|
|
1975
|
-
checkPropTypes: t,
|
|
1976
|
-
resetWarningCache: r
|
|
1977
|
-
};
|
|
1978
|
-
return i.PropTypes = i, i;
|
|
1979
|
-
}, Sr;
|
|
1980
|
-
}
|
|
1981
|
-
if (process.env.NODE_ENV !== "production") {
|
|
1982
|
-
var po = yt(), go = !0;
|
|
1983
|
-
S.exports = lo()(po.isElement, go);
|
|
1984
|
-
} else
|
|
1985
|
-
S.exports = fo()();
|
|
1986
|
-
const ho = {
|
|
1987
|
-
display: "flex",
|
|
1988
|
-
height: "100%",
|
|
1989
|
-
width: "100%",
|
|
1990
|
-
justifyContent: "center",
|
|
1991
|
-
alignItems: "center"
|
|
1992
|
-
};
|
|
1993
|
-
function mo({
|
|
1994
|
-
content: e
|
|
1995
|
-
}) {
|
|
1996
|
-
return /* @__PURE__ */ a("div", {
|
|
1997
|
-
style: ho,
|
|
1998
|
-
children: e
|
|
1999
|
-
});
|
|
2000
|
-
}
|
|
2001
|
-
const Er = {
|
|
2002
|
-
wrapper: {
|
|
2003
|
-
display: "flex",
|
|
2004
|
-
position: "relative",
|
|
2005
|
-
textAlign: "initial"
|
|
2006
|
-
},
|
|
2007
|
-
fullWidth: {
|
|
2008
|
-
width: "100%"
|
|
2009
|
-
},
|
|
2010
|
-
hide: {
|
|
2011
|
-
display: "none"
|
|
2012
|
-
}
|
|
2013
|
-
};
|
|
2014
|
-
function wt({
|
|
2015
|
-
width: e,
|
|
2016
|
-
height: r,
|
|
2017
|
-
isEditorReady: t,
|
|
2018
|
-
loading: o,
|
|
2019
|
-
_ref: s,
|
|
2020
|
-
className: i,
|
|
2021
|
-
wrapperProps: c
|
|
2022
|
-
}) {
|
|
2023
|
-
return /* @__PURE__ */ I("section", {
|
|
2024
|
-
style: {
|
|
2025
|
-
...Er.wrapper,
|
|
2026
|
-
width: e,
|
|
2027
|
-
height: r
|
|
2028
|
-
},
|
|
2029
|
-
...c,
|
|
2030
|
-
children: [!t && /* @__PURE__ */ a(mo, {
|
|
2031
|
-
content: o
|
|
2032
|
-
}), /* @__PURE__ */ a("div", {
|
|
2033
|
-
ref: s,
|
|
2034
|
-
style: {
|
|
2035
|
-
...Er.fullWidth,
|
|
2036
|
-
...!t && Er.hide
|
|
2037
|
-
},
|
|
2038
|
-
className: i
|
|
2039
|
-
})]
|
|
2040
|
-
});
|
|
2041
|
-
}
|
|
2042
|
-
wt.propTypes = {
|
|
2043
|
-
width: S.exports.oneOfType([S.exports.number, S.exports.string]).isRequired,
|
|
2044
|
-
height: S.exports.oneOfType([S.exports.number, S.exports.string]).isRequired,
|
|
2045
|
-
loading: S.exports.oneOfType([S.exports.element, S.exports.string]).isRequired,
|
|
2046
|
-
isEditorReady: S.exports.bool.isRequired,
|
|
2047
|
-
className: S.exports.string,
|
|
2048
|
-
wrapperProps: S.exports.object
|
|
2049
|
-
};
|
|
2050
|
-
var St = /* @__PURE__ */ dt(wt);
|
|
2051
|
-
function Et(e) {
|
|
2052
|
-
we(e, []);
|
|
2053
|
-
}
|
|
2054
|
-
function be(e, r, t = !0) {
|
|
2055
|
-
const o = ue(!0);
|
|
2056
|
-
we(o.current || !t ? () => {
|
|
2057
|
-
o.current = !1;
|
|
2058
|
-
} : e, r);
|
|
2059
|
-
}
|
|
2060
|
-
function Ne() {
|
|
2061
|
-
}
|
|
2062
|
-
function rr(e, r, t, o) {
|
|
2063
|
-
return vo(e, o) || yo(e, r, t, o);
|
|
2064
|
-
}
|
|
2065
|
-
function vo(e, r) {
|
|
2066
|
-
return e.editor.getModel(Tt(e, r));
|
|
2067
|
-
}
|
|
2068
|
-
function yo(e, r, t, o) {
|
|
2069
|
-
return e.editor.createModel(r, t, o && Tt(e, o));
|
|
2070
|
-
}
|
|
2071
|
-
function Tt(e, r) {
|
|
2072
|
-
return e.Uri.parse(r);
|
|
2073
|
-
}
|
|
2074
|
-
function bo(e) {
|
|
2075
|
-
return e === void 0;
|
|
2076
|
-
}
|
|
2077
|
-
function Ot({
|
|
2078
|
-
original: e,
|
|
2079
|
-
modified: r,
|
|
2080
|
-
language: t,
|
|
2081
|
-
originalLanguage: o,
|
|
2082
|
-
modifiedLanguage: s,
|
|
2083
|
-
originalModelPath: i,
|
|
2084
|
-
modifiedModelPath: c,
|
|
2085
|
-
keepCurrentOriginalModel: u,
|
|
2086
|
-
keepCurrentModifiedModel: d,
|
|
2087
|
-
theme: m,
|
|
2088
|
-
loading: b,
|
|
2089
|
-
options: h,
|
|
2090
|
-
height: v,
|
|
2091
|
-
width: x,
|
|
2092
|
-
className: Y,
|
|
2093
|
-
wrapperProps: k,
|
|
2094
|
-
beforeMount: G,
|
|
2095
|
-
onMount: K
|
|
2096
|
-
}) {
|
|
2097
|
-
const [D, H] = Ie(!1), [N, p] = Ie(!0), X = ue(null), ee = ue(null), Se = ue(null), Q = ue(K), $ = ue(G);
|
|
2098
|
-
Et(() => {
|
|
2099
|
-
const z = Ye.init();
|
|
2100
|
-
return z.then((B) => (ee.current = B) && p(!1)).catch((B) => (B == null ? void 0 : B.type) !== "cancelation" && console.error("Monaco initialization: error:", B)), () => X.current ? ie() : z.cancel();
|
|
2101
|
-
}), be(() => {
|
|
2102
|
-
const z = X.current.getModifiedEditor();
|
|
2103
|
-
z.getOption(ee.current.editor.EditorOption.readOnly) ? z.setValue(r) : r !== z.getValue() && (z.executeEdits("", [{
|
|
2104
|
-
range: z.getModel().getFullModelRange(),
|
|
2105
|
-
text: r,
|
|
2106
|
-
forceMoveMarkers: !0
|
|
2107
|
-
}]), z.pushUndoStop());
|
|
2108
|
-
}, [r], D), be(() => {
|
|
2109
|
-
X.current.getModel().original.setValue(e);
|
|
2110
|
-
}, [e], D), be(() => {
|
|
2111
|
-
const {
|
|
2112
|
-
original: z,
|
|
2113
|
-
modified: B
|
|
2114
|
-
} = X.current.getModel();
|
|
2115
|
-
ee.current.editor.setModelLanguage(z, o || t), ee.current.editor.setModelLanguage(B, s || t);
|
|
2116
|
-
}, [t, o, s], D), be(() => {
|
|
2117
|
-
ee.current.editor.setTheme(m);
|
|
2118
|
-
}, [m], D), be(() => {
|
|
2119
|
-
X.current.updateOptions(h);
|
|
2120
|
-
}, [h], D);
|
|
2121
|
-
const ge = Tr(() => {
|
|
2122
|
-
$.current(ee.current);
|
|
2123
|
-
const z = rr(ee.current, e, o || t, i), B = rr(ee.current, r, s || t, c);
|
|
2124
|
-
X.current.setModel({
|
|
2125
|
-
original: z,
|
|
2126
|
-
modified: B
|
|
2127
|
-
});
|
|
2128
|
-
}, [t, r, s, e, o, i, c]), ye = Tr(() => {
|
|
2129
|
-
X.current = ee.current.editor.createDiffEditor(Se.current, {
|
|
2130
|
-
automaticLayout: !0,
|
|
2131
|
-
...h
|
|
2132
|
-
}), ge(), ee.current.editor.setTheme(m), H(!0);
|
|
2133
|
-
}, [h, m, ge]);
|
|
2134
|
-
we(() => {
|
|
2135
|
-
D && Q.current(X.current, ee.current);
|
|
2136
|
-
}, [D]), we(() => {
|
|
2137
|
-
!N && !D && ye();
|
|
2138
|
-
}, [N, D, ye]);
|
|
2139
|
-
function ie() {
|
|
2140
|
-
const z = X.current.getModel();
|
|
2141
|
-
if (!u) {
|
|
2142
|
-
var B;
|
|
2143
|
-
(B = z.original) === null || B === void 0 || B.dispose();
|
|
2144
|
-
}
|
|
2145
|
-
if (!d) {
|
|
2146
|
-
var te;
|
|
2147
|
-
(te = z.modified) === null || te === void 0 || te.dispose();
|
|
2148
|
-
}
|
|
2149
|
-
X.current.dispose();
|
|
2150
|
-
}
|
|
2151
|
-
return /* @__PURE__ */ a(St, {
|
|
2152
|
-
width: x,
|
|
2153
|
-
height: v,
|
|
2154
|
-
isEditorReady: D,
|
|
2155
|
-
loading: b,
|
|
2156
|
-
_ref: Se,
|
|
2157
|
-
className: Y,
|
|
2158
|
-
wrapperProps: k
|
|
2159
|
-
});
|
|
2160
|
-
}
|
|
2161
|
-
Ot.propTypes = {
|
|
2162
|
-
original: S.exports.string,
|
|
2163
|
-
modified: S.exports.string,
|
|
2164
|
-
language: S.exports.string,
|
|
2165
|
-
originalLanguage: S.exports.string,
|
|
2166
|
-
modifiedLanguage: S.exports.string,
|
|
2167
|
-
originalModelPath: S.exports.string,
|
|
2168
|
-
modifiedModelPath: S.exports.string,
|
|
2169
|
-
keepCurrentOriginalModel: S.exports.bool,
|
|
2170
|
-
keepCurrentModifiedModel: S.exports.bool,
|
|
2171
|
-
theme: S.exports.string,
|
|
2172
|
-
loading: S.exports.oneOfType([S.exports.element, S.exports.string]),
|
|
2173
|
-
options: S.exports.object,
|
|
2174
|
-
width: S.exports.oneOfType([S.exports.number, S.exports.string]),
|
|
2175
|
-
height: S.exports.oneOfType([S.exports.number, S.exports.string]),
|
|
2176
|
-
className: S.exports.string,
|
|
2177
|
-
wrapperProps: S.exports.object,
|
|
2178
|
-
beforeMount: S.exports.func,
|
|
2179
|
-
onMount: S.exports.func
|
|
2180
|
-
};
|
|
2181
|
-
Ot.defaultProps = {
|
|
2182
|
-
theme: "light",
|
|
2183
|
-
loading: "Loading...",
|
|
2184
|
-
options: {},
|
|
2185
|
-
keepCurrentOriginalModel: !1,
|
|
2186
|
-
keepCurrentModifiedModel: !1,
|
|
2187
|
-
width: "100%",
|
|
2188
|
-
height: "100%",
|
|
2189
|
-
wrapperProps: {},
|
|
2190
|
-
beforeMount: Ne,
|
|
2191
|
-
onMount: Ne
|
|
2192
|
-
};
|
|
2193
|
-
function wo(e) {
|
|
2194
|
-
const r = ue();
|
|
2195
|
-
return we(() => {
|
|
2196
|
-
r.current = e;
|
|
2197
|
-
}, [e]), r.current;
|
|
2198
|
-
}
|
|
2199
|
-
const Xe = /* @__PURE__ */ new Map();
|
|
2200
|
-
function Ir({
|
|
2201
|
-
defaultValue: e,
|
|
2202
|
-
defaultLanguage: r,
|
|
2203
|
-
defaultPath: t,
|
|
2204
|
-
value: o,
|
|
2205
|
-
language: s,
|
|
2206
|
-
path: i,
|
|
2207
|
-
theme: c,
|
|
2208
|
-
line: u,
|
|
2209
|
-
loading: d,
|
|
2210
|
-
options: m,
|
|
2211
|
-
overrideServices: b,
|
|
2212
|
-
saveViewState: h,
|
|
2213
|
-
keepCurrentModel: v,
|
|
2214
|
-
width: x,
|
|
2215
|
-
height: Y,
|
|
2216
|
-
className: k,
|
|
2217
|
-
wrapperProps: G,
|
|
2218
|
-
beforeMount: K,
|
|
2219
|
-
onMount: D,
|
|
2220
|
-
onChange: H,
|
|
2221
|
-
onValidate: N
|
|
2222
|
-
}) {
|
|
2223
|
-
const [p, X] = Ie(!1), [ee, Se] = Ie(!0), Q = ue(null), $ = ue(null), ge = ue(null), ye = ue(D), ie = ue(K), z = ue(null), B = ue(o), te = wo(i), pe = ue(!1);
|
|
2224
|
-
Et(() => {
|
|
2225
|
-
const l = Ye.init();
|
|
2226
|
-
return l.then((g) => (Q.current = g) && Se(!1)).catch((g) => (g == null ? void 0 : g.type) !== "cancelation" && console.error("Monaco initialization: error:", g)), () => $.current ? Pe() : l.cancel();
|
|
2227
|
-
}), be(() => {
|
|
2228
|
-
const l = rr(Q.current, e || o, r || s, i);
|
|
2229
|
-
l !== $.current.getModel() && (h && Xe.set(te, $.current.saveViewState()), $.current.setModel(l), h && $.current.restoreViewState(Xe.get(i)));
|
|
2230
|
-
}, [i], p), be(() => {
|
|
2231
|
-
$.current.updateOptions(m);
|
|
2232
|
-
}, [m], p), be(() => {
|
|
2233
|
-
$.current.getOption(Q.current.editor.EditorOption.readOnly) ? $.current.setValue(o) : o !== $.current.getValue() && ($.current.executeEdits("", [{
|
|
2234
|
-
range: $.current.getModel().getFullModelRange(),
|
|
2235
|
-
text: o,
|
|
2236
|
-
forceMoveMarkers: !0
|
|
2237
|
-
}]), $.current.pushUndoStop());
|
|
2238
|
-
}, [o], p), be(() => {
|
|
2239
|
-
Q.current.editor.setModelLanguage($.current.getModel(), s);
|
|
2240
|
-
}, [s], p), be(() => {
|
|
2241
|
-
bo(u) || $.current.revealLine(u);
|
|
2242
|
-
}, [u], p), be(() => {
|
|
2243
|
-
Q.current.editor.setTheme(c);
|
|
2244
|
-
}, [c], p);
|
|
2245
|
-
const Ee = Tr(() => {
|
|
2246
|
-
if (!pe.current) {
|
|
2247
|
-
ie.current(Q.current);
|
|
2248
|
-
const l = i || t, g = rr(Q.current, o || e, r || s, l);
|
|
2249
|
-
$.current = Q.current.editor.create(ge.current, {
|
|
2250
|
-
model: g,
|
|
2251
|
-
automaticLayout: !0,
|
|
2252
|
-
...m
|
|
2253
|
-
}, b), h && $.current.restoreViewState(Xe.get(l)), Q.current.editor.setTheme(c), X(!0), pe.current = !0;
|
|
2254
|
-
}
|
|
2255
|
-
}, [e, r, t, o, s, i, m, b, h, c]);
|
|
2256
|
-
we(() => {
|
|
2257
|
-
p && ye.current($.current, Q.current);
|
|
2258
|
-
}, [p]), we(() => {
|
|
2259
|
-
!ee && !p && Ee();
|
|
2260
|
-
}, [ee, p, Ee]), B.current = o, we(() => {
|
|
2261
|
-
if (p && H) {
|
|
2262
|
-
var l, g;
|
|
2263
|
-
(l = z.current) === null || l === void 0 || l.dispose(), z.current = (g = $.current) === null || g === void 0 ? void 0 : g.onDidChangeModelContent((T) => {
|
|
2264
|
-
H($.current.getValue(), T);
|
|
2265
|
-
});
|
|
2266
|
-
}
|
|
2267
|
-
}, [p, H]), we(() => {
|
|
2268
|
-
if (p) {
|
|
2269
|
-
const l = Q.current.editor.onDidChangeMarkers((g) => {
|
|
2270
|
-
var T;
|
|
2271
|
-
const O = (T = $.current.getModel()) === null || T === void 0 ? void 0 : T.uri;
|
|
2272
|
-
if (O && g.find((C) => C.path === O.path)) {
|
|
2273
|
-
const C = Q.current.editor.getModelMarkers({
|
|
2274
|
-
resource: O
|
|
2275
|
-
});
|
|
2276
|
-
N == null || N(C);
|
|
2277
|
-
}
|
|
2278
|
-
});
|
|
2279
|
-
return () => {
|
|
2280
|
-
l == null || l.dispose();
|
|
2281
|
-
};
|
|
2282
|
-
}
|
|
2283
|
-
}, [p, N]);
|
|
2284
|
-
function Pe() {
|
|
2285
|
-
var l;
|
|
2286
|
-
if ((l = z.current) === null || l === void 0 || l.dispose(), v)
|
|
2287
|
-
h && Xe.set(i, $.current.saveViewState());
|
|
2288
|
-
else {
|
|
2289
|
-
var g;
|
|
2290
|
-
(g = $.current.getModel()) === null || g === void 0 || g.dispose();
|
|
2291
|
-
}
|
|
2292
|
-
$.current.dispose();
|
|
2293
|
-
}
|
|
2294
|
-
return /* @__PURE__ */ a(St, {
|
|
2295
|
-
width: x,
|
|
2296
|
-
height: Y,
|
|
2297
|
-
isEditorReady: p,
|
|
2298
|
-
loading: d,
|
|
2299
|
-
_ref: ge,
|
|
2300
|
-
className: k,
|
|
2301
|
-
wrapperProps: G
|
|
2302
|
-
});
|
|
2303
|
-
}
|
|
2304
|
-
Ir.propTypes = {
|
|
2305
|
-
defaultValue: S.exports.string,
|
|
2306
|
-
defaultPath: S.exports.string,
|
|
2307
|
-
defaultLanguage: S.exports.string,
|
|
2308
|
-
value: S.exports.string,
|
|
2309
|
-
language: S.exports.string,
|
|
2310
|
-
path: S.exports.string,
|
|
2311
|
-
theme: S.exports.string,
|
|
2312
|
-
line: S.exports.number,
|
|
2313
|
-
loading: S.exports.oneOfType([S.exports.element, S.exports.string]),
|
|
2314
|
-
options: S.exports.object,
|
|
2315
|
-
overrideServices: S.exports.object,
|
|
2316
|
-
saveViewState: S.exports.bool,
|
|
2317
|
-
keepCurrentModel: S.exports.bool,
|
|
2318
|
-
width: S.exports.oneOfType([S.exports.number, S.exports.string]),
|
|
2319
|
-
height: S.exports.oneOfType([S.exports.number, S.exports.string]),
|
|
2320
|
-
className: S.exports.string,
|
|
2321
|
-
wrapperProps: S.exports.object,
|
|
2322
|
-
beforeMount: S.exports.func,
|
|
2323
|
-
onMount: S.exports.func,
|
|
2324
|
-
onChange: S.exports.func,
|
|
2325
|
-
onValidate: S.exports.func
|
|
2326
|
-
};
|
|
2327
|
-
Ir.defaultProps = {
|
|
2328
|
-
theme: "light",
|
|
2329
|
-
loading: "Loading...",
|
|
2330
|
-
options: {},
|
|
2331
|
-
overrideServices: {},
|
|
2332
|
-
saveViewState: !0,
|
|
2333
|
-
keepCurrentModel: !1,
|
|
2334
|
-
width: "100%",
|
|
2335
|
-
height: "100%",
|
|
2336
|
-
wrapperProps: {},
|
|
2337
|
-
beforeMount: Ne,
|
|
2338
|
-
onMount: Ne,
|
|
2339
|
-
onValidate: Ne
|
|
2340
|
-
};
|
|
2341
|
-
var So = /* @__PURE__ */ dt(Ir);
|
|
2342
937
|
self.MonacoEnvironment = {
|
|
2343
|
-
getWorker(
|
|
2344
|
-
return
|
|
938
|
+
getWorker(t, n) {
|
|
939
|
+
return n === "json" ? new st() : n === "css" || n === "scss" || n === "less" ? new at() : n === "html" || n === "handlebars" || n === "razor" ? new ot() : n === "typescript" || n === "javascript" ? new ct() : new it();
|
|
2345
940
|
}
|
|
2346
941
|
};
|
|
2347
|
-
function
|
|
2348
|
-
|
|
2349
|
-
}
|
|
2350
|
-
|
|
2351
|
-
const
|
|
2352
|
-
value:
|
|
2353
|
-
onChange:
|
|
2354
|
-
}) => /* @__PURE__ */
|
|
942
|
+
function wt() {
|
|
943
|
+
Ee.__getMonacoInstance() || (console.log("loading monaco"), Ee.config({ monaco: nt }), Ee.init().then((n) => console.log("here is the monaco instance:", n)));
|
|
944
|
+
}
|
|
945
|
+
wt();
|
|
946
|
+
const St = ({
|
|
947
|
+
value: t,
|
|
948
|
+
onChange: n
|
|
949
|
+
}) => /* @__PURE__ */ r(F, {
|
|
2355
950
|
sx: {
|
|
2356
951
|
position: "relative"
|
|
2357
952
|
},
|
|
2358
|
-
children: /* @__PURE__ */
|
|
953
|
+
children: /* @__PURE__ */ r(tt, {
|
|
2359
954
|
height: "500px",
|
|
2360
955
|
defaultLanguage: "javascript",
|
|
2361
|
-
value:
|
|
956
|
+
value: t,
|
|
2362
957
|
onChange: (o) => {
|
|
2363
|
-
!o ||
|
|
958
|
+
!o || n(o);
|
|
2364
959
|
},
|
|
2365
960
|
theme: "vs-dark",
|
|
2366
961
|
options: {
|
|
@@ -2369,63 +964,63 @@ const To = ({
|
|
|
2369
964
|
}
|
|
2370
965
|
}
|
|
2371
966
|
})
|
|
2372
|
-
}),
|
|
2373
|
-
value:
|
|
2374
|
-
onChange:
|
|
2375
|
-
label:
|
|
967
|
+
}), sr = ke(({
|
|
968
|
+
value: t,
|
|
969
|
+
onChange: n,
|
|
970
|
+
label: a,
|
|
2376
971
|
modalTitle: o,
|
|
2377
|
-
defaultValue:
|
|
2378
|
-
styles:
|
|
972
|
+
defaultValue: l,
|
|
973
|
+
styles: s
|
|
2379
974
|
}, c) => {
|
|
2380
|
-
const [
|
|
2381
|
-
setTrue:
|
|
2382
|
-
setFalse:
|
|
2383
|
-
}] =
|
|
2384
|
-
|
|
2385
|
-
},
|
|
2386
|
-
|
|
2387
|
-
},
|
|
2388
|
-
|
|
975
|
+
const [d, {
|
|
976
|
+
setTrue: p,
|
|
977
|
+
setFalse: b
|
|
978
|
+
}] = rt(), [S, m] = lr(t), f = () => {
|
|
979
|
+
b(), n(S);
|
|
980
|
+
}, z = () => {
|
|
981
|
+
b(), m(t);
|
|
982
|
+
}, q = () => {
|
|
983
|
+
m(l);
|
|
2389
984
|
};
|
|
2390
|
-
return
|
|
2391
|
-
|
|
2392
|
-
}, [
|
|
2393
|
-
children: [/* @__PURE__ */
|
|
985
|
+
return cr(() => {
|
|
986
|
+
m(t);
|
|
987
|
+
}, [t]), /* @__PURE__ */ v(N, {
|
|
988
|
+
children: [/* @__PURE__ */ r(T, {
|
|
2394
989
|
variant: "filled",
|
|
2395
|
-
size:
|
|
2396
|
-
onClick:
|
|
990
|
+
size: s.button.size,
|
|
991
|
+
onClick: p,
|
|
2397
992
|
sx: {
|
|
2398
993
|
flexGrow: 1
|
|
2399
994
|
},
|
|
2400
|
-
children:
|
|
2401
|
-
}), /* @__PURE__ */
|
|
995
|
+
children: a
|
|
996
|
+
}), /* @__PURE__ */ r(ne, {
|
|
2402
997
|
size: 800,
|
|
2403
998
|
title: o,
|
|
2404
|
-
opened:
|
|
2405
|
-
onClose:
|
|
999
|
+
opened: d,
|
|
1000
|
+
onClose: b,
|
|
2406
1001
|
closeOnClickOutside: !1,
|
|
2407
1002
|
withCloseButton: !1,
|
|
2408
|
-
children:
|
|
2409
|
-
children: [/* @__PURE__ */
|
|
2410
|
-
value:
|
|
2411
|
-
onChange:
|
|
2412
|
-
}), /* @__PURE__ */
|
|
1003
|
+
children: d && /* @__PURE__ */ v(ze, {
|
|
1004
|
+
children: [/* @__PURE__ */ r(St, {
|
|
1005
|
+
value: S,
|
|
1006
|
+
onChange: m
|
|
1007
|
+
}), /* @__PURE__ */ v(O, {
|
|
2413
1008
|
position: "apart",
|
|
2414
|
-
children: [/* @__PURE__ */
|
|
2415
|
-
onClick:
|
|
1009
|
+
children: [/* @__PURE__ */ r(T, {
|
|
1010
|
+
onClick: q,
|
|
2416
1011
|
color: "red",
|
|
2417
|
-
leftIcon: /* @__PURE__ */
|
|
1012
|
+
leftIcon: /* @__PURE__ */ r(Jr, {
|
|
2418
1013
|
size: 20
|
|
2419
1014
|
}),
|
|
2420
1015
|
children: "Rest"
|
|
2421
|
-
}), /* @__PURE__ */
|
|
1016
|
+
}), /* @__PURE__ */ v(O, {
|
|
2422
1017
|
position: "right",
|
|
2423
|
-
children: [/* @__PURE__ */
|
|
2424
|
-
onClick:
|
|
1018
|
+
children: [/* @__PURE__ */ r(T, {
|
|
1019
|
+
onClick: z,
|
|
2425
1020
|
variant: "subtle",
|
|
2426
1021
|
children: "Cancel"
|
|
2427
|
-
}), /* @__PURE__ */
|
|
2428
|
-
onClick:
|
|
1022
|
+
}), /* @__PURE__ */ r(T, {
|
|
1023
|
+
onClick: f,
|
|
2429
1024
|
children: "OK"
|
|
2430
1025
|
})]
|
|
2431
1026
|
})]
|
|
@@ -2433,117 +1028,117 @@ const To = ({
|
|
|
2433
1028
|
})
|
|
2434
1029
|
})]
|
|
2435
1030
|
});
|
|
2436
|
-
}),
|
|
1031
|
+
}), le = {
|
|
2437
1032
|
pre: ["function pre_process({ method, url, params, headers, data }, utils) {", " // your code goes here", " return { method, url, params, headers, data }", "}"].join(`
|
|
2438
1033
|
`),
|
|
2439
1034
|
post: ["function post_process(res, utils) {", " // your code goes here", " return data", "}"].join(`
|
|
2440
1035
|
`)
|
|
2441
1036
|
};
|
|
2442
|
-
function
|
|
2443
|
-
submit:
|
|
2444
|
-
styles:
|
|
1037
|
+
function _t({
|
|
1038
|
+
submit: t,
|
|
1039
|
+
styles: n = X
|
|
2445
1040
|
}) {
|
|
2446
1041
|
const {
|
|
2447
|
-
control:
|
|
1042
|
+
control: a,
|
|
2448
1043
|
setValue: o,
|
|
2449
|
-
handleSubmit:
|
|
2450
|
-
} =
|
|
1044
|
+
handleSubmit: l
|
|
1045
|
+
} = J({
|
|
2451
1046
|
defaultValues: {
|
|
2452
1047
|
type: "http",
|
|
2453
1048
|
key: "",
|
|
2454
1049
|
config: {
|
|
2455
1050
|
host: "",
|
|
2456
1051
|
processing: {
|
|
2457
|
-
pre:
|
|
2458
|
-
post:
|
|
1052
|
+
pre: le.pre,
|
|
1053
|
+
post: le.post
|
|
2459
1054
|
}
|
|
2460
1055
|
}
|
|
2461
1056
|
}
|
|
2462
1057
|
});
|
|
2463
|
-
return /* @__PURE__ */
|
|
1058
|
+
return /* @__PURE__ */ r(F, {
|
|
2464
1059
|
mx: "auto",
|
|
2465
|
-
children: /* @__PURE__ */
|
|
2466
|
-
onSubmit:
|
|
2467
|
-
children: [/* @__PURE__ */
|
|
1060
|
+
children: /* @__PURE__ */ v("form", {
|
|
1061
|
+
onSubmit: l(t),
|
|
1062
|
+
children: [/* @__PURE__ */ r(R, {
|
|
2468
1063
|
name: "key",
|
|
2469
|
-
control:
|
|
1064
|
+
control: a,
|
|
2470
1065
|
render: ({
|
|
2471
|
-
field:
|
|
2472
|
-
}) => /* @__PURE__ */
|
|
2473
|
-
mb:
|
|
2474
|
-
size:
|
|
1066
|
+
field: s
|
|
1067
|
+
}) => /* @__PURE__ */ r(D, {
|
|
1068
|
+
mb: n.spacing,
|
|
1069
|
+
size: n.size,
|
|
2475
1070
|
required: !0,
|
|
2476
1071
|
label: "Name",
|
|
2477
1072
|
placeholder: "A unique name",
|
|
2478
|
-
...
|
|
1073
|
+
...s
|
|
2479
1074
|
})
|
|
2480
|
-
}), /* @__PURE__ */
|
|
1075
|
+
}), /* @__PURE__ */ r(Te, {
|
|
2481
1076
|
label: "Connection Info",
|
|
2482
1077
|
labelPosition: "center"
|
|
2483
|
-
}), /* @__PURE__ */
|
|
1078
|
+
}), /* @__PURE__ */ r(R, {
|
|
2484
1079
|
name: "config.host",
|
|
2485
|
-
control:
|
|
1080
|
+
control: a,
|
|
2486
1081
|
render: ({
|
|
2487
|
-
field:
|
|
2488
|
-
}) => /* @__PURE__ */
|
|
2489
|
-
mb:
|
|
2490
|
-
size:
|
|
1082
|
+
field: s
|
|
1083
|
+
}) => /* @__PURE__ */ r(D, {
|
|
1084
|
+
mb: n.spacing,
|
|
1085
|
+
size: n.size,
|
|
2491
1086
|
required: !0,
|
|
2492
1087
|
label: "Base URL",
|
|
2493
1088
|
sx: {
|
|
2494
1089
|
flexGrow: 1
|
|
2495
1090
|
},
|
|
2496
|
-
...
|
|
1091
|
+
...s
|
|
2497
1092
|
})
|
|
2498
|
-
}), /* @__PURE__ */
|
|
1093
|
+
}), /* @__PURE__ */ v(O, {
|
|
2499
1094
|
grow: !0,
|
|
2500
|
-
children: [/* @__PURE__ */
|
|
1095
|
+
children: [/* @__PURE__ */ r(R, {
|
|
2501
1096
|
name: "config.processing.pre",
|
|
2502
|
-
control:
|
|
1097
|
+
control: a,
|
|
2503
1098
|
render: ({
|
|
2504
|
-
field:
|
|
2505
|
-
}) => /* @__PURE__ */
|
|
1099
|
+
field: s
|
|
1100
|
+
}) => /* @__PURE__ */ r(sr, {
|
|
2506
1101
|
label: "Pre Processing",
|
|
2507
1102
|
modalTitle: "This function will run before sending the request (for scenarios like encryption)",
|
|
2508
|
-
defaultValue:
|
|
2509
|
-
...
|
|
2510
|
-
styles:
|
|
1103
|
+
defaultValue: le.pre,
|
|
1104
|
+
...s,
|
|
1105
|
+
styles: n
|
|
2511
1106
|
})
|
|
2512
|
-
}), /* @__PURE__ */
|
|
1107
|
+
}), /* @__PURE__ */ r(R, {
|
|
2513
1108
|
name: "config.processing.post",
|
|
2514
|
-
control:
|
|
1109
|
+
control: a,
|
|
2515
1110
|
render: ({
|
|
2516
|
-
field:
|
|
2517
|
-
}) => /* @__PURE__ */
|
|
1111
|
+
field: s
|
|
1112
|
+
}) => /* @__PURE__ */ r(sr, {
|
|
2518
1113
|
label: "Post Processing",
|
|
2519
1114
|
modalTitle: "This function will run after sending the request (for scenarios like decryption)",
|
|
2520
|
-
defaultValue:
|
|
2521
|
-
...
|
|
2522
|
-
styles:
|
|
1115
|
+
defaultValue: le.post,
|
|
1116
|
+
...s,
|
|
1117
|
+
styles: n
|
|
2523
1118
|
})
|
|
2524
1119
|
})]
|
|
2525
|
-
}), /* @__PURE__ */
|
|
1120
|
+
}), /* @__PURE__ */ r(O, {
|
|
2526
1121
|
position: "right",
|
|
2527
|
-
mt:
|
|
2528
|
-
children: /* @__PURE__ */
|
|
1122
|
+
mt: n.spacing,
|
|
1123
|
+
children: /* @__PURE__ */ r(T, {
|
|
2529
1124
|
type: "submit",
|
|
2530
|
-
size:
|
|
1125
|
+
size: n.button.size,
|
|
2531
1126
|
children: "Save"
|
|
2532
1127
|
})
|
|
2533
1128
|
})]
|
|
2534
1129
|
})
|
|
2535
1130
|
});
|
|
2536
1131
|
}
|
|
2537
|
-
function
|
|
2538
|
-
postSubmit:
|
|
2539
|
-
styles:
|
|
1132
|
+
function yt({
|
|
1133
|
+
postSubmit: t,
|
|
1134
|
+
styles: n = X
|
|
2540
1135
|
}) {
|
|
2541
|
-
const [
|
|
2542
|
-
type:
|
|
2543
|
-
key:
|
|
2544
|
-
config:
|
|
1136
|
+
const [a, o] = lr("postgresql"), l = async ({
|
|
1137
|
+
type: d,
|
|
1138
|
+
key: p,
|
|
1139
|
+
config: b
|
|
2545
1140
|
}) => {
|
|
2546
|
-
|
|
1141
|
+
W({
|
|
2547
1142
|
id: "for-creating",
|
|
2548
1143
|
title: "Pending",
|
|
2549
1144
|
message: "Adding data source...",
|
|
@@ -2551,30 +1146,30 @@ function Po({
|
|
|
2551
1146
|
});
|
|
2552
1147
|
try {
|
|
2553
1148
|
console.log({
|
|
2554
|
-
type:
|
|
2555
|
-
key:
|
|
2556
|
-
config:
|
|
2557
|
-
}), await
|
|
1149
|
+
type: d,
|
|
1150
|
+
key: p,
|
|
1151
|
+
config: b
|
|
1152
|
+
}), await j.datasource.create(d, p, b), x({
|
|
2558
1153
|
id: "for-creating",
|
|
2559
1154
|
title: "Successful",
|
|
2560
1155
|
message: "Data source is added",
|
|
2561
1156
|
color: "green"
|
|
2562
|
-
}),
|
|
2563
|
-
} catch (
|
|
2564
|
-
|
|
1157
|
+
}), t();
|
|
1158
|
+
} catch (S) {
|
|
1159
|
+
x({
|
|
2565
1160
|
id: "for-creating",
|
|
2566
1161
|
title: "Failed",
|
|
2567
|
-
message:
|
|
1162
|
+
message: S.message,
|
|
2568
1163
|
color: "red"
|
|
2569
1164
|
});
|
|
2570
1165
|
}
|
|
2571
|
-
},
|
|
2572
|
-
return /* @__PURE__ */
|
|
1166
|
+
}, s = a === "postgresql" || a === "mysql", c = a === "http";
|
|
1167
|
+
return /* @__PURE__ */ v(F, {
|
|
2573
1168
|
mx: "auto",
|
|
2574
|
-
children: [/* @__PURE__ */
|
|
1169
|
+
children: [/* @__PURE__ */ r(Yr, {
|
|
2575
1170
|
fullWidth: !0,
|
|
2576
|
-
mb:
|
|
2577
|
-
size:
|
|
1171
|
+
mb: n.spacing,
|
|
1172
|
+
size: n.size,
|
|
2578
1173
|
data: [{
|
|
2579
1174
|
label: "PostgreSQL",
|
|
2580
1175
|
value: "postgresql"
|
|
@@ -2585,105 +1180,105 @@ function Po({
|
|
|
2585
1180
|
label: "HTTP",
|
|
2586
1181
|
value: "http"
|
|
2587
1182
|
}],
|
|
2588
|
-
value:
|
|
2589
|
-
onChange: (
|
|
2590
|
-
}),
|
|
2591
|
-
submit:
|
|
2592
|
-
styles:
|
|
2593
|
-
type:
|
|
2594
|
-
}), c && /* @__PURE__ */
|
|
2595
|
-
submit:
|
|
2596
|
-
styles:
|
|
1183
|
+
value: a,
|
|
1184
|
+
onChange: (d) => o(d)
|
|
1185
|
+
}), s && /* @__PURE__ */ r(bt, {
|
|
1186
|
+
submit: l,
|
|
1187
|
+
styles: n,
|
|
1188
|
+
type: a
|
|
1189
|
+
}), c && /* @__PURE__ */ r(_t, {
|
|
1190
|
+
submit: l,
|
|
1191
|
+
styles: n
|
|
2597
1192
|
})]
|
|
2598
1193
|
});
|
|
2599
1194
|
}
|
|
2600
|
-
function
|
|
2601
|
-
onSuccess:
|
|
2602
|
-
styles:
|
|
1195
|
+
function Rt({
|
|
1196
|
+
onSuccess: t,
|
|
1197
|
+
styles: n = X
|
|
2603
1198
|
}) {
|
|
2604
|
-
const [
|
|
2605
|
-
return /* @__PURE__ */
|
|
2606
|
-
children: [/* @__PURE__ */
|
|
1199
|
+
const [a, o] = H.useState(!1), l = () => o(!0), s = () => o(!1);
|
|
1200
|
+
return /* @__PURE__ */ v(N, {
|
|
1201
|
+
children: [/* @__PURE__ */ r(ne, {
|
|
2607
1202
|
overflow: "inside",
|
|
2608
|
-
opened:
|
|
1203
|
+
opened: a,
|
|
2609
1204
|
onClose: () => o(!1),
|
|
2610
1205
|
title: "Add a data source",
|
|
2611
1206
|
trapFocus: !0,
|
|
2612
|
-
onDragStart: (
|
|
2613
|
-
|
|
1207
|
+
onDragStart: (d) => {
|
|
1208
|
+
d.stopPropagation();
|
|
2614
1209
|
},
|
|
2615
|
-
children: /* @__PURE__ */
|
|
1210
|
+
children: /* @__PURE__ */ r(yt, {
|
|
2616
1211
|
postSubmit: () => {
|
|
2617
|
-
|
|
1212
|
+
t(), s();
|
|
2618
1213
|
},
|
|
2619
|
-
styles:
|
|
1214
|
+
styles: n
|
|
2620
1215
|
})
|
|
2621
|
-
}), /* @__PURE__ */
|
|
2622
|
-
size:
|
|
2623
|
-
onClick:
|
|
2624
|
-
leftIcon: /* @__PURE__ */
|
|
1216
|
+
}), /* @__PURE__ */ r(T, {
|
|
1217
|
+
size: n.button.size,
|
|
1218
|
+
onClick: l,
|
|
1219
|
+
leftIcon: /* @__PURE__ */ r(xe, {
|
|
2625
1220
|
size: 20
|
|
2626
1221
|
}),
|
|
2627
1222
|
children: "Add a Data Source"
|
|
2628
1223
|
})]
|
|
2629
1224
|
});
|
|
2630
1225
|
}
|
|
2631
|
-
function
|
|
2632
|
-
return
|
|
2633
|
-
for (var
|
|
2634
|
-
var
|
|
2635
|
-
for (var o in
|
|
2636
|
-
Object.prototype.hasOwnProperty.call(
|
|
1226
|
+
function Ce() {
|
|
1227
|
+
return Ce = Object.assign ? Object.assign.bind() : function(t) {
|
|
1228
|
+
for (var n = 1; n < arguments.length; n++) {
|
|
1229
|
+
var a = arguments[n];
|
|
1230
|
+
for (var o in a)
|
|
1231
|
+
Object.prototype.hasOwnProperty.call(a, o) && (t[o] = a[o]);
|
|
2637
1232
|
}
|
|
2638
|
-
return
|
|
2639
|
-
},
|
|
1233
|
+
return t;
|
|
1234
|
+
}, Ce.apply(this, arguments);
|
|
2640
1235
|
}
|
|
2641
|
-
function
|
|
2642
|
-
if (
|
|
1236
|
+
function Pt(t, n) {
|
|
1237
|
+
if (t == null)
|
|
2643
1238
|
return {};
|
|
2644
|
-
var
|
|
1239
|
+
var a, o, l = function(c, d) {
|
|
2645
1240
|
if (c == null)
|
|
2646
1241
|
return {};
|
|
2647
|
-
var
|
|
2648
|
-
for (
|
|
2649
|
-
|
|
2650
|
-
return
|
|
2651
|
-
}(
|
|
1242
|
+
var p, b, S = {}, m = Object.keys(c);
|
|
1243
|
+
for (b = 0; b < m.length; b++)
|
|
1244
|
+
p = m[b], d.indexOf(p) >= 0 || (S[p] = c[p]);
|
|
1245
|
+
return S;
|
|
1246
|
+
}(t, n);
|
|
2652
1247
|
if (Object.getOwnPropertySymbols) {
|
|
2653
|
-
var
|
|
2654
|
-
for (o = 0; o <
|
|
2655
|
-
|
|
1248
|
+
var s = Object.getOwnPropertySymbols(t);
|
|
1249
|
+
for (o = 0; o < s.length; o++)
|
|
1250
|
+
a = s[o], n.indexOf(a) >= 0 || Object.prototype.propertyIsEnumerable.call(t, a) && (l[a] = t[a]);
|
|
2656
1251
|
}
|
|
2657
|
-
return
|
|
1252
|
+
return l;
|
|
2658
1253
|
}
|
|
2659
|
-
var
|
|
2660
|
-
function
|
|
2661
|
-
var
|
|
2662
|
-
return
|
|
1254
|
+
var Et = ["size", "color", "stroke"];
|
|
1255
|
+
function Ct(t) {
|
|
1256
|
+
var n = t.size, a = n === void 0 ? 24 : n, o = t.color, l = o === void 0 ? "currentColor" : o, s = t.stroke, c = s === void 0 ? 2 : s, d = Pt(t, Et);
|
|
1257
|
+
return ee.createElement("svg", Ce({ xmlns: "http://www.w3.org/2000/svg", className: "icon icon-tabler icon-tabler-lock", width: a, height: a, viewBox: "0 0 24 24", strokeWidth: c, stroke: l, fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, d), ee.createElement("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), ee.createElement("rect", { x: 5, y: 11, width: 14, height: 10, rx: 2 }), ee.createElement("circle", { cx: 12, cy: 16, r: 1 }), ee.createElement("path", { d: "M8 11v-4a4 4 0 0 1 8 0v4" }));
|
|
2663
1258
|
}
|
|
2664
|
-
function
|
|
2665
|
-
id:
|
|
2666
|
-
name:
|
|
2667
|
-
isProtected:
|
|
1259
|
+
function Tt({
|
|
1260
|
+
id: t,
|
|
1261
|
+
name: n,
|
|
1262
|
+
isProtected: a,
|
|
2668
1263
|
onSuccess: o,
|
|
2669
|
-
styles:
|
|
1264
|
+
styles: l = X
|
|
2670
1265
|
}) {
|
|
2671
|
-
const
|
|
2672
|
-
!
|
|
1266
|
+
const s = fe(), c = async () => {
|
|
1267
|
+
!t || (W({
|
|
2673
1268
|
id: "for-deleting",
|
|
2674
1269
|
title: "Pending",
|
|
2675
1270
|
message: "Deleting data source...",
|
|
2676
1271
|
loading: !0
|
|
2677
|
-
}), await
|
|
1272
|
+
}), await j.datasource.delete(t), x({
|
|
2678
1273
|
id: "for-deleting",
|
|
2679
1274
|
title: "Successful",
|
|
2680
|
-
message: `Data source [${
|
|
1275
|
+
message: `Data source [${n}] is deleted`,
|
|
2681
1276
|
color: "green"
|
|
2682
1277
|
}), o());
|
|
2683
|
-
},
|
|
1278
|
+
}, d = () => s.openConfirmModal({
|
|
2684
1279
|
title: "Delete this data source?",
|
|
2685
|
-
children: /* @__PURE__ */
|
|
2686
|
-
size:
|
|
1280
|
+
children: /* @__PURE__ */ r(ue, {
|
|
1281
|
+
size: l.size,
|
|
2687
1282
|
children: "This action won't affect your database."
|
|
2688
1283
|
}),
|
|
2689
1284
|
labels: {
|
|
@@ -2692,8 +1287,8 @@ function jo({
|
|
|
2692
1287
|
},
|
|
2693
1288
|
onCancel: () => console.log("Cancel"),
|
|
2694
1289
|
onConfirm: c
|
|
2695
|
-
}),
|
|
2696
|
-
return
|
|
1290
|
+
}), p = Kr();
|
|
1291
|
+
return a ? /* @__PURE__ */ r(Br, {
|
|
2697
1292
|
withArrow: !0,
|
|
2698
1293
|
events: {
|
|
2699
1294
|
hover: !0,
|
|
@@ -2701,89 +1296,89 @@ function jo({
|
|
|
2701
1296
|
focus: !1
|
|
2702
1297
|
},
|
|
2703
1298
|
label: "This is a preset datasource, it can not be deleted",
|
|
2704
|
-
children: /* @__PURE__ */
|
|
2705
|
-
children: /* @__PURE__ */
|
|
1299
|
+
children: /* @__PURE__ */ r("span", {
|
|
1300
|
+
children: /* @__PURE__ */ r(Ct, {
|
|
2706
1301
|
size: 16,
|
|
2707
|
-
color:
|
|
1302
|
+
color: p.colors.gray[7]
|
|
2708
1303
|
})
|
|
2709
1304
|
})
|
|
2710
|
-
}) : /* @__PURE__ */
|
|
2711
|
-
size:
|
|
1305
|
+
}) : /* @__PURE__ */ r(T, {
|
|
1306
|
+
size: l.button.size,
|
|
2712
1307
|
color: "red",
|
|
2713
|
-
onClick:
|
|
2714
|
-
leftIcon: /* @__PURE__ */
|
|
1308
|
+
onClick: d,
|
|
1309
|
+
leftIcon: /* @__PURE__ */ r(De, {
|
|
2715
1310
|
size: 20
|
|
2716
1311
|
}),
|
|
2717
1312
|
children: "Delete"
|
|
2718
1313
|
});
|
|
2719
1314
|
}
|
|
2720
|
-
function
|
|
2721
|
-
styles:
|
|
2722
|
-
config:
|
|
1315
|
+
function en({
|
|
1316
|
+
styles: t = X,
|
|
1317
|
+
config: n
|
|
2723
1318
|
}) {
|
|
2724
|
-
|
|
1319
|
+
pe(n);
|
|
2725
1320
|
const {
|
|
2726
|
-
data:
|
|
1321
|
+
data: a = [],
|
|
2727
1322
|
loading: o,
|
|
2728
|
-
refresh:
|
|
2729
|
-
} =
|
|
1323
|
+
refresh: l
|
|
1324
|
+
} = G(async () => {
|
|
2730
1325
|
const {
|
|
2731
|
-
data:
|
|
2732
|
-
} = await
|
|
2733
|
-
return
|
|
1326
|
+
data: s
|
|
1327
|
+
} = await j.datasource.list();
|
|
1328
|
+
return s;
|
|
2734
1329
|
}, {
|
|
2735
1330
|
refreshDeps: []
|
|
2736
1331
|
});
|
|
2737
|
-
return /* @__PURE__ */
|
|
2738
|
-
children: [/* @__PURE__ */
|
|
2739
|
-
pt:
|
|
1332
|
+
return /* @__PURE__ */ v(N, {
|
|
1333
|
+
children: [/* @__PURE__ */ r(O, {
|
|
1334
|
+
pt: t.spacing,
|
|
2740
1335
|
position: "right",
|
|
2741
|
-
children: /* @__PURE__ */
|
|
2742
|
-
onSuccess:
|
|
1336
|
+
children: /* @__PURE__ */ r(Rt, {
|
|
1337
|
+
onSuccess: l
|
|
2743
1338
|
})
|
|
2744
|
-
}), /* @__PURE__ */
|
|
2745
|
-
mt:
|
|
1339
|
+
}), /* @__PURE__ */ v(F, {
|
|
1340
|
+
mt: t.spacing,
|
|
2746
1341
|
sx: {
|
|
2747
1342
|
position: "relative"
|
|
2748
1343
|
},
|
|
2749
|
-
children: [/* @__PURE__ */
|
|
1344
|
+
children: [/* @__PURE__ */ r(Oe, {
|
|
2750
1345
|
visible: o
|
|
2751
|
-
}), /* @__PURE__ */
|
|
2752
|
-
horizontalSpacing:
|
|
2753
|
-
verticalSpacing:
|
|
2754
|
-
fontSize:
|
|
1346
|
+
}), /* @__PURE__ */ v(Ae, {
|
|
1347
|
+
horizontalSpacing: t.spacing,
|
|
1348
|
+
verticalSpacing: t.spacing,
|
|
1349
|
+
fontSize: t.size,
|
|
2755
1350
|
highlightOnHover: !0,
|
|
2756
|
-
children: [/* @__PURE__ */
|
|
2757
|
-
children: /* @__PURE__ */
|
|
2758
|
-
children: [/* @__PURE__ */
|
|
1351
|
+
children: [/* @__PURE__ */ r("thead", {
|
|
1352
|
+
children: /* @__PURE__ */ v("tr", {
|
|
1353
|
+
children: [/* @__PURE__ */ r("th", {
|
|
2759
1354
|
children: "Type"
|
|
2760
|
-
}), /* @__PURE__ */
|
|
1355
|
+
}), /* @__PURE__ */ r("th", {
|
|
2761
1356
|
children: "Name"
|
|
2762
|
-
}), /* @__PURE__ */
|
|
1357
|
+
}), /* @__PURE__ */ r("th", {
|
|
2763
1358
|
children: "Action"
|
|
2764
1359
|
})]
|
|
2765
1360
|
})
|
|
2766
|
-
}), /* @__PURE__ */
|
|
2767
|
-
children:
|
|
2768
|
-
id:
|
|
1361
|
+
}), /* @__PURE__ */ r("tbody", {
|
|
1362
|
+
children: a.map(({
|
|
1363
|
+
id: s,
|
|
2769
1364
|
key: c,
|
|
2770
|
-
type:
|
|
2771
|
-
is_preset:
|
|
2772
|
-
}) => /* @__PURE__ */
|
|
2773
|
-
children: [/* @__PURE__ */
|
|
1365
|
+
type: d,
|
|
1366
|
+
is_preset: p
|
|
1367
|
+
}) => /* @__PURE__ */ v("tr", {
|
|
1368
|
+
children: [/* @__PURE__ */ r("td", {
|
|
2774
1369
|
width: 200,
|
|
2775
|
-
children:
|
|
2776
|
-
}), /* @__PURE__ */
|
|
1370
|
+
children: d
|
|
1371
|
+
}), /* @__PURE__ */ r("td", {
|
|
2777
1372
|
children: c
|
|
2778
|
-
}), /* @__PURE__ */
|
|
1373
|
+
}), /* @__PURE__ */ r("td", {
|
|
2779
1374
|
width: 200,
|
|
2780
|
-
children: /* @__PURE__ */
|
|
1375
|
+
children: /* @__PURE__ */ r(O, {
|
|
2781
1376
|
position: "left",
|
|
2782
|
-
children: /* @__PURE__ */
|
|
2783
|
-
isProtected:
|
|
2784
|
-
id:
|
|
1377
|
+
children: /* @__PURE__ */ r(Tt, {
|
|
1378
|
+
isProtected: p,
|
|
1379
|
+
id: s,
|
|
2785
1380
|
name: c,
|
|
2786
|
-
onSuccess:
|
|
1381
|
+
onSuccess: l
|
|
2787
1382
|
})
|
|
2788
1383
|
})
|
|
2789
1384
|
})]
|
|
@@ -2793,49 +1388,49 @@ function ti({
|
|
|
2793
1388
|
})]
|
|
2794
1389
|
});
|
|
2795
1390
|
}
|
|
2796
|
-
const
|
|
2797
|
-
label:
|
|
2798
|
-
value:
|
|
2799
|
-
description:
|
|
1391
|
+
const zt = ke(({
|
|
1392
|
+
label: t,
|
|
1393
|
+
value: n,
|
|
1394
|
+
description: a,
|
|
2800
1395
|
...o
|
|
2801
|
-
},
|
|
1396
|
+
}, l) => /* @__PURE__ */ v(ze, {
|
|
2802
1397
|
spacing: 2,
|
|
2803
|
-
ref:
|
|
1398
|
+
ref: l,
|
|
2804
1399
|
...o,
|
|
2805
|
-
children: [/* @__PURE__ */
|
|
1400
|
+
children: [/* @__PURE__ */ r(ue, {
|
|
2806
1401
|
size: "sm",
|
|
2807
|
-
children:
|
|
2808
|
-
}), /* @__PURE__ */
|
|
1402
|
+
children: t
|
|
1403
|
+
}), /* @__PURE__ */ r(ue, {
|
|
2809
1404
|
size: "xs",
|
|
2810
1405
|
color: "dimmed",
|
|
2811
1406
|
className: "role-description",
|
|
2812
|
-
children:
|
|
1407
|
+
children: a
|
|
2813
1408
|
})]
|
|
2814
|
-
})),
|
|
2815
|
-
styles:
|
|
2816
|
-
value:
|
|
2817
|
-
onChange:
|
|
1409
|
+
})), je = ke(({
|
|
1410
|
+
styles: t,
|
|
1411
|
+
value: n,
|
|
1412
|
+
onChange: a
|
|
2818
1413
|
}, o) => {
|
|
2819
1414
|
const {
|
|
2820
|
-
data:
|
|
2821
|
-
loading:
|
|
2822
|
-
} =
|
|
2823
|
-
label:
|
|
2824
|
-
value:
|
|
2825
|
-
description:
|
|
2826
|
-
disabled:
|
|
1415
|
+
data: l = [],
|
|
1416
|
+
loading: s
|
|
1417
|
+
} = G(async () => (await j.role.list()).map((d) => ({
|
|
1418
|
+
label: d.name,
|
|
1419
|
+
value: d.id,
|
|
1420
|
+
description: d.description,
|
|
1421
|
+
disabled: d.id === 50
|
|
2827
1422
|
})), {
|
|
2828
1423
|
refreshDeps: []
|
|
2829
1424
|
});
|
|
2830
|
-
return /* @__PURE__ */
|
|
1425
|
+
return /* @__PURE__ */ r(Gr, {
|
|
2831
1426
|
ref: o,
|
|
2832
|
-
mb:
|
|
2833
|
-
size:
|
|
1427
|
+
mb: t.spacing,
|
|
1428
|
+
size: t.size,
|
|
2834
1429
|
required: !0,
|
|
2835
1430
|
label: "Role",
|
|
2836
|
-
itemComponent:
|
|
2837
|
-
data:
|
|
2838
|
-
disabled:
|
|
1431
|
+
itemComponent: zt,
|
|
1432
|
+
data: l,
|
|
1433
|
+
disabled: s,
|
|
2839
1434
|
styles: () => ({
|
|
2840
1435
|
item: {
|
|
2841
1436
|
"&[data-selected]": {
|
|
@@ -2847,687 +1442,687 @@ const Ao = Cr(({
|
|
|
2847
1442
|
}
|
|
2848
1443
|
}
|
|
2849
1444
|
}),
|
|
2850
|
-
value:
|
|
2851
|
-
onChange:
|
|
1445
|
+
value: n,
|
|
1446
|
+
onChange: a
|
|
2852
1447
|
});
|
|
2853
|
-
}),
|
|
1448
|
+
}), V = {
|
|
2854
1449
|
size: "sm",
|
|
2855
1450
|
spacing: "md",
|
|
2856
1451
|
button: {
|
|
2857
1452
|
size: "xs"
|
|
2858
1453
|
}
|
|
2859
1454
|
};
|
|
2860
|
-
function
|
|
2861
|
-
postSubmit:
|
|
2862
|
-
styles:
|
|
2863
|
-
initialRoleID:
|
|
1455
|
+
function Ot({
|
|
1456
|
+
postSubmit: t,
|
|
1457
|
+
styles: n = V,
|
|
1458
|
+
initialRoleID: a
|
|
2864
1459
|
}) {
|
|
2865
1460
|
const {
|
|
2866
1461
|
control: o,
|
|
2867
|
-
handleSubmit:
|
|
2868
|
-
} =
|
|
1462
|
+
handleSubmit: l
|
|
1463
|
+
} = J({
|
|
2869
1464
|
defaultValues: {
|
|
2870
1465
|
name: "",
|
|
2871
1466
|
email: "",
|
|
2872
|
-
role_id:
|
|
1467
|
+
role_id: a,
|
|
2873
1468
|
password: ""
|
|
2874
1469
|
}
|
|
2875
1470
|
});
|
|
2876
|
-
return /* @__PURE__ */
|
|
1471
|
+
return /* @__PURE__ */ r(F, {
|
|
2877
1472
|
mx: "auto",
|
|
2878
|
-
children: /* @__PURE__ */
|
|
2879
|
-
onSubmit:
|
|
1473
|
+
children: /* @__PURE__ */ v("form", {
|
|
1474
|
+
onSubmit: l(async ({
|
|
2880
1475
|
name: c,
|
|
2881
|
-
email:
|
|
2882
|
-
password:
|
|
2883
|
-
role_id:
|
|
1476
|
+
email: d,
|
|
1477
|
+
password: p,
|
|
1478
|
+
role_id: b
|
|
2884
1479
|
}) => {
|
|
2885
1480
|
try {
|
|
2886
|
-
|
|
1481
|
+
W({
|
|
2887
1482
|
id: "for-creating",
|
|
2888
1483
|
title: "Pending",
|
|
2889
1484
|
message: "Adding account...",
|
|
2890
1485
|
loading: !0
|
|
2891
|
-
}), await
|
|
1486
|
+
}), await j.account.create(c, d, p, b), x({
|
|
2892
1487
|
id: "for-creating",
|
|
2893
1488
|
title: "Successful",
|
|
2894
1489
|
message: "Account is added",
|
|
2895
1490
|
color: "green"
|
|
2896
|
-
}),
|
|
2897
|
-
} catch (
|
|
2898
|
-
|
|
1491
|
+
}), t();
|
|
1492
|
+
} catch (S) {
|
|
1493
|
+
x({
|
|
2899
1494
|
id: "for-creating",
|
|
2900
1495
|
title: "Failed",
|
|
2901
|
-
message:
|
|
1496
|
+
message: S.message,
|
|
2902
1497
|
color: "red"
|
|
2903
1498
|
});
|
|
2904
1499
|
}
|
|
2905
1500
|
}),
|
|
2906
|
-
children: [/* @__PURE__ */
|
|
1501
|
+
children: [/* @__PURE__ */ r(R, {
|
|
2907
1502
|
name: "name",
|
|
2908
1503
|
control: o,
|
|
2909
1504
|
render: ({
|
|
2910
1505
|
field: c
|
|
2911
|
-
}) => /* @__PURE__ */
|
|
2912
|
-
mb:
|
|
2913
|
-
size:
|
|
1506
|
+
}) => /* @__PURE__ */ r(D, {
|
|
1507
|
+
mb: n.spacing,
|
|
1508
|
+
size: n.size,
|
|
2914
1509
|
required: !0,
|
|
2915
1510
|
label: "Username",
|
|
2916
1511
|
...c
|
|
2917
1512
|
})
|
|
2918
|
-
}), /* @__PURE__ */
|
|
1513
|
+
}), /* @__PURE__ */ r(R, {
|
|
2919
1514
|
name: "email",
|
|
2920
1515
|
control: o,
|
|
2921
1516
|
render: ({
|
|
2922
1517
|
field: c
|
|
2923
|
-
}) => /* @__PURE__ */
|
|
2924
|
-
mb:
|
|
2925
|
-
size:
|
|
1518
|
+
}) => /* @__PURE__ */ r(D, {
|
|
1519
|
+
mb: n.spacing,
|
|
1520
|
+
size: n.size,
|
|
2926
1521
|
required: !0,
|
|
2927
1522
|
label: "Email",
|
|
2928
1523
|
...c
|
|
2929
1524
|
})
|
|
2930
|
-
}), /* @__PURE__ */
|
|
1525
|
+
}), /* @__PURE__ */ r(R, {
|
|
2931
1526
|
name: "password",
|
|
2932
1527
|
control: o,
|
|
2933
1528
|
render: ({
|
|
2934
1529
|
field: c
|
|
2935
|
-
}) => /* @__PURE__ */
|
|
2936
|
-
mb:
|
|
2937
|
-
size:
|
|
1530
|
+
}) => /* @__PURE__ */ r(de, {
|
|
1531
|
+
mb: n.spacing,
|
|
1532
|
+
size: n.size,
|
|
2938
1533
|
required: !0,
|
|
2939
1534
|
label: "Password",
|
|
2940
1535
|
description: "Password must be at least 8 characters long",
|
|
2941
1536
|
...c
|
|
2942
1537
|
})
|
|
2943
|
-
}), /* @__PURE__ */
|
|
1538
|
+
}), /* @__PURE__ */ r(R, {
|
|
2944
1539
|
name: "role_id",
|
|
2945
1540
|
control: o,
|
|
2946
1541
|
render: ({
|
|
2947
1542
|
field: c
|
|
2948
|
-
}) => /* @__PURE__ */
|
|
2949
|
-
styles:
|
|
1543
|
+
}) => /* @__PURE__ */ r(je, {
|
|
1544
|
+
styles: n,
|
|
2950
1545
|
...c
|
|
2951
1546
|
})
|
|
2952
|
-
}), /* @__PURE__ */
|
|
1547
|
+
}), /* @__PURE__ */ r(O, {
|
|
2953
1548
|
position: "right",
|
|
2954
|
-
mt:
|
|
2955
|
-
children: /* @__PURE__ */
|
|
1549
|
+
mt: n.spacing,
|
|
1550
|
+
children: /* @__PURE__ */ r(T, {
|
|
2956
1551
|
type: "submit",
|
|
2957
|
-
size:
|
|
1552
|
+
size: n.button.size,
|
|
2958
1553
|
children: "Save"
|
|
2959
1554
|
})
|
|
2960
1555
|
})]
|
|
2961
1556
|
})
|
|
2962
1557
|
});
|
|
2963
1558
|
}
|
|
2964
|
-
function
|
|
2965
|
-
onSuccess:
|
|
2966
|
-
styles:
|
|
2967
|
-
initialRoleID:
|
|
1559
|
+
function At({
|
|
1560
|
+
onSuccess: t,
|
|
1561
|
+
styles: n = V,
|
|
1562
|
+
initialRoleID: a
|
|
2968
1563
|
}) {
|
|
2969
|
-
const [o,
|
|
2970
|
-
return /* @__PURE__ */
|
|
2971
|
-
children: [/* @__PURE__ */
|
|
1564
|
+
const [o, l] = H.useState(!1), s = () => l(!0), c = () => l(!1);
|
|
1565
|
+
return /* @__PURE__ */ v(N, {
|
|
1566
|
+
children: [/* @__PURE__ */ r(ne, {
|
|
2972
1567
|
overflow: "inside",
|
|
2973
1568
|
opened: o,
|
|
2974
|
-
onClose: () =>
|
|
1569
|
+
onClose: () => l(!1),
|
|
2975
1570
|
title: "Add an Account",
|
|
2976
1571
|
trapFocus: !0,
|
|
2977
|
-
onDragStart: (
|
|
2978
|
-
|
|
1572
|
+
onDragStart: (p) => {
|
|
1573
|
+
p.stopPropagation();
|
|
2979
1574
|
},
|
|
2980
|
-
children: /* @__PURE__ */
|
|
1575
|
+
children: /* @__PURE__ */ r(Ot, {
|
|
2981
1576
|
postSubmit: () => {
|
|
2982
|
-
|
|
1577
|
+
t(), c();
|
|
2983
1578
|
},
|
|
2984
|
-
styles:
|
|
2985
|
-
initialRoleID:
|
|
1579
|
+
styles: n,
|
|
1580
|
+
initialRoleID: a
|
|
2986
1581
|
})
|
|
2987
|
-
}), /* @__PURE__ */
|
|
2988
|
-
size:
|
|
2989
|
-
onClick:
|
|
2990
|
-
leftIcon: /* @__PURE__ */
|
|
1582
|
+
}), /* @__PURE__ */ r(T, {
|
|
1583
|
+
size: n.button.size,
|
|
1584
|
+
onClick: s,
|
|
1585
|
+
leftIcon: /* @__PURE__ */ r(xe, {
|
|
2991
1586
|
size: 20
|
|
2992
1587
|
}),
|
|
2993
1588
|
children: "Add an Account"
|
|
2994
1589
|
})]
|
|
2995
1590
|
});
|
|
2996
1591
|
}
|
|
2997
|
-
function
|
|
2998
|
-
id:
|
|
2999
|
-
name:
|
|
3000
|
-
onSuccess:
|
|
3001
|
-
styles: o =
|
|
1592
|
+
function kt({
|
|
1593
|
+
id: t,
|
|
1594
|
+
name: n,
|
|
1595
|
+
onSuccess: a,
|
|
1596
|
+
styles: o = V
|
|
3002
1597
|
}) {
|
|
3003
|
-
const
|
|
3004
|
-
if (!!
|
|
3005
|
-
|
|
1598
|
+
const l = fe(), s = async () => {
|
|
1599
|
+
if (!!t) {
|
|
1600
|
+
W({
|
|
3006
1601
|
id: "for-deleting",
|
|
3007
1602
|
title: "Pending",
|
|
3008
1603
|
message: "Deleting account...",
|
|
3009
1604
|
loading: !0
|
|
3010
1605
|
});
|
|
3011
1606
|
try {
|
|
3012
|
-
await
|
|
1607
|
+
await j.account.delete(t), x({
|
|
3013
1608
|
id: "for-deleting",
|
|
3014
1609
|
title: "Successful",
|
|
3015
|
-
message: `Account [${
|
|
1610
|
+
message: `Account [${n}] is deleted`,
|
|
3016
1611
|
color: "green"
|
|
3017
|
-
}),
|
|
3018
|
-
} catch (
|
|
3019
|
-
|
|
1612
|
+
}), a();
|
|
1613
|
+
} catch (d) {
|
|
1614
|
+
x({
|
|
3020
1615
|
id: "for-deleting",
|
|
3021
1616
|
title: "Failed",
|
|
3022
|
-
message:
|
|
1617
|
+
message: d.message,
|
|
3023
1618
|
color: "red"
|
|
3024
1619
|
});
|
|
3025
1620
|
}
|
|
3026
1621
|
}
|
|
3027
|
-
}, c = () =>
|
|
1622
|
+
}, c = () => l.openConfirmModal({
|
|
3028
1623
|
title: "Delete this account?",
|
|
3029
1624
|
labels: {
|
|
3030
1625
|
confirm: "Confirm",
|
|
3031
1626
|
cancel: "Cancel"
|
|
3032
1627
|
},
|
|
3033
1628
|
onCancel: () => console.log("Cancel"),
|
|
3034
|
-
onConfirm:
|
|
1629
|
+
onConfirm: s
|
|
3035
1630
|
});
|
|
3036
|
-
return /* @__PURE__ */
|
|
1631
|
+
return /* @__PURE__ */ r(T, {
|
|
3037
1632
|
size: o.button.size,
|
|
3038
1633
|
color: "red",
|
|
3039
1634
|
onClick: c,
|
|
3040
|
-
leftIcon: /* @__PURE__ */
|
|
1635
|
+
leftIcon: /* @__PURE__ */ r(De, {
|
|
3041
1636
|
size: 20
|
|
3042
1637
|
}),
|
|
3043
1638
|
children: "Delete"
|
|
3044
1639
|
});
|
|
3045
1640
|
}
|
|
3046
|
-
function
|
|
3047
|
-
id:
|
|
3048
|
-
name:
|
|
3049
|
-
email:
|
|
1641
|
+
function xt({
|
|
1642
|
+
id: t,
|
|
1643
|
+
name: n,
|
|
1644
|
+
email: a,
|
|
3050
1645
|
role_id: o,
|
|
3051
|
-
postSubmit:
|
|
3052
|
-
styles:
|
|
1646
|
+
postSubmit: l,
|
|
1647
|
+
styles: s = V
|
|
3053
1648
|
}) {
|
|
3054
1649
|
const {
|
|
3055
1650
|
control: c,
|
|
3056
|
-
handleSubmit:
|
|
3057
|
-
watch:
|
|
3058
|
-
} =
|
|
1651
|
+
handleSubmit: d,
|
|
1652
|
+
watch: p
|
|
1653
|
+
} = J({
|
|
3059
1654
|
defaultValues: {
|
|
3060
|
-
name:
|
|
3061
|
-
email:
|
|
1655
|
+
name: n,
|
|
1656
|
+
email: a,
|
|
3062
1657
|
role_id: o,
|
|
3063
1658
|
reset_password: !1,
|
|
3064
1659
|
new_password: ""
|
|
3065
1660
|
}
|
|
3066
|
-
}),
|
|
3067
|
-
name:
|
|
3068
|
-
email:
|
|
3069
|
-
role_id:
|
|
3070
|
-
reset_password:
|
|
3071
|
-
new_password:
|
|
1661
|
+
}), b = async ({
|
|
1662
|
+
name: f,
|
|
1663
|
+
email: z,
|
|
1664
|
+
role_id: q,
|
|
1665
|
+
reset_password: $,
|
|
1666
|
+
new_password: he
|
|
3072
1667
|
}) => {
|
|
3073
1668
|
try {
|
|
3074
|
-
|
|
1669
|
+
W({
|
|
3075
1670
|
id: "for-updating",
|
|
3076
1671
|
title: "Pending",
|
|
3077
1672
|
message: "Updating account...",
|
|
3078
1673
|
loading: !0
|
|
3079
|
-
}), await
|
|
3080
|
-
id:
|
|
3081
|
-
name:
|
|
3082
|
-
email:
|
|
3083
|
-
role_id:
|
|
3084
|
-
reset_password:
|
|
3085
|
-
new_password:
|
|
3086
|
-
}),
|
|
1674
|
+
}), await j.account.edit({
|
|
1675
|
+
id: t,
|
|
1676
|
+
name: f,
|
|
1677
|
+
email: z,
|
|
1678
|
+
role_id: q,
|
|
1679
|
+
reset_password: $,
|
|
1680
|
+
new_password: he
|
|
1681
|
+
}), x({
|
|
3087
1682
|
id: "for-updating",
|
|
3088
1683
|
title: "Successful",
|
|
3089
1684
|
message: "Account is updated",
|
|
3090
1685
|
color: "green"
|
|
3091
|
-
}),
|
|
3092
|
-
} catch (
|
|
3093
|
-
|
|
1686
|
+
}), l();
|
|
1687
|
+
} catch (U) {
|
|
1688
|
+
x({
|
|
3094
1689
|
id: "for-updating",
|
|
3095
1690
|
title: "Failed",
|
|
3096
|
-
message:
|
|
1691
|
+
message: U.message,
|
|
3097
1692
|
color: "red"
|
|
3098
1693
|
});
|
|
3099
1694
|
}
|
|
3100
|
-
}, [
|
|
3101
|
-
return /* @__PURE__ */
|
|
1695
|
+
}, [S, m] = p(["reset_password", "new_password"]);
|
|
1696
|
+
return /* @__PURE__ */ r(F, {
|
|
3102
1697
|
mx: "auto",
|
|
3103
|
-
children: /* @__PURE__ */
|
|
3104
|
-
onSubmit:
|
|
3105
|
-
children: [/* @__PURE__ */
|
|
1698
|
+
children: /* @__PURE__ */ v("form", {
|
|
1699
|
+
onSubmit: d(b),
|
|
1700
|
+
children: [/* @__PURE__ */ r(R, {
|
|
3106
1701
|
name: "name",
|
|
3107
1702
|
control: c,
|
|
3108
1703
|
render: ({
|
|
3109
|
-
field:
|
|
3110
|
-
}) => /* @__PURE__ */
|
|
3111
|
-
mb:
|
|
3112
|
-
size:
|
|
1704
|
+
field: f
|
|
1705
|
+
}) => /* @__PURE__ */ r(D, {
|
|
1706
|
+
mb: s.spacing,
|
|
1707
|
+
size: s.size,
|
|
3113
1708
|
required: !0,
|
|
3114
1709
|
label: "Username",
|
|
3115
|
-
...
|
|
1710
|
+
...f
|
|
3116
1711
|
})
|
|
3117
|
-
}), /* @__PURE__ */
|
|
1712
|
+
}), /* @__PURE__ */ r(R, {
|
|
3118
1713
|
name: "email",
|
|
3119
1714
|
control: c,
|
|
3120
1715
|
render: ({
|
|
3121
|
-
field:
|
|
3122
|
-
}) => /* @__PURE__ */
|
|
3123
|
-
mb:
|
|
3124
|
-
size:
|
|
1716
|
+
field: f
|
|
1717
|
+
}) => /* @__PURE__ */ r(D, {
|
|
1718
|
+
mb: s.spacing,
|
|
1719
|
+
size: s.size,
|
|
3125
1720
|
required: !0,
|
|
3126
1721
|
label: "Email",
|
|
3127
|
-
...
|
|
1722
|
+
...f
|
|
3128
1723
|
})
|
|
3129
|
-
}), /* @__PURE__ */
|
|
1724
|
+
}), /* @__PURE__ */ r(R, {
|
|
3130
1725
|
name: "role_id",
|
|
3131
1726
|
control: c,
|
|
3132
1727
|
render: ({
|
|
3133
|
-
field:
|
|
3134
|
-
}) => /* @__PURE__ */
|
|
3135
|
-
styles:
|
|
3136
|
-
...
|
|
1728
|
+
field: f
|
|
1729
|
+
}) => /* @__PURE__ */ r(je, {
|
|
1730
|
+
styles: s,
|
|
1731
|
+
...f
|
|
3137
1732
|
})
|
|
3138
|
-
}), /* @__PURE__ */
|
|
1733
|
+
}), /* @__PURE__ */ r(Te, {
|
|
3139
1734
|
my: 20,
|
|
3140
1735
|
variant: "dashed",
|
|
3141
1736
|
label: "",
|
|
3142
1737
|
labelPosition: "center"
|
|
3143
|
-
}), /* @__PURE__ */
|
|
1738
|
+
}), /* @__PURE__ */ r(R, {
|
|
3144
1739
|
name: "reset_password",
|
|
3145
1740
|
control: c,
|
|
3146
1741
|
render: ({
|
|
3147
|
-
field:
|
|
3148
|
-
}) => /* @__PURE__ */
|
|
3149
|
-
mb:
|
|
3150
|
-
size:
|
|
1742
|
+
field: f
|
|
1743
|
+
}) => /* @__PURE__ */ r(Hr, {
|
|
1744
|
+
mb: s.spacing,
|
|
1745
|
+
size: s.size,
|
|
3151
1746
|
label: "Reset password",
|
|
3152
|
-
checked:
|
|
3153
|
-
onChange: (
|
|
1747
|
+
checked: f.value,
|
|
1748
|
+
onChange: (z) => f.onChange(z.currentTarget.checked),
|
|
3154
1749
|
styles: {
|
|
3155
1750
|
label: {
|
|
3156
1751
|
verticalAlign: "middle"
|
|
3157
1752
|
}
|
|
3158
1753
|
}
|
|
3159
1754
|
})
|
|
3160
|
-
}),
|
|
1755
|
+
}), S && /* @__PURE__ */ r(R, {
|
|
3161
1756
|
name: "new_password",
|
|
3162
1757
|
control: c,
|
|
3163
1758
|
render: ({
|
|
3164
|
-
field:
|
|
3165
|
-
}) => /* @__PURE__ */
|
|
1759
|
+
field: f
|
|
1760
|
+
}) => /* @__PURE__ */ r(de, {
|
|
3166
1761
|
autoComplete: "off",
|
|
3167
|
-
mb:
|
|
3168
|
-
size:
|
|
1762
|
+
mb: s.spacing,
|
|
1763
|
+
size: s.size,
|
|
3169
1764
|
required: !0,
|
|
3170
1765
|
description: "Password must be at least 8 characters long",
|
|
3171
1766
|
label: "New Password",
|
|
3172
|
-
...
|
|
1767
|
+
...f
|
|
3173
1768
|
})
|
|
3174
|
-
}), /* @__PURE__ */
|
|
1769
|
+
}), /* @__PURE__ */ r(O, {
|
|
3175
1770
|
position: "right",
|
|
3176
|
-
mt:
|
|
3177
|
-
children: /* @__PURE__ */
|
|
1771
|
+
mt: s.spacing,
|
|
1772
|
+
children: /* @__PURE__ */ r(T, {
|
|
3178
1773
|
type: "submit",
|
|
3179
|
-
size:
|
|
1774
|
+
size: s.button.size,
|
|
3180
1775
|
children: "Submit"
|
|
3181
1776
|
})
|
|
3182
1777
|
})]
|
|
3183
1778
|
})
|
|
3184
1779
|
});
|
|
3185
1780
|
}
|
|
3186
|
-
function
|
|
3187
|
-
account:
|
|
3188
|
-
onSuccess:
|
|
3189
|
-
styles:
|
|
1781
|
+
function Dt({
|
|
1782
|
+
account: t,
|
|
1783
|
+
onSuccess: n,
|
|
1784
|
+
styles: a = V
|
|
3190
1785
|
}) {
|
|
3191
|
-
const [o,
|
|
3192
|
-
|
|
1786
|
+
const [o, l] = H.useState(!1), s = () => l(!0), c = () => l(!1), d = () => {
|
|
1787
|
+
n(), c();
|
|
3193
1788
|
};
|
|
3194
|
-
return /* @__PURE__ */
|
|
3195
|
-
children: [/* @__PURE__ */
|
|
1789
|
+
return /* @__PURE__ */ v(N, {
|
|
1790
|
+
children: [/* @__PURE__ */ r(ne, {
|
|
3196
1791
|
overflow: "inside",
|
|
3197
1792
|
opened: o,
|
|
3198
|
-
onClose: () =>
|
|
3199
|
-
title: `Editing ${
|
|
1793
|
+
onClose: () => l(!1),
|
|
1794
|
+
title: `Editing ${t.name}`,
|
|
3200
1795
|
trapFocus: !0,
|
|
3201
|
-
onDragStart: (
|
|
3202
|
-
|
|
1796
|
+
onDragStart: (p) => {
|
|
1797
|
+
p.stopPropagation();
|
|
3203
1798
|
},
|
|
3204
|
-
children: /* @__PURE__ */
|
|
3205
|
-
...
|
|
3206
|
-
postSubmit:
|
|
3207
|
-
styles:
|
|
1799
|
+
children: /* @__PURE__ */ r(xt, {
|
|
1800
|
+
...t,
|
|
1801
|
+
postSubmit: d,
|
|
1802
|
+
styles: a
|
|
3208
1803
|
})
|
|
3209
|
-
}), /* @__PURE__ */
|
|
3210
|
-
size:
|
|
3211
|
-
onClick:
|
|
3212
|
-
leftIcon: /* @__PURE__ */
|
|
1804
|
+
}), /* @__PURE__ */ r(T, {
|
|
1805
|
+
size: a.button.size,
|
|
1806
|
+
onClick: s,
|
|
1807
|
+
leftIcon: /* @__PURE__ */ r(Xr, {
|
|
3213
1808
|
size: 20
|
|
3214
1809
|
}),
|
|
3215
1810
|
children: "Edit"
|
|
3216
1811
|
})]
|
|
3217
1812
|
});
|
|
3218
1813
|
}
|
|
3219
|
-
function
|
|
3220
|
-
styles:
|
|
3221
|
-
config:
|
|
1814
|
+
function rn({
|
|
1815
|
+
styles: t = V,
|
|
1816
|
+
config: n
|
|
3222
1817
|
}) {
|
|
3223
|
-
var
|
|
3224
|
-
|
|
1818
|
+
var b, S;
|
|
1819
|
+
pe(n);
|
|
3225
1820
|
const {
|
|
3226
|
-
data:
|
|
1821
|
+
data: a = [],
|
|
3227
1822
|
loading: o,
|
|
3228
|
-
refresh:
|
|
3229
|
-
} =
|
|
1823
|
+
refresh: l
|
|
1824
|
+
} = G(async () => {
|
|
3230
1825
|
const {
|
|
3231
|
-
data:
|
|
3232
|
-
} = await
|
|
3233
|
-
return
|
|
1826
|
+
data: m
|
|
1827
|
+
} = await j.account.list();
|
|
1828
|
+
return m;
|
|
3234
1829
|
}, {
|
|
3235
1830
|
refreshDeps: []
|
|
3236
1831
|
}), {
|
|
3237
|
-
data:
|
|
1832
|
+
data: s = [],
|
|
3238
1833
|
loading: c
|
|
3239
|
-
} =
|
|
3240
|
-
label:
|
|
3241
|
-
value:
|
|
3242
|
-
description:
|
|
3243
|
-
disabled:
|
|
1834
|
+
} = G(async () => (await j.role.list()).map((f) => ({
|
|
1835
|
+
label: f.name,
|
|
1836
|
+
value: f.id,
|
|
1837
|
+
description: f.description,
|
|
1838
|
+
disabled: f.id === 50
|
|
3244
1839
|
})), {
|
|
3245
1840
|
refreshDeps: []
|
|
3246
|
-
}),
|
|
3247
|
-
var
|
|
3248
|
-
return (
|
|
1841
|
+
}), d = ur(() => s.reduce((m, f) => (m.set(f.value, f.label), m), /* @__PURE__ */ new Map()), [s]), p = (m) => {
|
|
1842
|
+
var f;
|
|
1843
|
+
return (f = d.get(m)) != null ? f : m;
|
|
3249
1844
|
};
|
|
3250
|
-
return /* @__PURE__ */
|
|
3251
|
-
children: [/* @__PURE__ */
|
|
3252
|
-
pt:
|
|
1845
|
+
return /* @__PURE__ */ v(N, {
|
|
1846
|
+
children: [/* @__PURE__ */ r(O, {
|
|
1847
|
+
pt: t.spacing,
|
|
3253
1848
|
position: "right",
|
|
3254
|
-
children: /* @__PURE__ */
|
|
3255
|
-
onSuccess:
|
|
3256
|
-
initialRoleID: (
|
|
1849
|
+
children: /* @__PURE__ */ r(At, {
|
|
1850
|
+
onSuccess: l,
|
|
1851
|
+
initialRoleID: (S = (b = s == null ? void 0 : s[0]) == null ? void 0 : b.value) != null ? S : 0
|
|
3257
1852
|
})
|
|
3258
|
-
}), /* @__PURE__ */
|
|
3259
|
-
mt:
|
|
1853
|
+
}), /* @__PURE__ */ v(F, {
|
|
1854
|
+
mt: t.spacing,
|
|
3260
1855
|
sx: {
|
|
3261
1856
|
position: "relative"
|
|
3262
1857
|
},
|
|
3263
|
-
children: [/* @__PURE__ */
|
|
1858
|
+
children: [/* @__PURE__ */ r(Oe, {
|
|
3264
1859
|
visible: o || c
|
|
3265
|
-
}), /* @__PURE__ */
|
|
3266
|
-
horizontalSpacing:
|
|
3267
|
-
verticalSpacing:
|
|
3268
|
-
fontSize:
|
|
1860
|
+
}), /* @__PURE__ */ v(Ae, {
|
|
1861
|
+
horizontalSpacing: t.spacing,
|
|
1862
|
+
verticalSpacing: t.spacing,
|
|
1863
|
+
fontSize: t.size,
|
|
3269
1864
|
highlightOnHover: !0,
|
|
3270
|
-
children: [/* @__PURE__ */
|
|
3271
|
-
children: /* @__PURE__ */
|
|
3272
|
-
children: [/* @__PURE__ */
|
|
1865
|
+
children: [/* @__PURE__ */ r("thead", {
|
|
1866
|
+
children: /* @__PURE__ */ v("tr", {
|
|
1867
|
+
children: [/* @__PURE__ */ r("th", {
|
|
3273
1868
|
children: "Username"
|
|
3274
|
-
}), /* @__PURE__ */
|
|
1869
|
+
}), /* @__PURE__ */ r("th", {
|
|
3275
1870
|
children: "Email"
|
|
3276
|
-
}), /* @__PURE__ */
|
|
1871
|
+
}), /* @__PURE__ */ r("th", {
|
|
3277
1872
|
children: "Role"
|
|
3278
|
-
}), /* @__PURE__ */
|
|
1873
|
+
}), /* @__PURE__ */ r("th", {
|
|
3279
1874
|
children: "Action"
|
|
3280
1875
|
})]
|
|
3281
1876
|
})
|
|
3282
|
-
}), /* @__PURE__ */
|
|
3283
|
-
children:
|
|
1877
|
+
}), /* @__PURE__ */ r("tbody", {
|
|
1878
|
+
children: a.map((m) => {
|
|
3284
1879
|
const {
|
|
3285
|
-
id:
|
|
3286
|
-
name:
|
|
3287
|
-
email:
|
|
3288
|
-
role_id:
|
|
3289
|
-
} =
|
|
3290
|
-
return /* @__PURE__ */
|
|
3291
|
-
children: [/* @__PURE__ */
|
|
1880
|
+
id: f,
|
|
1881
|
+
name: z,
|
|
1882
|
+
email: q,
|
|
1883
|
+
role_id: $
|
|
1884
|
+
} = m;
|
|
1885
|
+
return /* @__PURE__ */ v("tr", {
|
|
1886
|
+
children: [/* @__PURE__ */ r("td", {
|
|
3292
1887
|
width: 200,
|
|
3293
|
-
children:
|
|
3294
|
-
}), /* @__PURE__ */
|
|
1888
|
+
children: z
|
|
1889
|
+
}), /* @__PURE__ */ r("td", {
|
|
3295
1890
|
width: 200,
|
|
3296
|
-
children:
|
|
3297
|
-
}), /* @__PURE__ */
|
|
1891
|
+
children: q
|
|
1892
|
+
}), /* @__PURE__ */ r("td", {
|
|
3298
1893
|
width: 200,
|
|
3299
|
-
children:
|
|
3300
|
-
}), /* @__PURE__ */
|
|
1894
|
+
children: p($)
|
|
1895
|
+
}), /* @__PURE__ */ r("td", {
|
|
3301
1896
|
width: 200,
|
|
3302
|
-
children: /* @__PURE__ */
|
|
1897
|
+
children: /* @__PURE__ */ v(O, {
|
|
3303
1898
|
position: "left",
|
|
3304
|
-
children: [/* @__PURE__ */
|
|
3305
|
-
account:
|
|
3306
|
-
onSuccess:
|
|
3307
|
-
}), /* @__PURE__ */
|
|
3308
|
-
id:
|
|
3309
|
-
name:
|
|
3310
|
-
onSuccess:
|
|
1899
|
+
children: [/* @__PURE__ */ r(Dt, {
|
|
1900
|
+
account: m,
|
|
1901
|
+
onSuccess: l
|
|
1902
|
+
}), /* @__PURE__ */ r(kt, {
|
|
1903
|
+
id: f,
|
|
1904
|
+
name: z,
|
|
1905
|
+
onSuccess: l
|
|
3311
1906
|
})]
|
|
3312
1907
|
})
|
|
3313
1908
|
})]
|
|
3314
|
-
},
|
|
1909
|
+
}, f);
|
|
3315
1910
|
})
|
|
3316
1911
|
})]
|
|
3317
1912
|
})]
|
|
3318
1913
|
})]
|
|
3319
1914
|
});
|
|
3320
1915
|
}
|
|
3321
|
-
function
|
|
3322
|
-
postSubmit:
|
|
3323
|
-
styles:
|
|
1916
|
+
function jt({
|
|
1917
|
+
postSubmit: t,
|
|
1918
|
+
styles: n = V
|
|
3324
1919
|
}) {
|
|
3325
1920
|
const {
|
|
3326
|
-
control:
|
|
1921
|
+
control: a,
|
|
3327
1922
|
handleSubmit: o
|
|
3328
|
-
} =
|
|
1923
|
+
} = J({
|
|
3329
1924
|
defaultValues: {
|
|
3330
1925
|
name: "",
|
|
3331
1926
|
password: ""
|
|
3332
1927
|
}
|
|
3333
1928
|
});
|
|
3334
|
-
return /* @__PURE__ */
|
|
1929
|
+
return /* @__PURE__ */ r(F, {
|
|
3335
1930
|
mx: "auto",
|
|
3336
|
-
children: /* @__PURE__ */
|
|
1931
|
+
children: /* @__PURE__ */ v("form", {
|
|
3337
1932
|
onSubmit: o(async ({
|
|
3338
|
-
name:
|
|
1933
|
+
name: s,
|
|
3339
1934
|
password: c
|
|
3340
1935
|
}) => {
|
|
3341
1936
|
try {
|
|
3342
|
-
|
|
1937
|
+
W({
|
|
3343
1938
|
id: "for-login",
|
|
3344
1939
|
title: "Pending",
|
|
3345
1940
|
message: "Loggin in...",
|
|
3346
1941
|
loading: !0
|
|
3347
1942
|
});
|
|
3348
|
-
const
|
|
3349
|
-
window.localStorage.setItem("token",
|
|
1943
|
+
const d = await j.account.login(s, c);
|
|
1944
|
+
window.localStorage.setItem("token", d.token), x({
|
|
3350
1945
|
id: "for-login",
|
|
3351
1946
|
title: "Successful",
|
|
3352
1947
|
message: "Logged in",
|
|
3353
1948
|
color: "green"
|
|
3354
|
-
}),
|
|
3355
|
-
} catch (
|
|
3356
|
-
|
|
1949
|
+
}), t(d);
|
|
1950
|
+
} catch (d) {
|
|
1951
|
+
x({
|
|
3357
1952
|
id: "for-login",
|
|
3358
1953
|
title: "Login Failed",
|
|
3359
|
-
message:
|
|
1954
|
+
message: d.message,
|
|
3360
1955
|
color: "red"
|
|
3361
1956
|
});
|
|
3362
1957
|
}
|
|
3363
1958
|
}),
|
|
3364
|
-
children: [/* @__PURE__ */
|
|
1959
|
+
children: [/* @__PURE__ */ r(R, {
|
|
3365
1960
|
name: "name",
|
|
3366
|
-
control:
|
|
1961
|
+
control: a,
|
|
3367
1962
|
render: ({
|
|
3368
|
-
field:
|
|
3369
|
-
}) => /* @__PURE__ */
|
|
3370
|
-
mb:
|
|
3371
|
-
size:
|
|
1963
|
+
field: s
|
|
1964
|
+
}) => /* @__PURE__ */ r(D, {
|
|
1965
|
+
mb: n.spacing,
|
|
1966
|
+
size: n.size,
|
|
3372
1967
|
required: !0,
|
|
3373
1968
|
label: "Username",
|
|
3374
|
-
...
|
|
1969
|
+
...s
|
|
3375
1970
|
})
|
|
3376
|
-
}), /* @__PURE__ */
|
|
1971
|
+
}), /* @__PURE__ */ r(R, {
|
|
3377
1972
|
name: "password",
|
|
3378
|
-
control:
|
|
1973
|
+
control: a,
|
|
3379
1974
|
render: ({
|
|
3380
|
-
field:
|
|
3381
|
-
}) => /* @__PURE__ */
|
|
3382
|
-
mb:
|
|
3383
|
-
size:
|
|
1975
|
+
field: s
|
|
1976
|
+
}) => /* @__PURE__ */ r(de, {
|
|
1977
|
+
mb: n.spacing,
|
|
1978
|
+
size: n.size,
|
|
3384
1979
|
required: !0,
|
|
3385
1980
|
label: "Password",
|
|
3386
|
-
...
|
|
1981
|
+
...s
|
|
3387
1982
|
})
|
|
3388
|
-
}), /* @__PURE__ */
|
|
1983
|
+
}), /* @__PURE__ */ r(O, {
|
|
3389
1984
|
position: "right",
|
|
3390
|
-
mt:
|
|
3391
|
-
children: /* @__PURE__ */
|
|
1985
|
+
mt: n.spacing,
|
|
1986
|
+
children: /* @__PURE__ */ r(T, {
|
|
3392
1987
|
type: "submit",
|
|
3393
|
-
size:
|
|
1988
|
+
size: n.button.size,
|
|
3394
1989
|
children: "Submit"
|
|
3395
1990
|
})
|
|
3396
1991
|
})]
|
|
3397
1992
|
})
|
|
3398
1993
|
});
|
|
3399
1994
|
}
|
|
3400
|
-
function
|
|
3401
|
-
styles:
|
|
3402
|
-
config:
|
|
3403
|
-
onSuccess:
|
|
1995
|
+
function tn({
|
|
1996
|
+
styles: t = V,
|
|
1997
|
+
config: n,
|
|
1998
|
+
onSuccess: a
|
|
3404
1999
|
}) {
|
|
3405
|
-
return
|
|
3406
|
-
children: /* @__PURE__ */
|
|
3407
|
-
mt:
|
|
2000
|
+
return pe(n), /* @__PURE__ */ r(N, {
|
|
2001
|
+
children: /* @__PURE__ */ r(F, {
|
|
2002
|
+
mt: t.spacing,
|
|
3408
2003
|
sx: {
|
|
3409
2004
|
position: "relative"
|
|
3410
2005
|
},
|
|
3411
|
-
children: /* @__PURE__ */
|
|
3412
|
-
styles:
|
|
3413
|
-
postSubmit:
|
|
2006
|
+
children: /* @__PURE__ */ r(jt, {
|
|
2007
|
+
styles: t,
|
|
2008
|
+
postSubmit: a
|
|
3414
2009
|
})
|
|
3415
2010
|
})
|
|
3416
2011
|
});
|
|
3417
2012
|
}
|
|
3418
|
-
const
|
|
2013
|
+
const me = {
|
|
3419
2014
|
size: "sm",
|
|
3420
2015
|
spacing: "md",
|
|
3421
2016
|
button: {
|
|
3422
2017
|
size: "xs"
|
|
3423
2018
|
}
|
|
3424
2019
|
};
|
|
3425
|
-
function
|
|
3426
|
-
postSubmit:
|
|
3427
|
-
styles:
|
|
3428
|
-
initialRoleID:
|
|
2020
|
+
function It({
|
|
2021
|
+
postSubmit: t,
|
|
2022
|
+
styles: n = me,
|
|
2023
|
+
initialRoleID: a
|
|
3429
2024
|
}) {
|
|
3430
2025
|
const {
|
|
3431
2026
|
control: o,
|
|
3432
|
-
handleSubmit:
|
|
3433
|
-
} =
|
|
2027
|
+
handleSubmit: l
|
|
2028
|
+
} = J({
|
|
3434
2029
|
defaultValues: {
|
|
3435
2030
|
name: "",
|
|
3436
|
-
role_id:
|
|
2031
|
+
role_id: a
|
|
3437
2032
|
}
|
|
3438
2033
|
});
|
|
3439
|
-
return /* @__PURE__ */
|
|
2034
|
+
return /* @__PURE__ */ r(F, {
|
|
3440
2035
|
mx: "auto",
|
|
3441
|
-
children: /* @__PURE__ */
|
|
3442
|
-
onSubmit:
|
|
2036
|
+
children: /* @__PURE__ */ v("form", {
|
|
2037
|
+
onSubmit: l(async ({
|
|
3443
2038
|
name: c,
|
|
3444
|
-
role_id:
|
|
2039
|
+
role_id: d
|
|
3445
2040
|
}) => {
|
|
3446
2041
|
try {
|
|
3447
|
-
|
|
2042
|
+
W({
|
|
3448
2043
|
id: "for-creating",
|
|
3449
2044
|
title: "Pending",
|
|
3450
2045
|
message: "Adding API Key...",
|
|
3451
2046
|
loading: !0
|
|
3452
2047
|
});
|
|
3453
2048
|
const {
|
|
3454
|
-
app_id:
|
|
3455
|
-
app_secret:
|
|
3456
|
-
} = await
|
|
3457
|
-
|
|
2049
|
+
app_id: p,
|
|
2050
|
+
app_secret: b
|
|
2051
|
+
} = await j.api_key.create(c, d);
|
|
2052
|
+
x({
|
|
3458
2053
|
id: "for-creating",
|
|
3459
2054
|
title: "Successful",
|
|
3460
2055
|
message: "API Key is added",
|
|
3461
2056
|
color: "green"
|
|
3462
|
-
}),
|
|
3463
|
-
} catch (
|
|
3464
|
-
|
|
2057
|
+
}), t(p, b);
|
|
2058
|
+
} catch (p) {
|
|
2059
|
+
x({
|
|
3465
2060
|
id: "for-creating",
|
|
3466
2061
|
title: "Failed",
|
|
3467
|
-
message:
|
|
2062
|
+
message: p.message,
|
|
3468
2063
|
color: "red"
|
|
3469
2064
|
});
|
|
3470
2065
|
}
|
|
3471
2066
|
}),
|
|
3472
|
-
children: [/* @__PURE__ */
|
|
2067
|
+
children: [/* @__PURE__ */ r(R, {
|
|
3473
2068
|
name: "name",
|
|
3474
2069
|
control: o,
|
|
3475
2070
|
render: ({
|
|
3476
2071
|
field: c
|
|
3477
|
-
}) => /* @__PURE__ */
|
|
3478
|
-
mb:
|
|
3479
|
-
size:
|
|
2072
|
+
}) => /* @__PURE__ */ r(D, {
|
|
2073
|
+
mb: n.spacing,
|
|
2074
|
+
size: n.size,
|
|
3480
2075
|
required: !0,
|
|
3481
2076
|
label: "Name",
|
|
3482
2077
|
...c
|
|
3483
2078
|
})
|
|
3484
|
-
}), /* @__PURE__ */
|
|
2079
|
+
}), /* @__PURE__ */ r(R, {
|
|
3485
2080
|
name: "role_id",
|
|
3486
2081
|
control: o,
|
|
3487
2082
|
render: ({
|
|
3488
2083
|
field: c
|
|
3489
|
-
}) => /* @__PURE__ */
|
|
3490
|
-
styles:
|
|
2084
|
+
}) => /* @__PURE__ */ r(je, {
|
|
2085
|
+
styles: n,
|
|
3491
2086
|
...c
|
|
3492
2087
|
})
|
|
3493
|
-
}), /* @__PURE__ */
|
|
2088
|
+
}), /* @__PURE__ */ r(O, {
|
|
3494
2089
|
position: "right",
|
|
3495
|
-
mt:
|
|
3496
|
-
children: /* @__PURE__ */
|
|
2090
|
+
mt: n.spacing,
|
|
2091
|
+
children: /* @__PURE__ */ r(T, {
|
|
3497
2092
|
type: "submit",
|
|
3498
|
-
size:
|
|
2093
|
+
size: n.button.size,
|
|
3499
2094
|
children: "Save"
|
|
3500
2095
|
})
|
|
3501
2096
|
})]
|
|
3502
2097
|
})
|
|
3503
2098
|
});
|
|
3504
2099
|
}
|
|
3505
|
-
function
|
|
3506
|
-
onSuccess:
|
|
3507
|
-
styles:
|
|
3508
|
-
initialRoleID:
|
|
2100
|
+
function Ft({
|
|
2101
|
+
onSuccess: t,
|
|
2102
|
+
styles: n = me,
|
|
2103
|
+
initialRoleID: a
|
|
3509
2104
|
}) {
|
|
3510
|
-
const o =
|
|
3511
|
-
return /* @__PURE__ */
|
|
3512
|
-
children: [/* @__PURE__ */
|
|
2105
|
+
const o = fe(), [l, s] = H.useState(!1), c = () => s(!0), d = () => s(!1);
|
|
2106
|
+
return /* @__PURE__ */ v(N, {
|
|
2107
|
+
children: [/* @__PURE__ */ r(ne, {
|
|
3513
2108
|
overflow: "inside",
|
|
3514
|
-
opened:
|
|
3515
|
-
onClose: () =>
|
|
2109
|
+
opened: l,
|
|
2110
|
+
onClose: () => s(!1),
|
|
3516
2111
|
title: "Add an API Key",
|
|
3517
2112
|
trapFocus: !0,
|
|
3518
|
-
onDragStart: (
|
|
3519
|
-
|
|
2113
|
+
onDragStart: (b) => {
|
|
2114
|
+
b.stopPropagation();
|
|
3520
2115
|
},
|
|
3521
|
-
children: /* @__PURE__ */
|
|
3522
|
-
postSubmit: (
|
|
3523
|
-
|
|
2116
|
+
children: /* @__PURE__ */ r(It, {
|
|
2117
|
+
postSubmit: (b, S) => {
|
|
2118
|
+
d(), o.openModal({
|
|
3524
2119
|
title: "API Key is generated",
|
|
3525
|
-
children: /* @__PURE__ */
|
|
3526
|
-
children: [/* @__PURE__ */
|
|
2120
|
+
children: /* @__PURE__ */ v(ze, {
|
|
2121
|
+
children: [/* @__PURE__ */ r(ue, {
|
|
3527
2122
|
color: "dimmed",
|
|
3528
2123
|
children: "Make sure you save it - you won't be able to access it again."
|
|
3529
|
-
}), /* @__PURE__ */
|
|
3530
|
-
defaultValue:
|
|
2124
|
+
}), /* @__PURE__ */ r(D, {
|
|
2125
|
+
defaultValue: b,
|
|
3531
2126
|
disabled: !0,
|
|
3532
2127
|
label: "APP ID",
|
|
3533
2128
|
styles: {
|
|
@@ -3535,8 +2130,8 @@ function $o({
|
|
|
3535
2130
|
cursor: "text !important"
|
|
3536
2131
|
}
|
|
3537
2132
|
}
|
|
3538
|
-
}), /* @__PURE__ */
|
|
3539
|
-
defaultValue:
|
|
2133
|
+
}), /* @__PURE__ */ r(D, {
|
|
2134
|
+
defaultValue: S,
|
|
3540
2135
|
disabled: !0,
|
|
3541
2136
|
label: "APP Secret",
|
|
3542
2137
|
styles: {
|
|
@@ -3544,191 +2139,191 @@ function $o({
|
|
|
3544
2139
|
cursor: "text !important"
|
|
3545
2140
|
}
|
|
3546
2141
|
}
|
|
3547
|
-
}), /* @__PURE__ */
|
|
2142
|
+
}), /* @__PURE__ */ r(T, {
|
|
3548
2143
|
size: "sm",
|
|
3549
2144
|
onClick: () => {
|
|
3550
|
-
|
|
2145
|
+
lt();
|
|
3551
2146
|
},
|
|
3552
2147
|
children: "I've saved this API Key"
|
|
3553
2148
|
})]
|
|
3554
2149
|
}),
|
|
3555
2150
|
onClose: () => {
|
|
3556
|
-
|
|
2151
|
+
t();
|
|
3557
2152
|
}
|
|
3558
2153
|
});
|
|
3559
2154
|
},
|
|
3560
|
-
styles:
|
|
3561
|
-
initialRoleID:
|
|
2155
|
+
styles: n,
|
|
2156
|
+
initialRoleID: a
|
|
3562
2157
|
})
|
|
3563
|
-
}), /* @__PURE__ */
|
|
3564
|
-
size:
|
|
2158
|
+
}), /* @__PURE__ */ r(T, {
|
|
2159
|
+
size: n.button.size,
|
|
3565
2160
|
onClick: c,
|
|
3566
|
-
leftIcon: /* @__PURE__ */
|
|
2161
|
+
leftIcon: /* @__PURE__ */ r(xe, {
|
|
3567
2162
|
size: 20
|
|
3568
2163
|
}),
|
|
3569
2164
|
children: "Add an API Key"
|
|
3570
2165
|
})]
|
|
3571
2166
|
});
|
|
3572
2167
|
}
|
|
3573
|
-
function
|
|
3574
|
-
id:
|
|
3575
|
-
name:
|
|
3576
|
-
onSuccess:
|
|
3577
|
-
styles: o =
|
|
2168
|
+
function qt({
|
|
2169
|
+
id: t,
|
|
2170
|
+
name: n,
|
|
2171
|
+
onSuccess: a,
|
|
2172
|
+
styles: o = me
|
|
3578
2173
|
}) {
|
|
3579
|
-
const
|
|
3580
|
-
if (!!
|
|
3581
|
-
|
|
2174
|
+
const l = fe(), s = async () => {
|
|
2175
|
+
if (!!t) {
|
|
2176
|
+
W({
|
|
3582
2177
|
id: "for-deleting",
|
|
3583
2178
|
title: "Pending",
|
|
3584
2179
|
message: "Deleting API Key...",
|
|
3585
2180
|
loading: !0
|
|
3586
2181
|
});
|
|
3587
2182
|
try {
|
|
3588
|
-
await
|
|
2183
|
+
await j.api_key.delete(t), x({
|
|
3589
2184
|
id: "for-deleting",
|
|
3590
2185
|
title: "Successful",
|
|
3591
|
-
message: `API Key [${
|
|
2186
|
+
message: `API Key [${n}] is deleted`,
|
|
3592
2187
|
color: "green"
|
|
3593
|
-
}),
|
|
3594
|
-
} catch (
|
|
3595
|
-
|
|
2188
|
+
}), a();
|
|
2189
|
+
} catch (d) {
|
|
2190
|
+
x({
|
|
3596
2191
|
id: "for-deleting",
|
|
3597
2192
|
title: "Failed",
|
|
3598
|
-
message:
|
|
2193
|
+
message: d.message,
|
|
3599
2194
|
color: "red"
|
|
3600
2195
|
});
|
|
3601
2196
|
}
|
|
3602
2197
|
}
|
|
3603
|
-
}, c = () =>
|
|
2198
|
+
}, c = () => l.openConfirmModal({
|
|
3604
2199
|
title: "Delete this api-key?",
|
|
3605
2200
|
labels: {
|
|
3606
2201
|
confirm: "Confirm",
|
|
3607
2202
|
cancel: "Cancel"
|
|
3608
2203
|
},
|
|
3609
2204
|
onCancel: () => console.log("Cancel"),
|
|
3610
|
-
onConfirm:
|
|
2205
|
+
onConfirm: s
|
|
3611
2206
|
});
|
|
3612
|
-
return /* @__PURE__ */
|
|
2207
|
+
return /* @__PURE__ */ r(T, {
|
|
3613
2208
|
size: o.button.size,
|
|
3614
2209
|
color: "red",
|
|
3615
2210
|
onClick: c,
|
|
3616
|
-
leftIcon: /* @__PURE__ */
|
|
2211
|
+
leftIcon: /* @__PURE__ */ r(De, {
|
|
3617
2212
|
size: 20
|
|
3618
2213
|
}),
|
|
3619
2214
|
children: "Delete"
|
|
3620
2215
|
});
|
|
3621
2216
|
}
|
|
3622
|
-
function
|
|
3623
|
-
styles:
|
|
3624
|
-
config:
|
|
2217
|
+
function nn({
|
|
2218
|
+
styles: t = me,
|
|
2219
|
+
config: n
|
|
3625
2220
|
}) {
|
|
3626
|
-
var
|
|
3627
|
-
|
|
2221
|
+
var b, S;
|
|
2222
|
+
pe(n);
|
|
3628
2223
|
const {
|
|
3629
|
-
data:
|
|
2224
|
+
data: a = [],
|
|
3630
2225
|
loading: o,
|
|
3631
|
-
refresh:
|
|
3632
|
-
} =
|
|
2226
|
+
refresh: l
|
|
2227
|
+
} = G(async () => {
|
|
3633
2228
|
const {
|
|
3634
|
-
data:
|
|
3635
|
-
} = await
|
|
3636
|
-
return
|
|
2229
|
+
data: m
|
|
2230
|
+
} = await j.api_key.list();
|
|
2231
|
+
return m;
|
|
3637
2232
|
}, {
|
|
3638
2233
|
refreshDeps: []
|
|
3639
2234
|
}), {
|
|
3640
|
-
data:
|
|
2235
|
+
data: s = [],
|
|
3641
2236
|
loading: c
|
|
3642
|
-
} =
|
|
3643
|
-
label:
|
|
3644
|
-
value:
|
|
3645
|
-
description:
|
|
3646
|
-
disabled:
|
|
2237
|
+
} = G(async () => (await j.role.list()).map((f) => ({
|
|
2238
|
+
label: f.name,
|
|
2239
|
+
value: f.id,
|
|
2240
|
+
description: f.description,
|
|
2241
|
+
disabled: f.id === 50
|
|
3647
2242
|
})), {
|
|
3648
2243
|
refreshDeps: []
|
|
3649
|
-
}),
|
|
3650
|
-
var
|
|
3651
|
-
return (
|
|
2244
|
+
}), d = ur(() => s.reduce((m, f) => (m.set(f.value, f.label), m), /* @__PURE__ */ new Map()), [s]), p = (m) => {
|
|
2245
|
+
var f;
|
|
2246
|
+
return (f = d.get(m)) != null ? f : m;
|
|
3652
2247
|
};
|
|
3653
|
-
return /* @__PURE__ */
|
|
3654
|
-
children: [/* @__PURE__ */
|
|
3655
|
-
pt:
|
|
2248
|
+
return /* @__PURE__ */ v(N, {
|
|
2249
|
+
children: [/* @__PURE__ */ r(O, {
|
|
2250
|
+
pt: t.spacing,
|
|
3656
2251
|
position: "right",
|
|
3657
|
-
children: /* @__PURE__ */
|
|
3658
|
-
onSuccess:
|
|
3659
|
-
initialRoleID: (
|
|
2252
|
+
children: /* @__PURE__ */ r(Ft, {
|
|
2253
|
+
onSuccess: l,
|
|
2254
|
+
initialRoleID: (S = (b = s == null ? void 0 : s[0]) == null ? void 0 : b.value) != null ? S : 0
|
|
3660
2255
|
})
|
|
3661
|
-
}), /* @__PURE__ */
|
|
3662
|
-
mt:
|
|
2256
|
+
}), /* @__PURE__ */ v(F, {
|
|
2257
|
+
mt: t.spacing,
|
|
3663
2258
|
sx: {
|
|
3664
2259
|
position: "relative"
|
|
3665
2260
|
},
|
|
3666
|
-
children: [/* @__PURE__ */
|
|
2261
|
+
children: [/* @__PURE__ */ r(Oe, {
|
|
3667
2262
|
visible: o || c
|
|
3668
|
-
}), /* @__PURE__ */
|
|
3669
|
-
horizontalSpacing:
|
|
3670
|
-
verticalSpacing:
|
|
3671
|
-
fontSize:
|
|
2263
|
+
}), /* @__PURE__ */ v(Ae, {
|
|
2264
|
+
horizontalSpacing: t.spacing,
|
|
2265
|
+
verticalSpacing: t.spacing,
|
|
2266
|
+
fontSize: t.size,
|
|
3672
2267
|
highlightOnHover: !0,
|
|
3673
|
-
children: [/* @__PURE__ */
|
|
3674
|
-
children: /* @__PURE__ */
|
|
3675
|
-
children: [/* @__PURE__ */
|
|
2268
|
+
children: [/* @__PURE__ */ r("thead", {
|
|
2269
|
+
children: /* @__PURE__ */ v("tr", {
|
|
2270
|
+
children: [/* @__PURE__ */ r("th", {
|
|
3676
2271
|
children: "Name"
|
|
3677
|
-
}), /* @__PURE__ */
|
|
2272
|
+
}), /* @__PURE__ */ r("th", {
|
|
3678
2273
|
children: "APP ID"
|
|
3679
|
-
}), /* @__PURE__ */
|
|
2274
|
+
}), /* @__PURE__ */ r("th", {
|
|
3680
2275
|
children: "Role"
|
|
3681
|
-
}), /* @__PURE__ */
|
|
2276
|
+
}), /* @__PURE__ */ r("th", {
|
|
3682
2277
|
children: "Action"
|
|
3683
2278
|
})]
|
|
3684
2279
|
})
|
|
3685
|
-
}), /* @__PURE__ */
|
|
3686
|
-
children:
|
|
2280
|
+
}), /* @__PURE__ */ r("tbody", {
|
|
2281
|
+
children: a.map((m) => {
|
|
3687
2282
|
const {
|
|
3688
|
-
id:
|
|
3689
|
-
name:
|
|
3690
|
-
app_id:
|
|
3691
|
-
role_id:
|
|
3692
|
-
} =
|
|
3693
|
-
return /* @__PURE__ */
|
|
3694
|
-
children: [/* @__PURE__ */
|
|
2283
|
+
id: f,
|
|
2284
|
+
name: z,
|
|
2285
|
+
app_id: q,
|
|
2286
|
+
role_id: $
|
|
2287
|
+
} = m;
|
|
2288
|
+
return /* @__PURE__ */ v("tr", {
|
|
2289
|
+
children: [/* @__PURE__ */ r("td", {
|
|
3695
2290
|
width: 200,
|
|
3696
|
-
children:
|
|
3697
|
-
}), /* @__PURE__ */
|
|
2291
|
+
children: z
|
|
2292
|
+
}), /* @__PURE__ */ r("td", {
|
|
3698
2293
|
width: 200,
|
|
3699
|
-
children:
|
|
3700
|
-
}), /* @__PURE__ */
|
|
2294
|
+
children: q
|
|
2295
|
+
}), /* @__PURE__ */ r("td", {
|
|
3701
2296
|
width: 200,
|
|
3702
|
-
children:
|
|
3703
|
-
}), /* @__PURE__ */
|
|
2297
|
+
children: p($)
|
|
2298
|
+
}), /* @__PURE__ */ r("td", {
|
|
3704
2299
|
width: 200,
|
|
3705
|
-
children: /* @__PURE__ */
|
|
2300
|
+
children: /* @__PURE__ */ r(O, {
|
|
3706
2301
|
position: "left",
|
|
3707
|
-
children: /* @__PURE__ */
|
|
3708
|
-
id:
|
|
3709
|
-
name:
|
|
3710
|
-
onSuccess:
|
|
2302
|
+
children: /* @__PURE__ */ r(qt, {
|
|
2303
|
+
id: f,
|
|
2304
|
+
name: z,
|
|
2305
|
+
onSuccess: l
|
|
3711
2306
|
})
|
|
3712
2307
|
})
|
|
3713
2308
|
})]
|
|
3714
|
-
},
|
|
2309
|
+
}, f);
|
|
3715
2310
|
})
|
|
3716
2311
|
})]
|
|
3717
2312
|
})]
|
|
3718
2313
|
})]
|
|
3719
2314
|
});
|
|
3720
2315
|
}
|
|
3721
|
-
const
|
|
2316
|
+
const an = () => import("./package.1eb31380.mjs").then(({ version: t }) => (console.log(`[@devtable/dashboard] version: ${t}`), t));
|
|
3722
2317
|
export {
|
|
3723
|
-
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
2318
|
+
nn as APIKeyList,
|
|
2319
|
+
rn as AccountList,
|
|
2320
|
+
Ft as AddAPIKey,
|
|
2321
|
+
At as AddAccount,
|
|
2322
|
+
Rt as AddDataSource,
|
|
2323
|
+
en as DataSourceList,
|
|
2324
|
+
qt as DeleteAPIKey,
|
|
2325
|
+
kt as DeleteAccount,
|
|
2326
|
+
Tt as DeleteDataSource,
|
|
2327
|
+
tn as Login,
|
|
2328
|
+
an as getVersion
|
|
3734
2329
|
};
|