react-semaphor 0.1.443 → 0.1.444

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.
Files changed (24) hide show
  1. package/dist/chunks/{dashboard-Bd1Quco-.js → dashboard-CJNVq8XI.js} +3 -3
  2. package/dist/chunks/{dashboard-cB3xmTNn.js → dashboard-DxZuqe8t.js} +1 -1
  3. package/dist/chunks/{dashboard-briefing-launcher-C60n8LqW.js → dashboard-briefing-launcher-Bg_SeBV8.js} +2 -2
  4. package/dist/chunks/{dashboard-briefing-launcher-BYMLjZxG.js → dashboard-briefing-launcher-Do6ZcOj4.js} +1 -1
  5. package/dist/chunks/{dashboard-controls-BH_fZYDU.js → dashboard-controls-CYBi_mes.js} +1 -1
  6. package/dist/chunks/{dashboard-controls-ti9Rcel2.js → dashboard-controls-Da9MkPaf.js} +3 -3
  7. package/dist/chunks/{dashboard-json-Bturr634.js → dashboard-json-BtrdGo1U.js} +1 -1
  8. package/dist/chunks/{dashboard-json-Dw_55vSZ.js → dashboard-json-ezLyW7AK.js} +1 -1
  9. package/dist/chunks/edit-dashboard-visual-DEb9MeSM.js +182 -0
  10. package/dist/chunks/{edit-dashboard-visual-DglMds57.js → edit-dashboard-visual-kE6_3R3j.js} +147 -125
  11. package/dist/chunks/{editor-action-buttons-Cxo7_tNG.js → editor-action-buttons-8_CQa8Hb.js} +1 -1
  12. package/dist/chunks/{editor-action-buttons-CRi0fhVW.js → editor-action-buttons-DROkx4PS.js} +1 -1
  13. package/dist/chunks/{report-preferences-dialog-CCvFqH4Q.js → report-preferences-dialog-D5sIaFnb.js} +1 -1
  14. package/dist/chunks/{report-preferences-dialog-TtwdAuNn.js → report-preferences-dialog-Dq7rmN93.js} +1 -1
  15. package/dist/dashboard/index.cjs +1 -1
  16. package/dist/dashboard/index.js +1 -1
  17. package/dist/data-app-builder/index.cjs +1 -1
  18. package/dist/data-app-builder/index.js +1 -1
  19. package/dist/index.cjs +1 -1
  20. package/dist/index.js +4 -4
  21. package/dist/surfboard/index.cjs +1 -1
  22. package/dist/surfboard/index.js +2 -2
  23. package/package.json +1 -1
  24. package/dist/chunks/edit-dashboard-visual-BUc3NBQ4.js +0 -182
@@ -1,13 +1,13 @@
1
1
  import { jsx as e, jsxs as n, Fragment as Ce } from "react/jsx-runtime";
2
2
  import * as Jc from "react";
3
- import tn, { useState as U, useEffect as Se, useRef as Ee, useCallback as Ie, useMemo as de, useId as Yc, useContext as wr, Suspense as Xc } from "react";
4
- import { c_ as _i, aH as yn, aI as vn, aJ as Nn, aK as Cn, aL as Vn, aF as hs, bk as Ft, bl as Wt, c$ as zi, d0 as os, aG as it, d1 as $i, d2 as cs, b4 as Ra, aZ as wt, cg as Sr, b2 as la, bm as ia, bi as Bt, d3 as ps, d4 as Tr, d5 as Zc, d6 as qi, d7 as ed, d8 as td, d9 as nd, da as ad, db as sd, dc as or, dd as ds, az as Kn, an as ji, de as rd, df as ld, dg as Ki, dh as Ui, di as Gi, dj as id, dk as od, dl as cd, dm as dd, cO as kr, b1 as Qi, b8 as Hi, bj as Un, dn as Tn, dp as kn, dq as Ha, dr as nn, ds as aa, dt as cr, du as ud, c8 as Aa, dv as Wi, dw as jl, dx as Kl, bf as ta, aN as on, aO as yt, dy as md, dz as Ji, dA as Ir, I as ft, bY as lt, dB as $t, dC as hd, dD as Yi, dE as pd, dF as Xi, dG as fd, dH as gd, dI as xd, aD as Zi, dJ as bd, dK as yd, dL as vd, dM as Nd, dN as Cd, dO as wd, dP as _s, dQ as Sd, dR as Ul, dS as Td, dT as Gl, dU as kd, bh as Dt, dV as Id, cd as oa, ce as ca, cf as da, dW as Dr, dX as Er, bJ as Ar, aM as Or, dY as Dd, dZ as Ed, d_ as Mr, d$ as Ad, e0 as eo, e1 as to, e2 as no, e3 as ao, e4 as Zt, e5 as Od, e6 as Md, e7 as Fd, e8 as Rd, e9 as so, ea as ro, r as lo, eb as io, ec as Pd, ed as Ld, ee as Vd, ef as Pa, M as Bd, eg as _d, eh as zd, ei as Ql, ej as $d, E as Cs, e as Fr, ek as qd, el as Rr, bB as jd, em as Hl, en as Kd, eo as Ud, ep as oo, eq as co, er as Gd, es as Pr, et as Lr, eu as uo, ev as mo, ew as Wl, ex as Wa, ey as Qd, ez as Hd, eA as Wd, eB as Jd, eC as Yd, eD as fs, eE as Xd, eF as Zd, eG as ho, eH as po, eI as eu, eJ as tu, cr as nu, eK as au, eL as fo, eM as su, eN as ru, cs as ws, eO as Ss, bC as Fn, bD as zt, eP as Vr, eQ as Bn, eR as _n, eS as wn, eT as sa, eU as lu, eV as iu, eW as ou, eX as cu, eY as du, eZ as uu, e_ as Jl, bq as an, br as sn, bs as rn, e$ as mu, f0 as go, f1 as hu, f2 as pu, f3 as xo, f4 as fu, f5 as gu, f6 as xu, f7 as bu, f8 as zs, f9 as yu, fa as vu, fb as Ts, fc as Nu, fd as bo, fe as Cu, ff as wu, fg as Su, fh as Tu, fi as ku, fj as dr, fk as Iu, fl as Du, fm as ur, fn as Eu, fo as Au, fp as Ou, fq as Mu, fr as Yl, b3 as mr, a$ as Sn, aP as Fu, aQ as Ru, aS as Pu, aT as Lu, aU as Vu, aV as Bu, aW as _u, aX as zu, aY as $u, b_ as qu, fs as ju, ft as Ku, fu as La, fv as Va, fw as Ba, cH as zn, ci as Br, ck as yo, cl as vo, cm as No, bE as Uu, bF as Gu, cj as Qu, fx as Hu, fy as ks, fz as ct, fA as dt, fB as ut, fC as Wu, fD as Ju, fE as Co, fF as wo, fG as So, fH as Yu, fI as Xu, fJ as hr, fK as Zu, fL as em, fM as tm, fN as nm, fO as am, fP as sm, fQ as rm, fR as lm, fS as im, fT as om, fU as cm, fV as dm, fW as On, fX as Ia, fY as um, fZ as Xl, f_ as mm, f$ as hm, g0 as $s, g1 as Zl, g2 as pm, g3 as fm, g4 as gm, g5 as xm, g6 as bm, aB as _r, aC as _a, g7 as qs, g8 as To, b6 as ym, g9 as gs, ga as vm, gb as ko, gc as Io, gd as Nm, ge as Cm, ar as wm, gf as ss, gg as Sm, gh as ei, gi as Tm, gj as km, gk as ti, gl as Im, gm as Dm, gn as Em, go as Am, gp as Om, aR as Do, gq as Mm, gr as Fm, gs as Rm, gt as Pm, gu as Lm, gv as Vm, gw as Bm, gx as _m, gy as Eo, gz as zm, gA as $m, gB as Is, cI as Ds, gC as Ao, gD as qm, gE as jm, gF as Oo, gG as Km, gH as Um, gI as Es, gJ as js, gK as Gm, gL as Qm, gM as Hm, gN as Wm, gO as ra, gP as ni, gQ as Mo, gR as Jm, cu as Ym, gS as Fo, gT as Ro, gU as us, gV as Po, gW as Lo, gX as Xm, gY as ai, gZ as Zm, g_ as eh, g$ as ms, h0 as th, h1 as zr, h2 as nh, h3 as xs, h as za, i as $a, k as qa, j as ja, l as Ka, m as Ua, h4 as ah, h5 as Ga, h6 as gn, h7 as pr, h8 as fr, h9 as Qa, ha as Vo, hb as sh, hc as Ks, hd as Us, he as rh, hf as Gs, hg as lh, hh as si, hi as ri, hj as ih, cQ as oh, hk as ch, cR as dh, cT as uh, cU as mh, av as hh, hl as ph, hm as fh, hn as gh, bX as As, ho as Os, hp as li, hq as Bo, cK as Qs, hr as xh, hs as bh, ht as yh, F as vh, by as Nh, hu as Ch, hv as wh } from "./dashboard-Bd1Quco-.js";
3
+ import tn, { useState as U, useEffect as Se, useRef as ke, useCallback as De, useMemo as de, useId as Yc, useContext as wr, Suspense as Xc } from "react";
4
+ import { c_ as _i, aH as yn, aI as vn, aJ as Nn, aK as Cn, aL as Vn, aF as hs, bk as Ft, bl as Wt, c$ as zi, d0 as os, aG as it, d1 as $i, d2 as cs, b4 as Ra, aZ as wt, cg as Sr, b2 as la, bm as ia, bi as Bt, d3 as ps, d4 as Tr, d5 as Zc, d6 as qi, d7 as ed, d8 as td, d9 as nd, da as ad, db as sd, dc as or, dd as ds, az as Kn, an as ji, de as rd, df as ld, dg as Ki, dh as Ui, di as Gi, dj as id, dk as od, dl as cd, dm as dd, cO as kr, b1 as Qi, b8 as Hi, bj as Un, dn as Tn, dp as kn, dq as Ha, dr as nn, ds as aa, dt as cr, du as ud, c8 as Aa, dv as Wi, dw as jl, dx as Kl, bf as ta, aN as on, aO as yt, dy as md, dz as Ji, dA as Ir, I as ft, bY as lt, dB as $t, dC as hd, dD as Yi, dE as pd, dF as Xi, dG as fd, dH as gd, dI as xd, aD as Zi, dJ as bd, dK as yd, dL as vd, dM as Nd, dN as Cd, dO as wd, dP as _s, dQ as Sd, dR as Ul, dS as Td, dT as Gl, dU as kd, bh as Dt, dV as Id, cd as oa, ce as ca, cf as da, dW as Dr, dX as Er, bJ as Ar, aM as Or, dY as Dd, dZ as Ed, d_ as Mr, d$ as Ad, e0 as eo, e1 as to, e2 as no, e3 as ao, e4 as Zt, e5 as Od, e6 as Md, e7 as Fd, e8 as Rd, e9 as so, ea as ro, r as lo, eb as io, ec as Pd, ed as Ld, ee as Vd, ef as Pa, M as Bd, eg as _d, eh as zd, ei as Ql, ej as $d, E as Cs, e as Fr, ek as qd, el as Rr, bB as jd, em as Hl, en as Kd, eo as Ud, ep as oo, eq as co, er as Gd, es as Pr, et as Lr, eu as uo, ev as mo, ew as Wl, ex as Wa, ey as Qd, ez as Hd, eA as Wd, eB as Jd, eC as Yd, eD as fs, eE as Xd, eF as Zd, eG as ho, eH as po, eI as eu, eJ as tu, cr as nu, eK as au, eL as fo, eM as su, eN as ru, cs as ws, eO as Ss, bC as Fn, bD as zt, eP as Vr, eQ as Bn, eR as _n, eS as wn, eT as sa, eU as lu, eV as iu, eW as ou, eX as cu, eY as du, eZ as uu, e_ as Jl, bq as an, br as sn, bs as rn, e$ as mu, f0 as go, f1 as hu, f2 as pu, f3 as xo, f4 as fu, f5 as gu, f6 as xu, f7 as bu, f8 as zs, f9 as yu, fa as vu, fb as Ts, fc as Nu, fd as bo, fe as Cu, ff as wu, fg as Su, fh as Tu, fi as ku, fj as dr, fk as Iu, fl as Du, fm as ur, fn as Eu, fo as Au, fp as Ou, fq as Mu, fr as Yl, b3 as mr, a$ as Sn, aP as Fu, aQ as Ru, aS as Pu, aT as Lu, aU as Vu, aV as Bu, aW as _u, aX as zu, aY as $u, b_ as qu, fs as ju, ft as Ku, fu as La, fv as Va, fw as Ba, cH as zn, ci as Br, ck as yo, cl as vo, cm as No, bE as Uu, bF as Gu, cj as Qu, fx as Hu, fy as ks, fz as ct, fA as dt, fB as ut, fC as Wu, fD as Ju, fE as Co, fF as wo, fG as So, fH as Yu, fI as Xu, fJ as hr, fK as Zu, fL as em, fM as tm, fN as nm, fO as am, fP as sm, fQ as rm, fR as lm, fS as im, fT as om, fU as cm, fV as dm, fW as On, fX as Ia, fY as um, fZ as Xl, f_ as mm, f$ as hm, g0 as $s, g1 as Zl, g2 as pm, g3 as fm, g4 as gm, g5 as xm, g6 as bm, aB as _r, aC as _a, g7 as qs, g8 as To, b6 as ym, g9 as gs, ga as vm, gb as ko, gc as Io, gd as Nm, ge as Cm, ar as wm, gf as ss, gg as Sm, gh as ei, gi as Tm, gj as km, gk as ti, gl as Im, gm as Dm, gn as Em, go as Am, gp as Om, aR as Do, gq as Mm, gr as Fm, gs as Rm, gt as Pm, gu as Lm, gv as Vm, gw as Bm, gx as _m, gy as Eo, gz as zm, gA as $m, gB as Is, cI as Ds, gC as Ao, gD as qm, gE as jm, gF as Oo, gG as Km, gH as Um, gI as Es, gJ as js, gK as Gm, gL as Qm, gM as Hm, gN as Wm, gO as ra, gP as ni, gQ as Mo, gR as Jm, cu as Ym, gS as Fo, gT as Ro, gU as us, gV as Po, gW as Lo, gX as Xm, gY as ai, gZ as Zm, g_ as eh, g$ as ms, h0 as th, h1 as zr, h2 as nh, h3 as xs, h as za, i as $a, k as qa, j as ja, l as Ka, m as Ua, h4 as ah, h5 as Ga, h6 as gn, h7 as pr, h8 as fr, h9 as Qa, ha as Vo, hb as sh, hc as Ks, hd as Us, he as rh, hf as Gs, hg as lh, hh as si, hi as ri, hj as ih, cQ as oh, hk as ch, cR as dh, cT as uh, cU as mh, av as hh, hl as ph, hm as fh, hn as gh, bX as As, ho as Os, hp as li, hq as Bo, cK as Qs, hr as xh, hs as bh, ht as yh, F as vh, by as Nh, hu as Ch, hv as wh } from "./dashboard-CJNVq8XI.js";
5
5
  import { c as We, C as Tt, X as st } from "./index-xHCrHprY.js";
