react-semaphor 0.0.451 → 0.0.453

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.
package/dist/index.js CHANGED
@@ -1,8 +1,9 @@
1
- import { c as z, p as Wt, u as L, a as at, b as Ge, d as Tn, e as zn, B as X, P as Xe, f as An, g as Fn, h as Ln, i as En, L as G, I as ue, j as Vn, k as _n, l as Rn, m as K, n as qn, o as jn, q as Bn, r as vs, s as yn, t as R, C as Kt, v as xs, S as we, w as Se, x as ke, y as Me, z as Oe, A as De, E as de, T as Pn, F as Ue, G as $e, H as St, J as Ie, K as Yt, M as kt, N as Zt, O as Mt, Q as Te, R as Hn, U as Dt, V as Gn, W as Un, X as bn, Y as Cs, Z as f, _ as $n, $ as et, a0 as ft, a1 as Ns, a2 as Qn, a3 as Jn, a4 as Wn, a5 as Kn, a6 as Yn, a7 as Zn, a8 as Xn, a9 as xe, aa as ea, ab as ta, ac as na, ad as aa, ae as sa, af as be, ag as ws, ah as Ce, ai as Be, aj as Ne, ak as Ss, al as ks, am as Ms, an as gt, ao as ze, ap as Ds, aq as Is, ar as Y, as as ra, at as Os, au as Ts, av as zs, aw as Bt, ax as la, ay as Xt, az as It, aA as Pe, aB as ia, aC as yt, aD as Pt, aE as pe, aF as As, aG as Fs, aH as st, aI as Ls, aJ as Es, aK as Vs, aL as oa, aM as _s, aN as Ot, aO as Rs, aP as qs, aQ as js, aR as vn, aS as Bs, aT as Ps, aU as en, aV as ve, aW as Hs, aX as Ht, aY as Ee, aZ as he, a_ as Ve, a$ as Gs, b0 as Us, b1 as $s, b2 as Qs, b3 as Js, b4 as zt, b5 as Ws, b6 as xn, b7 as Ks, b8 as Cn, b9 as Ys, ba as Zs, bb as Xs, bc as er, bd as ca, be as tr, bf as tn, bg as da, bh as nr, bi as ar, bj as Ye, bk as sr, bl as rr, bm as ua, bn as lr, bo as ir, bp as or, bq as cr, br as dr, bs as Tt, bt as ma, bu as ur, bv as nn, bw as an, bx as Ze, by as pt, bz as mr, bA as hr, bB as pr, bC as sn, bD as ha, bE as fr, bF as bt, bG as pa, bH as vt, bI as fa, bJ as ga, bK as ya, bL as gr, bM as yr, bN as br, bO as vr, bP as Fe, bQ as le, bR as ie, bS as oe, bT as rn, bU as xr, bV as Cr, bW as Nr, bX as wr, bY as Nn, bZ as ba, b_ as Sr, b$ as kr, c0 as Mr, c1 as Dr, c2 as ln, c3 as va, c4 as xa, c5 as on, c6 as Ir, c7 as Ca, c8 as Or, c9 as Tr, ca as zr, cb as Ar, cc as Fr, cd as Lr, ce as Er, cf as Vr, cg as At, ch as Na, ci as _r, cj as Rr, ck as qr, cl as jr, cm as Br, cn as Pr, co as Hr } from "./chunks/index-Co_8VPOP.js";
2
- import { D as Vo, ct as _o, cr as Ro, cr as qo, cw as jo, cv as Bo, cu as Po, cx as Ho, cy as Go, cs as Uo, cp as $o, cq as Qo } from "./chunks/index-Co_8VPOP.js";
1
+ import { c as z, p as Wt, u as L, a as at, b as He, d as Tn, e as zn, B as X, P as Ze, f as An, g as Fn, h as Ln, i as En, L as G, I as ue, j as Vn, k as _n, l as Rn, m as K, n as qn, o as jn, q as Bn, r as bs, s as yn, t as R, C as Kt, v as vs, S as we, w as Se, x as ke, y as Me, z as Oe, A as De, E as de, T as Pn, F as Ge, G as Ue, H as kt, J as Ie, K as Yt, M as Mt, N as Zt, O as Dt, Q as Te, R as Hn, U as It, V as Gn, W as Un, X as bn, Y as xs, Z as f, _ as $n, $ as Xe, a0 as ft, a1 as Cs, a2 as Qn, a3 as Jn, a4 as Wn, a5 as Kn, a6 as Yn, a7 as Zn, a8 as Xn, a9 as xe, aa as ea, ab as ta, ac as na, ad as aa, ae as sa, af as be, ag as Ns, ah as Ce, ai as ws, aj as Be, ak as Ne, al as Ss, am as ks, an as Ms, ao as Ds, ap as gt, aq as ze, ar as Is, as as Os, at as Y, au as ra, av as Ts, aw as zs, ax as As, ay as Pt, az as la, aA as Xt, aB as Ot, aC as et, aD as ia, aE as yt, aF as Ht, aG as pe, aH as Fs, aI as Ls, aJ as ot, aK as Es, aL as Vs, aM as _s, aN as oa, aO as Rs, aP as Tt, aQ as qs, aR as js, aS as Bs, aT as vn, aU as Ps, aV as Hs, aW as en, aX as ve, aY as Gs, aZ as Gt, a_ as Ee, a$ as he, b0 as Ve, b1 as Us, b2 as $s, b3 as Qs, b4 as Js, b5 as Ws, b6 as At, b7 as Ks, b8 as xn, b9 as Ys, ba as Cn, bb as Zs, bc as Xs, bd as er, be as tr, bf as ca, bg as nr, bh as tn, bi as da, bj as ar, bk as sr, bl as Ke, bm as rr, bn as lr, bo as ua, bp as ir, bq as or, br as cr, bs as dr, bt as ur, bu as zt, bv as ma, bw as mr, bx as nn, by as an, bz as Ye, bA as pt, bB as hr, bC as pr, bD as fr, bE as sn, bF as ha, bG as gr, bH as bt, bI as pa, bJ as vt, bK as fa, bL as ga, bM as ya, bN as yr, bO as br, bP as vr, bQ as xr, bR as Fe, bS as le, bT as ie, bU as oe, bV as rn, bW as Cr, bX as Nr, bY as wr, bZ as Sr, b_ as Nn, b$ as ba, c0 as kr, c1 as Mr, c2 as Dr, c3 as Ir, c4 as ln, c5 as va, c6 as xa, c7 as on, c8 as Or, c9 as Ca, ca as Tr, cb as zr, cc as Ar, cd as Fr, ce as Lr, cf as Er, cg as Vr, ch as _r, ci as Ft, cj as Na, ck as Rr, cl as qr, cm as jr, cn as Br, co as Pr, cp as Hr, cq as Gr } from "./chunks/index-BZFkR8xE.js";
2
+ import { D as _o, cv as Ro, ct as qo, ct as jo, cy as Bo, cx as Po, cw as Ho, cz as Go, cA as Uo, cu as $o, cr as Qo, cs as Jo } from "./chunks/index-BZFkR8xE.js";
3
+ import { EMPTY_SELECTION as Ko } from "./types/index.js";
3
4
  import { jsxs as r, jsx as e, Fragment as te } from "react/jsx-runtime";
4
- import * as Ke from "react";
5
- import Ae, { useState as J, useMemo as _e, useRef as tt, useCallback as wa, useEffect as me, Suspense as Gr } from "react";
5
+ import * as We from "react";
6
+ import Ae, { useState as J, useMemo as _e, useRef as tt, useCallback as wa, useEffect as me, Suspense as Ur } from "react";
6
7
  import "react-dom";
7
8
  /**
8
9
  * @license lucide-react v0.453.0 - ISC
@@ -10,7 +11,7 @@ import "react-dom";
10
11
  * This source code is licensed under the ISC license.
11
12
  * See the LICENSE file in the root directory of this source tree.
12
13
  */
