react-semaphor 0.1.13 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,7 +1,7 @@
1
1
  import { jsxs as a, jsx as e, Fragment as K } from "react/jsx-runtime";
2
- import { c as oe, a1 as Bs, u as H, a2 as St, a3 as kt, B as V, a4 as Dt, a5 as qe, a6 as Ys, _ as ht, a7 as Ke, a8 as st, a9 as Dl, aa as Be, ab as nt, ac as lt, ad as rt, ae as ft, af as U, ag as Oe, ah as Tt, I as xe, ai as qs, aj as Ht, ak as ui, al as Jn, am as Ks, f as q, an as Js, ao as mi, ap as Tl, aq as hi, ar as pi, as as ua, at as ue, w as Wn, au as fi, av as gi, aw as Xt, ax as $e, ay as re, az as Ie, aA as Ct, aB as Ve, aC as Na, aD as aa, aE as ya, aF as vi, aG as sa, aH as xt, aI as Je, aJ as We, aK as Aa, aL as Xe, aM as Ae, aN as He, aO as Ws, aP as Xa, aQ as ma, aR as Ut, aS as $t, aT as Qs, aU as Hs, aV as xi, aW as Ia, aX as Xs, aY as Zs, aZ as en, a_ as tn, R as Ot, a$ as El, b0 as Ni, b1 as an, b2 as Oa, b3 as sn, b4 as nn, b5 as ba, b6 as Ca, b7 as wa, b8 as ln, b9 as os, ba as rn, bb as Ml, bc as Al, bd as on, be as he, bf as pe, bg as fe, bh as ge, bi as ee, bj as Il, bk as Ol, bl as yi, bm as bi, bn as Rt, bo as Ci, bp as wi, bq as Ft, br as Pt, bs as ze, bt as ct, bu as bt, $ as I, bv as Et, bw as cs, bx as ds, by as cn, bz as Si, bA as ut, bB as Rs, bC as Gt, bD as Fs, bE as Rl, bF as Fl, bG as ki, bH as dn, bI as un, bJ as mn, bK as hn, bL as pn, bM as fn, bN as gn, bO as vn, bP as Di, bQ as us, bR as Ra, a0 as ie, bS as Ti, bT as wt, bU as Ei, o as na, bV as Pl, bW as _e, bX as Mi, bY as Fa, bZ as Za, b_ as xn, b$ as Ka, c0 as Pa, c1 as Nn, c2 as Ai, c3 as Ii, c4 as Oi, c5 as Ri, c6 as Fi, v as Pi, c7 as es, c8 as Ll, c9 as ms, ca as Li, cb as zi, cc as Vi, cd as Ja, ce as _i, cf as Wa, cg as Qa, ch as hs, W as La, A as Qn, Q as Hn, K as zl, J as Vl, y as Vt, z as ji, G as Ui, T as $i, ci as Xn, cj as Zn, ck as ps, cl as fs, cm as gs, cn as ot, co as za, cp as Gi, cq as ts, cr as jt, cs as _l, ct as vs, cu as jl, cv as mt, cw as ke, cx as De, cy as Te, cz as Ul, cA as Da, cB as $l, cC as Gl, cD as Va, g as Bt, cE as el, cF as Bl, cG as Bi, cH as Ps, cI as Yl, cJ as yn, cK as ql, cL as Ta, cM as tl, cN as Yi, cO as qi, cP as Ki, cQ as Kl, cR as Ji, cS as Wi, cT as Jl, cU as Qi, cV as xs, cW as Hi, cX as Xi, cY as Ls, cZ as Zt, c_ as at, c$ as ea, d0 as Zi, d1 as eo, d2 as Ns, d3 as to, d4 as bn, d5 as ao, d6 as Cn, d7 as so, d8 as Wl, d9 as Ha, da as Ql, db as no, dc as lo, dd as ro, de as wn, df as io, dg as oo, dh as al, di as co, E as _a, b as Sn, dj as uo, dk as mo, dl as ho, dm as po, dn as fo, dp as go, dq as Hl, dr as kn, ds as Xl, dt as Zl, du as er, dv as tr, dw as ar, dx as Dn, dy as Tn, dz as sr, dA as nr, dB as lr, dC as En, dD as ys, dE as bs, dF as vo, P as Yt, e as qt, dG as xo, dH as Jt, dI as No, dJ as yo, dK as bo, dL as Co, dM as wo, dN as So, dO as rr, dP as dt, dQ as Ea, dR as as, dS as _t, h as la, dT as ko, dU as Do, dV as To, dW as Eo, dX as Mo, dY as ir, dZ as Ao, i as Cs, j as ws, k as Ss, l as ks, m as da, n as ja, d_ as Io, d$ as pt, e0 as $a, e1 as sl, e2 as Oo, e3 as nl, e4 as Ro, e5 as Fo, e6 as Po, e7 as Lo, e8 as ll, e9 as zo, ea as Vo, eb as _o, ec as jo, ed as Uo, O as rl, ee as il, ef as $o, eg as Go, eh as or, ei as Bo, ej as cr, ek as Yo, el as qo, em as Ko, en as Jo, eo as Wo, ep as Qo, eq as Ho, er as Xo, es as Zo, et as ec, eu as tc, ev as ac, ew as sc, ex as nc, ey as lc, ez as rc, eA as dr, eB as Es, eC as Mn, eD as ic, eE as oc, eF as cc, eG as dc, eH as ha, eI as pa, eJ as uc, eK as ur, eL as mc, eM as zs, eN as hc, eO as pc, eP as fc, eQ as ss, eR as Wt, eS as Vs, eT as _s, eU as ns, eV as mr, eW as fa, eX as ga, eY as An, eZ as gc, e_ as vc, e$ as xc, f0 as Nc, f1 as yc, f2 as bc, f3 as Cc, f4 as wc, f5 as Ms, f6 as Sc, f7 as kc, f8 as Dc, F as hr, f9 as Tc, fa as Ec, fb as Mc, fc as pr, fd as fr, fe as Ac, ff as gr, fg as Ic, fh as Oc, fi as Rc, fj as Fc, fk as Pc, S as Lc, fl as zc, U as Vc, fm as _c, C as jc } from "./index-IA4DqOkm.js";
2
+ import { c as oe, a1 as Bs, u as H, a2 as St, a3 as kt, B as V, a4 as Dt, a5 as qe, a6 as Ys, _ as ht, a7 as We, a8 as st, a9 as Dl, aa as Be, ab as nt, ac as lt, ad as rt, ae as ft, af as U, ag as Oe, ah as Tt, I as xe, ai as qs, aj as Ht, ak as ui, al as Jn, am as Ks, f as q, an as Js, ao as mi, ap as Tl, aq as hi, ar as pi, as as ua, at as ue, w as Wn, au as fi, av as gi, aw as Xt, ax as $e, ay as re, az as Ie, aA as Ct, aB as Ve, aC as Na, aD as aa, aE as ya, aF as vi, aG as sa, aH as gt, aI as Ke, aJ as Je, aK as Aa, aL as Qe, aM as Ae, aN as Xe, aO as Ws, aP as Xa, aQ as ma, aR as Ut, aS as $t, aT as Qs, aU as Hs, aV as xi, aW as Ia, aX as Xs, aY as Zs, aZ as en, a_ as tn, R as Ot, a$ as El, b0 as Ni, b1 as an, b2 as Oa, b3 as sn, b4 as nn, b5 as ba, b6 as Ca, b7 as wa, b8 as ln, b9 as os, ba as rn, bb as Ml, bc as Al, bd as on, be as he, bf as pe, bg as fe, bh as ge, bi as ee, bj as Il, bk as Ol, bl as yi, bm as bi, bn as Rt, bo as Ci, bp as wi, bq as Ft, br as Pt, bs as ze, bt as ct, bu as bt, $ as I, bv as Et, bw as cs, bx as ds, by as cn, bz as Si, bA as ut, bB as Rs, bC as Gt, bD as Fs, bE as Rl, bF as Fl, bG as ki, bH as dn, bI as un, bJ as mn, bK as hn, bL as pn, bM as fn, bN as gn, bO as vn, bP as Di, bQ as us, bR as Ra, a0 as ie, bS as Ti, bT as wt, bU as Ei, o as na, bV as Pl, bW as _e, bX as Mi, bY as Fa, bZ as Za, b_ as xn, b$ as Ka, c0 as Pa, c1 as Nn, c2 as Ai, c3 as Ii, c4 as Oi, c5 as Ri, c6 as Fi, v as Pi, c7 as es, c8 as Ll, c9 as ms, ca as Li, cb as zi, cc as Vi, cd as Ja, ce as _i, cf as Wa, cg as Qa, ch as hs, W as La, A as Qn, Q as Hn, K as zl, J as Vl, y as Vt, z as ji, G as Ui, T as $i, ci as Xn, cj as Zn, ck as ps, cl as fs, cm as gs, cn as ot, co as za, cp as Gi, cq as ts, cr as jt, cs as _l, ct as vs, cu as jl, cv as mt, cw as ke, cx as De, cy as Te, cz as Ul, cA as Da, cB as $l, cC as Gl, cD as Va, g as Bt, cE as el, cF as Bl, cG as Bi, cH as Ps, cI as Yl, cJ as yn, cK as ql, cL as Ta, cM as tl, cN as Yi, cO as qi, cP as Ki, cQ as Kl, cR as Ji, cS as Wi, cT as Jl, cU as Qi, cV as xs, cW as Hi, cX as Xi, cY as Ls, cZ as Zt, c_ as at, c$ as ea, d0 as Zi, d1 as eo, d2 as Ns, d3 as to, d4 as bn, d5 as ao, d6 as Cn, d7 as so, d8 as Wl, d9 as Ha, da as Ql, db as no, dc as lo, dd as ro, de as wn, df as io, dg as oo, dh as al, di as co, E as _a, b as Sn, dj as uo, dk as mo, dl as ho, dm as po, dn as fo, dp as go, dq as Hl, dr as kn, ds as Xl, dt as Zl, du as er, dv as tr, dw as ar, dx as Dn, dy as Tn, dz as sr, dA as nr, dB as lr, dC as En, dD as ys, dE as bs, dF as vo, P as Yt, e as qt, dG as xo, dH as Jt, dI as No, dJ as yo, dK as bo, dL as Co, dM as wo, dN as So, dO as rr, dP as dt, dQ as Ea, dR as as, dS as _t, h as la, dT as ko, dU as Do, dV as To, dW as Eo, dX as Mo, dY as ir, dZ as Ao, i as Cs, j as ws, k as Ss, l as ks, m as da, n as ja, d_ as Io, d$ as pt, e0 as $a, e1 as sl, e2 as Oo, e3 as nl, e4 as Ro, e5 as Fo, e6 as Po, e7 as Lo, e8 as ll, e9 as zo, ea as Vo, eb as _o, ec as jo, ed as Uo, O as rl, ee as il, ef as $o, eg as Go, eh as or, ei as Bo, ej as cr, ek as Yo, el as qo, em as Ko, en as Jo, eo as Wo, ep as Qo, eq as Ho, er as Xo, es as Zo, et as ec, eu as tc, ev as ac, ew as sc, ex as nc, ey as lc, ez as rc, eA as dr, eB as Es, eC as Mn, eD as ic, eE as oc, eF as cc, eG as dc, eH as ha, eI as pa, eJ as uc, eK as ur, eL as mc, eM as zs, eN as hc, eO as pc, eP as fc, eQ as ss, eR as Wt, eS as Vs, eT as _s, eU as ns, eV as mr, eW as fa, eX as ga, eY as An, eZ as gc, e_ as vc, e$ as xc, f0 as Nc, f1 as yc, f2 as bc, f3 as Cc, f4 as wc, f5 as Ms, f6 as Sc, f7 as kc, f8 as Dc, F as hr, f9 as Tc, fa as Ec, fb as Mc, fc as pr, fd as fr, fe as Ac, ff as gr, fg as Ic, fh as Oc, fi as Rc, fj as Fc, fk as Pc, S as Lc, fl as zc, U as Vc, fm as _c, C as jc } from "./index-IA4DqOkm.js";
3
3
  import * as js from "react";
