react-semaphor 0.0.198 → 0.0.200

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 E, b as k, j as e, Q as ps, R as fs, U as w, V as Gs, W as gs, X as js, Y as bs, Z as ys, _ as B, $ as ae, a0 as Js, J as Qs, O as Ee, a1 as qa, a2 as Ra, a3 as _a, a4 as Ha, a5 as Ba, a6 as $a, a7 as Ls, a8 as He, a9 as Ke, aa as Xe, T as vs, e as Ws, g as Ns, ab as Oe, ac as Me, f as Y, ad as Te, ae as Ae, af as Be, ag as Le, ah as X, ai as Cs, G as i, aj as Ue, ak as Ge, al as Pa, am as Je, w as Ys, v as Xs, t as he, an as Ka, r as Ua, N as Zs, s as Ga, ao as Ja, B as Qa, ap as ea, aq as Wa, L as $e, S as Ss, z as Ya, n as Ds, ar as ds, A as hs, u as ss, as as Ce, at as ze, au as sa, av as aa, aw as ta, ax as na, ay as ra, az as Xa, aA as Za, aB as la, aC as et, aD as st, aE as at, aF as tt, aG as nt, aH as ms, aI as rt, aJ as _e, aK as us, aL as Fe, aM as xs, aN as Is, aO as lt, aP as it, aQ as ot, aR as ct, aS as dt, aT as is, aU as ht, aV as Vs, aW as mt, aX as qs, aY as ut, aZ as xt, a_ as pt, a$ as ia, l as ft, C as gt, E as Rs, d as jt, h as bt, i as yt, o as vt, b0 as Nt, m as Ct, H as St, b1 as kt, b2 as wt, b3 as zt, b4 as os, b5 as Ft, b6 as cs, b7 as _s, K as Ot, b8 as Mt, b9 as ks, ba as Tt, bb as ws, bc as De, bd as oa, be as At, bf as Et, bg as Lt, bh as Dt, bi as It, bj as Vt, bk as Se, bl as q, bm as R, bn as zs, bo as _, bp as Hs, bq as qt, br as Rt, bs as _t, bt as Ht, bu as Bs, bv as Bt, bw as $t, bx as Pt, by as Kt, bz as Ut, bA as Gt } from "./index-ZPzRMi0w.js";
2
- import me, { useState as T, useEffect as P, useMemo as Jt, useRef as Pe } from "react";
1
+ import { P as A, b as w, j as e, Q as ps, R as fs, U as k, V as Gs, W as gs, X as js, Y as bs, Z as ys, _ as B, $ as ae, a0 as Js, J as Qs, O as Ae, a1 as Ra, a2 as _a, a3 as Ha, a4 as Ba, a5 as $a, a6 as Pa, a7 as Es, a8 as He, a9 as Ke, aa as Xe, T as vs, e as Ws, g as Ns, ab as Oe, ac as Me, f as Y, ad as Te, ae as Le, af as Be, ag as Ee, ah as X, ai as Cs, G as i, aj as Ue, ak as Ge, al as Ka, am as Je, w as Ys, v as Xs, t as he, an as Ua, r as Ga, N as Zs, s as Ja, ao as Qa, B as Wa, ap as ea, aq as Ya, L as $e, S as Ss, z as Xa, n as Ds, ar as ds, A as hs, u as ss, as as Ce, at as ze, au as sa, av as aa, aw as ta, ax as na, ay as ra, az as Za, aA as et, aB as la, aC as st, aD as at, aE as tt, aF as nt, aG as rt, aH as ms, aI as lt, aJ as _e, aK as us, aL as Fe, aM as xs, aN as Is, aO as it, aP as ot, aQ as ct, aR as dt, aS as ht, aT as is, aU as mt, aV as Vs, aW as ut, aX as qs, aY as xt, aZ as pt, a_ as ft, a$ as ia, l as gt, C as jt, E as Rs, 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 os, b5 as Ot, b6 as cs, b7 as _s, K as Mt, b8 as Tt, b9 as ks, ba as Lt, bb as ws, bc as De, bd as oa, be as At, bf as Et, bg as Dt, bh as It, bi as Vt, bj as qt, bk as Se, bl as q, bm as R, bn as zs, bo as _, bp as Hs, bq as Rt, br as _t, bs as Ht, bt as Bt, bu as Bs, bv as $t, bw as Pt, bx as Kt, by as Ut, bz as Gt, bA as Jt } from "./index-WVWD0JAV.js";
2
+ import me, { useState as T, useEffect as P, useMemo as Qt, useRef as Pe } 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 Qt = E("Activity", [
9
+ const Wt = A("Activity", [
10
10
  [
11
11
  "path",
12
12
  {
@@ -21,7 +21,7 @@ const Qt = E("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 Wt = E("AreaChart", [
24
+ const Yt = A("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 Wt = E("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 Fs = E("BarChart4", [
34
+ const Fs = A("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 Fs = E("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 Yt = E("CircleX", [
46
+ const Xt = A("CircleX", [
47
47
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
48
48
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
49
49
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
@@ -54,7 +54,7 @@ const Yt = E("CircleX", [
54
54
  * This source code is licensed under the ISC license.
55
55
  * See the LICENSE file in the root directory of this source tree.
56
56
  */
57
- const Xt = E("Database", [
57
+ const Zt = A("Database", [
58
58
  ["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
59
59
  ["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
60
60
  ["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
@@ -65,7 +65,7 @@ const Xt = E("Database", [
65
65
  * This source code is licensed under the ISC license.
66
66
  * See the LICENSE file in the root directory of this source tree.
67
67
  */
68
- const Zt = E("Eraser", [
68
+ const en = A("Eraser", [
69
69
  [
70
70
  "path",
71
71
  {
@@ -82,7 +82,7 @@ const Zt = E("Eraser", [
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 ca = E("Filter", [
85
+ const ca = A("Filter", [
86
86
  ["polygon", { points: "22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3", key: "1yg77f" }]
87
87
  ]);
88
88
  /**
@@ -91,7 +91,7 @@ const ca = E("Filter", [
91
91
  * This source code is licensed under the ISC license.
92
92
  * See the LICENSE file in the root directory of this source tree.
93
93
  */
94
- const da = E("GanttChart", [
94
+ const da = A("GanttChart", [
95
95
  ["path", { d: "M8 6h10", key: "9lnwnk" }],
96
96
  ["path", { d: "M6 12h9", key: "1g9pqf" }],
97
97
  ["path", { d: "M11 18h7", key: "c8dzvl" }]
@@ -102,7 +102,7 @@ const da = E("GanttChart", [
102
102
  * This source code is licensed under the ISC license.
103
103
  * See the LICENSE file in the root directory of this source tree.
104
104
  */
105
- const en = E("Glasses", [
105
+ const sn = A("Glasses", [
106
106
  ["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
107
107
  ["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
108
108
  ["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
@@ -115,7 +115,7 @@ const en = E("Glasses", [
115
115
  * This source code is licensed under the ISC license.
116
116
  * See the LICENSE file in the root directory of this source tree.
117
117
  */
118
- const sn = E("Hammer", [
118
+ const an = A("Hammer", [
119
119
  ["path", { d: "m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9", key: "eefl8a" }],
120
120
  ["path", { d: "m18 15 4-4", key: "16gjal" }],
121
121
  [
@@ -132,7 +132,7 @@ const sn = E("Hammer", [
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 an = E("Hash", [
135
+ const tn = A("Hash", [
136
136
  ["line", { x1: "4", x2: "20", y1: "9", y2: "9", key: "4lhtct" }],
137
137
  ["line", { x1: "4", x2: "20", y1: "15", y2: "15", key: "vyu0kd" }],
138
138
  ["line", { x1: "10", x2: "8", y1: "3", y2: "21", key: "1ggp8o" }],
@@ -144,7 +144,7 @@ const an = E("Hash", [
144
144
  * This source code is licensed under the ISC license.
145
145
  * See the LICENSE file in the root directory of this source tree.
146
146
  */
147
- const tn = E("Key", [
147
+ const nn = A("Key", [
148
148
  ["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" }],
149
149
  ["path", { d: "m21 2-9.6 9.6", key: "1j0ho8" }],
150
150
  ["circle", { cx: "7.5", cy: "15.5", r: "5.5", key: "yqb3hr" }]
@@ -155,7 +155,7 @@ const tn = E("Key", [
155
155
  * This source code is licensed under the ISC license.
156
156
  * See the LICENSE file in the root directory of this source tree.
157
157
  */
158
- const Os = E("LineChart", [
158
+ const Os = A("LineChart", [
159
159
  ["path", { d: "M3 3v18h18", key: "1s2lah" }],
160
160
  ["path", { d: "m19 9-5 5-4-4-3 3", key: "2osh9i" }]
161
161
  ]);
@@ -165,7 +165,7 @@ const Os = E("LineChart", [
165
165
  * This source code is licensed under the ISC license.
166
166
  * See the LICENSE file in the root directory of this source tree.
167
167
  */
168
- const nn = E("ListEnd", [
168
+ const rn = A("ListEnd", [
169
169
  ["path", { d: "M16 12H3", key: "1a2rj7" }],
170
170
  ["path", { d: "M16 6H3", key: "1wxfjs" }],
171
171
  ["path", { d: "M10 18H3", key: "13769t" }],
@@ -178,7 +178,7 @@ const nn = E("ListEnd", [
178
178
  * This source code is licensed under the ISC license.
179
179
  * See the LICENSE file in the root directory of this source tree.
180
180
  */
181
- const rn = E("ListStart", [
181
+ const ln = A("ListStart", [
182
182
  ["path", { d: "M16 12H3", key: "1a2rj7" }],
183
183
  ["path", { d: "M16 18H3", key: "12xzn7" }],
184
184
  ["path", { d: "M10 6H3", key: "lf8lx7" }],
@@ -191,7 +191,7 @@ const rn = E("ListStart", [
191
191
  * This source code is licensed under the ISC license.
192
192
  * See the LICENSE file in the root directory of this source tree.
193
193
  */
194
- const ln = E("ListX", [
194
+ const on = A("ListX", [
195
195
  ["path", { d: "M11 12H3", key: "51ecnj" }],
196
196
  ["path", { d: "M16 6H3", key: "1wxfjs" }],
197
197
  ["path", { d: "M16 18H3", key: "12xzn7" }],
@@ -204,7 +204,7 @@ const ln = E("ListX", [
204
204
  * This source code is licensed under the ISC license.
205
205
  * See the LICENSE file in the root directory of this source tree.
206
206
  */
207
- const on = E("MessageSquareMore", [
207
+ const cn = A("MessageSquareMore", [
208
208
  ["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" }],
209
209
  ["path", { d: "M8 10h.01", key: "19clt8" }],
210
210
  ["path", { d: "M12 10h.01", key: "1nrarc" }],
@@ -216,7 +216,7 @@ const on = E("MessageSquareMore", [
216
216
  * This source code is licensed under the ISC license.
217
217
  * See the LICENSE file in the root directory of this source tree.
218
218
  */
219
- const cn = E("Network", [
219
+ const dn = A("Network", [
220
220
  ["rect", { x: "16", y: "16", width: "6", height: "6", rx: "1", key: "4q2zg0" }],
221
221
  ["rect", { x: "2", y: "16", width: "6", height: "6", rx: "1", key: "8cvhb9" }],
222
222
  ["rect", { x: "9", y: "2", width: "6", height: "6", rx: "1", key: "1egb70" }],
@@ -229,7 +229,7 @@ const cn = E("Network", [
229
229
  * This source code is licensed under the ISC license.
230
230
  * See the LICENSE file in the root directory of this source tree.
231
231
  */
232
- const ha = E("Pencil", [
232
+ const ha = A("Pencil", [
233
233
  ["path", { d: "M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z", key: "5qss01" }],
234
234
  ["path", { d: "m15 5 4 4", key: "1mk7zo" }]
235
235
  ]);
@@ -239,7 +239,7 @@ const ha = E("Pencil", [
239
239
  * This source code is licensed under the ISC license.
240
240
  * See the LICENSE file in the root directory of this source tree.
241
241
  */
242
- const ma = E("PieChart", [
242
+ const ma = A("PieChart", [
243
243
  ["path", { d: "M21.21 15.89A10 10 0 1 1 8 2.83", key: "k2fpak" }],
244
244
  ["path", { d: "M22 12A10 10 0 0 0 12 2v10z", key: "1rfc4y" }]
245
245
  ]);
@@ -249,7 +249,7 @@ const ma = E("PieChart", [
249
249
  * This source code is licensed under the ISC license.
250
250
  * See the LICENSE file in the root directory of this source tree.
251
251
  */
252
- const dn = E("Play", [
252
+ const hn = A("Play", [
253
253
  ["polygon", { points: "6 3 20 12 6 21 6 3", key: "1oa8hb" }]
254
254
  ]);
255
255
  /**
@@ -258,7 +258,7 @@ const dn = E("Play", [
258
258
  * This source code is licensed under the ISC license.
259
259
  * See the LICENSE file in the root directory of this source tree.
260
260
  */
261
- const hn = E("Plug2", [
261
+ const mn = A("Plug2", [
262
262
  ["path", { d: "M9 2v6", key: "17ngun" }],
263
263
  ["path", { d: "M15 2v6", key: "s7yy2p" }],
264
264
  ["path", { d: "M12 17v5", key: "bb1du9" }],
@@ -271,7 +271,7 @@ const hn = E("Plug2", [
271
271
  * This source code is licensed under the ISC license.
272
272
  * See the LICENSE file in the root directory of this source tree.
273
273
  */
274
- const mn = E("Save", [
274
+ const un = A("Save", [
275
275
  [
276
276
  "path",
277
277
  {
@@ -288,7 +288,7 @@ const mn = E("Save", [
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 ua = E("ScatterChart", [
291
+ const ua = A("ScatterChart", [
292
292
  ["circle", { cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor", key: "kqv944" }],
293
293
  ["circle", { cx: "18.5", cy: "5.5", r: ".5", fill: "currentColor", key: "lysivs" }],
294
294
  ["circle", { cx: "11.5", cy: "11.5", r: ".5", fill: "currentColor", key: "byv1b8" }],
@@ -302,7 +302,7 @@ const ua = E("ScatterChart", [
302
302
  * This source code is licensed under the ISC license.
303
303
  * See the LICENSE file in the root directory of this source tree.
304
304
  */
305
- const un = E("ShieldQuestion", [
305
+ const xn = A("ShieldQuestion", [
306
306
  [
307
307
  "path",
308
308
  {
@@ -319,7 +319,7 @@ const un = E("ShieldQuestion", [
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 xn = E("Sigma", [
322
+ const pn = A("Sigma", [
323
323
  ["path", { d: "M18 7V4H6l6 8-6 8h12v-3", key: "zis8ev" }]
324
324
  ]);
325
325
  /**
@@ -328,7 +328,7 @@ const xn = E("Sigma", [
328
328
  * This source code is licensed under the ISC license.
329
329
  * See the LICENSE file in the root directory of this source tree.
330
330
  */
331
- const pn = E("SwatchBook", [
331
+ const fn = A("SwatchBook", [
332
332
  ["path", { d: "M11 17a4 4 0 0 1-8 0V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2Z", key: "1ldrpk" }],
333
333
  ["path", { d: "M16.7 13H19a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H7", key: "11i5po" }],
334
334
  ["path", { d: "M 7 17h0.01", key: "10821z" }],
@@ -346,7 +346,7 @@ const pn = E("SwatchBook", [
346
346
  * This source code is licensed under the ISC license.
347
347
  * See the LICENSE file in the root directory of this source tree.
348
348
  */
349
- const fn = E("Tag", [
349
+ const gn = A("Tag", [
350
350
  [
351
351
  "path",
352
352
  {
@@ -362,7 +362,7 @@ const fn = E("Tag", [
362
362
  * This source code is licensed under the ISC license.
363
363
  * See the LICENSE file in the root directory of this source tree.
364
364
  */
365
- const gn = E("ToggleLeft", [
365
+ const jn = A("ToggleLeft", [
366
366
  ["rect", { width: "20", height: "12", x: "2", y: "6", rx: "6", ry: "6", key: "f2vt7d" }],
367
367
  ["circle", { cx: "8", cy: "12", r: "2", key: "1nvbw3" }]
368
368
  ]);
@@ -372,7 +372,7 @@ const gn = E("ToggleLeft", [
372
372
  * This source code is licensed under the ISC license.
373
373
  * See the LICENSE file in the root directory of this source tree.
374
374
  */
375
- const Ms = E("Type", [
375
+ const Ms = A("Type", [
376
376
  ["polyline", { points: "4 7 4 4 20 4 20 7", key: "1nosan" }],
377
377
  ["line", { x1: "9", x2: "15", y1: "20", y2: "20", key: "swin9y" }],
378
378
  ["line", { x1: "12", x2: "12", y1: "4", y2: "20", key: "1tx1rr" }]
@@ -383,14 +383,14 @@ const Ms = E("Type", [
383
383
  * This source code is licensed under the ISC license.
384
384
  * See the LICENSE file in the root directory of this source tree.
385
385
  */
386
- const jn = E("User", [
386
+ const bn = A("User", [
387
387
  ["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
388
388
  ["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
389
389
  ]);
390
- function bn() {
391
- const [s, n] = T(""), [a, t] = T(!1), [l, o] = T(!1), d = k((c) => c.dashboard);
390
+ function yn() {
391
+ const [s, n] = T(""), [a, t] = T(!1), [l, o] = T(!1), d = w((c) => c.dashboard);
392
392
  function r() {
393
- const c = Qs(d), f = Ee(d.id), m = JSON.parse(localStorage.getItem(f) || "[]");
393
+ const c = Qs(d), f = Ae(d.id), m = JSON.parse(localStorage.getItem(f) || "[]");
394
394
  if (m.some(
395
395
  (S) => S.name === s
396
396
  )) {
@@ -404,7 +404,7 @@ function bn() {
404
404
  }
405
405
  return /* @__PURE__ */ e.jsxs(ps, { open: l, onOpenChange: o, children: [
406
406
  /* @__PURE__ */ e.jsx(fs, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
407
- w,
407
+ k,
408
408
  {
409
409
  variant: "outline",
410
410
  className: "h-7 p-2",
@@ -436,7 +436,7 @@ function bn() {
436
436
  ] }) }),
437
437
  a && /* @__PURE__ */ e.jsx("p", { className: "text-sm", children: "The bookmark name already exists. Use a differnet name." }),
438
438
  /* @__PURE__ */ e.jsx(Js, { children: /* @__PURE__ */ e.jsx(
439
- w,
439
+ k,
440
440
  {
441
441
  variant: "outline",
442
442
  type: "submit",
@@ -448,14 +448,14 @@ function bn() {
448
448
  ] })
449
449
  ] });
450
450
  }
451
- function yn() {
452
- const [s, n] = T(!1), [a, t] = T(""), l = k((h) => h.dashboard), o = k((h) => h.bookmarkKey), [d, r] = T([]), c = k((h) => h.actions.setDashboard), f = k(
451
+ function vn() {
452
+ const [s, n] = T(!1), [a, t] = T(""), l = w((h) => h.dashboard), o = w((h) => h.bookmarkKey), [d, r] = T([]), c = w((h) => h.actions.setDashboard), f = w(
453
453
  (h) => h.actions.setFilterValues
454
- ), m = k(
454
+ ), m = w(
455
455
  (h) => h.actions.setBookmarkKey
456
456
  );
457
457
  P(() => {
458
- const h = Ee(l.id), x = JSON.parse(localStorage.getItem(h) || "[]");
458
+ const h = Ae(l.id), x = JSON.parse(localStorage.getItem(h) || "[]");
459
459
  r(x);
460
460
  const g = x.find(
461
461
  (z) => z.default
@@ -469,25 +469,25 @@ function yn() {
469
469
  g && (c(g), f(x.filterValues || []), m(h === "Original" ? "" : h)), t(h);
470
470
  }
471
471
  function S(h) {
472
- const x = Ee(l.id), z = JSON.parse(localStorage.getItem(x) || "[]").filter(
472
+ const x = Ae(l.id), z = JSON.parse(localStorage.getItem(x) || "[]").filter(
473
473
  (b) => b.name !== h
474
474
  );
475
475
  localStorage.setItem(x, JSON.stringify(z)), r(z);
476
476
  }
477
- return /* @__PURE__ */ e.jsxs(qa, { open: s, onOpenChange: n, children: [
478
- /* @__PURE__ */ e.jsx(Ra, { asChild: !0, children: /* @__PURE__ */ e.jsx(w, { variant: "outline", className: "h-7 p-2", children: /* @__PURE__ */ e.jsx(en, { className: "h-4 w-4", strokeWidth: 1.5 }) }) }),
479
- /* @__PURE__ */ e.jsxs(_a, { className: "w-56", children: [
480
- /* @__PURE__ */ e.jsx(Ha, { children: "Lenses" }),
481
- /* @__PURE__ */ e.jsx(Ba, {}),
477
+ return /* @__PURE__ */ e.jsxs(Ra, { open: s, onOpenChange: n, children: [
478
+ /* @__PURE__ */ e.jsx(_a, { asChild: !0, children: /* @__PURE__ */ e.jsx(k, { variant: "outline", className: "h-7 p-2", children: /* @__PURE__ */ e.jsx(sn, { className: "h-4 w-4", strokeWidth: 1.5 }) }) }),
479
+ /* @__PURE__ */ e.jsxs(Ha, { className: "w-56", children: [
480
+ /* @__PURE__ */ e.jsx(Ba, { children: "Lenses" }),
481
+ /* @__PURE__ */ e.jsx($a, {}),
482
482
  /* @__PURE__ */ e.jsxs(
483
- $a,
483
+ Pa,
484
484
  {
485
485
  value: a,
486
486
  onValueChange: u,
487
487
  children: [
488
- /* @__PURE__ */ e.jsx(Ls, { value: "Original", children: "Original" }),
488
+ /* @__PURE__ */ e.jsx(Es, { value: "Original", children: "Original" }),
489
489
  d.filter((h) => h.name != "Original").map((h, x) => /* @__PURE__ */ e.jsxs(
490
- Ls,
490
+ Es,
491
491
  {
492
492
  className: "xbg-red-100 flex justify-between",
493
493
  value: h.name,
@@ -514,14 +514,14 @@ function yn() {
514
514
  ] })
515
515
  ] });
516
516
  }
517
- function vn() {
518
- const [s, n] = T(!1), a = k((o) => o.dashboard), t = k((o) => o.bookmarkKey);
517
+ function Nn() {
518
+ const [s, n] = T(!1), a = w((o) => o.dashboard), t = w((o) => o.bookmarkKey);
519
519
  P(() => {
520
520
  if (!t) {
521
521
  n(!1);
522
522
  return;
523
523
  }
524
- const o = Ee(a.id), r = JSON.parse(
524
+ const o = Ae(a.id), r = JSON.parse(
525
525
  localStorage.getItem(o) || "[]"
526
526
  ).find(
527
527
  (c) => c.name === t
@@ -531,7 +531,7 @@ function vn() {
531
531
  function l(o) {
532
532
  if (n(o), !t)
533
533
  return;
534
- const d = Ee(a.id), c = JSON.parse(
534
+ const d = Ae(a.id), c = JSON.parse(
535
535
  localStorage.getItem(d) || "[]"
536
536
  ).map((f) => (f.name === t ? f.default = o : f.default = !1, f));
537
537
  console.log(c), localStorage.setItem(d, JSON.stringify(c));
@@ -555,20 +555,20 @@ function vn() {
555
555
  )
556
556
  ] });
557
557
  }
558
- function Nn() {
559
- const s = k((b) => b.bookmarkKey), n = k((b) => b.dashboard);
560
- k((b) => b.selectedSheetId);
561
- const a = k(
558
+ function Cn() {
559
+ const s = w((b) => b.bookmarkKey), n = w((b) => b.dashboard);
560
+ w((b) => b.selectedSheetId);
561
+ const a = w(
562
562
  (b) => b.isDashboardEditing
563
- ), t = k((b) => b.filterValues), l = k((b) => b.isVisualEditing), o = k((b) => b.showFilters);
564
- k(
563
+ ), t = w((b) => b.filterValues), l = w((b) => b.isVisualEditing), o = w((b) => b.showFilters);
564
+ w(
565
565
  (b) => b.showDashboardJSON
566
566
  );
567
- const d = k((b) => b.onSaveFunction), r = k(
567
+ const d = w((b) => b.onSaveFunction), r = w(
568
568
  (b) => b.actions.setShowFilters
569
- ), { addFrame: c, setSelectedFrameId: f } = k(
569
+ ), { addFrame: c, setSelectedFrameId: f } = w(
570
570
  (b) => b.actions
571
- ), { getSelectedSheet: m, setIsDashboardEditing: u, setShowDashboardJSON: S } = k((b) => b.actions), h = m(), x = () => {
571
+ ), { getSelectedSheet: m, setIsDashboardEditing: u, setShowDashboardJSON: S } = w((b) => b.actions), h = m(), x = () => {
572
572
  if (!a || !h)
573
573
  return;
574
574
  const b = {
@@ -586,19 +586,19 @@ function Nn() {
586
586
  type: "bar",
587
587
  sql: "select COUNT(*) from YOUR_TABLE",
588
588
  data: []
589
- }, L = {
589
+ }, E = {
590
590
  id: Xe(),
591
591
  cards: [b],
592
592
  activeCardId: b.id
593
593
  };
594
- c(h.id, L), f(L.id);
594
+ c(h.id, E), f(E.id);
595
595
  }, g = () => {
596
596
  u(!0);
597
597
  };
598
598
  function z() {
599
599
  if (!s || s === "")
600
600
  return;
601
- const b = Qs(n), L = Ee(n.id), N = JSON.parse(localStorage.getItem(L) || "[]"), O = N.findIndex(
601
+ const b = Qs(n), E = Ae(n.id), N = JSON.parse(localStorage.getItem(E) || "[]"), O = N.findIndex(
602
602
  (j) => j.name === s
603
603
  );
604
604
  O !== -1 ? N[O] = {
@@ -610,7 +610,7 @@ function Nn() {
610
610
  name: s,
611
611
  template: b,
612
612
  filterValues: t
613
- }), localStorage.setItem(L, JSON.stringify(N)), d == null || d(b);
613
+ }), localStorage.setItem(E, JSON.stringify(N)), d == null || d(b);
614
614
  }
615
615
  return l ? null : /* @__PURE__ */ e.jsxs(
616
616
  "div",
@@ -622,14 +622,14 @@ function Nn() {
622
622
  /* @__PURE__ */ e.jsx(B, { children: s }),
623
623
  !!s && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
624
624
  /* @__PURE__ */ e.jsx("span", { className: "text-muted-foreground", children: "|" }),
625
- /* @__PURE__ */ e.jsx(vn, {})
625
+ /* @__PURE__ */ e.jsx(Nn, {})
626
626
  ] })
627
627
  ] }),
628
628
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
629
- a && !l && /* @__PURE__ */ e.jsx(bn, {}),
630
- !l && /* @__PURE__ */ e.jsx(yn, {}),
629
+ a && !l && /* @__PURE__ */ e.jsx(yn, {}),
630
+ !l && /* @__PURE__ */ e.jsx(vn, {}),
631
631
  a && !l && /* @__PURE__ */ e.jsxs(
632
- w,
632
+ k,
633
633
  {
634
634
  variant: "outline",
635
635
  className: "h-7 p-2",
@@ -643,7 +643,7 @@ function Nn() {
643
643
  }
644
644
  ),
645
645
  !a && /* @__PURE__ */ e.jsx(
646
- w,
646
+ k,
647
647
  {
648
648
  variant: "outline",
649
649
  className: "h-7 p-2",
@@ -653,7 +653,7 @@ function Nn() {
653
653
  }
654
654
  ),
655
655
  a && !l && /* @__PURE__ */ e.jsx(
656
- w,
656
+ k,
657
657
  {
658
658
  variant: "outline",
659
659
  role: "close",
@@ -666,17 +666,17 @@ function Nn() {
666
666
  }
667
667
  ),
668
668
  a && !l && /* @__PURE__ */ e.jsx(
669
- w,
669
+ k,
670
670
  {
671
671
  className: "h-7 p-2",
672
672
  variant: "outline",
673
673
  onClick: z,
674
674
  size: "sm",
675
- children: /* @__PURE__ */ e.jsx(mn, { className: "h-4 w-4", strokeWidth: 1.5 })
675
+ children: /* @__PURE__ */ e.jsx(un, { className: "h-4 w-4", strokeWidth: 1.5 })
676
676
  }
677
677
  ),
678
678
  !o && !l && a && /* @__PURE__ */ e.jsx(
679
- w,
679
+ k,
680
680
  {
681
681
  className: "h-7 p-2",
682
682
  variant: "outline",
@@ -707,11 +707,11 @@ function We({
707
707
  const m = t ? "Loading..." : l ? "Error" : a;
708
708
  function u() {
709
709
  if (s === "Connection")
710
- return /* @__PURE__ */ e.jsx(hn, { className: "size-4 rotate-90" });
710
+ return /* @__PURE__ */ e.jsx(mn, { className: "size-4 rotate-90" });
711
711
  if (s === "Database")
712
- return /* @__PURE__ */ e.jsx(Xt, { className: "size-4" });
712
+ return /* @__PURE__ */ e.jsx(Zt, { className: "size-4" });
713
713
  if (s === "Schema")
714
- return /* @__PURE__ */ e.jsx(cn, { className: "size-4" });
714
+ return /* @__PURE__ */ e.jsx(dn, { className: "size-4" });
715
715
  if (s === "Table")
716
716
  return /* @__PURE__ */ e.jsx(Cs, { className: "size-4" });
717
717
  }
@@ -736,15 +736,15 @@ function We({
736
736
  )
737
737
  }
738
738
  ),
739
- /* @__PURE__ */ e.jsx(Ae, { children: /* @__PURE__ */ e.jsxs(Be, { children: [
740
- t ? /* @__PURE__ */ e.jsx(Le, { children: "Loading..." }) : /* @__PURE__ */ e.jsx(Le, { children: s }),
739
+ /* @__PURE__ */ e.jsx(Le, { children: /* @__PURE__ */ e.jsxs(Be, { children: [
740
+ t ? /* @__PURE__ */ e.jsx(Ee, { children: "Loading..." }) : /* @__PURE__ */ e.jsx(Ee, { children: s }),
741
741
  /* @__PURE__ */ e.jsx(e.Fragment, { children: n && n.map((S, h) => /* @__PURE__ */ e.jsx(X, { value: S.id, children: S.name }, h)) }),
742
742
  (t || l) && /* @__PURE__ */ e.jsx(X, { value: m, children: m })
743
743
  ] }) })
744
744
  ] })
745
745
  ] });
746
746
  }
747
- function Cn({ column: s }) {
747
+ function Sn({ column: s }) {
748
748
  const [n, a] = T(!1), t = i((m) => m.selectedTableName), l = i(
749
749
  (m) => m.selectedSchemaName
750
750
  ), o = i((m) => m.sqlGen), d = i((m) => m.actions.setSqlGen), r = i((m) => m.actions.setCardSql), c = i((m) => m.actions.setRunSql);
@@ -759,7 +759,7 @@ function Cn({ column: s }) {
759
759
  h && (r(h), c(!0)), a(!1);
760
760
  }
761
761
  return /* @__PURE__ */ e.jsxs(Ue, { open: n, onOpenChange: a, children: [
762
- /* @__PURE__ */ e.jsx(Ge, { asChild: !0, children: /* @__PURE__ */ e.jsx(Pa, { className: "h-4 w-4 cursor-pointer text-foreground/40" }) }),
762
+ /* @__PURE__ */ e.jsx(Ge, { asChild: !0, children: /* @__PURE__ */ e.jsx(Ka, { className: "h-4 w-4 cursor-pointer text-foreground/40" }) }),
763
763
  /* @__PURE__ */ e.jsx(
764
764
  Je,
765
765
  {
@@ -813,17 +813,17 @@ function Cn({ column: s }) {
813
813
  }
814
814
  function xa({ column: s }) {
815
815
  return /* @__PURE__ */ e.jsxs(vs, { children: [
816
- /* @__PURE__ */ e.jsx(Ka, { asChild: !0, children: Ua.includes(s.data_type.toLowerCase()) ? (
816
+ /* @__PURE__ */ e.jsx(Ua, { asChild: !0, children: Ga.includes(s.data_type.toLowerCase()) ? (
817
817
  // <span className=" font-thin">T</span>
818
818
  /* @__PURE__ */ e.jsx(Ms, { className: "size-3" })
819
819
  ) : Zs.includes(s.data_type.toLowerCase()) ? (
820
820
  //
821
- /* @__PURE__ */ e.jsx(an, { className: "size-3" })
822
- ) : Ga.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(Ja, { className: "size-3" }) : Qa.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(gn, { className: "size-3" }) : /* @__PURE__ */ e.jsx(un, { className: "size-3" }) }),
821
+ /* @__PURE__ */ e.jsx(tn, { className: "size-3" })
822
+ ) : Ja.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(Qa, { className: "size-3" }) : Wa.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(jn, { className: "size-3" }) : /* @__PURE__ */ e.jsx(xn, { className: "size-3" }) }),
823
823
  /* @__PURE__ */ e.jsx(Ns, { children: /* @__PURE__ */ e.jsx("p", { className: "font-mono text-xs", children: s.data_type }) })
824
824
  ] });
825
825
  }
826
- function Sn({
826
+ function kn({
827
827
  schemaName: s,
828
828
  tableName: n,
829
829
  columns: a,
@@ -835,23 +835,23 @@ function Sn({
835
835
  (j) => j.selectedDatabaseName
836
836
  ), r = i(
837
837
  (j) => j.selectedSchemaName
838
- ), c = i((j) => j.selectedTableName), f = k(
838
+ ), c = i((j) => j.selectedTableName), f = w(
839
839
  (j) => j.dashboard.aiScopeTables
840
- ), { setAIScopeTables: m } = k((j) => j.actions), u = i((j) => j.actions.setRunSql), S = i((j) => j.actions.setSqlGen), h = i(
840
+ ), { setAIScopeTables: m } = w((j) => j.actions), u = i((j) => j.actions.setRunSql), S = i((j) => j.actions.setSqlGen), h = i(
841
841
  (j) => j.actions.setIsShowingVisual
842
842
  ), x = i((j) => j.actions.setCardSql), { connectionType: g } = pa();
843
843
  function z(j) {
844
844
  const F = Ys(j, l);
845
845
  S(F);
846
- const A = Xs(F, he(s), he(n));
847
- A && (x(A), u(!0));
846
+ const L = Xs(F, he(s), he(n));
847
+ L && (x(L), u(!0));
848
848
  }
849
849
  function b() {
850
850
  return (f == null ? void 0 : f.find(
851
851
  (j) => j.connectinonId === o && j.tableName === c
852
852
  )) !== void 0;
853
853
  }
854
- function L(j) {
854
+ function E(j) {
855
855
  if (j === !0 && c && o) {
856
856
  const F = {
857
857
  connectinonId: o,
@@ -871,7 +871,7 @@ function Sn({
871
871
  });
872
872
  } else {
873
873
  const F = (f || []).filter(
874
- (A) => A.connectinonId !== o && A.tableName !== c
874
+ (L) => L.connectinonId !== o && L.tableName !== c
875
875
  );
876
876
  m(F), ds(`Removed '${c}' from AI Scope`, {
877
877
  position: "top-right",
@@ -897,11 +897,11 @@ function Sn({
897
897
  {
898
898
  title: `${b() ? "Remove from" : "Add to"} AI Scope`,
899
899
  pressed: b(),
900
- onPressedChange: L,
900
+ onPressedChange: E,
901
901
  variant: "outline",
902
902
  className: "h-9 px-2",
903
903
  children: /* @__PURE__ */ e.jsx(
904
- Wa,
904
+ Ya,
905
905
  {
906
906
  className: Y("size-4", {
907
907
  "text-primary": b(),
@@ -912,7 +912,7 @@ function Sn({
912
912
  }
913
913
  ),
914
914
  /* @__PURE__ */ e.jsxs(
915
- w,
915
+ k,
916
916
  {
917
917
  disabled: t !== "Success",
918
918
  onClick: N,
@@ -920,13 +920,13 @@ function Sn({
920
920
  variant: "secondary",
921
921
  className: "flex",
922
922
  children: [
923
- t !== "Success" ? /* @__PURE__ */ e.jsx($e, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(pn, { className: "mr-2 size-4" }),
923
+ 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" }),
924
924
  "Top 10"
925
925
  ]
926
926
  }
927
927
  ),
928
928
  /* @__PURE__ */ e.jsxs(
929
- w,
929
+ k,
930
930
  {
931
931
  disabled: t !== "Success",
932
932
  onClick: O,
@@ -934,7 +934,7 @@ function Sn({
934
934
  variant: "secondary",
935
935
  className: "flex",
936
936
  children: [
937
- t !== "Success" ? /* @__PURE__ */ e.jsx($e, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(xn, { className: "mr-2 size-4" }),
937
+ t !== "Success" ? /* @__PURE__ */ e.jsx($e, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(pn, { className: "mr-2 size-4" }),
938
938
  "Count"
939
939
  ]
940
940
  }
@@ -952,7 +952,7 @@ function Sn({
952
952
  className: Y(
953
953
  "mx-3 flex cursor-pointer items-center justify-between rounded px-2 py-[6px] text-sm transition-colors hover:bg-muted/50",
954
954
  {
955
- "bg-muted": Ya(j, l)
955
+ "bg-muted": Xa(j, l)
956
956
  }
957
957
  ),
958
958
  children: [
@@ -965,7 +965,7 @@ function Sn({
965
965
  {
966
966
  onClick: (F) => F.stopPropagation(),
967
967
  className: "flex items-center justify-end",
968
- children: /* @__PURE__ */ e.jsx(Cn, { column: j })
968
+ children: /* @__PURE__ */ e.jsx(Sn, { column: j })
969
969
  }
970
970
  )
971
971
  ]
@@ -981,7 +981,7 @@ function Sn({
981
981
  }
982
982
  function pa(s, n) {
983
983
  var ts, ve, Qe, qe;
984
- let a = Jt(() => [], []);
984
+ let a = Qt(() => [], []);
985
985
  const t = ss().authToken || s, l = i(
986
986
  (C) => C.selectedConnectionId
987
987
  ), o = i(
@@ -1010,7 +1010,7 @@ function pa(s, n) {
1010
1010
  }
1011
1011
  const {
1012
1012
  data: b,
1013
- isLoading: L,
1013
+ isLoading: E,
1014
1014
  isError: N
1015
1015
  } = Ce({
1016
1016
  queryKey: ["connections"],
@@ -1023,7 +1023,7 @@ function pa(s, n) {
1023
1023
  }), O = b == null ? void 0 : b.connections.find(
1024
1024
  (C) => C.id === l
1025
1025
  ), j = O == null ? void 0 : O.type, F = (O == null ? void 0 : O.type) === "API" || (O == null ? void 0 : O.type) === "S3", {
1026
- data: A,
1026
+ data: L,
1027
1027
  isLoading: V,
1028
1028
  isFetching: K,
1029
1029
  isError: $,
@@ -1082,7 +1082,7 @@ function pa(s, n) {
1082
1082
  enabled: x(j)
1083
1083
  }), {
1084
1084
  data: H,
1085
- isLoading: ue,
1085
+ isLoading: xe,
1086
1086
  isFetching: se,
1087
1087
  isError: ge
1088
1088
  } = Ce({
@@ -1124,7 +1124,7 @@ function pa(s, n) {
1124
1124
  O
1125
1125
  ]);
1126
1126
  const je = (O == null ? void 0 : O.type) === "API" ? (ts = O == null ? void 0 : O.type) == null ? void 0 : ts.toLowerCase() : r || "", be = F ? "" : d || "";
1127
- function xe(C) {
1127
+ function pe(C) {
1128
1128
  u(C), S("");
1129
1129
  }
1130
1130
  function U(C) {
@@ -1133,7 +1133,7 @@ function pa(s, n) {
1133
1133
  function ne(C) {
1134
1134
  f(C);
1135
1135
  }
1136
- A && ((ve = A == null ? void 0 : A.databases) == null ? void 0 : ve.length) > 0, D && ((Qe = D == null ? void 0 : D.schemas) == null ? void 0 : Qe.length) > 0, H && ((qe = H == null ? void 0 : H.columns) == null ? void 0 : qe.length) > 0 && (a = H.columns.map((C) => ({
1136
+ L && ((ve = L == null ? void 0 : L.databases) == null ? void 0 : ve.length) > 0, D && ((Qe = D == null ? void 0 : D.schemas) == null ? void 0 : Qe.length) > 0, H && ((qe = H == null ? void 0 : H.columns) == null ? void 0 : qe.length) > 0 && (a = H.columns.map((C) => ({
1137
1137
  ...C,
1138
1138
  data_type: C.data_type.toLowerCase()
1139
1139
  }))), $ && (a = []), (ge || N) && (a = []);
@@ -1143,7 +1143,7 @@ function pa(s, n) {
1143
1143
  name: C.name,
1144
1144
  type: C.type
1145
1145
  })
1146
- ), ye = A == null ? void 0 : A.databases.map((C) => ({
1146
+ ), ye = L == null ? void 0 : L.databases.map((C) => ({
1147
1147
  id: C.database_name,
1148
1148
  name: C.database_name
1149
1149
  })), le = D == null ? void 0 : D.schemas.map((C) => ({
@@ -1155,7 +1155,7 @@ function pa(s, n) {
1155
1155
  }));
1156
1156
  return {
1157
1157
  connectionItems: re,
1158
- isConnectionsLoading: L,
1158
+ isConnectionsLoading: E,
1159
1159
  isConnectionsError: N,
1160
1160
  databaseItems: ye,
1161
1161
  isDatabasesLoadingOrFetching: V || K,
@@ -1167,7 +1167,7 @@ function pa(s, n) {
1167
1167
  isTableLoadingOrFetching: I || y,
1168
1168
  isTableError: v,
1169
1169
  columns: a,
1170
- isColumnsLoadingOrFetching: ue || se,
1170
+ isColumnsLoadingOrFetching: xe || se,
1171
1171
  isColumnsError: ge,
1172
1172
  isNonDbConnection: F,
1173
1173
  connectionType: j,
@@ -1175,7 +1175,7 @@ function pa(s, n) {
1175
1175
  schemaName: be,
1176
1176
  handleConnectionChange: ne,
1177
1177
  handleDatabaseChange: U,
1178
- handleSchemaChange: xe
1178
+ handleSchemaChange: pe
1179
1179
  };
1180
1180
  }
1181
1181
  function fa({
@@ -1203,12 +1203,12 @@ function fa({
1203
1203
  isSchemaLoadingOrFetching: g,
1204
1204
  isSchemaError: z,
1205
1205
  isColumnsError: b,
1206
- isColumnsLoadingOrFetching: L,
1206
+ isColumnsLoadingOrFetching: E,
1207
1207
  isTableLoadingOrFetching: N,
1208
1208
  isTableError: O,
1209
1209
  connectionType: j,
1210
1210
  isNonDbConnection: F,
1211
- handleConnectionChange: A,
1211
+ handleConnectionChange: L,
1212
1212
  handleDatabaseChange: V,
1213
1213
  handleSchemaChange: K,
1214
1214
  tableName: $,
@@ -1216,12 +1216,12 @@ function fa({
1216
1216
  } = pa();
1217
1217
  function D() {
1218
1218
  return s ? s(G, $, m) : /* @__PURE__ */ e.jsx(
1219
- Sn,
1219
+ kn,
1220
1220
  {
1221
1221
  schemaName: G,
1222
1222
  tableName: $,
1223
1223
  columns: m,
1224
- status: L ? "Loading..." : b ? "Error" : "Success"
1224
+ status: E ? "Loading..." : b ? "Error" : "Success"
1225
1225
  }
1226
1226
  );
1227
1227
  }
@@ -1275,7 +1275,7 @@ function fa({
1275
1275
  items: d,
1276
1276
  title: "Connection",
1277
1277
  value: n || "",
1278
- onChange: A,
1278
+ onChange: L,
1279
1279
  isLoading: u,
1280
1280
  isError: S,
1281
1281
  connectionTooltip: ((J = d == null ? void 0 : d.find(
@@ -1289,21 +1289,21 @@ function fa({
1289
1289
  ] }),
1290
1290
  D(),
1291
1291
  /* @__PURE__ */ e.jsx("div", { className: "flex items-end justify-center gap-2 px-6 py-4", children: /* @__PURE__ */ e.jsxs(
1292
- w,
1292
+ k,
1293
1293
  {
1294
1294
  onClick: te,
1295
1295
  size: "sm",
1296
1296
  variant: "secondary",
1297
1297
  className: "w-full",
1298
1298
  children: [
1299
- /* @__PURE__ */ e.jsx(on, { className: "mr-2 size-4" }),
1299
+ /* @__PURE__ */ e.jsx(cn, { className: "mr-2 size-4" }),
1300
1300
  "Help"
1301
1301
  ]
1302
1302
  }
1303
1303
  ) })
1304
1304
  ] });
1305
1305
  }
1306
- function kn(s) {
1306
+ function wn(s) {
1307
1307
  const n = s.toUpperCase().indexOf("WHERE"), a = s.toUpperCase().indexOf("GROUP BY"), t = s.toUpperCase().indexOf("LIMIT"), l = s.toUpperCase().indexOf("ORDER BY");
1308
1308
  let o = s.length;
1309
1309
  if (l !== -1 && (o = l), t !== -1 && t < o && (o = t), n !== -1) {
@@ -1319,17 +1319,17 @@ function kn(s) {
1319
1319
  return `${d} {{ filters | where }} ${r}`;
1320
1320
  }
1321
1321
  }
1322
- function wn({
1322
+ function zn({
1323
1323
  error: s,
1324
1324
  setShowAIDialog: n,
1325
1325
  setUserInputforAI: a,
1326
1326
  setTriggerAIRun: t
1327
1327
  }) {
1328
1328
  return /* @__PURE__ */ e.jsxs(sa, { openDelay: 0, children: [
1329
- /* @__PURE__ */ e.jsx(aa, { asChild: !0, children: /* @__PURE__ */ e.jsx(w, { variant: "link", className: " p-0 h-5", children: /* @__PURE__ */ e.jsx(Yt, { className: "h-4 w-4 text-red-500" }) }) }),
1329
+ /* @__PURE__ */ e.jsx(aa, { asChild: !0, children: /* @__PURE__ */ e.jsx(k, { variant: "link", className: " p-0 h-5", children: /* @__PURE__ */ e.jsx(Xt, { className: "h-4 w-4 text-red-500" }) }) }),
1330
1330
  /* @__PURE__ */ e.jsx(ta, { align: "start", className: " min-w-fit max-w-[500px]", children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ e.jsxs("div", { className: "grow space-y-1 flex flex-col ", children: [
1331
1331
  /* @__PURE__ */ e.jsxs(
1332
- w,
1332
+ k,
1333
1333
  {
1334
1334
  onClick: () => {
1335
1335
  n(!0), a(s), t(!0);
@@ -1337,7 +1337,7 @@ function wn({
1337
1337
  size: "sm",
1338
1338
  variant: "outline",
1339
1339
  children: [
1340
- /* @__PURE__ */ e.jsx(sn, { className: "h-4 w-4 mr-2" }),
1340
+ /* @__PURE__ */ e.jsx(an, { className: "h-4 w-4 mr-2" }),
1341
1341
  "Fix It"
1342
1342
  ]
1343
1343
  }
@@ -1346,7 +1346,7 @@ function wn({
1346
1346
  ] }) }) })
1347
1347
  ] });
1348
1348
  }
1349
- function zn({
1349
+ function Fn({
1350
1350
  text: s,
1351
1351
  onCheckedChange: n,
1352
1352
  checked: a
@@ -1356,7 +1356,7 @@ function zn({
1356
1356
  /* @__PURE__ */ e.jsx("label", { className: "text-xs leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: s })
1357
1357
  ] });
1358
1358
  }
1359
- function Fn() {
1359
+ function On() {
1360
1360
  const { authToken: s } = ss(), n = Pe(null), a = i((r) => r.applyFilters), [t, l] = T(""), o = i((r) => r.filterValues), d = i((r) => r.card.sql);
1361
1361
  return /* @__PURE__ */ e.jsxs(
1362
1362
  sa,
@@ -1384,13 +1384,13 @@ function Fn() {
1384
1384
  /* @__PURE__ */ e.jsx(
1385
1385
  ra,
1386
1386
  {
1387
- onClick: () => Xa(n),
1387
+ onClick: () => Za(n),
1388
1388
  className: "ml-3 inline-block h-4 w-4 opacity-70 hover:cursor-pointer hover:opacity-100"
1389
1389
  }
1390
1390
  )
1391
1391
  ] }) }) }),
1392
1392
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 pt-2", children: [
1393
- /* @__PURE__ */ e.jsx(Za, { className: "h-4 w-4 opacity-70" }),
1393
+ /* @__PURE__ */ e.jsx(et, { className: "h-4 w-4 opacity-70" }),
1394
1394
  /* @__PURE__ */ e.jsx("span", { className: "text-xs text-muted-foreground", children: "A preview of the query with filters applied." })
1395
1395
  ] })
1396
1396
  ] })
@@ -1398,7 +1398,7 @@ function Fn() {
1398
1398
  }
1399
1399
  );
1400
1400
  }
1401
- const On = `
1401
+ const Mn = `
1402
1402
 
1403
1403
  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.
1404
1404
 
@@ -1445,7 +1445,7 @@ SELECT label, measure FROM table
1445
1445
  - Label - Category
1446
1446
  - Measure - Number
1447
1447
  `;
1448
- function Mn({
1448
+ function Tn({
1449
1449
  open: s,
1450
1450
  setOpen: n,
1451
1451
  userInput: a,
@@ -1453,15 +1453,15 @@ function Mn({
1453
1453
  triggerAIRun: l,
1454
1454
  setTriggerAIRun: o
1455
1455
  }) {
1456
- const d = Pe(null), r = Pe(null), { authToken: c } = ss(), [f, m] = T(!1), u = i((y) => y.actions.setCardSql), S = k((y) => y.dashboard.baseQueries), h = i((y) => y.actions.setRunSql), x = i((y) => y.actions.setCardType), [g, z] = T([]), b = i((y) => y.currentColumns), L = i((y) => y.card.sql), N = i((y) => y.selectedTableName), O = `
1456
+ const d = Pe(null), r = Pe(null), { authToken: c } = ss(), [f, m] = T(!1), u = i((y) => y.actions.setCardSql), S = w((y) => y.dashboard.baseQueries), h = i((y) => y.actions.setRunSql), x = i((y) => y.actions.setCardType), [g, z] = T([]), b = i((y) => y.currentColumns), E = i((y) => y.card.sql), N = i((y) => y.selectedTableName), O = `
1457
1457
  ${a}
1458
1458
 
1459
1459
  Database Query Dialect: ${N === "api" || N === "s3" ? "DuckDb" : ""}
1460
1460
  Table Name: ${N}
1461
1461
  Table Columns: ${b == null ? void 0 : b.map((y) => `${y.column_name} | ${y.data_type}`).join(", ")}
1462
- User SQL: ${L}
1462
+ User SQL: ${E}
1463
1463
  ${S && `Base Queries: ${JSON.stringify(S)} `}`, j = ` 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.
1464
- Visual Query Syntax: ${On}`, { data: F, isLoading: A, isFetching: V, isError: K, refetch: $ } = Ce({
1464
+ Visual Query Syntax: ${Mn}`, { data: F, isLoading: L, isFetching: V, isError: K, refetch: $ } = Ce({
1465
1465
  queryKey: ["ai-query"],
1466
1466
  queryFn: () => ze(
1467
1467
  "https://semaphor.cloud/api/v1/ai",
@@ -1544,9 +1544,9 @@ function Mn({
1544
1544
  pre: ({ node: y, ...v }) => /* @__PURE__ */ e.jsxs("pre", { className: "space-y-2 rounded-sm bg-muted/50 p-3", style: Q, children: [
1545
1545
  /* @__PURE__ */ e.jsx("code", { className: "whitespace-normal text-sm", children: v.children }),
1546
1546
  /* @__PURE__ */ e.jsxs("div", { className: "flex justify-start gap-2", children: [
1547
- /* @__PURE__ */ e.jsx(w, { onClick: J, size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(ra, {}) }),
1547
+ /* @__PURE__ */ e.jsx(k, { onClick: J, size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(ra, {}) }),
1548
1548
  /* @__PURE__ */ e.jsx(
1549
- w,
1549
+ k,
1550
1550
  {
1551
1551
  onClick: (M) => {
1552
1552
  const H = J(M);
@@ -1554,7 +1554,7 @@ function Mn({
1554
1554
  },
1555
1555
  size: "sm",
1556
1556
  variant: "outline",
1557
- children: /* @__PURE__ */ e.jsx(at, {})
1557
+ children: /* @__PURE__ */ e.jsx(tt, {})
1558
1558
  }
1559
1559
  )
1560
1560
  ] })
@@ -1575,13 +1575,13 @@ function Mn({
1575
1575
  {
1576
1576
  className: "flex items-start rounded-md bg-muted p-3 text-sm",
1577
1577
  children: [
1578
- /* @__PURE__ */ e.jsx(jn, { className: "mr-2 h-5 w-5" }),
1578
+ /* @__PURE__ */ e.jsx(bn, { className: "mr-2 h-5 w-5" }),
1579
1579
  /* @__PURE__ */ e.jsx("div", { children: y.content })
1580
1580
  ]
1581
1581
  },
1582
1582
  v
1583
1583
  ) : y.role === "ai" ? /* @__PURE__ */ e.jsx(
1584
- st,
1584
+ at,
1585
1585
  {
1586
1586
  className: "w-full overflow-auto py-1",
1587
1587
  components: Z,
@@ -1592,7 +1592,7 @@ function Mn({
1592
1592
  }
1593
1593
  return /* @__PURE__ */ e.jsxs(ps, { open: s, onOpenChange: n, children: [
1594
1594
  /* @__PURE__ */ e.jsx(fs, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1595
- w,
1595
+ k,
1596
1596
  {
1597
1597
  size: "sm",
1598
1598
  className: "w-full justify-start border font-normal text-muted-foreground focus-visible:ring-0 focus-visible:ring-offset-0",
@@ -1637,20 +1637,20 @@ function Mn({
1637
1637
  className: Y(
1638
1638
  "max-h-10 min-h-7 resize-none border-none focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0"
1639
1639
  ),
1640
- disabled: A || V,
1640
+ disabled: L || V,
1641
1641
  value: a,
1642
1642
  onChange: (y) => t(y.target.value)
1643
1643
  }
1644
1644
  ),
1645
1645
  " ",
1646
1646
  /* @__PURE__ */ e.jsx(
1647
- w,
1647
+ k,
1648
1648
  {
1649
1649
  className: "h-8",
1650
1650
  size: "sm",
1651
1651
  variant: "ghost",
1652
1652
  onClick: D,
1653
- children: !A && !V ? /* @__PURE__ */ e.jsx(et, {}) : /* @__PURE__ */ e.jsx($e, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" })
1653
+ children: !L && !V ? /* @__PURE__ */ e.jsx(st, {}) : /* @__PURE__ */ e.jsx($e, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" })
1654
1654
  }
1655
1655
  )
1656
1656
  ] })
@@ -1667,7 +1667,7 @@ var ga = {
1667
1667
  className: void 0,
1668
1668
  style: void 0,
1669
1669
  attr: void 0
1670
- }, $s = me.createContext && /* @__PURE__ */ me.createContext(ga), Tn = ["attr", "size", "title"];
1670
+ }, $s = me.createContext && /* @__PURE__ */ me.createContext(ga), Ln = ["attr", "size", "title"];
1671
1671
  function An(s, n) {
1672
1672
  if (s == null)
1673
1673
  return {};
@@ -1711,21 +1711,21 @@ function es(s) {
1711
1711
  for (var n = 1; n < arguments.length; n++) {
1712
1712
  var a = arguments[n] != null ? arguments[n] : {};
1713
1713
  n % 2 ? Ps(Object(a), !0).forEach(function(t) {
1714
- Ln(s, t, a[t]);
1714
+ Dn(s, t, a[t]);
1715
1715
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(s, Object.getOwnPropertyDescriptors(a)) : Ps(Object(a)).forEach(function(t) {
1716
1716
  Object.defineProperty(s, t, Object.getOwnPropertyDescriptor(a, t));
1717
1717
  });
1718
1718
  }
1719
1719
  return s;
1720
1720
  }
1721
- function Ln(s, n, a) {
1722
- return n = Dn(n), n in s ? Object.defineProperty(s, n, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : s[n] = a, s;
1721
+ function Dn(s, n, a) {
1722
+ return n = In(n), n in s ? Object.defineProperty(s, n, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : s[n] = a, s;
1723
1723
  }
1724
- function Dn(s) {
1725
- var n = In(s, "string");
1724
+ function In(s) {
1725
+ var n = Vn(s, "string");
1726
1726
  return typeof n == "symbol" ? n : String(n);
1727
1727
  }
1728
- function In(s, n) {
1728
+ function Vn(s, n) {
1729
1729
  if (typeof s != "object" || s === null)
1730
1730
  return s;
1731
1731
  var a = s[Symbol.toPrimitive];
@@ -1742,18 +1742,18 @@ function ja(s) {
1742
1742
  key: a
1743
1743
  }, n.attr), ja(n.child)));
1744
1744
  }
1745
- function fe(s) {
1746
- return (n) => /* @__PURE__ */ me.createElement(Vn, Ze({
1745
+ function ue(s) {
1746
+ return (n) => /* @__PURE__ */ me.createElement(qn, Ze({
1747
1747
  attr: es({}, s.attr)
1748
1748
  }, n), ja(s.child));
1749
1749
  }
1750
- function Vn(s) {
1750
+ function qn(s) {
1751
1751
  var n = (a) => {
1752
1752
  var {
1753
1753
  attr: t,
1754
1754
  size: l,
1755
1755
  title: o
1756
- } = s, d = An(s, Tn), r = l || a.size || "1em", c;
1756
+ } = s, d = An(s, Ln), r = l || a.size || "1em", c;
1757
1757
  return a.className && (c = a.className), s.className && (c = (c ? c + " " : "") + s.className), /* @__PURE__ */ me.createElement("svg", Ze({
1758
1758
  stroke: "currentColor",
1759
1759
  fill: "currentColor",
@@ -1770,23 +1770,23 @@ function Vn(s) {
1770
1770
  };
1771
1771
  return $s !== void 0 ? /* @__PURE__ */ me.createElement($s.Consumer, null, (a) => n(a)) : n(ga);
1772
1772
  }
1773
- function qn(s) {
1774
- return fe({ 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);
1773
+ function Rn(s) {
1774
+ return ue({ 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);
1775
1775
  }
1776
- function Rn() {
1777
- const { theme: s } = tt(), n = Pe(), a = Pe(), [t, l] = T(!1), [o, d] = T(!1), [r, c] = T(!1), [f, m] = T(""), [u, S] = T(!1), { authToken: h } = ss();
1778
- k((p) => p.selectedSheetId);
1779
- const x = k((p) => p.dashboard.baseQueries), g = i((p) => p.card), z = k((p) => p.theme), b = i((p) => p.isShowingVisual), L = i(
1776
+ function _n() {
1777
+ const { theme: s } = nt(), n = Pe(), a = Pe(), [t, l] = T(!1), [o, d] = T(!1), [r, c] = T(!1), [f, m] = T(""), [u, S] = T(!1), { authToken: h } = ss();
1778
+ w((p) => p.selectedSheetId);
1779
+ const x = w((p) => p.dashboard.baseQueries), g = i((p) => p.card), z = w((p) => p.theme), b = i((p) => p.isShowingVisual), E = i(
1780
1780
  (p) => p.selectedConnectionId
1781
1781
  ), N = i(
1782
1782
  (p) => p.selectedDatabaseName
1783
1783
  ), O = i(
1784
1784
  (p) => p.selectedSchemaName
1785
1785
  );
1786
- k(
1786
+ w(
1787
1787
  (p) => p.actions.updateFrameCard
1788
1788
  );
1789
- const j = i((p) => p.selectedTableName), F = i((p) => p.card.sql), A = i((p) => p.card.python), V = nt(F, x), K = i((p) => p.selectedConnectionId), $ = i((p) => p.frame), G = i((p) => p.filterValues), D = i((p) => p.applyFilters), {
1789
+ const j = i((p) => p.selectedTableName), F = i((p) => p.card.sql), L = i((p) => p.card.python), V = rt(F, x), K = i((p) => p.selectedConnectionId), $ = i((p) => p.frame), G = i((p) => p.filterValues), D = i((p) => p.applyFilters), {
1790
1790
  setCardCustomCfg: te,
1791
1791
  setQueryResultColumns: Q,
1792
1792
  setFilterValues: ee,
@@ -1797,7 +1797,7 @@ function Rn() {
1797
1797
  setCardPreferences: v
1798
1798
  } = i((p) => p.actions), M = i((p) => p.onSave), H = i(
1799
1799
  (p) => p.actions.setApplyFilters
1800
- ), ue = i((p) => p.onClose), se = i((p) => p.actions.setCardData), ge = i((p) => p.actions.setSqlGen), je = i((p) => p.runSql), be = i((p) => p.actions.setRunSql), xe = i(
1800
+ ), xe = i((p) => p.onClose), se = i((p) => p.actions.setCardData), ge = i((p) => p.actions.setSqlGen), je = i((p) => p.runSql), be = i((p) => p.actions.setRunSql), pe = i(
1801
1801
  (p) => p.actions.setIsSqlRunning
1802
1802
  ), {
1803
1803
  data: U,
@@ -1809,14 +1809,14 @@ function Rn() {
1809
1809
  status: ts,
1810
1810
  refetch: ve
1811
1811
  } = Ce({
1812
- queryKey: [V, A],
1812
+ queryKey: [V, L],
1813
1813
  queryFn: () => na(
1814
1814
  "https://semaphor.cloud/api/v1/query",
1815
1815
  (h == null ? void 0 : h.accessToken) || "",
1816
1816
  {
1817
1817
  connection_id: K,
1818
1818
  sql: V,
1819
- python: A === Is ? "" : A,
1819
+ python: L === Is ? "" : L,
1820
1820
  active_filters: D ? G : []
1821
1821
  }
1822
1822
  ),
@@ -1834,7 +1834,7 @@ function Rn() {
1834
1834
  }, [U, se, Q, y]), P(() => {
1835
1835
  je && (ve(), be(!1));
1836
1836
  }, [je, ve, be]), P(() => {
1837
- (ne || re) && xe(!0), (le || ye) && xe(!1), le ? (I(Ve.message), se([]), Q([]), y("")) : I("");
1837
+ (ne || re) && pe(!0), (le || ye) && pe(!1), le ? (I(Ve.message), se([]), Q([]), y("")) : I("");
1838
1838
  }, [
1839
1839
  ne,
1840
1840
  re,
@@ -1842,7 +1842,7 @@ function Rn() {
1842
1842
  y,
1843
1843
  le,
1844
1844
  ye,
1845
- xe,
1845
+ pe,
1846
1846
  se,
1847
1847
  Q,
1848
1848
  I,
@@ -1856,13 +1856,13 @@ function Rn() {
1856
1856
  };
1857
1857
  function C() {
1858
1858
  let p = F;
1859
- F && !F.includes("{{") && (p = kn(F), Z(p));
1859
+ F && !F.includes("{{") && (p = wn(F), Z(p));
1860
1860
  const ie = {
1861
1861
  ...g,
1862
1862
  lastSelectedSchema: O,
1863
1863
  lastSelectedDatabase: N,
1864
1864
  lastSelectedTable: j,
1865
- connectionId: L,
1865
+ connectionId: E,
1866
1866
  type: b ? g.type : "table",
1867
1867
  sql: p,
1868
1868
  customCfg: b ? g.customCfg : null
@@ -1874,21 +1874,21 @@ function Rn() {
1874
1874
  cards: Re
1875
1875
  });
1876
1876
  }
1877
- function Oa() {
1878
- ue == null || ue();
1877
+ function Ma() {
1878
+ xe == null || xe();
1879
1879
  }
1880
- function Ma(p) {
1880
+ function Ta(p) {
1881
1881
  const ie = getComputedStyle(
1882
1882
  document.documentElement
1883
1883
  ).getPropertyValue(p);
1884
- return Ta(ie);
1884
+ return La(ie);
1885
1885
  }
1886
- function Ta(p) {
1887
- const [ie, Re, Ne] = p.split(" "), W = parseFloat(ie), La = parseFloat(Re), Da = parseFloat(Ne), Ia = La / 100, Es = Da / 100, pe = (1 - Math.abs(2 * Es - 1)) * Ia, ke = pe * (1 - Math.abs(W / 60 % 2 - 1)), ns = Es - pe / 2;
1886
+ function La(p) {
1887
+ const [ie, Re, Ne] = p.split(" "), W = parseFloat(ie), Da = parseFloat(Re), Ia = parseFloat(Ne), Va = Da / 100, As = Ia / 100, fe = (1 - Math.abs(2 * As - 1)) * Va, ke = fe * (1 - Math.abs(W / 60 % 2 - 1)), ns = As - fe / 2;
1888
1888
  let oe = 0, ce = 0, de = 0;
1889
- 0 <= W && W < 60 ? (oe = pe, ce = ke, de = 0) : 60 <= W && W < 120 ? (oe = ke, ce = pe, de = 0) : 120 <= W && W < 180 ? (oe = 0, ce = pe, de = ke) : 180 <= W && W < 240 ? (oe = 0, ce = ke, de = pe) : 240 <= W && W < 300 ? (oe = ke, ce = 0, de = pe) : 300 <= W && W < 360 && (oe = pe, ce = 0, de = ke), oe = Math.round((oe + ns) * 255), ce = Math.round((ce + ns) * 255), de = Math.round((de + ns) * 255);
1890
- const rs = (Va) => {
1891
- const ls = Va.toString(16);
1889
+ 0 <= W && W < 60 ? (oe = fe, ce = ke, de = 0) : 60 <= W && W < 120 ? (oe = ke, ce = fe, de = 0) : 120 <= W && W < 180 ? (oe = 0, ce = fe, de = ke) : 180 <= W && W < 240 ? (oe = 0, ce = ke, de = fe) : 240 <= W && W < 300 ? (oe = ke, ce = 0, de = fe) : 300 <= W && W < 360 && (oe = fe, ce = 0, de = ke), oe = Math.round((oe + ns) * 255), ce = Math.round((ce + ns) * 255), de = Math.round((de + ns) * 255);
1890
+ const rs = (qa) => {
1891
+ const ls = qa.toString(16);
1892
1892
  return ls.length == 1 ? "0" + ls : ls;
1893
1893
  };
1894
1894
  return `#${rs(oe)}${rs(ce)}${rs(de)}`;
@@ -1904,7 +1904,7 @@ function Rn() {
1904
1904
  rules: [],
1905
1905
  colors: {
1906
1906
  // 'editor.background': activeTheme === 'light' ? '#ffffff' : '#020817',
1907
- "editor.background": Ne === "light" ? "#ffffff" : Ma("--background")
1907
+ "editor.background": Ne === "light" ? "#ffffff" : Ta("--background")
1908
1908
  }
1909
1909
  }), p.editor.setTheme("default");
1910
1910
  }
@@ -1916,7 +1916,7 @@ function Rn() {
1916
1916
  ), () => {
1917
1917
  };
1918
1918
  }, [s, z, n.current]);
1919
- function As(p) {
1919
+ function Ls(p) {
1920
1920
  n.current = p;
1921
1921
  }
1922
1922
  function Aa() {
@@ -1929,14 +1929,14 @@ function Rn() {
1929
1929
  children: /* @__PURE__ */ e.jsxs("div", { className: "w-[99%]", children: [
1930
1930
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 pt-3", children: [
1931
1931
  /* @__PURE__ */ e.jsx(
1932
- zn,
1932
+ Fn,
1933
1933
  {
1934
1934
  checked: D,
1935
1935
  onCheckedChange: () => H(!D),
1936
1936
  text: "Apply Filters"
1937
1937
  }
1938
1938
  ),
1939
- /* @__PURE__ */ e.jsx(Fn, {}),
1939
+ /* @__PURE__ */ e.jsx(On, {}),
1940
1940
  G && o && /* @__PURE__ */ e.jsx(
1941
1941
  He,
1942
1942
  {
@@ -2037,7 +2037,7 @@ function Rn() {
2037
2037
  },
2038
2038
  defaultLanguage: "sql",
2039
2039
  defaultValue: "SELECT * FROM table",
2040
- beforeMount: As,
2040
+ beforeMount: Ls,
2041
2041
  onMount: qe
2042
2042
  }
2043
2043
  )
@@ -2070,7 +2070,7 @@ function Rn() {
2070
2070
  onChange: (p) => {
2071
2071
  J(p && p.trim() || "");
2072
2072
  },
2073
- value: A || Is,
2073
+ value: L || Is,
2074
2074
  options: {
2075
2075
  minimap: {
2076
2076
  enabled: !1
@@ -2084,7 +2084,7 @@ function Rn() {
2084
2084
  renderLineHighlight: "none"
2085
2085
  },
2086
2086
  defaultLanguage: "python",
2087
- beforeMount: As,
2087
+ beforeMount: Ls,
2088
2088
  onMount: qe
2089
2089
  }
2090
2090
  )
@@ -2126,7 +2126,7 @@ function Rn() {
2126
2126
  children: [
2127
2127
  /* @__PURE__ */ e.jsxs("div", { className: "flex grow items-center gap-2", children: [
2128
2128
  /* @__PURE__ */ e.jsxs(
2129
- w,
2129
+ k,
2130
2130
  {
2131
2131
  title: "Shift + Enter",
2132
2132
  disabled: ne || re,
@@ -2137,13 +2137,13 @@ function Rn() {
2137
2137
  size: "sm",
2138
2138
  variant: "outline",
2139
2139
  children: [
2140
- ne || re ? /* @__PURE__ */ e.jsx($e, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(dn, { className: "mr-2 h-4 w-4" }),
2140
+ ne || re ? /* @__PURE__ */ e.jsx($e, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(hn, { className: "mr-2 h-4 w-4" }),
2141
2141
  "Run"
2142
2142
  ]
2143
2143
  }
2144
2144
  ),
2145
2145
  le && /* @__PURE__ */ e.jsx(
2146
- wn,
2146
+ zn,
2147
2147
  {
2148
2148
  error: Ve.message,
2149
2149
  setShowAIDialog: c,
@@ -2152,14 +2152,14 @@ function Rn() {
2152
2152
  }
2153
2153
  ),
2154
2154
  /* @__PURE__ */ e.jsxs(
2155
- w,
2155
+ k,
2156
2156
  {
2157
2157
  onClick: Qe,
2158
2158
  className: "",
2159
2159
  size: "sm",
2160
2160
  variant: "outline",
2161
2161
  children: [
2162
- /* @__PURE__ */ e.jsx(Zt, { className: "mr-2 size-4" }),
2162
+ /* @__PURE__ */ e.jsx(en, { className: "mr-2 size-4" }),
2163
2163
  "Clear"
2164
2164
  ]
2165
2165
  }
@@ -2172,11 +2172,11 @@ function Rn() {
2172
2172
  className: "",
2173
2173
  size: "sm",
2174
2174
  variant: "outline",
2175
- children: /* @__PURE__ */ e.jsx(qn, { className: "size-4 text-foreground/70" })
2175
+ children: /* @__PURE__ */ e.jsx(Rn, { className: "size-4 text-foreground/70" })
2176
2176
  }
2177
2177
  ),
2178
2178
  /* @__PURE__ */ e.jsx(
2179
- Mn,
2179
+ Tn,
2180
2180
  {
2181
2181
  open: r,
2182
2182
  setOpen: c,
@@ -2189,21 +2189,21 @@ function Rn() {
2189
2189
  ] }),
2190
2190
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-end gap-2", children: [
2191
2191
  /* @__PURE__ */ e.jsxs(
2192
- w,
2192
+ k,
2193
2193
  {
2194
2194
  onClick: C,
2195
2195
  size: "sm",
2196
2196
  variant: "outline",
2197
2197
  children: [
2198
- /* @__PURE__ */ e.jsx(rt, { className: "mr-2 size-4 font-bold text-green-600" }),
2198
+ /* @__PURE__ */ e.jsx(lt, { className: "mr-2 size-4 font-bold text-green-600" }),
2199
2199
  "Accept"
2200
2200
  ]
2201
2201
  }
2202
2202
  ),
2203
2203
  /* @__PURE__ */ e.jsxs(
2204
- w,
2204
+ k,
2205
2205
  {
2206
- onClick: Oa,
2206
+ onClick: Ma,
2207
2207
  className: "w-full",
2208
2208
  size: "sm",
2209
2209
  variant: "outline",
@@ -2222,7 +2222,7 @@ function Rn() {
2222
2222
  )
2223
2223
  );
2224
2224
  }
2225
- function _n({ data: s }) {
2225
+ function Hn({ data: s }) {
2226
2226
  var d;
2227
2227
  const [n, a] = me.useState([]), l = Object.keys(s[0]).map((r) => ({
2228
2228
  // header: key,
@@ -2236,29 +2236,29 @@ function _n({ data: s }) {
2236
2236
  onClick: () => c.toggleSorting(c.getIsSorted() === "asc"),
2237
2237
  children: [
2238
2238
  r,
2239
- f === "asc" ? /* @__PURE__ */ e.jsx(lt, { className: "ml-2 h-5 w-5" }) : f === "desc" ? /* @__PURE__ */ e.jsx(it, { className: "ml-2 h-5 w-5" }) : null
2239
+ f === "asc" ? /* @__PURE__ */ e.jsx(it, { className: "ml-2 h-5 w-5" }) : f === "desc" ? /* @__PURE__ */ e.jsx(ot, { className: "ml-2 h-5 w-5" }) : null
2240
2240
  ]
2241
2241
  }
2242
2242
  ) });
2243
2243
  }
2244
- })), o = ot({
2244
+ })), o = ct({
2245
2245
  data: s,
2246
2246
  columns: l,
2247
- getCoreRowModel: ut(),
2248
- getPaginationRowModel: xt(),
2247
+ getCoreRowModel: xt(),
2248
+ getPaginationRowModel: pt(),
2249
2249
  onSortingChange: a,
2250
- getSortedRowModel: pt(),
2250
+ getSortedRowModel: ft(),
2251
2251
  manualPagination: !0,
2252
2252
  state: {
2253
2253
  sorting: n
2254
2254
  }
2255
2255
  });
2256
- return /* @__PURE__ */ e.jsxs(ct, { children: [
2257
- /* @__PURE__ */ e.jsx(dt, { children: o.getHeaderGroups().map((r) => /* @__PURE__ */ e.jsx(is, { children: r.headers.map((c) => /* @__PURE__ */ e.jsx(ht, { className: "sticky top-0 bg-muted", children: c.isPlaceholder ? null : Vs(
2256
+ return /* @__PURE__ */ e.jsxs(dt, { children: [
2257
+ /* @__PURE__ */ e.jsx(ht, { children: o.getHeaderGroups().map((r) => /* @__PURE__ */ e.jsx(is, { children: r.headers.map((c) => /* @__PURE__ */ e.jsx(mt, { className: "sticky top-0 bg-muted", children: c.isPlaceholder ? null : Vs(
2258
2258
  c.column.columnDef.header,
2259
2259
  c.getContext()
2260
2260
  ) }, c.id)) }, r.id)) }),
2261
- /* @__PURE__ */ e.jsx(mt, { children: (d = o.getRowModel().rows) != null && d.length ? o.getRowModel().rows.map((r) => /* @__PURE__ */ e.jsx(
2261
+ /* @__PURE__ */ e.jsx(ut, { children: (d = o.getRowModel().rows) != null && d.length ? o.getRowModel().rows.map((r) => /* @__PURE__ */ e.jsx(
2262
2262
  is,
2263
2263
  {
2264
2264
  className: "whitespace-nowrap py-2",
@@ -2276,7 +2276,7 @@ function ba({
2276
2276
  }) {
2277
2277
  var d;
2278
2278
  me.useState(0);
2279
- const a = k((r) => r.themeStyle), t = i((r) => r.card), l = i((r) => r.actions.setCard);
2279
+ const a = w((r) => r.themeStyle), t = i((r) => r.card), l = i((r) => r.actions.setCard);
2280
2280
  if (P(() => {
2281
2281
  }, [
2282
2282
  t.data,
@@ -2295,19 +2295,19 @@ function ba({
2295
2295
  customCfg: t.customCfg,
2296
2296
  preferences: t.preferences
2297
2297
  })), /* @__PURE__ */ e.jsxs(
2298
- ft,
2298
+ gt,
2299
2299
  {
2300
2300
  role: "editor-visual-card",
2301
2301
  className: Y("relative flex h-full flex-col rounded-none", s),
2302
2302
  ...n,
2303
2303
  children: [
2304
- /* @__PURE__ */ e.jsxs(gt, { className: "py-4", children: [
2304
+ /* @__PURE__ */ e.jsxs(jt, { className: "py-4", children: [
2305
2305
  /* @__PURE__ */ e.jsx(
2306
2306
  Rs,
2307
2307
  {
2308
2308
  text: t.title,
2309
2309
  onSave: (r) => l({ ...t, title: r }),
2310
- children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e.jsx(jt, { className: "text-base", children: t.title }) })
2310
+ children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e.jsx(bt, { className: "text-base", children: t.title }) })
2311
2311
  },
2312
2312
  t.title
2313
2313
  ),
@@ -2316,7 +2316,7 @@ function ba({
2316
2316
  {
2317
2317
  text: t.description || "",
2318
2318
  onSave: (r) => l({ ...t, description: r }),
2319
- children: /* @__PURE__ */ e.jsxs(bt, { children: [
2319
+ children: /* @__PURE__ */ e.jsxs(yt, { children: [
2320
2320
  " ",
2321
2321
  t.description
2322
2322
  ] })
@@ -2324,33 +2324,33 @@ function ba({
2324
2324
  t.description
2325
2325
  )
2326
2326
  ] }),
2327
- /* @__PURE__ */ e.jsxs(yt, { className: "flex grow flex-col pb-3", children: [
2327
+ /* @__PURE__ */ e.jsxs(vt, { className: "flex grow flex-col pb-3", children: [
2328
2328
  t.type !== "table" && o && // <ChartJsVisual key={visualKey} cfg={cfg} />
2329
2329
  /* @__PURE__ */ e.jsx(
2330
- vt,
2330
+ Nt,
2331
2331
  {
2332
2332
  cfg: o
2333
2333
  },
2334
2334
  JSON.stringify(o) + JSON.stringify(t.preferences) + ((d = t == null ? void 0 : t.preferences) == null ? void 0 : d.customVisualCode)
2335
2335
  ),
2336
2336
  t.type === "table" && t.data && t.data.length > 0 && // All of the below css classes are #IMPORTANT for the table to scroll properly
2337
- /* @__PURE__ */ e.jsx(Nt, { className: "flex min-h-0 flex-1 grow basis-0", children: /* @__PURE__ */ e.jsx(Ct, { card: t, data: t == null ? void 0 : t.data }) })
2337
+ /* @__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 }) })
2338
2338
  ] })
2339
2339
  ]
2340
2340
  }
2341
2341
  );
2342
2342
  }
2343
- function Hn() {
2343
+ function Bn() {
2344
2344
  const [s, n] = T(!1), [a, t] = T(""), [l, o] = T(""), [d, r] = T(""), [c, f] = T(""), m = i((N) => N.card), u = i(
2345
2345
  (N) => N.card.customCfg
2346
- ), { setCardCustomCfg: S, setCustomVisualCode: h } = St();
2346
+ ), { setCardCustomCfg: S, setCustomVisualCode: h } = kt();
2347
2347
  function x(N) {
2348
- var F, A;
2348
+ var F, L;
2349
2349
  const O = {
2350
2350
  ...N,
2351
2351
  data: {
2352
2352
  ...N == null ? void 0 : N.data,
2353
- datasets: (A = (F = N == null ? void 0 : N.data) == null ? void 0 : F.datasets) == null ? void 0 : A.map((V) => ({
2353
+ datasets: (L = (F = N == null ? void 0 : N.data) == null ? void 0 : F.datasets) == null ? void 0 : L.map((V) => ({
2354
2354
  ...V,
2355
2355
  data: []
2356
2356
  }))
@@ -2382,7 +2382,7 @@ function Hn() {
2382
2382
  function b() {
2383
2383
  o(""), S(null);
2384
2384
  }
2385
- function L() {
2385
+ function E() {
2386
2386
  let N;
2387
2387
  if (u) {
2388
2388
  const O = _s.cloneDeep(m.cfg), j = _s.merge(O, u);
@@ -2392,13 +2392,13 @@ function Hn() {
2392
2392
  }
2393
2393
  return /* @__PURE__ */ e.jsxs(ps, { open: s, onOpenChange: n, children: [
2394
2394
  /* @__PURE__ */ e.jsx(fs, { asChild: !0, children: /* @__PURE__ */ e.jsx(
2395
- w,
2395
+ k,
2396
2396
  {
2397
2397
  onClick: g,
2398
2398
  className: ` ${u && "border-foreground/50 dark:border-foreground/70"}`,
2399
2399
  size: "sm",
2400
2400
  variant: "outline",
2401
- children: /* @__PURE__ */ e.jsx(kt, { className: "h-4 w-4" })
2401
+ children: /* @__PURE__ */ e.jsx(wt, { className: "h-4 w-4" })
2402
2402
  }
2403
2403
  ) }),
2404
2404
  /* @__PURE__ */ e.jsxs(
@@ -2411,7 +2411,7 @@ function Hn() {
2411
2411
  /* @__PURE__ */ e.jsx(bs, { children: "Customize Card" }),
2412
2412
  /* @__PURE__ */ e.jsxs(vs, { children: [
2413
2413
  /* @__PURE__ */ e.jsx(Ws, { children: /* @__PURE__ */ e.jsx(
2414
- tn,
2414
+ nn,
2415
2415
  {
2416
2416
  onClick: () => {
2417
2417
  navigator.clipboard.writeText(m.id);
@@ -2437,10 +2437,10 @@ function Hn() {
2437
2437
  ] }),
2438
2438
  /* @__PURE__ */ e.jsxs("div", { className: "flex grow gap-2", children: [
2439
2439
  /* @__PURE__ */ e.jsx(ba, { className: "w-1/2 rounded shadow-none" }),
2440
- /* @__PURE__ */ e.jsxs(wt, { defaultValue: "custom-config", className: "flex w-1/2 flex-col", children: [
2441
- /* @__PURE__ */ e.jsxs(zt, { className: "justify-start rounded-sm rounded-b-none border border-b-0", children: [
2440
+ /* @__PURE__ */ e.jsxs(zt, { defaultValue: "custom-config", className: "flex w-1/2 flex-col", children: [
2441
+ /* @__PURE__ */ e.jsxs(Ft, { className: "justify-start rounded-sm rounded-b-none border border-b-0", children: [
2442
2442
  /* @__PURE__ */ e.jsxs(os, { value: "custom-config", children: [
2443
- u && /* @__PURE__ */ e.jsx(Ft, { className: "mr-1 h-5 w-5 text-green-600" }),
2443
+ u && /* @__PURE__ */ e.jsx(Ot, { className: "mr-1 h-5 w-5 text-green-600" }),
2444
2444
  u ? "Custom Config" : "Default Config"
2445
2445
  ] }),
2446
2446
  /* @__PURE__ */ e.jsx(os, { className: "", value: "output", children: "Output" }),
@@ -2484,7 +2484,7 @@ function Hn() {
2484
2484
  renderLineHighlight: "none"
2485
2485
  },
2486
2486
  defaultLanguage: "json",
2487
- value: L(),
2487
+ value: E(),
2488
2488
  onChange: (N) => o(N)
2489
2489
  }
2490
2490
  )
@@ -2524,7 +2524,7 @@ function Hn() {
2524
2524
  /* @__PURE__ */ e.jsxs(Js, { className: "flex items-center", children: [
2525
2525
  /* @__PURE__ */ e.jsx(B, { className: "mr-2 text-red-500", children: c }),
2526
2526
  /* @__PURE__ */ e.jsx(
2527
- w,
2527
+ k,
2528
2528
  {
2529
2529
  disabled: !u,
2530
2530
  onClick: b,
@@ -2532,8 +2532,8 @@ function Hn() {
2532
2532
  children: "Reset"
2533
2533
  }
2534
2534
  ),
2535
- /* @__PURE__ */ e.jsx(w, { onClick: z, variant: "outline", children: "Apply" }),
2536
- /* @__PURE__ */ e.jsx(w, { onClick: () => n(!1), variant: "outline", children: "Close" })
2535
+ /* @__PURE__ */ e.jsx(k, { onClick: z, variant: "outline", children: "Apply" }),
2536
+ /* @__PURE__ */ e.jsx(k, { onClick: () => n(!1), variant: "outline", children: "Close" })
2537
2537
  ] })
2538
2538
  ]
2539
2539
  }
@@ -2541,27 +2541,30 @@ function Hn() {
2541
2541
  ] });
2542
2542
  }
2543
2543
  function ya(s) {
2544
- return fe({ 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);
2544
+ return ue({ 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);
2545
2545
  }
2546
2546
  function va(s) {
2547
- return fe({ 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);
2547
+ return ue({ 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);
2548
2548
  }
2549
2549
  function Na(s) {
2550
- return fe({ 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);
2550
+ return ue({ 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);
2551
2551
  }
2552
2552
  function Ca(s) {
2553
- return fe({ 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);
2553
+ return ue({ 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);
2554
2554
  }
2555
2555
  function Sa(s) {
2556
- return fe({ 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);
2556
+ return ue({ 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);
2557
2557
  }
2558
2558
  function ka(s) {
2559
- return fe({ 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);
2559
+ return ue({ 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);
2560
2560
  }
2561
2561
  function wa(s) {
2562
- return fe({ 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);
2562
+ return ue({ 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);
2563
2563
  }
2564
- function Bn() {
2564
+ function za(s) {
2565
+ return ue({ 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);
2566
+ }
2567
+ function $n() {
2565
2568
  const [s, n] = T(!1), a = i((c) => c.card.type), { setCardType: t, setCardPreferences: l, setChartOrientation: o } = i((c) => c.actions), d = i(
2566
2569
  (c) => c.actions.setCardCustomCfg
2567
2570
  );
@@ -2569,10 +2572,10 @@ function Bn() {
2569
2572
  d(null), l({}), t(c), n(!1);
2570
2573
  }
2571
2574
  return /* @__PURE__ */ e.jsxs(Ue, { open: s, onOpenChange: n, children: [
2572
- /* @__PURE__ */ e.jsx(Ge, { asChild: !0, children: /* @__PURE__ */ e.jsx(w, { size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx($n, { className: "h-4 w-4", chartType: a }) }) }),
2575
+ /* @__PURE__ */ e.jsx(Ge, { asChild: !0, children: /* @__PURE__ */ e.jsx(k, { size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(Pn, { className: "h-4 w-4", chartType: a }) }) }),
2573
2576
  /* @__PURE__ */ e.jsx(Je, { className: "w-50", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 place-items-center", children: [
2574
2577
  /* @__PURE__ */ e.jsx(
2575
- w,
2578
+ k,
2576
2579
  {
2577
2580
  onClick: () => r("bar"),
2578
2581
  className: "font-normal",
@@ -2581,7 +2584,7 @@ function Bn() {
2581
2584
  }
2582
2585
  ),
2583
2586
  /* @__PURE__ */ e.jsx(
2584
- w,
2587
+ k,
2585
2588
  {
2586
2589
  onClick: () => r("line"),
2587
2590
  variant: "ghost",
@@ -2589,15 +2592,23 @@ function Bn() {
2589
2592
  }
2590
2593
  ),
2591
2594
  /* @__PURE__ */ e.jsx(
2592
- w,
2595
+ k,
2593
2596
  {
2594
2597
  onClick: () => r("stackedBar"),
2595
2598
  variant: "ghost",
2599
+ children: /* @__PURE__ */ e.jsx(ka, { className: "size-5", strokeWidth: 0 })
2600
+ }
2601
+ ),
2602
+ /* @__PURE__ */ e.jsx(
2603
+ k,
2604
+ {
2605
+ onClick: () => r("stackedLine"),
2606
+ variant: "ghost",
2596
2607
  children: /* @__PURE__ */ e.jsx(Sa, { className: "size-5", strokeWidth: 0 })
2597
2608
  }
2598
2609
  ),
2599
2610
  /* @__PURE__ */ e.jsx(
2600
- w,
2611
+ k,
2601
2612
  {
2602
2613
  onClick: () => r("scatter"),
2603
2614
  variant: "ghost",
@@ -2605,7 +2616,7 @@ function Bn() {
2605
2616
  }
2606
2617
  ),
2607
2618
  /* @__PURE__ */ e.jsx(
2608
- w,
2619
+ k,
2609
2620
  {
2610
2621
  onClick: () => r("bubble"),
2611
2622
  variant: "ghost",
@@ -2613,7 +2624,7 @@ function Bn() {
2613
2624
  }
2614
2625
  ),
2615
2626
  /* @__PURE__ */ e.jsx(
2616
- w,
2627
+ k,
2617
2628
  {
2618
2629
  onClick: () => r("pie"),
2619
2630
  variant: "ghost",
@@ -2621,7 +2632,7 @@ function Bn() {
2621
2632
  }
2622
2633
  ),
2623
2634
  /* @__PURE__ */ e.jsx(
2624
- w,
2635
+ k,
2625
2636
  {
2626
2637
  onClick: () => r("doughnut"),
2627
2638
  variant: "ghost",
@@ -2629,7 +2640,7 @@ function Bn() {
2629
2640
  }
2630
2641
  ),
2631
2642
  /* @__PURE__ */ e.jsx(
2632
- w,
2643
+ k,
2633
2644
  {
2634
2645
  onClick: () => r("radar"),
2635
2646
  variant: "ghost",
@@ -2643,7 +2654,7 @@ function Bn() {
2643
2654
  }
2644
2655
  ),
2645
2656
  /* @__PURE__ */ e.jsx(
2646
- w,
2657
+ k,
2647
2658
  {
2648
2659
  onClick: () => r("polarArea"),
2649
2660
  variant: "ghost",
@@ -2651,15 +2662,15 @@ function Bn() {
2651
2662
  }
2652
2663
  ),
2653
2664
  /* @__PURE__ */ e.jsx(
2654
- w,
2665
+ k,
2655
2666
  {
2656
2667
  onClick: () => r("pyramid"),
2657
2668
  variant: "ghost",
2658
- children: /* @__PURE__ */ e.jsx(wa, { className: "size-5" })
2669
+ children: /* @__PURE__ */ e.jsx(za, { className: "size-5" })
2659
2670
  }
2660
2671
  ),
2661
2672
  /* @__PURE__ */ e.jsx(
2662
- w,
2673
+ k,
2663
2674
  {
2664
2675
  onClick: () => r("range"),
2665
2676
  variant: "ghost",
@@ -2667,7 +2678,7 @@ function Bn() {
2667
2678
  }
2668
2679
  ),
2669
2680
  /* @__PURE__ */ e.jsx(
2670
- w,
2681
+ k,
2671
2682
  {
2672
2683
  onClick: () => r("table"),
2673
2684
  variant: "ghost",
@@ -2675,15 +2686,15 @@ function Bn() {
2675
2686
  }
2676
2687
  ),
2677
2688
  /* @__PURE__ */ e.jsx(
2678
- w,
2689
+ k,
2679
2690
  {
2680
2691
  onClick: () => r("kpi"),
2681
2692
  variant: "ghost",
2682
- children: /* @__PURE__ */ e.jsx(ka, { className: "size-6" })
2693
+ children: /* @__PURE__ */ e.jsx(wa, { className: "size-6" })
2683
2694
  }
2684
2695
  ),
2685
2696
  /* @__PURE__ */ e.jsx(
2686
- w,
2697
+ k,
2687
2698
  {
2688
2699
  onClick: () => r("text"),
2689
2700
  variant: "ghost",
@@ -2693,7 +2704,7 @@ function Bn() {
2693
2704
  ] }) })
2694
2705
  ] });
2695
2706
  }
2696
- function $n({ chartType: s, className: n }) {
2707
+ function Pn({ chartType: s, className: n }) {
2697
2708
  switch (s) {
2698
2709
  case "bar":
2699
2710
  return /* @__PURE__ */ e.jsx(Fs, { className: n });
@@ -2710,29 +2721,31 @@ function $n({ chartType: s, className: n }) {
2710
2721
  case "doughnut":
2711
2722
  return /* @__PURE__ */ e.jsx(va, { className: n });
2712
2723
  case "stackedBar":
2724
+ return /* @__PURE__ */ e.jsx(ka, { className: "size-4 text-foreground/70" });
2725
+ case "stackedLine":
2713
2726
  return /* @__PURE__ */ e.jsx(Sa, { className: "size-4 text-foreground/70" });
2714
2727
  case "polarArea":
2715
2728
  return /* @__PURE__ */ e.jsx(Na, { className: n });
2716
2729
  case "pyramid":
2717
- return /* @__PURE__ */ e.jsx(wa, { className: n });
2730
+ return /* @__PURE__ */ e.jsx(za, { className: n });
2718
2731
  case "range":
2719
2732
  return /* @__PURE__ */ e.jsx(da, { className: n });
2720
2733
  case "kpi":
2721
- return /* @__PURE__ */ e.jsx(ka, { className: n });
2734
+ return /* @__PURE__ */ e.jsx(wa, { className: n });
2722
2735
  case "text":
2723
2736
  return /* @__PURE__ */ e.jsx(Ms, { className: n });
2724
2737
  default:
2725
2738
  return /* @__PURE__ */ e.jsx(Cs, { className: n });
2726
2739
  }
2727
2740
  }
2728
- function Pn() {
2741
+ function Kn() {
2729
2742
  const s = i(
2730
2743
  (a) => a.card.refreshInterval
2731
2744
  ), n = i(
2732
2745
  (a) => a.actions.setCardRefreshInterval
2733
2746
  );
2734
2747
  return /* @__PURE__ */ e.jsxs(Ue, { children: [
2735
- /* @__PURE__ */ e.jsx(Ge, { asChild: !0, children: /* @__PURE__ */ e.jsx(w, { size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(Qt, { className: "w-4 h-4" }) }) }),
2748
+ /* @__PURE__ */ e.jsx(Ge, { asChild: !0, children: /* @__PURE__ */ e.jsx(k, { size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(Wt, { className: "w-4 h-4" }) }) }),
2736
2749
  /* @__PURE__ */ e.jsx(Je, { 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: [
2737
2750
  /* @__PURE__ */ e.jsx(B, { className: "col-span-3", htmlFor: "width", children: "Refresh Every" }),
2738
2751
  /* @__PURE__ */ e.jsx(
@@ -2754,17 +2767,17 @@ function Ks() {
2754
2767
  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)
2755
2768
  return /* @__PURE__ */ e.jsx(e.Fragment, { children: "No Active Card" });
2756
2769
  function d() {
2757
- 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(Ot, { 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(Mt, { isLoading: t, card: s }) }) }) : /* @__PURE__ */ e.jsx(ba, { className: "grow border-none shadow-none" });
2770
+ 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(ba, { className: "grow border-none shadow-none" });
2758
2771
  }
2759
2772
  return /* @__PURE__ */ e.jsxs("div", { className: "relative flex h-full flex-col pt-3", children: [
2760
2773
  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" }),
2761
2774
  /* @__PURE__ */ e.jsxs("div", { className: "mb-0 flex min-h-10 items-center justify-end gap-2 px-6", children: [
2762
2775
  a && /* @__PURE__ */ e.jsxs("div", { className: "flex grow items-center gap-2", children: [
2763
- /* @__PURE__ */ e.jsx(Bn, {}),
2764
- s.type !== "table" && /* @__PURE__ */ e.jsx(Hn, {}),
2765
- /* @__PURE__ */ e.jsx(Pn, {})
2776
+ /* @__PURE__ */ e.jsx($n, {}),
2777
+ s.type !== "table" && /* @__PURE__ */ e.jsx(Bn, {}),
2778
+ /* @__PURE__ */ e.jsx(Kn, {})
2766
2779
  ] }),
2767
- /* @__PURE__ */ e.jsx(Un, {})
2780
+ /* @__PURE__ */ e.jsx(Gn, {})
2768
2781
  ] }),
2769
2782
  a ? d() : (
2770
2783
  // card.type === 'kpi' ? (
@@ -2777,14 +2790,14 @@ function Ks() {
2777
2790
  // <EditorCard className="grow border-none shadow-none" />
2778
2791
  // )
2779
2792
  /* @__PURE__ */ e.jsxs("div", { className: "flex min-h-0 w-full flex-1 grow basis-0 px-6", children: [
2780
- o && /* @__PURE__ */ e.jsx(Kn, {}),
2781
- s.data && s.data.length > 0 && /* @__PURE__ */ e.jsx(_n, { data: n || [] }),
2793
+ o && /* @__PURE__ */ e.jsx(Un, {}),
2794
+ s.data && s.data.length > 0 && /* @__PURE__ */ e.jsx(Hn, { data: n || [] }),
2782
2795
  l && /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm", children: l })
2783
2796
  ] })
2784
2797
  )
2785
2798
  ] });
2786
2799
  }
2787
- function Kn() {
2800
+ function Un() {
2788
2801
  const s = i((a) => a.pythonStdOut);
2789
2802
  if (!s)
2790
2803
  return null;
@@ -2801,14 +2814,14 @@ function Kn() {
2801
2814
  /* @__PURE__ */ e.jsx(ks, { className: "mb-2" })
2802
2815
  ] });
2803
2816
  }
2804
- function Un() {
2817
+ function Gn() {
2805
2818
  const s = i((a) => a.isShowingVisual), n = i(
2806
2819
  (a) => a.actions.setIsShowingVisual
2807
2820
  );
2808
2821
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
2809
2822
  /* @__PURE__ */ e.jsx(B, { htmlFor: "visualize", children: "Chart" }),
2810
2823
  /* @__PURE__ */ e.jsx(
2811
- Tt,
2824
+ Lt,
2812
2825
  {
2813
2826
  checked: s,
2814
2827
  onCheckedChange: () => n(!s),
@@ -2969,7 +2982,7 @@ function Us(s, n) {
2969
2982
  const a = oa(s, n);
2970
2983
  return ((o = (l = (t = s == null ? void 0 : s.chartOptions) == null ? void 0 : t.scales) == null ? void 0 : l[a]) == null ? void 0 : o.type) || "linear";
2971
2984
  }
2972
- function za() {
2985
+ function Fa() {
2973
2986
  var Q, ee, Z, J, I, y;
2974
2987
  const [s, n] = T(!1), a = i((v) => {
2975
2988
  var M;
@@ -2983,19 +2996,19 @@ function za() {
2983
2996
  ((Z = (ee = (Q = a == null ? void 0 : a.chartOptions) == null ? void 0 : Q.scales) == null ? void 0 : ee[l]) == null ? void 0 : Z.min) || ""
2984
2997
  ), [f, m] = T(
2985
2998
  ((y = (I = (J = a == null ? void 0 : a.chartOptions) == null ? void 0 : J.scales) == null ? void 0 : I[l]) == null ? void 0 : y.max) || ""
2986
- ), [u, S] = T(r || f ? "custom" : "auto"), [h, x] = T(""), [g, z] = T(0), [b, L] = T(""), [N, O] = T(""), [j, F] = T(""), A = i(
2999
+ ), [u, S] = T(r || f ? "custom" : "auto"), [h, x] = T(""), [g, z] = T(0), [b, E] = T(""), [N, O] = T(""), [j, F] = T(""), L = i(
2987
3000
  (v) => v.actions.setCardPreferences
2988
3001
  ), V = i((v) => {
2989
3002
  var M;
2990
3003
  return (M = v.card) == null ? void 0 : M.type;
2991
3004
  }), K = ["pie", "doughnut", "polarArea"].includes(V);
2992
3005
  P(() => {
2993
- var v, M, H, ue, se, ge, je, be, xe, U, ne, re, ye, le;
3006
+ var v, M, H, xe, se, ge, je, be, pe, U, ne, re, ye, le;
2994
3007
  d(Us(a)), c(
2995
3008
  ((H = (M = (v = a == null ? void 0 : a.chartOptions) == null ? void 0 : v.scales) == null ? void 0 : M[l]) == null ? void 0 : H.min) === 0 ? 0 : ""
2996
- ), m(((ge = (se = (ue = a == null ? void 0 : a.chartOptions) == null ? void 0 : ue.scales) == null ? void 0 : se[l]) == null ? void 0 : ge.max) || ""), x(
2997
- ((U = (xe = (be = (je = a == null ? void 0 : a.chartOptions) == null ? void 0 : je.scales) == null ? void 0 : be[l]) == null ? void 0 : xe.ticks) == null ? void 0 : U.stepSize) || ""
2998
- ), z(((ne = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : ne.decimalPlaces) || 0), L(((re = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : re.suffix) || ""), O(((ye = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : ye.currency) || ""), F(((le = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : le.locale) || "");
3009
+ ), m(((ge = (se = (xe = a == null ? void 0 : a.chartOptions) == null ? void 0 : xe.scales) == null ? void 0 : se[l]) == null ? void 0 : ge.max) || ""), x(
3010
+ ((U = (pe = (be = (je = a == null ? void 0 : a.chartOptions) == null ? void 0 : je.scales) == null ? void 0 : be[l]) == null ? void 0 : pe.ticks) == null ? void 0 : U.stepSize) || ""
3011
+ ), z(((ne = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : ne.decimalPlaces) || 0), E(((re = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : re.suffix) || ""), O(((ye = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : ye.currency) || ""), F(((le = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : le.locale) || "");
2999
3012
  }, [s, a, l]);
3000
3013
  function $(v, M) {
3001
3014
  return M === "" || /^[0-9\b]+$/.test(M) ? Number(M) : Number(v);
@@ -3120,7 +3133,7 @@ function za() {
3120
3133
  locale: j
3121
3134
  }
3122
3135
  };
3123
- console.log(M), A(M);
3136
+ console.log(M), L(M);
3124
3137
  }
3125
3138
  return /* @__PURE__ */ e.jsxs(Ue, { onOpenChange: (v) => n(v), children: [
3126
3139
  /* @__PURE__ */ e.jsx(Ge, { asChild: !0, children: /* @__PURE__ */ e.jsx(At, { className: "size-4 cursor-pointer text-muted-foreground hover:text-foreground" }) }),
@@ -3140,8 +3153,8 @@ function za() {
3140
3153
  onValueChange: (v) => d(v),
3141
3154
  children: [
3142
3155
  /* @__PURE__ */ e.jsx(Me, { className: "col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(Te, {}) }),
3143
- /* @__PURE__ */ e.jsx(Ae, { id: "type", children: /* @__PURE__ */ e.jsxs(Be, { children: [
3144
- /* @__PURE__ */ e.jsx(Le, { children: "Option" }),
3156
+ /* @__PURE__ */ e.jsx(Le, { id: "type", children: /* @__PURE__ */ e.jsxs(Be, { children: [
3157
+ /* @__PURE__ */ e.jsx(Ee, { children: "Option" }),
3145
3158
  /* @__PURE__ */ e.jsx(X, { value: "linear", children: "Linear" }),
3146
3159
  /* @__PURE__ */ e.jsx(X, { value: "logarithmic", children: "Logarithmic" })
3147
3160
  ] }) })
@@ -3177,7 +3190,7 @@ function za() {
3177
3190
  G(),
3178
3191
  /* @__PURE__ */ e.jsx(Et, {}),
3179
3192
  /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-3", children: /* @__PURE__ */ e.jsx(
3180
- w,
3193
+ k,
3181
3194
  {
3182
3195
  onClick: te,
3183
3196
  variant: "secondary",
@@ -3189,7 +3202,7 @@ function za() {
3189
3202
  ] }) })
3190
3203
  ] });
3191
3204
  }
3192
- function Gn({ idx: s }) {
3205
+ function Jn({ idx: s }) {
3193
3206
  var r;
3194
3207
  const n = i((c) => {
3195
3208
  var f;
@@ -3203,7 +3216,7 @@ function Gn({ idx: s }) {
3203
3216
  (c) => c.actions.setCardPreferences
3204
3217
  ), l = (r = n == null ? void 0 : n.chartOptions) == null ? void 0 : r.indexAxis, o = a == null ? void 0 : a.find((c) => c.idx === s);
3205
3218
  function d(c, f) {
3206
- (c === "end" || c === "start") && Dt(It());
3219
+ (c === "end" || c === "start") && It(Vt());
3207
3220
  const m = {
3208
3221
  display: c !== "none",
3209
3222
  align: c,
@@ -3234,27 +3247,27 @@ function Gn({ idx: s }) {
3234
3247
  }
3235
3248
  }
3236
3249
  return /* @__PURE__ */ e.jsxs(Ue, { children: [
3237
- /* @__PURE__ */ e.jsx(Ge, { children: /* @__PURE__ */ e.jsx(fn, { className: "invisible size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible" }) }),
3250
+ /* @__PURE__ */ e.jsx(Ge, { children: /* @__PURE__ */ e.jsx(gn, { className: "invisible size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible" }) }),
3238
3251
  /* @__PURE__ */ e.jsx(Je, { className: "w-fit p-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1", children: [
3239
3252
  /* @__PURE__ */ e.jsx(
3240
- w,
3253
+ k,
3241
3254
  {
3242
3255
  onClick: () => d("none", s),
3243
3256
  size: "sm",
3244
3257
  variant: "secondary",
3245
3258
  className: "h-7 p-1 text-xs font-normal",
3246
- children: /* @__PURE__ */ e.jsx(Lt, { className: "size-4" })
3259
+ children: /* @__PURE__ */ e.jsx(Dt, { className: "size-4" })
3247
3260
  }
3248
3261
  ),
3249
3262
  /* @__PURE__ */ e.jsx(
3250
- w,
3263
+ k,
3251
3264
  {
3252
3265
  onClick: () => d("start", s),
3253
3266
  size: "sm",
3254
3267
  variant: "secondary",
3255
3268
  className: "h-7 p-1 text-xs font-normal",
3256
3269
  children: /* @__PURE__ */ e.jsx(
3257
- nn,
3270
+ rn,
3258
3271
  {
3259
3272
  className: Y("h-4 w-4", {
3260
3273
  "rotate-90": l === "y"
@@ -3264,14 +3277,14 @@ function Gn({ idx: s }) {
3264
3277
  }
3265
3278
  ),
3266
3279
  /* @__PURE__ */ e.jsx(
3267
- w,
3280
+ k,
3268
3281
  {
3269
3282
  onClick: () => d("center", s),
3270
3283
  size: "sm",
3271
3284
  variant: "secondary",
3272
3285
  className: "h-7 p-1 text-xs font-normal",
3273
3286
  children: /* @__PURE__ */ e.jsx(
3274
- ln,
3287
+ on,
3275
3288
  {
3276
3289
  className: Y("h-4 w-4", {
3277
3290
  "rotate-90": l === "y"
@@ -3281,14 +3294,14 @@ function Gn({ idx: s }) {
3281
3294
  }
3282
3295
  ),
3283
3296
  /* @__PURE__ */ e.jsx(
3284
- w,
3297
+ k,
3285
3298
  {
3286
3299
  onClick: () => d("end", s),
3287
3300
  size: "sm",
3288
3301
  variant: "secondary",
3289
3302
  className: "h-7 p-1 text-xs font-normal",
3290
3303
  children: /* @__PURE__ */ e.jsx(
3291
- rn,
3304
+ ln,
3292
3305
  {
3293
3306
  className: Y("h-4 w-4", {
3294
3307
  "rotate-90": l === "y"
@@ -3300,7 +3313,7 @@ function Gn({ idx: s }) {
3300
3313
  ] }) })
3301
3314
  ] });
3302
3315
  }
3303
- function Fa() {
3316
+ function Oa() {
3304
3317
  const s = i((c) => c.card), n = i(
3305
3318
  (c) => {
3306
3319
  var f, m, u;
@@ -3312,8 +3325,8 @@ function Fa() {
3312
3325
  dimensionKeys: d
3313
3326
  } = ms(s.data || []);
3314
3327
  let r = o;
3315
- if (s.type === "stackedBar") {
3316
- const c = Vt({
3328
+ if (["stackedBar", "stackedLine"].includes(s.type)) {
3329
+ const c = qt({
3317
3330
  dataArray: s.data || [],
3318
3331
  groupKey: d[0],
3319
3332
  pivotKey: d[1],
@@ -3329,13 +3342,13 @@ function Fa() {
3329
3342
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
3330
3343
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between gap-5", children: [
3331
3344
  /* @__PURE__ */ e.jsx(B, { children: t }),
3332
- /* @__PURE__ */ e.jsx(za, {})
3345
+ /* @__PURE__ */ e.jsx(Fa, {})
3333
3346
  ] }),
3334
- /* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: r.map((c, f) => /* @__PURE__ */ e.jsx(Jn, { col: c, idx: f }, c)) })
3347
+ /* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: r.map((c, f) => /* @__PURE__ */ e.jsx(Qn, { col: c, idx: f }, c)) })
3335
3348
  ] })
3336
3349
  ] });
3337
3350
  }
3338
- function Jn({ col: s, idx: n }) {
3351
+ function Qn({ col: s, idx: n }) {
3339
3352
  const a = i((r) => {
3340
3353
  var c;
3341
3354
  return (c = r.card) == null ? void 0 : c.preferences;
@@ -3388,7 +3401,7 @@ function Jn({ col: s, idx: n }) {
3388
3401
  }
3389
3402
  ),
3390
3403
  /* @__PURE__ */ e.jsx(
3391
- Wt,
3404
+ Yt,
3392
3405
  {
3393
3406
  onClick: () => d("area"),
3394
3407
  className: "invisible size-4 cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible"
@@ -3401,11 +3414,11 @@ function Jn({ col: s, idx: n }) {
3401
3414
  className: "invisible size-4 cursor-pointer py-2 text-muted-foreground hover:text-foreground group-hover:visible"
3402
3415
  }
3403
3416
  ),
3404
- /* @__PURE__ */ e.jsx(Gn, { idx: n })
3417
+ /* @__PURE__ */ e.jsx(Jn, { idx: n })
3405
3418
  ] })
3406
3419
  ] });
3407
3420
  }
3408
- function Qn({
3421
+ function Wn({
3409
3422
  cardType: s
3410
3423
  }) {
3411
3424
  return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Se, { defaultValue: ["item-2"], type: "multiple", children: [
@@ -3438,7 +3451,7 @@ function Qn({
3438
3451
  /* @__PURE__ */ e.jsx(R, { children: "Settings" }),
3439
3452
  /* @__PURE__ */ e.jsxs(_, { className: "space-y-4 px-2", children: [
3440
3453
  /* @__PURE__ */ e.jsx(as, {}),
3441
- /* @__PURE__ */ e.jsx(Fa, {})
3454
+ /* @__PURE__ */ e.jsx(Oa, {})
3442
3455
  ] })
3443
3456
  ] }),
3444
3457
  /* @__PURE__ */ e.jsxs(q, { value: "item-3", children: [
@@ -3476,7 +3489,7 @@ function Ts() {
3476
3489
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
3477
3490
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center justify-between", children: [
3478
3491
  /* @__PURE__ */ e.jsx("label", { className: "font-medium", children: "Data Labels" }),
3479
- !["pyramid"].includes(a) && /* @__PURE__ */ e.jsx(za, {})
3492
+ !["pyramid"].includes(a) && /* @__PURE__ */ e.jsx(Fa, {})
3480
3493
  ] }),
3481
3494
  /* @__PURE__ */ e.jsxs(
3482
3495
  Oe,
@@ -3486,8 +3499,8 @@ function Ts() {
3486
3499
  defaultValue: "none",
3487
3500
  children: [
3488
3501
  /* @__PURE__ */ e.jsx(Me, { className: "h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(Te, { placeholder: "Select position" }) }),
3489
- /* @__PURE__ */ e.jsx(Ae, { children: /* @__PURE__ */ e.jsxs(Be, { children: [
3490
- /* @__PURE__ */ e.jsx(Le, { children: "Data Labels" }),
3502
+ /* @__PURE__ */ e.jsx(Le, { children: /* @__PURE__ */ e.jsxs(Be, { children: [
3503
+ /* @__PURE__ */ e.jsx(Ee, { children: "Data Labels" }),
3491
3504
  /* @__PURE__ */ e.jsx(X, { value: "none", children: "None" }),
3492
3505
  a !== "pyramid" && /* @__PURE__ */ e.jsx(X, { value: "start", children: "Start" }),
3493
3506
  /* @__PURE__ */ e.jsx(X, { value: "center", children: "Center" }),
@@ -3498,7 +3511,7 @@ function Ts() {
3498
3511
  )
3499
3512
  ] });
3500
3513
  }
3501
- function Wn({
3514
+ function Yn({
3502
3515
  cardType: s
3503
3516
  }) {
3504
3517
  function n(a) {
@@ -3543,7 +3556,7 @@ function Wn({
3543
3556
  ] })
3544
3557
  ] }) });
3545
3558
  }
3546
- const Yn = {
3559
+ const Xn = {
3547
3560
  datasets: [
3548
3561
  {
3549
3562
  type: "line",
@@ -3556,7 +3569,7 @@ const Yn = {
3556
3569
  data: []
3557
3570
  }
3558
3571
  ]
3559
- }, Xn = {
3572
+ }, Zn = {
3560
3573
  datasets: [
3561
3574
  {
3562
3575
  fill: "origin",
@@ -3566,7 +3579,7 @@ const Yn = {
3566
3579
  }
3567
3580
  ]
3568
3581
  };
3569
- function Zn() {
3582
+ function er() {
3570
3583
  const s = i((n) => n.card.type);
3571
3584
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 p-6", children: [
3572
3585
  /* @__PURE__ */ e.jsx(
@@ -3575,7 +3588,7 @@ function Zn() {
3575
3588
  className: " ",
3576
3589
  type: "single",
3577
3590
  collapsible: !0,
3578
- children: er(s)
3591
+ children: sr(s)
3579
3592
  }
3580
3593
  ),
3581
3594
  /* @__PURE__ */ e.jsx("section", { className: "", children: ["line", "bar"].includes(s) && /* @__PURE__ */ e.jsx(as, {}) }),
@@ -3583,7 +3596,7 @@ function Zn() {
3583
3596
  /* @__PURE__ */ e.jsx("div", { children: !["kpi"].includes(s) && /* @__PURE__ */ e.jsx(Ie, {}) })
3584
3597
  ] });
3585
3598
  }
3586
- function er(s) {
3599
+ function sr(s) {
3587
3600
  if (["line", "bar"].includes(s))
3588
3601
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3589
3602
  /* @__PURE__ */ e.jsxs(q, { value: "item-1", children: [
@@ -3604,7 +3617,7 @@ function er(s) {
3604
3617
  /* @__PURE__ */ e.jsx("b", { children: "Customize" }),
3605
3618
  " and change the `type` property in the dataset."
3606
3619
  ] }),
3607
- /* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(Yn, null, 2) })
3620
+ /* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(Xn, null, 2) })
3608
3621
  ] })
3609
3622
  ] }),
3610
3623
  /* @__PURE__ */ e.jsxs(q, { value: "item-3", children: [
@@ -3625,7 +3638,7 @@ function er(s) {
3625
3638
  ),
3626
3639
  "for more options."
3627
3640
  ] }),
3628
- /* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(Xn, null, 2) })
3641
+ /* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(Zn, null, 2) })
3629
3642
  ] })
3630
3643
  ] })
3631
3644
  ] });
@@ -3680,7 +3693,7 @@ function er(s) {
3680
3693
  ] })
3681
3694
  ] }) });
3682
3695
  }
3683
- function sr() {
3696
+ function ar() {
3684
3697
  var c, f, m, u, S;
3685
3698
  const s = i((h) => h.card.preferences), n = i(
3686
3699
  (h) => h.actions.setCardPreferences
@@ -3754,8 +3767,8 @@ function sr() {
3754
3767
  },
3755
3768
  children: [
3756
3769
  /* @__PURE__ */ e.jsx(Me, { className: "col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(Te, {}) }),
3757
- /* @__PURE__ */ e.jsx(Ae, { children: /* @__PURE__ */ e.jsxs(Be, { children: [
3758
- /* @__PURE__ */ e.jsx(Le, { children: "Format" }),
3770
+ /* @__PURE__ */ e.jsx(Le, { children: /* @__PURE__ */ e.jsxs(Be, { children: [
3771
+ /* @__PURE__ */ e.jsx(Ee, { children: "Format" }),
3759
3772
  Hs.map((h) => /* @__PURE__ */ e.jsx(X, { value: h.locale, children: h.locale }, h.locale))
3760
3773
  ] }) })
3761
3774
  ]
@@ -3779,8 +3792,8 @@ function sr() {
3779
3792
  },
3780
3793
  children: [
3781
3794
  /* @__PURE__ */ e.jsx(Me, { className: "col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(Te, {}) }),
3782
- /* @__PURE__ */ e.jsx(Ae, { children: /* @__PURE__ */ e.jsxs(Be, { children: [
3783
- /* @__PURE__ */ e.jsx(Le, { children: "Currency" }),
3795
+ /* @__PURE__ */ e.jsx(Le, { children: /* @__PURE__ */ e.jsxs(Be, { children: [
3796
+ /* @__PURE__ */ e.jsx(Ee, { children: "Currency" }),
3784
3797
  /* @__PURE__ */ e.jsx(X, { value: "none", children: "None" }, "none"),
3785
3798
  r.map((h) => /* @__PURE__ */ e.jsx(X, { value: h, children: h }, h))
3786
3799
  ] }) })
@@ -3807,7 +3820,7 @@ function sr() {
3807
3820
  },
3808
3821
  children: [
3809
3822
  /* @__PURE__ */ e.jsx(Me, { className: "col-span-3 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(Te, {}) }),
3810
- /* @__PURE__ */ e.jsx(Ae, { children: ["0", "1", "2", "3", "4"].map((h) => /* @__PURE__ */ e.jsx(X, { value: h, children: h }, h)) })
3823
+ /* @__PURE__ */ e.jsx(Le, { children: ["0", "1", "2", "3", "4"].map((h) => /* @__PURE__ */ e.jsx(X, { value: h, children: h }, h)) })
3811
3824
  ]
3812
3825
  }
3813
3826
  )
@@ -3836,7 +3849,7 @@ function sr() {
3836
3849
  ] }) }),
3837
3850
  /* @__PURE__ */ e.jsx(ks, { className: "my-3" }),
3838
3851
  /* @__PURE__ */ e.jsx(
3839
- qt,
3852
+ Rt,
3840
3853
  {
3841
3854
  colorRanges: o,
3842
3855
  setColorRanges: d
@@ -3845,7 +3858,7 @@ function sr() {
3845
3858
  ] })
3846
3859
  ] });
3847
3860
  }
3848
- function ar() {
3861
+ function tr() {
3849
3862
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 px-6 py-2", children: [
3850
3863
  /* @__PURE__ */ e.jsx(Se, { type: "single", collapsible: !0, children: /* @__PURE__ */ e.jsxs(q, { value: "item-1", children: [
3851
3864
  /* @__PURE__ */ e.jsx(R, { className: "", children: "KPI Query" }),
@@ -3871,12 +3884,12 @@ function ar() {
3871
3884
  ] })
3872
3885
  ] })
3873
3886
  ] }) }),
3874
- /* @__PURE__ */ e.jsx("section", { className: "", children: /* @__PURE__ */ e.jsx(sr, {}) }),
3887
+ /* @__PURE__ */ e.jsx("section", { className: "", children: /* @__PURE__ */ e.jsx(ar, {}) }),
3875
3888
  /* @__PURE__ */ e.jsx("div", {}),
3876
3889
  /* @__PURE__ */ e.jsx("div", {})
3877
3890
  ] });
3878
3891
  }
3879
- function tr() {
3892
+ function nr() {
3880
3893
  var t;
3881
3894
  const s = i((l) => l.card.preferences), { setCardPreferences: n } = i((l) => l.actions);
3882
3895
  function a(l) {
@@ -3943,7 +3956,7 @@ function Ye({
3943
3956
  /* @__PURE__ */ e.jsxs(_, { className: "space-y-4 px-2", children: [
3944
3957
  s === "range" && /* @__PURE__ */ e.jsx(as, {}),
3945
3958
  s !== "text" && /* @__PURE__ */ e.jsx(Ts, {}),
3946
- s === "text" && /* @__PURE__ */ e.jsx(tr, {})
3959
+ s === "text" && /* @__PURE__ */ e.jsx(nr, {})
3947
3960
  ] })
3948
3961
  ] }),
3949
3962
  !["range", "text"].includes(s) && /* @__PURE__ */ e.jsxs(q, { value: "item-3", children: [
@@ -3952,7 +3965,7 @@ function Ye({
3952
3965
  ] })
3953
3966
  ] }) });
3954
3967
  }
3955
- function nr() {
3968
+ function rr() {
3956
3969
  return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(Se, { defaultValue: ["item-2"], type: "multiple", children: [
3957
3970
  /* @__PURE__ */ e.jsxs(q, { value: "item-1", children: [
3958
3971
  /* @__PURE__ */ e.jsx(R, { children: "Stacked Chart" }),
@@ -3983,7 +3996,7 @@ function nr() {
3983
3996
  /* @__PURE__ */ e.jsx(R, { children: "Settings" }),
3984
3997
  /* @__PURE__ */ e.jsxs(_, { className: "space-y-4 px-2", children: [
3985
3998
  /* @__PURE__ */ e.jsx(as, {}),
3986
- /* @__PURE__ */ e.jsx(Fa, {})
3999
+ /* @__PURE__ */ e.jsx(Oa, {})
3987
4000
  ] })
3988
4001
  ] }),
3989
4002
  /* @__PURE__ */ e.jsxs(q, { value: "item-3", children: [
@@ -3992,7 +4005,7 @@ function nr() {
3992
4005
  ] })
3993
4006
  ] }) });
3994
4007
  }
3995
- function rr({}) {
4008
+ function lr({}) {
3996
4009
  const s = i((t) => {
3997
4010
  var l;
3998
4011
  return (l = t.card) == null ? void 0 : l.preferences;
@@ -4022,7 +4035,7 @@ function rr({}) {
4022
4035
  ] })
4023
4036
  ] });
4024
4037
  }
4025
- const lr = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
4038
+ const ir = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
4026
4039
  /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT dimension, cohort, metric FROM table" }),
4027
4040
  /* @__PURE__ */ e.jsxs("div", { children: [
4028
4041
  "See ",
@@ -4038,7 +4051,7 @@ const lr = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-
4038
4051
  ),
4039
4052
  " in the docs."
4040
4053
  ] })
4041
- ] }), ir = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
4054
+ ] }), or = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
4042
4055
  /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT y-axis, label, range-from, range-to, range-value FROM table" }),
4043
4056
  /* @__PURE__ */ e.jsxs("div", { children: [
4044
4057
  "See ",
@@ -4054,7 +4067,7 @@ const lr = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-
4054
4067
  ),
4055
4068
  " in the docs."
4056
4069
  ] })
4057
- ] }), or = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
4070
+ ] }), cr = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
4058
4071
  /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT text FROM table limit 1" }),
4059
4072
  /* @__PURE__ */ e.jsxs("div", { children: [
4060
4073
  "See ",
@@ -4071,21 +4084,22 @@ const lr = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-
4071
4084
  " in the docs."
4072
4085
  ] })
4073
4086
  ] });
4074
- function cr() {
4087
+ function dr() {
4075
4088
  const s = i((a) => a.card.type);
4076
4089
  function n(a) {
4077
4090
  switch (a) {
4078
4091
  case "stackedBar":
4079
- return /* @__PURE__ */ e.jsx(nr, {});
4092
+ case "stackedLine":
4093
+ return /* @__PURE__ */ e.jsx(rr, {});
4080
4094
  case "pyramid":
4081
- return /* @__PURE__ */ e.jsx(Ye, { docContent: lr, cardType: a });
4095
+ return /* @__PURE__ */ e.jsx(Ye, { docContent: ir, cardType: a });
4082
4096
  case "kpi":
4083
- return /* @__PURE__ */ e.jsx(ar, {});
4097
+ return /* @__PURE__ */ e.jsx(tr, {});
4084
4098
  case "line":
4085
4099
  case "bar":
4086
- return /* @__PURE__ */ e.jsx(Qn, { cardType: a });
4100
+ return /* @__PURE__ */ e.jsx(Wn, { cardType: a });
4087
4101
  case "range":
4088
- return /* @__PURE__ */ e.jsx(Ye, { docContent: ir, cardType: a });
4102
+ return /* @__PURE__ */ e.jsx(Ye, { docContent: or, cardType: a });
4089
4103
  case "pie":
4090
4104
  case "doughnut":
4091
4105
  case "polarArea":
@@ -4093,25 +4107,25 @@ function cr() {
4093
4107
  return /* @__PURE__ */ e.jsx(Ye, { cardType: a });
4094
4108
  case "bubble":
4095
4109
  case "scatter":
4096
- return /* @__PURE__ */ e.jsx(Wn, { cardType: a });
4110
+ return /* @__PURE__ */ e.jsx(Yn, { cardType: a });
4097
4111
  case "table":
4098
- return /* @__PURE__ */ e.jsx(rr, { cardType: a });
4112
+ return /* @__PURE__ */ e.jsx(lr, { cardType: a });
4099
4113
  case "text":
4100
4114
  return /* @__PURE__ */ e.jsx(
4101
4115
  Ye,
4102
4116
  {
4103
- docContent: or,
4117
+ docContent: cr,
4104
4118
  cardType: a,
4105
4119
  suffix: "Visual"
4106
4120
  }
4107
4121
  );
4108
4122
  default:
4109
- return /* @__PURE__ */ e.jsx(Zn, {});
4123
+ return /* @__PURE__ */ e.jsx(er, {});
4110
4124
  }
4111
4125
  }
4112
4126
  return /* @__PURE__ */ e.jsx(Ss, { className: "h-full w-full text-sm", children: n(s) });
4113
4127
  }
4114
- function dr() {
4128
+ function hr() {
4115
4129
  const s = i((n) => n.isShowingVisual);
4116
4130
  return /* @__PURE__ */ e.jsxs(
4117
4131
  us,
@@ -4126,7 +4140,7 @@ function dr() {
4126
4140
  className: "flex",
4127
4141
  minSize: 20,
4128
4142
  defaultSize: 40,
4129
- children: /* @__PURE__ */ e.jsx(Rn, {})
4143
+ children: /* @__PURE__ */ e.jsx(_n, {})
4130
4144
  }
4131
4145
  ),
4132
4146
  /* @__PURE__ */ e.jsx(xs, { withHandle: !0, className: "border" }),
@@ -4145,7 +4159,7 @@ function dr() {
4145
4159
  minSize: 20,
4146
4160
  defaultSize: 25,
4147
4161
  maxSize: 30,
4148
- children: /* @__PURE__ */ e.jsx(cr, {})
4162
+ children: /* @__PURE__ */ e.jsx(dr, {})
4149
4163
  }
4150
4164
  ) }),
4151
4165
  /* @__PURE__ */ e.jsx(xs, { className: "border" }),
@@ -4157,20 +4171,20 @@ function dr() {
4157
4171
  }
4158
4172
  );
4159
4173
  }
4160
- function hr({ authToken: s, onSave: n, onClose: a }) {
4161
- const t = i((d) => d.actions.setOnSave), l = i((d) => d.actions.setOnClose), o = k((d) => d.actions.setAuthToken);
4174
+ function mr({ authToken: s, onSave: n, onClose: a }) {
4175
+ const t = i((d) => d.actions.setOnSave), l = i((d) => d.actions.setOnClose), o = w((d) => d.actions.setAuthToken);
4162
4176
  return P(() => {
4163
4177
  n && t(n), a && l(a);
4164
4178
  }, [n, t, a, l]), P(() => {
4165
4179
  s && s.accessToken && o(s);
4166
- }, [s, o]), /* @__PURE__ */ e.jsxs(Rt, { className: "rounded-none", role: "editor-panel", children: [
4167
- /* @__PURE__ */ e.jsx(_t, { className: "rounded-none border-r-[1.5px]", children: /* @__PURE__ */ e.jsx(fa, {}) }),
4168
- /* @__PURE__ */ e.jsx(Ht, { children: /* @__PURE__ */ e.jsx(dr, {}) })
4180
+ }, [s, o]), /* @__PURE__ */ e.jsxs(_t, { className: "rounded-none", role: "editor-panel", children: [
4181
+ /* @__PURE__ */ e.jsx(Ht, { className: "rounded-none border-r-[1.5px]", children: /* @__PURE__ */ e.jsx(fa, {}) }),
4182
+ /* @__PURE__ */ e.jsx(Bt, { children: /* @__PURE__ */ e.jsx(hr, {}) })
4169
4183
  ] });
4170
4184
  }
4171
- function mr() {
4172
- k((d) => d.selectedCardId);
4173
- const s = k((d) => d.selectedSheetId), { setIsVisualEditing: n } = k((d) => d.actions), a = k((d) => d.isVisualEditing), t = k((d) => d.actions.updateFrame);
4185
+ function ur() {
4186
+ w((d) => d.selectedCardId);
4187
+ const s = w((d) => d.selectedSheetId), { setIsVisualEditing: n } = w((d) => d.actions), a = w((d) => d.isVisualEditing), t = w((d) => d.actions.updateFrame);
4174
4188
  function l(d) {
4175
4189
  s && (t(s, d), n(!1));
4176
4190
  }
@@ -4185,15 +4199,15 @@ function mr() {
4185
4199
  block: a,
4186
4200
  hidden: !a
4187
4201
  }),
4188
- children: /* @__PURE__ */ e.jsx(hr, { onSave: l, onClose: o })
4202
+ children: /* @__PURE__ */ e.jsx(mr, { onSave: l, onClose: o })
4189
4203
  }
4190
4204
  );
4191
4205
  }
4192
- function ur({
4206
+ function xr({
4193
4207
  columns: s,
4194
4208
  tableName: n
4195
4209
  }) {
4196
- const a = i((u) => u.selectedConnectionId), t = i((u) => u.selectedDatabaseName), l = i((u) => u.selectedSchemaName), o = i((u) => u.selectedTableName), d = k((u) => u.dashboard.filters) || [], r = k((u) => u.actions.addFilter), c = k((u) => u.actions.removeFilter), f = k(
4210
+ const a = i((u) => u.selectedConnectionId), t = i((u) => u.selectedDatabaseName), l = i((u) => u.selectedSchemaName), o = i((u) => u.selectedTableName), d = w((u) => u.dashboard.filters) || [], r = w((u) => u.actions.addFilter), c = w((u) => u.actions.removeFilter), f = w(
4197
4211
  (u) => u.actions.removeFilterValue
4198
4212
  );
4199
4213
  function m(u) {
@@ -4207,11 +4221,11 @@ function ur({
4207
4221
  g,
4208
4222
  h
4209
4223
  );
4210
- const L = d == null ? void 0 : d.find(
4224
+ const E = d == null ? void 0 : d.find(
4211
4225
  (N) => N.column === b && N.table === g && (N.database === h || N.database === t)
4212
4226
  );
4213
- if (L)
4214
- f(L.id), c(L.id);
4227
+ if (E)
4228
+ f(E.id), c(E.id);
4215
4229
  else {
4216
4230
  if (n === "api" && a) {
4217
4231
  r({
@@ -4274,16 +4288,16 @@ function ur({
4274
4288
  );
4275
4289
  }) });
4276
4290
  }
4277
- function xr() {
4278
- k((n) => n.showFilters);
4279
- const s = k(
4291
+ function pr() {
4292
+ w((n) => n.showFilters);
4293
+ const s = w(
4280
4294
  (n) => n.actions.setShowFilters
4281
4295
  );
4282
4296
  return /* @__PURE__ */ e.jsxs("section", { className: "relative flex grow flex-col border-l px-4", children: [
4283
4297
  /* @__PURE__ */ e.jsxs("div", { className: "mt-4 flex items-center justify-between gap-2 px-3", children: [
4284
4298
  /* @__PURE__ */ e.jsx(B, { className: "text-lg", children: "Filters" }),
4285
4299
  /* @__PURE__ */ e.jsx(
4286
- w,
4300
+ k,
4287
4301
  {
4288
4302
  onClick: () => s(!1),
4289
4303
  className: "h-7 w-7 p-0",
@@ -4296,7 +4310,7 @@ function xr() {
4296
4310
  fa,
4297
4311
  {
4298
4312
  ColumnsComponent: (n, a, t) => /* @__PURE__ */ e.jsx(
4299
- ur,
4313
+ xr,
4300
4314
  {
4301
4315
  schemaName: n,
4302
4316
  tableName: a,
@@ -4307,10 +4321,10 @@ function xr() {
4307
4321
  ) })
4308
4322
  ] });
4309
4323
  }
4310
- function pr() {
4311
- k((a) => a.dashboard);
4312
- const s = k((a) => a.showFilters), n = k((a) => a.isVisualEditing);
4313
- return k((a) => a.bookmarkKey), /* @__PURE__ */ e.jsxs(
4324
+ function fr() {
4325
+ w((a) => a.dashboard);
4326
+ const s = w((a) => a.showFilters), n = w((a) => a.isVisualEditing);
4327
+ return w((a) => a.bookmarkKey), /* @__PURE__ */ e.jsxs(
4314
4328
  "div",
4315
4329
  {
4316
4330
  role: "dashboard-plus-main",
@@ -4319,17 +4333,17 @@ function pr() {
4319
4333
  flex: !n
4320
4334
  }),
4321
4335
  children: [
4322
- /* @__PURE__ */ e.jsx(Bt, {}),
4323
- s && /* @__PURE__ */ e.jsx("div", { role: "filter-aside-container", className: "flex", children: /* @__PURE__ */ e.jsx(xr, {}) })
4336
+ /* @__PURE__ */ e.jsx($t, {}),
4337
+ s && /* @__PURE__ */ e.jsx("div", { role: "filter-aside-container", className: "flex", children: /* @__PURE__ */ e.jsx(pr, {}) })
4324
4338
  ]
4325
4339
  }
4326
4340
  );
4327
4341
  }
4328
- function fr() {
4329
- const s = k((t) => t.dashboard), n = k((t) => t.actions.setDashboard), a = k(
4342
+ function gr() {
4343
+ const s = w((t) => t.dashboard), n = w((t) => t.actions.setDashboard), a = w(
4330
4344
  (t) => t.showDashboardJSON
4331
4345
  );
4332
- return k(
4346
+ return w(
4333
4347
  (t) => t.actions.setShowDashboardJSON
4334
4348
  ), /* @__PURE__ */ e.jsx(
4335
4349
  "div",
@@ -4338,7 +4352,7 @@ function fr() {
4338
4352
  hidden: !a
4339
4353
  }),
4340
4354
  children: /* @__PURE__ */ e.jsx(
4341
- $t,
4355
+ Pt,
4342
4356
  {
4343
4357
  onChange: (t) => {
4344
4358
  if (t)
@@ -4369,26 +4383,26 @@ function fr() {
4369
4383
  }
4370
4384
  );
4371
4385
  }
4372
- function br({
4386
+ function yr({
4373
4387
  showControls: s = !1,
4374
4388
  showFooter: n = !0,
4375
4389
  showAssistant: a = !1,
4376
4390
  ...t
4377
4391
  }) {
4378
- return /* @__PURE__ */ e.jsxs(Pt, { dashboardProps: t, children: [
4379
- /* @__PURE__ */ e.jsx(Kt, {}),
4380
- /* @__PURE__ */ e.jsxs(Ut, { children: [
4381
- /* @__PURE__ */ e.jsx(fr, {}),
4382
- /* @__PURE__ */ e.jsxs(Gt, { ...t, children: [
4383
- s && /* @__PURE__ */ e.jsx(Nn, {}),
4384
- /* @__PURE__ */ e.jsx(mr, {}),
4385
- /* @__PURE__ */ e.jsx(pr, {})
4392
+ return /* @__PURE__ */ e.jsxs(Kt, { dashboardProps: t, children: [
4393
+ /* @__PURE__ */ e.jsx(Ut, {}),
4394
+ /* @__PURE__ */ e.jsxs(Gt, { children: [
4395
+ /* @__PURE__ */ e.jsx(gr, {}),
4396
+ /* @__PURE__ */ e.jsxs(Jt, { ...t, children: [
4397
+ s && /* @__PURE__ */ e.jsx(Cn, {}),
4398
+ /* @__PURE__ */ e.jsx(ur, {}),
4399
+ /* @__PURE__ */ e.jsx(fr, {})
4386
4400
  ] })
4387
4401
  ] })
4388
4402
  ] });
4389
4403
  }
4390
4404
  export {
4391
- br as D,
4405
+ yr as D,
4392
4406
  We as S,
4393
4407
  pa as u
4394
4408
  };