react-semaphor 0.1.158 → 0.1.161

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.
Files changed (27) hide show
  1. package/dist/chunks/{dashboard-controls-BrA9bfEH.js → dashboard-controls-Bj4t5-el.js} +191 -190
  2. package/dist/chunks/{dashboard-controls-DCikywwc.js → dashboard-controls-BlxwV3BR.js} +6 -6
  3. package/dist/chunks/{dashboard-export-dialog-CgY7xu9K.js → dashboard-export-dialog-CIzU-4eS.js} +22 -22
  4. package/dist/chunks/{dashboard-export-dialog-DmiGLzpJ.js → dashboard-export-dialog-CT050NhP.js} +1 -1
  5. package/dist/chunks/{dashboard-json-BXikY_Pb.js → dashboard-json-BozpGO6V.js} +1 -1
  6. package/dist/chunks/{dashboard-json-VCE4QVLn.js → dashboard-json-rd13AclB.js} +1 -1
  7. package/dist/chunks/{edit-dashboard-visual-DnbmVSBV.js → edit-dashboard-visual-CfKKFELr.js} +1 -1
  8. package/dist/chunks/{edit-dashboard-visual-BncKHExl.js → edit-dashboard-visual-CxCLmkDv.js} +656 -656
  9. package/dist/chunks/{editor-action-buttons-7JVpVMr_.js → editor-action-buttons-Bu2ZxWgU.js} +1 -1
  10. package/dist/chunks/{editor-action-buttons-CoPIk5d_.js → editor-action-buttons-Ca2pHbvu.js} +2 -2
  11. package/dist/chunks/{index-DKPrD9E9.js → index-BXm1zeXQ.js} +131 -136
  12. package/dist/chunks/{index-DxPc6NRF.js → index-CO0YJSQz.js} +17284 -17369
  13. package/dist/chunks/resource-management-panel-C7J2WWQy.js +6 -0
  14. package/dist/chunks/{resource-management-panel-MW870OP_.js → resource-management-panel-DTJwukgb.js} +343 -335
  15. package/dist/chunks/use-role-aware-display-preferences-CBkOVEcY.js +1 -0
  16. package/dist/chunks/use-role-aware-display-preferences-CJv8NgDG.js +29 -0
  17. package/dist/chunks/{use-visual-utils-Dae2BjCh.js → use-visual-utils-8weKmT25.js} +1 -1
  18. package/dist/chunks/{use-visual-utils-C85nqyUR.js → use-visual-utils-B39LEQMe.js} +24 -24
  19. package/dist/dashboard/index.cjs +1 -1
  20. package/dist/dashboard/index.js +1 -1
  21. package/dist/index.cjs +2 -2
  22. package/dist/index.js +67 -65
  23. package/dist/surfboard/index.cjs +1 -1
  24. package/dist/surfboard/index.js +1 -1
  25. package/dist/types/main.d.ts +68 -1
  26. package/package.json +1 -1
  27. package/dist/chunks/resource-management-panel-CegmHckB.js +0 -6
@@ -1,17 +1,18 @@
1
- import { jsxs as r, jsx as e, Fragment as I } from "react/jsx-runtime";
2
- import { b as X, bC as qs, bD as _s, u as y, aG as Ke, aH as Je, B as k, aJ as We, aK as fe, bE as Me, g as Xe, ao as U, at as ke, bF as $s, b8 as Ae, au as Le, av as Ie, aw as Ee, ax as Ye, ay as be, b1 as W, aC as js, I as q, bG as Vs, bc as Qs, bH as Hs, bI as Ve, bJ as Ze, c as Y, bK as es, b4 as Bs, h as le, bL as ce, l as A, bM as ss, aA as Ks, bN as Js, L as _, bb as $, bO as Ws, bP as Xs, bQ as Ne, bR as Ys, bS as Zs, bT as as, bU as ts, bV as oe, bW as ie, bz as ye, bj as we, bX as xe, bd as rs, bY as Ce, aB as ns, bh as os, bZ as ea, aO as is, aP as ls, aQ as cs, aS as ds, aT as us, aU as ms, aV as hs, aW as De, b_ as sa, b6 as aa, bu as ta, b$ as ra, G as na, f as Qe, A as re, c0 as oa, R as ve, c1 as ia, c2 as la, c3 as ca, c4 as da, b9 as ua, W as ma, c5 as ha, c6 as pa, c7 as ga, c8 as fa, M as va, V as ba } from "./index-DxPc6NRF.js";
1
+ import { jsxs as r, jsx as e, Fragment as E } from "react/jsx-runtime";
2
+ import { l as Z, bK as zs, bL as qs, u as y, aQ as Be, aR as Je, B as k, aT as We, aU as fe, bM as Me, o as Ze, ay as U, aD as ke, bN as $s, bi as Le, aE as Ae, aF as Ie, aG as Ee, aH as Xe, aI as be, bb as W, aM as js, J as z, bO as Qs, bm as Vs, bP as Hs, bQ as Qe, bR as Ye, c as X, bS as es, be as Ks, p as le, bT as ce, t as L, bU as ss, aK as Bs, bV as Js, L as q, bl as $, bW as Ws, bX as Zs, bY as Ne, bZ as Xs, b_ as Ys, b$ as as, c0 as ts, c1 as oe, c2 as ie, bH as ye, bs as we, c3 as xe, bn as rs, c4 as Ce, aL as ns, e as os, c5 as ea, aY as is, aZ as ls, a_ as cs, b0 as ds, b1 as us, b2 as ms, b3 as hs, b4 as De, c6 as sa, bg as aa, c7 as ta, R as ra, n as Ve, Q as re, _ as na, T as ve, c8 as oa, c9 as ia, ca as la, cb as ca, bj as da, a5 as ua, cc as ma, cd as ha, ce as pa, cf as ga, Z as fa, a4 as va } from "./index-CO0YJSQz.js";
3
3
  import * as M from "react";
4
- import { useState as b, useMemo as ne, useEffect as Na } from "react";
4
+ import { useState as b, useMemo as ne, useEffect as ba } from "react";
5
5
  import "react-dom";
6
- import { D as ya, u as wa, A as xa, V as Ca, S as Da, U as Sa } from "./dashboard-export-dialog-CgY7xu9K.js";
7
- import { S as He } from "./editor-action-buttons-CoPIk5d_.js";
6
+ import { D as Na, u as ya, A as wa, V as xa, S as Ca, U as Da } from "./dashboard-export-dialog-CIzU-4eS.js";
7
+ import { u as Sa } from "./use-role-aware-display-preferences-CJv8NgDG.js";
8
+ import { S as He } from "./editor-action-buttons-Ca2pHbvu.js";
8
9
  /**
9
10
  * @license lucide-react v0.453.0 - ISC
10
11
  *
11
12
  * This source code is licensed under the ISC license.
12
13
  * See the LICENSE file in the root directory of this source tree.
13
14
  */
