react-semaphor 0.1.306 → 0.1.308

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 (44) hide show
  1. package/dist/brand-studio/index.cjs +1 -1
  2. package/dist/brand-studio/index.js +4 -4
  3. package/dist/chunks/{braces-CuiOenEA.js → braces-BHDm9arh.js} +1 -1
  4. package/dist/chunks/{braces-DZxcgUvn.js → braces-DEq8EJtw.js} +1 -1
  5. package/dist/chunks/chevrons-up-down-Cbtggnqv.js +14 -0
  6. package/dist/chunks/chevrons-up-down-DDEY9beZ.js +6 -0
  7. package/dist/chunks/{dashboard-controls-CuQH4inS.js → dashboard-controls-DTxSUWvy.js} +279 -257
  8. package/dist/chunks/dashboard-controls-DviftQE7.js +57 -0
  9. package/dist/chunks/dashboard-filter-controls-button-D0nrJ7wl.js +11 -0
  10. package/dist/chunks/{dashboard-filter-controls-button-NiAIAD1P.js → dashboard-filter-controls-button-DHKfgPah.js} +304 -303
  11. package/dist/chunks/{dashboard-json-Bk13vadr.js → dashboard-json-DYzZ0G6T.js} +1 -1
  12. package/dist/chunks/{dashboard-json-DzVn9KAU.js → dashboard-json-DZmsUV5n.js} +2 -2
  13. package/dist/chunks/dashboard-summary-settings-dialog-Cc3yKCu4.js +1 -0
  14. package/dist/chunks/{dashboard-summary-settings-dialog-dt20G_7d.js → dashboard-summary-settings-dialog-QbUTp92u.js} +33 -32
  15. package/dist/chunks/{edit-dashboard-visual-DGhTFzSF.js → edit-dashboard-visual-BS3LKMJe.js} +32 -32
  16. package/dist/chunks/{edit-dashboard-visual-BIuWXuCC.js → edit-dashboard-visual-CmgculGv.js} +130 -129
  17. package/dist/chunks/{index-DQApwxKL.js → index-BxYIELMe.js} +62029 -63833
  18. package/dist/chunks/index-C0zD3JgK.js +1330 -0
  19. package/dist/chunks/{palette-DFjOzeAG.js → palette-CNKSAIrt.js} +1 -1
  20. package/dist/chunks/{palette-BwGE32UR.js → palette-CteErylX.js} +1 -1
  21. package/dist/chunks/{resource-management-panel-CD_TQoTn.js → resource-management-panel-8cHoj8SV.js} +52 -52
  22. package/dist/chunks/resource-management-panel-B4QM3fZ_.js +6 -0
  23. package/dist/chunks/{save-QktcpXPy.js → save-B1-nDZwS.js} +1 -1
  24. package/dist/chunks/{save-B3tqymYm.js → save-BVVnWGeb.js} +1 -1
  25. package/dist/chunks/{switch-B72T1Hf_.js → switch-BG4RWnrq.js} +2 -2
  26. package/dist/chunks/{switch-BuZXNXQV.js → switch-BZn7R_Cp.js} +634 -634
  27. package/dist/chunks/{use-create-flow-overlay-state-iUCs5ZgT.js → use-create-flow-overlay-state-Bmb471Fp.js} +1 -1
  28. package/dist/chunks/{use-create-flow-overlay-state-Bg-LkLP7.js → use-create-flow-overlay-state-CeWstFjy.js} +49 -49
  29. package/dist/chunks/{use-visual-utils-D_2r0Fmm.js → use-visual-utils-CmfDomt0.js} +2 -2
  30. package/dist/chunks/{use-visual-utils-DqVxN0_F.js → use-visual-utils-DflfgX9g.js} +1 -1
  31. package/dist/dashboard/index.cjs +1 -1
  32. package/dist/dashboard/index.js +1 -1
  33. package/dist/index.cjs +1 -1
  34. package/dist/index.js +76 -76
  35. package/dist/style.css +1 -1
  36. package/dist/surfboard/index.cjs +1 -1
  37. package/dist/surfboard/index.js +2 -2
  38. package/dist/types/main.d.ts +10 -4
  39. package/package.json +1 -1
  40. package/dist/chunks/dashboard-controls-BpgZjEDy.js +0 -47
  41. package/dist/chunks/dashboard-filter-controls-button-Bu90ytxy.js +0 -11
  42. package/dist/chunks/dashboard-summary-settings-dialog-8vZtKUjh.js +0 -1
  43. package/dist/chunks/index-CwzM5Lxh.js +0 -1360
  44. package/dist/chunks/resource-management-panel-BqJAVm7E.js +0 -6
@@ -1,26 +1,26 @@
1
1
  import { jsx as e, jsxs as c, Fragment as T } from "react/jsx-runtime";
2
- import { c as X, u as S, B as L, aI as Nt, m as St, L as dt, I as ue, a as J, aJ as Re, aK as da, aL as ua, E as ls, f as Y, aM as ds, aN as us, aO as ut, T as ma, q as ha, r as _e, t as Ue, s as mt, aP as pa, aQ as ms, n as ta, z as hs, A as ps, D as fs, F as gs, K as vs, aR as bs } from "./switch-BuZXNXQV.js";
3
- import { c5 as ys, u as j, b as Ge, c6 as xs, bl as ht, c as $e, d as Ve, e as ze, f as wt, o as Ns, c7 as de, by as Te, c8 as Ss, c9 as aa, ca as fa, cb as ga, cc as ws, bO as Dt, cd as Ds, ce as Cs, cf as Es, cg as Is, ch as As, ci as Ls, r as qe, z as Be, p as A, bV as Ms, cj as Os, ck as ks, bS as pt, cl as ft, bx as Ct, bc as va, cm as gt, ba, cn as Ps, bF as ya, bG as xa, bH as Na, bI as Sa, bJ as wa, bK as Da, bL as Ca, bM as vt, co as Ts, cp as _s, cq as Us, bp as Fs, cr as Rs, cs as Gs, X as $s, W as ke, ct as Vs, a1 as zs, Y as nt, cu as qs, cv as Bs, cw as Hs, ad as js, cx as Ks, L as rt, cy as Qs, cz as Ws, cA as Js, c4 as Ys, cB as Xs, bq as Zs, br as en, bs as tn, bt as an, bu as $, bZ as sn, N as nn, bA as rn, cC as on, bv as sa, cD as cn, cE as ln, cF as dn, a0 as un, O as mn, cG as hn, K as bt } from "./index-DQApwxKL.js";
4
- import * as M from "react";
2
+ import { c as j, u as w, B as L, aI as Nt, m as wt, L as dt, I as ue, a as Y, aJ as Re, aK as da, aL as ua, E as ls, f as X, aM as ds, aN as us, aO as ut, T as ma, q as ha, r as _e, t as Ue, s as mt, aP as pa, aQ as ms, n as ta, z as hs, A as ps, D as fs, F as gs, K as vs, aR as bs } from "./switch-BZn7R_Cp.js";
3
+ import { c4 as ys, u as K, b as Ge, c5 as xs, bk as ht, c as $e, d as Ve, e as qe, f as St, n as Ns, c6 as de, bx as Te, c7 as ws, c8 as aa, c9 as fa, ca as ga, cb as Ss, bN as Dt, cc as Ds, cd as Cs, ce as Es, cf as Is, cg as Ms, ch as Ls, q as ze, M as Be, o as M, bU as As, ci as ks, cj as Os, bR as pt, ck as ft, bw as Ct, bb as va, b9 as ba, cl as Ps, bE as ya, bF as xa, bG as Na, bH as wa, bI as Sa, bJ as Da, bK as Ca, bL as gt, cm as Ts, cn as _s, co as Us, bo as Fs, cp as Rs, cq as Gs, W as $s, V as Oe, cr as Vs, a0 as qs, X as nt, cs as zs, ct as Bs, cu as Hs, ac as js, cv as Ks, I as rt, cw as Qs, cx as Ws, cy as Js, c3 as Ys, bp as Xs, bq as Zs, br as en, bs as tn, bt as $, bY as an, K as sn, bz as nn, cz as rn, bu as sa, cA as on, cB as cn, cC as ln, $ as dn, L as un, cD as mn, H as vt } from "./index-BxYIELMe.js";
4
+ import * as A from "react";
5
5
  import Ea, { useState as N, useMemo as F, useCallback as Fe, useEffect as ot } from "react";
6
6
  import "./index-CJdxSyQq.js";
7
7
  import "react-dom";
8
- import { b as pn, u as fn, A as gn, V as vn, c as bn, D as yn, N as xn, U as Nn } from "./dashboard-filter-controls-button-NiAIAD1P.js";
9
- import { d as Sn } from "./index-DFOb_6HB.js";
10
- import { C as wn, D as Dn } from "./dashboard-summary-settings-dialog-dt20G_7d.js";
11
- import { u as Cn } from "./use-debounced-dirty-check-BwAbnX_5.js";
8
+ import { b as hn, u as pn, A as fn, V as gn, c as vn, D as bn, N as yn, U as xn } from "./dashboard-filter-controls-button-DHKfgPah.js";
9
+ import { d as Nn } from "./index-DFOb_6HB.js";
10
+ import { C as wn, D as Sn } from "./dashboard-summary-settings-dialog-QbUTp92u.js";
11
+ import { u as Dn } from "./use-debounced-dirty-check-BwAbnX_5.js";
12
12
  import { s as it } from "./normalize-dashboard-for-dirty-check-5KpZN8xr.js";
13
- import { u as En, e as In } from "./use-create-flow-overlay-state-Bg-LkLP7.js";
14
- import { S as na } from "./save-QktcpXPy.js";
15
- import { P as An } from "./palette-DFjOzeAG.js";
16
- import { B as Ln } from "./braces-DZxcgUvn.js";
13
+ import { u as Cn, e as En } from "./use-create-flow-overlay-state-CeWstFjy.js";
14
+ import { S as na } from "./save-B1-nDZwS.js";
15
+ import { P as In } from "./palette-CNKSAIrt.js";
16
+ import { B as Mn } from "./braces-DEq8EJtw.js";
17
17
  /**
18
18
  * @license lucide-react v0.453.0 - ISC
19
19
  *
20
20
  * This source code is licensed under the ISC license.
21
21
  * See the LICENSE file in the root directory of this source tree.
22
22
  */
