react-semaphor 0.0.679 → 0.0.681

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,5 +1,5 @@
1
1
  import { jsxs as a, jsx as e, Fragment as W } from "react/jsx-runtime";
2
- import { L as le, M as Tn, u as Z, N as Ot, O as Rt, P as V, Q as Ft, T as He, V as Mn, I as xt, W as Xe, X as ut, Y as ll, Z as We, _ as mt, $ as ht, a0 as pt, a1 as bt, a2 as $, a3 as Ie, a4 as Wt, a5 as ye, a6 as An, a7 as Na, a8 as Bi, a9 as Or, aa as In, ab as q, ac as En, ad as Ui, ae as il, af as Gi, ag as $i, ah as Ia, ai as he, j as Rr, aj as Yi, ak as qi, al as Jt, am as Re, an as de, ao as Ae, ap as vt, aq as je, ar as ja, as as wa, at as Ba, au as Ki, av as Sa, aw as ft, ax as Qe, ay as Ze, az as cs, aA as at, aB as Te, aC as tt, aD as On, aE as Rs, aF as Ea, aG as oa, aH as Qt, aI as ds, aJ as us, aK as Wi, aL as ka, aM as Rn, aN as Fn, aO as Pn, aP as zn, R as Kt, aQ as ol, aR as Ji, aS as Ln, aT as ms, aU as _n, aV as Vn, aW as Ua, aX as Ga, aY as $a, aZ as jn, a_ as Us, a$ as Bn, b0 as cl, b1 as dl, b2 as Un, b3 as fe, b4 as ge, b5 as xe, b6 as ve, b7 as ee, b8 as ul, b9 as ml, ba as Hi, bb as Qi, bc as ca, bd as Zi, be as Xi, bf as St, bg as kt, bh as Ee, bi as ct, bj as Mt, J as E, bk as Lt, bl as Gs, bm as $s, bn as Gn, bo as eo, bp as nt, bq as Oa, br as da, bs as Fs, bt as hl, bu as pl, bv as to, bw as $n, bx as Yn, by as qn, bz as Kn, bA as Wn, bB as Jn, bC as Hn, bD as Qn, bE as Ms, bF as Ys, bG as hs, K as re, bH as ao, bI as Et, bJ as so, bK as Be, bL as ua, bM as fl, bN as Ps, bO as no, bP as Zn, bQ as zs, bR as Xn, bS as As, bT as Ya, bU as er, bV as ro, bW as lo, bX as io, bY as oo, bZ as co, i as uo, b_ as gl, b$ as es, c0 as _t, c1 as Vt, c2 as Zt, c3 as Xt, c4 as ps, c5 as fs, c6 as gs, c7 as xs, c8 as ga, c9 as qa, ca as Ra, cb as Fa, cc as Pt, cd as vs, A as jt, r as xl, q as vl, l as At, ce as zt, cf as qe, cg as mo, ch as ra, ci as sa, cj as yl, ck as ho, k as Nl, cl as ts, cm as ta, cn as po, n as na, m as Ut, o as Gt, co as fn, cp as qs, cq as Ks, cr as Ka, cs as Ws, ct as la, x as Fr, cu as ys, cv as as, cw as Pr, cx as fo, cy as go, cz as xo, cA as bl, cB as vo, cC as yo, cD as Cl, cE as No, cF as Js, cG as bo, cH as Co, cI as gn, cJ as $t, cK as Je, cL as Yt, cM as wo, cN as So, cO as ko, cP as tr, cQ as Do, cR as wl, cS as ar, cT as To, cU as Sl, cV as Is, cW as kl, cX as Mo, cY as Ao, cZ as ss, c_ as Io, c$ as sr, d0 as Eo, d1 as Oo, d2 as zr, d3 as Ro, E as Ns, b as nr, d4 as rr, d5 as Fo, d6 as Po, d7 as lr, d8 as zo, d9 as Lo, da as _o, db as Dl, dc as ir, dd as Tl, de as Ml, df as Al, dg as Il, dh as El, di as or, dj as cr, dk as Ol, dl as Rl, dm as Fl, dn as dr, dp as Hs, dq as Qs, dr as Vo, ds as jo, dt as pa, du as Bo, dv as Uo, dw as Go, dx as $o, dy as Yo, dz as qo, dA as dt, dB as gt, dC as Se, dD as ke, dE as De, dF as aa, dG as Ko, dH as Wo, dI as Jo, dJ as Ho, dK as Qo, y as Zo, dL as Lr, dM as Pl, dN as Xo, dO as ec, dP as ot, dQ as ws, dR as _r, dS as tc, dT as Vr, dU as jr, dV as ac, dW as sc, dX as nc, dY as rc, dZ as ur, d_ as mr, d$ as hr, e0 as Wa, e1 as pr, e2 as ia, e3 as lc, e4 as Zs, e5 as zl, e6 as ic, e7 as oc, e8 as Br, e9 as cc, ea as dc, eb as uc, ec as mc, ed as hc, w as Ur, ee as Gr, ef as pc, eg as fc, eh as Ll, ei as gc, ej as _l, ek as xc, el as vc, em as yc, en as Nc, eo as bc, ep as Cc, eq as wc, er as Sc, es as kc, et as Dc, eu as Tc, ev as Mc, ew as Ac, ex as Ic, ey as Ec, ez as Oc, eA as Vl, eB as Rc, eC as Fc, eD as xn, eE as Pc, eF as Es, eG as Os, eH as Ja, eI as zc, eJ as $r, eK as Lc, eL as vn, eM as jl, eN as fr, eO as sn, eP as gr, eQ as _c, eR as Vc, eS as jc, eT as ns, eU as Bc, eV as Uc, eW as yn, eX as Gc, eY as $c, eZ as Yc, e_ as Nn, e$ as bn, f0 as Ls, f1 as qc, f2 as Pa, f3 as rs, f4 as Kc, f5 as Wc, f6 as Jc, f7 as Hc, f8 as Qc, f9 as Zc, fa as Xc, fb as ed, fc as nn, fd as td, fe as ad, ff as sd, F as Bl, fg as nd, p as rd, fh as ld, B as id, fi as od, fj as cd, fk as dd, fl as Ul, fm as Gl, fn as ud, fo as $l, fp as md, fq as hd, S as pd, fr as fd, U as gd, fs as xd, C as vd } from "./index-Dn6IF-mM.js";
2
+ import { L as le, M as Tn, u as Z, N as Ot, O as Rt, P as V, Q as Ft, T as He, V as Mn, I as xt, W as Xe, X as ut, Y as ll, Z as We, _ as mt, $ as ht, a0 as pt, a1 as bt, a2 as $, a3 as Ie, a4 as Wt, a5 as ye, a6 as An, a7 as Na, a8 as Bi, a9 as Or, aa as In, ab as q, ac as En, ad as Ui, ae as il, af as Gi, ag as $i, ah as Ia, ai as he, j as Rr, aj as Yi, ak as qi, al as Jt, am as Re, an as ue, ao as Ae, ap as vt, aq as je, ar as ja, as as wa, at as Ba, au as Ki, av as Sa, aw as ft, ax as Qe, ay as Ze, az as cs, aA as at, aB as Te, aC as tt, aD as On, aE as Rs, aF as Ea, aG as oa, aH as Qt, aI as ds, aJ as us, aK as Wi, aL as ka, aM as Rn, aN as Fn, aO as Pn, aP as zn, R as Kt, aQ as ol, aR as Ji, aS as Ln, aT as ms, aU as _n, aV as Vn, aW as Ua, aX as Ga, aY as $a, aZ as jn, a_ as Us, a$ as Bn, b0 as cl, b1 as dl, b2 as Un, b3 as fe, b4 as ge, b5 as xe, b6 as ve, b7 as ee, b8 as ul, b9 as ml, ba as Hi, bb as Qi, bc as ca, bd as Zi, be as Xi, bf as St, bg as kt, bh as Ee, bi as ct, bj as Mt, J as E, bk as Lt, bl as Gs, bm as $s, bn as Gn, bo as eo, bp as nt, bq as Oa, br as da, bs as Fs, bt as hl, bu as pl, bv as to, bw as $n, bx as Yn, by as qn, bz as Kn, bA as Wn, bB as Jn, bC as Hn, bD as Qn, bE as Ms, bF as Ys, bG as hs, K as re, bH as ao, bI as Et, bJ as so, bK as Be, bL as ua, bM as fl, bN as Ps, bO as no, bP as Zn, bQ as zs, bR as Xn, bS as As, bT as Ya, bU as er, bV as ro, bW as lo, bX as io, bY as oo, bZ as co, i as uo, b_ as gl, b$ as es, c0 as _t, c1 as Vt, c2 as Zt, c3 as Xt, c4 as ps, c5 as fs, c6 as gs, c7 as xs, c8 as ga, c9 as qa, ca as Ra, cb as Fa, cc as Pt, cd as vs, A as jt, r as xl, q as vl, l as At, ce as zt, cf as qe, cg as mo, ch as ra, ci as sa, cj as yl, ck as ho, k as Nl, cl as ts, cm as ta, cn as po, n as na, m as Ut, o as Gt, co as fn, cp as qs, cq as Ks, cr as Ka, cs as Ws, ct as la, x as Fr, cu as ys, cv as as, cw as Pr, cx as fo, cy as go, cz as xo, cA as bl, cB as vo, cC as yo, cD as Cl, cE as No, cF as Js, cG as bo, cH as Co, cI as gn, cJ as $t, cK as Je, cL as Yt, cM as wo, cN as So, cO as ko, cP as tr, cQ as Do, cR as wl, cS as ar, cT as To, cU as Sl, cV as Is, cW as kl, cX as Mo, cY as Ao, cZ as ss, c_ as Io, c$ as sr, d0 as Eo, d1 as Oo, d2 as zr, d3 as Ro, E as Ns, b as nr, d4 as rr, d5 as Fo, d6 as Po, d7 as lr, d8 as zo, d9 as Lo, da as _o, db as Dl, dc as ir, dd as Tl, de as Ml, df as Al, dg as Il, dh as El, di as or, dj as cr, dk as Ol, dl as Rl, dm as Fl, dn as dr, dp as Hs, dq as Qs, dr as Vo, ds as jo, dt as pa, du as Bo, dv as Uo, dw as Go, dx as $o, dy as Yo, dz as qo, dA as dt, dB as gt, dC as Se, dD as ke, dE as De, dF as aa, dG as Ko, dH as Wo, dI as Jo, dJ as Ho, dK as Qo, y as Zo, dL as Lr, dM as Pl, dN as Xo, dO as ec, dP as ot, dQ as ws, dR as _r, dS as tc, dT as Vr, dU as jr, dV as ac, dW as sc, dX as nc, dY as rc, dZ as ur, d_ as mr, d$ as hr, e0 as Wa, e1 as pr, e2 as ia, e3 as lc, e4 as Zs, e5 as zl, e6 as ic, e7 as oc, e8 as Br, e9 as cc, ea as dc, eb as uc, ec as mc, ed as hc, w as Ur, ee as Gr, ef as pc, eg as fc, eh as Ll, ei as gc, ej as _l, ek as xc, el as vc, em as yc, en as Nc, eo as bc, ep as Cc, eq as wc, er as Sc, es as kc, et as Dc, eu as Tc, ev as Mc, ew as Ac, ex as Ic, ey as Ec, ez as Oc, eA as Vl, eB as Rc, eC as Fc, eD as xn, eE as Pc, eF as Es, eG as Os, eH as Ja, eI as zc, eJ as $r, eK as Lc, eL as vn, eM as jl, eN as fr, eO as sn, eP as gr, eQ as _c, eR as Vc, eS as jc, eT as ns, eU as Bc, eV as Uc, eW as yn, eX as Gc, eY as $c, eZ as Yc, e_ as Nn, e$ as bn, f0 as Ls, f1 as qc, f2 as Pa, f3 as rs, f4 as Kc, f5 as Wc, f6 as Jc, f7 as Hc, f8 as Qc, f9 as Zc, fa as Xc, fb as ed, fc as nn, fd as td, fe as ad, ff as sd, F as Bl, fg as nd, p as rd, fh as ld, B as id, fi as od, fj as cd, fk as dd, fl as Ul, fm as Gl, fn as ud, fo as $l, fp as md, fq as hd, S as pd, fr as fd, U as gd, fs as xd, C as vd } from "./index-DM6kJHwE.js";
3
3
  import * as fa from "react";
