react-semaphor 0.1.426 → 0.1.427

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 (32) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/dist/brand-studio/index.cjs +1 -1
  3. package/dist/brand-studio/index.js +1 -1
  4. package/dist/chunks/{calendar-preferences-dialog-tBSngRN-.js → calendar-preferences-dialog-DE4tk3t3.js} +2 -2
  5. package/dist/chunks/{calendar-preferences-dialog-C-gN-vlq.js → calendar-preferences-dialog-DuGX1NPV.js} +1 -1
  6. package/dist/chunks/{code-editor-tfzm8LWW.js → code-editor-BoowcKU0.js} +23 -23
  7. package/dist/chunks/{code-editor-Pod1s6SK.js → code-editor-CojfM3qp.js} +772 -757
  8. package/dist/chunks/{dashboard-ZoKNg47G.js → dashboard-DSxho2LN.js} +30409 -30201
  9. package/dist/chunks/{dashboard-briefing-launcher-BE-sNAzW.js → dashboard-briefing-launcher-BFIw5BOf.js} +3 -3
  10. package/dist/chunks/{dashboard-briefing-launcher-0kR-QThz.js → dashboard-briefing-launcher-CguxcHIl.js} +1 -1
  11. package/dist/chunks/{dashboard-controls-BUYTVauu.js → dashboard-controls-Cl0LagTr.js} +8 -8
  12. package/dist/chunks/{dashboard-controls-Ce_Bps8f.js → dashboard-controls-jD-HpCNK.js} +528 -523
  13. package/dist/chunks/{dashboard-json-81uc8aVR.js → dashboard-json-7mpQsizF.js} +1 -1
  14. package/dist/chunks/{dashboard-json-4quaFoSw.js → dashboard-json-BovTt0uu.js} +2 -2
  15. package/dist/chunks/dashboard-ogxedhSY.js +1402 -0
  16. package/dist/chunks/{edit-dashboard-visual-nVRXv1Lq.js → edit-dashboard-visual-B7wLrHeF.js} +1 -1
  17. package/dist/chunks/{edit-dashboard-visual-DqQsH7rN.js → edit-dashboard-visual-dlm8F_Qu.js} +302 -302
  18. package/dist/chunks/{use-create-flow-overlay-state-DUVIsF0y.js → use-create-flow-overlay-state-BU0ROMSm.js} +2 -2
  19. package/dist/chunks/{use-create-flow-overlay-state-CoANTEXS.js → use-create-flow-overlay-state-kbl6avDY.js} +1 -1
  20. package/dist/dashboard/index.cjs +1 -1
  21. package/dist/dashboard/index.js +1 -1
  22. package/dist/data-app-builder/index.cjs +1 -1
  23. package/dist/data-app-builder/index.js +2 -2
  24. package/dist/index.cjs +1 -1
  25. package/dist/index.js +6 -6
  26. package/dist/style.css +1 -1
  27. package/dist/surfboard/index.cjs +1 -1
  28. package/dist/surfboard/index.js +2 -2
  29. package/dist/types/main.d.ts +19 -0
  30. package/dist/types/types.d.ts +18 -0
  31. package/package.json +1 -1
  32. package/dist/chunks/dashboard-JNK2ly_e.js +0 -1402
@@ -1,30 +1,30 @@
1
- import { jsx as e, jsxs as s, Fragment as T } from "react/jsx-runtime";
2
- import { u as D, B as U, aw as it, D as Yt, L as Ga, Z as za, c as ge, ax as dt, ay as _a, az as qa, aA as Zt, aB as be, aC as lt, aD as ea, e as Te, aE as ta, aF as Ha, F as $t, Q as ja, V as Ka, W as Qa, Y as Wa, p as Ja, aG as Xa } from "./code-editor-Pod1s6SK.js";
3
- import { bA as Ya, bB as Za, u as z, b as aa, bC as er, aX as H, c as ra, d as tr, e as rt, f as nt, o as ar, bD as fe, bE as Oe, bF as rr, bG as Bt, bH as na, bI as sa, bJ as nr, bK as ct, bL as sr, bM as or, bN as ir, bO as dr, bP as lr, bQ as cr, b6 as xe, bR as ve, p as C, bS as ur, bT as oa, bp as ut, bU as mr, bV as pr, bW as ia, bX as hr, bY as da, bZ as O, b_ as fr, au as gr, b$ as br, c0 as xr, c1 as vr, ay as yr, aG as Ve, aH as wr, O as tt, c2 as Nr, c3 as Dr, c4 as Cr, at as kr, c5 as Sr, c6 as Ir, I as Gt, c7 as Mr, c8 as Er, c9 as Ar, ca as Lr, cb as zt, cc as _t, cd as qt, ce as Pr, cf as Ur, cg as Rr, ch as Vr, a$ as Ht, ci as Fr, cj as Or, ck as Tr, Q as $r, cl as Br, aN as Gr, aQ as zr, aR as _r, aS as qr, aT as Hr, aU as jr, aV as Kr, aW as jt, w as st } from "./dashboard-ZoKNg47G.js";
4
- import { c as Z, X as la, C as Qr } from "./index-xHCrHprY.js";
1
+ import { jsx as e, jsxs as n, Fragment as T } from "react/jsx-runtime";
2
+ import { u as D, B as U, aw as dt, D as Zt, L as za, Z as _a, c as ge, ax as lt, ay as qa, az as Ha, aA as ea, aB as be, aC as ct, aD as ta, e as Ge, aE as aa, aF as ja, F as $t, Q as Ka, V as Qa, W as Wa, Y as Ja, p as Xa, aG as Ya } from "./code-editor-CojfM3qp.js";
3
+ import { bA as Za, bB as er, u as z, b as ra, bC as tr, aX as H, c as sa, d as ar, e as st, f as nt, o as rr, bD as fe, bE as Te, bF as sr, bG as Bt, bH as na, bI as oa, bJ as nr, bK as ut, bL as or, bM as ir, bN as dr, bO as lr, bP as cr, bQ as ur, b6 as xe, bR as ve, p as C, bS as mr, bT as ia, bp as mt, bU as pr, bV as hr, bW as da, bX as fr, bY as la, bZ as O, b_ as gr, au as br, b$ as xr, c0 as vr, c1 as yr, ay as wr, aG as Fe, aH as Nr, O as at, c2 as Dr, c3 as Cr, c4 as kr, c5 as Sr, at as Ir, c6 as Mr, c7 as Er, I as zt, c8 as Ar, c9 as Lr, ca as Pr, cb as Ur, cc as _t, cd as qt, ce as Ht, cf as Rr, cg as Vr, ch as Fr, ci as Or, a$ as jt, cj as Tr, ck as Gr, cl as $r, Q as Br, cm as zr, aN as _r, aQ as qr, aR as Hr, aS as jr, aT as Kr, aU as Qr, aV as Wr, aW as Kt, w as ot } from "./dashboard-DSxho2LN.js";
4
+ import { c as Z, X as ca, C as Jr } from "./index-xHCrHprY.js";
5
5
  import "./analyze-result-contract-DnfF8kBb.js";
6
6
  import * as L from "react";
7
- import { useState as N, useMemo as Y, useEffect as $e, useRef as Kt, useLayoutEffect as Wr, useCallback as Jr } from "react";
7
+ import { useState as N, useMemo as Y, useEffect as $e, useRef as Qt, useLayoutEffect as Xr, useCallback as Yr } from "react";
8
8
  import "./index-If0wlXGi.js";
9
9
  import "./comparison-document-migration-BJH1idOd.js";
10
- import { createPortal as Xr } from "react-dom";
10
+ import { createPortal as Zr } from "react-dom";
11
11
  import "../briefings/index.js";
12
- import { g as Yr, u as Zr, A as en, V as tn, c as an, f as rn, N as nn, D as sn, U as on } from "./dashboard-briefing-launcher-BE-sNAzW.js";
13
- import { S as dn, C as ln } from "./search-DHZCro8B.js";
14
- import { d as ca } from "./index-CnujJ3fa.js";
15
- import { C as cn } from "./calendar-preferences-dialog-tBSngRN-.js";
16
- import { u as un } from "./use-debounced-dirty-check-BwAbnX_5.js";
17
- import { s as at } from "./normalize-dashboard-for-dirty-check-5KpZN8xr.js";
18
- import { S as Qt } from "./save-HCJjjzdX.js";
19
- import { P as mn } from "./palette-jqaAcwiQ.js";
20
- import { B as pn } from "./braces-BdbUk_r9.js";
12
+ import { g as es, u as ts, A as as, V as rs, c as ss, f as ns, N as os, D as is, U as ds } from "./dashboard-briefing-launcher-BFIw5BOf.js";
13
+ import { S as ls, C as cs } from "./search-DHZCro8B.js";
14
+ import { d as ua } from "./index-CnujJ3fa.js";
15
+ import { C as us } from "./calendar-preferences-dialog-DE4tk3t3.js";
16
+ import { u as ms } from "./use-debounced-dirty-check-BwAbnX_5.js";
17
+ import { s as rt } from "./normalize-dashboard-for-dirty-check-5KpZN8xr.js";
18
+ import { S as Wt } from "./save-HCJjjzdX.js";
19
+ import { P as ps } from "./palette-jqaAcwiQ.js";
20
+ import { B as hs } from "./braces-BdbUk_r9.js";
21
21
  /**
22
22
  * @license lucide-react v0.453.0 - ISC
23
23
  *
24
24
  * This source code is licensed under the ISC license.
25
25
  * See the LICENSE file in the root directory of this source tree.
26
26
  */