4
- import Ge, { useState as _, useRef as Nt, useEffect as Ne, useMemo as Qe, useCallback as Ce, useContext as In, Suspense as vr } from "react";
4
+ import Ge, { useState as _, useRef as Nt, useEffect as Ne, useMemo as He, useCallback as Ce, useContext as In, Suspense as vr } from "react";
5
5
  import { createPortal as Uc } from "react-dom";
6
6
  /**
7
7
  * @license lucide-react v0.453.0 - ISC
@@ -879,7 +879,7 @@ async function Td(t, n, s) {
879
879
  });
880
880
  }
881
881
  function Ed() {
882
- const [t, n] = _(""), [s, l] = _(!1), r = H((b) => b.lenses), { setLenses: i, setSelectedLensId: c } = ht(), [o, d] = _(!1), [u, m] = _(!1), p = H((b) => b.dashboard), h = H((b) => b.filterValues), { authToken: f, tokenProps: v } = Ke();
882
+ const [t, n] = _(""), [s, l] = _(!1), r = H((b) => b.lenses), { setLenses: i, setSelectedLensId: c } = ht(), [o, d] = _(!1), [u, m] = _(!1), p = H((b) => b.dashboard), h = H((b) => b.filterValues), { authToken: f, tokenProps: v } = We();
883
883
  async function g() {
884
884
  d(!0);
885
885
  const b = Us(
@@ -941,7 +941,7 @@ function Ed() {
941
941
  ] });
942
942
  }
943
943
  function Md() {
944
- const [t, n] = _(!1), s = H((p) => p.lenses), l = H((p) => p.selectedLensId), { setLenses: r, setSelectedLensId: i } = ht(), { authToken: c, tokenProps: o } = Ke();
944
+ const [t, n] = _(!1), s = H((p) => p.lenses), l = H((p) => p.selectedLensId), { setLenses: r, setSelectedLensId: i } = ht(), { authToken: c, tokenProps: o } = We();
945
945
  async function d(p) {
946
946
  i(p);
947
947
  }
@@ -1034,7 +1034,7 @@ function Md() {
1034
1034
  function Ad({
1035
1035
  iconClassName: t
1036
1036
  }) {
1037
- const [n, s] = _(!1), [l, r] = _(""), [i, c] = _(!1), o = H((p) => p.isDownloadingPdf), { tokenProps: d } = Ke();
1037
+ const [n, s] = _(!1), [l, r] = _(""), [i, c] = _(!1), o = H((p) => p.isDownloadingPdf), { tokenProps: d } = We();
1038
1038
  async function u() {
1039
1039
  const p = ue.loading(
1040
1040
  "Generating PDF... may take up to 60 seconds"
@@ -1870,7 +1870,7 @@ function jd({
1870
1870
  ),
1871
1871
  children: [
1872
1872
  /* @__PURE__ */ e(
1873
- He,
1873
+ Xe,
1874
1874
  {
1875
1875
  checked: r ? !s : i,
1876
1876
  onCheckedChange: () => {
@@ -1967,9 +1967,9 @@ function Er({
1967
1967
  (P ?? []).length,
1968
1968
  ")"
1969
1969
  ] }),
1970
- /* @__PURE__ */ e(xt, { children: /* @__PURE__ */ a(Je, { children: [
1971
- /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ e(V, { variant: "ghost", size: "sm", className: "h-6 w-6 p-0", children: /* @__PURE__ */ e(Aa, { className: "h-4 w-4" }) }) }),
1972
- /* @__PURE__ */ e(Xe, { className: "w-48 max-w-sm", children: /* @__PURE__ */ e(
1970
+ /* @__PURE__ */ e(gt, { children: /* @__PURE__ */ a(Ke, { children: [
1971
+ /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e(V, { variant: "ghost", size: "sm", className: "h-6 w-6 p-0", children: /* @__PURE__ */ e(Aa, { className: "h-4 w-4" }) }) }),
1972
+ /* @__PURE__ */ e(Qe, { className: "w-48 max-w-sm", children: /* @__PURE__ */ e(
1973
1973
  Vd,
1974
1974
  {
1975
1975
  existingShares: t,
@@ -2079,7 +2079,7 @@ function Rn({
2079
2079
  !r && l.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." })
2080
2080
  ] });
2081
2081
  }
2082
- const vt = () => [
2082
+ const xt = () => [
2083
2083
  { value: "VIEWER", label: "Viewer", description: "Can view only" },
2084
2084
  {
2085
2085
  value: "EDITOR",
@@ -2107,7 +2107,7 @@ function Ud({
2107
2107
  isUpdating: c = !1,
2108
2108
  isRemoving: o = !1
2109
2109
  }) {
2110
- const d = Ut(), u = vt().filter(
2110
+ const d = Ut(), u = xt().filter(
2111
2111
  (w) => w.value === "VIEWER" || w.value === "EDITOR" || w.value === "CONTRIBUTOR"
2112
2112
  ), m = n.role !== "NONE" ? n.role : "NONE", p = r ? r.newRole : m, h = n.role !== "NONE" && !i && (!r || r.newRole === m), f = r !== null && r.newRole !== m, v = i, g = m === "NONE" || !m, b = (w) => {
2113
2113
  switch (w) {
@@ -2264,7 +2264,7 @@ function xa(t) {
2264
2264
  resourceType: l = Ot.DASHBOARD,
2265
2265
  userType: r,
2266
2266
  tenantId: i
2267
- } = t, c = Qe(() => ({
2267
+ } = t, c = He(() => ({
2268
2268
  search: n,
2269
2269
  active: !0,
2270
2270
  // Only show active users
@@ -2390,7 +2390,7 @@ function $d({
2390
2390
  selectedUserObjects: S,
2391
2391
  onRemove: L,
2392
2392
  onRoleChange: E,
2393
- getRoleOptions: vt
2393
+ getRoleOptions: xt
2394
2394
  }
2395
2395
  ),
2396
2396
  /* @__PURE__ */ e(
@@ -2407,7 +2407,7 @@ function $d({
2407
2407
  usersToUpdate: v,
2408
2408
  allUsers: R,
2409
2409
  onRemove: O,
2410
- getRoleOptions: vt
2410
+ getRoleOptions: xt
2411
2411
  }
2412
2412
  ),
2413
2413
  /* @__PURE__ */ e(
@@ -2419,7 +2419,7 @@ function $d({
2419
2419
  resource: t,
2420
2420
  onShare: () => {
2421
2421
  },
2422
- getRoleOptions: vt,
2422
+ getRoleOptions: xt,
2423
2423
  allUsers: R,
2424
2424
  currentUser: s,
2425
2425
  handleUserToggle: L,
@@ -2504,7 +2504,7 @@ function Ar({
2504
2504
  children: [
2505
2505
  /* @__PURE__ */ a("div", { className: "flex items-center space-x-3", children: [
2506
2506
  /* @__PURE__ */ e(
2507
- He,
2507
+ Xe,
2508
2508
  {
2509
2509
  id: `group-${g.id}`,
2510
2510
  checked: T ? !w : y,
@@ -2874,7 +2874,7 @@ function ml({
2874
2874
  selectedUserObjects: X,
2875
2875
  onRemove: ($) => j($),
2876
2876
  onRoleChange: Z,
2877
- getRoleOptions: vt
2877
+ getRoleOptions: xt
2878
2878
  }
2879
2879
  ),
2880
2880
  /* @__PURE__ */ e(
@@ -2891,7 +2891,7 @@ function ml({
2891
2891
  usersToUpdate: h,
2892
2892
  allUsers: E,
2893
2893
  onRemove: B,
2894
- getRoleOptions: vt
2894
+ getRoleOptions: xt
2895
2895
  }
2896
2896
  ),
2897
2897
  /* @__PURE__ */ e(
@@ -2903,7 +2903,7 @@ function ml({
2903
2903
  resource: t,
2904
2904
  onShare: () => {
2905
2905
  },
2906
- getRoleOptions: vt,
2906
+ getRoleOptions: xt,
2907
2907
  allUsers: E,
2908
2908
  currentUser: s,
2909
2909
  handleUserToggle: j,
@@ -2928,7 +2928,7 @@ function ml({
2928
2928
  groupObjects: me,
2929
2929
  onRemove: ye,
2930
2930
  onRoleChange: ne,
2931
- getRoleOptions: vt
2931
+ getRoleOptions: xt
2932
2932
  }
2933
2933
  ),
2934
2934
  v.length > 0 && /* @__PURE__ */ a("div", { className: "space-y-1", children: [
@@ -2954,7 +2954,7 @@ function ml({
2954
2954
  existingGroupShares: Se,
2955
2955
  isLoading: C,
2956
2956
  resource: t,
2957
- getRoleOptions: vt,
2957
+ getRoleOptions: xt,
2958
2958
  currentUser: s,
2959
2959
  handleGroupToggle: ye,
2960
2960
  handleGroupRoleChange: ne,
@@ -3100,7 +3100,7 @@ function Yd({
3100
3100
  groupObjects: S,
3101
3101
  onRemove: L,
3102
3102
  onRoleChange: E,
3103
- getRoleOptions: vt
3103
+ getRoleOptions: xt
3104
3104
  }
3105
3105
  ),
3106
3106
  m.length > 0 && /* @__PURE__ */ a("div", { className: "space-y-1", children: [
@@ -3126,7 +3126,7 @@ function Yd({
3126
3126
  existingGroupShares: N,
3127
3127
  isLoading: k,
3128
3128
  resource: t,
3129
- getRoleOptions: vt,
3129
+ getRoleOptions: xt,
3130
3130
  currentUser: s,
3131
3131
  handleGroupToggle: L,
3132
3132
  handleGroupRoleChange: E,
@@ -3138,7 +3138,7 @@ function Yd({
3138
3138
  ] }) : null;
3139
3139
  }
3140
3140
  const Or = () => {
3141
- const t = Il(), n = Ut(), s = Na(), l = aa(), r = ya(), i = ba(), c = Ca(), o = wa(), d = Oa(), u = nn(), m = rn(), p = os(), h = Ol(), f = Qe(() => () => yi({
3141
+ const t = Il(), n = Ut(), s = Na(), l = aa(), r = ya(), i = ba(), c = Ca(), o = wa(), d = Oa(), u = nn(), m = rn(), p = os(), h = Ol(), f = He(() => () => yi({
3142
3142
  currentContext: t,
3143
3143
  currentMode: n,
3144
3144
  selectedUsers: s,
@@ -3165,7 +3165,7 @@ const Or = () => {
3165
3165
  m,
3166
3166
  p,
3167
3167
  h
3168
- ]), v = Qe(() => (b) => bi(b), []), g = Qe(() => {
3168
+ ]), v = He(() => (b) => bi(b), []), g = He(() => {
3169
3169
  if (!t || !n)
3170
3170
  return !1;
3171
3171
  switch (t) {
@@ -4343,7 +4343,7 @@ const Xd = async (t, n, s) => {
4343
4343
  }
4344
4344
  };
4345
4345
  function au() {
4346
- const { authToken: t, tokenProps: n } = Ke(), s = Et();
4346
+ const { authToken: t, tokenProps: n } = We(), s = Et();
4347
4347
  return cs({
4348
4348
  mutationFn: (l) => Xd(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", l),
4349
4349
  onSuccess: () => {
@@ -4357,7 +4357,7 @@ function au() {
4357
4357
  });
4358
4358
  }
4359
4359
  function su() {
4360
- const { authToken: t, tokenProps: n } = Ke(), s = Et();
4360
+ const { authToken: t, tokenProps: n } = We(), s = Et();
4361
4361
  return cs({
4362
4362
  mutationFn: (l) => Zd(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", l),
4363
4363
  onSuccess: (l, r) => {
@@ -4371,7 +4371,7 @@ function su() {
4371
4371
  });
4372
4372
  }
4373
4373
  function nu() {
4374
- const { authToken: t, tokenProps: n } = Ke(), s = Et();
4374
+ const { authToken: t, tokenProps: n } = We(), s = Et();
4375
4375
  return cs({
4376
4376
  mutationFn: ({
4377
4377
  groupId: l,
@@ -4390,7 +4390,7 @@ function nu() {
4390
4390
  });
4391
4391
  }
4392
4392
  function lu() {
4393
- const { authToken: t, tokenProps: n } = Ke(), s = Et();
4393
+ const { authToken: t, tokenProps: n } = We(), s = Et();
4394
4394
  return cs({
4395
4395
  mutationFn: ({
4396
4396
  groupId: l,
@@ -4523,7 +4523,7 @@ function iu({
4523
4523
  tenantId: s.tenantId || void 0,
4524
4524
  active: !0,
4525
4525
  limit: 100
4526
- }), w = nu(), P = lu(), T = (h == null ? void 0 : h.members) || [], D = Qe(() => new Set(T.map((E) => E.userId)), [T]), k = Qe(() => b.filter((E) => !D.has(E.id)), [b, D]), x = Qe(() => {
4526
+ }), w = nu(), P = lu(), T = (h == null ? void 0 : h.members) || [], D = He(() => new Set(T.map((E) => E.userId)), [T]), k = He(() => b.filter((E) => !D.has(E.id)), [b, D]), x = He(() => {
4527
4527
  if (!c) return k;
4528
4528
  const E = c.toLowerCase();
4529
4529
  return k.filter(
@@ -4532,7 +4532,7 @@ function iu({
4532
4532
  return ((A = M.name) == null ? void 0 : A.toLowerCase().includes(E)) || ((O = M.email) == null ? void 0 : O.toLowerCase().includes(E));
4533
4533
  }
4534
4534
  );
4535
- }, [k, c]), C = Qe(() => {
4535
+ }, [k, c]), C = He(() => {
4536
4536
  if (!c) return T;
4537
4537
  const E = c.toLowerCase();
4538
4538
  return T.filter(
@@ -4712,7 +4712,7 @@ function ou({
4712
4712
  className: "flex items-center gap-3 p-3 rounded-lg border bg-card hover:bg-muted/50 cursor-pointer",
4713
4713
  onClick: s,
4714
4714
  children: [
4715
- /* @__PURE__ */ e(He, { checked: n }),
4715
+ /* @__PURE__ */ e(Xe, { checked: n }),
4716
4716
  /* @__PURE__ */ e(Rl, { className: "h-8 w-8", children: /* @__PURE__ */ e(Fl, { className: "text-xs", children: l }) }),
4717
4717
  /* @__PURE__ */ a("div", { className: "flex-1", children: [
4718
4718
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: ((c = t.user) == null ? void 0 : c.name) || "Unknown User" }),
@@ -4735,7 +4735,7 @@ function cu({
4735
4735
  className: "flex items-center gap-3 p-3 rounded-lg border bg-card hover:bg-muted/50 cursor-pointer",
4736
4736
  onClick: s,
4737
4737
  children: [
4738
- /* @__PURE__ */ e(He, { checked: n }),
4738
+ /* @__PURE__ */ e(Xe, { checked: n }),
4739
4739
  /* @__PURE__ */ e(Rl, { className: "h-8 w-8", children: /* @__PURE__ */ e(Fl, { className: "text-xs", children: l }) }),
4740
4740
  /* @__PURE__ */ a("div", { className: "flex-1", children: [
4741
4741
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: t.name }),
@@ -4749,7 +4749,7 @@ function du({
4749
4749
  open: t,
4750
4750
  onOpenChange: n
4751
4751
  }) {
4752
- const [s, l] = _("groups"), [r, i] = _(""), [c, o] = _(null), [d, u] = _(!1), [m, p] = _(null), { tokenProps: h } = Ke(), { currentUser: f } = Rt(), v = su(), g = (f == null ? void 0 : f.type) === "tenant", b = h == null ? void 0 : h.tenantId, { groups: y, isLoading: w, refetch: P } = ki({
4752
+ const [s, l] = _("groups"), [r, i] = _(""), [c, o] = _(null), [d, u] = _(!1), [m, p] = _(null), { tokenProps: h } = We(), { currentUser: f } = Rt(), v = su(), g = (f == null ? void 0 : f.type) === "tenant", b = h == null ? void 0 : h.tenantId, { groups: y, isLoading: w, refetch: P } = ki({
4753
4753
  type: g ? "TENANT_GROUP" : "all",
4754
4754
  tenantId: g ? b : void 0,
4755
4755
  includeMembers: !1
@@ -5106,7 +5106,7 @@ function fu() {
5106
5106
  ]) };
5107
5107
  }
5108
5108
  function ra() {
5109
- const { authToken: t, tokenProps: n } = Ke(), s = Et(), l = us(), { selectVisual: r } = Ra(), {
5109
+ const { authToken: t, tokenProps: n } = We(), s = Et(), l = us(), { selectVisual: r } = Ra(), {
5110
5110
  setFrame: i,
5111
5111
  setCard: c,
5112
5112
  setIsDevMode: o,
@@ -5308,7 +5308,7 @@ function gu({
5308
5308
  /* @__PURE__ */ a("div", { className: "space-y-2", children: [
5309
5309
  /* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
5310
5310
  /* @__PURE__ */ e(
5311
- He,
5311
+ Xe,
5312
5312
  {
5313
5313
  id: "save-to-dashboard",
5314
5314
  checked: h,
@@ -5330,7 +5330,7 @@ function gu({
5330
5330
  ] }),
5331
5331
  /* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
5332
5332
  /* @__PURE__ */ e(
5333
- He,
5333
+ Xe,
5334
5334
  {
5335
5335
  id: "save-to-library",
5336
5336
  checked: m,
@@ -5793,7 +5793,7 @@ function ku() {
5793
5793
  authToken: t,
5794
5794
  tokenProps: n,
5795
5795
  id: s
5796
- } = Ke(), { isLocalDev: l, isConsoleMode: r } = Pa(), { permissions: i } = Nn(), c = Ai();
5796
+ } = We(), { isLocalDev: l, isConsoleMode: r } = Pa(), { permissions: i } = Nn(), c = Ai();
5797
5797
  H((W) => W.theme);
5798
5798
  const o = H((W) => W.lenses), d = H((W) => W.selectedLensId), u = o == null ? void 0 : o.find((W) => W.id === d), m = H((W) => W.dashboard);
5799
5799
  H((W) => W.selectedSheetId);
@@ -6055,7 +6055,7 @@ function ku() {
6055
6055
  );
6056
6056
  }
6057
6057
  function zn(t) {
6058
- const { tokenProps: n, authToken: s } = Ke(), l = n == null ? void 0 : n.apiServiceUrl;
6058
+ const { tokenProps: n, authToken: s } = We(), l = n == null ? void 0 : n.apiServiceUrl;
6059
6059
  return ms({
6060
6060
  queryKey: ["joinability-map", t],
6061
6061
  queryFn: async () => {
@@ -6838,8 +6838,8 @@ function Mu({
6838
6838
  onClick: D,
6839
6839
  children: [
6840
6840
  R(t.dataType),
6841
- /* @__PURE__ */ e(xt, { children: /* @__PURE__ */ a(Je, { children: [
6842
- /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ e("div", { className: "min-w-0 flex-1 overflow-hidden", children: /* @__PURE__ */ e(
6841
+ /* @__PURE__ */ e(gt, { children: /* @__PURE__ */ a(Ke, { children: [
6842
+ /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e("div", { className: "min-w-0 flex-1 overflow-hidden", children: /* @__PURE__ */ e(
6843
6843
  "span",
6844
6844
  {
6845
6845
  className: `block text-sm text-foreground/80 hover:text-foreground dark:text-muted-foreground ${g ? "whitespace-normal break-words" : "truncate"}`,
@@ -6847,7 +6847,7 @@ function Mu({
6847
6847
  }
6848
6848
  ) }) }),
6849
6849
  /* @__PURE__ */ e(
6850
- Xe,
6850
+ Qe,
6851
6851
  {
6852
6852
  side: "bottom",
6853
6853
  align: "start",
@@ -8162,8 +8162,8 @@ ${b.joinType} JOIN ${y.name}
8162
8162
  };
8163
8163
  return c.length < 2 ? null : /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e("div", { className: "space-y-4", children: /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
8164
8164
  l.joins.length > 0 && /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
8165
- /* @__PURE__ */ e(xt, { children: /* @__PURE__ */ a(Je, { children: [
8166
- /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ a(
8165
+ /* @__PURE__ */ e(gt, { children: /* @__PURE__ */ a(Ke, { children: [
8166
+ /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ a(
8167
8167
  V,
8168
8168
  {
8169
8169
  variant: "outline",
@@ -8189,7 +8189,7 @@ ${b.joinType} JOIN ${y.name}
8189
8189
  }
8190
8190
  ) }),
8191
8191
  /* @__PURE__ */ e(
8192
- Xe,
8192
+ Qe,
8193
8193
  {
8194
8194
  side: "right",
8195
8195
  className: "max-w-md overflow-hidden p-0",
@@ -8205,8 +8205,8 @@ ${b.joinType} JOIN ${y.name}
8205
8205
  }
8206
8206
  )
8207
8207
  ] }) }),
8208
- (n == null ? void 0 : n.autoResolved) && /* @__PURE__ */ e(xt, { children: /* @__PURE__ */ a(Je, { children: [
8209
- /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ a(
8208
+ (n == null ? void 0 : n.autoResolved) && /* @__PURE__ */ e(gt, { children: /* @__PURE__ */ a(Ke, { children: [
8209
+ /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ a(
8210
8210
  re,
8211
8211
  {
8212
8212
  variant: "secondary",
@@ -8217,7 +8217,7 @@ ${b.joinType} JOIN ${y.name}
8217
8217
  ]
8218
8218
  }
8219
8219
  ) }),
8220
- /* @__PURE__ */ e(Xe, { side: "right", children: /* @__PURE__ */ a("div", { className: "space-y-1", children: [
8220
+ /* @__PURE__ */ e(Qe, { side: "right", children: /* @__PURE__ */ a("div", { className: "space-y-1", children: [
8221
8221
  /* @__PURE__ */ e("p", { className: "text-xs font-medium", children: "Auto-resolved using relationships:" }),
8222
8222
  /* @__PURE__ */ e("div", { className: "flex flex-wrap gap-1", children: n.relationshipsUsed.map(
8223
8223
  (f, v) => /* @__PURE__ */ e(
@@ -8379,7 +8379,7 @@ function Pu({
8379
8379
  ),
8380
8380
  children: [
8381
8381
  /* @__PURE__ */ e(
8382
- He,
8382
+ Xe,
8383
8383
  {
8384
8384
  checked: v(g),
8385
8385
  onCheckedChange: () => o(g)
@@ -8421,7 +8421,7 @@ function Lu({
8421
8421
  const r = Yl(t).slice(0, s), i = r.find(
8422
8422
  (o) => o.label === "Description"
8423
8423
  ), c = r.filter((o) => o.label === "Description" ? !1 : !["Connection", "Database", "Schema"].includes(o.label));
8424
- return /* @__PURE__ */ e(Xe, { side: "top", className: "ml-5 max-w-xs", children: /* @__PURE__ */ a("div", { className: "space-y-2", children: [
8424
+ return /* @__PURE__ */ e(Qe, { side: "top", className: "ml-5 max-w-xs", children: /* @__PURE__ */ a("div", { className: "space-y-2", children: [
8425
8425
  /* @__PURE__ */ e("div", { className: "text-sm font-medium", children: n || yn(t) }),
8426
8426
  i && /* @__PURE__ */ a("div", { className: "border-t border-border pt-2", children: [
8427
8427
  /* @__PURE__ */ e("div", { className: "mb-1 text-xs text-muted-foreground", children: "Description:" }),
@@ -8439,7 +8439,7 @@ function Lu({
8439
8439
  function zu({
8440
8440
  entities: t
8441
8441
  }) {
8442
- return /* @__PURE__ */ e(Xe, { side: "top", className: "ml-5 max-w-xs", children: /* @__PURE__ */ a("div", { className: "space-y-2", children: [
8442
+ return /* @__PURE__ */ e(Qe, { side: "top", className: "ml-5 max-w-xs", children: /* @__PURE__ */ a("div", { className: "space-y-2", children: [
8443
8443
  /* @__PURE__ */ a("div", { className: "text-sm font-medium", children: [
8444
8444
  t.length,
8445
8445
  " more entities"
@@ -8564,9 +8564,9 @@ function _r({
8564
8564
  {
8565
8565
  className: `overflow-hidden px-6 ${c ? "max-h-96 space-y-4" : "max-h-0 py-0 opacity-0"}`,
8566
8566
  children: [
8567
- p.selectedEntities.length > 0 && /* @__PURE__ */ e(xt, { children: /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-1", children: [
8568
- p.selectedEntities.slice(0, 3).map((h, f) => /* @__PURE__ */ a(Je, { children: [
8569
- /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ a(
8567
+ p.selectedEntities.length > 0 && /* @__PURE__ */ e(gt, { children: /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-1", children: [
8568
+ p.selectedEntities.slice(0, 3).map((h, f) => /* @__PURE__ */ a(Ke, { children: [
8569
+ /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ a(
8570
8570
  re,
8571
8571
  {
8572
8572
  variant: "secondary",
@@ -8596,8 +8596,8 @@ function _r({
8596
8596
  ) }),
8597
8597
  /* @__PURE__ */ e(Lu, { entity: h })
8598
8598
  ] }, `${h.type}-${h.name}-${f}`)),
8599
- p.selectedEntities.length > 3 && /* @__PURE__ */ a(Je, { children: [
8600
- /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ a(re, { variant: "outline", className: "text-xs", children: [
8599
+ p.selectedEntities.length > 3 && /* @__PURE__ */ a(Ke, { children: [
8600
+ /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ a(re, { variant: "outline", className: "text-xs", children: [
8601
8601
  "+",
8602
8602
  p.selectedEntities.length - 3,
8603
8603
  " more"
@@ -9252,7 +9252,7 @@ function qu({ card: t }) {
9252
9252
  var P, T, D, k, x, C, N, R, S, L, E;
9253
9253
  const [n, s] = _(!1), [l, r] = _(
9254
9254
  []
9255
- ), { authToken: i } = Ke(), { theme: c } = Bs(), o = to(i == null ? void 0 : i.accessToken), d = H((M) => M.themeStyle), u = {
9255
+ ), { authToken: i } = We(), { theme: c } = Bs(), o = to(i == null ? void 0 : i.accessToken), d = H((M) => M.themeStyle), u = {
9256
9256
  mode: c || "system",
9257
9257
  colors: ((T = (P = d == null ? void 0 : d.chart) == null ? void 0 : P.dataset) == null ? void 0 : T.backgroundColor) || []
9258
9258
  };
@@ -9341,7 +9341,7 @@ function Gr({
9341
9341
  ...n
9342
9342
  }) {
9343
9343
  var C;
9344
- const s = I((N) => N.card), l = Fa(s.config), r = ((C = s.customCardPreferences) == null ? void 0 : C.showCardHeader) ?? !0, i = I((N) => N.frame), c = H((N) => N.dashboard.filters), o = I((N) => N.actions.setRunSql), { updateFilter: d } = ht(), u = c == null ? void 0 : c.find((N) => N.id === i.filterId), { data: m, isLoading: p, isFetching: h, errorMessage: f, pagination: v } = _e(s), { setCard: g, updateCardInFrame: b } = ie(), { data: y } = Cn(s), w = Qe(() => {
9344
+ const s = I((N) => N.card), l = Fa(s.config), r = ((C = s.customCardPreferences) == null ? void 0 : C.showCardHeader) ?? !0, i = I((N) => N.frame), c = H((N) => N.dashboard.filters), o = I((N) => N.actions.setRunSql), { updateFilter: d } = ht(), u = c == null ? void 0 : c.find((N) => N.id === i.filterId), { data: m, isLoading: p, isFetching: h, errorMessage: f, pagination: v } = _e(s), { setCard: g, updateCardInFrame: b } = ie(), { data: y } = Cn(s), w = He(() => {
9345
9345
  var N;
9346
9346
  return s.type !== "pivotTable" || !((N = m == null ? void 0 : m.records) != null && N.length) ? null : {
9347
9347
  records: m.records,
@@ -9368,7 +9368,7 @@ function Gr({
9368
9368
  }
9369
9369
  };
9370
9370
  g(S), b(S), s.sql && ((E = (L = s.preferences) == null ? void 0 : L.tablePrefs) != null && E.enableDevModePagination) && o(!0);
9371
- }, D = Qe(() => !s.id || !(m != null && m.records) ? null : Wl({
9371
+ }, D = He(() => !s.id || !(m != null && m.records) ? null : Wl({
9372
9372
  card: s,
9373
9373
  data: m == null ? void 0 : m.records,
9374
9374
  cardType: s.type,
@@ -9728,7 +9728,7 @@ function Ts(t) {
9728
9728
  return n;
9729
9729
  }
9730
9730
  function Br() {
9731
- const { authToken: t, tokenProps: n } = Ke(), { data: s, isLoading: l, isFetching: r, isError: i } = ms({
9731
+ const { authToken: t, tokenProps: n } = We(), { data: s, isLoading: l, isFetching: r, isError: i } = ms({
9732
9732
  queryKey: ["plugins", t == null ? void 0 : t.accessToken],
9733
9733
  queryFn: () => po(n.apiServiceUrl, t == null ? void 0 : t.accessToken)
9734
9734
  // staleTime: Infinity,
@@ -10632,7 +10632,7 @@ function gl({
10632
10632
  ] }),
10633
10633
  n.type === "table" && n.sql && !Fa(n.config) && /* @__PURE__ */ a("div", { className: "mr-2 flex items-center gap-3", children: [
10634
10634
  /* @__PURE__ */ e(
10635
- He,
10635
+ Xe,
10636
10636
  {
10637
10637
  id: "pagination",
10638
10638
  checked: ((x = (k = n.preferences) == null ? void 0 : k.tablePrefs) == null ? void 0 : x.enableDevModePagination) ?? !1,
@@ -11025,7 +11025,7 @@ function ia() {
11025
11025
  children: /* @__PURE__ */ a("div", { className: "grow", children: [
11026
11026
  /* @__PURE__ */ a("div", { className: "flex items-center space-x-2 py-2", children: [
11027
11027
  /* @__PURE__ */ e(
11028
- He,
11028
+ Xe,
11029
11029
  {
11030
11030
  checked: !!((p = s == null ? void 0 : s.onClickFilter) != null && p.find(
11031
11031
  (f) => f.columnIndex === m
@@ -11189,8 +11189,8 @@ function jn({
11189
11189
  className: n,
11190
11190
  delayDuration: s
11191
11191
  }) {
11192
- return /* @__PURE__ */ e(xt, { children: /* @__PURE__ */ a(Je, { delayDuration: s, children: [
11193
- /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ e(
11192
+ return /* @__PURE__ */ e(gt, { children: /* @__PURE__ */ a(Ke, { delayDuration: s, children: [
11193
+ /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e(
11194
11194
  "span",
11195
11195
  {
11196
11196
  className: q(
@@ -11200,7 +11200,7 @@ function jn({
11200
11200
  children: t
11201
11201
  }
11202
11202
  ) }),
11203
- /* @__PURE__ */ e(Xe, { children: t })
11203
+ /* @__PURE__ */ e(Qe, { children: t })
11204
11204
  ] }) });
11205
11205
  }
11206
11206
  function Wr() {
@@ -11808,7 +11808,7 @@ function xm() {
11808
11808
  return /* @__PURE__ */ a("div", { children: [
11809
11809
  !l && /* @__PURE__ */ a("div", { className: "mb-3 flex items-center gap-2", children: [
11810
11810
  /* @__PURE__ */ e(
11811
- He,
11811
+ Xe,
11812
11812
  {
11813
11813
  checked: !!((m = t == null ? void 0 : t.formatNumber) != null && m.enabled),
11814
11814
  onCheckedChange: (g) => {
@@ -12467,7 +12467,7 @@ function Dm({
12467
12467
  ] })
12468
12468
  ] }) }),
12469
12469
  /* @__PURE__ */ a("div", { className: "flex items-center space-x-2", children: [
12470
- /* @__PURE__ */ e(He, { onCheckedChange: (r) => {
12470
+ /* @__PURE__ */ e(Xe, { onCheckedChange: (r) => {
12471
12471
  s({
12472
12472
  ...n,
12473
12473
  allowDownload: r
@@ -12701,7 +12701,7 @@ function ei() {
12701
12701
  return (M = E.card) == null ? void 0 : M.preferences;
12702
12702
  }), { setCardPreferences: s, updateCardInFrame: l } = ie(), { data: r } = _e(t), [i, c] = _({}), [o, d] = _(
12703
12703
  null
12704
- ), [u, m] = _(null), p = Qe(() => {
12704
+ ), [u, m] = _(null), p = He(() => {
12705
12705
  var O, F, z, j, Z, J, G;
12706
12706
  if (!(r != null && r.records) || r.records.length === 0) return [];
12707
12707
  const E = (t == null ? void 0 : t.type) === "stackedBar" || (t == null ? void 0 : t.type) === "stackedLine", M = (t == null ? void 0 : t.type) === "bar" || (t == null ? void 0 : t.type) === "line", A = ((O = t == null ? void 0 : t.config) == null ? void 0 : O.pivotByColumns) && t.config.pivotByColumns.length > 0;
@@ -12746,7 +12746,7 @@ function ei() {
12746
12746
  (T = t == null ? void 0 : t.config) == null ? void 0 : T.pivotByColumns,
12747
12747
  (D = t == null ? void 0 : t.config) == null ? void 0 : D.metricColumns,
12748
12748
  t == null ? void 0 : t.type
12749
- ]), h = Qe(() => Oo(), []);
12749
+ ]), h = He(() => Oo(), []);
12750
12750
  Ne(() => {
12751
12751
  const E = {};
12752
12752
  p.forEach((M, A) => {
@@ -14019,7 +14019,7 @@ function jm(t) {
14019
14019
  ll(
14020
14020
  (Y) => Y.currentAIContext
14021
14021
  );
14022
- const [n, s] = _(""), [l, r] = _(null), { authToken: i, tokenProps: c } = Ke(), o = I((Y) => {
14022
+ const [n, s] = _(""), [l, r] = _(null), { authToken: i, tokenProps: c } = We(), o = I((Y) => {
14023
14023
  var me;
14024
14024
  return (me = Y == null ? void 0 : Y.card) == null ? void 0 : me.sql;
14025
14025
  }), d = I((Y) => Y.isDevMode), u = I((Y) => {
@@ -14102,8 +14102,8 @@ function jm(t) {
14102
14102
  async function ve({ toolCall: Y }) {
14103
14103
  var me, Re, Se, Ze, Pe, te, W, $, ce, Me, Fe, be, Le, Ye, oa, ca;
14104
14104
  if (["createChartFromSql", "createForecast"].includes(Y.toolName)) {
14105
- const Lt = ((me = Y.input) == null ? void 0 : me.sql) ?? ((Re = Y.args) == null ? void 0 : Re.sql), gt = ((Se = Y.input) == null ? void 0 : Se.python) ?? ((Ze = Y.args) == null ? void 0 : Ze.python), le = ((Pe = Y.input) == null ? void 0 : Pe.chartType) ?? ((te = Y.args) == null ? void 0 : te.chartType);
14106
- f(le), p(Lt), m(gt), h(!0), B({
14105
+ const Lt = ((me = Y.input) == null ? void 0 : me.sql) ?? ((Re = Y.args) == null ? void 0 : Re.sql), vt = ((Se = Y.input) == null ? void 0 : Se.python) ?? ((Ze = Y.args) == null ? void 0 : Ze.python), le = ((Pe = Y.input) == null ? void 0 : Pe.chartType) ?? ((te = Y.args) == null ? void 0 : te.chartType);
14106
+ f(le), p(Lt), m(vt), h(!0), B({
14107
14107
  tool: Y.toolName,
14108
14108
  toolCallId: Y.toolCallId,
14109
14109
  output: {
@@ -14134,8 +14134,8 @@ function jm(t) {
14134
14134
  });
14135
14135
  } else if (Y.toolName === "generateQueryConfig") {
14136
14136
  s("Generating query config...");
14137
- const Lt = ((W = Y.input) == null ? void 0 : W.chartType) ?? (($ = Y.args) == null ? void 0 : $.chartType), gt = ((ce = Y.input) == null ? void 0 : ce.queryConfig) ?? ((Me = Y.args) == null ? void 0 : Me.queryConfig);
14138
- ((Fe = Y.input) == null ? void 0 : Fe.cardConfig) ?? ((be = Y.args) == null || be.cardConfig), f(Lt), E(gt), p(void 0), m(void 0);
14137
+ const Lt = ((W = Y.input) == null ? void 0 : W.chartType) ?? (($ = Y.args) == null ? void 0 : $.chartType), vt = ((ce = Y.input) == null ? void 0 : ce.queryConfig) ?? ((Me = Y.args) == null ? void 0 : Me.queryConfig);
14138
+ ((Fe = Y.input) == null ? void 0 : Fe.cardConfig) ?? ((be = Y.args) == null || be.cardConfig), f(Lt), E(vt), p(void 0), m(void 0);
14139
14139
  const le = await N();
14140
14140
  if ((Le = le == null ? void 0 : le.data) != null && Le.error) {
14141
14141
  B({
@@ -14143,7 +14143,7 @@ function jm(t) {
14143
14143
  toolCallId: Y.toolCallId,
14144
14144
  output: {
14145
14145
  status: "error",
14146
- queryConfig: gt,
14146
+ queryConfig: vt,
14147
14147
  message: (Ye = le == null ? void 0 : le.data) == null ? void 0 : Ye.error.message
14148
14148
  }
14149
14149
  });
@@ -14155,7 +14155,7 @@ function jm(t) {
14155
14155
  toolCallId: Y.toolCallId,
14156
14156
  output: {
14157
14157
  status: "success",
14158
- queryConfig: gt,
14158
+ queryConfig: vt,
14159
14159
  message: "The data has been visualized"
14160
14160
  }
14161
14161
  });
@@ -14166,7 +14166,7 @@ function jm(t) {
14166
14166
  toolCallId: Y.toolCallId,
14167
14167
  output: {
14168
14168
  status: "success",
14169
- queryConfig: gt,
14169
+ queryConfig: vt,
14170
14170
  message: "The data has been visualized",
14171
14171
  records: (ca = le == null ? void 0 : le.data) == null ? void 0 : ca.records
14172
14172
  }
@@ -14438,7 +14438,7 @@ function yl({
14438
14438
  function ca() {
14439
14439
  return /* @__PURE__ */ e("div", { "data-role": "header", children: /* @__PURE__ */ e("div", { className: "text-lg font-semibold", children: "Assistant" }) });
14440
14440
  }
14441
- const Lt = (B == null ? void 0 : B.length) === 0 && (M == null ? void 0 : M.filter((le) => le.role === "user").length) === 0, gt = /* @__PURE__ */ a(
14441
+ const Lt = (B == null ? void 0 : B.length) === 0 && (M == null ? void 0 : M.filter((le) => le.role === "user").length) === 0, vt = /* @__PURE__ */ a(
14442
14442
  "div",
14443
14443
  {
14444
14444
  "data-role": "editor-assistant",
@@ -14629,9 +14629,9 @@ function yl({
14629
14629
  }
14630
14630
  );
14631
14631
  return v && s ? Uc(
14632
- /* @__PURE__ */ e("div", { className: "pointer-events-auto absolute inset-0 z-50 flex bg-background px-6 pb-6 pt-[calc(var(--app-header-height,15px)+1rem)]", children: /* @__PURE__ */ e("div", { className: "flex h-full w-full", children: gt }) }),
14632
+ /* @__PURE__ */ e("div", { className: "pointer-events-auto absolute inset-0 z-50 flex bg-background px-6 pb-6 pt-[calc(var(--app-header-height,15px)+1rem)]", children: /* @__PURE__ */ e("div", { className: "flex h-full w-full", children: vt }) }),
14633
14633
  s
14634
- ) : gt;
14634
+ ) : vt;
14635
14635
  }
14636
14636
  function $n(t, n) {
14637
14637
  const [s, l] = _(() => {
@@ -14667,8 +14667,8 @@ const bl = ({
14667
14667
  l ? /* @__PURE__ */ e(l, { className: "h-4 w-4" }) : i || /* @__PURE__ */ e("div", { className: "flex h-4 w-4 items-center justify-center rounded bg-muted text-xs font-medium", children: r }),
14668
14668
  /* @__PURE__ */ e("span", { children: t.name })
14669
14669
  ] }),
14670
- /* @__PURE__ */ a(Je, { children: [
14671
- /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ e(
14670
+ /* @__PURE__ */ a(Ke, { children: [
14671
+ /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e(
14672
14672
  "span",
14673
14673
  {
14674
14674
  tabIndex: 0,
@@ -14676,7 +14676,7 @@ const bl = ({
14676
14676
  children: /* @__PURE__ */ e(Aa, { className: "ml-1 h-3.5 w-3.5 text-muted-foreground" })
14677
14677
  }
14678
14678
  ) }),
14679
- /* @__PURE__ */ e(Xe, { side: "right", children: t.pluginName })
14679
+ /* @__PURE__ */ e(Qe, { side: "right", children: t.pluginName })
14680
14680
  ] })
14681
14681
  ] })
14682
14682
  },
@@ -14698,7 +14698,7 @@ function Bm({
14698
14698
  Pn(c);
14699
14699
  const { setCardType: o, setCardPreferences: d, setIsDevMode: u } = I(
14700
14700
  (D) => D.actions
14701
- ), { setCardCustomCfg: m, setCustomCardPreferences: p, setQueryConfig: h } = ie(), [f, v] = $n("chart-section-active", null), g = Qe(() => f ? [
14701
+ ), { setCardCustomCfg: m, setCustomCardPreferences: p, setQueryConfig: h } = ie(), [f, v] = $n("chart-section-active", null), g = He(() => f ? [
14702
14702
  f,
14703
14703
  ...Cl.filter((D) => D !== f)
14704
14704
  ] : Cl, [f]);
@@ -14770,9 +14770,9 @@ function Bm({
14770
14770
  da,
14771
14771
  {
14772
14772
  heading: /* @__PURE__ */ a("div", { className: "group flex w-full items-center justify-between", children: [
14773
- /* @__PURE__ */ a(Je, { children: [
14774
- /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "flex items-center gap-2", children: "Default Visuals" }) }),
14775
- /* @__PURE__ */ e(Xe, { side: "right", children: "These are the standard visuals available in Semaphor" })
14773
+ /* @__PURE__ */ a(Ke, { children: [
14774
+ /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "flex items-center gap-2", children: "Default Visuals" }) }),
14775
+ /* @__PURE__ */ e(Qe, { side: "right", children: "These are the standard visuals available in Semaphor" })
14776
14776
  ] }),
14777
14777
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
14778
14778
  /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100", children: "Show on top" }),
@@ -14851,12 +14851,12 @@ function Bm({
14851
14851
  da,
14852
14852
  {
14853
14853
  heading: /* @__PURE__ */ a("div", { className: "group flex w-full items-center justify-between", children: [
14854
- /* @__PURE__ */ a(Je, { children: [
14855
- /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ a("span", { className: "flex items-center gap-2", children: [
14854
+ /* @__PURE__ */ a(Ke, { children: [
14855
+ /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ a("span", { className: "flex items-center gap-2", children: [
14856
14856
  "Custom Visuals",
14857
14857
  /* @__PURE__ */ e(Aa, { className: "h-3.5 w-3.5 text-muted-foreground" })
14858
14858
  ] }) }),
14859
- /* @__PURE__ */ e(Xe, { side: "right", children: "External visuals that are specific to your project" })
14859
+ /* @__PURE__ */ e(Qe, { side: "right", children: "External visuals that are specific to your project" })
14860
14860
  ] }),
14861
14861
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
14862
14862
  /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground opacity-0 transition-opacity group-hover:opacity-100", children: "Show on top" }),
@@ -14920,8 +14920,8 @@ function Km({
14920
14920
  if (i.requiresPivot && !l)
14921
14921
  return null;
14922
14922
  const c = i.icon, o = t === i.id;
14923
- return /* @__PURE__ */ a(Je, { children: [
14924
- /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ a(
14923
+ return /* @__PURE__ */ a(Ke, { children: [
14924
+ /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ a(
14925
14925
  V,
14926
14926
  {
14927
14927
  variant: "ghost",
@@ -14937,7 +14937,7 @@ function Km({
14937
14937
  ]
14938
14938
  }
14939
14939
  ) }),
14940
- /* @__PURE__ */ e(Xe, { side: "bottom", children: /* @__PURE__ */ e("p", { children: i.label }) })
14940
+ /* @__PURE__ */ e(Qe, { side: "bottom", children: /* @__PURE__ */ e("p", { children: i.label }) })
14941
14941
  ] }, i.id);
14942
14942
  }) });
14943
14943
  }
@@ -15157,7 +15157,7 @@ function Hm({
15157
15157
  searchQuery: n = "",
15158
15158
  limit: s = 500
15159
15159
  }) {
15160
- const { authToken: l, tokenProps: r } = Ke(), i = I((u) => u.card), c = i == null ? void 0 : i.dataSource, o = [
15160
+ const { authToken: l, tokenProps: r } = We(), i = I((u) => u.card), c = i == null ? void 0 : i.dataSource, o = [
15161
15161
  "attribute-values",
15162
15162
  t.entityName,
15163
15163
  t.name,
@@ -15451,7 +15451,7 @@ function Zm({
15451
15451
  o || d ? /* @__PURE__ */ e("div", { className: "flex items-center justify-center py-8", children: /* @__PURE__ */ e(Ae, { className: "h-6 w-6 animate-spin" }) }) : /* @__PURE__ */ a("div", { className: "space-y-2", children: [
15452
15452
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2 pb-2 border-b", children: [
15453
15453
  /* @__PURE__ */ e(
15454
- He,
15454
+ Xe,
15455
15455
  {
15456
15456
  checked: n.length === u.length && u.length > 0,
15457
15457
  onCheckedChange: p
@@ -15470,7 +15470,7 @@ function Zm({
15470
15470
  onClick: () => m(h.value),
15471
15471
  children: [
15472
15472
  /* @__PURE__ */ e(
15473
- He,
15473
+ Xe,
15474
15474
  {
15475
15475
  checked: n.includes(h.value),
15476
15476
  onCheckedChange: () => m(h.value)
@@ -15627,7 +15627,7 @@ function eh({
15627
15627
  className: "max-w-[270px] cursor-default overflow-hidden text-ellipsis whitespace-nowrap px-0.5 text-xs text-gray-500",
15628
15628
  children: `${t.entityName}.${t.name}`
15629
15629
  }
15630
- ), gt = () => Fe ? /* @__PURE__ */ a("div", { className: "space-y-1", children: [
15630
+ ), vt = () => Fe ? /* @__PURE__ */ a("div", { className: "space-y-1", children: [
15631
15631
  /* @__PURE__ */ e(U, { className: "text-xs font-medium text-muted-foreground", children: "Label" }),
15632
15632
  /* @__PURE__ */ e(
15633
15633
  It,
@@ -15818,10 +15818,10 @@ function eh({
15818
15818
  Q.field.label,
15819
15819
  ":"
15820
15820
  ] }),
15821
- /* @__PURE__ */ e(xt, { children: /* @__PURE__ */ a(Je, { children: [
15822
- /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "cursor-help text-muted-foreground", children: Array.isArray(Q.value) ? Q.value.length === 1 ? String(Q.value[0]) : Q.value.length <= 2 ? Q.value.join(", ") : `${Q.value.slice(0, 2).join(", ")} +${Q.value.length - 2}` : String(Q.value) }) }),
15821
+ /* @__PURE__ */ e(gt, { children: /* @__PURE__ */ a(Ke, { children: [
15822
+ /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e("span", { className: "cursor-help text-muted-foreground", children: Array.isArray(Q.value) ? Q.value.length === 1 ? String(Q.value[0]) : Q.value.length <= 2 ? Q.value.join(", ") : `${Q.value.slice(0, 2).join(", ")} +${Q.value.length - 2}` : String(Q.value) }) }),
15823
15823
  Array.isArray(Q.value) && Q.value.length > 1 && /* @__PURE__ */ e(
15824
- Xe,
15824
+ Qe,
15825
15825
  {
15826
15826
  side: "top",
15827
15827
  className: "max-w-[300px]",
@@ -15932,12 +15932,12 @@ function eh({
15932
15932
  children: oc(t)
15933
15933
  }
15934
15934
  ),
15935
- n === "metrics" && ((Kn = ae == null ? void 0 : ae.conditions) == null ? void 0 : Kn.length) && !R && /* @__PURE__ */ e(xt, { children: /* @__PURE__ */ a(Je, { children: [
15936
- /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ a("div", { className: "flex items-center gap-1 rounded bg-primary/10 px-1.5 py-0.5 text-xs", children: [
15935
+ n === "metrics" && ((Kn = ae == null ? void 0 : ae.conditions) == null ? void 0 : Kn.length) && !R && /* @__PURE__ */ e(gt, { children: /* @__PURE__ */ a(Ke, { children: [
15936
+ /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ a("div", { className: "flex items-center gap-1 rounded bg-primary/10 px-1.5 py-0.5 text-xs", children: [
15937
15937
  /* @__PURE__ */ e(es, { className: "h-3 w-3" }),
15938
15938
  /* @__PURE__ */ e("span", { children: ae.conditions.length })
15939
15939
  ] }) }),
15940
- /* @__PURE__ */ e(Xe, { side: "top", children: /* @__PURE__ */ e("div", { className: "text-xs", children: ae.conditions.map((Q) => /* @__PURE__ */ a("div", { children: [
15940
+ /* @__PURE__ */ e(Qe, { side: "top", children: /* @__PURE__ */ e("div", { className: "text-xs", children: ae.conditions.map((Q) => /* @__PURE__ */ a("div", { children: [
15941
15941
  Q.field.label,
15942
15942
  ":",
15943
15943
  " ",
@@ -15996,7 +15996,7 @@ function eh({
15996
15996
  ] }),
15997
15997
  R && /* @__PURE__ */ a("div", { className: "space-y-3", children: [
15998
15998
  Lt(),
15999
- gt(),
15999
+ vt(),
16000
16000
  c === "kpi" && le(),
16001
16001
  et(),
16002
16002
  ka(),
@@ -16039,9 +16039,9 @@ function eh({
16039
16039
  ] });
16040
16040
  }
16041
16041
  function th({ concept: t }) {
16042
- return /* @__PURE__ */ e(xt, { children: /* @__PURE__ */ a(Je, { delayDuration: 300, children: [
16043
- /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ e(cc, { className: "size-4 text-muted-foreground hover:text-foreground" }) }),
16044
- /* @__PURE__ */ e(Xe, { side: "right", align: "start", className: "p-3", children: (() => {
16042
+ return /* @__PURE__ */ e(gt, { children: /* @__PURE__ */ a(Ke, { delayDuration: 300, children: [
16043
+ /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e(cc, { className: "size-4 text-muted-foreground hover:text-foreground" }) }),
16044
+ /* @__PURE__ */ e(Qe, { side: "right", align: "start", className: "p-3", children: (() => {
16045
16045
  switch (t) {
16046
16046
  case "groupBy":
16047
16047
  return /* @__PURE__ */ a("div", { className: "w-64 space-y-2", children: [
@@ -16434,7 +16434,7 @@ function sh() {
16434
16434
  ] }),
16435
16435
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
16436
16436
  /* @__PURE__ */ e(
16437
- He,
16437
+ Xe,
16438
16438
  {
16439
16439
  id: "show-arrow",
16440
16440
  checked: i.showArrow !== !1,
@@ -16452,7 +16452,7 @@ function sh() {
16452
16452
  ] }),
16453
16453
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
16454
16454
  /* @__PURE__ */ e(
16455
- He,
16455
+ Xe,
16456
16456
  {
16457
16457
  id: "show-color",
16458
16458
  checked: i.showColor !== !1,
@@ -16514,7 +16514,7 @@ function sh() {
16514
16514
  /* @__PURE__ */ e(U, { className: "text-xs font-medium uppercase text-muted-foreground", children: "Label" }),
16515
16515
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
16516
16516
  /* @__PURE__ */ e(
16517
- He,
16517
+ Xe,
16518
16518
  {
16519
16519
  id: "conditional-label",
16520
16520
  checked: i.conditionalLabel || !1,
@@ -16784,101 +16784,102 @@ function lh({
16784
16784
  );
16785
16785
  }
16786
16786
  function rh({ onEditJoins: t }) {
16787
- const n = I((m) => m.card), { autoJoinMetadata: s } = _e(n), [l, r] = _(!0);
16787
+ const n = I((o) => o.card), { autoJoinMetadata: s } = _e(n);
16788
16788
  if (!(s != null && s.autoResolved))
16789
16789
  return null;
16790
- const { resolvedJoinPlan: i, relationshipsUsed: c } = s, o = (i == null ? void 0 : i.joins) || [];
16791
- if (o.length === 0)
16790
+ const { resolvedJoinPlan: l } = s, r = (l == null ? void 0 : l.joins) || [];
16791
+ if (r.length === 0)
16792
16792
  return null;
16793
- const d = (m) => !m || m.length === 0 ? "No conditions" : m.map((p) => {
16794
- var g, b, y, w;
16795
- const h = `${(g = p.source) == null ? void 0 : g.entityName}.${(b = p.source) == null ? void 0 : b.name}`, f = `${(y = p.target) == null ? void 0 : y.entityName}.${(w = p.target) == null ? void 0 : w.name}`, v = p.operator || "=";
16796
- return `${h} ${v} ${f}`;
16797
- }).join(" AND "), u = (m) => !m.joinKeyGroups || m.joinKeyGroups.length === 0 ? "No conditions defined" : m.joinKeyGroups.length === 1 ? d(m.joinKeyGroups[0].keys) : m.joinKeyGroups.map((p, h) => ({
16798
- id: h,
16799
- operator: p.operator,
16800
- condition: d(p.keys)
16793
+ const i = (o) => !o || o.length === 0 ? "No conditions" : o.map((d) => {
16794
+ var h, f, v, g;
16795
+ const u = `${(h = d.source) == null ? void 0 : h.entityName}.${(f = d.source) == null ? void 0 : f.name}`, m = `${(v = d.target) == null ? void 0 : v.entityName}.${(g = d.target) == null ? void 0 : g.name}`, p = d.operator || "=";
16796
+ return `${u} ${p} ${m}`;
16797
+ }).join(" AND "), c = (o) => !o.joinKeyGroups || o.joinKeyGroups.length === 0 ? "No conditions defined" : o.joinKeyGroups.length === 1 ? i(o.joinKeyGroups[0].keys) : o.joinKeyGroups.map((d, u) => ({
16798
+ id: u,
16799
+ operator: d.operator,
16800
+ condition: i(d.keys)
16801
16801
  }));
16802
- return /* @__PURE__ */ e($t, { className: "border-blue-500/30 bg-blue-50/30 dark:bg-blue-950/20", children: /* @__PURE__ */ a("div", { className: q("p-3", { "space-y-3": l }), children: [
16803
- /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
16804
- /* @__PURE__ */ a(
16805
- "button",
16806
- {
16807
- onClick: () => r(!l),
16808
- className: "flex items-center gap-2 transition-opacity hover:opacity-70",
16809
- children: [
16810
- /* @__PURE__ */ e(Cd, { className: "size-4 text-blue-600 dark:text-blue-400" }),
16811
- /* @__PURE__ */ e("h3", { className: "text-sm font-medium text-blue-900 dark:text-blue-100", children: "Auto-Resolved Joins" }),
16812
- /* @__PURE__ */ e(
16813
- re,
16814
- {
16815
- variant: "secondary",
16816
- className: "bg-blue-100 text-xs text-blue-700 dark:bg-blue-900 dark:text-blue-300",
16817
- children: o.length
16818
- }
16819
- )
16820
- ]
16821
- }
16822
- ),
16823
- t && /* @__PURE__ */ e(
16824
- V,
16825
- {
16826
- variant: "ghost",
16827
- size: "sm",
16828
- onClick: t,
16829
- className: "h-7 gap-1 p-2 text-xs text-blue-700 hover:text-blue-900 dark:text-blue-300 dark:hover:text-blue-100",
16830
- children: /* @__PURE__ */ e(tn, { className: "size-3.5" })
16831
- }
16832
- )
16833
- ] }),
16834
- l && /* @__PURE__ */ e(K, { children: /* @__PURE__ */ e("div", { className: "space-y-2", children: o.map((m, p) => {
16835
- const h = u(m), f = Array.isArray(h);
16836
- return /* @__PURE__ */ a(
16837
- "div",
16838
- {
16839
- className: "rounded-md border border-blue-200/50 bg-background p-2 dark:border-blue-800/50",
16840
- children: [
16841
- /* @__PURE__ */ a("div", { className: "mb-1 flex items-center justify-between gap-2", children: [
16842
- /* @__PURE__ */ a("div", { className: "flex items-center gap-2 text-xs", children: [
16843
- /* @__PURE__ */ e("span", { className: "font-medium text-foreground", children: m.source.name }),
16844
- /* @__PURE__ */ e(mc, { className: "size-3 text-muted-foreground" }),
16845
- /* @__PURE__ */ e("span", { className: "font-medium text-foreground", children: m.target.name })
16846
- ] }),
16847
- /* @__PURE__ */ e(
16848
- re,
16849
- {
16850
- variant: "outline",
16851
- className: "border-green-500/40 bg-green-50/30 text-xs text-green-700 dark:bg-green-950/30 dark:text-green-300",
16852
- children: m.joinType
16853
- }
16854
- )
16855
- ] }),
16856
- /* @__PURE__ */ e("div", { className: "mt-1 space-y-1", children: f ? (
16857
- // Multiple join groups
16858
- h.map((v) => /* @__PURE__ */ a(
16802
+ return /* @__PURE__ */ e($t, { className: "border-blue-500/30 bg-blue-50/30 dark:bg-blue-950/20", children: /* @__PURE__ */ a("div", { className: "flex items-center justify-between p-3", children: [
16803
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
16804
+ /* @__PURE__ */ e(Cd, { className: "size-4 text-blue-600 dark:text-blue-400" }),
16805
+ /* @__PURE__ */ e("h3", { className: "text-sm font-medium text-blue-900 dark:text-blue-100", children: "Auto-Resolved Joins" }),
16806
+ /* @__PURE__ */ e(gt, { children: /* @__PURE__ */ a(Ke, { children: [
16807
+ /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e(
16808
+ re,
16809
+ {
16810
+ variant: "secondary",
16811
+ className: "cursor-help bg-blue-100 text-xs text-blue-700 dark:bg-blue-900 dark:text-blue-300",
16812
+ children: r.length
16813
+ }
16814
+ ) }),
16815
+ /* @__PURE__ */ e(
16816
+ Qe,
16817
+ {
16818
+ side: "bottom",
16819
+ align: "start",
16820
+ className: "max-w-md p-3",
16821
+ children: /* @__PURE__ */ e("div", { className: "space-y-2", children: r.map((o, d) => {
16822
+ const u = c(o), m = Array.isArray(u);
16823
+ return /* @__PURE__ */ a(
16859
16824
  "div",
16860
16825
  {
16861
- className: "rounded bg-muted/30 px-2 py-1",
16826
+ className: "rounded-md border border-border bg-background p-2",
16862
16827
  children: [
16863
- /* @__PURE__ */ e("code", { className: "text-xs text-muted-foreground", children: v.condition }),
16864
- v.operator && /* @__PURE__ */ a("span", { className: "ml-2 text-xs text-muted-foreground", children: [
16865
- "(",
16866
- v.operator,
16867
- ")"
16868
- ] })
16828
+ /* @__PURE__ */ a("div", { className: "mb-1 flex items-center justify-between gap-2", children: [
16829
+ /* @__PURE__ */ a("div", { className: "flex items-center gap-2 text-xs", children: [
16830
+ /* @__PURE__ */ e("span", { className: "font-medium text-foreground", children: o.source.name }),
16831
+ /* @__PURE__ */ e(mc, { className: "size-3 text-muted-foreground" }),
16832
+ /* @__PURE__ */ e("span", { className: "font-medium text-foreground", children: o.target.name })
16833
+ ] }),
16834
+ /* @__PURE__ */ e(
16835
+ re,
16836
+ {
16837
+ variant: "outline",
16838
+ className: "border-green-500/40 bg-green-50/30 text-xs text-green-700 dark:bg-green-950/30 dark:text-green-300",
16839
+ children: o.joinType
16840
+ }
16841
+ )
16842
+ ] }),
16843
+ /* @__PURE__ */ e("div", { className: "mt-1 space-y-1", children: m ? (
16844
+ // Multiple join groups
16845
+ u.map((p) => /* @__PURE__ */ a(
16846
+ "div",
16847
+ {
16848
+ className: "rounded bg-muted/30 px-2 py-1",
16849
+ children: [
16850
+ /* @__PURE__ */ e("code", { className: "block break-all text-xs text-muted-foreground", children: p.condition }),
16851
+ p.operator && /* @__PURE__ */ a("span", { className: "ml-2 text-xs text-muted-foreground", children: [
16852
+ "(",
16853
+ p.operator,
16854
+ ")"
16855
+ ] })
16856
+ ]
16857
+ },
16858
+ p.id
16859
+ ))
16860
+ ) : (
16861
+ // Single join condition
16862
+ /* @__PURE__ */ e("div", { className: "rounded bg-muted/30 px-2 py-1", children: /* @__PURE__ */ e("code", { className: "block break-all text-xs text-muted-foreground", children: u }) })
16863
+ ) })
16869
16864
  ]
16870
16865
  },
16871
- v.id
16872
- ))
16873
- ) : (
16874
- // Single join condition
16875
- /* @__PURE__ */ e("div", { className: "rounded bg-muted/30 px-2 py-1", children: /* @__PURE__ */ e("code", { className: "text-xs text-muted-foreground", children: h }) })
16876
- ) })
16877
- ]
16878
- },
16879
- m.id || p
16880
- );
16881
- }) }) })
16866
+ o.id || d
16867
+ );
16868
+ }) })
16869
+ }
16870
+ )
16871
+ ] }) })
16872
+ ] }),
16873
+ t && /* @__PURE__ */ e(
16874
+ V,
16875
+ {
16876
+ variant: "ghost",
16877
+ size: "sm",
16878
+ onClick: t,
16879
+ className: "h-7 gap-1 p-2 text-xs text-blue-700 hover:text-blue-900 dark:text-blue-300 dark:hover:text-blue-100",
16880
+ children: /* @__PURE__ */ e(tn, { className: "size-3.5" })
16881
+ }
16882
+ )
16882
16883
  ] }) });
16883
16884
  }
16884
16885
  const Sl = {
@@ -16996,8 +16997,8 @@ function ih({
16996
16997
  onChartChange: n
16997
16998
  }
16998
16999
  ),
16999
- /* @__PURE__ */ a(Je, { children: [
17000
- /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ e(
17000
+ /* @__PURE__ */ a(Ke, { children: [
17001
+ /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e(
17001
17002
  V,
17002
17003
  {
17003
17004
  variant: "ghost",
@@ -17008,7 +17009,7 @@ function ih({
17008
17009
  children: c ? /* @__PURE__ */ e(Va, { className: "h-4 w-4" }) : /* @__PURE__ */ e(Bt, { className: "h-4 w-4" })
17009
17010
  }
17010
17011
  ) }),
17011
- /* @__PURE__ */ e(Xe, { side: "bottom", children: /* @__PURE__ */ e("p", { children: c ? "Hide dropdown" : "Show all charts" }) })
17012
+ /* @__PURE__ */ e(Qe, { side: "bottom", children: /* @__PURE__ */ e("p", { children: c ? "Hide dropdown" : "Show all charts" }) })
17012
17013
  ] })
17013
17014
  ]
17014
17015
  }
@@ -17286,8 +17287,8 @@ function ch({
17286
17287
  className: n,
17287
17288
  delayDuration: s
17288
17289
  }) {
17289
- return /* @__PURE__ */ e(xt, { children: /* @__PURE__ */ a(Je, { delayDuration: s, children: [
17290
- /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ e(
17290
+ return /* @__PURE__ */ e(gt, { children: /* @__PURE__ */ a(Ke, { delayDuration: s, children: [
17291
+ /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e(
17291
17292
  "div",
17292
17293
  {
17293
17294
  className: q(
@@ -17406,7 +17407,7 @@ function mh({
17406
17407
  }
17407
17408
  function Bn(t) {
17408
17409
  var g;
17409
- const n = I((b) => b.card), { authToken: s, tokenProps: l } = Ke(), r = I((b) => b.card.config), i = r == null ? void 0 : r.joinPlan, c = {
17410
+ const n = I((b) => b.card), { authToken: s, tokenProps: l } = We(), r = I((b) => b.card.config), i = r == null ? void 0 : r.joinPlan, c = {
17410
17411
  ...t,
17411
17412
  alias: t.name,
17412
17413
  // we need exact field name in the output for the filters to work.
@@ -17571,7 +17572,7 @@ function fh({
17571
17572
  className: l
17572
17573
  }) {
17573
17574
  var d;
17574
- const { tokenProps: r } = Ke(), i = (d = r == null ? void 0 : r.params) == null ? void 0 : d.timeZone, c = Qe(() => {
17575
+ const { tokenProps: r } = We(), i = (d = r == null ? void 0 : r.params) == null ? void 0 : d.timeZone, c = He(() => {
17575
17576
  if (t) {
17576
17577
  if (n === "between" || n === "not between") {
17577
17578
  if (Array.isArray(t) && t.length === 2) {
@@ -18609,7 +18610,7 @@ function Ah({
18609
18610
  var p;
18610
18611
  return ((p = m.card.customCardPreferences) == null ? void 0 : p.settings) || {};
18611
18612
  }
18612
- ), { data: o } = _e(r), { getCard: d } = bn(l), u = Qe(() => !l || l.trim() === "" ? null : d("Chart Settings"), [d, l]);
18613
+ ), { data: o } = _e(r), { getCard: d } = bn(l), u = He(() => !l || l.trim() === "" ? null : d("Chart Settings"), [d, l]);
18613
18614
  return /* @__PURE__ */ e(
18614
18615
  "div",
18615
18616
  {
@@ -18771,7 +18772,7 @@ function Ih({
18771
18772
  ...we,
18772
18773
  sortByColumns: Y
18773
18774
  });
18774
- }, Ee = Qe(() => {
18775
+ }, Ee = He(() => {
18775
18776
  var ne, we;
18776
18777
  return (we = (ne = u.config) == null ? void 0 : ne.sortByColumns) == null ? void 0 : we.map((Y) => ({
18777
18778
  id: Y.label,
@@ -20217,7 +20218,7 @@ function Jh(t) {
20217
20218
  (te) => te.actions.selectDashboard
20218
20219
  ), x = bt(
20219
20220
  (te) => te.actions.clearSelectedDashboard
20220
- ), { tokenProps: C, id: N } = Ke(), { permissions: R } = Nn(), { onCreateSuccess: S } = Oc({
20221
+ ), { tokenProps: C, id: N } = We(), { permissions: R } = Nn(), { onCreateSuccess: S } = Oc({
20221
20222
  onDashboardSelect: l
20222
20223
  }), {
20223
20224
  resources: L,
@@ -20474,12 +20475,12 @@ function Wh({
20474
20475
  }, T = (D) => {
20475
20476
  console.log("Editing dashboard:", D);
20476
20477
  };
20477
- return /* @__PURE__ */ e(xt, { children: (!b || t) && /* @__PURE__ */ a("div", { ref: y, className: w, children: [
20478
+ return /* @__PURE__ */ e(gt, { children: (!b || t) && /* @__PURE__ */ a("div", { ref: y, className: w, children: [
20478
20479
  /* @__PURE__ */ a("div", { className: "flex items-center justify-between border-b border-border p-4", children: [
20479
20480
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: d && /* @__PURE__ */ a(K, { children: [
20480
- /* @__PURE__ */ a(Je, { children: [
20481
- /* @__PURE__ */ e(We, { asChild: !0, children: /* @__PURE__ */ e("div", { className: "flex h-8 w-8 cursor-default items-center justify-center rounded-full bg-primary/10", children: /* @__PURE__ */ e("span", { className: "text-sm font-medium text-primary", children: d.name.charAt(0).toUpperCase() }) }) }),
20482
- /* @__PURE__ */ e(Xe, { side: "bottom", className: "ml-2 max-w-xs", children: /* @__PURE__ */ a("div", { className: "space-y-1", children: [
20481
+ /* @__PURE__ */ a(Ke, { children: [
20482
+ /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e("div", { className: "flex h-8 w-8 cursor-default items-center justify-center rounded-full bg-primary/10", children: /* @__PURE__ */ e("span", { className: "text-sm font-medium text-primary", children: d.name.charAt(0).toUpperCase() }) }) }),
20483
+ /* @__PURE__ */ e(Qe, { side: "bottom", className: "ml-2 max-w-xs", children: /* @__PURE__ */ a("div", { className: "space-y-1", children: [
20483
20484
  /* @__PURE__ */ e("div", { className: "font-medium", children: d.name }),
20484
20485
  /* @__PURE__ */ e("div", { className: "text-xs text-muted-foreground", children: d.email }),
20485
20486
  d.role && /* @__PURE__ */ a("div", { className: "text-xs text-muted-foreground", children: [