react-semaphor 0.0.607 → 0.0.608

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,22 +1,22 @@
1
- var Nr = (t) => {
1
+ var vr = (t) => {
2
2
  throw TypeError(t);
3
3
  };
4
- var Hs = (t, a, s) => a.has(t) || Nr("Cannot " + s);
5
- var Ee = (t, a, s) => (Hs(t, a, "read from private field"), s ? s.call(t) : a.get(t)), Ma = (t, a, s) => a.has(t) ? Nr("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(t) : a.set(t, s), Ta = (t, a, s, r) => (Hs(t, a, "write to private field"), r ? r.call(t, s) : a.set(t, s), s), Aa = (t, a, s) => (Hs(t, a, "access private method"), s);
4
+ var Hs = (t, a, s) => a.has(t) || vr("Cannot " + s);
5
+ var Ee = (t, a, s) => (Hs(t, a, "read from private field"), s ? s.call(t) : a.get(t)), Ma = (t, a, s) => a.has(t) ? vr("Cannot add the same private member more than once") : a instanceof WeakSet ? a.add(t) : a.set(t, s), Ta = (t, a, s, r) => (Hs(t, a, "write to private field"), r ? r.call(t, s) : a.set(t, s), s), Aa = (t, a, s) => (Hs(t, a, "access private method"), s);
6
6
  import { jsxs as n, jsx as e, Fragment as se } from "react/jsx-runtime";
7
- import { L as Yi, M as Gi, N as br, O as Ki, P as Xr, Q as at, R as Wi, T as Ji, V as re, W as Zr, u as ne, X as ma, Y as ha, Z as V, _ as pa, $ as We, a0 as Dn, I as Tt, a1 as Oe, a2 as Ct, a3 as el, a4 as Be, a5 as wt, a6 as St, a7 as kt, a8 as jt, a9 as B, aa as Me, ab as ra, ac as Ne, ad as tl, ae as Ia, af as Hi, ag as Cr, ah as al, ai as K, aj as Mn, ak as Qi, al as sl, am as nl, an as Oa, ao as ve, j as wr, ap as ue, aq as me, ar as he, as as pe, at as Ra, au as Fa, av as Q, aw as lt, ax as Xi, ay as pt, az as ft, aA as Sr, aB as At, aC as ct, aD as Fe, aE as fa, aF as Ve, aG as $e, aH as Ue, aI as Xe, aJ as Os, aK as oe, aL as Qe, aM as Zi, aN as is, aO as eo, aP as qt, aQ as la, aR as to, aS as ao, aT as Va, aU as st, aV as mt, aW as Tn, aX as so, aY as Ps, aZ as ta, a_ as rl, a$ as ll, b0 as Dt, b1 as os, b2 as ja, b3 as Re, b4 as Te, b5 as Ba, b6 as Et, b7 as $a, b8 as no, b9 as ga, ba as et, bb as cs, bc as rt, bd as il, be as dn, bf as It, bg as Sa, bh as ds, bi as us, bj as ro, bk as ka, bl as An, bm as En, bn as In, bo as On, bp as Ua, bq as ms, br as ol, bs as Rn, bt as _s, bu as Fn, bv as cl, bw as zn, bx as lo, by as io, bz as Yt, bA as Gt, bB as Ie, bC as aa, bD as dl, K as ie, bE as bt, J as A, bF as Vs, bG as ul, bH as ml, bI as hl, bJ as pl, bK as fl, bL as gl, bM as xl, bN as yl, bO as oo, bP as co, bQ as Ea, bR as Ln, bS as uo, bT as mo, bU as ho, i as po, bV as vl, bW as Qa, bX as Ot, bY as hs, bZ as ps, b_ as fs, b$ as gs, c0 as ya, c1 as qa, c2 as Mt, c3 as js, A as Rt, c4 as Pn, r as Nl, q as bl, l as Nt, c5 as Pe, c6 as fo, c7 as ia, c8 as sa, c9 as Cl, ca as go, k as wl, cb as Xa, cc as Qt, cd as xo, n as na, m as Lt, o as Pt, ce as un, cf as _n, cg as Vn, ch as Bs, ci as oa, x as kr, cj as _e, ck as $s, cl as Ts, cm as Za, cn as mn, co as Sl, cp as kl, cq as jn, cr as yo, cs as vo, ct as Dl, cu as No, cv as Us, cw as bo, cx as za, cy as Co, cz as hn, cA as Xt, cB as Ge, cC as Zt, cD as wo, cE as So, cF as ko, cG as Bn, cH as Do, cI as $n, cJ as Un, cK as Mo, cL as Ml, cM as Tl, cN as To, cO as Ao, cP as es, cQ as Eo, cR as qn, cS as Io, cT as Oo, cU as Dr, cV as Ro, E as xs, b as Yn, cW as Gn, cX as Fo, cY as zo, cZ as Lo, c_ as Po, c$ as _o, d0 as Al, d1 as Kn, d2 as El, d3 as Il, d4 as Ol, d5 as Rl, d6 as Fl, d7 as Wn, d8 as Jn, d9 as zl, da as Ll, db as Pl, dc as qs, dd as Ys, de as Vo, df as jo, dg as Bo, dh as $o, di as Uo, dj as qo, dk as Yo, dl as Go, dm as Ze, dn as tt, dp as we, dq as Se, dr as ke, ds as Ko, dt as Wo, du as Jo, dv as Ho, dw as Qo, y as Xo, dx as Mr, dy as _l, dz as Zo, dA as ec, dB as ws, dC as Tr, dD as tc, dE as Ar, dF as Er, dG as ac, dH as sc, dI as nc, dJ as rc, dK as Hn, dL as Qn, dM as Xn, dN as Ya, dO as Zn, dP as ca, dQ as lc, dR as Gs, dS as Vl, dT as Qs, dU as ic, dV as oc, dW as Ir, dX as cc, dY as dc, dZ as uc, d_ as mc, d$ as hc, w as Or, e0 as Rr, e1 as pc, e2 as fc, e3 as gc, e4 as xc, e5 as yc, e6 as vc, e7 as Nc, e8 as bc, e9 as Cc, ea as wc, eb as Sc, ec as kc, ed as Dc, ee as Mc, ef as Tc, eg as Ac, eh as Ec, ei as Ic, ej as Oc, ek as er, el as Xs, em as Rc, en as Fc, eo as pn, ep as zc, eq as As, er as Es, es as Ga, et as Lc, eu as Fr, ev as Pc, ew as fn, ex as jl, ey as tr, ez as Bl, eA as Zs, eB as ar, eC as _c, eD as Vc, eE as jc, eF as ts, eG as Bc, eH as gn, eI as $c, eJ as Uc, eK as qc, eL as xn, eM as yn, eN as Rs, eO as Yc, eP as La, eQ as as, eR as Gc, eS as Kc, eT as Wc, eU as Jc, eV as Hc, eW as Qc, F as $l, eX as Xc, eY as Zc, p as ed, eZ as td, B as ad, e_ as sd, e$ as nd, S as rd, f0 as ld, U as id, f1 as od, C as cd } from "./index-B6ju9l3H.js";
7
+ import { L as Yi, M as Gi, N as Nr, O as Ki, P as Qr, Q as at, R as Wi, T as Ji, V as re, W as Xr, u as ne, X as ba, Y as Ca, Z as V, _ as wa, $ as He, a0 as Dn, I as Mt, a1 as Oe, a2 as Ct, a3 as Zr, a4 as Be, a5 as wt, a6 as St, a7 as kt, a8 as Vt, a9 as B, aa as Me, ab as ra, ac as Ne, ad as el, ae as Ia, af as Hi, ag as br, ah as tl, ai as K, aj as Mn, ak as Qi, al, am as sl, an as Oa, ao as ve, j as Cr, ap as ue, aq as me, ar as he, as as pe, at as Ra, au as Fa, av as Q, aw as lt, ax as Xi, ay as pt, az as ft, aA as wr, aB as Tt, aC as ct, aD as Fe, aE as ma, aF as Ve, aG as $e, aH as Ue, aI as Xe, aJ as Os, aK as oe, aL as Qe, aM as Zi, aN as is, aO as eo, aP as qt, aQ as la, aR as to, aS as ao, aT as Va, aU as st, aV as mt, aW as Tn, aX as so, aY as Ps, aZ as ta, a_ as nl, a$ as rl, b0 as Dt, b1 as os, b2 as ja, b3 as Re, b4 as Te, b5 as Ba, b6 as At, b7 as $a, b8 as no, b9 as ha, ba as et, bb as cs, bc as rt, bd as ll, be as dn, bf as Et, bg as Sa, bh as ds, bi as us, bj as ro, bk as ka, bl as An, bm as En, bn as In, bo as On, bp as Ua, bq as ms, br as il, bs as Rn, bt as _s, bu as Fn, bv as ol, bw as zn, bx as lo, by as io, bz as Yt, bA as Gt, bB as Ie, bC as aa, bD as cl, K as ie, bE as bt, J as A, bF as Vs, bG as dl, bH as ul, bI as ml, bJ as hl, bK as pl, bL as fl, bM as gl, bN as xl, bO as oo, bP as co, bQ as Ea, bR as Ln, bS as uo, bT as mo, bU as ho, i as po, bV as yl, bW as Qa, bX as It, bY as hs, bZ as ps, b_ as fs, b$ as gs, c0 as fa, c1 as qa, c2 as jt, c3 as js, A as Ot, c4 as vl, r as Nl, q as bl, l as Nt, c5 as Pe, c6 as fo, c7 as ia, c8 as sa, c9 as Cl, ca as go, k as wl, cb as Xa, cc as Qt, cd as xo, n as na, m as zt, o as Lt, ce as un, cf as Pn, cg as _n, ch as Bs, ci as oa, x as Sr, cj as _e, ck as $s, cl as Ts, cm as Za, cn as mn, co as Sl, cp as kl, cq as Vn, cr as yo, cs as vo, ct as Dl, cu as No, cv as Us, cw as bo, cx as za, cy as Co, cz as hn, cA as Xt, cB as Ge, cC as Zt, cD as wo, cE as So, cF as ko, cG as jn, cH as Do, cI as Bn, cJ as $n, cK as Mo, cL as Ml, cM as Tl, cN as To, cO as Ao, cP as es, cQ as Eo, cR as Un, cS as Io, cT as Oo, cU as kr, cV as Ro, E as xs, b as qn, cW as Yn, cX as Fo, cY as zo, cZ as Lo, c_ as Po, c$ as _o, d0 as Al, d1 as Gn, d2 as El, d3 as Il, d4 as Ol, d5 as Rl, d6 as Fl, d7 as Kn, d8 as Wn, d9 as zl, da as Ll, db as Pl, dc as qs, dd as Ys, de as Vo, df as jo, dg as Bo, dh as $o, di as Uo, dj as qo, dk as Yo, dl as Go, dm as Ze, dn as tt, dp as we, dq as Se, dr as ke, ds as Ko, dt as Wo, du as Jo, dv as Ho, dw as Qo, y as Xo, dx as Dr, dy as _l, dz as Zo, dA as ec, dB as ws, dC as Mr, dD as tc, dE as Tr, dF as Ar, dG as ac, dH as sc, dI as nc, dJ as rc, dK as Jn, dL as Hn, dM as Qn, dN as Ya, dO as Xn, dP as ca, dQ as lc, dR as Gs, dS as Vl, dT as Qs, dU as ic, dV as oc, dW as Er, dX as cc, dY as dc, dZ as uc, d_ as mc, d$ as hc, w as Ir, e0 as Or, e1 as pc, e2 as fc, e3 as gc, e4 as xc, e5 as yc, e6 as vc, e7 as Nc, e8 as bc, e9 as Cc, ea as wc, eb as Sc, ec as kc, ed as Dc, ee as Mc, ef as Tc, eg as Ac, eh as Ec, ei as Ic, ej as Oc, ek as Zn, el as Xs, em as Rc, en as Fc, eo as pn, ep as zc, eq as As, er as Es, es as Ga, et as Lc, eu as Rr, ev as Pc, ew as fn, ex as jl, ey as er, ez as Bl, eA as Zs, eB as tr, eC as _c, eD as Vc, eE as jc, eF as ts, eG as Bc, eH as gn, eI as $c, eJ as Uc, eK as qc, eL as xn, eM as yn, eN as Rs, eO as Yc, eP as La, eQ as as, eR as Gc, eS as Kc, eT as Wc, eU as Jc, eV as Hc, eW as Qc, F as $l, eX as Xc, eY as Zc, p as ed, eZ as td, B as ad, e_ as sd, e$ as nd, S as rd, f0 as ld, U as id, f1 as od, C as cd } from "./index-C-OBAOk7.js";
8
8
  import * as nt from "react";
9
9
  import ut, { useState as j, useCallback as Ce, useEffect as Ae, useRef as Bt, useMemo as Ke, Suspense as Ul, useContext as dd } from "react";
10
10
  import "react-dom";
11
- var Jt, Ht, He, zt, Vt, Is, vn, Qr, ud = (Qr = class extends Yi {
11
+ var Jt, Ht, Je, Ft, _t, Is, vn, Hr, ud = (Hr = class extends Yi {
12
12
  constructor(a, s) {
13
13
  super();
14
- Ma(this, Vt);
14
+ Ma(this, _t);
15
15
  Ma(this, Jt);
16
16
  Ma(this, Ht);
17
- Ma(this, He);
18
- Ma(this, zt);
19
- Ta(this, Jt, a), this.setOptions(s), this.bindMethods(), Aa(this, Vt, Is).call(this);
17
+ Ma(this, Je);
18
+ Ma(this, Ft);
19
+ Ta(this, Jt, a), this.setOptions(s), this.bindMethods(), Aa(this, _t, Is).call(this);
20
20
  }
21
21
  bindMethods() {
22
22
  this.mutate = this.mutate.bind(this), this.reset = this.reset.bind(this);
@@ -26,31 +26,31 @@ var Jt, Ht, He, zt, Vt, Is, vn, Qr, ud = (Qr = class extends Yi {
26
26
  const s = this.options;
27
27
  this.options = Ee(this, Jt).defaultMutationOptions(a), Gi(this.options, s) || Ee(this, Jt).getMutationCache().notify({
28
28
  type: "observerOptionsUpdated",
29
- mutation: Ee(this, He),
29
+ mutation: Ee(this, Je),
30
30
  observer: this
31
- }), s != null && s.mutationKey && this.options.mutationKey && br(s.mutationKey) !== br(this.options.mutationKey) ? this.reset() : ((r = Ee(this, He)) == null ? void 0 : r.state.status) === "pending" && Ee(this, He).setOptions(this.options);
31
+ }), s != null && s.mutationKey && this.options.mutationKey && Nr(s.mutationKey) !== Nr(this.options.mutationKey) ? this.reset() : ((r = Ee(this, Je)) == null ? void 0 : r.state.status) === "pending" && Ee(this, Je).setOptions(this.options);
32
32
  }
33
33
  onUnsubscribe() {
34
34
  var a;
35
- this.hasListeners() || (a = Ee(this, He)) == null || a.removeObserver(this);
35
+ this.hasListeners() || (a = Ee(this, Je)) == null || a.removeObserver(this);
36
36
  }
37
37
  onMutationUpdate(a) {
38
- Aa(this, Vt, Is).call(this), Aa(this, Vt, vn).call(this, a);
38
+ Aa(this, _t, Is).call(this), Aa(this, _t, vn).call(this, a);
39
39
  }
40
40
  getCurrentResult() {
41
41
  return Ee(this, Ht);
42
42
  }
43
43
  reset() {
44
44
  var a;
45
- (a = Ee(this, He)) == null || a.removeObserver(this), Ta(this, He, void 0), Aa(this, Vt, Is).call(this), Aa(this, Vt, vn).call(this);
45
+ (a = Ee(this, Je)) == null || a.removeObserver(this), Ta(this, Je, void 0), Aa(this, _t, Is).call(this), Aa(this, _t, vn).call(this);
46
46
  }
47
47
  mutate(a, s) {
48
48
  var r;
49
- return Ta(this, zt, s), (r = Ee(this, He)) == null || r.removeObserver(this), Ta(this, He, Ee(this, Jt).getMutationCache().build(Ee(this, Jt), this.options)), Ee(this, He).addObserver(this), Ee(this, He).execute(a);
49
+ return Ta(this, Ft, s), (r = Ee(this, Je)) == null || r.removeObserver(this), Ta(this, Je, Ee(this, Jt).getMutationCache().build(Ee(this, Jt), this.options)), Ee(this, Je).addObserver(this), Ee(this, Je).execute(a);
50
50
  }
51
- }, Jt = new WeakMap(), Ht = new WeakMap(), He = new WeakMap(), zt = new WeakMap(), Vt = new WeakSet(), Is = function() {
51
+ }, Jt = new WeakMap(), Ht = new WeakMap(), Je = new WeakMap(), Ft = new WeakMap(), _t = new WeakSet(), Is = function() {
52
52
  var s;
53
- const a = ((s = Ee(this, He)) == null ? void 0 : s.state) ?? Ki();
53
+ const a = ((s = Ee(this, Je)) == null ? void 0 : s.state) ?? Ki();
54
54
  Ta(this, Ht, {
55
55
  ...a,
56
56
  isPending: a.status === "pending",
@@ -61,11 +61,11 @@ var Jt, Ht, He, zt, Vt, Is, vn, Qr, ud = (Qr = class extends Yi {
61
61
  reset: this.reset
62
62
  });
63
63
  }, vn = function(a) {
64
- Xr.batch(() => {
64
+ Qr.batch(() => {
65
65
  var s, r, l, i, c, o, d, u;
66
- if (Ee(this, zt) && this.hasListeners()) {
66
+ if (Ee(this, Ft) && this.hasListeners()) {
67
67
  const m = Ee(this, Ht).variables, h = Ee(this, Ht).context;
68
- (a == null ? void 0 : a.type) === "success" ? ((r = (s = Ee(this, zt)).onSuccess) == null || r.call(s, a.data, m, h), (i = (l = Ee(this, zt)).onSettled) == null || i.call(l, a.data, null, m, h)) : (a == null ? void 0 : a.type) === "error" && ((o = (c = Ee(this, zt)).onError) == null || o.call(c, a.error, m, h), (u = (d = Ee(this, zt)).onSettled) == null || u.call(
68
+ (a == null ? void 0 : a.type) === "success" ? ((r = (s = Ee(this, Ft)).onSuccess) == null || r.call(s, a.data, m, h), (i = (l = Ee(this, Ft)).onSettled) == null || i.call(l, a.data, null, m, h)) : (a == null ? void 0 : a.type) === "error" && ((o = (c = Ee(this, Ft)).onError) == null || o.call(c, a.error, m, h), (u = (d = Ee(this, Ft)).onSettled) == null || u.call(
69
69
  d,
70
70
  void 0,
71
71
  a.error,
@@ -77,8 +77,8 @@ var Jt, Ht, He, zt, Vt, Is, vn, Qr, ud = (Qr = class extends Yi {
77
77
  m(Ee(this, Ht));
78
78
  });
79
79
  });
80
- }, Qr);
81
- function xa(t, a) {
80
+ }, Hr);
81
+ function pa(t, a) {
82
82
  const s = at(), [r] = nt.useState(
83
83
  () => new ud(
84
84
  s,
@@ -90,7 +90,7 @@ function xa(t, a) {
90
90
  }, [r, t]);
91
91
  const l = nt.useSyncExternalStore(
92
92
  nt.useCallback(
93
- (c) => r.subscribe(Xr.batchCalls(c)),
93
+ (c) => r.subscribe(Qr.batchCalls(c)),
94
94
  [r]
95
95
  ),
96
96
  () => r.getCurrentResult(),
@@ -247,7 +247,7 @@ const Nd = re("Braces", [
247
247
  * This source code is licensed under the ISC license.
248
248
  * See the LICENSE file in the root directory of this source tree.
249
249
  */
250
- const zr = re("Building", [
250
+ const Fr = re("Building", [
251
251
  ["rect", { width: "16", height: "20", x: "4", y: "2", rx: "2", ry: "2", key: "76otgf" }],
252
252
  ["path", { d: "M9 22v-4h6v4", key: "r93iot" }],
253
253
  ["path", { d: "M8 6h.01", key: "1dz90k" }],
@@ -622,7 +622,7 @@ const jd = re("List", [
622
622
  * This source code is licensed under the ISC license.
623
623
  * See the LICENSE file in the root directory of this source tree.
624
624
  */
625
- const sr = re("Lock", [
625
+ const ar = re("Lock", [
626
626
  ["rect", { width: "18", height: "11", x: "3", y: "11", rx: "2", ry: "2", key: "1w4ew1" }],
627
627
  ["path", { d: "M7 11V7a5 5 0 0 1 10 0v4", key: "fwvmzm" }]
628
628
  ]);
@@ -706,7 +706,7 @@ const Yd = re("Moon", [
706
706
  * This source code is licensed under the ISC license.
707
707
  * See the LICENSE file in the root directory of this source tree.
708
708
  */
709
- const Lr = re("MoveHorizontal", [
709
+ const zr = re("MoveHorizontal", [
710
710
  ["path", { d: "m18 8 4 4-4 4", key: "1ak13k" }],
711
711
  ["path", { d: "M2 12h20", key: "9i4pu4" }],
712
712
  ["path", { d: "m6 8-4 4 4 4", key: "15zrgr" }]
@@ -717,7 +717,7 @@ const Lr = re("MoveHorizontal", [
717
717
  * This source code is licensed under the ISC license.
718
718
  * See the LICENSE file in the root directory of this source tree.
719
719
  */
720
- const Pr = re("MoveVertical", [
720
+ const Lr = re("MoveVertical", [
721
721
  ["path", { d: "M12 2v20", key: "t6zp3m" }],
722
722
  ["path", { d: "m8 18 4 4 4-4", key: "bh5tu3" }],
723
723
  ["path", { d: "m8 6 4-4 4 4", key: "ybng9g" }]
@@ -999,7 +999,7 @@ const nu = re("Terminal", [
999
999
  * This source code is licensed under the ISC license.
1000
1000
  * See the LICENSE file in the root directory of this source tree.
1001
1001
  */
1002
- const wa = re("ToggleLeft", [
1002
+ const Na = re("ToggleLeft", [
1003
1003
  ["rect", { width: "20", height: "12", x: "2", y: "6", rx: "6", ry: "6", key: "f2vt7d" }],
1004
1004
  ["circle", { cx: "8", cy: "12", r: "2", key: "1nvbw3" }]
1005
1005
  ]);
@@ -1055,11 +1055,11 @@ const ru = re("View", [
1055
1055
  ]
1056
1056
  ]);
1057
1057
  function lu() {
1058
- const { setTheme: t } = Zr(), a = ne(
1058
+ const { setTheme: t } = Xr(), a = ne(
1059
1059
  (s) => s.actions.setDashboardTheme
1060
1060
  );
1061
- return /* @__PURE__ */ n(ma, { children: [
1062
- /* @__PURE__ */ e(ha, { asChild: !0, children: /* @__PURE__ */ n(V, { className: "h-7 p-2", variant: "ghost", size: "sm", children: [
1061
+ return /* @__PURE__ */ n(ba, { children: [
1062
+ /* @__PURE__ */ e(Ca, { asChild: !0, children: /* @__PURE__ */ n(V, { className: "h-7 p-2", variant: "ghost", size: "sm", children: [
1063
1063
  /* @__PURE__ */ e(
1064
1064
  au,
1065
1065
  {
@@ -1076,9 +1076,9 @@ function lu() {
1076
1076
  ),
1077
1077
  /* @__PURE__ */ e("span", { className: "sr-only", children: "Toggle theme" })
1078
1078
  ] }) }),
1079
- /* @__PURE__ */ n(pa, { align: "end", children: [
1079
+ /* @__PURE__ */ n(wa, { align: "end", children: [
1080
1080
  /* @__PURE__ */ e(
1081
- We,
1081
+ He,
1082
1082
  {
1083
1083
  onClick: () => {
1084
1084
  t("light"), a("light");
@@ -1087,7 +1087,7 @@ function lu() {
1087
1087
  }
1088
1088
  ),
1089
1089
  /* @__PURE__ */ e(
1090
- We,
1090
+ He,
1091
1091
  {
1092
1092
  onClick: () => {
1093
1093
  t("dark"), a("dark");
@@ -1096,7 +1096,7 @@ function lu() {
1096
1096
  }
1097
1097
  ),
1098
1098
  /* @__PURE__ */ e(
1099
- We,
1099
+ He,
1100
1100
  {
1101
1101
  onClick: () => {
1102
1102
  t("system"), a("system");
@@ -1192,7 +1192,7 @@ async function du(t, a) {
1192
1192
  }) : null;
1193
1193
  }
1194
1194
  function uu() {
1195
- const [t, a] = j(""), [s, r] = j(!1), l = ne((f) => f.lenses), { setLenses: i, setSelectedLensId: c } = Tt(), [o, d] = j(!1), [u, m] = j(!1), h = ne((f) => f.dashboard), g = ne((f) => f.filterValues), { authToken: x } = Oe();
1195
+ const [t, a] = j(""), [s, r] = j(!1), l = ne((f) => f.lenses), { setLenses: i, setSelectedLensId: c } = Mt(), [o, d] = j(!1), [u, m] = j(!1), h = ne((f) => f.dashboard), g = ne((f) => f.filterValues), { authToken: x } = Oe();
1196
1196
  async function v() {
1197
1197
  d(!0);
1198
1198
  const f = bn(
@@ -1206,7 +1206,7 @@ function uu() {
1206
1206
  y && (i([...l || [], y]), c(y.id), m(!1)), d(!1);
1207
1207
  }
1208
1208
  return /* @__PURE__ */ n(Ct, { open: u, onOpenChange: m, children: [
1209
- /* @__PURE__ */ e(el, { asChild: !0, children: /* @__PURE__ */ n(
1209
+ /* @__PURE__ */ e(Zr, { asChild: !0, children: /* @__PURE__ */ n(
1210
1210
  V,
1211
1211
  {
1212
1212
  variant: "secondary",
@@ -1221,7 +1221,7 @@ function uu() {
1221
1221
  /* @__PURE__ */ n(wt, { className: "sm:max-w-[425px]", children: [
1222
1222
  /* @__PURE__ */ n(St, { children: [
1223
1223
  /* @__PURE__ */ e(kt, { children: "Create Lens" }),
1224
- /* @__PURE__ */ e(jt, { children: "Lenses are private by default and are only visible to you." })
1224
+ /* @__PURE__ */ e(Vt, { children: "Lenses are private by default and are only visible to you." })
1225
1225
  ] }),
1226
1226
  /* @__PURE__ */ e("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ n("div", { className: "grid grid-cols-8 items-center gap-4", children: [
1227
1227
  /* @__PURE__ */ e(B, { className: "text-right", children: "Name" }),
@@ -1253,7 +1253,7 @@ function uu() {
1253
1253
  ] });
1254
1254
  }
1255
1255
  function mu() {
1256
- const [t, a] = j(!1), s = ne((m) => m.lenses), r = ne((m) => m.selectedLensId), { setLenses: l, setSelectedLensId: i } = Tt(), { authToken: c } = Oe();
1256
+ const [t, a] = j(!1), s = ne((m) => m.lenses), r = ne((m) => m.selectedLensId), { setLenses: l, setSelectedLensId: i } = Mt(), { authToken: c } = Oe();
1257
1257
  async function o(m) {
1258
1258
  i(m);
1259
1259
  }
@@ -1286,10 +1286,10 @@ function mu() {
1286
1286
  await Cn(v, c == null ? void 0 : c.accessToken);
1287
1287
  }
1288
1288
  }
1289
- return /* @__PURE__ */ n(ma, { open: t, onOpenChange: a, children: [
1290
- /* @__PURE__ */ e(ha, { asChild: !0, children: /* @__PURE__ */ e(Ne, { tooltip: "Lenses", className: "h-7 p-2", children: /* @__PURE__ */ e(Od, { className: "h-4 w-4" }) }) }),
1291
- /* @__PURE__ */ n(pa, { align: "end", className: "w-60", children: [
1292
- /* @__PURE__ */ e(tl, { className: "px-3", children: "Lenses" }),
1289
+ return /* @__PURE__ */ n(ba, { open: t, onOpenChange: a, children: [
1290
+ /* @__PURE__ */ e(Ca, { asChild: !0, children: /* @__PURE__ */ e(Ne, { tooltip: "Lenses", className: "h-7 p-2", children: /* @__PURE__ */ e(Od, { className: "h-4 w-4" }) }) }),
1291
+ /* @__PURE__ */ n(wa, { align: "end", className: "w-60", children: [
1292
+ /* @__PURE__ */ e(el, { className: "px-3", children: "Lenses" }),
1293
1293
  /* @__PURE__ */ e(Ia, {}),
1294
1294
  /* @__PURE__ */ n(
1295
1295
  Hi,
@@ -1297,9 +1297,9 @@ function mu() {
1297
1297
  value: r,
1298
1298
  onValueChange: o,
1299
1299
  children: [
1300
- /* @__PURE__ */ e(Cr, { value: "original", children: "Original" }),
1300
+ /* @__PURE__ */ e(br, { value: "original", children: "Original" }),
1301
1301
  s == null ? void 0 : s.map((m) => /* @__PURE__ */ n(
1302
- Cr,
1302
+ br,
1303
1303
  {
1304
1304
  className: "group flex justify-between gap-2",
1305
1305
  value: m.id,
@@ -1307,7 +1307,7 @@ function mu() {
1307
1307
  /* @__PURE__ */ e("p", { children: m.name }),
1308
1308
  /* @__PURE__ */ n("span", { className: "flex items-center gap-3", children: [
1309
1309
  /* @__PURE__ */ e(
1310
- al,
1310
+ tl,
1311
1311
  {
1312
1312
  onClick: (h) => {
1313
1313
  h.preventDefault(), u(m);
@@ -1352,7 +1352,7 @@ function hu({
1352
1352
  "Generating PDF... may take up to 60 seconds"
1353
1353
  );
1354
1354
  try {
1355
- await wr(), ve.dismiss(m), ve.success("PDF downloaded successfully!", {
1355
+ await Cr(), ve.dismiss(m), ve.success("PDF downloaded successfully!", {
1356
1356
  duration: 2e3
1357
1357
  });
1358
1358
  } catch (h) {
@@ -1369,7 +1369,7 @@ function hu({
1369
1369
  "Generating protected PDF... may take up to 60 seconds"
1370
1370
  );
1371
1371
  try {
1372
- await wr(r), ve.dismiss(m), ve.success("Protected PDF downloaded successfully!", {
1372
+ await Cr(r), ve.dismiss(m), ve.success("Protected PDF downloaded successfully!", {
1373
1373
  duration: 2e3,
1374
1374
  position: "top-right"
1375
1375
  });
@@ -1378,8 +1378,8 @@ function hu({
1378
1378
  }
1379
1379
  }
1380
1380
  return /* @__PURE__ */ n(se, { children: [
1381
- /* @__PURE__ */ n(ma, { modal: !1, children: [
1382
- /* @__PURE__ */ e(ha, { asChild: !0, children: /* @__PURE__ */ e(
1381
+ /* @__PURE__ */ n(ba, { modal: !1, children: [
1382
+ /* @__PURE__ */ e(Ca, { asChild: !0, children: /* @__PURE__ */ e(
1383
1383
  V,
1384
1384
  {
1385
1385
  variant: "ghost",
@@ -1389,13 +1389,13 @@ function hu({
1389
1389
  children: /* @__PURE__ */ e(Qi, { className: K("size-4", t) })
1390
1390
  }
1391
1391
  ) }),
1392
- /* @__PURE__ */ n(pa, { align: "end", children: [
1393
- /* @__PURE__ */ n(We, { onClick: d, children: [
1394
- /* @__PURE__ */ e(sl, { className: "mr-2 h-4 w-4" }),
1392
+ /* @__PURE__ */ n(wa, { align: "end", children: [
1393
+ /* @__PURE__ */ n(He, { onClick: d, children: [
1394
+ /* @__PURE__ */ e(al, { className: "mr-2 h-4 w-4" }),
1395
1395
  "Download PDF"
1396
1396
  ] }),
1397
- /* @__PURE__ */ n(We, { onClick: () => s(!0), children: [
1398
- /* @__PURE__ */ e(sr, { className: "mr-2 h-4 w-4" }),
1397
+ /* @__PURE__ */ n(He, { onClick: () => s(!0), children: [
1398
+ /* @__PURE__ */ e(ar, { className: "mr-2 h-4 w-4" }),
1399
1399
  "Download Protected PDF"
1400
1400
  ] })
1401
1401
  ] })
@@ -1408,7 +1408,7 @@ function hu({
1408
1408
  children: /* @__PURE__ */ n(wt, { className: "sm:max-w-[425px]", children: [
1409
1409
  /* @__PURE__ */ n(St, { children: [
1410
1410
  /* @__PURE__ */ e(kt, { children: "Download Protected PDF" }),
1411
- /* @__PURE__ */ e(jt, { children: "Enter a password to protect your PDF. The PDF will be encrypted and require this password to open." })
1411
+ /* @__PURE__ */ e(Vt, { children: "Enter a password to protect your PDF. The PDF will be encrypted and require this password to open." })
1412
1412
  ] }),
1413
1413
  /* @__PURE__ */ e("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ n("div", { className: "grid gap-2", children: [
1414
1414
  /* @__PURE__ */ e(B, { htmlFor: "password", children: "Password" }),
@@ -1435,7 +1435,7 @@ function hu({
1435
1435
  size: "sm",
1436
1436
  className: "absolute right-0 top-0 h-full px-3 py-2 hover:bg-transparent",
1437
1437
  onClick: () => c(!i),
1438
- children: i ? /* @__PURE__ */ e(nl, { className: "h-4 w-4 text-muted-foreground" }) : /* @__PURE__ */ e(Oa, { className: "h-4 w-4 text-muted-foreground" })
1438
+ children: i ? /* @__PURE__ */ e(sl, { className: "h-4 w-4 text-muted-foreground" }) : /* @__PURE__ */ e(Oa, { className: "h-4 w-4 text-muted-foreground" })
1439
1439
  }
1440
1440
  )
1441
1441
  ] })
@@ -1491,7 +1491,7 @@ function dt({
1491
1491
  }
1492
1492
  );
1493
1493
  }
1494
- const _r = [
1494
+ const Pr = [
1495
1495
  { value: "daily", label: "Daily" },
1496
1496
  { value: "weekly", label: "Weekly" },
1497
1497
  { value: "biweekly", label: "Bi-Weekly" },
@@ -1507,17 +1507,17 @@ function pu({
1507
1507
  status: i,
1508
1508
  error: c,
1509
1509
  isDeleting: o
1510
- } = fu(), [d, u] = j((a == null ? void 0 : a.email) || ""), [m, h] = j(_r[0].value), [g, x] = j("06:00"), [v, f] = j("");
1510
+ } = fu(), [d, u] = j((a == null ? void 0 : a.email) || ""), [m, h] = j(Pr[0].value), [g, x] = j("06:00"), [v, f] = j("");
1511
1511
  return /* @__PURE__ */ e(Xi, { delayDuration: 0, children: /* @__PURE__ */ n(pt, { children: [
1512
1512
  /* @__PURE__ */ e(ft, { asChild: !0, children: /* @__PURE__ */ e(
1513
1513
  Ne,
1514
1514
  {
1515
1515
  tooltip: "Schedule Dashboard",
1516
1516
  className: K("h-7 p-2", t),
1517
- children: /* @__PURE__ */ e(Sr, { className: "size-4" })
1517
+ children: /* @__PURE__ */ e(wr, { className: "size-4" })
1518
1518
  }
1519
1519
  ) }),
1520
- /* @__PURE__ */ e(At, { align: "end", className: "w-80", children: /* @__PURE__ */ n("div", { className: "grid gap-4", children: [
1520
+ /* @__PURE__ */ e(Tt, { align: "end", className: "w-80", children: /* @__PURE__ */ n("div", { className: "grid gap-4", children: [
1521
1521
  /* @__PURE__ */ n("div", { className: "space-y-2", children: [
1522
1522
  /* @__PURE__ */ e("h4", { className: "font-medium leading-none", children: "Schedule Subscription" }),
1523
1523
  /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Subscribe to receive dashboard via email" })
@@ -1558,7 +1558,7 @@ function pu({
1558
1558
  {
1559
1559
  className: "col-span-2 h-8",
1560
1560
  label: "Select Frequency",
1561
- options: _r,
1561
+ options: Pr,
1562
1562
  value: m,
1563
1563
  onValueChange: (y) => h(y)
1564
1564
  }
@@ -1592,7 +1592,7 @@ function pu({
1592
1592
  disabled: i === "loading" || !d,
1593
1593
  children: [
1594
1594
  i === "loading" && /* @__PURE__ */ e(Fe, { className: "mr-2 size-4 animate-spin" }),
1595
- i === "success" && /* @__PURE__ */ e(fa, { className: "mr-2 size-4" }),
1595
+ i === "success" && /* @__PURE__ */ e(ma, { className: "mr-2 size-4" }),
1596
1596
  i === "error" && /* @__PURE__ */ n(Ve, { children: [
1597
1597
  /* @__PURE__ */ e($e, { children: /* @__PURE__ */ e(ql, { className: "mr-2 size-4 text-destructive" }) }),
1598
1598
  /* @__PURE__ */ e(Ue, { children: /* @__PURE__ */ e("p", { children: c }) })
@@ -1641,7 +1641,7 @@ function pu({
1641
1641
  ] }),
1642
1642
  /* @__PURE__ */ n("div", { className: "flex items-center gap-1", children: [
1643
1643
  /* @__PURE__ */ e(
1644
- Sr,
1644
+ wr,
1645
1645
  {
1646
1646
  className: K(
1647
1647
  "size-3",
@@ -1938,7 +1938,7 @@ function Du(t, a, s, r, l) {
1938
1938
  }
1939
1939
  function Mu(t, a) {
1940
1940
  const { authToken: s } = Oe(), r = at();
1941
- return xa({
1941
+ return pa({
1942
1942
  mutationFn: (l) => xu((s == null ? void 0 : s.accessToken) || "", t, l),
1943
1943
  onMutate: async () => {
1944
1944
  await r.cancelQueries({ queryKey: [t] });
@@ -1955,7 +1955,7 @@ function Mu(t, a) {
1955
1955
  }
1956
1956
  function Hl(t) {
1957
1957
  const { authToken: a } = Oe(), s = at();
1958
- return xa({
1958
+ return pa({
1959
1959
  mutationFn: ({
1960
1960
  resourceId: r,
1961
1961
  data: l
@@ -1980,7 +1980,7 @@ function Hl(t) {
1980
1980
  }
1981
1981
  function Tu(t, a) {
1982
1982
  const { authToken: s } = Oe(), r = at();
1983
- return xa({
1983
+ return pa({
1984
1984
  mutationFn: (l) => vu((s == null ? void 0 : s.accessToken) || "", t, l),
1985
1985
  onMutate: async () => {
1986
1986
  await r.cancelQueries({ queryKey: [t] });
@@ -1997,7 +1997,7 @@ function Tu(t, a) {
1997
1997
  }
1998
1998
  function Au(t) {
1999
1999
  const { authToken: a } = Oe(), s = at();
2000
- return xa({
2000
+ return pa({
2001
2001
  mutationFn: (r) => Nu((a == null ? void 0 : a.accessToken) || "", t, r),
2002
2002
  onMutate: async () => {
2003
2003
  await s.cancelQueries({ queryKey: [t] });
@@ -2014,7 +2014,7 @@ function Au(t) {
2014
2014
  }
2015
2015
  function Eu() {
2016
2016
  const { authToken: t } = Oe(), a = at();
2017
- return xa({
2017
+ return pa({
2018
2018
  mutationFn: ({
2019
2019
  resourceType: s,
2020
2020
  resourceId: r,
@@ -2050,7 +2050,7 @@ function Eu() {
2050
2050
  }
2051
2051
  function Iu() {
2052
2052
  const { authToken: t } = Oe(), a = at();
2053
- return xa({
2053
+ return pa({
2054
2054
  mutationFn: ({
2055
2055
  resourceType: s,
2056
2056
  resourceId: r,
@@ -2131,7 +2131,7 @@ function Ql() {
2131
2131
  isUpdating: l
2132
2132
  };
2133
2133
  }
2134
- function nr(t, a, s) {
2134
+ function sr(t, a, s) {
2135
2135
  var h;
2136
2136
  const r = Du(t), l = Mu(
2137
2137
  t,
@@ -2170,14 +2170,14 @@ function nr(t, a, s) {
2170
2170
  };
2171
2171
  }
2172
2172
  function zu(t, a) {
2173
- return nr(
2173
+ return sr(
2174
2174
  ye.DASHBOARD,
2175
2175
  t,
2176
2176
  a
2177
2177
  );
2178
2178
  }
2179
2179
  function Lu(t, a) {
2180
- return nr(
2180
+ return sr(
2181
2181
  ye.VISUAL,
2182
2182
  t,
2183
2183
  a
@@ -2185,7 +2185,7 @@ function Lu(t, a) {
2185
2185
  }
2186
2186
  function Pu() {
2187
2187
  const { authToken: t } = Oe(), a = at();
2188
- return xa({
2188
+ return pa({
2189
2189
  mutationFn: async ({
2190
2190
  visualId: s,
2191
2191
  data: r
@@ -2235,7 +2235,7 @@ function _u({
2235
2235
  Ae(() => {
2236
2236
  s ? (p(!0), T(!0)) : C && (p(!1), T(!1));
2237
2237
  }, [s, C]);
2238
- const F = () => t.ownership.isOwner ? t.ownership.status === "private" ? /* @__PURE__ */ e(sr, { className: "h-3 w-3 text-purple-500" }) : /* @__PURE__ */ e(Ut, { className: "h-3.5 w-3.5 text-blue-600" }) : /* @__PURE__ */ e(da, { className: "h-3.5 w-3.5 text-slate-500" }), b = () => /* @__PURE__ */ e(os, { className: "h-4 w-4 text-slate-400" }), k = () => {
2238
+ const F = () => t.ownership.isOwner ? t.ownership.status === "private" ? /* @__PURE__ */ e(ar, { className: "h-3 w-3 text-purple-500" }) : /* @__PURE__ */ e(Ut, { className: "h-3.5 w-3.5 text-blue-600" }) : /* @__PURE__ */ e(da, { className: "h-3.5 w-3.5 text-slate-500" }), b = () => /* @__PURE__ */ e(os, { className: "h-4 w-4 text-slate-400" }), k = () => {
2239
2239
  g(t), c == null || c(t);
2240
2240
  };
2241
2241
  return /* @__PURE__ */ n(
@@ -2302,25 +2302,25 @@ function _u({
2302
2302
  }
2303
2303
  ),
2304
2304
  /* @__PURE__ */ n(
2305
- ma,
2305
+ ba,
2306
2306
  {
2307
2307
  modal: !1,
2308
2308
  open: y,
2309
2309
  onOpenChange: p,
2310
2310
  children: [
2311
- /* @__PURE__ */ e(ha, { asChild: !0, children: /* @__PURE__ */ e(
2311
+ /* @__PURE__ */ e(Ca, { asChild: !0, children: /* @__PURE__ */ e(
2312
2312
  V,
2313
2313
  {
2314
2314
  size: "sm",
2315
2315
  variant: "ghost",
2316
2316
  className: "h-6 w-6 p-0 hover:bg-slate-200 dark:hover:bg-slate-700",
2317
2317
  onClick: (I) => I.stopPropagation(),
2318
- children: /* @__PURE__ */ e(rl, { className: "h-3 w-3" })
2318
+ children: /* @__PURE__ */ e(nl, { className: "h-3 w-3" })
2319
2319
  }
2320
2320
  ) }),
2321
- /* @__PURE__ */ n(pa, { align: "end", className: "z-[51] w-40", children: [
2321
+ /* @__PURE__ */ n(wa, { align: "end", className: "z-[51] w-40", children: [
2322
2322
  /* @__PURE__ */ n(
2323
- We,
2323
+ He,
2324
2324
  {
2325
2325
  onClick: (I) => {
2326
2326
  I.stopPropagation(), i(t);
@@ -2332,21 +2332,21 @@ function _u({
2332
2332
  }
2333
2333
  ),
2334
2334
  /* @__PURE__ */ n(
2335
- We,
2335
+ He,
2336
2336
  {
2337
2337
  onClick: (I) => {
2338
2338
  I.preventDefault(), I.stopPropagation(), u(t.id);
2339
2339
  },
2340
2340
  disabled: s,
2341
2341
  children: [
2342
- s ? /* @__PURE__ */ e(Fe, { className: "mr-2 h-3 w-3 animate-spin" }) : /* @__PURE__ */ e(ll, { className: "mr-2 h-3 w-3" }),
2342
+ s ? /* @__PURE__ */ e(Fe, { className: "mr-2 h-3 w-3 animate-spin" }) : /* @__PURE__ */ e(rl, { className: "mr-2 h-3 w-3" }),
2343
2343
  s ? "Duplicating..." : "Duplicate"
2344
2344
  ]
2345
2345
  }
2346
2346
  ),
2347
2347
  t.ownership.isOwner && /* @__PURE__ */ n(se, { children: [
2348
2348
  /* @__PURE__ */ n(
2349
- We,
2349
+ He,
2350
2350
  {
2351
2351
  onClick: (I) => {
2352
2352
  I.stopPropagation(), c == null || c(t);
@@ -2358,7 +2358,7 @@ function _u({
2358
2358
  }
2359
2359
  ),
2360
2360
  /* @__PURE__ */ n(
2361
- We,
2361
+ He,
2362
2362
  {
2363
2363
  onClick: (I) => {
2364
2364
  I.stopPropagation(), m(t);
@@ -2371,7 +2371,7 @@ function _u({
2371
2371
  ),
2372
2372
  /* @__PURE__ */ e(Ia, {}),
2373
2373
  /* @__PURE__ */ n(
2374
- We,
2374
+ He,
2375
2375
  {
2376
2376
  onClick: (I) => {
2377
2377
  I.stopPropagation(), d(t), f(!1);
@@ -2439,8 +2439,8 @@ function Fs({
2439
2439
  const c = ((d = s.find((u) => u.value === t)) == null ? void 0 : d.label) || t, o = s.filter(
2440
2440
  (u) => u.value !== t
2441
2441
  );
2442
- return i ? /* @__PURE__ */ n(ma, { children: [
2443
- /* @__PURE__ */ e(ha, { asChild: !0, children: /* @__PURE__ */ e(
2442
+ return i ? /* @__PURE__ */ n(ba, { children: [
2443
+ /* @__PURE__ */ e(Ca, { asChild: !0, children: /* @__PURE__ */ e(
2444
2444
  oe,
2445
2445
  {
2446
2446
  variant: "outline",
@@ -2453,8 +2453,8 @@ function Fs({
2453
2453
  children: c
2454
2454
  }
2455
2455
  ) }),
2456
- /* @__PURE__ */ e(pa, { className: "z-[51]", children: o.map((u) => /* @__PURE__ */ e(
2457
- We,
2456
+ /* @__PURE__ */ e(wa, { className: "z-[51]", children: o.map((u) => /* @__PURE__ */ e(
2457
+ He,
2458
2458
  {
2459
2459
  onClick: () => {
2460
2460
  console.log("Dropdown item clicked:", {
@@ -3205,7 +3205,7 @@ function ni({
3205
3205
  handleRemoveAccess: d,
3206
3206
  handleUpdateAccess: u
3207
3207
  }) {
3208
- const m = Ba(), h = Et(), g = $a(), x = no(), v = ga(), f = c || ((b) => {
3208
+ const m = Ba(), h = At(), g = $a(), x = no(), v = ha(), f = c || ((b) => {
3209
3209
  const k = m.some((D) => D.id === b), N = h.includes(b);
3210
3210
  k ? v.removeSelectedUser(b) : N ? v.removeUserFromRemove(b) : v.addSelectedUser({ id: b, role: "VIEWER" });
3211
3211
  }), y = o || v.updateSelectedUserRole, p = d || v.addUserToRemove, C = u || ((b, k, N) => {
@@ -3296,7 +3296,7 @@ function ri({
3296
3296
  const l = (s == null ? void 0 : s.role) && ["POWER_USER", "ADMIN", "AUTHOR", "SUPER_ADMIN"].includes(s.role);
3297
3297
  return /* @__PURE__ */ n("div", { className: "space-y-3", children: [
3298
3298
  /* @__PURE__ */ e(
3299
- il,
3299
+ ll,
3300
3300
  {
3301
3301
  value: t,
3302
3302
  onValueChange: a,
@@ -3331,7 +3331,7 @@ function ri({
3331
3331
  !l && r.some((i) => i.value === "all_users") && /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: "Only admins, authors, power users, and super admins can share with all users." })
3332
3332
  ] });
3333
3333
  }
3334
- const va = () => [
3334
+ const ga = () => [
3335
3335
  { value: "VIEWER", label: "Viewer", description: "Can view only" },
3336
3336
  {
3337
3337
  value: "EDITOR",
@@ -3359,7 +3359,7 @@ function Wu({
3359
3359
  isUpdating: c = !1,
3360
3360
  isRemoving: o = !1
3361
3361
  }) {
3362
- const d = It(), u = va().filter(
3362
+ const d = Et(), u = ga().filter(
3363
3363
  (C) => C.value === "VIEWER" || C.value === "EDITOR" || C.value === "CONTRIBUTOR"
3364
3364
  ), m = a.role !== "NONE" ? a.role : "NONE", h = l ? l.newRole : m, g = a.role !== "NONE" && !i && (!l || l.newRole === m), x = l !== null && l.newRole !== m, v = i, f = m === "NONE" || !m, y = (C) => {
3365
3365
  switch (C) {
@@ -3575,7 +3575,7 @@ function Qu({
3575
3575
  isRemoving: c = !1
3576
3576
  }) {
3577
3577
  var ce, le;
3578
- const o = Ua(), d = ms(), { searchQuery: u, setSearchQuery: m, debouncedSearchQuery: h } = ol(), g = Ba(), x = Et(), v = $a(), f = It(), y = Rn(), p = ga(), [C, T] = ut.useState("specific_users"), F = () => {
3578
+ const o = Ua(), d = ms(), { searchQuery: u, setSearchQuery: m, debouncedSearchQuery: h } = il(), g = Ba(), x = At(), v = $a(), f = Et(), y = Rn(), p = ha(), [C, T] = ut.useState("specific_users"), F = () => {
3579
3579
  if (o === "org") return "organization";
3580
3580
  if (o === "tenant") return "tenant";
3581
3581
  }, b = () => {
@@ -3668,7 +3668,7 @@ function Qu({
3668
3668
  selectedUserObjects: S,
3669
3669
  onRemove: P,
3670
3670
  onRoleChange: M,
3671
- getRoleOptions: va
3671
+ getRoleOptions: ga
3672
3672
  }
3673
3673
  ),
3674
3674
  /* @__PURE__ */ e(
@@ -3685,7 +3685,7 @@ function Qu({
3685
3685
  usersToUpdate: v,
3686
3686
  allUsers: I,
3687
3687
  onRemove: z,
3688
- getRoleOptions: va
3688
+ getRoleOptions: ga
3689
3689
  }
3690
3690
  ),
3691
3691
  /* @__PURE__ */ e(
@@ -3697,7 +3697,7 @@ function Qu({
3697
3697
  resource: t,
3698
3698
  onShare: () => {
3699
3699
  },
3700
- getRoleOptions: va,
3700
+ getRoleOptions: ga,
3701
3701
  allUsers: I,
3702
3702
  currentUser: s,
3703
3703
  handleUserToggle: P,
@@ -3727,7 +3727,7 @@ function Qu({
3727
3727
  ) })
3728
3728
  ] }) : null;
3729
3729
  }
3730
- function Vr({
3730
+ function _r({
3731
3731
  resource: t,
3732
3732
  resourceType: a,
3733
3733
  currentUser: s,
@@ -3737,7 +3737,7 @@ function Vr({
3737
3737
  isRemoving: c = !1
3738
3738
  }) {
3739
3739
  var U;
3740
- const { searchQuery: o, debouncedSearchQuery: d, setSearchQuery: u } = ol(), m = Ba(), h = Et(), g = $a(), x = It(), v = _s(), f = Fn(), y = ms(), p = ga(), { data: C, isLoading: T } = ku({
3740
+ const { searchQuery: o, debouncedSearchQuery: d, setSearchQuery: u } = il(), m = Ba(), h = At(), g = $a(), x = Et(), v = _s(), f = Fn(), y = ms(), p = ha(), { data: C, isLoading: T } = ku({
3741
3741
  enabled: (s == null ? void 0 : s.type) === "organization"
3742
3742
  }), [F, b] = j(
3743
3743
  (s == null ? void 0 : s.type) === "organization" ? "all_tenants" : "specific_tenant_users"
@@ -3813,7 +3813,7 @@ function Vr({
3813
3813
  ), H = I || P, G = S || M, ae = () => (s == null ? void 0 : s.type) === "tenant" || F === "all_tenants" ? !0 : y && (F === "specific_tenant_users" || F === "all_tenant_users");
3814
3814
  return /* @__PURE__ */ n(se, { children: [
3815
3815
  G && /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ n("div", { className: "text-center", children: [
3816
- /* @__PURE__ */ e(cl, { className: "mx-auto mb-2 h-8 w-8 text-destructive" }),
3816
+ /* @__PURE__ */ e(ol, { className: "mx-auto mb-2 h-8 w-8 text-destructive" }),
3817
3817
  /* @__PURE__ */ e("p", { className: "mb-4 text-sm text-destructive", children: "Failed to load users or shares" }),
3818
3818
  /* @__PURE__ */ e(
3819
3819
  V,
@@ -3850,13 +3850,13 @@ function Vr({
3850
3850
  value: "all_tenants",
3851
3851
  label: "All Tenants",
3852
3852
  description: "Share with all tenants and their users",
3853
- icon: /* @__PURE__ */ e(zr, { className: "mb-3 h-6 w-6 text-purple-500" })
3853
+ icon: /* @__PURE__ */ e(Fr, { className: "mb-3 h-6 w-6 text-purple-500" })
3854
3854
  },
3855
3855
  {
3856
3856
  value: "all_tenant_users",
3857
3857
  label: "Specific Tenant",
3858
3858
  description: "Share with all users of a specific tenant",
3859
- icon: /* @__PURE__ */ e(al, { className: "mb-3 h-6 w-6 text-blue-500" })
3859
+ icon: /* @__PURE__ */ e(tl, { className: "mb-3 h-6 w-6 text-blue-500" })
3860
3860
  },
3861
3861
  {
3862
3862
  value: "specific_tenant_users",
@@ -3902,7 +3902,7 @@ function Vr({
3902
3902
  selectedUserObjects: W,
3903
3903
  onRemove: (_) => E(_),
3904
3904
  onRoleChange: O,
3905
- getRoleOptions: va
3905
+ getRoleOptions: ga
3906
3906
  }
3907
3907
  ),
3908
3908
  /* @__PURE__ */ e(
@@ -3919,7 +3919,7 @@ function Vr({
3919
3919
  usersToUpdate: g,
3920
3920
  allUsers: D,
3921
3921
  onRemove: L,
3922
- getRoleOptions: va
3922
+ getRoleOptions: ga
3923
3923
  }
3924
3924
  ),
3925
3925
  /* @__PURE__ */ e(
@@ -3931,7 +3931,7 @@ function Vr({
3931
3931
  resource: t,
3932
3932
  onShare: () => {
3933
3933
  },
3934
- getRoleOptions: va,
3934
+ getRoleOptions: ga,
3935
3935
  allUsers: D,
3936
3936
  currentUser: s,
3937
3937
  handleUserToggle: E,
@@ -3959,7 +3959,7 @@ function Vr({
3959
3959
  ) }) : null }) : (
3960
3960
  /* Show message for org users when no tenant is selected */
3961
3961
  (s == null ? void 0 : s.type) === "organization" && (F === "specific_tenant_users" || F === "all_tenant_users") && /* @__PURE__ */ e("div", { className: "mt-6 flex items-center justify-center py-8", children: /* @__PURE__ */ n("div", { className: "text-center", children: [
3962
- /* @__PURE__ */ e(zr, { className: "mx-auto mb-2 h-8 w-8 text-muted-foreground" }),
3962
+ /* @__PURE__ */ e(Fr, { className: "mx-auto mb-2 h-8 w-8 text-muted-foreground" }),
3963
3963
  /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Please select a tenant to continue" })
3964
3964
  ] }) })
3965
3965
  )
@@ -3967,7 +3967,7 @@ function Vr({
3967
3967
  ] });
3968
3968
  }
3969
3969
  const ii = () => {
3970
- const t = zn(), a = It(), s = Ba(), r = Et(), l = $a(), i = ms(), c = Rn(), o = Fn(), d = _s(), u = Ke(() => () => lo({
3970
+ const t = zn(), a = Et(), s = Ba(), r = At(), l = $a(), i = ms(), c = Rn(), o = Fn(), d = _s(), u = Ke(() => () => lo({
3971
3971
  currentContext: t,
3972
3972
  currentMode: a,
3973
3973
  selectedUsers: s,
@@ -4026,7 +4026,7 @@ const ii = () => {
4026
4026
  tenantWideRole: d
4027
4027
  };
4028
4028
  };
4029
- function jr({
4029
+ function Vr({
4030
4030
  resource: t,
4031
4031
  existingShares: a,
4032
4032
  isSharing: s,
@@ -4038,8 +4038,8 @@ function jr({
4038
4038
  currentAllUsersShare: d,
4039
4039
  onRemoveAccess: u
4040
4040
  }) {
4041
- const m = Ba(), h = Et(), g = $a();
4042
- It(), zn();
4041
+ const m = Ba(), h = At(), g = $a();
4042
+ Et(), zn();
4043
4043
  const x = ms();
4044
4044
  Ua();
4045
4045
  const v = Rn(), f = Fn(), y = _s(), { buildShareData: p, validateShareData: C, isCurrentStateValid: T } = ii(), F = s || r || l, b = () => {
@@ -4205,8 +4205,8 @@ function Xu({
4205
4205
  shareTabType: c,
4206
4206
  currentAllUsersShare: o
4207
4207
  }) {
4208
- const d = Ba(), u = Et(), m = $a();
4209
- It(), zn();
4208
+ const d = Ba(), u = At(), m = $a();
4209
+ Et(), zn();
4210
4210
  const h = _s();
4211
4211
  ms();
4212
4212
  const { buildShareData: g, validateShareData: x, isCurrentStateValid: v } = ii(), f = a || s || r, y = () => {
@@ -4298,7 +4298,7 @@ function oi({
4298
4298
  onRemoveAccess: o
4299
4299
  }) {
4300
4300
  var N, D, w, I;
4301
- const { currentUser: d } = lt(), [u, m] = ut.useState("specific_users"), [h, g] = ut.useState("specific_users"), x = ga(), v = Ua(), f = It(), { existingShares: y } = ua({
4301
+ const { currentUser: d } = lt(), [u, m] = ut.useState("specific_users"), [h, g] = ut.useState("specific_users"), x = ha(), v = Ua(), f = Et(), { existingShares: y } = ua({
4302
4302
  debouncedSearchQuery: "",
4303
4303
  resourceId: (t == null ? void 0 : t.id) || "",
4304
4304
  resourceType: a,
@@ -4332,7 +4332,7 @@ function oi({
4332
4332
  t == null ? void 0 : t.title,
4333
4333
  '"'
4334
4334
  ] }) }),
4335
- /* @__PURE__ */ e(jt, { children: k ? "Share this resource with org users or tenant users. As a super admin, you can share with all users." : "Share this resource with other users in your tenant." })
4335
+ /* @__PURE__ */ e(Vt, { children: k ? "Share this resource with org users or tenant users. As a super admin, you can share with all users." : "Share this resource with other users in your tenant." })
4336
4336
  ] }),
4337
4337
  k ? (
4338
4338
  // Organization users see tabs
@@ -4368,7 +4368,7 @@ function oi({
4368
4368
  value: "tenant",
4369
4369
  className: "min-h-0 flex-1 overflow-hidden",
4370
4370
  children: /* @__PURE__ */ e("div", { className: "h-full overflow-y-auto", children: /* @__PURE__ */ e(
4371
- Vr,
4371
+ _r,
4372
4372
  {
4373
4373
  resource: t,
4374
4374
  resourceType: a,
@@ -4389,7 +4389,7 @@ function oi({
4389
4389
  ) : (
4390
4390
  // Tenant users see content directly without tabs
4391
4391
  /* @__PURE__ */ e("div", { className: "mb-4 min-h-0 flex-1 overflow-hidden", children: /* @__PURE__ */ e("div", { className: "h-full overflow-y-auto", children: /* @__PURE__ */ e(
4392
- Vr,
4392
+ _r,
4393
4393
  {
4394
4394
  resource: t,
4395
4395
  resourceType: a,
@@ -4404,7 +4404,7 @@ function oi({
4404
4404
  /* @__PURE__ */ e("div", { className: "mt-auto flex-shrink-0", children: k ? (
4405
4405
  // Organization users - show footer based on selected tab
4406
4406
  v === "org" ? /* @__PURE__ */ e(
4407
- jr,
4407
+ Vr,
4408
4408
  {
4409
4409
  resource: t,
4410
4410
  existingShares: p,
@@ -4420,7 +4420,7 @@ function oi({
4420
4420
  ) : (
4421
4421
  // For tenant tab, use OrgUserFooter with actual share type from store
4422
4422
  /* @__PURE__ */ e(
4423
- jr,
4423
+ Vr,
4424
4424
  {
4425
4425
  resource: t,
4426
4426
  existingShares: y,
@@ -4826,7 +4826,7 @@ function di(t, a, s, r) {
4826
4826
  }
4827
4827
  }
4828
4828
  function Zu(t, a, s) {
4829
- const r = ga(), l = Et(), i = Ua(), c = It(), { currentUser: o } = lt(), { existingShares: d } = ua({
4829
+ const r = ha(), l = At(), i = Ua(), c = Et(), { currentUser: o } = lt(), { existingShares: d } = ua({
4830
4830
  debouncedSearchQuery: "",
4831
4831
  resourceId: t || "",
4832
4832
  resourceType: ye.DASHBOARD,
@@ -4885,7 +4885,7 @@ function Zu(t, a, s) {
4885
4885
  };
4886
4886
  }
4887
4887
  function em(t, a, s) {
4888
- const { currentUser: r } = lt(), l = ga(), i = Et(), c = Ua(), o = It(), { existingShares: d } = ua({
4888
+ const { currentUser: r } = lt(), l = ha(), i = At(), c = Ua(), o = Et(), { existingShares: d } = ua({
4889
4889
  debouncedSearchQuery: "",
4890
4890
  resourceId: t || "",
4891
4891
  resourceType: ye.VISUAL,
@@ -4959,7 +4959,7 @@ function tm(t) {
4959
4959
  return console.log("beforeClause", c), console.log("afterClause", o), o ? `${c} {{ filters | where }} ${o}` : `${c.replace(/;$/, "")} {{ filters | where }}`;
4960
4960
  }
4961
4961
  }
4962
- function rr(t) {
4962
+ function nr(t) {
4963
4963
  const [a, s] = j(null), [r, l] = j(null);
4964
4964
  return Ae(() => {
4965
4965
  if (!t || t.trim() === "") {
@@ -5016,7 +5016,7 @@ function am(t, a) {
5016
5016
  }
5017
5017
  return t[0].id;
5018
5018
  }
5019
- async function Br(t, a, s) {
5019
+ async function jr(t, a, s) {
5020
5020
  if (!t || !a)
5021
5021
  throw new Error("Missing auth token or visual ID");
5022
5022
  const r = ["resource-by-id", "visual", a], l = s.getQueryData(r);
@@ -5053,7 +5053,7 @@ function sm(t, a, s, r, l) {
5053
5053
  }
5054
5054
  function nm() {
5055
5055
  var g;
5056
- const { setCardSql: t } = ie(), a = A((x) => x.frame), s = A((x) => x.card), r = rr(
5056
+ const { setCardSql: t } = ie(), a = A((x) => x.frame), s = A((x) => x.card), r = nr(
5057
5057
  ((g = s.customCardPreferences) == null ? void 0 : g.url) || ""
5058
5058
  ), l = A(
5059
5059
  (x) => x.selectedSchemaName
@@ -5109,20 +5109,20 @@ function nm() {
5109
5109
  m
5110
5110
  ]) };
5111
5111
  }
5112
- function lr() {
5113
- const { authToken: t } = Oe(), a = at(), s = dl(), { selectVisual: r } = Tn(), { setFrame: l, setCard: i } = ie(), {
5112
+ function rr() {
5113
+ const { authToken: t } = Oe(), a = at(), s = cl(), { selectVisual: r } = Tn(), { setFrame: l, setCard: i } = ie(), {
5114
5114
  setIsDashboardEditing: c,
5115
5115
  setIsVisualEditing: o,
5116
5116
  setSelectedFrameId: d,
5117
5117
  addFrame: u,
5118
5118
  setIsDashboardPanelOpen: m
5119
- } = Tt(), h = ne((f) => f.selectedSheetId), g = Fu((s == null ? void 0 : s.id) || "", {
5119
+ } = Mt(), h = ne((f) => f.selectedSheetId), g = Fu((s == null ? void 0 : s.id) || "", {
5120
5120
  enabled: !!(s != null && s.id) && !!(t != null && t.accessToken)
5121
5121
  }), x = Ce(
5122
5122
  async (f) => {
5123
5123
  try {
5124
5124
  r(f);
5125
- const { data: y, fromCache: p } = await Br(
5125
+ const { data: y, fromCache: p } = await jr(
5126
5126
  (t == null ? void 0 : t.accessToken) || "",
5127
5127
  f.id,
5128
5128
  a
@@ -5155,7 +5155,7 @@ function lr() {
5155
5155
  success: !1,
5156
5156
  error: "No sheet selected. Please select a sheet first."
5157
5157
  };
5158
- const { data: y, fromCache: p } = await Br(
5158
+ const { data: y, fromCache: p } = await jr(
5159
5159
  (t == null ? void 0 : t.accessToken) || "",
5160
5160
  f.id,
5161
5161
  a
@@ -5196,7 +5196,7 @@ function lr() {
5196
5196
  function rm() {
5197
5197
  const [t, a] = j(""), [s, r] = j(!1), [l, i] = j(""), [c, o] = j(""), [d, u] = j(!1), [m, h] = j(
5198
5198
  null
5199
- ), [g, x] = j(!1), [v, f] = j(null), [y, p] = j(null), { setIsDashboardEditing: C, setIsVisualEditing: T } = Tt(), { handleEditLibraryVisual: F, handleAddLibraryVisual: b } = lr(), {
5199
+ ), [g, x] = j(!1), [v, f] = j(null), [y, p] = j(null), { setIsDashboardEditing: C, setIsVisualEditing: T } = Mt(), { handleEditLibraryVisual: F, handleAddLibraryVisual: b } = rr(), {
5200
5200
  resources: k,
5201
5201
  isLoading: N,
5202
5202
  isError: D,
@@ -5282,7 +5282,7 @@ function rm() {
5282
5282
  }, Z = (te) => {
5283
5283
  h(te), u(!0);
5284
5284
  };
5285
- return Et(), ga(), ua({
5285
+ return At(), ha(), ua({
5286
5286
  debouncedSearchQuery: "",
5287
5287
  resourceId: (m == null ? void 0 : m.id) || "",
5288
5288
  resourceType: ye.VISUAL,
@@ -5416,25 +5416,25 @@ function rm() {
5416
5416
  }
5417
5417
  ),
5418
5418
  /* @__PURE__ */ e(
5419
- ul,
5419
+ dl,
5420
5420
  {
5421
5421
  open: g,
5422
5422
  onOpenChange: (te) => {
5423
5423
  !te && O || (x(te), te || f(null));
5424
5424
  },
5425
- children: /* @__PURE__ */ n(ml, { children: [
5426
- /* @__PURE__ */ n(hl, { children: [
5427
- /* @__PURE__ */ e(pl, { children: "Delete Visual" }),
5428
- /* @__PURE__ */ n(fl, { children: [
5425
+ children: /* @__PURE__ */ n(ul, { children: [
5426
+ /* @__PURE__ */ n(ml, { children: [
5427
+ /* @__PURE__ */ e(hl, { children: "Delete Visual" }),
5428
+ /* @__PURE__ */ n(pl, { children: [
5429
5429
  'Are you sure you want to delete "',
5430
5430
  v == null ? void 0 : v.title,
5431
5431
  '"? This action cannot be undone.'
5432
5432
  ] })
5433
5433
  ] }),
5434
- /* @__PURE__ */ n(gl, { children: [
5435
- /* @__PURE__ */ e(xl, { disabled: O, children: "Cancel" }),
5434
+ /* @__PURE__ */ n(fl, { children: [
5435
+ /* @__PURE__ */ e(gl, { disabled: O, children: "Cancel" }),
5436
5436
  /* @__PURE__ */ e(
5437
- yl,
5437
+ xl,
5438
5438
  {
5439
5439
  onClick: (te) => {
5440
5440
  te.preventDefault(), te.stopPropagation(), G();
@@ -5473,7 +5473,7 @@ function lm({
5473
5473
  Ae(() => {
5474
5474
  s ? (y(!0), C(!0)) : p && (y(!1), C(!1));
5475
5475
  }, [s, p]);
5476
- const F = () => t.ownership.isOwner ? t.ownership.status === "private" ? /* @__PURE__ */ e(sr, { className: "h-3 w-3 text-purple-500" }) : /* @__PURE__ */ e(Ut, { className: "h-3.5 w-3.5 text-blue-600" }) : /* @__PURE__ */ e(da, { className: "h-3.5 w-3.5 text-slate-500" }), b = () => /* @__PURE__ */ e(co, { className: "h-4 w-4 text-slate-400" }), k = () => {
5476
+ const F = () => t.ownership.isOwner ? t.ownership.status === "private" ? /* @__PURE__ */ e(ar, { className: "h-3 w-3 text-purple-500" }) : /* @__PURE__ */ e(Ut, { className: "h-3.5 w-3.5 text-blue-600" }) : /* @__PURE__ */ e(da, { className: "h-3.5 w-3.5 text-slate-500" }), b = () => /* @__PURE__ */ e(co, { className: "h-4 w-4 text-slate-400" }), k = () => {
5477
5477
  g(t), i(t.id), h == null || h(t.id);
5478
5478
  };
5479
5479
  return /* @__PURE__ */ n(
@@ -5528,38 +5528,38 @@ function lm({
5528
5528
  "flex items-center opacity-0 transition-opacity duration-150 group-hover:opacity-100"
5529
5529
  ),
5530
5530
  children: /* @__PURE__ */ n(
5531
- ma,
5531
+ ba,
5532
5532
  {
5533
5533
  modal: !1,
5534
5534
  open: f,
5535
5535
  onOpenChange: y,
5536
5536
  children: [
5537
- /* @__PURE__ */ e(ha, { asChild: !0, children: /* @__PURE__ */ e(
5537
+ /* @__PURE__ */ e(Ca, { asChild: !0, children: /* @__PURE__ */ e(
5538
5538
  V,
5539
5539
  {
5540
5540
  size: "sm",
5541
5541
  variant: "ghost",
5542
5542
  className: "h-6 w-6 p-0 hover:bg-slate-200 dark:hover:bg-slate-700",
5543
5543
  onClick: (I) => I.stopPropagation(),
5544
- children: /* @__PURE__ */ e(rl, { className: "h-3 w-3" })
5544
+ children: /* @__PURE__ */ e(nl, { className: "h-3 w-3" })
5545
5545
  }
5546
5546
  ) }),
5547
- /* @__PURE__ */ n(pa, { align: "end", className: "z-[51] w-40", children: [
5547
+ /* @__PURE__ */ n(wa, { align: "end", className: "z-[51] w-40", children: [
5548
5548
  /* @__PURE__ */ n(
5549
- We,
5549
+ He,
5550
5550
  {
5551
5551
  onClick: (I) => {
5552
5552
  I.preventDefault(), I.stopPropagation(), d(t.id);
5553
5553
  },
5554
5554
  disabled: s,
5555
5555
  children: [
5556
- s ? /* @__PURE__ */ e(Fe, { className: "mr-2 h-3 w-3 animate-spin" }) : /* @__PURE__ */ e(ll, { className: "mr-2 h-3 w-3" }),
5556
+ s ? /* @__PURE__ */ e(Fe, { className: "mr-2 h-3 w-3 animate-spin" }) : /* @__PURE__ */ e(rl, { className: "mr-2 h-3 w-3" }),
5557
5557
  s ? "Duplicating..." : "Duplicate"
5558
5558
  ]
5559
5559
  }
5560
5560
  ),
5561
5561
  t.permissions.canEdit && /* @__PURE__ */ e(se, { children: /* @__PURE__ */ n(
5562
- We,
5562
+ He,
5563
5563
  {
5564
5564
  onClick: (I) => {
5565
5565
  I.stopPropagation(), u(t);
@@ -5573,7 +5573,7 @@ function lm({
5573
5573
  t.permissions.canDelete && /* @__PURE__ */ n(se, { children: [
5574
5574
  /* @__PURE__ */ e(Ia, {}),
5575
5575
  /* @__PURE__ */ n(
5576
- We,
5576
+ He,
5577
5577
  {
5578
5578
  onClick: (I) => {
5579
5579
  I.stopPropagation(), o(t), T(!1);
@@ -5624,7 +5624,7 @@ function om(t) {
5624
5624
  ), F = Ea(
5625
5625
  (Z) => Z.actions.selectDashboard
5626
5626
  );
5627
- ga(), Et(), Ua(), It();
5627
+ ha(), At(), Ua(), Et();
5628
5628
  const {
5629
5629
  resources: b,
5630
5630
  isLoading: k,
@@ -5836,25 +5836,25 @@ function om(t) {
5836
5836
  }
5837
5837
  ),
5838
5838
  /* @__PURE__ */ e(
5839
- ul,
5839
+ dl,
5840
5840
  {
5841
5841
  open: x,
5842
5842
  onOpenChange: (Z) => {
5843
5843
  !Z && M || (v(Z), Z || y(null));
5844
5844
  },
5845
- children: /* @__PURE__ */ n(ml, { children: [
5846
- /* @__PURE__ */ n(hl, { children: [
5847
- /* @__PURE__ */ e(pl, { children: "Delete Dashboard" }),
5848
- /* @__PURE__ */ n(fl, { children: [
5845
+ children: /* @__PURE__ */ n(ul, { children: [
5846
+ /* @__PURE__ */ n(ml, { children: [
5847
+ /* @__PURE__ */ e(hl, { children: "Delete Dashboard" }),
5848
+ /* @__PURE__ */ n(pl, { children: [
5849
5849
  'Are you sure you want to delete "',
5850
5850
  f == null ? void 0 : f.title,
5851
5851
  '"? This action cannot be undone.'
5852
5852
  ] })
5853
5853
  ] }),
5854
- /* @__PURE__ */ n(gl, { children: [
5855
- /* @__PURE__ */ e(xl, { disabled: M, children: "Cancel" }),
5854
+ /* @__PURE__ */ n(fl, { children: [
5855
+ /* @__PURE__ */ e(gl, { disabled: M, children: "Cancel" }),
5856
5856
  /* @__PURE__ */ e(
5857
- yl,
5857
+ xl,
5858
5858
  {
5859
5859
  onClick: (Z) => {
5860
5860
  Z.preventDefault(), Z.stopPropagation(), ae();
@@ -5989,7 +5989,7 @@ function dm() {
5989
5989
  (_) => _.actions.setShowFilters
5990
5990
  ), { addFrame: N, setSelectedFrameId: D } = ne(
5991
5991
  (_) => _.actions
5992
- ), { getSelectedSheet: w, setIsDashboardEditing: I, setShowDashboardJSON: S } = ne((_) => _.actions), P = w(), { setInitialDashboard: M } = Ea((_) => _.actions), { resources: E } = nr(ye.DASHBOARD);
5992
+ ), { getSelectedSheet: w, setIsDashboardEditing: I, setShowDashboardJSON: S } = ne((_) => _.actions), P = w(), { setInitialDashboard: M } = Ea((_) => _.actions), { resources: E } = sr(ye.DASHBOARD);
5993
5993
  Ae(() => {
5994
5994
  if (E && E.length > 0) {
5995
5995
  const _ = c == null ? void 0 : c.id;
@@ -6150,7 +6150,7 @@ function dm() {
6150
6150
  onClick: $,
6151
6151
  size: "sm",
6152
6152
  children: [
6153
- /* @__PURE__ */ e(vl, { className: "mr-2 h-4 w-4" }),
6153
+ /* @__PURE__ */ e(yl, { className: "mr-2 h-4 w-4" }),
6154
6154
  "Edit"
6155
6155
  ]
6156
6156
  }
@@ -6253,12 +6253,12 @@ function um({
6253
6253
  d && /* @__PURE__ */ e("div", { className: "mr-2", children: d }),
6254
6254
  /* @__PURE__ */ e("span", { className: "max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap", children: y() })
6255
6255
  ] }),
6256
- /* @__PURE__ */ e(Ot, { className: "size-4 opacity-50" })
6256
+ /* @__PURE__ */ e(It, { className: "size-4 opacity-50" })
6257
6257
  ]
6258
6258
  }
6259
6259
  ) }),
6260
6260
  /* @__PURE__ */ e(
6261
- At,
6261
+ Tt,
6262
6262
  {
6263
6263
  className: "w-full p-0",
6264
6264
  style: { minWidth: x },
@@ -6281,7 +6281,7 @@ function um({
6281
6281
  t == null ? void 0 : t.toLowerCase(),
6282
6282
  " found."
6283
6283
  ] }),
6284
- /* @__PURE__ */ e(ya, { children: f == null ? void 0 : f.map((C) => /* @__PURE__ */ e(
6284
+ /* @__PURE__ */ e(fa, { children: f == null ? void 0 : f.map((C) => /* @__PURE__ */ e(
6285
6285
  qa,
6286
6286
  {
6287
6287
  className: "overflow-x-auto",
@@ -6289,7 +6289,7 @@ function um({
6289
6289
  onSelect: (T) => p(T, C.id),
6290
6290
  children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
6291
6291
  /* @__PURE__ */ e(
6292
- fa,
6292
+ ma,
6293
6293
  {
6294
6294
  className: K(
6295
6295
  "size-4",
@@ -6327,7 +6327,7 @@ function Ja({
6327
6327
  if (t === "Connection")
6328
6328
  return /* @__PURE__ */ e(Jd, { className: "size-4" });
6329
6329
  if (t === "Database")
6330
- return /* @__PURE__ */ e(Mt, { className: "size-4" });
6330
+ return /* @__PURE__ */ e(jt, { className: "size-4" });
6331
6331
  if (t === "Schema")
6332
6332
  return /* @__PURE__ */ e(Gd, { className: "size-4" });
6333
6333
  if (t === "Table")
@@ -6400,7 +6400,7 @@ function mm({ column: t }) {
6400
6400
  (f) => f.selectedDatabaseName
6401
6401
  ), c = A(
6402
6402
  (f) => f.selectedDatamodelId
6403
- ), o = A((f) => f.sqlGen), { modelItems: d, connectionType: u } = Rt(), m = A((f) => f.actions.setSqlGen), h = A((f) => f.actions.setCardSql), g = A((f) => f.actions.setRunSql);
6403
+ ), o = A((f) => f.sqlGen), { modelItems: d, connectionType: u } = Ot(), m = A((f) => f.actions.setSqlGen), h = A((f) => f.actions.setCardSql), g = A((f) => f.actions.setRunSql);
6404
6404
  function x(f, y) {
6405
6405
  var F;
6406
6406
  const p = Nl(f, o, y), C = (F = d == null ? void 0 : d.find(
@@ -6462,7 +6462,7 @@ function mm({ column: t }) {
6462
6462
  ] });
6463
6463
  }
6464
6464
  return /* @__PURE__ */ n(An, { openDelay: 0, open: a, onOpenChange: s, children: [
6465
- /* @__PURE__ */ e(En, { asChild: !0, children: /* @__PURE__ */ e(Pn, { className: "invisible size-3.5 cursor-pointer text-foreground/40 group-hover:visible" }) }),
6465
+ /* @__PURE__ */ e(En, { asChild: !0, children: /* @__PURE__ */ e(vl, { className: "invisible size-3.5 cursor-pointer text-foreground/40 group-hover:visible" }) }),
6466
6466
  /* @__PURE__ */ e(
6467
6467
  In,
6468
6468
  {
@@ -6475,7 +6475,7 @@ function mm({ column: t }) {
6475
6475
  }
6476
6476
  function hm({ dataType: t }) {
6477
6477
  const a = Pe(t);
6478
- return a === "string" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-blue-100 text-xs text-blue-700 dark:bg-blue-950 dark:text-blue-300", children: /* @__PURE__ */ e(ht, { className: "h-3 w-3" }) }) : a === "number" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-green-100 text-xs text-green-700 dark:bg-green-950 dark:text-green-300", children: /* @__PURE__ */ e($t, { className: "h-3 w-3" }) }) : a === "date" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-purple-100 text-xs text-purple-700 dark:bg-purple-950 dark:text-purple-300", children: /* @__PURE__ */ e(Dt, { className: "h-3 w-3" }) }) : a === "boolean" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-orange-100 text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e(wa, { className: "h-3 w-3" }) }) : a === "json" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(Pa, { className: "h-3 w-3" }) }) : a === "geo" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-orange-100 text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e(ss, { className: "h-3 w-3" }) }) : a === "calculated" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(ys, { className: "h-3 w-3" }) }) : /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(ht, { className: "h-3 w-3" }) });
6478
+ return a === "string" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-blue-100 text-xs text-blue-700 dark:bg-blue-950 dark:text-blue-300", children: /* @__PURE__ */ e(ht, { className: "h-3 w-3" }) }) : a === "number" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-green-100 text-xs text-green-700 dark:bg-green-950 dark:text-green-300", children: /* @__PURE__ */ e($t, { className: "h-3 w-3" }) }) : a === "date" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-purple-100 text-xs text-purple-700 dark:bg-purple-950 dark:text-purple-300", children: /* @__PURE__ */ e(Dt, { className: "h-3 w-3" }) }) : a === "boolean" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-orange-100 text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e(Na, { className: "h-3 w-3" }) }) : a === "json" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(Pa, { className: "h-3 w-3" }) }) : a === "geo" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-orange-100 text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e(ss, { className: "h-3 w-3" }) }) : a === "calculated" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(ys, { className: "h-3 w-3" }) }) : /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(ht, { className: "h-3 w-3" }) });
6479
6479
  }
6480
6480
  function en({
6481
6481
  column: t,
@@ -6593,7 +6593,7 @@ const tn = {
6593
6593
  type: "string"
6594
6594
  }, ui = {
6595
6595
  id: "__placeholder__"
6596
- }, Na = "droppable-group-by", ba = "droppable-metrics", Ca = "droppable-pivot-by", zs = "sortable-group-by", wn = "sortable-metrics", Ls = "sortable-pivot-by", Sn = "droppable-filters", kn = "sortable-filters", ir = "sortable-order-by";
6596
+ }, xa = "droppable-group-by", ya = "droppable-metrics", va = "droppable-pivot-by", zs = "sortable-group-by", wn = "sortable-metrics", Ls = "sortable-pivot-by", Sn = "droppable-filters", kn = "sortable-filters", lr = "sortable-order-by";
6597
6597
  function gm() {
6598
6598
  const t = sa((E) => E.insertIndex), a = A(
6599
6599
  (E) => {
@@ -6633,7 +6633,7 @@ function gm() {
6633
6633
  setFilterColumns: v,
6634
6634
  setOrderByColumns: f,
6635
6635
  setPivotByColumns: y
6636
- } = ie(), { columns: p } = wl(), { formattedTableName: C } = Rt(), T = Xa(
6636
+ } = ie(), { columns: p } = wl(), { formattedTableName: C } = Ot(), T = Xa(
6637
6637
  Qt(xo, {
6638
6638
  activationConstraint: {
6639
6639
  distance: 1
@@ -6648,7 +6648,7 @@ function gm() {
6648
6648
  (le) => le.column_name === O.id
6649
6649
  );
6650
6650
  if (!$) return;
6651
- const X = na($.data_type), Y = Lt($.data_type), ce = Pt($.data_type);
6651
+ const X = na($.data_type), Y = zt($.data_type), ce = Lt($.data_type);
6652
6652
  if (Y || ce) {
6653
6653
  if (a.some(
6654
6654
  (W) => W.id === L
@@ -6661,7 +6661,7 @@ function gm() {
6661
6661
  (G) => G.id !== tn.id
6662
6662
  );
6663
6663
  H.splice(W, 0, tn), d(H);
6664
- } else if (z.id === Na) {
6664
+ } else if (z.id === xa) {
6665
6665
  c(a.length);
6666
6666
  const W = [...a, tn];
6667
6667
  d(W), u(s), m(r);
@@ -6679,7 +6679,7 @@ function gm() {
6679
6679
  (G) => G.id !== an.id
6680
6680
  );
6681
6681
  H.splice(W, 0, an), h(H);
6682
- } else if (z.id === Ca) {
6682
+ } else if (z.id === va) {
6683
6683
  c(i.length);
6684
6684
  const W = [...i, an];
6685
6685
  h(W), d(a), u(s), m(r);
@@ -6696,7 +6696,7 @@ function gm() {
6696
6696
  (G) => G.id !== sn.id
6697
6697
  );
6698
6698
  H.splice(W, 0, sn), u(H);
6699
- } else if (z.id === ba) {
6699
+ } else if (z.id === ya) {
6700
6700
  c(s.length);
6701
6701
  const W = [...s, sn];
6702
6702
  u(W), m(r), d(a), h(i);
@@ -6741,8 +6741,8 @@ function gm() {
6741
6741
  L.splice($, 0, X), x(L);
6742
6742
  }
6743
6743
  function D(E) {
6744
- const O = Lt(E.data_type);
6745
- Pt(E.data_type);
6744
+ const O = zt(E.data_type);
6745
+ Lt(E.data_type);
6746
6746
  const z = [...i], R = t !== null ? t : i.length;
6747
6747
  let L;
6748
6748
  O ? L = {
@@ -6764,8 +6764,8 @@ function gm() {
6764
6764
  }, z.splice(R, 0, L), y(z);
6765
6765
  }
6766
6766
  function w(E) {
6767
- const O = Lt(E.data_type);
6768
- Pt(E.data_type);
6767
+ const O = zt(E.data_type);
6768
+ Lt(E.data_type);
6769
6769
  const z = [...a], R = t !== null ? t : a.length;
6770
6770
  let L;
6771
6771
  O ? L = {
@@ -6810,8 +6810,8 @@ function gm() {
6810
6810
  (ee) => ee.column_name === O.id
6811
6811
  );
6812
6812
  if (!G) return;
6813
- const ae = na(G.data_type), U = Lt(G.data_type), _ = Pt(G.data_type);
6814
- (U || _) && (z.id === Na || ((L = z.data.current) == null ? void 0 : L.type) === zs) && w(G), (U || _) && (z.id === Ca || (($ = z.data.current) == null ? void 0 : $.type) === Ls) ? D(G) : (ae || U) && (z.id === ba || ((X = z.data.current) == null ? void 0 : X.type) === wn) ? (ae && N(G), U && N(G, "COUNT")) : k(G) && (z.id === Sn || ((Y = z.data.current) == null ? void 0 : Y.type) === kn) && I(G);
6813
+ const ae = na(G.data_type), U = zt(G.data_type), _ = Lt(G.data_type);
6814
+ (U || _) && (z.id === xa || ((L = z.data.current) == null ? void 0 : L.type) === zs) && w(G), (U || _) && (z.id === va || (($ = z.data.current) == null ? void 0 : $.type) === Ls) ? D(G) : (ae || U) && (z.id === ya || ((X = z.data.current) == null ? void 0 : X.type) === wn) ? (ae && N(G), U && N(G, "COUNT")) : k(G) && (z.id === Sn || ((Y = z.data.current) == null ? void 0 : Y.type) === kn) && I(G);
6815
6815
  }
6816
6816
  if (z && ((ce = z.data.current) == null ? void 0 : ce.type) === zs && a.some((G) => G.id === O.id)) {
6817
6817
  const G = a.findIndex(
@@ -6847,7 +6847,7 @@ function gm() {
6847
6847
  }
6848
6848
  function P(E) {
6849
6849
  const { active: O, over: z } = E, R = O.data.current;
6850
- if ((R == null ? void 0 : R.type) === ir && z) {
6850
+ if ((R == null ? void 0 : R.type) === lr && z) {
6851
6851
  const L = l.findIndex(
6852
6852
  (X) => Ha(X.columnId) === O.id
6853
6853
  ), $ = l.findIndex(
@@ -6893,7 +6893,7 @@ function ls(t, a) {
6893
6893
  }
6894
6894
  }
6895
6895
  function Ha(t) {
6896
- return `${ir}-${t}`;
6896
+ return `${lr}-${t}`;
6897
6897
  }
6898
6898
  function _a(t, a) {
6899
6899
  const s = mt(t.replace(/_/g, " "));
@@ -6912,7 +6912,7 @@ function _a(t, a) {
6912
6912
  }
6913
6913
  function xm({ dataType: t }) {
6914
6914
  const a = Pe(t);
6915
- return a === "string" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-blue-100 text-xs text-blue-700 dark:bg-blue-950 dark:text-blue-300", children: /* @__PURE__ */ e(ht, { className: "h-3 w-3" }) }) : a === "number" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-green-100 text-xs text-green-700 dark:bg-green-950 dark:text-green-300", children: /* @__PURE__ */ e($t, { className: "h-3 w-3" }) }) : a === "date" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-purple-100 text-xs text-purple-700 dark:bg-purple-950 dark:text-purple-300", children: /* @__PURE__ */ e(Dt, { className: "h-3 w-3" }) }) : a === "boolean" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-orange-100 text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e(wa, { className: "h-3 w-3" }) }) : a === "json" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(Pa, { className: "h-3 w-3" }) }) : a === "geo" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-orange-100 text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e(ss, { className: "h-3 w-3" }) }) : a === "calculated" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(ys, { className: "h-3 w-3" }) }) : /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(ht, { className: "h-3 w-3" }) });
6915
+ return a === "string" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-blue-100 text-xs text-blue-700 dark:bg-blue-950 dark:text-blue-300", children: /* @__PURE__ */ e(ht, { className: "h-3 w-3" }) }) : a === "number" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-green-100 text-xs text-green-700 dark:bg-green-950 dark:text-green-300", children: /* @__PURE__ */ e($t, { className: "h-3 w-3" }) }) : a === "date" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-purple-100 text-xs text-purple-700 dark:bg-purple-950 dark:text-purple-300", children: /* @__PURE__ */ e(Dt, { className: "h-3 w-3" }) }) : a === "boolean" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-orange-100 text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e(Na, { className: "h-3 w-3" }) }) : a === "json" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(Pa, { className: "h-3 w-3" }) }) : a === "geo" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-orange-100 text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e(ss, { className: "h-3 w-3" }) }) : a === "calculated" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(ys, { className: "h-3 w-3" }) }) : /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(ht, { className: "h-3 w-3" }) });
6916
6916
  }
6917
6917
  function ym({
6918
6918
  schemaName: t,
@@ -6948,14 +6948,14 @@ function ym({
6948
6948
  ne(
6949
6949
  (L) => L.dashboard.aiScopeTables
6950
6950
  );
6951
- const { addToAIScope: x, removeFromAIScope: v } = Tt(), {
6951
+ const { addToAIScope: x, removeFromAIScope: v } = Mt(), {
6952
6952
  addColumnToMetricColumns: f,
6953
6953
  addColumnToGroupBy: y,
6954
6954
  setCardSql: p,
6955
6955
  setRunSql: C,
6956
6956
  setSqlGen: T,
6957
6957
  setIsShowingVisual: F
6958
- } = ie(), { connectionType: b, modelItems: k, selectedDatamodelName: N } = Rt();
6958
+ } = ie(), { connectionType: b, modelItems: k, selectedDatamodelName: N } = Ot();
6959
6959
  function D(L) {
6960
6960
  var $;
6961
6961
  if (u) {
@@ -6974,7 +6974,7 @@ function ym({
6974
6974
  ce && (p(ce), C(!0));
6975
6975
  }
6976
6976
  if (!u) {
6977
- if (Lt(L.data_type))
6977
+ if (zt(L.data_type))
6978
6978
  if (m && m.length > 0) {
6979
6979
  const X = {
6980
6980
  ...L,
@@ -6996,7 +6996,7 @@ function ym({
6996
6996
  };
6997
6997
  f(X);
6998
6998
  }
6999
- if (Pt(L.data_type)) {
6999
+ if (Lt(L.data_type)) {
7000
7000
  const X = {
7001
7001
  ...L,
7002
7002
  role: "groupby",
@@ -7023,7 +7023,7 @@ function ym({
7023
7023
  }
7024
7024
  }
7025
7025
  function w() {
7026
- const L = kr({
7026
+ const L = Sr({
7027
7027
  schemaName: t,
7028
7028
  tableName: a,
7029
7029
  modelName: N,
@@ -7035,7 +7035,7 @@ function ym({
7035
7035
  p($), C(!0);
7036
7036
  }
7037
7037
  function I() {
7038
- const L = kr({
7038
+ const L = Sr({
7039
7039
  schemaName: t,
7040
7040
  tableName: a,
7041
7041
  modelName: N,
@@ -7112,7 +7112,7 @@ function ym({
7112
7112
  // <div className="flex h-full w-full items-center justify-center">
7113
7113
  // <Loader2 className="h-6 w-6 animate-spin text-muted-foreground/70" />
7114
7114
  // </div>
7115
- /* @__PURE__ */ e("div", { className: "flex grow flex-col justify-start gap-2 px-4", children: Array.from({ length: 3 }).map((L, $) => /* @__PURE__ */ e(_n, { className: "h-8 w-full" }, $)) })
7115
+ /* @__PURE__ */ e("div", { className: "flex grow flex-col justify-start gap-2 px-4", children: Array.from({ length: 3 }).map((L, $) => /* @__PURE__ */ e(Pn, { className: "h-8 w-full" }, $)) })
7116
7116
  ) : /* @__PURE__ */ n("div", { className: "flex grow flex-col", children: [
7117
7117
  /* @__PURE__ */ n("div", { className: "flex-shrink-0 space-y-3 px-4", children: [
7118
7118
  u && /* @__PURE__ */ e("div", { className: "flex items-center justify-center gap-2", children: R() }),
@@ -7141,7 +7141,7 @@ function ym({
7141
7141
  /* @__PURE__ */ e("span", { className: "ml-2 text-xs font-semibold", children: S.length })
7142
7142
  ] }),
7143
7143
  /* @__PURE__ */ n(Ie, { value: "text", className: "text-xs", children: [
7144
- /* @__PURE__ */ e(Vn, { className: "size-4 shrink-0" }),
7144
+ /* @__PURE__ */ e(_n, { className: "size-4 shrink-0" }),
7145
7145
  /* @__PURE__ */ e("span", { className: "ml-2 text-xs font-semibold", children: E })
7146
7146
  ] }),
7147
7147
  /* @__PURE__ */ n(Ie, { value: "number", className: "text-xs", children: [
@@ -7222,7 +7222,7 @@ function mi({
7222
7222
  handleTableChange: _,
7223
7223
  tableName: ee,
7224
7224
  schemaName: ge
7225
- } = Rt(), { data: q, refetch: de } = _e(l);
7225
+ } = Ot(), { data: q, refetch: de } = _e(l);
7226
7226
  function be() {
7227
7227
  return t ? t(ge, ee, F) : /* @__PURE__ */ e(
7228
7228
  ym,
@@ -7268,7 +7268,7 @@ function mi({
7268
7268
  /* @__PURE__ */ e("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e(Xe, {}) })
7269
7269
  ] });
7270
7270
  }
7271
- function Ft() {
7271
+ function Rt() {
7272
7272
  if (!i || R === "S3" || R === "API") return null;
7273
7273
  if (!d || d === "none")
7274
7274
  return /* @__PURE__ */ e(
@@ -7347,7 +7347,7 @@ function mi({
7347
7347
  size: "sm",
7348
7348
  variant: "ghost",
7349
7349
  className: "h-6 w-6 p-0",
7350
- children: s ? /* @__PURE__ */ e(Ot, { className: "h-4 w-4" }) : /* @__PURE__ */ e($s, { className: "h-4 w-4" })
7350
+ children: s ? /* @__PURE__ */ e(It, { className: "h-4 w-4" }) : /* @__PURE__ */ e($s, { className: "h-4 w-4" })
7351
7351
  }
7352
7352
  )
7353
7353
  ] }),
@@ -7370,7 +7370,7 @@ function mi({
7370
7370
  ),
7371
7371
  De(),
7372
7372
  je(),
7373
- Ft(),
7373
+ Rt(),
7374
7374
  gt(),
7375
7375
  it()
7376
7376
  ] })
@@ -7425,7 +7425,7 @@ function hi({
7425
7425
  r
7426
7426
  ),
7427
7427
  children: /* @__PURE__ */ n("div", { className: "flex items-start gap-3", children: [
7428
- /* @__PURE__ */ e(cl, { className: "mt-0.5 h-5 w-5 flex-shrink-0 text-destructive" }),
7428
+ /* @__PURE__ */ e(ol, { className: "mt-0.5 h-5 w-5 flex-shrink-0 text-destructive" }),
7429
7429
  /* @__PURE__ */ n("div", { className: "flex-1 space-y-3", children: [
7430
7430
  /* @__PURE__ */ n("div", { className: "space-y-2", children: [
7431
7431
  /* @__PURE__ */ e("p", { className: "text-sm font-medium text-destructive", children: "Query Error" }),
@@ -7456,7 +7456,7 @@ function hi({
7456
7456
  /* @__PURE__ */ e($s, { className: "mr-1.5 h-3.5 w-3.5" }),
7457
7457
  "Hide Details"
7458
7458
  ] }) : /* @__PURE__ */ n(se, { children: [
7459
- /* @__PURE__ */ e(Ot, { className: "mr-1.5 h-3.5 w-3.5" }),
7459
+ /* @__PURE__ */ e(It, { className: "mr-1.5 h-3.5 w-3.5" }),
7460
7460
  "Show Details"
7461
7461
  ] })
7462
7462
  }
@@ -7482,7 +7482,7 @@ function hi({
7482
7482
  /* @__PURE__ */ e("p", { className: "text-xs font-medium text-muted-foreground", children: "Error SQL Query" }),
7483
7483
  /* @__PURE__ */ e(Za, { text: a, className: "h-6 w-6" })
7484
7484
  ] }),
7485
- /* @__PURE__ */ e("div", { className: "rounded-md bg-background/60 p-2 max-h-80 overflow-auto", children: /* @__PURE__ */ e(jn, { code: a, language: "sql" }) })
7485
+ /* @__PURE__ */ e("div", { className: "rounded-md bg-background/60 p-2 max-h-80 overflow-auto", children: /* @__PURE__ */ e(Vn, { code: a, language: "sql" }) })
7486
7486
  ] }) }) })
7487
7487
  ] })
7488
7488
  ] })
@@ -7511,7 +7511,7 @@ function pi({
7511
7511
  showFeedbackButton: !1
7512
7512
  }
7513
7513
  ),
7514
- !a && t && /* @__PURE__ */ e("div", { className: "flex flex-col space-y-1.5", children: /* @__PURE__ */ e("div", { className: "", children: /* @__PURE__ */ e(jn, { code: t, language: "sql" }) }) })
7514
+ !a && t && /* @__PURE__ */ e("div", { className: "flex flex-col space-y-1.5", children: /* @__PURE__ */ e("div", { className: "", children: /* @__PURE__ */ e(Vn, { code: t, language: "sql" }) }) })
7515
7515
  ] }),
7516
7516
  !l && t && !a && /* @__PURE__ */ n(V, { onClick: d, variant: "secondary", size: "sm", children: [
7517
7517
  /* @__PURE__ */ e(Md, { className: "mr-2 h-4 w-4" }),
@@ -7554,7 +7554,7 @@ function vm(t) {
7554
7554
  return yo({ 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: [] }] })(t);
7555
7555
  }
7556
7556
  function gi(t) {
7557
- const { theme: a } = Zr(), s = ne((f) => f.theme), r = A((f) => f.frame), l = A((f) => f.card), i = A((f) => f.activeTabCardId), c = vo(), { refetch: o } = _e(l), { updateCardTab: d, setRunSql: u } = ie(), m = Bt(), h = Bt({}), g = r.cards.find((f) => f.id === i), x = Ce(() => {
7557
+ const { theme: a } = Xr(), s = ne((f) => f.theme), r = A((f) => f.frame), l = A((f) => f.card), i = A((f) => f.activeTabCardId), c = vo(), { refetch: o } = _e(l), { updateCardTab: d, setRunSql: u } = ie(), m = Bt(), h = Bt({}), g = r.cards.find((f) => f.id === i), x = Ce(() => {
7558
7558
  let f = "";
7559
7559
  return t === "python" && (f = (g == null ? void 0 : g.python) || Dl), t === "sql" && (f = (g == null ? void 0 : g.sql) || ""), f;
7560
7560
  }, [t, g]);
@@ -7701,14 +7701,14 @@ function Cm({ jsonString: t }) {
7701
7701
  }
7702
7702
  );
7703
7703
  }
7704
- function or({
7704
+ function ir({
7705
7705
  variant: t = "outline"
7706
7706
  }) {
7707
7707
  var c;
7708
7708
  const { setCardSql: a } = ie();
7709
7709
  A((o) => o.frame);
7710
7710
  const s = A((o) => o.card);
7711
- rr(
7711
+ nr(
7712
7712
  ((c = s.customCardPreferences) == null ? void 0 : c.url) || ""
7713
7713
  ), A(
7714
7714
  (o) => o.selectedSchemaName
@@ -7719,7 +7719,7 @@ function or({
7719
7719
  ), A((o) => o.selectedTableName), A(
7720
7720
  (o) => o.selectedConnectionId
7721
7721
  ), A((o) => o.isShowingVisual), s.sql;
7722
- const r = A((o) => o.onSave), { getUpdatedFrame: l } = lr();
7722
+ const r = A((o) => o.onSave), { getUpdatedFrame: l } = rr();
7723
7723
  function i() {
7724
7724
  const o = l();
7725
7725
  r == null || r(o);
@@ -7732,7 +7732,7 @@ function or({
7732
7732
  size: "sm",
7733
7733
  variant: t,
7734
7734
  children: [
7735
- /* @__PURE__ */ e(fa, { className: "mr-2 size-4 font-bold" }),
7735
+ /* @__PURE__ */ e(ma, { className: "mr-2 size-4 font-bold" }),
7736
7736
  "Accept"
7737
7737
  ]
7738
7738
  }
@@ -7741,7 +7741,7 @@ function or({
7741
7741
  function wm() {
7742
7742
  const t = at(), [a, s] = j(!1), r = ne(
7743
7743
  (u) => u.actions.setIsDashboardPanelOpen
7744
- ), { setIsVisualEditing: l } = Tt(), { getUpdatedFrame: i } = lr(), c = dl(), o = Pu();
7744
+ ), { setIsVisualEditing: l } = Mt(), { getUpdatedFrame: i } = rr(), c = cl(), o = Pu();
7745
7745
  return /* @__PURE__ */ n(V, { onClick: () => {
7746
7746
  const u = i();
7747
7747
  if (!(c != null && c.id)) {
@@ -7778,7 +7778,7 @@ function wm() {
7778
7778
  ] })
7779
7779
  ] });
7780
7780
  }
7781
- function cr() {
7781
+ function or() {
7782
7782
  const { setTempQueryData: t, setSqlGen: a } = ie(), s = at(), r = A((d) => d.tempQueryData), l = A((d) => d.onClose), i = A((d) => d.card), { queryKey: c } = _e(i);
7783
7783
  function o() {
7784
7784
  if (r) {
@@ -8066,8 +8066,8 @@ ${d}` : ""}
8066
8066
  )
8067
8067
  ] }),
8068
8068
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
8069
- /* @__PURE__ */ e(cr, {}),
8070
- /* @__PURE__ */ e(or, {})
8069
+ /* @__PURE__ */ e(or, {}),
8070
+ /* @__PURE__ */ e(ir, {})
8071
8071
  ] })
8072
8072
  ]
8073
8073
  }
@@ -8099,7 +8099,7 @@ function km({ card: t }) {
8099
8099
  colors: ((T = (C = o == null ? void 0 : o.chart) == null ? void 0 : C.dataset) == null ? void 0 : T.backgroundColor) || []
8100
8100
  };
8101
8101
  (F = t.customCardPreferences) != null && F.inputData;
8102
- const { getCard: u } = Bn(((b = t.customCardPreferences) == null ? void 0 : b.url) || ""), m = ((k = t.customCardPreferences) == null ? void 0 : k.visualType) || "single", h = A((M) => M.frame), { setCustomCardPreferences: g } = ie(), { data: x } = _e(t), v = Ce((M, E) => {
8102
+ const { getCard: u } = jn(((b = t.customCardPreferences) == null ? void 0 : b.url) || ""), m = ((k = t.customCardPreferences) == null ? void 0 : k.visualType) || "single", h = A((M) => M.frame), { setCustomCardPreferences: g } = ie(), { data: x } = _e(t), v = Ce((M, E) => {
8103
8103
  l((O) => ({
8104
8104
  ...O,
8105
8105
  [M]: E
@@ -8183,7 +8183,7 @@ function xi({
8183
8183
  ...a
8184
8184
  }) {
8185
8185
  var D;
8186
- const s = A((w) => w.card), r = $n(s), l = ((D = s.customCardPreferences) == null ? void 0 : D.showCardHeader) ?? !0, i = A((w) => w.frame), c = ne((w) => w.dashboard.filters), o = A((w) => w.actions.setRunSql), { updateFilter: d } = Tt(), u = c == null ? void 0 : c.find((w) => w.id === i.filterId), { data: m, isLoading: h, isFetching: g, errorMessage: x, pagination: v } = _e(s), { setCard: f, updateCardInFrame: y } = ie(), { data: p } = Un(s), C = Ke(() => {
8186
+ const s = A((w) => w.card), r = Bn(s), l = ((D = s.customCardPreferences) == null ? void 0 : D.showCardHeader) ?? !0, i = A((w) => w.frame), c = ne((w) => w.dashboard.filters), o = A((w) => w.actions.setRunSql), { updateFilter: d } = Mt(), u = c == null ? void 0 : c.find((w) => w.id === i.filterId), { data: m, isLoading: h, isFetching: g, errorMessage: x, pagination: v } = _e(s), { setCard: f, updateCardInFrame: y } = ie(), { data: p } = $n(s), C = Ke(() => {
8187
8187
  var w;
8188
8188
  return s.type !== "pivotTable" || !((w = m == null ? void 0 : m.records) != null && w.length) ? null : {
8189
8189
  records: m.records,
@@ -8229,7 +8229,7 @@ function xi({
8229
8229
  p
8230
8230
  ]);
8231
8231
  function k(w) {
8232
- return /* @__PURE__ */ e(xs, { FallbackComponent: Yn, children: /* @__PURE__ */ e(km, { card: w }) });
8232
+ return /* @__PURE__ */ e(xs, { FallbackComponent: qn, children: /* @__PURE__ */ e(km, { card: w }) });
8233
8233
  }
8234
8234
  function N() {
8235
8235
  if (m != null && m.records && (m == null ? void 0 : m.records.length) === 0 && !h && !g)
@@ -8256,7 +8256,7 @@ function xi({
8256
8256
  ) });
8257
8257
  if (s.type === "table")
8258
8258
  return /* @__PURE__ */ e("div", { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: /* @__PURE__ */ e(
8259
- qn,
8259
+ Un,
8260
8260
  {
8261
8261
  card: s,
8262
8262
  data: (m == null ? void 0 : m.records) || [],
@@ -8273,7 +8273,7 @@ function xi({
8273
8273
  data: T.data,
8274
8274
  options: T.options,
8275
8275
  onAggregationChange: (w) => {
8276
- const I = Dr(
8276
+ const I = kr(
8277
8277
  w,
8278
8278
  s.config
8279
8279
  ), S = { ...s, config: I };
@@ -8299,7 +8299,7 @@ function xi({
8299
8299
  paginationMetadata: v,
8300
8300
  onPaginationChange: F,
8301
8301
  onAggregationChange: (w) => {
8302
- const I = Dr(
8302
+ const I = kr(
8303
8303
  w,
8304
8304
  s.config
8305
8305
  ), S = { ...s, config: I };
@@ -8389,7 +8389,7 @@ const rn = ({
8389
8389
  }
8390
8390
  ), Dm = () => /* @__PURE__ */ n(St, { children: [
8391
8391
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e(kt, { children: "Customize Card" }) }),
8392
- /* @__PURE__ */ n(jt, { children: [
8392
+ /* @__PURE__ */ n(Vt, { children: [
8393
8393
  "See the configuration options and documentation",
8394
8394
  /* @__PURE__ */ e(
8395
8395
  "a",
@@ -8474,7 +8474,7 @@ const rn = ({
8474
8474
  /* @__PURE__ */ e(V, { onClick: l, variant: "outline", children: "Close" })
8475
8475
  ] });
8476
8476
  function Am() {
8477
- const [t, a] = j(!1), [s, r] = j(""), [l, i] = j(""), [c, o] = j(""), [d, u] = j(""), m = A((b) => b.card), h = A((b) => b.card.customCfg), g = h ? JSON.stringify(h, null, 2) : "", { data: x } = _e(m), { data: v } = Un(m), { setCardCustomCfg: f, setCustomVisualCode: y } = ie(), p = (b) => {
8477
+ const [t, a] = j(!1), [s, r] = j(""), [l, i] = j(""), [c, o] = j(""), [d, u] = j(""), m = A((b) => b.card), h = A((b) => b.card.customCfg), g = h ? JSON.stringify(h, null, 2) : "", { data: x } = _e(m), { data: v } = $n(m), { setCardCustomCfg: f, setCustomVisualCode: y } = ie(), p = (b) => {
8478
8478
  var k, N;
8479
8479
  return JSON.stringify(
8480
8480
  {
@@ -8523,19 +8523,19 @@ function Am() {
8523
8523
  }
8524
8524
  }, F = Object.keys(h || {}).length === 0;
8525
8525
  return /* @__PURE__ */ n(Ct, { open: t, onOpenChange: a, children: [
8526
- /* @__PURE__ */ e(el, { asChild: !0, children: /* @__PURE__ */ e(
8526
+ /* @__PURE__ */ e(Zr, { asChild: !0, children: /* @__PURE__ */ e(
8527
8527
  Ne,
8528
8528
  {
8529
8529
  tooltip: "Customize Visual",
8530
8530
  onClick: C,
8531
8531
  className: F ? "" : "text-green-600 hover:text-green-700",
8532
- children: /* @__PURE__ */ e(Gn, { className: "h-4 w-4" })
8532
+ children: /* @__PURE__ */ e(Yn, { className: "h-4 w-4" })
8533
8533
  }
8534
8534
  ) }),
8535
8535
  /* @__PURE__ */ n(wt, { className: "flex h-[600px] grow flex-col overflow-auto sm:min-w-[900px] lg:min-w-[1200px]", children: [
8536
8536
  /* @__PURE__ */ e(Dm, {}),
8537
8537
  /* @__PURE__ */ n("div", { className: "flex grow gap-2", children: [
8538
- /* @__PURE__ */ e(xs, { FallbackComponent: Yn, children: /* @__PURE__ */ e(xi, { className: "w-1/2 rounded shadow-none" }) }),
8538
+ /* @__PURE__ */ e(xs, { FallbackComponent: qn, children: /* @__PURE__ */ e(xi, { className: "w-1/2 rounded shadow-none" }) }),
8539
8539
  /* @__PURE__ */ e(
8540
8540
  Mm,
8541
8541
  {
@@ -8715,7 +8715,7 @@ function Ni({
8715
8715
  tooltip: "Stacked Bar Chart",
8716
8716
  onClick: () => d("stackedBar"),
8717
8717
  className: "h-10 p-4",
8718
- children: /* @__PURE__ */ e(Wn, { className: K("size-5", a) })
8718
+ children: /* @__PURE__ */ e(Kn, { className: K("size-5", a) })
8719
8719
  }
8720
8720
  ),
8721
8721
  /* @__PURE__ */ e(
@@ -8771,7 +8771,7 @@ function Ni({
8771
8771
  tooltip: "Doughnut Chart",
8772
8772
  onClick: () => d("doughnut"),
8773
8773
  className: "h-10 p-4",
8774
- children: /* @__PURE__ */ e(Jn, { className: K("size-5", a) })
8774
+ children: /* @__PURE__ */ e(Wn, { className: K("size-5", a) })
8775
8775
  }
8776
8776
  ),
8777
8777
  /* @__PURE__ */ e(
@@ -8830,7 +8830,7 @@ function Ni({
8830
8830
  tooltip: "KPI",
8831
8831
  onClick: () => d("kpi"),
8832
8832
  className: "h-10 p-4",
8833
- children: /* @__PURE__ */ e(Kn, { className: K("size-5", a) })
8833
+ children: /* @__PURE__ */ e(Gn, { className: K("size-5", a) })
8834
8834
  }
8835
8835
  ),
8836
8836
  /* @__PURE__ */ e(
@@ -8885,9 +8885,9 @@ function Om({
8885
8885
  case "bubble":
8886
8886
  return /* @__PURE__ */ e(zl, { className: a });
8887
8887
  case "doughnut":
8888
- return /* @__PURE__ */ e(Jn, { className: a });
8889
- case "stackedBar":
8890
8888
  return /* @__PURE__ */ e(Wn, { className: a });
8889
+ case "stackedBar":
8890
+ return /* @__PURE__ */ e(Kn, { className: a });
8891
8891
  case "stackedLine":
8892
8892
  return /* @__PURE__ */ e(Fl, { className: a });
8893
8893
  case "polarArea":
@@ -8900,7 +8900,7 @@ function Om({
8900
8900
  case "range":
8901
8901
  return /* @__PURE__ */ e(El, { className: a });
8902
8902
  case "kpi":
8903
- return /* @__PURE__ */ e(Kn, { className: a });
8903
+ return /* @__PURE__ */ e(Gn, { className: a });
8904
8904
  case "text":
8905
8905
  return /* @__PURE__ */ e(ht, { className: a });
8906
8906
  case "map":
@@ -9025,7 +9025,7 @@ function Fm() {
9025
9025
  s(t === "x" || t === void 0 ? "y" : "x");
9026
9026
  },
9027
9027
  tooltip: "Chart Orientation",
9028
- children: t === "x" || t === void 0 ? /* @__PURE__ */ e(Pr, { className: "size-4" }) : /* @__PURE__ */ e(Lr, { className: "size-4" })
9028
+ children: t === "x" || t === void 0 ? /* @__PURE__ */ e(Lr, { className: "size-4" }) : /* @__PURE__ */ e(zr, { className: "size-4" })
9029
9029
  }
9030
9030
  );
9031
9031
  }
@@ -9037,7 +9037,7 @@ function Fm() {
9037
9037
  s(t === "y" || t === void 0 ? "x" : "y");
9038
9038
  },
9039
9039
  tooltip: "Chart Orientation",
9040
- children: t === "y" || t === void 0 ? /* @__PURE__ */ e(Pr, { className: "size-4" }) : /* @__PURE__ */ e(Lr, { className: "size-4" })
9040
+ children: t === "y" || t === void 0 ? /* @__PURE__ */ e(Lr, { className: "size-4" }) : /* @__PURE__ */ e(zr, { className: "size-4" })
9041
9041
  }
9042
9042
  );
9043
9043
  }
@@ -9258,7 +9258,7 @@ function wi() {
9258
9258
  card: a,
9259
9259
  data: u == null ? void 0 : u.records
9260
9260
  }
9261
- ) }) }) }) : /* @__PURE__ */ e(xs, { FallbackComponent: Yn, children: /* @__PURE__ */ e(xi, { className: "grow border-none shadow-none" }) });
9261
+ ) }) }) }) : /* @__PURE__ */ e(xs, { FallbackComponent: qn, children: /* @__PURE__ */ e(xi, { className: "grow border-none shadow-none" }) });
9262
9262
  }
9263
9263
  return /* @__PURE__ */ n(
9264
9264
  Yt,
@@ -9412,7 +9412,7 @@ function Ss({
9412
9412
  ),
9413
9413
  children: [
9414
9414
  (g == null ? void 0 : g.records) && (g == null ? void 0 : g.records.length) > 0 && // <ResultsTable data={data?.records || []} />
9415
- /* @__PURE__ */ e(qn, { card: a, data: (g == null ? void 0 : g.records) || [] }),
9415
+ /* @__PURE__ */ e(Un, { card: a, data: (g == null ? void 0 : g.records) || [] }),
9416
9416
  f && /* @__PURE__ */ e(Rm, { error: f })
9417
9417
  ]
9418
9418
  }
@@ -9457,7 +9457,7 @@ function _m() {
9457
9457
  var f, y;
9458
9458
  const t = A(
9459
9459
  (p) => p.card.customCardPreferences
9460
- ), { data: a } = yi(), s = (a == null ? void 0 : a.plugins) || [], r = A((p) => p.card), l = A((p) => p.frame), i = (t == null ? void 0 : t.visualType) || "single", { setCustomCardPreferences: c } = ie(), { components: o, manifest: d } = Bn(
9460
+ ), { data: a } = yi(), s = (a == null ? void 0 : a.plugins) || [], r = A((p) => p.card), l = A((p) => p.frame), i = (t == null ? void 0 : t.visualType) || "single", { setCustomCardPreferences: c } = ie(), { components: o, manifest: d } = jn(
9461
9461
  (t == null ? void 0 : t.url) || ""
9462
9462
  ), u = (f = d == null ? void 0 : d.visuals) == null ? void 0 : f.find(
9463
9463
  (p) => p.name === (t == null ? void 0 : t.componentName)
@@ -9732,7 +9732,7 @@ function Da() {
9732
9732
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: ((g = s == null ? void 0 : s.onClickFilter) == null ? void 0 : g.find(
9733
9733
  (x) => x.columnIndex === m
9734
9734
  )) && /* @__PURE__ */ e(
9735
- vl,
9735
+ yl,
9736
9736
  {
9737
9737
  onClick: () => {
9738
9738
  a((x) => {
@@ -9797,7 +9797,7 @@ function Vm({ idx: t }) {
9797
9797
  }
9798
9798
  return /* @__PURE__ */ n(pt, { children: [
9799
9799
  /* @__PURE__ */ e(ft, { children: /* @__PURE__ */ e(Wl, { className: "size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground" }) }),
9800
- /* @__PURE__ */ e(At, { className: "w-fit px-2 py-1", children: /* @__PURE__ */ n("div", { className: "flex gap-1", children: [
9800
+ /* @__PURE__ */ e(Tt, { className: "w-fit px-2 py-1", children: /* @__PURE__ */ n("div", { className: "flex gap-1", children: [
9801
9801
  /* @__PURE__ */ e(
9802
9802
  "button",
9803
9803
  {
@@ -10017,8 +10017,8 @@ function Di({
10017
10017
  }
10018
10018
  );
10019
10019
  }
10020
- function dr() {
10021
- const t = A((x) => x.selectedConnectionId), a = A((x) => x.selectedDatamodelId), s = A((x) => x.selectedDatabaseName), r = A((x) => x.selectedSchemaName), l = A((x) => x.selectedTableName), i = ne((x) => x.dashboard.filters) || [], c = ne((x) => x.actions.addFilter), o = ne((x) => x.actions.removeFilter), { removeFilterValues: d } = Tt(), { modelItems: u, tableName: m, connectionType: h } = Rt();
10020
+ function cr() {
10021
+ const t = A((x) => x.selectedConnectionId), a = A((x) => x.selectedDatamodelId), s = A((x) => x.selectedDatabaseName), r = A((x) => x.selectedSchemaName), l = A((x) => x.selectedTableName), i = ne((x) => x.dashboard.filters) || [], c = ne((x) => x.actions.addFilter), o = ne((x) => x.actions.removeFilter), { removeFilterValues: d } = Mt(), { modelItems: u, tableName: m, connectionType: h } = Ot();
10022
10022
  function g(x, v = "dashboard", f) {
10023
10023
  var D;
10024
10024
  const y = Nt(x.column_name), p = Nt(s || ""), C = Nt(r || ""), T = Nt(m);
@@ -10031,7 +10031,7 @@ function dr() {
10031
10031
  const k = (D = u == null ? void 0 : u.find(
10032
10032
  (w) => w.id === a
10033
10033
  )) == null ? void 0 : D.name;
10034
- a && a !== "none" && (b = `${Mr}.${k}.${y}`, F = `${Mr}.${k}`), f != null && f.qualifiedFieldName && (b = f.qualifiedFieldName), f != null && f.entityName && (F = f.entityName);
10034
+ a && a !== "none" && (b = `${Dr}.${k}.${y}`, F = `${Dr}.${k}`), f != null && f.qualifiedFieldName && (b = f.qualifiedFieldName), f != null && f.entityName && (F = f.entityName);
10035
10035
  const N = i == null ? void 0 : i.find(
10036
10036
  (w) => w.column === b && w.table === T && (w.database === p || w.database === s)
10037
10037
  );
@@ -10083,7 +10083,7 @@ function dr() {
10083
10083
  function Ka() {
10084
10084
  const t = ne(
10085
10085
  (o) => o.dashboard.filters
10086
- ), a = A((o) => o.frame), { setFrame: s } = ie(), { columns: r } = Rt(), { assignFilter: l } = dr();
10086
+ ), a = A((o) => o.frame), { setFrame: s } = ie(), { columns: r } = Ot(), { assignFilter: l } = cr();
10087
10087
  function i(o) {
10088
10088
  const d = l(o, "frame");
10089
10089
  s({ ...a, filterId: d });
@@ -10116,11 +10116,11 @@ function Bm({
10116
10116
  ]
10117
10117
  }
10118
10118
  ) }),
10119
- /* @__PURE__ */ e(At, { className: "w-[200px] p-0", children: /* @__PURE__ */ n(hs, { children: [
10119
+ /* @__PURE__ */ e(Tt, { className: "w-[200px] p-0", children: /* @__PURE__ */ n(hs, { children: [
10120
10120
  /* @__PURE__ */ e(ps, { placeholder: "Search column", className: "h-9" }),
10121
10121
  /* @__PURE__ */ n(fs, { children: [
10122
10122
  /* @__PURE__ */ e(gs, { children: "No framework found." }),
10123
- /* @__PURE__ */ e(ya, { children: t == null ? void 0 : t.map((o) => /* @__PURE__ */ n(
10123
+ /* @__PURE__ */ e(fa, { children: t == null ? void 0 : t.map((o) => /* @__PURE__ */ n(
10124
10124
  qa,
10125
10125
  {
10126
10126
  value: o.column_name,
@@ -10526,7 +10526,7 @@ function Jm() {
10526
10526
  var m, h, g, x, v;
10527
10527
  const t = A((f) => f.card.preferences), a = A(
10528
10528
  (f) => f.actions.setCardPreferences
10529
- ), s = A((f) => f.card), r = $n(s), l = A(
10529
+ ), s = A((f) => f.card), r = Bn(s), l = A(
10530
10530
  (f) => f.actions.setNumberFormat
10531
10531
  );
10532
10532
  A(
@@ -10556,7 +10556,7 @@ function Jm() {
10556
10556
  }
10557
10557
  ) || [], d = A(
10558
10558
  (f) => f.actions.setColorRanges
10559
- ), u = [...new Set(Tr.map((f) => f.currency))];
10559
+ ), u = [...new Set(Mr.map((f) => f.currency))];
10560
10560
  return /* @__PURE__ */ n("div", { children: [
10561
10561
  !r && /* @__PURE__ */ n("div", { className: "mb-3 flex items-center gap-2", children: [
10562
10562
  /* @__PURE__ */ e(
@@ -10599,7 +10599,7 @@ function Jm() {
10599
10599
  /* @__PURE__ */ e(pe, { children: /* @__PURE__ */ n(Ra, { children: [
10600
10600
  /* @__PURE__ */ e(Fa, { children: "Format" }),
10601
10601
  /* @__PURE__ */ e(Q, { value: "none", children: "Auto" }, "none"),
10602
- Tr.map((f) => /* @__PURE__ */ e(Q, { value: f.locale, children: f.locale }, f.locale))
10602
+ Mr.map((f) => /* @__PURE__ */ e(Q, { value: f.locale, children: f.locale }, f.locale))
10603
10603
  ] }) })
10604
10604
  ]
10605
10605
  }
@@ -10844,7 +10844,7 @@ function eh() {
10844
10844
  var d, u, m, h, g, x, v, f, y, p, C, T, F, b, k, N, D, w;
10845
10845
  const t = A((I) => I.card), a = (u = (d = t == null ? void 0 : t.preferences) == null ? void 0 : d.mapVisualOptions) == null ? void 0 : u.topoJsonUrl, [s, r] = j(
10846
10846
  ((h = (m = t == null ? void 0 : t.preferences) == null ? void 0 : m.mapVisualOptions) == null ? void 0 : h.customTopoJsonUrl) || ""
10847
- ), { setCardPreferences: l } = ie(), { data: i } = Un(t), c = Object.keys((i == null ? void 0 : i.objects) || {}).map((I) => ({
10847
+ ), { setCardPreferences: l } = ie(), { data: i } = $n(t), c = Object.keys((i == null ? void 0 : i.objects) || {}).map((I) => ({
10848
10848
  label: I,
10849
10849
  value: I
10850
10850
  })) || [];
@@ -11058,7 +11058,7 @@ function th() {
11058
11058
  });
11059
11059
  }
11060
11060
  return /* @__PURE__ */ n(
11061
- il,
11061
+ ll,
11062
11062
  {
11063
11063
  value: (r = t == null ? void 0 : t.textVisualOptions) != null && r.isDynamicText ? "dynamic" : "static",
11064
11064
  onValueChange: s,
@@ -11239,9 +11239,9 @@ function sh({
11239
11239
  function Ti({ color: t, onColorChange: a, onClose: s }) {
11240
11240
  const [r, l] = j(0), [i, c] = j(100), [o, d] = j(50), [u, m] = j(t);
11241
11241
  Ae(() => {
11242
- const y = $r(t);
11242
+ const y = Br(t);
11243
11243
  if (y) {
11244
- const p = Ur(y.r, y.g, y.b);
11244
+ const p = $r(y.r, y.g, y.b);
11245
11245
  l(p.h), c(p.s), d(p.l), m(t);
11246
11246
  }
11247
11247
  }, [t]);
@@ -11255,9 +11255,9 @@ function Ti({ color: t, onColorChange: a, onClose: s }) {
11255
11255
  m(F);
11256
11256
  }, v = (y) => {
11257
11257
  if (m(y), /^#[0-9A-Fa-f]{6}$/.test(y)) {
11258
- const p = $r(y);
11258
+ const p = Br(y);
11259
11259
  if (p) {
11260
- const C = Ur(p.r, p.g, p.b);
11260
+ const C = $r(p.r, p.g, p.b);
11261
11261
  l(C.h), c(C.s), d(C.l);
11262
11262
  }
11263
11263
  }
@@ -11363,7 +11363,7 @@ function Ti({ color: t, onColorChange: a, onClose: s }) {
11363
11363
  ] })
11364
11364
  ] });
11365
11365
  }
11366
- function $r(t) {
11366
+ function Br(t) {
11367
11367
  const a = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);
11368
11368
  return a ? {
11369
11369
  r: parseInt(a[1], 16),
@@ -11374,7 +11374,7 @@ function $r(t) {
11374
11374
  function nh(t, a, s) {
11375
11375
  return "#" + ((1 << 24) + (t << 16) + (a << 8) + s).toString(16).slice(1);
11376
11376
  }
11377
- function Ur(t, a, s) {
11377
+ function $r(t, a, s) {
11378
11378
  t /= 255, a /= 255, s /= 255;
11379
11379
  const r = Math.max(t, a, s), l = Math.min(t, a, s);
11380
11380
  let i = 0, c = 0;
@@ -11502,7 +11502,7 @@ function Ai() {
11502
11502
  Ae(() => {
11503
11503
  const M = {};
11504
11504
  h.forEach((E, O) => {
11505
- M[E] = Ar(
11505
+ M[E] = Tr(
11506
11506
  E,
11507
11507
  O,
11508
11508
  a == null ? void 0 : a.colorConfig
@@ -11562,7 +11562,7 @@ function Ai() {
11562
11562
  r(E);
11563
11563
  const O = {};
11564
11564
  h.forEach((z, R) => {
11565
- O[z] = Ar(z, R, void 0);
11565
+ O[z] = Tr(z, R, void 0);
11566
11566
  }), c(O);
11567
11567
  }, C = Object.keys(((P = a == null ? void 0 : a.colorConfig) == null ? void 0 : P.segments) || {}).length > 0;
11568
11568
  return /* @__PURE__ */ n(we, { value: "colors", className: "border-b-0", children: [
@@ -11577,7 +11577,7 @@ function Ai() {
11577
11577
  className: "ml-auto flex items-center gap-1 text-xs text-muted-foreground hover:text-foreground",
11578
11578
  onClick: p,
11579
11579
  children: [
11580
- /* @__PURE__ */ e(Er, { className: "h-3 w-3" }),
11580
+ /* @__PURE__ */ e(Ar, { className: "h-3 w-3" }),
11581
11581
  "Reset All"
11582
11582
  ]
11583
11583
  }
@@ -11598,7 +11598,7 @@ function Ai() {
11598
11598
  style: { backgroundColor: i[M] }
11599
11599
  }
11600
11600
  ) }),
11601
- /* @__PURE__ */ e(At, { align: "start", className: "w-auto p-3", children: /* @__PURE__ */ n("div", { className: "space-y-2.5", children: [
11601
+ /* @__PURE__ */ e(Tt, { align: "start", className: "w-auto p-3", children: /* @__PURE__ */ n("div", { className: "space-y-2.5", children: [
11602
11602
  /* @__PURE__ */ n("div", { className: "space-y-1", children: [
11603
11603
  /* @__PURE__ */ e("p", { className: "text-xs font-medium text-muted-foreground", children: "Theme Colors" }),
11604
11604
  /* @__PURE__ */ e("div", { className: "grid grid-cols-5 gap-1.5", children: g.slice(0, 10).map((R, L) => /* @__PURE__ */ n(
@@ -11660,7 +11660,7 @@ function Ai() {
11660
11660
  v(M, E), d(null);
11661
11661
  },
11662
11662
  children: [
11663
- /* @__PURE__ */ e(Er, { className: "h-3 w-3" }),
11663
+ /* @__PURE__ */ e(Ar, { className: "h-3 w-3" }),
11664
11664
  "Reset"
11665
11665
  ]
11666
11666
  }
@@ -11696,7 +11696,7 @@ function Ai() {
11696
11696
  ] }) })
11697
11697
  ] });
11698
11698
  }
11699
- function _t({
11699
+ function Pt({
11700
11700
  value: t,
11701
11701
  onSave: a,
11702
11702
  placeholder: s = "",
@@ -11741,7 +11741,7 @@ function _t({
11741
11741
  className: "h-6 w-6 p-0",
11742
11742
  "aria-label": "Confirm edit",
11743
11743
  onClick: u,
11744
- children: /* @__PURE__ */ e(fa, { className: "h-4 w-4 text-green-600" })
11744
+ children: /* @__PURE__ */ e(ma, { className: "h-4 w-4 text-green-600" })
11745
11745
  }
11746
11746
  ),
11747
11747
  /* @__PURE__ */ e(
@@ -11800,7 +11800,7 @@ const ih = [
11800
11800
  { value: "nl-NL", label: "Dutch" },
11801
11801
  { value: "sv-SE", label: "Swedish" }
11802
11802
  ], dh = (t) => t.charAt(0).toUpperCase() + t.slice(1);
11803
- function ur({
11803
+ function dr({
11804
11804
  formatOptions: t = {},
11805
11805
  onFormatOptionsChange: a,
11806
11806
  showTitle: s = !0,
@@ -11966,7 +11966,7 @@ function ur({
11966
11966
  ] })
11967
11967
  ] });
11968
11968
  }
11969
- function qr({ axis: t, label: a, type: s, config: r, onChange: l }) {
11969
+ function Ur({ axis: t, label: a, type: s, config: r, onChange: l }) {
11970
11970
  var h, g, x, v, f, y, p, C, T, F, b, k;
11971
11971
  const i = (N, D) => {
11972
11972
  l({
@@ -12025,7 +12025,7 @@ function qr({ axis: t, label: a, type: s, config: r, onChange: l }) {
12025
12025
  )
12026
12026
  ] }),
12027
12027
  ((g = r == null ? void 0 : r.name) == null ? void 0 : g.enabled) && /* @__PURE__ */ e(
12028
- _t,
12028
+ Pt,
12029
12029
  {
12030
12030
  placeholder: `${a} title`,
12031
12031
  value: ((x = r == null ? void 0 : r.name) == null ? void 0 : x.text) || "",
@@ -12078,7 +12078,7 @@ function qr({ axis: t, label: a, type: s, config: r, onChange: l }) {
12078
12078
  ] })
12079
12079
  ] }),
12080
12080
  s === "value" && /* @__PURE__ */ e(
12081
- ur,
12081
+ dr,
12082
12082
  {
12083
12083
  formatOptions: (r == null ? void 0 : r.formatOptions) || {},
12084
12084
  onFormatOptionsChange: (N) => l({
@@ -12095,7 +12095,7 @@ function qr({ axis: t, label: a, type: s, config: r, onChange: l }) {
12095
12095
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
12096
12096
  /* @__PURE__ */ e(B, { className: "w-8 text-xs text-muted-foreground", children: "Min" }),
12097
12097
  /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
12098
- _t,
12098
+ Pt,
12099
12099
  {
12100
12100
  type: "number",
12101
12101
  placeholder: "auto",
@@ -12108,7 +12108,7 @@ function qr({ axis: t, label: a, type: s, config: r, onChange: l }) {
12108
12108
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
12109
12109
  /* @__PURE__ */ e(B, { className: "w-8 text-xs text-muted-foreground", children: "Max" }),
12110
12110
  /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
12111
- _t,
12111
+ Pt,
12112
12112
  {
12113
12113
  type: "number",
12114
12114
  placeholder: "auto",
@@ -12121,7 +12121,7 @@ function qr({ axis: t, label: a, type: s, config: r, onChange: l }) {
12121
12121
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
12122
12122
  /* @__PURE__ */ e(B, { className: "w-8 text-xs text-muted-foreground", children: "Step" }),
12123
12123
  /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
12124
- _t,
12124
+ Pt,
12125
12125
  {
12126
12126
  type: "number",
12127
12127
  placeholder: "auto",
@@ -12165,7 +12165,7 @@ function Ei() {
12165
12165
  ] }) }),
12166
12166
  /* @__PURE__ */ e(ke, { className: "pt-2", children: /* @__PURE__ */ n(tt, { type: "single", collapsible: !0, className: "w-full", children: [
12167
12167
  l.hasXAxis && /* @__PURE__ */ e(
12168
- qr,
12168
+ Ur,
12169
12169
  {
12170
12170
  axis: "x",
12171
12171
  label: "X-Axis",
@@ -12175,7 +12175,7 @@ function Ei() {
12175
12175
  }
12176
12176
  ),
12177
12177
  l.hasYAxis && /* @__PURE__ */ e(
12178
- qr,
12178
+ Ur,
12179
12179
  {
12180
12180
  axis: "y",
12181
12181
  label: "Y-Axis",
@@ -12431,7 +12431,7 @@ function Oi() {
12431
12431
  ["number", "currency", "percent"].includes(a.format) && /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
12432
12432
  /* @__PURE__ */ e(B, { className: "text-xs text-muted-foreground w-20", children: "Decimals" }),
12433
12433
  /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
12434
- _t,
12434
+ Pt,
12435
12435
  {
12436
12436
  type: "number",
12437
12437
  placeholder: "0",
@@ -12485,7 +12485,7 @@ function Oi() {
12485
12485
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
12486
12486
  /* @__PURE__ */ e(B, { className: "text-xs text-muted-foreground w-20", children: "Size" }),
12487
12487
  /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
12488
- _t,
12488
+ Pt,
12489
12489
  {
12490
12490
  type: "number",
12491
12491
  placeholder: "12",
@@ -12534,7 +12534,7 @@ function Oi() {
12534
12534
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
12535
12535
  /* @__PURE__ */ e(B, { className: "text-xs text-muted-foreground w-20", children: "Rotation" }),
12536
12536
  /* @__PURE__ */ e("div", { className: "flex-1", children: /* @__PURE__ */ e(
12537
- _t,
12537
+ Pt,
12538
12538
  {
12539
12539
  type: "number",
12540
12540
  placeholder: "0",
@@ -12734,18 +12734,18 @@ const gh = [
12734
12734
  {
12735
12735
  label: "Min",
12736
12736
  value: "MIN",
12737
- logo: /* @__PURE__ */ e(Hn, { className: "size-3.5" })
12737
+ logo: /* @__PURE__ */ e(Jn, { className: "size-3.5" })
12738
12738
  },
12739
12739
  {
12740
12740
  label: "Max",
12741
12741
  value: "MAX",
12742
- logo: /* @__PURE__ */ e(Qn, { className: "size-3.5" })
12742
+ logo: /* @__PURE__ */ e(Hn, { className: "size-3.5" })
12743
12743
  }
12744
12744
  ];
12745
12745
  function xh({ column: t }) {
12746
12746
  const { updateMetricColumnOld: a } = ie();
12747
12747
  let s = gh;
12748
- Lt(t.type) && (s = s.filter(
12748
+ zt(t.type) && (s = s.filter(
12749
12749
  (l) => ["COUNT", "DISTINCT"].includes(l.value)
12750
12750
  )), na(t.type) && (s = s.filter(
12751
12751
  (l) => !["DISTINCT"].includes(l.value)
@@ -12817,7 +12817,7 @@ function Nh({
12817
12817
  }) {
12818
12818
  const { columns: r } = wl(), l = Ke(() => {
12819
12819
  let o = [];
12820
- (s === Na || s === ba || s === Ca) && (o = r);
12820
+ (s === xa || s === ya || s === va) && (o = r);
12821
12821
  const d = o == null ? void 0 : o.filter(
12822
12822
  (u) => u.column_name !== t.name
12823
12823
  );
@@ -12834,7 +12834,7 @@ function Nh({
12834
12834
  d && a(d);
12835
12835
  }
12836
12836
  return l != null && l.length ? /* @__PURE__ */ e(
12837
- Xn,
12837
+ Qn,
12838
12838
  {
12839
12839
  multiple: !1,
12840
12840
  options: l,
@@ -12901,10 +12901,10 @@ function bh({
12901
12901
  opacity: v ? 0.5 : void 0,
12902
12902
  transform: ia.Translate.toString(g),
12903
12903
  transition: x
12904
- } : void 0, y = Lt(t.type);
12904
+ } : void 0, y = zt(t.type);
12905
12905
  function p(k) {
12906
- const N = na(k.data_type), D = Lt(k.data_type), w = Pt(k.data_type), I = N ? "number" : D ? "string" : w ? "date" : "string";
12907
- if (r === Na) {
12906
+ const N = na(k.data_type), D = zt(k.data_type), w = Lt(k.data_type), I = N ? "number" : D ? "string" : w ? "date" : "string";
12907
+ if (r === xa) {
12908
12908
  if (D) {
12909
12909
  const S = {
12910
12910
  id: t.id,
@@ -12928,7 +12928,7 @@ function bh({
12928
12928
  c(t.id, S);
12929
12929
  }
12930
12930
  }
12931
- if (r === Ca) {
12931
+ if (r === va) {
12932
12932
  if (D) {
12933
12933
  const S = {
12934
12934
  id: t.id,
@@ -12952,7 +12952,7 @@ function bh({
12952
12952
  d(t.id, S);
12953
12953
  }
12954
12954
  }
12955
- if (r === ba) {
12955
+ if (r === ya) {
12956
12956
  const S = {
12957
12957
  id: t.id,
12958
12958
  // use the previous column's id.
@@ -12966,7 +12966,7 @@ function bh({
12966
12966
  }
12967
12967
  }
12968
12968
  function C() {
12969
- if (r === ba)
12969
+ if (r === ya)
12970
12970
  return /* @__PURE__ */ e(
12971
12971
  "div",
12972
12972
  {
@@ -12977,10 +12977,10 @@ function bh({
12977
12977
  );
12978
12978
  }
12979
12979
  function T() {
12980
- const k = Pt(t.type);
12981
- if (r === ba)
12980
+ const k = Lt(t.type);
12981
+ if (r === ya)
12982
12982
  return /* @__PURE__ */ e(xh, { column: t });
12983
- if ((r === Na || r === Ca) && k)
12983
+ if ((r === xa || r === va) && k)
12984
12984
  return /* @__PURE__ */ e(vh, { column: t });
12985
12985
  }
12986
12986
  function F() {
@@ -12988,7 +12988,7 @@ function bh({
12988
12988
  "div",
12989
12989
  {
12990
12990
  className: K("grow", {
12991
- "pl-3": (r === Na || r === Ca) && y
12991
+ "pl-3": (r === xa || r === va) && y
12992
12992
  }),
12993
12993
  children: /* @__PURE__ */ e(
12994
12994
  Nh,
@@ -13057,7 +13057,7 @@ function on({
13057
13057
  onRemoveColumn: i
13058
13058
  }) {
13059
13059
  var f, y;
13060
- const { setNodeRef: c, isOver: o, over: d } = Zn({
13060
+ const { setNodeRef: c, isOver: o, over: d } = Xn({
13061
13061
  id: t
13062
13062
  }), u = sa((p) => p.activeId), m = A((p) => {
13063
13063
  var C;
@@ -13171,7 +13171,7 @@ function wh() {
13171
13171
  children: /* @__PURE__ */ n("div", { className: "space-y-2 rounded-md p-4 text-sm", children: [
13172
13172
  /* @__PURE__ */ e(B, { className: "text-sm", children: "Sort By" }),
13173
13173
  h.length > 0 && /* @__PURE__ */ e("div", { className: "mr-5", children: /* @__PURE__ */ e(
13174
- Xn,
13174
+ Qn,
13175
13175
  {
13176
13176
  multiple: !1,
13177
13177
  options: h,
@@ -13189,7 +13189,7 @@ function wh() {
13189
13189
  zi,
13190
13190
  {
13191
13191
  id: Ha(p.columnId),
13192
- type: ir,
13192
+ type: lr,
13193
13193
  children: /* @__PURE__ */ e(
13194
13194
  "div",
13195
13195
  {
@@ -13277,7 +13277,7 @@ function Sh() {
13277
13277
  {
13278
13278
  onRemoveColumn: m,
13279
13279
  sortableType: zs,
13280
- id: Na,
13280
+ id: xa,
13281
13281
  label: x,
13282
13282
  columns: t,
13283
13283
  previewColumns: s
@@ -13288,7 +13288,7 @@ function Sh() {
13288
13288
  {
13289
13289
  onRemoveColumn: g,
13290
13290
  sortableType: Ls,
13291
- id: Ca,
13291
+ id: va,
13292
13292
  label: f,
13293
13293
  columns: i,
13294
13294
  previewColumns: c
@@ -13299,7 +13299,7 @@ function Sh() {
13299
13299
  {
13300
13300
  onRemoveColumn: h,
13301
13301
  sortableType: wn,
13302
- id: ba,
13302
+ id: ya,
13303
13303
  label: v,
13304
13304
  columns: r,
13305
13305
  previewColumns: l
@@ -13311,7 +13311,7 @@ function Sh() {
13311
13311
  ] })
13312
13312
  ] });
13313
13313
  }
13314
- function mr({
13314
+ function ur({
13315
13315
  children: t,
13316
13316
  column: a,
13317
13317
  id: s,
@@ -13396,7 +13396,7 @@ function kh({
13396
13396
  (k) => k.name === t.name
13397
13397
  );
13398
13398
  }
13399
- ), { selectedConnectionId: i, selectedDatabaseName: c, selectedTableName: o } = Rt(), d = Ke(() => {
13399
+ ), { selectedConnectionId: i, selectedDatabaseName: c, selectedTableName: o } = Ot(), d = Ke(() => {
13400
13400
  var T;
13401
13401
  return (T = r == null ? void 0 : r.find(
13402
13402
  (F) => F.filterColumnName === t.name
@@ -13433,7 +13433,7 @@ function kh({
13433
13433
  }
13434
13434
  function C() {
13435
13435
  return x || v ? /* @__PURE__ */ e(
13436
- _n,
13436
+ Pn,
13437
13437
  {
13438
13438
  style: {
13439
13439
  borderRadius: s == null ? void 0 : s.controlInputRadius
@@ -13441,7 +13441,7 @@ function kh({
13441
13441
  className: "h-8 min-w-60 bg-foreground/10"
13442
13442
  }
13443
13443
  ) : f ? /* @__PURE__ */ e("div", { className: "flex h-8 min-w-60 items-center bg-muted px-2 text-sm", children: "Error" }) : /* @__PURE__ */ e(
13444
- Xn,
13444
+ Qn,
13445
13445
  {
13446
13446
  renderFilterModeButton: () => /* @__PURE__ */ e(Dh, { columnName: t.name }),
13447
13447
  showNegativeIndicator: (l == null ? void 0 : l.mode) === "exclude",
@@ -13455,7 +13455,7 @@ function kh({
13455
13455
  );
13456
13456
  }
13457
13457
  return /* @__PURE__ */ e(
13458
- mr,
13458
+ ur,
13459
13459
  {
13460
13460
  className: "w-60",
13461
13461
  id: t.id,
@@ -13537,7 +13537,7 @@ function Mh({
13537
13537
  }
13538
13538
  ),
13539
13539
  /* @__PURE__ */ n(
13540
- At,
13540
+ Tt,
13541
13541
  {
13542
13542
  style: {
13543
13543
  // borderRadius: currentStyle?.chart?.options?.borderRadius,
@@ -13597,7 +13597,7 @@ function Th({
13597
13597
  column: t,
13598
13598
  sortableType: a
13599
13599
  }) {
13600
- const [s, r] = j(!1), { selectedConnectionId: l, selectedDatabaseName: i, selectedTableName: c } = Rt(), o = {
13600
+ const [s, r] = j(!1), { selectedConnectionId: l, selectedDatabaseName: i, selectedTableName: c } = Ot(), o = {
13601
13601
  column: t.name,
13602
13602
  sql: t.sql,
13603
13603
  // this is the sql query to get the data
@@ -13620,7 +13620,7 @@ function Th({
13620
13620
  y(t.name, null, !0), v(f);
13621
13621
  }
13622
13622
  function T() {
13623
- return d || u ? /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(_n, { className: "h-8 w-72 bg-foreground/10" }) }) : m ? /* @__PURE__ */ e("div", { className: "h-8 w-72 bg-muted px-2", children: "Error" }) : g ? /* @__PURE__ */ e(
13623
+ return d || u ? /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(Pn, { className: "h-8 w-72 bg-foreground/10" }) }) : m ? /* @__PURE__ */ e("div", { className: "h-8 w-72 bg-muted px-2", children: "Error" }) : g ? /* @__PURE__ */ e(
13624
13624
  Mh,
13625
13625
  {
13626
13626
  title: o.title,
@@ -13635,7 +13635,7 @@ function Th({
13635
13635
  ) : /* @__PURE__ */ e(B, { className: "flex h-8 w-72 items-center bg-muted px-2", children: "No Data" });
13636
13636
  }
13637
13637
  return /* @__PURE__ */ e(
13638
- mr,
13638
+ ur,
13639
13639
  {
13640
13640
  className: "w-72",
13641
13641
  id: t.id,
@@ -13653,7 +13653,7 @@ function Ah({
13653
13653
  sortableType: l
13654
13654
  }) {
13655
13655
  var v, f;
13656
- const { setNodeRef: i, isOver: c, over: o } = Zn({
13656
+ const { setNodeRef: i, isOver: c, over: o } = Xn({
13657
13657
  id: t
13658
13658
  }), d = sa((y) => y.activeId), u = {
13659
13659
  // borderColor: isOver ? 'green' : undefined,
@@ -13663,9 +13663,9 @@ function Ah({
13663
13663
  return /* @__PURE__ */ e("div", { className: "flex h-8 grow items-center space-x-2 rounded-md border border-dashed border-muted-foreground/80 bg-background px-2 py-1 text-sm text-muted-foreground", children: /* @__PURE__ */ e("span", { className: "invisible text-muted-foreground/70 group-hover:visible", children: "Drag here" }) });
13664
13664
  }
13665
13665
  function g(y) {
13666
- const p = Pt(y.type);
13666
+ const p = Lt(y.type);
13667
13667
  return y.id === ui.id ? /* @__PURE__ */ e(
13668
- mr,
13668
+ ur,
13669
13669
  {
13670
13670
  id: y.id,
13671
13671
  sortableType: l,
@@ -13757,8 +13757,8 @@ function Oh() {
13757
13757
  ] }),
13758
13758
  /* @__PURE__ */ n("div", { className: "flex items-center gap-3", children: [
13759
13759
  /* @__PURE__ */ e("div", { className: "rounded-full bg-green-300 px-3 py-1 text-xs font-medium text-black", children: "Preview" }),
13760
- /* @__PURE__ */ e(cr, {}),
13761
- /* @__PURE__ */ e(or, { variant: "default" })
13760
+ /* @__PURE__ */ e(or, {}),
13761
+ /* @__PURE__ */ e(ir, { variant: "default" })
13762
13762
  ] })
13763
13763
  ] });
13764
13764
  }
@@ -13853,7 +13853,7 @@ function Rh() {
13853
13853
  );
13854
13854
  }
13855
13855
  function Fh(t) {
13856
- Ir(
13856
+ Er(
13857
13857
  (q) => q.currentAIContext
13858
13858
  );
13859
13859
  const [a, s] = j(""), [r, l] = j(null), { authToken: i } = Oe(), c = A((q) => {
@@ -13880,7 +13880,7 @@ function Fh(t) {
13880
13880
  errorMessage: N,
13881
13881
  refetch: D,
13882
13882
  data: w
13883
- } = _e(p), { setTriggerAIRun: I, setCurrentAssitantScope: S, setCardConfig: P } = ie(), { selectedDatamodelName: M, connectionType: E, selectedDatamodelId: O } = Rt(), {
13883
+ } = _e(p), { setTriggerAIRun: I, setCurrentAssitantScope: S, setCardConfig: P } = ie(), { selectedDatamodelName: M, connectionType: E, selectedDatamodelId: O } = Ot(), {
13884
13884
  messages: z,
13885
13885
  setMessages: R,
13886
13886
  regenerate: L,
@@ -13897,7 +13897,7 @@ function Fh(t) {
13897
13897
  Authorization: `Bearer ${i == null ? void 0 : i.accessToken}`
13898
13898
  }),
13899
13899
  body: () => {
13900
- const q = Ir.getState();
13900
+ const q = Er.getState();
13901
13901
  return {
13902
13902
  random: Math.random(),
13903
13903
  assistantId: "editor-assistant",
@@ -13932,7 +13932,7 @@ function Fh(t) {
13932
13932
  }), I(!1));
13933
13933
  }, [y, f, X, I]);
13934
13934
  async function H({ toolCall: q }) {
13935
- var de, be, Z, te, De, je, Ft, gt, it, fe, xe, qe, xt, vs, Ns, bs;
13935
+ var de, be, Z, te, De, je, Rt, gt, it, fe, xe, qe, xt, vs, Ns, bs;
13936
13936
  if (["createChartFromSql", "createForecast"].includes(q.toolName)) {
13937
13937
  const Wa = ((de = q.input) == null ? void 0 : de.sql) ?? ((be = q.args) == null ? void 0 : be.sql), Kt = ((Z = q.input) == null ? void 0 : Z.python) ?? ((te = q.args) == null ? void 0 : te.python), Ye = ((De = q.input) == null ? void 0 : De.chartType) ?? ((je = q.args) == null ? void 0 : je.chartType);
13938
13938
  g(Ye), m(Wa), u(Kt), h(!0), ce({
@@ -13966,7 +13966,7 @@ function Fh(t) {
13966
13966
  });
13967
13967
  } else if (q.toolName === "generateQueryConfig") {
13968
13968
  s("Generating query config...");
13969
- const Wa = ((Ft = q.input) == null ? void 0 : Ft.chartType) ?? ((gt = q.args) == null ? void 0 : gt.chartType), Kt = ((it = q.input) == null ? void 0 : it.queryConfig) ?? ((fe = q.args) == null ? void 0 : fe.queryConfig);
13969
+ const Wa = ((Rt = q.input) == null ? void 0 : Rt.chartType) ?? ((gt = q.args) == null ? void 0 : gt.chartType), Kt = ((it = q.input) == null ? void 0 : it.queryConfig) ?? ((fe = q.args) == null ? void 0 : fe.queryConfig);
13970
13970
  ((xe = q.input) == null ? void 0 : xe.cardConfig) ?? ((qe = q.args) == null || qe.cardConfig), g(Wa), P(Kt), m(void 0), u(void 0);
13971
13971
  const Ye = await D();
13972
13972
  if ((xt = Ye == null ? void 0 : Ye.data) != null && xt.error) {
@@ -14034,10 +14034,10 @@ function Fh(t) {
14034
14034
  schemaName: b || "",
14035
14035
  tableName: T || "",
14036
14036
  datamodelId: O || "",
14037
- datamodelName: Or(M),
14037
+ datamodelName: Ir(M),
14038
14038
  connectionId: F || "",
14039
14039
  connectionType: E || ""
14040
- }, de = Rr([...v, q]);
14040
+ }, de = Or([...v, q]);
14041
14041
  ae(de);
14042
14042
  }
14043
14043
  function _() {
@@ -14045,7 +14045,7 @@ function Fh(t) {
14045
14045
  databaseName: C || "",
14046
14046
  schemaName: b || "",
14047
14047
  tableName: T || "",
14048
- datamodelName: Or(M),
14048
+ datamodelName: Ir(M),
14049
14049
  connectionId: F || "",
14050
14050
  connectionType: E || "",
14051
14051
  datamodelId: O || ""
@@ -14054,7 +14054,7 @@ function Fh(t) {
14054
14054
  [...k || [], ...v],
14055
14055
  q
14056
14056
  ) || v.length === 0) {
14057
- const be = Rr([
14057
+ const be = Or([
14058
14058
  ...k || [],
14059
14059
  ...v,
14060
14060
  q
@@ -14095,7 +14095,7 @@ const zh = [
14095
14095
  subtitle: "sales by category"
14096
14096
  }
14097
14097
  ];
14098
- function Yr() {
14098
+ function qr() {
14099
14099
  const t = Bt(null), [a, s] = j(!1), [r, l] = j(Os), [i, c] = j(!1), [o, d] = j(!1), u = gc(), { setCurrentAIContext: m } = xc(), { clearQueue: h } = yc(), { clearFileAttachments: g } = vc(), x = Nc("editor"), v = ne((fe) => fe.dashboard.aiContext), f = A((fe) => fe.card.dataSource), y = A((fe) => fe.actions.setCardSql), p = A((fe) => fe.actions.setRunSql), C = A((fe) => fe.showAIDialog), T = ne(
14100
14100
  (fe) => fe.handleOpenAssistantProfile
14101
14101
  ), { setShowAIDialog: F, setCardPython: b } = ie(), { setDataSource: k } = ie(), { assistantProfile: N } = bc(), {
@@ -14192,19 +14192,19 @@ function Yr() {
14192
14192
  parts: [{ type: "text", text: fe }]
14193
14193
  });
14194
14194
  }
14195
- function Ft() {
14196
- return /* @__PURE__ */ n(ma, { children: [
14197
- /* @__PURE__ */ e(ha, { asChild: !0, children: /* @__PURE__ */ e(
14195
+ function Rt() {
14196
+ return /* @__PURE__ */ n(ba, { children: [
14197
+ /* @__PURE__ */ e(Ca, { asChild: !0, children: /* @__PURE__ */ e(
14198
14198
  V,
14199
14199
  {
14200
14200
  className: "h-7 p-2 text-muted-foreground/50 hover:text-foreground",
14201
14201
  size: "sm",
14202
14202
  variant: "ghost",
14203
- children: /* @__PURE__ */ e(Pn, { className: "size-3.5" })
14203
+ children: /* @__PURE__ */ e(vl, { className: "size-3.5" })
14204
14204
  }
14205
14205
  ) }),
14206
- /* @__PURE__ */ n(pa, { align: "end", children: [
14207
- /* @__PURE__ */ e(tl, { children: "Options" }),
14206
+ /* @__PURE__ */ n(wa, { align: "end", children: [
14207
+ /* @__PURE__ */ e(el, { children: "Options" }),
14208
14208
  /* @__PURE__ */ e(Ia, {}),
14209
14209
  /* @__PURE__ */ e(
14210
14210
  Xs,
@@ -14261,7 +14261,7 @@ function Yr() {
14261
14261
  }
14262
14262
  ),
14263
14263
  /* @__PURE__ */ n("div", { "data-role": "header-actions", className: "flex items-center", children: [
14264
- Ft(),
14264
+ Rt(),
14265
14265
  Os,
14266
14266
  /* @__PURE__ */ e(
14267
14267
  Ne,
@@ -14269,7 +14269,7 @@ function Yr() {
14269
14269
  tooltip: "Add Context",
14270
14270
  className: "h-7 p-2 text-muted-foreground/50 hover:text-foreground",
14271
14271
  onClick: Z,
14272
- children: /* @__PURE__ */ e(Gn, { className: "size-4" })
14272
+ children: /* @__PURE__ */ e(Yn, { className: "size-4" })
14273
14273
  }
14274
14274
  ),
14275
14275
  /* @__PURE__ */ e(
@@ -14346,7 +14346,7 @@ function Yr() {
14346
14346
  className: "rounded-full shadow-lg",
14347
14347
  "aria-label": "Scroll to bottom",
14348
14348
  children: [
14349
- /* @__PURE__ */ e(Ot, { className: "h-4 w-4" }),
14349
+ /* @__PURE__ */ e(It, { className: "h-4 w-4" }),
14350
14350
  U && _ > 0 && /* @__PURE__ */ e("span", { className: "ml-1.5 flex h-5 w-5 items-center justify-center rounded-full bg-primary text-xs text-primary-foreground", children: _ > 9 ? "9+" : _ })
14351
14351
  ]
14352
14352
  }
@@ -14399,7 +14399,7 @@ function Yr() {
14399
14399
  " total tokens"
14400
14400
  ] }) }),
14401
14401
  /* @__PURE__ */ e(
14402
- er,
14402
+ Zn,
14403
14403
  {
14404
14404
  incomingSelectedEntities: (f == null ? void 0 : f.selectedEntities) || [],
14405
14405
  open: o,
@@ -14413,7 +14413,7 @@ function Yr() {
14413
14413
  }
14414
14414
  );
14415
14415
  }
14416
- const hr = (t) => {
14416
+ const mr = (t) => {
14417
14417
  var S;
14418
14418
  const {
14419
14419
  updateCardConfig: a,
@@ -14733,7 +14733,7 @@ function Ph({ field: t }) {
14733
14733
  transform: l,
14734
14734
  transition: i,
14735
14735
  isDragging: c
14736
- } = Ya({ id: t.id }), [o, d] = j(!1), u = A((v) => v.card), { handleFieldClick: m } = hr(u), h = {
14736
+ } = Ya({ id: t.id }), [o, d] = j(!1), u = A((v) => v.card), { handleFieldClick: m } = mr(u), h = {
14737
14737
  transform: ia.Transform.toString(l),
14738
14738
  transition: i
14739
14739
  };
@@ -14746,7 +14746,7 @@ function Ph({ field: t }) {
14746
14746
  case "date":
14747
14747
  return Dt;
14748
14748
  case "boolean":
14749
- return wa;
14749
+ return Na;
14750
14750
  case "json":
14751
14751
  return Pa;
14752
14752
  case "geo":
@@ -14756,7 +14756,7 @@ function Ph({ field: t }) {
14756
14756
  }
14757
14757
  }, x = (v) => {
14758
14758
  const f = (v || "").toLowerCase(), y = Pe(f);
14759
- return y === "string" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-blue-100 text-xs text-blue-700 dark:bg-blue-950 dark:text-blue-300", children: /* @__PURE__ */ e(ht, { className: "h-3 w-3" }) }) : y === "number" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-green-100 text-xs text-green-700 dark:bg-green-950 dark:text-green-300", children: /* @__PURE__ */ e($t, { className: "h-3 w-3" }) }) : y === "date" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-purple-100 text-xs text-purple-700 dark:bg-purple-950 dark:text-purple-300", children: /* @__PURE__ */ e(Dt, { className: "h-3 w-3" }) }) : y === "boolean" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-orange-100 text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e(wa, { className: "h-3 w-3" }) }) : y === "json" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(Pa, { className: "h-3 w-3" }) }) : y === "geo" ? /* @__PURE__ */ e("div", { className: "bg-orange -100 flex size-6 shrink-0 items-center justify-center rounded-sm text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e(ss, { className: "h-3 w-3" }) }) : y === "calculated" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(ys, { className: "h-3 w-3" }) }) : null;
14759
+ return y === "string" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-blue-100 text-xs text-blue-700 dark:bg-blue-950 dark:text-blue-300", children: /* @__PURE__ */ e(ht, { className: "h-3 w-3" }) }) : y === "number" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-green-100 text-xs text-green-700 dark:bg-green-950 dark:text-green-300", children: /* @__PURE__ */ e($t, { className: "h-3 w-3" }) }) : y === "date" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-purple-100 text-xs text-purple-700 dark:bg-purple-950 dark:text-purple-300", children: /* @__PURE__ */ e(Dt, { className: "h-3 w-3" }) }) : y === "boolean" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-orange-100 text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e(Na, { className: "h-3 w-3" }) }) : y === "json" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(Pa, { className: "h-3 w-3" }) }) : y === "geo" ? /* @__PURE__ */ e("div", { className: "bg-orange -100 flex size-6 shrink-0 items-center justify-center rounded-sm text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e(ss, { className: "h-3 w-3" }) }) : y === "calculated" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(ys, { className: "h-3 w-3" }) }) : null;
14760
14760
  };
14761
14761
  return g(t.dataType), /* @__PURE__ */ n(
14762
14762
  "div",
@@ -14859,11 +14859,11 @@ function _h() {
14859
14859
  (T) => m(T) === "calculated"
14860
14860
  ).length, C = u.length > 0;
14861
14861
  return o ? /* @__PURE__ */ e("div", { className: "flex h-[calc(100vh-200px)] w-[290px] flex-col items-center justify-center", children: /* @__PURE__ */ e(es, { size: "md", color: "muted", "aria-label": "Loading data" }) }) : d ? /* @__PURE__ */ n("div", { className: "flex h-[calc(100vh-200px)] w-[290px] flex-col items-center justify-center", children: [
14862
- /* @__PURE__ */ e(Mt, { className: "mb-4 h-12 w-12 text-red-300" }),
14862
+ /* @__PURE__ */ e(jt, { className: "mb-4 h-12 w-12 text-red-300" }),
14863
14863
  /* @__PURE__ */ e("p", { className: "mb-2 text-sm text-red-500", children: "Error loading fields" }),
14864
14864
  /* @__PURE__ */ e("p", { className: "px-4 text-center text-xs text-red-400", children: d.message || "Failed to load column data" })
14865
14865
  ] }) : !l || !l.selectedEntities || l.selectedEntities.length === 0 ? /* @__PURE__ */ e(st, { className: "h-[calc(100vh-200px)] w-[290px]", children: /* @__PURE__ */ n("div", { className: "flex flex-col items-center justify-center py-8 text-center", children: [
14866
- /* @__PURE__ */ e(Mt, { className: "mb-4 h-12 w-12 text-gray-300" }),
14866
+ /* @__PURE__ */ e(jt, { className: "mb-4 h-12 w-12 text-gray-300" }),
14867
14867
  /* @__PURE__ */ e("p", { className: "mb-2 text-sm text-gray-500", children: "No data source selected" }),
14868
14868
  /* @__PURE__ */ e("p", { className: "px-4 text-xs text-gray-400", children: "Select a table, view, or dataset from the data source panel to see available fields" })
14869
14869
  ] }) }) : /* @__PURE__ */ n("div", { className: "mt-2 flex h-[calc(100vh-200px)] w-full grow flex-col gap-2 px-6 pb-6", children: [
@@ -14894,7 +14894,7 @@ function _h() {
14894
14894
  /* @__PURE__ */ e("span", { className: "ml-2 text-xs font-semibold", children: u.length })
14895
14895
  ] }),
14896
14896
  /* @__PURE__ */ n(Ie, { value: "dimensions", className: "text-xs", children: [
14897
- /* @__PURE__ */ e(Vn, { className: "size-4 shrink-0" }),
14897
+ /* @__PURE__ */ e(_n, { className: "size-4 shrink-0" }),
14898
14898
  /* @__PURE__ */ e("span", { className: "ml-2 text-xs font-semibold", children: f })
14899
14899
  ] }),
14900
14900
  /* @__PURE__ */ n(Ie, { value: "metrics", className: "text-xs", children: [
@@ -15370,7 +15370,7 @@ function Bh({
15370
15370
  size: "sm",
15371
15371
  onClick: () => x(S.id),
15372
15372
  disabled: S.sequence === 1,
15373
- children: /* @__PURE__ */ e(Qn, { className: "h-4 w-4" })
15373
+ children: /* @__PURE__ */ e(Hn, { className: "h-4 w-4" })
15374
15374
  }
15375
15375
  ),
15376
15376
  /* @__PURE__ */ e(
@@ -15380,7 +15380,7 @@ function Bh({
15380
15380
  size: "sm",
15381
15381
  onClick: () => v(S.id),
15382
15382
  disabled: S.sequence === o.joins.length,
15383
- children: /* @__PURE__ */ e(Hn, { className: "h-4 w-4" })
15383
+ children: /* @__PURE__ */ e(Jn, { className: "h-4 w-4" })
15384
15384
  }
15385
15385
  ),
15386
15386
  /* @__PURE__ */ e(
@@ -15389,7 +15389,7 @@ function Bh({
15389
15389
  variant: "ghost",
15390
15390
  size: "sm",
15391
15391
  onClick: () => f(S.id),
15392
- children: E ? /* @__PURE__ */ e($s, { className: "h-4 w-4" }) : /* @__PURE__ */ e(Ot, { className: "h-4 w-4" })
15392
+ children: E ? /* @__PURE__ */ e($s, { className: "h-4 w-4" }) : /* @__PURE__ */ e(It, { className: "h-4 w-4" })
15393
15393
  }
15394
15394
  ),
15395
15395
  /* @__PURE__ */ e(
@@ -15839,7 +15839,7 @@ function Bh({
15839
15839
  ] })
15840
15840
  ] });
15841
15841
  }
15842
- function Gr({
15842
+ function Yr({
15843
15843
  children: t,
15844
15844
  open: a,
15845
15845
  onOpenChange: s,
@@ -15853,7 +15853,7 @@ function Gr({
15853
15853
  /* @__PURE__ */ n(wt, { className: "max-w-4xl", children: [
15854
15854
  /* @__PURE__ */ n(St, { children: [
15855
15855
  /* @__PURE__ */ e(kt, { children: "Join Configuration" }),
15856
- /* @__PURE__ */ e(jt, { children: "Configure the join between the two entities to combine the fields." })
15856
+ /* @__PURE__ */ e(Vt, { children: "Configure the join between the two entities to combine the fields." })
15857
15857
  ] }),
15858
15858
  /* @__PURE__ */ e(
15859
15859
  Bh,
@@ -16024,7 +16024,7 @@ ${f.joinType} JOIN ${y.name}
16024
16024
  onClick: () => l(!0),
16025
16025
  children: [
16026
16026
  /* @__PURE__ */ e(
16027
- Fr,
16027
+ Rr,
16028
16028
  {
16029
16029
  className: K("mr-1 h-3 w-3", {
16030
16030
  "text-blue-500": s.joins.length > 0,
@@ -16058,7 +16058,7 @@ ${f.joinType} JOIN ${y.name}
16058
16058
  )
16059
16059
  ] }) }),
16060
16060
  /* @__PURE__ */ e(
16061
- Gr,
16061
+ Yr,
16062
16062
  {
16063
16063
  open: r,
16064
16064
  onOpenChange: l,
@@ -16072,7 +16072,7 @@ ${f.joinType} JOIN ${y.name}
16072
16072
  )
16073
16073
  ] }),
16074
16074
  s.joins.length === 0 && /* @__PURE__ */ e(
16075
- Gr,
16075
+ Yr,
16076
16076
  {
16077
16077
  open: r,
16078
16078
  onOpenChange: l,
@@ -16089,7 +16089,7 @@ ${f.joinType} JOIN ${y.name}
16089
16089
  size: "sm",
16090
16090
  className: "w-full",
16091
16091
  children: [
16092
- /* @__PURE__ */ e(Fr, { className: "mr-3 size-4" }),
16092
+ /* @__PURE__ */ e(Rr, { className: "mr-3 size-4" }),
16093
16093
  "Configure Joins"
16094
16094
  ]
16095
16095
  }
@@ -16136,13 +16136,13 @@ function qh({
16136
16136
  case "model":
16137
16137
  return /* @__PURE__ */ e(kd, { className: "h-4 w-4" });
16138
16138
  case "dataset":
16139
- return /* @__PURE__ */ e(Mt, { className: "h-4 w-4" });
16139
+ return /* @__PURE__ */ e(jt, { className: "h-4 w-4" });
16140
16140
  case "file":
16141
16141
  case "url":
16142
16142
  case "upload":
16143
16143
  return /* @__PURE__ */ e(Pc, { className: "h-4 w-4" });
16144
16144
  default:
16145
- return /* @__PURE__ */ e(Mt, { className: "h-4 w-4" });
16145
+ return /* @__PURE__ */ e(jt, { className: "h-4 w-4" });
16146
16146
  }
16147
16147
  }, g = (f) => "label" in f && f.label ? f.label : f.name, x = (f) => {
16148
16148
  if ("description" in f && f.description)
@@ -16155,13 +16155,13 @@ function qh({
16155
16155
  return c.length === 0 ? /* @__PURE__ */ e(Ct, { open: t, onOpenChange: a, children: /* @__PURE__ */ n(wt, { className: "max-w-md", children: [
16156
16156
  /* @__PURE__ */ n(St, { children: [
16157
16157
  /* @__PURE__ */ e(kt, { children: "No Data Available" }),
16158
- /* @__PURE__ */ e(jt, { children: "No entities are currently available in the AI context. Please add some data sources to the dashboard first." })
16158
+ /* @__PURE__ */ e(Vt, { children: "No entities are currently available in the AI context. Please add some data sources to the dashboard first." })
16159
16159
  ] }),
16160
16160
  /* @__PURE__ */ e(ra, { children: /* @__PURE__ */ e(V, { onClick: () => a(!1), children: "Close" }) })
16161
16161
  ] }) }) : /* @__PURE__ */ e(Ct, { open: t, onOpenChange: a, children: /* @__PURE__ */ n(wt, { className: "flex max-w-2xl flex-col", children: [
16162
16162
  /* @__PURE__ */ n(St, { children: [
16163
16163
  /* @__PURE__ */ e(kt, { children: "Select Data to Analyze" }),
16164
- /* @__PURE__ */ e(jt, { children: "Choose entities from the dashboard's context" })
16164
+ /* @__PURE__ */ e(Vt, { children: "Choose entities from the dashboard's context" })
16165
16165
  ] }),
16166
16166
  /* @__PURE__ */ n("div", { className: "flex-1 space-y-4", children: [
16167
16167
  /* @__PURE__ */ n("div", { className: "flex items-center justify-between", children: [
@@ -16247,7 +16247,7 @@ function Yh({
16247
16247
  (o) => o.label === "Description"
16248
16248
  ), c = l.filter((o) => o.label === "Description" ? !1 : !["Connection", "Database", "Schema"].includes(o.label));
16249
16249
  return /* @__PURE__ */ e(Ue, { side: "top", className: "ml-5 max-w-xs", children: /* @__PURE__ */ n("div", { className: "space-y-2", children: [
16250
- /* @__PURE__ */ e("div", { className: "text-sm font-medium", children: a || tr(t) }),
16250
+ /* @__PURE__ */ e("div", { className: "text-sm font-medium", children: a || er(t) }),
16251
16251
  i && /* @__PURE__ */ n("div", { className: "border-t border-border pt-2", children: [
16252
16252
  /* @__PURE__ */ e("div", { className: "mb-1 text-xs text-muted-foreground", children: "Description:" }),
16253
16253
  /* @__PURE__ */ e("div", { className: "text-xs leading-relaxed", children: i.value })
@@ -16278,7 +16278,7 @@ function Gh({
16278
16278
  {
16279
16279
  className: "border-b border-border pb-1 last:border-b-0",
16280
16280
  children: [
16281
- /* @__PURE__ */ e("div", { className: "text-xs font-medium", children: tr(a) }),
16281
+ /* @__PURE__ */ e("div", { className: "text-xs font-medium", children: er(a) }),
16282
16282
  l && /* @__PURE__ */ n("div", { className: "mb-1 mt-1", children: [
16283
16283
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: "Description:" }),
16284
16284
  /* @__PURE__ */ e("div", { className: "text-xs leading-relaxed", children: l.value })
@@ -16355,7 +16355,7 @@ function Kh({
16355
16355
  size: "sm",
16356
16356
  onClick: () => o(!c),
16357
16357
  className: "h-6 w-6 p-0",
16358
- children: c ? /* @__PURE__ */ e(Ot, { className: "h-4 w-4" }) : /* @__PURE__ */ e(Bl, { className: "h-4 w-4" })
16358
+ children: c ? /* @__PURE__ */ e(It, { className: "h-4 w-4" }) : /* @__PURE__ */ e(Bl, { className: "h-4 w-4" })
16359
16359
  }
16360
16360
  )
16361
16361
  ]
@@ -16370,7 +16370,7 @@ function Kh({
16370
16370
  className: "h-7 w-7 p-0 text-muted-foreground hover:text-foreground",
16371
16371
  onClick: a,
16372
16372
  title: "Hide Data Source Panel",
16373
- children: /* @__PURE__ */ e(nl, { className: "h-3.5 w-3.5" })
16373
+ children: /* @__PURE__ */ e(sl, { className: "h-3.5 w-3.5" })
16374
16374
  }
16375
16375
  ),
16376
16376
  /* @__PURE__ */ n(
@@ -16403,7 +16403,7 @@ function Kh({
16403
16403
  variant: "secondary",
16404
16404
  className: "group relative cursor-pointer pr-6 text-xs transition-colors hover:border-red-200 hover:bg-red-50 dark:hover:border-red-800 dark:hover:bg-red-950",
16405
16405
  children: [
16406
- tr(g),
16406
+ er(g),
16407
16407
  /* @__PURE__ */ e(
16408
16408
  "button",
16409
16409
  {
@@ -16450,7 +16450,7 @@ function Kh({
16450
16450
  ),
16451
16451
  /* @__PURE__ */ e(Vh, {}),
16452
16452
  /* @__PURE__ */ e(
16453
- er,
16453
+ Zn,
16454
16454
  {
16455
16455
  incomingSelectedEntities: (d == null ? void 0 : d.selectedEntities) || [],
16456
16456
  dialogMode: "dataSource",
@@ -16479,12 +16479,12 @@ function Jh() {
16479
16479
  );
16480
16480
  return { standardFirst: t, updatePreference: a };
16481
16481
  }
16482
- const Kr = ({
16482
+ const Gr = ({
16483
16483
  pluginVisual: t,
16484
16484
  index: a,
16485
16485
  onSelect: s
16486
16486
  }) => {
16487
- const r = Ws(t.icon || ""), l = t.name.charAt(0).toUpperCase(), i = ar(t.name);
16487
+ const r = Ws(t.icon || ""), l = t.name.charAt(0).toUpperCase(), i = tr(t.name);
16488
16488
  return /* @__PURE__ */ e(
16489
16489
  qa,
16490
16490
  {
@@ -16511,7 +16511,7 @@ const Kr = ({
16511
16511
  },
16512
16512
  `${t.url}-${t.name}-${a}`
16513
16513
  );
16514
- }, Wr = [
16514
+ }, Kr = [
16515
16515
  "default",
16516
16516
  "standardPlugin",
16517
16517
  "customPlugin"
@@ -16524,13 +16524,13 @@ function Hh({
16524
16524
  const [s, r] = j(!1), { data: l } = vi();
16525
16525
  Jh();
16526
16526
  const c = ((F = A((b) => b.card).customCardPreferences) == null ? void 0 : F.url) || "";
16527
- rr(c);
16527
+ nr(c);
16528
16528
  const { setCardType: o, setCardPreferences: d, setIsDevMode: u } = A(
16529
16529
  (b) => b.actions
16530
16530
  ), { setCardCustomCfg: m, setCustomCardPreferences: h, setQueryConfig: g } = ie(), [x, v] = Ln("chart-section-active", null), f = Ke(() => x ? [
16531
16531
  x,
16532
- ...Wr.filter((b) => b !== x)
16533
- ] : Wr, [x]);
16532
+ ...Kr.filter((b) => b !== x)
16533
+ ] : Kr, [x]);
16534
16534
  function y(b) {
16535
16535
  m(null), d({}), o(b), ["custom", "text", "map"].includes(b) && (u(!0), g(void 0)), a(b), r(!1);
16536
16536
  }
@@ -16570,7 +16570,7 @@ function Hh({
16570
16570
  if (w && I)
16571
16571
  return /* @__PURE__ */ e(Qh, { icon: w, componentName: I });
16572
16572
  if (I) {
16573
- const S = ar(I);
16573
+ const S = tr(I);
16574
16574
  if (S)
16575
16575
  return S;
16576
16576
  }
@@ -16585,18 +16585,18 @@ function Hh({
16585
16585
  })(),
16586
16586
  /* @__PURE__ */ e("span", { children: C() })
16587
16587
  ] }),
16588
- /* @__PURE__ */ e(Ot, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
16588
+ /* @__PURE__ */ e(It, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
16589
16589
  ]
16590
16590
  }
16591
16591
  ) }),
16592
- /* @__PURE__ */ e(At, { className: "w-[300px] p-0", align: "start", children: /* @__PURE__ */ n(hs, { children: [
16592
+ /* @__PURE__ */ e(Tt, { className: "w-[300px] p-0", align: "start", children: /* @__PURE__ */ n(hs, { children: [
16593
16593
  /* @__PURE__ */ e(ps, { placeholder: "Search chart types..." }),
16594
16594
  /* @__PURE__ */ n(fs, { className: "mb-2 max-h-[300px]", children: [
16595
16595
  /* @__PURE__ */ e(gs, { children: "No chart type found." }),
16596
16596
  f.map((b) => {
16597
16597
  if (b === "default")
16598
16598
  return /* @__PURE__ */ e(
16599
- ya,
16599
+ fa,
16600
16600
  {
16601
16601
  heading: /* @__PURE__ */ n("div", { className: "group flex w-full items-center justify-between", children: [
16602
16602
  /* @__PURE__ */ n(Ve, { children: [
@@ -16640,7 +16640,7 @@ function Hh({
16640
16640
  (N) => N.pluginType === "standard"
16641
16641
  );
16642
16642
  return k.length ? /* @__PURE__ */ e(
16643
- ya,
16643
+ fa,
16644
16644
  {
16645
16645
  heading: /* @__PURE__ */ n("div", { className: "group flex w-full items-center justify-between", children: [
16646
16646
  /* @__PURE__ */ e("p", { children: "Standard Visuals" }),
@@ -16660,7 +16660,7 @@ function Hh({
16660
16660
  ] }),
16661
16661
  className: "[&_[cmdk-group-heading]]:text-sm [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
16662
16662
  children: k.filter((N) => N.componentType === "chart").map((N, D) => /* @__PURE__ */ e(
16663
- Kr,
16663
+ Gr,
16664
16664
  {
16665
16665
  pluginVisual: N,
16666
16666
  index: D,
@@ -16677,7 +16677,7 @@ function Hh({
16677
16677
  (N) => N.pluginType === "custom"
16678
16678
  );
16679
16679
  return k.length ? /* @__PURE__ */ e(
16680
- ya,
16680
+ fa,
16681
16681
  {
16682
16682
  heading: /* @__PURE__ */ n("div", { className: "group flex w-full items-center justify-between", children: [
16683
16683
  /* @__PURE__ */ n(Ve, { children: [
@@ -16701,7 +16701,7 @@ function Hh({
16701
16701
  ] }),
16702
16702
  className: "[&_[cmdk-group-heading]]:text-sm [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
16703
16703
  children: k.map((N, D) => /* @__PURE__ */ e(
16704
- Kr,
16704
+ Gr,
16705
16705
  {
16706
16706
  pluginVisual: N,
16707
16707
  index: D,
@@ -16723,16 +16723,16 @@ const Qh = ({
16723
16723
  icon: t,
16724
16724
  componentName: a
16725
16725
  }) => {
16726
- const s = Ws(), r = ar(a);
16726
+ const s = Ws(), r = tr(a);
16727
16727
  return s ? /* @__PURE__ */ e(s, { className: "h-4 w-4" }) : r || /* @__PURE__ */ e(ns, { className: "h-4 w-4" });
16728
16728
  }, Xh = [
16729
16729
  { id: "table", icon: js, label: "Table" },
16730
16730
  { id: "bar", icon: Ys, label: "Bar Chart" },
16731
16731
  { id: "line", icon: qs, label: "Line Chart" },
16732
- { id: "stackedBar", icon: Wn, label: "Stacked Bar", requiresPivot: !0 },
16732
+ { id: "stackedBar", icon: Kn, label: "Stacked Bar", requiresPivot: !0 },
16733
16733
  { id: "pie", icon: Vs, label: "Pie Chart" },
16734
- { id: "doughnut", icon: Jn, label: "Donut Chart" },
16735
- { id: "kpi", icon: Kn, label: "KPI" }
16734
+ { id: "doughnut", icon: Wn, label: "Donut Chart" },
16735
+ { id: "kpi", icon: Gn, label: "KPI" }
16736
16736
  ];
16737
16737
  function Zh({
16738
16738
  selectedChart: t,
@@ -16765,9 +16765,9 @@ function Zh({
16765
16765
  ] }, i.id);
16766
16766
  }) });
16767
16767
  }
16768
- const pr = ({ dataType: t }) => {
16768
+ const hr = ({ dataType: t }) => {
16769
16769
  const a = Pe(t);
16770
- return a === "string" ? /* @__PURE__ */ e("span", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-blue-100 text-xs text-blue-700 dark:bg-blue-950 dark:text-blue-300", children: /* @__PURE__ */ e(ht, { className: "h-3 w-3" }) }) : a === "number" ? /* @__PURE__ */ e("span", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-green-100 text-xs text-green-700 dark:bg-green-950 dark:text-green-300", children: /* @__PURE__ */ e($t, { className: "h-3 w-3" }) }) : a === "date" ? /* @__PURE__ */ e("span", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-purple-100 text-xs text-purple-700 dark:bg-purple-950 dark:text-purple-300", children: /* @__PURE__ */ e(Dt, { className: "h-3 w-3" }) }) : a === "boolean" ? /* @__PURE__ */ e("span", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-orange-100 text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e(wa, { className: "h-3 w-3" }) }) : /* @__PURE__ */ e("span", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(ht, { className: "h-3 w-3" }) });
16770
+ return a === "string" ? /* @__PURE__ */ e("span", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-blue-100 text-xs text-blue-700 dark:bg-blue-950 dark:text-blue-300", children: /* @__PURE__ */ e(ht, { className: "h-3 w-3" }) }) : a === "number" ? /* @__PURE__ */ e("span", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-green-100 text-xs text-green-700 dark:bg-green-950 dark:text-green-300", children: /* @__PURE__ */ e($t, { className: "h-3 w-3" }) }) : a === "date" ? /* @__PURE__ */ e("span", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-purple-100 text-xs text-purple-700 dark:bg-purple-950 dark:text-purple-300", children: /* @__PURE__ */ e(Dt, { className: "h-3 w-3" }) }) : a === "boolean" ? /* @__PURE__ */ e("span", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-orange-100 text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e(Na, { className: "h-3 w-3" }) }) : /* @__PURE__ */ e("span", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(ht, { className: "h-3 w-3" }) });
16771
16771
  };
16772
16772
  function ep({
16773
16773
  aliasTemplate: t,
@@ -16809,7 +16809,7 @@ function ep({
16809
16809
  onClick: () => {
16810
16810
  a(s), i(!1);
16811
16811
  },
16812
- children: /* @__PURE__ */ e(fa, { className: "h-4 w-4 text-green-600" })
16812
+ children: /* @__PURE__ */ e(ma, { className: "h-4 w-4 text-green-600" })
16813
16813
  }
16814
16814
  ),
16815
16815
  /* @__PURE__ */ e(
@@ -16882,7 +16882,7 @@ function tp({
16882
16882
  className: "h-6 w-6 p-0",
16883
16883
  "aria-label": "Confirm value alias edit",
16884
16884
  onClick: () => m(h),
16885
- children: /* @__PURE__ */ e(fa, { className: "h-4 w-4 text-green-600" })
16885
+ children: /* @__PURE__ */ e(ma, { className: "h-4 w-4 text-green-600" })
16886
16886
  }
16887
16887
  ),
16888
16888
  /* @__PURE__ */ e(
@@ -17160,7 +17160,7 @@ function sp({
17160
17160
  className: "justify-start h-auto py-2 px-3",
17161
17161
  onClick: () => v(b),
17162
17162
  children: [
17163
- /* @__PURE__ */ e(pr, { dataType: Pe(b.dataType) }),
17163
+ /* @__PURE__ */ e(hr, { dataType: Pe(b.dataType) }),
17164
17164
  /* @__PURE__ */ n("div", { className: "ml-2 text-left", children: [
17165
17165
  /* @__PURE__ */ e("div", { className: "text-sm font-medium", children: b.label }),
17166
17166
  /* @__PURE__ */ n("div", { className: "text-xs text-muted-foreground", children: [
@@ -17292,7 +17292,7 @@ function rp({
17292
17292
  hasPivotColumns: i = !1,
17293
17293
  cardType: c
17294
17294
  }) {
17295
- var xr, yr, vr;
17295
+ var gr, xr, yr;
17296
17296
  const {
17297
17297
  attributes: o,
17298
17298
  listeners: d,
@@ -17313,7 +17313,7 @@ function rp({
17313
17313
  handleKpiTrendlineWindowChange: N,
17314
17314
  handleKpiTrendlineGranularityChange: D,
17315
17315
  handleKpiTargetValueChange: w
17316
- } = hr(x), [I, S] = j(!1), [P, M] = j(!1), [E, O] = j(null), [z, R] = j(
17316
+ } = mr(x), [I, S] = j(!1), [P, M] = j(!1), [E, O] = j(null), [z, R] = j(
17317
17317
  t.dateFormat || "YYYY-MM-DD"
17318
17318
  ), [L, $] = j(t.customFormat || ""), [X, Y] = j(!!t.customFormat), [ce, le] = j(
17319
17319
  t.granularity || "day"
@@ -17321,14 +17321,14 @@ function rp({
17321
17321
  t.aliasTemplate || ""
17322
17322
  ), [G, ae] = j(
17323
17323
  t.valueAliases || {}
17324
- ), [U, _] = j((xr = t.parameters) == null ? void 0 : xr.filters), ee = (J) => {
17324
+ ), [U, _] = j((gr = t.parameters) == null ? void 0 : gr.filters), ee = (J) => {
17325
17325
  J === "custom" ? Y(!0) : (Y(!1), R(J), a === "groupBy" && y(s, J, ""));
17326
17326
  }, ge = (J) => {
17327
17327
  $(J), a === "groupBy" && y(s, "custom", J);
17328
17328
  }, q = (J) => {
17329
- var Je;
17329
+ var We;
17330
17330
  le(J);
17331
- const Le = (Je = fe(J)[0]) == null ? void 0 : Je.value;
17331
+ const Le = (We = fe(J)[0]) == null ? void 0 : We.value;
17332
17332
  Le && !X && (R(Le), a === "groupBy" && y(s, Le, "")), a === "groupBy" && p(s, J);
17333
17333
  }, de = (J) => {
17334
17334
  H(J), a === "metrics" && C(s, J);
@@ -17345,9 +17345,9 @@ function rp({
17345
17345
  ...t.parameters,
17346
17346
  filters: J
17347
17347
  }
17348
- }, Je = [...((ze = x.config) == null ? void 0 : ze.metricColumns) || []];
17349
- Je[s] = Le, A.getState().actions.updateCardConfig(x.id, {
17350
- metricColumns: Je
17348
+ }, We = [...((ze = x.config) == null ? void 0 : ze.metricColumns) || []];
17349
+ We[s] = Le, A.getState().actions.updateCardConfig(x.id, {
17350
+ metricColumns: We
17351
17351
  });
17352
17352
  }
17353
17353
  M(!1);
@@ -17356,7 +17356,7 @@ function rp({
17356
17356
  }, je = {
17357
17357
  transform: ia.Transform.toString(m),
17358
17358
  transition: h
17359
- }, Ft = Pe(t.dataType), gt = Ft === "date", it = c === "kpi", fe = (J) => {
17359
+ }, Rt = Pe(t.dataType), gt = Rt === "date", it = c === "kpi", fe = (J) => {
17360
17360
  switch (J) {
17361
17361
  case "day":
17362
17362
  return [
@@ -17416,7 +17416,7 @@ function rp({
17416
17416
  { value: "custom", label: "Custom Format..." }
17417
17417
  ];
17418
17418
  }
17419
- }, xe = fe(ce), qe = a !== "pivotBy", xt = gt && a === "groupBy", vs = !it && gt && a === "groupBy", Ns = it && gt && a === "groupBy", bs = it && a === "metrics" && ((yr = x.config) == null ? void 0 : yr.comparisonType) === "target", Wa = a === "metrics", Kt = () => /* @__PURE__ */ e(
17419
+ }, xe = fe(ce), qe = a !== "pivotBy", xt = gt && a === "groupBy", vs = !it && gt && a === "groupBy", Ns = it && gt && a === "groupBy", bs = it && a === "metrics" && ((xr = x.config) == null ? void 0 : xr.comparisonType) === "target", Wa = a === "metrics", Kt = () => /* @__PURE__ */ e(
17420
17420
  "div",
17421
17421
  {
17422
17422
  title: `${t.entityName}.${t.name}`,
@@ -17429,7 +17429,7 @@ function rp({
17429
17429
  ), Ye = () => qe ? /* @__PURE__ */ n("div", { className: "space-y-1", children: [
17430
17430
  /* @__PURE__ */ e(B, { className: "text-xs font-medium text-muted-foreground", children: "Label" }),
17431
17431
  /* @__PURE__ */ e(
17432
- _t,
17432
+ Pt,
17433
17433
  {
17434
17434
  value: t.label ?? "",
17435
17435
  onSave: Z,
@@ -17437,7 +17437,7 @@ function rp({
17437
17437
  type: "text"
17438
17438
  }
17439
17439
  )
17440
- ] }) : null, gr = () => xt ? /* @__PURE__ */ n("div", { className: "space-y-1", children: [
17440
+ ] }) : null, fr = () => xt ? /* @__PURE__ */ n("div", { className: "space-y-1", children: [
17441
17441
  /* @__PURE__ */ e(B, { className: "text-xs font-medium text-muted-foreground", children: "Granularity" }),
17442
17442
  /* @__PURE__ */ n(
17443
17443
  ue,
@@ -17451,7 +17451,7 @@ function rp({
17451
17451
  }
17452
17452
  )
17453
17453
  ] }) : null, _i = () => vs ? /* @__PURE__ */ n(se, { children: [
17454
- gr(),
17454
+ fr(),
17455
17455
  /* @__PURE__ */ n("div", { className: "space-y-1", children: [
17456
17456
  /* @__PURE__ */ e(B, { className: "text-xs font-medium text-muted-foreground", children: "Date Format" }),
17457
17457
  /* @__PURE__ */ n(
@@ -17490,7 +17490,7 @@ function rp({
17490
17490
  ] })
17491
17491
  ] })
17492
17492
  ] }) : null, Vi = () => {
17493
- var J, ze, Le, Je, Wt;
17493
+ var J, ze, Le, We, Wt;
17494
17494
  return Ns ? /* @__PURE__ */ n(se, { children: [
17495
17495
  /* @__PURE__ */ n("div", { className: "space-y-1", children: [
17496
17496
  /* @__PURE__ */ e(B, { className: "text-xs font-medium text-muted-foreground", children: "Comparison Type" }),
@@ -17530,7 +17530,7 @@ function rp({
17530
17530
  type: "number",
17531
17531
  min: "1",
17532
17532
  max: "365",
17533
- value: ((Je = x.config) == null ? void 0 : Je.trendlineWindow) || 30,
17533
+ value: ((We = x.config) == null ? void 0 : We.trendlineWindow) || 30,
17534
17534
  onChange: (Cs) => {
17535
17535
  const qi = parseInt(Cs.target.value) || 30;
17536
17536
  N(qi);
@@ -17565,7 +17565,7 @@ function rp({
17565
17565
  return bs ? /* @__PURE__ */ n("div", { className: "space-y-1", children: [
17566
17566
  /* @__PURE__ */ e(B, { className: "text-xs font-medium text-muted-foreground", children: "Target Value" }),
17567
17567
  /* @__PURE__ */ e(
17568
- _t,
17568
+ Pt,
17569
17569
  {
17570
17570
  value: ((J = x.config) == null ? void 0 : J.targetValue) !== void 0 && ((ze = x.config) == null ? void 0 : ze.targetValue) !== null ? String(x.config.targetValue) : "",
17571
17571
  onSave: (Le) => {
@@ -17642,7 +17642,7 @@ function rp({
17642
17642
  size: "sm",
17643
17643
  className: "ml-auto h-4 w-4 p-0",
17644
17644
  onClick: (ze) => {
17645
- var Je;
17645
+ var We;
17646
17646
  ze.stopPropagation();
17647
17647
  const Le = U.conditions.filter(
17648
17648
  (Wt) => Wt.id !== J.id
@@ -17661,7 +17661,7 @@ function rp({
17661
17661
  filters: void 0
17662
17662
  }
17663
17663
  }, Cs = [
17664
- ...((Je = x.config) == null ? void 0 : Je.metricColumns) || []
17664
+ ...((We = x.config) == null ? void 0 : We.metricColumns) || []
17665
17665
  ];
17666
17666
  Cs[s] = Wt, A.getState().actions.updateCardConfig(x.id, {
17667
17667
  metricColumns: Cs
@@ -17720,7 +17720,7 @@ function rp({
17720
17720
  className: `group mx-auto flex w-full flex-col gap-2 rounded border border-border bg-background p-2 transition-all hover:shadow-sm dark:border-gray-800 ${g ? "z-50 scale-95 opacity-50" : "border-slate-200"} ${a === "filters" ? "cursor-default" : "cursor-move"}`,
17721
17721
  children: [
17722
17722
  /* @__PURE__ */ n("div", { className: "flex grow items-center gap-2", children: [
17723
- /* @__PURE__ */ e(pr, { dataType: Ft }),
17723
+ /* @__PURE__ */ e(hr, { dataType: Rt }),
17724
17724
  /* @__PURE__ */ e(
17725
17725
  Js,
17726
17726
  {
@@ -17731,7 +17731,7 @@ function rp({
17731
17731
  children: Vc(t)
17732
17732
  }
17733
17733
  ),
17734
- a === "metrics" && ((vr = U == null ? void 0 : U.conditions) == null ? void 0 : vr.length) && !I && /* @__PURE__ */ e(et, { children: /* @__PURE__ */ n(Ve, { children: [
17734
+ a === "metrics" && ((yr = U == null ? void 0 : U.conditions) == null ? void 0 : yr.length) && !I && /* @__PURE__ */ e(et, { children: /* @__PURE__ */ n(Ve, { children: [
17735
17735
  /* @__PURE__ */ e($e, { asChild: !0, children: /* @__PURE__ */ n("div", { className: "flex items-center gap-1 rounded bg-primary/10 px-1.5 py-0.5 text-xs", children: [
17736
17736
  /* @__PURE__ */ e(Qa, { className: "h-3 w-3" }),
17737
17737
  /* @__PURE__ */ e("span", { children: U.conditions.length })
@@ -17753,7 +17753,7 @@ function rp({
17753
17753
  J.stopPropagation(), S(!I);
17754
17754
  },
17755
17755
  children: /* @__PURE__ */ e(
17756
- Ot,
17756
+ It,
17757
17757
  {
17758
17758
  className: `h-3 w-3 transition-transform ${I ? "rotate-180" : ""}`
17759
17759
  }
@@ -17777,7 +17777,7 @@ function rp({
17777
17777
  ze
17778
17778
  ), l(ze);
17779
17779
  },
17780
- children: r === "asc" ? /* @__PURE__ */ e(Qn, { className: "h-3 w-3" }) : /* @__PURE__ */ e(Hn, { className: "h-3 w-3" })
17780
+ children: r === "asc" ? /* @__PURE__ */ e(Hn, { className: "h-3 w-3" }) : /* @__PURE__ */ e(Jn, { className: "h-3 w-3" })
17781
17781
  }
17782
17782
  ),
17783
17783
  /* @__PURE__ */ e(
@@ -17796,7 +17796,7 @@ function rp({
17796
17796
  I && /* @__PURE__ */ n("div", { className: "space-y-3", children: [
17797
17797
  Kt(),
17798
17798
  Ye(),
17799
- c === "kpi" && gr(),
17799
+ c === "kpi" && fr(),
17800
17800
  _i(),
17801
17801
  Vi(),
17802
17802
  ji(),
@@ -17826,9 +17826,9 @@ function rp({
17826
17826
  ...t.parameters,
17827
17827
  filters: void 0
17828
17828
  }
17829
- }, Je = [...((ze = x.config) == null ? void 0 : ze.metricColumns) || []];
17830
- Je[s] = Le, A.getState().actions.updateCardConfig(x.id, {
17831
- metricColumns: Je
17829
+ }, We = [...((ze = x.config) == null ? void 0 : ze.metricColumns) || []];
17830
+ We[s] = Le, A.getState().actions.updateCardConfig(x.id, {
17831
+ metricColumns: We
17832
17832
  });
17833
17833
  }
17834
17834
  O(null);
@@ -17933,7 +17933,7 @@ function Ds({
17933
17933
  shouldShow: l,
17934
17934
  hasPivotColumns: i = !1
17935
17935
  }) {
17936
- const { isOver: c, setNodeRef: o } = Zn({
17936
+ const { isOver: c, setNodeRef: o } = Xn({
17937
17937
  id: t
17938
17938
  }), { updateSortByColumn: d } = ie(), u = A((v) => v.card), m = A((v) => v.card.type), h = a.length > 0, g = (v, f) => {
17939
17939
  var p;
@@ -17997,7 +17997,7 @@ function Ds({
17997
17997
  )
17998
17998
  ] });
17999
17999
  }
18000
- const Jr = [
18000
+ const Wr = [
18001
18001
  { value: "green", color: "#16a34a", label: "Green" },
18002
18002
  { value: "red", color: "#dc2626", label: "Red" },
18003
18003
  { value: "neutral", color: "#6b7280", label: "Neutral" }
@@ -18027,8 +18027,8 @@ function cn({
18027
18027
  label: s
18028
18028
  }) {
18029
18029
  const [r, l] = j(!1), [i, c] = j(!1), o = () => {
18030
- const d = Jr.find((u) => u.value === t);
18031
- return d ? d.color : t.startsWith("#") ? t : Jr[2].color;
18030
+ const d = Wr.find((u) => u.value === t);
18031
+ return d ? d.color : t.startsWith("#") ? t : Wr[2].color;
18032
18032
  };
18033
18033
  return /* @__PURE__ */ n(se, { children: [
18034
18034
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
@@ -18041,7 +18041,7 @@ function cn({
18041
18041
  "aria-label": `Change color for ${s}`
18042
18042
  }
18043
18043
  ) }),
18044
- /* @__PURE__ */ e(At, { align: "start", className: "w-auto p-2", children: /* @__PURE__ */ n("div", { className: "space-y-2", children: [
18044
+ /* @__PURE__ */ e(Tt, { align: "start", className: "w-auto p-2", children: /* @__PURE__ */ n("div", { className: "space-y-2", children: [
18045
18045
  /* @__PURE__ */ e("div", { className: "grid grid-cols-3 items-center justify-items-center gap-1", children: ip.map((d) => /* @__PURE__ */ e(
18046
18046
  "button",
18047
18047
  {
@@ -18201,7 +18201,7 @@ function op() {
18201
18201
  })()
18202
18202
  ] }),
18203
18203
  /* @__PURE__ */ e(
18204
- ur,
18204
+ dr,
18205
18205
  {
18206
18206
  formatOptions: i.formatOptions || {},
18207
18207
  onFormatOptionsChange: (p) => c({ formatOptions: p }),
@@ -18462,7 +18462,7 @@ function cp() {
18462
18462
  /* @__PURE__ */ e("span", { children: "Number Format" })
18463
18463
  ] }) }),
18464
18464
  /* @__PURE__ */ e(ke, { className: "space-y-4 pb-4 pt-2", children: /* @__PURE__ */ e(
18465
- ur,
18465
+ dr,
18466
18466
  {
18467
18467
  formatOptions: s,
18468
18468
  onFormatOptionsChange: (c) => {
@@ -18562,7 +18562,7 @@ function dp({
18562
18562
  ] }),
18563
18563
  !l && /* @__PURE__ */ n(we, { value: "configuration", className: "border-b-0", children: [
18564
18564
  /* @__PURE__ */ e(Se, { className: "flex w-full items-center gap-2 py-2 text-sm font-medium hover:no-underline", children: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
18565
- /* @__PURE__ */ e(Gn, { className: "h-4 w-4 text-muted-foreground" }),
18565
+ /* @__PURE__ */ e(Yn, { className: "h-4 w-4 text-muted-foreground" }),
18566
18566
  /* @__PURE__ */ e("span", { children: "CONFIGURATION" })
18567
18567
  ] }) }),
18568
18568
  /* @__PURE__ */ e(ke, { className: "rounded-md border border-border bg-muted/50 px-3 py-0", children: /* @__PURE__ */ n(tt, { type: "single", collapsible: !0, className: "w-full", children: [
@@ -18896,7 +18896,7 @@ const pp = (t) => {
18896
18896
  case "dataset":
18897
18897
  return /* @__PURE__ */ e(os, { className: "h-3 w-3" });
18898
18898
  case "file":
18899
- return /* @__PURE__ */ e(sl, { className: "h-3 w-3" });
18899
+ return /* @__PURE__ */ e(al, { className: "h-3 w-3" });
18900
18900
  default:
18901
18901
  return /* @__PURE__ */ e(fn, { className: "h-3 w-3" });
18902
18902
  }
@@ -18943,14 +18943,14 @@ function gp({
18943
18943
  ]
18944
18944
  }
18945
18945
  ) }),
18946
- /* @__PURE__ */ e(At, { className: "z-50 w-80 p-0", align: "start", children: /* @__PURE__ */ n(hs, { children: [
18946
+ /* @__PURE__ */ e(Tt, { className: "z-50 w-80 p-0", align: "start", children: /* @__PURE__ */ n(hs, { children: [
18947
18947
  /* @__PURE__ */ e(ps, { placeholder: "Search fields...", className: "h-9" }),
18948
18948
  /* @__PURE__ */ e(gs, { children: "No fields found." }),
18949
18949
  /* @__PURE__ */ e(fs, { className: "max-h-80", children: Object.entries(o).map(([d, u]) => /* @__PURE__ */ e(
18950
- ya,
18950
+ fa,
18951
18951
  {
18952
18952
  heading: /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
18953
- /* @__PURE__ */ e(Mt, { className: "h-3 w-3" }),
18953
+ /* @__PURE__ */ e(jt, { className: "h-3 w-3" }),
18954
18954
  d
18955
18955
  ] }),
18956
18956
  children: Object.entries(u).map(([m, h]) => /* @__PURE__ */ n("div", { children: [
@@ -18968,7 +18968,7 @@ function gp({
18968
18968
  className: "overflow-x-auto",
18969
18969
  children: [
18970
18970
  /* @__PURE__ */ e(
18971
- fa,
18971
+ ma,
18972
18972
  {
18973
18973
  className: K(
18974
18974
  "mr-2 h-4 w-4",
@@ -18991,7 +18991,7 @@ function gp({
18991
18991
  ] }) })
18992
18992
  ] });
18993
18993
  }
18994
- function fr(t) {
18994
+ function pr(t) {
18995
18995
  var v;
18996
18996
  const a = A((f) => f.card), { authToken: s } = Oe(), r = A((f) => f.card.config), l = r == null ? void 0 : r.joinPlan, i = {
18997
18997
  ...t,
@@ -19057,7 +19057,7 @@ function xp({
19057
19057
  }) {
19058
19058
  const [i, c] = nt.useState(!1), {
19059
19059
  filterValues: o
19060
- } = fr(t), d = (m) => {
19060
+ } = pr(t), d = (m) => {
19061
19061
  s(a.filter((h) => h !== m));
19062
19062
  }, u = (m) => {
19063
19063
  a.includes(m) ? s(a.filter((h) => h !== m)) : s([...a, m]);
@@ -19093,21 +19093,21 @@ function xp({
19093
19093
  )
19094
19094
  ] }, m);
19095
19095
  }) : /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: r }) }),
19096
- /* @__PURE__ */ e(Ot, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
19096
+ /* @__PURE__ */ e(It, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
19097
19097
  ]
19098
19098
  }
19099
19099
  ) }),
19100
- /* @__PURE__ */ e(At, { className: "z-50 w-fit overflow-auto p-0", align: "start", children: /* @__PURE__ */ n(hs, { children: [
19100
+ /* @__PURE__ */ e(Tt, { className: "z-50 w-fit overflow-auto p-0", align: "start", children: /* @__PURE__ */ n(hs, { children: [
19101
19101
  /* @__PURE__ */ e(ps, { placeholder: "Search..." }),
19102
19102
  /* @__PURE__ */ n(fs, { children: [
19103
19103
  /* @__PURE__ */ e(gs, { children: "No results found." }),
19104
- /* @__PURE__ */ e(ya, { children: o.map((m, h) => /* @__PURE__ */ n(
19104
+ /* @__PURE__ */ e(fa, { children: o.map((m, h) => /* @__PURE__ */ n(
19105
19105
  qa,
19106
19106
  {
19107
19107
  onSelect: () => u(m.value),
19108
19108
  children: [
19109
19109
  /* @__PURE__ */ e(
19110
- fa,
19110
+ ma,
19111
19111
  {
19112
19112
  className: K(
19113
19113
  "mr-2 h-4 w-4",
@@ -19134,7 +19134,7 @@ function yp({
19134
19134
  placeholder: r = "Select value...",
19135
19135
  className: l
19136
19136
  }) {
19137
- const { filterValues: i, isPending: c, error: o } = fr(t);
19137
+ const { filterValues: i, isPending: c, error: o } = pr(t);
19138
19138
  return c ? /* @__PURE__ */ n("div", { className: "flex flex-1 items-center justify-center p-2 text-xs text-gray-500", children: [
19139
19139
  /* @__PURE__ */ e(Fe, { className: "mr-2 size-3.5 animate-spin" }),
19140
19140
  " Loading values..."
@@ -19273,7 +19273,7 @@ const Np = [
19273
19273
  isNull: "Is Null",
19274
19274
  isNotNull: "Is Not Null"
19275
19275
  };
19276
- function Hr(t) {
19276
+ function Jr(t) {
19277
19277
  return kp[t] || Qe(t);
19278
19278
  }
19279
19279
  function Dp(t) {
@@ -19308,7 +19308,7 @@ function Li({
19308
19308
  transform: g,
19309
19309
  transition: x,
19310
19310
  isDragging: v
19311
- } = Ya({ id: t.id }), { isPending: f, error: y } = fr(
19311
+ } = Ya({ id: t.id }), { isPending: f, error: y } = pr(
19312
19312
  t.field
19313
19313
  ), p = {
19314
19314
  transform: ia.Transform.toString(g),
@@ -19380,9 +19380,9 @@ function Li({
19380
19380
  });
19381
19381
  },
19382
19382
  children: [
19383
- /* @__PURE__ */ e(me, { className: "w-32", children: /* @__PURE__ */ e(he, { children: t.operator ? Hr(t.operator) : "" }) }),
19383
+ /* @__PURE__ */ e(me, { className: "w-32", children: /* @__PURE__ */ e(he, { children: t.operator ? Jr(t.operator) : "" }) }),
19384
19384
  /* @__PURE__ */ e(pe, { children: Dp(Pe(t.field.dataType)).map(
19385
- (C) => /* @__PURE__ */ e(Q, { className: "hover:bg-muted", value: C, children: Hr(C) }, C)
19385
+ (C) => /* @__PURE__ */ e(Q, { className: "hover:bg-muted", value: C, children: Jr(C) }, C)
19386
19386
  ) })
19387
19387
  ]
19388
19388
  }
@@ -19896,7 +19896,7 @@ function Ap({
19896
19896
  children: [
19897
19897
  /* @__PURE__ */ n(St, { children: [
19898
19898
  /* @__PURE__ */ e(kt, { children: "Card Filters" }),
19899
- /* @__PURE__ */ e(jt, { children: "Add filters to the card to limit the data that is displayed." })
19899
+ /* @__PURE__ */ e(Vt, { children: "Add filters to the card to limit the data that is displayed." })
19900
19900
  ] }),
19901
19901
  /* @__PURE__ */ e(
19902
19902
  Tp,
@@ -20147,7 +20147,7 @@ function Op({
20147
20147
  const { currentUser: r } = lt();
20148
20148
  r == null || r.role;
20149
20149
  const [l, i] = j(!1), c = A((p) => p.isDevMode), o = A((p) => p.card), d = A((p) => p.card.dataSource);
20150
- $n(o);
20150
+ Bn(o);
20151
20151
  const { config: u } = dd(Kc).tokenProps, m = (u == null ? void 0 : u.showAdvancedMode) !== !1, { setIsDevMode: h } = ie(), g = A((p) => p.showAIDialog), x = A((p) => p.frame), v = Ea((p) => p.selectedVisual), f = (v == null ? void 0 : v.id) === (x == null ? void 0 : x.id), { setShowAIDialog: y } = ie();
20152
20152
  return /* @__PURE__ */ n(
20153
20153
  "div",
@@ -20173,28 +20173,13 @@ function Op({
20173
20173
  /* @__PURE__ */ e("label", { htmlFor: "advanced-mode", className: "text-sm font-medium", children: "Advanced Mode" })
20174
20174
  ] }),
20175
20175
  /* @__PURE__ */ n("div", { className: "flex items-center space-x-2", children: [
20176
- (r == null ? void 0 : r.type) !== "tenant" && /* @__PURE__ */ n(ma, { modal: !1, children: [
20177
- /* @__PURE__ */ e(ha, { asChild: !0, children: /* @__PURE__ */ e(V, { variant: "ghost", size: "sm", className: "h-8 p-0", children: /* @__PURE__ */ e(Pn, { className: "size-3.5" }) }) }),
20178
- /* @__PURE__ */ e(pa, { align: "end", children: /* @__PURE__ */ n(
20179
- We,
20180
- {
20181
- onClick: () => {
20182
- i(!0);
20183
- },
20184
- children: [
20185
- /* @__PURE__ */ e(Mt, { className: "mr-2 h-4 w-4" }),
20186
- "Set Data Context"
20187
- ]
20188
- }
20189
- ) })
20190
- ] }),
20191
- /* @__PURE__ */ e(cr, {}),
20192
- s && !f && /* @__PURE__ */ e(or, { variant: "default" }),
20176
+ /* @__PURE__ */ e(or, {}),
20177
+ s && !f && /* @__PURE__ */ e(ir, { variant: "default" }),
20193
20178
  f && /* @__PURE__ */ e(wm, {}),
20194
20179
  a && Os
20195
20180
  ] }),
20196
20181
  l && /* @__PURE__ */ e(
20197
- er,
20182
+ Zn,
20198
20183
  {
20199
20184
  incomingSelectedEntities: (d == null ? void 0 : d.selectedEntities) || [],
20200
20185
  open: l,
@@ -20312,7 +20297,7 @@ function Lp({
20312
20297
  var h;
20313
20298
  return ((h = m.card.customCardPreferences) == null ? void 0 : h.settings) || {};
20314
20299
  }
20315
- ), { data: o } = _e(l), { getCard: d } = Bn(r), u = Ke(() => !r || r.trim() === "" ? null : d("Chart Settings"), [d, r]);
20300
+ ), { data: o } = _e(l), { getCard: d } = jn(r), u = Ke(() => !r || r.trim() === "" ? null : d("Chart Settings"), [d, r]);
20316
20301
  return /* @__PURE__ */ e(
20317
20302
  "div",
20318
20303
  {
@@ -20351,7 +20336,7 @@ function Lp({
20351
20336
  );
20352
20337
  }
20353
20338
  function Pp() {
20354
- const { authToken: t, tokenProps: a } = Oe(), { currentUser: s } = lt(), r = xa({
20339
+ const { authToken: t, tokenProps: a } = Oe(), { currentUser: s } = lt(), r = pa({
20355
20340
  mutationFn: async (l) => {
20356
20341
  if (!(t != null && t.accessToken))
20357
20342
  throw new Error("No authentication token available");
@@ -20433,7 +20418,7 @@ function Vp({
20433
20418
  return /* @__PURE__ */ e(Ct, { open: t, onOpenChange: x, children: /* @__PURE__ */ n(wt, { className: "max-w-2xl", children: [
20434
20419
  /* @__PURE__ */ n(St, { children: [
20435
20420
  /* @__PURE__ */ e(kt, { children: u ? "Feedback Sent Successfully" : "Report Query Generation Issue" }),
20436
- /* @__PURE__ */ e(jt, { children: u ? `Your feedback has been submitted with issue number: ${m == null ? void 0 : m.issueNumber}` : "Help us improve by reporting this query generation issue. Your feedback will be sent to our support team." })
20421
+ /* @__PURE__ */ e(Vt, { children: u ? `Your feedback has been submitted with issue number: ${m == null ? void 0 : m.issueNumber}` : "Help us improve by reporting this query generation issue. Your feedback will be sent to our support team." })
20437
20422
  ] }),
20438
20423
  !u && /* @__PURE__ */ n(se, { children: [
20439
20424
  /* @__PURE__ */ n("div", { className: "space-y-4", children: [
@@ -20460,12 +20445,12 @@ function Vp({
20460
20445
  className: "flex w-full items-center justify-between p-2 hover:bg-muted",
20461
20446
  children: [
20462
20447
  /* @__PURE__ */ e("span", { className: "text-sm font-medium", children: "View data to be sent" }),
20463
- i ? /* @__PURE__ */ e(Ot, { className: "h-4 w-4" }) : /* @__PURE__ */ e(Bl, { className: "h-4 w-4" })
20448
+ i ? /* @__PURE__ */ e(It, { className: "h-4 w-4" }) : /* @__PURE__ */ e(Bl, { className: "h-4 w-4" })
20464
20449
  ]
20465
20450
  }
20466
20451
  ) }),
20467
20452
  /* @__PURE__ */ e(kl, { children: /* @__PURE__ */ e(st, { className: "h-[300px] w-full rounded-md border bg-muted/50 p-4", children: /* @__PURE__ */ e("div", { className: "text-xs", children: /* @__PURE__ */ e(
20468
- jn,
20453
+ Vn,
20469
20454
  {
20470
20455
  code: JSON.stringify(v, null, 2),
20471
20456
  language: "json"
@@ -20534,7 +20519,7 @@ function jp({
20534
20519
  // setActiveCard,
20535
20520
  }) {
20536
20521
  var G;
20537
- const x = A((ae) => ae.card), v = ne((ae) => ae.filterValues), f = (v == null ? void 0 : v.length) || 0, { updateCardConfig: y, setCard: p, updateCardInFrame: C, setCardId: T } = ie(), { updateCardId: F } = Tt(), [b, k] = j(null), N = A((ae) => ae.showAIDialog), [D, w] = j(!1), [I, S] = j(!1), [P, M] = j(null), { isConsoleMode: E } = Ps(), O = A(
20522
+ const x = A((ae) => ae.card), v = ne((ae) => ae.filterValues), f = (v == null ? void 0 : v.length) || 0, { updateCardConfig: y, setCard: p, updateCardInFrame: C, setCardId: T } = ie(), { updateCardId: F } = Mt(), [b, k] = j(null), N = A((ae) => ae.showAIDialog), [D, w] = j(!1), [I, S] = j(!1), [P, M] = j(null), { isConsoleMode: E } = Ps(), O = A(
20538
20523
  (ae) => {
20539
20524
  var U;
20540
20525
  return ((U = ae.card.customCardPreferences) == null ? void 0 : U.url) && ae.card.type === "custom";
@@ -20667,7 +20652,7 @@ function jp({
20667
20652
  /* @__PURE__ */ n("div", { className: "mt-3 flex grow flex-col", children: [
20668
20653
  t === "chart" && /* @__PURE__ */ e("div", { className: "flex grow flex-col pb-6", children: /* @__PURE__ */ e(wi, {}) }),
20669
20654
  t === "table" && (z == null ? void 0 : z.records) && /* @__PURE__ */ e("div", { className: "relative flex h-full min-h-0 max-w-full flex-1 grow basis-0 p-6", children: /* @__PURE__ */ e(
20670
- qn,
20655
+ Un,
20671
20656
  {
20672
20657
  card: u,
20673
20658
  data: (z == null ? void 0 : z.records) || [],
@@ -20778,7 +20763,7 @@ function Bp({ activeField: t }) {
20778
20763
  className: `flex max-w-[300px] items-center gap-2 rounded-lg border border-blue-500 bg-background p-2 shadow-lg transition-all duration-200 ${a ? "scale-100 opacity-100" : "scale-95 opacity-0"}`,
20779
20764
  children: [
20780
20765
  /* @__PURE__ */ e(Gs, { className: "h-3 w-3 shrink-0 text-muted-foreground" }),
20781
- /* @__PURE__ */ e(pr, { dataType: t.dataType }),
20766
+ /* @__PURE__ */ e(hr, { dataType: t.dataType }),
20782
20767
  /* @__PURE__ */ e("span", { className: "overflow-hidden text-ellipsis whitespace-nowrap text-sm dark:text-muted-foreground", children: t.label || t.name })
20783
20768
  ]
20784
20769
  }
@@ -20844,7 +20829,7 @@ function Up() {
20844
20829
  ), P = C, {
20845
20830
  getFieldsForContainer: M,
20846
20831
  setFieldsForContainer: E
20847
- } = hr(P), { activeField: O, handleDragStart: z, handleDragEnd: R } = Ep({
20832
+ } = mr(P), { activeField: O, handleDragStart: z, handleDragEnd: R } = Ep({
20848
20833
  activeCardId: p.activeCardId,
20849
20834
  sourceFields: D,
20850
20835
  getFieldsForContainer: M,
@@ -20928,7 +20913,7 @@ function Up() {
20928
20913
  className: "h-10 w-10 rounded-full border-border bg-background p-0 shadow-lg hover:bg-muted",
20929
20914
  onClick: () => o(!0),
20930
20915
  title: "Show Data Source Panel",
20931
- children: /* @__PURE__ */ e(Mt, { className: "h-4 w-4" })
20916
+ children: /* @__PURE__ */ e(jt, { className: "h-4 w-4" })
20932
20917
  }
20933
20918
  ) })
20934
20919
  ] }),
@@ -20950,7 +20935,7 @@ function Up() {
20950
20935
  );
20951
20936
  }
20952
20937
  function qp({ authToken: t, onSave: a, onClose: s }) {
20953
- const r = Bt(null), l = A((C) => C.showAIDialog), i = A((C) => C.isDevMode), { setAuthToken: c } = Tt(), { setShowAIDialog: o, setOnSave: d, setOnClose: u } = ie(), {
20938
+ const r = Bt(null), l = A((C) => C.showAIDialog), i = A((C) => C.isDevMode), { setAuthToken: c } = Mt(), { setShowAIDialog: o, setOnSave: d, setOnClose: u } = ie(), {
20954
20939
  handleDragOver: m,
20955
20940
  handleDragEnd: h,
20956
20941
  handleDragStart: g,
@@ -20987,7 +20972,7 @@ function qp({ authToken: t, onSave: a, onClose: s }) {
20987
20972
  ref: r,
20988
20973
  onResize: f,
20989
20974
  defaultSize: 0,
20990
- children: /* @__PURE__ */ e(Yr, {})
20975
+ children: /* @__PURE__ */ e(qr, {})
20991
20976
  }
20992
20977
  )
20993
20978
  ]
@@ -21012,7 +20997,7 @@ function qp({ authToken: t, onSave: a, onClose: s }) {
21012
20997
  ref: r,
21013
20998
  onResize: f,
21014
20999
  defaultSize: 0,
21015
- children: /* @__PURE__ */ e(Yr, {})
21000
+ children: /* @__PURE__ */ e(qr, {})
21016
21001
  }
21017
21002
  )
21018
21003
  ]
@@ -21060,12 +21045,12 @@ function Yp() {
21060
21045
  }
21061
21046
  function Gp({ column: t }) {
21062
21047
  return /* @__PURE__ */ n(Ve, { children: [
21063
- /* @__PURE__ */ e(Xc, { className: "shrink-0", asChild: !0, children: Lt(t.data_type) ? /* @__PURE__ */ e(Zc, { className: "size-3 text-muted-foreground" }) : na(t.data_type) ? /* @__PURE__ */ e($t, { className: "size-3 text-muted-foreground" }) : Pt(t.data_type) ? /* @__PURE__ */ e(Dt, { className: "size-3 text-muted-foreground" }) : ed(t.data_type) ? /* @__PURE__ */ e(wa, { className: "size-3 text-muted-foreground" }) : t.data_type.startsWith("json") ? /* @__PURE__ */ e(Nd, { className: "size-3 text-muted-foreground" }) : /* @__PURE__ */ e(td, { className: "size-3 text-muted-foreground" }) }),
21048
+ /* @__PURE__ */ e(Xc, { className: "shrink-0", asChild: !0, children: zt(t.data_type) ? /* @__PURE__ */ e(Zc, { className: "size-3 text-muted-foreground" }) : na(t.data_type) ? /* @__PURE__ */ e($t, { className: "size-3 text-muted-foreground" }) : Lt(t.data_type) ? /* @__PURE__ */ e(Dt, { className: "size-3 text-muted-foreground" }) : ed(t.data_type) ? /* @__PURE__ */ e(Na, { className: "size-3 text-muted-foreground" }) : t.data_type.startsWith("json") ? /* @__PURE__ */ e(Nd, { className: "size-3 text-muted-foreground" }) : /* @__PURE__ */ e(td, { className: "size-3 text-muted-foreground" }) }),
21064
21049
  /* @__PURE__ */ e(Ue, { children: /* @__PURE__ */ e("p", { className: "text-xs", children: t.data_type }) })
21065
21050
  ] });
21066
21051
  }
21067
21052
  function Kp() {
21068
- const t = A((i) => i.selectedDatabaseName), a = A((i) => i.selectedTableName), s = ne((i) => i.dashboard.filters) || [], { columns: r } = Rt(), { assignFilter: l } = dr();
21053
+ const t = A((i) => i.selectedDatabaseName), a = A((i) => i.selectedTableName), s = ne((i) => i.dashboard.filters) || [], { columns: r } = Ot(), { assignFilter: l } = cr();
21069
21054
  return /* @__PURE__ */ e(st, { className: "flex-1 basis-0 flex-col px-3", children: r == null ? void 0 : r.map((i) => {
21070
21055
  const c = s == null ? void 0 : s.find(
21071
21056
  (o) => o.column === Nt(i.column_name) && o.table === a && o.database === t
@@ -21091,10 +21076,10 @@ function Kp() {
21091
21076
  }
21092
21077
  function Wp({ dataType: t }) {
21093
21078
  const a = Pe(t);
21094
- return a === "string" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-blue-100 text-xs text-blue-700 dark:bg-blue-950 dark:text-blue-300", children: /* @__PURE__ */ e(ht, { className: "h-3 w-3" }) }) : a === "number" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-green-100 text-xs text-green-700 dark:bg-green-950 dark:text-green-300", children: /* @__PURE__ */ e($t, { className: "h-3 w-3" }) }) : a === "date" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-purple-100 text-xs text-purple-700 dark:bg-purple-950 dark:text-purple-300", children: /* @__PURE__ */ e(Dt, { className: "h-3 w-3" }) }) : a === "boolean" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-orange-100 text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e(wa, { className: "h-3 w-3" }) }) : a === "json" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(Pa, { className: "h-3 w-3" }) }) : a === "geo" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-orange-100 text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e(ss, { className: "h-3 w-3" }) }) : a === "calculated" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(ys, { className: "h-3 w-3" }) }) : /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(ht, { className: "h-3 w-3" }) });
21079
+ return a === "string" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-blue-100 text-xs text-blue-700 dark:bg-blue-950 dark:text-blue-300", children: /* @__PURE__ */ e(ht, { className: "h-3 w-3" }) }) : a === "number" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-green-100 text-xs text-green-700 dark:bg-green-950 dark:text-green-300", children: /* @__PURE__ */ e($t, { className: "h-3 w-3" }) }) : a === "date" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-purple-100 text-xs text-purple-700 dark:bg-purple-950 dark:text-purple-300", children: /* @__PURE__ */ e(Dt, { className: "h-3 w-3" }) }) : a === "boolean" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-orange-100 text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e(Na, { className: "h-3 w-3" }) }) : a === "json" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(Pa, { className: "h-3 w-3" }) }) : a === "geo" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-orange-100 text-xs text-orange-700 dark:bg-orange-950 dark:text-orange-300", children: /* @__PURE__ */ e(ss, { className: "h-3 w-3" }) }) : a === "calculated" ? /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(ys, { className: "h-3 w-3" }) }) : /* @__PURE__ */ e("div", { className: "flex size-6 shrink-0 items-center justify-center rounded-sm bg-gray-100 text-xs text-gray-700 dark:bg-gray-950 dark:text-gray-300", children: /* @__PURE__ */ e(ht, { className: "h-3 w-3" }) });
21095
21080
  }
21096
21081
  function Jp() {
21097
- const [t, a] = j(""), [s, r] = j("all"), l = ne((p) => p.dashboard.filters) || [], { assignFilter: i } = dr(), c = A((p) => p.card.dataSource), {
21082
+ const [t, a] = j(""), [s, r] = j("all"), l = ne((p) => p.dashboard.filters) || [], { assignFilter: i } = cr(), c = A((p) => p.card.dataSource), {
21098
21083
  columns: o = [],
21099
21084
  isLoading: d,
21100
21085
  error: u
@@ -21122,13 +21107,13 @@ function Jp() {
21122
21107
  return /* @__PURE__ */ e("div", { className: "flex h-full grow flex-col items-center justify-center px-3", children: /* @__PURE__ */ e(es, { size: "md", color: "muted", "aria-label": "Loading fields" }) });
21123
21108
  if (u)
21124
21109
  return /* @__PURE__ */ n("div", { className: "flex h-full flex-col items-center justify-center px-3", children: [
21125
- /* @__PURE__ */ e(Mt, { className: "mb-4 h-12 w-12 text-red-300" }),
21110
+ /* @__PURE__ */ e(jt, { className: "mb-4 h-12 w-12 text-red-300" }),
21126
21111
  /* @__PURE__ */ e("p", { className: "mb-2 text-sm text-red-500", children: "Error loading fields" }),
21127
21112
  /* @__PURE__ */ e("p", { className: "px-4 text-center text-xs text-red-400", children: u.message || "Failed to load column data" })
21128
21113
  ] });
21129
21114
  if (!c || !c.selectedEntities || c.selectedEntities.length === 0)
21130
21115
  return /* @__PURE__ */ n("div", { className: "flex h-full flex-col items-center justify-center px-6 py-8 text-center", children: [
21131
- /* @__PURE__ */ e(Mt, { className: "mb-4 h-12 w-12 text-gray-300" }),
21116
+ /* @__PURE__ */ e(jt, { className: "mb-4 h-12 w-12 text-gray-300" }),
21132
21117
  /* @__PURE__ */ e("p", { className: "mb-2 text-sm text-gray-500", children: "No data source selected" }),
21133
21118
  /* @__PURE__ */ e("p", { className: "px-4 text-xs text-gray-400", children: "Select a table, view, or dataset from the data source panel to see available fields" })
21134
21119
  ] });
@@ -21165,7 +21150,7 @@ function Jp() {
21165
21150
  /* @__PURE__ */ e("span", { className: "ml-2 text-xs font-semibold", children: m.length })
21166
21151
  ] }),
21167
21152
  /* @__PURE__ */ n(Ie, { value: "dimensions", className: "text-xs", children: [
21168
- /* @__PURE__ */ e(Vn, { className: "size-4 shrink-0" }),
21153
+ /* @__PURE__ */ e(_n, { className: "size-4 shrink-0" }),
21169
21154
  /* @__PURE__ */ e("span", { className: "ml-2 text-xs font-semibold", children: x })
21170
21155
  ] }),
21171
21156
  /* @__PURE__ */ n(Ie, { value: "metrics", className: "text-xs", children: [