react-semaphor 0.1.327 → 0.1.328

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 (60) hide show
  1. package/dist/brand-studio/index.cjs +5 -5
  2. package/dist/brand-studio/index.js +23 -24
  3. package/dist/chunks/_commonjsHelpers-BVfed4GL.js +28 -0
  4. package/dist/chunks/_commonjsHelpers-DwTZ_eVU.js +1 -0
  5. package/dist/chunks/{braces-BGWZEnQJ.js → braces-CG8viaD2.js} +1 -1
  6. package/dist/chunks/{braces-B6qRDu1H.js → braces-DSaa_4Oc.js} +1 -1
  7. package/dist/chunks/{calendar-preferences-dialog-fkLUMJyR.js → calendar-preferences-dialog-DD_qAthL.js} +1 -1
  8. package/dist/chunks/{calendar-preferences-dialog-CjwbE_82.js → calendar-preferences-dialog-JRmNJptJ.js} +3 -3
  9. package/dist/chunks/{chevrons-up-down-xG-bVFD9.js → chevrons-up-down-CBa0uh0X.js} +1 -1
  10. package/dist/chunks/{chevrons-up-down-BpsogQvv.js → chevrons-up-down-ChDNqVP7.js} +1 -1
  11. package/dist/chunks/dashboard-briefing-launcher-BKdJFwH5.js +106 -0
  12. package/dist/chunks/{dashboard-briefing-launcher-Cy1nWZRW.js → dashboard-briefing-launcher-BfyNkd8i.js} +1141 -1137
  13. package/dist/chunks/{dashboard-controls-BWnVEFJq.js → dashboard-controls-0pZDLvFL.js} +218 -218
  14. package/dist/chunks/{dashboard-controls-C7rOGZO-.js → dashboard-controls-C0xm1QMR.js} +10 -10
  15. package/dist/chunks/dashboard-json-BW5OVZ6m.js +1 -0
  16. package/dist/chunks/{dashboard-json-BpRNSsF3.js → dashboard-json-DsruhRPD.js} +14 -13
  17. package/dist/chunks/{edit-dashboard-visual-B2vkIKEa.js → edit-dashboard-visual-DQyJ7SSv.js} +1 -1
  18. package/dist/chunks/{edit-dashboard-visual-CYf26co_.js → edit-dashboard-visual-g5SZZahJ.js} +9 -8
  19. package/dist/chunks/index-1JWDPCun.js +1935 -0
  20. package/dist/chunks/index-BdjXTQt4.js +1444 -0
  21. package/dist/chunks/{index-DTlbYpxd.js → index-BmKr-K7J.js} +116971 -113296
  22. package/dist/chunks/index-C1l78BIx.js +3247 -0
  23. package/dist/chunks/lib-Ce3zosXY.js +38 -0
  24. package/dist/chunks/lib-DFvr9fM4.js +5500 -0
  25. package/dist/chunks/{palette-CSF7IVJn.js → palette-D0YmAqBS.js} +1 -1
  26. package/dist/chunks/{palette-CWgEPBoG.js → palette-DQgq3edH.js} +1 -1
  27. package/dist/chunks/{resource-management-panel-D6nbfJY3.js → resource-management-panel-CIfBh46E.js} +1 -1
  28. package/dist/chunks/{resource-management-panel-D893Onv8.js → resource-management-panel-Cj19pw9M.js} +145 -145
  29. package/dist/chunks/{switch-DJJJD_g1.js → switch-BvTzw2AW.js} +39 -34
  30. package/dist/chunks/{switch-DKf6vHfP.js → switch-De31SR3q.js} +878 -885
  31. package/dist/chunks/typescript-Cmizj1hi.js +446 -0
  32. package/dist/chunks/typescript-H1EwZsOb.js +159820 -0
  33. package/dist/chunks/use-create-flow-overlay-state-BTQiKRD1.js +26 -0
  34. package/dist/chunks/{use-create-flow-overlay-state-p21zs2p6.js → use-create-flow-overlay-state-IcHP0l39.js} +150 -151
  35. package/dist/chunks/{use-visual-utils-BKBua6o4.js → use-visual-utils-DQ5zGYD2.js} +13 -13
  36. package/dist/chunks/{use-visual-utils-BqWm0QeW.js → use-visual-utils-XF-AqV8o.js} +1 -1
  37. package/dist/dashboard/index.cjs +1 -1
  38. package/dist/dashboard/index.js +1 -1
  39. package/dist/data-app-builder/index.cjs +1 -0
  40. package/dist/data-app-builder/index.js +4 -0
  41. package/dist/data-app-builder-browser-runtime/index.cjs +1 -0
  42. package/dist/data-app-builder-browser-runtime/index.js +10 -0
  43. package/dist/data-app-sdk/index.cjs +1 -1
  44. package/dist/data-app-sdk/index.js +208 -196
  45. package/dist/index.cjs +1 -1
  46. package/dist/index.js +14 -14
  47. package/dist/style.css +1 -1
  48. package/dist/surfboard/index.cjs +1 -1
  49. package/dist/surfboard/index.js +2 -2
  50. package/dist/types/data-app-builder-browser-runtime.d.ts +185 -0
  51. package/dist/types/data-app-builder.d.ts +630 -0
  52. package/dist/types/data-app-sdk.d.ts +14 -1
  53. package/dist/types/main.d.ts +2 -0
  54. package/package.json +11 -1
  55. package/dist/chunks/dashboard-briefing-launcher-Co57xBfS.js +0 -106
  56. package/dist/chunks/dashboard-json-DBPMknGo.js +0 -1
  57. package/dist/chunks/index-BD90s-wf.js +0 -1309
  58. package/dist/chunks/save-CtQbSub2.js +0 -6
  59. package/dist/chunks/save-DRdFKF57.js +0 -21
  60. package/dist/chunks/use-create-flow-overlay-state-C4LgoK8q.js +0 -26
@@ -1,19 +1,19 @@
1
1
  import { jsx as t, jsxs as i, Fragment as R } from "react/jsx-runtime";
2
- import { c as K, u as N, B as _, az as dt, E as Vt, L as Hr, a1 as jr, a as te, aA as qr, aB as Vr, aC as rt, aD as me, aE as ct, aF as Kt, f as $e, X as Qt, aG as Wt, aH as Kr, G as Rt, Y as Qr, Z as Wr, _ as Jr, a0 as Yr, j as Xr, aI as Zr } from "./switch-DKf6vHfP.js";
3
- import { bf as ea, u as G, b as Jt, bg as ta, aH as re, c as Yt, d as ra, e as at, f as nt, n as aa, bh as ue, aU as Fe, bi as na, bj as Ut, bk as Xt, bl as Zt, bm as sa, b8 as lt, bn as oa, bo as ia, bp as da, bq as ca, br as la, bs as ua, ad as pe, bt as fe, o as k, bu as ma, bv as er, ay as ut, bd as pa, bw as fa, bx as ha, by as tr, aT as rr, aW as ar, ax as ga, aL as ba, bz as xa, bA as va, y as ya, x as Ue, J as wa, z as Ye, bB as Na, bC as Sa, bD as Da, Z as Ca, bE as ka, I as Xe, bF as Ea, bG as La, bH as Ia, bI as Aa, aM as Ma, aN as Pa, aO as Oa, aP as _a, aQ as $, bJ as Ra, aR as Tt, bK as Ua, bL as Ta, bM as Fa, H as $a, bN as Ga, a$ as Ba, b0 as za, b1 as Ha, b2 as ja, b3 as qa, b4 as Va, b5 as Ka, b6 as Ft, v as st } from "./index-DTlbYpxd.js";
2
+ import { c as K, u as N, B as _, aA as dt, E as Vt, L as jr, a2 as qr, a as te, aB as Hr, aC as Vr, aD as rt, aE as me, aF as ct, aG as Kt, f as $e, X as Qt, aH as Wt, aI as Kr, G as Rt, Z as Qr, _ as Wr, $ as Jr, a1 as Xr, S as Ut, j as Yr, aJ as Zr } from "./switch-De31SR3q.js";
3
+ import { bg as ea, u as G, c as Jt, bh as ta, aI as re, d as Xt, e as ra, f as at, g as nt, o as aa, bi as ue, aV as Fe, bj as na, bk as Tt, bl as Yt, bm as Zt, bn as sa, b9 as lt, bo as oa, bp as ia, bq as da, br as ca, bs as la, bt as ua, ae as pe, bu as he, p as k, bv as ma, bw as er, az as ut, be as pa, bx as ha, by as fa, bz as tr, aU as rr, aX as ar, ay as ga, aM as ba, bA as xa, bB as va, z as ya, y as Ue, K as wa, A as Xe, bC as Na, bD as Sa, bE as Da, _ as Ca, bF as ka, I as Ye, bG as Ea, bH as La, bI as Ia, bJ as Aa, aN as Ma, aO as Pa, aP as Oa, aQ as _a, aR as $, bK as Ra, aS as Ft, bL as Ua, bM as Ta, bN as Fa, J as $a, bO as Ga, b0 as Ba, b1 as za, b2 as ja, b3 as qa, b4 as Ha, b5 as Va, b6 as Ka, b7 as $t, w as st } from "./index-BmKr-K7J.js";
4
4
  import "./index-CuHybtft.js";
5
5
  import * as I from "react";
6
- import nr, { useState as w, useMemo as V, useEffect as Ge, useRef as $t, useLayoutEffect as Qa, useCallback as Wa } from "react";
6
+ import nr, { useState as w, useMemo as V, useEffect as Ge, useRef as Gt, useLayoutEffect as Qa, useCallback as Wa } from "react";
7
7
  import "./index-CJdxSyQq.js";
8
+ import "react-dom/client";
8
9
  import { createPortal as Ja } from "react-dom";
9
- import { L as Ya, b as Xa, u as Za, A as en, V as tn, K as rn, e as an, M as nn, N as sn, U as on } from "./dashboard-briefing-launcher-Cy1nWZRW.js";
10
+ import { L as Xa, b as Ya, u as Za, A as en, V as tn, K as rn, e as an, M as nn, N as sn, U as on } from "./dashboard-briefing-launcher-BfyNkd8i.js";
10
11
  import { d as sr } from "./index-DFOb_6HB.js";
11
- import { C as dn } from "./calendar-preferences-dialog-CjwbE_82.js";
12
+ import { C as dn } from "./calendar-preferences-dialog-JRmNJptJ.js";
12
13
  import { u as cn } from "./use-debounced-dirty-check-BwAbnX_5.js";
13
14
  import { s as Ze } from "./normalize-dashboard-for-dirty-check-5KpZN8xr.js";
