react-semaphor 0.0.334 → 0.0.335

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,4 +1,4 @@
1
- import { c as R, t as Is, u as I, v as xs, w as Oe, x as e, y as Ds, z as Fs, A as z, n as Ts, E as Ls, H as Ms, J as Es, K as As, M as _, N as re, O as la, Q as ra, R as ia, V as oa, W as st, Y as at, Z as tt, _ as Ks, $ as K, a0 as Je, i as nt, a1 as m, a2 as lt, P as ca, F as da, a3 as Ke, a4 as We, a5 as ua, a6 as rt, a7 as ma, a8 as me, a9 as he, aa as xe, ab as pe, ac as Se, ad as fe, ae as Y, T as Vs, af as qs, ag as Rs, ah as _s, ai as ha, aj as xa, ak as de, al as it, am as ot, an as pa, ao as ct, C as dt, ap as ut, aq as fa, B as mt, ar as ze, as as ht, at as Ye, au as ga, av as Ss, aw as Ce, ax as Fe, ay as we, az as ja, aA as xt, aB as pt, aC as ft, aD as gt, k as jt, aE as bt, aF as yt, aG as vt, aH as Re, aI as ws, aJ as Ct, a as Nt, aK as Ge, aL as cs, aM as Ne, aN as ds, aO as St, aP as wt, aQ as kt, aR as zt, aS as Ot, aT as Ns, aU as It, aV as Ws, aW as Dt, aX as Ys, aY as Ft, aZ as Tt, a_ as Lt, a$ as Mt, b0 as ba, b1 as ie, b2 as Et, b3 as Hs, b4 as ya, b5 as At, b6 as Vt, b7 as rs, b8 as qt, b9 as Rt, ba as _t, bb as Ht, r as $t, bc as Pt, bd as Bt, q as Ut, be as ps, bf as va, bg as Ca, bh as Na, bi as is, bj as Sa, bk as os, bl as Xs, bm as Gt, bn as Qt, bo as fs, bp as gs, bq as js, br as Jt, I as Kt, X as wa, bs as Wt, bt as Yt, bu as Xt, bv as bs, bw as Te, f as Zt, bx as Ue, by as $s, bz as ka, bA as en, bB as sn, bC as us, bD as an, bE as tn, bF as nn, bG as Zs, bH as ln, bI as rn, bJ as on, bK as cn, bL as dn, bM as un, bN as mn, bO as hn, bP as Le, bQ as G, bR as Q, bS as Ps, bT as J, bU as xn, bV as za, bW as pn, bX as fn, bY as gn, bZ as jn, b_ as bn, b$ as yn, c0 as vn, c1 as Cn, c2 as Nn } from "./index-BbJlIYmF.js";
1
+ import { c as R, t as Is, u as O, v as xs, w as Oe, x as e, y as Ds, z as Fs, A as z, n as Ts, E as Ls, H as Ms, J as Es, K as As, M as _, N as re, O as la, Q as ra, R as ia, V as oa, W as tt, Y as nt, Z as lt, _ as Ks, $ as K, a0 as Je, i as rt, a1 as m, a2 as it, P as ca, F as da, a3 as Ke, a4 as We, a5 as ua, a6 as ot, a7 as ma, a8 as me, a9 as he, aa as xe, ab as pe, ac as Se, ad as fe, ae as Y, T as Vs, af as qs, ag as Rs, ah as _s, ai as ha, aj as xa, ak as de, al as ct, am as dt, an as pa, ao as ut, C as mt, ap as ht, aq as fa, B as xt, ar as ze, as as pt, at as Ye, au as ga, av as Ss, aw as Ce, ax as Fe, ay as we, az as ja, aA as ft, aB as gt, aC as jt, aD as bt, k as yt, aE as vt, aF as Ct, aG as Nt, aH as Re, aI as ws, aJ as St, a as wt, aK as Ge, aL as cs, aM as Ne, aN as ds, aO as kt, aP as zt, aQ as Ot, aR as It, aS as Dt, aT as Ns, aU as Ft, aV as Ws, aW as Tt, aX as Ys, aY as Lt, aZ as Mt, a_ as Et, a$ as At, b0 as ba, b1 as ie, b2 as Vt, b3 as Hs, b4 as ya, b5 as qt, b6 as Rt, b7 as rs, b8 as _t, b9 as Ht, ba as va, bb as $t, r as Pt, bc as Bt, bd as Ut, q as Gt, be as ps, bf as Ca, bg as Na, bh as Sa, bi as is, bj as wa, bk as os, bl as Xs, bm as Qt, bn as Jt, bo as fs, bp as gs, bq as js, br as Kt, I as Wt, X as ka, bs as Yt, bt as Xt, bu as Zt, bv as bs, bw as Te, f as en, bx as Ue, by as $s, bz as za, bA as sn, bB as an, bC as us, bD as tn, bE as nn, bF as ln, bG as Zs, bH as Oa, bI as rn, bJ as on, bK as cn, bL as dn, bM as un, bN as mn, bO as hn, bP as Le, bQ as G, bR as Q, bS as Ps, bT as J, bU as xn, bV as Ia, bW as pn, bX as fn, bY as gn, bZ as jn, b_ as bn, b$ as yn, c0 as vn, c1 as Cn, c2 as Nn } from "./index-D4eCe4-j.js";
2
2
  import * as ea from "react";
3
3
  import ke, { useState as V, useMemo as ks, useEffect as se, useRef as zs, useCallback as Sn, Suspense as wn } from "react";
4
4
  import "react-dom";
