react-semaphor 0.1.211 → 0.1.212

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 (28) hide show
  1. package/dist/chunks/{dashboard-controls-CnDq9Uh_.js → dashboard-controls-BcpwRqRu.js} +13 -8
  2. package/dist/chunks/{dashboard-controls-7KpXzAWL.js → dashboard-controls-DG0FT__o.js} +373 -359
  3. package/dist/chunks/{dashboard-json-dqey5VK0.js → dashboard-json-C1b81ShY.js} +1 -1
  4. package/dist/chunks/{dashboard-json-stWvjp2O.js → dashboard-json-F8qwUIWM.js} +1 -1
  5. package/dist/chunks/{dashboard-summary-settings-dialog-DuxhidK1.js → dashboard-summary-settings-dialog-CsjLFOn-.js} +1 -1
  6. package/dist/chunks/{dashboard-summary-settings-dialog-DPEe6XBC.js → dashboard-summary-settings-dialog-yytNDqsJ.js} +1 -1
  7. package/dist/chunks/{edit-dashboard-visual-D_XPr8f8.js → edit-dashboard-visual-B-qAacmt.js} +1 -1
  8. package/dist/chunks/{edit-dashboard-visual-CQAk_UsI.js → edit-dashboard-visual-C-Y0fhBE.js} +2 -2
  9. package/dist/chunks/{editor-action-buttons-D34_GSZu.js → editor-action-buttons-BddCK22U.js} +2 -2
  10. package/dist/chunks/{editor-action-buttons-CH7W6KdH.js → editor-action-buttons-Dr9s7Z0u.js} +1 -1
  11. package/dist/chunks/{index-BfiIPyeS.js → index-irqsC0zR.js} +1 -1
  12. package/dist/chunks/{index-BDS2sWhv.js → index-tdtX3LgC.js} +4 -4
  13. package/dist/chunks/{notification-bell-hijGST9g.js → notification-bell-CRzJdHm5.js} +2 -2
  14. package/dist/chunks/{notification-bell-Cu3qDd9V.js → notification-bell-Ci1RHooZ.js} +137 -135
  15. package/dist/chunks/{resource-management-panel-BvHqslqC.js → resource-management-panel-CaKSsCiq.js} +3 -3
  16. package/dist/chunks/{resource-management-panel-gK3a6OEj.js → resource-management-panel-cwMyqyn1.js} +1 -1
  17. package/dist/chunks/{use-role-aware-display-preferences-a5FH9Y0k.js → use-role-aware-display-preferences-CImfZXy5.js} +1 -1
  18. package/dist/chunks/{use-role-aware-display-preferences-BlR29aKQ.js → use-role-aware-display-preferences-D5eZpiQS.js} +1 -1
  19. package/dist/chunks/{use-visual-utils-ptPsQ3nC.js → use-visual-utils-0xqPjTL6.js} +1 -1
  20. package/dist/chunks/{use-visual-utils-B11AA2fd.js → use-visual-utils-BAVRApHw.js} +1 -1
  21. package/dist/dashboard/index.cjs +1 -1
  22. package/dist/dashboard/index.js +1 -1
  23. package/dist/index.cjs +1 -1
  24. package/dist/index.js +5 -5
  25. package/dist/surfboard/index.cjs +1 -1
  26. package/dist/surfboard/index.js +2 -2
  27. package/dist/types/main.d.ts +3 -1
  28. package/package.json +1 -1
@@ -1,21 +1,32 @@
1
1
  import { jsxs as a, jsx as e, Fragment as k } from "react/jsx-runtime";
2
- import { bS as oe, cS as Na, u as w, c8 as ze, c9 as $e, B as L, cb as Be, cc as q, cT as Ke, Z as ws, l as P, m as Qe, cU as Sa, c7 as We, n as Je, o as Ze, p as Xe, q as xs, L as Ue, Q as re, G as wa, ac as j, cV as xa, cg as Da, cW as Ca, cX as gs, cY as Ds, c as Z, cZ as Cs, U as be, c_ as ye, I as E, c$ as Ls, cH as La, d0 as Ea, H, cf as V, d1 as Ye, d2 as Aa, d3 as ka, d4 as Ge, d5 as Ma, d6 as Oa, d7 as Es, d8 as As, d9 as ge, da as ve, cD as Re, cm as Pe, db as Fe, ch as ks, dc as je, dd as Ms, e as Os, de as Ia, cp as Is, cq as Ts, cr as _s, cs as Us, ct as Gs, cu as Rs, cv as Ps, cw as qe, c6 as Ta, df as _a, bG as Ua, a1 as vs, bO as pe, dg as Ga, bP as Ra, as as Oe, dh as Pa, di as Fa, dj as ja, bj as qa, dk as Ha, dl as Va, bZ as za, b_ as $a, b$ as Ba, dm as Ka, c1 as Qa, cd as Wa, a_ as Ja, dn as Za, dp as Xa, dq as Ya, dr as et, ds as st, dt as at, ca as tt, ae as nt, cj as rt, du as ot, au as it, af as lt, ay as ct } from "./index-BDS2sWhv.js";
2
+ import { bS as Z, cS as Na, u as w, c8 as $e, c9 as Be, B as L, cb as Ke, cc as H, cT as Qe, Z as xs, l as P, m as We, cU as Sa, c7 as Je, n as Xe, o as Ze, p as Ye, q as Ds, L as Ge, Q as oe, G as wa, ac as j, cV as xa, cg as Da, cW as Ca, cX as vs, cY as Cs, c as X, cZ as Ls, U as be, c_ as ye, I as E, c$ as Es, cH as La, d0 as Ea, H as q, cf as V, d1 as es, d2 as Aa, d3 as ka, d4 as Re, d5 as Ma, d6 as Oa, d7 as As, d8 as ks, d9 as ge, da as ve, cD as Pe, cm as Fe, db as je, ch as Ms, dc as He, dd as Os, e as Is, de as Ia, cp as Ts, cq as _s, cr as Us, cs as Gs, ct as Rs, cu as Ps, cv as Fs, cw as qe, c6 as Ta, df as _a, bG as Ua, a1 as bs, bO as pe, dg as Ga, bP as Ra, as as Ie, dh as Pa, di as Fa, dj as ja, bj as Ha, dk as qa, dl as Va, bZ as za, b_ as $a, b$ as Ba, dm as Ka, c1 as Qa, cd as Wa, a_ as Ja, dn as Xa, dp as Za, dq as Ya, dr as et, ds as st, dt as at, ca as tt, ae as rt, cj as nt, du as ot, au as it, af as lt, ay as ct } from "./index-tdtX3LgC.js";
3
3
  import * as _ from "react";
4
- import Fs, { useState as S, useMemo as fe, useEffect as dt, useCallback as ut } from "react";
4
+ import js, { useState as S, useMemo as fe, useEffect as dt, useCallback as ut } from "react";
5
5
  import "react-dom";
6
- import { b as mt, u as ht, c as pt, A as ft, V as gt, N as vt, U as bt } from "./notification-bell-Cu3qDd9V.js";
7
- import { u as yt } from "./use-role-aware-display-preferences-a5FH9Y0k.js";
6
+ import { b as mt, u as ht, c as pt, A as ft, V as gt, N as vt, U as bt } from "./notification-bell-Ci1RHooZ.js";
7
+ import { u as yt } from "./use-role-aware-display-preferences-CImfZXy5.js";
8
8
  import { d as Nt } from "./date-formatter-Y8Za1ib3.js";
9
- import { C as St, D as wt } from "./dashboard-summary-settings-dialog-DPEe6XBC.js";
10
- import { u as xt, s as Ie } from "./normalize-dashboard-for-dirty-check-XKgH3GFX.js";
11
- import { S as bs } from "./editor-action-buttons-D34_GSZu.js";
9
+ import { C as St, D as wt } from "./dashboard-summary-settings-dialog-yytNDqsJ.js";
10
+ import { u as xt, s as Te } from "./normalize-dashboard-for-dirty-check-XKgH3GFX.js";
11
+ import { S as ys } from "./editor-action-buttons-BddCK22U.js";
12
12
  /**
13
13
  * @license lucide-react v0.453.0 - ISC
14
14
  *
15
15
  * This source code is licensed under the ISC license.
16
16
  * See the LICENSE file in the root directory of this source tree.
17
17
  */
