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