react-semaphor 0.1.431 → 0.1.433

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/dist/briefings/index.js +1 -1
  2. package/dist/chunks/{csv-utils-suxSkJGj.js → csv-utils-BZDvO2Fw.js} +1 -1
  3. package/dist/chunks/{dashboard-CPq4lMF5.js → dashboard-CCRvBqUy.js} +5816 -5807
  4. package/dist/chunks/{dashboard-D2wh2Avv.js → dashboard-DxynqfO7.js} +152 -152
  5. package/dist/chunks/{dashboard-briefing-launcher-n7BdUvVr.js → dashboard-briefing-launcher-B5y65OKI.js} +3 -3
  6. package/dist/chunks/{dashboard-briefing-launcher-DyhfpSOW.js → dashboard-briefing-launcher-h9DIL6l1.js} +1 -1
  7. package/dist/chunks/{dashboard-controls-BoiZVnIH.js → dashboard-controls-BN09XPen.js} +342 -342
  8. package/dist/chunks/dashboard-controls-Cp_Q8acT.js +36 -0
  9. package/dist/chunks/{dashboard-json-BW3ftPy_.js → dashboard-json-BNxt7dUo.js} +1 -1
  10. package/dist/chunks/{dashboard-json-CC5FPyln.js → dashboard-json-Bf3-8gq8.js} +1 -1
  11. package/dist/chunks/{edit-dashboard-visual-CkVRSfgf.js → edit-dashboard-visual-B8Mofk1U.js} +1 -1
  12. package/dist/chunks/{edit-dashboard-visual-BYhZFx_B.js → edit-dashboard-visual-DX76RXmE.js} +3 -3
  13. package/dist/chunks/{numeric-presentation-CGTcqocU.js → numeric-presentation-BJs5lSar.js} +4 -4
  14. package/dist/chunks/{report-preferences-dialog-Dpt-3Gkx.js → report-preferences-dialog-DMQjY7oS.js} +1 -1
  15. package/dist/chunks/{report-preferences-dialog-CDlNNs5F.js → report-preferences-dialog-DxK9_fbn.js} +1 -1
  16. package/dist/chunks/{use-create-flow-overlay-state-CCJylXK4.js → use-create-flow-overlay-state-BX3dLUMB.js} +1 -1
  17. package/dist/chunks/{use-create-flow-overlay-state-Du9wYMdG.js → use-create-flow-overlay-state-C6savp4F.js} +1 -1
  18. package/dist/dashboard/index.cjs +1 -1
  19. package/dist/dashboard/index.js +1 -1
  20. package/dist/data-app-builder/index.cjs +1 -1
  21. package/dist/data-app-builder/index.js +1 -1
  22. package/dist/format-utils/index.cjs +3 -2
  23. package/dist/format-utils/index.js +237 -137
  24. package/dist/index.cjs +1 -1
  25. package/dist/index.js +4 -4
  26. package/dist/surfboard/index.cjs +1 -1
  27. package/dist/surfboard/index.js +2 -2
  28. package/dist/types/format-utils.d.ts +27 -0
  29. package/dist/types/main.d.ts +16 -10
  30. package/dist/types/types.d.ts +14 -10
  31. package/package.json +1 -1
  32. package/dist/chunks/dashboard-controls-BCkIDYU4.js +0 -36
@@ -1,31 +1,31 @@
1
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, A as Zt, O 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, L as Ge, aE as aa, aF as ja, E as Bt, Q as Ka, V as Qa, W as Wa, Y as Ja, o as Ya, aG as Xa } from "./code-editor-C8zzmSgt.js";
3
- import { bC as Za, bD as er, az as z, aH as ra, bE as tr, aZ as H, aI as sa, aJ as ar, aK as st, aL as nt, aF as rr, bF as fe, bG as Te, bH as sr, bI as $t, bJ as na, bK as oa, bL as nr, bM as ut, bN as or, bO as ir, bP as dr, bQ as lr, bR as cr, bS as ur, b8 as xe, bT as ve, aG as C, bU as mr, bV as ia, br as mt, bW as pr, bX as hr, bY as da, bZ as fr, b_ as la, b$ as O, c0 as gr, aj as br, c1 as xr, c2 as vr, c3 as yr, an as wr, av as Fe, aw as Nr, w as at, c4 as Dr, c5 as Cr, c6 as kr, c7 as Sr, ai as Ir, c8 as Mr, c9 as Er, I as zt, ca as Lr, cb as Ar, cc as Pr, cd as Ur, ce as Rr, cf as _t, cg as qt, ch as Ht, ci as Vr, cj as Fr, ck as Or, cl as Tr, b1 as jt, cm as Gr, cn as Br, co as $r, y as zr, cp as _r, aP as qr, aS as Hr, aT as jr, aU as Kr, aV as Qr, aW as Wr, aX as Jr, aY as Kt, g as ot } from "./dashboard-CPq4lMF5.js";
4
- import { c as Z, X as ca, C as Yr } from "./index-xHCrHprY.js";
2
+ import { u as D, B as U, aw as dt, A as Zt, O as _a, Z as qa, c as be, ax as lt, ay as Ha, az as ja, aA as ea, aB as xe, aC as ct, aD as ta, L as Ge, aE as aa, aF as Ka, E as Bt, Q as Qa, V as Wa, W as Ja, Y as Ya, o as Xa, aG as Za } from "./code-editor-C8zzmSgt.js";
3
+ import { bC as er, bD as tr, az as z, aH as ra, bE as ar, aZ as H, aI as sa, aJ as rr, aK as st, aL as nt, aF as sr, bF as ge, bG as Te, bH as nr, bI as $t, bJ as na, bK as oa, bL as or, bM as ut, bN as ir, bO as dr, bP as lr, bQ as cr, bR as ur, bS as mr, b8 as ve, bT as ye, aG as C, bU as hr, bV as ia, br as mt, bW as pr, bX as fr, bY as da, bZ as gr, b_ as la, b$ as O, c0 as br, aj as xr, c1 as vr, c2 as yr, c3 as wr, an as Nr, av as Fe, aw as Dr, w as at, c4 as Cr, c5 as kr, c6 as Sr, c7 as Ir, ai as Mr, c8 as Er, c9 as Lr, I as zt, ca as Ar, cb as Pr, cc as Ur, cd as Rr, ce as Vr, cf as _t, cg as qt, ch as Ht, ci as Fr, cj as Or, ck as Tr, cl as Gr, b1 as jt, cm as Br, cn as $r, co as zr, y as _r, cp as qr, aP as Hr, aS as jr, aT as Kr, aU as Qr, aV as Wr, aW as Jr, aX as Yr, aY as Kt, g as ot } from "./dashboard-CCRvBqUy.js";
4
+ import { c as Z, X as ca, C as Xr } from "./index-xHCrHprY.js";
5
5
  import "./analyze-result-contract-CfOBEwaC.js";
6
6
  import "../value-format-preferences/index.js";
7
7
  import * as A from "react";
8
- import { useState as N, useMemo as X, useEffect as Be, useRef as Qt, useLayoutEffect as Xr, useCallback as Zr } from "react";
8
+ import { useState as N, useMemo as X, useEffect as Be, useRef as Qt, useLayoutEffect as Zr, useCallback as es } from "react";
9
9
  import "./index-If0wlXGi.js";
10
10
  import "./comparison-document-migration-Dj6xZMCb.js";
11
- import { createPortal as es } from "react-dom";
11
+ import { createPortal as ts } from "react-dom";
12
12
  import "../briefings/index.js";
13
- import { g as ts, u as as, A as rs, V as ss, c as ns, f as os, N as is, D as ds, U as ls } from "./dashboard-briefing-launcher-n7BdUvVr.js";
14
- import { S as cs, C as us } from "./search-DHZCro8B.js";
13
+ import { g as as, u as rs, A as ss, V as ns, c as os, f as is, N as ds, D as ls, U as cs } from "./dashboard-briefing-launcher-B5y65OKI.js";
14
+ import { S as us, C as ms } from "./search-DHZCro8B.js";
15
15
  import { d as ua } from "./index-CnujJ3fa.js";
16
- import { R as ms } from "./report-preferences-dialog-Dpt-3Gkx.js";
16
+ import { R as hs } from "./report-preferences-dialog-DMQjY7oS.js";
17
17
  import { u as ps } from "./use-debounced-dirty-check-BwAbnX_5.js";
18
18
  import { s as rt } from "./normalize-dashboard-for-dirty-check-5KpZN8xr.js";
19
19
  import { S as Wt } from "./save-HCJjjzdX.js";
20
- import { P as hs } from "./palette-jqaAcwiQ.js";
21
- import { B as fs } from "./braces-BdbUk_r9.js";
20
+ import { P as fs } from "./palette-jqaAcwiQ.js";
21
+ import { B as gs } from "./braces-BdbUk_r9.js";
22
22
  /**
23
23
  * @license lucide-react v0.453.0 - ISC
24
24
  *
25
25
  * This source code is licensed under the ISC license.
26
26
  * See the LICENSE file in the root directory of this source tree.
27
27
  */