23
- const Mn = X("Glasses", [
23
+ const Ln = j("Glasses", [
24
24
  ["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
25
25
  ["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
26
26
  ["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
@@ -33,7 +33,7 @@ const Mn = X("Glasses", [
33
33
  * This source code is licensed under the ISC license.
34
34
  * See the LICENSE file in the root directory of this source tree.
35
35
  */
36
- const On = X("Menu", [
36
+ const An = j("Menu", [
37
37
  ["line", { x1: "4", x2: "20", y1: "12", y2: "12", key: "1e0a9i" }],
38
38
  ["line", { x1: "4", x2: "20", y1: "6", y2: "6", key: "1owob3" }],
39
39
  ["line", { x1: "4", x2: "20", y1: "18", y2: "18", key: "yk5zj1" }]
@@ -44,7 +44,7 @@ const On = X("Menu", [
44
44
  * This source code is licensed under the ISC license.
45
45
  * See the LICENSE file in the root directory of this source tree.
46
46
  */
47
- const kn = X("Monitor", [
47
+ const kn = j("Monitor", [
48
48
  ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
49
49
  ["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
50
50
  ["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
@@ -55,7 +55,7 @@ const kn = X("Monitor", [
55
55
  * This source code is licensed under the ISC license.
56
56
  * See the LICENSE file in the root directory of this source tree.
57
57
  */
58
- const Pn = X("Moon", [
58
+ const On = j("Moon", [
59
59
  ["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
60
60
  ]);
61
61
  /**
@@ -64,7 +64,7 @@ const Pn = X("Moon", [
64
64
  * This source code is licensed under the ISC license.
65
65
  * See the LICENSE file in the root directory of this source tree.
66
66
  */
67
- const Tn = X("ShieldX", [
67
+ const Pn = j("ShieldX", [
68
68
  [
69
69
  "path",
70
70
  {
@@ -81,7 +81,7 @@ const Tn = X("ShieldX", [
81
81
  * This source code is licensed under the ISC license.
82
82
  * See the LICENSE file in the root directory of this source tree.
83
83
  */
84
- const _n = X("Sun", [
84
+ const Tn = j("Sun", [
85
85
  ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
86
86
  ["path", { d: "M12 2v2", key: "tus03m" }],
87
87
  ["path", { d: "M12 20v2", key: "1lh1kg" }],
@@ -92,6 +92,28 @@ const _n = X("Sun", [
92
92
  ["path", { d: "m6.34 17.66-1.41 1.41", key: "1m8zz5" }],
93
93
  ["path", { d: "m19.07 4.93-1.41 1.41", key: "1shlcs" }]
94
94
  ]);
95
+ /**
96
+ * @license lucide-react v0.453.0 - ISC
97
+ *
98
+ * This source code is licensed under the ISC license.
99
+ * See the LICENSE file in the root directory of this source tree.
100
+ */
101
+ const _n = j("Undo2", [
102
+ ["path", { d: "M9 14 4 9l5-5", key: "102s5s" }],
103
+ ["path", { d: "M4 9h10.5a5.5 5.5 0 0 1 5.5 5.5a5.5 5.5 0 0 1-5.5 5.5H11", key: "f3b9sd" }]
104
+ ]);
105
+ /**
106
+ * @license lucide-react v0.453.0 - ISC
107
+ *
108
+ * This source code is licensed under the ISC license.
109
+ * See the LICENSE file in the root directory of this source tree.
110
+ */
111
+ const bt = j("UserPlus", [
112
+ ["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
113
+ ["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
114
+ ["line", { x1: "19", x2: "19", y1: "8", y2: "14", key: "1bvyxn" }],
115
+ ["line", { x1: "22", x2: "16", y1: "11", y2: "11", key: "1shjgl" }]
116
+ ]);
95
117
  var yt = { exports: {} }, ct = {};
96
118
  /**
97
119
  * @license React
@@ -173,16 +195,16 @@ function Fn() {
173
195
  D = l({
174
196
  inst: { value: b, getSnapshot: r }
175
197
  });
176
- var w = D[0].inst, C = D[1];
198
+ var S = D[0].inst, C = D[1];
177
199
  return g(
178
200
  function() {
179
- w.value = b, w.getSnapshot = r, n(w) && C({ inst: w });
201
+ S.value = b, S.getSnapshot = r, n(S) && C({ inst: S });
180
202
  },
181
203
  [d, b, r]
182
204
  ), p(
183
205
  function() {
184
- return n(w) && C({ inst: w }), d(function() {
185
- n(w) && C({ inst: w });
206
+ return n(S) && C({ inst: S }), d(function() {
207
+ n(S) && C({ inst: S });
186
208
  });
187
209
  },
188
210
  [d]
@@ -210,14 +232,14 @@ process.env.NODE_ENV === "production" ? yt.exports = Un() : yt.exports = Fn();
210
232
  var Rn = yt.exports;
211
233
  const Pe = ["light", "dark", "system"];
212
234
  function Gn() {
213
- const { theme: t, setTheme: a } = ys(), n = S(
235
+ const { theme: t, setTheme: a } = ys(), n = w(
214
236
  (l) => l.actions.setDashboardTheme
215
237
  );
216
238
  function s() {
217
239
  const l = Pe.includes(t) ? t : "system", p = Pe[(Pe.indexOf(l) + 1) % Pe.length];
218
240
  a(p), n(p);
219
241
  }
220
- const i = t === "light" ? _n : t === "dark" ? Pn : kn, u = t === "light" ? "Theme: light (click for dark)" : t === "dark" ? "Theme: dark (click for system)" : "Theme: system (click for light)";
242
+ const i = t === "light" ? Tn : t === "dark" ? On : kn, u = t === "light" ? "Theme: light (click for dark)" : t === "dark" ? "Theme: dark (click for system)" : "Theme: system (click for light)";
221
243
  return /* @__PURE__ */ e(
222
244
  L,
223
245
  {
@@ -265,21 +287,21 @@ async function Vn(t, a, n) {
265
287
  lensId: a
266
288
  });
267
289
  }
268
- const zn = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
269
- function qn({
290
+ const qn = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
291
+ function zn({
270
292
  open: t,
271
293
  onOpenChange: a
272
294
  } = {}) {
273
- const [n, s] = N(""), [i, u] = N(!1), l = S((I) => I.lenses), { setLenses: p, setSelectedLensId: g } = St(), [v, m] = N(!1), [f, h] = N(!1), d = t !== void 0, r = d ? t : f, b = (I) => {
295
+ const [n, s] = N(""), [i, u] = N(!1), l = w((I) => I.lenses), { setLenses: p, setSelectedLensId: g } = wt(), [v, m] = N(!1), [f, h] = N(!1), d = t !== void 0, r = d ? t : f, b = (I) => {
274
296
  d || h(I), a == null || a(I);
275
- }, D = S((I) => I.dashboard), w = S((I) => I.filterValues), { authToken: C, tokenProps: E } = j();
276
- async function O() {
297
+ }, D = w((I) => I.dashboard), S = w((I) => I.filterValues), { authToken: C, tokenProps: E } = K();
298
+ async function k() {
277
299
  m(!0);
278
300
  const I = await $n(
279
301
  E.apiServiceUrl,
280
302
  n,
281
303
  D,
282
- w,
304
+ S,
283
305
  C == null ? void 0 : C.accessToken
284
306
  );
285
307
  I && (p([...l || [], I]), g(I.id), b(!1)), m(!1);
@@ -291,11 +313,11 @@ function qn({
291
313
  ] }) }),
292
314
  /* @__PURE__ */ c($e, { className: "rounded-control border-border/60 sm:max-w-[420px] sm:rounded-control", children: [
293
315
  /* @__PURE__ */ c(Ve, { children: [
294
- /* @__PURE__ */ e(ze, { className: "text-[15px]", children: "Create lens" }),
295
- /* @__PURE__ */ e(wt, { className: "text-[13px] leading-5", children: "Lenses are private by default and are only visible to you." })
316
+ /* @__PURE__ */ e(qe, { className: "text-[15px]", children: "Create lens" }),
317
+ /* @__PURE__ */ e(St, { className: "text-[13px] leading-5", children: "Lenses are private by default and are only visible to you." })
296
318
  ] }),
297
319
  /* @__PURE__ */ c("div", { className: "space-y-1.5 py-1", children: [
298
- /* @__PURE__ */ e(dt, { htmlFor: "lens-name", className: zn, children: "Name" }),
320
+ /* @__PURE__ */ e(dt, { htmlFor: "lens-name", className: qn, children: "Name" }),
299
321
  /* @__PURE__ */ e(
300
322
  ue,
301
323
  {
@@ -315,7 +337,7 @@ function qn({
315
337
  {
316
338
  size: "xs",
317
339
  type: "submit",
318
- onClick: O,
340
+ onClick: k,
319
341
  disabled: v || !n.trim(),
320
342
  children: v ? "Creating…" : "Create"
321
343
  }
@@ -325,7 +347,7 @@ function qn({
325
347
  ] });
326
348
  }
327
349
  function Bn({ includeLabel: t = !1 } = {}) {
328
- const a = S((m) => m.lenses), n = S((m) => m.selectedLensId), { setLenses: s, setSelectedLensId: i } = St(), { authToken: u, tokenProps: l } = j();
350
+ const a = w((m) => m.lenses), n = w((m) => m.selectedLensId), { setLenses: s, setSelectedLensId: i } = wt(), { authToken: u, tokenProps: l } = K();
329
351
  async function p(m) {
330
352
  i(m);
331
353
  }
@@ -364,7 +386,7 @@ function Bn({ includeLabel: t = !1 } = {}) {
364
386
  /* @__PURE__ */ e(Te, {})
365
387
  ] }) : null,
366
388
  /* @__PURE__ */ c(
367
- Ss,
389
+ ws,
368
390
  {
369
391
  value: n,
370
392
  onValueChange: p,
@@ -384,7 +406,7 @@ function Bn({ includeLabel: t = !1 } = {}) {
384
406
  onClick: (f) => {
385
407
  f.preventDefault(), v(m);
386
408
  },
387
- className: J(
409
+ className: Y(
388
410
  "size-3.5 text-muted-foreground hover:cursor-pointer hover:text-foreground group-hover:visible",
389
411
  {
390
412
  invisible: !m.isDefault,
@@ -415,7 +437,7 @@ function Bn({ includeLabel: t = !1 } = {}) {
415
437
  ] });
416
438
  }
417
439
  function Hn() {
418
- const { displayPreferences: t, shouldShowElement: a } = ws(), { currentUser: n, userContext: s } = Dt(), i = F(
440
+ const { displayPreferences: t, shouldShowElement: a } = Ss(), { currentUser: n, userContext: s } = Dt(), i = F(
419
441
  () => Ds(n),
420
442
  [n]
421
443
  ), u = F(() => (p) => i && i[p] !== void 0 && i[p] === !1 ? !1 : a(p), [i, a, t]), l = F(
@@ -423,7 +445,7 @@ function Hn() {
423
445
  var p, g, v, m, f;
424
446
  return {
425
447
  canEdit: ((p = s == null ? void 0 : s.permissions) == null ? void 0 : p.canEdit) ?? Ls(n),
426
- canUseFilters: ((g = s == null ? void 0 : s.permissions) == null ? void 0 : g.canEdit) ?? As(n),
448
+ canUseFilters: ((g = s == null ? void 0 : s.permissions) == null ? void 0 : g.canEdit) ?? Ms(n),
427
449
  canManageDashboards: ((v = s == null ? void 0 : s.permissions) == null ? void 0 : v.canCreateDashboard) ?? Is(n),
428
450
  canCreateDashboards: ((m = s == null ? void 0 : s.permissions) == null ? void 0 : m.canCreateDashboard) ?? Es(n),
429
451
  canAccessVisuals: ((f = s == null ? void 0 : s.permissions) == null ? void 0 : f.canEdit) ?? Cs(n)
@@ -452,35 +474,35 @@ const jn = async (t, a, n) => {
452
474
  await da(i, a, "DELETE", s);
453
475
  };
454
476
  function Jn() {
455
- const { authToken: t, tokenProps: a } = j(), n = qe();
477
+ const { authToken: t, tokenProps: a } = K(), n = ze();
456
478
  return Be({
457
479
  mutationFn: (s) => jn(a.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", s),
458
480
  onSuccess: () => {
459
- n.invalidateQueries({ queryKey: ["groups"] }), A.success("Group created successfully");
481
+ n.invalidateQueries({ queryKey: ["groups"] }), M.success("Group created successfully");
460
482
  },
461
483
  onError: (s) => {
462
- console.error("Failed to create group:", s), A.error("Failed to create group", {
484
+ console.error("Failed to create group:", s), M.error("Failed to create group", {
463
485
  description: Re(s, "Failed to create group")
464
486
  });
465
487
  }
466
488
  });
467
489
  }
468
490
  function Yn() {
469
- const { authToken: t, tokenProps: a } = j(), n = qe();
491
+ const { authToken: t, tokenProps: a } = K(), n = ze();
470
492
  return Be({
471
493
  mutationFn: (s) => Kn(a.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", s),
472
494
  onSuccess: (s, i) => {
473
- n.invalidateQueries({ queryKey: ["groups"] }), n.removeQueries({ queryKey: ["group", i] }), A.success("Group deleted successfully");
495
+ n.invalidateQueries({ queryKey: ["groups"] }), n.removeQueries({ queryKey: ["group", i] }), M.success("Group deleted successfully");
474
496
  },
475
497
  onError: (s) => {
476
- console.error("Failed to delete group:", s), A.error("Failed to delete group", {
498
+ console.error("Failed to delete group:", s), M.error("Failed to delete group", {
477
499
  description: Re(s, "Failed to delete group")
478
500
  });
479
501
  }
480
502
  });
481
503
  }
482
504
  function Xn() {
483
- const { authToken: t, tokenProps: a } = j(), n = qe();
505
+ const { authToken: t, tokenProps: a } = K(), n = ze();
484
506
  return Be({
485
507
  mutationFn: ({
486
508
  groupId: s,
@@ -489,17 +511,17 @@ function Xn() {
489
511
  onSuccess: (s, i) => {
490
512
  n.invalidateQueries({ queryKey: ["group", i.groupId] }), n.invalidateQueries({
491
513
  queryKey: ["group-members", i.groupId]
492
- }), n.invalidateQueries({ queryKey: ["groups"] }), A.success("Members added successfully");
514
+ }), n.invalidateQueries({ queryKey: ["groups"] }), M.success("Members added successfully");
493
515
  },
494
516
  onError: (s) => {
495
- console.error("Failed to add group members:", s), A.error("Failed to add members", {
517
+ console.error("Failed to add group members:", s), M.error("Failed to add members", {
496
518
  description: Re(s, "Failed to add members")
497
519
  });
498
520
  }
499
521
  });
500
522
  }
501
523
  function Zn() {
502
- const { authToken: t, tokenProps: a } = j(), n = qe();
524
+ const { authToken: t, tokenProps: a } = K(), n = ze();
503
525
  return Be({
504
526
  mutationFn: ({
505
527
  groupId: s,
@@ -508,10 +530,10 @@ function Zn() {
508
530
  onSuccess: (s, i) => {
509
531
  n.invalidateQueries({ queryKey: ["group", i.groupId] }), n.invalidateQueries({
510
532
  queryKey: ["group-members", i.groupId]
511
- }), n.invalidateQueries({ queryKey: ["groups"] }), A.success("Members removed successfully");
533
+ }), n.invalidateQueries({ queryKey: ["groups"] }), M.success("Members removed successfully");
512
534
  },
513
535
  onError: (s) => {
514
- console.error("Failed to remove group members:", s), A.error("Failed to remove members", {
536
+ console.error("Failed to remove group members:", s), M.error("Failed to remove members", {
515
537
  description: Re(s, "Failed to remove members")
516
538
  });
517
539
  }
@@ -565,7 +587,7 @@ function er({
565
587
  /* @__PURE__ */ c("div", { className: "space-y-1.5", children: [
566
588
  /* @__PURE__ */ e(dt, { htmlFor: "group-description", className: ia, children: "Description (optional)" }),
567
589
  /* @__PURE__ */ e(
568
- Ms,
590
+ As,
569
591
  {
570
592
  id: "group-description",
571
593
  placeholder: "Describe the purpose of this group…",
@@ -608,7 +630,7 @@ function er({
608
630
  size: "xs",
609
631
  disabled: v.isPending || !s.trim(),
610
632
  children: v.isPending ? /* @__PURE__ */ c(T, { children: [
611
- /* @__PURE__ */ e(Y, { className: "h-3.5 w-3.5 animate-spin" }),
633
+ /* @__PURE__ */ e(X, { className: "h-3.5 w-3.5 animate-spin" }),
612
634
  "Creating…"
613
635
  ] }) : "Create group"
614
636
  }
@@ -619,19 +641,19 @@ function er({
619
641
  function tr(t, a = []) {
620
642
  let n = [];
621
643
  function s(u, l) {
622
- const p = M.createContext(l);
644
+ const p = A.createContext(l);
623
645
  p.displayName = u + "Context";
624
646
  const g = n.length;
625
647
  n = [...n, l];
626
648
  const v = (f) => {
627
- var w;
628
- const { scope: h, children: d, ...r } = f, b = ((w = h == null ? void 0 : h[t]) == null ? void 0 : w[g]) || p, D = M.useMemo(() => r, Object.values(r));
649
+ var S;
650
+ const { scope: h, children: d, ...r } = f, b = ((S = h == null ? void 0 : h[t]) == null ? void 0 : S[g]) || p, D = A.useMemo(() => r, Object.values(r));
629
651
  return /* @__PURE__ */ e(b.Provider, { value: D, children: d });
630
652
  };
631
653
  v.displayName = u + "Provider";
632
654
  function m(f, h) {
633
655
  var b;
634
- const d = ((b = h == null ? void 0 : h[t]) == null ? void 0 : b[g]) || p, r = M.useContext(d);
656
+ const d = ((b = h == null ? void 0 : h[t]) == null ? void 0 : b[g]) || p, r = A.useContext(d);
635
657
  if (r) return r;
636
658
  if (l !== void 0) return l;
637
659
  throw new Error(`\`${f}\` must be used within \`${u}\``);
@@ -639,10 +661,10 @@ function tr(t, a = []) {
639
661
  return [v, m];
640
662
  }
641
663
  const i = () => {
642
- const u = n.map((l) => M.createContext(l));
664
+ const u = n.map((l) => A.createContext(l));
643
665
  return function(p) {
644
666
  const g = (p == null ? void 0 : p[t]) || u;
645
- return M.useMemo(
667
+ return A.useMemo(
646
668
  () => ({ [`__scope${t}`]: { ...p, [t]: g } }),
647
669
  [p, g]
648
670
  );
@@ -663,7 +685,7 @@ function ar(...t) {
663
685
  const f = g(u)[`__scope${v}`];
664
686
  return { ...p, ...f };
665
687
  }, {});
666
- return M.useMemo(() => ({ [`__scope${a.scopeName}`]: l }), [l]);
688
+ return A.useMemo(() => ({ [`__scope${a.scopeName}`]: l }), [l]);
667
689
  };
668
690
  };
669
691
  return n.scopeName = a.scopeName, n;
@@ -687,7 +709,7 @@ var sr = [
687
709
  "svg",
688
710
  "ul"
689
711
  ], Et = sr.reduce((t, a) => {
690
- const n = ds(`Primitive.${a}`), s = M.forwardRef((i, u) => {
712
+ const n = ds(`Primitive.${a}`), s = A.forwardRef((i, u) => {
691
713
  const { asChild: l, ...p } = i, g = l ? n : a;
692
714
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ e(g, { ...p, ref: u });
693
715
  });
@@ -704,9 +726,9 @@ function rr() {
704
726
  return () => {
705
727
  };
706
728
  }
707
- var It = "Avatar", [or] = tr(It), [ir, Ia] = or(It), Aa = M.forwardRef(
729
+ var It = "Avatar", [or] = tr(It), [ir, Ia] = or(It), Ma = A.forwardRef(
708
730
  (t, a) => {
709
- const { __scopeAvatar: n, ...s } = t, [i, u] = M.useState("idle");
731
+ const { __scopeAvatar: n, ...s } = t, [i, u] = A.useState("idle");
710
732
  return /* @__PURE__ */ e(
711
733
  ir,
712
734
  {
@@ -718,8 +740,8 @@ var It = "Avatar", [or] = tr(It), [ir, Ia] = or(It), Aa = M.forwardRef(
718
740
  );
719
741
  }
720
742
  );
721
- Aa.displayName = It;
722
- var La = "AvatarImage", Ma = M.forwardRef(
743
+ Ma.displayName = It;
744
+ var La = "AvatarImage", Aa = A.forwardRef(
723
745
  (t, a) => {
724
746
  const { __scopeAvatar: n, src: s, onLoadingStatusChange: i = () => {
725
747
  }, ...u } = t, l = Ia(La, n), p = cr(s, u), g = us((v) => {
@@ -730,11 +752,11 @@ var La = "AvatarImage", Ma = M.forwardRef(
730
752
  }, [p, g]), p === "loaded" ? /* @__PURE__ */ e(Et.img, { ...u, ref: a, src: s }) : null;
731
753
  }
732
754
  );
733
- Ma.displayName = La;
734
- var Oa = "AvatarFallback", ka = M.forwardRef(
755
+ Aa.displayName = La;
756
+ var ka = "AvatarFallback", Oa = A.forwardRef(
735
757
  (t, a) => {
736
- const { __scopeAvatar: n, delayMs: s, ...i } = t, u = Ia(Oa, n), [l, p] = M.useState(s === void 0);
737
- return M.useEffect(() => {
758
+ const { __scopeAvatar: n, delayMs: s, ...i } = t, u = Ia(ka, n), [l, p] = A.useState(s === void 0);
759
+ return A.useEffect(() => {
738
760
  if (s !== void 0) {
739
761
  const g = window.setTimeout(() => p(!0), s);
740
762
  return () => window.clearTimeout(g);
@@ -742,12 +764,12 @@ var Oa = "AvatarFallback", ka = M.forwardRef(
742
764
  }, [s]), l && u.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(Et.span, { ...i, ref: a }) : null;
743
765
  }
744
766
  );
745
- ka.displayName = Oa;
767
+ Oa.displayName = ka;
746
768
  function ca(t, a) {
747
769
  return t ? a ? (t.src !== a && (t.src = a), t.complete && t.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
748
770
  }
749
771
  function cr(t, { referrerPolicy: a, crossOrigin: n }) {
750
- const s = nr(), i = M.useRef(null), u = s ? (i.current || (i.current = new window.Image()), i.current) : null, [l, p] = M.useState(
772
+ const s = nr(), i = A.useRef(null), u = s ? (i.current || (i.current = new window.Image()), i.current) : null, [l, p] = A.useState(
751
773
  () => ca(u, t)
752
774
  );
753
775
  return ut(() => {
@@ -763,33 +785,33 @@ function cr(t, { referrerPolicy: a, crossOrigin: n }) {
763
785
  };
764
786
  }, [u, n, a]), l;
765
787
  }
766
- var Pa = Aa, Ta = Ma, _a = ka;
767
- const At = M.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
788
+ var Pa = Ma, Ta = Aa, _a = Oa;
789
+ const Mt = A.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
768
790
  Pa,
769
791
  {
770
792
  ref: n,
771
- className: J(
793
+ className: Y(
772
794
  "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
773
795
  t
774
796
  ),
775
797
  ...a
776
798
  }
777
799
  ));
778
- At.displayName = Pa.displayName;
779
- const lr = M.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
800
+ Mt.displayName = Pa.displayName;
801
+ const lr = A.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
780
802
  Ta,
781
803
  {
782
804
  ref: n,
783
- className: J("aspect-square h-full w-full", t),
805
+ className: Y("aspect-square h-full w-full", t),
784
806
  ...a
785
807
  }
786
808
  ));
787
809
  lr.displayName = Ta.displayName;
788
- const Lt = M.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
810
+ const Lt = A.forwardRef(({ className: t, ...a }, n) => /* @__PURE__ */ e(
789
811
  _a,
790
812
  {
791
813
  ref: n,
792
- className: J(
814
+ className: Y(
793
815
  "flex h-full w-full items-center justify-center rounded-full bg-muted",
794
816
  t
795
817
  ),
@@ -803,30 +825,30 @@ function dr({
803
825
  group: n,
804
826
  onUpdate: s
805
827
  }) {
806
- const [i, u] = N("members"), [l, p] = N(""), [g, v] = N([]), [m, f] = N([]), { data: h, isLoading: d, refetch: r } = Os(n.id), b = n.type === "TENANT_GROUP" ? "tenant" : "organization", { users: D, isLoading: w } = ks({
828
+ const [i, u] = N("members"), [l, p] = N(""), [g, v] = N([]), [m, f] = N([]), { data: h, isLoading: d, refetch: r } = ks(n.id), b = n.type === "TENANT_GROUP" ? "tenant" : "organization", { users: D, isLoading: S } = Os({
807
829
  type: b,
808
830
  tenantId: n.tenantId || void 0,
809
831
  active: !0,
810
832
  limit: 100
811
- }), C = Xn(), E = Zn(), O = (h == null ? void 0 : h.members) || [], I = F(() => new Set(O.map((y) => y.userId)), [O]), V = F(() => D.filter((y) => !I.has(y.id)), [D, I]), z = F(() => {
833
+ }), C = Xn(), E = Zn(), k = (h == null ? void 0 : h.members) || [], I = F(() => new Set(k.map((y) => y.userId)), [k]), V = F(() => D.filter((y) => !I.has(y.id)), [D, I]), q = F(() => {
812
834
  if (!l) return V;
813
835
  const y = l.toLowerCase();
814
836
  return V.filter(
815
- (k) => {
837
+ (O) => {
816
838
  var G, H;
817
- return ((G = k.name) == null ? void 0 : G.toLowerCase().includes(y)) || ((H = k.email) == null ? void 0 : H.toLowerCase().includes(y));
839
+ return ((G = O.name) == null ? void 0 : G.toLowerCase().includes(y)) || ((H = O.email) == null ? void 0 : H.toLowerCase().includes(y));
818
840
  }
819
841
  );
820
842
  }, [V, l]), x = F(() => {
821
- if (!l) return O;
843
+ if (!l) return k;
822
844
  const y = l.toLowerCase();
823
- return O.filter(
824
- (k) => {
845
+ return k.filter(
846
+ (O) => {
825
847
  var G, H, me, te;
826
- return ((H = (G = k.user) == null ? void 0 : G.name) == null ? void 0 : H.toLowerCase().includes(y)) || ((te = (me = k.user) == null ? void 0 : me.email) == null ? void 0 : te.toLowerCase().includes(y));
848
+ return ((H = (G = O.user) == null ? void 0 : G.name) == null ? void 0 : H.toLowerCase().includes(y)) || ((te = (me = O.user) == null ? void 0 : me.email) == null ? void 0 : te.toLowerCase().includes(y));
827
849
  }
828
850
  );
829
- }, [O, l]), B = async () => {
851
+ }, [k, l]), B = async () => {
830
852
  if (g.length !== 0)
831
853
  try {
832
854
  await C.mutateAsync({
@@ -839,7 +861,7 @@ function dr({
839
861
  } catch (y) {
840
862
  console.error("Failed to add members:", y);
841
863
  }
842
- }, Q = async () => {
864
+ }, W = async () => {
843
865
  if (m.length !== 0)
844
866
  try {
845
867
  await E.mutateAsync({
@@ -853,20 +875,20 @@ function dr({
853
875
  }
854
876
  }, Z = (y) => {
855
877
  v(
856
- (k) => k.includes(y) ? k.filter((G) => G !== y) : [...k, y]
878
+ (O) => O.includes(y) ? O.filter((G) => G !== y) : [...O, y]
857
879
  );
858
880
  }, ee = (y) => {
859
881
  f(
860
- (k) => k.includes(y) ? k.filter((G) => G !== y) : [...k, y]
882
+ (O) => O.includes(y) ? O.filter((G) => G !== y) : [...O, y]
861
883
  );
862
884
  };
863
885
  return /* @__PURE__ */ e(T, { children: /* @__PURE__ */ e(Ge, { open: t, onOpenChange: a, children: /* @__PURE__ */ c($e, { className: "max-w-3xl max-h-[80vh]", "aria-describedby": "group-members-description", children: [
864
886
  /* @__PURE__ */ c(Ve, { children: [
865
- /* @__PURE__ */ e(ze, { children: n.name }),
887
+ /* @__PURE__ */ e(qe, { children: n.name }),
866
888
  /* @__PURE__ */ e("div", { className: "flex items-center gap-2 mt-1", children: /* @__PURE__ */ c("p", { className: "text-sm text-muted-foreground", children: [
867
- O.length,
889
+ k.length,
868
890
  " ",
869
- O.length === 1 ? "member" : "members"
891
+ k.length === 1 ? "member" : "members"
870
892
  ] }) }),
871
893
  /* @__PURE__ */ c("p", { id: "group-members-description", className: "sr-only", children: [
872
894
  "Add or remove members from the ",
@@ -919,10 +941,10 @@ function dr({
919
941
  {
920
942
  variant: "destructive",
921
943
  size: "sm",
922
- onClick: Q,
944
+ onClick: W,
923
945
  disabled: E.isPending,
924
946
  children: E.isPending ? /* @__PURE__ */ c(T, { children: [
925
- /* @__PURE__ */ e(Y, { className: "mr-2 h-4 w-4 animate-spin" }),
947
+ /* @__PURE__ */ e(X, { className: "mr-2 h-4 w-4 animate-spin" }),
926
948
  "Removing..."
927
949
  ] }) : /* @__PURE__ */ c(T, { children: [
928
950
  /* @__PURE__ */ e(va, { className: "mr-2 h-4 w-4" }),
@@ -945,11 +967,11 @@ function dr({
945
967
  }
946
968
  )
947
969
  ] }),
948
- /* @__PURE__ */ e(mt, { className: "h-[300px]", children: w ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((y) => /* @__PURE__ */ e(ft, { className: "h-16 w-full" }, y)) }) : z.length === 0 ? /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
949
- /* @__PURE__ */ e(gt, { className: "h-12 w-12 mb-3 opacity-50" }),
970
+ /* @__PURE__ */ e(mt, { className: "h-[300px]", children: S ? /* @__PURE__ */ e("div", { className: "space-y-2", children: [1, 2, 3].map((y) => /* @__PURE__ */ e(ft, { className: "h-16 w-full" }, y)) }) : q.length === 0 ? /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
971
+ /* @__PURE__ */ e(bt, { className: "h-12 w-12 mb-3 opacity-50" }),
950
972
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: "No available users" }),
951
973
  /* @__PURE__ */ e("p", { className: "text-xs mt-1", children: l ? "Try a different search" : "All eligible users are already members" })
952
- ] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: z.map((y) => /* @__PURE__ */ e(
974
+ ] }) : /* @__PURE__ */ e("div", { className: "space-y-2", children: q.map((y) => /* @__PURE__ */ e(
953
975
  mr,
954
976
  {
955
977
  user: y,
@@ -971,10 +993,10 @@ function dr({
971
993
  onClick: B,
972
994
  disabled: C.isPending,
973
995
  children: C.isPending ? /* @__PURE__ */ c(T, { children: [
974
- /* @__PURE__ */ e(Y, { className: "mr-2 h-4 w-4 animate-spin" }),
996
+ /* @__PURE__ */ e(X, { className: "mr-2 h-4 w-4 animate-spin" }),
975
997
  "Adding..."
976
998
  ] }) : /* @__PURE__ */ c(T, { children: [
977
- /* @__PURE__ */ e(gt, { className: "mr-2 h-4 w-4" }),
999
+ /* @__PURE__ */ e(bt, { className: "mr-2 h-4 w-4" }),
978
1000
  "Add Members"
979
1001
  ] })
980
1002
  }
@@ -998,7 +1020,7 @@ function ur({
998
1020
  onClick: n,
999
1021
  children: [
1000
1022
  /* @__PURE__ */ e(ba, { checked: a }),
1001
- /* @__PURE__ */ e(At, { className: "h-8 w-8", children: /* @__PURE__ */ e(Lt, { className: "text-xs", children: s }) }),
1023
+ /* @__PURE__ */ e(Mt, { className: "h-8 w-8", children: /* @__PURE__ */ e(Lt, { className: "text-xs", children: s }) }),
1002
1024
  /* @__PURE__ */ c("div", { className: "flex-1", children: [
1003
1025
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: ((l = t.user) == null ? void 0 : l.name) || "Unknown User" }),
1004
1026
  /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: (p = t.user) == null ? void 0 : p.email })
@@ -1021,7 +1043,7 @@ function mr({
1021
1043
  onClick: n,
1022
1044
  children: [
1023
1045
  /* @__PURE__ */ e(ba, { checked: a }),
1024
- /* @__PURE__ */ e(At, { className: "h-8 w-8", children: /* @__PURE__ */ e(Lt, { className: "text-xs", children: s }) }),
1046
+ /* @__PURE__ */ e(Mt, { className: "h-8 w-8", children: /* @__PURE__ */ e(Lt, { className: "text-xs", children: s }) }),
1025
1047
  /* @__PURE__ */ c("div", { className: "flex-1", children: [
1026
1048
  /* @__PURE__ */ e("p", { className: "text-sm font-medium", children: t.name }),
1027
1049
  /* @__PURE__ */ e("p", { className: "text-xs text-muted-foreground", children: t.email })
@@ -1034,11 +1056,11 @@ function hr({
1034
1056
  open: t,
1035
1057
  onOpenChange: a
1036
1058
  }) {
1037
- const [n, s] = N("groups"), [i, u] = N(""), [l, p] = N(null), [g, v] = N(!1), [m, f] = N(null), { tokenProps: h } = j(), { currentUser: d } = Dt(), r = Yn(), b = (d == null ? void 0 : d.type) === "tenant", D = h == null ? void 0 : h.tenantId, { groups: w, isLoading: C, refetch: E } = Ps({
1059
+ const [n, s] = N("groups"), [i, u] = N(""), [l, p] = N(null), [g, v] = N(!1), [m, f] = N(null), { tokenProps: h } = K(), { currentUser: d } = Dt(), r = Yn(), b = (d == null ? void 0 : d.type) === "tenant", D = h == null ? void 0 : h.tenantId, { groups: S, isLoading: C, refetch: E } = Ps({
1038
1060
  type: b ? "TENANT_GROUP" : "all",
1039
1061
  tenantId: b ? D : void 0,
1040
1062
  includeMembers: !1
1041
- }), O = w.filter(
1063
+ }), k = S.filter(
1042
1064
  (x) => {
1043
1065
  var B;
1044
1066
  return x.name.toLowerCase().includes(i.toLowerCase()) || ((B = x.description) == null ? void 0 : B.toLowerCase().includes(i.toLowerCase()));
@@ -1052,14 +1074,14 @@ function hr({
1052
1074
  }
1053
1075
  }, V = (x) => {
1054
1076
  p(x), v(!0);
1055
- }, z = () => {
1077
+ }, q = () => {
1056
1078
  s("groups"), E();
1057
1079
  };
1058
1080
  return /* @__PURE__ */ c(T, { children: [
1059
1081
  /* @__PURE__ */ e(Ge, { open: t, onOpenChange: a, children: /* @__PURE__ */ c($e, { className: "max-h-[80vh] max-w-3xl rounded-[6px] border-border/60 sm:rounded-[6px]", children: [
1060
1082
  /* @__PURE__ */ c(Ve, { children: [
1061
- /* @__PURE__ */ e(ze, { className: "text-[15px]", children: "Group management" }),
1062
- /* @__PURE__ */ e(wt, { className: "text-[13px] leading-5", children: "Manage groups, create new ones, and control membership." })
1083
+ /* @__PURE__ */ e(qe, { className: "text-[15px]", children: "Group management" }),
1084
+ /* @__PURE__ */ e(St, { className: "text-[13px] leading-5", children: "Manage groups, create new ones, and control membership." })
1063
1085
  ] }),
1064
1086
  /* @__PURE__ */ c(
1065
1087
  ma,
@@ -1106,10 +1128,10 @@ function hr({
1106
1128
  className: "h-16 w-full rounded-[6px]"
1107
1129
  },
1108
1130
  x
1109
- )) }) : O.length === 0 ? /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
1131
+ )) }) : k.length === 0 ? /* @__PURE__ */ c("div", { className: "flex flex-col items-center justify-center py-12 text-muted-foreground", children: [
1110
1132
  /* @__PURE__ */ e("p", { className: "text-[13px]", children: "No groups found." }),
1111
1133
  /* @__PURE__ */ e("p", { className: "mt-1 text-[12px]", children: i ? "Try a different search." : "Create your first group to get started." })
1112
- ] }) : /* @__PURE__ */ e("div", { className: "space-y-2 pr-2", children: O.map((x) => /* @__PURE__ */ e(
1134
+ ] }) : /* @__PURE__ */ e("div", { className: "space-y-2 pr-2", children: k.map((x) => /* @__PURE__ */ e(
1113
1135
  pr,
1114
1136
  {
1115
1137
  group: x,
@@ -1123,7 +1145,7 @@ function hr({
1123
1145
  /* @__PURE__ */ e(Ue, { value: "create", className: "mt-4", children: /* @__PURE__ */ e(
1124
1146
  er,
1125
1147
  {
1126
- onSuccess: z,
1148
+ onSuccess: q,
1127
1149
  tenantId: D,
1128
1150
  isTenantUser: b
1129
1151
  }
@@ -1148,8 +1170,8 @@ function hr({
1148
1170
  onOpenChange: () => f(null),
1149
1171
  children: /* @__PURE__ */ c(xa, { children: [
1150
1172
  /* @__PURE__ */ c(Na, { children: [
1151
- /* @__PURE__ */ e(Sa, { children: "Delete group" }),
1152
- /* @__PURE__ */ c(wa, { children: [
1173
+ /* @__PURE__ */ e(wa, { children: "Delete group" }),
1174
+ /* @__PURE__ */ c(Sa, { children: [
1153
1175
  'Delete "',
1154
1176
  m == null ? void 0 : m.name,
1155
1177
  `"? This removes all members and can't be undone.`
@@ -1158,13 +1180,13 @@ function hr({
1158
1180
  /* @__PURE__ */ c(Da, { children: [
1159
1181
  /* @__PURE__ */ e(Ca, { children: "Cancel" }),
1160
1182
  /* @__PURE__ */ e(
1161
- vt,
1183
+ gt,
1162
1184
  {
1163
1185
  onClick: I,
1164
1186
  disabled: r.isPending,
1165
1187
  className: "bg-destructive text-destructive-foreground hover:bg-destructive/90",
1166
1188
  children: r.isPending ? /* @__PURE__ */ c(T, { children: [
1167
- /* @__PURE__ */ e(Y, { className: "h-3.5 w-3.5 animate-spin" }),
1189
+ /* @__PURE__ */ e(X, { className: "h-3.5 w-3.5 animate-spin" }),
1168
1190
  "Deleting…"
1169
1191
  ] }) : "Delete group"
1170
1192
  }
@@ -1195,7 +1217,7 @@ function pr({
1195
1217
  ] }),
1196
1218
  /* @__PURE__ */ c("span", { children: [
1197
1219
  "Created ",
1198
- Sn(new Date(t.createdAt), "MMM d, yyyy")
1220
+ Nn(new Date(t.createdAt), "MMM d, yyyy")
1199
1221
  ] })
1200
1222
  ] })
1201
1223
  ] }),
@@ -1209,7 +1231,7 @@ function pr({
1209
1231
  onClick: a,
1210
1232
  title: "Manage members",
1211
1233
  "aria-label": "Manage members",
1212
- children: /* @__PURE__ */ e(gt, { className: "h-3.5 w-3.5" })
1234
+ children: /* @__PURE__ */ e(bt, { className: "h-3.5 w-3.5" })
1213
1235
  }
1214
1236
  ),
1215
1237
  i && /* @__PURE__ */ e(
@@ -1341,7 +1363,7 @@ function vr({
1341
1363
  onOpenChange: a,
1342
1364
  initialMode: n = "manage"
1343
1365
  }) {
1344
- var z;
1366
+ var q;
1345
1367
  const s = n === "create", {
1346
1368
  forceClose: i,
1347
1369
  handleOpenChange: u,
@@ -1349,12 +1371,12 @@ function vr({
1349
1371
  preventPassiveDismissDuringCreate: p,
1350
1372
  resolvedOpen: g,
1351
1373
  setIsCreateFlowActive: v
1352
- } = En({
1374
+ } = Cn({
1353
1375
  open: t,
1354
1376
  onOpenChange: a,
1355
1377
  initialCreateFlowActive: n === "create",
1356
1378
  dismissMode: "explicit-only"
1357
- }), m = S((x) => x.dashboard), f = S((x) => x.selectedSheetId), { setDashboardInputs: h } = St(), d = (z = m.sheets) == null ? void 0 : z.find(
1379
+ }), m = w((x) => x.dashboard), f = w((x) => x.selectedSheetId), { setDashboardInputs: h } = wt(), d = (q = m.sheets) == null ? void 0 : q.find(
1358
1380
  (x) => x.id === f
1359
1381
  ), r = (d == null ? void 0 : d.kind) === "document" && !!d.document, b = F(
1360
1382
  () => r && (d != null && d.document) ? Ts(m, d.id) : [],
@@ -1364,23 +1386,23 @@ function vr({
1364
1386
  (x) => x.kind === "control"
1365
1387
  ),
1366
1388
  [b]
1367
- ), w = F(
1389
+ ), S = F(
1368
1390
  () => D.map((x) => x.control),
1369
1391
  [D]
1370
1392
  ), C = F(
1371
- () => yr(w),
1372
- [w]
1393
+ () => yr(S),
1394
+ [S]
1373
1395
  ), E = F(
1374
1396
  () => br(m),
1375
1397
  [m]
1376
- ), O = Fe(() => {
1398
+ ), k = Fe(() => {
1377
1399
  if (s) {
1378
1400
  i();
1379
1401
  return;
1380
1402
  }
1381
1403
  v(!1);
1382
1404
  }, [s, i, v]), I = Fe(
1383
- (x, B, Q) => {
1405
+ (x, B, W) => {
1384
1406
  !r || !(d != null && d.document) || h(
1385
1407
  Nr({
1386
1408
  allInputs: m.inputs || [],
@@ -1388,7 +1410,7 @@ function vr({
1388
1410
  currentDocumentInputs: b,
1389
1411
  nextControls: x,
1390
1412
  nextDefaultValues: B,
1391
- change: Q
1413
+ change: W
1392
1414
  })
1393
1415
  );
1394
1416
  },
@@ -1408,9 +1430,9 @@ function vr({
1408
1430
  onPointerDownOutside: p,
1409
1431
  children: [
1410
1432
  /* @__PURE__ */ c(Ve, { className: l ? "space-y-0" : void 0, children: [
1411
- /* @__PURE__ */ e(ze, { className: "text-[15px]", children: l ? "Add document control" : "Document Controls" }),
1433
+ /* @__PURE__ */ e(qe, { className: "text-[15px]", children: l ? "Add document control" : "Document Controls" }),
1412
1434
  /* @__PURE__ */ e(
1413
- wt,
1435
+ St,
1414
1436
  {
1415
1437
  className: l ? "sr-only" : "text-[13px]",
1416
1438
  children: l ? "Configure and add a document-local control input." : "Add document-local control inputs. They are stored on this document sheet and are not dashboard controls."
@@ -1418,10 +1440,10 @@ function vr({
1418
1440
  )
1419
1441
  ] }),
1420
1442
  /* @__PURE__ */ e("div", { className: "min-h-0 overflow-y-auto pr-1", children: /* @__PURE__ */ e(
1421
- In,
1443
+ En,
1422
1444
  {
1423
1445
  scope: "dashboard",
1424
- controls: w,
1446
+ controls: S,
1425
1447
  reservedControlIds: E,
1426
1448
  defaultValues: C,
1427
1449
  usageByControlId: {},
@@ -1432,7 +1454,7 @@ function vr({
1432
1454
  allowedControlTypes: gr,
1433
1455
  initialCreateFlow: n === "create",
1434
1456
  onCreateFlowActiveChange: v,
1435
- onCreateFlowComplete: O,
1457
+ onCreateFlowComplete: k,
1436
1458
  onChange: I,
1437
1459
  emptyMessage: "No document controls yet."
1438
1460
  }
@@ -1510,47 +1532,47 @@ function Nr({
1510
1532
  }
1511
1533
  function la(t, a) {
1512
1534
  return {
1513
- dashboard: bt(t),
1514
- semanticExecutionPayload: bt(a)
1535
+ dashboard: vt(t),
1536
+ semanticExecutionPayload: vt(a)
1515
1537
  };
1516
1538
  }
1517
1539
  function Rr() {
1518
1540
  var Qt, Wt, Jt, Yt, Xt, Zt;
1519
- pn(), fn();
1541
+ hn(), pn();
1520
1542
  const {
1521
1543
  authToken: t,
1522
1544
  tokenProps: a,
1523
1545
  id: n
1524
- } = j(), { isLocalDev: s } = Fs(), { openBrandStudioPreview: i } = Rs(), { permissions: u } = Hn(), l = Gs(), { isLoading: p } = $s(), g = S((o) => o.theme), v = S((o) => o.isDownloadingPdf), m = S(
1546
+ } = K(), { isLocalDev: s } = Fs(), { openBrandStudioPreview: i } = Rs(), { permissions: u } = Hn(), l = Gs(), { isLoading: p } = $s(), g = w((o) => o.theme), v = w((o) => o.isDownloadingPdf), m = w(
1525
1547
  (o) => o.dashboardAssistantDraftScopeKey
1526
- ), f = S((o) => o.lenses), h = S((o) => o.selectedLensId), d = f == null ? void 0 : f.find((o) => o.id === h), r = S((o) => o.dashboard), b = S((o) => o.selectedSheetId), D = (Qt = r == null ? void 0 : r.sheets) == null ? void 0 : Qt.find(
1548
+ ), f = w((o) => o.lenses), h = w((o) => o.selectedLensId), d = f == null ? void 0 : f.find((o) => o.id === h), r = w((o) => o.dashboard), b = w((o) => o.selectedSheetId), D = (Qt = r == null ? void 0 : r.sheets) == null ? void 0 : Qt.find(
1527
1549
  (o) => o.id === b
1528
- ), w = ms(D), C = w ? (Wt = D == null ? void 0 : D.document) == null ? void 0 : Wt.page : void 0, E = S(
1550
+ ), S = ms(D), C = S ? (Wt = D == null ? void 0 : D.document) == null ? void 0 : Wt.page : void 0, E = w(
1529
1551
  (o) => o.isDashboardEditing
1530
- ), { setDashboardTitle: O } = S((o) => o.actions), [I, V] = N(!1), [z, x] = N(!1), [B, Q] = N(!1), [Z, ee] = N(!1), [y, k] = N(!1), [G, H] = N(!1), [me, te] = N(!1), [Ua, Mt] = N(!1), [He, he] = N(null), [Fa, pe] = N(!1), [fe, ge] = N(null), [Ot, ve] = N([]), [kt, be] = N(!1), Ra = S((o) => o.isDashboardPanelOpen), Ga = S(
1552
+ ), { setDashboardTitle: k } = w((o) => o.actions), [I, V] = N(!1), [q, x] = N(!1), [B, W] = N(!1), [Z, ee] = N(!1), [y, O] = N(!1), [G, H] = N(!1), [me, te] = N(!1), [Ua, At] = N(!1), [He, he] = N(null), [Fa, pe] = N(!1), [fe, ge] = N(null), [kt, ve] = N([]), [Ot, be] = N(!1), Ra = w((o) => o.isDashboardPanelOpen), Ga = w(
1531
1553
  (o) => o.actions.setIsDashboardPanelOpen
1532
- ), $a = S((o) => o.filterValues), _ = S((o) => o.isVisualEditing);
1554
+ ), $a = w((o) => o.filterValues), _ = w((o) => o.isVisualEditing);
1533
1555
  ta((o) => o.card);
1534
- const ae = ke(
1556
+ const ae = Oe(
1535
1557
  (o) => o.selectedDashboard
1536
- ), ye = ke(
1558
+ ), ye = Oe(
1537
1559
  (o) => o.initialDashboard
1538
1560
  );
1539
- ke((o) => o.selectedVisual), S((o) => o.selectedFrameId), ta((o) => o.frame);
1540
- const xe = ae ? (Yt = ae == null ? void 0 : ae.permissions) == null ? void 0 : Yt.canEdit : (Jt = ye == null ? void 0 : ye.permissions) == null ? void 0 : Jt.canEdit, Ne = S((o) => o.showFilters), Pt = Vs((o) => o.setPanelOpen), Tt = S(
1561
+ Oe((o) => o.selectedVisual), w((o) => o.selectedFrameId), ta((o) => o.frame);
1562
+ const xe = ae ? (Yt = ae == null ? void 0 : ae.permissions) == null ? void 0 : Yt.canEdit : (Jt = ye == null ? void 0 : ye.permissions) == null ? void 0 : Jt.canEdit, Ne = w((o) => o.showFilters), Pt = Vs((o) => o.setPanelOpen), Tt = w(
1541
1563
  (o) => o.showDashboardJSON
1542
- ), je = S((o) => o.onSaveFunction), _t = S(
1564
+ ), je = w((o) => o.onSaveFunction), _t = w(
1543
1565
  (o) => o.actions.setShowFilters
1544
1566
  ), {
1545
1567
  setDocumentInspectorTab: Ut,
1546
1568
  setIsDashboardEditing: Ft,
1547
1569
  setShowDashboardJSON: Rt
1548
- } = S((o) => o.actions), { setInitialDashboard: Gt, clearSelectedDashboard: Ke } = ke(
1570
+ } = w((o) => o.actions), { setInitialDashboard: Gt, clearSelectedDashboard: Ke } = Oe(
1549
1571
  (o) => o.actions
1550
- ), { resources: Se } = zs(nt.DASHBOARD), { data: Qe } = qs(), Va = ((Xt = Qe == null ? void 0 : Qe.preference) == null ? void 0 : Xt.defaultDashboardId) || null, { mutate: za, isPending: qa } = Bs(), { currentUser: Ba } = Dt(), Ha = Hs(Ba), W = ae || ye, $t = W ? {
1551
- id: W.id,
1552
- title: (r == null ? void 0 : r.title) || W.title || "Dashboard"
1553
- } : null, { handleAddNewFrame: ja } = js(), [We, Je] = N(!1), [Ka, se] = N(!1), [Ye, we] = N("close"), ne = Ks(nt.DASHBOARD), [R, De] = N(null), Vt = Fe((o) => {
1572
+ ), { resources: we } = qs(nt.DASHBOARD), { data: Qe } = zs(), Va = ((Xt = Qe == null ? void 0 : Qe.preference) == null ? void 0 : Xt.defaultDashboardId) || null, { mutate: qa, isPending: za } = Bs(), { currentUser: Ba } = Dt(), Ha = Hs(Ba), J = ae || ye, $t = J ? {
1573
+ id: J.id,
1574
+ title: (r == null ? void 0 : r.title) || J.title || "Dashboard"
1575
+ } : null, { handleAddNewFrame: ja } = js(), [We, Je] = N(!1), [Ka, se] = N(!1), [Ye, Se] = N("close"), ne = Ks(nt.DASHBOARD), [R, De] = N(null), Vt = Fe((o) => {
1554
1576
  window.setTimeout(() => {
1555
1577
  he(o);
1556
1578
  }, 0);
@@ -1570,30 +1592,30 @@ function Rr() {
1570
1592
  },
1571
1593
  {
1572
1594
  onSuccess: () => {
1573
- console.log("Dashboard title updated successfully"), A.success("Dashboard title updated");
1595
+ console.log("Dashboard title updated successfully"), M.success("Dashboard title updated");
1574
1596
  },
1575
- onError: (q) => {
1576
- console.error("Failed to update dashboard title:", q), A.error("Failed to update dashboard title"), O(P);
1597
+ onError: (z) => {
1598
+ console.error("Failed to update dashboard title:", z), M.error("Failed to update dashboard title"), k(P);
1577
1599
  }
1578
1600
  }
1579
1601
  );
1580
1602
  };
1581
1603
  ot(() => {
1582
- if (Se && Se.length > 0) {
1604
+ if (we && we.length > 0) {
1583
1605
  const o = r == null ? void 0 : r.id;
1584
1606
  if (o) {
1585
- const P = Se.find(
1586
- (q) => q.id === o
1607
+ const P = we.find(
1608
+ (z) => z.id === o
1587
1609
  );
1588
1610
  P && Gt(P);
1589
1611
  }
1590
1612
  }
1591
- }, [Se, r == null ? void 0 : r.id, Gt]);
1613
+ }, [we, r == null ? void 0 : r.id, Gt]);
1592
1614
  const re = a.orgUserId || a.tenantId, Xe = F(
1593
- () => Sr({
1615
+ () => wr({
1594
1616
  accessToken: t == null ? void 0 : t.accessToken,
1595
1617
  dashboardId: (r == null ? void 0 : r.id) || n || a.dashboard_id,
1596
- selectedSheetId: w ? b : void 0,
1618
+ selectedSheetId: S ? b : void 0,
1597
1619
  pageSize: C == null ? void 0 : C.size,
1598
1620
  orientation: C == null ? void 0 : C.orientation,
1599
1621
  theme: g
@@ -1602,14 +1624,14 @@ function Rr() {
1602
1624
  t == null ? void 0 : t.accessToken,
1603
1625
  n,
1604
1626
  r == null ? void 0 : r.id,
1605
- w,
1627
+ S,
1606
1628
  C == null ? void 0 : C.orientation,
1607
1629
  C == null ? void 0 : C.size,
1608
1630
  b,
1609
1631
  g,
1610
1632
  a.dashboard_id
1611
1633
  ]
1612
- ), zt = E && !_ && re && xe, { setDashboard: Ze } = S((o) => o.actions), et = S(
1634
+ ), qt = E && !_ && re && xe, { setDashboard: Ze } = w((o) => o.actions), et = w(
1613
1635
  (o) => o.semanticExecutionPayload
1614
1636
  ), Wa = () => {
1615
1637
  Ft(!0);
@@ -1634,14 +1656,14 @@ function Rr() {
1634
1656
  p,
1635
1657
  et
1636
1658
  ]);
1637
- const Ce = (R == null ? void 0 : R.dashboard) ?? null, { isDirty: qt, isDirtyPending: Ja, resetDirty: Ee } = Cn(
1659
+ const Ce = (R == null ? void 0 : R.dashboard) ?? null, { isDirty: zt, isDirtyPending: Ja, resetDirty: Ee } = Dn(
1638
1660
  r,
1639
1661
  Ce,
1640
1662
  300,
1641
1663
  1e3,
1642
1664
  it
1643
- ), Bt = Fe(() => Ce ? it(r) !== it(Ce) : !1, [r, Ce]), Ht = qt || Ja, Ie = We || ne.isPending, Ya = () => {
1644
- Bt() ? (we("close"), se(!0)) : (tt(), Ee());
1665
+ ), Bt = Fe(() => Ce ? it(r) !== it(Ce) : !1, [r, Ce]), Ht = zt || Ja, Ie = We || ne.isPending, Ya = () => {
1666
+ Bt() ? (Se("close"), se(!0)) : (tt(), Ee());
1645
1667
  }, Xa = async () => {
1646
1668
  await at({
1647
1669
  closeAfterSave: !0,
@@ -1650,25 +1672,25 @@ function Rr() {
1650
1672
  }, Za = () => {
1651
1673
  R && Ze(R.dashboard, {
1652
1674
  semanticExecutionPayload: R.semanticExecutionPayload
1653
- }), tt(), Ye === "home" && Ke(), we("close"), se(!1), Ee();
1675
+ }), tt(), Ye === "home" && Ke(), Se("close"), se(!1), Ee();
1654
1676
  }, es = () => {
1655
1677
  R && (Ze(R.dashboard, {
1656
1678
  semanticExecutionPayload: R.semanticExecutionPayload
1657
1679
  }), Ee());
1658
1680
  }, ts = () => {
1659
1681
  if (E && Bt()) {
1660
- we("home"), se(!0);
1682
+ Se("home"), se(!0);
1661
1683
  return;
1662
1684
  }
1663
1685
  Ke();
1664
1686
  };
1665
1687
  async function at(o) {
1666
- const P = S.getState().dashboard;
1688
+ const P = w.getState().dashboard;
1667
1689
  if (!P)
1668
1690
  return;
1669
- const q = (o == null ? void 0 : o.closeAfterSave) ?? kt, os = (o == null ? void 0 : o.navigateHomeAfterSave) ?? !1;
1670
- be(q), q && se(!1);
1671
- const is = bt(P);
1691
+ const z = (o == null ? void 0 : o.closeAfterSave) ?? Ot, os = (o == null ? void 0 : o.navigateHomeAfterSave) ?? !1;
1692
+ be(z), z && se(!1);
1693
+ const is = vt(P);
1672
1694
  pe(!0), ge(null), ve([]), Je(!0);
1673
1695
  const cs = {
1674
1696
  template: P
@@ -1680,55 +1702,55 @@ function Rr() {
1680
1702
  },
1681
1703
  {
1682
1704
  onSuccess: (U) => {
1683
- var Le, Me, ea;
1684
- const K = (U == null ? void 0 : U.id) || ((Le = U == null ? void 0 : U.dashboard) == null ? void 0 : Le.id) || ((Me = U == null ? void 0 : U.resource) == null ? void 0 : Me.id) || ((ea = U == null ? void 0 : U.template) == null ? void 0 : ea.id) || null;
1685
- if (!P.id && K) {
1686
- const st = bs.getState(), Oe = st.pendingDashboardDraftMigration;
1687
- (Oe == null ? void 0 : Oe.scopeKey) === m ? st.actions.setPendingDashboardDraftMigrationExpectedDashboardId(
1688
- K
1689
- ) : Oe && st.actions.clearPendingDashboardDraftMigration();
1705
+ var Le, Ae, ea;
1706
+ const Q = (U == null ? void 0 : U.id) || ((Le = U == null ? void 0 : U.dashboard) == null ? void 0 : Le.id) || ((Ae = U == null ? void 0 : U.resource) == null ? void 0 : Ae.id) || ((ea = U == null ? void 0 : U.template) == null ? void 0 : ea.id) || null;
1707
+ if (!P.id && Q) {
1708
+ const st = bs.getState(), ke = st.pendingDashboardDraftMigration;
1709
+ (ke == null ? void 0 : ke.scopeKey) === m ? st.actions.setPendingDashboardDraftMigrationExpectedDashboardId(
1710
+ Q
1711
+ ) : ke && st.actions.clearPendingDashboardDraftMigration();
1690
1712
  }
1691
- Je(!1), A.success("Dashboard saved!"), De(
1713
+ Je(!1), M.success("Dashboard saved!"), De(
1692
1714
  la(
1693
1715
  is,
1694
- S.getState().semanticExecutionPayload
1716
+ w.getState().semanticExecutionPayload
1695
1717
  )
1696
- ), pe(!1), be(!1), q && (tt(), Ee(), os && Ke()), we("close");
1718
+ ), pe(!1), be(!1), z && (tt(), Ee(), os && Ke()), Se("close");
1697
1719
  },
1698
1720
  onError: (U) => {
1699
1721
  Je(!1), ge("Failed to save dashboard. Please try again.");
1700
- const K = U.details, Le = Array.isArray(
1701
- K == null ? void 0 : K.errors
1702
- ) ? (K.errors || []).filter(
1703
- (Me) => typeof Me == "string"
1722
+ const Q = U.details, Le = Array.isArray(
1723
+ Q == null ? void 0 : Q.errors
1724
+ ) ? (Q.errors || []).filter(
1725
+ (Ae) => typeof Ae == "string"
1704
1726
  ) : [];
1705
1727
  ve(
1706
1728
  fr({
1707
1729
  errors: Le,
1708
1730
  dashboard: P || void 0
1709
1731
  })
1710
- ), A.error("Failed to save dashboard");
1732
+ ), M.error("Failed to save dashboard");
1711
1733
  }
1712
1734
  }
1713
1735
  );
1714
1736
  }
1715
1737
  async function as() {
1716
1738
  if (V(!0), !h || !d) return;
1717
- const o = S.getState().dashboard;
1739
+ const o = w.getState().dashboard;
1718
1740
  if (!o) {
1719
1741
  V(!1);
1720
1742
  return;
1721
1743
  }
1722
- const P = JSON.stringify(o), q = {
1744
+ const P = JSON.stringify(o), z = {
1723
1745
  ...d,
1724
1746
  template: P,
1725
1747
  filterValues: $a
1726
1748
  };
1727
1749
  await xt(
1728
1750
  a.apiServiceUrl,
1729
- q,
1751
+ z,
1730
1752
  t == null ? void 0 : t.accessToken
1731
- ), A.success("Lens saved"), je == null || je(o), V(!1);
1753
+ ), M.success("Lens saved"), je == null || je(o), V(!1);
1732
1754
  }
1733
1755
  const jt = (d == null ? void 0 : d.name) || r.title, oe = !!(r != null && r.id);
1734
1756
  ne.isPending && console.log("Title during update:", {
@@ -1741,9 +1763,9 @@ function Rr() {
1741
1763
  ot(() => {
1742
1764
  !oe && Z && ee(!1);
1743
1765
  }, [oe, Z]);
1744
- const ns = l, ie = (r == null ? void 0 : r.id) || null, Ae = !!ie && Va === ie, rs = () => {
1745
- ie && za({
1746
- dashboardId: Ae ? null : ie
1766
+ const ns = l, ie = (r == null ? void 0 : r.id) || null, Me = !!ie && Va === ie, rs = () => {
1767
+ ie && qa({
1768
+ dashboardId: Me ? null : ie
1747
1769
  });
1748
1770
  };
1749
1771
  return /* @__PURE__ */ c(
@@ -1764,7 +1786,7 @@ function Rr() {
1764
1786
  },
1765
1787
  className: "h-7 w-7 px-0",
1766
1788
  buttonProps: { size: "xs" },
1767
- children: /* @__PURE__ */ e(On, { className: "h-3.5 w-3.5" })
1789
+ children: /* @__PURE__ */ e(An, { className: "h-3.5 w-3.5" })
1768
1790
  }
1769
1791
  ),
1770
1792
  ns && !_ && /* @__PURE__ */ e(
@@ -1799,7 +1821,7 @@ function Rr() {
1799
1821
  dashboardId: r == null ? void 0 : r.id
1800
1822
  });
1801
1823
  const P = (r == null ? void 0 : r.title) || "";
1802
- O(o), Qa(o, P);
1824
+ k(o), Qa(o, P);
1803
1825
  },
1804
1826
  isEditable: xe && !d,
1805
1827
  displayClassName: "text-[13px] font-medium",
@@ -1815,30 +1837,30 @@ function Rr() {
1815
1837
  variant: "ghost",
1816
1838
  size: "xs",
1817
1839
  onClick: rs,
1818
- disabled: qa || !(t != null && t.accessToken) || !(a != null && a.apiServiceUrl),
1840
+ disabled: za || !(t != null && t.accessToken) || !(a != null && a.apiServiceUrl),
1819
1841
  className: "w-7 px-0",
1820
- "aria-label": Ae ? "Remove as default dashboard" : "Make this a default dashboard",
1842
+ "aria-label": Me ? "Remove as default dashboard" : "Make this a default dashboard",
1821
1843
  children: /* @__PURE__ */ e(
1822
1844
  Ws,
1823
1845
  {
1824
- className: J(
1846
+ className: Y(
1825
1847
  "h-3.5 w-3.5 transition-colors",
1826
- Ae ? "fill-foreground text-foreground" : "text-muted-foreground hover:text-foreground"
1848
+ Me ? "fill-foreground text-foreground" : "text-muted-foreground hover:text-foreground"
1827
1849
  )
1828
1850
  }
1829
1851
  )
1830
1852
  }
1831
1853
  ) }),
1832
- /* @__PURE__ */ e(gs, { children: /* @__PURE__ */ e("p", { children: Ae ? "Remove as default dashboard" : "Make this a default dashboard" }) })
1854
+ /* @__PURE__ */ e(gs, { children: /* @__PURE__ */ e("p", { children: Me ? "Remove as default dashboard" : "Make this a default dashboard" }) })
1833
1855
  ] }) })
1834
1856
  ] }))
1835
1857
  ] }),
1836
1858
  /* @__PURE__ */ c("div", { className: "flex items-center gap-2", children: [
1837
1859
  _ && /* @__PURE__ */ c(T, { children: [
1838
- /* @__PURE__ */ e(gn, {}),
1839
- /* @__PURE__ */ e(vn, {})
1860
+ /* @__PURE__ */ e(fn, {}),
1861
+ /* @__PURE__ */ e(gn, {})
1840
1862
  ] }),
1841
- !_ && l && ((Zt = W == null ? void 0 : W.permissions) == null ? void 0 : Zt.canShare) && /* @__PURE__ */ c(
1863
+ !_ && l && ((Zt = J == null ? void 0 : J.permissions) == null ? void 0 : Zt.canShare) && /* @__PURE__ */ c(
1842
1864
  L,
1843
1865
  {
1844
1866
  variant: "outline",
@@ -1851,18 +1873,18 @@ function Rr() {
1851
1873
  }
1852
1874
  ),
1853
1875
  !_ && E && u.canUseFilters && l && /* @__PURE__ */ e(
1854
- bn,
1876
+ vn,
1855
1877
  {
1856
- showFilters: w ? !1 : Ne,
1878
+ showFilters: S ? !1 : Ne,
1857
1879
  onToggleFilters: () => {
1858
- if (w && b) {
1880
+ if (S && b) {
1859
1881
  Ut(b, "inputs");
1860
1882
  return;
1861
1883
  }
1862
1884
  Ne || Pt("dashboard", !1), _t(!Ne);
1863
1885
  },
1864
1886
  onAddFilter: () => {
1865
- if (w && b) {
1887
+ if (S && b) {
1866
1888
  Ut(b, "inputs");
1867
1889
  return;
1868
1890
  }
@@ -1874,7 +1896,7 @@ function Rr() {
1874
1896
  onManageControls: () => Vt("manage")
1875
1897
  }
1876
1898
  ),
1877
- E && !_ && l && He ? w ? /* @__PURE__ */ e(
1899
+ E && !_ && l && He ? S ? /* @__PURE__ */ e(
1878
1900
  vr,
1879
1901
  {
1880
1902
  open: !0,
@@ -1884,7 +1906,7 @@ function Rr() {
1884
1906
  initialMode: He
1885
1907
  }
1886
1908
  ) : /* @__PURE__ */ e(
1887
- yn,
1909
+ bn,
1888
1910
  {
1889
1911
  open: !0,
1890
1912
  onOpenChange: (o) => {
@@ -1907,7 +1929,7 @@ function Rr() {
1907
1929
  ]
1908
1930
  }
1909
1931
  ),
1910
- E && !_ && l && !w && /* @__PURE__ */ c(
1932
+ E && !_ && l && !S && /* @__PURE__ */ c(
1911
1933
  L,
1912
1934
  {
1913
1935
  variant: "outline",
@@ -1924,7 +1946,7 @@ function Rr() {
1924
1946
  /* @__PURE__ */ e(Ys, { className: "h-3.5 w-3.5" }),
1925
1947
  "Edit"
1926
1948
  ] }),
1927
- zt && l && qt && /* @__PURE__ */ c(
1949
+ qt && l && zt && /* @__PURE__ */ c(
1928
1950
  L,
1929
1951
  {
1930
1952
  variant: "outline",
@@ -1932,20 +1954,20 @@ function Rr() {
1932
1954
  onClick: es,
1933
1955
  disabled: Ie,
1934
1956
  children: [
1935
- /* @__PURE__ */ e(Xs, { className: "h-3.5 w-3.5" }),
1957
+ /* @__PURE__ */ e(_n, { className: "h-3.5 w-3.5" }),
1936
1958
  "Undo"
1937
1959
  ]
1938
1960
  }
1939
1961
  ),
1940
- zt && l && /* @__PURE__ */ c(
1962
+ qt && l && /* @__PURE__ */ c(
1941
1963
  L,
1942
1964
  {
1943
1965
  size: "xs",
1944
- className: J(!Ht && "opacity-60"),
1966
+ className: Y(!Ht && "opacity-60"),
1945
1967
  disabled: Ie || !Ht,
1946
1968
  onClick: () => at(),
1947
1969
  children: [
1948
- Ie ? /* @__PURE__ */ e(Y, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e(na, { className: "h-3.5 w-3.5" }),
1970
+ Ie ? /* @__PURE__ */ e(X, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e(na, { className: "h-3.5 w-3.5" }),
1949
1971
  Ie ? "Saving..." : "Save"
1950
1972
  ]
1951
1973
  }
@@ -1954,10 +1976,10 @@ function Rr() {
1954
1976
  /* @__PURE__ */ e(ga, { className: "h-3.5 w-3.5" }),
1955
1977
  "Close"
1956
1978
  ] }),
1957
- !_ && l && /* @__PURE__ */ e("div", { className: "ml-2", children: /* @__PURE__ */ e(xn, {}) }),
1979
+ !_ && l && /* @__PURE__ */ e("div", { className: "ml-2", children: /* @__PURE__ */ e(yn, {}) }),
1958
1980
  !_ && s && /* @__PURE__ */ e(Gn, {}),
1959
- !_ && l && /* @__PURE__ */ c(Zs, { children: [
1960
- /* @__PURE__ */ e(en, { asChild: !0, children: /* @__PURE__ */ e(
1981
+ !_ && l && /* @__PURE__ */ c(Xs, { children: [
1982
+ /* @__PURE__ */ e(Zs, { asChild: !0, children: /* @__PURE__ */ e(
1961
1983
  rt,
1962
1984
  {
1963
1985
  tooltip: "More Options",
@@ -1967,11 +1989,11 @@ function Rr() {
1967
1989
  variant: "ghost",
1968
1990
  "aria-label": "More dashboard options"
1969
1991
  },
1970
- children: /* @__PURE__ */ e(tn, { className: "h-3.5 w-3.5" })
1992
+ children: /* @__PURE__ */ e(en, { className: "h-3.5 w-3.5" })
1971
1993
  }
1972
1994
  ) }),
1973
1995
  /* @__PURE__ */ c(
1974
- an,
1996
+ tn,
1975
1997
  {
1976
1998
  align: "end",
1977
1999
  className: "w-56 rounded-control border border-border/60 p-1 shadow-sm",
@@ -1981,9 +2003,9 @@ function Rr() {
1981
2003
  $,
1982
2004
  {
1983
2005
  disabled: v,
1984
- onSelect: () => Mt(!0),
2006
+ onSelect: () => At(!0),
1985
2007
  children: [
1986
- /* @__PURE__ */ e(sn, { className: "h-3.5 w-3.5" }),
2008
+ /* @__PURE__ */ e(an, { className: "h-3.5 w-3.5" }),
1987
2009
  "Export"
1988
2010
  ]
1989
2011
  }
@@ -1996,7 +2018,7 @@ function Rr() {
1996
2018
  oe && ee(!0);
1997
2019
  },
1998
2020
  children: [
1999
- /* @__PURE__ */ e(nn, { className: "h-3.5 w-3.5" }),
2021
+ /* @__PURE__ */ e(sn, { className: "h-3.5 w-3.5" }),
2000
2022
  "Schedule"
2001
2023
  ]
2002
2024
  }
@@ -2007,7 +2029,7 @@ function Rr() {
2007
2029
  /* @__PURE__ */ c(
2008
2030
  $,
2009
2031
  {
2010
- onClick: () => Q(!0),
2032
+ onClick: () => W(!0),
2011
2033
  children: [
2012
2034
  /* @__PURE__ */ e(Ct, { className: "h-3.5 w-3.5" }),
2013
2035
  "Manage Groups"
@@ -2017,12 +2039,12 @@ function Rr() {
2017
2039
  /* @__PURE__ */ e(Te, {})
2018
2040
  ] }),
2019
2041
  /* @__PURE__ */ e(de, { children: "Preferences" }),
2020
- /* @__PURE__ */ c($, { onClick: () => k(!0), children: [
2021
- /* @__PURE__ */ e(rn, { className: "h-3.5 w-3.5" }),
2042
+ /* @__PURE__ */ c($, { onClick: () => O(!0), children: [
2043
+ /* @__PURE__ */ e(nn, { className: "h-3.5 w-3.5" }),
2022
2044
  "Calendar Preferences"
2023
2045
  ] }),
2024
2046
  /* @__PURE__ */ c($, { onClick: () => H(!0), children: [
2025
- /* @__PURE__ */ e(on, { className: "h-3.5 w-3.5" }),
2047
+ /* @__PURE__ */ e(rn, { className: "h-3.5 w-3.5" }),
2026
2048
  "Summary Settings"
2027
2049
  ] }),
2028
2050
  s && l && /* @__PURE__ */ c(T, { children: [
@@ -2034,8 +2056,8 @@ function Rr() {
2034
2056
  onSelect: () => {
2035
2057
  var o;
2036
2058
  t != null && t.accessToken && ((o = navigator == null ? void 0 : navigator.clipboard) != null && o.writeText ? navigator.clipboard.writeText(t.accessToken).then(
2037
- () => A.success("Token copied to clipboard")
2038
- ).catch(() => A.error("Unable to copy token")) : A.error("Clipboard not available"));
2059
+ () => M.success("Token copied to clipboard")
2060
+ ).catch(() => M.error("Unable to copy token")) : M.error("Clipboard not available"));
2039
2061
  },
2040
2062
  children: [
2041
2063
  /* @__PURE__ */ e(sa, { className: "h-3.5 w-3.5" }),
@@ -2043,27 +2065,27 @@ function Rr() {
2043
2065
  ]
2044
2066
  }
2045
2067
  ),
2046
- w && /* @__PURE__ */ c(
2068
+ S && /* @__PURE__ */ c(
2047
2069
  $,
2048
2070
  {
2049
2071
  disabled: !Xe,
2050
2072
  onSelect: () => {
2051
2073
  var o;
2052
2074
  if (!Xe) {
2053
- A.error(
2075
+ M.error(
2054
2076
  "Open a document sheet with a token to copy the local PDF URL"
2055
2077
  );
2056
2078
  return;
2057
2079
  }
2058
2080
  (o = navigator == null ? void 0 : navigator.clipboard) != null && o.writeText ? navigator.clipboard.writeText(Xe).then(
2059
- () => A.success(
2081
+ () => M.success(
2060
2082
  "Local document PDF URL copied to clipboard"
2061
2083
  )
2062
2084
  ).catch(
2063
- () => A.error(
2085
+ () => M.error(
2064
2086
  "Unable to copy local document PDF URL"
2065
2087
  )
2066
- ) : A.error("Clipboard not available");
2088
+ ) : M.error("Clipboard not available");
2067
2089
  },
2068
2090
  children: [
2069
2091
  /* @__PURE__ */ e(sa, { className: "h-3.5 w-3.5" }),
@@ -2076,13 +2098,13 @@ function Rr() {
2076
2098
  {
2077
2099
  onSelect: () => vs(a.apiServiceUrl),
2078
2100
  children: [
2079
- /* @__PURE__ */ e(Tn, { className: "h-3.5 w-3.5" }),
2101
+ /* @__PURE__ */ e(Pn, { className: "h-3.5 w-3.5" }),
2080
2102
  "Invalidate token"
2081
2103
  ]
2082
2104
  }
2083
2105
  ),
2084
2106
  /* @__PURE__ */ c($, { onSelect: i, children: [
2085
- /* @__PURE__ */ e(An, { className: "h-3.5 w-3.5" }),
2107
+ /* @__PURE__ */ e(In, { className: "h-3.5 w-3.5" }),
2086
2108
  "Brand Studio"
2087
2109
  ] }),
2088
2110
  E && /* @__PURE__ */ c(
@@ -2090,7 +2112,7 @@ function Rr() {
2090
2112
  {
2091
2113
  onSelect: () => Rt(!Tt),
2092
2114
  children: [
2093
- /* @__PURE__ */ e(Ln, { className: "h-3.5 w-3.5" }),
2115
+ /* @__PURE__ */ e(Mn, { className: "h-3.5 w-3.5" }),
2094
2116
  Tt ? "Hide dashboard JSON" : "Show dashboard JSON"
2095
2117
  ]
2096
2118
  }
@@ -2099,20 +2121,20 @@ function Rr() {
2099
2121
  /* @__PURE__ */ e(ht, { className: "h-3.5 w-3.5" }),
2100
2122
  "Add lens"
2101
2123
  ] }),
2102
- re && /* @__PURE__ */ c(cn, { children: [
2103
- /* @__PURE__ */ c(ln, { children: [
2104
- /* @__PURE__ */ e(Mn, { className: "h-3.5 w-3.5" }),
2124
+ re && /* @__PURE__ */ c(on, { children: [
2125
+ /* @__PURE__ */ c(cn, { children: [
2126
+ /* @__PURE__ */ e(Ln, { className: "h-3.5 w-3.5" }),
2105
2127
  "Lenses"
2106
2128
  ] }),
2107
- /* @__PURE__ */ e(dn, { className: "w-60", children: /* @__PURE__ */ e(Bn, {}) })
2129
+ /* @__PURE__ */ e(ln, { className: "w-60", children: /* @__PURE__ */ e(Bn, {}) })
2108
2130
  ] })
2109
2131
  ] })
2110
2132
  ]
2111
2133
  }
2112
2134
  )
2113
2135
  ] }),
2114
- z && $t && /* @__PURE__ */ e(
2115
- un,
2136
+ q && $t && /* @__PURE__ */ e(
2137
+ dn,
2116
2138
  {
2117
2139
  resource: $t,
2118
2140
  resourceType: nt.DASHBOARD,
@@ -2123,11 +2145,11 @@ function Rr() {
2123
2145
  hr,
2124
2146
  {
2125
2147
  open: B,
2126
- onOpenChange: Q
2148
+ onOpenChange: W
2127
2149
  }
2128
2150
  ),
2129
2151
  oe && (r == null ? void 0 : r.id) && /* @__PURE__ */ e(
2130
- mn,
2152
+ un,
2131
2153
  {
2132
2154
  open: Z,
2133
2155
  onOpenChange: ee,
@@ -2139,11 +2161,11 @@ function Rr() {
2139
2161
  wn,
2140
2162
  {
2141
2163
  open: y,
2142
- onOpenChange: k
2164
+ onOpenChange: O
2143
2165
  }
2144
2166
  ),
2145
2167
  /* @__PURE__ */ e(
2146
- Dn,
2168
+ Sn,
2147
2169
  {
2148
2170
  open: G,
2149
2171
  onOpenChange: H,
@@ -2160,12 +2182,12 @@ function Rr() {
2160
2182
  )
2161
2183
  }
2162
2184
  ),
2163
- s && re && l && /* @__PURE__ */ e(qn, { open: me, onOpenChange: te }),
2185
+ s && re && l && /* @__PURE__ */ e(zn, { open: me, onOpenChange: te }),
2164
2186
  l && /* @__PURE__ */ e(
2165
- hn,
2187
+ mn,
2166
2188
  {
2167
2189
  open: Ua,
2168
- onOpenChange: Mt
2190
+ onOpenChange: At
2169
2191
  }
2170
2192
  ),
2171
2193
  /* @__PURE__ */ e(
@@ -2177,11 +2199,11 @@ function Rr() {
2177
2199
  },
2178
2200
  children: /* @__PURE__ */ c(xa, { className: "max-w-sm", children: [
2179
2201
  /* @__PURE__ */ c(Na, { children: [
2180
- /* @__PURE__ */ e(Sa, { children: fe ? "Save failed" : "Saving dashboard" }),
2181
- /* @__PURE__ */ e(wa, { className: "pt-2", children: fe ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
2182
- Ot.length > 0 && /* @__PURE__ */ c("div", { className: "space-y-1 rounded-md border border-destructive/20 bg-destructive/5 p-3 text-left", children: [
2202
+ /* @__PURE__ */ e(wa, { children: fe ? "Save failed" : "Saving dashboard" }),
2203
+ /* @__PURE__ */ e(Sa, { className: "pt-2", children: fe ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
2204
+ kt.length > 0 && /* @__PURE__ */ c("div", { className: "space-y-1 rounded-md border border-destructive/20 bg-destructive/5 p-3 text-left", children: [
2183
2205
  /* @__PURE__ */ e("div", { className: "text-sm font-medium text-destructive", children: "What needs attention" }),
2184
- /* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children: Ot.slice(0, 5).map((o) => /* @__PURE__ */ e("li", { children: o }, o)) })
2206
+ /* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children: kt.slice(0, 5).map((o) => /* @__PURE__ */ e("li", { children: o }, o)) })
2185
2207
  ] })
2186
2208
  ] }),
2187
2209
  /* @__PURE__ */ e(Da, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: fe ? /* @__PURE__ */ c(T, { children: [
@@ -2196,25 +2218,25 @@ function Rr() {
2196
2218
  }
2197
2219
  ),
2198
2220
  /* @__PURE__ */ e(
2199
- vt,
2221
+ gt,
2200
2222
  {
2201
2223
  onClick: () => at({
2202
- closeAfterSave: kt,
2224
+ closeAfterSave: Ot,
2203
2225
  navigateHomeAfterSave: Ye === "home"
2204
2226
  }),
2205
2227
  className: "m-0",
2206
2228
  children: "Retry"
2207
2229
  }
2208
2230
  )
2209
- ] }) : /* @__PURE__ */ c(vt, { disabled: !0, className: "m-0 cursor-default", children: [
2210
- /* @__PURE__ */ e(Y, { className: "mr-2 h-4 w-4 animate-spin" }),
2231
+ ] }) : /* @__PURE__ */ c(gt, { disabled: !0, className: "m-0 cursor-default", children: [
2232
+ /* @__PURE__ */ e(X, { className: "mr-2 h-4 w-4 animate-spin" }),
2211
2233
  "Saving..."
2212
2234
  ] }) })
2213
2235
  ] })
2214
2236
  }
2215
2237
  ),
2216
2238
  /* @__PURE__ */ e(
2217
- Nn,
2239
+ xn,
2218
2240
  {
2219
2241
  open: Ka,
2220
2242
  onOpenChange: (o) => {
@@ -2232,7 +2254,7 @@ function Rr() {
2232
2254
  }
2233
2255
  );
2234
2256
  }
2235
- function Sr({
2257
+ function wr({
2236
2258
  accessToken: t,
2237
2259
  dashboardId: a,
2238
2260
  selectedSheetId: n,