@devtable/settings-form 12.10.1 → 12.11.0

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,16 +1,17 @@
1
- import F, { useEffect as Ct, forwardRef as ut, useState as or, Component as Vr } from "react";
2
- import { Box as X, TextInput as Q, Divider as ct, Group as z, NumberInput as Wr, PasswordInput as dt, Button as D, Modal as xe, Stack as Ke, Alert as Kr, SegmentedControl as Zr, Tooltip as at, Text as ke, ActionIcon as Dt, LoadingOverlay as pt, Table as ft, Select as Xr, Switch as Qr, createStyles as lr, rem as Ve, useComponentDefaultProps as Jr, useMantineTheme as en, ScrollArea as ur, Tabs as gt, HoverCard as _t } from "@mantine/core";
1
+ import F, { useEffect as It, forwardRef as ct, useState as lr, Component as Wr } from "react";
2
+ import { Box as X, TextInput as Q, Divider as dt, Group as z, NumberInput as Kr, PasswordInput as pt, Button as I, Modal as xe, Stack as Ze, Alert as Zr, SegmentedControl as Xr, Tooltip as it, Text as ke, ActionIcon as Dt, LoadingOverlay as ft, Table as gt, Select as Qr, Switch as Jr, createStyles as ur, rem as We, useComponentDefaultProps as en, useMantineTheme as tn, ScrollArea as cr, Tabs as ht, HoverCard as At } from "@mantine/core";
3
3
  import { showNotification as oe, updateNotification as P } from "@mantine/notifications";
4
- import { Recycle as tn, AlertCircle as rn, PlaylistAdd as ht, Trash as mt, Edit as nn } from "tabler-icons-react";
5
- import * as an from "crypto-js";
6
- import sn from "axios";
7
- import { useForm as me, Controller as O } from "react-hook-form";
8
- import { useBoolean as on, useRequest as Te } from "ahooks";
9
- import cr, { loader as At } from "@monaco-editor/react";
10
- import { useModals as Ze, closeAllModals as ln } from "@mantine/modals";
11
- import { IconLock as dr, IconEdit as Tt, IconNetwork as un, IconBrandMysql as cn, IconDatabase as dn, IconEye as pn } from "@tabler/icons-react";
12
- import { useClipboard as fn } from "@mantine/hooks";
13
- var jt = { exports: {} }, Ue = {};
4
+ import { Recycle as rn, AlertCircle as nn, PlaylistAdd as mt, Trash as bt, Edit as an } from "tabler-icons-react";
5
+ import * as sn from "crypto-js";
6
+ import on from "lodash";
7
+ import ln from "axios";
8
+ import { useForm as me, Controller as R } from "react-hook-form";
9
+ import { IconDeviceFloppy as Pe, IconLock as dr, IconEdit as jt, IconNetwork as un, IconBrandMysql as cn, IconDatabase as dn, IconEye as pn } from "@tabler/icons-react";
10
+ import { useBoolean as fn, useRequest as Te } from "ahooks";
11
+ import pr, { loader as kt } from "@monaco-editor/react";
12
+ import { useModals as Xe, closeAllModals as gn } from "@mantine/modals";
13
+ import { useClipboard as hn } from "@mantine/hooks";
14
+ var Ct = { exports: {} }, Ge = {};
14
15
  /**
15
16
  * @license React
16
17
  * react-jsx-runtime.production.min.js
@@ -20,11 +21,11 @@ var jt = { exports: {} }, Ue = {};
20
21
  * This source code is licensed under the MIT license found in the
21
22
  * LICENSE file in the root directory of this source tree.
22
23
  */
