@devtable/dashboard 11.5.2 → 11.5.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  var th = Object.defineProperty;
2
2
  var nh = (e, t, n) => t in e ? th(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
3
3
  var N = (e, t, n) => (nh(e, typeof t != "symbol" ? t + "" : t, n), n);
4
- import M, { forwardRef as he, useState as q, useEffect as O, useCallback as Be, useMemo as T, createElement as ts, useContext as Ht, useRef as ns, createContext as el, memo as rh } from "react";
4
+ import M, { forwardRef as he, useState as q, useEffect as $, useCallback as Be, useMemo as T, createElement as ts, useContext as Ht, useRef as ns, createContext as el, memo as rh } from "react";
5
5
  import { TextInput as D, Text as j, Box as z, Button as C, HoverCard as Te, Group as b, Select as L, Stack as _, Divider as I, NumberInput as U, Switch as Ve, Table as We, ActionIcon as W, MultiSelect as $n, Paper as sh, Code as Ja, Modal as ge, Tabs as f, LoadingOverlay as _n, Alert as rs, ColorSwatch as ti, Overlay as Rt, Checkbox as K, Collapse as xr, Center as Sn, useMantineTheme as tl, CheckIcon as ih, MANTINE_SIZES as ah, SimpleGrid as nn, Tooltip as be, NativeSelect as nl, SegmentedControl as oh, Anchor as ni, Textarea as lh, Mark as ch, ColorInput as ji, createStyles as mr, Popover as On, Slider as dh, Flex as Ut, Badge as bn, CloseButton as rl, Menu as ue, Affix as uh, Header as hh, List as it, FileInput as ph, ThemeIcon as Ps, UnstyledButton as xh, Navbar as Nt, JsonInput as sl, Pagination as il, Drawer as mh, Accordion as Ir, Radio as Za, Skeleton as eo, NavLink as ri, AppShell as al } from "@mantine/core";
6
6
  import { useModals as Et, ModalsProvider as ol } from "@mantine/modals";
7
7
  import { useBoolean as $e, useCreation as kt, useAsyncEffect as fr, useRequest as yn, useWhyDidYouUpdate as ll, useLatest as to, usePrevious as fh } from "ahooks";
@@ -983,7 +983,7 @@ const Jx = new Xx(Ln), qt = Jx, dr = he(function({
983
983
  }, i) {
984
984
  return /* @__PURE__ */ r.jsx(D, { ref: i, value: t, onChange: n, ...s });
985
985
  });
986
- function $(e) {
986
+ function O(e) {
987
987
  const [t, n] = e.split(".");
988
988
  return {
989
989
  queryID: t,
@@ -991,7 +991,7 @@ function $(e) {
991
991
  };
992
992
  }
993
993
  function Zx(e) {
994
- return e.includes(".") ? $(e) : {
994
+ return e.includes(".") ? O(e) : {
995
995
  queryID: "",
996
996
  columnKey: e
997
997
  };
@@ -1001,13 +1001,13 @@ function Qt(e, t) {
1001
1001
  const {
1002
1002
  queryID: n,
1003
1003
  columnKey: s
1004
- } = $(t);
1004
+ } = O(t);
1005
1005
  return n ? s ? ((i = e[n]) == null ? void 0 : i.map((a) => a[s])) ?? [] : e[n] : [];
1006
1006
  }
1007
1007
  function yr(e, t) {
1008
1008
  const {
1009
1009
  queryID: n
1010
- } = $(t);
1010
+ } = O(t);
1011
1011
  return n ? e[n] : [];
1012
1012
  }
1013
1013
  function em(e) {
@@ -1017,7 +1017,7 @@ function Or(e, t) {
1017
1017
  const {
1018
1018
  queryID: n,
1019
1019
  columnKey: s
1020
- } = $(t);
1020
+ } = O(t);
1021
1021
  return e[s];
1022
1022
  }
1023
1023
  const ho = ["function aggregation({ queryData }, utils) {", ' return "Aggregation Result";', "}"].join(`
@@ -1719,7 +1719,7 @@ class Ri {
1719
1719
  }), this.instanceRegistry.clear(), this.factoryRegistry.clear();
1720
1720
  }
1721
1721
  }
1722
- const rc = "11.5.2", Rm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1722
+ const rc = "11.5.3", Rm = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1723
1723
  __proto__: null,
1724
1724
  version: rc
1725
1725
  }, Symbol.toStringTag, { value: "Module" }));
@@ -1842,7 +1842,7 @@ const Q = (e, t) => {
1842
1842
  const [n, {
1843
1843
  setFalse: s
1844
1844
  }] = $e(!0), [i, a] = q();
1845
- O(() => (e.getItem(t).then((l) => {
1845
+ $(() => (e.getItem(t).then((l) => {
1846
1846
  a(l), s();
1847
1847
  }), e.watchItem(t, (l) => {
1848
1848
  a(l);
@@ -1910,9 +1910,9 @@ function $m({
1910
1910
  y: x,
1911
1911
  z: y
1912
1912
  } = T(() => ({
1913
- x: $(a),
1914
- y: $(o),
1915
- z: $(l)
1913
+ x: O(a),
1914
+ y: O(o),
1915
+ z: O(l)
1916
1916
  }), [a, o, l]), {
1917
1917
  min: S,
1918
1918
  max: A
@@ -2050,7 +2050,7 @@ function Wm({
2050
2050
  } = ve({
2051
2051
  defaultValues: s
2052
2052
  });
2053
- return O(() => {
2053
+ return $(() => {
2054
2054
  o(s);
2055
2055
  }, [t]), t ? /* @__PURE__ */ r.jsx(_, { spacing: "xs", children: /* @__PURE__ */ r.jsxs("form", { onSubmit: a(n), children: [
2056
2056
  /* @__PURE__ */ r.jsx(j, { children: "X Axis" }),
@@ -2336,13 +2336,13 @@ function In(e, t) {
2336
2336
  const {
2337
2337
  queryID: n,
2338
2338
  columnKey: s
2339
- } = $(t);
2339
+ } = O(t);
2340
2340
  return w.keyBy(e[n], s);
2341
2341
  }, [e, t]);
2342
2342
  }
2343
2343
  const yt = (e, t) => {
2344
2344
  const [n, s] = q([]);
2345
- return O(() => e.watchTriggerSnapshotList((i) => s(i.filter((a) => a.schemaRef === t))), []), n;
2345
+ return $(() => e.watchTriggerSnapshotList((i) => s(i.filter((a) => a.schemaRef === t))), []), n;
2346
2346
  };
2347
2347
  class Fn {
2348
2348
  constructor(t, n) {
@@ -2405,7 +2405,7 @@ function Xm(e, t) {
2405
2405
  } = Q(e.operation.operationData, "config"), [i, a] = q(Ce({}, n, t)), o = async () => {
2406
2406
  await s(i);
2407
2407
  };
2408
- return O(() => {
2408
+ return $(() => {
2409
2409
  a(Ce({}, n, t));
2410
2410
  }, [n]), {
2411
2411
  config: i,
@@ -2538,7 +2538,7 @@ const cf = {
2538
2538
  onChange: t
2539
2539
  }) => {
2540
2540
  const [n, s] = q(e);
2541
- O(() => {
2541
+ $(() => {
2542
2542
  s(e);
2543
2543
  }, [e]);
2544
2544
  const i = () => {
@@ -3101,7 +3101,7 @@ const Ff = k(({
3101
3101
  } = Dn(), n = e.viz, {
3102
3102
  vizManager: s
3103
3103
  } = Ht(Ot), i = e.json, a = kt(() => s.getOrCreateInstance(i), [s, i]), o = kt(() => new Pi(a, s.resolveComponent(n.type), gs), [a, n.type]);
3104
- return O(() => a.instanceData.watchItem(
3104
+ return $(() => a.instanceData.watchItem(
3105
3105
  null,
3106
3106
  // avoid too many updates
3107
3107
  kh((l) => {
@@ -3231,7 +3231,7 @@ function Hf(e, t) {
3231
3231
  } = e;
3232
3232
  if (!n.data_key || !s.data_key)
3233
3233
  return [];
3234
- const i = $(n.data_key), a = $(s.data_key);
3234
+ const i = O(n.data_key), a = O(s.data_key);
3235
3235
  if (i.queryID !== a.queryID)
3236
3236
  throw new Error("Please use the same query for X & Y axis");
3237
3237
  const o = w.groupBy(t[i.queryID], i.columnKey), {
@@ -3550,7 +3550,7 @@ const sg = (e, t) => {
3550
3550
  });
3551
3551
  function vc(e, t) {
3552
3552
  return e.tooltip.metrics.map((n) => {
3553
- const s = $(n.data_key);
3553
+ const s = O(n.data_key);
3554
3554
  return `
3555
3555
  <tr>
3556
3556
  <th style="text-align: right; padding: 0 1em;">${n.name}</th>
@@ -3837,7 +3837,7 @@ const mg = ({
3837
3837
  setTrue: i,
3838
3838
  setFalse: a
3839
3839
  }] = $e(), [o, l] = q(e);
3840
- O(() => {
3840
+ $(() => {
3841
3841
  l(e);
3842
3842
  }, [e]);
3843
3843
  const c = (x) => {
@@ -4086,7 +4086,7 @@ const vt = M.forwardRef(yg), jg = ({
4086
4086
  data_key: "",
4087
4087
  name: ""
4088
4088
  }), c = t("tooltip.metrics.0.id"), [d, u] = q(() => c ?? null);
4089
- return O(() => {
4089
+ return $(() => {
4090
4090
  c && u((h) => h !== null ? h : c);
4091
4091
  }, [c]), /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
4092
4092
  /* @__PURE__ */ r.jsxs(b, { spacing: 2, sx: {
@@ -4169,7 +4169,7 @@ function kg({
4169
4169
  } = ve({
4170
4170
  defaultValues: i
4171
4171
  });
4172
- O(() => {
4172
+ $(() => {
4173
4173
  d(i);
4174
4174
  }, [i]), l(["x_axis", "y_axis", "reference_lines", "color"]);
4175
4175
  const u = c(), h = T(() => !fe(u, t), [u, t]);
@@ -4573,7 +4573,7 @@ function Ug({
4573
4573
  value: t,
4574
4574
  set: n
4575
4575
  } = Q(e.instanceData, "config"), s = T(() => je({}, t, Ni), [t]), i = s;
4576
- O(() => {
4576
+ $(() => {
4577
4577
  !fe(s, i) && (console.log("config malformed, resetting to defaults", s, i), n(i));
4578
4578
  }, [s, i]);
4579
4579
  const {
@@ -4585,7 +4585,7 @@ function Ug({
4585
4585
  } = ve({
4586
4586
  defaultValues: i
4587
4587
  });
4588
- O(() => {
4588
+ $(() => {
4589
4589
  d(i);
4590
4590
  }, [i]);
4591
4591
  const u = c(), h = T(() => !fe(u, s), [u, s]);
@@ -4894,7 +4894,7 @@ function sb({
4894
4894
  }
4895
4895
  const {
4896
4896
  columnKey: c
4897
- } = $(a.y_axis_data_key), d = w.groupBy(yr(n, a.y_axis_data_key), l);
4897
+ } = O(a.y_axis_data_key), d = w.groupBy(yr(n, a.y_axis_data_key), l);
4898
4898
  Object.entries(d).forEach(([u, h]) => {
4899
4899
  const p = h.map((y, S) => [S, Number(y[c])]);
4900
4900
  i(a, u, u, p);
@@ -4973,7 +4973,7 @@ function lb({
4973
4973
  } = t, {
4974
4974
  queryID: o,
4975
4975
  columnKey: l
4976
- } = $(s), c = Th(yr(n, o), l);
4976
+ } = O(s), c = Th(yr(n, o), l);
4977
4977
  return (d, u) => {
4978
4978
  let h;
4979
4979
  u.name ? h = c[u.name] : h = n[u.dataIndex];
@@ -5039,7 +5039,7 @@ function hb({
5039
5039
  const {
5040
5040
  queryID: i,
5041
5041
  columnKey: a
5042
- } = $(e), o = w.groupBy(t[i], a);
5042
+ } = O(e), o = w.groupBy(t[i], a);
5043
5043
  return Object.entries(o).forEach(([l, c]) => {
5044
5044
  o[l] = Gi({
5045
5045
  [i]: c
@@ -5334,7 +5334,7 @@ function Sb({
5334
5334
  }), [c]), p = (x) => {
5335
5335
  u.current = x, mo(x);
5336
5336
  };
5337
- return O(() => {
5337
+ return $(() => {
5338
5338
  u.current && mo(u.current);
5339
5339
  }, [d]), !n || !s ? null : /* @__PURE__ */ r.jsx(Ye, { echarts: ie, option: d, style: {
5340
5340
  width: n,
@@ -9208,7 +9208,7 @@ const Wc = At.create({
9208
9208
  content: e,
9209
9209
  editable: !1
9210
9210
  });
9211
- O(() => {
9211
+ $(() => {
9212
9212
  s == null || s.commands.setContent(e);
9213
9213
  }, [e, s]);
9214
9214
  const i = T(() => w.defaultsDeep({}, {
@@ -9241,7 +9241,11 @@ const vj = ({
9241
9241
  onChange: t
9242
9242
  }) => {
9243
9243
  const n = (s) => {
9244
- s && t(s);
9244
+ if (!s) {
9245
+ t("");
9246
+ return;
9247
+ }
9248
+ t(s);
9245
9249
  };
9246
9250
  return /* @__PURE__ */ r.jsx(z, { sx: {
9247
9251
  position: "relative",
@@ -9269,7 +9273,7 @@ const vj = ({
9269
9273
  }, d = () => {
9270
9274
  o(s);
9271
9275
  };
9272
- O(() => {
9276
+ $(() => {
9273
9277
  o(e);
9274
9278
  }, [e]);
9275
9279
  const u = a !== e;
@@ -9349,7 +9353,7 @@ function _j({
9349
9353
  pt: s = "sm",
9350
9354
  withFallback: i
9351
9355
  }, a) {
9352
- O(() => {
9356
+ $(() => {
9353
9357
  typeof t == "string" && n({
9354
9358
  type: t,
9355
9359
  config: {},
@@ -10083,7 +10087,7 @@ function Qj({
10083
10087
  } = ve({
10084
10088
  defaultValues: i
10085
10089
  });
10086
- O(() => {
10090
+ $(() => {
10087
10091
  d(i);
10088
10092
  }, [i]);
10089
10093
  const u = c(), h = T(() => !fe(u, i), [u, i]);
@@ -10578,7 +10582,7 @@ function mv(e, t) {
10578
10582
  } = n;
10579
10583
  if (!s || !i)
10580
10584
  return {};
10581
- const h = $(s), p = $(i), x = t[h.queryID].map((S) => ({
10585
+ const h = O(s), p = O(i), x = t[h.queryID].map((S) => ({
10582
10586
  name: S[h.columnKey],
10583
10587
  value: S[p.columnKey]
10584
10588
  })), y = bt(a.overflow.on_axis);
@@ -10626,7 +10630,7 @@ function fv({
10626
10630
  }
10627
10631
  function gv(e, t) {
10628
10632
  var a;
10629
- const n = $(e.series[0].level_name_data_key), s = $(e.series[0].level_value_data_key), i = (a = w.maxBy(t[n.queryID], s.columnKey)) == null ? void 0 : a[s.columnKey];
10633
+ const n = O(e.series[0].level_name_data_key), s = O(e.series[0].level_value_data_key), i = (a = w.maxBy(t[n.queryID], s.columnKey)) == null ? void 0 : a[s.columnKey];
10630
10634
  return (o) => {
10631
10635
  const c = fv({
10632
10636
  conf: e,
@@ -10950,7 +10954,7 @@ const _v = [{
10950
10954
  ...u,
10951
10955
  ...a[h]
10952
10956
  })), l = w.get(o, "0.id"), [c, d] = q(l ?? null);
10953
- return O(() => {
10957
+ return $(() => {
10954
10958
  l && d((u) => u !== null ? u : l);
10955
10959
  }, [l]), /* @__PURE__ */ r.jsxs(f, { value: c, onTabChange: (u) => d(u), styles: {
10956
10960
  panel: {
@@ -10980,7 +10984,7 @@ function zv({
10980
10984
  } = ve({
10981
10985
  defaultValues: s
10982
10986
  });
10983
- O(() => {
10987
+ $(() => {
10984
10988
  c(s);
10985
10989
  }, [s]), o([]);
10986
10990
  const d = l(), u = T(() => !w.isEqual(d, s), [d, s]);
@@ -11195,7 +11199,7 @@ function Vv({
11195
11199
  }
11196
11200
  }, x = [u, h, p], y = s[`${l}---${c}`];
11197
11201
  return y && e.tooltip.metrics.forEach((S) => {
11198
- const A = $(S.data_key);
11202
+ const A = O(S.data_key);
11199
11203
  x.push({
11200
11204
  label: S.name,
11201
11205
  value: Pv(w.get(y, A.columnKey, "")),
@@ -11211,8 +11215,8 @@ function Nv(e, t, n, s) {
11211
11215
  x_axis: i,
11212
11216
  y_axis: a,
11213
11217
  heat_block: o
11214
- } = e, l = $(i.data_key), c = $(a.data_key);
11215
- $(o.data_key);
11218
+ } = e, l = O(i.data_key), c = O(a.data_key);
11219
+ O(o.data_key);
11216
11220
  const d = w.keyBy(t[l.queryID], (u) => `${u[l.columnKey]}---${u[c.columnKey]}`);
11217
11221
  return oe.getTooltip({
11218
11222
  formatter: function(u) {
@@ -11493,7 +11497,7 @@ function Xv(e, t, n, s, i) {
11493
11497
  const a = n.reduce((A, F) => {
11494
11498
  const V = Jt(F, t);
11495
11499
  return A[F.name] = gt(F, V), A;
11496
- }, {}), o = Ev(e), l = Fv(e), c = $(e.x_axis.data_key), d = $(e.y_axis.data_key), u = $(e.heat_block.data_key), h = w.uniq(t[c.queryID].map((A) => A[c.columnKey])), p = w.uniq(t[c.queryID].map((A) => A[d.columnKey])), x = t[c.queryID].map((A) => [w.get(A, c.columnKey), w.get(A, d.columnKey), w.get(A, u.columnKey)]), y = Yv(h.length, p.length, s, i);
11500
+ }, {}), o = Ev(e), l = Fv(e), c = O(e.x_axis.data_key), d = O(e.y_axis.data_key), u = O(e.heat_block.data_key), h = w.uniq(t[c.queryID].map((A) => A[c.columnKey])), p = w.uniq(t[c.queryID].map((A) => A[d.columnKey])), x = t[c.queryID].map((A) => [w.get(A, c.columnKey), w.get(A, d.columnKey), w.get(A, u.columnKey)]), y = Yv(h.length, p.length, s, i);
11497
11501
  return {
11498
11502
  xAxis: Uv(e, h, o.x_axis, y),
11499
11503
  yAxis: Kv(e, p, o.y_axis, y),
@@ -11594,7 +11598,7 @@ function ew({
11594
11598
  variables: a
11595
11599
  }) {
11596
11600
  const o = T(() => {
11597
- const h = $(e.x_axis.data_key), p = $(e.y_axis.data_key);
11601
+ const h = O(e.x_axis.data_key), p = O(e.y_axis.data_key);
11598
11602
  return w.keyBy(t[h.queryID], (x) => `${x[h.columnKey]}---${x[p.columnKey]}`);
11599
11603
  }, [t, e.x_axis.data_key, e.y_axis.data_key]), l = yt(i.triggerManager, Uc.id), c = Be((h) => {
11600
11604
  const [p, x] = h.value, y = w.get(o, `${p}---${x}`, {
@@ -11719,7 +11723,7 @@ const rw = ({
11719
11723
  data_key: "",
11720
11724
  name: ""
11721
11725
  }), c = t("tooltip.metrics.0.id"), [d, u] = q(() => c ?? null);
11722
- return O(() => {
11726
+ return $(() => {
11723
11727
  c && u((h) => h !== null ? h : c);
11724
11728
  }, [c]), /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
11725
11729
  /* @__PURE__ */ r.jsxs(b, { spacing: 2, sx: {
@@ -11785,7 +11789,7 @@ const aw = ({
11785
11789
  setTrue: i,
11786
11790
  setFalse: a
11787
11791
  }] = $e(), [o, l] = q(e);
11788
- O(() => {
11792
+ $(() => {
11789
11793
  l(e);
11790
11794
  }, [e]);
11791
11795
  const c = (x) => {
@@ -11941,7 +11945,7 @@ function uw({
11941
11945
  value: t,
11942
11946
  set: n
11943
11947
  } = Q(e.instanceData, "config"), s = T(() => je({}, t, ra), [t]), i = T(() => w.cloneDeep(s), [s]);
11944
- O(() => {
11948
+ $(() => {
11945
11949
  !fe(s, i) && (console.log("config malformed, resetting to defaults", s, i), n(i));
11946
11950
  }, [s, i]);
11947
11951
  const {
@@ -11953,7 +11957,7 @@ function uw({
11953
11957
  } = ve({
11954
11958
  defaultValues: i
11955
11959
  });
11956
- O(() => {
11960
+ $(() => {
11957
11961
  d(i);
11958
11962
  }, [i]);
11959
11963
  const u = c(), h = T(() => !fe(u, s), [u, s]);
@@ -12267,7 +12271,7 @@ function _w(e, t, n) {
12267
12271
  } = e;
12268
12272
  if (!s.data_key || !i)
12269
12273
  return [];
12270
- const a = $(s.data_key), o = $(i);
12274
+ const a = O(s.data_key), o = O(i);
12271
12275
  if (a.queryID !== o.queryID)
12272
12276
  throw new Error("Please use the same query for X & Y axis");
12273
12277
  const l = t[a.queryID].map((p) => [p[a.columnKey], Number(p[o.columnKey])]).sort((p, x) => x[1] - p[1]), c = l.reduce((p, x) => p + x[1], 0), d = l.reduce((p, x, y) => {
@@ -12643,7 +12647,7 @@ function Pw({
12643
12647
  } = ve({
12644
12648
  defaultValues: s
12645
12649
  });
12646
- O(() => {
12650
+ $(() => {
12647
12651
  c(s);
12648
12652
  }, [s]), o(["x_axis", "data_key", "bar", "line", "dataZoom"]);
12649
12653
  const d = l(), u = T(() => !fe(d, t), [d, t]);
@@ -12871,7 +12875,7 @@ function Yw(e, t, n) {
12871
12875
  } = e;
12872
12876
  if (!s || !i)
12873
12877
  return {};
12874
- const o = $(s), l = $(i), c = $(a), d = t[o.queryID].map((h) => ({
12878
+ const o = O(s), l = O(i), c = O(a), d = t[o.queryID].map((h) => ({
12875
12879
  name: h[o.columnKey],
12876
12880
  value: Number(h[l.columnKey]),
12877
12881
  color: c.columnKey ? h[c.columnKey] : void 0
@@ -13023,7 +13027,7 @@ function n0({
13023
13027
  } = ve({
13024
13028
  defaultValues: i
13025
13029
  });
13026
- O(() => {
13030
+ $(() => {
13027
13031
  d(i);
13028
13032
  }, [i]);
13029
13033
  const u = c(), h = T(() => !w.isEqual(u, s), [u, s]);
@@ -13186,12 +13190,12 @@ function nd(e, t) {
13186
13190
  return t.map(({
13187
13191
  data_key: n
13188
13192
  }) => {
13189
- const s = $(n);
13193
+ const s = O(n);
13190
13194
  return e[s.columnKey];
13191
13195
  });
13192
13196
  }
13193
13197
  function c0(e, t, n) {
13194
- const s = $(t);
13198
+ const s = O(t);
13195
13199
  return e[s.queryID].map((i) => ({
13196
13200
  value: nd(i, n),
13197
13201
  name: i[s.columnKey]
@@ -13227,7 +13231,7 @@ function u0(e, t) {
13227
13231
  dimensions: s
13228
13232
  } = t;
13229
13233
  return n.map((a) => {
13230
- const o = $(a.name_key), l = $(a.color_key);
13234
+ const o = O(a.name_key), l = O(a.color_key);
13231
13235
  return {
13232
13236
  type: "radar",
13233
13237
  colorBy: "data",
@@ -13362,8 +13366,8 @@ function g0({
13362
13366
  const {
13363
13367
  queryID: h,
13364
13368
  columnKey: p
13365
- } = $(e.series_name_key), x = w.keyBy(t[h], p), y = e.additional_series.reduce((S, A) => {
13366
- const F = $(A.name_key), V = w.keyBy(t[F.queryID], F.columnKey);
13369
+ } = O(e.series_name_key), x = w.keyBy(t[h], p), y = e.additional_series.reduce((S, A) => {
13370
+ const F = O(A.name_key), V = w.keyBy(t[F.queryID], F.columnKey);
13367
13371
  return {
13368
13372
  ...S,
13369
13373
  ...V
@@ -13452,7 +13456,7 @@ function j0({
13452
13456
  color_key: ""
13453
13457
  });
13454
13458
  }, c = w.get(o, "0.id", null), [d, u] = q(c);
13455
- O(() => {
13459
+ $(() => {
13456
13460
  u((p) => p || c);
13457
13461
  }, [c]);
13458
13462
  const h = (p) => {
@@ -13550,7 +13554,7 @@ function w0({
13550
13554
  formatter: qe
13551
13555
  });
13552
13556
  }, c = w.get(o, "0.id", null), [d, u] = q(c);
13553
- O(() => {
13557
+ $(() => {
13554
13558
  u((p) => p || c);
13555
13559
  }, [c]);
13556
13560
  const h = (p) => {
@@ -13591,7 +13595,7 @@ function _0({
13591
13595
  defaultValues: s,
13592
13596
  mode: "all"
13593
13597
  });
13594
- O(() => {
13598
+ $(() => {
13595
13599
  c(s);
13596
13600
  }, [s]), o(["series_name_key", "background", "label"]);
13597
13601
  const u = l(), h = T(() => !fe(u, s), [u, s]);
@@ -13817,7 +13821,7 @@ function L0(e, t) {
13817
13821
  }));
13818
13822
  }
13819
13823
  function rd(e, t) {
13820
- const n = $(e.x_axis.data_key), s = $(e.regression.y_axis_data_key);
13824
+ const n = O(e.x_axis.data_key), s = O(e.regression.y_axis_data_key);
13821
13825
  return w.uniqBy(t.map((i) => [i[n.columnKey], i[s.columnKey]]), 0);
13822
13826
  }
13823
13827
  function A0(e, t) {
@@ -13846,7 +13850,7 @@ function R0(e, t) {
13846
13850
  plot: n,
13847
13851
  transform: s,
13848
13852
  group_by_key: i
13849
- } = e.regression, a = $(i), o = w.groupBy(t, a.columnKey);
13853
+ } = e.regression, a = O(i), o = w.groupBy(t, a.columnKey);
13850
13854
  return Object.entries(o).map(([l, c]) => {
13851
13855
  const d = rd(e, c);
13852
13856
  return {
@@ -14110,7 +14114,7 @@ function Lo(e, t, n) {
14110
14114
  const {
14111
14115
  regression: s,
14112
14116
  x_axis: i
14113
- } = n, a = $(i.data_key), o = $(s.y_axis_data_key), l = t.map((c) => [c[a.columnKey], c[o.columnKey]]);
14117
+ } = n, a = O(i.data_key), o = O(s.y_axis_data_key), l = t.map((c) => [c[a.columnKey], c[o.columnKey]]);
14114
14118
  return s.transform.config.method === "linear" ? N0(e, t, l, n) : s.transform.config.method === "exponential" ? q0(e, t, l, n) : s.transform.config.method === "logarithmic" ? B0(e, t, l, n) : s.transform.config.method === "polynomial" ? W0(e, t, l, n) : {
14115
14119
  name: e,
14116
14120
  expression: "",
@@ -14128,7 +14132,7 @@ function G0(e, t) {
14128
14132
  }];
14129
14133
  if (!t.regression.group_by_key)
14130
14134
  return [Lo("", e, t)];
14131
- const n = $(t.regression.group_by_key), s = w.groupBy(e, n.columnKey);
14135
+ const n = O(t.regression.group_by_key), s = w.groupBy(e, n.columnKey);
14132
14136
  return Object.entries(s).map(([i, a]) => Lo(i, a, t));
14133
14137
  }
14134
14138
  const Q0 = {
@@ -14259,7 +14263,7 @@ function Y0({
14259
14263
  const c = e.data, d = t == null ? void 0 : t.x_axis.data_key, u = (x = t == null ? void 0 : t.regression) == null ? void 0 : x.y_axis_data_key;
14260
14264
  if (!d || !u)
14261
14265
  return [];
14262
- const h = $(d), p = $(u);
14266
+ const h = O(d), p = O(u);
14263
14267
  return c[h.queryID].map((y) => typeof y[p.columnKey] == "number" ? y : {
14264
14268
  ...y,
14265
14269
  [p.columnKey]: Number(y[p.columnKey])
@@ -14364,7 +14368,7 @@ const Z0 = ({
14364
14368
  setTrue: a,
14365
14369
  setFalse: o
14366
14370
  }] = $e(), [l, c] = q(e);
14367
- O(() => {
14371
+ $(() => {
14368
14372
  c(e);
14369
14373
  }, [e]);
14370
14374
  const d = (y) => {
@@ -14487,7 +14491,7 @@ function n_({
14487
14491
  } = ve({
14488
14492
  defaultValues: s
14489
14493
  });
14490
- O(() => {
14494
+ $(() => {
14491
14495
  c(s);
14492
14496
  }, [s]), o(["x_axis", "y_axis", "regression"]);
14493
14497
  const d = l(), u = T(() => !fe(d, t), [d, t]);
@@ -14702,7 +14706,7 @@ const oa = he(({
14702
14706
  l(p.getHTML());
14703
14707
  }
14704
14708
  });
14705
- O(() => {
14709
+ $(() => {
14706
14710
  l(e), c == null || c.commands.setContent(e);
14707
14711
  }, [e]);
14708
14712
  const d = () => {
@@ -14776,7 +14780,7 @@ function p_({
14776
14780
  } = ve({
14777
14781
  defaultValues: s
14778
14782
  });
14779
- o("content"), O(() => {
14783
+ o("content"), $(() => {
14780
14784
  l(s);
14781
14785
  }, [s]);
14782
14786
  const c = ns(null), d = () => {
@@ -14949,7 +14953,7 @@ const la = {
14949
14953
  function b_(e, t) {
14950
14954
  if (!e.x_axis.data_key)
14951
14955
  return [];
14952
- const n = $(e.x_axis.data_key);
14956
+ const n = O(e.x_axis.data_key);
14953
14957
  return [{
14954
14958
  source: t[n.queryID]
14955
14959
  }];
@@ -15095,7 +15099,7 @@ function C_({
15095
15099
  x_axis: e,
15096
15100
  scatter: t
15097
15101
  }, n) {
15098
- const s = $(e.data_key), i = $(t.y_data_key), a = $(t.name_data_key);
15102
+ const s = O(e.data_key), i = O(t.y_data_key), a = O(t.name_data_key);
15099
15103
  return {
15100
15104
  label: {
15101
15105
  show: !!t.label_position,
@@ -16050,7 +16054,7 @@ const iS = ({
16050
16054
  data_key: "",
16051
16055
  name: ""
16052
16056
  }), c = t("tooltip.metrics.0.id"), [d, u] = q(() => c ?? null);
16053
- return O(() => {
16057
+ return $(() => {
16054
16058
  c && u((h) => h !== null ? h : c);
16055
16059
  }, [c]), /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
16056
16060
  /* @__PURE__ */ r.jsxs(b, { spacing: 2, sx: {
@@ -16132,7 +16136,7 @@ const cS = ({
16132
16136
  setTrue: i,
16133
16137
  setFalse: a
16134
16138
  }] = $e(), [o, l] = q(e);
16135
- O(() => {
16139
+ $(() => {
16136
16140
  l(e);
16137
16141
  }, [e]);
16138
16142
  const c = (x) => {
@@ -16355,7 +16359,7 @@ function bS({
16355
16359
  } = Q(e.instanceData, "config"), {
16356
16360
  variables: s
16357
16361
  } = e, i = T(() => je({}, t, la), [t]), a = T(() => gS(i), [i]);
16358
- O(() => {
16362
+ $(() => {
16359
16363
  !fe(i, a) && (console.log("config malformed, resetting to defaults", i, a), n(a));
16360
16364
  }, [i, a]);
16361
16365
  const {
@@ -16367,7 +16371,7 @@ function bS({
16367
16371
  } = ve({
16368
16372
  defaultValues: a
16369
16373
  });
16370
- O(() => {
16374
+ $(() => {
16371
16375
  u(a);
16372
16376
  }, [a]);
16373
16377
  const h = d(), p = T(() => !fe(h, i), [h, i]);
@@ -16873,7 +16877,7 @@ function qS(e, t) {
16873
16877
  } = e;
16874
16878
  if (!n || !s)
16875
16879
  return [];
16876
- const a = $(n), o = $(s), l = $(i), c = t[a.queryID].map((d) => ({
16880
+ const a = O(n), o = O(s), l = O(i), c = t[a.queryID].map((d) => ({
16877
16881
  ...d,
16878
16882
  id: d[a.columnKey],
16879
16883
  parent_id: d[l.columnKey],
@@ -17124,7 +17128,7 @@ const XS = [{
17124
17128
  padding: 0
17125
17129
  }
17126
17130
  }), c = t("levels.0.id"), [d, u] = q(() => c ?? null);
17127
- return O(() => {
17131
+ return $(() => {
17128
17132
  c && u((h) => h !== null ? h : c);
17129
17133
  }, [c]), /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
17130
17134
  /* @__PURE__ */ r.jsxs(b, { spacing: 2, sx: {
@@ -17168,7 +17172,7 @@ function tC({
17168
17172
  } = ve({
17169
17173
  defaultValues: i
17170
17174
  });
17171
- O(() => {
17175
+ $(() => {
17172
17176
  d(i);
17173
17177
  }, [i]);
17174
17178
  const u = c(), h = T(() => !w.isEqual(u, s), [u, s]);
@@ -17757,7 +17761,7 @@ function zC({
17757
17761
  } = s, d = T(() => {
17758
17762
  if (!o)
17759
17763
  return [];
17760
- const u = $(o);
17764
+ const u = O(o);
17761
17765
  return e[u.queryID];
17762
17766
  }, [e, o]);
17763
17767
  return !Array.isArray(d) || d.length === 0 ? /* @__PURE__ */ r.jsx(j, { color: "gray", align: "center", children: "Empty Data" }) : /* @__PURE__ */ r.jsx(IC, { queryData: d, width: t, height: n, conf: s, context: i, instance: a });
@@ -17893,7 +17897,7 @@ const EC = k(({
17893
17897
  return /* @__PURE__ */ r.jsx("div", { className: t.palette, children: n.map(([s, i], a) => /* @__PURE__ */ r.jsx(RC, { index: a, color: s, value: e.getStepFromValue(i), onChange: (o) => e.changeStep(o, i) }, s)) });
17894
17898
  }), FC = k(function(t) {
17895
17899
  const n = kt(() => new AC(), []);
17896
- return O(() => {
17900
+ return $(() => {
17897
17901
  n.fromProps(t);
17898
17902
  }), n.interpolation == null ? null : /* @__PURE__ */ r.jsx(EC, { model: n });
17899
17903
  }), OC = (e) => {
@@ -18003,7 +18007,7 @@ const qC = he((e, t) => {
18003
18007
  }, u = () => {
18004
18008
  l(ud);
18005
18009
  };
18006
- return O(() => {
18010
+ return $(() => {
18007
18011
  l(e);
18008
18012
  }, [e]), /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
18009
18013
  /* @__PURE__ */ r.jsx(C, { variant: "filled", mt: 24, onClick: i, sx: {
@@ -18199,7 +18203,7 @@ function JC({
18199
18203
  value: t,
18200
18204
  set: n
18201
18205
  } = Q(e.instanceData, "config"), s = T(() => je({}, t, hd), [t]), i = T(() => XC(s), [s]);
18202
- O(() => {
18206
+ $(() => {
18203
18207
  !fe(s, i) && (console.log("config malformed, resetting to defaults", s, i), n(i));
18204
18208
  }, [s, i]);
18205
18209
  const {
@@ -18211,7 +18215,7 @@ function JC({
18211
18215
  } = ve({
18212
18216
  defaultValues: i
18213
18217
  });
18214
- O(() => {
18218
+ $(() => {
18215
18219
  d(i);
18216
18220
  }, [i]);
18217
18221
  const u = c(), h = T(() => !fe(u, s), [u, s]);
@@ -18446,7 +18450,7 @@ const bd = M.forwardRef(s1), i1 = ({
18446
18450
  }, u = () => {
18447
18451
  l(gd);
18448
18452
  };
18449
- return O(() => {
18453
+ return $(() => {
18450
18454
  l(e);
18451
18455
  }, [e]), /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
18452
18456
  /* @__PURE__ */ r.jsx(C, { variant: "filled", mt: 24, onClick: i, sx: {
@@ -18493,7 +18497,7 @@ function l1({
18493
18497
  font_weight: S
18494
18498
  };
18495
18499
  }, [s]);
18496
- O(() => {
18500
+ $(() => {
18497
18501
  !fe(s, i) && (console.log("config malformed, resetting to defaults", s, i), n(i));
18498
18502
  }, [s, i]);
18499
18503
  const {
@@ -18697,7 +18701,7 @@ function f1({
18697
18701
  } = ve({
18698
18702
  defaultValues: s
18699
18703
  });
18700
- O(() => {
18704
+ $(() => {
18701
18705
  c(s);
18702
18706
  }, [s]), o(["expertSystemURL", "goal", "path", "question"]);
18703
18707
  const d = l(), u = T(() => !fe(d, s), [d, s]);
@@ -18813,7 +18817,7 @@ function _1(e, t, n, s) {
18813
18817
  const {
18814
18818
  calendar: i,
18815
18819
  heat_block: a
18816
- } = e, o = $(i.data_key), l = $(a.data_key);
18820
+ } = e, o = O(i.data_key), l = O(a.data_key);
18817
18821
  return t ? {
18818
18822
  type: "heatmap",
18819
18823
  name: "heatmap",
@@ -18851,7 +18855,7 @@ function C1({
18851
18855
  }
18852
18856
  }], d = n[a];
18853
18857
  return d && e.tooltip.metrics.forEach((u) => {
18854
- const h = $(u.data_key);
18858
+ const h = O(u.data_key);
18855
18859
  c.push({
18856
18860
  label: u.name,
18857
18861
  value: S1(w.get(d, h.columnKey, "")),
@@ -18863,7 +18867,7 @@ function C1({
18863
18867
  }), c;
18864
18868
  }
18865
18869
  function k1(e, t, n) {
18866
- const s = $(e.calendar.data_key), i = w.keyBy(t[s.queryID], s.columnKey);
18870
+ const s = O(e.calendar.data_key), i = w.keyBy(t[s.queryID], s.columnKey);
18867
18871
  return oe.getTooltip({
18868
18872
  formatter: function(a) {
18869
18873
  const l = C1({
@@ -18920,7 +18924,7 @@ const D1 = {
18920
18924
  }
18921
18925
  }, I1 = (e) => E(e).get("year");
18922
18926
  function z1(e, t) {
18923
- const n = $(e.calendar.data_key), s = t[n.queryID], i = w.groupBy(s, (d) => I1(d[n.columnKey])), a = Object.keys(i), o = s.map((d) => E(d[n.columnKey]).valueOf()), l = w.min(o), c = w.max(o);
18927
+ const n = O(e.calendar.data_key), s = t[n.queryID], i = w.groupBy(s, (d) => I1(d[n.columnKey])), a = Object.keys(i), o = s.map((d) => E(d[n.columnKey]).valueOf()), l = w.min(o), c = w.max(o);
18924
18928
  return {
18925
18929
  minDate: l ?? 0,
18926
18930
  maxDate: c ?? 0,
@@ -19132,7 +19136,7 @@ const $1 = ({
19132
19136
  data_key: "",
19133
19137
  name: ""
19134
19138
  }), c = t("tooltip.metrics.0.id"), [d, u] = q(() => c ?? null);
19135
- return O(() => {
19139
+ return $(() => {
19136
19140
  c && u((h) => h !== null ? h : c);
19137
19141
  }, [c]), /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
19138
19142
  /* @__PURE__ */ r.jsxs(b, { spacing: 2, sx: {
@@ -19205,7 +19209,7 @@ function B1({
19205
19209
  value: t,
19206
19210
  set: n
19207
19211
  } = Q(e.instanceData, "config"), s = T(() => je({}, t, xa), [t]), i = T(() => w.cloneDeep(s), [s]);
19208
- O(() => {
19212
+ $(() => {
19209
19213
  !fe(s, i) && (console.log("config malformed, resetting to defaults", s, i), n(i));
19210
19214
  }, [s, i]);
19211
19215
  const {
@@ -19217,7 +19221,7 @@ function B1({
19217
19221
  } = ve({
19218
19222
  defaultValues: i
19219
19223
  });
19220
- O(() => {
19224
+ $(() => {
19221
19225
  d(i);
19222
19226
  }, [i]);
19223
19227
  const u = c(), h = T(() => !fe(u, s), [u, s]);
@@ -19532,7 +19536,7 @@ function sk({
19532
19536
  const {
19533
19537
  queryID: i,
19534
19538
  columnKey: a
19535
- } = $(e), o = w.groupBy(t[i], a);
19539
+ } = O(e), o = w.groupBy(t[i], a);
19536
19540
  return Object.entries(o).forEach(([l, c]) => {
19537
19541
  o[l] = ks({
19538
19542
  [i]: c
@@ -19730,7 +19734,7 @@ function hk(e, t) {
19730
19734
  function pk(e, t, n) {
19731
19735
  if (!e.y_axis.data_key)
19732
19736
  return {};
19733
- const s = dk(t, n), i = ck(e), a = $(e.y_axis.data_key), o = w.uniq(t[a.queryID].map((u) => u[a.columnKey])), l = o.every((u) => !Number.isNaN(Number(u))), c = ak(e, o, l, t, i, n, s);
19737
+ const s = dk(t, n), i = ck(e), a = O(e.y_axis.data_key), o = w.uniq(t[a.queryID].map((u) => u[a.columnKey])), l = o.every((u) => !Number.isNaN(Number(u))), c = ak(e, o, l, t, i, n, s);
19734
19738
  return {
19735
19739
  xAxis: uk(e, i),
19736
19740
  yAxis: hk(e, o),
@@ -19945,7 +19949,7 @@ function yk({
19945
19949
  }
19946
19950
  function jk(e) {
19947
19951
  const [t, n] = q(e);
19948
- return O(() => {
19952
+ return $(() => {
19949
19953
  n(e);
19950
19954
  }, [e]), {
19951
19955
  tab: t,
@@ -20294,7 +20298,7 @@ function zk({
20294
20298
  } = ve({
20295
20299
  defaultValues: i
20296
20300
  });
20297
- O(() => {
20301
+ $(() => {
20298
20302
  d(i);
20299
20303
  }, [i]), l([]);
20300
20304
  const u = c(), h = T(() => !w.isEqual(u, i), [u, i]);
@@ -20710,7 +20714,7 @@ function Pk(e, t, n, s) {
20710
20714
  }));
20711
20715
  }
20712
20716
  function Vk(e, t, n, s) {
20713
- const i = $(t.data_key), a = t.name, o = n.map((l) => {
20717
+ const i = O(t.data_key), a = t.name, o = n.map((l) => {
20714
20718
  const c = w.sumBy(s[l], i.columnKey);
20715
20719
  return [l, c];
20716
20720
  });
@@ -20915,7 +20919,7 @@ function Gk(e, t) {
20915
20919
  const {
20916
20920
  x_axis: n,
20917
20921
  deviation: s
20918
- } = e, i = $(n.data_key), a = $(s.data_keys.estimated_value), o = $(s.data_keys.actual_value);
20922
+ } = e, i = O(n.data_key), a = O(s.data_keys.estimated_value), o = O(s.data_keys.actual_value);
20919
20923
  return t[i.queryID].map((l) => {
20920
20924
  const c = Vo(l[a.columnKey]), d = Vo(l[o.columnKey]), u = c - d;
20921
20925
  return {
@@ -20971,7 +20975,7 @@ function Kk(e, t) {
20971
20975
  };
20972
20976
  }
20973
20977
  function Yk(e, t, n) {
20974
- const s = Gk(e, n), i = $(e.x_axis.data_key), a = w.uniqBy(n[i.queryID], i.columnKey).map((u) => u[i.columnKey]), o = w.groupBy(s, i.columnKey), l = Kk(e, t), c = Nk(e, l, a, o), d = {
20978
+ const s = Gk(e, n), i = O(e.x_axis.data_key), a = w.uniqBy(n[i.queryID], i.columnKey).map((u) => u[i.columnKey]), o = w.groupBy(s, i.columnKey), l = Kk(e, t), c = Nk(e, l, a, o), d = {
20975
20979
  xAxis: qk(e, a),
20976
20980
  yAxis: Bk(l),
20977
20981
  series: c,
@@ -21077,7 +21081,7 @@ function rT({
21077
21081
  estimated_value: c,
21078
21082
  actual_value: d
21079
21083
  } = l.data_keys, [u, h] = q(d);
21080
- if (O(() => {
21084
+ if ($(() => {
21081
21085
  h((y) => y || d);
21082
21086
  }, [d]), !o.data_key || !c || !d || !i || !a)
21083
21087
  return null;
@@ -21156,7 +21160,7 @@ const iT = ({
21156
21160
  data_key: "",
21157
21161
  name: ""
21158
21162
  }), c = t("metrics.0.id"), [d, u] = q(() => c ?? null);
21159
- return O(() => {
21163
+ return $(() => {
21160
21164
  c && u((h) => h !== null ? h : c);
21161
21165
  }, [c]), /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
21162
21166
  /* @__PURE__ */ r.jsxs(b, { spacing: 2, sx: {
@@ -21239,7 +21243,7 @@ function lT({
21239
21243
  } = ve({
21240
21244
  defaultValues: s
21241
21245
  });
21242
- O(() => {
21246
+ $(() => {
21243
21247
  c(s);
21244
21248
  }, [s]), o([]);
21245
21249
  const d = l(), u = T(() => !w.isEqual(d, s), [d, s]);
@@ -21532,7 +21536,7 @@ const bT = ({
21532
21536
  label: y.name,
21533
21537
  value: y.name
21534
21538
  })), [n]), u = w.get(l, "0.id", null), [h, p] = q(u);
21535
- O(() => {
21539
+ $(() => {
21536
21540
  p((y) => y || u);
21537
21541
  }, [u]);
21538
21542
  const x = (y) => {
@@ -21640,7 +21644,7 @@ function wT({
21640
21644
  } = ve({
21641
21645
  defaultValues: i
21642
21646
  });
21643
- O(() => {
21647
+ $(() => {
21644
21648
  d(i);
21645
21649
  }, [i]);
21646
21650
  const u = c(), h = T(() => !fe(u, i), [u, i]);
@@ -21789,7 +21793,7 @@ const TT = ({
21789
21793
  data_key: "",
21790
21794
  name: ""
21791
21795
  }), c = t("tooltip.metrics.0.id"), [d, u] = q(() => c ?? null);
21792
- return O(() => {
21796
+ return $(() => {
21793
21797
  c && u((h) => h !== null ? h : c);
21794
21798
  }, [c]), /* @__PURE__ */ r.jsxs(r.Fragment, { children: [
21795
21799
  /* @__PURE__ */ r.jsxs(b, { spacing: 2, sx: {
@@ -21855,7 +21859,7 @@ const zT = ({
21855
21859
  setTrue: i,
21856
21860
  setFalse: a
21857
21861
  }] = $e(), [o, l] = q(e);
21858
- O(() => {
21862
+ $(() => {
21859
21863
  l(e);
21860
21864
  }, [e]);
21861
21865
  const c = (x) => {
@@ -22056,7 +22060,7 @@ function ET({
22056
22060
  value: t,
22057
22061
  set: n
22058
22062
  } = Q(e.instanceData, "config"), s = T(() => je({}, t, ba), [t]), i = T(() => w.cloneDeep(s), [s]);
22059
- O(() => {
22063
+ $(() => {
22060
22064
  !fe(s, i) && (console.log("config malformed, resetting to defaults", s, i), n(i));
22061
22065
  }, [s, i]);
22062
22066
  const {
@@ -22068,7 +22072,7 @@ function ET({
22068
22072
  } = ve({
22069
22073
  defaultValues: i
22070
22074
  });
22071
- O(() => {
22075
+ $(() => {
22072
22076
  d(i);
22073
22077
  }, [i]);
22074
22078
  const u = c(), h = T(() => !fe(u, s), [u, s]);
@@ -22200,7 +22204,7 @@ function NT(e, t) {
22200
22204
  x_axis: n,
22201
22205
  y_axis: s,
22202
22206
  heat_block: i
22203
- } = e, a = $(n.data_key), o = $(s.data_key), l = $(i.data_key), c = t[a.queryID].map((d) => [w.get(d, a.columnKey), w.get(d, o.columnKey), w.get(d, l.columnKey)]);
22207
+ } = e, a = O(n.data_key), o = O(s.data_key), l = O(i.data_key), c = t[a.queryID].map((d) => [w.get(d, a.columnKey), w.get(d, o.columnKey), w.get(d, l.columnKey)]);
22204
22208
  return {
22205
22209
  type: "heatmap",
22206
22210
  name: i.name,
@@ -22257,7 +22261,7 @@ function BT({
22257
22261
  }
22258
22262
  }, x = [u, h, p], y = s[`${l}---${c}`];
22259
22263
  return y && e.tooltip.metrics.forEach((S) => {
22260
- const A = $(S.data_key);
22264
+ const A = O(S.data_key);
22261
22265
  x.push({
22262
22266
  label: S.name,
22263
22267
  value: qT(w.get(y, A.columnKey, "")),
@@ -22273,8 +22277,8 @@ function WT(e, t, n, s) {
22273
22277
  x_axis: i,
22274
22278
  y_axis: a,
22275
22279
  heat_block: o
22276
- } = e, l = $(i.data_key), c = $(a.data_key);
22277
- $(o.data_key);
22280
+ } = e, l = O(i.data_key), c = O(a.data_key);
22281
+ O(o.data_key);
22278
22282
  const d = w.keyBy(t[l.queryID], (u) => `${u[l.columnKey]}---${u[c.columnKey]}`);
22279
22283
  return oe.getTooltip({
22280
22284
  formatter: function(u) {
@@ -22323,7 +22327,7 @@ function GT(e, t) {
22323
22327
  };
22324
22328
  }
22325
22329
  function QT(e, t, n) {
22326
- const s = $(e.x_axis.data_key), i = w.uniq(t[s.queryID].map((c) => c[s.columnKey])), {
22330
+ const s = O(e.x_axis.data_key), i = w.uniq(t[s.queryID].map((c) => c[s.columnKey])), {
22327
22331
  overflow: a,
22328
22332
  rotate: o
22329
22333
  } = e.x_axis.axisLabel, l = bt(a.on_axis);
@@ -22361,7 +22365,7 @@ function QT(e, t, n) {
22361
22365
  });
22362
22366
  }
22363
22367
  function HT(e, t, n) {
22364
- const s = $(e.x_axis.data_key), i = $(e.y_axis.data_key), {
22368
+ const s = O(e.x_axis.data_key), i = O(e.y_axis.data_key), {
22365
22369
  nameAlignment: a,
22366
22370
  data_key: o,
22367
22371
  ...l
@@ -22432,7 +22436,7 @@ function KT({
22432
22436
  variables: a
22433
22437
  }) {
22434
22438
  const o = T(() => {
22435
- const h = $(e.x_axis.data_key), p = $(e.y_axis.data_key);
22439
+ const h = O(e.x_axis.data_key), p = O(e.y_axis.data_key);
22436
22440
  return w.keyBy(t[h.queryID], (x) => `${x[h.columnKey]}---${x[p.columnKey]}`);
22437
22441
  }, [t, e.x_axis.data_key, e.y_axis.data_key]), l = yt(i.triggerManager, wd.id), c = Be((h) => {
22438
22442
  const [p, x] = h.value, y = w.get(o, `${p}---${x}`, {
@@ -23545,21 +23549,16 @@ const xD = ({
23545
23549
  treeData: i,
23546
23550
  treeDataLoading: a,
23547
23551
  errorMessage: o
23548
- } = t, [l, c] = q(t.defaultSelectionOptions), d = (x) => {
23549
- c(x);
23550
- const y = x.map((S) => S.value);
23551
- s(y, !1);
23552
- };
23553
- O(() => {
23554
- c(t.defaultSelectionOptions);
23555
- }, [t.defaultSelectionOptions]);
23556
- const u = t.min_width ? t.min_width : "200px", p = !!t.options_query_id ? a : !1;
23557
- return /* @__PURE__ */ r.jsx(yD, { disabled: p, style: {
23552
+ } = t, l = (p) => {
23553
+ const x = p.map((y) => y.value);
23554
+ s(x, !1);
23555
+ }, c = T(() => t.initialSelection(n), [n, t.plainData, t.defaultSelection, t.initialSelection]), d = t.min_width ? t.min_width : "200px", h = !!t.options_query_id ? a : !1;
23556
+ return /* @__PURE__ */ r.jsx(yD, { disabled: h, style: {
23558
23557
  minWidth: "160px",
23559
- width: u,
23560
- maxWidth: p ? u : "unset",
23558
+ width: d,
23559
+ maxWidth: h ? d : "unset",
23561
23560
  borderColor: "#e9ecef"
23562
- }, value: l, onChange: d, treeData: i, errorMessage: o, label: e, required: t.required, treeCheckStrictly: t.treeCheckStrictly });
23561
+ }, value: [...c], onChange: l, treeData: i, errorMessage: o, label: e, required: t.required, treeCheckStrictly: t.treeCheckStrictly });
23563
23562
  }), vD = k(({
23564
23563
  filter: {
23565
23564
  type: e,
@@ -23602,7 +23601,7 @@ const xD = ({
23602
23601
  };
23603
23602
  function SD(e) {
23604
23603
  const t = ce();
23605
- O(() => {
23604
+ $(() => {
23606
23605
  var n, s;
23607
23606
  (s = (n = t.filters).updatePreviewValues) == null || s.call(n, e);
23608
23607
  }, [e]);
@@ -23626,7 +23625,7 @@ const CD = ({
23626
23625
  }), c = Eh({
23627
23626
  control: a
23628
23627
  });
23629
- O(() => {
23628
+ $(() => {
23630
23629
  l(i.filters.values);
23631
23630
  }, [i.filters.values, l]), SD(c);
23632
23631
  const d = i.filters.visibleInView(t.id), u = T(() => d.every((y) => y.should_auto_submit), [d]), h = T(() => d.filter((y) => w.get(y, "config.required", !1)), [d]), p = T(() => h.length === 0 ? !1 : h.some((y) => !y.requiredAndPass(c[y.key])), [c, h]);
@@ -24439,8 +24438,8 @@ const $d = m.compose("FilterTreeSelectConfigMeta", m.model({
24439
24438
  const n = new Set(t);
24440
24439
  return this.plainData.filter((s) => n.has(s.value));
24441
24440
  },
24442
- get defaultSelectionOptions() {
24443
- return this.valueObjects(this.defaultSelection);
24441
+ initialSelection(t) {
24442
+ return !t || t.length === 0 ? this.valueObjects(this.defaultSelection) : this.valueObjects(t);
24444
24443
  },
24445
24444
  truthy(t) {
24446
24445
  return Array.isArray(t) && t.length > 0;
@@ -25933,7 +25932,7 @@ function lu(e) {
25933
25932
  }
25934
25933
  function cu(e, t) {
25935
25934
  const n = Sd().getRequired(ze.instanceScope.vizInstance);
25936
- return O(() => (n.instanceData.setItem(null, t.viz.conf), n.instanceData.watchItem(null, (s) => {
25935
+ return $(() => (n.instanceData.setItem(null, t.viz.conf), n.instanceData.watchItem(null, (s) => {
25937
25936
  e(s);
25938
25937
  })), [e, t.viz.type]), n;
25939
25938
  }
@@ -27189,7 +27188,7 @@ const lz = m.model("EditorModel", {
27189
27188
  dataFieldOptions(t, n) {
27190
27189
  const s = [...this.realDataFieldOptions];
27191
27190
  if (t && !s.find((i) => i.value === t)) {
27192
- const i = $(t), a = e.queryByID(i.queryID);
27191
+ const i = O(t), a = e.queryByID(i.queryID);
27193
27192
  s.unshift({
27194
27193
  label: i.columnKey,
27195
27194
  value: t,
@@ -27208,7 +27207,7 @@ const lz = m.model("EditorModel", {
27208
27207
  const {
27209
27208
  queryID: n,
27210
27209
  columnKey: s
27211
- } = $(t), i = e.queries.find((a) => a.id === n);
27210
+ } = O(t), i = e.queries.find((a) => a.id === n);
27212
27211
  return i ? {
27213
27212
  queryID: n,
27214
27213
  queryName: i.name,
@@ -27820,7 +27819,7 @@ function fz({
27820
27819
  });
27821
27820
  }
27822
27821
  function gu(e, t) {
27823
- O(() => {
27822
+ $(() => {
27824
27823
  const n = (s) => {
27825
27824
  console.log(s);
27826
27825
  const {
@@ -27835,7 +27834,7 @@ function gu(e, t) {
27835
27834
  return window.addEventListener("open-view", n), () => {
27836
27835
  window.removeEventListener("open-view", n);
27837
27836
  };
27838
- }, [e, t]), O(() => {
27837
+ }, [e, t]), $(() => {
27839
27838
  const n = (s) => {
27840
27839
  console.log(s);
27841
27840
  const {
@@ -27853,7 +27852,7 @@ function gu(e, t) {
27853
27852
  return window.addEventListener("set-filter-values", n), () => {
27854
27853
  window.removeEventListener("set-filter-values", n);
27855
27854
  };
27856
- }, [e]), O(() => {
27855
+ }, [e]), $(() => {
27857
27856
  function n(i) {
27858
27857
  return Array.isArray(i) ? [] : typeof i == "object" ? {} : typeof i == "boolean" ? !1 : typeof i == "string" ? "" : typeof i == "number" ? 0 : i;
27859
27858
  }
@@ -27870,7 +27869,7 @@ function gu(e, t) {
27870
27869
  return window.addEventListener("clear-filter-values", s), () => {
27871
27870
  window.removeEventListener("clear-filter-values", s);
27872
27871
  };
27873
- }, [e]), O(() => {
27872
+ }, [e]), $(() => {
27874
27873
  const n = (s) => {
27875
27874
  console.log(s);
27876
27875
  const {
@@ -28304,7 +28303,7 @@ const $z = k(({
28304
28303
  });
28305
28304
  }
28306
28305
  }, [h, p] = q(null);
28307
- O(() => {
28306
+ $(() => {
28308
28307
  if (!h)
28309
28308
  return;
28310
28309
  const V = new FileReader();
@@ -28326,7 +28325,7 @@ const $z = k(({
28326
28325
  };
28327
28326
  }, [h]);
28328
28327
  const [x] = l(["content"]), y = !x, S = (A = a == null ? void 0 : a.content) == null ? void 0 : A.message;
28329
- return O(() => {
28328
+ return $(() => {
28330
28329
  !x || S ? n() : t();
28331
28330
  }, [x, S]), /* @__PURE__ */ r.jsx(z, { mx: "auto", sx: {
28332
28331
  position: "relative"
@@ -29506,7 +29505,7 @@ const mM = k(() => {
29506
29505
  } = e, [n, s] = gl(t), i = t !== n, a = M.useCallback(() => {
29507
29506
  i && e.setName(n);
29508
29507
  }, [i, n]);
29509
- O(() => {
29508
+ $(() => {
29510
29509
  s(t);
29511
29510
  }, [t]);
29512
29511
  const o = !n.trim();
@@ -29709,7 +29708,7 @@ const qM = [{
29709
29708
  }, [e, s]), c = () => {
29710
29709
  s.queries.downloadDataByQueryID(e);
29711
29710
  };
29712
- O(() => {
29711
+ $(() => {
29713
29712
  n && l();
29714
29713
  }, [l, n]);
29715
29714
  const d = !Array.isArray(i) || i.length === 0;
@@ -30075,7 +30074,7 @@ const lL = k(({
30075
30074
  submit: t
30076
30075
  }) => {
30077
30076
  const [n, s] = gl(e);
30078
- O(() => {
30077
+ $(() => {
30079
30078
  s(e);
30080
30079
  }, [e]);
30081
30080
  const i = oL(), a = e !== n;
@@ -30162,7 +30161,7 @@ const uL = k(() => {
30162
30161
  sourceViewID: t
30163
30162
  }) => {
30164
30163
  const n = ce(), [s, i] = q(t);
30165
- O(() => {
30164
+ $(() => {
30166
30165
  i(t);
30167
30166
  }, [t]);
30168
30167
  const [a, {
@@ -30236,7 +30235,7 @@ const mL = k(({
30236
30235
  panel: e
30237
30236
  }) => {
30238
30237
  const t = Et(), n = le(), s = ce(), [i, a] = q("Data"), o = e.queries, c = xL(e.viz.type) && e.dataLoading, d = c || e.queryErrors.length > 0 || e.queryStateMessages !== "" || o.length === 0, u = n.editor.path[1];
30239
- O(() => {
30238
+ $(() => {
30240
30239
  a((x) => d && x === "Visualization" ? "Data" : x);
30241
30240
  }, [e.id, d]);
30242
30241
  const h = () => {
@@ -30753,7 +30752,7 @@ const TL = k(({
30753
30752
  }
30754
30753
  }, RL = k(({
30755
30754
  dataSource: e
30756
- }) => (O(() => {
30755
+ }) => ($(() => {
30757
30756
  e.loadTablesIfEmpty();
30758
30757
  }, [e]), e.tables.error ? /* @__PURE__ */ r.jsx(j, { color: "red", size: "md", align: "center", sx: {
30759
30758
  fontFamily: "monospace"
@@ -30905,7 +30904,7 @@ const TL = k(({
30905
30904
  queryModel: e
30906
30905
  }) => {
30907
30906
  const [t, n] = q(e.name);
30908
- return O(() => {
30907
+ return $(() => {
30909
30908
  n(e.name);
30910
30909
  }, [e.name]), /* @__PURE__ */ r.jsx(Sn, { ml: 20, mt: 20, sx: {
30911
30910
  maxWidth: "600px"
@@ -31132,7 +31131,7 @@ WHERE
31132
31131
  }, a = () => {
31133
31132
  n(GL);
31134
31133
  };
31135
- O(() => {
31134
+ $(() => {
31136
31135
  n(e.sql);
31137
31136
  }, [e.sql]);
31138
31137
  const o = t !== e.sql;
@@ -31228,7 +31227,7 @@ WHERE
31228
31227
  queryModel: e
31229
31228
  }) => {
31230
31229
  const t = ce(), n = T(() => e.datasource ? e.typedAsHTTP ? "HTTP" : "SQL" : "Configurations", [e.datasource, e.typedAsHTTP]), [s, i] = q(n);
31231
- O(() => {
31230
+ $(() => {
31232
31231
  i((l) => l !== "Configurations" && n === "Configurations" ? "Configurations" : l);
31233
31232
  }, [n]);
31234
31233
  const a = t.findQueryUsage(e.id), o = a.length === 0;
@@ -31282,7 +31281,7 @@ WHERE
31282
31281
  }, c = a !== e.key, d = e.isADuplicatedKey(a), [u, h] = q(e.value), p = () => {
31283
31282
  e.setValue(u);
31284
31283
  };
31285
- O(() => {
31284
+ $(() => {
31286
31285
  o(e.key), h(e.value);
31287
31286
  }, [e]);
31288
31287
  const x = u !== e.value, y = Et(), S = () => {
@@ -31660,7 +31659,7 @@ const mA = k(() => /* @__PURE__ */ r.jsx(_, { sx: {
31660
31659
  }) => {
31661
31660
  var d;
31662
31661
  const t = le().editor, n = t.isOptionActive, s = n(t.path, e), i = t.isOptionOpened, a = t.navigate, o = i(e), [l, c] = q(o);
31663
- return O(() => {
31662
+ return $(() => {
31664
31663
  c(o);
31665
31664
  }, [o]), /* @__PURE__ */ r.jsx(ri, { active: s, defaultOpened: o, opened: l, onChange: c, label: e.label, onClick: () => a(e), icon: e.Icon ? /* @__PURE__ */ r.jsx(e.Icon, { size: 18 }) : null, children: (d = e.children) == null ? void 0 : d.map((u) => u._type === "ACTION" ? /* @__PURE__ */ r.jsx(kA, { action_type: u._action_type, parentID: u.parentID }, `_ADD_${u.value}_`) : /* @__PURE__ */ r.jsx(Du, { option: u }, u.value)) }, e.label);
31666
31665
  }), TA = k(() => {
@@ -31733,7 +31732,7 @@ const mA = k(() => /* @__PURE__ */ r.jsx(_, { sx: {
31733
31732
  }, children: /* @__PURE__ */ r.jsx(al, { padding: 0, navbar: /* @__PURE__ */ r.jsx(DA, {}), styles: IA, children: /* @__PURE__ */ r.jsx(gA, {}) }) });
31734
31733
  }), MA = (e) => e.replace(/([^:])(\/\/+)/g, "$1/");
31735
31734
  function LA(e) {
31736
- O(() => {
31735
+ $(() => {
31737
31736
  if (Vs.__getMonacoInstance())
31738
31737
  return;
31739
31738
  console.log("loading monaco for @devtable/dashboard");