semaphor 0.0.78 → 0.0.80

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
- import { c as q, p as hs, u as z, n as Fs, o as Oe, q as e, r as Is, s as Ts, t as F, j as Ds, v as Ms, w as Ls, x as Es, y as As, L as H, z as re, A as oa, E as ca, H as da, J as ua, K as rt, M as it, N as ot, O as Ys, Q as W, R as Je, V as u, W as ct, F as ha, Y as We, Z as Ye, _ as Vs, $ as ma, a0 as qs, a1 as fe, a2 as ge, a3 as je, a4 as be, a5 as ke, a6 as ye, a7 as Q, T as Rs, a8 as _s, a9 as Hs, aa as $s, ab as xa, ac as pa, ad as xe, ae as dt, af as ut, ag as fa, ah as ht, C as mt, ai as xt, aj as ga, B as pt, ak as Ps, al as ft, am as Xs, an as ja, ao as Ns, ap as me, aq as we, ar as de, as as ms, at as ba, au as gt, av as jt, aw as ya, ax as bt, ay as yt, az as vt, aA as Ct, aB as Nt, aC as qe, aD as Ss, aE as St, a as wt, aF as Ke, aG as ws, aH as Ve, aI as ks, aJ as kt, aK as zt, aL as Ot, aM as Ft, aN as It, aO as Tt, aP as Cs, aQ as Dt, aR as Zs, aS as Mt, aT as ea, aU as Lt, aV as Et, aW as At, aX as va, aY as ce, aZ as Bs, a_ as Ca, a$ as Vt, b0 as qt, b1 as rs, b2 as Rt, b3 as _t, b4 as Ht, b5 as $t, b6 as Pt, b7 as Bt, b8 as Ut, l as Gt, b9 as xs, ba as Na, bb as Sa, bc as wa, bd as is, be as ka, bf as os, bg as sa, bh as Kt, bi as Qt, bj as ps, bk as fs, bl as gs, bm as Jt, bn as Wt, X as za, bo as Yt, bp as Xt, bq as Zt, br as js, bs as Te, f as en, bt as Ge, bu as Oa, bv as sn, bw as an, bx as cs, by as tn, bz as nn, bA as ln, bB as aa, bC as rn, bD as on, bE as cn, bF as dn, bG as un, bH as hn, bI as mn, bJ as xn, bK as De, bL as U, bM as G, bN as Us, bO as K, bP as pn, bQ as Fa, bR as fn, bS as gn, bT as jn, bU as bn, bV as yn, bW as vn, bX as Cn, bY as Nn, bZ as Sn } from "./index-zdZ1lpAC.js";
1
+ import { c as q, p as hs, u as O, n as Is, o as ve, q as e, r as Ts, s as Ds, t as F, j as Ms, v as Ls, w as Es, x as As, y as Vs, L as H, z as re, A as oa, E as ca, H as da, J as ua, K as rt, M as it, N as ot, O as Ys, Q as W, R as Je, V as u, W as ct, F as ha, Y as We, Z as Ye, _ as qs, $ as ma, a0 as Rs, a1 as fe, a2 as ge, a3 as je, a4 as be, a5 as ze, a6 as ye, a7 as Q, T as _s, a8 as Hs, a9 as $s, aa as Ps, ab as xa, ac as pa, ad as xe, ae as dt, af as ut, ag as fa, ah as ht, C as mt, ai as xt, aj as ga, B as pt, ak as ms, al as ft, am as Xs, an as ja, ao as Ss, ap as me, aq as ke, ar as de, as as xs, at as ba, au as gt, av as jt, aw as ya, ax as bt, ay as yt, az as vt, aA as Ct, aB as Nt, aC as qe, aD as ws, aE as St, a as wt, aF as Ke, aG as ks, aH as Ve, aI as zs, aJ as kt, aK as zt, aL as Ot, aM as Ft, aN as It, aO as Tt, aP as Ns, aQ as Dt, aR as Zs, aS as Mt, aT as ea, aU as Lt, aV as Et, aW as At, aX as Vt, aY as va, aZ as ce, a_ as Bs, a$ as Ca, b0 as qt, b1 as Rt, b2 as rs, b3 as _t, b4 as Ht, b5 as $t, b6 as Pt, b7 as Bt, b8 as Ut, b9 as Gt, l as Kt, ba as ps, bb as Na, bc as Sa, bd as wa, be as is, bf as ka, bg as os, bh as sa, bi as Qt, bj as Jt, bk as fs, bl as gs, bm as js, bn as Wt, bo as Yt, X as za, bp as Xt, bq as Zt, br as en, bs, bt as Te, f as sn, bu as Ge, bv as Oa, bw as an, bx as tn, by as cs, bz as nn, bA as ln, bB as rn, bC as aa, bD as on, bE as cn, bF as dn, bG as un, bH as hn, bI as mn, bJ as xn, bK as pn, bL as De, bM as U, bN as G, bO as Us, bP as K, bQ as fn, bR as Fa, bS as gn, bT as jn, bU as bn, bV as yn, bW as vn, bX as Cn, bY as Nn, bZ as Sn, b_ as wn } from "./index-M3d2p2oT.js";
2
2
  import * as ta from "react";
3
- import ze, { useState as R, useMemo as zs, useEffect as Z, useRef as Xe, Suspense as wn } from "react";
3
+ import Oe, { useState as R, useMemo as Os, useEffect as Z, useRef as Xe, Suspense as kn } from "react";
4
4
  import "react-dom";
5
5
  /**
6
6
  * @license lucide-react v0.453.0 - ISC
@@ -8,7 +8,7 @@ import "react-dom";
8
8
  * This source code is licensed under the ISC license.
9
9
  * See the LICENSE file in the root directory of this source tree.
10
10
  */