4
4
  import Ke, { useState as j, useRef as Ct, useEffect as Me, useMemo as Ve, useCallback as be, useContext as xr, Suspense as Yl } from "react";
5
5
  import { createPortal as yd } from "react-dom";
@@ -1353,7 +1353,7 @@ function Ca({
1353
1353
  );
1354
1354
  return i ? /* @__PURE__ */ a(Ot, { children: [
1355
1355
  /* @__PURE__ */ e(Rt, { asChild: !0, children: /* @__PURE__ */ e(
1356
- de,
1356
+ ue,
1357
1357
  {
1358
1358
  variant: "outline",
1359
1359
  className: `cursor-pointer hover:bg-muted ${r ? "cursor-not-allowed opacity-50" : ""} ${l}`,
@@ -1372,7 +1372,7 @@ function Ca({
1372
1372
  },
1373
1373
  u.value
1374
1374
  )) })
1375
- ] }) : /* @__PURE__ */ e(de, { variant: "outline", className: `text-xs ${l}`, children: c });
1375
+ ] }) : /* @__PURE__ */ e(ue, { variant: "outline", className: `text-xs ${l}`, children: c });
1376
1376
  }
1377
1377
  function Ql({
1378
1378
  selectedUsers: t,
@@ -1401,7 +1401,7 @@ function Ql({
1401
1401
  ] }),
1402
1402
  /* @__PURE__ */ e("div", { className: "flex max-h-20 flex-wrap gap-2 overflow-y-auto", children: n.map((i) => {
1403
1403
  const c = t.find((d) => d.id === i.id), o = l(i.type);
1404
- return /* @__PURE__ */ a(de, { variant: "secondary", className: "gap-1", children: [
1404
+ return /* @__PURE__ */ a(ue, { variant: "secondary", className: "gap-1", children: [
1405
1405
  i.name,
1406
1406
  /* @__PURE__ */ e(
1407
1407
  Ca,
@@ -1447,7 +1447,7 @@ function Zl({
1447
1447
  }
1448
1448
  )
1449
1449
  ] }),
1450
- /* @__PURE__ */ e("div", { className: "flex max-h-20 flex-wrap gap-2 overflow-y-auto", children: n.filter((r) => t.includes(r.id)).map((r) => /* @__PURE__ */ a(de, { variant: "destructive", className: "gap-1", children: [
1450
+ /* @__PURE__ */ e("div", { className: "flex max-h-20 flex-wrap gap-2 overflow-y-auto", children: n.filter((r) => t.includes(r.id)).map((r) => /* @__PURE__ */ a(ue, { variant: "destructive", className: "gap-1", children: [
1451
1451
  r.name,
1452
1452
  /* @__PURE__ */ e(
1453
1453
  "button",
@@ -1494,9 +1494,9 @@ function Xl({
1494
1494
  /* @__PURE__ */ e("span", { className: "font-medium", children: i(o.id) }),
1495
1495
  /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "→" }),
1496
1496
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1", children: [
1497
- /* @__PURE__ */ e(de, { variant: "outline", className: "text-xs", children: c(o.currentRole) }),
1497
+ /* @__PURE__ */ e(ue, { variant: "outline", className: "text-xs", children: c(o.currentRole) }),
1498
1498
  /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "→" }),
1499
- /* @__PURE__ */ e(de, { variant: "default", className: "text-xs", children: c(o.newRole) })
1499
+ /* @__PURE__ */ e(ue, { variant: "default", className: "text-xs", children: c(o.newRole) })
1500
1500
  ] })
1501
1501
  ] }),
1502
1502
  /* @__PURE__ */ e(
@@ -1556,7 +1556,7 @@ function yu(t, n, s) {
1556
1556
  );
1557
1557
  }
1558
1558
  function Nu({ user: t }) {
1559
- return ti(t) === "tenant" ? /* @__PURE__ */ e(de, { variant: "outline", className: "text-xs", children: t.role === "POWER_USER" ? "Power User" : "Viewer" }) : /* @__PURE__ */ e(de, { variant: "outline", className: "text-xs", children: t.role === "ADMIN" ? "Admin" : t.role === "POWER_USER" ? "Power User" : "Viewer" });
1559
+ return ti(t) === "tenant" ? /* @__PURE__ */ e(ue, { variant: "outline", className: "text-xs", children: t.role === "POWER_USER" ? "Power User" : "Viewer" }) : /* @__PURE__ */ e(ue, { variant: "outline", className: "text-xs", children: t.role === "ADMIN" ? "Admin" : t.role === "POWER_USER" ? "Power User" : "Viewer" });
1560
1560
  }
1561
1561
  function bu({
1562
1562
  user: t,
@@ -1584,7 +1584,7 @@ function bu({
1584
1584
  allowDropdown: c,
1585
1585
  className: o ? "border-orange-300 bg-orange-100" : ""
1586
1586
  }
1587
- ) : /* @__PURE__ */ e(de, { variant: "outline", className: "text-xs", children: Dt(u, m) }) }) : /* @__PURE__ */ e(de, { variant: "outline", className: "text-xs", children: "Unknown" });
1587
+ ) : /* @__PURE__ */ e(ue, { variant: "outline", className: "text-xs", children: Dt(u, m) }) }) : /* @__PURE__ */ e(ue, { variant: "outline", className: "text-xs", children: "Unknown" });
1588
1588
  }
1589
1589
  function Cu({
1590
1590
  hasAccess: t,
@@ -1594,7 +1594,7 @@ function Cu({
1594
1594
  }) {
1595
1595
  return /* @__PURE__ */ a("div", { className: "mt-1 flex items-center gap-2", children: [
1596
1596
  t && !n && /* @__PURE__ */ a(
1597
- de,
1597
+ ue,
1598
1598
  {
1599
1599
  variant: "outline",
1600
1600
  className: "border-green-200 bg-green-50 text-xs text-green-700",
@@ -1605,7 +1605,7 @@ function Cu({
1605
1605
  }
1606
1606
  ),
1607
1607
  n && /* @__PURE__ */ a(
1608
- de,
1608
+ ue,
1609
1609
  {
1610
1610
  variant: "outline",
1611
1611
  className: "border-red-200 bg-red-50 text-xs text-red-700",
@@ -1616,7 +1616,7 @@ function Cu({
1616
1616
  }
1617
1617
  ),
1618
1618
  s && !r && /* @__PURE__ */ a(
1619
- de,
1619
+ ue,
1620
1620
  {
1621
1621
  variant: "outline",
1622
1622
  className: "border-blue-200 bg-blue-50 text-xs text-blue-700",
@@ -1682,7 +1682,7 @@ function Su({
1682
1682
  children: [
1683
1683
  /* @__PURE__ */ e("span", { className: "truncate text-muted-foreground", children: y }),
1684
1684
  /* @__PURE__ */ e(
1685
- de,
1685
+ ue,
1686
1686
  {
1687
1687
  variant: "outline",
1688
1688
  className: "ml-2 shrink-0 px-2 py-0.5 text-xs",
@@ -1725,7 +1725,7 @@ function Su({
1725
1725
  children: [
1726
1726
  /* @__PURE__ */ e("span", { className: "truncate text-muted-foreground", children: y }),
1727
1727
  /* @__PURE__ */ e(
1728
- de,
1728
+ ue,
1729
1729
  {
1730
1730
  variant: "outline",
1731
1731
  className: "ml-2 shrink-0 px-2 py-0.5 text-xs",
@@ -1758,7 +1758,7 @@ function Su({
1758
1758
  children: [
1759
1759
  /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "All Organization Users" }),
1760
1760
  /* @__PURE__ */ e(
1761
- de,
1761
+ ue,
1762
1762
  {
1763
1763
  variant: "outline",
1764
1764
  className: "ml-2 shrink-0 px-2 py-0.5 text-xs",
@@ -1785,7 +1785,7 @@ function Su({
1785
1785
  children: [
1786
1786
  /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "Org Users Only" }),
1787
1787
  /* @__PURE__ */ e(
1788
- de,
1788
+ ue,
1789
1789
  {
1790
1790
  variant: "outline",
1791
1791
  className: "ml-2 shrink-0 px-2 py-0.5 text-xs",
@@ -1812,7 +1812,7 @@ function Su({
1812
1812
  children: [
1813
1813
  /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "All Tenants" }),
1814
1814
  /* @__PURE__ */ e(
1815
- de,
1815
+ ue,
1816
1816
  {
1817
1817
  variant: "outline",
1818
1818
  className: "ml-2 shrink-0 px-2 py-0.5 text-xs",
@@ -1857,7 +1857,7 @@ function Su({
1857
1857
  children: [
1858
1858
  /* @__PURE__ */ e("span", { className: "truncate text-muted-foreground", children: m }),
1859
1859
  /* @__PURE__ */ e(
1860
- de,
1860
+ ue,
1861
1861
  {
1862
1862
  variant: "outline",
1863
1863
  className: "ml-2 shrink-0 px-2 py-0.5 text-xs",
@@ -1890,7 +1890,7 @@ function Su({
1890
1890
  children: [
1891
1891
  /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "All Tenant Users" }),
1892
1892
  /* @__PURE__ */ e(
1893
- de,
1893
+ ue,
1894
1894
  {
1895
1895
  variant: "outline",
1896
1896
  className: "ml-2 shrink-0 px-2 py-0.5 text-xs",
@@ -1936,7 +1936,7 @@ function Su({
1936
1936
  children: [
1937
1937
  /* @__PURE__ */ e("span", { className: "truncate text-muted-foreground", children: u }),
1938
1938
  /* @__PURE__ */ e(
1939
- de,
1939
+ ue,
1940
1940
  {
1941
1941
  variant: "outline",
1942
1942
  className: "ml-2 shrink-0 px-2 py-0.5 text-xs",
@@ -1969,7 +1969,7 @@ function Su({
1969
1969
  children: [
1970
1970
  /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "All Tenant Users" }),
1971
1971
  /* @__PURE__ */ e(
1972
- de,
1972
+ ue,
1973
1973
  {
1974
1974
  variant: "outline",
1975
1975
  className: "ml-2 shrink-0 px-2 py-0.5 text-xs",
@@ -2293,7 +2293,7 @@ function Tu({
2293
2293
  " ",
2294
2294
  "Users",
2295
2295
  p && /* @__PURE__ */ e(
2296
- de,
2296
+ ue,
2297
2297
  {
2298
2298
  variant: "default",
2299
2299
  className: "ml-2 border-green-400 bg-green-100 text-green-800",
@@ -2301,14 +2301,14 @@ function Tu({
2301
2301
  }
2302
2302
  ),
2303
2303
  x && /* @__PURE__ */ e(
2304
- de,
2304
+ ue,
2305
2305
  {
2306
2306
  variant: "secondary",
2307
2307
  className: "ml-2 border-orange-400 bg-orange-100 text-orange-800",
2308
2308
  children: "Pending Update"
2309
2309
  }
2310
2310
  ),
2311
- (y || f) && /* @__PURE__ */ e(de, { variant: "destructive", className: "ml-2", children: "No Access" })
2311
+ (y || f) && /* @__PURE__ */ e(ue, { variant: "destructive", className: "ml-2", children: "No Access" })
2312
2312
  ] }),
2313
2313
  /* @__PURE__ */ e(Wi, { children: y || f ? "No access for all users." : "This will share the dashboard with all users in your " + ((t == null ? void 0 : t.type) === "organization" ? "organization" : "tenant") + ". Select an access level below." })
2314
2314
  ] }),
@@ -2483,8 +2483,8 @@ function Mu({
2483
2483
  ), T = S.filter(
2484
2484
  (H) => p.some((ie) => ie.id === H.id)
2485
2485
  ), L = (H) => {
2486
- var Y, oe;
2487
- const ie = p.some((Ne) => Ne.id === H), J = x.includes(H), ae = (oe = (Y = N == null ? void 0 : N.shares) == null ? void 0 : Y.specificOrgUsers) == null ? void 0 : oe.some(
2486
+ var Y, ce;
2487
+ const ie = p.some((Ne) => Ne.id === H), J = x.includes(H), ae = (ce = (Y = N == null ? void 0 : N.shares) == null ? void 0 : Y.specificOrgUsers) == null ? void 0 : ce.some(
2488
2488
  (Ne) => Ne.orgUserId === H
2489
2489
  );
2490
2490
  ie ? g.removeSelectedUser(H) : J ? g.removeUserFromRemove(H) : ae || g.addSelectedUser({ id: H, role: "VIEWER" });
@@ -2676,7 +2676,7 @@ function ni({
2676
2676
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
2677
2677
  /* @__PURE__ */ e("span", { className: "text-sm font-medium", children: f.name }),
2678
2678
  f.type === "ORG_GROUP" ? /* @__PURE__ */ e(jn, { className: "h-3 w-3 text-blue-600" }) : /* @__PURE__ */ e(je, { className: "h-3 w-3 text-green-600" }),
2679
- /* @__PURE__ */ a(de, { variant: "secondary", className: "text-xs", children: [
2679
+ /* @__PURE__ */ a(ue, { variant: "secondary", className: "text-xs", children: [
2680
2680
  f.memberCount,
2681
2681
  " members"
2682
2682
  ] })
@@ -2785,7 +2785,7 @@ function ri({
2785
2785
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
2786
2786
  o.type === "ORG_GROUP" ? /* @__PURE__ */ e(jn, { className: "h-4 w-4 text-blue-600" }) : /* @__PURE__ */ e(je, { className: "h-4 w-4 text-green-600" }),
2787
2787
  /* @__PURE__ */ e("span", { className: "text-sm font-medium", children: o.name }),
2788
- /* @__PURE__ */ a(de, { variant: "secondary", className: "text-xs", children: [
2788
+ /* @__PURE__ */ a(ue, { variant: "secondary", className: "text-xs", children: [
2789
2789
  o.memberCount,
2790
2790
  " members"
2791
2791
  ] }),
@@ -2843,13 +2843,13 @@ function Wr({
2843
2843
  (s == null ? void 0 : s.type) === "tenant" ? (D.setCurrentContext("tenant-dialog"), D.setCurrentMode("specificTenantUsers")) : (D.setCurrentContext("tenant-tab"), D.setCurrentMode("allTenants"));
2844
2844
  }, [D, s == null ? void 0 : s.type]);
2845
2845
  const T = (_) => {
2846
- var ce, Oe, we, Le;
2846
+ var de, Oe, we, Le;
2847
2847
  z(
2848
2848
  _
2849
2849
  );
2850
2850
  let ne;
2851
2851
  if (_ === "specific_tenant_users" ? ne = "specific_users" : _ === "all_tenant_users" || _ === "all_tenants" ? ne = "all_users" : _ === "groups" ? ne = "groups" : ne = "specific_users", r == null || r(ne), _ === "groups" ? (D.setCurrentContext("group-share"), D.setCurrentMode("specificGroups")) : (s == null ? void 0 : s.type) === "tenant" ? (D.setCurrentContext("tenant-dialog"), _ === "specific_tenant_users" ? D.setCurrentMode("specificTenantUsers") : _ === "all_tenant_users" && (D.setCurrentMode("allTenantUsers"), s != null && s.tenantId && D.setSelectedTenant(s.tenantId))) : (D.setCurrentContext("tenant-tab"), _ === "specific_tenant_users" ? D.setCurrentMode("specificTenantUsers") : _ === "all_tenant_users" ? D.setCurrentMode("allTenantUsers") : _ === "all_tenants" && D.setCurrentMode("allTenants")), _ === "all_tenant_users") {
2852
- const Pe = (Oe = (ce = k == null ? void 0 : k.shares) == null ? void 0 : ce.tenantWide) == null ? void 0 : Oe[0];
2852
+ const Pe = (Oe = (de = k == null ? void 0 : k.shares) == null ? void 0 : de.tenantWide) == null ? void 0 : Oe[0];
2853
2853
  Pe && Pe.role !== void 0 && D.setTenantWideRole(Pe.role);
2854
2854
  } else if (_ === "all_tenants") {
2855
2855
  const Pe = (Le = (we = k == null ? void 0 : k.shares) == null ? void 0 : we.allTenantsOnly) == null ? void 0 : Le[0];
@@ -2873,10 +2873,10 @@ function Wr({
2873
2873
  tenantId: (s == null ? void 0 : s.type) === "tenant" ? s.tenantId : I
2874
2874
  }), B = (_) => {
2875
2875
  var we, Le;
2876
- const ne = m.some((Pe) => Pe.id === _), ce = h.includes(_), Oe = (Le = (we = k == null ? void 0 : k.shares) == null ? void 0 : we.specificTenantUsers) == null ? void 0 : Le.some(
2876
+ const ne = m.some((Pe) => Pe.id === _), de = h.includes(_), Oe = (Le = (we = k == null ? void 0 : k.shares) == null ? void 0 : we.specificTenantUsers) == null ? void 0 : Le.some(
2877
2877
  (Pe) => Pe.tenantUserId === _
2878
2878
  );
2879
- ne ? D.removeSelectedUser(_) : ce ? D.removeUserFromRemove(_) : Oe || D.addSelectedUser({ id: _, role: "VIEWER" });
2879
+ ne ? D.removeSelectedUser(_) : de ? D.removeUserFromRemove(_) : Oe || D.addSelectedUser({ id: _, role: "VIEWER" });
2880
2880
  }, K = (_, ne) => {
2881
2881
  D.updateSelectedUserRole(_, ne);
2882
2882
  }, se = (_) => {
@@ -2885,44 +2885,44 @@ function Wr({
2885
2885
  D.removeUserFromRemove(_);
2886
2886
  }, te = (_) => {
2887
2887
  D.removeUserFromUpdate(_);
2888
- }, H = (_, ne, ce) => {
2889
- D.addUserToUpdate({ id: _, currentRole: ne, newRole: ce });
2888
+ }, H = (_, ne, de) => {
2889
+ D.addUserToUpdate({ id: _, currentRole: ne, newRole: de });
2890
2890
  }, ie = (_, ne) => {
2891
2891
  C === "all_tenant_users" ? D.setTenantWideRole(ne) : C === "all_tenants" && D.setAllTenantsRole(ne);
2892
2892
  }, J = () => {
2893
2893
  C === "all_tenant_users" ? D.setTenantWideRole("VIEWER") : C === "all_tenants" && D.setAllTenantsRole("VIEWER");
2894
2894
  }, Y = (() => {
2895
- var _, ne, ce, Oe;
2896
- return v === "allTenants" ? (ne = (_ = k == null ? void 0 : k.shares) == null ? void 0 : _.allTenantsOnly) == null ? void 0 : ne[0] : v === "allTenantUsers" ? (Oe = (ce = k == null ? void 0 : k.shares) == null ? void 0 : ce.tenantWide) == null ? void 0 : Oe[0] : null;
2895
+ var _, ne, de, Oe;
2896
+ return v === "allTenants" ? (ne = (_ = k == null ? void 0 : k.shares) == null ? void 0 : _.allTenantsOnly) == null ? void 0 : ne[0] : v === "allTenantUsers" ? (Oe = (de = k == null ? void 0 : k.shares) == null ? void 0 : de.tenantWide) == null ? void 0 : Oe[0] : null;
2897
2897
  })();
2898
2898
  Ke.useEffect(() => {
2899
- var _, ne, ce, Oe;
2899
+ var _, ne, de, Oe;
2900
2900
  if (C === "all_tenant_users") {
2901
2901
  const we = (ne = (_ = k == null ? void 0 : k.shares) == null ? void 0 : _.tenantWide) == null ? void 0 : ne[0];
2902
2902
  we && we.role !== void 0 && D.setTenantWideRole(we.role);
2903
2903
  } else if (C === "all_tenants") {
2904
- const we = (Oe = (ce = k == null ? void 0 : k.shares) == null ? void 0 : ce.allTenantsOnly) == null ? void 0 : Oe[0];
2904
+ const we = (Oe = (de = k == null ? void 0 : k.shares) == null ? void 0 : de.allTenantsOnly) == null ? void 0 : Oe[0];
2905
2905
  we && we.role !== void 0 && D.setAllTenantsRole(we.role);
2906
2906
  }
2907
2907
  }, [C, k, D]);
2908
- const oe = A.filter(
2908
+ const ce = A.filter(
2909
2909
  (_) => m.some((ne) => ne.id === _.id)
2910
2910
  ), Ne = (_) => {
2911
- const ne = x.some((we) => we.id === _), ce = y.includes(_), Oe = Ce == null ? void 0 : Ce.some(
2911
+ const ne = x.some((we) => we.id === _), de = y.includes(_), Oe = Ce == null ? void 0 : Ce.some(
2912
2912
  (we) => we.groupId === _
2913
2913
  );
2914
- ne ? D.removeSelectedGroup(_) : ce ? D.removeGroupFromRemove(_) : Oe || D.addSelectedGroup({ id: _, role: "VIEWER" });
2914
+ ne ? D.removeSelectedGroup(_) : de ? D.removeGroupFromRemove(_) : Oe || D.addSelectedGroup({ id: _, role: "VIEWER" });
2915
2915
  }, Ue = (_, ne) => {
2916
2916
  D.updateSelectedGroupRole(_, ne);
2917
2917
  }, et = (_) => {
2918
2918
  D.addGroupToRemove(_), D.removeSelectedGroup(_);
2919
- }, U = (_, ne, ce) => {
2920
- D.addGroupToUpdate({ id: _, currentRole: ne, newRole: ce });
2921
- }, ue = N.filter(
2919
+ }, U = (_, ne, de) => {
2920
+ D.addGroupToUpdate({ id: _, currentRole: ne, newRole: de });
2921
+ }, oe = N.filter(
2922
2922
  (_) => x.some((ne) => ne.id === _.id)
2923
2923
  ), me = Ke.useMemo(() => C !== "groups" ? [] : N.filter((_) => _.type !== "TENANT_GROUP" ? !1 : _.name.toLowerCase().includes(o.toLowerCase()) || _.description && _.description.toLowerCase().includes(o.toLowerCase())), [N, C, o]), Ce = Ke.useMemo(() => {
2924
- var ne, ce;
2925
- const _ = ((ne = k == null ? void 0 : k.shares) == null ? void 0 : ne.specificGroups) || ((ce = k == null ? void 0 : k.shares) == null ? void 0 : ce.groups) || [];
2924
+ var ne, de;
2925
+ const _ = ((ne = k == null ? void 0 : k.shares) == null ? void 0 : ne.specificGroups) || ((de = k == null ? void 0 : k.shares) == null ? void 0 : de.groups) || [];
2926
2926
  return !_ || _.length === 0 ? [] : _.filter(
2927
2927
  (Oe) => {
2928
2928
  const we = N.find((Le) => Le.id === Oe.groupId);
@@ -3024,7 +3024,7 @@ function Wr({
3024
3024
  Ql,
3025
3025
  {
3026
3026
  selectedUsers: m,
3027
- selectedUserObjects: oe,
3027
+ selectedUserObjects: ce,
3028
3028
  onRemove: (_) => B(_),
3029
3029
  onRoleChange: K,
3030
3030
  getRoleOptions: Nt
@@ -3078,7 +3078,7 @@ function Wr({
3078
3078
  ri,
3079
3079
  {
3080
3080
  selectedGroups: x,
3081
- groupObjects: ue,
3081
+ groupObjects: oe,
3082
3082
  onRemove: Ne,
3083
3083
  onRoleChange: Ue,
3084
3084
  getRoleOptions: Nt
@@ -5959,7 +5959,7 @@ function cm() {
5959
5959
  }
5960
5960
  }
5961
5961
  }, [B, m == null ? void 0 : m.id, P]);
5962
- const Y = n.orgUserId || n.tenantId, oe = h && !w && Y && z, Ne = () => {
5962
+ const Y = n.orgUserId || n.tenantId, ce = h && !w && Y && z, Ne = () => {
5963
5963
  O(!0);
5964
5964
  };
5965
5965
  async function Ue() {
@@ -6130,7 +6130,7 @@ function cm() {
6130
6130
  ]
6131
6131
  }
6132
6132
  ),
6133
- oe && c && /* @__PURE__ */ a(
6133
+ ce && c && /* @__PURE__ */ a(
6134
6134
  V,
6135
6135
  {
6136
6136
  className: "h-7 p-2",
@@ -6779,37 +6779,37 @@ function fm() {
6779
6779
  (Ne) => Ne.column_name === O.id
6780
6780
  );
6781
6781
  if (!J) return;
6782
- const ae = na(J.data_type), Y = Ut(J.data_type), oe = Gt(J.data_type);
6783
- (Y || oe) && (R.id === xa || ((F = R.data.current) == null ? void 0 : F.type) === js) && C(J), (Y || oe) && (R.id === ya || ((B = R.data.current) == null ? void 0 : B.type) === Bs) ? M(J) : (ae || Y) && (R.id === va || ((K = R.data.current) == null ? void 0 : K.type) === Sn) ? (ae && N(J), Y && N(J, "COUNT")) : S(J) && (R.id === kn || ((se = R.data.current) == null ? void 0 : se.type) === Dn) && z(J);
6782
+ const ae = na(J.data_type), Y = Ut(J.data_type), ce = Gt(J.data_type);
6783
+ (Y || ce) && (R.id === xa || ((F = R.data.current) == null ? void 0 : F.type) === js) && C(J), (Y || ce) && (R.id === ya || ((B = R.data.current) == null ? void 0 : B.type) === Bs) ? M(J) : (ae || Y) && (R.id === va || ((K = R.data.current) == null ? void 0 : K.type) === Sn) ? (ae && N(J), Y && N(J, "COUNT")) : S(J) && (R.id === kn || ((se = R.data.current) == null ? void 0 : se.type) === Dn) && z(J);
6784
6784
  }
6785
6785
  if (R && ((G = R.data.current) == null ? void 0 : G.type) === js && n.some((J) => J.id === O.id)) {
6786
6786
  const J = n.findIndex(
6787
6787
  (Y) => Y.id === O.id
6788
6788
  ), ae = n.findIndex((Y) => Y.id === R.id);
6789
6789
  if (J !== -1 && ae !== -1 && J !== ae) {
6790
- const Y = [...n], [oe] = Y.splice(J, 1);
6791
- Y.splice(ae, 0, oe), p(Y);
6790
+ const Y = [...n], [ce] = Y.splice(J, 1);
6791
+ Y.splice(ae, 0, ce), p(Y);
6792
6792
  }
6793
6793
  }
6794
6794
  if (R && ((te = R.data.current) == null ? void 0 : te.type) === Bs && i.some((J) => J.id === O.id)) {
6795
6795
  const J = i.findIndex((Y) => Y.id === O.id), ae = i.findIndex((Y) => Y.id === R.id);
6796
6796
  if (J !== -1 && ae !== -1 && J !== ae) {
6797
- const Y = [...i], [oe] = Y.splice(J, 1);
6798
- Y.splice(ae, 0, oe), v(Y);
6797
+ const Y = [...i], [ce] = Y.splice(J, 1);
6798
+ Y.splice(ae, 0, ce), v(Y);
6799
6799
  }
6800
6800
  }
6801
6801
  if (R && ((H = R.data.current) == null ? void 0 : H.type) === Sn && s.some((J) => J.id === O.id)) {
6802
6802
  const J = s.findIndex((Y) => Y.id === O.id), ae = s.findIndex((Y) => Y.id === R.id);
6803
6803
  if (J !== -1 && ae !== -1 && J !== ae) {
6804
- const Y = [...s], [oe] = Y.splice(J, 1);
6805
- Y.splice(ae, 0, oe), x(Y);
6804
+ const Y = [...s], [ce] = Y.splice(J, 1);
6805
+ Y.splice(ae, 0, ce), x(Y);
6806
6806
  }
6807
6807
  }
6808
6808
  if (R && ((ie = R.data.current) == null ? void 0 : ie.type) === Dn && r.some((J) => J.id === O.id)) {
6809
6809
  const J = r.findIndex((Y) => Y.id === O.id), ae = r.findIndex((Y) => Y.id === R.id);
6810
6810
  if (J !== -1 && ae !== -1 && J !== ae) {
6811
- const Y = [...r], [oe] = Y.splice(J, 1);
6812
- Y.splice(ae, 0, oe), y(Y);
6811
+ const Y = [...r], [ce] = Y.splice(J, 1);
6812
+ Y.splice(ae, 0, ce), y(Y);
6813
6813
  }
6814
6814
  }
6815
6815
  L(k), o(null), c(null), d(n), u(s), m(r), h(i);
@@ -7190,11 +7190,11 @@ function ui({
7190
7190
  handleDatabaseChange: J,
7191
7191
  handleSchemaChange: ae,
7192
7192
  handleDatamodelChange: Y,
7193
- handleTableChange: oe,
7193
+ handleTableChange: ce,
7194
7194
  tableName: Ne,
7195
7195
  schemaName: Ue
7196
7196
  } = jt(), { data: et, refetch: U } = Be(i);
7197
- function ue() {
7197
+ function oe() {
7198
7198
  return t ? t(Ue, Ne, D) : /* @__PURE__ */ e(
7199
7199
  xm,
7200
7200
  {
@@ -7273,7 +7273,7 @@ function ui({
7273
7273
  Za,
7274
7274
  {
7275
7275
  refetch: G,
7276
- onChange: oe,
7276
+ onChange: ce,
7277
7277
  isError: R,
7278
7278
  items: I,
7279
7279
  isLoading: O,
@@ -7340,7 +7340,7 @@ function ui({
7340
7340
  ]
7341
7341
  }
7342
7342
  ),
7343
- ue(),
7343
+ oe(),
7344
7344
  /* @__PURE__ */ e("div", { className: "flex items-center justify-between gap-2 px-6 py-4", children: n === "main" && l && /* @__PURE__ */ e(W, {}) })
7345
7345
  ]
7346
7346
  }
@@ -7659,7 +7659,7 @@ function Cm() {
7659
7659
  }), u = E((G) => {
7660
7660
  var te;
7661
7661
  return (te = G == null ? void 0 : G.card) == null ? void 0 : te.python;
7662
- }), { sheetFilterValues: m } = Co(), {
7662
+ }), { cardFilterValues: m } = Co((c == null ? void 0 : c.id) ?? ""), {
7663
7663
  setCardCustomCfg: h,
7664
7664
  setQueryResultColumns: p,
7665
7665
  setCardSql: x,
@@ -11470,10 +11470,10 @@ function Mi() {
11470
11470
  });
11471
11471
  const J = /* @__PURE__ */ new Set();
11472
11472
  return (F = t == null ? void 0 : t.config) != null && F.metricColumns && t.config.metricColumns.forEach((Y) => {
11473
- const oe = Y.alias || Y.name;
11474
- J.add(oe), J.add(`${oe}_count`), J.add(`${oe}_sum`), J.add(`${oe}_avg`), J.add(`${oe}_min`), J.add(`${oe}_max`);
11473
+ const ce = Y.alias || Y.name;
11474
+ J.add(ce), J.add(`${ce}_count`), J.add(`${ce}_sum`), J.add(`${ce}_avg`), J.add(`${ce}_min`), J.add(`${ce}_max`);
11475
11475
  const Ne = Y.entityName || Y.qualifiedEntityName;
11476
- Ne && (J.add(`${Ne}_${oe}`), J.add(`${Ne}_${oe}_count`));
11476
+ Ne && (J.add(`${Ne}_${ce}`), J.add(`${Ne}_${ce}_count`));
11477
11477
  }), H.filter(
11478
11478
  (Y) => !ie.has(Y) && !J.has(Y)
11479
11479
  );
@@ -13899,11 +13899,11 @@ function Ph(t) {
13899
13899
  (U) => U.currentAIContext
13900
13900
  );
13901
13901
  const [n, s] = j(""), [r, l] = j(null), { authToken: i, tokenProps: c } = Xe(), o = E((U) => {
13902
- var ue;
13903
- return (ue = U == null ? void 0 : U.card) == null ? void 0 : ue.sql;
13902
+ var oe;
13903
+ return (oe = U == null ? void 0 : U.card) == null ? void 0 : oe.sql;
13904
13904
  }), d = E((U) => U.isDevMode), u = E((U) => {
13905
- var ue;
13906
- return (ue = U == null ? void 0 : U.card) == null ? void 0 : ue.python;
13905
+ var oe;
13906
+ return (oe = U == null ? void 0 : U.card) == null ? void 0 : oe.python;
13907
13907
  }), {
13908
13908
  setCardPython: m,
13909
13909
  setCardSql: h,
@@ -13952,19 +13952,24 @@ function Ph(t) {
13952
13952
  // Keep omit to avoid CORS issue with wildcard ACAO
13953
13953
  credentials: "omit",
13954
13954
  // Ensure we never send incomplete tool-input parts after a stopped stream
13955
- prepareSendMessagesRequest: ({ messages: U, body: ue }) => ({
13955
+ prepareSendMessagesRequest: ({ messages: U, body: oe }) => ({
13956
13956
  body: {
13957
- ...ue,
13957
+ ...oe,
13958
13958
  messages: uc(U)
13959
13959
  }
13960
13960
  })
13961
13961
  }),
13962
13962
  onError: (U) => {
13963
- console.log("on error", U);
13963
+ var oe;
13964
+ if (U.name === "AbortError" || (oe = U.message) != null && oe.includes("aborted")) {
13965
+ console.log("[Editor Assistant] Stream aborted (expected)");
13966
+ return;
13967
+ }
13968
+ console.error("[Editor Assistant] Stream error:", U);
13964
13969
  },
13965
13970
  onToolCall: J,
13966
- onFinish() {
13967
- s("");
13971
+ onFinish({ isAbort: U, isDisconnect: oe, isError: me }) {
13972
+ s(""), console.log(U ? "[Editor Assistant] Stream aborted by user" : oe ? "[Editor Assistant] Stream disconnected (network error)" : me ? "[Editor Assistant] Stream error occurred" : "[Editor Assistant] Stream completed successfully");
13968
13973
  }
13969
13974
  });
13970
13975
  Me(() => {
@@ -13974,9 +13979,9 @@ function Ph(t) {
13974
13979
  }), T(!1));
13975
13980
  }, [g, v, se, T]);
13976
13981
  async function J({ toolCall: U }) {
13977
- var ue, me, Ce, Fe, ze, Ge, X, _, ne, ce, Oe, we, Le, Pe, rt, Ma;
13982
+ var oe, me, Ce, Fe, ze, Ge, X, _, ne, de, Oe, we, Le, Pe, rt, Ma;
13978
13983
  if (["createChartFromSql", "createForecast"].includes(U.toolName)) {
13979
- const ma = ((ue = U.input) == null ? void 0 : ue.sql) ?? ((me = U.args) == null ? void 0 : me.sql), yt = ((Ce = U.input) == null ? void 0 : Ce.python) ?? ((Fe = U.args) == null ? void 0 : Fe.python), _e = ((ze = U.input) == null ? void 0 : ze.chartType) ?? ((Ge = U.args) == null ? void 0 : Ge.chartType);
13984
+ const ma = ((oe = U.input) == null ? void 0 : oe.sql) ?? ((me = U.args) == null ? void 0 : me.sql), yt = ((Ce = U.input) == null ? void 0 : Ce.python) ?? ((Fe = U.args) == null ? void 0 : Fe.python), _e = ((ze = U.input) == null ? void 0 : ze.chartType) ?? ((Ge = U.args) == null ? void 0 : Ge.chartType);
13980
13985
  x(_e), h(ma), m(yt), p(!0), te({
13981
13986
  tool: U.toolName,
13982
13987
  toolCallId: U.toolCallId,
@@ -14008,7 +14013,7 @@ function Ph(t) {
14008
14013
  });
14009
14014
  } else if (U.toolName === "generateQueryConfig") {
14010
14015
  s("Generating query config...");
14011
- const ma = ((X = U.input) == null ? void 0 : X.chartType) ?? ((_ = U.args) == null ? void 0 : _.chartType), yt = ((ne = U.input) == null ? void 0 : ne.queryConfig) ?? ((ce = U.args) == null ? void 0 : ce.queryConfig);
14016
+ const ma = ((X = U.input) == null ? void 0 : X.chartType) ?? ((_ = U.args) == null ? void 0 : _.chartType), yt = ((ne = U.input) == null ? void 0 : ne.queryConfig) ?? ((de = U.args) == null ? void 0 : de.queryConfig);
14012
14017
  ((Oe = U.input) == null ? void 0 : Oe.cardConfig) ?? ((we = U.args) == null || we.cardConfig), x(ma), A(yt), h(void 0), m(void 0);
14013
14018
  const _e = await C();
14014
14019
  if ((Le = _e == null ? void 0 : _e.data) != null && Le.error) {
@@ -14049,12 +14054,12 @@ function Ph(t) {
14049
14054
  s("Analyzing...");
14050
14055
  }
14051
14056
  function ae(U) {
14052
- const ue = hc(f, U);
14053
- Y(ue);
14057
+ const oe = hc(f, U);
14058
+ Y(oe);
14054
14059
  }
14055
14060
  function Y(U) {
14056
- const ue = fc(U);
14057
- L(ue), F((me) => [
14061
+ const oe = fc(U);
14062
+ L(oe), F((me) => [
14058
14063
  ...me,
14059
14064
  {
14060
14065
  id: crypto.randomUUID(),
@@ -14063,14 +14068,14 @@ function Ph(t) {
14063
14068
  {
14064
14069
  type: "text",
14065
14070
  text: `Current scope of tables. Always use the table reference format when generating SQL | ${JSON.stringify(
14066
- ue
14071
+ oe
14067
14072
  )}`
14068
14073
  }
14069
14074
  ]
14070
14075
  }
14071
14076
  ]);
14072
14077
  }
14073
- function oe() {
14078
+ function ce() {
14074
14079
  const U = {
14075
14080
  databaseName: I || "",
14076
14081
  schemaName: S || "",
@@ -14079,8 +14084,8 @@ function Ph(t) {
14079
14084
  datamodelName: Ur(k),
14080
14085
  connectionId: w || "",
14081
14086
  connectionType: O || ""
14082
- }, ue = Gr([...f, U]);
14083
- Y(ue);
14087
+ }, oe = Gr([...f, U]);
14088
+ Y(oe);
14084
14089
  }
14085
14090
  function Ne() {
14086
14091
  const U = {
@@ -14114,7 +14119,7 @@ function Ph(t) {
14114
14119
  regenerate: B,
14115
14120
  isLoading: Ue,
14116
14121
  handleSetAIScope: Ne,
14117
- handleAddCurrentTableToScope: oe,
14122
+ handleAddCurrentTableToScope: ce,
14118
14123
  removeFromCurrentSelections: ae,
14119
14124
  currentAssitantScope: f,
14120
14125
  setCurrentAssitantScope: L,
@@ -14173,7 +14178,7 @@ function el({
14173
14178
  }, {
14174
14179
  visibleMessages: ae,
14175
14180
  hasMoreMessages: Y,
14176
- totalMessageCount: oe,
14181
+ totalMessageCount: ce,
14177
14182
  loadMoreMessages: Ne,
14178
14183
  resetMessageWindow: Ue
14179
14184
  } = bc(k, {
@@ -14186,7 +14191,7 @@ function el({
14186
14191
  }), {
14187
14192
  scrollRef: et,
14188
14193
  isAtBottom: U,
14189
- hasNewMessages: ue,
14194
+ hasNewMessages: oe,
14190
14195
  newMessageCount: me,
14191
14196
  scrollToBottom: Ce,
14192
14197
  handleScroll: Fe,
@@ -14241,7 +14246,7 @@ function el({
14241
14246
  } catch (st) {
14242
14247
  console.error("Failed to copy conversation", st), he.error("Unable to copy conversation");
14243
14248
  }
14244
- }, [k]), ce = be(() => {
14249
+ }, [k]), de = be(() => {
14245
14250
  X(!y);
14246
14251
  }, [y, X]);
14247
14252
  function Oe(pe, st) {
@@ -14359,7 +14364,7 @@ function el({
14359
14364
  {
14360
14365
  tooltip: y ? "Exit Fullscreen" : "Expand",
14361
14366
  className: "h-7 p-2 text-muted-foreground/50 hover:text-foreground",
14362
- onClick: ce,
14367
+ onClick: de,
14363
14368
  children: y ? /* @__PURE__ */ e(kc, { className: "size-4" }) : /* @__PURE__ */ e(Dc, { className: "size-4" })
14364
14369
  }
14365
14370
  ),
@@ -14415,10 +14420,10 @@ function el({
14415
14420
  className: "text-xs",
14416
14421
  children: [
14417
14422
  "Load ",
14418
- Math.min(5, oe - ae.length),
14423
+ Math.min(5, ce - ae.length),
14419
14424
  " ",
14420
14425
  "more messages (",
14421
- oe - ae.length,
14426
+ ce - ae.length,
14422
14427
  " ",
14423
14428
  "hidden)"
14424
14429
  ]
@@ -14451,7 +14456,7 @@ function el({
14451
14456
  "aria-label": "Scroll to bottom",
14452
14457
  children: [
14453
14458
  /* @__PURE__ */ e(Zt, { className: "h-4 w-4" }),
14454
- ue && me > 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: me > 9 ? "9+" : me })
14459
+ oe && me > 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: me > 9 ? "9+" : me })
14455
14460
  ]
14456
14461
  }
14457
14462
  ) }),
@@ -14932,7 +14937,7 @@ function _h({ field: t }) {
14932
14937
  /* @__PURE__ */ e(iu, { className: "h-4 w-4 text-muted-foreground" }),
14933
14938
  /* @__PURE__ */ e("span", { className: "break-all", children: t.name })
14934
14939
  ] }),
14935
- /* @__PURE__ */ e(de, { variant: "outline", className: "mt-2 text-xs", children: t.dataType })
14940
+ /* @__PURE__ */ e(ue, { variant: "outline", className: "mt-2 text-xs", children: t.dataType })
14936
14941
  ] }) }) })
14937
14942
  ]
14938
14943
  }
@@ -15052,7 +15057,7 @@ function Vh() {
15052
15057
  children: [
15053
15058
  /* @__PURE__ */ e("span", { className: "max-w-[190px] truncate text-ellipsis whitespace-nowrap text-sm font-medium text-primary", children: w.label || w.entityName }),
15054
15059
  /* @__PURE__ */ e(
15055
- de,
15060
+ ue,
15056
15061
  {
15057
15062
  variant: "secondary",
15058
15063
  className: "rounded-full text-xs text-muted-foreground group-hover:bg-background",
@@ -15429,9 +15434,9 @@ function Uh({
15429
15434
  className: "hover:bg-muted",
15430
15435
  value: T.name,
15431
15436
  children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
15432
- /* @__PURE__ */ e(de, { variant: "outline", className: "text-xs", children: T.type }),
15437
+ /* @__PURE__ */ e(ue, { variant: "outline", className: "text-xs", children: T.type }),
15433
15438
  T.name,
15434
- /* @__PURE__ */ e(de, { variant: "outline", className: "text-xs text-green-600", children: "BASE" })
15439
+ /* @__PURE__ */ e(ue, { variant: "outline", className: "text-xs text-green-600", children: "BASE" })
15435
15440
  ] })
15436
15441
  },
15437
15442
  T.name
@@ -15466,7 +15471,7 @@ function Uh({
15466
15471
  return /* @__PURE__ */ a(Qt, { className: "border", children: [
15467
15472
  /* @__PURE__ */ e(ds, { className: "pb-3", children: /* @__PURE__ */ a("div", { className: "flex items-center justify-between", children: [
15468
15473
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
15469
- /* @__PURE__ */ e(de, { children: T.sequence }),
15474
+ /* @__PURE__ */ e(ue, { children: T.sequence }),
15470
15475
  /* @__PURE__ */ a(us, { className: "text-sm", children: [
15471
15476
  "Join ",
15472
15477
  T.sequence,
@@ -15553,7 +15558,7 @@ function Uh({
15553
15558
  value: O.name,
15554
15559
  children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
15555
15560
  /* @__PURE__ */ e(
15556
- de,
15561
+ ue,
15557
15562
  {
15558
15563
  variant: "outline",
15559
15564
  className: "text-xs",
@@ -15652,7 +15657,7 @@ function Uh({
15652
15657
  value: O.name,
15653
15658
  children: /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
15654
15659
  /* @__PURE__ */ e(
15655
- de,
15660
+ ue,
15656
15661
  {
15657
15662
  variant: "outline",
15658
15663
  className: "text-xs",
@@ -15661,7 +15666,7 @@ function Uh({
15661
15666
  ),
15662
15667
  O.name,
15663
15668
  O.name === T.source.name && /* @__PURE__ */ e(
15664
- de,
15669
+ ue,
15665
15670
  {
15666
15671
  variant: "outline",
15667
15672
  className: "text-xs text-yellow-600",
@@ -15781,7 +15786,7 @@ function Uh({
15781
15786
  children: /* @__PURE__ */ a("div", { className: "flex w-full items-center justify-between", children: [
15782
15787
  /* @__PURE__ */ e("span", { children: B.name }),
15783
15788
  /* @__PURE__ */ e(
15784
- de,
15789
+ ue,
15785
15790
  {
15786
15791
  variant: "outline",
15787
15792
  className: "ml-2 text-xs",
@@ -15876,7 +15881,7 @@ function Uh({
15876
15881
  children: /* @__PURE__ */ a("div", { className: "flex w-full items-center justify-between hover:bg-muted", children: [
15877
15882
  /* @__PURE__ */ e("span", { children: B.name }),
15878
15883
  /* @__PURE__ */ e(
15879
- de,
15884
+ ue,
15880
15885
  {
15881
15886
  variant: "outline",
15882
15887
  className: "ml-2 text-xs",
@@ -16003,9 +16008,9 @@ function Gh({
16003
16008
  );
16004
16009
  return /* @__PURE__ */ a(W, { children: [
16005
16010
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1 rounded-md border bg-muted px-2 py-1", children: [
16006
- /* @__PURE__ */ e(de, { variant: "secondary", className: "text-xs", children: i == null ? void 0 : i.type }),
16011
+ /* @__PURE__ */ e(ue, { variant: "secondary", className: "text-xs", children: i == null ? void 0 : i.type }),
16007
16012
  /* @__PURE__ */ e("span", { className: "text-xs font-medium", children: i == null ? void 0 : i.name }),
16008
- /* @__PURE__ */ e(de, { variant: "outline", className: "text-xs text-green-600", children: "BASE" })
16013
+ /* @__PURE__ */ e(ue, { variant: "outline", className: "text-xs text-green-600", children: "BASE" })
16009
16014
  ] }),
16010
16015
  l.map((c) => {
16011
16016
  const o = s.find(
@@ -16013,11 +16018,11 @@ function Gh({
16013
16018
  );
16014
16019
  return /* @__PURE__ */ a("div", { className: "flex items-center", children: [
16015
16020
  /* @__PURE__ */ a("div", { className: "mx-1 flex items-center gap-1", children: [
16016
- /* @__PURE__ */ e(de, { variant: "outline", className: "text-xs", children: c.joinType }),
16021
+ /* @__PURE__ */ e(ue, { variant: "outline", className: "text-xs", children: c.joinType }),
16017
16022
  /* @__PURE__ */ e("span", { className: "text-muted-foreground", children: "→" })
16018
16023
  ] }),
16019
16024
  /* @__PURE__ */ a("div", { className: "flex items-center gap-1 rounded-md border bg-muted px-2 py-1", children: [
16020
- /* @__PURE__ */ e(de, { variant: "secondary", className: "text-xs", children: o == null ? void 0 : o.type }),
16025
+ /* @__PURE__ */ e(ue, { variant: "secondary", className: "text-xs", children: o == null ? void 0 : o.type }),
16021
16026
  /* @__PURE__ */ e("span", { className: "text-xs font-medium", children: o == null ? void 0 : o.name })
16022
16027
  ] })
16023
16028
  ] }, c.id);
@@ -16042,14 +16047,14 @@ function Gh({
16042
16047
  {
16043
16048
  className: "flex items-center gap-2 rounded-md bg-muted p-2 text-left",
16044
16049
  children: [
16045
- /* @__PURE__ */ e(de, { variant: "secondary", className: "shrink-0 text-xs", children: i + 1 }),
16046
- /* @__PURE__ */ e(de, { variant: "outline", className: "shrink-0 text-xs", children: l.joinType }),
16050
+ /* @__PURE__ */ e(ue, { variant: "secondary", className: "shrink-0 text-xs", children: i + 1 }),
16051
+ /* @__PURE__ */ e(ue, { variant: "outline", className: "shrink-0 text-xs", children: l.joinType }),
16047
16052
  /* @__PURE__ */ a("span", { className: "text-xs font-medium", children: [
16048
16053
  c == null ? void 0 : c.name,
16049
16054
  " → ",
16050
16055
  o == null ? void 0 : o.name
16051
16056
  ] }),
16052
- /* @__PURE__ */ a(de, { variant: "outline", className: "ml-auto text-xs", children: [
16057
+ /* @__PURE__ */ a(ue, { variant: "outline", className: "ml-auto text-xs", children: [
16053
16058
  l.joinKeyGroups.reduce(
16054
16059
  (d, u) => d + u.keys.length,
16055
16060
  0
@@ -16304,7 +16309,7 @@ function Yh({
16304
16309
  }
16305
16310
  )
16306
16311
  ] }),
16307
- /* @__PURE__ */ a(de, { variant: "secondary", children: [
16312
+ /* @__PURE__ */ a(ue, { variant: "secondary", children: [
16308
16313
  s.length,
16309
16314
  " of ",
16310
16315
  c.length,
@@ -16332,7 +16337,7 @@ function Yh({
16332
16337
  /* @__PURE__ */ e("div", { className: "truncate font-medium", children: p(f) }),
16333
16338
  /* @__PURE__ */ e("div", { className: "truncate text-sm text-muted-foreground", children: x(f) })
16334
16339
  ] }),
16335
- /* @__PURE__ */ e(de, { variant: "outline", className: "text-xs", children: f.type })
16340
+ /* @__PURE__ */ e(ue, { variant: "outline", className: "text-xs", children: f.type })
16336
16341
  ]
16337
16342
  },
16338
16343
  `${f.type}-${f.name}-${v}`
@@ -16485,7 +16490,7 @@ function Wh({
16485
16490
  m.selectedEntities.length > 0 && /* @__PURE__ */ e(ft, { children: /* @__PURE__ */ a("div", { className: "flex flex-wrap gap-1", children: [
16486
16491
  m.selectedEntities.slice(0, 3).map((h, p) => /* @__PURE__ */ a(Qe, { children: [
16487
16492
  /* @__PURE__ */ e(Ze, { asChild: !0, children: /* @__PURE__ */ a(
16488
- de,
16493
+ ue,
16489
16494
  {
16490
16495
  variant: "secondary",
16491
16496
  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",
@@ -16515,7 +16520,7 @@ function Wh({
16515
16520
  /* @__PURE__ */ e(qh, { entity: h })
16516
16521
  ] }, `${h.type}-${h.name}-${p}`)),
16517
16522
  m.selectedEntities.length > 3 && /* @__PURE__ */ a(Qe, { children: [
16518
- /* @__PURE__ */ e(Ze, { asChild: !0, children: /* @__PURE__ */ a(de, { variant: "outline", className: "text-xs", children: [
16523
+ /* @__PURE__ */ e(Ze, { asChild: !0, children: /* @__PURE__ */ a(ue, { variant: "outline", className: "text-xs", children: [
16519
16524
  "+",
16520
16525
  m.selectedEntities.length - 3,
16521
16526
  " more"
@@ -17422,7 +17427,7 @@ function lp({
17422
17427
  t.aliasTemplate || ""
17423
17428
  ), [J, ae] = j(
17424
17429
  t.valueAliases || {}
17425
- ), [Y, oe] = j((Ar = t.parameters) == null ? void 0 : Ar.filters), Ne = (Q) => {
17430
+ ), [Y, ce] = j((Ar = t.parameters) == null ? void 0 : Ar.filters), Ne = (Q) => {
17426
17431
  Q === "custom" ? se(!0) : (se(!1), P(Q), n === "groupBy" && v(s, Q, ""));
17427
17432
  }, Ue = (Q) => {
17428
17433
  B(Q), n === "groupBy" && v(s, "custom", Q);
@@ -17433,13 +17438,13 @@ function lp({
17433
17438
  Ye && !K && (P(Ye), n === "groupBy" && v(s, Ye, "")), n === "groupBy" && g(s, Q);
17434
17439
  }, U = (Q) => {
17435
17440
  ie(Q), n === "metrics" && b(s, Q);
17436
- }, ue = (Q) => {
17441
+ }, oe = (Q) => {
17437
17442
  ae(Q), n === "metrics" && I(s, Q);
17438
17443
  }, me = (Q) => {
17439
17444
  y(n, s, Q);
17440
17445
  }, Ce = (Q) => {
17441
17446
  var $e;
17442
- if (oe(Q), n === "metrics") {
17447
+ if (ce(Q), n === "metrics") {
17443
17448
  const Ye = {
17444
17449
  ...t,
17445
17450
  parameters: {
@@ -17517,7 +17522,7 @@ function lp({
17517
17522
  { value: "custom", label: "Custom Format..." }
17518
17523
  ];
17519
17524
  }
17520
- }, ce = ne(G), Oe = n !== "pivotBy", we = X && n === "groupBy", Le = !_ && X && n === "groupBy", Pe = _ && X && n === "groupBy", rt = _ && n === "metrics" && ((Ir = x.config) == null ? void 0 : Ir.comparisonType) === "target", Ma = n === "metrics", ma = () => /* @__PURE__ */ e(
17525
+ }, de = ne(G), Oe = n !== "pivotBy", we = X && n === "groupBy", Le = !_ && X && n === "groupBy", Pe = _ && X && n === "groupBy", rt = _ && n === "metrics" && ((Ir = x.config) == null ? void 0 : Ir.comparisonType) === "target", Ma = n === "metrics", ma = () => /* @__PURE__ */ e(
17521
17526
  "div",
17522
17527
  {
17523
17528
  title: `${t.entityName}.${t.name}`,
@@ -17562,7 +17567,7 @@ function lp({
17562
17567
  onValueChange: Ne,
17563
17568
  children: [
17564
17569
  /* @__PURE__ */ e(ge, { className: "h-8 w-full text-xs", children: /* @__PURE__ */ e(xe, { placeholder: "Select date format..." }) }),
17565
- /* @__PURE__ */ e(ve, { children: ce.map((Q) => /* @__PURE__ */ e(
17570
+ /* @__PURE__ */ e(ve, { children: de.map((Q) => /* @__PURE__ */ e(
17566
17571
  ee,
17567
17572
  {
17568
17573
  className: "text-xs",
@@ -17754,7 +17759,7 @@ function lp({
17754
17759
  conditions: Ye
17755
17760
  };
17756
17761
  Ce(ea);
17757
- } else if (oe(void 0), n === "metrics") {
17762
+ } else if (ce(void 0), n === "metrics") {
17758
17763
  const ea = {
17759
17764
  ...t,
17760
17765
  parameters: {
@@ -17805,7 +17810,7 @@ function lp({
17805
17810
  ap,
17806
17811
  {
17807
17812
  valueAliases: J,
17808
- onValueAliasesChange: ue
17813
+ onValueAliasesChange: oe
17809
17814
  }
17810
17815
  )
17811
17816
  ] })
@@ -17920,7 +17925,7 @@ function lp({
17920
17925
  var $e;
17921
17926
  if (Q)
17922
17927
  Ce(Q);
17923
- else if (oe(void 0), n === "metrics") {
17928
+ else if (ce(void 0), n === "metrics") {
17924
17929
  const Ye = {
17925
17930
  ...t,
17926
17931
  parameters: {
@@ -19183,7 +19188,7 @@ function vp({
19183
19188
  children: [
19184
19189
  /* @__PURE__ */ e("div", { className: "flex flex-1 flex-wrap gap-1", children: n.length > 0 ? n.map((m) => {
19185
19190
  const h = o.find((p) => p.value === m);
19186
- return /* @__PURE__ */ a(de, { variant: "secondary", className: "text-xs", children: [
19191
+ return /* @__PURE__ */ a(ue, { variant: "secondary", className: "text-xs", children: [
19187
19192
  h == null ? void 0 : h.label,
19188
19193
  /* @__PURE__ */ e(
19189
19194
  "div",
@@ -20430,7 +20435,7 @@ function Lp({
20430
20435
  errorSql: K,
20431
20436
  pagination: se
20432
20437
  } = Be(c), G = (ae, Y) => {
20433
- const oe = {
20438
+ const ce = {
20434
20439
  ...c,
20435
20440
  paginationConfig: {
20436
20441
  page: ae + 1,
@@ -20438,7 +20443,7 @@ function Lp({
20438
20443
  pageSize: Y
20439
20444
  }
20440
20445
  };
20441
- y(oe), f(oe);
20446
+ y(ce), f(ce);
20442
20447
  };
20443
20448
  function te() {
20444
20449
  return /* @__PURE__ */ a("div", { className: "relative border-b border-border bg-background p-4", children: [
@@ -20484,35 +20489,35 @@ function Lp({
20484
20489
  });
20485
20490
  return;
20486
20491
  }
20487
- const Y = m.config, oe = ae.map(({ id: Ne, desc: Ue }) => {
20492
+ const Y = m.config, ce = ae.map(({ id: Ne, desc: Ue }) => {
20488
20493
  var me, Ce;
20489
20494
  const et = (me = Y.metricColumns) == null ? void 0 : me.find(
20490
20495
  (Fe) => Fe.label === Ne
20491
20496
  ), U = (Ce = Y.groupByColumns) == null ? void 0 : Ce.find(
20492
20497
  (Fe) => Fe.label === Ne
20493
- ), ue = et || U;
20494
- return ue ? {
20495
- id: ed("sortBy", ue),
20496
- name: ue.name,
20497
- dataType: ue.dataType,
20498
- label: ue.label,
20499
- qualifiedEntityName: ue.qualifiedEntityName,
20500
- entityId: ue.entityId,
20501
- entityName: ue.entityName,
20502
- entityType: ue.entityType,
20498
+ ), oe = et || U;
20499
+ return oe ? {
20500
+ id: ed("sortBy", oe),
20501
+ name: oe.name,
20502
+ dataType: oe.dataType,
20503
+ label: oe.label,
20504
+ qualifiedEntityName: oe.qualifiedEntityName,
20505
+ entityId: oe.entityId,
20506
+ entityName: oe.entityName,
20507
+ entityType: oe.entityType,
20503
20508
  role: "sortby",
20504
20509
  direction: Ue ? "desc" : "asc"
20505
20510
  } : null;
20506
20511
  }).filter((Ne) => Ne !== null);
20507
20512
  x(m.id, {
20508
20513
  ...Y,
20509
- sortByColumns: oe
20514
+ sortByColumns: ce
20510
20515
  });
20511
20516
  }, ie = Ve(() => {
20512
20517
  var ae, Y;
20513
- return (Y = (ae = m.config) == null ? void 0 : ae.sortByColumns) == null ? void 0 : Y.map((oe) => ({
20514
- id: oe.label,
20515
- desc: oe.direction === "desc"
20518
+ return (Y = (ae = m.config) == null ? void 0 : ae.sortByColumns) == null ? void 0 : Y.map((ce) => ({
20519
+ id: ce.label,
20520
+ desc: ce.direction === "desc"
20516
20521
  }));
20517
20522
  }, [(J = m.config) == null ? void 0 : J.sortByColumns]);
20518
20523
  return /* @__PURE__ */ a("div", { className: "relative flex w-0 grow flex-col", children: [
@@ -20587,16 +20592,16 @@ function Lp({
20587
20592
  D("Card ID cannot be empty");
20588
20593
  return;
20589
20594
  }
20590
- const oe = b(m.id, Y);
20591
- if (oe.success) {
20595
+ const ce = b(m.id, Y);
20596
+ if (ce.success) {
20592
20597
  v(Y);
20593
20598
  const Ne = { ...m, id: Y };
20594
20599
  y(Ne), f(Ne), D(null), he.success("Card ID updated successfully");
20595
20600
  } else
20596
20601
  D(
20597
- oe.error || "Failed to update Card ID"
20602
+ ce.error || "Failed to update Card ID"
20598
20603
  ), he.error(
20599
- oe.error || "Failed to update Card ID"
20604
+ ce.error || "Failed to update Card ID"
20600
20605
  );
20601
20606
  },
20602
20607
  isEditable: !0,
@@ -21367,7 +21372,7 @@ function Zp({
21367
21372
  children: t.title || "Untitled Visual"
21368
21373
  }
21369
21374
  ),
21370
- t.ownership.status === "shared" && /* @__PURE__ */ a(de, { variant: "outline", className: "text-xs", children: [
21375
+ t.ownership.status === "shared" && /* @__PURE__ */ a(ue, { variant: "outline", className: "text-xs", children: [
21371
21376
  /* @__PURE__ */ e(je, { className: "mr-1 h-2.5 w-2.5" }),
21372
21377
  "Shared"
21373
21378
  ] })
@@ -21624,8 +21629,8 @@ function Xp() {
21624
21629
  ca();
21625
21630
  const R = N.filter(
21626
21631
  (U) => {
21627
- var ue, me;
21628
- return ((ue = U == null ? void 0 : U.title) == null ? void 0 : ue.toLowerCase().includes(t.toLowerCase())) || ((me = U == null ? void 0 : U.description) == null ? void 0 : me.toLowerCase().includes(t.toLowerCase()));
21632
+ var oe, me;
21633
+ return ((oe = U == null ? void 0 : U.title) == null ? void 0 : oe.toLowerCase().includes(t.toLowerCase())) || ((me = U == null ? void 0 : U.description) == null ? void 0 : me.toLowerCase().includes(t.toLowerCase()));
21629
21634
  }
21630
21635
  ), P = (U) => new Date(U).toLocaleDateString("en-US", {
21631
21636
  month: "short",
@@ -21645,10 +21650,10 @@ function Xp() {
21645
21650
  startUpdating: se,
21646
21651
  stopUpdating: G,
21647
21652
  isUpdating: te
21648
- } = $l(), H = (U, ue, me) => {
21653
+ } = $l(), H = (U, oe, me) => {
21649
21654
  var Ge;
21650
21655
  const Ce = Object.fromEntries(
21651
- Object.entries(ue).filter(([, X]) => X !== void 0)
21656
+ Object.entries(oe).filter(([, X]) => X !== void 0)
21652
21657
  );
21653
21658
  if (Object.keys(Ce).length === 0) {
21654
21659
  (Ge = me == null ? void 0 : me.onSuccess) == null || Ge.call(me);
@@ -21680,14 +21685,14 @@ function Xp() {
21680
21685
  }, ae = (U) => {
21681
21686
  S(U);
21682
21687
  }, Y = (U) => {
21683
- const ue = N.find((me) => me.id === U);
21684
- ue && T({
21688
+ const oe = N.find((me) => me.id === U);
21689
+ oe && T({
21685
21690
  resourceId: U,
21686
21691
  data: {
21687
- isPrivate: !ue.isPrivate
21692
+ isPrivate: !oe.isPrivate
21688
21693
  }
21689
21694
  });
21690
- }, oe = (U) => {
21695
+ }, ce = (U) => {
21691
21696
  h(U), u(!0);
21692
21697
  }, Ne = (U) => {
21693
21698
  I(U);
@@ -21695,12 +21700,12 @@ function Xp() {
21695
21700
  I(null);
21696
21701
  }, et = ({
21697
21702
  title: U,
21698
- description: ue
21703
+ description: oe
21699
21704
  }) => {
21700
21705
  if (!b)
21701
21706
  return;
21702
21707
  const me = {};
21703
- U !== b.title && (me.title = U), (b.description || "") !== ue && (me.description = ue), H(b.id, me, {
21708
+ U !== b.title && (me.title = U), (b.description || "") !== oe && (me.description = oe), H(b.id, me, {
21704
21709
  onSuccess: () => {
21705
21710
  I(null);
21706
21711
  }
@@ -21811,7 +21816,7 @@ function Xp() {
21811
21816
  onDeleteClick: B,
21812
21817
  onDuplicateVisual: ie,
21813
21818
  onTogglePrivacy: Y,
21814
- onShareVisual: oe,
21819
+ onShareVisual: ce,
21815
21820
  isDeleting: O,
21816
21821
  isDuplicating: v === U.id,
21817
21822
  formatDate: P
@@ -21928,7 +21933,7 @@ function ef({
21928
21933
  children: t.title || "Untitled Dashboard"
21929
21934
  }
21930
21935
  ),
21931
- t.ownership.status === "shared" && /* @__PURE__ */ a(de, { variant: "outline", className: "text-xs", children: [
21936
+ t.ownership.status === "shared" && /* @__PURE__ */ a(ue, { variant: "outline", className: "text-xs", children: [
21932
21937
  /* @__PURE__ */ e(je, { className: "mr-1 h-2.5 w-2.5" }),
21933
21938
  "Shared"
21934
21939
  ] })
@@ -22085,8 +22090,8 @@ function af(t) {
22085
22090
  }
22086
22091
  ), { currentUser: H } = ca(), ie = O.filter(
22087
22092
  (_) => {
22088
- var ne, ce;
22089
- return ((ne = _ == null ? void 0 : _.title) == null ? void 0 : ne.toLowerCase().includes(l.toLowerCase())) || ((ce = _ == null ? void 0 : _.description) == null ? void 0 : ce.toLowerCase().includes(l.toLowerCase()));
22093
+ var ne, de;
22094
+ return ((ne = _ == null ? void 0 : _.title) == null ? void 0 : ne.toLowerCase().includes(l.toLowerCase())) || ((de = _ == null ? void 0 : _.description) == null ? void 0 : de.toLowerCase().includes(l.toLowerCase()));
22090
22095
  }
22091
22096
  ), J = (_) => new Date(_).toLocaleDateString("en-US", {
22092
22097
  month: "short",
@@ -22100,7 +22105,7 @@ function af(t) {
22100
22105
  });
22101
22106
  }, Y = (_) => {
22102
22107
  n == null || n(_);
22103
- }, oe = (_) => {
22108
+ }, ce = (_) => {
22104
22109
  I(_), g(!0);
22105
22110
  }, Ne = () => {
22106
22111
  b && K(b.id);
@@ -22111,14 +22116,14 @@ function af(t) {
22111
22116
  }, {
22112
22117
  startUpdating: et,
22113
22118
  stopUpdating: U,
22114
- isUpdating: ue
22115
- } = $l(), me = (_, ne, ce) => {
22119
+ isUpdating: oe
22120
+ } = $l(), me = (_, ne, de) => {
22116
22121
  var Pe;
22117
22122
  const Oe = Object.fromEntries(
22118
22123
  Object.entries(ne).filter(([, rt]) => rt !== void 0)
22119
22124
  );
22120
22125
  if (Object.keys(Oe).length === 0) {
22121
- (Pe = ce == null ? void 0 : ce.onSuccess) == null || Pe.call(ce);
22126
+ (Pe = de == null ? void 0 : de.onSuccess) == null || Pe.call(de);
22122
22127
  return;
22123
22128
  }
22124
22129
  const we = Object.keys(Oe), Le = we.length === 1 ? we[0] : void 0;
@@ -22130,17 +22135,17 @@ function af(t) {
22130
22135
  {
22131
22136
  onSuccess: () => {
22132
22137
  var rt;
22133
- U(_, Le), (rt = ce == null ? void 0 : ce.onSuccess) == null || rt.call(ce);
22138
+ U(_, Le), (rt = de == null ? void 0 : de.onSuccess) == null || rt.call(de);
22134
22139
  },
22135
22140
  onError: () => {
22136
22141
  var rt;
22137
- U(_, Le), (rt = ce == null ? void 0 : ce.onError) == null || rt.call(ce);
22142
+ U(_, Le), (rt = de == null ? void 0 : de.onError) == null || rt.call(de);
22138
22143
  }
22139
22144
  }
22140
22145
  );
22141
22146
  }, Ce = (_) => {
22142
22147
  const ne = O.find(
22143
- (ce) => ce.id === _
22148
+ (de) => de.id === _
22144
22149
  );
22145
22150
  ne && B({
22146
22151
  resourceId: _,
@@ -22160,8 +22165,8 @@ function af(t) {
22160
22165
  }) => {
22161
22166
  if (!S)
22162
22167
  return;
22163
- const ce = {};
22164
- _ !== S.title && (ce.title = _), (S.description || "") !== ne && (ce.description = ne), me(S.id, ce, {
22168
+ const de = {};
22169
+ _ !== S.title && (de.title = _), (S.description || "") !== ne && (de.description = ne), me(S.id, de, {
22165
22170
  onSuccess: () => {
22166
22171
  N(null);
22167
22172
  }
@@ -22258,7 +22263,7 @@ function af(t) {
22258
22263
  isDuplicating: D === _.id,
22259
22264
  onLoadDashboard: Y,
22260
22265
  onEditDetails: ze,
22261
- onDeleteClick: oe,
22266
+ onDeleteClick: ce,
22262
22267
  onDuplicateDashboard: Ue,
22263
22268
  onTogglePrivacy: Ce,
22264
22269
  onShareDashboard: Fe,
@@ -22322,7 +22327,7 @@ function af(t) {
22322
22327
  initialDescription: S.description || "",
22323
22328
  onClose: Ge,
22324
22329
  onSave: X,
22325
- isSaving: ue(S.id)
22330
+ isSaving: oe(S.id)
22326
22331
  }
22327
22332
  ),
22328
22333
  k.canCreateDashboards && !c && /* @__PURE__ */ e(