react-semaphor 0.0.213 → 0.0.214

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,12 +1,12 @@
1
- import { P as L, b as w, j as e, Q as ys, R as vs, U as k, V as Xs, W as Ns, X as Cs, Y as Ss, Z as ks, _ as $, $ as re, a0 as Zs, J as ea, O as Le, a1 as Ra, a2 as _a, a3 as Ha, a4 as Ba, a5 as $a, a6 as Pa, a7 as Rs, a8 as _e, a9 as Pe, aa as es, T as ws, e as sa, g as zs, ab as Fe, ac as Oe, f as Y, ad as Me, ae as Te, af as He, ag as Ae, ah as W, ai as Fs, G as i, aj as Ke, ak as Ue, al as Ka, am as Ge, w as aa, v as ta, t as me, an as Ua, r as Ga, N as na, s as Ja, ao as Qa, B as Wa, ap as ra, aq as Ya, L as Be, S as Os, z as Xa, n as _s, ar as ps, A as fs, u as ts, as as ge, at as ye, au as la, av as ia, aw as oa, ax as ca, ay as da, az as Za, aA as et, aB as ha, aC as st, aD as at, aE as tt, aF as nt, aG as rt, aH as gs, aI as lt, aJ as Re, aK as js, aL as ze, aM as bs, aN as Hs, aO as it, aP as ot, aQ as ct, aR as dt, aS as ht, aT as ms, aU as mt, aV as Bs, aW as ut, aX as $s, aY as xt, aZ as pt, a_ as ft, a$ as ma, l as gt, C as jt, E as Ps, d as bt, h as yt, i as vt, o as Nt, b0 as Ct, m as St, H as kt, b1 as wt, b2 as zt, b3 as Ft, b4 as us, b5 as Ot, b6 as xs, b7 as Ks, K as Mt, b8 as Tt, b9 as Ms, ba as Lt, bb as Ts, bc as Ee, bd as ua, be as At, bf as Et, bg as Dt, bh as It, bi as Vt, bj as qt, bk as ve, bl as R, bm as _, bn as Ls, bo as H, bp as Us, bq as Rt, br as _t, bs as Ht, bt as Bt, bu as Gs, bv as $t, bw as Pt, bx as Kt, by as Ut, bz as Gt, bA as Jt } from "./index-icDf4hJ3.js";
2
- import ue, { useState as T, useEffect as G, useMemo as Qt, useRef as $e } from "react";
1
+ import { P as T, b as w, j as e, Q as vs, R as Ns, U as k, V as Xs, W as Cs, X as Ss, Y as ks, Z as ws, _ as R, $ as le, a0 as Zs, J as ea, O as Te, a1 as Ra, a2 as _a, a3 as Ha, a4 as Ba, a5 as $a, a6 as Pa, a7 as Rs, a8 as He, a9 as Ue, aa as ss, T as zs, e as sa, g as Fs, ab as Fe, ac as Oe, f as Z, ad as Me, ae as Le, af as Be, ag as Ae, ah as X, ai as Os, G as i, aj as Ge, ak as Je, al as Ka, am as Qe, w as aa, v as ta, t as ue, an as Ua, r as Ga, N as na, s as Ja, ao as Qa, B as Wa, ap as ra, aq as Ya, L as $e, S as Ms, z as Xa, n as _s, ar as fs, A as gs, u as ns, as as je, at as ve, au as Pe, av as la, aw as ia, ax as oa, ay as ca, az as da, aA as Za, aB as et, aC as ha, aD as st, aE as at, aF as tt, aG as nt, aH as rt, aI as js, aJ as lt, aK as _e, aL as bs, aM as ze, aN as ys, aO as Hs, aP as it, aQ as ot, aR as ct, aS as dt, aT as ht, aU as us, aV as mt, aW as Bs, aX as ut, aY as $s, aZ as xt, a_ as pt, a$ as ft, b0 as ma, l as gt, C as jt, E as Ps, d as bt, h as yt, i as vt, o as Nt, b1 as Ct, m as St, H as kt, b2 as wt, b3 as zt, b4 as Ft, b5 as xs, b6 as Ot, b7 as ps, b8 as Ks, K as Mt, b9 as Lt, ba as Tt, bb as Ls, bc as Ee, bd as ua, be as At, bf as Et, bg as Dt, bh as It, bi as Vt, bj as qt, bk as Ne, bl as _, bm as H, bn as Ts, bo as B, bp as Us, bq as Rt, br as _t, bs as Ht, bt as Bt, bu as Gs, bv as $t, bw as Pt, bx as Kt, by as Ut, bz as Gt, bA as Jt } from "./index--jPf_GGf.js";
2
+ import xe, { useState as L, useEffect as G, useMemo as Qt, useRef as Ke } from "react";
3
3
  /**
4
4
  * @license lucide-react v0.379.0 - ISC
5
5
  *
6
6
  * This source code is licensed under the ISC license.
7
7
  * See the LICENSE file in the root directory of this source tree.
8
8
  */