6
6
  import { D as we, B as te, N as bs, H as Ja, c as G, aN as Sh, O as $, _ as ae, $ as se, a0 as re, a1 as le, a2 as K, E as L, Y as Rt, Q as jt, V as Pt, W as Lt, P as kt, a as Vt, b as It, aG as Oa, aO as $r, aP as _o, aD as qr, aB as Th, Z as Be, aQ as kh, L as cn, C as $n, T as ua, F as ma, G as Kt, I as ln, d as dn, u as ye, R as ys, aR as jr, A as zo, X as qn, M as Ms, S as jn, aH as Pn, aS as Ih, aT as Dh, aU as $o, ad as Eh, aJ as Ah, aV as Oh, aW as Mh, aX as ii, aY as Fh, aZ as Rh, a_ as Ph, a$ as Lh, b0 as Vh, b1 as Bh, b2 as oi, b3 as _h, b4 as ci, b5 as ha, b6 as zh, a3 as Ge, b7 as $h, b8 as Kr, b9 as gr, ba as qo, bb as xn, bc as rs, bd as jo, be as qh, bf as Ko, bg as jh, bh as Kh, bi as qt, bj as Uh, K as Uo, bk as pt, bl as Go, w as di, bm as Gh, bn as Qh, bo as Hh, bp as Wh, bq as Jh, br as Yh, bs as Xh, bt as Zh, bu as ep, bv as tp, bw as np, bx as ap, by as sp, bz as ui, bA as rp, bB as lp, bC as ip, bD as op, J as Fs, au as cp } from "./code-editor-BpADiIlq.js";
7
7
  import "./analyze-result-contract-CfOBEwaC.js";
8
8
  import { DEFAULT_RESOLVED_VALUE_FORMAT_PREFERENCES as xr } from "../value-format-preferences/index.js";
9
9
  import { C as Jt, M as Qo, a as Ho, E as br, S as Rs } from "./search-DHZCro8B.js";
10
- import { f as dp, F as up, g as mp, V as Wo, e as hp, C as pp, h as fp } from "./editor-action-buttons-CRi0fhVW.js";
10
+ import { f as dp, F as up, g as mp, V as Wo, e as hp, C as pp, h as fp } from "./editor-action-buttons-DROkx4PS.js";
11
11
  import { h as pa } from "./card-config-utils-BYZ5MJOh.js";
12
12
  import { createPortal as gp } from "react-dom";
13
13
  import "./index-If0wlXGi.js";