28
- const gs = Z("Glasses", [
28
+ const bs = Z("Glasses", [
29
29
  ["circle", { cx: "6", cy: "15", r: "4", key: "vux9w4" }],
30
30
  ["circle", { cx: "18", cy: "15", r: "4", key: "18o8ve" }],
31
31
  ["path", { d: "M14 15a2 2 0 0 0-2-2 2 2 0 0 0-2 2", key: "1ag4bs" }],
@@ -38,7 +38,7 @@ const gs = Z("Glasses", [
38
38
  * This source code is licensed under the ISC license.
39
39
  * See the LICENSE file in the root directory of this source tree.
40
40
  */
41
- const bs = Z("Monitor", [
41
+ const xs = Z("Monitor", [
42
42
  ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
43
43
  ["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
44
44
  ["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
@@ -49,7 +49,7 @@ const bs = Z("Monitor", [
49
49
  * This source code is licensed under the ISC license.
50
50
  * See the LICENSE file in the root directory of this source tree.
51
51
  */
52
- const xs = Z("Moon", [
52
+ const vs = Z("Moon", [
53
53
  ["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
54
54
  ]);
55
55
  /**
@@ -58,7 +58,7 @@ const xs = Z("Moon", [
58
58
  * This source code is licensed under the ISC license.
59
59
  * See the LICENSE file in the root directory of this source tree.
60
60
  */
61
- const vs = Z("ShieldX", [
61
+ const ys = Z("ShieldX", [
62
62
  [
63
63
  "path",
64
64
  {
@@ -75,7 +75,7 @@ const vs = Z("ShieldX", [
75
75
  * This source code is licensed under the ISC license.
76
76
  * See the LICENSE file in the root directory of this source tree.
77
77
  */
78
- const ys = Z("Sun", [
78
+ const ws = Z("Sun", [
79
79
  ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
80
80
  ["path", { d: "M12 2v2", key: "tus03m" }],
81
81
  ["path", { d: "M12 20v2", key: "1lh1kg" }],
@@ -92,7 +92,7 @@ const ys = Z("Sun", [
92
92
  * This source code is licensed under the ISC license.
93
93
  * See the LICENSE file in the root directory of this source tree.
94
94
  */
95
- const ws = Z("UserPlus", [
95
+ const Ns = Z("UserPlus", [
96
96
  ["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
97
97
  ["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
98
98
  ["line", { x1: "19", x2: "19", y1: "8", y2: "14", key: "1bvyxn" }],
@@ -108,15 +108,15 @@ const ma = Z("UserRound", [
108
108
  ["circle", { cx: "12", cy: "8", r: "5", key: "1hypcn" }],
109
109
  ["path", { d: "M20 21a8 8 0 0 0-16 0", key: "rfgkzh" }]
110
110
  ]), Oe = ["light", "dark", "system"];
111
- function Ns() {
112
- const { theme: t, setTheme: s } = Za(), r = D(
113
- (h) => h.actions.setDashboardTheme
111
+ function Ds() {
112
+ const { theme: t, setTheme: s } = er(), r = D(
113
+ (p) => p.actions.setDashboardTheme
114
114
  );
115
115
  function a() {
116
- const h = Oe.includes(t) ? t : "system", m = Oe[(Oe.indexOf(h) + 1) % Oe.length];
116
+ const p = Oe.includes(t) ? t : "system", m = Oe[(Oe.indexOf(p) + 1) % Oe.length];
117
117
  s(m), r(m);
118
118
  }
119
- const o = t === "light" ? ys : t === "dark" ? xs : bs, l = t === "light" ? "Theme: light (click for dark)" : t === "dark" ? "Theme: dark (click for system)" : "Theme: system (click for light)";
119
+ const o = t === "light" ? ws : t === "dark" ? vs : xs, l = t === "light" ? "Theme: light (click for dark)" : t === "dark" ? "Theme: dark (click for system)" : "Theme: system (click for light)";
120
120
  return /* @__PURE__ */ e(
121
121
  U,
122
122
  {
@@ -131,8 +131,8 @@ function Ns() {
131
131
  }
132
132
  );
133
133
  }
134
- function pa(t) {
135
- const s = (/* @__PURE__ */ new Date()).toISOString(), r = er({
134
+ function ha(t) {
135
+ const s = (/* @__PURE__ */ new Date()).toISOString(), r = tr({
136
136
  dashboard: t.dashboard,
137
137
  sheetIds: (t.dashboard.sheets || []).filter((a) => a.kind !== "document").map((a) => a.id),
138
138
  sheetKind: "dashboard",
@@ -151,13 +151,13 @@ function pa(t) {
151
151
  dashboardInputValues: r.dashboardInputValues
152
152
  };
153
153
  }
154
- async function Ds(t, s, r, a, o, l) {
154
+ async function Cs(t, s, r, a, o, l) {
155
155
  if (!l)
156
156
  return null;
157
- const h = JSON.stringify(r), m = `${t}/v1/lens`;
157
+ const p = JSON.stringify(r), m = `${t}/v1/lens`;
158
158
  return await dt(m, l, {
159
159
  name: s,
160
- template: h,
160
+ template: p,
161
161
  filterValues: a,
162
162
  inputValues: o,
163
163
  operation: "create"
@@ -170,21 +170,21 @@ async function it(t, s, r) {
170
170
  id: a,
171
171
  template: o,
172
172
  filterValues: l,
173
- inputValues: h,
173
+ inputValues: p,
174
174
  isDefault: m,
175
- shared: p
175
+ shared: h
176
176
  } = s, v = `${t}/v1/lens`;
177
177
  return await dt(v, r, {
178
178
  lensId: a,
179
179
  template: o,
180
180
  filterValues: l,
181
- inputValues: h,
181
+ inputValues: p,
182
182
  isDefault: m,
183
- shared: p,
183
+ shared: h,
184
184
  operation: "update"
185
185
  });
186
186
  }
187
- async function Cs(t, s, r) {
187
+ async function ks(t, s, r) {
188
188
  if (!r)
189
189
  return null;
190
190
  const a = `${t}/v1/lens`;
@@ -193,24 +193,24 @@ async function Cs(t, s, r) {
193
193
  lensId: s
194
194
  });
195
195
  }
196
- const ks = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
197
- function Ss({
196
+ const Ss = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
197
+ function Is({
198
198
  open: t,
199
199
  onOpenChange: s
200
200
  } = {}) {
201
- 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
+ const [r, a] = N(""), [o, l] = N(!1), p = D((x) => x.lenses), { setLenses: m, setSelectedLensId: h } = Zt(), [v, d] = N(!1), [u, b] = N(!1), f = t !== void 0, w = f ? t : u, y = (x) => {
202
202
  f || b(x), s == null || s(x);
203
203
  }, c = D((x) => x.dashboard), M = D((x) => x.filterValues), { authToken: S, tokenProps: P } = z();
204
204
  async function k() {
205
205
  d(!0);
206
- const x = D.getState(), _ = pa({
206
+ const x = D.getState(), _ = ha({
207
207
  dashboard: c,
208
208
  dashboardInputValues: x.dashboardInputValues,
209
209
  filterValues: M,
210
210
  controlValues: x.controlValues,
211
211
  inlineFilterValuesMap: x.inlineFilterValuesMap,
212
212
  cardControlValuesMap: x.cardControlValuesMap
213
- }), q = await Ds(
213
+ }), q = await Cs(
214
214
  P.apiServiceUrl,
215
215
  r,
216
216
  c,
@@ -218,22 +218,22 @@ function Ss({
218
218
  _,
219
219
  S == null ? void 0 : S.accessToken
220
220
  );
221
- q && (m([...h || [], q]), p(q.id), y(!1)), d(!1);
221
+ q && (m([...p || [], q]), h(q.id), y(!1)), d(!1);
222
222
  }
223
223
  return /* @__PURE__ */ n(ra, { open: w, onOpenChange: y, children: [
224
- f ? null : /* @__PURE__ */ e(tr, { asChild: !0, children: /* @__PURE__ */ n(U, { variant: "secondary", size: "xs", children: [
224
+ f ? null : /* @__PURE__ */ e(ar, { asChild: !0, children: /* @__PURE__ */ n(U, { variant: "secondary", size: "xs", children: [
225
225
  /* @__PURE__ */ e(H, { className: "h-3.5 w-3.5" }),
226
226
  "Lens"
227
227
  ] }) }),
228
228
  /* @__PURE__ */ n(sa, { className: "rounded-control border-border/60 sm:max-w-[420px] sm:rounded-control", children: [
229
- /* @__PURE__ */ n(ar, { children: [
229
+ /* @__PURE__ */ n(rr, { children: [
230
230
  /* @__PURE__ */ e(st, { className: "text-[15px]", children: "Create lens" }),
231
231
  /* @__PURE__ */ e(nt, { className: "text-[13px] leading-5", children: "Lenses are private by default and are only visible to you." })
232
232
  ] }),
233
233
  /* @__PURE__ */ n("div", { className: "space-y-1.5 py-1", children: [
234
- /* @__PURE__ */ e(za, { htmlFor: "lens-name", className: ks, children: "Name" }),
234
+ /* @__PURE__ */ e(_a, { htmlFor: "lens-name", className: Ss, children: "Name" }),
235
235
  /* @__PURE__ */ e(
236
- _a,
236
+ qa,
237
237
  {
238
238
  id: "lens-name",
239
239
  size: "xs",
@@ -244,7 +244,7 @@ function Ss({
244
244
  ),
245
245
  o && /* @__PURE__ */ e("p", { className: "text-[12px] text-destructive", children: "A lens with this name already exists. Pick a different one." })
246
246
  ] }),
247
- /* @__PURE__ */ n(rr, { children: [
247
+ /* @__PURE__ */ n(sr, { children: [
248
248
  /* @__PURE__ */ e(U, { variant: "outline", size: "xs", onClick: () => y(!1), children: "Cancel" }),
249
249
  /* @__PURE__ */ e(
250
250
  U,
@@ -260,13 +260,13 @@ function Ss({
260
260
  ] })
261
261
  ] });
262
262
  }
263
- function Is({ includeLabel: t = !1 } = {}) {
264
- const s = D((d) => d.lenses), r = D((d) => d.selectedLensId), { setLenses: a, setSelectedLensId: o } = Zt(), { authToken: l, tokenProps: h } = z();
263
+ function Ms({ includeLabel: t = !1 } = {}) {
264
+ const s = D((d) => d.lenses), r = D((d) => d.selectedLensId), { setLenses: a, setSelectedLensId: o } = Zt(), { authToken: l, tokenProps: p } = z();
265
265
  async function m(d) {
266
266
  o(d);
267
267
  }
268
- async function p(d) {
269
- if (await Cs(h.apiServiceUrl, d, l == null ? void 0 : l.accessToken)) {
268
+ async function h(d) {
269
+ if (await ks(p.apiServiceUrl, d, l == null ? void 0 : l.accessToken)) {
270
270
  const b = s == null ? void 0 : s.filter((f) => f.id !== d);
271
271
  a(b || []), o("original");
272
272
  }
@@ -284,23 +284,23 @@ function Is({ includeLabel: t = !1 } = {}) {
284
284
  ...d,
285
285
  isDefault: !d.isDefault
286
286
  };
287
- await it(h.apiServiceUrl, b, l == null ? void 0 : l.accessToken);
287
+ await it(p.apiServiceUrl, b, l == null ? void 0 : l.accessToken);
288
288
  const f = s == null ? void 0 : s.find((w) => w.isDefault);
289
289
  if (f && f.id !== d.id) {
290
290
  const w = {
291
291
  ...f,
292
292
  isDefault: !1
293
293
  };
294
- await it(h.apiServiceUrl, w, l == null ? void 0 : l.accessToken);
294
+ await it(p.apiServiceUrl, w, l == null ? void 0 : l.accessToken);
295
295
  }
296
296
  }
297
297
  return /* @__PURE__ */ n(T, { children: [
298
298
  t ? /* @__PURE__ */ n(T, { children: [
299
- /* @__PURE__ */ e(fe, { className: "px-3", children: "Lenses" }),
299
+ /* @__PURE__ */ e(ge, { className: "px-3", children: "Lenses" }),
300
300
  /* @__PURE__ */ e(Te, {})
301
301
  ] }) : null,
302
302
  /* @__PURE__ */ n(
303
- sr,
303
+ nr,
304
304
  {
305
305
  value: r,
306
306
  onValueChange: m,
@@ -320,7 +320,7 @@ function Is({ includeLabel: t = !1 } = {}) {
320
320
  onClick: (u) => {
321
321
  u.preventDefault(), v(d);
322
322
  },
323
- className: ge(
323
+ className: be(
324
324
  "size-3.5 text-muted-foreground hover:cursor-pointer hover:text-foreground group-hover:visible",
325
325
  {
326
326
  invisible: !d.isDefault,
@@ -334,7 +334,7 @@ function Is({ includeLabel: t = !1 } = {}) {
334
334
  oa,
335
335
  {
336
336
  onClick: (u) => {
337
- u.preventDefault(), p(d.id);
337
+ u.preventDefault(), h(d.id);
338
338
  },
339
339
  className: "invisible size-3.5 text-muted-foreground hover:cursor-pointer hover:text-foreground group-hover:visible",
340
340
  strokeWidth: 1.5
@@ -350,19 +350,19 @@ function Is({ includeLabel: t = !1 } = {}) {
350
350
  )
351
351
  ] });
352
352
  }
353
- function Ms() {
354
- const { displayPreferences: t, shouldShowElement: s } = nr(), { currentUser: r, userContext: a } = ut(), o = X(
355
- () => or(r),
353
+ function Es() {
354
+ const { displayPreferences: t, shouldShowElement: s } = or(), { currentUser: r, userContext: a } = ut(), o = X(
355
+ () => ir(r),
356
356
  [r]
357
- ), l = X(() => (m) => o && o[m] !== void 0 && o[m] === !1 ? !1 : s(m), [o, s, t]), h = X(
357
+ ), l = X(() => (m) => o && o[m] !== void 0 && o[m] === !1 ? !1 : s(m), [o, s, t]), p = X(
358
358
  () => {
359
- var m, p, v, d, u;
359
+ var m, h, v, d, u;
360
360
  return {
361
- canEdit: ((m = a == null ? void 0 : a.permissions) == null ? void 0 : m.canEdit) ?? ur(r),
362
- canUseFilters: ((p = a == null ? void 0 : a.permissions) == null ? void 0 : p.canEdit) ?? cr(r),
363
- canManageDashboards: ((v = a == null ? void 0 : a.permissions) == null ? void 0 : v.canCreateDashboard) ?? lr(r),
364
- canCreateDashboards: ((d = a == null ? void 0 : a.permissions) == null ? void 0 : d.canCreateDashboard) ?? dr(r),
365
- canAccessVisuals: ((u = a == null ? void 0 : a.permissions) == null ? void 0 : u.canEdit) ?? ir(r)
361
+ canEdit: ((m = a == null ? void 0 : a.permissions) == null ? void 0 : m.canEdit) ?? mr(r),
362
+ canUseFilters: ((h = a == null ? void 0 : a.permissions) == null ? void 0 : h.canEdit) ?? ur(r),
363
+ canManageDashboards: ((v = a == null ? void 0 : a.permissions) == null ? void 0 : v.canCreateDashboard) ?? cr(r),
364
+ canCreateDashboards: ((d = a == null ? void 0 : a.permissions) == null ? void 0 : d.canCreateDashboard) ?? lr(r),
365
+ canAccessVisuals: ((u = a == null ? void 0 : a.permissions) == null ? void 0 : u.canEdit) ?? dr(r)
366
366
  };
367
367
  },
368
368
  [r, a]
@@ -370,63 +370,63 @@ function Ms() {
370
370
  return {
371
371
  displayPreferences: t,
372
372
  shouldShowElement: l,
373
- permissions: h,
373
+ permissions: p,
374
374
  currentUser: r
375
375
  };
376
376
  }
377
- var pt = "Avatar", [Es] = qa(pt), Ls = [
377
+ var ht = "Avatar", [Ls] = Ha(ht), As = [
378
378
  0,
379
379
  () => {
380
380
  }
381
- ], [As, ha] = Es(pt), ht = A.forwardRef(
381
+ ], [Ps, pa] = Ls(ht), pt = A.forwardRef(
382
382
  (t, s) => {
383
- const { __scopeAvatar: r, ...a } = t, [o, l] = A.useState("idle"), [h, m] = Us();
383
+ const { __scopeAvatar: r, ...a } = t, [o, l] = A.useState("idle"), [p, m] = Rs();
384
384
  return /* @__PURE__ */ e(
385
- As,
385
+ Ps,
386
386
  {
387
387
  scope: r,
388
388
  imageLoadingStatus: o,
389
389
  setImageLoadingStatus: l,
390
- imageCount: h,
390
+ imageCount: p,
391
391
  setImageCount: m,
392
392
  children: /* @__PURE__ */ e(lt.span, { ...a, ref: s })
393
393
  }
394
394
  );
395
395
  }
396
396
  );
397
- ht.displayName = pt;
397
+ pt.displayName = ht;
398
398
  var fa = "AvatarImage", ft = A.forwardRef(
399
399
  (t, s) => {
400
- const { __scopeAvatar: r, src: a, onLoadingStatusChange: o, ...l } = t, h = ha(fa, r);
401
- Rs(h.setImageCount);
402
- const m = Ps(a, {
400
+ const { __scopeAvatar: r, src: a, onLoadingStatusChange: o, ...l } = t, p = pa(fa, r);
401
+ Vs(p.setImageCount);
402
+ const m = Us(a, {
403
403
  referrerPolicy: l.referrerPolicy,
404
404
  crossOrigin: l.crossOrigin,
405
- loadingStatus: h.imageLoadingStatus,
406
- setLoadingStatus: h.setImageLoadingStatus
407
- }), p = Ha((d) => {
405
+ loadingStatus: p.imageLoadingStatus,
406
+ setLoadingStatus: p.setImageLoadingStatus
407
+ }), h = ja((d) => {
408
408
  o == null || o(d);
409
409
  }), v = A.useRef(m);
410
410
  return ea(() => {
411
411
  const d = v.current;
412
- v.current = m, m !== d && p(m);
413
- }, [m, p]), m === "loaded" ? /* @__PURE__ */ e(lt.img, { ...l, ref: s, src: a }) : null;
412
+ v.current = m, m !== d && h(m);
413
+ }, [m, h]), m === "loaded" ? /* @__PURE__ */ e(lt.img, { ...l, ref: s, src: a }) : null;
414
414
  }
415
415
  );
416
416
  ft.displayName = fa;
417
417
  var ga = "AvatarFallback", gt = A.forwardRef(
418
418
  (t, s) => {
419
- const { __scopeAvatar: r, delayMs: a, ...o } = t, l = ha(ga, r), [h, m] = A.useState(a === void 0);
419
+ const { __scopeAvatar: r, delayMs: a, ...o } = t, l = pa(ga, r), [p, m] = A.useState(a === void 0);
420
420
  return A.useEffect(() => {
421
421
  if (a !== void 0) {
422
- const p = window.setTimeout(() => m(!0), a);
423
- return () => window.clearTimeout(p);
422
+ const h = window.setTimeout(() => m(!0), a);
423
+ return () => window.clearTimeout(h);
424
424
  }
425
- }, [a]), h && l.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(lt.span, { ...o, ref: s }) : null;
425
+ }, [a]), p && l.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(lt.span, { ...o, ref: s }) : null;
426
426
  }
427
427
  );
428
428
  gt.displayName = ga;
429
- function Ps(t, {
429
+ function Us(t, {
430
430
  loadingStatus: s,
431
431
  setLoadingStatus: r,
432
432
  referrerPolicy: a,
@@ -437,20 +437,20 @@ function Ps(t, {
437
437
  r("error");
438
438
  return;
439
439
  }
440
- const l = new window.Image(), h = (p) => {
441
- const v = p.currentTarget;
440
+ const l = new window.Image(), p = (h) => {
441
+ const v = h.currentTarget;
442
442
  r(Jt(v));
443
443
  }, m = () => r("error");
444
- return l.addEventListener("load", h), l.addEventListener("error", m), a && (l.referrerPolicy = a), l.crossOrigin = o ?? null, l.src = t, r(Jt(l)), () => {
445
- l.removeEventListener("load", h), l.removeEventListener("error", m), r("idle");
444
+ return l.addEventListener("load", p), l.addEventListener("error", m), a && (l.referrerPolicy = a), l.crossOrigin = o ?? null, l.src = t, r(Jt(l)), () => {
445
+ l.removeEventListener("load", p), l.removeEventListener("error", m), r("idle");
446
446
  };
447
447
  }, [t, o, a, r]), s;
448
448
  }
449
449
  function Jt(t) {
450
450
  return t.complete ? t.naturalWidth > 0 ? "loaded" : "error" : "loading";
451
451
  }
452
- function Us() {
453
- let t = Ls;
452
+ function Rs() {
453
+ let t = As;
454
454
  {
455
455
  t = A.useState(0);
456
456
  const [s] = t, r = A.useRef(!1);
@@ -462,37 +462,37 @@ function Us() {
462
462
  }
463
463
  return t;
464
464
  }
465
- function Rs(t) {
465
+ function Vs(t) {
466
466
  A.useEffect(() => (t((s) => s + 1), () => {
467
467
  t((s) => s - 1);
468
468
  }), [t]);
469
469
  }
470
470
  const ba = A.forwardRef(({ className: t, ...s }, r) => /* @__PURE__ */ e(
471
- ht,
471
+ pt,
472
472
  {
473
473
  ref: r,
474
- className: ge(
474
+ className: be(
475
475
  "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
476
476
  t
477
477
  ),
478
478
  ...s
479
479
  }
480
480
  ));
481
- ba.displayName = ht.displayName;
482
- const Vs = A.forwardRef(({ className: t, ...s }, r) => /* @__PURE__ */ e(
481
+ ba.displayName = pt.displayName;
482
+ const Fs = A.forwardRef(({ className: t, ...s }, r) => /* @__PURE__ */ e(
483
483
  ft,
484
484
  {
485
485
  ref: r,
486
- className: ge("aspect-square h-full w-full", t),
486
+ className: be("aspect-square h-full w-full", t),
487
487
  ...s
488
488
  }
489
489
  ));
490
- Vs.displayName = ft.displayName;
490
+ Fs.displayName = ft.displayName;
491
491
  const xa = A.forwardRef(({ className: t, ...s }, r) => /* @__PURE__ */ e(
492
492
  gt,
493
493
  {
494
494
  ref: r,
495
- className: ge(
495
+ className: be(
496
496
  "flex h-full w-full items-center justify-center rounded-full bg-muted",
497
497
  t
498
498
  ),
@@ -500,74 +500,74 @@ const xa = A.forwardRef(({ className: t, ...s }, r) => /* @__PURE__ */ e(
500
500
  }
501
501
  ));
502
502
  xa.displayName = gt.displayName;
503
- const Fs = async (t, s, r) => {
503
+ const Os = async (t, s, r) => {
504
504
  const a = `${t}/management/v1/groups`;
505
505
  return await ta(a, s, r);
506
- }, Os = async (t, s, r, a) => {
506
+ }, Ts = async (t, s, r, a) => {
507
507
  const o = `${t}/management/v1/groups/${r}`;
508
508
  return ct(o, s, "PATCH", a);
509
- }, Ts = async (t, s, r) => {
509
+ }, Gs = async (t, s, r) => {
510
510
  const a = `${t}/management/v1/groups/${r}`;
511
511
  await ct(a, s, "DELETE");
512
- }, Gs = async (t, s, r, a) => {
512
+ }, Bs = async (t, s, r, a) => {
513
513
  const o = `${t}/management/v1/groups/${r}/members`;
514
514
  return await ta(o, s, a);
515
- }, Bs = async (t, s, r, a) => {
515
+ }, $s = async (t, s, r, a) => {
516
516
  const o = `${t}/management/v1/groups/${r}/members`;
517
517
  await ct(o, s, "DELETE", a);
518
518
  };
519
- function $s() {
520
- const { authToken: t, tokenProps: s } = z(), r = xe();
521
- return ve({
522
- mutationFn: (a) => Fs(s.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a),
519
+ function zs() {
520
+ const { authToken: t, tokenProps: s } = z(), r = ve();
521
+ return ye({
522
+ mutationFn: (a) => Os(s.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a),
523
523
  onSuccess: () => {
524
524
  r.invalidateQueries({ queryKey: ["groups"] }), C.success("Group created successfully");
525
525
  },
526
526
  onError: (a) => {
527
527
  console.error("Failed to create group:", a), C.error("Failed to create group", {
528
- description: be(a, "Failed to create group")
528
+ description: xe(a, "Failed to create group")
529
529
  });
530
530
  }
531
531
  });
532
532
  }
533
- function zs() {
534
- const { authToken: t, tokenProps: s } = z(), r = xe();
535
- return ve({
533
+ function _s() {
534
+ const { authToken: t, tokenProps: s } = z(), r = ve();
535
+ return ye({
536
536
  mutationFn: ({
537
537
  groupId: a,
538
538
  data: o
539
- }) => Os(s.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a, o),
539
+ }) => Ts(s.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a, o),
540
540
  onSuccess: (a, o) => {
541
541
  r.invalidateQueries({ queryKey: ["group", o.groupId] }), r.invalidateQueries({ queryKey: ["groups"] }), C.success("Group updated successfully");
542
542
  },
543
543
  onError: (a) => {
544
544
  console.error("Failed to update group:", a), C.error("Failed to update group", {
545
- description: be(a, "Failed to update group")
545
+ description: xe(a, "Failed to update group")
546
546
  });
547
547
  }
548
548
  });
549
549
  }
550
- function _s() {
551
- const { authToken: t, tokenProps: s } = z(), r = xe();
552
- return ve({
553
- mutationFn: (a) => Ts(s.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a),
550
+ function qs() {
551
+ const { authToken: t, tokenProps: s } = z(), r = ve();
552
+ return ye({
553
+ mutationFn: (a) => Gs(s.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a),
554
554
  onSuccess: (a, o) => {
555
555
  r.invalidateQueries({ queryKey: ["groups"] }), r.removeQueries({ queryKey: ["group", o] }), C.success("Group deleted successfully");
556
556
  },
557
557
  onError: (a) => {
558
558
  console.error("Failed to delete group:", a), C.error("Failed to delete group", {
559
- description: be(a, "Failed to delete group")
559
+ description: xe(a, "Failed to delete group")
560
560
  });
561
561
  }
562
562
  });
563
563
  }
564
- function qs() {
565
- const { authToken: t, tokenProps: s } = z(), r = xe();
566
- return ve({
564
+ function Hs() {
565
+ const { authToken: t, tokenProps: s } = z(), r = ve();
566
+ return ye({
567
567
  mutationFn: ({
568
568
  groupId: a,
569
569
  data: o
570
- }) => Gs(s.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a, o),
570
+ }) => Bs(s.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a, o),
571
571
  onSuccess: (a, o) => {
572
572
  r.invalidateQueries({ queryKey: ["group", o.groupId] }), r.invalidateQueries({
573
573
  queryKey: ["group-members", o.groupId]
@@ -575,18 +575,18 @@ function qs() {
575
575
  },
576
576
  onError: (a) => {
577
577
  console.error("Failed to add group members:", a), C.error("Failed to add members", {
578
- description: be(a, "Failed to add members")
578
+ description: xe(a, "Failed to add members")
579
579
  });
580
580
  }
581
581
  });
582
582
  }
583
- function Hs() {
584
- const { authToken: t, tokenProps: s } = z(), r = xe();
585
- return ve({
583
+ function js() {
584
+ const { authToken: t, tokenProps: s } = z(), r = ve();
585
+ return ye({
586
586
  mutationFn: ({
587
587
  groupId: a,
588
588
  data: o
589
- }) => Bs(s.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a, o),
589
+ }) => $s(s.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", a, o),
590
590
  onSuccess: (a, o) => {
591
591
  r.invalidateQueries({ queryKey: ["group", o.groupId] }), r.invalidateQueries({
592
592
  queryKey: ["group-members", o.groupId]
@@ -594,31 +594,31 @@ function Hs() {
594
594
  },
595
595
  onError: (a) => {
596
596
  console.error("Failed to remove group members:", a), C.error("Failed to remove members", {
597
- description: be(a, "Failed to remove members")
597
+ description: xe(a, "Failed to remove members")
598
598
  });
599
599
  }
600
600
  });
601
601
  }
602
- const js = [];
603
- function Ks({
602
+ const Ks = [];
603
+ function Qs({
604
604
  open: t,
605
605
  onOpenChange: s
606
606
  }) {
607
607
  var S, P, k;
608
608
  const { tokenProps: r } = z(), { currentUser: a } = ut(), o = (a == null ? void 0 : a.type) === "tenant", l = r == null ? void 0 : r.tenantId, {
609
- groups: h,
609
+ groups: p,
610
610
  isLoading: m,
611
- error: p,
611
+ error: h,
612
612
  refetch: v
613
- } = mr({
613
+ } = hr({
614
614
  type: o ? "TENANT_GROUP" : "all",
615
615
  tenantId: o ? l : void 0,
616
616
  includeMembers: !1
617
- }), d = p ? va(p, "Unable to load groups.") : null, [u, b] = N({ kind: "list" }), [f, w] = N(null), y = _s();
617
+ }), d = h ? va(h, "Unable to load groups.") : null, [u, b] = N({ kind: "list" }), [f, w] = N(null), y = qs();
618
618
  Be(() => {
619
619
  t || (b({ kind: "list" }), w(null));
620
620
  }, [t]);
621
- const c = u.kind === "members" && h.find((x) => x.id === u.groupId) || null, M = async () => {
621
+ const c = u.kind === "members" && p.find((x) => x.id === u.groupId) || null, M = async () => {
622
622
  if (f)
623
623
  try {
624
624
  await y.mutateAsync(f.id), w(null), b({ kind: "list" }), v();
@@ -644,9 +644,9 @@ function Ks({
644
644
  /* @__PURE__ */ e(nt, { className: "sr-only", children: "Create a new group to organize members." })
645
645
  ] }) : null,
646
646
  u.kind === "list" && /* @__PURE__ */ e(
647
- Qs,
647
+ Ws,
648
648
  {
649
- groups: h,
649
+ groups: p,
650
650
  isLoading: m,
651
651
  errorMessage: d,
652
652
  onRetry: () => v(),
@@ -657,7 +657,7 @@ function Ks({
657
657
  }
658
658
  ),
659
659
  u.kind === "members" && c && /* @__PURE__ */ e(
660
- Ys,
660
+ Xs,
661
661
  {
662
662
  group: c,
663
663
  isTenantViewer: o,
@@ -672,7 +672,7 @@ function Ks({
672
672
  c.id
673
673
  ),
674
674
  u.kind === "create" && /* @__PURE__ */ e(
675
- Xs,
675
+ Zs,
676
676
  {
677
677
  isTenantUser: o,
678
678
  tenantId: l,
@@ -717,36 +717,36 @@ function Ks({
717
717
  ] })
718
718
  ] }) });
719
719
  }
720
- function Qs({
720
+ function Ws({
721
721
  groups: t,
722
722
  isLoading: s,
723
723
  errorMessage: r,
724
724
  onRetry: a,
725
725
  currentUserId: o,
726
726
  onOpenGroup: l,
727
- onCreate: h,
727
+ onCreate: p,
728
728
  onDeleteRequest: m
729
729
  }) {
730
- const [p, v] = N(""), d = X(
730
+ const [h, v] = N(""), d = X(
731
731
  () => t.filter(
732
- (u) => !p.trim() || u.name.toLowerCase().includes(p.toLowerCase()) || (u.description || "").toLowerCase().includes(p.toLowerCase())
732
+ (u) => !h.trim() || u.name.toLowerCase().includes(h.toLowerCase()) || (u.description || "").toLowerCase().includes(h.toLowerCase())
733
733
  ),
734
- [t, p]
734
+ [t, h]
735
735
  );
736
736
  return /* @__PURE__ */ n("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
737
737
  /* @__PURE__ */ n("div", { className: "flex shrink-0 items-center gap-2 border-b border-border px-5 py-2.5", children: [
738
738
  /* @__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: [
739
- /* @__PURE__ */ e(cs, { className: "h-3 w-3 text-muted-foreground" }),
739
+ /* @__PURE__ */ e(us, { className: "h-3 w-3 text-muted-foreground" }),
740
740
  /* @__PURE__ */ e(
741
741
  "input",
742
742
  {
743
- value: p,
743
+ value: h,
744
744
  onChange: (u) => v(u.target.value),
745
745
  placeholder: "Search groups…",
746
746
  className: "h-7 flex-1 bg-transparent text-[12px] text-foreground placeholder:text-muted-foreground focus:outline-none"
747
747
  }
748
748
  ),
749
- p && /* @__PURE__ */ e(
749
+ h && /* @__PURE__ */ e(
750
750
  "button",
751
751
  {
752
752
  type: "button",
@@ -760,7 +760,7 @@ function Qs({
760
760
  "button",
761
761
  {
762
762
  type: "button",
763
- onClick: h,
763
+ onClick: p,
764
764
  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",
765
765
  children: [
766
766
  /* @__PURE__ */ e(H, { className: "h-3 w-3" }),
@@ -782,17 +782,17 @@ function Qs({
782
782
  message: r,
783
783
  onRetry: a
784
784
  }
785
- ) : d.length === 0 && t.length === 0 ? /* @__PURE__ */ e(Js, { 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
+ ) : d.length === 0 && t.length === 0 ? /* @__PURE__ */ e(Ys, { onCreate: p }) : d.length === 0 ? /* @__PURE__ */ n("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
786
786
  /* @__PURE__ */ n("div", { className: "text-[12px] text-foreground", children: [
787
787
  'No groups match "',
788
- p,
788
+ h,
789
789
  '"'
790
790
  ] }),
791
791
  /* @__PURE__ */ e("div", { className: "text-[11px] text-muted-foreground", children: "Try a different search." })
792
792
  ] }) : d.map((u) => {
793
793
  var b;
794
794
  return /* @__PURE__ */ e(
795
- Ws,
795
+ Js,
796
796
  {
797
797
  group: u,
798
798
  canDelete: ((b = u.permissions) == null ? void 0 : b.canDelete) ?? u.createdBy === o,
@@ -804,7 +804,7 @@ function Qs({
804
804
  }) })
805
805
  ] });
806
806
  }
807
- function Ws({
807
+ function Js({
808
808
  group: t,
809
809
  canDelete: s,
810
810
  onClick: r,
@@ -823,7 +823,7 @@ function Ws({
823
823
  onClick: r,
824
824
  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",
825
825
  children: [
826
- /* @__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__ */ 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(gr, { className: "h-3.5 w-3.5" }) }),
827
827
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
828
828
  /* @__PURE__ */ e("div", { className: "truncate text-[13px] font-medium text-foreground", children: t.name }),
829
829
  /* @__PURE__ */ n("div", { className: "mt-0.5 flex items-center gap-2 text-[11px] text-muted-foreground", children: [
@@ -863,13 +863,13 @@ function Ws({
863
863
  children: /* @__PURE__ */ e(mt, { className: "h-3 w-3" })
864
864
  }
865
865
  ),
866
- /* @__PURE__ */ e(us, { className: "h-3.5 w-3.5 text-muted-foreground" })
866
+ /* @__PURE__ */ e(ms, { className: "h-3.5 w-3.5 text-muted-foreground" })
867
867
  ] })
868
868
  ]
869
869
  }
870
870
  );
871
871
  }
872
- function Js({ onCreate: t }) {
872
+ function Ys({ onCreate: t }) {
873
873
  return /* @__PURE__ */ n("div", { className: "flex h-full flex-col items-center justify-center gap-2 py-12 text-center", children: [
874
874
  /* @__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" }) }),
875
875
  /* @__PURE__ */ e("div", { className: "text-[13px] font-medium text-foreground", children: "No groups yet" }),
@@ -888,23 +888,23 @@ function Js({ onCreate: t }) {
888
888
  )
889
889
  ] });
890
890
  }
891
- function Ys({
891
+ function Xs({
892
892
  group: t,
893
893
  isTenantViewer: s,
894
894
  canEdit: r,
895
895
  canDelete: a,
896
896
  canManageMembers: o,
897
897
  onBack: l,
898
- onMembersChanged: h,
898
+ onMembersChanged: p,
899
899
  onUpdated: m,
900
- onRequestDelete: p
900
+ onRequestDelete: h
901
901
  }) {
902
902
  const {
903
903
  data: v,
904
904
  isLoading: d,
905
905
  error: u,
906
906
  refetch: b
907
- } = pr(t.id), f = (v == null ? void 0 : v.members) ?? js, w = u ? va(u, "Unable to load members for this group.") : null, y = t.type === "TENANT_GROUP" ? "tenant" : "organization", { users: c } = hr({
907
+ } = pr(t.id), f = (v == null ? void 0 : v.members) ?? Ks, w = u ? va(u, "Unable to load members for this group.") : null, y = t.type === "TENANT_GROUP" ? "tenant" : "organization", { users: c } = fr({
908
908
  type: y,
909
909
  tenantId: t.tenantId || void 0,
910
910
  active: !0,
@@ -912,12 +912,12 @@ function Ys({
912
912
  }), M = X(
913
913
  () => new Set(f.map((g) => g.userId)),
914
914
  [f]
915
- ), S = qs(), P = Hs(), k = zs(), [x, _] = N(!1), [q, j] = N(t.name), [$e, K] = N(!1), [te, Q] = N(t.description || ""), [ae, re] = N(""), [ye, ee] = N(!1), ze = X(() => {
916
- const g = ae.trim().toLowerCase();
915
+ ), S = Hs(), P = js(), k = _s(), [x, _] = N(!1), [q, j] = N(t.name), [$e, K] = N(!1), [ae, Q] = N(t.description || ""), [re, se] = N(""), [we, ee] = N(!1), ze = X(() => {
916
+ const g = re.trim().toLowerCase();
917
917
  return c.filter((R) => !M.has(R.id)).filter(
918
918
  (R) => !g || (R.name || "").toLowerCase().includes(g) || (R.email || "").toLowerCase().includes(g)
919
919
  ).slice(0, 50);
920
- }, [c, M, ae]), se = async () => {
920
+ }, [c, M, re]), ne = async () => {
921
921
  const g = q.trim();
922
922
  if (_(!1), g.length >= 3 && g !== t.name)
923
923
  try {
@@ -927,8 +927,8 @@ function Ys({
927
927
  }), m();
928
928
  } catch {
929
929
  }
930
- }, we = async () => {
931
- const g = te.trim();
930
+ }, Ne = async () => {
931
+ const g = ae.trim();
932
932
  if (K(!1), g !== (t.description || ""))
933
933
  try {
934
934
  await k.mutateAsync({
@@ -937,9 +937,9 @@ function Ys({
937
937
  }), m();
938
938
  } catch {
939
939
  }
940
- }, Ne = async (g) => {
940
+ }, De = async (g) => {
941
941
  if (o) {
942
- re(""), ee(!1);
942
+ se(""), ee(!1);
943
943
  try {
944
944
  await S.mutateAsync({
945
945
  groupId: t.id,
@@ -947,7 +947,7 @@ function Ys({
947
947
  userIds: [g.id],
948
948
  userType: y === "tenant" ? "tenant" : "org"
949
949
  }
950
- }), b(), h();
950
+ }), b(), p();
951
951
  } catch {
952
952
  }
953
953
  }
@@ -957,7 +957,7 @@ function Ys({
957
957
  await P.mutateAsync({
958
958
  groupId: t.id,
959
959
  data: { userIds: [g] }
960
- }), b(), h();
960
+ }), b(), p();
961
961
  } catch {
962
962
  }
963
963
  };
@@ -985,9 +985,9 @@ function Ys({
985
985
  autoFocus: !0,
986
986
  value: q,
987
987
  onChange: (g) => j(g.target.value),
988
- onBlur: se,
988
+ onBlur: ne,
989
989
  onKeyDown: (g) => {
990
- g.key === "Enter" && se(), g.key === "Escape" && (j(t.name), _(!1));
990
+ g.key === "Enter" && ne(), g.key === "Escape" && (j(t.name), _(!1));
991
991
  },
992
992
  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"
993
993
  }
@@ -1017,11 +1017,11 @@ function Ys({
1017
1017
  {
1018
1018
  autoFocus: !0,
1019
1019
  rows: 2,
1020
- value: te,
1020
+ value: ae,
1021
1021
  onChange: (g) => Q(g.target.value),
1022
1022
  maxLength: 200,
1023
1023
  onKeyDown: (g) => {
1024
- g.key === "Escape" && (Q(t.description || ""), K(!1)), g.key === "Enter" && (g.metaKey || g.ctrlKey) && we();
1024
+ g.key === "Escape" && (Q(t.description || ""), K(!1)), g.key === "Enter" && (g.metaKey || g.ctrlKey) && Ne();
1025
1025
  },
1026
1026
  placeholder: "What is this group for?",
1027
1027
  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"
@@ -1029,7 +1029,7 @@ function Ys({
1029
1029
  ),
1030
1030
  /* @__PURE__ */ n("div", { className: "mt-1.5 flex items-center justify-between", children: [
1031
1031
  /* @__PURE__ */ n("span", { className: "text-[10.5px] text-muted-foreground", children: [
1032
- te.length,
1032
+ ae.length,
1033
1033
  "/200 · Esc to cancel · ⌘↩ to save"
1034
1034
  ] }),
1035
1035
  /* @__PURE__ */ n("div", { className: "flex items-center gap-1.5", children: [
@@ -1048,7 +1048,7 @@ function Ys({
1048
1048
  "button",
1049
1049
  {
1050
1050
  type: "button",
1051
- onClick: we,
1051
+ onClick: Ne,
1052
1052
  className: "inline-flex h-6 items-center rounded-[5px] bg-foreground px-2 text-[11px] font-medium text-background hover:opacity-90",
1053
1053
  children: "Save"
1054
1054
  }
@@ -1075,15 +1075,15 @@ function Ys({
1075
1075
  }
1076
1076
  ) }),
1077
1077
  o && /* @__PURE__ */ e(
1078
- Zs,
1078
+ en,
1079
1079
  {
1080
- query: ae,
1081
- setQuery: re,
1082
- open: ye,
1080
+ query: re,
1081
+ setQuery: se,
1082
+ open: we,
1083
1083
  setOpen: ee,
1084
1084
  candidates: ze,
1085
1085
  showKindChip: !s,
1086
- onAdd: Ne,
1086
+ onAdd: De,
1087
1087
  busy: S.isPending
1088
1088
  }
1089
1089
  ),
@@ -1104,15 +1104,15 @@ function Ys({
1104
1104
  /* @__PURE__ */ e("div", { className: "text-[12px] text-foreground", children: "No members yet" }),
1105
1105
  /* @__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." })
1106
1106
  ] }) : f.map((g) => {
1107
- var R, ne, W, oe, J, De;
1107
+ var R, oe, W, ie, J, Ce;
1108
1108
  return /* @__PURE__ */ n(
1109
1109
  "div",
1110
1110
  {
1111
1111
  className: "group flex items-center gap-2 border-b border-border/60 px-5 py-2",
1112
1112
  children: [
1113
- /* @__PURE__ */ e(wa, { name: ((R = g.user) == null ? void 0 : R.name) || ((ne = g.user) == null ? void 0 : ne.email) || "?" }),
1113
+ /* @__PURE__ */ e(wa, { name: ((R = g.user) == null ? void 0 : R.name) || ((oe = g.user) == null ? void 0 : oe.email) || "?" }),
1114
1114
  /* @__PURE__ */ n("div", { className: "min-w-0 flex-1", children: [
1115
- /* @__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
+ /* @__PURE__ */ e("div", { className: "truncate text-[12.5px] font-medium text-foreground", children: ((W = g.user) == null ? void 0 : W.name) || ((ie = g.user) == null ? void 0 : ie.email) || "Unknown" }),
1116
1116
  ((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 })
1117
1117
  ] }),
1118
1118
  !s && /* @__PURE__ */ e("span", { className: "text-[10px] uppercase tracking-[0.06em] text-muted-foreground", children: g.userType }),
@@ -1122,7 +1122,7 @@ function Ys({
1122
1122
  type: "button",
1123
1123
  onClick: () => _e(g.userId),
1124
1124
  disabled: !o || P.isPending,
1125
- "aria-label": `Remove ${((De = g.user) == null ? void 0 : De.name) || "member"}`,
1125
+ "aria-label": `Remove ${((Ce = g.user) == null ? void 0 : Ce.name) || "member"}`,
1126
1126
  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",
1127
1127
  children: /* @__PURE__ */ e(ca, { className: "h-3 w-3" })
1128
1128
  }
@@ -1136,7 +1136,7 @@ function Ys({
1136
1136
  "button",
1137
1137
  {
1138
1138
  type: "button",
1139
- onClick: p,
1139
+ onClick: h,
1140
1140
  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",
1141
1141
  children: [
1142
1142
  /* @__PURE__ */ e(mt, { className: "h-3 w-3" }),
@@ -1146,18 +1146,18 @@ function Ys({
1146
1146
  ) })
1147
1147
  ] });
1148
1148
  }
1149
- function Xs({
1149
+ function Zs({
1150
1150
  isTenantUser: t,
1151
1151
  tenantId: s,
1152
1152
  onCancel: r,
1153
1153
  onCreated: a
1154
1154
  }) {
1155
- 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
+ const [o, l] = N(""), [p, m] = N(""), [h, v] = N(null), d = zs(), u = o.trim().length >= 3 && o.trim().length <= 50, b = async () => {
1156
1156
  if (!u) return;
1157
1157
  v(null);
1158
1158
  const f = {
1159
1159
  name: o.trim(),
1160
- description: h.trim() || void 0,
1160
+ description: p.trim() || void 0,
1161
1161
  type: t ? "TENANT_GROUP" : "ORG_GROUP",
1162
1162
  ...t && s ? { tenantId: s } : {}
1163
1163
  };
@@ -1189,7 +1189,7 @@ function Xs({
1189
1189
  "textarea",
1190
1190
  {
1191
1191
  rows: 2,
1192
- value: h,
1192
+ value: p,
1193
1193
  onChange: (f) => m(f.target.value),
1194
1194
  maxLength: 200,
1195
1195
  placeholder: "What is this group for?",
@@ -1197,11 +1197,11 @@ function Xs({
1197
1197
  }
1198
1198
  ),
1199
1199
  /* @__PURE__ */ n("div", { className: "mt-1 flex justify-end text-[10.5px] text-muted-foreground", children: [
1200
- h.length,
1200
+ p.length,
1201
1201
  "/200"
1202
1202
  ] })
1203
1203
  ] }),
1204
- 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
+ h && /* @__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: h })
1205
1205
  ] }),
1206
1206
  /* @__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: [
1207
1207
  /* @__PURE__ */ e(
@@ -1233,24 +1233,24 @@ function Xs({
1233
1233
  ] })
1234
1234
  ] });
1235
1235
  }
1236
- function Zs({
1236
+ function en({
1237
1237
  query: t,
1238
1238
  setQuery: s,
1239
1239
  open: r,
1240
1240
  setOpen: a,
1241
1241
  candidates: o,
1242
1242
  showKindChip: l,
1243
- onAdd: h,
1243
+ onAdd: p,
1244
1244
  busy: m
1245
1245
  }) {
1246
- const p = Qt(null), v = Qt(null), [d, u] = N(null);
1247
- Xr(() => {
1246
+ const h = Qt(null), v = Qt(null), [d, u] = N(null);
1247
+ Zr(() => {
1248
1248
  if (!r) {
1249
1249
  u(null);
1250
1250
  return;
1251
1251
  }
1252
1252
  const f = () => {
1253
- const w = p.current;
1253
+ const w = h.current;
1254
1254
  if (!w) return;
1255
1255
  const y = w.getBoundingClientRect(), c = 240, S = window.innerHeight - y.bottom < c + 16 && y.top > c;
1256
1256
  u({
@@ -1268,7 +1268,7 @@ function Zs({
1268
1268
  const f = (w) => {
1269
1269
  var c, M;
1270
1270
  const y = w.target;
1271
- (c = p.current) != null && c.contains(y) || (M = v.current) != null && M.contains(y) || a(!1);
1271
+ (c = h.current) != null && c.contains(y) || (M = v.current) != null && M.contains(y) || a(!1);
1272
1272
  };
1273
1273
  return document.addEventListener("mousedown", f), () => document.removeEventListener("mousedown", f);
1274
1274
  }, [r, a]);
@@ -1277,10 +1277,10 @@ function Zs({
1277
1277
  /* @__PURE__ */ n(
1278
1278
  "div",
1279
1279
  {
1280
- ref: p,
1280
+ ref: h,
1281
1281
  className: "flex items-center gap-2 rounded-[5px] border border-border bg-background px-2 focus-within:border-foreground/40",
1282
1282
  children: [
1283
- /* @__PURE__ */ e(ws, { className: "h-3 w-3 text-muted-foreground" }),
1283
+ /* @__PURE__ */ e(Ns, { className: "h-3 w-3 text-muted-foreground" }),
1284
1284
  /* @__PURE__ */ e(
1285
1285
  "input",
1286
1286
  {
@@ -1297,7 +1297,7 @@ function Zs({
1297
1297
  ]
1298
1298
  }
1299
1299
  ),
1300
- b && typeof document < "u" && es(
1300
+ b && typeof document < "u" && ts(
1301
1301
  /* @__PURE__ */ e(
1302
1302
  "div",
1303
1303
  {
@@ -1314,7 +1314,7 @@ function Zs({
1314
1314
  "button",
1315
1315
  {
1316
1316
  type: "button",
1317
- onClick: () => h(f),
1317
+ onClick: () => p(f),
1318
1318
  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",
1319
1319
  children: [
1320
1320
  /* @__PURE__ */ e(wa, { name: f.name || f.email || "?" }),
@@ -1368,22 +1368,22 @@ function wa({ name: t }) {
1368
1368
  return /* @__PURE__ */ e(ba, { className: "h-6 w-6 shrink-0", children: /* @__PURE__ */ e(xa, { className: "text-[9px] font-semibold", children: s || "?" }) });
1369
1369
  }
1370
1370
  function pe(t, s, r) {
1371
- var l, h;
1371
+ var l, p;
1372
1372
  const a = (t.controls || []).find(
1373
1373
  (m) => m.id === r
1374
1374
  );
1375
1375
  if (a)
1376
1376
  return a.label;
1377
- const o = (h = (l = aa(t, s)) == null ? void 0 : l.controls) == null ? void 0 : h.find(
1377
+ const o = (p = (l = aa(t, s)) == null ? void 0 : l.controls) == null ? void 0 : p.find(
1378
1378
  (m) => m.id === r
1379
1379
  );
1380
1380
  return (o == null ? void 0 : o.label) || r;
1381
1381
  }
1382
- function he(t, s) {
1382
+ function fe(t, s) {
1383
1383
  var r;
1384
1384
  return ((r = aa(t, s)) == null ? void 0 : r.title) || s;
1385
1385
  }
1386
- function en(t) {
1386
+ function tn(t) {
1387
1387
  const { errors: s, dashboard: r } = t;
1388
1388
  if (!r)
1389
1389
  return s;
@@ -1396,7 +1396,7 @@ function en(t) {
1396
1396
  const [, d, u] = l, b = `${d}:${u}:missing-metric`;
1397
1397
  a.has(b) || a.set(
1398
1398
  b,
1399
- `"${he(r, d)}" has an outdated "${pe(
1399
+ `"${fe(r, d)}" has an outdated "${pe(
1400
1400
  r,
1401
1401
  d,
1402
1402
  u
@@ -1404,14 +1404,14 @@ function en(t) {
1404
1404
  );
1405
1405
  continue;
1406
1406
  }
1407
- const h = o.match(
1407
+ const p = o.match(
1408
1408
  /^Card '(.+)' binding for control '(.+)' maps to missing group-by field '(.+)'\.$/
1409
1409
  );
1410
- if (h) {
1411
- const [, d, u] = h, b = `${d}:${u}:missing-group-by`;
1410
+ if (p) {
1411
+ const [, d, u] = p, b = `${d}:${u}:missing-group-by`;
1412
1412
  a.has(b) || a.set(
1413
1413
  b,
1414
- `"${he(r, d)}" has an outdated "${pe(
1414
+ `"${fe(r, d)}" has an outdated "${pe(
1415
1415
  r,
1416
1416
  d,
1417
1417
  u
@@ -1426,7 +1426,7 @@ function en(t) {
1426
1426
  const [, d, u] = m, b = `${d}:${u}:invalid-metric`;
1427
1427
  a.has(b) || a.set(
1428
1428
  b,
1429
- `"${he(r, d)}" has an invalid "${pe(
1429
+ `"${fe(r, d)}" has an invalid "${pe(
1430
1430
  r,
1431
1431
  d,
1432
1432
  u
@@ -1434,14 +1434,14 @@ function en(t) {
1434
1434
  );
1435
1435
  continue;
1436
1436
  }
1437
- const p = o.match(
1437
+ const h = o.match(
1438
1438
  /^Card '(.+)' binding for control '(.+)' maps to an invalid group-by target\.$/
1439
1439
  );
1440
- if (p) {
1441
- const [, d, u] = p, b = `${d}:${u}:invalid-group-by`;
1440
+ if (h) {
1441
+ const [, d, u] = h, b = `${d}:${u}:invalid-group-by`;
1442
1442
  a.has(b) || a.set(
1443
1443
  b,
1444
- `"${he(r, d)}" has an invalid "${pe(
1444
+ `"${fe(r, d)}" has an invalid "${pe(
1445
1445
  r,
1446
1446
  d,
1447
1447
  u
@@ -1456,7 +1456,7 @@ function en(t) {
1456
1456
  const [, d, u] = v, b = `${d}:${u}:missing-temporal-group-by`;
1457
1457
  a.has(b) || a.set(
1458
1458
  b,
1459
- `"${he(r, d)}" can no longer use "${pe(
1459
+ `"${fe(r, d)}" can no longer use "${pe(
1460
1460
  r,
1461
1461
  d,
1462
1462
  u
@@ -1468,16 +1468,16 @@ function en(t) {
1468
1468
  }
1469
1469
  return Array.from(a.values());
1470
1470
  }
1471
- function tn({
1471
+ function an({
1472
1472
  visible: t,
1473
1473
  onSelect: s
1474
1474
  }) {
1475
1475
  return t ? /* @__PURE__ */ n(O, { onSelect: s, children: [
1476
- /* @__PURE__ */ e(gr, { className: "h-3.5 w-3.5" }),
1476
+ /* @__PURE__ */ e(br, { className: "h-3.5 w-3.5" }),
1477
1477
  "Schedule email report"
1478
1478
  ] }) : null;
1479
1479
  }
1480
- function an({
1480
+ function rn({
1481
1481
  scheduleReportVisible: t,
1482
1482
  analyticalBriefingVisible: s,
1483
1483
  onScheduleReport: r,
@@ -1485,7 +1485,7 @@ function an({
1485
1485
  }) {
1486
1486
  return /* @__PURE__ */ n(T, { children: [
1487
1487
  /* @__PURE__ */ e(
1488
- tn,
1488
+ an,
1489
1489
  {
1490
1490
  visible: t,
1491
1491
  onSelect: r
@@ -1503,44 +1503,44 @@ function Xt(t, s) {
1503
1503
  semanticExecutionPayload: ot(s)
1504
1504
  };
1505
1505
  }
1506
- function kn() {
1506
+ function Sn() {
1507
1507
  var Pt, Ut, Rt, Vt, Ft, Ot, Tt;
1508
- ts(), as();
1508
+ as(), rs();
1509
1509
  const {
1510
1510
  authToken: t,
1511
1511
  tokenProps: s,
1512
1512
  id: r,
1513
1513
  showBriefings: a
1514
- } = z(), o = br(), { isLocalDev: l } = xr(), { openBrandStudioPreview: h } = vr(), { permissions: m } = Ms(), p = yr(), { isLoading: v } = wr(), d = D((i) => i.theme), u = D((i) => i.isDownloadingPdf), b = D(
1514
+ } = z(), o = xr(), { isLocalDev: l } = vr(), { openBrandStudioPreview: p } = yr(), { permissions: m } = Es(), h = wr(), { isLoading: v } = Nr(), d = D((i) => i.theme), u = D((i) => i.isDownloadingPdf), b = D(
1515
1515
  (i) => i.dashboardAssistantDraftScopeKey
1516
1516
  ), 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(
1517
1517
  (i) => i.id === M
1518
- ), P = ja(S), k = P ? (Ut = S == null ? void 0 : S.document) == null ? void 0 : Ut.page : void 0, x = D(
1518
+ ), P = Ka(S), k = P ? (Ut = S == null ? void 0 : S.document) == null ? void 0 : Ut.page : void 0, x = D(
1519
1519
  (i) => i.isDashboardEditing
1520
- ), { setDashboardTitle: _ } = D((i) => i.actions), [q, j] = N(!1), [$e, 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
+ ), { setDashboardTitle: _ } = D((i) => i.actions), [q, j] = N(!1), [$e, K] = N(!1), [ae, Q] = N(!1), [re, se] = N(!1), [we, ee] = N(null), [ze, ne] = N(!1), [Ne, De] = N(!1), [_e, G] = N(!1), [g, R] = N(null), [oe, W] = N([]), [ie, J] = N(!1), [Ce, bt] = N(!1), xt = D((i) => i.filterValues), E = D((i) => i.isVisualEditing);
1521
1521
  Bt((i) => i.card);
1522
- const ie = Fe(
1522
+ const de = Fe(
1523
1523
  (i) => i.selectedDashboard
1524
- ), Ce = Fe(
1524
+ ), ke = Fe(
1525
1525
  (i) => i.initialDashboard
1526
1526
  );
1527
1527
  Fe((i) => i.selectedVisual), D((i) => i.selectedFrameId), Bt((i) => i.frame);
1528
- 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
+ const Se = de ? (Vt = de == null ? void 0 : de.permissions) == null ? void 0 : Vt.canEdit : (Rt = ke == null ? void 0 : ke.permissions) == null ? void 0 : Rt.canEdit, vt = D(
1529
1529
  (i) => i.showDashboardJSON
1530
1530
  ), qe = D((i) => i.onSaveFunction), {
1531
1531
  setIsDashboardEditing: yt,
1532
1532
  setShowDashboardJSON: wt
1533
1533
  } = D((i) => i.actions), { setInitialDashboard: Nt, clearSelectedDashboard: He } = Fe(
1534
1534
  (i) => i.actions
1535
- ), 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), B = ie || Ce, Ie = Sr({
1535
+ ), le = !!s.orgUserId || !!(s.tenantId && s.endUserId && s.endUserEmail), { resources: Ie } = Dr(at.DASHBOARD), { data: je } = Cr(), Na = ((Ft = je == null ? void 0 : je.preference) == null ? void 0 : Ft.defaultDashboardId) || null, { mutate: Da, isPending: Ca } = kr(), { currentUser: ka } = ut(), Sa = Sr(ka), B = de || ke, te = Ir({
1536
1536
  config: s.config,
1537
- canNavigateDashboardHub: de,
1537
+ canNavigateDashboardHub: le,
1538
1538
  canShareDashboard: ((Ot = B == null ? void 0 : B.permissions) == null ? void 0 : Ot.canShare) === !0,
1539
1539
  canManageGroups: Sa
1540
1540
  }), Dt = B ? {
1541
1541
  id: B.id,
1542
1542
  title: (c == null ? void 0 : c.title) || B.title || "Dashboard"
1543
- } : 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) => {
1543
+ } : null, { handleAddNewFrame: Ia } = Mr(), [Ke, Qe] = N(!1), [Ma, ce] = N(!1), [We, Me] = N("close"), ue = Er(at.DASHBOARD), [V, Ee] = N(null), Ea = async (i, I) => {
1544
1544
  if (!(c != null && c.id)) {
1545
1545
  console.log("No dashboard ID found");
1546
1546
  return;
@@ -1549,7 +1549,7 @@ function kn() {
1549
1549
  dashboardId: c.id,
1550
1550
  newTitle: i,
1551
1551
  previousTitle: I
1552
- }), ce.mutate(
1552
+ }), ue.mutate(
1553
1553
  {
1554
1554
  resourceId: c.id,
1555
1555
  data: { title: i }
@@ -1565,18 +1565,18 @@ function kn() {
1565
1565
  );
1566
1566
  };
1567
1567
  Be(() => {
1568
- if (Se && Se.length > 0) {
1568
+ if (Ie && Ie.length > 0) {
1569
1569
  const i = c == null ? void 0 : c.id;
1570
1570
  if (i) {
1571
- const I = Se.find(
1571
+ const I = Ie.find(
1572
1572
  (F) => F.id === i
1573
1573
  );
1574
1574
  I && Nt(I);
1575
1575
  }
1576
1576
  }
1577
- }, [Se, c == null ? void 0 : c.id, Nt]);
1578
- const ue = s.orgUserId || s.tenantId, Je = X(
1579
- () => rn({
1577
+ }, [Ie, c == null ? void 0 : c.id, Nt]);
1578
+ const me = s.orgUserId || s.tenantId, Je = X(
1579
+ () => sn({
1580
1580
  accessToken: t == null ? void 0 : t.accessToken,
1581
1581
  dashboardId: (c == null ? void 0 : c.id) || r || s.dashboard_id,
1582
1582
  selectedSheetId: P ? M : void 0,
@@ -1595,7 +1595,7 @@ function kn() {
1595
1595
  d,
1596
1596
  s.dashboard_id
1597
1597
  ]
1598
- ), Ct = x && !E && ue && ke, { setDashboard: kt } = D((i) => i.actions), St = D(
1598
+ ), Ct = x && !E && me && Se, { setDashboard: kt } = D((i) => i.actions), St = D(
1599
1599
  (i) => i.semanticExecutionPayload
1600
1600
  ), La = () => {
1601
1601
  yt(!0);
@@ -1626,26 +1626,26 @@ function kn() {
1626
1626
  300,
1627
1627
  1e3,
1628
1628
  rt
1629
- ), Mt = Zr(() => Le ? rt(c) !== rt(Le) : !1, [c, Le]), Et = It || Aa, Pe = Ke || ce.isPending, Pa = () => {
1630
- Mt() ? (Me("close"), le(!0)) : (Ye(), Ae());
1629
+ ), Mt = es(() => Le ? rt(c) !== rt(Le) : !1, [c, Le]), Et = It || Aa, Pe = Ke || ue.isPending, Pa = () => {
1630
+ Mt() ? (Me("close"), ce(!0)) : (Ye(), Ae());
1631
1631
  }, Ua = async () => {
1632
1632
  await Xe({
1633
1633
  closeAfterSave: !0,
1634
1634
  navigateHomeAfterSave: We === "home"
1635
1635
  });
1636
1636
  }, Ra = () => {
1637
- const i = We === "home" && !!de;
1637
+ const i = We === "home" && !!le;
1638
1638
  V && kt(V.dashboard, {
1639
1639
  semanticExecutionPayload: V.semanticExecutionPayload
1640
- }), Ye(), i && He(), Me("close"), le(!1), Ae();
1640
+ }), Ye(), i && He(), Me("close"), ce(!1), Ae();
1641
1641
  }, Va = () => {
1642
1642
  V && (kt(V.dashboard, {
1643
1643
  semanticExecutionPayload: V.semanticExecutionPayload
1644
1644
  }), Ae());
1645
1645
  }, Fa = () => {
1646
- if (de) {
1646
+ if (le) {
1647
1647
  if (x && Mt()) {
1648
- Me("home"), le(!0);
1648
+ Me("home"), ce(!0);
1649
1649
  return;
1650
1650
  }
1651
1651
  He();
@@ -1655,24 +1655,24 @@ function kn() {
1655
1655
  const I = D.getState().dashboard;
1656
1656
  if (!I)
1657
1657
  return;
1658
- const F = (i == null ? void 0 : i.closeAfterSave) ?? oe, Ze = (i == null ? void 0 : i.navigateHomeAfterSave) ?? !1;
1659
- J(F), F && le(!1);
1658
+ const F = (i == null ? void 0 : i.closeAfterSave) ?? ie, Ze = (i == null ? void 0 : i.navigateHomeAfterSave) ?? !1;
1659
+ J(F), F && ce(!1);
1660
1660
  const et = ot(I);
1661
1661
  G(!0), R(null), W([]), Qe(!0);
1662
- const $a = {
1662
+ const za = {
1663
1663
  template: I
1664
1664
  };
1665
- ce.mutate(
1665
+ ue.mutate(
1666
1666
  {
1667
1667
  resourceId: I.id,
1668
- data: $a
1668
+ data: za
1669
1669
  },
1670
1670
  {
1671
1671
  onSuccess: (L) => {
1672
1672
  var Ue, Re, Gt;
1673
1673
  const Y = (L == null ? void 0 : L.id) || ((Ue = L == null ? void 0 : L.dashboard) == null ? void 0 : Ue.id) || ((Re = L == null ? void 0 : L.resource) == null ? void 0 : Re.id) || ((Gt = L == null ? void 0 : L.template) == null ? void 0 : Gt.id) || null;
1674
1674
  if (!I.id && Y) {
1675
- const tt = Xa.getState(), Ve = tt.pendingDashboardDraftMigration;
1675
+ const tt = Za.getState(), Ve = tt.pendingDashboardDraftMigration;
1676
1676
  (Ve == null ? void 0 : Ve.scopeKey) === b ? tt.actions.setPendingDashboardDraftMigrationExpectedDashboardId(
1677
1677
  Y
1678
1678
  ) : Ve && tt.actions.clearPendingDashboardDraftMigration();
@@ -1682,7 +1682,7 @@ function kn() {
1682
1682
  et,
1683
1683
  D.getState().semanticExecutionPayload
1684
1684
  )
1685
- ), G(!1), J(!1), F && (Ye(), Ae(), Ze && de && He()), Me("close");
1685
+ ), G(!1), J(!1), F && (Ye(), Ae(), Ze && le && He()), Me("close");
1686
1686
  },
1687
1687
  onError: (L) => {
1688
1688
  Qe(!1), R("Failed to save dashboard. Please try again.");
@@ -1692,7 +1692,7 @@ function kn() {
1692
1692
  (Re) => typeof Re == "string"
1693
1693
  ) : [];
1694
1694
  W(
1695
- en({
1695
+ tn({
1696
1696
  errors: Ue,
1697
1697
  dashboard: I || void 0
1698
1698
  })
@@ -1708,7 +1708,7 @@ function kn() {
1708
1708
  j(!1);
1709
1709
  return;
1710
1710
  }
1711
- const I = JSON.stringify(i), F = D.getState(), Ze = pa({
1711
+ const I = JSON.stringify(i), F = D.getState(), Ze = ha({
1712
1712
  dashboard: i,
1713
1713
  dashboardInputValues: F.dashboardInputValues,
1714
1714
  filterValues: xt,
@@ -1728,28 +1728,28 @@ function kn() {
1728
1728
  ), C.success("Lens saved"), qe == null || qe(i), j(!1);
1729
1729
  }
1730
1730
  const Lt = (y == null ? void 0 : y.name) || c.title;
1731
- ce.isPending && console.log("Title during update:", {
1731
+ ue.isPending && console.log("Title during update:", {
1732
1732
  title: Lt,
1733
1733
  dashboardStateTitle: c.title,
1734
1734
  dashboardId: c == null ? void 0 : c.id,
1735
1735
  currentLensName: y == null ? void 0 : y.name
1736
1736
  });
1737
- const Ta = de && !!(t != null && t.accessToken) && !!(s != null && s.apiServiceUrl), Ga = p && Ie.showDashboardHub, $ = (c == null ? void 0 : c.id) || null, At = Er(
1737
+ const Ta = le && !!(t != null && t.accessToken) && !!(s != null && s.apiServiceUrl), Ga = te.showDashboardHub && Ta, Ba = h && te.showDashboardHub, $ = (c == null ? void 0 : c.id) || null, At = Lr(
1738
1738
  (Tt = s.config) == null ? void 0 : Tt.showBriefings,
1739
1739
  a
1740
- ), me = !!$ && Na === $, Ba = () => {
1740
+ ), he = !!$ && Na === $, $a = () => {
1741
1741
  $ && Da({
1742
- dashboardId: me ? null : $
1742
+ dashboardId: he ? null : $
1743
1743
  });
1744
1744
  };
1745
- return !p && !E ? null : /* @__PURE__ */ n(
1745
+ return !h && !E ? null : /* @__PURE__ */ n(
1746
1746
  "div",
1747
1747
  {
1748
1748
  className: "flex h-11 shrink-0 items-center justify-between gap-2 overflow-x-auto border-b px-4 py-2",
1749
1749
  role: "dashboard-controls",
1750
1750
  children: [
1751
1751
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1752
- Ga && !E && /* @__PURE__ */ e(
1752
+ Ba && !E && /* @__PURE__ */ e(
1753
1753
  zt,
1754
1754
  {
1755
1755
  "aria-label": "Dashboard Hub",
@@ -1760,7 +1760,7 @@ function kn() {
1760
1760
  children: /* @__PURE__ */ e(na, { className: "h-3.5 w-3.5" })
1761
1761
  }
1762
1762
  ),
1763
- !E && p && (v ? /* @__PURE__ */ e(
1763
+ !E && h && (v ? /* @__PURE__ */ e(
1764
1764
  "div",
1765
1765
  {
1766
1766
  className: "h-4 w-28 animate-pulse rounded-md bg-muted/70",
@@ -1770,30 +1770,30 @@ function kn() {
1770
1770
  }
1771
1771
  ) : /* @__PURE__ */ n(T, { children: [
1772
1772
  /* @__PURE__ */ e(
1773
- Lr,
1773
+ Ar,
1774
1774
  {
1775
1775
  value: Lt || "Untitled Dashboard",
1776
1776
  onSave: (i) => {
1777
1777
  console.log("EditableText onSave called:", {
1778
1778
  newTitle: i,
1779
- canEditDashboard: ke,
1779
+ canEditDashboard: Se,
1780
1780
  dashboardId: c == null ? void 0 : c.id
1781
1781
  });
1782
1782
  const I = (c == null ? void 0 : c.title) || "";
1783
1783
  _(i), Ea(i, I);
1784
1784
  },
1785
- isEditable: Ar({
1785
+ isEditable: Pr({
1786
1786
  isDashboardEditing: x,
1787
- canEditDashboard: ke === !0,
1787
+ canEditDashboard: Se === !0,
1788
1788
  hasCurrentLens: !!y
1789
1789
  }),
1790
1790
  displayClassName: "text-[13px] font-medium",
1791
1791
  inputClassName: "text-[13px] font-medium",
1792
1792
  placeholder: "Dashboard Title",
1793
- isPending: ce.isPending
1793
+ isPending: ue.isPending
1794
1794
  }
1795
1795
  ),
1796
- me && /* @__PURE__ */ e(
1796
+ te.showDashboardHub && he && /* @__PURE__ */ e(
1797
1797
  "span",
1798
1798
  {
1799
1799
  className: "shrink-0 rounded-[4px] border border-border/60 px-1.5 py-px text-[10px] font-medium uppercase tracking-[0.06em] text-muted-foreground",
@@ -1801,42 +1801,42 @@ function kn() {
1801
1801
  children: "Default"
1802
1802
  }
1803
1803
  ),
1804
- Ta && $ && /* @__PURE__ */ e(Ka, { children: /* @__PURE__ */ n(Qa, { children: [
1805
- /* @__PURE__ */ e(Wa, { asChild: !0, children: /* @__PURE__ */ e(
1804
+ Ga && $ && /* @__PURE__ */ e(Qa, { children: /* @__PURE__ */ n(Wa, { children: [
1805
+ /* @__PURE__ */ e(Ja, { asChild: !0, children: /* @__PURE__ */ e(
1806
1806
  U,
1807
1807
  {
1808
1808
  variant: "ghost",
1809
1809
  size: "xs",
1810
- onClick: Ba,
1810
+ onClick: $a,
1811
1811
  disabled: Ca || !(t != null && t.accessToken) || !(s != null && s.apiServiceUrl),
1812
1812
  className: "w-7 px-0 text-muted-foreground hover:text-foreground",
1813
- "aria-label": me ? "Clear default dashboard" : "Set as default dashboard",
1814
- children: me ? /* @__PURE__ */ e(Pr, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ e(Ur, { className: "h-3.5 w-3.5" })
1813
+ "aria-label": he ? "Clear default dashboard" : "Set as default dashboard",
1814
+ children: he ? /* @__PURE__ */ e(Ur, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ e(Rr, { className: "h-3.5 w-3.5" })
1815
1815
  }
1816
1816
  ) }),
1817
- /* @__PURE__ */ e(Ja, { children: /* @__PURE__ */ e("p", { children: me ? "Clear default" : "Set as default" }) })
1817
+ /* @__PURE__ */ e(Ya, { children: /* @__PURE__ */ e("p", { children: he ? "Clear default" : "Set as default" }) })
1818
1818
  ] }) })
1819
1819
  ] }))
1820
1820
  ] }),
1821
1821
  /* @__PURE__ */ n("div", { className: "flex items-center gap-2", children: [
1822
1822
  E && /* @__PURE__ */ n(T, { children: [
1823
- /* @__PURE__ */ e(rs, {}),
1824
- /* @__PURE__ */ e(ss, {})
1823
+ /* @__PURE__ */ e(ss, {}),
1824
+ /* @__PURE__ */ e(ns, {})
1825
1825
  ] }),
1826
- !E && p && Ie.showDashboardSharing && /* @__PURE__ */ n(
1826
+ !E && h && te.showDashboardSharing && /* @__PURE__ */ n(
1827
1827
  U,
1828
1828
  {
1829
1829
  variant: "outline",
1830
1830
  size: "xs",
1831
1831
  onClick: () => K(!0),
1832
1832
  children: [
1833
- /* @__PURE__ */ e(Rr, { className: "h-3.5 w-3.5" }),
1833
+ /* @__PURE__ */ e(Vr, { className: "h-3.5 w-3.5" }),
1834
1834
  "Share"
1835
1835
  ]
1836
1836
  }
1837
1837
  ),
1838
- !E && x && m.canUseFilters && p && /* @__PURE__ */ e(ns, {}),
1839
- x && !E && ue && y && l && p && /* @__PURE__ */ n(
1838
+ !E && x && m.canUseFilters && h && /* @__PURE__ */ e(os, {}),
1839
+ x && !E && me && y && l && h && /* @__PURE__ */ n(
1840
1840
  U,
1841
1841
  {
1842
1842
  variant: "secondary",
@@ -1849,7 +1849,7 @@ function kn() {
1849
1849
  ]
1850
1850
  }
1851
1851
  ),
1852
- x && !E && p && !P && /* @__PURE__ */ n("div", { className: "inline-flex h-7 items-stretch overflow-hidden rounded-control border border-input bg-background", children: [
1852
+ x && !E && h && !P && /* @__PURE__ */ n("div", { className: "inline-flex h-7 items-stretch overflow-hidden rounded-control border border-input bg-background", children: [
1853
1853
  /* @__PURE__ */ n(
1854
1854
  U,
1855
1855
  {
@@ -1873,7 +1873,7 @@ function kn() {
1873
1873
  className: "h-full w-7 rounded-none border-0 border-l border-border/60 px-0 shadow-none hover:bg-accent",
1874
1874
  "aria-label": "Open visual options",
1875
1875
  disabled: !x,
1876
- children: /* @__PURE__ */ e(Yr, { className: "h-3.5 w-3.5" })
1876
+ children: /* @__PURE__ */ e(Xr, { className: "h-3.5 w-3.5" })
1877
1877
  }
1878
1878
  ) }),
1879
1879
  /* @__PURE__ */ e(
@@ -1889,18 +1889,18 @@ function kn() {
1889
1889
  )
1890
1890
  ] }),
1891
1891
  /* @__PURE__ */ e(
1892
- os,
1892
+ is,
1893
1893
  {
1894
- open: De,
1894
+ open: Ce,
1895
1895
  onOpenChange: bt
1896
1896
  }
1897
1897
  )
1898
1898
  ] }),
1899
- !E && !x && ke && p && /* @__PURE__ */ n(U, { size: "xs", onClick: La, children: [
1900
- /* @__PURE__ */ e(Vr, { className: "h-3.5 w-3.5" }),
1899
+ !E && !x && Se && h && /* @__PURE__ */ n(U, { size: "xs", onClick: La, children: [
1900
+ /* @__PURE__ */ e(Fr, { className: "h-3.5 w-3.5" }),
1901
1901
  "Edit"
1902
1902
  ] }),
1903
- Ct && p && It && /* @__PURE__ */ n(
1903
+ Ct && h && It && /* @__PURE__ */ n(
1904
1904
  U,
1905
1905
  {
1906
1906
  variant: "outline",
@@ -1908,16 +1908,16 @@ function kn() {
1908
1908
  onClick: Va,
1909
1909
  disabled: Pe,
1910
1910
  children: [
1911
- /* @__PURE__ */ e(Fr, { className: "h-3.5 w-3.5" }),
1911
+ /* @__PURE__ */ e(Or, { className: "h-3.5 w-3.5" }),
1912
1912
  "Undo"
1913
1913
  ]
1914
1914
  }
1915
1915
  ),
1916
- Ct && p && /* @__PURE__ */ n(
1916
+ Ct && h && /* @__PURE__ */ n(
1917
1917
  U,
1918
1918
  {
1919
1919
  size: "xs",
1920
- className: ge(!Et && "opacity-60"),
1920
+ className: be(!Et && "opacity-60"),
1921
1921
  disabled: Pe || !Et,
1922
1922
  onClick: () => Xe(),
1923
1923
  children: [
@@ -1926,13 +1926,13 @@ function kn() {
1926
1926
  ]
1927
1927
  }
1928
1928
  ),
1929
- x && !E && p && /* @__PURE__ */ n(U, { variant: "outline", size: "xs", onClick: Pa, children: [
1929
+ x && !E && h && /* @__PURE__ */ n(U, { variant: "outline", size: "xs", onClick: Pa, children: [
1930
1930
  /* @__PURE__ */ e(oa, { className: "h-3.5 w-3.5" }),
1931
1931
  "Close"
1932
1932
  ] }),
1933
- !E && p && /* @__PURE__ */ e("div", { className: "ml-2", children: /* @__PURE__ */ e(is, {}) }),
1934
- !E && l && /* @__PURE__ */ e(Ns, {}),
1935
- !E && p && /* @__PURE__ */ n(_t, { children: [
1933
+ !E && h && /* @__PURE__ */ e("div", { className: "ml-2", children: /* @__PURE__ */ e(ds, {}) }),
1934
+ !E && l && /* @__PURE__ */ e(Ds, {}),
1935
+ !E && h && /* @__PURE__ */ n(_t, { children: [
1936
1936
  /* @__PURE__ */ e(qt, { asChild: !0, children: /* @__PURE__ */ e(
1937
1937
  zt,
1938
1938
  {
@@ -1943,7 +1943,7 @@ function kn() {
1943
1943
  variant: "ghost",
1944
1944
  "aria-label": "More dashboard options"
1945
1945
  },
1946
- children: /* @__PURE__ */ e(Or, { className: "h-3.5 w-3.5" })
1946
+ children: /* @__PURE__ */ e(Tr, { className: "h-3.5 w-3.5" })
1947
1947
  }
1948
1948
  ) }),
1949
1949
  /* @__PURE__ */ n(
@@ -1952,20 +1952,20 @@ function kn() {
1952
1952
  align: "end",
1953
1953
  className: "w-56 rounded-control border border-border/60 p-1 shadow-sm",
1954
1954
  children: [
1955
- /* @__PURE__ */ e(fe, { children: "Reports & briefings" }),
1955
+ /* @__PURE__ */ e(ge, { children: "Reports & briefings" }),
1956
1956
  /* @__PURE__ */ n(
1957
1957
  O,
1958
1958
  {
1959
1959
  disabled: u,
1960
- onSelect: () => Ne(!0),
1960
+ onSelect: () => De(!0),
1961
1961
  children: [
1962
- /* @__PURE__ */ e(Tr, { className: "h-3.5 w-3.5" }),
1962
+ /* @__PURE__ */ e(Gr, { className: "h-3.5 w-3.5" }),
1963
1963
  "Export"
1964
1964
  ]
1965
1965
  }
1966
1966
  ),
1967
1967
  /* @__PURE__ */ e(
1968
- an,
1968
+ rn,
1969
1969
  {
1970
1970
  scheduleReportVisible: !!(At && o.surfaceVisible && $ && !x),
1971
1971
  analyticalBriefingVisible: !!(At && o.surfaceVisible && $ && !x),
@@ -1974,8 +1974,8 @@ function kn() {
1974
1974
  }
1975
1975
  ),
1976
1976
  /* @__PURE__ */ e(Te, {}),
1977
- Ie.showGroupManagement && /* @__PURE__ */ n(T, { children: [
1978
- /* @__PURE__ */ e(fe, { children: "Access" }),
1977
+ te.showGroupManagement && /* @__PURE__ */ n(T, { children: [
1978
+ /* @__PURE__ */ e(ge, { children: "Access" }),
1979
1979
  /* @__PURE__ */ n(
1980
1980
  O,
1981
1981
  {
@@ -1988,14 +1988,14 @@ function kn() {
1988
1988
  ),
1989
1989
  /* @__PURE__ */ e(Te, {})
1990
1990
  ] }),
1991
- /* @__PURE__ */ e(fe, { children: "Preferences" }),
1992
- /* @__PURE__ */ n(O, { onClick: () => re(!0), children: [
1991
+ /* @__PURE__ */ e(ge, { children: "Preferences" }),
1992
+ /* @__PURE__ */ n(O, { onClick: () => se(!0), children: [
1993
1993
  /* @__PURE__ */ e(la, { className: "h-3.5 w-3.5" }),
1994
1994
  "Report preferences"
1995
1995
  ] }),
1996
- l && p && /* @__PURE__ */ n(T, { children: [
1996
+ l && h && /* @__PURE__ */ n(T, { children: [
1997
1997
  /* @__PURE__ */ e(Te, {}),
1998
- /* @__PURE__ */ e(fe, { children: "Developer" }),
1998
+ /* @__PURE__ */ e(ge, { children: "Developer" }),
1999
1999
  /* @__PURE__ */ n(
2000
2000
  O,
2001
2001
  {
@@ -2042,15 +2042,15 @@ function kn() {
2042
2042
  /* @__PURE__ */ n(
2043
2043
  O,
2044
2044
  {
2045
- onSelect: () => Ya(s.apiServiceUrl),
2045
+ onSelect: () => Xa(s.apiServiceUrl),
2046
2046
  children: [
2047
- /* @__PURE__ */ e(vs, { className: "h-3.5 w-3.5" }),
2047
+ /* @__PURE__ */ e(ys, { className: "h-3.5 w-3.5" }),
2048
2048
  "Invalidate token"
2049
2049
  ]
2050
2050
  }
2051
2051
  ),
2052
- /* @__PURE__ */ n(O, { onSelect: h, children: [
2053
- /* @__PURE__ */ e(hs, { className: "h-3.5 w-3.5" }),
2052
+ /* @__PURE__ */ n(O, { onSelect: p, children: [
2053
+ /* @__PURE__ */ e(fs, { className: "h-3.5 w-3.5" }),
2054
2054
  "Brand Studio"
2055
2055
  ] }),
2056
2056
  x && /* @__PURE__ */ n(
@@ -2058,21 +2058,21 @@ function kn() {
2058
2058
  {
2059
2059
  onSelect: () => wt(!vt),
2060
2060
  children: [
2061
- /* @__PURE__ */ e(fs, { className: "h-3.5 w-3.5" }),
2061
+ /* @__PURE__ */ e(gs, { className: "h-3.5 w-3.5" }),
2062
2062
  vt ? "Hide dashboard JSON" : "Show dashboard JSON"
2063
2063
  ]
2064
2064
  }
2065
2065
  ),
2066
- ue && x && /* @__PURE__ */ n(O, { onSelect: () => se(!0), children: [
2066
+ me && x && /* @__PURE__ */ n(O, { onSelect: () => ne(!0), children: [
2067
2067
  /* @__PURE__ */ e(H, { className: "h-3.5 w-3.5" }),
2068
2068
  "Add lens"
2069
2069
  ] }),
2070
- ue && /* @__PURE__ */ n(Gr, { children: [
2071
- /* @__PURE__ */ n(Br, { children: [
2072
- /* @__PURE__ */ e(gs, { className: "h-3.5 w-3.5" }),
2070
+ me && /* @__PURE__ */ n(Br, { children: [
2071
+ /* @__PURE__ */ n($r, { children: [
2072
+ /* @__PURE__ */ e(bs, { className: "h-3.5 w-3.5" }),
2073
2073
  "Lenses"
2074
2074
  ] }),
2075
- /* @__PURE__ */ e($r, { className: "w-60", children: /* @__PURE__ */ e(Is, {}) })
2075
+ /* @__PURE__ */ e(zr, { className: "w-60", children: /* @__PURE__ */ e(Ms, {}) })
2076
2076
  ] })
2077
2077
  ] })
2078
2078
  ]
@@ -2080,29 +2080,29 @@ function kn() {
2080
2080
  )
2081
2081
  ] }),
2082
2082
  $e && Dt && /* @__PURE__ */ e(
2083
- zr,
2083
+ _r,
2084
2084
  {
2085
2085
  resource: Dt,
2086
2086
  resourceType: at.DASHBOARD,
2087
2087
  onClose: () => K(!1)
2088
2088
  }
2089
2089
  ),
2090
- Ie.showGroupManagement && /* @__PURE__ */ e(
2091
- Ks,
2090
+ te.showGroupManagement && /* @__PURE__ */ e(
2091
+ Qs,
2092
2092
  {
2093
- open: te,
2093
+ open: ae,
2094
2094
  onOpenChange: Q
2095
2095
  }
2096
2096
  ),
2097
2097
  /* @__PURE__ */ e(
2098
- ms,
2098
+ hs,
2099
2099
  {
2100
- open: ae,
2101
- onOpenChange: re
2100
+ open: re,
2101
+ onOpenChange: se
2102
2102
  }
2103
2103
  ),
2104
- $ && ye ? /* @__PURE__ */ e(
2105
- ds,
2104
+ $ && we ? /* @__PURE__ */ e(
2105
+ ls,
2106
2106
  {
2107
2107
  dashboardId: $,
2108
2108
  dashboardTitle: (c == null ? void 0 : c.title) || (B == null ? void 0 : B.title),
@@ -2111,36 +2111,36 @@ function kn() {
2111
2111
  i || ee(null);
2112
2112
  },
2113
2113
  hideTrigger: !0,
2114
- workflowIntent: ye
2114
+ workflowIntent: we
2115
2115
  }
2116
2116
  ) : null,
2117
- l && ue && p && /* @__PURE__ */ e(Ss, { open: ze, onOpenChange: se }),
2118
- p && /* @__PURE__ */ e(
2119
- _r,
2117
+ l && me && h && /* @__PURE__ */ e(Is, { open: ze, onOpenChange: ne }),
2118
+ h && /* @__PURE__ */ e(
2119
+ qr,
2120
2120
  {
2121
- open: we,
2122
- onOpenChange: Ne
2121
+ open: Ne,
2122
+ onOpenChange: De
2123
2123
  }
2124
2124
  ),
2125
2125
  /* @__PURE__ */ e(
2126
- qr,
2126
+ Hr,
2127
2127
  {
2128
2128
  open: _e,
2129
2129
  onOpenChange: (i) => {
2130
2130
  !i && Ke && !g || (G(i), i || (R(null), W([]), J(!1)));
2131
2131
  },
2132
- children: /* @__PURE__ */ n(Hr, { className: "max-w-sm", children: [
2133
- /* @__PURE__ */ n(jr, { children: [
2134
- /* @__PURE__ */ e(Kr, { children: g ? "Save failed" : "Saving dashboard" }),
2135
- /* @__PURE__ */ e(Qr, { className: "pt-2", children: g ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
2136
- ne.length > 0 && /* @__PURE__ */ n("div", { className: "space-y-1 rounded-md border border-destructive/20 bg-destructive/5 p-3 text-left", children: [
2132
+ children: /* @__PURE__ */ n(jr, { className: "max-w-sm", children: [
2133
+ /* @__PURE__ */ n(Kr, { children: [
2134
+ /* @__PURE__ */ e(Qr, { children: g ? "Save failed" : "Saving dashboard" }),
2135
+ /* @__PURE__ */ e(Wr, { className: "pt-2", children: g ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
2136
+ oe.length > 0 && /* @__PURE__ */ n("div", { className: "space-y-1 rounded-md border border-destructive/20 bg-destructive/5 p-3 text-left", children: [
2137
2137
  /* @__PURE__ */ e("div", { className: "text-sm font-medium text-destructive", children: "What needs attention" }),
2138
- /* @__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)) })
2138
+ /* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children: oe.slice(0, 5).map((i) => /* @__PURE__ */ e("li", { children: i }, i)) })
2139
2139
  ] })
2140
2140
  ] }),
2141
- /* @__PURE__ */ e(Wr, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: g ? /* @__PURE__ */ n(T, { children: [
2141
+ /* @__PURE__ */ e(Jr, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: g ? /* @__PURE__ */ n(T, { children: [
2142
2142
  /* @__PURE__ */ e(
2143
- Jr,
2143
+ Yr,
2144
2144
  {
2145
2145
  onClick: () => {
2146
2146
  G(!1), R(null), W([]), J(!1);
@@ -2153,7 +2153,7 @@ function kn() {
2153
2153
  Kt,
2154
2154
  {
2155
2155
  onClick: () => Xe({
2156
- closeAfterSave: oe,
2156
+ closeAfterSave: ie,
2157
2157
  navigateHomeAfterSave: We === "home"
2158
2158
  }),
2159
2159
  className: "m-0",
@@ -2168,11 +2168,11 @@ function kn() {
2168
2168
  }
2169
2169
  ),
2170
2170
  /* @__PURE__ */ e(
2171
- ls,
2171
+ cs,
2172
2172
  {
2173
2173
  open: Ma,
2174
2174
  onOpenChange: (i) => {
2175
- le(i);
2175
+ ce(i);
2176
2176
  },
2177
2177
  onSave: Ua,
2178
2178
  onDiscard: Ra,
@@ -2186,7 +2186,7 @@ function kn() {
2186
2186
  }
2187
2187
  );
2188
2188
  }
2189
- function rn({
2189
+ function sn({
2190
2190
  accessToken: t,
2191
2191
  dashboardId: s,
2192
2192
  selectedSheetId: r,
@@ -2196,11 +2196,11 @@ function rn({
2196
2196
  }) {
2197
2197
  if (!t || !r)
2198
2198
  return null;
2199
- const h = new URL("http://localhost:5173/print-document");
2200
- h.searchParams.set("token", t), s && h.searchParams.set("dashboardId", s), h.searchParams.set("selectedSheetId", r), l && h.searchParams.set("theme", l);
2199
+ const p = new URL("http://localhost:5173/print-document");
2200
+ p.searchParams.set("token", t), s && p.searchParams.set("dashboardId", s), p.searchParams.set("selectedSheetId", r), l && p.searchParams.set("theme", l);
2201
2201
  const m = new URL("http://127.0.0.1:3002/");
2202
- 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();
2202
+ return m.searchParams.set("pdfMode", "document"), m.searchParams.set("pageSize", a || "letter"), m.searchParams.set("orientation", o || "portrait"), m.searchParams.set("url", p.toString()), m.toString();
2203
2203
  }
2204
2204
  export {
2205
- kn as default
2205
+ Sn as default
2206
2206
  };