11
- const kn = q("Box", [
11
+ const zn = q("Box", [
12
12
  [
13
13
  "path",
14
14
  {
@@ -25,7 +25,7 @@ const kn = q("Box", [
25
25
  * This source code is licensed under the ISC license.
26
26
  * See the LICENSE file in the root directory of this source tree.
27
27
  */
28
- const zn = q("ChartArea", [
28
+ const On = q("ChartArea", [
29
29
  ["path", { d: "M3 3v16a2 2 0 0 0 2 2h16", key: "c24i48" }],
30
30
  [
31
31
  "path",
@@ -104,7 +104,7 @@ const Da = q("ChartScatter", [
104
104
  * This source code is licensed under the ISC license.
105
105
  * See the LICENSE file in the root directory of this source tree.
106
106
  */
107
- const On = q("CircleX", [
107
+ const Fn = q("CircleX", [
108
108
  ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
109
109
  ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
110
110
  ["path", { d: "m9 9 6 6", key: "z0biqf" }]
@@ -115,7 +115,7 @@ const On = q("CircleX", [
115
115
  * This source code is licensed under the ISC license.
116
116
  * See the LICENSE file in the root directory of this source tree.
117
117
  */
118
- const Fn = q("CopyPlus", [
118
+ const In = q("CopyPlus", [
119
119
  ["line", { x1: "15", x2: "15", y1: "12", y2: "18", key: "1p7wdc" }],
120
120
  ["line", { x1: "12", x2: "18", y1: "15", y2: "15", key: "1nscbv" }],
121
121
  ["rect", { width: "14", height: "14", x: "8", y: "8", rx: "2", ry: "2", key: "17jyea" }],
@@ -127,7 +127,7 @@ const Fn = q("CopyPlus", [
127
127
  * This source code is licensed under the ISC license.
128
128
  * See the LICENSE file in the root directory of this source tree.
129
129
  */
130
- const In = q("Database", [
130
+ const Tn = q("Database", [
131
131
  ["ellipse", { cx: "12", cy: "5", rx: "9", ry: "3", key: "msslwz" }],
132
132
  ["path", { d: "M3 5V19A9 3 0 0 0 21 19V5", key: "1wlel7" }],
133
133
  ["path", { d: "M3 12A9 3 0 0 0 21 12", key: "mv7ke4" }]
@@ -149,7 +149,7 @@ const Ma = q("EllipsisVertical", [
149
149
  * This source code is licensed under the ISC license.
150
150
  * See the LICENSE file in the root directory of this source tree.
151
151
  */
152
- const Tn = q("Eraser", [
152
+ const Dn = q("Eraser", [
153
153
  [
154
154
  "path",
155
155
  {
@@ -166,7 +166,7 @@ const Tn = q("Eraser", [
166
166
  * This source code is licensed under the ISC license.
167
167
  * See the LICENSE file in the root directory of this source tree.
168
168
  */
169
- const Dn = q("EyeClosed", [
169
+ const Mn = q("EyeClosed", [
170
170
  ["path", { d: "m15 18-.722-3.25", key: "1j64jw" }],
171
171
  ["path", { d: "M2 8a10.645 10.645 0 0 0 20 0", key: "1e7gxb" }],
172
172
  ["path", { d: "m20 15-1.726-2.05", key: "1cnuld" }],
@@ -179,7 +179,7 @@ const Dn = q("EyeClosed", [
179
179
  * This source code is licensed under the ISC license.
180
180
  * See the LICENSE file in the root directory of this source tree.
181
181
  */
182
- const Mn = q("Eye", [
182
+ const Ln = q("Eye", [
183
183
  [
184
184
  "path",
185
185
  {
@@ -195,7 +195,7 @@ const Mn = q("Eye", [
195
195
  * This source code is licensed under the ISC license.
196
196
  * See the LICENSE file in the root directory of this source tree.
197
197
  */
198
- const Ln = q("Glasses", [
198
+ const En = q("Glasses", [
199
199
  ["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
200
200
  ["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
201
201
  ["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
@@ -208,7 +208,7 @@ const Ln = q("Glasses", [
208
208
  * This source code is licensed under the ISC license.
209
209
  * See the LICENSE file in the root directory of this source tree.
210
210
  */
211
- const En = q("Hammer", [
211
+ const An = q("Hammer", [
212
212
  ["path", { d: "m15 12-8.373 8.373a1 1 0 1 1-3-3L12 9", key: "eefl8a" }],
213
213
  ["path", { d: "m18 15 4-4", key: "16gjal" }],
214
214
  [
@@ -225,7 +225,7 @@ const En = q("Hammer", [
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 An = q("Hash", [
228
+ const Vn = q("Hash", [
229
229
  ["line", { x1: "4", x2: "20", y1: "9", y2: "9", key: "4lhtct" }],
230
230
  ["line", { x1: "4", x2: "20", y1: "15", y2: "15", key: "vyu0kd" }],
231
231
  ["line", { x1: "10", x2: "8", y1: "3", y2: "21", key: "1ggp8o" }],
@@ -237,7 +237,7 @@ const An = q("Hash", [
237
237
  * This source code is licensed under the ISC license.
238
238
  * See the LICENSE file in the root directory of this source tree.
239
239
  */
240
- const Vn = q("House", [
240
+ const qn = q("House", [
241
241
  ["path", { d: "M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8", key: "5wwlr5" }],
242
242
  [
243
243
  "path",
@@ -264,7 +264,7 @@ const La = q("Key", [
264
264
  * This source code is licensed under the ISC license.
265
265
  * See the LICENSE file in the root directory of this source tree.
266
266
  */
267
- const qn = q("ListEnd", [
267
+ const Rn = q("ListEnd", [
268
268
  ["path", { d: "M16 12H3", key: "1a2rj7" }],
269
269
  ["path", { d: "M16 6H3", key: "1wxfjs" }],
270
270
  ["path", { d: "M10 18H3", key: "13769t" }],
@@ -277,7 +277,7 @@ const qn = q("ListEnd", [
277
277
  * This source code is licensed under the ISC license.
278
278
  * See the LICENSE file in the root directory of this source tree.
279
279
  */
280
- const Rn = q("ListStart", [
280
+ const _n = q("ListStart", [
281
281
  ["path", { d: "M16 12H3", key: "1a2rj7" }],
282
282
  ["path", { d: "M16 18H3", key: "12xzn7" }],
283
283
  ["path", { d: "M10 6H3", key: "lf8lx7" }],
@@ -290,7 +290,7 @@ const Rn = q("ListStart", [
290
290
  * This source code is licensed under the ISC license.
291
291
  * See the LICENSE file in the root directory of this source tree.
292
292
  */
293
- const _n = q("ListX", [
293
+ const Hn = q("ListX", [
294
294
  ["path", { d: "M11 12H3", key: "51ecnj" }],
295
295
  ["path", { d: "M16 6H3", key: "1wxfjs" }],
296
296
  ["path", { d: "M16 18H3", key: "12xzn7" }],
@@ -329,7 +329,7 @@ const Ea = q("Map", [
329
329
  * This source code is licensed under the ISC license.
330
330
  * See the LICENSE file in the root directory of this source tree.
331
331
  */
332
- const Hn = q("MessageSquareMore", [
332
+ const $n = q("MessageSquareMore", [
333
333
  ["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" }],
334
334
  ["path", { d: "M8 10h.01", key: "19clt8" }],
335
335
  ["path", { d: "M12 10h.01", key: "1nrarc" }],
@@ -341,7 +341,7 @@ const Hn = q("MessageSquareMore", [
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 $n = q("Network", [
344
+ const Pn = q("Network", [
345
345
  ["rect", { x: "16", y: "16", width: "6", height: "6", rx: "1", key: "4q2zg0" }],
346
346
  ["rect", { x: "2", y: "16", width: "6", height: "6", rx: "1", key: "8cvhb9" }],
347
347
  ["rect", { x: "9", y: "2", width: "6", height: "6", rx: "1", key: "1egb70" }],
@@ -370,7 +370,7 @@ const Aa = q("Pencil", [
370
370
  * This source code is licensed under the ISC license.
371
371
  * See the LICENSE file in the root directory of this source tree.
372
372
  */
373
- const Pn = q("Play", [
373
+ const Bn = q("Play", [
374
374
  ["polygon", { points: "6 3 20 12 6 21 6 3", key: "1oa8hb" }]
375
375
  ]);
376
376
  /**
@@ -379,7 +379,7 @@ const Pn = q("Play", [
379
379
  * This source code is licensed under the ISC license.
380
380
  * See the LICENSE file in the root directory of this source tree.
381
381
  */
382
- const Bn = q("Plug2", [
382
+ const Un = q("Plug2", [
383
383
  ["path", { d: "M9 2v6", key: "17ngun" }],
384
384
  ["path", { d: "M15 2v6", key: "s7yy2p" }],
385
385
  ["path", { d: "M12 17v5", key: "bb1du9" }],
@@ -392,7 +392,7 @@ const Bn = q("Plug2", [
392
392
  * This source code is licensed under the ISC license.
393
393
  * See the LICENSE file in the root directory of this source tree.
394
394
  */
395
- const Un = q("Save", [
395
+ const Gn = q("Save", [
396
396
  [
397
397
  "path",
398
398
  {
@@ -426,7 +426,7 @@ const Va = q("Shapes", [
426
426
  * This source code is licensed under the ISC license.
427
427
  * See the LICENSE file in the root directory of this source tree.
428
428
  */
429
- const Gn = q("ShieldQuestion", [
429
+ const Kn = q("ShieldQuestion", [
430
430
  [
431
431
  "path",
432
432
  {
@@ -443,7 +443,7 @@ const Gn = q("ShieldQuestion", [
443
443
  * This source code is licensed under the ISC license.
444
444
  * See the LICENSE file in the root directory of this source tree.
445
445
  */
446
- const Kn = q("Sigma", [
446
+ const Qn = q("Sigma", [
447
447
  [
448
448
  "path",
449
449
  {
@@ -458,7 +458,7 @@ const Kn = q("Sigma", [
458
458
  * This source code is licensed under the ISC license.
459
459
  * See the LICENSE file in the root directory of this source tree.
460
460
  */
461
- const Qn = q("SwatchBook", [
461
+ const Jn = q("SwatchBook", [
462
462
  ["path", { d: "M11 17a4 4 0 0 1-8 0V5a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2Z", key: "1ldrpk" }],
463
463
  ["path", { d: "M16.7 13H19a2 2 0 0 1 2 2v4a2 2 0 0 1-2 2H7", key: "11i5po" }],
464
464
  ["path", { d: "M 7 17h.01", key: "1euzgo" }],
@@ -476,7 +476,7 @@ const Qn = q("SwatchBook", [
476
476
  * This source code is licensed under the ISC license.
477
477
  * See the LICENSE file in the root directory of this source tree.
478
478
  */
479
- const Jn = q("Tag", [
479
+ const Wn = q("Tag", [
480
480
  [
481
481
  "path",
482
482
  {
@@ -492,7 +492,7 @@ const Jn = q("Tag", [
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 Wn = q("ToggleLeft", [
495
+ const Yn = q("ToggleLeft", [
496
496
  ["rect", { width: "20", height: "12", x: "2", y: "6", rx: "6", ry: "6", key: "f2vt7d" }],
497
497
  ["circle", { cx: "8", cy: "12", r: "2", key: "1nvbw3" }]
498
498
  ]);
@@ -513,7 +513,7 @@ const Qs = q("Type", [
513
513
  * This source code is licensed under the ISC license.
514
514
  * See the LICENSE file in the root directory of this source tree.
515
515
  */
516
- const Yn = q("User", [
516
+ const Xn = q("User", [
517
517
  ["path", { d: "M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2", key: "975kel" }],
518
518
  ["circle", { cx: "12", cy: "7", r: "4", key: "17ys0d" }]
519
519
  ]);
@@ -529,14 +529,14 @@ function qa(s) {
529
529
  var i;
530
530
  return {
531
531
  ...l,
532
- cards: (i = l.cards) == null ? void 0 : i.map((r) => Xn(r))
532
+ cards: (i = l.cards) == null ? void 0 : i.map((r) => Zn(r))
533
533
  };
534
534
  })
535
535
  };
536
536
  })
537
537
  };
538
538
  }
539
- function Xn(s) {
539
+ function Zn(s) {
540
540
  var t, a, n, l;
541
541
  return {
542
542
  ...s,
@@ -551,12 +551,12 @@ function Xn(s) {
551
551
  }))
552
552
  }
553
553
  },
554
- customCfg: Zn(s.customCfg),
554
+ customCfg: el(s.customCfg),
555
555
  // if customCfg is present, clean it, otherwise return null{
556
556
  data: []
557
557
  };
558
558
  }
559
- function Zn(s) {
559
+ function el(s) {
560
560
  var t, a;
561
561
  return s ? {
562
562
  ...s,
@@ -570,7 +570,7 @@ function Zn(s) {
570
570
  }
571
571
  } : null;
572
572
  }
573
- async function el(s, t, a, n) {
573
+ async function sl(s, t, a, n) {
574
574
  if (!n)
575
575
  return null;
576
576
  const l = JSON.stringify(t);
@@ -581,7 +581,7 @@ async function el(s, t, a, n) {
581
581
  operation: "create"
582
582
  });
583
583
  }
584
- async function Os(s, t) {
584
+ async function Fs(s, t) {
585
585
  if (!t)
586
586
  return null;
587
587
  const { id: a, template: n, filterValues: l, isDefault: i, shared: r } = s;
@@ -594,43 +594,43 @@ async function Os(s, t) {
594
594
  operation: "update"
595
595
  });
596
596
  }
597
- async function sl(s, t) {
597
+ async function al(s, t) {
598
598
  return t ? await hs("https://semaphor.cloud/api/v1/lens", t, {
599
599
  operation: "delete",
600
600
  lensId: s
601
601
  }) : null;
602
602
  }
603
- function al() {
604
- const [s, t] = R(""), [a, n] = R(!1), l = z((j) => j.lenses), { setLenses: i, setSelectedLensId: r } = Fs(), [c, o] = R(!1), [x, d] = R(!1), y = z((j) => j.dashboard), f = z((j) => j.filterValues), { authToken: m } = Oe();
603
+ function tl() {
604
+ const [s, t] = R(""), [a, n] = R(!1), l = O((j) => j.lenses), { setLenses: i, setSelectedLensId: r } = Is(), [c, o] = R(!1), [x, d] = R(!1), y = O((j) => j.dashboard), f = O((j) => j.filterValues), { authToken: m } = ve();
605
605
  async function g() {
606
606
  o(!0);
607
607
  const j = qa(
608
608
  y
609
- ), D = await el(
609
+ ), T = await sl(
610
610
  s,
611
611
  j,
612
612
  f,
613
613
  m == null ? void 0 : m.accessToken
614
614
  );
615
- D && (i([...l || [], D]), r(D.id), d(!1)), o(!1);
615
+ T && (i([...l || [], T]), r(T.id), d(!1)), o(!1);
616
616
  }
617
- return /* @__PURE__ */ e.jsxs(Is, { open: x, onOpenChange: d, children: [
618
- /* @__PURE__ */ e.jsx(Ts, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
617
+ return /* @__PURE__ */ e.jsxs(Ts, { open: x, onOpenChange: d, children: [
618
+ /* @__PURE__ */ e.jsx(Ds, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
619
619
  F,
620
620
  {
621
621
  variant: "secondary",
622
622
  className: "h-7 p-2",
623
623
  size: "sm",
624
624
  children: [
625
- /* @__PURE__ */ e.jsx(Ds, { className: "mr-2 h-4 w-4", strokeWidth: 1.5 }),
625
+ /* @__PURE__ */ e.jsx(Ms, { className: "mr-2 h-4 w-4", strokeWidth: 1.5 }),
626
626
  "Lens"
627
627
  ]
628
628
  }
629
629
  ) }),
630
- /* @__PURE__ */ e.jsxs(Ms, { className: "sm:max-w-[425px]", children: [
631
- /* @__PURE__ */ e.jsxs(Ls, { children: [
632
- /* @__PURE__ */ e.jsx(Es, { children: "Create Lens" }),
633
- /* @__PURE__ */ e.jsx(As, { children: "Lenses are private by default and are only visible to you." })
630
+ /* @__PURE__ */ e.jsxs(Ls, { className: "sm:max-w-[425px]", children: [
631
+ /* @__PURE__ */ e.jsxs(Es, { children: [
632
+ /* @__PURE__ */ e.jsx(As, { children: "Create Lens" }),
633
+ /* @__PURE__ */ e.jsx(Vs, { children: "Lenses are private by default and are only visible to you." })
634
634
  ] }),
635
635
  /* @__PURE__ */ e.jsx("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-8 items-center gap-4", children: [
636
636
  /* @__PURE__ */ e.jsx(H, { className: "text-right", children: "Name" }),
@@ -661,13 +661,13 @@ function al() {
661
661
  ] })
662
662
  ] });
663
663
  }
664
- function tl() {
665
- const [s, t] = R(!1), a = z((d) => d.lenses), n = z((d) => d.selectedLensId), { setLenses: l, setSelectedLensId: i } = Fs(), { authToken: r } = Oe();
664
+ function nl() {
665
+ const [s, t] = R(!1), a = O((d) => d.lenses), n = O((d) => d.selectedLensId), { setLenses: l, setSelectedLensId: i } = Is(), { authToken: r } = ve();
666
666
  async function c(d) {
667
667
  i(d);
668
668
  }
669
669
  async function o(d) {
670
- if (await sl(d, r == null ? void 0 : r.accessToken)) {
670
+ if (await al(d, r == null ? void 0 : r.accessToken)) {
671
671
  const f = a == null ? void 0 : a.filter((m) => m.id !== d);
672
672
  l(f || []), i("original");
673
673
  }
@@ -685,18 +685,18 @@ function tl() {
685
685
  ...d,
686
686
  isDefault: !d.isDefault
687
687
  };
688
- await Os(f, r == null ? void 0 : r.accessToken);
688
+ await Fs(f, r == null ? void 0 : r.accessToken);
689
689
  const m = a == null ? void 0 : a.find((g) => g.isDefault);
690
690
  if (m && m.id !== d.id) {
691
691
  const g = {
692
692
  ...m,
693
693
  isDefault: !1
694
694
  };
695
- await Os(g, r == null ? void 0 : r.accessToken);
695
+ await Fs(g, r == null ? void 0 : r.accessToken);
696
696
  }
697
697
  }
698
698
  return /* @__PURE__ */ e.jsxs(ca, { open: s, onOpenChange: t, children: [
699
- /* @__PURE__ */ e.jsx(da, { asChild: !0, children: /* @__PURE__ */ e.jsx(F, { variant: "ghost", className: "h-7 p-2", children: /* @__PURE__ */ e.jsx(Ln, { className: "h-4 w-4", strokeWidth: 1.5 }) }) }),
699
+ /* @__PURE__ */ e.jsx(da, { asChild: !0, children: /* @__PURE__ */ e.jsx(F, { variant: "ghost", className: "h-7 p-2", children: /* @__PURE__ */ e.jsx(En, { className: "h-4 w-4", strokeWidth: 1.5 }) }) }),
700
700
  /* @__PURE__ */ e.jsxs(ua, { align: "end", className: "w-60", children: [
701
701
  /* @__PURE__ */ e.jsx(rt, { className: "px-3", children: "Lenses" }),
702
702
  /* @__PURE__ */ e.jsx(it, {}),
@@ -716,7 +716,7 @@ function tl() {
716
716
  /* @__PURE__ */ e.jsx("p", { children: d.name }),
717
717
  /* @__PURE__ */ e.jsxs("span", { className: "flex items-center gap-3", children: [
718
718
  /* @__PURE__ */ e.jsx(
719
- Vn,
719
+ qn,
720
720
  {
721
721
  onClick: (y) => {
722
722
  y.preventDefault(), x(d);
@@ -752,25 +752,25 @@ function tl() {
752
752
  ] })
753
753
  ] });
754
754
  }
755
- function nl() {
756
- const { authToken: s } = Oe(), t = z((p) => p.lenses), a = z((p) => p.selectedLensId), n = t == null ? void 0 : t.find((p) => p.id === a), l = z((p) => p.dashboard);
757
- z((p) => p.selectedSheetId);
758
- const i = z(
755
+ function ll() {
756
+ const { authToken: s } = ve(), t = O((p) => p.lenses), a = O((p) => p.selectedLensId), n = t == null ? void 0 : t.find((p) => p.id === a), l = O((p) => p.dashboard);
757
+ O((p) => p.selectedSheetId);
758
+ const i = O(
759
759
  (p) => p.isDashboardEditing
760
760
  ), r = u(
761
761
  (p) => p.selectedConnectionId
762
- ), [c, o] = R(!1), x = z((p) => p.filterValues), d = z((p) => p.isVisualEditing), y = z((p) => p.showFilters);
763
- z(
762
+ ), [c, o] = R(!1), x = O((p) => p.filterValues), d = O((p) => p.isVisualEditing), y = O((p) => p.showFilters);
763
+ O(
764
764
  (p) => p.showDashboardJSON
765
765
  );
766
- const f = z((p) => p.onSaveFunction), m = z(
766
+ const f = O((p) => p.onSaveFunction), m = O(
767
767
  (p) => p.actions.setShowFilters
768
- ), { addFrame: g, setSelectedFrameId: j } = z(
768
+ ), { addFrame: g, setSelectedFrameId: j } = O(
769
769
  (p) => p.actions
770
- ), { getSelectedSheet: D, setIsDashboardEditing: C, setShowDashboardJSON: L } = z((p) => p.actions), I = D(), { tenantId: O, endUserId: N } = zs(
770
+ ), { getSelectedSheet: T, setIsDashboardEditing: C, setShowDashboardJSON: M } = O((p) => p.actions), I = T(), { tenantId: V, endUserId: N } = Os(
771
771
  () => ct(s == null ? void 0 : s.accessToken),
772
772
  [s == null ? void 0 : s.accessToken]
773
- ), T = zs(() => O || N, [O, N]), A = () => {
773
+ ), w = Os(() => V || N, [V, N]), L = () => {
774
774
  if (!i || !I)
775
775
  return;
776
776
  const p = {
@@ -789,12 +789,12 @@ function nl() {
789
789
  type: "bar",
790
790
  sql: "select COUNT(*) from YOUR_TABLE",
791
791
  data: []
792
- }, k = {
792
+ }, z = {
793
793
  id: We(),
794
794
  cards: [p],
795
795
  activeCardId: p.id
796
796
  };
797
- g(I.id, k), j(k.id);
797
+ g(I.id, z), j(z.id);
798
798
  }, h = () => {
799
799
  C(!0);
800
800
  };
@@ -803,12 +803,12 @@ function nl() {
803
803
  return;
804
804
  const p = qa(
805
805
  l
806
- ), k = JSON.stringify(p), V = {
806
+ ), z = JSON.stringify(p), E = {
807
807
  ...n,
808
- template: k,
808
+ template: z,
809
809
  filterValues: x
810
810
  };
811
- await Os(V, s == null ? void 0 : s.accessToken), Ye.success("Lens saved"), f == null || f(p), o(!1);
811
+ await Fs(E, s == null ? void 0 : s.accessToken), Ye.success("Lens saved"), f == null || f(p), o(!1);
812
812
  }
813
813
  return d ? null : /* @__PURE__ */ e.jsxs(
814
814
  "div",
@@ -818,8 +818,8 @@ function nl() {
818
818
  children: [
819
819
  !d && /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-3", children: /* @__PURE__ */ e.jsx(H, { children: n == null ? void 0 : n.name }) }),
820
820
  /* @__PURE__ */ e.jsxs("div", { className: "flex gap-2", children: [
821
- i && !d && T && /* @__PURE__ */ e.jsx(al, {}),
822
- !d && T && /* @__PURE__ */ e.jsx(tl, {}),
821
+ i && !d && w && /* @__PURE__ */ e.jsx(tl, {}),
822
+ !d && w && /* @__PURE__ */ e.jsx(nl, {}),
823
823
  i && !d && /* @__PURE__ */ e.jsxs(
824
824
  F,
825
825
  {
@@ -827,9 +827,9 @@ function nl() {
827
827
  className: "h-7 p-2",
828
828
  size: "sm",
829
829
  disabled: !i,
830
- onClick: A,
830
+ onClick: L,
831
831
  children: [
832
- /* @__PURE__ */ e.jsx(Ds, { className: "mr-2 h-4 w-4", strokeWidth: 1.5 }),
832
+ /* @__PURE__ */ e.jsx(Ms, { className: "mr-2 h-4 w-4", strokeWidth: 1.5 }),
833
833
  "Frame"
834
834
  ]
835
835
  }
@@ -851,13 +851,13 @@ function nl() {
851
851
  role: "close",
852
852
  className: "h-7 p-2",
853
853
  onClick: () => {
854
- C(!1), L(!1);
854
+ C(!1), M(!1);
855
855
  },
856
856
  size: "sm",
857
857
  children: /* @__PURE__ */ e.jsx(Je, { className: "h-4 w-4", strokeWidth: 1.5 })
858
858
  }
859
859
  ),
860
- i && !d && T && /* @__PURE__ */ e.jsx(
860
+ i && !d && w && /* @__PURE__ */ e.jsx(
861
861
  F,
862
862
  {
863
863
  className: "h-7 p-2",
@@ -865,7 +865,7 @@ function nl() {
865
865
  disabled: c,
866
866
  onClick: v,
867
867
  size: "sm",
868
- children: /* @__PURE__ */ e.jsx(Un, { className: "h-4 w-4", strokeWidth: 1.5 })
868
+ children: /* @__PURE__ */ e.jsx(Gn, { className: "h-4 w-4", strokeWidth: 1.5 })
869
869
  }
870
870
  ),
871
871
  !y && !d && i && /* @__PURE__ */ e.jsx(
@@ -901,20 +901,20 @@ function Ue({
901
901
  const y = n ? "Loading..." : l ? "Error" : a;
902
902
  function f() {
903
903
  if (s === "Connection")
904
- return /* @__PURE__ */ e.jsx(Bn, { className: "size-4 rotate-90" });
904
+ return /* @__PURE__ */ e.jsx(Un, { className: "size-4 rotate-90" });
905
905
  if (s === "Database")
906
- return /* @__PURE__ */ e.jsx(In, { className: "size-4" });
906
+ return /* @__PURE__ */ e.jsx(Tn, { className: "size-4" });
907
907
  if (s === "Schema")
908
- return /* @__PURE__ */ e.jsx($n, { className: "size-4" });
908
+ return /* @__PURE__ */ e.jsx(Pn, { className: "size-4" });
909
909
  if (s === "Table")
910
- return /* @__PURE__ */ e.jsx(Rs, { className: "size-4" });
910
+ return /* @__PURE__ */ e.jsx(_s, { className: "size-4" });
911
911
  if (s === "Model")
912
- return /* @__PURE__ */ e.jsx(kn, { className: "size-4" });
912
+ return /* @__PURE__ */ e.jsx(zn, { className: "size-4" });
913
913
  }
914
914
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
915
- x && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: i ? /* @__PURE__ */ e.jsxs(Vs, { children: [
915
+ x && /* @__PURE__ */ e.jsx("div", { className: "shrink-0", children: i ? /* @__PURE__ */ e.jsxs(qs, { children: [
916
916
  /* @__PURE__ */ e.jsx(ma, { children: f() }),
917
- /* @__PURE__ */ e.jsx(qs, { className: "text-xs", align: "start", children: i })
917
+ /* @__PURE__ */ e.jsx(Rs, { className: "text-xs", align: "start", children: i })
918
918
  ] }) : f() }),
919
919
  /* @__PURE__ */ e.jsxs(fe, { disabled: d, value: y, onValueChange: r, children: [
920
920
  /* @__PURE__ */ e.jsx(
@@ -932,7 +932,7 @@ function Ue({
932
932
  )
933
933
  }
934
934
  ),
935
- /* @__PURE__ */ e.jsx(be, { children: /* @__PURE__ */ e.jsxs(ke, { children: [
935
+ /* @__PURE__ */ e.jsx(be, { children: /* @__PURE__ */ e.jsxs(ze, { children: [
936
936
  n ? /* @__PURE__ */ e.jsx(ye, { children: "Loading..." }) : /* @__PURE__ */ e.jsx(ye, { children: s }),
937
937
  /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
938
938
  c && /* @__PURE__ */ e.jsx(Q, { value: "none", children: "None" }, "none"),
@@ -943,23 +943,23 @@ function Ue({
943
943
  ] })
944
944
  ] });
945
945
  }
946
- function ll({ column: s }) {
946
+ function rl({ column: s }) {
947
947
  const [t, a] = R(!1), n = u((m) => m.selectedTableName), l = u(
948
948
  (m) => m.selectedSchemaName
949
949
  ), i = u(
950
950
  (m) => m.selectedDatamodelId
951
951
  ), r = u((m) => m.sqlGen), { modelItems: c } = Re(), o = u((m) => m.actions.setSqlGen), x = u((m) => m.actions.setCardSql), d = u((m) => m.actions.setRunSql);
952
952
  function y(m, g) {
953
- var L;
954
- const j = xa(m, r, g), D = (L = c == null ? void 0 : c.find(
953
+ var M;
954
+ const j = xa(m, r, g), T = (M = c == null ? void 0 : c.find(
955
955
  (I) => I.id === i
956
- )) == null ? void 0 : L.name;
956
+ )) == null ? void 0 : M.name;
957
957
  o(j);
958
958
  const C = pa(
959
959
  j,
960
960
  xe(l || ""),
961
961
  xe(n),
962
- D
962
+ T
963
963
  );
964
964
  C && (x(C), d(!0)), a(!1);
965
965
  }
@@ -1007,10 +1007,10 @@ function ll({ column: s }) {
1007
1007
  )
1008
1008
  ] });
1009
1009
  }
1010
- return /* @__PURE__ */ e.jsxs(_s, { openDelay: 0, open: t, onOpenChange: a, children: [
1011
- /* @__PURE__ */ e.jsx(Hs, { asChild: !0, children: /* @__PURE__ */ e.jsx(Ma, { className: "invisible size-3.5 cursor-pointer text-foreground/40 group-hover:visible" }) }),
1010
+ return /* @__PURE__ */ e.jsxs(Hs, { openDelay: 0, open: t, onOpenChange: a, children: [
1011
+ /* @__PURE__ */ e.jsx($s, { asChild: !0, children: /* @__PURE__ */ e.jsx(Ma, { className: "invisible size-3.5 cursor-pointer text-foreground/40 group-hover:visible" }) }),
1012
1012
  /* @__PURE__ */ e.jsx(
1013
- $s,
1013
+ Ps,
1014
1014
  {
1015
1015
  align: "center",
1016
1016
  className: "w-20 rounded-md p-0 shadow-none",
@@ -1020,18 +1020,18 @@ function ll({ column: s }) {
1020
1020
  ] });
1021
1021
  }
1022
1022
  function Ra({ column: s }) {
1023
- return /* @__PURE__ */ e.jsxs(Vs, { children: [
1023
+ return /* @__PURE__ */ e.jsxs(qs, { children: [
1024
1024
  /* @__PURE__ */ e.jsx(dt, { asChild: !0, children: ut.includes(s.data_type.toLowerCase()) ? (
1025
1025
  // <span className=" font-thin">T</span>
1026
1026
  /* @__PURE__ */ e.jsx(Qs, { className: "size-3" })
1027
1027
  ) : fa.includes(s.data_type.toLowerCase()) ? (
1028
1028
  //
1029
- /* @__PURE__ */ e.jsx(An, { className: "size-3" })
1030
- ) : ht.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(mt, { className: "size-3" }) : xt.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(Wn, { className: "size-3" }) : /* @__PURE__ */ e.jsx(Gn, { className: "size-3" }) }),
1031
- /* @__PURE__ */ e.jsx(qs, { children: /* @__PURE__ */ e.jsx("p", { className: "font-mono text-xs", children: s.data_type }) })
1029
+ /* @__PURE__ */ e.jsx(Vn, { className: "size-3" })
1030
+ ) : ht.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(mt, { className: "size-3" }) : xt.includes(s.data_type.toLowerCase()) ? /* @__PURE__ */ e.jsx(Yn, { className: "size-3" }) : /* @__PURE__ */ e.jsx(Kn, { className: "size-3" }) }),
1031
+ /* @__PURE__ */ e.jsx(Rs, { children: /* @__PURE__ */ e.jsx("p", { className: "font-mono text-xs", children: s.data_type }) })
1032
1032
  ] });
1033
1033
  }
1034
- function rl({
1034
+ function il({
1035
1035
  schemaName: s,
1036
1036
  tableName: t,
1037
1037
  columns: a,
@@ -1045,39 +1045,39 @@ function rl({
1045
1045
  (h) => h.selectedSchemaName
1046
1046
  ), o = u((h) => h.selectedTableName), x = u(
1047
1047
  (h) => h.selectedDatamodelId
1048
- ), d = z(
1048
+ ), d = O(
1049
1049
  (h) => h.dashboard.aiScopeTables
1050
- ), { setAIScopeTables: y } = z((h) => h.actions), f = u((h) => h.actions.setRunSql), m = u((h) => h.actions.setSqlGen), g = u(
1050
+ ), { setAIScopeTables: y } = O((h) => h.actions), f = u((h) => h.actions.setRunSql), m = u((h) => h.actions.setSqlGen), g = u(
1051
1051
  (h) => h.actions.setIsShowingVisual
1052
- ), j = u((h) => h.actions.setCardSql), { connectionType: D, modelItems: C } = Re();
1053
- function L(h) {
1054
- var V;
1052
+ ), j = u((h) => h.actions.setCardSql), { connectionType: T, modelItems: C } = Re();
1053
+ function M(h) {
1054
+ var E;
1055
1055
  const v = xa(h, l);
1056
1056
  m(v);
1057
- const p = (V = C == null ? void 0 : C.find(
1057
+ const p = (E = C == null ? void 0 : C.find(
1058
1058
  ($) => $.id === x
1059
- )) == null ? void 0 : V.name, k = pa(v, xe(s), xe(t), p);
1060
- k && (j(k), f(!0));
1059
+ )) == null ? void 0 : E.name, z = pa(v, xe(s), xe(t), p);
1060
+ z && (j(z), f(!0));
1061
1061
  }
1062
1062
  function I() {
1063
1063
  return (d == null ? void 0 : d.find(
1064
1064
  (h) => h.connectinonId === i && h.tableName === o
1065
1065
  )) !== void 0;
1066
1066
  }
1067
- function O(h) {
1067
+ function V(h) {
1068
1068
  if (h === !0 && o && i) {
1069
1069
  const v = {
1070
1070
  connectinonId: i,
1071
- connectionType: D,
1071
+ connectionType: T,
1072
1072
  databaseName: r,
1073
1073
  schemaName: c,
1074
1074
  tableName: o
1075
- }, k = [...d || [], v].filter(
1076
- (V, $, B) => B.findIndex(
1077
- (Y) => Y.connectinonId === V.connectinonId && Y.tableName === V.tableName
1075
+ }, z = [...d || [], v].filter(
1076
+ (E, $, B) => B.findIndex(
1077
+ (Y) => Y.connectinonId === E.connectinonId && Y.tableName === E.tableName
1078
1078
  ) === $
1079
1079
  );
1080
- y(k), Ye.success(`Added '${o}' to AI Scope`, {
1080
+ y(z), Ye.success(`Added '${o}' to AI Scope`, {
1081
1081
  position: "top-right",
1082
1082
  duration: 2500,
1083
1083
  richColors: !0
@@ -1094,22 +1094,22 @@ function rl({
1094
1094
  }
1095
1095
  }
1096
1096
  function N() {
1097
- var V;
1097
+ var E;
1098
1098
  let h = ja(s, t);
1099
- const v = (V = C == null ? void 0 : C.find(
1099
+ const v = (E = C == null ? void 0 : C.find(
1100
1100
  ($) => $.id === x
1101
- )) == null ? void 0 : V.name;
1102
- console.log("modelName", v), x && x !== "none" && (h = `${Ns}.${v}`);
1101
+ )) == null ? void 0 : E.name;
1102
+ console.log("modelName", v), x && x !== "none" && (h = `${Ss}.${v}`);
1103
1103
  let p = h;
1104
1104
  return (($) => /[A-Z]/.test($))(t) && (p = p.split(".").map((B) => `"${B}"`).join(".")), p;
1105
1105
  }
1106
- function T() {
1106
+ function w() {
1107
1107
  const h = N();
1108
1108
  g(!1);
1109
- const v = D === "MSSQL" ? `SELECT top 10 * FROM ${h}` : `SELECT * FROM ${h} LIMIT 10`;
1109
+ const v = T === "MSSQL" ? `SELECT top 10 * FROM ${h}` : `SELECT * FROM ${h} LIMIT 10`;
1110
1110
  j(v), f(!0);
1111
1111
  }
1112
- function A() {
1112
+ function L() {
1113
1113
  const h = N();
1114
1114
  j(`SELECT COUNT(*) as count FROM ${h}`), f(!0);
1115
1115
  }
@@ -1120,7 +1120,7 @@ function rl({
1120
1120
  {
1121
1121
  title: `${I() ? "Remove from" : "Add to"} AI Scope`,
1122
1122
  pressed: I(),
1123
- onPressedChange: O,
1123
+ onPressedChange: V,
1124
1124
  variant: "outline",
1125
1125
  className: "h-9 px-2",
1126
1126
  children: /* @__PURE__ */ e.jsx(
@@ -1138,12 +1138,12 @@ function rl({
1138
1138
  F,
1139
1139
  {
1140
1140
  disabled: n !== "Success",
1141
- onClick: T,
1141
+ onClick: w,
1142
1142
  size: "sm",
1143
1143
  variant: "secondary",
1144
1144
  className: "flex",
1145
1145
  children: [
1146
- n !== "Success" ? /* @__PURE__ */ e.jsx(Ze, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(Qn, { className: "mr-2 size-4" }),
1146
+ n !== "Success" ? /* @__PURE__ */ e.jsx(Ze, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(Jn, { className: "mr-2 size-4" }),
1147
1147
  "Top 10"
1148
1148
  ]
1149
1149
  }
@@ -1152,26 +1152,26 @@ function rl({
1152
1152
  F,
1153
1153
  {
1154
1154
  disabled: n !== "Success",
1155
- onClick: A,
1155
+ onClick: L,
1156
1156
  size: "sm",
1157
1157
  variant: "secondary",
1158
1158
  className: "flex",
1159
1159
  children: [
1160
- n !== "Success" ? /* @__PURE__ */ e.jsx(Ze, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(Kn, { className: "mr-2 size-4" }),
1160
+ n !== "Success" ? /* @__PURE__ */ e.jsx(Ze, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(Qn, { className: "mr-2 size-4" }),
1161
1161
  "Count"
1162
1162
  ]
1163
1163
  }
1164
1164
  )
1165
1165
  ] }),
1166
1166
  /* @__PURE__ */ e.jsxs(
1167
- Ps,
1167
+ ms,
1168
1168
  {
1169
1169
  className: "flex-1 basis-0 overflow-y-auto border-b border-t border-muted py-3",
1170
1170
  children: [
1171
1171
  a == null ? void 0 : a.map((h) => /* @__PURE__ */ e.jsxs(
1172
1172
  "div",
1173
1173
  {
1174
- onClick: () => L(h),
1174
+ onClick: () => M(h),
1175
1175
  className: W(
1176
1176
  "group mx-3 flex cursor-pointer items-center justify-between rounded px-2 py-[6px] text-sm transition-colors hover:bg-muted/50",
1177
1177
  {
@@ -1188,7 +1188,7 @@ function rl({
1188
1188
  {
1189
1189
  onClick: (v) => v.stopPropagation(),
1190
1190
  className: "flex items-center justify-end",
1191
- children: fa.includes(h.data_type) && /* @__PURE__ */ e.jsx(ll, { column: h })
1191
+ children: fa.includes(h.data_type) && /* @__PURE__ */ e.jsx(rl, { column: h })
1192
1192
  }
1193
1193
  )
1194
1194
  ]
@@ -1204,8 +1204,8 @@ function rl({
1204
1204
  }
1205
1205
  function Re(s, t) {
1206
1206
  var Pe, ss, as, ts, Be;
1207
- let a = zs(() => [], []);
1208
- const n = Oe().authToken || s, l = u(
1207
+ let a = Os(() => [], []);
1208
+ const n = ve().authToken || s, l = u(
1209
1209
  (S) => S.selectedConnectionId
1210
1210
  ), i = u(
1211
1211
  (S) => S.selectedDatamodelId
@@ -1226,34 +1226,34 @@ function Re(s, t) {
1226
1226
  ), g = u(
1227
1227
  (S) => S.actions.setSelectedTableName
1228
1228
  ), j = u((S) => S.actions.setCardSql);
1229
- function D(S) {
1229
+ function T(S) {
1230
1230
  return l && r && c && r !== "NA" ? !0 : l && S === "API" ? !1 : !!(l && S === "S3");
1231
1231
  }
1232
1232
  function C(S) {
1233
1233
  return !!(l && r && r !== "NA" && c && o || l && (S === "S3" || S === "API") || i && i);
1234
1234
  }
1235
- function L(S) {
1235
+ function M(S) {
1236
1236
  return l && S ? !(S === "API" || S === "S3") : !1;
1237
1237
  }
1238
1238
  const {
1239
1239
  data: I,
1240
- isLoading: O,
1240
+ isLoading: V,
1241
1241
  isError: N
1242
1242
  } = me({
1243
1243
  queryKey: ["connections"],
1244
- queryFn: () => we(
1244
+ queryFn: () => ke(
1245
1245
  "https://semaphor.cloud/api/v1/connections",
1246
1246
  (n == null ? void 0 : n.accessToken) || ""
1247
1247
  ),
1248
1248
  enabled: !!(n != null && n.accessToken)
1249
1249
  // Only fetch if authToken is present
1250
1250
  }), {
1251
- data: T,
1252
- isLoading: A,
1251
+ data: w,
1252
+ isLoading: L,
1253
1253
  isError: h
1254
1254
  } = me({
1255
1255
  queryKey: ["models", l],
1256
- queryFn: () => we(
1256
+ queryFn: () => ke(
1257
1257
  "https://semaphor.cloud/api/v1/datamodels",
1258
1258
  (n == null ? void 0 : n.accessToken) || "",
1259
1259
  {
@@ -1264,32 +1264,32 @@ function Re(s, t) {
1264
1264
  // Only fetch if authToken is present
1265
1265
  }), v = I == null ? void 0 : I.connections.find(
1266
1266
  (S) => S.id === l
1267
- ), p = v == null ? void 0 : v.type, k = (v == null ? void 0 : v.type) === "API" || (v == null ? void 0 : v.type) === "S3", {
1268
- data: V,
1267
+ ), p = v == null ? void 0 : v.type, z = (v == null ? void 0 : v.type) === "API" || (v == null ? void 0 : v.type) === "S3", {
1268
+ data: E,
1269
1269
  isLoading: $,
1270
1270
  isFetching: B,
1271
1271
  isError: Y,
1272
1272
  refetch: le
1273
1273
  } = me({
1274
1274
  queryKey: ["databases", l],
1275
- queryFn: () => we(
1275
+ queryFn: () => ke(
1276
1276
  "https://semaphor.cloud/api/v1/databases",
1277
1277
  (n == null ? void 0 : n.accessToken) || "",
1278
1278
  {
1279
1279
  connection_id: l
1280
1280
  }
1281
1281
  ),
1282
- enabled: L(p)
1282
+ enabled: M(p)
1283
1283
  // !!selectedConnectionId && !isNonDbConnection, //currentConnection?.type !== 'API', // Only fetch if connectionId is present
1284
1284
  }), {
1285
1285
  data: J,
1286
1286
  isLoading: ne,
1287
- isFetching: w,
1287
+ isFetching: k,
1288
1288
  isError: _,
1289
1289
  refetch: ee
1290
1290
  } = me({
1291
1291
  queryKey: ["schemas", l, r],
1292
- queryFn: () => we(
1292
+ queryFn: () => ke(
1293
1293
  "https://semaphor.cloud/api/v1/schemas",
1294
1294
  (n == null ? void 0 : n.accessToken) || "",
1295
1295
  {
@@ -1297,11 +1297,11 @@ function Re(s, t) {
1297
1297
  database_name: r
1298
1298
  }
1299
1299
  ),
1300
- enabled: !!l && !!r && !k && r !== "NA"
1300
+ enabled: !!l && !!r && !z && r !== "NA"
1301
1301
  //currentConnection?.type !== 'API', // Only fetch if connectionId and database is present
1302
1302
  }), {
1303
- data: E,
1304
- isLoading: M,
1303
+ data: A,
1304
+ isLoading: D,
1305
1305
  isFetching: se,
1306
1306
  isError: P,
1307
1307
  refetch: X
@@ -1312,7 +1312,7 @@ function Re(s, t) {
1312
1312
  r,
1313
1313
  c
1314
1314
  ],
1315
- queryFn: () => we(
1315
+ queryFn: () => ke(
1316
1316
  "https://semaphor.cloud/api/v1/tables",
1317
1317
  (n == null ? void 0 : n.accessToken) || "",
1318
1318
  {
@@ -1321,12 +1321,12 @@ function Re(s, t) {
1321
1321
  schema_name: c
1322
1322
  }
1323
1323
  ),
1324
- enabled: D(p)
1324
+ enabled: T(p)
1325
1325
  }), {
1326
1326
  data: ie,
1327
- isLoading: Ce,
1327
+ isLoading: Ne,
1328
1328
  isFetching: Le,
1329
- isError: Ne
1329
+ isError: Se
1330
1330
  } = me({
1331
1331
  queryKey: [
1332
1332
  "columns",
@@ -1336,7 +1336,7 @@ function Re(s, t) {
1336
1336
  c,
1337
1337
  o
1338
1338
  ],
1339
- queryFn: () => we(
1339
+ queryFn: () => ke(
1340
1340
  "https://semaphor.cloud/api/v1/columns",
1341
1341
  (n == null ? void 0 : n.accessToken) || "",
1342
1342
  {
@@ -1361,14 +1361,14 @@ function Re(s, t) {
1361
1361
  x(a);
1362
1362
  }, [ie, x, a]), Z(() => {
1363
1363
  }, [
1364
- k,
1364
+ z,
1365
1365
  j,
1366
1366
  g,
1367
1367
  m,
1368
1368
  f,
1369
1369
  v
1370
1370
  ]);
1371
- const Fe = (v == null ? void 0 : v.type) === "API" ? (Pe = v == null ? void 0 : v.type) == null ? void 0 : Pe.toLowerCase() : o || "", Se = k ? "" : c || "";
1371
+ const Fe = (v == null ? void 0 : v.type) === "API" ? (Pe = v == null ? void 0 : v.type) == null ? void 0 : Pe.toLowerCase() : o || "", we = z ? "" : c || "";
1372
1372
  function ae(S) {
1373
1373
  m(S), g("");
1374
1374
  }
@@ -1381,52 +1381,52 @@ function Re(s, t) {
1381
1381
  function es(S) {
1382
1382
  y(S === "none" ? "" : S), S !== "none" && S !== "" && f("");
1383
1383
  }
1384
- V && ((ss = V == null ? void 0 : V.databases) == null ? void 0 : ss.length) > 0, J && ((as = J == null ? void 0 : J.schemas) == null ? void 0 : as.length) > 0, ie && ((ts = ie == null ? void 0 : ie.columns) == null ? void 0 : ts.length) > 0 && (a = ie.columns.map((S) => ({
1384
+ E && ((ss = E == null ? void 0 : E.databases) == null ? void 0 : ss.length) > 0, J && ((as = J == null ? void 0 : J.schemas) == null ? void 0 : as.length) > 0, ie && ((ts = ie == null ? void 0 : ie.columns) == null ? void 0 : ts.length) > 0 && (a = ie.columns.map((S) => ({
1385
1385
  ...S,
1386
1386
  data_type: S.data_type.toLowerCase()
1387
- }))), Y && (a = []), (Ne || N) && (a = []);
1387
+ }))), Y && (a = []), (Se || N) && (a = []);
1388
1388
  const Ee = I == null ? void 0 : I.connections.map(
1389
1389
  (S) => ({
1390
1390
  id: S.id,
1391
1391
  name: S.name,
1392
1392
  type: S.type
1393
1393
  })
1394
- ), He = (Be = T == null ? void 0 : T.datamodels) == null ? void 0 : Be.map((S) => ({
1394
+ ), He = (Be = w == null ? void 0 : w.datamodels) == null ? void 0 : Be.map((S) => ({
1395
1395
  id: S.id,
1396
1396
  name: S.name
1397
- })), $e = V == null ? void 0 : V.databases.map((S) => ({
1397
+ })), $e = E == null ? void 0 : E.databases.map((S) => ({
1398
1398
  id: S.database_name,
1399
1399
  name: S.database_name
1400
1400
  })), Ae = J == null ? void 0 : J.schemas.map((S) => ({
1401
1401
  id: S.schema_name,
1402
1402
  name: S.schema_name
1403
- })), ys = E == null ? void 0 : E.tables.map((S) => ({
1403
+ })), vs = A == null ? void 0 : A.tables.map((S) => ({
1404
1404
  id: S.table_name,
1405
1405
  name: S.table_name
1406
1406
  }));
1407
1407
  return {
1408
1408
  connectionItems: Ee,
1409
- isConnectionsLoading: O,
1409
+ isConnectionsLoading: V,
1410
1410
  isConnectionsError: N,
1411
1411
  modelItems: He,
1412
- isModelsLoading: A,
1412
+ isModelsLoading: L,
1413
1413
  isModelsError: h,
1414
1414
  databaseItems: $e,
1415
1415
  isDatabasesLoadingOrFetching: $ || B,
1416
1416
  isDatabaseError: Y,
1417
1417
  schemaItems: Ae,
1418
- isSchemaLoadingOrFetching: ne || w,
1418
+ isSchemaLoadingOrFetching: ne || k,
1419
1419
  isSchemaError: _,
1420
- tableItems: ys,
1421
- isTableLoadingOrFetching: M || se,
1420
+ tableItems: vs,
1421
+ isTableLoadingOrFetching: D || se,
1422
1422
  isTableError: P,
1423
1423
  columns: a,
1424
- isColumnsLoadingOrFetching: Ce || Le,
1425
- isColumnsError: Ne,
1426
- isNonDbConnection: k,
1424
+ isColumnsLoadingOrFetching: Ne || Le,
1425
+ isColumnsError: Se,
1426
+ isNonDbConnection: z,
1427
1427
  connectionType: p,
1428
1428
  tableName: Fe,
1429
- schemaName: Se,
1429
+ schemaName: we,
1430
1430
  handleConnectionChange: he,
1431
1431
  handleDatamodelChange: es,
1432
1432
  handleDatabaseChange: ue,
@@ -1457,19 +1457,19 @@ function _a({
1457
1457
  isConnectionsLoading: m,
1458
1458
  isModelsLoading: g,
1459
1459
  isConnectionsError: j,
1460
- isModelsError: D,
1460
+ isModelsError: T,
1461
1461
  isDatabasesLoadingOrFetching: C,
1462
- isDatabaseError: L,
1462
+ isDatabaseError: M,
1463
1463
  isSchemaLoadingOrFetching: I,
1464
- isSchemaError: O,
1464
+ isSchemaError: V,
1465
1465
  isColumnsError: N,
1466
- isColumnsLoadingOrFetching: T,
1467
- isTableLoadingOrFetching: A,
1466
+ isColumnsLoadingOrFetching: w,
1467
+ isTableLoadingOrFetching: L,
1468
1468
  isTableError: h,
1469
1469
  connectionType: v,
1470
1470
  isNonDbConnection: p,
1471
- handleConnectionChange: k,
1472
- handleDatabaseChange: V,
1471
+ handleConnectionChange: z,
1472
+ handleDatabaseChange: E,
1473
1473
  handleSchemaChange: $,
1474
1474
  handleDatamodelChange: B,
1475
1475
  tableName: Y,
@@ -1477,19 +1477,19 @@ function _a({
1477
1477
  } = Re();
1478
1478
  function J() {
1479
1479
  return s ? s(le, Y, f) : /* @__PURE__ */ e.jsx(
1480
- rl,
1480
+ il,
1481
1481
  {
1482
1482
  schemaName: le,
1483
1483
  tableName: Y,
1484
1484
  columns: f,
1485
- status: T ? "Loading..." : N ? "Error" : "Success"
1485
+ status: w ? "Loading..." : N ? "Error" : "Success"
1486
1486
  }
1487
1487
  );
1488
1488
  }
1489
1489
  function ne() {
1490
1490
  window.location.href = "mailto:support@semaphor.cloud?subject=Help&body=I need help with...";
1491
1491
  }
1492
- function w() {
1492
+ function k() {
1493
1493
  if (!t || v === "S3" || v === "API")
1494
1494
  return null;
1495
1495
  if (!a || a === "none")
@@ -1497,8 +1497,8 @@ function _a({
1497
1497
  Ue,
1498
1498
  {
1499
1499
  showNone: !0,
1500
- onChange: V,
1501
- isError: L,
1500
+ onChange: E,
1501
+ isError: M,
1502
1502
  isLoading: C,
1503
1503
  items: d,
1504
1504
  value: n || "",
@@ -1523,7 +1523,7 @@ function _a({
1523
1523
  {
1524
1524
  showNone: !0,
1525
1525
  onChange: B,
1526
- isError: D,
1526
+ isError: T,
1527
1527
  isLoading: g,
1528
1528
  items: o,
1529
1529
  value: a || "",
@@ -1531,12 +1531,12 @@ function _a({
1531
1531
  }
1532
1532
  );
1533
1533
  }
1534
- function E() {
1534
+ function A() {
1535
1535
  return !t || v === "S3" || v === "API" || !n || n === "none" ? null : /* @__PURE__ */ e.jsx(
1536
1536
  Ue,
1537
1537
  {
1538
1538
  onChange: $,
1539
- isError: O,
1539
+ isError: V,
1540
1540
  isLoading: I,
1541
1541
  items: x,
1542
1542
  value: l || "",
@@ -1544,7 +1544,7 @@ function _a({
1544
1544
  }
1545
1545
  );
1546
1546
  }
1547
- function M() {
1547
+ function D() {
1548
1548
  function P() {
1549
1549
  let X = !1;
1550
1550
  return v === "API" ? (X = !1, X) : ((v === "S3" || t && n && n !== "none" && l) && (X = !0), X);
@@ -1555,7 +1555,7 @@ function _a({
1555
1555
  onChange: r,
1556
1556
  isError: h,
1557
1557
  items: y,
1558
- isLoading: A,
1558
+ isLoading: L,
1559
1559
  value: i || "",
1560
1560
  title: "Table"
1561
1561
  }
@@ -1569,7 +1569,7 @@ function _a({
1569
1569
  items: c,
1570
1570
  title: "Connection",
1571
1571
  value: t || "",
1572
- onChange: k,
1572
+ onChange: z,
1573
1573
  isLoading: m,
1574
1574
  isError: j,
1575
1575
  connectionTooltip: ((se = c == null ? void 0 : c.find(
@@ -1579,9 +1579,9 @@ function _a({
1579
1579
  ),
1580
1580
  ee(),
1581
1581
  _(),
1582
- w(),
1583
- E(),
1584
- M()
1582
+ k(),
1583
+ A(),
1584
+ D()
1585
1585
  ] }),
1586
1586
  J(),
1587
1587
  /* @__PURE__ */ e.jsx("div", { className: "flex items-end justify-center gap-2 px-6 py-4", children: /* @__PURE__ */ e.jsxs(
@@ -1592,14 +1592,14 @@ function _a({
1592
1592
  variant: "secondary",
1593
1593
  className: "w-full",
1594
1594
  children: [
1595
- /* @__PURE__ */ e.jsx(Hn, { className: "mr-2 size-4" }),
1595
+ /* @__PURE__ */ e.jsx($n, { className: "mr-2 size-4" }),
1596
1596
  "Help"
1597
1597
  ]
1598
1598
  }
1599
1599
  ) })
1600
1600
  ] });
1601
1601
  }
1602
- function il(s) {
1602
+ function ol(s) {
1603
1603
  const t = s.toUpperCase().indexOf("WHERE"), a = s.toUpperCase().indexOf("GROUP BY"), n = s.toUpperCase().indexOf("LIMIT"), l = s.toUpperCase().indexOf("ORDER BY");
1604
1604
  let i = s.length;
1605
1605
  if (l !== -1 && (i = l), n !== -1 && n < i && (i = n), t !== -1) {
@@ -1615,16 +1615,16 @@ function il(s) {
1615
1615
  return `${r} {{ filters | where }} ${c}`;
1616
1616
  }
1617
1617
  }
1618
- function ol({
1618
+ function cl({
1619
1619
  error: s,
1620
1620
  setShowAIDialog: t,
1621
1621
  setUserInputforAI: a,
1622
1622
  setTriggerAIRun: n
1623
1623
  }) {
1624
- return /* @__PURE__ */ e.jsxs(_s, { openDelay: 0, children: [
1625
- /* @__PURE__ */ e.jsx(Hs, { asChild: !0, children: /* @__PURE__ */ e.jsx(F, { variant: "link", className: "h-5 p-0", children: /* @__PURE__ */ e.jsx(On, { className: "h-4 w-4 text-red-500" }) }) }),
1626
- /* @__PURE__ */ e.jsx($s, { align: "start", className: "min-w-fit max-w-[500px]", children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ e.jsxs("div", { className: "flex grow flex-col space-y-2", children: [
1627
- /* @__PURE__ */ e.jsx(Ps, { className: "max-h-[250px] min-h-0 overflow-scroll", children: /* @__PURE__ */ e.jsx("p", { className: "overflow-auto rounded-md bg-muted p-2 text-xs leading-relaxed", children: s }) }),
1624
+ return /* @__PURE__ */ e.jsxs(Hs, { openDelay: 0, children: [
1625
+ /* @__PURE__ */ e.jsx($s, { asChild: !0, children: /* @__PURE__ */ e.jsx(F, { variant: "link", className: "h-5 p-0", children: /* @__PURE__ */ e.jsx(Fn, { className: "h-4 w-4 text-red-500" }) }) }),
1626
+ /* @__PURE__ */ e.jsx(Ps, { align: "start", className: "min-w-fit max-w-[500px]", children: /* @__PURE__ */ e.jsx("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ e.jsxs("div", { className: "flex grow flex-col space-y-2", children: [
1627
+ /* @__PURE__ */ e.jsx(ms, { className: "max-h-[250px] min-h-0 overflow-scroll", children: /* @__PURE__ */ e.jsx("p", { className: "overflow-auto rounded-md bg-muted p-2 text-xs leading-relaxed", children: s }) }),
1628
1628
  /* @__PURE__ */ e.jsxs(
1629
1629
  F,
1630
1630
  {
@@ -1634,7 +1634,7 @@ function ol({
1634
1634
  size: "sm",
1635
1635
  variant: "outline",
1636
1636
  children: [
1637
- /* @__PURE__ */ e.jsx(En, { className: "mr-2 h-4 w-4" }),
1637
+ /* @__PURE__ */ e.jsx(An, { className: "mr-2 h-4 w-4" }),
1638
1638
  "Debug with AI"
1639
1639
  ]
1640
1640
  }
@@ -1642,22 +1642,22 @@ function ol({
1642
1642
  ] }) }) })
1643
1643
  ] });
1644
1644
  }
1645
- function cl({
1645
+ function dl({
1646
1646
  text: s,
1647
1647
  onCheckedChange: t,
1648
1648
  checked: a
1649
1649
  }) {
1650
1650
  return /* @__PURE__ */ e.jsxs("div", { className: "xbg-red-100 ml-6 flex items-center gap-2", children: [
1651
- /* @__PURE__ */ e.jsx(ms, { checked: a, onCheckedChange: t }),
1651
+ /* @__PURE__ */ e.jsx(xs, { checked: a, onCheckedChange: t }),
1652
1652
  /* @__PURE__ */ e.jsx("label", { className: "text-xs leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70", children: s })
1653
1653
  ] });
1654
1654
  }
1655
- function dl() {
1656
- const { authToken: s } = Oe(), t = u(
1655
+ function ul() {
1656
+ const { authToken: s } = ve(), t = u(
1657
1657
  (i) => i.selectedConnectionId
1658
1658
  ), { data: a } = me({
1659
1659
  queryKey: ["connections"],
1660
- queryFn: () => we(
1660
+ queryFn: () => ke(
1661
1661
  "https://semaphor.cloud/api/v1/connections",
1662
1662
  (s == null ? void 0 : s.accessToken) || ""
1663
1663
  ),
@@ -1668,10 +1668,10 @@ function dl() {
1668
1668
  );
1669
1669
  return n == null ? void 0 : n.type;
1670
1670
  }
1671
- function ul() {
1672
- const { authToken: s } = Oe(), t = Xe(null), a = u((o) => o.applyFilters), [n, l] = R(""), i = u((o) => o.filterValues), r = u((o) => o.card.sql), c = dl();
1671
+ function hl() {
1672
+ const { authToken: s } = ve(), t = Xe(null), a = u((o) => o.applyFilters), [n, l] = R(""), i = u((o) => o.filterValues), r = u((o) => o.card.sql), c = ul();
1673
1673
  return /* @__PURE__ */ e.jsxs(
1674
- _s,
1674
+ Hs,
1675
1675
  {
1676
1676
  openDelay: 0,
1677
1677
  onOpenChange: async (o) => {
@@ -1690,8 +1690,8 @@ function ul() {
1690
1690
  console.log(x), x.sql ? (console.log(x.records), l(x.sql)) : l("Error");
1691
1691
  },
1692
1692
  children: [
1693
- /* @__PURE__ */ e.jsx(Hs, { asChild: !0, children: a && /* @__PURE__ */ e.jsx("p", { className: "p-0 text-xs hover:cursor-pointer", children: "|  Filter Query" }) }),
1694
- /* @__PURE__ */ e.jsxs($s, { align: "end", className: "w-[600px]", children: [
1693
+ /* @__PURE__ */ e.jsx($s, { asChild: !0, children: a && /* @__PURE__ */ e.jsx("p", { className: "p-0 text-xs hover:cursor-pointer", children: "|  Filter Query" }) }),
1694
+ /* @__PURE__ */ e.jsxs(Ps, { align: "end", className: "w-[600px]", children: [
1695
1695
  /* @__PURE__ */ e.jsx("div", { className: "flex justify-between space-x-4", children: /* @__PURE__ */ e.jsx("div", { className: "rounded-sm bg-muted p-2", children: /* @__PURE__ */ e.jsxs("code", { ref: t, className: "font-mono text-sm", children: [
1696
1696
  n,
1697
1697
  /* @__PURE__ */ e.jsx(
@@ -1711,7 +1711,7 @@ function ul() {
1711
1711
  }
1712
1712
  );
1713
1713
  }
1714
- const hl = `
1714
+ const ml = `
1715
1715
 
1716
1716
  Use the following syntax to create a chart query. Please replace the x-axis, y-axis, stack-by, label, and measure with the actual column names of the table.
1717
1717
 
@@ -1758,7 +1758,7 @@ SELECT label, measure FROM table
1758
1758
  - Label - Category
1759
1759
  - Measure - Number
1760
1760
  `;
1761
- function ml({
1761
+ function xl({
1762
1762
  open: s,
1763
1763
  setOpen: t,
1764
1764
  userInput: a,
@@ -1766,64 +1766,64 @@ function ml({
1766
1766
  triggerAIRun: l,
1767
1767
  setTriggerAIRun: i
1768
1768
  }) {
1769
- const r = Xe(null), c = Xe(null), { authToken: o } = Oe(), [x, d] = R(!1), y = u((w) => w.actions.setCardSql), f = z((w) => w.dashboard.baseQueries), m = u((w) => w.actions.setRunSql), g = u((w) => w.actions.setCardType), [j, D] = R([]), C = u((w) => w.currentColumns), L = u((w) => w.card.sql), I = u((w) => w.selectedTableName), O = `
1769
+ const r = Xe(null), c = Xe(null), { authToken: o } = ve(), [x, d] = R(!1), y = u((k) => k.actions.setCardSql), f = O((k) => k.dashboard.baseQueries), m = u((k) => k.actions.setRunSql), g = u((k) => k.actions.setCardType), [j, T] = R([]), C = u((k) => k.currentColumns), M = u((k) => k.card.sql), I = u((k) => k.selectedTableName), V = `
1770
1770
  ${a}
1771
1771
 
1772
1772
  Database Query Dialect: ${I === "api" || I === "s3" ? "DuckDb" : ""}
1773
1773
  Table Name: ${I}
1774
- Table Columns: ${C == null ? void 0 : C.map((w) => `${w.column_name} | ${w.data_type}`).join(", ")}
1775
- User SQL: ${L}
1774
+ Table Columns: ${C == null ? void 0 : C.map((k) => `${k.column_name} | ${k.data_type}`).join(", ")}
1775
+ User SQL: ${M}
1776
1776
  ${f && `Base Queries: ${JSON.stringify(f)} `}`, N = ` When the user asks for a specific chart please use the following query structure to generate the chart query. Do not make up the column names. Use only the table columns provided above for the query. Replace x-axis, y-axis, and lables with the appropriate column names.
1777
- Visual Query Syntax: ${hl}`, { data: T, isLoading: A, isFetching: h, isError: v, refetch: p } = me({
1777
+ Visual Query Syntax: ${ml}`, { data: w, isLoading: L, isFetching: h, isError: v, refetch: p } = me({
1778
1778
  queryKey: ["ai-query"],
1779
- queryFn: () => we(
1779
+ queryFn: () => ke(
1780
1780
  "https://semaphor.cloud/api/v1/ai",
1781
1781
  (o == null ? void 0 : o.accessToken) || "",
1782
1782
  {
1783
- user_content: `userContent: ${O} ${x ? N : ""}`
1783
+ user_content: `userContent: ${V} ${x ? N : ""}`
1784
1784
  }
1785
1785
  ),
1786
1786
  enabled: !1
1787
1787
  // Do not run by default.
1788
1788
  });
1789
- function k(w) {
1790
- if (w.toLowerCase().includes("bar"))
1789
+ function z(k) {
1790
+ if (k.toLowerCase().includes("bar"))
1791
1791
  g("bar");
1792
- else if (w.toLowerCase().includes("line"))
1792
+ else if (k.toLowerCase().includes("line"))
1793
1793
  g("line");
1794
- else if (w.toLowerCase().includes("bubble"))
1794
+ else if (k.toLowerCase().includes("bubble"))
1795
1795
  g("bubble");
1796
- else if (w.toLowerCase().includes("scatter"))
1796
+ else if (k.toLowerCase().includes("scatter"))
1797
1797
  g("scatter");
1798
- else if (w.toLowerCase().includes("stacked"))
1798
+ else if (k.toLowerCase().includes("stacked"))
1799
1799
  g("stackedBar");
1800
- else if (w.toLowerCase().includes("pie"))
1800
+ else if (k.toLowerCase().includes("pie"))
1801
1801
  g("pie");
1802
- else if (w.toLowerCase().includes("donut") || w.toLowerCase().includes("doughnut"))
1802
+ else if (k.toLowerCase().includes("donut") || k.toLowerCase().includes("doughnut"))
1803
1803
  g("doughnut");
1804
- else if (w.toLowerCase().includes("radar"))
1804
+ else if (k.toLowerCase().includes("radar"))
1805
1805
  g("radar");
1806
1806
  else
1807
1807
  return g("bar"), !1;
1808
1808
  return !0;
1809
1809
  }
1810
1810
  Z(() => {
1811
- T && D((w) => [...w, { role: "ai", content: T.response }]);
1812
- }, [T]), Z(() => {
1813
- const w = setTimeout(() => {
1811
+ w && T((k) => [...k, { role: "ai", content: w.response }]);
1812
+ }, [w]), Z(() => {
1813
+ const k = setTimeout(() => {
1814
1814
  var _;
1815
1815
  c.current && (c.current.scroll({
1816
1816
  top: c.current.scrollHeight,
1817
1817
  behavior: "smooth"
1818
1818
  }), (_ = r.current) == null || _.focus());
1819
1819
  }, 100);
1820
- return () => clearTimeout(w);
1820
+ return () => clearTimeout(k);
1821
1821
  }, [j]);
1822
- function V() {
1823
- a && (D((w) => [...w, { role: "user", content: a }]), k(a) && d(!0), n(""), p());
1822
+ function E() {
1823
+ a && (T((k) => [...k, { role: "user", content: a }]), z(a) && d(!0), n(""), p());
1824
1824
  }
1825
1825
  Z(() => {
1826
- l && (V(), i(!1));
1826
+ l && (E(), i(!1));
1827
1827
  }, [l, i]);
1828
1828
  const $ = {
1829
1829
  //seleect a darker color
@@ -1852,9 +1852,9 @@ function ml({
1852
1852
  listStyleType: "disc"
1853
1853
  }, le = {
1854
1854
  // Override how paragraphs are rendered
1855
- p: ({ node: w, ..._ }) => /* @__PURE__ */ e.jsx("p", { style: $, ..._ }),
1856
- code: ({ node: w, ..._ }) => /* @__PURE__ */ e.jsx("code", { className: "rounded-sm bg-muted px-2 py-1 text-sm", ..._ }),
1857
- pre: ({ node: w, ..._ }) => /* @__PURE__ */ e.jsxs("pre", { className: "space-y-2 rounded-sm bg-muted/50 p-3", style: B, children: [
1855
+ p: ({ node: k, ..._ }) => /* @__PURE__ */ e.jsx("p", { style: $, ..._ }),
1856
+ code: ({ node: k, ..._ }) => /* @__PURE__ */ e.jsx("code", { className: "rounded-sm bg-muted px-2 py-1 text-sm", ..._ }),
1857
+ pre: ({ node: k, ..._ }) => /* @__PURE__ */ e.jsxs("pre", { className: "space-y-2 rounded-sm bg-muted/50 p-3", style: B, children: [
1858
1858
  /* @__PURE__ */ e.jsx("code", { className: "whitespace-normal text-sm", children: _.children }),
1859
1859
  /* @__PURE__ */ e.jsxs("div", { className: "flex justify-start gap-2", children: [
1860
1860
  /* @__PURE__ */ e.jsx(F, { onClick: J, size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(ba, {}) }),
@@ -1862,8 +1862,8 @@ function ml({
1862
1862
  F,
1863
1863
  {
1864
1864
  onClick: (ee) => {
1865
- const E = J(ee);
1866
- E && (t(!1), y(E), m(!0));
1865
+ const A = J(ee);
1866
+ A && (t(!1), y(A), m(!0));
1867
1867
  },
1868
1868
  size: "sm",
1869
1869
  variant: "outline",
@@ -1872,39 +1872,39 @@ function ml({
1872
1872
  )
1873
1873
  ] })
1874
1874
  ] }),
1875
- li: ({ node: w, ..._ }) => /* @__PURE__ */ e.jsx("li", { style: Y, ..._ })
1875
+ li: ({ node: k, ..._ }) => /* @__PURE__ */ e.jsx("li", { style: Y, ..._ })
1876
1876
  // You can add more overrides for other elements like h1, h2, etc.
1877
1877
  };
1878
- function J(w) {
1879
- const _ = w.currentTarget.closest("pre");
1878
+ function J(k) {
1879
+ const _ = k.currentTarget.closest("pre");
1880
1880
  if (!_)
1881
1881
  return;
1882
1882
  const ee = _.textContent || _.innerText;
1883
- return navigator.clipboard.writeText(ee).then(() => console.log("Text copied to clipboard")).catch((E) => console.error("Error in copying text: ", E)), ee;
1883
+ return navigator.clipboard.writeText(ee).then(() => console.log("Text copied to clipboard")).catch((A) => console.error("Error in copying text: ", A)), ee;
1884
1884
  }
1885
1885
  function ne() {
1886
- return j == null ? void 0 : j.map((w, _) => w.role === "user" ? /* @__PURE__ */ e.jsxs(
1886
+ return j == null ? void 0 : j.map((k, _) => k.role === "user" ? /* @__PURE__ */ e.jsxs(
1887
1887
  "div",
1888
1888
  {
1889
1889
  className: "flex items-start rounded-md bg-muted p-3 text-sm",
1890
1890
  children: [
1891
- /* @__PURE__ */ e.jsx(Yn, { className: "mr-2 h-5 w-5" }),
1892
- /* @__PURE__ */ e.jsx("div", { children: w.content })
1891
+ /* @__PURE__ */ e.jsx(Xn, { className: "mr-2 h-5 w-5" }),
1892
+ /* @__PURE__ */ e.jsx("div", { children: k.content })
1893
1893
  ]
1894
1894
  },
1895
1895
  _
1896
- ) : w.role === "ai" ? /* @__PURE__ */ e.jsx(
1896
+ ) : k.role === "ai" ? /* @__PURE__ */ e.jsx(
1897
1897
  yt,
1898
1898
  {
1899
1899
  className: "w-full overflow-auto py-1",
1900
1900
  components: le,
1901
- children: T == null ? void 0 : T.response.replace(/DuckDB/gi, "Semaphor")
1901
+ children: w == null ? void 0 : w.response.replace(/DuckDB/gi, "Semaphor")
1902
1902
  },
1903
1903
  _
1904
1904
  ) : /* @__PURE__ */ e.jsx("div", {}, _));
1905
1905
  }
1906
- return /* @__PURE__ */ e.jsxs(Is, { open: s, onOpenChange: t, children: [
1907
- /* @__PURE__ */ e.jsx(Ts, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1906
+ return /* @__PURE__ */ e.jsxs(Ts, { open: s, onOpenChange: t, children: [
1907
+ /* @__PURE__ */ e.jsx(Ds, { asChild: !0, children: /* @__PURE__ */ e.jsx(
1908
1908
  F,
1909
1909
  {
1910
1910
  size: "sm",
@@ -1914,13 +1914,13 @@ function ml({
1914
1914
  }
1915
1915
  ) }),
1916
1916
  /* @__PURE__ */ e.jsxs(
1917
- Ms,
1917
+ Ls,
1918
1918
  {
1919
1919
  className: "flex flex-col justify-between overflow-auto sm:max-w-[425px] md:max-h-[625px] md:min-w-[625px]",
1920
1920
  children: [
1921
- /* @__PURE__ */ e.jsxs(Ls, { children: [
1922
- /* @__PURE__ */ e.jsx(Es, { children: "Assistant" }),
1923
- /* @__PURE__ */ e.jsx(As, { children: "What can I help you with?" })
1921
+ /* @__PURE__ */ e.jsxs(Es, { children: [
1922
+ /* @__PURE__ */ e.jsx(As, { children: "Assistant" }),
1923
+ /* @__PURE__ */ e.jsx(Vs, { children: "What can I help you with?" })
1924
1924
  ] }),
1925
1925
  /* @__PURE__ */ e.jsx(
1926
1926
  "div",
@@ -1939,20 +1939,20 @@ function ml({
1939
1939
  {
1940
1940
  autoFocus: !0,
1941
1941
  ref: r,
1942
- onKeyDown: (w) => {
1943
- w.key === "Enter" && !w.shiftKey && (w.preventDefault(), n(""), V());
1942
+ onKeyDown: (k) => {
1943
+ k.key === "Enter" && !k.shiftKey && (k.preventDefault(), n(""), E());
1944
1944
  },
1945
1945
  placeholder: "Type your question here...",
1946
- onFocus: (w) => {
1947
- const _ = w.target, ee = _.value.length;
1946
+ onFocus: (k) => {
1947
+ const _ = k.target, ee = _.value.length;
1948
1948
  _.setSelectionRange(ee, ee);
1949
1949
  },
1950
1950
  className: W(
1951
1951
  "max-h-10 min-h-7 resize-none border-none focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0"
1952
1952
  ),
1953
- disabled: A || h,
1953
+ disabled: L || h,
1954
1954
  value: a,
1955
- onChange: (w) => n(w.target.value)
1955
+ onChange: (k) => n(k.target.value)
1956
1956
  }
1957
1957
  ),
1958
1958
  " ",
@@ -1962,8 +1962,8 @@ function ml({
1962
1962
  className: "h-8",
1963
1963
  size: "sm",
1964
1964
  variant: "ghost",
1965
- onClick: V,
1966
- children: !A && !h ? /* @__PURE__ */ e.jsx(bt, {}) : /* @__PURE__ */ e.jsx(Ze, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" })
1965
+ onClick: E,
1966
+ children: !L && !h ? /* @__PURE__ */ e.jsx(bt, {}) : /* @__PURE__ */ e.jsx(Ze, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" })
1967
1967
  }
1968
1968
  )
1969
1969
  ] })
@@ -1980,11 +1980,11 @@ var Ha = {
1980
1980
  className: void 0,
1981
1981
  style: void 0,
1982
1982
  attr: void 0
1983
- }, na = ze.createContext && /* @__PURE__ */ ze.createContext(Ha), xl = ["attr", "size", "title"];
1984
- function pl(s, t) {
1983
+ }, na = Oe.createContext && /* @__PURE__ */ Oe.createContext(Ha), pl = ["attr", "size", "title"];
1984
+ function fl(s, t) {
1985
1985
  if (s == null)
1986
1986
  return {};
1987
- var a = fl(s, t), n, l;
1987
+ var a = gl(s, t), n, l;
1988
1988
  if (Object.getOwnPropertySymbols) {
1989
1989
  var i = Object.getOwnPropertySymbols(s);
1990
1990
  for (l = 0; l < i.length; l++)
@@ -1992,7 +1992,7 @@ function pl(s, t) {
1992
1992
  }
1993
1993
  return a;
1994
1994
  }
1995
- function fl(s, t) {
1995
+ function gl(s, t) {
1996
1996
  if (s == null)
1997
1997
  return {};
1998
1998
  var a = {}, n = Object.keys(s), l, i;
@@ -2024,21 +2024,21 @@ function us(s) {
2024
2024
  for (var t = 1; t < arguments.length; t++) {
2025
2025
  var a = arguments[t] != null ? arguments[t] : {};
2026
2026
  t % 2 ? la(Object(a), !0).forEach(function(n) {
2027
- gl(s, n, a[n]);
2027
+ jl(s, n, a[n]);
2028
2028
  }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(s, Object.getOwnPropertyDescriptors(a)) : la(Object(a)).forEach(function(n) {
2029
2029
  Object.defineProperty(s, n, Object.getOwnPropertyDescriptor(a, n));
2030
2030
  });
2031
2031
  }
2032
2032
  return s;
2033
2033
  }
2034
- function gl(s, t, a) {
2035
- return t = jl(t), t in s ? Object.defineProperty(s, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : s[t] = a, s;
2034
+ function jl(s, t, a) {
2035
+ return t = bl(t), t in s ? Object.defineProperty(s, t, { value: a, enumerable: !0, configurable: !0, writable: !0 }) : s[t] = a, s;
2036
2036
  }
2037
- function jl(s) {
2038
- var t = bl(s, "string");
2037
+ function bl(s) {
2038
+ var t = yl(s, "string");
2039
2039
  return typeof t == "symbol" ? t : String(t);
2040
2040
  }
2041
- function bl(s, t) {
2041
+ function yl(s, t) {
2042
2042
  if (typeof s != "object" || s === null)
2043
2043
  return s;
2044
2044
  var a = s[Symbol.toPrimitive];
@@ -2051,23 +2051,23 @@ function bl(s, t) {
2051
2051
  return (t === "string" ? String : Number)(s);
2052
2052
  }
2053
2053
  function $a(s) {
2054
- return s && s.map((t, a) => /* @__PURE__ */ ze.createElement(t.tag, us({
2054
+ return s && s.map((t, a) => /* @__PURE__ */ Oe.createElement(t.tag, us({
2055
2055
  key: a
2056
2056
  }, t.attr), $a(t.child)));
2057
2057
  }
2058
- function ve(s) {
2059
- return (t) => /* @__PURE__ */ ze.createElement(yl, ds({
2058
+ function Ce(s) {
2059
+ return (t) => /* @__PURE__ */ Oe.createElement(vl, ds({
2060
2060
  attr: us({}, s.attr)
2061
2061
  }, t), $a(s.child));
2062
2062
  }
2063
- function yl(s) {
2063
+ function vl(s) {
2064
2064
  var t = (a) => {
2065
2065
  var {
2066
2066
  attr: n,
2067
2067
  size: l,
2068
2068
  title: i
2069
- } = s, r = pl(s, xl), c = l || a.size || "1em", o;
2070
- return a.className && (o = a.className), s.className && (o = (o ? o + " " : "") + s.className), /* @__PURE__ */ ze.createElement("svg", ds({
2069
+ } = s, r = fl(s, pl), c = l || a.size || "1em", o;
2070
+ return a.className && (o = a.className), s.className && (o = (o ? o + " " : "") + s.className), /* @__PURE__ */ Oe.createElement("svg", ds({
2071
2071
  stroke: "currentColor",
2072
2072
  fill: "currentColor",
2073
2073
  strokeWidth: "0"
@@ -2079,52 +2079,52 @@ function yl(s) {
2079
2079
  height: c,
2080
2080
  width: c,
2081
2081
  xmlns: "http://www.w3.org/2000/svg"
2082
- }), i && /* @__PURE__ */ ze.createElement("title", null, i), s.children);
2082
+ }), i && /* @__PURE__ */ Oe.createElement("title", null, i), s.children);
2083
2083
  };
2084
- return na !== void 0 ? /* @__PURE__ */ ze.createElement(na.Consumer, null, (a) => t(a)) : t(Ha);
2084
+ return na !== void 0 ? /* @__PURE__ */ Oe.createElement(na.Consumer, null, (a) => t(a)) : t(Ha);
2085
2085
  }
2086
- function vl(s) {
2087
- return ve({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z" }, child: [] }] })(s);
2086
+ function Cl(s) {
2087
+ return Ce({ tag: "svg", attr: { viewBox: "0 0 448 512" }, child: [{ tag: "path", attr: { d: "M439.8 200.5c-7.7-30.9-22.3-54.2-53.4-54.2h-40.1v47.4c0 36.8-31.2 67.8-66.8 67.8H172.7c-29.2 0-53.4 25-53.4 54.3v101.8c0 29 25.2 46 53.4 54.3 33.8 9.9 66.3 11.7 106.8 0 26.9-7.8 53.4-23.5 53.4-54.3v-40.7H226.2v-13.6h160.2c31.1 0 42.6-21.7 53.4-54.2 11.2-33.5 10.7-65.7 0-108.6zM286.2 404c11.1 0 20.1 9.1 20.1 20.3 0 11.3-9 20.4-20.1 20.4-11 0-20.1-9.2-20.1-20.4.1-11.3 9.1-20.3 20.1-20.3zM167.8 248.1h106.8c29.7 0 53.4-24.5 53.4-54.3V91.9c0-29-24.4-50.7-53.4-55.6-35.8-5.9-74.7-5.6-106.8.1-45.2 8-53.4 24.7-53.4 55.6v40.7h106.9v13.6h-147c-31.1 0-58.3 18.7-66.8 54.2-9.8 40.7-10.2 66.1 0 108.6 7.6 31.6 25.7 54.2 56.8 54.2H101v-48.8c0-35.3 30.5-66.4 66.8-66.4zm-6.7-142.6c-11.1 0-20.1-9.1-20.1-20.3.1-11.3 9-20.4 20.1-20.4 11 0 20.1 9.2 20.1 20.4s-9 20.3-20.1 20.3z" }, child: [] }] })(s);
2088
2088
  }
2089
- function Cl() {
2089
+ function Nl() {
2090
2090
  const [s, t] = R({
2091
2091
  queryKey: [],
2092
2092
  queryData: null
2093
- }), { theme: a } = Ct(), n = Nt(), l = Xe(), i = Xe(), [r, c] = R(!1), [o, x] = R(!1), [d, y] = R(!1), [f, m] = R(""), [g, j] = R(!1), D = z((b) => b.selectedSheetId);
2094
- z((b) => b.dashboard.baseQueries);
2095
- const C = u((b) => b.card), L = z((b) => b.theme), I = u((b) => b.isShowingVisual);
2096
- z((b) => b.onAcceptChanges);
2097
- const O = u(
2093
+ }), { theme: a } = Ct(), n = Nt(), l = Xe(), i = Xe(), [r, c] = R(!1), [o, x] = R(!1), [d, y] = R(!1), [f, m] = R(""), [g, j] = R(!1), T = O((b) => b.selectedSheetId);
2094
+ O((b) => b.dashboard.baseQueries);
2095
+ const C = u((b) => b.card), M = O((b) => b.theme), I = u((b) => b.isShowingVisual);
2096
+ O((b) => b.onAcceptChanges);
2097
+ const V = u(
2098
2098
  (b) => b.selectedConnectionId
2099
2099
  ), N = u(
2100
2100
  (b) => b.selectedDatabaseName
2101
- ), T = u(
2101
+ ), w = u(
2102
2102
  (b) => b.selectedDatamodelId
2103
- ), A = u(
2103
+ ), L = u(
2104
2104
  (b) => b.selectedSchemaName
2105
2105
  );
2106
- z(
2106
+ O(
2107
2107
  (b) => b.actions.updateFrameCard
2108
2108
  );
2109
- const h = u((b) => b.selectedTableName), v = u((b) => b.card.sql), p = u((b) => b.card.python), k = u((b) => b.frame), V = z((b) => b.dashboard.filters), $ = z((b) => b.filterValues), B = V == null ? void 0 : V.filter(
2110
- (b) => b.sheetId === D || !b.sheetId
2109
+ const h = u((b) => b.selectedTableName), v = u((b) => b.card.sql), p = u((b) => b.card.python), z = u((b) => b.frame), E = O((b) => b.dashboard.filters), $ = O((b) => b.filterValues), B = E == null ? void 0 : E.filter(
2110
+ (b) => b.sheetId === T || !b.sheetId
2111
2111
  ), Y = $ == null ? void 0 : $.filter(
2112
- (b) => (B == null ? void 0 : B.some((te) => te.id === b.filterId)) || b.filterId.endsWith(D)
2112
+ (b) => (B == null ? void 0 : B.some((te) => te.id === b.filterId)) || b.filterId.endsWith(T)
2113
2113
  ), le = u((b) => b.applyFilters), {
2114
2114
  setCardCustomCfg: J,
2115
2115
  setQueryResultColumns: ne,
2116
- setFilterValues: w,
2116
+ setFilterValues: k,
2117
2117
  setCardSql: _,
2118
2118
  setCard: ee,
2119
- setCardPython: E,
2120
- setQueryError: M,
2119
+ setCardPython: A,
2120
+ setQueryError: D,
2121
2121
  setPythonStdOut: se,
2122
2122
  setCardPreferences: P
2123
2123
  } = u((b) => b.actions), X = u((b) => b.onSave), ie = u(
2124
2124
  (b) => b.actions.setApplyFilters
2125
- ), Ce = u((b) => b.onClose), Le = u((b) => b.actions.setSqlGen), Ne = u((b) => b.runSql), Fe = u((b) => b.actions.setRunSql);
2125
+ ), Ne = u((b) => b.onClose), Le = u((b) => b.actions.setSqlGen), Se = u((b) => b.runSql), Fe = u((b) => b.actions.setRunSql);
2126
2126
  u((b) => b.actions.setCardCfg);
2127
- const Se = u(
2127
+ const we = u(
2128
2128
  (b) => b.actions.setIsSqlRunning
2129
2129
  ), {
2130
2130
  data: ae,
@@ -2141,7 +2141,7 @@ function Cl() {
2141
2141
  position: "top-center",
2142
2142
  richColors: !0
2143
2143
  }), se((ae == null ? void 0 : ae.output) || ""), ae.records.length > 0)) {
2144
- const { dimensionKeys: b } = Ss(ae.records);
2144
+ const { dimensionKeys: b } = ws(ae.records);
2145
2145
  ne(b);
2146
2146
  }
2147
2147
  }, [
@@ -2150,7 +2150,7 @@ function Cl() {
2150
2150
  ne,
2151
2151
  se
2152
2152
  ]), Z(() => {
2153
- (ue || he) && Se(!0), (Ee || es) && Se(!1), Ee ? (M(He.message), ne([]), se("")) : M("");
2153
+ (ue || he) && we(!0), (Ee || es) && we(!1), Ee ? (D(He.message), ne([]), se("")) : D("");
2154
2154
  }, [
2155
2155
  ue,
2156
2156
  he,
@@ -2158,14 +2158,14 @@ function Cl() {
2158
2158
  se,
2159
2159
  Ee,
2160
2160
  es,
2161
- Se,
2161
+ we,
2162
2162
  ne,
2163
- M,
2163
+ D,
2164
2164
  He
2165
2165
  ]), Z(() => {
2166
- Ne && (Ae(), Fe(!1));
2167
- }, [Ne, Ae, Fe]);
2168
- function ys() {
2166
+ Se && (Ae(), Fe(!1));
2167
+ }, [Se, Ae, Fe]);
2168
+ function vs() {
2169
2169
  const b = n.getQueryData($e);
2170
2170
  s.queryData || t({
2171
2171
  queryKey: $e,
@@ -2197,34 +2197,34 @@ function Cl() {
2197
2197
  }
2198
2198
  function as() {
2199
2199
  let b = v;
2200
- v && !v.includes("{{") && (b = il(v), _(b));
2200
+ v && !v.includes("{{") && (b = ol(v), _(b));
2201
2201
  const te = {
2202
2202
  ...C,
2203
- lastSelectedSchema: A,
2204
- lastSelectedDatamodelId: T,
2203
+ lastSelectedSchema: L,
2204
+ lastSelectedDatamodelId: w,
2205
2205
  lastSelectedDatabase: N,
2206
2206
  lastSelectedTable: h,
2207
- connectionId: O,
2207
+ connectionId: V,
2208
2208
  type: I ? C.type : "table",
2209
2209
  sql: b,
2210
2210
  customCfg: I ? C.customCfg : null
2211
- }, Ie = k.cards.map(
2212
- (vs) => vs.id === C.id ? te : vs
2211
+ }, Ie = z.cards.map(
2212
+ (Cs) => Cs.id === C.id ? te : Cs
2213
2213
  ), oe = {
2214
- ...k,
2214
+ ...z,
2215
2215
  cards: Ie,
2216
- activeCardId: ss(Ie, k.activeCardId)
2216
+ activeCardId: ss(Ie, z.activeCardId)
2217
2217
  };
2218
2218
  X == null || X(oe);
2219
2219
  }
2220
2220
  function ts() {
2221
2221
  const { queryKey: b, queryData: te } = s;
2222
- b && te && n.setQueryData(b, te), Ce == null || Ce();
2222
+ b && te && n.setQueryData(b, te), Ne == null || Ne();
2223
2223
  }
2224
2224
  Z(() => {
2225
2225
  const b = l.current, te = i.current;
2226
2226
  if (b) {
2227
- const Ie = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", oe = L === "system" ? Ie : L;
2227
+ const Ie = window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light", oe = M === "system" ? Ie : M;
2228
2228
  b.editor.defineTheme("default", {
2229
2229
  // base: theme === 'light' ? 'hc-light' : 'vs-dark',
2230
2230
  base: oe === "light" ? "vs" : "vs-dark",
@@ -2243,7 +2243,7 @@ function Cl() {
2243
2243
  }
2244
2244
  ), () => {
2245
2245
  };
2246
- }, [a, L, l.current]);
2246
+ }, [a, M, l.current]);
2247
2247
  function Be(b) {
2248
2248
  l.current = b;
2249
2249
  }
@@ -2257,14 +2257,14 @@ function Cl() {
2257
2257
  children: /* @__PURE__ */ e.jsxs("div", { className: "w-[99%]", children: [
2258
2258
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2 pt-3", children: [
2259
2259
  /* @__PURE__ */ e.jsx(
2260
- cl,
2260
+ dl,
2261
2261
  {
2262
2262
  checked: le,
2263
2263
  onCheckedChange: () => ie(!le),
2264
2264
  text: "Apply Filters"
2265
2265
  }
2266
2266
  ),
2267
- /* @__PURE__ */ e.jsx(ul, {}),
2267
+ /* @__PURE__ */ e.jsx(hl, {}),
2268
2268
  Y && o && /* @__PURE__ */ e.jsx(
2269
2269
  Je,
2270
2270
  {
@@ -2280,7 +2280,7 @@ function Cl() {
2280
2280
  onChange: (b) => {
2281
2281
  if (b)
2282
2282
  try {
2283
- JSON.parse(b), w(JSON.parse(b));
2283
+ JSON.parse(b), k(JSON.parse(b));
2284
2284
  } catch {
2285
2285
  }
2286
2286
  },
@@ -2323,7 +2323,7 @@ function Cl() {
2323
2323
  }
2324
2324
  function tt() {
2325
2325
  return /* @__PURE__ */ e.jsxs(
2326
- ws,
2326
+ ks,
2327
2327
  {
2328
2328
  className: "flex grow pb-1",
2329
2329
  direction: "vertical",
@@ -2375,7 +2375,7 @@ function Cl() {
2375
2375
  }
2376
2376
  ),
2377
2377
  r && /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2378
- /* @__PURE__ */ e.jsx(ks, { withHandle: !0, className: "border" }),
2378
+ /* @__PURE__ */ e.jsx(zs, { withHandle: !0, className: "border" }),
2379
2379
  /* @__PURE__ */ e.jsxs(
2380
2380
  Ve,
2381
2381
  {
@@ -2395,7 +2395,7 @@ function Cl() {
2395
2395
  className: "pt-3",
2396
2396
  theme: "default",
2397
2397
  onChange: (b) => {
2398
- E(b && b.trim() || "");
2398
+ A(b && b.trim() || "");
2399
2399
  },
2400
2400
  value: p || kt,
2401
2401
  options: {
@@ -2464,13 +2464,13 @@ function Cl() {
2464
2464
  size: "sm",
2465
2465
  variant: "outline",
2466
2466
  children: [
2467
- ue || he ? /* @__PURE__ */ e.jsx(Ze, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(Pn, { className: "mr-2 h-4 w-4" }),
2467
+ ue || he ? /* @__PURE__ */ e.jsx(Ze, { className: "mr-2 h-4 w-4 animate-spin text-foreground/50" }) : /* @__PURE__ */ e.jsx(Bn, { className: "mr-2 h-4 w-4" }),
2468
2468
  "Run"
2469
2469
  ]
2470
2470
  }
2471
2471
  ),
2472
2472
  Ee && /* @__PURE__ */ e.jsx(
2473
- ol,
2473
+ cl,
2474
2474
  {
2475
2475
  error: He.message,
2476
2476
  setShowAIDialog: y,
@@ -2481,12 +2481,12 @@ function Cl() {
2481
2481
  /* @__PURE__ */ e.jsxs(
2482
2482
  F,
2483
2483
  {
2484
- onClick: ys,
2484
+ onClick: vs,
2485
2485
  className: "",
2486
2486
  size: "sm",
2487
2487
  variant: "outline",
2488
2488
  children: [
2489
- /* @__PURE__ */ e.jsx(Tn, { className: "mr-2 size-4" }),
2489
+ /* @__PURE__ */ e.jsx(Dn, { className: "mr-2 size-4" }),
2490
2490
  "Clear"
2491
2491
  ]
2492
2492
  }
@@ -2499,11 +2499,11 @@ function Cl() {
2499
2499
  className: "",
2500
2500
  size: "sm",
2501
2501
  variant: "outline",
2502
- children: /* @__PURE__ */ e.jsx(vl, { className: "size-4 text-foreground/70" })
2502
+ children: /* @__PURE__ */ e.jsx(Cl, { className: "size-4 text-foreground/70" })
2503
2503
  }
2504
2504
  ),
2505
2505
  /* @__PURE__ */ e.jsx(
2506
- ml,
2506
+ xl,
2507
2507
  {
2508
2508
  open: d,
2509
2509
  setOpen: y,
@@ -2549,9 +2549,9 @@ function Cl() {
2549
2549
  )
2550
2550
  );
2551
2551
  }
2552
- function Nl({ data: s }) {
2552
+ function Sl({ data: s }) {
2553
2553
  var r;
2554
- const [t, a] = ze.useState([]), l = Object.keys(s[0]).map((c) => ({
2554
+ const [t, a] = Oe.useState([]), l = Object.keys(s[0]).map((c) => ({
2555
2555
  // header: key,
2556
2556
  accessorKey: c,
2557
2557
  header: ({ column: o }) => {
@@ -2581,74 +2581,75 @@ function Nl({ data: s }) {
2581
2581
  }
2582
2582
  });
2583
2583
  return /* @__PURE__ */ e.jsxs(It, { children: [
2584
- /* @__PURE__ */ e.jsx(Tt, { children: i.getHeaderGroups().map((c) => /* @__PURE__ */ e.jsx(Cs, { children: c.headers.map((o) => /* @__PURE__ */ e.jsx(Dt, { className: "sticky top-0 bg-muted", children: o.isPlaceholder ? null : Zs(
2584
+ /* @__PURE__ */ e.jsx(Tt, { children: i.getHeaderGroups().map((c) => /* @__PURE__ */ e.jsx(Ns, { children: c.headers.map((o) => /* @__PURE__ */ e.jsx(Dt, { className: "sticky top-0 bg-muted", children: o.isPlaceholder ? null : Zs(
2585
2585
  o.column.columnDef.header,
2586
2586
  o.getContext()
2587
2587
  ) }, o.id)) }, c.id)) }),
2588
2588
  /* @__PURE__ */ e.jsx(Mt, { children: (r = i.getRowModel().rows) != null && r.length ? i.getRowModel().rows.map((c) => /* @__PURE__ */ e.jsx(
2589
- Cs,
2589
+ Ns,
2590
2590
  {
2591
2591
  className: "whitespace-nowrap py-2",
2592
2592
  "data-state": c.getIsSelected() && "selected",
2593
2593
  children: c.getVisibleCells().map((o) => /* @__PURE__ */ e.jsx(ea, { children: Zs(o.column.columnDef.cell, o.getContext()) }, o.id))
2594
2594
  },
2595
2595
  c.id
2596
- )) : /* @__PURE__ */ e.jsx(Cs, { children: /* @__PURE__ */ e.jsx(ea, { colSpan: l.length, className: "h-24 text-center", children: "No results." }) }) })
2596
+ )) : /* @__PURE__ */ e.jsx(Ns, { children: /* @__PURE__ */ e.jsx(ea, { colSpan: l.length, className: "h-24 text-center", children: "No results." }) }) })
2597
2597
  ] });
2598
2598
  }
2599
- function Sl({ card: s }) {
2600
- var d, y, f, m, g, j, D, C, L, I;
2601
- const t = z((O) => O.themeStyle), a = {
2602
- colors: ((y = (d = t == null ? void 0 : t.chart) == null ? void 0 : d.dataset) == null ? void 0 : y.backgroundColor) || []
2599
+ function wl({ card: s }) {
2600
+ var f, m, g, j, T, C, M, I, V, N;
2601
+ const { authToken: t } = ve(), a = Vt(t == null ? void 0 : t.accessToken), n = O((w) => w.themeStyle), l = {
2602
+ colors: ((m = (f = n == null ? void 0 : n.chart) == null ? void 0 : f.dataset) == null ? void 0 : m.backgroundColor) || []
2603
2603
  };
2604
- (f = s.customCardPreferences) != null && f.inputData;
2605
- const { getCard: n } = va(((m = s.customCardPreferences) == null ? void 0 : m.url) || ""), l = ((g = s.customCardPreferences) == null ? void 0 : g.visualType) || "single", i = u((O) => O.frame);
2604
+ (g = s.customCardPreferences) != null && g.inputData;
2605
+ const { getCard: i } = va(((j = s.customCardPreferences) == null ? void 0 : j.url) || ""), r = ((T = s.customCardPreferences) == null ? void 0 : T.visualType) || "single", c = u((w) => w.frame);
2606
2606
  ce();
2607
- const { data: r } = qe(s);
2608
- if (!((j = s.customCardPreferences) != null && j.componentName))
2607
+ const { data: o } = qe(s);
2608
+ if (!((C = s.customCardPreferences) != null && C.componentName))
2609
2609
  return null;
2610
- const c = n(
2611
- (D = s.customCardPreferences) == null ? void 0 : D.componentName
2612
- ), o = (O) => {
2613
- console.log("data", O), s.customCardPreferences;
2614
- }, x = Object.keys(
2615
- ((C = s.customCardPreferences) == null ? void 0 : C.dataInputCardIds) || {}
2616
- ).map((O) => {
2617
- var A, h, v;
2618
- const N = (h = (A = s.customCardPreferences) == null ? void 0 : A.dataInputCardIds) == null ? void 0 : h[O].cardId, T = (v = i == null ? void 0 : i.cards) == null ? void 0 : v.find((p) => p.id === N);
2619
- return T || null;
2610
+ const x = i(
2611
+ (M = s.customCardPreferences) == null ? void 0 : M.componentName
2612
+ ), d = (w) => {
2613
+ console.log("data", w), s.customCardPreferences;
2614
+ }, y = Object.keys(
2615
+ ((I = s.customCardPreferences) == null ? void 0 : I.dataInputCardIds) || {}
2616
+ ).map((w) => {
2617
+ var v, p, z;
2618
+ const L = (p = (v = s.customCardPreferences) == null ? void 0 : v.dataInputCardIds) == null ? void 0 : p[w].cardId, h = (z = c == null ? void 0 : c.cards) == null ? void 0 : z.find((E) => E.id === L);
2619
+ return h || null;
2620
2620
  });
2621
2621
  return /* @__PURE__ */ e.jsx("div", { className: "semaphor-custom mb-3 flex grow basis-0 flex-col space-y-2 overflow-y-auto", children: /* @__PURE__ */ e.jsxs(
2622
- wn,
2622
+ kn,
2623
2623
  {
2624
2624
  fallback: /* @__PURE__ */ e.jsx(e.Fragment, {}),
2625
2625
  children: [
2626
- c && l === "single" && /* @__PURE__ */ e.jsx(
2627
- c,
2626
+ x && r === "single" && /* @__PURE__ */ e.jsx(
2627
+ x,
2628
2628
  {
2629
- theme: a,
2630
- settings: (L = s.customCardPreferences) == null ? void 0 : L.settings,
2631
- onDataChange: o,
2632
- data: (r == null ? void 0 : r.records) || []
2629
+ params: a,
2630
+ theme: l,
2631
+ settings: (V = s.customCardPreferences) == null ? void 0 : V.settings,
2632
+ onDataChange: d,
2633
+ data: (o == null ? void 0 : o.records) || []
2633
2634
  }
2634
2635
  ),
2635
- c && l === "multiple" && /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ e.jsx(
2636
- c,
2636
+ x && r === "multiple" && /* @__PURE__ */ e.jsx("div", { className: "flex flex-col gap-2", children: /* @__PURE__ */ e.jsx(
2637
+ x,
2637
2638
  {
2638
- theme: a,
2639
- onDataChange: o,
2640
- settings: x.map(
2641
- (O) => {
2642
- var N;
2643
- return (N = O == null ? void 0 : O.customCardPreferences) == null ? void 0 : N.settings;
2639
+ theme: l,
2640
+ onDataChange: d,
2641
+ settings: y.map(
2642
+ (w) => {
2643
+ var L;
2644
+ return (L = w == null ? void 0 : w.customCardPreferences) == null ? void 0 : L.settings;
2644
2645
  }
2645
2646
  ),
2646
- data: x.map((O) => (O == null ? void 0 : O.data) || [])
2647
+ data: y.map((w) => (w == null ? void 0 : w.data) || [])
2647
2648
  }
2648
2649
  ) })
2649
2650
  ]
2650
2651
  },
2651
- (I = s.customCardPreferences) == null ? void 0 : I.componentName
2652
+ (N = s.customCardPreferences) == null ? void 0 : N.componentName
2652
2653
  ) });
2653
2654
  }
2654
2655
  function Pa({
@@ -2658,9 +2659,9 @@ function Pa({
2658
2659
  ...t
2659
2660
  }) {
2660
2661
  var m, g;
2661
- const a = u((j) => j.card), n = ((m = a.customCardPreferences) == null ? void 0 : m.showCardHeader) ?? !0, l = u((j) => j.frame), i = z((j) => j.dashboard.filters);
2662
+ const a = u((j) => j.card), n = ((m = a.customCardPreferences) == null ? void 0 : m.showCardHeader) ?? !0, l = u((j) => j.frame), i = O((j) => j.dashboard.filters);
2662
2663
  u((j) => j.actions.setRunSql);
2663
- const { updateFilter: r } = Fs(), c = i == null ? void 0 : i.find((j) => j.id === l.filterId), { data: o } = qe(a), { setCard: x } = ce(), { data: d } = Bs(a);
2664
+ const { updateFilter: r } = Is(), c = i == null ? void 0 : i.find((j) => j.id === l.filterId), { data: o } = qe(a), { setCard: x } = ce(), { data: d } = Bs(a);
2664
2665
  if (!a.id)
2665
2666
  return null;
2666
2667
  let y;
@@ -2673,23 +2674,23 @@ function Pa({
2673
2674
  topoJson: d
2674
2675
  }));
2675
2676
  function f(j) {
2676
- return /* @__PURE__ */ e.jsx(Sl, { card: j });
2677
+ return /* @__PURE__ */ e.jsx(wl, { card: j });
2677
2678
  }
2678
2679
  return /* @__PURE__ */ e.jsxs(
2679
- Vt,
2680
+ qt,
2680
2681
  {
2681
2682
  role: "editor-visual-card",
2682
2683
  className: W("relative flex h-full flex-col rounded-none", s),
2683
2684
  ...t,
2684
2685
  children: [
2685
- n && /* @__PURE__ */ e.jsxs(qt, { className: "flex flex-row items-start justify-between py-4", children: [
2686
+ n && /* @__PURE__ */ e.jsxs(Rt, { className: "flex flex-row items-start justify-between py-4", children: [
2686
2687
  /* @__PURE__ */ e.jsxs("div", { children: [
2687
2688
  /* @__PURE__ */ e.jsx(
2688
2689
  rs,
2689
2690
  {
2690
2691
  text: a.title,
2691
2692
  onSave: (j) => x({ ...a, title: j }),
2692
- children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-5", children: /* @__PURE__ */ e.jsx(Rt, { className: "text-base", children: a.title || "Edit title..." }) })
2693
+ children: /* @__PURE__ */ e.jsx("div", { className: "flex items-center gap-5", children: /* @__PURE__ */ e.jsx(_t, { className: "text-base", children: a.title || "Edit title..." }) })
2693
2694
  },
2694
2695
  a.title
2695
2696
  ),
@@ -2698,7 +2699,7 @@ function Pa({
2698
2699
  {
2699
2700
  text: a.description || "",
2700
2701
  onSave: (j) => x({ ...a, description: j }),
2701
- children: /* @__PURE__ */ e.jsx(_t, { children: a.description || "Edit description..." })
2702
+ children: /* @__PURE__ */ e.jsx(Ht, { children: a.description || "Edit description..." })
2702
2703
  },
2703
2704
  a.description
2704
2705
  )
@@ -2713,33 +2714,33 @@ function Pa({
2713
2714
  children: /* @__PURE__ */ e.jsx(H, { children: c.title })
2714
2715
  }
2715
2716
  ),
2716
- Ht(c)
2717
+ $t(c)
2717
2718
  ] })
2718
2719
  ] }),
2719
- /* @__PURE__ */ e.jsxs($t, { className: "flex grow flex-col", children: [
2720
+ /* @__PURE__ */ e.jsxs(Pt, { className: "flex grow flex-col", children: [
2720
2721
  a.type === "custom" && f(a),
2721
2722
  !["table", "custom"].includes(a.type) && y && // <ChartJsVisual key={visualKey} cfg={cfg} />
2722
2723
  /* @__PURE__ */ e.jsx(
2723
- Pt,
2724
+ Bt,
2724
2725
  {
2725
2726
  cfg: y
2726
2727
  },
2727
2728
  JSON.stringify(y) + JSON.stringify(a.preferences) + ((g = a == null ? void 0 : a.preferences) == null ? void 0 : g.customVisualCode)
2728
2729
  ),
2729
2730
  a.type === "table" && (o == null ? void 0 : o.records) && (o == null ? void 0 : o.records.length) > 0 && // All of the below css classes are #IMPORTANT for the table to scroll properly
2730
- /* @__PURE__ */ e.jsx(Bt, { className: "flex min-h-0 flex-1 grow basis-0", children: /* @__PURE__ */ e.jsx(Ut, { card: a, data: o == null ? void 0 : o.records }) })
2731
+ /* @__PURE__ */ e.jsx(Ut, { className: "flex min-h-0 flex-1 grow basis-0", children: /* @__PURE__ */ e.jsx(Gt, { card: a, data: o == null ? void 0 : o.records }) })
2731
2732
  ] })
2732
2733
  ]
2733
2734
  }
2734
2735
  );
2735
2736
  }
2736
- function wl() {
2737
+ function kl() {
2737
2738
  const [s, t] = R(!1), [a, n] = R(""), [l, i] = R(""), [r, c] = R(""), [o, x] = R(""), d = u((N) => N.card), y = u(
2738
2739
  (N) => N.card.customCfg
2739
2740
  ), { data: f } = qe(d), { data: m } = Bs(d), { setCardCustomCfg: g, setCustomVisualCode: j } = ce();
2740
- function D(N) {
2741
+ function T(N) {
2741
2742
  var h, v;
2742
- const T = {
2743
+ const w = {
2743
2744
  ...N,
2744
2745
  data: {
2745
2746
  ...N == null ? void 0 : N.data,
@@ -2749,10 +2750,10 @@ function wl() {
2749
2750
  }))
2750
2751
  }
2751
2752
  };
2752
- return JSON.stringify(T, null, 1);
2753
+ return JSON.stringify(w, null, 1);
2753
2754
  }
2754
2755
  function C() {
2755
- var T, A;
2756
+ var w, L;
2756
2757
  if (!(f != null && f.records) || (f == null ? void 0 : f.records.length) === 0)
2757
2758
  return;
2758
2759
  const N = Ca({
@@ -2762,9 +2763,9 @@ function wl() {
2762
2763
  preferences: d.preferences,
2763
2764
  topoJson: m
2764
2765
  });
2765
- N && (n(JSON.stringify(N, null, 1)), (T = d == null ? void 0 : d.preferences) != null && T.customVisualCode && c((A = d == null ? void 0 : d.preferences) == null ? void 0 : A.customVisualCode), y && i(JSON.stringify(y, null, 1)));
2766
+ N && (n(JSON.stringify(N, null, 1)), (w = d == null ? void 0 : d.preferences) != null && w.customVisualCode && c((L = d == null ? void 0 : d.preferences) == null ? void 0 : L.customVisualCode), y && i(JSON.stringify(y, null, 1)));
2766
2767
  }
2767
- function L() {
2768
+ function M() {
2768
2769
  if (r && j(r), !!l)
2769
2770
  try {
2770
2771
  const N = JSON.parse(l);
@@ -2776,34 +2777,34 @@ function wl() {
2776
2777
  function I() {
2777
2778
  i(""), g(null);
2778
2779
  }
2779
- function O() {
2780
+ function V() {
2780
2781
  let N;
2781
2782
  if (y) {
2782
- const T = sa.cloneDeep(d.cfg), A = sa.merge(T, y);
2783
- return N = D(A), N;
2783
+ const w = sa.cloneDeep(d.cfg), L = sa.merge(w, y);
2784
+ return N = T(L), N;
2784
2785
  }
2785
- return a ? (N = D(JSON.parse(a)), N) : "";
2786
+ return a ? (N = T(JSON.parse(a)), N) : "";
2786
2787
  }
2787
- return /* @__PURE__ */ e.jsxs(Is, { open: s, onOpenChange: t, children: [
2788
- /* @__PURE__ */ e.jsx(Ts, { asChild: !0, children: /* @__PURE__ */ e.jsx(
2788
+ return /* @__PURE__ */ e.jsxs(Ts, { open: s, onOpenChange: t, children: [
2789
+ /* @__PURE__ */ e.jsx(Ds, { asChild: !0, children: /* @__PURE__ */ e.jsx(
2789
2790
  F,
2790
2791
  {
2791
2792
  onClick: C,
2792
2793
  className: ` ${y && "border-foreground/50 dark:border-foreground/70"}`,
2793
2794
  size: "sm",
2794
2795
  variant: "outline",
2795
- children: /* @__PURE__ */ e.jsx(Gt, { className: "h-4 w-4" })
2796
+ children: /* @__PURE__ */ e.jsx(Kt, { className: "h-4 w-4" })
2796
2797
  }
2797
2798
  ) }),
2798
2799
  /* @__PURE__ */ e.jsxs(
2799
- Ms,
2800
+ Ls,
2800
2801
  {
2801
2802
  className: "max-h-[70vh] min-h-[70vh] overflow-auto sm:min-w-[900px] lg:min-w-[1200px]",
2802
2803
  children: [
2803
- /* @__PURE__ */ e.jsxs(Ls, { className: "", children: [
2804
+ /* @__PURE__ */ e.jsxs(Es, { className: "", children: [
2804
2805
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center gap-2", children: [
2805
- /* @__PURE__ */ e.jsx(Es, { children: "Customize Card" }),
2806
- /* @__PURE__ */ e.jsxs(Vs, { children: [
2806
+ /* @__PURE__ */ e.jsx(As, { children: "Customize Card" }),
2807
+ /* @__PURE__ */ e.jsxs(qs, { children: [
2807
2808
  /* @__PURE__ */ e.jsx(ma, { children: /* @__PURE__ */ e.jsx(
2808
2809
  La,
2809
2810
  {
@@ -2813,10 +2814,10 @@ function wl() {
2813
2814
  className: "size-3 cursor-pointer text-muted-foreground/70 transition-colors hover:text-muted-foreground"
2814
2815
  }
2815
2816
  ) }),
2816
- /* @__PURE__ */ e.jsx(qs, { side: "right", align: "center", children: /* @__PURE__ */ e.jsx("p", { className: "text-xs", children: "Copy Card ID" }) })
2817
+ /* @__PURE__ */ e.jsx(Rs, { side: "right", align: "center", children: /* @__PURE__ */ e.jsx("p", { className: "text-xs", children: "Copy Card ID" }) })
2817
2818
  ] })
2818
2819
  ] }),
2819
- /* @__PURE__ */ e.jsxs(As, { children: [
2820
+ /* @__PURE__ */ e.jsxs(Vs, { children: [
2820
2821
  "See the configuration options and documentation",
2821
2822
  /* @__PURE__ */ e.jsx(
2822
2823
  "a",
@@ -2830,7 +2831,7 @@ function wl() {
2830
2831
  ] })
2831
2832
  ] }),
2832
2833
  /* @__PURE__ */ e.jsxs("div", { className: "flex grow gap-2", children: [
2833
- /* @__PURE__ */ e.jsx(xs, { FallbackComponent: Na, children: /* @__PURE__ */ e.jsx(Pa, { className: "w-1/2 rounded shadow-none" }) }),
2834
+ /* @__PURE__ */ e.jsx(ps, { FallbackComponent: Na, children: /* @__PURE__ */ e.jsx(Pa, { className: "w-1/2 rounded shadow-none" }) }),
2834
2835
  /* @__PURE__ */ e.jsxs(Sa, { defaultValue: "custom-config", className: "flex w-1/2 flex-col", children: [
2835
2836
  /* @__PURE__ */ e.jsxs(wa, { className: "justify-start rounded-sm rounded-b-none border border-b-0", children: [
2836
2837
  /* @__PURE__ */ e.jsxs(is, { value: "custom-config", children: [
@@ -2878,7 +2879,7 @@ function wl() {
2878
2879
  renderLineHighlight: "none"
2879
2880
  },
2880
2881
  defaultLanguage: "json",
2881
- value: O(),
2882
+ value: V(),
2882
2883
  onChange: (N) => i(N)
2883
2884
  }
2884
2885
  )
@@ -2926,7 +2927,7 @@ function wl() {
2926
2927
  children: "Reset"
2927
2928
  }
2928
2929
  ),
2929
- /* @__PURE__ */ e.jsx(F, { onClick: L, variant: "outline", children: "Apply" }),
2930
+ /* @__PURE__ */ e.jsx(F, { onClick: M, variant: "outline", children: "Apply" }),
2930
2931
  /* @__PURE__ */ e.jsx(F, { onClick: () => t(!1), variant: "outline", children: "Close" })
2931
2932
  ] })
2932
2933
  ]
@@ -2935,47 +2936,47 @@ function wl() {
2935
2936
  ] });
2936
2937
  }
2937
2938
  function Ba(s) {
2938
- return ve({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M926.8 397.1l-396-288a31.81 31.81 0 0 0-37.6 0l-396 288a31.99 31.99 0 0 0-11.6 35.8l151.3 466a32 32 0 0 0 30.4 22.1h489.5c13.9 0 26.1-8.9 30.4-22.1l151.3-466c4.2-13.2-.5-27.6-11.7-35.8zM838.6 417l-98.5 32-200-144.7V199.9L838.6 417zM466 567.2l-89.1 122.3-55.2-169.2L466 567.2zm-116.3-96.8L484 373.3v140.8l-134.3-43.7zM512 599.2l93.9 128.9H418.1L512 599.2zm28.1-225.9l134.2 97.1L540.1 514V373.3zM558 567.2l144.3-46.9-55.2 169.2L558 567.2zm-74-367.3v104.4L283.9 449l-98.5-32L484 199.9zM169.3 470.8l86.5 28.1 80.4 246.4-53.8 73.9-113.1-348.4zM327.1 853l50.3-69h269.3l50.3 69H327.1zm414.5-33.8l-53.8-73.9 80.4-246.4 86.5-28.1-113.1 348.4z" }, child: [] }] })(s);
2939
+ return Ce({ tag: "svg", attr: { viewBox: "0 0 1024 1024" }, child: [{ tag: "path", attr: { d: "M926.8 397.1l-396-288a31.81 31.81 0 0 0-37.6 0l-396 288a31.99 31.99 0 0 0-11.6 35.8l151.3 466a32 32 0 0 0 30.4 22.1h489.5c13.9 0 26.1-8.9 30.4-22.1l151.3-466c4.2-13.2-.5-27.6-11.7-35.8zM838.6 417l-98.5 32-200-144.7V199.9L838.6 417zM466 567.2l-89.1 122.3-55.2-169.2L466 567.2zm-116.3-96.8L484 373.3v140.8l-134.3-43.7zM512 599.2l93.9 128.9H418.1L512 599.2zm28.1-225.9l134.2 97.1L540.1 514V373.3zM558 567.2l144.3-46.9-55.2 169.2L558 567.2zm-74-367.3v104.4L283.9 449l-98.5-32L484 199.9zM169.3 470.8l86.5 28.1 80.4 246.4-53.8 73.9-113.1-348.4zM327.1 853l50.3-69h269.3l50.3 69H327.1zm414.5-33.8l-53.8-73.9 80.4-246.4 86.5-28.1-113.1 348.4z" }, child: [] }] })(s);
2939
2940
  }
2940
2941
  function Ua(s) {
2941
- return ve({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M137.39,24.06A16,16,0,0,0,120,40V80.67a15.86,15.86,0,0,0,13.25,15.76A32,32,0,1,1,96,129.68c-.41-8.22,1.27-15,5-20.26h0a15.86,15.86,0,0,0-1.69-20.47L71.69,60.68a16,16,0,0,0-23.63,1.1A103.6,103.6,0,0,0,55,202.05,103.24,103.24,0,0,0,128,232h1.49A104.3,104.3,0,0,0,232,129.48C232.75,75.18,191.19,28.88,137.39,24.06ZM60.32,71.94l27.61,28.19,0,.06A43.29,43.29,0,0,0,80.44,120H40.36A87.13,87.13,0,0,1,60.32,71.94ZM40.37,136h40.3A48,48,0,0,0,120,175.34v40.3A88,88,0,0,1,40.37,136Zm149.77,54.14A87.45,87.45,0,0,1,136,215.61V175.34a47.55,47.55,0,0,0,24.73-12.23A48,48,0,0,0,136,80.66L136,40c45.52,4.08,80.67,43.28,80,89.25A87.45,87.45,0,0,1,190.14,190.14Z" }, child: [] }] })(s);
2942
+ return Ce({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M137.39,24.06A16,16,0,0,0,120,40V80.67a15.86,15.86,0,0,0,13.25,15.76A32,32,0,1,1,96,129.68c-.41-8.22,1.27-15,5-20.26h0a15.86,15.86,0,0,0-1.69-20.47L71.69,60.68a16,16,0,0,0-23.63,1.1A103.6,103.6,0,0,0,55,202.05,103.24,103.24,0,0,0,128,232h1.49A104.3,104.3,0,0,0,232,129.48C232.75,75.18,191.19,28.88,137.39,24.06ZM60.32,71.94l27.61,28.19,0,.06A43.29,43.29,0,0,0,80.44,120H40.36A87.13,87.13,0,0,1,60.32,71.94ZM40.37,136h40.3A48,48,0,0,0,120,175.34v40.3A88,88,0,0,1,40.37,136Zm149.77,54.14A87.45,87.45,0,0,1,136,215.61V175.34a47.55,47.55,0,0,0,24.73-12.23A48,48,0,0,0,136,80.66L136,40c45.52,4.08,80.67,43.28,80,89.25A87.45,87.45,0,0,1,190.14,190.14Z" }, child: [] }] })(s);
2942
2943
  }
2943
2944
  function Ga(s) {
2944
- return ve({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm87.63,96H191.48A64.1,64.1,0,0,0,136,64.52V40.37A88.13,88.13,0,0,1,215.63,120ZM120,120H80.68A48.09,48.09,0,0,1,120,80.68Zm0,16v39.32A48.09,48.09,0,0,1,80.68,136Zm16,0h39.32A48.09,48.09,0,0,1,136,175.32Zm0-16V80.68A48.09,48.09,0,0,1,175.32,120ZM120,40.37V64.52A64.1,64.1,0,0,0,64.52,120H40.37A88.13,88.13,0,0,1,120,40.37ZM40.37,136H64.52A64.1,64.1,0,0,0,120,191.48v24.15A88.13,88.13,0,0,1,40.37,136ZM136,215.63V191.48A64.1,64.1,0,0,0,191.48,136h24.15A88.13,88.13,0,0,1,136,215.63Z" }, child: [] }] })(s);
2945
+ return Ce({ tag: "svg", attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M128,24A104,104,0,1,0,232,128,104.11,104.11,0,0,0,128,24Zm87.63,96H191.48A64.1,64.1,0,0,0,136,64.52V40.37A88.13,88.13,0,0,1,215.63,120ZM120,120H80.68A48.09,48.09,0,0,1,120,80.68Zm0,16v39.32A48.09,48.09,0,0,1,80.68,136Zm16,0h39.32A48.09,48.09,0,0,1,136,175.32Zm0-16V80.68A48.09,48.09,0,0,1,175.32,120ZM120,40.37V64.52A64.1,64.1,0,0,0,64.52,120H40.37A88.13,88.13,0,0,1,120,40.37ZM40.37,136H64.52A64.1,64.1,0,0,0,120,191.48v24.15A88.13,88.13,0,0,1,40.37,136ZM136,215.63V191.48A64.1,64.1,0,0,0,191.48,136h24.15A88.13,88.13,0,0,1,136,215.63Z" }, child: [] }] })(s);
2945
2946
  }
2946
2947
  function Ka(s) {
2947
- return ve({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, child: [] }, { tag: "path", attr: { d: "M6 16m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" }, child: [] }, { tag: "path", attr: { d: "M16 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }, child: [] }, { tag: "path", attr: { d: "M14.5 7.5m-4.5 0a4.5 4.5 0 1 0 9 0a4.5 4.5 0 1 0 -9 0" }, child: [] }] })(s);
2948
+ return Ce({ tag: "svg", attr: { viewBox: "0 0 24 24", strokeWidth: "2", stroke: "currentColor", fill: "none", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { stroke: "none", d: "M0 0h24v24H0z", fill: "none" }, child: [] }, { tag: "path", attr: { d: "M6 16m-3 0a3 3 0 1 0 6 0a3 3 0 1 0 -6 0" }, child: [] }, { tag: "path", attr: { d: "M16 19m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0" }, child: [] }, { tag: "path", attr: { d: "M14.5 7.5m-4.5 0a4.5 4.5 0 1 0 9 0a4.5 4.5 0 1 0 -9 0" }, child: [] }] })(s);
2948
2949
  }
2949
2950
  function Qa(s) {
2950
- return ve({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "m2 19.99 7.5-7.51 4 4 7.09-7.97L22 9.92l-8.5 9.56-4-4-6 6.01-1.5-1.5zm1.5-4.5 6-6.01 4 4L22 3.92l-1.41-1.41-7.09 7.97-4-4L2 13.99l1.5 1.5z" }, child: [] }] })(s);
2951
+ return Ce({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "m2 19.99 7.5-7.51 4 4 7.09-7.97L22 9.92l-8.5 9.56-4-4-6 6.01-1.5-1.5zm1.5-4.5 6-6.01 4 4L22 3.92l-1.41-1.41-7.09 7.97-4-4L2 13.99l1.5 1.5z" }, child: [] }] })(s);
2951
2952
  }
2952
2953
  function Ja(s) {
2953
- return ve({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M4 9h4v11H4zM4 4h4v4H4zM10 7h4v4h-4zM16 10h4v4h-4zM16 15h4v5h-4zM10 12h4v8h-4z" }, child: [] }] })(s);
2954
+ return Ce({ tag: "svg", attr: { viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { fill: "none", d: "M0 0h24v24H0z" }, child: [] }, { tag: "path", attr: { d: "M4 9h4v11H4zM4 4h4v4H4zM10 7h4v4h-4zM16 10h4v4h-4zM16 15h4v5h-4zM10 12h4v8h-4z" }, child: [] }] })(s);
2954
2955
  }
2955
2956
  function Wa(s) {
2956
- return ve({ tag: "svg", attr: { version: "1.2", baseProfile: "tiny", viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 18c-.552 0-1-.448-1-1v-6.382l-.553.276c-.495.248-1.095.046-1.342-.447-.247-.494-.046-1.094.448-1.342l2-1c.31-.155.678-.139.973.044.294.183.474.504.474.851v8c0 .552-.448 1-1 1zM13 18h-5c-.404 0-.769-.244-.924-.617-.155-.374-.069-.804.217-1.09l4-4c.254-.254.394-.591.394-.95 0-.358-.14-.695-.394-.949-.508-.508-1.39-.508-1.9.001-.253.252-.393.589-.393.948 0 .552-.448 1-1 1s-1-.448-1-1c0-.894.348-1.733.98-2.364 1.265-1.263 3.464-1.263 4.727.001.632.631.979 1.471.979 2.363 0 .893-.348 1.733-.979 2.364l-2.293 2.293h2.586c.552 0 1 .448 1 1s-.448 1-1 1zM20.955 12.377c.338-.457.545-1.016.545-1.627 0-1.517-1.234-2.75-2.75-2.75-1.031 0-1.966.569-2.44 1.484-.254.49-.063 1.094.428 1.348.49.254 1.094.062 1.348-.428.128-.249.383-.404.664-.404.414 0 .75.336.75.75s-.336.75-.75.75c-.552 0-1 .448-1 1s.448 1 1 1c.689 0 1.25.561 1.25 1.25s-.561 1.25-1.25 1.25-1.25-.561-1.25-1.25c0-.552-.448-1-1-1s-1 .448-1 1c0 1.792 1.458 3.25 3.25 3.25s3.25-1.458 3.25-3.25c0-.939-.406-1.779-1.045-2.373z" }, child: [] }] })(s);
2957
+ return Ce({ tag: "svg", attr: { version: "1.2", baseProfile: "tiny", viewBox: "0 0 24 24" }, child: [{ tag: "path", attr: { d: "M4 18c-.552 0-1-.448-1-1v-6.382l-.553.276c-.495.248-1.095.046-1.342-.447-.247-.494-.046-1.094.448-1.342l2-1c.31-.155.678-.139.973.044.294.183.474.504.474.851v8c0 .552-.448 1-1 1zM13 18h-5c-.404 0-.769-.244-.924-.617-.155-.374-.069-.804.217-1.09l4-4c.254-.254.394-.591.394-.95 0-.358-.14-.695-.394-.949-.508-.508-1.39-.508-1.9.001-.253.252-.393.589-.393.948 0 .552-.448 1-1 1s-1-.448-1-1c0-.894.348-1.733.98-2.364 1.265-1.263 3.464-1.263 4.727.001.632.631.979 1.471.979 2.363 0 .893-.348 1.733-.979 2.364l-2.293 2.293h2.586c.552 0 1 .448 1 1s-.448 1-1 1zM20.955 12.377c.338-.457.545-1.016.545-1.627 0-1.517-1.234-2.75-2.75-2.75-1.031 0-1.966.569-2.44 1.484-.254.49-.063 1.094.428 1.348.49.254 1.094.062 1.348-.428.128-.249.383-.404.664-.404.414 0 .75.336.75.75s-.336.75-.75.75c-.552 0-1 .448-1 1s.448 1 1 1c.689 0 1.25.561 1.25 1.25s-.561 1.25-1.25 1.25-1.25-.561-1.25-1.25c0-.552-.448-1-1-1s-1 .448-1 1c0 1.792 1.458 3.25 3.25 3.25s3.25-1.458 3.25-3.25c0-.939-.406-1.779-1.045-2.373z" }, child: [] }] })(s);
2957
2958
  }
2958
2959
  function Ya(s) {
2959
- return ve({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M217 25v14h78V25h-78zm0 32v46h14V71h50v32h14V57h-78zm32 32v14h14V89h-14zm-64 32v46h30v-46h-30zm48 0v14h46v-14h-46zm64 0v46h30v-46h-30zm-64 32v14h46v-14h-46zm-80 32v46h62v-46h-62zm80 0v14h46v-14h-46zm64 0v46h62v-46h-62zm-64 32v14h46v-14h-46zm-112 32v46h94v-46h-94zm112 0v14h46v-14h-46zm64 0v46h94v-46h-94zm-64 32v14h46v-14h-46zM89 313v46h126v-46H89zm144 0v14h46v-14h-46zm64 0v46h126v-46H297zm-64 32v14h46v-14h-46zM57 377v46h158v-46H57zm176 0v14h46v-14h-46zm64 0v46h158v-46H297zm-64 32v14h46v-14h-46zM25 441v46h190v-46H25zm208 0v14h46v-14h-46zm64 0v46h190v-46H297zm-64 32v14h46v-14h-46z" }, child: [] }] })(s);
2960
+ return Ce({ tag: "svg", attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M217 25v14h78V25h-78zm0 32v46h14V71h50v32h14V57h-78zm32 32v14h14V89h-14zm-64 32v46h30v-46h-30zm48 0v14h46v-14h-46zm64 0v46h30v-46h-30zm-64 32v14h46v-14h-46zm-80 32v46h62v-46h-62zm80 0v14h46v-14h-46zm64 0v46h62v-46h-62zm-64 32v14h46v-14h-46zm-112 32v46h94v-46h-94zm112 0v14h46v-14h-46zm64 0v46h94v-46h-94zm-64 32v14h46v-14h-46zM89 313v46h126v-46H89zm144 0v14h46v-14h-46zm64 0v46h126v-46H297zm-64 32v14h46v-14h-46zM57 377v46h158v-46H57zm176 0v14h46v-14h-46zm64 0v46h158v-46H297zm-64 32v14h46v-14h-46zM25 441v46h190v-46H25zm208 0v14h46v-14h-46zm64 0v46h190v-46H297zm-64 32v14h46v-14h-46z" }, child: [] }] })(s);
2960
2961
  }
2961
2962
  function Xa(s) {
2962
2963
  const [t, a] = R(null);
2963
2964
  return Z(() => {
2964
2965
  s && (async () => {
2965
- const i = (await import("./lucide-react-Mpu2F2_p.js"))[s];
2966
+ const i = (await import("./lucide-react-bxB0wxx1.js"))[s];
2966
2967
  a(i);
2967
2968
  })();
2968
2969
  }, [s]), t;
2969
2970
  }
2970
2971
  function Za() {
2971
- const { authToken: s } = Oe(), { data: t, isLoading: a, isFetching: n, isError: l } = me({
2972
+ const { authToken: s } = ve(), { data: t, isLoading: a, isFetching: n, isError: l } = me({
2972
2973
  queryKey: ["plugins", s == null ? void 0 : s.accessToken],
2973
- queryFn: () => Kt(s == null ? void 0 : s.accessToken)
2974
+ queryFn: () => Qt(s == null ? void 0 : s.accessToken)
2974
2975
  // staleTime: Infinity,
2975
2976
  });
2976
2977
  return { data: t, isLoading: a, isFetching: n, isError: l };
2977
2978
  }
2978
- function kl({
2979
+ function zl({
2979
2980
  onChartTypeChange: s
2980
2981
  }) {
2981
2982
  const [t, a] = R([]), { data: n } = Za();
@@ -2984,7 +2985,7 @@ function kl({
2984
2985
  var i;
2985
2986
  if (n) {
2986
2987
  const c = (await Promise.all(
2987
- (i = n == null ? void 0 : n.plugins) == null ? void 0 : i.map(async (o) => (await Qt(o.value)).visuals.map((y) => ({
2988
+ (i = n == null ? void 0 : n.plugins) == null ? void 0 : i.map(async (o) => (await Jt(o.value)).visuals.map((y) => ({
2988
2989
  name: y.name,
2989
2990
  icon: y.icon,
2990
2991
  url: o.value
@@ -2996,7 +2997,7 @@ function kl({
2996
2997
  }, [n]), t.length === 0 ? null : /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
2997
2998
  /* @__PURE__ */ e.jsx(de, { className: "my-2" }),
2998
2999
  /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-4 place-items-center", children: t.map((l, i) => /* @__PURE__ */ e.jsx(
2999
- zl,
3000
+ Ol,
3000
3001
  {
3001
3002
  text: l.name,
3002
3003
  onClick: () => s("custom", l),
@@ -3006,7 +3007,7 @@ function kl({
3006
3007
  )) })
3007
3008
  ] });
3008
3009
  }
3009
- const zl = ({
3010
+ const Ol = ({
3010
3011
  text: s,
3011
3012
  icon: t,
3012
3013
  onClick: a
@@ -3014,7 +3015,7 @@ const zl = ({
3014
3015
  const n = Xa(t || ""), l = s.charAt(0).toUpperCase();
3015
3016
  return /* @__PURE__ */ e.jsx(F, { onClick: a, title: s, variant: "ghost", children: n ? /* @__PURE__ */ e.jsx(n, { className: "h-4 w-4" }) : l });
3016
3017
  };
3017
- function Ol() {
3018
+ function Fl() {
3018
3019
  var d, y;
3019
3020
  const [s, t] = R(!1), a = u((f) => f.card), n = a.type, { setCardType: l, setCardPreferences: i, setChartOrientation: r } = u((f) => f.actions), { setCardCustomCfg: c, setCustomCardPreferences: o } = ce();
3020
3021
  function x(f, m) {
@@ -3026,9 +3027,9 @@ function Ol() {
3026
3027
  icon: m.icon
3027
3028
  }), t(!1);
3028
3029
  }
3029
- return /* @__PURE__ */ e.jsxs(ps, { open: s, onOpenChange: t, children: [
3030
- /* @__PURE__ */ e.jsx(fs, { asChild: !0, children: /* @__PURE__ */ e.jsx(F, { size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(
3031
- Fl,
3030
+ return /* @__PURE__ */ e.jsxs(fs, { open: s, onOpenChange: t, children: [
3031
+ /* @__PURE__ */ e.jsx(gs, { asChild: !0, children: /* @__PURE__ */ e.jsx(F, { size: "sm", variant: "outline", children: /* @__PURE__ */ e.jsx(
3032
+ Il,
3032
3033
  {
3033
3034
  className: "h-4 w-4",
3034
3035
  chartType: n,
@@ -3036,7 +3037,7 @@ function Ol() {
3036
3037
  componentName: (y = a.customCardPreferences) == null ? void 0 : y.componentName
3037
3038
  }
3038
3039
  ) }) }),
3039
- /* @__PURE__ */ e.jsxs(gs, { className: "w-50", children: [
3040
+ /* @__PURE__ */ e.jsxs(js, { className: "w-50", children: [
3040
3041
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-4 place-items-center", children: [
3041
3042
  /* @__PURE__ */ e.jsx(
3042
3043
  F,
@@ -3146,7 +3147,7 @@ function Ol() {
3146
3147
  {
3147
3148
  onClick: () => x("table"),
3148
3149
  variant: "ghost",
3149
- children: /* @__PURE__ */ e.jsx(Rs, { className: "size-5" })
3150
+ children: /* @__PURE__ */ e.jsx(_s, { className: "size-5" })
3150
3151
  }
3151
3152
  ),
3152
3153
  /* @__PURE__ */ e.jsx(
@@ -3182,11 +3183,11 @@ function Ol() {
3182
3183
  }
3183
3184
  )
3184
3185
  ] }),
3185
- /* @__PURE__ */ e.jsx(kl, { onChartTypeChange: x })
3186
+ /* @__PURE__ */ e.jsx(zl, { onChartTypeChange: x })
3186
3187
  ] })
3187
3188
  ] });
3188
3189
  }
3189
- function Fl({
3190
+ function Il({
3190
3191
  chartType: s,
3191
3192
  className: t,
3192
3193
  customIcon: a,
@@ -3227,10 +3228,10 @@ function Fl({
3227
3228
  case "custom":
3228
3229
  return a && l ? /* @__PURE__ */ e.jsx(l, { className: t }) : n ? n == null ? void 0 : n.charAt(0).toUpperCase() : /* @__PURE__ */ e.jsx(Va, { className: t });
3229
3230
  default:
3230
- return /* @__PURE__ */ e.jsx(Rs, { className: t });
3231
+ return /* @__PURE__ */ e.jsx(_s, { className: t });
3231
3232
  }
3232
3233
  }
3233
- function Il() {
3234
+ function Tl() {
3234
3235
  var l;
3235
3236
  const s = u((i) => i.card), t = ((l = s.customCardPreferences) == null ? void 0 : l.showCardHeader) ?? !0, { setCustomCardPreferences: a } = ce(), n = (i) => {
3236
3237
  s.customCardPreferences && a({
@@ -3242,7 +3243,7 @@ function Il() {
3242
3243
  /* @__PURE__ */ e.jsx(da, { asChild: !0, children: /* @__PURE__ */ e.jsx(Ma, { className: "size-4 cursor-pointer text-muted-foreground/70 transition-colors hover:text-muted-foreground" }) }),
3243
3244
  /* @__PURE__ */ e.jsxs(ua, { align: "start", className: "w-40 text-muted-foreground", children: [
3244
3245
  /* @__PURE__ */ e.jsx(
3245
- Jt,
3246
+ Wt,
3246
3247
  {
3247
3248
  checked: t,
3248
3249
  onCheckedChange: n,
@@ -3250,7 +3251,7 @@ function Il() {
3250
3251
  }
3251
3252
  ),
3252
3253
  /* @__PURE__ */ e.jsxs(
3253
- Wt,
3254
+ Yt,
3254
3255
  {
3255
3256
  onClick: () => {
3256
3257
  navigator.clipboard.writeText(s.id), Ye.success("Card ID copied to clipboard");
@@ -3308,35 +3309,35 @@ function ra() {
3308
3309
  };
3309
3310
  g(h);
3310
3311
  }
3311
- function D(h) {
3312
- const v = s.cards.filter((V) => V.id !== h), p = v[0], k = {
3312
+ function T(h) {
3313
+ const v = s.cards.filter((E) => E.id !== h), p = v[0], z = {
3313
3314
  ...s,
3314
3315
  cards: v,
3315
3316
  // update the active card to the first card in the frame
3316
3317
  activeCardId: p.id
3317
3318
  };
3318
- c(k), o(p);
3319
+ c(z), o(p);
3319
3320
  }
3320
3321
  function C(h) {
3321
3322
  const v = {
3322
3323
  ...s,
3323
- cards: s.cards.map((k) => k.id === t.id ? t : k),
3324
+ cards: s.cards.map((z) => z.id === t.id ? t : z),
3324
3325
  activeCardId: h
3325
3326
  };
3326
3327
  c(v);
3327
- const p = v.cards.find((k) => k.id === h);
3328
+ const p = v.cards.find((z) => z.id === h);
3328
3329
  p.sql && r(!0), o(p);
3329
3330
  }
3330
- const L = (h, v) => {
3331
+ const M = (h, v) => {
3331
3332
  console.log("handleDragStart", v), h.dataTransfer.setData("tabIndex", v.toString());
3332
3333
  }, I = (h) => {
3333
3334
  h.preventDefault();
3334
- }, O = (h, v) => {
3335
+ }, V = (h, v) => {
3335
3336
  const p = h.dataTransfer.getData("tabIndex");
3336
3337
  if (p === v.toString())
3337
3338
  return;
3338
- const k = Array.from(s.cards), [V] = k.splice(parseInt(p), 1);
3339
- k.splice(v, 0, V), c({ ...s, cards: k });
3339
+ const z = Array.from(s.cards), [E] = z.splice(parseInt(p), 1);
3340
+ z.splice(v, 0, E), c({ ...s, cards: z });
3340
3341
  };
3341
3342
  function N(h, v) {
3342
3343
  return h.cards.length === 1 && (v.displayTab === !0 || v.displayTab === void 0) || h.activeCardId !== v.id && (v.displayTab === !0 || v.displayTab === void 0) ? null : /* @__PURE__ */ e.jsx(
@@ -3349,11 +3350,11 @@ function ra() {
3349
3350
  displayTab: p
3350
3351
  });
3351
3352
  },
3352
- children: v.displayTab === !0 || v.displayTab === void 0 ? /* @__PURE__ */ e.jsx(Mn, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" }) : /* @__PURE__ */ e.jsx(Dn, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" })
3353
+ children: v.displayTab === !0 || v.displayTab === void 0 ? /* @__PURE__ */ e.jsx(Ln, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" }) : /* @__PURE__ */ e.jsx(Mn, { className: "mr-2 size-3.5 text-muted-foreground hover:text-foreground" })
3353
3354
  }
3354
3355
  );
3355
3356
  }
3356
- function T() {
3357
+ function w() {
3357
3358
  return /* @__PURE__ */ e.jsxs(
3358
3359
  Sa,
3359
3360
  {
@@ -3361,7 +3362,7 @@ function ra() {
3361
3362
  value: s.activeCardId,
3362
3363
  className: "flex grow flex-col",
3363
3364
  children: [
3364
- s.cards.map((h) => /* @__PURE__ */ e.jsx(os, { className: "mt-0 grow", value: h.id, children: A() }, h.id)),
3365
+ s.cards.map((h) => /* @__PURE__ */ e.jsx(os, { className: "mt-0 grow", value: h.id, children: L() }, h.id)),
3365
3366
  /* @__PURE__ */ e.jsx(wa, { className: "group mx-6 justify-between", children: /* @__PURE__ */ e.jsxs("div", { className: "flex items-center", children: [
3366
3367
  s.cards.map((h, v) => /* @__PURE__ */ e.jsx(
3367
3368
  rs,
@@ -3374,9 +3375,9 @@ function ra() {
3374
3375
  is,
3375
3376
  {
3376
3377
  draggable: !0,
3377
- onDragStart: (p) => L(p, v),
3378
+ onDragStart: (p) => M(p, v),
3378
3379
  onDragOver: I,
3379
- onDrop: (p) => O(p, v),
3380
+ onDrop: (p) => V(p, v),
3380
3381
  className: "",
3381
3382
  value: h.id,
3382
3383
  children: [
@@ -3386,7 +3387,7 @@ function ra() {
3386
3387
  za,
3387
3388
  {
3388
3389
  className: "ml-2 size-3.5 text-muted-foreground hover:text-foreground",
3389
- onClick: () => D(h.id)
3390
+ onClick: () => T(h.id)
3390
3391
  }
3391
3392
  )
3392
3393
  ]
@@ -3401,7 +3402,7 @@ function ra() {
3401
3402
  className: "ml-1 h-8 px-2 hover:bg-muted-foreground/50",
3402
3403
  variant: "outline",
3403
3404
  onClick: m,
3404
- children: /* @__PURE__ */ e.jsx(Ds, { className: "h-4 w-4" })
3405
+ children: /* @__PURE__ */ e.jsx(Ms, { className: "h-4 w-4" })
3405
3406
  }
3406
3407
  ),
3407
3408
  /* @__PURE__ */ e.jsx(
@@ -3410,7 +3411,7 @@ function ra() {
3410
3411
  className: "invisible ml-1 h-8 px-2 hover:bg-muted-foreground/50 group-hover:visible",
3411
3412
  variant: "outline",
3412
3413
  onClick: j,
3413
- children: /* @__PURE__ */ e.jsx(Fn, { className: "h-4 w-4" })
3414
+ children: /* @__PURE__ */ e.jsx(In, { className: "h-4 w-4" })
3414
3415
  }
3415
3416
  )
3416
3417
  ] }) })
@@ -3418,34 +3419,34 @@ function ra() {
3418
3419
  }
3419
3420
  );
3420
3421
  }
3421
- function A() {
3422
- return t.type === "kpi" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(Yt, { card: t, data: d == null ? void 0 : d.records }) }) }) : t.type === "text" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(
3423
- Xt,
3422
+ function L() {
3423
+ return t.type === "kpi" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(Xt, { card: t, data: d == null ? void 0 : d.records }) }) }) : t.type === "text" ? /* @__PURE__ */ e.jsx("div", { className: "flex h-full items-center justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "w-1/2 rounded-md border", children: /* @__PURE__ */ e.jsx(ms, { className: "mx-3 my-6 h-[300px] overflow-y-auto break-words px-3", children: /* @__PURE__ */ e.jsx(
3424
+ Zt,
3424
3425
  {
3425
3426
  isLoading: n,
3426
3427
  card: t,
3427
3428
  data: d == null ? void 0 : d.records
3428
3429
  }
3429
- ) }) }) : /* @__PURE__ */ e.jsx(xs, { FallbackComponent: Na, children: /* @__PURE__ */ e.jsx(Pa, { className: "grow border-none shadow-none" }) });
3430
+ ) }) }) }) : /* @__PURE__ */ e.jsx(ps, { FallbackComponent: Na, children: /* @__PURE__ */ e.jsx(Pa, { className: "grow border-none shadow-none" }) });
3430
3431
  }
3431
3432
  return /* @__PURE__ */ e.jsxs("div", { className: "relative flex h-full flex-col py-3", children: [
3432
3433
  (y || f) && /* @__PURE__ */ e.jsx(Ze, { className: "absolute bottom-0 left-0 right-0 top-0 z-50 m-auto h-10 w-10 animate-spin text-foreground/10" }),
3433
3434
  /* @__PURE__ */ e.jsxs("div", { className: "mb-0 flex min-h-10 items-center justify-end gap-2 px-6", children: [
3434
3435
  a && /* @__PURE__ */ e.jsxs("div", { className: "flex grow items-center gap-2", children: [
3435
- /* @__PURE__ */ e.jsx(Ol, {}),
3436
- !["table", "custom"].includes(t.type) && /* @__PURE__ */ e.jsx(wl, {}),
3437
- /* @__PURE__ */ e.jsx(Il, {})
3436
+ /* @__PURE__ */ e.jsx(Fl, {}),
3437
+ !["table", "custom"].includes(t.type) && /* @__PURE__ */ e.jsx(kl, {}),
3438
+ /* @__PURE__ */ e.jsx(Tl, {})
3438
3439
  ] }),
3439
- /* @__PURE__ */ e.jsx(Dl, {})
3440
+ /* @__PURE__ */ e.jsx(Ml, {})
3440
3441
  ] }),
3441
- a ? T() : /* @__PURE__ */ e.jsxs("div", { className: "flex min-h-0 w-full flex-1 grow basis-0 px-6", children: [
3442
- i && /* @__PURE__ */ e.jsx(Tl, {}),
3443
- (d == null ? void 0 : d.records) && (d == null ? void 0 : d.records.length) > 0 && /* @__PURE__ */ e.jsx(Nl, { data: (d == null ? void 0 : d.records) || [] }),
3442
+ a ? w() : /* @__PURE__ */ e.jsxs("div", { className: "flex min-h-0 w-full flex-1 grow basis-0 px-6", children: [
3443
+ i && /* @__PURE__ */ e.jsx(Dl, {}),
3444
+ (d == null ? void 0 : d.records) && (d == null ? void 0 : d.records.length) > 0 && /* @__PURE__ */ e.jsx(Sl, { data: (d == null ? void 0 : d.records) || [] }),
3444
3445
  l && /* @__PURE__ */ e.jsx("span", { className: "font-mono text-sm", children: l })
3445
3446
  ] })
3446
3447
  ] });
3447
3448
  }
3448
- function Tl() {
3449
+ function Dl() {
3449
3450
  const s = u((a) => a.pythonStdOut);
3450
3451
  if (!s)
3451
3452
  return null;
@@ -3462,14 +3463,14 @@ function Tl() {
3462
3463
  /* @__PURE__ */ e.jsx(de, { className: "mb-2" })
3463
3464
  ] });
3464
3465
  }
3465
- function Dl() {
3466
+ function Ml() {
3466
3467
  const s = u((a) => a.isShowingVisual), t = u(
3467
3468
  (a) => a.actions.setIsShowingVisual
3468
3469
  );
3469
3470
  return /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
3470
3471
  /* @__PURE__ */ e.jsx(H, { htmlFor: "visualize", children: "Chart" }),
3471
3472
  /* @__PURE__ */ e.jsx(
3472
- Zt,
3473
+ en,
3473
3474
  {
3474
3475
  checked: s,
3475
3476
  onCheckedChange: () => t(!s),
@@ -3479,13 +3480,13 @@ function Dl() {
3479
3480
  )
3480
3481
  ] });
3481
3482
  }
3482
- function Ml({
3483
+ function Ll({
3483
3484
  options: s,
3484
3485
  value: t,
3485
3486
  onValueChange: a
3486
3487
  }) {
3487
3488
  return /* @__PURE__ */ e.jsx(
3488
- js,
3489
+ bs,
3489
3490
  {
3490
3491
  value: t,
3491
3492
  onValueChange: a,
@@ -3513,7 +3514,7 @@ function pe({
3513
3514
  children: /* @__PURE__ */ e.jsx(je, { placeholder: s })
3514
3515
  }
3515
3516
  ),
3516
- /* @__PURE__ */ e.jsx(be, { children: /* @__PURE__ */ e.jsxs(ke, { children: [
3517
+ /* @__PURE__ */ e.jsx(be, { children: /* @__PURE__ */ e.jsxs(ze, { children: [
3517
3518
  /* @__PURE__ */ e.jsx(ye, { children: s }),
3518
3519
  t.map((i) => /* @__PURE__ */ e.jsx(Q, { value: i.value, children: i.label }, i.value))
3519
3520
  ] }) })
@@ -3533,15 +3534,15 @@ function Qe({
3533
3534
  children: [
3534
3535
  /* @__PURE__ */ e.jsxs("summary", { className: "flex cursor-pointer list-none items-center justify-between gap-4", children: [
3535
3536
  /* @__PURE__ */ e.jsx(H, { children: t }),
3536
- /* @__PURE__ */ e.jsx(en, { className: "h-4 w-4" })
3537
+ /* @__PURE__ */ e.jsx(sn, { className: "h-4 w-4" })
3537
3538
  ] }),
3538
3539
  /* @__PURE__ */ e.jsx("div", { className: "transition-all ease-in-out", children: s })
3539
3540
  ]
3540
3541
  }
3541
3542
  );
3542
3543
  }
3543
- function Ll() {
3544
- var j, D;
3544
+ function El() {
3545
+ var j, T;
3545
3546
  const s = u(
3546
3547
  (C) => C.card.customCardPreferences
3547
3548
  ), { data: t } = Za(), a = (t == null ? void 0 : t.plugins) || [], n = u((C) => C.card), l = u((C) => C.frame), i = (s == null ? void 0 : s.visualType) || "single", { setCustomCardPreferences: r } = ce(), { components: c, manifest: o } = va(
@@ -3549,32 +3550,32 @@ function Ll() {
3549
3550
  ), x = (j = o == null ? void 0 : o.visuals) == null ? void 0 : j.find(
3550
3551
  (C) => C.name === (s == null ? void 0 : s.componentName)
3551
3552
  );
3552
- function d(C, L) {
3553
+ function d(C, M) {
3553
3554
  if (!s)
3554
3555
  return;
3555
- const O = {
3556
+ const V = {
3556
3557
  ...(s == null ? void 0 : s.dataInputCardIds) || {},
3557
3558
  [C]: {
3558
- cardId: L,
3559
+ cardId: M,
3559
3560
  hookRef: null
3560
3561
  }
3561
3562
  };
3562
3563
  r({
3563
3564
  ...s,
3564
- dataInputCardIds: O
3565
+ dataInputCardIds: V
3565
3566
  });
3566
3567
  }
3567
3568
  function y(C) {
3568
- var I, O;
3569
- const L = (I = l == null ? void 0 : l.cards) == null ? void 0 : I.filter((N) => {
3570
- var T;
3571
- return ((T = N == null ? void 0 : N.customCardPreferences) == null ? void 0 : T.visualType) !== "multiple";
3569
+ var I, V;
3570
+ const M = (I = l == null ? void 0 : l.cards) == null ? void 0 : I.filter((N) => {
3571
+ var w;
3572
+ return ((w = N == null ? void 0 : N.customCardPreferences) == null ? void 0 : w.visualType) !== "multiple";
3572
3573
  }).map((N) => ({
3573
3574
  value: N.id,
3574
3575
  label: N.tabTitle || N.title
3575
3576
  }));
3576
- return /* @__PURE__ */ e.jsx("div", { className: "space-y-2", children: (O = C == null ? void 0 : C.dataInputs) == null ? void 0 : O.map((N, T) => {
3577
- var A, h;
3577
+ return /* @__PURE__ */ e.jsx("div", { className: "space-y-2", children: (V = C == null ? void 0 : C.dataInputs) == null ? void 0 : V.map((N, w) => {
3578
+ var L, h;
3578
3579
  return /* @__PURE__ */ e.jsxs(
3579
3580
  "div",
3580
3581
  {
@@ -3586,59 +3587,59 @@ function Ll() {
3586
3587
  {
3587
3588
  className: "col-span-6 h-8 w-full justify-between",
3588
3589
  label: "",
3589
- options: L || [],
3590
- value: ((h = (A = s == null ? void 0 : s.dataInputCardIds) == null ? void 0 : A[T]) == null ? void 0 : h.cardId) || "",
3591
- onValueChange: (v) => d(T, v)
3590
+ options: M || [],
3591
+ value: ((h = (L = s == null ? void 0 : s.dataInputCardIds) == null ? void 0 : L[w]) == null ? void 0 : h.cardId) || "",
3592
+ onValueChange: (v) => d(w, v)
3592
3593
  }
3593
3594
  )
3594
3595
  ]
3595
3596
  },
3596
- T + Math.random()
3597
+ w + Math.random()
3597
3598
  );
3598
3599
  }) });
3599
3600
  }
3600
- function f(C, L, I = []) {
3601
- var O, N;
3601
+ function f(C, M, I = []) {
3602
+ var V, N;
3602
3603
  return s ? C === "input" ? /* @__PURE__ */ e.jsx(
3603
3604
  re,
3604
3605
  {
3605
3606
  className: `h-8 w-full ${Ge}`,
3606
- value: ((O = s == null ? void 0 : s.settings) == null ? void 0 : O[L]) || "",
3607
- onChange: (T) => {
3607
+ value: ((V = s == null ? void 0 : s.settings) == null ? void 0 : V[M]) || "",
3608
+ onChange: (w) => {
3608
3609
  r({
3609
3610
  ...s,
3610
3611
  settings: {
3611
3612
  ...s == null ? void 0 : s.settings,
3612
- [L]: T.target.value
3613
+ [M]: w.target.value
3613
3614
  }
3614
3615
  });
3615
3616
  }
3616
3617
  },
3617
- L
3618
+ M
3618
3619
  ) : C === "select" ? /* @__PURE__ */ e.jsx(
3619
3620
  pe,
3620
3621
  {
3621
3622
  className: "h-8 w-full",
3622
3623
  label: "",
3623
3624
  options: I,
3624
- value: ((N = s == null ? void 0 : s.settings) == null ? void 0 : N[L]) || "",
3625
- onValueChange: (T) => {
3625
+ value: ((N = s == null ? void 0 : s.settings) == null ? void 0 : N[M]) || "",
3626
+ onValueChange: (w) => {
3626
3627
  r({
3627
3628
  ...s,
3628
- settings: { ...s == null ? void 0 : s.settings, [L]: T }
3629
+ settings: { ...s == null ? void 0 : s.settings, [M]: w }
3629
3630
  });
3630
3631
  }
3631
3632
  }
3632
3633
  ) : null : null;
3633
3634
  }
3634
3635
  function m(C) {
3635
- const L = Object.entries((C == null ? void 0 : C.settings) || {});
3636
- return /* @__PURE__ */ e.jsx("div", { className: "space-y-3", children: L.map(([I, O]) => /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
3637
- /* @__PURE__ */ e.jsx(H, { children: O.title }),
3636
+ const M = Object.entries((C == null ? void 0 : C.settings) || {});
3637
+ return /* @__PURE__ */ e.jsx("div", { className: "space-y-3", children: M.map(([I, V]) => /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
3638
+ /* @__PURE__ */ e.jsx(H, { children: V.title }),
3638
3639
  f(
3639
- O.ui,
3640
+ V.ui,
3640
3641
  I,
3641
- O.options
3642
+ V.options
3642
3643
  )
3643
3644
  ] }, I)) });
3644
3645
  }
@@ -3672,7 +3673,7 @@ function Ll() {
3672
3673
  }
3673
3674
  ) }) }),
3674
3675
  ((s == null ? void 0 : s.type) === "component" || (s == null ? void 0 : s.type) === void 0) && /* @__PURE__ */ e.jsx(
3675
- Ml,
3676
+ Ll,
3676
3677
  {
3677
3678
  options: [
3678
3679
  { value: "single", label: "Single Visual" },
@@ -3707,7 +3708,7 @@ function Ll() {
3707
3708
  ] }) })
3708
3709
  ] }) }) }),
3709
3710
  /* @__PURE__ */ e.jsx(de, { className: "my-4" }),
3710
- ((D = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : D.componentName) && /* @__PURE__ */ e.jsxs(Qe, { summary: "Component Settings", children: [
3711
+ ((T = n == null ? void 0 : n.customCardPreferences) == null ? void 0 : T.componentName) && /* @__PURE__ */ e.jsxs(Qe, { summary: "Component Settings", children: [
3711
3712
  x && x.dataInputs && /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
3712
3713
  /* @__PURE__ */ e.jsx(H, { children: "Input Mapping" }),
3713
3714
  /* @__PURE__ */ e.jsx("div", { className: "px-2", children: y(x) })
@@ -3799,7 +3800,7 @@ function Me() {
3799
3800
  children: /* @__PURE__ */ e.jsxs("div", { className: "grow", children: [
3800
3801
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2 py-2", children: [
3801
3802
  /* @__PURE__ */ e.jsx(
3802
- ms,
3803
+ xs,
3803
3804
  {
3804
3805
  checked: !!((f = a == null ? void 0 : a.onClickFilter) != null && f.find(
3805
3806
  (g) => g.columnIndex === y
@@ -3837,7 +3838,7 @@ function Me() {
3837
3838
  })
3838
3839
  ] });
3839
3840
  }
3840
- function bs() {
3841
+ function ys() {
3841
3842
  var r, c, o;
3842
3843
  const s = u((x) => x.card.preferences), t = u(
3843
3844
  (x) => x.card.cfg
@@ -3847,7 +3848,7 @@ function bs() {
3847
3848
  l(x);
3848
3849
  }
3849
3850
  return /* @__PURE__ */ e.jsxs(
3850
- js,
3851
+ bs,
3851
3852
  {
3852
3853
  value: ((c = s == null ? void 0 : s.chartOptions) == null ? void 0 : c.indexAxis) || ((o = t == null ? void 0 : t.options) == null ? void 0 : o.indexAxis) || "x",
3853
3854
  onValueChange: i,
@@ -3873,39 +3874,39 @@ function ia(s, t) {
3873
3874
  return ((i = (l = (n = s == null ? void 0 : s.chartOptions) == null ? void 0 : n.scales) == null ? void 0 : l[a]) == null ? void 0 : i.type) || "linear";
3874
3875
  }
3875
3876
  function et() {
3876
- var le, J, ne, w, _, ee;
3877
- const [s, t] = R(!1), a = u((E) => {
3878
- var M;
3879
- return (M = E.card) == null ? void 0 : M.preferences;
3880
- }), n = u((E) => {
3881
- var M;
3882
- return (M = E.card) == null ? void 0 : M.cfg;
3877
+ var le, J, ne, k, _, ee;
3878
+ const [s, t] = R(!1), a = u((A) => {
3879
+ var D;
3880
+ return (D = A.card) == null ? void 0 : D.preferences;
3881
+ }), n = u((A) => {
3882
+ var D;
3883
+ return (D = A.card) == null ? void 0 : D.cfg;
3883
3884
  }), l = Oa(a, n), [i, r] = R(
3884
3885
  ia(a)
3885
3886
  ), [c, o] = R(
3886
3887
  ((ne = (J = (le = a == null ? void 0 : a.chartOptions) == null ? void 0 : le.scales) == null ? void 0 : J[l]) == null ? void 0 : ne.min) || ""
3887
3888
  ), [x, d] = R(
3888
- ((ee = (_ = (w = a == null ? void 0 : a.chartOptions) == null ? void 0 : w.scales) == null ? void 0 : _[l]) == null ? void 0 : ee.max) || ""
3889
- ), [y, f] = R(c || x ? "custom" : "auto"), [m, g] = R(""), [j, D] = R(0), [C, L] = R(""), [I, O] = R(""), [N, T] = R(""), A = u(
3890
- (E) => E.actions.setCardPreferences
3891
- ), { updateCardInFrame: h } = ce(), v = u((E) => E.card), p = u((E) => {
3892
- var M;
3893
- return (M = E.card) == null ? void 0 : M.type;
3894
- }), k = ["pie", "doughnut", "polarArea"].includes(p);
3889
+ ((ee = (_ = (k = a == null ? void 0 : a.chartOptions) == null ? void 0 : k.scales) == null ? void 0 : _[l]) == null ? void 0 : ee.max) || ""
3890
+ ), [y, f] = R(c || x ? "custom" : "auto"), [m, g] = R(""), [j, T] = R(0), [C, M] = R(""), [I, V] = R(""), [N, w] = R(""), L = u(
3891
+ (A) => A.actions.setCardPreferences
3892
+ ), { updateCardInFrame: h } = ce(), v = u((A) => A.card), p = u((A) => {
3893
+ var D;
3894
+ return (D = A.card) == null ? void 0 : D.type;
3895
+ }), z = ["pie", "doughnut", "polarArea"].includes(p);
3895
3896
  Z(() => {
3896
- var E, M, se, P, X, ie, Ce, Le, Ne, Fe, Se, ae, ue, he;
3897
+ var A, D, se, P, X, ie, Ne, Le, Se, Fe, we, ae, ue, he;
3897
3898
  r(ia(a)), o(
3898
- ((se = (M = (E = a == null ? void 0 : a.chartOptions) == null ? void 0 : E.scales) == null ? void 0 : M[l]) == null ? void 0 : se.min) === 0 ? 0 : ""
3899
+ ((se = (D = (A = a == null ? void 0 : a.chartOptions) == null ? void 0 : A.scales) == null ? void 0 : D[l]) == null ? void 0 : se.min) === 0 ? 0 : ""
3899
3900
  ), d(((ie = (X = (P = a == null ? void 0 : a.chartOptions) == null ? void 0 : P.scales) == null ? void 0 : X[l]) == null ? void 0 : ie.max) || ""), g(
3900
- ((Fe = (Ne = (Le = (Ce = a == null ? void 0 : a.chartOptions) == null ? void 0 : Ce.scales) == null ? void 0 : Le[l]) == null ? void 0 : Ne.ticks) == null ? void 0 : Fe.stepSize) || ""
3901
- ), D(((Se = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : Se.decimalPlaces) || 0), L(((ae = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : ae.suffix) || ""), O(((ue = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : ue.currency) || ""), T(((he = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : he.locale) || "");
3901
+ ((Fe = (Se = (Le = (Ne = a == null ? void 0 : a.chartOptions) == null ? void 0 : Ne.scales) == null ? void 0 : Le[l]) == null ? void 0 : Se.ticks) == null ? void 0 : Fe.stepSize) || ""
3902
+ ), T(((we = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : we.decimalPlaces) || 0), M(((ae = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : ae.suffix) || ""), V(((ue = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : ue.currency) || ""), w(((he = a == null ? void 0 : a.numberAxisFormat) == null ? void 0 : he.locale) || "");
3902
3903
  }, [s, a, l]);
3903
- function V(E, M) {
3904
- return M === "" || /^[0-9\b]+$/.test(M) ? Number(M) : Number(E);
3904
+ function E(A, D) {
3905
+ return D === "" || /^[0-9\b]+$/.test(D) ? Number(D) : Number(A);
3905
3906
  }
3906
3907
  function $() {
3907
- const E = [
3908
- ...new Set(cs.map((M) => M.currency))
3908
+ const A = [
3909
+ ...new Set(cs.map((D) => D.currency))
3909
3910
  ];
3910
3911
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
3911
3912
  /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-6 items-center gap-2", children: [
@@ -3928,18 +3929,18 @@ function et() {
3928
3929
  fe,
3929
3930
  {
3930
3931
  value: I || "none",
3931
- onValueChange: (M) => O(M === "none" ? "" : M),
3932
+ onValueChange: (D) => V(D === "none" ? "" : D),
3932
3933
  children: [
3933
3934
  /* @__PURE__ */ e.jsx(ge, { className: "col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(je, {}) }),
3934
- /* @__PURE__ */ e.jsx(be, { children: /* @__PURE__ */ e.jsxs(ke, { children: [
3935
+ /* @__PURE__ */ e.jsx(be, { children: /* @__PURE__ */ e.jsxs(ze, { children: [
3935
3936
  /* @__PURE__ */ e.jsx(ye, { children: "Currency" }),
3936
3937
  /* @__PURE__ */ e.jsx(Q, { value: "none", children: "None" }),
3937
- E.map((M) => /* @__PURE__ */ e.jsx(Q, { value: M, children: M }, M))
3938
+ A.map((D) => /* @__PURE__ */ e.jsx(Q, { value: D, children: D }, D))
3938
3939
  ] }) })
3939
3940
  ]
3940
3941
  }
3941
3942
  ),
3942
- /* @__PURE__ */ e.jsxs(fe, { value: N, onValueChange: (M) => T(M), children: [
3943
+ /* @__PURE__ */ e.jsxs(fe, { value: N, onValueChange: (D) => w(D), children: [
3943
3944
  /* @__PURE__ */ e.jsx(
3944
3945
  ge,
3945
3946
  {
@@ -3947,9 +3948,9 @@ function et() {
3947
3948
  children: /* @__PURE__ */ e.jsx(je, {})
3948
3949
  }
3949
3950
  ),
3950
- /* @__PURE__ */ e.jsx(be, { children: /* @__PURE__ */ e.jsxs(ke, { children: [
3951
+ /* @__PURE__ */ e.jsx(be, { children: /* @__PURE__ */ e.jsxs(ze, { children: [
3951
3952
  /* @__PURE__ */ e.jsx(ye, { children: "Locale" }),
3952
- cs.map((M) => /* @__PURE__ */ e.jsx(Q, { value: M.locale, children: M.locale }, M.locale))
3953
+ cs.map((D) => /* @__PURE__ */ e.jsx(Q, { value: D.locale, children: D.locale }, D.locale))
3953
3954
  ] }) })
3954
3955
  ] })
3955
3956
  ] }),
@@ -3959,7 +3960,7 @@ function et() {
3959
3960
  re,
3960
3961
  {
3961
3962
  value: j,
3962
- onChange: (M) => D(Number(M.target.value)),
3963
+ onChange: (D) => T(Number(D.target.value)),
3963
3964
  id: "format",
3964
3965
  className: `col-span-6 h-8 w-full tracking-wide ${ns}`
3965
3966
  }
@@ -3976,7 +3977,7 @@ function et() {
3976
3977
  {
3977
3978
  id: "min",
3978
3979
  value: c,
3979
- onChange: (E) => o((M) => V(M, E.target.value)),
3980
+ onChange: (A) => o((D) => E(D, A.target.value)),
3980
3981
  className: `col-span-1 h-8 w-full ${ns}`
3981
3982
  }
3982
3983
  ),
@@ -3984,7 +3985,7 @@ function et() {
3984
3985
  re,
3985
3986
  {
3986
3987
  value: x,
3987
- onChange: (E) => d((M) => V(M, E.target.value)),
3988
+ onChange: (A) => d((D) => E(D, A.target.value)),
3988
3989
  id: "max",
3989
3990
  className: `col-span-1 h-8 w-full ${ns}`
3990
3991
  }
@@ -3996,7 +3997,7 @@ function et() {
3996
3997
  re,
3997
3998
  {
3998
3999
  value: m,
3999
- onChange: (E) => g((M) => V(M, E.target.value)),
4000
+ onChange: (A) => g((D) => E(D, A.target.value)),
4000
4001
  id: "step-size",
4001
4002
  className: `col-span-1 h-8 w-full ${ns}`
4002
4003
  }
@@ -4006,15 +4007,15 @@ function et() {
4006
4007
  }
4007
4008
  function Y() {
4008
4009
  var P;
4009
- let E = {};
4010
- y === "custom" && (E = {
4010
+ let A = {};
4011
+ y === "custom" && (A = {
4011
4012
  min: c,
4012
4013
  max: x,
4013
4014
  ticks: {
4014
4015
  stepSize: m
4015
4016
  }
4016
4017
  });
4017
- const M = {
4018
+ const D = {
4018
4019
  ...a || {},
4019
4020
  chartOptions: {
4020
4021
  ...a == null ? void 0 : a.chartOptions,
@@ -4023,7 +4024,7 @@ function et() {
4023
4024
  [l]: {
4024
4025
  // ...cardPreferences?.chartOptions?.scales?.[axis],
4025
4026
  type: i,
4026
- ...i === "linear" ? E : {}
4027
+ ...i === "linear" ? A : {}
4027
4028
  }
4028
4029
  }
4029
4030
  },
@@ -4034,16 +4035,16 @@ function et() {
4034
4035
  locale: N
4035
4036
  }
4036
4037
  };
4037
- console.log(M), A(M);
4038
+ console.log(D), L(D);
4038
4039
  const se = {
4039
4040
  ...v,
4040
- preferences: M
4041
+ preferences: D
4041
4042
  };
4042
4043
  h(se);
4043
4044
  }
4044
- return /* @__PURE__ */ e.jsxs(ps, { onOpenChange: (E) => t(E), children: [
4045
- /* @__PURE__ */ e.jsx(fs, { asChild: !0, children: /* @__PURE__ */ e.jsx(sn, { className: "size-4 cursor-pointer text-muted-foreground hover:text-foreground" }) }),
4046
- /* @__PURE__ */ e.jsx(gs, { align: "center", className: "max-w-65", children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-4", children: [
4045
+ return /* @__PURE__ */ e.jsxs(fs, { onOpenChange: (A) => t(A), children: [
4046
+ /* @__PURE__ */ e.jsx(gs, { asChild: !0, children: /* @__PURE__ */ e.jsx(an, { className: "size-4 cursor-pointer text-muted-foreground hover:text-foreground" }) }),
4047
+ /* @__PURE__ */ e.jsx(js, { align: "center", className: "max-w-65", children: /* @__PURE__ */ e.jsxs("div", { className: "grid gap-4", children: [
4047
4048
  /* @__PURE__ */ e.jsxs("div", { className: "space-y-2", children: [
4048
4049
  /* @__PURE__ */ e.jsx("h4", { className: "font-medium leading-none", children: "Scale Options" }),
4049
4050
  /* @__PURE__ */ e.jsx("p", { className: "text-sm text-muted-foreground", children: "Set the scale for the number axis" })
@@ -4054,12 +4055,12 @@ function et() {
4054
4055
  /* @__PURE__ */ e.jsxs(
4055
4056
  fe,
4056
4057
  {
4057
- disabled: k,
4058
+ disabled: z,
4058
4059
  value: i,
4059
- onValueChange: (E) => r(E),
4060
+ onValueChange: (A) => r(A),
4060
4061
  children: [
4061
4062
  /* @__PURE__ */ e.jsx(ge, { className: "col-span-2 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(je, {}) }),
4062
- /* @__PURE__ */ e.jsx(be, { id: "type", children: /* @__PURE__ */ e.jsxs(ke, { children: [
4063
+ /* @__PURE__ */ e.jsx(be, { id: "type", children: /* @__PURE__ */ e.jsxs(ze, { children: [
4063
4064
  /* @__PURE__ */ e.jsx(ye, { children: "Option" }),
4064
4065
  /* @__PURE__ */ e.jsx(Q, { value: "linear", children: "Linear" }),
4065
4066
  /* @__PURE__ */ e.jsx(Q, { value: "logarithmic", children: "Logarithmic" })
@@ -4071,12 +4072,12 @@ function et() {
4071
4072
  i == "linear" && /* @__PURE__ */ e.jsxs("div", { className: "grid grid-cols-3 items-center gap-2 py-1", children: [
4072
4073
  /* @__PURE__ */ e.jsx(H, { htmlFor: "scale-option", children: "Setup" }),
4073
4074
  /* @__PURE__ */ e.jsxs(
4074
- js,
4075
+ bs,
4075
4076
  {
4076
- disabled: k,
4077
+ disabled: z,
4077
4078
  id: "scale-option",
4078
4079
  value: y,
4079
- onValueChange: (E) => f(E),
4080
+ onValueChange: (A) => f(A),
4080
4081
  className: "col-span-2 flex gap-3",
4081
4082
  defaultValue: "x",
4082
4083
  children: [
@@ -4094,7 +4095,7 @@ function et() {
4094
4095
  ] }),
4095
4096
  y === "custom" && i == "linear" && B(),
4096
4097
  $(),
4097
- /* @__PURE__ */ e.jsx(an, {}),
4098
+ /* @__PURE__ */ e.jsx(tn, {}),
4098
4099
  /* @__PURE__ */ e.jsx("div", { className: "grid grid-cols-3", children: /* @__PURE__ */ e.jsx(
4099
4100
  F,
4100
4101
  {
@@ -4108,7 +4109,7 @@ function et() {
4108
4109
  ] }) })
4109
4110
  ] });
4110
4111
  }
4111
- function El({ idx: s }) {
4112
+ function Al({ idx: s }) {
4112
4113
  var c;
4113
4114
  const t = u((o) => {
4114
4115
  var x;
@@ -4122,7 +4123,7 @@ function El({ idx: s }) {
4122
4123
  (o) => o.actions.setCardPreferences
4123
4124
  ), l = (c = t == null ? void 0 : t.chartOptions) == null ? void 0 : c.indexAxis, i = a == null ? void 0 : a.find((o) => o.idx === s);
4124
4125
  function r(o, x) {
4125
- (o === "end" || o === "start") && tn(nn());
4126
+ (o === "end" || o === "start") && nn(ln());
4126
4127
  const d = {
4127
4128
  display: o !== "none",
4128
4129
  align: o,
@@ -4152,9 +4153,9 @@ function El({ idx: s }) {
4152
4153
  });
4153
4154
  }
4154
4155
  }
4155
- return /* @__PURE__ */ e.jsxs(ps, { children: [
4156
- /* @__PURE__ */ e.jsx(fs, { children: /* @__PURE__ */ e.jsx(Jn, { className: "invisible size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible" }) }),
4157
- /* @__PURE__ */ e.jsx(gs, { className: "w-fit p-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1", children: [
4156
+ return /* @__PURE__ */ e.jsxs(fs, { children: [
4157
+ /* @__PURE__ */ e.jsx(gs, { children: /* @__PURE__ */ e.jsx(Wn, { className: "invisible size-4 rotate-[135deg] cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible" }) }),
4158
+ /* @__PURE__ */ e.jsx(js, { className: "w-fit p-1", children: /* @__PURE__ */ e.jsxs("div", { className: "flex gap-1", children: [
4158
4159
  /* @__PURE__ */ e.jsx(
4159
4160
  F,
4160
4161
  {
@@ -4173,7 +4174,7 @@ function El({ idx: s }) {
4173
4174
  variant: "secondary",
4174
4175
  className: "h-7 p-1 text-xs font-normal",
4175
4176
  children: /* @__PURE__ */ e.jsx(
4176
- qn,
4177
+ Rn,
4177
4178
  {
4178
4179
  className: W("h-4 w-4", {
4179
4180
  "rotate-90": l === "y"
@@ -4190,7 +4191,7 @@ function El({ idx: s }) {
4190
4191
  variant: "secondary",
4191
4192
  className: "h-7 p-1 text-xs font-normal",
4192
4193
  children: /* @__PURE__ */ e.jsx(
4193
- _n,
4194
+ Hn,
4194
4195
  {
4195
4196
  className: W("h-4 w-4", {
4196
4197
  "rotate-90": l === "y"
@@ -4207,7 +4208,7 @@ function El({ idx: s }) {
4207
4208
  variant: "secondary",
4208
4209
  className: "h-7 p-1 text-xs font-normal",
4209
4210
  children: /* @__PURE__ */ e.jsx(
4210
- Rn,
4211
+ _n,
4211
4212
  {
4212
4213
  className: W("h-4 w-4", {
4213
4214
  "rotate-90": l === "y"
@@ -4229,15 +4230,15 @@ function st() {
4229
4230
  keys: i,
4230
4231
  metricKeys: r,
4231
4232
  dimensionKeys: c
4232
- } = Ss((a == null ? void 0 : a.records) || []);
4233
+ } = ws((a == null ? void 0 : a.records) || []);
4233
4234
  let o = r;
4234
4235
  if (["stackedBar", "stackedLine"].includes(s.type)) {
4235
- const x = ln({
4236
+ const x = rn({
4236
4237
  dataArray: (a == null ? void 0 : a.records) || [],
4237
4238
  groupKey: c[0],
4238
4239
  pivotKey: c[1],
4239
4240
  valueKey: o[0]
4240
- }), { metricKeys: d } = Ss(x);
4241
+ }), { metricKeys: d } = ws(x);
4241
4242
  o = d;
4242
4243
  }
4243
4244
  return i.length === 0 ? null : /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
@@ -4250,11 +4251,11 @@ function st() {
4250
4251
  /* @__PURE__ */ e.jsx(H, { children: l }),
4251
4252
  /* @__PURE__ */ e.jsx(et, {})
4252
4253
  ] }),
4253
- /* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: o.map((x, d) => /* @__PURE__ */ e.jsx(Al, { col: x, idx: d }, x)) })
4254
+ /* @__PURE__ */ e.jsx("div", { className: "my-1 space-y-1", children: o.map((x, d) => /* @__PURE__ */ e.jsx(Vl, { col: x, idx: d }, x)) })
4254
4255
  ] })
4255
4256
  ] });
4256
4257
  }
4257
- function Al({ col: s, idx: t }) {
4258
+ function Vl({ col: s, idx: t }) {
4258
4259
  const a = u((c) => {
4259
4260
  var o;
4260
4261
  return (o = c.card) == null ? void 0 : o.preferences;
@@ -4307,7 +4308,7 @@ function Al({ col: s, idx: t }) {
4307
4308
  }
4308
4309
  ),
4309
4310
  /* @__PURE__ */ e.jsx(
4310
- zn,
4311
+ On,
4311
4312
  {
4312
4313
  onClick: () => r("area"),
4313
4314
  className: "invisible size-4 cursor-pointer text-muted-foreground hover:text-foreground group-hover:visible"
@@ -4320,35 +4321,35 @@ function Al({ col: s, idx: t }) {
4320
4321
  className: "invisible size-4 cursor-pointer py-2 text-muted-foreground hover:text-foreground group-hover:visible"
4321
4322
  }
4322
4323
  ),
4323
- /* @__PURE__ */ e.jsx(El, { idx: t })
4324
+ /* @__PURE__ */ e.jsx(Al, { idx: t })
4324
4325
  ] })
4325
4326
  ] });
4326
4327
  }
4327
4328
  function at() {
4328
- const s = u((f) => f.selectedConnectionId), t = u((f) => f.selectedDatamodelId), a = u((f) => f.selectedDatabaseName), n = u((f) => f.selectedSchemaName), l = u((f) => f.selectedTableName), i = z((f) => f.dashboard.filters) || [], r = z((f) => f.actions.addFilter), c = z((f) => f.actions.removeFilter), o = z(
4329
+ const s = u((f) => f.selectedConnectionId), t = u((f) => f.selectedDatamodelId), a = u((f) => f.selectedDatabaseName), n = u((f) => f.selectedSchemaName), l = u((f) => f.selectedTableName), i = O((f) => f.dashboard.filters) || [], r = O((f) => f.actions.addFilter), c = O((f) => f.actions.removeFilter), o = O(
4329
4330
  (f) => f.actions.removeFilterValue
4330
4331
  ), { modelItems: x, tableName: d } = Re();
4331
4332
  function y(f, m = "dashboard") {
4332
- var T;
4333
- const g = xe(f.column_name), j = xe(a || ""), D = xe(n || ""), C = xe(d);
4334
- let L = ja(
4335
- D,
4333
+ var w;
4334
+ const g = xe(f.column_name), j = xe(a || ""), T = xe(n || ""), C = xe(d);
4335
+ let M = ja(
4336
+ T,
4336
4337
  C
4337
- ), I = `${L}.${g}`;
4338
- const O = (T = x == null ? void 0 : x.find(
4339
- (A) => A.id === t
4340
- )) == null ? void 0 : T.name;
4341
- t && t !== "none" && (I = `${Ns}.${O}.${g}`, L = `${Ns}.${O}`);
4338
+ ), I = `${M}.${g}`;
4339
+ const V = (w = x == null ? void 0 : x.find(
4340
+ (L) => L.id === t
4341
+ )) == null ? void 0 : w.name;
4342
+ t && t !== "none" && (I = `${Ss}.${V}.${g}`, M = `${Ss}.${V}`);
4342
4343
  const N = i == null ? void 0 : i.find(
4343
- (A) => A.column === I && A.table === C && (A.database === j || A.database === a)
4344
+ (L) => L.column === I && L.table === C && (L.database === j || L.database === a)
4344
4345
  );
4345
4346
  if (N)
4346
4347
  o(N.id), c(N.id);
4347
4348
  else {
4348
- const A = We();
4349
+ const L = We();
4349
4350
  return d === "api" && s ? (r({
4350
4351
  location: m,
4351
- id: A,
4352
+ id: L,
4352
4353
  //uuidv4(),
4353
4354
  column: I,
4354
4355
  title: f.column_name,
@@ -4360,12 +4361,12 @@ function at() {
4360
4361
  operation: "in",
4361
4362
  sql: aa(
4362
4363
  f.data_type,
4363
- L,
4364
+ M,
4364
4365
  g
4365
4366
  )
4366
4367
  //DATE_DATA_TYPES.includes(column.data_type) ? dateSql : sql,
4367
- }), A) : (r({
4368
- id: A,
4368
+ }), L) : (r({
4369
+ id: L,
4369
4370
  //uuidv4(),
4370
4371
  location: m,
4371
4372
  column: I,
@@ -4378,17 +4379,17 @@ function at() {
4378
4379
  operation: "in",
4379
4380
  sql: aa(
4380
4381
  f.data_type,
4381
- L,
4382
+ M,
4382
4383
  g
4383
4384
  )
4384
4385
  //DATE_DATA_TYPES.includes(column.data_type) ? dateSql : sql,
4385
- }), A);
4386
+ }), L);
4386
4387
  }
4387
4388
  }
4388
4389
  return { assignFilter: y };
4389
4390
  }
4390
4391
  function _e() {
4391
- const s = z(
4392
+ const s = O(
4392
4393
  (c) => c.dashboard.filters
4393
4394
  ), t = u((c) => c.frame), { setFrame: a } = ce(), { columns: n } = Re(), { assignFilter: l } = at();
4394
4395
  function i(c) {
@@ -4398,18 +4399,18 @@ function _e() {
4398
4399
  const r = s == null ? void 0 : s.find((c) => c.id === t.filterId);
4399
4400
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-3", children: [
4400
4401
  /* @__PURE__ */ e.jsx(H, { children: "Card Filter" }),
4401
- /* @__PURE__ */ e.jsx(Vl, { onSelect: i, columns: n }),
4402
- r && /* @__PURE__ */ e.jsx(rn, { filter: r })
4402
+ /* @__PURE__ */ e.jsx(ql, { onSelect: i, columns: n }),
4403
+ r && /* @__PURE__ */ e.jsx(on, { filter: r })
4403
4404
  ] });
4404
4405
  }
4405
- function Vl({
4406
+ function ql({
4406
4407
  columns: s,
4407
4408
  onSelect: t
4408
4409
  }) {
4409
4410
  var r;
4410
4411
  const [a, n] = ta.useState(!1), [l, i] = ta.useState("");
4411
- return /* @__PURE__ */ e.jsxs(ps, { open: a, onOpenChange: n, children: [
4412
- /* @__PURE__ */ e.jsx(fs, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
4412
+ return /* @__PURE__ */ e.jsxs(fs, { open: a, onOpenChange: n, children: [
4413
+ /* @__PURE__ */ e.jsx(gs, { asChild: !0, children: /* @__PURE__ */ e.jsxs(
4413
4414
  F,
4414
4415
  {
4415
4416
  size: "sm",
@@ -4419,16 +4420,16 @@ function Vl({
4419
4420
  className: "w-full justify-between font-normal",
4420
4421
  children: [
4421
4422
  l ? (r = s.find((c) => c.column_name === l)) == null ? void 0 : r.column_name : "Select Column...",
4422
- /* @__PURE__ */ e.jsx(on, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
4423
+ /* @__PURE__ */ e.jsx(cn, { className: "ml-2 h-4 w-4 shrink-0 opacity-50" })
4423
4424
  ]
4424
4425
  }
4425
4426
  ) }),
4426
- /* @__PURE__ */ e.jsx(gs, { className: "w-[200px] p-0", children: /* @__PURE__ */ e.jsxs(cn, { children: [
4427
- /* @__PURE__ */ e.jsx(dn, { placeholder: "Search column", className: "h-9" }),
4428
- /* @__PURE__ */ e.jsxs(un, { children: [
4429
- /* @__PURE__ */ e.jsx(hn, { children: "No framework found." }),
4430
- /* @__PURE__ */ e.jsx(mn, { children: s.map((c) => /* @__PURE__ */ e.jsxs(
4431
- xn,
4427
+ /* @__PURE__ */ e.jsx(js, { className: "w-[200px] p-0", children: /* @__PURE__ */ e.jsxs(dn, { children: [
4428
+ /* @__PURE__ */ e.jsx(un, { placeholder: "Search column", className: "h-9" }),
4429
+ /* @__PURE__ */ e.jsxs(hn, { children: [
4430
+ /* @__PURE__ */ e.jsx(mn, { children: "No framework found." }),
4431
+ /* @__PURE__ */ e.jsx(xn, { children: s.map((c) => /* @__PURE__ */ e.jsxs(
4432
+ pn,
4432
4433
  {
4433
4434
  value: c.column_name,
4434
4435
  onSelect: (o) => {
@@ -4454,7 +4455,7 @@ function Vl({
4454
4455
  ] }) })
4455
4456
  ] });
4456
4457
  }
4457
- function ql({
4458
+ function Rl({
4458
4459
  cardType: s
4459
4460
  }) {
4460
4461
  return /* @__PURE__ */ e.jsx("div", { className: "space-y-6 px-6 py-2", children: /* @__PURE__ */ e.jsxs(De, { defaultValue: ["item-2"], type: "multiple", children: [
@@ -4486,7 +4487,7 @@ function ql({
4486
4487
  /* @__PURE__ */ e.jsxs(U, { value: "item-2", children: [
4487
4488
  /* @__PURE__ */ e.jsx(G, { children: "Settings" }),
4488
4489
  /* @__PURE__ */ e.jsxs(K, { className: "space-y-4 px-2", children: [
4489
- /* @__PURE__ */ e.jsx(bs, {}),
4490
+ /* @__PURE__ */ e.jsx(ys, {}),
4490
4491
  /* @__PURE__ */ e.jsx(st, {})
4491
4492
  ] })
4492
4493
  ] }),
@@ -4538,7 +4539,7 @@ function Js() {
4538
4539
  defaultValue: "none",
4539
4540
  children: [
4540
4541
  /* @__PURE__ */ e.jsx(ge, { className: "h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(je, { placeholder: "Select position" }) }),
4541
- /* @__PURE__ */ e.jsx(be, { children: /* @__PURE__ */ e.jsxs(ke, { children: [
4542
+ /* @__PURE__ */ e.jsx(be, { children: /* @__PURE__ */ e.jsxs(ze, { children: [
4542
4543
  /* @__PURE__ */ e.jsx(ye, { children: "Data Labels" }),
4543
4544
  /* @__PURE__ */ e.jsx(Q, { value: "none", children: "None" }),
4544
4545
  a !== "pyramid" && /* @__PURE__ */ e.jsx(Q, { value: "start", children: "Start" }),
@@ -4550,7 +4551,7 @@ function Js() {
4550
4551
  )
4551
4552
  ] });
4552
4553
  }
4553
- function Rl({
4554
+ function _l({
4554
4555
  cardType: s
4555
4556
  }) {
4556
4557
  function t(a) {
@@ -4598,7 +4599,7 @@ function Rl({
4598
4599
  ] })
4599
4600
  ] }) });
4600
4601
  }
4601
- const _l = {
4602
+ const Hl = {
4602
4603
  datasets: [
4603
4604
  {
4604
4605
  type: "line",
@@ -4611,7 +4612,7 @@ const _l = {
4611
4612
  data: []
4612
4613
  }
4613
4614
  ]
4614
- }, Hl = {
4615
+ }, $l = {
4615
4616
  datasets: [
4616
4617
  {
4617
4618
  fill: "origin",
@@ -4621,7 +4622,7 @@ const _l = {
4621
4622
  }
4622
4623
  ]
4623
4624
  };
4624
- function $l() {
4625
+ function Pl() {
4625
4626
  const s = u((t) => t.card.type);
4626
4627
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 p-6", children: [
4627
4628
  /* @__PURE__ */ e.jsx(
@@ -4630,10 +4631,10 @@ function $l() {
4630
4631
  className: " ",
4631
4632
  type: "single",
4632
4633
  collapsible: !0,
4633
- children: Pl(s)
4634
+ children: Bl(s)
4634
4635
  }
4635
4636
  ),
4636
- /* @__PURE__ */ e.jsx("section", { className: "", children: ["line", "bar"].includes(s) && /* @__PURE__ */ e.jsx(bs, {}) }),
4637
+ /* @__PURE__ */ e.jsx("section", { className: "", children: ["line", "bar"].includes(s) && /* @__PURE__ */ e.jsx(ys, {}) }),
4637
4638
  !["kpi"].includes(s) && /* @__PURE__ */ e.jsxs("div", { className: "space-y-4", children: [
4638
4639
  /* @__PURE__ */ e.jsx(Js, {}),
4639
4640
  /* @__PURE__ */ e.jsx(Me, {}),
@@ -4641,7 +4642,7 @@ function $l() {
4641
4642
  ] })
4642
4643
  ] });
4643
4644
  }
4644
- function Pl(s) {
4645
+ function Bl(s) {
4645
4646
  if (["line", "bar"].includes(s))
4646
4647
  return /* @__PURE__ */ e.jsxs(e.Fragment, { children: [
4647
4648
  /* @__PURE__ */ e.jsxs(U, { value: "item-1", children: [
@@ -4662,7 +4663,7 @@ function Pl(s) {
4662
4663
  /* @__PURE__ */ e.jsx("b", { children: "Customize" }),
4663
4664
  " and change the `type` property in the dataset."
4664
4665
  ] }),
4665
- /* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(_l, null, 2) })
4666
+ /* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(Hl, null, 2) })
4666
4667
  ] })
4667
4668
  ] }),
4668
4669
  /* @__PURE__ */ e.jsxs(U, { value: "item-3", children: [
@@ -4683,7 +4684,7 @@ function Pl(s) {
4683
4684
  ),
4684
4685
  "for more options."
4685
4686
  ] }),
4686
- /* @__PURE__ */ e.jsx("pre", { children: JSON.stringify(Hl, null, 2) })
4687
+ /* @__PURE__ */ e.jsx("pre", { children: JSON.stringify($l, null, 2) })
4687
4688
  ] })
4688
4689
  ] })
4689
4690
  ] });
@@ -4738,7 +4739,7 @@ function Pl(s) {
4738
4739
  ] })
4739
4740
  ] }) });
4740
4741
  }
4741
- function Bl() {
4742
+ function Ul() {
4742
4743
  var o, x, d, y, f;
4743
4744
  const s = u((m) => m.card.preferences), t = u(
4744
4745
  (m) => m.actions.setCardPreferences
@@ -4776,7 +4777,7 @@ function Bl() {
4776
4777
  return /* @__PURE__ */ e.jsxs("div", { children: [
4777
4778
  /* @__PURE__ */ e.jsxs("div", { className: "mb-3 flex items-center gap-2", children: [
4778
4779
  /* @__PURE__ */ e.jsx(
4779
- ms,
4780
+ xs,
4780
4781
  {
4781
4782
  checked: !!((o = s == null ? void 0 : s.formatNumber) != null && o.enabled),
4782
4783
  onCheckedChange: (m) => {
@@ -4802,17 +4803,17 @@ function Bl() {
4802
4803
  {
4803
4804
  value: n || "none",
4804
4805
  onValueChange: (m) => {
4805
- var g, j, D;
4806
+ var g, j, T;
4806
4807
  return a(
4807
4808
  ((g = s == null ? void 0 : s.formatNumber) == null ? void 0 : g.decimalPlaces) || 0,
4808
4809
  ((j = s == null ? void 0 : s.formatNumber) == null ? void 0 : j.currency) || "",
4809
4810
  m,
4810
- ((D = s == null ? void 0 : s.formatNumber) == null ? void 0 : D.suffix) || ""
4811
+ ((T = s == null ? void 0 : s.formatNumber) == null ? void 0 : T.suffix) || ""
4811
4812
  );
4812
4813
  },
4813
4814
  children: [
4814
4815
  /* @__PURE__ */ e.jsx(ge, { className: "col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(je, {}) }),
4815
- /* @__PURE__ */ e.jsx(be, { children: /* @__PURE__ */ e.jsxs(ke, { children: [
4816
+ /* @__PURE__ */ e.jsx(be, { children: /* @__PURE__ */ e.jsxs(ze, { children: [
4816
4817
  /* @__PURE__ */ e.jsx(ye, { children: "Format" }),
4817
4818
  /* @__PURE__ */ e.jsx(Q, { value: "none", children: "None" }, "none"),
4818
4819
  cs.map((m) => /* @__PURE__ */ e.jsx(Q, { value: m.locale, children: m.locale }, m.locale))
@@ -4828,17 +4829,17 @@ function Bl() {
4828
4829
  {
4829
4830
  value: l || "none",
4830
4831
  onValueChange: (m) => {
4831
- var g, j, D;
4832
+ var g, j, T;
4832
4833
  console.log("currency", m), a(
4833
4834
  ((g = s == null ? void 0 : s.formatNumber) == null ? void 0 : g.decimalPlaces) || 0,
4834
4835
  m === "none" ? "" : m,
4835
4836
  ((j = s == null ? void 0 : s.formatNumber) == null ? void 0 : j.locale) || "",
4836
- ((D = s == null ? void 0 : s.formatNumber) == null ? void 0 : D.suffix) || ""
4837
+ ((T = s == null ? void 0 : s.formatNumber) == null ? void 0 : T.suffix) || ""
4837
4838
  );
4838
4839
  },
4839
4840
  children: [
4840
4841
  /* @__PURE__ */ e.jsx(ge, { className: "col-span-6 h-8 w-full focus:ring-1 focus:ring-offset-0", children: /* @__PURE__ */ e.jsx(je, {}) }),
4841
- /* @__PURE__ */ e.jsx(be, { children: /* @__PURE__ */ e.jsxs(ke, { children: [
4842
+ /* @__PURE__ */ e.jsx(be, { children: /* @__PURE__ */ e.jsxs(ze, { children: [
4842
4843
  /* @__PURE__ */ e.jsx(ye, { children: "Currency" }),
4843
4844
  /* @__PURE__ */ e.jsx(Q, { value: "none", children: "None" }, "none"),
4844
4845
  c.map((m) => /* @__PURE__ */ e.jsx(Q, { value: m, children: m }, m))
@@ -4856,12 +4857,12 @@ function Bl() {
4856
4857
  {
4857
4858
  value: ((y = (d = s == null ? void 0 : s.formatNumber) == null ? void 0 : d.decimalPlaces) == null ? void 0 : y.toString()) || "0",
4858
4859
  onValueChange: (m) => {
4859
- var g, j, D;
4860
+ var g, j, T;
4860
4861
  return a(
4861
4862
  Number(m),
4862
4863
  ((g = s == null ? void 0 : s.formatNumber) == null ? void 0 : g.currency) || "",
4863
4864
  ((j = s == null ? void 0 : s.formatNumber) == null ? void 0 : j.locale) || "",
4864
- ((D = s == null ? void 0 : s.formatNumber) == null ? void 0 : D.suffix) || ""
4865
+ ((T = s == null ? void 0 : s.formatNumber) == null ? void 0 : T.suffix) || ""
4865
4866
  );
4866
4867
  },
4867
4868
  children: [
@@ -4880,11 +4881,11 @@ function Bl() {
4880
4881
  className: "h-8 font-mono text-xs focus-visible:ring-0 focus-visible:ring-ring focus-visible:ring-offset-0",
4881
4882
  placeholder: "K, M, B, %",
4882
4883
  onChange: (m) => {
4883
- var g, j, D;
4884
+ var g, j, T;
4884
4885
  return a(
4885
4886
  ((g = s == null ? void 0 : s.formatNumber) == null ? void 0 : g.decimalPlaces) || 0,
4886
4887
  ((j = s == null ? void 0 : s.formatNumber) == null ? void 0 : j.currency) || "",
4887
- ((D = s == null ? void 0 : s.formatNumber) == null ? void 0 : D.locale) || "",
4888
+ ((T = s == null ? void 0 : s.formatNumber) == null ? void 0 : T.locale) || "",
4888
4889
  m.target.value
4889
4890
  );
4890
4891
  }
@@ -4895,7 +4896,7 @@ function Bl() {
4895
4896
  ] }) }),
4896
4897
  /* @__PURE__ */ e.jsx(de, { className: "my-3" }),
4897
4898
  /* @__PURE__ */ e.jsx(
4898
- pn,
4899
+ fn,
4899
4900
  {
4900
4901
  colorRanges: i,
4901
4902
  setColorRanges: r
@@ -4904,7 +4905,7 @@ function Bl() {
4904
4905
  ] })
4905
4906
  ] });
4906
4907
  }
4907
- function Ul() {
4908
+ function Gl() {
4908
4909
  return /* @__PURE__ */ e.jsxs("div", { className: "space-y-6 px-6 py-2", children: [
4909
4910
  /* @__PURE__ */ e.jsx(De, { type: "single", collapsible: !0, children: /* @__PURE__ */ e.jsxs(U, { value: "item-1", children: [
4910
4911
  /* @__PURE__ */ e.jsx(G, { className: "", children: "KPI Query" }),
@@ -4930,12 +4931,12 @@ function Ul() {
4930
4931
  ] })
4931
4932
  ] })
4932
4933
  ] }) }),
4933
- /* @__PURE__ */ e.jsx("section", { className: "", children: /* @__PURE__ */ e.jsx(Bl, {}) }),
4934
+ /* @__PURE__ */ e.jsx("section", { className: "", children: /* @__PURE__ */ e.jsx(Ul, {}) }),
4934
4935
  /* @__PURE__ */ e.jsx("div", {}),
4935
4936
  /* @__PURE__ */ e.jsx("div", {})
4936
4937
  ] });
4937
4938
  }
4938
- const Gl = [
4939
+ const Kl = [
4939
4940
  {
4940
4941
  label: "Mercator",
4941
4942
  value: "mercator"
@@ -4992,7 +4993,7 @@ const Gl = [
4992
4993
  label: "Natural Earth 1",
4993
4994
  value: "naturalEarth1"
4994
4995
  }
4995
- ], Kl = [
4996
+ ], Ql = [
4996
4997
  "blues",
4997
4998
  "brBG",
4998
4999
  "buGn",
@@ -5031,12 +5032,12 @@ const Gl = [
5031
5032
  "ylGnBu",
5032
5033
  "ylOrBr",
5033
5034
  "ylOrRd"
5034
- ], Ql = Kl.map((s) => ({
5035
+ ], Jl = Ql.map((s) => ({
5035
5036
  label: s,
5036
5037
  value: s
5037
5038
  }));
5038
- function Jl() {
5039
- var o, x, d, y, f, m, g, j, D, C, L, I, O, N, T, A, h, v;
5039
+ function Wl() {
5040
+ var o, x, d, y, f, m, g, j, T, C, M, I, V, N, w, L, h, v;
5040
5041
  const s = u((p) => p.card), t = (x = (o = s == null ? void 0 : s.preferences) == null ? void 0 : o.mapVisualOptions) == null ? void 0 : x.topoJsonUrl, [a, n] = R(
5041
5042
  ((y = (d = s == null ? void 0 : s.preferences) == null ? void 0 : d.mapVisualOptions) == null ? void 0 : y.customTopoJsonUrl) || ""
5042
5043
  ), { setCardPreferences: l } = ce(), { data: i } = Bs(s), r = Object.keys((i == null ? void 0 : i.objects) || {}).map((p) => ({
@@ -5110,11 +5111,11 @@ function Jl() {
5110
5111
  value: ((m = (f = s.preferences) == null ? void 0 : f.mapVisualOptions) == null ? void 0 : m.objectKey) || "",
5111
5112
  label: "Map Object",
5112
5113
  onValueChange: (p) => {
5113
- var k;
5114
+ var z;
5114
5115
  l({
5115
5116
  ...s.preferences,
5116
5117
  mapVisualOptions: {
5117
- ...(k = s.preferences) == null ? void 0 : k.mapVisualOptions,
5118
+ ...(z = s.preferences) == null ? void 0 : z.mapVisualOptions,
5118
5119
  objectKey: p
5119
5120
  }
5120
5121
  });
@@ -5128,15 +5129,15 @@ function Jl() {
5128
5129
  pe,
5129
5130
  {
5130
5131
  className: "h-9",
5131
- options: Gl,
5132
+ options: Kl,
5132
5133
  value: ((j = (g = s.preferences) == null ? void 0 : g.mapVisualOptions) == null ? void 0 : j.projection) || "",
5133
5134
  label: "Projection",
5134
5135
  onValueChange: (p) => {
5135
- var k;
5136
+ var z;
5136
5137
  l({
5137
5138
  ...s.preferences,
5138
5139
  mapVisualOptions: {
5139
- ...(k = s.preferences) == null ? void 0 : k.mapVisualOptions,
5140
+ ...(z = s.preferences) == null ? void 0 : z.mapVisualOptions,
5140
5141
  projection: p
5141
5142
  }
5142
5143
  });
@@ -5150,15 +5151,15 @@ function Jl() {
5150
5151
  pe,
5151
5152
  {
5152
5153
  className: "h-9",
5153
- options: Ql,
5154
- value: ((C = (D = s.preferences) == null ? void 0 : D.mapVisualOptions) == null ? void 0 : C.colorScale) || "",
5154
+ options: Jl,
5155
+ value: ((C = (T = s.preferences) == null ? void 0 : T.mapVisualOptions) == null ? void 0 : C.colorScale) || "",
5155
5156
  label: "Select Color Scale",
5156
5157
  onValueChange: (p) => {
5157
- var k;
5158
+ var z;
5158
5159
  l({
5159
5160
  ...s.preferences,
5160
5161
  mapVisualOptions: {
5161
- ...(k = s.preferences) == null ? void 0 : k.mapVisualOptions,
5162
+ ...(z = s.preferences) == null ? void 0 : z.mapVisualOptions,
5162
5163
  colorScale: p
5163
5164
  }
5164
5165
  });
@@ -5176,13 +5177,13 @@ function Jl() {
5176
5177
  className: `h-9 w-full ${Ge}`,
5177
5178
  type: "number",
5178
5179
  step: 0.1,
5179
- value: ((I = (L = s.preferences) == null ? void 0 : L.mapVisualOptions) == null ? void 0 : I.projectionScale) || 1,
5180
+ value: ((I = (M = s.preferences) == null ? void 0 : M.mapVisualOptions) == null ? void 0 : I.projectionScale) || 1,
5180
5181
  onChange: (p) => {
5181
- var k;
5182
+ var z;
5182
5183
  l({
5183
5184
  ...s.preferences,
5184
5185
  mapVisualOptions: {
5185
- ...(k = s.preferences) == null ? void 0 : k.mapVisualOptions,
5186
+ ...(z = s.preferences) == null ? void 0 : z.mapVisualOptions,
5186
5187
  projectionScale: Number(p.target.value)
5187
5188
  }
5188
5189
  });
@@ -5196,16 +5197,16 @@ function Jl() {
5196
5197
  className: `h-9 w-full ${Ge}`,
5197
5198
  type: "number",
5198
5199
  step: 10,
5199
- value: ((T = (N = (O = s.preferences) == null ? void 0 : O.mapVisualOptions) == null ? void 0 : N.projectionOffset) == null ? void 0 : T[0]) || 0,
5200
+ value: ((w = (N = (V = s.preferences) == null ? void 0 : V.mapVisualOptions) == null ? void 0 : N.projectionOffset) == null ? void 0 : w[0]) || 0,
5200
5201
  onChange: (p) => {
5201
- var k, V, $, B;
5202
+ var z, E, $, B;
5202
5203
  l({
5203
5204
  ...s.preferences,
5204
5205
  mapVisualOptions: {
5205
- ...(k = s.preferences) == null ? void 0 : k.mapVisualOptions,
5206
+ ...(z = s.preferences) == null ? void 0 : z.mapVisualOptions,
5206
5207
  projectionOffset: [
5207
5208
  Number(p.target.value),
5208
- ((B = ($ = (V = s.preferences) == null ? void 0 : V.mapVisualOptions) == null ? void 0 : $.projectionOffset) == null ? void 0 : B[1]) || 0
5209
+ ((B = ($ = (E = s.preferences) == null ? void 0 : E.mapVisualOptions) == null ? void 0 : $.projectionOffset) == null ? void 0 : B[1]) || 0
5209
5210
  ]
5210
5211
  }
5211
5212
  });
@@ -5219,15 +5220,15 @@ function Jl() {
5219
5220
  className: `h-9 w-full ${Ge}`,
5220
5221
  type: "number",
5221
5222
  step: 10,
5222
- value: ((v = (h = (A = s.preferences) == null ? void 0 : A.mapVisualOptions) == null ? void 0 : h.projectionOffset) == null ? void 0 : v[1]) || 0,
5223
+ value: ((v = (h = (L = s.preferences) == null ? void 0 : L.mapVisualOptions) == null ? void 0 : h.projectionOffset) == null ? void 0 : v[1]) || 0,
5223
5224
  onChange: (p) => {
5224
- var k, V, $, B;
5225
+ var z, E, $, B;
5225
5226
  l({
5226
5227
  ...s.preferences,
5227
5228
  mapVisualOptions: {
5228
- ...(k = s.preferences) == null ? void 0 : k.mapVisualOptions,
5229
+ ...(z = s.preferences) == null ? void 0 : z.mapVisualOptions,
5229
5230
  projectionOffset: [
5230
- ((B = ($ = (V = s.preferences) == null ? void 0 : V.mapVisualOptions) == null ? void 0 : $.projectionOffset) == null ? void 0 : B[0]) || 0,
5231
+ ((B = ($ = (E = s.preferences) == null ? void 0 : E.mapVisualOptions) == null ? void 0 : $.projectionOffset) == null ? void 0 : B[0]) || 0,
5231
5232
  Number(p.target.value)
5232
5233
  ]
5233
5234
  }
@@ -5240,7 +5241,7 @@ function Jl() {
5240
5241
  /* @__PURE__ */ e.jsx(Me, {})
5241
5242
  ] });
5242
5243
  }
5243
- function Wl() {
5244
+ function Yl() {
5244
5245
  var n;
5245
5246
  const s = u((l) => l.card.preferences), { setCardPreferences: t } = u((l) => l.actions);
5246
5247
  function a(l) {
@@ -5253,7 +5254,7 @@ function Wl() {
5253
5254
  });
5254
5255
  }
5255
5256
  return /* @__PURE__ */ e.jsxs(
5256
- js,
5257
+ bs,
5257
5258
  {
5258
5259
  value: (n = s == null ? void 0 : s.textVisualOptions) != null && n.isDynamicText ? "dynamic" : "static",
5259
5260
  onValueChange: a,
@@ -5305,9 +5306,9 @@ function ls({
5305
5306
  /* @__PURE__ */ e.jsxs(U, { value: "item-2", children: [
5306
5307
  /* @__PURE__ */ e.jsx(G, { children: "Settings" }),
5307
5308
  /* @__PURE__ */ e.jsxs(K, { className: "space-y-4 px-2", children: [
5308
- s === "range" && /* @__PURE__ */ e.jsx(bs, {}),
5309
+ s === "range" && /* @__PURE__ */ e.jsx(ys, {}),
5309
5310
  s !== "text" && /* @__PURE__ */ e.jsx(Js, {}),
5310
- s === "text" && /* @__PURE__ */ e.jsx(Wl, {})
5311
+ s === "text" && /* @__PURE__ */ e.jsx(Yl, {})
5311
5312
  ] })
5312
5313
  ] }),
5313
5314
  !["range", "text"].includes(s) && /* @__PURE__ */ e.jsxs(U, { value: "item-3", children: [
@@ -5319,7 +5320,7 @@ function ls({
5319
5320
  ] })
5320
5321
  ] }) });
5321
5322
  }
5322
- function Yl() {
5323
+ function Xl() {
5323
5324
  const s = u(
5324
5325
  (n) => {
5325
5326
  var l, i;
@@ -5385,7 +5386,7 @@ function Yl() {
5385
5386
  /* @__PURE__ */ e.jsxs(U, { value: "item-2", children: [
5386
5387
  /* @__PURE__ */ e.jsx(G, { children: "Settings" }),
5387
5388
  /* @__PURE__ */ e.jsxs(K, { className: "space-y-4 px-2", children: [
5388
- /* @__PURE__ */ e.jsx(bs, {}),
5389
+ /* @__PURE__ */ e.jsx(ys, {}),
5389
5390
  a(),
5390
5391
  /* @__PURE__ */ e.jsx(st, {})
5391
5392
  ] })
@@ -5399,7 +5400,7 @@ function Yl() {
5399
5400
  ] })
5400
5401
  ] }) });
5401
5402
  }
5402
- function Xl({}) {
5403
+ function Zl({}) {
5403
5404
  const s = u((n) => {
5404
5405
  var l;
5405
5406
  return (l = n.card) == null ? void 0 : l.preferences;
@@ -5420,7 +5421,7 @@ function Xl({}) {
5420
5421
  ] })
5421
5422
  ] }) }),
5422
5423
  /* @__PURE__ */ e.jsxs("div", { className: "flex items-center space-x-2", children: [
5423
- /* @__PURE__ */ e.jsx(ms, { onCheckedChange: a, id: "allow-download" }),
5424
+ /* @__PURE__ */ e.jsx(xs, { onCheckedChange: a, id: "allow-download" }),
5424
5425
  /* @__PURE__ */ e.jsx(
5425
5426
  "label",
5426
5427
  {
@@ -5432,7 +5433,7 @@ function Xl({}) {
5432
5433
  ] })
5433
5434
  ] });
5434
5435
  }
5435
- const Zl = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
5436
+ const er = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
5436
5437
  /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT dimension, cohort, metric FROM table" }),
5437
5438
  /* @__PURE__ */ e.jsxs("div", { children: [
5438
5439
  "See ",
@@ -5448,7 +5449,7 @@ const Zl = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-
5448
5449
  ),
5449
5450
  " in the docs."
5450
5451
  ] })
5451
- ] }), er = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
5452
+ ] }), sr = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
5452
5453
  /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT y-axis, label, range-from, range-to, range-value FROM table" }),
5453
5454
  /* @__PURE__ */ e.jsxs("div", { children: [
5454
5455
  "See ",
@@ -5464,7 +5465,7 @@ const Zl = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-
5464
5465
  ),
5465
5466
  " in the docs."
5466
5467
  ] })
5467
- ] }), sr = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
5468
+ ] }), ar = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-xs", children: [
5468
5469
  /* @__PURE__ */ e.jsx("div", { className: "rounded bg-muted px-2 py-1 text-xs", children: "SELECT text FROM table limit 1" }),
5469
5470
  /* @__PURE__ */ e.jsxs("div", { children: [
5470
5471
  "See ",
@@ -5481,22 +5482,22 @@ const Zl = /* @__PURE__ */ e.jsxs("div", { className: "space-y-4 font-mono text-
5481
5482
  " in the docs."
5482
5483
  ] })
5483
5484
  ] });
5484
- function ar() {
5485
+ function tr() {
5485
5486
  const s = u((a) => a.card.type);
5486
5487
  function t(a) {
5487
5488
  switch (a) {
5488
5489
  case "stackedBar":
5489
5490
  case "stackedLine":
5490
- return /* @__PURE__ */ e.jsx(Yl, {});
5491
+ return /* @__PURE__ */ e.jsx(Xl, {});
5491
5492
  case "pyramid":
5492
- return /* @__PURE__ */ e.jsx(ls, { docContent: Zl, cardType: a });
5493
+ return /* @__PURE__ */ e.jsx(ls, { docContent: er, cardType: a });
5493
5494
  case "kpi":
5494
- return /* @__PURE__ */ e.jsx(Ul, {});
5495
+ return /* @__PURE__ */ e.jsx(Gl, {});
5495
5496
  case "line":
5496
5497
  case "bar":
5497
- return /* @__PURE__ */ e.jsx(ql, { cardType: a });
5498
+ return /* @__PURE__ */ e.jsx(Rl, { cardType: a });
5498
5499
  case "range":
5499
- return /* @__PURE__ */ e.jsx(ls, { docContent: er, cardType: a });
5500
+ return /* @__PURE__ */ e.jsx(ls, { docContent: sr, cardType: a });
5500
5501
  case "pie":
5501
5502
  case "doughnut":
5502
5503
  case "polarArea":
@@ -5504,32 +5505,32 @@ function ar() {
5504
5505
  return /* @__PURE__ */ e.jsx(ls, { cardType: a });
5505
5506
  case "bubble":
5506
5507
  case "scatter":
5507
- return /* @__PURE__ */ e.jsx(Rl, { cardType: a });
5508
+ return /* @__PURE__ */ e.jsx(_l, { cardType: a });
5508
5509
  case "table":
5509
- return /* @__PURE__ */ e.jsx(Xl, { cardType: a });
5510
+ return /* @__PURE__ */ e.jsx(Zl, { cardType: a });
5510
5511
  case "text":
5511
5512
  return /* @__PURE__ */ e.jsx(
5512
5513
  ls,
5513
5514
  {
5514
- docContent: sr,
5515
+ docContent: ar,
5515
5516
  cardType: a,
5516
5517
  suffix: "Visual"
5517
5518
  }
5518
5519
  );
5519
5520
  case "map":
5520
- return /* @__PURE__ */ e.jsx(Jl, {});
5521
+ return /* @__PURE__ */ e.jsx(Wl, {});
5521
5522
  case "custom":
5522
- return /* @__PURE__ */ e.jsx(Ll, {});
5523
+ return /* @__PURE__ */ e.jsx(El, {});
5523
5524
  default:
5524
- return /* @__PURE__ */ e.jsx($l, {});
5525
+ return /* @__PURE__ */ e.jsx(Pl, {});
5525
5526
  }
5526
5527
  }
5527
- return /* @__PURE__ */ e.jsx(Ps, { className: "h-full w-full text-sm", children: t(s) });
5528
+ return /* @__PURE__ */ e.jsx(ms, { className: "h-full w-full text-sm", children: t(s) });
5528
5529
  }
5529
- function tr() {
5530
+ function nr() {
5530
5531
  const s = u((t) => t.isShowingVisual);
5531
5532
  return /* @__PURE__ */ e.jsxs(
5532
- ws,
5533
+ ks,
5533
5534
  {
5534
5535
  direction: "vertical",
5535
5536
  className: "min-h-[250px] min-w-full max-w-lg",
@@ -5541,10 +5542,10 @@ function tr() {
5541
5542
  className: "flex",
5542
5543
  minSize: 20,
5543
5544
  defaultSize: 40,
5544
- children: /* @__PURE__ */ e.jsx(Cl, {})
5545
+ children: /* @__PURE__ */ e.jsx(Nl, {})
5545
5546
  }
5546
5547
  ),
5547
- /* @__PURE__ */ e.jsx(ks, { withHandle: !0, className: "border" }),
5548
+ /* @__PURE__ */ e.jsx(zs, { withHandle: !0, className: "border" }),
5548
5549
  /* @__PURE__ */ e.jsx(
5549
5550
  Ve,
5550
5551
  {
@@ -5552,7 +5553,7 @@ function tr() {
5552
5553
  role: "visual-section",
5553
5554
  minSize: 0,
5554
5555
  defaultSize: 60,
5555
- children: s ? /* @__PURE__ */ e.jsxs(ws, { direction: "horizontal", children: [
5556
+ children: s ? /* @__PURE__ */ e.jsxs(ks, { direction: "horizontal", children: [
5556
5557
  /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
5557
5558
  Ve,
5558
5559
  {
@@ -5560,10 +5561,10 @@ function tr() {
5560
5561
  minSize: 20,
5561
5562
  defaultSize: 25,
5562
5563
  maxSize: 30,
5563
- children: /* @__PURE__ */ e.jsx(ar, {})
5564
+ children: /* @__PURE__ */ e.jsx(tr, {})
5564
5565
  }
5565
5566
  ) }),
5566
- /* @__PURE__ */ e.jsx(ks, { className: "border" }),
5567
+ /* @__PURE__ */ e.jsx(zs, { className: "border" }),
5567
5568
  /* @__PURE__ */ e.jsx(Ve, { minSize: 40, defaultSize: 75, maxSize: 100, children: /* @__PURE__ */ e.jsx(ra, {}) })
5568
5569
  ] }) : /* @__PURE__ */ e.jsx(ra, {})
5569
5570
  }
@@ -5572,15 +5573,15 @@ function tr() {
5572
5573
  }
5573
5574
  );
5574
5575
  }
5575
- function nr({ authToken: s, onSave: t, onClose: a }) {
5576
- z((r) => r.themeStyle);
5577
- const n = u((r) => r.actions.setOnSave), l = u((r) => r.actions.setOnClose), i = z((r) => r.actions.setAuthToken);
5576
+ function lr({ authToken: s, onSave: t, onClose: a }) {
5577
+ O((r) => r.themeStyle);
5578
+ const n = u((r) => r.actions.setOnSave), l = u((r) => r.actions.setOnClose), i = O((r) => r.actions.setAuthToken);
5578
5579
  return Z(() => {
5579
5580
  t && n(t), a && l(a);
5580
5581
  }, [t, n, a, l]), Z(() => {
5581
5582
  s && s.accessToken && i(s);
5582
- }, [s, i]), /* @__PURE__ */ e.jsx(xs, { FallbackComponent: Fa, children: /* @__PURE__ */ e.jsxs(
5583
- fn,
5583
+ }, [s, i]), /* @__PURE__ */ e.jsx(ps, { FallbackComponent: Fa, children: /* @__PURE__ */ e.jsxs(
5584
+ gn,
5584
5585
  {
5585
5586
  style: {
5586
5587
  // borderRadius: currentStyle?.chart?.options?.borderRadius,
@@ -5589,15 +5590,15 @@ function nr({ authToken: s, onSave: t, onClose: a }) {
5589
5590
  className: "rounded-none",
5590
5591
  role: "editor-panel",
5591
5592
  children: [
5592
- /* @__PURE__ */ e.jsx(gn, { className: "rounded-none border-r-[1.5px]", children: /* @__PURE__ */ e.jsx(_a, {}) }),
5593
- /* @__PURE__ */ e.jsx(jn, { children: /* @__PURE__ */ e.jsx(tr, {}) })
5593
+ /* @__PURE__ */ e.jsx(jn, { className: "rounded-none border-r-[1.5px]", children: /* @__PURE__ */ e.jsx(_a, {}) }),
5594
+ /* @__PURE__ */ e.jsx(bn, { children: /* @__PURE__ */ e.jsx(nr, {}) })
5594
5595
  ]
5595
5596
  }
5596
5597
  ) });
5597
5598
  }
5598
- function lr() {
5599
- z((r) => r.selectedCardId);
5600
- const s = z((r) => r.selectedSheetId), { setIsVisualEditing: t } = z((r) => r.actions), a = z((r) => r.isVisualEditing), n = z((r) => r.actions.updateFrame);
5599
+ function rr() {
5600
+ O((r) => r.selectedCardId);
5601
+ const s = O((r) => r.selectedSheetId), { setIsVisualEditing: t } = O((r) => r.actions), a = O((r) => r.isVisualEditing), n = O((r) => r.actions.updateFrame);
5601
5602
  function l(r) {
5602
5603
  s && (n(s, r), t(!1));
5603
5604
  }
@@ -5611,16 +5612,16 @@ function lr() {
5611
5612
  className: W("flex grow", {
5612
5613
  "max-h-0 overflow-hidden": !a
5613
5614
  }),
5614
- children: /* @__PURE__ */ e.jsx(nr, { onSave: l, onClose: i })
5615
+ children: /* @__PURE__ */ e.jsx(lr, { onSave: l, onClose: i })
5615
5616
  }
5616
5617
  );
5617
5618
  }
5618
- function rr() {
5619
+ function ir() {
5619
5620
  u((r) => r.selectedConnectionId), u((r) => r.selectedDatamodelId);
5620
5621
  const s = u((r) => r.selectedDatabaseName);
5621
5622
  u((r) => r.selectedSchemaName);
5622
- const t = u((r) => r.selectedTableName), a = z((r) => r.dashboard.filters) || [];
5623
- z((r) => r.actions.addFilter), z((r) => r.actions.removeFilter), z(
5623
+ const t = u((r) => r.selectedTableName), a = O((r) => r.dashboard.filters) || [];
5624
+ O((r) => r.actions.addFilter), O((r) => r.actions.removeFilter), O(
5624
5625
  (r) => r.actions.removeFilterValue
5625
5626
  );
5626
5627
  const { modelItems: n, columns: l } = Re(), { assignFilter: i } = at();
@@ -5647,9 +5648,9 @@ function rr() {
5647
5648
  );
5648
5649
  }) });
5649
5650
  }
5650
- function ir() {
5651
- z((t) => t.showFilters);
5652
- const s = z(
5651
+ function or() {
5652
+ O((t) => t.showFilters);
5653
+ const s = O(
5653
5654
  (t) => t.actions.setShowFilters
5654
5655
  );
5655
5656
  return /* @__PURE__ */ e.jsxs("section", { className: "relative flex grow flex-col border-l px-4", children: [
@@ -5671,7 +5672,7 @@ function ir() {
5671
5672
  ColumnsComponent: () => (
5672
5673
  // schemaName, tableName, columns
5673
5674
  /* @__PURE__ */ e.jsx(
5674
- rr,
5675
+ ir,
5675
5676
  {}
5676
5677
  )
5677
5678
  )
@@ -5679,8 +5680,8 @@ function ir() {
5679
5680
  ) })
5680
5681
  ] });
5681
5682
  }
5682
- function or() {
5683
- const s = z((a) => a.showFilters), t = z((a) => a.isVisualEditing);
5683
+ function cr() {
5684
+ const s = O((a) => a.showFilters), t = O((a) => a.isVisualEditing);
5684
5685
  return /* @__PURE__ */ e.jsxs(
5685
5686
  "div",
5686
5687
  {
@@ -5690,17 +5691,17 @@ function or() {
5690
5691
  "flex grow": !t
5691
5692
  }),
5692
5693
  children: [
5693
- /* @__PURE__ */ e.jsx(bn, {}),
5694
- s && /* @__PURE__ */ e.jsx("div", { role: "filter-aside-container", className: "flex", children: /* @__PURE__ */ e.jsx(ir, {}) })
5694
+ /* @__PURE__ */ e.jsx(yn, {}),
5695
+ s && /* @__PURE__ */ e.jsx("div", { role: "filter-aside-container", className: "flex", children: /* @__PURE__ */ e.jsx(or, {}) })
5695
5696
  ]
5696
5697
  }
5697
5698
  );
5698
5699
  }
5699
- function cr() {
5700
- const s = z((n) => n.dashboard), t = z((n) => n.actions.setDashboard), a = z(
5700
+ function dr() {
5701
+ const s = O((n) => n.dashboard), t = O((n) => n.actions.setDashboard), a = O(
5701
5702
  (n) => n.showDashboardJSON
5702
5703
  );
5703
- return z(
5704
+ return O(
5704
5705
  (n) => n.actions.setShowDashboardJSON
5705
5706
  ), /* @__PURE__ */ e.jsx(
5706
5707
  "div",
@@ -5709,7 +5710,7 @@ function cr() {
5709
5710
  hidden: !a
5710
5711
  }),
5711
5712
  children: /* @__PURE__ */ e.jsx(
5712
- yn,
5713
+ vn,
5713
5714
  {
5714
5715
  onChange: (n) => {
5715
5716
  if (n)
@@ -5740,65 +5741,65 @@ function cr() {
5740
5741
  }
5741
5742
  );
5742
5743
  }
5743
- function mr({
5744
+ function xr({
5744
5745
  showControls: s = !1,
5745
5746
  showFooter: t = !0,
5746
5747
  ...a
5747
5748
  }) {
5748
- return /* @__PURE__ */ e.jsx(xs, { FallbackComponent: Fa, children: /* @__PURE__ */ e.jsxs(vn, { dashboardProps: a, children: [
5749
- /* @__PURE__ */ e.jsx(Cn, {}),
5750
- /* @__PURE__ */ e.jsxs(Nn, { children: [
5751
- /* @__PURE__ */ e.jsx(cr, {}),
5752
- /* @__PURE__ */ e.jsxs(Sn, { ...a, children: [
5753
- s && /* @__PURE__ */ e.jsx(nl, {}),
5754
- /* @__PURE__ */ e.jsx(lr, {}),
5755
- /* @__PURE__ */ e.jsx(or, {})
5749
+ return /* @__PURE__ */ e.jsx(ps, { FallbackComponent: Fa, children: /* @__PURE__ */ e.jsxs(Cn, { dashboardProps: a, children: [
5750
+ /* @__PURE__ */ e.jsx(Nn, {}),
5751
+ /* @__PURE__ */ e.jsxs(Sn, { children: [
5752
+ /* @__PURE__ */ e.jsx(dr, {}),
5753
+ /* @__PURE__ */ e.jsxs(wn, { ...a, children: [
5754
+ s && /* @__PURE__ */ e.jsx(ll, {}),
5755
+ /* @__PURE__ */ e.jsx(rr, {}),
5756
+ /* @__PURE__ */ e.jsx(cr, {})
5756
5757
  ] })
5757
5758
  ] })
5758
5759
  ] }) });
5759
5760
  }
5760
5761
  export {
5761
5762
  Ue as A,
5762
- kn as B,
5763
- zn as C,
5764
- mr as D,
5763
+ zn as B,
5764
+ On as C,
5765
+ xr as D,
5765
5766
  Ma as E,
5766
5767
  qa as F,
5767
- Ln as G,
5768
- En as H,
5769
- Xn as I,
5768
+ En as G,
5769
+ An as H,
5770
+ Zn as I,
5770
5771
  La as K,
5771
- qn as L,
5772
+ Rn as L,
5772
5773
  Ea as M,
5773
- $n as N,
5774
+ Pn as N,
5774
5775
  Aa as P,
5775
- Un as S,
5776
- Jn as T,
5777
- Yn as U,
5776
+ Gn as S,
5777
+ Wn as T,
5778
+ Xn as U,
5778
5779
  Gs as a,
5779
5780
  Ks as b,
5780
5781
  Ia as c,
5781
5782
  Ta as d,
5782
5783
  Da as e,
5783
- On as f,
5784
- Fn as g,
5785
- In as h,
5786
- Tn as i,
5787
- Mn as j,
5788
- Dn as k,
5789
- An as l,
5790
- Vn as m,
5791
- Rn as n,
5792
- _n as o,
5784
+ Fn as f,
5785
+ In as g,
5786
+ Tn as h,
5787
+ Dn as i,
5788
+ Ln as j,
5789
+ Mn as k,
5790
+ Vn as l,
5791
+ qn as m,
5792
+ _n as n,
5793
+ Hn as o,
5793
5794
  Ze as p,
5794
- Hn as q,
5795
- Pn as r,
5796
- Bn as s,
5795
+ $n as q,
5796
+ Bn as r,
5797
+ Un as s,
5797
5798
  Va as t,
5798
- Gn as u,
5799
- Kn as v,
5800
- Qn as w,
5801
- Wn as x,
5799
+ Kn as u,
5800
+ Qn as v,
5801
+ Jn as w,
5802
+ Yn as x,
5802
5803
  Qs as y,
5803
5804
  Re as z
5804
5805
  };