13
- const Ur = z("AlignCenter", [
14
+ const $r = z("AlignCenter", [
14
15
  ["path", { d: "M17 12H7", key: "16if0g" }],
15
16
  ["path", { d: "M19 18H5", key: "18s9l3" }],
16
17
  ["path", { d: "M21 6H3", key: "1jwq7v" }]
@@ -21,7 +22,7 @@ const Ur = z("AlignCenter", [
21
22
  * This source code is licensed under the ISC license.
22
23
  * See the LICENSE file in the root directory of this source tree.
23
24
  */
24
- const $r = z("AlignLeft", [
25
+ const Qr = z("AlignLeft", [
25
26
  ["path", { d: "M15 12H3", key: "6jk70r" }],
26
27
  ["path", { d: "M17 18H3", key: "1amg6g" }],
27
28
  ["path", { d: "M21 6H3", key: "1jwq7v" }]
@@ -32,7 +33,7 @@ const $r = z("AlignLeft", [
32
33
  * This source code is licensed under the ISC license.
33
34
  * See the LICENSE file in the root directory of this source tree.
34
35
  */
35
- const Qr = z("AlignRight", [
36
+ const Jr = z("AlignRight", [
36
37
  ["path", { d: "M21 12H9", key: "dn1m92" }],
37
38
  ["path", { d: "M21 18H7", key: "1ygte8" }],
38
39
  ["path", { d: "M21 6H3", key: "1jwq7v" }]
@@ -43,7 +44,7 @@ const Qr = z("AlignRight", [
43
44
  * This source code is licensed under the ISC license.
44
45
  * See the LICENSE file in the root directory of this source tree.
45
46
  */
46
- const Jr = z("ArrowDown10", [
47
+ const Wr = z("ArrowDown10", [
47
48
  ["path", { d: "m3 16 4 4 4-4", key: "1co6wj" }],
48
49
  ["path", { d: "M7 20V4", key: "1yoxec" }],
49
50
  ["path", { d: "M17 10V4h-2", key: "zcsr5x" }],
@@ -56,7 +57,7 @@ const Jr = z("ArrowDown10", [
56
57
  * This source code is licensed under the ISC license.
57
58
  * See the LICENSE file in the root directory of this source tree.
58
59
  */
59
- const Wr = z("ArrowDownZA", [
60
+ const Kr = z("ArrowDownZA", [
60
61
  ["path", { d: "m3 16 4 4 4-4", key: "1co6wj" }],
61
62
  ["path", { d: "M7 4v16", key: "1glfcx" }],
62
63
  ["path", { d: "M15 4h5l-5 6h5", key: "8asdl1" }],
@@ -79,7 +80,7 @@ const Sa = z("ArrowDown", [
79
80
  * This source code is licensed under the ISC license.
80
81
  * See the LICENSE file in the root directory of this source tree.
81
82
  */
82
- const Kr = z("ArrowLeftRight", [
83
+ const Yr = z("ArrowLeftRight", [
83
84
  ["path", { d: "M8 3 4 7l4 4", key: "9rb6wj" }],
84
85
  ["path", { d: "M4 7h16", key: "6tx8e3" }],
85
86
  ["path", { d: "m16 21 4-4-4-4", key: "siv7j2" }],
@@ -91,7 +92,7 @@ const Kr = z("ArrowLeftRight", [
91
92
  * This source code is licensed under the ISC license.
92
93
  * See the LICENSE file in the root directory of this source tree.
93
94
  */
94
- const Yr = z("ArrowLeft", [
95
+ const Zr = z("ArrowLeft", [
95
96
  ["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
96
97
  ["path", { d: "M19 12H5", key: "x3x0zl" }]
97
98
  ]);
@@ -101,7 +102,7 @@ const Yr = z("ArrowLeft", [
101
102
  * This source code is licensed under the ISC license.
102
103
  * See the LICENSE file in the root directory of this source tree.
103
104
  */
104
- const Zr = z("ArrowRight", [
105
+ const Xr = z("ArrowRight", [
105
106
  ["path", { d: "M5 12h14", key: "1ays0h" }],
106
107
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
107
108
  ]);
@@ -111,7 +112,7 @@ const Zr = z("ArrowRight", [
111
112
  * This source code is licensed under the ISC license.
112
113
  * See the LICENSE file in the root directory of this source tree.
113
114
  */
114
- const Xr = z("ArrowUp01", [
115
+ const el = z("ArrowUp01", [
115
116
  ["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
116
117
  ["path", { d: "M7 4v16", key: "1glfcx" }],
117
118
  ["rect", { x: "15", y: "4", width: "4", height: "6", ry: "2", key: "1bwicg" }],
@@ -124,7 +125,7 @@ const Xr = z("ArrowUp01", [
124
125
  * This source code is licensed under the ISC license.
125
126
  * See the LICENSE file in the root directory of this source tree.
126
127
  */
127
- const el = z("ArrowUpAZ", [
128
+ const tl = z("ArrowUpAZ", [
128
129
  ["path", { d: "m3 8 4-4 4 4", key: "11wl7u" }],
129
130
  ["path", { d: "M7 4v16", key: "1glfcx" }],
130
131
  ["path", { d: "M20 8h-5", key: "1vsyxs" }],
@@ -137,7 +138,7 @@ const el = z("ArrowUpAZ", [
137
138
  * This source code is licensed under the ISC license.
138
139
  * See the LICENSE file in the root directory of this source tree.
139
140
  */
140
- const tl = z("Blocks", [
141
+ const nl = z("Blocks", [
141
142
  ["rect", { width: "7", height: "7", x: "14", y: "3", rx: "1", key: "6d4xhi" }],
142
143
  [
143
144
  "path",
@@ -153,7 +154,7 @@ const tl = z("Blocks", [
153
154
  * This source code is licensed under the ISC license.
154
155
  * See the LICENSE file in the root directory of this source tree.
155
156
  */
156
- const nl = z("BookOpenText", [
157
+ const al = z("BookOpenText", [
157
158
  ["path", { d: "M12 7v14", key: "1akyts" }],
158
159
  ["path", { d: "M16 12h2", key: "7q9ll5" }],
159
160
  ["path", { d: "M16 8h2", key: "msurwy" }],
@@ -173,7 +174,7 @@ const nl = z("BookOpenText", [
173
174
  * This source code is licensed under the ISC license.
174
175
  * See the LICENSE file in the root directory of this source tree.
175
176
  */
176
- const al = z("BookType", [
177
+ const sl = z("BookType", [
177
178
  ["path", { d: "M10 13h4", key: "ytezjc" }],
178
179
  ["path", { d: "M12 6v7", key: "1f6ttz" }],
179
180
  ["path", { d: "M16 8V6H8v2", key: "x8j6u4" }],
@@ -191,7 +192,7 @@ const al = z("BookType", [
191
192
  * This source code is licensed under the ISC license.
192
193
  * See the LICENSE file in the root directory of this source tree.
193
194
  */
194
- const sl = z("Box", [
195
+ const rl = z("Box", [
195
196
  [
196
197
  "path",
197
198
  {
@@ -208,7 +209,7 @@ const sl = z("Box", [
208
209
  * This source code is licensed under the ISC license.
209
210
  * See the LICENSE file in the root directory of this source tree.
210
211
  */
211
- const rl = z("Braces", [
212
+ const ll = z("Braces", [
212
213
  [
213
214
  "path",
214
215
  { d: "M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1", key: "ezmyqa" }
@@ -227,7 +228,7 @@ const rl = z("Braces", [
227
228
  * This source code is licensed under the ISC license.
228
229
  * See the LICENSE file in the root directory of this source tree.
229
230
  */
230
- const ll = z("ChartArea", [
231
+ const il = z("ChartArea", [
231
232
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
232
233
  [
233
234
  "path",
@@ -319,7 +320,7 @@ const Ia = z("ChartScatter", [
319
320
  * This source code is licensed under the ISC license.
320
321
  * See the LICENSE file in the root directory of this source tree.
321
322
  */
322
- const il = z("CircleArrowRight", [
323
+ const ol = z("CircleArrowRight", [
323
324
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
324
325
  ["path", { d: "M8 12h8", key: "1wcyev" }],
325
326
  ["path", { d: "m12 16 4-4-4-4", key: "1i9zcv" }]
@@ -341,7 +342,7 @@ const Oa = z("CircleX", [
341
342
  * This source code is licensed under the ISC license.
342
343
  * See the LICENSE file in the root directory of this source tree.
343
344
  */
344
- const ol = z("Clock", [
345
+ const cl = z("Clock", [
345
346
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
346
347
  ["polyline", { points: "12 6 12 12 16 14", key: "68esgv" }]
347
348
  ]);
@@ -351,7 +352,7 @@ const ol = z("Clock", [
351
352
  * This source code is licensed under the ISC license.
352
353
  * See the LICENSE file in the root directory of this source tree.
353
354
  */
354
- const cl = z("Columns3", [
355
+ const dl = z("Columns3", [
355
356
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
356
357
  ["path", { d: "M9 3v18", key: "fh3hqa" }],
357
358
  ["path", { d: "M15 3v18", key: "14nvp0" }]
@@ -362,7 +363,7 @@ const cl = z("Columns3", [
362
363
  * This source code is licensed under the ISC license.
363
364
  * See the LICENSE file in the root directory of this source tree.
364
365
  */
365
- const dl = z("Component", [
366
+ const ul = z("Component", [
366
367
  [
367
368
  "path",
368
369
  {
@@ -398,7 +399,7 @@ const dl = z("Component", [
398
399
  * This source code is licensed under the ISC license.
399
400
  * See the LICENSE file in the root directory of this source tree.
400
401
  */
401
- const ul = z("CopyPlus", [
402
+ const ml = z("CopyPlus", [
402
403
  ["line", { x1: "15", x2: "15", y1: "12", y2: "18", key: "1p7wdc" }],
403
404
  ["line", { x1: "12", x2: "18", y1: "15", y2: "15", key: "1nscbv" }],
404
405
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
@@ -410,7 +411,7 @@ const ul = z("CopyPlus", [
410
411
  * This source code is licensed under the ISC license.
411
412
  * See the LICENSE file in the root directory of this source tree.
412
413
  */
413
- const ml = z("Database", [
414
+ const hl = z("Database", [
414
415
  ["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
415
416
  ["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
416
417
  ["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
@@ -421,7 +422,7 @@ const ml = z("Database", [
421
422
  * This source code is licensed under the ISC license.
422
423
  * See the LICENSE file in the root directory of this source tree.
423
424
  */
424
- const hl = z("DollarSign", [
425
+ const pl = z("DollarSign", [
425
426
  ["line", { x1: "12", x2: "12", y1: "2", y2: "22", key: "7eqyqh" }],
426
427
  ["path", { d: "M17 5H9.5a3.5 3.5 0 0 0 0 7h5a3.5 3.5 0 0 1 0 7H6", key: "1b0p4s" }]
427
428
  ]);
@@ -458,7 +459,7 @@ const za = z("EllipsisVertical", [
458
459
  * This source code is licensed under the ISC license.
459
460
  * See the LICENSE file in the root directory of this source tree.
460
461
  */
461
- const pl = z("Eraser", [
462
+ const fl = z("Eraser", [
462
463
  [
463
464
  "path",
464
465
  {
@@ -487,7 +488,7 @@ const Aa = z("Expand", [
487
488
  * This source code is licensed under the ISC license.
488
489
  * See the LICENSE file in the root directory of this source tree.
489
490
  */
490
- const fl = z("EyeClosed", [
491
+ const gl = z("EyeClosed", [
491
492
  ["path", { d: "m15 18-.722-3.25", key: "1j64jw" }],
492
493
  ["path", { d: "M2 8a10.645 10.645 0 0 0 20 0", key: "1e7gxb" }],
493
494
  ["path", { d: "m20 15-1.726-2.05", key: "1cnuld" }],
@@ -500,7 +501,7 @@ const fl = z("EyeClosed", [
500
501
  * This source code is licensed under the ISC license.
501
502
  * See the LICENSE file in the root directory of this source tree.
502
503
  */
503
- const gl = z("FileCode2", [
504
+ const yl = z("FileCode2", [
504
505
  ["path", { d: "M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4", key: "1pf5j1" }],
505
506
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
506
507
  ["path", { d: "m5 12-3 3 3 3", key: "oke12k" }],
@@ -512,7 +513,7 @@ const gl = z("FileCode2", [
512
513
  * This source code is licensed under the ISC license.
513
514
  * See the LICENSE file in the root directory of this source tree.
514
515
  */
515
- const yl = z("FileJson2", [
516
+ const bl = z("FileJson2", [
516
517
  ["path", { d: "M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4", key: "1pf5j1" }],
517
518
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
518
519
  [
@@ -539,7 +540,7 @@ const Fa = z("Filter", [
539
540
  * This source code is licensed under the ISC license.
540
541
  * See the LICENSE file in the root directory of this source tree.
541
542
  */
542
- const bl = z("Fingerprint", [
543
+ const vl = z("Fingerprint", [
543
544
  ["path", { d: "M12 10a2 2 0 0 0-2 2c0 1.02-.1 2.51-.26 4", key: "1nerag" }],
544
545
  ["path", { d: "M14 13.12c0 2.38 0 6.38-1 8.88", key: "o46ks0" }],
545
546
  ["path", { d: "M17.29 21.02c.12-.6.43-2.3.5-3.02", key: "ptglia" }],
@@ -556,7 +557,7 @@ const bl = z("Fingerprint", [
556
557
  * This source code is licensed under the ISC license.
557
558
  * See the LICENSE file in the root directory of this source tree.
558
559
  */
559
- const vl = z("Glasses", [
560
+ const xl = z("Glasses", [
560
561
  ["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
561
562
  ["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
562
563
  ["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
@@ -569,7 +570,7 @@ const vl = z("Glasses", [
569
570
  * This source code is licensed under the ISC license.
570
571
  * See the LICENSE file in the root directory of this source tree.
571
572
  */
572
- const xl = z("Grid3x3", [
573
+ const Cl = z("Grid3x3", [
573
574
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
574
575
  ["path", { d: "M3 9h18", key: "1pudct" }],
575
576
  ["path", { d: "M3 15h18", key: "5xshup" }],
@@ -582,7 +583,7 @@ const xl = z("Grid3x3", [
582
583
  * This source code is licensed under the ISC license.
583
584
  * See the LICENSE file in the root directory of this source tree.
584
585
  */
585
- const Cl = z("Hammer", [
586
+ const Nl = z("Hammer", [
586
587
  ["path", { d: "m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9", key: "eefl8a" }],
587
588
  ["path", { d: "m18 15 4-4", key: "16gjal" }],
588
589
  [
@@ -611,7 +612,7 @@ const La = z("Hash", [
611
612
  * This source code is licensed under the ISC license.
612
613
  * See the LICENSE file in the root directory of this source tree.
613
614
  */
614
- const Nl = z("House", [
615
+ const wl = z("House", [
615
616
  ["path", { d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8", key: "5wwlr5" }],
616
617
  [
617
618
  "path",
@@ -627,7 +628,7 @@ const Nl = z("House", [
627
628
  * This source code is licensed under the ISC license.
628
629
  * See the LICENSE file in the root directory of this source tree.
629
630
  */
630
- const wl = z("LayoutList", [
631
+ const Sl = z("LayoutList", [
631
632
  ["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
632
633
  ["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }],
633
634
  ["path", { d: "M14 4h7", key: "3xa0d5" }],
@@ -641,7 +642,7 @@ const wl = z("LayoutList", [
641
642
  * This source code is licensed under the ISC license.
642
643
  * See the LICENSE file in the root directory of this source tree.
643
644
  */
644
- const Sl = z("ListEnd", [
645
+ const kl = z("ListEnd", [
645
646
  ["path", { d: "M16 12H3", key: "1a2rj7" }],
646
647
  ["path", { d: "M16 6H3", key: "1wxfjs" }],
647
648
  ["path", { d: "M10 18H3", key: "13769t" }],
@@ -654,7 +655,7 @@ const Sl = z("ListEnd", [
654
655
  * This source code is licensed under the ISC license.
655
656
  * See the LICENSE file in the root directory of this source tree.
656
657
  */
657
- const kl = z("ListStart", [
658
+ const Ml = z("ListStart", [
658
659
  ["path", { d: "M16 12H3", key: "1a2rj7" }],
659
660
  ["path", { d: "M16 18H3", key: "12xzn7" }],
660
661
  ["path", { d: "M10 6H3", key: "lf8lx7" }],
@@ -667,7 +668,7 @@ const kl = z("ListStart", [
667
668
  * This source code is licensed under the ISC license.
668
669
  * See the LICENSE file in the root directory of this source tree.
669
670
  */
670
- const Ml = z("ListX", [
671
+ const Dl = z("ListX", [
671
672
  ["path", { d: "M11 12H3", key: "51ecnj" }],
672
673
  ["path", { d: "M16 6H3", key: "1wxfjs" }],
673
674
  ["path", { d: "M16 18H3", key: "12xzn7" }],
@@ -680,7 +681,7 @@ const Ml = z("ListX", [
680
681
  * This source code is licensed under the ISC license.
681
682
  * See the LICENSE file in the root directory of this source tree.
682
683
  */
683
- const He = z("LoaderCircle", [
684
+ const Pe = z("LoaderCircle", [
684
685
  ["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]
685
686
  ]);
686
687
  /**
@@ -689,7 +690,7 @@ const He = z("LoaderCircle", [
689
690
  * This source code is licensed under the ISC license.
690
691
  * See the LICENSE file in the root directory of this source tree.
691
692
  */
692
- const Dl = z("Logs", [
693
+ const Il = z("Logs", [
693
694
  ["path", { d: "M13 12h8", key: "h98zly" }],
694
695
  ["path", { d: "M13 18h8", key: "oe0vm4" }],
695
696
  ["path", { d: "M13 6h8", key: "15sg57" }],
@@ -706,7 +707,7 @@ const Dl = z("Logs", [
706
707
  * This source code is licensed under the ISC license.
707
708
  * See the LICENSE file in the root directory of this source tree.
708
709
  */
709
- const Il = z("Mail", [
710
+ const Ol = z("Mail", [
710
711
  ["rect", { width: "20", height: "16", x: "2", y: "4", rx: "2", key: "18n3k1" }],
711
712
  ["path", { d: "m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7", key: "1ocrg3" }]
712
713
  ]);
@@ -733,7 +734,7 @@ const Ea = z("Map", [
733
734
  * This source code is licensed under the ISC license.
734
735
  * See the LICENSE file in the root directory of this source tree.
735
736
  */
736
- const Ol = z("MessageCircleMore", [
737
+ const Tl = z("MessageCircleMore", [
737
738
  ["path", { d: "M7.9 20A9 9 0 1 0 4 16.1L2 22Z", key: "vv11sd" }],
738
739
  ["path", { d: "M8 12h.01", key: "czm47f" }],
739
740
  ["path", { d: "M12 12h.01", key: "1mp3jc" }],
@@ -767,7 +768,7 @@ const Sn = z("MoveVertical", [
767
768
  * This source code is licensed under the ISC license.
768
769
  * See the LICENSE file in the root directory of this source tree.
769
770
  */
770
- const Tl = z("Network", [
771
+ const zl = z("Network", [
771
772
  ["rect", { x: "16", y: "16", width: "6", height: "6", rx: "1", key: "4q2zg0" }],
772
773
  ["rect", { x: "2", y: "16", width: "6", height: "6", rx: "1", key: "8cvhb9" }],
773
774
  ["rect", { x: "9", y: "2", width: "6", height: "6", rx: "1", key: "1egb70" }],
@@ -780,7 +781,7 @@ const Tl = z("Network", [
780
781
  * This source code is licensed under the ISC license.
781
782
  * See the LICENSE file in the root directory of this source tree.
782
783
  */
783
- const zl = z("Plug", [
784
+ const Al = z("Plug", [
784
785
  ["path", { d: "M12 22v-5", key: "1ega77" }],
785
786
  ["path", { d: "M9 8V2", key: "14iosj" }],
786
787
  ["path", { d: "M15 8V2", key: "18g5xt" }],
@@ -820,7 +821,7 @@ const _a = z("RefreshCw", [
820
821
  * This source code is licensed under the ISC license.
821
822
  * See the LICENSE file in the root directory of this source tree.
822
823
  */
823
- const Al = z("Rows3", [
824
+ const Fl = z("Rows3", [
824
825
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
825
826
  ["path", { d: "M21 9H3", key: "1338ky" }],
826
827
  ["path", { d: "M21 15H3", key: "9uk58r" }]
@@ -831,7 +832,7 @@ const Al = z("Rows3", [
831
832
  * This source code is licensed under the ISC license.
832
833
  * See the LICENSE file in the root directory of this source tree.
833
834
  */
834
- const Fl = z("Save", [
835
+ const Ll = z("Save", [
835
836
  [
836
837
  "path",
837
838
  {
@@ -859,23 +860,6 @@ const Ra = z("Shapes", [
859
860
  ["rect", { x: "3", y: "14", width: "7", height: "7", rx: "1", key: "1bkyp8" }],
860
861
  ["circle", { cx: "17.5", cy: "17.5", r: "3.5", key: "w3z12y" }]
861
862
  ]);
862
- /**
863
- * @license lucide-react v0.453.0 - ISC
864
- *
865
- * This source code is licensed under the ISC license.
866
- * See the LICENSE file in the root directory of this source tree.
867
- */
868
- const Ll = z("ShieldQuestion", [
869
- [
870
- "path",
871
- {
872
- d: "M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",
873
- key: "oel41y"
874
- }
875
- ],
876
- ["path", { d: "M9.1 9a3 3 0 0 1 5.82 1c0 2-3 3-3 3", key: "mhlwft" }],
877
- ["path", { d: "M12 17h.01", key: "p32p05" }]
878
- ]);
879
863
  /**
880
864
  * @license lucide-react v0.453.0 - ISC
881
865
  *
@@ -985,12 +969,12 @@ const ql = z("Trash2", [
985
969
  * This source code is licensed under the ISC license.
986
970
  * See the LICENSE file in the root directory of this source tree.
987
971
  */
988
- const Ba = z("Type", [
972
+ const jl = z("Type", [
989
973
  ["polyline", { points: "4 7 4 4 20 4 20 7", key: "1nosan" }],
990
974
  ["line", { x1: "9", x2: "15", y1: "20", y2: "20", key: "swin9y" }],
991
975
  ["line", { x1: "12", x2: "12", y1: "4", y2: "20", key: "1tx1rr" }]
992
976
  ]);
993
- function Pa(t) {
977
+ function Ba(t) {
994
978
  var a;
995
979
  return {
996
980
  ...t,
@@ -1002,14 +986,14 @@ function Pa(t) {
1002
986
  var o;
1003
987
  return {
1004
988
  ...l,
1005
- cards: (o = l.cards) == null ? void 0 : o.map((i) => jl(i))
989
+ cards: (o = l.cards) == null ? void 0 : o.map((i) => Bl(i))
1006
990
  };
1007
991
  })
1008
992
  };
1009
993
  })
1010
994
  };
1011
995
  }
1012
- function jl(t) {
996
+ function Bl(t) {
1013
997
  return {
1014
998
  ...t,
1015
999
  // cfg: {
@@ -1025,12 +1009,12 @@ function jl(t) {
1025
1009
  // }),
1026
1010
  // },
1027
1011
  // },
1028
- customCfg: Bl(t.customCfg),
1012
+ customCfg: Pl(t.customCfg),
1029
1013
  // if customCfg is present, clean it, otherwise return null{
1030
1014
  data: []
1031
1015
  };
1032
1016
  }
1033
- function Bl(t) {
1017
+ function Pl(t) {
1034
1018
  var a, n;
1035
1019
  return t ? {
1036
1020
  ...t,
@@ -1044,7 +1028,7 @@ function Bl(t) {
1044
1028
  }
1045
1029
  } : null;
1046
1030
  }
1047
- async function Pl(t, a, n, s) {
1031
+ async function Hl(t, a, n, s) {
1048
1032
  if (!s)
1049
1033
  return null;
1050
1034
  const l = JSON.stringify(a);
@@ -1055,7 +1039,7 @@ async function Pl(t, a, n, s) {
1055
1039
  operation: "create"
1056
1040
  });
1057
1041
  }
1058
- async function Gt(t, a) {
1042
+ async function Ut(t, a) {
1059
1043
  if (!a)
1060
1044
  return null;
1061
1045
  const { id: n, template: s, filterValues: l, isDefault: o, shared: i } = t;
@@ -1068,19 +1052,19 @@ async function Gt(t, a) {
1068
1052
  operation: "update"
1069
1053
  });
1070
1054
  }
1071
- async function Hl(t, a) {
1055
+ async function Gl(t, a) {
1072
1056
  return a ? await Wt("https://semaphor.cloud/api/v1/lens", a, {
1073
1057
  operation: "delete",
1074
1058
  lensId: t
1075
1059
  }) : null;
1076
1060
  }
1077
- function Gl() {
1078
- const [t, a] = J(""), [n, s] = J(!1), l = L((p) => p.lenses), { setLenses: o, setSelectedLensId: i } = at(), [u, c] = J(!1), [h, d] = J(!1), g = L((p) => p.dashboard), C = L((p) => p.filterValues), { authToken: m } = Ge();
1061
+ function Ul() {
1062
+ const [t, a] = J(""), [n, s] = J(!1), l = L((p) => p.lenses), { setLenses: o, setSelectedLensId: i } = at(), [u, c] = J(!1), [h, d] = J(!1), g = L((p) => p.dashboard), C = L((p) => p.filterValues), { authToken: m } = He();
1079
1063
  async function N() {
1080
1064
  c(!0);
1081
- const p = Pa(
1065
+ const p = Ba(
1082
1066
  g
1083
- ), x = await Pl(
1067
+ ), x = await Hl(
1084
1068
  t,
1085
1069
  p,
1086
1070
  C,
@@ -1096,7 +1080,7 @@ function Gl() {
1096
1080
  className: "h-7 p-2",
1097
1081
  size: "sm",
1098
1082
  children: [
1099
- /* @__PURE__ */ e(Xe, { className: "mr-2 h-4 w-4" }),
1083
+ /* @__PURE__ */ e(Ze, { className: "mr-2 h-4 w-4" }),
1100
1084
  "Lens"
1101
1085
  ]
1102
1086
  }
@@ -1135,13 +1119,13 @@ function Gl() {
1135
1119
  ] })
1136
1120
  ] });
1137
1121
  }
1138
- function Ul() {
1139
- const [t, a] = J(!1), n = L((d) => d.lenses), s = L((d) => d.selectedLensId), { setLenses: l, setSelectedLensId: o } = at(), { authToken: i } = Ge();
1122
+ function $l() {
1123
+ const [t, a] = J(!1), n = L((d) => d.lenses), s = L((d) => d.selectedLensId), { setLenses: l, setSelectedLensId: o } = at(), { authToken: i } = He();
1140
1124
  async function u(d) {
1141
1125
  o(d);
1142
1126
  }
1143
1127
  async function c(d) {
1144
- if (await Hl(d, i == null ? void 0 : i.accessToken)) {
1128
+ if (await Gl(d, i == null ? void 0 : i.accessToken)) {
1145
1129
  const C = n == null ? void 0 : n.filter((m) => m.id !== d);
1146
1130
  l(C || []), o("original");
1147
1131
  }
@@ -1159,23 +1143,23 @@ function Ul() {
1159
1143
  ...d,
1160
1144
  isDefault: !d.isDefault
1161
1145
  };
1162
- await Gt(C, i == null ? void 0 : i.accessToken);
1146
+ await Ut(C, i == null ? void 0 : i.accessToken);
1163
1147
  const m = n == null ? void 0 : n.find((N) => N.isDefault);
1164
1148
  if (m && m.id !== d.id) {
1165
1149
  const N = {
1166
1150
  ...m,
1167
1151
  isDefault: !1
1168
1152
  };
1169
- await Gt(N, i == null ? void 0 : i.accessToken);
1153
+ await Ut(N, i == null ? void 0 : i.accessToken);
1170
1154
  }
1171
1155
  }
1172
1156
  return /* @__PURE__ */ r(_n, { open: t, onOpenChange: a, children: [
1173
- /* @__PURE__ */ e(Rn, { asChild: !0, children: /* @__PURE__ */ e(K, { tooltip: "Lenses", className: "h-7 p-2", children: /* @__PURE__ */ e(vl, { className: "h-4 w-4" }) }) }),
1157
+ /* @__PURE__ */ e(Rn, { asChild: !0, children: /* @__PURE__ */ e(K, { tooltip: "Lenses", className: "h-7 p-2", children: /* @__PURE__ */ e(xl, { className: "h-4 w-4" }) }) }),
1174
1158
  /* @__PURE__ */ r(qn, { align: "end", className: "w-60", children: [
1175
1159
  /* @__PURE__ */ e(jn, { className: "px-3", children: "Lenses" }),
1176
1160
  /* @__PURE__ */ e(Bn, {}),
1177
1161
  /* @__PURE__ */ r(
1178
- vs,
1162
+ bs,
1179
1163
  {
1180
1164
  value: s,
1181
1165
  onValueChange: u,
@@ -1190,7 +1174,7 @@ function Ul() {
1190
1174
  /* @__PURE__ */ e("p", { children: d.name }),
1191
1175
  /* @__PURE__ */ r("span", { className: "flex items-center gap-3", children: [
1192
1176
  /* @__PURE__ */ e(
1193
- Nl,
1177
+ wl,
1194
1178
  {
1195
1179
  onClick: (g) => {
1196
1180
  g.preventDefault(), h(d);
@@ -1226,7 +1210,7 @@ function Ul() {
1226
1210
  ] })
1227
1211
  ] });
1228
1212
  }
1229
- function Ha() {
1213
+ function Pa() {
1230
1214
  var o;
1231
1215
  const t = L.getState().authToken, a = L.getState().theme, n = L.getState().filterValues, s = (o = L.getState().dashboard) == null ? void 0 : o.title, l = L.getState().selectedSheetId;
1232
1216
  return {
@@ -1237,8 +1221,8 @@ function Ha() {
1237
1221
  selectedSheetId: l || ""
1238
1222
  };
1239
1223
  }
1240
- async function $l() {
1241
- const t = L.getState().isDownloadingPdf, { authToken: a, theme: n, filterValues: s, dashboardTitle: l, selectedSheetId: o } = Ha();
1224
+ async function Ql() {
1225
+ const t = L.getState().isDownloadingPdf, { authToken: a, theme: n, filterValues: s, dashboardTitle: l, selectedSheetId: o } = Pa();
1242
1226
  if (t)
1243
1227
  return;
1244
1228
  const i = new URLSearchParams();
@@ -1255,17 +1239,17 @@ async function $l() {
1255
1239
  const C = `${l}-${(/* @__PURE__ */ new Date()).toISOString()}.pdf`;
1256
1240
  g.download = C, g.click(), L.setState({ isDownloadingPdf: !1 });
1257
1241
  }
1258
- function Ql({
1242
+ function Jl({
1259
1243
  iconClassName: t
1260
1244
  }) {
1261
- const { authToken: a } = Ge();
1245
+ const { authToken: a } = He();
1262
1246
  L((l) => {
1263
1247
  var o;
1264
1248
  return (o = l.dashboard) == null ? void 0 : o.title;
1265
1249
  }), L((l) => l.theme), L((l) => l.filterValues);
1266
1250
  const n = L((l) => l.isDownloadingPdf);
1267
1251
  async function s() {
1268
- await $l();
1252
+ await Ql();
1269
1253
  }
1270
1254
  return /* @__PURE__ */ e(
1271
1255
  K,
@@ -1273,7 +1257,7 @@ function Ql({
1273
1257
  tooltip: "Download PDF",
1274
1258
  className: "h-7 p-2",
1275
1259
  onClick: s,
1276
- children: n ? /* @__PURE__ */ e(He, { className: R("size-3.5 animate-spin", t) }) : /* @__PURE__ */ e(xs, { className: R("size-4", t) })
1260
+ children: n ? /* @__PURE__ */ e(Pe, { className: R("size-3.5 animate-spin", t) }) : /* @__PURE__ */ e(vs, { className: R("size-4", t) })
1277
1261
  }
1278
1262
  );
1279
1263
  }
@@ -1318,7 +1302,7 @@ const kn = [
1318
1302
  { value: "biweekly", label: "Bi-Weekly" },
1319
1303
  { value: "monthly", label: "Monthly" }
1320
1304
  ];
1321
- function Jl({
1305
+ function Wl({
1322
1306
  triggerButtonClassName: t
1323
1307
  }) {
1324
1308
  const {
@@ -1328,17 +1312,17 @@ function Jl({
1328
1312
  status: l,
1329
1313
  error: o,
1330
1314
  isDeleting: i
1331
- } = Wl(), [u, c] = J(""), [h, d] = J(kn[0].value), [g, C] = J("06:00"), [m, N] = J("");
1332
- return /* @__PURE__ */ e(Pn, { delayDuration: 0, children: /* @__PURE__ */ r(Ue, { children: [
1333
- /* @__PURE__ */ e($e, { asChild: !0, children: /* @__PURE__ */ e(
1315
+ } = Kl(), [u, c] = J(""), [h, d] = J(kn[0].value), [g, C] = J("06:00"), [m, N] = J("");
1316
+ return /* @__PURE__ */ e(Pn, { delayDuration: 0, children: /* @__PURE__ */ r(Ge, { children: [
1317
+ /* @__PURE__ */ e(Ue, { asChild: !0, children: /* @__PURE__ */ e(
1334
1318
  K,
1335
1319
  {
1336
1320
  tooltip: "Schedule Dashboard",
1337
1321
  className: R("h-7 p-2", t),
1338
- children: /* @__PURE__ */ e(ol, { className: "size-4" })
1322
+ children: /* @__PURE__ */ e(cl, { className: "size-4" })
1339
1323
  }
1340
1324
  ) }),
1341
- /* @__PURE__ */ e(St, { align: "end", className: "w-80", children: /* @__PURE__ */ r("div", { className: "grid gap-4", children: [
1325
+ /* @__PURE__ */ e(kt, { align: "end", className: "w-80", children: /* @__PURE__ */ r("div", { className: "grid gap-4", children: [
1342
1326
  /* @__PURE__ */ r("div", { className: "space-y-2", children: [
1343
1327
  /* @__PURE__ */ e("h4", { className: "font-medium leading-none", children: "Schedule Subscription" }),
1344
1328
  /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "Subscribe to receive dashboard via email" })
@@ -1411,11 +1395,11 @@ function Jl({
1411
1395
  className: "h-8 p-2",
1412
1396
  disabled: l === "loading" || !u,
1413
1397
  children: [
1414
- l === "loading" && /* @__PURE__ */ e(He, { className: "mr-2 size-4 animate-spin" }),
1398
+ l === "loading" && /* @__PURE__ */ e(Pe, { className: "mr-2 size-4 animate-spin" }),
1415
1399
  l === "success" && /* @__PURE__ */ e(Yt, { className: "mr-2 size-4" }),
1416
- l === "error" && /* @__PURE__ */ r(kt, { children: [
1400
+ l === "error" && /* @__PURE__ */ r(Mt, { children: [
1417
1401
  /* @__PURE__ */ e(Zt, { children: /* @__PURE__ */ e(Oa, { className: "mr-2 size-4 text-destructive" }) }),
1418
- /* @__PURE__ */ e(Mt, { children: /* @__PURE__ */ e("p", { children: o }) })
1402
+ /* @__PURE__ */ e(Dt, { children: /* @__PURE__ */ e("p", { children: o }) })
1419
1403
  ] }),
1420
1404
  "Schedule"
1421
1405
  ]
@@ -1437,7 +1421,7 @@ function Jl({
1437
1421
  children: [
1438
1422
  /* @__PURE__ */ e("div", { className: "col-span-3 text-sm", children: /* @__PURE__ */ r("div", { className: "flex items-center justify-between gap-2", children: [
1439
1423
  /* @__PURE__ */ r("div", { className: "boder-border rounded-md border bg-muted px-2 py-1", children: [
1440
- Dt(p.frequency),
1424
+ It(p.frequency),
1441
1425
  " "
1442
1426
  ] }),
1443
1427
  /* @__PURE__ */ e(G, { children: p.time })
@@ -1447,11 +1431,11 @@ function Jl({
1447
1431
  Mn,
1448
1432
  {
1449
1433
  tooltip: `Next Run: ${new Date(p.nextRun).toLocaleString()} ${p.timezone}`,
1450
- children: /* @__PURE__ */ e(il, { className: "size-3.5" })
1434
+ children: /* @__PURE__ */ e(ol, { className: "size-3.5" })
1451
1435
  }
1452
1436
  ),
1453
- /* @__PURE__ */ e(Mn, { tooltip: `${p.endUserEmail}`, children: /* @__PURE__ */ e(Il, { className: "size-3.5" }) }),
1454
- i === p.id ? /* @__PURE__ */ e(He, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ e(
1437
+ /* @__PURE__ */ e(Mn, { tooltip: `${p.endUserEmail}`, children: /* @__PURE__ */ e(Ol, { className: "size-3.5" }) }),
1438
+ i === p.id ? /* @__PURE__ */ e(Pe, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ e(
1455
1439
  ql,
1456
1440
  {
1457
1441
  onClick: () => s(p.id),
@@ -1471,17 +1455,17 @@ function Jl({
1471
1455
  const Mn = ({
1472
1456
  children: t,
1473
1457
  tooltip: a
1474
- }) => /* @__PURE__ */ e(Pn, { delayDuration: 0, children: /* @__PURE__ */ r(kt, { children: [
1458
+ }) => /* @__PURE__ */ e(Pn, { delayDuration: 0, children: /* @__PURE__ */ r(Mt, { children: [
1475
1459
  /* @__PURE__ */ e(Zt, { asChild: !0, children: t }),
1476
- /* @__PURE__ */ e(Mt, { children: a })
1460
+ /* @__PURE__ */ e(Dt, { children: a })
1477
1461
  ] }) });
1478
- function Wl() {
1462
+ function Kl() {
1479
1463
  const [t, a] = J("idle"), [n, s] = J(""), [l, o] = J(null), i = L((k) => k.authToken), u = L((k) => k.dashboard.id), c = L((k) => k.dashboard.title), { endUserId: h } = Gn((i == null ? void 0 : i.accessToken) || ""), d = "https://semaphor.cloud/api/v1/subscriptions/get", g = {
1480
1464
  dashboardId: u,
1481
1465
  endUserId: h
1482
1466
  }, { data: C, isLoading: m, isError: N, isFetching: p, refetch: x } = Un({
1483
1467
  queryKey: ["subscriptions", u, h],
1484
- queryFn: () => Cs(d, (i == null ? void 0 : i.accessToken) || "", g),
1468
+ queryFn: () => xs(d, (i == null ? void 0 : i.accessToken) || "", g),
1485
1469
  enabled: !!(i != null && i.accessToken) && !!u && !!h
1486
1470
  });
1487
1471
  async function y({
@@ -1490,7 +1474,7 @@ function Wl() {
1490
1474
  frequency: D,
1491
1475
  time: M
1492
1476
  }) {
1493
- const { authToken: E, ...H } = Ha(), ee = Intl.DateTimeFormat().resolvedOptions().timeZone, S = {
1477
+ const { authToken: E, ...H } = Pa(), ee = Intl.DateTimeFormat().resolvedOptions().timeZone, S = {
1494
1478
  email: k,
1495
1479
  frequency: D,
1496
1480
  time: M,
@@ -1542,8 +1526,8 @@ function Wl() {
1542
1526
  error: n
1543
1527
  };
1544
1528
  }
1545
- function Kl() {
1546
- const { authToken: t } = Ge();
1529
+ function Yl() {
1530
+ const { authToken: t } = He();
1547
1531
  L((S) => S.theme);
1548
1532
  const a = L((S) => S.lenses), n = L((S) => S.selectedLensId), s = a == null ? void 0 : a.find((S) => S.id === n), l = L((S) => S.dashboard);
1549
1533
  L((S) => S.selectedSheetId);
@@ -1566,7 +1550,7 @@ function Kl() {
1566
1550
  if (!o || !k) return;
1567
1551
  const S = {
1568
1552
  connectionId: i,
1569
- id: et(),
1553
+ id: Xe(),
1570
1554
  title: "Title",
1571
1555
  // description: 'Description',
1572
1556
  preferences: {
@@ -1581,7 +1565,7 @@ function Kl() {
1581
1565
  sql: "",
1582
1566
  data: []
1583
1567
  }, q = {
1584
- id: et(),
1568
+ id: Xe(),
1585
1569
  cards: [S],
1586
1570
  activeCardId: S.id
1587
1571
  };
@@ -1591,14 +1575,14 @@ function Kl() {
1591
1575
  };
1592
1576
  async function ee() {
1593
1577
  if (c(!0), !n || !s) return;
1594
- const S = Pa(
1578
+ const S = Ba(
1595
1579
  l
1596
1580
  ), q = JSON.stringify(S), Z = {
1597
1581
  ...s,
1598
1582
  template: q,
1599
1583
  filterValues: h
1600
1584
  };
1601
- await Gt(Z, t == null ? void 0 : t.accessToken), ft.success("Lens saved"), C == null || C(S), c(!1);
1585
+ await Ut(Z, t == null ? void 0 : t.accessToken), ft.success("Lens saved"), C == null || C(S), c(!1);
1602
1586
  }
1603
1587
  return d ? null : /* @__PURE__ */ r(
1604
1588
  "div",
@@ -1609,10 +1593,10 @@ function Kl() {
1609
1593
  !d && /* @__PURE__ */ e("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ e(G, { children: s == null ? void 0 : s.name }) }),
1610
1594
  /* @__PURE__ */ r("div", { className: "flex gap-2", children: [
1611
1595
  !1,
1612
- !d && /* @__PURE__ */ e(Ql, {}),
1613
1596
  !d && /* @__PURE__ */ e(Jl, {}),
1614
- o && !d && M && /* @__PURE__ */ e(Gl, {}),
1615
- !d && M && /* @__PURE__ */ e(Ul, {}),
1597
+ !d && /* @__PURE__ */ e(Wl, {}),
1598
+ o && !d && M && /* @__PURE__ */ e(Ul, {}),
1599
+ !d && M && /* @__PURE__ */ e($l, {}),
1616
1600
  o && !d && /* @__PURE__ */ r(
1617
1601
  X,
1618
1602
  {
@@ -1622,7 +1606,7 @@ function Kl() {
1622
1606
  disabled: !o,
1623
1607
  onClick: E,
1624
1608
  children: [
1625
- /* @__PURE__ */ e(Xe, { className: "mr-2 h-4 w-4" }),
1609
+ /* @__PURE__ */ e(Ze, { className: "mr-2 h-4 w-4" }),
1626
1610
  "Frame"
1627
1611
  ]
1628
1612
  }
@@ -1655,7 +1639,7 @@ function Kl() {
1655
1639
  disabled: u,
1656
1640
  onClick: ee,
1657
1641
  size: "sm",
1658
- children: /* @__PURE__ */ e(Fl, { className: "h-4 w-4" })
1642
+ children: /* @__PURE__ */ e(Ll, { className: "h-4 w-4" })
1659
1643
  }
1660
1644
  ),
1661
1645
  !g && !d && o && /* @__PURE__ */ e(
@@ -1675,7 +1659,7 @@ function Kl() {
1675
1659
  }
1676
1660
  );
1677
1661
  }
1678
- function Yl({
1662
+ function Zl({
1679
1663
  name: t,
1680
1664
  items: a,
1681
1665
  value: n,
@@ -1687,8 +1671,8 @@ function Yl({
1687
1671
  icon: c,
1688
1672
  showNone: h = !1
1689
1673
  }) {
1690
- const d = Ke.useRef(null), [g, C] = Ke.useState(!1), [m, N] = Ke.useState("100%"), p = h ? [...a || [], { id: "none", name: "None" }] : a;
1691
- Ke.useLayoutEffect(() => {
1674
+ const d = We.useRef(null), [g, C] = We.useState(!1), [m, N] = We.useState("100%"), p = h ? [...a || [], { id: "none", name: "None" }] : a;
1675
+ We.useLayoutEffect(() => {
1692
1676
  d.current && N(d.current.offsetWidth);
1693
1677
  }, []);
1694
1678
  function x() {
@@ -1698,8 +1682,8 @@ function Yl({
1698
1682
  function y(w, k) {
1699
1683
  s(k), C(!1);
1700
1684
  }
1701
- return /* @__PURE__ */ r(Ue, { open: g, onOpenChange: C, children: [
1702
- /* @__PURE__ */ e($e, { asChild: !0, children: /* @__PURE__ */ r(
1685
+ return /* @__PURE__ */ r(Ge, { open: g, onOpenChange: C, children: [
1686
+ /* @__PURE__ */ e(Ue, { asChild: !0, children: /* @__PURE__ */ r(
1703
1687
  X,
1704
1688
  {
1705
1689
  ref: d,
@@ -1712,12 +1696,12 @@ function Yl({
1712
1696
  c && /* @__PURE__ */ e("div", { className: "mr-2", children: c }),
1713
1697
  /* @__PURE__ */ e("span", { className: "max-w-[150px] overflow-hidden truncate text-ellipsis whitespace-nowrap", children: x() })
1714
1698
  ] }),
1715
- /* @__PURE__ */ e(Ns, { className: "size-4 opacity-50" })
1699
+ /* @__PURE__ */ e(Cs, { className: "size-4 opacity-50" })
1716
1700
  ]
1717
1701
  }
1718
1702
  ) }),
1719
1703
  /* @__PURE__ */ e(
1720
- St,
1704
+ kt,
1721
1705
  {
1722
1706
  className: "w-full p-0",
1723
1707
  style: { minWidth: m },
@@ -1767,7 +1751,7 @@ function Yl({
1767
1751
  )
1768
1752
  ] });
1769
1753
  }
1770
- function lt({
1754
+ function rt({
1771
1755
  title: t,
1772
1756
  items: a,
1773
1757
  value: n,
@@ -1784,15 +1768,15 @@ function lt({
1784
1768
  const g = s ? "Loading..." : l ? "Error" : n;
1785
1769
  function C() {
1786
1770
  if (t === "Connection")
1787
- return /* @__PURE__ */ e(zl, { className: "size-4" });
1771
+ return /* @__PURE__ */ e(Al, { className: "size-4" });
1788
1772
  if (t === "Database")
1789
- return /* @__PURE__ */ e(ml, { className: "size-4" });
1773
+ return /* @__PURE__ */ e(hl, { className: "size-4" });
1790
1774
  if (t === "Schema")
1791
- return /* @__PURE__ */ e(Tl, { className: "size-4" });
1775
+ return /* @__PURE__ */ e(zl, { className: "size-4" });
1792
1776
  if (t === "Table")
1793
1777
  return /* @__PURE__ */ e(un, { className: "size-4" });
1794
1778
  if (t === "Model")
1795
- return /* @__PURE__ */ e(sl, { className: "size-4" });
1779
+ return /* @__PURE__ */ e(rl, { className: "size-4" });
1796
1780
  }
1797
1781
  function m() {
1798
1782
  return /* @__PURE__ */ r(we, { disabled: h, value: g, onValueChange: i, children: [
@@ -1835,7 +1819,7 @@ function lt({
1835
1819
  }
1836
1820
  function N() {
1837
1821
  return /* @__PURE__ */ e(
1838
- Yl,
1822
+ Zl,
1839
1823
  {
1840
1824
  icon: C(),
1841
1825
  items: a,
@@ -1852,7 +1836,7 @@ function lt({
1852
1836
  }
1853
1837
  return /* @__PURE__ */ e(Xn, { delayDuration: 0, children: /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: d === "select" ? m() : N() }) });
1854
1838
  }
1855
- function Zl({ column: t }) {
1839
+ function Xl({ column: t }) {
1856
1840
  const [a, n] = J(!1), s = f((p) => p.selectedTableName), l = f(
1857
1841
  (p) => p.selectedSchemaName
1858
1842
  ), o = f(
@@ -1933,12 +1917,12 @@ function Zl({ column: t }) {
1933
1917
  ] });
1934
1918
  }
1935
1919
  function mn({ column: t }) {
1936
- return /* @__PURE__ */ r(kt, { children: [
1937
- /* @__PURE__ */ e(ws, { className: "shrink-0", asChild: !0, children: Ce(t.data_type) ? /* @__PURE__ */ e(Ba, { className: "size-3 text-muted-foreground" }) : Be(t.data_type) ? /* @__PURE__ */ e(La, { className: "size-3 text-muted-foreground" }) : Ne(t.data_type) ? /* @__PURE__ */ e(Ss, { className: "size-3 text-muted-foreground" }) : ks(t.data_type) ? /* @__PURE__ */ e(Rl, { className: "size-3 text-muted-foreground" }) : t.data_type.startsWith("json") ? /* @__PURE__ */ e(rl, { className: "size-3 text-muted-foreground" }) : /* @__PURE__ */ e(Ll, { className: "size-3 text-muted-foreground" }) }),
1938
- /* @__PURE__ */ e(Mt, { children: /* @__PURE__ */ e("p", { className: "text-xs", children: t.data_type }) })
1920
+ return /* @__PURE__ */ r(Mt, { children: [
1921
+ /* @__PURE__ */ e(Ns, { className: "shrink-0", asChild: !0, children: Ce(t.data_type) ? /* @__PURE__ */ e(ws, { className: "size-3 text-muted-foreground" }) : Be(t.data_type) ? /* @__PURE__ */ e(La, { className: "size-3 text-muted-foreground" }) : Ne(t.data_type) ? /* @__PURE__ */ e(Ss, { className: "size-3 text-muted-foreground" }) : ks(t.data_type) ? /* @__PURE__ */ e(Rl, { className: "size-3 text-muted-foreground" }) : t.data_type.startsWith("json") ? /* @__PURE__ */ e(ll, { className: "size-3 text-muted-foreground" }) : /* @__PURE__ */ e(Ms, { className: "size-3 text-muted-foreground" }) }),
1922
+ /* @__PURE__ */ e(Dt, { children: /* @__PURE__ */ e("p", { className: "text-xs", children: t.data_type }) })
1939
1923
  ] });
1940
1924
  }
1941
- function Ft({
1925
+ function Lt({
1942
1926
  column: t,
1943
1927
  className: a
1944
1928
  }) {
@@ -1956,8 +1940,8 @@ function Ft({
1956
1940
  }
1957
1941
  );
1958
1942
  }
1959
- function Xl({ id: t, children: a, type: n = "column" }) {
1960
- const { attributes: s, listeners: l, setNodeRef: o, transform: i } = Ms({
1943
+ function ei({ id: t, children: a, type: n = "column" }) {
1944
+ const { attributes: s, listeners: l, setNodeRef: o, transform: i } = Ds({
1961
1945
  id: t,
1962
1946
  data: { type: n }
1963
1947
  // Tag as a column from the left-hand side
@@ -1976,7 +1960,7 @@ function Xl({ id: t, children: a, type: n = "column" }) {
1976
1960
  }
1977
1961
  );
1978
1962
  }
1979
- function ei({
1963
+ function ti({
1980
1964
  onClick: t,
1981
1965
  column: a
1982
1966
  }) {
@@ -2021,41 +2005,41 @@ function ei({
2021
2005
  }
2022
2006
  ),
2023
2007
  children: [
2024
- n === a.column_name && /* @__PURE__ */ e(Ds, { children: /* @__PURE__ */ e(
2025
- Ft,
2008
+ n === a.column_name && /* @__PURE__ */ e(Is, { children: /* @__PURE__ */ e(
2009
+ Lt,
2026
2010
  {
2027
2011
  column: a,
2028
2012
  className: "rounded-md border-2 border-dashed border-muted-foreground bg-muted shadow-md"
2029
2013
  }
2030
2014
  ) }),
2031
- n === a.column_name && /* @__PURE__ */ e("div", { className: "absolute inset-0", children: n === a.column_name && /* @__PURE__ */ e(Ft, { column: a }) }),
2032
- /* @__PURE__ */ e(Xl, { id: a.column_name, type: "column", children: /* @__PURE__ */ e(Ft, { column: a }) })
2015
+ n === a.column_name && /* @__PURE__ */ e("div", { className: "absolute inset-0", children: n === a.column_name && /* @__PURE__ */ e(Lt, { column: a }) }),
2016
+ /* @__PURE__ */ e(ei, { id: a.column_name, type: "column", children: /* @__PURE__ */ e(Lt, { column: a }) })
2033
2017
  ]
2034
2018
  }
2035
2019
  )
2036
2020
  );
2037
2021
  }
2038
- const Lt = {
2022
+ const Et = {
2039
2023
  id: "__placeholder__",
2040
2024
  role: "groupby",
2041
2025
  type: "string"
2042
- }, Et = {
2026
+ }, Vt = {
2043
2027
  id: "__placeholder__",
2044
2028
  role: "groupby",
2045
2029
  type: "string"
2046
- }, Vt = {
2030
+ }, _t = {
2047
2031
  id: "__placeholder__",
2048
2032
  role: "metric",
2049
2033
  type: "number"
2050
- }, _t = {
2034
+ }, Rt = {
2051
2035
  name: "Filter",
2052
2036
  id: "__placeholder__",
2053
2037
  role: "filter",
2054
2038
  type: "string"
2055
- }, Ga = {
2039
+ }, Ha = {
2056
2040
  id: "__placeholder__"
2057
- }, Re = "droppable-group-by", qe = "droppable-metrics", je = "droppable-pivot-by", xt = "sortable-group-by", Ut = "sortable-metrics", Ct = "sortable-pivot-by", $t = "droppable-filters", Qt = "sortable-filters", hn = "sortable-order-by";
2058
- function ti() {
2041
+ }, Re = "droppable-group-by", qe = "droppable-metrics", je = "droppable-pivot-by", xt = "sortable-group-by", $t = "sortable-metrics", Ct = "sortable-pivot-by", Qt = "droppable-filters", Jt = "sortable-filters", hn = "sortable-order-by";
2042
+ function ni() {
2059
2043
  const t = ze((I) => I.insertIndex), a = f(
2060
2044
  (I) => {
2061
2045
  var b;
@@ -2088,14 +2072,14 @@ function ti() {
2088
2072
  setPreviewMetricColumns: h,
2089
2073
  setPreviewFilterColumns: d,
2090
2074
  setPreviewPivotColumns: g
2091
- } = Is(), {
2075
+ } = Os(), {
2092
2076
  setGroupByColumns: C,
2093
2077
  setMetricColumns: m,
2094
2078
  setFilterColumns: N,
2095
2079
  setOrderByColumns: p,
2096
2080
  setPivotByColumns: x
2097
- } = Y(), { columns: y } = ra(), { formattedTableName: w } = xe(), k = Os(
2098
- Ts(zs, {
2081
+ } = Y(), { columns: y } = ra(), { formattedTableName: w } = xe(), k = Ts(
2082
+ zs(As, {
2099
2083
  activationConstraint: {
2100
2084
  distance: 1
2101
2085
  }
@@ -2119,12 +2103,12 @@ function ti() {
2119
2103
  );
2120
2104
  i($);
2121
2105
  const ne = a.filter(
2122
- (V) => V.id !== Lt.id
2106
+ (V) => V.id !== Et.id
2123
2107
  );
2124
- ne.splice($, 0, Lt), c(ne);
2108
+ ne.splice($, 0, Et), c(ne);
2125
2109
  } else if (O.id === Re) {
2126
2110
  i(a.length);
2127
- const $ = [...a, Lt];
2111
+ const $ = [...a, Et];
2128
2112
  c($), h(n), d(s);
2129
2113
  }
2130
2114
  }
@@ -2137,12 +2121,12 @@ function ti() {
2137
2121
  );
2138
2122
  i($);
2139
2123
  const ne = o.filter(
2140
- (V) => V.id !== Et.id
2124
+ (V) => V.id !== Vt.id
2141
2125
  );
2142
- ne.splice($, 0, Et), g(ne);
2126
+ ne.splice($, 0, Vt), g(ne);
2143
2127
  } else if (O.id === je) {
2144
2128
  i(o.length);
2145
- const $ = [...o, Et];
2129
+ const $ = [...o, Vt];
2146
2130
  g($), c(a), h(n), d(s);
2147
2131
  }
2148
2132
  }
@@ -2154,12 +2138,12 @@ function ti() {
2154
2138
  const $ = n.findIndex((V) => V.id === U);
2155
2139
  i($);
2156
2140
  const ne = n.filter(
2157
- (V) => V.id !== Vt.id
2141
+ (V) => V.id !== _t.id
2158
2142
  );
2159
- ne.splice($, 0, Vt), h(ne);
2143
+ ne.splice($, 0, _t), h(ne);
2160
2144
  } else if (O.id === qe) {
2161
2145
  i(n.length);
2162
- const $ = [...n, Vt];
2146
+ const $ = [...n, _t];
2163
2147
  h($), d(s), c(a), g(o);
2164
2148
  }
2165
2149
  }
@@ -2170,12 +2154,12 @@ function ti() {
2170
2154
  const $ = s.findIndex((V) => V.id === U);
2171
2155
  i($);
2172
2156
  const ne = s.filter(
2173
- (V) => V.id !== _t.id
2157
+ (V) => V.id !== Rt.id
2174
2158
  );
2175
- ne.splice($, 0, _t), d(ne);
2176
- } else if (O.id === $t) {
2159
+ ne.splice($, 0, Rt), d(ne);
2160
+ } else if (O.id === Qt) {
2177
2161
  i(s.length);
2178
- const $ = [...s, _t];
2162
+ const $ = [...s, Rt];
2179
2163
  d($), h(n), c(a), g(o);
2180
2164
  }
2181
2165
  }
@@ -2194,7 +2178,7 @@ function ti() {
2194
2178
  id: ye(O),
2195
2179
  // Unique ID
2196
2180
  name: O,
2197
- label: ot(O, b),
2181
+ label: it(O, b),
2198
2182
  type: B,
2199
2183
  role: "metric",
2200
2184
  aggregate: b
@@ -2254,7 +2238,7 @@ function ti() {
2254
2238
  // Unique ID
2255
2239
  name: I.column_name,
2256
2240
  type: I.data_type,
2257
- sql: Bt(
2241
+ sql: Pt(
2258
2242
  I.data_type,
2259
2243
  w,
2260
2244
  be(I.column_name)
@@ -2272,7 +2256,7 @@ function ti() {
2272
2256
  );
2273
2257
  if (!V) return;
2274
2258
  const se = Be(V.data_type), W = Ce(V.data_type), ce = Ne(V.data_type);
2275
- (W || ce) && (O.id === Re || ((U = O.data.current) == null ? void 0 : U.type) === xt) && ee(V), (W || ce) && (O.id === je || ((j = O.data.current) == null ? void 0 : j.type) === Ct) ? H(V) : (se || W) && (O.id === qe || ((v = O.data.current) == null ? void 0 : v.type) === Ut) ? (se && E(V), W && E(V, "COUNT")) : M(V) && (O.id === $t || ((P = O.data.current) == null ? void 0 : P.type) === Qt) && S(V);
2259
+ (W || ce) && (O.id === Re || ((U = O.data.current) == null ? void 0 : U.type) === xt) && ee(V), (W || ce) && (O.id === je || ((j = O.data.current) == null ? void 0 : j.type) === Ct) ? H(V) : (se || W) && (O.id === qe || ((v = O.data.current) == null ? void 0 : v.type) === $t) ? (se && E(V), W && E(V, "COUNT")) : M(V) && (O.id === Qt || ((P = O.data.current) == null ? void 0 : P.type) === Jt) && S(V);
2276
2260
  }
2277
2261
  if (O && ((F = O.data.current) == null ? void 0 : F.type) === xt && a.some((V) => V.id === b.id)) {
2278
2262
  const V = a.findIndex(
@@ -2290,14 +2274,14 @@ function ti() {
2290
2274
  W.splice(se, 0, ce), x(W);
2291
2275
  }
2292
2276
  }
2293
- if (O && (($ = O.data.current) == null ? void 0 : $.type) === Ut && n.some((V) => V.id === b.id)) {
2277
+ if (O && (($ = O.data.current) == null ? void 0 : $.type) === $t && n.some((V) => V.id === b.id)) {
2294
2278
  const V = n.findIndex((W) => W.id === b.id), se = n.findIndex((W) => W.id === O.id);
2295
2279
  if (V !== -1 && se !== -1 && V !== se) {
2296
2280
  const W = [...n], [ce] = W.splice(V, 1);
2297
2281
  W.splice(se, 0, ce), m(W);
2298
2282
  }
2299
2283
  }
2300
- if (O && ((ne = O.data.current) == null ? void 0 : ne.type) === Qt && s.some((V) => V.id === b.id)) {
2284
+ if (O && ((ne = O.data.current) == null ? void 0 : ne.type) === Jt && s.some((V) => V.id === b.id)) {
2301
2285
  const V = s.findIndex((W) => W.id === b.id), se = s.findIndex((W) => W.id === O.id);
2302
2286
  if (V !== -1 && se !== -1 && V !== se) {
2303
2287
  const W = [...s], [ce] = W.splice(V, 1);
@@ -2310,9 +2294,9 @@ function ti() {
2310
2294
  const { active: b, over: O } = I, B = b.data.current;
2311
2295
  if ((B == null ? void 0 : B.type) === hn && O) {
2312
2296
  const U = l.findIndex(
2313
- (v) => it(v.columnId) === b.id
2297
+ (v) => lt(v.columnId) === b.id
2314
2298
  ), j = l.findIndex(
2315
- (v) => it(v.columnId) === O.id
2299
+ (v) => lt(v.columnId) === O.id
2316
2300
  );
2317
2301
  if (U !== -1 && j !== -1 && U !== j) {
2318
2302
  const v = [...l], [P] = v.splice(U, 1);
@@ -2332,9 +2316,9 @@ function ti() {
2332
2316
  };
2333
2317
  }
2334
2318
  function ye(t) {
2335
- return `${t}-${et()}`;
2319
+ return `${t}-${Xe()}`;
2336
2320
  }
2337
- function ot(t, a) {
2321
+ function it(t, a) {
2338
2322
  const n = la(t.replace(/_/g, " "));
2339
2323
  switch (a) {
2340
2324
  case "SUM":
@@ -2353,7 +2337,7 @@ function ot(t, a) {
2353
2337
  return n;
2354
2338
  }
2355
2339
  }
2356
- function it(t) {
2340
+ function lt(t) {
2357
2341
  return `${hn}-${t}`;
2358
2342
  }
2359
2343
  function nt(t, a) {
@@ -2371,7 +2355,7 @@ function nt(t, a) {
2371
2355
  return n;
2372
2356
  }
2373
2357
  }
2374
- function ni({
2358
+ function ai({
2375
2359
  schemaName: t,
2376
2360
  tableName: a,
2377
2361
  columns: n,
@@ -2441,7 +2425,7 @@ function ni({
2441
2425
  role: "metric",
2442
2426
  id: ye(b.column_name),
2443
2427
  name: b.column_name,
2444
- label: ot(b.column_name, "COUNT"),
2428
+ label: it(b.column_name, "COUNT"),
2445
2429
  type: b.data_type,
2446
2430
  aggregate: "COUNT"
2447
2431
  };
@@ -2465,7 +2449,7 @@ function ni({
2465
2449
  role: "metric",
2466
2450
  id: ye(b.column_name),
2467
2451
  name: b.column_name,
2468
- label: ot(b.column_name, "SUM"),
2452
+ label: it(b.column_name, "SUM"),
2469
2453
  type: b.data_type,
2470
2454
  aggregate: "SUM"
2471
2455
  };
@@ -2501,7 +2485,7 @@ function ni({
2501
2485
  }));
2502
2486
  }
2503
2487
  function S() {
2504
- const b = Pt({
2488
+ const b = Ht({
2505
2489
  schemaName: t,
2506
2490
  tableName: a,
2507
2491
  modelName: E,
@@ -2513,7 +2497,7 @@ function ni({
2513
2497
  y(O), w(!0);
2514
2498
  }
2515
2499
  function q() {
2516
- const b = Pt({
2500
+ const b = Ht({
2517
2501
  schemaName: t,
2518
2502
  tableName: a,
2519
2503
  modelName: E,
@@ -2543,12 +2527,12 @@ function ni({
2543
2527
  {
2544
2528
  onClick: (O) => O.stopPropagation(),
2545
2529
  className: "flex items-center justify-end",
2546
- children: Be(b.data_type) && /* @__PURE__ */ e(Zl, { column: b })
2530
+ children: Be(b.data_type) && /* @__PURE__ */ e(Xl, { column: b })
2547
2531
  }
2548
2532
  )
2549
2533
  ]
2550
2534
  }
2551
- ) : /* @__PURE__ */ e(ei, { onClick: H, column: b });
2535
+ ) : /* @__PURE__ */ e(ti, { onClick: H, column: b });
2552
2536
  }
2553
2537
  function I() {
2554
2538
  return /* @__PURE__ */ r(te, { children: [
@@ -2564,7 +2548,7 @@ function ni({
2564
2548
  }),
2565
2549
  children: [
2566
2550
  /* @__PURE__ */ e(
2567
- Xe,
2551
+ Ze,
2568
2552
  {
2569
2553
  className: R("mr-1 size-4", {
2570
2554
  "text-green-400": Z(),
@@ -2585,7 +2569,7 @@ function ni({
2585
2569
  variant: "secondary",
2586
2570
  className: "flex",
2587
2571
  children: [
2588
- s !== "Success" ? /* @__PURE__ */ e(He, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e(Dl, { className: "mr-2 size-4" }),
2572
+ s !== "Success" ? /* @__PURE__ */ e(Pe, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e(Il, { className: "mr-2 size-4" }),
2589
2573
  "Top 10"
2590
2574
  ]
2591
2575
  }
@@ -2599,7 +2583,7 @@ function ni({
2599
2583
  variant: "secondary",
2600
2584
  className: "w-full",
2601
2585
  children: [
2602
- s !== "Success" ? /* @__PURE__ */ e(He, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e(qa, { className: "mr-2 size-4" }),
2586
+ s !== "Success" ? /* @__PURE__ */ e(Pe, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e(qa, { className: "mr-2 size-4" }),
2603
2587
  "Count"
2604
2588
  ]
2605
2589
  }
@@ -2614,7 +2598,7 @@ function ni({
2614
2598
  ) : /* @__PURE__ */ r("div", { className: "flex grow flex-col space-y-4 px-4", children: [
2615
2599
  o && /* @__PURE__ */ e("div", { className: "mx-2 flex items-center justify-center gap-2", children: I() }),
2616
2600
  /* @__PURE__ */ r(
2617
- It,
2601
+ Ot,
2618
2602
  {
2619
2603
  className: "flex-1 basis-0 overflow-y-auto px-2 py-0",
2620
2604
  children: [
@@ -2628,14 +2612,14 @@ function ni({
2628
2612
  },
2629
2613
  b.column_name
2630
2614
  )) }),
2631
- /* @__PURE__ */ e(Pe, { orientation: "vertical" }),
2632
- /* @__PURE__ */ e(Pe, { orientation: "horizontal" })
2615
+ /* @__PURE__ */ e(et, { orientation: "vertical" }),
2616
+ /* @__PURE__ */ e(et, { orientation: "horizontal" })
2633
2617
  ]
2634
2618
  }
2635
2619
  )
2636
2620
  ] });
2637
2621
  }
2638
- function Ua({
2622
+ function Ga({
2639
2623
  ColumnsComponent: t,
2640
2624
  type: a
2641
2625
  }) {
@@ -2684,7 +2668,7 @@ function Ua({
2684
2668
  } = xe(), { data: ce, refetch: _ } = pe(n);
2685
2669
  function ae() {
2686
2670
  return t ? t(W, se, w) : /* @__PURE__ */ e(
2687
- ni,
2671
+ ai,
2688
2672
  {
2689
2673
  schemaName: W,
2690
2674
  tableName: se,
@@ -2696,7 +2680,7 @@ function Ua({
2696
2680
  function ge() {
2697
2681
  window.location.href = "mailto:support@semaphor.cloud?subject=Help&body=I need help with...";
2698
2682
  }
2699
- function We(re) {
2683
+ function Je(re) {
2700
2684
  re === !0 ? ce && (C(ce.userSql), setTimeout(() => {
2701
2685
  _();
2702
2686
  }, 100)) : C(""), g(re);
@@ -2705,7 +2689,7 @@ function Ua({
2705
2689
  if (!s || b === "S3" || b === "API") return null;
2706
2690
  if (!o || o === "none")
2707
2691
  return /* @__PURE__ */ e(
2708
- lt,
2692
+ rt,
2709
2693
  {
2710
2694
  refetch: B,
2711
2695
  showNone: !0,
@@ -2727,11 +2711,11 @@ function Ua({
2727
2711
  /* @__PURE__ */ e("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e(Te, {}) })
2728
2712
  ] });
2729
2713
  }
2730
- function gs() {
2714
+ function fs() {
2731
2715
  if (!s || b === "S3" || b === "API") return null;
2732
2716
  if (!i || i === "none")
2733
2717
  return /* @__PURE__ */ e(
2734
- lt,
2718
+ rt,
2735
2719
  {
2736
2720
  refetch: U,
2737
2721
  showNone: !0,
@@ -2745,9 +2729,9 @@ function Ua({
2745
2729
  }
2746
2730
  );
2747
2731
  }
2748
- function ys() {
2732
+ function gs() {
2749
2733
  return !s || b === "S3" || b === "API" || !i || i === "none" ? null : /* @__PURE__ */ e(
2750
- lt,
2734
+ rt,
2751
2735
  {
2752
2736
  refetch: j,
2753
2737
  onChange: ne,
@@ -2760,13 +2744,13 @@ function Ua({
2760
2744
  }
2761
2745
  );
2762
2746
  }
2763
- function bs() {
2747
+ function ys() {
2764
2748
  function re() {
2765
2749
  let Le = !1;
2766
2750
  return b === "API" ? (Le = !1, Le) : ((b === "S3" || s && i && i !== "none" && u) && (Le = !0), Le);
2767
2751
  }
2768
2752
  return re() ? /* @__PURE__ */ e(
2769
- lt,
2753
+ rt,
2770
2754
  {
2771
2755
  refetch: v,
2772
2756
  onChange: d,
@@ -2791,7 +2775,7 @@ function Ua({
2791
2775
  children: [
2792
2776
  /* @__PURE__ */ r("section", { className: "space-y-3 px-6 py-4", children: [
2793
2777
  /* @__PURE__ */ e(
2794
- lt,
2778
+ rt,
2795
2779
  {
2796
2780
  refetch: F,
2797
2781
  items: m,
@@ -2808,19 +2792,19 @@ function Ua({
2808
2792
  ),
2809
2793
  ct(),
2810
2794
  dt(),
2795
+ fs(),
2811
2796
  gs(),
2812
- ys(),
2813
- bs()
2797
+ ys()
2814
2798
  ] }),
2815
2799
  ae(),
2816
2800
  /* @__PURE__ */ e("div", { className: "flex items-center justify-between gap-2 px-6 py-4", children: a === "main" && /* @__PURE__ */ r(te, { children: [
2817
2801
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
2818
2802
  /* @__PURE__ */ e(
2819
- As,
2803
+ Fs,
2820
2804
  {
2821
2805
  className: "data-[state=checked]:bg-muted-foreground/80",
2822
2806
  checked: h,
2823
- onCheckedChange: We,
2807
+ onCheckedChange: Je,
2824
2808
  id: "dev-mode"
2825
2809
  }
2826
2810
  ),
@@ -2834,7 +2818,7 @@ function Ua({
2834
2818
  variant: "secondary",
2835
2819
  className: "group flex items-center gap-2 rounded-full",
2836
2820
  children: [
2837
- /* @__PURE__ */ e(Ol, { className: "size-4" }),
2821
+ /* @__PURE__ */ e(Tl, { className: "size-4" }),
2838
2822
  /* @__PURE__ */ e("span", { className: "hidden group-hover:block", children: "Help" })
2839
2823
  ]
2840
2824
  }
@@ -2844,7 +2828,7 @@ function Ua({
2844
2828
  }
2845
2829
  );
2846
2830
  }
2847
- function $a({ sql: t, error: a, onClick: n }) {
2831
+ function Ua({ sql: t, error: a, onClick: n }) {
2848
2832
  const s = f((c) => c.isDevMode);
2849
2833
  f((c) => c.card);
2850
2834
  const { setIsDevMode: l, setCardSql: o, setRunSql: i } = Y();
@@ -2856,18 +2840,18 @@ function $a({ sql: t, error: a, onClick: n }) {
2856
2840
  }, 100);
2857
2841
  }
2858
2842
  return /* @__PURE__ */ r(ea, { openDelay: a ? 0 : 500, children: [
2859
- /* @__PURE__ */ e(ta, { asChild: !0, children: /* @__PURE__ */ e(X, { variant: "link", className: "h-5 p-0", children: a ? /* @__PURE__ */ e(Oa, { className: "h-4 w-4 text-red-500" }) : /* @__PURE__ */ e(Fs, { className: "h-4 w-4 text-muted-foreground" }) }) }),
2843
+ /* @__PURE__ */ e(ta, { asChild: !0, children: /* @__PURE__ */ e(X, { variant: "link", className: "h-5 p-0", children: a ? /* @__PURE__ */ e(Oa, { className: "h-4 w-4 text-red-500" }) : /* @__PURE__ */ e(Ls, { className: "h-4 w-4 text-muted-foreground" }) }) }),
2860
2844
  /* @__PURE__ */ e(
2861
2845
  na,
2862
2846
  {
2863
2847
  align: "start",
2864
2848
  className: "w-full min-w-fit max-w-[700px]",
2865
2849
  children: /* @__PURE__ */ e("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ r("div", { className: "flex grow flex-col space-y-2", children: [
2866
- /* @__PURE__ */ r(st, { className: "max-h-[250px] min-h-0 overflow-scroll text-xs leading-relaxed text-foreground/80", children: [
2850
+ /* @__PURE__ */ r(ot, { className: "max-h-[250px] min-h-0 overflow-scroll text-xs leading-relaxed text-foreground/80", children: [
2867
2851
  a && a,
2868
2852
  t && /* @__PURE__ */ r("div", { className: "flex flex-col space-y-1.5", children: [
2869
2853
  /* @__PURE__ */ e("span", { className: "text-xs font-semibold", children: "Resolved SQL" }),
2870
- /* @__PURE__ */ e("div", { className: "rounded-md", children: /* @__PURE__ */ e(Ls, { code: t, language: "sql" }) })
2854
+ /* @__PURE__ */ e("div", { className: "rounded-md", children: /* @__PURE__ */ e(Es, { code: t, language: "sql" }) })
2871
2855
  ] })
2872
2856
  ] }),
2873
2857
  !s && /* @__PURE__ */ r(
@@ -2877,13 +2861,13 @@ function $a({ sql: t, error: a, onClick: n }) {
2877
2861
  variant: "secondary",
2878
2862
  size: "sm",
2879
2863
  children: [
2880
- /* @__PURE__ */ e(gl, { className: "mr-2 h-4 w-4" }),
2864
+ /* @__PURE__ */ e(yl, { className: "mr-2 h-4 w-4" }),
2881
2865
  "View in SQL Editor"
2882
2866
  ]
2883
2867
  }
2884
2868
  ),
2885
2869
  a && n && /* @__PURE__ */ r(X, { onClick: n, size: "sm", variant: "secondary", children: [
2886
- /* @__PURE__ */ e(Cl, { className: "mr-2 h-4 w-4" }),
2870
+ /* @__PURE__ */ e(Nl, { className: "mr-2 h-4 w-4" }),
2887
2871
  "Debug with Assistant"
2888
2872
  ] })
2889
2873
  ] }) })
@@ -2891,16 +2875,16 @@ function $a({ sql: t, error: a, onClick: n }) {
2891
2875
  )
2892
2876
  ] });
2893
2877
  }
2894
- var Qa = {
2878
+ var $a = {
2895
2879
  color: void 0,
2896
2880
  size: void 0,
2897
2881
  className: void 0,
2898
2882
  style: void 0,
2899
2883
  attr: void 0
2900
- }, Dn = Ae.createContext && /* @__PURE__ */ Ae.createContext(Qa), ai = ["attr", "size", "title"];
2901
- function si(t, a) {
2884
+ }, Dn = Ae.createContext && /* @__PURE__ */ Ae.createContext($a), si = ["attr", "size", "title"];
2885
+ function ri(t, a) {
2902
2886
  if (t == null) return {};
2903
- var n = ri(t, a), s, l;
2887
+ var n = li(t, a), s, l;
2904
2888
  if (Object.getOwnPropertySymbols) {
2905
2889
  var o = Object.getOwnPropertySymbols(t);
2906
2890
  for (l = 0; l < o.length; l++)
@@ -2908,7 +2892,7 @@ function si(t, a) {
2908
2892
  }
2909
2893
  return n;
2910
2894
  }
2911
- function ri(t, a) {
2895
+ function li(t, a) {
2912
2896
  if (t == null) return {};
2913
2897
  var n = {};
2914
2898
  for (var s in t)
@@ -2942,21 +2926,21 @@ function wt(t) {
2942
2926
  for (var a = 1; a < arguments.length; a++) {
2943
2927
  var n = arguments[a] != null ? arguments[a] : {};
2944
2928
  a % 2 ? In(Object(n), !0).forEach(function(s) {
2945
- li(t, s, n[s]);
2929
+ ii(t, s, n[s]);
2946
2930
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(t, Object.getOwnPropertyDescriptors(n)) : In(Object(n)).forEach(function(s) {
2947
2931
  Object.defineProperty(t, s, Object.getOwnPropertyDescriptor(n, s));
2948
2932
  });
2949
2933
  }
2950
2934
  return t;
2951
2935
  }
2952
- function li(t, a, n) {
2953
- return a = ii(a), a in t ? Object.defineProperty(t, a, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[a] = n, t;
2936
+ function ii(t, a, n) {
2937
+ return a = oi(a), a in t ? Object.defineProperty(t, a, { value: n, enumerable: !0, configurable: !0, writable: !0 }) : t[a] = n, t;
2954
2938
  }
2955
- function ii(t) {
2956
- var a = oi(t, "string");
2939
+ function oi(t) {
2940
+ var a = ci(t, "string");
2957
2941
  return typeof a == "symbol" ? a : a + "";
2958
2942
  }
2959
- function oi(t, a) {
2943
+ function ci(t, a) {
2960
2944
  if (typeof t != "object" || !t) return t;
2961
2945
  var n = t[Symbol.toPrimitive];
2962
2946
  if (n !== void 0) {
@@ -2966,23 +2950,23 @@ function oi(t, a) {
2966
2950
  }
2967
2951
  return (a === "string" ? String : Number)(t);
2968
2952
  }
2969
- function Ja(t) {
2953
+ function Qa(t) {
2970
2954
  return t && t.map((a, n) => /* @__PURE__ */ Ae.createElement(a.tag, wt({
2971
2955
  key: n
2972
- }, a.attr), Ja(a.child)));
2956
+ }, a.attr), Qa(a.child)));
2973
2957
  }
2974
- function Qe(t) {
2975
- return (a) => /* @__PURE__ */ Ae.createElement(ci, Nt({
2958
+ function $e(t) {
2959
+ return (a) => /* @__PURE__ */ Ae.createElement(di, Nt({
2976
2960
  attr: wt({}, t.attr)
2977
- }, a), Ja(t.child));
2961
+ }, a), Qa(t.child));
2978
2962
  }
2979
- function ci(t) {
2963
+ function di(t) {
2980
2964
  var a = (n) => {
2981
2965
  var {
2982
2966
  attr: s,
2983
2967
  size: l,
2984
2968
  title: o
2985
- } = t, i = si(t, ai), u = l || n.size || "1em", c;
2969
+ } = t, i = ri(t, si), u = l || n.size || "1em", c;
2986
2970
  return n.className && (c = n.className), t.className && (c = (c ? c + " " : "") + t.className), /* @__PURE__ */ Ae.createElement("svg", Nt({
2987
2971
  stroke: "currentColor",
2988
2972
  fill: "currentColor",
@@ -2997,13 +2981,13 @@ function ci(t) {
2997
2981
  xmlns: "http://www.w3.org/2000/svg"
2998
2982
  }), o && /* @__PURE__ */ Ae.createElement("title", null, o), t.children);
2999
2983
  };
3000
- return Dn !== void 0 ? /* @__PURE__ */ Ae.createElement(Dn.Consumer, null, (n) => a(n)) : a(Qa);
2984
+ return Dn !== void 0 ? /* @__PURE__ */ Ae.createElement(Dn.Consumer, null, (n) => a(n)) : a($a);
3001
2985
  }
3002
- function di(t) {
3003
- return Qe({ 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: [] }] })(t);
2986
+ function ui(t) {
2987
+ return $e({ 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: [] }] })(t);
3004
2988
  }
3005
- function Wa(t) {
3006
- const { theme: a } = Es(), n = L((p) => p.theme), s = f((p) => p.frame), l = f((p) => p.card), o = f((p) => p.activeTabCardId), i = Vs(), { refetch: u } = pe(l), { updateCardTab: c, setRunSql: h } = Y(), d = tt(), g = tt({}), C = s.cards.find((p) => p.id === o), m = wa(() => {
2989
+ function Ja(t) {
2990
+ const { theme: a } = Vs(), n = L((p) => p.theme), s = f((p) => p.frame), l = f((p) => p.card), o = f((p) => p.activeTabCardId), i = _s(), { refetch: u } = pe(l), { updateCardTab: c, setRunSql: h } = Y(), d = tt(), g = tt({}), C = s.cards.find((p) => p.id === o), m = wa(() => {
3007
2991
  let p = "";
3008
2992
  return t === "python" && (p = (C == null ? void 0 : C.python) || oa), t === "sql" && (p = (C == null ? void 0 : C.sql) || ""), p;
3009
2993
  }, [t, C]);
@@ -3038,7 +3022,7 @@ function Wa(t) {
3038
3022
  inherit: !0,
3039
3023
  rules: [],
3040
3024
  colors: {
3041
- "editor.background": x === "light" ? "#ffffff" : _s("240 10% 10%")
3025
+ "editor.background": x === "light" ? "#ffffff" : Rs("240 10% 10%")
3042
3026
  // 'editor.background':
3043
3027
  // activeTheme === 'light'
3044
3028
  // ? '#ffffff'
@@ -3063,15 +3047,15 @@ function Wa(t) {
3063
3047
  }
3064
3048
  return { handleEditorDidMount: N };
3065
3049
  }
3066
- function ui() {
3067
- const t = f((i) => i.card.sql), a = f((i) => i.sqlGen), { setCardSql: n, setSqlGen: s } = Y(), { handleEditorDidMount: l } = Wa("sql");
3050
+ function mi() {
3051
+ const t = f((i) => i.card.sql), a = f((i) => i.sqlGen), { setCardSql: n, setSqlGen: s } = Y(), { handleEditorDidMount: l } = Ja("sql");
3068
3052
  function o(i) {
3069
- n(i), Rs(a) || s({});
3053
+ n(i), qs(a) || s({});
3070
3054
  }
3071
3055
  return /* @__PURE__ */ r("div", { className: "relative h-full w-full", children: [
3072
3056
  !t && /* @__PURE__ */ e("div", { className: "pointer-events-none absolute left-[65px] top-3 z-10 font-mono text-sm text-muted-foreground", children: "Write your SQL here" }),
3073
3057
  /* @__PURE__ */ e(
3074
- Ot,
3058
+ Tt,
3075
3059
  {
3076
3060
  theme: "default",
3077
3061
  className: "pt-3",
@@ -3095,13 +3079,13 @@ function ui() {
3095
3079
  )
3096
3080
  ] });
3097
3081
  }
3098
- function mi() {
3099
- const t = f((l) => l.card.python), { setCardPython: a } = Y(), { handleEditorDidMount: n } = Wa("python");
3082
+ function hi() {
3083
+ const t = f((l) => l.card.python), { setCardPython: a } = Y(), { handleEditorDidMount: n } = Ja("python");
3100
3084
  function s(l) {
3101
3085
  a(l);
3102
3086
  }
3103
3087
  return /* @__PURE__ */ e(
3104
- Ot,
3088
+ Tt,
3105
3089
  {
3106
3090
  className: "pt-3",
3107
3091
  theme: "default",
@@ -3124,9 +3108,9 @@ function mi() {
3124
3108
  }
3125
3109
  );
3126
3110
  }
3127
- function hi({ jsonString: t }) {
3111
+ function pi({ jsonString: t }) {
3128
3112
  return /* @__PURE__ */ e(
3129
- Ot,
3113
+ Tt,
3130
3114
  {
3131
3115
  theme: "default",
3132
3116
  defaultLanguage: "json",
@@ -3150,9 +3134,9 @@ function hi({ jsonString: t }) {
3150
3134
  }
3151
3135
  );
3152
3136
  }
3153
- function Ka(t) {
3137
+ function Wa(t) {
3154
3138
  var se, W, ce;
3155
- const [a, n] = J(""), [s, l] = J(null), { authToken: o } = Ge(), i = f((_) => {
3139
+ const [a, n] = J(""), [s, l] = J(null), { authToken: o } = He(), i = f((_) => {
3156
3140
  var ae;
3157
3141
  return (ae = _ == null ? void 0 : _.card) == null ? void 0 : ae.sql;
3158
3142
  }), u = f((_) => {
@@ -3180,7 +3164,7 @@ function Ka(t) {
3180
3164
  handleInputChange: O,
3181
3165
  handleSubmit: B,
3182
3166
  stop: U
3183
- } = qs({
3167
+ } = js({
3184
3168
  api: "https://semaphor.cloud/api/v1/assistant",
3185
3169
  headers: {
3186
3170
  Authorization: `Bearer ${o == null ? void 0 : o.accessToken}`
@@ -3246,11 +3230,11 @@ function Ka(t) {
3246
3230
  } : _);
3247
3231
  }
3248
3232
  function P(_) {
3249
- const ae = Ps(g, _);
3233
+ const ae = Hs(g, _);
3250
3234
  F(ae);
3251
3235
  }
3252
3236
  function F(_) {
3253
- const ae = Bs(_);
3237
+ const ae = Ps(_);
3254
3238
  T(ae), ee((ge) => [
3255
3239
  ...ge,
3256
3240
  {
@@ -3282,7 +3266,7 @@ function Ka(t) {
3282
3266
  connectionType: M || "",
3283
3267
  datamodelId: E || ""
3284
3268
  };
3285
- if (!js(
3269
+ if (!Bs(
3286
3270
  [...w || [], ...g],
3287
3271
  _
3288
3272
  ) || g.length === 0) {
@@ -3291,7 +3275,7 @@ function Ka(t) {
3291
3275
  ...g,
3292
3276
  _
3293
3277
  ]).filter(
3294
- (We) => We.connectionId === _.connectionId
3278
+ (Je) => Je.connectionId === _.connectionId
3295
3279
  );
3296
3280
  F(ge);
3297
3281
  }
@@ -3320,7 +3304,7 @@ function Ka(t) {
3320
3304
  errorMessage: V
3321
3305
  };
3322
3306
  }
3323
- function pi(t) {
3307
+ function fi(t) {
3324
3308
  const a = t.toUpperCase().indexOf("WHERE"), n = t.toUpperCase().indexOf("GROUP BY"), s = t.toUpperCase().indexOf("LIMIT"), l = t.toUpperCase().indexOf("ORDER BY");
3325
3309
  let o = t.length;
3326
3310
  if (l !== -1 && (o = l), s !== -1 && s < o && (o = s), a !== -1) {
@@ -3336,7 +3320,7 @@ function pi(t) {
3336
3320
  return console.log("beforeClause", i), console.log("afterClause", u), u ? `${i} {{ filters | where }} ${u}` : `${i.replace(/;$/, "")} {{ filters | where }}`;
3337
3321
  }
3338
3322
  }
3339
- function Ya({
3323
+ function Ka({
3340
3324
  variant: t = "secondary"
3341
3325
  }) {
3342
3326
  const { setCardSql: a } = Y(), n = f((m) => m.frame), s = f((m) => m.card), l = f(
@@ -3350,7 +3334,7 @@ function Ya({
3350
3334
  ), h = f((m) => m.isShowingVisual), d = s.sql, g = f((m) => m.onSave);
3351
3335
  function C() {
3352
3336
  let m = d;
3353
- d && !d.includes("{{") && (m = pi(d), a(m));
3337
+ d && !d.includes("{{") && (m = fi(d), a(m));
3354
3338
  const N = {
3355
3339
  ...s,
3356
3340
  lastSelectedSchema: l,
@@ -3366,7 +3350,7 @@ function Ya({
3366
3350
  ), x = {
3367
3351
  ...n,
3368
3352
  cards: p,
3369
- activeCardId: fi(p, n.activeCardId)
3353
+ activeCardId: gi(p, n.activeCardId)
3370
3354
  };
3371
3355
  g == null || g(x);
3372
3356
  }
@@ -3383,7 +3367,7 @@ function Ya({
3383
3367
  }
3384
3368
  );
3385
3369
  }
3386
- function Za() {
3370
+ function Ya() {
3387
3371
  const { setTempQueryData: t, setSqlGen: a } = Y(), n = en(), s = f((c) => c.tempQueryData), l = f((c) => c.onClose), o = f((c) => c.card), { queryKey: i } = pe(o);
3388
3372
  function u() {
3389
3373
  if (s) {
@@ -3405,7 +3389,7 @@ function Za() {
3405
3389
  }
3406
3390
  );
3407
3391
  }
3408
- function Xa() {
3392
+ function Za() {
3409
3393
  const { setTempQueryData: t } = Y(), a = en(), n = f((m) => m.tempQueryData), s = f((m) => m.card), { queryKey: l } = pe(s), {
3410
3394
  setCardSql: o,
3411
3395
  setSqlGen: i,
@@ -3423,11 +3407,11 @@ function Xa() {
3423
3407
  }), a.setQueryData(l, null), a.removeQueries({ queryKey: l, exact: !0 }), o(""), i({}), g(), u(""), c(""), h({});
3424
3408
  }
3425
3409
  return /* @__PURE__ */ r(X, { onClick: C, className: "", size: "sm", variant: "secondary", children: [
3426
- /* @__PURE__ */ e(pl, { className: "mr-2 size-4" }),
3410
+ /* @__PURE__ */ e(fl, { className: "mr-2 size-4" }),
3427
3411
  "Clear"
3428
3412
  ] });
3429
3413
  }
3430
- function fi(t, a) {
3414
+ function gi(t, a) {
3431
3415
  if (t.length === 0)
3432
3416
  return "";
3433
3417
  if (a) {
@@ -3447,7 +3431,7 @@ function fi(t, a) {
3447
3431
  }
3448
3432
  return t[0].id;
3449
3433
  }
3450
- function gi() {
3434
+ function yi() {
3451
3435
  const t = en(), [a, n] = J(!1), [s, l] = J(!1);
3452
3436
  f((v) => v.frame);
3453
3437
  const o = f((v) => v.card);
@@ -3465,7 +3449,7 @@ function gi() {
3465
3449
  const u = f((v) => {
3466
3450
  var P;
3467
3451
  return (P = v == null ? void 0 : v.card) == null ? void 0 : P.sql;
3468
- }), { sheetFilterValues: c } = Hs(), {
3452
+ }), { sheetFilterValues: c } = Gs(), {
3469
3453
  setCardCustomCfg: h,
3470
3454
  setQueryResultColumns: d,
3471
3455
  setCardSql: g,
@@ -3491,13 +3475,13 @@ function gi() {
3491
3475
  queryKey: Z,
3492
3476
  refetch: Q,
3493
3477
  errorMessage: I
3494
- } = pe(o), { handleSetAIScope: b } = Ka();
3478
+ } = pe(o), { handleSetAIScope: b } = Wa();
3495
3479
  me(() => {
3496
3480
  if (M && (M.rowLimitExceeded && ft.error("Row limit (10,000) exceeded. Refine your query.", {
3497
3481
  position: "top-center",
3498
3482
  richColors: !0
3499
3483
  }), m((M == null ? void 0 : M.output) || ""), M.records.length > 0)) {
3500
- const { dimensionKeys: v } = Ht(M.records);
3484
+ const { dimensionKeys: v } = Gt(M.records);
3501
3485
  d(v);
3502
3486
  }
3503
3487
  }, [M, d, m]), me(() => {
@@ -3538,7 +3522,7 @@ function gi() {
3538
3522
  className: "relative flex w-1/3 min-w-0 grow overflow-hidden text-xs",
3539
3523
  role: "editor-filter-container",
3540
3524
  children: /* @__PURE__ */ e("div", { className: "mt-2 w-[99%]", children: /* @__PURE__ */ e(
3541
- hi,
3525
+ pi,
3542
3526
  {
3543
3527
  jsonString: JSON.stringify(c, null, 2)
3544
3528
  }
@@ -3577,7 +3561,7 @@ function gi() {
3577
3561
  {
3578
3562
  id: "sql-container",
3579
3563
  className: "relative flex w-[99%]",
3580
- children: /* @__PURE__ */ e(ui, {})
3564
+ children: /* @__PURE__ */ e(mi, {})
3581
3565
  }
3582
3566
  ),
3583
3567
  a && /* @__PURE__ */ e("code", { className: "absolute right-6 top-3 text-xs text-muted-foreground/70", children: "sql" })
@@ -3599,7 +3583,7 @@ function gi() {
3599
3583
  {
3600
3584
  id: "python-container",
3601
3585
  className: "relative flex w-[99%] pt-0",
3602
- children: /* @__PURE__ */ e(mi, {})
3586
+ children: /* @__PURE__ */ e(hi, {})
3603
3587
  }
3604
3588
  ),
3605
3589
  /* @__PURE__ */ e("code", { className: "absolute right-6 top-3 text-xs text-muted-foreground/70", children: "python" })
@@ -3630,20 +3614,20 @@ function gi() {
3630
3614
  className: "shrink-0",
3631
3615
  size: "sm",
3632
3616
  children: [
3633
- E || H ? /* @__PURE__ */ e(He, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(Gs, { className: "mr-2 h-4 w-4" }),
3617
+ E || H ? /* @__PURE__ */ e(Pe, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(Us, { className: "mr-2 h-4 w-4" }),
3634
3618
  "Run"
3635
3619
  ]
3636
3620
  }
3637
3621
  ),
3638
3622
  /* @__PURE__ */ e(
3639
- $a,
3623
+ Ua,
3640
3624
  {
3641
3625
  sql: M == null ? void 0 : M.sql,
3642
3626
  error: I,
3643
3627
  onClick: O
3644
3628
  }
3645
3629
  ),
3646
- /* @__PURE__ */ e(Xa, {}),
3630
+ /* @__PURE__ */ e(Za, {}),
3647
3631
  /* @__PURE__ */ e(
3648
3632
  ia,
3649
3633
  {
@@ -3651,7 +3635,7 @@ function gi() {
3651
3635
  onPressedChange: (v) => n(v),
3652
3636
  className: "",
3653
3637
  size: "sm",
3654
- children: /* @__PURE__ */ e(di, { className: "size-4 text-foreground/70" })
3638
+ children: /* @__PURE__ */ e(ui, { className: "size-4 text-foreground/70" })
3655
3639
  }
3656
3640
  ),
3657
3641
  /* @__PURE__ */ e(
@@ -3667,8 +3651,8 @@ function gi() {
3667
3651
  )
3668
3652
  ] }),
3669
3653
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
3670
- /* @__PURE__ */ e(Za, {}),
3671
- /* @__PURE__ */ e(Ya, {})
3654
+ /* @__PURE__ */ e(Ya, {}),
3655
+ /* @__PURE__ */ e(Ka, {})
3672
3656
  ] })
3673
3657
  ]
3674
3658
  }
@@ -3692,7 +3676,7 @@ function gi() {
3692
3676
  )
3693
3677
  );
3694
3678
  }
3695
- function yi({ data: t }) {
3679
+ function bi({ data: t }) {
3696
3680
  var i;
3697
3681
  const [a, n] = Ae.useState([]), l = Object.keys(t[0]).map((u) => ({
3698
3682
  // header: key,
@@ -3706,27 +3690,27 @@ function yi({ data: t }) {
3706
3690
  onClick: () => c.toggleSorting(c.getIsSorted() === "asc"),
3707
3691
  children: [
3708
3692
  u,
3709
- h === "asc" ? /* @__PURE__ */ e(Us, { className: "ml-2 h-5 w-5" }) : h === "desc" ? /* @__PURE__ */ e($s, { className: "ml-2 h-5 w-5" }) : null
3693
+ h === "asc" ? /* @__PURE__ */ e($s, { className: "ml-2 h-5 w-5" }) : h === "desc" ? /* @__PURE__ */ e(Qs, { className: "ml-2 h-5 w-5" }) : null
3710
3694
  ]
3711
3695
  }
3712
3696
  ) });
3713
3697
  }
3714
- })), o = Qs({
3698
+ })), o = Js({
3715
3699
  data: t,
3716
3700
  columns: l,
3717
- getCoreRowModel: Xs(),
3718
- getPaginationRowModel: Zs(),
3701
+ getCoreRowModel: er(),
3702
+ getPaginationRowModel: Xs(),
3719
3703
  onSortingChange: n,
3720
- getSortedRowModel: Ys(),
3704
+ getSortedRowModel: Zs(),
3721
3705
  manualPagination: !0,
3722
3706
  state: {
3723
3707
  sorting: a
3724
3708
  }
3725
3709
  });
3726
- return /* @__PURE__ */ r(It, { className: "grow overflow-auto font-mono text-xs text-foreground/95", children: [
3710
+ return /* @__PURE__ */ r(Ot, { className: "grow overflow-auto font-mono text-xs text-foreground/95", children: [
3727
3711
  /* @__PURE__ */ r("table", { className: "w-full", children: [
3728
- /* @__PURE__ */ e(Js, { className: "sticky top-0 z-50 h-0 bg-muted", children: o.getHeaderGroups().map((u) => /* @__PURE__ */ e(zt, { className: "", children: u.headers.map((c) => /* @__PURE__ */ e(
3729
- Ws,
3712
+ /* @__PURE__ */ e(Ws, { className: "sticky top-0 z-50 h-0 bg-muted", children: o.getHeaderGroups().map((u) => /* @__PURE__ */ e(At, { className: "", children: u.headers.map((c) => /* @__PURE__ */ e(
3713
+ Ks,
3730
3714
  {
3731
3715
  className: "h-11 font-semibold text-foreground",
3732
3716
  children: c.isPlaceholder ? null : xn(
@@ -3736,24 +3720,24 @@ function yi({ data: t }) {
3736
3720
  },
3737
3721
  c.id
3738
3722
  )) }, u.id)) }),
3739
- /* @__PURE__ */ e(Ks, { children: (i = o.getRowModel().rows) != null && i.length ? o.getRowModel().rows.map((u) => /* @__PURE__ */ e(
3740
- zt,
3723
+ /* @__PURE__ */ e(Ys, { children: (i = o.getRowModel().rows) != null && i.length ? o.getRowModel().rows.map((u) => /* @__PURE__ */ e(
3724
+ At,
3741
3725
  {
3742
3726
  className: "h-11 whitespace-nowrap py-2",
3743
3727
  "data-state": u.getIsSelected() && "selected",
3744
3728
  children: u.getVisibleCells().map((c) => /* @__PURE__ */ e(Cn, { className: "py-2", children: xn(c.column.columnDef.cell, c.getContext()) }, c.id))
3745
3729
  },
3746
3730
  u.id
3747
- )) : /* @__PURE__ */ e(zt, { children: /* @__PURE__ */ e(Cn, { colSpan: l.length, className: "h-24 text-center", children: "No results." }) }) })
3731
+ )) : /* @__PURE__ */ e(At, { children: /* @__PURE__ */ e(Cn, { colSpan: l.length, className: "h-24 text-center", children: "No results." }) }) })
3748
3732
  ] }),
3749
- /* @__PURE__ */ e(Pe, { orientation: "horizontal" })
3733
+ /* @__PURE__ */ e(et, { orientation: "horizontal" })
3750
3734
  ] });
3751
3735
  }
3752
- function bi({ card: t }) {
3736
+ function vi({ card: t }) {
3753
3737
  var w, k, T, D, M, E, H, ee, S, q, Z;
3754
3738
  const [a, n] = J(!1), [s, l] = J(
3755
3739
  []
3756
- ), { authToken: o } = Ge(), i = er(o == null ? void 0 : o.accessToken), u = L((Q) => Q.themeStyle), c = {
3740
+ ), { authToken: o } = He(), i = tr(o == null ? void 0 : o.accessToken), u = L((Q) => Q.themeStyle), c = {
3757
3741
  colors: ((k = (w = u == null ? void 0 : u.chart) == null ? void 0 : w.dataset) == null ? void 0 : k.backgroundColor) || []
3758
3742
  };
3759
3743
  (T = t.customCardPreferences) != null && T.inputData;
@@ -3779,7 +3763,7 @@ function bi({ card: t }) {
3779
3763
  return b || null;
3780
3764
  });
3781
3765
  return /* @__PURE__ */ e("div", { className: "semaphor-custom mb-3 flex grow basis-0 flex-col space-y-2 overflow-y-auto", children: /* @__PURE__ */ r(
3782
- Gr,
3766
+ Ur,
3783
3767
  {
3784
3768
  fallback: /* @__PURE__ */ e(te, {}),
3785
3769
  children: [
@@ -3803,7 +3787,7 @@ function bi({ card: t }) {
3803
3787
  );
3804
3788
  if (b)
3805
3789
  return /* @__PURE__ */ e(
3806
- tr,
3790
+ nr,
3807
3791
  {
3808
3792
  onLoadingStatus: x,
3809
3793
  onDataChange: N,
@@ -3833,7 +3817,7 @@ function bi({ card: t }) {
3833
3817
  (Z = t.customCardPreferences) == null ? void 0 : Z.componentName
3834
3818
  ) });
3835
3819
  }
3836
- function es({
3820
+ function Xa({
3837
3821
  // card,
3838
3822
  // showCard,
3839
3823
  className: t,
@@ -3860,12 +3844,12 @@ function es({
3860
3844
  C
3861
3845
  ]);
3862
3846
  function N(y) {
3863
- return /* @__PURE__ */ e(bi, { card: y });
3847
+ return /* @__PURE__ */ e(vi, { card: y });
3864
3848
  }
3865
3849
  function p() {
3866
3850
  if (c != null && c.records && (c == null ? void 0 : c.records.length) === 0 && !h && !d)
3867
3851
  return /* @__PURE__ */ r("div", { className: "flex h-full flex-col items-center justify-center gap-2", children: [
3868
- /* @__PURE__ */ e(ir, { className: "size-8 text-muted-foreground" }),
3852
+ /* @__PURE__ */ e(or, { className: "size-8 text-muted-foreground" }),
3869
3853
  /* @__PURE__ */ e("p", { className: "text-sm text-muted-foreground", children: "No records to display" })
3870
3854
  ] });
3871
3855
  if (!n.id) return null;
@@ -3873,50 +3857,47 @@ function es({
3873
3857
  return N(n);
3874
3858
  if (!["table", "custom"].includes(n.type) && m)
3875
3859
  return /* @__PURE__ */ e(te, { children: h || d ? /* @__PURE__ */ e(te, {}) : /* @__PURE__ */ e(
3876
- or,
3860
+ cr,
3877
3861
  {
3878
3862
  cfg: m
3879
3863
  }
3880
3864
  ) });
3881
3865
  if (n.type === "table" && (c != null && c.records) && (c == null ? void 0 : c.records.length) > 0)
3882
- return /* @__PURE__ */ r(st, { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: [
3883
- /* @__PURE__ */ e(cr, { card: n, data: c == null ? void 0 : c.records }),
3884
- /* @__PURE__ */ e(Pe, { orientation: "horizontal" })
3885
- ] });
3866
+ return /* @__PURE__ */ e("div", { className: "relative mb-2 flex h-full min-h-0 w-full flex-1 grow basis-0", children: /* @__PURE__ */ e(dr, { card: n, data: c == null ? void 0 : c.records }) });
3886
3867
  }
3887
3868
  return /* @__PURE__ */ r(
3888
- nr,
3869
+ ar,
3889
3870
  {
3890
3871
  role: "editor-visual-card",
3891
3872
  className: R("relative flex h-full flex-col rounded-none", t),
3892
3873
  ...a,
3893
3874
  children: [
3894
- s && /* @__PURE__ */ r(ar, { className: "flex flex-row items-start justify-between py-4", children: [
3875
+ s && /* @__PURE__ */ r(sr, { className: "flex flex-row items-start justify-between py-4", children: [
3895
3876
  /* @__PURE__ */ r("div", { children: [
3896
3877
  /* @__PURE__ */ e(
3897
- Ye,
3878
+ Ke,
3898
3879
  {
3899
3880
  enabled: !0,
3900
3881
  text: n.title,
3901
3882
  onSave: (y) => g({ ...n, title: y }),
3902
- children: /* @__PURE__ */ e("div", { className: "flex items-center gap-5", children: /* @__PURE__ */ e(sr, { className: "text-base", children: n.title || "Add title" }) })
3883
+ children: /* @__PURE__ */ e("div", { className: "flex items-center gap-5", children: /* @__PURE__ */ e(rr, { className: "text-base", children: n.title || "Add title" }) })
3903
3884
  },
3904
3885
  n.title
3905
3886
  ),
3906
3887
  /* @__PURE__ */ e(
3907
- Ye,
3888
+ Ke,
3908
3889
  {
3909
3890
  enabled: !0,
3910
3891
  text: n.description || "",
3911
3892
  onSave: (y) => g({ ...n, description: y }),
3912
- children: /* @__PURE__ */ e(rr, { children: n.description || "Add description" })
3893
+ children: /* @__PURE__ */ e(lr, { children: n.description || "Add description" })
3913
3894
  },
3914
3895
  n.description
3915
3896
  )
3916
3897
  ] }),
3917
3898
  u && /* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
3918
3899
  /* @__PURE__ */ e(
3919
- Ye,
3900
+ Ke,
3920
3901
  {
3921
3902
  enabled: !0,
3922
3903
  className: "my-1",
@@ -3928,18 +3909,18 @@ function es({
3928
3909
  /* @__PURE__ */ e(ua, { filter: u })
3929
3910
  ] })
3930
3911
  ] }),
3931
- /* @__PURE__ */ e(lr, { className: "flex grow flex-col", children: p() })
3912
+ /* @__PURE__ */ e(ir, { className: "flex grow flex-col", children: p() })
3932
3913
  ]
3933
3914
  }
3934
3915
  );
3935
3916
  }
3936
- const Rt = ({
3917
+ const qt = ({
3937
3918
  language: t,
3938
3919
  value: a,
3939
3920
  onChange: n,
3940
3921
  readonly: s
3941
3922
  }) => /* @__PURE__ */ e(
3942
- Ot,
3923
+ Tt,
3943
3924
  {
3944
3925
  className: "h-full w-full overflow-hidden text-xs",
3945
3926
  theme: "default",
@@ -3959,7 +3940,7 @@ const Rt = ({
3959
3940
  value: a,
3960
3941
  onChange: n
3961
3942
  }
3962
- ), vi = () => /* @__PURE__ */ r(Fn, { children: [
3943
+ ), xi = () => /* @__PURE__ */ r(Fn, { children: [
3963
3944
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2", children: /* @__PURE__ */ e(Ln, { children: "Customize Card" }) }),
3964
3945
  /* @__PURE__ */ r(En, { children: [
3965
3946
  "See the configuration options and documentation",
@@ -3973,7 +3954,7 @@ const Rt = ({
3973
3954
  }
3974
3955
  )
3975
3956
  ] })
3976
- ] }), xi = ({
3957
+ ] }), Ci = ({
3977
3958
  // defaultConfig,
3978
3959
  customCode: t,
3979
3960
  cardCustomCfgString: a,
@@ -3982,9 +3963,9 @@ const Rt = ({
3982
3963
  onCodeChange: l
3983
3964
  }) => /* @__PURE__ */ r(nn, { defaultValue: "final-config", className: "flex w-1/2 flex-col", children: [
3984
3965
  /* @__PURE__ */ r(an, { className: "justify-start rounded-sm rounded-b-none border border-b-0", children: [
3985
- /* @__PURE__ */ e(Ze, { value: "final-config", children: "Config" }),
3986
- /* @__PURE__ */ e(Ze, { value: "custom-config", children: "Changes" }),
3987
- /* @__PURE__ */ e(Ze, { value: "custom-code", children: "Custom Code" })
3966
+ /* @__PURE__ */ e(Ye, { value: "final-config", children: "Config" }),
3967
+ /* @__PURE__ */ e(Ye, { value: "custom-config", children: "Changes" }),
3968
+ /* @__PURE__ */ e(Ye, { value: "custom-code", children: "Custom Code" })
3988
3969
  ] }),
3989
3970
  /* @__PURE__ */ e(
3990
3971
  pt,
@@ -3992,7 +3973,7 @@ const Rt = ({
3992
3973
  value: "final-config",
3993
3974
  className: "mt-0 grow rounded-b border border-t-0",
3994
3975
  children: /* @__PURE__ */ e(
3995
- Rt,
3976
+ qt,
3996
3977
  {
3997
3978
  language: "json",
3998
3979
  value: n,
@@ -4007,7 +3988,7 @@ const Rt = ({
4007
3988
  value: "custom-config",
4008
3989
  className: "mt-0 grow rounded-b border border-t-0",
4009
3990
  children: /* @__PURE__ */ e(
4010
- Rt,
3991
+ qt,
4011
3992
  {
4012
3993
  readonly: !0,
4013
3994
  language: "json",
@@ -4024,7 +4005,7 @@ const Rt = ({
4024
4005
  value: "custom-code",
4025
4006
  className: "mt-0 grow rounded-b border border-t-0",
4026
4007
  children: /* @__PURE__ */ e(
4027
- Rt,
4008
+ qt,
4028
4009
  {
4029
4010
  language: "javascript",
4030
4011
  value: t,
@@ -4033,7 +4014,7 @@ const Rt = ({
4033
4014
  )
4034
4015
  }
4035
4016
  )
4036
- ] }), Ci = ({
4017
+ ] }), Ni = ({
4037
4018
  error: t,
4038
4019
  hasCardCustomConfig: a,
4039
4020
  onReset: n,
@@ -4045,7 +4026,7 @@ const Rt = ({
4045
4026
  /* @__PURE__ */ e(X, { onClick: s, variant: "outline", children: "Apply" }),
4046
4027
  /* @__PURE__ */ e(X, { onClick: l, variant: "outline", children: "Close" })
4047
4028
  ] });
4048
- function Ni() {
4029
+ function wi() {
4049
4030
  const [t, a] = J(!1), [n, s] = J(""), [l, o] = J(""), [i, u] = J(""), [c, h] = J(""), d = f((D) => D.card), g = f((D) => D.card.customCfg), C = g ? JSON.stringify(g, null, 2) : "", { data: m } = pe(d), { data: N } = tn(d), { setCardCustomCfg: p, setCustomVisualCode: x } = Y(), y = (D) => {
4050
4031
  var M, E;
4051
4032
  return JSON.stringify(
@@ -4075,7 +4056,7 @@ function Ni() {
4075
4056
  });
4076
4057
  if (D) {
4077
4058
  s(y(D)), u(((E = d.preferences) == null ? void 0 : E.customVisualCode) || "");
4078
- const H = ur(D, g);
4059
+ const H = mr(D, g);
4079
4060
  o(y(H));
4080
4061
  }
4081
4062
  }, k = () => {
@@ -4083,7 +4064,7 @@ function Ni() {
4083
4064
  if (i && x(i), l) {
4084
4065
  const D = JSON.parse(
4085
4066
  l
4086
- ), M = mr(
4067
+ ), M = hr(
4087
4068
  JSON.parse(n),
4088
4069
  D
4089
4070
  );
@@ -4100,15 +4081,15 @@ function Ni() {
4100
4081
  tooltip: "Customize Visual",
4101
4082
  onClick: w,
4102
4083
  className: T ? "" : "text-green-600 hover:text-green-700",
4103
- children: /* @__PURE__ */ e(dr, { className: "h-4 w-4" })
4084
+ children: /* @__PURE__ */ e(ur, { className: "h-4 w-4" })
4104
4085
  }
4105
4086
  ) }),
4106
4087
  /* @__PURE__ */ r(An, { className: "flex h-[600px] grow flex-col overflow-auto sm:min-w-[900px] lg:min-w-[1200px]", children: [
4107
- /* @__PURE__ */ e(vi, {}),
4088
+ /* @__PURE__ */ e(xi, {}),
4108
4089
  /* @__PURE__ */ r("div", { className: "flex grow gap-2", children: [
4109
- /* @__PURE__ */ e(Tt, { FallbackComponent: ma, children: /* @__PURE__ */ e(es, { className: "w-1/2 rounded shadow-none" }) }),
4090
+ /* @__PURE__ */ e(zt, { FallbackComponent: ma, children: /* @__PURE__ */ e(Xa, { className: "w-1/2 rounded shadow-none" }) }),
4110
4091
  /* @__PURE__ */ e(
4111
- xi,
4092
+ Ci,
4112
4093
  {
4113
4094
  customCode: i,
4114
4095
  cardCustomCfgString: C,
@@ -4119,7 +4100,7 @@ function Ni() {
4119
4100
  )
4120
4101
  ] }),
4121
4102
  /* @__PURE__ */ e(
4122
- Ci,
4103
+ Ni,
4123
4104
  {
4124
4105
  error: c,
4125
4106
  hasCardCustomConfig: !!g,
@@ -4133,19 +4114,19 @@ function Ni() {
4133
4114
  ] })
4134
4115
  ] });
4135
4116
  }
4136
- function ts(t) {
4117
+ function es(t) {
4137
4118
  const [a, n] = J(null);
4138
4119
  return a;
4139
4120
  }
4140
- function ns() {
4141
- const { authToken: t } = Ge(), { data: a, isLoading: n, isFetching: s, isError: l } = Un({
4121
+ function ts() {
4122
+ const { authToken: t } = He(), { data: a, isLoading: n, isFetching: s, isError: l } = Un({
4142
4123
  queryKey: ["plugins", t == null ? void 0 : t.accessToken],
4143
- queryFn: () => hr(t == null ? void 0 : t.accessToken)
4124
+ queryFn: () => pr(t == null ? void 0 : t.accessToken)
4144
4125
  // staleTime: Infinity,
4145
4126
  });
4146
4127
  return { data: a, isLoading: n, isFetching: s, isError: l };
4147
4128
  }
4148
- function wi({
4129
+ function Si({
4149
4130
  onChartTypeChange: t
4150
4131
  }) {
4151
4132
  const [a, n] = J([]), {
@@ -4153,7 +4134,7 @@ function wi({
4153
4134
  setCardPreferences: l,
4154
4135
  setCardType: o,
4155
4136
  setCustomCardPreferences: i
4156
- } = Y(), { data: u } = ns();
4137
+ } = Y(), { data: u } = ts();
4157
4138
  function c(h, d) {
4158
4139
  s(null), l({}), o(h), d && i({
4159
4140
  type: "component",
@@ -4168,7 +4149,7 @@ function wi({
4168
4149
  var d;
4169
4150
  if (u) {
4170
4151
  const C = (await Promise.all(
4171
- (d = u == null ? void 0 : u.plugins) == null ? void 0 : d.map(async (m) => (await pr(m.value)).visuals.map((x) => ({
4152
+ (d = u == null ? void 0 : u.plugins) == null ? void 0 : d.map(async (m) => (await fr(m.value)).visuals.map((x) => ({
4172
4153
  name: x.name,
4173
4154
  icon: x.icon,
4174
4155
  url: m.value
@@ -4180,7 +4161,7 @@ function wi({
4180
4161
  }, [u]), a.length === 0 ? null : /* @__PURE__ */ r(te, { children: [
4181
4162
  /* @__PURE__ */ e(Te, { className: "my-2" }),
4182
4163
  /* @__PURE__ */ e("div", { className: "grid grid-cols-4 place-items-center", children: a.map((h, d) => /* @__PURE__ */ e(
4183
- Si,
4164
+ ki,
4184
4165
  {
4185
4166
  text: h.name,
4186
4167
  onClick: () => c("custom", h),
@@ -4190,33 +4171,33 @@ function wi({
4190
4171
  )) })
4191
4172
  ] });
4192
4173
  }
4193
- const Si = ({
4174
+ const ki = ({
4194
4175
  text: t,
4195
4176
  icon: a,
4196
4177
  onClick: n
4197
4178
  }) => {
4198
- const s = ts(), l = t.charAt(0).toUpperCase();
4179
+ const s = es(), l = t.charAt(0).toUpperCase();
4199
4180
  return /* @__PURE__ */ e(K, { onClick: n, tooltip: t, children: s ? /* @__PURE__ */ e(s, { className: "h-4 w-4" }) : l });
4200
4181
  };
4201
- function as(t) {
4202
- return Qe({ 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: [] }] })(t);
4182
+ function ns(t) {
4183
+ return $e({ 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: [] }] })(t);
4184
+ }
4185
+ function Mi(t) {
4186
+ return $e({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M48,180c0,11,7.18,20,16,20a14.24,14.24,0,0,0,10.22-4.66A8,8,0,0,1,85.78,206.4,30.06,30.06,0,0,1,64,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a30.06,30.06,0,0,1,21.78,9.6,8,8,0,0,1-11.56,11.06A14.24,14.24,0,0,0,64,160C55.18,160,48,169,48,180Zm79.6-8.69c-4-1.16-8.14-2.35-10.45-3.84-1.25-.81-1.23-1-1.12-1.9a4.57,4.57,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.82-.56A8,8,0,0,0,142,145.86c-2.12-.55-21-5.22-32.84,2.76a20.58,20.58,0,0,0-9,14.95c-2,15.88,13.65,20.41,23,23.11,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.14,3.93-4.6,3.06-15.17,1.56-19.55.36A8,8,0,0,0,109.94,214a61.34,61.34,0,0,0,15.19,2c5.82,0,12.3-1,17.49-4.46a20.82,20.82,0,0,0,9.19-15.23C154,179,137.49,174.17,127.6,171.31Zm83.09-26.84a8,8,0,0,0-10.23,4.84L188,184.21l-12.47-34.9a8,8,0,0,0-15.07,5.38l20,56a8,8,0,0,0,15.07,0l20-56A8,8,0,0,0,210.69,144.47ZM216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-27.31-8L160,51.31V80Z" }, child: [] }] })(t);
4203
4187
  }
4204
- function ki(t) {
4205
- return Qe({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M48,180c0,11,7.18,20,16,20a14.24,14.24,0,0,0,10.22-4.66A8,8,0,0,1,85.78,206.4,30.06,30.06,0,0,1,64,216c-17.65,0-32-16.15-32-36s14.35-36,32-36a30.06,30.06,0,0,1,21.78,9.6,8,8,0,0,1-11.56,11.06A14.24,14.24,0,0,0,64,160C55.18,160,48,169,48,180Zm79.6-8.69c-4-1.16-8.14-2.35-10.45-3.84-1.25-.81-1.23-1-1.12-1.9a4.57,4.57,0,0,1,2-3.67c4.6-3.12,15.34-1.73,19.82-.56A8,8,0,0,0,142,145.86c-2.12-.55-21-5.22-32.84,2.76a20.58,20.58,0,0,0-9,14.95c-2,15.88,13.65,20.41,23,23.11,12.06,3.49,13.12,4.92,12.78,7.59-.31,2.41-1.26,3.34-2.14,3.93-4.6,3.06-15.17,1.56-19.55.36A8,8,0,0,0,109.94,214a61.34,61.34,0,0,0,15.19,2c5.82,0,12.3-1,17.49-4.46a20.82,20.82,0,0,0,9.19-15.23C154,179,137.49,174.17,127.6,171.31Zm83.09-26.84a8,8,0,0,0-10.23,4.84L188,184.21l-12.47-34.9a8,8,0,0,0-15.07,5.38l20,56a8,8,0,0,0,15.07,0l20-56A8,8,0,0,0,210.69,144.47ZM216,88v24a8,8,0,0,1-16,0V96H152a8,8,0,0,1-8-8V40H56v72a8,8,0,0,1-16,0V40A16,16,0,0,1,56,24h96a8,8,0,0,1,5.66,2.34l56,56A8,8,0,0,1,216,88Zm-27.31-8L160,51.31V80Z" }, child: [] }] })(t);
4188
+ function as(t) {
4189
+ return $e({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, 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: [] }] })(t);
4206
4190
  }
4207
4191
  function ss(t) {
4208
- return Qe({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, 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: [] }] })(t);
4192
+ return $e({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M4.387 3h15.226a1 1 0 0 1 .948 1.316l-5.105 15.316a2 2 0 0 1 -1.898 1.368h-3.116a2 2 0 0 1 -1.898 -1.368l-5.104 -15.316a1 1 0 0 1 .947 -1.316" }, child: [] }, { tag: "path", attr: { d: "M5 9h14" }, child: [] }, { tag: "path", attr: { d: "M7 15h10" }, child: [] }] })(t);
4209
4193
  }
4210
4194
  function rs(t) {
4211
- return Qe({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M4.387 3h15.226a1 1 0 0 1 .948 1.316l-5.105 15.316a2 2 0 0 1 -1.898 1.368h-3.116a2 2 0 0 1 -1.898 -1.368l-5.104 -15.316a1 1 0 0 1 .947 -1.316" }, child: [] }, { tag: "path", attr: { d: "M5 9h14" }, child: [] }, { tag: "path", attr: { d: "M7 15h10" }, child: [] }] })(t);
4195
+ return $e({ 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: [] }] })(t);
4212
4196
  }
4213
4197
  function ls(t) {
4214
- return Qe({ 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: [] }] })(t);
4198
+ return $e({ 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: [] }] })(t);
4215
4199
  }
4216
- function is(t) {
4217
- return Qe({ 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: [] }] })(t);
4218
- }
4219
- function os({
4200
+ function is({
4220
4201
  onChartTypeChange: t,
4221
4202
  iconClassName: a
4222
4203
  }) {
@@ -4276,7 +4257,7 @@ function os({
4276
4257
  onClick: () => c("stackedLine"),
4277
4258
  className: "h-10 p-4",
4278
4259
  children: /* @__PURE__ */ e(
4279
- ls,
4260
+ rs,
4280
4261
  {
4281
4262
  className: R("size-5", a),
4282
4263
  strokeWidth: 0
@@ -4301,7 +4282,7 @@ function os({
4301
4282
  tooltip: "Bubble Chart",
4302
4283
  onClick: () => c("bubble"),
4303
4284
  className: "h-10 p-4",
4304
- children: /* @__PURE__ */ e(ss, { className: R("size-5", a) })
4285
+ children: /* @__PURE__ */ e(as, { className: R("size-5", a) })
4305
4286
  }
4306
4287
  ),
4307
4288
  /* @__PURE__ */ e(
@@ -4331,7 +4312,7 @@ function os({
4331
4312
  tooltip: "Funnel Chart",
4332
4313
  onClick: () => c("funnel"),
4333
4314
  className: "h-10 p-4",
4334
- children: /* @__PURE__ */ e(rs, { className: R("size-5", a) })
4315
+ children: /* @__PURE__ */ e(ss, { className: R("size-5", a) })
4335
4316
  }
4336
4317
  ),
4337
4318
  /* @__PURE__ */ e(
@@ -4351,7 +4332,7 @@ function os({
4351
4332
  tooltip: "Polar Area Chart",
4352
4333
  onClick: () => c("polarArea"),
4353
4334
  className: "h-10 p-4",
4354
- children: /* @__PURE__ */ e(as, { className: R("size-5", a) })
4335
+ children: /* @__PURE__ */ e(ns, { className: R("size-5", a) })
4355
4336
  }
4356
4337
  ),
4357
4338
  /* @__PURE__ */ e(
@@ -4380,7 +4361,7 @@ function os({
4380
4361
  tooltip: "KPI",
4381
4362
  onClick: () => c("kpi"),
4382
4363
  className: "h-10 p-4",
4383
- children: /* @__PURE__ */ e(is, { className: R("size-5", a) })
4364
+ children: /* @__PURE__ */ e(ls, { className: R("size-5", a) })
4384
4365
  }
4385
4366
  ),
4386
4367
  /* @__PURE__ */ e(
@@ -4390,7 +4371,7 @@ function os({
4390
4371
  tooltip: "Text",
4391
4372
  onClick: () => c("text"),
4392
4373
  className: "h-10 p-4",
4393
- children: /* @__PURE__ */ e(al, { className: R("size-5", a) })
4374
+ children: /* @__PURE__ */ e(sl, { className: R("size-5", a) })
4394
4375
  }
4395
4376
  ),
4396
4377
  /* @__PURE__ */ e(
@@ -4414,13 +4395,13 @@ function os({
4414
4395
  )
4415
4396
  ] });
4416
4397
  }
4417
- function Mi({
4398
+ function Di({
4418
4399
  chartType: t,
4419
4400
  className: a,
4420
4401
  customIcon: n,
4421
4402
  componentName: s
4422
4403
  }) {
4423
- const l = ts();
4404
+ const l = es();
4424
4405
  switch (t) {
4425
4406
  case "bar":
4426
4407
  return /* @__PURE__ */ e(cn, { className: a });
@@ -4433,25 +4414,25 @@ function Mi({
4433
4414
  case "scatter":
4434
4415
  return /* @__PURE__ */ e(Ia, { className: a });
4435
4416
  case "bubble":
4436
- return /* @__PURE__ */ e(ss, { className: a });
4417
+ return /* @__PURE__ */ e(as, { className: a });
4437
4418
  case "doughnut":
4438
4419
  return /* @__PURE__ */ e(Ta, { className: a });
4439
4420
  case "stackedBar":
4440
4421
  return /* @__PURE__ */ e(ka, { className: a });
4441
4422
  case "stackedLine":
4442
- return /* @__PURE__ */ e(ls, { className: a });
4423
+ return /* @__PURE__ */ e(rs, { className: a });
4443
4424
  case "polarArea":
4444
- return /* @__PURE__ */ e(as, { className: a });
4425
+ return /* @__PURE__ */ e(ns, { className: a });
4445
4426
  case "funnel":
4446
- return /* @__PURE__ */ e(rs, { className: a });
4427
+ return /* @__PURE__ */ e(ss, { className: a });
4447
4428
  case "pyramid":
4448
4429
  return /* @__PURE__ */ e(ja, { className: a });
4449
4430
  case "range":
4450
4431
  return /* @__PURE__ */ e(Ma, { className: a });
4451
4432
  case "kpi":
4452
- return /* @__PURE__ */ e(is, { className: a });
4433
+ return /* @__PURE__ */ e(ls, { className: a });
4453
4434
  case "text":
4454
- return /* @__PURE__ */ e(Ba, { className: a });
4435
+ return /* @__PURE__ */ e(jl, { className: a });
4455
4436
  case "map":
4456
4437
  return /* @__PURE__ */ e(Ea, { className: a });
4457
4438
  case "custom":
@@ -4460,12 +4441,12 @@ function Mi({
4460
4441
  return /* @__PURE__ */ e(un, { className: a });
4461
4442
  }
4462
4443
  }
4463
- function Di() {
4444
+ function Ii() {
4464
4445
  var o, i;
4465
4446
  const [t, a] = J(!1), n = f((u) => u.card), s = n.type, l = L((u) => u.isVisualEditing);
4466
- return /* @__PURE__ */ r(Ue, { open: t, onOpenChange: a, children: [
4467
- /* @__PURE__ */ e($e, { asChild: !0, children: /* @__PURE__ */ e(X, { size: "sm", variant: l ? "ghost" : "outline", children: /* @__PURE__ */ e(
4468
- Mi,
4447
+ return /* @__PURE__ */ r(Ge, { open: t, onOpenChange: a, children: [
4448
+ /* @__PURE__ */ e(Ue, { asChild: !0, children: /* @__PURE__ */ e(X, { size: "sm", variant: l ? "ghost" : "outline", children: /* @__PURE__ */ e(
4449
+ Di,
4469
4450
  {
4470
4451
  className: "size-4",
4471
4452
  chartType: s,
@@ -4480,12 +4461,12 @@ function Di() {
4480
4461
  className: "w-50",
4481
4462
  children: [
4482
4463
  /* @__PURE__ */ e(
4483
- os,
4464
+ is,
4484
4465
  {
4485
4466
  onChartTypeChange: () => a(!1)
4486
4467
  }
4487
4468
  ),
4488
- /* @__PURE__ */ e(wi, { onChartTypeChange: () => a(!1) })
4469
+ /* @__PURE__ */ e(Si, { onChartTypeChange: () => a(!1) })
4489
4470
  ]
4490
4471
  }
4491
4472
  )
@@ -4497,7 +4478,7 @@ function On(t, a) {
4497
4478
  const n = ha(t, {});
4498
4479
  return ["pie", "doughnut", "polarArea", "funnel"].includes(a) ? "category" : ((o = (l = (s = t == null ? void 0 : t.chartOptions) == null ? void 0 : s.scales) == null ? void 0 : l[n]) == null ? void 0 : o.type) || "linear";
4499
4480
  }
4500
- function Ii() {
4481
+ function Oi() {
4501
4482
  var O, B, U, j, v, P;
4502
4483
  const [t, a] = J(!1), n = f((F) => {
4503
4484
  var A;
@@ -4517,12 +4498,12 @@ function Ii() {
4517
4498
  s
4518
4499
  );
4519
4500
  me(() => {
4520
- var F, A, $, ne, V, se, W, ce, _, ae, ge, We, ct, dt;
4501
+ var F, A, $, ne, V, se, W, ce, _, ae, ge, Je, ct, dt;
4521
4502
  i(On(n, s)), c(
4522
4503
  (($ = (A = (F = n == null ? void 0 : n.chartOptions) == null ? void 0 : F.scales) == null ? void 0 : A[l]) == null ? void 0 : $.min) === 0 ? 0 : ""
4523
4504
  ), d(((se = (V = (ne = n == null ? void 0 : n.chartOptions) == null ? void 0 : ne.scales) == null ? void 0 : V[l]) == null ? void 0 : se.max) || ""), N(
4524
4505
  ((ae = (_ = (ce = (W = n == null ? void 0 : n.chartOptions) == null ? void 0 : W.scales) == null ? void 0 : ce[l]) == null ? void 0 : _.ticks) == null ? void 0 : ae.stepSize) || ""
4525
- ), x(((ge = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : ge.decimalPlaces) || 0), w(((We = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : We.suffix) || ""), T(((ct = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : ct.currency) || ""), M(((dt = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : dt.locale) || "");
4506
+ ), x(((ge = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : ge.decimalPlaces) || 0), w(((Je = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : Je.suffix) || ""), T(((ct = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : ct.currency) || ""), M(((dt = n == null ? void 0 : n.numberAxisFormat) == null ? void 0 : dt.locale) || "");
4526
4507
  }, [t, n, l, s]);
4527
4508
  function q(F, A) {
4528
4509
  return A === "" || /^[0-9\b]+$/.test(A) ? Number(A) : Number(F);
@@ -4715,8 +4696,8 @@ function Ii() {
4715
4696
  };
4716
4697
  H($);
4717
4698
  }
4718
- return /* @__PURE__ */ r(Ue, { onOpenChange: (F) => a(F), children: [
4719
- /* @__PURE__ */ e($e, { asChild: !0, children: /* @__PURE__ */ e(K, { tooltip: "Format Number", children: /* @__PURE__ */ e(hl, { className: "size-4" }) }) }),
4699
+ return /* @__PURE__ */ r(Ge, { onOpenChange: (F) => a(F), children: [
4700
+ /* @__PURE__ */ e(Ue, { asChild: !0, children: /* @__PURE__ */ e(K, { tooltip: "Format Number", children: /* @__PURE__ */ e(pl, { className: "size-4" }) }) }),
4720
4701
  /* @__PURE__ */ e(sn, { align: "end", className: "max-w-65", children: /* @__PURE__ */ r("div", { className: "grid gap-4", children: [
4721
4702
  /* @__PURE__ */ r("div", { className: "space-y-2", children: [
4722
4703
  /* @__PURE__ */ e("h4", { className: "font-medium leading-none", children: "Format Options" }),
@@ -4726,7 +4707,7 @@ function Ii() {
4726
4707
  Z(),
4727
4708
  // ['bar', 'line', 'area', 'horizontalBar'].includes(cardType) &&
4728
4709
  Q(),
4729
- /* @__PURE__ */ e(fr, {}),
4710
+ /* @__PURE__ */ e(gr, {}),
4730
4711
  /* @__PURE__ */ e("div", { className: "grid grid-cols-3", children: /* @__PURE__ */ e(
4731
4712
  X,
4732
4713
  {
@@ -4740,7 +4721,7 @@ function Ii() {
4740
4721
  ] }) })
4741
4722
  ] });
4742
4723
  }
4743
- function Oi() {
4724
+ function Ti() {
4744
4725
  const t = f(
4745
4726
  (u) => {
4746
4727
  var c, h, d, g;
@@ -4775,8 +4756,8 @@ function Oi() {
4775
4756
  align: u
4776
4757
  });
4777
4758
  };
4778
- return /* @__PURE__ */ r(Ue, { children: [
4779
- /* @__PURE__ */ e($e, { asChild: !0, children: /* @__PURE__ */ e(K, { tooltip: "Legend Settings", children: /* @__PURE__ */ e(wl, { className: "size-4" }) }) }),
4759
+ return /* @__PURE__ */ r(Ge, { children: [
4760
+ /* @__PURE__ */ e(Ue, { asChild: !0, children: /* @__PURE__ */ e(K, { tooltip: "Legend Settings", children: /* @__PURE__ */ e(Sl, { className: "size-4" }) }) }),
4780
4761
  /* @__PURE__ */ e(sn, { align: "end", className: "w-72", children: /* @__PURE__ */ r("div", { className: "grid gap-4", children: [
4781
4762
  /* @__PURE__ */ r("div", { className: "space-y-2", children: [
4782
4763
  /* @__PURE__ */ e("h4", { className: "font-medium leading-none", children: "Legend Options" }),
@@ -4811,7 +4792,7 @@ function Oi() {
4811
4792
  {
4812
4793
  tooltip: "Left",
4813
4794
  onClick: () => o("left"),
4814
- children: /* @__PURE__ */ e(Yr, { className: "size-4" })
4795
+ children: /* @__PURE__ */ e(Zr, { className: "size-4" })
4815
4796
  }
4816
4797
  ),
4817
4798
  /* @__PURE__ */ e(
@@ -4827,7 +4808,7 @@ function Oi() {
4827
4808
  {
4828
4809
  tooltip: "Right",
4829
4810
  onClick: () => o("right"),
4830
- children: /* @__PURE__ */ e(Zr, { className: "size-4" })
4811
+ children: /* @__PURE__ */ e(Xr, { className: "size-4" })
4831
4812
  }
4832
4813
  )
4833
4814
  ] })
@@ -4840,7 +4821,7 @@ function Oi() {
4840
4821
  {
4841
4822
  tooltip: "Start",
4842
4823
  onClick: () => i("start"),
4843
- children: /* @__PURE__ */ e($r, { className: "size-4" })
4824
+ children: /* @__PURE__ */ e(Qr, { className: "size-4" })
4844
4825
  }
4845
4826
  ),
4846
4827
  /* @__PURE__ */ e(
@@ -4848,7 +4829,7 @@ function Oi() {
4848
4829
  {
4849
4830
  tooltip: "Center",
4850
4831
  onClick: () => i("center"),
4851
- children: /* @__PURE__ */ e(Ur, { className: "size-4" })
4832
+ children: /* @__PURE__ */ e($r, { className: "size-4" })
4852
4833
  }
4853
4834
  ),
4854
4835
  /* @__PURE__ */ e(
@@ -4856,7 +4837,7 @@ function Oi() {
4856
4837
  {
4857
4838
  tooltip: "End",
4858
4839
  onClick: () => i("end"),
4859
- children: /* @__PURE__ */ e(Qr, { className: "size-4" })
4840
+ children: /* @__PURE__ */ e(Jr, { className: "size-4" })
4860
4841
  }
4861
4842
  )
4862
4843
  ] })
@@ -4866,7 +4847,7 @@ function Oi() {
4866
4847
  ] }) })
4867
4848
  ] });
4868
4849
  }
4869
- function Ti() {
4850
+ function zi() {
4870
4851
  const t = f(
4871
4852
  (o) => {
4872
4853
  var i, u;
@@ -4899,7 +4880,7 @@ function Ti() {
4899
4880
  }
4900
4881
  return /* @__PURE__ */ e(te, { children: a === "funnel" ? l() : s() });
4901
4882
  }
4902
- function zi() {
4883
+ function Ai() {
4903
4884
  const t = f((i) => i.card), a = f((i) => i.isShowingVisual), n = f(
4904
4885
  (i) => {
4905
4886
  var u, c;
@@ -4919,10 +4900,10 @@ function zi() {
4919
4900
  "stackedLine",
4920
4901
  "horizontalBar",
4921
4902
  "funnel"
4922
- ].includes(t.type) && /* @__PURE__ */ e(Ti, {}),
4903
+ ].includes(t.type) && /* @__PURE__ */ e(zi, {}),
4923
4904
  !["kpi", "text", "custom", "table"].includes(t.type) && /* @__PURE__ */ r(te, { children: [
4924
- /* @__PURE__ */ e(Ii, {}),
4925
- /* @__PURE__ */ e(Oi, {})
4905
+ /* @__PURE__ */ e(Oi, {}),
4906
+ /* @__PURE__ */ e(Ti, {})
4926
4907
  ] }),
4927
4908
  ![
4928
4909
  "pie",
@@ -4936,9 +4917,9 @@ function zi() {
4936
4917
  "text",
4937
4918
  "map"
4938
4919
  ].includes(t.type) && /* @__PURE__ */ r(K, { tooltip: "Grid Style", onClick: o, children: [
4939
- (s === "xy" || !s) && /* @__PURE__ */ e(xl, { className: "size-4" }),
4940
- s === "x" && /* @__PURE__ */ e(cl, { className: "size-4" }),
4941
- s === "y" && /* @__PURE__ */ e(Al, { className: "size-4" }),
4920
+ (s === "xy" || !s) && /* @__PURE__ */ e(Cl, { className: "size-4" }),
4921
+ s === "x" && /* @__PURE__ */ e(dl, { className: "size-4" }),
4922
+ s === "y" && /* @__PURE__ */ e(Fl, { className: "size-4" }),
4942
4923
  s === "none" && /* @__PURE__ */ e(Vl, { className: "size-4" })
4943
4924
  ] })
4944
4925
  ] }) : null;
@@ -4968,7 +4949,7 @@ function mt() {
4968
4949
  lastSelectedSchema: a.lastSelectedSchema,
4969
4950
  lastSelectedTable: a.lastSelectedTable,
4970
4951
  lastSelectedDatamodelId: a.lastSelectedDatamodelId,
4971
- id: et(),
4952
+ id: Xe(),
4972
4953
  title: "Title",
4973
4954
  description: "",
4974
4955
  preferences: {
@@ -4996,7 +4977,7 @@ function mt() {
4996
4977
  function M() {
4997
4978
  const v = {
4998
4979
  ...a,
4999
- id: et(),
4980
+ id: Xe(),
5000
4981
  title: `${a.title} Copy`,
5001
4982
  tabTitle: `${a.tabTitle || a.title} Copy`
5002
4983
  };
@@ -5045,7 +5026,7 @@ function mt() {
5045
5026
  displayTab: F
5046
5027
  });
5047
5028
  },
5048
- children: P.displayTab === !0 || P.displayTab === void 0 ? /* @__PURE__ */ e(vr, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" }) : /* @__PURE__ */ e(fl, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" })
5029
+ children: P.displayTab === !0 || P.displayTab === void 0 ? /* @__PURE__ */ e(xr, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" }) : /* @__PURE__ */ e(gl, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" })
5049
5030
  }
5050
5031
  );
5051
5032
  }
@@ -5060,7 +5041,7 @@ function mt() {
5060
5041
  t.cards.map((v) => /* @__PURE__ */ e(pt, { className: "mt-0 grow", value: v.id, children: b() }, v.id)),
5061
5042
  /* @__PURE__ */ e(an, { className: "group mx-4 justify-between overflow-x-auto", children: /* @__PURE__ */ r("div", { className: "flex items-center", children: [
5062
5043
  t.cards.map((v, P) => /* @__PURE__ */ r(
5063
- Ze,
5044
+ Ye,
5064
5045
  {
5065
5046
  draggable: !0,
5066
5047
  onDragStart: (F) => S(F, P),
@@ -5071,7 +5052,7 @@ function mt() {
5071
5052
  children: [
5072
5053
  Q(t, v),
5073
5054
  /* @__PURE__ */ e(
5074
- Ye,
5055
+ Ke,
5075
5056
  {
5076
5057
  enabled: t.activeCardId === v.id,
5077
5058
  text: v.tabTitle || v.title,
@@ -5099,7 +5080,7 @@ function mt() {
5099
5080
  className: "ml-1 h-8 px-2 hover:bg-muted-foreground/50",
5100
5081
  variant: "outline",
5101
5082
  onClick: T,
5102
- children: /* @__PURE__ */ e(Xe, { className: "h-4 w-4" })
5083
+ children: /* @__PURE__ */ e(Ze, { className: "h-4 w-4" })
5103
5084
  }
5104
5085
  ),
5105
5086
  /* @__PURE__ */ e(
@@ -5108,7 +5089,7 @@ function mt() {
5108
5089
  className: "invisible ml-1 h-8 px-2 hover:bg-muted-foreground/50 group-hover:visible",
5109
5090
  variant: "outline",
5110
5091
  onClick: M,
5111
- children: /* @__PURE__ */ e(ul, { className: "h-4 w-4" })
5092
+ children: /* @__PURE__ */ e(ml, { className: "h-4 w-4" })
5112
5093
  }
5113
5094
  )
5114
5095
  ] }) })
@@ -5117,14 +5098,14 @@ function mt() {
5117
5098
  );
5118
5099
  }
5119
5100
  function b() {
5120
- return a.type === "kpi" ? /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e(yr, { card: a, data: p == null ? void 0 : p.records, isPending: k }) }) }) : a.type === "text" ? /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e(st, { className: "mx-3 my-6 h-[300px] overflow-y-auto break-words px-3", children: /* @__PURE__ */ e(
5121
- br,
5101
+ return a.type === "kpi" ? /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e(br, { card: a, data: p == null ? void 0 : p.records, isPending: k }) }) }) : a.type === "text" ? /* @__PURE__ */ e("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e(ot, { className: "mx-3 my-6 h-[300px] overflow-y-auto break-words px-3", children: /* @__PURE__ */ e(
5102
+ vr,
5122
5103
  {
5123
5104
  isLoading: o,
5124
5105
  card: a,
5125
5106
  data: p == null ? void 0 : p.records
5126
5107
  }
5127
- ) }) }) }) : /* @__PURE__ */ e(Tt, { FallbackComponent: ma, children: /* @__PURE__ */ e(es, { className: "grow border-none shadow-none" }) });
5108
+ ) }) }) }) : /* @__PURE__ */ e(zt, { FallbackComponent: ma, children: /* @__PURE__ */ e(Xa, { className: "grow border-none shadow-none" }) });
5128
5109
  }
5129
5110
  function O() {
5130
5111
  const v = JSON.stringify(p == null ? void 0 : p.records, null, 2), P = new Blob([v], { type: "application/json" }), F = URL.createObjectURL(P), A = document.createElement("a");
@@ -5149,16 +5130,16 @@ function mt() {
5149
5130
  {
5150
5131
  className: "relative isolate flex h-full flex-col py-2 pb-3",
5151
5132
  children: [
5152
- (x || y) && /* @__PURE__ */ e("div", { className: "absolute bottom-0 left-0 right-0 top-0 z-50 m-auto flex h-10 w-10 items-center justify-center rounded-md bg-muted", children: /* @__PURE__ */ e(He, { className: "h-8 w-8 animate-spin text-muted-foreground" }) }),
5133
+ (x || y) && /* @__PURE__ */ e("div", { className: "absolute bottom-0 left-0 right-0 top-0 z-50 m-auto flex h-10 w-10 items-center justify-center rounded-md bg-muted", children: /* @__PURE__ */ e(Pe, { className: "h-8 w-8 animate-spin text-muted-foreground" }) }),
5153
5134
  /* @__PURE__ */ r(
5154
5135
  "div",
5155
5136
  {
5156
5137
  className: "z-10 mb-0 flex min-h-10 items-center justify-end gap-2 px-6",
5157
5138
  children: [
5158
5139
  s && /* @__PURE__ */ r("div", { className: "flex grow items-center", children: [
5159
- /* @__PURE__ */ e(Di, {}),
5160
- l && /* @__PURE__ */ e(K, { tooltip: "Visual Docs", onClick: U, children: /* @__PURE__ */ e(nl, { className: "size-4" }) }),
5161
- !["table", "custom"].includes(a.type) && l && /* @__PURE__ */ e(Ni, {})
5140
+ /* @__PURE__ */ e(Ii, {}),
5141
+ l && /* @__PURE__ */ e(K, { tooltip: "Visual Docs", onClick: U, children: /* @__PURE__ */ e(al, { className: "size-4" }) }),
5142
+ !["table", "custom"].includes(a.type) && l && /* @__PURE__ */ e(wi, {})
5162
5143
  ] }),
5163
5144
  !s && /* @__PURE__ */ r("div", { className: "flex grow items-center gap-1", children: [
5164
5145
  /* @__PURE__ */ e(
@@ -5168,7 +5149,7 @@ function mt() {
5168
5149
  variant: "ghost",
5169
5150
  size: "icon",
5170
5151
  onClick: B,
5171
- children: /* @__PURE__ */ e(ki, { className: "size-4" })
5152
+ children: /* @__PURE__ */ e(Mi, { className: "size-4" })
5172
5153
  }
5173
5154
  ),
5174
5155
  /* @__PURE__ */ e(
@@ -5178,19 +5159,19 @@ function mt() {
5178
5159
  variant: "ghost",
5179
5160
  size: "icon",
5180
5161
  onClick: O,
5181
- children: /* @__PURE__ */ e(yl, { strokeWidth: 1.5, className: "size-4" })
5162
+ children: /* @__PURE__ */ e(bl, { strokeWidth: 1.5, className: "size-4" })
5182
5163
  }
5183
5164
  ),
5184
5165
  /* @__PURE__ */ e(
5185
- gr,
5166
+ yr,
5186
5167
  {
5187
5168
  text: JSON.stringify(p == null ? void 0 : p.records, null, 2),
5188
5169
  className: "h-7 w-fit px-1 font-mono text-xs text-muted-foreground/70"
5189
5170
  }
5190
5171
  )
5191
5172
  ] }),
5192
- /* @__PURE__ */ e(zi, {}),
5193
- n && /* @__PURE__ */ e(Fi, {})
5173
+ /* @__PURE__ */ e(Ai, {}),
5174
+ n && /* @__PURE__ */ e(Li, {})
5194
5175
  ]
5195
5176
  }
5196
5177
  ),
@@ -5209,7 +5190,7 @@ function mt() {
5209
5190
  defaultSize: 30,
5210
5191
  minSize: 10,
5211
5192
  className: "relative flex h-full min-h-0 w-full flex-1 basis-0",
5212
- children: i && /* @__PURE__ */ e(Ai, {})
5193
+ children: i && /* @__PURE__ */ e(Fi, {})
5213
5194
  }
5214
5195
  ),
5215
5196
  /* @__PURE__ */ e(Ve, {})
@@ -5222,7 +5203,7 @@ function mt() {
5222
5203
  minSize: 10,
5223
5204
  className: "relative flex h-full min-h-0 w-full flex-1 basis-0",
5224
5205
  children: [
5225
- (p == null ? void 0 : p.records) && (p == null ? void 0 : p.records.length) > 0 && /* @__PURE__ */ e(yi, { data: (p == null ? void 0 : p.records) || [] }),
5206
+ (p == null ? void 0 : p.records) && (p == null ? void 0 : p.records.length) > 0 && /* @__PURE__ */ e(bi, { data: (p == null ? void 0 : p.records) || [] }),
5226
5207
  (w || (p == null ? void 0 : p.error)) && /* @__PURE__ */ e("span", { className: "font-mono text-xs", children: (w == null ? void 0 : w.message) || ((j = p == null ? void 0 : p.error) == null ? void 0 : j.message) })
5227
5208
  ]
5228
5209
  }
@@ -5234,19 +5215,19 @@ function mt() {
5234
5215
  }
5235
5216
  );
5236
5217
  }
5237
- function Ai() {
5218
+ function Fi() {
5238
5219
  const t = f((n) => n.pythonStdOut);
5239
5220
  if (!t) return null;
5240
5221
  const a = t.replace(/\n/g, "<br>");
5241
5222
  return /* @__PURE__ */ r("div", { className: "relative flex w-full flex-col border-r", children: [
5242
5223
  /* @__PURE__ */ e("div", { className: "sticky top-0 flex max-h-11 min-h-11 grow items-center border-b bg-muted px-3 font-mono text-xs font-semibold text-foreground/70", children: "Python Output" }),
5243
- /* @__PURE__ */ r(st, { className: "overflow-y-auto px-2 pt-1 font-mono text-xs text-foreground/90", children: [
5224
+ /* @__PURE__ */ r(ot, { className: "overflow-y-auto px-2 pt-1 font-mono text-xs text-foreground/90", children: [
5244
5225
  /* @__PURE__ */ e("div", { dangerouslySetInnerHTML: { __html: a } }),
5245
- /* @__PURE__ */ e(Pe, { orientation: "horizontal" })
5226
+ /* @__PURE__ */ e(et, { orientation: "horizontal" })
5246
5227
  ] })
5247
5228
  ] });
5248
5229
  }
5249
- function Fi() {
5230
+ function Li() {
5250
5231
  const t = f((n) => n.isShowingVisual), a = f(
5251
5232
  (n) => n.actions.setIsShowingVisual
5252
5233
  );
@@ -5263,11 +5244,11 @@ function Fi() {
5263
5244
  )
5264
5245
  ] });
5265
5246
  }
5266
- function Li() {
5247
+ function Ei() {
5267
5248
  var p, x;
5268
5249
  const t = f(
5269
5250
  (y) => y.card.customCardPreferences
5270
- ), { data: a } = ns(), n = (a == null ? void 0 : a.plugins) || [], s = f((y) => y.card), l = f((y) => y.frame), o = (t == null ? void 0 : t.visualType) || "single", { setCustomCardPreferences: i } = Y(), { components: u, manifest: c } = ca(
5251
+ ), { data: a } = ts(), n = (a == null ? void 0 : a.plugins) || [], s = f((y) => y.card), l = f((y) => y.frame), o = (t == null ? void 0 : t.visualType) || "single", { setCustomCardPreferences: i } = Y(), { components: u, manifest: c } = ca(
5271
5252
  (t == null ? void 0 : t.url) || ""
5272
5253
  ), h = (p = c == null ? void 0 : c.visuals) == null ? void 0 : p.find(
5273
5254
  (y) => y.name === (t == null ? void 0 : t.componentName)
@@ -5386,7 +5367,7 @@ function Li() {
5386
5367
  /* @__PURE__ */ e(
5387
5368
  fe,
5388
5369
  {
5389
- icon: /* @__PURE__ */ e(tl, { className: "h-3.5 w-3.5" }),
5370
+ icon: /* @__PURE__ */ e(nl, { className: "h-3.5 w-3.5" }),
5390
5371
  className: "h-9 w-full",
5391
5372
  label: "Select Plugin",
5392
5373
  options: n,
@@ -5406,8 +5387,8 @@ function Li() {
5406
5387
  value: o,
5407
5388
  onValueChange: N,
5408
5389
  children: /* @__PURE__ */ r(an, { className: "h-9 w-full", children: [
5409
- /* @__PURE__ */ e(Ze, { className: "h-7 w-full", value: "single", children: "Single Visual" }),
5410
- /* @__PURE__ */ e(Ze, { className: "h-7 w-full", value: "multiple", children: "Multi-Visual" })
5390
+ /* @__PURE__ */ e(Ye, { className: "h-7 w-full", value: "single", children: "Single Visual" }),
5391
+ /* @__PURE__ */ e(Ye, { className: "h-7 w-full", value: "multiple", children: "Multi-Visual" })
5411
5392
  ] })
5412
5393
  }
5413
5394
  )
@@ -5415,7 +5396,7 @@ function Li() {
5415
5396
  ((t == null ? void 0 : t.type) === "component" || (t == null ? void 0 : t.type) === void 0) && t && /* @__PURE__ */ e(te, { children: u && /* @__PURE__ */ e(
5416
5397
  fe,
5417
5398
  {
5418
- icon: /* @__PURE__ */ e(dl, { className: "h-3.5 w-3.5" }),
5399
+ icon: /* @__PURE__ */ e(ul, { className: "h-3.5 w-3.5" }),
5419
5400
  className: "h-9 w-full",
5420
5401
  label: "Select Component",
5421
5402
  options: (u == null ? void 0 : u.filter((y) => y.type === o).map((y) => ({
@@ -5447,7 +5428,7 @@ function Li() {
5447
5428
  }
5448
5429
  );
5449
5430
  }
5450
- function Je() {
5431
+ function Qe() {
5451
5432
  const [t, a] = J([]), n = f((h) => h.card.preferences), { setFilterOnClickColumnIndex: s, setCardPreferences: l } = f(
5452
5433
  (h) => h.actions
5453
5434
  ), o = f(
@@ -5515,14 +5496,14 @@ function Je() {
5515
5496
  }
5516
5497
  );
5517
5498
  }
5518
- return /* @__PURE__ */ r("div", { className: "space-y-2", children: [
5499
+ return /* @__PURE__ */ r("div", { className: "max-h-[150px] space-y-2 overflow-y-auto", children: [
5519
5500
  /* @__PURE__ */ e(G, { children: "On Click" }),
5520
5501
  o == null ? void 0 : o.map((h, d) => {
5521
5502
  var g, C;
5522
5503
  return /* @__PURE__ */ e(
5523
5504
  "div",
5524
5505
  {
5525
- className: "xbg-red-100 group flex items-center justify-between space-y-2",
5506
+ className: "group flex items-center justify-between space-y-2",
5526
5507
  children: /* @__PURE__ */ r("div", { className: "grow", children: [
5527
5508
  /* @__PURE__ */ r("div", { className: "flex items-center space-x-2 py-2", children: [
5528
5509
  /* @__PURE__ */ e(
@@ -5564,7 +5545,7 @@ function Je() {
5564
5545
  })
5565
5546
  ] });
5566
5547
  }
5567
- function Ei({ idx: t }) {
5548
+ function Vi({ idx: t }) {
5568
5549
  var u;
5569
5550
  const a = f((c) => {
5570
5551
  var h;
@@ -5578,7 +5559,7 @@ function Ei({ idx: t }) {
5578
5559
  (c) => c.actions.setCardPreferences
5579
5560
  ), l = (u = a == null ? void 0 : a.chartOptions) == null ? void 0 : u.indexAxis, o = n == null ? void 0 : n.find((c) => c.idx === t);
5580
5561
  function i(c, h) {
5581
- (c === "end" || c === "start") && xr(Cr());
5562
+ (c === "end" || c === "start") && Cr(Nr());
5582
5563
  const d = {
5583
5564
  display: c !== "none",
5584
5565
  align: c,
@@ -5608,9 +5589,9 @@ function Ei({ idx: t }) {
5608
5589
  });
5609
5590
  }
5610
5591
  }
5611
- return /* @__PURE__ */ r(Ue, { children: [
5612
- /* @__PURE__ */ e($e, { children: /* @__PURE__ */ e(_l, { className: "size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground" }) }),
5613
- /* @__PURE__ */ e(St, { className: "w-fit px-2 py-1", children: /* @__PURE__ */ r("div", { className: "flex gap-1", children: [
5592
+ return /* @__PURE__ */ r(Ge, { children: [
5593
+ /* @__PURE__ */ e(Ue, { children: /* @__PURE__ */ e(_l, { className: "size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground" }) }),
5594
+ /* @__PURE__ */ e(kt, { className: "w-fit px-2 py-1", children: /* @__PURE__ */ r("div", { className: "flex gap-1", children: [
5614
5595
  /* @__PURE__ */ e(
5615
5596
  "button",
5616
5597
  {
@@ -5625,7 +5606,7 @@ function Ei({ idx: t }) {
5625
5606
  onClick: () => i("start", t),
5626
5607
  className: "h-7 p-1 text-xs font-normal",
5627
5608
  children: /* @__PURE__ */ e(
5628
- Sl,
5609
+ kl,
5629
5610
  {
5630
5611
  className: R("h-4 w-4", {
5631
5612
  "rotate-90": l === "y"
@@ -5640,7 +5621,7 @@ function Ei({ idx: t }) {
5640
5621
  onClick: () => i("center", t),
5641
5622
  className: "h-7 p-1 text-xs font-normal",
5642
5623
  children: /* @__PURE__ */ e(
5643
- Ml,
5624
+ Dl,
5644
5625
  {
5645
5626
  className: R("h-4 w-4", {
5646
5627
  "rotate-90": l === "y"
@@ -5655,7 +5636,7 @@ function Ei({ idx: t }) {
5655
5636
  onClick: () => i("end", t),
5656
5637
  className: "h-7 p-1 text-xs font-normal",
5657
5638
  children: /* @__PURE__ */ e(
5658
- kl,
5639
+ Ml,
5659
5640
  {
5660
5641
  className: R("h-4 w-4", {
5661
5642
  "rotate-90": l === "y"
@@ -5667,20 +5648,20 @@ function Ei({ idx: t }) {
5667
5648
  ] }) })
5668
5649
  ] });
5669
5650
  }
5670
- function cs() {
5651
+ function os() {
5671
5652
  const t = f((i) => i.card), { data: a } = pe(t), {
5672
5653
  metricKeys: n,
5673
5654
  dimensionKeys: s,
5674
5655
  keys: l
5675
- } = Ht((a == null ? void 0 : a.records) || []);
5656
+ } = Gt((a == null ? void 0 : a.records) || []);
5676
5657
  let o = n;
5677
5658
  if (["stackedBar", "stackedLine"].includes(t.type)) {
5678
- const i = Nr({
5659
+ const i = wr({
5679
5660
  dataArray: (a == null ? void 0 : a.records) || [],
5680
5661
  groupKey: s[0],
5681
5662
  pivotKey: s[1],
5682
5663
  valueKey: o[0]
5683
- }), { metricKeys: u } = Ht(i);
5664
+ }), { metricKeys: u } = Gt(i);
5684
5665
  o = u;
5685
5666
  }
5686
5667
  return {
@@ -5690,13 +5671,32 @@ function cs() {
5690
5671
  defaultMetricKeys: n
5691
5672
  };
5692
5673
  }
5693
- function ds() {
5674
+ function St({
5675
+ children: t,
5676
+ className: a,
5677
+ delayDuration: n
5678
+ }) {
5679
+ return /* @__PURE__ */ e(Xn, { children: /* @__PURE__ */ r(Mt, { delayDuration: n, children: [
5680
+ /* @__PURE__ */ e(Zt, { asChild: !0, children: /* @__PURE__ */ e(
5681
+ "span",
5682
+ {
5683
+ className: R(
5684
+ "overflow-hidden text-ellipsis whitespace-nowrap",
5685
+ a
5686
+ ),
5687
+ children: t
5688
+ }
5689
+ ) }),
5690
+ /* @__PURE__ */ e(Dt, { children: t })
5691
+ ] }) });
5692
+ }
5693
+ function cs() {
5694
5694
  const t = f((c) => c.card), a = f(
5695
5695
  (c) => {
5696
5696
  var h, d, g;
5697
5697
  return (g = (d = (h = c == null ? void 0 : c.card) == null ? void 0 : h.preferences) == null ? void 0 : d.chartOptions) == null ? void 0 : g.indexAxis;
5698
5698
  }
5699
- ), { data: n } = pe(t), s = a === "y" ? "Metric" : "Dimension", l = a === "y" ? "Dimension" : "Metric", { dimensionKeys: o, transformedMetricKeys: i, keys: u } = cs();
5699
+ ), { data: n } = pe(t), s = a === "y" ? "Metric" : "Dimension", l = a === "y" ? "Dimension" : "Metric", { dimensionKeys: o, transformedMetricKeys: i, keys: u } = os();
5700
5700
  return u.length === 0 ? null : /* @__PURE__ */ r("div", { className: "space-y-4", children: [
5701
5701
  /* @__PURE__ */ r("div", { className: "space-y-2", children: [
5702
5702
  /* @__PURE__ */ e(G, { children: s }),
@@ -5705,7 +5705,7 @@ function ds() {
5705
5705
  {
5706
5706
  className: "flex h-8 items-center rounded-md bg-muted/70 px-3 hover:bg-muted",
5707
5707
  title: c,
5708
- children: us(c)
5708
+ children: ds(c)
5709
5709
  },
5710
5710
  c
5711
5711
  )) })
@@ -5713,7 +5713,7 @@ function ds() {
5713
5713
  /* @__PURE__ */ r("div", { className: "space-y-2", children: [
5714
5714
  /* @__PURE__ */ e(G, { children: l }),
5715
5715
  /* @__PURE__ */ e("div", { className: "my-1 max-h-[125px] space-y-1 overflow-y-auto", children: i.map((c, h) => /* @__PURE__ */ e(
5716
- ms,
5716
+ us,
5717
5717
  {
5718
5718
  className: "flex h-8 items-center bg-muted/70 px-3 hover:bg-muted",
5719
5719
  iconClassName: "invisible group-hover:visible",
@@ -5725,10 +5725,10 @@ function ds() {
5725
5725
  ] })
5726
5726
  ] });
5727
5727
  }
5728
- function us(t, a = 30) {
5728
+ function ds(t, a = 30) {
5729
5729
  return t.length > a ? t.slice(0, a) + "..." : t;
5730
5730
  }
5731
- function ms({
5731
+ function us({
5732
5732
  col: t,
5733
5733
  idx: a,
5734
5734
  className: n,
@@ -5777,7 +5777,7 @@ function ms({
5777
5777
  n
5778
5778
  ),
5779
5779
  children: [
5780
- l || /* @__PURE__ */ e("p", { title: t, children: us(t) }),
5780
+ l || /* @__PURE__ */ e(St, { className: "max-w-[100px]", title: t, children: ds(t) }),
5781
5781
  /* @__PURE__ */ r("div", { className: "flex gap-2", children: [
5782
5782
  /* @__PURE__ */ e(
5783
5783
  cn,
@@ -5800,7 +5800,7 @@ function ms({
5800
5800
  }
5801
5801
  ),
5802
5802
  /* @__PURE__ */ e(
5803
- ll,
5803
+ il,
5804
5804
  {
5805
5805
  onClick: () => h("area"),
5806
5806
  className: R(
@@ -5809,18 +5809,18 @@ function ms({
5809
5809
  )
5810
5810
  }
5811
5811
  ),
5812
- /* @__PURE__ */ e(Ei, { idx: a })
5812
+ /* @__PURE__ */ e(Vi, { idx: a })
5813
5813
  ] })
5814
5814
  ]
5815
5815
  }
5816
5816
  );
5817
5817
  }
5818
- function hs() {
5818
+ function ms() {
5819
5819
  const t = f((m) => m.selectedConnectionId), a = f((m) => m.selectedDatamodelId), n = f((m) => m.selectedDatabaseName), s = f((m) => m.selectedSchemaName), l = f((m) => m.selectedTableName), o = L((m) => m.dashboard.filters) || [], i = L((m) => m.actions.addFilter), u = L((m) => m.actions.removeFilter), { removeFilterValues: c } = at(), { modelItems: h, tableName: d, connectionType: g } = xe();
5820
5820
  function C(m, N = "dashboard") {
5821
5821
  var E;
5822
5822
  const p = be(m.column_name), x = be(n || ""), y = be(s || ""), w = be(d);
5823
- let k = wr({
5823
+ let k = Sr({
5824
5824
  schemaName: y,
5825
5825
  tableName: w,
5826
5826
  connectionType: g,
@@ -5836,7 +5836,7 @@ function hs() {
5836
5836
  if (M)
5837
5837
  c(M.id), u(M.id);
5838
5838
  else {
5839
- const H = et();
5839
+ const H = Xe();
5840
5840
  return d === "api" && t ? (i({
5841
5841
  location: N,
5842
5842
  id: H,
@@ -5849,7 +5849,7 @@ function hs() {
5849
5849
  // database: 'NA',
5850
5850
  connectionId: t,
5851
5851
  operation: "in",
5852
- sql: Bt(
5852
+ sql: Pt(
5853
5853
  m.data_type,
5854
5854
  k,
5855
5855
  p
@@ -5867,7 +5867,7 @@ function hs() {
5867
5867
  database: n || "",
5868
5868
  connectionId: t || "",
5869
5869
  operation: "in",
5870
- sql: Bt(
5870
+ sql: Pt(
5871
5871
  m.data_type,
5872
5872
  k,
5873
5873
  p
@@ -5878,10 +5878,10 @@ function hs() {
5878
5878
  }
5879
5879
  return { assignFilter: C };
5880
5880
  }
5881
- function rt() {
5881
+ function st() {
5882
5882
  const t = L(
5883
5883
  (u) => u.dashboard.filters
5884
- ), a = f((u) => u.frame), { setFrame: n } = Y(), { columns: s } = xe(), { assignFilter: l } = hs();
5884
+ ), a = f((u) => u.frame), { setFrame: n } = Y(), { columns: s } = xe(), { assignFilter: l } = ms();
5885
5885
  function o(u) {
5886
5886
  const c = l(u, "frame");
5887
5887
  n({ ...a, filterId: c });
@@ -5889,18 +5889,18 @@ function rt() {
5889
5889
  const i = t == null ? void 0 : t.find((u) => u.id === a.filterId);
5890
5890
  return /* @__PURE__ */ r("div", { className: "space-y-3", children: [
5891
5891
  /* @__PURE__ */ e(G, { children: "Card Filter" }),
5892
- /* @__PURE__ */ e(Vi, { onSelect: o, columns: s }),
5892
+ /* @__PURE__ */ e(_i, { onSelect: o, columns: s }),
5893
5893
  i && /* @__PURE__ */ e(ba, { filter: i })
5894
5894
  ] });
5895
5895
  }
5896
- function Vi({
5896
+ function _i({
5897
5897
  columns: t,
5898
5898
  onSelect: a
5899
5899
  }) {
5900
5900
  var i;
5901
- const [n, s] = Ke.useState(!1), [l, o] = Ke.useState("");
5902
- return /* @__PURE__ */ r(Ue, { open: n, onOpenChange: s, children: [
5903
- /* @__PURE__ */ e($e, { asChild: !0, children: /* @__PURE__ */ r(
5901
+ const [n, s] = We.useState(!1), [l, o] = We.useState("");
5902
+ return /* @__PURE__ */ r(Ge, { open: n, onOpenChange: s, children: [
5903
+ /* @__PURE__ */ e(Ue, { asChild: !0, children: /* @__PURE__ */ r(
5904
5904
  X,
5905
5905
  {
5906
5906
  size: "sm",
@@ -5910,11 +5910,11 @@ function Vi({
5910
5910
  className: "w-full justify-between font-normal",
5911
5911
  children: [
5912
5912
  l ? (i = t.find((u) => u.column_name === l)) == null ? void 0 : i.column_name : "Select Column...",
5913
- /* @__PURE__ */ e(Sr, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
5913
+ /* @__PURE__ */ e(kr, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
5914
5914
  ]
5915
5915
  }
5916
5916
  ) }),
5917
- /* @__PURE__ */ e(St, { className: "w-[200px] p-0", children: /* @__PURE__ */ r(Qn, { children: [
5917
+ /* @__PURE__ */ e(kt, { className: "w-[200px] p-0", children: /* @__PURE__ */ r(Qn, { children: [
5918
5918
  /* @__PURE__ */ e(Jn, { placeholder: "Search column", className: "h-9" }),
5919
5919
  /* @__PURE__ */ r(Wn, { children: [
5920
5920
  /* @__PURE__ */ e(Kn, { children: "No framework found." }),
@@ -5929,7 +5929,7 @@ function Vi({
5929
5929
  children: [
5930
5930
  u.column_name,
5931
5931
  /* @__PURE__ */ e(
5932
- kr,
5932
+ Mr,
5933
5933
  {
5934
5934
  className: R(
5935
5935
  "ml-auto h-4 w-4",
@@ -5945,12 +5945,12 @@ function Vi({
5945
5945
  ] }) })
5946
5946
  ] });
5947
5947
  }
5948
- function _i({
5948
+ function Ri({
5949
5949
  cardType: t
5950
5950
  }) {
5951
5951
  return /* @__PURE__ */ e("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ r(Fe, { defaultValue: ["item-2"], type: "multiple", children: [
5952
5952
  /* @__PURE__ */ r(le, { value: "item-1", children: [
5953
- /* @__PURE__ */ e(ie, { children: `${Dt(t)} Chart` }),
5953
+ /* @__PURE__ */ e(ie, { children: `${It(t)} Chart` }),
5954
5954
  /* @__PURE__ */ r(oe, { className: "space-y-4 font-mono text-xs", children: [
5955
5955
  /* @__PURE__ */ e("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT x-axis, y-axis-1, y-axis-2,... FROM table" }),
5956
5956
  /* @__PURE__ */ r("ul", { className: "ml-6 list-disc text-xs [&>li]:mt-2", children: [
@@ -5976,13 +5976,13 @@ function _i({
5976
5976
  ] }),
5977
5977
  /* @__PURE__ */ r(le, { value: "item-2", children: [
5978
5978
  /* @__PURE__ */ e(ie, { children: "Settings" }),
5979
- /* @__PURE__ */ e(oe, { className: "space-y-4 px-2", children: /* @__PURE__ */ e(ds, {}) })
5979
+ /* @__PURE__ */ e(oe, { className: "space-y-4 px-2", children: /* @__PURE__ */ e(cs, {}) })
5980
5980
  ] }),
5981
5981
  /* @__PURE__ */ r(le, { value: "item-3", children: [
5982
5982
  /* @__PURE__ */ e(ie, { children: "Filters" }),
5983
5983
  /* @__PURE__ */ r(oe, { className: "space-y-4 px-2", children: [
5984
- /* @__PURE__ */ e(Je, {}),
5985
- /* @__PURE__ */ e(rt, {})
5984
+ /* @__PURE__ */ e(Qe, {}),
5985
+ /* @__PURE__ */ e(st, {})
5986
5986
  ] })
5987
5987
  ] })
5988
5988
  ] }) });
@@ -6033,7 +6033,7 @@ function pn() {
6033
6033
  )
6034
6034
  ] });
6035
6035
  }
6036
- function Ri({
6036
+ function qi({
6037
6037
  cardType: t
6038
6038
  }) {
6039
6039
  function a(n) {
@@ -6064,7 +6064,7 @@ function Ri({
6064
6064
  }
6065
6065
  return /* @__PURE__ */ e("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ r(Fe, { defaultValue: ["item-2"], type: "multiple", children: [
6066
6066
  /* @__PURE__ */ r(le, { value: "item-1", children: [
6067
- /* @__PURE__ */ e(ie, { children: `${Dt(t)} Chart` }),
6067
+ /* @__PURE__ */ e(ie, { children: `${It(t)} Chart` }),
6068
6068
  /* @__PURE__ */ e(oe, { className: "space-y-4 font-mono text-xs", children: a(t) })
6069
6069
  ] }),
6070
6070
  /* @__PURE__ */ r(le, { value: "item-2", children: [
@@ -6074,13 +6074,13 @@ function Ri({
6074
6074
  /* @__PURE__ */ r(le, { value: "item-3", children: [
6075
6075
  /* @__PURE__ */ e(ie, { children: "Filters" }),
6076
6076
  /* @__PURE__ */ r(oe, { className: "space-y-4 px-2", children: [
6077
- /* @__PURE__ */ e(Je, {}),
6078
- /* @__PURE__ */ e(rt, {})
6077
+ /* @__PURE__ */ e(Qe, {}),
6078
+ /* @__PURE__ */ e(st, {})
6079
6079
  ] })
6080
6080
  ] })
6081
6081
  ] }) });
6082
6082
  }
6083
- const qi = {
6083
+ const ji = {
6084
6084
  datasets: [
6085
6085
  {
6086
6086
  type: "line",
@@ -6093,7 +6093,7 @@ const qi = {
6093
6093
  data: []
6094
6094
  }
6095
6095
  ]
6096
- }, ji = {
6096
+ }, Bi = {
6097
6097
  datasets: [
6098
6098
  {
6099
6099
  fill: "origin",
@@ -6103,7 +6103,7 @@ const qi = {
6103
6103
  }
6104
6104
  ]
6105
6105
  };
6106
- function Bi() {
6106
+ function Pi() {
6107
6107
  const t = f((a) => a.card.type);
6108
6108
  return /* @__PURE__ */ r("div", { className: "space-y-6 p-6", children: [
6109
6109
  /* @__PURE__ */ e(
@@ -6112,17 +6112,17 @@ function Bi() {
6112
6112
  className: " ",
6113
6113
  type: "single",
6114
6114
  collapsible: !0,
6115
- children: Pi(t)
6115
+ children: Hi(t)
6116
6116
  }
6117
6117
  ),
6118
6118
  !["kpi"].includes(t) && /* @__PURE__ */ r("div", { className: "space-y-4", children: [
6119
6119
  /* @__PURE__ */ e(pn, {}),
6120
- /* @__PURE__ */ e(Je, {}),
6121
- /* @__PURE__ */ e(rt, {})
6120
+ /* @__PURE__ */ e(Qe, {}),
6121
+ /* @__PURE__ */ e(st, {})
6122
6122
  ] })
6123
6123
  ] });
6124
6124
  }
6125
- function Pi(t) {
6125
+ function Hi(t) {
6126
6126
  if (["line", "bar"].includes(t))
6127
6127
  return /* @__PURE__ */ r(te, { children: [
6128
6128
  /* @__PURE__ */ r(le, { value: "item-1", children: [
@@ -6143,7 +6143,7 @@ function Pi(t) {
6143
6143
  /* @__PURE__ */ e("b", { children: "Customize" }),
6144
6144
  " and change the `type` property in the dataset."
6145
6145
  ] }),
6146
- /* @__PURE__ */ e("pre", { children: JSON.stringify(qi, null, 2) })
6146
+ /* @__PURE__ */ e("pre", { children: JSON.stringify(ji, null, 2) })
6147
6147
  ] })
6148
6148
  ] }),
6149
6149
  /* @__PURE__ */ r(le, { value: "item-3", children: [
@@ -6164,7 +6164,7 @@ function Pi(t) {
6164
6164
  ),
6165
6165
  "for more options."
6166
6166
  ] }),
6167
- /* @__PURE__ */ e("pre", { children: JSON.stringify(ji, null, 2) })
6167
+ /* @__PURE__ */ e("pre", { children: JSON.stringify(Bi, null, 2) })
6168
6168
  ] })
6169
6169
  ] })
6170
6170
  ] });
@@ -6219,7 +6219,7 @@ function Pi(t) {
6219
6219
  ] })
6220
6220
  ] }) });
6221
6221
  }
6222
- function Hi() {
6222
+ function Gi() {
6223
6223
  var c, h, d, g, C;
6224
6224
  const t = f((m) => m.card.preferences), a = f(
6225
6225
  (m) => m.actions.setCardPreferences
@@ -6376,7 +6376,7 @@ function Hi() {
6376
6376
  ] }) }),
6377
6377
  /* @__PURE__ */ e(Te, { className: "my-3" }),
6378
6378
  /* @__PURE__ */ e(
6379
- Mr,
6379
+ Dr,
6380
6380
  {
6381
6381
  colorRanges: o,
6382
6382
  setColorRanges: i
@@ -6385,7 +6385,7 @@ function Hi() {
6385
6385
  ] })
6386
6386
  ] });
6387
6387
  }
6388
- function Gi() {
6388
+ function Ui() {
6389
6389
  return /* @__PURE__ */ r("div", { className: "space-y-6 px-6 py-2", children: [
6390
6390
  /* @__PURE__ */ e(Fe, { type: "single", collapsible: !0, children: /* @__PURE__ */ r(le, { value: "item-1", children: [
6391
6391
  /* @__PURE__ */ e(ie, { className: "", children: "KPI Query" }),
@@ -6411,12 +6411,12 @@ function Gi() {
6411
6411
  ] })
6412
6412
  ] })
6413
6413
  ] }) }),
6414
- /* @__PURE__ */ e("section", { className: "", children: /* @__PURE__ */ e(Hi, {}) }),
6414
+ /* @__PURE__ */ e("section", { className: "", children: /* @__PURE__ */ e(Gi, {}) }),
6415
6415
  /* @__PURE__ */ e("div", {}),
6416
6416
  /* @__PURE__ */ e("div", {})
6417
6417
  ] });
6418
6418
  }
6419
- function qt({
6419
+ function jt({
6420
6420
  children: t,
6421
6421
  summary: a,
6422
6422
  open: n,
@@ -6430,14 +6430,14 @@ function qt({
6430
6430
  children: [
6431
6431
  /* @__PURE__ */ r("summary", { className: "flex cursor-pointer list-none items-center justify-between gap-4", children: [
6432
6432
  /* @__PURE__ */ e(G, { children: a }),
6433
- /* @__PURE__ */ e(Dr, { className: "h-4 w-4" })
6433
+ /* @__PURE__ */ e(Ir, { className: "h-4 w-4" })
6434
6434
  ] }),
6435
6435
  /* @__PURE__ */ e("div", { className: "transition-all ease-in-out", children: t })
6436
6436
  ]
6437
6437
  }
6438
6438
  );
6439
6439
  }
6440
- const Ui = [
6440
+ const $i = [
6441
6441
  {
6442
6442
  label: "Mercator",
6443
6443
  value: "mercator"
@@ -6494,7 +6494,7 @@ const Ui = [
6494
6494
  label: "Natural Earth 1",
6495
6495
  value: "naturalEarth1"
6496
6496
  }
6497
- ], $i = [
6497
+ ], Qi = [
6498
6498
  "blues",
6499
6499
  "brBG",
6500
6500
  "buGn",
@@ -6533,11 +6533,11 @@ const Ui = [
6533
6533
  "ylGnBu",
6534
6534
  "ylOrBr",
6535
6535
  "ylOrRd"
6536
- ], Qi = $i.map((t) => ({
6536
+ ], Ji = Qi.map((t) => ({
6537
6537
  label: t,
6538
6538
  value: t
6539
6539
  }));
6540
- function Ji() {
6540
+ function Wi() {
6541
6541
  var c, h, d, g, C, m, N, p, x, y, w, k, T, D, M, E, H, ee;
6542
6542
  const t = f((S) => S.card), a = (h = (c = t == null ? void 0 : t.preferences) == null ? void 0 : c.mapVisualOptions) == null ? void 0 : h.topoJsonUrl, [n, s] = J(
6543
6543
  ((g = (d = t == null ? void 0 : t.preferences) == null ? void 0 : d.mapVisualOptions) == null ? void 0 : g.customTopoJsonUrl) || ""
@@ -6546,9 +6546,9 @@ function Ji() {
6546
6546
  value: S
6547
6547
  })) || [];
6548
6548
  return /* @__PURE__ */ r("div", { className: "p-6", children: [
6549
- /* @__PURE__ */ e(qt, { summary: "Map Chart", children: /* @__PURE__ */ e("p", { className: "rounded-md bg-muted p-2 font-mono text-xs", children: "SELECT country, value FROM table" }) }),
6549
+ /* @__PURE__ */ e(jt, { summary: "Map Chart", children: /* @__PURE__ */ e("p", { className: "rounded-md bg-muted p-2 font-mono text-xs", children: "SELECT country, value FROM table" }) }),
6550
6550
  /* @__PURE__ */ e(Te, { className: "my-4" }),
6551
- /* @__PURE__ */ e(qt, { open: !0, summary: "Settings", children: /* @__PURE__ */ r("div", { className: "space-y-3 px-2", children: [
6551
+ /* @__PURE__ */ e(jt, { open: !0, summary: "Settings", children: /* @__PURE__ */ r("div", { className: "space-y-3 px-2", children: [
6552
6552
  /* @__PURE__ */ e(
6553
6553
  fe,
6554
6554
  {
@@ -6630,7 +6630,7 @@ function Ji() {
6630
6630
  fe,
6631
6631
  {
6632
6632
  className: "h-9",
6633
- options: Ui,
6633
+ options: $i,
6634
6634
  value: ((p = (N = t.preferences) == null ? void 0 : N.mapVisualOptions) == null ? void 0 : p.projection) || "",
6635
6635
  label: "Projection",
6636
6636
  onValueChange: (S) => {
@@ -6652,7 +6652,7 @@ function Ji() {
6652
6652
  fe,
6653
6653
  {
6654
6654
  className: "h-9",
6655
- options: Qi,
6655
+ options: Ji,
6656
6656
  value: ((y = (x = t.preferences) == null ? void 0 : x.mapVisualOptions) == null ? void 0 : y.colorScale) || "",
6657
6657
  label: "Select Color Scale",
6658
6658
  onValueChange: (S) => {
@@ -6671,7 +6671,7 @@ function Ji() {
6671
6671
  ] })
6672
6672
  ] }) }),
6673
6673
  /* @__PURE__ */ e(Te, { className: "my-4" }),
6674
- /* @__PURE__ */ e(qt, { className: "", summary: "Scale Options", children: /* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
6674
+ /* @__PURE__ */ e(jt, { className: "", summary: "Scale Options", children: /* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
6675
6675
  /* @__PURE__ */ e(
6676
6676
  ue,
6677
6677
  {
@@ -6739,10 +6739,10 @@ function Ji() {
6739
6739
  )
6740
6740
  ] }) }),
6741
6741
  /* @__PURE__ */ e(Te, { className: "my-4" }),
6742
- /* @__PURE__ */ e(Je, {})
6742
+ /* @__PURE__ */ e(Qe, {})
6743
6743
  ] });
6744
6744
  }
6745
- function Wi() {
6745
+ function Ki() {
6746
6746
  var s;
6747
6747
  const t = f((l) => l.card.preferences), { setCardPreferences: a } = f((l) => l.actions);
6748
6748
  function n(l) {
@@ -6782,7 +6782,7 @@ function ht({
6782
6782
  let s = "pie-donut-polar";
6783
6783
  return t === "funnel" && (s = "funnel"), /* @__PURE__ */ e("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ r(Fe, { defaultValue: ["item-2"], type: "multiple", children: [
6784
6784
  /* @__PURE__ */ r(le, { value: "item-1", children: [
6785
- /* @__PURE__ */ e(ie, { children: `${Dt(t)} ${n}` }),
6785
+ /* @__PURE__ */ e(ie, { children: `${It(t)} ${n}` }),
6786
6786
  /* @__PURE__ */ e(oe, { children: a || /* @__PURE__ */ r("div", { className: "space-y-4 font-mono text-xs", children: [
6787
6787
  /* @__PURE__ */ e("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT label, measure FROM table" }),
6788
6788
  /* @__PURE__ */ r("ul", { className: "ml-6 list-disc text-xs [&>li]:mt-2", children: [
@@ -6809,19 +6809,19 @@ function ht({
6809
6809
  /* @__PURE__ */ e(ie, { children: "Settings" }),
6810
6810
  /* @__PURE__ */ r(oe, { className: "space-y-4 px-2", children: [
6811
6811
  t !== "text" && /* @__PURE__ */ e(pn, {}),
6812
- t === "text" && /* @__PURE__ */ e(Wi, {})
6812
+ t === "text" && /* @__PURE__ */ e(Ki, {})
6813
6813
  ] })
6814
6814
  ] }),
6815
6815
  !["range", "text"].includes(t) && /* @__PURE__ */ r(le, { value: "item-3", children: [
6816
6816
  /* @__PURE__ */ e(ie, { children: "Filters" }),
6817
6817
  /* @__PURE__ */ r(oe, { className: "space-y-4 px-2", children: [
6818
- /* @__PURE__ */ e(Je, {}),
6819
- /* @__PURE__ */ e(rt, {})
6818
+ /* @__PURE__ */ e(Qe, {}),
6819
+ /* @__PURE__ */ e(st, {})
6820
6820
  ] })
6821
6821
  ] })
6822
6822
  ] }) });
6823
6823
  }
6824
- function Ki() {
6824
+ function Yi() {
6825
6825
  const t = f(
6826
6826
  (s) => {
6827
6827
  var l, o;
@@ -6888,19 +6888,19 @@ function Ki() {
6888
6888
  /* @__PURE__ */ e(ie, { children: "Settings" }),
6889
6889
  /* @__PURE__ */ r(oe, { className: "space-y-4 px-2", children: [
6890
6890
  n(),
6891
- /* @__PURE__ */ e(ds, {})
6891
+ /* @__PURE__ */ e(cs, {})
6892
6892
  ] })
6893
6893
  ] }),
6894
6894
  /* @__PURE__ */ r(le, { value: "item-3", children: [
6895
6895
  /* @__PURE__ */ e(ie, { children: "Filters" }),
6896
6896
  /* @__PURE__ */ r(oe, { className: "space-y-4 px-2", children: [
6897
- /* @__PURE__ */ e(Je, {}),
6898
- /* @__PURE__ */ e(rt, {})
6897
+ /* @__PURE__ */ e(Qe, {}),
6898
+ /* @__PURE__ */ e(st, {})
6899
6899
  ] })
6900
6900
  ] })
6901
6901
  ] }) });
6902
6902
  }
6903
- function Yi({
6903
+ function Zi({
6904
6904
  cardType: t = "table"
6905
6905
  }) {
6906
6906
  console.log("cardType", t);
@@ -6914,8 +6914,8 @@ function Yi({
6914
6914
  /* @__PURE__ */ e(Fe, { defaultValue: ["item-3"], type: "multiple", children: /* @__PURE__ */ r(le, { value: "item-3", children: [
6915
6915
  /* @__PURE__ */ e(ie, { children: "Filters" }),
6916
6916
  /* @__PURE__ */ r(oe, { className: "space-y-4 px-2", children: [
6917
- /* @__PURE__ */ e(Je, {}),
6918
- /* @__PURE__ */ e(rt, {})
6917
+ /* @__PURE__ */ e(Qe, {}),
6918
+ /* @__PURE__ */ e(st, {})
6919
6919
  ] })
6920
6920
  ] }) }),
6921
6921
  /* @__PURE__ */ r("div", { className: "flex items-center space-x-2", children: [
@@ -6936,7 +6936,7 @@ function Yi({
6936
6936
  ] })
6937
6937
  ] });
6938
6938
  }
6939
- const Zi = /* @__PURE__ */ r("div", { className: "space-y-4 font-mono text-xs", children: [
6939
+ const Xi = /* @__PURE__ */ r("div", { className: "space-y-4 font-mono text-xs", children: [
6940
6940
  /* @__PURE__ */ e("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT dimension, cohort, metric FROM table" }),
6941
6941
  /* @__PURE__ */ r("div", { children: [
6942
6942
  "See ",
@@ -6952,7 +6952,7 @@ const Zi = /* @__PURE__ */ r("div", { className: "space-y-4 font-mono text-xs",
6952
6952
  ),
6953
6953
  " in the docs."
6954
6954
  ] })
6955
- ] }), Xi = /* @__PURE__ */ r("div", { className: "space-y-4 font-mono text-xs", children: [
6955
+ ] }), eo = /* @__PURE__ */ r("div", { className: "space-y-4 font-mono text-xs", children: [
6956
6956
  /* @__PURE__ */ e("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT y-axis, label, range-from, range-to, range-value FROM table" }),
6957
6957
  /* @__PURE__ */ r("div", { children: [
6958
6958
  "See ",
@@ -6968,7 +6968,7 @@ const Zi = /* @__PURE__ */ r("div", { className: "space-y-4 font-mono text-xs",
6968
6968
  ),
6969
6969
  " in the docs."
6970
6970
  ] })
6971
- ] }), eo = /* @__PURE__ */ r("div", { className: "space-y-4 font-mono text-xs", children: [
6971
+ ] }), to = /* @__PURE__ */ r("div", { className: "space-y-4 font-mono text-xs", children: [
6972
6972
  /* @__PURE__ */ e("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT text FROM table limit 1" }),
6973
6973
  /* @__PURE__ */ r("div", { children: [
6974
6974
  "See ",
@@ -6985,22 +6985,22 @@ const Zi = /* @__PURE__ */ r("div", { className: "space-y-4 font-mono text-xs",
6985
6985
  " in the docs."
6986
6986
  ] })
6987
6987
  ] });
6988
- function to() {
6988
+ function no() {
6989
6989
  const t = f((n) => n.card.type);
6990
6990
  function a(n) {
6991
6991
  switch (n) {
6992
6992
  case "stackedBar":
6993
6993
  case "stackedLine":
6994
- return /* @__PURE__ */ e(Ki, {});
6994
+ return /* @__PURE__ */ e(Yi, {});
6995
6995
  case "pyramid":
6996
- return /* @__PURE__ */ e(ht, { docContent: Zi, cardType: n });
6996
+ return /* @__PURE__ */ e(ht, { docContent: Xi, cardType: n });
6997
6997
  case "kpi":
6998
- return /* @__PURE__ */ e(Gi, {});
6998
+ return /* @__PURE__ */ e(Ui, {});
6999
6999
  case "line":
7000
7000
  case "bar":
7001
- return /* @__PURE__ */ e(_i, { cardType: n });
7001
+ return /* @__PURE__ */ e(Ri, { cardType: n });
7002
7002
  case "range":
7003
- return /* @__PURE__ */ e(ht, { docContent: Xi, cardType: n });
7003
+ return /* @__PURE__ */ e(ht, { docContent: eo, cardType: n });
7004
7004
  case "pie":
7005
7005
  case "doughnut":
7006
7006
  case "polarArea":
@@ -7009,32 +7009,32 @@ function to() {
7009
7009
  return /* @__PURE__ */ e(ht, { cardType: n });
7010
7010
  case "bubble":
7011
7011
  case "scatter":
7012
- return /* @__PURE__ */ e(Ri, { cardType: n });
7012
+ return /* @__PURE__ */ e(qi, { cardType: n });
7013
7013
  case "table":
7014
- return /* @__PURE__ */ e(Yi, { cardType: n });
7014
+ return /* @__PURE__ */ e(Zi, { cardType: n });
7015
7015
  case "text":
7016
7016
  return /* @__PURE__ */ e(
7017
7017
  ht,
7018
7018
  {
7019
- docContent: eo,
7019
+ docContent: to,
7020
7020
  cardType: n,
7021
7021
  suffix: "Visual"
7022
7022
  }
7023
7023
  );
7024
7024
  case "map":
7025
- return /* @__PURE__ */ e(Ji, {});
7025
+ return /* @__PURE__ */ e(Wi, {});
7026
7026
  case "custom":
7027
- return /* @__PURE__ */ e(Li, {});
7027
+ return /* @__PURE__ */ e(Ei, {});
7028
7028
  default:
7029
- return /* @__PURE__ */ e(Bi, {});
7029
+ return /* @__PURE__ */ e(Pi, {});
7030
7030
  }
7031
7031
  }
7032
- return /* @__PURE__ */ r(st, { className: "h-full w-full text-sm", children: [
7032
+ return /* @__PURE__ */ r(ot, { className: "h-full w-full text-sm", children: [
7033
7033
  a(t),
7034
- /* @__PURE__ */ e(Pe, { orientation: "horizontal" })
7034
+ /* @__PURE__ */ e(et, { orientation: "horizontal" })
7035
7035
  ] });
7036
7036
  }
7037
- function ps({
7037
+ function hs({
7038
7038
  label: t,
7039
7039
  column: a,
7040
7040
  functions: n,
@@ -7062,7 +7062,7 @@ function ps({
7062
7062
  }
7063
7063
  );
7064
7064
  }
7065
- const no = [
7065
+ const ao = [
7066
7066
  {
7067
7067
  label: "Sum",
7068
7068
  value: "SUM",
@@ -7076,12 +7076,12 @@ const no = [
7076
7076
  {
7077
7077
  label: "Unique",
7078
7078
  value: "DISTINCT",
7079
- logo: /* @__PURE__ */ e(bl, { className: "size-3.5" })
7079
+ logo: /* @__PURE__ */ e(vl, { className: "size-3.5" })
7080
7080
  },
7081
7081
  {
7082
7082
  label: "Average",
7083
7083
  value: "AVG",
7084
- logo: /* @__PURE__ */ e(Kr, { className: "size-3.5" })
7084
+ logo: /* @__PURE__ */ e(Yr, { className: "size-3.5" })
7085
7085
  },
7086
7086
  {
7087
7087
  label: "Min",
@@ -7094,9 +7094,9 @@ const no = [
7094
7094
  logo: /* @__PURE__ */ e(ga, { className: "size-3.5" })
7095
7095
  }
7096
7096
  ];
7097
- function ao({ column: t }) {
7097
+ function so({ column: t }) {
7098
7098
  const { updateMetricColumn: a } = Y();
7099
- let n = no;
7099
+ let n = ao;
7100
7100
  Ce(t.type) && (n = n.filter(
7101
7101
  (l) => ["COUNT", "DISTINCT"].includes(l.value)
7102
7102
  )), Be(t.type) && (n = n.filter(
@@ -7106,12 +7106,12 @@ function ao({ column: t }) {
7106
7106
  const o = {
7107
7107
  ...t,
7108
7108
  aggregate: l,
7109
- label: ot(t.name, l)
7109
+ label: it(t.name, l)
7110
7110
  };
7111
7111
  a(t.id, o);
7112
7112
  }
7113
7113
  return /* @__PURE__ */ e(
7114
- ps,
7114
+ hs,
7115
7115
  {
7116
7116
  column: t,
7117
7117
  functions: n,
@@ -7120,7 +7120,7 @@ function ao({ column: t }) {
7120
7120
  }
7121
7121
  );
7122
7122
  }
7123
- const so = [
7123
+ const ro = [
7124
7124
  {
7125
7125
  label: "Day (D)",
7126
7126
  value: "day",
@@ -7142,7 +7142,7 @@ const so = [
7142
7142
  logo: /* @__PURE__ */ e(G, { className: "cursor-pointer text-xs", children: "Y" })
7143
7143
  }
7144
7144
  ];
7145
- function ro({ column: t }) {
7145
+ function lo({ column: t }) {
7146
7146
  const { updateGroupByColumn: a } = Y();
7147
7147
  function n(s) {
7148
7148
  const l = {
@@ -7153,16 +7153,16 @@ function ro({ column: t }) {
7153
7153
  a(t.id, l);
7154
7154
  }
7155
7155
  return /* @__PURE__ */ e(
7156
- ps,
7156
+ hs,
7157
7157
  {
7158
7158
  column: t,
7159
- functions: so,
7159
+ functions: ro,
7160
7160
  onFunctionChange: (s) => n(s),
7161
7161
  label: "Granularity"
7162
7162
  }
7163
7163
  );
7164
7164
  }
7165
- function lo({
7165
+ function io({
7166
7166
  col: t,
7167
7167
  onChange: a,
7168
7168
  droppableId: n
@@ -7207,27 +7207,8 @@ function lo({
7207
7207
  }
7208
7208
  );
7209
7209
  }
7210
- function Jt({
7211
- children: t,
7212
- className: a,
7213
- delayDuration: n
7214
- }) {
7215
- return /* @__PURE__ */ e(Xn, { children: /* @__PURE__ */ r(kt, { delayDuration: n, children: [
7216
- /* @__PURE__ */ e(Zt, { asChild: !0, children: /* @__PURE__ */ e(
7217
- "span",
7218
- {
7219
- className: R(
7220
- "overflow-hidden text-ellipsis whitespace-nowrap",
7221
- a
7222
- ),
7223
- children: t
7224
- }
7225
- ) }),
7226
- /* @__PURE__ */ e(Mt, { children: t })
7227
- ] }) });
7228
- }
7229
- function io({ column: t }) {
7230
- const { updateMetricColumn: a } = Y(), { transformedMetricKeys: n, dimensionKeys: s } = cs();
7210
+ function oo({ column: t }) {
7211
+ const { updateMetricColumn: a } = Y(), { transformedMetricKeys: n, dimensionKeys: s } = os();
7231
7212
  console.log(n, s);
7232
7213
  const l = f(
7233
7214
  (c) => {
@@ -7238,8 +7219,8 @@ function io({ column: t }) {
7238
7219
  (c) => c === t.label || c === t.name
7239
7220
  ), u = i ? n.indexOf(i) : -1;
7240
7221
  return /* @__PURE__ */ r("div", { className: "space-y-3", children: [
7241
- i && /* @__PURE__ */ e(ms, { idx: u, col: i, children: /* @__PURE__ */ e(
7242
- Ye,
7222
+ i && /* @__PURE__ */ e(us, { idx: u, col: i, children: /* @__PURE__ */ e(
7223
+ Ke,
7243
7224
  {
7244
7225
  enabled: !0,
7245
7226
  className: "w-[130px]",
@@ -7251,13 +7232,13 @@ function io({ column: t }) {
7251
7232
  label: c || t.name
7252
7233
  });
7253
7234
  },
7254
- children: /* @__PURE__ */ e(Jt, { className: "w-[130px]", children: t.label || t.name })
7235
+ children: /* @__PURE__ */ e(St, { className: "w-[130px]", children: t.label || t.name })
7255
7236
  }
7256
7237
  ) }),
7257
7238
  o && /* @__PURE__ */ r("div", { className: "flex items-center justify-between gap-2", children: [
7258
7239
  /* @__PURE__ */ e(G, { children: "Pivot Header" }),
7259
7240
  /* @__PURE__ */ e(
7260
- Ye,
7241
+ Ke,
7261
7242
  {
7262
7243
  enabled: !0,
7263
7244
  text: t.aliasTemplate || "",
@@ -7268,13 +7249,13 @@ function io({ column: t }) {
7268
7249
  aliasTemplate: c || ""
7269
7250
  });
7270
7251
  },
7271
- children: /* @__PURE__ */ e(Jt, { className: "font-mono text-xs text-muted-foreground", children: t.aliasTemplate || "{label} ({pivot})" })
7252
+ children: /* @__PURE__ */ e(St, { className: "font-mono text-xs text-muted-foreground", children: t.aliasTemplate || "{label} ({pivot})" })
7272
7253
  }
7273
7254
  )
7274
7255
  ] })
7275
7256
  ] });
7276
7257
  }
7277
- function oo({
7258
+ function co({
7278
7259
  column: t,
7279
7260
  type: a,
7280
7261
  onRemoveColumn: n,
@@ -7349,7 +7330,7 @@ function oo({
7349
7330
  name: M.column_name,
7350
7331
  type: S,
7351
7332
  role: "metric",
7352
- label: ot(M.column_name, "SUM"),
7333
+ label: it(M.column_name, "SUM"),
7353
7334
  aggregate: E ? "SUM" : "COUNT"
7354
7335
  };
7355
7336
  u(t.id, q);
@@ -7362,16 +7343,16 @@ function oo({
7362
7343
  {
7363
7344
  "data-setting-container": "",
7364
7345
  className: "mt-1.5 max-h-32 overflow-y-auto rounded-md border border-border p-3 text-sm",
7365
- children: /* @__PURE__ */ e(io, { column: t })
7346
+ children: /* @__PURE__ */ e(oo, { column: t })
7366
7347
  }
7367
7348
  );
7368
7349
  }
7369
7350
  function k() {
7370
7351
  const M = Ne(t.type);
7371
7352
  if (s === qe)
7372
- return /* @__PURE__ */ e(ao, { column: t });
7353
+ return /* @__PURE__ */ e(so, { column: t });
7373
7354
  if ((s === Re || s === je) && M)
7374
- return /* @__PURE__ */ e(ro, { column: t });
7355
+ return /* @__PURE__ */ e(lo, { column: t });
7375
7356
  }
7376
7357
  function T() {
7377
7358
  return /* @__PURE__ */ e(
@@ -7381,7 +7362,7 @@ function oo({
7381
7362
  "pl-3": (s === Re || s === je) && x
7382
7363
  }),
7383
7364
  children: /* @__PURE__ */ e(
7384
- lo,
7365
+ io,
7385
7366
  {
7386
7367
  col: t,
7387
7368
  onChange: y,
@@ -7438,7 +7419,7 @@ function oo({
7438
7419
  )
7439
7420
  ] }) });
7440
7421
  }
7441
- function jt({
7422
+ function Bt({
7442
7423
  id: t,
7443
7424
  label: a,
7444
7425
  columns: n,
@@ -7472,8 +7453,8 @@ function jt({
7472
7453
  ] }),
7473
7454
  N(),
7474
7455
  /* @__PURE__ */ e("div", { className: "space-y-2", children: C == null ? void 0 : C.map(
7475
- (y) => y.id === Ga.id ? /* @__PURE__ */ e(co, {}, y.id) : /* @__PURE__ */ e(
7476
- oo,
7456
+ (y) => y.id === Ha.id ? /* @__PURE__ */ e(uo, {}, y.id) : /* @__PURE__ */ e(
7457
+ co,
7477
7458
  {
7478
7459
  droppableId: t,
7479
7460
  type: l,
@@ -7487,10 +7468,10 @@ function jt({
7487
7468
  }
7488
7469
  ) });
7489
7470
  }
7490
- function co() {
7471
+ function uo() {
7491
7472
  return /* @__PURE__ */ e("div", { className: "mr-5 flex h-8 grow items-center space-x-2 rounded-md border border-dashed border-muted-foreground bg-background px-2 py-1 text-sm", children: /* @__PURE__ */ e("span", { className: "text-muted-foreground/70", children: "Drop here" }) });
7492
7473
  }
7493
- function fs({ children: t, id: a, type: n }) {
7474
+ function ps({ children: t, id: a, type: n }) {
7494
7475
  const {
7495
7476
  attributes: s,
7496
7477
  listeners: l,
@@ -7505,7 +7486,7 @@ function fs({ children: t, id: a, type: n }) {
7505
7486
  } : void 0;
7506
7487
  return /* @__PURE__ */ e("div", { ...l, ...s, ref: o, style: h, children: t });
7507
7488
  }
7508
- function uo() {
7489
+ function mo() {
7509
7490
  const t = f((y) => {
7510
7491
  var w;
7511
7492
  return (w = y.card.queryConfig) == null ? void 0 : w.orderBy;
@@ -7518,7 +7499,7 @@ function uo() {
7518
7499
  }) || [], { addOrderByColumn: s, removeOrderByColumn: l, updateOrderByColumn: o } = Y(), i = [...a, ...n];
7519
7500
  if (i.length === 0)
7520
7501
  return /* @__PURE__ */ e(te, {});
7521
- const u = /* @__PURE__ */ e(el, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), c = /* @__PURE__ */ e(Wr, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), h = /* @__PURE__ */ e(Xr, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), d = /* @__PURE__ */ e(Jr, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), g = i == null ? void 0 : i.filter((y) => !t.some((w) => w.columnId === y.id)).map((y) => ({
7502
+ const u = /* @__PURE__ */ e(tl, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), c = /* @__PURE__ */ e(Kr, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), h = /* @__PURE__ */ e(el, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), d = /* @__PURE__ */ e(Wr, { className: "size-3.5 text-muted-foreground hover:text-foreground" }), g = i == null ? void 0 : i.filter((y) => !t.some((w) => w.columnId === y.id)).map((y) => ({
7522
7503
  id: y.id,
7523
7504
  value: y.label || y.name
7524
7505
  }));
@@ -7556,7 +7537,7 @@ function uo() {
7556
7537
  return /* @__PURE__ */ e(
7557
7538
  on,
7558
7539
  {
7559
- items: t.map((y) => it(y.columnId)),
7540
+ items: t.map((y) => lt(y.columnId)),
7560
7541
  children: /* @__PURE__ */ r("div", { className: "space-y-2 rounded-md p-4 text-sm", children: [
7561
7542
  /* @__PURE__ */ e(G, { className: "text-sm", children: "Sort By" }),
7562
7543
  g.length > 0 && /* @__PURE__ */ e("div", { className: "mr-5", children: /* @__PURE__ */ e(
@@ -7575,9 +7556,9 @@ function uo() {
7575
7556
  t.map((y) => {
7576
7557
  var w, k;
7577
7558
  return /* @__PURE__ */ e(
7578
- fs,
7559
+ ps,
7579
7560
  {
7580
- id: it(y.columnId),
7561
+ id: lt(y.columnId),
7581
7562
  type: hn,
7582
7563
  children: /* @__PURE__ */ e(
7583
7564
  "div",
@@ -7587,7 +7568,7 @@ function uo() {
7587
7568
  /* @__PURE__ */ r("div", { className: "flex h-full grow items-center justify-between gap-2 rounded-sm bg-muted px-2", children: [
7588
7569
  /* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
7589
7570
  /* @__PURE__ */ e(Aa, { className: "size-3 cursor-move text-muted-foreground hover:text-foreground" }),
7590
- /* @__PURE__ */ e(Jt, { className: "w-[175px] text-sm", children: ((w = m(y.columnId)) == null ? void 0 : w.label) || ((k = m(y.columnId)) == null ? void 0 : k.name) })
7571
+ /* @__PURE__ */ e(St, { className: "w-[175px] text-sm", children: ((w = m(y.columnId)) == null ? void 0 : w.label) || ((k = m(y.columnId)) == null ? void 0 : k.name) })
7591
7572
  ] }),
7592
7573
  /* @__PURE__ */ e(
7593
7574
  "button",
@@ -7612,14 +7593,14 @@ function uo() {
7612
7593
  y.columnId
7613
7594
  )
7614
7595
  },
7615
- it(y.columnId)
7596
+ lt(y.columnId)
7616
7597
  );
7617
7598
  })
7618
7599
  ] })
7619
7600
  }
7620
7601
  );
7621
7602
  }
7622
- function mo() {
7603
+ function ho() {
7623
7604
  const t = f(
7624
7605
  (x) => {
7625
7606
  var y;
@@ -7658,11 +7639,11 @@ function mo() {
7658
7639
  }
7659
7640
  let m = "Group By", N = "Metrics", p = "Stack By";
7660
7641
  return a === "table" && (m = "Rows", N = "Metrics", p = "Columns"), /* @__PURE__ */ r("div", { className: "flex h-full w-full flex-col gap-3 py-4", children: [
7661
- /* @__PURE__ */ e(os, { iconClassName: "size-[19px]" }),
7662
- /* @__PURE__ */ r(It, { className: "flex min-h-0 grow basis-0 flex-col gap-4 overflow-y-auto", children: [
7642
+ /* @__PURE__ */ e(is, { iconClassName: "size-[19px]" }),
7643
+ /* @__PURE__ */ r(Ot, { className: "flex min-h-0 grow basis-0 flex-col gap-4 overflow-y-auto", children: [
7663
7644
  /* @__PURE__ */ r("div", { className: "flex flex-col gap-4 p-4", children: [
7664
7645
  /* @__PURE__ */ e(
7665
- jt,
7646
+ Bt,
7666
7647
  {
7667
7648
  onRemoveColumn: d,
7668
7649
  sortableType: xt,
@@ -7673,7 +7654,7 @@ function mo() {
7673
7654
  }
7674
7655
  ),
7675
7656
  /* @__PURE__ */ e(
7676
- jt,
7657
+ Bt,
7677
7658
  {
7678
7659
  onRemoveColumn: C,
7679
7660
  sortableType: Ct,
@@ -7684,19 +7665,19 @@ function mo() {
7684
7665
  }
7685
7666
  ),
7686
7667
  /* @__PURE__ */ e(
7687
- jt,
7668
+ Bt,
7688
7669
  {
7689
7670
  onRemoveColumn: g,
7690
- sortableType: Ut,
7671
+ sortableType: $t,
7691
7672
  id: qe,
7692
7673
  label: N,
7693
7674
  columns: s,
7694
7675
  previewColumns: l
7695
7676
  }
7696
7677
  ),
7697
- /* @__PURE__ */ e(uo, {})
7678
+ /* @__PURE__ */ e(mo, {})
7698
7679
  ] }),
7699
- /* @__PURE__ */ e(Pe, { orientation: "horizontal" })
7680
+ /* @__PURE__ */ e(et, { orientation: "horizontal" })
7700
7681
  ] })
7701
7682
  ] });
7702
7683
  }
@@ -7711,7 +7692,7 @@ function fn({
7711
7692
  function c(h) {
7712
7693
  u(h);
7713
7694
  }
7714
- return /* @__PURE__ */ e(fs, { id: n, type: s, children: /* @__PURE__ */ r(
7695
+ return /* @__PURE__ */ e(ps, { id: n, type: s, children: /* @__PURE__ */ r(
7715
7696
  "div",
7716
7697
  {
7717
7698
  className: R(
@@ -7741,7 +7722,7 @@ function fn({
7741
7722
  o && "border border-border"
7742
7723
  ),
7743
7724
  children: [
7744
- /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(Ir, { className: "mr-2 size-3.5 cursor-move items-center justify-center p-0 text-muted-foreground/60 hover:text-foreground" }) }),
7725
+ /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(Or, { className: "mr-2 size-3.5 cursor-move items-center justify-center p-0 text-muted-foreground/60 hover:text-foreground" }) }),
7745
7726
  /* @__PURE__ */ e(
7746
7727
  "div",
7747
7728
  {
@@ -7759,7 +7740,7 @@ function fn({
7759
7740
  }
7760
7741
  ) });
7761
7742
  }
7762
- function ho({
7743
+ function po({
7763
7744
  column: t,
7764
7745
  sortableType: a
7765
7746
  }) {
@@ -7835,7 +7816,7 @@ function ho({
7835
7816
  }
7836
7817
  );
7837
7818
  }
7838
- function po({
7819
+ function fo({
7839
7820
  column: t,
7840
7821
  sortableType: a
7841
7822
  }) {
@@ -7849,7 +7830,7 @@ function po({
7849
7830
  title: "",
7850
7831
  // not needed
7851
7832
  dataType: t.type
7852
- }, { isLoading: c, isFetching: h, isError: d, data: g } = Ca(u), C = g == null ? void 0 : g.records, { dateRange: m, setDateRange: N, initialDateRange: p } = Or(C), { updateEditorFilterValue: x } = Y();
7833
+ }, { isLoading: c, isFetching: h, isError: d, data: g } = Ca(u), C = g == null ? void 0 : g.records, { dateRange: m, setDateRange: N, initialDateRange: p } = Tr(C), { updateEditorFilterValue: x } = Y();
7853
7834
  function y(T) {
7854
7835
  var M, E;
7855
7836
  const D = {
@@ -7863,7 +7844,7 @@ function po({
7863
7844
  }
7864
7845
  function k() {
7865
7846
  return c || h ? /* @__PURE__ */ e("div", { children: /* @__PURE__ */ e(Xt, { className: "h-8 w-72 bg-foreground/10" }) }) : d ? /* @__PURE__ */ e("div", { className: "h-8 w-72 bg-muted px-2", children: "Error" }) : C ? /* @__PURE__ */ e(
7866
- Tr,
7847
+ zr,
7867
7848
  {
7868
7849
  title: u.title,
7869
7850
  open: n,
@@ -7887,7 +7868,7 @@ function po({
7887
7868
  }
7888
7869
  );
7889
7870
  }
7890
- function fo({
7871
+ function go({
7891
7872
  id: t,
7892
7873
  label: a,
7893
7874
  columns: n,
@@ -7906,17 +7887,17 @@ function fo({
7906
7887
  }
7907
7888
  function C(x) {
7908
7889
  const y = Ne(x.type);
7909
- return x.id === Ga.id ? /* @__PURE__ */ e(
7890
+ return x.id === Ha.id ? /* @__PURE__ */ e(
7910
7891
  fn,
7911
7892
  {
7912
7893
  id: x.id,
7913
7894
  sortableType: l,
7914
7895
  column: x,
7915
- children: /* @__PURE__ */ e(go, {})
7896
+ children: /* @__PURE__ */ e(yo, {})
7916
7897
  },
7917
7898
  x.id
7918
7899
  ) : y ? /* @__PURE__ */ e(
7919
- po,
7900
+ fo,
7920
7901
  {
7921
7902
  droppableId: t,
7922
7903
  sortableType: l,
@@ -7924,7 +7905,7 @@ function fo({
7924
7905
  },
7925
7906
  x.id
7926
7907
  ) : /* @__PURE__ */ e(
7927
- ho,
7908
+ po,
7928
7909
  {
7929
7910
  droppableId: t,
7930
7911
  sortableType: l,
@@ -7951,10 +7932,10 @@ function fo({
7951
7932
  }
7952
7933
  ) });
7953
7934
  }
7954
- function go() {
7935
+ function yo() {
7955
7936
  return /* @__PURE__ */ e("div", { className: "flex h-8 w-60 items-center space-x-2 rounded-md border border-dashed border-muted-foreground bg-background px-2 py-1 text-sm text-muted-foreground", children: "Drop here" });
7956
7937
  }
7957
- function yo() {
7938
+ function bo() {
7958
7939
  const t = f(
7959
7940
  (l) => {
7960
7941
  var o;
@@ -7967,32 +7948,32 @@ function yo() {
7967
7948
  n(l);
7968
7949
  }
7969
7950
  return /* @__PURE__ */ e("section", { className: "size-full px-4 pb-4", children: /* @__PURE__ */ e(
7970
- fo,
7951
+ go,
7971
7952
  {
7972
7953
  onRemoveColumn: s,
7973
- sortableType: Qt,
7974
- id: $t,
7954
+ sortableType: Jt,
7955
+ id: Qt,
7975
7956
  label: "Filters",
7976
7957
  columns: t,
7977
7958
  previewColumns: a
7978
7959
  }
7979
7960
  ) });
7980
7961
  }
7981
- function bo() {
7962
+ function vo() {
7982
7963
  const t = f((s) => s.card), { data: a, errorMessage: n } = pe(t);
7983
7964
  return /* @__PURE__ */ r("section", { className: "flex justify-between gap-2 p-4", children: [
7984
7965
  /* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
7985
- /* @__PURE__ */ e(Xa, {}),
7986
- /* @__PURE__ */ e($a, { sql: a == null ? void 0 : a.sql, error: n })
7966
+ /* @__PURE__ */ e(Za, {}),
7967
+ /* @__PURE__ */ e(Ua, { sql: a == null ? void 0 : a.sql, error: n })
7987
7968
  ] }),
7988
7969
  /* @__PURE__ */ r("div", { className: "flex items-center gap-3", children: [
7989
7970
  /* @__PURE__ */ e("div", { className: "rounded-full bg-green-300 px-3 py-1 text-xs font-medium text-black", children: "Preview" }),
7990
- /* @__PURE__ */ e(Za, {}),
7991
- /* @__PURE__ */ e(Ya, { variant: "default" })
7971
+ /* @__PURE__ */ e(Ya, {}),
7972
+ /* @__PURE__ */ e(Ka, { variant: "default" })
7992
7973
  ] })
7993
7974
  ] });
7994
7975
  }
7995
- function vo() {
7976
+ function xo() {
7996
7977
  const t = tt(null), a = f((i) => i.isShowingVisual), n = f((i) => i.showAIDialog), s = f((i) => i.isDevMode);
7997
7978
  me(() => {
7998
7979
  var i, u;
@@ -8007,7 +7988,7 @@ function vo() {
8007
7988
  className: "flex",
8008
7989
  minSize: 20,
8009
7990
  defaultSize: 40,
8010
- children: /* @__PURE__ */ e(gi, {})
7991
+ children: /* @__PURE__ */ e(yi, {})
8011
7992
  }
8012
7993
  ),
8013
7994
  /* @__PURE__ */ e(Ve, { withHandle: !0 }),
@@ -8026,7 +8007,7 @@ function vo() {
8026
8007
  className: "flex",
8027
8008
  defaultSize: 25,
8028
8009
  maxSize: 30,
8029
- children: /* @__PURE__ */ e(to, {})
8010
+ children: /* @__PURE__ */ e(no, {})
8030
8011
  }
8031
8012
  ) }),
8032
8013
  !n && /* @__PURE__ */ e(Ve, {}),
@@ -8050,7 +8031,7 @@ function vo() {
8050
8031
  className: "flex min-w-[320px]",
8051
8032
  defaultSize: 25,
8052
8033
  maxSize: 30,
8053
- children: /* @__PURE__ */ e(mo, {})
8034
+ children: /* @__PURE__ */ e(ho, {})
8054
8035
  }
8055
8036
  ) }),
8056
8037
  !n && /* @__PURE__ */ e(Ve, {}),
@@ -8062,8 +8043,8 @@ function vo() {
8062
8043
  minSize: 10,
8063
8044
  defaultSize: 20,
8064
8045
  children: [
8065
- /* @__PURE__ */ e(bo, {}),
8066
- /* @__PURE__ */ e(yo, {})
8046
+ /* @__PURE__ */ e(vo, {}),
8047
+ /* @__PURE__ */ e(bo, {})
8067
8048
  ]
8068
8049
  }
8069
8050
  ),
@@ -8083,7 +8064,7 @@ function vo() {
8083
8064
  }
8084
8065
  );
8085
8066
  }
8086
- const xo = [
8067
+ const Co = [
8087
8068
  {
8088
8069
  title: "Help me write a query for",
8089
8070
  subtitle: "orders by month"
@@ -8093,7 +8074,7 @@ const xo = [
8093
8074
  subtitle: "sales by category"
8094
8075
  }
8095
8076
  ];
8096
- function Co() {
8077
+ function No() {
8097
8078
  const t = tt(null), a = tt(null), [n, s] = J(!1), [l, o] = J(Hn), [i, u] = J(!1), c = f((j) => j.actions.setCardSql), h = f((j) => j.actions.setRunSql), d = f((j) => j.showAIDialog), { setShowAIDialog: g, setCardPython: C } = Y(), {
8098
8079
  messages: m,
8099
8080
  setMessages: N,
@@ -8112,8 +8093,8 @@ function Co() {
8112
8093
  toolStatus: q,
8113
8094
  llmUsage: Z,
8114
8095
  errorMessage: Q
8115
- } = Ka();
8116
- zr({
8096
+ } = Wa();
8097
+ Ar({
8117
8098
  scrollContainerRef: t,
8118
8099
  inputRef: a,
8119
8100
  messages: m
@@ -8138,7 +8119,7 @@ function Co() {
8138
8119
  /* @__PURE__ */ e(jn, { children: "Options" }),
8139
8120
  /* @__PURE__ */ e(Bn, {}),
8140
8121
  /* @__PURE__ */ e(
8141
- At,
8122
+ Ft,
8142
8123
  {
8143
8124
  checked: n,
8144
8125
  onCheckedChange: s,
@@ -8146,7 +8127,7 @@ function Co() {
8146
8127
  }
8147
8128
  ),
8148
8129
  /* @__PURE__ */ e(
8149
- At,
8130
+ Ft,
8150
8131
  {
8151
8132
  checked: l,
8152
8133
  onCheckedChange: o,
@@ -8154,7 +8135,7 @@ function Co() {
8154
8135
  }
8155
8136
  ),
8156
8137
  /* @__PURE__ */ e(
8157
- At,
8138
+ Ft,
8158
8139
  {
8159
8140
  checked: i,
8160
8141
  onCheckedChange: u,
@@ -8172,7 +8153,7 @@ function Co() {
8172
8153
  {
8173
8154
  className: "flex items-center gap-2 rounded-md border border-border bg-muted px-2 py-1 text-xs",
8174
8155
  children: [
8175
- Pt({
8156
+ Ht({
8176
8157
  schemaName: j.schemaName || "",
8177
8158
  tableName: j.tableName || "",
8178
8159
  modelName: j.datamodelName || "",
@@ -8202,7 +8183,7 @@ function Co() {
8202
8183
  variant: "secondary",
8203
8184
  onClick: T,
8204
8185
  children: [
8205
- /* @__PURE__ */ e(Xe, { className: "mr-2 size-3" }),
8186
+ /* @__PURE__ */ e(Ze, { className: "mr-2 size-3" }),
8206
8187
  "Current Table"
8207
8188
  ]
8208
8189
  }
@@ -8235,7 +8216,7 @@ function Co() {
8235
8216
  onClick: () => {
8236
8217
  N([]), p();
8237
8218
  },
8238
- children: /* @__PURE__ */ e(Xe, { className: "size-4 text-muted-foreground" })
8219
+ children: /* @__PURE__ */ e(Ze, { className: "size-4 text-muted-foreground" })
8239
8220
  }
8240
8221
  ),
8241
8222
  /* @__PURE__ */ e(
@@ -8255,13 +8236,13 @@ function Co() {
8255
8236
  }
8256
8237
  ),
8257
8238
  /* @__PURE__ */ e(
8258
- It,
8239
+ Ot,
8259
8240
  {
8260
8241
  ref: t,
8261
8242
  className: "flex w-full grow basis-0",
8262
8243
  children: /* @__PURE__ */ r("div", { className: "space-y-4 py-2 pr-3", "data-role": "messages", children: [
8263
8244
  /* @__PURE__ */ e(
8264
- Ar,
8245
+ Fr,
8265
8246
  {
8266
8247
  messages: m,
8267
8248
  showTools: l,
@@ -8270,9 +8251,9 @@ function Co() {
8270
8251
  }
8271
8252
  ),
8272
8253
  /* @__PURE__ */ e(
8273
- Fr,
8254
+ Lr,
8274
8255
  {
8275
- status: Lr(S, q),
8256
+ status: Er(S, q),
8276
8257
  isLoading: k
8277
8258
  }
8278
8259
  )
@@ -8280,14 +8261,14 @@ function Co() {
8280
8261
  }
8281
8262
  ),
8282
8263
  U && /* @__PURE__ */ e(
8283
- Er,
8264
+ Vr,
8284
8265
  {
8285
8266
  onClick: b,
8286
- placeholders: xo
8267
+ placeholders: Co
8287
8268
  }
8288
8269
  ),
8289
8270
  /* @__PURE__ */ e(
8290
- Vr,
8271
+ _r,
8291
8272
  {
8292
8273
  onFocus: () => {
8293
8274
  T();
@@ -8317,14 +8298,14 @@ function Co() {
8317
8298
  }
8318
8299
  );
8319
8300
  }
8320
- function No({ authToken: t, onSave: a, onClose: n }) {
8301
+ function wo({ authToken: t, onSave: a, onClose: n }) {
8321
8302
  const s = tt(null), l = f((x) => x.showAIDialog), { setAuthToken: o } = at(), { setShowAIDialog: i, setOnSave: u, setOnClose: c } = Y(), {
8322
8303
  handleDragOver: h,
8323
8304
  handleDragEnd: d,
8324
8305
  handleDragStart: g,
8325
8306
  handleDragCancel: C,
8326
8307
  sensors: m
8327
- } = ti();
8308
+ } = ni();
8328
8309
  me(() => {
8329
8310
  a && u(a), n && c(n);
8330
8311
  }, [a, u, n, c]), me(() => {
@@ -8344,7 +8325,7 @@ function No({ authToken: t, onSave: a, onClose: n }) {
8344
8325
  className: "grow",
8345
8326
  direction: "horizontal",
8346
8327
  children: [
8347
- /* @__PURE__ */ e(he, { className: "min-w-[510px] rounded-none", children: /* @__PURE__ */ e(vo, {}) }),
8328
+ /* @__PURE__ */ e(he, { className: "min-w-[510px] rounded-none", children: /* @__PURE__ */ e(xo, {}) }),
8348
8329
  /* @__PURE__ */ e(Ve, {}),
8349
8330
  /* @__PURE__ */ e(
8350
8331
  he,
@@ -8353,15 +8334,15 @@ function No({ authToken: t, onSave: a, onClose: n }) {
8353
8334
  ref: s,
8354
8335
  onResize: N,
8355
8336
  defaultSize: 0,
8356
- children: /* @__PURE__ */ e(Co, {})
8337
+ children: /* @__PURE__ */ e(No, {})
8357
8338
  }
8358
8339
  )
8359
8340
  ]
8360
8341
  }
8361
8342
  );
8362
8343
  }
8363
- return /* @__PURE__ */ e(Tt, { FallbackComponent: Na, children: /* @__PURE__ */ e(
8364
- _r,
8344
+ return /* @__PURE__ */ e(zt, { FallbackComponent: Na, children: /* @__PURE__ */ e(
8345
+ Rr,
8365
8346
  {
8366
8347
  sensors: m,
8367
8348
  onDragStart: g,
@@ -8374,7 +8355,7 @@ function No({ authToken: t, onSave: a, onClose: n }) {
8374
8355
  className: "isolate flex h-full grow",
8375
8356
  "data-content": "editor-panel",
8376
8357
  children: [
8377
- /* @__PURE__ */ e(Ua, { type: "main" }),
8358
+ /* @__PURE__ */ e(Ga, { type: "main" }),
8378
8359
  p()
8379
8360
  ]
8380
8361
  }
@@ -8382,7 +8363,7 @@ function No({ authToken: t, onSave: a, onClose: n }) {
8382
8363
  }
8383
8364
  ) });
8384
8365
  }
8385
- function wo() {
8366
+ function So() {
8386
8367
  L((i) => i.selectedCardId);
8387
8368
  const t = L((i) => i.selectedSheetId), { setIsVisualEditing: a } = L((i) => i.actions), n = L((i) => i.isVisualEditing), s = L((i) => i.actions.updateFrame);
8388
8369
  function l(i) {
@@ -8398,13 +8379,13 @@ function wo() {
8398
8379
  className: R("flex grow", {
8399
8380
  "max-h-0 overflow-hidden": !n
8400
8381
  }),
8401
- children: /* @__PURE__ */ e(No, { onSave: l, onClose: o })
8382
+ children: /* @__PURE__ */ e(wo, { onSave: l, onClose: o })
8402
8383
  }
8403
8384
  );
8404
8385
  }
8405
- function So() {
8406
- const t = f((o) => o.selectedDatabaseName), a = f((o) => o.selectedTableName), n = L((o) => o.dashboard.filters) || [], { columns: s } = xe(), { assignFilter: l } = hs();
8407
- return /* @__PURE__ */ e(st, { className: "flex-1 basis-0 flex-col px-3", children: s == null ? void 0 : s.map((o) => {
8386
+ function ko() {
8387
+ const t = f((o) => o.selectedDatabaseName), a = f((o) => o.selectedTableName), n = L((o) => o.dashboard.filters) || [], { columns: s } = xe(), { assignFilter: l } = ms();
8388
+ return /* @__PURE__ */ e(ot, { className: "flex-1 basis-0 flex-col px-3", children: s == null ? void 0 : s.map((o) => {
8408
8389
  const i = n == null ? void 0 : n.find(
8409
8390
  (u) => u.column === be(o.column_name) && u.table === a && u.database === t
8410
8391
  );
@@ -8427,7 +8408,7 @@ function So() {
8427
8408
  );
8428
8409
  }) });
8429
8410
  }
8430
- function ko() {
8411
+ function Mo() {
8431
8412
  L((a) => a.showFilters);
8432
8413
  const t = L(
8433
8414
  (a) => a.actions.setShowFilters
@@ -8446,13 +8427,13 @@ function ko() {
8446
8427
  )
8447
8428
  ] }),
8448
8429
  /* @__PURE__ */ e("div", { className: "flex grow", children: /* @__PURE__ */ e(
8449
- Ua,
8430
+ Ga,
8450
8431
  {
8451
8432
  type: "filter",
8452
8433
  ColumnsComponent: () => (
8453
8434
  // schemaName, tableName, columns
8454
8435
  /* @__PURE__ */ e(
8455
- So,
8436
+ ko,
8456
8437
  {}
8457
8438
  )
8458
8439
  )
@@ -8460,7 +8441,7 @@ function ko() {
8460
8441
  ) })
8461
8442
  ] });
8462
8443
  }
8463
- function Mo() {
8444
+ function Do() {
8464
8445
  const t = L((s) => s.dashboard.filters), a = L((s) => s.theme), n = t == null ? void 0 : t.filter((s) => s.hide);
8465
8446
  return n != null && n.length ? /* @__PURE__ */ e(
8466
8447
  "div",
@@ -8483,7 +8464,7 @@ function Mo() {
8483
8464
  }
8484
8465
  ) : null;
8485
8466
  }
8486
- function Do() {
8467
+ function Io() {
8487
8468
  const t = L((s) => s.showFilters), a = L((s) => s.isVisualEditing), n = L(
8488
8469
  (s) => s.isDashboardEditing
8489
8470
  );
@@ -8499,15 +8480,15 @@ function Do() {
8499
8480
  }),
8500
8481
  children: [
8501
8482
  /* @__PURE__ */ r("section", { className: "flex grow flex-col", children: [
8502
- n && /* @__PURE__ */ e(Mo, {}),
8503
- /* @__PURE__ */ e(Rr, {})
8483
+ n && /* @__PURE__ */ e(Do, {}),
8484
+ /* @__PURE__ */ e(qr, {})
8504
8485
  ] }),
8505
- t && /* @__PURE__ */ e("div", { role: "filter-aside-container", className: "flex", children: /* @__PURE__ */ e(ko, {}) })
8486
+ t && /* @__PURE__ */ e("div", { role: "filter-aside-container", className: "flex", children: /* @__PURE__ */ e(Mo, {}) })
8506
8487
  ]
8507
8488
  }
8508
8489
  );
8509
8490
  }
8510
- function Io() {
8491
+ function Oo() {
8511
8492
  const t = L((l) => l.dashboard), a = L((l) => l.actions.setDashboard), n = L(
8512
8493
  (l) => l.showDashboardJSON
8513
8494
  ), s = L(
@@ -8534,7 +8515,7 @@ function Io() {
8534
8515
  }
8535
8516
  ),
8536
8517
  /* @__PURE__ */ e(
8537
- qr,
8518
+ jr,
8538
8519
  {
8539
8520
  onChange: (l) => {
8540
8521
  if (l)
@@ -8566,55 +8547,56 @@ function Io() {
8566
8547
  }
8567
8548
  );
8568
8549
  }
8569
- function Fo({
8550
+ function Lo({
8570
8551
  showControls: t = !1,
8571
8552
  showFooter: a = !0,
8572
8553
  ...n
8573
8554
  }) {
8574
- return /* @__PURE__ */ e(Tt, { FallbackComponent: Na, children: /* @__PURE__ */ r(jr, { dashboardProps: n, children: [
8575
- /* @__PURE__ */ e(Br, {}),
8576
- /* @__PURE__ */ r(Pr, { children: [
8577
- /* @__PURE__ */ e(Io, {}),
8578
- /* @__PURE__ */ r(Hr, { ...n, children: [
8579
- t && /* @__PURE__ */ e(Kl, {}),
8580
- /* @__PURE__ */ e(wo, {}),
8581
- /* @__PURE__ */ e(Do, {})
8555
+ return /* @__PURE__ */ e(zt, { FallbackComponent: Na, children: /* @__PURE__ */ r(Br, { dashboardProps: n, children: [
8556
+ /* @__PURE__ */ e(Pr, {}),
8557
+ /* @__PURE__ */ r(Hr, { children: [
8558
+ /* @__PURE__ */ e(Oo, {}),
8559
+ /* @__PURE__ */ r(Gr, { ...n, children: [
8560
+ t && /* @__PURE__ */ e(Yl, {}),
8561
+ /* @__PURE__ */ e(So, {}),
8562
+ /* @__PURE__ */ e(Io, {})
8582
8563
  ] })
8583
8564
  ] })
8584
8565
  ] }) });
8585
8566
  }
8586
8567
  export {
8587
- Vo as Dashboard,
8588
- _o as DashboardWC,
8589
- Jl as ScheduleDashboard,
8590
- lt as SelectComponent,
8591
- Ro as SemaphorDataProvider,
8592
- qo as SemaphorQueryClient,
8593
- Fo as Surfboard,
8594
- jl as cleanCard,
8568
+ _o as Dashboard,
8569
+ Ro as DashboardWC,
8570
+ Ko as EMPTY_SELECTION,
8571
+ Wl as ScheduleDashboard,
8572
+ rt as SelectComponent,
8573
+ qo as SemaphorDataProvider,
8574
+ jo as SemaphorQueryClient,
8575
+ Lo as Surfboard,
8576
+ Bl as cleanCard,
8595
8577
  aa as createSqlGenConfig,
8596
- $l as downloadPdf,
8578
+ Ql as downloadPdf,
8597
8579
  be as fmt,
8598
- jo as getColumnDataType,
8599
- Pa as getDashbaordStateWithoutData,
8600
- Bo as getFilterValueType,
8601
- Pt as getFormattedTableNameForQuery,
8602
- wr as getQualifiedTableName,
8580
+ Bo as getColumnDataType,
8581
+ Ba as getDashbaordStateWithoutData,
8582
+ Po as getFilterValueType,
8583
+ Ht as getFormattedTableNameForQuery,
8584
+ Sr as getQualifiedTableName,
8603
8585
  sa as getSql,
8604
- Po as invalidateToken,
8586
+ Ho as invalidateToken,
8605
8587
  ks as isBooleanDataType,
8606
- Ho as isColumnInSqlGen,
8588
+ Go as isColumnInSqlGen,
8607
8589
  Ne as isDateDataType,
8608
8590
  Be as isNumberDataType,
8609
8591
  Ce as isTextDataType,
8610
- Go as resolveDataType,
8592
+ Uo as resolveDataType,
8611
8593
  yt as resolveDatamodelName,
8612
- Uo as useCard,
8594
+ $o as useCard,
8613
8595
  at as useDashboardActions,
8614
8596
  L as useDashboardStore,
8615
- $o as useDateFilterHook,
8597
+ Qo as useDateFilterHook,
8616
8598
  Y as useEditorActions,
8617
8599
  xe as useEditorAside,
8618
8600
  f as useEditorStore,
8619
- Qo as useTextFilterHook
8601
+ Jo as useTextFilterHook
8620
8602
  };