react-semaphor 0.0.395 → 0.0.396

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,5 +1,5 @@
1
- import { c as A, p as It, u as T, a as Be, b as ze, d as ea, e as ta, B as _, P as lt, f as aa, g as na, h as sa, i as la, L as U, I as me, j as ia, k as ra, l as oa, m as ca, n as da, o as ha, q as vn, r as $t, s as X, C as ft, t as Nn, v as u, w as Cn, x as Sn, y as ua, F as ma, z as et, A as dt, E as Ge, G as Ue, H as kn, J as Je, K as pa, M as fa, N as K, O as ga, Q as ya, R as ba, S as xa, T as va, U as Na, V as wn, W as Ca, X as xe, Y as ve, Z as Ne, _ as Ce, $ as we, a0 as Se, a1 as se, a2 as Sa, a3 as ka, a4 as wa, a5 as Ma, a6 as Oa, a7 as ye, a8 as Mn, a9 as On, aa as Ia, ab as In, ac as zn, ad as Dn, ae as za, af as Ie, ag as Tn, ah as He, ai as ht, aj as Ct, ak as Le, al as je, am as Me, an as An, ao as Ln, ap as Fn, aq as Fe, ar as ne, as as Da, at as En, au as gt, av as Vn, aw as qn, ax as Rn, ay as Bt, az as jn, aA as _n, aB as Hn, aC as Pn, aD as St, aE as $n, aF as Pe, aG as tt, aH as fe, aI as at, aJ as Bn, aK as Gn, aL as Un, aM as Jn, aN as vt, aO as Wn, aP as Gt, aQ as Kn, aR as Ut, aS as Qn, aT as Zn, aU as Xn, aV as Yn, aW as Ta, aX as es, aY as zt, aZ as Aa, a_ as ts, a$ as as, b0 as ct, b1 as ns, b2 as ss, b3 as La, b4 as ls, b5 as is, b6 as rs, b7 as os, b8 as cs, b9 as yt, ba as Fa, bb as ds, bc as Ea, bd as Va, be as kt, bf as wt, bg as hs, bh as us, bi as ms, bj as qa, bk as Dt, bl as nt, bm as ps, bn as ut, bo as Ra, bp as fs, bq as ja, br as gs, bs as ys, bt as bs, bu as xs, bv as vs, bw as Xe, bx as Tt, by as Ns, bz as Cs, bA as Ss, bB as ks, bC as Jt, bD as Wt, bE as _a, bF as ws, bG as Ms, bH as Ee, bI as Y, bJ as ee, bK as At, bL as te, bM as Os, bN as Is, bO as zs, bP as Ds, bQ as Ts, bR as As, bS as Ls, bT as Fs, bU as Es, bV as Nt, bW as Ha, bX as Vs, bY as qs, bZ as Rs, b_ as js, b$ as _s, c0 as Hs } from "./chunks/index-kL4f95gH.js";
2
- import { D as or, c5 as cr, c3 as dr, c3 as hr, c7 as ur, c6 as mr, c8 as pr, c4 as fr, c1 as gr, c2 as yr } from "./chunks/index-kL4f95gH.js";
1
+ import { c as L, p as It, u as A, a as Be, b as ze, d as ea, e as ta, B as _, P as lt, f as aa, g as na, h as sa, i as la, L as G, I as me, j as ia, k as ra, l as oa, m as ca, n as da, o as ha, q as vn, r as $t, s as X, C as ft, t as Nn, v as u, w as Cn, x as Sn, y as ua, F as ma, z as et, A as dt, E as Ge, G as Ue, H as kn, J as Je, K as pa, M as fa, N as K, O as ga, Q as ya, R as ba, S as xa, T as va, U as Na, V as wn, W as Ca, X as xe, Y as ve, Z as Ne, _ as Ce, $ as we, a0 as Se, a1 as se, a2 as Sa, a3 as ka, a4 as wa, a5 as Ma, a6 as Oa, a7 as ye, a8 as Mn, a9 as On, aa as Ia, ab as In, ac as zn, ad as Dn, ae as za, af as Ie, ag as Tn, ah as He, ai as ht, aj as Ct, ak as Le, al as je, am as Me, an as An, ao as Ln, ap as Fn, aq as Fe, ar as ne, as as Da, at as En, au as gt, av as Vn, aw as qn, ax as Rn, ay as Bt, az as jn, aA as _n, aB as Hn, aC as Pn, aD as St, aE as $n, aF as Pe, aG as tt, aH as fe, aI as at, aJ as Bn, aK as Gn, aL as Un, aM as Jn, aN as vt, aO as Wn, aP as Gt, aQ as Kn, aR as Ut, aS as Qn, aT as Zn, aU as Xn, aV as Yn, aW as Ta, aX as es, aY as zt, aZ as Aa, a_ as ts, a$ as as, b0 as ct, b1 as ns, b2 as ss, b3 as La, b4 as ls, b5 as is, b6 as rs, b7 as os, b8 as cs, b9 as yt, ba as Fa, bb as ds, bc as Ea, bd as Va, be as kt, bf as wt, bg as hs, bh as us, bi as ms, bj as qa, bk as Dt, bl as nt, bm as ps, bn as ut, bo as Ra, bp as fs, bq as ja, br as gs, bs as ys, bt as bs, bu as xs, bv as vs, bw as Xe, bx as Tt, by as Ns, bz as Cs, bA as Ss, bB as ks, bC as Jt, bD as Wt, bE as _a, bF as ws, bG as Ms, bH as Ee, bI as Y, bJ as ee, bK as At, bL as te, bM as Os, bN as Is, bO as zs, bP as Ds, bQ as Ts, bR as As, bS as Ls, bT as Fs, bU as Es, bV as Nt, bW as Ha, bX as Vs, bY as qs, bZ as Rs, b_ as js, b$ as _s, c0 as Hs } from "./chunks/index-JBhIWh5h.js";
2
+ import { D as or, c5 as cr, c3 as dr, c3 as hr, c7 as ur, c6 as mr, c8 as pr, c4 as fr, c1 as gr, c2 as yr } from "./chunks/index-JBhIWh5h.js";
3
3
  import { jsxs as s, jsx as e, Fragment as ae } from "react/jsx-runtime";
4
4
  import * as _e from "react";
5
5
  import Oe, { useState as P, useMemo as Mt, useEffect as re, useRef as $e, useCallback as Pa, Suspense as Ps } from "react";
@@ -10,7 +10,7 @@ import "react-dom";
10
10
  * This source code is licensed under the ISC license.
11
11
  * See the LICENSE file in the root directory of this source tree.
12
12
  */