27
- const hn = Z("Glasses", [
27
+ const fs = Z("Glasses", [
28
28
  ["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
29
29
  ["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
30
30
  ["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
@@ -37,7 +37,7 @@ const hn = Z("Glasses", [
37
37
  * This source code is licensed under the ISC license.
38
38
  * See the LICENSE file in the root directory of this source tree.
39
39
  */
40
- const fn = Z("Monitor", [
40
+ const gs = Z("Monitor", [
41
41
  ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
42
42
  ["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
43
43
  ["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
@@ -48,7 +48,7 @@ const fn = Z("Monitor", [
48
48
  * This source code is licensed under the ISC license.
49
49
  * See the LICENSE file in the root directory of this source tree.
50
50
  */
51
- const gn = Z("Moon", [
51
+ const bs = Z("Moon", [
52
52
  ["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
53
53
  ]);
54
54
  /**
@@ -57,7 +57,7 @@ const gn = Z("Moon", [
57
57
  * This source code is licensed under the ISC license.
58
58
  * See the LICENSE file in the root directory of this source tree.
59
59
  */
60
- const bn = Z("ShieldX", [
60
+ const xs = Z("ShieldX", [
61
61
  [
62
62
  "path",
63
63
  {
@@ -74,7 +74,7 @@ const bn = Z("ShieldX", [
74
74
  * This source code is licensed under the ISC license.
75
75
  * See the LICENSE file in the root directory of this source tree.
76
76
  */
77
- const xn = Z("Sun", [
77
+ const vs = Z("Sun", [
78
78
  ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
79
79
  ["path", { d: "M12 2v2", key: "tus03m" }],
80
80
  ["path", { d: "M12 20v2", key: "1lh1kg" }],
@@ -91,7 +91,7 @@ const xn = Z("Sun", [
91
91
  * This source code is licensed under the ISC license.
92
92
  * See the LICENSE file in the root directory of this source tree.
93
93
  */
94
- const vn = Z("UserPlus", [
94
+ const ys = Z("UserPlus", [
95
95
  ["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
96
96
  ["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
97
97
  ["line", { x1: "19", x2: "19", y1: "8", y2: "14", key: "1bvyxn" }],
@@ -103,19 +103,19 @@ const vn = Z("UserPlus", [
103
103
  * This source code is licensed under the ISC license.
104
104
  * See the LICENSE file in the root directory of this source tree.
105
105
  */
106
- const ua = Z("UserRound", [
106
+ const ma = Z("UserRound", [
107
107
  ["circle", { cx: "12", cy: "8", r: "5", key: "1hypcn" }],
108
108
  ["path", { d: "M20 21a8 8 0 0 0-16 0", key: "rfgkzh" }]
109
- ]), Fe = ["light", "dark", "system"];
110
- function yn() {
111
- const { theme: t, setTheme: n } = Ya(), r = D(
109
+ ]), Oe = ["light", "dark", "system"];
110
+ function ws() {
111
+ const { theme: t, setTheme: s } = Za(), r = D(
112
112
  (h) => h.actions.setDashboardTheme
113
113
  );
114
114
  function a() {
115
- const h = Fe.includes(t) ? t : "system", m = Fe[(Fe.indexOf(h) + 1) % Fe.length];
116
- n(m), r(m);
115
+ const h = Oe.includes(t) ? t : "system", m = Oe[(Oe.indexOf(h) + 1) % Oe.length];
116
+ s(m), r(m);
117
117
  }
118
- const o = t === "light" ? xn : t === "dark" ? gn : fn, l = t === "light" ? "Theme: light (click for dark)" : t === "dark" ? "Theme: dark (click for system)" : "Theme: system (click for light)";
118
+ const o = t === "light" ? vs : t === "dark" ? bs : gs, l = t === "light" ? "Theme: light (click for dark)" : t === "dark" ? "Theme: dark (click for system)" : "Theme: system (click for light)";
119
119
  return /* @__PURE__ */ e(
120
120
  U,
121
121
  {
@@ -130,13 +130,13 @@ function yn() {
130
130
  }
131
131
  );
132
132
  }
133
- function ma(t) {
134
- const n = (/* @__PURE__ */ new Date()).toISOString(), r = Za({
133
+ function pa(t) {
134
+ const s = (/* @__PURE__ */ new Date()).toISOString(), r = er({
135
135
  dashboard: t.dashboard,
136
136
  sheetIds: (t.dashboard.sheets || []).filter((a) => a.kind !== "document").map((a) => a.id),
137
137
  sheetKind: "dashboard",
138
138
  mode: "dashboard",
139
- generatedAt: n,
139
+ generatedAt: s,
140
140
  runtimeValues: {
141
141
  dashboardInputValues: t.dashboardInputValues,
142
142
  filterValues: t.filterValues,
@@ -146,23 +146,23 @@ function ma(t) {
146
146
  }
147
147
  }).snapshot;
148
148
  return {
149
- generatedAt: n,
149
+ generatedAt: s,
150
150
  dashboardInputValues: r.dashboardInputValues
151
151
  };
152
152
  }
153
- async function wn(t, n, r, a, o, l) {
153
+ async function Ns(t, s, r, a, o, l) {
154
154
  if (!l)
155
155
  return null;
156
156
  const h = JSON.stringify(r), m = `${t}/v1/lens`;
157
- return await it(m, l, {
158
- name: n,
157
+ return await dt(m, l, {
158
+ name: s,
159
159
  template: h,
160
160
  filterValues: a,
161
161
  inputValues: o,
162
162
  operation: "create"
163
163
  });
164
164
  }
165
- async function ot(t, n, r) {
165
+ async function it(t, s, r) {
166
166
  if (!r)
167
167
  return null;
168
168
  const {
@@ -172,8 +172,8 @@ async function ot(t, n, r) {
172
172
  inputValues: h,
173
173
  isDefault: m,
174
174
  shared: p
175
- } = n, v = `${t}/v1/lens`;
176
- return await it(v, r, {
175
+ } = s, v = `${t}/v1/lens`;
176
+ return await dt(v, r, {
177
177
  lensId: a,
178
178
  template: o,
179
179
  filterValues: l,
@@ -183,33 +183,33 @@ async function ot(t, n, r) {
183
183
  operation: "update"
184
184
  });
185
185
  }
186
- async function Nn(t, n, r) {
186
+ async function Ds(t, s, r) {
187
187
  if (!r)
188
188
  return null;
189
189
  const a = `${t}/v1/lens`;
190
- return await it(a, r, {
190
+ return await dt(a, r, {
191
191
  operation: "delete",
192
- lensId: n
192
+ lensId: s
193
193
  });
194
194
  }
195
- const Dn = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
196
- function Cn({
195
+ const Cs = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
196
+ function ks({
197
197
  open: t,
198
- onOpenChange: n
198
+ onOpenChange: s
199
199
  } = {}) {
200
- const [r, a] = N(""), [o, l] = N(!1), h = D((x) => x.lenses), { setLenses: m, setSelectedLensId: p } = Yt(), [v, d] = N(!1), [u, b] = N(!1), f = t !== void 0, w = f ? t : u, y = (x) => {
201
- f || b(x), n == null || n(x);
200
+ const [r, a] = N(""), [o, l] = N(!1), h = D((x) => x.lenses), { setLenses: m, setSelectedLensId: p } = Zt(), [v, d] = N(!1), [u, b] = N(!1), f = t !== void 0, w = f ? t : u, y = (x) => {
201
+ f || b(x), s == null || s(x);
202
202
  }, c = D((x) => x.dashboard), M = D((x) => x.filterValues), { authToken: S, tokenProps: P } = z();
203
203
  async function k() {
204
204
  d(!0);
205
- const x = D.getState(), _ = ma({
205
+ const x = D.getState(), _ = pa({
206
206
  dashboard: c,
207
207
  dashboardInputValues: x.dashboardInputValues,
208
208
  filterValues: M,
209
209
  controlValues: x.controlValues,
210
210
  inlineFilterValuesMap: x.inlineFilterValuesMap,
211
211
  cardControlValuesMap: x.cardControlValuesMap
212
- }), q = await wn(
212
+ }), q = await Ns(
213
213
  P.apiServiceUrl,
214
214
  r,
215
215
  c,
@@ -219,20 +219,20 @@ function Cn({
219
219
  );
220
220
  q && (m([...h || [], q]), p(q.id), y(!1)), d(!1);
221
221
  }
222
- return /* @__PURE__ */ s(aa, { open: w, onOpenChange: y, children: [
223
- f ? null : /* @__PURE__ */ e(er, { asChild: !0, children: /* @__PURE__ */ s(U, { variant: "secondary", size: "xs", children: [
222
+ return /* @__PURE__ */ n(ra, { open: w, onOpenChange: y, children: [
223
+ f ? null : /* @__PURE__ */ e(tr, { asChild: !0, children: /* @__PURE__ */ n(U, { variant: "secondary", size: "xs", children: [
224
224
  /* @__PURE__ */ e(H, { className: "h-3.5 w-3.5" }),
225
225
  "Lens"
226
226
  ] }) }),
227
- /* @__PURE__ */ s(ra, { className: "rounded-control border-border/60 sm:max-w-[420px] sm:rounded-control", children: [
228
- /* @__PURE__ */ s(tr, { children: [
229
- /* @__PURE__ */ e(rt, { className: "text-[15px]", children: "Create lens" }),
227
+ /* @__PURE__ */ n(sa, { className: "rounded-control border-border/60 sm:max-w-[420px] sm:rounded-control", children: [
228
+ /* @__PURE__ */ n(ar, { children: [
229
+ /* @__PURE__ */ e(st, { className: "text-[15px]", children: "Create lens" }),
230
230
  /* @__PURE__ */ e(nt, { className: "text-[13px] leading-5", children: "Lenses are private by default and are only visible to you." })
231
231
  ] }),
232
- /* @__PURE__ */ s("div", { className: "space-y-1.5 py-1", children: [
233
- /* @__PURE__ */ e(Ga, { htmlFor: "lens-name", className: Dn, children: "Name" }),
232
+ /* @__PURE__ */ n("div", { className: "space-y-1.5 py-1", children: [
233
+ /* @__PURE__ */ e(za, { htmlFor: "lens-name", className: Cs, children: "Name" }),
234
234
  /* @__PURE__ */ e(
235
- za,
235
+ _a,
236
236
  {
237
237
  id: "lens-name",
238
238
  size: "xs",
@@ -243,7 +243,7 @@ function Cn({
243
243
  ),
244
244
  o && /* @__PURE__ */ e("p", { className: "text-[12px] text-destructive", children: "A lens with this name already exists. Pick a different one." })
245
245
  ] }),
246
- /* @__PURE__ */ s(ar, { children: [
246
+ /* @__PURE__ */ n(rr, { children: [
247
247
  /* @__PURE__ */ e(U, { variant: "outline", size: "xs", onClick: () => y(!1), children: "Cancel" }),
248
248
  /* @__PURE__ */ e(
249
249
  U,
@@ -259,19 +259,19 @@ function Cn({
259
259
  ] })
260
260
  ] });
261
261
  }
262
- function kn({ includeLabel: t = !1 } = {}) {
263
- const n = D((d) => d.lenses), r = D((d) => d.selectedLensId), { setLenses: a, setSelectedLensId: o } = Yt(), { authToken: l, tokenProps: h } = z();
262
+ function Ss({ includeLabel: t = !1 } = {}) {
263
+ const s = D((d) => d.lenses), r = D((d) => d.selectedLensId), { setLenses: a, setSelectedLensId: o } = Zt(), { authToken: l, tokenProps: h } = z();
264
264
  async function m(d) {
265
265
  o(d);
266
266
  }
267
267
  async function p(d) {
268
- if (await Nn(h.apiServiceUrl, d, l == null ? void 0 : l.accessToken)) {
269
- const b = n == null ? void 0 : n.filter((f) => f.id !== d);
268
+ if (await Ds(h.apiServiceUrl, d, l == null ? void 0 : l.accessToken)) {
269
+ const b = s == null ? void 0 : s.filter((f) => f.id !== d);
270
270
  a(b || []), o("original");
271
271
  }
272
272
  }
273
273
  async function v(d) {
274
- const u = n == null ? void 0 : n.map((w) => w.id === d.id ? {
274
+ const u = s == null ? void 0 : s.map((w) => w.id === d.id ? {
275
275
  ...w,
276
276
  isDefault: !d.isDefault
277
277
  } : {
@@ -283,36 +283,36 @@ function kn({ includeLabel: t = !1 } = {}) {
283
283
  ...d,
284
284
  isDefault: !d.isDefault
285
285
  };
286
- await ot(h.apiServiceUrl, b, l == null ? void 0 : l.accessToken);
287
- const f = n == null ? void 0 : n.find((w) => w.isDefault);
286
+ await it(h.apiServiceUrl, b, l == null ? void 0 : l.accessToken);
287
+ const f = s == null ? void 0 : s.find((w) => w.isDefault);
288
288
  if (f && f.id !== d.id) {
289
289
  const w = {
290
290
  ...f,
291
291
  isDefault: !1
292
292
  };
293
- await ot(h.apiServiceUrl, w, l == null ? void 0 : l.accessToken);
293
+ await it(h.apiServiceUrl, w, l == null ? void 0 : l.accessToken);
294
294
  }
295
295
  }
296
- return /* @__PURE__ */ s(T, { children: [
297
- t ? /* @__PURE__ */ s(T, { children: [
296
+ return /* @__PURE__ */ n(T, { children: [
297
+ t ? /* @__PURE__ */ n(T, { children: [
298
298
  /* @__PURE__ */ e(fe, { className: "px-3", children: "Lenses" }),
299
- /* @__PURE__ */ e(Oe, {})
299
+ /* @__PURE__ */ e(Te, {})
300
300
  ] }) : null,
301
- /* @__PURE__ */ s(
302
- rr,
301
+ /* @__PURE__ */ n(
302
+ sr,
303
303
  {
304
304
  value: r,
305
305
  onValueChange: m,
306
306
  children: [
307
307
  /* @__PURE__ */ e(Bt, { value: "original", children: "Original" }),
308
- n == null ? void 0 : n.map((d) => /* @__PURE__ */ s(
308
+ s == null ? void 0 : s.map((d) => /* @__PURE__ */ n(
309
309
  Bt,
310
310
  {
311
311
  className: "group flex justify-between gap-2",
312
312
  value: d.id,
313
313
  children: [
314
314
  /* @__PURE__ */ e("p", { children: d.name }),
315
- /* @__PURE__ */ s("span", { className: "flex items-center gap-3", children: [
315
+ /* @__PURE__ */ n("span", { className: "flex items-center gap-3", children: [
316
316
  /* @__PURE__ */ e(
317
317
  na,
318
318
  {
@@ -330,7 +330,7 @@ function kn({ includeLabel: t = !1 } = {}) {
330
330
  }
331
331
  ),
332
332
  /* @__PURE__ */ e(
333
- sa,
333
+ oa,
334
334
  {
335
335
  onClick: (u) => {
336
336
  u.preventDefault(), p(d.id);
@@ -349,19 +349,19 @@ function kn({ includeLabel: t = !1 } = {}) {
349
349
  )
350
350
  ] });
351
351
  }
352
- function Sn() {
353
- const { displayPreferences: t, shouldShowElement: n } = nr(), { currentUser: r, userContext: a } = ct(), o = Y(
354
- () => sr(r),
352
+ function Is() {
353
+ const { displayPreferences: t, shouldShowElement: s } = nr(), { currentUser: r, userContext: a } = ut(), o = Y(
354
+ () => or(r),
355
355
  [r]
356
- ), l = Y(() => (m) => o && o[m] !== void 0 && o[m] === !1 ? !1 : n(m), [o, n, t]), h = Y(
356
+ ), l = Y(() => (m) => o && o[m] !== void 0 && o[m] === !1 ? !1 : s(m), [o, s, t]), h = Y(
357
357
  () => {
358
358
  var m, p, v, d, u;
359
359
  return {
360
- canEdit: ((m = a == null ? void 0 : a.permissions) == null ? void 0 : m.canEdit) ?? cr(r),
361
- canUseFilters: ((p = a == null ? void 0 : a.permissions) == null ? void 0 : p.canEdit) ?? lr(r),
362
- canManageDashboards: ((v = a == null ? void 0 : a.permissions) == null ? void 0 : v.canCreateDashboard) ?? dr(r),
363
- canCreateDashboards: ((d = a == null ? void 0 : a.permissions) == null ? void 0 : d.canCreateDashboard) ?? ir(r),
364
- canAccessVisuals: ((u = a == null ? void 0 : a.permissions) == null ? void 0 : u.canEdit) ?? or(r)
360
+ canEdit: ((m = a == null ? void 0 : a.permissions) == null ? void 0 : m.canEdit) ?? ur(r),
361
+ canUseFilters: ((p = a == null ? void 0 : a.permissions) == null ? void 0 : p.canEdit) ?? cr(r),
362
+ canManageDashboards: ((v = a == null ? void 0 : a.permissions) == null ? void 0 : v.canCreateDashboard) ?? lr(r),
363
+ canCreateDashboards: ((d = a == null ? void 0 : a.permissions) == null ? void 0 : d.canCreateDashboard) ?? dr(r),
364
+ canAccessVisuals: ((u = a == null ? void 0 : a.permissions) == null ? void 0 : u.canEdit) ?? ir(r)
365
365
  };
366
366
  },
367
367
  [r, a]
@@ -373,152 +373,152 @@ function Sn() {
373
373
  currentUser: r
374
374
  };
375
375
  }
376
- var mt = "Avatar", [In] = _a(mt), Mn = [
376
+ var pt = "Avatar", [Ms] = qa(pt), Es = [
377
377
  0,
378
378
  () => {
379
379
  }
380
- ], [En, pa] = In(mt), pt = L.forwardRef(
381
- (t, n) => {
382
- const { __scopeAvatar: r, ...a } = t, [o, l] = L.useState("idle"), [h, m] = Ln();
380
+ ], [As, ha] = Ms(pt), ht = L.forwardRef(
381
+ (t, s) => {
382
+ const { __scopeAvatar: r, ...a } = t, [o, l] = L.useState("idle"), [h, m] = Ps();
383
383
  return /* @__PURE__ */ e(
384
- En,
384
+ As,
385
385
  {
386
386
  scope: r,
387
387
  imageLoadingStatus: o,
388
388
  setImageLoadingStatus: l,
389
389
  imageCount: h,
390
390
  setImageCount: m,
391
- children: /* @__PURE__ */ e(dt.span, { ...a, ref: n })
391
+ children: /* @__PURE__ */ e(lt.span, { ...a, ref: s })
392
392
  }
393
393
  );
394
394
  }
395
395
  );
396
- pt.displayName = mt;
397
- var ha = "AvatarImage", ht = L.forwardRef(
398
- (t, n) => {
399
- const { __scopeAvatar: r, src: a, onLoadingStatusChange: o, ...l } = t, h = pa(ha, r);
400
- Pn(h.setImageCount);
401
- const m = An(a, {
396
+ ht.displayName = pt;
397
+ var fa = "AvatarImage", ft = L.forwardRef(
398
+ (t, s) => {
399
+ const { __scopeAvatar: r, src: a, onLoadingStatusChange: o, ...l } = t, h = ha(fa, r);
400
+ Us(h.setImageCount);
401
+ const m = Ls(a, {
402
402
  referrerPolicy: l.referrerPolicy,
403
403
  crossOrigin: l.crossOrigin,
404
404
  loadingStatus: h.imageLoadingStatus,
405
405
  setLoadingStatus: h.setImageLoadingStatus
406
- }), p = qa((d) => {
406
+ }), p = Ha((d) => {
407
407
  o == null || o(d);
408
408
  }), v = L.useRef(m);
409
- return Zt(() => {
409
+ return ea(() => {
410
410
  const d = v.current;
411
411
  v.current = m, m !== d && p(m);
412
- }, [m, p]), m === "loaded" ? /* @__PURE__ */ e(dt.img, { ...l, ref: n, src: a }) : null;
412
+ }, [m, p]), m === "loaded" ? /* @__PURE__ */ e(lt.img, { ...l, ref: s, src: a }) : null;
413
413
  }
414
414
  );
415
- ht.displayName = ha;
416
- var fa = "AvatarFallback", ft = L.forwardRef(
417
- (t, n) => {
418
- const { __scopeAvatar: r, delayMs: a, ...o } = t, l = pa(fa, r), [h, m] = L.useState(a === void 0);
415
+ ft.displayName = fa;
416
+ var ga = "AvatarFallback", gt = L.forwardRef(
417
+ (t, s) => {
418
+ const { __scopeAvatar: r, delayMs: a, ...o } = t, l = ha(ga, r), [h, m] = L.useState(a === void 0);
419
419
  return L.useEffect(() => {
420
420
  if (a !== void 0) {
421
421
  const p = window.setTimeout(() => m(!0), a);
422
422
  return () => window.clearTimeout(p);
423
423
  }
424
- }, [a]), h && l.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(dt.span, { ...o, ref: n }) : null;
424
+ }, [a]), h && l.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(lt.span, { ...o, ref: s }) : null;
425
425
  }
426
426
  );
427
- ft.displayName = fa;
428
- function An(t, {
429
- loadingStatus: n,
427
+ gt.displayName = ga;
428
+ function Ls(t, {
429
+ loadingStatus: s,
430
430
  setLoadingStatus: r,
431
431
  referrerPolicy: a,
432
432
  crossOrigin: o
433
433
  }) {
434
- return Zt(() => {
434
+ return ea(() => {
435
435
  if (!t) {
436
436
  r("error");
437
437
  return;
438
438
  }
439
439
  const l = new window.Image(), h = (p) => {
440
440
  const v = p.currentTarget;
441
- r(Wt(v));
441
+ r(Jt(v));
442
442
  }, m = () => r("error");
443
- return l.addEventListener("load", h), l.addEventListener("error", m), a && (l.referrerPolicy = a), l.crossOrigin = o ?? null, l.src = t, r(Wt(l)), () => {
443
+ return l.addEventListener("load", h), l.addEventListener("error", m), a && (l.referrerPolicy = a), l.crossOrigin = o ?? null, l.src = t, r(Jt(l)), () => {
444
444
  l.removeEventListener("load", h), l.removeEventListener("error", m), r("idle");
445
445
  };
446
- }, [t, o, a, r]), n;
446
+ }, [t, o, a, r]), s;
447
447
  }
448
- function Wt(t) {
448
+ function Jt(t) {
449
449
  return t.complete ? t.naturalWidth > 0 ? "loaded" : "error" : "loading";
450
450
  }
451
- function Ln() {
452
- let t = Mn;
451
+ function Ps() {
452
+ let t = Es;
453
453
  {
454
454
  t = L.useState(0);
455
- const [n] = t, r = L.useRef(!1);
455
+ const [s] = t, r = L.useRef(!1);
456
456
  L.useEffect(() => {
457
- n > 1 && !r.current && (r.current = !0, console.warn(
457
+ s > 1 && !r.current && (r.current = !0, console.warn(
458
458
  "Avatar: Only one `Avatar.Image` component should be rendered per `Avatar.Root`, but multiple were detected. This will lead to unexpected behavior."
459
459
  ));
460
- }, [n]);
460
+ }, [s]);
461
461
  }
462
462
  return t;
463
463
  }
464
- function Pn(t) {
465
- L.useEffect(() => (t((n) => n + 1), () => {
466
- t((n) => n - 1);
464
+ function Us(t) {
465
+ L.useEffect(() => (t((s) => s + 1), () => {
466
+ t((s) => s - 1);
467
467
  }), [t]);
468
468
  }
469
- const ga = L.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ e(
470
- pt,
469
+ const ba = L.forwardRef(({ className: t, ...s }, r) => /* @__PURE__ */ e(
470
+ ht,
471
471
  {
472
472
  ref: r,
473
473
  className: ge(
474
474
  "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
475
475
  t
476
476
  ),
477
- ...n
477
+ ...s
478
478
  }
479
479
  ));
480
- ga.displayName = pt.displayName;
481
- const Un = L.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ e(
482
- ht,
480
+ ba.displayName = ht.displayName;
481
+ const Rs = L.forwardRef(({ className: t, ...s }, r) => /* @__PURE__ */ e(
482
+ ft,
483
483
  {
484
484
  ref: r,
485
485
  className: ge("aspect-square h-full w-full", t),
486
- ...n
486
+ ...s
487
487
  }
488
488
  ));
489
- Un.displayName = ht.displayName;
490
- const ba = L.forwardRef(({ className: t, ...n }, r) => /* @__PURE__ */ e(
491
- ft,
489
+ Rs.displayName = ft.displayName;
490
+ const xa = L.forwardRef(({ className: t, ...s }, r) => /* @__PURE__ */ e(
491
+ gt,
492
492
  {
493
493
  ref: r,
494
494
  className: ge(
495
495
  "flex h-full w-full items-center justify-center rounded-full bg-muted",
496
496
  t
497
497
  ),
498
- ...n
498
+ ...s
499
499
  }
500
500
  ));
501
- ba.displayName = ft.displayName;
502
- const Rn = async (t, n, r) => {
501
+ xa.displayName = gt.displayName;
502
+ const Vs = async (t, s, r) => {
503
503
  const a = `${t}/management/v1/groups`;
504
- return await ea(a, n, r);
505
- }, Vn = async (t, n, r, a) => {
504
+ return await ta(a, s, r);
505
+ }, Fs = async (t, s, r, a) => {
506
506
  const o = `${t}/management/v1/groups/${r}`;
507
- return lt(o, n, "PATCH", a);
508
- }, Fn = async (t, n, r) => {
507
+ return ct(o, s, "PATCH", a);
508
+ }, Os = async (t, s, r) => {
509
509
  const a = `${t}/management/v1/groups/${r}`;
510
- await lt(a, n, "DELETE");
511
- }, On = async (t, n, r, a) => {
510
+ await ct(a, s, "DELETE");
511
+ }, Ts = async (t, s, r, a) => {
512
512
  const o = `${t}/management/v1/groups/${r}/members`;
513
- return await ea(o, n, a);
514
- }, Tn = async (t, n, r, a) => {
513
+ return await ta(o, s, a);
514
+ }, Gs = async (t, s, r, a) => {
515
515
  const o = `${t}/management/v1/groups/${r}/members`;
516
- await lt(o, n, "DELETE", a);
516
+ await ct(o, s, "DELETE", a);
517
517
  };
518
- function $n() {
519
- const { authToken: t, tokenProps: n } = z(), r = xe();
518
+ function $s() {
519
+ const { authToken: t, tokenProps: s } = z(), r = xe();
520
520
  return ve({
521
- mutationFn: (a) => Rn(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a),
521
+ mutationFn: (a) => Vs(s.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a),
522
522
  onSuccess: () => {
523
523
  r.invalidateQueries({ queryKey: ["groups"] }), C.success("Group created successfully");
524
524
  },
@@ -529,13 +529,13 @@ function $n() {
529
529
  }
530
530
  });
531
531
  }
532
- function Bn() {
533
- const { authToken: t, tokenProps: n } = z(), r = xe();
532
+ function Bs() {
533
+ const { authToken: t, tokenProps: s } = z(), r = xe();
534
534
  return ve({
535
535
  mutationFn: ({
536
536
  groupId: a,
537
537
  data: o
538
- }) => Vn(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a, o),
538
+ }) => Fs(s.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a, o),
539
539
  onSuccess: (a, o) => {
540
540
  r.invalidateQueries({ queryKey: ["group", o.groupId] }), r.invalidateQueries({ queryKey: ["groups"] }), C.success("Group updated successfully");
541
541
  },
@@ -546,10 +546,10 @@ function Bn() {
546
546
  }
547
547
  });
548
548
  }
549
- function Gn() {
550
- const { authToken: t, tokenProps: n } = z(), r = xe();
549
+ function zs() {
550
+ const { authToken: t, tokenProps: s } = z(), r = xe();
551
551
  return ve({
552
- mutationFn: (a) => Fn(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a),
552
+ mutationFn: (a) => Os(s.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a),
553
553
  onSuccess: (a, o) => {
554
554
  r.invalidateQueries({ queryKey: ["groups"] }), r.removeQueries({ queryKey: ["group", o] }), C.success("Group deleted successfully");
555
555
  },
@@ -560,13 +560,13 @@ function Gn() {
560
560
  }
561
561
  });
562
562
  }
563
- function zn() {
564
- const { authToken: t, tokenProps: n } = z(), r = xe();
563
+ function _s() {
564
+ const { authToken: t, tokenProps: s } = z(), r = xe();
565
565
  return ve({
566
566
  mutationFn: ({
567
567
  groupId: a,
568
568
  data: o
569
- }) => On(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a, o),
569
+ }) => Ts(s.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a, o),
570
570
  onSuccess: (a, o) => {
571
571
  r.invalidateQueries({ queryKey: ["group", o.groupId] }), r.invalidateQueries({
572
572
  queryKey: ["group-members", o.groupId]
@@ -579,13 +579,13 @@ function zn() {
579
579
  }
580
580
  });
581
581
  }
582
- function _n() {
583
- const { authToken: t, tokenProps: n } = z(), r = xe();
582
+ function qs() {
583
+ const { authToken: t, tokenProps: s } = z(), r = xe();
584
584
  return ve({
585
585
  mutationFn: ({
586
586
  groupId: a,
587
587
  data: o
588
- }) => Tn(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a, o),
588
+ }) => Gs(s.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a, o),
589
589
  onSuccess: (a, o) => {
590
590
  r.invalidateQueries({ queryKey: ["group", o.groupId] }), r.invalidateQueries({
591
591
  queryKey: ["group-members", o.groupId]
@@ -598,22 +598,22 @@ function _n() {
598
598
  }
599
599
  });
600
600
  }
601
- const qn = [];
602
- function Hn({
601
+ const Hs = [];
602
+ function js({
603
603
  open: t,
604
- onOpenChange: n
604
+ onOpenChange: s
605
605
  }) {
606
606
  var S, P, k;
607
- const { tokenProps: r } = z(), { currentUser: a } = ct(), o = (a == null ? void 0 : a.type) === "tenant", l = r == null ? void 0 : r.tenantId, {
607
+ const { tokenProps: r } = z(), { currentUser: a } = ut(), o = (a == null ? void 0 : a.type) === "tenant", l = r == null ? void 0 : r.tenantId, {
608
608
  groups: h,
609
609
  isLoading: m,
610
610
  error: p,
611
611
  refetch: v
612
- } = ur({
612
+ } = mr({
613
613
  type: o ? "TENANT_GROUP" : "all",
614
614
  tenantId: o ? l : void 0,
615
615
  includeMembers: !1
616
- }), d = p ? xa(p, "Unable to load groups.") : null, [u, b] = N({ kind: "list" }), [f, w] = N(null), y = Gn();
616
+ }), d = p ? va(p, "Unable to load groups.") : null, [u, b] = N({ kind: "list" }), [f, w] = N(null), y = zs();
617
617
  $e(() => {
618
618
  t || (b({ kind: "list" }), w(null));
619
619
  }, [t]);
@@ -624,11 +624,11 @@ function Hn({
624
624
  } catch {
625
625
  }
626
626
  };
627
- return /* @__PURE__ */ e(aa, { open: t, onOpenChange: n, children: /* @__PURE__ */ s(ra, { className: "flex max-h-[640px] w-[720px] max-w-[92vw] flex-col gap-0 overflow-hidden p-0", children: [
628
- u.kind === "list" ? /* @__PURE__ */ s("div", { className: "shrink-0 border-b border-border px-5 pt-4 pb-3.5", children: [
629
- /* @__PURE__ */ e(rt, { className: "text-[15px] font-semibold tracking-tight", children: "Group management" }),
627
+ return /* @__PURE__ */ e(ra, { open: t, onOpenChange: s, children: /* @__PURE__ */ n(sa, { className: "flex max-h-[640px] w-[720px] max-w-[92vw] flex-col gap-0 overflow-hidden p-0", children: [
628
+ u.kind === "list" ? /* @__PURE__ */ n("div", { className: "shrink-0 border-b border-border px-5 pt-4 pb-3.5", children: [
629
+ /* @__PURE__ */ e(st, { className: "text-[15px] font-semibold tracking-tight", children: "Group management" }),
630
630
  /* @__PURE__ */ e(nt, { className: "mt-1 text-[12px] leading-[1.5] text-muted-foreground", children: "Organize people into groups for shared access." })
631
- ] }) : u.kind === "create" ? /* @__PURE__ */ s("div", { className: "flex h-10 shrink-0 items-center gap-1.5 border-b border-border px-5", children: [
631
+ ] }) : u.kind === "create" ? /* @__PURE__ */ n("div", { className: "flex h-10 shrink-0 items-center gap-1.5 border-b border-border px-5", children: [
632
632
  /* @__PURE__ */ e(
633
633
  "button",
634
634
  {
@@ -636,14 +636,14 @@ function Hn({
636
636
  onClick: () => b({ kind: "list" }),
637
637
  "aria-label": "Back",
638
638
  className: "-ml-1 flex h-6 w-6 items-center justify-center rounded-[3px] text-muted-foreground hover:bg-accent hover:text-foreground",
639
- children: /* @__PURE__ */ e(oa, { className: "h-3.5 w-3.5" })
639
+ children: /* @__PURE__ */ e(ia, { className: "h-3.5 w-3.5" })
640
640
  }
641
641
  ),
642
- /* @__PURE__ */ e(rt, { className: "truncate text-[13px] font-medium", children: "New group" }),
642
+ /* @__PURE__ */ e(st, { className: "truncate text-[13px] font-medium", children: "New group" }),
643
643
  /* @__PURE__ */ e(nt, { className: "sr-only", children: "Create a new group to organize members." })
644
644
  ] }) : null,
645
645
  u.kind === "list" && /* @__PURE__ */ e(
646
- jn,
646
+ Ks,
647
647
  {
648
648
  groups: h,
649
649
  isLoading: m,
@@ -656,7 +656,7 @@ function Hn({
656
656
  }
657
657
  ),
658
658
  u.kind === "members" && c && /* @__PURE__ */ e(
659
- Wn,
659
+ Js,
660
660
  {
661
661
  group: c,
662
662
  isTenantViewer: o,
@@ -671,7 +671,7 @@ function Hn({
671
671
  c.id
672
672
  ),
673
673
  u.kind === "create" && /* @__PURE__ */ e(
674
- Jn,
674
+ Xs,
675
675
  {
676
676
  isTenantUser: o,
677
677
  tenantId: l,
@@ -681,14 +681,14 @@ function Hn({
681
681
  }
682
682
  }
683
683
  ),
684
- f && /* @__PURE__ */ s("div", { className: "flex shrink-0 items-center justify-between gap-3 border-t border-border bg-muted/40 px-5 py-2.5", children: [
685
- /* @__PURE__ */ s("div", { className: "min-w-0 text-[12px] text-foreground", children: [
684
+ f && /* @__PURE__ */ n("div", { className: "flex shrink-0 items-center justify-between gap-3 border-t border-border bg-muted/40 px-5 py-2.5", children: [
685
+ /* @__PURE__ */ n("div", { className: "min-w-0 text-[12px] text-foreground", children: [
686
686
  "Delete ",
687
687
  /* @__PURE__ */ e("span", { className: "font-medium", children: f.name }),
688
688
  "?",
689
689
  /* @__PURE__ */ e("span", { className: "ml-2 text-muted-foreground", children: "Members lose any access granted via this group." })
690
690
  ] }),
691
- /* @__PURE__ */ s("div", { className: "flex shrink-0 items-center gap-1.5", children: [
691
+ /* @__PURE__ */ n("div", { className: "flex shrink-0 items-center gap-1.5", children: [
692
692
  /* @__PURE__ */ e(
693
693
  "button",
694
694
  {
@@ -699,7 +699,7 @@ function Hn({
699
699
  children: "Cancel"
700
700
  }
701
701
  ),
702
- /* @__PURE__ */ s(
702
+ /* @__PURE__ */ n(
703
703
  "button",
704
704
  {
705
705
  type: "button",
@@ -707,7 +707,7 @@ function Hn({
707
707
  disabled: y.isPending,
708
708
  className: "inline-flex h-7 items-center gap-1.5 rounded-[5px] bg-rose-600 px-2.5 text-[12px] font-medium text-white hover:bg-rose-700 disabled:opacity-60",
709
709
  children: [
710
- y.isPending ? /* @__PURE__ */ e(Te, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ e(ut, { className: "h-3 w-3" }),
710
+ y.isPending ? /* @__PURE__ */ e(Ge, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ e(mt, { className: "h-3 w-3" }),
711
711
  "Delete group"
712
712
  ]
713
713
  }
@@ -716,9 +716,9 @@ function Hn({
716
716
  ] })
717
717
  ] }) });
718
718
  }
719
- function jn({
719
+ function Ks({
720
720
  groups: t,
721
- isLoading: n,
721
+ isLoading: s,
722
722
  errorMessage: r,
723
723
  onRetry: a,
724
724
  currentUserId: o,
@@ -732,10 +732,10 @@ function jn({
732
732
  ),
733
733
  [t, p]
734
734
  );
735
- return /* @__PURE__ */ s("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
736
- /* @__PURE__ */ s("div", { className: "flex shrink-0 items-center gap-2 border-b border-border px-5 py-2.5", children: [
737
- /* @__PURE__ */ s("div", { className: "flex flex-1 items-center gap-2 rounded-[5px] border border-border bg-background px-2 focus-within:border-foreground/40", children: [
738
- /* @__PURE__ */ e(dn, { className: "h-3 w-3 text-muted-foreground" }),
735
+ return /* @__PURE__ */ n("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
736
+ /* @__PURE__ */ n("div", { className: "flex shrink-0 items-center gap-2 border-b border-border px-5 py-2.5", children: [
737
+ /* @__PURE__ */ n("div", { className: "flex flex-1 items-center gap-2 rounded-[5px] border border-border bg-background px-2 focus-within:border-foreground/40", children: [
738
+ /* @__PURE__ */ e(ls, { className: "h-3 w-3 text-muted-foreground" }),
739
739
  /* @__PURE__ */ e(
740
740
  "input",
741
741
  {
@@ -751,11 +751,11 @@ function jn({
751
751
  type: "button",
752
752
  onClick: () => v(""),
753
753
  className: "flex h-4 w-4 items-center justify-center rounded-[3px] text-muted-foreground hover:bg-accent hover:text-foreground",
754
- children: /* @__PURE__ */ e(la, { className: "h-2.5 w-2.5" })
754
+ children: /* @__PURE__ */ e(ca, { className: "h-2.5 w-2.5" })
755
755
  }
756
756
  )
757
757
  ] }),
758
- /* @__PURE__ */ s(
758
+ /* @__PURE__ */ n(
759
759
  "button",
760
760
  {
761
761
  type: "button",
@@ -768,21 +768,21 @@ function jn({
768
768
  }
769
769
  )
770
770
  ] }),
771
- /* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto", children: n ? /* @__PURE__ */ e("div", { className: "space-y-px p-3", children: [1, 2, 3].map((u) => /* @__PURE__ */ e(
771
+ /* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto", children: s ? /* @__PURE__ */ e("div", { className: "space-y-px p-3", children: [1, 2, 3].map((u) => /* @__PURE__ */ e(
772
772
  "div",
773
773
  {
774
774
  className: "h-12 animate-pulse rounded-[4px] bg-muted/60"
775
775
  },
776
776
  u
777
777
  )) }) : r ? /* @__PURE__ */ e(
778
- va,
778
+ ya,
779
779
  {
780
780
  title: "Can't load groups",
781
781
  message: r,
782
782
  onRetry: a
783
783
  }
784
- ) : d.length === 0 && t.length === 0 ? /* @__PURE__ */ e(Qn, { onCreate: h }) : d.length === 0 ? /* @__PURE__ */ s("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
785
- /* @__PURE__ */ s("div", { className: "text-[12px] text-foreground", children: [
784
+ ) : d.length === 0 && t.length === 0 ? /* @__PURE__ */ e(Ws, { onCreate: h }) : d.length === 0 ? /* @__PURE__ */ n("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
785
+ /* @__PURE__ */ n("div", { className: "text-[12px] text-foreground", children: [
786
786
  'No groups match "',
787
787
  p,
788
788
  '"'
@@ -791,7 +791,7 @@ function jn({
791
791
  ] }) : d.map((u) => {
792
792
  var b;
793
793
  return /* @__PURE__ */ e(
794
- Kn,
794
+ Qs,
795
795
  {
796
796
  group: u,
797
797
  canDelete: ((b = u.permissions) == null ? void 0 : b.canDelete) ?? u.createdBy === o,
@@ -803,50 +803,50 @@ function jn({
803
803
  }) })
804
804
  ] });
805
805
  }
806
- function Kn({
806
+ function Qs({
807
807
  group: t,
808
- canDelete: n,
808
+ canDelete: s,
809
809
  onClick: r,
810
810
  onDelete: a
811
811
  }) {
812
812
  let o = "";
813
813
  try {
814
- o = ca(new Date(t.createdAt), "MMM d, yyyy");
814
+ o = ua(new Date(t.createdAt), "MMM d, yyyy");
815
815
  } catch {
816
816
  o = "";
817
817
  }
818
- return /* @__PURE__ */ s(
818
+ return /* @__PURE__ */ n(
819
819
  "button",
820
820
  {
821
821
  type: "button",
822
822
  onClick: r,
823
823
  className: "group flex w-full items-center gap-3 border-b border-border/60 px-5 py-2.5 text-left hover:bg-accent/40",
824
824
  children: [
825
- /* @__PURE__ */ e("div", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-[4px] border border-border bg-background text-muted-foreground", children: /* @__PURE__ */ e(hr, { className: "h-3.5 w-3.5" }) }),
826
- /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
825
+ /* @__PURE__ */ e("div", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-[4px] border border-border bg-background text-muted-foreground", children: /* @__PURE__ */ e(fr, { className: "h-3.5 w-3.5" }) }),
826
+ /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
827
827
  /* @__PURE__ */ e("div", { className: "truncate text-[13px] font-medium text-foreground", children: t.name }),
828
- /* @__PURE__ */ s("div", { className: "mt-0.5 flex items-center gap-2 text-[11px] text-muted-foreground", children: [
829
- /* @__PURE__ */ s("span", { className: "inline-flex items-center gap-1", children: [
830
- /* @__PURE__ */ e(ua, { className: "h-2.5 w-2.5" }),
828
+ /* @__PURE__ */ n("div", { className: "mt-0.5 flex items-center gap-2 text-[11px] text-muted-foreground", children: [
829
+ /* @__PURE__ */ n("span", { className: "inline-flex items-center gap-1", children: [
830
+ /* @__PURE__ */ e(ma, { className: "h-2.5 w-2.5" }),
831
831
  t.memberCount,
832
832
  " member",
833
833
  t.memberCount === 1 ? "" : "s"
834
834
  ] }),
835
- o && /* @__PURE__ */ s(T, { children: [
835
+ o && /* @__PURE__ */ n(T, { children: [
836
836
  /* @__PURE__ */ e("span", { className: "text-border", children: "·" }),
837
- /* @__PURE__ */ s("span", { className: "inline-flex items-center gap-1", children: [
838
- /* @__PURE__ */ e(da, { className: "h-2.5 w-2.5" }),
837
+ /* @__PURE__ */ n("span", { className: "inline-flex items-center gap-1", children: [
838
+ /* @__PURE__ */ e(la, { className: "h-2.5 w-2.5" }),
839
839
  o
840
840
  ] })
841
841
  ] }),
842
- t.description && /* @__PURE__ */ s(T, { children: [
842
+ t.description && /* @__PURE__ */ n(T, { children: [
843
843
  /* @__PURE__ */ e("span", { className: "text-border", children: "·" }),
844
844
  /* @__PURE__ */ e("span", { className: "truncate text-muted-foreground", children: t.description })
845
845
  ] })
846
846
  ] })
847
847
  ] }),
848
- /* @__PURE__ */ s("div", { className: "flex items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100", children: [
849
- n && /* @__PURE__ */ e(
848
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-0.5 opacity-0 transition-opacity group-hover:opacity-100", children: [
849
+ s && /* @__PURE__ */ e(
850
850
  "span",
851
851
  {
852
852
  role: "button",
@@ -859,21 +859,21 @@ function Kn({
859
859
  },
860
860
  "aria-label": `Delete ${t.name}`,
861
861
  className: "flex h-6 w-6 items-center justify-center rounded-[3px] text-muted-foreground hover:bg-accent hover:text-foreground",
862
- children: /* @__PURE__ */ e(ut, { className: "h-3 w-3" })
862
+ children: /* @__PURE__ */ e(mt, { className: "h-3 w-3" })
863
863
  }
864
864
  ),
865
- /* @__PURE__ */ e(ln, { className: "h-3.5 w-3.5 text-muted-foreground" })
865
+ /* @__PURE__ */ e(cs, { className: "h-3.5 w-3.5 text-muted-foreground" })
866
866
  ] })
867
867
  ]
868
868
  }
869
869
  );
870
870
  }
871
- function Qn({ onCreate: t }) {
872
- return /* @__PURE__ */ s("div", { className: "flex h-full flex-col items-center justify-center gap-2 py-12 text-center", children: [
873
- /* @__PURE__ */ e("div", { className: "flex h-9 w-9 items-center justify-center rounded-full border border-border bg-muted/40 text-muted-foreground", children: /* @__PURE__ */ e(ia, { className: "h-4 w-4" }) }),
871
+ function Ws({ onCreate: t }) {
872
+ return /* @__PURE__ */ n("div", { className: "flex h-full flex-col items-center justify-center gap-2 py-12 text-center", children: [
873
+ /* @__PURE__ */ e("div", { className: "flex h-9 w-9 items-center justify-center rounded-full border border-border bg-muted/40 text-muted-foreground", children: /* @__PURE__ */ e(da, { className: "h-4 w-4" }) }),
874
874
  /* @__PURE__ */ e("div", { className: "text-[13px] font-medium text-foreground", children: "No groups yet" }),
875
875
  /* @__PURE__ */ e("div", { className: "max-w-[320px] text-[11.5px] leading-[1.55] text-muted-foreground", children: "Groups let you grant shared access to dashboards. Create one and add members." }),
876
- /* @__PURE__ */ s(
876
+ /* @__PURE__ */ n(
877
877
  "button",
878
878
  {
879
879
  type: "button",
@@ -887,9 +887,9 @@ function Qn({ onCreate: t }) {
887
887
  )
888
888
  ] });
889
889
  }
890
- function Wn({
890
+ function Js({
891
891
  group: t,
892
- isTenantViewer: n,
892
+ isTenantViewer: s,
893
893
  canEdit: r,
894
894
  canDelete: a,
895
895
  canManageMembers: o,
@@ -903,7 +903,7 @@ function Wn({
903
903
  isLoading: d,
904
904
  error: u,
905
905
  refetch: b
906
- } = mr(t.id), f = (v == null ? void 0 : v.members) ?? qn, w = u ? xa(u, "Unable to load members for this group.") : null, y = t.type === "TENANT_GROUP" ? "tenant" : "organization", { users: c } = pr({
906
+ } = pr(t.id), f = (v == null ? void 0 : v.members) ?? Hs, w = u ? va(u, "Unable to load members for this group.") : null, y = t.type === "TENANT_GROUP" ? "tenant" : "organization", { users: c } = hr({
907
907
  type: y,
908
908
  tenantId: t.tenantId || void 0,
909
909
  active: !0,
@@ -911,12 +911,12 @@ function Wn({
911
911
  }), M = Y(
912
912
  () => new Set(f.map((g) => g.userId)),
913
913
  [f]
914
- ), S = zn(), P = _n(), k = Bn(), [x, _] = N(!1), [q, j] = N(t.name), [Be, K] = N(!1), [te, Q] = N(t.description || ""), [ae, re] = N(""), [ye, ee] = N(!1), Ge = Y(() => {
914
+ ), S = _s(), P = qs(), k = Bs(), [x, _] = N(!1), [q, j] = N(t.name), [Be, K] = N(!1), [te, Q] = N(t.description || ""), [ae, re] = N(""), [ye, ee] = N(!1), ze = Y(() => {
915
915
  const g = ae.trim().toLowerCase();
916
916
  return c.filter((R) => !M.has(R.id)).filter(
917
917
  (R) => !g || (R.name || "").toLowerCase().includes(g) || (R.email || "").toLowerCase().includes(g)
918
918
  ).slice(0, 50);
919
- }, [c, M, ae]), ne = async () => {
919
+ }, [c, M, ae]), se = async () => {
920
920
  const g = q.trim();
921
921
  if (_(!1), g.length >= 3 && g !== t.name)
922
922
  try {
@@ -950,7 +950,7 @@ function Wn({
950
950
  } catch {
951
951
  }
952
952
  }
953
- }, ze = async (g) => {
953
+ }, _e = async (g) => {
954
954
  if (o)
955
955
  try {
956
956
  await P.mutateAsync({
@@ -960,14 +960,14 @@ function Wn({
960
960
  } catch {
961
961
  }
962
962
  };
963
- let $ = "";
963
+ let G = "";
964
964
  try {
965
- $ = ca(new Date(t.createdAt), "MMM d, yyyy");
965
+ G = ua(new Date(t.createdAt), "MMM d, yyyy");
966
966
  } catch {
967
- $ = "";
967
+ G = "";
968
968
  }
969
- return /* @__PURE__ */ s("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
970
- /* @__PURE__ */ s("div", { className: "flex h-10 shrink-0 items-center gap-1.5 border-b border-border px-5", children: [
969
+ return /* @__PURE__ */ n("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
970
+ /* @__PURE__ */ n("div", { className: "flex h-10 shrink-0 items-center gap-1.5 border-b border-border px-5", children: [
971
971
  /* @__PURE__ */ e(
972
972
  "button",
973
973
  {
@@ -975,7 +975,7 @@ function Wn({
975
975
  onClick: l,
976
976
  "aria-label": "Back",
977
977
  className: "-ml-1 flex h-6 w-6 items-center justify-center rounded-[3px] text-muted-foreground hover:bg-accent hover:text-foreground",
978
- children: /* @__PURE__ */ e(oa, { className: "h-3.5 w-3.5" })
978
+ children: /* @__PURE__ */ e(ia, { className: "h-3.5 w-3.5" })
979
979
  }
980
980
  ),
981
981
  x ? /* @__PURE__ */ e(
@@ -984,9 +984,9 @@ function Wn({
984
984
  autoFocus: !0,
985
985
  value: q,
986
986
  onChange: (g) => j(g.target.value),
987
- onBlur: ne,
987
+ onBlur: se,
988
988
  onKeyDown: (g) => {
989
- g.key === "Enter" && ne(), g.key === "Escape" && (j(t.name), _(!1));
989
+ g.key === "Enter" && se(), g.key === "Escape" && (j(t.name), _(!1));
990
990
  },
991
991
  className: "h-6 min-w-0 flex-1 rounded-[3px] border border-border bg-background px-1.5 text-[13px] font-medium text-foreground focus:border-foreground/40 focus:outline-none"
992
992
  }
@@ -1003,14 +1003,14 @@ function Wn({
1003
1003
  children: t.name
1004
1004
  }
1005
1005
  ),
1006
- /* @__PURE__ */ s("span", { className: "ml-1 inline-flex shrink-0 items-center gap-1 text-[10.5px] text-muted-foreground", children: [
1007
- /* @__PURE__ */ e(ua, { className: "h-2.5 w-2.5" }),
1006
+ /* @__PURE__ */ n("span", { className: "ml-1 inline-flex shrink-0 items-center gap-1 text-[10.5px] text-muted-foreground", children: [
1007
+ /* @__PURE__ */ e(ma, { className: "h-2.5 w-2.5" }),
1008
1008
  f.length,
1009
1009
  " member",
1010
1010
  f.length === 1 ? "" : "s"
1011
1011
  ] })
1012
1012
  ] }),
1013
- /* @__PURE__ */ e("div", { className: "shrink-0 border-b border-border px-5 py-2.5", children: Be ? /* @__PURE__ */ s("div", { children: [
1013
+ /* @__PURE__ */ e("div", { className: "shrink-0 border-b border-border px-5 py-2.5", children: Be ? /* @__PURE__ */ n("div", { children: [
1014
1014
  /* @__PURE__ */ e(
1015
1015
  "textarea",
1016
1016
  {
@@ -1026,12 +1026,12 @@ function Wn({
1026
1026
  className: "block w-full resize-none rounded-[5px] border border-border bg-background px-2 py-1.5 text-[12px] text-foreground placeholder:text-muted-foreground focus:border-foreground/40 focus:outline-none"
1027
1027
  }
1028
1028
  ),
1029
- /* @__PURE__ */ s("div", { className: "mt-1.5 flex items-center justify-between", children: [
1030
- /* @__PURE__ */ s("span", { className: "text-[10.5px] text-muted-foreground", children: [
1029
+ /* @__PURE__ */ n("div", { className: "mt-1.5 flex items-center justify-between", children: [
1030
+ /* @__PURE__ */ n("span", { className: "text-[10.5px] text-muted-foreground", children: [
1031
1031
  te.length,
1032
1032
  "/200 · Esc to cancel · ⌘↩ to save"
1033
1033
  ] }),
1034
- /* @__PURE__ */ s("div", { className: "flex items-center gap-1.5", children: [
1034
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-1.5", children: [
1035
1035
  /* @__PURE__ */ e(
1036
1036
  "button",
1037
1037
  {
@@ -1054,7 +1054,7 @@ function Wn({
1054
1054
  )
1055
1055
  ] })
1056
1056
  ] })
1057
- ] }) : /* @__PURE__ */ s(
1057
+ ] }) : /* @__PURE__ */ n(
1058
1058
  "button",
1059
1059
  {
1060
1060
  type: "button",
@@ -1066,22 +1066,22 @@ function Wn({
1066
1066
  className: "block w-full rounded-[3px] px-1 py-0.5 text-left enabled:hover:bg-accent/40 disabled:cursor-default",
1067
1067
  children: [
1068
1068
  t.description ? /* @__PURE__ */ e("p", { className: "text-[12px] leading-[1.55] text-foreground/90", children: t.description }) : /* @__PURE__ */ e("p", { className: "text-[12px] leading-[1.55] text-muted-foreground", children: r ? "Add a description…" : "No description" }),
1069
- /* @__PURE__ */ s("p", { className: "mt-1 text-[10.5px] text-muted-foreground", children: [
1070
- $ ? `Created ${$}` : "Recently created",
1069
+ /* @__PURE__ */ n("p", { className: "mt-1 text-[10.5px] text-muted-foreground", children: [
1070
+ G ? `Created ${G}` : "Recently created",
1071
1071
  r ? " · You can edit this group" : ""
1072
1072
  ] })
1073
1073
  ]
1074
1074
  }
1075
1075
  ) }),
1076
1076
  o && /* @__PURE__ */ e(
1077
- Xn,
1077
+ Ys,
1078
1078
  {
1079
1079
  query: ae,
1080
1080
  setQuery: re,
1081
1081
  open: ye,
1082
1082
  setOpen: ee,
1083
- candidates: Ge,
1084
- showKindChip: !n,
1083
+ candidates: ze,
1084
+ showKindChip: !s,
1085
1085
  onAdd: Ne,
1086
1086
  busy: S.isPending
1087
1087
  }
@@ -1093,37 +1093,37 @@ function Wn({
1093
1093
  },
1094
1094
  g
1095
1095
  )) }) : w ? /* @__PURE__ */ e(
1096
- va,
1096
+ ya,
1097
1097
  {
1098
1098
  title: "Can't load members",
1099
1099
  message: w,
1100
1100
  onRetry: () => b()
1101
1101
  }
1102
- ) : f.length === 0 ? /* @__PURE__ */ s("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
1102
+ ) : f.length === 0 ? /* @__PURE__ */ n("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
1103
1103
  /* @__PURE__ */ e("div", { className: "text-[12px] text-foreground", children: "No members yet" }),
1104
1104
  /* @__PURE__ */ e("div", { className: "text-[11px] text-muted-foreground", children: o ? "Search above to add people to this group." : "This group does not have any members." })
1105
1105
  ] }) : f.map((g) => {
1106
- var R, se, W, oe, J, De;
1107
- return /* @__PURE__ */ s(
1106
+ var R, ne, W, oe, J, De;
1107
+ return /* @__PURE__ */ n(
1108
1108
  "div",
1109
1109
  {
1110
1110
  className: "group flex items-center gap-2 border-b border-border/60 px-5 py-2",
1111
1111
  children: [
1112
- /* @__PURE__ */ e(ya, { name: ((R = g.user) == null ? void 0 : R.name) || ((se = g.user) == null ? void 0 : se.email) || "?" }),
1113
- /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
1112
+ /* @__PURE__ */ e(wa, { name: ((R = g.user) == null ? void 0 : R.name) || ((ne = g.user) == null ? void 0 : ne.email) || "?" }),
1113
+ /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
1114
1114
  /* @__PURE__ */ e("div", { className: "truncate text-[12.5px] font-medium text-foreground", children: ((W = g.user) == null ? void 0 : W.name) || ((oe = g.user) == null ? void 0 : oe.email) || "Unknown" }),
1115
1115
  ((J = g.user) == null ? void 0 : J.email) && g.user.name && /* @__PURE__ */ e("div", { className: "truncate text-[10.5px] text-muted-foreground", children: g.user.email })
1116
1116
  ] }),
1117
- !n && /* @__PURE__ */ e("span", { className: "text-[10px] uppercase tracking-[0.06em] text-muted-foreground", children: g.userType }),
1117
+ !s && /* @__PURE__ */ e("span", { className: "text-[10px] uppercase tracking-[0.06em] text-muted-foreground", children: g.userType }),
1118
1118
  /* @__PURE__ */ e(
1119
1119
  "button",
1120
1120
  {
1121
1121
  type: "button",
1122
- onClick: () => ze(g.userId),
1122
+ onClick: () => _e(g.userId),
1123
1123
  disabled: !o || P.isPending,
1124
1124
  "aria-label": `Remove ${((De = g.user) == null ? void 0 : De.name) || "member"}`,
1125
1125
  className: "flex h-6 w-6 items-center justify-center rounded-[3px] text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-foreground group-hover:opacity-100 disabled:opacity-30",
1126
- children: /* @__PURE__ */ e(la, { className: "h-3 w-3" })
1126
+ children: /* @__PURE__ */ e(ca, { className: "h-3 w-3" })
1127
1127
  }
1128
1128
  )
1129
1129
  ]
@@ -1131,34 +1131,34 @@ function Wn({
1131
1131
  g.id
1132
1132
  );
1133
1133
  }) }),
1134
- a && /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center justify-end gap-1.5 border-t border-border bg-muted/30 px-5 py-2.5", children: /* @__PURE__ */ s(
1134
+ a && /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center justify-end gap-1.5 border-t border-border bg-muted/30 px-5 py-2.5", children: /* @__PURE__ */ n(
1135
1135
  "button",
1136
1136
  {
1137
1137
  type: "button",
1138
1138
  onClick: p,
1139
1139
  className: "inline-flex h-7 items-center gap-1.5 rounded-[5px] border border-rose-200 bg-background px-2.5 text-[12px] font-medium text-rose-600 hover:bg-rose-50 dark:border-rose-900/60 dark:text-rose-400 dark:hover:bg-rose-950/30",
1140
1140
  children: [
1141
- /* @__PURE__ */ e(ut, { className: "h-3 w-3" }),
1141
+ /* @__PURE__ */ e(mt, { className: "h-3 w-3" }),
1142
1142
  "Delete group"
1143
1143
  ]
1144
1144
  }
1145
1145
  ) })
1146
1146
  ] });
1147
1147
  }
1148
- function Jn({
1148
+ function Xs({
1149
1149
  isTenantUser: t,
1150
- tenantId: n,
1150
+ tenantId: s,
1151
1151
  onCancel: r,
1152
1152
  onCreated: a
1153
1153
  }) {
1154
- const [o, l] = N(""), [h, m] = N(""), [p, v] = N(null), d = $n(), u = o.trim().length >= 3 && o.trim().length <= 50, b = async () => {
1154
+ const [o, l] = N(""), [h, m] = N(""), [p, v] = N(null), d = $s(), u = o.trim().length >= 3 && o.trim().length <= 50, b = async () => {
1155
1155
  if (!u) return;
1156
1156
  v(null);
1157
1157
  const f = {
1158
1158
  name: o.trim(),
1159
1159
  description: h.trim() || void 0,
1160
1160
  type: t ? "TENANT_GROUP" : "ORG_GROUP",
1161
- ...t && n ? { tenantId: n } : {}
1161
+ ...t && s ? { tenantId: s } : {}
1162
1162
  };
1163
1163
  try {
1164
1164
  const w = await d.mutateAsync(f), y = w == null ? void 0 : w.id;
@@ -1167,9 +1167,9 @@ function Jn({
1167
1167
  v(w instanceof Error ? w.message : "Failed to create group");
1168
1168
  }
1169
1169
  };
1170
- return /* @__PURE__ */ s("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
1171
- /* @__PURE__ */ s("div", { className: "flex-1 overflow-y-auto px-5 py-4", children: [
1172
- /* @__PURE__ */ e(Jt, { children: "Name" }),
1170
+ return /* @__PURE__ */ n("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
1171
+ /* @__PURE__ */ n("div", { className: "flex-1 overflow-y-auto px-5 py-4", children: [
1172
+ /* @__PURE__ */ e(Xt, { children: "Name" }),
1173
1173
  /* @__PURE__ */ e(
1174
1174
  "input",
1175
1175
  {
@@ -1182,8 +1182,8 @@ function Jn({
1182
1182
  }
1183
1183
  ),
1184
1184
  /* @__PURE__ */ e("div", { className: "mt-1 text-[10.5px] text-muted-foreground", children: "3–50 characters." }),
1185
- /* @__PURE__ */ s("div", { className: "mt-4", children: [
1186
- /* @__PURE__ */ e(Jt, { children: "Description (optional)" }),
1185
+ /* @__PURE__ */ n("div", { className: "mt-4", children: [
1186
+ /* @__PURE__ */ e(Xt, { children: "Description (optional)" }),
1187
1187
  /* @__PURE__ */ e(
1188
1188
  "textarea",
1189
1189
  {
@@ -1195,14 +1195,14 @@ function Jn({
1195
1195
  className: "mt-1 block w-full resize-none rounded-[5px] border border-border bg-background px-2 py-1.5 text-[12px] text-foreground placeholder:text-muted-foreground focus:border-foreground/40 focus:outline-none"
1196
1196
  }
1197
1197
  ),
1198
- /* @__PURE__ */ s("div", { className: "mt-1 flex justify-end text-[10.5px] text-muted-foreground", children: [
1198
+ /* @__PURE__ */ n("div", { className: "mt-1 flex justify-end text-[10.5px] text-muted-foreground", children: [
1199
1199
  h.length,
1200
1200
  "/200"
1201
1201
  ] })
1202
1202
  ] }),
1203
1203
  p && /* @__PURE__ */ e("div", { className: "mt-3 rounded-[5px] border border-rose-200 bg-rose-50 px-2 py-1.5 text-[11.5px] text-rose-700 dark:border-rose-900/60 dark:bg-rose-950/30 dark:text-rose-300", children: p })
1204
1204
  ] }),
1205
- /* @__PURE__ */ s("div", { className: "flex shrink-0 items-center justify-end gap-1.5 border-t border-border bg-muted/30 px-5 py-2.5", children: [
1205
+ /* @__PURE__ */ n("div", { className: "flex shrink-0 items-center justify-end gap-1.5 border-t border-border bg-muted/30 px-5 py-2.5", children: [
1206
1206
  /* @__PURE__ */ e(
1207
1207
  "button",
1208
1208
  {
@@ -1220,10 +1220,10 @@ function Jn({
1220
1220
  onClick: b,
1221
1221
  disabled: !u || d.isPending,
1222
1222
  className: "inline-flex h-7 items-center gap-1.5 rounded-[5px] bg-foreground px-2.5 text-[12px] font-medium text-background hover:opacity-90 disabled:cursor-not-allowed disabled:opacity-60",
1223
- children: d.isPending ? /* @__PURE__ */ s(T, { children: [
1224
- /* @__PURE__ */ e(Te, { className: "h-3 w-3 animate-spin" }),
1223
+ children: d.isPending ? /* @__PURE__ */ n(T, { children: [
1224
+ /* @__PURE__ */ e(Ge, { className: "h-3 w-3 animate-spin" }),
1225
1225
  "Creating…"
1226
- ] }) : /* @__PURE__ */ s(T, { children: [
1226
+ ] }) : /* @__PURE__ */ n(T, { children: [
1227
1227
  /* @__PURE__ */ e(H, { className: "h-3 w-3" }),
1228
1228
  "Create group"
1229
1229
  ] })
@@ -1232,9 +1232,9 @@ function Jn({
1232
1232
  ] })
1233
1233
  ] });
1234
1234
  }
1235
- function Xn({
1235
+ function Ys({
1236
1236
  query: t,
1237
- setQuery: n,
1237
+ setQuery: s,
1238
1238
  open: r,
1239
1239
  setOpen: a,
1240
1240
  candidates: o,
@@ -1242,8 +1242,8 @@ function Xn({
1242
1242
  onAdd: h,
1243
1243
  busy: m
1244
1244
  }) {
1245
- const p = Kt(null), v = Kt(null), [d, u] = N(null);
1246
- Wr(() => {
1245
+ const p = Qt(null), v = Qt(null), [d, u] = N(null);
1246
+ Xr(() => {
1247
1247
  if (!r) {
1248
1248
  u(null);
1249
1249
  return;
@@ -1272,20 +1272,20 @@ function Xn({
1272
1272
  return document.addEventListener("mousedown", f), () => document.removeEventListener("mousedown", f);
1273
1273
  }, [r, a]);
1274
1274
  const b = r && o.length > 0 && d;
1275
- return /* @__PURE__ */ s("div", { className: "shrink-0 border-b border-border px-5 py-2.5", children: [
1276
- /* @__PURE__ */ s(
1275
+ return /* @__PURE__ */ n("div", { className: "shrink-0 border-b border-border px-5 py-2.5", children: [
1276
+ /* @__PURE__ */ n(
1277
1277
  "div",
1278
1278
  {
1279
1279
  ref: p,
1280
1280
  className: "flex items-center gap-2 rounded-[5px] border border-border bg-background px-2 focus-within:border-foreground/40",
1281
1281
  children: [
1282
- /* @__PURE__ */ e(vn, { className: "h-3 w-3 text-muted-foreground" }),
1282
+ /* @__PURE__ */ e(ys, { className: "h-3 w-3 text-muted-foreground" }),
1283
1283
  /* @__PURE__ */ e(
1284
1284
  "input",
1285
1285
  {
1286
1286
  value: t,
1287
1287
  onChange: (f) => {
1288
- n(f.target.value), a(!0);
1288
+ s(f.target.value), a(!0);
1289
1289
  },
1290
1290
  onFocus: () => a(!0),
1291
1291
  placeholder: "Add a member by name or email…",
@@ -1296,7 +1296,7 @@ function Xn({
1296
1296
  ]
1297
1297
  }
1298
1298
  ),
1299
- b && typeof document < "u" && Xr(
1299
+ b && typeof document < "u" && Zr(
1300
1300
  /* @__PURE__ */ e(
1301
1301
  "div",
1302
1302
  {
@@ -1309,15 +1309,15 @@ function Xn({
1309
1309
  transform: d.above ? "translateY(-100%)" : void 0
1310
1310
  },
1311
1311
  className: "z-[60] max-h-[240px] overflow-y-auto rounded-[5px] border border-border bg-background shadow-[0_8px_24px_-12px_rgba(0,0,0,0.18)]",
1312
- children: o.map((f) => /* @__PURE__ */ s(
1312
+ children: o.map((f) => /* @__PURE__ */ n(
1313
1313
  "button",
1314
1314
  {
1315
1315
  type: "button",
1316
1316
  onClick: () => h(f),
1317
1317
  className: "flex w-full items-center gap-2 border-b border-border/60 px-2.5 py-2 text-left last:border-b-0 hover:bg-accent",
1318
1318
  children: [
1319
- /* @__PURE__ */ e(ya, { name: f.name || f.email || "?" }),
1320
- /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
1319
+ /* @__PURE__ */ e(wa, { name: f.name || f.email || "?" }),
1320
+ /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
1321
1321
  /* @__PURE__ */ e("div", { className: "truncate text-[12px] font-medium text-foreground", children: f.name || f.email || "Unknown" }),
1322
1322
  f.email && f.name && /* @__PURE__ */ e("div", { className: "truncate text-[10.5px] text-muted-foreground", children: f.email })
1323
1323
  ] }),
@@ -1332,22 +1332,22 @@ function Xn({
1332
1332
  )
1333
1333
  ] });
1334
1334
  }
1335
- function xa(t, n) {
1336
- if (!t) return n;
1335
+ function va(t, s) {
1336
+ if (!t) return s;
1337
1337
  if (t instanceof Error) {
1338
1338
  const r = t.message || "", a = r.match(/\{[\s\S]*"error"\s*:\s*"([^"]+)"[\s\S]*\}/);
1339
- return a ? a[1] : r || n;
1339
+ return a ? a[1] : r || s;
1340
1340
  }
1341
- return typeof t == "string" ? t : n;
1341
+ return typeof t == "string" ? t : s;
1342
1342
  }
1343
- function va({
1343
+ function ya({
1344
1344
  title: t,
1345
- message: n,
1345
+ message: s,
1346
1346
  onRetry: r
1347
1347
  }) {
1348
- return /* @__PURE__ */ s("div", { className: "flex h-full flex-col items-center justify-center gap-2 px-6 py-10 text-center", children: [
1348
+ return /* @__PURE__ */ n("div", { className: "flex h-full flex-col items-center justify-center gap-2 px-6 py-10 text-center", children: [
1349
1349
  /* @__PURE__ */ e("div", { className: "text-[12.5px] font-medium text-foreground", children: t }),
1350
- /* @__PURE__ */ e("div", { className: "max-w-[360px] text-[11.5px] leading-[1.55] text-muted-foreground", children: n }),
1350
+ /* @__PURE__ */ e("div", { className: "max-w-[360px] text-[11.5px] leading-[1.55] text-muted-foreground", children: s }),
1351
1351
  r && /* @__PURE__ */ e(
1352
1352
  "button",
1353
1353
  {
@@ -1359,35 +1359,35 @@ function va({
1359
1359
  )
1360
1360
  ] });
1361
1361
  }
1362
- function Jt({ children: t }) {
1362
+ function Xt({ children: t }) {
1363
1363
  return /* @__PURE__ */ e("label", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: t });
1364
1364
  }
1365
- function ya({ name: t }) {
1366
- const n = t.split(" ").map((r) => r[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
1367
- return /* @__PURE__ */ e(ga, { className: "h-6 w-6 shrink-0", children: /* @__PURE__ */ e(ba, { className: "text-[9px] font-semibold", children: n || "?" }) });
1365
+ function wa({ name: t }) {
1366
+ const s = t.split(" ").map((r) => r[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
1367
+ return /* @__PURE__ */ e(ba, { className: "h-6 w-6 shrink-0", children: /* @__PURE__ */ e(xa, { className: "text-[9px] font-semibold", children: s || "?" }) });
1368
1368
  }
1369
- function pe(t, n, r) {
1369
+ function pe(t, s, r) {
1370
1370
  var l, h;
1371
1371
  const a = (t.controls || []).find(
1372
1372
  (m) => m.id === r
1373
1373
  );
1374
1374
  if (a)
1375
1375
  return a.label;
1376
- const o = (h = (l = ta(t, n)) == null ? void 0 : l.controls) == null ? void 0 : h.find(
1376
+ const o = (h = (l = aa(t, s)) == null ? void 0 : l.controls) == null ? void 0 : h.find(
1377
1377
  (m) => m.id === r
1378
1378
  );
1379
1379
  return (o == null ? void 0 : o.label) || r;
1380
1380
  }
1381
- function he(t, n) {
1381
+ function he(t, s) {
1382
1382
  var r;
1383
- return ((r = ta(t, n)) == null ? void 0 : r.title) || n;
1383
+ return ((r = aa(t, s)) == null ? void 0 : r.title) || s;
1384
1384
  }
1385
- function Yn(t) {
1386
- const { errors: n, dashboard: r } = t;
1385
+ function Zs(t) {
1386
+ const { errors: s, dashboard: r } = t;
1387
1387
  if (!r)
1388
- return n;
1388
+ return s;
1389
1389
  const a = /* @__PURE__ */ new Map();
1390
- for (const o of n) {
1390
+ for (const o of s) {
1391
1391
  const l = o.match(
1392
1392
  /^Card '(.+)' binding for control '(.+)' maps to missing metric '(.+)'\.$/
1393
1393
  );
@@ -1467,74 +1467,79 @@ function Yn(t) {
1467
1467
  }
1468
1468
  return Array.from(a.values());
1469
1469
  }
1470
- function Zn({
1470
+ function en({
1471
1471
  visible: t,
1472
- onSelect: n
1472
+ onSelect: s
1473
1473
  }) {
1474
- return t ? /* @__PURE__ */ s(O, { onSelect: n, children: [
1475
- /* @__PURE__ */ e(fr, { className: "h-3.5 w-3.5" }),
1474
+ return t ? /* @__PURE__ */ n(O, { onSelect: s, children: [
1475
+ /* @__PURE__ */ e(gr, { className: "h-3.5 w-3.5" }),
1476
1476
  "Schedule email report"
1477
1477
  ] }) : null;
1478
1478
  }
1479
- function es({
1479
+ function tn({
1480
1480
  scheduleReportVisible: t,
1481
- analyticalBriefingVisible: n,
1481
+ analyticalBriefingVisible: s,
1482
1482
  onScheduleReport: r,
1483
1483
  onCreateAnalyticalBriefing: a
1484
1484
  }) {
1485
- return /* @__PURE__ */ s(T, { children: [
1485
+ return /* @__PURE__ */ n(T, { children: [
1486
1486
  /* @__PURE__ */ e(
1487
- Zn,
1487
+ en,
1488
1488
  {
1489
1489
  visible: t,
1490
1490
  onSelect: r
1491
1491
  }
1492
1492
  ),
1493
- n ? /* @__PURE__ */ s(O, { onSelect: a, children: [
1493
+ s ? /* @__PURE__ */ n(O, { onSelect: a, children: [
1494
1494
  /* @__PURE__ */ e(H, { className: "h-3.5 w-3.5" }),
1495
1495
  "Create analytical briefing"
1496
1496
  ] }) : null
1497
1497
  ] });
1498
1498
  }
1499
- function Xt(t, n) {
1499
+ function Yt(t, s) {
1500
1500
  return {
1501
- dashboard: st(t),
1502
- semanticExecutionPayload: st(n)
1501
+ dashboard: ot(t),
1502
+ semanticExecutionPayload: ot(s)
1503
1503
  };
1504
1504
  }
1505
- function ws() {
1506
- var Lt, Pt, Ut, Rt, Vt, Ft, Ot;
1507
- Yr(), Zr();
1505
+ function Dn() {
1506
+ var Pt, Ut, Rt, Vt, Ft, Ot, Tt;
1507
+ es(), ts();
1508
1508
  const {
1509
1509
  authToken: t,
1510
- tokenProps: n,
1510
+ tokenProps: s,
1511
1511
  id: r,
1512
1512
  showBriefings: a
1513
- } = z(), o = gr(), { isLocalDev: l } = br(), { openBrandStudioPreview: h } = xr(), { permissions: m } = Sn(), p = vr(), { isLoading: v } = yr(), d = D((i) => i.theme), u = D((i) => i.isDownloadingPdf), b = D(
1513
+ } = z(), o = br(), { isLocalDev: l } = xr(), { openBrandStudioPreview: h } = vr(), { permissions: m } = Is(), p = yr(), { isLoading: v } = wr(), d = D((i) => i.theme), u = D((i) => i.isDownloadingPdf), b = D(
1514
1514
  (i) => i.dashboardAssistantDraftScopeKey
1515
- ), f = D((i) => i.lenses), w = D((i) => i.selectedLensId), y = f == null ? void 0 : f.find((i) => i.id === w), c = D((i) => i.dashboard), M = D((i) => i.selectedSheetId), S = (Lt = c == null ? void 0 : c.sheets) == null ? void 0 : Lt.find(
1515
+ ), f = D((i) => i.lenses), w = D((i) => i.selectedLensId), y = f == null ? void 0 : f.find((i) => i.id === w), c = D((i) => i.dashboard), M = D((i) => i.selectedSheetId), S = (Pt = c == null ? void 0 : c.sheets) == null ? void 0 : Pt.find(
1516
1516
  (i) => i.id === M
1517
- ), P = Ha(S), k = P ? (Pt = S == null ? void 0 : S.document) == null ? void 0 : Pt.page : void 0, x = D(
1517
+ ), P = ja(S), k = P ? (Ut = S == null ? void 0 : S.document) == null ? void 0 : Ut.page : void 0, x = D(
1518
1518
  (i) => i.isDashboardEditing
1519
- ), { setDashboardTitle: _ } = D((i) => i.actions), [q, j] = N(!1), [Be, K] = N(!1), [te, Q] = N(!1), [ae, re] = N(!1), [ye, ee] = N(null), [Ge, ne] = N(!1), [we, Ne] = N(!1), [ze, $] = N(!1), [g, R] = N(null), [se, W] = N([]), [oe, J] = N(!1), [De, gt] = N(!1), bt = D((i) => i.filterValues), E = D((i) => i.isVisualEditing);
1519
+ ), { setDashboardTitle: _ } = D((i) => i.actions), [q, j] = N(!1), [Be, K] = N(!1), [te, Q] = N(!1), [ae, re] = N(!1), [ye, ee] = N(null), [ze, se] = N(!1), [we, Ne] = N(!1), [_e, G] = N(!1), [g, R] = N(null), [ne, W] = N([]), [oe, J] = N(!1), [De, bt] = N(!1), xt = D((i) => i.filterValues), E = D((i) => i.isVisualEditing);
1520
1520
  $t((i) => i.card);
1521
- const ie = Ve(
1521
+ const ie = Fe(
1522
1522
  (i) => i.selectedDashboard
1523
- ), Ce = Ve(
1523
+ ), Ce = Fe(
1524
1524
  (i) => i.initialDashboard
1525
1525
  );
1526
- Ve((i) => i.selectedVisual), D((i) => i.selectedFrameId), $t((i) => i.frame);
1527
- const ke = ie ? (Rt = ie == null ? void 0 : ie.permissions) == null ? void 0 : Rt.canEdit : (Ut = Ce == null ? void 0 : Ce.permissions) == null ? void 0 : Ut.canEdit, xt = D(
1526
+ Fe((i) => i.selectedVisual), D((i) => i.selectedFrameId), $t((i) => i.frame);
1527
+ const ke = ie ? (Vt = ie == null ? void 0 : ie.permissions) == null ? void 0 : Vt.canEdit : (Rt = Ce == null ? void 0 : Ce.permissions) == null ? void 0 : Rt.canEdit, vt = D(
1528
1528
  (i) => i.showDashboardJSON
1529
- ), _e = D((i) => i.onSaveFunction), {
1530
- setIsDashboardEditing: vt,
1531
- setShowDashboardJSON: yt
1532
- } = D((i) => i.actions), { setInitialDashboard: wt, clearSelectedDashboard: qe } = Ve(
1529
+ ), qe = D((i) => i.onSaveFunction), {
1530
+ setIsDashboardEditing: yt,
1531
+ setShowDashboardJSON: wt
1532
+ } = D((i) => i.actions), { setInitialDashboard: Nt, clearSelectedDashboard: He } = Fe(
1533
1533
  (i) => i.actions
1534
- ), de = !!n.orgUserId || !!(n.tenantId && n.endUserId && n.endUserEmail), { resources: Se } = wr(tt.DASHBOARD), { data: He } = Nr(), wa = ((Vt = He == null ? void 0 : He.preference) == null ? void 0 : Vt.defaultDashboardId) || null, { mutate: Na, isPending: Da } = Dr(), { currentUser: Ca } = ct(), ka = Cr(Ca), B = ie || Ce, Nt = B ? {
1535
- id: B.id,
1536
- title: (c == null ? void 0 : c.title) || B.title || "Dashboard"
1537
- } : null, { handleAddNewFrame: Sa } = kr(), [je, Ke] = N(!1), [Ia, le] = N(!1), [Qe, Ie] = N("close"), ce = Sr(tt.DASHBOARD), [V, Me] = N(null), Ma = async (i, I) => {
1534
+ ), de = !!s.orgUserId || !!(s.tenantId && s.endUserId && s.endUserEmail), { resources: Se } = Nr(at.DASHBOARD), { data: je } = Dr(), Na = ((Ft = je == null ? void 0 : je.preference) == null ? void 0 : Ft.defaultDashboardId) || null, { mutate: Da, isPending: Ca } = Cr(), { currentUser: ka } = ut(), Sa = kr(ka), $ = ie || Ce, Ie = Sr({
1535
+ config: s.config,
1536
+ canNavigateDashboardHub: de,
1537
+ canShareDashboard: ((Ot = $ == null ? void 0 : $.permissions) == null ? void 0 : Ot.canShare) === !0,
1538
+ canManageGroups: Sa
1539
+ }), Dt = $ ? {
1540
+ id: $.id,
1541
+ title: (c == null ? void 0 : c.title) || $.title || "Dashboard"
1542
+ } : null, { handleAddNewFrame: Ia } = Ir(), [Ke, Qe] = N(!1), [Ma, le] = N(!1), [We, Me] = N("close"), ce = Mr(at.DASHBOARD), [V, Ee] = N(null), Ea = async (i, I) => {
1538
1543
  if (!(c != null && c.id)) {
1539
1544
  console.log("No dashboard ID found");
1540
1545
  return;
@@ -1565,14 +1570,14 @@ function ws() {
1565
1570
  const I = Se.find(
1566
1571
  (F) => F.id === i
1567
1572
  );
1568
- I && wt(I);
1573
+ I && Nt(I);
1569
1574
  }
1570
1575
  }
1571
- }, [Se, c == null ? void 0 : c.id, wt]);
1572
- const ue = n.orgUserId || n.tenantId, We = Y(
1573
- () => ts({
1576
+ }, [Se, c == null ? void 0 : c.id, Nt]);
1577
+ const ue = s.orgUserId || s.tenantId, Je = Y(
1578
+ () => an({
1574
1579
  accessToken: t == null ? void 0 : t.accessToken,
1575
- dashboardId: (c == null ? void 0 : c.id) || r || n.dashboard_id,
1580
+ dashboardId: (c == null ? void 0 : c.id) || r || s.dashboard_id,
1576
1581
  selectedSheetId: P ? M : void 0,
1577
1582
  pageSize: k == null ? void 0 : k.size,
1578
1583
  orientation: k == null ? void 0 : k.orientation,
@@ -1587,24 +1592,24 @@ function ws() {
1587
1592
  k == null ? void 0 : k.size,
1588
1593
  M,
1589
1594
  d,
1590
- n.dashboard_id
1595
+ s.dashboard_id
1591
1596
  ]
1592
- ), Dt = x && !E && ue && ke, { setDashboard: Ct } = D((i) => i.actions), kt = D(
1597
+ ), Ct = x && !E && ue && ke, { setDashboard: kt } = D((i) => i.actions), St = D(
1593
1598
  (i) => i.semanticExecutionPayload
1594
- ), Ea = () => {
1595
- vt(!0);
1596
- }, Je = () => {
1597
- vt(!1), yt(!1), Me(null);
1599
+ ), Aa = () => {
1600
+ yt(!0);
1601
+ }, Xe = () => {
1602
+ yt(!1), wt(!1), Ee(null);
1598
1603
  };
1599
1604
  $e(() => {
1600
1605
  if (!x) {
1601
- V && Me(null);
1606
+ V && Ee(null);
1602
1607
  return;
1603
1608
  }
1604
- V || !c || v || Me(
1605
- Xt(
1609
+ V || !c || v || Ee(
1610
+ Yt(
1606
1611
  c,
1607
- kt
1612
+ St
1608
1613
  )
1609
1614
  );
1610
1615
  }, [
@@ -1612,47 +1617,47 @@ function ws() {
1612
1617
  V,
1613
1618
  x,
1614
1619
  v,
1615
- kt
1620
+ St
1616
1621
  ]);
1617
- const Ee = (V == null ? void 0 : V.dashboard) ?? null, { isDirty: St, isDirtyPending: Aa, resetDirty: Ae } = un(
1622
+ const Ae = (V == null ? void 0 : V.dashboard) ?? null, { isDirty: It, isDirtyPending: La, resetDirty: Le } = ms(
1618
1623
  c,
1619
- Ee,
1624
+ Ae,
1620
1625
  300,
1621
1626
  1e3,
1622
- at
1623
- ), It = Jr(() => Ee ? at(c) !== at(Ee) : !1, [c, Ee]), Mt = St || Aa, Le = je || ce.isPending, La = () => {
1624
- It() ? (Ie("close"), le(!0)) : (Je(), Ae());
1625
- }, Pa = async () => {
1626
- await Xe({
1627
+ rt
1628
+ ), Mt = Yr(() => Ae ? rt(c) !== rt(Ae) : !1, [c, Ae]), Et = It || La, Pe = Ke || ce.isPending, Pa = () => {
1629
+ Mt() ? (Me("close"), le(!0)) : (Xe(), Le());
1630
+ }, Ua = async () => {
1631
+ await Ye({
1627
1632
  closeAfterSave: !0,
1628
- navigateHomeAfterSave: Qe === "home"
1633
+ navigateHomeAfterSave: We === "home"
1629
1634
  });
1630
- }, Ua = () => {
1631
- const i = Qe === "home" && !!de;
1632
- V && Ct(V.dashboard, {
1633
- semanticExecutionPayload: V.semanticExecutionPayload
1634
- }), Je(), i && qe(), Ie("close"), le(!1), Ae();
1635
1635
  }, Ra = () => {
1636
- V && (Ct(V.dashboard, {
1636
+ const i = We === "home" && !!de;
1637
+ V && kt(V.dashboard, {
1637
1638
  semanticExecutionPayload: V.semanticExecutionPayload
1638
- }), Ae());
1639
+ }), Xe(), i && He(), Me("close"), le(!1), Le();
1639
1640
  }, Va = () => {
1641
+ V && (kt(V.dashboard, {
1642
+ semanticExecutionPayload: V.semanticExecutionPayload
1643
+ }), Le());
1644
+ }, Fa = () => {
1640
1645
  if (de) {
1641
- if (x && It()) {
1642
- Ie("home"), le(!0);
1646
+ if (x && Mt()) {
1647
+ Me("home"), le(!0);
1643
1648
  return;
1644
1649
  }
1645
- qe();
1650
+ He();
1646
1651
  }
1647
1652
  };
1648
- async function Xe(i) {
1653
+ async function Ye(i) {
1649
1654
  const I = D.getState().dashboard;
1650
1655
  if (!I)
1651
1656
  return;
1652
- const F = (i == null ? void 0 : i.closeAfterSave) ?? oe, Ye = (i == null ? void 0 : i.navigateHomeAfterSave) ?? !1;
1657
+ const F = (i == null ? void 0 : i.closeAfterSave) ?? oe, Ze = (i == null ? void 0 : i.navigateHomeAfterSave) ?? !1;
1653
1658
  J(F), F && le(!1);
1654
- const Ze = st(I);
1655
- $(!0), R(null), W([]), Ke(!0);
1659
+ const et = ot(I);
1660
+ G(!0), R(null), W([]), Qe(!0);
1656
1661
  const Ba = {
1657
1662
  template: I
1658
1663
  };
@@ -1663,31 +1668,31 @@ function ws() {
1663
1668
  },
1664
1669
  {
1665
1670
  onSuccess: (A) => {
1666
- var Pe, Ue, Tt;
1667
- const X = (A == null ? void 0 : A.id) || ((Pe = A == null ? void 0 : A.dashboard) == null ? void 0 : Pe.id) || ((Ue = A == null ? void 0 : A.resource) == null ? void 0 : Ue.id) || ((Tt = A == null ? void 0 : A.template) == null ? void 0 : Tt.id) || null;
1671
+ var Ue, Re, Gt;
1672
+ const X = (A == null ? void 0 : A.id) || ((Ue = A == null ? void 0 : A.dashboard) == null ? void 0 : Ue.id) || ((Re = A == null ? void 0 : A.resource) == null ? void 0 : Re.id) || ((Gt = A == null ? void 0 : A.template) == null ? void 0 : Gt.id) || null;
1668
1673
  if (!I.id && X) {
1669
- const et = Xa.getState(), Re = et.pendingDashboardDraftMigration;
1670
- (Re == null ? void 0 : Re.scopeKey) === b ? et.actions.setPendingDashboardDraftMigrationExpectedDashboardId(
1674
+ const tt = Ya.getState(), Ve = tt.pendingDashboardDraftMigration;
1675
+ (Ve == null ? void 0 : Ve.scopeKey) === b ? tt.actions.setPendingDashboardDraftMigrationExpectedDashboardId(
1671
1676
  X
1672
- ) : Re && et.actions.clearPendingDashboardDraftMigration();
1677
+ ) : Ve && tt.actions.clearPendingDashboardDraftMigration();
1673
1678
  }
1674
- Ke(!1), C.success("Dashboard saved!"), Me(
1675
- Xt(
1676
- Ze,
1679
+ Qe(!1), C.success("Dashboard saved!"), Ee(
1680
+ Yt(
1681
+ et,
1677
1682
  D.getState().semanticExecutionPayload
1678
1683
  )
1679
- ), $(!1), J(!1), F && (Je(), Ae(), Ye && de && qe()), Ie("close");
1684
+ ), G(!1), J(!1), F && (Xe(), Le(), Ze && de && He()), Me("close");
1680
1685
  },
1681
1686
  onError: (A) => {
1682
- Ke(!1), R("Failed to save dashboard. Please try again.");
1683
- const X = A.details, Pe = Array.isArray(
1687
+ Qe(!1), R("Failed to save dashboard. Please try again.");
1688
+ const X = A.details, Ue = Array.isArray(
1684
1689
  X == null ? void 0 : X.errors
1685
1690
  ) ? (X.errors || []).filter(
1686
- (Ue) => typeof Ue == "string"
1691
+ (Re) => typeof Re == "string"
1687
1692
  ) : [];
1688
1693
  W(
1689
- Yn({
1690
- errors: Pe,
1694
+ Zs({
1695
+ errors: Ue,
1691
1696
  dashboard: I || void 0
1692
1697
  })
1693
1698
  ), C.error("Failed to save dashboard");
@@ -1695,60 +1700,60 @@ function ws() {
1695
1700
  }
1696
1701
  );
1697
1702
  }
1698
- async function Fa() {
1703
+ async function Oa() {
1699
1704
  if (j(!0), !w || !y) return;
1700
1705
  const i = D.getState().dashboard;
1701
1706
  if (!i) {
1702
1707
  j(!1);
1703
1708
  return;
1704
1709
  }
1705
- const I = JSON.stringify(i), F = D.getState(), Ye = ma({
1710
+ const I = JSON.stringify(i), F = D.getState(), Ze = pa({
1706
1711
  dashboard: i,
1707
1712
  dashboardInputValues: F.dashboardInputValues,
1708
- filterValues: bt,
1713
+ filterValues: xt,
1709
1714
  controlValues: F.controlValues,
1710
1715
  inlineFilterValuesMap: F.inlineFilterValuesMap,
1711
1716
  cardControlValuesMap: F.cardControlValuesMap
1712
- }), Ze = {
1717
+ }), et = {
1713
1718
  ...y,
1714
1719
  template: I,
1715
- filterValues: bt,
1716
- inputValues: Ye
1720
+ filterValues: xt,
1721
+ inputValues: Ze
1717
1722
  };
1718
- await ot(
1719
- n.apiServiceUrl,
1720
- Ze,
1723
+ await it(
1724
+ s.apiServiceUrl,
1725
+ et,
1721
1726
  t == null ? void 0 : t.accessToken
1722
- ), C.success("Lens saved"), _e == null || _e(i), j(!1);
1727
+ ), C.success("Lens saved"), qe == null || qe(i), j(!1);
1723
1728
  }
1724
- const Et = (y == null ? void 0 : y.name) || c.title;
1729
+ const At = (y == null ? void 0 : y.name) || c.title;
1725
1730
  ce.isPending && console.log("Title during update:", {
1726
- title: Et,
1731
+ title: At,
1727
1732
  dashboardStateTitle: c.title,
1728
1733
  dashboardId: c == null ? void 0 : c.id,
1729
1734
  currentLensName: y == null ? void 0 : y.name
1730
1735
  });
1731
- const Oa = de && !!(t != null && t.accessToken) && !!(n != null && n.apiServiceUrl), Ta = p && de, G = (c == null ? void 0 : c.id) || null, At = Ir(
1732
- (Ft = n.config) == null ? void 0 : Ft.showBriefings,
1736
+ const Ta = de && !!(t != null && t.accessToken) && !!(s != null && s.apiServiceUrl), Ga = p && Ie.showDashboardHub, B = (c == null ? void 0 : c.id) || null, Lt = Er(
1737
+ (Tt = s.config) == null ? void 0 : Tt.showBriefings,
1733
1738
  a
1734
- ), me = !!G && wa === G, $a = () => {
1735
- G && Na({
1736
- dashboardId: me ? null : G
1739
+ ), me = !!B && Na === B, $a = () => {
1740
+ B && Da({
1741
+ dashboardId: me ? null : B
1737
1742
  });
1738
1743
  };
1739
- return !p && !E ? null : /* @__PURE__ */ s(
1744
+ return !p && !E ? null : /* @__PURE__ */ n(
1740
1745
  "div",
1741
1746
  {
1742
1747
  className: "flex h-11 shrink-0 items-center justify-between gap-2 overflow-x-auto border-b px-4 py-2",
1743
1748
  role: "dashboard-controls",
1744
1749
  children: [
1745
- /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
1746
- Ta && !E && /* @__PURE__ */ e(
1747
- Gt,
1750
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1751
+ Ga && !E && /* @__PURE__ */ e(
1752
+ zt,
1748
1753
  {
1749
1754
  "aria-label": "Dashboard Hub",
1750
1755
  tooltip: "Dashboard Hub",
1751
- onClick: Va,
1756
+ onClick: Fa,
1752
1757
  className: "h-7 w-7 px-0",
1753
1758
  buttonProps: { size: "xs" },
1754
1759
  children: /* @__PURE__ */ e(na, { className: "h-3.5 w-3.5" })
@@ -1762,11 +1767,11 @@ function ws() {
1762
1767
  role: "status",
1763
1768
  children: /* @__PURE__ */ e("span", { className: "sr-only", children: "Loading dashboard title" })
1764
1769
  }
1765
- ) : /* @__PURE__ */ s(T, { children: [
1770
+ ) : /* @__PURE__ */ n(T, { children: [
1766
1771
  /* @__PURE__ */ e(
1767
- Mr,
1772
+ Ar,
1768
1773
  {
1769
- value: Et || "Untitled Dashboard",
1774
+ value: At || "Untitled Dashboard",
1770
1775
  onSave: (i) => {
1771
1776
  console.log("EditableText onSave called:", {
1772
1777
  newTitle: i,
@@ -1774,7 +1779,7 @@ function ws() {
1774
1779
  dashboardId: c == null ? void 0 : c.id
1775
1780
  });
1776
1781
  const I = (c == null ? void 0 : c.title) || "";
1777
- _(i), Ma(i, I);
1782
+ _(i), Ea(i, I);
1778
1783
  },
1779
1784
  isEditable: ke && !y,
1780
1785
  displayClassName: "text-[13px] font-medium",
@@ -1791,62 +1796,62 @@ function ws() {
1791
1796
  children: "Default"
1792
1797
  }
1793
1798
  ),
1794
- Oa && G && /* @__PURE__ */ e(ja, { children: /* @__PURE__ */ s(Ka, { children: [
1795
- /* @__PURE__ */ e(Qa, { asChild: !0, children: /* @__PURE__ */ e(
1799
+ Ta && B && /* @__PURE__ */ e(Ka, { children: /* @__PURE__ */ n(Qa, { children: [
1800
+ /* @__PURE__ */ e(Wa, { asChild: !0, children: /* @__PURE__ */ e(
1796
1801
  U,
1797
1802
  {
1798
1803
  variant: "ghost",
1799
1804
  size: "xs",
1800
1805
  onClick: $a,
1801
- disabled: Da || !(t != null && t.accessToken) || !(n != null && n.apiServiceUrl),
1806
+ disabled: Ca || !(t != null && t.accessToken) || !(s != null && s.apiServiceUrl),
1802
1807
  className: "w-7 px-0 text-muted-foreground hover:text-foreground",
1803
1808
  "aria-label": me ? "Clear default dashboard" : "Set as default dashboard",
1804
- children: me ? /* @__PURE__ */ e(Er, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ e(Ar, { className: "h-3.5 w-3.5" })
1809
+ children: me ? /* @__PURE__ */ e(Lr, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ e(Pr, { className: "h-3.5 w-3.5" })
1805
1810
  }
1806
1811
  ) }),
1807
- /* @__PURE__ */ e(Wa, { children: /* @__PURE__ */ e("p", { children: me ? "Clear default" : "Set as default" }) })
1812
+ /* @__PURE__ */ e(Ja, { children: /* @__PURE__ */ e("p", { children: me ? "Clear default" : "Set as default" }) })
1808
1813
  ] }) })
1809
1814
  ] }))
1810
1815
  ] }),
1811
- /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
1812
- E && /* @__PURE__ */ s(T, { children: [
1813
- /* @__PURE__ */ e(en, {}),
1814
- /* @__PURE__ */ e(tn, {})
1816
+ /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1817
+ E && /* @__PURE__ */ n(T, { children: [
1818
+ /* @__PURE__ */ e(as, {}),
1819
+ /* @__PURE__ */ e(rs, {})
1815
1820
  ] }),
1816
- !E && p && ((Ot = B == null ? void 0 : B.permissions) == null ? void 0 : Ot.canShare) && /* @__PURE__ */ s(
1821
+ !E && p && Ie.showDashboardSharing && /* @__PURE__ */ n(
1817
1822
  U,
1818
1823
  {
1819
1824
  variant: "outline",
1820
1825
  size: "xs",
1821
1826
  onClick: () => K(!0),
1822
1827
  children: [
1823
- /* @__PURE__ */ e(Lr, { className: "h-3.5 w-3.5" }),
1828
+ /* @__PURE__ */ e(Ur, { className: "h-3.5 w-3.5" }),
1824
1829
  "Share"
1825
1830
  ]
1826
1831
  }
1827
1832
  ),
1828
- !E && x && m.canUseFilters && p && /* @__PURE__ */ e(an, {}),
1829
- x && !E && ue && y && l && p && /* @__PURE__ */ s(
1833
+ !E && x && m.canUseFilters && p && /* @__PURE__ */ e(ss, {}),
1834
+ x && !E && ue && y && l && p && /* @__PURE__ */ n(
1830
1835
  U,
1831
1836
  {
1832
1837
  variant: "secondary",
1833
1838
  size: "xs",
1834
1839
  disabled: q,
1835
- onClick: Fa,
1840
+ onClick: Oa,
1836
1841
  children: [
1837
- /* @__PURE__ */ e(Qt, { className: "h-3.5 w-3.5" }),
1842
+ /* @__PURE__ */ e(Wt, { className: "h-3.5 w-3.5" }),
1838
1843
  "Save Lens"
1839
1844
  ]
1840
1845
  }
1841
1846
  ),
1842
- x && !E && p && !P && /* @__PURE__ */ s("div", { className: "inline-flex h-7 items-stretch overflow-hidden rounded-control border border-input bg-background", children: [
1843
- /* @__PURE__ */ s(
1847
+ x && !E && p && !P && /* @__PURE__ */ n("div", { className: "inline-flex h-7 items-stretch overflow-hidden rounded-control border border-input bg-background", children: [
1848
+ /* @__PURE__ */ n(
1844
1849
  U,
1845
1850
  {
1846
1851
  variant: "ghost",
1847
1852
  size: "xs",
1848
1853
  disabled: !x,
1849
- onClick: () => void Sa(),
1854
+ onClick: () => void Ia(),
1850
1855
  className: "h-full rounded-none border-0 shadow-none hover:bg-accent",
1851
1856
  children: [
1852
1857
  /* @__PURE__ */ e(H, { className: "h-3.5 w-3.5" }),
@@ -1854,8 +1859,8 @@ function ws() {
1854
1859
  ]
1855
1860
  }
1856
1861
  ),
1857
- /* @__PURE__ */ s(zt, { modal: !1, children: [
1858
- /* @__PURE__ */ e(_t, { asChild: !0, children: /* @__PURE__ */ e(
1862
+ /* @__PURE__ */ n(_t, { modal: !1, children: [
1863
+ /* @__PURE__ */ e(qt, { asChild: !0, children: /* @__PURE__ */ e(
1859
1864
  U,
1860
1865
  {
1861
1866
  variant: "ghost",
@@ -1863,15 +1868,15 @@ function ws() {
1863
1868
  className: "h-full w-7 rounded-none border-0 border-l border-border/60 px-0 shadow-none hover:bg-accent",
1864
1869
  "aria-label": "Open visual options",
1865
1870
  disabled: !x,
1866
- children: /* @__PURE__ */ e(Qr, { className: "h-3.5 w-3.5" })
1871
+ children: /* @__PURE__ */ e(Jr, { className: "h-3.5 w-3.5" })
1867
1872
  }
1868
1873
  ) }),
1869
1874
  /* @__PURE__ */ e(
1870
- qt,
1875
+ Ht,
1871
1876
  {
1872
1877
  align: "end",
1873
1878
  className: "z-[60] w-48 rounded-[6px] border-border/60 p-1 shadow-sm",
1874
- children: /* @__PURE__ */ s(O, { onClick: () => gt(!0), children: [
1879
+ children: /* @__PURE__ */ n(O, { onClick: () => bt(!0), children: [
1875
1880
  /* @__PURE__ */ e(H, { className: "h-3.5 w-3.5" }),
1876
1881
  "From library..."
1877
1882
  ] })
@@ -1879,52 +1884,52 @@ function ws() {
1879
1884
  )
1880
1885
  ] }),
1881
1886
  /* @__PURE__ */ e(
1882
- rn,
1887
+ ns,
1883
1888
  {
1884
1889
  open: De,
1885
- onOpenChange: gt
1890
+ onOpenChange: bt
1886
1891
  }
1887
1892
  )
1888
1893
  ] }),
1889
- !E && !x && ke && p && /* @__PURE__ */ s(U, { size: "xs", onClick: Ea, children: [
1890
- /* @__PURE__ */ e(Pr, { className: "h-3.5 w-3.5" }),
1894
+ !E && !x && ke && p && /* @__PURE__ */ n(U, { size: "xs", onClick: Aa, children: [
1895
+ /* @__PURE__ */ e(Rr, { className: "h-3.5 w-3.5" }),
1891
1896
  "Edit"
1892
1897
  ] }),
1893
- Dt && p && St && /* @__PURE__ */ s(
1898
+ Ct && p && It && /* @__PURE__ */ n(
1894
1899
  U,
1895
1900
  {
1896
1901
  variant: "outline",
1897
1902
  size: "xs",
1898
- onClick: Ra,
1899
- disabled: Le,
1903
+ onClick: Va,
1904
+ disabled: Pe,
1900
1905
  children: [
1901
- /* @__PURE__ */ e(Ur, { className: "h-3.5 w-3.5" }),
1906
+ /* @__PURE__ */ e(Vr, { className: "h-3.5 w-3.5" }),
1902
1907
  "Undo"
1903
1908
  ]
1904
1909
  }
1905
1910
  ),
1906
- Dt && p && /* @__PURE__ */ s(
1911
+ Ct && p && /* @__PURE__ */ n(
1907
1912
  U,
1908
1913
  {
1909
1914
  size: "xs",
1910
- className: ge(!Mt && "opacity-60"),
1911
- disabled: Le || !Mt,
1912
- onClick: () => Xe(),
1915
+ className: ge(!Et && "opacity-60"),
1916
+ disabled: Pe || !Et,
1917
+ onClick: () => Ye(),
1913
1918
  children: [
1914
- Le ? /* @__PURE__ */ e(Te, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e(Qt, { className: "h-3.5 w-3.5" }),
1915
- Le ? "Saving..." : "Save"
1919
+ Pe ? /* @__PURE__ */ e(Ge, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e(Wt, { className: "h-3.5 w-3.5" }),
1920
+ Pe ? "Saving..." : "Save"
1916
1921
  ]
1917
1922
  }
1918
1923
  ),
1919
- x && !E && p && /* @__PURE__ */ s(U, { variant: "outline", size: "xs", onClick: La, children: [
1920
- /* @__PURE__ */ e(sa, { className: "h-3.5 w-3.5" }),
1924
+ x && !E && p && /* @__PURE__ */ n(U, { variant: "outline", size: "xs", onClick: Pa, children: [
1925
+ /* @__PURE__ */ e(oa, { className: "h-3.5 w-3.5" }),
1921
1926
  "Close"
1922
1927
  ] }),
1923
- !E && p && /* @__PURE__ */ e("div", { className: "ml-2", children: /* @__PURE__ */ e(nn, {}) }),
1924
- !E && l && /* @__PURE__ */ e(yn, {}),
1925
- !E && p && /* @__PURE__ */ s(zt, { children: [
1926
- /* @__PURE__ */ e(_t, { asChild: !0, children: /* @__PURE__ */ e(
1927
- Gt,
1928
+ !E && p && /* @__PURE__ */ e("div", { className: "ml-2", children: /* @__PURE__ */ e(os, {}) }),
1929
+ !E && l && /* @__PURE__ */ e(ws, {}),
1930
+ !E && p && /* @__PURE__ */ n(_t, { children: [
1931
+ /* @__PURE__ */ e(qt, { asChild: !0, children: /* @__PURE__ */ e(
1932
+ zt,
1928
1933
  {
1929
1934
  tooltip: "More Options",
1930
1935
  className: "w-7 px-0 text-muted-foreground hover:text-foreground",
@@ -1933,60 +1938,60 @@ function ws() {
1933
1938
  variant: "ghost",
1934
1939
  "aria-label": "More dashboard options"
1935
1940
  },
1936
- children: /* @__PURE__ */ e(Rr, { className: "h-3.5 w-3.5" })
1941
+ children: /* @__PURE__ */ e(Fr, { className: "h-3.5 w-3.5" })
1937
1942
  }
1938
1943
  ) }),
1939
- /* @__PURE__ */ s(
1940
- qt,
1944
+ /* @__PURE__ */ n(
1945
+ Ht,
1941
1946
  {
1942
1947
  align: "end",
1943
1948
  className: "w-56 rounded-control border border-border/60 p-1 shadow-sm",
1944
1949
  children: [
1945
1950
  /* @__PURE__ */ e(fe, { children: "Reports & briefings" }),
1946
- /* @__PURE__ */ s(
1951
+ /* @__PURE__ */ n(
1947
1952
  O,
1948
1953
  {
1949
1954
  disabled: u,
1950
1955
  onSelect: () => Ne(!0),
1951
1956
  children: [
1952
- /* @__PURE__ */ e(Vr, { className: "h-3.5 w-3.5" }),
1957
+ /* @__PURE__ */ e(Or, { className: "h-3.5 w-3.5" }),
1953
1958
  "Export"
1954
1959
  ]
1955
1960
  }
1956
1961
  ),
1957
1962
  /* @__PURE__ */ e(
1958
- es,
1963
+ tn,
1959
1964
  {
1960
- scheduleReportVisible: !!(At && o.surfaceVisible && G && !x),
1961
- analyticalBriefingVisible: !!(At && o.surfaceVisible && G && !x),
1965
+ scheduleReportVisible: !!(Lt && o.surfaceVisible && B && !x),
1966
+ analyticalBriefingVisible: !!(Lt && o.surfaceVisible && B && !x),
1962
1967
  onScheduleReport: () => ee("scheduled_report"),
1963
1968
  onCreateAnalyticalBriefing: () => ee("analytical_briefing")
1964
1969
  }
1965
1970
  ),
1966
- /* @__PURE__ */ e(Oe, {}),
1967
- ka && /* @__PURE__ */ s(T, { children: [
1971
+ /* @__PURE__ */ e(Te, {}),
1972
+ Ie.showGroupManagement && /* @__PURE__ */ n(T, { children: [
1968
1973
  /* @__PURE__ */ e(fe, { children: "Access" }),
1969
- /* @__PURE__ */ s(
1974
+ /* @__PURE__ */ n(
1970
1975
  O,
1971
1976
  {
1972
1977
  onClick: () => Q(!0),
1973
1978
  children: [
1974
- /* @__PURE__ */ e(ia, { className: "h-3.5 w-3.5" }),
1979
+ /* @__PURE__ */ e(da, { className: "h-3.5 w-3.5" }),
1975
1980
  "Manage Groups"
1976
1981
  ]
1977
1982
  }
1978
1983
  ),
1979
- /* @__PURE__ */ e(Oe, {})
1984
+ /* @__PURE__ */ e(Te, {})
1980
1985
  ] }),
1981
1986
  /* @__PURE__ */ e(fe, { children: "Preferences" }),
1982
- /* @__PURE__ */ s(O, { onClick: () => re(!0), children: [
1983
- /* @__PURE__ */ e(da, { className: "h-3.5 w-3.5" }),
1987
+ /* @__PURE__ */ n(O, { onClick: () => re(!0), children: [
1988
+ /* @__PURE__ */ e(la, { className: "h-3.5 w-3.5" }),
1984
1989
  "Calendar Preferences"
1985
1990
  ] }),
1986
- l && p && /* @__PURE__ */ s(T, { children: [
1987
- /* @__PURE__ */ e(Oe, {}),
1991
+ l && p && /* @__PURE__ */ n(T, { children: [
1992
+ /* @__PURE__ */ e(Te, {}),
1988
1993
  /* @__PURE__ */ e(fe, { children: "Developer" }),
1989
- /* @__PURE__ */ s(
1994
+ /* @__PURE__ */ n(
1990
1995
  O,
1991
1996
  {
1992
1997
  onSelect: () => {
@@ -1996,24 +2001,24 @@ function ws() {
1996
2001
  ).catch(() => C.error("Unable to copy token")) : C.error("Clipboard not available"));
1997
2002
  },
1998
2003
  children: [
1999
- /* @__PURE__ */ e(Ht, { className: "h-3.5 w-3.5" }),
2004
+ /* @__PURE__ */ e(jt, { className: "h-3.5 w-3.5" }),
2000
2005
  "Copy token"
2001
2006
  ]
2002
2007
  }
2003
2008
  ),
2004
- P && /* @__PURE__ */ s(
2009
+ P && /* @__PURE__ */ n(
2005
2010
  O,
2006
2011
  {
2007
- disabled: !We,
2012
+ disabled: !Je,
2008
2013
  onSelect: () => {
2009
2014
  var i;
2010
- if (!We) {
2015
+ if (!Je) {
2011
2016
  C.error(
2012
2017
  "Open a document sheet with a token to copy the local PDF URL"
2013
2018
  );
2014
2019
  return;
2015
2020
  }
2016
- (i = navigator == null ? void 0 : navigator.clipboard) != null && i.writeText ? navigator.clipboard.writeText(We).then(
2021
+ (i = navigator == null ? void 0 : navigator.clipboard) != null && i.writeText ? navigator.clipboard.writeText(Je).then(
2017
2022
  () => C.success(
2018
2023
  "Local document PDF URL copied to clipboard"
2019
2024
  )
@@ -2024,78 +2029,78 @@ function ws() {
2024
2029
  ) : C.error("Clipboard not available");
2025
2030
  },
2026
2031
  children: [
2027
- /* @__PURE__ */ e(Ht, { className: "h-3.5 w-3.5" }),
2032
+ /* @__PURE__ */ e(jt, { className: "h-3.5 w-3.5" }),
2028
2033
  "Copy local document PDF URL"
2029
2034
  ]
2030
2035
  }
2031
2036
  ),
2032
- /* @__PURE__ */ s(
2037
+ /* @__PURE__ */ n(
2033
2038
  O,
2034
2039
  {
2035
- onSelect: () => Ja(n.apiServiceUrl),
2040
+ onSelect: () => Xa(s.apiServiceUrl),
2036
2041
  children: [
2037
- /* @__PURE__ */ e(bn, { className: "h-3.5 w-3.5" }),
2042
+ /* @__PURE__ */ e(xs, { className: "h-3.5 w-3.5" }),
2038
2043
  "Invalidate token"
2039
2044
  ]
2040
2045
  }
2041
2046
  ),
2042
- /* @__PURE__ */ s(O, { onSelect: h, children: [
2043
- /* @__PURE__ */ e(mn, { className: "h-3.5 w-3.5" }),
2047
+ /* @__PURE__ */ n(O, { onSelect: h, children: [
2048
+ /* @__PURE__ */ e(ps, { className: "h-3.5 w-3.5" }),
2044
2049
  "Brand Studio"
2045
2050
  ] }),
2046
- x && /* @__PURE__ */ s(
2051
+ x && /* @__PURE__ */ n(
2047
2052
  O,
2048
2053
  {
2049
- onSelect: () => yt(!xt),
2054
+ onSelect: () => wt(!vt),
2050
2055
  children: [
2051
- /* @__PURE__ */ e(pn, { className: "h-3.5 w-3.5" }),
2052
- xt ? "Hide dashboard JSON" : "Show dashboard JSON"
2056
+ /* @__PURE__ */ e(hs, { className: "h-3.5 w-3.5" }),
2057
+ vt ? "Hide dashboard JSON" : "Show dashboard JSON"
2053
2058
  ]
2054
2059
  }
2055
2060
  ),
2056
- ue && x && /* @__PURE__ */ s(O, { onSelect: () => ne(!0), children: [
2061
+ ue && x && /* @__PURE__ */ n(O, { onSelect: () => se(!0), children: [
2057
2062
  /* @__PURE__ */ e(H, { className: "h-3.5 w-3.5" }),
2058
2063
  "Add lens"
2059
2064
  ] }),
2060
- ue && /* @__PURE__ */ s(Fr, { children: [
2061
- /* @__PURE__ */ s(Or, { children: [
2062
- /* @__PURE__ */ e(hn, { className: "h-3.5 w-3.5" }),
2065
+ ue && /* @__PURE__ */ n(Tr, { children: [
2066
+ /* @__PURE__ */ n(Gr, { children: [
2067
+ /* @__PURE__ */ e(fs, { className: "h-3.5 w-3.5" }),
2063
2068
  "Lenses"
2064
2069
  ] }),
2065
- /* @__PURE__ */ e(Tr, { className: "w-60", children: /* @__PURE__ */ e(kn, {}) })
2070
+ /* @__PURE__ */ e($r, { className: "w-60", children: /* @__PURE__ */ e(Ss, {}) })
2066
2071
  ] })
2067
2072
  ] })
2068
2073
  ]
2069
2074
  }
2070
2075
  )
2071
2076
  ] }),
2072
- Be && Nt && /* @__PURE__ */ e(
2073
- $r,
2077
+ Be && Dt && /* @__PURE__ */ e(
2078
+ Br,
2074
2079
  {
2075
- resource: Nt,
2076
- resourceType: tt.DASHBOARD,
2080
+ resource: Dt,
2081
+ resourceType: at.DASHBOARD,
2077
2082
  onClose: () => K(!1)
2078
2083
  }
2079
2084
  ),
2080
- /* @__PURE__ */ e(
2081
- Hn,
2085
+ Ie.showGroupManagement && /* @__PURE__ */ e(
2086
+ js,
2082
2087
  {
2083
2088
  open: te,
2084
2089
  onOpenChange: Q
2085
2090
  }
2086
2091
  ),
2087
2092
  /* @__PURE__ */ e(
2088
- cn,
2093
+ us,
2089
2094
  {
2090
2095
  open: ae,
2091
2096
  onOpenChange: re
2092
2097
  }
2093
2098
  ),
2094
- G && ye ? /* @__PURE__ */ e(
2095
- sn,
2099
+ B && ye ? /* @__PURE__ */ e(
2100
+ is,
2096
2101
  {
2097
- dashboardId: G,
2098
- dashboardTitle: (c == null ? void 0 : c.title) || (B == null ? void 0 : B.title),
2102
+ dashboardId: B,
2103
+ dashboardTitle: (c == null ? void 0 : c.title) || ($ == null ? void 0 : $.title),
2099
2104
  open: !0,
2100
2105
  onOpenChange: (i) => {
2101
2106
  i || ee(null);
@@ -2104,69 +2109,69 @@ function ws() {
2104
2109
  workflowIntent: ye
2105
2110
  }
2106
2111
  ) : null,
2107
- l && ue && p && /* @__PURE__ */ e(Cn, { open: Ge, onOpenChange: ne }),
2112
+ l && ue && p && /* @__PURE__ */ e(ks, { open: ze, onOpenChange: se }),
2108
2113
  p && /* @__PURE__ */ e(
2109
- Br,
2114
+ zr,
2110
2115
  {
2111
2116
  open: we,
2112
2117
  onOpenChange: Ne
2113
2118
  }
2114
2119
  ),
2115
2120
  /* @__PURE__ */ e(
2116
- Gr,
2121
+ _r,
2117
2122
  {
2118
- open: ze,
2123
+ open: _e,
2119
2124
  onOpenChange: (i) => {
2120
- !i && je && !g || ($(i), i || (R(null), W([]), J(!1)));
2125
+ !i && Ke && !g || (G(i), i || (R(null), W([]), J(!1)));
2121
2126
  },
2122
- children: /* @__PURE__ */ s(zr, { className: "max-w-sm", children: [
2123
- /* @__PURE__ */ s(_r, { children: [
2124
- /* @__PURE__ */ e(qr, { children: g ? "Save failed" : "Saving dashboard" }),
2125
- /* @__PURE__ */ e(Hr, { className: "pt-2", children: g ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
2126
- se.length > 0 && /* @__PURE__ */ s("div", { className: "space-y-1 rounded-md border border-destructive/20 bg-destructive/5 p-3 text-left", children: [
2127
+ children: /* @__PURE__ */ n(qr, { className: "max-w-sm", children: [
2128
+ /* @__PURE__ */ n(Hr, { children: [
2129
+ /* @__PURE__ */ e(jr, { children: g ? "Save failed" : "Saving dashboard" }),
2130
+ /* @__PURE__ */ e(Kr, { className: "pt-2", children: g ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
2131
+ ne.length > 0 && /* @__PURE__ */ n("div", { className: "space-y-1 rounded-md border border-destructive/20 bg-destructive/5 p-3 text-left", children: [
2127
2132
  /* @__PURE__ */ e("div", { className: "text-sm font-medium text-destructive", children: "What needs attention" }),
2128
- /* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children: se.slice(0, 5).map((i) => /* @__PURE__ */ e("li", { children: i }, i)) })
2133
+ /* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children: ne.slice(0, 5).map((i) => /* @__PURE__ */ e("li", { children: i }, i)) })
2129
2134
  ] })
2130
2135
  ] }),
2131
- /* @__PURE__ */ e(jr, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: g ? /* @__PURE__ */ s(T, { children: [
2136
+ /* @__PURE__ */ e(Qr, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: g ? /* @__PURE__ */ n(T, { children: [
2132
2137
  /* @__PURE__ */ e(
2133
- Kr,
2138
+ Wr,
2134
2139
  {
2135
2140
  onClick: () => {
2136
- $(!1), R(null), W([]), J(!1);
2141
+ G(!1), R(null), W([]), J(!1);
2137
2142
  },
2138
2143
  className: "m-0",
2139
2144
  children: "Close"
2140
2145
  }
2141
2146
  ),
2142
2147
  /* @__PURE__ */ e(
2143
- jt,
2148
+ Kt,
2144
2149
  {
2145
- onClick: () => Xe({
2150
+ onClick: () => Ye({
2146
2151
  closeAfterSave: oe,
2147
- navigateHomeAfterSave: Qe === "home"
2152
+ navigateHomeAfterSave: We === "home"
2148
2153
  }),
2149
2154
  className: "m-0",
2150
2155
  children: "Retry"
2151
2156
  }
2152
2157
  )
2153
- ] }) : /* @__PURE__ */ s(jt, { disabled: !0, className: "m-0 cursor-default", children: [
2154
- /* @__PURE__ */ e(Te, { className: "mr-2 h-4 w-4 animate-spin" }),
2158
+ ] }) : /* @__PURE__ */ n(Kt, { disabled: !0, className: "m-0 cursor-default", children: [
2159
+ /* @__PURE__ */ e(Ge, { className: "mr-2 h-4 w-4 animate-spin" }),
2155
2160
  "Saving..."
2156
2161
  ] }) })
2157
2162
  ] })
2158
2163
  }
2159
2164
  ),
2160
2165
  /* @__PURE__ */ e(
2161
- on,
2166
+ ds,
2162
2167
  {
2163
- open: Ia,
2168
+ open: Ma,
2164
2169
  onOpenChange: (i) => {
2165
2170
  le(i);
2166
2171
  },
2167
- onSave: Pa,
2168
- onDiscard: Ua,
2169
- isSaving: je,
2172
+ onSave: Ua,
2173
+ onDiscard: Ra,
2174
+ isSaving: Ke,
2170
2175
  saveLabel: "Save",
2171
2176
  discardLabel: "Discard"
2172
2177
  }
@@ -2176,9 +2181,9 @@ function ws() {
2176
2181
  }
2177
2182
  );
2178
2183
  }
2179
- function ts({
2184
+ function an({
2180
2185
  accessToken: t,
2181
- dashboardId: n,
2186
+ dashboardId: s,
2182
2187
  selectedSheetId: r,
2183
2188
  pageSize: a,
2184
2189
  orientation: o,
@@ -2187,10 +2192,10 @@ function ts({
2187
2192
  if (!t || !r)
2188
2193
  return null;
2189
2194
  const h = new URL("http://localhost:5173/print-document");
2190
- h.searchParams.set("token", t), n && h.searchParams.set("dashboardId", n), h.searchParams.set("selectedSheetId", r), l && h.searchParams.set("theme", l);
2195
+ h.searchParams.set("token", t), s && h.searchParams.set("dashboardId", s), h.searchParams.set("selectedSheetId", r), l && h.searchParams.set("theme", l);
2191
2196
  const m = new URL("http://127.0.0.1:3002/");
2192
2197
  return m.searchParams.set("pdfMode", "document"), m.searchParams.set("pageSize", a || "letter"), m.searchParams.set("orientation", o || "portrait"), m.searchParams.set("url", h.toString()), m.toString();
2193
2198
  }
2194
2199
  export {
2195
- ws as default
2200
+ Dn as default
2196
2201
  };