23
- var Xt;
24
- function gn() {
25
- if (Xt)
26
- return Ue;
27
- Xt = 1;
24
+ var Qt;
25
+ function mn() {
26
+ if (Qt)
27
+ return Ge;
28
+ Qt = 1;
28
29
  var e = F, t = Symbol.for("react.element"), r = Symbol.for("react.fragment"), n = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
29
30
  function l(d, p, f) {
30
31
  var h, c = {}, u = null, g = null;
@@ -36,9 +37,9 @@ function gn() {
36
37
  c[h] === void 0 && (c[h] = p[h]);
37
38
  return { $$typeof: t, type: d, key: u, ref: g, props: c, _owner: i.current };
38
39
  }
39
- return Ue.Fragment = r, Ue.jsx = l, Ue.jsxs = l, Ue;
40
+ return Ge.Fragment = r, Ge.jsx = l, Ge.jsxs = l, Ge;
40
41
  }
41
- var Ge = {};
42
+ var He = {};
42
43
  /**
43
44
  * @license React
44
45
  * react-jsx-runtime.development.js
@@ -48,9 +49,9 @@ var Ge = {};
48
49
  * This source code is licensed under the MIT license found in the
49
50
  * LICENSE file in the root directory of this source tree.
50
51
  */
51
- var Qt;
52
- function hn() {
53
- return Qt || (Qt = 1, process.env.NODE_ENV !== "production" && function() {
52
+ var Jt;
53
+ function bn() {
54
+ return Jt || (Jt = 1, process.env.NODE_ENV !== "production" && function() {
54
55
  var e = F, t = Symbol.for("react.element"), r = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), d = Symbol.for("react.context"), p = Symbol.for("react.forward_ref"), f = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), c = Symbol.for("react.memo"), u = Symbol.for("react.lazy"), g = Symbol.for("react.offscreen"), v = Symbol.iterator, m = "@@iterator";
55
56
  function x(o) {
56
57
  if (o === null || typeof o != "object")
@@ -68,12 +69,12 @@ function hn() {
68
69
  }
69
70
  function _(o, y, E) {
70
71
  {
71
- var A = w.ReactDebugCurrentFrame, R = A.getStackAddendum();
72
- R !== "" && (y += "%s", E = E.concat([R]));
73
- var I = E.map(function(j) {
72
+ var A = w.ReactDebugCurrentFrame, C = A.getStackAddendum();
73
+ C !== "" && (y += "%s", E = E.concat([C]));
74
+ var D = E.map(function(j) {
74
75
  return String(j);
75
76
  });
76
- I.unshift("Warning: " + y), Function.prototype.apply.call(console[o], console, I);
77
+ D.unshift("Warning: " + y), Function.prototype.apply.call(console[o], console, D);
77
78
  }
78
79
  }
79
80
  var k = !1, H = !1, J = !1, N = !1, q = !1, $;
@@ -89,8 +90,8 @@ function hn() {
89
90
  var A = o.displayName;
90
91
  if (A)
91
92
  return A;
92
- var R = y.displayName || y.name || "";
93
- return R !== "" ? E + "(" + R + ")" : E;
93
+ var C = y.displayName || y.name || "";
94
+ return C !== "" ? E + "(" + C + ")" : E;
94
95
  }
95
96
  function V(o) {
96
97
  return o.displayName || "Context";
@@ -130,9 +131,9 @@ function hn() {
130
131
  var A = o.displayName || null;
131
132
  return A !== null ? A : B(o.type) || "Memo";
132
133
  case u: {
133
- var R = o, I = R._payload, j = R._init;
134
+ var C = o, D = C._payload, j = C._init;
134
135
  try {
135
- return B(j(I));
136
+ return B(j(D));
136
137
  } catch {
137
138
  return null;
138
139
  }
@@ -202,27 +203,27 @@ function hn() {
202
203
  M < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
203
204
  }
204
205
  }
205
- var ge = w.ReactCurrentDispatcher, Me;
206
+ var ge = w.ReactCurrentDispatcher, Be;
206
207
  function je(o, y, E) {
207
208
  {
208
- if (Me === void 0)
209
+ if (Be === void 0)
209
210
  try {
210
211
  throw Error();
211
- } catch (R) {
212
- var A = R.stack.trim().match(/\n( *(at )?)/);
213
- Me = A && A[1] || "";
212
+ } catch (C) {
213
+ var A = C.stack.trim().match(/\n( *(at )?)/);
214
+ Be = A && A[1] || "";
214
215
  }
215
216
  return `
216
- ` + Me + o;
217
+ ` + Be + o;
217
218
  }
218
219
  }
219
- var Re = !1, _e;
220
+ var Ce = !1, _e;
220
221
  {
221
- var Oe = typeof WeakMap == "function" ? WeakMap : Map;
222
- _e = new Oe();
222
+ var Re = typeof WeakMap == "function" ? WeakMap : Map;
223
+ _e = new Re();
223
224
  }
224
- function $t(o, y) {
225
- if (!o || Re)
225
+ function zt(o, y) {
226
+ if (!o || Ce)
226
227
  return "";
227
228
  {
228
229
  var E = _e.get(o);
@@ -230,11 +231,11 @@ function hn() {
230
231
  return E;
231
232
  }
232
233
  var A;
233
- Re = !0;
234
- var R = Error.prepareStackTrace;
234
+ Ce = !0;
235
+ var C = Error.prepareStackTrace;
235
236
  Error.prepareStackTrace = void 0;
236
- var I;
237
- I = ge.current, ge.current = null, fe();
237
+ var D;
238
+ D = ge.current, ge.current = null, fe();
238
239
  try {
239
240
  if (y) {
240
241
  var j = function() {
@@ -287,23 +288,23 @@ function hn() {
287
288
  }
288
289
  }
289
290
  } finally {
290
- Re = !1, ge.current = I, Ee(), Error.prepareStackTrace = R;
291
+ Ce = !1, ge.current = D, Ee(), Error.prepareStackTrace = C;
291
292
  }
292
- var De = o ? o.displayName || o.name : "", Zt = De ? je(De) : "";
293
- return typeof o == "function" && _e.set(o, Zt), Zt;
293
+ var Ie = o ? o.displayName || o.name : "", Xt = Ie ? je(Ie) : "";
294
+ return typeof o == "function" && _e.set(o, Xt), Xt;
294
295
  }
295
- function Ar(o, y, E) {
296
- return $t(o, !1);
296
+ function kr(o, y, E) {
297
+ return zt(o, !1);
297
298
  }
298
- function kr(o) {
299
+ function Tr(o) {
299
300
  var y = o.prototype;
300
301
  return !!(y && y.isReactComponent);
301
302
  }
302
- function Je(o, y, E) {
303
+ function et(o, y, E) {
303
304
  if (o == null)
304
305
  return "";
305
306
  if (typeof o == "function")
306
- return $t(o, kr(o));
307
+ return zt(o, Tr(o));
307
308
  if (typeof o == "string")
308
309
  return je(o);
309
310
  switch (o) {
@@ -315,32 +316,32 @@ function hn() {
315
316
  if (typeof o == "object")
316
317
  switch (o.$$typeof) {
317
318
  case p:
318
- return Ar(o.render);
319
+ return kr(o.render);
319
320
  case c:
320
- return Je(o.type, y, E);
321
+ return et(o.type, y, E);
321
322
  case u: {
322
- var A = o, R = A._payload, I = A._init;
323
+ var A = o, C = A._payload, D = A._init;
323
324
  try {
324
- return Je(I(R), y, E);
325
+ return et(D(C), y, E);
325
326
  } catch {
326
327
  }
327
328
  }
328
329
  }
329
330
  return "";
330
331
  }
331
- var et = Object.prototype.hasOwnProperty, zt = {}, Pt = w.ReactDebugCurrentFrame;
332
- function tt(o) {
332
+ var tt = Object.prototype.hasOwnProperty, Pt = {}, Mt = w.ReactDebugCurrentFrame;
333
+ function rt(o) {
333
334
  if (o) {
334
- var y = o._owner, E = Je(o.type, o._source, y ? y.type : null);
335
- Pt.setExtraStackFrame(E);
335
+ var y = o._owner, E = et(o.type, o._source, y ? y.type : null);
336
+ Mt.setExtraStackFrame(E);
336
337
  } else
337
- Pt.setExtraStackFrame(null);
338
+ Mt.setExtraStackFrame(null);
338
339
  }
339
- function Tr(o, y, E, A, R) {
340
+ function jr(o, y, E, A, C) {
340
341
  {
341
- var I = Function.call.bind(et);
342
+ var D = Function.call.bind(tt);
342
343
  for (var j in o)
343
- if (I(o, j)) {
344
+ if (D(o, j)) {
344
345
  var T = void 0;
345
346
  try {
346
347
  if (typeof o[j] != "function") {
@@ -351,13 +352,13 @@ function hn() {
351
352
  } catch (U) {
352
353
  T = U;
353
354
  }
354
- T && !(T instanceof Error) && (tt(R), S("%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).", A || "React class", E, j, typeof T), tt(null)), T instanceof Error && !(T.message in zt) && (zt[T.message] = !0, tt(R), S("Failed %s type: %s", E, T.message), tt(null));
355
+ T && !(T instanceof Error) && (rt(C), S("%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).", A || "React class", E, j, typeof T), rt(null)), T instanceof Error && !(T.message in Pt) && (Pt[T.message] = !0, rt(C), S("Failed %s type: %s", E, T.message), rt(null));
355
356
  }
356
357
  }
357
358
  }
358
- var jr = Array.isArray;
359
- function yt(o) {
360
- return jr(o);
359
+ var Cr = Array.isArray;
360
+ function St(o) {
361
+ return Cr(o);
361
362
  }
362
363
  function Rr(o) {
363
364
  {
@@ -367,51 +368,51 @@ function hn() {
367
368
  }
368
369
  function Or(o) {
369
370
  try {
370
- return Mt(o), !1;
371
+ return Bt(o), !1;
371
372
  } catch {
372
373
  return !0;
373
374
  }
374
375
  }
375
- function Mt(o) {
376
+ function Bt(o) {
376
377
  return "" + o;
377
378
  }
378
- function Bt(o) {
379
+ function Ut(o) {
379
380
  if (Or(o))
380
- return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Rr(o)), Mt(o);
381
+ return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Rr(o)), Bt(o);
381
382
  }
382
- var Be = w.ReactCurrentOwner, Cr = {
383
+ var Ue = w.ReactCurrentOwner, Ir = {
383
384
  key: !0,
384
385
  ref: !0,
385
386
  __self: !0,
386
387
  __source: !0
387
- }, Ut, Gt, St;
388
- St = {};
388
+ }, Gt, Ht, xt;
389
+ xt = {};
389
390
  function Dr(o) {
390
- if (et.call(o, "ref")) {
391
+ if (tt.call(o, "ref")) {
391
392
  var y = Object.getOwnPropertyDescriptor(o, "ref").get;
392
393
  if (y && y.isReactWarning)
393
394
  return !1;
394
395
  }
395
396
  return o.ref !== void 0;
396
397
  }
397
- function Ir(o) {
398
- if (et.call(o, "key")) {
398
+ function Lr(o) {
399
+ if (tt.call(o, "key")) {
399
400
  var y = Object.getOwnPropertyDescriptor(o, "key").get;
400
401
  if (y && y.isReactWarning)
401
402
  return !1;
402
403
  }
403
404
  return o.key !== void 0;
404
405
  }
405
- function Lr(o, y) {
406
- if (typeof o.ref == "string" && Be.current && y && Be.current.stateNode !== y) {
407
- var E = B(Be.current.type);
408
- St[E] || (S('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', B(Be.current.type), o.ref), St[E] = !0);
406
+ function Fr(o, y) {
407
+ if (typeof o.ref == "string" && Ue.current && y && Ue.current.stateNode !== y) {
408
+ var E = B(Ue.current.type);
409
+ xt[E] || (S('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', B(Ue.current.type), o.ref), xt[E] = !0);
409
410
  }
410
411
  }
411
- function Fr(o, y) {
412
+ function Nr(o, y) {
412
413
  {
413
414
  var E = function() {
414
- Ut || (Ut = !0, S("%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)", y));
415
+ Gt || (Gt = !0, S("%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)", y));
415
416
  };
416
417
  E.isReactWarning = !0, Object.defineProperty(o, "key", {
417
418
  get: E,
@@ -419,10 +420,10 @@ function hn() {
419
420
  });
420
421
  }
421
422
  }
422
- function Nr(o, y) {
423
+ function $r(o, y) {
423
424
  {
424
425
  var E = function() {
425
- Gt || (Gt = !0, S("%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)", y));
426
+ Ht || (Ht = !0, S("%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)", y));
426
427
  };
427
428
  E.isReactWarning = !0, Object.defineProperty(o, "ref", {
428
429
  get: E,
@@ -430,7 +431,7 @@ function hn() {
430
431
  });
431
432
  }
432
433
  }
433
- var $r = function(o, y, E, A, R, I, j) {
434
+ var zr = function(o, y, E, A, C, D, j) {
434
435
  var T = {
435
436
  // This tag allows us to uniquely identify this as a React Element
436
437
  $$typeof: t,
@@ -440,7 +441,7 @@ function hn() {
440
441
  ref: E,
441
442
  props: j,
442
443
  // Record the component responsible for creating this element.
443
- _owner: I
444
+ _owner: D
444
445
  };
445
446
  return T._store = {}, Object.defineProperty(T._store, "validated", {
446
447
  configurable: !1,
@@ -456,44 +457,44 @@ function hn() {
456
457
  configurable: !1,
457
458
  enumerable: !1,
458
459
  writable: !1,
459
- value: R
460
+ value: C
460
461
  }), Object.freeze && (Object.freeze(T.props), Object.freeze(T)), T;
461
462
  };
462
- function zr(o, y, E, A, R) {
463
+ function Pr(o, y, E, A, C) {
463
464
  {
464
- var I, j = {}, T = null, ne = null;
465
- E !== void 0 && (Bt(E), T = "" + E), Ir(y) && (Bt(y.key), T = "" + y.key), Dr(y) && (ne = y.ref, Lr(y, R));
466
- for (I in y)
467
- et.call(y, I) && !Cr.hasOwnProperty(I) && (j[I] = y[I]);
465
+ var D, j = {}, T = null, ne = null;
466
+ E !== void 0 && (Ut(E), T = "" + E), Lr(y) && (Ut(y.key), T = "" + y.key), Dr(y) && (ne = y.ref, Fr(y, C));
467
+ for (D in y)
468
+ tt.call(y, D) && !Ir.hasOwnProperty(D) && (j[D] = y[D]);
468
469
  if (o && o.defaultProps) {
469
470
  var U = o.defaultProps;
470
- for (I in U)
471
- j[I] === void 0 && (j[I] = U[I]);
471
+ for (D in U)
472
+ j[D] === void 0 && (j[D] = U[D]);
472
473
  }
473
474
  if (T || ne) {
474
475
  var Y = typeof o == "function" ? o.displayName || o.name || "Unknown" : o;
475
- T && Fr(j, Y), ne && Nr(j, Y);
476
+ T && Nr(j, Y), ne && $r(j, Y);
476
477
  }
477
- return $r(o, T, ne, R, A, Be.current, j);
478
+ return zr(o, T, ne, C, A, Ue.current, j);
478
479
  }
479
480
  }
480
- var xt = w.ReactCurrentOwner, Ht = w.ReactDebugCurrentFrame;
481
- function Ce(o) {
481
+ var wt = w.ReactCurrentOwner, qt = w.ReactDebugCurrentFrame;
482
+ function Oe(o) {
482
483
  if (o) {
483
- var y = o._owner, E = Je(o.type, o._source, y ? y.type : null);
484
- Ht.setExtraStackFrame(E);
484
+ var y = o._owner, E = et(o.type, o._source, y ? y.type : null);
485
+ qt.setExtraStackFrame(E);
485
486
  } else
486
- Ht.setExtraStackFrame(null);
487
+ qt.setExtraStackFrame(null);
487
488
  }
488
- var wt;
489
- wt = !1;
490
- function Et(o) {
489
+ var Et;
490
+ Et = !1;
491
+ function _t(o) {
491
492
  return typeof o == "object" && o !== null && o.$$typeof === t;
492
493
  }
493
- function qt() {
494
+ function Yt() {
494
495
  {
495
- if (xt.current) {
496
- var o = B(xt.current.type);
496
+ if (wt.current) {
497
+ var o = B(wt.current.type);
497
498
  if (o)
498
499
  return `
499
500
 
@@ -502,7 +503,7 @@ Check the render method of \`` + o + "`.";
502
503
  return "";
503
504
  }
504
505
  }
505
- function Pr(o) {
506
+ function Mr(o) {
506
507
  {
507
508
  if (o !== void 0) {
508
509
  var y = o.fileName.replace(/^.*[\\\/]/, ""), E = o.lineNumber;
@@ -513,10 +514,10 @@ Check your code at ` + y + ":" + E + ".";
513
514
  return "";
514
515
  }
515
516
  }
516
- var Yt = {};
517
- function Mr(o) {
517
+ var Vt = {};
518
+ function Br(o) {
518
519
  {
519
- var y = qt();
520
+ var y = Yt();
520
521
  if (!y) {
521
522
  var E = typeof o == "string" ? o : o.displayName || o.name;
522
523
  E && (y = `
@@ -526,39 +527,39 @@ Check the top-level render call using <` + E + ">.");
526
527
  return y;
527
528
  }
528
529
  }
529
- function Vt(o, y) {
530
+ function Wt(o, y) {
530
531
  {
531
532
  if (!o._store || o._store.validated || o.key != null)
532
533
  return;
533
534
  o._store.validated = !0;
534
- var E = Mr(y);
535
- if (Yt[E])
535
+ var E = Br(y);
536
+ if (Vt[E])
536
537
  return;
537
- Yt[E] = !0;
538
+ Vt[E] = !0;
538
539
  var A = "";
539
- o && o._owner && o._owner !== xt.current && (A = " It was passed a child from " + B(o._owner.type) + "."), Ce(o), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', E, A), Ce(null);
540
+ o && o._owner && o._owner !== wt.current && (A = " It was passed a child from " + B(o._owner.type) + "."), Oe(o), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', E, A), Oe(null);
540
541
  }
541
542
  }
542
- function Wt(o, y) {
543
+ function Kt(o, y) {
543
544
  {
544
545
  if (typeof o != "object")
545
546
  return;
546
- if (yt(o))
547
+ if (St(o))
547
548
  for (var E = 0; E < o.length; E++) {
548
549
  var A = o[E];
549
- Et(A) && Vt(A, y);
550
+ _t(A) && Wt(A, y);
550
551
  }
551
- else if (Et(o))
552
+ else if (_t(o))
552
553
  o._store && (o._store.validated = !0);
553
554
  else if (o) {
554
- var R = x(o);
555
- if (typeof R == "function" && R !== o.entries)
556
- for (var I = R.call(o), j; !(j = I.next()).done; )
557
- Et(j.value) && Vt(j.value, y);
555
+ var C = x(o);
556
+ if (typeof C == "function" && C !== o.entries)
557
+ for (var D = C.call(o), j; !(j = D.next()).done; )
558
+ _t(j.value) && Wt(j.value, y);
558
559
  }
559
560
  }
560
561
  }
561
- function Br(o) {
562
+ function Ur(o) {
562
563
  {
563
564
  var y = o.type;
564
565
  if (y == null || typeof y == "string")
@@ -574,70 +575,70 @@ Check the top-level render call using <` + E + ">.");
574
575
  return;
575
576
  if (E) {
576
577
  var A = B(y);
577
- Tr(E, o.props, "prop", A, o);
578
- } else if (y.PropTypes !== void 0 && !wt) {
579
- wt = !0;
580
- var R = B(y);
581
- S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", R || "Unknown");
578
+ jr(E, o.props, "prop", A, o);
579
+ } else if (y.PropTypes !== void 0 && !Et) {
580
+ Et = !0;
581
+ var C = B(y);
582
+ S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", C || "Unknown");
582
583
  }
583
584
  typeof y.getDefaultProps == "function" && !y.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
584
585
  }
585
586
  }
586
- function Ur(o) {
587
+ function Gr(o) {
587
588
  {
588
589
  for (var y = Object.keys(o.props), E = 0; E < y.length; E++) {
589
590
  var A = y[E];
590
591
  if (A !== "children" && A !== "key") {
591
- Ce(o), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", A), Ce(null);
592
+ Oe(o), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", A), Oe(null);
592
593
  break;
593
594
  }
594
595
  }
595
- o.ref !== null && (Ce(o), S("Invalid attribute `ref` supplied to `React.Fragment`."), Ce(null));
596
+ o.ref !== null && (Oe(o), S("Invalid attribute `ref` supplied to `React.Fragment`."), Oe(null));
596
597
  }
597
598
  }
598
- function Kt(o, y, E, A, R, I) {
599
+ function Zt(o, y, E, A, C, D) {
599
600
  {
600
601
  var j = te(o);
601
602
  if (!j) {
602
603
  var T = "";
603
604
  (o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (T += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
604
- var ne = Pr(R);
605
- ne ? T += ne : T += qt();
605
+ var ne = Mr(C);
606
+ ne ? T += ne : T += Yt();
606
607
  var U;
607
- o === null ? U = "null" : yt(o) ? U = "array" : o !== void 0 && o.$$typeof === t ? (U = "<" + (B(o.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : U = typeof o, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", U, T);
608
+ o === null ? U = "null" : St(o) ? U = "array" : o !== void 0 && o.$$typeof === t ? (U = "<" + (B(o.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : U = typeof o, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", U, T);
608
609
  }
609
- var Y = zr(o, y, E, R, I);
610
+ var Y = Pr(o, y, E, C, D);
610
611
  if (Y == null)
611
612
  return Y;
612
613
  if (j) {
613
614
  var se = y.children;
614
615
  if (se !== void 0)
615
616
  if (A)
616
- if (yt(se)) {
617
- for (var De = 0; De < se.length; De++)
618
- Wt(se[De], o);
617
+ if (St(se)) {
618
+ for (var Ie = 0; Ie < se.length; Ie++)
619
+ Kt(se[Ie], o);
619
620
  Object.freeze && Object.freeze(se);
620
621
  } else
621
622
  S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
622
623
  else
623
- Wt(se, o);
624
+ Kt(se, o);
624
625
  }
625
- return o === n ? Ur(Y) : Br(Y), Y;
626
+ return o === n ? Gr(Y) : Ur(Y), Y;
626
627
  }
627
628
  }
628
- function Gr(o, y, E) {
629
- return Kt(o, y, E, !0);
630
- }
631
629
  function Hr(o, y, E) {
632
- return Kt(o, y, E, !1);
630
+ return Zt(o, y, E, !0);
633
631
  }
634
- var qr = Hr, Yr = Gr;
635
- Ge.Fragment = n, Ge.jsx = qr, Ge.jsxs = Yr;
636
- }()), Ge;
632
+ function qr(o, y, E) {
633
+ return Zt(o, y, E, !1);
634
+ }
635
+ var Yr = qr, Vr = Hr;
636
+ He.Fragment = n, He.jsx = Yr, He.jsxs = Vr;
637
+ }()), He;
637
638
  }
638
- process.env.NODE_ENV === "production" ? jt.exports = gn() : jt.exports = hn();
639
- var a = jt.exports;
640
- function mn(e) {
639
+ process.env.NODE_ENV === "production" ? Ct.exports = mn() : Ct.exports = bn();
640
+ var a = Ct.exports;
641
+ function vn(e) {
641
642
  e = e || {};
642
643
  const t = Object.keys(e).sort(), r = [];
643
644
  for (let n = 0; n < t.length; n++) {
@@ -654,11 +655,11 @@ function mn(e) {
654
655
  }
655
656
  return r.sort().join("&");
656
657
  }
657
- function bn(e, t) {
658
- let r = mn(e);
659
- return r += "&key=" + t, an.MD5(r).toString().toUpperCase();
658
+ function yn(e, t) {
659
+ let r = vn(e);
660
+ return r += "&key=" + t, sn.MD5(r).toString().toUpperCase();
660
661
  }
661
- class vn {
662
+ class Sn {
662
663
  constructor() {
663
664
  this.type = "default_api_client", this.baseURL = "http://localhost:31200", this.app_id = "", this.app_secret = "";
664
665
  }
@@ -669,7 +670,7 @@ class vn {
669
670
  return {
670
671
  app_id: this.app_id,
671
672
  nonce_str: r,
672
- sign: bn({
673
+ sign: yn({
673
674
  app_id: this.app_id,
674
675
  nonce_str: r,
675
676
  ...t
@@ -679,7 +680,10 @@ class vn {
679
680
  getRequest(t, r) {
680
681
  return (n, i, s, l) => {
681
682
  const d = this.buildHeader(s), p = this.buildAxiosConfig(t, n, i, s, d, r);
682
- return sn(p).then((f) => l ? f : f.data).catch((f) => Promise.reject(f));
683
+ return ln(p).then((f) => l ? f : f.data).catch((f) => {
684
+ const h = on.get(f, "response.data.detail.message", f.message);
685
+ return Promise.reject(new Error(h));
686
+ });
683
687
  };
684
688
  }
685
689
  get(t) {
@@ -712,7 +716,7 @@ class vn {
712
716
  };
713
717
  }
714
718
  }
715
- class yn {
719
+ class xn {
716
720
  constructor(t) {
717
721
  this.implementation = t;
718
722
  }
@@ -729,11 +733,11 @@ class yn {
729
733
  return this.getRequest("PUT", t);
730
734
  }
731
735
  }
732
- const Ye = new vn(), Sn = new yn(Ye), G = Sn;
733
- function Xe(e) {
734
- Ye.baseURL !== e.apiBaseURL && (Ye.baseURL = e.apiBaseURL), e.app_id && (Ye.app_id = e.app_id), e.app_secret && (Ye.app_secret = e.app_secret);
736
+ const Ve = new Sn(), wn = new xn(Ve), G = wn;
737
+ function Qe(e) {
738
+ Ve.baseURL !== e.apiBaseURL && (Ve.baseURL = e.apiBaseURL), e.app_id && (Ve.app_id = e.app_id), e.app_secret && (Ve.app_secret = e.app_secret);
735
739
  }
736
- const xn = {
740
+ const En = {
737
741
  login: async (e, t) => {
738
742
  const r = {
739
743
  name: e,
@@ -789,7 +793,7 @@ const xn = {
789
793
  id: e
790
794
  }, {});
791
795
  }
792
- }, wn = {
796
+ }, _n = {
793
797
  list: async () => await G.post()("/api/key/list", {
794
798
  filter: {
795
799
  search: ""
@@ -813,7 +817,7 @@ const xn = {
813
817
  id: e
814
818
  }, {});
815
819
  }
816
- }, En = {
820
+ }, An = {
817
821
  list: async () => await G.post()("/datasource/list", {
818
822
  filter: {},
819
823
  sort: [{
@@ -839,11 +843,11 @@ const xn = {
839
843
  id: e
840
844
  }, {});
841
845
  }
842
- }, _n = {
846
+ }, kn = {
843
847
  list: async () => await G.get()("/role/list", {}, {})
844
848
  };
845
- var pr = 60, fr = pr * 60, gr = fr * 24, An = gr * 7, ze = 1e3, kt = pr * ze, Jt = fr * ze, kn = gr * ze, Tn = An * ze, It = "millisecond", Le = "second", Fe = "minute", Ne = "hour", ve = "day", nt = "week", le = "month", hr = "quarter", ye = "year", $e = "date", jn = "YYYY-MM-DDTHH:mm:ssZ", er = "Invalid Date", Rn = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, On = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g;
846
- const Cn = {
849
+ var fr = 60, gr = fr * 60, hr = gr * 24, Tn = hr * 7, ze = 1e3, Tt = fr * ze, er = gr * ze, jn = hr * ze, Cn = Tn * ze, Lt = "millisecond", Le = "second", Fe = "minute", Ne = "hour", ve = "day", at = "week", le = "month", mr = "quarter", ye = "year", $e = "date", Rn = "YYYY-MM-DDTHH:mm:ssZ", tr = "Invalid Date", On = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, In = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g;
850
+ const Dn = {
847
851
  name: "en",
848
852
  weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),
849
853
  months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"),
@@ -855,49 +859,49 @@ const Cn = {
855
859
  var Rt = function(t, r, n) {
856
860
  var i = String(t);
857
861
  return !i || i.length >= r ? t : "" + Array(r + 1 - i.length).join(n) + t;
858
- }, Dn = function(t) {
862
+ }, Ln = function(t) {
859
863
  var r = -t.utcOffset(), n = Math.abs(r), i = Math.floor(n / 60), s = n % 60;
860
864
  return (r <= 0 ? "+" : "-") + Rt(i, 2, "0") + ":" + Rt(s, 2, "0");
861
- }, In = function e(t, r) {
865
+ }, Fn = function e(t, r) {
862
866
  if (t.date() < r.date())
863
867
  return -e(r, t);
864
868
  var n = (r.year() - t.year()) * 12 + (r.month() - t.month()), i = t.clone().add(n, le), s = r - i < 0, l = t.clone().add(n + (s ? -1 : 1), le);
865
869
  return +(-(n + (r - i) / (s ? i - l : l - i)) || 0);
866
- }, Ln = function(t) {
870
+ }, Nn = function(t) {
867
871
  return t < 0 ? Math.ceil(t) || 0 : Math.floor(t);
868
- }, Fn = function(t) {
872
+ }, $n = function(t) {
869
873
  var r = {
870
874
  M: le,
871
875
  y: ye,
872
- w: nt,
876
+ w: at,
873
877
  d: ve,
874
878
  D: $e,
875
879
  h: Ne,
876
880
  m: Fe,
877
881
  s: Le,
878
- ms: It,
879
- Q: hr
882
+ ms: Lt,
883
+ Q: mr
880
884
  };
881
885
  return r[t] || String(t || "").toLowerCase().replace(/s$/, "");
882
- }, Nn = function(t) {
886
+ }, zn = function(t) {
883
887
  return t === void 0;
884
888
  };
885
- const $n = {
889
+ const Pn = {
886
890
  s: Rt,
887
- z: Dn,
888
- m: In,
889
- a: Ln,
890
- p: Fn,
891
- u: Nn
891
+ z: Ln,
892
+ m: Fn,
893
+ a: Nn,
894
+ p: $n,
895
+ u: zn
892
896
  };
893
- var We = "en", Ae = {};
894
- Ae[We] = Cn;
895
- var Lt = function(t) {
896
- return t instanceof bt;
897
- }, it = function e(t, r, n) {
897
+ var Ke = "en", Ae = {};
898
+ Ae[Ke] = Dn;
899
+ var Ft = function(t) {
900
+ return t instanceof vt;
901
+ }, st = function e(t, r, n) {
898
902
  var i;
899
903
  if (!t)
900
- return We;
904
+ return Ke;
901
905
  if (typeof t == "string") {
902
906
  var s = t.toLowerCase();
903
907
  Ae[s] && (i = s), r && (Ae[s] = r, i = s);
@@ -908,13 +912,13 @@ var Lt = function(t) {
908
912
  var d = t.name;
909
913
  Ae[d] = t, i = d;
910
914
  }
911
- return !n && i && (We = i), i || !n && We;
915
+ return !n && i && (Ke = i), i || !n && Ke;
912
916
  }, K = function(t, r) {
913
- if (Lt(t))
917
+ if (Ft(t))
914
918
  return t.clone();
915
919
  var n = typeof r == "object" ? r : {};
916
- return n.date = t, n.args = arguments, new bt(n);
917
- }, zn = function(t, r) {
920
+ return n.date = t, n.args = arguments, new vt(n);
921
+ }, Mn = function(t, r) {
918
922
  return K(t, {
919
923
  locale: r.$L,
920
924
  utc: r.$u,
@@ -922,40 +926,40 @@ var Lt = function(t) {
922
926
  $offset: r.$offset
923
927
  // todo: refactor; do not use this.$offset in you code
924
928
  });
925
- }, C = $n;
926
- C.l = it;
927
- C.i = Lt;
928
- C.w = zn;
929
- var Pn = function(t) {
929
+ }, O = Pn;
930
+ O.l = st;
931
+ O.i = Ft;
932
+ O.w = Mn;
933
+ var Bn = function(t) {
930
934
  var r = t.date, n = t.utc;
931
935
  if (r === null)
932
936
  return /* @__PURE__ */ new Date(NaN);
933
- if (C.u(r))
937
+ if (O.u(r))
934
938
  return /* @__PURE__ */ new Date();
935
939
  if (r instanceof Date)
936
940
  return new Date(r);
937
941
  if (typeof r == "string" && !/Z$/i.test(r)) {
938
- var i = r.match(Rn);
942
+ var i = r.match(On);
939
943
  if (i) {
940
944
  var s = i[2] - 1 || 0, l = (i[7] || "0").substring(0, 3);
941
945
  return n ? new Date(Date.UTC(i[1], s, i[3] || 1, i[4] || 0, i[5] || 0, i[6] || 0, l)) : new Date(i[1], s, i[3] || 1, i[4] || 0, i[5] || 0, i[6] || 0, l);
942
946
  }
943
947
  }
944
948
  return new Date(r);
945
- }, bt = /* @__PURE__ */ function() {
949
+ }, vt = /* @__PURE__ */ function() {
946
950
  function e(r) {
947
- this.$L = it(r.locale, null, !0), this.parse(r);
951
+ this.$L = st(r.locale, null, !0), this.parse(r);
948
952
  }
949
953
  var t = e.prototype;
950
954
  return t.parse = function(n) {
951
- this.$d = Pn(n), this.$x = n.x || {}, this.init();
955
+ this.$d = Bn(n), this.$x = n.x || {}, this.init();
952
956
  }, t.init = function() {
953
957
  var n = this.$d;
954
958
  this.$y = n.getFullYear(), this.$M = n.getMonth(), this.$D = n.getDate(), this.$W = n.getDay(), this.$H = n.getHours(), this.$m = n.getMinutes(), this.$s = n.getSeconds(), this.$ms = n.getMilliseconds();
955
959
  }, t.$utils = function() {
956
- return C;
960
+ return O;
957
961
  }, t.isValid = function() {
958
- return this.$d.toString() !== er;
962
+ return this.$d.toString() !== tr;
959
963
  }, t.isSame = function(n, i) {
960
964
  var s = K(n);
961
965
  return this.startOf(i) <= s && s <= this.endOf(i);
@@ -964,18 +968,18 @@ var Pn = function(t) {
964
968
  }, t.isBefore = function(n, i) {
965
969
  return this.endOf(i) < K(n);
966
970
  }, t.$g = function(n, i, s) {
967
- return C.u(n) ? this[i] : this.set(s, n);
971
+ return O.u(n) ? this[i] : this.set(s, n);
968
972
  }, t.unix = function() {
969
973
  return Math.floor(this.valueOf() / 1e3);
970
974
  }, t.valueOf = function() {
971
975
  return this.$d.getTime();
972
976
  }, t.startOf = function(n, i) {
973
- var s = this, l = C.u(i) ? !0 : i, d = C.p(n), p = function(w, S) {
974
- var _ = C.w(s.$u ? Date.UTC(s.$y, S, w) : new Date(s.$y, S, w), s);
977
+ var s = this, l = O.u(i) ? !0 : i, d = O.p(n), p = function(w, S) {
978
+ var _ = O.w(s.$u ? Date.UTC(s.$y, S, w) : new Date(s.$y, S, w), s);
975
979
  return l ? _ : _.endOf(ve);
976
980
  }, f = function(w, S) {
977
981
  var _ = [0, 0, 0, 0], k = [23, 59, 59, 999];
978
- return C.w(s.toDate()[w].apply(
982
+ return O.w(s.toDate()[w].apply(
979
983
  // eslint-disable-line prefer-spread
980
984
  s.toDate("s"),
981
985
  (l ? _ : k).slice(S)
@@ -986,7 +990,7 @@ var Pn = function(t) {
986
990
  return l ? p(1, 0) : p(31, 11);
987
991
  case le:
988
992
  return l ? p(1, c) : p(0, c + 1);
989
- case nt: {
993
+ case at: {
990
994
  var v = this.$locale().weekStart || 0, m = (h < v ? h + 7 : h) - v;
991
995
  return p(l ? u - m : u + (6 - m), c);
992
996
  }
@@ -1005,7 +1009,7 @@ var Pn = function(t) {
1005
1009
  }, t.endOf = function(n) {
1006
1010
  return this.startOf(n, !1);
1007
1011
  }, t.$set = function(n, i) {
1008
- var s, l = C.p(n), d = "set" + (this.$u ? "UTC" : ""), p = (s = {}, s[ve] = d + "Date", s[$e] = d + "Date", s[le] = d + "Month", s[ye] = d + "FullYear", s[Ne] = d + "Hours", s[Fe] = d + "Minutes", s[Le] = d + "Seconds", s[It] = d + "Milliseconds", s)[l], f = l === ve ? this.$D + (i - this.$W) : i;
1012
+ var s, l = O.p(n), d = "set" + (this.$u ? "UTC" : ""), p = (s = {}, s[ve] = d + "Date", s[$e] = d + "Date", s[le] = d + "Month", s[ye] = d + "FullYear", s[Ne] = d + "Hours", s[Fe] = d + "Minutes", s[Le] = d + "Seconds", s[Lt] = d + "Milliseconds", s)[l], f = l === ve ? this.$D + (i - this.$W) : i;
1009
1013
  if (l === le || l === ye) {
1010
1014
  var h = this.clone().set($e, 1);
1011
1015
  h.$d[p](f), h.init(), this.$d = h.set($e, Math.min(this.$D, h.daysInMonth())).$d;
@@ -1015,13 +1019,13 @@ var Pn = function(t) {
1015
1019
  }, t.set = function(n, i) {
1016
1020
  return this.clone().$set(n, i);
1017
1021
  }, t.get = function(n) {
1018
- return this[C.p(n)]();
1022
+ return this[O.p(n)]();
1019
1023
  }, t.add = function(n, i) {
1020
1024
  var s = this, l;
1021
1025
  n = Number(n);
1022
- var d = C.p(i), p = function(u) {
1026
+ var d = O.p(i), p = function(u) {
1023
1027
  var g = K(s);
1024
- return C.w(g.date(g.date() + Math.round(u * n)), s);
1028
+ return O.w(g.date(g.date() + Math.round(u * n)), s);
1025
1029
  };
1026
1030
  if (d === le)
1027
1031
  return this.set(le, this.$M + n);
@@ -1029,20 +1033,20 @@ var Pn = function(t) {
1029
1033
  return this.set(ye, this.$y + n);
1030
1034
  if (d === ve)
1031
1035
  return p(1);
1032
- if (d === nt)
1036
+ if (d === at)
1033
1037
  return p(7);
1034
- var f = (l = {}, l[Fe] = kt, l[Ne] = Jt, l[Le] = ze, l)[d] || 1, h = this.$d.getTime() + n * f;
1035
- return C.w(h, this);
1038
+ var f = (l = {}, l[Fe] = Tt, l[Ne] = er, l[Le] = ze, l)[d] || 1, h = this.$d.getTime() + n * f;
1039
+ return O.w(h, this);
1036
1040
  }, t.subtract = function(n, i) {
1037
1041
  return this.add(n * -1, i);
1038
1042
  }, t.format = function(n) {
1039
1043
  var i = this, s = this.$locale();
1040
1044
  if (!this.isValid())
1041
- return s.invalidDate || er;
1042
- var l = n || jn, d = C.z(this), p = this.$H, f = this.$m, h = this.$M, c = s.weekdays, u = s.months, g = s.meridiem, v = function(_, k, H, J) {
1045
+ return s.invalidDate || tr;
1046
+ var l = n || Rn, d = O.z(this), p = this.$H, f = this.$m, h = this.$M, c = s.weekdays, u = s.months, g = s.meridiem, v = function(_, k, H, J) {
1043
1047
  return _ && (_[k] || _(i, l)) || H[k].slice(0, J);
1044
1048
  }, m = function(_) {
1045
- return C.s(p % 12 || 12, _, "0");
1049
+ return O.s(p % 12 || 12, _, "0");
1046
1050
  }, x = g || function(S, _, k) {
1047
1051
  var H = S < 12 ? "AM" : "PM";
1048
1052
  return k ? H.toLowerCase() : H;
@@ -1051,11 +1055,11 @@ var Pn = function(t) {
1051
1055
  case "YY":
1052
1056
  return String(i.$y).slice(-2);
1053
1057
  case "YYYY":
1054
- return C.s(i.$y, 4, "0");
1058
+ return O.s(i.$y, 4, "0");
1055
1059
  case "M":
1056
1060
  return h + 1;
1057
1061
  case "MM":
1058
- return C.s(h + 1, 2, "0");
1062
+ return O.s(h + 1, 2, "0");
1059
1063
  case "MMM":
1060
1064
  return v(s.monthsShort, h, u, 3);
1061
1065
  case "MMMM":
@@ -1063,7 +1067,7 @@ var Pn = function(t) {
1063
1067
  case "D":
1064
1068
  return i.$D;
1065
1069
  case "DD":
1066
- return C.s(i.$D, 2, "0");
1070
+ return O.s(i.$D, 2, "0");
1067
1071
  case "d":
1068
1072
  return String(i.$W);
1069
1073
  case "dd":
@@ -1075,7 +1079,7 @@ var Pn = function(t) {
1075
1079
  case "H":
1076
1080
  return String(p);
1077
1081
  case "HH":
1078
- return C.s(p, 2, "0");
1082
+ return O.s(p, 2, "0");
1079
1083
  case "h":
1080
1084
  return m(1);
1081
1085
  case "hh":
@@ -1087,26 +1091,26 @@ var Pn = function(t) {
1087
1091
  case "m":
1088
1092
  return String(f);
1089
1093
  case "mm":
1090
- return C.s(f, 2, "0");
1094
+ return O.s(f, 2, "0");
1091
1095
  case "s":
1092
1096
  return String(i.$s);
1093
1097
  case "ss":
1094
- return C.s(i.$s, 2, "0");
1098
+ return O.s(i.$s, 2, "0");
1095
1099
  case "SSS":
1096
- return C.s(i.$ms, 3, "0");
1100
+ return O.s(i.$ms, 3, "0");
1097
1101
  case "Z":
1098
1102
  return d;
1099
1103
  }
1100
1104
  return null;
1101
1105
  };
1102
- return l.replace(On, function(S, _) {
1106
+ return l.replace(In, function(S, _) {
1103
1107
  return _ || w(S) || d.replace(":", "");
1104
1108
  });
1105
1109
  }, t.utcOffset = function() {
1106
1110
  return -Math.round(this.$d.getTimezoneOffset() / 15) * 15;
1107
1111
  }, t.diff = function(n, i, s) {
1108
- var l = this, d = C.p(i), p = K(n), f = (p.utcOffset() - this.utcOffset()) * kt, h = this - p, c = function() {
1109
- return C.m(l, p);
1112
+ var l = this, d = O.p(i), p = K(n), f = (p.utcOffset() - this.utcOffset()) * Tt, h = this - p, c = function() {
1113
+ return O.m(l, p);
1110
1114
  }, u;
1111
1115
  switch (d) {
1112
1116
  case ye:
@@ -1115,20 +1119,20 @@ var Pn = function(t) {
1115
1119
  case le:
1116
1120
  u = c();
1117
1121
  break;
1118
- case hr:
1122
+ case mr:
1119
1123
  u = c() / 3;
1120
1124
  break;
1121
- case nt:
1122
- u = (h - f) / Tn;
1125
+ case at:
1126
+ u = (h - f) / Cn;
1123
1127
  break;
1124
1128
  case ve:
1125
- u = (h - f) / kn;
1129
+ u = (h - f) / jn;
1126
1130
  break;
1127
1131
  case Ne:
1128
- u = h / Jt;
1132
+ u = h / er;
1129
1133
  break;
1130
1134
  case Fe:
1131
- u = h / kt;
1135
+ u = h / Tt;
1132
1136
  break;
1133
1137
  case Le:
1134
1138
  u = h / ze;
@@ -1137,7 +1141,7 @@ var Pn = function(t) {
1137
1141
  u = h;
1138
1142
  break;
1139
1143
  }
1140
- return s ? u : C.a(u);
1144
+ return s ? u : O.a(u);
1141
1145
  }, t.daysInMonth = function() {
1142
1146
  return this.endOf(le).$D;
1143
1147
  }, t.$locale = function() {
@@ -1145,10 +1149,10 @@ var Pn = function(t) {
1145
1149
  }, t.locale = function(n, i) {
1146
1150
  if (!n)
1147
1151
  return this.$L;
1148
- var s = this.clone(), l = it(n, i, !0);
1152
+ var s = this.clone(), l = st(n, i, !0);
1149
1153
  return l && (s.$L = l), s;
1150
1154
  }, t.clone = function() {
1151
- return C.w(this.$d, this);
1155
+ return O.w(this.$d, this);
1152
1156
  }, t.toDate = function() {
1153
1157
  return new Date(this.valueOf());
1154
1158
  }, t.toJSON = function() {
@@ -1158,25 +1162,25 @@ var Pn = function(t) {
1158
1162
  }, t.toString = function() {
1159
1163
  return this.$d.toUTCString();
1160
1164
  }, e;
1161
- }(), mr = bt.prototype;
1162
- K.prototype = mr;
1163
- [["$ms", It], ["$s", Le], ["$m", Fe], ["$H", Ne], ["$W", ve], ["$M", le], ["$y", ye], ["$D", $e]].forEach(function(e) {
1164
- mr[e[1]] = function(t) {
1165
+ }(), br = vt.prototype;
1166
+ K.prototype = br;
1167
+ [["$ms", Lt], ["$s", Le], ["$m", Fe], ["$H", Ne], ["$W", ve], ["$M", le], ["$y", ye], ["$D", $e]].forEach(function(e) {
1168
+ br[e[1]] = function(t) {
1165
1169
  return this.$g(t, e[0], e[1]);
1166
1170
  };
1167
1171
  });
1168
1172
  K.extend = function(e, t) {
1169
- return e.$i || (e(t, bt, K), e.$i = !0), K;
1173
+ return e.$i || (e(t, vt, K), e.$i = !0), K;
1170
1174
  };
1171
- K.locale = it;
1172
- K.isDayjs = Lt;
1175
+ K.locale = st;
1176
+ K.isDayjs = Ft;
1173
1177
  K.unix = function(e) {
1174
1178
  return K(e * 1e3);
1175
1179
  };
1176
- K.en = Ae[We];
1180
+ K.en = Ae[Ke];
1177
1181
  K.Ls = Ae;
1178
1182
  K.p = {};
1179
- const Mn = {
1183
+ const Un = {
1180
1184
  list: async ({
1181
1185
  pagination: e
1182
1186
  }, t) => {
@@ -1200,11 +1204,11 @@ const Mn = {
1200
1204
  id: e
1201
1205
  }, {})
1202
1206
  }, Z = {
1203
- datasource: En,
1204
- account: xn,
1205
- role: _n,
1206
- api_key: wn,
1207
- sql_snippet: Mn
1207
+ datasource: An,
1208
+ account: En,
1209
+ role: kn,
1210
+ api_key: _n,
1211
+ sql_snippet: Un
1208
1212
  }, de = {
1209
1213
  size: "sm",
1210
1214
  spacing: "md",
@@ -1212,7 +1216,7 @@ const Mn = {
1212
1216
  size: "xs"
1213
1217
  }
1214
1218
  };
1215
- function Bn({
1219
+ function Gn({
1216
1220
  submit: e,
1217
1221
  styles: t = de,
1218
1222
  type: r
@@ -1234,41 +1238,41 @@ function Bn({
1234
1238
  }
1235
1239
  }
1236
1240
  });
1237
- return Ct(() => {
1241
+ return It(() => {
1238
1242
  i("type", r);
1239
1243
  }, [i, r]), /* @__PURE__ */ a.jsx(X, { mx: "auto", children: /* @__PURE__ */ a.jsxs("form", { onSubmit: s(e), children: [
1240
- /* @__PURE__ */ a.jsx(O, { name: "key", control: n, render: ({
1244
+ /* @__PURE__ */ a.jsx(R, { name: "key", control: n, render: ({
1241
1245
  field: l
1242
1246
  }) => /* @__PURE__ */ a.jsx(Q, { mb: t.spacing, size: t.size, required: !0, label: "Name", placeholder: "A unique name", ...l }) }),
1243
- /* @__PURE__ */ a.jsx(ct, { label: "Connection Info", labelPosition: "center" }),
1247
+ /* @__PURE__ */ a.jsx(dt, { label: "Connection Info", labelPosition: "center" }),
1244
1248
  /* @__PURE__ */ a.jsxs(z, { grow: !0, children: [
1245
- /* @__PURE__ */ a.jsx(O, { name: "config.host", control: n, render: ({
1249
+ /* @__PURE__ */ a.jsx(R, { name: "config.host", control: n, render: ({
1246
1250
  field: l
1247
1251
  }) => /* @__PURE__ */ a.jsx(Q, { mb: t.spacing, size: t.size, required: !0, label: "Host", sx: {
1248
1252
  flexGrow: 1
1249
1253
  }, ...l }) }),
1250
- /* @__PURE__ */ a.jsx(O, { name: "config.port", control: n, render: ({
1254
+ /* @__PURE__ */ a.jsx(R, { name: "config.port", control: n, render: ({
1251
1255
  field: l
1252
1256
  }) => (
1253
1257
  // @ts-expect-error type of onChange
1254
- /* @__PURE__ */ a.jsx(Wr, { mb: t.spacing, size: t.size, required: !0, label: "Port", hideControls: !0, sx: {
1258
+ /* @__PURE__ */ a.jsx(Kr, { mb: t.spacing, size: t.size, required: !0, label: "Port", hideControls: !0, sx: {
1255
1259
  width: "8em"
1256
1260
  }, ...l })
1257
1261
  ) })
1258
1262
  ] }),
1259
- /* @__PURE__ */ a.jsx(O, { name: "config.username", control: n, render: ({
1263
+ /* @__PURE__ */ a.jsx(R, { name: "config.username", control: n, render: ({
1260
1264
  field: l
1261
1265
  }) => /* @__PURE__ */ a.jsx(Q, { mb: t.spacing, size: t.size, required: !0, label: "Username", ...l }) }),
1262
- /* @__PURE__ */ a.jsx(O, { name: "config.password", control: n, render: ({
1266
+ /* @__PURE__ */ a.jsx(R, { name: "config.password", control: n, render: ({
1263
1267
  field: l
1264
- }) => /* @__PURE__ */ a.jsx(dt, { mb: t.spacing, size: t.size, required: !0, label: "Password", ...l }) }),
1265
- /* @__PURE__ */ a.jsx(O, { name: "config.database", control: n, render: ({
1268
+ }) => /* @__PURE__ */ a.jsx(pt, { mb: t.spacing, size: t.size, required: !0, label: "Password", ...l }) }),
1269
+ /* @__PURE__ */ a.jsx(R, { name: "config.database", control: n, render: ({
1266
1270
  field: l
1267
1271
  }) => /* @__PURE__ */ a.jsx(Q, { mb: t.spacing, size: t.size, required: !0, label: "Database", ...l }) }),
1268
- /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(D, { type: "submit", size: t.button.size, children: "Save" }) })
1272
+ /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(I, { type: "submit", color: "green", leftIcon: /* @__PURE__ */ a.jsx(Pe, { size: 16 }), size: t.button.size, children: "Submit" }) })
1269
1273
  ] }) });
1270
1274
  }
1271
- const Un = ({
1275
+ const Hn = ({
1272
1276
  value: e,
1273
1277
  onChange: t
1274
1278
  }) => {
@@ -1277,12 +1281,12 @@ const Un = ({
1277
1281
  };
1278
1282
  return /* @__PURE__ */ a.jsx(X, { sx: {
1279
1283
  position: "relative"
1280
- }, children: /* @__PURE__ */ a.jsx(cr, { height: "500px", defaultLanguage: "javascript", value: e, onChange: r, theme: "vs-dark", options: {
1284
+ }, children: /* @__PURE__ */ a.jsx(pr, { height: "500px", defaultLanguage: "javascript", value: e, onChange: r, theme: "vs-dark", options: {
1281
1285
  minimap: {
1282
1286
  enabled: !1
1283
1287
  }
1284
1288
  } }) });
1285
- }, st = ut(({
1289
+ }, ot = ct(({
1286
1290
  value: e,
1287
1291
  onChange: t,
1288
1292
  label: r,
@@ -1293,37 +1297,37 @@ const Un = ({
1293
1297
  const [d, {
1294
1298
  setTrue: p,
1295
1299
  setFalse: f
1296
- }] = on(), [h, c] = or(e), u = () => {
1300
+ }] = fn(), [h, c] = lr(e), u = () => {
1297
1301
  f(), t(h);
1298
1302
  }, g = () => {
1299
1303
  f(), c(e);
1300
1304
  }, v = () => {
1301
1305
  c(i);
1302
1306
  };
1303
- return Ct(() => {
1307
+ return It(() => {
1304
1308
  c(e);
1305
1309
  }, [e]), /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1306
- /* @__PURE__ */ a.jsx(D, { variant: "filled", size: s.button.size, onClick: p, sx: {
1310
+ /* @__PURE__ */ a.jsx(I, { variant: "filled", size: s.button.size, onClick: p, sx: {
1307
1311
  flexGrow: 1
1308
1312
  }, children: r }),
1309
- /* @__PURE__ */ a.jsx(xe, { size: 800, title: n, opened: d, onClose: f, closeOnClickOutside: !1, withCloseButton: !1, children: d && /* @__PURE__ */ a.jsxs(Ke, { children: [
1310
- /* @__PURE__ */ a.jsx(Un, { value: h, onChange: c }),
1313
+ /* @__PURE__ */ a.jsx(xe, { size: 800, title: n, opened: d, onClose: f, closeOnClickOutside: !1, withCloseButton: !1, children: d && /* @__PURE__ */ a.jsxs(Ze, { children: [
1314
+ /* @__PURE__ */ a.jsx(Hn, { value: h, onChange: c }),
1311
1315
  /* @__PURE__ */ a.jsxs(z, { position: "apart", children: [
1312
- /* @__PURE__ */ a.jsx(D, { onClick: v, color: "red", leftIcon: /* @__PURE__ */ a.jsx(tn, { size: 20 }), children: "Reset" }),
1316
+ /* @__PURE__ */ a.jsx(I, { onClick: v, color: "red", leftIcon: /* @__PURE__ */ a.jsx(rn, { size: 20 }), children: "Reset" }),
1313
1317
  /* @__PURE__ */ a.jsxs(z, { position: "right", children: [
1314
- /* @__PURE__ */ a.jsx(D, { onClick: g, variant: "subtle", children: "Cancel" }),
1315
- /* @__PURE__ */ a.jsx(D, { onClick: u, children: "OK" })
1318
+ /* @__PURE__ */ a.jsx(I, { onClick: g, variant: "subtle", children: "Cancel" }),
1319
+ /* @__PURE__ */ a.jsx(I, { onClick: u, children: "OK" })
1316
1320
  ] })
1317
1321
  ] })
1318
1322
  ] }) })
1319
1323
  ] });
1320
- }), rt = {
1324
+ }), nt = {
1321
1325
  pre: ["function pre_process({ method, url, params, headers, data }, utils) {", " // your code goes here", " return { method, url, params, headers, data }", "}"].join(`
1322
1326
  `),
1323
1327
  post: ["function post_process(res, utils) {", " // your code goes here", " return data", "}"].join(`
1324
1328
  `)
1325
1329
  };
1326
- function Gn({
1330
+ function qn({
1327
1331
  submit: e,
1328
1332
  styles: t = de
1329
1333
  }) {
@@ -1338,47 +1342,47 @@ function Gn({
1338
1342
  config: {
1339
1343
  host: "",
1340
1344
  processing: {
1341
- pre: rt.pre,
1342
- post: rt.post
1345
+ pre: nt.pre,
1346
+ post: nt.post
1343
1347
  }
1344
1348
  }
1345
1349
  }
1346
1350
  });
1347
1351
  return /* @__PURE__ */ a.jsx(X, { mx: "auto", children: /* @__PURE__ */ a.jsxs("form", { onSubmit: i(e), children: [
1348
- /* @__PURE__ */ a.jsx(O, { name: "key", control: r, render: ({
1352
+ /* @__PURE__ */ a.jsx(R, { name: "key", control: r, render: ({
1349
1353
  field: s
1350
1354
  }) => /* @__PURE__ */ a.jsx(Q, { mb: t.spacing, size: t.size, required: !0, label: "Name", placeholder: "A unique name", ...s }) }),
1351
- /* @__PURE__ */ a.jsx(ct, { label: "Connection Info", labelPosition: "center" }),
1352
- /* @__PURE__ */ a.jsx(O, { name: "config.host", control: r, render: ({
1355
+ /* @__PURE__ */ a.jsx(dt, { label: "Connection Info", labelPosition: "center" }),
1356
+ /* @__PURE__ */ a.jsx(R, { name: "config.host", control: r, render: ({
1353
1357
  field: s
1354
1358
  }) => /* @__PURE__ */ a.jsx(Q, { mb: t.spacing, size: t.size, label: "Base URL", sx: {
1355
1359
  flexGrow: 1
1356
1360
  }, ...s }) }),
1357
1361
  /* @__PURE__ */ a.jsxs(z, { grow: !0, children: [
1358
- /* @__PURE__ */ a.jsx(O, { name: "config.processing.pre", control: r, render: ({
1362
+ /* @__PURE__ */ a.jsx(R, { name: "config.processing.pre", control: r, render: ({
1359
1363
  field: s
1360
- }) => /* @__PURE__ */ a.jsx(st, { label: "Pre Processing", modalTitle: "This function will run before sending the request (for scenarios like encryption)", defaultValue: rt.pre, ...s, styles: t }) }),
1361
- /* @__PURE__ */ a.jsx(O, { name: "config.processing.post", control: r, render: ({
1364
+ }) => /* @__PURE__ */ a.jsx(ot, { label: "Pre Processing", modalTitle: "This function will run before sending the request (for scenarios like encryption)", defaultValue: nt.pre, ...s, styles: t }) }),
1365
+ /* @__PURE__ */ a.jsx(R, { name: "config.processing.post", control: r, render: ({
1362
1366
  field: s
1363
- }) => /* @__PURE__ */ a.jsx(st, { label: "Post Processing", modalTitle: "This function will run after sending the request (for scenarios like decryption)", defaultValue: rt.post, ...s, styles: t }) })
1367
+ }) => /* @__PURE__ */ a.jsx(ot, { label: "Post Processing", modalTitle: "This function will run after sending the request (for scenarios like decryption)", defaultValue: nt.post, ...s, styles: t }) })
1364
1368
  ] }),
1365
- /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(D, { type: "submit", size: t.button.size, children: "Save" }) })
1369
+ /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(I, { type: "submit", size: t.button.size, children: "Save" }) })
1366
1370
  ] }) });
1367
1371
  }
1368
- function Hn({
1372
+ function Yn({
1369
1373
  styles: e = de
1370
1374
  }) {
1371
- return /* @__PURE__ */ a.jsx(X, { mx: "auto", children: /* @__PURE__ */ a.jsxs(Kr, { mt: e.spacing, icon: /* @__PURE__ */ a.jsx(rn, { size: 16 }), children: [
1375
+ return /* @__PURE__ */ a.jsx(X, { mx: "auto", children: /* @__PURE__ */ a.jsxs(Zr, { mt: e.spacing, icon: /* @__PURE__ */ a.jsx(nn, { size: 16 }), children: [
1372
1376
  "Only ",
1373
1377
  /* @__PURE__ */ a.jsx("b", { children: "SELECT" }),
1374
1378
  " privilege is needed."
1375
1379
  ] }) });
1376
1380
  }
1377
- function qn({
1381
+ function Vn({
1378
1382
  postSubmit: e,
1379
1383
  styles: t = de
1380
1384
  }) {
1381
- const [r, n] = or("postgresql"), i = async ({
1385
+ const [r, n] = lr("postgresql"), i = async ({
1382
1386
  type: d,
1383
1387
  key: p,
1384
1388
  config: f
@@ -1387,7 +1391,8 @@ function qn({
1387
1391
  id: "for-creating",
1388
1392
  title: "Pending",
1389
1393
  message: "Adding data source...",
1390
- loading: !0
1394
+ loading: !0,
1395
+ autoClose: !1
1391
1396
  });
1392
1397
  try {
1393
1398
  console.log({
@@ -1398,19 +1403,21 @@ function qn({
1398
1403
  id: "for-creating",
1399
1404
  title: "Successful",
1400
1405
  message: "Data source is added",
1401
- color: "green"
1406
+ color: "green",
1407
+ autoClose: !0
1402
1408
  }), e();
1403
1409
  } catch (h) {
1404
- P({
1410
+ console.error(h), P({
1405
1411
  id: "for-creating",
1406
1412
  title: "Failed",
1407
1413
  message: h.message,
1408
- color: "red"
1414
+ color: "red",
1415
+ autoClose: !0
1409
1416
  });
1410
1417
  }
1411
1418
  }, s = r === "postgresql" || r === "mysql", l = r === "http";
1412
1419
  return /* @__PURE__ */ a.jsxs(X, { mx: "auto", children: [
1413
- /* @__PURE__ */ a.jsx(Zr, { fullWidth: !0, mb: t.spacing, size: t.size, data: [{
1420
+ /* @__PURE__ */ a.jsx(Xr, { fullWidth: !0, mb: t.spacing, size: t.size, data: [{
1414
1421
  label: "PostgreSQL",
1415
1422
  value: "postgresql"
1416
1423
  }, {
@@ -1420,12 +1427,12 @@ function qn({
1420
1427
  label: "HTTP",
1421
1428
  value: "http"
1422
1429
  }], value: r, onChange: (d) => n(d) }),
1423
- s && /* @__PURE__ */ a.jsx(Hn, { styles: t }),
1424
- s && /* @__PURE__ */ a.jsx(Bn, { submit: i, styles: t, type: r }),
1425
- l && /* @__PURE__ */ a.jsx(Gn, { submit: i, styles: t })
1430
+ s && /* @__PURE__ */ a.jsx(Yn, { styles: t }),
1431
+ s && /* @__PURE__ */ a.jsx(Gn, { submit: i, styles: t, type: r }),
1432
+ l && /* @__PURE__ */ a.jsx(qn, { submit: i, styles: t })
1426
1433
  ] });
1427
1434
  }
1428
- function Yn({
1435
+ function Wn({
1429
1436
  onSuccess: e,
1430
1437
  styles: t = de
1431
1438
  }) {
@@ -1435,42 +1442,44 @@ function Yn({
1435
1442
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1436
1443
  /* @__PURE__ */ a.jsx(xe, { opened: r, onClose: () => n(!1), title: "Add a data source", trapFocus: !0, onDragStart: (d) => {
1437
1444
  d.stopPropagation();
1438
- }, children: /* @__PURE__ */ a.jsx(qn, { postSubmit: l, styles: t }) }),
1439
- /* @__PURE__ */ a.jsx(D, { size: t.button.size, onClick: i, leftIcon: /* @__PURE__ */ a.jsx(ht, { size: 20 }), children: "Add a Data Source" })
1445
+ }, children: /* @__PURE__ */ a.jsx(Vn, { postSubmit: l, styles: t }) }),
1446
+ /* @__PURE__ */ a.jsx(I, { size: t.button.size, onClick: i, leftIcon: /* @__PURE__ */ a.jsx(mt, { size: 20 }), children: "Add a Data Source" })
1440
1447
  ] });
1441
1448
  }
1442
- const Vn = (e) => e.replace(/([^:])(\/\/+)/g, "$1/");
1443
- function Wn(e) {
1444
- Ct(() => {
1445
- if (At.__getMonacoInstance())
1449
+ const Kn = (e) => e.replace(/([^:])(\/\/+)/g, "$1/");
1450
+ function Zn(e) {
1451
+ It(() => {
1452
+ if (kt.__getMonacoInstance())
1446
1453
  return;
1447
1454
  console.log("loading monaco for @devtable/settings-form");
1448
- const r = Vn(e);
1449
- At.config({
1455
+ const r = Kn(e);
1456
+ kt.config({
1450
1457
  paths: {
1451
1458
  vs: r
1452
1459
  }
1453
- }), At.init().then((n) => console.log("monaco instance:", n));
1460
+ }), kt.init().then((n) => console.log("monaco instance:", n));
1454
1461
  }, []);
1455
1462
  }
1456
- function Kn({
1463
+ function Xn({
1457
1464
  id: e,
1458
1465
  name: t,
1459
1466
  isProtected: r,
1460
1467
  onSuccess: n,
1461
1468
  styles: i = de
1462
1469
  }) {
1463
- const s = Ze(), l = async () => {
1470
+ const s = Xe(), l = async () => {
1464
1471
  e && (oe({
1465
1472
  id: "for-deleting",
1466
1473
  title: "Pending",
1467
1474
  message: "Deleting data source...",
1468
- loading: !0
1475
+ loading: !0,
1476
+ autoClose: !1
1469
1477
  }), await Z.datasource.delete(e), P({
1470
1478
  id: "for-deleting",
1471
1479
  title: "Successful",
1472
1480
  message: `Data source [${t}] is deleted`,
1473
- color: "green"
1481
+ color: "green",
1482
+ autoClose: !0
1474
1483
  }), n());
1475
1484
  }, d = () => s.openConfirmModal({
1476
1485
  title: "Delete this data source?",
@@ -1482,21 +1491,21 @@ function Kn({
1482
1491
  onCancel: () => console.log("Cancel"),
1483
1492
  onConfirm: l
1484
1493
  });
1485
- return r ? /* @__PURE__ */ a.jsx(at, { withArrow: !0, events: {
1494
+ return r ? /* @__PURE__ */ a.jsx(it, { withArrow: !0, events: {
1486
1495
  hover: !0,
1487
1496
  touch: !1,
1488
1497
  focus: !1
1489
- }, label: "This is a preset datasource, it can not be deleted", children: /* @__PURE__ */ a.jsx(D, { size: i.button.size, color: "gray", variant: "light", leftIcon: /* @__PURE__ */ a.jsx(dr, { size: 16 }), sx: {
1498
+ }, label: "This is a preset datasource, it can not be deleted", children: /* @__PURE__ */ a.jsx(I, { size: i.button.size, color: "gray", variant: "light", leftIcon: /* @__PURE__ */ a.jsx(dr, { size: 16 }), sx: {
1490
1499
  transform: "none !important"
1491
- }, children: "Delete" }) }) : /* @__PURE__ */ a.jsx(D, { size: i.button.size, color: "red", onClick: d, leftIcon: /* @__PURE__ */ a.jsx(mt, { size: 16 }), children: "Delete" });
1500
+ }, children: "Delete" }) }) : /* @__PURE__ */ a.jsx(I, { size: i.button.size, color: "red", onClick: d, leftIcon: /* @__PURE__ */ a.jsx(bt, { size: 16 }), children: "Delete" });
1492
1501
  }
1493
- const tr = {
1502
+ const rr = {
1494
1503
  pre: ["function pre_process({ method, url, params, headers, data }, utils) {", " // your code goes here", " return { method, url, params, headers, data }", "}"].join(`
1495
1504
  `),
1496
1505
  post: ["function post_process(res, utils) {", " // your code goes here", " return data", "}"].join(`
1497
1506
  `)
1498
1507
  };
1499
- function Zn({
1508
+ function Qn({
1500
1509
  name: e,
1501
1510
  config: t,
1502
1511
  submit: r,
@@ -1512,24 +1521,24 @@ function Zn({
1512
1521
  });
1513
1522
  return /* @__PURE__ */ a.jsx(X, { mx: "auto", children: /* @__PURE__ */ a.jsxs("form", { onSubmit: s(r), children: [
1514
1523
  /* @__PURE__ */ a.jsx(Q, { mb: n.spacing, size: n.size, required: !0, label: "Name", value: e, readOnly: !0 }),
1515
- /* @__PURE__ */ a.jsx(ct, { label: "Connection Info", labelPosition: "center" }),
1516
- /* @__PURE__ */ a.jsx(O, { name: "config.host", control: i, render: ({
1524
+ /* @__PURE__ */ a.jsx(dt, { label: "Connection Info", labelPosition: "center" }),
1525
+ /* @__PURE__ */ a.jsx(R, { name: "config.host", control: i, render: ({
1517
1526
  field: l
1518
1527
  }) => /* @__PURE__ */ a.jsx(Q, { mb: n.spacing, size: n.size, label: "Base URL", sx: {
1519
1528
  flexGrow: 1
1520
1529
  }, ...l }) }),
1521
1530
  /* @__PURE__ */ a.jsxs(z, { grow: !0, children: [
1522
- /* @__PURE__ */ a.jsx(O, { name: "config.processing.pre", control: i, render: ({
1531
+ /* @__PURE__ */ a.jsx(R, { name: "config.processing.pre", control: i, render: ({
1523
1532
  field: l
1524
- }) => /* @__PURE__ */ a.jsx(st, { label: "Pre Processing", modalTitle: "This function will run before sending the request (for scenarios like encryption)", defaultValue: tr.pre, ...l, styles: n }) }),
1525
- /* @__PURE__ */ a.jsx(O, { name: "config.processing.post", control: i, render: ({
1533
+ }) => /* @__PURE__ */ a.jsx(ot, { label: "Pre Processing", modalTitle: "This function will run before sending the request (for scenarios like encryption)", defaultValue: rr.pre, ...l, styles: n }) }),
1534
+ /* @__PURE__ */ a.jsx(R, { name: "config.processing.post", control: i, render: ({
1526
1535
  field: l
1527
- }) => /* @__PURE__ */ a.jsx(st, { label: "Post Processing", modalTitle: "This function will run after sending the request (for scenarios like decryption)", defaultValue: tr.post, ...l, styles: n }) })
1536
+ }) => /* @__PURE__ */ a.jsx(ot, { label: "Post Processing", modalTitle: "This function will run after sending the request (for scenarios like decryption)", defaultValue: rr.post, ...l, styles: n }) })
1528
1537
  ] }),
1529
- /* @__PURE__ */ a.jsx(z, { position: "right", mt: n.spacing, children: /* @__PURE__ */ a.jsx(D, { type: "submit", size: n.button.size, children: "Save" }) })
1538
+ /* @__PURE__ */ a.jsx(z, { position: "right", mt: n.spacing, children: /* @__PURE__ */ a.jsx(I, { type: "submit", color: "green", leftIcon: /* @__PURE__ */ a.jsx(Pe, { size: 16 }), size: n.button.size, children: "Submit" }) })
1530
1539
  ] }) });
1531
1540
  }
1532
- function Xn({
1541
+ function Jn({
1533
1542
  dataSource: e,
1534
1543
  postSubmit: t,
1535
1544
  styles: r = de
@@ -1541,7 +1550,8 @@ function Xn({
1541
1550
  id: "for-updating",
1542
1551
  title: "Pending",
1543
1552
  message: "Editing data source...",
1544
- loading: !0
1553
+ loading: !0,
1554
+ autoClose: !1
1545
1555
  });
1546
1556
  try {
1547
1557
  console.log({
@@ -1550,20 +1560,22 @@ function Xn({
1550
1560
  id: "for-updating",
1551
1561
  title: "Successful",
1552
1562
  message: "Data source is updated",
1553
- color: "green"
1563
+ color: "green",
1564
+ autoClose: !0
1554
1565
  }), t();
1555
1566
  } catch (s) {
1556
1567
  P({
1557
1568
  id: "for-updating",
1558
1569
  title: "Failed",
1559
1570
  message: s.message,
1560
- color: "red"
1571
+ color: "red",
1572
+ autoClose: !0
1561
1573
  });
1562
1574
  }
1563
1575
  };
1564
- return e.config ? /* @__PURE__ */ a.jsx(X, { mx: "auto", children: /* @__PURE__ */ a.jsx(Zn, { name: e.key, config: e.config, submit: n, styles: r }) }) : (console.error(new Error("unexpected empty config of a http datasource")), null);
1576
+ return e.config ? /* @__PURE__ */ a.jsx(X, { mx: "auto", children: /* @__PURE__ */ a.jsx(Qn, { name: e.key, config: e.config, submit: n, styles: r }) }) : (console.error(new Error("unexpected empty config of a http datasource")), null);
1565
1577
  }
1566
- function Qn({
1578
+ function ea({
1567
1579
  dataSource: e,
1568
1580
  onSuccess: t,
1569
1581
  styles: r = de
@@ -1571,52 +1583,52 @@ function Qn({
1571
1583
  const [n, i] = F.useState(!1), s = () => i(!0), l = () => i(!1), d = () => {
1572
1584
  t(), l();
1573
1585
  };
1574
- return e.is_preset ? /* @__PURE__ */ a.jsx(at, { withArrow: !0, events: {
1586
+ return e.is_preset ? /* @__PURE__ */ a.jsx(it, { withArrow: !0, events: {
1575
1587
  hover: !0,
1576
1588
  touch: !1,
1577
1589
  focus: !1
1578
- }, label: "This is a preset datasource, it can not be changed", children: /* @__PURE__ */ a.jsx(D, { size: r.button.size, color: "gray", variant: "light", leftIcon: /* @__PURE__ */ a.jsx(dr, { size: 16 }), sx: {
1590
+ }, label: "This is a preset datasource, it can not be changed", children: /* @__PURE__ */ a.jsx(I, { size: r.button.size, color: "gray", variant: "light", leftIcon: /* @__PURE__ */ a.jsx(dr, { size: 16 }), sx: {
1579
1591
  transform: "none !important"
1580
- }, children: "Edit" }) }) : e.type !== "http" ? /* @__PURE__ */ a.jsx(at, { withArrow: !0, events: {
1592
+ }, children: "Edit" }) }) : e.type !== "http" ? /* @__PURE__ */ a.jsx(it, { withArrow: !0, events: {
1581
1593
  hover: !0,
1582
1594
  touch: !1,
1583
1595
  focus: !1
1584
- }, label: "Only HTTP datasources can be edited", children: /* @__PURE__ */ a.jsx(D, { size: r.button.size, color: "gray", variant: "light", leftIcon: /* @__PURE__ */ a.jsx(Tt, { size: 16 }), sx: {
1596
+ }, label: "Only HTTP datasources can be edited", children: /* @__PURE__ */ a.jsx(I, { size: r.button.size, color: "gray", variant: "light", leftIcon: /* @__PURE__ */ a.jsx(jt, { size: 16 }), sx: {
1585
1597
  transform: "none !important"
1586
1598
  }, children: "Edit" }) }) : /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1587
1599
  /* @__PURE__ */ a.jsx(xe, { opened: n, onClose: () => i(!1), title: "Add a data source", trapFocus: !0, onDragStart: (p) => {
1588
1600
  p.stopPropagation();
1589
- }, children: /* @__PURE__ */ a.jsx(Xn, { dataSource: e, postSubmit: d, styles: r }) }),
1590
- /* @__PURE__ */ a.jsx(D, { size: r.button.size, color: "blue", onClick: s, leftIcon: /* @__PURE__ */ a.jsx(Tt, { size: 16 }), children: "Edit" })
1601
+ }, children: /* @__PURE__ */ a.jsx(Jn, { dataSource: e, postSubmit: d, styles: r }) }),
1602
+ /* @__PURE__ */ a.jsx(I, { size: r.button.size, color: "blue", onClick: s, leftIcon: /* @__PURE__ */ a.jsx(jt, { size: 16 }), children: "Edit" })
1591
1603
  ] });
1592
1604
  }
1593
- const Jn = {
1605
+ const ta = {
1594
1606
  http: "HTTP",
1595
1607
  mysql: "MySQL",
1596
1608
  postgresql: "PostgreSQL"
1597
- }, ea = {
1609
+ }, ra = {
1598
1610
  http: /* @__PURE__ */ a.jsx(un, {}),
1599
1611
  mysql: /* @__PURE__ */ a.jsx(cn, {}),
1600
1612
  postgresql: /* @__PURE__ */ a.jsx(dn, {})
1601
1613
  };
1602
- function ta({
1614
+ function na({
1603
1615
  type: e
1604
1616
  }) {
1605
1617
  return /* @__PURE__ */ a.jsxs(z, { children: [
1606
1618
  /* @__PURE__ */ a.jsx(Dt, { size: "xs", sx: {
1607
1619
  transform: "none !important"
1608
- }, children: ea[e] }),
1620
+ }, children: ra[e] }),
1609
1621
  /* @__PURE__ */ a.jsx(ke, { sx: {
1610
1622
  cusor: "default",
1611
1623
  userSelect: "none"
1612
- }, children: Jn[e] })
1624
+ }, children: ta[e] })
1613
1625
  ] });
1614
1626
  }
1615
- function ti({
1627
+ function ai({
1616
1628
  styles: e = de,
1617
1629
  config: t
1618
1630
  }) {
1619
- Wn(t.monacoPath), Xe(t);
1631
+ Zn(t.monacoPath), Qe(t);
1620
1632
  const {
1621
1633
  data: r = [],
1622
1634
  loading: n,
@@ -1630,12 +1642,12 @@ function ti({
1630
1642
  refreshDeps: []
1631
1643
  });
1632
1644
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1633
- /* @__PURE__ */ a.jsx(z, { pt: e.spacing, position: "right", children: /* @__PURE__ */ a.jsx(Yn, { onSuccess: i }) }),
1645
+ /* @__PURE__ */ a.jsx(z, { pt: e.spacing, position: "right", children: /* @__PURE__ */ a.jsx(Wn, { onSuccess: i }) }),
1634
1646
  /* @__PURE__ */ a.jsxs(X, { mt: e.spacing, sx: {
1635
1647
  position: "relative"
1636
1648
  }, children: [
1637
- /* @__PURE__ */ a.jsx(pt, { visible: n }),
1638
- /* @__PURE__ */ a.jsxs(ft, { horizontalSpacing: e.spacing, verticalSpacing: e.spacing, fontSize: e.size, highlightOnHover: !0, children: [
1649
+ /* @__PURE__ */ a.jsx(ft, { visible: n }),
1650
+ /* @__PURE__ */ a.jsxs(gt, { horizontalSpacing: e.spacing, verticalSpacing: e.spacing, fontSize: e.size, highlightOnHover: !0, children: [
1639
1651
  /* @__PURE__ */ a.jsx("thead", { children: /* @__PURE__ */ a.jsxs("tr", { children: [
1640
1652
  /* @__PURE__ */ a.jsx("th", { children: "Type" }),
1641
1653
  /* @__PURE__ */ a.jsx("th", { children: "Name" }),
@@ -1649,11 +1661,11 @@ function ti({
1649
1661
  is_preset: f
1650
1662
  } = s;
1651
1663
  return /* @__PURE__ */ a.jsxs("tr", { children: [
1652
- /* @__PURE__ */ a.jsx("td", { width: 200, children: /* @__PURE__ */ a.jsx(ta, { type: p }) }),
1664
+ /* @__PURE__ */ a.jsx("td", { width: 200, children: /* @__PURE__ */ a.jsx(na, { type: p }) }),
1653
1665
  /* @__PURE__ */ a.jsx("td", { children: d }),
1654
1666
  /* @__PURE__ */ a.jsx("td", { width: 400, children: /* @__PURE__ */ a.jsxs(z, { position: "left", children: [
1655
- /* @__PURE__ */ a.jsx(Qn, { dataSource: s, onSuccess: i, styles: e }),
1656
- /* @__PURE__ */ a.jsx(Kn, { isProtected: f, id: l, name: d, onSuccess: i, styles: e })
1667
+ /* @__PURE__ */ a.jsx(ea, { dataSource: s, onSuccess: i, styles: e }),
1668
+ /* @__PURE__ */ a.jsx(Xn, { isProtected: f, id: l, name: d, onSuccess: i, styles: e })
1657
1669
  ] }) })
1658
1670
  ] }, d);
1659
1671
  }) })
@@ -1661,15 +1673,15 @@ function ti({
1661
1673
  ] })
1662
1674
  ] });
1663
1675
  }
1664
- const ra = ut(({
1676
+ const aa = ct(({
1665
1677
  label: e,
1666
1678
  value: t,
1667
1679
  description: r,
1668
1680
  ...n
1669
- }, i) => /* @__PURE__ */ a.jsxs(Ke, { spacing: 2, ref: i, ...n, children: [
1681
+ }, i) => /* @__PURE__ */ a.jsxs(Ze, { spacing: 2, ref: i, ...n, children: [
1670
1682
  /* @__PURE__ */ a.jsx(ke, { size: "sm", children: e }),
1671
1683
  /* @__PURE__ */ a.jsx(ke, { size: "xs", color: "dimmed", className: "role-description", children: r })
1672
- ] })), Ft = ut(({
1684
+ ] })), Nt = ct(({
1673
1685
  styles: e,
1674
1686
  value: t,
1675
1687
  onChange: r
@@ -1685,7 +1697,7 @@ const ra = ut(({
1685
1697
  })), {
1686
1698
  refreshDeps: []
1687
1699
  });
1688
- return /* @__PURE__ */ a.jsx(Xr, { ref: n, mb: e.spacing, size: e.size, required: !0, label: "Role", itemComponent: ra, data: i, disabled: s, styles: () => ({
1700
+ return /* @__PURE__ */ a.jsx(Qr, { ref: n, mb: e.spacing, size: e.size, required: !0, label: "Role", itemComponent: aa, data: i, disabled: s, styles: () => ({
1689
1701
  item: {
1690
1702
  "&[data-selected]": {
1691
1703
  "&, &:hover": {
@@ -1703,7 +1715,7 @@ const ra = ut(({
1703
1715
  size: "xs"
1704
1716
  }
1705
1717
  };
1706
- function na({
1718
+ function ia({
1707
1719
  postSubmit: e,
1708
1720
  styles: t = we,
1709
1721
  initialRoleID: r
@@ -1729,39 +1741,42 @@ function na({
1729
1741
  id: "for-creating",
1730
1742
  title: "Pending",
1731
1743
  message: "Adding account...",
1732
- loading: !0
1744
+ loading: !0,
1745
+ autoClose: !1
1733
1746
  }), await Z.account.create(l, d, p, f), P({
1734
1747
  id: "for-creating",
1735
1748
  title: "Successful",
1736
1749
  message: "Account is added",
1737
- color: "green"
1750
+ color: "green",
1751
+ autoClose: !0
1738
1752
  }), e();
1739
1753
  } catch (h) {
1740
1754
  P({
1741
1755
  id: "for-creating",
1742
1756
  title: "Failed",
1743
1757
  message: h.message,
1744
- color: "red"
1758
+ color: "red",
1759
+ autoClose: !0
1745
1760
  });
1746
1761
  }
1747
1762
  };
1748
1763
  return /* @__PURE__ */ a.jsx(X, { mx: "auto", mb: 10, children: /* @__PURE__ */ a.jsxs("form", { onSubmit: i(s), children: [
1749
- /* @__PURE__ */ a.jsx(O, { name: "name", control: n, render: ({
1764
+ /* @__PURE__ */ a.jsx(R, { name: "name", control: n, render: ({
1750
1765
  field: l
1751
1766
  }) => /* @__PURE__ */ a.jsx(Q, { mb: t.spacing, size: t.size, required: !0, label: "Username", ...l }) }),
1752
- /* @__PURE__ */ a.jsx(O, { name: "email", control: n, render: ({
1767
+ /* @__PURE__ */ a.jsx(R, { name: "email", control: n, render: ({
1753
1768
  field: l
1754
1769
  }) => /* @__PURE__ */ a.jsx(Q, { mb: t.spacing, size: t.size, required: !0, label: "Email", ...l }) }),
1755
- /* @__PURE__ */ a.jsx(O, { name: "password", control: n, render: ({
1770
+ /* @__PURE__ */ a.jsx(R, { name: "password", control: n, render: ({
1756
1771
  field: l
1757
- }) => /* @__PURE__ */ a.jsx(dt, { mb: t.spacing, size: t.size, required: !0, label: "Password", description: "Password must be at least 8 characters long", ...l }) }),
1758
- /* @__PURE__ */ a.jsx(O, { name: "role_id", control: n, render: ({
1772
+ }) => /* @__PURE__ */ a.jsx(pt, { mb: t.spacing, size: t.size, required: !0, label: "Password", description: "Password must be at least 8 characters long", ...l }) }),
1773
+ /* @__PURE__ */ a.jsx(R, { name: "role_id", control: n, render: ({
1759
1774
  field: l
1760
- }) => /* @__PURE__ */ a.jsx(Ft, { styles: t, ...l }) }),
1761
- /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(D, { type: "submit", size: t.button.size, children: "Save" }) })
1775
+ }) => /* @__PURE__ */ a.jsx(Nt, { styles: t, ...l }) }),
1776
+ /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(I, { type: "submit", color: "green", leftIcon: /* @__PURE__ */ a.jsx(Pe, { size: 16 }), size: t.button.size, children: "Submit" }) })
1762
1777
  ] }) });
1763
1778
  }
1764
- function aa({
1779
+ function sa({
1765
1780
  onSuccess: e,
1766
1781
  styles: t = we,
1767
1782
  initialRoleID: r
@@ -1772,37 +1787,40 @@ function aa({
1772
1787
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1773
1788
  /* @__PURE__ */ a.jsx(xe, { opened: n, onClose: () => i(!1), title: "Add an Account", trapFocus: !0, onDragStart: (p) => {
1774
1789
  p.stopPropagation();
1775
- }, children: /* @__PURE__ */ a.jsx(na, { postSubmit: d, styles: t, initialRoleID: r }) }),
1776
- /* @__PURE__ */ a.jsx(D, { size: t.button.size, onClick: s, leftIcon: /* @__PURE__ */ a.jsx(ht, { size: 20 }), children: "Add an Account" })
1790
+ }, children: /* @__PURE__ */ a.jsx(ia, { postSubmit: d, styles: t, initialRoleID: r }) }),
1791
+ /* @__PURE__ */ a.jsx(I, { size: t.button.size, onClick: s, leftIcon: /* @__PURE__ */ a.jsx(mt, { size: 20 }), children: "Add an Account" })
1777
1792
  ] });
1778
1793
  }
1779
- function ia({
1794
+ function oa({
1780
1795
  id: e,
1781
1796
  name: t,
1782
1797
  onSuccess: r,
1783
1798
  styles: n = we
1784
1799
  }) {
1785
- const i = Ze(), s = async () => {
1800
+ const i = Xe(), s = async () => {
1786
1801
  if (e) {
1787
1802
  oe({
1788
1803
  id: "for-deleting",
1789
1804
  title: "Pending",
1790
1805
  message: "Deleting account...",
1791
- loading: !0
1806
+ loading: !0,
1807
+ autoClose: !1
1792
1808
  });
1793
1809
  try {
1794
1810
  await Z.account.delete(e), P({
1795
1811
  id: "for-deleting",
1796
1812
  title: "Successful",
1797
1813
  message: `Account [${t}] is deleted`,
1798
- color: "green"
1814
+ color: "green",
1815
+ autoClose: !0
1799
1816
  }), r();
1800
1817
  } catch (d) {
1801
1818
  P({
1802
1819
  id: "for-deleting",
1803
1820
  title: "Failed",
1804
1821
  message: d.message,
1805
- color: "red"
1822
+ color: "red",
1823
+ autoClose: !0
1806
1824
  });
1807
1825
  }
1808
1826
  }
@@ -1815,9 +1833,9 @@ function ia({
1815
1833
  onCancel: () => console.log("Cancel"),
1816
1834
  onConfirm: s
1817
1835
  });
1818
- return /* @__PURE__ */ a.jsx(D, { size: n.button.size, color: "red", onClick: l, leftIcon: /* @__PURE__ */ a.jsx(mt, { size: 20 }), children: "Delete" });
1836
+ return /* @__PURE__ */ a.jsx(I, { size: n.button.size, color: "red", onClick: l, leftIcon: /* @__PURE__ */ a.jsx(bt, { size: 20 }), children: "Delete" });
1819
1837
  }
1820
- function sa({
1838
+ function la({
1821
1839
  id: e,
1822
1840
  name: t,
1823
1841
  email: r,
@@ -1849,7 +1867,8 @@ function sa({
1849
1867
  id: "for-updating",
1850
1868
  title: "Pending",
1851
1869
  message: "Updating account...",
1852
- loading: !0
1870
+ loading: !0,
1871
+ autoClose: !1
1853
1872
  }), await Z.account.edit({
1854
1873
  id: e,
1855
1874
  name: u.trim(),
@@ -1861,49 +1880,51 @@ function sa({
1861
1880
  id: "for-updating",
1862
1881
  title: "Successful",
1863
1882
  message: "Account is updated",
1864
- color: "green"
1883
+ color: "green",
1884
+ autoClose: !0
1865
1885
  }), i();
1866
1886
  } catch (w) {
1867
1887
  P({
1868
1888
  id: "for-updating",
1869
1889
  title: "Failed",
1870
1890
  message: w.message,
1871
- color: "red"
1891
+ color: "red",
1892
+ autoClose: !0
1872
1893
  });
1873
1894
  }
1874
1895
  }, [h, c] = p(["reset_password", "new_password"]);
1875
1896
  return /* @__PURE__ */ a.jsx(X, { mx: "auto", mb: 10, children: /* @__PURE__ */ a.jsxs("form", { onSubmit: d(f), children: [
1876
- /* @__PURE__ */ a.jsx(O, { name: "name", control: l, render: ({
1897
+ /* @__PURE__ */ a.jsx(R, { name: "name", control: l, render: ({
1877
1898
  field: u
1878
1899
  }) => /* @__PURE__ */ a.jsx(Q, { mb: s.spacing, size: s.size, required: !0, label: "Username", ...u }) }),
1879
- /* @__PURE__ */ a.jsx(O, { name: "email", control: l, render: ({
1900
+ /* @__PURE__ */ a.jsx(R, { name: "email", control: l, render: ({
1880
1901
  field: u
1881
1902
  }) => /* @__PURE__ */ a.jsx(Q, { mb: s.spacing, size: s.size, required: !0, label: "Email", ...u }) }),
1882
- /* @__PURE__ */ a.jsx(O, { name: "role_id", control: l, render: ({
1903
+ /* @__PURE__ */ a.jsx(R, { name: "role_id", control: l, render: ({
1883
1904
  field: u
1884
- }) => /* @__PURE__ */ a.jsx(Ft, { styles: s, ...u }) }),
1885
- /* @__PURE__ */ a.jsx(ct, { my: 20, variant: "dashed", label: "", labelPosition: "center" }),
1886
- /* @__PURE__ */ a.jsx(O, { name: "reset_password", control: l, render: ({
1905
+ }) => /* @__PURE__ */ a.jsx(Nt, { styles: s, ...u }) }),
1906
+ /* @__PURE__ */ a.jsx(dt, { my: 20, variant: "dashed", label: "", labelPosition: "center" }),
1907
+ /* @__PURE__ */ a.jsx(R, { name: "reset_password", control: l, render: ({
1887
1908
  field: u
1888
- }) => /* @__PURE__ */ a.jsx(Qr, { mb: s.spacing, size: s.size, label: "Reset password", checked: u.value, onChange: (g) => u.onChange(g.currentTarget.checked), styles: {
1909
+ }) => /* @__PURE__ */ a.jsx(Jr, { mb: s.spacing, size: s.size, label: "Reset password", checked: u.value, onChange: (g) => u.onChange(g.currentTarget.checked), styles: {
1889
1910
  label: {
1890
1911
  verticalAlign: "middle"
1891
1912
  }
1892
1913
  } }) }),
1893
1914
  h && /* @__PURE__ */ a.jsx(
1894
- O,
1915
+ R,
1895
1916
  {
1896
1917
  name: "new_password",
1897
1918
  control: l,
1898
1919
  render: ({
1899
1920
  field: u
1900
- }) => /* @__PURE__ */ a.jsx(dt, { autoComplete: "off", mb: s.spacing, size: s.size, required: !0, description: "Password must be at least 8 characters long", label: "New Password", ...u })
1921
+ }) => /* @__PURE__ */ a.jsx(pt, { autoComplete: "off", mb: s.spacing, size: s.size, required: !0, description: "Password must be at least 8 characters long", label: "New Password", ...u })
1901
1922
  }
1902
1923
  ),
1903
- /* @__PURE__ */ a.jsx(z, { position: "right", mt: s.spacing, children: /* @__PURE__ */ a.jsx(D, { type: "submit", size: s.button.size, children: "Submit" }) })
1924
+ /* @__PURE__ */ a.jsx(z, { position: "right", mt: s.spacing, children: /* @__PURE__ */ a.jsx(I, { type: "submit", color: "green", leftIcon: /* @__PURE__ */ a.jsx(Pe, { size: 16 }), size: s.button.size, children: "Submit" }) })
1904
1925
  ] }) });
1905
1926
  }
1906
- function oa({
1927
+ function ua({
1907
1928
  account: e,
1908
1929
  onSuccess: t,
1909
1930
  styles: r = we
@@ -1914,16 +1935,16 @@ function oa({
1914
1935
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1915
1936
  /* @__PURE__ */ a.jsx(xe, { opened: n, onClose: () => i(!1), title: `Editing ${e.name}`, trapFocus: !0, onDragStart: (p) => {
1916
1937
  p.stopPropagation();
1917
- }, children: /* @__PURE__ */ a.jsx(sa, { ...e, postSubmit: d, styles: r }) }),
1918
- /* @__PURE__ */ a.jsx(D, { size: r.button.size, onClick: s, leftIcon: /* @__PURE__ */ a.jsx(nn, { size: 20 }), children: "Edit" })
1938
+ }, children: /* @__PURE__ */ a.jsx(la, { ...e, postSubmit: d, styles: r }) }),
1939
+ /* @__PURE__ */ a.jsx(I, { size: r.button.size, onClick: s, leftIcon: /* @__PURE__ */ a.jsx(an, { size: 20 }), children: "Edit" })
1919
1940
  ] });
1920
1941
  }
1921
- function ri({
1942
+ function ii({
1922
1943
  styles: e = we,
1923
1944
  config: t
1924
1945
  }) {
1925
1946
  var d;
1926
- Xe(t);
1947
+ Qe(t);
1927
1948
  const {
1928
1949
  data: r = [],
1929
1950
  loading: n,
@@ -1947,12 +1968,12 @@ function ri({
1947
1968
  refreshDeps: []
1948
1969
  });
1949
1970
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
1950
- /* @__PURE__ */ a.jsx(z, { pt: e.spacing, position: "right", children: /* @__PURE__ */ a.jsx(aa, { onSuccess: i, initialRoleID: ((d = s == null ? void 0 : s[0]) == null ? void 0 : d.value) ?? "INACTIVE" }) }),
1971
+ /* @__PURE__ */ a.jsx(z, { pt: e.spacing, position: "right", children: /* @__PURE__ */ a.jsx(sa, { onSuccess: i, initialRoleID: ((d = s == null ? void 0 : s[0]) == null ? void 0 : d.value) ?? "INACTIVE" }) }),
1951
1972
  /* @__PURE__ */ a.jsxs(X, { mt: e.spacing, sx: {
1952
1973
  position: "relative"
1953
1974
  }, children: [
1954
- /* @__PURE__ */ a.jsx(pt, { visible: n || l }),
1955
- /* @__PURE__ */ a.jsxs(ft, { horizontalSpacing: e.spacing, verticalSpacing: e.spacing, fontSize: e.size, highlightOnHover: !0, children: [
1975
+ /* @__PURE__ */ a.jsx(ft, { visible: n || l }),
1976
+ /* @__PURE__ */ a.jsxs(gt, { horizontalSpacing: e.spacing, verticalSpacing: e.spacing, fontSize: e.size, highlightOnHover: !0, children: [
1956
1977
  /* @__PURE__ */ a.jsx("thead", { children: /* @__PURE__ */ a.jsxs("tr", { children: [
1957
1978
  /* @__PURE__ */ a.jsx("th", { children: "Username" }),
1958
1979
  /* @__PURE__ */ a.jsx("th", { children: "Email" }),
@@ -1971,8 +1992,8 @@ function ri({
1971
1992
  /* @__PURE__ */ a.jsx("td", { width: 200, children: c }),
1972
1993
  /* @__PURE__ */ a.jsx("td", { width: 200, children: u }),
1973
1994
  /* @__PURE__ */ a.jsx("td", { width: 200, children: /* @__PURE__ */ a.jsxs(z, { position: "left", children: [
1974
- /* @__PURE__ */ a.jsx(oa, { account: p, onSuccess: i }),
1975
- /* @__PURE__ */ a.jsx(ia, { id: f, name: h, onSuccess: i })
1995
+ /* @__PURE__ */ a.jsx(ua, { account: p, onSuccess: i }),
1996
+ /* @__PURE__ */ a.jsx(oa, { id: f, name: h, onSuccess: i })
1976
1997
  ] }) })
1977
1998
  ] }, f);
1978
1999
  }) })
@@ -1980,7 +2001,7 @@ function ri({
1980
2001
  ] })
1981
2002
  ] });
1982
2003
  }
1983
- function la({
2004
+ function ca({
1984
2005
  postSubmit: e,
1985
2006
  styles: t = we
1986
2007
  }) {
@@ -2001,53 +2022,56 @@ function la({
2001
2022
  id: "for-login",
2002
2023
  title: "Pending",
2003
2024
  message: "Loggin in...",
2004
- loading: !0
2025
+ loading: !0,
2026
+ autoClose: !1
2005
2027
  });
2006
2028
  const d = await Z.account.login(s.trim(), l.trim());
2007
2029
  window.localStorage.setItem("token", d.token), P({
2008
2030
  id: "for-login",
2009
2031
  title: "Successful",
2010
2032
  message: "Logged in",
2011
- color: "green"
2033
+ color: "green",
2034
+ autoClose: !0
2012
2035
  }), e(d);
2013
2036
  } catch (d) {
2014
2037
  P({
2015
2038
  id: "for-login",
2016
2039
  title: "Login Failed",
2017
2040
  message: d.message,
2018
- color: "red"
2041
+ color: "red",
2042
+ autoClose: !0
2019
2043
  });
2020
2044
  }
2021
2045
  };
2022
2046
  return /* @__PURE__ */ a.jsx(X, { mx: "auto", children: /* @__PURE__ */ a.jsxs("form", { onSubmit: n(i), children: [
2023
- /* @__PURE__ */ a.jsx(O, { name: "name", control: r, render: ({
2047
+ /* @__PURE__ */ a.jsx(R, { name: "name", control: r, render: ({
2024
2048
  field: s
2025
2049
  }) => /* @__PURE__ */ a.jsx(Q, { mb: t.spacing, size: t.size, required: !0, label: "Username", ...s }) }),
2026
- /* @__PURE__ */ a.jsx(O, { name: "password", control: r, render: ({
2050
+ /* @__PURE__ */ a.jsx(R, { name: "password", control: r, render: ({
2027
2051
  field: s
2028
- }) => /* @__PURE__ */ a.jsx(dt, { mb: t.spacing, size: t.size, required: !0, label: "Password", ...s }) }),
2029
- /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(D, { type: "submit", size: t.button.size, children: "Submit" }) })
2052
+ }) => /* @__PURE__ */ a.jsx(pt, { mb: t.spacing, size: t.size, required: !0, label: "Password", ...s }) }),
2053
+ /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(I, { type: "submit", size: t.button.size, children: "Submit" }) })
2030
2054
  ] }) });
2031
2055
  }
2032
- function ni({
2056
+ function si({
2033
2057
  styles: e = we,
2034
2058
  config: t,
2035
2059
  onSuccess: r
2036
2060
  }) {
2037
- return Xe(t), /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsx(X, { mt: e.spacing, sx: {
2061
+ return Qe(t), /* @__PURE__ */ a.jsx(a.Fragment, { children: /* @__PURE__ */ a.jsx(X, { mt: e.spacing, sx: {
2038
2062
  position: "relative"
2039
- }, children: /* @__PURE__ */ a.jsx(la, { styles: e, postSubmit: r }) }) });
2063
+ }, children: /* @__PURE__ */ a.jsx(ca, { styles: e, postSubmit: r }) }) });
2040
2064
  }
2041
- const vt = {
2065
+ const yt = {
2042
2066
  size: "sm",
2043
2067
  spacing: "md",
2044
2068
  button: {
2045
2069
  size: "xs"
2046
2070
  }
2047
2071
  };
2048
- function ua({
2072
+ function da({
2049
2073
  postSubmit: e,
2050
- styles: t = vt,
2074
+ styles: t = yt,
2051
2075
  initialRoleID: r
2052
2076
  }) {
2053
2077
  const {
@@ -2067,7 +2091,8 @@ function ua({
2067
2091
  id: "for-creating",
2068
2092
  title: "Pending",
2069
2093
  message: "Adding API Key...",
2070
- loading: !0
2094
+ loading: !0,
2095
+ autoClose: !1
2071
2096
  });
2072
2097
  const {
2073
2098
  app_id: p,
@@ -2077,36 +2102,38 @@ function ua({
2077
2102
  id: "for-creating",
2078
2103
  title: "Successful",
2079
2104
  message: "API Key is added",
2080
- color: "green"
2105
+ color: "green",
2106
+ autoClose: !0
2081
2107
  }), e(p, f);
2082
2108
  } catch (p) {
2083
2109
  P({
2084
2110
  id: "for-creating",
2085
2111
  title: "Failed",
2086
2112
  message: p.message,
2087
- color: "red"
2113
+ color: "red",
2114
+ autoClose: !0
2088
2115
  });
2089
2116
  }
2090
2117
  };
2091
2118
  return /* @__PURE__ */ a.jsx(X, { mx: "auto", mb: 10, children: /* @__PURE__ */ a.jsxs("form", { onSubmit: i(s), children: [
2092
- /* @__PURE__ */ a.jsx(O, { name: "name", control: n, render: ({
2119
+ /* @__PURE__ */ a.jsx(R, { name: "name", control: n, render: ({
2093
2120
  field: l
2094
2121
  }) => /* @__PURE__ */ a.jsx(Q, { mb: t.spacing, size: t.size, required: !0, label: "Name", ...l }) }),
2095
- /* @__PURE__ */ a.jsx(O, { name: "role_id", control: n, render: ({
2122
+ /* @__PURE__ */ a.jsx(R, { name: "role_id", control: n, render: ({
2096
2123
  field: l
2097
- }) => /* @__PURE__ */ a.jsx(Ft, { styles: t, ...l }) }),
2098
- /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(D, { type: "submit", size: t.button.size, children: "Save" }) })
2124
+ }) => /* @__PURE__ */ a.jsx(Nt, { styles: t, ...l }) }),
2125
+ /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(I, { type: "submit", size: t.button.size, children: "Save" }) })
2099
2126
  ] }) });
2100
2127
  }
2101
- function ca({
2128
+ function pa({
2102
2129
  onSuccess: e,
2103
- styles: t = vt,
2130
+ styles: t = yt,
2104
2131
  initialRoleID: r
2105
2132
  }) {
2106
- const n = Ze(), [i, s] = F.useState(!1), l = () => s(!0), d = () => s(!1), p = (f, h) => {
2133
+ const n = Xe(), [i, s] = F.useState(!1), l = () => s(!0), d = () => s(!1), p = (f, h) => {
2107
2134
  d(), n.openModal({
2108
2135
  title: "API Key is generated",
2109
- children: /* @__PURE__ */ a.jsxs(Ke, { children: [
2136
+ children: /* @__PURE__ */ a.jsxs(Ze, { children: [
2110
2137
  /* @__PURE__ */ a.jsx(ke, { color: "dimmed", children: "Make sure you save it - you won't be able to access it again." }),
2111
2138
  /* @__PURE__ */ a.jsx(Q, { defaultValue: f, disabled: !0, label: "APP ID", styles: {
2112
2139
  input: {
@@ -2118,8 +2145,8 @@ function ca({
2118
2145
  cursor: "text !important"
2119
2146
  }
2120
2147
  } }),
2121
- /* @__PURE__ */ a.jsx(D, { size: "sm", onClick: () => {
2122
- ln();
2148
+ /* @__PURE__ */ a.jsx(I, { size: "sm", onClick: () => {
2149
+ gn();
2123
2150
  }, children: "I've saved this API Key" })
2124
2151
  ] }),
2125
2152
  onClose: () => {
@@ -2130,37 +2157,40 @@ function ca({
2130
2157
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
2131
2158
  /* @__PURE__ */ a.jsx(xe, { opened: i, onClose: () => s(!1), title: "Add an API Key", trapFocus: !0, onDragStart: (f) => {
2132
2159
  f.stopPropagation();
2133
- }, children: /* @__PURE__ */ a.jsx(ua, { postSubmit: p, styles: t, initialRoleID: r }) }),
2134
- /* @__PURE__ */ a.jsx(D, { size: t.button.size, onClick: l, leftIcon: /* @__PURE__ */ a.jsx(ht, { size: 20 }), children: "Add an API Key" })
2160
+ }, children: /* @__PURE__ */ a.jsx(da, { postSubmit: p, styles: t, initialRoleID: r }) }),
2161
+ /* @__PURE__ */ a.jsx(I, { size: t.button.size, onClick: l, leftIcon: /* @__PURE__ */ a.jsx(mt, { size: 20 }), children: "Add an API Key" })
2135
2162
  ] });
2136
2163
  }
2137
- function da({
2164
+ function fa({
2138
2165
  id: e,
2139
2166
  name: t,
2140
2167
  onSuccess: r,
2141
- styles: n = vt
2168
+ styles: n = yt
2142
2169
  }) {
2143
- const i = Ze(), s = async () => {
2170
+ const i = Xe(), s = async () => {
2144
2171
  if (e) {
2145
2172
  oe({
2146
2173
  id: "for-deleting",
2147
2174
  title: "Pending",
2148
2175
  message: "Deleting API Key...",
2149
- loading: !0
2176
+ loading: !0,
2177
+ autoClose: !1
2150
2178
  });
2151
2179
  try {
2152
2180
  await Z.api_key.delete(e), P({
2153
2181
  id: "for-deleting",
2154
2182
  title: "Successful",
2155
2183
  message: `API Key [${t}] is deleted`,
2156
- color: "green"
2184
+ color: "green",
2185
+ autoClose: !0
2157
2186
  }), r();
2158
2187
  } catch (d) {
2159
2188
  P({
2160
2189
  id: "for-deleting",
2161
2190
  title: "Failed",
2162
2191
  message: d.message,
2163
- color: "red"
2192
+ color: "red",
2193
+ autoClose: !0
2164
2194
  });
2165
2195
  }
2166
2196
  }
@@ -2173,14 +2203,14 @@ function da({
2173
2203
  onCancel: () => console.log("Cancel"),
2174
2204
  onConfirm: s
2175
2205
  });
2176
- return /* @__PURE__ */ a.jsx(D, { size: n.button.size, color: "red", onClick: l, leftIcon: /* @__PURE__ */ a.jsx(mt, { size: 20 }), children: "Delete" });
2206
+ return /* @__PURE__ */ a.jsx(I, { size: n.button.size, color: "red", onClick: l, leftIcon: /* @__PURE__ */ a.jsx(bt, { size: 20 }), children: "Delete" });
2177
2207
  }
2178
- function ai({
2179
- styles: e = vt,
2208
+ function oi({
2209
+ styles: e = yt,
2180
2210
  config: t
2181
2211
  }) {
2182
2212
  var d;
2183
- Xe(t);
2213
+ Qe(t);
2184
2214
  const {
2185
2215
  data: r = [],
2186
2216
  loading: n,
@@ -2204,12 +2234,12 @@ function ai({
2204
2234
  refreshDeps: []
2205
2235
  });
2206
2236
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
2207
- /* @__PURE__ */ a.jsx(z, { pt: e.spacing, position: "right", children: /* @__PURE__ */ a.jsx(ca, { onSuccess: i, initialRoleID: ((d = s == null ? void 0 : s[0]) == null ? void 0 : d.value) ?? "INACTIVE" }) }),
2237
+ /* @__PURE__ */ a.jsx(z, { pt: e.spacing, position: "right", children: /* @__PURE__ */ a.jsx(pa, { onSuccess: i, initialRoleID: ((d = s == null ? void 0 : s[0]) == null ? void 0 : d.value) ?? "INACTIVE" }) }),
2208
2238
  /* @__PURE__ */ a.jsxs(X, { mt: e.spacing, sx: {
2209
2239
  position: "relative"
2210
2240
  }, children: [
2211
- /* @__PURE__ */ a.jsx(pt, { visible: n || l }),
2212
- /* @__PURE__ */ a.jsxs(ft, { horizontalSpacing: e.spacing, verticalSpacing: e.spacing, fontSize: e.size, highlightOnHover: !0, children: [
2241
+ /* @__PURE__ */ a.jsx(ft, { visible: n || l }),
2242
+ /* @__PURE__ */ a.jsxs(gt, { horizontalSpacing: e.spacing, verticalSpacing: e.spacing, fontSize: e.size, highlightOnHover: !0, children: [
2213
2243
  /* @__PURE__ */ a.jsx("thead", { children: /* @__PURE__ */ a.jsxs("tr", { children: [
2214
2244
  /* @__PURE__ */ a.jsx("th", { children: "Name" }),
2215
2245
  /* @__PURE__ */ a.jsx("th", { children: "APP ID" }),
@@ -2227,14 +2257,14 @@ function ai({
2227
2257
  /* @__PURE__ */ a.jsx("td", { width: 200, children: h }),
2228
2258
  /* @__PURE__ */ a.jsx("td", { width: 200, children: c }),
2229
2259
  /* @__PURE__ */ a.jsx("td", { width: 200, children: u }),
2230
- /* @__PURE__ */ a.jsx("td", { width: 200, children: /* @__PURE__ */ a.jsx(z, { position: "left", children: /* @__PURE__ */ a.jsx(da, { id: f, name: h, onSuccess: i }) }) })
2260
+ /* @__PURE__ */ a.jsx("td", { width: 200, children: /* @__PURE__ */ a.jsx(z, { position: "left", children: /* @__PURE__ */ a.jsx(fa, { id: f, name: h, onSuccess: i }) }) })
2231
2261
  ] }, f);
2232
2262
  }) })
2233
2263
  ] })
2234
2264
  ] })
2235
2265
  ] });
2236
2266
  }
2237
- const br = ({
2267
+ const vr = ({
2238
2268
  value: e,
2239
2269
  onChange: t,
2240
2270
  height: r = "200px",
@@ -2243,7 +2273,7 @@ const br = ({
2243
2273
  const i = (l) => {
2244
2274
  console.log("changing"), t == null || t(l ?? "");
2245
2275
  }, s = !t;
2246
- return /* @__PURE__ */ a.jsx(cr, { className: "minimal-monaco-editor", height: r, defaultLanguage: n, value: e, onChange: s ? void 0 : i, theme: "vs-dark", options: {
2276
+ return /* @__PURE__ */ a.jsx(pr, { className: "minimal-monaco-editor", height: r, defaultLanguage: n, value: e, onChange: s ? void 0 : i, theme: "vs-dark", options: {
2247
2277
  lineNumbers: "off",
2248
2278
  folding: !1,
2249
2279
  lineDecorationsWidth: 20,
@@ -2254,16 +2284,16 @@ const br = ({
2254
2284
  },
2255
2285
  readOnly: s || !t
2256
2286
  } });
2257
- }, Pe = {
2287
+ }, Me = {
2258
2288
  size: "sm",
2259
2289
  spacing: "md",
2260
2290
  button: {
2261
2291
  size: "xs"
2262
2292
  }
2263
2293
  };
2264
- function pa({
2294
+ function ga({
2265
2295
  postSubmit: e,
2266
- styles: t = Pe
2296
+ styles: t = Me
2267
2297
  }) {
2268
2298
  const {
2269
2299
  control: r,
@@ -2279,40 +2309,43 @@ function pa({
2279
2309
  id: "for-creating",
2280
2310
  title: "Pending",
2281
2311
  message: "Adding SQL Snippet...",
2282
- loading: !0
2312
+ loading: !0,
2313
+ autoClose: !1
2283
2314
  }), await Z.sql_snippet.create(s), P({
2284
2315
  id: "for-creating",
2285
2316
  title: "Successful",
2286
2317
  message: "SQL Snippet is added",
2287
- color: "green"
2318
+ color: "green",
2319
+ autoClose: !0
2288
2320
  }), e();
2289
2321
  } catch (l) {
2290
2322
  P({
2291
2323
  id: "for-creating",
2292
2324
  title: "Failed",
2293
2325
  message: l.message,
2294
- color: "red"
2326
+ color: "red",
2327
+ autoClose: !0
2295
2328
  });
2296
2329
  }
2297
2330
  };
2298
2331
  return /* @__PURE__ */ a.jsx(X, { mx: "auto", children: /* @__PURE__ */ a.jsxs("form", { onSubmit: n(i), children: [
2299
- /* @__PURE__ */ a.jsx(O, { name: "id", control: r, render: ({
2332
+ /* @__PURE__ */ a.jsx(R, { name: "id", control: r, render: ({
2300
2333
  field: s
2301
2334
  }) => /* @__PURE__ */ a.jsx(Q, { mb: t.spacing, size: t.size, required: !0, label: "Name", ...s }) }),
2302
- /* @__PURE__ */ a.jsx(O, { name: "content", control: r, render: ({
2335
+ /* @__PURE__ */ a.jsx(R, { name: "content", control: r, render: ({
2303
2336
  field: s
2304
- }) => /* @__PURE__ */ a.jsxs(Ke, { spacing: 4, children: [
2337
+ }) => /* @__PURE__ */ a.jsxs(Ze, { spacing: 4, children: [
2305
2338
  /* @__PURE__ */ a.jsx(ke, { size: 14, fw: 500, color: "#212529", sx: {
2306
2339
  cursor: "default"
2307
2340
  }, children: "Content" }),
2308
- /* @__PURE__ */ a.jsx(br, { height: "600px", ...s })
2341
+ /* @__PURE__ */ a.jsx(vr, { height: "600px", ...s })
2309
2342
  ] }) }),
2310
- /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(D, { type: "submit", size: t.button.size, children: "Save" }) })
2343
+ /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(I, { type: "submit", color: "green", leftIcon: /* @__PURE__ */ a.jsx(Pe, { size: 16 }), size: t.button.size, children: "Submit" }) })
2311
2344
  ] }) });
2312
2345
  }
2313
- function fa({
2346
+ function ha({
2314
2347
  onSuccess: e,
2315
- styles: t = Pe
2348
+ styles: t = Me
2316
2349
  }) {
2317
2350
  const [r, n] = F.useState(!1), i = () => n(!0), s = () => n(!1), l = () => {
2318
2351
  s(), e();
@@ -2320,13 +2353,13 @@ function fa({
2320
2353
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
2321
2354
  /* @__PURE__ */ a.jsx(xe, { opened: r, onClose: () => n(!1), title: "Add a SQL Snippet", trapFocus: !0, onDragStart: (d) => {
2322
2355
  d.stopPropagation();
2323
- }, size: "80vw", children: /* @__PURE__ */ a.jsx(pa, { postSubmit: l, styles: t }) }),
2324
- /* @__PURE__ */ a.jsx(D, { size: t.button.size, onClick: i, leftIcon: /* @__PURE__ */ a.jsx(ht, { size: 18 }), children: "Add a SQL Snippet" })
2356
+ }, size: "80vw", children: /* @__PURE__ */ a.jsx(ga, { postSubmit: l, styles: t }) }),
2357
+ /* @__PURE__ */ a.jsx(I, { size: t.button.size, onClick: i, leftIcon: /* @__PURE__ */ a.jsx(mt, { size: 18 }), children: "Add a SQL Snippet" })
2325
2358
  ] });
2326
2359
  }
2327
- function ga({
2360
+ function ma({
2328
2361
  postSubmit: e,
2329
- styles: t = Pe,
2362
+ styles: t = Me,
2330
2363
  id: r,
2331
2364
  content: n
2332
2365
  }) {
@@ -2344,40 +2377,43 @@ function ga({
2344
2377
  id: "for-updating",
2345
2378
  title: "Pending",
2346
2379
  message: "Updating SQL Snippet...",
2347
- loading: !0
2380
+ loading: !0,
2381
+ autoClose: !1
2348
2382
  }), await Z.sql_snippet.update(d), P({
2349
2383
  id: "for-updating",
2350
2384
  title: "Successful",
2351
2385
  message: "SQL Snippet is updated",
2352
- color: "green"
2386
+ color: "green",
2387
+ autoClose: !0
2353
2388
  }), e();
2354
2389
  } catch (p) {
2355
2390
  P({
2356
2391
  id: "for-updating",
2357
2392
  title: "Failed",
2358
2393
  message: p.message,
2359
- color: "red"
2394
+ color: "red",
2395
+ autoClose: !0
2360
2396
  });
2361
2397
  }
2362
2398
  };
2363
2399
  return /* @__PURE__ */ a.jsx(X, { mx: "auto", children: /* @__PURE__ */ a.jsxs("form", { onSubmit: s(l), children: [
2364
- /* @__PURE__ */ a.jsx(O, { name: "id", control: i, render: ({
2400
+ /* @__PURE__ */ a.jsx(R, { name: "id", control: i, render: ({
2365
2401
  field: d
2366
2402
  }) => /* @__PURE__ */ a.jsx(Q, { mb: t.spacing, size: t.size, required: !0, label: "Name", ...d }) }),
2367
- /* @__PURE__ */ a.jsx(O, { name: "content", control: i, render: ({
2403
+ /* @__PURE__ */ a.jsx(R, { name: "content", control: i, render: ({
2368
2404
  field: d
2369
- }) => /* @__PURE__ */ a.jsxs(Ke, { spacing: 4, children: [
2405
+ }) => /* @__PURE__ */ a.jsxs(Ze, { spacing: 4, children: [
2370
2406
  /* @__PURE__ */ a.jsx(ke, { size: 14, fw: 500, color: "#212529", sx: {
2371
2407
  cursor: "default"
2372
2408
  }, children: "Content" }),
2373
- /* @__PURE__ */ a.jsx(br, { height: "600px", ...d })
2409
+ /* @__PURE__ */ a.jsx(vr, { height: "600px", ...d })
2374
2410
  ] }) }),
2375
- /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(D, { type: "submit", size: t.button.size, children: "Save" }) })
2411
+ /* @__PURE__ */ a.jsx(z, { position: "right", mt: t.spacing, children: /* @__PURE__ */ a.jsx(I, { type: "submit", color: "green", leftIcon: /* @__PURE__ */ a.jsx(Pe, { size: 16 }), size: t.button.size, children: "Submit" }) })
2376
2412
  ] }) });
2377
2413
  }
2378
- function ha({
2414
+ function ba({
2379
2415
  onSuccess: e,
2380
- styles: t = Pe,
2416
+ styles: t = Me,
2381
2417
  ...r
2382
2418
  }) {
2383
2419
  const [n, i] = F.useState(!1), s = () => i(!0), l = () => i(!1), d = () => {
@@ -2386,8 +2422,8 @@ function ha({
2386
2422
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
2387
2423
  /* @__PURE__ */ a.jsx(xe, { opened: n, onClose: () => i(!1), title: "Edit a SQL Snippet", trapFocus: !0, onDragStart: (p) => {
2388
2424
  p.stopPropagation();
2389
- }, size: "80vw", children: /* @__PURE__ */ a.jsx(ga, { postSubmit: d, styles: t, ...r }) }),
2390
- /* @__PURE__ */ a.jsx(D, { size: t.button.size, onClick: s, leftIcon: /* @__PURE__ */ a.jsx(Tt, { size: 18 }), children: "Edit" })
2425
+ }, size: "80vw", children: /* @__PURE__ */ a.jsx(ma, { postSubmit: d, styles: t, ...r }) }),
2426
+ /* @__PURE__ */ a.jsx(I, { size: t.button.size, onClick: s, leftIcon: /* @__PURE__ */ a.jsx(jt, { size: 18 }), children: "Edit" })
2391
2427
  ] });
2392
2428
  }
2393
2429
  /**
@@ -5363,7 +5399,7 @@ b.languages.wasm = {
5363
5399
  number: /[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/,
5364
5400
  punctuation: /[()]/
5365
5401
  };
5366
- var ma = {
5402
+ var va = {
5367
5403
  plain: {
5368
5404
  backgroundColor: "#2a2734",
5369
5405
  color: "#9a86fd"
@@ -5430,13 +5466,13 @@ var ma = {
5430
5466
  }
5431
5467
  }]
5432
5468
  };
5433
- const ba = ma;
5434
- var va = {
5469
+ const ya = va;
5470
+ var Sa = {
5435
5471
  // $FlowFixMe
5436
5472
  Prism: b,
5437
- theme: ba
5473
+ theme: ya
5438
5474
  };
5439
- function He(e, t, r) {
5475
+ function qe(e, t, r) {
5440
5476
  return t in e ? Object.defineProperty(e, t, {
5441
5477
  value: r,
5442
5478
  enumerable: !0,
@@ -5454,7 +5490,7 @@ function Se() {
5454
5490
  return e;
5455
5491
  }, Se.apply(this, arguments);
5456
5492
  }
5457
- var ya = /\r\n|\r|\n/, rr = function(e) {
5493
+ var xa = /\r\n|\r|\n/, nr = function(e) {
5458
5494
  e.length === 0 ? e.push({
5459
5495
  types: ["plain"],
5460
5496
  content: `
@@ -5462,32 +5498,32 @@ var ya = /\r\n|\r|\n/, rr = function(e) {
5462
5498
  empty: !0
5463
5499
  }) : e.length === 1 && e[0].content === "" && (e[0].content = `
5464
5500
  `, e[0].empty = !0);
5465
- }, nr = function(e, t) {
5501
+ }, ar = function(e, t) {
5466
5502
  var r = e.length;
5467
5503
  return r > 0 && e[r - 1] === t ? e : e.concat(t);
5468
- }, Sa = function(e) {
5504
+ }, wa = function(e) {
5469
5505
  for (var t = [[]], r = [e], n = [0], i = [e.length], s = 0, l = 0, d = [], p = [d]; l > -1; ) {
5470
5506
  for (; (s = n[l]++) < i[l]; ) {
5471
5507
  var f = void 0, h = t[l], c = r[l], u = c[s];
5472
- if (typeof u == "string" ? (h = l > 0 ? h : ["plain"], f = u) : (h = nr(h, u.type), u.alias && (h = nr(h, u.alias)), f = u.content), typeof f != "string") {
5508
+ if (typeof u == "string" ? (h = l > 0 ? h : ["plain"], f = u) : (h = ar(h, u.type), u.alias && (h = ar(h, u.alias)), f = u.content), typeof f != "string") {
5473
5509
  l++, t.push(h), r.push(f), n.push(0), i.push(f.length);
5474
5510
  continue;
5475
5511
  }
5476
- var g = f.split(ya), v = g.length;
5512
+ var g = f.split(xa), v = g.length;
5477
5513
  d.push({
5478
5514
  types: h,
5479
5515
  content: g[0]
5480
5516
  });
5481
5517
  for (var m = 1; m < v; m++)
5482
- rr(d), p.push(d = []), d.push({
5518
+ nr(d), p.push(d = []), d.push({
5483
5519
  types: h,
5484
5520
  content: g[m]
5485
5521
  });
5486
5522
  }
5487
5523
  l--, t.pop(), r.pop(), n.pop(), i.pop();
5488
5524
  }
5489
- return rr(d), p;
5490
- }, xa = function(e, t) {
5525
+ return nr(d), p;
5526
+ }, Ea = function(e, t) {
5491
5527
  var r = e.plain, n = /* @__PURE__ */ Object.create(null), i = e.styles.reduce(function(s, l) {
5492
5528
  var d = l.languages, p = l.style;
5493
5529
  return d && !d.includes(t) || l.types.forEach(function(f) {
@@ -5499,30 +5535,30 @@ var ya = /\r\n|\r|\n/, rr = function(e) {
5499
5535
  backgroundColor: null
5500
5536
  }), i;
5501
5537
  };
5502
- function ar(e, t) {
5538
+ function ir(e, t) {
5503
5539
  var r = {};
5504
5540
  for (var n in e)
5505
5541
  Object.prototype.hasOwnProperty.call(e, n) && t.indexOf(n) === -1 && (r[n] = e[n]);
5506
5542
  return r;
5507
5543
  }
5508
- var wa = /* @__PURE__ */ function(e) {
5544
+ var _a = /* @__PURE__ */ function(e) {
5509
5545
  function t() {
5510
5546
  for (var r = this, n = [], i = arguments.length; i--; )
5511
5547
  n[i] = arguments[i];
5512
- e.apply(this, n), He(this, "getThemeDict", function(s) {
5548
+ e.apply(this, n), qe(this, "getThemeDict", function(s) {
5513
5549
  if (r.themeDict !== void 0 && s.theme === r.prevTheme && s.language === r.prevLanguage)
5514
5550
  return r.themeDict;
5515
5551
  r.prevTheme = s.theme, r.prevLanguage = s.language;
5516
- var l = s.theme ? xa(s.theme, s.language) : void 0;
5552
+ var l = s.theme ? Ea(s.theme, s.language) : void 0;
5517
5553
  return r.themeDict = l;
5518
- }), He(this, "getLineProps", function(s) {
5519
- var l = s.key, d = s.className, p = s.style, f = ar(s, ["key", "className", "style", "line"]), h = f, c = Se({}, h, {
5554
+ }), qe(this, "getLineProps", function(s) {
5555
+ var l = s.key, d = s.className, p = s.style, f = ir(s, ["key", "className", "style", "line"]), h = f, c = Se({}, h, {
5520
5556
  className: "token-line",
5521
5557
  style: void 0,
5522
5558
  key: void 0
5523
5559
  }), u = r.getThemeDict(r.props);
5524
5560
  return u !== void 0 && (c.style = u.plain), p !== void 0 && (c.style = c.style !== void 0 ? Se({}, c.style, p) : p), l !== void 0 && (c.key = l), d && (c.className += " " + d), c;
5525
- }), He(this, "getStyleForToken", function(s) {
5561
+ }), qe(this, "getStyleForToken", function(s) {
5526
5562
  var l = s.types, d = s.empty, p = l.length, f = r.getThemeDict(r.props);
5527
5563
  if (f !== void 0) {
5528
5564
  {
@@ -5540,15 +5576,15 @@ var wa = /* @__PURE__ */ function(e) {
5540
5576
  });
5541
5577
  return Object.assign.apply(Object, [h].concat(c));
5542
5578
  }
5543
- }), He(this, "getTokenProps", function(s) {
5544
- var l = s.key, d = s.className, p = s.style, f = s.token, h = ar(s, ["key", "className", "style", "token"]), c = h, u = Se({}, c, {
5579
+ }), qe(this, "getTokenProps", function(s) {
5580
+ var l = s.key, d = s.className, p = s.style, f = s.token, h = ir(s, ["key", "className", "style", "token"]), c = h, u = Se({}, c, {
5545
5581
  className: "token " + f.types.join(" "),
5546
5582
  children: f.content,
5547
5583
  style: r.getStyleForToken(f),
5548
5584
  key: void 0
5549
5585
  });
5550
5586
  return p !== void 0 && (u.style = u.style !== void 0 ? Se({}, u.style, p) : p), l !== void 0 && (u.key = l), d && (u.className += " " + d), u;
5551
- }), He(this, "tokenize", function(s, l, d, p) {
5587
+ }), qe(this, "tokenize", function(s, l, d, p) {
5552
5588
  var f = {
5553
5589
  code: l,
5554
5590
  grammar: d,
@@ -5561,7 +5597,7 @@ var wa = /* @__PURE__ */ function(e) {
5561
5597
  });
5562
5598
  }
5563
5599
  return e && (t.__proto__ = e), t.prototype = Object.create(e && e.prototype), t.prototype.constructor = t, t.prototype.render = function() {
5564
- var n = this.props, i = n.Prism, s = n.language, l = n.code, d = n.children, p = this.getThemeDict(this.props), f = i.languages[s], h = f !== void 0 ? this.tokenize(i, l, f, s) : [l], c = Sa(h);
5600
+ var n = this.props, i = n.Prism, s = n.language, l = n.code, d = n.children, p = this.getThemeDict(this.props), f = i.languages[s], h = f !== void 0 ? this.tokenize(i, l, f, s) : [l], c = wa(h);
5565
5601
  return d({
5566
5602
  tokens: c,
5567
5603
  className: "prism-code language-" + s,
@@ -5570,9 +5606,9 @@ var wa = /* @__PURE__ */ function(e) {
5570
5606
  getTokenProps: this.getTokenProps
5571
5607
  });
5572
5608
  }, t;
5573
- }(Vr);
5574
- const Ea = wa;
5575
- function vr({ copied: e }) {
5609
+ }(Wr);
5610
+ const Aa = _a;
5611
+ function yr({ copied: e }) {
5576
5612
  return /* @__PURE__ */ F.createElement("svg", {
5577
5613
  viewBox: "0 0 15 15",
5578
5614
  fill: "none",
@@ -5590,8 +5626,8 @@ function vr({ copied: e }) {
5590
5626
  clipRule: "evenodd"
5591
5627
  }));
5592
5628
  }
5593
- vr.displayName = "@mantine/prism/CopyIcon";
5594
- const _a = (e) => ({
5629
+ yr.displayName = "@mantine/prism/CopyIcon";
5630
+ const ka = (e) => ({
5595
5631
  plain: {
5596
5632
  color: e.colors.gray[4],
5597
5633
  backgroundColor: e.colors.dark[8]
@@ -5676,7 +5712,7 @@ const _a = (e) => ({
5676
5712
  }
5677
5713
  }
5678
5714
  ]
5679
- }), Aa = (e) => ({
5715
+ }), Ta = (e) => ({
5680
5716
  plain: {
5681
5717
  color: e.colors.gray[9],
5682
5718
  backgroundColor: e.fn.rgba(e.colors.gray[0], 0.65)
@@ -5767,8 +5803,8 @@ const _a = (e) => ({
5767
5803
  }
5768
5804
  }
5769
5805
  ]
5770
- }), ka = (e, t) => t === "dark" ? _a(e) : Aa(e);
5771
- var Ta = lr((e, { colorScheme: t, native: r, maxLineSize: n, radius: i }) => ({
5806
+ }), ja = (e, t) => t === "dark" ? ka(e) : Ta(e);
5807
+ var Ca = ur((e, { colorScheme: t, native: r, maxLineSize: n, radius: i }) => ({
5772
5808
  scrollArea: {},
5773
5809
  root: {
5774
5810
  position: "relative"
@@ -5778,7 +5814,7 @@ var Ta = lr((e, { colorScheme: t, native: r, maxLineSize: n, radius: i }) => ({
5778
5814
  position: "relative",
5779
5815
  fontFamily: e.fontFamilyMonospace,
5780
5816
  lineHeight: 1.7,
5781
- fontSize: Ve(13),
5817
+ fontSize: We(13),
5782
5818
  overflowX: r ? "auto" : void 0,
5783
5819
  borderRadius: e.fn.radius(i),
5784
5820
  padding: `${e.spacing.sm} 0`,
@@ -5805,7 +5841,7 @@ var Ta = lr((e, { colorScheme: t, native: r, maxLineSize: n, radius: i }) => ({
5805
5841
  lineNumber: {
5806
5842
  color: t === "dark" ? e.colors.dark[4] : e.colors.gray[4],
5807
5843
  textAlign: "right",
5808
- width: `calc(8 * ${Ve(n)})`,
5844
+ width: `calc(8 * ${We(n)})`,
5809
5845
  marginRight: e.dir === "ltr" ? e.spacing.xs : void 0,
5810
5846
  marginLeft: e.dir === "rtl" ? e.spacing.xs : void 0,
5811
5847
  userSelect: "none"
@@ -5814,34 +5850,34 @@ var Ta = lr((e, { colorScheme: t, native: r, maxLineSize: n, radius: i }) => ({
5814
5850
  width: "100%"
5815
5851
  }
5816
5852
  }));
5817
- const ja = Ta;
5818
- var Ra = Object.defineProperty, Oa = Object.defineProperties, Ca = Object.getOwnPropertyDescriptors, ot = Object.getOwnPropertySymbols, yr = Object.prototype.hasOwnProperty, Sr = Object.prototype.propertyIsEnumerable, ir = (e, t, r) => t in e ? Ra(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Ie = (e, t) => {
5853
+ const Ra = Ca;
5854
+ var Oa = Object.defineProperty, Ia = Object.defineProperties, Da = Object.getOwnPropertyDescriptors, lt = Object.getOwnPropertySymbols, Sr = Object.prototype.hasOwnProperty, xr = Object.prototype.propertyIsEnumerable, sr = (e, t, r) => t in e ? Oa(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, De = (e, t) => {
5819
5855
  for (var r in t || (t = {}))
5820
- yr.call(t, r) && ir(e, r, t[r]);
5821
- if (ot)
5822
- for (var r of ot(t))
5823
- Sr.call(t, r) && ir(e, r, t[r]);
5856
+ Sr.call(t, r) && sr(e, r, t[r]);
5857
+ if (lt)
5858
+ for (var r of lt(t))
5859
+ xr.call(t, r) && sr(e, r, t[r]);
5824
5860
  return e;
5825
- }, qe = (e, t) => Oa(e, Ca(t)), Da = (e, t) => {
5861
+ }, Ye = (e, t) => Ia(e, Da(t)), La = (e, t) => {
5826
5862
  var r = {};
5827
5863
  for (var n in e)
5828
- yr.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
5829
- if (e != null && ot)
5830
- for (var n of ot(e))
5831
- t.indexOf(n) < 0 && Sr.call(e, n) && (r[n] = e[n]);
5864
+ Sr.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
5865
+ if (e != null && lt)
5866
+ for (var n of lt(e))
5867
+ t.indexOf(n) < 0 && xr.call(e, n) && (r[n] = e[n]);
5832
5868
  return r;
5833
5869
  };
5834
- const Ia = {
5870
+ const Fa = {
5835
5871
  noCopy: !1,
5836
5872
  copyLabel: "Copy code",
5837
5873
  copiedLabel: "Copied",
5838
5874
  withLineNumbers: !1,
5839
5875
  trim: !0,
5840
5876
  highlightLines: {},
5841
- scrollAreaComponent: ur,
5842
- getPrismTheme: ka
5843
- }, Nt = ut((e, t) => {
5844
- const r = Jr("Prism", Ia, e), {
5877
+ scrollAreaComponent: cr,
5878
+ getPrismTheme: ja
5879
+ }, $t = ct((e, t) => {
5880
+ const r = en("Prism", Fa, e), {
5845
5881
  className: n,
5846
5882
  children: i,
5847
5883
  language: s,
@@ -5859,7 +5895,7 @@ const Ia = {
5859
5895
  radius: w,
5860
5896
  getPrismTheme: S,
5861
5897
  variant: _
5862
- } = r, k = Da(r, [
5898
+ } = r, k = La(r, [
5863
5899
  "className",
5864
5900
  "children",
5865
5901
  "language",
@@ -5878,18 +5914,18 @@ const Ia = {
5878
5914
  "getPrismTheme",
5879
5915
  "variant"
5880
5916
  ]), H = m && typeof i == "string" ? i.trim() : i, J = H.split(`
5881
- `).length.toString().length, N = en(), q = fn(), $ = v || N.colorScheme, { classes: te, cx: L } = ja({
5917
+ `).length.toString().length, N = tn(), q = hn(), $ = v || N.colorScheme, { classes: te, cx: L } = Ra({
5882
5918
  colorScheme: $,
5883
- native: g !== ur,
5919
+ native: g !== cr,
5884
5920
  maxLineSize: J,
5885
5921
  radius: w
5886
5922
  }, { name: "Prism", classNames: d, styles: p, unstyled: x, variant: _ });
5887
- return /* @__PURE__ */ F.createElement(X, qe(Ie({
5923
+ return /* @__PURE__ */ F.createElement(X, Ye(De({
5888
5924
  className: L(te.root, n),
5889
5925
  ref: t
5890
5926
  }, k), {
5891
5927
  translate: "no"
5892
- }), !l && /* @__PURE__ */ F.createElement(at, {
5928
+ }), !l && /* @__PURE__ */ F.createElement(it, {
5893
5929
  label: q.copied ? h : f,
5894
5930
  position: "left",
5895
5931
  withArrow: !0,
@@ -5902,9 +5938,9 @@ const Ia = {
5902
5938
  "aria-label": q.copied ? h : f,
5903
5939
  onClick: () => q.copy(H),
5904
5940
  unstyled: x
5905
- }, /* @__PURE__ */ F.createElement(vr, {
5941
+ }, /* @__PURE__ */ F.createElement(yr, {
5906
5942
  copied: q.copied
5907
- }))), /* @__PURE__ */ F.createElement(Ea, qe(Ie({}, va), {
5943
+ }))), /* @__PURE__ */ F.createElement(Aa, Ye(De({}, Sa), {
5908
5944
  theme: S(N, $),
5909
5945
  code: H,
5910
5946
  language: s
@@ -5927,9 +5963,9 @@ const Ia = {
5927
5963
  `)
5928
5964
  return null;
5929
5965
  const ie = re + 1, fe = M({ line: W, key: re }), Ee = ie in u, ge = $ === "dark" ? N.fn.rgba(N.fn.themeColor((ue = u[ie]) == null ? void 0 : ue.color, 9), 0.25) : N.fn.themeColor((ce = u[ie]) == null ? void 0 : ce.color, 0);
5930
- return /* @__PURE__ */ F.createElement("div", qe(Ie({}, fe), {
5966
+ return /* @__PURE__ */ F.createElement("div", Ye(De({}, fe), {
5931
5967
  className: L(te.line, fe.className),
5932
- style: Ie({}, Ee ? { backgroundColor: ge } : null)
5968
+ style: De({}, Ee ? { backgroundColor: ge } : null)
5933
5969
  }), c && /* @__PURE__ */ F.createElement("div", {
5934
5970
  className: te.lineNumber,
5935
5971
  style: {
@@ -5937,24 +5973,24 @@ const Ia = {
5937
5973
  }
5938
5974
  }, ((be = u[ie]) == null ? void 0 : be.label) || ie), /* @__PURE__ */ F.createElement("div", {
5939
5975
  className: te.lineContent
5940
- }, W.map((Me, je) => {
5941
- var Re, _e;
5942
- const Oe = ae({ token: Me, key: je });
5943
- return /* @__PURE__ */ F.createElement("span", qe(Ie({}, Oe), {
5944
- style: qe(Ie({}, Oe.style), {
5945
- color: Ee ? N.fn.themeColor((Re = u[ie]) == null ? void 0 : Re.color, $ === "dark" ? 5 : 8) : (_e = Oe == null ? void 0 : Oe.style) == null ? void 0 : _e.color
5976
+ }, W.map((Be, je) => {
5977
+ var Ce, _e;
5978
+ const Re = ae({ token: Be, key: je });
5979
+ return /* @__PURE__ */ F.createElement("span", Ye(De({}, Re), {
5980
+ style: Ye(De({}, Re.style), {
5981
+ color: Ee ? N.fn.themeColor((Ce = u[ie]) == null ? void 0 : Ce.color, $ === "dark" ? 5 : 8) : (_e = Re == null ? void 0 : Re.style) == null ? void 0 : _e.color
5946
5982
  })
5947
5983
  }));
5948
5984
  })));
5949
5985
  }).filter(Boolean)))));
5950
5986
  });
5951
- Nt.displayName = "@mantine/prism/Prism";
5952
- var La = lr((e, { radius: t }) => ({
5987
+ $t.displayName = "@mantine/prism/Prism";
5988
+ var Na = ur((e, { radius: t }) => ({
5953
5989
  tab: {
5954
5990
  paddingLeft: e.spacing.sm,
5955
5991
  paddingRight: e.spacing.sm,
5956
- height: Ve(34),
5957
- border: `${Ve(1)} solid ${e.colorScheme === "dark" ? e.colors.dark[5] : e.colors.gray[3]}`,
5992
+ height: We(34),
5993
+ border: `${We(1)} solid ${e.colorScheme === "dark" ? e.colors.dark[5] : e.colors.gray[3]}`,
5958
5994
  borderBottom: 0,
5959
5995
  fontSize: e.fontSizes.sm,
5960
5996
  color: e.colorScheme === "dark" ? e.colors.dark[1] : e.colors.gray[7],
@@ -5984,7 +6020,7 @@ var La = lr((e, { radius: t }) => ({
5984
6020
  borderRadius: e.fn.radius(t),
5985
6021
  borderTopRightRadius: 0,
5986
6022
  borderTopLeftRadius: 0,
5987
- border: `${Ve(1)} solid ${e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[3]}`,
6023
+ border: `${We(1)} solid ${e.colorScheme === "dark" ? e.colors.dark[4] : e.colors.gray[3]}`,
5988
6024
  borderTop: 0,
5989
6025
  overflow: "hidden"
5990
6026
  },
@@ -5994,32 +6030,32 @@ var La = lr((e, { radius: t }) => ({
5994
6030
  border: 0
5995
6031
  }
5996
6032
  }));
5997
- const xr = La;
5998
- var Fa = Object.defineProperty, Na = Object.defineProperties, $a = Object.getOwnPropertyDescriptors, lt = Object.getOwnPropertySymbols, wr = Object.prototype.hasOwnProperty, Er = Object.prototype.propertyIsEnumerable, sr = (e, t, r) => t in e ? Fa(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, _r = (e, t) => {
6033
+ const wr = Na;
6034
+ var $a = Object.defineProperty, za = Object.defineProperties, Pa = Object.getOwnPropertyDescriptors, ut = Object.getOwnPropertySymbols, Er = Object.prototype.hasOwnProperty, _r = Object.prototype.propertyIsEnumerable, or = (e, t, r) => t in e ? $a(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r, Ar = (e, t) => {
5999
6035
  for (var r in t || (t = {}))
6000
- wr.call(t, r) && sr(e, r, t[r]);
6001
- if (lt)
6002
- for (var r of lt(t))
6003
- Er.call(t, r) && sr(e, r, t[r]);
6036
+ Er.call(t, r) && or(e, r, t[r]);
6037
+ if (ut)
6038
+ for (var r of ut(t))
6039
+ _r.call(t, r) && or(e, r, t[r]);
6004
6040
  return e;
6005
- }, za = (e, t) => Na(e, $a(t)), Pa = (e, t) => {
6041
+ }, Ma = (e, t) => za(e, Pa(t)), Ba = (e, t) => {
6006
6042
  var r = {};
6007
6043
  for (var n in e)
6008
- wr.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
6009
- if (e != null && lt)
6010
- for (var n of lt(e))
6011
- t.indexOf(n) < 0 && Er.call(e, n) && (r[n] = e[n]);
6044
+ Er.call(e, n) && t.indexOf(n) < 0 && (r[n] = e[n]);
6045
+ if (e != null && ut)
6046
+ for (var n of ut(e))
6047
+ t.indexOf(n) < 0 && _r.call(e, n) && (r[n] = e[n]);
6012
6048
  return r;
6013
6049
  };
6014
- function Ma(e) {
6015
- const { classes: t } = xr({ radius: e.radius });
6016
- return /* @__PURE__ */ F.createElement(gt, za(_r({}, e), {
6050
+ function Ua(e) {
6051
+ const { classes: t } = wr({ radius: e.radius });
6052
+ return /* @__PURE__ */ F.createElement(ht, Ma(Ar({}, e), {
6017
6053
  variant: "outline",
6018
6054
  classNames: { tab: t.tab },
6019
6055
  translate: "no"
6020
6056
  }));
6021
6057
  }
6022
- function Ba(e) {
6058
+ function Ga(e) {
6023
6059
  var t = e, {
6024
6060
  language: r,
6025
6061
  children: n,
@@ -6034,7 +6070,7 @@ function Ba(e) {
6034
6070
  getPrismTheme: u,
6035
6071
  colorScheme: g,
6036
6072
  variant: v
6037
- } = t, m = Pa(t, [
6073
+ } = t, m = Ba(t, [
6038
6074
  "language",
6039
6075
  "children",
6040
6076
  "radius",
@@ -6049,8 +6085,8 @@ function Ba(e) {
6049
6085
  "colorScheme",
6050
6086
  "variant"
6051
6087
  ]);
6052
- const { classes: x } = xr({ radius: i });
6053
- return /* @__PURE__ */ F.createElement(gt.Panel, _r({}, m), /* @__PURE__ */ F.createElement(Nt, {
6088
+ const { classes: x } = wr({ radius: i });
6089
+ return /* @__PURE__ */ F.createElement(ht.Panel, Ar({}, m), /* @__PURE__ */ F.createElement($t, {
6054
6090
  language: r,
6055
6091
  classNames: { root: x.prism, code: x.code },
6056
6092
  radius: i,
@@ -6066,37 +6102,40 @@ function Ba(e) {
6066
6102
  variant: v
6067
6103
  }, n));
6068
6104
  }
6069
- const Qe = Nt;
6070
- Qe.Tabs = Ma;
6071
- Qe.Tab = gt.Tab;
6072
- Qe.TabsList = gt.List;
6073
- Qe.Panel = Ba;
6074
- function Ua({
6105
+ const Je = $t;
6106
+ Je.Tabs = Ua;
6107
+ Je.Tab = ht.Tab;
6108
+ Je.TabsList = ht.List;
6109
+ Je.Panel = Ga;
6110
+ function Ha({
6075
6111
  id: e,
6076
6112
  onSuccess: t,
6077
- styles: r = Pe
6113
+ styles: r = Me
6078
6114
  }) {
6079
- const n = Ze(), i = async () => {
6115
+ const n = Xe(), i = async () => {
6080
6116
  if (e) {
6081
6117
  oe({
6082
6118
  id: "for-deleting",
6083
6119
  title: "Pending",
6084
6120
  message: "Deleting SQL Snippet...",
6085
- loading: !0
6121
+ loading: !0,
6122
+ autoClose: !1
6086
6123
  });
6087
6124
  try {
6088
6125
  await Z.sql_snippet.delete(e), P({
6089
6126
  id: "for-deleting",
6090
6127
  title: "Successful",
6091
6128
  message: `SQL Snippet [${e}] is deleted`,
6092
- color: "green"
6129
+ color: "green",
6130
+ autoClose: !0
6093
6131
  }), t();
6094
6132
  } catch (l) {
6095
6133
  P({
6096
6134
  id: "for-deleting",
6097
6135
  title: "Failed",
6098
6136
  message: l.message,
6099
- color: "red"
6137
+ color: "red",
6138
+ autoClose: !0
6100
6139
  });
6101
6140
  }
6102
6141
  }
@@ -6112,21 +6151,21 @@ function Ua({
6112
6151
  color: "red"
6113
6152
  }
6114
6153
  });
6115
- return /* @__PURE__ */ a.jsx(D, { size: r.button.size, color: "red", onClick: s, leftIcon: /* @__PURE__ */ a.jsx(mt, { size: 20 }), children: "Delete" });
6154
+ return /* @__PURE__ */ a.jsx(I, { size: r.button.size, color: "red", onClick: s, leftIcon: /* @__PURE__ */ a.jsx(bt, { size: 20 }), children: "Delete" });
6116
6155
  }
6117
- function Ga({
6156
+ function qa({
6118
6157
  content: e
6119
6158
  }) {
6120
- return /* @__PURE__ */ a.jsxs(_t, { width: "60vw", shadow: "md", children: [
6121
- /* @__PURE__ */ a.jsx(_t.Target, { children: /* @__PURE__ */ a.jsx(Dt, { size: 16, children: /* @__PURE__ */ a.jsx(pn, {}) }) }),
6122
- /* @__PURE__ */ a.jsx(_t.Dropdown, { children: /* @__PURE__ */ a.jsx(Qe, { language: "sql", noCopy: !0, withLineNumbers: !0, children: e }) })
6159
+ return /* @__PURE__ */ a.jsxs(At, { width: "60vw", shadow: "md", children: [
6160
+ /* @__PURE__ */ a.jsx(At.Target, { children: /* @__PURE__ */ a.jsx(Dt, { size: 16, children: /* @__PURE__ */ a.jsx(pn, {}) }) }),
6161
+ /* @__PURE__ */ a.jsx(At.Dropdown, { children: /* @__PURE__ */ a.jsx(Je, { language: "sql", noCopy: !0, withLineNumbers: !0, children: e }) })
6123
6162
  ] });
6124
6163
  }
6125
- function ii({
6126
- styles: e = Pe,
6164
+ function li({
6165
+ styles: e = Me,
6127
6166
  config: t
6128
6167
  }) {
6129
- Xe(t);
6168
+ Qe(t);
6130
6169
  const {
6131
6170
  data: r = [],
6132
6171
  loading: n,
@@ -6145,12 +6184,12 @@ function ii({
6145
6184
  refreshDeps: []
6146
6185
  });
6147
6186
  return /* @__PURE__ */ a.jsxs(a.Fragment, { children: [
6148
- /* @__PURE__ */ a.jsx(z, { pt: e.spacing, position: "right", children: /* @__PURE__ */ a.jsx(fa, { onSuccess: i }) }),
6187
+ /* @__PURE__ */ a.jsx(z, { pt: e.spacing, position: "right", children: /* @__PURE__ */ a.jsx(ha, { onSuccess: i }) }),
6149
6188
  /* @__PURE__ */ a.jsxs(X, { mt: e.spacing, sx: {
6150
6189
  position: "relative"
6151
6190
  }, children: [
6152
- /* @__PURE__ */ a.jsx(pt, { visible: n }),
6153
- /* @__PURE__ */ a.jsxs(ft, { horizontalSpacing: e.spacing, verticalSpacing: e.spacing, fontSize: e.size, highlightOnHover: !0, children: [
6191
+ /* @__PURE__ */ a.jsx(ft, { visible: n }),
6192
+ /* @__PURE__ */ a.jsxs(gt, { horizontalSpacing: e.spacing, verticalSpacing: e.spacing, fontSize: e.size, highlightOnHover: !0, children: [
6154
6193
  /* @__PURE__ */ a.jsx("thead", { children: /* @__PURE__ */ a.jsxs("tr", { children: [
6155
6194
  /* @__PURE__ */ a.jsx("th", { children: "Name" }),
6156
6195
  /* @__PURE__ */ a.jsx("th", {}),
@@ -6167,12 +6206,12 @@ function ii({
6167
6206
  } = s;
6168
6207
  return /* @__PURE__ */ a.jsxs("tr", { children: [
6169
6208
  /* @__PURE__ */ a.jsx("td", { children: l }),
6170
- /* @__PURE__ */ a.jsx("td", { width: 50, children: /* @__PURE__ */ a.jsx(Ga, { content: d }) }),
6209
+ /* @__PURE__ */ a.jsx("td", { width: 50, children: /* @__PURE__ */ a.jsx(qa, { content: d }) }),
6171
6210
  /* @__PURE__ */ a.jsx("td", { width: 200, children: p }),
6172
6211
  /* @__PURE__ */ a.jsx("td", { width: 200, children: f }),
6173
6212
  /* @__PURE__ */ a.jsx("td", { width: 400, children: /* @__PURE__ */ a.jsxs(z, { position: "left", children: [
6174
- /* @__PURE__ */ a.jsx(ha, { ...s, onSuccess: i }),
6175
- /* @__PURE__ */ a.jsx(Ua, { id: l, onSuccess: i })
6213
+ /* @__PURE__ */ a.jsx(ba, { ...s, onSuccess: i }),
6214
+ /* @__PURE__ */ a.jsx(Ha, { id: l, onSuccess: i })
6176
6215
  ] }) })
6177
6216
  ] }, l);
6178
6217
  }) })
@@ -6180,28 +6219,28 @@ function ii({
6180
6219
  ] })
6181
6220
  ] });
6182
6221
  }
6183
- const si = () => import("./package-10c53529.mjs").then(({
6222
+ const ui = () => import("./package-e95cf677.mjs").then(({
6184
6223
  version: e
6185
6224
  }) => (console.log(`[@devtable/dashboard] version: ${e}`), e));
6186
6225
  export {
6187
6226
  G as APIClient,
6188
- ai as APIKeyList,
6189
- ri as AccountList,
6190
- ca as AddAPIKey,
6191
- aa as AddAccount,
6192
- Yn as AddDataSource,
6193
- fa as AddSQLSnippet,
6194
- ti as DataSourceList,
6195
- vn as DefaultApiClient,
6196
- da as DeleteAPIKey,
6197
- ia as DeleteAccount,
6198
- Kn as DeleteDataSource,
6199
- Ua as DeleteSQLSnippet,
6200
- yn as FacadeApiClient,
6201
- ni as Login,
6202
- ii as SQLSnippetList,
6203
- ha as UpdateSQLSnippet,
6204
- Xe as configureAPIClient,
6205
- Sn as facadeApiClient,
6206
- si as getVersion
6227
+ oi as APIKeyList,
6228
+ ii as AccountList,
6229
+ pa as AddAPIKey,
6230
+ sa as AddAccount,
6231
+ Wn as AddDataSource,
6232
+ ha as AddSQLSnippet,
6233
+ ai as DataSourceList,
6234
+ Sn as DefaultApiClient,
6235
+ fa as DeleteAPIKey,
6236
+ oa as DeleteAccount,
6237
+ Xn as DeleteDataSource,
6238
+ Ha as DeleteSQLSnippet,
6239
+ xn as FacadeApiClient,
6240
+ si as Login,
6241
+ li as SQLSnippetList,
6242
+ ba as UpdateSQLSnippet,
6243
+ Qe as configureAPIClient,
6244
+ wn as facadeApiClient,
6245
+ ui as getVersion
6207
6246
  };