14
- const Ma = X("Glasses", [
15
+ const Ma = Z("Glasses", [
15
16
  ["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
16
17
  ["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
17
18
  ["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
@@ -24,7 +25,7 @@ const Ma = X("Glasses", [
24
25
  * This source code is licensed under the ISC license.
25
26
  * See the LICENSE file in the root directory of this source tree.
26
27
  */
27
- const ka = X("Menu", [
28
+ const ka = Z("Menu", [
28
29
  ["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }],
29
30
  ["line", { x1: "4", x2: "20", y1: "6", y2: "6", key: "1owob3" }],
30
31
  ["line", { x1: "4", x2: "20", y1: "18", y2: "18", key: "yk5zj1" }]
@@ -35,7 +36,7 @@ const ka = X("Menu", [
35
36
  * This source code is licensed under the ISC license.
36
37
  * See the LICENSE file in the root directory of this source tree.
37
38
  */
38
- const Aa = X("Moon", [
39
+ const La = Z("Moon", [
39
40
  ["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
40
41
  ]);
41
42
  /**
@@ -44,7 +45,7 @@ const Aa = X("Moon", [
44
45
  * This source code is licensed under the ISC license.
45
46
  * See the LICENSE file in the root directory of this source tree.
46
47
  */
47
- const La = X("ShieldX", [
48
+ const Aa = Z("ShieldX", [
48
49
  [
49
50
  "path",
50
51
  {
@@ -61,7 +62,7 @@ const La = X("ShieldX", [
61
62
  * This source code is licensed under the ISC license.
62
63
  * See the LICENSE file in the root directory of this source tree.
63
64
  */
64
- const Ia = X("Sun", [
65
+ const Ia = Z("Sun", [
65
66
  ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
66
67
  ["path", { d: "M12 2v2", key: "tus03m" }],
67
68
  ["path", { d: "M12 20v2", key: "1lh1kg" }],
@@ -72,12 +73,12 @@ const Ia = X("Sun", [
72
73
  ["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
73
74
  ["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
74
75
  ]);
75
- var Ea = qs();
76
+ var Ea = zs();
76
77
  function Ta() {
77
- const { setTheme: s } = _s(), n = y(
78
+ const { setTheme: s } = qs(), n = y(
78
79
  (a) => a.actions.setDashboardTheme
79
80
  );
80
- return /* @__PURE__ */ r(Ke, { children: [
81
+ return /* @__PURE__ */ r(Be, { children: [
81
82
  /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ r(k, { className: "h-7 p-2", variant: "ghost", size: "sm", children: [
82
83
  /* @__PURE__ */ e(
83
84
  Ia,
@@ -87,7 +88,7 @@ function Ta() {
87
88
  }
88
89
  ),
89
90
  /* @__PURE__ */ e(
90
- Aa,
91
+ La,
91
92
  {
92
93
  strokeWidth: 1.5,
93
94
  className: "absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"
@@ -160,7 +161,7 @@ async function Ga(s, n, a) {
160
161
  });
161
162
  }
162
163
  function Fa() {
163
- const [s, n] = b(""), [a, t] = b(!1), l = y((C) => C.lenses), { setLenses: o, setSelectedLensId: c } = Xe(), [u, p] = b(!1), [f, d] = b(!1), m = y((C) => C.dashboard), g = y((C) => C.filterValues), { authToken: v, tokenProps: N } = U();
164
+ const [s, n] = b(""), [a, t] = b(!1), l = y((C) => C.lenses), { setLenses: o, setSelectedLensId: c } = Ze(), [u, p] = b(!1), [f, d] = b(!1), m = y((C) => C.dashboard), g = y((C) => C.filterValues), { authToken: v, tokenProps: N } = U();
164
165
  async function w() {
165
166
  p(!0);
166
167
  const C = await Pa(
@@ -180,15 +181,15 @@ function Fa() {
180
181
  className: "h-7 p-2",
181
182
  size: "sm",
182
183
  children: [
183
- /* @__PURE__ */ e(Ae, { className: "mr-2 h-4 w-4" }),
184
+ /* @__PURE__ */ e(Le, { className: "mr-2 h-4 w-4" }),
184
185
  "Lens"
185
186
  ]
186
187
  }
187
188
  ) }),
188
- /* @__PURE__ */ r(Le, { className: "sm:max-w-[425px]", children: [
189
+ /* @__PURE__ */ r(Ae, { className: "sm:max-w-[425px]", children: [
189
190
  /* @__PURE__ */ r(Ie, { children: [
190
191
  /* @__PURE__ */ e(Ee, { children: "Create Lens" }),
191
- /* @__PURE__ */ e(Ye, { children: "Lenses are private by default and are only visible to you." })
192
+ /* @__PURE__ */ e(Xe, { children: "Lenses are private by default and are only visible to you." })
192
193
  ] }),
193
194
  /* @__PURE__ */ e("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ r("div", { className: "grid grid-cols-8 items-center gap-4", children: [
194
195
  /* @__PURE__ */ e(be, { className: "text-right", children: "Name" }),
@@ -219,8 +220,8 @@ function Fa() {
219
220
  ] })
220
221
  ] });
221
222
  }
222
- function Oa() {
223
- const [s, n] = b(!1), a = y((m) => m.lenses), t = y((m) => m.selectedLensId), { setLenses: l, setSelectedLensId: o } = Xe(), { authToken: c, tokenProps: u } = U();
223
+ function Ra() {
224
+ const [s, n] = b(!1), a = y((m) => m.lenses), t = y((m) => m.selectedLensId), { setLenses: l, setSelectedLensId: o } = Ze(), { authToken: c, tokenProps: u } = U();
224
225
  async function p(m) {
225
226
  o(m);
226
227
  }
@@ -253,20 +254,20 @@ function Oa() {
253
254
  await Se(u.apiServiceUrl, w, c == null ? void 0 : c.accessToken);
254
255
  }
255
256
  }
256
- return /* @__PURE__ */ r(Ke, { open: s, onOpenChange: n, children: [
257
- /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e(q, { tooltip: "Lenses", className: "h-7 p-2", children: /* @__PURE__ */ e(Ma, { className: "h-4 w-4" }) }) }),
257
+ return /* @__PURE__ */ r(Be, { open: s, onOpenChange: n, children: [
258
+ /* @__PURE__ */ e(Je, { asChild: !0, children: /* @__PURE__ */ e(z, { tooltip: "Lenses", className: "h-7 p-2", children: /* @__PURE__ */ e(Ma, { className: "h-4 w-4" }) }) }),
258
259
  /* @__PURE__ */ r(We, { align: "end", className: "w-60", children: [
259
- /* @__PURE__ */ e(Vs, { className: "px-3", children: "Lenses" }),
260
- /* @__PURE__ */ e(Qs, {}),
260
+ /* @__PURE__ */ e(Qs, { className: "px-3", children: "Lenses" }),
261
+ /* @__PURE__ */ e(Vs, {}),
261
262
  /* @__PURE__ */ r(
262
263
  Hs,
263
264
  {
264
265
  value: t,
265
266
  onValueChange: p,
266
267
  children: [
267
- /* @__PURE__ */ e(Ve, { value: "original", children: "Original" }),
268
+ /* @__PURE__ */ e(Qe, { value: "original", children: "Original" }),
268
269
  a == null ? void 0 : a.map((m) => /* @__PURE__ */ r(
269
- Ve,
270
+ Qe,
270
271
  {
271
272
  className: "group flex justify-between gap-2",
272
273
  value: m.id,
@@ -274,12 +275,12 @@ function Oa() {
274
275
  /* @__PURE__ */ e("p", { children: m.name }),
275
276
  /* @__PURE__ */ r("span", { className: "flex items-center gap-3", children: [
276
277
  /* @__PURE__ */ e(
277
- Ze,
278
+ Ye,
278
279
  {
279
280
  onClick: (g) => {
280
281
  g.preventDefault(), d(m);
281
282
  },
282
- className: Y(
283
+ className: X(
283
284
  "size-3.5 text-muted-foreground hover:cursor-pointer hover:text-foreground group-hover:visible",
284
285
  {
285
286
  invisible: !m.isDefault,
@@ -310,11 +311,11 @@ function Oa() {
310
311
  ] })
311
312
  ] });
312
313
  }
313
- function Ra({
314
+ function Oa({
314
315
  iconClassName: s
315
316
  }) {
316
317
  const [n, a] = b(!1), t = y((l) => l.isDownloadingPdf);
317
- return /* @__PURE__ */ r(I, { children: [
318
+ return /* @__PURE__ */ r(E, { children: [
318
319
  /* @__PURE__ */ e(
319
320
  k,
320
321
  {
@@ -323,11 +324,11 @@ function Ra({
323
324
  className: "h-7 p-2",
324
325
  disabled: t,
325
326
  onClick: () => a(!0),
326
- children: /* @__PURE__ */ e(Bs, { className: Y("size-4", s) })
327
+ children: /* @__PURE__ */ e(Ks, { className: X("size-4", s) })
327
328
  }
328
329
  ),
329
330
  /* @__PURE__ */ e(
330
- ya,
331
+ Na,
331
332
  {
332
333
  open: n,
333
334
  onOpenChange: a
@@ -338,7 +339,7 @@ function Ra({
338
339
  const Ua = async (s, n, a) => {
339
340
  const t = `${s}/management/v1/groups`;
340
341
  return await ss(t, n, a);
341
- }, za = async (s, n, a) => {
342
+ }, _a = async (s, n, a) => {
342
343
  const t = `${s}/management/v1/groups/${a}`, l = await fetch(t, {
343
344
  method: "DELETE",
344
345
  headers: {
@@ -349,10 +350,10 @@ const Ua = async (s, n, a) => {
349
350
  const o = await l.text();
350
351
  throw new Error(o || "Failed to delete group");
351
352
  }
352
- }, qa = async (s, n, a, t) => {
353
+ }, za = async (s, n, a, t) => {
353
354
  const l = `${s}/management/v1/groups/${a}/members`;
354
355
  return await ss(l, n, t);
355
- }, _a = async (s, n, a, t) => {
356
+ }, qa = async (s, n, a, t) => {
356
357
  const l = `${s}/management/v1/groups/${a}/members`, o = await fetch(l, {
357
358
  method: "DELETE",
358
359
  headers: {
@@ -371,10 +372,10 @@ function $a() {
371
372
  return ce({
372
373
  mutationFn: (t) => Ua(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t),
373
374
  onSuccess: () => {
374
- a.invalidateQueries({ queryKey: ["groups"] }), A.success("Group created successfully");
375
+ a.invalidateQueries({ queryKey: ["groups"] }), L.success("Group created successfully");
375
376
  },
376
377
  onError: (t) => {
377
- console.error("Failed to create group:", t), A.error("Failed to create group", {
378
+ console.error("Failed to create group:", t), L.error("Failed to create group", {
378
379
  description: t.message
379
380
  });
380
381
  }
@@ -383,50 +384,50 @@ function $a() {
383
384
  function ja() {
384
385
  const { authToken: s, tokenProps: n } = U(), a = le();
385
386
  return ce({
386
- mutationFn: (t) => za(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t),
387
+ mutationFn: (t) => _a(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t),
387
388
  onSuccess: (t, l) => {
388
- a.invalidateQueries({ queryKey: ["groups"] }), a.removeQueries({ queryKey: ["group", l] }), A.success("Group deleted successfully");
389
+ a.invalidateQueries({ queryKey: ["groups"] }), a.removeQueries({ queryKey: ["group", l] }), L.success("Group deleted successfully");
389
390
  },
390
391
  onError: (t) => {
391
- console.error("Failed to delete group:", t), A.error("Failed to delete group", {
392
+ console.error("Failed to delete group:", t), L.error("Failed to delete group", {
392
393
  description: t.message
393
394
  });
394
395
  }
395
396
  });
396
397
  }
397
- function Va() {
398
+ function Qa() {
398
399
  const { authToken: s, tokenProps: n } = U(), a = le();
399
400
  return ce({
400
401
  mutationFn: ({
401
402
  groupId: t,
402
403
  data: l
403
- }) => qa(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t, l),
404
+ }) => za(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t, l),
404
405
  onSuccess: (t, l) => {
405
406
  a.invalidateQueries({ queryKey: ["group", l.groupId] }), a.invalidateQueries({
406
407
  queryKey: ["group-members", l.groupId]
407
- }), a.invalidateQueries({ queryKey: ["groups"] }), A.success("Members added successfully");
408
+ }), a.invalidateQueries({ queryKey: ["groups"] }), L.success("Members added successfully");
408
409
  },
409
410
  onError: (t) => {
410
- console.error("Failed to add group members:", t), A.error("Failed to add members", {
411
+ console.error("Failed to add group members:", t), L.error("Failed to add members", {
411
412
  description: t.message
412
413
  });
413
414
  }
414
415
  });
415
416
  }
416
- function Qa() {
417
+ function Va() {
417
418
  const { authToken: s, tokenProps: n } = U(), a = le();
418
419
  return ce({
419
420
  mutationFn: ({
420
421
  groupId: t,
421
422
  data: l
422
- }) => _a(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t, l),
423
+ }) => qa(n.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", t, l),
423
424
  onSuccess: (t, l) => {
424
425
  a.invalidateQueries({ queryKey: ["group", l.groupId] }), a.invalidateQueries({
425
426
  queryKey: ["group-members", l.groupId]
426
- }), a.invalidateQueries({ queryKey: ["groups"] }), A.success("Members removed successfully");
427
+ }), a.invalidateQueries({ queryKey: ["groups"] }), L.success("Members removed successfully");
427
428
  },
428
429
  onError: (t) => {
429
- console.error("Failed to remove group members:", t), A.error("Failed to remove members", {
430
+ console.error("Failed to remove group members:", t), L.error("Failed to remove members", {
430
431
  description: t.message
431
432
  });
432
433
  }
@@ -482,7 +483,7 @@ function Ha({
482
483
  /* @__PURE__ */ e("span", { className: "ml-2 text-xs text-muted-foreground", children: "(optional)" })
483
484
  ] }),
484
485
  /* @__PURE__ */ e(
485
- Ks,
486
+ Bs,
486
487
  {
487
488
  id: "group-description",
488
489
  placeholder: "Describe the purpose of this group...",
@@ -524,10 +525,10 @@ function Ha({
524
525
  {
525
526
  type: "submit",
526
527
  disabled: f.isPending || !t.trim(),
527
- children: f.isPending ? /* @__PURE__ */ r(I, { children: [
528
- /* @__PURE__ */ e(_, { className: "mr-2 h-4 w-4 animate-spin" }),
528
+ children: f.isPending ? /* @__PURE__ */ r(E, { children: [
529
+ /* @__PURE__ */ e(q, { className: "mr-2 h-4 w-4 animate-spin" }),
529
530
  "Creating..."
530
- ] }) : /* @__PURE__ */ r(I, { children: [
531
+ ] }) : /* @__PURE__ */ r(E, { children: [
531
532
  /* @__PURE__ */ e($, { className: "mr-2 h-4 w-4" }),
532
533
  "Create Group"
533
534
  ] })
@@ -536,7 +537,7 @@ function Ha({
536
537
  ] })
537
538
  ] });
538
539
  }
539
- function Ba(s, n = []) {
540
+ function Ka(s, n = []) {
540
541
  let a = [];
541
542
  function t(o, c) {
542
543
  const u = M.createContext(c);
@@ -544,8 +545,8 @@ function Ba(s, n = []) {
544
545
  const p = a.length;
545
546
  a = [...a, c];
546
547
  const f = (m) => {
547
- var O;
548
- const { scope: g, children: v, ...N } = m, w = ((O = g == null ? void 0 : g[s]) == null ? void 0 : O[p]) || u, C = M.useMemo(() => N, Object.values(N));
548
+ var R;
549
+ const { scope: g, children: v, ...N } = m, w = ((R = g == null ? void 0 : g[s]) == null ? void 0 : R[p]) || u, C = M.useMemo(() => N, Object.values(N));
549
550
  return /* @__PURE__ */ e(w.Provider, { value: C, children: v });
550
551
  };
551
552
  f.displayName = o + "Provider";
@@ -568,9 +569,9 @@ function Ba(s, n = []) {
568
569
  );
569
570
  };
570
571
  };
571
- return l.scopeName = s, [t, Ka(l, ...n)];
572
+ return l.scopeName = s, [t, Ba(l, ...n)];
572
573
  }
573
- function Ka(...s) {
574
+ function Ba(...s) {
574
575
  const n = s[0];
575
576
  if (s.length === 1) return n;
576
577
  const a = () => {
@@ -615,20 +616,20 @@ var Ja = [
615
616
  }, {});
616
617
  function Wa() {
617
618
  return Ea.useSyncExternalStore(
618
- Xa,
619
+ Za,
619
620
  () => !0,
620
621
  () => !1
621
622
  );
622
623
  }
623
- function Xa() {
624
+ function Za() {
624
625
  return () => {
625
626
  };
626
627
  }
627
- var Pe = "Avatar", [Ya] = Ba(Pe), [Za, ps] = Ya(Pe), gs = M.forwardRef(
628
+ var Pe = "Avatar", [Xa] = Ka(Pe), [Ya, ps] = Xa(Pe), gs = M.forwardRef(
628
629
  (s, n) => {
629
630
  const { __scopeAvatar: a, ...t } = s, [l, o] = M.useState("idle");
630
631
  return /* @__PURE__ */ e(
631
- Za,
632
+ Ya,
632
633
  {
633
634
  scope: a,
634
635
  imageLoadingStatus: l,
@@ -642,7 +643,7 @@ gs.displayName = Pe;
642
643
  var fs = "AvatarImage", vs = M.forwardRef(
643
644
  (s, n) => {
644
645
  const { __scopeAvatar: a, src: t, onLoadingStatusChange: l = () => {
645
- }, ...o } = s, c = ps(fs, a), u = et(t, o), p = Xs((f) => {
646
+ }, ...o } = s, c = ps(fs, a), u = et(t, o), p = Zs((f) => {
646
647
  l(f), c.onImageLoadingStatusChange(f);
647
648
  });
648
649
  return Ne(() => {
@@ -663,15 +664,15 @@ var bs = "AvatarFallback", Ns = M.forwardRef(
663
664
  }
664
665
  );
665
666
  Ns.displayName = bs;
666
- function Be(s, n) {
667
+ function Ke(s, n) {
667
668
  return s ? n ? (s.src !== n && (s.src = n), s.complete && s.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
668
669
  }
669
670
  function et(s, { referrerPolicy: n, crossOrigin: a }) {
670
671
  const t = Wa(), l = M.useRef(null), o = t ? (l.current || (l.current = new window.Image()), l.current) : null, [c, u] = M.useState(
671
- () => Be(o, s)
672
+ () => Ke(o, s)
672
673
  );
673
674
  return Ne(() => {
674
- u(Be(o, s));
675
+ u(Ke(o, s));
675
676
  }, [o, s]), Ne(() => {
676
677
  const p = (m) => () => {
677
678
  u(m);
@@ -688,7 +689,7 @@ const Ge = M.forwardRef(({ className: s, ...n }, a) => /* @__PURE__ */ e(
688
689
  ys,
689
690
  {
690
691
  ref: a,
691
- className: Y(
692
+ className: X(
692
693
  "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
693
694
  s
694
695
  ),
@@ -700,7 +701,7 @@ const st = M.forwardRef(({ className: s, ...n }, a) => /* @__PURE__ */ e(
700
701
  ws,
701
702
  {
702
703
  ref: a,
703
- className: Y("aspect-square h-full w-full", s),
704
+ className: X("aspect-square h-full w-full", s),
704
705
  ...n
705
706
  }
706
707
  ));
@@ -709,7 +710,7 @@ const Fe = M.forwardRef(({ className: s, ...n }, a) => /* @__PURE__ */ e(
709
710
  xs,
710
711
  {
711
712
  ref: a,
712
- className: Y(
713
+ className: X(
713
714
  "flex h-full w-full items-center justify-center rounded-full bg-muted",
714
715
  s
715
716
  ),
@@ -723,33 +724,33 @@ function at({
723
724
  group: a,
724
725
  onUpdate: t
725
726
  }) {
726
- const [l, o] = b("members"), [c, u] = b(""), [p, f] = b([]), [d, m] = b([]), { data: g, isLoading: v, refetch: N } = Ys(a.id), w = a.type === "TENANT_GROUP" ? "tenant" : "organization", { users: C, isLoading: O } = Zs({
727
+ const [l, o] = b("members"), [c, u] = b(""), [p, f] = b([]), [d, m] = b([]), { data: g, isLoading: v, refetch: N } = Xs(a.id), w = a.type === "TENANT_GROUP" ? "tenant" : "organization", { users: C, isLoading: R } = Ys({
727
728
  type: w,
728
729
  tenantId: a.tenantId || void 0,
729
730
  active: !0,
730
731
  limit: 100
731
- }), R = Va(), G = Qa(), L = (g == null ? void 0 : g.members) || [], F = ne(() => new Set(L.map((h) => h.userId)), [L]), P = ne(() => C.filter((h) => !F.has(h.id)), [C, F]), j = ne(() => {
732
+ }), O = Qa(), G = Va(), A = (g == null ? void 0 : g.members) || [], F = ne(() => new Set(A.map((h) => h.userId)), [A]), P = ne(() => C.filter((h) => !F.has(h.id)), [C, F]), j = ne(() => {
732
733
  if (!c) return P;
733
734
  const h = c.toLowerCase();
734
735
  return P.filter(
735
736
  (S) => {
736
- var E, z;
737
- return ((E = S.name) == null ? void 0 : E.toLowerCase().includes(h)) || ((z = S.email) == null ? void 0 : z.toLowerCase().includes(h));
737
+ var I, _;
738
+ return ((I = S.name) == null ? void 0 : I.toLowerCase().includes(h)) || ((_ = S.email) == null ? void 0 : _.toLowerCase().includes(h));
738
739
  }
739
740
  );
740
741
  }, [P, c]), x = ne(() => {
741
- if (!c) return L;
742
+ if (!c) return A;
742
743
  const h = c.toLowerCase();
743
- return L.filter(
744
+ return A.filter(
744
745
  (S) => {
745
- var E, z, Z, Q;
746
- return ((z = (E = S.user) == null ? void 0 : E.name) == null ? void 0 : z.toLowerCase().includes(h)) || ((Q = (Z = S.user) == null ? void 0 : Z.email) == null ? void 0 : Q.toLowerCase().includes(h));
746
+ var I, _, Y, V;
747
+ return ((_ = (I = S.user) == null ? void 0 : I.name) == null ? void 0 : _.toLowerCase().includes(h)) || ((V = (Y = S.user) == null ? void 0 : Y.email) == null ? void 0 : V.toLowerCase().includes(h));
747
748
  }
748
749
  );
749
- }, [L, c]), V = async () => {
750
+ }, [A, c]), Q = async () => {
750
751
  if (p.length !== 0)
751
752
  try {
752
- await R.mutateAsync({
753
+ await O.mutateAsync({
753
754
  groupId: a.id,
754
755
  data: {
755
756
  userIds: p,
@@ -773,20 +774,20 @@ function at({
773
774
  }
774
775
  }, ue = (h) => {
775
776
  f(
776
- (S) => S.includes(h) ? S.filter((E) => E !== h) : [...S, h]
777
+ (S) => S.includes(h) ? S.filter((I) => I !== h) : [...S, h]
777
778
  );
778
779
  }, D = (h) => {
779
780
  m(
780
- (S) => S.includes(h) ? S.filter((E) => E !== h) : [...S, h]
781
+ (S) => S.includes(h) ? S.filter((I) => I !== h) : [...S, h]
781
782
  );
782
783
  };
783
- return /* @__PURE__ */ e(I, { children: /* @__PURE__ */ e(ke, { open: s, onOpenChange: n, children: /* @__PURE__ */ r(Le, { className: "max-w-3xl max-h-[80vh]", "aria-describedby": "group-members-description", children: [
784
+ return /* @__PURE__ */ e(E, { children: /* @__PURE__ */ e(ke, { open: s, onOpenChange: n, children: /* @__PURE__ */ r(Ae, { className: "max-w-3xl max-h-[80vh]", "aria-describedby": "group-members-description", children: [
784
785
  /* @__PURE__ */ r(Ie, { children: [
785
786
  /* @__PURE__ */ e(Ee, { children: a.name }),
786
787
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2 mt-1", children: /* @__PURE__ */ r("p", { className: "text-sm text-muted-foreground", children: [
787
- L.length,
788
+ A.length,
788
789
  " ",
789
- L.length === 1 ? "member" : "members"
790
+ A.length === 1 ? "member" : "members"
790
791
  ] }) }),
791
792
  /* @__PURE__ */ r("p", { id: "group-members-description", className: "sr-only", children: [
792
793
  "Add or remove members from the ",
@@ -841,10 +842,10 @@ function at({
841
842
  size: "sm",
842
843
  onClick: de,
843
844
  disabled: G.isPending,
844
- children: G.isPending ? /* @__PURE__ */ r(I, { children: [
845
- /* @__PURE__ */ e(_, { className: "mr-2 h-4 w-4 animate-spin" }),
845
+ children: G.isPending ? /* @__PURE__ */ r(E, { children: [
846
+ /* @__PURE__ */ e(q, { className: "mr-2 h-4 w-4 animate-spin" }),
846
847
  "Removing..."
847
- ] }) : /* @__PURE__ */ r(I, { children: [
848
+ ] }) : /* @__PURE__ */ r(E, { children: [
848
849
  /* @__PURE__ */ e(rs, { className: "mr-2 h-4 w-4" }),
849
850
  "Remove Selected"
850
851
  ] })
@@ -865,7 +866,7 @@ function at({
865
866
  }
866
867
  )
867
868
  ] }),
868
- /* @__PURE__ */ e(we, { className: "h-[300px]", children: O ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((h) => /* @__PURE__ */ e(xe, { className: "h-16 w-full" }, h)) }) : j.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
869
+ /* @__PURE__ */ e(we, { className: "h-[300px]", children: R ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((h) => /* @__PURE__ */ e(xe, { className: "h-16 w-full" }, h)) }) : j.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
869
870
  /* @__PURE__ */ e(Ce, { className: "h-12 w-12 mb-3 opacity-50" }),
870
871
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: "No available users" }),
871
872
  /* @__PURE__ */ e("p", { className: "text-xs mt-1", children: c ? "Try a different search" : "All eligible users are already members" })
@@ -888,12 +889,12 @@ function at({
888
889
  /* @__PURE__ */ e(
889
890
  k,
890
891
  {
891
- onClick: V,
892
- disabled: R.isPending,
893
- children: R.isPending ? /* @__PURE__ */ r(I, { children: [
894
- /* @__PURE__ */ e(_, { className: "mr-2 h-4 w-4 animate-spin" }),
892
+ onClick: Q,
893
+ disabled: O.isPending,
894
+ children: O.isPending ? /* @__PURE__ */ r(E, { children: [
895
+ /* @__PURE__ */ e(q, { className: "mr-2 h-4 w-4 animate-spin" }),
895
896
  "Adding..."
896
- ] }) : /* @__PURE__ */ r(I, { children: [
897
+ ] }) : /* @__PURE__ */ r(E, { children: [
897
898
  /* @__PURE__ */ e(Ce, { className: "mr-2 h-4 w-4" }),
898
899
  "Add Members"
899
900
  ] })
@@ -954,14 +955,14 @@ function nt({
954
955
  open: s,
955
956
  onOpenChange: n
956
957
  }) {
957
- const [a, t] = b("groups"), [l, o] = b(""), [c, u] = b(null), [p, f] = b(!1), [d, m] = b(null), { tokenProps: g } = U(), { currentUser: v } = os(), N = ja(), w = (v == null ? void 0 : v.type) === "tenant", C = g == null ? void 0 : g.tenantId, { groups: O, isLoading: R, refetch: G } = ea({
958
+ const [a, t] = b("groups"), [l, o] = b(""), [c, u] = b(null), [p, f] = b(!1), [d, m] = b(null), { tokenProps: g } = U(), { currentUser: v } = os(), N = ja(), w = (v == null ? void 0 : v.type) === "tenant", C = g == null ? void 0 : g.tenantId, { groups: R, isLoading: O, refetch: G } = ea({
958
959
  type: w ? "TENANT_GROUP" : "all",
959
960
  tenantId: w ? C : void 0,
960
961
  includeMembers: !1
961
- }), L = O.filter(
962
+ }), A = R.filter(
962
963
  (x) => {
963
- var V;
964
- return x.name.toLowerCase().includes(l.toLowerCase()) || ((V = x.description) == null ? void 0 : V.toLowerCase().includes(l.toLowerCase()));
964
+ var Q;
965
+ return x.name.toLowerCase().includes(l.toLowerCase()) || ((Q = x.description) == null ? void 0 : Q.toLowerCase().includes(l.toLowerCase()));
965
966
  }
966
967
  ), F = async () => {
967
968
  if (d)
@@ -975,14 +976,14 @@ function nt({
975
976
  }, j = () => {
976
977
  t("groups"), G();
977
978
  };
978
- return /* @__PURE__ */ r(I, { children: [
979
- /* @__PURE__ */ e(ke, { open: s, onOpenChange: n, children: /* @__PURE__ */ r(Le, { className: "max-w-4xl max-h-[80vh]", children: [
979
+ return /* @__PURE__ */ r(E, { children: [
980
+ /* @__PURE__ */ e(ke, { open: s, onOpenChange: n, children: /* @__PURE__ */ r(Ae, { className: "max-w-4xl max-h-[80vh]", children: [
980
981
  /* @__PURE__ */ r(Ie, { children: [
981
982
  /* @__PURE__ */ r(Ee, { className: "flex items-center gap-2", children: [
982
983
  /* @__PURE__ */ e($, { className: "h-5 w-5" }),
983
984
  "Group Management"
984
985
  ] }),
985
- /* @__PURE__ */ e(Ye, { children: "Manage your groups, create new groups, and control group membership" })
986
+ /* @__PURE__ */ e(Xe, { children: "Manage your groups, create new groups, and control group membership" })
986
987
  ] }),
987
988
  /* @__PURE__ */ r(as, { value: a, onValueChange: t, className: "mt-4", children: [
988
989
  /* @__PURE__ */ r(ts, { className: "grid w-full grid-cols-2", children: [
@@ -991,7 +992,7 @@ function nt({
991
992
  "Groups"
992
993
  ] }),
993
994
  /* @__PURE__ */ r(oe, { value: "create", className: "flex items-center gap-2", children: [
994
- /* @__PURE__ */ e(Ae, { className: "h-4 w-4" }),
995
+ /* @__PURE__ */ e(Le, { className: "h-4 w-4" }),
995
996
  "Create Group"
996
997
  ] })
997
998
  ] }),
@@ -1008,11 +1009,11 @@ function nt({
1008
1009
  }
1009
1010
  )
1010
1011
  ] }),
1011
- /* @__PURE__ */ e(we, { className: "h-[400px]", children: R ? /* @__PURE__ */ e("div", { className: "space-y-3", children: [1, 2, 3].map((x) => /* @__PURE__ */ e(xe, { className: "h-24 w-full" }, x)) }) : L.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
1012
+ /* @__PURE__ */ e(we, { className: "h-[400px]", children: O ? /* @__PURE__ */ e("div", { className: "space-y-3", children: [1, 2, 3].map((x) => /* @__PURE__ */ e(xe, { className: "h-24 w-full" }, x)) }) : A.length === 0 ? /* @__PURE__ */ r("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
1012
1013
  /* @__PURE__ */ e($, { className: "h-12 w-12 mb-3 opacity-50" }),
1013
1014
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: "No groups found" }),
1014
1015
  /* @__PURE__ */ e("p", { className: "text-xs mt-1", children: l ? "Try a different search" : "Create your first group to get started" })
1015
- ] }) : /* @__PURE__ */ e("div", { className: "space-y-3", children: L.map((x) => /* @__PURE__ */ e(
1016
+ ] }) : /* @__PURE__ */ e("div", { className: "space-y-3", children: A.map((x) => /* @__PURE__ */ e(
1016
1017
  ot,
1017
1018
  {
1018
1019
  group: x,
@@ -1064,8 +1065,8 @@ function nt({
1064
1065
  onClick: F,
1065
1066
  disabled: N.isPending,
1066
1067
  className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
1067
- children: N.isPending ? /* @__PURE__ */ r(I, { children: [
1068
- /* @__PURE__ */ e(_, { className: "mr-2 h-4 w-4 animate-spin" }),
1068
+ children: N.isPending ? /* @__PURE__ */ r(E, { children: [
1069
+ /* @__PURE__ */ e(q, { className: "mr-2 h-4 w-4 animate-spin" }),
1069
1070
  "Deleting..."
1070
1071
  ] }) : "Delete Group"
1071
1072
  }
@@ -1127,42 +1128,42 @@ function ot({
1127
1128
  ] })
1128
1129
  ] }) });
1129
1130
  }
1130
- function pt() {
1131
- var _e, $e, je;
1131
+ function gt() {
1132
+ var qe, $e, je;
1132
1133
  const {
1133
1134
  authToken: s,
1134
1135
  tokenProps: n,
1135
1136
  id: a
1136
- } = U(), { isLocalDev: t } = aa(), { permissions: l } = ta(), o = ra(), { isLoading: c } = na();
1137
+ } = U(), { isLocalDev: t } = aa(), { permissions: l } = Sa(), o = ta(), { isLoading: c } = ra();
1137
1138
  y((i) => i.theme);
1138
1139
  const u = y((i) => i.lenses), p = y((i) => i.selectedLensId), f = u == null ? void 0 : u.find((i) => i.id === p), d = y((i) => i.dashboard);
1139
1140
  y((i) => i.selectedSheetId);
1140
1141
  const m = y(
1141
1142
  (i) => i.isDashboardEditing
1142
- ), { setDashboardTitle: g } = y((i) => i.actions), [v, N] = b(!1), [w, C] = b(!1), [O, R] = b(!1), [G, L] = b(!1), [F, P] = b(null), [j, x] = b(!1), V = y((i) => i.isDashboardPanelOpen), de = y(
1143
+ ), { setDashboardTitle: g } = y((i) => i.actions), [v, N] = b(!1), [w, C] = b(!1), [R, O] = b(!1), [G, A] = b(!1), [F, P] = b(null), [j, x] = b(!1), Q = y((i) => i.isDashboardPanelOpen), de = y(
1143
1144
  (i) => i.actions.setIsDashboardPanelOpen
1144
1145
  ), ue = y((i) => i.filterValues), D = y((i) => i.isVisualEditing);
1145
- Qe((i) => i.card);
1146
+ Ve((i) => i.card);
1146
1147
  const h = re(
1147
1148
  (i) => i.selectedDashboard
1148
1149
  ), S = re(
1149
1150
  (i) => i.initialDashboard
1150
1151
  );
1151
- re((i) => i.selectedVisual), y((i) => i.selectedFrameId), Qe((i) => i.frame);
1152
- const E = h ? ($e = h == null ? void 0 : h.permissions) == null ? void 0 : $e.canEdit : (_e = S == null ? void 0 : S.permissions) == null ? void 0 : _e.canEdit, z = y((i) => i.showFilters), Z = y(
1152
+ re((i) => i.selectedVisual), y((i) => i.selectedFrameId), Ve((i) => i.frame);
1153
+ const I = h ? ($e = h == null ? void 0 : h.permissions) == null ? void 0 : $e.canEdit : (qe = S == null ? void 0 : S.permissions) == null ? void 0 : qe.canEdit, _ = y((i) => i.showFilters), Y = y(
1153
1154
  (i) => i.showDashboardJSON
1154
- ), Q = y((i) => i.onSaveFunction), Cs = y(
1155
+ ), V = y((i) => i.onSaveFunction), Cs = y(
1155
1156
  (i) => i.actions.setShowFilters
1156
- ), { setIsDashboardEditing: Oe, setShowDashboardJSON: Re } = y(
1157
+ ), { setIsDashboardEditing: Re, setShowDashboardJSON: Oe } = y(
1157
1158
  (i) => i.actions
1158
1159
  ), { setInitialDashboard: Ue, clearSelectedDashboard: Ds } = re(
1159
1160
  (i) => i.actions
1160
- ), { resources: ee } = oa(ve.DASHBOARD), { currentUser: Ss } = os(), Ms = ia(Ss), H = h || S, ze = H ? {
1161
+ ), { resources: ee } = na(ve.DASHBOARD), { currentUser: Ss } = os(), Ms = oa(Ss), H = h || S, _e = H ? {
1161
1162
  id: H.id,
1162
1163
  title: (d == null ? void 0 : d.title) || H.title || "Dashboard"
1163
- } : null, { handleAddNewFrame: ks } = la(), [B, me] = b(!1), [As, se] = b(!1), ae = ca(ve.DASHBOARD), [K, he] = b(
1164
+ } : null, { handleAddNewFrame: ks } = ia(), [K, me] = b(!1), [Ls, se] = b(!1), ae = la(ve.DASHBOARD), [B, he] = b(
1164
1165
  null
1165
- ), Ls = async (i, T) => {
1166
+ ), As = async (i, T) => {
1166
1167
  if (!(d != null && d.id)) {
1167
1168
  console.log("No dashboard ID found");
1168
1169
  return;
@@ -1178,15 +1179,15 @@ function pt() {
1178
1179
  },
1179
1180
  {
1180
1181
  onSuccess: () => {
1181
- console.log("Dashboard title updated successfully"), A.success("Dashboard title updated");
1182
+ console.log("Dashboard title updated successfully"), L.success("Dashboard title updated");
1182
1183
  },
1183
1184
  onError: (J) => {
1184
- console.error("Failed to update dashboard title:", J), A.error("Failed to update dashboard title"), g(T);
1185
+ console.error("Failed to update dashboard title:", J), L.error("Failed to update dashboard title"), g(T);
1185
1186
  }
1186
1187
  }
1187
1188
  );
1188
1189
  };
1189
- Na(() => {
1190
+ ba(() => {
1190
1191
  if (ee && ee.length > 0) {
1191
1192
  const i = d == null ? void 0 : d.id;
1192
1193
  if (i) {
@@ -1197,48 +1198,48 @@ function pt() {
1197
1198
  }
1198
1199
  }
1199
1200
  }, [ee, d == null ? void 0 : d.id, Ue]);
1200
- const te = n.orgUserId || n.tenantId, Is = m && !D && te && E, { setDashboard: Es } = y((i) => i.actions), Ts = () => {
1201
- Oe(!0);
1201
+ const te = n.orgUserId || n.tenantId, Is = m && !D && te && I, { setDashboard: Es } = y((i) => i.actions), Ts = () => {
1202
+ Re(!0);
1202
1203
  }, pe = () => {
1203
- Oe(!1), Re(!1), he(null);
1204
+ Re(!1), Oe(!1), he(null);
1204
1205
  };
1205
- wa(
1206
+ ya(
1206
1207
  m,
1207
1208
  d,
1208
- K,
1209
+ B,
1209
1210
  (i) => he(i)
1210
1211
  );
1211
- const Ps = () => K ? JSON.stringify(d) !== JSON.stringify(K) : !1, Gs = () => {
1212
+ const Ps = () => B ? JSON.stringify(d) !== JSON.stringify(B) : !1, Gs = () => {
1212
1213
  Ps() ? se(!0) : pe();
1213
1214
  }, Fs = async () => {
1214
1215
  await ge({ closeAfterSave: !0 });
1215
- }, Os = () => {
1216
- K && Es(K), pe(), se(!1);
1216
+ }, Rs = () => {
1217
+ B && Es(B), pe(), se(!1);
1217
1218
  };
1218
1219
  async function ge(i) {
1219
1220
  const T = (i == null ? void 0 : i.closeAfterSave) ?? j;
1220
1221
  x(T), T && se(!1);
1221
- const J = ba(d);
1222
- L(!0), P(null), me(!0);
1223
- const zs = {
1222
+ const J = va(d);
1223
+ A(!0), P(null), me(!0);
1224
+ const _s = {
1224
1225
  template: d
1225
1226
  };
1226
1227
  ae.mutate(
1227
1228
  {
1228
1229
  resourceId: d.id,
1229
- data: zs
1230
+ data: _s
1230
1231
  },
1231
1232
  {
1232
1233
  onSuccess: () => {
1233
- me(!1), A.success("Dashboard saved!"), he(J), L(!1), x(!1), T && pe();
1234
+ me(!1), L.success("Dashboard saved!"), he(J), A(!1), x(!1), T && pe();
1234
1235
  },
1235
1236
  onError: () => {
1236
- me(!1), P("Failed to save dashboard. Please try again."), A.error("Failed to save dashboard");
1237
+ me(!1), P("Failed to save dashboard. Please try again."), L.error("Failed to save dashboard");
1237
1238
  }
1238
1239
  }
1239
1240
  );
1240
1241
  }
1241
- async function Rs() {
1242
+ async function Os() {
1242
1243
  if (N(!0), !p || !f) return;
1243
1244
  const i = JSON.stringify(d), T = {
1244
1245
  ...f,
@@ -1249,11 +1250,11 @@ function pt() {
1249
1250
  n.apiServiceUrl,
1250
1251
  T,
1251
1252
  s == null ? void 0 : s.accessToken
1252
- ), A.success("Lens saved"), Q == null || Q(d), N(!1);
1253
+ ), L.success("Lens saved"), V == null || V(d), N(!1);
1253
1254
  }
1254
- const qe = (f == null ? void 0 : f.name) || d.title;
1255
+ const ze = (f == null ? void 0 : f.name) || d.title;
1255
1256
  ae.isPending && console.log("Title during update:", {
1256
- title: qe,
1257
+ title: ze,
1257
1258
  dashboardStateTitle: d.title,
1258
1259
  dashboardId: d == null ? void 0 : d.id,
1259
1260
  currentLensName: f == null ? void 0 : f.name
@@ -1266,47 +1267,47 @@ function pt() {
1266
1267
  role: "dashboard-controls",
1267
1268
  children: [
1268
1269
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
1269
- Us && /* @__PURE__ */ r(I, { children: [
1270
+ Us && /* @__PURE__ */ r(E, { children: [
1270
1271
  /* @__PURE__ */ e(
1271
- q,
1272
+ z,
1272
1273
  {
1273
1274
  "aria-label": "Manage Dashboards",
1274
1275
  tooltip: "Manage Dashboards",
1275
1276
  onClick: () => {
1276
- de(!V);
1277
+ de(!Q);
1277
1278
  },
1278
1279
  className: "h-7 p-2",
1279
1280
  children: /* @__PURE__ */ e(ka, { className: "h-4 w-4" })
1280
1281
  }
1281
1282
  ),
1282
1283
  o && !D && /* @__PURE__ */ e(
1283
- q,
1284
+ z,
1284
1285
  {
1285
1286
  "aria-label": "Dashboard Hub",
1286
1287
  tooltip: "Dashboard Hub",
1287
1288
  onClick: () => Ds(),
1288
1289
  className: "h-7 p-2",
1289
- children: /* @__PURE__ */ e(Ze, { className: "h-4 w-4" })
1290
+ children: /* @__PURE__ */ e(Ye, { className: "h-4 w-4" })
1290
1291
  }
1291
1292
  )
1292
1293
  ] }),
1293
1294
  !D && o && (c ? /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
1294
- /* @__PURE__ */ e(_, { className: "h-3 w-3 animate-spin text-muted-foreground" }),
1295
+ /* @__PURE__ */ e(q, { className: "h-3 w-3 animate-spin text-muted-foreground" }),
1295
1296
  /* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground", children: "Loading..." })
1296
1297
  ] }) : /* @__PURE__ */ e(
1297
- da,
1298
+ ca,
1298
1299
  {
1299
- value: qe || "Untitled Dashboard",
1300
+ value: ze || "Untitled Dashboard",
1300
1301
  onSave: (i) => {
1301
1302
  console.log("EditableText onSave called:", {
1302
1303
  newTitle: i,
1303
- canEditDashboard: E,
1304
+ canEditDashboard: I,
1304
1305
  dashboardId: d == null ? void 0 : d.id
1305
1306
  });
1306
1307
  const T = (d == null ? void 0 : d.title) || "";
1307
- g(i), Ls(i, T);
1308
+ g(i), As(i, T);
1308
1309
  },
1309
- isEditable: E && !f,
1310
+ isEditable: I && !f,
1310
1311
  displayClassName: "text-sm font-medium",
1311
1312
  inputClassName: "text-sm font-medium",
1312
1313
  placeholder: "Dashboard Title",
@@ -1315,72 +1316,72 @@ function pt() {
1315
1316
  ))
1316
1317
  ] }),
1317
1318
  /* @__PURE__ */ r("div", { className: "flex items-center gap-2", children: [
1318
- D && /* @__PURE__ */ r(I, { children: [
1319
- /* @__PURE__ */ e(xa, { className: "mr-2" }),
1320
- /* @__PURE__ */ e(Ca, { className: "h-7" })
1319
+ D && /* @__PURE__ */ r(E, { children: [
1320
+ /* @__PURE__ */ e(wa, { className: "mr-2" }),
1321
+ /* @__PURE__ */ e(xa, { className: "h-7" })
1321
1322
  ] }),
1322
- t && !D && /* @__PURE__ */ r(I, { children: [
1323
+ t && !D && /* @__PURE__ */ r(E, { children: [
1323
1324
  /* @__PURE__ */ e(
1324
- q,
1325
+ z,
1325
1326
  {
1326
1327
  tooltip: "Copy Token",
1327
1328
  onClick: () => {
1328
1329
  var i;
1329
- s != null && s.accessToken && ((i = navigator == null ? void 0 : navigator.clipboard) != null && i.writeText ? navigator.clipboard.writeText(s.accessToken).then(() => A.success("Token copied to clipboard")).catch(() => A.error("Unable to copy token")) : A.error("Clipboard not available"));
1330
+ s != null && s.accessToken && ((i = navigator == null ? void 0 : navigator.clipboard) != null && i.writeText ? navigator.clipboard.writeText(s.accessToken).then(() => L.success("Token copied to clipboard")).catch(() => L.error("Unable to copy token")) : L.error("Clipboard not available"));
1330
1331
  },
1331
1332
  className: "h-7 p-2",
1332
- children: /* @__PURE__ */ e(ua, { className: "h-4 w-4" })
1333
+ children: /* @__PURE__ */ e(da, { className: "h-4 w-4" })
1333
1334
  }
1334
1335
  ),
1335
1336
  /* @__PURE__ */ e(
1336
- q,
1337
+ z,
1337
1338
  {
1338
1339
  tooltip: "Invalidate Token",
1339
- onClick: () => ma(n.apiServiceUrl),
1340
+ onClick: () => ua(n.apiServiceUrl),
1340
1341
  className: "h-7 p-2",
1341
- children: /* @__PURE__ */ e(La, { className: "h-4 w-4" })
1342
+ children: /* @__PURE__ */ e(Aa, { className: "h-4 w-4" })
1342
1343
  }
1343
1344
  )
1344
1345
  ] }),
1345
- !D && o && /* @__PURE__ */ e(Ra, {}),
1346
- !D && o && /* @__PURE__ */ e(Da, {}),
1346
+ !D && o && /* @__PURE__ */ e(Oa, {}),
1347
+ !D && o && /* @__PURE__ */ e(Ca, {}),
1347
1348
  !D && o && Ms && /* @__PURE__ */ e(
1348
- q,
1349
+ z,
1349
1350
  {
1350
1351
  tooltip: "Manage Groups",
1351
- onClick: () => R(!0),
1352
+ onClick: () => O(!0),
1352
1353
  className: "h-7 p-2",
1353
1354
  children: /* @__PURE__ */ e($, { className: "h-4 w-4" })
1354
1355
  }
1355
1356
  ),
1356
1357
  !D && o && ((je = H == null ? void 0 : H.permissions) == null ? void 0 : je.canShare) && /* @__PURE__ */ e(
1357
- q,
1358
+ z,
1358
1359
  {
1359
1360
  tooltip: "Share Dashboard",
1360
1361
  onClick: () => C(!0),
1361
1362
  className: "h-7 p-2",
1362
- children: /* @__PURE__ */ e(ha, { className: "h-4 w-4" })
1363
+ children: /* @__PURE__ */ e(ma, { className: "h-4 w-4" })
1363
1364
  }
1364
1365
  ),
1365
- !z && !D && m && l.canUseFilters && o && /* @__PURE__ */ e(
1366
+ !_ && !D && m && l.canUseFilters && o && /* @__PURE__ */ e(
1366
1367
  k,
1367
1368
  {
1368
1369
  className: "h-7 p-2",
1369
1370
  variant: "outline",
1370
1371
  onClick: () => Cs(!0),
1371
1372
  size: "sm",
1372
- children: /* @__PURE__ */ e(pa, { className: "h-4 w-4" })
1373
+ children: /* @__PURE__ */ e(ha, { className: "h-4 w-4" })
1373
1374
  }
1374
1375
  ),
1375
1376
  m && !D && te && t && o && /* @__PURE__ */ e(Fa, {}),
1376
- !D && te && t && o && /* @__PURE__ */ e(Oa, {}),
1377
+ !D && te && t && o && /* @__PURE__ */ e(Ra, {}),
1377
1378
  m && !D && te && f && t && o && /* @__PURE__ */ r(
1378
1379
  k,
1379
1380
  {
1380
1381
  className: "h-7 p-2",
1381
1382
  variant: "secondary",
1382
1383
  disabled: v,
1383
- onClick: Rs,
1384
+ onClick: Os,
1384
1385
  size: "sm",
1385
1386
  children: [
1386
1387
  /* @__PURE__ */ e(He, { className: "mr-2 h-4 w-4" }),
@@ -1397,12 +1398,12 @@ function pt() {
1397
1398
  disabled: !m,
1398
1399
  onClick: () => ks(),
1399
1400
  children: [
1400
- /* @__PURE__ */ e(Ae, { className: "mr-2 h-4 w-4" }),
1401
+ /* @__PURE__ */ e(Le, { className: "mr-2 h-4 w-4" }),
1401
1402
  "Visual"
1402
1403
  ]
1403
1404
  }
1404
1405
  ),
1405
- !D && !m && l.canEdit && o && /* @__PURE__ */ r(
1406
+ !D && !m && I && o && /* @__PURE__ */ r(
1406
1407
  k,
1407
1408
  {
1408
1409
  variant: "outline",
@@ -1410,7 +1411,7 @@ function pt() {
1410
1411
  onClick: Ts,
1411
1412
  size: "sm",
1412
1413
  children: [
1413
- /* @__PURE__ */ e(ga, { className: "mr-2 h-4 w-4" }),
1414
+ /* @__PURE__ */ e(pa, { className: "mr-2 h-4 w-4" }),
1414
1415
  "Edit"
1415
1416
  ]
1416
1417
  }
@@ -1419,12 +1420,12 @@ function pt() {
1419
1420
  k,
1420
1421
  {
1421
1422
  className: "h-7 p-2",
1422
- disabled: B,
1423
+ disabled: K,
1423
1424
  onClick: () => ge(),
1424
1425
  size: "sm",
1425
1426
  children: [
1426
- B ? /* @__PURE__ */ e(_, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(He, { className: "mr-2 h-4 w-4" }),
1427
- B ? "Saving..." : "Save"
1427
+ K ? /* @__PURE__ */ e(q, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(He, { className: "mr-2 h-4 w-4" }),
1428
+ K ? "Saving..." : "Save"
1428
1429
  ]
1429
1430
  }
1430
1431
  ),
@@ -1432,10 +1433,10 @@ function pt() {
1432
1433
  k,
1433
1434
  {
1434
1435
  className: "h-7 p-2",
1435
- onClick: () => Re(!Z),
1436
+ onClick: () => Oe(!Y),
1436
1437
  size: "sm",
1437
1438
  variant: "ghost",
1438
- children: /* @__PURE__ */ e(fa, { className: "h-4 w-4" })
1439
+ children: /* @__PURE__ */ e(ga, { className: "h-4 w-4" })
1439
1440
  }
1440
1441
  ) }),
1441
1442
  !D && t && /* @__PURE__ */ e(Ta, {}),
@@ -1451,10 +1452,10 @@ function pt() {
1451
1452
  ]
1452
1453
  }
1453
1454
  ),
1454
- w && ze && /* @__PURE__ */ e(
1455
- va,
1455
+ w && _e && /* @__PURE__ */ e(
1456
+ fa,
1456
1457
  {
1457
- resource: ze,
1458
+ resource: _e,
1458
1459
  resourceType: ve.DASHBOARD,
1459
1460
  onClose: () => C(!1)
1460
1461
  }
@@ -1462,8 +1463,8 @@ function pt() {
1462
1463
  /* @__PURE__ */ e(
1463
1464
  nt,
1464
1465
  {
1465
- open: O,
1466
- onOpenChange: R
1466
+ open: R,
1467
+ onOpenChange: O
1467
1468
  }
1468
1469
  ),
1469
1470
  /* @__PURE__ */ e(
@@ -1471,19 +1472,19 @@ function pt() {
1471
1472
  {
1472
1473
  open: G,
1473
1474
  onOpenChange: (i) => {
1474
- !i && B && !F || (L(i), i || (P(null), x(!1)));
1475
+ !i && K && !F || (A(i), i || (P(null), x(!1)));
1475
1476
  },
1476
1477
  children: /* @__PURE__ */ r(ls, { className: "max-w-sm", children: [
1477
1478
  /* @__PURE__ */ r(cs, { children: [
1478
1479
  /* @__PURE__ */ e(ds, { children: F ? "Save failed" : "Saving dashboard" }),
1479
1480
  /* @__PURE__ */ e(us, { className: "pt-2", children: F ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." })
1480
1481
  ] }),
1481
- /* @__PURE__ */ e(ms, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: F ? /* @__PURE__ */ r(I, { children: [
1482
+ /* @__PURE__ */ e(ms, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: F ? /* @__PURE__ */ r(E, { children: [
1482
1483
  /* @__PURE__ */ e(
1483
1484
  hs,
1484
1485
  {
1485
1486
  onClick: () => {
1486
- L(!1), P(null), x(!1);
1487
+ A(!1), P(null), x(!1);
1487
1488
  },
1488
1489
  className: "m-0",
1489
1490
  children: "Close"
@@ -1503,7 +1504,7 @@ function pt() {
1503
1504
  disabled: !0,
1504
1505
  className: "m-0 cursor-default",
1505
1506
  children: [
1506
- /* @__PURE__ */ e(_, { className: "mr-2 h-4 w-4 animate-spin" }),
1507
+ /* @__PURE__ */ e(q, { className: "mr-2 h-4 w-4 animate-spin" }),
1507
1508
  "Saving..."
1508
1509
  ]
1509
1510
  }
@@ -1512,13 +1513,13 @@ function pt() {
1512
1513
  }
1513
1514
  ),
1514
1515
  /* @__PURE__ */ e(
1515
- Sa,
1516
+ Da,
1516
1517
  {
1517
- open: As,
1518
+ open: Ls,
1518
1519
  onOpenChange: se,
1519
1520
  onSave: Fs,
1520
- onDiscard: Os,
1521
- isSaving: B
1521
+ onDiscard: Rs,
1522
+ isSaving: K
1522
1523
  }
1523
1524
  )
1524
1525
  ] })
@@ -1527,5 +1528,5 @@ function pt() {
1527
1528
  );
1528
1529
  }
1529
1530
  export {
1530
- pt as default
1531
+ gt as default
1531
1532
  };