drizzle-cube 0.4.8 → 0.4.10

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 (40) hide show
  1. package/dist/adapters/express/index.cjs +1 -1
  2. package/dist/adapters/express/index.js +1 -1
  3. package/dist/adapters/fastify/index.cjs +1 -1
  4. package/dist/adapters/fastify/index.js +1 -1
  5. package/dist/adapters/{handler-odjn7MIB.js → handler-CySCodwi.js} +336 -210
  6. package/dist/adapters/{handler-BLcxTuwi.cjs → handler-e6zofK2k.cjs} +13 -13
  7. package/dist/adapters/hono/index.cjs +1 -1
  8. package/dist/adapters/hono/index.js +1 -1
  9. package/dist/adapters/nextjs/index.cjs +1 -1
  10. package/dist/adapters/nextjs/index.js +1 -1
  11. package/dist/client/charts.js +4 -4
  12. package/dist/client/chunks/{analysis-builder-Bov_gLsf.js → analysis-builder-BMmWeFPr.js} +138 -138
  13. package/dist/client/chunks/{analysis-builder-Bov_gLsf.js.map → analysis-builder-BMmWeFPr.js.map} +1 -1
  14. package/dist/client/chunks/{analysis-builder-shared-NBk6y0md.js → analysis-builder-shared-D56zYeV0.js} +713 -787
  15. package/dist/client/chunks/analysis-builder-shared-D56zYeV0.js.map +1 -0
  16. package/dist/client/chunks/{chart-area-QKKboTbq.js → chart-area-BJAgusst.js} +2 -2
  17. package/dist/client/chunks/{chart-area-QKKboTbq.js.map → chart-area-BJAgusst.js.map} +1 -1
  18. package/dist/client/chunks/chart-bar-Blypx8O4.js +267 -0
  19. package/dist/client/chunks/chart-bar-Blypx8O4.js.map +1 -0
  20. package/dist/client/chunks/{chart-line-C7YcMWBw.js → chart-line-zi6olZet.js} +2 -2
  21. package/dist/client/chunks/{chart-line-C7YcMWBw.js.map → chart-line-zi6olZet.js.map} +1 -1
  22. package/dist/client/chunks/{charts-loader-HYQFVOo4.js → charts-loader-CH0_S06T.js} +4 -4
  23. package/dist/client/chunks/{charts-loader-HYQFVOo4.js.map → charts-loader-CH0_S06T.js.map} +1 -1
  24. package/dist/client/chunks/{components-O0hh7ooo.js → components-ClQziOcT.js} +1495 -1416
  25. package/dist/client/chunks/components-ClQziOcT.js.map +1 -0
  26. package/dist/client/components/AgenticNotebook/NotebookPortletBlock.d.ts +1 -0
  27. package/dist/client/components.js +8 -8
  28. package/dist/client/index.js +655 -584
  29. package/dist/client/index.js.map +1 -1
  30. package/dist/client/stores/notebookStore.d.ts +2 -0
  31. package/dist/client/styles.css +1 -1
  32. package/dist/client/utils.js +1 -1
  33. package/dist/client-bundle-stats.html +1 -1
  34. package/dist/server/index.cjs +13 -13
  35. package/dist/server/index.js +1824 -1698
  36. package/package.json +1 -1
  37. package/dist/client/chunks/analysis-builder-shared-NBk6y0md.js.map +0 -1
  38. package/dist/client/chunks/chart-bar-HpXF42H1.js +0 -254
  39. package/dist/client/chunks/chart-bar-HpXF42H1.js.map +0 -1
  40. package/dist/client/chunks/components-O0hh7ooo.js.map +0 -1