@@ -2360,10 +2360,10 @@ function yf({
2360
2360
  Xs
2361
2361
  ), [R, V] = U(!1), [z, _] = U(
2362
2362
  () => ls("inline-query-session")
2363
- ), q = Ee(null), Y = Ee(null), X = Ee(null), j = Ee(0), Z = Ee(0), Q = Ee(
2363
+ ), q = ke(null), Y = ke(null), X = ke(null), j = ke(0), Z = ke(0), Q = ke(
2364
2364
  ls("inline-run-token")
2365
- ), ue = Ee(z), ve = Ee(/* @__PURE__ */ new Set()), ke = Ee(/* @__PURE__ */ new Map()), De = Ee(0), $e = Ee(""), ot = Ee(!1), nt = Ee(!1), Ke = Ee(Xs), Fe = Ee(!1), at = Ee(null), Ye = Ee(() => {
2366
- }), Xe = (pn = c.apiServiceUrl) == null ? void 0 : pn.replace(/\/$/, ""), ge = Xe ? `${Xe}/v1/sql/validate` : "/v1/sql/validate", qe = Ie(
2365
+ ), ue = ke(z), ve = ke(/* @__PURE__ */ new Set()), Ie = ke(/* @__PURE__ */ new Map()), Ee = ke(0), $e = ke(""), ot = ke(!1), nt = ke(!1), Ke = ke(Xs), Fe = ke(!1), at = ke(null), Ye = ke(() => {
2366
+ }), Xe = (pn = c.apiServiceUrl) == null ? void 0 : pn.replace(/\/$/, ""), ge = Xe ? `${Xe}/v1/sql/validate` : "/v1/sql/validate", qe = De(
2367
2367
  (ee) => {
2368
2368
  k((ce) => {
2369
2369
  const oe = ee(ce);
@@ -2371,14 +2371,14 @@ function yf({
2371
2371
  });
2372
2372
  },
2373
2373
  []
2374
- ), je = Ie(
2374
+ ), je = De(
2375
2375
  (ee, ce) => {
2376
2376
  qe(
2377
2377
  (oe) => oe.runId === ee ? ce(oe) : oe
2378
2378
  );
2379
2379
  },
2380
2380
  [qe]
2381
- ), Qe = Ie((ee) => Z.current === ee && !ve.current.has(ee), []), W = Ie(
2381
+ ), Qe = De((ee) => Z.current === ee && !ve.current.has(ee), []), W = De(
2382
2382
  (ee, ce, oe) => {
2383
2383
  je(ee, (Le) => {
2384
2384
  const Ve = Le.timelineSteps.includes(ce) ? Le.timelineSteps : [...Le.timelineSteps, ce];
@@ -2394,9 +2394,9 @@ function yf({
2394
2394
  });
2395
2395
  },
2396
2396
  [je]
2397
- ), be = Ie(() => {
2397
+ ), be = De(() => {
2398
2398
  const ee = Z.current + 1, ce = ls("inline-run-token"), oe = ls("inline-query-session");
2399
- return Z.current = ee, Q.current = ce, ue.current = oe, _(oe), ve.current = /* @__PURE__ */ new Set(), ke.current = /* @__PURE__ */ new Map(), De.current = 0, $e.current = "", Fe.current = !1, qe(() => ({
2399
+ return Z.current = ee, Q.current = ce, ue.current = oe, _(oe), ve.current = /* @__PURE__ */ new Set(), Ie.current = /* @__PURE__ */ new Map(), Ee.current = 0, $e.current = "", Fe.current = !1, qe(() => ({
2400
2400
  runId: ee,
2401
2401
  phase: "drafting",
2402
2402
  attempt: 0,
@@ -2410,7 +2410,7 @@ function yf({
2410
2410
  runToken: ce,
2411
2411
  chatSessionId: oe
2412
2412
  };
2413
- }, [qe]), Ae = Ie(() => {
2413
+ }, [qe]), Ae = De(() => {
2414
2414
  if (ot.current || nt.current || x > 0)
2415
2415
  return;
2416
2416
  const ee = f || [];
@@ -2421,13 +2421,13 @@ function yf({
2421
2421
  ...ce,
2422
2422
  selectedEntities: ee
2423
2423
  }), nt.current = !0;
2424
- }, [x, f, M]), me = Ie(() => {
2424
+ }, [x, f, M]), me = De(() => {
2425
2425
  ot.current = !0;
2426
- }, []), J = Ie(
2426
+ }, []), J = De(
2427
2427
  (ee, ce, oe) => {
2428
2428
  ff(ee, {
2429
2429
  runId: ce,
2430
- attemptCount: typeof (oe == null ? void 0 : oe.attemptCount) == "number" ? oe.attemptCount : De.current,
2430
+ attemptCount: typeof (oe == null ? void 0 : oe.attemptCount) == "number" ? oe.attemptCount : Ee.current,
2431
2431
  errorCode: oe == null ? void 0 : oe.errorCode,
2432
2432
  hasTools: typeof (oe == null ? void 0 : oe.hasTools) == "boolean" ? oe.hasTools : w.hasTools,
2433
2433
  entityCount: x,
@@ -2439,7 +2439,7 @@ function yf({
2439
2439
  w.finalOutcome,
2440
2440
  w.hasTools
2441
2441
  ]
2442
- ), Re = Ie(
2442
+ ), Re = De(
2443
2443
  (ee, ce) => {
2444
2444
  const oe = X.current;
2445
2445
  if (!oe)
@@ -2462,7 +2462,7 @@ function yf({
2462
2462
  const ee = at.current;
2463
2463
  !ee || ee.sessionId !== z || (at.current = null, Re(ee.message, ee.runToken));
2464
2464
  }, [z, Re]);
2465
- const He = z, Et = Ie(
2465
+ const He = z, Et = De(
2466
2466
  async ({ toolCall: ee }) => {
2467
2467
  var ht, Ze, Wn, Jn, Ct, Ue;
2468
2468
  if (He !== ue.current)
@@ -2532,7 +2532,7 @@ function yf({
2532
2532
  He,
2533
2533
  W
2534
2534
  ]
2535
- ), he = Ie(
2535
+ ), he = De(
2536
2536
  ({ message: ee, messages: ce }) => {
2537
2537
  if (He !== ue.current)
2538
2538
  return;
@@ -2550,7 +2550,7 @@ function yf({
2550
2550
  Fe.current && Ke.current.phase === "self-healing" && Ye.current(Le);
2551
2551
  },
2552
2552
  [Qe, He]
2553
- ), Pe = Ie(
2553
+ ), Pe = De(
2554
2554
  (ee) => {
2555
2555
  if (He !== ue.current)
2556
2556
  return;
@@ -2610,7 +2610,7 @@ function yf({
2610
2610
  Y.current = xt, X.current = et;
2611
2611
  const xe = !["ready", "error"].includes(
2612
2612
  gt
2613
- ), Je = (ie == null ? void 0 : ie.message) || "Unable to generate a SQL draft right now. Try again.", Oe = Ie(
2613
+ ), Je = (ie == null ? void 0 : ie.message) || "Unable to generate a SQL draft right now. Try again.", Oe = De(
2614
2614
  (ee) => {
2615
2615
  const ce = Z.current, oe = Ke.current.phase;
2616
2616
  if (!(oe === "drafting" || oe === "self-healing" || oe === "validating")) {
@@ -2634,7 +2634,7 @@ function yf({
2634
2634
  pe,
2635
2635
  je
2636
2636
  ]
2637
- ), vt = Ie(
2637
+ ), vt = De(
2638
2638
  async (ee, ce) => {
2639
2639
  var Le;
2640
2640
  if (!Qe(ce))
@@ -2724,7 +2724,7 @@ function yf({
2724
2724
  je,
2725
2725
  W
2726
2726
  ]
2727
- ), Nt = Ie(
2727
+ ), Nt = De(
2728
2728
  (ee, ce, oe, Le) => {
2729
2729
  let Ve = oe, _e = "validation_failed", mt = "Validating SQL";
2730
2730
  ce === "attempt_limit" ? (Ve = `Couldn't auto-fix after ${ds} attempts. ${oe}`, _e = "self_heal_exhausted", mt = `Auto-fix stopped (${ds} attempts)`) : ce === "duplicate" && (Ve = `Auto-fix stopped (repeated validation failure). ${oe}`, _e = "self_heal_duplicate_stopped", mt = "Auto-fix stopped (repeated failure)"), p({
@@ -2749,7 +2749,7 @@ function yf({
2749
2749
  }), Fe.current = !1;
2750
2750
  },
2751
2751
  [J, je, W]
2752
- ), Gn = Ie(
2752
+ ), Gn = De(
2753
2753
  (ee) => {
2754
2754
  const ce = "Auto-fix stopped (no SQL returned). Open Full Assistant to continue.", oe = "self_heal_no_draft";
2755
2755
  p({
@@ -2785,7 +2785,7 @@ function yf({
2785
2785
  }
2786
2786
  if (!Qe(ce) || xe)
2787
2787
  return;
2788
- const oe = `${ce}:${De.current}:${gi(ee)}`;
2788
+ const oe = `${ce}:${Ee.current}:${gi(ee)}`;
2789
2789
  if ($e.current === oe)
2790
2790
  return;
2791
2791
  $e.current = oe;
@@ -2803,8 +2803,8 @@ function yf({
2803
2803
  );
2804
2804
  return;
2805
2805
  }
2806
- const mt = `${gi(ee)}::${_e.errorCode}`, ht = (ke.current.get(mt) || 0) + 1;
2807
- if (ke.current.set(mt, ht), ht >= 2) {
2806
+ const mt = `${gi(ee)}::${_e.errorCode}`, ht = (Ie.current.get(mt) || 0) + 1;
2807
+ if (Ie.current.set(mt, ht), ht >= 2) {
2808
2808
  Nt(
2809
2809
  ce,
2810
2810
  "duplicate",
@@ -2813,7 +2813,7 @@ function yf({
2813
2813
  );
2814
2814
  return;
2815
2815
  }
2816
- if (De.current >= ds) {
2816
+ if (Ee.current >= ds) {
2817
2817
  Nt(
2818
2818
  ce,
2819
2819
  "attempt_limit",
@@ -2822,8 +2822,8 @@ function yf({
2822
2822
  );
2823
2823
  return;
2824
2824
  }
2825
- const Ze = De.current + 1;
2826
- De.current = Ze, W(ce, or, {
2825
+ const Ze = Ee.current + 1;
2826
+ Ee.current = Ze, W(ce, or, {
2827
2827
  phase: "self-healing",
2828
2828
  attempt: Ze
2829
2829
  }), J("inline_self_heal_attempt", ce, {
@@ -2864,7 +2864,7 @@ function yf({
2864
2864
  W,
2865
2865
  vt
2866
2866
  ]);
2867
- const _t = (t == null ? void 0 : t.trim()) || "", In = Ie(
2867
+ const _t = (t == null ? void 0 : t.trim()) || "", In = De(
2868
2868
  (ee = "draft") => {
2869
2869
  if (xe)
2870
2870
  return;
@@ -2908,7 +2908,7 @@ function yf({
2908
2908
  d,
2909
2909
  Me
2910
2910
  ]
2911
- ), fa = Ie(
2911
+ ), fa = De(
2912
2912
  (ee) => {
2913
2913
  const ce = v.trim();
2914
2914
  ce && (i(ce, ee), ee || V(!1));
@@ -2916,7 +2916,7 @@ function yf({
2916
2916
  [i, v]
2917
2917
  ), un = v.trim().length > 0, ga = ["valid", "invalid", "error"].includes(
2918
2918
  B.status
2919
- ), At = un && ga, Xa = B.status === "invalid", Za = B.status === "validating", Dn = un && S.length > 0 && S === N.trim(), xa = _t.length > 0, Yt = N.trim().length > 0, mn = Dn && E === "draft", Qn = Dn && E === "refine" && A === _t, En = F === "refine" && !xa ? "draft" : F, ba = (En === "refine" ? Qn : mn) ? "Open composer preview" : "Generate composer SQL", ya = N.trim().length > 0 || S.trim().length > 0 || un || B.status !== "idle" || w.timelineSteps.length > 0, va = Ie(
2919
+ ), At = un && ga, Xa = B.status === "invalid", Za = B.status === "validating", Dn = un && S.length > 0 && S === N.trim(), xa = _t.length > 0, Yt = N.trim().length > 0, mn = Dn && E === "draft", Qn = Dn && E === "refine" && A === _t, En = F === "refine" && !xa ? "draft" : F, ba = (En === "refine" ? Qn : mn) ? "Open composer preview" : "Generate composer SQL", ya = N.trim().length > 0 || S.trim().length > 0 || un || B.status !== "idle" || w.timelineSteps.length > 0, va = De(
2920
2920
  (ee = "draft") => {
2921
2921
  if (xe)
2922
2922
  return;
@@ -2934,15 +2934,15 @@ function yf({
2934
2934
  R,
2935
2935
  Ae
2936
2936
  ]
2937
- ), Hn = Ie(() => {
2937
+ ), Hn = De(() => {
2938
2938
  Ae(), V(!0);
2939
- }, [Ae]), es = Ie(
2939
+ }, [Ae]), es = De(
2940
2940
  (ee) => {
2941
2941
  Oe("cancelled"), y(ee);
2942
2942
  },
2943
2943
  [Oe]
2944
- ), hn = Ie(() => {
2945
- xe || (Oe("cancelled"), Fe.current = !1, j.current += 1, $e.current = "", De.current = 0, y(""), D(""), b(""), T("draft"), O("draft"), I(""), P(!1), p({ status: "idle" }), Ne(), Me([]), qe((ee) => ({
2944
+ ), hn = De(() => {
2945
+ xe || (Oe("cancelled"), Fe.current = !1, j.current += 1, $e.current = "", Ee.current = 0, y(""), D(""), b(""), T("draft"), O("draft"), I(""), P(!1), p({ status: "idle" }), Ne(), Me([]), qe((ee) => ({
2946
2946
  ...Xs,
2947
2947
  runId: ee.runId
2948
2948
  })));
@@ -2952,7 +2952,7 @@ function yf({
2952
2952
  xe,
2953
2953
  Me,
2954
2954
  qe
2955
- ]), ts = Ie(
2955
+ ]), ts = De(
2956
2956
  (ee) => {
2957
2957
  ee || Oe("cancelled"), V(ee);
2958
2958
  },
@@ -3340,10 +3340,10 @@ function Nf({
3340
3340
  expandedEditor: a,
3341
3341
  showPythonEditor: s
3342
3342
  }) {
3343
- const r = Ee(null), d = Ee(null), i = Ee(null), l = Ee(null), o = Ee({
3343
+ const r = ke(null), d = ke(null), i = ke(null), l = ke(null), o = ke({
3344
3344
  cardId: t,
3345
3345
  snapshots: {}
3346
- }), c = Ie(
3346
+ }), c = De(
3347
3347
  (u) => {
3348
3348
  var M, N;
3349
3349
  const m = u === "inline" ? r : i, g = u === "inline" ? d : l, f = (M = m.current) == null ? void 0 : M.captureSession(), h = (N = g.current) == null ? void 0 : N.captureSession(), x = vi(o, t);
@@ -3364,7 +3364,7 @@ function Nf({
3364
3364
  };
3365
3365
  }
3366
3366
  function Cf({ value: t }) {
3367
- const [a, s] = U(!1), r = Ee(null);
3367
+ const [a, s] = U(!1), r = ke(null);
3368
3368
  Se(() => () => {
3369
3369
  r.current && clearTimeout(r.current);
3370
3370
  }, []);
@@ -3410,7 +3410,20 @@ function Cf({ value: t }) {
3410
3410
  function wf({
3411
3411
  hint: t
3412
3412
  }) {
3413
- return /* @__PURE__ */ n(kt, { children: [
3413
+ const [a, s] = U(!1), r = ke(null), d = ke(null), i = () => {
3414
+ r.current && (clearTimeout(r.current), r.current = null);
3415
+ }, l = () => {
3416
+ d.current && (clearTimeout(d.current), d.current = null);
3417
+ };
3418
+ Se(() => () => {
3419
+ i(), l();
3420
+ }, []);
3421
+ const o = (u) => {
3422
+ u.pointerType !== "touch" && (l(), !a && (i(), r.current = setTimeout(() => s(!0), 200)));
3423
+ }, c = (u) => {
3424
+ u.pointerType !== "touch" && (i(), l(), d.current = setTimeout(() => s(!1), 150));
3425
+ };
3426
+ return /* @__PURE__ */ n(kt, { open: a, onOpenChange: s, children: [
3414
3427
  /* @__PURE__ */ e(Vt, { asChild: !0, children: /* @__PURE__ */ n(
3415
3428
  te,
3416
3429
  {
@@ -3418,6 +3431,11 @@ function wf({
3418
3431
  variant: "ghost",
3419
3432
  size: "xs",
3420
3433
  "aria-label": "Dashboard filters off",
3434
+ onPointerEnter: o,
3435
+ onPointerLeave: c,
3436
+ onFocus: () => {
3437
+ i(), l(), s(!0);
3438
+ },
3421
3439
  className: "h-7 w-7 shrink-0 gap-1.5 border border-amber-300/60 bg-amber-50/60 px-0 text-amber-800 hover:bg-amber-100/70 hover:text-amber-900 @[1550px]:w-auto @[1550px]:px-2 dark:border-amber-500/30 dark:bg-amber-500/10 dark:text-amber-300 dark:hover:bg-amber-500/15 dark:hover:text-amber-200",
3422
3440
  children: [
3423
3441
  /* @__PURE__ */ e(up, { className: "h-3.5 w-3.5", strokeWidth: 1.75 }),
@@ -3430,6 +3448,11 @@ function wf({
3430
3448
  {
3431
3449
  align: "start",
3432
3450
  collisionPadding: 8,
3451
+ onPointerEnter: (u) => {
3452
+ u.pointerType !== "touch" && l();
3453
+ },
3454
+ onPointerLeave: c,
3455
+ onOpenAutoFocus: (u) => u.preventDefault(),
3433
3456
  className: "w-72 space-y-2.5 p-3",
3434
3457
  children: [
3435
3458
  /* @__PURE__ */ n("div", { className: "space-y-1", children: [
@@ -3519,7 +3542,7 @@ function Sf({
3519
3542
  c,
3520
3543
  F,
3521
3544
  b == null ? void 0 : b.slots
3522
- ) ?? c.type, [D, E, F, c, b == null ? void 0 : b.slots]), A = de(() => O !== c.type ? { ...c, type: O } : c, [c, O]), I = de(() => y === 0 ? null : mf(c == null ? void 0 : c.sql), [c == null ? void 0 : c.sql, y]), C = Ee(!0), {
3545
+ ) ?? c.type, [D, E, F, c, b == null ? void 0 : b.slots]), A = de(() => O !== c.type ? { ...c, type: O } : c, [c, O]), I = de(() => y === 0 ? null : mf(c == null ? void 0 : c.sql), [c == null ? void 0 : c.sql, y]), C = ke(!0), {
3523
3546
  setCardCustomCfg: P,
3524
3547
  setQueryResultColumns: B,
3525
3548
  setCardSql: p,
@@ -3540,14 +3563,14 @@ function Sf({
3540
3563
  data: Q,
3541
3564
  isLoading: ue,
3542
3565
  isFetching: ve,
3543
- isSuccess: ke,
3544
- isError: De,
3566
+ isSuccess: Ie,
3567
+ isError: Ee,
3545
3568
  error: $e,
3546
3569
  errorSql: ot,
3547
3570
  queryKey: nt,
3548
3571
  refetch: Ke,
3549
3572
  errorMessage: Fe
3550
- } = Bt(A), at = Ee(nt);
3573
+ } = Bt(A), at = ke(nt);
3551
3574
  at.current = nt, Se(() => {
3552
3575
  if (Q)
3553
3576
  if (Q.rowLimitExceeded && it.error("Row limit (10,000) exceeded. Refine your query.", {
@@ -3561,14 +3584,14 @@ function Sf({
3561
3584
  } else
3562
3585
  B([]);
3563
3586
  }, [c.type, Q, B, k]), Se(() => {
3564
- (ue || ve) && (Z(!0), B([])), (De || ke) && Z(!1), De && (B([]), k(""));
3587
+ (ue || ve) && (Z(!0), B([])), (Ee || Ie) && Z(!1), Ee && (B([]), k(""));
3565
3588
  }, [
3566
3589
  ue,
3567
3590
  ve,
3568
3591
  Q,
3569
3592
  k,
3570
- De,
3571
- ke,
3593
+ Ee,
3594
+ Ie,
3572
3595
  Z,
3573
3596
  B,
3574
3597
  // setQueryError,
@@ -3576,7 +3599,7 @@ function Sf({
3576
3599
  ]), Se(() => {
3577
3600
  X && (a.getQueryData(nt) || Ke(), j(!1));
3578
3601
  }, [X, Ke, j, nt, a]);
3579
- const Ye = Ee(Ke);
3602
+ const Ye = ke(Ke);
3580
3603
  Ye.current = Ke, Se(() => {
3581
3604
  if (C.current) {
3582
3605
  C.current = !1;
@@ -4916,11 +4939,11 @@ function cc({
4916
4939
  data: w,
4917
4940
  isLoading: k,
4918
4941
  isFetching: R
4919
- }), { handleOpenInEditor: X, handleDebugWithAssistant: j } = Qr(V, z || r.sql || r.python), Z = de(() => (w == null ? void 0 : w.records) || [], [w == null ? void 0 : w.records]), { setCard: Q, updateCardInFrame: ue } = we(), { data: ve } = Mr(P), ke = P.id, De = P.config, $e = P.interactionConfig, ot = P.controls, nt = P.controlBindings, Ke = P.customCfg, Fe = P.preferences, at = P.queryConfig, Ye = !!P.sql, Xe = w == null ? void 0 : w.records, ge = de(
4942
+ }), { handleOpenInEditor: X, handleDebugWithAssistant: j } = Qr(V, z || r.sql || r.python), Z = de(() => (w == null ? void 0 : w.records) || [], [w == null ? void 0 : w.records]), { setCard: Q, updateCardInFrame: ue } = we(), { data: ve } = Mr(P), Ie = P.id, Ee = P.config, $e = P.interactionConfig, ot = P.controls, nt = P.controlBindings, Ke = P.customCfg, Fe = P.preferences, at = P.queryConfig, Ye = !!P.sql, Xe = w == null ? void 0 : w.records, ge = de(
4920
4943
  () => ({
4921
- id: ke,
4944
+ id: Ie,
4922
4945
  type: C,
4923
- config: De,
4946
+ config: Ee,
4924
4947
  interactionConfig: $e,
4925
4948
  preferences: Fe,
4926
4949
  controls: ot,
@@ -4929,9 +4952,9 @@ function cc({
4929
4952
  sql: Ye ? "__editor_sql__" : ""
4930
4953
  }),
4931
4954
  [
4932
- ke,
4955
+ Ie,
4933
4956
  C,
4934
- De,
4957
+ Ee,
4935
4958
  $e,
4936
4959
  Fe,
4937
4960
  ot,
@@ -5012,7 +5035,7 @@ function cc({
5012
5035
  Xe || void 0
5013
5036
  ), J = de(() => {
5014
5037
  var pe;
5015
- return !ke || !Xe ? null : no({
5038
+ return !Ie || !Xe ? null : no({
5016
5039
  card: ge,
5017
5040
  data: Xe,
5018
5041
  cardType: C,
@@ -5028,7 +5051,7 @@ function cc({
5028
5051
  // Keep SQL draft typing out of chart-config invalidation; chart preview
5029
5052
  // should only rebuild when visual inputs or query results change.
5030
5053
  ge,
5031
- ke,
5054
+ Ie,
5032
5055
  Ke,
5033
5056
  Fe,
5034
5057
  at,
@@ -6133,8 +6156,8 @@ function pc({
6133
6156
  return A.isCustom ? v && ((I = l == null ? void 0 : l.customCardPreferences) == null ? void 0 : I.componentName) === A.id : t === A.id;
6134
6157
  }
6135
6158
  ), T = E ? "More" : t === "custom" ? ((O = l == null ? void 0 : l.customCardPreferences) == null ? void 0 : O.componentName) || "Custom" : Fa[t] || "More";
6136
- return /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
6137
- /* @__PURE__ */ e("div", { className: "inline-flex h-7 items-center overflow-hidden rounded-control border border-input bg-background", children: D.map((A) => {
6159
+ return /* @__PURE__ */ e("div", { className: "flex items-center", children: /* @__PURE__ */ n("div", { className: "inline-flex h-7 items-center overflow-hidden rounded-control border border-input bg-background", children: [
6160
+ D.map((A) => {
6138
6161
  var P;
6139
6162
  const I = A.icon, C = A.isCustom ? v && ((P = l == null ? void 0 : l.customCardPreferences) == null ? void 0 : P.componentName) === A.id : t === A.id;
6140
6163
  return /* @__PURE__ */ n(
@@ -6171,7 +6194,7 @@ function pc({
6171
6194
  },
6172
6195
  `${A.isCustom ? "custom" : "default"}-${A.id}`
6173
6196
  );
6174
- }) }),
6197
+ }),
6175
6198
  /* @__PURE__ */ n(kt, { open: d, onOpenChange: i, children: [
6176
6199
  /* @__PURE__ */ e(Vt, { asChild: !0, children: /* @__PURE__ */ n(
6177
6200
  "button",
@@ -6179,7 +6202,7 @@ function pc({
6179
6202
  type: "button",
6180
6203
  "aria-label": s ? "More chart types" : T,
6181
6204
  className: G(
6182
- "inline-flex h-7 items-center gap-1 rounded-control transition-colors hover:bg-muted/50",
6205
+ "inline-flex h-full items-center gap-1 border-l border-input transition-colors hover:bg-muted/50",
6183
6206
  s ? "w-7 justify-center" : "px-2 text-[12px]",
6184
6207
  !s && (E ? "text-muted-foreground" : "text-foreground")
6185
6208
  ),
@@ -6216,7 +6239,7 @@ function pc({
6216
6239
  }
6217
6240
  )
6218
6241
  ] })
6219
- ] });
6242
+ ] }) });
6220
6243
  }
6221
6244
  function Hf() {
6222
6245
  const t = L(
@@ -7661,7 +7684,7 @@ function Rn({
7661
7684
  python: "",
7662
7685
  config: void 0,
7663
7686
  queryConfig: void 0
7664
- } : R !== r.type ? { ...r, type: R } : r, [r, R, B]), { data: z, isLoading: _, isFetching: q, isError: Y, errorMessage: X, errorSql: j } = Bt(V), { handleOpenInEditor: Z, handleDebugWithAssistant: Q } = Qr(X, j || r.sql || r.python), ue = r.type === "text" && ((Et = (He = r.preferences) == null ? void 0 : He.textVisualOptions) == null ? void 0 : Et.isDynamicText) === !0 && !!X, ve = Ie(
7687
+ } : R !== r.type ? { ...r, type: R } : r, [r, R, B]), { data: z, isLoading: _, isFetching: q, isError: Y, errorMessage: X, errorSql: j } = Bt(V), { handleOpenInEditor: Z, handleDebugWithAssistant: Q } = Qr(X, j || r.sql || r.python), ue = r.type === "text" && ((Et = (He = r.preferences) == null ? void 0 : He.textVisualOptions) == null ? void 0 : Et.isDynamicText) === !0 && !!X, ve = De(
7665
7688
  (he, Pe) => {
7666
7689
  const Me = Su(Pe);
7667
7690
  N((et) => ({
@@ -7670,7 +7693,7 @@ function Rn({
7670
7693
  }));
7671
7694
  },
7672
7695
  []
7673
- ), ke = Ie(
7696
+ ), Ie = De(
7674
7697
  (he, Pe) => {
7675
7698
  S((Me) => {
7676
7699
  const et = new Set(Me);
@@ -7678,7 +7701,7 @@ function Rn({
7678
7701
  });
7679
7702
  },
7680
7703
  []
7681
- ), De = y.size > 0, $e = Vh(
7704
+ ), Ee = y.size > 0, $e = Vh(
7682
7705
  (he) => he.interactionStates
7683
7706
  ), ot = ye((he) => {
7684
7707
  var Pe;
@@ -7759,7 +7782,7 @@ function Rn({
7759
7782
  return /* @__PURE__ */ e(
7760
7783
  Eu,
7761
7784
  {
7762
- onLoadingStatus: ke,
7785
+ onLoadingStatus: Ie,
7763
7786
  onDataChange: ve,
7764
7787
  card: Me,
7765
7788
  effectiveCardType: gt
@@ -7767,13 +7790,13 @@ function Rn({
7767
7790
  `${Me.id}-${xt}`
7768
7791
  );
7769
7792
  }),
7770
- De && /* @__PURE__ */ e("div", { className: "absolute inset-0 z-10 flex items-center justify-center bg-background/50", children: /* @__PURE__ */ e(Zt, { size: "md", color: "muted", "aria-label": "Loading preview" }) }),
7793
+ Ee && /* @__PURE__ */ e("div", { className: "absolute inset-0 z-10 flex items-center justify-center bg-background/50", children: /* @__PURE__ */ e(Zt, { size: "md", color: "muted", "aria-label": "Loading preview" }) }),
7771
7794
  /* @__PURE__ */ e(
7772
7795
  "div",
7773
7796
  {
7774
7797
  className: G(
7775
7798
  "flex h-full min-h-0 flex-1 flex-col gap-2",
7776
- De && "opacity-50"
7799
+ Ee && "opacity-50"
7777
7800
  ),
7778
7801
  children: /* @__PURE__ */ e(
7779
7802
  Xc,
@@ -8287,11 +8310,11 @@ function er({
8287
8310
  isFetching: Q,
8288
8311
  errorMessage: ue,
8289
8312
  errorSql: ve,
8290
- refetch: ke,
8291
- queryKey: De,
8313
+ refetch: Ie,
8314
+ queryKey: Ee,
8292
8315
  pagination: $e
8293
- } = Bt(X), ot = Ee(De);
8294
- ot.current = De;
8316
+ } = Bt(X), ot = ke(Ee);
8317
+ ot.current = Ee;
8295
8318
  const { handleDebugWithAssistant: nt } = Qr(
8296
8319
  ue,
8297
8320
  ve
@@ -8319,7 +8342,7 @@ function er({
8319
8342
  }, 0);
8320
8343
  return;
8321
8344
  }
8322
- ke();
8345
+ Ie();
8323
8346
  }, Qe = (ie) => {
8324
8347
  var Ne;
8325
8348
  k({
@@ -8460,7 +8483,6 @@ function er({
8460
8483
  /* @__PURE__ */ e(Va, { asChild: !0, children: r ? /* @__PURE__ */ e(
8461
8484
  ft,
8462
8485
  {
8463
- tooltip: "View executed SQL",
8464
8486
  className: "h-7 w-7 shrink-0 px-0",
8465
8487
  buttonProps: { "aria-label": "View executed SQL" },
8466
8488
  children: /* @__PURE__ */ e(Sp, { className: "h-3.5 w-3.5", strokeWidth: 1.75 })
@@ -8974,7 +8996,7 @@ function Mt({
8974
8996
  placeholder: r,
8975
8997
  className: d
8976
8998
  }) {
8977
- const [i, l] = U(t), o = Ee(!1);
8999
+ const [i, l] = U(t), o = ke(!1);
8978
9000
  return Se(() => {
8979
9001
  l(t);
8980
9002
  }, [t]), /* @__PURE__ */ e(
@@ -11873,17 +11895,17 @@ function qg() {
11873
11895
  }
11874
11896
  if (l.records.length > 0) {
11875
11897
  const j = l.records[0], Z = Object.keys(j), Q = /* @__PURE__ */ new Set();
11876
- (V = t == null ? void 0 : t.config) != null && V.groupByColumns && t.config.groupByColumns.forEach((ke) => {
11877
- Q.add(ke.label || ke.name), Q.add(ke.alias || ke.name);
11898
+ (V = t == null ? void 0 : t.config) != null && V.groupByColumns && t.config.groupByColumns.forEach((Ie) => {
11899
+ Q.add(Ie.label || Ie.name), Q.add(Ie.alias || Ie.name);
11878
11900
  });
11879
11901
  const ue = /* @__PURE__ */ new Set();
11880
- return (z = t == null ? void 0 : t.config) != null && z.metricColumns && t.config.metricColumns.forEach((ke) => {
11881
- const De = ke.alias || ke.name;
11882
- ue.add(De), ue.add(`${De}_count`), ue.add(`${De}_sum`), ue.add(`${De}_avg`), ue.add(`${De}_min`), ue.add(`${De}_max`);
11883
- const $e = ke.entityName || ke.qualifiedEntityName;
11884
- $e && (ue.add(`${$e}_${De}`), ue.add(`${$e}_${De}_count`));
11902
+ return (z = t == null ? void 0 : t.config) != null && z.metricColumns && t.config.metricColumns.forEach((Ie) => {
11903
+ const Ee = Ie.alias || Ie.name;
11904
+ ue.add(Ee), ue.add(`${Ee}_count`), ue.add(`${Ee}_sum`), ue.add(`${Ee}_avg`), ue.add(`${Ee}_min`), ue.add(`${Ee}_max`);
11905
+ const $e = Ie.entityName || Ie.qualifiedEntityName;
11906
+ $e && (ue.add(`${$e}_${Ee}`), ue.add(`${$e}_${Ee}_count`));
11885
11907
  }), Z.filter(
11886
- (ke) => !Q.has(ke) && !ue.has(ke)
11908
+ (Ie) => !Q.has(Ie) && !ue.has(Ie)
11887
11909
  );
11888
11910
  }
11889
11911
  }
@@ -15612,7 +15634,7 @@ function qx({
15612
15634
  ] });
15613
15635
  }
15614
15636
  function jx() {
15615
- const t = Ee(null), a = Ee(null), s = L((y) => y.isShowingVisual), r = L((y) => y.isDevMode), d = L((y) => y.showAIDialog), [i, l] = U(!1), [o, c] = U({ section: null, id: 0 }), u = s && !d, m = u && (!r || i), g = r && u, f = () => l((y) => !y), h = (y) => {
15637
+ const t = ke(null), a = ke(null), s = L((y) => y.isShowingVisual), r = L((y) => y.isDevMode), d = L((y) => y.showAIDialog), [i, l] = U(!1), [o, c] = U({ section: null, id: 0 }), u = s && !d, m = u && (!r || i), g = r && u, f = () => l((y) => !y), h = (y) => {
15616
15638
  y && c((S) => ({
15617
15639
  section: y,
15618
15640
  id: S.id + 1
@@ -15729,7 +15751,7 @@ function Kx(t) {
15729
15751
  errorMessage: O,
15730
15752
  refetch: A,
15731
15753
  data: I
15732
- } = Bt(D), { setTriggerAIRun: C, setCurrentAssitantScope: P, setCardConfig: B } = we(), { selectedDatamodelName: p, connectionType: w, selectedDatamodelId: k } = wm(), R = (Qe = ji().data) == null ? void 0 : Qe.assistantProfileId, V = Ee(ss()), z = Ee(null), _ = Ee(o), q = Ee(!1), Y = () => {
15754
+ } = Bt(D), { setTriggerAIRun: C, setCurrentAssitantScope: P, setCardConfig: B } = we(), { selectedDatamodelName: p, connectionType: w, selectedDatamodelId: k } = wm(), R = (Qe = ji().data) == null ? void 0 : Qe.assistantProfileId, V = ke(ss()), z = ke(null), _ = ke(o), q = ke(!1), Y = () => {
15733
15755
  const W = z.current;
15734
15756
  W && (z.current = null, V.current = ss(), W === "clear" && j([]));
15735
15757
  }, {
@@ -15739,8 +15761,8 @@ function Kx(t) {
15739
15761
  error: Q,
15740
15762
  sendMessage: ue,
15741
15763
  status: ve,
15742
- addToolResult: ke,
15743
- stop: De,
15764
+ addToolResult: Ie,
15765
+ stop: Ee,
15744
15766
  clearError: $e
15745
15767
  } = Ki({
15746
15768
  transport: new Ui({
@@ -15784,7 +15806,7 @@ function Kx(t) {
15784
15806
  onFinish({ isAbort: W, isDisconnect: be, isError: Ae }) {
15785
15807
  q.current = !1, s(""), console.log(W ? "[Editor Assistant] Stream aborted by user" : be ? "[Editor Assistant] Stream disconnected (network error)" : Ae ? "[Editor Assistant] Stream error occurred" : "[Editor Assistant] Stream completed successfully"), Y();
15786
15808
  }
15787
- }), ot = Ie(
15809
+ }), ot = De(
15788
15810
  (W) => {
15789
15811
  q.current = !0;
15790
15812
  try {
@@ -15797,7 +15819,7 @@ function Kx(t) {
15797
15819
  }
15798
15820
  },
15799
15821
  [ue]
15800
- ), nt = Ie(() => {
15822
+ ), nt = De(() => {
15801
15823
  q.current = !0;
15802
15824
  try {
15803
15825
  const W = Z();
@@ -15817,17 +15839,17 @@ function Kx(t) {
15817
15839
  z.current = null, V.current = ss();
15818
15840
  }
15819
15841
  return me;
15820
- }), be && De();
15842
+ }), be && Ee();
15821
15843
  };
15822
15844
  Se(() => {
15823
15845
  if (_.current !== o) {
15824
15846
  if (_.current = o, q.current) {
15825
- z.current !== "clear" && (z.current = "rotate"), De();
15847
+ z.current !== "clear" && (z.current = "rotate"), Ee();
15826
15848
  return;
15827
15849
  }
15828
15850
  z.current = null, V.current = ss();
15829
15851
  }
15830
- }, [o, De]), Se(() => {
15852
+ }, [o, Ee]), Se(() => {
15831
15853
  S && y && (ot({
15832
15854
  role: "user",
15833
15855
  parts: [{ type: "text", text: y }]
@@ -15837,7 +15859,7 @@ function Kx(t) {
15837
15859
  var be, Ae, me, J, Re, He, Et, he, Pe, Me, et, xt, gt, pe, ie, Ne;
15838
15860
  if (["createChartFromSql", "createForecast"].includes(W.toolName)) {
15839
15861
  const xe = ((be = W.input) == null ? void 0 : be.sql) ?? ((Ae = W.args) == null ? void 0 : Ae.sql), Je = ((me = W.input) == null ? void 0 : me.python) ?? ((J = W.args) == null ? void 0 : J.python), Oe = ((Re = W.input) == null ? void 0 : Re.chartType) ?? ((He = W.args) == null ? void 0 : He.chartType);
15840
- x(Oe), f(xe), g(Je), h(!0), ke({
15862
+ x(Oe), f(xe), g(Je), h(!0), Ie({
15841
15863
  tool: W.toolName,
15842
15864
  toolCallId: W.toolCallId,
15843
15865
  output: {
@@ -15847,7 +15869,7 @@ function Kx(t) {
15847
15869
  });
15848
15870
  } else if (W.toolName === "getUserSql") {
15849
15871
  if (!c) {
15850
- ke({
15872
+ Ie({
15851
15873
  tool: W.toolName,
15852
15874
  toolCallId: W.toolCallId,
15853
15875
  output: {
@@ -15857,7 +15879,7 @@ function Kx(t) {
15857
15879
  });
15858
15880
  return;
15859
15881
  }
15860
- ke({
15882
+ Ie({
15861
15883
  tool: W.toolName,
15862
15884
  toolCallId: W.toolCallId,
15863
15885
  output: {
@@ -15872,7 +15894,7 @@ function Kx(t) {
15872
15894
  ((et = W.input) == null ? void 0 : et.cardConfig) ?? ((xt = W.args) == null || xt.cardConfig), x(xe), B(Je), f(void 0), g(void 0);
15873
15895
  const Oe = await A();
15874
15896
  if ((gt = Oe == null ? void 0 : Oe.data) != null && gt.error) {
15875
- ke({
15897
+ Ie({
15876
15898
  tool: W.toolName,
15877
15899
  toolCallId: W.toolCallId,
15878
15900
  output: {
@@ -15884,7 +15906,7 @@ function Kx(t) {
15884
15906
  return;
15885
15907
  }
15886
15908
  if ((ie = Oe == null ? void 0 : Oe.data) != null && ie.records) {
15887
- ke({
15909
+ Ie({
15888
15910
  tool: W.toolName,
15889
15911
  toolCallId: W.toolCallId,
15890
15912
  output: {
@@ -15895,7 +15917,7 @@ function Kx(t) {
15895
15917
  });
15896
15918
  return;
15897
15919
  }
15898
- ke({
15920
+ Ie({
15899
15921
  tool: W.toolName,
15900
15922
  toolCallId: W.toolCallId,
15901
15923
  output: {
@@ -15978,7 +16000,7 @@ function Kx(t) {
15978
16000
  removeFromCurrentSelections: at,
15979
16001
  currentAssitantScope: N,
15980
16002
  setCurrentAssitantScope: P,
15981
- stop: De,
16003
+ stop: Ee,
15982
16004
  status: ve,
15983
16005
  toolStatus: a,
15984
16006
  llmUsage: r,
@@ -16002,7 +16024,7 @@ function Li({
16002
16024
  onFullscreenChange: a,
16003
16025
  fullscreenContainer: s
16004
16026
  }) {
16005
- const r = Ee(null), d = Ee(!1), [i, l] = U(!1), [o, c] = U(Gh), [u, m] = U(!1), [g, f] = U(!1), [h, x] = U(!1), [M, N] = U(0), y = t ?? h, S = Qh(), { setCurrentAIContext: D, setHasEditorEntitySelectionOverride: v } = $r(), { clearQueue: b } = Hh(), { clearFileAttachments: E } = Wh(), T = Jh("editor"), { selectedEntities: F } = _i("editor"), O = L((me) => me.card.id), A = L((me) => me.card.dataSource), I = L(
16027
+ const r = ke(null), d = ke(!1), [i, l] = U(!1), [o, c] = U(Gh), [u, m] = U(!1), [g, f] = U(!1), [h, x] = U(!1), [M, N] = U(0), y = t ?? h, S = Qh(), { setCurrentAIContext: D, setHasEditorEntitySelectionOverride: v } = $r(), { clearQueue: b } = Hh(), { clearFileAttachments: E } = Wh(), T = Jh("editor"), { selectedEntities: F } = _i("editor"), O = L((me) => me.card.id), A = L((me) => me.card.dataSource), I = L(
16006
16028
  (me) => {
16007
16029
  var J;
16008
16030
  return (J = me.card.dataSource) == null ? void 0 : J.selectedEntities;
@@ -16019,9 +16041,9 @@ function Li({
16019
16041
  llmUsage: j,
16020
16042
  errorMessage: Z,
16021
16043
  clearError: Q
16022
- } = Kx(), [ue, ve] = U(""), ke = (me) => {
16044
+ } = Kx(), [ue, ve] = U(""), Ie = (me) => {
16023
16045
  ve(me.target.value);
16024
- }, De = (me) => {
16046
+ }, Ee = (me) => {
16025
16047
  me.preventDefault();
16026
16048
  const J = ue.trim();
16027
16049
  if (!J && T.length === 0) return;
@@ -16035,7 +16057,7 @@ function Li({
16035
16057
  url: `data:${He.type};base64,${He.data}`
16036
16058
  });
16037
16059
  }), _({ role: "user", parts: Re }), ve(""), E("editor"), $e();
16038
- }, $e = Ie(() => {
16060
+ }, $e = De(() => {
16039
16061
  N((me) => me + 1);
16040
16062
  }, []);
16041
16063
  Se(() => {
@@ -16057,7 +16079,7 @@ function Li({
16057
16079
  isLoading: q,
16058
16080
  sendMessage: _
16059
16081
  });
16060
- const { hasActiveTools: ot, activeToolText: nt } = Om(V), Ke = Ie(
16082
+ const { hasActiveTools: ot, activeToolText: nt } = Om(V), Ke = De(
16061
16083
  (me) => {
16062
16084
  a == null || a(me), t === void 0 && x(me);
16063
16085
  },
@@ -16072,7 +16094,7 @@ function Li({
16072
16094
  window.removeEventListener("keydown", me);
16073
16095
  };
16074
16096
  }, [y, Ke]);
16075
- const Fe = Ie(
16097
+ const Fe = De(
16076
16098
  (me) => {
16077
16099
  _({
16078
16100
  role: "user",
@@ -16080,7 +16102,7 @@ function Li({
16080
16102
  }), $e();
16081
16103
  },
16082
16104
  [$e, _]
16083
- ), at = Ie(async () => {
16105
+ ), at = De(async () => {
16084
16106
  const me = JSON.stringify(V ?? [], null, 2);
16085
16107
  try {
16086
16108
  if (typeof navigator > "u" || !navigator.clipboard)
@@ -16089,7 +16111,7 @@ function Li({
16089
16111
  } catch (J) {
16090
16112
  console.error("Failed to copy conversation", J), it.error("Unable to copy conversation");
16091
16113
  }
16092
- }, [V]), Ye = Ie(() => {
16114
+ }, [V]), Ye = De(() => {
16093
16115
  Ke(!y);
16094
16116
  }, [y, Ke]);
16095
16117
  function Xe(me, J) {
@@ -16276,9 +16298,9 @@ function Li({
16276
16298
  setInput: ve,
16277
16299
  stop: Y,
16278
16300
  input: ue,
16279
- handleInputChange: ke,
16301
+ handleInputChange: Ie,
16280
16302
  handleSubmit: (me) => {
16281
- ge(), De(me);
16303
+ ge(), Ee(me);
16282
16304
  },
16283
16305
  isLoading: q,
16284
16306
  status: X,
@@ -17288,8 +17310,8 @@ function sb({
17288
17310
  handleMetricMovingAverageWindowSizeChange: Q,
17289
17311
  handleMetricMovingAverageMinPeriodsChange: ue,
17290
17312
  handleMetricPreviousPeriodDeltaModeChange: ve,
17291
- handleMetricPercentOfTotalScopeChange: ke,
17292
- handleMetricPercentOfTotalOutputChange: De,
17313
+ handleMetricPercentOfTotalScopeChange: Ie,
17314
+ handleMetricPercentOfTotalOutputChange: Ee,
17293
17315
  handleKpiShowTrendlineChange: $e,
17294
17316
  handleKpiTrendlineWindowChange: ot,
17295
17317
  handleKpiTrendlineGranularityChange: nt,
@@ -17319,7 +17341,7 @@ function sb({
17319
17341
  Ae.dataType
17320
17342
  ), [J, Re] = U(
17321
17343
  t.dateFormat || "YYYY-MM-DD"
17322
- ), [He, Et] = U(t.customFormat || ""), [he, Pe] = U(!!t.customFormat), Me = Ee(null), [et, xt] = U(
17344
+ ), [He, Et] = U(t.customFormat || ""), [he, Pe] = U(!!t.customFormat), Me = ke(null), [et, xt] = U(
17323
17345
  t.aliasTemplate || ""
17324
17346
  ), [gt, pe] = U(
17325
17347
  t.valueAliases || {}
@@ -17900,7 +17922,7 @@ function sb({
17900
17922
  ae,
17901
17923
  {
17902
17924
  value: il,
17903
- onValueChange: (ne) => ke(
17925
+ onValueChange: (ne) => Ie(
17904
17926
  s,
17905
17927
  ne
17906
17928
  ),
@@ -17920,7 +17942,7 @@ function sb({
17920
17942
  ae,
17921
17943
  {
17922
17944
  value: Lc,
17923
- onValueChange: (ne) => De(
17945
+ onValueChange: (ne) => Ee(
17924
17946
  s,
17925
17947
  ne
17926
17948
  ),
@@ -20467,7 +20489,7 @@ function Ob({
20467
20489
  (v) => v.actions.updateCardConfig
20468
20490
  ), c = L(
20469
20491
  (v) => v.actions.setCardPreferences
20470
- ), u = (S = l == null ? void 0 : l.config) == null ? void 0 : S.joinPlan, m = Ie(
20492
+ ), u = (S = l == null ? void 0 : l.config) == null ? void 0 : S.joinPlan, m = De(
20471
20493
  (v) => v.entityName === vp || v.entityName === "calculated_fields" || v.qualifiedEntityName === "calculated_fields",
20472
20494
  []
20473
20495
  ), g = (D = l == null ? void 0 : l.dataSource) == null ? void 0 : D.semanticDomainId, { data: f } = sh(g), h = [
@@ -20477,12 +20499,12 @@ function Ob({
20477
20499
  ...s("metrics"),
20478
20500
  ...s("sortBy"),
20479
20501
  ...s("detailColumns")
20480
- ], x = Ie(
20502
+ ], x = De(
20481
20503
  (v) => v.startsWith("card-source-") ? "source" : v.startsWith("card-") ? null : v.startsWith("source-") || a.find((b) => b.id === v) ? "source" : s("groupBy").find((b) => b.id === v) ? "groupBy" : s("metrics").find((b) => b.id === v) ? "metrics" : s("pivotBy").find((b) => b.id === v) ? "pivotBy" : s("sortBy").find((b) => b.id === v) ? "sortBy" : s("detailColumns").find((b) => b.id === v) ? "detailColumns" : null,
20482
20504
  [a, s]
20483
- ), M = Ie((v) => {
20505
+ ), M = De((v) => {
20484
20506
  i(v.active.id);
20485
- }, []), N = Ie(
20507
+ }, []), N = De(
20486
20508
  (v) => {
20487
20509
  var I;
20488
20510
  const { active: b, over: E } = v;
@@ -21011,10 +21033,10 @@ function qb({
21011
21033
  } = Bt(r), ve = de(
21012
21034
  () => (V == null ? void 0 : V.records) || [],
21013
21035
  [V == null ? void 0 : V.records]
21014
- ), ke = de(
21036
+ ), Ie = de(
21015
21037
  () => !q && ve.length > 0 ? Object.keys(ve[0]) : [],
21016
21038
  [q, ve]
21017
- ), [De, $e] = U(!1);
21039
+ ), [Ee, $e] = U(!1);
21018
21040
  Se(() => {
21019
21041
  q || $e(!1);
21020
21042
  }, [q]);
@@ -21113,7 +21135,7 @@ function qb({
21113
21135
  yr,
21114
21136
  {
21115
21137
  className: G("h-3.5 w-3.5", {
21116
- "animate-spin": De
21138
+ "animate-spin": Ee
21117
21139
  })
21118
21140
  }
21119
21141
  )
@@ -21124,7 +21146,7 @@ function qb({
21124
21146
  {
21125
21147
  card: r,
21126
21148
  effectiveCardType: R,
21127
- queryResultColumns: ke
21149
+ queryResultColumns: Ie
21128
21150
  }
21129
21151
  ),
21130
21152
  t === "chart" && !w && /* @__PURE__ */ e(
@@ -21337,7 +21359,7 @@ const Kb = () => {
21337
21359
  };
21338
21360
  function Ub({ column: t, isSelected: a, onSelect: s, availableFields: r, width: d, onWidthChange: i }) {
21339
21361
  var V, z, _;
21340
- const l = L((q) => q.card), { updateCardConfig: o, removeGroupByColumn: c, removeMetricColumn: u, updateFilters: m } = we(), [g, f] = U(!1), [h, x] = U(!1), M = Ee(null), N = Ie((q) => {
21362
+ const l = L((q) => q.card), { updateCardConfig: o, removeGroupByColumn: c, removeMetricColumn: u, updateFilters: m } = we(), [g, f] = U(!1), [h, x] = U(!1), M = ke(null), N = De((q) => {
21341
21363
  q.preventDefault(), q.stopPropagation(), x(!0), M.current = {
21342
21364
  startX: q.clientX,
21343
21365
  startWidth: d || 150
@@ -21593,9 +21615,9 @@ function Qb({
21593
21615
  }, [(O = i == null ? void 0 : i.config) == null ? void 0 : O.groupByColumns, (A = i == null ? void 0 : i.config) == null ? void 0 : A.metricColumns]), x = de(() => {
21594
21616
  const P = new Set(h.map((B) => `${B.qualifiedEntityName}.${B.name}`));
21595
21617
  return r.filter((B) => !P.has(`${B.qualifiedEntityName}.${B.name}`));
21596
- }, [r, h]), { data: M, isLoading: N } = Bt(i), y = (M == null ? void 0 : M.records) || [], S = Ie((P, B) => {
21618
+ }, [r, h]), { data: M, isLoading: N } = Bt(i), y = (M == null ? void 0 : M.records) || [], S = De((P, B) => {
21597
21619
  m((p) => ({ ...p, [P]: B }));
21598
- }, []), D = Ie((P) => {
21620
+ }, []), D = De((P) => {
21599
21621
  var k, R;
21600
21622
  const B = pt(P.dataType), p = ((k = i == null ? void 0 : i.config) == null ? void 0 : k.groupByColumns) || [], w = ((R = i == null ? void 0 : i.config) == null ? void 0 : R.metricColumns) || [];
21601
21623
  if (B === "number") {
@@ -22066,7 +22088,7 @@ function Yb({
22066
22088
  selectedColumn: d,
22067
22089
  availableColumns: i
22068
22090
  }) {
22069
- const [l, o] = U(!1), [c, u] = U("column"), m = Ee(null);
22091
+ const [l, o] = U(!1), [c, u] = U("column"), m = ke(null);
22070
22092
  Se(() => {
22071
22093
  const x = (M) => {
22072
22094
  M.key === "Escape" && t ? r() : M.key === "Enter" && t && !l && s(t);
@@ -22389,7 +22411,7 @@ function Zb() {
22389
22411
  );
22390
22412
  }
22391
22413
  function ey({ authToken: t, onSave: a, onClose: s }) {
22392
- const r = Ee(null), d = L((T) => T.showAIDialog), i = L((T) => T.isDevMode), l = Qs((T) => T.setFullscreen), o = Qs((T) => T.setPanelOpen), c = Qs((T) => T.setContainer), u = xh("editor"), m = bh(), g = yh("editor"), f = m === "editor", h = Er(), x = Ie(
22414
+ const r = ke(null), d = L((T) => T.showAIDialog), i = L((T) => T.isDevMode), l = Qs((T) => T.setFullscreen), o = Qs((T) => T.setPanelOpen), c = Qs((T) => T.setContainer), u = xh("editor"), m = bh(), g = yh("editor"), f = m === "editor", h = Er(), x = De(
22393
22415
  (T) => {
22394
22416
  c("editor", T);
22395
22417
  },