@devtable/dashboard 4.16.3 → 4.16.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,51 +1,51 @@
1
- var Ai = Object.defineProperty;
2
- var Mi = (t, e, n) => e in t ? Ai(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
- var O = (t, e, n) => (Mi(t, typeof e != "symbol" ? e + "" : e, n), n);
4
- import { Box as $, Text as v, Button as F, Checkbox as He, MultiSelect as hn, Select as q, TextInput as k, Group as g, Stack as w, ActionIcon as z, LoadingOverlay as Vt, Table as zt, Tabs as V, Textarea as pn, AppShell as mn, Modal as we, Divider as U, SimpleGrid as Li, NumberInput as Ce, Menu as ue, Tooltip as qi, Paper as $i, Code as hr, Switch as Fe, useMantineTheme as Ni, ColorInput as Bi, ColorSwatch as pr, Slider as Vr, createStyles as fn, Popover as Zt, Accordion as A, SegmentedControl as ji, JsonInput as Gi } from "@mantine/core";
5
- import { useModals as Wi, ModalsProvider as zr } from "@mantine/modals";
6
- import { useRequest as Et, useBoolean as mt, useCreation as Pe, useAsyncEffect as ft, useLatest as mr } from "ahooks";
1
+ var Mi = Object.defineProperty;
2
+ var Li = (t, e, n) => e in t ? Mi(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
3
+ var O = (t, e, n) => (Li(t, typeof e != "symbol" ? e + "" : e, n), n);
4
+ import { Box as $, Text as v, Button as F, Checkbox as He, MultiSelect as pn, Select as q, TextInput as k, Group as g, Stack as w, ActionIcon as z, LoadingOverlay as Vt, Table as zt, Tabs as V, Textarea as mn, AppShell as fn, Modal as we, Divider as U, SimpleGrid as qi, NumberInput as Ce, Menu as ue, Tooltip as $i, Paper as Ni, Code as pr, Switch as Fe, useMantineTheme as Bi, ColorInput as ji, ColorSwatch as mr, Slider as zr, createStyles as gn, Popover as en, Accordion as A, SegmentedControl as Gi, JsonInput as Wi } from "@mantine/core";
5
+ import { useModals as Qi, ModalsProvider as Er } from "@mantine/modals";
6
+ import { useRequest as Et, useBoolean as mt, useCreation as Pe, useAsyncEffect as ft, useLatest as fr } from "ahooks";
7
7
  import { observer as D } from "mobx-react-lite";
8
- import x, { forwardRef as gn, useMemo as M, useState as de, createElement as Ot, useEffect as Z, useCallback as Rt, useRef as Qi, useContext as Me, createContext as Yi } from "react";
9
- import B, { omit as Ft, get as ae, values as Er, unset as Ui, isObject as Or, set as Fr, orderBy as Hi, last as Xi, noop as Ji, defaults as ne, isEqual as De, defaultsDeep as Ge, findLastIndex as Ki, isEmpty as Pr, isNumber as Zi, isString as Ar, range as eo, cloneDeep as Mr, maxBy as Lr, merge as qr, minBy as to, groupBy as no, template as $r, cloneDeepWith as ro, throttle as ao } from "lodash";
8
+ import x, { forwardRef as bn, useMemo as M, useState as de, createElement as Ot, useEffect as Z, useCallback as Rt, useRef as Yi, useContext as Me, createContext as Ui } from "react";
9
+ import B, { omit as Ft, get as ae, values as Or, unset as Hi, isObject as Fr, set as Pr, orderBy as Xi, last as Ji, noop as Ki, defaults as ne, isEqual as De, defaultsDeep as Ge, findLastIndex as Zi, isEmpty as Ar, isNumber as eo, isString as Mr, range as to, cloneDeep as Lr, maxBy as qr, merge as $r, minBy as no, groupBy as ro, template as Nr, cloneDeepWith as ao, throttle as io } from "lodash";
10
10
  import { useForm as ke, Controller as S, useFieldArray as Se } from "react-hook-form";
11
- import { DateRangePicker as io } from "@mantine/dates";
12
- import { Calendar as oo, Refresh as Nr, DeviceFloppy as ee, Trash as K, PlaylistAdd as Je, Recycle as Br, Settings as jr, Filter as so, Database as lo, Share as co, Download as Gr, Code as uo, InfoCircle as ho, ArrowRight as en, ArrowsMaximize as po, Copy as mo, ArrowLeft as fo, ArrowsMove as go, ChevronDownRight as bo } from "tabler-icons-react";
13
- import vo from "axios";
11
+ import { DateRangePicker as oo } from "@mantine/dates";
12
+ import { Calendar as so, Refresh as Br, DeviceFloppy as ee, Trash as K, PlaylistAdd as Je, Recycle as jr, Settings as Gr, Filter as lo, Database as co, Share as uo, Download as Wr, Code as ho, InfoCircle as po, ArrowRight as tn, ArrowsMaximize as mo, Copy as fo, ArrowLeft as go, ArrowsMove as bo, ChevronDownRight as vo } from "tabler-icons-react";
13
+ import yo from "axios";
14
14
  import { Prism as Be } from "@mantine/prism";
15
- import { cast as Le, types as b, getRoot as fr, flow as yo, toGenerator as xo, addDisposer as Co } from "mobx-state-tree";
16
- import { randomId as ge, useClipboard as wo, useElementSize as an, useInputState as Wr } from "@mantine/hooks";
17
- import Qr, { RichTextEditor as Yr } from "@mantine/rte";
18
- import { makeAutoObservable as bn, runInAction as ct, observable as Ur, toJS as Pt, reaction as vn } from "mobx";
15
+ import { cast as Le, types as b, addDisposer as Qr, getRoot as gr, flow as xo, toGenerator as Co } from "mobx-state-tree";
16
+ import { randomId as ge, useClipboard as wo, useElementSize as on, useInputState as Yr } from "@mantine/hooks";
17
+ import Ur, { RichTextEditor as Hr } from "@mantine/rte";
18
+ import { makeAutoObservable as vn, runInAction as ct, observable as Xr, toJS as Pt, reaction as At } from "mobx";
19
19
  import { showNotification as yn } from "@mantine/notifications";
20
- import gr from "eventemitter2";
20
+ import br from "eventemitter2";
21
21
  import ht from "chroma-js";
22
22
  import fe from "numbro";
23
23
  import { quantile as So } from "d3-array";
24
- import { flexRender as Hr, createColumnHelper as _o, useReactTable as Io, getCoreRowModel as Do, getSortedRowModel as Ro } from "@tanstack/react-table";
24
+ import { flexRender as Jr, createColumnHelper as _o, useReactTable as Io, getCoreRowModel as Do, getSortedRowModel as Ro } from "@tanstack/react-table";
25
25
  import { useVirtual as ko } from "react-virtual";
26
26
  import { useForm as xn } from "@mantine/form";
27
27
  import qe from "echarts-for-react/lib/core";
28
- import { SunburstChart as To, PieChart as Vo, BoxplotChart as zo, BarChart as Xr, LineChart as Jr, ScatterChart as Kr, RadarChart as Eo } from "echarts/charts";
28
+ import { SunburstChart as To, PieChart as Vo, BoxplotChart as zo, BarChart as Kr, LineChart as Zr, ScatterChart as ea, RadarChart as Eo } from "echarts/charts";
29
29
  import * as re from "echarts/core";
30
30
  import { CanvasRenderer as $e } from "echarts/renderers";
31
31
  import "echarts-gl";
32
- import { GridComponent as Ke, VisualMapComponent as Oo, LegendComponent as Ze, TooltipComponent as et, DataZoomComponent as At, MarkLineComponent as Fo } from "echarts/components";
33
- import { transform as Zr } from "echarts-stat";
32
+ import { GridComponent as Ke, VisualMapComponent as Oo, LegendComponent as Ze, TooltipComponent as et, DataZoomComponent as Mt, MarkLineComponent as Fo } from "echarts/components";
33
+ import { transform as ta } from "echarts-stat";
34
34
  import * as ze from "d3-regression";
35
35
  import Po from "stickybits";
36
- import ea, { WidthProvider as ta } from "react-grid-layout";
36
+ import na, { WidthProvider as ra } from "react-grid-layout";
37
37
  import Ao from "jszip";
38
38
  const Mo = {
39
39
  viewPanelInFullScreen: B.noop,
40
40
  inFullScreen: !1
41
- }, Cn = x.createContext(Mo), na = x.createContext(null), ra = na.Provider;
41
+ }, Cn = x.createContext(Mo), aa = x.createContext(null), ia = aa.Provider;
42
42
  function te() {
43
- const t = x.useContext(na);
43
+ const t = x.useContext(aa);
44
44
  if (!t)
45
45
  throw new Error("Please use ModelContextProvider");
46
46
  return t;
47
47
  }
48
- var it = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Mt = { exports: {} }, ot = {};
48
+ var it = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Lt = { exports: {} }, ot = {};
49
49
  /**
50
50
  * @license React
51
51
  * react-jsx-runtime.production.min.js
@@ -55,11 +55,11 @@ var it = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
55
55
  * This source code is licensed under the MIT license found in the
56
56
  * LICENSE file in the root directory of this source tree.
57
57
  */
58
- var br;
58
+ var vr;
59
59
  function Lo() {
60
- if (br)
60
+ if (vr)
61
61
  return ot;
62
- br = 1;
62
+ vr = 1;
63
63
  var t = x, e = Symbol.for("react.element"), n = Symbol.for("react.fragment"), a = Object.prototype.hasOwnProperty, i = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, o = { key: !0, ref: !0, __self: !0, __source: !0 };
64
64
  function s(l, u, p) {
65
65
  var h, f = {}, m = null, y = null;
@@ -83,9 +83,9 @@ var st = {};
83
83
  * This source code is licensed under the MIT license found in the
84
84
  * LICENSE file in the root directory of this source tree.
85
85
  */
86
- var vr;
86
+ var yr;
87
87
  function qo() {
88
- return vr || (vr = 1, process.env.NODE_ENV !== "production" && function() {
88
+ return yr || (yr = 1, process.env.NODE_ENV !== "production" && function() {
89
89
  var t = x, e = Symbol.for("react.element"), n = Symbol.for("react.portal"), a = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), o = Symbol.for("react.profiler"), s = Symbol.for("react.provider"), l = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), h = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), m = Symbol.for("react.lazy"), y = Symbol.for("react.offscreen"), I = Symbol.iterator, R = "@@iterator";
90
90
  function E(d) {
91
91
  if (d === null || typeof d != "object")
@@ -171,18 +171,18 @@ function qo() {
171
171
  }
172
172
  return null;
173
173
  }
174
- var ce = Object.assign, Ve = 0, Gn, Wn, Qn, Yn, Un, Hn, Xn;
175
- function Jn() {
174
+ var ce = Object.assign, Ve = 0, Wn, Qn, Yn, Un, Hn, Xn, Jn;
175
+ function Kn() {
176
176
  }
177
- Jn.__reactDisabledLog = !0;
178
- function di() {
177
+ Kn.__reactDisabledLog = !0;
178
+ function hi() {
179
179
  {
180
180
  if (Ve === 0) {
181
- Gn = console.log, Wn = console.info, Qn = console.warn, Yn = console.error, Un = console.group, Hn = console.groupCollapsed, Xn = console.groupEnd;
181
+ Wn = console.log, Qn = console.info, Yn = console.warn, Un = console.error, Hn = console.group, Xn = console.groupCollapsed, Jn = console.groupEnd;
182
182
  var d = {
183
183
  configurable: !0,
184
184
  enumerable: !0,
185
- value: Jn,
185
+ value: Kn,
186
186
  writable: !0
187
187
  };
188
188
  Object.defineProperties(console, {
@@ -198,7 +198,7 @@ function qo() {
198
198
  Ve++;
199
199
  }
200
200
  }
201
- function hi() {
201
+ function pi() {
202
202
  {
203
203
  if (Ve--, Ve === 0) {
204
204
  var d = {
@@ -208,52 +208,52 @@ function qo() {
208
208
  };
209
209
  Object.defineProperties(console, {
210
210
  log: ce({}, d, {
211
- value: Gn
211
+ value: Wn
212
212
  }),
213
213
  info: ce({}, d, {
214
- value: Wn
214
+ value: Qn
215
215
  }),
216
216
  warn: ce({}, d, {
217
- value: Qn
217
+ value: Yn
218
218
  }),
219
219
  error: ce({}, d, {
220
- value: Yn
220
+ value: Un
221
221
  }),
222
222
  group: ce({}, d, {
223
- value: Un
223
+ value: Hn
224
224
  }),
225
225
  groupCollapsed: ce({}, d, {
226
- value: Hn
226
+ value: Xn
227
227
  }),
228
228
  groupEnd: ce({}, d, {
229
- value: Xn
229
+ value: Jn
230
230
  })
231
231
  });
232
232
  }
233
233
  Ve < 0 && W("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
234
234
  }
235
235
  }
236
- var Wt = Q.ReactCurrentDispatcher, Qt;
236
+ var Qt = Q.ReactCurrentDispatcher, Yt;
237
237
  function xt(d, C, _) {
238
238
  {
239
- if (Qt === void 0)
239
+ if (Yt === void 0)
240
240
  try {
241
241
  throw Error();
242
242
  } catch (N) {
243
243
  var T = N.stack.trim().match(/\n( *(at )?)/);
244
- Qt = T && T[1] || "";
244
+ Yt = T && T[1] || "";
245
245
  }
246
246
  return `
247
- ` + Qt + d;
247
+ ` + Yt + d;
248
248
  }
249
249
  }
250
- var Yt = !1, Ct;
250
+ var Ut = !1, Ct;
251
251
  {
252
- var pi = typeof WeakMap == "function" ? WeakMap : Map;
253
- Ct = new pi();
252
+ var mi = typeof WeakMap == "function" ? WeakMap : Map;
253
+ Ct = new mi();
254
254
  }
255
- function Kn(d, C) {
256
- if (!d || Yt)
255
+ function Zn(d, C) {
256
+ if (!d || Ut)
257
257
  return "";
258
258
  {
259
259
  var _ = Ct.get(d);
@@ -261,11 +261,11 @@ function qo() {
261
261
  return _;
262
262
  }
263
263
  var T;
264
- Yt = !0;
264
+ Ut = !0;
265
265
  var N = Error.prepareStackTrace;
266
266
  Error.prepareStackTrace = void 0;
267
267
  var j;
268
- j = Wt.current, Wt.current = null, di();
268
+ j = Qt.current, Qt.current = null, hi();
269
269
  try {
270
270
  if (C) {
271
271
  var L = function() {
@@ -318,15 +318,15 @@ function qo() {
318
318
  }
319
319
  }
320
320
  } finally {
321
- Yt = !1, Wt.current = j, hi(), Error.prepareStackTrace = N;
321
+ Ut = !1, Qt.current = j, pi(), Error.prepareStackTrace = N;
322
322
  }
323
- var Ye = d ? d.displayName || d.name : "", dr = Ye ? xt(Ye) : "";
324
- return typeof d == "function" && Ct.set(d, dr), dr;
323
+ var Ye = d ? d.displayName || d.name : "", hr = Ye ? xt(Ye) : "";
324
+ return typeof d == "function" && Ct.set(d, hr), hr;
325
325
  }
326
- function mi(d, C, _) {
327
- return Kn(d, !1);
326
+ function fi(d, C, _) {
327
+ return Zn(d, !1);
328
328
  }
329
- function fi(d) {
329
+ function gi(d) {
330
330
  var C = d.prototype;
331
331
  return !!(C && C.isReactComponent);
332
332
  }
@@ -334,7 +334,7 @@ function qo() {
334
334
  if (d == null)
335
335
  return "";
336
336
  if (typeof d == "function")
337
- return Kn(d, fi(d));
337
+ return Zn(d, gi(d));
338
338
  if (typeof d == "string")
339
339
  return xt(d);
340
340
  switch (d) {
@@ -346,7 +346,7 @@ function qo() {
346
346
  if (typeof d == "object")
347
347
  switch (d.$$typeof) {
348
348
  case u:
349
- return mi(d.render);
349
+ return fi(d.render);
350
350
  case f:
351
351
  return wt(d.type, C, _);
352
352
  case m: {
@@ -359,15 +359,15 @@ function qo() {
359
359
  }
360
360
  return "";
361
361
  }
362
- var St = Object.prototype.hasOwnProperty, Zn = {}, er = Q.ReactDebugCurrentFrame;
362
+ var St = Object.prototype.hasOwnProperty, er = {}, tr = Q.ReactDebugCurrentFrame;
363
363
  function _t(d) {
364
364
  if (d) {
365
365
  var C = d._owner, _ = wt(d.type, d._source, C ? C.type : null);
366
- er.setExtraStackFrame(_);
366
+ tr.setExtraStackFrame(_);
367
367
  } else
368
- er.setExtraStackFrame(null);
368
+ tr.setExtraStackFrame(null);
369
369
  }
370
- function gi(d, C, _, T, N) {
370
+ function bi(d, C, _, T, N) {
371
371
  {
372
372
  var j = Function.call.bind(St);
373
373
  for (var L in d)
@@ -382,42 +382,42 @@ function qo() {
382
382
  } catch (X) {
383
383
  P = X;
384
384
  }
385
- P && !(P instanceof Error) && (_t(N), W("%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).", T || "React class", _, L, typeof P), _t(null)), P instanceof Error && !(P.message in Zn) && (Zn[P.message] = !0, _t(N), W("Failed %s type: %s", _, P.message), _t(null));
385
+ P && !(P instanceof Error) && (_t(N), W("%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).", T || "React class", _, L, typeof P), _t(null)), P instanceof Error && !(P.message in er) && (er[P.message] = !0, _t(N), W("Failed %s type: %s", _, P.message), _t(null));
386
386
  }
387
387
  }
388
388
  }
389
- var bi = Array.isArray;
390
- function Ut(d) {
391
- return bi(d);
389
+ var vi = Array.isArray;
390
+ function Ht(d) {
391
+ return vi(d);
392
392
  }
393
- function vi(d) {
393
+ function yi(d) {
394
394
  {
395
395
  var C = typeof Symbol == "function" && Symbol.toStringTag, _ = C && d[Symbol.toStringTag] || d.constructor.name || "Object";
396
396
  return _;
397
397
  }
398
398
  }
399
- function yi(d) {
399
+ function xi(d) {
400
400
  try {
401
- return tr(d), !1;
401
+ return nr(d), !1;
402
402
  } catch {
403
403
  return !0;
404
404
  }
405
405
  }
406
- function tr(d) {
406
+ function nr(d) {
407
407
  return "" + d;
408
408
  }
409
- function nr(d) {
410
- if (yi(d))
411
- return W("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", vi(d)), tr(d);
409
+ function rr(d) {
410
+ if (xi(d))
411
+ return W("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", yi(d)), nr(d);
412
412
  }
413
- var at = Q.ReactCurrentOwner, xi = {
413
+ var at = Q.ReactCurrentOwner, Ci = {
414
414
  key: !0,
415
415
  ref: !0,
416
416
  __self: !0,
417
417
  __source: !0
418
- }, rr, ar, Ht;
419
- Ht = {};
420
- function Ci(d) {
418
+ }, ar, ir, Xt;
419
+ Xt = {};
420
+ function wi(d) {
421
421
  if (St.call(d, "ref")) {
422
422
  var C = Object.getOwnPropertyDescriptor(d, "ref").get;
423
423
  if (C && C.isReactWarning)
@@ -425,7 +425,7 @@ function qo() {
425
425
  }
426
426
  return d.ref !== void 0;
427
427
  }
428
- function wi(d) {
428
+ function Si(d) {
429
429
  if (St.call(d, "key")) {
430
430
  var C = Object.getOwnPropertyDescriptor(d, "key").get;
431
431
  if (C && C.isReactWarning)
@@ -433,16 +433,16 @@ function qo() {
433
433
  }
434
434
  return d.key !== void 0;
435
435
  }
436
- function Si(d, C) {
436
+ function _i(d, C) {
437
437
  if (typeof d.ref == "string" && at.current && C && at.current.stateNode !== C) {
438
438
  var _ = le(at.current.type);
439
- Ht[_] || (W('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', le(at.current.type), d.ref), Ht[_] = !0);
439
+ Xt[_] || (W('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', le(at.current.type), d.ref), Xt[_] = !0);
440
440
  }
441
441
  }
442
- function _i(d, C) {
442
+ function Ii(d, C) {
443
443
  {
444
444
  var _ = function() {
445
- rr || (rr = !0, W("%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)", C));
445
+ ar || (ar = !0, W("%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)", C));
446
446
  };
447
447
  _.isReactWarning = !0, Object.defineProperty(d, "key", {
448
448
  get: _,
@@ -450,10 +450,10 @@ function qo() {
450
450
  });
451
451
  }
452
452
  }
453
- function Ii(d, C) {
453
+ function Di(d, C) {
454
454
  {
455
455
  var _ = function() {
456
- ar || (ar = !0, W("%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)", C));
456
+ ir || (ir = !0, W("%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)", C));
457
457
  };
458
458
  _.isReactWarning = !0, Object.defineProperty(d, "ref", {
459
459
  get: _,
@@ -461,7 +461,7 @@ function qo() {
461
461
  });
462
462
  }
463
463
  }
464
- var Di = function(d, C, _, T, N, j, L) {
464
+ var Ri = function(d, C, _, T, N, j, L) {
465
465
  var P = {
466
466
  $$typeof: e,
467
467
  type: d,
@@ -487,12 +487,12 @@ function qo() {
487
487
  value: N
488
488
  }), Object.freeze && (Object.freeze(P.props), Object.freeze(P)), P;
489
489
  };
490
- function Ri(d, C, _, T, N) {
490
+ function ki(d, C, _, T, N) {
491
491
  {
492
492
  var j, L = {}, P = null, ie = null;
493
- _ !== void 0 && (nr(_), P = "" + _), wi(C) && (nr(C.key), P = "" + C.key), Ci(C) && (ie = C.ref, Si(C, N));
493
+ _ !== void 0 && (rr(_), P = "" + _), Si(C) && (rr(C.key), P = "" + C.key), wi(C) && (ie = C.ref, _i(C, N));
494
494
  for (j in C)
495
- St.call(C, j) && !xi.hasOwnProperty(j) && (L[j] = C[j]);
495
+ St.call(C, j) && !Ci.hasOwnProperty(j) && (L[j] = C[j]);
496
496
  if (d && d.defaultProps) {
497
497
  var X = d.defaultProps;
498
498
  for (j in X)
@@ -500,28 +500,28 @@ function qo() {
500
500
  }
501
501
  if (P || ie) {
502
502
  var J = typeof d == "function" ? d.displayName || d.name || "Unknown" : d;
503
- P && _i(L, J), ie && Ii(L, J);
503
+ P && Ii(L, J), ie && Di(L, J);
504
504
  }
505
- return Di(d, P, ie, N, T, at.current, L);
505
+ return Ri(d, P, ie, N, T, at.current, L);
506
506
  }
507
507
  }
508
- var Xt = Q.ReactCurrentOwner, ir = Q.ReactDebugCurrentFrame;
508
+ var Jt = Q.ReactCurrentOwner, or = Q.ReactDebugCurrentFrame;
509
509
  function Qe(d) {
510
510
  if (d) {
511
511
  var C = d._owner, _ = wt(d.type, d._source, C ? C.type : null);
512
- ir.setExtraStackFrame(_);
512
+ or.setExtraStackFrame(_);
513
513
  } else
514
- ir.setExtraStackFrame(null);
514
+ or.setExtraStackFrame(null);
515
515
  }
516
- var Jt;
517
- Jt = !1;
518
- function Kt(d) {
516
+ var Kt;
517
+ Kt = !1;
518
+ function Zt(d) {
519
519
  return typeof d == "object" && d !== null && d.$$typeof === e;
520
520
  }
521
- function or() {
521
+ function sr() {
522
522
  {
523
- if (Xt.current) {
524
- var d = le(Xt.current.type);
523
+ if (Jt.current) {
524
+ var d = le(Jt.current.type);
525
525
  if (d)
526
526
  return `
527
527
 
@@ -530,7 +530,7 @@ Check the render method of \`` + d + "`.";
530
530
  return "";
531
531
  }
532
532
  }
533
- function ki(d) {
533
+ function Ti(d) {
534
534
  {
535
535
  if (d !== void 0) {
536
536
  var C = d.fileName.replace(/^.*[\\\/]/, ""), _ = d.lineNumber;
@@ -541,10 +541,10 @@ Check your code at ` + C + ":" + _ + ".";
541
541
  return "";
542
542
  }
543
543
  }
544
- var sr = {};
545
- function Ti(d) {
544
+ var lr = {};
545
+ function Vi(d) {
546
546
  {
547
- var C = or();
547
+ var C = sr();
548
548
  if (!C) {
549
549
  var _ = typeof d == "string" ? d : d.displayName || d.name;
550
550
  _ && (C = `
@@ -554,39 +554,39 @@ Check the top-level render call using <` + _ + ">.");
554
554
  return C;
555
555
  }
556
556
  }
557
- function lr(d, C) {
557
+ function cr(d, C) {
558
558
  {
559
559
  if (!d._store || d._store.validated || d.key != null)
560
560
  return;
561
561
  d._store.validated = !0;
562
- var _ = Ti(C);
563
- if (sr[_])
562
+ var _ = Vi(C);
563
+ if (lr[_])
564
564
  return;
565
- sr[_] = !0;
565
+ lr[_] = !0;
566
566
  var T = "";
567
- d && d._owner && d._owner !== Xt.current && (T = " It was passed a child from " + le(d._owner.type) + "."), Qe(d), W('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', _, T), Qe(null);
567
+ d && d._owner && d._owner !== Jt.current && (T = " It was passed a child from " + le(d._owner.type) + "."), Qe(d), W('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', _, T), Qe(null);
568
568
  }
569
569
  }
570
- function cr(d, C) {
570
+ function ur(d, C) {
571
571
  {
572
572
  if (typeof d != "object")
573
573
  return;
574
- if (Ut(d))
574
+ if (Ht(d))
575
575
  for (var _ = 0; _ < d.length; _++) {
576
576
  var T = d[_];
577
- Kt(T) && lr(T, C);
577
+ Zt(T) && cr(T, C);
578
578
  }
579
- else if (Kt(d))
579
+ else if (Zt(d))
580
580
  d._store && (d._store.validated = !0);
581
581
  else if (d) {
582
582
  var N = E(d);
583
583
  if (typeof N == "function" && N !== d.entries)
584
584
  for (var j = N.call(d), L; !(L = j.next()).done; )
585
- Kt(L.value) && lr(L.value, C);
585
+ Zt(L.value) && cr(L.value, C);
586
586
  }
587
587
  }
588
588
  }
589
- function Vi(d) {
589
+ function zi(d) {
590
590
  {
591
591
  var C = d.type;
592
592
  if (C == null || typeof C == "string")
@@ -600,16 +600,16 @@ Check the top-level render call using <` + _ + ">.");
600
600
  return;
601
601
  if (_) {
602
602
  var T = le(C);
603
- gi(_, d.props, "prop", T, d);
604
- } else if (C.PropTypes !== void 0 && !Jt) {
605
- Jt = !0;
603
+ bi(_, d.props, "prop", T, d);
604
+ } else if (C.PropTypes !== void 0 && !Kt) {
605
+ Kt = !0;
606
606
  var N = le(C);
607
607
  W("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", N || "Unknown");
608
608
  }
609
609
  typeof C.getDefaultProps == "function" && !C.getDefaultProps.isReactClassApproved && W("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
610
610
  }
611
611
  }
612
- function zi(d) {
612
+ function Ei(d) {
613
613
  {
614
614
  for (var C = Object.keys(d.props), _ = 0; _ < C.length; _++) {
615
615
  var T = C[_];
@@ -621,50 +621,50 @@ Check the top-level render call using <` + _ + ">.");
621
621
  d.ref !== null && (Qe(d), W("Invalid attribute `ref` supplied to `React.Fragment`."), Qe(null));
622
622
  }
623
623
  }
624
- function ur(d, C, _, T, N, j) {
624
+ function dr(d, C, _, T, N, j) {
625
625
  {
626
626
  var L = yt(d);
627
627
  if (!L) {
628
628
  var P = "";
629
629
  (d === void 0 || typeof d == "object" && d !== null && Object.keys(d).length === 0) && (P += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
630
- var ie = ki(N);
631
- ie ? P += ie : P += or();
630
+ var ie = Ti(N);
631
+ ie ? P += ie : P += sr();
632
632
  var X;
633
- d === null ? X = "null" : Ut(d) ? X = "array" : d !== void 0 && d.$$typeof === e ? (X = "<" + (le(d.type) || "Unknown") + " />", P = " Did you accidentally export a JSX literal instead of a component?") : X = typeof d, W("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", X, P);
633
+ d === null ? X = "null" : Ht(d) ? X = "array" : d !== void 0 && d.$$typeof === e ? (X = "<" + (le(d.type) || "Unknown") + " />", P = " Did you accidentally export a JSX literal instead of a component?") : X = typeof d, W("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", X, P);
634
634
  }
635
- var J = Ri(d, C, _, N, j);
635
+ var J = ki(d, C, _, N, j);
636
636
  if (J == null)
637
637
  return J;
638
638
  if (L) {
639
639
  var pe = C.children;
640
640
  if (pe !== void 0)
641
641
  if (T)
642
- if (Ut(pe)) {
642
+ if (Ht(pe)) {
643
643
  for (var Ye = 0; Ye < pe.length; Ye++)
644
- cr(pe[Ye], d);
644
+ ur(pe[Ye], d);
645
645
  Object.freeze && Object.freeze(pe);
646
646
  } else
647
647
  W("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
648
648
  else
649
- cr(pe, d);
649
+ ur(pe, d);
650
650
  }
651
- return d === a ? zi(J) : Vi(J), J;
651
+ return d === a ? Ei(J) : zi(J), J;
652
652
  }
653
653
  }
654
- function Ei(d, C, _) {
655
- return ur(d, C, _, !0);
656
- }
657
654
  function Oi(d, C, _) {
658
- return ur(d, C, _, !1);
655
+ return dr(d, C, _, !0);
659
656
  }
660
- var Fi = Oi, Pi = Ei;
661
- st.Fragment = a, st.jsx = Fi, st.jsxs = Pi;
657
+ function Fi(d, C, _) {
658
+ return dr(d, C, _, !1);
659
+ }
660
+ var Pi = Fi, Ai = Oi;
661
+ st.Fragment = a, st.jsx = Pi, st.jsxs = Ai;
662
662
  }()), st;
663
663
  }
664
664
  (function(t) {
665
665
  process.env.NODE_ENV === "production" ? t.exports = Lo() : t.exports = qo();
666
- })(Mt);
667
- const Y = Mt.exports.Fragment, r = Mt.exports.jsx, c = Mt.exports.jsxs;
666
+ })(Lt);
667
+ const Y = Lt.exports.Fragment, r = Lt.exports.jsx, c = Lt.exports.jsxs;
668
668
  class Xe extends x.Component {
669
669
  constructor(e) {
670
670
  super(e), this.state = {
@@ -724,34 +724,32 @@ function $o({
724
724
  })]
725
725
  });
726
726
  }
727
- function aa({
727
+ const oa = D(({
728
728
  label: t,
729
729
  config: e,
730
730
  value: n,
731
731
  onChange: a
732
- }) {
733
- return /* @__PURE__ */ r(io, {
734
- label: t,
735
- value: n,
736
- onChange: a,
737
- icon: /* @__PURE__ */ r(oo, {
738
- size: 16
739
- }),
740
- sx: {
741
- minWidth: "16em"
742
- },
743
- ...e
744
- });
745
- }
746
- function No(t, e) {
747
- const n = Object.keys(e), a = Object.values(e);
732
+ }) => /* @__PURE__ */ r(oo, {
733
+ label: t,
734
+ value: n,
735
+ onChange: a,
736
+ icon: /* @__PURE__ */ r(so, {
737
+ size: 16
738
+ }),
739
+ sx: {
740
+ minWidth: "16em"
741
+ },
742
+ ...e
743
+ }));
744
+ function No(t, e, n) {
745
+ const a = Sn(e, [], n), i = Object.keys(a), o = Object.values(a);
748
746
  try {
749
- return new Function(...n, `return \`${t}\`;`)(...a);
750
- } catch (i) {
751
- return console.error(i), i.message;
747
+ return new Function(...i, `return \`${t}\`;`)(...o);
748
+ } catch (s) {
749
+ return console.error(s), s.message;
752
750
  }
753
751
  }
754
- function wn(t, e) {
752
+ function wn(t, e = {}) {
755
753
  const n = Object.keys(e), a = Object.values(e);
756
754
  try {
757
755
  return new Function(...n, `return \`${t}\`;`)(...a);
@@ -759,13 +757,13 @@ function wn(t, e) {
759
757
  throw n.length === 0 && t.includes("$") ? new Error("[formatSQL] insufficient params") : i;
760
758
  }
761
759
  }
762
- function ia(t, e, n) {
763
- const a = e.reduce((i, o) => (i[o.key] = wn(o.value, t), i), {});
764
- return B.merge({}, a, t, { filters: n });
760
+ function Sn(t, e, n) {
761
+ const a = { ...t, filters: n }, i = e.reduce((o, s) => (o[s.key] = wn(s.value, a), o), {});
762
+ return B.merge({}, i, t, { filters: n });
765
763
  }
766
- function oa(t, e, n, a) {
764
+ function sa(t, e, n, a) {
767
765
  try {
768
- const i = ia(e, n, a);
766
+ const i = Sn(e, n, a);
769
767
  return wn(t, i);
770
768
  } catch (i) {
771
769
  return console.error(i), i.message;
@@ -786,10 +784,10 @@ const je = {
786
784
  params: t === "GET" ? n : a.params,
787
785
  headers: i
788
786
  };
789
- return t === "POST" && (o.data = a.string ? JSON.stringify(n) : n), vo(o).then((s) => s.data).catch((s) => Promise.reject(s));
787
+ return t === "POST" && (o.data = a.string ? JSON.stringify(n) : n), yo(o).then((s) => s.data).catch((s) => Promise.reject(s));
790
788
  };
791
789
  }
792
- }, Sn = ({ type: t, key: e, sql: n }) => async () => {
790
+ }, _n = ({ type: t, key: e, sql: n }) => async () => {
793
791
  if (!t || !e || !n)
794
792
  return [];
795
793
  try {
@@ -803,7 +801,7 @@ async function Bo({ context: t, sqlSnippets: e, title: n, query: a, filterValues
803
801
  return [];
804
802
  const { type: o, key: s, sql: l } = a, u = l.includes("$");
805
803
  try {
806
- const p = ia(t, e, i), h = wn(l, p);
804
+ const p = Sn(t, e, i), h = wn(l, p);
807
805
  return u && (console.groupCollapsed(`Final SQL for: ${n}`), console.log(h), console.groupEnd()), await je.getRequest("POST")("/query", { type: o, key: s, query: h });
808
806
  } catch (p) {
809
807
  return console.error(p), [];
@@ -835,10 +833,10 @@ function Go({
835
833
  const i = !!e.options_query.sql, {
836
834
  data: o = [],
837
835
  loading: s
838
- } = Et(Sn(e.options_query), {
836
+ } = Et(_n(e.options_query), {
839
837
  refreshDeps: [e.options_query, i]
840
838
  });
841
- return /* @__PURE__ */ r(hn, {
839
+ return /* @__PURE__ */ r(pn, {
842
840
  label: t,
843
841
  data: i ? o : e.static_options,
844
842
  disabled: i ? s : !1,
@@ -858,7 +856,7 @@ function Wo({
858
856
  const i = !!e.options_query.sql, {
859
857
  data: o = [],
860
858
  loading: s
861
- } = Et(Sn(e.options_query), {
859
+ } = Et(_n(e.options_query), {
862
860
  refreshDeps: [e.options_query, i]
863
861
  });
864
862
  return /* @__PURE__ */ r(q, {
@@ -882,12 +880,15 @@ function Qo({
882
880
  ...e
883
881
  });
884
882
  }
885
- function Yo({
886
- type: t,
887
- config: e,
888
- key: n,
889
- ...a
890
- }, i) {
883
+ const Yo = D(({
884
+ filter: {
885
+ type: t,
886
+ config: e,
887
+ key: n,
888
+ ...a
889
+ },
890
+ formFieldProps: i
891
+ }) => {
891
892
  switch (t) {
892
893
  case "select":
893
894
  return /* @__PURE__ */ r(Wo, {
@@ -908,7 +909,7 @@ function Yo({
908
909
  config: e
909
910
  });
910
911
  case "date-range":
911
- return /* @__PURE__ */ r(aa, {
912
+ return /* @__PURE__ */ r(oa, {
912
913
  ...a,
913
914
  ...i,
914
915
  config: e
@@ -922,19 +923,19 @@ function Yo({
922
923
  default:
923
924
  return null;
924
925
  }
925
- }
926
- const sa = x.forwardRef(function({
927
- filter: e,
928
- ...n
929
- }, a) {
930
- return /* @__PURE__ */ r("div", {
931
- className: "filter-root",
932
- ref: a,
933
- children: /* @__PURE__ */ r(Xe, {
934
- children: Yo(e, n)
926
+ }), la = D(x.forwardRef(({
927
+ filter: t,
928
+ ...e
929
+ }, n) => /* @__PURE__ */ r("div", {
930
+ className: "filter-root",
931
+ ref: n,
932
+ children: /* @__PURE__ */ r(Xe, {
933
+ children: /* @__PURE__ */ r(Yo, {
934
+ filter: t,
935
+ formFieldProps: e
935
936
  })
936
- });
937
- }), la = D(function({
937
+ })
938
+ }))), ca = D(function({
938
939
  view: e
939
940
  }) {
940
941
  const n = te(), {
@@ -961,7 +962,7 @@ const sa = x.forwardRef(function({
961
962
  control: a,
962
963
  render: ({
963
964
  field: l
964
- }) => /* @__PURE__ */ r(sa, {
965
+ }) => /* @__PURE__ */ r(la, {
965
966
  filter: s,
966
967
  ...l
967
968
  })
@@ -984,13 +985,13 @@ const sa = x.forwardRef(function({
984
985
  freezeLayout: B.noop,
985
986
  inEditMode: !1,
986
987
  inUseMode: !0
987
- }, _e = x.createContext(Uo), ca = x.createContext({
988
+ }, _e = x.createContext(Uo), ua = x.createContext({
988
989
  panel: null,
989
990
  data: [],
990
991
  loading: !1
991
- }), Ho = ca.Provider;
992
+ }), Ho = ua.Provider;
992
993
  function he() {
993
- const t = x.useContext(ca);
994
+ const t = x.useContext(ua);
994
995
  if (!t.panel)
995
996
  throw new Error("Please use PanelContextProvider");
996
997
  return t;
@@ -1007,7 +1008,7 @@ WHERE
1007
1008
  -- SQL snippets
1008
1009
  AND \${sql_snippets.author_email_condition}
1009
1010
  \${sql_snippets.order_by_clause}
1010
- `, ua = D(function({
1011
+ `, da = D(function({
1011
1012
  showSQLSnippets: e = !0,
1012
1013
  sx: n = {}
1013
1014
  }) {
@@ -1110,7 +1111,7 @@ function Jo({
1110
1111
  })]
1111
1112
  });
1112
1113
  }
1113
- const da = D(function({
1114
+ const ha = D(function({
1114
1115
  id: e
1115
1116
  }) {
1116
1117
  const n = te(), {
@@ -1148,7 +1149,7 @@ const da = D(function({
1148
1149
  color: "blue",
1149
1150
  disabled: o,
1150
1151
  onClick: s,
1151
- children: /* @__PURE__ */ r(Nr, {
1152
+ children: /* @__PURE__ */ r(Br, {
1152
1153
  size: 15
1153
1154
  })
1154
1155
  })]
@@ -1163,7 +1164,7 @@ const da = D(function({
1163
1164
  })]
1164
1165
  })]
1165
1166
  });
1166
- }), Ko = gn(({
1167
+ }), Ko = bn(({
1167
1168
  label: t,
1168
1169
  type: e,
1169
1170
  ...n
@@ -1176,7 +1177,7 @@ const da = D(function({
1176
1177
  }), /* @__PURE__ */ r(v, {
1177
1178
  children: e
1178
1179
  })]
1179
- })), ha = D(function({
1180
+ })), pa = D(function({
1180
1181
  value: e,
1181
1182
  onChange: n
1182
1183
  }) {
@@ -1207,10 +1208,10 @@ const da = D(function({
1207
1208
  }
1208
1209
  });
1209
1210
  });
1210
- function pa({
1211
+ function ma({
1211
1212
  value: t
1212
1213
  }) {
1213
- const e = te(), n = e.context.current, a = x.useMemo(() => oa(t, n, e.sqlSnippets.current, e.filters.values), [t, n, e.sqlSnippets.current, e.filters.values]);
1214
+ const e = te(), n = e.context.current, a = x.useMemo(() => sa(t, n, e.sqlSnippets.current, e.filters.values), [t, n, e.sqlSnippets.current, e.filters.values]);
1214
1215
  return /* @__PURE__ */ r(Be, {
1215
1216
  language: "sql",
1216
1217
  colorScheme: "light",
@@ -1278,7 +1279,7 @@ const Zo = D(function({
1278
1279
  size: 18
1279
1280
  })
1280
1281
  })
1281
- }), /* @__PURE__ */ r(ha, {
1282
+ }), /* @__PURE__ */ r(pa, {
1282
1283
  value: {
1283
1284
  type: e.type,
1284
1285
  key: e.key
@@ -1307,7 +1308,7 @@ const Zo = D(function({
1307
1308
  sx: {
1308
1309
  position: "relative"
1309
1310
  },
1310
- children: [/* @__PURE__ */ r(pn, {
1311
+ children: [/* @__PURE__ */ r(mn, {
1311
1312
  autosize: !0,
1312
1313
  minRows: 12,
1313
1314
  maxRows: 24,
@@ -1335,7 +1336,7 @@ const Zo = D(function({
1335
1336
  }), /* @__PURE__ */ r(V.Panel, {
1336
1337
  value: "Preview",
1337
1338
  pt: "sm",
1338
- children: /* @__PURE__ */ r(pa, {
1339
+ children: /* @__PURE__ */ r(ma, {
1339
1340
  value: e.sql
1340
1341
  })
1341
1342
  })]
@@ -1412,7 +1413,7 @@ const ts = D(function({
1412
1413
  });
1413
1414
  }), ns = D(function() {
1414
1415
  const [e, n] = x.useState("");
1415
- return /* @__PURE__ */ c(mn, {
1416
+ return /* @__PURE__ */ c(fn, {
1416
1417
  sx: {
1417
1418
  height: "90vh",
1418
1419
  maxHeight: "calc(100vh - 225px)",
@@ -1444,16 +1445,15 @@ const ts = D(function({
1444
1445
  id: e,
1445
1446
  setID: n
1446
1447
  })]
1447
- }), /* @__PURE__ */ r(ua, {})]
1448
- }), /* @__PURE__ */ r(da, {
1448
+ }), /* @__PURE__ */ r(da, {})]
1449
+ }), /* @__PURE__ */ r(ha, {
1449
1450
  id: e
1450
1451
  })]
1451
1452
  });
1452
- });
1453
- function rs({
1453
+ }), rs = D(({
1454
1454
  value: t
1455
- }) {
1456
- const n = te().context.current, a = x.useMemo(() => No(t, n), [t, n]);
1455
+ }) => {
1456
+ const e = te(), n = e.context.current, a = x.useMemo(() => No(t, n, e.filters.values), [t, n]);
1457
1457
  return /* @__PURE__ */ c(w, {
1458
1458
  children: [/* @__PURE__ */ r(v, {
1459
1459
  children: "Preview"
@@ -1464,8 +1464,7 @@ function rs({
1464
1464
  children: a
1465
1465
  })]
1466
1466
  });
1467
- }
1468
- const as = D(function() {
1467
+ }), as = D(function() {
1469
1468
  const e = te(), n = () => e.sqlSnippets.append(Le({
1470
1469
  key: ge(),
1471
1470
  value: ""
@@ -1512,7 +1511,7 @@ const as = D(function() {
1512
1511
  onChange: (o) => {
1513
1512
  a.setKey(o.currentTarget.value);
1514
1513
  }
1515
- }), /* @__PURE__ */ r(pn, {
1514
+ }), /* @__PURE__ */ r(mn, {
1516
1515
  minRows: 3,
1517
1516
  label: "Value",
1518
1517
  required: !0,
@@ -1555,7 +1554,7 @@ const as = D(function() {
1555
1554
  });
1556
1555
  });
1557
1556
  function is() {
1558
- return /* @__PURE__ */ r(mn, {
1557
+ return /* @__PURE__ */ r(fn, {
1559
1558
  sx: {
1560
1559
  height: "90vh",
1561
1560
  maxHeight: "calc(100vh - 225px)",
@@ -1575,7 +1574,7 @@ function is() {
1575
1574
  grow: !0,
1576
1575
  align: "stretch",
1577
1576
  noWrap: !0,
1578
- children: [/* @__PURE__ */ r(as, {}), /* @__PURE__ */ r(ua, {
1577
+ children: [/* @__PURE__ */ r(as, {}), /* @__PURE__ */ r(da, {
1579
1578
  showSQLSnippets: !1
1580
1579
  })]
1581
1580
  })
@@ -1623,11 +1622,11 @@ const os = D(function({
1623
1622
  });
1624
1623
  });
1625
1624
  var me = /* @__PURE__ */ ((t) => (t.Select = "select", t.MultiSelect = "multi-select", t.TextInput = "text-input", t.Checkbox = "checkbox", t.DateRange = "date-range", t))(me || {});
1626
- const ma = b.model({
1625
+ const fa = b.model({
1627
1626
  type: b.enumeration("DataSourceType", [xe.Postgresql, xe.MySQL, xe.HTTP]),
1628
1627
  key: b.string,
1629
1628
  sql: b.string
1630
- }), fa = b.model("FilterConfigModel_TextInput", {
1629
+ }), ga = b.model("FilterConfigModel_TextInput", {
1631
1630
  required: b.boolean,
1632
1631
  default_value: b.string
1633
1632
  }).actions((t) => ({
@@ -1637,7 +1636,7 @@ const ma = b.model({
1637
1636
  setDefaultValue(e) {
1638
1637
  t.default_value = e;
1639
1638
  }
1640
- })), ga = () => fa.create({
1639
+ })), ba = () => ga.create({
1641
1640
  required: !1,
1642
1641
  default_value: ""
1643
1642
  }), ss = D(function({
@@ -1678,7 +1677,7 @@ const ma = b.model({
1678
1677
  label: "Display Format",
1679
1678
  value: e.inputFormat,
1680
1679
  onChange: e.setInputFormat
1681
- }), /* @__PURE__ */ r(aa, {
1680
+ }), /* @__PURE__ */ r(oa, {
1682
1681
  label: "Default Value",
1683
1682
  config: e,
1684
1683
  value: e.default_value,
@@ -1740,7 +1739,7 @@ const ds = D(function({
1740
1739
  data: n = [],
1741
1740
  loading: a,
1742
1741
  refresh: i
1743
- } = Et(Sn(e), {
1742
+ } = Et(_n(e), {
1744
1743
  refreshDeps: [e]
1745
1744
  });
1746
1745
  return /* @__PURE__ */ c(w, {
@@ -1769,13 +1768,13 @@ const ds = D(function({
1769
1768
  })]
1770
1769
  })]
1771
1770
  });
1772
- }), ba = D(function({
1771
+ }), va = D(function({
1773
1772
  value: e,
1774
1773
  onChange: n
1775
1774
  }) {
1776
1775
  return /* @__PURE__ */ c(w, {
1777
1776
  my: 0,
1778
- children: [/* @__PURE__ */ r(ha, {
1777
+ children: [/* @__PURE__ */ r(pa, {
1779
1778
  value: e,
1780
1779
  onChange: ({
1781
1780
  type: a,
@@ -1803,7 +1802,7 @@ const ds = D(function({
1803
1802
  }), /* @__PURE__ */ r(V.Panel, {
1804
1803
  value: "SQL",
1805
1804
  pt: "sm",
1806
- children: /* @__PURE__ */ r(pn, {
1805
+ children: /* @__PURE__ */ r(mn, {
1807
1806
  autosize: !0,
1808
1807
  minRows: 12,
1809
1808
  maxRows: 24,
@@ -1820,7 +1819,7 @@ const ds = D(function({
1820
1819
  }), /* @__PURE__ */ r(V.Panel, {
1821
1820
  value: "Preview",
1822
1821
  pt: "sm",
1823
- children: /* @__PURE__ */ r(pa, {
1822
+ children: /* @__PURE__ */ r(ma, {
1824
1823
  value: e.sql
1825
1824
  })
1826
1825
  }), /* @__PURE__ */ r(V.Panel, {
@@ -1845,7 +1844,7 @@ const ds = D(function({
1845
1844
  children: [/* @__PURE__ */ r(U, {
1846
1845
  label: "Configure options",
1847
1846
  labelPosition: "center"
1848
- }), a.length > 0 && /* @__PURE__ */ r(hn, {
1847
+ }), a.length > 0 && /* @__PURE__ */ r(pn, {
1849
1848
  label: "Default Selection",
1850
1849
  data: i,
1851
1850
  value: e.default_value,
@@ -1903,7 +1902,7 @@ const ds = D(function({
1903
1902
  }), /* @__PURE__ */ r(U, {
1904
1903
  label: "Or fetch options from database",
1905
1904
  labelPosition: "center"
1906
- }), /* @__PURE__ */ r(ba, {
1905
+ }), /* @__PURE__ */ r(va, {
1907
1906
  value: e.options_query,
1908
1907
  onChange: e.setOptionsQuery
1909
1908
  })]
@@ -1986,7 +1985,7 @@ const ds = D(function({
1986
1985
  }), /* @__PURE__ */ r(U, {
1987
1986
  label: "Or fetch options from database",
1988
1987
  labelPosition: "center"
1989
- }), /* @__PURE__ */ r(ba, {
1988
+ }), /* @__PURE__ */ r(va, {
1990
1989
  value: e.options_query,
1991
1990
  onChange: e.setOptionsQuery
1992
1991
  })]
@@ -2010,7 +2009,7 @@ const ds = D(function({
2010
2009
  }), fs = D(function({
2011
2010
  filter: e
2012
2011
  }) {
2013
- const n = e.config.default_value, [a, i] = x.useState(n);
2012
+ const n = e.plainDefaultValue, [a, i] = x.useState(n);
2014
2013
  return x.useEffect(() => {
2015
2014
  i(n);
2016
2015
  }, [n]), /* @__PURE__ */ c($, {
@@ -2021,7 +2020,7 @@ const ds = D(function({
2021
2020
  pb: "md",
2022
2021
  color: "gray",
2023
2022
  children: "Preview"
2024
- }), /* @__PURE__ */ r(sa, {
2023
+ }), /* @__PURE__ */ r(la, {
2025
2024
  filter: e,
2026
2025
  value: a,
2027
2026
  onChange: i
@@ -2063,7 +2062,7 @@ const ds = D(function({
2063
2062
  index: n
2064
2063
  }) {
2065
2064
  const a = te(), i = x.useMemo(() => gs[e.type], [e.type]);
2066
- return /* @__PURE__ */ c(Li, {
2065
+ return /* @__PURE__ */ c(qi, {
2067
2066
  cols: 2,
2068
2067
  children: [/* @__PURE__ */ c($, {
2069
2068
  pl: "md",
@@ -2081,7 +2080,7 @@ const ds = D(function({
2081
2080
  value: e.order,
2082
2081
  onChange: e.setOrder,
2083
2082
  hideControls: !0
2084
- }), /* @__PURE__ */ r(hn, {
2083
+ }), /* @__PURE__ */ r(pn, {
2085
2084
  label: "Visible in...",
2086
2085
  data: a.views.options,
2087
2086
  value: e.visibleInViewsIDs,
@@ -2126,7 +2125,7 @@ const ys = D(function() {
2126
2125
  label: i,
2127
2126
  order: n.length + 1,
2128
2127
  type: me.TextInput,
2129
- config: ga(),
2128
+ config: ba(),
2130
2129
  visibleInViewsIDs: ["Main"]
2131
2130
  };
2132
2131
  e.filters.append(o);
@@ -2146,7 +2145,7 @@ const ys = D(function() {
2146
2145
  children: /* @__PURE__ */ r(F, {
2147
2146
  size: "xs",
2148
2147
  color: "red",
2149
- leftIcon: /* @__PURE__ */ r(Br, {
2148
+ leftIcon: /* @__PURE__ */ r(jr, {
2150
2149
  size: 20
2151
2150
  }),
2152
2151
  disabled: !e.filters.changed,
@@ -2368,7 +2367,7 @@ const Ss = D(() => {
2368
2367
  },
2369
2368
  children: /* @__PURE__ */ r(Rs, {})
2370
2369
  });
2371
- }), Ts = gn(({
2370
+ }), Ts = bn(({
2372
2371
  label: t,
2373
2372
  type: e,
2374
2373
  ...n
@@ -2400,7 +2399,7 @@ const Ss = D(() => {
2400
2399
  children: t
2401
2400
  })
2402
2401
  })
2403
- })), yr = "TRIGGER_TO_ADD", Vs = D(({
2402
+ })), xr = "TRIGGER_TO_ADD", Vs = D(({
2404
2403
  value: t,
2405
2404
  onChange: e,
2406
2405
  triggerAdd: n,
@@ -2409,7 +2408,7 @@ const Ss = D(() => {
2409
2408
  }) => {
2410
2409
  const o = M(() => [...i, {
2411
2410
  label: "Add a View",
2412
- value: yr,
2411
+ value: xr,
2413
2412
  type: "TRIGGER_TO_ADD"
2414
2413
  }], [i, n]);
2415
2414
  return /* @__PURE__ */ c(g, {
@@ -2421,7 +2420,7 @@ const Ss = D(() => {
2421
2420
  children: [/* @__PURE__ */ r(q, {
2422
2421
  value: t,
2423
2422
  onChange: (l) => {
2424
- l !== yr ? e(l) : n();
2423
+ l !== xr ? e(l) : n();
2425
2424
  },
2426
2425
  placeholder: "Pick a View",
2427
2426
  itemComponent: Ts,
@@ -2451,7 +2450,7 @@ const Ss = D(() => {
2451
2450
  }
2452
2451
  }
2453
2452
  },
2454
- children: /* @__PURE__ */ r(jr, {
2453
+ children: /* @__PURE__ */ r(Gr, {
2455
2454
  size: 20
2456
2455
  })
2457
2456
  })]
@@ -2507,7 +2506,7 @@ function Es({
2507
2506
  })
2508
2507
  });
2509
2508
  }
2510
- const va = D(function({
2509
+ const ya = D(function({
2511
2510
  saveChanges: e
2512
2511
  }) {
2513
2512
  const n = te(), a = x.useCallback(() => {
@@ -2549,7 +2548,7 @@ const va = D(function({
2549
2548
  variant: "default",
2550
2549
  size: "xs",
2551
2550
  onClick: I,
2552
- leftIcon: /* @__PURE__ */ r(so, {
2551
+ leftIcon: /* @__PURE__ */ r(lo, {
2553
2552
  size: 20
2554
2553
  }),
2555
2554
  children: "Filters"
@@ -2557,7 +2556,7 @@ const va = D(function({
2557
2556
  variant: "default",
2558
2557
  size: "xs",
2559
2558
  onClick: h,
2560
- leftIcon: /* @__PURE__ */ r(lo, {
2559
+ leftIcon: /* @__PURE__ */ r(co, {
2561
2560
  size: 20
2562
2561
  }),
2563
2562
  children: "Data Settings"
@@ -2575,7 +2574,7 @@ const va = D(function({
2575
2574
  size: "xs",
2576
2575
  disabled: !o,
2577
2576
  onClick: i,
2578
- leftIcon: /* @__PURE__ */ r(Br, {
2577
+ leftIcon: /* @__PURE__ */ r(jr, {
2579
2578
  size: 20
2580
2579
  }),
2581
2580
  children: "Revert Changes"
@@ -2585,20 +2584,20 @@ const va = D(function({
2585
2584
  children: /* @__PURE__ */ r(F, {
2586
2585
  variant: "default",
2587
2586
  size: "xs",
2588
- leftIcon: /* @__PURE__ */ r(co, {
2587
+ leftIcon: /* @__PURE__ */ r(uo, {
2589
2588
  size: 20
2590
2589
  }),
2591
2590
  children: "Export"
2592
2591
  })
2593
2592
  }), /* @__PURE__ */ c(ue.Dropdown, {
2594
2593
  children: [/* @__PURE__ */ r(ue.Item, {
2595
- icon: /* @__PURE__ */ r(Gr, {
2594
+ icon: /* @__PURE__ */ r(Wr, {
2596
2595
  size: 14
2597
2596
  }),
2598
2597
  onClick: n.queries.downloadAllData,
2599
2598
  children: "Download Data"
2600
2599
  }), /* @__PURE__ */ r(ue.Item, {
2601
- icon: /* @__PURE__ */ r(uo, {
2600
+ icon: /* @__PURE__ */ r(ho, {
2602
2601
  size: 14
2603
2602
  }),
2604
2603
  onClick: W,
@@ -2619,7 +2618,7 @@ const va = D(function({
2619
2618
  })]
2620
2619
  });
2621
2620
  });
2622
- const ya = D(() => {
2621
+ const xa = D(() => {
2623
2622
  const {
2624
2623
  freezeLayout: t
2625
2624
  } = x.useContext(_e), [e, n] = x.useState(!1), {
@@ -2633,7 +2632,7 @@ const ya = D(() => {
2633
2632
  onClose: () => n(!1),
2634
2633
  title: a.title,
2635
2634
  withCloseButton: !1,
2636
- children: /* @__PURE__ */ r(Qr, {
2635
+ children: /* @__PURE__ */ r(Ur, {
2637
2636
  readOnly: !0,
2638
2637
  value: a.description,
2639
2638
  onChange: B.noop,
@@ -2641,7 +2640,7 @@ const ya = D(() => {
2641
2640
  border: "none"
2642
2641
  }
2643
2642
  })
2644
- }), /* @__PURE__ */ r(qi, {
2643
+ }), /* @__PURE__ */ r($i, {
2645
2644
  label: "Click to see description",
2646
2645
  position: "top-start",
2647
2646
  withinPortal: !0,
@@ -2653,13 +2652,13 @@ const ya = D(() => {
2653
2652
  verticalAlign: "baseline",
2654
2653
  cursor: "pointer"
2655
2654
  },
2656
- children: /* @__PURE__ */ r(ho, {
2655
+ children: /* @__PURE__ */ r(po, {
2657
2656
  size: 20
2658
2657
  })
2659
2658
  })
2660
2659
  })]
2661
2660
  });
2662
- }), xa = (t) => {
2661
+ }), Ca = (t) => {
2663
2662
  const {
2664
2663
  title: e = "Variables",
2665
2664
  variables: n
@@ -2669,7 +2668,7 @@ const ya = D(() => {
2669
2668
  message: "Copied to clipboard"
2670
2669
  });
2671
2670
  };
2672
- return /* @__PURE__ */ c($i, {
2671
+ return /* @__PURE__ */ c(Ni, {
2673
2672
  withBorder: !0,
2674
2673
  p: "sm",
2675
2674
  children: [/* @__PURE__ */ r(v, {
@@ -2683,10 +2682,10 @@ const ya = D(() => {
2683
2682
  },
2684
2683
  children: n.map((o) => /* @__PURE__ */ c(v, {
2685
2684
  size: "sm",
2686
- children: [/* @__PURE__ */ c(hr, {
2685
+ children: [/* @__PURE__ */ c(pr, {
2687
2686
  color: "teal",
2688
2687
  children: ["// ", o.description]
2689
- }), /* @__PURE__ */ r("br", {}), /* @__PURE__ */ c(hr, {
2688
+ }), /* @__PURE__ */ r("br", {}), /* @__PURE__ */ c(pr, {
2690
2689
  onClick: () => i(o.name),
2691
2690
  style: {
2692
2691
  cursor: "pointer"
@@ -2703,7 +2702,7 @@ class Os {
2703
2702
  O(this, "operation");
2704
2703
  O(this, "operationSchema");
2705
2704
  O(this, "variables", []);
2706
- this.operationManager = e, this.instance = n, bn(this);
2705
+ this.operationManager = e, this.instance = n, vn(this);
2707
2706
  }
2708
2707
  get schemaList() {
2709
2708
  return this.operationManager.getOperationSchemaList();
@@ -2785,7 +2784,7 @@ const Ls = D((t) => {
2785
2784
  model: u
2786
2785
  }), /* @__PURE__ */ r(As, {
2787
2786
  model: u
2788
- }), /* @__PURE__ */ r(xa, {
2787
+ }), /* @__PURE__ */ r(Ca, {
2789
2788
  title: "Variables",
2790
2789
  variables: u.variables
2791
2790
  })]
@@ -2799,7 +2798,7 @@ class qs {
2799
2798
  O(this, "trigger");
2800
2799
  O(this, "triggerSchema");
2801
2800
  O(this, "sampleData");
2802
- this.triggerManager = e, this.instance = n, bn(this);
2801
+ this.triggerManager = e, this.instance = n, vn(this);
2803
2802
  }
2804
2803
  get schemaList() {
2805
2804
  return this.triggerManager.getTriggerSchemaList();
@@ -2878,7 +2877,7 @@ const Bs = D(({
2878
2877
  model: i
2879
2878
  }), /* @__PURE__ */ r(Gs, {
2880
2879
  model: i
2881
- }), /* @__PURE__ */ r(xa, {
2880
+ }), /* @__PURE__ */ r(Ca, {
2882
2881
  title: "Payload",
2883
2882
  variables: i.triggerSchema.payload
2884
2883
  })]
@@ -2928,7 +2927,7 @@ class Ue {
2928
2927
  );
2929
2928
  }
2930
2929
  }
2931
- class _n {
2930
+ class In {
2932
2931
  constructor(e, n, a) {
2933
2932
  O(this, "attachmentStorage");
2934
2933
  this.instance = e, this.attachmentKey = n, this.constructInstance = a, this.attachmentStorage = new Ue(e.instanceData, n);
@@ -2946,20 +2945,20 @@ class _n {
2946
2945
  async list() {
2947
2946
  const e = await this.attachmentStorage.getItem(null);
2948
2947
  return Promise.all(
2949
- Er(e).map(
2948
+ Or(e).map(
2950
2949
  (n) => this.constructInstance(new Ue(this.attachmentStorage, n.id))
2951
2950
  )
2952
2951
  );
2953
2952
  }
2954
2953
  }
2955
- class Ca {
2954
+ class wa {
2956
2955
  constructor(e) {
2957
2956
  O(this, "rootRef");
2958
- this.rootRef = Ur({ current: e });
2957
+ this.rootRef = Xr({ current: e });
2959
2958
  }
2960
2959
  async deleteItem(e) {
2961
2960
  ct(() => {
2962
- Ui(this.rootRef.current, [e]);
2961
+ Hi(this.rootRef.current, [e]);
2963
2962
  });
2964
2963
  }
2965
2964
  getItem(e) {
@@ -2971,7 +2970,7 @@ class Ca {
2971
2970
  }
2972
2971
  setItem(e, n) {
2973
2972
  if (e === null)
2974
- if (Or(n))
2973
+ if (Fr(n))
2975
2974
  ct(() => {
2976
2975
  this.rootRef.current = n;
2977
2976
  });
@@ -2979,12 +2978,12 @@ class Ca {
2979
2978
  throw new Error("Cannot set root value to non-object");
2980
2979
  else
2981
2980
  ct(() => {
2982
- Fr(this.rootRef.current, [e], n);
2981
+ Pr(this.rootRef.current, [e], n);
2983
2982
  });
2984
2983
  return Promise.resolve(this.getItem(e));
2985
2984
  }
2986
2985
  watchItem(e, n, a) {
2987
- return vn(
2986
+ return At(
2988
2987
  () => this.getValueFromRoot(e),
2989
2988
  (i, o) => {
2990
2989
  n(i, o);
@@ -2999,13 +2998,13 @@ class Ca {
2999
2998
  class Qs {
3000
2999
  constructor() {
3001
3000
  O(this, "channels", /* @__PURE__ */ new Map());
3002
- O(this, "globalChannel", new gr());
3001
+ O(this, "globalChannel", new br());
3003
3002
  }
3004
3003
  getChannel(e) {
3005
3004
  const n = this.channels.get(e);
3006
3005
  if (n)
3007
3006
  return n;
3008
- const a = new gr();
3007
+ const a = new br();
3009
3008
  return this.channels.set(e, a), a;
3010
3009
  }
3011
3010
  }
@@ -3029,18 +3028,18 @@ class Ys {
3029
3028
  name: e.viz.type,
3030
3029
  type: e.viz.type,
3031
3030
  messageChannels: new Qs(),
3032
- instanceData: new Ca(e.viz.conf)
3031
+ instanceData: new wa(e.viz.conf)
3033
3032
  };
3034
3033
  return this.instances.set(e.id, a), a;
3035
3034
  }
3036
3035
  }
3037
- function wa(t, e, n) {
3036
+ function Sa(t, e, n) {
3038
3037
  return {
3039
3038
  vizManager: n,
3040
3039
  locale: "zh",
3041
3040
  msgChannels: t.messageChannels,
3042
3041
  instanceData: t.instanceData,
3043
- pluginData: new Ca({}),
3042
+ pluginData: new wa({}),
3044
3043
  colorPalette: {
3045
3044
  getColor() {
3046
3045
  return () => "";
@@ -3055,7 +3054,7 @@ const Us = (t) => {
3055
3054
  vizManager: n,
3056
3055
  data: a
3057
3056
  } = t, i = n.resolveComponent(e.viz.type), o = n.getOrCreateInstance(e), s = {
3058
- ...wa(o, a, n),
3057
+ ...Sa(o, a, n),
3059
3058
  viewport: {
3060
3059
  width: e.layout.w,
3061
3060
  height: e.layout.h
@@ -3073,7 +3072,7 @@ const Us = (t) => {
3073
3072
  panelInfoEditor: a,
3074
3073
  data: i
3075
3074
  } = t, o = e.resolveComponent(n.viz.type), s = e.getOrCreateInstance(n), l = {
3076
- ...wa(s, i, e),
3075
+ ...Sa(s, i, e),
3077
3076
  panelInfoEditor: a
3078
3077
  }, u = o.configRender;
3079
3078
  return /* @__PURE__ */ r(u, {
@@ -3081,12 +3080,12 @@ const Us = (t) => {
3081
3080
  instance: s,
3082
3081
  ...Ft(t, ["panel", "vizManager", "data", "panelInfoEditor"])
3083
3082
  });
3084
- }, Sa = (t, e) => {
3083
+ }, _a = (t, e) => {
3085
3084
  const n = ht.bezier(t), a = ht.bezier(e);
3086
3085
  return function(i) {
3087
3086
  return i < 50 ? n(i * 2 / 100).hex() : a((i - 50) * 2 / 100).hex();
3088
3087
  };
3089
- }, Lt = (t) => {
3088
+ }, qt = (t) => {
3090
3089
  const e = ht.bezier(t);
3091
3090
  return function(n) {
3092
3091
  return e(n / 100).hex();
@@ -3094,40 +3093,40 @@ const Us = (t) => {
3094
3093
  }, Xs = {
3095
3094
  type: "interpolation",
3096
3095
  displayName: "Red / Green",
3097
- getColor: Sa(["darkred", "deeppink", "lightyellow"], ["lightyellow", "lightgreen", "teal"]),
3096
+ getColor: _a(["darkred", "deeppink", "lightyellow"], ["lightyellow", "lightgreen", "teal"]),
3098
3097
  name: "red-green",
3099
3098
  category: "diverging"
3100
3099
  }, Js = {
3101
3100
  type: "interpolation",
3102
3101
  displayName: "Yellow / Blue",
3103
- getColor: Sa(["#8f531d", "#ffd347", "#e3efe3"], ["#eefaee", "#4ecbbf", "#003f94"]),
3102
+ getColor: _a(["#8f531d", "#ffd347", "#e3efe3"], ["#eefaee", "#4ecbbf", "#003f94"]),
3104
3103
  name: "yellow-blue",
3105
3104
  category: "diverging"
3106
3105
  }, Ks = {
3107
3106
  type: "interpolation",
3108
3107
  displayName: "Red",
3109
- getColor: Lt(["#fff7f1", "darkred"]),
3108
+ getColor: qt(["#fff7f1", "darkred"]),
3110
3109
  name: "red",
3111
3110
  category: "sequential"
3112
3111
  }, Zs = {
3113
3112
  type: "interpolation",
3114
3113
  displayName: "Green",
3115
- getColor: Lt(["#f0ffed", "darkgreen"]),
3114
+ getColor: qt(["#f0ffed", "darkgreen"]),
3116
3115
  name: "green",
3117
3116
  category: "sequential"
3118
3117
  }, el = {
3119
3118
  type: "interpolation",
3120
3119
  displayName: "Blue",
3121
- getColor: Lt(["#f9fcff", "#48b3e9", "darkblue"]),
3120
+ getColor: qt(["#f9fcff", "#48b3e9", "darkblue"]),
3122
3121
  name: "blue",
3123
3122
  category: "sequential"
3124
3123
  }, tl = {
3125
3124
  type: "interpolation",
3126
3125
  displayName: "Orange",
3127
- getColor: Lt(["#fff7f1", "darkorange", "#b60000"]),
3126
+ getColor: qt(["#fff7f1", "darkorange", "#b60000"]),
3128
3127
  name: "orange",
3129
3128
  category: "sequential"
3130
- }, nl = "4.16.3";
3129
+ }, nl = "4.16.5";
3131
3130
  class rl {
3132
3131
  constructor(e) {
3133
3132
  O(this, "staticColors", /* @__PURE__ */ new Map());
@@ -3205,8 +3204,8 @@ class il {
3205
3204
  throw new Error(`Can not downgrade from version '${e.from}' to (${e.to})`);
3206
3205
  const a = this.migrations.filter(
3207
3206
  (s) => s.version > e.from && s.version <= e.to
3208
- ), i = Hi(a, "version", "asc");
3209
- if (((o = Xi(i)) == null ? void 0 : o.version) !== e.to)
3207
+ ), i = Xi(a, "version", "asc");
3208
+ if (((o = Ji(i)) == null ? void 0 : o.version) !== e.to)
3210
3209
  throw new Error(`Migration to version ${e.to} not found`);
3211
3210
  return i.reduce((s, l) => l.handler(s), n);
3212
3211
  }
@@ -3227,7 +3226,7 @@ class ye extends il {
3227
3226
  return ae(n, "version", 0) < this.VERSION;
3228
3227
  }
3229
3228
  }
3230
- const In = {
3229
+ const Dn = {
3231
3230
  content: ""
3232
3231
  }, G = (t, e) => {
3233
3232
  const [n, { setFalse: a }] = mt(!0), [i, o] = de();
@@ -3248,8 +3247,8 @@ const In = {
3248
3247
  set: s
3249
3248
  };
3250
3249
  };
3251
- function _a(t) {
3252
- const e = Qi(null);
3250
+ function Ia(t) {
3251
+ const e = Yi(null);
3253
3252
  return Z(() => {
3254
3253
  var n, a, i;
3255
3254
  t && ((i = (a = (n = e.current) == null ? void 0 : n.editor) == null ? void 0 : a.clipboard) == null || i.dangerouslyPasteHTML(t));
@@ -3260,12 +3259,12 @@ function ol({
3260
3259
  }) {
3261
3260
  const {
3262
3261
  value: e
3263
- } = G(t.instanceData, "config"), n = e == null ? void 0 : e.content, a = _a(n);
3264
- return e != null && e.content ? /* @__PURE__ */ r(Yr, {
3262
+ } = G(t.instanceData, "config"), n = e == null ? void 0 : e.content, a = Ia(n);
3263
+ return e != null && e.content ? /* @__PURE__ */ r(Hr, {
3265
3264
  ref: a,
3266
3265
  readOnly: !0,
3267
3266
  value: e.content,
3268
- onChange: Ji,
3267
+ onChange: Ki,
3269
3268
  sx: {
3270
3269
  border: "none",
3271
3270
  ".ql-editor": {
@@ -3285,7 +3284,7 @@ function sl({
3285
3284
  const {
3286
3285
  value: e,
3287
3286
  set: n
3288
- } = G(t.instanceData, "config"), a = M(() => ne({}, e, In), [e]), {
3287
+ } = G(t.instanceData, "config"), a = M(() => ne({}, e, Dn), [e]), {
3289
3288
  control: i,
3290
3289
  handleSubmit: o,
3291
3290
  watch: s,
@@ -3294,7 +3293,7 @@ function sl({
3294
3293
  defaultValues: a
3295
3294
  });
3296
3295
  s("content");
3297
- const u = l(), p = M(() => !De(u, e), [u, e]), h = _a(e == null ? void 0 : e.content);
3296
+ const u = l(), p = M(() => !De(u, e), [u, e]), h = Ia(e == null ? void 0 : e.content);
3298
3297
  return /* @__PURE__ */ r(w, {
3299
3298
  mt: "md",
3300
3299
  spacing: "xs",
@@ -3325,7 +3324,7 @@ function sl({
3325
3324
  control: i,
3326
3325
  render: ({
3327
3326
  field: f
3328
- }) => /* @__PURE__ */ r(Qr, {
3327
+ }) => /* @__PURE__ */ r(Ur, {
3329
3328
  ref: h,
3330
3329
  sx: {
3331
3330
  flex: 1
@@ -3342,7 +3341,7 @@ class ll extends ye {
3342
3341
  O(this, "VERSION", 1);
3343
3342
  }
3344
3343
  fixMalformedConfig(n) {
3345
- return ne({}, n, In);
3344
+ return ne({}, n, Dn);
3346
3345
  }
3347
3346
  configVersions() {
3348
3347
  this.version(1, (n) => ({
@@ -3357,8 +3356,8 @@ const cl = {
3357
3356
  name: "richText",
3358
3357
  viewRender: ol,
3359
3358
  configRender: sl,
3360
- createConfig: () => In
3361
- }, Dn = {
3359
+ createConfig: () => Dn
3360
+ }, Rn = {
3362
3361
  align: "center",
3363
3362
  template: "The variable ${value} is defined in Variables section",
3364
3363
  variables: [
@@ -3422,7 +3421,7 @@ class dl extends ye {
3422
3421
  this.version(1, (n) => ({ config: ul(n) }));
3423
3422
  }
3424
3423
  }
3425
- const on = gn(function({
3424
+ const sn = bn(function({
3426
3425
  value: e,
3427
3426
  onChange: n,
3428
3427
  ...a
@@ -3548,19 +3547,19 @@ function hl({
3548
3547
  children: [/* @__PURE__ */ c(v, {
3549
3548
  size: 12,
3550
3549
  color: "gray",
3551
- children: ["123456789 ", /* @__PURE__ */ r(en, {
3550
+ children: ["123456789 ", /* @__PURE__ */ r(tn, {
3552
3551
  size: 9
3553
3552
  }), " ", fe(123456789).format(t)]
3554
3553
  }), /* @__PURE__ */ c(v, {
3555
3554
  size: 12,
3556
3555
  color: "gray",
3557
- children: ["1234 ", /* @__PURE__ */ r(en, {
3556
+ children: ["1234 ", /* @__PURE__ */ r(tn, {
3558
3557
  size: 9
3559
3558
  }), " ", fe(1234).format(t)]
3560
3559
  }), /* @__PURE__ */ c(v, {
3561
3560
  size: 12,
3562
3561
  color: "gray",
3563
- children: ["0.1234 ", /* @__PURE__ */ r(en, {
3562
+ children: ["0.1234 ", /* @__PURE__ */ r(tn, {
3564
3563
  size: 9
3565
3564
  }), " ", fe(0.1234).format(t)]
3566
3565
  })]
@@ -3569,8 +3568,8 @@ function hl({
3569
3568
  })]
3570
3569
  });
3571
3570
  }
3572
- const Rn = x.forwardRef(hl);
3573
- function qt() {
3571
+ const kn = x.forwardRef(hl);
3572
+ function $t() {
3574
3573
  return {
3575
3574
  name: ge(),
3576
3575
  size: "20px",
@@ -3702,7 +3701,7 @@ function bl({
3702
3701
  o((y) => (y.splice(m, 1), [...y]));
3703
3702
  }, [o]), u = x.useMemo(() => !B.isEqual(i, e), [i, e]), p = () => {
3704
3703
  n(i.map((m) => m.toString()));
3705
- }, h = Ni(), f = x.useMemo(() => Object.entries(h.colors).map(([m, y]) => y[6]), [h]);
3704
+ }, h = Bi(), f = x.useMemo(() => Object.entries(h.colors).map(([m, y]) => y[6]), [h]);
3706
3705
  return /* @__PURE__ */ c(Y, {
3707
3706
  children: [/* @__PURE__ */ c(g, {
3708
3707
  position: "left",
@@ -3720,7 +3719,7 @@ function bl({
3720
3719
  })
3721
3720
  })]
3722
3721
  }), /* @__PURE__ */ c(g, {
3723
- children: [i.map((m, y) => /* @__PURE__ */ r(Bi, {
3722
+ children: [i.map((m, y) => /* @__PURE__ */ r(ji, {
3724
3723
  value: m,
3725
3724
  onChange: (I) => {
3726
3725
  o((R) => (R.splice(y, 1, I), [...R]));
@@ -3767,7 +3766,7 @@ function yl({
3767
3766
  placeholder: "Set any color",
3768
3767
  value: o ? "" : t,
3769
3768
  onChange: (s) => e(s.currentTarget.value),
3770
- rightSection: /* @__PURE__ */ r(pr, {
3769
+ rightSection: /* @__PURE__ */ r(mr, {
3771
3770
  color: o ? "transparent" : t,
3772
3771
  radius: 4
3773
3772
  }),
@@ -3787,7 +3786,7 @@ function yl({
3787
3786
  onChange: e,
3788
3787
  variant: o ? "default" : "filled",
3789
3788
  placeholder: "Pick a theme color",
3790
- icon: /* @__PURE__ */ r(pr, {
3789
+ icon: /* @__PURE__ */ r(mr, {
3791
3790
  color: o ? t : "transparent",
3792
3791
  radius: 4
3793
3792
  }),
@@ -3831,7 +3830,7 @@ function xl({
3831
3830
  children: [/* @__PURE__ */ r(v, {
3832
3831
  size: "sm",
3833
3832
  children: t
3834
- }), /* @__PURE__ */ r(Vr, {
3833
+ }), /* @__PURE__ */ r(zr, {
3835
3834
  label: null,
3836
3835
  marks: It,
3837
3836
  value: i,
@@ -3968,7 +3967,7 @@ const Sl = x.forwardRef(wl), _l = x.forwardRef(function({
3968
3967
  })]
3969
3968
  })]
3970
3969
  });
3971
- }), $t = x.forwardRef(function({
3970
+ }), Nt = x.forwardRef(function({
3972
3971
  value: e,
3973
3972
  onChange: n,
3974
3973
  data: a,
@@ -4013,7 +4012,7 @@ const Sl = x.forwardRef(wl), _l = x.forwardRef(function({
4013
4012
  my: "xs",
4014
4013
  label: "Format",
4015
4014
  labelPosition: "center"
4016
- }), /* @__PURE__ */ r(Rn, {
4015
+ }), /* @__PURE__ */ r(kn, {
4017
4016
  value: e.formatter,
4018
4017
  onChange: (l) => s("formatter", l)
4019
4018
  }), i && /* @__PURE__ */ r(_l, {
@@ -4026,7 +4025,7 @@ function Il(t) {
4026
4025
  const e = Array.from(t).sort((a, i) => a - i), n = Math.floor(e.length / 2);
4027
4026
  return e.length % 2 === 0 ? (e[n - 1] + e[n]) / 2 : e[n];
4028
4027
  }
4029
- function kn(t, e, n) {
4028
+ function Tn(t, e, n) {
4030
4029
  var i, o, s, l;
4031
4030
  const a = t.map((u) => u[e]);
4032
4031
  switch (n.type) {
@@ -4046,35 +4045,35 @@ function kn(t, e, n) {
4046
4045
  return (l = t[0]) == null ? void 0 : l[e];
4047
4046
  }
4048
4047
  }
4049
- var Ia = function() {
4048
+ var Da = function() {
4050
4049
  }, pt = function() {
4051
4050
  };
4052
- process.env.NODE_ENV !== "production" && (Ia = function(t, e) {
4051
+ process.env.NODE_ENV !== "production" && (Da = function(t, e) {
4053
4052
  !t && typeof console < "u" && console.warn(e);
4054
4053
  }, pt = function(t, e) {
4055
4054
  if (!t)
4056
4055
  throw new Error(e);
4057
4056
  });
4058
- const Dl = (t, e, n) => Math.min(Math.max(n, t), e), Da = (t, e, n) => {
4057
+ const Dl = (t, e, n) => Math.min(Math.max(n, t), e), Ra = (t, e, n) => {
4059
4058
  const a = e - t;
4060
4059
  return a === 0 ? 1 : (n - t) / a;
4061
- }, Tn = (t, e, n) => -n * t + n * e + t, Ra = (t, e) => (n) => Math.max(Math.min(n, e), t), ut = (t) => t % 1 ? Number(t.toFixed(5)) : t, kt = /(-)?([\d]*\.?[\d])+/g, sn = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi, Rl = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;
4060
+ }, Vn = (t, e, n) => -n * t + n * e + t, ka = (t, e) => (n) => Math.max(Math.min(n, e), t), ut = (t) => t % 1 ? Number(t.toFixed(5)) : t, kt = /(-)?([\d]*\.?[\d])+/g, ln = /(#[0-9a-f]{6}|#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))/gi, Rl = /^(#[0-9a-f]{3}|#(?:[0-9a-f]{2}){2,4}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2,3}\s*\/*\s*[\d\.]+%?\))$/i;
4062
4061
  function bt(t) {
4063
4062
  return typeof t == "string";
4064
4063
  }
4065
- const Nt = {
4064
+ const Bt = {
4066
4065
  test: (t) => typeof t == "number",
4067
4066
  parse: parseFloat,
4068
4067
  transform: (t) => t
4069
- }, ka = Object.assign(Object.assign({}, Nt), { transform: Ra(0, 1) });
4070
- Object.assign(Object.assign({}, Nt), { default: 1 });
4068
+ }, Ta = Object.assign(Object.assign({}, Bt), { transform: ka(0, 1) });
4069
+ Object.assign(Object.assign({}, Bt), { default: 1 });
4071
4070
  const kl = (t) => ({
4072
4071
  test: (e) => bt(e) && e.endsWith(t) && e.split(" ").length === 1,
4073
4072
  parse: parseFloat,
4074
4073
  transform: (e) => `${e}${t}`
4075
4074
  }), dt = kl("%");
4076
4075
  Object.assign(Object.assign({}, dt), { parse: (t) => dt.parse(t) / 100, transform: (t) => dt.transform(t * 100) });
4077
- const Vn = (t, e) => (n) => Boolean(bt(n) && Rl.test(n) && n.startsWith(t) || e && Object.prototype.hasOwnProperty.call(n, e)), Ta = (t, e, n) => (a) => {
4076
+ const zn = (t, e) => (n) => Boolean(bt(n) && Rl.test(n) && n.startsWith(t) || e && Object.prototype.hasOwnProperty.call(n, e)), Va = (t, e, n) => (a) => {
4078
4077
  if (!bt(a))
4079
4078
  return a;
4080
4079
  const [i, o, s, l] = a.match(kt);
@@ -4085,13 +4084,13 @@ const Vn = (t, e) => (n) => Boolean(bt(n) && Rl.test(n) && n.startsWith(t) || e
4085
4084
  alpha: l !== void 0 ? parseFloat(l) : 1
4086
4085
  };
4087
4086
  }, Ne = {
4088
- test: Vn("hsl", "hue"),
4089
- parse: Ta("hue", "saturation", "lightness"),
4090
- transform: ({ hue: t, saturation: e, lightness: n, alpha: a = 1 }) => "hsla(" + Math.round(t) + ", " + dt.transform(ut(e)) + ", " + dt.transform(ut(n)) + ", " + ut(ka.transform(a)) + ")"
4091
- }, Tl = Ra(0, 255), tn = Object.assign(Object.assign({}, Nt), { transform: (t) => Math.round(Tl(t)) }), Ee = {
4092
- test: Vn("rgb", "red"),
4093
- parse: Ta("red", "green", "blue"),
4094
- transform: ({ red: t, green: e, blue: n, alpha: a = 1 }) => "rgba(" + tn.transform(t) + ", " + tn.transform(e) + ", " + tn.transform(n) + ", " + ut(ka.transform(a)) + ")"
4087
+ test: zn("hsl", "hue"),
4088
+ parse: Va("hue", "saturation", "lightness"),
4089
+ transform: ({ hue: t, saturation: e, lightness: n, alpha: a = 1 }) => "hsla(" + Math.round(t) + ", " + dt.transform(ut(e)) + ", " + dt.transform(ut(n)) + ", " + ut(Ta.transform(a)) + ")"
4090
+ }, Tl = ka(0, 255), nn = Object.assign(Object.assign({}, Bt), { transform: (t) => Math.round(Tl(t)) }), Ee = {
4091
+ test: zn("rgb", "red"),
4092
+ parse: Va("red", "green", "blue"),
4093
+ transform: ({ red: t, green: e, blue: n, alpha: a = 1 }) => "rgba(" + nn.transform(t) + ", " + nn.transform(e) + ", " + nn.transform(n) + ", " + ut(Ta.transform(a)) + ")"
4095
4094
  };
4096
4095
  function Vl(t) {
4097
4096
  let e = "", n = "", a = "", i = "";
@@ -4102,57 +4101,57 @@ function Vl(t) {
4102
4101
  alpha: i ? parseInt(i, 16) / 255 : 1
4103
4102
  };
4104
4103
  }
4105
- const ln = {
4106
- test: Vn("#"),
4104
+ const cn = {
4105
+ test: zn("#"),
4107
4106
  parse: Vl,
4108
4107
  transform: Ee.transform
4109
- }, Bt = {
4110
- test: (t) => Ee.test(t) || ln.test(t) || Ne.test(t),
4111
- parse: (t) => Ee.test(t) ? Ee.parse(t) : Ne.test(t) ? Ne.parse(t) : ln.parse(t),
4108
+ }, jt = {
4109
+ test: (t) => Ee.test(t) || cn.test(t) || Ne.test(t),
4110
+ parse: (t) => Ee.test(t) ? Ee.parse(t) : Ne.test(t) ? Ne.parse(t) : cn.parse(t),
4112
4111
  transform: (t) => bt(t) ? t : t.hasOwnProperty("red") ? Ee.transform(t) : Ne.transform(t)
4113
- }, Va = "${c}", za = "${n}";
4112
+ }, za = "${c}", Ea = "${n}";
4114
4113
  function zl(t) {
4115
4114
  var e, n, a, i;
4116
- return isNaN(t) && bt(t) && ((n = (e = t.match(kt)) === null || e === void 0 ? void 0 : e.length) !== null && n !== void 0 ? n : 0) + ((i = (a = t.match(sn)) === null || a === void 0 ? void 0 : a.length) !== null && i !== void 0 ? i : 0) > 0;
4115
+ return isNaN(t) && bt(t) && ((n = (e = t.match(kt)) === null || e === void 0 ? void 0 : e.length) !== null && n !== void 0 ? n : 0) + ((i = (a = t.match(ln)) === null || a === void 0 ? void 0 : a.length) !== null && i !== void 0 ? i : 0) > 0;
4117
4116
  }
4118
- function Ea(t) {
4117
+ function Oa(t) {
4119
4118
  typeof t == "number" && (t = `${t}`);
4120
4119
  const e = [];
4121
4120
  let n = 0;
4122
- const a = t.match(sn);
4123
- a && (n = a.length, t = t.replace(sn, Va), e.push(...a.map(Bt.parse)));
4121
+ const a = t.match(ln);
4122
+ a && (n = a.length, t = t.replace(ln, za), e.push(...a.map(jt.parse)));
4124
4123
  const i = t.match(kt);
4125
- return i && (t = t.replace(kt, za), e.push(...i.map(Nt.parse))), { values: e, numColors: n, tokenised: t };
4126
- }
4127
- function Oa(t) {
4128
- return Ea(t).values;
4124
+ return i && (t = t.replace(kt, Ea), e.push(...i.map(Bt.parse))), { values: e, numColors: n, tokenised: t };
4129
4125
  }
4130
4126
  function Fa(t) {
4131
- const { values: e, numColors: n, tokenised: a } = Ea(t), i = e.length;
4127
+ return Oa(t).values;
4128
+ }
4129
+ function Pa(t) {
4130
+ const { values: e, numColors: n, tokenised: a } = Oa(t), i = e.length;
4132
4131
  return (o) => {
4133
4132
  let s = a;
4134
4133
  for (let l = 0; l < i; l++)
4135
- s = s.replace(l < n ? Va : za, l < n ? Bt.transform(o[l]) : ut(o[l]));
4134
+ s = s.replace(l < n ? za : Ea, l < n ? jt.transform(o[l]) : ut(o[l]));
4136
4135
  return s;
4137
4136
  };
4138
4137
  }
4139
4138
  const El = (t) => typeof t == "number" ? 0 : t;
4140
4139
  function Ol(t) {
4141
- const e = Oa(t);
4142
- return Fa(t)(e.map(El));
4140
+ const e = Fa(t);
4141
+ return Pa(t)(e.map(El));
4143
4142
  }
4144
- const Pa = { test: zl, parse: Oa, createTransformer: Fa, getAnimatableNone: Ol };
4145
- function nn(t, e, n) {
4143
+ const Aa = { test: zl, parse: Fa, createTransformer: Pa, getAnimatableNone: Ol };
4144
+ function rn(t, e, n) {
4146
4145
  return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? t + (e - t) * 6 * n : n < 1 / 2 ? e : n < 2 / 3 ? t + (e - t) * (2 / 3 - n) * 6 : t;
4147
4146
  }
4148
- function xr({ hue: t, saturation: e, lightness: n, alpha: a }) {
4147
+ function Cr({ hue: t, saturation: e, lightness: n, alpha: a }) {
4149
4148
  t /= 360, e /= 100, n /= 100;
4150
4149
  let i = 0, o = 0, s = 0;
4151
4150
  if (!e)
4152
4151
  i = o = s = n;
4153
4152
  else {
4154
4153
  const l = n < 0.5 ? n * (1 + e) : n + e - n * e, u = 2 * n - l;
4155
- i = nn(u, l, t + 1 / 3), o = nn(u, l, t), s = nn(u, l, t - 1 / 3);
4154
+ i = rn(u, l, t + 1 / 3), o = rn(u, l, t), s = rn(u, l, t - 1 / 3);
4156
4155
  }
4157
4156
  return {
4158
4157
  red: Math.round(i * 255),
@@ -4164,23 +4163,23 @@ function xr({ hue: t, saturation: e, lightness: n, alpha: a }) {
4164
4163
  const Fl = (t, e, n) => {
4165
4164
  const a = t * t, i = e * e;
4166
4165
  return Math.sqrt(Math.max(0, n * (i - a) + a));
4167
- }, Pl = [ln, Ee, Ne], Cr = (t) => Pl.find((e) => e.test(t)), wr = (t) => `'${t}' is not an animatable color. Use the equivalent color code instead.`, Aa = (t, e) => {
4168
- let n = Cr(t), a = Cr(e);
4169
- pt(!!n, wr(t)), pt(!!a, wr(e));
4166
+ }, Pl = [cn, Ee, Ne], wr = (t) => Pl.find((e) => e.test(t)), Sr = (t) => `'${t}' is not an animatable color. Use the equivalent color code instead.`, Ma = (t, e) => {
4167
+ let n = wr(t), a = wr(e);
4168
+ pt(!!n, Sr(t)), pt(!!a, Sr(e));
4170
4169
  let i = n.parse(t), o = a.parse(e);
4171
- n === Ne && (i = xr(i), n = Ee), a === Ne && (o = xr(o), a = Ee);
4170
+ n === Ne && (i = Cr(i), n = Ee), a === Ne && (o = Cr(o), a = Ee);
4172
4171
  const s = Object.assign({}, i);
4173
4172
  return (l) => {
4174
4173
  for (const u in s)
4175
4174
  u !== "alpha" && (s[u] = Fl(i[u], o[u], l));
4176
- return s.alpha = Tn(i.alpha, o.alpha, l), n.transform(s);
4175
+ return s.alpha = Vn(i.alpha, o.alpha, l), n.transform(s);
4177
4176
  };
4178
- }, Al = (t) => typeof t == "number", Ml = (t, e) => (n) => e(t(n)), Ma = (...t) => t.reduce(Ml);
4179
- function La(t, e) {
4180
- return Al(t) ? (n) => Tn(t, e, n) : Bt.test(t) ? Aa(t, e) : $a(t, e);
4177
+ }, Al = (t) => typeof t == "number", Ml = (t, e) => (n) => e(t(n)), La = (...t) => t.reduce(Ml);
4178
+ function qa(t, e) {
4179
+ return Al(t) ? (n) => Vn(t, e, n) : jt.test(t) ? Ma(t, e) : Na(t, e);
4181
4180
  }
4182
- const qa = (t, e) => {
4183
- const n = [...t], a = n.length, i = t.map((o, s) => La(o, e[s]));
4181
+ const $a = (t, e) => {
4182
+ const n = [...t], a = n.length, i = t.map((o, s) => qa(o, e[s]));
4184
4183
  return (o) => {
4185
4184
  for (let s = 0; s < a; s++)
4186
4185
  n[s] = i[s](o);
@@ -4189,31 +4188,31 @@ const qa = (t, e) => {
4189
4188
  }, Ll = (t, e) => {
4190
4189
  const n = Object.assign(Object.assign({}, t), e), a = {};
4191
4190
  for (const i in n)
4192
- t[i] !== void 0 && e[i] !== void 0 && (a[i] = La(t[i], e[i]));
4191
+ t[i] !== void 0 && e[i] !== void 0 && (a[i] = qa(t[i], e[i]));
4193
4192
  return (i) => {
4194
4193
  for (const o in a)
4195
4194
  n[o] = a[o](i);
4196
4195
  return n;
4197
4196
  };
4198
4197
  };
4199
- function Sr(t) {
4200
- const e = Pa.parse(t), n = e.length;
4198
+ function _r(t) {
4199
+ const e = Aa.parse(t), n = e.length;
4201
4200
  let a = 0, i = 0, o = 0;
4202
4201
  for (let s = 0; s < n; s++)
4203
4202
  a || typeof e[s] == "number" ? a++ : e[s].hue !== void 0 ? o++ : i++;
4204
4203
  return { parsed: e, numNumbers: a, numRGB: i, numHSL: o };
4205
4204
  }
4206
- const $a = (t, e) => {
4207
- const n = Pa.createTransformer(e), a = Sr(t), i = Sr(e);
4208
- return a.numHSL === i.numHSL && a.numRGB === i.numRGB && a.numNumbers >= i.numNumbers ? Ma(qa(a.parsed, i.parsed), n) : (Ia(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), (s) => `${s > 0 ? e : t}`);
4209
- }, ql = (t, e) => (n) => Tn(t, e, n);
4205
+ const Na = (t, e) => {
4206
+ const n = Aa.createTransformer(e), a = _r(t), i = _r(e);
4207
+ return a.numHSL === i.numHSL && a.numRGB === i.numRGB && a.numNumbers >= i.numNumbers ? La($a(a.parsed, i.parsed), n) : (Da(!0, `Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`), (s) => `${s > 0 ? e : t}`);
4208
+ }, ql = (t, e) => (n) => Vn(t, e, n);
4210
4209
  function $l(t) {
4211
4210
  if (typeof t == "number")
4212
4211
  return ql;
4213
4212
  if (typeof t == "string")
4214
- return Bt.test(t) ? Aa : $a;
4213
+ return jt.test(t) ? Ma : Na;
4215
4214
  if (Array.isArray(t))
4216
- return qa;
4215
+ return $a;
4217
4216
  if (typeof t == "object")
4218
4217
  return Ll;
4219
4218
  }
@@ -4223,14 +4222,14 @@ function Nl(t, e, n) {
4223
4222
  let l = i(t[s], t[s + 1]);
4224
4223
  if (e) {
4225
4224
  const u = Array.isArray(e) ? e[s] : e;
4226
- l = Ma(u, l);
4225
+ l = La(u, l);
4227
4226
  }
4228
4227
  a.push(l);
4229
4228
  }
4230
4229
  return a;
4231
4230
  }
4232
4231
  function Bl([t, e], [n]) {
4233
- return (a) => n(Da(t, e, a));
4232
+ return (a) => n(Ra(t, e, a));
4234
4233
  }
4235
4234
  function jl(t, e) {
4236
4235
  const n = t.length, a = n - 1;
@@ -4242,7 +4241,7 @@ function jl(t, e) {
4242
4241
  ;
4243
4242
  o = u - 1;
4244
4243
  }
4245
- const l = Da(t[o], t[o + 1], i);
4244
+ const l = Ra(t[o], t[o + 1], i);
4246
4245
  return e[o](l);
4247
4246
  };
4248
4247
  }
@@ -4264,10 +4263,10 @@ class Wl {
4264
4263
  function Ql(t) {
4265
4264
  return t === null ? "null" : t === void 0 ? "undefined" : Array.isArray(t) ? `Array(${t.length})` : t.toString();
4266
4265
  }
4267
- function Na({ data_field: t, aggregation: e }, n) {
4268
- return kn(n, t, e);
4266
+ function Ba({ data_field: t, aggregation: e }, n) {
4267
+ return Tn(n, t, e);
4269
4268
  }
4270
- function jt({ formatter: t }, e) {
4269
+ function Gt({ formatter: t }, e) {
4271
4270
  return ["string", "number"].includes(typeof e) ? fe(e).format(t) : Ql(e);
4272
4271
  }
4273
4272
  function Yl(t, e) {
@@ -4283,7 +4282,7 @@ function Ul(t, e) {
4283
4282
  aggregation: l,
4284
4283
  size: u,
4285
4284
  weight: p
4286
- } = a, h = kn(e, s, l), f = jt(a, h);
4285
+ } = a, h = Tn(e, s, l), f = Gt(a, h);
4287
4286
  n[i] = /* @__PURE__ */ r(v, {
4288
4287
  sx: {
4289
4288
  fontSize: u,
@@ -4308,33 +4307,33 @@ function Xl(t) {
4308
4307
  return o !== n.length - 1 && s.push(/* @__PURE__ */ r("br", {})), s;
4309
4308
  }).flat().filter((i) => i !== void 0);
4310
4309
  }
4311
- function rn(t) {
4310
+ function an(t) {
4312
4311
  return Xl(t);
4313
4312
  }
4314
- function cn(t, e, n) {
4313
+ function un(t, e, n) {
4315
4314
  const a = Ul(e, n), i = /^\{(.+)\}(.*)$/;
4316
4315
  return t.split("$").map((o) => {
4317
4316
  var p;
4318
4317
  const s = i.exec(o);
4319
4318
  if (!s)
4320
- return rn(o);
4319
+ return an(o);
4321
4320
  const l = a[s[1]];
4322
4321
  if (!l)
4323
- return rn(o);
4322
+ return an(o);
4324
4323
  const u = (p = s[2]) != null ? p : "";
4325
4324
  return /* @__PURE__ */ c(Y, {
4326
- children: [l, rn(u)]
4325
+ children: [l, an(u)]
4327
4326
  });
4328
4327
  });
4329
4328
  }
4330
4329
  function Jl(t, e) {
4331
4330
  const n = {};
4332
4331
  return t.forEach((a) => {
4333
- const { name: i, data_field: o, aggregation: s } = a, l = kn(e, o, s);
4334
- n[i] = jt(a, l);
4332
+ const { name: i, data_field: o, aggregation: s } = a, l = Tn(e, o, s);
4333
+ n[i] = Gt(a, l);
4335
4334
  }), n;
4336
4335
  }
4337
- function Ba(t, e, n) {
4336
+ function ja(t, e, n) {
4338
4337
  const a = Jl(e, n), i = /^\{(.+)\}(.*)$/;
4339
4338
  return t.split("$").map((o) => {
4340
4339
  var p;
@@ -4352,12 +4351,12 @@ function Kl({
4352
4351
  context: t
4353
4352
  }) {
4354
4353
  const {
4355
- value: e = Dn
4354
+ value: e = Rn
4356
4355
  } = G(t.instanceData, "config"), {
4357
4356
  template: n,
4358
4357
  variables: a,
4359
4358
  align: i
4360
- } = e, o = M(() => cn(n, a, t.data), [n, a, t.data]);
4359
+ } = e, o = M(() => un(n, a, t.data), [n, a, t.data]);
4361
4360
  return /* @__PURE__ */ r(v, {
4362
4361
  align: i,
4363
4362
  children: Object.values(o).map((s) => s)
@@ -4383,7 +4382,7 @@ function Zl({
4383
4382
  control: t,
4384
4383
  render: ({
4385
4384
  field: i
4386
- }) => /* @__PURE__ */ r($t, {
4385
+ }) => /* @__PURE__ */ r(Nt, {
4387
4386
  data: a,
4388
4387
  ...i
4389
4388
  })
@@ -4417,7 +4416,7 @@ function ec({
4417
4416
  }), s = e("variables"), l = a.map((p, h) => ({
4418
4417
  ...p,
4419
4418
  ...s[h]
4420
- })), u = () => i(qt());
4419
+ })), u = () => i($t());
4421
4420
  return /* @__PURE__ */ c(w, {
4422
4421
  children: [l.map((p, h) => /* @__PURE__ */ r(Zl, {
4423
4422
  control: t,
@@ -4445,7 +4444,7 @@ function tc({
4445
4444
  align: m,
4446
4445
  template: y = "",
4447
4446
  variables: I = []
4448
- } = Ge({}, n, Dn);
4447
+ } = Ge({}, n, Rn);
4449
4448
  return {
4450
4449
  variables: I,
4451
4450
  template: y,
@@ -4495,7 +4494,7 @@ function tc({
4495
4494
  control: o,
4496
4495
  render: ({
4497
4496
  field: m
4498
- }) => /* @__PURE__ */ r(on, {
4497
+ }) => /* @__PURE__ */ r(sn, {
4499
4498
  label: "Template",
4500
4499
  py: "md",
4501
4500
  sx: {
@@ -4520,7 +4519,7 @@ const nc = {
4520
4519
  createConfig() {
4521
4520
  return {
4522
4521
  version: 1,
4523
- config: Dn
4522
+ config: Rn
4524
4523
  };
4525
4524
  },
4526
4525
  displayName: "Stats",
@@ -4543,7 +4542,7 @@ const Tt = {
4543
4542
  vizManager: t,
4544
4543
  instance: e
4545
4544
  }) => Pe(
4546
- () => new Xa(e, t.resolveComponent(e.type), Nn),
4545
+ () => new Ja(e, t.resolveComponent(e.type), Bn),
4547
4546
  [e, t]
4548
4547
  ), ac = (t, e) => {
4549
4548
  const [n, a] = de([]);
@@ -4551,7 +4550,7 @@ const Tt = {
4551
4550
  (i) => a(i.filter((o) => o.schemaRef === e))
4552
4551
  ), []), n;
4553
4552
  };
4554
- function _r(t, e, n) {
4553
+ function Ir(t, e, n) {
4555
4554
  return Math.min(Math.max(t, e), n);
4556
4555
  }
4557
4556
  class ic {
@@ -4569,11 +4568,11 @@ class ic {
4569
4568
  return (o) => a * o + i;
4570
4569
  }
4571
4570
  getStepFunctionForValue(e) {
4572
- let n = Ki(this.steps, (a) => a.from <= e);
4573
- return n = _r(n, 0, this.steps.length - 2), this.getLinearFunction(this.steps[n], this.steps[n + 1]);
4571
+ let n = Zi(this.steps, (a) => a.from <= e);
4572
+ return n = Ir(n, 0, this.steps.length - 2), this.getLinearFunction(this.steps[n], this.steps[n + 1]);
4574
4573
  }
4575
4574
  mapValue(e) {
4576
- return _r(this.getStepFunctionForValue(e)(e), 0, 100);
4575
+ return Ir(this.getStepFunctionForValue(e)(e), 0, 100);
4577
4576
  }
4578
4577
  }
4579
4578
  function oc(t, e) {
@@ -4584,7 +4583,7 @@ function oc(t, e) {
4584
4583
  i = a[o], !(e.indexOf(i) >= 0) && (n[i] = t[i]);
4585
4584
  return n;
4586
4585
  }
4587
- function ja(t, e) {
4586
+ function Ga(t, e) {
4588
4587
  if (t == null)
4589
4588
  return {};
4590
4589
  var n = oc(t, e), a, i;
@@ -4597,12 +4596,12 @@ function ja(t, e) {
4597
4596
  }
4598
4597
  var sc = ["size", "color", "stroke"];
4599
4598
  function lc(t) {
4600
- var e = t.size, n = e === void 0 ? 24 : e, a = t.color, i = a === void 0 ? "currentColor" : a, o = t.stroke, s = o === void 0 ? 2 : o, l = ja(t, sc);
4599
+ var e = t.size, n = e === void 0 ? 24 : e, a = t.color, i = a === void 0 ? "currentColor" : a, o = t.stroke, s = o === void 0 ? 2 : o, l = Ga(t, sc);
4601
4600
  return /* @__PURE__ */ c("svg", { xmlns: "http://www.w3.org/2000/svg", className: "icon icon-tabler icon-tabler-arrow-down", width: n, height: n, viewBox: "0 0 24 24", strokeWidth: s, stroke: i, fill: "none", strokeLinecap: "round", strokeLinejoin: "round", ...l, children: [/* @__PURE__ */ r("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), /* @__PURE__ */ r("line", { x1: 12, y1: 5, x2: 12, y2: 19 }), /* @__PURE__ */ r("line", { x1: 18, y1: 13, x2: 12, y2: 19 }), /* @__PURE__ */ r("line", { x1: 6, y1: 13, x2: 12, y2: 19 })] });
4602
4601
  }
4603
4602
  var cc = ["size", "color", "stroke"];
4604
4603
  function uc(t) {
4605
- var e = t.size, n = e === void 0 ? 24 : e, a = t.color, i = a === void 0 ? "currentColor" : a, o = t.stroke, s = o === void 0 ? 2 : o, l = ja(t, cc);
4604
+ var e = t.size, n = e === void 0 ? 24 : e, a = t.color, i = a === void 0 ? "currentColor" : a, o = t.stroke, s = o === void 0 ? 2 : o, l = Ga(t, cc);
4606
4605
  return /* @__PURE__ */ c("svg", { xmlns: "http://www.w3.org/2000/svg", className: "icon icon-tabler icon-tabler-arrow-up", width: n, height: n, viewBox: "0 0 24 24", strokeWidth: s, stroke: i, fill: "none", strokeLinecap: "round", strokeLinejoin: "round", ...l, children: [/* @__PURE__ */ r("path", { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }), /* @__PURE__ */ r("line", { x1: 12, y1: 5, x2: 12, y2: 19 }), /* @__PURE__ */ r("line", { x1: 18, y1: 11, x2: 12, y2: 5 }), /* @__PURE__ */ r("line", { x1: 6, y1: 11, x2: 12, y2: 5 })] });
4607
4606
  }
4608
4607
  const dc = ({
@@ -4613,7 +4612,7 @@ const dc = ({
4613
4612
  "table-head-cell--sortable": t.column.getCanSort()
4614
4613
  }),
4615
4614
  onClick: t.column.getToggleSortingHandler(),
4616
- children: [t.isPlaceholder ? null : Hr(t.column.columnDef.header, t.getContext()), /* @__PURE__ */ r(hc, {
4615
+ children: [t.isPlaceholder ? null : Jr(t.column.columnDef.header, t.getContext()), /* @__PURE__ */ r(hc, {
4617
4616
  direction: t.column.getIsSorted()
4618
4617
  })]
4619
4618
  }), hc = ({
@@ -4631,7 +4630,7 @@ const dc = ({
4631
4630
  default:
4632
4631
  return null;
4633
4632
  }
4634
- }, zn = {
4633
+ }, En = {
4635
4634
  id: "builtin:table:click-cell-content",
4636
4635
  displayName: "Click Cell Content",
4637
4636
  nameRender: bc,
@@ -4652,7 +4651,7 @@ const dc = ({
4652
4651
  }, pc = {
4653
4652
  column: ""
4654
4653
  };
4655
- function Ga(t) {
4654
+ function Wa(t) {
4656
4655
  const {
4657
4656
  value: e
4658
4657
  } = G(t.instanceData, "config");
@@ -4662,13 +4661,13 @@ function Ga(t) {
4662
4661
  })) : [];
4663
4662
  }
4664
4663
  function mc(t) {
4665
- return Pr(t) ? [] : Object.keys(t[0]).map((e) => ({
4664
+ return Ar(t) ? [] : Object.keys(t[0]).map((e) => ({
4666
4665
  label: e,
4667
4666
  value: e
4668
4667
  }));
4669
4668
  }
4670
4669
  function fc(t) {
4671
- const e = Ga(t.instance), n = mc(t.sampleData), a = e.length > 0 ? e : n, {
4670
+ const e = Wa(t.instance), n = mc(t.sampleData), a = e.length > 0 ? e : n, {
4672
4671
  value: i,
4673
4672
  set: o
4674
4673
  } = G(t.trigger.triggerData, "config"), {
@@ -4689,17 +4688,17 @@ function fc(t) {
4689
4688
  });
4690
4689
  }
4691
4690
  function gc(t, e) {
4692
- return t ? Zi(t.column) ? `Click cell of ${e[t.column].label}` : `Click cell of ${t.column}` : "Click cell content (click to config)";
4691
+ return t ? eo(t.column) ? `Click cell of ${e[t.column].label}` : `Click cell of ${t.column}` : "Click cell content (click to config)";
4693
4692
  }
4694
4693
  function bc(t) {
4695
- const e = Ga(t.instance), {
4694
+ const e = Wa(t.instance), {
4696
4695
  value: n
4697
4696
  } = G(t.trigger.triggerData, "config");
4698
4697
  return /* @__PURE__ */ r(v, {
4699
4698
  children: gc(n, e)
4700
4699
  });
4701
4700
  }
4702
- const vc = fn((t) => ({
4701
+ const vc = gn((t) => ({
4703
4702
  root: {
4704
4703
  overflow: "auto",
4705
4704
  "& .table-head-cell": {
@@ -4724,7 +4723,7 @@ const vc = fn((t) => ({
4724
4723
  position: "sticky",
4725
4724
  top: 0
4726
4725
  }
4727
- })), yc = fn((t, e) => ({
4726
+ })), yc = gn((t, e) => ({
4728
4727
  content: {
4729
4728
  display: "flex",
4730
4729
  alignItems: "center",
@@ -4747,7 +4746,7 @@ function Cc(t) {
4747
4746
  color: xc(e)
4748
4747
  };
4749
4748
  }
4750
- function Gt(t) {
4749
+ function Wt(t) {
4751
4750
  const e = t.tableCellContext.isClickable(), n = yc({
4752
4751
  clickable: e
4753
4752
  });
@@ -4766,13 +4765,13 @@ function Gt(t) {
4766
4765
  });
4767
4766
  }
4768
4767
  function wc(t) {
4769
- return /* @__PURE__ */ r(Gt, {
4768
+ return /* @__PURE__ */ r(Wt, {
4770
4769
  ...t,
4771
4770
  children: t.value
4772
4771
  });
4773
4772
  }
4774
4773
  function Sc(t) {
4775
- return /* @__PURE__ */ r(Gt, {
4774
+ return /* @__PURE__ */ r(Wt, {
4776
4775
  ...t,
4777
4776
  children: t.value
4778
4777
  });
@@ -4781,7 +4780,7 @@ function _c(t) {
4781
4780
  const e = fe(t.value).format({
4782
4781
  thousandSeparated: !0
4783
4782
  });
4784
- return /* @__PURE__ */ r(Gt, {
4783
+ return /* @__PURE__ */ r(Wt, {
4785
4784
  ...t,
4786
4785
  children: e
4787
4786
  });
@@ -4791,7 +4790,7 @@ function Ic(t) {
4791
4790
  output: "percent",
4792
4791
  mantissa: 3
4793
4792
  });
4794
- return /* @__PURE__ */ r(Gt, {
4793
+ return /* @__PURE__ */ r(Wt, {
4795
4794
  ...t,
4796
4795
  children: e
4797
4796
  });
@@ -4817,7 +4816,7 @@ function Dc(t) {
4817
4816
  }
4818
4817
  }
4819
4818
  const Rc = (t) => {
4820
- const e = rc(t), n = ac(e.triggerManager, zn.id), {
4819
+ const e = rc(t), n = ac(e.triggerManager, En.id), {
4821
4820
  colorManager: a
4822
4821
  } = Me(Te);
4823
4822
  return Rt((i) => new Tc(t.getColIndex, i, n, e, a), [n, e, t.getColIndex]);
@@ -4923,7 +4922,7 @@ function kc({
4923
4922
  const ve = Q[se.index];
4924
4923
  return /* @__PURE__ */ r("tr", {
4925
4924
  children: ve.getVisibleCells().map((le) => /* @__PURE__ */ r("td", {
4926
- children: Hr(le.column.columnDef.cell, le.getContext())
4925
+ children: Jr(le.column.columnDef.cell, le.getContext())
4927
4926
  }, le.id))
4928
4927
  }, ve.id);
4929
4928
  }), nt > 0 && /* @__PURE__ */ r("tr", {
@@ -4955,7 +4954,7 @@ class Tc {
4955
4954
  };
4956
4955
  }
4957
4956
  getRelatedTrigger() {
4958
- return this.triggers.filter((n) => n.schemaRef === zn.id).filter((n) => {
4957
+ return this.triggers.filter((n) => n.schemaRef === En.id).filter((n) => {
4959
4958
  const a = this.getColIndex(this.cell), i = ae(this.cell.column.columnDef.meta, "value_field"), o = ae(n.config, "column");
4960
4959
  return o == a || o == i;
4961
4960
  });
@@ -4970,7 +4969,7 @@ class Tc {
4970
4969
  const e = this.columnConf.cellBackgroundColor;
4971
4970
  if (!e || e === "none")
4972
4971
  return;
4973
- if (Ar(e))
4972
+ if (Mr(e))
4974
4973
  return e;
4975
4974
  const n = +this.cell.getValue();
4976
4975
  if (isFinite(n)) {
@@ -4979,7 +4978,7 @@ class Tc {
4979
4978
  }
4980
4979
  }
4981
4980
  }
4982
- const Wa = fn(() => ({
4981
+ const Qa = gn(() => ({
4983
4982
  palette: {
4984
4983
  display: "flex",
4985
4984
  flexFlow: "row nowrap"
@@ -5014,11 +5013,11 @@ class zc {
5014
5013
  O(this, "steps", /* @__PURE__ */ new Map());
5015
5014
  O(this, "interpolation");
5016
5015
  O(this, "onChange");
5017
- bn(this, {
5018
- steps: Ur
5016
+ vn(this, {
5017
+ steps: Xr
5019
5018
  }, {
5020
5019
  deep: !1
5021
- }), vn(() => Pt(this.steps), () => {
5020
+ }), At(() => Pt(this.steps), () => {
5022
5021
  this.notifyStepChange();
5023
5022
  });
5024
5023
  }
@@ -5051,7 +5050,7 @@ function Ec(t) {
5051
5050
  value: i
5052
5051
  } = t, {
5053
5052
  classes: o
5054
- } = Wa(), [s, l] = de(i), [u, {
5053
+ } = Qa(), [s, l] = de(i), [u, {
5055
5054
  setTrue: p,
5056
5055
  setFalse: h
5057
5056
  }] = mt(!1), f = a % 2 === 1, m = f && i != null, y = !f && i != null, I = `map ${i} to color ${a}`, R = () => {
@@ -5073,12 +5072,12 @@ function Ec(t) {
5073
5072
  size: "sm",
5074
5073
  className: "palette-value--up palette-value",
5075
5074
  children: Q
5076
- }), /* @__PURE__ */ c(Zt, {
5075
+ }), /* @__PURE__ */ c(en, {
5077
5076
  width: 200,
5078
5077
  trapFocus: !0,
5079
5078
  opened: u,
5080
5079
  onClose: h,
5081
- children: [/* @__PURE__ */ r(Zt.Target, {
5080
+ children: [/* @__PURE__ */ r(en.Target, {
5082
5081
  children: /* @__PURE__ */ r("div", {
5083
5082
  "data-testid": "palette-item-target",
5084
5083
  className: "palette-item",
@@ -5088,7 +5087,7 @@ function Ec(t) {
5088
5087
  backgroundColor: n
5089
5088
  }
5090
5089
  })
5091
- }), /* @__PURE__ */ r(Zt.Dropdown, {
5090
+ }), /* @__PURE__ */ r(en.Dropdown, {
5092
5091
  children: /* @__PURE__ */ c(w, {
5093
5092
  children: [/* @__PURE__ */ r(Ce, {
5094
5093
  size: "xs",
@@ -5128,7 +5127,7 @@ const Oc = D(({
5128
5127
  }) => {
5129
5128
  const {
5130
5129
  classes: e
5131
- } = Wa(), n = eo(0, 13, 1).map((a) => 100 / 12 * a).map((a) => [t.interpolation.getColor(a), a]);
5130
+ } = Qa(), n = to(0, 13, 1).map((a) => 100 / 12 * a).map((a) => [t.interpolation.getColor(a), a]);
5132
5131
  return /* @__PURE__ */ r("div", {
5133
5132
  className: e.palette,
5134
5133
  children: n.map(([a, i], o) => /* @__PURE__ */ r(Ec, {
@@ -5218,15 +5217,15 @@ const Oc = D(({
5218
5217
  from: 100,
5219
5218
  to: 100
5220
5219
  }];
5221
- function Qa(t) {
5222
- return t ? Ar(t) ? t === "none" ? "none" : "static" : "interpolation" : "none";
5220
+ function Ya(t) {
5221
+ return t ? Mr(t) ? t === "none" ? "none" : "static" : "interpolation" : "none";
5223
5222
  }
5224
5223
  function Lc(t, e) {
5225
5224
  var n;
5226
- return Qa(e) === "static" ? e : (n = t.getStaticColors()[0]) == null ? void 0 : n.value;
5225
+ return Ya(e) === "static" ? e : (n = t.getStaticColors()[0]) == null ? void 0 : n.value;
5227
5226
  }
5228
5227
  function qc(t, e) {
5229
- return Or(e) ? e : {
5228
+ return Fr(e) ? e : {
5230
5229
  steps: Mc,
5231
5230
  interpolation: t.encodeColor(t.getColorInterpolations()[0])
5232
5231
  };
@@ -5234,7 +5233,7 @@ function qc(t, e) {
5234
5233
  const $c = (t) => {
5235
5234
  const {
5236
5235
  colorManager: e
5237
- } = Me(Te), [n, a] = de(Qa(t.value)), [i, o] = de(Lc(e, t.value)), s = mr(i), [l, u] = de(qc(e, t.value)), p = mr(l);
5236
+ } = Me(Te), [n, a] = de(Ya(t.value)), [i, o] = de(Lc(e, t.value)), s = fr(i), [l, u] = de(qc(e, t.value)), p = fr(l);
5238
5237
  return /* @__PURE__ */ c(g, {
5239
5238
  align: "end",
5240
5239
  children: [/* @__PURE__ */ r(q, {
@@ -5497,11 +5496,11 @@ class Gc extends ye {
5497
5496
  }));
5498
5497
  }
5499
5498
  }
5500
- const un = {
5499
+ const dn = {
5501
5500
  createConfig() {
5502
5501
  return {
5503
5502
  version: 1,
5504
- config: Mr(Tt)
5503
+ config: Lr(Tt)
5505
5504
  };
5506
5505
  },
5507
5506
  displayName: "Table",
@@ -5509,8 +5508,8 @@ const un = {
5509
5508
  name: "table",
5510
5509
  viewRender: kc,
5511
5510
  configRender: jc,
5512
- triggers: [zn]
5513
- }, En = {
5511
+ triggers: [En]
5512
+ }, On = {
5514
5513
  label_field: "",
5515
5514
  value_field: ""
5516
5515
  };
@@ -5538,12 +5537,12 @@ function Qc({
5538
5537
  } = t.viewport, {
5539
5538
  label_field: o,
5540
5539
  value_field: s
5541
- } = ne({}, e, En), l = M(() => n.map((f) => ({
5540
+ } = ne({}, e, On), l = M(() => n.map((f) => ({
5542
5541
  name: f[o],
5543
5542
  value: Number(f[s])
5544
5543
  })), [n, o, s]), u = M(() => {
5545
5544
  var f, m;
5546
- return (m = (f = Lr(l, (y) => y.value)) == null ? void 0 : f.value) != null ? m : 1;
5545
+ return (m = (f = qr(l, (y) => y.value)) == null ? void 0 : f.value) != null ? m : 1;
5547
5546
  }, [l]), p = M(() => ({
5548
5547
  series: {
5549
5548
  label: {
@@ -5553,7 +5552,7 @@ function Qc({
5553
5552
  }) => m / u < 0.2 ? " " : f
5554
5553
  }
5555
5554
  }
5556
- }), [u]), h = qr({}, Wc, p, {
5555
+ }), [u]), h = $r({}, Wc, p, {
5557
5556
  series: {
5558
5557
  data: l
5559
5558
  }
@@ -5576,7 +5575,7 @@ function Yc({
5576
5575
  } = G(t.instanceData, "config"), {
5577
5576
  label_field: a,
5578
5577
  value_field: i
5579
- } = ne({}, e, En), o = t.data, s = xn({
5578
+ } = ne({}, e, On), o = t.data, s = xn({
5580
5579
  initialValues: {
5581
5580
  label_field: a,
5582
5581
  value_field: i
@@ -5651,8 +5650,8 @@ const Hc = {
5651
5650
  name: "sunburst",
5652
5651
  viewRender: Qc,
5653
5652
  configRender: Yc,
5654
- createConfig: () => En
5655
- }, On = {
5653
+ createConfig: () => On
5654
+ }, Fn = {
5656
5655
  label_field: "",
5657
5656
  value_field: ""
5658
5657
  };
@@ -5702,19 +5701,19 @@ function Jc({
5702
5701
  } = t.viewport, {
5703
5702
  label_field: o,
5704
5703
  value_field: s
5705
- } = ne({}, e, On), l = M(() => n.map((h) => ({
5704
+ } = ne({}, e, Fn), l = M(() => n.map((h) => ({
5706
5705
  name: h[o],
5707
5706
  value: Number(h[s])
5708
5707
  })), [n, o, s]), u = M(() => ({
5709
5708
  series: {
5710
5709
  labelLayout: function(h) {
5711
5710
  const f = h.labelRect.x < a / 2, m = h.labelLinePoints;
5712
- return Fr(m, [2, 0], f ? h.labelRect.x : h.labelRect.x + h.labelRect.width), {
5711
+ return Pr(m, [2, 0], f ? h.labelRect.x : h.labelRect.x + h.labelRect.width), {
5713
5712
  labelLinePoints: m
5714
5713
  };
5715
5714
  }
5716
5715
  }
5717
- }), [a]), p = qr({}, Xc, u, {
5716
+ }), [a]), p = $r({}, Xc, u, {
5718
5717
  series: {
5719
5718
  data: l
5720
5719
  }
@@ -5737,7 +5736,7 @@ function Kc({
5737
5736
  } = G(t.instanceData, "config"), {
5738
5737
  label_field: a,
5739
5738
  value_field: i
5740
- } = ne({}, e, On), o = t.data, s = xn({
5739
+ } = ne({}, e, Fn), o = t.data, s = xn({
5741
5740
  initialValues: {
5742
5741
  label_field: a,
5743
5742
  value_field: i
@@ -5812,8 +5811,8 @@ const eu = {
5812
5811
  name: "pie",
5813
5812
  viewRender: Jc,
5814
5813
  configRender: Kc,
5815
- createConfig: () => On
5816
- }, Fn = {
5814
+ createConfig: () => Fn
5815
+ }, Pn = {
5817
5816
  x_axis_data_key: "",
5818
5817
  y_axis_data_key: "",
5819
5818
  z_axis_data_key: "",
@@ -5846,11 +5845,11 @@ function tu({
5846
5845
  xAxis3D: u,
5847
5846
  yAxis3D: p,
5848
5847
  zAxis3D: h
5849
- } = ne({}, e, Fn), f = M(() => {
5850
- const I = to(n, (R) => R[l]);
5848
+ } = ne({}, e, Pn), f = M(() => {
5849
+ const I = no(n, (R) => R[l]);
5851
5850
  return ae(I, l);
5852
5851
  }, [n, l]), m = M(() => {
5853
- const I = Lr(n, (R) => R[l]);
5852
+ const I = qr(n, (R) => R[l]);
5854
5853
  return ae(I, l);
5855
5854
  }, [n, l]), y = {
5856
5855
  tooltip: {},
@@ -5901,7 +5900,7 @@ function nu({
5901
5900
  const {
5902
5901
  value: e,
5903
5902
  set: n
5904
- } = G(t.instanceData, "config"), a = t.data, i = ne({}, e, Fn), {
5903
+ } = G(t.instanceData, "config"), a = t.data, i = ne({}, e, Pn), {
5905
5904
  control: o,
5906
5905
  handleSubmit: s,
5907
5906
  reset: l
@@ -6062,8 +6061,8 @@ const au = {
6062
6061
  name: "bar-3d",
6063
6062
  viewRender: tu,
6064
6063
  configRender: nu,
6065
- createConfig: () => Fn
6066
- }, Pn = {
6064
+ createConfig: () => Pn
6065
+ }, An = {
6067
6066
  x_axis: {
6068
6067
  name: "X Axis",
6069
6068
  data_key: ""
@@ -6076,11 +6075,11 @@ const au = {
6076
6075
  variables: [],
6077
6076
  reference_lines: []
6078
6077
  };
6079
- re.use([At, zo, Fo, Ke, Ze, et, $e]);
6078
+ re.use([Mt, zo, Fo, Ke, Ze, et, $e]);
6080
6079
  function iu(t, e, n) {
6081
6080
  const a = e.reduce((i, o) => {
6082
- const s = Na(o, n);
6083
- return i[o.name] = jt(o, s), i;
6081
+ const s = Ba(o, n);
6082
+ return i[o.name] = Gt(o, s), i;
6084
6083
  }, {});
6085
6084
  return t.map((i) => ({
6086
6085
  name: "refs",
@@ -6095,7 +6094,7 @@ function iu(t, e, n) {
6095
6094
  symbol: ["none", "none"],
6096
6095
  label: {
6097
6096
  formatter: function() {
6098
- return Ba(i.template, e, n);
6097
+ return ja(i.template, e, n);
6099
6098
  },
6100
6099
  position: "insideEndTop"
6101
6100
  }
@@ -6116,7 +6115,7 @@ function ou({
6116
6115
  color: l,
6117
6116
  variables: u,
6118
6117
  reference_lines: p
6119
- } = ne({}, e, Pn), {
6118
+ } = ne({}, e, An), {
6120
6119
  xAxisData: h,
6121
6120
  boxplotData: f
6122
6121
  } = M(() => {
@@ -6309,7 +6308,7 @@ function cu({
6309
6308
  control: t,
6310
6309
  render: ({
6311
6310
  field: i
6312
- }) => /* @__PURE__ */ r($t, {
6311
+ }) => /* @__PURE__ */ r(Nt, {
6313
6312
  data: a,
6314
6313
  withStyle: !1,
6315
6314
  ...i
@@ -6344,7 +6343,7 @@ function uu({
6344
6343
  }), s = e("variables"), l = a.map((p, h) => ({
6345
6344
  ...p,
6346
6345
  ...s[h]
6347
- })), u = () => i(qt());
6346
+ })), u = () => i($t());
6348
6347
  return /* @__PURE__ */ c(w, {
6349
6348
  children: [l.map((p, h) => /* @__PURE__ */ r(cu, {
6350
6349
  control: t,
@@ -6367,7 +6366,7 @@ function du({
6367
6366
  const {
6368
6367
  value: e,
6369
6368
  set: n
6370
- } = G(t.instanceData, "config"), a = t.data, i = M(() => ne({}, e, Pn), [e]), {
6369
+ } = G(t.instanceData, "config"), a = t.data, i = M(() => ne({}, e, An), [e]), {
6371
6370
  control: o,
6372
6371
  handleSubmit: s,
6373
6372
  watch: l,
@@ -6559,7 +6558,7 @@ const pu = {
6559
6558
  name: "boxplot",
6560
6559
  viewRender: ou,
6561
6560
  configRender: du,
6562
- createConfig: () => Pn
6561
+ createConfig: () => An
6563
6562
  };
6564
6563
  function mu(t) {
6565
6564
  const e = t.y_axes.some((n) => !!n.name);
@@ -6602,8 +6601,8 @@ function gu(t, e, n, a) {
6602
6601
  }
6603
6602
  function bu(t, e, n) {
6604
6603
  const a = e.reduce((i, o) => {
6605
- const s = Na(o, n);
6606
- return i[o.name] = jt(o, s), i;
6604
+ const s = Ba(o, n);
6605
+ return i[o.name] = Gt(o, s), i;
6607
6606
  }, {});
6608
6607
  return t.map((i) => ({
6609
6608
  name: "refs",
@@ -6620,7 +6619,7 @@ function bu(t, e, n) {
6620
6619
  symbol: ["none", "none"],
6621
6620
  label: {
6622
6621
  formatter: function() {
6623
- return Ba(i.template, e, n);
6622
+ return ja(i.template, e, n);
6624
6623
  },
6625
6624
  position: "insideEndTop"
6626
6625
  }
@@ -6643,9 +6642,9 @@ function vu({ x_axis_data_key: t }, { y_axis_data_key: e, yAxisIndex: n, label_p
6643
6642
  };
6644
6643
  if (!o)
6645
6644
  return m.data = h.map((I) => I[e]), m;
6646
- const y = no(h, o);
6645
+ const y = ro(h, o);
6647
6646
  return Object.entries(y).map(([I, R]) => {
6648
- const E = Mr(m);
6647
+ const E = Lr(m);
6649
6648
  return E.data = gu(p, R, t, e), E.name = I, E.color = void 0, E;
6650
6649
  });
6651
6650
  }
@@ -6769,7 +6768,7 @@ function _u(t, e) {
6769
6768
  };
6770
6769
  return Ge({}, u, Su);
6771
6770
  }
6772
- const An = {
6771
+ const Mn = {
6773
6772
  regressions: [],
6774
6773
  series: [],
6775
6774
  stats: { templates: { bottom: "", top: "" }, variables: [] },
@@ -6791,9 +6790,9 @@ const An = {
6791
6790
  variables: [],
6792
6791
  reference_lines: []
6793
6792
  };
6794
- re.use([At, Xr, Jr, Kr, Ke, Ze, et, $e]);
6795
- re.registerTransform(Zr.regression);
6796
- function Ir(t) {
6793
+ re.use([Mt, Kr, Zr, ea, Ke, Ze, et, $e]);
6794
+ re.registerTransform(ta.regression);
6795
+ function Dr(t) {
6797
6796
  return t.trim().length > 0;
6798
6797
  }
6799
6798
  function Iu({
@@ -6817,16 +6816,16 @@ function Du({
6817
6816
  }) {
6818
6817
  const {
6819
6818
  value: e
6820
- } = G(t.instanceData, "config"), n = M(() => ne({}, e, An), [e]), a = t.data, {
6819
+ } = G(t.instanceData, "config"), n = M(() => ne({}, e, Mn), [e]), a = t.data, {
6821
6820
  width: i,
6822
6821
  height: o
6823
6822
  } = t.viewport, {
6824
6823
  ref: s,
6825
6824
  height: l
6826
- } = an(), {
6825
+ } = on(), {
6827
6826
  ref: u,
6828
6827
  height: p
6829
- } = an(), h = x.useMemo(() => {
6828
+ } = on(), h = x.useMemo(() => {
6830
6829
  const {
6831
6830
  stats: {
6832
6831
  templates: m,
@@ -6834,12 +6833,12 @@ function Du({
6834
6833
  }
6835
6834
  } = n;
6836
6835
  return {
6837
- top: cn(m.top, y, a),
6838
- bottom: cn(m.bottom, y, a)
6836
+ top: un(m.top, y, a),
6837
+ bottom: un(m.bottom, y, a)
6839
6838
  };
6840
6839
  }, [n, a]), f = Math.max(0, o - l - p);
6841
6840
  return /* @__PURE__ */ c($, {
6842
- children: [Ir(n.stats.templates.top) && /* @__PURE__ */ r(v, {
6841
+ children: [Dr(n.stats.templates.top) && /* @__PURE__ */ r(v, {
6843
6842
  ref: s,
6844
6843
  align: "left",
6845
6844
  size: "xs",
@@ -6850,7 +6849,7 @@ function Du({
6850
6849
  height: f,
6851
6850
  data: a,
6852
6851
  conf: n
6853
- }), Ir(n.stats.templates.bottom) && /* @__PURE__ */ r(v, {
6852
+ }), Dr(n.stats.templates.bottom) && /* @__PURE__ */ r(v, {
6854
6853
  ref: u,
6855
6854
  align: "left",
6856
6855
  size: "xs",
@@ -7408,7 +7407,7 @@ function qu({
7408
7407
  children: [/* @__PURE__ */ r(v, {
7409
7408
  size: "sm",
7410
7409
  children: "Size"
7411
- }), /* @__PURE__ */ r(Vr, {
7410
+ }), /* @__PURE__ */ r(zr, {
7412
7411
  min: 1,
7413
7412
  max: 10,
7414
7413
  marks: Lu,
@@ -7487,7 +7486,7 @@ function Nu({
7487
7486
  control: t,
7488
7487
  render: ({
7489
7488
  field: l
7490
- }) => /* @__PURE__ */ r(ji, {
7489
+ }) => /* @__PURE__ */ r(Gi, {
7491
7490
  data: [{
7492
7491
  label: "Line",
7493
7492
  value: "line"
@@ -7708,7 +7707,7 @@ function ju({
7708
7707
  control: t,
7709
7708
  render: ({
7710
7709
  field: i
7711
- }) => /* @__PURE__ */ r($t, {
7710
+ }) => /* @__PURE__ */ r(Nt, {
7712
7711
  data: a,
7713
7712
  ...i
7714
7713
  })
@@ -7744,7 +7743,7 @@ function Gu({
7744
7743
  const s = e("stats.variables"), l = a.map((p, h) => ({
7745
7744
  ...p,
7746
7745
  ...s[h]
7747
- })), u = () => i(qt());
7746
+ })), u = () => i($t());
7748
7747
  return /* @__PURE__ */ c(w, {
7749
7748
  children: [/* @__PURE__ */ c(w, {
7750
7749
  spacing: 0,
@@ -7753,7 +7752,7 @@ function Gu({
7753
7752
  control: t,
7754
7753
  render: ({
7755
7754
  field: p
7756
- }) => /* @__PURE__ */ r(on, {
7755
+ }) => /* @__PURE__ */ r(sn, {
7757
7756
  label: "Template for stats above the chart",
7758
7757
  py: "md",
7759
7758
  sx: {
@@ -7766,7 +7765,7 @@ function Gu({
7766
7765
  control: t,
7767
7766
  render: ({
7768
7767
  field: p
7769
- }) => /* @__PURE__ */ r(on, {
7768
+ }) => /* @__PURE__ */ r(sn, {
7770
7769
  label: "Template for stats under the chart",
7771
7770
  py: "md",
7772
7771
  sx: {
@@ -7810,7 +7809,7 @@ function Wu({
7810
7809
  control: t,
7811
7810
  render: ({
7812
7811
  field: i
7813
- }) => /* @__PURE__ */ r($t, {
7812
+ }) => /* @__PURE__ */ r(Nt, {
7814
7813
  data: a,
7815
7814
  withStyle: !1,
7816
7815
  ...i
@@ -7845,7 +7844,7 @@ function Qu({
7845
7844
  }), s = e("variables"), l = a.map((p, h) => ({
7846
7845
  ...p,
7847
7846
  ...s[h]
7848
- })), u = () => i(qt());
7847
+ })), u = () => i($t());
7849
7848
  return /* @__PURE__ */ c(w, {
7850
7849
  children: [l.map((p, h) => /* @__PURE__ */ r(Wu, {
7851
7850
  control: t,
@@ -8032,7 +8031,7 @@ function Xu({
8032
8031
  control: t,
8033
8032
  render: ({
8034
8033
  field: a
8035
- }) => /* @__PURE__ */ r(Rn, {
8034
+ }) => /* @__PURE__ */ r(kn, {
8036
8035
  ...a
8037
8036
  })
8038
8037
  })]
@@ -8152,7 +8151,7 @@ function td({
8152
8151
  const {
8153
8152
  value: e,
8154
8153
  set: n
8155
- } = G(t.instanceData, "config"), a = t.data, i = M(() => Ge({}, e, An), [e]), o = M(() => ed(i), [i]);
8154
+ } = G(t.instanceData, "config"), a = t.data, i = M(() => Ge({}, e, Mn), [e]), o = M(() => ed(i), [i]);
8156
8155
  Z(() => {
8157
8156
  !De(i, o) && (console.log("config malformed, resetting to defaults", i, o), n(o));
8158
8157
  }, [i, o]);
@@ -8315,9 +8314,9 @@ const rd = {
8315
8314
  name: "cartesian",
8316
8315
  viewRender: Du,
8317
8316
  configRender: td,
8318
- createConfig: () => An
8317
+ createConfig: () => Mn
8319
8318
  };
8320
- function Ya(t) {
8319
+ function Ua(t) {
8321
8320
  return t ? (e) => {
8322
8321
  try {
8323
8322
  return fe(e).format(t);
@@ -8329,7 +8328,7 @@ function Ya(t) {
8329
8328
  function ad(t) {
8330
8329
  return {
8331
8330
  show: !0,
8332
- formatter: ({ dimensionIndex: e, value: n }) => Ya(t.dimensions[e].formatter)(n)
8331
+ formatter: ({ dimensionIndex: e, value: n }) => Ua(t.dimensions[e].formatter)(n)
8333
8332
  };
8334
8333
  }
8335
8334
  function id(t) {
@@ -8337,7 +8336,7 @@ function id(t) {
8337
8336
  if (a.length === 0)
8338
8337
  return "";
8339
8338
  const i = a.map((o, s) => {
8340
- const l = t.dimensions[s], u = Ya(l.formatter);
8339
+ const l = t.dimensions[s], u = Ua(l.formatter);
8341
8340
  return `
8342
8341
  <tr>
8343
8342
  <td style="padding-left: 18px;">${l.name}</td>
@@ -8439,7 +8438,7 @@ function sd(t, e) {
8439
8438
  };
8440
8439
  return B.merge({}, od, o);
8441
8440
  }
8442
- const Mn = {
8441
+ const Ln = {
8443
8442
  series_name_key: "name",
8444
8443
  dimensions: []
8445
8444
  };
@@ -8452,8 +8451,8 @@ function ld({
8452
8451
  } = G(t.instanceData, "config"), {
8453
8452
  width: n,
8454
8453
  height: a
8455
- } = t.viewport, i = t.data, o = M(() => sd(Ge({}, e, Mn), i), [e, i]);
8456
- return !n || !a || !e || Pr(e == null ? void 0 : e.dimensions) ? null : /* @__PURE__ */ r($, {
8454
+ } = t.viewport, i = t.data, o = M(() => sd(Ge({}, e, Ln), i), [e, i]);
8455
+ return !n || !a || !e || Ar(e == null ? void 0 : e.dimensions) ? null : /* @__PURE__ */ r($, {
8457
8456
  children: /* @__PURE__ */ r(qe, {
8458
8457
  echarts: re,
8459
8458
  option: o,
@@ -8534,7 +8533,7 @@ function cd({
8534
8533
  control: t,
8535
8534
  render: ({
8536
8535
  field: i
8537
- }) => /* @__PURE__ */ r(Rn, {
8536
+ }) => /* @__PURE__ */ r(kn, {
8538
8537
  ...i
8539
8538
  })
8540
8539
  })]
@@ -8613,7 +8612,7 @@ function hd({
8613
8612
  const e = t.data, {
8614
8613
  value: n,
8615
8614
  set: a
8616
- } = G(t.instanceData, "config"), i = M(() => Ge({}, n, Mn), [n]), {
8615
+ } = G(t.instanceData, "config"), i = M(() => Ge({}, n, Ln), [n]), {
8617
8616
  dimensions: o,
8618
8617
  series_name_key: s
8619
8618
  } = i, l = M(() => ({
@@ -8704,7 +8703,7 @@ const md = {
8704
8703
  name: "radar",
8705
8704
  viewRender: ld,
8706
8705
  configRender: hd,
8707
- createConfig: () => Mn
8706
+ createConfig: () => Ln
8708
8707
  };
8709
8708
  function fd(t, e) {
8710
8709
  switch (t.config.method) {
@@ -8937,7 +8936,7 @@ function yd(t, e) {
8937
8936
  rSquared: 0
8938
8937
  };
8939
8938
  }
8940
- const Ln = {
8939
+ const qn = {
8941
8940
  x_axis: {
8942
8941
  name: "X Axis",
8943
8942
  data_key: ""
@@ -8967,8 +8966,8 @@ const Ln = {
8967
8966
  y_axis_data_key: "value"
8968
8967
  }
8969
8968
  };
8970
- re.use([At, Kr, Ke, Ze, et, $e]);
8971
- re.registerTransform(Zr.regression);
8969
+ re.use([Mt, ea, Ke, Ze, et, $e]);
8970
+ re.registerTransform(ta.regression);
8972
8971
  function xd({
8973
8972
  context: t
8974
8973
  }) {
@@ -8984,7 +8983,7 @@ function xd({
8984
8983
  ...y,
8985
8984
  [f]: Number(y[f])
8986
8985
  }) : h;
8987
- }, [t.data, e == null ? void 0 : e.regression.y_axis_data_key]), o = M(() => vd(Ge({}, e, Ln), i), [e, i]), {
8986
+ }, [t.data, e == null ? void 0 : e.regression.y_axis_data_key]), o = M(() => vd(Ge({}, e, qn), i), [e, i]), {
8988
8987
  expression: s,
8989
8988
  rSquared: l,
8990
8989
  adjustedRSquared: u
@@ -9158,7 +9157,7 @@ function Sd({
9158
9157
  const {
9159
9158
  value: e,
9160
9159
  set: n
9161
- } = G(t.instanceData, "config"), a = t.data, i = M(() => ne({}, e, Ln), [e]), {
9160
+ } = G(t.instanceData, "config"), a = t.data, i = M(() => ne({}, e, qn), [e]), {
9162
9161
  control: o,
9163
9162
  handleSubmit: s,
9164
9163
  watch: l,
@@ -9286,8 +9285,8 @@ const Id = {
9286
9285
  name: "regressionChart",
9287
9286
  viewRender: xd,
9288
9287
  configRender: Sd,
9289
- createConfig: () => Ln
9290
- }, qn = {
9288
+ createConfig: () => qn
9289
+ }, $n = {
9291
9290
  x_axis: {
9292
9291
  name: "X Axis",
9293
9292
  data_key: ""
@@ -9302,7 +9301,7 @@ const Id = {
9302
9301
  color: "red"
9303
9302
  }
9304
9303
  };
9305
- function $n(t) {
9304
+ function Nn(t) {
9306
9305
  return fe(t).format({
9307
9306
  output: "percent",
9308
9307
  mantissa: 0
@@ -9311,7 +9310,7 @@ function $n(t) {
9311
9310
  function Dd(t) {
9312
9311
  const e = t.value[1];
9313
9312
  try {
9314
- return $n(e);
9313
+ return Nn(e);
9315
9314
  } catch (n) {
9316
9315
  return console.error(n), e;
9317
9316
  }
@@ -9322,11 +9321,11 @@ function Rd(t) {
9322
9321
  return "";
9323
9322
  const n = e.map((a, i) => {
9324
9323
  const o = a.seriesName, [s, l] = a.value;
9325
- return o ? `${o}: <strong>${(i === 0 ? (p) => p : $n)(l)}</strong>` : l;
9324
+ return o ? `${o}: <strong>${(i === 0 ? (p) => p : Nn)(l)}</strong>` : l;
9326
9325
  });
9327
9326
  return n.unshift(`<strong>${e[0].name}</strong>`), n.join("<br />");
9328
9327
  }
9329
- re.use([Xr, Jr, At, Ke, Ze, et, $e]);
9328
+ re.use([Kr, Zr, Mt, Ke, Ze, et, $e]);
9330
9329
  function kd({
9331
9330
  context: t
9332
9331
  }) {
@@ -9340,7 +9339,7 @@ function kd({
9340
9339
  data_key: s,
9341
9340
  bar: l,
9342
9341
  line: u
9343
- } = ne({}, e, qn), {
9342
+ } = ne({}, e, $n), {
9344
9343
  barData: p,
9345
9344
  lineData: h
9346
9345
  } = M(() => {
@@ -9390,7 +9389,7 @@ function kd({
9390
9389
  },
9391
9390
  axisLabel: {
9392
9391
  show: !0,
9393
- formatter: $n
9392
+ formatter: Nn
9394
9393
  }
9395
9394
  }],
9396
9395
  series: [{
@@ -9435,7 +9434,7 @@ function Td({
9435
9434
  const {
9436
9435
  value: e,
9437
9436
  set: n
9438
- } = G(t.instanceData, "config"), a = t.data, i = M(() => ne({}, e, qn), [e]), {
9437
+ } = G(t.instanceData, "config"), a = t.data, i = M(() => ne({}, e, $n), [e]), {
9439
9438
  control: o,
9440
9439
  handleSubmit: s,
9441
9440
  watch: l,
@@ -9607,7 +9606,7 @@ const zd = {
9607
9606
  name: "paretoChart",
9608
9607
  viewRender: kd,
9609
9608
  configRender: Td,
9610
- createConfig: () => qn
9609
+ createConfig: () => $n
9611
9610
  }, Ed = [{
9612
9611
  value: "#25262B",
9613
9612
  name: "Dark"
@@ -9655,16 +9654,16 @@ const zd = {
9655
9654
  value: t.value,
9656
9655
  type: "single",
9657
9656
  category: "basic"
9658
- })), Od = [Xs, Js, el, Zs, Ks, tl], Ua = {
9657
+ })), Od = [Xs, Js, el, Zs, Ks, tl], Ha = {
9659
9658
  id: "dashboard",
9660
9659
  version: nl,
9661
9660
  manifest: {
9662
- viz: [un, nc, cl, Hc, eu, au, pu, zd, rd, md, Id],
9661
+ viz: [dn, nc, cl, Hc, eu, au, pu, zd, rd, md, Id],
9663
9662
  color: [...Ed, ...Od]
9664
9663
  }
9665
- }, lt = new al(), Ha = () => {
9664
+ }, lt = new al(), Xa = () => {
9666
9665
  try {
9667
- lt.install(Ua);
9666
+ lt.install(Ha);
9668
9667
  } catch {
9669
9668
  }
9670
9669
  const t = new Ys(lt), e = new rl(lt);
@@ -9673,9 +9672,9 @@ const zd = {
9673
9672
  vizManager: t,
9674
9673
  colorManager: e
9675
9674
  };
9676
- }, Te = Yi(Ha());
9675
+ }, Te = Ui(Xa());
9677
9676
  try {
9678
- lt.install(Ua);
9677
+ lt.install(Ha);
9679
9678
  } catch {
9680
9679
  }
9681
9680
  function Fd(t, e) {
@@ -9729,7 +9728,7 @@ function Pd(t) {
9729
9728
  });
9730
9729
  }
9731
9730
  function Ad(t) {
9732
- return ro(t, (n) => {
9731
+ return ao(t, (n) => {
9733
9732
  if (typeof n == "string")
9734
9733
  return encodeURIComponent(n);
9735
9734
  });
@@ -9738,7 +9737,7 @@ async function Md(t, e) {
9738
9737
  const {
9739
9738
  urlTemplate: n,
9740
9739
  openInNewTab: a
9741
- } = await e.operationData.getItem("config"), o = $r(n || "")(Ad(t));
9740
+ } = await e.operationData.getItem("config"), o = Nr(n || "")(Ad(t));
9742
9741
  window.open(o, a ? "_blank" : "_self", "noopener");
9743
9742
  }
9744
9743
  const Ld = {
@@ -9765,7 +9764,7 @@ function $d(t) {
9765
9764
  });
9766
9765
  }
9767
9766
  async function Nd(t, e) {
9768
- const n = await e.operationData.getItem("config"), a = $r(n.template || "");
9767
+ const n = await e.operationData.getItem("config"), a = Nr(n.template || "");
9769
9768
  console.log("run with payload", t), console.log(a(t));
9770
9769
  }
9771
9770
  const Bd = {
@@ -9773,9 +9772,9 @@ const Bd = {
9773
9772
  id: "builtin:op:debug",
9774
9773
  configRender: $d,
9775
9774
  run: Nd
9776
- }, Nn = [Bd, Ld];
9775
+ }, Bn = [Bd, Ld];
9777
9776
  class jd {
9778
- constructor(e, n = Nn) {
9777
+ constructor(e, n = Bn) {
9779
9778
  O(this, "attachments");
9780
9779
  this.operations = n;
9781
9780
  const a = async (i) => {
@@ -9786,7 +9785,7 @@ class jd {
9786
9785
  operationData: new Ue(i, "data")
9787
9786
  };
9788
9787
  };
9789
- this.attachments = new _n(e, "__OPERATIONS", a);
9788
+ this.attachments = new In(e, "__OPERATIONS", a);
9790
9789
  }
9791
9790
  async runOperation(e, n) {
9792
9791
  const a = await this.attachments.getInstance(e);
@@ -9824,7 +9823,7 @@ class jd {
9824
9823
  return await this.attachments.getInstance(e);
9825
9824
  }
9826
9825
  }
9827
- const Dr = "__TRIGGERS";
9826
+ const Rr = "__TRIGGERS";
9828
9827
  class Gd {
9829
9828
  constructor(e, n) {
9830
9829
  O(this, "attachments");
@@ -9837,13 +9836,13 @@ class Gd {
9837
9836
  triggerData: new Ue(i, "data")
9838
9837
  };
9839
9838
  };
9840
- this.attachments = new _n(e, Dr, a);
9839
+ this.attachments = new In(e, Rr, a);
9841
9840
  }
9842
9841
  watchTriggerSnapshotList(e) {
9843
9842
  return this.instance.instanceData.watchItem(
9844
- Dr,
9843
+ Rr,
9845
9844
  (n) => {
9846
- const a = Er(n).map(
9845
+ const a = Or(n).map(
9847
9846
  (i) => ({
9848
9847
  id: ae(i, "id"),
9849
9848
  schemaRef: ae(i, "schemaRef"),
@@ -9878,7 +9877,7 @@ class Gd {
9878
9877
  return await this.attachments.getInstance(e);
9879
9878
  }
9880
9879
  }
9881
- class Xa {
9880
+ class Ja {
9882
9881
  constructor(e, n, a) {
9883
9882
  O(this, "operationManager");
9884
9883
  O(this, "triggerManager");
@@ -9892,7 +9891,7 @@ class Xa {
9892
9891
  operationRef: u
9893
9892
  };
9894
9893
  };
9895
- this.attachments = new _n(e, "__INTERACTIONS", i);
9894
+ this.attachments = new In(e, "__INTERACTIONS", i);
9896
9895
  }
9897
9896
  async addInteraction(e, n) {
9898
9897
  const a = e.id, i = n.id, o = `[${a}]:[${i}]`;
@@ -10007,10 +10006,10 @@ const Qd = D(({
10007
10006
  data: e
10008
10007
  } = he(), n = t.viz, {
10009
10008
  vizManager: a
10010
- } = Me(Te), i = t.json, o = Pe(() => a.getOrCreateInstance(i), [a, n.type]), s = Pe(() => new Xa(o, a.resolveComponent(n.type), Nn), [o, n.type]);
10009
+ } = Me(Te), i = t.json, o = Pe(() => a.getOrCreateInstance(i), [a, n.type]), s = Pe(() => new Ja(o, a.resolveComponent(n.type), Bn), [o, n.type]);
10011
10010
  return Z(() => o.instanceData.watchItem(
10012
10011
  null,
10013
- ao((l) => {
10012
+ io((l) => {
10014
10013
  t.viz.setConf(l);
10015
10014
  }, 100, {
10016
10015
  leading: !1,
@@ -10055,7 +10054,7 @@ const Qd = D(({
10055
10054
  size: 20
10056
10055
  })
10057
10056
  })]
10058
- }), /* @__PURE__ */ r(Yr, {
10057
+ }), /* @__PURE__ */ r(Hr, {
10059
10058
  value: e,
10060
10059
  onChange: n,
10061
10060
  sx: {
@@ -10109,7 +10108,7 @@ const Qd = D(({
10109
10108
  flexShrink: 0
10110
10109
  },
10111
10110
  children: [/* @__PURE__ */ r(g, {
10112
- children: /* @__PURE__ */ r(ya, {})
10111
+ children: /* @__PURE__ */ r(xa, {})
10113
10112
  }), /* @__PURE__ */ r(g, {
10114
10113
  grow: !0,
10115
10114
  position: "center",
@@ -10139,7 +10138,7 @@ const Qd = D(({
10139
10138
  } = he(), {
10140
10139
  title: e,
10141
10140
  setTitle: n
10142
- } = t, [a, i] = Wr(e), o = e !== a, s = x.useCallback(() => {
10141
+ } = t, [a, i] = Yr(e), o = e !== a, s = x.useCallback(() => {
10143
10142
  !o || n(a);
10144
10143
  }, [o, a]);
10145
10144
  return /* @__PURE__ */ r(k, {
@@ -10233,12 +10232,12 @@ const th = D(function() {
10233
10232
  flexGrow: 1
10234
10233
  }
10235
10234
  })]
10236
- }), /* @__PURE__ */ r(da, {
10235
+ }), /* @__PURE__ */ r(ha, {
10237
10236
  id: n
10238
10237
  })]
10239
10238
  });
10240
10239
  });
10241
- function Ja(t, e, n) {
10240
+ function Ka(t, e, n) {
10242
10241
  const a = Pe(() => /* @__PURE__ */ new Set(), []), i = t.resolveComponent(e.type), [o, s] = de(!1);
10243
10242
  return ft(async () => {
10244
10243
  if (await i.migrator.needMigration(e) && !a.has(e.id))
@@ -10258,7 +10257,7 @@ function nh({
10258
10257
  const {
10259
10258
  vizManager: n,
10260
10259
  panel: a
10261
- } = e, i = n.getOrCreateInstance(a), o = Ja(n, i, () => {
10260
+ } = e, i = n.getOrCreateInstance(a), o = Ka(n, i, () => {
10262
10261
  yn({
10263
10262
  title: `${a.title} - Updated`,
10264
10263
  message: "Your plugin configuration has been migrated to the latest version"
@@ -10279,7 +10278,7 @@ function rh(t) {
10279
10278
  vizManager: e,
10280
10279
  panel: n
10281
10280
  } = t, a = e.getOrCreateInstance(n);
10282
- return Ja(e, a, () => {
10281
+ return Ka(e, a, () => {
10283
10282
  yn({
10284
10283
  title: `${n.title} - Updated`,
10285
10284
  message: "Your plugin configuration has been migrated to the latest version"
@@ -10321,7 +10320,7 @@ function ah(t, e) {
10321
10320
  return console.info(ae(h, "message")), null;
10322
10321
  }
10323
10322
  }
10324
- const ih = ["richText"], Ka = D(function({
10323
+ const ih = ["richText"], Za = D(function({
10325
10324
  height: e,
10326
10325
  viz: n,
10327
10326
  data: a,
@@ -10331,7 +10330,7 @@ const ih = ["richText"], Ka = D(function({
10331
10330
  ref: o,
10332
10331
  width: s,
10333
10332
  height: l
10334
- } = an(), u = x.useMemo(() => !Array.isArray(a) || a.length === 0, [a]), p = ah(a, {
10333
+ } = on(), u = x.useMemo(() => !Array.isArray(a) || a.length === 0, [a]), p = ah(a, {
10335
10334
  w: s,
10336
10335
  h: l
10337
10336
  });
@@ -10376,13 +10375,13 @@ const ih = ["richText"], Ka = D(function({
10376
10375
  viz: n
10377
10376
  }
10378
10377
  } = he();
10379
- return /* @__PURE__ */ r(Ka, {
10378
+ return /* @__PURE__ */ r(Za, {
10380
10379
  viz: n,
10381
10380
  data: t,
10382
10381
  loading: e,
10383
10382
  height: "100%"
10384
10383
  });
10385
- }), dn = [];
10384
+ }), hn = [];
10386
10385
  function sh() {
10387
10386
  const {
10388
10387
  vizManager: t
@@ -10390,7 +10389,7 @@ function sh() {
10390
10389
  return M(() => t.availableVizList.map((e) => ({
10391
10390
  value: e.name,
10392
10391
  label: e.displayName
10393
- })).concat(dn), [t]);
10392
+ })).concat(hn), [t]);
10394
10393
  }
10395
10394
  function lh(t, e) {
10396
10395
  try {
@@ -10445,7 +10444,7 @@ const uh = D(() => {
10445
10444
  panel: {
10446
10445
  viz: e
10447
10446
  }
10448
- } = he(), [n, a] = Wr(e.type), i = e.type !== n, {
10447
+ } = he(), [n, a] = Yr(e.type), i = e.type !== n, {
10449
10448
  vizManager: o
10450
10449
  } = Me(Te), s = x.useCallback(() => {
10451
10450
  if (!i)
@@ -10460,8 +10459,8 @@ const uh = D(() => {
10460
10459
  }
10461
10460
  }, u = x.useMemo(() => {
10462
10461
  var y;
10463
- return (y = dn.find((I) => I.value === n)) == null ? void 0 : y.Panel;
10464
- }, [n, dn]), p = ch(), h = u ? Ot(u, {
10462
+ return (y = hn.find((I) => I.value === n)) == null ? void 0 : y.Panel;
10463
+ }, [n, hn]), p = ch(), h = u ? Ot(u, {
10465
10464
  data: t,
10466
10465
  conf: e.conf,
10467
10466
  setConf: e.setConf
@@ -10479,7 +10478,7 @@ const uh = D(() => {
10479
10478
  size: 20
10480
10479
  })
10481
10480
  })
10482
- }), f, !f && /* @__PURE__ */ r(Gi, {
10481
+ }), f, !f && /* @__PURE__ */ r(Wi, {
10483
10482
  minRows: 20,
10484
10483
  label: "Config",
10485
10484
  value: JSON.stringify(e.conf, null, 2),
@@ -10540,7 +10539,7 @@ const hh = D(function({
10540
10539
  onDragStart: (h) => {
10541
10540
  h.stopPropagation();
10542
10541
  },
10543
- children: /* @__PURE__ */ r(mn, {
10542
+ children: /* @__PURE__ */ r(fn, {
10544
10543
  sx: {
10545
10544
  height: "90vh",
10546
10545
  maxHeight: "calc(100vh - 185px)",
@@ -10602,7 +10601,7 @@ const hh = D(function({
10602
10601
  }), ph = D(({
10603
10602
  view: t
10604
10603
  }) => {
10605
- const e = te(), n = Wi(), [a, i] = x.useState(!1), o = () => i(!0), s = () => i(!1), {
10604
+ const e = te(), n = Qi(), [a, i] = x.useState(!1), o = () => i(!0), s = () => i(!1), {
10606
10605
  panel: l
10607
10606
  } = he(), {
10608
10607
  id: u,
@@ -10647,19 +10646,19 @@ const hh = D(function({
10647
10646
  }), /* @__PURE__ */ c(ue.Dropdown, {
10648
10647
  children: [/* @__PURE__ */ r(ue.Item, {
10649
10648
  onClick: f,
10650
- icon: /* @__PURE__ */ r(Nr, {
10649
+ icon: /* @__PURE__ */ r(Br, {
10651
10650
  size: 14
10652
10651
  }),
10653
10652
  children: "Refresh"
10654
10653
  }), /* @__PURE__ */ r(ue.Item, {
10655
10654
  onClick: () => e.queries.downloadDataByQueryID(p),
10656
- icon: /* @__PURE__ */ r(Gr, {
10655
+ icon: /* @__PURE__ */ r(Wr, {
10657
10656
  size: 14
10658
10657
  }),
10659
10658
  children: "Download Data"
10660
10659
  }), !y && /* @__PURE__ */ r(ue.Item, {
10661
10660
  onClick: E,
10662
- icon: /* @__PURE__ */ r(po, {
10661
+ icon: /* @__PURE__ */ r(mo, {
10663
10662
  size: 14
10664
10663
  }),
10665
10664
  children: "Full Screen"
@@ -10669,13 +10668,13 @@ const hh = D(function({
10669
10668
  labelPosition: "center"
10670
10669
  }), /* @__PURE__ */ r(ue.Item, {
10671
10670
  onClick: o,
10672
- icon: /* @__PURE__ */ r(jr, {
10671
+ icon: /* @__PURE__ */ r(Gr, {
10673
10672
  size: 14
10674
10673
  }),
10675
10674
  children: "Settings"
10676
10675
  }), /* @__PURE__ */ r(ue.Item, {
10677
10676
  onClick: I,
10678
- icon: /* @__PURE__ */ r(mo, {
10677
+ icon: /* @__PURE__ */ r(fo, {
10679
10678
  size: 14
10680
10679
  }),
10681
10680
  children: "Duplicate"
@@ -10729,7 +10728,7 @@ const gh = {
10729
10728
  "&:hover": {
10730
10729
  borderColor: "#ced4da"
10731
10730
  }
10732
- }, Bn = D(function({
10731
+ }, jn = D(function({
10733
10732
  panel: e,
10734
10733
  view: n
10735
10734
  }) {
@@ -10758,10 +10757,10 @@ const gh = {
10758
10757
  height: 28,
10759
10758
  zIndex: 310
10760
10759
  },
10761
- children: /* @__PURE__ */ r(ya, {})
10760
+ children: /* @__PURE__ */ r(xa, {})
10762
10761
  }), /* @__PURE__ */ r(ph, {
10763
10762
  view: n
10764
- }), /* @__PURE__ */ r(mh, {}), /* @__PURE__ */ r(Ka, {
10763
+ }), /* @__PURE__ */ r(mh, {}), /* @__PURE__ */ r(Za, {
10765
10764
  viz: e.viz,
10766
10765
  data: i,
10767
10766
  loading: s,
@@ -10769,7 +10768,7 @@ const gh = {
10769
10768
  })]
10770
10769
  })
10771
10770
  });
10772
- }), Za = D(function({
10771
+ }), ei = D(function({
10773
10772
  view: e,
10774
10773
  panel: n,
10775
10774
  exitFullScreen: a
@@ -10791,7 +10790,7 @@ const gh = {
10791
10790
  variant: "default",
10792
10791
  size: "sm",
10793
10792
  onClick: a,
10794
- leftIcon: /* @__PURE__ */ r(fo, {
10793
+ leftIcon: /* @__PURE__ */ r(go, {
10795
10794
  size: 20
10796
10795
  }),
10797
10796
  children: "Exit fullscreen"
@@ -10803,14 +10802,14 @@ const gh = {
10803
10802
  flexGrow: 1,
10804
10803
  flexShrink: 0
10805
10804
  },
10806
- children: /* @__PURE__ */ r(Bn, {
10805
+ children: /* @__PURE__ */ r(jn, {
10807
10806
  view: e,
10808
10807
  panel: n
10809
10808
  })
10810
10809
  })]
10811
10810
  });
10812
10811
  });
10813
- function ei(t) {
10812
+ function ti(t) {
10814
10813
  const [e, n] = x.useState(null), a = x.useCallback((l) => {
10815
10814
  n(l);
10816
10815
  }, []), i = x.useCallback(() => {
@@ -10823,7 +10822,7 @@ function ei(t) {
10823
10822
  fullScreenPanel: o
10824
10823
  };
10825
10824
  }
10826
- function ti() {
10825
+ function ni() {
10827
10826
  x.useEffect(() => {
10828
10827
  const t = Po(".dashboard-sticky-area", {
10829
10828
  useStickyClasses: !0,
@@ -10851,7 +10850,7 @@ const vh = x.forwardRef(({
10851
10850
  }
10852
10851
  },
10853
10852
  variant: "transparent",
10854
- children: /* @__PURE__ */ r(go, {
10853
+ children: /* @__PURE__ */ r(bo, {
10855
10854
  size: 16
10856
10855
  })
10857
10856
  })), yh = x.forwardRef(({
@@ -10873,10 +10872,10 @@ const vh = x.forwardRef(({
10873
10872
  },
10874
10873
  variant: "transparent",
10875
10874
  ...e,
10876
- children: /* @__PURE__ */ r(bo, {
10875
+ children: /* @__PURE__ */ r(vo, {
10877
10876
  size: 16
10878
10877
  })
10879
- })), xh = ta(ea), Ch = D(function({
10878
+ })), xh = ra(na), Ch = D(function({
10880
10879
  view: e,
10881
10880
  className: n = "layout",
10882
10881
  rowHeight: a = 10,
@@ -10908,13 +10907,13 @@ const vh = x.forwardRef(({
10908
10907
  style: {
10909
10908
  position: "relative"
10910
10909
  },
10911
- children: [i && /* @__PURE__ */ r(vh, {}), /* @__PURE__ */ r(Bn, {
10910
+ children: [i && /* @__PURE__ */ r(vh, {}), /* @__PURE__ */ r(jn, {
10912
10911
  view: e,
10913
10912
  panel: l
10914
10913
  })]
10915
10914
  }, l.id))
10916
10915
  });
10917
- }), wh = ta(ea), Sh = D(function({
10916
+ }), wh = ra(na), Sh = D(function({
10918
10917
  view: e,
10919
10918
  className: n = "layout",
10920
10919
  rowHeight: a = 10
@@ -10927,7 +10926,7 @@ const vh = x.forwardRef(({
10927
10926
  layout: e.panels.layouts,
10928
10927
  children: e.panels.list.map((i) => /* @__PURE__ */ r("div", {
10929
10928
  "data-grid": i.layout,
10930
- children: /* @__PURE__ */ r(Bn, {
10929
+ children: /* @__PURE__ */ r(jn, {
10931
10930
  view: e,
10932
10931
  panel: i
10933
10932
  })
@@ -10997,8 +10996,8 @@ const vh = x.forwardRef(({
10997
10996
  exitFullScreen: i,
10998
10997
  inFullScreen: o,
10999
10998
  fullScreenPanel: s
11000
- } = ei(e);
11001
- return ti(), /* @__PURE__ */ r(Cn.Provider, {
10999
+ } = ti(e);
11000
+ return ni(), /* @__PURE__ */ r(Cn.Provider, {
11002
11001
  value: {
11003
11002
  viewPanelInFullScreen: a,
11004
11003
  inFullScreen: o
@@ -11010,11 +11009,11 @@ const vh = x.forwardRef(({
11010
11009
  position: "relative",
11011
11010
  height: "100%"
11012
11011
  },
11013
- children: [o && /* @__PURE__ */ r(Za, {
11012
+ children: [o && /* @__PURE__ */ r(ei, {
11014
11013
  view: e,
11015
11014
  panel: s,
11016
11015
  exitFullScreen: i
11017
- }), !o && /* @__PURE__ */ r(va, {
11016
+ }), !o && /* @__PURE__ */ r(ya, {
11018
11017
  saveChanges: n
11019
11018
  }), /* @__PURE__ */ r(Dh, {
11020
11019
  view: e,
@@ -11022,7 +11021,7 @@ const vh = x.forwardRef(({
11022
11021
  className: "dashboard-sticky-parent",
11023
11022
  children: [/* @__PURE__ */ r($, {
11024
11023
  className: "dashboard-sticky-area",
11025
- children: /* @__PURE__ */ r(la, {
11024
+ children: /* @__PURE__ */ r(ca, {
11026
11025
  view: e
11027
11026
  })
11028
11027
  }), /* @__PURE__ */ r($, {
@@ -11047,8 +11046,8 @@ const vh = x.forwardRef(({
11047
11046
  exitFullScreen: a,
11048
11047
  inFullScreen: i,
11049
11048
  fullScreenPanel: o
11050
- } = ei(e);
11051
- return ti(), /* @__PURE__ */ r(Cn.Provider, {
11049
+ } = ti(e);
11050
+ return ni(), /* @__PURE__ */ r(Cn.Provider, {
11052
11051
  value: {
11053
11052
  viewPanelInFullScreen: n,
11054
11053
  inFullScreen: i
@@ -11059,15 +11058,15 @@ const vh = x.forwardRef(({
11059
11058
  position: "relative",
11060
11059
  height: "100%"
11061
11060
  },
11062
- children: [i && /* @__PURE__ */ r(Za, {
11061
+ children: [i && /* @__PURE__ */ r(ei, {
11063
11062
  view: e,
11064
11063
  panel: o,
11065
11064
  exitFullScreen: a
11066
11065
  }), !i && /* @__PURE__ */ c($, {
11067
11066
  className: "dashboard-sticky-area",
11068
- children: [/* @__PURE__ */ r(va, {
11067
+ children: [/* @__PURE__ */ r(ya, {
11069
11068
  saveChanges: B.noop
11070
- }), /* @__PURE__ */ r(la, {
11069
+ }), /* @__PURE__ */ r(ca, {
11071
11070
  view: e
11072
11071
  })]
11073
11072
  }), /* @__PURE__ */ r(Sh, {
@@ -11075,7 +11074,7 @@ const vh = x.forwardRef(({
11075
11074
  })]
11076
11075
  })
11077
11076
  });
11078
- }), ni = b.model({
11077
+ }), ri = b.model({
11079
11078
  label: b.string,
11080
11079
  value: b.string
11081
11080
  }).actions((t) => ({
@@ -11085,11 +11084,11 @@ const vh = x.forwardRef(({
11085
11084
  setValue(e) {
11086
11085
  t.value = e;
11087
11086
  }
11088
- })), ri = b.model("FilterConfigModel_Select", {
11087
+ })), ai = b.model("FilterConfigModel_Select", {
11089
11088
  required: b.boolean,
11090
11089
  default_value: b.string,
11091
- static_options: b.optional(b.array(ni), []),
11092
- options_query: ma
11090
+ static_options: b.optional(b.array(ri), []),
11091
+ options_query: fa
11093
11092
  }).actions((t) => ({
11094
11093
  addStaticOption(e) {
11095
11094
  t.static_options.push(e);
@@ -11106,7 +11105,7 @@ const vh = x.forwardRef(({
11106
11105
  setOptionsQuery(e) {
11107
11106
  t.options_query = e;
11108
11107
  }
11109
- })), Th = () => ri.create({
11108
+ })), Th = () => ai.create({
11110
11109
  required: !1,
11111
11110
  default_value: "",
11112
11111
  static_options: [],
@@ -11115,10 +11114,10 @@ const vh = x.forwardRef(({
11115
11114
  key: "",
11116
11115
  sql: ""
11117
11116
  }
11118
- }), ai = b.model("FilterConfigModel_MultiSelect", {
11117
+ }), ii = b.model("FilterConfigModel_MultiSelect", {
11119
11118
  default_value: b.optional(b.array(b.string), []),
11120
- static_options: b.optional(b.array(ni), []),
11121
- options_query: ma
11119
+ static_options: b.optional(b.array(ri), []),
11120
+ options_query: fa
11122
11121
  }).actions((t) => ({
11123
11122
  addStaticOption(e) {
11124
11123
  t.static_options.push(e);
@@ -11132,7 +11131,7 @@ const vh = x.forwardRef(({
11132
11131
  setOptionsQuery(e) {
11133
11132
  t.options_query = e;
11134
11133
  }
11135
- })), Vh = () => ai.create({
11134
+ })), Vh = () => ii.create({
11136
11135
  default_value: [],
11137
11136
  static_options: [],
11138
11137
  options_query: {
@@ -11140,13 +11139,13 @@ const vh = x.forwardRef(({
11140
11139
  key: "",
11141
11140
  sql: ""
11142
11141
  }
11143
- }), ii = b.model("FilterConfigModel_Checkbox", {
11142
+ }), oi = b.model("FilterConfigModel_Checkbox", {
11144
11143
  default_value: b.boolean
11145
11144
  }).actions((t) => ({
11146
11145
  setDefaultValue(e) {
11147
11146
  t.default_value = e;
11148
11147
  }
11149
- })), zh = () => ii.create({
11148
+ })), zh = () => oi.create({
11150
11149
  default_value: !1
11151
11150
  }), Eh = b.model("FilterConfigModel_DateRange", {
11152
11151
  required: b.boolean,
@@ -11166,7 +11165,7 @@ const vh = x.forwardRef(({
11166
11165
  setDefaultValue(e) {
11167
11166
  t.default_value.length = 0, t.default_value.push(...e);
11168
11167
  }
11169
- })), oi = b.snapshotProcessor(Eh, {
11168
+ })), si = b.snapshotProcessor(Eh, {
11170
11169
  preProcessor({ default_value: t, ...e }) {
11171
11170
  return {
11172
11171
  ...e,
@@ -11176,15 +11175,21 @@ const vh = x.forwardRef(({
11176
11175
  postProcessor({ default_value: t, ...e }) {
11177
11176
  return {
11178
11177
  ...e,
11179
- default_value: t.map((n) => typeof n == "number" ? new Date(n).toISOString() : "")
11178
+ default_value: t.map((n) => {
11179
+ try {
11180
+ return typeof n == "number" ? new Date(n).toISOString() : null;
11181
+ } catch {
11182
+ return console.log(`[date-range] failed parsing ${n}`), null;
11183
+ }
11184
+ })
11180
11185
  };
11181
11186
  }
11182
- }), Oh = () => oi.create({
11187
+ }), Oh = () => si.create({
11183
11188
  required: !1,
11184
11189
  inputFormat: "YYYY-MM-DD",
11185
11190
  clearable: !1,
11186
11191
  default_value: [null, null]
11187
- }), Rr = b.model("FilterModel", {
11192
+ }), kr = b.model("FilterModel", {
11188
11193
  id: b.identifier,
11189
11194
  key: b.string,
11190
11195
  label: b.string,
@@ -11198,13 +11203,18 @@ const vh = x.forwardRef(({
11198
11203
  me.DateRange
11199
11204
  ]),
11200
11205
  config: b.union(
11201
- ri,
11202
11206
  ai,
11203
- fa,
11204
11207
  ii,
11205
- oi
11208
+ ga,
11209
+ oi,
11210
+ si
11206
11211
  )
11207
- }).actions((t) => ({
11212
+ }).views((t) => ({
11213
+ get plainDefaultValue() {
11214
+ const e = t.config.default_value;
11215
+ return Array.isArray(e) ? [...e] : e;
11216
+ }
11217
+ })).actions((t) => ({
11208
11218
  setKey(e) {
11209
11219
  t.key = e;
11210
11220
  },
@@ -11223,7 +11233,7 @@ const vh = x.forwardRef(({
11223
11233
  t.config = Vh();
11224
11234
  break;
11225
11235
  case me.TextInput:
11226
- t.config = ga();
11236
+ t.config = ba();
11227
11237
  break;
11228
11238
  case me.Checkbox:
11229
11239
  t.config = zh();
@@ -11237,9 +11247,16 @@ const vh = x.forwardRef(({
11237
11247
  setVisibleInViewsIDs(e) {
11238
11248
  t.visibleInViewsIDs.length = 0, t.visibleInViewsIDs.push(...e);
11239
11249
  }
11240
- })), Fh = b.model("FiltersModel", {
11241
- original: b.optional(b.array(Rr), []),
11242
- current: b.optional(b.array(Rr), []),
11250
+ }));
11251
+ function Fh(t) {
11252
+ return t === void 0 ? t : Array.isArray(t) ? t.map((e) => {
11253
+ const n = new Date(e);
11254
+ return n != null ? n : e;
11255
+ }) : t;
11256
+ }
11257
+ const Ph = b.model("FiltersModel", {
11258
+ original: b.optional(b.array(kr), []),
11259
+ current: b.optional(b.array(kr), []),
11243
11260
  values: b.optional(b.frozen(), {})
11244
11261
  }).views((t) => ({
11245
11262
  get changed() {
@@ -11260,6 +11277,12 @@ const vh = x.forwardRef(({
11260
11277
  t.current.filter((n) => n.visibleInViewsIDs.includes(e)),
11261
11278
  "order"
11262
11279
  );
11280
+ },
11281
+ get triggerForRefreshValues() {
11282
+ return t.current.map((n) => {
11283
+ var a;
11284
+ return (a = n.config.default_value) == null ? void 0 : a.toString();
11285
+ }).join("__");
11263
11286
  }
11264
11287
  })).actions((t) => ({
11265
11288
  reset() {
@@ -11282,23 +11305,31 @@ const vh = x.forwardRef(({
11282
11305
  },
11283
11306
  getValueByKey(e) {
11284
11307
  return t.values[e];
11308
+ },
11309
+ refreshValues() {
11310
+ console.log("refreshing values");
11311
+ const e = t.current.reduce((n, a) => (n[a.key] = Fh(a.config.default_value), n), {});
11312
+ t.values = e;
11313
+ }
11314
+ })).actions((t) => ({
11315
+ afterCreate() {
11316
+ Qr(
11317
+ t,
11318
+ At(() => t.triggerForRefreshValues, t.refreshValues, {
11319
+ fireImmediately: !0,
11320
+ delay: 0
11321
+ })
11322
+ );
11285
11323
  }
11286
11324
  }));
11287
- function Ph(t) {
11288
- return t === void 0 ? t : Array.isArray(t) ? t.map((e) => {
11289
- const n = new Date(e);
11290
- return n != null ? n : e;
11291
- }) : t;
11292
- }
11293
11325
  function Ah(t) {
11294
- const e = t.reduce((n, a) => (n[a.key] = Ph(a.config.default_value), n), {});
11295
11326
  return {
11296
11327
  original: t,
11297
11328
  current: t,
11298
- values: e
11329
+ values: {}
11299
11330
  };
11300
11331
  }
11301
- var jn = { exports: {} };
11332
+ var Gn = { exports: {} };
11302
11333
  (function(t, e) {
11303
11334
  (function(n, a) {
11304
11335
  a();
@@ -11369,20 +11400,20 @@ var jn = { exports: {} };
11369
11400
  });
11370
11401
  s.saveAs = u.saveAs = u, t.exports = u;
11371
11402
  });
11372
- })(jn);
11403
+ })(Gn);
11373
11404
  function Mh(t, e) {
11374
11405
  const n = new Blob([e], { type: "text/csv" });
11375
- jn.exports.saveAs(n, `${t}.csv`);
11406
+ Gn.exports.saveAs(n, `${t}.csv`);
11376
11407
  }
11377
11408
  function Lh(t) {
11378
11409
  const e = new Ao();
11379
11410
  t.forEach(({ id: n, data: a }) => {
11380
- e.file(`${n}.csv`, si(a));
11411
+ e.file(`${n}.csv`, li(a));
11381
11412
  }), e.generateAsync({ type: "blob" }).then((n) => {
11382
- jn.exports.saveAs(n, "dashboard_data.zip");
11413
+ Gn.exports.saveAs(n, "dashboard_data.zip");
11383
11414
  });
11384
11415
  }
11385
- function si(t) {
11416
+ function li(t) {
11386
11417
  if (!Array.isArray(t) || t.length === 0)
11387
11418
  return "";
11388
11419
  const e = [], n = Object.keys(t[0]);
@@ -11392,7 +11423,7 @@ function si(t) {
11392
11423
  }), e.join(`
11393
11424
  `);
11394
11425
  }
11395
- const li = b.model("QueryModel", {
11426
+ const ci = b.model("QueryModel", {
11396
11427
  id: b.string,
11397
11428
  type: b.enumeration("DataSourceType", [xe.Postgresql, xe.MySQL, xe.HTTP]),
11398
11429
  key: b.string,
@@ -11407,7 +11438,7 @@ const li = b.model("QueryModel", {
11407
11438
  }
11408
11439
  })), qh = b.compose(
11409
11440
  "QueryModel",
11410
- li,
11441
+ ci,
11411
11442
  b.model({
11412
11443
  state: b.optional(b.enumeration(["idle", "loading", "error"]), "idle"),
11413
11444
  data: b.optional(b.array(b.frozen()), []),
@@ -11415,8 +11446,8 @@ const li = b.model("QueryModel", {
11415
11446
  })
11416
11447
  ).views((t) => ({
11417
11448
  get formattedSQL() {
11418
- const { context: e, sqlSnippets: n, filterValues: a } = fr(t).payloadForSQL;
11419
- return oa(t.sql, e, n, a);
11449
+ const { context: e, sqlSnippets: n, filterValues: a } = gr(t).payloadForSQL;
11450
+ return sa(t.sql, e, n, a);
11420
11451
  }
11421
11452
  })).actions((t) => ({
11422
11453
  setID(e) {
@@ -11431,12 +11462,12 @@ const li = b.model("QueryModel", {
11431
11462
  setSQL(e) {
11432
11463
  t.sql = e;
11433
11464
  },
11434
- fetchData: yo(function* () {
11465
+ fetchData: xo(function* () {
11435
11466
  if (!!t.valid) {
11436
11467
  t.state = "loading";
11437
11468
  try {
11438
- const e = t.id, { context: n, sqlSnippets: a, filterValues: i } = fr(t).payloadForSQL;
11439
- t.data = yield* xo(
11469
+ const e = t.id, { context: n, sqlSnippets: a, filterValues: i } = gr(t).payloadForSQL;
11470
+ t.data = yield* Co(
11440
11471
  Bo({
11441
11472
  context: n,
11442
11473
  sqlSnippets: a,
@@ -11456,16 +11487,16 @@ const li = b.model("QueryModel", {
11456
11487
  })
11457
11488
  })).actions((t) => ({
11458
11489
  afterCreate() {
11459
- Co(
11490
+ Qr(
11460
11491
  t,
11461
- vn(() => `${t.id}--${t.key}--${t.type}--${t.formattedSQL}`, t.fetchData, {
11492
+ At(() => `${t.id}--${t.key}--${t.type}--${t.formattedSQL}`, t.fetchData, {
11462
11493
  fireImmediately: !0,
11463
11494
  delay: 500
11464
11495
  })
11465
11496
  );
11466
11497
  }
11467
11498
  })), $h = b.model("QueriesModel", {
11468
- original: b.optional(b.array(li), []),
11499
+ original: b.optional(b.array(ci), []),
11469
11500
  current: b.optional(b.array(qh), [])
11470
11501
  }).views((t) => ({
11471
11502
  get changed() {
@@ -11519,7 +11550,7 @@ const li = b.model("QueryModel", {
11519
11550
  console.log(`[downloadDataByQueryID] query by ID[${e}] not found`);
11520
11551
  return;
11521
11552
  }
11522
- const { id: a, data: i } = n, o = si(i);
11553
+ const { id: a, data: i } = n, o = li(i);
11523
11554
  Mh(a, o);
11524
11555
  },
11525
11556
  refetchDataByQueryID(e) {
@@ -11530,7 +11561,7 @@ const li = b.model("QueryModel", {
11530
11561
  }
11531
11562
  return n.fetchData();
11532
11563
  }
11533
- })), kr = b.model("SQLSnippetModel", {
11564
+ })), Tr = b.model("SQLSnippetModel", {
11534
11565
  key: b.string,
11535
11566
  value: b.string
11536
11567
  }).actions((t) => ({
@@ -11541,8 +11572,8 @@ const li = b.model("QueryModel", {
11541
11572
  t.value = e;
11542
11573
  }
11543
11574
  })), Nh = b.model("SQLSnippetsModel", {
11544
- original: b.optional(b.array(kr), []),
11545
- current: b.optional(b.array(kr), [])
11575
+ original: b.optional(b.array(Tr), []),
11576
+ current: b.optional(b.array(Tr), [])
11546
11577
  }).views((t) => ({
11547
11578
  get changed() {
11548
11579
  return !B.isEqual(t.original, t.current);
@@ -11712,8 +11743,8 @@ const li = b.model("QueryModel", {
11712
11743
  description: "<p><br></p>",
11713
11744
  queryID: "",
11714
11745
  viz: {
11715
- type: un.name,
11716
- conf: un.createConfig()
11746
+ type: dn.name,
11747
+ conf: dn.createConfig()
11717
11748
  },
11718
11749
  style: {
11719
11750
  border: {
@@ -11752,7 +11783,7 @@ const li = b.model("QueryModel", {
11752
11783
  replaceByIndex(e, n) {
11753
11784
  t.list.splice(e, 1, n);
11754
11785
  }
11755
- })), Tr = b.model({
11786
+ })), Vr = b.model({
11756
11787
  id: b.identifier,
11757
11788
  name: b.string,
11758
11789
  type: b.string,
@@ -11788,9 +11819,9 @@ const li = b.model("QueryModel", {
11788
11819
  [e]: n
11789
11820
  };
11790
11821
  }
11791
- })).actions((t) => ({})), ci = b.model("ViewsModel", {
11792
- original: b.optional(b.array(Tr), []),
11793
- current: b.optional(b.array(Tr), []),
11822
+ })).actions((t) => ({})), ui = b.model("ViewsModel", {
11823
+ original: b.optional(b.array(Vr), []),
11824
+ current: b.optional(b.array(Vr), []),
11794
11825
  visibleViewIDs: b.array(b.string),
11795
11826
  idOfVIE: b.string
11796
11827
  }).views((t) => ({
@@ -11888,7 +11919,7 @@ function Hh(t) {
11888
11919
  list: i.panels
11889
11920
  }
11890
11921
  }));
11891
- return ci.create({
11922
+ return ui.create({
11892
11923
  original: a,
11893
11924
  current: a,
11894
11925
  visibleViewIDs: e,
@@ -11898,10 +11929,10 @@ function Hh(t) {
11898
11929
  const Xh = b.model({
11899
11930
  id: b.identifier,
11900
11931
  name: b.string,
11901
- filters: Fh,
11932
+ filters: Ph,
11902
11933
  queries: $h,
11903
11934
  sqlSnippets: Nh,
11904
- views: ci,
11935
+ views: ui,
11905
11936
  context: Bh
11906
11937
  }).views((t) => ({
11907
11938
  get payloadForSQL() {
@@ -11935,7 +11966,7 @@ const Xh = b.model({
11935
11966
  return (a = (n = t.queries.findByID(e)) == null ? void 0 : n.error) != null ? a : [];
11936
11967
  }
11937
11968
  }));
11938
- function ui({ id: t, name: e, filters: n, views: a, definition: { queries: i, sqlSnippets: o } }, s) {
11969
+ function di({ id: t, name: e, filters: n, views: a, definition: { queries: i, sqlSnippets: o } }, s) {
11939
11970
  return Xh.create({
11940
11971
  id: t,
11941
11972
  name: e,
@@ -11960,7 +11991,7 @@ const Vp = D(function({
11960
11991
  config: o
11961
11992
  }) {
11962
11993
  je.baseURL !== o.apiBaseURL && (je.baseURL = o.apiBaseURL);
11963
- const [s, l] = x.useState(!1), u = x.useMemo(() => ui(n, e), [n]);
11994
+ const [s, l] = x.useState(!1), u = x.useMemo(() => di(n, e), [n]);
11964
11995
  x.useEffect(() => {
11965
11996
  u.context.replace(e);
11966
11997
  }, [e]);
@@ -11975,9 +12006,9 @@ const Vp = D(function({
11975
12006
  }
11976
12007
  };
11977
12008
  await a(I);
11978
- }, h = Pe(Ha, []);
11979
- return /* @__PURE__ */ r(zr, {
11980
- children: /* @__PURE__ */ r(ra, {
12009
+ }, h = Pe(Xa, []);
12010
+ return /* @__PURE__ */ r(Er, {
12011
+ children: /* @__PURE__ */ r(ia, {
11981
12012
  value: u,
11982
12013
  children: /* @__PURE__ */ r(_e.Provider, {
11983
12014
  value: {
@@ -12010,11 +12041,11 @@ function zp({
12010
12041
  config: a
12011
12042
  }) {
12012
12043
  je.baseURL !== a.apiBaseURL && (je.baseURL = a.apiBaseURL);
12013
- const i = x.useMemo(() => ui(e, t), [e]);
12044
+ const i = x.useMemo(() => di(e, t), [e]);
12014
12045
  return x.useEffect(() => {
12015
12046
  i.context.replace(t);
12016
- }, [t]), /* @__PURE__ */ r(zr, {
12017
- children: /* @__PURE__ */ r(ra, {
12047
+ }, [t]), /* @__PURE__ */ r(Er, {
12048
+ children: /* @__PURE__ */ r(ia, {
12018
12049
  value: i,
12019
12050
  children: /* @__PURE__ */ r(_e.Provider, {
12020
12051
  value: {
@@ -12039,22 +12070,22 @@ export {
12039
12070
  ws as DashboardFilterType,
12040
12071
  Cs as DashboardMode,
12041
12072
  Re as EViewComponentType,
12042
- Rr as FilterModel,
12043
- Fh as FiltersModel,
12073
+ kr as FilterModel,
12074
+ Ph as FiltersModel,
12044
12075
  _e as LayoutStateContext,
12045
12076
  Rh as MainDashboardView,
12046
- ra as ModelContextProvider,
12047
- Bn as Panel,
12077
+ ia as ModelContextProvider,
12078
+ jn as Panel,
12048
12079
  Ho as PanelContextProvider,
12049
12080
  $h as QueriesModel,
12050
12081
  qh as QueryModel,
12051
12082
  zp as ReadOnlyDashboard,
12052
12083
  kh as ReadOnlyDashboardView,
12053
- kr as SQLSnippetModel,
12084
+ Tr as SQLSnippetModel,
12054
12085
  Nh as SQLSnippetsModel,
12055
- Tr as ViewModel,
12056
- ci as ViewsModel,
12057
- ui as createDashboardModel,
12086
+ Vr as ViewModel,
12087
+ ui as ViewsModel,
12088
+ di as createDashboardModel,
12058
12089
  Hh as createDashboardViewsModel,
12059
12090
  Ah as getInitialFiltersPayload,
12060
12091
  te as useModelContext,