@@ -1,192 +1,227 @@
1
- import { A as q } from "./chunks/components-O0hh7ooo.js";
2
- import { g as Ke, a as je, C as $e, f as Ue, e as ze, D as Oe, h as qe, c as We, b as Je, M as He, d as Ge, P as Xe, l as Ye, R as Ze, O as et, N as tt, L as st, Q as at, T as ct, G as ot, F as rt, I as nt, U as dt, E as lt, H as it, V as ut, J as mt, K as pt, S as ht, W as ft, X as bt, x as gt, o as xt, v as yt, q as vt, s as Ct, t as Nt, n as kt, r as wt, m as St, p as Dt, w as Mt, u as At, i as Tt, j as It, k as Et, B as Rt, z as Bt, y as Lt } from "./chunks/components-O0hh7ooo.js";
3
- import { jsx as a, jsxs as g, Fragment as W } from "react/jsx-runtime";
4
- import B, { useRef as C, createContext as J, useContext as H, useEffect as Q, useCallback as f, useState as _ } from "react";
5
- import { c as G, d as X, e as Y, s as Z, f as V } from "./chunks/vendor-AVsJ2ni0.js";
6
- import { Q as ee } from "./chunks/chart-markdown-Du4Z2iqK.js";
7
- import { f as te } from "./chunks/providers-CgxXm6Ll.js";
8
- import { h as Ft, a as Pt, S as Vt, e as _t, d as Kt, i as jt, b as $t, g as Ut, u as zt, j as Ot, c as qt, w as Wt } from "./chunks/providers-CgxXm6Ll.js";
9
- import { L as Ht, u as Gt } from "./chunks/charts-core-DmGfleFz.js";
10
- import { L as Yt, g as Zt, c as es, b as ts, i as ss, p as as, a as cs } from "./chunks/charts-loader-HYQFVOo4.js";
11
- import { a as se } from "./chunks/icons-DAeqv1iX.js";
12
- import { D as rs, h as ns, i as ds, b as ls, e as is, f as us, g as ms, r as ps, c as hs, s as fs } from "./chunks/icons-DAeqv1iX.js";
13
- import { E as gs, a as xs, p as ys, q as vs, m as Cs, l as Ns, r as ks, C as ws, D as Ss, o as Ds, B as Ms, n as As, w as Ts, t as Is, d as Es, f as Rs, s as Bs, e as Ls, i as Qs, c as Fs, h as Ps, g as Vs, u as _s, b as Ks, y as js, A as $s, x as Us, k as zs, v as Os, z as qs, j as Ws } from "./chunks/analysis-builder-shared-NBk6y0md.js";
14
- import { u as Hs } from "./chunks/chart-bubble-Bf42A1-B.js";
15
- import { c as Xs, f as Ys } from "./chunks/index-CApFCBF9.js";
16
- import { e as ea, c as ta, l as sa, h as aa, k as ca, j as oa, i as ra, m as na, g as da, f as la, u as ia, u as ua, d as ma, b as pa, a as ha, v as fa } from "./chunks/useDirtyStateTracking-Cu1HSjmo.js";
17
- import { c as ga, b as xa, f as ya, g as va, a as Ca, i as Na, t as ka } from "./chunks/funnel-utils-CyonoNeC.js";
18
- import { T as Sa, c as Da, g as Ma, a as Aa, i as Ta, r as Ia, s as Ea, b as Ra, w as Ba } from "./chunks/theme-Dp3hFed1.js";
19
- import { createExplainQueryKey as Qa, useDryRunQueries as Fa, useDryRunQuery as Pa, useExplainAI as Va, useExplainQuery as _a, useMultiDryRunQueries as Ka } from "./hooks.js";
20
- import { i as $a, a as Ua } from "./chunks/flow-utils-CjQZG5qq.js";
21
- import { h as Oa } from "./chunks/syntaxHighlighting-BQfjio-i.js";
22
- const j = () => ({
1
+ import { D as J, A as H, e as G, P as X } from "./chunks/components-ClQziOcT.js";
2
+ import { i as Je, a as He, C as Ge, h as Xe, g as Ye, b as Ze, j as et, f as tt, d as st, M as at, c as ct, n as ot, T as rt, R as nt, Q as dt, O as it, S as lt, V as ut, I as mt, H as pt, K as ht, W as ft, G as gt, J as bt, X as yt, L as xt, N as Ct, U as vt, Y as kt, Z as Nt, z as wt, q as St, x as Dt, t as Mt, s as At, w as Tt, p as It, v as Et, o as Bt, r as Rt, y as Lt, u as Qt, k as Ft, l as Pt, m as Vt, F as _t, E as jt, B as Kt } from "./chunks/components-ClQziOcT.js";
3
+ import { jsx as a, jsxs as y, Fragment as Y } from "react/jsx-runtime";
4
+ import L, { useRef as N, createContext as Z, useContext as ee, useState as F, useCallback as p, useEffect as Q } from "react";
5
+ import { c as te, d as se, e as ae, s as ce, f as K } from "./chunks/vendor-AVsJ2ni0.js";
6
+ import { a as P } from "./chunks/icons-DAeqv1iX.js";
7
+ import { D as Ot, h as qt, i as $t, b as zt, e as Wt, f as Jt, g as Ht, r as Gt, c as Xt, s as Yt } from "./chunks/icons-DAeqv1iX.js";
8
+ import { Q as oe } from "./chunks/chart-markdown-Du4Z2iqK.js";
9
+ import { f as re } from "./chunks/providers-CgxXm6Ll.js";
10
+ import { h as es, a as ts, S as ss, e as as, d as cs, i as os, b as rs, g as ns, u as ds, j as is, c as ls, w as us } from "./chunks/providers-CgxXm6Ll.js";
11
+ import { L as ps, u as hs } from "./chunks/charts-core-DmGfleFz.js";
12
+ import { L as gs, g as bs, c as ys, b as xs, i as Cs, p as vs, a as ks } from "./chunks/charts-loader-CH0_S06T.js";
13
+ import { E as ws, a as Ss, p as Ds, q as Ms, m as As, l as Ts, r as Is, C as Es, D as Bs, o as Rs, B as Ls, n as Qs, w as Fs, t as Ps, d as Vs, f as _s, s as js, e as Ks, i as Us, c as Os, h as qs, g as $s, u as zs, b as Ws, y as Js, A as Hs, x as Gs, k as Xs, v as Ys, z as Zs, j as ea } from "./chunks/analysis-builder-shared-D56zYeV0.js";
14
+ import { u as sa } from "./chunks/chart-bubble-Bf42A1-B.js";
15
+ import { c as ca, f as oa } from "./chunks/index-CApFCBF9.js";
16
+ import { e as na, c as da, l as ia, h as la, k as ua, j as ma, i as pa, m as ha, g as fa, f as ga, u as ba, u as ya, d as xa, b as Ca, a as va, v as ka } from "./chunks/useDirtyStateTracking-Cu1HSjmo.js";
17
+ import { c as wa, b as Sa, f as Da, g as Ma, a as Aa, i as Ta, t as Ia } from "./chunks/funnel-utils-CyonoNeC.js";
18
+ import { T as Ba, c as Ra, g as La, a as Qa, i as Fa, r as Pa, s as Va, b as _a, w as ja } from "./chunks/theme-Dp3hFed1.js";
19
+ import { createExplainQueryKey as Ua, useDryRunQueries as Oa, useDryRunQuery as qa, useExplainAI as $a, useExplainQuery as za, useMultiDryRunQueries as Wa } from "./hooks.js";
20
+ import { i as Ha, a as Ga } from "./chunks/flow-utils-CjQZG5qq.js";
21
+ import { h as Ya } from "./chunks/syntaxHighlighting-BQfjio-i.js";
22
+ const O = () => ({
23
23
  blocks: [],
24
24
  messages: [],
25
25
  isStreaming: !1,
26
26
  sessionId: null,
27
27
  inputValue: ""
28
28
  });
29
- function ae(t, e) {
29
+ function ne(e, t) {
30
30
  return {
31
31
  // Block actions
32
- addBlock: (s) => t((c) => ({
32
+ addBlock: (s) => e((c) => ({
33
33
  blocks: [...c.blocks, s]
34
34
  })),
35
- removeBlock: (s) => t((c) => ({
36
- blocks: c.blocks.filter((o) => o.id !== s)
35
+ removeBlock: (s) => e((c) => ({
36
+ blocks: c.blocks.filter((r) => r.id !== s)
37
37
  })),
38
- moveBlock: (s, c) => t((o) => {
39
- const r = o.blocks.findIndex((m) => m.id === s);
40
- if (r === -1) return {};
41
- if (c === "up" && r === 0) return {};
42
- if (c === "down" && r === o.blocks.length - 1) return {};
43
- const n = [...o.blocks], i = c === "up" ? r - 1 : r + 1;
44
- return [n[r], n[i]] = [n[i], n[r]], { blocks: n };
38
+ moveBlock: (s, c) => e((r) => {
39
+ const o = r.blocks.findIndex((d) => d.id === s);
40
+ if (o === -1) return {};
41
+ if (c === "up" && o === 0) return {};
42
+ if (c === "down" && o === r.blocks.length - 1) return {};
43
+ const n = [...r.blocks], u = c === "up" ? o - 1 : o + 1;
44
+ return [n[o], n[u]] = [n[u], n[o]], { blocks: n };
45
45
  }),
46
+ updateBlock: (s, c) => e((r) => ({
47
+ blocks: r.blocks.map(
48
+ (o) => o.id === s && o.type === "portlet" ? { ...o, ...c } : o
49
+ )
50
+ })),
46
51
  // Chat actions
47
- addMessage: (s) => t((c) => ({
52
+ addMessage: (s) => e((c) => ({
48
53
  messages: [...c.messages, s]
49
54
  })),
50
- appendToLastAssistantMessage: (s) => t((c) => {
51
- const o = [...c.messages], r = o[o.length - 1];
52
- return r && r.role === "assistant" && (o[o.length - 1] = {
53
- ...r,
54
- content: r.content + s
55
- }), { messages: o };
55
+ appendToLastAssistantMessage: (s) => e((c) => {
56
+ const r = [...c.messages], o = r[r.length - 1];
57
+ return o && o.role === "assistant" && (r[r.length - 1] = {
58
+ ...o,
59
+ content: o.content + s
60
+ }), { messages: r };
56
61
  }),
57
- addToolCallToLastAssistant: (s) => t((c) => {
58
- const o = [...c.messages], r = o[o.length - 1];
59
- return r && r.role === "assistant" && (o[o.length - 1] = {
60
- ...r,
61
- toolCalls: [...r.toolCalls || [], s]
62
- }), { messages: o };
62
+ addToolCallToLastAssistant: (s) => e((c) => {
63
+ const r = [...c.messages], o = r[r.length - 1];
64
+ return o && o.role === "assistant" && (r[r.length - 1] = {
65
+ ...o,
66
+ toolCalls: [...o.toolCalls || [], s]
67
+ }), { messages: r };
63
68
  }),
64
- updateLastToolCall: (s) => t((c) => {
65
- const o = [...c.messages], r = o[o.length - 1];
66
- if (r?.role === "assistant" && r.toolCalls?.length) {
67
- const n = [...r.toolCalls], i = s.id ? n.findIndex((m) => m.id === s.id) : n.length - 1;
68
- i !== -1 && (n[i] = { ...n[i], ...s }, o[o.length - 1] = { ...r, toolCalls: n });
69
+ updateLastToolCall: (s) => e((c) => {
70
+ const r = [...c.messages], o = r[r.length - 1];
71
+ if (o?.role === "assistant" && o.toolCalls?.length) {
72
+ const n = [...o.toolCalls], u = s.id ? n.findIndex((d) => d.id === s.id) : n.length - 1;
73
+ u !== -1 && (n[u] = { ...n[u], ...s }, r[r.length - 1] = { ...o, toolCalls: n });
69
74
  }
70
- return { messages: o };
75
+ return { messages: r };
71
76
  }),
72
77
  // Session/UI actions
73
- setIsStreaming: (s) => t({ isStreaming: s }),
74
- setSessionId: (s) => t({ sessionId: s }),
75
- setInputValue: (s) => t({ inputValue: s }),
78
+ setIsStreaming: (s) => e({ isStreaming: s }),
79
+ setSessionId: (s) => e({ sessionId: s }),
80
+ setInputValue: (s) => e({ inputValue: s }),
76
81
  // Persistence
77
82
  save: () => {
78
- const s = e();
83
+ const s = t();
79
84
  return {
80
85
  blocks: s.blocks,
81
86
  messages: s.messages
82
87
  };
83
88
  },
84
- load: (s) => t({
89
+ load: (s) => e({
85
90
  blocks: s.blocks || [],
86
91
  messages: s.messages || []
87
92
  }),
88
93
  // Reset
89
- reset: () => t(j())
94
+ reset: () => e(O())
90
95
  };
91
96
  }
92
- function ce() {
93
- const t = j();
94
- return X()(
95
- Y(
96
- Z((e, s) => ({
97
- ...t,
98
- ...ae(e, s)
97
+ function de() {
98
+ const e = O();
99
+ return se()(
100
+ ae(
101
+ ce((t, s) => ({
102
+ ...e,
103
+ ...ne(t, s)
99
104
  })),
100
105
  { name: "NotebookStore" }
101
106
  )
102
107
  );
103
108
  }
104
- const $ = J(null);
105
- function oe({
106
- children: t,
107
- initialConfig: e
109
+ const q = Z(null);
110
+ function ie({
111
+ children: e,
112
+ initialConfig: t
108
113
  }) {
109
- const s = C(null);
114
+ const s = N(null);
110
115
  if (!s.current) {
111
- const c = ce();
112
- e && c.getState().load(e), s.current = c;
116
+ const c = de();
117
+ t && c.getState().load(t), s.current = c;
113
118
  }
114
- return /* @__PURE__ */ a($.Provider, { value: s.current, children: t });
119
+ return /* @__PURE__ */ a(q.Provider, { value: s.current, children: e });
115
120
  }
116
- function k(t) {
117
- const e = H($);
118
- if (!e)
121
+ function D(e) {
122
+ const t = ee(q);
123
+ if (!t)
119
124
  throw new Error("useNotebookStore must be used within NotebookStoreProvider");
120
- return G(e, t);
125
+ return te(t, e);
121
126
  }
122
- const re = (t) => t.blocks, Ee = (t) => t.messages, Re = (t) => t.isStreaming, Be = (t) => t.sessionId, Le = (t) => t.inputValue, ne = (t) => ({
123
- messages: t.messages,
124
- isStreaming: t.isStreaming,
125
- inputValue: t.inputValue
126
- }), de = (t) => ({
127
- addMessage: t.addMessage,
128
- appendToLastAssistantMessage: t.appendToLastAssistantMessage,
129
- addToolCallToLastAssistant: t.addToolCallToLastAssistant,
130
- updateLastToolCall: t.updateLastToolCall,
131
- setIsStreaming: t.setIsStreaming,
132
- setInputValue: t.setInputValue,
133
- setSessionId: t.setSessionId
134
- }), le = (t) => ({
135
- addBlock: t.addBlock,
136
- removeBlock: t.removeBlock,
137
- moveBlock: t.moveBlock
138
- }), ie = B.memo(function({
139
- block: e,
127
+ const le = (e) => e.blocks, _e = (e) => e.messages, je = (e) => e.isStreaming, Ke = (e) => e.sessionId, Ue = (e) => e.inputValue, ue = (e) => ({
128
+ messages: e.messages,
129
+ isStreaming: e.isStreaming,
130
+ inputValue: e.inputValue
131
+ }), me = (e) => ({
132
+ addMessage: e.addMessage,
133
+ appendToLastAssistantMessage: e.appendToLastAssistantMessage,
134
+ addToolCallToLastAssistant: e.addToolCallToLastAssistant,
135
+ updateLastToolCall: e.updateLastToolCall,
136
+ setIsStreaming: e.setIsStreaming,
137
+ setInputValue: e.setInputValue,
138
+ setSessionId: e.setSessionId
139
+ }), pe = (e) => ({
140
+ addBlock: e.addBlock,
141
+ removeBlock: e.removeBlock,
142
+ moveBlock: e.moveBlock,
143
+ updateBlock: e.updateBlock
144
+ }), V = { width: "16px", height: "16px", color: "currentColor" }, he = P("chevronUp"), fe = P("chevronDown"), ge = P("edit"), be = P("delete"), ye = L.memo(function({
145
+ block: t,
140
146
  onRemove: s,
141
147
  onMoveUp: c,
142
- onMoveDown: o,
143
- isFirst: r,
144
- isLast: n
148
+ onMoveDown: r,
149
+ onEdit: o,
150
+ isFirst: n,
151
+ isLast: u
145
152
  }) {
146
- return /* @__PURE__ */ g("div", { className: "dc:group dc:relative dc:mb-4", children: [
147
- /* @__PURE__ */ g("div", { className: "dc:absolute dc:right-2 dc:top-2 dc:z-10 dc:flex dc:gap-1 dc:opacity-0 dc:group-hover:opacity-100 dc:transition-opacity", children: [
148
- !r && /* @__PURE__ */ a(
149
- "button",
150
- {
151
- onClick: () => c(e.id),
152
- className: "dc:p-1 dc:rounded dc:text-xs bg-dc-surface text-dc-text-secondary dc:hover:opacity-80 border-dc-border dc:border",
153
- title: "Move up",
154
- children: "▲"
155
- }
156
- ),
157
- !n && /* @__PURE__ */ a(
158
- "button",
159
- {
160
- onClick: () => o(e.id),
161
- className: "dc:p-1 dc:rounded dc:text-xs bg-dc-surface text-dc-text-secondary dc:hover:opacity-80 border-dc-border dc:border",
162
- title: "Move down",
163
- children: "▼"
164
- }
165
- ),
166
- /* @__PURE__ */ a(
167
- "button",
168
- {
169
- onClick: () => s(e.id),
170
- className: "dc:p-1 dc:rounded dc:text-xs text-dc-error dc:hover:opacity-80 bg-dc-surface border-dc-border dc:border",
171
- title: "Remove",
172
- children: "✕"
173
- }
174
- )
153
+ const [d, g] = F(null), h = p((x) => {
154
+ g(x);
155
+ }, []);
156
+ return /* @__PURE__ */ y("div", { className: "dc:relative dc:mb-4 bg-dc-surface dc:border border-dc-border dc:rounded-lg dc:flex dc:flex-col", children: [
157
+ /* @__PURE__ */ y("div", { className: "dc:flex dc:items-center dc:justify-between dc:px-3 dc:py-1.5 dc:border-b border-dc-border dc:shrink-0 bg-dc-surface-secondary dc:rounded-t-lg", children: [
158
+ /* @__PURE__ */ y("div", { className: "dc:flex dc:items-center dc:gap-2 dc:flex-1 dc:min-w-0", children: [
159
+ /* @__PURE__ */ a("h3", { className: "dc:font-semibold dc:text-sm text-dc-text dc:truncate", children: t.title || "Untitled" }),
160
+ d && /* @__PURE__ */ a(
161
+ J,
162
+ {
163
+ chartConfig: d.chartConfig,
164
+ displayConfig: d.displayConfig,
165
+ queryObject: d.queryObject,
166
+ data: d.data,
167
+ chartType: d.chartType,
168
+ cacheInfo: d.cacheInfo ?? void 0
169
+ }
170
+ )
171
+ ] }),
172
+ /* @__PURE__ */ y("div", { className: "dc:flex dc:items-center dc:gap-1 dc:shrink-0 dc:ml-4 dc:-mr-2", children: [
173
+ !n && /* @__PURE__ */ a(
174
+ "button",
175
+ {
176
+ onClick: () => c(t.id),
177
+ className: "dc:p-1 dc:bg-transparent dc:border-none dc:rounded-sm text-dc-text-secondary dc:cursor-pointer dc:hover:bg-dc-surface-hover dc:transition-colors",
178
+ title: "Move up",
179
+ children: /* @__PURE__ */ a(he, { style: V })
180
+ }
181
+ ),
182
+ !u && /* @__PURE__ */ a(
183
+ "button",
184
+ {
185
+ onClick: () => r(t.id),
186
+ className: "dc:p-1 dc:bg-transparent dc:border-none dc:rounded-sm text-dc-text-secondary dc:cursor-pointer dc:hover:bg-dc-surface-hover dc:transition-colors",
187
+ title: "Move down",
188
+ children: /* @__PURE__ */ a(fe, { style: V })
189
+ }
190
+ ),
191
+ /* @__PURE__ */ a(
192
+ "button",
193
+ {
194
+ onClick: () => o(t),
195
+ className: "dc:p-1 dc:bg-transparent dc:border-none dc:rounded-sm text-dc-text-secondary dc:cursor-pointer dc:hover:bg-dc-surface-hover dc:transition-colors",
196
+ title: "Edit visualization",
197
+ children: /* @__PURE__ */ a(ge, { style: V })
198
+ }
199
+ ),
200
+ /* @__PURE__ */ a(
201
+ "button",
202
+ {
203
+ onClick: () => s(t.id),
204
+ className: "dc:p-1 dc:mr-0.5 dc:bg-transparent dc:border-none dc:rounded-sm dc:cursor-pointer dc:hover:bg-dc-danger-bg text-dc-danger dc:transition-colors",
205
+ title: "Remove",
206
+ children: /* @__PURE__ */ a(be, { style: V })
207
+ }
208
+ )
209
+ ] })
175
210
  ] }),
176
- e.title && /* @__PURE__ */ a("h4", { className: "dc:text-sm dc:font-semibold text-dc-text dc:mb-2 dc:px-1", children: e.title }),
177
- /* @__PURE__ */ a("div", { className: "dc:rounded-lg dc:overflow-hidden border-dc-border dc:border bg-dc-surface", children: /* @__PURE__ */ a(
178
- q,
211
+ /* @__PURE__ */ a("div", { className: "dc:flex-1 dc:min-h-0", children: /* @__PURE__ */ a(
212
+ H,
179
213
  {
180
- query: e.query,
181
- chartType: e.chartType,
182
- chartConfig: e.chartConfig,
183
- displayConfig: e.displayConfig,
214
+ query: t.query,
215
+ chartType: t.chartType,
216
+ chartConfig: t.chartConfig,
217
+ displayConfig: t.displayConfig,
184
218
  height: 400,
185
- eagerLoad: !0
219
+ eagerLoad: !0,
220
+ onDebugDataReady: h
186
221
  }
187
222
  ) })
188
223
  ] });
189
- }), ue = {
224
+ }), xe = {
190
225
  overrides: {
191
226
  h1: { props: { className: "dc:text-lg dc:font-bold text-dc-text dc:mb-2 dc:mt-3" } },
192
227
  h2: { props: { className: "dc:text-base dc:font-semibold text-dc-text dc:mb-2 dc:mt-3" } },
@@ -207,20 +242,20 @@ const re = (t) => t.blocks, Ee = (t) => t.messages, Re = (t) => t.isStreaming, B
207
242
  td: { props: { className: "dc:px-3 dc:py-2 dc:text-sm text-dc-text border-dc-border dc:border-b" } },
208
243
  tr: { props: { className: "dc:hover:opacity-80" } }
209
244
  }
210
- }, me = B.memo(function({
211
- block: e,
245
+ }, Ce = L.memo(function({
246
+ block: t,
212
247
  onRemove: s,
213
248
  onMoveUp: c,
214
- onMoveDown: o,
215
- isFirst: r,
249
+ onMoveDown: r,
250
+ isFirst: o,
216
251
  isLast: n
217
252
  }) {
218
- return /* @__PURE__ */ g("div", { className: "dc:group dc:relative dc:mb-4", children: [
219
- /* @__PURE__ */ g("div", { className: "dc:absolute dc:right-2 dc:top-2 dc:z-10 dc:flex dc:gap-1 dc:opacity-0 dc:group-hover:opacity-100 dc:transition-opacity", children: [
220
- !r && /* @__PURE__ */ a(
253
+ return /* @__PURE__ */ y("div", { className: "dc:group dc:relative dc:mb-4", children: [
254
+ /* @__PURE__ */ y("div", { className: "dc:absolute dc:right-2 dc:top-2 dc:z-10 dc:flex dc:gap-1 dc:opacity-0 dc:group-hover:opacity-100 dc:transition-opacity", children: [
255
+ !o && /* @__PURE__ */ a(
221
256
  "button",
222
257
  {
223
- onClick: () => c(e.id),
258
+ onClick: () => c(t.id),
224
259
  className: "dc:p-1 dc:rounded dc:text-xs bg-dc-surface text-dc-text-secondary dc:hover:opacity-80 border-dc-border dc:border",
225
260
  title: "Move up",
226
261
  children: "▲"
@@ -229,7 +264,7 @@ const re = (t) => t.blocks, Ee = (t) => t.messages, Re = (t) => t.isStreaming, B
229
264
  !n && /* @__PURE__ */ a(
230
265
  "button",
231
266
  {
232
- onClick: () => o(e.id),
267
+ onClick: () => r(t.id),
233
268
  className: "dc:p-1 dc:rounded dc:text-xs bg-dc-surface text-dc-text-secondary dc:hover:opacity-80 border-dc-border dc:border",
234
269
  title: "Move down",
235
270
  children: "▼"
@@ -238,270 +273,306 @@ const re = (t) => t.blocks, Ee = (t) => t.messages, Re = (t) => t.isStreaming, B
238
273
  /* @__PURE__ */ a(
239
274
  "button",
240
275
  {
241
- onClick: () => s(e.id),
276
+ onClick: () => s(t.id),
242
277
  className: "dc:p-1 dc:rounded dc:text-xs text-dc-error dc:hover:opacity-80 bg-dc-surface border-dc-border dc:border",
243
278
  title: "Remove",
244
279
  children: "✕"
245
280
  }
246
281
  )
247
282
  ] }),
248
- e.title && /* @__PURE__ */ a("h4", { className: "dc:text-sm dc:font-semibold text-dc-text dc:mb-2 dc:px-1", children: e.title }),
249
- /* @__PURE__ */ a("div", { className: "dc:rounded-lg dc:p-4 bg-dc-surface border-dc-border dc:border", children: /* @__PURE__ */ a(ee, { options: ue, children: e.content }) })
283
+ t.title && /* @__PURE__ */ a("h4", { className: "dc:text-sm dc:font-semibold text-dc-text dc:mb-2 dc:px-1", children: t.title }),
284
+ /* @__PURE__ */ a("div", { className: "dc:rounded-lg dc:p-4 bg-dc-surface border-dc-border dc:border", children: /* @__PURE__ */ a(oe, { options: xe, children: t.content }) })
250
285
  ] });
251
- }), pe = B.memo(function() {
252
- const e = k(re), { removeBlock: s, moveBlock: c } = k(V(le)), o = C(null), r = C(e.length);
286
+ }), ve = L.memo(function() {
287
+ const t = D(le), { removeBlock: s, moveBlock: c, updateBlock: r } = D(K(pe)), o = N(null), [n, u] = F(null), d = N(t.length);
253
288
  Q(() => {
254
- e.length > r.current && o.current?.scrollIntoView({ behavior: "smooth" }), r.current = e.length;
255
- }, [e.length]);
256
- const n = f((l) => s(l), [s]), i = f((l) => c(l, "up"), [c]), m = f((l) => c(l, "down"), [c]);
257
- return e.length === 0 ? /* @__PURE__ */ a("div", { className: "dc:flex dc:items-center dc:justify-center dc:h-full", children: /* @__PURE__ */ g("div", { className: "dc:text-center dc:max-w-sm dc:px-6", children: [
258
- /* @__PURE__ */ a("div", { className: "dc:text-4xl dc:mb-4 dc:opacity-30", children: "📊" }),
289
+ t.length > d.current && o.current?.scrollIntoView({ behavior: "smooth" }), d.current = t.length;
290
+ }, [t.length]);
291
+ const g = p((i) => s(i), [s]), h = p((i) => c(i, "up"), [c]), x = p((i) => c(i, "down"), [c]), m = p((i) => u(i), []), b = p((i) => {
292
+ if (!n) return;
293
+ const w = G(i), { analysisConfig: k } = w;
294
+ if (k) {
295
+ const v = k.charts[k.analysisType];
296
+ r(n.id, {
297
+ title: i.title,
298
+ query: JSON.stringify(k.query),
299
+ chartType: v?.chartType || "bar",
300
+ chartConfig: v?.chartConfig,
301
+ displayConfig: v?.displayConfig
302
+ });
303
+ }
304
+ u(null);
305
+ }, [n, r]);
306
+ return t.length === 0 ? /* @__PURE__ */ a("div", { className: "dc:flex dc:items-center dc:justify-center dc:h-full", children: /* @__PURE__ */ y("div", { className: "dc:text-center dc:max-w-sm dc:px-6", children: [
259
307
  /* @__PURE__ */ a("h3", { className: "dc:text-base dc:font-semibold text-dc-text dc:mb-2", children: "Your notebook is empty" }),
260
308
  /* @__PURE__ */ a("p", { className: "dc:text-sm text-dc-text-secondary", children: "Ask the AI assistant a question about your data. Charts and insights will appear here as the assistant analyzes your data." })
261
- ] }) }) : /* @__PURE__ */ g("div", { className: "dc:h-full dc:overflow-y-auto dc:p-4", children: [
262
- e.map((l, h) => {
263
- const y = h === 0, u = h === e.length - 1;
264
- return l.type === "portlet" ? /* @__PURE__ */ a(
265
- ie,
309
+ ] }) }) : /* @__PURE__ */ y("div", { className: "dc:h-full dc:overflow-y-auto dc:p-4", children: [
310
+ t.map((i, w) => {
311
+ const k = w === 0, v = w === t.length - 1;
312
+ return i.type === "portlet" ? /* @__PURE__ */ a(
313
+ ye,
266
314
  {
267
- block: l,
268
- onRemove: n,
269
- onMoveUp: i,
270
- onMoveDown: m,
271
- isFirst: y,
272
- isLast: u
315
+ block: i,
316
+ onRemove: g,
317
+ onMoveUp: h,
318
+ onMoveDown: x,
319
+ onEdit: m,
320
+ isFirst: k,
321
+ isLast: v
273
322
  },
274
- l.id
275
- ) : l.type === "markdown" ? /* @__PURE__ */ a(
276
- me,
323
+ i.id
324
+ ) : i.type === "markdown" ? /* @__PURE__ */ a(
325
+ Ce,
277
326
  {
278
- block: l,
279
- onRemove: n,
280
- onMoveUp: i,
281
- onMoveDown: m,
282
- isFirst: y,
283
- isLast: u
327
+ block: i,
328
+ onRemove: g,
329
+ onMoveUp: h,
330
+ onMoveDown: x,
331
+ isFirst: k,
332
+ isLast: v
284
333
  },
285
- l.id
334
+ i.id
286
335
  ) : null;
287
336
  }),
288
- /* @__PURE__ */ a("div", { ref: o })
337
+ /* @__PURE__ */ a("div", { ref: o }),
338
+ /* @__PURE__ */ a(
339
+ X,
340
+ {
341
+ isOpen: !!n,
342
+ onClose: () => u(null),
343
+ onSave: b,
344
+ portlet: n ? {
345
+ id: n.id,
346
+ title: n.title,
347
+ query: n.query,
348
+ chartType: n.chartType,
349
+ chartConfig: n.chartConfig,
350
+ displayConfig: n.displayConfig,
351
+ w: 5,
352
+ h: 4,
353
+ x: 0,
354
+ y: 0
355
+ } : null,
356
+ title: "Edit Visualization",
357
+ submitText: "Update"
358
+ }
359
+ )
289
360
  ] });
290
361
  });
291
- function he(t) {
362
+ function ke(e) {
292
363
  const {
293
- agentEndpoint: e,
364
+ agentEndpoint: t,
294
365
  agentApiKey: s,
295
366
  onAddPortlet: c,
296
- onAddMarkdown: o,
297
- onTextDelta: r,
367
+ onAddMarkdown: r,
368
+ onTextDelta: o,
298
369
  onToolStart: n,
299
- onToolResult: i,
300
- onTurnComplete: m,
301
- onDone: l,
370
+ onToolResult: u,
371
+ onTurnComplete: d,
372
+ onDone: g,
302
373
  onError: h
303
- } = t, { cubeApi: y } = te(), u = C(null), [b, v] = _(!1), A = f(async (S, x) => {
304
- function N(p) {
305
- switch (p.type) {
374
+ } = e, { cubeApi: x } = re(), m = N(null), [b, i] = F(!1), w = p(async (v, C) => {
375
+ function S(f) {
376
+ switch (f.type) {
306
377
  case "text_delta":
307
- r(p.data);
378
+ o(f.data);
308
379
  break;
309
380
  case "tool_use_start":
310
- n(p.data.id, p.data.name, p.data.input);
381
+ n(f.data.id, f.data.name, f.data.input);
311
382
  break;
312
383
  case "tool_use_result":
313
- i(p.data.id, p.data.name, p.data.result);
384
+ u(f.data.id, f.data.name, f.data.result);
314
385
  break;
315
386
  case "add_portlet":
316
387
  c({
317
- ...p.data,
388
+ ...f.data,
318
389
  type: "portlet"
319
390
  });
320
391
  break;
321
392
  case "add_markdown":
322
- o({
323
- ...p.data,
393
+ r({
394
+ ...f.data,
324
395
  type: "markdown"
325
396
  });
326
397
  break;
327
398
  case "turn_complete":
328
- m?.();
399
+ d?.();
329
400
  break;
330
401
  case "done":
331
- l(p.data.sessionId);
402
+ g(f.data.sessionId);
332
403
  break;
333
404
  case "error":
334
- h(p.data.message);
405
+ h(f.data.message);
335
406
  break;
336
407
  }
337
408
  }
338
- u.current && u.current.abort();
339
- const D = new AbortController();
340
- u.current = D, v(!0);
409
+ m.current && m.current.abort();
410
+ const A = new AbortController();
411
+ m.current = A, i(!0);
341
412
  try {
342
- const p = y.apiUrl || "/cubejs-api/v1", w = e || `${p}/agent/chat`, T = {
413
+ const f = x.apiUrl || "/cubejs-api/v1", M = t || `${f}/agent/chat`, I = {
343
414
  "Content-Type": "application/json",
344
- ...y.headers
415
+ ...x.headers
345
416
  };
346
- s && (T["X-Agent-Api-Key"] = s);
347
- const I = await fetch(w, {
417
+ s && (I["X-Agent-Api-Key"] = s);
418
+ const E = await fetch(M, {
348
419
  method: "POST",
349
- headers: T,
350
- credentials: y.credentials ?? "include",
420
+ headers: I,
421
+ credentials: x.credentials ?? "include",
351
422
  body: JSON.stringify({
352
- message: S,
353
- ...x ? { sessionId: x } : {}
423
+ message: v,
424
+ ...C ? { sessionId: C } : {}
354
425
  }),
355
- signal: D.signal
426
+ signal: A.signal
356
427
  });
357
- if (!I.ok) {
358
- const d = await I.json().catch(() => ({}));
359
- throw new Error(d.error || `Agent request failed: ${I.status}`);
428
+ if (!E.ok) {
429
+ const l = await E.json().catch(() => ({}));
430
+ throw new Error(l.error || `Agent request failed: ${E.status}`);
360
431
  }
361
- if (!I.body)
432
+ if (!E.body)
362
433
  throw new Error("No response body received");
363
- const F = I.body.getReader(), P = new TextDecoder();
364
- let E = "";
434
+ const _ = E.body.getReader(), j = new TextDecoder();
435
+ let B = "";
365
436
  for (; ; ) {
366
- const { done: d, value: R } = await F.read();
367
- if (d) break;
368
- E += P.decode(R, { stream: !0 });
369
- const M = E.split(`
437
+ const { done: l, value: R } = await _.read();
438
+ if (l) break;
439
+ B += j.decode(R, { stream: !0 });
440
+ const T = B.split(`
370
441
 
371
442
  `);
372
- E = M.pop() || "";
373
- for (const U of M) {
374
- const z = U.trim().split(`
443
+ B = T.pop() || "";
444
+ for (const $ of T) {
445
+ const z = $.trim().split(`
375
446
  `);
376
- for (const K of z)
377
- if (K.startsWith("data: "))
447
+ for (const U of z)
448
+ if (U.startsWith("data: "))
378
449
  try {
379
- const O = JSON.parse(K.slice(6));
380
- N(O);
450
+ const W = JSON.parse(U.slice(6));
451
+ S(W);
381
452
  } catch {
382
453
  }
383
454
  }
384
455
  }
385
- if (E.trim()) {
386
- const d = E.trim().split(`
456
+ if (B.trim()) {
457
+ const l = B.trim().split(`
387
458
  `);
388
- for (const R of d)
459
+ for (const R of l)
389
460
  if (R.startsWith("data: "))
390
461
  try {
391
- const M = JSON.parse(R.slice(6));
392
- N(M);
462
+ const T = JSON.parse(R.slice(6));
463
+ S(T);
393
464
  } catch {
394
465
  }
395
466
  }
396
- } catch (p) {
397
- p.name !== "AbortError" && h(p instanceof Error ? p.message : "Stream failed");
467
+ } catch (f) {
468
+ f.name !== "AbortError" && h(f instanceof Error ? f.message : "Stream failed");
398
469
  } finally {
399
- v(!1), u.current = null;
470
+ i(!1), m.current = null;
400
471
  }
401
- }, [y, e, s, c, o, r, n, i, m, l, h]), L = f(() => {
402
- u.current && (u.current.abort(), u.current = null, v(!1));
472
+ }, [x, t, s, c, r, o, n, u, d, g, h]), k = p(() => {
473
+ m.current && (m.current.abort(), m.current = null, i(!1));
403
474
  }, []);
404
475
  return {
405
- sendMessage: A,
476
+ sendMessage: w,
406
477
  isStreaming: b,
407
- abort: L
478
+ abort: k
408
479
  };
409
480
  }
410
- function fe(t) {
411
- const e = [];
412
- let s = t, c = 0;
481
+ function Ne(e) {
482
+ const t = [];
483
+ let s = e, c = 0;
413
484
  for (; s; ) {
414
- const o = s.match(/^(.*?)`([^`]+)`(.*)$/);
415
- if (o) {
416
- const [, n, i, m] = o;
417
- n && e.push(/* @__PURE__ */ a("span", { children: n }, c++)), e.push(
418
- /* @__PURE__ */ a("code", { className: "dc:px-1 dc:py-0.5 dc:rounded dc:text-xs bg-dc-surface dc:font-mono", children: i }, c++)
419
- ), s = m;
485
+ const r = s.match(/^(.*?)`([^`]+)`(.*)$/);
486
+ if (r) {
487
+ const [, n, u, d] = r;
488
+ n && t.push(/* @__PURE__ */ a("span", { children: n }, c++)), t.push(
489
+ /* @__PURE__ */ a("code", { className: "dc:px-1 dc:py-0.5 dc:rounded dc:text-xs bg-dc-surface dc:font-mono", children: u }, c++)
490
+ ), s = d;
420
491
  continue;
421
492
  }
422
- const r = s.match(/^(.*?)\*\*([^*]+)\*\*(.*)$/);
423
- if (r) {
424
- const [, n, i, m] = r;
425
- n && e.push(/* @__PURE__ */ a("span", { children: n }, c++)), e.push(/* @__PURE__ */ a("strong", { className: "dc:font-semibold", children: i }, c++)), s = m;
493
+ const o = s.match(/^(.*?)\*\*([^*]+)\*\*(.*)$/);
494
+ if (o) {
495
+ const [, n, u, d] = o;
496
+ n && t.push(/* @__PURE__ */ a("span", { children: n }, c++)), t.push(/* @__PURE__ */ a("strong", { className: "dc:font-semibold", children: u }, c++)), s = d;
426
497
  continue;
427
498
  }
428
- e.push(/* @__PURE__ */ a("span", { children: s }, c));
499
+ t.push(/* @__PURE__ */ a("span", { children: s }, c));
429
500
  break;
430
501
  }
431
- return e;
502
+ return t;
432
503
  }
433
- const be = {
504
+ const we = {
434
505
  discover_cubes: "Discovering cubes",
435
506
  get_cube_metadata: "Reading metadata",
436
507
  execute_query: "Executing query",
437
508
  add_portlet: "Adding visualization",
438
509
  add_markdown: "Adding explanation"
439
510
  };
440
- function ge({ toolCall: t }) {
441
- const [e, s] = _(!1), c = be[t.name] || t.name, o = t.status === "running";
442
- return /* @__PURE__ */ g("div", { className: "dc:my-1 dc:text-xs", children: [
443
- /* @__PURE__ */ g(
511
+ function Se({ toolCall: e }) {
512
+ const [t, s] = F(!1), c = we[e.name] || e.name, r = e.status === "running";
513
+ return /* @__PURE__ */ y("div", { className: "dc:my-1 dc:text-xs", children: [
514
+ /* @__PURE__ */ y(
444
515
  "button",
445
516
  {
446
- onClick: () => s(!e),
517
+ onClick: () => s(!t),
447
518
  className: "dc:flex dc:items-center dc:gap-1.5 text-dc-text-secondary dc:hover:opacity-80 dc:transition-opacity",
448
519
  children: [
449
- o ? /* @__PURE__ */ a("span", { className: "dc:inline-block dc:w-3 dc:h-3 dc:border-2 border-dc-accent dc:border-t-transparent dc:rounded-full dc:animate-spin" }) : /* @__PURE__ */ a("span", { className: "dc:text-xs", children: t.status === "error" ? "✗" : "✓" }),
450
- /* @__PURE__ */ g("span", { children: [
520
+ r ? /* @__PURE__ */ a("span", { className: "dc:inline-block dc:w-3 dc:h-3 dc:border-2 border-dc-accent dc:border-t-transparent dc:rounded-full dc:animate-spin" }) : /* @__PURE__ */ a("span", { className: "dc:text-xs", children: e.status === "error" ? "✗" : "✓" }),
521
+ /* @__PURE__ */ y("span", { children: [
451
522
  c,
452
- o ? "..." : ""
523
+ r ? "..." : ""
453
524
  ] }),
454
- !o && /* @__PURE__ */ a("span", { className: "dc:text-[10px] dc:opacity-60", children: e ? "▲" : "▼" })
525
+ !r && /* @__PURE__ */ a("span", { className: "dc:text-[10px] dc:opacity-60", children: t ? "▲" : "▼" })
455
526
  ]
456
527
  }
457
528
  ),
458
- e && t.result != null && /* @__PURE__ */ a("pre", { className: "dc:mt-1 dc:p-2 dc:rounded dc:text-[11px] dc:overflow-x-auto dc:max-h-32 dc:overflow-y-auto bg-dc-surface-secondary text-dc-text-secondary", children: typeof t.result == "string" ? t.result : JSON.stringify(t.result, null, 2) })
529
+ t && e.result != null && /* @__PURE__ */ a("pre", { className: "dc:mt-1 dc:p-2 dc:rounded dc:text-[11px] dc:overflow-x-auto dc:max-h-32 dc:overflow-y-auto bg-dc-surface-secondary text-dc-text-secondary", children: typeof e.result == "string" ? e.result : JSON.stringify(e.result, null, 2) })
459
530
  ] });
460
531
  }
461
- const xe = B.memo(function({ message: e }) {
462
- const s = e.role === "user", c = !!e.content?.trim(), o = e.toolCalls && e.toolCalls.length > 0;
463
- return !s && !c && !o ? null : /* @__PURE__ */ a("div", { className: `dc:flex dc:mb-3 ${s ? "dc:justify-end" : "dc:justify-start"}`, children: /* @__PURE__ */ g(
532
+ const De = L.memo(function({ message: t }) {
533
+ const s = t.role === "user", c = !!t.content?.trim(), r = t.toolCalls && t.toolCalls.length > 0;
534
+ return !s && !c && !r ? null : /* @__PURE__ */ a("div", { className: `dc:flex dc:mb-3 ${s ? "dc:justify-end" : "dc:justify-start"}`, children: /* @__PURE__ */ y(
464
535
  "div",
465
536
  {
466
537
  className: `dc:max-w-[85%] dc:rounded-lg dc:px-3 dc:py-2 dc:text-sm ${s ? "bg-dc-accent text-dc-accent-text dc:rounded-br-sm" : "bg-dc-surface-secondary text-dc-text dc:rounded-bl-sm"}`,
467
538
  children: [
468
- c && /* @__PURE__ */ a("div", { className: "dc:whitespace-pre-wrap dc:break-words", children: s ? e.content : fe(e.content) }),
469
- o && /* @__PURE__ */ a("div", { className: c ? "dc:mt-1 dc:border-t dc:border-current dc:border-opacity-10 dc:pt-1" : "", children: e.toolCalls.map((r, n) => /* @__PURE__ */ a(ge, { toolCall: r }, r.id || n)) })
539
+ c && /* @__PURE__ */ a("div", { className: "dc:whitespace-pre-wrap dc:break-words", children: s ? t.content : Ne(t.content) }),
540
+ r && /* @__PURE__ */ a("div", { className: c ? "dc:mt-1 dc:border-t dc:border-current dc:border-opacity-10 dc:pt-1" : "", children: t.toolCalls.map((o, n) => /* @__PURE__ */ a(Se, { toolCall: o }, o.id || n)) })
470
541
  ]
471
542
  }
472
543
  ) });
473
- }), ye = B.memo(function({
474
- value: e,
544
+ }), Me = L.memo(function({
545
+ value: t,
475
546
  onChange: s,
476
547
  onSend: c,
477
- onStop: o,
478
- onContinue: r,
548
+ onStop: r,
549
+ onContinue: o,
479
550
  isStreaming: n = !1,
480
- showContinue: i = !1,
481
- disabled: m = !1,
482
- placeholder: l = "Ask about your data..."
551
+ showContinue: u = !1,
552
+ disabled: d = !1,
553
+ placeholder: g = "Ask about your data..."
483
554
  }) {
484
- const h = C(null);
555
+ const h = N(null);
485
556
  Q(() => {
486
- const u = h.current;
487
- u && (u.style.height = "auto", u.style.height = `${Math.min(u.scrollHeight, 150)}px`);
488
- }, [e]);
489
- const y = f(
490
- (u) => {
491
- u.key === "Enter" && !u.shiftKey && (u.preventDefault(), !m && e.trim() && c());
557
+ const m = h.current;
558
+ m && (m.style.height = "auto", m.style.height = `${Math.min(m.scrollHeight, 150)}px`);
559
+ }, [t]);
560
+ const x = p(
561
+ (m) => {
562
+ m.key === "Enter" && !m.shiftKey && (m.preventDefault(), !d && t.trim() && c());
492
563
  },
493
- [m, e, c]
564
+ [d, t, c]
494
565
  );
495
- return /* @__PURE__ */ g("div", { className: "dc:flex dc:gap-2 dc:items-end dc:p-3 border-dc-border dc:border-t", children: [
566
+ return /* @__PURE__ */ y("div", { className: "dc:flex dc:gap-2 dc:items-end dc:p-3 border-dc-border dc:border-t", children: [
496
567
  /* @__PURE__ */ a(
497
568
  "textarea",
498
569
  {
499
570
  ref: h,
500
- value: e,
501
- onChange: (u) => s(u.target.value),
502
- onKeyDown: y,
503
- placeholder: l,
504
- disabled: m,
571
+ value: t,
572
+ onChange: (m) => s(m.target.value),
573
+ onKeyDown: x,
574
+ placeholder: g,
575
+ disabled: d,
505
576
  rows: 1,
506
577
  className: "dc:flex-1 dc:resize-none dc:rounded-lg dc:px-3 dc:py-2 dc:text-sm bg-dc-surface-secondary text-dc-text border-dc-border dc:border dc:outline-none dc:focus:ring-1 focus:ring-dc-accent dc:disabled:opacity-50"
507
578
  }
@@ -509,16 +580,16 @@ const xe = B.memo(function({ message: e }) {
509
580
  n ? /* @__PURE__ */ a(
510
581
  "button",
511
582
  {
512
- onClick: o,
583
+ onClick: r,
513
584
  className: "dc:px-4 dc:py-2 dc:rounded-lg dc:text-sm dc:font-medium dc:transition-colors text-dc-error border-dc-border dc:border dc:hover:opacity-80 dc:shrink-0",
514
585
  children: "Stop"
515
586
  }
516
- ) : /* @__PURE__ */ g(W, { children: [
517
- i && !e.trim() && /* @__PURE__ */ a(
587
+ ) : /* @__PURE__ */ y(Y, { children: [
588
+ u && !t.trim() && /* @__PURE__ */ a(
518
589
  "button",
519
590
  {
520
591
  onClick: () => {
521
- r?.(), h.current?.focus();
592
+ o?.(), h.current?.focus();
522
593
  },
523
594
  className: "dc:px-4 dc:py-2 dc:rounded-lg dc:text-sm dc:font-medium dc:transition-colors border-dc-border dc:border text-dc-text-secondary dc:hover:opacity-80 dc:shrink-0",
524
595
  children: "Continue"
@@ -528,201 +599,201 @@ const xe = B.memo(function({ message: e }) {
528
599
  "button",
529
600
  {
530
601
  onClick: c,
531
- disabled: m || !e.trim(),
602
+ disabled: d || !t.trim(),
532
603
  className: "dc:px-4 dc:py-2 dc:rounded-lg dc:text-sm dc:font-medium dc:transition-colors bg-dc-accent text-dc-accent-text dc:hover:opacity-90 dc:disabled:opacity-40 dc:disabled:cursor-not-allowed dc:shrink-0",
533
604
  children: "Send"
534
605
  }
535
606
  )
536
607
  ] })
537
608
  ] });
538
- }), ve = B.memo(function({
539
- agentEndpoint: e,
609
+ }), Ae = L.memo(function({
610
+ agentEndpoint: t,
540
611
  agentApiKey: s,
541
612
  onClear: c
542
613
  }) {
543
- const o = C(null), r = C(!1), { messages: n, isStreaming: i, inputValue: m } = k(V(ne)), {
544
- addMessage: l,
614
+ const r = N(null), o = N(!1), { messages: n, isStreaming: u, inputValue: d } = D(K(ue)), {
615
+ addMessage: g,
545
616
  appendToLastAssistantMessage: h,
546
- addToolCallToLastAssistant: y,
547
- updateLastToolCall: u,
617
+ addToolCallToLastAssistant: x,
618
+ updateLastToolCall: m,
548
619
  setIsStreaming: b,
549
- setInputValue: v,
550
- setSessionId: A
551
- } = k(V(de)), L = k((d) => d.sessionId), S = k((d) => d.addBlock), x = k((d) => d.reset), N = f(() => {
552
- r.current && (r.current = !1, l({
620
+ setInputValue: i,
621
+ setSessionId: w
622
+ } = D(K(me)), k = D((l) => l.sessionId), v = D((l) => l.addBlock), C = D((l) => l.reset), S = p(() => {
623
+ o.current && (o.current = !1, g({
553
624
  id: `msg-${Date.now()}`,
554
625
  role: "assistant",
555
626
  content: "",
556
627
  toolCalls: [],
557
628
  timestamp: Date.now()
558
629
  }));
559
- }, [l]), D = C(n.length);
630
+ }, [g]), A = N(n.length);
560
631
  Q(() => {
561
- n.length > D.current && o.current?.scrollIntoView({ behavior: "smooth" }), D.current = n.length;
632
+ n.length > A.current && r.current?.scrollIntoView({ behavior: "smooth" }), A.current = n.length;
562
633
  }, [n]);
563
- const { sendMessage: p, abort: w } = he({
564
- agentEndpoint: e,
634
+ const { sendMessage: f, abort: M } = ke({
635
+ agentEndpoint: t,
565
636
  agentApiKey: s,
566
- onTextDelta: f((d) => {
567
- N(), h(d);
568
- }, [N, h]),
569
- onToolStart: f((d, R, M) => {
570
- N(), y({ id: d, name: R, input: M, status: "running" });
571
- }, [N, y]),
572
- onToolResult: f((d, R, M) => {
573
- u({ id: d, status: "complete", result: M });
574
- }, [u]),
575
- onAddPortlet: f((d) => {
576
- S(d);
577
- }, [S]),
578
- onAddMarkdown: f((d) => {
579
- S(d);
580
- }, [S]),
581
- onTurnComplete: f(() => {
582
- r.current = !0;
637
+ onTextDelta: p((l) => {
638
+ S(), h(l);
639
+ }, [S, h]),
640
+ onToolStart: p((l, R, T) => {
641
+ S(), x({ id: l, name: R, input: T, status: "running" });
642
+ }, [S, x]),
643
+ onToolResult: p((l, R, T) => {
644
+ m({ id: l, status: "complete", result: T });
645
+ }, [m]),
646
+ onAddPortlet: p((l) => {
647
+ v(l);
648
+ }, [v]),
649
+ onAddMarkdown: p((l) => {
650
+ v(l);
651
+ }, [v]),
652
+ onTurnComplete: p(() => {
653
+ o.current = !0;
583
654
  }, []),
584
- onDone: f((d) => {
585
- r.current = !1, A(d), b(!1);
586
- }, [A, b]),
587
- onError: f((d) => {
588
- N(), h(`
655
+ onDone: p((l) => {
656
+ o.current = !1, w(l), b(!1);
657
+ }, [w, b]),
658
+ onError: p((l) => {
659
+ S(), h(`
589
660
 
590
- Error: ${d}`), b(!1);
591
- }, [N, h, b])
592
- }), T = f((d) => {
593
- !d || i || (r.current = !1, l({
661
+ Error: ${l}`), b(!1);
662
+ }, [S, h, b])
663
+ }), I = p((l) => {
664
+ !l || u || (o.current = !1, g({
594
665
  id: `msg-${Date.now()}`,
595
666
  role: "user",
596
- content: d,
667
+ content: l,
597
668
  timestamp: Date.now()
598
- }), l({
669
+ }), g({
599
670
  id: `msg-${Date.now() + 1}`,
600
671
  role: "assistant",
601
672
  content: "",
602
673
  toolCalls: [],
603
674
  timestamp: Date.now()
604
- }), v(""), b(!0), p(d, L));
605
- }, [i, l, v, b, p, L]), I = f(() => {
606
- T(m.trim());
607
- }, [m, T]), F = f(() => {
608
- w(), b(!1);
609
- }, [w, b]), P = f(() => {
610
- v("");
611
- }, [v]), E = f(() => {
612
- w(), b(!1), x(), c?.();
613
- }, [w, b, x, c]);
614
- return /* @__PURE__ */ g("div", { className: "dc:flex dc:flex-col dc:h-full bg-dc-surface", children: [
615
- /* @__PURE__ */ g("div", { className: "dc:flex dc:items-center dc:justify-between dc:px-4 dc:py-3 border-dc-border dc:border-b", children: [
675
+ }), i(""), b(!0), f(l, k));
676
+ }, [u, g, i, b, f, k]), E = p(() => {
677
+ I(d.trim());
678
+ }, [d, I]), _ = p(() => {
679
+ M(), b(!1);
680
+ }, [M, b]), j = p(() => {
681
+ i("");
682
+ }, [i]), B = p(() => {
683
+ M(), b(!1), C(), c?.();
684
+ }, [M, b, C, c]);
685
+ return /* @__PURE__ */ y("div", { className: "dc:flex dc:flex-col dc:h-full bg-dc-surface", children: [
686
+ /* @__PURE__ */ y("div", { className: "dc:flex dc:items-center dc:justify-between dc:px-4 dc:py-3 border-dc-border dc:border-b", children: [
616
687
  /* @__PURE__ */ a("h3", { className: "dc:text-sm dc:font-semibold text-dc-text", children: "AI Assistant" }),
617
688
  n.length > 0 && /* @__PURE__ */ a(
618
689
  "button",
619
690
  {
620
- onClick: E,
621
- disabled: i,
691
+ onClick: B,
692
+ disabled: u,
622
693
  className: "dc:text-xs dc:px-2 dc:py-1 dc:rounded text-dc-text-secondary dc:hover:opacity-80 dc:disabled:opacity-40",
623
694
  title: "Clear notebook and chat",
624
695
  children: "Clear"
625
696
  }
626
697
  )
627
698
  ] }),
628
- /* @__PURE__ */ g("div", { className: "dc:flex-1 dc:overflow-y-auto dc:px-4 dc:py-3", children: [
629
- n.length === 0 ? /* @__PURE__ */ a(Ce, {}) : n.map((d) => /* @__PURE__ */ a(xe, { message: d }, d.id)),
630
- /* @__PURE__ */ a("div", { ref: o })
699
+ /* @__PURE__ */ y("div", { className: "dc:flex-1 dc:overflow-y-auto dc:px-4 dc:py-3", children: [
700
+ n.length === 0 ? /* @__PURE__ */ a(Te, {}) : n.map((l) => /* @__PURE__ */ a(De, { message: l }, l.id)),
701
+ /* @__PURE__ */ a("div", { ref: r })
631
702
  ] }),
632
703
  /* @__PURE__ */ a(
633
- ye,
704
+ Me,
634
705
  {
635
- value: m,
636
- onChange: v,
637
- onSend: I,
638
- onStop: F,
639
- onContinue: P,
640
- isStreaming: i,
641
- showContinue: !i && n.length > 0
706
+ value: d,
707
+ onChange: i,
708
+ onSend: E,
709
+ onStop: _,
710
+ onContinue: j,
711
+ isStreaming: u,
712
+ showContinue: !u && n.length > 0
642
713
  }
643
714
  )
644
715
  ] });
645
716
  });
646
- function Ce() {
647
- return /* @__PURE__ */ a("div", { className: "dc:flex dc:items-center dc:justify-center dc:h-full", children: /* @__PURE__ */ g("div", { className: "dc:text-center dc:max-w-xs", children: [
717
+ function Te() {
718
+ return /* @__PURE__ */ a("div", { className: "dc:flex dc:items-center dc:justify-center dc:h-full", children: /* @__PURE__ */ y("div", { className: "dc:text-center dc:max-w-xs", children: [
648
719
  /* @__PURE__ */ a("div", { className: "dc:text-lg dc:font-semibold text-dc-text dc:mb-2", children: "Data Analysis Assistant" }),
649
720
  /* @__PURE__ */ a("p", { className: "dc:text-sm text-dc-text-secondary dc:mb-4", children: "Ask me about your data and I'll create visualizations and insights." }),
650
- /* @__PURE__ */ g("div", { className: "dc:space-y-2 dc:text-xs text-dc-text-muted", children: [
721
+ /* @__PURE__ */ y("div", { className: "dc:space-y-2 dc:text-xs text-dc-text-muted", children: [
651
722
  /* @__PURE__ */ a("p", { children: '"Show me employee productivity trends"' }),
652
723
  /* @__PURE__ */ a("p", { children: '"What are the top departments by headcount?"' }),
653
724
  /* @__PURE__ */ a("p", { children: '"Compare revenue across product categories"' })
654
725
  ] })
655
726
  ] }) });
656
727
  }
657
- function Ne({
658
- agentEndpoint: t,
659
- agentApiKey: e,
728
+ function Ie({
729
+ agentEndpoint: e,
730
+ agentApiKey: t,
660
731
  onSave: s,
661
732
  onDirtyStateChange: c,
662
- className: o
733
+ className: r
663
734
  }) {
664
- const [r, n] = _(60), i = C(null), m = C(!1), l = k((x) => x.blocks.length), h = k((x) => x.messages.length), y = k((x) => x.save), u = C({ blockCount: l, msgCount: h });
735
+ const [o, n] = F(60), u = N(null), d = N(!1), g = D((C) => C.blocks.length), h = D((C) => C.messages.length), x = D((C) => C.save), m = N({ blockCount: g, msgCount: h });
665
736
  Q(() => {
666
- const x = l !== u.current.blockCount || h !== u.current.msgCount;
667
- c?.(x);
668
- }, [l, h, c]);
669
- const b = C(), v = C(s);
670
- v.current = s;
671
- const A = C(l > 0 || h > 0);
737
+ const C = g !== m.current.blockCount || h !== m.current.msgCount;
738
+ c?.(C);
739
+ }, [g, h, c]);
740
+ const b = N(), i = N(s);
741
+ i.current = s;
742
+ const w = N(g > 0 || h > 0);
672
743
  Q(() => {
673
- if ((l > 0 || h > 0) && (A.current = !0), !(!v.current || !A.current))
744
+ if ((g > 0 || h > 0) && (w.current = !0), !(!i.current || !w.current))
674
745
  return b.current && clearTimeout(b.current), b.current = setTimeout(() => {
675
- const x = y();
676
- v.current?.(x);
746
+ const C = x();
747
+ i.current?.(C);
677
748
  }, 1e3), () => {
678
749
  b.current && clearTimeout(b.current);
679
750
  };
680
- }, [l, h, y]);
681
- const L = f(() => {
682
- v.current && (b.current && clearTimeout(b.current), v.current({ blocks: [], messages: [] }));
683
- }, []), S = f((x) => {
684
- x.preventDefault(), m.current = !0;
685
- const N = (p) => {
686
- if (!m.current || !i.current) return;
687
- const w = i.current.getBoundingClientRect(), T = (p.clientX - w.left) / w.width * 100;
688
- n(Math.min(Math.max(T, 30), 80));
689
- }, D = () => {
690
- m.current = !1, document.removeEventListener("mousemove", N), document.removeEventListener("mouseup", D);
751
+ }, [g, h, x]);
752
+ const k = p(() => {
753
+ i.current && (b.current && clearTimeout(b.current), i.current({ blocks: [], messages: [] }));
754
+ }, []), v = p((C) => {
755
+ C.preventDefault(), d.current = !0;
756
+ const S = (f) => {
757
+ if (!d.current || !u.current) return;
758
+ const M = u.current.getBoundingClientRect(), I = (f.clientX - M.left) / M.width * 100;
759
+ n(Math.min(Math.max(I, 30), 80));
760
+ }, A = () => {
761
+ d.current = !1, document.removeEventListener("mousemove", S), document.removeEventListener("mouseup", A);
691
762
  };
692
- document.addEventListener("mousemove", N), document.addEventListener("mouseup", D);
763
+ document.addEventListener("mousemove", S), document.addEventListener("mouseup", A);
693
764
  }, []);
694
- return /* @__PURE__ */ g(
765
+ return /* @__PURE__ */ y(
695
766
  "div",
696
767
  {
697
- ref: i,
698
- className: `dc:flex dc:h-full dc:w-full dc:overflow-hidden bg-dc-surface-secondary ${o || ""}`,
768
+ ref: u,
769
+ className: `dc:flex dc:h-full dc:w-full dc:overflow-hidden bg-dc-surface-secondary ${r || ""}`,
699
770
  children: [
700
771
  /* @__PURE__ */ a(
701
772
  "div",
702
773
  {
703
774
  className: "dc:h-full dc:overflow-hidden",
704
- style: { width: `${r}%` },
705
- children: /* @__PURE__ */ a(pe, {})
775
+ style: { width: `${o}%` },
776
+ children: /* @__PURE__ */ a(ve, {})
706
777
  }
707
778
  ),
708
779
  /* @__PURE__ */ a(
709
780
  "div",
710
781
  {
711
782
  className: "dc:w-1 dc:h-full dc:cursor-col-resize dc:flex-shrink-0 dc:transition-colors bg-dc-border dc:hover:bg-dc-accent",
712
- onMouseDown: S
783
+ onMouseDown: v
713
784
  }
714
785
  ),
715
786
  /* @__PURE__ */ a(
716
787
  "div",
717
788
  {
718
789
  className: "dc:h-full dc:overflow-hidden",
719
- style: { width: `${100 - r}%` },
790
+ style: { width: `${100 - o}%` },
720
791
  children: /* @__PURE__ */ a(
721
- ve,
792
+ Ae,
722
793
  {
723
- agentEndpoint: t,
724
- agentApiKey: e,
725
- onClear: L
794
+ agentEndpoint: e,
795
+ agentApiKey: t,
796
+ onClear: k
726
797
  }
727
798
  )
728
799
  }
@@ -731,26 +802,26 @@ function Ne({
731
802
  }
732
803
  );
733
804
  }
734
- const Qe = B.memo(function({
735
- config: e,
805
+ const Oe = L.memo(function({
806
+ config: t,
736
807
  ...s
737
808
  }) {
738
- return /* @__PURE__ */ a(oe, { initialConfig: e, children: /* @__PURE__ */ a(Ne, { ...s }) });
809
+ return /* @__PURE__ */ a(ie, { initialConfig: t, children: /* @__PURE__ */ a(Ie, { ...s }) });
739
810
  });
740
- function Fe() {
811
+ function qe() {
741
812
  return /* @__PURE__ */ a("div", { children: "Analytics Page - Coming in Phase 4" });
742
813
  }
743
- const ke = se("segment");
744
- function Pe({
745
- className: t = ""
814
+ const Ee = P("segment");
815
+ function $e({
816
+ className: e = ""
746
817
  }) {
747
818
  return /* @__PURE__ */ a(
748
819
  "div",
749
820
  {
750
- className: `dc:flex dc:items-center dc:justify-center bg-dc-bg-secondary ${t}`,
751
- children: /* @__PURE__ */ g("div", { className: "dc:text-center", children: [
821
+ className: `dc:flex dc:items-center dc:justify-center bg-dc-bg-secondary ${e}`,
822
+ children: /* @__PURE__ */ y("div", { className: "dc:text-center", children: [
752
823
  /* @__PURE__ */ a(
753
- ke,
824
+ Ee,
754
825
  {
755
826
  className: "dc:w-8 dc:h-8 dc:mx-auto dc:mb-2 text-dc-text-muted dc:opacity-50"
756
827
  }
@@ -761,178 +832,178 @@ function Pe({
761
832
  );
762
833
  }
763
834
  export {
764
- Qe as AgenticNotebook,
765
- Ke as AnalysisBuilder,
766
- je as AnalyticsDashboard,
767
- Fe as AnalyticsPage,
768
- q as AnalyticsPortlet,
769
- $e as ChartErrorBoundary,
770
- Ue as ConfirmModal,
771
- Ft as CubeClient,
772
- Pt as CubeProvider,
773
- rs as DEFAULT_ICONS,
774
- ze as DashboardEditModal,
775
- Oe as DashboardGrid,
776
- qe as DashboardStoreProvider,
777
- Pe as DashboardThumbnailPlaceholder,
778
- We as DrillBreadcrumb,
779
- Je as DrillMenu,
780
- gs as ExecutionPlanPanel,
781
- xs as ExplainAIPanel,
782
- Yt as LazyChart,
783
- Ht as LoadingIndicator,
784
- He as Modal,
785
- oe as NotebookStoreProvider,
786
- Ge as PortletAnalysisModal,
787
- Xe as PortletContainer,
788
- Vt as ScrollContainerProvider,
789
- Sa as THEME_PRESETS,
790
- Da as applyTheme,
791
- ga as buildFunnelConfigFromQueries,
792
- xa as buildServerFunnelQuery,
793
- _t as captureThumbnail,
794
- ys as compressAndEncode,
795
- Kt as createCubeClient,
796
- Xs as createDashboardLayout,
797
- Ye as createDashboardStore,
798
- Ze as createDefaultConfig,
799
- et as createDefaultFlowConfig,
800
- tt as createDefaultFunnelConfig,
801
- st as createDefaultQueryConfig,
802
- at as createDefaultRetentionConfig,
803
- ct as createDefaultWorkspace,
804
- Qa as createExplainQueryKey,
805
- ea as createFlowQueryKey,
806
- ta as createFunnelQueryKey,
807
- ce as createNotebookStore,
808
- vs as decodeAndDecompress,
809
- Cs as detectAsymmetricDateRanges,
810
- Ns as detectMeasureCollisions,
811
- Ys as formatChartData,
812
- ya as formatDuration,
813
- sa as generateQueryLabel,
814
- ks as generateShareUrl,
815
- ws as getAvailableBindingKeyDimensions,
816
- Zt as getAvailableChartTypes,
817
- va as getBindingKeyField,
818
- Ss as getBindingKeyLabel,
819
- ns as getChartTypeIcon,
820
- aa as getCombinedFields,
821
- Ca as getCubeNameFromQuery,
822
- ds as getFieldTypeIcon,
823
- se as getIcon,
824
- ls as getIconData,
825
- is as getIconRegistry,
826
- us as getIconsByCategory,
827
- ms as getMeasureTypeIcon,
828
- ca as getQueryIndices,
829
- oa as getQueryLabels,
830
- Ma as getTheme,
831
- Aa as getThemeVariable,
832
- es as getUnavailableChartTypes,
833
- Ds as getValidationSummary,
834
- Oa as highlightCodeBlocks,
835
- ts as isChartTypeAvailable,
836
- Ta as isDarkMode,
837
- ot as isFlowConfig,
838
- rt as isFunnelConfig,
839
- Na as isFunnelData,
840
- Ms as isMinimumFunnelConfigValid,
841
- nt as isMultiQuery,
842
- dt as isMultiQueryConfig,
843
- ra as isMultiQueryData,
844
- As as isMultiQueryValid,
845
- lt as isQueryConfig,
846
- it as isRetentionConfig,
847
- $a as isSankeyData,
848
- Ua as isServerFlowQuery,
849
- ut as isServerFunnelQuery,
850
- Ts as isShareableSize,
851
- mt as isSingleQuery,
852
- jt as isThumbnailCaptureAvailable,
853
- pt as isValidAnalysisConfig,
854
- ht as isValidAnalysisWorkspace,
855
- ss as isValidChartType,
856
- na as mergeQueryResults,
857
- da as mergeResultsByKey,
858
- la as mergeResultsConcat,
859
- ft as migrateConfig,
860
- bt as migrateLegacyPortlet,
861
- Is as parseShareUrl,
862
- as as preloadChart,
863
- cs as preloadCharts,
864
- ps as registerIcons,
865
- hs as resetIcons,
866
- Ia as resetTheme,
867
- gt as selectAllActions,
868
- le as selectBlockActions,
869
- re as selectBlocks,
870
- Es as selectBreakdowns,
871
- Rs as selectChartConfig,
872
- de as selectChatActions,
873
- ne as selectChatState,
874
- Bs as selectCurrentState,
875
- xt as selectDebugData,
876
- yt as selectDebugDataActions,
877
- vt as selectEditModeActions,
878
- Ct as selectEditModeState,
879
- Ls as selectFilters,
880
- Qs as selectFunnelState,
881
- Le as selectInputValue,
882
- Re as selectIsStreaming,
883
- Nt as selectLayoutActions,
884
- kt as selectLayoutState,
885
- Ee as selectMessages,
886
- Fs as selectMetrics,
887
- wt as selectModalActions,
888
- St as selectModalState,
889
- Ps as selectMultiQueryState,
890
- Dt as selectPortletDebugData,
891
- Be as selectSessionId,
892
- Mt as selectThumbnailDirty,
893
- Vs as selectUIState,
894
- fs as setIcon,
895
- Ea as setTheme,
896
- Ra as setThemeVariable,
897
- ka as transformServerFunnelResult,
898
- he as useAgentChat,
899
- _s as useAnalysisBuilder,
900
- Ks as useAnalysisBuilderStore,
901
- te as useCubeApi,
902
- $t as useCubeContext,
903
- Ut as useCubeFeatures,
904
- Gt as useCubeFieldLabel,
905
- ia as useCubeLoadQuery,
906
- zt as useCubeMeta,
907
- Ot as useCubeMetaQuery,
908
- ua as useCubeQuery,
909
- At as useDashboard,
910
- Tt as useDashboardStore,
911
- It as useDashboardStoreApi,
912
- Et as useDashboardStoreOptional,
913
- Rt as useDrillInteraction,
914
- Fa as useDryRunQueries,
915
- Pa as useDryRunQuery,
916
- Bt as useElementVisibility,
917
- Va as useExplainAI,
918
- _a as useExplainQuery,
919
- ma as useFlowQuery,
920
- pa as useFunnelQuery,
921
- ha as useMultiCubeLoadQuery,
922
- Ka as useMultiDryRunQueries,
923
- k as useNotebookStore,
924
- qt as useScrollContainer,
925
- Lt as useScrollDetection,
926
- Hs as useTheme,
927
- js as validateBindingKeyExists,
928
- $s as validateBindingKeyForSteps,
929
- Us as validateFunnelConfig,
930
- fa as validateMergeKey,
931
- zs as validateMergeKeys,
932
- Os as validateMultiQueryConfig,
933
- qs as validateStepQueries,
934
- Ws as validateTimeDimensionAlignment,
935
- Wt as warnIfScreenshotLibMissing,
936
- Ba as watchThemeChanges
835
+ Oe as AgenticNotebook,
836
+ Je as AnalysisBuilder,
837
+ He as AnalyticsDashboard,
838
+ qe as AnalyticsPage,
839
+ H as AnalyticsPortlet,
840
+ Ge as ChartErrorBoundary,
841
+ Xe as ConfirmModal,
842
+ es as CubeClient,
843
+ ts as CubeProvider,
844
+ Ot as DEFAULT_ICONS,
845
+ Ye as DashboardEditModal,
846
+ Ze as DashboardGrid,
847
+ et as DashboardStoreProvider,
848
+ $e as DashboardThumbnailPlaceholder,
849
+ tt as DrillBreadcrumb,
850
+ st as DrillMenu,
851
+ ws as ExecutionPlanPanel,
852
+ Ss as ExplainAIPanel,
853
+ gs as LazyChart,
854
+ ps as LoadingIndicator,
855
+ at as Modal,
856
+ ie as NotebookStoreProvider,
857
+ X as PortletAnalysisModal,
858
+ ct as PortletContainer,
859
+ ss as ScrollContainerProvider,
860
+ Ba as THEME_PRESETS,
861
+ Ra as applyTheme,
862
+ wa as buildFunnelConfigFromQueries,
863
+ Sa as buildServerFunnelQuery,
864
+ as as captureThumbnail,
865
+ Ds as compressAndEncode,
866
+ cs as createCubeClient,
867
+ ca as createDashboardLayout,
868
+ ot as createDashboardStore,
869
+ rt as createDefaultConfig,
870
+ nt as createDefaultFlowConfig,
871
+ dt as createDefaultFunnelConfig,
872
+ it as createDefaultQueryConfig,
873
+ lt as createDefaultRetentionConfig,
874
+ ut as createDefaultWorkspace,
875
+ Ua as createExplainQueryKey,
876
+ na as createFlowQueryKey,
877
+ da as createFunnelQueryKey,
878
+ de as createNotebookStore,
879
+ Ms as decodeAndDecompress,
880
+ As as detectAsymmetricDateRanges,
881
+ Ts as detectMeasureCollisions,
882
+ oa as formatChartData,
883
+ Da as formatDuration,
884
+ ia as generateQueryLabel,
885
+ Is as generateShareUrl,
886
+ Es as getAvailableBindingKeyDimensions,
887
+ bs as getAvailableChartTypes,
888
+ Ma as getBindingKeyField,
889
+ Bs as getBindingKeyLabel,
890
+ qt as getChartTypeIcon,
891
+ la as getCombinedFields,
892
+ Aa as getCubeNameFromQuery,
893
+ $t as getFieldTypeIcon,
894
+ P as getIcon,
895
+ zt as getIconData,
896
+ Wt as getIconRegistry,
897
+ Jt as getIconsByCategory,
898
+ Ht as getMeasureTypeIcon,
899
+ ua as getQueryIndices,
900
+ ma as getQueryLabels,
901
+ La as getTheme,
902
+ Qa as getThemeVariable,
903
+ ys as getUnavailableChartTypes,
904
+ Rs as getValidationSummary,
905
+ Ya as highlightCodeBlocks,
906
+ xs as isChartTypeAvailable,
907
+ Fa as isDarkMode,
908
+ mt as isFlowConfig,
909
+ pt as isFunnelConfig,
910
+ Ta as isFunnelData,
911
+ Ls as isMinimumFunnelConfigValid,
912
+ ht as isMultiQuery,
913
+ ft as isMultiQueryConfig,
914
+ pa as isMultiQueryData,
915
+ Qs as isMultiQueryValid,
916
+ gt as isQueryConfig,
917
+ bt as isRetentionConfig,
918
+ Ha as isSankeyData,
919
+ Ga as isServerFlowQuery,
920
+ yt as isServerFunnelQuery,
921
+ Fs as isShareableSize,
922
+ xt as isSingleQuery,
923
+ os as isThumbnailCaptureAvailable,
924
+ Ct as isValidAnalysisConfig,
925
+ vt as isValidAnalysisWorkspace,
926
+ Cs as isValidChartType,
927
+ ha as mergeQueryResults,
928
+ fa as mergeResultsByKey,
929
+ ga as mergeResultsConcat,
930
+ kt as migrateConfig,
931
+ Nt as migrateLegacyPortlet,
932
+ Ps as parseShareUrl,
933
+ vs as preloadChart,
934
+ ks as preloadCharts,
935
+ Gt as registerIcons,
936
+ Xt as resetIcons,
937
+ Pa as resetTheme,
938
+ wt as selectAllActions,
939
+ pe as selectBlockActions,
940
+ le as selectBlocks,
941
+ Vs as selectBreakdowns,
942
+ _s as selectChartConfig,
943
+ me as selectChatActions,
944
+ ue as selectChatState,
945
+ js as selectCurrentState,
946
+ St as selectDebugData,
947
+ Dt as selectDebugDataActions,
948
+ Mt as selectEditModeActions,
949
+ At as selectEditModeState,
950
+ Ks as selectFilters,
951
+ Us as selectFunnelState,
952
+ Ue as selectInputValue,
953
+ je as selectIsStreaming,
954
+ Tt as selectLayoutActions,
955
+ It as selectLayoutState,
956
+ _e as selectMessages,
957
+ Os as selectMetrics,
958
+ Et as selectModalActions,
959
+ Bt as selectModalState,
960
+ qs as selectMultiQueryState,
961
+ Rt as selectPortletDebugData,
962
+ Ke as selectSessionId,
963
+ Lt as selectThumbnailDirty,
964
+ $s as selectUIState,
965
+ Yt as setIcon,
966
+ Va as setTheme,
967
+ _a as setThemeVariable,
968
+ Ia as transformServerFunnelResult,
969
+ ke as useAgentChat,
970
+ zs as useAnalysisBuilder,
971
+ Ws as useAnalysisBuilderStore,
972
+ re as useCubeApi,
973
+ rs as useCubeContext,
974
+ ns as useCubeFeatures,
975
+ hs as useCubeFieldLabel,
976
+ ba as useCubeLoadQuery,
977
+ ds as useCubeMeta,
978
+ is as useCubeMetaQuery,
979
+ ya as useCubeQuery,
980
+ Qt as useDashboard,
981
+ Ft as useDashboardStore,
982
+ Pt as useDashboardStoreApi,
983
+ Vt as useDashboardStoreOptional,
984
+ _t as useDrillInteraction,
985
+ Oa as useDryRunQueries,
986
+ qa as useDryRunQuery,
987
+ jt as useElementVisibility,
988
+ $a as useExplainAI,
989
+ za as useExplainQuery,
990
+ xa as useFlowQuery,
991
+ Ca as useFunnelQuery,
992
+ va as useMultiCubeLoadQuery,
993
+ Wa as useMultiDryRunQueries,
994
+ D as useNotebookStore,
995
+ ls as useScrollContainer,
996
+ Kt as useScrollDetection,
997
+ sa as useTheme,
998
+ Js as validateBindingKeyExists,
999
+ Hs as validateBindingKeyForSteps,
1000
+ Gs as validateFunnelConfig,
1001
+ ka as validateMergeKey,
1002
+ Xs as validateMergeKeys,
1003
+ Ys as validateMultiQueryConfig,
1004
+ Zs as validateStepQueries,
1005
+ ea as validateTimeDimensionAlignment,
1006
+ us as warnIfScreenshotLibMissing,
1007
+ ja as watchThemeChanges
937
1008
  };
938
1009
  //# sourceMappingURL=index.js.map