18
- const Dt = oe("Glasses", [
18
+ const Dt = Z("FilterX", [
19
+ ["path", { d: "M13.013 3H2l8 9.46V19l4 2v-8.54l.9-1.055", key: "1fi1da" }],
20
+ ["path", { d: "m22 3-5 5", key: "12jva0" }],
21
+ ["path", { d: "m17 3 5 5", key: "k36vhe" }]
22
+ ]);
23
+ /**
24
+ * @license lucide-react v0.453.0 - ISC
25
+ *
26
+ * This source code is licensed under the ISC license.
27
+ * See the LICENSE file in the root directory of this source tree.
28
+ */
29
+ const Ct = Z("Glasses", [
19
30
  ["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
20
31
  ["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
21
32
  ["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
@@ -28,7 +39,7 @@ const Dt = oe("Glasses", [
28
39
  * This source code is licensed under the ISC license.
29
40
  * See the LICENSE file in the root directory of this source tree.
30
41
  */
31
- const Ct = oe("Menu", [
42
+ const Lt = Z("Menu", [
32
43
  ["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }],
33
44
  ["line", { x1: "4", x2: "20", y1: "6", y2: "6", key: "1owob3" }],
34
45
  ["line", { x1: "4", x2: "20", y1: "18", y2: "18", key: "yk5zj1" }]
@@ -39,7 +50,7 @@ const Ct = oe("Menu", [
39
50
  * This source code is licensed under the ISC license.
40
51
  * See the LICENSE file in the root directory of this source tree.
41
52
  */
42
- const Lt = oe("Moon", [
53
+ const Et = Z("Moon", [
43
54
  ["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
44
55
  ]);
45
56
  /**
@@ -48,7 +59,7 @@ const Lt = oe("Moon", [
48
59
  * This source code is licensed under the ISC license.
49
60
  * See the LICENSE file in the root directory of this source tree.
50
61
  */
51
- const Et = oe("ShieldX", [
62
+ const At = Z("ShieldX", [
52
63
  [
53
64
  "path",
54
65
  {
@@ -65,7 +76,7 @@ const Et = oe("ShieldX", [
65
76
  * This source code is licensed under the ISC license.
66
77
  * See the LICENSE file in the root directory of this source tree.
67
78
  */
68
- const At = oe("Sun", [
79
+ const kt = Z("Sun", [
69
80
  ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
70
81
  ["path", { d: "M12 2v2", key: "tus03m" }],
71
82
  ["path", { d: "M12 20v2", key: "1lh1kg" }],
@@ -76,7 +87,7 @@ const At = oe("Sun", [
76
87
  ["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
77
88
  ["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
78
89
  ]);
79
- var He = { exports: {} }, Te = {};
90
+ var Ve = { exports: {} }, _e = {};
80
91
  /**
81
92
  * @license React
82
93
  * use-sync-external-store-shim.production.js
@@ -86,17 +97,17 @@ var He = { exports: {} }, Te = {};
86
97
  * This source code is licensed under the MIT license found in the
87
98
  * LICENSE file in the root directory of this source tree.
88
99
  */
89
- var ys;
90
- function kt() {
91
- if (ys) return Te;
92
- ys = 1;
93
- var s = Fs;
100
+ var Ns;
101
+ function Mt() {
102
+ if (Ns) return _e;
103
+ Ns = 1;
104
+ var s = js;
94
105
  function o(d, m) {
95
106
  return d === m && (d !== 0 || 1 / d === 1 / m) || d !== d && m !== m;
96
107
  }
97
- var t = typeof Object.is == "function" ? Object.is : o, n = s.useState, l = s.useEffect, c = s.useLayoutEffect, u = s.useDebugValue;
108
+ var t = typeof Object.is == "function" ? Object.is : o, r = s.useState, l = s.useEffect, c = s.useLayoutEffect, u = s.useDebugValue;
98
109
  function p(d, m) {
99
- var h = m(), b = n({ inst: { value: h, getSnapshot: m } }), y = b[0].inst, N = b[1];
110
+ var h = m(), b = r({ inst: { value: h, getSnapshot: m } }), y = b[0].inst, N = b[1];
100
111
  return c(
101
112
  function() {
102
113
  y.value = h, y.getSnapshot = m, g(y) && N({ inst: y });
@@ -125,9 +136,9 @@ function kt() {
125
136
  return m();
126
137
  }
127
138
  var i = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? v : p;
128
- return Te.useSyncExternalStore = s.useSyncExternalStore !== void 0 ? s.useSyncExternalStore : i, Te;
139
+ return _e.useSyncExternalStore = s.useSyncExternalStore !== void 0 ? s.useSyncExternalStore : i, _e;
129
140
  }
130
- var _e = {};
141
+ var Ue = {};
131
142
  /**
132
143
  * @license React
133
144
  * use-sync-external-store-shim.development.js
@@ -137,9 +148,9 @@ var _e = {};
137
148
  * This source code is licensed under the MIT license found in the
138
149
  * LICENSE file in the root directory of this source tree.
139
150
  */
140
- var Ns;
141
- function Mt() {
142
- return Ns || (Ns = 1, process.env.NODE_ENV !== "production" && function() {
151
+ var Ss;
152
+ function Ot() {
153
+ return Ss || (Ss = 1, process.env.NODE_ENV !== "production" && function() {
143
154
  function s(h, b) {
144
155
  return h === b && (h !== 0 || 1 / h === 1 / b) || h !== h && b !== b;
145
156
  }
@@ -182,31 +193,31 @@ function Mt() {
182
193
  return !0;
183
194
  }
184
195
  }
185
- function n(h, b) {
196
+ function r(h, b) {
186
197
  return b();
187
198
  }
188
199
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
189
- var l = Fs, c = typeof Object.is == "function" ? Object.is : s, u = l.useState, p = l.useEffect, g = l.useLayoutEffect, v = l.useDebugValue, i = !1, d = !1, m = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? n : o;
190
- _e.useSyncExternalStore = l.useSyncExternalStore !== void 0 ? l.useSyncExternalStore : m, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
191
- }()), _e;
200
+ var l = js, c = typeof Object.is == "function" ? Object.is : s, u = l.useState, p = l.useEffect, g = l.useLayoutEffect, v = l.useDebugValue, i = !1, d = !1, m = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : o;
201
+ Ue.useSyncExternalStore = l.useSyncExternalStore !== void 0 ? l.useSyncExternalStore : m, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
202
+ }()), Ue;
192
203
  }
193
- process.env.NODE_ENV === "production" ? He.exports = kt() : He.exports = Mt();
194
- var Ot = He.exports;
195
- function It() {
204
+ process.env.NODE_ENV === "production" ? Ve.exports = Mt() : Ve.exports = Ot();
205
+ var It = Ve.exports;
206
+ function Tt() {
196
207
  const { setTheme: s } = Na(), o = w(
197
208
  (t) => t.actions.setDashboardTheme
198
209
  );
199
- return /* @__PURE__ */ a(ze, { children: [
200
- /* @__PURE__ */ e($e, { asChild: !0, children: /* @__PURE__ */ a(L, { className: "h-7 p-2", variant: "ghost", size: "sm", children: [
210
+ return /* @__PURE__ */ a($e, { children: [
211
+ /* @__PURE__ */ e(Be, { asChild: !0, children: /* @__PURE__ */ a(L, { className: "h-7 p-2", variant: "ghost", size: "sm", children: [
201
212
  /* @__PURE__ */ e(
202
- At,
213
+ kt,
203
214
  {
204
215
  strokeWidth: 1.5,
205
216
  className: "h-4 w-4 rotate-0 scale-100 transition-all dark:-rotate-90 dark:scale-0"
206
217
  }
207
218
  ),
208
219
  /* @__PURE__ */ e(
209
- Lt,
220
+ Et,
210
221
  {
211
222
  strokeWidth: 1.5,
212
223
  className: "absolute h-4 w-4 rotate-90 scale-0 transition-all dark:rotate-0 dark:scale-100"
@@ -214,9 +225,9 @@ function It() {
214
225
  ),
215
226
  /* @__PURE__ */ e("span", { className: "sr-only", children: "Toggle theme" })
216
227
  ] }) }),
217
- /* @__PURE__ */ a(Be, { align: "end", children: [
228
+ /* @__PURE__ */ a(Ke, { align: "end", children: [
218
229
  /* @__PURE__ */ e(
219
- q,
230
+ H,
220
231
  {
221
232
  onClick: () => {
222
233
  s("light"), o("light");
@@ -225,7 +236,7 @@ function It() {
225
236
  }
226
237
  ),
227
238
  /* @__PURE__ */ e(
228
- q,
239
+ H,
229
240
  {
230
241
  onClick: () => {
231
242
  s("dark"), o("dark");
@@ -234,7 +245,7 @@ function It() {
234
245
  }
235
246
  ),
236
247
  /* @__PURE__ */ e(
237
- q,
248
+ H,
238
249
  {
239
250
  onClick: () => {
240
251
  s("system"), o("system");
@@ -245,23 +256,23 @@ function It() {
245
256
  ] })
246
257
  ] });
247
258
  }
248
- async function Tt(s, o, t, n, l) {
259
+ async function _t(s, o, t, r, l) {
249
260
  if (!l)
250
261
  return null;
251
262
  const c = JSON.stringify(t), u = `${s}/v1/lens`;
252
- return await Ke(u, l, {
263
+ return await Qe(u, l, {
253
264
  name: o,
254
265
  template: c,
255
- filterValues: n,
266
+ filterValues: r,
256
267
  operation: "create"
257
268
  });
258
269
  }
259
- async function Ve(s, o, t) {
270
+ async function ze(s, o, t) {
260
271
  if (!t)
261
272
  return null;
262
- const { id: n, template: l, filterValues: c, isDefault: u, shared: p } = o, g = `${s}/v1/lens`;
263
- return await Ke(g, t, {
264
- lensId: n,
273
+ const { id: r, template: l, filterValues: c, isDefault: u, shared: p } = o, g = `${s}/v1/lens`;
274
+ return await Qe(g, t, {
275
+ lensId: r,
265
276
  template: l,
266
277
  filterValues: c,
267
278
  isDefault: u,
@@ -269,20 +280,20 @@ async function Ve(s, o, t) {
269
280
  operation: "update"
270
281
  });
271
282
  }
272
- async function _t(s, o, t) {
283
+ async function Ut(s, o, t) {
273
284
  if (!t)
274
285
  return null;
275
- const n = `${s}/v1/lens`;
276
- return await Ke(n, t, {
286
+ const r = `${s}/v1/lens`;
287
+ return await Qe(r, t, {
277
288
  operation: "delete",
278
289
  lensId: o
279
290
  });
280
291
  }
281
- function Ut() {
282
- const [s, o] = S(""), [t, n] = S(!1), l = w((N) => N.lenses), { setLenses: c, setSelectedLensId: u } = ws(), [p, g] = S(!1), [v, i] = S(!1), d = w((N) => N.dashboard), m = w((N) => N.filterValues), { authToken: h, tokenProps: b } = P();
292
+ function Gt() {
293
+ const [s, o] = S(""), [t, r] = S(!1), l = w((N) => N.lenses), { setLenses: c, setSelectedLensId: u } = xs(), [p, g] = S(!1), [v, i] = S(!1), d = w((N) => N.dashboard), m = w((N) => N.filterValues), { authToken: h, tokenProps: b } = P();
283
294
  async function y() {
284
295
  g(!0);
285
- const N = await Tt(
296
+ const N = await _t(
286
297
  b.apiServiceUrl,
287
298
  s,
288
299
  d,
@@ -291,7 +302,7 @@ function Ut() {
291
302
  );
292
303
  N && (c([...l || [], N]), u(N.id), i(!1)), g(!1);
293
304
  }
294
- return /* @__PURE__ */ a(Qe, { open: v, onOpenChange: i, children: [
305
+ return /* @__PURE__ */ a(We, { open: v, onOpenChange: i, children: [
295
306
  /* @__PURE__ */ e(Sa, { asChild: !0, children: /* @__PURE__ */ a(
296
307
  L,
297
308
  {
@@ -299,20 +310,20 @@ function Ut() {
299
310
  className: "h-7 p-2",
300
311
  size: "sm",
301
312
  children: [
302
- /* @__PURE__ */ e(We, { className: "mr-2 h-4 w-4" }),
313
+ /* @__PURE__ */ e(Je, { className: "mr-2 h-4 w-4" }),
303
314
  "Lens"
304
315
  ]
305
316
  }
306
317
  ) }),
307
- /* @__PURE__ */ a(Je, { className: "sm:max-w-[425px]", children: [
318
+ /* @__PURE__ */ a(Xe, { className: "sm:max-w-[425px]", children: [
308
319
  /* @__PURE__ */ a(Ze, { children: [
309
- /* @__PURE__ */ e(Xe, { children: "Create Lens" }),
310
- /* @__PURE__ */ e(xs, { children: "Lenses are private by default and are only visible to you." })
320
+ /* @__PURE__ */ e(Ye, { children: "Create Lens" }),
321
+ /* @__PURE__ */ e(Ds, { children: "Lenses are private by default and are only visible to you." })
311
322
  ] }),
312
323
  /* @__PURE__ */ e("div", { className: "grid gap-4 py-4", children: /* @__PURE__ */ a("div", { className: "grid grid-cols-8 items-center gap-4", children: [
313
- /* @__PURE__ */ e(Ue, { className: "text-right", children: "Name" }),
324
+ /* @__PURE__ */ e(Ge, { className: "text-right", children: "Name" }),
314
325
  /* @__PURE__ */ e(
315
- re,
326
+ oe,
316
327
  {
317
328
  value: s,
318
329
  onChange: (N) => {
@@ -338,13 +349,13 @@ function Ut() {
338
349
  ] })
339
350
  ] });
340
351
  }
341
- function Gt() {
342
- const [s, o] = S(!1), t = w((d) => d.lenses), n = w((d) => d.selectedLensId), { setLenses: l, setSelectedLensId: c } = ws(), { authToken: u, tokenProps: p } = P();
352
+ function Rt() {
353
+ const [s, o] = S(!1), t = w((d) => d.lenses), r = w((d) => d.selectedLensId), { setLenses: l, setSelectedLensId: c } = xs(), { authToken: u, tokenProps: p } = P();
343
354
  async function g(d) {
344
355
  c(d);
345
356
  }
346
357
  async function v(d) {
347
- if (await _t(p.apiServiceUrl, d, u == null ? void 0 : u.accessToken)) {
358
+ if (await Ut(p.apiServiceUrl, d, u == null ? void 0 : u.accessToken)) {
348
359
  const h = t == null ? void 0 : t.filter((b) => b.id !== d);
349
360
  l(h || []), c("original");
350
361
  }
@@ -362,30 +373,30 @@ function Gt() {
362
373
  ...d,
363
374
  isDefault: !d.isDefault
364
375
  };
365
- await Ve(p.apiServiceUrl, h, u == null ? void 0 : u.accessToken);
376
+ await ze(p.apiServiceUrl, h, u == null ? void 0 : u.accessToken);
366
377
  const b = t == null ? void 0 : t.find((y) => y.isDefault);
367
378
  if (b && b.id !== d.id) {
368
379
  const y = {
369
380
  ...b,
370
381
  isDefault: !1
371
382
  };
372
- await Ve(p.apiServiceUrl, y, u == null ? void 0 : u.accessToken);
383
+ await ze(p.apiServiceUrl, y, u == null ? void 0 : u.accessToken);
373
384
  }
374
385
  }
375
- return /* @__PURE__ */ a(ze, { open: s, onOpenChange: o, children: [
376
- /* @__PURE__ */ e($e, { asChild: !0, children: /* @__PURE__ */ e(j, { tooltip: "Lenses", className: "h-7 p-2", children: /* @__PURE__ */ e(Dt, { className: "h-4 w-4" }) }) }),
377
- /* @__PURE__ */ a(Be, { align: "end", className: "w-60", children: [
386
+ return /* @__PURE__ */ a($e, { open: s, onOpenChange: o, children: [
387
+ /* @__PURE__ */ e(Be, { asChild: !0, children: /* @__PURE__ */ e(j, { tooltip: "Lenses", className: "h-7 p-2", children: /* @__PURE__ */ e(Ct, { className: "h-4 w-4" }) }) }),
388
+ /* @__PURE__ */ a(Ke, { align: "end", className: "w-60", children: [
378
389
  /* @__PURE__ */ e(xa, { className: "px-3", children: "Lenses" }),
379
390
  /* @__PURE__ */ e(Da, {}),
380
391
  /* @__PURE__ */ a(
381
392
  Ca,
382
393
  {
383
- value: n,
394
+ value: r,
384
395
  onValueChange: g,
385
396
  children: [
386
- /* @__PURE__ */ e(gs, { value: "original", children: "Original" }),
397
+ /* @__PURE__ */ e(vs, { value: "original", children: "Original" }),
387
398
  t == null ? void 0 : t.map((d) => /* @__PURE__ */ a(
388
- gs,
399
+ vs,
389
400
  {
390
401
  className: "group flex justify-between gap-2",
391
402
  value: d.id,
@@ -393,12 +404,12 @@ function Gt() {
393
404
  /* @__PURE__ */ e("p", { children: d.name }),
394
405
  /* @__PURE__ */ a("span", { className: "flex items-center gap-3", children: [
395
406
  /* @__PURE__ */ e(
396
- Ds,
407
+ Cs,
397
408
  {
398
409
  onClick: (m) => {
399
410
  m.preventDefault(), i(d);
400
411
  },
401
- className: Z(
412
+ className: X(
402
413
  "size-3.5 text-muted-foreground hover:cursor-pointer hover:text-foreground group-hover:visible",
403
414
  {
404
415
  invisible: !d.isDefault,
@@ -409,7 +420,7 @@ function Gt() {
409
420
  }
410
421
  ),
411
422
  /* @__PURE__ */ e(
412
- Cs,
423
+ Ls,
413
424
  {
414
425
  onClick: (m) => {
415
426
  m.preventDefault(), v(d.id);
@@ -429,11 +440,11 @@ function Gt() {
429
440
  ] })
430
441
  ] });
431
442
  }
432
- const Rt = async (s, o, t) => {
433
- const n = `${s}/management/v1/groups`;
434
- return await Ls(n, o, t);
435
- }, Pt = async (s, o, t) => {
436
- const n = `${s}/management/v1/groups/${t}`, l = await fetch(n, {
443
+ const Pt = async (s, o, t) => {
444
+ const r = `${s}/management/v1/groups`;
445
+ return await Es(r, o, t);
446
+ }, Ft = async (s, o, t) => {
447
+ const r = `${s}/management/v1/groups/${t}`, l = await fetch(r, {
437
448
  method: "DELETE",
438
449
  headers: {
439
450
  Authorization: `Bearer ${o}`
@@ -443,17 +454,17 @@ const Rt = async (s, o, t) => {
443
454
  const c = await l.text();
444
455
  throw new Error(c || "Failed to delete group");
445
456
  }
446
- }, Ft = async (s, o, t, n) => {
457
+ }, jt = async (s, o, t, r) => {
447
458
  const l = `${s}/management/v1/groups/${t}/members`;
448
- return await Ls(l, o, n);
449
- }, jt = async (s, o, t, n) => {
459
+ return await Es(l, o, r);
460
+ }, Ht = async (s, o, t, r) => {
450
461
  const l = `${s}/management/v1/groups/${t}/members`, c = await fetch(l, {
451
462
  method: "DELETE",
452
463
  headers: {
453
464
  "Content-Type": "application/json",
454
465
  Authorization: `Bearer ${o}`
455
466
  },
456
- body: JSON.stringify(n)
467
+ body: JSON.stringify(r)
457
468
  });
458
469
  if (!c.ok) {
459
470
  const u = await c.text();
@@ -463,82 +474,82 @@ const Rt = async (s, o, t) => {
463
474
  function qt() {
464
475
  const { authToken: s, tokenProps: o } = P(), t = be();
465
476
  return ye({
466
- mutationFn: (n) => Rt(o.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", n),
477
+ mutationFn: (r) => Pt(o.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", r),
467
478
  onSuccess: () => {
468
479
  t.invalidateQueries({ queryKey: ["groups"] }), E.success("Group created successfully");
469
480
  },
470
- onError: (n) => {
471
- console.error("Failed to create group:", n), E.error("Failed to create group", {
472
- description: n.message
481
+ onError: (r) => {
482
+ console.error("Failed to create group:", r), E.error("Failed to create group", {
483
+ description: r.message
473
484
  });
474
485
  }
475
486
  });
476
487
  }
477
- function Ht() {
488
+ function Vt() {
478
489
  const { authToken: s, tokenProps: o } = P(), t = be();
479
490
  return ye({
480
- mutationFn: (n) => Pt(o.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", n),
481
- onSuccess: (n, l) => {
491
+ mutationFn: (r) => Ft(o.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", r),
492
+ onSuccess: (r, l) => {
482
493
  t.invalidateQueries({ queryKey: ["groups"] }), t.removeQueries({ queryKey: ["group", l] }), E.success("Group deleted successfully");
483
494
  },
484
- onError: (n) => {
485
- console.error("Failed to delete group:", n), E.error("Failed to delete group", {
486
- description: n.message
495
+ onError: (r) => {
496
+ console.error("Failed to delete group:", r), E.error("Failed to delete group", {
497
+ description: r.message
487
498
  });
488
499
  }
489
500
  });
490
501
  }
491
- function Vt() {
502
+ function zt() {
492
503
  const { authToken: s, tokenProps: o } = P(), t = be();
493
504
  return ye({
494
505
  mutationFn: ({
495
- groupId: n,
506
+ groupId: r,
496
507
  data: l
497
- }) => Ft(o.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", n, l),
498
- onSuccess: (n, l) => {
508
+ }) => jt(o.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", r, l),
509
+ onSuccess: (r, l) => {
499
510
  t.invalidateQueries({ queryKey: ["group", l.groupId] }), t.invalidateQueries({
500
511
  queryKey: ["group-members", l.groupId]
501
512
  }), t.invalidateQueries({ queryKey: ["groups"] }), E.success("Members added successfully");
502
513
  },
503
- onError: (n) => {
504
- console.error("Failed to add group members:", n), E.error("Failed to add members", {
505
- description: n.message
514
+ onError: (r) => {
515
+ console.error("Failed to add group members:", r), E.error("Failed to add members", {
516
+ description: r.message
506
517
  });
507
518
  }
508
519
  });
509
520
  }
510
- function zt() {
521
+ function $t() {
511
522
  const { authToken: s, tokenProps: o } = P(), t = be();
512
523
  return ye({
513
524
  mutationFn: ({
514
- groupId: n,
525
+ groupId: r,
515
526
  data: l
516
- }) => jt(o.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", n, l),
517
- onSuccess: (n, l) => {
527
+ }) => Ht(o.apiServiceUrl, (s == null ? void 0 : s.accessToken) || "", r, l),
528
+ onSuccess: (r, l) => {
518
529
  t.invalidateQueries({ queryKey: ["group", l.groupId] }), t.invalidateQueries({
519
530
  queryKey: ["group-members", l.groupId]
520
531
  }), t.invalidateQueries({ queryKey: ["groups"] }), E.success("Members removed successfully");
521
532
  },
522
- onError: (n) => {
523
- console.error("Failed to remove group members:", n), E.error("Failed to remove members", {
524
- description: n.message
533
+ onError: (r) => {
534
+ console.error("Failed to remove group members:", r), E.error("Failed to remove members", {
535
+ description: r.message
525
536
  });
526
537
  }
527
538
  });
528
539
  }
529
- function $t({
540
+ function Bt({
530
541
  onSuccess: s,
531
542
  tenantId: o,
532
543
  isTenantUser: t
533
544
  }) {
534
- const [n, l] = S(""), [c, u] = S(""), [p, g] = S({}), v = qt(), i = () => {
545
+ const [r, l] = S(""), [c, u] = S(""), [p, g] = S({}), v = qt(), i = () => {
535
546
  const m = {};
536
- return n.trim() ? n.length < 3 ? m.name = "Group name must be at least 3 characters" : n.length > 50 && (m.name = "Group name must be less than 50 characters") : m.name = "Group name is required", c && c.length > 200 && (m.description = "Description must be less than 200 characters"), g(m), Object.keys(m).length === 0;
547
+ return r.trim() ? r.length < 3 ? m.name = "Group name must be at least 3 characters" : r.length > 50 && (m.name = "Group name must be less than 50 characters") : m.name = "Group name is required", c && c.length > 200 && (m.description = "Description must be less than 200 characters"), g(m), Object.keys(m).length === 0;
537
548
  };
538
549
  return /* @__PURE__ */ a("form", { onSubmit: async (m) => {
539
550
  if (m.preventDefault(), !i()) return;
540
551
  const h = {
541
- name: n.trim(),
552
+ name: r.trim(),
542
553
  description: c.trim() || void 0,
543
554
  type: t ? "TENANT_GROUP" : "ORG_GROUP",
544
555
  ...t && o ? { tenantId: o } : {}
@@ -551,16 +562,16 @@ function $t({
551
562
  }, className: "space-y-6", children: [
552
563
  /* @__PURE__ */ a("div", { className: "space-y-4", children: [
553
564
  /* @__PURE__ */ a("div", { className: "space-y-2", children: [
554
- /* @__PURE__ */ a(Ue, { htmlFor: "group-name", children: [
565
+ /* @__PURE__ */ a(Ge, { htmlFor: "group-name", children: [
555
566
  "Group Name ",
556
567
  /* @__PURE__ */ e("span", { className: "text-destructive", children: "*" })
557
568
  ] }),
558
569
  /* @__PURE__ */ e(
559
- re,
570
+ oe,
560
571
  {
561
572
  id: "group-name",
562
573
  placeholder: "e.g., Marketing Team, Engineering Squad",
563
- value: n,
574
+ value: r,
564
575
  onChange: (m) => {
565
576
  l(m.target.value), p.name && g((h) => ({ ...h, name: "" }));
566
577
  },
@@ -571,7 +582,7 @@ function $t({
571
582
  p.name && /* @__PURE__ */ e("p", { className: "text-sm text-destructive", children: p.name })
572
583
  ] }),
573
584
  /* @__PURE__ */ a("div", { className: "space-y-2", children: [
574
- /* @__PURE__ */ a(Ue, { htmlFor: "group-description", children: [
585
+ /* @__PURE__ */ a(Ge, { htmlFor: "group-description", children: [
575
586
  "Description",
576
587
  /* @__PURE__ */ e("span", { className: "ml-2 text-xs text-muted-foreground", children: "(optional)" })
577
588
  ] }),
@@ -617,9 +628,9 @@ function $t({
617
628
  L,
618
629
  {
619
630
  type: "submit",
620
- disabled: v.isPending || !n.trim(),
631
+ disabled: v.isPending || !r.trim(),
621
632
  children: v.isPending ? /* @__PURE__ */ a(k, { children: [
622
- /* @__PURE__ */ e(H, { className: "mr-2 h-4 w-4 animate-spin" }),
633
+ /* @__PURE__ */ e(q, { className: "mr-2 h-4 w-4 animate-spin" }),
623
634
  "Creating..."
624
635
  ] }) : /* @__PURE__ */ a(k, { children: [
625
636
  /* @__PURE__ */ e(V, { className: "mr-2 h-4 w-4" }),
@@ -630,66 +641,66 @@ function $t({
630
641
  ] })
631
642
  ] });
632
643
  }
633
- function Bt() {
634
- return Ot.useSyncExternalStore(
635
- Kt,
644
+ function Kt() {
645
+ return It.useSyncExternalStore(
646
+ Qt,
636
647
  () => !0,
637
648
  () => !1
638
649
  );
639
650
  }
640
- function Kt() {
651
+ function Qt() {
641
652
  return () => {
642
653
  };
643
654
  }
644
- var es = "Avatar", [Qt] = Aa(es), [Wt, js] = Qt(es), qs = _.forwardRef(
655
+ var ss = "Avatar", [Wt] = Aa(ss), [Jt, Hs] = Wt(ss), qs = _.forwardRef(
645
656
  (s, o) => {
646
- const { __scopeAvatar: t, ...n } = s, [l, c] = _.useState("idle");
657
+ const { __scopeAvatar: t, ...r } = s, [l, c] = _.useState("idle");
647
658
  return /* @__PURE__ */ e(
648
- Wt,
659
+ Jt,
649
660
  {
650
661
  scope: t,
651
662
  imageLoadingStatus: l,
652
663
  onImageLoadingStatusChange: c,
653
- children: /* @__PURE__ */ e(Ye.span, { ...n, ref: o })
664
+ children: /* @__PURE__ */ e(es.span, { ...r, ref: o })
654
665
  }
655
666
  );
656
667
  }
657
668
  );
658
- qs.displayName = es;
659
- var Hs = "AvatarImage", Vs = _.forwardRef(
669
+ qs.displayName = ss;
670
+ var Vs = "AvatarImage", zs = _.forwardRef(
660
671
  (s, o) => {
661
- const { __scopeAvatar: t, src: n, onLoadingStatusChange: l = () => {
662
- }, ...c } = s, u = js(Hs, t), p = Jt(n, c), g = ka((v) => {
672
+ const { __scopeAvatar: t, src: r, onLoadingStatusChange: l = () => {
673
+ }, ...c } = s, u = Hs(Vs, t), p = Xt(r, c), g = ka((v) => {
663
674
  l(v), u.onImageLoadingStatusChange(v);
664
675
  });
665
- return Ge(() => {
676
+ return Re(() => {
666
677
  p !== "idle" && g(p);
667
- }, [p, g]), p === "loaded" ? /* @__PURE__ */ e(Ye.img, { ...c, ref: o, src: n }) : null;
678
+ }, [p, g]), p === "loaded" ? /* @__PURE__ */ e(es.img, { ...c, ref: o, src: r }) : null;
668
679
  }
669
680
  );
670
- Vs.displayName = Hs;
671
- var zs = "AvatarFallback", $s = _.forwardRef(
681
+ zs.displayName = Vs;
682
+ var $s = "AvatarFallback", Bs = _.forwardRef(
672
683
  (s, o) => {
673
- const { __scopeAvatar: t, delayMs: n, ...l } = s, c = js(zs, t), [u, p] = _.useState(n === void 0);
684
+ const { __scopeAvatar: t, delayMs: r, ...l } = s, c = Hs($s, t), [u, p] = _.useState(r === void 0);
674
685
  return _.useEffect(() => {
675
- if (n !== void 0) {
676
- const g = window.setTimeout(() => p(!0), n);
686
+ if (r !== void 0) {
687
+ const g = window.setTimeout(() => p(!0), r);
677
688
  return () => window.clearTimeout(g);
678
689
  }
679
- }, [n]), u && c.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(Ye.span, { ...l, ref: o }) : null;
690
+ }, [r]), u && c.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(es.span, { ...l, ref: o }) : null;
680
691
  }
681
692
  );
682
- $s.displayName = zs;
683
- function Ss(s, o) {
693
+ Bs.displayName = $s;
694
+ function ws(s, o) {
684
695
  return s ? o ? (s.src !== o && (s.src = o), s.complete && s.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
685
696
  }
686
- function Jt(s, { referrerPolicy: o, crossOrigin: t }) {
687
- const n = Bt(), l = _.useRef(null), c = n ? (l.current || (l.current = new window.Image()), l.current) : null, [u, p] = _.useState(
688
- () => Ss(c, s)
697
+ function Xt(s, { referrerPolicy: o, crossOrigin: t }) {
698
+ const r = Kt(), l = _.useRef(null), c = r ? (l.current || (l.current = new window.Image()), l.current) : null, [u, p] = _.useState(
699
+ () => ws(c, s)
689
700
  );
690
- return Ge(() => {
691
- p(Ss(c, s));
692
- }, [c, s]), Ge(() => {
701
+ return Re(() => {
702
+ p(ws(c, s));
703
+ }, [c, s]), Re(() => {
693
704
  const g = (d) => () => {
694
705
  p(d);
695
706
  };
@@ -700,52 +711,52 @@ function Jt(s, { referrerPolicy: o, crossOrigin: t }) {
700
711
  };
701
712
  }, [c, t, o]), u;
702
713
  }
703
- var Bs = qs, Ks = Vs, Qs = $s;
704
- const ss = _.forwardRef(({ className: s, ...o }, t) => /* @__PURE__ */ e(
705
- Bs,
714
+ var Ks = qs, Qs = zs, Ws = Bs;
715
+ const as = _.forwardRef(({ className: s, ...o }, t) => /* @__PURE__ */ e(
716
+ Ks,
706
717
  {
707
718
  ref: t,
708
- className: Z(
719
+ className: X(
709
720
  "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
710
721
  s
711
722
  ),
712
723
  ...o
713
724
  }
714
725
  ));
715
- ss.displayName = Bs.displayName;
726
+ as.displayName = Ks.displayName;
716
727
  const Zt = _.forwardRef(({ className: s, ...o }, t) => /* @__PURE__ */ e(
717
- Ks,
728
+ Qs,
718
729
  {
719
730
  ref: t,
720
- className: Z("aspect-square h-full w-full", s),
731
+ className: X("aspect-square h-full w-full", s),
721
732
  ...o
722
733
  }
723
734
  ));
724
- Zt.displayName = Ks.displayName;
725
- const as = _.forwardRef(({ className: s, ...o }, t) => /* @__PURE__ */ e(
726
- Qs,
735
+ Zt.displayName = Qs.displayName;
736
+ const ts = _.forwardRef(({ className: s, ...o }, t) => /* @__PURE__ */ e(
737
+ Ws,
727
738
  {
728
739
  ref: t,
729
- className: Z(
740
+ className: X(
730
741
  "flex h-full w-full items-center justify-center rounded-full bg-muted",
731
742
  s
732
743
  ),
733
744
  ...o
734
745
  }
735
746
  ));
736
- as.displayName = Qs.displayName;
737
- function Xt({
747
+ ts.displayName = Ws.displayName;
748
+ function Yt({
738
749
  open: s,
739
750
  onOpenChange: o,
740
751
  group: t,
741
- onUpdate: n
752
+ onUpdate: r
742
753
  }) {
743
754
  const [l, c] = S("members"), [u, p] = S(""), [g, v] = S([]), [i, d] = S([]), { data: m, isLoading: h, refetch: b } = Ma(t.id), y = t.type === "TENANT_GROUP" ? "tenant" : "organization", { users: N, isLoading: A } = Oa({
744
755
  type: y,
745
756
  tenantId: t.tenantId || void 0,
746
757
  active: !0,
747
758
  limit: 100
748
- }), I = Vt(), U = zt(), M = (m == null ? void 0 : m.members) || [], z = fe(() => new Set(M.map((f) => f.userId)), [M]), R = fe(() => N.filter((f) => !z.has(f.id)), [N, z]), $ = fe(() => {
759
+ }), I = zt(), U = $t(), M = (m == null ? void 0 : m.members) || [], z = fe(() => new Set(M.map((f) => f.userId)), [M]), R = fe(() => N.filter((f) => !z.has(f.id)), [N, z]), $ = fe(() => {
749
760
  if (!u) return R;
750
761
  const f = u.toLowerCase();
751
762
  return R.filter(
@@ -772,7 +783,7 @@ function Xt({
772
783
  userIds: g,
773
784
  userType: y === "tenant" ? "tenant" : "org"
774
785
  }
775
- }), v([]), c("members"), b(), n == null || n();
786
+ }), v([]), c("members"), b(), r == null || r();
776
787
  } catch (f) {
777
788
  console.error("Failed to add members:", f);
778
789
  }
@@ -784,7 +795,7 @@ function Xt({
784
795
  data: {
785
796
  userIds: i
786
797
  }
787
- }), d([]), b(), n == null || n();
798
+ }), d([]), b(), r == null || r();
788
799
  } catch (f) {
789
800
  console.error("Failed to remove members:", f);
790
801
  }
@@ -797,9 +808,9 @@ function Xt({
797
808
  (C) => C.includes(f) ? C.filter((T) => T !== f) : [...C, f]
798
809
  );
799
810
  };
800
- return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(Qe, { open: s, onOpenChange: o, children: /* @__PURE__ */ a(Je, { className: "max-w-3xl max-h-[80vh]", "aria-describedby": "group-members-description", children: [
811
+ return /* @__PURE__ */ e(k, { children: /* @__PURE__ */ e(We, { open: s, onOpenChange: o, children: /* @__PURE__ */ a(Xe, { className: "max-w-3xl max-h-[80vh]", "aria-describedby": "group-members-description", children: [
801
812
  /* @__PURE__ */ a(Ze, { children: [
802
- /* @__PURE__ */ e(Xe, { children: t.name }),
813
+ /* @__PURE__ */ e(Ye, { children: t.name }),
803
814
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2 mt-1", children: /* @__PURE__ */ a("p", { className: "text-sm text-muted-foreground", children: [
804
815
  M.length,
805
816
  " ",
@@ -811,18 +822,18 @@ function Xt({
811
822
  " group"
812
823
  ] })
813
824
  ] }),
814
- /* @__PURE__ */ a(Es, { value: l, onValueChange: (f) => {
825
+ /* @__PURE__ */ a(As, { value: l, onValueChange: (f) => {
815
826
  c(f), p(""), d([]);
816
827
  }, className: "mt-4", children: [
817
- /* @__PURE__ */ a(As, { className: "grid w-full grid-cols-2", children: [
828
+ /* @__PURE__ */ a(ks, { className: "grid w-full grid-cols-2", children: [
818
829
  /* @__PURE__ */ e(ge, { value: "members", children: "Current Members" }),
819
830
  /* @__PURE__ */ e(ge, { value: "add", children: "Add Members" })
820
831
  ] }),
821
832
  /* @__PURE__ */ a(ve, { value: "members", className: "mt-4 space-y-4", children: [
822
833
  /* @__PURE__ */ a("div", { className: "relative", children: [
823
- /* @__PURE__ */ e(Re, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
834
+ /* @__PURE__ */ e(Pe, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
824
835
  /* @__PURE__ */ e(
825
- re,
836
+ oe,
826
837
  {
827
838
  placeholder: "Search members...",
828
839
  value: u,
@@ -831,12 +842,12 @@ function Xt({
831
842
  }
832
843
  )
833
844
  ] }),
834
- /* @__PURE__ */ e(Pe, { className: i.length > 0 ? "h-[300px]" : "h-[350px]", children: h ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((f) => /* @__PURE__ */ e(Fe, { className: "h-16 w-full" }, f)) }) : x.length === 0 ? /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
845
+ /* @__PURE__ */ e(Fe, { className: i.length > 0 ? "h-[300px]" : "h-[350px]", children: h ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((f) => /* @__PURE__ */ e(je, { className: "h-16 w-full" }, f)) }) : x.length === 0 ? /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
835
846
  /* @__PURE__ */ e(V, { className: "h-12 w-12 mb-3 opacity-50" }),
836
847
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: u ? "No members found" : "No members yet" }),
837
848
  /* @__PURE__ */ e("p", { className: "text-xs mt-1", children: u ? "Try a different search" : 'Switch to the "Add Members" tab to add people to this group' })
838
849
  ] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: x.map((f) => /* @__PURE__ */ e(
839
- Yt,
850
+ er,
840
851
  {
841
852
  member: f,
842
853
  selected: i.includes(f.userId),
@@ -859,10 +870,10 @@ function Xt({
859
870
  onClick: K,
860
871
  disabled: U.isPending,
861
872
  children: U.isPending ? /* @__PURE__ */ a(k, { children: [
862
- /* @__PURE__ */ e(H, { className: "mr-2 h-4 w-4 animate-spin" }),
873
+ /* @__PURE__ */ e(q, { className: "mr-2 h-4 w-4 animate-spin" }),
863
874
  "Removing..."
864
875
  ] }) : /* @__PURE__ */ a(k, { children: [
865
- /* @__PURE__ */ e(ks, { className: "mr-2 h-4 w-4" }),
876
+ /* @__PURE__ */ e(Ms, { className: "mr-2 h-4 w-4" }),
866
877
  "Remove Selected"
867
878
  ] })
868
879
  }
@@ -871,9 +882,9 @@ function Xt({
871
882
  ] }),
872
883
  /* @__PURE__ */ a(ve, { value: "add", className: "mt-4 space-y-4", children: [
873
884
  /* @__PURE__ */ a("div", { className: "relative", children: [
874
- /* @__PURE__ */ e(Re, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
885
+ /* @__PURE__ */ e(Pe, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
875
886
  /* @__PURE__ */ e(
876
- re,
887
+ oe,
877
888
  {
878
889
  placeholder: "Search users to add...",
879
890
  value: u,
@@ -882,12 +893,12 @@ function Xt({
882
893
  }
883
894
  )
884
895
  ] }),
885
- /* @__PURE__ */ e(Pe, { className: "h-[300px]", children: A ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((f) => /* @__PURE__ */ e(Fe, { className: "h-16 w-full" }, f)) }) : $.length === 0 ? /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
886
- /* @__PURE__ */ e(je, { className: "h-12 w-12 mb-3 opacity-50" }),
896
+ /* @__PURE__ */ e(Fe, { className: "h-[300px]", children: A ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((f) => /* @__PURE__ */ e(je, { className: "h-16 w-full" }, f)) }) : $.length === 0 ? /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
897
+ /* @__PURE__ */ e(He, { className: "h-12 w-12 mb-3 opacity-50" }),
887
898
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: "No available users" }),
888
899
  /* @__PURE__ */ e("p", { className: "text-xs mt-1", children: u ? "Try a different search" : "All eligible users are already members" })
889
900
  ] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: $.map((f) => /* @__PURE__ */ e(
890
- en,
901
+ sr,
891
902
  {
892
903
  user: f,
893
904
  selected: g.includes(f.id),
@@ -908,10 +919,10 @@ function Xt({
908
919
  onClick: B,
909
920
  disabled: I.isPending,
910
921
  children: I.isPending ? /* @__PURE__ */ a(k, { children: [
911
- /* @__PURE__ */ e(H, { className: "mr-2 h-4 w-4 animate-spin" }),
922
+ /* @__PURE__ */ e(q, { className: "mr-2 h-4 w-4 animate-spin" }),
912
923
  "Adding..."
913
924
  ] }) : /* @__PURE__ */ a(k, { children: [
914
- /* @__PURE__ */ e(je, { className: "mr-2 h-4 w-4" }),
925
+ /* @__PURE__ */ e(He, { className: "mr-2 h-4 w-4" }),
915
926
  "Add Members"
916
927
  ] })
917
928
  }
@@ -921,21 +932,21 @@ function Xt({
921
932
  ] })
922
933
  ] }) }) });
923
934
  }
924
- function Yt({
935
+ function er({
925
936
  member: s,
926
937
  selected: o,
927
938
  onToggle: t
928
939
  }) {
929
940
  var l, c, u, p;
930
- const n = ((c = (l = s.user) == null ? void 0 : l.name) == null ? void 0 : c.split(" ").map((g) => g[0]).join("").toUpperCase()) || "?";
941
+ const r = ((c = (l = s.user) == null ? void 0 : l.name) == null ? void 0 : c.split(" ").map((g) => g[0]).join("").toUpperCase()) || "?";
931
942
  return /* @__PURE__ */ a(
932
943
  "div",
933
944
  {
934
945
  className: "flex items-center gap-3 p-3 rounded-lg border bg-card hover:bg-muted/50 cursor-pointer",
935
946
  onClick: t,
936
947
  children: [
937
- /* @__PURE__ */ e(Ms, { checked: o }),
938
- /* @__PURE__ */ e(ss, { className: "h-8 w-8", children: /* @__PURE__ */ e(as, { className: "text-xs", children: n }) }),
948
+ /* @__PURE__ */ e(Os, { checked: o }),
949
+ /* @__PURE__ */ e(as, { className: "h-8 w-8", children: /* @__PURE__ */ e(ts, { className: "text-xs", children: r }) }),
939
950
  /* @__PURE__ */ a("div", { className: "flex-1", children: [
940
951
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: ((u = s.user) == null ? void 0 : u.name) || "Unknown User" }),
941
952
  /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: (p = s.user) == null ? void 0 : p.email })
@@ -944,21 +955,21 @@ function Yt({
944
955
  }
945
956
  );
946
957
  }
947
- function en({
958
+ function sr({
948
959
  user: s,
949
960
  selected: o,
950
961
  onToggle: t
951
962
  }) {
952
963
  var l;
953
- const n = ((l = s.name) == null ? void 0 : l.split(" ").map((c) => c[0]).join("").toUpperCase()) || "?";
964
+ const r = ((l = s.name) == null ? void 0 : l.split(" ").map((c) => c[0]).join("").toUpperCase()) || "?";
954
965
  return /* @__PURE__ */ a(
955
966
  "div",
956
967
  {
957
968
  className: "flex items-center gap-3 p-3 rounded-lg border bg-card hover:bg-muted/50 cursor-pointer",
958
969
  onClick: t,
959
970
  children: [
960
- /* @__PURE__ */ e(Ms, { checked: o }),
961
- /* @__PURE__ */ e(ss, { className: "h-8 w-8", children: /* @__PURE__ */ e(as, { className: "text-xs", children: n }) }),
971
+ /* @__PURE__ */ e(Os, { checked: o }),
972
+ /* @__PURE__ */ e(as, { className: "h-8 w-8", children: /* @__PURE__ */ e(ts, { className: "text-xs", children: r }) }),
962
973
  /* @__PURE__ */ a("div", { className: "flex-1", children: [
963
974
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: s.name }),
964
975
  /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: s.email })
@@ -967,11 +978,11 @@ function en({
967
978
  }
968
979
  );
969
980
  }
970
- function sn({
981
+ function ar({
971
982
  open: s,
972
983
  onOpenChange: o
973
984
  }) {
974
- const [t, n] = S("groups"), [l, c] = S(""), [u, p] = S(null), [g, v] = S(!1), [i, d] = S(null), { tokenProps: m } = P(), { currentUser: h } = Os(), b = Ht(), y = (h == null ? void 0 : h.type) === "tenant", N = m == null ? void 0 : m.tenantId, { groups: A, isLoading: I, refetch: U } = Ia({
985
+ const [t, r] = S("groups"), [l, c] = S(""), [u, p] = S(null), [g, v] = S(!1), [i, d] = S(null), { tokenProps: m } = P(), { currentUser: h } = Is(), b = Vt(), y = (h == null ? void 0 : h.type) === "tenant", N = m == null ? void 0 : m.tenantId, { groups: A, isLoading: I, refetch: U } = Ia({
975
986
  type: y ? "TENANT_GROUP" : "all",
976
987
  tenantId: y ? N : void 0,
977
988
  includeMembers: !1
@@ -990,33 +1001,33 @@ function sn({
990
1001
  }, R = (x) => {
991
1002
  p(x), v(!0);
992
1003
  }, $ = () => {
993
- n("groups"), U();
1004
+ r("groups"), U();
994
1005
  };
995
1006
  return /* @__PURE__ */ a(k, { children: [
996
- /* @__PURE__ */ e(Qe, { open: s, onOpenChange: o, children: /* @__PURE__ */ a(Je, { className: "max-w-4xl max-h-[80vh]", children: [
1007
+ /* @__PURE__ */ e(We, { open: s, onOpenChange: o, children: /* @__PURE__ */ a(Xe, { className: "max-w-4xl max-h-[80vh]", children: [
997
1008
  /* @__PURE__ */ a(Ze, { children: [
998
- /* @__PURE__ */ a(Xe, { className: "flex items-center gap-2", children: [
1009
+ /* @__PURE__ */ a(Ye, { className: "flex items-center gap-2", children: [
999
1010
  /* @__PURE__ */ e(V, { className: "h-5 w-5" }),
1000
1011
  "Group Management"
1001
1012
  ] }),
1002
- /* @__PURE__ */ e(xs, { children: "Manage your groups, create new groups, and control group membership" })
1013
+ /* @__PURE__ */ e(Ds, { children: "Manage your groups, create new groups, and control group membership" })
1003
1014
  ] }),
1004
- /* @__PURE__ */ a(Es, { value: t, onValueChange: n, className: "mt-4", children: [
1005
- /* @__PURE__ */ a(As, { className: "grid w-full grid-cols-2", children: [
1015
+ /* @__PURE__ */ a(As, { value: t, onValueChange: r, className: "mt-4", children: [
1016
+ /* @__PURE__ */ a(ks, { className: "grid w-full grid-cols-2", children: [
1006
1017
  /* @__PURE__ */ a(ge, { value: "groups", className: "flex items-center gap-2", children: [
1007
1018
  /* @__PURE__ */ e(V, { className: "h-4 w-4" }),
1008
1019
  "Groups"
1009
1020
  ] }),
1010
1021
  /* @__PURE__ */ a(ge, { value: "create", className: "flex items-center gap-2", children: [
1011
- /* @__PURE__ */ e(We, { className: "h-4 w-4" }),
1022
+ /* @__PURE__ */ e(Je, { className: "h-4 w-4" }),
1012
1023
  "Create Group"
1013
1024
  ] })
1014
1025
  ] }),
1015
1026
  /* @__PURE__ */ e(ve, { value: "groups", className: "mt-4", children: /* @__PURE__ */ a("div", { className: "space-y-4", children: [
1016
1027
  /* @__PURE__ */ a("div", { className: "relative", children: [
1017
- /* @__PURE__ */ e(Re, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
1028
+ /* @__PURE__ */ e(Pe, { className: "absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-muted-foreground" }),
1018
1029
  /* @__PURE__ */ e(
1019
- re,
1030
+ oe,
1020
1031
  {
1021
1032
  placeholder: "Search groups...",
1022
1033
  value: l,
@@ -1025,12 +1036,12 @@ function sn({
1025
1036
  }
1026
1037
  )
1027
1038
  ] }),
1028
- /* @__PURE__ */ e(Pe, { className: "h-[400px]", children: I ? /* @__PURE__ */ e("div", { className: "space-y-3", children: [1, 2, 3].map((x) => /* @__PURE__ */ e(Fe, { className: "h-24 w-full" }, x)) }) : M.length === 0 ? /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
1039
+ /* @__PURE__ */ e(Fe, { className: "h-[400px]", children: I ? /* @__PURE__ */ e("div", { className: "space-y-3", children: [1, 2, 3].map((x) => /* @__PURE__ */ e(je, { className: "h-24 w-full" }, x)) }) : M.length === 0 ? /* @__PURE__ */ a("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
1029
1040
  /* @__PURE__ */ e(V, { className: "h-12 w-12 mb-3 opacity-50" }),
1030
1041
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: "No groups found" }),
1031
1042
  /* @__PURE__ */ e("p", { className: "text-xs mt-1", children: l ? "Try a different search" : "Create your first group to get started" })
1032
1043
  ] }) : /* @__PURE__ */ e("div", { className: "space-y-3", children: M.map((x) => /* @__PURE__ */ e(
1033
- an,
1044
+ tr,
1034
1045
  {
1035
1046
  group: x,
1036
1047
  onManageMembers: () => R(x),
@@ -1041,7 +1052,7 @@ function sn({
1041
1052
  )) }) })
1042
1053
  ] }) }),
1043
1054
  /* @__PURE__ */ e(ve, { value: "create", className: "mt-4", children: /* @__PURE__ */ e(
1044
- $t,
1055
+ Bt,
1045
1056
  {
1046
1057
  onSuccess: $,
1047
1058
  tenantId: N,
@@ -1051,7 +1062,7 @@ function sn({
1051
1062
  ] })
1052
1063
  ] }) }),
1053
1064
  u && /* @__PURE__ */ e(
1054
- Xt,
1065
+ Yt,
1055
1066
  {
1056
1067
  open: g,
1057
1068
  onOpenChange: v,
@@ -1060,21 +1071,21 @@ function sn({
1060
1071
  }
1061
1072
  ),
1062
1073
  /* @__PURE__ */ e(
1063
- Is,
1074
+ Ts,
1064
1075
  {
1065
1076
  open: !!i,
1066
1077
  onOpenChange: () => d(null),
1067
- children: /* @__PURE__ */ a(Ts, { children: [
1068
- /* @__PURE__ */ a(_s, { children: [
1069
- /* @__PURE__ */ e(Us, { children: "Delete Group" }),
1070
- /* @__PURE__ */ a(Gs, { children: [
1078
+ children: /* @__PURE__ */ a(_s, { children: [
1079
+ /* @__PURE__ */ a(Us, { children: [
1080
+ /* @__PURE__ */ e(Gs, { children: "Delete Group" }),
1081
+ /* @__PURE__ */ a(Rs, { children: [
1071
1082
  'Are you sure you want to delete "',
1072
1083
  i == null ? void 0 : i.name,
1073
1084
  '"? This action cannot be undone and will remove all members from the group.'
1074
1085
  ] })
1075
1086
  ] }),
1076
- /* @__PURE__ */ a(Rs, { children: [
1077
- /* @__PURE__ */ e(Ps, { children: "Cancel" }),
1087
+ /* @__PURE__ */ a(Ps, { children: [
1088
+ /* @__PURE__ */ e(Fs, { children: "Cancel" }),
1078
1089
  /* @__PURE__ */ e(
1079
1090
  qe,
1080
1091
  {
@@ -1082,7 +1093,7 @@ function sn({
1082
1093
  disabled: b.isPending,
1083
1094
  className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
1084
1095
  children: b.isPending ? /* @__PURE__ */ a(k, { children: [
1085
- /* @__PURE__ */ e(H, { className: "mr-2 h-4 w-4 animate-spin" }),
1096
+ /* @__PURE__ */ e(q, { className: "mr-2 h-4 w-4 animate-spin" }),
1086
1097
  "Deleting..."
1087
1098
  ] }) : "Delete Group"
1088
1099
  }
@@ -1093,13 +1104,13 @@ function sn({
1093
1104
  )
1094
1105
  ] });
1095
1106
  }
1096
- function an({
1107
+ function tr({
1097
1108
  group: s,
1098
1109
  onManageMembers: o,
1099
1110
  onDelete: t,
1100
- currentUserId: n
1111
+ currentUserId: r
1101
1112
  }) {
1102
- const l = s.createdBy === n;
1113
+ const l = s.createdBy === r;
1103
1114
  return /* @__PURE__ */ e("div", { className: "rounded-lg border bg-card p-4 transition-colors hover:bg-muted/50", children: /* @__PURE__ */ a("div", { className: "flex items-start justify-between gap-3", children: [
1104
1115
  /* @__PURE__ */ a("div", { className: "flex-1 space-y-2", children: [
1105
1116
  /* @__PURE__ */ a("div", { children: [
@@ -1127,7 +1138,7 @@ function an({
1127
1138
  size: "sm",
1128
1139
  onClick: o,
1129
1140
  title: "Manage members",
1130
- children: /* @__PURE__ */ e(je, { className: "h-4 w-4" })
1141
+ children: /* @__PURE__ */ e(He, { className: "h-4 w-4" })
1131
1142
  }
1132
1143
  ),
1133
1144
  l && /* @__PURE__ */ e(
@@ -1138,61 +1149,61 @@ function an({
1138
1149
  onClick: t,
1139
1150
  title: "Delete group",
1140
1151
  className: "text-destructive hover:text-destructive",
1141
- children: /* @__PURE__ */ e(ks, { className: "h-4 w-4" })
1152
+ children: /* @__PURE__ */ e(Ms, { className: "h-4 w-4" })
1142
1153
  }
1143
1154
  )
1144
1155
  ] })
1145
1156
  ] }) });
1146
1157
  }
1147
- function pn() {
1148
- var ms, hs, ps, fs;
1158
+ function pr() {
1159
+ var hs, ps, fs, gs;
1149
1160
  mt(), ht();
1150
1161
  const {
1151
1162
  authToken: s,
1152
1163
  tokenProps: o,
1153
1164
  id: t
1154
- } = P(), { isLocalDev: n } = Ta(), { permissions: l } = yt(), c = _a(), { isLoading: u } = Ua();
1155
- w((r) => r.theme);
1156
- const p = w((r) => r.lenses), g = w((r) => r.selectedLensId), v = p == null ? void 0 : p.find((r) => r.id === g), i = w((r) => r.dashboard);
1157
- w((r) => r.selectedSheetId);
1165
+ } = P(), { isLocalDev: r } = Ta(), { permissions: l } = yt(), c = _a(), { isLoading: u } = Ua();
1166
+ w((n) => n.theme);
1167
+ const p = w((n) => n.lenses), g = w((n) => n.selectedLensId), v = p == null ? void 0 : p.find((n) => n.id === g), i = w((n) => n.dashboard);
1168
+ w((n) => n.selectedSheetId);
1158
1169
  const d = w(
1159
- (r) => r.isDashboardEditing
1160
- ), { setDashboardTitle: m } = w((r) => r.actions), [h, b] = S(!1), [y, N] = S(!1), [A, I] = S(!1), [U, M] = S(!1), [z, R] = S(!1), [$, x] = S(!1), [B, K] = S(!1), [Q, W] = S(null), [f, C] = S(!1), T = w((r) => r.isDashboardPanelOpen), F = w(
1161
- (r) => r.actions.setIsDashboardPanelOpen
1162
- ), ie = w((r) => r.filterValues), D = w((r) => r.isVisualEditing);
1163
- vs((r) => r.card);
1164
- const X = pe(
1165
- (r) => r.selectedDashboard
1170
+ (n) => n.isDashboardEditing
1171
+ ), { setDashboardTitle: m } = w((n) => n.actions), [h, b] = S(!1), [y, N] = S(!1), [A, I] = S(!1), [U, M] = S(!1), [z, R] = S(!1), [$, x] = S(!1), [B, K] = S(!1), [Q, W] = S(null), [f, C] = S(!1), T = w((n) => n.isDashboardPanelOpen), F = w(
1172
+ (n) => n.actions.setIsDashboardPanelOpen
1173
+ ), ie = w((n) => n.filterValues), D = w((n) => n.isVisualEditing);
1174
+ bs((n) => n.card);
1175
+ const Y = pe(
1176
+ (n) => n.selectedDashboard
1166
1177
  ), le = pe(
1167
- (r) => r.initialDashboard
1178
+ (n) => n.initialDashboard
1168
1179
  );
1169
- pe((r) => r.selectedVisual), w((r) => r.selectedFrameId), vs((r) => r.frame);
1170
- const ce = X ? (hs = X == null ? void 0 : X.permissions) == null ? void 0 : hs.canEdit : (ms = le == null ? void 0 : le.permissions) == null ? void 0 : ms.canEdit, Ws = w((r) => r.showFilters), Js = Ga((r) => r.setPanelOpen), Zs = w(
1171
- (r) => r.showDashboardJSON
1172
- ), Ne = w((r) => r.onSaveFunction), Xs = w(
1173
- (r) => r.actions.setShowFilters
1174
- ), { setIsDashboardEditing: ts, setShowDashboardJSON: ns } = w(
1175
- (r) => r.actions
1176
- ), { setInitialDashboard: rs, clearSelectedDashboard: Se } = pe(
1177
- (r) => r.actions
1178
- ), { resources: de } = Ra(Oe.DASHBOARD), { data: we } = Pa(), Ys = ((ps = we == null ? void 0 : we.preference) == null ? void 0 : ps.defaultDashboardId) || null, { mutate: ea, isPending: sa } = Fa(), { currentUser: aa } = Os(), ta = ja(aa), J = X || le, os = J ? {
1180
+ pe((n) => n.selectedVisual), w((n) => n.selectedFrameId), bs((n) => n.frame);
1181
+ const ce = Y ? (ps = Y == null ? void 0 : Y.permissions) == null ? void 0 : ps.canEdit : (hs = le == null ? void 0 : le.permissions) == null ? void 0 : hs.canEdit, Ne = w((n) => n.showFilters), Js = Ga((n) => n.setPanelOpen), Xs = w(
1182
+ (n) => n.showDashboardJSON
1183
+ ), Se = w((n) => n.onSaveFunction), Zs = w(
1184
+ (n) => n.actions.setShowFilters
1185
+ ), { setIsDashboardEditing: rs, setShowDashboardJSON: ns } = w(
1186
+ (n) => n.actions
1187
+ ), { setInitialDashboard: os, clearSelectedDashboard: we } = pe(
1188
+ (n) => n.actions
1189
+ ), { resources: de } = Ra(Ie.DASHBOARD), { data: xe } = Pa(), Ys = ((fs = xe == null ? void 0 : xe.preference) == null ? void 0 : fs.defaultDashboardId) || null, { mutate: ea, isPending: sa } = Fa(), { currentUser: aa } = Is(), ta = ja(aa), J = Y || le, is = J ? {
1179
1190
  id: J.id,
1180
1191
  title: (i == null ? void 0 : i.title) || J.title || "Dashboard"
1181
- } : null, { handleAddNewFrame: na } = qa(), [xe, De] = S(!1), [ra, Y] = S(!1), [ee, ue] = S("close"), se = Ha(Oe.DASHBOARD), [G, Ce] = S(
1192
+ } : null, { handleAddNewFrame: ra } = Ha(), [De, Ce] = S(!1), [na, ee] = S(!1), [se, ue] = S("close"), ae = qa(Ie.DASHBOARD), [G, Le] = S(
1182
1193
  null
1183
- ), oa = async (r, O) => {
1194
+ ), oa = async (n, O) => {
1184
1195
  if (!(i != null && i.id)) {
1185
1196
  console.log("No dashboard ID found");
1186
1197
  return;
1187
1198
  }
1188
1199
  console.log("Updating dashboard title:", {
1189
1200
  dashboardId: i.id,
1190
- newTitle: r,
1201
+ newTitle: n,
1191
1202
  previousTitle: O
1192
- }), se.mutate(
1203
+ }), ae.mutate(
1193
1204
  {
1194
1205
  resourceId: i.id,
1195
- data: { title: r }
1206
+ data: { title: n }
1196
1207
  },
1197
1208
  {
1198
1209
  onSuccess: () => {
@@ -1206,96 +1217,96 @@ function pn() {
1206
1217
  };
1207
1218
  dt(() => {
1208
1219
  if (de && de.length > 0) {
1209
- const r = i == null ? void 0 : i.id;
1210
- if (r) {
1220
+ const n = i == null ? void 0 : i.id;
1221
+ if (n) {
1211
1222
  const O = de.find(
1212
- (ne) => ne.id === r
1223
+ (ne) => ne.id === n
1213
1224
  );
1214
- O && rs(O);
1225
+ O && os(O);
1215
1226
  }
1216
1227
  }
1217
- }, [de, i == null ? void 0 : i.id, rs]);
1218
- const me = o.orgUserId || o.tenantId, is = d && !D && me && ce, { setDashboard: Le } = w((r) => r.actions), ia = () => {
1219
- ts(!0);
1220
- }, Ee = () => {
1221
- ts(!1), ns(!1), Ce(null);
1228
+ }, [de, i == null ? void 0 : i.id, os]);
1229
+ const me = o.orgUserId || o.tenantId, ls = d && !D && me && ce, { setDashboard: Ee } = w((n) => n.actions), ia = () => {
1230
+ rs(!0);
1231
+ }, Ae = () => {
1232
+ rs(!1), ns(!1), Le(null);
1222
1233
  };
1223
1234
  pt(
1224
1235
  d,
1225
1236
  i,
1226
1237
  G,
1227
- (r) => Ce(r)
1238
+ (n) => Le(n)
1228
1239
  );
1229
- const { isDirty: ls, isDirtyPending: la, resetDirty: he } = xt(
1240
+ const { isDirty: cs, isDirtyPending: la, resetDirty: he } = xt(
1230
1241
  i,
1231
1242
  G,
1232
1243
  300,
1233
1244
  1e3,
1234
- Ie
1235
- ), cs = ut(() => G ? Ie(i) !== Ie(G) : !1, [i, G]), Ae = ls || la, ae = xe || se.isPending, ca = () => {
1236
- cs() ? (ue("close"), Y(!0)) : (Ee(), he());
1245
+ Te
1246
+ ), ds = ut(() => G ? Te(i) !== Te(G) : !1, [i, G]), ke = cs || la, te = De || ae.isPending, ca = () => {
1247
+ ds() ? (ue("close"), ee(!0)) : (Ae(), he());
1237
1248
  }, da = async () => {
1238
- await ke({
1249
+ await Me({
1239
1250
  closeAfterSave: !0,
1240
- navigateHomeAfterSave: ee === "home"
1251
+ navigateHomeAfterSave: se === "home"
1241
1252
  });
1242
1253
  }, ua = () => {
1243
- G && Le(G), Ee(), ee === "home" && Se(), ue("close"), Y(!1), he();
1254
+ G && Ee(G), Ae(), se === "home" && we(), ue("close"), ee(!1), he();
1244
1255
  }, ma = () => {
1245
- G && (Le(G), he());
1256
+ G && (Ee(G), he());
1246
1257
  }, ha = () => {
1247
- if (d && cs()) {
1248
- ue("home"), Y(!0);
1258
+ if (d && ds()) {
1259
+ ue("home"), ee(!0);
1249
1260
  return;
1250
1261
  }
1251
- Se();
1262
+ we();
1252
1263
  };
1253
- async function ke(r) {
1254
- const O = (r == null ? void 0 : r.closeAfterSave) ?? f, ne = (r == null ? void 0 : r.navigateHomeAfterSave) ?? !1;
1255
- C(O), O && Y(!1);
1264
+ async function Me(n) {
1265
+ const O = (n == null ? void 0 : n.closeAfterSave) ?? f, ne = (n == null ? void 0 : n.navigateHomeAfterSave) ?? !1;
1266
+ C(O), O && ee(!1);
1256
1267
  const ba = ct(i);
1257
- K(!0), W(null), De(!0);
1268
+ K(!0), W(null), Ce(!0);
1258
1269
  const ya = {
1259
1270
  template: i
1260
1271
  };
1261
- se.mutate(
1272
+ ae.mutate(
1262
1273
  {
1263
1274
  resourceId: i.id,
1264
1275
  data: ya
1265
1276
  },
1266
1277
  {
1267
1278
  onSuccess: () => {
1268
- De(!1), E.success("Dashboard saved!"), Ce(ba), K(!1), C(!1), O && (Ee(), he(), ne && Se()), ue("close");
1279
+ Ce(!1), E.success("Dashboard saved!"), Le(ba), K(!1), C(!1), O && (Ae(), he(), ne && we()), ue("close");
1269
1280
  },
1270
1281
  onError: () => {
1271
- De(!1), W("Failed to save dashboard. Please try again."), E.error("Failed to save dashboard");
1282
+ Ce(!1), W("Failed to save dashboard. Please try again."), E.error("Failed to save dashboard");
1272
1283
  }
1273
1284
  }
1274
1285
  );
1275
1286
  }
1276
1287
  async function pa() {
1277
1288
  if (b(!0), !g || !v) return;
1278
- const r = JSON.stringify(i), O = {
1289
+ const n = JSON.stringify(i), O = {
1279
1290
  ...v,
1280
- template: r,
1291
+ template: n,
1281
1292
  filterValues: ie
1282
1293
  };
1283
- await Ve(
1294
+ await ze(
1284
1295
  o.apiServiceUrl,
1285
1296
  O,
1286
1297
  s == null ? void 0 : s.accessToken
1287
- ), E.success("Lens saved"), Ne == null || Ne(i), b(!1);
1298
+ ), E.success("Lens saved"), Se == null || Se(i), b(!1);
1288
1299
  }
1289
- const ds = (v == null ? void 0 : v.name) || i.title;
1290
- se.isPending && console.log("Title during update:", {
1291
- title: ds,
1300
+ const us = (v == null ? void 0 : v.name) || i.title;
1301
+ ae.isPending && console.log("Title during update:", {
1302
+ title: us,
1292
1303
  dashboardStateTitle: i.title,
1293
1304
  dashboardId: i == null ? void 0 : i.id,
1294
1305
  currentLensName: v == null ? void 0 : v.name
1295
1306
  });
1296
- const us = o.orgUserId || o.tenantId && o.endUserId && o.endUserEmail, fa = !!us && !!(s != null && s.accessToken) && !!(o != null && o.apiServiceUrl), ga = c, te = (i == null ? void 0 : i.id) || null, Me = !!te && Ys === te, va = () => {
1297
- te && ea({
1298
- dashboardId: Me ? null : te
1307
+ const ms = o.orgUserId || o.tenantId && o.endUserId && o.endUserEmail, fa = !!ms && !!(s != null && s.accessToken) && !!(o != null && o.apiServiceUrl), ga = c, re = (i == null ? void 0 : i.id) || null, Oe = !!re && Ys === re, va = () => {
1308
+ re && ea({
1309
+ dashboardId: Oe ? null : re
1299
1310
  });
1300
1311
  };
1301
1312
  return /* @__PURE__ */ a(
@@ -1305,7 +1316,7 @@ function pn() {
1305
1316
  role: "dashboard-controls",
1306
1317
  children: [
1307
1318
  /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
1308
- us && /* @__PURE__ */ a(k, { children: [
1319
+ ms && /* @__PURE__ */ a(k, { children: [
1309
1320
  /* @__PURE__ */ e(
1310
1321
  j,
1311
1322
  {
@@ -1315,7 +1326,7 @@ function pn() {
1315
1326
  F(!T);
1316
1327
  },
1317
1328
  className: "h-7 p-2",
1318
- children: /* @__PURE__ */ e(Ct, { className: "h-4 w-4" })
1329
+ children: /* @__PURE__ */ e(Lt, { className: "h-4 w-4" })
1319
1330
  }
1320
1331
  ),
1321
1332
  ga && !D && /* @__PURE__ */ e(
@@ -1325,35 +1336,35 @@ function pn() {
1325
1336
  tooltip: "Dashboard Hub",
1326
1337
  onClick: ha,
1327
1338
  className: "h-7 p-2",
1328
- children: /* @__PURE__ */ e(Ds, { className: "h-4 w-4" })
1339
+ children: /* @__PURE__ */ e(Cs, { className: "h-4 w-4" })
1329
1340
  }
1330
1341
  )
1331
1342
  ] }),
1332
1343
  !D && c && (u ? /* @__PURE__ */ a("div", { className: "flex items-center gap-2", children: [
1333
- /* @__PURE__ */ e(H, { className: "h-3 w-3 animate-spin text-muted-foreground" }),
1344
+ /* @__PURE__ */ e(q, { className: "h-3 w-3 animate-spin text-muted-foreground" }),
1334
1345
  /* @__PURE__ */ e("span", { className: "text-sm text-muted-foreground", children: "Loading..." })
1335
1346
  ] }) : /* @__PURE__ */ a(k, { children: [
1336
1347
  /* @__PURE__ */ e(
1337
1348
  Va,
1338
1349
  {
1339
- value: ds || "Untitled Dashboard",
1340
- onSave: (r) => {
1350
+ value: us || "Untitled Dashboard",
1351
+ onSave: (n) => {
1341
1352
  console.log("EditableText onSave called:", {
1342
- newTitle: r,
1353
+ newTitle: n,
1343
1354
  canEditDashboard: ce,
1344
1355
  dashboardId: i == null ? void 0 : i.id
1345
1356
  });
1346
1357
  const O = (i == null ? void 0 : i.title) || "";
1347
- m(r), oa(r, O);
1358
+ m(n), oa(n, O);
1348
1359
  },
1349
1360
  isEditable: ce && !v,
1350
1361
  displayClassName: "text-sm font-medium",
1351
1362
  inputClassName: "text-sm font-medium",
1352
1363
  placeholder: "Dashboard Title",
1353
- isPending: se.isPending
1364
+ isPending: ae.isPending
1354
1365
  }
1355
1366
  ),
1356
- fa && te && /* @__PURE__ */ e(za, { children: /* @__PURE__ */ a($a, { children: [
1367
+ fa && re && /* @__PURE__ */ e(za, { children: /* @__PURE__ */ a($a, { children: [
1357
1368
  /* @__PURE__ */ e(Ba, { asChild: !0, children: /* @__PURE__ */ e(
1358
1369
  L,
1359
1370
  {
@@ -1365,15 +1376,15 @@ function pn() {
1365
1376
  children: /* @__PURE__ */ e(
1366
1377
  Ka,
1367
1378
  {
1368
- className: Z(
1379
+ className: X(
1369
1380
  "h-4 w-4 transition-colors",
1370
- Me ? "fill-yellow-400 text-yellow-400" : "text-muted-foreground hover:text-yellow-400"
1381
+ Oe ? "fill-yellow-400 text-yellow-400" : "text-muted-foreground hover:text-yellow-400"
1371
1382
  )
1372
1383
  }
1373
1384
  )
1374
1385
  }
1375
1386
  ) }),
1376
- /* @__PURE__ */ e(Qa, { children: /* @__PURE__ */ e("p", { children: Me ? "Remove as default dashboard" : "Make this a default dashboard" }) })
1387
+ /* @__PURE__ */ e(Qa, { children: /* @__PURE__ */ e("p", { children: Oe ? "Remove as default dashboard" : "Make this a default dashboard" }) })
1377
1388
  ] }) })
1378
1389
  ] }))
1379
1390
  ] }),
@@ -1382,14 +1393,14 @@ function pn() {
1382
1393
  /* @__PURE__ */ e(ft, { className: "mr-2" }),
1383
1394
  /* @__PURE__ */ e(gt, { className: "h-7" })
1384
1395
  ] }),
1385
- n && !D && /* @__PURE__ */ a(k, { children: [
1396
+ r && !D && /* @__PURE__ */ a(k, { children: [
1386
1397
  /* @__PURE__ */ e(
1387
1398
  j,
1388
1399
  {
1389
1400
  tooltip: "Copy Token",
1390
1401
  onClick: () => {
1391
- var r;
1392
- s != null && s.accessToken && ((r = navigator == null ? void 0 : navigator.clipboard) != null && r.writeText ? navigator.clipboard.writeText(s.accessToken).then(() => E.success("Token copied to clipboard")).catch(() => E.error("Unable to copy token")) : E.error("Clipboard not available"));
1402
+ var n;
1403
+ s != null && s.accessToken && ((n = navigator == null ? void 0 : navigator.clipboard) != null && n.writeText ? navigator.clipboard.writeText(s.accessToken).then(() => E.success("Token copied to clipboard")).catch(() => E.error("Unable to copy token")) : E.error("Clipboard not available"));
1393
1404
  },
1394
1405
  className: "h-7 p-2",
1395
1406
  children: /* @__PURE__ */ e(Wa, { className: "h-4 w-4" })
@@ -1401,36 +1412,39 @@ function pn() {
1401
1412
  tooltip: "Invalidate Token",
1402
1413
  onClick: () => Ja(o.apiServiceUrl),
1403
1414
  className: "h-7 p-2",
1404
- children: /* @__PURE__ */ e(Et, { className: "h-4 w-4" })
1415
+ children: /* @__PURE__ */ e(At, { className: "h-4 w-4" })
1405
1416
  }
1406
1417
  )
1407
1418
  ] }),
1408
- !D && c && /* @__PURE__ */ e(Za, {}),
1419
+ !D && c && /* @__PURE__ */ e(Xa, {}),
1409
1420
  !D && c && /* @__PURE__ */ e(vt, {}),
1410
- !D && c && ((fs = J == null ? void 0 : J.permissions) == null ? void 0 : fs.canShare) && /* @__PURE__ */ e(
1421
+ !D && c && ((gs = J == null ? void 0 : J.permissions) == null ? void 0 : gs.canShare) && /* @__PURE__ */ e(
1411
1422
  j,
1412
1423
  {
1413
1424
  tooltip: "Share Dashboard",
1414
1425
  onClick: () => N(!0),
1415
1426
  className: "h-7 p-2",
1416
- children: /* @__PURE__ */ e(Xa, { className: "h-4 w-4" })
1427
+ children: /* @__PURE__ */ e(Za, { className: "h-4 w-4" })
1417
1428
  }
1418
1429
  ),
1419
- !Ws && !D && d && l.canUseFilters && c && /* @__PURE__ */ e(
1430
+ !D && d && l.canUseFilters && c && /* @__PURE__ */ a(
1420
1431
  L,
1421
1432
  {
1422
- className: "h-7 p-2",
1433
+ className: "h-7 px-2",
1423
1434
  variant: "outline",
1424
1435
  onClick: () => {
1425
- Js("dashboard", !1), Xs(!0);
1436
+ Ne || Js("dashboard", !1), Zs(!Ne);
1426
1437
  },
1427
1438
  size: "sm",
1428
- children: /* @__PURE__ */ e(Ya, { className: "h-4 w-4" })
1439
+ children: [
1440
+ Ne ? /* @__PURE__ */ e(Dt, { className: "mr-2 h-4 w-4" }) : /* @__PURE__ */ e(Ya, { className: "mr-2 h-4 w-4" }),
1441
+ "Filter"
1442
+ ]
1429
1443
  }
1430
1444
  ),
1431
- d && !D && me && n && c && /* @__PURE__ */ e(Ut, {}),
1432
- !D && me && n && c && /* @__PURE__ */ e(Gt, {}),
1433
- d && !D && me && v && n && c && /* @__PURE__ */ a(
1445
+ d && !D && me && r && c && /* @__PURE__ */ e(Gt, {}),
1446
+ !D && me && r && c && /* @__PURE__ */ e(Rt, {}),
1447
+ d && !D && me && v && r && c && /* @__PURE__ */ a(
1434
1448
  L,
1435
1449
  {
1436
1450
  className: "h-7 p-2",
@@ -1439,7 +1453,7 @@ function pn() {
1439
1453
  onClick: pa,
1440
1454
  size: "sm",
1441
1455
  children: [
1442
- /* @__PURE__ */ e(bs, { className: "mr-2 h-4 w-4" }),
1456
+ /* @__PURE__ */ e(ys, { className: "mr-2 h-4 w-4" }),
1443
1457
  "Save Lens"
1444
1458
  ]
1445
1459
  }
@@ -1451,9 +1465,9 @@ function pn() {
1451
1465
  className: "h-7 p-2",
1452
1466
  size: "sm",
1453
1467
  disabled: !d,
1454
- onClick: () => na(),
1468
+ onClick: () => ra(),
1455
1469
  children: [
1456
- /* @__PURE__ */ e(We, { className: "mr-2 h-4 w-4" }),
1470
+ /* @__PURE__ */ e(Je, { className: "mr-2 h-4 w-4" }),
1457
1471
  "Visual"
1458
1472
  ]
1459
1473
  }
@@ -1471,35 +1485,35 @@ function pn() {
1471
1485
  ]
1472
1486
  }
1473
1487
  ),
1474
- is && c && ls && /* @__PURE__ */ a(
1488
+ ls && c && cs && /* @__PURE__ */ a(
1475
1489
  L,
1476
1490
  {
1477
1491
  variant: "outline",
1478
1492
  className: "h-7 p-2",
1479
1493
  onClick: ma,
1480
1494
  size: "sm",
1481
- disabled: ae,
1495
+ disabled: te,
1482
1496
  children: [
1483
1497
  /* @__PURE__ */ e(st, { className: "mr-2 h-4 w-4" }),
1484
1498
  "Undo"
1485
1499
  ]
1486
1500
  }
1487
1501
  ),
1488
- is && c && /* @__PURE__ */ a("div", { className: "relative inline-flex", children: [
1502
+ ls && c && /* @__PURE__ */ a("div", { className: "relative inline-flex", children: [
1489
1503
  /* @__PURE__ */ a(
1490
1504
  L,
1491
1505
  {
1492
- className: Z("h-7 p-2", !Ae && "opacity-60"),
1493
- disabled: ae || !Ae,
1494
- onClick: () => ke(),
1506
+ className: X("h-7 p-2", !ke && "opacity-60"),
1507
+ disabled: te || !ke,
1508
+ onClick: () => Me(),
1495
1509
  size: "sm",
1496
1510
  children: [
1497
- ae ? /* @__PURE__ */ e(H, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(bs, { className: "mr-2 h-4 w-4" }),
1498
- ae ? "Saving..." : "Save"
1511
+ te ? /* @__PURE__ */ e(q, { className: "mr-2 h-4 w-4 animate-spin" }) : /* @__PURE__ */ e(ys, { className: "mr-2 h-4 w-4" }),
1512
+ te ? "Saving..." : "Save"
1499
1513
  ]
1500
1514
  }
1501
1515
  ),
1502
- Ae && !ae && /* @__PURE__ */ e(
1516
+ ke && !te && /* @__PURE__ */ e(
1503
1517
  "span",
1504
1518
  {
1505
1519
  "aria-hidden": "true",
@@ -1507,17 +1521,17 @@ function pn() {
1507
1521
  }
1508
1522
  )
1509
1523
  ] }),
1510
- !D && d && n && c && /* @__PURE__ */ e("div", { className: "flex items-center space-x-2", children: /* @__PURE__ */ e(
1524
+ !D && d && r && c && /* @__PURE__ */ e("div", { className: "flex items-center space-x-2", children: /* @__PURE__ */ e(
1511
1525
  L,
1512
1526
  {
1513
1527
  className: "h-7 p-2",
1514
- onClick: () => ns(!Zs),
1528
+ onClick: () => ns(!Xs),
1515
1529
  size: "sm",
1516
1530
  variant: "ghost",
1517
1531
  children: /* @__PURE__ */ e(at, { className: "h-4 w-4" })
1518
1532
  }
1519
1533
  ) }),
1520
- !D && n && /* @__PURE__ */ e(It, {}),
1534
+ !D && r && /* @__PURE__ */ e(Tt, {}),
1521
1535
  d && !D && c && /* @__PURE__ */ a(
1522
1536
  L,
1523
1537
  {
@@ -1525,42 +1539,42 @@ function pn() {
1525
1539
  className: "h-7 p-2",
1526
1540
  onClick: ca,
1527
1541
  children: [
1528
- /* @__PURE__ */ e(Cs, { className: "mr-2 h-4 w-4" }),
1542
+ /* @__PURE__ */ e(Ls, { className: "mr-2 h-4 w-4" }),
1529
1543
  "Close"
1530
1544
  ]
1531
1545
  }
1532
1546
  ),
1533
- !D && c && /* @__PURE__ */ a(ze, { children: [
1534
- /* @__PURE__ */ e($e, { asChild: !0, children: /* @__PURE__ */ e(j, { tooltip: "More Options", className: "h-7 p-2", children: /* @__PURE__ */ e(tt, { className: "h-4 w-4" }) }) }),
1535
- /* @__PURE__ */ a(Be, { align: "end", children: [
1536
- /* @__PURE__ */ a(q, { onClick: () => M(!0), children: [
1537
- /* @__PURE__ */ e(nt, { className: "mr-2 h-4 w-4" }),
1547
+ !D && c && /* @__PURE__ */ a($e, { children: [
1548
+ /* @__PURE__ */ e(Be, { asChild: !0, children: /* @__PURE__ */ e(j, { tooltip: "More Options", className: "h-7 p-2", children: /* @__PURE__ */ e(tt, { className: "h-4 w-4" }) }) }),
1549
+ /* @__PURE__ */ a(Ke, { align: "end", children: [
1550
+ /* @__PURE__ */ a(H, { onClick: () => M(!0), children: [
1551
+ /* @__PURE__ */ e(rt, { className: "mr-2 h-4 w-4" }),
1538
1552
  "Schedule Dashboard"
1539
1553
  ] }),
1540
- ta && /* @__PURE__ */ a(q, { onClick: () => I(!0), children: [
1554
+ ta && /* @__PURE__ */ a(H, { onClick: () => I(!0), children: [
1541
1555
  /* @__PURE__ */ e(V, { className: "mr-2 h-4 w-4" }),
1542
1556
  "Manage Groups"
1543
1557
  ] }),
1544
- /* @__PURE__ */ a(q, { onClick: () => R(!0), children: [
1545
- /* @__PURE__ */ e(rt, { className: "mr-2 h-4 w-4" }),
1558
+ /* @__PURE__ */ a(H, { onClick: () => R(!0), children: [
1559
+ /* @__PURE__ */ e(nt, { className: "mr-2 h-4 w-4" }),
1546
1560
  "Calendar Preferences"
1547
1561
  ] }),
1548
- /* @__PURE__ */ a(q, { onClick: () => x(!0), children: [
1562
+ /* @__PURE__ */ a(H, { onClick: () => x(!0), children: [
1549
1563
  /* @__PURE__ */ e(ot, { className: "mr-2 h-4 w-4" }),
1550
1564
  "Summary Settings"
1551
1565
  ] })
1552
1566
  ] })
1553
1567
  ] }),
1554
- y && os && /* @__PURE__ */ e(
1568
+ y && is && /* @__PURE__ */ e(
1555
1569
  it,
1556
1570
  {
1557
- resource: os,
1558
- resourceType: Oe.DASHBOARD,
1571
+ resource: is,
1572
+ resourceType: Ie.DASHBOARD,
1559
1573
  onClose: () => N(!1)
1560
1574
  }
1561
1575
  ),
1562
1576
  /* @__PURE__ */ e(
1563
- sn,
1577
+ ar,
1564
1578
  {
1565
1579
  open: A,
1566
1580
  onOpenChange: I
@@ -1589,27 +1603,27 @@ function pn() {
1589
1603
  onOpenChange: x,
1590
1604
  dashboard: i,
1591
1605
  disabled: !d,
1592
- onApply: (r) => Le({
1606
+ onApply: (n) => Ee({
1593
1607
  ...i,
1594
- summary: r
1608
+ summary: n
1595
1609
  })
1596
1610
  }
1597
1611
  ),
1598
1612
  /* @__PURE__ */ e(
1599
- Is,
1613
+ Ts,
1600
1614
  {
1601
1615
  open: B,
1602
- onOpenChange: (r) => {
1603
- !r && xe && !Q || (K(r), r || (W(null), C(!1)));
1616
+ onOpenChange: (n) => {
1617
+ !n && De && !Q || (K(n), n || (W(null), C(!1)));
1604
1618
  },
1605
- children: /* @__PURE__ */ a(Ts, { className: "max-w-sm", children: [
1606
- /* @__PURE__ */ a(_s, { children: [
1607
- /* @__PURE__ */ e(Us, { children: Q ? "Save failed" : "Saving dashboard" }),
1608
- /* @__PURE__ */ e(Gs, { className: "pt-2", children: Q ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." })
1619
+ children: /* @__PURE__ */ a(_s, { className: "max-w-sm", children: [
1620
+ /* @__PURE__ */ a(Us, { children: [
1621
+ /* @__PURE__ */ e(Gs, { children: Q ? "Save failed" : "Saving dashboard" }),
1622
+ /* @__PURE__ */ e(Rs, { className: "pt-2", children: Q ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." })
1609
1623
  ] }),
1610
- /* @__PURE__ */ e(Rs, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: Q ? /* @__PURE__ */ a(k, { children: [
1624
+ /* @__PURE__ */ e(Ps, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: Q ? /* @__PURE__ */ a(k, { children: [
1611
1625
  /* @__PURE__ */ e(
1612
- Ps,
1626
+ Fs,
1613
1627
  {
1614
1628
  onClick: () => {
1615
1629
  K(!1), W(null), C(!1);
@@ -1621,9 +1635,9 @@ function pn() {
1621
1635
  /* @__PURE__ */ e(
1622
1636
  qe,
1623
1637
  {
1624
- onClick: () => ke({
1638
+ onClick: () => Me({
1625
1639
  closeAfterSave: f,
1626
- navigateHomeAfterSave: ee === "home"
1640
+ navigateHomeAfterSave: se === "home"
1627
1641
  }),
1628
1642
  className: "m-0",
1629
1643
  children: "Retry"
@@ -1635,7 +1649,7 @@ function pn() {
1635
1649
  disabled: !0,
1636
1650
  className: "m-0 cursor-default",
1637
1651
  children: [
1638
- /* @__PURE__ */ e(H, { className: "mr-2 h-4 w-4 animate-spin" }),
1652
+ /* @__PURE__ */ e(q, { className: "mr-2 h-4 w-4 animate-spin" }),
1639
1653
  "Saving..."
1640
1654
  ]
1641
1655
  }
@@ -1646,15 +1660,15 @@ function pn() {
1646
1660
  /* @__PURE__ */ e(
1647
1661
  bt,
1648
1662
  {
1649
- open: ra,
1650
- onOpenChange: (r) => {
1651
- Y(r);
1663
+ open: na,
1664
+ onOpenChange: (n) => {
1665
+ ee(n);
1652
1666
  },
1653
1667
  onSave: da,
1654
1668
  onDiscard: ua,
1655
- isSaving: xe,
1656
- saveLabel: ee === "home" ? "Save & Return to Hub" : "Save & Close",
1657
- discardLabel: ee === "home" ? "Discard & Return to Hub" : "Discard"
1669
+ isSaving: De,
1670
+ saveLabel: se === "home" ? "Save & Return to Hub" : "Save & Close",
1671
+ discardLabel: se === "home" ? "Discard & Return to Hub" : "Discard"
1658
1672
  }
1659
1673
  )
1660
1674
  ] })
@@ -1663,5 +1677,5 @@ function pn() {
1663
1677
  );
1664
1678
  }
1665
1679
  export {
1666
- pn as default
1680
+ pr as default
1667
1681
  };