13
- const $s = A("AlignCenter", [
13
+ const $s = L("AlignCenter", [
14
14
  ["path", { d: "M17 12H7", key: "16if0g" }],
15
15
  ["path", { d: "M19 18H5", key: "18s9l3" }],
16
16
  ["path", { d: "M21 6H3", key: "1jwq7v" }]
@@ -21,7 +21,7 @@ const $s = A("AlignCenter", [
21
21
  * This source code is licensed under the ISC license.
22
22
  * See the LICENSE file in the root directory of this source tree.
23
23
  */
24
- const Bs = A("AlignLeft", [
24
+ const Bs = L("AlignLeft", [
25
25
  ["path", { d: "M15 12H3", key: "6jk70r" }],
26
26
  ["path", { d: "M17 18H3", key: "1amg6g" }],
27
27
  ["path", { d: "M21 6H3", key: "1jwq7v" }]
@@ -32,7 +32,7 @@ const Bs = A("AlignLeft", [
32
32
  * This source code is licensed under the ISC license.
33
33
  * See the LICENSE file in the root directory of this source tree.
34
34
  */
35
- const Gs = A("AlignRight", [
35
+ const Gs = L("AlignRight", [
36
36
  ["path", { d: "M21 12H9", key: "dn1m92" }],
37
37
  ["path", { d: "M21 18H7", key: "1ygte8" }],
38
38
  ["path", { d: "M21 6H3", key: "1jwq7v" }]
@@ -43,7 +43,7 @@ const Gs = A("AlignRight", [
43
43
  * This source code is licensed under the ISC license.
44
44
  * See the LICENSE file in the root directory of this source tree.
45
45
  */
46
- const Us = A("ArrowDown", [
46
+ const Us = L("ArrowDown", [
47
47
  ["path", { d: "M12 5v14", key: "s699le" }],
48
48
  ["path", { d: "m19 12-7 7-7-7", key: "1idqje" }]
49
49
  ]);
@@ -53,7 +53,7 @@ const Us = A("ArrowDown", [
53
53
  * This source code is licensed under the ISC license.
54
54
  * See the LICENSE file in the root directory of this source tree.
55
55
  */
56
- const Js = A("ArrowLeft", [
56
+ const Js = L("ArrowLeft", [
57
57
  ["path", { d: "m12 19-7-7 7-7", key: "1l729n" }],
58
58
  ["path", { d: "M19 12H5", key: "x3x0zl" }]
59
59
  ]);
@@ -63,7 +63,7 @@ const Js = A("ArrowLeft", [
63
63
  * This source code is licensed under the ISC license.
64
64
  * See the LICENSE file in the root directory of this source tree.
65
65
  */
66
- const Ws = A("ArrowRight", [
66
+ const Ws = L("ArrowRight", [
67
67
  ["path", { d: "M5 12h14", key: "1ays0h" }],
68
68
  ["path", { d: "m12 5 7 7-7 7", key: "xquz4c" }]
69
69
  ]);
@@ -73,7 +73,7 @@ const Ws = A("ArrowRight", [
73
73
  * This source code is licensed under the ISC license.
74
74
  * See the LICENSE file in the root directory of this source tree.
75
75
  */
76
- const Ks = A("BookOpenText", [
76
+ const Ks = L("BookOpenText", [
77
77
  ["path", { d: "M12 7v14", key: "1akyts" }],
78
78
  ["path", { d: "M16 12h2", key: "7q9ll5" }],
79
79
  ["path", { d: "M16 8h2", key: "msurwy" }],
@@ -93,7 +93,7 @@ const Ks = A("BookOpenText", [
93
93
  * This source code is licensed under the ISC license.
94
94
  * See the LICENSE file in the root directory of this source tree.
95
95
  */
96
- const Qs = A("BookType", [
96
+ const Qs = L("BookType", [
97
97
  ["path", { d: "M10 13h4", key: "ytezjc" }],
98
98
  ["path", { d: "M12 6v7", key: "1f6ttz" }],
99
99
  ["path", { d: "M16 8V6H8v2", key: "x8j6u4" }],
@@ -111,7 +111,7 @@ const Qs = A("BookType", [
111
111
  * This source code is licensed under the ISC license.
112
112
  * See the LICENSE file in the root directory of this source tree.
113
113
  */
114
- const Zs = A("Box", [
114
+ const Zs = L("Box", [
115
115
  [
116
116
  "path",
117
117
  {
@@ -128,7 +128,7 @@ const Zs = A("Box", [
128
128
  * This source code is licensed under the ISC license.
129
129
  * See the LICENSE file in the root directory of this source tree.
130
130
  */
131
- const Xs = A("Braces", [
131
+ const Xs = L("Braces", [
132
132
  [
133
133
  "path",
134
134
  { 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" }
@@ -147,7 +147,7 @@ const Xs = A("Braces", [
147
147
  * This source code is licensed under the ISC license.
148
148
  * See the LICENSE file in the root directory of this source tree.
149
149
  */
150
- const Ys = A("ChartArea", [
150
+ const Ys = L("ChartArea", [
151
151
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
152
152
  [
153
153
  "path",
@@ -163,7 +163,7 @@ const Ys = A("ChartArea", [
163
163
  * This source code is licensed under the ISC license.
164
164
  * See the LICENSE file in the root directory of this source tree.
165
165
  */
166
- const Lt = A("ChartColumnIncreasing", [
166
+ const Lt = L("ChartColumnIncreasing", [
167
167
  ["path", { d: "M13 17V9", key: "1fwyjl" }],
168
168
  ["path", { d: "M18 17V5", key: "sfb6ij" }],
169
169
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
@@ -175,7 +175,7 @@ const Lt = A("ChartColumnIncreasing", [
175
175
  * This source code is licensed under the ISC license.
176
176
  * See the LICENSE file in the root directory of this source tree.
177
177
  */
178
- const $a = A("ChartColumnStacked", [
178
+ const $a = L("ChartColumnStacked", [
179
179
  ["path", { d: "M11 13H7", key: "t0o9gq" }],
180
180
  ["path", { d: "M19 9h-4", key: "rera1j" }],
181
181
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
@@ -188,7 +188,7 @@ const $a = A("ChartColumnStacked", [
188
188
  * This source code is licensed under the ISC license.
189
189
  * See the LICENSE file in the root directory of this source tree.
190
190
  */
191
- const Ft = A("ChartLine", [
191
+ const Ft = L("ChartLine", [
192
192
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
193
193
  ["path", { d: "m19 9-5 5-4-4-3 3", key: "2osh9i" }]
194
194
  ]);
@@ -198,7 +198,7 @@ const Ft = A("ChartLine", [
198
198
  * This source code is licensed under the ISC license.
199
199
  * See the LICENSE file in the root directory of this source tree.
200
200
  */
201
- const Ba = A("ChartNoAxesGantt", [
201
+ const Ba = L("ChartNoAxesGantt", [
202
202
  ["path", { d: "M8 6h10", key: "9lnwnk" }],
203
203
  ["path", { d: "M6 12h9", key: "1g9pqf" }],
204
204
  ["path", { d: "M11 18h7", key: "c8dzvl" }]
@@ -209,7 +209,7 @@ const Ba = A("ChartNoAxesGantt", [
209
209
  * This source code is licensed under the ISC license.
210
210
  * See the LICENSE file in the root directory of this source tree.
211
211
  */
212
- const Ga = A("ChartPie", [
212
+ const Ga = L("ChartPie", [
213
213
  [
214
214
  "path",
215
215
  {
@@ -225,7 +225,7 @@ const Ga = A("ChartPie", [
225
225
  * This source code is licensed under the ISC license.
226
226
  * See the LICENSE file in the root directory of this source tree.
227
227
  */
228
- const Ua = A("ChartScatter", [
228
+ const Ua = L("ChartScatter", [
229
229
  ["circle", { cx: "7.5", cy: "7.5", r: ".5", fill: "currentColor", key: "kqv944" }],
230
230
  ["circle", { cx: "18.5", cy: "5.5", r: ".5", fill: "currentColor", key: "lysivs" }],
231
231
  ["circle", { cx: "11.5", cy: "11.5", r: ".5", fill: "currentColor", key: "byv1b8" }],
@@ -239,7 +239,7 @@ const Ua = A("ChartScatter", [
239
239
  * This source code is licensed under the ISC license.
240
240
  * See the LICENSE file in the root directory of this source tree.
241
241
  */
242
- const el = A("CircleX", [
242
+ const el = L("CircleX", [
243
243
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
244
244
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
245
245
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
@@ -250,7 +250,7 @@ const el = A("CircleX", [
250
250
  * This source code is licensed under the ISC license.
251
251
  * See the LICENSE file in the root directory of this source tree.
252
252
  */
253
- const tl = A("Columns3", [
253
+ const tl = L("Columns3", [
254
254
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
255
255
  ["path", { d: "M9 3v18", key: "fh3hqa" }],
256
256
  ["path", { d: "M15 3v18", key: "14nvp0" }]
@@ -261,7 +261,7 @@ const tl = A("Columns3", [
261
261
  * This source code is licensed under the ISC license.
262
262
  * See the LICENSE file in the root directory of this source tree.
263
263
  */
264
- const al = A("CopyPlus", [
264
+ const al = L("CopyPlus", [
265
265
  ["line", { x1: "15", x2: "15", y1: "12", y2: "18", key: "1p7wdc" }],
266
266
  ["line", { x1: "12", x2: "18", y1: "15", y2: "15", key: "1nscbv" }],
267
267
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
@@ -273,7 +273,7 @@ const al = A("CopyPlus", [
273
273
  * This source code is licensed under the ISC license.
274
274
  * See the LICENSE file in the root directory of this source tree.
275
275
  */
276
- const nl = A("Database", [
276
+ const nl = L("Database", [
277
277
  ["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
278
278
  ["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
279
279
  ["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
@@ -284,7 +284,7 @@ const nl = A("Database", [
284
284
  * This source code is licensed under the ISC license.
285
285
  * See the LICENSE file in the root directory of this source tree.
286
286
  */
287
- const Ja = A("Donut", [
287
+ const Ja = L("Donut", [
288
288
  [
289
289
  "path",
290
290
  {
@@ -300,7 +300,7 @@ const Ja = A("Donut", [
300
300
  * This source code is licensed under the ISC license.
301
301
  * See the LICENSE file in the root directory of this source tree.
302
302
  */
303
- const Wa = A("EllipsisVertical", [
303
+ const Wa = L("EllipsisVertical", [
304
304
  ["circle", { cx: "12", cy: "12", r: "1", key: "41hilf" }],
305
305
  ["circle", { cx: "12", cy: "5", r: "1", key: "gxeob9" }],
306
306
  ["circle", { cx: "12", cy: "19", r: "1", key: "lyex9k" }]
@@ -311,7 +311,7 @@ const Wa = A("EllipsisVertical", [
311
311
  * This source code is licensed under the ISC license.
312
312
  * See the LICENSE file in the root directory of this source tree.
313
313
  */
314
- const sl = A("Eraser", [
314
+ const sl = L("Eraser", [
315
315
  [
316
316
  "path",
317
317
  {
@@ -328,7 +328,7 @@ const sl = A("Eraser", [
328
328
  * This source code is licensed under the ISC license.
329
329
  * See the LICENSE file in the root directory of this source tree.
330
330
  */
331
- const ll = A("EyeClosed", [
331
+ const ll = L("EyeClosed", [
332
332
  ["path", { d: "m15 18-.722-3.25", key: "1j64jw" }],
333
333
  ["path", { d: "M2 8a10.645 10.645 0 0 0 20 0", key: "1e7gxb" }],
334
334
  ["path", { d: "m20 15-1.726-2.05", key: "1cnuld" }],
@@ -341,7 +341,7 @@ const ll = A("EyeClosed", [
341
341
  * This source code is licensed under the ISC license.
342
342
  * See the LICENSE file in the root directory of this source tree.
343
343
  */
344
- const il = A("FileJson2", [
344
+ const il = L("FileJson2", [
345
345
  ["path", { d: "M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4", key: "1pf5j1" }],
346
346
  ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4", key: "tnqrlb" }],
347
347
  [
@@ -359,7 +359,7 @@ const il = A("FileJson2", [
359
359
  * This source code is licensed under the ISC license.
360
360
  * See the LICENSE file in the root directory of this source tree.
361
361
  */
362
- const rl = A("Glasses", [
362
+ const rl = L("Glasses", [
363
363
  ["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
364
364
  ["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
365
365
  ["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
@@ -372,7 +372,7 @@ const rl = A("Glasses", [
372
372
  * This source code is licensed under the ISC license.
373
373
  * See the LICENSE file in the root directory of this source tree.
374
374
  */
375
- const ol = A("Grid3x3", [
375
+ const ol = L("Grid3x3", [
376
376
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
377
377
  ["path", { d: "M3 9h18", key: "1pudct" }],
378
378
  ["path", { d: "M3 15h18", key: "5xshup" }],
@@ -385,7 +385,7 @@ const ol = A("Grid3x3", [
385
385
  * This source code is licensed under the ISC license.
386
386
  * See the LICENSE file in the root directory of this source tree.
387
387
  */
388
- const cl = A("Hammer", [
388
+ const cl = L("Hammer", [
389
389
  ["path", { d: "m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9", key: "eefl8a" }],
390
390
  ["path", { d: "m18 15 4-4", key: "16gjal" }],
391
391
  [
@@ -402,7 +402,7 @@ const cl = A("Hammer", [
402
402
  * This source code is licensed under the ISC license.
403
403
  * See the LICENSE file in the root directory of this source tree.
404
404
  */
405
- const dl = A("Hash", [
405
+ const dl = L("Hash", [
406
406
  ["line", { x1: "4", x2: "20", y1: "9", y2: "9", key: "4lhtct" }],
407
407
  ["line", { x1: "4", x2: "20", y1: "15", y2: "15", key: "vyu0kd" }],
408
408
  ["line", { x1: "10", x2: "8", y1: "3", y2: "21", key: "1ggp8o" }],
@@ -414,7 +414,7 @@ const dl = A("Hash", [
414
414
  * This source code is licensed under the ISC license.
415
415
  * See the LICENSE file in the root directory of this source tree.
416
416
  */
417
- const hl = A("House", [
417
+ const hl = L("House", [
418
418
  ["path", { d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8", key: "5wwlr5" }],
419
419
  [
420
420
  "path",
@@ -430,7 +430,7 @@ const hl = A("House", [
430
430
  * This source code is licensed under the ISC license.
431
431
  * See the LICENSE file in the root directory of this source tree.
432
432
  */
433
- const ul = A("LayoutList", [
433
+ const ul = L("LayoutList", [
434
434
  ["rect", { width: "7", height: "7", x: "3", y: "3", rx: "1", key: "1g98yp" }],
435
435
  ["rect", { width: "7", height: "7", x: "3", y: "14", rx: "1", key: "1bb6yr" }],
436
436
  ["path", { d: "M14 4h7", key: "3xa0d5" }],
@@ -444,7 +444,7 @@ const ul = A("LayoutList", [
444
444
  * This source code is licensed under the ISC license.
445
445
  * See the LICENSE file in the root directory of this source tree.
446
446
  */
447
- const ml = A("ListEnd", [
447
+ const ml = L("ListEnd", [
448
448
  ["path", { d: "M16 12H3", key: "1a2rj7" }],
449
449
  ["path", { d: "M16 6H3", key: "1wxfjs" }],
450
450
  ["path", { d: "M10 18H3", key: "13769t" }],
@@ -457,7 +457,7 @@ const ml = A("ListEnd", [
457
457
  * This source code is licensed under the ISC license.
458
458
  * See the LICENSE file in the root directory of this source tree.
459
459
  */
460
- const pl = A("ListStart", [
460
+ const pl = L("ListStart", [
461
461
  ["path", { d: "M16 12H3", key: "1a2rj7" }],
462
462
  ["path", { d: "M16 18H3", key: "12xzn7" }],
463
463
  ["path", { d: "M10 6H3", key: "lf8lx7" }],
@@ -470,7 +470,7 @@ const pl = A("ListStart", [
470
470
  * This source code is licensed under the ISC license.
471
471
  * See the LICENSE file in the root directory of this source tree.
472
472
  */
473
- const fl = A("ListX", [
473
+ const fl = L("ListX", [
474
474
  ["path", { d: "M11 12H3", key: "51ecnj" }],
475
475
  ["path", { d: "M16 6H3", key: "1wxfjs" }],
476
476
  ["path", { d: "M16 18H3", key: "12xzn7" }],
@@ -483,7 +483,7 @@ const fl = A("ListX", [
483
483
  * This source code is licensed under the ISC license.
484
484
  * See the LICENSE file in the root directory of this source tree.
485
485
  */
486
- const st = A("LoaderCircle", [
486
+ const st = L("LoaderCircle", [
487
487
  ["path", { d: "M21 12a9 9 0 1 1-6.219-8.56", key: "13zald" }]
488
488
  ]);
489
489
  /**
@@ -492,7 +492,7 @@ const st = A("LoaderCircle", [
492
492
  * This source code is licensed under the ISC license.
493
493
  * See the LICENSE file in the root directory of this source tree.
494
494
  */
495
- const gl = A("Logs", [
495
+ const gl = L("Logs", [
496
496
  ["path", { d: "M13 12h8", key: "h98zly" }],
497
497
  ["path", { d: "M13 18h8", key: "oe0vm4" }],
498
498
  ["path", { d: "M13 6h8", key: "15sg57" }],
@@ -509,7 +509,7 @@ const gl = A("Logs", [
509
509
  * This source code is licensed under the ISC license.
510
510
  * See the LICENSE file in the root directory of this source tree.
511
511
  */
512
- const Ka = A("Map", [
512
+ const Ka = L("Map", [
513
513
  [
514
514
  "path",
515
515
  {
@@ -526,7 +526,7 @@ const Ka = A("Map", [
526
526
  * This source code is licensed under the ISC license.
527
527
  * See the LICENSE file in the root directory of this source tree.
528
528
  */
529
- const yl = A("MessageSquareMore", [
529
+ const yl = L("MessageSquareMore", [
530
530
  ["path", { d: "M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z", key: "1lielz" }],
531
531
  ["path", { d: "M8 10h.01", key: "19clt8" }],
532
532
  ["path", { d: "M12 10h.01", key: "1nrarc" }],
@@ -538,7 +538,7 @@ const yl = A("MessageSquareMore", [
538
538
  * This source code is licensed under the ISC license.
539
539
  * See the LICENSE file in the root directory of this source tree.
540
540
  */
541
- const bl = A("MoveHorizontal", [
541
+ const bl = L("MoveHorizontal", [
542
542
  ["path", { d: "m18 8 4 4-4 4", key: "1ak13k" }],
543
543
  ["path", { d: "M2 12h20", key: "9i4pu4" }],
544
544
  ["path", { d: "m6 8-4 4 4 4", key: "15zrgr" }]
@@ -549,7 +549,7 @@ const bl = A("MoveHorizontal", [
549
549
  * This source code is licensed under the ISC license.
550
550
  * See the LICENSE file in the root directory of this source tree.
551
551
  */
552
- const xl = A("MoveVertical", [
552
+ const xl = L("MoveVertical", [
553
553
  ["path", { d: "M12 2v20", key: "t6zp3m" }],
554
554
  ["path", { d: "m8 18 4 4 4-4", key: "bh5tu3" }],
555
555
  ["path", { d: "m8 6 4-4 4 4", key: "ybng9g" }]
@@ -560,7 +560,7 @@ const xl = A("MoveVertical", [
560
560
  * This source code is licensed under the ISC license.
561
561
  * See the LICENSE file in the root directory of this source tree.
562
562
  */
563
- const vl = A("Network", [
563
+ const vl = L("Network", [
564
564
  ["rect", { x: "16", y: "16", width: "6", height: "6", rx: "1", key: "4q2zg0" }],
565
565
  ["rect", { x: "2", y: "16", width: "6", height: "6", rx: "1", key: "8cvhb9" }],
566
566
  ["rect", { x: "9", y: "2", width: "6", height: "6", rx: "1", key: "1egb70" }],
@@ -573,7 +573,7 @@ const vl = A("Network", [
573
573
  * This source code is licensed under the ISC license.
574
574
  * See the LICENSE file in the root directory of this source tree.
575
575
  */
576
- const Nl = A("Plug2", [
576
+ const Nl = L("Plug2", [
577
577
  ["path", { d: "M9 2v6", key: "17ngun" }],
578
578
  ["path", { d: "M15 2v6", key: "s7yy2p" }],
579
579
  ["path", { d: "M12 17v5", key: "bb1du9" }],
@@ -586,7 +586,7 @@ const Nl = A("Plug2", [
586
586
  * This source code is licensed under the ISC license.
587
587
  * See the LICENSE file in the root directory of this source tree.
588
588
  */
589
- const Qa = A("Radar", [
589
+ const Qa = L("Radar", [
590
590
  ["path", { d: "M19.07 4.93A10 10 0 0 0 6.99 3.34", key: "z3du51" }],
591
591
  ["path", { d: "M4 6h.01", key: "oypzma" }],
592
592
  ["path", { d: "M2.29 9.62A10 10 0 1 0 21.31 8.35", key: "qzzz0" }],
@@ -602,7 +602,7 @@ const Qa = A("Radar", [
602
602
  * This source code is licensed under the ISC license.
603
603
  * See the LICENSE file in the root directory of this source tree.
604
604
  */
605
- const Za = A("RefreshCw", [
605
+ const Za = L("RefreshCw", [
606
606
  ["path", { d: "M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8", key: "v9h5vc" }],
607
607
  ["path", { d: "M21 3v5h-5", key: "1q7to0" }],
608
608
  ["path", { d: "M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16", key: "3uifl3" }],
@@ -614,7 +614,7 @@ const Za = A("RefreshCw", [
614
614
  * This source code is licensed under the ISC license.
615
615
  * See the LICENSE file in the root directory of this source tree.
616
616
  */
617
- const Cl = A("Rows3", [
617
+ const Cl = L("Rows3", [
618
618
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }],
619
619
  ["path", { d: "M21 9H3", key: "1338ky" }],
620
620
  ["path", { d: "M21 15H3", key: "9uk58r" }]
@@ -625,7 +625,7 @@ const Cl = A("Rows3", [
625
625
  * This source code is licensed under the ISC license.
626
626
  * See the LICENSE file in the root directory of this source tree.
627
627
  */
628
- const Sl = A("Ruler", [
628
+ const Sl = L("Ruler", [
629
629
  [
630
630
  "path",
631
631
  {
@@ -644,7 +644,7 @@ const Sl = A("Ruler", [
644
644
  * This source code is licensed under the ISC license.
645
645
  * See the LICENSE file in the root directory of this source tree.
646
646
  */
647
- const kl = A("Save", [
647
+ const kl = L("Save", [
648
648
  [
649
649
  "path",
650
650
  {
@@ -661,7 +661,7 @@ const kl = A("Save", [
661
661
  * This source code is licensed under the ISC license.
662
662
  * See the LICENSE file in the root directory of this source tree.
663
663
  */
664
- const Xa = A("Shapes", [
664
+ const Xa = L("Shapes", [
665
665
  [
666
666
  "path",
667
667
  {
@@ -678,7 +678,7 @@ const Xa = A("Shapes", [
678
678
  * This source code is licensed under the ISC license.
679
679
  * See the LICENSE file in the root directory of this source tree.
680
680
  */
681
- const wl = A("ShieldQuestion", [
681
+ const wl = L("ShieldQuestion", [
682
682
  [
683
683
  "path",
684
684
  {
@@ -695,7 +695,7 @@ const wl = A("ShieldQuestion", [
695
695
  * This source code is licensed under the ISC license.
696
696
  * See the LICENSE file in the root directory of this source tree.
697
697
  */
698
- const Ml = A("Sigma", [
698
+ const Ml = L("Sigma", [
699
699
  [
700
700
  "path",
701
701
  {
@@ -710,7 +710,7 @@ const Ml = A("Sigma", [
710
710
  * This source code is licensed under the ISC license.
711
711
  * See the LICENSE file in the root directory of this source tree.
712
712
  */
713
- const Ol = A("Square", [
713
+ const Ol = L("Square", [
714
714
  ["rect", { width: "18", height: "18", x: "3", y: "3", rx: "2", key: "afitv7" }]
715
715
  ]);
716
716
  /**
@@ -719,7 +719,7 @@ const Ol = A("Square", [
719
719
  * This source code is licensed under the ISC license.
720
720
  * See the LICENSE file in the root directory of this source tree.
721
721
  */
722
- const Et = A("Table2", [
722
+ const Et = L("Table2", [
723
723
  [
724
724
  "path",
725
725
  {
@@ -734,7 +734,7 @@ const Et = A("Table2", [
734
734
  * This source code is licensed under the ISC license.
735
735
  * See the LICENSE file in the root directory of this source tree.
736
736
  */
737
- const Il = A("Tag", [
737
+ const Il = L("Tag", [
738
738
  [
739
739
  "path",
740
740
  {
@@ -750,7 +750,7 @@ const Il = A("Tag", [
750
750
  * This source code is licensed under the ISC license.
751
751
  * See the LICENSE file in the root directory of this source tree.
752
752
  */
753
- const zl = A("TicketX", [
753
+ const zl = L("TicketX", [
754
754
  [
755
755
  "path",
756
756
  {
@@ -767,7 +767,7 @@ const zl = A("TicketX", [
767
767
  * This source code is licensed under the ISC license.
768
768
  * See the LICENSE file in the root directory of this source tree.
769
769
  */
770
- const Dl = A("ToggleLeft", [
770
+ const Dl = L("ToggleLeft", [
771
771
  ["rect", { width: "20", height: "12", x: "2", y: "6", rx: "6", ry: "6", key: "f2vt7d" }],
772
772
  ["circle", { cx: "8", cy: "12", r: "2", key: "1nvbw3" }]
773
773
  ]);
@@ -777,7 +777,7 @@ const Dl = A("ToggleLeft", [
777
777
  * This source code is licensed under the ISC license.
778
778
  * See the LICENSE file in the root directory of this source tree.
779
779
  */
780
- const Ya = A("Tornado", [
780
+ const Ya = L("Tornado", [
781
781
  ["path", { d: "M21 4H3", key: "1hwok0" }],
782
782
  ["path", { d: "M18 8H6", key: "41n648" }],
783
783
  ["path", { d: "M19 12H9", key: "1g4lpz" }],
@@ -790,7 +790,7 @@ const Ya = A("Tornado", [
790
790
  * This source code is licensed under the ISC license.
791
791
  * See the LICENSE file in the root directory of this source tree.
792
792
  */
793
- const en = A("Type", [
793
+ const en = L("Type", [
794
794
  ["polyline", { points: "4 7 4 4 20 4 20 7", key: "1nosan" }],
795
795
  ["line", { x1: "9", x2: "15", y1: "20", y2: "20", key: "swin9y" }],
796
796
  ["line", { x1: "12", x2: "12", y1: "4", y2: "20", key: "1tx1rr" }]
@@ -879,7 +879,7 @@ async function Fl(t, n) {
879
879
  }) : null;
880
880
  }
881
881
  function El() {
882
- const [t, n] = P(""), [a, l] = P(!1), i = T((x) => x.lenses), { setLenses: r, setSelectedLensId: o } = Be(), [c, d] = P(!1), [g, h] = P(!1), y = T((x) => x.dashboard), f = T((x) => x.filterValues), { authToken: m } = ze();
882
+ const [t, n] = P(""), [a, l] = P(!1), i = A((x) => x.lenses), { setLenses: r, setSelectedLensId: o } = Be(), [c, d] = P(!1), [g, h] = P(!1), y = A((x) => x.dashboard), f = A((x) => x.filterValues), { authToken: m } = ze();
883
883
  async function b() {
884
884
  d(!0);
885
885
  const x = tn(
@@ -911,7 +911,7 @@ function El() {
911
911
  /* @__PURE__ */ e(la, { children: "Lenses are private by default and are only visible to you." })
912
912
  ] }),
913
913
  /* @__PURE__ */ e("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ s("div", { className: "grid grid-cols-8 items-center gap-4", children: [
914
- /* @__PURE__ */ e(U, { className: "text-right", children: "Name" }),
914
+ /* @__PURE__ */ e(G, { className: "text-right", children: "Name" }),
915
915
  /* @__PURE__ */ e(
916
916
  me,
917
917
  {
@@ -940,7 +940,7 @@ function El() {
940
940
  ] });
941
941
  }
942
942
  function Vl() {
943
- const [t, n] = P(!1), a = T((h) => h.lenses), l = T((h) => h.selectedLensId), { setLenses: i, setSelectedLensId: r } = Be(), { authToken: o } = ze();
943
+ const [t, n] = P(!1), a = A((h) => h.lenses), l = A((h) => h.selectedLensId), { setLenses: i, setSelectedLensId: r } = Be(), { authToken: o } = ze();
944
944
  async function c(h) {
945
945
  r(h);
946
946
  }
@@ -1032,13 +1032,13 @@ function Vl() {
1032
1032
  }
1033
1033
  async function ql() {
1034
1034
  var m;
1035
- const t = T.getState().authToken, n = T.getState().theme, a = T.getState().filterValues, l = (m = T.getState().dashboard) == null ? void 0 : m.title, i = T.getState().isDownloadingPdf, r = T.getState().selectedSheetId;
1035
+ const t = A.getState().authToken, n = A.getState().theme, a = A.getState().filterValues, l = (m = A.getState().dashboard) == null ? void 0 : m.title, i = A.getState().isDownloadingPdf, r = A.getState().selectedSheetId;
1036
1036
  if (i)
1037
1037
  return;
1038
1038
  const o = new URLSearchParams();
1039
1039
  o.set("token", (t == null ? void 0 : t.accessToken) || ""), o.set("theme", n || "light"), o.set("filterValues", JSON.stringify(a)), o.set("selectedSheetId", r || "");
1040
1040
  const c = `https://semaphor.cloud/api/v1/generate-pdf?params=${encodeURIComponent(o.toString())}`;
1041
- T.setState({ isDownloadingPdf: !0 });
1041
+ A.setState({ isDownloadingPdf: !0 });
1042
1042
  const h = (await (await fetch(c, {
1043
1043
  method: "GET",
1044
1044
  headers: {
@@ -1047,17 +1047,17 @@ async function ql() {
1047
1047
  })).json()).url, y = document.createElement("a");
1048
1048
  y.href = h;
1049
1049
  const f = `${l}-${(/* @__PURE__ */ new Date()).toISOString()}.pdf`;
1050
- y.download = f, y.click(), T.setState({ isDownloadingPdf: !1 });
1050
+ y.download = f, y.click(), A.setState({ isDownloadingPdf: !1 });
1051
1051
  }
1052
1052
  function Rl({
1053
1053
  iconClassName: t
1054
1054
  }) {
1055
1055
  const { authToken: n } = ze();
1056
- T((i) => {
1056
+ A((i) => {
1057
1057
  var r;
1058
1058
  return (r = i.dashboard) == null ? void 0 : r.title;
1059
- }), T((i) => i.theme), T((i) => i.filterValues);
1060
- const a = T((i) => i.isDownloadingPdf);
1059
+ }), A((i) => i.theme), A((i) => i.filterValues);
1060
+ const a = A((i) => i.isDownloadingPdf);
1061
1061
  async function l() {
1062
1062
  await ql();
1063
1063
  }
@@ -1080,25 +1080,25 @@ function Rl({
1080
1080
  }
1081
1081
  function jl() {
1082
1082
  const { authToken: t } = ze();
1083
- T((p) => p.theme);
1084
- const n = T((p) => p.lenses), a = T((p) => p.selectedLensId), l = n == null ? void 0 : n.find((p) => p.id === a), i = T((p) => p.dashboard);
1085
- T((p) => p.selectedSheetId);
1086
- const r = T(
1083
+ A((p) => p.theme);
1084
+ const n = A((p) => p.lenses), a = A((p) => p.selectedLensId), l = n == null ? void 0 : n.find((p) => p.id === a), i = A((p) => p.dashboard);
1085
+ A((p) => p.selectedSheetId);
1086
+ const r = A(
1087
1087
  (p) => p.isDashboardEditing
1088
1088
  ), o = u(
1089
1089
  (p) => p.selectedConnectionId
1090
- ), [c, d] = P(!1), g = T((p) => p.filterValues), h = T((p) => p.isVisualEditing), y = T((p) => p.showFilters);
1091
- T(
1090
+ ), [c, d] = P(!1), g = A((p) => p.filterValues), h = A((p) => p.isVisualEditing), y = A((p) => p.showFilters);
1091
+ A(
1092
1092
  (p) => p.showDashboardJSON
1093
1093
  );
1094
- const f = T((p) => p.onSaveFunction), m = T(
1094
+ const f = A((p) => p.onSaveFunction), m = A(
1095
1095
  (p) => p.actions.setShowFilters
1096
- ), { addFrame: b, setSelectedFrameId: x } = T(
1096
+ ), { addFrame: b, setSelectedFrameId: x } = A(
1097
1097
  (p) => p.actions
1098
- ), { getSelectedSheet: N, setIsDashboardEditing: v, setShowDashboardJSON: O } = T((p) => p.actions), S = N(), { tenantId: z, endUserId: D } = Mt(
1098
+ ), { getSelectedSheet: N, setIsDashboardEditing: v, setShowDashboardJSON: M } = A((p) => p.actions), S = N(), { tenantId: z, endUserId: D } = Mt(
1099
1099
  () => Cn(t == null ? void 0 : t.accessToken),
1100
1100
  [t == null ? void 0 : t.accessToken]
1101
- ), q = Mt(() => z || D, [z, D]), $ = () => {
1101
+ ), R = Mt(() => z || D, [z, D]), $ = () => {
1102
1102
  if (!r || !S) return;
1103
1103
  const p = {
1104
1104
  connectionId: o,
@@ -1116,25 +1116,25 @@ function jl() {
1116
1116
  type: "bar",
1117
1117
  sql: "select COUNT(*) from YOUR_TABLE",
1118
1118
  data: []
1119
- }, L = {
1119
+ }, T = {
1120
1120
  id: et(),
1121
1121
  cards: [p],
1122
1122
  activeCardId: p.id
1123
1123
  };
1124
- b(S.id, L), x(L.id);
1124
+ b(S.id, T), x(T.id);
1125
1125
  }, H = () => {
1126
1126
  v(!0);
1127
1127
  };
1128
- async function J() {
1128
+ async function U() {
1129
1129
  if (d(!0), !a || !l) return;
1130
1130
  const p = tn(
1131
1131
  i
1132
- ), L = JSON.stringify(p), B = {
1132
+ ), T = JSON.stringify(p), J = {
1133
1133
  ...l,
1134
- template: L,
1134
+ template: T,
1135
1135
  filterValues: g
1136
1136
  };
1137
- await Ot(B, t == null ? void 0 : t.accessToken), dt.success("Lens saved"), f == null || f(p), d(!1);
1137
+ await Ot(J, t == null ? void 0 : t.accessToken), dt.success("Lens saved"), f == null || f(p), d(!1);
1138
1138
  }
1139
1139
  return h ? null : /* @__PURE__ */ s(
1140
1140
  "div",
@@ -1142,12 +1142,12 @@ function jl() {
1142
1142
  className: "flex items-center justify-between gap-2 border-b bg-muted/50 py-2 pl-3 pr-2",
1143
1143
  role: "dashboard-controls",
1144
1144
  children: [
1145
- !h && /* @__PURE__ */ e("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ e(U, { children: l == null ? void 0 : l.name }) }),
1145
+ !h && /* @__PURE__ */ e("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ e(G, { children: l == null ? void 0 : l.name }) }),
1146
1146
  /* @__PURE__ */ s("div", { className: "flex gap-2", children: [
1147
1147
  /* @__PURE__ */ e("button", { onClick: Sn, children: /* @__PURE__ */ e(zl, { className: "h-4 w-4", strokeWidth: 1.5 }) }),
1148
1148
  /* @__PURE__ */ e(Rl, {}),
1149
- r && !h && q && /* @__PURE__ */ e(El, {}),
1150
- !h && q && /* @__PURE__ */ e(Vl, {}),
1149
+ r && !h && R && /* @__PURE__ */ e(El, {}),
1150
+ !h && R && /* @__PURE__ */ e(Vl, {}),
1151
1151
  r && !h && /* @__PURE__ */ s(
1152
1152
  _,
1153
1153
  {
@@ -1179,19 +1179,19 @@ function jl() {
1179
1179
  role: "close",
1180
1180
  className: "h-7 p-2",
1181
1181
  onClick: () => {
1182
- v(!1), O(!1);
1182
+ v(!1), M(!1);
1183
1183
  },
1184
1184
  size: "sm",
1185
1185
  children: /* @__PURE__ */ e(ft, { className: "h-4 w-4", strokeWidth: 1.5 })
1186
1186
  }
1187
1187
  ),
1188
- r && !h && q && /* @__PURE__ */ e(
1188
+ r && !h && R && /* @__PURE__ */ e(
1189
1189
  _,
1190
1190
  {
1191
1191
  className: "h-7 p-2",
1192
1192
  variant: "ghost",
1193
1193
  disabled: c,
1194
- onClick: J,
1194
+ onClick: U,
1195
1195
  size: "sm",
1196
1196
  children: /* @__PURE__ */ e(kl, { className: "h-4 w-4", strokeWidth: 1.5 })
1197
1197
  }
@@ -1230,10 +1230,10 @@ function _l({
1230
1230
  }, []);
1231
1231
  function x() {
1232
1232
  var v;
1233
- return i ? "Loading..." : r ? "Error" : a ? (v = n == null ? void 0 : n.find((O) => O.id === a)) == null ? void 0 : v.name : `Select ${t}`;
1233
+ return i ? "Loading..." : r ? "Error" : a ? (v = n == null ? void 0 : n.find((M) => M.id === a)) == null ? void 0 : v.name : `Select ${t}`;
1234
1234
  }
1235
- function N(v, O) {
1236
- l(O), y(!1);
1235
+ function N(v, M) {
1236
+ l(M), y(!1);
1237
1237
  }
1238
1238
  return /* @__PURE__ */ s(Ge, { open: h, onOpenChange: y, children: [
1239
1239
  /* @__PURE__ */ e(Ue, { asChild: !0, children: /* @__PURE__ */ s(
@@ -1282,7 +1282,7 @@ function _l({
1282
1282
  {
1283
1283
  className: "overflow-x-auto",
1284
1284
  value: v.name,
1285
- onSelect: (O) => N(O, v.id),
1285
+ onSelect: (M) => N(M, v.id),
1286
1286
  children: /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
1287
1287
  /* @__PURE__ */ e(
1288
1288
  va,
@@ -1365,7 +1365,7 @@ function Ze({
1365
1365
  ] }),
1366
1366
  /* @__PURE__ */ s(ae, { children: [
1367
1367
  d && /* @__PURE__ */ e(se, { value: "none", children: "None" }, "none"),
1368
- n && n.map((v, O) => /* @__PURE__ */ e(se, { value: v.id, children: v.name }, O))
1368
+ n && n.map((v, M) => /* @__PURE__ */ e(se, { value: v.id, children: v.name }, M))
1369
1369
  ] }),
1370
1370
  (l || i) && /* @__PURE__ */ e(se, { value: m, children: m })
1371
1371
  ] }) })
@@ -1407,14 +1407,14 @@ function Hl({ column: t }) {
1407
1407
  (z) => z.id === r
1408
1408
  )) == null ? void 0 : S.name;
1409
1409
  g(N);
1410
- const O = Oa(
1410
+ const M = Oa(
1411
1411
  N,
1412
1412
  ye(i || ""),
1413
1413
  ye(l),
1414
1414
  v,
1415
1415
  d
1416
1416
  );
1417
- O && (h(O), y(!0)), a(!1);
1417
+ M && (h(M), y(!0)), a(!1);
1418
1418
  }
1419
1419
  function m() {
1420
1420
  return /* @__PURE__ */ s("ul", { className: "text-xs", children: [
@@ -1492,27 +1492,27 @@ function Pl({
1492
1492
  (p) => p.selectedSchemaName
1493
1493
  ), d = u((p) => p.selectedTableName), g = u(
1494
1494
  (p) => p.selectedDatamodelId
1495
- ), h = T(
1495
+ ), h = A(
1496
1496
  (p) => p.dashboard.aiScopeTables
1497
- ), { addToAIScope: y, removeFromAIScope: f } = Be(), { setAIScopeTables: m } = T((p) => p.actions), b = u((p) => p.actions.setRunSql), x = u((p) => p.actions.setSqlGen), N = u(
1497
+ ), { addToAIScope: y, removeFromAIScope: f } = Be(), { setAIScopeTables: m } = A((p) => p.actions), b = u((p) => p.actions.setRunSql), x = u((p) => p.actions.setSqlGen), N = u(
1498
1498
  (p) => p.actions.setIsShowingVisual
1499
- ), v = u((p) => p.actions.setCardSql), { connectionType: O, modelItems: S, selectedDatamodelName: z } = Ve();
1499
+ ), v = u((p) => p.actions.setCardSql), { connectionType: M, modelItems: S, selectedDatamodelName: z } = Ve();
1500
1500
  function D(p) {
1501
- var G;
1502
- const L = Ma(p, i);
1503
- x(L);
1504
- const B = (G = S == null ? void 0 : S.find(
1501
+ var B;
1502
+ const T = Ma(p, i);
1503
+ x(T);
1504
+ const J = (B = S == null ? void 0 : S.find(
1505
1505
  (C) => C.id === g
1506
- )) == null ? void 0 : G.name, V = Oa(
1507
- L,
1506
+ )) == null ? void 0 : B.name, V = Oa(
1507
+ T,
1508
1508
  ye(t),
1509
1509
  ye(n),
1510
- B,
1511
- O
1510
+ J,
1511
+ M
1512
1512
  );
1513
1513
  V && (v(V), b(!0));
1514
1514
  }
1515
- function q() {
1515
+ function R() {
1516
1516
  return (h == null ? void 0 : h.find(
1517
1517
  (p) => p.connectionId === r && (p.tableName === d || p.datamodelName === z)
1518
1518
  )) !== void 0;
@@ -1520,7 +1520,7 @@ function Pl({
1520
1520
  function $(p) {
1521
1521
  p === !0 && (d || z) && r ? (y({
1522
1522
  connectionId: r,
1523
- connectionType: O === "S3" || O === "API" ? "DuckDb" : O,
1523
+ connectionType: M === "S3" || M === "API" ? "DuckDb" : M,
1524
1524
  databaseName: o || "",
1525
1525
  schemaName: c || "",
1526
1526
  tableName: d || "",
@@ -1532,7 +1532,7 @@ function Pl({
1532
1532
  richColors: !0
1533
1533
  })) : (f({
1534
1534
  connectionId: r || "",
1535
- connectionType: O || "",
1535
+ connectionType: M || "",
1536
1536
  tableName: d || "",
1537
1537
  datamodelName: ht(z),
1538
1538
  datamodelId: g || "",
@@ -1549,18 +1549,18 @@ function Pl({
1549
1549
  schemaName: t,
1550
1550
  tableName: n,
1551
1551
  modelName: z,
1552
- connectionType: O
1552
+ connectionType: M
1553
1553
  });
1554
1554
  N(!1);
1555
- const L = O === "MSSQL" ? `SELECT top 10 * FROM ${p}` : `SELECT * FROM ${p} LIMIT 10`;
1556
- v(L), b(!0);
1555
+ const T = M === "MSSQL" ? `SELECT top 10 * FROM ${p}` : `SELECT * FROM ${p} LIMIT 10`;
1556
+ v(T), b(!0);
1557
1557
  }
1558
- function J() {
1558
+ function U() {
1559
1559
  const p = Ct({
1560
1560
  schemaName: t,
1561
1561
  tableName: n,
1562
1562
  modelName: z,
1563
- connectionType: O
1563
+ connectionType: M
1564
1564
  });
1565
1565
  v(`SELECT COUNT(*) as count FROM ${p}`), b(!0);
1566
1566
  }
@@ -1569,8 +1569,8 @@ function Pl({
1569
1569
  /* @__PURE__ */ s(
1570
1570
  za,
1571
1571
  {
1572
- title: `${q() ? "Remove from" : "Add to"} Assistant Scope`,
1573
- pressed: q(),
1572
+ title: `${R() ? "Remove from" : "Add to"} Assistant Scope`,
1573
+ pressed: R(),
1574
1574
  onPressedChange: $,
1575
1575
  variant: "outline",
1576
1576
  className: X("h-9 px-2", {
@@ -1581,8 +1581,8 @@ function Pl({
1581
1581
  lt,
1582
1582
  {
1583
1583
  className: X("mr-1 size-4", {
1584
- "text-green-400": q(),
1585
- "text-muted-foreground": !q()
1584
+ "text-green-400": R(),
1585
+ "text-muted-foreground": !R()
1586
1586
  })
1587
1587
  }
1588
1588
  ),
@@ -1608,7 +1608,7 @@ function Pl({
1608
1608
  _,
1609
1609
  {
1610
1610
  disabled: l !== "Success",
1611
- onClick: J,
1611
+ onClick: U,
1612
1612
  size: "sm",
1613
1613
  variant: "secondary",
1614
1614
  className: "w-full",
@@ -1642,7 +1642,7 @@ function Pl({
1642
1642
  /* @__PURE__ */ e(
1643
1643
  "div",
1644
1644
  {
1645
- onClick: (L) => L.stopPropagation(),
1645
+ onClick: (T) => T.stopPropagation(),
1646
1646
  className: "flex items-center justify-end",
1647
1647
  children: Ia(p.data_type) && /* @__PURE__ */ e(Hl, { column: p })
1648
1648
  }
@@ -1662,38 +1662,38 @@ function Ve(t, n) {
1662
1662
  var qt, Rt, jt, _t, Ht, Pt;
1663
1663
  let a = Mt(() => [], []);
1664
1664
  const l = ze().authToken || t, i = u(
1665
- (w) => w.selectedConnectionId
1665
+ (k) => k.selectedConnectionId
1666
1666
  ), r = u(
1667
- (w) => w.selectedDatamodelId
1667
+ (k) => k.selectedDatamodelId
1668
1668
  ), o = u(
1669
- (w) => w.selectedDatabaseName
1669
+ (k) => k.selectedDatabaseName
1670
1670
  ), c = u(
1671
- (w) => w.selectedSchemaName
1672
- ), d = u((w) => w.selectedTableName), g = u(
1673
- (w) => w.actions.setCurrentColumns
1671
+ (k) => k.selectedSchemaName
1672
+ ), d = u((k) => k.selectedTableName), g = u(
1673
+ (k) => k.actions.setCurrentColumns
1674
1674
  ), h = u(
1675
- (w) => w.actions.setSelectedConnectionId
1675
+ (k) => k.actions.setSelectedConnectionId
1676
1676
  ), y = u(
1677
- (w) => w.actions.setSelectedDatamodelId
1677
+ (k) => k.actions.setSelectedDatamodelId
1678
1678
  ), f = u(
1679
- (w) => w.actions.setSelectedDatabaseName
1679
+ (k) => k.actions.setSelectedDatabaseName
1680
1680
  ), m = u(
1681
- (w) => w.actions.setSelectedSchemaName
1681
+ (k) => k.actions.setSelectedSchemaName
1682
1682
  ), b = u(
1683
- (w) => w.actions.setSelectedTableName
1683
+ (k) => k.actions.setSelectedTableName
1684
1684
  );
1685
- u((w) => w.actions.setCardSql);
1686
- function x(w) {
1687
- return i && o && c && o !== "NA" ? !0 : i && w === "API" ? !1 : !!(i && w === "S3");
1685
+ u((k) => k.actions.setCardSql);
1686
+ function x(k) {
1687
+ return i && o && c && o !== "NA" ? !0 : i && k === "API" ? !1 : !!(i && k === "S3");
1688
1688
  }
1689
- function N(w) {
1690
- return !!(i && o && o !== "NA" && c && d || i && (w === "S3" || w === "API") || r && r);
1689
+ function N(k) {
1690
+ return !!(i && o && o !== "NA" && c && d || i && (k === "S3" || k === "API") || r && r);
1691
1691
  }
1692
- function v(w) {
1693
- return i && w ? !(w === "API" || w === "S3") : !1;
1692
+ function v(k) {
1693
+ return i && k ? !(k === "API" || k === "S3") : !1;
1694
1694
  }
1695
1695
  const {
1696
- refetch: O,
1696
+ refetch: M,
1697
1697
  data: S,
1698
1698
  isLoading: z,
1699
1699
  isError: D
@@ -1706,10 +1706,10 @@ function Ve(t, n) {
1706
1706
  enabled: !!(l != null && l.accessToken)
1707
1707
  // Only fetch if authToken is present
1708
1708
  }), {
1709
- refetch: q,
1709
+ refetch: R,
1710
1710
  data: $,
1711
1711
  isLoading: H,
1712
- isError: J
1712
+ isError: U
1713
1713
  } = Le({
1714
1714
  queryKey: ["models", i],
1715
1715
  queryFn: () => je(
@@ -1722,13 +1722,13 @@ function Ve(t, n) {
1722
1722
  enabled: !!(l != null && l.accessToken) && !!i
1723
1723
  // Only fetch if authToken is present
1724
1724
  }), p = S == null ? void 0 : S.connections.find(
1725
- (w) => w.id === i
1726
- ), L = p == null ? void 0 : p.type, B = (p == null ? void 0 : p.type) === "API" || (p == null ? void 0 : p.type) === "S3", {
1725
+ (k) => k.id === i
1726
+ ), T = p == null ? void 0 : p.type, J = (p == null ? void 0 : p.type) === "API" || (p == null ? void 0 : p.type) === "S3", {
1727
1727
  data: V,
1728
- isLoading: G,
1728
+ isLoading: B,
1729
1729
  isFetching: C,
1730
1730
  isError: E,
1731
- refetch: j
1731
+ refetch: O
1732
1732
  } = Le({
1733
1733
  queryKey: ["databases", i],
1734
1734
  queryFn: () => je(
@@ -1738,14 +1738,14 @@ function Ve(t, n) {
1738
1738
  connection_id: i
1739
1739
  }
1740
1740
  ),
1741
- enabled: v(L)
1741
+ enabled: v(T)
1742
1742
  // !!selectedConnectionId && !isNonDbConnection, //currentConnection?.type !== 'API', // Only fetch if connectionId is present
1743
1743
  }), {
1744
- data: k,
1744
+ data: q,
1745
1745
  isLoading: Q,
1746
1746
  isFetching: le,
1747
1747
  isError: oe,
1748
- refetch: R
1748
+ refetch: j
1749
1749
  } = Le({
1750
1750
  queryKey: ["schemas", i, o],
1751
1751
  queryFn: () => je(
@@ -1756,12 +1756,12 @@ function Ve(t, n) {
1756
1756
  database_name: o
1757
1757
  }
1758
1758
  ),
1759
- enabled: !!i && !!o && !B && o !== "NA"
1759
+ enabled: !!i && !!o && !J && o !== "NA"
1760
1760
  //currentConnection?.type !== 'API', // Only fetch if connectionId and database is present
1761
1761
  }), {
1762
1762
  data: F,
1763
1763
  isLoading: ie,
1764
- isFetching: M,
1764
+ isFetching: w,
1765
1765
  isError: W,
1766
1766
  refetch: de
1767
1767
  } = Le({
@@ -1780,7 +1780,7 @@ function Ve(t, n) {
1780
1780
  schema_name: c
1781
1781
  }
1782
1782
  ),
1783
- enabled: x(L)
1783
+ enabled: x(T)
1784
1784
  }), {
1785
1785
  data: ce,
1786
1786
  isLoading: ke,
@@ -1808,7 +1808,7 @@ function Ve(t, n) {
1808
1808
  table_name: d
1809
1809
  }
1810
1810
  ),
1811
- enabled: N(L)
1811
+ enabled: N(T)
1812
1812
  // (!!selectedConnectionId &&
1813
1813
  // !!selectedDatabaseName &&
1814
1814
  // !!selectedSchemaName &&
@@ -1820,51 +1820,51 @@ function Ve(t, n) {
1820
1820
  re(() => {
1821
1821
  g(a);
1822
1822
  }, [ce, g, a]), re(() => {
1823
- (L === "S3" || L === "API") && (f(""), m(""), y(""), L === "API" && b("api"));
1823
+ (T === "S3" || T === "API") && (f(""), m(""), y(""), T === "API" && b("api"));
1824
1824
  }, [
1825
- L,
1825
+ T,
1826
1826
  b,
1827
1827
  f,
1828
1828
  m,
1829
1829
  y
1830
1830
  ]);
1831
- const Re = (p == null ? void 0 : p.type) === "API" ? (qt = p == null ? void 0 : p.type) == null ? void 0 : qt.toLowerCase() : d || "", De = B ? "" : c || "";
1832
- function Te(w) {
1833
- m(w), b("");
1831
+ const Re = (p == null ? void 0 : p.type) === "API" ? (qt = p == null ? void 0 : p.type) == null ? void 0 : qt.toLowerCase() : d || "", De = J ? "" : c || "";
1832
+ function Te(k) {
1833
+ m(k), b("");
1834
1834
  }
1835
- function I(w) {
1836
- f(w === "none" ? "" : w), m(""), b(""), w !== "none" && w !== "" && y("");
1835
+ function I(k) {
1836
+ f(k === "none" ? "" : k), m(""), b(""), k !== "none" && k !== "" && y("");
1837
1837
  }
1838
- function ue(w) {
1839
- h(w);
1838
+ function ue(k) {
1839
+ h(k);
1840
1840
  }
1841
- function Ae(w) {
1842
- y(w === "none" ? "" : w), w !== "none" && w !== "" && f("");
1841
+ function Ae(k) {
1842
+ y(k === "none" ? "" : k), k !== "none" && k !== "" && f("");
1843
1843
  }
1844
- V && ((Rt = V == null ? void 0 : V.databases) == null ? void 0 : Rt.length) > 0, k && ((jt = k == null ? void 0 : k.schemas) == null ? void 0 : jt.length) > 0, ce && ((_t = ce == null ? void 0 : ce.columns) == null ? void 0 : _t.length) > 0 && (a = ce.columns.map((w) => ({
1845
- ...w,
1846
- data_type: w.data_type.toLowerCase()
1844
+ V && ((Rt = V == null ? void 0 : V.databases) == null ? void 0 : Rt.length) > 0, q && ((jt = q == null ? void 0 : q.schemas) == null ? void 0 : jt.length) > 0, ce && ((_t = ce == null ? void 0 : ce.columns) == null ? void 0 : _t.length) > 0 && (a = ce.columns.map((k) => ({
1845
+ ...k,
1846
+ data_type: k.data_type.toLowerCase()
1847
1847
  }))), E && (a = []), (Z || D) && (a = []);
1848
1848
  const pe = S == null ? void 0 : S.connections.map(
1849
- (w) => ({
1850
- id: w.id,
1851
- name: w.name,
1852
- type: w.type
1849
+ (k) => ({
1850
+ id: k.id,
1851
+ name: k.name,
1852
+ type: k.type
1853
1853
  })
1854
- ), Qe = (Ht = $ == null ? void 0 : $.datamodels) == null ? void 0 : Ht.map((w) => ({
1855
- id: w.id,
1856
- name: w.name
1857
- })), bt = V == null ? void 0 : V.databases.map((w) => ({
1858
- id: w.database_name,
1859
- name: w.database_name
1860
- })), it = k == null ? void 0 : k.schemas.map((w) => ({
1861
- id: w.schema_name,
1862
- name: w.schema_name
1863
- })), xt = F == null ? void 0 : F.tables.map((w) => ({
1864
- id: w.table_name,
1865
- name: w.table_name
1854
+ ), Qe = (Ht = $ == null ? void 0 : $.datamodels) == null ? void 0 : Ht.map((k) => ({
1855
+ id: k.id,
1856
+ name: k.name
1857
+ })), bt = V == null ? void 0 : V.databases.map((k) => ({
1858
+ id: k.database_name,
1859
+ name: k.database_name
1860
+ })), it = q == null ? void 0 : q.schemas.map((k) => ({
1861
+ id: k.schema_name,
1862
+ name: k.schema_name
1863
+ })), xt = F == null ? void 0 : F.tables.map((k) => ({
1864
+ id: k.table_name,
1865
+ name: k.table_name
1866
1866
  })), xn = (Pt = $ == null ? void 0 : $.datamodels.find(
1867
- (w) => w.id === r
1867
+ (k) => k.id === r
1868
1868
  )) == null ? void 0 : Pt.name;
1869
1869
  return {
1870
1870
  connectionItems: pe,
@@ -1874,27 +1874,27 @@ function Ve(t, n) {
1874
1874
  selectedDatamodelId: r,
1875
1875
  selectedDatamodelName: xn,
1876
1876
  isModelsLoading: H,
1877
- isModelsError: J,
1877
+ isModelsError: U,
1878
1878
  databaseItems: bt,
1879
- isDatabasesLoadingOrFetching: G || C,
1879
+ isDatabasesLoadingOrFetching: B || C,
1880
1880
  isDatabaseError: E,
1881
1881
  schemaItems: it,
1882
1882
  isSchemaLoadingOrFetching: Q || le,
1883
1883
  isSchemaError: oe,
1884
1884
  tableItems: xt,
1885
- isTableLoadingOrFetching: ie || M,
1885
+ isTableLoadingOrFetching: ie || w,
1886
1886
  isTableError: W,
1887
1887
  columns: a,
1888
1888
  isColumnsLoadingOrFetching: ke || ge,
1889
1889
  isColumnsError: Z,
1890
- isNonDbConnection: B,
1891
- connectionType: L,
1890
+ isNonDbConnection: J,
1891
+ connectionType: T,
1892
1892
  tableName: Re,
1893
1893
  schemaName: De,
1894
- refetchConnections: O,
1895
- refetchModels: q,
1896
- refetchDatabases: j,
1897
- refetchSchemas: R,
1894
+ refetchConnections: M,
1895
+ refetchModels: R,
1896
+ refetchDatabases: O,
1897
+ refetchSchemas: j,
1898
1898
  refetchTables: de,
1899
1899
  refetchColumns: he,
1900
1900
  handleConnectionChange: ue,
@@ -1929,52 +1929,52 @@ function nn({
1929
1929
  isConnectionsError: x,
1930
1930
  isModelsError: N,
1931
1931
  isDatabasesLoadingOrFetching: v,
1932
- isDatabaseError: O,
1932
+ isDatabaseError: M,
1933
1933
  isSchemaLoadingOrFetching: S,
1934
1934
  isSchemaError: z,
1935
1935
  isColumnsError: D,
1936
- isColumnsLoadingOrFetching: q,
1936
+ isColumnsLoadingOrFetching: R,
1937
1937
  isTableLoadingOrFetching: $,
1938
1938
  isTableError: H,
1939
- connectionType: J,
1939
+ connectionType: U,
1940
1940
  isNonDbConnection: p,
1941
- refetchDatabases: L,
1942
- refetchModels: B,
1941
+ refetchDatabases: T,
1942
+ refetchModels: J,
1943
1943
  refetchSchemas: V,
1944
- refetchTables: G,
1944
+ refetchTables: B,
1945
1945
  refetchColumns: C,
1946
1946
  refetchConnections: E,
1947
- handleConnectionChange: j,
1948
- handleDatabaseChange: k,
1947
+ handleConnectionChange: O,
1948
+ handleDatabaseChange: q,
1949
1949
  handleSchemaChange: Q,
1950
1950
  handleDatamodelChange: le,
1951
1951
  tableName: oe,
1952
- schemaName: R
1952
+ schemaName: j
1953
1953
  } = Ve();
1954
1954
  function F() {
1955
- return t ? t(R, oe, f) : /* @__PURE__ */ e(
1955
+ return t ? t(j, oe, f) : /* @__PURE__ */ e(
1956
1956
  Pl,
1957
1957
  {
1958
- schemaName: R,
1958
+ schemaName: j,
1959
1959
  tableName: oe,
1960
1960
  columns: f,
1961
- status: q ? "Loading..." : D ? "Error" : "Success"
1961
+ status: R ? "Loading..." : D ? "Error" : "Success"
1962
1962
  }
1963
1963
  );
1964
1964
  }
1965
1965
  function ie() {
1966
1966
  window.location.href = "mailto:support@semaphor.cloud?subject=Help&body=I need help with...";
1967
1967
  }
1968
- function M() {
1969
- if (!n || J === "S3" || J === "API") return null;
1968
+ function w() {
1969
+ if (!n || U === "S3" || U === "API") return null;
1970
1970
  if (!a || a === "none")
1971
1971
  return /* @__PURE__ */ e(
1972
1972
  Ze,
1973
1973
  {
1974
- refetch: L,
1974
+ refetch: T,
1975
1975
  showNone: !0,
1976
- onChange: k,
1977
- isError: O,
1976
+ onChange: q,
1977
+ isError: M,
1978
1978
  isLoading: v,
1979
1979
  items: h,
1980
1980
  value: l || "",
@@ -1987,17 +1987,17 @@ function nn({
1987
1987
  if (n && !p && (!l || l === "none") && (!a || a === "none"))
1988
1988
  return /* @__PURE__ */ s("div", { className: "grid grid-cols-3", children: [
1989
1989
  /* @__PURE__ */ e("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e(Me, {}) }),
1990
- /* @__PURE__ */ e("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e(U, { children: "OR" }) }),
1990
+ /* @__PURE__ */ e("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e(G, { children: "OR" }) }),
1991
1991
  /* @__PURE__ */ e("div", { className: "col-span-1 grid place-items-center", children: /* @__PURE__ */ e(Me, {}) })
1992
1992
  ] });
1993
1993
  }
1994
1994
  function de() {
1995
- if (!n || J === "S3" || J === "API") return null;
1995
+ if (!n || U === "S3" || U === "API") return null;
1996
1996
  if (!l || l === "none")
1997
1997
  return /* @__PURE__ */ e(
1998
1998
  Ze,
1999
1999
  {
2000
- refetch: B,
2000
+ refetch: J,
2001
2001
  showNone: !0,
2002
2002
  onChange: le,
2003
2003
  isError: N,
@@ -2010,7 +2010,7 @@ function nn({
2010
2010
  );
2011
2011
  }
2012
2012
  function ce() {
2013
- return !n || J === "S3" || J === "API" || !l || l === "none" ? null : /* @__PURE__ */ e(
2013
+ return !n || U === "S3" || U === "API" || !l || l === "none" ? null : /* @__PURE__ */ e(
2014
2014
  Ze,
2015
2015
  {
2016
2016
  refetch: V,
@@ -2027,12 +2027,12 @@ function nn({
2027
2027
  function ke() {
2028
2028
  function Z() {
2029
2029
  let he = !1;
2030
- return J === "API" ? (he = !1, he) : ((J === "S3" || n && l && l !== "none" && i) && (he = !0), he);
2030
+ return U === "API" ? (he = !1, he) : ((U === "S3" || n && l && l !== "none" && i) && (he = !0), he);
2031
2031
  }
2032
2032
  return Z() ? /* @__PURE__ */ e(
2033
2033
  Ze,
2034
2034
  {
2035
- refetch: G,
2035
+ refetch: B,
2036
2036
  onChange: o,
2037
2037
  isError: H,
2038
2038
  items: y,
@@ -2052,7 +2052,7 @@ function nn({
2052
2052
  items: c,
2053
2053
  title: "Connection",
2054
2054
  value: n || "",
2055
- onChange: j,
2055
+ onChange: O,
2056
2056
  isLoading: m,
2057
2057
  isError: x,
2058
2058
  type: "combobox",
@@ -2061,7 +2061,7 @@ function nn({
2061
2061
  )) == null ? void 0 : ge.type) || ""
2062
2062
  }
2063
2063
  ),
2064
- M(),
2064
+ w(),
2065
2065
  W(),
2066
2066
  de(),
2067
2067
  ce(),
@@ -2236,7 +2236,7 @@ function Xl(t) {
2236
2236
  return We({ 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);
2237
2237
  }
2238
2238
  function rn(t) {
2239
- const { theme: n } = Ln(), a = T((x) => x.theme), l = u((x) => x.frame), i = u((x) => x.card), r = u((x) => x.activeTabCardId), o = Fn(), { refetch: c } = Fe(i), { updateCardTab: d, setRunSql: g } = ne(), h = $e(), y = $e({}), f = l.cards.find((x) => x.id === r), m = Pa(() => {
2239
+ const { theme: n } = Ln(), a = A((x) => x.theme), l = u((x) => x.frame), i = u((x) => x.card), r = u((x) => x.activeTabCardId), o = Fn(), { refetch: c } = Fe(i), { updateCardTab: d, setRunSql: g } = ne(), h = $e(), y = $e({}), f = l.cards.find((x) => x.id === r), m = Pa(() => {
2240
2240
  let x = "";
2241
2241
  return t === "python" && (x = (f == null ? void 0 : f.python) || Da), t === "sql" && (x = (f == null ? void 0 : f.sql) || ""), x;
2242
2242
  }, [t, f]);
@@ -2289,8 +2289,8 @@ function rn(t) {
2289
2289
  }, [o, c, i]);
2290
2290
  function b(x, N) {
2291
2291
  if (h.current = x, !y.current[i.id]) {
2292
- const v = x.getModel(), O = m();
2293
- y.current[i.id] = v || (N == null ? void 0 : N.editor.createModel(O, t)) || x.getModel();
2292
+ const v = x.getModel(), M = m();
2293
+ y.current[i.id] = v || (N == null ? void 0 : N.editor.createModel(M, t)) || x.getModel();
2294
2294
  }
2295
2295
  x.setModel(y.current[i.id]);
2296
2296
  }
@@ -2381,33 +2381,33 @@ function ti({ jsonString: t }) {
2381
2381
  );
2382
2382
  }
2383
2383
  function on(t) {
2384
- const [n, a] = P(""), [l, i] = P(null), { authToken: r } = ze(), o = u((M) => {
2384
+ const [n, a] = P(""), [l, i] = P(null), { authToken: r } = ze(), o = u((w) => {
2385
2385
  var W;
2386
- return (W = M == null ? void 0 : M.card) == null ? void 0 : W.sql;
2387
- }), c = u((M) => {
2386
+ return (W = w == null ? void 0 : w.card) == null ? void 0 : W.sql;
2387
+ }), c = u((w) => {
2388
2388
  var W;
2389
- return (W = M == null ? void 0 : M.card) == null ? void 0 : W.python;
2390
- }), d = u((M) => M.actions.setCardSql), g = u((M) => M.actions.setRunSql), h = u(
2391
- (M) => M.actions.switchCardType
2392
- ), y = u((M) => M.currentAssitantScope) || [], f = u((M) => M.userInputForAI), m = u((M) => M.triggerAIRun), b = u(
2393
- (M) => M.selectedDatabaseName
2394
- ), x = u((M) => M.selectedTableName), N = u(
2395
- (M) => M.selectedConnectionId
2389
+ return (W = w == null ? void 0 : w.card) == null ? void 0 : W.python;
2390
+ }), d = u((w) => w.actions.setCardSql), g = u((w) => w.actions.setRunSql), h = u(
2391
+ (w) => w.actions.switchCardType
2392
+ ), y = u((w) => w.currentAssitantScope) || [], f = u((w) => w.userInputForAI), m = u((w) => w.triggerAIRun), b = u(
2393
+ (w) => w.selectedDatabaseName
2394
+ ), x = u((w) => w.selectedTableName), N = u(
2395
+ (w) => w.selectedConnectionId
2396
2396
  ), v = u(
2397
- (M) => M.selectedSchemaName
2398
- ), O = T(
2399
- (M) => M.dashboard.aiScopeTables
2400
- ), { setTriggerAIRun: S, setCurrentAssitantScope: z } = ne(), { selectedDatamodelName: D, connectionType: q, selectedDatamodelId: $ } = Ve(), {
2397
+ (w) => w.selectedSchemaName
2398
+ ), M = A(
2399
+ (w) => w.dashboard.aiScopeTables
2400
+ ), { setTriggerAIRun: S, setCurrentAssitantScope: z } = ne(), { selectedDatamodelName: D, connectionType: R, selectedDatamodelId: $ } = Ve(), {
2401
2401
  messages: H,
2402
- setMessages: J,
2402
+ setMessages: U,
2403
2403
  reload: p,
2404
- append: L,
2405
- input: B,
2404
+ append: T,
2405
+ input: J,
2406
2406
  setInput: V,
2407
- status: G,
2407
+ status: B,
2408
2408
  handleInputChange: C,
2409
2409
  handleSubmit: E,
2410
- stop: j
2410
+ stop: O
2411
2411
  } = qn({
2412
2412
  api: "https://semaphor.cloud/api/v1/assistant",
2413
2413
  headers: {
@@ -2418,8 +2418,8 @@ function on(t) {
2418
2418
  },
2419
2419
  maxSteps: 10,
2420
2420
  //maxToolRoundtrips: 5,
2421
- onToolCall: k,
2422
- onFinish(M, W) {
2421
+ onToolCall: q,
2422
+ onFinish(w, W) {
2423
2423
  Q(W.usage), a(""), W.finishReason === "stop" && a("");
2424
2424
  }
2425
2425
  });
@@ -2436,20 +2436,20 @@ function on(t) {
2436
2436
  S,
2437
2437
  C
2438
2438
  ]);
2439
- async function k({
2440
- toolCall: M
2439
+ async function q({
2440
+ toolCall: w
2441
2441
  }) {
2442
- if (M.toolName === "createChart") {
2443
- const W = M.args.sql, de = M.args.chartType;
2442
+ if (w.toolName === "createChart") {
2443
+ const W = w.args.sql, de = w.args.chartType;
2444
2444
  return h(de), d(W), g(!0), {
2445
2445
  status: "success",
2446
2446
  message: "Let the user know that chart is created"
2447
2447
  // query: sql,
2448
2448
  };
2449
- } else if (M.toolName === "getTableColumns")
2449
+ } else if (w.toolName === "getTableColumns")
2450
2450
  a("Getting table columns...");
2451
2451
  else {
2452
- if (M.toolName === "getUserSql")
2452
+ if (w.toolName === "getUserSql")
2453
2453
  return o ? {
2454
2454
  status: "success",
2455
2455
  sql: o,
@@ -2458,7 +2458,7 @@ function on(t) {
2458
2458
  status: "error",
2459
2459
  message: "No SQL found"
2460
2460
  };
2461
- if (M.toolName === "getCurrentTableScope")
2461
+ if (w.toolName === "getCurrentTableScope")
2462
2462
  return a("Getting table scope..."), F(), {
2463
2463
  status: "success",
2464
2464
  tables: y
@@ -2466,20 +2466,20 @@ function on(t) {
2466
2466
  a("Analyzing...");
2467
2467
  }
2468
2468
  }
2469
- function Q(M) {
2469
+ function Q(w) {
2470
2470
  i((W) => W ? {
2471
- promptTokens: W.promptTokens + M.promptTokens,
2472
- completionTokens: W.completionTokens + M.completionTokens,
2473
- totalTokens: W.totalTokens + M.totalTokens
2474
- } : M);
2471
+ promptTokens: W.promptTokens + w.promptTokens,
2472
+ completionTokens: W.completionTokens + w.completionTokens,
2473
+ totalTokens: W.totalTokens + w.totalTokens
2474
+ } : w);
2475
2475
  }
2476
- function le(M) {
2477
- const W = Rn(y, M);
2476
+ function le(w) {
2477
+ const W = Rn(y, w);
2478
2478
  oe(W);
2479
2479
  }
2480
- function oe(M) {
2481
- const W = _n(M);
2482
- z(W), J((de) => [
2480
+ function oe(w) {
2481
+ const W = _n(w);
2482
+ z(W), U((de) => [
2483
2483
  ...de,
2484
2484
  {
2485
2485
  id: crypto.randomUUID(),
@@ -2488,60 +2488,60 @@ function on(t) {
2488
2488
  }
2489
2489
  ]);
2490
2490
  }
2491
- function R() {
2492
- const M = {
2491
+ function j() {
2492
+ const w = {
2493
2493
  databaseName: b || "",
2494
2494
  schemaName: v || "",
2495
2495
  tableName: x || "",
2496
2496
  datamodelId: $ || "",
2497
2497
  datamodelName: ht(D),
2498
2498
  connectionId: N || "",
2499
- connectionType: q || ""
2500
- }, W = Bt([...y, M]);
2499
+ connectionType: R || ""
2500
+ }, W = Bt([...y, w]);
2501
2501
  oe(W);
2502
2502
  }
2503
2503
  function F() {
2504
- const M = {
2504
+ const w = {
2505
2505
  databaseName: b || "",
2506
2506
  schemaName: v || "",
2507
2507
  tableName: x || "",
2508
2508
  datamodelName: ht(D),
2509
2509
  connectionId: N || "",
2510
- connectionType: q || "",
2510
+ connectionType: R || "",
2511
2511
  datamodelId: $ || ""
2512
2512
  };
2513
2513
  if (!jn(
2514
- [...O || [], ...y],
2515
- M
2514
+ [...M || [], ...y],
2515
+ w
2516
2516
  ) || y.length === 0) {
2517
2517
  const de = Bt([
2518
- ...O || [],
2518
+ ...M || [],
2519
2519
  ...y,
2520
- M
2520
+ w
2521
2521
  ]).filter(
2522
- (ce) => ce.connectionId === M.connectionId
2522
+ (ce) => ce.connectionId === w.connectionId
2523
2523
  );
2524
2524
  oe(de);
2525
2525
  }
2526
2526
  }
2527
- const ie = !["ready", "error"].includes(G);
2527
+ const ie = !["ready", "error"].includes(B);
2528
2528
  return {
2529
2529
  messages: H,
2530
- setMessages: J,
2530
+ setMessages: U,
2531
2531
  reload: p,
2532
- append: L,
2533
- input: B,
2532
+ append: T,
2533
+ input: J,
2534
2534
  setInput: V,
2535
2535
  isLoading: ie,
2536
2536
  handleSetAIScope: F,
2537
- handleAddCurrentTableToScope: R,
2537
+ handleAddCurrentTableToScope: j,
2538
2538
  removeFromCurrentSelections: le,
2539
2539
  currentAssitantScope: y,
2540
2540
  setCurrentAssitantScope: z,
2541
2541
  handleInputChange: C,
2542
2542
  handleSubmit: E,
2543
- stop: j,
2544
- chatStatus: G,
2543
+ stop: O,
2544
+ chatStatus: B,
2545
2545
  toolStatus: n,
2546
2546
  llmUsage: l,
2547
2547
  onFinish: t
@@ -2564,58 +2564,58 @@ function ai() {
2564
2564
  var ue;
2565
2565
  return (ue = I == null ? void 0 : I.card) == null ? void 0 : ue.sql;
2566
2566
  }), { sheetFilterValues: v } = Pn(), {
2567
- setCardCustomCfg: O,
2567
+ setCardCustomCfg: M,
2568
2568
  setQueryResultColumns: S,
2569
2569
  setCardSql: z,
2570
2570
  // setQueryError,
2571
2571
  setPythonStdOut: D,
2572
- setCardPreferences: q,
2572
+ setCardPreferences: R,
2573
2573
  setCardType: $,
2574
2574
  setCardPython: H,
2575
- runAssistant: J,
2575
+ runAssistant: U,
2576
2576
  setShowAIDialog: p
2577
- } = ne(), L = u((I) => I.onSave), B = u((I) => I.onClose), V = u((I) => I.actions.setSqlGen), G = u((I) => I.runSql), C = u((I) => I.actions.setRunSql), E = u((I) => I.actions.setCardCfg), j = u(
2577
+ } = ne(), T = u((I) => I.onSave), J = u((I) => I.onClose), V = u((I) => I.actions.setSqlGen), B = u((I) => I.runSql), C = u((I) => I.actions.setRunSql), E = u((I) => I.actions.setCardCfg), O = u(
2578
2578
  (I) => I.actions.setIsSqlRunning
2579
2579
  ), {
2580
- data: k,
2580
+ data: q,
2581
2581
  isLoading: Q,
2582
2582
  isFetching: le,
2583
2583
  isSuccess: oe,
2584
- isError: R,
2584
+ isError: j,
2585
2585
  error: F,
2586
2586
  queryKey: ie,
2587
- refetch: M
2587
+ refetch: w
2588
2588
  } = Fe(d), { handleSetAIScope: W } = on();
2589
2589
  re(() => {
2590
- if (k && (k.rowLimitExceeded && dt.error("Row limit (10,000) exceeded. Refine your query.", {
2590
+ if (q && (q.rowLimitExceeded && dt.error("Row limit (10,000) exceeded. Refine your query.", {
2591
2591
  position: "top-center",
2592
2592
  richColors: !0
2593
- }), D((k == null ? void 0 : k.output) || ""), k.records.length > 0)) {
2594
- const { dimensionKeys: I } = St(k.records);
2593
+ }), D((q == null ? void 0 : q.output) || ""), q.records.length > 0)) {
2594
+ const { dimensionKeys: I } = St(q.records);
2595
2595
  S(I);
2596
2596
  }
2597
- }, [k, S, D]), re(() => {
2598
- (Q || le) && j(!0), (R || oe) && j(!1), R && (S([]), D(""));
2597
+ }, [q, S, D]), re(() => {
2598
+ (Q || le) && O(!0), (j || oe) && O(!1), j && (S([]), D(""));
2599
2599
  }, [
2600
2600
  Q,
2601
2601
  le,
2602
- k,
2602
+ q,
2603
2603
  D,
2604
- R,
2605
- oe,
2606
2604
  j,
2605
+ oe,
2606
+ O,
2607
2607
  S,
2608
2608
  // setQueryError,
2609
2609
  F
2610
2610
  ]), re(() => {
2611
- G && (a.getQueryData(ie) || M(), C(!1));
2612
- }, [G, M, C, ie, a]);
2611
+ B && (a.getQueryData(ie) || w(), C(!1));
2612
+ }, [B, w, C, ie, a]);
2613
2613
  function de() {
2614
2614
  const I = a.getQueryData(ie);
2615
2615
  t.queryData || n({
2616
2616
  queryKey: ie,
2617
2617
  queryData: I
2618
- }), a.setQueryData(ie, null), a.removeQueries({ queryKey: ie, exact: !0 }), z(""), V({}), H(""), E(void 0), O(""), q({}), $("bar");
2618
+ }), a.setQueryData(ie, null), a.removeQueries({ queryKey: ie, exact: !0 }), z(""), V({}), H(""), E(void 0), M(""), R({}), $("bar");
2619
2619
  }
2620
2620
  function ce(I, ue) {
2621
2621
  if (I.length === 0)
@@ -2657,11 +2657,11 @@ function ai() {
2657
2657
  cards: Ae,
2658
2658
  activeCardId: ce(Ae, c.activeCardId)
2659
2659
  };
2660
- L == null || L(pe);
2660
+ T == null || T(pe);
2661
2661
  }
2662
2662
  function ge() {
2663
2663
  const { queryKey: I, queryData: ue } = t;
2664
- I && ue && a.setQueryData(I, ue), V({}), B == null || B();
2664
+ I && ue && a.setQueryData(I, ue), V({}), J == null || J();
2665
2665
  }
2666
2666
  async function Z() {
2667
2667
  const I = `Can you help me debug this query in the current table scope?
@@ -2675,7 +2675,7 @@ function ai() {
2675
2675
  ${N}
2676
2676
 
2677
2677
  `;
2678
- J(I);
2678
+ U(I);
2679
2679
  }
2680
2680
  function he() {
2681
2681
  return /* @__PURE__ */ s(ae, { children: [
@@ -2758,7 +2758,7 @@ function ai() {
2758
2758
  }
2759
2759
  );
2760
2760
  }
2761
- const De = (F == null ? void 0 : F.message) || ((Te = k == null ? void 0 : k.error) == null ? void 0 : Te.message);
2761
+ const De = (F == null ? void 0 : F.message) || ((Te = q == null ? void 0 : q.error) == null ? void 0 : Te.message);
2762
2762
  return (
2763
2763
  // This is a tricky css, the pt-8 is to make sure the editor doesn't slide under the header
2764
2764
  /* @__PURE__ */ s(
@@ -2784,7 +2784,7 @@ function ai() {
2784
2784
  title: "Shift + Enter",
2785
2785
  disabled: Q || le,
2786
2786
  onClick: () => {
2787
- M();
2787
+ w();
2788
2788
  },
2789
2789
  className: "shrink-0",
2790
2790
  size: "sm",
@@ -2797,7 +2797,7 @@ function ai() {
2797
2797
  /* @__PURE__ */ e(
2798
2798
  Bl,
2799
2799
  {
2800
- sql: k == null ? void 0 : k.sql,
2800
+ sql: q == null ? void 0 : q.sql,
2801
2801
  error: De,
2802
2802
  onClick: Z
2803
2803
  }
@@ -2927,17 +2927,17 @@ function ni({ data: t }) {
2927
2927
  ] }) });
2928
2928
  }
2929
2929
  function si({ card: t }) {
2930
- var O, S, z, D, q, $, H, J, p, L, B;
2930
+ var M, S, z, D, R, $, H, U, p, T, J;
2931
2931
  const [n, a] = P(!1), [l, i] = P(
2932
2932
  []
2933
- ), { authToken: r } = ze(), o = Yn(r == null ? void 0 : r.accessToken), c = T((V) => V.themeStyle), d = {
2934
- colors: ((S = (O = c == null ? void 0 : c.chart) == null ? void 0 : O.dataset) == null ? void 0 : S.backgroundColor) || []
2933
+ ), { authToken: r } = ze(), o = Yn(r == null ? void 0 : r.accessToken), c = A((V) => V.themeStyle), d = {
2934
+ colors: ((S = (M = c == null ? void 0 : c.chart) == null ? void 0 : M.dataset) == null ? void 0 : S.backgroundColor) || []
2935
2935
  };
2936
2936
  (z = t.customCardPreferences) != null && z.inputData;
2937
- const { getCard: g } = Ta(((D = t.customCardPreferences) == null ? void 0 : D.url) || ""), h = ((q = t.customCardPreferences) == null ? void 0 : q.visualType) || "single", y = u((V) => V.frame), { setCustomCardPreferences: f } = ne(), { data: m } = Fe(t), b = Pa((V, G) => {
2937
+ const { getCard: g } = Ta(((D = t.customCardPreferences) == null ? void 0 : D.url) || ""), h = ((R = t.customCardPreferences) == null ? void 0 : R.visualType) || "single", y = u((V) => V.frame), { setCustomCardPreferences: f } = ne(), { data: m } = Fe(t), b = Pa((V, B) => {
2938
2938
  i((C) => ({
2939
2939
  ...C,
2940
- [V]: G
2940
+ [V]: B
2941
2941
  }));
2942
2942
  }, []);
2943
2943
  if (!(($ = t.customCardPreferences) != null && $.componentName))
@@ -2949,10 +2949,10 @@ function si({ card: t }) {
2949
2949
  a(V);
2950
2950
  }
2951
2951
  const v = Object.keys(
2952
- ((J = t.customCardPreferences) == null ? void 0 : J.dataInputCardIds) || {}
2952
+ ((U = t.customCardPreferences) == null ? void 0 : U.dataInputCardIds) || {}
2953
2953
  ).map((V) => {
2954
- var E, j, k;
2955
- const G = (j = (E = t.customCardPreferences) == null ? void 0 : E.dataInputCardIds) == null ? void 0 : j[V].cardId, C = (k = y == null ? void 0 : y.cards) == null ? void 0 : k.find((Q) => Q.id === G);
2954
+ var E, O, q;
2955
+ const B = (O = (E = t.customCardPreferences) == null ? void 0 : E.dataInputCardIds) == null ? void 0 : O[V].cardId, C = (q = y == null ? void 0 : y.cards) == null ? void 0 : q.find((Q) => Q.id === B);
2956
2956
  return C || null;
2957
2957
  });
2958
2958
  return /* @__PURE__ */ e("div", { className: "semaphor-custom mb-3 flex grow basis-0 flex-col space-y-2 overflow-y-auto", children: /* @__PURE__ */ s(
@@ -2972,11 +2972,11 @@ function si({ card: t }) {
2972
2972
  ),
2973
2973
  x && h === "multiple" && /* @__PURE__ */ s(ae, { children: [
2974
2974
  Object.keys(
2975
- ((L = t.customCardPreferences) == null ? void 0 : L.dataInputCardIds) || {}
2975
+ ((T = t.customCardPreferences) == null ? void 0 : T.dataInputCardIds) || {}
2976
2976
  ).map((V) => {
2977
- var E, j, k;
2978
- const G = (j = (E = t.customCardPreferences) == null ? void 0 : E.dataInputCardIds) == null ? void 0 : j[V].cardId, C = (k = y == null ? void 0 : y.cards) == null ? void 0 : k.find(
2979
- (Q) => Q.id === G
2977
+ var E, O, q;
2978
+ const B = (O = (E = t.customCardPreferences) == null ? void 0 : E.dataInputCardIds) == null ? void 0 : O[V].cardId, C = (q = y == null ? void 0 : y.cards) == null ? void 0 : q.find(
2979
+ (Q) => Q.id === B
2980
2980
  );
2981
2981
  if (C)
2982
2982
  return /* @__PURE__ */ e(
@@ -2997,8 +2997,8 @@ function si({ card: t }) {
2997
2997
  onDataChange: b,
2998
2998
  settings: v.map(
2999
2999
  (V) => {
3000
- var G;
3001
- return (G = V == null ? void 0 : V.customCardPreferences) == null ? void 0 : G.settings;
3000
+ var B;
3001
+ return (B = V == null ? void 0 : V.customCardPreferences) == null ? void 0 : B.settings;
3002
3002
  }
3003
3003
  ),
3004
3004
  data: v.map((V) => V != null && V.id ? l == null ? void 0 : l[V.id] : [])
@@ -3007,7 +3007,7 @@ function si({ card: t }) {
3007
3007
  ] })
3008
3008
  ]
3009
3009
  },
3010
- (B = t.customCardPreferences) == null ? void 0 : B.componentName
3010
+ (J = t.customCardPreferences) == null ? void 0 : J.componentName
3011
3011
  ) });
3012
3012
  }
3013
3013
  function cn({
@@ -3017,7 +3017,7 @@ function cn({
3017
3017
  ...n
3018
3018
  }) {
3019
3019
  var N;
3020
- const a = u((v) => v.card), l = ((N = a.customCardPreferences) == null ? void 0 : N.showCardHeader) ?? !0, i = u((v) => v.frame), r = T((v) => v.dashboard.filters);
3020
+ const a = u((v) => v.card), l = ((N = a.customCardPreferences) == null ? void 0 : N.showCardHeader) ?? !0, i = u((v) => v.frame), r = A((v) => v.dashboard.filters);
3021
3021
  u((v) => v.actions.setRunSql);
3022
3022
  const { updateFilter: o } = Be(), c = r == null ? void 0 : r.find((v) => v.id === i.filterId), { data: d, isLoading: g, isFetching: h } = Fe(a), { setCard: y } = ne(), { data: f } = zt(a);
3023
3023
  if (!a.id) return null;
@@ -3091,7 +3091,7 @@ function cn({
3091
3091
  className: "my-1",
3092
3092
  text: c.title || c.column,
3093
3093
  onSave: (v) => o({ ...c, title: v }),
3094
- children: /* @__PURE__ */ e(U, { children: c.title })
3094
+ children: /* @__PURE__ */ e(G, { children: c.title })
3095
3095
  }
3096
3096
  ),
3097
3097
  /* @__PURE__ */ e(La, { filter: c })
@@ -3190,7 +3190,7 @@ const Zt = ({
3190
3190
  onApply: l,
3191
3191
  onClose: i
3192
3192
  }) => /* @__PURE__ */ s(ia, { className: "flex items-center", children: [
3193
- /* @__PURE__ */ e(U, { className: "mr-2 text-red-500", children: t }),
3193
+ /* @__PURE__ */ e(G, { className: "mr-2 text-red-500", children: t }),
3194
3194
  /* @__PURE__ */ e(_, { disabled: !n, onClick: a, variant: "outline", children: "Reset" }),
3195
3195
  /* @__PURE__ */ e(_, { onClick: l, variant: "outline", children: "Apply" }),
3196
3196
  /* @__PURE__ */ e(_, { onClick: i, variant: "outline", children: "Close" })
@@ -3203,8 +3203,8 @@ function oi() {
3203
3203
  ...S,
3204
3204
  data: {
3205
3205
  ...S.data,
3206
- datasets: (D = (z = S.data) == null ? void 0 : z.datasets) == null ? void 0 : D.map((q) => ({
3207
- ...q,
3206
+ datasets: (D = (z = S.data) == null ? void 0 : z.datasets) == null ? void 0 : D.map((R) => ({
3207
+ ...R,
3208
3208
  data: []
3209
3209
  }))
3210
3210
  }
@@ -3230,8 +3230,8 @@ function oi() {
3230
3230
  });
3231
3231
  if (S) {
3232
3232
  l(N(S)), c(((D = h.preferences) == null ? void 0 : D.customVisualCode) || "");
3233
- const q = ds(S, y);
3234
- r(N(q));
3233
+ const R = ds(S, y);
3234
+ r(N(R));
3235
3235
  }
3236
3236
  },
3237
3237
  className: y ? "text-green-600 hover:text-green-700" : "",
@@ -3587,44 +3587,44 @@ function Xt(t, n) {
3587
3587
  return ((r = (i = (l = t == null ? void 0 : t.chartOptions) == null ? void 0 : l.scales) == null ? void 0 : i[a]) == null ? void 0 : r.type) || "linear";
3588
3588
  }
3589
3589
  function pi() {
3590
- var E, j, k, Q, le, oe;
3591
- const [t, n] = P(!1), a = u((R) => {
3590
+ var E, O, q, Q, le, oe;
3591
+ const [t, n] = P(!1), a = u((j) => {
3592
3592
  var F;
3593
- return (F = R.card) == null ? void 0 : F.preferences;
3594
- }), l = u((R) => {
3593
+ return (F = j.card) == null ? void 0 : F.preferences;
3594
+ }), l = u((j) => {
3595
3595
  var F;
3596
- return (F = R.card) == null ? void 0 : F.cfg;
3596
+ return (F = j.card) == null ? void 0 : F.cfg;
3597
3597
  }), i = qa(a, l), [r, o] = P(
3598
3598
  Xt(a)
3599
3599
  ), [c, d] = P(
3600
- ((k = (j = (E = a == null ? void 0 : a.chartOptions) == null ? void 0 : E.scales) == null ? void 0 : j[i]) == null ? void 0 : k.min) || ""
3600
+ ((q = (O = (E = a == null ? void 0 : a.chartOptions) == null ? void 0 : E.scales) == null ? void 0 : O[i]) == null ? void 0 : q.min) || ""
3601
3601
  ), [g, h] = P(
3602
3602
  ((oe = (le = (Q = a == null ? void 0 : a.chartOptions) == null ? void 0 : Q.scales) == null ? void 0 : le[i]) == null ? void 0 : oe.max) || ""
3603
- ), [y, f] = P(c || g ? "custom" : "auto"), [m, b] = P(""), [x, N] = P(0), [v, O] = P(""), [S, z] = P(""), [D, q] = P(""), $ = u(
3604
- (R) => R.actions.setCardPreferences
3605
- ), { updateCardInFrame: H } = ne(), J = u((R) => R.card), p = u((R) => {
3603
+ ), [y, f] = P(c || g ? "custom" : "auto"), [m, b] = P(""), [x, N] = P(0), [v, M] = P(""), [S, z] = P(""), [D, R] = P(""), $ = u(
3604
+ (j) => j.actions.setCardPreferences
3605
+ ), { updateCardInFrame: H } = ne(), U = u((j) => j.card), p = u((j) => {
3606
3606
  var F;
3607
- return (F = R.card) == null ? void 0 : F.type;
3608
- }), L = ["pie", "doughnut", "polarArea"].includes(p);
3607
+ return (F = j.card) == null ? void 0 : F.type;
3608
+ }), T = ["pie", "doughnut", "polarArea"].includes(p);
3609
3609
  re(() => {
3610
- var R, F, ie, M, W, de, ce, ke, ge, Z, he, Re, De, Te;
3610
+ var j, F, ie, w, W, de, ce, ke, ge, Z, he, Re, De, Te;
3611
3611
  o(Xt(a)), d(
3612
- ((ie = (F = (R = a == null ? void 0 : a.chartOptions) == null ? void 0 : R.scales) == null ? void 0 : F[i]) == null ? void 0 : ie.min) === 0 ? 0 : ""
3613
- ), h(((de = (W = (M = a == null ? void 0 : a.chartOptions) == null ? void 0 : M.scales) == null ? void 0 : W[i]) == null ? void 0 : de.max) || ""), b(
3612
+ ((ie = (F = (j = a == null ? void 0 : a.chartOptions) == null ? void 0 : j.scales) == null ? void 0 : F[i]) == null ? void 0 : ie.min) === 0 ? 0 : ""
3613
+ ), h(((de = (W = (w = a == null ? void 0 : a.chartOptions) == null ? void 0 : w.scales) == null ? void 0 : W[i]) == null ? void 0 : de.max) || ""), b(
3614
3614
  ((Z = (ge = (ke = (ce = a == null ? void 0 : a.chartOptions) == null ? void 0 : ce.scales) == null ? void 0 : ke[i]) == null ? void 0 : ge.ticks) == null ? void 0 : Z.stepSize) || ""
3615
- ), N(((he = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : he.decimalPlaces) || 0), O(((Re = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Re.suffix) || ""), z(((De = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : De.currency) || ""), q(((Te = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Te.locale) || "");
3615
+ ), N(((he = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : he.decimalPlaces) || 0), M(((Re = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Re.suffix) || ""), z(((De = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : De.currency) || ""), R(((Te = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Te.locale) || "");
3616
3616
  }, [t, a, i]);
3617
- function B(R, F) {
3618
- return F === "" || /^[0-9\b]+$/.test(F) ? Number(F) : Number(R);
3617
+ function J(j, F) {
3618
+ return F === "" || /^[0-9\b]+$/.test(F) ? Number(F) : Number(j);
3619
3619
  }
3620
3620
  function V() {
3621
- const R = [
3621
+ const j = [
3622
3622
  ...new Set(ut.map((F) => F.currency))
3623
3623
  ];
3624
3624
  return /* @__PURE__ */ s(ae, { children: [
3625
3625
  /* @__PURE__ */ s("div", { className: "grid grid-cols-6 items-center gap-2", children: [
3626
3626
  /* @__PURE__ */ e(
3627
- U,
3627
+ G,
3628
3628
  {
3629
3629
  className: "col-span-2 hover:cursor-pointer hover:underline",
3630
3630
  htmlFor: "currency",
@@ -3648,12 +3648,12 @@ function pi() {
3648
3648
  /* @__PURE__ */ e(Ce, { children: /* @__PURE__ */ s(we, { children: [
3649
3649
  /* @__PURE__ */ e(Se, { children: "Currency" }),
3650
3650
  /* @__PURE__ */ e(se, { value: "none", children: "None" }),
3651
- R.map((F) => /* @__PURE__ */ e(se, { value: F, children: F }, F))
3651
+ j.map((F) => /* @__PURE__ */ e(se, { value: F, children: F }, F))
3652
3652
  ] }) })
3653
3653
  ]
3654
3654
  }
3655
3655
  ),
3656
- /* @__PURE__ */ s(xe, { value: D, onValueChange: (F) => q(F), children: [
3656
+ /* @__PURE__ */ s(xe, { value: D, onValueChange: (F) => R(F), children: [
3657
3657
  /* @__PURE__ */ e(
3658
3658
  ve,
3659
3659
  {
@@ -3668,7 +3668,7 @@ function pi() {
3668
3668
  ] })
3669
3669
  ] }),
3670
3670
  /* @__PURE__ */ s("div", { className: "grid grid-cols-9 items-center gap-2", children: [
3671
- /* @__PURE__ */ e(U, { className: "col-span-3", htmlFor: "format", children: "Decimals" }),
3671
+ /* @__PURE__ */ e(G, { className: "col-span-3", htmlFor: "format", children: "Decimals" }),
3672
3672
  /* @__PURE__ */ e(
3673
3673
  me,
3674
3674
  {
@@ -3681,16 +3681,16 @@ function pi() {
3681
3681
  ] })
3682
3682
  ] });
3683
3683
  }
3684
- function G() {
3684
+ function B() {
3685
3685
  return /* @__PURE__ */ s(ae, { children: [
3686
3686
  /* @__PURE__ */ s("div", { className: "grid grid-cols-3 items-center gap-2", children: [
3687
- /* @__PURE__ */ e(U, { htmlFor: "range", children: "Range" }),
3687
+ /* @__PURE__ */ e(G, { htmlFor: "range", children: "Range" }),
3688
3688
  /* @__PURE__ */ e(
3689
3689
  me,
3690
3690
  {
3691
3691
  id: "min",
3692
3692
  value: c,
3693
- onChange: (R) => d((F) => B(F, R.target.value)),
3693
+ onChange: (j) => d((F) => J(F, j.target.value)),
3694
3694
  className: `col-span-1 h-8 w-full ${rt}`
3695
3695
  }
3696
3696
  ),
@@ -3698,19 +3698,19 @@ function pi() {
3698
3698
  me,
3699
3699
  {
3700
3700
  value: g,
3701
- onChange: (R) => h((F) => B(F, R.target.value)),
3701
+ onChange: (j) => h((F) => J(F, j.target.value)),
3702
3702
  id: "max",
3703
3703
  className: `col-span-1 h-8 w-full ${rt}`
3704
3704
  }
3705
3705
  )
3706
3706
  ] }),
3707
3707
  /* @__PURE__ */ s("div", { className: "grid grid-cols-3 items-center gap-2", children: [
3708
- /* @__PURE__ */ e(U, { htmlFor: "step-size", children: "Step Size" }),
3708
+ /* @__PURE__ */ e(G, { htmlFor: "step-size", children: "Step Size" }),
3709
3709
  /* @__PURE__ */ e(
3710
3710
  me,
3711
3711
  {
3712
3712
  value: m,
3713
- onChange: (R) => b((F) => B(F, R.target.value)),
3713
+ onChange: (j) => b((F) => J(F, j.target.value)),
3714
3714
  id: "step-size",
3715
3715
  className: `col-span-1 h-8 w-full ${rt}`
3716
3716
  }
@@ -3719,9 +3719,9 @@ function pi() {
3719
3719
  ] });
3720
3720
  }
3721
3721
  function C() {
3722
- var M;
3723
- let R = {};
3724
- y === "custom" && (R = {
3722
+ var w;
3723
+ let j = {};
3724
+ y === "custom" && (j = {
3725
3725
  min: c,
3726
3726
  max: g,
3727
3727
  ticks: {
@@ -3733,11 +3733,11 @@ function pi() {
3733
3733
  chartOptions: {
3734
3734
  ...a == null ? void 0 : a.chartOptions,
3735
3735
  scales: {
3736
- ...(M = a == null ? void 0 : a.chartOptions) == null ? void 0 : M.scales,
3736
+ ...(w = a == null ? void 0 : a.chartOptions) == null ? void 0 : w.scales,
3737
3737
  [i]: {
3738
3738
  // ...cardPreferences?.chartOptions?.scales?.[axis],
3739
3739
  type: r,
3740
- ...r === "linear" ? R : {}
3740
+ ...r === "linear" ? j : {}
3741
3741
  }
3742
3742
  }
3743
3743
  },
@@ -3750,12 +3750,12 @@ function pi() {
3750
3750
  };
3751
3751
  console.log(F), $(F);
3752
3752
  const ie = {
3753
- ...J,
3753
+ ...U,
3754
3754
  preferences: F
3755
3755
  };
3756
3756
  H(ie);
3757
3757
  }
3758
- return /* @__PURE__ */ s(Ge, { onOpenChange: (R) => n(R), children: [
3758
+ return /* @__PURE__ */ s(Ge, { onOpenChange: (j) => n(j), children: [
3759
3759
  /* @__PURE__ */ e(Ue, { asChild: !0, children: /* @__PURE__ */ e(K, { tooltip: "Scale Options", children: /* @__PURE__ */ e(Sl, { className: "size-4 rotate-45" }) }) }),
3760
3760
  /* @__PURE__ */ e(Je, { align: "center", className: "max-w-65", children: /* @__PURE__ */ s("div", { className: "grid gap-4", children: [
3761
3761
  /* @__PURE__ */ s("div", { className: "space-y-2", children: [
@@ -3764,13 +3764,13 @@ function pi() {
3764
3764
  ] }),
3765
3765
  /* @__PURE__ */ s("div", { className: "grid gap-2", children: [
3766
3766
  /* @__PURE__ */ s("div", { className: "grid grid-cols-3 items-center gap-2", children: [
3767
- /* @__PURE__ */ e(U, { htmlFor: "scale", children: "Type" }),
3767
+ /* @__PURE__ */ e(G, { htmlFor: "scale", children: "Type" }),
3768
3768
  /* @__PURE__ */ s(
3769
3769
  xe,
3770
3770
  {
3771
- disabled: L,
3771
+ disabled: T,
3772
3772
  value: r,
3773
- onValueChange: (R) => o(R),
3773
+ onValueChange: (j) => o(j),
3774
3774
  children: [
3775
3775
  /* @__PURE__ */ e(ve, { className: "col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e(Ne, {}) }),
3776
3776
  /* @__PURE__ */ e(Ce, { id: "type", children: /* @__PURE__ */ s(we, { children: [
@@ -3783,14 +3783,14 @@ function pi() {
3783
3783
  )
3784
3784
  ] }),
3785
3785
  r == "linear" && /* @__PURE__ */ s("div", { className: "grid grid-cols-3 items-center gap-2 py-1", children: [
3786
- /* @__PURE__ */ e(U, { htmlFor: "scale-option", children: "Setup" }),
3786
+ /* @__PURE__ */ e(G, { htmlFor: "scale-option", children: "Setup" }),
3787
3787
  /* @__PURE__ */ s(
3788
3788
  Dt,
3789
3789
  {
3790
- disabled: L,
3790
+ disabled: T,
3791
3791
  id: "scale-option",
3792
3792
  value: y,
3793
- onValueChange: (R) => f(R),
3793
+ onValueChange: (j) => f(j),
3794
3794
  className: "col-span-2 flex gap-3",
3795
3795
  defaultValue: "x",
3796
3796
  children: [
@@ -3806,7 +3806,7 @@ function pi() {
3806
3806
  }
3807
3807
  )
3808
3808
  ] }),
3809
- y === "custom" && r == "linear" && G(),
3809
+ y === "custom" && r == "linear" && B(),
3810
3810
  V(),
3811
3811
  /* @__PURE__ */ e(ps, {}),
3812
3812
  /* @__PURE__ */ e("div", { className: "grid grid-cols-3", children: /* @__PURE__ */ e(
@@ -3866,7 +3866,7 @@ function fi() {
3866
3866
  ] }),
3867
3867
  /* @__PURE__ */ s("div", { className: "grid gap-2", children: [
3868
3868
  /* @__PURE__ */ s("div", { className: "grid grid-cols-3 items-center gap-4", children: [
3869
- /* @__PURE__ */ e(U, { htmlFor: "displayLegend", children: "Display" }),
3869
+ /* @__PURE__ */ e(G, { htmlFor: "displayLegend", children: "Display" }),
3870
3870
  /* @__PURE__ */ e("div", { className: "col-span-2 flex h-8 items-center", children: /* @__PURE__ */ e(
3871
3871
  Ra,
3872
3872
  {
@@ -3878,7 +3878,7 @@ function fi() {
3878
3878
  ) })
3879
3879
  ] }),
3880
3880
  /* @__PURE__ */ s("div", { className: "grid grid-cols-3 items-center gap-4", children: [
3881
- /* @__PURE__ */ e(U, { htmlFor: "position", children: "Position" }),
3881
+ /* @__PURE__ */ e(G, { htmlFor: "position", children: "Position" }),
3882
3882
  /* @__PURE__ */ s("div", { className: "col-span-2 flex h-8 items-center", children: [
3883
3883
  /* @__PURE__ */ e(
3884
3884
  K,
@@ -3915,7 +3915,7 @@ function fi() {
3915
3915
  ] })
3916
3916
  ] }),
3917
3917
  /* @__PURE__ */ s("div", { className: "grid grid-cols-3 items-center gap-4", children: [
3918
- /* @__PURE__ */ e(U, { htmlFor: "align", children: "Align" }),
3918
+ /* @__PURE__ */ e(G, { htmlFor: "align", children: "Align" }),
3919
3919
  /* @__PURE__ */ s("div", { className: "col-span-2 flex h-8 items-center", children: [
3920
3920
  /* @__PURE__ */ e(
3921
3921
  K,
@@ -4009,7 +4009,7 @@ function yi() {
4009
4009
  ] }) : null;
4010
4010
  }
4011
4011
  function Yt() {
4012
- var G;
4012
+ var B;
4013
4013
  const t = u((C) => C.frame), n = u((C) => C.card), a = u((C) => C.isShowingVisual), l = u((C) => C.isSqlRunning), i = u((C) => C.pythonStdOut), r = u(
4014
4014
  (C) => {
4015
4015
  var E;
@@ -4054,7 +4054,7 @@ function Yt() {
4054
4054
  };
4055
4055
  o(E), g(C.id);
4056
4056
  }
4057
- function O() {
4057
+ function M() {
4058
4058
  const C = {
4059
4059
  ...n,
4060
4060
  id: et(),
@@ -4064,43 +4064,43 @@ function Yt() {
4064
4064
  v(C);
4065
4065
  }
4066
4066
  function S(C) {
4067
- const E = t.cards.filter((Q) => Q.id !== C), j = E[0], k = {
4067
+ const E = t.cards.filter((Q) => Q.id !== C), O = E[0], q = {
4068
4068
  ...t,
4069
4069
  cards: E,
4070
4070
  // update the active card to the first card in the frame
4071
- activeCardId: j.id
4071
+ activeCardId: O.id
4072
4072
  };
4073
- o(k), g(j.id), c(j);
4073
+ o(q), g(O.id), c(O);
4074
4074
  }
4075
4075
  function z(C) {
4076
4076
  g(C);
4077
4077
  }
4078
4078
  const D = (C, E) => {
4079
4079
  console.log("handleDragStart", E), C.dataTransfer.setData("tabIndex", E.toString());
4080
- }, q = (C) => {
4080
+ }, R = (C) => {
4081
4081
  C.preventDefault();
4082
4082
  }, $ = (C, E) => {
4083
- const j = C.dataTransfer.getData("tabIndex");
4084
- if (j === E.toString()) return;
4085
- const k = Array.from(t.cards), [Q] = k.splice(parseInt(j), 1);
4086
- k.splice(E, 0, Q), o({ ...t, cards: k });
4083
+ const O = C.dataTransfer.getData("tabIndex");
4084
+ if (O === E.toString()) return;
4085
+ const q = Array.from(t.cards), [Q] = q.splice(parseInt(O), 1);
4086
+ q.splice(E, 0, Q), o({ ...t, cards: q });
4087
4087
  };
4088
4088
  function H(C, E) {
4089
4089
  return C.cards.length === 1 && (E.displayTab === !0 || E.displayTab === void 0) || C.activeCardId !== E.id && (E.displayTab === !0 || E.displayTab === void 0) ? null : /* @__PURE__ */ e(
4090
4090
  "div",
4091
4091
  {
4092
4092
  onClick: () => {
4093
- const j = E.displayTab === void 0 ? !1 : !E.displayTab;
4094
- c({ ...E, displayTab: j }), d({
4093
+ const O = E.displayTab === void 0 ? !1 : !E.displayTab;
4094
+ c({ ...E, displayTab: O }), d({
4095
4095
  ...E,
4096
- displayTab: j
4096
+ displayTab: O
4097
4097
  });
4098
4098
  },
4099
4099
  children: E.displayTab === !0 || E.displayTab === void 0 ? /* @__PURE__ */ e(xs, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" }) : /* @__PURE__ */ e(ll, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" })
4100
4100
  }
4101
4101
  );
4102
4102
  }
4103
- function J() {
4103
+ function U() {
4104
4104
  return /* @__PURE__ */ s(
4105
4105
  Ea,
4106
4106
  {
@@ -4114,16 +4114,16 @@ function Yt() {
4114
4114
  ct,
4115
4115
  {
4116
4116
  text: C.tabTitle || C.title,
4117
- onSave: (j) => {
4118
- c({ ...n, tabTitle: j }), d({ ...n, tabTitle: j });
4117
+ onSave: (O) => {
4118
+ c({ ...n, tabTitle: O }), d({ ...n, tabTitle: O });
4119
4119
  },
4120
4120
  children: /* @__PURE__ */ s(
4121
4121
  kt,
4122
4122
  {
4123
4123
  draggable: !0,
4124
- onDragStart: (j) => D(j, E),
4125
- onDragOver: q,
4126
- onDrop: (j) => $(j, E),
4124
+ onDragStart: (O) => D(O, E),
4125
+ onDragOver: R,
4126
+ onDrop: (O) => $(O, E),
4127
4127
  className: "",
4128
4128
  value: C.id,
4129
4129
  children: [
@@ -4156,7 +4156,7 @@ function Yt() {
4156
4156
  {
4157
4157
  className: "invisible ml-1 h-8 px-2 hover:bg-muted-foreground/50 group-hover:visible",
4158
4158
  variant: "outline",
4159
- onClick: O,
4159
+ onClick: M,
4160
4160
  children: /* @__PURE__ */ e(al, { className: "h-4 w-4" })
4161
4161
  }
4162
4162
  )
@@ -4175,19 +4175,19 @@ function Yt() {
4175
4175
  }
4176
4176
  ) }) }) }) : /* @__PURE__ */ e(yt, { FallbackComponent: Fa, children: /* @__PURE__ */ e(cn, { className: "grow border-none shadow-none" }) });
4177
4177
  }
4178
- function L() {
4179
- const C = JSON.stringify(f == null ? void 0 : f.records, null, 2), E = new Blob([C], { type: "application/json" }), j = URL.createObjectURL(E), k = document.createElement("a");
4180
- k.href = j, k.download = `${n.title}.json`, k.click();
4178
+ function T() {
4179
+ const C = JSON.stringify(f == null ? void 0 : f.records, null, 2), E = new Blob([C], { type: "application/json" }), O = URL.createObjectURL(E), q = document.createElement("a");
4180
+ q.href = O, q.download = `${n.title}.json`, q.click();
4181
4181
  }
4182
- function B() {
4182
+ function J() {
4183
4183
  const E = [
4184
4184
  Object.keys(
4185
4185
  f == null ? void 0 : f.records.reduce((le, oe) => ({ ...le, ...oe }), {})
4186
4186
  ).join(","),
4187
4187
  ...((f == null ? void 0 : f.records) || []).map((le) => Object.values(le).join(","))
4188
4188
  ].join(`
4189
- `), j = new Blob([E], { type: "text/csv" }), k = URL.createObjectURL(j), Q = document.createElement("a");
4190
- Q.href = k, Q.download = `${n.title}.csv`, Q.click();
4189
+ `), O = new Blob([E], { type: "text/csv" }), q = URL.createObjectURL(O), Q = document.createElement("a");
4190
+ Q.href = q, Q.download = `${n.title}.csv`, Q.click();
4191
4191
  }
4192
4192
  function V() {
4193
4193
  const C = `Can you get the documentation for ${n.type} chart?`;
@@ -4208,7 +4208,7 @@ function Yt() {
4208
4208
  className: "h-7 w-fit px-1 font-mono text-xs text-muted-foreground/70",
4209
4209
  variant: "ghost",
4210
4210
  size: "icon",
4211
- onClick: B,
4211
+ onClick: J,
4212
4212
  children: /* @__PURE__ */ e(ci, { className: "size-4" })
4213
4213
  }
4214
4214
  ),
@@ -4218,7 +4218,7 @@ function Yt() {
4218
4218
  className: "h-7 w-fit px-1 font-mono text-xs text-muted-foreground/70",
4219
4219
  variant: "ghost",
4220
4220
  size: "icon",
4221
- onClick: L,
4221
+ onClick: T,
4222
4222
  children: /* @__PURE__ */ e(il, { strokeWidth: 1.5, className: "size-4" })
4223
4223
  }
4224
4224
  ),
@@ -4233,7 +4233,7 @@ function Yt() {
4233
4233
  /* @__PURE__ */ e(yi, {}),
4234
4234
  /* @__PURE__ */ e(xi, {})
4235
4235
  ] }),
4236
- a ? J() : /* @__PURE__ */ s(
4236
+ a ? U() : /* @__PURE__ */ s(
4237
4237
  tt,
4238
4238
  {
4239
4239
  className: "px-6",
@@ -4262,7 +4262,7 @@ function Yt() {
4262
4262
  className: "relative flex h-full min-h-0 w-full flex-1 basis-0",
4263
4263
  children: /* @__PURE__ */ s(Ie, { className: "relative flex h-full min-h-0 w-full flex-1 basis-0", children: [
4264
4264
  (f == null ? void 0 : f.records) && (f == null ? void 0 : f.records.length) > 0 && /* @__PURE__ */ e(ni, { data: (f == null ? void 0 : f.records) || [] }),
4265
- (x || (f == null ? void 0 : f.error)) && /* @__PURE__ */ e("span", { className: "font-mono text-xs", children: (x == null ? void 0 : x.message) || ((G = f == null ? void 0 : f.error) == null ? void 0 : G.message) }),
4265
+ (x || (f == null ? void 0 : f.error)) && /* @__PURE__ */ e("span", { className: "font-mono text-xs", children: (x == null ? void 0 : x.message) || ((B = f == null ? void 0 : f.error) == null ? void 0 : B.message) }),
4266
4266
  /* @__PURE__ */ e(He, { orientation: "horizontal" })
4267
4267
  ] })
4268
4268
  }
@@ -4289,7 +4289,7 @@ function xi() {
4289
4289
  (a) => a.actions.setIsShowingVisual
4290
4290
  );
4291
4291
  return /* @__PURE__ */ s("div", { className: "flex items-center space-x-2", children: [
4292
- /* @__PURE__ */ e(U, { htmlFor: "visualize", children: "Chart" }),
4292
+ /* @__PURE__ */ e(G, { htmlFor: "visualize", children: "Chart" }),
4293
4293
  /* @__PURE__ */ e(
4294
4294
  Ra,
4295
4295
  {
@@ -4354,7 +4354,7 @@ function Ye({
4354
4354
  className: X("space-y-4 [&_summary>svg]:open:-rotate-180", l),
4355
4355
  children: [
4356
4356
  /* @__PURE__ */ s("summary", { className: "flex cursor-pointer list-none items-center justify-between gap-4", children: [
4357
- /* @__PURE__ */ e(U, { children: n }),
4357
+ /* @__PURE__ */ e(G, { children: n }),
4358
4358
  /* @__PURE__ */ e(vs, { className: "h-4 w-4" })
4359
4359
  ] }),
4360
4360
  /* @__PURE__ */ e("div", { className: "transition-all ease-in-out", children: t })
@@ -4371,12 +4371,12 @@ function Ni() {
4371
4371
  ), g = (x = d == null ? void 0 : d.visuals) == null ? void 0 : x.find(
4372
4372
  (v) => v.name === (t == null ? void 0 : t.componentName)
4373
4373
  );
4374
- function h(v, O) {
4374
+ function h(v, M) {
4375
4375
  if (!t) return;
4376
4376
  const z = {
4377
4377
  ...(t == null ? void 0 : t.dataInputCardIds) || {},
4378
4378
  [v]: {
4379
- cardId: O,
4379
+ cardId: M,
4380
4380
  hookRef: null
4381
4381
  }
4382
4382
  };
@@ -4387,14 +4387,14 @@ function Ni() {
4387
4387
  }
4388
4388
  function y(v) {
4389
4389
  var S, z;
4390
- const O = (S = i == null ? void 0 : i.cards) == null ? void 0 : S.filter((D) => {
4391
- var q;
4392
- return ((q = D == null ? void 0 : D.customCardPreferences) == null ? void 0 : q.visualType) !== "multiple";
4390
+ const M = (S = i == null ? void 0 : i.cards) == null ? void 0 : S.filter((D) => {
4391
+ var R;
4392
+ return ((R = D == null ? void 0 : D.customCardPreferences) == null ? void 0 : R.visualType) !== "multiple";
4393
4393
  }).map((D) => ({
4394
4394
  value: D.id,
4395
4395
  label: D.tabTitle || D.title
4396
4396
  }));
4397
- return /* @__PURE__ */ e("div", { className: "space-y-2", children: (z = v == null ? void 0 : v.dataInputs) == null ? void 0 : z.map((D, q) => {
4397
+ return /* @__PURE__ */ e("div", { className: "space-y-2", children: (z = v == null ? void 0 : v.dataInputs) == null ? void 0 : z.map((D, R) => {
4398
4398
  var $, H;
4399
4399
  return /* @__PURE__ */ s(
4400
4400
  "div",
@@ -4407,55 +4407,55 @@ function Ni() {
4407
4407
  {
4408
4408
  className: "col-span-6 h-8 w-full justify-between",
4409
4409
  label: "",
4410
- options: O || [],
4411
- value: ((H = ($ = t == null ? void 0 : t.dataInputCardIds) == null ? void 0 : $[q]) == null ? void 0 : H.cardId) || "",
4412
- onValueChange: (J) => h(q, J)
4410
+ options: M || [],
4411
+ value: ((H = ($ = t == null ? void 0 : t.dataInputCardIds) == null ? void 0 : $[R]) == null ? void 0 : H.cardId) || "",
4412
+ onValueChange: (U) => h(R, U)
4413
4413
  }
4414
4414
  )
4415
4415
  ]
4416
4416
  },
4417
- q + Math.random()
4417
+ R + Math.random()
4418
4418
  );
4419
4419
  }) });
4420
4420
  }
4421
- function f(v, O, S = []) {
4421
+ function f(v, M, S = []) {
4422
4422
  var z, D;
4423
4423
  return t ? v === "input" ? /* @__PURE__ */ e(
4424
4424
  me,
4425
4425
  {
4426
4426
  className: `h-8 w-full ${Xe}`,
4427
- value: ((z = t == null ? void 0 : t.settings) == null ? void 0 : z[O]) || "",
4428
- onChange: (q) => {
4427
+ value: ((z = t == null ? void 0 : t.settings) == null ? void 0 : z[M]) || "",
4428
+ onChange: (R) => {
4429
4429
  o({
4430
4430
  ...t,
4431
4431
  settings: {
4432
4432
  ...t == null ? void 0 : t.settings,
4433
- [O]: q.target.value
4433
+ [M]: R.target.value
4434
4434
  }
4435
4435
  });
4436
4436
  }
4437
4437
  },
4438
- O
4438
+ M
4439
4439
  ) : v === "select" ? /* @__PURE__ */ e(
4440
4440
  be,
4441
4441
  {
4442
4442
  className: "h-8 w-full",
4443
4443
  label: "",
4444
4444
  options: S,
4445
- value: ((D = t == null ? void 0 : t.settings) == null ? void 0 : D[O]) || "",
4446
- onValueChange: (q) => {
4445
+ value: ((D = t == null ? void 0 : t.settings) == null ? void 0 : D[M]) || "",
4446
+ onValueChange: (R) => {
4447
4447
  o({
4448
4448
  ...t,
4449
- settings: { ...t == null ? void 0 : t.settings, [O]: q }
4449
+ settings: { ...t == null ? void 0 : t.settings, [M]: R }
4450
4450
  });
4451
4451
  }
4452
4452
  }
4453
4453
  ) : null : null;
4454
4454
  }
4455
4455
  function m(v) {
4456
- const O = Object.entries((v == null ? void 0 : v.settings) || {});
4457
- return /* @__PURE__ */ e("div", { className: "space-y-3", children: O.map(([S, z]) => /* @__PURE__ */ s("div", { className: "space-y-2", children: [
4458
- /* @__PURE__ */ e(U, { children: z.title }),
4456
+ const M = Object.entries((v == null ? void 0 : v.settings) || {});
4457
+ return /* @__PURE__ */ e("div", { className: "space-y-3", children: M.map(([S, z]) => /* @__PURE__ */ s("div", { className: "space-y-2", children: [
4458
+ /* @__PURE__ */ e(G, { children: z.title }),
4459
4459
  f(
4460
4460
  z.ui,
4461
4461
  S,
@@ -4504,7 +4504,7 @@ function Ni() {
4504
4504
  }
4505
4505
  ),
4506
4506
  ((t == null ? void 0 : t.type) === "component" || (t == null ? void 0 : t.type) === void 0) && t && /* @__PURE__ */ e(ae, { children: /* @__PURE__ */ s("div", { className: "space-y-2", children: [
4507
- /* @__PURE__ */ e(U, { children: "Component" }),
4507
+ /* @__PURE__ */ e(G, { children: "Component" }),
4508
4508
  /* @__PURE__ */ e("div", { className: "space-y-2 px-2", children: c && /* @__PURE__ */ e(
4509
4509
  be,
4510
4510
  {
@@ -4530,7 +4530,7 @@ function Ni() {
4530
4530
  /* @__PURE__ */ e(Me, { className: "my-4" }),
4531
4531
  ((N = l == null ? void 0 : l.customCardPreferences) == null ? void 0 : N.componentName) && /* @__PURE__ */ s(Ye, { summary: "Component Settings", children: [
4532
4532
  g && g.dataInputs && /* @__PURE__ */ s("div", { className: "space-y-3", children: [
4533
- /* @__PURE__ */ e(U, { children: "Input Mapping" }),
4533
+ /* @__PURE__ */ e(G, { children: "Input Mapping" }),
4534
4534
  /* @__PURE__ */ e("div", { className: "px-2", children: y(g) })
4535
4535
  ] }),
4536
4536
  g && g.settings && /* @__PURE__ */ e("div", { className: "space-y-3", children: /* @__PURE__ */ e("div", { className: "px-2", children: m(g) }) })
@@ -4610,7 +4610,7 @@ function qe() {
4610
4610
  );
4611
4611
  }
4612
4612
  return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
4613
- /* @__PURE__ */ e(U, { children: "On Click" }),
4613
+ /* @__PURE__ */ e(G, { children: "On Click" }),
4614
4614
  o == null ? void 0 : o.map((h, y) => {
4615
4615
  var f, m;
4616
4616
  return /* @__PURE__ */ e(
@@ -4792,11 +4792,11 @@ function gn() {
4792
4792
  }
4793
4793
  return r.length === 0 ? null : /* @__PURE__ */ s("div", { className: "space-y-4", children: [
4794
4794
  /* @__PURE__ */ s("div", { className: "space-y-2", children: [
4795
- /* @__PURE__ */ e(U, { children: l }),
4795
+ /* @__PURE__ */ e(G, { children: l }),
4796
4796
  /* @__PURE__ */ e("div", { className: "my-1 space-y-1", children: /* @__PURE__ */ e("div", { className: "rounded-md bg-muted/70 px-3 py-2 hover:bg-muted", children: /* @__PURE__ */ e("p", { title: c[0], children: yn(c[0]) }) }) })
4797
4797
  ] }),
4798
4798
  /* @__PURE__ */ s("div", { className: "space-y-2", children: [
4799
- /* @__PURE__ */ e(U, { children: i }),
4799
+ /* @__PURE__ */ e(G, { children: i }),
4800
4800
  /* @__PURE__ */ e("div", { className: "my-1 max-h-[125px] space-y-1 overflow-y-auto", children: d.map((g, h) => /* @__PURE__ */ e(Si, { col: g, idx: h }, g)) })
4801
4801
  ] })
4802
4802
  ] });
@@ -4868,24 +4868,24 @@ function Si({ col: t, idx: n }) {
4868
4868
  ] });
4869
4869
  }
4870
4870
  function bn() {
4871
- const t = u((m) => m.selectedConnectionId), n = u((m) => m.selectedDatamodelId), a = u((m) => m.selectedDatabaseName), l = u((m) => m.selectedSchemaName), i = u((m) => m.selectedTableName), r = T((m) => m.dashboard.filters) || [], o = T((m) => m.actions.addFilter), c = T((m) => m.actions.removeFilter), { removeFilterValues: d } = Be(), { modelItems: g, tableName: h, connectionType: y } = Ve();
4871
+ const t = u((m) => m.selectedConnectionId), n = u((m) => m.selectedDatamodelId), a = u((m) => m.selectedDatabaseName), l = u((m) => m.selectedSchemaName), i = u((m) => m.selectedTableName), r = A((m) => m.dashboard.filters) || [], o = A((m) => m.actions.addFilter), c = A((m) => m.actions.removeFilter), { removeFilterValues: d } = Be(), { modelItems: g, tableName: h, connectionType: y } = Ve();
4872
4872
  function f(m, b = "dashboard") {
4873
4873
  var $;
4874
- const x = ye(m.column_name), N = ye(a || ""), v = ye(l || ""), O = ye(h);
4874
+ const x = ye(m.column_name), N = ye(a || ""), v = ye(l || ""), M = ye(h);
4875
4875
  let S = ks(
4876
4876
  v,
4877
- O,
4877
+ M,
4878
4878
  y
4879
4879
  ), z = `${S}.${x}`;
4880
4880
  const D = ($ = g == null ? void 0 : g.find(
4881
4881
  (H) => H.id === n
4882
4882
  )) == null ? void 0 : $.name;
4883
4883
  n && n !== "none" && (z = `${Wt}.${D}.${x}`, S = `${Wt}.${D}`);
4884
- const q = r == null ? void 0 : r.find(
4885
- (H) => H.column === z && H.table === O && (H.database === N || H.database === a)
4884
+ const R = r == null ? void 0 : r.find(
4885
+ (H) => H.column === z && H.table === M && (H.database === N || H.database === a)
4886
4886
  );
4887
- if (q)
4888
- d(q.id), c(q.id);
4887
+ if (R)
4888
+ d(R.id), c(R.id);
4889
4889
  else {
4890
4890
  const H = et();
4891
4891
  return h === "api" && t ? (o({
@@ -4930,7 +4930,7 @@ function bn() {
4930
4930
  return { assignFilter: f };
4931
4931
  }
4932
4932
  function Ke() {
4933
- const t = T(
4933
+ const t = A(
4934
4934
  (c) => c.dashboard.filters
4935
4935
  ), n = u((c) => c.frame), { setFrame: a } = ne(), { columns: l } = Ve(), { assignFilter: i } = bn();
4936
4936
  function r(c) {
@@ -4939,7 +4939,7 @@ function Ke() {
4939
4939
  }
4940
4940
  const o = t == null ? void 0 : t.find((c) => c.id === n.filterId);
4941
4941
  return /* @__PURE__ */ s("div", { className: "space-y-3", children: [
4942
- /* @__PURE__ */ e(U, { children: "Card Filter" }),
4942
+ /* @__PURE__ */ e(G, { children: "Card Filter" }),
4943
4943
  /* @__PURE__ */ e(ki, { onSelect: r, columns: l }),
4944
4944
  o && /* @__PURE__ */ e(_a, { filter: o })
4945
4945
  ] });
@@ -5324,13 +5324,13 @@ function Ti() {
5324
5324
  }
5325
5325
  }
5326
5326
  ),
5327
- /* @__PURE__ */ e(U, { children: "Format Number" })
5327
+ /* @__PURE__ */ e(G, { children: "Format Number" })
5328
5328
  ] }),
5329
5329
  ((g = t == null ? void 0 : t.formatNumber) == null ? void 0 : g.enabled) === !0 && /* @__PURE__ */ s("div", { className: "flex flex-col gap-2", children: [
5330
5330
  /* @__PURE__ */ e("div", { children: /* @__PURE__ */ s("div", { className: "space-y-4 p-2", children: [
5331
5331
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
5332
5332
  /* @__PURE__ */ s("div", { className: "w-full space-y-1", children: [
5333
- /* @__PURE__ */ e(U, { children: "Locale" }),
5333
+ /* @__PURE__ */ e(G, { children: "Locale" }),
5334
5334
  /* @__PURE__ */ s(
5335
5335
  xe,
5336
5336
  {
@@ -5356,7 +5356,7 @@ function Ti() {
5356
5356
  )
5357
5357
  ] }),
5358
5358
  /* @__PURE__ */ s("div", { className: "w-full space-y-1", children: [
5359
- /* @__PURE__ */ e(U, { children: "Currency" }),
5359
+ /* @__PURE__ */ e(G, { children: "Currency" }),
5360
5360
  /* @__PURE__ */ s(
5361
5361
  xe,
5362
5362
  {
@@ -5384,7 +5384,7 @@ function Ti() {
5384
5384
  ] }),
5385
5385
  /* @__PURE__ */ s("div", { className: "flex gap-2", children: [
5386
5386
  /* @__PURE__ */ s("div", { className: "w-full space-y-1", children: [
5387
- /* @__PURE__ */ e(U, { children: "Decimals" }),
5387
+ /* @__PURE__ */ e(G, { children: "Decimals" }),
5388
5388
  /* @__PURE__ */ s(
5389
5389
  xe,
5390
5390
  {
@@ -5406,7 +5406,7 @@ function Ti() {
5406
5406
  )
5407
5407
  ] }),
5408
5408
  /* @__PURE__ */ s("div", { className: "w-full space-y-1", children: [
5409
- /* @__PURE__ */ e(U, { children: "Suffix" }),
5409
+ /* @__PURE__ */ e(G, { children: "Suffix" }),
5410
5410
  /* @__PURE__ */ e(
5411
5411
  me,
5412
5412
  {
@@ -5570,7 +5570,7 @@ const Li = [
5570
5570
  value: t
5571
5571
  }));
5572
5572
  function Vi() {
5573
- var d, g, h, y, f, m, b, x, N, v, O, S, z, D, q, $, H, J;
5573
+ var d, g, h, y, f, m, b, x, N, v, M, S, z, D, R, $, H, U;
5574
5574
  const t = u((p) => p.card), n = (g = (d = t == null ? void 0 : t.preferences) == null ? void 0 : d.mapVisualOptions) == null ? void 0 : g.topoJsonUrl, [a, l] = P(
5575
5575
  ((y = (h = t == null ? void 0 : t.preferences) == null ? void 0 : h.mapVisualOptions) == null ? void 0 : y.customTopoJsonUrl) || ""
5576
5576
  ), { setCardPreferences: i } = ne(), { data: r } = zt(t), o = Object.keys((r == null ? void 0 : r.objects) || {}).map((p) => ({
@@ -5635,7 +5635,7 @@ function Vi() {
5635
5635
  ),
5636
5636
  r && /* @__PURE__ */ s(ae, { children: [
5637
5637
  /* @__PURE__ */ s("div", { className: "space-y-1", children: [
5638
- /* @__PURE__ */ e(U, { children: "Map Object" }),
5638
+ /* @__PURE__ */ e(G, { children: "Map Object" }),
5639
5639
  /* @__PURE__ */ e(
5640
5640
  be,
5641
5641
  {
@@ -5644,11 +5644,11 @@ function Vi() {
5644
5644
  value: ((m = (f = t.preferences) == null ? void 0 : f.mapVisualOptions) == null ? void 0 : m.objectKey) || "",
5645
5645
  label: "Map Object",
5646
5646
  onValueChange: (p) => {
5647
- var L;
5647
+ var T;
5648
5648
  i({
5649
5649
  ...t.preferences,
5650
5650
  mapVisualOptions: {
5651
- ...(L = t.preferences) == null ? void 0 : L.mapVisualOptions,
5651
+ ...(T = t.preferences) == null ? void 0 : T.mapVisualOptions,
5652
5652
  objectKey: p
5653
5653
  }
5654
5654
  });
@@ -5657,7 +5657,7 @@ function Vi() {
5657
5657
  )
5658
5658
  ] }),
5659
5659
  /* @__PURE__ */ s("div", { className: "space-y-1", children: [
5660
- /* @__PURE__ */ e(U, { children: "Projection" }),
5660
+ /* @__PURE__ */ e(G, { children: "Projection" }),
5661
5661
  /* @__PURE__ */ e(
5662
5662
  be,
5663
5663
  {
@@ -5666,11 +5666,11 @@ function Vi() {
5666
5666
  value: ((x = (b = t.preferences) == null ? void 0 : b.mapVisualOptions) == null ? void 0 : x.projection) || "",
5667
5667
  label: "Projection",
5668
5668
  onValueChange: (p) => {
5669
- var L;
5669
+ var T;
5670
5670
  i({
5671
5671
  ...t.preferences,
5672
5672
  mapVisualOptions: {
5673
- ...(L = t.preferences) == null ? void 0 : L.mapVisualOptions,
5673
+ ...(T = t.preferences) == null ? void 0 : T.mapVisualOptions,
5674
5674
  projection: p
5675
5675
  }
5676
5676
  });
@@ -5679,7 +5679,7 @@ function Vi() {
5679
5679
  )
5680
5680
  ] }),
5681
5681
  /* @__PURE__ */ s("div", { className: "space-y-1", children: [
5682
- /* @__PURE__ */ e(U, { children: "Colors" }),
5682
+ /* @__PURE__ */ e(G, { children: "Colors" }),
5683
5683
  /* @__PURE__ */ e(
5684
5684
  be,
5685
5685
  {
@@ -5688,11 +5688,11 @@ function Vi() {
5688
5688
  value: ((v = (N = t.preferences) == null ? void 0 : N.mapVisualOptions) == null ? void 0 : v.colorScale) || "",
5689
5689
  label: "Select Color Scale",
5690
5690
  onValueChange: (p) => {
5691
- var L;
5691
+ var T;
5692
5692
  i({
5693
5693
  ...t.preferences,
5694
5694
  mapVisualOptions: {
5695
- ...(L = t.preferences) == null ? void 0 : L.mapVisualOptions,
5695
+ ...(T = t.preferences) == null ? void 0 : T.mapVisualOptions,
5696
5696
  colorScale: p
5697
5697
  }
5698
5698
  });
@@ -5710,58 +5710,58 @@ function Vi() {
5710
5710
  className: `h-9 w-full ${Xe}`,
5711
5711
  type: "number",
5712
5712
  step: 0.1,
5713
- value: ((S = (O = t.preferences) == null ? void 0 : O.mapVisualOptions) == null ? void 0 : S.projectionScale) || 1,
5713
+ value: ((S = (M = t.preferences) == null ? void 0 : M.mapVisualOptions) == null ? void 0 : S.projectionScale) || 1,
5714
5714
  onChange: (p) => {
5715
- var L;
5715
+ var T;
5716
5716
  i({
5717
5717
  ...t.preferences,
5718
5718
  mapVisualOptions: {
5719
- ...(L = t.preferences) == null ? void 0 : L.mapVisualOptions,
5719
+ ...(T = t.preferences) == null ? void 0 : T.mapVisualOptions,
5720
5720
  projectionScale: Number(p.target.value)
5721
5721
  }
5722
5722
  });
5723
5723
  }
5724
5724
  }
5725
5725
  ),
5726
- /* @__PURE__ */ e(U, { children: "X" }),
5726
+ /* @__PURE__ */ e(G, { children: "X" }),
5727
5727
  /* @__PURE__ */ e(
5728
5728
  me,
5729
5729
  {
5730
5730
  className: `h-9 w-full ${Xe}`,
5731
5731
  type: "number",
5732
5732
  step: 10,
5733
- value: ((q = (D = (z = t.preferences) == null ? void 0 : z.mapVisualOptions) == null ? void 0 : D.projectionOffset) == null ? void 0 : q[0]) || 0,
5733
+ value: ((R = (D = (z = t.preferences) == null ? void 0 : z.mapVisualOptions) == null ? void 0 : D.projectionOffset) == null ? void 0 : R[0]) || 0,
5734
5734
  onChange: (p) => {
5735
- var L, B, V, G;
5735
+ var T, J, V, B;
5736
5736
  i({
5737
5737
  ...t.preferences,
5738
5738
  mapVisualOptions: {
5739
- ...(L = t.preferences) == null ? void 0 : L.mapVisualOptions,
5739
+ ...(T = t.preferences) == null ? void 0 : T.mapVisualOptions,
5740
5740
  projectionOffset: [
5741
5741
  Number(p.target.value),
5742
- ((G = (V = (B = t.preferences) == null ? void 0 : B.mapVisualOptions) == null ? void 0 : V.projectionOffset) == null ? void 0 : G[1]) || 0
5742
+ ((B = (V = (J = t.preferences) == null ? void 0 : J.mapVisualOptions) == null ? void 0 : V.projectionOffset) == null ? void 0 : B[1]) || 0
5743
5743
  ]
5744
5744
  }
5745
5745
  });
5746
5746
  }
5747
5747
  }
5748
5748
  ),
5749
- /* @__PURE__ */ e(U, { children: "Y" }),
5749
+ /* @__PURE__ */ e(G, { children: "Y" }),
5750
5750
  /* @__PURE__ */ e(
5751
5751
  me,
5752
5752
  {
5753
5753
  className: `h-9 w-full ${Xe}`,
5754
5754
  type: "number",
5755
5755
  step: 10,
5756
- value: ((J = (H = ($ = t.preferences) == null ? void 0 : $.mapVisualOptions) == null ? void 0 : H.projectionOffset) == null ? void 0 : J[1]) || 0,
5756
+ value: ((U = (H = ($ = t.preferences) == null ? void 0 : $.mapVisualOptions) == null ? void 0 : H.projectionOffset) == null ? void 0 : U[1]) || 0,
5757
5757
  onChange: (p) => {
5758
- var L, B, V, G;
5758
+ var T, J, V, B;
5759
5759
  i({
5760
5760
  ...t.preferences,
5761
5761
  mapVisualOptions: {
5762
- ...(L = t.preferences) == null ? void 0 : L.mapVisualOptions,
5762
+ ...(T = t.preferences) == null ? void 0 : T.mapVisualOptions,
5763
5763
  projectionOffset: [
5764
- ((G = (V = (B = t.preferences) == null ? void 0 : B.mapVisualOptions) == null ? void 0 : V.projectionOffset) == null ? void 0 : G[0]) || 0,
5764
+ ((B = (V = (J = t.preferences) == null ? void 0 : J.mapVisualOptions) == null ? void 0 : V.projectionOffset) == null ? void 0 : B[0]) || 0,
5765
5765
  Number(p.target.value)
5766
5766
  ]
5767
5767
  }
@@ -5861,7 +5861,7 @@ function Ri() {
5861
5861
  ), { setSortChart: n } = ne();
5862
5862
  function a() {
5863
5863
  return /* @__PURE__ */ s("div", { className: "space-y-2", children: [
5864
- /* @__PURE__ */ e(U, { children: "Sort" }),
5864
+ /* @__PURE__ */ e(G, { children: "Sort" }),
5865
5865
  /* @__PURE__ */ e(
5866
5866
  be,
5867
5867
  {
@@ -6116,52 +6116,51 @@ function Bi() {
6116
6116
  const Gi = !1, Ui = [
6117
6117
  {
6118
6118
  title: "Write a query for",
6119
- subtitle: "orders over last 3 months"
6119
+ subtitle: "orders by month"
6120
6120
  },
6121
6121
  {
6122
6122
  title: "Create a bar chart for",
6123
- subtitle: "sales by product category"
6123
+ subtitle: "sales by category"
6124
6124
  }
6125
6125
  ];
6126
6126
  function Ji() {
6127
- const t = $e(null), n = $e(null), [a, l] = P(!1), [i, r] = P(Gi), [o, c] = P(!1), d = u((k) => k.actions.setCardSql), g = u((k) => k.actions.setRunSql), h = u((k) => k.showAIDialog), { setShowAIDialog: y } = ne(), {
6127
+ const t = $e(null), n = $e(null), [a, l] = P(!1), [i, r] = P(Gi), [o, c] = P(!1), d = u((O) => O.actions.setCardSql), g = u((O) => O.actions.setRunSql), h = u((O) => O.showAIDialog), { setShowAIDialog: y } = ne(), {
6128
6128
  messages: f,
6129
6129
  setMessages: m,
6130
6130
  reload: b,
6131
6131
  append: x,
6132
6132
  input: N,
6133
6133
  setInput: v,
6134
- isLoading: O,
6134
+ isLoading: M,
6135
6135
  handleAddCurrentTableToScope: S,
6136
6136
  removeFromCurrentSelections: z,
6137
6137
  currentAssitantScope: D,
6138
- setCurrentAssitantScope: q,
6139
- handleInputChange: $,
6140
- handleSubmit: H,
6141
- stop: J,
6142
- chatStatus: p,
6143
- toolStatus: L,
6144
- llmUsage: B
6138
+ handleInputChange: R,
6139
+ handleSubmit: $,
6140
+ stop: H,
6141
+ chatStatus: U,
6142
+ toolStatus: p,
6143
+ llmUsage: T
6145
6144
  } = on();
6146
6145
  Is({
6147
6146
  scrollContainerRef: t,
6148
6147
  inputRef: n,
6149
6148
  messages: f
6150
6149
  }), re(() => {
6151
- var k;
6152
- h && ((k = n.current) == null || k.focus());
6150
+ var O;
6151
+ h && ((O = n.current) == null || O.focus());
6153
6152
  }, [h]);
6154
- function V(k) {
6155
- d(k), g(!0);
6153
+ function J(O) {
6154
+ d(O), g(!0);
6156
6155
  }
6157
- function G(k) {
6158
- const Q = {
6156
+ function V(O) {
6157
+ const q = {
6159
6158
  role: "user",
6160
- content: k.title + " " + k.subtitle
6159
+ content: O.title + " " + O.subtitle
6161
6160
  };
6162
- x(Q);
6161
+ x(q);
6163
6162
  }
6164
- function C() {
6163
+ function B() {
6165
6164
  return /* @__PURE__ */ s(ra, { children: [
6166
6165
  /* @__PURE__ */ e(oa, { asChild: !0, children: /* @__PURE__ */ e(_, { className: "h-7 p-2", size: "sm", variant: "ghost", children: /* @__PURE__ */ e(Wa, { className: "size-3.5 text-muted-foreground/70 hover:text-muted-foreground" }) }) }),
6167
6166
  /* @__PURE__ */ s(ca, { align: "end", children: [
@@ -6194,34 +6193,34 @@ function Ji() {
6194
6193
  ] })
6195
6194
  ] });
6196
6195
  }
6197
- function E() {
6196
+ function C() {
6198
6197
  return /* @__PURE__ */ s("div", { "data-role": "header", children: [
6199
6198
  /* @__PURE__ */ e("div", { className: "text-lg font-semibold", children: "Assistant" }),
6200
6199
  D && D.length > 0 && /* @__PURE__ */ s("div", { className: "mt-2 flex flex-wrap items-center gap-2", children: [
6201
6200
  /* @__PURE__ */ e("span", { className: "text-xs text-muted-foreground", children: "Context:" }),
6202
- D == null ? void 0 : D.map((k, Q) => /* @__PURE__ */ s(
6201
+ D == null ? void 0 : D.map((O, q) => /* @__PURE__ */ s(
6203
6202
  "div",
6204
6203
  {
6205
6204
  className: "flex items-center gap-2 rounded-md border border-border bg-muted px-2 py-1 text-xs",
6206
6205
  children: [
6207
6206
  Ct({
6208
- schemaName: k.schemaName || "",
6209
- tableName: k.tableName || "",
6210
- modelName: k.datamodelName || "",
6211
- connectionType: k.connectionType || ""
6207
+ schemaName: O.schemaName || "",
6208
+ tableName: O.tableName || "",
6209
+ modelName: O.datamodelName || "",
6210
+ connectionType: O.connectionType || ""
6212
6211
  }),
6213
6212
  /* @__PURE__ */ e(
6214
6213
  "button",
6215
6214
  {
6216
6215
  onClick: () => {
6217
- z(k);
6216
+ z(O);
6218
6217
  },
6219
6218
  children: /* @__PURE__ */ e(Pe, { className: "size-3 text-muted-foreground hover:text-foreground" })
6220
6219
  }
6221
6220
  )
6222
6221
  ]
6223
6222
  },
6224
- Q
6223
+ q
6225
6224
  ))
6226
6225
  ] }),
6227
6226
  (D == null ? void 0 : D.length) === 0 && /* @__PURE__ */ s("div", { className: "mt-2 flex items-center gap-2", children: [
@@ -6242,7 +6241,7 @@ function Ji() {
6242
6241
  ] })
6243
6242
  ] });
6244
6243
  }
6245
- const j = (N == null ? void 0 : N.length) === 0 && (f == null ? void 0 : f.filter((k) => k.role === "user").length) === 0;
6244
+ const E = (N == null ? void 0 : N.length) === 0 && (f == null ? void 0 : f.filter((O) => O.role === "user").length) === 0;
6246
6245
  return /* @__PURE__ */ s(
6247
6246
  "div",
6248
6247
  {
@@ -6255,9 +6254,9 @@ function Ji() {
6255
6254
  "data-role": "header-section",
6256
6255
  className: "flex items-start justify-between gap-2",
6257
6256
  children: [
6258
- E(),
6257
+ C(),
6259
6258
  /* @__PURE__ */ s("div", { "data-role": "header-actions", className: "flex items-center", children: [
6260
- C(),
6259
+ B(),
6261
6260
  /* @__PURE__ */ e(
6262
6261
  _,
6263
6262
  {
@@ -6265,7 +6264,7 @@ function Ji() {
6265
6264
  size: "sm",
6266
6265
  variant: "ghost",
6267
6266
  onClick: () => {
6268
- m([]), q([]), b();
6267
+ m([]), b();
6269
6268
  },
6270
6269
  children: /* @__PURE__ */ e(zs, { className: "size-3.5 text-muted-foreground" })
6271
6270
  }
@@ -6297,48 +6296,48 @@ function Ji() {
6297
6296
  {
6298
6297
  messages: f,
6299
6298
  showTools: i,
6300
- handleRun: V,
6299
+ handleRun: J,
6301
6300
  showSystemMessage: o
6302
6301
  }
6303
6302
  ),
6304
6303
  /* @__PURE__ */ e(
6305
6304
  As,
6306
6305
  {
6307
- status: Ls(p, L),
6308
- isLoading: O
6306
+ status: Ls(U, p),
6307
+ isLoading: M
6309
6308
  }
6310
6309
  )
6311
6310
  ] })
6312
6311
  }
6313
6312
  ),
6314
- j && /* @__PURE__ */ e(
6313
+ E && /* @__PURE__ */ e(
6315
6314
  Fs,
6316
6315
  {
6317
- onClick: G,
6316
+ onClick: V,
6318
6317
  placeholders: Ui
6319
6318
  }
6320
6319
  ),
6321
6320
  /* @__PURE__ */ e(
6322
6321
  Es,
6323
6322
  {
6324
- stop: J,
6323
+ stop: H,
6325
6324
  ref: n,
6326
6325
  setInput: v,
6327
6326
  input: N,
6328
- handleInputChange: $,
6329
- handleSubmit: H,
6330
- isLoading: O
6327
+ handleInputChange: R,
6328
+ handleSubmit: $,
6329
+ isLoading: M
6331
6330
  }
6332
6331
  ),
6333
- B && a && /* @__PURE__ */ e("div", { className: "flex h-8 items-center justify-between", children: /* @__PURE__ */ s("div", { className: "text-xs text-muted-foreground", children: [
6332
+ T && a && /* @__PURE__ */ e("div", { className: "flex h-8 items-center justify-between", children: /* @__PURE__ */ s("div", { className: "text-xs text-muted-foreground", children: [
6334
6333
  "Usage: ",
6335
- B.promptTokens,
6334
+ T.promptTokens,
6336
6335
  " prompt tokens,",
6337
6336
  " ",
6338
- B.completionTokens,
6337
+ T.completionTokens,
6339
6338
  " completion tokens,",
6340
6339
  " ",
6341
- B.totalTokens,
6340
+ T.totalTokens,
6342
6341
  " total tokens"
6343
6342
  ] }) })
6344
6343
  ]
@@ -6388,8 +6387,8 @@ function Wi({ authToken: t, onSave: n, onClose: a }) {
6388
6387
  ] }) });
6389
6388
  }
6390
6389
  function Ki() {
6391
- T((o) => o.selectedCardId);
6392
- const t = T((o) => o.selectedSheetId), { setIsVisualEditing: n } = T((o) => o.actions), a = T((o) => o.isVisualEditing), l = T((o) => o.actions.updateFrame);
6390
+ A((o) => o.selectedCardId);
6391
+ const t = A((o) => o.selectedSheetId), { setIsVisualEditing: n } = A((o) => o.actions), a = A((o) => o.isVisualEditing), l = A((o) => o.actions.updateFrame);
6393
6392
  function i(o) {
6394
6393
  t && (l(t, o), n(!1));
6395
6394
  }
@@ -6408,7 +6407,7 @@ function Ki() {
6408
6407
  );
6409
6408
  }
6410
6409
  function Qi() {
6411
- const t = u((r) => r.selectedDatabaseName), n = u((r) => r.selectedTableName), a = T((r) => r.dashboard.filters) || [], { columns: l } = Ve(), { assignFilter: i } = bn();
6410
+ const t = u((r) => r.selectedDatabaseName), n = u((r) => r.selectedTableName), a = A((r) => r.dashboard.filters) || [], { columns: l } = Ve(), { assignFilter: i } = bn();
6412
6411
  return /* @__PURE__ */ e(Ie, { className: "flex-1 basis-0 flex-col px-3", children: l == null ? void 0 : l.map((r) => {
6413
6412
  const o = a == null ? void 0 : a.find(
6414
6413
  (c) => c.column === ye(r.column_name) && c.table === n && c.database === t
@@ -6433,13 +6432,13 @@ function Qi() {
6433
6432
  }) });
6434
6433
  }
6435
6434
  function Zi() {
6436
- T((n) => n.showFilters);
6437
- const t = T(
6435
+ A((n) => n.showFilters);
6436
+ const t = A(
6438
6437
  (n) => n.actions.setShowFilters
6439
6438
  );
6440
6439
  return /* @__PURE__ */ s("section", { className: "relative flex min-w-[320px] grow flex-col border-l px-1", children: [
6441
6440
  /* @__PURE__ */ s("div", { className: "mt-4 flex items-center justify-between gap-2 px-3", children: [
6442
- /* @__PURE__ */ e(U, { className: "px-2 text-lg", children: "Filters" }),
6441
+ /* @__PURE__ */ e(G, { className: "px-2 text-lg", children: "Filters" }),
6443
6442
  /* @__PURE__ */ e(
6444
6443
  _,
6445
6444
  {
@@ -6465,7 +6464,7 @@ function Zi() {
6465
6464
  ] });
6466
6465
  }
6467
6466
  function Xi() {
6468
- const t = T((l) => l.dashboard.filters), n = T((l) => l.theme), a = t == null ? void 0 : t.filter((l) => l.hide);
6467
+ const t = A((l) => l.dashboard.filters), n = A((l) => l.theme), a = t == null ? void 0 : t.filter((l) => l.hide);
6469
6468
  return a != null && a.length ? /* @__PURE__ */ e(
6470
6469
  "div",
6471
6470
  {
@@ -6488,7 +6487,7 @@ function Xi() {
6488
6487
  ) : null;
6489
6488
  }
6490
6489
  function Yi() {
6491
- const t = T((l) => l.showFilters), n = T((l) => l.isVisualEditing), a = T(
6490
+ const t = A((l) => l.showFilters), n = A((l) => l.isVisualEditing), a = A(
6492
6491
  (l) => l.isDashboardEditing
6493
6492
  );
6494
6493
  return /* @__PURE__ */ s(
@@ -6512,9 +6511,9 @@ function Yi() {
6512
6511
  );
6513
6512
  }
6514
6513
  function er() {
6515
- const t = T((i) => i.dashboard), n = T((i) => i.actions.setDashboard), a = T(
6514
+ const t = A((i) => i.dashboard), n = A((i) => i.actions.setDashboard), a = A(
6516
6515
  (i) => i.showDashboardJSON
6517
- ), l = T(
6516
+ ), l = A(
6518
6517
  (i) => i.actions.setShowDashboardJSON
6519
6518
  );
6520
6519
  return /* @__PURE__ */ s(
@@ -6614,7 +6613,7 @@ export {
6614
6613
  ht as resolveDatamodelName,
6615
6614
  fr as useCard,
6616
6615
  Be as useDashboardActions,
6617
- T as useDashboardStore,
6616
+ A as useDashboardStore,
6618
6617
  gr as useDateFilterHook,
6619
6618
  ne as useEditorActions,
6620
6619
  Ve as useEditorAside,