14
- import { S as Gt } from "./save-DRdFKF57.js";
15
- import { P as ln } from "./palette-CSF7IVJn.js";
16
- import { B as un } from "./braces-B6qRDu1H.js";
15
+ import { P as ln } from "./palette-D0YmAqBS.js";
16
+ import { B as un } from "./braces-DSaa_4Oc.js";
17
17
  /**
18
18
  * @license lucide-react v0.453.0 - ISC
19
19
  *
@@ -44,7 +44,7 @@ const pn = K("Menu", [
44
44
  * This source code is licensed under the ISC license.
45
45
  * See the LICENSE file in the root directory of this source tree.
46
46
  */
47
- const fn = K("Monitor", [
47
+ const hn = K("Monitor", [
48
48
  ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
49
49
  ["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
50
50
  ["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
@@ -55,7 +55,7 @@ const fn = K("Monitor", [
55
55
  * This source code is licensed under the ISC license.
56
56
  * See the LICENSE file in the root directory of this source tree.
57
57
  */
58
- const hn = K("Moon", [
58
+ const fn = K("Moon", [
59
59
  ["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
60
60
  ]);
61
61
  /**
@@ -119,17 +119,17 @@ function vn() {
119
119
  if (Bt) return et;
120
120
  Bt = 1;
121
121
  var e = nr;
122
- function n(c, f) {
123
- return c === f && (c !== 0 || 1 / c === 1 / f) || c !== c && f !== f;
122
+ function n(c, h) {
123
+ return c === h && (c !== 0 || 1 / c === 1 / h) || c !== c && h !== h;
124
124
  }
125
- var a = typeof Object.is == "function" ? Object.is : n, r = e.useState, s = e.useEffect, u = e.useLayoutEffect, h = e.useDebugValue;
126
- function l(c, f) {
127
- var m = f(), g = r({ inst: { value: m, getSnapshot: f } }), o = g[0].inst, y = g[1];
125
+ var a = typeof Object.is == "function" ? Object.is : n, r = e.useState, s = e.useEffect, u = e.useLayoutEffect, f = e.useDebugValue;
126
+ function l(c, h) {
127
+ var m = h(), g = r({ inst: { value: m, getSnapshot: h } }), o = g[0].inst, y = g[1];
128
128
  return u(
129
129
  function() {
130
- o.value = m, o.getSnapshot = f, b(o) && y({ inst: o });
130
+ o.value = m, o.getSnapshot = h, b(o) && y({ inst: o });
131
131
  },
132
- [c, m, f]
132
+ [c, m, h]
133
133
  ), s(
134
134
  function() {
135
135
  return b(o) && y({ inst: o }), c(function() {
@@ -137,20 +137,20 @@ function vn() {
137
137
  });
138
138
  },
139
139
  [c]
140
- ), h(m), m;
140
+ ), f(m), m;
141
141
  }
142
142
  function b(c) {
143
- var f = c.getSnapshot;
143
+ var h = c.getSnapshot;
144
144
  c = c.value;
145
145
  try {
146
- var m = f();
146
+ var m = h();
147
147
  return !a(c, m);
148
148
  } catch {
149
149
  return !0;
150
150
  }
151
151
  }
152
- function x(c, f) {
153
- return f();
152
+ function x(c, h) {
153
+ return h();
154
154
  }
155
155
  var p = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? x : l;
156
156
  return et.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : p, et;
@@ -182,7 +182,7 @@ function yn() {
182
182
  "The result of getSnapshot should be cached to avoid an infinite loop"
183
183
  ), c = !0);
184
184
  }
185
- y = h({
185
+ y = f({
186
186
  inst: { value: o, getSnapshot: g }
187
187
  });
188
188
  var S = y[0].inst, C = y[1];
@@ -214,8 +214,8 @@ function yn() {
214
214
  return g();
215
215
  }
216
216
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
217
- var s = nr, u = typeof Object.is == "function" ? Object.is : e, h = s.useState, l = s.useEffect, b = s.useLayoutEffect, x = s.useDebugValue, p = !1, c = !1, f = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : n;
218
- tt.useSyncExternalStore = s.useSyncExternalStore !== void 0 ? s.useSyncExternalStore : f, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
217
+ var s = nr, u = typeof Object.is == "function" ? Object.is : e, f = s.useState, l = s.useEffect, b = s.useLayoutEffect, x = s.useDebugValue, p = !1, c = !1, h = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : n;
218
+ tt.useSyncExternalStore = s.useSyncExternalStore !== void 0 ? s.useSyncExternalStore : h, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
219
219
  }()), tt;
220
220
  }
221
221
  process.env.NODE_ENV === "production" ? ot.exports = vn() : ot.exports = yn();
@@ -223,13 +223,13 @@ var wn = ot.exports;
223
223
  const Te = ["light", "dark", "system"];
224
224
  function Nn() {
225
225
  const { theme: e, setTheme: n } = ea(), a = N(
226
- (h) => h.actions.setDashboardTheme
226
+ (f) => f.actions.setDashboardTheme
227
227
  );
228
228
  function r() {
229
- const h = Te.includes(e) ? e : "system", l = Te[(Te.indexOf(h) + 1) % Te.length];
229
+ const f = Te.includes(e) ? e : "system", l = Te[(Te.indexOf(f) + 1) % Te.length];
230
230
  n(l), a(l);
231
231
  }
232
- const s = e === "light" ? bn : e === "dark" ? hn : fn, u = e === "light" ? "Theme: light (click for dark)" : e === "dark" ? "Theme: dark (click for system)" : "Theme: system (click for light)";
232
+ const s = e === "light" ? bn : e === "dark" ? fn : hn, u = e === "light" ? "Theme: light (click for dark)" : e === "dark" ? "Theme: dark (click for system)" : "Theme: system (click for light)";
233
233
  return /* @__PURE__ */ t(
234
234
  _,
235
235
  {
@@ -247,8 +247,8 @@ function Nn() {
247
247
  async function Sn(e, n, a, r, s) {
248
248
  if (!s)
249
249
  return null;
250
- const u = JSON.stringify(a), h = `${e}/v1/lens`;
251
- return await dt(h, s, {
250
+ const u = JSON.stringify(a), f = `${e}/v1/lens`;
251
+ return await dt(f, s, {
252
252
  name: n,
253
253
  template: u,
254
254
  filterValues: r,
@@ -258,12 +258,12 @@ async function Sn(e, n, a, r, s) {
258
258
  async function it(e, n, a) {
259
259
  if (!a)
260
260
  return null;
261
- const { id: r, template: s, filterValues: u, isDefault: h, shared: l } = n, b = `${e}/v1/lens`;
261
+ const { id: r, template: s, filterValues: u, isDefault: f, shared: l } = n, b = `${e}/v1/lens`;
262
262
  return await dt(b, a, {
263
263
  lensId: r,
264
264
  template: s,
265
265
  filterValues: u,
266
- isDefault: h,
266
+ isDefault: f,
267
267
  shared: l,
268
268
  operation: "update"
269
269
  });
@@ -282,8 +282,8 @@ function kn({
282
282
  open: e,
283
283
  onOpenChange: n
284
284
  } = {}) {
285
- const [a, r] = w(""), [s, u] = w(!1), h = N((D) => D.lenses), { setLenses: l, setSelectedLensId: b } = Vt(), [x, p] = w(!1), [c, f] = w(!1), m = e !== void 0, g = m ? e : c, o = (D) => {
286
- m || f(D), n == null || n(D);
285
+ const [a, r] = w(""), [s, u] = w(!1), f = N((D) => D.lenses), { setLenses: l, setSelectedLensId: b } = Vt(), [x, p] = w(!1), [c, h] = w(!1), m = e !== void 0, g = m ? e : c, o = (D) => {
286
+ m || h(D), n == null || n(D);
287
287
  }, y = N((D) => D.dashboard), S = N((D) => D.filterValues), { authToken: C, tokenProps: L } = G();
288
288
  async function E() {
289
289
  p(!0);
@@ -294,22 +294,22 @@ function kn({
294
294
  S,
295
295
  C == null ? void 0 : C.accessToken
296
296
  );
297
- D && (l([...h || [], D]), b(D.id), o(!1)), p(!1);
297
+ D && (l([...f || [], D]), b(D.id), o(!1)), p(!1);
298
298
  }
299
299
  return /* @__PURE__ */ i(Jt, { open: g, onOpenChange: o, children: [
300
300
  m ? null : /* @__PURE__ */ t(ta, { asChild: !0, children: /* @__PURE__ */ i(_, { variant: "secondary", size: "xs", children: [
301
301
  /* @__PURE__ */ t(re, { className: "h-3.5 w-3.5" }),
302
302
  "Lens"
303
303
  ] }) }),
304
- /* @__PURE__ */ i(Yt, { className: "rounded-control border-border/60 sm:max-w-[420px] sm:rounded-control", children: [
304
+ /* @__PURE__ */ i(Xt, { className: "rounded-control border-border/60 sm:max-w-[420px] sm:rounded-control", children: [
305
305
  /* @__PURE__ */ i(ra, { children: [
306
306
  /* @__PURE__ */ t(at, { className: "text-[15px]", children: "Create lens" }),
307
307
  /* @__PURE__ */ t(nt, { className: "text-[13px] leading-5", children: "Lenses are private by default and are only visible to you." })
308
308
  ] }),
309
309
  /* @__PURE__ */ i("div", { className: "space-y-1.5 py-1", children: [
310
- /* @__PURE__ */ t(Hr, { htmlFor: "lens-name", className: Cn, children: "Name" }),
310
+ /* @__PURE__ */ t(jr, { htmlFor: "lens-name", className: Cn, children: "Name" }),
311
311
  /* @__PURE__ */ t(
312
- jr,
312
+ qr,
313
313
  {
314
314
  id: "lens-name",
315
315
  size: "xs",
@@ -337,14 +337,14 @@ function kn({
337
337
  ] });
338
338
  }
339
339
  function En({ includeLabel: e = !1 } = {}) {
340
- const n = N((p) => p.lenses), a = N((p) => p.selectedLensId), { setLenses: r, setSelectedLensId: s } = Vt(), { authToken: u, tokenProps: h } = G();
340
+ const n = N((p) => p.lenses), a = N((p) => p.selectedLensId), { setLenses: r, setSelectedLensId: s } = Vt(), { authToken: u, tokenProps: f } = G();
341
341
  async function l(p) {
342
342
  s(p);
343
343
  }
344
344
  async function b(p) {
345
- if (await Dn(h.apiServiceUrl, p, u == null ? void 0 : u.accessToken)) {
346
- const f = n == null ? void 0 : n.filter((m) => m.id !== p);
347
- r(f || []), s("original");
345
+ if (await Dn(f.apiServiceUrl, p, u == null ? void 0 : u.accessToken)) {
346
+ const h = n == null ? void 0 : n.filter((m) => m.id !== p);
347
+ r(h || []), s("original");
348
348
  }
349
349
  }
350
350
  async function x(p) {
@@ -356,18 +356,18 @@ function En({ includeLabel: e = !1 } = {}) {
356
356
  isDefault: !1
357
357
  });
358
358
  r(c || []);
359
- const f = {
359
+ const h = {
360
360
  ...p,
361
361
  isDefault: !p.isDefault
362
362
  };
363
- await it(h.apiServiceUrl, f, u == null ? void 0 : u.accessToken);
363
+ await it(f.apiServiceUrl, h, u == null ? void 0 : u.accessToken);
364
364
  const m = n == null ? void 0 : n.find((g) => g.isDefault);
365
365
  if (m && m.id !== p.id) {
366
366
  const g = {
367
367
  ...m,
368
368
  isDefault: !1
369
369
  };
370
- await it(h.apiServiceUrl, g, u == null ? void 0 : u.accessToken);
370
+ await it(f.apiServiceUrl, g, u == null ? void 0 : u.accessToken);
371
371
  }
372
372
  }
373
373
  return /* @__PURE__ */ i(R, { children: [
@@ -381,9 +381,9 @@ function En({ includeLabel: e = !1 } = {}) {
381
381
  value: a,
382
382
  onValueChange: l,
383
383
  children: [
384
- /* @__PURE__ */ t(Ut, { value: "original", children: "Original" }),
384
+ /* @__PURE__ */ t(Tt, { value: "original", children: "Original" }),
385
385
  n == null ? void 0 : n.map((p) => /* @__PURE__ */ i(
386
- Ut,
386
+ Tt,
387
387
  {
388
388
  className: "group flex justify-between gap-2",
389
389
  value: p.id,
@@ -391,7 +391,7 @@ function En({ includeLabel: e = !1 } = {}) {
391
391
  /* @__PURE__ */ t("p", { children: p.name }),
392
392
  /* @__PURE__ */ i("span", { className: "flex items-center gap-3", children: [
393
393
  /* @__PURE__ */ t(
394
- Xt,
394
+ Yt,
395
395
  {
396
396
  onClick: (c) => {
397
397
  c.preventDefault(), x(p);
@@ -430,7 +430,7 @@ function Ln() {
430
430
  const { displayPreferences: e, shouldShowElement: n } = sa(), { currentUser: a, userContext: r } = lt(), s = V(
431
431
  () => oa(a),
432
432
  [a]
433
- ), u = V(() => (l) => s && s[l] !== void 0 && s[l] === !1 ? !1 : n(l), [s, n, e]), h = V(
433
+ ), u = V(() => (l) => s && s[l] !== void 0 && s[l] === !1 ? !1 : n(l), [s, n, e]), f = V(
434
434
  () => {
435
435
  var l, b, x, p, c;
436
436
  return {
@@ -446,34 +446,34 @@ function Ln() {
446
446
  return {
447
447
  displayPreferences: e,
448
448
  shouldShowElement: u,
449
- permissions: h,
449
+ permissions: f,
450
450
  currentUser: a
451
451
  };
452
452
  }
453
453
  function In(e, n = []) {
454
454
  let a = [];
455
- function r(u, h) {
456
- const l = I.createContext(h);
455
+ function r(u, f) {
456
+ const l = I.createContext(f);
457
457
  l.displayName = u + "Context";
458
458
  const b = a.length;
459
- a = [...a, h];
459
+ a = [...a, f];
460
460
  const x = (c) => {
461
461
  var S;
462
- const { scope: f, children: m, ...g } = c, o = ((S = f == null ? void 0 : f[e]) == null ? void 0 : S[b]) || l, y = I.useMemo(() => g, Object.values(g));
462
+ const { scope: h, children: m, ...g } = c, o = ((S = h == null ? void 0 : h[e]) == null ? void 0 : S[b]) || l, y = I.useMemo(() => g, Object.values(g));
463
463
  return /* @__PURE__ */ t(o.Provider, { value: y, children: m });
464
464
  };
465
465
  x.displayName = u + "Provider";
466
- function p(c, f) {
466
+ function p(c, h) {
467
467
  var o;
468
- const m = ((o = f == null ? void 0 : f[e]) == null ? void 0 : o[b]) || l, g = I.useContext(m);
468
+ const m = ((o = h == null ? void 0 : h[e]) == null ? void 0 : o[b]) || l, g = I.useContext(m);
469
469
  if (g) return g;
470
- if (h !== void 0) return h;
470
+ if (f !== void 0) return f;
471
471
  throw new Error(`\`${c}\` must be used within \`${u}\``);
472
472
  }
473
473
  return [x, p];
474
474
  }
475
475
  const s = () => {
476
- const u = a.map((h) => I.createContext(h));
476
+ const u = a.map((f) => I.createContext(f));
477
477
  return function(l) {
478
478
  const b = (l == null ? void 0 : l[e]) || u;
479
479
  return I.useMemo(
@@ -493,11 +493,11 @@ function An(...e) {
493
493
  scopeName: s.scopeName
494
494
  }));
495
495
  return function(u) {
496
- const h = r.reduce((l, { useScope: b, scopeName: x }) => {
496
+ const f = r.reduce((l, { useScope: b, scopeName: x }) => {
497
497
  const c = b(u)[`__scope${x}`];
498
498
  return { ...l, ...c };
499
499
  }, {});
500
- return I.useMemo(() => ({ [`__scope${n.scopeName}`]: h }), [h]);
500
+ return I.useMemo(() => ({ [`__scope${n.scopeName}`]: f }), [f]);
501
501
  };
502
502
  };
503
503
  return a.scopeName = n.scopeName, a;
@@ -521,8 +521,8 @@ var Mn = [
521
521
  "svg",
522
522
  "ul"
523
523
  ], mt = Mn.reduce((e, n) => {
524
- const a = qr(`Primitive.${n}`), r = I.forwardRef((s, u) => {
525
- const { asChild: h, ...l } = s, b = h ? a : n;
524
+ const a = Hr(`Primitive.${n}`), r = I.forwardRef((s, u) => {
525
+ const { asChild: f, ...l } = s, b = f ? a : n;
526
526
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ t(b, { ...l, ref: u });
527
527
  });
528
528
  return r.displayName = `Primitive.${n}`, { ...e, [n]: r };
@@ -556,8 +556,8 @@ ir.displayName = pt;
556
556
  var dr = "AvatarImage", cr = I.forwardRef(
557
557
  (e, n) => {
558
558
  const { __scopeAvatar: a, src: r, onLoadingStatusChange: s = () => {
559
- }, ...u } = e, h = or(dr, a), l = Un(r, u), b = Vr((x) => {
560
- s(x), h.onImageLoadingStatusChange(x);
559
+ }, ...u } = e, f = or(dr, a), l = Un(r, u), b = Vr((x) => {
560
+ s(x), f.onImageLoadingStatusChange(x);
561
561
  });
562
562
  return rt(() => {
563
563
  l !== "idle" && b(l);
@@ -567,25 +567,25 @@ var dr = "AvatarImage", cr = I.forwardRef(
567
567
  cr.displayName = dr;
568
568
  var lr = "AvatarFallback", ur = I.forwardRef(
569
569
  (e, n) => {
570
- const { __scopeAvatar: a, delayMs: r, ...s } = e, u = or(lr, a), [h, l] = I.useState(r === void 0);
570
+ const { __scopeAvatar: a, delayMs: r, ...s } = e, u = or(lr, a), [f, l] = I.useState(r === void 0);
571
571
  return I.useEffect(() => {
572
572
  if (r !== void 0) {
573
573
  const b = window.setTimeout(() => l(!0), r);
574
574
  return () => window.clearTimeout(b);
575
575
  }
576
- }, [r]), h && u.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ t(mt.span, { ...s, ref: n }) : null;
576
+ }, [r]), f && u.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ t(mt.span, { ...s, ref: n }) : null;
577
577
  }
578
578
  );
579
579
  ur.displayName = lr;
580
- function Ht(e, n) {
580
+ function jt(e, n) {
581
581
  return e ? n ? (e.src !== n && (e.src = n), e.complete && e.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
582
582
  }
583
583
  function Un(e, { referrerPolicy: n, crossOrigin: a }) {
584
- const r = Pn(), s = I.useRef(null), u = r ? (s.current || (s.current = new window.Image()), s.current) : null, [h, l] = I.useState(
585
- () => Ht(u, e)
584
+ const r = Pn(), s = I.useRef(null), u = r ? (s.current || (s.current = new window.Image()), s.current) : null, [f, l] = I.useState(
585
+ () => jt(u, e)
586
586
  );
587
587
  return rt(() => {
588
- l(Ht(u, e));
588
+ l(jt(u, e));
589
589
  }, [u, e]), rt(() => {
590
590
  const b = (c) => () => {
591
591
  l(c);
@@ -595,10 +595,10 @@ function Un(e, { referrerPolicy: n, crossOrigin: a }) {
595
595
  return u.addEventListener("load", x), u.addEventListener("error", p), n && (u.referrerPolicy = n), typeof a == "string" && (u.crossOrigin = a), () => {
596
596
  u.removeEventListener("load", x), u.removeEventListener("error", p);
597
597
  };
598
- }, [u, a, n]), h;
598
+ }, [u, a, n]), f;
599
599
  }
600
- var mr = ir, pr = cr, fr = ur;
601
- const hr = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
600
+ var mr = ir, pr = cr, hr = ur;
601
+ const fr = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
602
602
  mr,
603
603
  {
604
604
  ref: a,
@@ -609,7 +609,7 @@ const hr = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
609
609
  ...n
610
610
  }
611
611
  ));
612
- hr.displayName = mr.displayName;
612
+ fr.displayName = mr.displayName;
613
613
  const Tn = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
614
614
  pr,
615
615
  {
@@ -620,7 +620,7 @@ const Tn = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
620
620
  ));
621
621
  Tn.displayName = pr.displayName;
622
622
  const gr = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
623
- fr,
623
+ hr,
624
624
  {
625
625
  ref: a,
626
626
  className: te(
@@ -630,7 +630,7 @@ const gr = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
630
630
  ...n
631
631
  }
632
632
  ));
633
- gr.displayName = fr.displayName;
633
+ gr.displayName = hr.displayName;
634
634
  const Fn = async (e, n, a) => {
635
635
  const r = `${e}/management/v1/groups`;
636
636
  return await Kt(r, n, a);
@@ -647,9 +647,9 @@ const Fn = async (e, n, a) => {
647
647
  const s = `${e}/management/v1/groups/${a}/members`;
648
648
  await ct(s, n, "DELETE", r);
649
649
  };
650
- function Hn() {
650
+ function jn() {
651
651
  const { authToken: e, tokenProps: n } = G(), a = pe();
652
- return fe({
652
+ return he({
653
653
  mutationFn: (r) => Fn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r),
654
654
  onSuccess: () => {
655
655
  a.invalidateQueries({ queryKey: ["groups"] }), k.success("Group created successfully");
@@ -661,9 +661,9 @@ function Hn() {
661
661
  }
662
662
  });
663
663
  }
664
- function jn() {
664
+ function qn() {
665
665
  const { authToken: e, tokenProps: n } = G(), a = pe();
666
- return fe({
666
+ return he({
667
667
  mutationFn: ({
668
668
  groupId: r,
669
669
  data: s
@@ -678,9 +678,9 @@ function jn() {
678
678
  }
679
679
  });
680
680
  }
681
- function qn() {
681
+ function Hn() {
682
682
  const { authToken: e, tokenProps: n } = G(), a = pe();
683
- return fe({
683
+ return he({
684
684
  mutationFn: (r) => Gn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r),
685
685
  onSuccess: (r, s) => {
686
686
  a.invalidateQueries({ queryKey: ["groups"] }), a.removeQueries({ queryKey: ["group", s] }), k.success("Group deleted successfully");
@@ -694,7 +694,7 @@ function qn() {
694
694
  }
695
695
  function Vn() {
696
696
  const { authToken: e, tokenProps: n } = G(), a = pe();
697
- return fe({
697
+ return he({
698
698
  mutationFn: ({
699
699
  groupId: r,
700
700
  data: s
@@ -713,7 +713,7 @@ function Vn() {
713
713
  }
714
714
  function Kn() {
715
715
  const { authToken: e, tokenProps: n } = G(), a = pe();
716
- return fe({
716
+ return he({
717
717
  mutationFn: ({
718
718
  groupId: r,
719
719
  data: s
@@ -737,7 +737,7 @@ function Wn({
737
737
  }) {
738
738
  var C, L, E;
739
739
  const { tokenProps: a } = G(), { currentUser: r } = lt(), s = (r == null ? void 0 : r.type) === "tenant", u = a == null ? void 0 : a.tenantId, {
740
- groups: h,
740
+ groups: f,
741
741
  isLoading: l,
742
742
  error: b,
743
743
  refetch: x
@@ -745,18 +745,18 @@ function Wn({
745
745
  type: s ? "TENANT_GROUP" : "all",
746
746
  tenantId: s ? u : void 0,
747
747
  includeMembers: !1
748
- }), p = b ? br(b, "Unable to load groups.") : null, [c, f] = w({ kind: "list" }), [m, g] = w(null), o = qn();
748
+ }), p = b ? br(b, "Unable to load groups.") : null, [c, h] = w({ kind: "list" }), [m, g] = w(null), o = Hn();
749
749
  Ge(() => {
750
- e || (f({ kind: "list" }), g(null));
750
+ e || (h({ kind: "list" }), g(null));
751
751
  }, [e]);
752
- const y = c.kind === "members" && h.find((D) => D.id === c.groupId) || null, S = async () => {
752
+ const y = c.kind === "members" && f.find((D) => D.id === c.groupId) || null, S = async () => {
753
753
  if (m)
754
754
  try {
755
- await o.mutateAsync(m.id), g(null), f({ kind: "list" }), x();
755
+ await o.mutateAsync(m.id), g(null), h({ kind: "list" }), x();
756
756
  } catch {
757
757
  }
758
758
  };
759
- return /* @__PURE__ */ t(Jt, { open: e, onOpenChange: n, children: /* @__PURE__ */ i(Yt, { className: "flex max-h-[640px] w-[720px] max-w-[92vw] flex-col gap-0 overflow-hidden p-0", children: [
759
+ return /* @__PURE__ */ t(Jt, { open: e, onOpenChange: n, children: /* @__PURE__ */ i(Xt, { className: "flex max-h-[640px] w-[720px] max-w-[92vw] flex-col gap-0 overflow-hidden p-0", children: [
760
760
  c.kind === "list" ? /* @__PURE__ */ i("div", { className: "shrink-0 border-b border-border px-5 pt-4 pb-3.5", children: [
761
761
  /* @__PURE__ */ t(at, { className: "text-[15px] font-semibold tracking-tight", children: "Group management" }),
762
762
  /* @__PURE__ */ t(nt, { className: "mt-1 text-[12px] leading-[1.5] text-muted-foreground", children: "Organize people into groups for shared access." })
@@ -765,7 +765,7 @@ function Wn({
765
765
  "button",
766
766
  {
767
767
  type: "button",
768
- onClick: () => f({ kind: "list" }),
768
+ onClick: () => h({ kind: "list" }),
769
769
  "aria-label": "Back",
770
770
  className: "-ml-1 flex h-6 w-6 items-center justify-center rounded-[3px] text-muted-foreground hover:bg-accent hover:text-foreground",
771
771
  children: /* @__PURE__ */ t(er, { className: "h-3.5 w-3.5" })
@@ -777,13 +777,13 @@ function Wn({
777
777
  c.kind === "list" && /* @__PURE__ */ t(
778
778
  Jn,
779
779
  {
780
- groups: h,
780
+ groups: f,
781
781
  isLoading: l,
782
782
  errorMessage: p,
783
783
  onRetry: () => x(),
784
784
  currentUserId: r == null ? void 0 : r.id,
785
- onOpenGroup: (D) => f({ kind: "members", groupId: D }),
786
- onCreate: () => f({ kind: "create" }),
785
+ onOpenGroup: (D) => h({ kind: "members", groupId: D }),
786
+ onCreate: () => h({ kind: "create" }),
787
787
  onDeleteRequest: (D) => g(D)
788
788
  }
789
789
  ),
@@ -795,7 +795,7 @@ function Wn({
795
795
  canEdit: ((C = y.permissions) == null ? void 0 : C.canEdit) ?? y.createdBy === (r == null ? void 0 : r.id),
796
796
  canDelete: ((L = y.permissions) == null ? void 0 : L.canDelete) ?? y.createdBy === (r == null ? void 0 : r.id),
797
797
  canManageMembers: ((E = y.permissions) == null ? void 0 : E.canManageMembers) ?? y.createdBy === (r == null ? void 0 : r.id),
798
- onBack: () => f({ kind: "list" }),
798
+ onBack: () => h({ kind: "list" }),
799
799
  onMembersChanged: x,
800
800
  onUpdated: x,
801
801
  onRequestDelete: () => g(y)
@@ -807,9 +807,9 @@ function Wn({
807
807
  {
808
808
  isTenantUser: s,
809
809
  tenantId: u,
810
- onCancel: () => f({ kind: "list" }),
810
+ onCancel: () => h({ kind: "list" }),
811
811
  onCreated: (D) => {
812
- x(), f({ kind: "members", groupId: D });
812
+ x(), h({ kind: "members", groupId: D });
813
813
  }
814
814
  }
815
815
  ),
@@ -855,7 +855,7 @@ function Jn({
855
855
  onRetry: r,
856
856
  currentUserId: s,
857
857
  onOpenGroup: u,
858
- onCreate: h,
858
+ onCreate: f,
859
859
  onDeleteRequest: l
860
860
  }) {
861
861
  const [b, x] = w(""), p = V(
@@ -891,7 +891,7 @@ function Jn({
891
891
  "button",
892
892
  {
893
893
  type: "button",
894
- onClick: h,
894
+ onClick: f,
895
895
  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",
896
896
  children: [
897
897
  /* @__PURE__ */ t(re, { className: "h-3 w-3" }),
@@ -913,7 +913,7 @@ function Jn({
913
913
  message: a,
914
914
  onRetry: r
915
915
  }
916
- ) : p.length === 0 && e.length === 0 ? /* @__PURE__ */ t(Xn, { onCreate: h }) : p.length === 0 ? /* @__PURE__ */ i("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
916
+ ) : p.length === 0 && e.length === 0 ? /* @__PURE__ */ t(Yn, { onCreate: f }) : p.length === 0 ? /* @__PURE__ */ i("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
917
917
  /* @__PURE__ */ i("div", { className: "text-[12px] text-foreground", children: [
918
918
  'No groups match "',
919
919
  b,
@@ -921,12 +921,12 @@ function Jn({
921
921
  ] }),
922
922
  /* @__PURE__ */ t("div", { className: "text-[11px] text-muted-foreground", children: "Try a different search." })
923
923
  ] }) : p.map((c) => {
924
- var f;
924
+ var h;
925
925
  return /* @__PURE__ */ t(
926
- Yn,
926
+ Xn,
927
927
  {
928
928
  group: c,
929
- canDelete: ((f = c.permissions) == null ? void 0 : f.canDelete) ?? c.createdBy === s,
929
+ canDelete: ((h = c.permissions) == null ? void 0 : h.canDelete) ?? c.createdBy === s,
930
930
  onClick: () => u(c.id),
931
931
  onDelete: () => l(c)
932
932
  },
@@ -935,7 +935,7 @@ function Jn({
935
935
  }) })
936
936
  ] });
937
937
  }
938
- function Yn({
938
+ function Xn({
939
939
  group: e,
940
940
  canDelete: n,
941
941
  onClick: a,
@@ -954,7 +954,7 @@ function Yn({
954
954
  onClick: a,
955
955
  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",
956
956
  children: [
957
- /* @__PURE__ */ t("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__ */ t(Ya, { className: "h-3.5 w-3.5" }) }),
957
+ /* @__PURE__ */ t("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__ */ t(Xa, { className: "h-3.5 w-3.5" }) }),
958
958
  /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
959
959
  /* @__PURE__ */ t("div", { className: "truncate text-[13px] font-medium text-foreground", children: e.name }),
960
960
  /* @__PURE__ */ i("div", { className: "mt-0.5 flex items-center gap-2 text-[11px] text-muted-foreground", children: [
@@ -1000,7 +1000,7 @@ function Yn({
1000
1000
  }
1001
1001
  );
1002
1002
  }
1003
- function Xn({ onCreate: e }) {
1003
+ function Yn({ onCreate: e }) {
1004
1004
  return /* @__PURE__ */ i("div", { className: "flex h-full flex-col items-center justify-center gap-2 py-12 text-center", children: [
1005
1005
  /* @__PURE__ */ t("div", { className: "flex h-9 w-9 items-center justify-center rounded-full border border-border bg-muted/40 text-muted-foreground", children: /* @__PURE__ */ t(rr, { className: "h-4 w-4" }) }),
1006
1006
  /* @__PURE__ */ t("div", { className: "text-[13px] font-medium text-foreground", children: "No groups yet" }),
@@ -1026,7 +1026,7 @@ function Zn({
1026
1026
  canDelete: r,
1027
1027
  canManageMembers: s,
1028
1028
  onBack: u,
1029
- onMembersChanged: h,
1029
+ onMembersChanged: f,
1030
1030
  onUpdated: l,
1031
1031
  onRequestDelete: b
1032
1032
  }) {
@@ -1034,8 +1034,8 @@ function Zn({
1034
1034
  data: x,
1035
1035
  isLoading: p,
1036
1036
  error: c,
1037
- refetch: f
1038
- } = fa(e.id), m = (x == null ? void 0 : x.members) ?? Qn, g = c ? br(c, "Unable to load members for this group.") : null, o = e.type === "TENANT_GROUP" ? "tenant" : "organization", { users: y } = ha({
1037
+ refetch: h
1038
+ } = ha(e.id), m = (x == null ? void 0 : x.members) ?? Qn, g = c ? br(c, "Unable to load members for this group.") : null, o = e.type === "TENANT_GROUP" ? "tenant" : "organization", { users: y } = fa({
1039
1039
  type: o,
1040
1040
  tenantId: e.tenantId || void 0,
1041
1041
  active: !0,
@@ -1043,12 +1043,12 @@ function Zn({
1043
1043
  }), S = V(
1044
1044
  () => new Set(m.map((v) => v.userId)),
1045
1045
  [m]
1046
- ), C = Vn(), L = Kn(), E = jn(), [D, ae] = w(!1), [Q, ne] = w(e.name), [he, W] = w(!1), [J, Y] = w(e.description || ""), [X, ge] = w(""), [be, xe] = w(!1), ve = V(() => {
1047
- const v = X.trim().toLowerCase();
1046
+ ), C = Vn(), L = Kn(), E = qn(), [D, ae] = w(!1), [Q, ne] = w(e.name), [fe, W] = w(!1), [J, X] = w(e.description || ""), [Y, ge] = w(""), [be, xe] = w(!1), ve = V(() => {
1047
+ const v = Y.trim().toLowerCase();
1048
1048
  return y.filter((U) => !S.has(U.id)).filter(
1049
1049
  (U) => !v || (U.name || "").toLowerCase().includes(v) || (U.email || "").toLowerCase().includes(v)
1050
1050
  ).slice(0, 50);
1051
- }, [y, S, X]), ye = async () => {
1051
+ }, [y, S, Y]), ye = async () => {
1052
1052
  const v = Q.trim();
1053
1053
  if (ae(!1), v.length >= 3 && v !== e.name)
1054
1054
  try {
@@ -1078,7 +1078,7 @@ function Zn({
1078
1078
  userIds: [v.id],
1079
1079
  userType: o === "tenant" ? "tenant" : "org"
1080
1080
  }
1081
- }), f(), h();
1081
+ }), h(), f();
1082
1082
  } catch {
1083
1083
  }
1084
1084
  }
@@ -1088,7 +1088,7 @@ function Zn({
1088
1088
  await L.mutateAsync({
1089
1089
  groupId: e.id,
1090
1090
  data: { userIds: [v] }
1091
- }), f(), h();
1091
+ }), h(), f();
1092
1092
  } catch {
1093
1093
  }
1094
1094
  };
@@ -1142,17 +1142,17 @@ function Zn({
1142
1142
  m.length === 1 ? "" : "s"
1143
1143
  ] })
1144
1144
  ] }),
1145
- /* @__PURE__ */ t("div", { className: "shrink-0 border-b border-border px-5 py-2.5", children: he ? /* @__PURE__ */ i("div", { children: [
1145
+ /* @__PURE__ */ t("div", { className: "shrink-0 border-b border-border px-5 py-2.5", children: fe ? /* @__PURE__ */ i("div", { children: [
1146
1146
  /* @__PURE__ */ t(
1147
1147
  "textarea",
1148
1148
  {
1149
1149
  autoFocus: !0,
1150
1150
  rows: 2,
1151
1151
  value: J,
1152
- onChange: (v) => Y(v.target.value),
1152
+ onChange: (v) => X(v.target.value),
1153
1153
  maxLength: 200,
1154
1154
  onKeyDown: (v) => {
1155
- v.key === "Escape" && (Y(e.description || ""), W(!1)), v.key === "Enter" && (v.metaKey || v.ctrlKey) && B();
1155
+ v.key === "Escape" && (X(e.description || ""), W(!1)), v.key === "Enter" && (v.metaKey || v.ctrlKey) && B();
1156
1156
  },
1157
1157
  placeholder: "What is this group for?",
1158
1158
  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"
@@ -1169,7 +1169,7 @@ function Zn({
1169
1169
  {
1170
1170
  type: "button",
1171
1171
  onClick: () => {
1172
- Y(e.description || ""), W(!1);
1172
+ X(e.description || ""), W(!1);
1173
1173
  },
1174
1174
  className: "h-6 rounded-[5px] px-2 text-[11px] font-medium text-foreground/80 hover:bg-accent",
1175
1175
  children: "Cancel"
@@ -1191,7 +1191,7 @@ function Zn({
1191
1191
  {
1192
1192
  type: "button",
1193
1193
  onClick: () => {
1194
- a && (Y(e.description || ""), W(!0));
1194
+ a && (X(e.description || ""), W(!0));
1195
1195
  },
1196
1196
  disabled: !a,
1197
1197
  title: a ? "Click to edit description" : void 0,
@@ -1208,7 +1208,7 @@ function Zn({
1208
1208
  s && /* @__PURE__ */ t(
1209
1209
  ts,
1210
1210
  {
1211
- query: X,
1211
+ query: Y,
1212
1212
  setQuery: ge,
1213
1213
  open: be,
1214
1214
  setOpen: xe,
@@ -1229,19 +1229,19 @@ function Zn({
1229
1229
  {
1230
1230
  title: "Can't load members",
1231
1231
  message: g,
1232
- onRetry: () => f()
1232
+ onRetry: () => h()
1233
1233
  }
1234
1234
  ) : m.length === 0 ? /* @__PURE__ */ i("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
1235
1235
  /* @__PURE__ */ t("div", { className: "text-[12px] text-foreground", children: "No members yet" }),
1236
1236
  /* @__PURE__ */ t("div", { className: "text-[11px] text-muted-foreground", children: s ? "Search above to add people to this group." : "This group does not have any members." })
1237
1237
  ] }) : m.map((v) => {
1238
- var U, H, we, Ne, Se, A;
1238
+ var U, j, we, Ne, Se, A;
1239
1239
  return /* @__PURE__ */ i(
1240
1240
  "div",
1241
1241
  {
1242
1242
  className: "group flex items-center gap-2 border-b border-border/60 px-5 py-2",
1243
1243
  children: [
1244
- /* @__PURE__ */ t(vr, { name: ((U = v.user) == null ? void 0 : U.name) || ((H = v.user) == null ? void 0 : H.email) || "?" }),
1244
+ /* @__PURE__ */ t(vr, { name: ((U = v.user) == null ? void 0 : U.name) || ((j = v.user) == null ? void 0 : j.email) || "?" }),
1245
1245
  /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
1246
1246
  /* @__PURE__ */ t("div", { className: "truncate text-[12.5px] font-medium text-foreground", children: ((we = v.user) == null ? void 0 : we.name) || ((Ne = v.user) == null ? void 0 : Ne.email) || "Unknown" }),
1247
1247
  ((Se = v.user) == null ? void 0 : Se.email) && v.user.name && /* @__PURE__ */ t("div", { className: "truncate text-[10.5px] text-muted-foreground", children: v.user.email })
@@ -1283,12 +1283,12 @@ function es({
1283
1283
  onCancel: a,
1284
1284
  onCreated: r
1285
1285
  }) {
1286
- const [s, u] = w(""), [h, l] = w(""), [b, x] = w(null), p = Hn(), c = s.trim().length >= 3 && s.trim().length <= 50, f = async () => {
1286
+ const [s, u] = w(""), [f, l] = w(""), [b, x] = w(null), p = jn(), c = s.trim().length >= 3 && s.trim().length <= 50, h = async () => {
1287
1287
  if (!c) return;
1288
1288
  x(null);
1289
1289
  const m = {
1290
1290
  name: s.trim(),
1291
- description: h.trim() || void 0,
1291
+ description: f.trim() || void 0,
1292
1292
  type: e ? "TENANT_GROUP" : "ORG_GROUP",
1293
1293
  ...e && n ? { tenantId: n } : {}
1294
1294
  };
@@ -1301,7 +1301,7 @@ function es({
1301
1301
  };
1302
1302
  return /* @__PURE__ */ i("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
1303
1303
  /* @__PURE__ */ i("div", { className: "flex-1 overflow-y-auto px-5 py-4", children: [
1304
- /* @__PURE__ */ t(jt, { children: "Name" }),
1304
+ /* @__PURE__ */ t(qt, { children: "Name" }),
1305
1305
  /* @__PURE__ */ t(
1306
1306
  "input",
1307
1307
  {
@@ -1315,12 +1315,12 @@ function es({
1315
1315
  ),
1316
1316
  /* @__PURE__ */ t("div", { className: "mt-1 text-[10.5px] text-muted-foreground", children: "3–50 characters." }),
1317
1317
  /* @__PURE__ */ i("div", { className: "mt-4", children: [
1318
- /* @__PURE__ */ t(jt, { children: "Description (optional)" }),
1318
+ /* @__PURE__ */ t(qt, { children: "Description (optional)" }),
1319
1319
  /* @__PURE__ */ t(
1320
1320
  "textarea",
1321
1321
  {
1322
1322
  rows: 2,
1323
- value: h,
1323
+ value: f,
1324
1324
  onChange: (m) => l(m.target.value),
1325
1325
  maxLength: 200,
1326
1326
  placeholder: "What is this group for?",
@@ -1328,7 +1328,7 @@ function es({
1328
1328
  }
1329
1329
  ),
1330
1330
  /* @__PURE__ */ i("div", { className: "mt-1 flex justify-end text-[10.5px] text-muted-foreground", children: [
1331
- h.length,
1331
+ f.length,
1332
1332
  "/200"
1333
1333
  ] })
1334
1334
  ] }),
@@ -1349,7 +1349,7 @@ function es({
1349
1349
  "button",
1350
1350
  {
1351
1351
  type: "button",
1352
- onClick: f,
1352
+ onClick: h,
1353
1353
  disabled: !c || p.isPending,
1354
1354
  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",
1355
1355
  children: p.isPending ? /* @__PURE__ */ i(R, { children: [
@@ -1371,10 +1371,10 @@ function ts({
1371
1371
  setOpen: r,
1372
1372
  candidates: s,
1373
1373
  showKindChip: u,
1374
- onAdd: h,
1374
+ onAdd: f,
1375
1375
  busy: l
1376
1376
  }) {
1377
- const b = $t(null), x = $t(null), [p, c] = w(null);
1377
+ const b = Gt(null), x = Gt(null), [p, c] = w(null);
1378
1378
  Qa(() => {
1379
1379
  if (!a) {
1380
1380
  c(null);
@@ -1403,7 +1403,7 @@ function ts({
1403
1403
  };
1404
1404
  return document.addEventListener("mousedown", m), () => document.removeEventListener("mousedown", m);
1405
1405
  }, [a, r]);
1406
- const f = a && s.length > 0 && p;
1406
+ const h = a && s.length > 0 && p;
1407
1407
  return /* @__PURE__ */ i("div", { className: "shrink-0 border-b border-border px-5 py-2.5", children: [
1408
1408
  /* @__PURE__ */ i(
1409
1409
  "div",
@@ -1428,7 +1428,7 @@ function ts({
1428
1428
  ]
1429
1429
  }
1430
1430
  ),
1431
- f && typeof document < "u" && Ja(
1431
+ h && typeof document < "u" && Ja(
1432
1432
  /* @__PURE__ */ t(
1433
1433
  "div",
1434
1434
  {
@@ -1445,7 +1445,7 @@ function ts({
1445
1445
  "button",
1446
1446
  {
1447
1447
  type: "button",
1448
- onClick: () => h(m),
1448
+ onClick: () => f(m),
1449
1449
  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",
1450
1450
  children: [
1451
1451
  /* @__PURE__ */ t(vr, { name: m.name || m.email || "?" }),
@@ -1491,21 +1491,21 @@ function xr({
1491
1491
  )
1492
1492
  ] });
1493
1493
  }
1494
- function jt({ children: e }) {
1494
+ function qt({ children: e }) {
1495
1495
  return /* @__PURE__ */ t("label", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: e });
1496
1496
  }
1497
1497
  function vr({ name: e }) {
1498
1498
  const n = e.split(" ").map((a) => a[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
1499
- return /* @__PURE__ */ t(hr, { className: "h-6 w-6 shrink-0", children: /* @__PURE__ */ t(gr, { className: "text-[9px] font-semibold", children: n || "?" }) });
1499
+ return /* @__PURE__ */ t(fr, { className: "h-6 w-6 shrink-0", children: /* @__PURE__ */ t(gr, { className: "text-[9px] font-semibold", children: n || "?" }) });
1500
1500
  }
1501
1501
  function ce(e, n, a) {
1502
- var u, h;
1502
+ var u, f;
1503
1503
  const r = (e.controls || []).find(
1504
1504
  (l) => l.id === a
1505
1505
  );
1506
1506
  if (r)
1507
1507
  return r.label;
1508
- const s = (h = (u = Wt(e, n)) == null ? void 0 : u.controls) == null ? void 0 : h.find(
1508
+ const s = (f = (u = Wt(e, n)) == null ? void 0 : u.controls) == null ? void 0 : f.find(
1509
1509
  (l) => l.id === a
1510
1510
  );
1511
1511
  return (s == null ? void 0 : s.label) || a;
@@ -1524,9 +1524,9 @@ function rs(e) {
1524
1524
  /^Card '(.+)' binding for control '(.+)' maps to missing metric '(.+)'\.$/
1525
1525
  );
1526
1526
  if (u) {
1527
- const [, p, c] = u, f = `${p}:${c}:missing-metric`;
1528
- r.has(f) || r.set(
1529
- f,
1527
+ const [, p, c] = u, h = `${p}:${c}:missing-metric`;
1528
+ r.has(h) || r.set(
1529
+ h,
1530
1530
  `"${le(a, p)}" has an outdated "${ce(
1531
1531
  a,
1532
1532
  p,
@@ -1535,13 +1535,13 @@ function rs(e) {
1535
1535
  );
1536
1536
  continue;
1537
1537
  }
1538
- const h = s.match(
1538
+ const f = s.match(
1539
1539
  /^Card '(.+)' binding for control '(.+)' maps to missing group-by field '(.+)'\.$/
1540
1540
  );
1541
- if (h) {
1542
- const [, p, c] = h, f = `${p}:${c}:missing-group-by`;
1543
- r.has(f) || r.set(
1544
- f,
1541
+ if (f) {
1542
+ const [, p, c] = f, h = `${p}:${c}:missing-group-by`;
1543
+ r.has(h) || r.set(
1544
+ h,
1545
1545
  `"${le(a, p)}" has an outdated "${ce(
1546
1546
  a,
1547
1547
  p,
@@ -1554,9 +1554,9 @@ function rs(e) {
1554
1554
  /^Card '(.+)' binding for control '(.+)' maps to an invalid metric target\.$/
1555
1555
  );
1556
1556
  if (l) {
1557
- const [, p, c] = l, f = `${p}:${c}:invalid-metric`;
1558
- r.has(f) || r.set(
1559
- f,
1557
+ const [, p, c] = l, h = `${p}:${c}:invalid-metric`;
1558
+ r.has(h) || r.set(
1559
+ h,
1560
1560
  `"${le(a, p)}" has an invalid "${ce(
1561
1561
  a,
1562
1562
  p,
@@ -1569,9 +1569,9 @@ function rs(e) {
1569
1569
  /^Card '(.+)' binding for control '(.+)' maps to an invalid group-by target\.$/
1570
1570
  );
1571
1571
  if (b) {
1572
- const [, p, c] = b, f = `${p}:${c}:invalid-group-by`;
1573
- r.has(f) || r.set(
1574
- f,
1572
+ const [, p, c] = b, h = `${p}:${c}:invalid-group-by`;
1573
+ r.has(h) || r.set(
1574
+ h,
1575
1575
  `"${le(a, p)}" has an invalid "${ce(
1576
1576
  a,
1577
1577
  p,
@@ -1584,9 +1584,9 @@ function rs(e) {
1584
1584
  /^Card '(.+)' binding for control '(.+)' requires at least one temporal group-by field\.$/
1585
1585
  );
1586
1586
  if (x) {
1587
- const [, p, c] = x, f = `${p}:${c}:missing-temporal-group-by`;
1588
- r.has(f) || r.set(
1589
- f,
1587
+ const [, p, c] = x, h = `${p}:${c}:missing-temporal-group-by`;
1588
+ r.has(h) || r.set(
1589
+ h,
1590
1590
  `"${le(a, p)}" can no longer use "${ce(
1591
1591
  a,
1592
1592
  p,
@@ -1602,7 +1602,7 @@ function rs(e) {
1602
1602
  function as(e, n) {
1603
1603
  return typeof e == "boolean" ? e : typeof n == "boolean" ? n : !0;
1604
1604
  }
1605
- function qt(e, n) {
1605
+ function Ht(e, n) {
1606
1606
  return {
1607
1607
  dashboard: st(e),
1608
1608
  semanticExecutionPayload: st(n)
@@ -1610,19 +1610,19 @@ function qt(e, n) {
1610
1610
  }
1611
1611
  function ys() {
1612
1612
  var Et, Lt, It, At, Mt, Pt, Ot;
1613
- Xa(), Za();
1613
+ Ya(), Za();
1614
1614
  const {
1615
1615
  authToken: e,
1616
1616
  tokenProps: n,
1617
1617
  id: a,
1618
1618
  showBriefings: r
1619
- } = G(), { isLocalDev: s } = ba(), { openBrandStudioPreview: u } = xa(), { permissions: h } = Ln(), l = va(), { isLoading: b } = ya(), x = N((d) => d.theme), p = N((d) => d.isDownloadingPdf), c = N(
1619
+ } = G(), { isLocalDev: s } = ba(), { openBrandStudioPreview: u } = xa(), { permissions: f } = Ln(), l = va(), { isLoading: b } = ya(), x = N((d) => d.theme), p = N((d) => d.isDownloadingPdf), c = N(
1620
1620
  (d) => d.dashboardAssistantDraftScopeKey
1621
- ), f = N((d) => d.lenses), m = N((d) => d.selectedLensId), g = f == null ? void 0 : f.find((d) => d.id === m), o = N((d) => d.dashboard), y = N((d) => d.selectedSheetId), S = (Et = o == null ? void 0 : o.sheets) == null ? void 0 : Et.find(
1621
+ ), h = N((d) => d.lenses), m = N((d) => d.selectedLensId), g = h == null ? void 0 : h.find((d) => d.id === m), o = N((d) => d.dashboard), y = N((d) => d.selectedSheetId), S = (Et = o == null ? void 0 : o.sheets) == null ? void 0 : Et.find(
1622
1622
  (d) => d.id === y
1623
1623
  ), C = Kr(S), L = C ? (Lt = S == null ? void 0 : S.document) == null ? void 0 : Lt.page : void 0, E = N(
1624
1624
  (d) => d.isDashboardEditing
1625
- ), { setDashboardTitle: D } = N((d) => d.actions), [ae, Q] = w(!1), [ne, he] = w(!1), [W, J] = w(!1), [Y, X] = w(!1), [ge, be] = w(!1), [xe, ve] = w(!1), [ye, B] = w(!1), [Z, ee] = w(null), [z, v] = w([]), [U, H] = w(!1), we = N((d) => d.isDashboardPanelOpen), Ne = N(
1625
+ ), { setDashboardTitle: D } = N((d) => d.actions), [ae, Q] = w(!1), [ne, fe] = w(!1), [W, J] = w(!1), [X, Y] = w(!1), [ge, be] = w(!1), [xe, ve] = w(!1), [ye, B] = w(!1), [Z, ee] = w(null), [z, v] = w([]), [U, j] = w(!1), we = N((d) => d.isDashboardPanelOpen), Ne = N(
1626
1626
  (d) => d.actions.setIsDashboardPanelOpen
1627
1627
  ), Se = N((d) => d.filterValues), A = N((d) => d.isVisualEditing);
1628
1628
  Rt((d) => d.card);
@@ -1632,17 +1632,17 @@ function ys() {
1632
1632
  (d) => d.initialDashboard
1633
1633
  );
1634
1634
  Ue((d) => d.selectedVisual), N((d) => d.selectedFrameId), Rt((d) => d.frame);
1635
- const Ce = se ? (At = se == null ? void 0 : se.permissions) == null ? void 0 : At.canEdit : (It = De == null ? void 0 : De.permissions) == null ? void 0 : It.canEdit, ft = N(
1635
+ const Ce = se ? (At = se == null ? void 0 : se.permissions) == null ? void 0 : At.canEdit : (It = De == null ? void 0 : De.permissions) == null ? void 0 : It.canEdit, ht = N(
1636
1636
  (d) => d.showDashboardJSON
1637
1637
  ), Be = N((d) => d.onSaveFunction), {
1638
- setIsDashboardEditing: ht,
1638
+ setIsDashboardEditing: ft,
1639
1639
  setShowDashboardJSON: gt
1640
1640
  } = N((d) => d.actions), { setInitialDashboard: bt, clearSelectedDashboard: ze } = Ue(
1641
1641
  (d) => d.actions
1642
- ), { resources: ke } = wa(Ye.DASHBOARD), { data: He } = Na(), yr = ((Mt = He == null ? void 0 : He.preference) == null ? void 0 : Mt.defaultDashboardId) || null, { mutate: wr, isPending: Nr } = Sa(), { currentUser: Sr } = lt(), Dr = Da(Sr), T = se || De, xt = T ? {
1642
+ ), { resources: ke } = wa(Xe.DASHBOARD), { data: je } = Na(), yr = ((Mt = je == null ? void 0 : je.preference) == null ? void 0 : Mt.defaultDashboardId) || null, { mutate: wr, isPending: Nr } = Sa(), { currentUser: Sr } = lt(), Dr = Da(Sr), T = se || De, xt = T ? {
1643
1643
  id: T.id,
1644
1644
  title: (o == null ? void 0 : o.title) || T.title || "Dashboard"
1645
- } : null, { handleAddNewFrame: Cr } = Ca(), [je, qe] = w(!1), [kr, oe] = w(!1), [Ve, Ee] = w("close"), ie = ka(Ye.DASHBOARD), [O, Le] = w(null), Er = async (d, M) => {
1645
+ } : null, { handleAddNewFrame: Cr } = Ca(), [qe, He] = w(!1), [kr, oe] = w(!1), [Ve, Ee] = w("close"), ie = ka(Xe.DASHBOARD), [O, Le] = w(null), Er = async (d, M) => {
1646
1646
  if (!(o != null && o.id)) {
1647
1647
  console.log("No dashboard ID found");
1648
1648
  return;
@@ -1700,9 +1700,9 @@ function ys() {
1700
1700
  ), vt = E && !A && de && Ce, { setDashboard: yt } = N((d) => d.actions), wt = N(
1701
1701
  (d) => d.semanticExecutionPayload
1702
1702
  ), Lr = () => {
1703
- ht(!0);
1703
+ ft(!0);
1704
1704
  }, Qe = () => {
1705
- ht(!1), gt(!1), Le(null);
1705
+ ft(!1), gt(!1), Le(null);
1706
1706
  };
1707
1707
  Ge(() => {
1708
1708
  if (!E) {
@@ -1710,7 +1710,7 @@ function ys() {
1710
1710
  return;
1711
1711
  }
1712
1712
  O || !o || b || Le(
1713
- qt(
1713
+ Ht(
1714
1714
  o,
1715
1715
  wt
1716
1716
  )
@@ -1728,7 +1728,7 @@ function ys() {
1728
1728
  300,
1729
1729
  1e3,
1730
1730
  Ze
1731
- ), St = Wa(() => Ie ? Ze(o) !== Ze(Ie) : !1, [o, Ie]), Dt = Nt || Ir, Me = je || ie.isPending, Ar = () => {
1731
+ ), St = Wa(() => Ie ? Ze(o) !== Ze(Ie) : !1, [o, Ie]), Dt = Nt || Ir, Me = qe || ie.isPending, Ar = () => {
1732
1732
  St() ? (Ee("close"), oe(!0)) : (Qe(), Ae());
1733
1733
  }, Mr = async () => {
1734
1734
  await We({
@@ -1755,9 +1755,9 @@ function ys() {
1755
1755
  if (!M)
1756
1756
  return;
1757
1757
  const F = (d == null ? void 0 : d.closeAfterSave) ?? U, Gr = (d == null ? void 0 : d.navigateHomeAfterSave) ?? !1;
1758
- H(F), F && oe(!1);
1758
+ j(F), F && oe(!1);
1759
1759
  const Br = st(M);
1760
- B(!0), ee(null), v([]), qe(!0);
1760
+ B(!0), ee(null), v([]), He(!0);
1761
1761
  const zr = {
1762
1762
  template: M
1763
1763
  };
@@ -1769,25 +1769,25 @@ function ys() {
1769
1769
  {
1770
1770
  onSuccess: (P) => {
1771
1771
  var Oe, _e, _t;
1772
- const q = (P == null ? void 0 : P.id) || ((Oe = P == null ? void 0 : P.dashboard) == null ? void 0 : Oe.id) || ((_e = P == null ? void 0 : P.resource) == null ? void 0 : _e.id) || ((_t = P == null ? void 0 : P.template) == null ? void 0 : _t.id) || null;
1773
- if (!M.id && q) {
1772
+ const H = (P == null ? void 0 : P.id) || ((Oe = P == null ? void 0 : P.dashboard) == null ? void 0 : Oe.id) || ((_e = P == null ? void 0 : P.resource) == null ? void 0 : _e.id) || ((_t = P == null ? void 0 : P.template) == null ? void 0 : _t.id) || null;
1773
+ if (!M.id && H) {
1774
1774
  const Je = Zr.getState(), Re = Je.pendingDashboardDraftMigration;
1775
1775
  (Re == null ? void 0 : Re.scopeKey) === c ? Je.actions.setPendingDashboardDraftMigrationExpectedDashboardId(
1776
- q
1776
+ H
1777
1777
  ) : Re && Je.actions.clearPendingDashboardDraftMigration();
1778
1778
  }
1779
- qe(!1), k.success("Dashboard saved!"), Le(
1780
- qt(
1779
+ He(!1), k.success("Dashboard saved!"), Le(
1780
+ Ht(
1781
1781
  Br,
1782
1782
  N.getState().semanticExecutionPayload
1783
1783
  )
1784
- ), B(!1), H(!1), F && (Qe(), Ae(), Gr && ze()), Ee("close");
1784
+ ), B(!1), j(!1), F && (Qe(), Ae(), Gr && ze()), Ee("close");
1785
1785
  },
1786
1786
  onError: (P) => {
1787
- qe(!1), ee("Failed to save dashboard. Please try again.");
1788
- const q = P.details, Oe = Array.isArray(
1789
- q == null ? void 0 : q.errors
1790
- ) ? (q.errors || []).filter(
1787
+ He(!1), ee("Failed to save dashboard. Please try again.");
1788
+ const H = P.details, Oe = Array.isArray(
1789
+ H == null ? void 0 : H.errors
1790
+ ) ? (H.errors || []).filter(
1791
1791
  (_e) => typeof _e == "string"
1792
1792
  ) : [];
1793
1793
  v(
@@ -1825,12 +1825,12 @@ function ys() {
1825
1825
  dashboardId: o == null ? void 0 : o.id,
1826
1826
  currentLensName: g == null ? void 0 : g.name
1827
1827
  });
1828
- const kt = n.orgUserId || n.tenantId && n.endUserId && n.endUserEmail, Ur = !!kt && !!(e != null && e.accessToken) && !!(n != null && n.apiServiceUrl), Tr = l, j = (o == null ? void 0 : o.id) || null, Fr = as(
1828
+ const kt = n.orgUserId || n.tenantId && n.endUserId && n.endUserEmail, Ur = !!kt && !!(e != null && e.accessToken) && !!(n != null && n.apiServiceUrl), Tr = l, q = (o == null ? void 0 : o.id) || null, Fr = as(
1829
1829
  (Pt = n.config) == null ? void 0 : Pt.showBriefings,
1830
1830
  r
1831
- ), Pe = !!j && yr === j, $r = () => {
1832
- j && wr({
1833
- dashboardId: Pe ? null : j
1831
+ ), Pe = !!q && yr === q, $r = () => {
1832
+ q && wr({
1833
+ dashboardId: Pe ? null : q
1834
1834
  });
1835
1835
  };
1836
1836
  return /* @__PURE__ */ i(
@@ -1842,7 +1842,7 @@ function ys() {
1842
1842
  /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
1843
1843
  kt && /* @__PURE__ */ i(R, { children: [
1844
1844
  /* @__PURE__ */ t(
1845
- Xe,
1845
+ Ye,
1846
1846
  {
1847
1847
  "aria-label": "Manage Dashboards",
1848
1848
  tooltip: "Manage Dashboards",
@@ -1855,14 +1855,14 @@ function ys() {
1855
1855
  }
1856
1856
  ),
1857
1857
  Tr && !A && /* @__PURE__ */ t(
1858
- Xe,
1858
+ Ye,
1859
1859
  {
1860
1860
  "aria-label": "Dashboard Hub",
1861
1861
  tooltip: "Dashboard Hub",
1862
1862
  onClick: _r,
1863
1863
  className: "h-7 w-7 px-0",
1864
1864
  buttonProps: { size: "xs" },
1865
- children: /* @__PURE__ */ t(Xt, { className: "h-3.5 w-3.5" })
1865
+ children: /* @__PURE__ */ t(Yt, { className: "h-3.5 w-3.5" })
1866
1866
  }
1867
1867
  )
1868
1868
  ] }),
@@ -1895,7 +1895,7 @@ function ys() {
1895
1895
  isPending: ie.isPending
1896
1896
  }
1897
1897
  ),
1898
- Ur && j && /* @__PURE__ */ t(Qr, { children: /* @__PURE__ */ i(Wr, { children: [
1898
+ Ur && q && /* @__PURE__ */ t(Qr, { children: /* @__PURE__ */ i(Wr, { children: [
1899
1899
  /* @__PURE__ */ t(Jr, { asChild: !0, children: /* @__PURE__ */ t(
1900
1900
  _,
1901
1901
  {
@@ -1916,7 +1916,7 @@ function ys() {
1916
1916
  )
1917
1917
  }
1918
1918
  ) }),
1919
- /* @__PURE__ */ t(Yr, { children: /* @__PURE__ */ t("p", { children: Pe ? "Remove as default dashboard" : "Make this a default dashboard" }) })
1919
+ /* @__PURE__ */ t(Xr, { children: /* @__PURE__ */ t("p", { children: Pe ? "Remove as default dashboard" : "Make this a default dashboard" }) })
1920
1920
  ] }) })
1921
1921
  ] }))
1922
1922
  ] }),
@@ -1930,21 +1930,21 @@ function ys() {
1930
1930
  {
1931
1931
  variant: "outline",
1932
1932
  size: "xs",
1933
- onClick: () => he(!0),
1933
+ onClick: () => fe(!0),
1934
1934
  children: [
1935
1935
  /* @__PURE__ */ t(Ia, { className: "h-3.5 w-3.5" }),
1936
1936
  "Share"
1937
1937
  ]
1938
1938
  }
1939
1939
  ),
1940
- !A && !E && l && j && Fr && /* @__PURE__ */ t(
1940
+ !A && !E && l && q && Fr && /* @__PURE__ */ t(
1941
1941
  rn,
1942
1942
  {
1943
- dashboardId: j,
1943
+ dashboardId: q,
1944
1944
  dashboardTitle: (o == null ? void 0 : o.title) || (T == null ? void 0 : T.title)
1945
1945
  }
1946
1946
  ),
1947
- !A && E && h.canUseFilters && l && /* @__PURE__ */ t(an, {}),
1947
+ !A && E && f.canUseFilters && l && /* @__PURE__ */ t(an, {}),
1948
1948
  E && !A && de && g && s && l && /* @__PURE__ */ i(
1949
1949
  _,
1950
1950
  {
@@ -1953,7 +1953,7 @@ function ys() {
1953
1953
  disabled: ae,
1954
1954
  onClick: Rr,
1955
1955
  children: [
1956
- /* @__PURE__ */ t(Gt, { className: "h-3.5 w-3.5" }),
1956
+ /* @__PURE__ */ t(Ut, { className: "h-3.5 w-3.5" }),
1957
1957
  "Save Lens"
1958
1958
  ]
1959
1959
  }
@@ -1996,7 +1996,7 @@ function ys() {
1996
1996
  disabled: Me || !Dt,
1997
1997
  onClick: () => We(),
1998
1998
  children: [
1999
- Me ? /* @__PURE__ */ t($e, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(Gt, { className: "h-3.5 w-3.5" }),
1999
+ Me ? /* @__PURE__ */ t($e, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(Ut, { className: "h-3.5 w-3.5" }),
2000
2000
  Me ? "Saving..." : "Save"
2001
2001
  ]
2002
2002
  }
@@ -2009,7 +2009,7 @@ function ys() {
2009
2009
  !A && s && /* @__PURE__ */ t(Nn, {}),
2010
2010
  !A && l && /* @__PURE__ */ i(Ma, { children: [
2011
2011
  /* @__PURE__ */ t(Pa, { asChild: !0, children: /* @__PURE__ */ t(
2012
- Xe,
2012
+ Ye,
2013
2013
  {
2014
2014
  tooltip: "More Options",
2015
2015
  className: "w-7 px-0 text-muted-foreground hover:text-foreground",
@@ -2055,7 +2055,7 @@ function ys() {
2055
2055
  /* @__PURE__ */ t(Fe, {})
2056
2056
  ] }),
2057
2057
  /* @__PURE__ */ t(ue, { children: "Preferences" }),
2058
- /* @__PURE__ */ i($, { onClick: () => X(!0), children: [
2058
+ /* @__PURE__ */ i($, { onClick: () => Y(!0), children: [
2059
2059
  /* @__PURE__ */ t(ar, { className: "h-3.5 w-3.5" }),
2060
2060
  "Calendar Preferences"
2061
2061
  ] }),
@@ -2072,7 +2072,7 @@ function ys() {
2072
2072
  ).catch(() => k.error("Unable to copy token")) : k.error("Clipboard not available"));
2073
2073
  },
2074
2074
  children: [
2075
- /* @__PURE__ */ t(Tt, { className: "h-3.5 w-3.5" }),
2075
+ /* @__PURE__ */ t(Ft, { className: "h-3.5 w-3.5" }),
2076
2076
  "Copy token"
2077
2077
  ]
2078
2078
  }
@@ -2100,7 +2100,7 @@ function ys() {
2100
2100
  ) : k.error("Clipboard not available");
2101
2101
  },
2102
2102
  children: [
2103
- /* @__PURE__ */ t(Tt, { className: "h-3.5 w-3.5" }),
2103
+ /* @__PURE__ */ t(Ft, { className: "h-3.5 w-3.5" }),
2104
2104
  "Copy local document PDF URL"
2105
2105
  ]
2106
2106
  }
@@ -2108,7 +2108,7 @@ function ys() {
2108
2108
  /* @__PURE__ */ i(
2109
2109
  $,
2110
2110
  {
2111
- onSelect: () => Xr(n.apiServiceUrl),
2111
+ onSelect: () => Yr(n.apiServiceUrl),
2112
2112
  children: [
2113
2113
  /* @__PURE__ */ t(gn, { className: "h-3.5 w-3.5" }),
2114
2114
  "Invalidate token"
@@ -2122,10 +2122,10 @@ function ys() {
2122
2122
  E && /* @__PURE__ */ i(
2123
2123
  $,
2124
2124
  {
2125
- onSelect: () => gt(!ft),
2125
+ onSelect: () => gt(!ht),
2126
2126
  children: [
2127
2127
  /* @__PURE__ */ t(un, { className: "h-3.5 w-3.5" }),
2128
- ft ? "Hide dashboard JSON" : "Show dashboard JSON"
2128
+ ht ? "Hide dashboard JSON" : "Show dashboard JSON"
2129
2129
  ]
2130
2130
  }
2131
2131
  ),
@@ -2149,8 +2149,8 @@ function ys() {
2149
2149
  $a,
2150
2150
  {
2151
2151
  resource: xt,
2152
- resourceType: Ye.DASHBOARD,
2153
- onClose: () => he(!1)
2152
+ resourceType: Xe.DASHBOARD,
2153
+ onClose: () => fe(!1)
2154
2154
  }
2155
2155
  ),
2156
2156
  /* @__PURE__ */ t(
@@ -2163,8 +2163,8 @@ function ys() {
2163
2163
  /* @__PURE__ */ t(
2164
2164
  dn,
2165
2165
  {
2166
- open: Y,
2167
- onOpenChange: X
2166
+ open: X,
2167
+ onOpenChange: Y
2168
2168
  }
2169
2169
  ),
2170
2170
  s && de && l && /* @__PURE__ */ t(kn, { open: ge, onOpenChange: be }),
@@ -2180,12 +2180,12 @@ function ys() {
2180
2180
  {
2181
2181
  open: ye,
2182
2182
  onOpenChange: (d) => {
2183
- !d && je && !Z || (B(d), d || (ee(null), v([]), H(!1)));
2183
+ !d && qe && !Z || (B(d), d || (ee(null), v([]), j(!1)));
2184
2184
  },
2185
2185
  children: /* @__PURE__ */ i(za, { className: "max-w-sm", children: [
2186
- /* @__PURE__ */ i(Ha, { children: [
2187
- /* @__PURE__ */ t(ja, { children: Z ? "Save failed" : "Saving dashboard" }),
2188
- /* @__PURE__ */ t(qa, { className: "pt-2", children: Z ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
2186
+ /* @__PURE__ */ i(ja, { children: [
2187
+ /* @__PURE__ */ t(qa, { children: Z ? "Save failed" : "Saving dashboard" }),
2188
+ /* @__PURE__ */ t(Ha, { className: "pt-2", children: Z ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
2189
2189
  z.length > 0 && /* @__PURE__ */ i("div", { className: "space-y-1 rounded-md border border-destructive/20 bg-destructive/5 p-3 text-left", children: [
2190
2190
  /* @__PURE__ */ t("div", { className: "text-sm font-medium text-destructive", children: "What needs attention" }),
2191
2191
  /* @__PURE__ */ t("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children: z.slice(0, 5).map((d) => /* @__PURE__ */ t("li", { children: d }, d)) })
@@ -2196,14 +2196,14 @@ function ys() {
2196
2196
  Ka,
2197
2197
  {
2198
2198
  onClick: () => {
2199
- B(!1), ee(null), v([]), H(!1);
2199
+ B(!1), ee(null), v([]), j(!1);
2200
2200
  },
2201
2201
  className: "m-0",
2202
2202
  children: "Close"
2203
2203
  }
2204
2204
  ),
2205
2205
  /* @__PURE__ */ t(
2206
- Ft,
2206
+ $t,
2207
2207
  {
2208
2208
  onClick: () => We({
2209
2209
  closeAfterSave: U,
@@ -2213,7 +2213,7 @@ function ys() {
2213
2213
  children: "Retry"
2214
2214
  }
2215
2215
  )
2216
- ] }) : /* @__PURE__ */ i(Ft, { disabled: !0, className: "m-0 cursor-default", children: [
2216
+ ] }) : /* @__PURE__ */ i($t, { disabled: !0, className: "m-0 cursor-default", children: [
2217
2217
  /* @__PURE__ */ t($e, { className: "mr-2 h-4 w-4 animate-spin" }),
2218
2218
  "Saving..."
2219
2219
  ] }) })
@@ -2229,7 +2229,7 @@ function ys() {
2229
2229
  },
2230
2230
  onSave: Mr,
2231
2231
  onDiscard: Pr,
2232
- isSaving: je,
2232
+ isSaving: qe,
2233
2233
  saveLabel: "Save",
2234
2234
  discardLabel: "Discard"
2235
2235
  }
@@ -2249,10 +2249,10 @@ function ns({
2249
2249
  }) {
2250
2250
  if (!e || !a)
2251
2251
  return null;
2252
- const h = new URL("http://localhost:5173/print-document");
2253
- h.searchParams.set("token", e), n && h.searchParams.set("dashboardId", n), h.searchParams.set("selectedSheetId", a), u && h.searchParams.set("theme", u);
2252
+ const f = new URL("http://localhost:5173/print-document");
2253
+ f.searchParams.set("token", e), n && f.searchParams.set("dashboardId", n), f.searchParams.set("selectedSheetId", a), u && f.searchParams.set("theme", u);
2254
2254
  const l = new URL("http://127.0.0.1:3002/");
2255
- return l.searchParams.set("pdfMode", "document"), l.searchParams.set("pageSize", r || "letter"), l.searchParams.set("orientation", s || "portrait"), l.searchParams.set("url", h.toString()), l.toString();
2255
+ return l.searchParams.set("pdfMode", "document"), l.searchParams.set("pageSize", r || "letter"), l.searchParams.set("orientation", s || "portrait"), l.searchParams.set("url", f.toString()), l.toString();
2256
2256
  }
2257
2257
  export {
2258
2258
  ys as default