9
- const Wt = L("Activity", [
9
+ const Wt = T("Activity", [
10
10
  [
11
11
  "path",
12
12
  {
@@ -21,7 +21,7 @@ const Wt = L("Activity", [
21
21
  * This source code is licensed under the ISC license.
22
22
  * See the LICENSE file in the root directory of this source tree.
23
23
  */
24
- const Yt = L("AreaChart", [
24
+ const Yt = T("AreaChart", [
25
25
  ["path", { d: "M3 3v18h18", key: "1s2lah" }],
26
26
  ["path", { d: "M7 12v5h12V8l-5 5-4-4Z", key: "zxz28u" }]
27
27
  ]);
@@ -31,7 +31,7 @@ const Yt = L("AreaChart", [
31
31
  * This source code is licensed under the ISC license.
32
32
  * See the LICENSE file in the root directory of this source tree.
33
33
  */
34
- const As = L("BarChart4", [
34
+ const As = T("BarChart4", [
35
35
  ["path", { d: "M3 3v18h18", key: "1s2lah" }],
36
36
  ["path", { d: "M13 17V9", key: "1fwyjl" }],
37
37
  ["path", { d: "M18 17V5", key: "sfb6ij" }],
@@ -43,7 +43,7 @@ const As = L("BarChart4", [
43
43
  * This source code is licensed under the ISC license.
44
44
  * See the LICENSE file in the root directory of this source tree.
45
45
  */
46
- const Xt = L("Box", [
46
+ const Xt = T("Box", [
47
47
  [
48
48
  "path",
49
49
  {
@@ -60,7 +60,7 @@ const Xt = L("Box", [
60
60
  * This source code is licensed under the ISC license.
61
61
  * See the LICENSE file in the root directory of this source tree.
62
62
  */
63
- const Zt = L("CircleX", [
63
+ const Zt = T("CircleX", [
64
64
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
65
65
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
66
66
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
@@ -71,7 +71,7 @@ const Zt = L("CircleX", [
71
71
  * This source code is licensed under the ISC license.
72
72
  * See the LICENSE file in the root directory of this source tree.
73
73
  */
74
- const en = L("Database", [
74
+ const en = T("Database", [
75
75
  ["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
76
76
  ["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
77
77
  ["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
@@ -82,7 +82,7 @@ const en = L("Database", [
82
82
  * This source code is licensed under the ISC license.
83
83
  * See the LICENSE file in the root directory of this source tree.
84
84
  */
85
- const sn = L("Eraser", [
85
+ const sn = T("Eraser", [
86
86
  [
87
87
  "path",
88
88
  {
@@ -99,7 +99,7 @@ const sn = L("Eraser", [
99
99
  * This source code is licensed under the ISC license.
100
100
  * See the LICENSE file in the root directory of this source tree.
101
101
  */
102
- const xa = L("Filter", [
102
+ const xa = T("Filter", [
103
103
  ["polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3", key: "1yg77f" }]
104
104
  ]);
105
105
  /**
@@ -108,7 +108,7 @@ const xa = L("Filter", [
108
108
  * This source code is licensed under the ISC license.
109
109
  * See the LICENSE file in the root directory of this source tree.
110
110
  */
111
- const pa = L("GanttChart", [
111
+ const pa = T("GanttChart", [
112
112
  ["path", { d: "M8 6h10", key: "9lnwnk" }],
113
113
  ["path", { d: "M6 12h9", key: "1g9pqf" }],
114
114
  ["path", { d: "M11 18h7", key: "c8dzvl" }]
@@ -119,7 +119,7 @@ const pa = L("GanttChart", [
119
119
  * This source code is licensed under the ISC license.
120
120
  * See the LICENSE file in the root directory of this source tree.
121
121
  */
122
- const an = L("Glasses", [
122
+ const an = T("Glasses", [
123
123
  ["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
124
124
  ["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
125
125
  ["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
@@ -132,7 +132,7 @@ const an = L("Glasses", [
132
132
  * This source code is licensed under the ISC license.
133
133
  * See the LICENSE file in the root directory of this source tree.
134
134
  */
135
- const tn = L("Hammer", [
135
+ const tn = T("Hammer", [
136
136
  ["path", { d: "m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9", key: "eefl8a" }],
137
137
  ["path", { d: "m18 15 4-4", key: "16gjal" }],
138
138
  [
@@ -149,7 +149,7 @@ const tn = L("Hammer", [
149
149
  * This source code is licensed under the ISC license.
150
150
  * See the LICENSE file in the root directory of this source tree.
151
151
  */
152
- const nn = L("Hash", [
152
+ const nn = T("Hash", [
153
153
  ["line", { x1: "4", x2: "20", y1: "9", y2: "9", key: "4lhtct" }],
154
154
  ["line", { x1: "4", x2: "20", y1: "15", y2: "15", key: "vyu0kd" }],
155
155
  ["line", { x1: "10", x2: "8", y1: "3", y2: "21", key: "1ggp8o" }],
@@ -161,7 +161,7 @@ const nn = L("Hash", [
161
161
  * This source code is licensed under the ISC license.
162
162
  * See the LICENSE file in the root directory of this source tree.
163
163
  */
164
- const rn = L("Key", [
164
+ const rn = T("Key", [
165
165
  ["path", { d: "m15.5 7.5 2.3 2.3a1 1 0 0 0 1.4 0l2.1-2.1a1 1 0 0 0 0-1.4L19 4", key: "g0fldk" }],
166
166
  ["path", { d: "m21 2-9.6 9.6", key: "1j0ho8" }],
167
167
  ["circle", { cx: "7.5", cy: "15.5", r: "5.5", key: "yqb3hr" }]
@@ -172,7 +172,7 @@ const rn = L("Key", [
172
172
  * This source code is licensed under the ISC license.
173
173
  * See the LICENSE file in the root directory of this source tree.
174
174
  */
175
- const Es = L("LineChart", [
175
+ const Es = T("LineChart", [
176
176
  ["path", { d: "M3 3v18h18", key: "1s2lah" }],
177
177
  ["path", { d: "m19 9-5 5-4-4-3 3", key: "2osh9i" }]
178
178
  ]);
@@ -182,7 +182,7 @@ const Es = L("LineChart", [
182
182
  * This source code is licensed under the ISC license.
183
183
  * See the LICENSE file in the root directory of this source tree.
184
184
  */
185
- const ln = L("ListEnd", [
185
+ const ln = T("ListEnd", [
186
186
  ["path", { d: "M16 12H3", key: "1a2rj7" }],
187
187
  ["path", { d: "M16 6H3", key: "1wxfjs" }],
188
188
  ["path", { d: "M10 18H3", key: "13769t" }],
@@ -195,7 +195,7 @@ const ln = L("ListEnd", [
195
195
  * This source code is licensed under the ISC license.
196
196
  * See the LICENSE file in the root directory of this source tree.
197
197
  */
198
- const on = L("ListStart", [
198
+ const on = T("ListStart", [
199
199
  ["path", { d: "M16 12H3", key: "1a2rj7" }],
200
200
  ["path", { d: "M16 18H3", key: "12xzn7" }],
201
201
  ["path", { d: "M10 6H3", key: "lf8lx7" }],
@@ -208,7 +208,7 @@ const on = L("ListStart", [
208
208
  * This source code is licensed under the ISC license.
209
209
  * See the LICENSE file in the root directory of this source tree.
210
210
  */
211
- const cn = L("ListX", [
211
+ const cn = T("ListX", [
212
212
  ["path", { d: "M11 12H3", key: "51ecnj" }],
213
213
  ["path", { d: "M16 6H3", key: "1wxfjs" }],
214
214
  ["path", { d: "M16 18H3", key: "12xzn7" }],
@@ -221,7 +221,7 @@ const cn = L("ListX", [
221
221
  * This source code is licensed under the ISC license.
222
222
  * See the LICENSE file in the root directory of this source tree.
223
223
  */
224
- const dn = L("MessageSquareMore", [
224
+ const dn = T("MessageSquareMore", [
225
225
  ["path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z", key: "1lielz" }],
226
226
  ["path", { d: "M8 10h.01", key: "19clt8" }],
227
227
  ["path", { d: "M12 10h.01", key: "1nrarc" }],
@@ -233,7 +233,7 @@ const dn = L("MessageSquareMore", [
233
233
  * This source code is licensed under the ISC license.
234
234
  * See the LICENSE file in the root directory of this source tree.
235
235
  */
236
- const hn = L("Network", [
236
+ const hn = T("Network", [
237
237
  ["rect", { x: "16", y: "16", width: "6", height: "6", rx: "1", key: "4q2zg0" }],
238
238
  ["rect", { x: "2", y: "16", width: "6", height: "6", rx: "1", key: "8cvhb9" }],
239
239
  ["rect", { x: "9", y: "2", width: "6", height: "6", rx: "1", key: "1egb70" }],
@@ -246,7 +246,7 @@ const hn = L("Network", [
246
246
  * This source code is licensed under the ISC license.
247
247
  * See the LICENSE file in the root directory of this source tree.
248
248
  */
249
- const fa = L("Pencil", [
249
+ const fa = T("Pencil", [
250
250
  ["path", { d: "M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z", key: "5qss01" }],
251
251
  ["path", { d: "m15 5 4 4", key: "1mk7zo" }]
252
252
  ]);
@@ -256,7 +256,7 @@ const fa = L("Pencil", [
256
256
  * This source code is licensed under the ISC license.
257
257
  * See the LICENSE file in the root directory of this source tree.
258
258
  */
259
- const ga = L("PieChart", [
259
+ const ga = T("PieChart", [
260
260
  ["path", { d: "M21.21 15.89A10 10 0 1 1 8 2.83", key: "k2fpak" }],
261
261
  ["path", { d: "M22 12A10 10 0 0 0 12 2v10z", key: "1rfc4y" }]
262
262
  ]);
@@ -266,7 +266,7 @@ const ga = L("PieChart", [
266
266
  * This source code is licensed under the ISC license.
267
267
  * See the LICENSE file in the root directory of this source tree.
268
268
  */
269
- const mn = L("Play", [
269
+ const mn = T("Play", [
270
270
  ["polygon", { points: "6 3 20 12 6 21 6 3", key: "1oa8hb" }]
271
271
  ]);
272
272
  /**
@@ -275,7 +275,7 @@ const mn = L("Play", [
275
275
  * This source code is licensed under the ISC license.
276
276
  * See the LICENSE file in the root directory of this source tree.
277
277
  */
278
- const un = L("Plug2", [
278
+ const un = T("Plug2", [
279
279
  ["path", { d: "M9 2v6", key: "17ngun" }],
280
280
  ["path", { d: "M15 2v6", key: "s7yy2p" }],
281
281
  ["path", { d: "M12 17v5", key: "bb1du9" }],
@@ -288,7 +288,7 @@ const un = L("Plug2", [
288
288
  * This source code is licensed under the ISC license.
289
289
  * See the LICENSE file in the root directory of this source tree.
290
290
  */
291
- const xn = L("Save", [
291
+ const xn = T("Save", [
292
292
  [
293
293
  "path",
294
294
  {
@@ -305,7 +305,7 @@ const xn = L("Save", [
305
305
  * This source code is licensed under the ISC license.
306
306
  * See the LICENSE file in the root directory of this source tree.
307
307
  */
308
- const ja = L("ScatterChart", [
308
+ const ja = T("ScatterChart", [
309
309
  ["circle", { cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor", key: "kqv944" }],
310
310
  ["circle", { cx: "18.5", cy: "5.5", r: ".5", fill: "currentColor", key: "lysivs" }],
311
311
  ["circle", { cx: "11.5", cy: "11.5", r: ".5", fill: "currentColor", key: "byv1b8" }],
@@ -319,7 +319,7 @@ const ja = L("ScatterChart", [
319
319
  * This source code is licensed under the ISC license.
320
320
  * See the LICENSE file in the root directory of this source tree.
321
321
  */
322
- const pn = L("ShieldQuestion", [
322
+ const pn = T("ShieldQuestion", [
323
323
  [
324
324
  "path",
325
325
  {
@@ -336,7 +336,7 @@ const pn = L("ShieldQuestion", [
336
336
  * This source code is licensed under the ISC license.
337
337
  * See the LICENSE file in the root directory of this source tree.
338
338
  */
339
- const fn = L("Sigma", [
339
+ const fn = T("Sigma", [
340
340
  ["path", { d: "M18 7V4H6l6 8-6 8h12v-3", key: "zis8ev" }]
341
341
  ]);
342
342
  /**
@@ -345,7 +345,7 @@ const fn = L("Sigma", [
345
345
  * This source code is licensed under the ISC license.
346
346
  * See the LICENSE file in the root directory of this source tree.
347
347
  */
348
- const gn = L("SwatchBook", [
348
+ const gn = T("SwatchBook", [
349
349
  ["path", { d: "M11 17a4 4 0 0 1-8 0V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2Z", key: "1ldrpk" }],
350
350
  ["path", { d: "M16.7 13H19a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H7", key: "11i5po" }],
351
351
  ["path", { d: "M 7 17h0.01", key: "10821z" }],
@@ -363,7 +363,7 @@ const gn = L("SwatchBook", [
363
363
  * This source code is licensed under the ISC license.
364
364
  * See the LICENSE file in the root directory of this source tree.
365
365
  */
366
- const jn = L("Tag", [
366
+ const jn = T("Tag", [
367
367
  [
368
368
  "path",
369
369
  {
@@ -379,7 +379,7 @@ const jn = L("Tag", [
379
379
  * This source code is licensed under the ISC license.
380
380
  * See the LICENSE file in the root directory of this source tree.
381
381
  */
382
- const bn = L("ToggleLeft", [
382
+ const bn = T("ToggleLeft", [
383
383
  ["rect", { width: "20", height: "12", x: "2", y: "6", rx: "6", ry: "6", key: "f2vt7d" }],
384
384
  ["circle", { cx: "8", cy: "12", r: "2", key: "1nvbw3" }]
385
385
  ]);
@@ -389,7 +389,7 @@ const bn = L("ToggleLeft", [
389
389
  * This source code is licensed under the ISC license.
390
390
  * See the LICENSE file in the root directory of this source tree.
391
391
  */
392
- const Ds = L("Type", [
392
+ const Ds = T("Type", [
393
393
  ["polyline", { points: "4 7 4 4 20 4 20 7", key: "1nosan" }],
394
394
  ["line", { x1: "9", x2: "15", y1: "20", y2: "20", key: "swin9y" }],
395
395
  ["line", { x1: "12", x2: "12", y1: "4", y2: "20", key: "1tx1rr" }]
@@ -400,14 +400,14 @@ const Ds = L("Type", [
400
400
  * This source code is licensed under the ISC license.
401
401
  * See the LICENSE file in the root directory of this source tree.
402
402
  */
403
- const yn = L("User", [
403
+ const yn = T("User", [
404
404
  ["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
405
405
  ["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
406
406
  ]);
407
407
  function vn() {
408
- const [s, n] = T(""), [a, t] = T(!1), [l, h] = T(!1), d = w((o) => o.dashboard);
408
+ const [s, n] = L(""), [a, t] = L(!1), [l, h] = L(!1), c = w((o) => o.dashboard);
409
409
  function r() {
410
- const o = ea(d), f = Le(d.id), m = JSON.parse(localStorage.getItem(f) || "[]");
410
+ const o = ea(c), f = Te(c.id), m = JSON.parse(localStorage.getItem(f) || "[]");
411
411
  if (m.some(
412
412
  (S) => S.name === s
413
413
  )) {
@@ -419,8 +419,8 @@ function vn() {
419
419
  template: o
420
420
  }), localStorage.setItem(f, JSON.stringify(m)), h(!1);
421
421
  }
422
- return /* @__PURE__ */ e.jsxs(ys, { open: l, onOpenChange: h, children: [
423
- /* @__PURE__ */ e.jsx(vs, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
422
+ return /* @__PURE__ */ e.jsxs(vs, { open: l, onOpenChange: h, children: [
423
+ /* @__PURE__ */ e.jsx(Ns, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
424
424
  k,
425
425
  {
426
426
  variant: "outline",
@@ -432,15 +432,15 @@ function vn() {
432
432
  ]
433
433
  }
434
434
  ) }),
435
- /* @__PURE__ */ e.jsxs(Ns, { className: "sm:max-w-[425px]", children: [
436
- /* @__PURE__ */ e.jsxs(Cs, { children: [
437
- /* @__PURE__ */ e.jsx(Ss, { children: "Add a Lens" }),
438
- /* @__PURE__ */ e.jsx(ks, { children: "Lenses are private by default and are only visible to you." })
435
+ /* @__PURE__ */ e.jsxs(Cs, { className: "sm:max-w-[425px]", children: [
436
+ /* @__PURE__ */ e.jsxs(Ss, { children: [
437
+ /* @__PURE__ */ e.jsx(ks, { children: "Add a Lens" }),
438
+ /* @__PURE__ */ e.jsx(ws, { children: "Lenses are private by default and are only visible to you." })
439
439
  ] }),
440
440
  /* @__PURE__ */ e.jsx("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-8 items-center gap-4", children: [
441
- /* @__PURE__ */ e.jsx($, { className: "text-right", children: "Name" }),
441
+ /* @__PURE__ */ e.jsx(R, { className: "text-right", children: "Name" }),
442
442
  /* @__PURE__ */ e.jsx(
443
- re,
443
+ le,
444
444
  {
445
445
  value: s,
446
446
  onChange: (o) => {
@@ -466,28 +466,28 @@ function vn() {
466
466
  ] });
467
467
  }
468
468
  function Nn() {
469
- const [s, n] = T(!1), [a, t] = T(""), l = w((c) => c.dashboard), h = w((c) => c.bookmarkKey), [d, r] = T([]), o = w((c) => c.actions.setDashboard), f = w(
470
- (c) => c.actions.setFilterValues
469
+ const [s, n] = L(!1), [a, t] = L(""), l = w((d) => d.dashboard), h = w((d) => d.bookmarkKey), [c, r] = L([]), o = w((d) => d.actions.setDashboard), f = w(
470
+ (d) => d.actions.setFilterValues
471
471
  ), m = w(
472
- (c) => c.actions.setBookmarkKey
472
+ (d) => d.actions.setBookmarkKey
473
473
  );
474
474
  G(() => {
475
- const c = Le(l.id), x = JSON.parse(localStorage.getItem(c) || "[]");
475
+ const d = Te(l.id), x = JSON.parse(localStorage.getItem(d) || "[]");
476
476
  r(x);
477
477
  const j = x.find(
478
478
  (z) => z.default
479
479
  );
480
480
  j && j.name === h && t(j.name);
481
481
  }, [s, l, h]);
482
- function u(c) {
483
- if (c === a)
482
+ function u(d) {
483
+ if (d === a)
484
484
  return;
485
- const x = d.find((z) => z.name === c), j = x == null ? void 0 : x.template;
486
- j && (o(j), f(x.filterValues || []), m(c === "Original" ? "" : c)), t(c);
485
+ const x = c.find((z) => z.name === d), j = x == null ? void 0 : x.template;
486
+ j && (o(j), f(x.filterValues || []), m(d === "Original" ? "" : d)), t(d);
487
487
  }
488
- function S(c) {
489
- const x = Le(l.id), z = JSON.parse(localStorage.getItem(x) || "[]").filter(
490
- (C) => C.name !== c
488
+ function S(d) {
489
+ const x = Te(l.id), z = JSON.parse(localStorage.getItem(x) || "[]").filter(
490
+ (C) => C.name !== d
491
491
  );
492
492
  localStorage.setItem(x, JSON.stringify(z)), r(z);
493
493
  }
@@ -503,19 +503,19 @@ function Nn() {
503
503
  onValueChange: u,
504
504
  children: [
505
505
  /* @__PURE__ */ e.jsx(Rs, { value: "Original", children: "Original" }),
506
- d.filter((c) => c.name != "Original").map((c, x) => /* @__PURE__ */ e.jsxs(
506
+ c.filter((d) => d.name != "Original").map((d, x) => /* @__PURE__ */ e.jsxs(
507
507
  Rs,
508
508
  {
509
509
  className: "xbg-red-100 flex justify-between",
510
- value: c.name,
511
- defaultChecked: c.name === h,
510
+ value: d.name,
511
+ defaultChecked: d.name === h,
512
512
  children: [
513
- /* @__PURE__ */ e.jsx("p", { children: c.name }),
513
+ /* @__PURE__ */ e.jsx("p", { children: d.name }),
514
514
  /* @__PURE__ */ e.jsx(
515
- _e,
515
+ He,
516
516
  {
517
517
  onClick: (j) => {
518
- j.preventDefault(), S(c.name);
518
+ j.preventDefault(), S(d.name);
519
519
  },
520
520
  className: "h-3 w-3 hover:cursor-pointer",
521
521
  strokeWidth: 1.5
@@ -532,13 +532,13 @@ function Nn() {
532
532
  ] });
533
533
  }
534
534
  function Cn() {
535
- const [s, n] = T(!1), a = w((h) => h.dashboard), t = w((h) => h.bookmarkKey);
535
+ const [s, n] = L(!1), a = w((h) => h.dashboard), t = w((h) => h.bookmarkKey);
536
536
  G(() => {
537
537
  if (!t) {
538
538
  n(!1);
539
539
  return;
540
540
  }
541
- const h = Le(a.id), r = JSON.parse(
541
+ const h = Te(a.id), r = JSON.parse(
542
542
  localStorage.getItem(h) || "[]"
543
543
  ).find(
544
544
  (o) => o.name === t
@@ -548,14 +548,14 @@ function Cn() {
548
548
  function l(h) {
549
549
  if (n(h), !t)
550
550
  return;
551
- const d = Le(a.id), o = JSON.parse(
552
- localStorage.getItem(d) || "[]"
551
+ const c = Te(a.id), o = JSON.parse(
552
+ localStorage.getItem(c) || "[]"
553
553
  ).map((f) => (f.name === t ? f.default = h : f.default = !1, f));
554
- console.log(o), localStorage.setItem(d, JSON.stringify(o));
554
+ console.log(o), localStorage.setItem(c, JSON.stringify(o));
555
555
  }
556
556
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
557
557
  /* @__PURE__ */ e.jsx(
558
- Pe,
558
+ Ue,
559
559
  {
560
560
  checked: s,
561
561
  onCheckedChange: l,
@@ -581,15 +581,15 @@ function Sn() {
581
581
  w(
582
582
  (C) => C.showDashboardJSON
583
583
  );
584
- const d = w((C) => C.onSaveFunction), r = w(
584
+ const c = w((C) => C.onSaveFunction), r = w(
585
585
  (C) => C.actions.setShowFilters
586
586
  ), { addFrame: o, setSelectedFrameId: f } = w(
587
587
  (C) => C.actions
588
- ), { getSelectedSheet: m, setIsDashboardEditing: u, setShowDashboardJSON: S } = w((C) => C.actions), c = m(), x = () => {
589
- if (!a || !c)
588
+ ), { getSelectedSheet: m, setIsDashboardEditing: u, setShowDashboardJSON: S } = w((C) => C.actions), d = m(), x = () => {
589
+ if (!a || !d)
590
590
  return;
591
591
  const C = {
592
- id: es(),
592
+ id: ss(),
593
593
  title: "Title",
594
594
  description: "Description",
595
595
  preferences: {
@@ -604,18 +604,18 @@ function Sn() {
604
604
  sql: "select COUNT(*) from YOUR_TABLE",
605
605
  data: []
606
606
  }, E = {
607
- id: es(),
607
+ id: ss(),
608
608
  cards: [C],
609
609
  activeCardId: C.id
610
610
  };
611
- o(c.id, E), f(E.id);
611
+ o(d.id, E), f(E.id);
612
612
  }, j = () => {
613
613
  u(!0);
614
614
  };
615
615
  function z() {
616
616
  if (!s || s === "")
617
617
  return;
618
- const C = ea(n), E = Le(n.id), v = JSON.parse(localStorage.getItem(E) || "[]"), D = v.findIndex(
618
+ const C = ea(n), E = Te(n.id), v = JSON.parse(localStorage.getItem(E) || "[]"), D = v.findIndex(
619
619
  (N) => N.name === s
620
620
  );
621
621
  D !== -1 ? v[D] = {
@@ -627,7 +627,7 @@ function Sn() {
627
627
  name: s,
628
628
  template: C,
629
629
  filterValues: t
630
- }), localStorage.setItem(E, JSON.stringify(v)), d == null || d(C);
630
+ }), localStorage.setItem(E, JSON.stringify(v)), c == null || c(C);
631
631
  }
632
632
  return l ? null : /* @__PURE__ */ e.jsxs(
633
633
  "div",
@@ -636,7 +636,7 @@ function Sn() {
636
636
  role: "dashboard-controls",
637
637
  children: [
638
638
  !l && /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-3", children: [
639
- /* @__PURE__ */ e.jsx($, { children: s }),
639
+ /* @__PURE__ */ e.jsx(R, { children: s }),
640
640
  !!s && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
641
641
  /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "|" }),
642
642
  /* @__PURE__ */ e.jsx(Cn, {})
@@ -679,7 +679,7 @@ function Sn() {
679
679
  u(!1), S(!1);
680
680
  },
681
681
  size: "sm",
682
- children: /* @__PURE__ */ e.jsx(_e, { className: "h-4 w-4", strokeWidth: 1.5 })
682
+ children: /* @__PURE__ */ e.jsx(He, { className: "h-4 w-4", strokeWidth: 1.5 })
683
683
  }
684
684
  ),
685
685
  a && !l && /* @__PURE__ */ e.jsx(
@@ -709,14 +709,14 @@ function Sn() {
709
709
  }
710
710
  );
711
711
  }
712
- function Xe({
712
+ function Re({
713
713
  title: s,
714
714
  items: n,
715
715
  value: a,
716
716
  isLoading: t,
717
717
  isError: l,
718
718
  connectionTooltip: h,
719
- onChange: d,
719
+ onChange: c,
720
720
  showNone: r = !1,
721
721
  className: o,
722
722
  showIcon: f = !0,
@@ -731,20 +731,20 @@ function Xe({
731
731
  if (s === "Schema")
732
732
  return /* @__PURE__ */ e.jsx(hn, { className: "size-4" });
733
733
  if (s === "Table")
734
- return /* @__PURE__ */ e.jsx(Fs, { className: "size-4" });
734
+ return /* @__PURE__ */ e.jsx(Os, { className: "size-4" });
735
735
  if (s === "Dataset")
736
736
  return /* @__PURE__ */ e.jsx(Xt, { className: "size-4" });
737
737
  }
738
738
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
739
- f && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: h ? /* @__PURE__ */ e.jsxs(ws, { children: [
739
+ f && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: h ? /* @__PURE__ */ e.jsxs(zs, { children: [
740
740
  /* @__PURE__ */ e.jsx(sa, { children: S() }),
741
- /* @__PURE__ */ e.jsx(zs, { className: "text-xs", align: "start", children: h })
741
+ /* @__PURE__ */ e.jsx(Fs, { className: "text-xs", align: "start", children: h })
742
742
  ] }) : S() }),
743
- /* @__PURE__ */ e.jsxs(Fe, { disabled: m, value: u, onValueChange: d, children: [
743
+ /* @__PURE__ */ e.jsxs(Fe, { disabled: m, value: u, onValueChange: c, children: [
744
744
  /* @__PURE__ */ e.jsx(
745
745
  Oe,
746
746
  {
747
- className: Y(
747
+ className: Z(
748
748
  "h-9 w-full focus:ring-1 focus:ring-offset-0",
749
749
  o
750
750
  ),
@@ -756,35 +756,35 @@ function Xe({
756
756
  )
757
757
  }
758
758
  ),
759
- /* @__PURE__ */ e.jsx(Te, { children: /* @__PURE__ */ e.jsxs(He, { children: [
759
+ /* @__PURE__ */ e.jsx(Le, { children: /* @__PURE__ */ e.jsxs(Be, { children: [
760
760
  t ? /* @__PURE__ */ e.jsx(Ae, { children: "Loading..." }) : /* @__PURE__ */ e.jsx(Ae, { children: s }),
761
761
  /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
762
- r && /* @__PURE__ */ e.jsx(W, { value: "none", children: "None" }, "none"),
763
- n && n.map((c, x) => /* @__PURE__ */ e.jsx(W, { value: c.id, children: c.name }, x))
762
+ r && /* @__PURE__ */ e.jsx(X, { value: "none", children: "None" }, "none"),
763
+ n && n.map((d, x) => /* @__PURE__ */ e.jsx(X, { value: d.id, children: d.name }, x))
764
764
  ] }),
765
- (t || l) && /* @__PURE__ */ e.jsx(W, { value: u, children: u })
765
+ (t || l) && /* @__PURE__ */ e.jsx(X, { value: u, children: u })
766
766
  ] }) })
767
767
  ] })
768
768
  ] });
769
769
  }
770
770
  function kn({ column: s }) {
771
- const [n, a] = T(!1), t = i((m) => m.selectedTableName), l = i(
771
+ const [n, a] = L(!1), t = i((m) => m.selectedTableName), l = i(
772
772
  (m) => m.selectedSchemaName
773
- ), h = i((m) => m.sqlGen), d = i((m) => m.actions.setSqlGen), r = i((m) => m.actions.setCardSql), o = i((m) => m.actions.setRunSql);
773
+ ), h = i((m) => m.sqlGen), c = i((m) => m.actions.setSqlGen), r = i((m) => m.actions.setCardSql), o = i((m) => m.actions.setRunSql);
774
774
  function f(m, u) {
775
775
  const S = aa(m, h, u);
776
- d(S);
777
- const c = ta(
776
+ c(S);
777
+ const d = ta(
778
778
  S,
779
- me(l || ""),
780
- me(t)
779
+ ue(l || ""),
780
+ ue(t)
781
781
  );
782
- c && (r(c), o(!0)), a(!1);
782
+ d && (r(d), o(!0)), a(!1);
783
783
  }
784
- return /* @__PURE__ */ e.jsxs(Ke, { open: n, onOpenChange: a, children: [
785
- /* @__PURE__ */ e.jsx(Ue, { asChild: !0, children: /* @__PURE__ */ e.jsx(Ka, { className: "h-4 w-4 cursor-pointer text-foreground/40" }) }),
784
+ return /* @__PURE__ */ e.jsxs(Ge, { open: n, onOpenChange: a, children: [
785
+ /* @__PURE__ */ e.jsx(Je, { asChild: !0, children: /* @__PURE__ */ e.jsx(Ka, { className: "h-4 w-4 cursor-pointer text-foreground/40" }) }),
786
786
  /* @__PURE__ */ e.jsx(
787
- Ge,
787
+ Qe,
788
788
  {
789
789
  align: "center",
790
790
  className: "w-18 rounded-md p-0 shadow-none",
@@ -835,7 +835,7 @@ function kn({ column: s }) {
835
835
  ] });
836
836
  }
837
837
  function ba({ column: s }) {
838
- return /* @__PURE__ */ e.jsxs(ws, { children: [
838
+ return /* @__PURE__ */ e.jsxs(zs, { children: [
839
839
  /* @__PURE__ */ e.jsx(Ua, { asChild: !0, children: Ga.includes(s.data_type.toLowerCase()) ? (
840
840
  // <span className=" font-thin">T</span>
841
841
  /* @__PURE__ */ e.jsx(Ds, { className: "size-3" })
@@ -843,7 +843,7 @@ function ba({ column: s }) {
843
843
  //
844
844
  /* @__PURE__ */ e.jsx(nn, { className: "size-3" })
845
845
  ) : Ja.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(Qa, { className: "size-3" }) : Wa.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(bn, { className: "size-3" }) : /* @__PURE__ */ e.jsx(pn, { className: "size-3" }) }),
846
- /* @__PURE__ */ e.jsx(zs, { children: /* @__PURE__ */ e.jsx("p", { className: "font-mono text-xs", children: s.data_type }) })
846
+ /* @__PURE__ */ e.jsx(Fs, { children: /* @__PURE__ */ e.jsx("p", { className: "font-mono text-xs", children: s.data_type }) })
847
847
  ] });
848
848
  }
849
849
  function wn({
@@ -854,19 +854,19 @@ function wn({
854
854
  }) {
855
855
  const l = i((N) => N.sqlGen), h = i(
856
856
  (N) => N.selectedConnectionId
857
- ), d = i(
857
+ ), c = i(
858
858
  (N) => N.selectedDatabaseName
859
859
  ), r = i(
860
860
  (N) => N.selectedSchemaName
861
861
  ), o = i((N) => N.selectedTableName), f = w(
862
862
  (N) => N.dashboard.aiScopeTables
863
- ), { setAIScopeTables: m } = w((N) => N.actions), u = i((N) => N.actions.setRunSql), S = i((N) => N.actions.setSqlGen), c = i(
863
+ ), { setAIScopeTables: m } = w((N) => N.actions), u = i((N) => N.actions.setRunSql), S = i((N) => N.actions.setSqlGen), d = i(
864
864
  (N) => N.actions.setIsShowingVisual
865
865
  ), x = i((N) => N.actions.setCardSql), { connectionType: j } = ya();
866
866
  function z(N) {
867
867
  const F = aa(N, l);
868
868
  S(F);
869
- const A = ta(F, me(s), me(n));
869
+ const A = ta(F, ue(s), ue(n));
870
870
  A && (x(A), u(!0));
871
871
  }
872
872
  function C() {
@@ -879,15 +879,15 @@ function wn({
879
879
  const F = {
880
880
  connectinonId: h,
881
881
  connectionType: j,
882
- databaseName: d,
882
+ databaseName: c,
883
883
  schemaName: r,
884
884
  tableName: o
885
- }, q = [...f || [], F].filter(
885
+ }, V = [...f || [], F].filter(
886
886
  (M, U, P) => P.findIndex(
887
887
  (I) => I.connectinonId === M.connectinonId && I.tableName === M.tableName
888
888
  ) === U
889
889
  );
890
- m(q), ps.success(`Added '${o}' to AI Scope`, {
890
+ m(V), fs.success(`Added '${o}' to AI Scope`, {
891
891
  position: "top-right",
892
892
  duration: 2500,
893
893
  richColors: !0
@@ -896,7 +896,7 @@ function wn({
896
896
  const F = (f || []).filter(
897
897
  (A) => A.connectinonId !== h && A.tableName !== o
898
898
  );
899
- m(F), ps(`Removed '${o}' from AI Scope`, {
899
+ m(F), fs(`Removed '${o}' from AI Scope`, {
900
900
  position: "top-right",
901
901
  duration: 2e3,
902
902
  richColors: !0
@@ -904,14 +904,14 @@ function wn({
904
904
  }
905
905
  }
906
906
  function v() {
907
- let F = fs(s, n);
908
- ((M) => M.charAt(0) === M.charAt(0).toUpperCase())(n) && (F = `"${n}"`), c(!1);
909
- const q = j === "MSSQL" ? `SELECT top 10 * FROM ${F}` : `SELECT * FROM ${F} LIMIT 10`;
910
- x(q), u(!0);
907
+ let F = gs(s, n);
908
+ ((M) => M.charAt(0) === M.charAt(0).toUpperCase())(n) && (F = `"${n}"`), d(!1);
909
+ const V = j === "MSSQL" ? `SELECT top 10 * FROM ${F}` : `SELECT * FROM ${F} LIMIT 10`;
910
+ x(V), u(!0);
911
911
  }
912
912
  function D() {
913
- let F = fs(s, n);
914
- ((q) => q.charAt(0) === q.charAt(0).toUpperCase())(n) && (F = `"${n}"`), c(!1), x(`SELECT COUNT(*) as count FROM ${F}`), u(!0);
913
+ let F = gs(s, n);
914
+ ((V) => V.charAt(0) === V.charAt(0).toUpperCase())(n) && (F = `"${n}"`), d(!1), x(`SELECT COUNT(*) as count FROM ${F}`), u(!0);
915
915
  }
916
916
  return /* @__PURE__ */ e.jsxs("div", { className: "flex grow flex-col space-y-4 px-4", children: [
917
917
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-center gap-1", children: [
@@ -926,7 +926,7 @@ function wn({
926
926
  children: /* @__PURE__ */ e.jsx(
927
927
  Ya,
928
928
  {
929
- className: Y("size-4", {
929
+ className: Z("size-4", {
930
930
  "text-primary": C(),
931
931
  "text-muted-foreground": !C()
932
932
  })
@@ -943,7 +943,7 @@ function wn({
943
943
  variant: "secondary",
944
944
  className: "flex",
945
945
  children: [
946
- t !== "Success" ? /* @__PURE__ */ e.jsx(Be, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(gn, { className: "mr-2 size-4" }),
946
+ t !== "Success" ? /* @__PURE__ */ e.jsx($e, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(gn, { className: "mr-2 size-4" }),
947
947
  "Top 10"
948
948
  ]
949
949
  }
@@ -957,14 +957,14 @@ function wn({
957
957
  variant: "secondary",
958
958
  className: "flex",
959
959
  children: [
960
- t !== "Success" ? /* @__PURE__ */ e.jsx(Be, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(fn, { className: "mr-2 size-4" }),
960
+ t !== "Success" ? /* @__PURE__ */ e.jsx($e, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(fn, { className: "mr-2 size-4" }),
961
961
  "Count"
962
962
  ]
963
963
  }
964
964
  )
965
965
  ] }),
966
966
  /* @__PURE__ */ e.jsxs(
967
- Os,
967
+ Ms,
968
968
  {
969
969
  className: "flex-1 basis-0 overflow-y-auto border-b border-t border-muted py-3",
970
970
  children: [
@@ -972,7 +972,7 @@ function wn({
972
972
  "div",
973
973
  {
974
974
  onClick: () => z(N),
975
- className: Y(
975
+ className: Z(
976
976
  "mx-3 flex cursor-pointer items-center justify-between rounded px-2 py-[6px] text-sm transition-colors hover:bg-muted/50",
977
977
  {
978
978
  "bg-muted": Xa(N, l)
@@ -1003,13 +1003,13 @@ function wn({
1003
1003
  ] });
1004
1004
  }
1005
1005
  function ya(s, n) {
1006
- var Qe, Ve, We, Ye, p;
1006
+ var Ye, Ve, Xe, Ze, p;
1007
1007
  let a = Qt(() => [], []);
1008
- const t = ts().authToken || s, l = i(
1008
+ const t = ns().authToken || s, l = i(
1009
1009
  (g) => g.selectedConnectionId
1010
1010
  ), h = i(
1011
1011
  (g) => g.selectedDatamodelId
1012
- ), d = i(
1012
+ ), c = i(
1013
1013
  (g) => g.selectedDatabaseName
1014
1014
  ), r = i(
1015
1015
  (g) => g.selectedSchemaName
@@ -1021,16 +1021,16 @@ function ya(s, n) {
1021
1021
  (g) => g.actions.setSelectedDatamodelId
1022
1022
  ), S = i(
1023
1023
  (g) => g.actions.setSelectedDatabaseName
1024
- ), c = i(
1024
+ ), d = i(
1025
1025
  (g) => g.actions.setSelectedSchemaName
1026
1026
  ), x = i(
1027
1027
  (g) => g.actions.setSelectedTableName
1028
1028
  ), j = i((g) => g.actions.setCardSql);
1029
1029
  function z(g) {
1030
- return l && d && r && d !== "NA" ? !0 : l && g === "API" ? !1 : !!(l && g === "S3");
1030
+ return l && c && r && c !== "NA" ? !0 : l && g === "API" ? !1 : !!(l && g === "S3");
1031
1031
  }
1032
1032
  function C(g) {
1033
- return !!(l && d && d !== "NA" && r && o || l && (g === "S3" || g === "API") || h && h);
1033
+ return !!(l && c && c !== "NA" && r && o || l && (g === "S3" || g === "API") || h && h);
1034
1034
  }
1035
1035
  function E(g) {
1036
1036
  return l && g ? !(g === "API" || g === "S3") : !1;
@@ -1039,9 +1039,9 @@ function ya(s, n) {
1039
1039
  data: v,
1040
1040
  isLoading: D,
1041
1041
  isError: N
1042
- } = ge({
1042
+ } = je({
1043
1043
  queryKey: ["connections"],
1044
- queryFn: () => ye(
1044
+ queryFn: () => ve(
1045
1045
  "https://semaphor.cloud/api/v1/connections",
1046
1046
  (t == null ? void 0 : t.accessToken) || ""
1047
1047
  ),
@@ -1050,10 +1050,10 @@ function ya(s, n) {
1050
1050
  }), {
1051
1051
  data: F,
1052
1052
  isLoading: A,
1053
- isError: q
1054
- } = ge({
1053
+ isError: V
1054
+ } = je({
1055
1055
  queryKey: ["models", l],
1056
- queryFn: () => ye(
1056
+ queryFn: () => ve(
1057
1057
  "https://semaphor.cloud/api/v1/datamodels",
1058
1058
  (t == null ? void 0 : t.accessToken) || "",
1059
1059
  {
@@ -1066,13 +1066,13 @@ function ya(s, n) {
1066
1066
  (g) => g.id === l
1067
1067
  ), U = M == null ? void 0 : M.type, P = (M == null ? void 0 : M.type) === "API" || (M == null ? void 0 : M.type) === "S3", {
1068
1068
  data: I,
1069
- isLoading: le,
1070
- isFetching: X,
1071
- isError: Z,
1072
- refetch: ee
1073
- } = ge({
1069
+ isLoading: ie,
1070
+ isFetching: Q,
1071
+ isError: ee,
1072
+ refetch: se
1073
+ } = je({
1074
1074
  queryKey: ["databases", l],
1075
- queryFn: () => ye(
1075
+ queryFn: () => ve(
1076
1076
  "https://semaphor.cloud/api/v1/databases",
1077
1077
  (t == null ? void 0 : t.accessToken) || "",
1078
1078
  {
@@ -1083,66 +1083,66 @@ function ya(s, n) {
1083
1083
  // !!selectedConnectionId && !isNonDbConnection, //currentConnection?.type !== 'API', // Only fetch if connectionId is present
1084
1084
  }), {
1085
1085
  data: K,
1086
- isLoading: se,
1086
+ isLoading: ae,
1087
1087
  isFetching: b,
1088
1088
  isError: y,
1089
1089
  refetch: O
1090
- } = ge({
1091
- queryKey: ["schemas", l, d],
1092
- queryFn: () => ye(
1090
+ } = je({
1091
+ queryKey: ["schemas", l, c],
1092
+ queryFn: () => ve(
1093
1093
  "https://semaphor.cloud/api/v1/schemas",
1094
1094
  (t == null ? void 0 : t.accessToken) || "",
1095
1095
  {
1096
1096
  connection_id: l,
1097
- database_name: d
1097
+ database_name: c
1098
1098
  }
1099
1099
  ),
1100
- enabled: !!l && !!d && !P && d !== "NA"
1100
+ enabled: !!l && !!c && !P && c !== "NA"
1101
1101
  //currentConnection?.type !== 'API', // Only fetch if connectionId and database is present
1102
1102
  }), {
1103
- data: B,
1104
- isLoading: V,
1105
- isFetching: te,
1106
- isError: Ne,
1103
+ data: $,
1104
+ isLoading: ne,
1105
+ isFetching: W,
1106
+ isError: q,
1107
1107
  refetch: Ce
1108
- } = ge({
1108
+ } = je({
1109
1109
  queryKey: [
1110
1110
  "tables",
1111
1111
  l,
1112
- d,
1112
+ c,
1113
1113
  r
1114
1114
  ],
1115
- queryFn: () => ye(
1115
+ queryFn: () => ve(
1116
1116
  "https://semaphor.cloud/api/v1/tables",
1117
1117
  (t == null ? void 0 : t.accessToken) || "",
1118
1118
  {
1119
1119
  connection_id: l,
1120
- database_name: d,
1120
+ database_name: c,
1121
1121
  schema_name: r
1122
1122
  }
1123
1123
  ),
1124
1124
  enabled: z(U)
1125
1125
  }), {
1126
- data: ae,
1127
- isLoading: pe,
1126
+ data: te,
1127
+ isLoading: fe,
1128
1128
  isFetching: J,
1129
- isError: ne
1130
- } = ge({
1129
+ isError: re
1130
+ } = je({
1131
1131
  queryKey: [
1132
1132
  "columns",
1133
1133
  l,
1134
- d,
1134
+ c,
1135
1135
  r,
1136
1136
  o
1137
1137
  ],
1138
- queryFn: () => ye(
1138
+ queryFn: () => ve(
1139
1139
  "https://semaphor.cloud/api/v1/columns",
1140
1140
  (t == null ? void 0 : t.accessToken) || "",
1141
1141
  {
1142
1142
  connection_id: l,
1143
1143
  datamodel_id: h || "",
1144
1144
  // don't pass undefined. Pass empty string
1145
- database_name: d,
1145
+ database_name: c,
1146
1146
  schema_name: r,
1147
1147
  table_name: o
1148
1148
  }
@@ -1158,94 +1158,94 @@ function ya(s, n) {
1158
1158
  });
1159
1159
  G(() => {
1160
1160
  f(a);
1161
- }, [ae, f, a]), G(() => {
1161
+ }, [te, f, a]), G(() => {
1162
1162
  }, [
1163
1163
  P,
1164
1164
  j,
1165
1165
  x,
1166
- c,
1166
+ d,
1167
1167
  S,
1168
1168
  M
1169
1169
  ]);
1170
- const ie = (M == null ? void 0 : M.type) === "API" ? (Qe = M == null ? void 0 : M.type) == null ? void 0 : Qe.toLowerCase() : o || "", je = P ? "" : r || "";
1171
- function oe(g) {
1172
- c(g), x("");
1170
+ const oe = (M == null ? void 0 : M.type) === "API" ? (Ye = M == null ? void 0 : M.type) == null ? void 0 : Ye.toLowerCase() : o || "", be = P ? "" : r || "";
1171
+ function ce(g) {
1172
+ d(g), x("");
1173
1173
  }
1174
1174
  function Ie(g) {
1175
- S(g === "none" ? "" : g), c(""), x(""), g !== "none" && g !== "" && u("");
1175
+ S(g === "none" ? "" : g), d(""), x(""), g !== "none" && g !== "" && u("");
1176
1176
  }
1177
1177
  function Vs(g) {
1178
- m(g), S(""), u(""), c(""), x("");
1178
+ m(g);
1179
1179
  }
1180
1180
  function Se(g) {
1181
1181
  u(g === "none" ? "" : g), g !== "none" && g !== "" && S("");
1182
1182
  }
1183
- I && ((Ve = I == null ? void 0 : I.databases) == null ? void 0 : Ve.length) > 0, K && ((We = K == null ? void 0 : K.schemas) == null ? void 0 : We.length) > 0, ae && ((Ye = ae == null ? void 0 : ae.columns) == null ? void 0 : Ye.length) > 0 && (a = ae.columns.map((g) => ({
1183
+ I && ((Ve = I == null ? void 0 : I.databases) == null ? void 0 : Ve.length) > 0, K && ((Xe = K == null ? void 0 : K.schemas) == null ? void 0 : Xe.length) > 0, te && ((Ze = te == null ? void 0 : te.columns) == null ? void 0 : Ze.length) > 0 && (a = te.columns.map((g) => ({
1184
1184
  ...g,
1185
1185
  data_type: g.data_type.toLowerCase()
1186
- }))), Z && (a = []), (ne || N) && (a = []);
1187
- const rs = v == null ? void 0 : v.connections.map(
1186
+ }))), ee && (a = []), (re || N) && (a = []);
1187
+ const ls = v == null ? void 0 : v.connections.map(
1188
1188
  (g) => ({
1189
1189
  id: g.id,
1190
1190
  name: g.name,
1191
1191
  type: g.type
1192
1192
  })
1193
- ), Je = (p = F == null ? void 0 : F.datamodels) == null ? void 0 : p.map((g) => ({
1193
+ ), We = (p = F == null ? void 0 : F.datamodels) == null ? void 0 : p.map((g) => ({
1194
1194
  id: g.id,
1195
1195
  name: g.name
1196
- })), ls = I == null ? void 0 : I.databases.map((g) => ({
1196
+ })), is = I == null ? void 0 : I.databases.map((g) => ({
1197
1197
  id: g.database_name,
1198
1198
  name: g.database_name
1199
- })), is = K == null ? void 0 : K.schemas.map((g) => ({
1199
+ })), os = K == null ? void 0 : K.schemas.map((g) => ({
1200
1200
  id: g.schema_name,
1201
1201
  name: g.schema_name
1202
- })), os = B == null ? void 0 : B.tables.map((g) => ({
1202
+ })), cs = $ == null ? void 0 : $.tables.map((g) => ({
1203
1203
  id: g.table_name,
1204
1204
  name: g.table_name
1205
1205
  }));
1206
1206
  return {
1207
- connectionItems: rs,
1207
+ connectionItems: ls,
1208
1208
  isConnectionsLoading: D,
1209
1209
  isConnectionsError: N,
1210
- modelItems: Je,
1210
+ modelItems: We,
1211
1211
  isModelsLoading: A,
1212
- isModelsError: q,
1213
- databaseItems: ls,
1214
- isDatabasesLoadingOrFetching: le || X,
1215
- isDatabaseError: Z,
1216
- schemaItems: is,
1217
- isSchemaLoadingOrFetching: se || b,
1212
+ isModelsError: V,
1213
+ databaseItems: is,
1214
+ isDatabasesLoadingOrFetching: ie || Q,
1215
+ isDatabaseError: ee,
1216
+ schemaItems: os,
1217
+ isSchemaLoadingOrFetching: ae || b,
1218
1218
  isSchemaError: y,
1219
- tableItems: os,
1220
- isTableLoadingOrFetching: V || te,
1221
- isTableError: Ne,
1219
+ tableItems: cs,
1220
+ isTableLoadingOrFetching: ne || W,
1221
+ isTableError: q,
1222
1222
  columns: a,
1223
- isColumnsLoadingOrFetching: pe || J,
1224
- isColumnsError: ne,
1223
+ isColumnsLoadingOrFetching: fe || J,
1224
+ isColumnsError: re,
1225
1225
  isNonDbConnection: P,
1226
1226
  connectionType: U,
1227
- tableName: ie,
1228
- schemaName: je,
1227
+ tableName: oe,
1228
+ schemaName: be,
1229
1229
  handleConnectionChange: Vs,
1230
1230
  handleDatamodelChange: Se,
1231
1231
  handleDatabaseChange: Ie,
1232
- handleSchemaChange: oe
1232
+ handleSchemaChange: ce
1233
1233
  };
1234
1234
  }
1235
1235
  function va({
1236
1236
  ColumnsComponent: s
1237
1237
  }) {
1238
- var B;
1238
+ var W;
1239
1239
  const n = i(
1240
- (V) => V.selectedConnectionId
1240
+ (q) => q.selectedConnectionId
1241
1241
  ), a = i(
1242
- (V) => V.selectedDatamodelId
1242
+ (q) => q.selectedDatamodelId
1243
1243
  ), t = i(
1244
- (V) => V.selectedDatabaseName
1244
+ (q) => q.selectedDatabaseName
1245
1245
  ), l = i(
1246
- (V) => V.selectedSchemaName
1247
- ), h = i((V) => V.selectedTableName), d = i(
1248
- (V) => V.actions.setSelectedTableName
1246
+ (q) => q.selectedSchemaName
1247
+ ), h = i((q) => q.selectedTableName), c = i(
1248
+ (q) => q.actions.setSelectedTableName
1249
1249
  ), {
1250
1250
  connectionItems: r,
1251
1251
  modelItems: o,
@@ -1253,7 +1253,7 @@ function va({
1253
1253
  databaseItems: m,
1254
1254
  tableItems: u,
1255
1255
  columns: S,
1256
- isConnectionsLoading: c,
1256
+ isConnectionsLoading: d,
1257
1257
  isModelsLoading: x,
1258
1258
  isConnectionsError: j,
1259
1259
  isModelsError: z,
@@ -1264,33 +1264,33 @@ function va({
1264
1264
  isColumnsError: N,
1265
1265
  isColumnsLoadingOrFetching: F,
1266
1266
  isTableLoadingOrFetching: A,
1267
- isTableError: q,
1267
+ isTableError: V,
1268
1268
  connectionType: M,
1269
1269
  isNonDbConnection: U,
1270
1270
  handleConnectionChange: P,
1271
1271
  handleDatabaseChange: I,
1272
- handleSchemaChange: le,
1273
- handleDatamodelChange: X,
1274
- tableName: Z,
1275
- schemaName: ee
1272
+ handleSchemaChange: ie,
1273
+ handleDatamodelChange: Q,
1274
+ tableName: ee,
1275
+ schemaName: se
1276
1276
  } = ya();
1277
1277
  function K() {
1278
- return s ? s(ee, Z, S) : /* @__PURE__ */ e.jsx(
1278
+ return s ? s(se, ee, S) : /* @__PURE__ */ e.jsx(
1279
1279
  wn,
1280
1280
  {
1281
- schemaName: ee,
1282
- tableName: Z,
1281
+ schemaName: se,
1282
+ tableName: ee,
1283
1283
  columns: S,
1284
1284
  status: F ? "Loading..." : N ? "Error" : "Success"
1285
1285
  }
1286
1286
  );
1287
1287
  }
1288
- function se() {
1288
+ function ae() {
1289
1289
  window.location.href = "mailto:support@semaphor.cloud?subject=Help&body=I need help with...";
1290
1290
  }
1291
1291
  function b() {
1292
1292
  return M === "S3" || M === "API" || !n || n === "none" || a && a !== "none" ? null : /* @__PURE__ */ e.jsx(
1293
- Xe,
1293
+ Re,
1294
1294
  {
1295
1295
  showNone: !0,
1296
1296
  onChange: I,
@@ -1303,10 +1303,32 @@ function va({
1303
1303
  );
1304
1304
  }
1305
1305
  function y() {
1306
+ if (n && (!t || t === "none") && (!a || a === "none"))
1307
+ return /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3", children: [
1308
+ /* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(Pe, {}) }),
1309
+ /* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(R, { children: "OR" }) }),
1310
+ /* @__PURE__ */ e.jsx("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e.jsx(Pe, {}) })
1311
+ ] });
1312
+ }
1313
+ function O() {
1314
+ return M === "S3" || M === "API" || !n || n === "none" || t && t !== "none" ? null : /* @__PURE__ */ e.jsx(
1315
+ Re,
1316
+ {
1317
+ showNone: !0,
1318
+ onChange: Q,
1319
+ isError: z,
1320
+ isLoading: x,
1321
+ items: o,
1322
+ value: a || "",
1323
+ title: "Dataset"
1324
+ }
1325
+ );
1326
+ }
1327
+ function $() {
1306
1328
  return M === "S3" || M === "API" || !t || n === "none" || t === "none" ? null : /* @__PURE__ */ e.jsx(
1307
- Xe,
1329
+ Re,
1308
1330
  {
1309
- onChange: le,
1331
+ onChange: ie,
1310
1332
  isError: D,
1311
1333
  isLoading: v,
1312
1334
  items: f,
@@ -1315,12 +1337,12 @@ function va({
1315
1337
  }
1316
1338
  );
1317
1339
  }
1318
- function O() {
1340
+ function ne() {
1319
1341
  return M === "API" || !l || l === "none" || n === "none" || t === "none" ? null : /* @__PURE__ */ e.jsx(
1320
- Xe,
1342
+ Re,
1321
1343
  {
1322
- onChange: d,
1323
- isError: q,
1344
+ onChange: c,
1345
+ isError: V,
1324
1346
  items: u,
1325
1347
  isLoading: A,
1326
1348
  value: h || "",
@@ -1331,28 +1353,30 @@ function va({
1331
1353
  return /* @__PURE__ */ e.jsxs("aside", { className: "xbg-red-100 flex grow flex-col justify-between", children: [
1332
1354
  /* @__PURE__ */ e.jsxs("section", { className: "space-y-3 px-6 py-4", children: [
1333
1355
  /* @__PURE__ */ e.jsx(
1334
- Xe,
1356
+ Re,
1335
1357
  {
1336
1358
  items: r,
1337
1359
  title: "Connection",
1338
1360
  value: n || "",
1339
1361
  onChange: P,
1340
- isLoading: c,
1362
+ isLoading: d,
1341
1363
  isError: j,
1342
- connectionTooltip: ((B = r == null ? void 0 : r.find(
1343
- (V) => V.id === n
1344
- )) == null ? void 0 : B.type) || ""
1364
+ connectionTooltip: ((W = r == null ? void 0 : r.find(
1365
+ (q) => q.id === n
1366
+ )) == null ? void 0 : W.type) || ""
1345
1367
  }
1346
1368
  ),
1347
- b(),
1369
+ O(),
1348
1370
  y(),
1349
- O()
1371
+ b(),
1372
+ $(),
1373
+ ne()
1350
1374
  ] }),
1351
1375
  K(),
1352
1376
  /* @__PURE__ */ e.jsx("div", { className: "flex items-end justify-center gap-2 px-6 py-4", children: /* @__PURE__ */ e.jsxs(
1353
1377
  k,
1354
1378
  {
1355
- onClick: se,
1379
+ onClick: ae,
1356
1380
  size: "sm",
1357
1381
  variant: "secondary",
1358
1382
  className: "w-full",
@@ -1368,16 +1392,16 @@ function zn(s) {
1368
1392
  const n = s.toUpperCase().indexOf("WHERE"), a = s.toUpperCase().indexOf("GROUP BY"), t = s.toUpperCase().indexOf("LIMIT"), l = s.toUpperCase().indexOf("ORDER BY");
1369
1393
  let h = s.length;
1370
1394
  if (l !== -1 && (h = l), t !== -1 && t < h && (h = t), n !== -1) {
1371
- const d = s.substring(0, n), r = s.substring(n);
1372
- return `${d} {{ filters | where }} AND ${r.substring(
1395
+ const c = s.substring(0, n), r = s.substring(n);
1396
+ return `${c} {{ filters | where }} AND ${r.substring(
1373
1397
  6
1374
1398
  )}`;
1375
1399
  } else if (a !== -1) {
1376
- const d = s.substring(0, a), r = s.substring(a);
1377
- return `${d} {{ filters | where }} ${r}`;
1400
+ const c = s.substring(0, a), r = s.substring(a);
1401
+ return `${c} {{ filters | where }} ${r}`;
1378
1402
  } else {
1379
- const d = s.substring(0, h), r = s.substring(h);
1380
- return `${d} {{ filters | where }} ${r}`;
1403
+ const c = s.substring(0, h), r = s.substring(h);
1404
+ return `${c} {{ filters | where }} ${r}`;
1381
1405
  }
1382
1406
  }
1383
1407
  function Fn({
@@ -1403,7 +1427,7 @@ function Fn({
1403
1427
  ]
1404
1428
  }
1405
1429
  ),
1406
- /* @__PURE__ */ e.jsx(Os, { className: " min-h-0 max-h-[250px] overflow-scroll ", children: /* @__PURE__ */ e.jsx("p", { className: " overflow-auto text-sm leading-relaxed font-mono ", children: s }) })
1430
+ /* @__PURE__ */ e.jsx(Ms, { className: " min-h-0 max-h-[250px] overflow-scroll ", children: /* @__PURE__ */ e.jsx("p", { className: " overflow-auto text-sm leading-relaxed font-mono ", children: s }) })
1407
1431
  ] }) }) })
1408
1432
  ] });
1409
1433
  }
@@ -1413,12 +1437,12 @@ function On({
1413
1437
  checked: a
1414
1438
  }) {
1415
1439
  return /* @__PURE__ */ e.jsxs("div", { className: "xbg-red-100 ml-6 flex items-center gap-2", children: [
1416
- /* @__PURE__ */ e.jsx(Pe, { checked: a, onCheckedChange: n }),
1440
+ /* @__PURE__ */ e.jsx(Ue, { checked: a, onCheckedChange: n }),
1417
1441
  /* @__PURE__ */ e.jsx("label", { className: "text-xs leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: s })
1418
1442
  ] });
1419
1443
  }
1420
1444
  function Mn() {
1421
- const { authToken: s } = ts(), n = $e(null), a = i((r) => r.applyFilters), [t, l] = T(""), h = i((r) => r.filterValues), d = i((r) => r.card.sql);
1445
+ const { authToken: s } = ns(), n = Ke(null), a = i((r) => r.applyFilters), [t, l] = L(""), h = i((r) => r.filterValues), c = i((r) => r.card.sql);
1422
1446
  return /* @__PURE__ */ e.jsxs(
1423
1447
  la,
1424
1448
  {
@@ -1431,7 +1455,7 @@ function Mn() {
1431
1455
  "https://semaphor.cloud/api/v1/filter-sql",
1432
1456
  (s == null ? void 0 : s.accessToken) || "",
1433
1457
  {
1434
- sql: d,
1458
+ sql: c,
1435
1459
  active_filters: h
1436
1460
  }
1437
1461
  );
@@ -1459,7 +1483,7 @@ function Mn() {
1459
1483
  }
1460
1484
  );
1461
1485
  }
1462
- const Tn = `
1486
+ const Ln = `
1463
1487
 
1464
1488
  Use the following syntax to create a chart query. Please replace the x-axis, y-axis, stack-by, label, and measure with the actual column names of the table.
1465
1489
 
@@ -1506,7 +1530,7 @@ SELECT label, measure FROM table
1506
1530
  - Label - Category
1507
1531
  - Measure - Number
1508
1532
  `;
1509
- function Ln({
1533
+ function Tn({
1510
1534
  open: s,
1511
1535
  setOpen: n,
1512
1536
  userInput: a,
@@ -1514,7 +1538,7 @@ function Ln({
1514
1538
  triggerAIRun: l,
1515
1539
  setTriggerAIRun: h
1516
1540
  }) {
1517
- const d = $e(null), r = $e(null), { authToken: o } = ts(), [f, m] = T(!1), u = i((b) => b.actions.setCardSql), S = w((b) => b.dashboard.baseQueries), c = i((b) => b.actions.setRunSql), x = i((b) => b.actions.setCardType), [j, z] = T([]), C = i((b) => b.currentColumns), E = i((b) => b.card.sql), v = i((b) => b.selectedTableName), D = `
1541
+ const c = Ke(null), r = Ke(null), { authToken: o } = ns(), [f, m] = L(!1), u = i((b) => b.actions.setCardSql), S = w((b) => b.dashboard.baseQueries), d = i((b) => b.actions.setRunSql), x = i((b) => b.actions.setCardType), [j, z] = L([]), C = i((b) => b.currentColumns), E = i((b) => b.card.sql), v = i((b) => b.selectedTableName), D = `
1518
1542
  ${a}
1519
1543
 
1520
1544
  Database Query Dialect: ${v === "api" || v === "s3" ? "DuckDb" : ""}
@@ -1522,9 +1546,9 @@ function Ln({
1522
1546
  Table Columns: ${C == null ? void 0 : C.map((b) => `${b.column_name} | ${b.data_type}`).join(", ")}
1523
1547
  User SQL: ${E}
1524
1548
  ${S && `Base Queries: ${JSON.stringify(S)} `}`, N = ` When the user asks for a specific chart please use the following query structure to generate the chart query. Do not make up the column names. Use only the table columns provided above for the query. Replace x-axis, y-axis, and lables with the appropriate column names.
1525
- Visual Query Syntax: ${Tn}`, { data: F, isLoading: A, isFetching: q, isError: M, refetch: U } = ge({
1549
+ Visual Query Syntax: ${Ln}`, { data: F, isLoading: A, isFetching: V, isError: M, refetch: U } = je({
1526
1550
  queryKey: ["ai-query"],
1527
- queryFn: () => ye(
1551
+ queryFn: () => ve(
1528
1552
  "https://semaphor.cloud/api/v1/ai",
1529
1553
  (o == null ? void 0 : o.accessToken) || "",
1530
1554
  {
@@ -1563,7 +1587,7 @@ function Ln({
1563
1587
  r.current && (r.current.scroll({
1564
1588
  top: r.current.scrollHeight,
1565
1589
  behavior: "smooth"
1566
- }), (y = d.current) == null || y.focus());
1590
+ }), (y = c.current) == null || y.focus());
1567
1591
  }, 100);
1568
1592
  return () => clearTimeout(b);
1569
1593
  }, [j]);
@@ -1573,7 +1597,7 @@ function Ln({
1573
1597
  G(() => {
1574
1598
  l && (I(), h(!1));
1575
1599
  }, [l, h]);
1576
- const le = {
1600
+ const ie = {
1577
1601
  //seleect a darker color
1578
1602
  // color: '#000',
1579
1603
  fontFamily: "Arial, sans-serif",
@@ -1581,14 +1605,14 @@ function Ln({
1581
1605
  fontSize: 15,
1582
1606
  // padding: '5px',
1583
1607
  width: "100%"
1584
- }, X = {
1608
+ }, Q = {
1585
1609
  // background: '#f6f8fa',
1586
1610
  // color: '#000',
1587
1611
  fontFamily: "monospace",
1588
1612
  fontSize: 14,
1589
1613
  lineHeight: 1.6
1590
1614
  // padding: 20,
1591
- }, Z = {
1615
+ }, ee = {
1592
1616
  // color: '#000',
1593
1617
  fontFamily: "Arial, sans-serif",
1594
1618
  lineHeight: 1.6,
@@ -1598,11 +1622,11 @@ function Ln({
1598
1622
  marginLeft: 20,
1599
1623
  // add bullet points for unordered lists
1600
1624
  listStyleType: "disc"
1601
- }, ee = {
1625
+ }, se = {
1602
1626
  // Override how paragraphs are rendered
1603
- p: ({ node: b, ...y }) => /* @__PURE__ */ e.jsx("p", { style: le, ...y }),
1627
+ p: ({ node: b, ...y }) => /* @__PURE__ */ e.jsx("p", { style: ie, ...y }),
1604
1628
  code: ({ node: b, ...y }) => /* @__PURE__ */ e.jsx("code", { className: "rounded-sm bg-muted px-2 py-1 text-sm", ...y }),
1605
- pre: ({ node: b, ...y }) => /* @__PURE__ */ e.jsxs("pre", { className: "space-y-2 rounded-sm bg-muted/50 p-3", style: X, children: [
1629
+ pre: ({ node: b, ...y }) => /* @__PURE__ */ e.jsxs("pre", { className: "space-y-2 rounded-sm bg-muted/50 p-3", style: Q, children: [
1606
1630
  /* @__PURE__ */ e.jsx("code", { className: "whitespace-normal text-sm", children: y.children }),
1607
1631
  /* @__PURE__ */ e.jsxs("div", { className: "flex justify-start gap-2", children: [
1608
1632
  /* @__PURE__ */ e.jsx(k, { onClick: K, size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(da, {}) }),
@@ -1610,8 +1634,8 @@ function Ln({
1610
1634
  k,
1611
1635
  {
1612
1636
  onClick: (O) => {
1613
- const B = K(O);
1614
- B && (n(!1), u(B), c(!0));
1637
+ const $ = K(O);
1638
+ $ && (n(!1), u($), d(!0));
1615
1639
  },
1616
1640
  size: "sm",
1617
1641
  variant: "outline",
@@ -1620,7 +1644,7 @@ function Ln({
1620
1644
  )
1621
1645
  ] })
1622
1646
  ] }),
1623
- li: ({ node: b, ...y }) => /* @__PURE__ */ e.jsx("li", { style: Z, ...y })
1647
+ li: ({ node: b, ...y }) => /* @__PURE__ */ e.jsx("li", { style: ee, ...y })
1624
1648
  // You can add more overrides for other elements like h1, h2, etc.
1625
1649
  };
1626
1650
  function K(b) {
@@ -1628,9 +1652,9 @@ function Ln({
1628
1652
  if (!y)
1629
1653
  return;
1630
1654
  const O = y.textContent || y.innerText;
1631
- return navigator.clipboard.writeText(O).then(() => console.log("Text copied to clipboard")).catch((B) => console.error("Error in copying text: ", B)), O;
1655
+ return navigator.clipboard.writeText(O).then(() => console.log("Text copied to clipboard")).catch(($) => console.error("Error in copying text: ", $)), O;
1632
1656
  }
1633
- function se() {
1657
+ function ae() {
1634
1658
  return j == null ? void 0 : j.map((b, y) => b.role === "user" ? /* @__PURE__ */ e.jsxs(
1635
1659
  "div",
1636
1660
  {
@@ -1645,14 +1669,14 @@ function Ln({
1645
1669
  at,
1646
1670
  {
1647
1671
  className: "w-full overflow-auto py-1",
1648
- components: ee,
1672
+ components: se,
1649
1673
  children: F == null ? void 0 : F.response.replace(/DuckDB/gi, "Semaphor")
1650
1674
  },
1651
1675
  y
1652
1676
  ) : /* @__PURE__ */ e.jsx("div", {}, y));
1653
1677
  }
1654
- return /* @__PURE__ */ e.jsxs(ys, { open: s, onOpenChange: n, children: [
1655
- /* @__PURE__ */ e.jsx(vs, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1678
+ return /* @__PURE__ */ e.jsxs(vs, { open: s, onOpenChange: n, children: [
1679
+ /* @__PURE__ */ e.jsx(Ns, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1656
1680
  k,
1657
1681
  {
1658
1682
  size: "sm",
@@ -1662,20 +1686,20 @@ function Ln({
1662
1686
  }
1663
1687
  ) }),
1664
1688
  /* @__PURE__ */ e.jsxs(
1665
- Ns,
1689
+ Cs,
1666
1690
  {
1667
1691
  className: "flex flex-col justify-between overflow-auto sm:max-w-[425px] md:max-h-[625px] md:min-w-[625px]",
1668
1692
  children: [
1669
- /* @__PURE__ */ e.jsxs(Cs, { children: [
1670
- /* @__PURE__ */ e.jsx(Ss, { children: "Assistant" }),
1671
- /* @__PURE__ */ e.jsx(ks, { children: "What can I help you with?" })
1693
+ /* @__PURE__ */ e.jsxs(Ss, { children: [
1694
+ /* @__PURE__ */ e.jsx(ks, { children: "Assistant" }),
1695
+ /* @__PURE__ */ e.jsx(ws, { children: "What can I help you with?" })
1672
1696
  ] }),
1673
1697
  /* @__PURE__ */ e.jsx(
1674
1698
  "div",
1675
1699
  {
1676
1700
  ref: r,
1677
1701
  className: "h-[625px] w-full overflow-auto border-t border-t-muted",
1678
- children: /* @__PURE__ */ e.jsx("div", { className: "space-y-4 py-2 pr-3", role: "messages", children: se() })
1702
+ children: /* @__PURE__ */ e.jsx("div", { className: "space-y-4 py-2 pr-3", role: "messages", children: ae() })
1679
1703
  }
1680
1704
  ),
1681
1705
  /* @__PURE__ */ e.jsx(
@@ -1686,7 +1710,7 @@ function Ln({
1686
1710
  ha,
1687
1711
  {
1688
1712
  autoFocus: !0,
1689
- ref: d,
1713
+ ref: c,
1690
1714
  onKeyDown: (b) => {
1691
1715
  b.key === "Enter" && !b.shiftKey && (b.preventDefault(), t(""), I());
1692
1716
  },
@@ -1695,10 +1719,10 @@ function Ln({
1695
1719
  const y = b.target, O = y.value.length;
1696
1720
  y.setSelectionRange(O, O);
1697
1721
  },
1698
- className: Y(
1722
+ className: Z(
1699
1723
  "max-h-10 min-h-7 resize-none border-none focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0"
1700
1724
  ),
1701
- disabled: A || q,
1725
+ disabled: A || V,
1702
1726
  value: a,
1703
1727
  onChange: (b) => t(b.target.value)
1704
1728
  }
@@ -1711,7 +1735,7 @@ function Ln({
1711
1735
  size: "sm",
1712
1736
  variant: "ghost",
1713
1737
  onClick: I,
1714
- children: !A && !q ? /* @__PURE__ */ e.jsx(st, {}) : /* @__PURE__ */ e.jsx(Be, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" })
1738
+ children: !A && !V ? /* @__PURE__ */ e.jsx(st, {}) : /* @__PURE__ */ e.jsx($e, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" })
1715
1739
  }
1716
1740
  )
1717
1741
  ] })
@@ -1728,7 +1752,7 @@ var Na = {
1728
1752
  className: void 0,
1729
1753
  style: void 0,
1730
1754
  attr: void 0
1731
- }, Js = ue.createContext && /* @__PURE__ */ ue.createContext(Na), An = ["attr", "size", "title"];
1755
+ }, Js = xe.createContext && /* @__PURE__ */ xe.createContext(Na), An = ["attr", "size", "title"];
1732
1756
  function En(s, n) {
1733
1757
  if (s == null)
1734
1758
  return {};
@@ -1748,15 +1772,15 @@ function Dn(s, n) {
1748
1772
  l = t[h], !(n.indexOf(l) >= 0) && (a[l] = s[l]);
1749
1773
  return a;
1750
1774
  }
1751
- function ss() {
1752
- return ss = Object.assign ? Object.assign.bind() : function(s) {
1775
+ function as() {
1776
+ return as = Object.assign ? Object.assign.bind() : function(s) {
1753
1777
  for (var n = 1; n < arguments.length; n++) {
1754
1778
  var a = arguments[n];
1755
1779
  for (var t in a)
1756
1780
  Object.prototype.hasOwnProperty.call(a, t) && (s[t] = a[t]);
1757
1781
  }
1758
1782
  return s;
1759
- }, ss.apply(this, arguments);
1783
+ }, as.apply(this, arguments);
1760
1784
  }
1761
1785
  function Qs(s, n) {
1762
1786
  var a = Object.keys(s);
@@ -1768,7 +1792,7 @@ function Qs(s, n) {
1768
1792
  }
1769
1793
  return a;
1770
1794
  }
1771
- function as(s) {
1795
+ function ts(s) {
1772
1796
  for (var n = 1; n < arguments.length; n++) {
1773
1797
  var a = arguments[n] != null ? arguments[n] : {};
1774
1798
  n % 2 ? Qs(Object(a), !0).forEach(function(t) {
@@ -1799,13 +1823,13 @@ function qn(s, n) {
1799
1823
  return (n === "string" ? String : Number)(s);
1800
1824
  }
1801
1825
  function Ca(s) {
1802
- return s && s.map((n, a) => /* @__PURE__ */ ue.createElement(n.tag, as({
1826
+ return s && s.map((n, a) => /* @__PURE__ */ xe.createElement(n.tag, ts({
1803
1827
  key: a
1804
1828
  }, n.attr), Ca(n.child)));
1805
1829
  }
1806
- function xe(s) {
1807
- return (n) => /* @__PURE__ */ ue.createElement(Rn, ss({
1808
- attr: as({}, s.attr)
1830
+ function pe(s) {
1831
+ return (n) => /* @__PURE__ */ xe.createElement(Rn, as({
1832
+ attr: ts({}, s.attr)
1809
1833
  }, n), Ca(s.child));
1810
1834
  }
1811
1835
  function Rn(s) {
@@ -1814,28 +1838,28 @@ function Rn(s) {
1814
1838
  attr: t,
1815
1839
  size: l,
1816
1840
  title: h
1817
- } = s, d = En(s, An), r = l || a.size || "1em", o;
1818
- return a.className && (o = a.className), s.className && (o = (o ? o + " " : "") + s.className), /* @__PURE__ */ ue.createElement("svg", ss({
1841
+ } = s, c = En(s, An), r = l || a.size || "1em", o;
1842
+ return a.className && (o = a.className), s.className && (o = (o ? o + " " : "") + s.className), /* @__PURE__ */ xe.createElement("svg", as({
1819
1843
  stroke: "currentColor",
1820
1844
  fill: "currentColor",
1821
1845
  strokeWidth: "0"
1822
- }, a.attr, t, d, {
1846
+ }, a.attr, t, c, {
1823
1847
  className: o,
1824
- style: as(as({
1848
+ style: ts(ts({
1825
1849
  color: s.color || a.color
1826
1850
  }, a.style), s.style),
1827
1851
  height: r,
1828
1852
  width: r,
1829
1853
  xmlns: "http://www.w3.org/2000/svg"
1830
- }), h && /* @__PURE__ */ ue.createElement("title", null, h), s.children);
1854
+ }), h && /* @__PURE__ */ xe.createElement("title", null, h), s.children);
1831
1855
  };
1832
- return Js !== void 0 ? /* @__PURE__ */ ue.createElement(Js.Consumer, null, (a) => n(a)) : n(Na);
1856
+ return Js !== void 0 ? /* @__PURE__ */ xe.createElement(Js.Consumer, null, (a) => n(a)) : n(Na);
1833
1857
  }
1834
1858
  function _n(s) {
1835
- return xe({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z" }, child: [] }] })(s);
1859
+ return pe({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z" }, child: [] }] })(s);
1836
1860
  }
1837
1861
  function Hn() {
1838
- const { theme: s } = nt(), n = $e(), a = $e(), [t, l] = T(!1), [h, d] = T(!1), [r, o] = T(!1), [f, m] = T(""), [u, S] = T(!1), { authToken: c } = ts();
1862
+ const { theme: s } = nt(), n = Ke(), a = Ke(), [t, l] = L(!1), [h, c] = L(!1), [r, o] = L(!1), [f, m] = L(""), [u, S] = L(!1), { authToken: d } = ns();
1839
1863
  w((p) => p.selectedSheetId);
1840
1864
  const x = w((p) => p.dashboard.baseQueries), j = i((p) => p.card), z = w((p) => p.theme), C = i((p) => p.isShowingVisual), E = i(
1841
1865
  (p) => p.selectedConnectionId
@@ -1847,36 +1871,36 @@ function Hn() {
1847
1871
  w(
1848
1872
  (p) => p.actions.updateFrameCard
1849
1873
  );
1850
- const N = i((p) => p.selectedTableName), F = i((p) => p.card.sql), A = i((p) => p.card.python), q = rt(F, x), M = i((p) => p.selectedConnectionId), U = i((p) => p.frame), P = i((p) => p.filterValues), I = i((p) => p.applyFilters), {
1851
- setCardCustomCfg: le,
1852
- setQueryResultColumns: X,
1853
- setFilterValues: Z,
1854
- setCardSql: ee,
1874
+ const N = i((p) => p.selectedTableName), F = i((p) => p.card.sql), A = i((p) => p.card.python), V = rt(F, x), M = i((p) => p.selectedConnectionId), U = i((p) => p.frame), P = i((p) => p.filterValues), I = i((p) => p.applyFilters), {
1875
+ setCardCustomCfg: ie,
1876
+ setQueryResultColumns: Q,
1877
+ setFilterValues: ee,
1878
+ setCardSql: se,
1855
1879
  setCardPython: K,
1856
- setQueryError: se,
1880
+ setQueryError: ae,
1857
1881
  setPythonStdOut: b,
1858
1882
  setCardPreferences: y
1859
- } = i((p) => p.actions), O = i((p) => p.onSave), B = i(
1883
+ } = i((p) => p.actions), O = i((p) => p.onSave), $ = i(
1860
1884
  (p) => p.actions.setApplyFilters
1861
- ), V = i((p) => p.onClose), te = i((p) => p.actions.setCardData), Ne = i((p) => p.actions.setSqlGen), Ce = i((p) => p.runSql), ae = i((p) => p.actions.setRunSql), pe = i(
1885
+ ), ne = i((p) => p.onClose), W = i((p) => p.actions.setCardData), q = i((p) => p.actions.setSqlGen), Ce = i((p) => p.runSql), te = i((p) => p.actions.setRunSql), fe = i(
1862
1886
  (p) => p.actions.setIsSqlRunning
1863
1887
  ), {
1864
1888
  data: J,
1865
- isLoading: ne,
1866
- isFetching: ie,
1867
- isSuccess: je,
1868
- isError: oe,
1889
+ isLoading: re,
1890
+ isFetching: oe,
1891
+ isSuccess: be,
1892
+ isError: ce,
1869
1893
  error: Ie,
1870
1894
  status: Vs,
1871
1895
  refetch: Se
1872
- } = ge({
1873
- queryKey: [q, A],
1896
+ } = je({
1897
+ queryKey: [V, A],
1874
1898
  queryFn: () => ca(
1875
1899
  "https://semaphor.cloud/api/v1/query",
1876
- (c == null ? void 0 : c.accessToken) || "",
1900
+ (d == null ? void 0 : d.accessToken) || "",
1877
1901
  {
1878
1902
  connection_id: M,
1879
- sql: q,
1903
+ sql: V,
1880
1904
  python: A === Hs ? "" : A,
1881
1905
  active_filters: I ? P : []
1882
1906
  }
@@ -1885,39 +1909,39 @@ function Hn() {
1885
1909
  retry: !1
1886
1910
  });
1887
1911
  G(() => {
1888
- if (J && (te(J.records), J.rowLimitExceeded && ps.error("Row limit (10,000) exceeded. Refine your query.", {
1912
+ if (J && (W(J.records), J.rowLimitExceeded && fs.error("Row limit (10,000) exceeded. Refine your query.", {
1889
1913
  position: "top-center",
1890
1914
  richColors: !0
1891
1915
  }), b((J == null ? void 0 : J.output) || ""), J.records.length > 0)) {
1892
- const { dimensionKeys: p } = gs(J.records);
1893
- X(p);
1916
+ const { dimensionKeys: p } = js(J.records);
1917
+ Q(p);
1894
1918
  }
1895
- }, [J, te, X, b]), G(() => {
1896
- Ce && (Se(), ae(!1));
1897
- }, [Ce, Se, ae]), G(() => {
1898
- (ne || ie) && pe(!0), (oe || je) && pe(!1), oe ? (se(Ie.message), te([]), X([]), b("")) : se("");
1919
+ }, [J, W, Q, b]), G(() => {
1920
+ Ce && (Se(), te(!1));
1921
+ }, [Ce, Se, te]), G(() => {
1922
+ (re || oe) && fe(!0), (ce || be) && fe(!1), ce ? (ae(Ie.message), W([]), Q([]), b("")) : ae("");
1899
1923
  }, [
1900
- ne,
1901
- ie,
1924
+ re,
1925
+ oe,
1902
1926
  J,
1903
1927
  b,
1904
- oe,
1905
- je,
1906
- pe,
1907
- te,
1908
- X,
1909
- se,
1928
+ ce,
1929
+ be,
1930
+ fe,
1931
+ W,
1932
+ Q,
1933
+ ae,
1910
1934
  Ie
1911
1935
  ]);
1912
- function rs() {
1913
- ee(""), te([]), Ne({}), le(""), y({});
1936
+ function ls() {
1937
+ se(""), W([]), q({}), ie(""), y({});
1914
1938
  }
1915
- const Je = (p) => {
1939
+ const We = (p) => {
1916
1940
  a.current = p;
1917
1941
  };
1918
- function ls() {
1942
+ function is() {
1919
1943
  let p = F;
1920
- F && !F.includes("{{") && (p = zn(F), ee(p));
1944
+ F && !F.includes("{{") && (p = zn(F), se(p));
1921
1945
  const g = {
1922
1946
  ...j,
1923
1947
  lastSelectedSchema: D,
@@ -1928,44 +1952,44 @@ function Hn() {
1928
1952
  sql: p,
1929
1953
  customCfg: C ? j.customCfg : null
1930
1954
  }, qe = U.cards.map(
1931
- (be) => be.id === j.id ? g : be
1955
+ (ye) => ye.id === j.id ? g : ye
1932
1956
  );
1933
1957
  O == null || O({
1934
1958
  ...U,
1935
1959
  cards: qe
1936
1960
  });
1937
1961
  }
1938
- function is() {
1939
- V == null || V();
1962
+ function os() {
1963
+ ne == null || ne();
1940
1964
  }
1941
- function os(p) {
1965
+ function cs(p) {
1942
1966
  const g = getComputedStyle(
1943
1967
  document.documentElement
1944
1968
  ).getPropertyValue(p);
1945
- return Qe(g);
1969
+ return Ye(g);
1946
1970
  }
1947
- function Qe(p) {
1948
- const [g, qe, be] = p.split(" "), Q = parseFloat(g), Da = parseFloat(qe), Ia = parseFloat(be), Va = Da / 100, qs = Ia / 100, fe = (1 - Math.abs(2 * qs - 1)) * Va, ke = fe * (1 - Math.abs(Q / 60 % 2 - 1)), cs = qs - fe / 2;
1949
- let ce = 0, de = 0, he = 0;
1950
- 0 <= Q && Q < 60 ? (ce = fe, de = ke, he = 0) : 60 <= Q && Q < 120 ? (ce = ke, de = fe, he = 0) : 120 <= Q && Q < 180 ? (ce = 0, de = fe, he = ke) : 180 <= Q && Q < 240 ? (ce = 0, de = ke, he = fe) : 240 <= Q && Q < 300 ? (ce = ke, de = 0, he = fe) : 300 <= Q && Q < 360 && (ce = fe, de = 0, he = ke), ce = Math.round((ce + cs) * 255), de = Math.round((de + cs) * 255), he = Math.round((he + cs) * 255);
1951
- const ds = (qa) => {
1952
- const hs = qa.toString(16);
1953
- return hs.length == 1 ? "0" + hs : hs;
1971
+ function Ye(p) {
1972
+ const [g, qe, ye] = p.split(" "), Y = parseFloat(g), Da = parseFloat(qe), Ia = parseFloat(ye), Va = Da / 100, qs = Ia / 100, ge = (1 - Math.abs(2 * qs - 1)) * Va, ke = ge * (1 - Math.abs(Y / 60 % 2 - 1)), ds = qs - ge / 2;
1973
+ let de = 0, he = 0, me = 0;
1974
+ 0 <= Y && Y < 60 ? (de = ge, he = ke, me = 0) : 60 <= Y && Y < 120 ? (de = ke, he = ge, me = 0) : 120 <= Y && Y < 180 ? (de = 0, he = ge, me = ke) : 180 <= Y && Y < 240 ? (de = 0, he = ke, me = ge) : 240 <= Y && Y < 300 ? (de = ke, he = 0, me = ge) : 300 <= Y && Y < 360 && (de = ge, he = 0, me = ke), de = Math.round((de + ds) * 255), he = Math.round((he + ds) * 255), me = Math.round((me + ds) * 255);
1975
+ const hs = (qa) => {
1976
+ const ms = qa.toString(16);
1977
+ return ms.length == 1 ? "0" + ms : ms;
1954
1978
  };
1955
- return `#${ds(ce)}${ds(de)}${ds(he)}`;
1979
+ return `#${hs(de)}${hs(he)}${hs(me)}`;
1956
1980
  }
1957
1981
  G(() => {
1958
1982
  const p = n.current, g = a.current;
1959
1983
  if (p) {
1960
- const qe = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", be = z === "system" ? qe : z;
1984
+ const qe = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", ye = z === "system" ? qe : z;
1961
1985
  p.editor.defineTheme("default", {
1962
1986
  // base: theme === 'light' ? 'hc-light' : 'vs-dark',
1963
- base: be === "light" ? "vs" : "vs-dark",
1987
+ base: ye === "light" ? "vs" : "vs-dark",
1964
1988
  inherit: !0,
1965
1989
  rules: [],
1966
1990
  colors: {
1967
1991
  // 'editor.background': activeTheme === 'light' ? '#ffffff' : '#020817',
1968
- "editor.background": be === "light" ? "#ffffff" : os("--semaphor-background")
1992
+ "editor.background": ye === "light" ? "#ffffff" : cs("--semaphor-background")
1969
1993
  }
1970
1994
  }), p.editor.setTheme("default");
1971
1995
  }
@@ -1980,7 +2004,7 @@ function Hn() {
1980
2004
  function Ve(p) {
1981
2005
  n.current = p;
1982
2006
  }
1983
- function We() {
2007
+ function Xe() {
1984
2008
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
1985
2009
  h && /* @__PURE__ */ e.jsx(
1986
2010
  "div",
@@ -1993,27 +2017,27 @@ function Hn() {
1993
2017
  On,
1994
2018
  {
1995
2019
  checked: I,
1996
- onCheckedChange: () => B(!I),
2020
+ onCheckedChange: () => $(!I),
1997
2021
  text: "Apply Filters"
1998
2022
  }
1999
2023
  ),
2000
2024
  /* @__PURE__ */ e.jsx(Mn, {}),
2001
2025
  P && h && /* @__PURE__ */ e.jsx(
2002
- _e,
2026
+ He,
2003
2027
  {
2004
- onClick: () => d(!1),
2028
+ onClick: () => c(!1),
2005
2029
  className: "bg-background/50 text-foreground/50 hover:cursor-pointer hover:text-foreground"
2006
2030
  }
2007
2031
  )
2008
2032
  ] }),
2009
2033
  /* @__PURE__ */ e.jsx(
2010
- Re,
2034
+ _e,
2011
2035
  {
2012
2036
  theme: "default",
2013
2037
  onChange: (p) => {
2014
2038
  if (p)
2015
2039
  try {
2016
- JSON.parse(p), Z(JSON.parse(p));
2040
+ JSON.parse(p), ee(JSON.parse(p));
2017
2041
  } catch {
2018
2042
  }
2019
2043
  },
@@ -2043,8 +2067,8 @@ function Hn() {
2043
2067
  P && !h && /* @__PURE__ */ e.jsx(
2044
2068
  xa,
2045
2069
  {
2046
- onClick: () => d(!0),
2047
- className: Y(
2070
+ onClick: () => c(!0),
2071
+ className: Z(
2048
2072
  "absolute bottom-4 right-6 h-3 w-3 text-foreground/50 hover:cursor-pointer hover:text-foreground",
2049
2073
  {
2050
2074
  "font-bold text-red-800": I
@@ -2054,9 +2078,9 @@ function Hn() {
2054
2078
  )
2055
2079
  ] });
2056
2080
  }
2057
- function Ye() {
2081
+ function Ze() {
2058
2082
  return /* @__PURE__ */ e.jsxs(
2059
- js,
2083
+ bs,
2060
2084
  {
2061
2085
  className: "flex grow pb-1",
2062
2086
  direction: "vertical",
@@ -2076,12 +2100,12 @@ function Hn() {
2076
2100
  role: "sql-container",
2077
2101
  className: "relative flex w-[99%]",
2078
2102
  children: /* @__PURE__ */ e.jsx(
2079
- Re,
2103
+ _e,
2080
2104
  {
2081
2105
  theme: "default",
2082
2106
  className: "pt-3",
2083
2107
  onChange: (p) => {
2084
- ee(p);
2108
+ se(p);
2085
2109
  },
2086
2110
  value: F,
2087
2111
  options: {
@@ -2099,7 +2123,7 @@ function Hn() {
2099
2123
  defaultLanguage: "sql",
2100
2124
  defaultValue: "SELECT * FROM table",
2101
2125
  beforeMount: Ve,
2102
- onMount: Je
2126
+ onMount: We
2103
2127
  }
2104
2128
  )
2105
2129
  }
@@ -2109,7 +2133,7 @@ function Hn() {
2109
2133
  }
2110
2134
  ),
2111
2135
  t && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2112
- /* @__PURE__ */ e.jsx(bs, { withHandle: !0, className: "border" }),
2136
+ /* @__PURE__ */ e.jsx(ys, { withHandle: !0, className: "border" }),
2113
2137
  /* @__PURE__ */ e.jsxs(
2114
2138
  ze,
2115
2139
  {
@@ -2124,7 +2148,7 @@ function Hn() {
2124
2148
  role: "python-container",
2125
2149
  className: "relative flex w-[99%] pt-0",
2126
2150
  children: /* @__PURE__ */ e.jsx(
2127
- Re,
2151
+ _e,
2128
2152
  {
2129
2153
  className: "pt-3",
2130
2154
  theme: "default",
@@ -2146,7 +2170,7 @@ function Hn() {
2146
2170
  },
2147
2171
  defaultLanguage: "python",
2148
2172
  beforeMount: Ve,
2149
- onMount: Je
2173
+ onMount: We
2150
2174
  }
2151
2175
  )
2152
2176
  }
@@ -2174,8 +2198,8 @@ function Hn() {
2174
2198
  role: "sql-editor",
2175
2199
  className: "relative flex grow justify-between overflow-y-scroll",
2176
2200
  children: [
2177
- Ye(),
2178
- We()
2201
+ Ze(),
2202
+ Xe()
2179
2203
  ]
2180
2204
  }
2181
2205
  ),
@@ -2190,7 +2214,7 @@ function Hn() {
2190
2214
  k,
2191
2215
  {
2192
2216
  title: "Shift + Enter",
2193
- disabled: ne || ie,
2217
+ disabled: re || oe,
2194
2218
  onClick: () => {
2195
2219
  Se();
2196
2220
  },
@@ -2198,12 +2222,12 @@ function Hn() {
2198
2222
  size: "sm",
2199
2223
  variant: "outline",
2200
2224
  children: [
2201
- ne || ie ? /* @__PURE__ */ e.jsx(Be, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(mn, { className: "mr-2 h-4 w-4" }),
2225
+ re || oe ? /* @__PURE__ */ e.jsx($e, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(mn, { className: "mr-2 h-4 w-4" }),
2202
2226
  "Run"
2203
2227
  ]
2204
2228
  }
2205
2229
  ),
2206
- oe && /* @__PURE__ */ e.jsx(
2230
+ ce && /* @__PURE__ */ e.jsx(
2207
2231
  Fn,
2208
2232
  {
2209
2233
  error: Ie.message,
@@ -2215,7 +2239,7 @@ function Hn() {
2215
2239
  /* @__PURE__ */ e.jsxs(
2216
2240
  k,
2217
2241
  {
2218
- onClick: rs,
2242
+ onClick: ls,
2219
2243
  className: "",
2220
2244
  size: "sm",
2221
2245
  variant: "outline",
@@ -2237,7 +2261,7 @@ function Hn() {
2237
2261
  }
2238
2262
  ),
2239
2263
  /* @__PURE__ */ e.jsx(
2240
- Ln,
2264
+ Tn,
2241
2265
  {
2242
2266
  open: r,
2243
2267
  setOpen: o,
@@ -2252,7 +2276,7 @@ function Hn() {
2252
2276
  /* @__PURE__ */ e.jsxs(
2253
2277
  k,
2254
2278
  {
2255
- onClick: ls,
2279
+ onClick: is,
2256
2280
  size: "sm",
2257
2281
  variant: "outline",
2258
2282
  children: [
@@ -2264,12 +2288,12 @@ function Hn() {
2264
2288
  /* @__PURE__ */ e.jsxs(
2265
2289
  k,
2266
2290
  {
2267
- onClick: is,
2291
+ onClick: os,
2268
2292
  className: "w-full",
2269
2293
  size: "sm",
2270
2294
  variant: "outline",
2271
2295
  children: [
2272
- /* @__PURE__ */ e.jsx(_e, { className: "mr-2 size-4" }),
2296
+ /* @__PURE__ */ e.jsx(He, { className: "mr-2 size-4" }),
2273
2297
  "Close"
2274
2298
  ]
2275
2299
  }
@@ -2284,8 +2308,8 @@ function Hn() {
2284
2308
  );
2285
2309
  }
2286
2310
  function Bn({ data: s }) {
2287
- var d;
2288
- const [n, a] = ue.useState([]), l = Object.keys(s[0]).map((r) => ({
2311
+ var c;
2312
+ const [n, a] = xe.useState([]), l = Object.keys(s[0]).map((r) => ({
2289
2313
  // header: key,
2290
2314
  accessorKey: r,
2291
2315
  header: ({ column: o }) => {
@@ -2315,19 +2339,19 @@ function Bn({ data: s }) {
2315
2339
  }
2316
2340
  });
2317
2341
  return /* @__PURE__ */ e.jsxs(dt, { children: [
2318
- /* @__PURE__ */ e.jsx(ht, { children: h.getHeaderGroups().map((r) => /* @__PURE__ */ e.jsx(ms, { children: r.headers.map((o) => /* @__PURE__ */ e.jsx(mt, { className: "sticky top-0 bg-muted", children: o.isPlaceholder ? null : Bs(
2342
+ /* @__PURE__ */ e.jsx(ht, { children: h.getHeaderGroups().map((r) => /* @__PURE__ */ e.jsx(us, { children: r.headers.map((o) => /* @__PURE__ */ e.jsx(mt, { className: "sticky top-0 bg-muted", children: o.isPlaceholder ? null : Bs(
2319
2343
  o.column.columnDef.header,
2320
2344
  o.getContext()
2321
2345
  ) }, o.id)) }, r.id)) }),
2322
- /* @__PURE__ */ e.jsx(ut, { children: (d = h.getRowModel().rows) != null && d.length ? h.getRowModel().rows.map((r) => /* @__PURE__ */ e.jsx(
2323
- ms,
2346
+ /* @__PURE__ */ e.jsx(ut, { children: (c = h.getRowModel().rows) != null && c.length ? h.getRowModel().rows.map((r) => /* @__PURE__ */ e.jsx(
2347
+ us,
2324
2348
  {
2325
2349
  className: "whitespace-nowrap py-2",
2326
2350
  "data-state": r.getIsSelected() && "selected",
2327
2351
  children: r.getVisibleCells().map((o) => /* @__PURE__ */ e.jsx($s, { children: Bs(o.column.columnDef.cell, o.getContext()) }, o.id))
2328
2352
  },
2329
2353
  r.id
2330
- )) : /* @__PURE__ */ e.jsx(ms, { children: /* @__PURE__ */ e.jsx($s, { colSpan: l.length, className: "h-24 text-center", children: "No results." }) }) })
2354
+ )) : /* @__PURE__ */ e.jsx(us, { children: /* @__PURE__ */ e.jsx($s, { colSpan: l.length, className: "h-24 text-center", children: "No results." }) }) })
2331
2355
  ] });
2332
2356
  }
2333
2357
  function Sa({
@@ -2335,8 +2359,8 @@ function Sa({
2335
2359
  className: s,
2336
2360
  ...n
2337
2361
  }) {
2338
- var d;
2339
- ue.useState(0);
2362
+ var c;
2363
+ xe.useState(0);
2340
2364
  const a = w((r) => r.themeStyle), t = i((r) => r.card), l = i((r) => r.actions.setCard);
2341
2365
  if (G(() => {
2342
2366
  }, [
@@ -2359,7 +2383,7 @@ function Sa({
2359
2383
  gt,
2360
2384
  {
2361
2385
  role: "editor-visual-card",
2362
- className: Y("relative flex h-full flex-col rounded-none", s),
2386
+ className: Z("relative flex h-full flex-col rounded-none", s),
2363
2387
  ...n,
2364
2388
  children: [
2365
2389
  /* @__PURE__ */ e.jsxs(jt, { className: "py-4", children: [
@@ -2392,7 +2416,7 @@ function Sa({
2392
2416
  {
2393
2417
  cfg: h
2394
2418
  },
2395
- JSON.stringify(h) + JSON.stringify(t.preferences) + ((d = t == null ? void 0 : t.preferences) == null ? void 0 : d.customVisualCode)
2419
+ JSON.stringify(h) + JSON.stringify(t.preferences) + ((c = t == null ? void 0 : t.preferences) == null ? void 0 : c.customVisualCode)
2396
2420
  ),
2397
2421
  t.type === "table" && t.data && t.data.length > 0 && // All of the below css classes are #IMPORTANT for the table to scroll properly
2398
2422
  /* @__PURE__ */ e.jsx(Ct, { className: "flex min-h-0 flex-1 grow basis-0", children: /* @__PURE__ */ e.jsx(St, { card: t, data: t == null ? void 0 : t.data }) })
@@ -2402,17 +2426,17 @@ function Sa({
2402
2426
  );
2403
2427
  }
2404
2428
  function $n() {
2405
- const [s, n] = T(!1), [a, t] = T(""), [l, h] = T(""), [d, r] = T(""), [o, f] = T(""), m = i((v) => v.card), u = i(
2429
+ const [s, n] = L(!1), [a, t] = L(""), [l, h] = L(""), [c, r] = L(""), [o, f] = L(""), m = i((v) => v.card), u = i(
2406
2430
  (v) => v.card.customCfg
2407
- ), { setCardCustomCfg: S, setCustomVisualCode: c } = kt();
2431
+ ), { setCardCustomCfg: S, setCustomVisualCode: d } = kt();
2408
2432
  function x(v) {
2409
2433
  var F, A;
2410
2434
  const D = {
2411
2435
  ...v,
2412
2436
  data: {
2413
2437
  ...v == null ? void 0 : v.data,
2414
- datasets: (A = (F = v == null ? void 0 : v.data) == null ? void 0 : F.datasets) == null ? void 0 : A.map((q) => ({
2415
- ...q,
2438
+ datasets: (A = (F = v == null ? void 0 : v.data) == null ? void 0 : F.datasets) == null ? void 0 : A.map((V) => ({
2439
+ ...V,
2416
2440
  data: []
2417
2441
  }))
2418
2442
  }
@@ -2432,7 +2456,7 @@ function $n() {
2432
2456
  v && (t(JSON.stringify(v, null, 1)), (D = m == null ? void 0 : m.preferences) != null && D.customVisualCode && r((N = m == null ? void 0 : m.preferences) == null ? void 0 : N.customVisualCode), u && h(JSON.stringify(u, null, 1)));
2433
2457
  }
2434
2458
  function z() {
2435
- if (d && c(d), !!l)
2459
+ if (c && d(c), !!l)
2436
2460
  try {
2437
2461
  const v = JSON.parse(l);
2438
2462
  return v ? (S(v), f(""), h(""), v) : void 0;
@@ -2451,8 +2475,8 @@ function $n() {
2451
2475
  }
2452
2476
  return a ? (v = x(JSON.parse(a)), v) : "";
2453
2477
  }
2454
- return /* @__PURE__ */ e.jsxs(ys, { open: s, onOpenChange: n, children: [
2455
- /* @__PURE__ */ e.jsx(vs, { asChild: !0, children: /* @__PURE__ */ e.jsx(
2478
+ return /* @__PURE__ */ e.jsxs(vs, { open: s, onOpenChange: n, children: [
2479
+ /* @__PURE__ */ e.jsx(Ns, { asChild: !0, children: /* @__PURE__ */ e.jsx(
2456
2480
  k,
2457
2481
  {
2458
2482
  onClick: j,
@@ -2463,14 +2487,14 @@ function $n() {
2463
2487
  }
2464
2488
  ) }),
2465
2489
  /* @__PURE__ */ e.jsxs(
2466
- Ns,
2490
+ Cs,
2467
2491
  {
2468
2492
  className: "max-h-[70vh] min-h-[70vh] overflow-auto sm:min-w-[900px] lg:min-w-[1200px]",
2469
2493
  children: [
2470
- /* @__PURE__ */ e.jsxs(Cs, { className: "", children: [
2494
+ /* @__PURE__ */ e.jsxs(Ss, { className: "", children: [
2471
2495
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
2472
- /* @__PURE__ */ e.jsx(Ss, { children: "Customize Card" }),
2473
- /* @__PURE__ */ e.jsxs(ws, { children: [
2496
+ /* @__PURE__ */ e.jsx(ks, { children: "Customize Card" }),
2497
+ /* @__PURE__ */ e.jsxs(zs, { children: [
2474
2498
  /* @__PURE__ */ e.jsx(sa, { children: /* @__PURE__ */ e.jsx(
2475
2499
  rn,
2476
2500
  {
@@ -2480,10 +2504,10 @@ function $n() {
2480
2504
  className: "size-3 cursor-pointer text-muted-foreground/70 transition-colors hover:text-muted-foreground"
2481
2505
  }
2482
2506
  ) }),
2483
- /* @__PURE__ */ e.jsx(zs, { side: "right", align: "center", children: /* @__PURE__ */ e.jsx("p", { className: "text-xs", children: "Copy Card ID" }) })
2507
+ /* @__PURE__ */ e.jsx(Fs, { side: "right", align: "center", children: /* @__PURE__ */ e.jsx("p", { className: "text-xs", children: "Copy Card ID" }) })
2484
2508
  ] })
2485
2509
  ] }),
2486
- /* @__PURE__ */ e.jsxs(ks, { children: [
2510
+ /* @__PURE__ */ e.jsxs(ws, { children: [
2487
2511
  "See the configuration options and documentation",
2488
2512
  /* @__PURE__ */ e.jsx(
2489
2513
  "a",
@@ -2500,15 +2524,15 @@ function $n() {
2500
2524
  /* @__PURE__ */ e.jsx(Sa, { className: "w-1/2 rounded shadow-none" }),
2501
2525
  /* @__PURE__ */ e.jsxs(zt, { defaultValue: "custom-config", className: "flex w-1/2 flex-col", children: [
2502
2526
  /* @__PURE__ */ e.jsxs(Ft, { className: "justify-start rounded-sm rounded-b-none border border-b-0", children: [
2503
- /* @__PURE__ */ e.jsxs(us, { value: "custom-config", children: [
2527
+ /* @__PURE__ */ e.jsxs(xs, { value: "custom-config", children: [
2504
2528
  u && /* @__PURE__ */ e.jsx(Ot, { className: "mr-1 h-5 w-5 text-green-600" }),
2505
2529
  u ? "Custom Config" : "Default Config"
2506
2530
  ] }),
2507
- /* @__PURE__ */ e.jsx(us, { className: "", value: "output", children: "Output" }),
2508
- /* @__PURE__ */ e.jsx(us, { className: "", value: "custom-code", children: "Custom Code" })
2531
+ /* @__PURE__ */ e.jsx(xs, { className: "", value: "output", children: "Output" }),
2532
+ /* @__PURE__ */ e.jsx(xs, { className: "", value: "custom-code", children: "Custom Code" })
2509
2533
  ] }),
2510
2534
  /* @__PURE__ */ e.jsx(
2511
- xs,
2535
+ ps,
2512
2536
  {
2513
2537
  className: "bg-red-x mt-0 grow rounded-b border border-t-0 p-2",
2514
2538
  value: "output",
@@ -2523,12 +2547,12 @@ function $n() {
2523
2547
  }
2524
2548
  ),
2525
2549
  /* @__PURE__ */ e.jsx(
2526
- xs,
2550
+ ps,
2527
2551
  {
2528
2552
  className: "mt-0 grow rounded-b border border-t-0",
2529
2553
  value: "custom-config",
2530
2554
  children: /* @__PURE__ */ e.jsx(
2531
- Re,
2555
+ _e,
2532
2556
  {
2533
2557
  className: "h-full w-full overflow-hidden",
2534
2558
  theme: "default",
@@ -2552,12 +2576,12 @@ function $n() {
2552
2576
  }
2553
2577
  ),
2554
2578
  /* @__PURE__ */ e.jsx(
2555
- xs,
2579
+ ps,
2556
2580
  {
2557
2581
  className: "mt-0 grow rounded-b border border-t-0",
2558
2582
  value: "custom-code",
2559
2583
  children: /* @__PURE__ */ e.jsx(
2560
- Re,
2584
+ _e,
2561
2585
  {
2562
2586
  className: "h-full w-full overflow-hidden",
2563
2587
  theme: "default",
@@ -2574,7 +2598,7 @@ function $n() {
2574
2598
  renderLineHighlight: "none"
2575
2599
  },
2576
2600
  defaultLanguage: "javascript",
2577
- value: d,
2601
+ value: c,
2578
2602
  onChange: (v) => r(v || "")
2579
2603
  }
2580
2604
  )
@@ -2583,7 +2607,7 @@ function $n() {
2583
2607
  ] })
2584
2608
  ] }),
2585
2609
  /* @__PURE__ */ e.jsxs(Zs, { className: "flex items-center", children: [
2586
- /* @__PURE__ */ e.jsx($, { className: "mr-2 text-red-500", children: o }),
2610
+ /* @__PURE__ */ e.jsx(R, { className: "mr-2 text-red-500", children: o }),
2587
2611
  /* @__PURE__ */ e.jsx(
2588
2612
  k,
2589
2613
  {
@@ -2602,39 +2626,39 @@ function $n() {
2602
2626
  ] });
2603
2627
  }
2604
2628
  function ka(s) {
2605
- return xe({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M926.8 397.1l-396-288a31.81 31.81 0 0 0-37.6 0l-396 288a31.99 31.99 0 0 0-11.6 35.8l151.3 466a32 32 0 0 0 30.4 22.1h489.5c13.9 0 26.1-8.9 30.4-22.1l151.3-466c4.2-13.2-.5-27.6-11.7-35.8zM838.6 417l-98.5 32-200-144.7V199.9L838.6 417zM466 567.2l-89.1 122.3-55.2-169.2L466 567.2zm-116.3-96.8L484 373.3v140.8l-134.3-43.7zM512 599.2l93.9 128.9H418.1L512 599.2zm28.1-225.9l134.2 97.1L540.1 514V373.3zM558 567.2l144.3-46.9-55.2 169.2L558 567.2zm-74-367.3v104.4L283.9 449l-98.5-32L484 199.9zM169.3 470.8l86.5 28.1 80.4 246.4-53.8 73.9-113.1-348.4zM327.1 853l50.3-69h269.3l50.3 69H327.1zm414.5-33.8l-53.8-73.9 80.4-246.4 86.5-28.1-113.1 348.4z" }, child: [] }] })(s);
2629
+ return pe({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M926.8 397.1l-396-288a31.81 31.81 0 0 0-37.6 0l-396 288a31.99 31.99 0 0 0-11.6 35.8l151.3 466a32 32 0 0 0 30.4 22.1h489.5c13.9 0 26.1-8.9 30.4-22.1l151.3-466c4.2-13.2-.5-27.6-11.7-35.8zM838.6 417l-98.5 32-200-144.7V199.9L838.6 417zM466 567.2l-89.1 122.3-55.2-169.2L466 567.2zm-116.3-96.8L484 373.3v140.8l-134.3-43.7zM512 599.2l93.9 128.9H418.1L512 599.2zm28.1-225.9l134.2 97.1L540.1 514V373.3zM558 567.2l144.3-46.9-55.2 169.2L558 567.2zm-74-367.3v104.4L283.9 449l-98.5-32L484 199.9zM169.3 470.8l86.5 28.1 80.4 246.4-53.8 73.9-113.1-348.4zM327.1 853l50.3-69h269.3l50.3 69H327.1zm414.5-33.8l-53.8-73.9 80.4-246.4 86.5-28.1-113.1 348.4z" }, child: [] }] })(s);
2606
2630
  }
2607
2631
  function wa(s) {
2608
- return xe({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M137.39,24.06A16,16,0,0,0,120,40V80.67a15.86,15.86,0,0,0,13.25,15.76A32,32,0,1,1,96,129.68c-.41-8.22,1.27-15,5-20.26h0a15.86,15.86,0,0,0-1.69-20.47L71.69,60.68a16,16,0,0,0-23.63,1.1A103.6,103.6,0,0,0,55,202.05,103.24,103.24,0,0,0,128,232h1.49A104.3,104.3,0,0,0,232,129.48C232.75,75.18,191.19,28.88,137.39,24.06ZM60.32,71.94l27.61,28.19,0,.06A43.29,43.29,0,0,0,80.44,120H40.36A87.13,87.13,0,0,1,60.32,71.94ZM40.37,136h40.3A48,48,0,0,0,120,175.34v40.3A88,88,0,0,1,40.37,136Zm149.77,54.14A87.45,87.45,0,0,1,136,215.61V175.34a47.55,47.55,0,0,0,24.73-12.23A48,48,0,0,0,136,80.66L136,40c45.52,4.08,80.67,43.28,80,89.25A87.45,87.45,0,0,1,190.14,190.14Z" }, child: [] }] })(s);
2632
+ return pe({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M137.39,24.06A16,16,0,0,0,120,40V80.67a15.86,15.86,0,0,0,13.25,15.76A32,32,0,1,1,96,129.68c-.41-8.22,1.27-15,5-20.26h0a15.86,15.86,0,0,0-1.69-20.47L71.69,60.68a16,16,0,0,0-23.63,1.1A103.6,103.6,0,0,0,55,202.05,103.24,103.24,0,0,0,128,232h1.49A104.3,104.3,0,0,0,232,129.48C232.75,75.18,191.19,28.88,137.39,24.06ZM60.32,71.94l27.61,28.19,0,.06A43.29,43.29,0,0,0,80.44,120H40.36A87.13,87.13,0,0,1,60.32,71.94ZM40.37,136h40.3A48,48,0,0,0,120,175.34v40.3A88,88,0,0,1,40.37,136Zm149.77,54.14A87.45,87.45,0,0,1,136,215.61V175.34a47.55,47.55,0,0,0,24.73-12.23A48,48,0,0,0,136,80.66L136,40c45.52,4.08,80.67,43.28,80,89.25A87.45,87.45,0,0,1,190.14,190.14Z" }, child: [] }] })(s);
2609
2633
  }
2610
2634
  function za(s) {
2611
- return xe({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm87.63,96H191.48A64.1,64.1,0,0,0,136,64.52V40.37A88.13,88.13,0,0,1,215.63,120ZM120,120H80.68A48.09,48.09,0,0,1,120,80.68Zm0,16v39.32A48.09,48.09,0,0,1,80.68,136Zm16,0h39.32A48.09,48.09,0,0,1,136,175.32Zm0-16V80.68A48.09,48.09,0,0,1,175.32,120ZM120,40.37V64.52A64.1,64.1,0,0,0,64.52,120H40.37A88.13,88.13,0,0,1,120,40.37ZM40.37,136H64.52A64.1,64.1,0,0,0,120,191.48v24.15A88.13,88.13,0,0,1,40.37,136ZM136,215.63V191.48A64.1,64.1,0,0,0,191.48,136h24.15A88.13,88.13,0,0,1,136,215.63Z" }, child: [] }] })(s);
2635
+ return pe({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm87.63,96H191.48A64.1,64.1,0,0,0,136,64.52V40.37A88.13,88.13,0,0,1,215.63,120ZM120,120H80.68A48.09,48.09,0,0,1,120,80.68Zm0,16v39.32A48.09,48.09,0,0,1,80.68,136Zm16,0h39.32A48.09,48.09,0,0,1,136,175.32Zm0-16V80.68A48.09,48.09,0,0,1,175.32,120ZM120,40.37V64.52A64.1,64.1,0,0,0,64.52,120H40.37A88.13,88.13,0,0,1,120,40.37ZM40.37,136H64.52A64.1,64.1,0,0,0,120,191.48v24.15A88.13,88.13,0,0,1,40.37,136ZM136,215.63V191.48A64.1,64.1,0,0,0,191.48,136h24.15A88.13,88.13,0,0,1,136,215.63Z" }, child: [] }] })(s);
2612
2636
  }
2613
2637
  function Fa(s) {
2614
- return xe({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, child: [] }, { tag: "path", attr: { d: "M6 16m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" }, child: [] }, { tag: "path", attr: { d: "M16 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }, child: [] }, { tag: "path", attr: { d: "M14.5 7.5m-4.5 0a4.5 4.5 0 1 0 9 0a4.5 4.5 0 1 0 -9 0" }, child: [] }] })(s);
2638
+ return pe({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, child: [] }, { tag: "path", attr: { d: "M6 16m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" }, child: [] }, { tag: "path", attr: { d: "M16 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }, child: [] }, { tag: "path", attr: { d: "M14.5 7.5m-4.5 0a4.5 4.5 0 1 0 9 0a4.5 4.5 0 1 0 -9 0" }, child: [] }] })(s);
2615
2639
  }
2616
2640
  function Oa(s) {
2617
- return xe({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "m2 19.99 7.5-7.51 4 4 7.09-7.97L22 9.92l-8.5 9.56-4-4-6 6.01-1.5-1.5zm1.5-4.5 6-6.01 4 4L22 3.92l-1.41-1.41-7.09 7.97-4-4L2 13.99l1.5 1.5z" }, child: [] }] })(s);
2641
+ return pe({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "m2 19.99 7.5-7.51 4 4 7.09-7.97L22 9.92l-8.5 9.56-4-4-6 6.01-1.5-1.5zm1.5-4.5 6-6.01 4 4L22 3.92l-1.41-1.41-7.09 7.97-4-4L2 13.99l1.5 1.5z" }, child: [] }] })(s);
2618
2642
  }
2619
2643
  function Ma(s) {
2620
- return xe({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M4 9h4v11H4zM4 4h4v4H4zM10 7h4v4h-4zM16 10h4v4h-4zM16 15h4v5h-4zM10 12h4v8h-4z" }, child: [] }] })(s);
2621
- }
2622
- function Ta(s) {
2623
- return xe({ tag: "svg", attr: { version: "1.2", baseProfile: "tiny", viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 18c-.552 0-1-.448-1-1v-6.382l-.553.276c-.495.248-1.095.046-1.342-.447-.247-.494-.046-1.094.448-1.342l2-1c.31-.155.678-.139.973.044.294.183.474.504.474.851v8c0 .552-.448 1-1 1zM13 18h-5c-.404 0-.769-.244-.924-.617-.155-.374-.069-.804.217-1.09l4-4c.254-.254.394-.591.394-.95 0-.358-.14-.695-.394-.949-.508-.508-1.39-.508-1.9.001-.253.252-.393.589-.393.948 0 .552-.448 1-1 1s-1-.448-1-1c0-.894.348-1.733.98-2.364 1.265-1.263 3.464-1.263 4.727.001.632.631.979 1.471.979 2.363 0 .893-.348 1.733-.979 2.364l-2.293 2.293h2.586c.552 0 1 .448 1 1s-.448 1-1 1zM20.955 12.377c.338-.457.545-1.016.545-1.627 0-1.517-1.234-2.75-2.75-2.75-1.031 0-1.966.569-2.44 1.484-.254.49-.063 1.094.428 1.348.49.254 1.094.062 1.348-.428.128-.249.383-.404.664-.404.414 0 .75.336.75.75s-.336.75-.75.75c-.552 0-1 .448-1 1s.448 1 1 1c.689 0 1.25.561 1.25 1.25s-.561 1.25-1.25 1.25-1.25-.561-1.25-1.25c0-.552-.448-1-1-1s-1 .448-1 1c0 1.792 1.458 3.25 3.25 3.25s3.25-1.458 3.25-3.25c0-.939-.406-1.779-1.045-2.373z" }, child: [] }] })(s);
2644
+ return pe({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M4 9h4v11H4zM4 4h4v4H4zM10 7h4v4h-4zM16 10h4v4h-4zM16 15h4v5h-4zM10 12h4v8h-4z" }, child: [] }] })(s);
2624
2645
  }
2625
2646
  function La(s) {
2626
- return xe({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M217 25v14h78V25h-78zm0 32v46h14V71h50v32h14V57h-78zm32 32v14h14V89h-14zm-64 32v46h30v-46h-30zm48 0v14h46v-14h-46zm64 0v46h30v-46h-30zm-64 32v14h46v-14h-46zm-80 32v46h62v-46h-62zm80 0v14h46v-14h-46zm64 0v46h62v-46h-62zm-64 32v14h46v-14h-46zm-112 32v46h94v-46h-94zm112 0v14h46v-14h-46zm64 0v46h94v-46h-94zm-64 32v14h46v-14h-46zM89 313v46h126v-46H89zm144 0v14h46v-14h-46zm64 0v46h126v-46H297zm-64 32v14h46v-14h-46zM57 377v46h158v-46H57zm176 0v14h46v-14h-46zm64 0v46h158v-46H297zm-64 32v14h46v-14h-46zM25 441v46h190v-46H25zm208 0v14h46v-14h-46zm64 0v46h190v-46H297zm-64 32v14h46v-14h-46z" }, child: [] }] })(s);
2647
+ return pe({ tag: "svg", attr: { version: "1.2", baseProfile: "tiny", viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 18c-.552 0-1-.448-1-1v-6.382l-.553.276c-.495.248-1.095.046-1.342-.447-.247-.494-.046-1.094.448-1.342l2-1c.31-.155.678-.139.973.044.294.183.474.504.474.851v8c0 .552-.448 1-1 1zM13 18h-5c-.404 0-.769-.244-.924-.617-.155-.374-.069-.804.217-1.09l4-4c.254-.254.394-.591.394-.95 0-.358-.14-.695-.394-.949-.508-.508-1.39-.508-1.9.001-.253.252-.393.589-.393.948 0 .552-.448 1-1 1s-1-.448-1-1c0-.894.348-1.733.98-2.364 1.265-1.263 3.464-1.263 4.727.001.632.631.979 1.471.979 2.363 0 .893-.348 1.733-.979 2.364l-2.293 2.293h2.586c.552 0 1 .448 1 1s-.448 1-1 1zM20.955 12.377c.338-.457.545-1.016.545-1.627 0-1.517-1.234-2.75-2.75-2.75-1.031 0-1.966.569-2.44 1.484-.254.49-.063 1.094.428 1.348.49.254 1.094.062 1.348-.428.128-.249.383-.404.664-.404.414 0 .75.336.75.75s-.336.75-.75.75c-.552 0-1 .448-1 1s.448 1 1 1c.689 0 1.25.561 1.25 1.25s-.561 1.25-1.25 1.25-1.25-.561-1.25-1.25c0-.552-.448-1-1-1s-1 .448-1 1c0 1.792 1.458 3.25 3.25 3.25s3.25-1.458 3.25-3.25c0-.939-.406-1.779-1.045-2.373z" }, child: [] }] })(s);
2648
+ }
2649
+ function Ta(s) {
2650
+ return pe({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M217 25v14h78V25h-78zm0 32v46h14V71h50v32h14V57h-78zm32 32v14h14V89h-14zm-64 32v46h30v-46h-30zm48 0v14h46v-14h-46zm64 0v46h30v-46h-30zm-64 32v14h46v-14h-46zm-80 32v46h62v-46h-62zm80 0v14h46v-14h-46zm64 0v46h62v-46h-62zm-64 32v14h46v-14h-46zm-112 32v46h94v-46h-94zm112 0v14h46v-14h-46zm64 0v46h94v-46h-94zm-64 32v14h46v-14h-46zM89 313v46h126v-46H89zm144 0v14h46v-14h-46zm64 0v46h126v-46H297zm-64 32v14h46v-14h-46zM57 377v46h158v-46H57zm176 0v14h46v-14h-46zm64 0v46h158v-46H297zm-64 32v14h46v-14h-46zM25 441v46h190v-46H25zm208 0v14h46v-14h-46zm64 0v46h190v-46H297zm-64 32v14h46v-14h-46z" }, child: [] }] })(s);
2627
2651
  }
2628
2652
  function Pn() {
2629
- const [s, n] = T(!1), a = i((o) => o.card.type), { setCardType: t, setCardPreferences: l, setChartOrientation: h } = i((o) => o.actions), d = i(
2653
+ const [s, n] = L(!1), a = i((o) => o.card.type), { setCardType: t, setCardPreferences: l, setChartOrientation: h } = i((o) => o.actions), c = i(
2630
2654
  (o) => o.actions.setCardCustomCfg
2631
2655
  );
2632
2656
  function r(o) {
2633
- d(null), l({}), t(o), n(!1);
2657
+ c(null), l({}), t(o), n(!1);
2634
2658
  }
2635
- return /* @__PURE__ */ e.jsxs(Ke, { open: s, onOpenChange: n, children: [
2636
- /* @__PURE__ */ e.jsx(Ue, { asChild: !0, children: /* @__PURE__ */ e.jsx(k, { size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(Kn, { className: "h-4 w-4", chartType: a }) }) }),
2637
- /* @__PURE__ */ e.jsx(Ge, { className: "w-50", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 place-items-center", children: [
2659
+ return /* @__PURE__ */ e.jsxs(Ge, { open: s, onOpenChange: n, children: [
2660
+ /* @__PURE__ */ e.jsx(Je, { asChild: !0, children: /* @__PURE__ */ e.jsx(k, { size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(Kn, { className: "h-4 w-4", chartType: a }) }) }),
2661
+ /* @__PURE__ */ e.jsx(Qe, { className: "w-50", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 place-items-center", children: [
2638
2662
  /* @__PURE__ */ e.jsx(
2639
2663
  k,
2640
2664
  {
@@ -2727,7 +2751,7 @@ function Pn() {
2727
2751
  {
2728
2752
  onClick: () => r("pyramid"),
2729
2753
  variant: "ghost",
2730
- children: /* @__PURE__ */ e.jsx(La, { className: "size-5" })
2754
+ children: /* @__PURE__ */ e.jsx(Ta, { className: "size-5" })
2731
2755
  }
2732
2756
  ),
2733
2757
  /* @__PURE__ */ e.jsx(
@@ -2743,7 +2767,7 @@ function Pn() {
2743
2767
  {
2744
2768
  onClick: () => r("table"),
2745
2769
  variant: "ghost",
2746
- children: /* @__PURE__ */ e.jsx(Fs, { className: "size-5" })
2770
+ children: /* @__PURE__ */ e.jsx(Os, { className: "size-5" })
2747
2771
  }
2748
2772
  ),
2749
2773
  /* @__PURE__ */ e.jsx(
@@ -2751,7 +2775,7 @@ function Pn() {
2751
2775
  {
2752
2776
  onClick: () => r("kpi"),
2753
2777
  variant: "ghost",
2754
- children: /* @__PURE__ */ e.jsx(Ta, { className: "size-6" })
2778
+ children: /* @__PURE__ */ e.jsx(La, { className: "size-6" })
2755
2779
  }
2756
2780
  ),
2757
2781
  /* @__PURE__ */ e.jsx(
@@ -2788,15 +2812,15 @@ function Kn({ chartType: s, className: n }) {
2788
2812
  case "polarArea":
2789
2813
  return /* @__PURE__ */ e.jsx(za, { className: n });
2790
2814
  case "pyramid":
2791
- return /* @__PURE__ */ e.jsx(La, { className: n });
2815
+ return /* @__PURE__ */ e.jsx(Ta, { className: n });
2792
2816
  case "range":
2793
2817
  return /* @__PURE__ */ e.jsx(pa, { className: n });
2794
2818
  case "kpi":
2795
- return /* @__PURE__ */ e.jsx(Ta, { className: n });
2819
+ return /* @__PURE__ */ e.jsx(La, { className: n });
2796
2820
  case "text":
2797
2821
  return /* @__PURE__ */ e.jsx(Ds, { className: n });
2798
2822
  default:
2799
- return /* @__PURE__ */ e.jsx(Fs, { className: n });
2823
+ return /* @__PURE__ */ e.jsx(Os, { className: n });
2800
2824
  }
2801
2825
  }
2802
2826
  function Un() {
@@ -2805,12 +2829,12 @@ function Un() {
2805
2829
  ), n = i(
2806
2830
  (a) => a.actions.setCardRefreshInterval
2807
2831
  );
2808
- return /* @__PURE__ */ e.jsxs(Ke, { children: [
2809
- /* @__PURE__ */ e.jsx(Ue, { asChild: !0, children: /* @__PURE__ */ e.jsx(k, { size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(Wt, { className: "w-4 h-4" }) }) }),
2810
- /* @__PURE__ */ e.jsx(Ge, { className: "w-[200px]", children: /* @__PURE__ */ e.jsx("div", { className: "grid gap-4", children: /* @__PURE__ */ e.jsx("div", { className: "grid gap-2", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-5 items-center gap-1", children: [
2811
- /* @__PURE__ */ e.jsx($, { className: "col-span-3", htmlFor: "width", children: "Refresh Every" }),
2832
+ return /* @__PURE__ */ e.jsxs(Ge, { children: [
2833
+ /* @__PURE__ */ e.jsx(Je, { asChild: !0, children: /* @__PURE__ */ e.jsx(k, { size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(Wt, { className: "w-4 h-4" }) }) }),
2834
+ /* @__PURE__ */ e.jsx(Qe, { className: "w-[200px]", children: /* @__PURE__ */ e.jsx("div", { className: "grid gap-4", children: /* @__PURE__ */ e.jsx("div", { className: "grid gap-2", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-5 items-center gap-1", children: [
2835
+ /* @__PURE__ */ e.jsx(R, { className: "col-span-3", htmlFor: "width", children: "Refresh Every" }),
2812
2836
  /* @__PURE__ */ e.jsx(
2813
- re,
2837
+ le,
2814
2838
  {
2815
2839
  value: s || "",
2816
2840
  onChange: (a) => n(a.target.value),
@@ -2827,11 +2851,11 @@ function Ws() {
2827
2851
  const s = i((r) => r.card), n = i((r) => r.card.data), a = i((r) => r.isShowingVisual), t = i((r) => r.isSqlRunning), l = i((r) => r.queryError), h = i((r) => r.pythonStdOut);
2828
2852
  if (i((r) => r.onSave), i((r) => r.onClose), i((r) => r.actions.setCardSql), i((r) => r.actions.setCardType), i((r) => r.actions.setSqlGen), !s)
2829
2853
  return /* @__PURE__ */ e.jsx(e.Fragment, { children: "No Active Card" });
2830
- function d() {
2831
- return s.type === "kpi" ? /* @__PURE__ */ e.jsx("div", { className: "flex grow items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(Mt, { isLoading: t, card: s }) }) }) : s.type === "text" ? /* @__PURE__ */ e.jsx("div", { className: "flex grow items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(Tt, { isLoading: t, card: s }) }) }) : /* @__PURE__ */ e.jsx(Sa, { className: "grow border-none shadow-none" });
2854
+ function c() {
2855
+ return s.type === "kpi" ? /* @__PURE__ */ e.jsx("div", { className: "flex grow items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(Mt, { isLoading: t, card: s }) }) }) : s.type === "text" ? /* @__PURE__ */ e.jsx("div", { className: "flex grow items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(Lt, { isLoading: t, card: s }) }) }) : /* @__PURE__ */ e.jsx(Sa, { className: "grow border-none shadow-none" });
2832
2856
  }
2833
2857
  return /* @__PURE__ */ e.jsxs("div", { className: "relative flex h-full flex-col pt-3", children: [
2834
- t && /* @__PURE__ */ e.jsx(Be, { className: "absolute bottom-0 left-0 right-0 top-0 z-10 m-auto h-10 w-10 animate-spin text-foreground/10" }),
2858
+ t && /* @__PURE__ */ e.jsx($e, { className: "absolute bottom-0 left-0 right-0 top-0 z-10 m-auto h-10 w-10 animate-spin text-foreground/10" }),
2835
2859
  /* @__PURE__ */ e.jsxs("div", { className: "mb-0 flex min-h-10 items-center justify-end gap-2 px-6", children: [
2836
2860
  a && /* @__PURE__ */ e.jsxs("div", { className: "flex grow items-center gap-2", children: [
2837
2861
  /* @__PURE__ */ e.jsx(Pn, {}),
@@ -2840,7 +2864,7 @@ function Ws() {
2840
2864
  ] }),
2841
2865
  /* @__PURE__ */ e.jsx(Jn, {})
2842
2866
  ] }),
2843
- a ? d() : (
2867
+ a ? c() : (
2844
2868
  // card.type === 'kpi' ? (
2845
2869
  // <div className="flex grow items-center justify-center">
2846
2870
  // <div className="w-1/2 rounded-md border">
@@ -2872,7 +2896,7 @@ function Gn() {
2872
2896
  className: "bg-muted p-2 font-mono text-sm"
2873
2897
  }
2874
2898
  ),
2875
- /* @__PURE__ */ e.jsx(Ms, { className: "mb-2" })
2899
+ /* @__PURE__ */ e.jsx(Pe, { className: "mb-2" })
2876
2900
  ] });
2877
2901
  }
2878
2902
  function Jn() {
@@ -2880,9 +2904,9 @@ function Jn() {
2880
2904
  (a) => a.actions.setIsShowingVisual
2881
2905
  );
2882
2906
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
2883
- /* @__PURE__ */ e.jsx($, { htmlFor: "visualize", children: "Chart" }),
2907
+ /* @__PURE__ */ e.jsx(R, { htmlFor: "visualize", children: "Chart" }),
2884
2908
  /* @__PURE__ */ e.jsx(
2885
- Lt,
2909
+ Tt,
2886
2910
  {
2887
2911
  checked: s,
2888
2912
  onCheckedChange: () => n(!s),
@@ -2893,11 +2917,11 @@ function Jn() {
2893
2917
  ] });
2894
2918
  }
2895
2919
  function De() {
2896
- const [s, n] = T([]);
2920
+ const [s, n] = L([]);
2897
2921
  i(
2898
2922
  (m) => m.card.cfg
2899
2923
  );
2900
- const a = i((m) => m.card.preferences), { setCardCfg: t, setFilterOnClickColumnIndex: l, setCardPreferences: h } = i((m) => m.actions), d = i(
2924
+ const a = i((m) => m.card.preferences), { setCardCfg: t, setFilterOnClickColumnIndex: l, setCardPreferences: h } = i((m) => m.actions), c = i(
2901
2925
  (m) => m.queryResultColumns
2902
2926
  );
2903
2927
  i(
@@ -2906,10 +2930,10 @@ function De() {
2906
2930
  return (u = m.card.preferences) == null ? void 0 : u.filterOnClickColumnIndex;
2907
2931
  }
2908
2932
  ), G(() => {
2909
- d && n(new Array(d.length).fill(!1));
2910
- }, [d]);
2933
+ c && n(new Array(c.length).fill(!1));
2934
+ }, [c]);
2911
2935
  function r(m, u) {
2912
- var S, c;
2936
+ var S, d;
2913
2937
  u ? a != null && a.onClickFilter && ((S = a == null ? void 0 : a.onClickFilter) == null ? void 0 : S.length) > 0 ? h({
2914
2938
  ...a,
2915
2939
  onClickFilter: [
@@ -2929,7 +2953,7 @@ function De() {
2929
2953
  ]
2930
2954
  }) : (h({
2931
2955
  ...a,
2932
- onClickFilter: (c = a == null ? void 0 : a.onClickFilter) == null ? void 0 : c.filter(
2956
+ onClickFilter: (d = a == null ? void 0 : a.onClickFilter) == null ? void 0 : d.filter(
2933
2957
  (x) => x.columnIndex !== m
2934
2958
  )
2935
2959
  }), n((x) => {
@@ -2938,8 +2962,8 @@ function De() {
2938
2962
  }));
2939
2963
  }
2940
2964
  function o(m, u) {
2941
- var c;
2942
- const S = (c = a == null ? void 0 : a.onClickFilter) == null ? void 0 : c.map((x) => x.columnIndex === m ? {
2965
+ var d;
2966
+ const S = (d = a == null ? void 0 : a.onClickFilter) == null ? void 0 : d.map((x) => x.columnIndex === m ? {
2943
2967
  ...x,
2944
2968
  expression: u.target.value
2945
2969
  } : x);
@@ -2949,12 +2973,12 @@ function De() {
2949
2973
  });
2950
2974
  }
2951
2975
  function f(m) {
2952
- var u, S, c, x;
2976
+ var u, S, d, x;
2953
2977
  if (s != null && s[m] || (S = (u = a == null ? void 0 : a.onClickFilter) == null ? void 0 : u.find((j) => j.columnIndex === m)) != null && S.expression)
2954
2978
  return /* @__PURE__ */ e.jsx(
2955
- re,
2979
+ le,
2956
2980
  {
2957
- value: (x = (c = a == null ? void 0 : a.onClickFilter) == null ? void 0 : c.find((j) => j.columnIndex === m)) == null ? void 0 : x.expression,
2981
+ value: (x = (d = a == null ? void 0 : a.onClickFilter) == null ? void 0 : d.find((j) => j.columnIndex === m)) == null ? void 0 : x.expression,
2958
2982
  onChange: (j) => o(m, j),
2959
2983
  type: "text",
2960
2984
  className: " h-9 w-full focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0 font-mono text-xs",
@@ -2962,8 +2986,8 @@ function De() {
2962
2986
  }
2963
2987
  );
2964
2988
  }
2965
- return /* @__PURE__ */ e.jsx(e.Fragment, { children: d == null ? void 0 : d.map((m, u) => {
2966
- var S, c;
2989
+ return /* @__PURE__ */ e.jsx(e.Fragment, { children: c == null ? void 0 : c.map((m, u) => {
2990
+ var S, d;
2967
2991
  return /* @__PURE__ */ e.jsx(
2968
2992
  "div",
2969
2993
  {
@@ -2971,7 +2995,7 @@ function De() {
2971
2995
  children: /* @__PURE__ */ e.jsxs("div", { className: " grow", children: [
2972
2996
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center py-2 space-x-2", children: [
2973
2997
  /* @__PURE__ */ e.jsx(
2974
- Pe,
2998
+ Ue,
2975
2999
  {
2976
3000
  checked: !!((S = a == null ? void 0 : a.onClickFilter) != null && S.find(
2977
3001
  (x) => x.columnIndex === u
@@ -2986,7 +3010,7 @@ function De() {
2986
3010
  children: m
2987
3011
  }
2988
3012
  ),
2989
- /* @__PURE__ */ e.jsx("div", { className: "flex gap-2 items-center ", children: ((c = a == null ? void 0 : a.onClickFilter) == null ? void 0 : c.find(
3013
+ /* @__PURE__ */ e.jsx("div", { className: "flex gap-2 items-center ", children: ((d = a == null ? void 0 : a.onClickFilter) == null ? void 0 : d.find(
2990
3014
  (x) => x.columnIndex === u
2991
3015
  )) && /* @__PURE__ */ e.jsx(
2992
3016
  fa,
@@ -3008,17 +3032,17 @@ function De() {
3008
3032
  );
3009
3033
  }) });
3010
3034
  }
3011
- function ns() {
3012
- var d, r, o;
3035
+ function rs() {
3036
+ var c, r, o;
3013
3037
  const s = i((f) => f.card.preferences), n = i(
3014
3038
  (f) => f.card.cfg
3015
3039
  ), { setCardCfg: a, setCardPreferences: t, setChartOrientation: l } = i((f) => f.actions);
3016
- (d = n == null ? void 0 : n.options) != null && d.indexAxis;
3040
+ (c = n == null ? void 0 : n.options) != null && c.indexAxis;
3017
3041
  function h(f) {
3018
3042
  l(f);
3019
3043
  }
3020
3044
  return /* @__PURE__ */ e.jsxs(
3021
- Ts,
3045
+ Ls,
3022
3046
  {
3023
3047
  value: ((r = s == null ? void 0 : s.chartOptions) == null ? void 0 : r.indexAxis) || ((o = n == null ? void 0 : n.options) == null ? void 0 : o.indexAxis) || "x",
3024
3048
  onValueChange: h,
@@ -3044,32 +3068,32 @@ function Ys(s, n) {
3044
3068
  return ((h = (l = (t = s == null ? void 0 : s.chartOptions) == null ? void 0 : t.scales) == null ? void 0 : l[a]) == null ? void 0 : h.type) || "linear";
3045
3069
  }
3046
3070
  function Aa() {
3047
- var X, Z, ee, K, se, b;
3048
- const [s, n] = T(!1), a = i((y) => {
3071
+ var Q, ee, se, K, ae, b;
3072
+ const [s, n] = L(!1), a = i((y) => {
3049
3073
  var O;
3050
3074
  return (O = y.card) == null ? void 0 : O.preferences;
3051
3075
  }), t = i((y) => {
3052
3076
  var O;
3053
3077
  return (O = y.card) == null ? void 0 : O.cfg;
3054
- }), l = ua(a, t), [h, d] = T(
3078
+ }), l = ua(a, t), [h, c] = L(
3055
3079
  Ys(a)
3056
- ), [r, o] = T(
3057
- ((ee = (Z = (X = a == null ? void 0 : a.chartOptions) == null ? void 0 : X.scales) == null ? void 0 : Z[l]) == null ? void 0 : ee.min) || ""
3058
- ), [f, m] = T(
3059
- ((b = (se = (K = a == null ? void 0 : a.chartOptions) == null ? void 0 : K.scales) == null ? void 0 : se[l]) == null ? void 0 : b.max) || ""
3060
- ), [u, S] = T(r || f ? "custom" : "auto"), [c, x] = T(""), [j, z] = T(0), [C, E] = T(""), [v, D] = T(""), [N, F] = T(""), A = i(
3080
+ ), [r, o] = L(
3081
+ ((se = (ee = (Q = a == null ? void 0 : a.chartOptions) == null ? void 0 : Q.scales) == null ? void 0 : ee[l]) == null ? void 0 : se.min) || ""
3082
+ ), [f, m] = L(
3083
+ ((b = (ae = (K = a == null ? void 0 : a.chartOptions) == null ? void 0 : K.scales) == null ? void 0 : ae[l]) == null ? void 0 : b.max) || ""
3084
+ ), [u, S] = L(r || f ? "custom" : "auto"), [d, x] = L(""), [j, z] = L(0), [C, E] = L(""), [v, D] = L(""), [N, F] = L(""), A = i(
3061
3085
  (y) => y.actions.setCardPreferences
3062
- ), q = i((y) => {
3086
+ ), V = i((y) => {
3063
3087
  var O;
3064
3088
  return (O = y.card) == null ? void 0 : O.type;
3065
- }), M = ["pie", "doughnut", "polarArea"].includes(q);
3089
+ }), M = ["pie", "doughnut", "polarArea"].includes(V);
3066
3090
  G(() => {
3067
- var y, O, B, V, te, Ne, Ce, ae, pe, J, ne, ie, je, oe;
3068
- d(Ys(a)), o(
3069
- ((B = (O = (y = a == null ? void 0 : a.chartOptions) == null ? void 0 : y.scales) == null ? void 0 : O[l]) == null ? void 0 : B.min) === 0 ? 0 : ""
3070
- ), m(((Ne = (te = (V = a == null ? void 0 : a.chartOptions) == null ? void 0 : V.scales) == null ? void 0 : te[l]) == null ? void 0 : Ne.max) || ""), x(
3071
- ((J = (pe = (ae = (Ce = a == null ? void 0 : a.chartOptions) == null ? void 0 : Ce.scales) == null ? void 0 : ae[l]) == null ? void 0 : pe.ticks) == null ? void 0 : J.stepSize) || ""
3072
- ), z(((ne = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : ne.decimalPlaces) || 0), E(((ie = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : ie.suffix) || ""), D(((je = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : je.currency) || ""), F(((oe = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : oe.locale) || "");
3091
+ var y, O, $, ne, W, q, Ce, te, fe, J, re, oe, be, ce;
3092
+ c(Ys(a)), o(
3093
+ (($ = (O = (y = a == null ? void 0 : a.chartOptions) == null ? void 0 : y.scales) == null ? void 0 : O[l]) == null ? void 0 : $.min) === 0 ? 0 : ""
3094
+ ), m(((q = (W = (ne = a == null ? void 0 : a.chartOptions) == null ? void 0 : ne.scales) == null ? void 0 : W[l]) == null ? void 0 : q.max) || ""), x(
3095
+ ((J = (fe = (te = (Ce = a == null ? void 0 : a.chartOptions) == null ? void 0 : Ce.scales) == null ? void 0 : te[l]) == null ? void 0 : fe.ticks) == null ? void 0 : J.stepSize) || ""
3096
+ ), z(((re = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : re.decimalPlaces) || 0), E(((oe = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : oe.suffix) || ""), D(((be = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : be.currency) || ""), F(((ce = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : ce.locale) || "");
3073
3097
  }, [s, a, l]);
3074
3098
  function U(y, O) {
3075
3099
  return O === "" || /^[0-9\b]+$/.test(O) ? Number(O) : Number(y);
@@ -3078,7 +3102,7 @@ function Aa() {
3078
3102
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3079
3103
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-6 items-center gap-2", children: [
3080
3104
  /* @__PURE__ */ e.jsx(
3081
- $,
3105
+ R,
3082
3106
  {
3083
3107
  className: "col-span-2 hover:cursor-pointer hover:underline",
3084
3108
  htmlFor: "currency",
@@ -3093,7 +3117,7 @@ function Aa() {
3093
3117
  }
3094
3118
  ),
3095
3119
  /* @__PURE__ */ e.jsx(
3096
- re,
3120
+ le,
3097
3121
  {
3098
3122
  value: v,
3099
3123
  placeholder: "USD",
@@ -3103,7 +3127,7 @@ function Aa() {
3103
3127
  }
3104
3128
  ),
3105
3129
  /* @__PURE__ */ e.jsx(
3106
- re,
3130
+ le,
3107
3131
  {
3108
3132
  value: N,
3109
3133
  placeholder: "en-US",
@@ -3114,9 +3138,9 @@ function Aa() {
3114
3138
  )
3115
3139
  ] }),
3116
3140
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-9 items-center gap-2", children: [
3117
- /* @__PURE__ */ e.jsx($, { className: "col-span-3", htmlFor: "format", children: "Decimals" }),
3141
+ /* @__PURE__ */ e.jsx(R, { className: "col-span-3", htmlFor: "format", children: "Decimals" }),
3118
3142
  /* @__PURE__ */ e.jsx(
3119
- re,
3143
+ le,
3120
3144
  {
3121
3145
  value: j,
3122
3146
  onChange: (y) => z(Number(y.target.value)),
@@ -3130,9 +3154,9 @@ function Aa() {
3130
3154
  function I() {
3131
3155
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3132
3156
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 items-center gap-2", children: [
3133
- /* @__PURE__ */ e.jsx($, { htmlFor: "range", children: "Range" }),
3157
+ /* @__PURE__ */ e.jsx(R, { htmlFor: "range", children: "Range" }),
3134
3158
  /* @__PURE__ */ e.jsx(
3135
- re,
3159
+ le,
3136
3160
  {
3137
3161
  id: "min",
3138
3162
  value: r,
@@ -3141,7 +3165,7 @@ function Aa() {
3141
3165
  }
3142
3166
  ),
3143
3167
  /* @__PURE__ */ e.jsx(
3144
- re,
3168
+ le,
3145
3169
  {
3146
3170
  value: f,
3147
3171
  onChange: (y) => m((O) => U(O, y.target.value)),
@@ -3151,11 +3175,11 @@ function Aa() {
3151
3175
  )
3152
3176
  ] }),
3153
3177
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 items-center gap-2", children: [
3154
- /* @__PURE__ */ e.jsx($, { htmlFor: "step-size", children: "Step Size" }),
3178
+ /* @__PURE__ */ e.jsx(R, { htmlFor: "step-size", children: "Step Size" }),
3155
3179
  /* @__PURE__ */ e.jsx(
3156
- re,
3180
+ le,
3157
3181
  {
3158
- value: c,
3182
+ value: d,
3159
3183
  onChange: (y) => x((O) => U(O, y.target.value)),
3160
3184
  id: "step-size",
3161
3185
  className: `col-span-1 h-8 w-full ${we}`
@@ -3164,14 +3188,14 @@ function Aa() {
3164
3188
  ] })
3165
3189
  ] });
3166
3190
  }
3167
- function le() {
3168
- var B;
3191
+ function ie() {
3192
+ var $;
3169
3193
  let y = {};
3170
3194
  u === "custom" && (y = {
3171
3195
  min: r,
3172
3196
  max: f,
3173
3197
  ticks: {
3174
- stepSize: c
3198
+ stepSize: d
3175
3199
  }
3176
3200
  });
3177
3201
  const O = {
@@ -3179,7 +3203,7 @@ function Aa() {
3179
3203
  chartOptions: {
3180
3204
  ...a == null ? void 0 : a.chartOptions,
3181
3205
  scales: {
3182
- ...(B = a == null ? void 0 : a.chartOptions) == null ? void 0 : B.scales,
3206
+ ...($ = a == null ? void 0 : a.chartOptions) == null ? void 0 : $.scales,
3183
3207
  [l]: {
3184
3208
  // ...cardPreferences?.chartOptions?.scales?.[axis],
3185
3209
  type: h,
@@ -3196,37 +3220,37 @@ function Aa() {
3196
3220
  };
3197
3221
  console.log(O), A(O);
3198
3222
  }
3199
- return /* @__PURE__ */ e.jsxs(Ke, { onOpenChange: (y) => n(y), children: [
3200
- /* @__PURE__ */ e.jsx(Ue, { asChild: !0, children: /* @__PURE__ */ e.jsx(At, { className: "size-4 cursor-pointer text-muted-foreground hover:text-foreground" }) }),
3201
- /* @__PURE__ */ e.jsx(Ge, { align: "center", className: "max-w-65", children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-4", children: [
3223
+ return /* @__PURE__ */ e.jsxs(Ge, { onOpenChange: (y) => n(y), children: [
3224
+ /* @__PURE__ */ e.jsx(Je, { asChild: !0, children: /* @__PURE__ */ e.jsx(At, { className: "size-4 cursor-pointer text-muted-foreground hover:text-foreground" }) }),
3225
+ /* @__PURE__ */ e.jsx(Qe, { align: "center", className: "max-w-65", children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-4", children: [
3202
3226
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
3203
3227
  /* @__PURE__ */ e.jsx("h4", { className: "font-medium leading-none", children: "Scale Options" }),
3204
3228
  /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: "Set the scale for the number axis" })
3205
3229
  ] }),
3206
3230
  /* @__PURE__ */ e.jsxs("div", { className: "grid gap-2", children: [
3207
3231
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 items-center gap-2", children: [
3208
- /* @__PURE__ */ e.jsx($, { htmlFor: "scale", children: "Type" }),
3232
+ /* @__PURE__ */ e.jsx(R, { htmlFor: "scale", children: "Type" }),
3209
3233
  /* @__PURE__ */ e.jsxs(
3210
3234
  Fe,
3211
3235
  {
3212
3236
  disabled: M,
3213
3237
  value: h,
3214
- onValueChange: (y) => d(y),
3238
+ onValueChange: (y) => c(y),
3215
3239
  children: [
3216
3240
  /* @__PURE__ */ e.jsx(Oe, { className: "col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(Me, {}) }),
3217
- /* @__PURE__ */ e.jsx(Te, { id: "type", children: /* @__PURE__ */ e.jsxs(He, { children: [
3241
+ /* @__PURE__ */ e.jsx(Le, { id: "type", children: /* @__PURE__ */ e.jsxs(Be, { children: [
3218
3242
  /* @__PURE__ */ e.jsx(Ae, { children: "Option" }),
3219
- /* @__PURE__ */ e.jsx(W, { value: "linear", children: "Linear" }),
3220
- /* @__PURE__ */ e.jsx(W, { value: "logarithmic", children: "Logarithmic" })
3243
+ /* @__PURE__ */ e.jsx(X, { value: "linear", children: "Linear" }),
3244
+ /* @__PURE__ */ e.jsx(X, { value: "logarithmic", children: "Logarithmic" })
3221
3245
  ] }) })
3222
3246
  ]
3223
3247
  }
3224
3248
  )
3225
3249
  ] }),
3226
3250
  h == "linear" && /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 items-center gap-2 py-1", children: [
3227
- /* @__PURE__ */ e.jsx($, { htmlFor: "scale-option", children: "Setup" }),
3251
+ /* @__PURE__ */ e.jsx(R, { htmlFor: "scale-option", children: "Setup" }),
3228
3252
  /* @__PURE__ */ e.jsxs(
3229
- Ts,
3253
+ Ls,
3230
3254
  {
3231
3255
  disabled: M,
3232
3256
  id: "scale-option",
@@ -3253,7 +3277,7 @@ function Aa() {
3253
3277
  /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-3", children: /* @__PURE__ */ e.jsx(
3254
3278
  k,
3255
3279
  {
3256
- onClick: le,
3280
+ onClick: ie,
3257
3281
  variant: "secondary",
3258
3282
  className: "col-span-1 col-start-3 h-8 w-full",
3259
3283
  children: "Apply"
@@ -3276,7 +3300,7 @@ function Qn({ idx: s }) {
3276
3300
  ), t = i(
3277
3301
  (o) => o.actions.setCardPreferences
3278
3302
  ), l = (r = n == null ? void 0 : n.chartOptions) == null ? void 0 : r.indexAxis, h = a == null ? void 0 : a.find((o) => o.idx === s);
3279
- function d(o, f) {
3303
+ function c(o, f) {
3280
3304
  (o === "end" || o === "start") && It(Vt());
3281
3305
  const m = {
3282
3306
  display: o !== "none",
@@ -3299,7 +3323,7 @@ function Qn({ idx: s }) {
3299
3323
  const u = { ...h };
3300
3324
  u.datalabels = m;
3301
3325
  const S = a == null ? void 0 : a.map(
3302
- (c) => c.idx === f ? u : c
3326
+ (d) => d.idx === f ? u : d
3303
3327
  );
3304
3328
  t({
3305
3329
  ...n,
@@ -3307,13 +3331,13 @@ function Qn({ idx: s }) {
3307
3331
  });
3308
3332
  }
3309
3333
  }
3310
- return /* @__PURE__ */ e.jsxs(Ke, { children: [
3311
- /* @__PURE__ */ e.jsx(Ue, { children: /* @__PURE__ */ e.jsx(jn, { className: "invisible size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible" }) }),
3312
- /* @__PURE__ */ e.jsx(Ge, { className: "w-fit p-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1", children: [
3334
+ return /* @__PURE__ */ e.jsxs(Ge, { children: [
3335
+ /* @__PURE__ */ e.jsx(Je, { children: /* @__PURE__ */ e.jsx(jn, { className: "invisible size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible" }) }),
3336
+ /* @__PURE__ */ e.jsx(Qe, { className: "w-fit p-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1", children: [
3313
3337
  /* @__PURE__ */ e.jsx(
3314
3338
  k,
3315
3339
  {
3316
- onClick: () => d("none", s),
3340
+ onClick: () => c("none", s),
3317
3341
  size: "sm",
3318
3342
  variant: "secondary",
3319
3343
  className: "h-7 p-1 text-xs font-normal",
@@ -3323,14 +3347,14 @@ function Qn({ idx: s }) {
3323
3347
  /* @__PURE__ */ e.jsx(
3324
3348
  k,
3325
3349
  {
3326
- onClick: () => d("start", s),
3350
+ onClick: () => c("start", s),
3327
3351
  size: "sm",
3328
3352
  variant: "secondary",
3329
3353
  className: "h-7 p-1 text-xs font-normal",
3330
3354
  children: /* @__PURE__ */ e.jsx(
3331
3355
  ln,
3332
3356
  {
3333
- className: Y("h-4 w-4", {
3357
+ className: Z("h-4 w-4", {
3334
3358
  "rotate-90": l === "y"
3335
3359
  })
3336
3360
  }
@@ -3340,14 +3364,14 @@ function Qn({ idx: s }) {
3340
3364
  /* @__PURE__ */ e.jsx(
3341
3365
  k,
3342
3366
  {
3343
- onClick: () => d("center", s),
3367
+ onClick: () => c("center", s),
3344
3368
  size: "sm",
3345
3369
  variant: "secondary",
3346
3370
  className: "h-7 p-1 text-xs font-normal",
3347
3371
  children: /* @__PURE__ */ e.jsx(
3348
3372
  cn,
3349
3373
  {
3350
- className: Y("h-4 w-4", {
3374
+ className: Z("h-4 w-4", {
3351
3375
  "rotate-90": l === "y"
3352
3376
  })
3353
3377
  }
@@ -3357,14 +3381,14 @@ function Qn({ idx: s }) {
3357
3381
  /* @__PURE__ */ e.jsx(
3358
3382
  k,
3359
3383
  {
3360
- onClick: () => d("end", s),
3384
+ onClick: () => c("end", s),
3361
3385
  size: "sm",
3362
3386
  variant: "secondary",
3363
3387
  className: "h-7 p-1 text-xs font-normal",
3364
3388
  children: /* @__PURE__ */ e.jsx(
3365
3389
  on,
3366
3390
  {
3367
- className: Y("h-4 w-4", {
3391
+ className: Z("h-4 w-4", {
3368
3392
  "rotate-90": l === "y"
3369
3393
  })
3370
3394
  }
@@ -3383,26 +3407,26 @@ function Ea() {
3383
3407
  ), a = n === "y" ? "Y axis" : "X axis", t = n === "y" ? "X axis" : "Y axis", {
3384
3408
  keys: l,
3385
3409
  metricKeys: h,
3386
- dimensionKeys: d
3387
- } = gs(s.data || []);
3410
+ dimensionKeys: c
3411
+ } = js(s.data || []);
3388
3412
  let r = h;
3389
3413
  if (["stackedBar", "stackedLine"].includes(s.type)) {
3390
3414
  const o = qt({
3391
3415
  dataArray: s.data || [],
3392
- groupKey: d[0],
3393
- pivotKey: d[1],
3416
+ groupKey: c[0],
3417
+ pivotKey: c[1],
3394
3418
  valueKey: r[0]
3395
- }), { metricKeys: f } = gs(o);
3419
+ }), { metricKeys: f } = js(o);
3396
3420
  r = f;
3397
3421
  }
3398
3422
  return l.length === 0 ? null : /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
3399
3423
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
3400
- /* @__PURE__ */ e.jsx($, { children: a }),
3401
- /* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: /* @__PURE__ */ e.jsx("div", { className: "rounded-md bg-muted/70 px-2 py-1 hover:bg-muted", children: /* @__PURE__ */ e.jsx("p", { children: d[0] }) }) })
3424
+ /* @__PURE__ */ e.jsx(R, { children: a }),
3425
+ /* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: /* @__PURE__ */ e.jsx("div", { className: "rounded-md bg-muted/70 px-2 py-1 hover:bg-muted", children: /* @__PURE__ */ e.jsx("p", { children: c[0] }) }) })
3402
3426
  ] }),
3403
3427
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
3404
3428
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-5", children: [
3405
- /* @__PURE__ */ e.jsx($, { children: t }),
3429
+ /* @__PURE__ */ e.jsx(R, { children: t }),
3406
3430
  /* @__PURE__ */ e.jsx(Aa, {})
3407
3431
  ] }),
3408
3432
  /* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: r.map((o, f) => /* @__PURE__ */ e.jsx(Wn, { col: o, idx: f }, o)) })
@@ -3419,7 +3443,7 @@ function Wn({ col: s, idx: n }) {
3419
3443
  return (o = r.card.preferences) == null ? void 0 : o.datasetOptions;
3420
3444
  }
3421
3445
  ), l = t == null ? void 0 : t.find((r) => r.idx === n), { setCardPreferences: h } = i((r) => r.actions);
3422
- function d(r) {
3446
+ function c(r) {
3423
3447
  if (!l)
3424
3448
  h({
3425
3449
  ...a,
@@ -3450,26 +3474,26 @@ function Wn({ col: s, idx: n }) {
3450
3474
  /* @__PURE__ */ e.jsx(
3451
3475
  As,
3452
3476
  {
3453
- onClick: () => d("bar"),
3477
+ onClick: () => c("bar"),
3454
3478
  className: "invisible size-4 cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible"
3455
3479
  }
3456
3480
  ),
3457
3481
  /* @__PURE__ */ e.jsx(
3458
3482
  Es,
3459
3483
  {
3460
- onClick: () => d("line"),
3484
+ onClick: () => c("line"),
3461
3485
  className: "invisible size-4 cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible"
3462
3486
  }
3463
3487
  ),
3464
3488
  /* @__PURE__ */ e.jsx(
3465
3489
  Yt,
3466
3490
  {
3467
- onClick: () => d("area"),
3491
+ onClick: () => c("area"),
3468
3492
  className: "invisible size-4 cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible"
3469
3493
  }
3470
3494
  ),
3471
3495
  /* @__PURE__ */ e.jsx(
3472
- Ms,
3496
+ Pe,
3473
3497
  {
3474
3498
  orientation: "vertical",
3475
3499
  className: "invisible size-4 cursor-pointer py-2 text-muted-foreground hover:text-foreground group-hover:visible"
@@ -3482,10 +3506,10 @@ function Wn({ col: s, idx: n }) {
3482
3506
  function Yn({
3483
3507
  cardType: s
3484
3508
  }) {
3485
- return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(ve, { defaultValue: ["item-2"], type: "multiple", children: [
3486
- /* @__PURE__ */ e.jsxs(R, { value: "item-1", children: [
3487
- /* @__PURE__ */ e.jsx(_, { children: `${Ls(s)} Chart` }),
3488
- /* @__PURE__ */ e.jsxs(H, { className: "space-y-4 font-mono text-xs", children: [
3509
+ return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Ne, { defaultValue: ["item-2"], type: "multiple", children: [
3510
+ /* @__PURE__ */ e.jsxs(_, { value: "item-1", children: [
3511
+ /* @__PURE__ */ e.jsx(H, { children: `${Ts(s)} Chart` }),
3512
+ /* @__PURE__ */ e.jsxs(B, { className: "space-y-4 font-mono text-xs", children: [
3489
3513
  /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT x-axis, y-axis-1, y-axis-2,... FROM table" }),
3490
3514
  /* @__PURE__ */ e.jsxs("ul", { className: "ml-6 list-disc text-xs [&>li]:mt-2", children: [
3491
3515
  /* @__PURE__ */ e.jsx("li", { children: "x-axis - category" }),
@@ -3508,21 +3532,21 @@ function Yn({
3508
3532
  ] })
3509
3533
  ] })
3510
3534
  ] }),
3511
- /* @__PURE__ */ e.jsxs(R, { value: "item-2", children: [
3512
- /* @__PURE__ */ e.jsx(_, { children: "Settings" }),
3513
- /* @__PURE__ */ e.jsxs(H, { className: "space-y-4 px-2", children: [
3514
- /* @__PURE__ */ e.jsx(ns, {}),
3535
+ /* @__PURE__ */ e.jsxs(_, { value: "item-2", children: [
3536
+ /* @__PURE__ */ e.jsx(H, { children: "Settings" }),
3537
+ /* @__PURE__ */ e.jsxs(B, { className: "space-y-4 px-2", children: [
3538
+ /* @__PURE__ */ e.jsx(rs, {}),
3515
3539
  /* @__PURE__ */ e.jsx(Ea, {})
3516
3540
  ] })
3517
3541
  ] }),
3518
- /* @__PURE__ */ e.jsxs(R, { value: "item-3", children: [
3519
- /* @__PURE__ */ e.jsx(_, { children: "Filter on click" }),
3520
- /* @__PURE__ */ e.jsx(H, { className: "px-2", children: /* @__PURE__ */ e.jsx(De, {}) })
3542
+ /* @__PURE__ */ e.jsxs(_, { value: "item-3", children: [
3543
+ /* @__PURE__ */ e.jsx(H, { children: "Filter on click" }),
3544
+ /* @__PURE__ */ e.jsx(B, { className: "px-2", children: /* @__PURE__ */ e.jsx(De, {}) })
3521
3545
  ] })
3522
3546
  ] }) });
3523
3547
  }
3524
3548
  function Is() {
3525
- var l, h, d;
3549
+ var l, h, c;
3526
3550
  const s = i(
3527
3551
  (r) => r.card.cfg
3528
3552
  ), n = i((r) => r.actions.setCardCfg), a = i((r) => r.card.type);
@@ -3555,17 +3579,17 @@ function Is() {
3555
3579
  /* @__PURE__ */ e.jsxs(
3556
3580
  Fe,
3557
3581
  {
3558
- value: (d = (h = (l = s == null ? void 0 : s.options) == null ? void 0 : l.plugins) == null ? void 0 : h.datalabels) == null ? void 0 : d.anchor,
3582
+ value: (c = (h = (l = s == null ? void 0 : s.options) == null ? void 0 : l.plugins) == null ? void 0 : h.datalabels) == null ? void 0 : c.anchor,
3559
3583
  onValueChange: t,
3560
3584
  defaultValue: "none",
3561
3585
  children: [
3562
3586
  /* @__PURE__ */ e.jsx(Oe, { className: "h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(Me, { placeholder: "Select position" }) }),
3563
- /* @__PURE__ */ e.jsx(Te, { children: /* @__PURE__ */ e.jsxs(He, { children: [
3587
+ /* @__PURE__ */ e.jsx(Le, { children: /* @__PURE__ */ e.jsxs(Be, { children: [
3564
3588
  /* @__PURE__ */ e.jsx(Ae, { children: "Data Labels" }),
3565
- /* @__PURE__ */ e.jsx(W, { value: "none", children: "None" }),
3566
- a !== "pyramid" && /* @__PURE__ */ e.jsx(W, { value: "start", children: "Start" }),
3567
- /* @__PURE__ */ e.jsx(W, { value: "center", children: "Center" }),
3568
- a !== "pyramid" && /* @__PURE__ */ e.jsx(W, { value: "end", children: "End" })
3589
+ /* @__PURE__ */ e.jsx(X, { value: "none", children: "None" }),
3590
+ a !== "pyramid" && /* @__PURE__ */ e.jsx(X, { value: "start", children: "Start" }),
3591
+ /* @__PURE__ */ e.jsx(X, { value: "center", children: "Center" }),
3592
+ a !== "pyramid" && /* @__PURE__ */ e.jsx(X, { value: "end", children: "End" })
3569
3593
  ] }) })
3570
3594
  ]
3571
3595
  }
@@ -3602,18 +3626,18 @@ function Xn({
3602
3626
  ] })
3603
3627
  ] });
3604
3628
  }
3605
- return /* @__PURE__ */ e.jsx("div", { className: "px-6 py-2 space-y-6", children: /* @__PURE__ */ e.jsxs(ve, { defaultValue: ["item-2"], type: "multiple", children: [
3606
- /* @__PURE__ */ e.jsxs(R, { value: "item-1", children: [
3607
- /* @__PURE__ */ e.jsx(_, { children: `${Ls(s)} Chart` }),
3608
- /* @__PURE__ */ e.jsx(H, { className: " space-y-4 font-mono text-xs ", children: n(s) })
3629
+ return /* @__PURE__ */ e.jsx("div", { className: "px-6 py-2 space-y-6", children: /* @__PURE__ */ e.jsxs(Ne, { defaultValue: ["item-2"], type: "multiple", children: [
3630
+ /* @__PURE__ */ e.jsxs(_, { value: "item-1", children: [
3631
+ /* @__PURE__ */ e.jsx(H, { children: `${Ts(s)} Chart` }),
3632
+ /* @__PURE__ */ e.jsx(B, { className: " space-y-4 font-mono text-xs ", children: n(s) })
3609
3633
  ] }),
3610
- /* @__PURE__ */ e.jsxs(R, { value: "item-2", children: [
3611
- /* @__PURE__ */ e.jsx(_, { children: "Settings" }),
3612
- /* @__PURE__ */ e.jsx(H, { className: "px-2", children: /* @__PURE__ */ e.jsx(Is, {}) })
3634
+ /* @__PURE__ */ e.jsxs(_, { value: "item-2", children: [
3635
+ /* @__PURE__ */ e.jsx(H, { children: "Settings" }),
3636
+ /* @__PURE__ */ e.jsx(B, { className: "px-2", children: /* @__PURE__ */ e.jsx(Is, {}) })
3613
3637
  ] }),
3614
- /* @__PURE__ */ e.jsxs(R, { value: "item-3", children: [
3615
- /* @__PURE__ */ e.jsx(_, { children: "Filter on click" }),
3616
- /* @__PURE__ */ e.jsx(H, { className: "px-2", children: /* @__PURE__ */ e.jsx(De, {}) })
3638
+ /* @__PURE__ */ e.jsxs(_, { value: "item-3", children: [
3639
+ /* @__PURE__ */ e.jsx(H, { children: "Filter on click" }),
3640
+ /* @__PURE__ */ e.jsx(B, { className: "px-2", children: /* @__PURE__ */ e.jsx(De, {}) })
3617
3641
  ] })
3618
3642
  ] }) });
3619
3643
  }
@@ -3644,7 +3668,7 @@ function sr() {
3644
3668
  const s = i((n) => n.card.type);
3645
3669
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 p-6", children: [
3646
3670
  /* @__PURE__ */ e.jsx(
3647
- ve,
3671
+ Ne,
3648
3672
  {
3649
3673
  className: " ",
3650
3674
  type: "single",
@@ -3652,7 +3676,7 @@ function sr() {
3652
3676
  children: ar(s)
3653
3677
  }
3654
3678
  ),
3655
- /* @__PURE__ */ e.jsx("section", { className: "", children: ["line", "bar"].includes(s) && /* @__PURE__ */ e.jsx(ns, {}) }),
3679
+ /* @__PURE__ */ e.jsx("section", { className: "", children: ["line", "bar"].includes(s) && /* @__PURE__ */ e.jsx(rs, {}) }),
3656
3680
  /* @__PURE__ */ e.jsx("div", { children: !["kpi"].includes(s) && /* @__PURE__ */ e.jsx(Is, {}) }),
3657
3681
  /* @__PURE__ */ e.jsx("div", { children: !["kpi"].includes(s) && /* @__PURE__ */ e.jsx(De, {}) })
3658
3682
  ] });
@@ -3660,9 +3684,9 @@ function sr() {
3660
3684
  function ar(s) {
3661
3685
  if (["line", "bar"].includes(s))
3662
3686
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3663
- /* @__PURE__ */ e.jsxs(R, { value: "item-1", children: [
3664
- /* @__PURE__ */ e.jsx(_, { className: "font-normal", children: /* @__PURE__ */ e.jsx("p", { children: "Chart Query" }) }),
3665
- /* @__PURE__ */ e.jsxs(H, { className: " ", children: [
3687
+ /* @__PURE__ */ e.jsxs(_, { value: "item-1", children: [
3688
+ /* @__PURE__ */ e.jsx(H, { className: "font-normal", children: /* @__PURE__ */ e.jsx("p", { children: "Chart Query" }) }),
3689
+ /* @__PURE__ */ e.jsxs(B, { className: " ", children: [
3666
3690
  /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 font-mono text-xs font-semibold", children: "SELECT x-axis, y-axis-1, y-axis-2, y-axis-3,... FROM table" }),
3667
3691
  /* @__PURE__ */ e.jsxs("ul", { className: "my-6 ml-6 list-disc text-xs font-normal [&>li]:mt-2", children: [
3668
3692
  /* @__PURE__ */ e.jsx("li", { children: "X-axis - Category (ex. city)" }),
@@ -3670,9 +3694,9 @@ function ar(s) {
3670
3694
  ] })
3671
3695
  ] })
3672
3696
  ] }),
3673
- /* @__PURE__ */ e.jsxs(R, { value: "item-2", children: [
3674
- /* @__PURE__ */ e.jsx(_, { className: "font-normal", children: "Mixed Chart" }),
3675
- /* @__PURE__ */ e.jsxs(H, { className: "space-y-2 text-xs", children: [
3697
+ /* @__PURE__ */ e.jsxs(_, { value: "item-2", children: [
3698
+ /* @__PURE__ */ e.jsx(H, { className: "font-normal", children: "Mixed Chart" }),
3699
+ /* @__PURE__ */ e.jsxs(B, { className: "space-y-2 text-xs", children: [
3676
3700
  /* @__PURE__ */ e.jsxs("p", { children: [
3677
3701
  "Click ",
3678
3702
  /* @__PURE__ */ e.jsx("b", { children: "Customize" }),
@@ -3681,9 +3705,9 @@ function ar(s) {
3681
3705
  /* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(Zn, null, 2) })
3682
3706
  ] })
3683
3707
  ] }),
3684
- /* @__PURE__ */ e.jsxs(R, { value: "item-3", children: [
3685
- /* @__PURE__ */ e.jsx(_, { className: "font-normal", children: "Area Chart" }),
3686
- /* @__PURE__ */ e.jsxs(H, { className: "space-y-2 text-xs", children: [
3708
+ /* @__PURE__ */ e.jsxs(_, { value: "item-3", children: [
3709
+ /* @__PURE__ */ e.jsx(H, { className: "font-normal", children: "Area Chart" }),
3710
+ /* @__PURE__ */ e.jsxs(B, { className: "space-y-2 text-xs", children: [
3687
3711
  /* @__PURE__ */ e.jsxs("p", { children: [
3688
3712
  "Click ",
3689
3713
  /* @__PURE__ */ e.jsx("b", { children: "Customize" }),
@@ -3704,13 +3728,13 @@ function ar(s) {
3704
3728
  ] })
3705
3729
  ] });
3706
3730
  if (s === "bubble")
3707
- return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(R, { value: "item-1", children: [
3708
- /* @__PURE__ */ e.jsx(_, { className: "font-normal", children: /* @__PURE__ */ e.jsxs("p", { children: [
3731
+ return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(_, { value: "item-1", children: [
3732
+ /* @__PURE__ */ e.jsx(H, { className: "font-normal", children: /* @__PURE__ */ e.jsxs("p", { children: [
3709
3733
  "How to create a ",
3710
3734
  /* @__PURE__ */ e.jsx("span", { children: s }),
3711
3735
  " chart query?"
3712
3736
  ] }) }),
3713
- /* @__PURE__ */ e.jsxs(H, { className: " ", children: [
3737
+ /* @__PURE__ */ e.jsxs(B, { className: " ", children: [
3714
3738
  /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 font-mono text-xs font-semibold", children: "SELECT label, x-axis, y-axis, radius FROM table" }),
3715
3739
  /* @__PURE__ */ e.jsxs("ul", { className: "my-6 ml-6 list-disc text-xs font-normal [&>li]:mt-2", children: [
3716
3740
  /* @__PURE__ */ e.jsx("li", { children: "Label - Category (ex. city)" }),
@@ -3722,13 +3746,13 @@ function ar(s) {
3722
3746
  ] })
3723
3747
  ] }) });
3724
3748
  if (s === "scatter")
3725
- return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(R, { value: "item-1", children: [
3726
- /* @__PURE__ */ e.jsx(_, { className: "font-normal", children: /* @__PURE__ */ e.jsxs("p", { children: [
3749
+ return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(_, { value: "item-1", children: [
3750
+ /* @__PURE__ */ e.jsx(H, { className: "font-normal", children: /* @__PURE__ */ e.jsxs("p", { children: [
3727
3751
  "How to create a ",
3728
3752
  /* @__PURE__ */ e.jsx("span", { children: s }),
3729
3753
  " chart query?"
3730
3754
  ] }) }),
3731
- /* @__PURE__ */ e.jsxs(H, { className: " ", children: [
3755
+ /* @__PURE__ */ e.jsxs(B, { className: " ", children: [
3732
3756
  /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 font-mono text-xs font-semibold", children: "SELECT label, x-axis, y-axis FROM table" }),
3733
3757
  /* @__PURE__ */ e.jsxs("ul", { className: "my-6 ml-6 list-disc text-xs font-normal [&>li]:mt-2", children: [
3734
3758
  /* @__PURE__ */ e.jsx("li", { children: "Label - Category (ex. city)" }),
@@ -3739,13 +3763,13 @@ function ar(s) {
3739
3763
  ] })
3740
3764
  ] }) });
3741
3765
  if (["pie", "doughnut", "polarArea"].includes(s))
3742
- return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(R, { value: "item-1", children: [
3743
- /* @__PURE__ */ e.jsx(_, { className: "font-normal", children: /* @__PURE__ */ e.jsxs("p", { children: [
3766
+ return /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsxs(_, { value: "item-1", children: [
3767
+ /* @__PURE__ */ e.jsx(H, { className: "font-normal", children: /* @__PURE__ */ e.jsxs("p", { children: [
3744
3768
  /* @__PURE__ */ e.jsx("span", { children: s === "polarArea" ? "Polar" : s.charAt(0).toUpperCase() + s.slice(1) }),
3745
3769
  " ",
3746
3770
  "chart query"
3747
3771
  ] }) }),
3748
- /* @__PURE__ */ e.jsxs(H, { className: " ", children: [
3772
+ /* @__PURE__ */ e.jsxs(B, { className: " ", children: [
3749
3773
  /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 font-mono text-xs font-semibold", children: "SELECT label, measure FROM table" }),
3750
3774
  /* @__PURE__ */ e.jsxs("ul", { className: "my-6 ml-6 list-disc text-xs font-normal [&>li]:mt-2", children: [
3751
3775
  /* @__PURE__ */ e.jsx("li", { children: "Label - Category (ex. city)" }),
@@ -3756,107 +3780,107 @@ function ar(s) {
3756
3780
  }
3757
3781
  function tr() {
3758
3782
  var o, f, m, u, S;
3759
- const s = i((c) => c.card.preferences), n = i(
3760
- (c) => c.actions.setCardPreferences
3783
+ const s = i((d) => d.card.preferences), n = i(
3784
+ (d) => d.actions.setCardPreferences
3761
3785
  ), a = i(
3762
- (c) => c.actions.setNumberFormat
3786
+ (d) => d.actions.setNumberFormat
3763
3787
  );
3764
3788
  i(
3765
- (c) => {
3789
+ (d) => {
3766
3790
  var x, j;
3767
- return (j = (x = c.card.preferences) == null ? void 0 : x.formatNumber) == null ? void 0 : j.decimalPlaces;
3791
+ return (j = (x = d.card.preferences) == null ? void 0 : x.formatNumber) == null ? void 0 : j.decimalPlaces;
3768
3792
  }
3769
3793
  );
3770
3794
  const t = i(
3771
- (c) => {
3795
+ (d) => {
3772
3796
  var x, j;
3773
- return (j = (x = c.card.preferences) == null ? void 0 : x.formatNumber) == null ? void 0 : j.locale;
3797
+ return (j = (x = d.card.preferences) == null ? void 0 : x.formatNumber) == null ? void 0 : j.locale;
3774
3798
  }
3775
3799
  ), l = i(
3776
- (c) => {
3800
+ (d) => {
3777
3801
  var x, j;
3778
- return (j = (x = c.card.preferences) == null ? void 0 : x.formatNumber) == null ? void 0 : j.currency;
3802
+ return (j = (x = d.card.preferences) == null ? void 0 : x.formatNumber) == null ? void 0 : j.currency;
3779
3803
  }
3780
3804
  );
3781
3805
  i(
3782
- (c) => c.actions.setFilterOnClickField
3806
+ (d) => d.actions.setFilterOnClickField
3783
3807
  );
3784
3808
  const h = i(
3785
- (c) => {
3809
+ (d) => {
3786
3810
  var x, j;
3787
- return (j = (x = c.card.preferences) == null ? void 0 : x.formatNumber) == null ? void 0 : j.colorRanges;
3811
+ return (j = (x = d.card.preferences) == null ? void 0 : x.formatNumber) == null ? void 0 : j.colorRanges;
3788
3812
  }
3789
- ) || [], d = i(
3790
- (c) => c.actions.setColorRanges
3791
- ), r = [...new Set(Us.map((c) => c.currency))];
3813
+ ) || [], c = i(
3814
+ (d) => d.actions.setColorRanges
3815
+ ), r = [...new Set(Us.map((d) => d.currency))];
3792
3816
  return /* @__PURE__ */ e.jsxs("div", { children: [
3793
3817
  /* @__PURE__ */ e.jsxs("div", { className: "mb-3 flex items-center gap-2", children: [
3794
3818
  /* @__PURE__ */ e.jsx(
3795
- Pe,
3819
+ Ue,
3796
3820
  {
3797
3821
  checked: !!((o = s == null ? void 0 : s.formatNumber) != null && o.enabled),
3798
- onCheckedChange: (c) => {
3822
+ onCheckedChange: (d) => {
3799
3823
  n({
3800
3824
  ...s,
3801
3825
  formatNumber: {
3802
3826
  ...s == null ? void 0 : s.formatNumber,
3803
- enabled: c
3827
+ enabled: d
3804
3828
  }
3805
3829
  });
3806
3830
  }
3807
3831
  }
3808
3832
  ),
3809
- /* @__PURE__ */ e.jsx($, { children: "Format Number" })
3833
+ /* @__PURE__ */ e.jsx(R, { children: "Format Number" })
3810
3834
  ] }),
3811
3835
  ((f = s == null ? void 0 : s.formatNumber) == null ? void 0 : f.enabled) === !0 && /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-2", children: [
3812
3836
  /* @__PURE__ */ e.jsx("div", { children: /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 p-2", children: [
3813
3837
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
3814
3838
  /* @__PURE__ */ e.jsxs("div", { className: "w-full space-y-1", children: [
3815
- /* @__PURE__ */ e.jsx($, { children: "Locale" }),
3839
+ /* @__PURE__ */ e.jsx(R, { children: "Locale" }),
3816
3840
  /* @__PURE__ */ e.jsxs(
3817
3841
  Fe,
3818
3842
  {
3819
3843
  value: t || "en-US",
3820
- onValueChange: (c) => {
3844
+ onValueChange: (d) => {
3821
3845
  var x, j, z;
3822
3846
  return a(
3823
3847
  ((x = s == null ? void 0 : s.formatNumber) == null ? void 0 : x.decimalPlaces) || 0,
3824
3848
  ((j = s == null ? void 0 : s.formatNumber) == null ? void 0 : j.currency) || "",
3825
- c || "en-US",
3849
+ d || "en-US",
3826
3850
  ((z = s == null ? void 0 : s.formatNumber) == null ? void 0 : z.suffix) || ""
3827
3851
  );
3828
3852
  },
3829
3853
  children: [
3830
3854
  /* @__PURE__ */ e.jsx(Oe, { className: "col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(Me, {}) }),
3831
- /* @__PURE__ */ e.jsx(Te, { children: /* @__PURE__ */ e.jsxs(He, { children: [
3855
+ /* @__PURE__ */ e.jsx(Le, { children: /* @__PURE__ */ e.jsxs(Be, { children: [
3832
3856
  /* @__PURE__ */ e.jsx(Ae, { children: "Format" }),
3833
- Us.map((c) => /* @__PURE__ */ e.jsx(W, { value: c.locale, children: c.locale }, c.locale))
3857
+ Us.map((d) => /* @__PURE__ */ e.jsx(X, { value: d.locale, children: d.locale }, d.locale))
3834
3858
  ] }) })
3835
3859
  ]
3836
3860
  }
3837
3861
  )
3838
3862
  ] }),
3839
3863
  /* @__PURE__ */ e.jsxs("div", { className: "w-full space-y-1", children: [
3840
- /* @__PURE__ */ e.jsx($, { children: "Currency" }),
3864
+ /* @__PURE__ */ e.jsx(R, { children: "Currency" }),
3841
3865
  /* @__PURE__ */ e.jsxs(
3842
3866
  Fe,
3843
3867
  {
3844
3868
  value: l || "none",
3845
- onValueChange: (c) => {
3869
+ onValueChange: (d) => {
3846
3870
  var x, j, z;
3847
3871
  return a(
3848
3872
  ((x = s == null ? void 0 : s.formatNumber) == null ? void 0 : x.decimalPlaces) || 0,
3849
- c === "none" ? "" : c,
3873
+ d === "none" ? "" : d,
3850
3874
  ((j = s == null ? void 0 : s.formatNumber) == null ? void 0 : j.locale) || "",
3851
3875
  ((z = s == null ? void 0 : s.formatNumber) == null ? void 0 : z.suffix) || ""
3852
3876
  );
3853
3877
  },
3854
3878
  children: [
3855
3879
  /* @__PURE__ */ e.jsx(Oe, { className: "col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(Me, {}) }),
3856
- /* @__PURE__ */ e.jsx(Te, { children: /* @__PURE__ */ e.jsxs(He, { children: [
3880
+ /* @__PURE__ */ e.jsx(Le, { children: /* @__PURE__ */ e.jsxs(Be, { children: [
3857
3881
  /* @__PURE__ */ e.jsx(Ae, { children: "Currency" }),
3858
- /* @__PURE__ */ e.jsx(W, { value: "none", children: "None" }, "none"),
3859
- r.map((c) => /* @__PURE__ */ e.jsx(W, { value: c, children: c }, c))
3882
+ /* @__PURE__ */ e.jsx(X, { value: "none", children: "None" }, "none"),
3883
+ r.map((d) => /* @__PURE__ */ e.jsx(X, { value: d, children: d }, d))
3860
3884
  ] }) })
3861
3885
  ]
3862
3886
  }
@@ -3865,15 +3889,15 @@ function tr() {
3865
3889
  ] }),
3866
3890
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
3867
3891
  /* @__PURE__ */ e.jsxs("div", { className: "w-full space-y-1", children: [
3868
- /* @__PURE__ */ e.jsx($, { children: "Decimals" }),
3892
+ /* @__PURE__ */ e.jsx(R, { children: "Decimals" }),
3869
3893
  /* @__PURE__ */ e.jsxs(
3870
3894
  Fe,
3871
3895
  {
3872
3896
  value: ((u = (m = s == null ? void 0 : s.formatNumber) == null ? void 0 : m.decimalPlaces) == null ? void 0 : u.toString()) || "0",
3873
- onValueChange: (c) => {
3897
+ onValueChange: (d) => {
3874
3898
  var x, j, z;
3875
3899
  return a(
3876
- Number(c),
3900
+ Number(d),
3877
3901
  ((x = s == null ? void 0 : s.formatNumber) == null ? void 0 : x.currency) || "",
3878
3902
  ((j = s == null ? void 0 : s.formatNumber) == null ? void 0 : j.locale) || "",
3879
3903
  ((z = s == null ? void 0 : s.formatNumber) == null ? void 0 : z.suffix) || ""
@@ -3881,26 +3905,26 @@ function tr() {
3881
3905
  },
3882
3906
  children: [
3883
3907
  /* @__PURE__ */ e.jsx(Oe, { className: "col-span-3 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(Me, {}) }),
3884
- /* @__PURE__ */ e.jsx(Te, { children: ["0", "1", "2", "3", "4"].map((c) => /* @__PURE__ */ e.jsx(W, { value: c, children: c }, c)) })
3908
+ /* @__PURE__ */ e.jsx(Le, { children: ["0", "1", "2", "3", "4"].map((d) => /* @__PURE__ */ e.jsx(X, { value: d, children: d }, d)) })
3885
3909
  ]
3886
3910
  }
3887
3911
  )
3888
3912
  ] }),
3889
3913
  /* @__PURE__ */ e.jsxs("div", { className: "w-full space-y-1", children: [
3890
- /* @__PURE__ */ e.jsx($, { children: "Suffix" }),
3914
+ /* @__PURE__ */ e.jsx(R, { children: "Suffix" }),
3891
3915
  /* @__PURE__ */ e.jsx(
3892
- re,
3916
+ le,
3893
3917
  {
3894
3918
  value: ((S = s == null ? void 0 : s.formatNumber) == null ? void 0 : S.suffix) || "",
3895
3919
  className: "h-8 font-mono text-xs focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0",
3896
3920
  placeholder: "K, M, B, %",
3897
- onChange: (c) => {
3921
+ onChange: (d) => {
3898
3922
  var x, j, z;
3899
3923
  return a(
3900
3924
  ((x = s == null ? void 0 : s.formatNumber) == null ? void 0 : x.decimalPlaces) || 0,
3901
3925
  ((j = s == null ? void 0 : s.formatNumber) == null ? void 0 : j.currency) || "",
3902
3926
  ((z = s == null ? void 0 : s.formatNumber) == null ? void 0 : z.locale) || "",
3903
- c.target.value
3927
+ d.target.value
3904
3928
  );
3905
3929
  }
3906
3930
  }
@@ -3908,12 +3932,12 @@ function tr() {
3908
3932
  ] })
3909
3933
  ] })
3910
3934
  ] }) }),
3911
- /* @__PURE__ */ e.jsx(Ms, { className: "my-3" }),
3935
+ /* @__PURE__ */ e.jsx(Pe, { className: "my-3" }),
3912
3936
  /* @__PURE__ */ e.jsx(
3913
3937
  Rt,
3914
3938
  {
3915
3939
  colorRanges: h,
3916
- setColorRanges: d
3940
+ setColorRanges: c
3917
3941
  }
3918
3942
  )
3919
3943
  ] })
@@ -3921,9 +3945,9 @@ function tr() {
3921
3945
  }
3922
3946
  function nr() {
3923
3947
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 px-6 py-2", children: [
3924
- /* @__PURE__ */ e.jsx(ve, { type: "single", collapsible: !0, children: /* @__PURE__ */ e.jsxs(R, { value: "item-1", children: [
3925
- /* @__PURE__ */ e.jsx(_, { className: "", children: "KPI Query" }),
3926
- /* @__PURE__ */ e.jsxs(H, { className: "font-mono", children: [
3948
+ /* @__PURE__ */ e.jsx(Ne, { type: "single", collapsible: !0, children: /* @__PURE__ */ e.jsxs(_, { value: "item-1", children: [
3949
+ /* @__PURE__ */ e.jsx(H, { className: "", children: "KPI Query" }),
3950
+ /* @__PURE__ */ e.jsxs(B, { className: "font-mono", children: [
3927
3951
  /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 font-mono text-xs", children: "SELECT current, previous FROM table" }),
3928
3952
  /* @__PURE__ */ e.jsxs("ul", { className: "my-6 ml-6 list-disc text-xs [&>li]:mt-2", children: [
3929
3953
  /* @__PURE__ */ e.jsx("li", { children: "current - number" }),
@@ -3963,7 +3987,7 @@ function rr() {
3963
3987
  });
3964
3988
  }
3965
3989
  return /* @__PURE__ */ e.jsxs(
3966
- Ts,
3990
+ Ls,
3967
3991
  {
3968
3992
  value: (t = s == null ? void 0 : s.textVisualOptions) != null && t.isDynamicText ? "dynamic" : "static",
3969
3993
  onValueChange: a,
@@ -3982,15 +4006,15 @@ function rr() {
3982
4006
  }
3983
4007
  );
3984
4008
  }
3985
- function Ze({
4009
+ function es({
3986
4010
  cardType: s,
3987
4011
  docContent: n,
3988
4012
  suffix: a = "Chart"
3989
4013
  }) {
3990
- return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(ve, { defaultValue: ["item-2"], type: "multiple", children: [
3991
- /* @__PURE__ */ e.jsxs(R, { value: "item-1", children: [
3992
- /* @__PURE__ */ e.jsx(_, { children: `${Ls(s)} ${a}` }),
3993
- /* @__PURE__ */ e.jsx(H, { children: n || /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
4014
+ return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Ne, { defaultValue: ["item-2"], type: "multiple", children: [
4015
+ /* @__PURE__ */ e.jsxs(_, { value: "item-1", children: [
4016
+ /* @__PURE__ */ e.jsx(H, { children: `${Ts(s)} ${a}` }),
4017
+ /* @__PURE__ */ e.jsx(B, { children: n || /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
3994
4018
  /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT label, measure FROM table" }),
3995
4019
  /* @__PURE__ */ e.jsxs("ul", { className: "ml-6 list-disc text-xs [&>li]:mt-2", children: [
3996
4020
  /* @__PURE__ */ e.jsx("li", { children: "label - category" }),
@@ -4012,25 +4036,25 @@ function Ze({
4012
4036
  ] })
4013
4037
  ] }) })
4014
4038
  ] }),
4015
- /* @__PURE__ */ e.jsxs(R, { value: "item-2", children: [
4016
- /* @__PURE__ */ e.jsx(_, { children: "Settings" }),
4017
- /* @__PURE__ */ e.jsxs(H, { className: "space-y-4 px-2", children: [
4018
- s === "range" && /* @__PURE__ */ e.jsx(ns, {}),
4039
+ /* @__PURE__ */ e.jsxs(_, { value: "item-2", children: [
4040
+ /* @__PURE__ */ e.jsx(H, { children: "Settings" }),
4041
+ /* @__PURE__ */ e.jsxs(B, { className: "space-y-4 px-2", children: [
4042
+ s === "range" && /* @__PURE__ */ e.jsx(rs, {}),
4019
4043
  s !== "text" && /* @__PURE__ */ e.jsx(Is, {}),
4020
4044
  s === "text" && /* @__PURE__ */ e.jsx(rr, {})
4021
4045
  ] })
4022
4046
  ] }),
4023
- !["range", "text"].includes(s) && /* @__PURE__ */ e.jsxs(R, { value: "item-3", children: [
4024
- /* @__PURE__ */ e.jsx(_, { children: "Filter on click" }),
4025
- /* @__PURE__ */ e.jsx(H, { className: "px-2", children: /* @__PURE__ */ e.jsx(De, {}) })
4047
+ !["range", "text"].includes(s) && /* @__PURE__ */ e.jsxs(_, { value: "item-3", children: [
4048
+ /* @__PURE__ */ e.jsx(H, { children: "Filter on click" }),
4049
+ /* @__PURE__ */ e.jsx(B, { className: "px-2", children: /* @__PURE__ */ e.jsx(De, {}) })
4026
4050
  ] })
4027
4051
  ] }) });
4028
4052
  }
4029
4053
  function lr() {
4030
- return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(ve, { defaultValue: ["item-2"], type: "multiple", children: [
4031
- /* @__PURE__ */ e.jsxs(R, { value: "item-1", children: [
4032
- /* @__PURE__ */ e.jsx(_, { children: "Stacked Chart" }),
4033
- /* @__PURE__ */ e.jsxs(H, { className: "space-y-4 font-mono text-xs", children: [
4054
+ return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Ne, { defaultValue: ["item-2"], type: "multiple", children: [
4055
+ /* @__PURE__ */ e.jsxs(_, { value: "item-1", children: [
4056
+ /* @__PURE__ */ e.jsx(H, { children: "Stacked Chart" }),
4057
+ /* @__PURE__ */ e.jsxs(B, { className: "space-y-4 font-mono text-xs", children: [
4034
4058
  /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT x-axis, stack-by, y-axis FROM table" }),
4035
4059
  /* @__PURE__ */ e.jsxs("ul", { className: "ml-6 list-disc text-xs [&>li]:mt-2", children: [
4036
4060
  /* @__PURE__ */ e.jsx("li", { children: "x-axis - category" }),
@@ -4053,16 +4077,16 @@ function lr() {
4053
4077
  ] })
4054
4078
  ] })
4055
4079
  ] }),
4056
- /* @__PURE__ */ e.jsxs(R, { value: "item-2", children: [
4057
- /* @__PURE__ */ e.jsx(_, { children: "Settings" }),
4058
- /* @__PURE__ */ e.jsxs(H, { className: "space-y-4 px-2", children: [
4059
- /* @__PURE__ */ e.jsx(ns, {}),
4080
+ /* @__PURE__ */ e.jsxs(_, { value: "item-2", children: [
4081
+ /* @__PURE__ */ e.jsx(H, { children: "Settings" }),
4082
+ /* @__PURE__ */ e.jsxs(B, { className: "space-y-4 px-2", children: [
4083
+ /* @__PURE__ */ e.jsx(rs, {}),
4060
4084
  /* @__PURE__ */ e.jsx(Ea, {})
4061
4085
  ] })
4062
4086
  ] }),
4063
- /* @__PURE__ */ e.jsxs(R, { value: "item-3", children: [
4064
- /* @__PURE__ */ e.jsx(_, { children: "Filter on click" }),
4065
- /* @__PURE__ */ e.jsx(H, { className: "px-2", children: /* @__PURE__ */ e.jsx(De, {}) })
4087
+ /* @__PURE__ */ e.jsxs(_, { value: "item-3", children: [
4088
+ /* @__PURE__ */ e.jsx(H, { children: "Filter on click" }),
4089
+ /* @__PURE__ */ e.jsx(B, { className: "px-2", children: /* @__PURE__ */ e.jsx(De, {}) })
4066
4090
  ] })
4067
4091
  ] }) });
4068
4092
  }
@@ -4079,12 +4103,12 @@ function ir({}) {
4079
4103
  });
4080
4104
  };
4081
4105
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 px-6 py-2", children: [
4082
- /* @__PURE__ */ e.jsx(ve, { defaultValue: ["item-3"], type: "multiple", children: /* @__PURE__ */ e.jsxs(R, { value: "item-3", children: [
4083
- /* @__PURE__ */ e.jsx(_, { children: "Filter on click" }),
4084
- /* @__PURE__ */ e.jsx(H, { className: "px-2", children: /* @__PURE__ */ e.jsx(De, {}) })
4106
+ /* @__PURE__ */ e.jsx(Ne, { defaultValue: ["item-3"], type: "multiple", children: /* @__PURE__ */ e.jsxs(_, { value: "item-3", children: [
4107
+ /* @__PURE__ */ e.jsx(H, { children: "Filter on click" }),
4108
+ /* @__PURE__ */ e.jsx(B, { className: "px-2", children: /* @__PURE__ */ e.jsx(De, {}) })
4085
4109
  ] }) }),
4086
4110
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
4087
- /* @__PURE__ */ e.jsx(Pe, { onCheckedChange: a, id: "allow-download" }),
4111
+ /* @__PURE__ */ e.jsx(Ue, { onCheckedChange: a, id: "allow-download" }),
4088
4112
  /* @__PURE__ */ e.jsx(
4089
4113
  "label",
4090
4114
  {
@@ -4153,19 +4177,19 @@ function hr() {
4153
4177
  case "stackedLine":
4154
4178
  return /* @__PURE__ */ e.jsx(lr, {});
4155
4179
  case "pyramid":
4156
- return /* @__PURE__ */ e.jsx(Ze, { docContent: or, cardType: a });
4180
+ return /* @__PURE__ */ e.jsx(es, { docContent: or, cardType: a });
4157
4181
  case "kpi":
4158
4182
  return /* @__PURE__ */ e.jsx(nr, {});
4159
4183
  case "line":
4160
4184
  case "bar":
4161
4185
  return /* @__PURE__ */ e.jsx(Yn, { cardType: a });
4162
4186
  case "range":
4163
- return /* @__PURE__ */ e.jsx(Ze, { docContent: cr, cardType: a });
4187
+ return /* @__PURE__ */ e.jsx(es, { docContent: cr, cardType: a });
4164
4188
  case "pie":
4165
4189
  case "doughnut":
4166
4190
  case "polarArea":
4167
4191
  case "radar":
4168
- return /* @__PURE__ */ e.jsx(Ze, { cardType: a });
4192
+ return /* @__PURE__ */ e.jsx(es, { cardType: a });
4169
4193
  case "bubble":
4170
4194
  case "scatter":
4171
4195
  return /* @__PURE__ */ e.jsx(Xn, { cardType: a });
@@ -4173,7 +4197,7 @@ function hr() {
4173
4197
  return /* @__PURE__ */ e.jsx(ir, { cardType: a });
4174
4198
  case "text":
4175
4199
  return /* @__PURE__ */ e.jsx(
4176
- Ze,
4200
+ es,
4177
4201
  {
4178
4202
  docContent: dr,
4179
4203
  cardType: a,
@@ -4184,12 +4208,12 @@ function hr() {
4184
4208
  return /* @__PURE__ */ e.jsx(sr, {});
4185
4209
  }
4186
4210
  }
4187
- return /* @__PURE__ */ e.jsx(Os, { className: "h-full w-full text-sm", children: n(s) });
4211
+ return /* @__PURE__ */ e.jsx(Ms, { className: "h-full w-full text-sm", children: n(s) });
4188
4212
  }
4189
4213
  function mr() {
4190
4214
  const s = i((n) => n.isShowingVisual);
4191
4215
  return /* @__PURE__ */ e.jsxs(
4192
- js,
4216
+ bs,
4193
4217
  {
4194
4218
  direction: "vertical",
4195
4219
  className: "min-h-[250px] min-w-full max-w-lg",
@@ -4204,7 +4228,7 @@ function mr() {
4204
4228
  children: /* @__PURE__ */ e.jsx(Hn, {})
4205
4229
  }
4206
4230
  ),
4207
- /* @__PURE__ */ e.jsx(bs, { withHandle: !0, className: "border" }),
4231
+ /* @__PURE__ */ e.jsx(ys, { withHandle: !0, className: "border" }),
4208
4232
  /* @__PURE__ */ e.jsx(
4209
4233
  ze,
4210
4234
  {
@@ -4212,7 +4236,7 @@ function mr() {
4212
4236
  role: "visual-section",
4213
4237
  minSize: 0,
4214
4238
  defaultSize: 60,
4215
- children: s ? /* @__PURE__ */ e.jsxs(js, { direction: "horizontal", children: [
4239
+ children: s ? /* @__PURE__ */ e.jsxs(bs, { direction: "horizontal", children: [
4216
4240
  /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
4217
4241
  ze,
4218
4242
  {
@@ -4223,7 +4247,7 @@ function mr() {
4223
4247
  children: /* @__PURE__ */ e.jsx(hr, {})
4224
4248
  }
4225
4249
  ) }),
4226
- /* @__PURE__ */ e.jsx(bs, { className: "border" }),
4250
+ /* @__PURE__ */ e.jsx(ys, { className: "border" }),
4227
4251
  /* @__PURE__ */ e.jsx(ze, { minSize: 40, defaultSize: 75, maxSize: 100, children: /* @__PURE__ */ e.jsx(Ws, {}) })
4228
4252
  ] }) : /* @__PURE__ */ e.jsx(Ws, {})
4229
4253
  }
@@ -4233,7 +4257,7 @@ function mr() {
4233
4257
  );
4234
4258
  }
4235
4259
  function ur({ authToken: s, onSave: n, onClose: a }) {
4236
- const t = i((d) => d.actions.setOnSave), l = i((d) => d.actions.setOnClose), h = w((d) => d.actions.setAuthToken);
4260
+ const t = i((c) => c.actions.setOnSave), l = i((c) => c.actions.setOnClose), h = w((c) => c.actions.setAuthToken);
4237
4261
  return G(() => {
4238
4262
  n && t(n), a && l(a);
4239
4263
  }, [n, t, a, l]), G(() => {
@@ -4244,10 +4268,10 @@ function ur({ authToken: s, onSave: n, onClose: a }) {
4244
4268
  ] });
4245
4269
  }
4246
4270
  function xr() {
4247
- w((d) => d.selectedCardId);
4248
- const s = w((d) => d.selectedSheetId), { setIsVisualEditing: n } = w((d) => d.actions), a = w((d) => d.isVisualEditing), t = w((d) => d.actions.updateFrame);
4249
- function l(d) {
4250
- s && (t(s, d), n(!1));
4271
+ w((c) => c.selectedCardId);
4272
+ const s = w((c) => c.selectedSheetId), { setIsVisualEditing: n } = w((c) => c.actions), a = w((c) => c.isVisualEditing), t = w((c) => c.actions.updateFrame);
4273
+ function l(c) {
4274
+ s && (t(s, c), n(!1));
4251
4275
  }
4252
4276
  function h() {
4253
4277
  n(!1);
@@ -4256,7 +4280,7 @@ function xr() {
4256
4280
  "div",
4257
4281
  {
4258
4282
  role: "editor-container",
4259
- className: Y("flex grow", {
4283
+ className: Z("flex grow", {
4260
4284
  block: a,
4261
4285
  hidden: !a
4262
4286
  }),
@@ -4268,11 +4292,11 @@ function pr({
4268
4292
  columns: s,
4269
4293
  tableName: n
4270
4294
  }) {
4271
- const a = i((u) => u.selectedConnectionId), t = i((u) => u.selectedDatabaseName), l = i((u) => u.selectedSchemaName), h = i((u) => u.selectedTableName), d = w((u) => u.dashboard.filters) || [], r = w((u) => u.actions.addFilter), o = w((u) => u.actions.removeFilter), f = w(
4295
+ const a = i((u) => u.selectedConnectionId), t = i((u) => u.selectedDatabaseName), l = i((u) => u.selectedSchemaName), h = i((u) => u.selectedTableName), c = w((u) => u.dashboard.filters) || [], r = w((u) => u.actions.addFilter), o = w((u) => u.actions.removeFilter), f = w(
4272
4296
  (u) => u.actions.removeFilterValue
4273
4297
  );
4274
4298
  function m(u) {
4275
- const S = me(u.column_name), c = me(t || ""), x = me(l || ""), j = me(n), z = fs(
4299
+ const S = ue(u.column_name), d = ue(t || ""), x = ue(l || ""), j = ue(n), z = gs(
4276
4300
  x,
4277
4301
  j
4278
4302
  ), C = `${z}.${S}`;
@@ -4280,17 +4304,17 @@ function pr({
4280
4304
  "find",
4281
4305
  C,
4282
4306
  j,
4283
- c
4307
+ d
4284
4308
  );
4285
- const E = d == null ? void 0 : d.find(
4286
- (v) => v.column === C && v.table === j && (v.database === c || v.database === t)
4309
+ const E = c == null ? void 0 : c.find(
4310
+ (v) => v.column === C && v.table === j && (v.database === d || v.database === t)
4287
4311
  );
4288
4312
  if (E)
4289
4313
  f(E.id), o(E.id);
4290
4314
  else {
4291
4315
  if (n === "api" && a) {
4292
4316
  r({
4293
- id: es(),
4317
+ id: ss(),
4294
4318
  column: C,
4295
4319
  title: u.column_name,
4296
4320
  dataType: u.data_type,
@@ -4309,7 +4333,7 @@ function pr({
4309
4333
  return;
4310
4334
  }
4311
4335
  r({
4312
- id: es(),
4336
+ id: ss(),
4313
4337
  column: `${z}.${S}`,
4314
4338
  title: u.column_name,
4315
4339
  dataType: u.data_type,
@@ -4327,14 +4351,14 @@ function pr({
4327
4351
  }
4328
4352
  }
4329
4353
  return /* @__PURE__ */ e.jsx("div", { className: "xbg-red-100 flex-1 basis-0 flex-col overflow-scroll px-3", children: s == null ? void 0 : s.map((u) => {
4330
- const S = d == null ? void 0 : d.find(
4331
- (c) => c.column === me(u.column_name) && c.table === h && c.database === t
4354
+ const S = c == null ? void 0 : c.find(
4355
+ (d) => d.column === ue(u.column_name) && d.table === h && d.database === t
4332
4356
  );
4333
4357
  return /* @__PURE__ */ e.jsx(
4334
4358
  "div",
4335
4359
  {
4336
4360
  onClick: () => m(u),
4337
- className: Y(
4361
+ className: Z(
4338
4362
  "group flex cursor-pointer items-center justify-between border border-dashed border-background px-3 py-[6px] text-sm transition-colors hover:bg-muted/50",
4339
4363
  {
4340
4364
  "bg-muted": S
@@ -4356,14 +4380,14 @@ function fr() {
4356
4380
  );
4357
4381
  return /* @__PURE__ */ e.jsxs("section", { className: "relative flex grow flex-col border-l px-4", children: [
4358
4382
  /* @__PURE__ */ e.jsxs("div", { className: "mt-4 flex items-center justify-between gap-2 px-3", children: [
4359
- /* @__PURE__ */ e.jsx($, { className: "text-lg", children: "Filters" }),
4383
+ /* @__PURE__ */ e.jsx(R, { className: "text-lg", children: "Filters" }),
4360
4384
  /* @__PURE__ */ e.jsx(
4361
4385
  k,
4362
4386
  {
4363
4387
  onClick: () => s(!1),
4364
4388
  className: "h-7 w-7 p-0",
4365
4389
  variant: "ghost",
4366
- children: /* @__PURE__ */ e.jsx(_e, {})
4390
+ children: /* @__PURE__ */ e.jsx(He, {})
4367
4391
  }
4368
4392
  )
4369
4393
  ] }),
@@ -4389,7 +4413,7 @@ function gr() {
4389
4413
  "div",
4390
4414
  {
4391
4415
  role: "dashboard-plus-main",
4392
- className: Y("grow", {
4416
+ className: Z("grow", {
4393
4417
  hidden: n,
4394
4418
  flex: !n
4395
4419
  }),
@@ -4409,7 +4433,7 @@ function jr() {
4409
4433
  ), /* @__PURE__ */ e.jsx(
4410
4434
  "div",
4411
4435
  {
4412
- className: Y(" p-2", {
4436
+ className: Z(" p-2", {
4413
4437
  hidden: !a
4414
4438
  }),
4415
4439
  children: /* @__PURE__ */ e.jsx(
@@ -4463,6 +4487,6 @@ function vr({
4463
4487
  }
4464
4488
  export {
4465
4489
  vr as D,
4466
- Xe as S,
4490
+ Re as S,
4467
4491
  ya as u
4468
4492
  };