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