@@ -63,7 +63,7 @@ const Us = R("ChartLine", [
63
63
  * This source code is licensed under the ISC license.
64
64
  * See the LICENSE file in the root directory of this source tree.
65
65
  */
66
- const Oa = R("ChartNoAxesGantt", [
66
+ const Da = R("ChartNoAxesGantt", [
67
67
  ["path", { d: "M8 6h10", key: "9lnwnk" }],
68
68
  ["path", { d: "M6 12h9", key: "1g9pqf" }],
69
69
  ["path", { d: "M11 18h7", key: "c8dzvl" }]
@@ -74,7 +74,7 @@ const Oa = R("ChartNoAxesGantt", [
74
74
  * This source code is licensed under the ISC license.
75
75
  * See the LICENSE file in the root directory of this source tree.
76
76
  */
77
- const Ia = R("ChartPie", [
77
+ const Fa = R("ChartPie", [
78
78
  [
79
79
  "path",
80
80
  {
@@ -90,7 +90,7 @@ const Ia = R("ChartPie", [
90
90
  * This source code is licensed under the ISC license.
91
91
  * See the LICENSE file in the root directory of this source tree.
92
92
  */
93
- const Da = R("ChartScatter", [
93
+ const Ta = R("ChartScatter", [
94
94
  ["circle", { cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor", key: "kqv944" }],
95
95
  ["circle", { cx: "18.5", cy: "5.5", r: ".5", fill: "currentColor", key: "lysivs" }],
96
96
  ["circle", { cx: "11.5", cy: "11.5", r: ".5", fill: "currentColor", key: "byv1b8" }],
@@ -138,7 +138,7 @@ const Dn = R("Database", [
138
138
  * This source code is licensed under the ISC license.
139
139
  * See the LICENSE file in the root directory of this source tree.
140
140
  */
141
- const Fa = R("EllipsisVertical", [
141
+ const La = R("EllipsisVertical", [
142
142
  ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
143
143
  ["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
144
144
  ["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
@@ -301,7 +301,7 @@ const qe = R("LoaderCircle", [
301
301
  * This source code is licensed under the ISC license.
302
302
  * See the LICENSE file in the root directory of this source tree.
303
303
  */
304
- const Ta = R("Map", [
304
+ const Ma = R("Map", [
305
305
  [
306
306
  "path",
307
307
  {
@@ -382,7 +382,7 @@ const Un = R("Save", [
382
382
  * This source code is licensed under the ISC license.
383
383
  * See the LICENSE file in the root directory of this source tree.
384
384
  */
385
- const La = R("Shapes", [
385
+ const Ea = R("Shapes", [
386
386
  [
387
387
  "path",
388
388
  {
@@ -490,7 +490,7 @@ const Yn = R("User", [
490
490
  ["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
491
491
  ["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
492
492
  ]);
493
- function Ma(s) {
493
+ function Aa(s) {
494
494
  var t;
495
495
  return {
496
496
  ...s,
@@ -574,18 +574,18 @@ async function sl(s, t) {
574
574
  }) : null;
575
575
  }
576
576
  function al() {
577
- const [s, t] = V(""), [a, n] = V(!1), l = I((C) => C.lenses), { setLenses: r, setSelectedLensId: u } = xs(), [o, c] = V(!1), [p, d] = V(!1), b = I((C) => C.dashboard), j = I((C) => C.filterValues), { authToken: h } = Oe();
577
+ const [s, t] = V(""), [a, n] = V(!1), l = O((C) => C.lenses), { setLenses: r, setSelectedLensId: u } = xs(), [o, c] = V(!1), [p, d] = V(!1), b = O((C) => C.dashboard), j = O((C) => C.filterValues), { authToken: h } = Oe();
578
578
  async function g() {
579
579
  c(!0);
580
- const C = Ma(
580
+ const C = Aa(
581
581
  b
582
- ), O = await el(
582
+ ), I = await el(
583
583
  s,
584
584
  C,
585
585
  j,
586
586
  h == null ? void 0 : h.accessToken
587
587
  );
588
- O && (r([...l || [], O]), u(O.id), d(!1)), c(!1);
588
+ I && (r([...l || [], I]), u(I.id), d(!1)), c(!1);
589
589
  }
590
590
  return /* @__PURE__ */ e.jsxs(Ds, { open: p, onOpenChange: d, children: [
591
591
  /* @__PURE__ */ e.jsx(Fs, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
@@ -635,7 +635,7 @@ function al() {
635
635
  ] });
636
636
  }
637
637
  function tl() {
638
- const [s, t] = V(!1), a = I((d) => d.lenses), n = I((d) => d.selectedLensId), { setLenses: l, setSelectedLensId: r } = xs(), { authToken: u } = Oe();
638
+ const [s, t] = V(!1), a = O((d) => d.lenses), n = O((d) => d.selectedLensId), { setLenses: l, setSelectedLensId: r } = xs(), { authToken: u } = Oe();
639
639
  async function o(d) {
640
640
  r(d);
641
641
  }
@@ -671,10 +671,10 @@ function tl() {
671
671
  return /* @__PURE__ */ e.jsxs(ra, { open: s, onOpenChange: t, children: [
672
672
  /* @__PURE__ */ e.jsx(ia, { asChild: !0, children: /* @__PURE__ */ e.jsx(z, { variant: "ghost", className: "h-7 p-2", children: /* @__PURE__ */ e.jsx(Mn, { className: "h-4 w-4", strokeWidth: 1.5 }) }) }),
673
673
  /* @__PURE__ */ e.jsxs(oa, { align: "end", className: "w-60", children: [
674
- /* @__PURE__ */ e.jsx(st, { className: "px-3", children: "Lenses" }),
675
- /* @__PURE__ */ e.jsx(at, {}),
674
+ /* @__PURE__ */ e.jsx(tt, { className: "px-3", children: "Lenses" }),
675
+ /* @__PURE__ */ e.jsx(nt, {}),
676
676
  /* @__PURE__ */ e.jsxs(
677
- tt,
677
+ lt,
678
678
  {
679
679
  value: n,
680
680
  onValueChange: o,
@@ -728,7 +728,7 @@ function tl() {
728
728
  function nl({
729
729
  iconClassName: s
730
730
  }) {
731
- const [t, a] = V(!1), { authToken: n } = Oe(), l = I((o) => o.theme), r = I((o) => o.filterValues);
731
+ const [t, a] = V(!1), { authToken: n } = Oe(), l = O((o) => o.theme), r = O((o) => o.filterValues);
732
732
  async function u() {
733
733
  {
734
734
  a(!0);
@@ -751,7 +751,7 @@ function nl({
751
751
  size: "sm",
752
752
  onClick: u,
753
753
  children: t ? /* @__PURE__ */ e.jsx(qe, { className: K("size-3.5 animate-spin", s) }) : /* @__PURE__ */ e.jsx(
754
- nt,
754
+ rt,
755
755
  {
756
756
  className: K("size-3.5", s),
757
757
  strokeWidth: 1.5
@@ -763,23 +763,23 @@ function nl({
763
763
  function ll() {
764
764
  V(!1);
765
765
  const { authToken: s } = Oe();
766
- I((f) => f.theme);
767
- const t = I((f) => f.lenses), a = I((f) => f.selectedLensId), n = t == null ? void 0 : t.find((f) => f.id === a), l = I((f) => f.dashboard);
768
- I((f) => f.selectedSheetId);
769
- const r = I(
766
+ O((f) => f.theme);
767
+ const t = O((f) => f.lenses), a = O((f) => f.selectedLensId), n = t == null ? void 0 : t.find((f) => f.id === a), l = O((f) => f.dashboard);
768
+ O((f) => f.selectedSheetId);
769
+ const r = O(
770
770
  (f) => f.isDashboardEditing
771
771
  ), u = m(
772
772
  (f) => f.selectedConnectionId
773
- ), [o, c] = V(!1), p = I((f) => f.filterValues), d = I((f) => f.isVisualEditing), b = I((f) => f.showFilters);
774
- I(
773
+ ), [o, c] = V(!1), p = O((f) => f.filterValues), d = O((f) => f.isVisualEditing), b = O((f) => f.showFilters);
774
+ O(
775
775
  (f) => f.showDashboardJSON
776
776
  );
777
- const j = I((f) => f.onSaveFunction), h = I(
777
+ const j = O((f) => f.onSaveFunction), h = O(
778
778
  (f) => f.actions.setShowFilters
779
- ), { addFrame: g, setSelectedFrameId: C } = I(
779
+ ), { addFrame: g, setSelectedFrameId: C } = O(
780
780
  (f) => f.actions
781
- ), { getSelectedSheet: O, setIsDashboardEditing: y, setShowDashboardJSON: L } = I((f) => f.actions), D = O(), { tenantId: A, endUserId: N } = ks(
782
- () => lt(s == null ? void 0 : s.accessToken),
781
+ ), { getSelectedSheet: I, setIsDashboardEditing: y, setShowDashboardJSON: L } = O((f) => f.actions), D = I(), { tenantId: A, endUserId: N } = ks(
782
+ () => it(s == null ? void 0 : s.accessToken),
783
783
  [s == null ? void 0 : s.accessToken]
784
784
  ), F = ks(() => A || N, [A, N]), E = () => {
785
785
  if (!r || !D) return;
@@ -810,7 +810,7 @@ function ll() {
810
810
  };
811
811
  async function v() {
812
812
  if (c(!0), !a || !n) return;
813
- const f = Ma(
813
+ const f = Aa(
814
814
  l
815
815
  ), k = JSON.stringify(f), S = {
816
816
  ...n,
@@ -923,7 +923,7 @@ function Be({
923
923
  }
924
924
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
925
925
  p && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: r ? /* @__PURE__ */ e.jsxs(ua, { children: [
926
- /* @__PURE__ */ e.jsx(rt, { children: j() }),
926
+ /* @__PURE__ */ e.jsx(ot, { children: j() }),
927
927
  /* @__PURE__ */ e.jsx(ma, { className: "text-xs", align: "start", children: r })
928
928
  ] }) : j() }),
929
929
  /* @__PURE__ */ e.jsxs(me, { disabled: d, value: b, onValueChange: u, children: [
@@ -961,7 +961,7 @@ function rl({ column: s }) {
961
961
  ), u = m((h) => h.sqlGen), { modelItems: o } = _e(), c = m((h) => h.actions.setSqlGen), p = m((h) => h.actions.setCardSql), d = m((h) => h.actions.setRunSql);
962
962
  function b(h, g) {
963
963
  var L;
964
- const C = ha(h, u, g), O = (L = o == null ? void 0 : o.find(
964
+ const C = ha(h, u, g), I = (L = o == null ? void 0 : o.find(
965
965
  (D) => D.id === r
966
966
  )) == null ? void 0 : L.name;
967
967
  c(C);
@@ -969,7 +969,7 @@ function rl({ column: s }) {
969
969
  C,
970
970
  de(l || ""),
971
971
  de(n),
972
- O
972
+ I
973
973
  );
974
974
  y && (p(y), d(!0)), a(!1);
975
975
  }
@@ -1018,7 +1018,7 @@ function rl({ column: s }) {
1018
1018
  ] });
1019
1019
  }
1020
1020
  return /* @__PURE__ */ e.jsxs(qs, { openDelay: 0, open: t, onOpenChange: a, children: [
1021
- /* @__PURE__ */ e.jsx(Rs, { asChild: !0, children: /* @__PURE__ */ e.jsx(Fa, { className: "invisible size-3.5 cursor-pointer text-foreground/40 group-hover:visible" }) }),
1021
+ /* @__PURE__ */ e.jsx(Rs, { asChild: !0, children: /* @__PURE__ */ e.jsx(La, { className: "invisible size-3.5 cursor-pointer text-foreground/40 group-hover:visible" }) }),
1022
1022
  /* @__PURE__ */ e.jsx(
1023
1023
  _s,
1024
1024
  {
@@ -1029,15 +1029,15 @@ function rl({ column: s }) {
1029
1029
  )
1030
1030
  ] });
1031
1031
  }
1032
- function Ea({ column: s }) {
1032
+ function Va({ column: s }) {
1033
1033
  return /* @__PURE__ */ e.jsxs(ua, { children: [
1034
- /* @__PURE__ */ e.jsx(it, { asChild: !0, children: ot.includes(s.data_type.toLowerCase()) ? (
1034
+ /* @__PURE__ */ e.jsx(ct, { asChild: !0, children: dt.includes(s.data_type.toLowerCase()) ? (
1035
1035
  // <span className=" font-thin">T</span>
1036
1036
  /* @__PURE__ */ e.jsx(Gs, { className: "size-3" })
1037
1037
  ) : pa.includes(s.data_type.toLowerCase()) ? (
1038
1038
  //
1039
1039
  /* @__PURE__ */ e.jsx(An, { className: "size-3" })
1040
- ) : ct.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(dt, { className: "size-3" }) : ut.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(Wn, { className: "size-3" }) : /* @__PURE__ */ e.jsx(Gn, { className: "size-3" }) }),
1040
+ ) : ut.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(mt, { className: "size-3" }) : ht.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(Wn, { className: "size-3" }) : /* @__PURE__ */ e.jsx(Gn, { className: "size-3" }) }),
1041
1041
  /* @__PURE__ */ e.jsx(ma, { children: /* @__PURE__ */ e.jsx("p", { className: "font-mono text-xs", children: s.data_type }) })
1042
1042
  ] });
1043
1043
  }
@@ -1055,11 +1055,11 @@ function il({
1055
1055
  (x) => x.selectedSchemaName
1056
1056
  ), c = m((x) => x.selectedTableName), p = m(
1057
1057
  (x) => x.selectedDatamodelId
1058
- ), d = I(
1058
+ ), d = O(
1059
1059
  (x) => x.dashboard.aiScopeTables
1060
- ), { setAIScopeTables: b } = I((x) => x.actions), j = m((x) => x.actions.setRunSql), h = m((x) => x.actions.setSqlGen), g = m(
1060
+ ), { setAIScopeTables: b } = O((x) => x.actions), j = m((x) => x.actions.setRunSql), h = m((x) => x.actions.setSqlGen), g = m(
1061
1061
  (x) => x.actions.setIsShowingVisual
1062
- ), C = m((x) => x.actions.setCardSql), { connectionType: O, modelItems: y } = _e();
1062
+ ), C = m((x) => x.actions.setCardSql), { connectionType: I, modelItems: y } = _e();
1063
1063
  function L(x) {
1064
1064
  var S;
1065
1065
  const v = ha(x, l);
@@ -1078,7 +1078,7 @@ function il({
1078
1078
  if (x === !0 && c && r) {
1079
1079
  const v = {
1080
1080
  connectinonId: r,
1081
- connectionType: O,
1081
+ connectionType: I,
1082
1082
  databaseName: u,
1083
1083
  schemaName: o,
1084
1084
  tableName: c
@@ -1116,7 +1116,7 @@ function il({
1116
1116
  function F() {
1117
1117
  const x = N();
1118
1118
  g(!1);
1119
- const v = O === "MSSQL" ? `SELECT top 10 * FROM ${x}` : `SELECT * FROM ${x} LIMIT 10`;
1119
+ const v = I === "MSSQL" ? `SELECT top 10 * FROM ${x}` : `SELECT * FROM ${x} LIMIT 10`;
1120
1120
  C(v), j(!0);
1121
1121
  }
1122
1122
  function E() {
@@ -1134,7 +1134,7 @@ function il({
1134
1134
  variant: "outline",
1135
1135
  className: "h-9 px-2",
1136
1136
  children: /* @__PURE__ */ e.jsx(
1137
- mt,
1137
+ xt,
1138
1138
  {
1139
1139
  className: K("size-4", {
1140
1140
  "text-primary": D(),
@@ -1185,12 +1185,12 @@ function il({
1185
1185
  className: K(
1186
1186
  "group mx-3 flex cursor-pointer items-center justify-between rounded px-2 py-[6px] text-sm transition-colors hover:bg-muted/50",
1187
1187
  {
1188
- "bg-muted": ht(x, l)
1188
+ "bg-muted": pt(x, l)
1189
1189
  }
1190
1190
  ),
1191
1191
  children: [
1192
1192
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
1193
- /* @__PURE__ */ e.jsx(Ea, { column: x }),
1193
+ /* @__PURE__ */ e.jsx(Va, { column: x }),
1194
1194
  /* @__PURE__ */ e.jsx("span", { children: x.column_name })
1195
1195
  ] }),
1196
1196
  /* @__PURE__ */ e.jsx(
@@ -1236,7 +1236,7 @@ function _e(s, t) {
1236
1236
  ), g = m(
1237
1237
  (i) => i.actions.setSelectedTableName
1238
1238
  ), C = m((i) => i.actions.setCardSql);
1239
- function O(i) {
1239
+ function I(i) {
1240
1240
  return l && u && o && u !== "NA" ? !0 : l && i === "API" ? !1 : !!(l && i === "S3");
1241
1241
  }
1242
1242
  function y(i) {
@@ -1331,7 +1331,7 @@ function _e(s, t) {
1331
1331
  schema_name: o
1332
1332
  }
1333
1333
  ),
1334
- enabled: O(f)
1334
+ enabled: I(f)
1335
1335
  }), {
1336
1336
  data: ne,
1337
1337
  isLoading: Ee,
@@ -1443,7 +1443,7 @@ function _e(s, t) {
1443
1443
  handleSchemaChange: oe
1444
1444
  };
1445
1445
  }
1446
- function Aa({
1446
+ function qa({
1447
1447
  ColumnsComponent: s
1448
1448
  }) {
1449
1449
  var te;
@@ -1467,7 +1467,7 @@ function Aa({
1467
1467
  isConnectionsLoading: h,
1468
1468
  isModelsLoading: g,
1469
1469
  isConnectionsError: C,
1470
- isModelsError: O,
1470
+ isModelsError: I,
1471
1471
  isDatabasesLoadingOrFetching: y,
1472
1472
  isDatabaseError: L,
1473
1473
  isSchemaLoadingOrFetching: D,
@@ -1531,7 +1531,7 @@ function Aa({
1531
1531
  {
1532
1532
  showNone: !0,
1533
1533
  onChange: $,
1534
- isError: O,
1534
+ isError: I,
1535
1535
  isLoading: g,
1536
1536
  items: c,
1537
1537
  value: a || "",
@@ -1712,7 +1712,7 @@ function ul({
1712
1712
  triggerAIRun: l,
1713
1713
  setTriggerAIRun: r
1714
1714
  }) {
1715
- const u = zs(null), o = zs(null), { authToken: c } = Oe(), [p, d] = V(!1), b = m((w) => w.actions.setCardSql), j = I((w) => w.dashboard.baseQueries), h = m((w) => w.actions.setRunSql), g = m((w) => w.actions.setCardType), [C, O] = V([]), y = m((w) => w.currentColumns), L = m((w) => w.card.sql), D = m((w) => w.selectedTableName), A = `
1715
+ const u = zs(null), o = zs(null), { authToken: c } = Oe(), [p, d] = V(!1), b = m((w) => w.actions.setCardSql), j = O((w) => w.dashboard.baseQueries), h = m((w) => w.actions.setRunSql), g = m((w) => w.actions.setCardType), [C, I] = V([]), y = m((w) => w.currentColumns), L = m((w) => w.card.sql), D = m((w) => w.selectedTableName), A = `
1716
1716
  ${a}
1717
1717
 
1718
1718
  Database Query Dialect: ${D === "api" || D === "s3" ? "DuckDb" : ""}
@@ -1754,7 +1754,7 @@ function ul({
1754
1754
  return !0;
1755
1755
  }
1756
1756
  se(() => {
1757
- F && O((w) => [...w, { role: "ai", content: F.response }]);
1757
+ F && I((w) => [...w, { role: "ai", content: F.response }]);
1758
1758
  }, [F]), se(() => {
1759
1759
  const w = setTimeout(() => {
1760
1760
  var H;
@@ -1766,7 +1766,7 @@ function ul({
1766
1766
  return () => clearTimeout(w);
1767
1767
  }, [C]);
1768
1768
  function S() {
1769
- a && (O((w) => [...w, { role: "user", content: a }]), k(a) && d(!0), n(""), f());
1769
+ a && (I((w) => [...w, { role: "user", content: a }]), k(a) && d(!0), n(""), f());
1770
1770
  }
1771
1771
  se(() => {
1772
1772
  l && (S(), r(!1));
@@ -1803,7 +1803,7 @@ function ul({
1803
1803
  pre: ({ node: w, ...H }) => /* @__PURE__ */ e.jsxs("pre", { className: "space-y-2 rounded-sm bg-muted/50 p-3", style: $, children: [
1804
1804
  /* @__PURE__ */ e.jsx("code", { className: "whitespace-normal text-sm", children: H.children }),
1805
1805
  /* @__PURE__ */ e.jsxs("div", { className: "flex justify-start gap-2", children: [
1806
- /* @__PURE__ */ e.jsx(z, { onClick: B, size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(ft, {}) }),
1806
+ /* @__PURE__ */ e.jsx(z, { onClick: B, size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(jt, {}) }),
1807
1807
  /* @__PURE__ */ e.jsx(
1808
1808
  z,
1809
1809
  {
@@ -1813,7 +1813,7 @@ function ul({
1813
1813
  },
1814
1814
  size: "sm",
1815
1815
  variant: "outline",
1816
- children: /* @__PURE__ */ e.jsx(gt, {})
1816
+ children: /* @__PURE__ */ e.jsx(bt, {})
1817
1817
  }
1818
1818
  )
1819
1819
  ] })
@@ -1839,7 +1839,7 @@ function ul({
1839
1839
  },
1840
1840
  H
1841
1841
  ) : w.role === "ai" ? /* @__PURE__ */ e.jsx(
1842
- pt,
1842
+ gt,
1843
1843
  {
1844
1844
  className: "w-full overflow-auto py-1",
1845
1845
  components: Z,
@@ -1908,7 +1908,7 @@ function ul({
1908
1908
  size: "sm",
1909
1909
  variant: "ghost",
1910
1910
  onClick: S,
1911
- children: !E && !x ? /* @__PURE__ */ e.jsx(xt, {}) : /* @__PURE__ */ e.jsx(qe, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" })
1911
+ children: !E && !x ? /* @__PURE__ */ e.jsx(ft, {}) : /* @__PURE__ */ e.jsx(qe, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" })
1912
1912
  }
1913
1913
  )
1914
1914
  ] })
@@ -1919,13 +1919,13 @@ function ul({
1919
1919
  )
1920
1920
  ] });
1921
1921
  }
1922
- var Va = {
1922
+ var Ra = {
1923
1923
  color: void 0,
1924
1924
  size: void 0,
1925
1925
  className: void 0,
1926
1926
  style: void 0,
1927
1927
  attr: void 0
1928
- }, sa = ke.createContext && /* @__PURE__ */ ke.createContext(Va), ml = ["attr", "size", "title"];
1928
+ }, sa = ke.createContext && /* @__PURE__ */ ke.createContext(Ra), ml = ["attr", "size", "title"];
1929
1929
  function hl(s, t) {
1930
1930
  if (s == null) return {};
1931
1931
  var a = xl(s, t), n, l;
@@ -1994,15 +1994,15 @@ function gl(s, t) {
1994
1994
  }
1995
1995
  return (t === "string" ? String : Number)(s);
1996
1996
  }
1997
- function qa(s) {
1997
+ function _a(s) {
1998
1998
  return s && s.map((t, a) => /* @__PURE__ */ ke.createElement(t.tag, hs({
1999
1999
  key: a
2000
- }, t.attr), qa(t.child)));
2000
+ }, t.attr), _a(t.child)));
2001
2001
  }
2002
2002
  function ge(s) {
2003
2003
  return (t) => /* @__PURE__ */ ke.createElement(jl, ms({
2004
2004
  attr: hs({}, s.attr)
2005
- }, t), qa(s.child));
2005
+ }, t), _a(s.child));
2006
2006
  }
2007
2007
  function jl(s) {
2008
2008
  var t = (a) => {
@@ -2025,14 +2025,14 @@ function jl(s) {
2025
2025
  xmlns: "http://www.w3.org/2000/svg"
2026
2026
  }), r && /* @__PURE__ */ ke.createElement("title", null, r), s.children);
2027
2027
  };
2028
- return sa !== void 0 ? /* @__PURE__ */ ke.createElement(sa.Consumer, null, (a) => t(a)) : t(Va);
2028
+ return sa !== void 0 ? /* @__PURE__ */ ke.createElement(sa.Consumer, null, (a) => t(a)) : t(Ra);
2029
2029
  }
2030
2030
  function bl(s) {
2031
2031
  return ge({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z" }, child: [] }] })(s);
2032
2032
  }
2033
2033
  function yl({ sql: s }) {
2034
2034
  return /* @__PURE__ */ e.jsxs(qs, { children: [
2035
- /* @__PURE__ */ e.jsx(Rs, { asChild: !0, children: /* @__PURE__ */ e.jsx(z, { variant: "link", className: "h-5 p-0", children: /* @__PURE__ */ e.jsx(jt, { className: "h-4 w-4 text-muted-foreground" }) }) }),
2035
+ /* @__PURE__ */ e.jsx(Rs, { asChild: !0, children: /* @__PURE__ */ e.jsx(z, { variant: "link", className: "h-5 p-0", children: /* @__PURE__ */ e.jsx(yt, { className: "h-4 w-4 text-muted-foreground" }) }) }),
2036
2036
  /* @__PURE__ */ e.jsx(
2037
2037
  _s,
2038
2038
  {
@@ -2050,10 +2050,10 @@ function vl() {
2050
2050
  const [s, t] = V({
2051
2051
  queryKey: [],
2052
2052
  queryData: null
2053
- }), { theme: a } = bt(), n = yt(), l = zs(), r = vt(), [u, o] = V(!1), [c, p] = V(!1), [d, b] = V(!1), [j, h] = V(""), [g, C] = V(!1), O = I((i) => i.selectedSheetId);
2054
- I((i) => i.dashboard.baseQueries);
2055
- const y = m((i) => i.card), L = I((i) => i.theme), D = m((i) => i.isShowingVisual);
2056
- I((i) => i.onAcceptChanges);
2053
+ }), { theme: a } = vt(), n = Ct(), l = zs(), r = Nt(), [u, o] = V(!1), [c, p] = V(!1), [d, b] = V(!1), [j, h] = V(""), [g, C] = V(!1), I = O((i) => i.selectedSheetId);
2054
+ O((i) => i.dashboard.baseQueries);
2055
+ const y = m((i) => i.card), L = O((i) => i.theme), D = m((i) => i.isShowingVisual);
2056
+ O((i) => i.onAcceptChanges);
2057
2057
  const A = m(
2058
2058
  (i) => i.selectedConnectionId
2059
2059
  ), N = m(
@@ -2063,13 +2063,13 @@ function vl() {
2063
2063
  ), E = m(
2064
2064
  (i) => i.selectedSchemaName
2065
2065
  );
2066
- I(
2066
+ O(
2067
2067
  (i) => i.actions.updateFrameCard
2068
2068
  );
2069
- const x = m((i) => i.selectedTableName), v = m((i) => i.card.sql), f = m((i) => i.card.python), k = m((i) => i.frame), S = I((i) => i.dashboard.filters), q = I((i) => i.filterValues), $ = S == null ? void 0 : S.filter(
2070
- (i) => i.sheetId === O || !i.sheetId
2069
+ const x = m((i) => i.selectedTableName), v = m((i) => i.card.sql), f = m((i) => i.card.python), k = m((i) => i.frame), S = O((i) => i.dashboard.filters), q = O((i) => i.filterValues), $ = S == null ? void 0 : S.filter(
2070
+ (i) => i.sheetId === I || !i.sheetId
2071
2071
  ), U = q == null ? void 0 : q.filter(
2072
- (i) => ($ == null ? void 0 : $.some((le) => le.id === i.filterId)) || i.filterId.endsWith(O)
2072
+ (i) => ($ == null ? void 0 : $.some((le) => le.id === i.filterId)) || i.filterId.endsWith(I)
2073
2073
  ), Z = m((i) => i.applyFilters), {
2074
2074
  setCardCustomCfg: B,
2075
2075
  setQueryResultColumns: X,
@@ -2147,8 +2147,8 @@ function vl() {
2147
2147
  if (ve == "All__Header")
2148
2148
  return i[0].id;
2149
2149
  if (ve && ve.endsWith("__Header")) {
2150
- const Za = ve.split("__")[0], Js = i.find(
2151
- (et) => et.tabTitle === Za
2150
+ const st = ve.split("__")[0], Js = i.find(
2151
+ (at) => at.tabTitle === st
2152
2152
  );
2153
2153
  return Js ? Js.id : i[0].id;
2154
2154
  }
@@ -2192,7 +2192,7 @@ function vl() {
2192
2192
  inherit: !0,
2193
2193
  rules: [],
2194
2194
  colors: {
2195
- "editor.background": ye === "light" ? "#ffffff" : Ct("240 10% 10%")
2195
+ "editor.background": ye === "light" ? "#ffffff" : St("240 10% 10%")
2196
2196
  // 'editor.background':
2197
2197
  // activeTheme === 'light'
2198
2198
  // ? '#ffffff'
@@ -2348,7 +2348,7 @@ function vl() {
2348
2348
  onChange: (i) => {
2349
2349
  M(i && i.trim() || "");
2350
2350
  },
2351
- value: f || St,
2351
+ value: f || kt,
2352
2352
  options: {
2353
2353
  minimap: {
2354
2354
  enabled: !1
@@ -2486,7 +2486,7 @@ function vl() {
2486
2486
  size: "sm",
2487
2487
  variant: "outline",
2488
2488
  children: [
2489
- /* @__PURE__ */ e.jsx(Nt, { className: "mr-2 size-4 font-bold text-green-600" }),
2489
+ /* @__PURE__ */ e.jsx(wt, { className: "mr-2 size-4 font-bold text-green-600" }),
2490
2490
  "Accept"
2491
2491
  ]
2492
2492
  }
@@ -2514,26 +2514,26 @@ function Cl({ data: s }) {
2514
2514
  onClick: () => c.toggleSorting(c.getIsSorted() === "asc"),
2515
2515
  children: [
2516
2516
  o,
2517
- p === "asc" ? /* @__PURE__ */ e.jsx(wt, { className: "ml-2 h-5 w-5" }) : p === "desc" ? /* @__PURE__ */ e.jsx(kt, { className: "ml-2 h-5 w-5" }) : null
2517
+ p === "asc" ? /* @__PURE__ */ e.jsx(zt, { className: "ml-2 h-5 w-5" }) : p === "desc" ? /* @__PURE__ */ e.jsx(Ot, { className: "ml-2 h-5 w-5" }) : null
2518
2518
  ]
2519
2519
  }
2520
2520
  ) });
2521
2521
  }
2522
- })), r = zt({
2522
+ })), r = It({
2523
2523
  data: s,
2524
2524
  columns: l,
2525
- getCoreRowModel: Ft(),
2526
- getPaginationRowModel: Tt(),
2525
+ getCoreRowModel: Lt(),
2526
+ getPaginationRowModel: Mt(),
2527
2527
  onSortingChange: a,
2528
- getSortedRowModel: Lt(),
2528
+ getSortedRowModel: Et(),
2529
2529
  manualPagination: !0,
2530
2530
  state: {
2531
2531
  sorting: t
2532
2532
  }
2533
2533
  });
2534
2534
  return /* @__PURE__ */ e.jsx("div", { className: "font-mono text-xs text-foreground/95", children: /* @__PURE__ */ e.jsxs("table", { className: "w-full", children: [
2535
- /* @__PURE__ */ e.jsx(Ot, { children: r.getHeaderGroups().map((o) => /* @__PURE__ */ e.jsx(Ns, { children: o.headers.map((c) => /* @__PURE__ */ e.jsx(
2536
- It,
2535
+ /* @__PURE__ */ e.jsx(Dt, { children: r.getHeaderGroups().map((o) => /* @__PURE__ */ e.jsx(Ns, { children: o.headers.map((c) => /* @__PURE__ */ e.jsx(
2536
+ Ft,
2537
2537
  {
2538
2538
  className: "sticky top-0 h-11 bg-muted font-semibold",
2539
2539
  children: c.isPlaceholder ? null : Ws(
@@ -2543,7 +2543,7 @@ function Cl({ data: s }) {
2543
2543
  },
2544
2544
  c.id
2545
2545
  )) }, o.id)) }),
2546
- /* @__PURE__ */ e.jsx(Dt, { children: (u = r.getRowModel().rows) != null && u.length ? r.getRowModel().rows.map((o) => /* @__PURE__ */ e.jsx(
2546
+ /* @__PURE__ */ e.jsx(Tt, { children: (u = r.getRowModel().rows) != null && u.length ? r.getRowModel().rows.map((o) => /* @__PURE__ */ e.jsx(
2547
2547
  Ns,
2548
2548
  {
2549
2549
  className: "whitespace-nowrap py-2",
@@ -2558,7 +2558,7 @@ function Nl({ card: s }) {
2558
2558
  var y, L, D, A, N, F, E, x, v, f, k;
2559
2559
  const [t, a] = V(!1), [n, l] = V(
2560
2560
  []
2561
- ), { authToken: r } = Oe(), u = Mt(r == null ? void 0 : r.accessToken), o = I((S) => S.themeStyle), c = {
2561
+ ), { authToken: r } = Oe(), u = At(r == null ? void 0 : r.accessToken), o = O((S) => S.themeStyle), c = {
2562
2562
  colors: ((L = (y = o == null ? void 0 : o.chart) == null ? void 0 : y.dataset) == null ? void 0 : L.backgroundColor) || []
2563
2563
  };
2564
2564
  (D = s.customCardPreferences) != null && D.inputData;
@@ -2578,7 +2578,7 @@ function Nl({ card: s }) {
2578
2578
  function C(S) {
2579
2579
  a(S);
2580
2580
  }
2581
- const O = Object.keys(
2581
+ const I = Object.keys(
2582
2582
  ((x = s.customCardPreferences) == null ? void 0 : x.dataInputCardIds) || {}
2583
2583
  ).map((S) => {
2584
2584
  var U, Z, B;
@@ -2610,7 +2610,7 @@ function Nl({ card: s }) {
2610
2610
  );
2611
2611
  if ($)
2612
2612
  return /* @__PURE__ */ e.jsx(
2613
- Et,
2613
+ Vt,
2614
2614
  {
2615
2615
  onLoadingStatus: C,
2616
2616
  onDataChange: h,
@@ -2625,13 +2625,13 @@ function Nl({ card: s }) {
2625
2625
  {
2626
2626
  theme: c,
2627
2627
  onDataChange: h,
2628
- settings: O.map(
2628
+ settings: I.map(
2629
2629
  (S) => {
2630
2630
  var q;
2631
2631
  return (q = S == null ? void 0 : S.customCardPreferences) == null ? void 0 : q.settings;
2632
2632
  }
2633
2633
  ),
2634
- data: O.map((S) => S != null && S.id ? n == null ? void 0 : n[S.id] : [])
2634
+ data: I.map((S) => S != null && S.id ? n == null ? void 0 : n[S.id] : [])
2635
2635
  }
2636
2636
  ) })
2637
2637
  ] })
@@ -2640,14 +2640,14 @@ function Nl({ card: s }) {
2640
2640
  (k = s.customCardPreferences) == null ? void 0 : k.componentName
2641
2641
  ) });
2642
2642
  }
2643
- function Ra({
2643
+ function Ha({
2644
2644
  // card,
2645
2645
  // showCard,
2646
2646
  className: s,
2647
2647
  ...t
2648
2648
  }) {
2649
- var O;
2650
- const a = m((y) => y.card), n = ((O = a.customCardPreferences) == null ? void 0 : O.showCardHeader) ?? !0, l = m((y) => y.frame), r = I((y) => y.dashboard.filters);
2649
+ var I;
2650
+ const a = m((y) => y.card), n = ((I = a.customCardPreferences) == null ? void 0 : I.showCardHeader) ?? !0, l = m((y) => y.frame), r = O((y) => y.dashboard.filters);
2651
2651
  m((y) => y.actions.setRunSql);
2652
2652
  const { updateFilter: u } = xs(), o = r == null ? void 0 : r.find((y) => y.id === l.filterId), { data: c, isLoading: p, isFetching: d } = Re(a), { setCard: b } = ie(), { data: j } = Hs(a);
2653
2653
  if (!a.id) return null;
@@ -2667,14 +2667,14 @@ function Ra({
2667
2667
  var y;
2668
2668
  if (c != null && c.records && (c == null ? void 0 : c.records.length) === 0 && !p && !d)
2669
2669
  return /* @__PURE__ */ e.jsxs("div", { className: "flex h-full flex-col items-center justify-center gap-2", children: [
2670
- /* @__PURE__ */ e.jsx($t, { className: "size-8 text-muted-foreground" }),
2670
+ /* @__PURE__ */ e.jsx(Pt, { className: "size-8 text-muted-foreground" }),
2671
2671
  /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: "No records to display" })
2672
2672
  ] });
2673
2673
  if (a.type === "custom")
2674
2674
  return g(a);
2675
2675
  if (!["table", "custom"].includes(a.type) && h)
2676
2676
  return /* @__PURE__ */ e.jsx(
2677
- Pt,
2677
+ Bt,
2678
2678
  {
2679
2679
  cfg: h
2680
2680
  },
@@ -2682,25 +2682,25 @@ function Ra({
2682
2682
  );
2683
2683
  if (a.type === "table" && (c != null && c.records) && (c == null ? void 0 : c.records.length) > 0)
2684
2684
  return /* @__PURE__ */ e.jsxs(ze, { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: [
2685
- /* @__PURE__ */ e.jsx(Bt, { card: a, data: c == null ? void 0 : c.records }),
2685
+ /* @__PURE__ */ e.jsx(Ut, { card: a, data: c == null ? void 0 : c.records }),
2686
2686
  /* @__PURE__ */ e.jsx(Ye, { orientation: "horizontal" })
2687
2687
  ] });
2688
2688
  }
2689
2689
  return /* @__PURE__ */ e.jsxs(
2690
- At,
2690
+ qt,
2691
2691
  {
2692
2692
  role: "editor-visual-card",
2693
2693
  className: K("relative flex h-full flex-col rounded-none", s),
2694
2694
  ...t,
2695
2695
  children: [
2696
- n && /* @__PURE__ */ e.jsxs(Vt, { className: "flex flex-row items-start justify-between py-4", children: [
2696
+ n && /* @__PURE__ */ e.jsxs(Rt, { className: "flex flex-row items-start justify-between py-4", children: [
2697
2697
  /* @__PURE__ */ e.jsxs("div", { children: [
2698
2698
  /* @__PURE__ */ e.jsx(
2699
2699
  rs,
2700
2700
  {
2701
2701
  text: a.title,
2702
2702
  onSave: (y) => b({ ...a, title: y }),
2703
- children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-5", children: /* @__PURE__ */ e.jsx(qt, { className: "text-base", children: a.title || "Edit title..." }) })
2703
+ children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-5", children: /* @__PURE__ */ e.jsx(_t, { className: "text-base", children: a.title || "Edit title..." }) })
2704
2704
  },
2705
2705
  a.title
2706
2706
  ),
@@ -2709,7 +2709,7 @@ function Ra({
2709
2709
  {
2710
2710
  text: a.description || "",
2711
2711
  onSave: (y) => b({ ...a, description: y }),
2712
- children: /* @__PURE__ */ e.jsx(Rt, { children: a.description || "Edit description..." })
2712
+ children: /* @__PURE__ */ e.jsx(Ht, { children: a.description || "Edit description..." })
2713
2713
  },
2714
2714
  a.description
2715
2715
  )
@@ -2724,10 +2724,10 @@ function Ra({
2724
2724
  children: /* @__PURE__ */ e.jsx(_, { children: o.title })
2725
2725
  }
2726
2726
  ),
2727
- /* @__PURE__ */ e.jsx(_t, { filter: o })
2727
+ /* @__PURE__ */ e.jsx(va, { filter: o })
2728
2728
  ] })
2729
2729
  ] }),
2730
- /* @__PURE__ */ e.jsx(Ht, { className: "flex grow flex-col", children: C() })
2730
+ /* @__PURE__ */ e.jsx($t, { className: "flex grow flex-col", children: C() })
2731
2731
  ]
2732
2732
  }
2733
2733
  );
@@ -2736,7 +2736,7 @@ function Sl() {
2736
2736
  const [s, t] = V(!1), [a, n] = V(""), [l, r] = V(""), [u, o] = V(""), [c, p] = V(""), d = m((N) => N.card), b = m(
2737
2737
  (N) => N.card.customCfg
2738
2738
  ), { data: j } = Re(d), { data: h } = Hs(d), { setCardCustomCfg: g, setCustomVisualCode: C } = ie();
2739
- function O(N) {
2739
+ function I(N) {
2740
2740
  var x, v;
2741
2741
  const F = {
2742
2742
  ...N,
@@ -2778,9 +2778,9 @@ function Sl() {
2778
2778
  let N;
2779
2779
  if (b) {
2780
2780
  const F = Xs.cloneDeep(d.cfg), E = Xs.merge(F, b);
2781
- return N = O(E), N;
2781
+ return N = I(E), N;
2782
2782
  }
2783
- return a ? (N = O(JSON.parse(a)), N) : "";
2783
+ return a ? (N = I(JSON.parse(a)), N) : "";
2784
2784
  }
2785
2785
  return /* @__PURE__ */ e.jsxs(Ds, { open: s, onOpenChange: t, children: [
2786
2786
  /* @__PURE__ */ e.jsx(Fs, { asChild: !0, children: /* @__PURE__ */ e.jsx(
@@ -2790,7 +2790,7 @@ function Sl() {
2790
2790
  className: ` ${b && "border-foreground/50 dark:border-foreground/70"}`,
2791
2791
  size: "sm",
2792
2792
  variant: "outline",
2793
- children: /* @__PURE__ */ e.jsx(Ut, { className: "h-4 w-4" })
2793
+ children: /* @__PURE__ */ e.jsx(Gt, { className: "h-4 w-4" })
2794
2794
  }
2795
2795
  ) }),
2796
2796
  /* @__PURE__ */ e.jsxs(
@@ -2814,11 +2814,11 @@ function Sl() {
2814
2814
  ] })
2815
2815
  ] }),
2816
2816
  /* @__PURE__ */ e.jsxs("div", { className: "flex grow gap-2", children: [
2817
- /* @__PURE__ */ e.jsx(ps, { FallbackComponent: va, children: /* @__PURE__ */ e.jsx(Ra, { className: "w-1/2 rounded shadow-none" }) }),
2818
- /* @__PURE__ */ e.jsxs(Ca, { defaultValue: "custom-config", className: "flex w-1/2 flex-col", children: [
2819
- /* @__PURE__ */ e.jsxs(Na, { className: "justify-start rounded-sm rounded-b-none border border-b-0", children: [
2817
+ /* @__PURE__ */ e.jsx(ps, { FallbackComponent: Ca, children: /* @__PURE__ */ e.jsx(Ha, { className: "w-1/2 rounded shadow-none" }) }),
2818
+ /* @__PURE__ */ e.jsxs(Na, { defaultValue: "custom-config", className: "flex w-1/2 flex-col", children: [
2819
+ /* @__PURE__ */ e.jsxs(Sa, { className: "justify-start rounded-sm rounded-b-none border border-b-0", children: [
2820
2820
  /* @__PURE__ */ e.jsxs(is, { value: "custom-config", children: [
2821
- b && /* @__PURE__ */ e.jsx(Sa, { className: "mr-1 h-5 w-5 text-green-600" }),
2821
+ b && /* @__PURE__ */ e.jsx(wa, { className: "mr-1 h-5 w-5 text-green-600" }),
2822
2822
  b ? "Custom Config" : "Default Config"
2823
2823
  ] }),
2824
2824
  /* @__PURE__ */ e.jsx(is, { className: "", value: "output", children: "Output" }),
@@ -2918,43 +2918,43 @@ function Sl() {
2918
2918
  )
2919
2919
  ] });
2920
2920
  }
2921
- function _a(s) {
2921
+ function $a(s) {
2922
2922
  return ge({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M926.8 397.1l-396-288a31.81 31.81 0 0 0-37.6 0l-396 288a31.99 31.99 0 0 0-11.6 35.8l151.3 466a32 32 0 0 0 30.4 22.1h489.5c13.9 0 26.1-8.9 30.4-22.1l151.3-466c4.2-13.2-.5-27.6-11.7-35.8zM838.6 417l-98.5 32-200-144.7V199.9L838.6 417zM466 567.2l-89.1 122.3-55.2-169.2L466 567.2zm-116.3-96.8L484 373.3v140.8l-134.3-43.7zM512 599.2l93.9 128.9H418.1L512 599.2zm28.1-225.9l134.2 97.1L540.1 514V373.3zM558 567.2l144.3-46.9-55.2 169.2L558 567.2zm-74-367.3v104.4L283.9 449l-98.5-32L484 199.9zM169.3 470.8l86.5 28.1 80.4 246.4-53.8 73.9-113.1-348.4zM327.1 853l50.3-69h269.3l50.3 69H327.1zm414.5-33.8l-53.8-73.9 80.4-246.4 86.5-28.1-113.1 348.4z" }, child: [] }] })(s);
2923
2923
  }
2924
- function Ha(s) {
2924
+ function Pa(s) {
2925
2925
  return ge({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M128,24a8,8,0,0,0-8,8V88a8,8,0,0,0,8,8,32,32,0,1,1-27.72,16,8,8,0,0,0-2.93-10.93l-48.5-28A8,8,0,0,0,37.92,76,104,104,0,1,0,128,24ZM48.09,91.1,83,111.26A48.09,48.09,0,0,0,80,128c0,1.53.08,3,.22,4.52L41.28,143A88.16,88.16,0,0,1,48.09,91.1Zm-2.67,67.31,39-10.44A48.1,48.1,0,0,0,120,175.32v40.31A88.2,88.2,0,0,1,45.42,158.41ZM136,215.63V175.32a48,48,0,0,0,0-94.65V40.36a88,88,0,0,1,0,175.27Z" }, child: [] }] })(s);
2926
2926
  }
2927
- function $a(s) {
2927
+ function Ba(s) {
2928
2928
  return ge({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm87.63,96H191.48A64.1,64.1,0,0,0,136,64.52V40.37A88.13,88.13,0,0,1,215.63,120ZM120,120H80.68A48.09,48.09,0,0,1,120,80.68Zm0,16v39.32A48.09,48.09,0,0,1,80.68,136Zm16,0h39.32A48.09,48.09,0,0,1,136,175.32Zm0-16V80.68A48.09,48.09,0,0,1,175.32,120ZM120,40.37V64.52A64.1,64.1,0,0,0,64.52,120H40.37A88.13,88.13,0,0,1,120,40.37ZM40.37,136H64.52A64.1,64.1,0,0,0,120,191.48v24.15A88.13,88.13,0,0,1,40.37,136ZM136,215.63V191.48A64.1,64.1,0,0,0,191.48,136h24.15A88.13,88.13,0,0,1,136,215.63Z" }, child: [] }] })(s);
2929
2929
  }
2930
- function Pa(s) {
2930
+ function Ua(s) {
2931
2931
  return ge({ tag: "svg", attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M6 16m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" }, child: [] }, { tag: "path", attr: { d: "M16 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }, child: [] }, { tag: "path", attr: { d: "M14.5 7.5m-4.5 0a4.5 4.5 0 1 0 9 0a4.5 4.5 0 1 0 -9 0" }, child: [] }] })(s);
2932
2932
  }
2933
- function Ba(s) {
2933
+ function Ga(s) {
2934
2934
  return ge({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "m2 19.99 7.5-7.51 4 4 7.09-7.97L22 9.92l-8.5 9.56-4-4-6 6.01-1.5-1.5zm1.5-4.5 6-6.01 4 4L22 3.92l-1.41-1.41-7.09 7.97-4-4L2 13.99l1.5 1.5z" }, child: [] }] })(s);
2935
2935
  }
2936
- function Ua(s) {
2936
+ function Qa(s) {
2937
2937
  return ge({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M4 9h4v11H4zM4 4h4v4H4zM10 7h4v4h-4zM16 10h4v4h-4zM16 15h4v5h-4zM10 12h4v8h-4z" }, child: [] }] })(s);
2938
2938
  }
2939
- function Ga(s) {
2939
+ function Ja(s) {
2940
2940
  return ge({ tag: "svg", attr: { version: "1.2", baseProfile: "tiny", viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 18c-.552 0-1-.448-1-1v-6.382l-.553.276c-.495.248-1.095.046-1.342-.447-.247-.494-.046-1.094.448-1.342l2-1c.31-.155.678-.139.973.044.294.183.474.504.474.851v8c0 .552-.448 1-1 1zM13 18h-5c-.404 0-.769-.244-.924-.617-.155-.374-.069-.804.217-1.09l4-4c.254-.254.394-.591.394-.95 0-.358-.14-.695-.394-.949-.508-.508-1.39-.508-1.9.001-.253.252-.393.589-.393.948 0 .552-.448 1-1 1s-1-.448-1-1c0-.894.348-1.733.98-2.364 1.265-1.263 3.464-1.263 4.727.001.632.631.979 1.471.979 2.363 0 .893-.348 1.733-.979 2.364l-2.293 2.293h2.586c.552 0 1 .448 1 1s-.448 1-1 1zM20.955 12.377c.338-.457.545-1.016.545-1.627 0-1.517-1.234-2.75-2.75-2.75-1.031 0-1.966.569-2.44 1.484-.254.49-.063 1.094.428 1.348.49.254 1.094.062 1.348-.428.128-.249.383-.404.664-.404.414 0 .75.336.75.75s-.336.75-.75.75c-.552 0-1 .448-1 1s.448 1 1 1c.689 0 1.25.561 1.25 1.25s-.561 1.25-1.25 1.25-1.25-.561-1.25-1.25c0-.552-.448-1-1-1s-1 .448-1 1c0 1.792 1.458 3.25 3.25 3.25s3.25-1.458 3.25-3.25c0-.939-.406-1.779-1.045-2.373z" }, child: [] }] })(s);
2941
2941
  }
2942
- function Qa(s) {
2942
+ function Ka(s) {
2943
2943
  return ge({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M217 25v14h78V25h-78zm0 32v46h14V71h50v32h14V57h-78zm32 32v14h14V89h-14zm-64 32v46h30v-46h-30zm48 0v14h46v-14h-46zm64 0v46h30v-46h-30zm-64 32v14h46v-14h-46zm-80 32v46h62v-46h-62zm80 0v14h46v-14h-46zm64 0v46h62v-46h-62zm-64 32v14h46v-14h-46zm-112 32v46h94v-46h-94zm112 0v14h46v-14h-46zm64 0v46h94v-46h-94zm-64 32v14h46v-14h-46zM89 313v46h126v-46H89zm144 0v14h46v-14h-46zm64 0v46h126v-46H297zm-64 32v14h46v-14h-46zM57 377v46h158v-46H57zm176 0v14h46v-14h-46zm64 0v46h158v-46H297zm-64 32v14h46v-14h-46zM25 441v46h190v-46H25zm208 0v14h46v-14h-46zm64 0v46h190v-46H297zm-64 32v14h46v-14h-46z" }, child: [] }] })(s);
2944
2944
  }
2945
- function Ja(s) {
2945
+ function Wa(s) {
2946
2946
  const [t, a] = V(null);
2947
2947
  return se(() => {
2948
2948
  s && (async () => {
2949
- const r = (await import("./lucide-react-DN-djCId.js"))[s];
2949
+ const r = (await import("./lucide-react-B9ckGV4X.js"))[s];
2950
2950
  a(r);
2951
2951
  })();
2952
2952
  }, [s]), t;
2953
2953
  }
2954
- function Ka() {
2954
+ function Ya() {
2955
2955
  const { authToken: s } = Oe(), { data: t, isLoading: a, isFetching: n, isError: l } = Ce({
2956
2956
  queryKey: ["plugins", s == null ? void 0 : s.accessToken],
2957
- queryFn: () => Gt(s == null ? void 0 : s.accessToken)
2957
+ queryFn: () => Qt(s == null ? void 0 : s.accessToken)
2958
2958
  // staleTime: Infinity,
2959
2959
  });
2960
2960
  return { data: t, isLoading: a, isFetching: n, isError: l };
@@ -2962,13 +2962,13 @@ function Ka() {
2962
2962
  function wl({
2963
2963
  onChartTypeChange: s
2964
2964
  }) {
2965
- const [t, a] = V([]), { data: n } = Ka();
2965
+ const [t, a] = V([]), { data: n } = Ya();
2966
2966
  return se(() => {
2967
2967
  (async () => {
2968
2968
  var r;
2969
2969
  if (n) {
2970
2970
  const o = (await Promise.all(
2971
- (r = n == null ? void 0 : n.plugins) == null ? void 0 : r.map(async (c) => (await Qt(c.value)).visuals.map((b) => ({
2971
+ (r = n == null ? void 0 : n.plugins) == null ? void 0 : r.map(async (c) => (await Jt(c.value)).visuals.map((b) => ({
2972
2972
  name: b.name,
2973
2973
  icon: b.icon,
2974
2974
  url: c.value
@@ -2995,7 +2995,7 @@ const kl = ({
2995
2995
  icon: t,
2996
2996
  onClick: a
2997
2997
  }) => {
2998
- const n = Ja(t || ""), l = s.charAt(0).toUpperCase();
2998
+ const n = Wa(t || ""), l = s.charAt(0).toUpperCase();
2999
2999
  return /* @__PURE__ */ e.jsx(z, { onClick: a, title: s, variant: "ghost", children: n ? /* @__PURE__ */ e.jsx(n, { className: "h-4 w-4" }) : l });
3000
3000
  };
3001
3001
  function zl() {
@@ -3044,7 +3044,7 @@ function zl() {
3044
3044
  {
3045
3045
  onClick: () => p("stackedBar"),
3046
3046
  variant: "ghost",
3047
- children: /* @__PURE__ */ e.jsx(Ua, { className: "size-5", strokeWidth: 0 })
3047
+ children: /* @__PURE__ */ e.jsx(Qa, { className: "size-5", strokeWidth: 0 })
3048
3048
  }
3049
3049
  ),
3050
3050
  /* @__PURE__ */ e.jsx(
@@ -3052,7 +3052,7 @@ function zl() {
3052
3052
  {
3053
3053
  onClick: () => p("stackedLine"),
3054
3054
  variant: "ghost",
3055
- children: /* @__PURE__ */ e.jsx(Ba, { className: "size-5", strokeWidth: 0 })
3055
+ children: /* @__PURE__ */ e.jsx(Ga, { className: "size-5", strokeWidth: 0 })
3056
3056
  }
3057
3057
  ),
3058
3058
  /* @__PURE__ */ e.jsx(
@@ -3060,7 +3060,7 @@ function zl() {
3060
3060
  {
3061
3061
  onClick: () => p("scatter"),
3062
3062
  variant: "ghost",
3063
- children: /* @__PURE__ */ e.jsx(Da, { className: "size-5" })
3063
+ children: /* @__PURE__ */ e.jsx(Ta, { className: "size-5" })
3064
3064
  }
3065
3065
  ),
3066
3066
  /* @__PURE__ */ e.jsx(
@@ -3068,7 +3068,7 @@ function zl() {
3068
3068
  {
3069
3069
  onClick: () => p("bubble"),
3070
3070
  variant: "ghost",
3071
- children: /* @__PURE__ */ e.jsx(Pa, { className: "size-4" })
3071
+ children: /* @__PURE__ */ e.jsx(Ua, { className: "size-4" })
3072
3072
  }
3073
3073
  ),
3074
3074
  /* @__PURE__ */ e.jsx(
@@ -3076,7 +3076,7 @@ function zl() {
3076
3076
  {
3077
3077
  onClick: () => p("pie"),
3078
3078
  variant: "ghost",
3079
- children: /* @__PURE__ */ e.jsx(Ia, { className: "size-5" })
3079
+ children: /* @__PURE__ */ e.jsx(Fa, { className: "size-5" })
3080
3080
  }
3081
3081
  ),
3082
3082
  /* @__PURE__ */ e.jsx(
@@ -3084,7 +3084,7 @@ function zl() {
3084
3084
  {
3085
3085
  onClick: () => p("doughnut"),
3086
3086
  variant: "ghost",
3087
- children: /* @__PURE__ */ e.jsx(Ha, { className: "size-5", strokeWidth: 1 })
3087
+ children: /* @__PURE__ */ e.jsx(Pa, { className: "size-5", strokeWidth: 1 })
3088
3088
  }
3089
3089
  ),
3090
3090
  /* @__PURE__ */ e.jsx(
@@ -3093,7 +3093,7 @@ function zl() {
3093
3093
  onClick: () => p("radar"),
3094
3094
  variant: "ghost",
3095
3095
  children: /* @__PURE__ */ e.jsx(
3096
- _a,
3096
+ $a,
3097
3097
  {
3098
3098
  className: "size-5 font-extralight",
3099
3099
  strokeWidth: 0.5
@@ -3106,7 +3106,7 @@ function zl() {
3106
3106
  {
3107
3107
  onClick: () => p("polarArea"),
3108
3108
  variant: "ghost",
3109
- children: /* @__PURE__ */ e.jsx($a, { className: "size-5" })
3109
+ children: /* @__PURE__ */ e.jsx(Ba, { className: "size-5" })
3110
3110
  }
3111
3111
  ),
3112
3112
  /* @__PURE__ */ e.jsx(
@@ -3114,7 +3114,7 @@ function zl() {
3114
3114
  {
3115
3115
  onClick: () => p("pyramid"),
3116
3116
  variant: "ghost",
3117
- children: /* @__PURE__ */ e.jsx(Qa, { className: "size-5" })
3117
+ children: /* @__PURE__ */ e.jsx(Ka, { className: "size-5" })
3118
3118
  }
3119
3119
  ),
3120
3120
  /* @__PURE__ */ e.jsx(
@@ -3122,7 +3122,7 @@ function zl() {
3122
3122
  {
3123
3123
  onClick: () => p("range"),
3124
3124
  variant: "ghost",
3125
- children: /* @__PURE__ */ e.jsx(Oa, { className: "size-5" })
3125
+ children: /* @__PURE__ */ e.jsx(Da, { className: "size-5" })
3126
3126
  }
3127
3127
  ),
3128
3128
  /* @__PURE__ */ e.jsx(
@@ -3138,7 +3138,7 @@ function zl() {
3138
3138
  {
3139
3139
  onClick: () => p("kpi"),
3140
3140
  variant: "ghost",
3141
- children: /* @__PURE__ */ e.jsx(Ga, { className: "size-6" })
3141
+ children: /* @__PURE__ */ e.jsx(Ja, { className: "size-6" })
3142
3142
  }
3143
3143
  ),
3144
3144
  /* @__PURE__ */ e.jsx(
@@ -3154,7 +3154,7 @@ function zl() {
3154
3154
  {
3155
3155
  onClick: () => p("map"),
3156
3156
  variant: "ghost",
3157
- children: /* @__PURE__ */ e.jsx(Ta, { className: "size-4" })
3157
+ children: /* @__PURE__ */ e.jsx(Ma, { className: "size-4" })
3158
3158
  }
3159
3159
  ),
3160
3160
  /* @__PURE__ */ e.jsx(
@@ -3162,7 +3162,7 @@ function zl() {
3162
3162
  {
3163
3163
  onClick: () => p("custom"),
3164
3164
  variant: "ghost",
3165
- children: /* @__PURE__ */ e.jsx(La, { className: "size-4" })
3165
+ children: /* @__PURE__ */ e.jsx(Ea, { className: "size-4" })
3166
3166
  }
3167
3167
  )
3168
3168
  ] }),
@@ -3176,40 +3176,40 @@ function Ol({
3176
3176
  customIcon: a,
3177
3177
  componentName: n
3178
3178
  }) {
3179
- const l = Ja(a || "");
3179
+ const l = Wa(a || "");
3180
3180
  switch (s) {
3181
3181
  case "bar":
3182
3182
  return /* @__PURE__ */ e.jsx(Bs, { className: t });
3183
3183
  case "line":
3184
3184
  return /* @__PURE__ */ e.jsx(Us, { className: t });
3185
3185
  case "pie":
3186
- return /* @__PURE__ */ e.jsx(Ia, { className: t });
3186
+ return /* @__PURE__ */ e.jsx(Fa, { className: t });
3187
3187
  case "radar":
3188
- return /* @__PURE__ */ e.jsx(_a, { className: t });
3188
+ return /* @__PURE__ */ e.jsx($a, { className: t });
3189
3189
  case "scatter":
3190
- return /* @__PURE__ */ e.jsx(Da, { className: t });
3190
+ return /* @__PURE__ */ e.jsx(Ta, { className: t });
3191
3191
  case "bubble":
3192
- return /* @__PURE__ */ e.jsx(Pa, { className: t });
3192
+ return /* @__PURE__ */ e.jsx(Ua, { className: t });
3193
3193
  case "doughnut":
3194
- return /* @__PURE__ */ e.jsx(Ha, { className: t });
3194
+ return /* @__PURE__ */ e.jsx(Pa, { className: t });
3195
3195
  case "stackedBar":
3196
- return /* @__PURE__ */ e.jsx(Ua, { className: "size-4 text-foreground/70" });
3196
+ return /* @__PURE__ */ e.jsx(Qa, { className: "size-4 text-foreground/70" });
3197
3197
  case "stackedLine":
3198
- return /* @__PURE__ */ e.jsx(Ba, { className: "size-4 text-foreground/70" });
3198
+ return /* @__PURE__ */ e.jsx(Ga, { className: "size-4 text-foreground/70" });
3199
3199
  case "polarArea":
3200
- return /* @__PURE__ */ e.jsx($a, { className: t });
3200
+ return /* @__PURE__ */ e.jsx(Ba, { className: t });
3201
3201
  case "pyramid":
3202
- return /* @__PURE__ */ e.jsx(Qa, { className: t });
3202
+ return /* @__PURE__ */ e.jsx(Ka, { className: t });
3203
3203
  case "range":
3204
- return /* @__PURE__ */ e.jsx(Oa, { className: t });
3204
+ return /* @__PURE__ */ e.jsx(Da, { className: t });
3205
3205
  case "kpi":
3206
- return /* @__PURE__ */ e.jsx(Ga, { className: t });
3206
+ return /* @__PURE__ */ e.jsx(Ja, { className: t });
3207
3207
  case "text":
3208
3208
  return /* @__PURE__ */ e.jsx(Gs, { className: t });
3209
3209
  case "map":
3210
- return /* @__PURE__ */ e.jsx(Ta, { className: t });
3210
+ return /* @__PURE__ */ e.jsx(Ma, { className: t });
3211
3211
  case "custom":
3212
- return a && l ? /* @__PURE__ */ e.jsx(l, { className: t }) : n ? n == null ? void 0 : n.charAt(0).toUpperCase() : /* @__PURE__ */ e.jsx(La, { className: t });
3212
+ return a && l ? /* @__PURE__ */ e.jsx(l, { className: t }) : n ? n == null ? void 0 : n.charAt(0).toUpperCase() : /* @__PURE__ */ e.jsx(Ea, { className: t });
3213
3213
  default:
3214
3214
  return /* @__PURE__ */ e.jsx(Vs, { className: t });
3215
3215
  }
@@ -3218,16 +3218,16 @@ function Il() {
3218
3218
  var t;
3219
3219
  const s = m((a) => a.card);
3220
3220
  return (t = s.customCardPreferences) == null || t.showCardHeader, ie(), /* @__PURE__ */ e.jsxs(ra, { children: [
3221
- /* @__PURE__ */ e.jsx(ia, { asChild: !0, children: /* @__PURE__ */ e.jsx(Fa, { className: "size-4 cursor-pointer text-muted-foreground/70 transition-colors hover:text-muted-foreground" }) }),
3221
+ /* @__PURE__ */ e.jsx(ia, { asChild: !0, children: /* @__PURE__ */ e.jsx(La, { className: "size-4 cursor-pointer text-muted-foreground/70 transition-colors hover:text-muted-foreground" }) }),
3222
3222
  /* @__PURE__ */ e.jsx(oa, { align: "start", className: "w-40 text-muted-foreground", children: /* @__PURE__ */ e.jsxs(
3223
- Jt,
3223
+ Kt,
3224
3224
  {
3225
3225
  onClick: () => {
3226
3226
  navigator.clipboard.writeText(s.id), We.success("Card ID copied to clipboard");
3227
3227
  },
3228
3228
  className: "cursor-pointer space-x-2",
3229
3229
  children: [
3230
- /* @__PURE__ */ e.jsx(Kt, { className: "size-5" }),
3230
+ /* @__PURE__ */ e.jsx(Wt, { className: "size-5" }),
3231
3231
  /* @__PURE__ */ e.jsx("span", { children: "Copy Card ID" })
3232
3232
  ]
3233
3233
  }
@@ -3276,7 +3276,7 @@ function ta() {
3276
3276
  };
3277
3277
  g(x);
3278
3278
  }
3279
- function O(x) {
3279
+ function I(x) {
3280
3280
  const v = s.cards.filter((S) => S.id !== x), f = v[0], k = {
3281
3281
  ...s,
3282
3282
  cards: v,
@@ -3322,14 +3322,14 @@ function ta() {
3322
3322
  }
3323
3323
  function F() {
3324
3324
  return /* @__PURE__ */ e.jsxs(
3325
- Ca,
3325
+ Na,
3326
3326
  {
3327
3327
  onValueChange: y,
3328
3328
  value: s.activeCardId,
3329
3329
  className: "flex grow flex-col",
3330
3330
  children: [
3331
3331
  s.cards.map((x) => /* @__PURE__ */ e.jsx(os, { className: "mt-0 grow", value: x.id, children: E() }, x.id)),
3332
- /* @__PURE__ */ e.jsx(Na, { className: "group mx-6 justify-between", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
3332
+ /* @__PURE__ */ e.jsx(Sa, { className: "group mx-6 justify-between", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
3333
3333
  s.cards.map((x, v) => /* @__PURE__ */ e.jsx(
3334
3334
  rs,
3335
3335
  {
@@ -3350,10 +3350,10 @@ function ta() {
3350
3350
  N(s, x),
3351
3351
  x.tabTitle || x.title,
3352
3352
  s.activeCardId === x.id && s.cards.length > 1 && /* @__PURE__ */ e.jsx(
3353
- wa,
3353
+ ka,
3354
3354
  {
3355
3355
  className: "ml-2 size-3.5 text-muted-foreground hover:text-foreground",
3356
- onClick: () => O(x.id)
3356
+ onClick: () => I(x.id)
3357
3357
  }
3358
3358
  )
3359
3359
  ]
@@ -3386,14 +3386,14 @@ function ta() {
3386
3386
  );
3387
3387
  }
3388
3388
  function E() {
3389
- return t.type === "kpi" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(Wt, { card: t, data: d == null ? void 0 : d.records }) }) }) : t.type === "text" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(ze, { className: "mx-3 my-6 h-[300px] overflow-y-auto break-words px-3", children: /* @__PURE__ */ e.jsx(
3390
- Yt,
3389
+ return t.type === "kpi" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(Yt, { card: t, data: d == null ? void 0 : d.records }) }) }) : t.type === "text" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(ze, { className: "mx-3 my-6 h-[300px] overflow-y-auto break-words px-3", children: /* @__PURE__ */ e.jsx(
3390
+ Xt,
3391
3391
  {
3392
3392
  isLoading: n,
3393
3393
  card: t,
3394
3394
  data: d == null ? void 0 : d.records
3395
3395
  }
3396
- ) }) }) }) : /* @__PURE__ */ e.jsx(ps, { FallbackComponent: va, children: /* @__PURE__ */ e.jsx(Ra, { className: "grow border-none shadow-none" }) });
3396
+ ) }) }) }) : /* @__PURE__ */ e.jsx(ps, { FallbackComponent: Ca, children: /* @__PURE__ */ e.jsx(Ha, { className: "grow border-none shadow-none" }) });
3397
3397
  }
3398
3398
  return /* @__PURE__ */ e.jsxs("div", { className: "relative flex h-full flex-col py-3", children: [
3399
3399
  (b || j) && /* @__PURE__ */ e.jsx(qe, { className: "absolute bottom-0 left-0 right-0 top-0 z-50 m-auto h-10 w-10 animate-spin text-foreground/10" }),
@@ -3463,7 +3463,7 @@ function Fl() {
3463
3463
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
3464
3464
  /* @__PURE__ */ e.jsx(_, { htmlFor: "visualize", children: "Chart" }),
3465
3465
  /* @__PURE__ */ e.jsx(
3466
- Xt,
3466
+ Zt,
3467
3467
  {
3468
3468
  checked: s,
3469
3469
  onCheckedChange: () => t(!s),
@@ -3527,7 +3527,7 @@ function Qe({
3527
3527
  children: [
3528
3528
  /* @__PURE__ */ e.jsxs("summary", { className: "flex cursor-pointer list-none items-center justify-between gap-4", children: [
3529
3529
  /* @__PURE__ */ e.jsx(_, { children: t }),
3530
- /* @__PURE__ */ e.jsx(Zt, { className: "h-4 w-4" })
3530
+ /* @__PURE__ */ e.jsx(en, { className: "h-4 w-4" })
3531
3531
  ] }),
3532
3532
  /* @__PURE__ */ e.jsx("div", { className: "transition-all ease-in-out", children: s })
3533
3533
  ]
@@ -3535,10 +3535,10 @@ function Qe({
3535
3535
  );
3536
3536
  }
3537
3537
  function Ll() {
3538
- var C, O;
3538
+ var C, I;
3539
3539
  const s = m(
3540
3540
  (y) => y.card.customCardPreferences
3541
- ), { data: t } = Ka(), a = (t == null ? void 0 : t.plugins) || [], n = m((y) => y.card), l = m((y) => y.frame), r = (s == null ? void 0 : s.visualType) || "single", { setCustomCardPreferences: u } = ie(), { components: o, manifest: c } = ba(
3541
+ ), { data: t } = Ya(), a = (t == null ? void 0 : t.plugins) || [], n = m((y) => y.card), l = m((y) => y.frame), r = (s == null ? void 0 : s.visualType) || "single", { setCustomCardPreferences: u } = ie(), { components: o, manifest: c } = ba(
3542
3542
  (s == null ? void 0 : s.url) || ""
3543
3543
  ), p = (C = c == null ? void 0 : c.visuals) == null ? void 0 : C.find(
3544
3544
  (y) => y.name === (s == null ? void 0 : s.componentName)
@@ -3700,7 +3700,7 @@ function Ll() {
3700
3700
  ] }) })
3701
3701
  ] }) }) }),
3702
3702
  /* @__PURE__ */ e.jsx(we, { className: "my-4" }),
3703
- ((O = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : O.componentName) && /* @__PURE__ */ e.jsxs(Qe, { summary: "Component Settings", children: [
3703
+ ((I = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : I.componentName) && /* @__PURE__ */ e.jsxs(Qe, { summary: "Component Settings", children: [
3704
3704
  p && p.dataInputs && /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
3705
3705
  /* @__PURE__ */ e.jsx(_, { children: "Input Mapping" }),
3706
3706
  /* @__PURE__ */ e.jsx("div", { className: "px-2", children: b(p) })
@@ -3862,10 +3862,10 @@ function ys() {
3862
3862
  const ns = "focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0";
3863
3863
  function na(s, t) {
3864
3864
  var n, l, r;
3865
- const a = ka(s, t);
3865
+ const a = za(s, t);
3866
3866
  return ((r = (l = (n = s == null ? void 0 : s.chartOptions) == null ? void 0 : n.scales) == null ? void 0 : l[a]) == null ? void 0 : r.type) || "linear";
3867
3867
  }
3868
- function Wa() {
3868
+ function Xa() {
3869
3869
  var Z, B, X, w, H, ae;
3870
3870
  const [s, t] = V(!1), a = m((M) => {
3871
3871
  var T;
@@ -3873,13 +3873,13 @@ function Wa() {
3873
3873
  }), n = m((M) => {
3874
3874
  var T;
3875
3875
  return (T = M.card) == null ? void 0 : T.cfg;
3876
- }), l = ka(a, n), [r, u] = V(
3876
+ }), l = za(a, n), [r, u] = V(
3877
3877
  na(a)
3878
3878
  ), [o, c] = V(
3879
3879
  ((X = (B = (Z = a == null ? void 0 : a.chartOptions) == null ? void 0 : Z.scales) == null ? void 0 : B[l]) == null ? void 0 : X.min) || ""
3880
3880
  ), [p, d] = V(
3881
3881
  ((ae = (H = (w = a == null ? void 0 : a.chartOptions) == null ? void 0 : w.scales) == null ? void 0 : H[l]) == null ? void 0 : ae.max) || ""
3882
- ), [b, j] = V(o || p ? "custom" : "auto"), [h, g] = V(""), [C, O] = V(0), [y, L] = V(""), [D, A] = V(""), [N, F] = V(""), E = m(
3882
+ ), [b, j] = V(o || p ? "custom" : "auto"), [h, g] = V(""), [C, I] = V(0), [y, L] = V(""), [D, A] = V(""), [N, F] = V(""), E = m(
3883
3883
  (M) => M.actions.setCardPreferences
3884
3884
  ), { updateCardInFrame: x } = ie(), v = m((M) => M.card), f = m((M) => {
3885
3885
  var T;
@@ -3891,7 +3891,7 @@ function Wa() {
3891
3891
  ((te = (T = (M = a == null ? void 0 : a.chartOptions) == null ? void 0 : M.scales) == null ? void 0 : T[l]) == null ? void 0 : te.min) === 0 ? 0 : ""
3892
3892
  ), d(((ne = (ee = (P = a == null ? void 0 : a.chartOptions) == null ? void 0 : P.scales) == null ? void 0 : ee[l]) == null ? void 0 : ne.max) || ""), g(
3893
3893
  ((be = (je = (Ie = (Ee = a == null ? void 0 : a.chartOptions) == null ? void 0 : Ee.scales) == null ? void 0 : Ie[l]) == null ? void 0 : je.ticks) == null ? void 0 : be.stepSize) || ""
3894
- ), O(((W = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : W.decimalPlaces) || 0), L(((oe = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : oe.suffix) || ""), A(((ce = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : ce.currency) || ""), F(((De = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : De.locale) || "");
3894
+ ), I(((W = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : W.decimalPlaces) || 0), L(((oe = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : oe.suffix) || ""), A(((ce = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : ce.currency) || ""), F(((De = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : De.locale) || "");
3895
3895
  }, [s, a, l]);
3896
3896
  function S(M, T) {
3897
3897
  return T === "" || /^[0-9\b]+$/.test(T) ? Number(T) : Number(M);
@@ -3952,7 +3952,7 @@ function Wa() {
3952
3952
  re,
3953
3953
  {
3954
3954
  value: C,
3955
- onChange: (T) => O(Number(T.target.value)),
3955
+ onChange: (T) => I(Number(T.target.value)),
3956
3956
  id: "format",
3957
3957
  className: `col-span-6 h-8 w-full tracking-wide ${ns}`
3958
3958
  }
@@ -4035,7 +4035,7 @@ function Wa() {
4035
4035
  x(te);
4036
4036
  }
4037
4037
  return /* @__PURE__ */ e.jsxs(fs, { onOpenChange: (M) => t(M), children: [
4038
- /* @__PURE__ */ e.jsx(gs, { asChild: !0, children: /* @__PURE__ */ e.jsx(en, { className: "size-4 cursor-pointer text-muted-foreground hover:text-foreground" }) }),
4038
+ /* @__PURE__ */ e.jsx(gs, { asChild: !0, children: /* @__PURE__ */ e.jsx(sn, { className: "size-4 cursor-pointer text-muted-foreground hover:text-foreground" }) }),
4039
4039
  /* @__PURE__ */ e.jsx(js, { align: "center", className: "max-w-65", children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-4", children: [
4040
4040
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
4041
4041
  /* @__PURE__ */ e.jsx("h4", { className: "font-medium leading-none", children: "Scale Options" }),
@@ -4087,7 +4087,7 @@ function Wa() {
4087
4087
  ] }),
4088
4088
  b === "custom" && r == "linear" && $(),
4089
4089
  q(),
4090
- /* @__PURE__ */ e.jsx(sn, {}),
4090
+ /* @__PURE__ */ e.jsx(an, {}),
4091
4091
  /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-3", children: /* @__PURE__ */ e.jsx(
4092
4092
  z,
4093
4093
  {
@@ -4115,7 +4115,7 @@ function Ml({ idx: s }) {
4115
4115
  (c) => c.actions.setCardPreferences
4116
4116
  ), l = (o = t == null ? void 0 : t.chartOptions) == null ? void 0 : o.indexAxis, r = a == null ? void 0 : a.find((c) => c.idx === s);
4117
4117
  function u(c, p) {
4118
- (c === "end" || c === "start") && an(tn());
4118
+ (c === "end" || c === "start") && tn(nn());
4119
4119
  const d = {
4120
4120
  display: c !== "none",
4121
4121
  align: c,
@@ -4155,7 +4155,7 @@ function Ml({ idx: s }) {
4155
4155
  size: "sm",
4156
4156
  variant: "secondary",
4157
4157
  className: "h-7 p-1 text-xs font-normal",
4158
- children: /* @__PURE__ */ e.jsx(wa, { className: "size-4" })
4158
+ children: /* @__PURE__ */ e.jsx(ka, { className: "size-4" })
4159
4159
  }
4160
4160
  ),
4161
4161
  /* @__PURE__ */ e.jsx(
@@ -4212,7 +4212,7 @@ function Ml({ idx: s }) {
4212
4212
  ] }) })
4213
4213
  ] });
4214
4214
  }
4215
- function Ya() {
4215
+ function Za() {
4216
4216
  const s = m((p) => p.card), t = m(
4217
4217
  (p) => {
4218
4218
  var d, b, j;
@@ -4225,7 +4225,7 @@ function Ya() {
4225
4225
  } = ws((a == null ? void 0 : a.records) || []);
4226
4226
  let c = u;
4227
4227
  if (["stackedBar", "stackedLine"].includes(s.type)) {
4228
- const p = nn({
4228
+ const p = ln({
4229
4229
  dataArray: (a == null ? void 0 : a.records) || [],
4230
4230
  groupKey: o[0],
4231
4231
  pivotKey: o[1],
@@ -4241,7 +4241,7 @@ function Ya() {
4241
4241
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
4242
4242
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-5", children: [
4243
4243
  /* @__PURE__ */ e.jsx(_, { children: l }),
4244
- /* @__PURE__ */ e.jsx(Wa, {})
4244
+ /* @__PURE__ */ e.jsx(Xa, {})
4245
4245
  ] }),
4246
4246
  /* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: c.map((p, d) => /* @__PURE__ */ e.jsx(El, { col: p, idx: d }, p)) })
4247
4247
  ] })
@@ -4310,13 +4310,13 @@ function El({ col: s, idx: t }) {
4310
4310
  ] })
4311
4311
  ] });
4312
4312
  }
4313
- function Xa() {
4314
- const s = m((j) => j.selectedConnectionId), t = m((j) => j.selectedDatamodelId), a = m((j) => j.selectedDatabaseName), n = m((j) => j.selectedSchemaName), l = m((j) => j.selectedTableName), r = I((j) => j.dashboard.filters) || [], u = I((j) => j.actions.addFilter), o = I((j) => j.actions.removeFilter), { removeFilterValues: c } = xs(), { modelItems: p, tableName: d } = _e();
4313
+ function et() {
4314
+ const s = m((j) => j.selectedConnectionId), t = m((j) => j.selectedDatamodelId), a = m((j) => j.selectedDatabaseName), n = m((j) => j.selectedSchemaName), l = m((j) => j.selectedTableName), r = O((j) => j.dashboard.filters) || [], u = O((j) => j.actions.addFilter), o = O((j) => j.actions.removeFilter), { removeFilterValues: c } = xs(), { modelItems: p, tableName: d } = _e();
4315
4315
  function b(j, h = "dashboard") {
4316
4316
  var F;
4317
- const g = de(j.column_name), C = de(a || ""), O = de(n || ""), y = de(d);
4317
+ const g = de(j.column_name), C = de(a || ""), I = de(n || ""), y = de(d);
4318
4318
  let L = ga(
4319
- O,
4319
+ I,
4320
4320
  y
4321
4321
  ), D = `${L}.${g}`;
4322
4322
  const A = (F = p == null ? void 0 : p.find(
@@ -4372,9 +4372,9 @@ function Xa() {
4372
4372
  return { assignFilter: b };
4373
4373
  }
4374
4374
  function He() {
4375
- const s = I(
4375
+ const s = O(
4376
4376
  (o) => o.dashboard.filters
4377
- ), t = m((o) => o.frame), { setFrame: a } = ie(), { columns: n } = _e(), { assignFilter: l } = Xa();
4377
+ ), t = m((o) => o.frame), { setFrame: a } = ie(), { columns: n } = _e(), { assignFilter: l } = et();
4378
4378
  function r(o) {
4379
4379
  const c = l(o, "frame");
4380
4380
  a({ ...t, filterId: c });
@@ -4383,7 +4383,7 @@ function He() {
4383
4383
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
4384
4384
  /* @__PURE__ */ e.jsx(_, { children: "Card Filter" }),
4385
4385
  /* @__PURE__ */ e.jsx(Al, { onSelect: r, columns: n }),
4386
- u && /* @__PURE__ */ e.jsx(ln, { filter: u })
4386
+ u && /* @__PURE__ */ e.jsx(Oa, { filter: u })
4387
4387
  ] });
4388
4388
  }
4389
4389
  function Al({
@@ -4422,7 +4422,7 @@ function Al({
4422
4422
  children: [
4423
4423
  o.column_name,
4424
4424
  /* @__PURE__ */ e.jsx(
4425
- Sa,
4425
+ wa,
4426
4426
  {
4427
4427
  className: K(
4428
4428
  "ml-auto h-4 w-4",
@@ -4471,7 +4471,7 @@ function Vl({
4471
4471
  /* @__PURE__ */ e.jsx(Q, { children: "Settings" }),
4472
4472
  /* @__PURE__ */ e.jsxs(J, { className: "space-y-4 px-2", children: [
4473
4473
  /* @__PURE__ */ e.jsx(ys, {}),
4474
- /* @__PURE__ */ e.jsx(Ya, {})
4474
+ /* @__PURE__ */ e.jsx(Za, {})
4475
4475
  ] })
4476
4476
  ] }),
4477
4477
  /* @__PURE__ */ e.jsxs(G, { value: "item-3", children: [
@@ -4512,7 +4512,7 @@ function Qs() {
4512
4512
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
4513
4513
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
4514
4514
  /* @__PURE__ */ e.jsx("label", { className: "font-medium", children: "Data Labels" }),
4515
- !["pyramid"].includes(a) && /* @__PURE__ */ e.jsx(Wa, {})
4515
+ !["pyramid"].includes(a) && /* @__PURE__ */ e.jsx(Xa, {})
4516
4516
  ] }),
4517
4517
  /* @__PURE__ */ e.jsxs(
4518
4518
  me,
@@ -4785,12 +4785,12 @@ function Pl() {
4785
4785
  {
4786
4786
  value: n || "none",
4787
4787
  onValueChange: (h) => {
4788
- var g, C, O;
4788
+ var g, C, I;
4789
4789
  return a(
4790
4790
  ((g = s == null ? void 0 : s.formatNumber) == null ? void 0 : g.decimalPlaces) || 0,
4791
4791
  ((C = s == null ? void 0 : s.formatNumber) == null ? void 0 : C.currency) || "",
4792
4792
  h,
4793
- ((O = s == null ? void 0 : s.formatNumber) == null ? void 0 : O.suffix) || ""
4793
+ ((I = s == null ? void 0 : s.formatNumber) == null ? void 0 : I.suffix) || ""
4794
4794
  );
4795
4795
  },
4796
4796
  children: [
@@ -4811,12 +4811,12 @@ function Pl() {
4811
4811
  {
4812
4812
  value: l || "none",
4813
4813
  onValueChange: (h) => {
4814
- var g, C, O;
4814
+ var g, C, I;
4815
4815
  console.log("currency", h), a(
4816
4816
  ((g = s == null ? void 0 : s.formatNumber) == null ? void 0 : g.decimalPlaces) || 0,
4817
4817
  h === "none" ? "" : h,
4818
4818
  ((C = s == null ? void 0 : s.formatNumber) == null ? void 0 : C.locale) || "",
4819
- ((O = s == null ? void 0 : s.formatNumber) == null ? void 0 : O.suffix) || ""
4819
+ ((I = s == null ? void 0 : s.formatNumber) == null ? void 0 : I.suffix) || ""
4820
4820
  );
4821
4821
  },
4822
4822
  children: [
@@ -4839,12 +4839,12 @@ function Pl() {
4839
4839
  {
4840
4840
  value: ((b = (d = s == null ? void 0 : s.formatNumber) == null ? void 0 : d.decimalPlaces) == null ? void 0 : b.toString()) || "0",
4841
4841
  onValueChange: (h) => {
4842
- var g, C, O;
4842
+ var g, C, I;
4843
4843
  return a(
4844
4844
  Number(h),
4845
4845
  ((g = s == null ? void 0 : s.formatNumber) == null ? void 0 : g.currency) || "",
4846
4846
  ((C = s == null ? void 0 : s.formatNumber) == null ? void 0 : C.locale) || "",
4847
- ((O = s == null ? void 0 : s.formatNumber) == null ? void 0 : O.suffix) || ""
4847
+ ((I = s == null ? void 0 : s.formatNumber) == null ? void 0 : I.suffix) || ""
4848
4848
  );
4849
4849
  },
4850
4850
  children: [
@@ -4863,11 +4863,11 @@ function Pl() {
4863
4863
  className: "h-8 font-mono text-xs focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0",
4864
4864
  placeholder: "K, M, B, %",
4865
4865
  onChange: (h) => {
4866
- var g, C, O;
4866
+ var g, C, I;
4867
4867
  return a(
4868
4868
  ((g = s == null ? void 0 : s.formatNumber) == null ? void 0 : g.decimalPlaces) || 0,
4869
4869
  ((C = s == null ? void 0 : s.formatNumber) == null ? void 0 : C.currency) || "",
4870
- ((O = s == null ? void 0 : s.formatNumber) == null ? void 0 : O.locale) || "",
4870
+ ((I = s == null ? void 0 : s.formatNumber) == null ? void 0 : I.locale) || "",
4871
4871
  h.target.value
4872
4872
  );
4873
4873
  }
@@ -5019,7 +5019,7 @@ const Ul = [
5019
5019
  value: s
5020
5020
  }));
5021
5021
  function Jl() {
5022
- var c, p, d, b, j, h, g, C, O, y, L, D, A, N, F, E, x, v;
5022
+ var c, p, d, b, j, h, g, C, I, y, L, D, A, N, F, E, x, v;
5023
5023
  const s = m((f) => f.card), t = (p = (c = s == null ? void 0 : s.preferences) == null ? void 0 : c.mapVisualOptions) == null ? void 0 : p.topoJsonUrl, [a, n] = V(
5024
5024
  ((b = (d = s == null ? void 0 : s.preferences) == null ? void 0 : d.mapVisualOptions) == null ? void 0 : b.customTopoJsonUrl) || ""
5025
5025
  ), { setCardPreferences: l } = ie(), { data: r } = Hs(s), u = Object.keys((r == null ? void 0 : r.objects) || {}).map((f) => ({
@@ -5134,7 +5134,7 @@ function Jl() {
5134
5134
  {
5135
5135
  className: "h-9",
5136
5136
  options: Ql,
5137
- value: ((y = (O = s.preferences) == null ? void 0 : O.mapVisualOptions) == null ? void 0 : y.colorScale) || "",
5137
+ value: ((y = (I = s.preferences) == null ? void 0 : I.mapVisualOptions) == null ? void 0 : y.colorScale) || "",
5138
5138
  label: "Select Color Scale",
5139
5139
  onValueChange: (f) => {
5140
5140
  var k;
@@ -5371,7 +5371,7 @@ function Wl() {
5371
5371
  /* @__PURE__ */ e.jsxs(J, { className: "space-y-4 px-2", children: [
5372
5372
  /* @__PURE__ */ e.jsx(ys, {}),
5373
5373
  a(),
5374
- /* @__PURE__ */ e.jsx(Ya, {})
5374
+ /* @__PURE__ */ e.jsx(Za, {})
5375
5375
  ] })
5376
5376
  ] }),
5377
5377
  /* @__PURE__ */ e.jsxs(G, { value: "item-3", children: [
@@ -5557,13 +5557,13 @@ function ar() {
5557
5557
  );
5558
5558
  }
5559
5559
  function tr({ authToken: s, onSave: t, onClose: a }) {
5560
- I((u) => u.themeStyle);
5561
- const n = m((u) => u.actions.setOnSave), l = m((u) => u.actions.setOnClose), r = I((u) => u.actions.setAuthToken);
5560
+ O((u) => u.themeStyle);
5561
+ const n = m((u) => u.actions.setOnSave), l = m((u) => u.actions.setOnClose), r = O((u) => u.actions.setAuthToken);
5562
5562
  return se(() => {
5563
5563
  t && n(t), a && l(a);
5564
5564
  }, [t, n, a, l]), se(() => {
5565
5565
  s && s.accessToken && r(s);
5566
- }, [s, r]), /* @__PURE__ */ e.jsx(ps, { FallbackComponent: za, children: /* @__PURE__ */ e.jsxs(
5566
+ }, [s, r]), /* @__PURE__ */ e.jsx(ps, { FallbackComponent: Ia, children: /* @__PURE__ */ e.jsxs(
5567
5567
  pn,
5568
5568
  {
5569
5569
  style: {
@@ -5573,15 +5573,15 @@ function tr({ authToken: s, onSave: t, onClose: a }) {
5573
5573
  className: "rounded-none",
5574
5574
  role: "editor-panel",
5575
5575
  children: [
5576
- /* @__PURE__ */ e.jsx(fn, { className: "rounded-none border-r-[1.5px]", children: /* @__PURE__ */ e.jsx(Aa, {}) }),
5576
+ /* @__PURE__ */ e.jsx(fn, { className: "rounded-none border-r-[1.5px]", children: /* @__PURE__ */ e.jsx(qa, {}) }),
5577
5577
  /* @__PURE__ */ e.jsx(gn, { children: /* @__PURE__ */ e.jsx(ar, {}) })
5578
5578
  ]
5579
5579
  }
5580
5580
  ) });
5581
5581
  }
5582
5582
  function nr() {
5583
- I((u) => u.selectedCardId);
5584
- const s = I((u) => u.selectedSheetId), { setIsVisualEditing: t } = I((u) => u.actions), a = I((u) => u.isVisualEditing), n = I((u) => u.actions.updateFrame);
5583
+ O((u) => u.selectedCardId);
5584
+ const s = O((u) => u.selectedSheetId), { setIsVisualEditing: t } = O((u) => u.actions), a = O((u) => u.isVisualEditing), n = O((u) => u.actions.updateFrame);
5585
5585
  function l(u) {
5586
5586
  s && (n(s, u), t(!1));
5587
5587
  }
@@ -5600,7 +5600,7 @@ function nr() {
5600
5600
  );
5601
5601
  }
5602
5602
  function lr() {
5603
- const s = m((r) => r.selectedDatabaseName), t = m((r) => r.selectedTableName), a = I((r) => r.dashboard.filters) || [], { columns: n } = _e(), { assignFilter: l } = Xa();
5603
+ const s = m((r) => r.selectedDatabaseName), t = m((r) => r.selectedTableName), a = O((r) => r.dashboard.filters) || [], { columns: n } = _e(), { assignFilter: l } = et();
5604
5604
  return /* @__PURE__ */ e.jsx("div", { className: "xbg-red-100 flex-1 basis-0 flex-col overflow-scroll px-3", children: n == null ? void 0 : n.map((r) => {
5605
5605
  const u = a == null ? void 0 : a.find(
5606
5606
  (o) => o.column === de(r.column_name) && o.table === t && o.database === s
@@ -5616,7 +5616,7 @@ function lr() {
5616
5616
  }
5617
5617
  ),
5618
5618
  children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
5619
- /* @__PURE__ */ e.jsx(Ea, { column: r }),
5619
+ /* @__PURE__ */ e.jsx(Va, { column: r }),
5620
5620
  /* @__PURE__ */ e.jsx("span", { children: r.column_name })
5621
5621
  ] })
5622
5622
  },
@@ -5625,8 +5625,8 @@ function lr() {
5625
5625
  }) });
5626
5626
  }
5627
5627
  function rr() {
5628
- I((t) => t.showFilters);
5629
- const s = I(
5628
+ O((t) => t.showFilters);
5629
+ const s = O(
5630
5630
  (t) => t.actions.setShowFilters
5631
5631
  );
5632
5632
  return /* @__PURE__ */ e.jsxs("section", { className: "relative flex grow flex-col border-l px-4", children: [
@@ -5643,7 +5643,7 @@ function rr() {
5643
5643
  )
5644
5644
  ] }),
5645
5645
  /* @__PURE__ */ e.jsx("div", { className: "flex grow", children: /* @__PURE__ */ e.jsx(
5646
- Aa,
5646
+ qa,
5647
5647
  {
5648
5648
  ColumnsComponent: () => (
5649
5649
  // schemaName, tableName, columns
@@ -5657,7 +5657,23 @@ function rr() {
5657
5657
  ] });
5658
5658
  }
5659
5659
  function ir() {
5660
- const s = I((a) => a.showFilters), t = I((a) => a.isVisualEditing);
5660
+ const s = O((n) => n.dashboard.filters), t = O((n) => n.theme), a = s == null ? void 0 : s.filter((n) => n.hide);
5661
+ return a != null && a.length ? /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
5662
+ "div",
5663
+ {
5664
+ className: K("mb-2 flex items-center gap-2 border-b px-1", {
5665
+ "bg-[repeating-linear-gradient(45deg,_#ffffff_0_3px,_#f3f3f3_3px_6px)]": t === "light",
5666
+ "bg-[repeating-linear-gradient(45deg,_#18171d_0_3px,_#272729_3px_6px)]": t === "dark"
5667
+ }),
5668
+ children: a == null ? void 0 : a.map((n) => /* @__PURE__ */ e.jsxs("div", { className: "flex w-[250px] flex-col gap-1 p-2", children: [
5669
+ /* @__PURE__ */ e.jsx(Oa, { filter: n }),
5670
+ /* @__PURE__ */ e.jsx(va, { filter: n })
5671
+ ] }, n.id))
5672
+ }
5673
+ ) }) : null;
5674
+ }
5675
+ function or() {
5676
+ const s = O((a) => a.showFilters), t = O((a) => a.isVisualEditing);
5661
5677
  return /* @__PURE__ */ e.jsxs(
5662
5678
  "div",
5663
5679
  {
@@ -5667,17 +5683,20 @@ function ir() {
5667
5683
  "flex grow": !t
5668
5684
  }),
5669
5685
  children: [
5670
- /* @__PURE__ */ e.jsx(jn, {}),
5686
+ /* @__PURE__ */ e.jsxs("section", { className: "flex grow flex-col", children: [
5687
+ /* @__PURE__ */ e.jsx(ir, {}),
5688
+ /* @__PURE__ */ e.jsx(jn, {})
5689
+ ] }),
5671
5690
  s && /* @__PURE__ */ e.jsx("div", { role: "filter-aside-container", className: "flex", children: /* @__PURE__ */ e.jsx(rr, {}) })
5672
5691
  ]
5673
5692
  }
5674
5693
  );
5675
5694
  }
5676
- function or() {
5677
- const s = I((n) => n.dashboard), t = I((n) => n.actions.setDashboard), a = I(
5695
+ function cr() {
5696
+ const s = O((n) => n.dashboard), t = O((n) => n.actions.setDashboard), a = O(
5678
5697
  (n) => n.showDashboardJSON
5679
5698
  );
5680
- return I(
5699
+ return O(
5681
5700
  (n) => n.actions.setShowDashboardJSON
5682
5701
  ), /* @__PURE__ */ e.jsx(
5683
5702
  "div",
@@ -5717,34 +5736,34 @@ function or() {
5717
5736
  }
5718
5737
  );
5719
5738
  }
5720
- function mr({
5739
+ function hr({
5721
5740
  showControls: s = !1,
5722
5741
  showFooter: t = !0,
5723
5742
  ...a
5724
5743
  }) {
5725
- return /* @__PURE__ */ e.jsx(ps, { FallbackComponent: za, children: /* @__PURE__ */ e.jsxs(yn, { dashboardProps: a, children: [
5744
+ return /* @__PURE__ */ e.jsx(ps, { FallbackComponent: Ia, children: /* @__PURE__ */ e.jsxs(yn, { dashboardProps: a, children: [
5726
5745
  /* @__PURE__ */ e.jsx(vn, {}),
5727
5746
  /* @__PURE__ */ e.jsxs(Cn, { children: [
5728
- /* @__PURE__ */ e.jsx(or, {}),
5747
+ /* @__PURE__ */ e.jsx(cr, {}),
5729
5748
  /* @__PURE__ */ e.jsxs(Nn, { ...a, children: [
5730
5749
  s && /* @__PURE__ */ e.jsx(ll, {}),
5731
5750
  /* @__PURE__ */ e.jsx(nr, {}),
5732
- /* @__PURE__ */ e.jsx(ir, {})
5751
+ /* @__PURE__ */ e.jsx(or, {})
5733
5752
  ] })
5734
5753
  ] })
5735
5754
  ] }) });
5736
5755
  }
5737
5756
  export {
5738
- Ma as A,
5757
+ Aa as A,
5739
5758
  kn as B,
5740
5759
  zn as C,
5741
- mr as D,
5742
- Fa as E,
5760
+ hr as D,
5761
+ La as E,
5743
5762
  Xn as F,
5744
5763
  Mn as G,
5745
5764
  En as H,
5746
5765
  qn as L,
5747
- Ta as M,
5766
+ Ma as M,
5748
5767
  $n as N,
5749
5768
  Pn as P,
5750
5769
  Un as S,
@@ -5752,9 +5771,9 @@ export {
5752
5771
  Yn as U,
5753
5772
  Bs as a,
5754
5773
  Us as b,
5755
- Oa as c,
5756
- Ia as d,
5757
- Da as e,
5774
+ Da as c,
5775
+ Fa as d,
5776
+ Ta as e,
5758
5777
  On as f,
5759
5778
  In as g,
5760
5779
  Dn as h,
@@ -5768,7 +5787,7 @@ export {
5768
5787
  qe as p,
5769
5788
  Hn as q,
5770
5789
  Bn as r,
5771
- La as s,
5790
+ Ea as s,
5772
5791
  Gn as t,
5773
5792
  Qn as u,
5774
5793
  Jn as v,