react-semaphor 0.1.542 → 0.1.544

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 (66) hide show
  1. package/dist/activity/index.js +73 -0
  2. package/dist/assistant-context/index.js +1 -1
  3. package/dist/briefings/index.js +51 -50
  4. package/dist/chunks/{apply-dashboard-operations-Btbp2-6v.js → apply-dashboard-operations-Bz4n1Lq6.js} +44 -44
  5. package/dist/chunks/{assistant-chat-oHF5lTjA.js → assistant-chat-BNLkCDml.js} +288 -288
  6. package/dist/chunks/{comparison-window-caption-ChIyd_-L.js → comparison-window-caption-BTkrN3W4.js} +468 -463
  7. package/dist/chunks/dashboard-briefing-launcher-DQ_8O_e2.js +3725 -0
  8. package/dist/chunks/{dashboard-controls-CIn22Qgp.js → dashboard-controls-8RyBTQUO.js} +530 -525
  9. package/dist/chunks/dashboard-g5a4DKWq.js +14 -0
  10. package/dist/chunks/{dashboard-json-ZUYsIExq.js → dashboard-json-7qT9jmfL.js} +1 -1
  11. package/dist/chunks/{document-dashboard-inputs-C6MJVyoI.js → document-dashboard-inputs-BC6p-ESg.js} +4 -4
  12. package/dist/chunks/{document-sheet-utils-BsZUnHRl.js → document-sheet-utils-Duo9uLoH.js} +11 -11
  13. package/dist/chunks/{edit-dashboard-visual-DLdereA7.js → edit-dashboard-visual-BfJwnRIZ.js} +249 -248
  14. package/dist/chunks/export-file-format-C-tJsxsf.js +111 -0
  15. package/dist/chunks/{index-CV5rHq5D.js → index-DkAyQvC6.js} +59 -58
  16. package/dist/chunks/{matrix-formatter-BnsTX90d.js → matrix-formatter-CxJLkztA.js} +1 -1
  17. package/dist/chunks/{numeric-presentation-BSAqPpHt.js → numeric-presentation-DESvLiu9.js} +1 -1
  18. package/dist/chunks/{pivot-result-lifecycle-BBlAfBA0.js → pivot-result-lifecycle-DM4CyGKs.js} +287 -395
  19. package/dist/chunks/{raw-temporal-presentation-CZ2r0Vb_.js → raw-temporal-presentation-CLiVi90c.js} +2 -2
  20. package/dist/chunks/{report-preferences-dialog-MRUWpMcJ.js → report-preferences-dialog-Df7VpRVW.js} +195 -195
  21. package/dist/chunks/{saved-dashboard-context-DjPqgFly.js → saved-dashboard-context-B-mQ--nV.js} +3 -3
  22. package/dist/chunks/{semaphor-ready-indicator-BWSpRsPj.js → semaphor-ready-indicator-DDAxk8us.js} +39892 -39380
  23. package/dist/chunks/{shelf-drop-preview-context-CQbFLm3q.js → shelf-drop-preview-context-BSRPwaED.js} +414 -371
  24. package/dist/chunks/{table-export-sheet-BHSnuZHd.js → table-export-sheet-CPfGAQ9X.js} +1 -1
  25. package/dist/chunks/{use-create-flow-overlay-state-BJDNqdOh.js → use-create-flow-overlay-state-BxzFviM-.js} +67 -78
  26. package/dist/dashboard/index.js +1 -1
  27. package/dist/dashboard-authoring/index.js +72 -72
  28. package/dist/data-app-sdk/index.js +1 -1
  29. package/dist/format-utils/index.js +226 -223
  30. package/dist/index.js +266 -271
  31. package/dist/style.css +1 -1
  32. package/dist/surfboard/index.js +1 -1
  33. package/dist/types/activity.d.ts +2 -0
  34. package/dist/types/components/activity/activity-bell.d.ts +11 -0
  35. package/dist/types/components/activity/activity-instance.d.ts +50 -0
  36. package/dist/types/components/activity/activity-notices.d.ts +7 -0
  37. package/dist/types/components/activity/activity-provider.d.ts +21 -0
  38. package/dist/types/components/activity/activity-types.d.ts +177 -0
  39. package/dist/types/components/activity/index.d.ts +6 -0
  40. package/dist/types/components/activity/use-activity.d.ts +20 -0
  41. package/dist/types/components/briefings/briefing-author/run-model.d.ts +1 -2
  42. package/dist/types/components/briefings/briefing-author.d.ts +14 -12
  43. package/dist/types/components/briefings/dashboard-briefing-launcher.d.ts +5 -0
  44. package/dist/types/components/briefings/use-briefing-run-detail.d.ts +34 -0
  45. package/dist/types/components/index.d.ts +1 -4
  46. package/dist/types/lib/activity-identity.d.ts +21 -0
  47. package/dist/types/lib/api/exports-api.d.ts +4 -4
  48. package/dist/types/lib/hooks/index.d.ts +1 -3
  49. package/dist/types/lib/matrix-table/matrix-delivery.d.ts +4 -0
  50. package/dist/types/shared/activity/activity-contract.d.ts +84 -0
  51. package/dist/types/shared/activity/index.d.ts +5 -0
  52. package/dist/types/shared/dashboard-authoring/card-export-request.d.ts +6 -0
  53. package/dist/types/shared/format-utils/export-policy.d.ts +12 -0
  54. package/package.json +5 -1
  55. package/dist/chunks/dashboard-briefing-launcher-B-cm719R.js +0 -4248
  56. package/dist/chunks/dashboard-s5WJBcK8.js +0 -14
  57. package/dist/types/components/briefings/briefing-author/run-ui.d.ts +0 -81
  58. package/dist/types/components/briefings/use-briefing-run-polling.d.ts +0 -34
  59. package/dist/types/components/notifications/export-notification-item.d.ts +0 -24
  60. package/dist/types/components/notifications/export-notification-list.d.ts +0 -8
  61. package/dist/types/components/notifications/index.d.ts +0 -3
  62. package/dist/types/components/notifications/notification-bell.d.ts +0 -13
  63. package/dist/types/lib/exports/bounded-request.d.ts +0 -12
  64. package/dist/types/lib/hooks/use-export-polling.d.ts +0 -32
  65. package/dist/types/lib/hooks/use-export-recovery.d.ts +0 -11
  66. package/dist/types/lib/stores/export-store.d.ts +0 -62
@@ -1,39 +1,39 @@
1
1
  import { jsx as t, jsxs as i, Fragment as $ } from "react/jsx-runtime";
2
- import { bz as Br, u as C, bA as Gr, bB as at, bC as Vr, bD as jr, bE as Hr, bF as qr, bG as zr, bH as Kr, aX as z, aV as ge, bI as xe, bJ as Qr, bu as Vt, bv as jt, bx as Xe, by as Ze, bK as Ht, aI as nt, aR as ee, bL as Wr, bM as Yr, bN as qt, bO as Jr, bP as zt, bw as Xr, bQ as Zr, bR as P, bS as ea, bT as ta, bU as ra, at as aa, b6 as na, bV as oa, bW as sa, bX as ia, g as da, Z as Nt, f as Le, m as ca, h as Qe, bY as la, bZ as ua, b_ as ma, b$ as ha, I as pa, c0 as fa, s as ba, c1 as ga, c2 as xa, b8 as va, c3 as ya, c4 as wa, c5 as St, c6 as kt, c7 as Ct, c8 as Na, c9 as Sa, ca as ka, cb as Ca, cc as Me, cd as Da, ce as Ea, cf as We, cg as Ia, ch as Dt, l as Aa, ci as La, cj as Ma, ck as Oa, cl as _a, cm as Pa, cn as Ra, co as Ua, cp as Ta, cq as Et } from "./semaphor-ready-indicator-BWSpRsPj.js";
3
- import { B as T, Z as $a, _ as Fa, $ as et, L as _e, l as Ba, r as Ga, s as Va, t as ja, u as Ha, v as qa, P as za, a as Ka, b as Qa, m as It, n as At, o as Lt, p as Mt, I as Wa } from "./switch-C3jLxlG0.js";
4
- import { c as te, X as Kt, C as Ya } from "./x-4f5U2XwU.js";
2
+ import { bz as jr, u as C, bA as Hr, bB as nt, bC as qr, bD as zr, bE as Kr, bF as Qr, bG as Wr, bH as Yr, aX as K, aV as ve, bI as ye, bJ as Jr, bu as Ht, bv as qt, bx as Ze, by as et, bK as zt, aH as ot, aQ as ee, bL as Xr, bM as Zr, bN as Kt, bO as ea, bP as Qt, bw as ta, bQ as ra, bR as P, bS as aa, bT as na, bU as oa, as as sa, b6 as ia, bV as da, bW as ca, bX as la, g as ua, L as ma, Y as kt, f as Oe, m as ha, h as We, bY as pa, bZ as fa, b_ as ba, b$ as ga, J as xa, c0 as va, s as ya, c1 as wa, c2 as Na, b8 as Sa, c3 as ka, c4 as Ca, c5 as Ct, c6 as Dt, c7 as Et, c8 as Da, c9 as Ea, ca as Ia, cb as Aa, cc as _e, cd as La, ce as Ma, cf as Ye, cg as Oa, ch as It, l as _a, ci as Pa, cj as Ra, ck as Ta, cl as Ua, cm as $a, cn as Ba, co as Fa, cp as Ga, cq as At } from "./semaphor-ready-indicator-DDAxk8us.js";
3
+ import { B as U, Z as Va, _ as ja, $ as tt, L as Re, l as Ha, r as qa, s as za, t as Ka, u as Qa, v as Wa, P as Ya, a as Ja, b as Xa, m as Lt, n as Mt, o as Ot, p as _t, I as Za } from "./switch-C3jLxlG0.js";
4
+ import { c as te, X as Wt, C as en } from "./x-4f5U2XwU.js";
5
5
  import * as I from "react";
6
- import Qt, { useMemo as j, useState as S, useEffect as Pe, useRef as Ot, useLayoutEffect as Ja } from "react";
7
- import { ae as D } from "./numeric-presentation-BSAqPpHt.js";
6
+ import Yt, { useMemo as V, useState as S, useEffect as ge, useRef as Pt, useLayoutEffect as tn } from "react";
7
+ import { ae as D } from "./numeric-presentation-DESvLiu9.js";
8
8
  import "./index-CuHybtft.js";
9
9
  import "./validators-DMHTpf7a.js";
10
10
  import "./matrix-operation-contract-8OIO4gob.js";
11
11
  import "./analytics-base-schemas-BFAoRlkU.js";
12
12
  import "zod";
13
13
  import "../value-format-preferences/index.js";
14
- import { c as be } from "./class-utils-Df1OVOT1.js";
15
- import { d as Xa, c as Za, u as en, A as tn, a as rn, g as an, V as nn, N as on, i as sn, h as dn, U as cn } from "./dashboard-briefing-launcher-B-cm719R.js";
16
- import { I as ln } from "./use-create-flow-overlay-state-BJDNqdOh.js";
17
- import { h as un, R as mn } from "./report-preferences-dialog-MRUWpMcJ.js";
18
- import { createPortal as hn } from "react-dom";
19
- import { a7 as ve, a8 as ot, a9 as Wt, aa as pn, ab as _t, ac as fn } from "./document-dashboard-inputs-C6MJVyoI.js";
20
- import { S as bn, C as gn } from "./selection-reducer-Dj_8xD69.js";
21
- import { o as Yt } from "./matrix-formatter-BnsTX90d.js";
22
- import { Z as Pt, _ as xn, $ as vn, x as yn, a as tt } from "./document-sheet-utils-BsZUnHRl.js";
23
- import { r as wn } from "./pivot-result-lifecycle-BBlAfBA0.js";
24
- import { u as Nn } from "./use-debounced-dirty-check-BwAbnX_5.js";
25
- import { s as Sn } from "./normalize-dashboard-for-dirty-check-Bk3VYv_q.js";
26
- import { B as Re, u as Rt } from "./table-settings-CLZocegs.js";
27
- import { S as kn } from "./save-CfJpQQ68.js";
28
- import { P as Cn } from "./palette-D10o_yYX.js";
29
- import { B as Dn } from "./braces-o9UiRQes.js";
14
+ import { c as xe } from "./class-utils-Df1OVOT1.js";
15
+ import { u as rn, A as an, a as nn, e as on, V as sn, b as dn, i as cn, f as ln, U as un } from "./dashboard-briefing-launcher-DQ_8O_e2.js";
16
+ import { I as mn } from "./use-create-flow-overlay-state-BxzFviM-.js";
17
+ import { h as hn, R as pn } from "./report-preferences-dialog-Df7VpRVW.js";
18
+ import { createPortal as fn } from "react-dom";
19
+ import { a7 as we, a8 as st, a9 as Jt, aa as bn, ab as Rt, ac as gn } from "./document-dashboard-inputs-BC6p-ESg.js";
20
+ import { S as xn, C as vn } from "./selection-reducer-Dj_8xD69.js";
21
+ import { o as Xt } from "./matrix-formatter-CxJLkztA.js";
22
+ import { Z as Tt, _ as yn, $ as wn, x as Nn, a as rt } from "./document-sheet-utils-Duo9uLoH.js";
23
+ import { r as Sn } from "./export-file-format-C-tJsxsf.js";
24
+ import { u as kn } from "./use-debounced-dirty-check-BwAbnX_5.js";
25
+ import { s as Cn } from "./normalize-dashboard-for-dirty-check-Bk3VYv_q.js";
26
+ import { B as Te, u as Ut } from "./table-settings-CLZocegs.js";
27
+ import { S as Dn } from "./save-CfJpQQ68.js";
28
+ import { P as En } from "./palette-D10o_yYX.js";
29
+ import { B as In } from "./braces-o9UiRQes.js";
30
30
  /**
31
31
  * @license lucide-react v0.453.0 - ISC
32
32
  *
33
33
  * This source code is licensed under the ISC license.
34
34
  * See the LICENSE file in the root directory of this source tree.
35
35
  */
36
- const En = te("Monitor", [
36
+ const An = te("Monitor", [
37
37
  ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
38
38
  ["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
39
39
  ["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
@@ -44,7 +44,7 @@ const En = te("Monitor", [
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 In = te("Moon", [
47
+ const Ln = te("Moon", [
48
48
  ["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
49
49
  ]);
50
50
  /**
@@ -53,7 +53,7 @@ const In = te("Moon", [
53
53
  * This source code is licensed under the ISC license.
54
54
  * See the LICENSE file in the root directory of this source tree.
55
55
  */
56
- const An = te("ShieldX", [
56
+ const Mn = te("ShieldX", [
57
57
  [
58
58
  "path",
59
59
  {
@@ -70,7 +70,7 @@ const An = te("ShieldX", [
70
70
  * This source code is licensed under the ISC license.
71
71
  * See the LICENSE file in the root directory of this source tree.
72
72
  */
73
- const Ln = te("Sun", [
73
+ const On = te("Sun", [
74
74
  ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
75
75
  ["path", { d: "M12 2v2", key: "tus03m" }],
76
76
  ["path", { d: "M12 20v2", key: "1lh1kg" }],
@@ -87,7 +87,7 @@ const Ln = te("Sun", [
87
87
  * This source code is licensed under the ISC license.
88
88
  * See the LICENSE file in the root directory of this source tree.
89
89
  */
90
- const Mn = te("UserPlus", [
90
+ const _n = te("UserPlus", [
91
91
  ["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
92
92
  ["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
93
93
  ["line", { x1: "19", x2: "19", y1: "8", y2: "14", key: "1bvyxn" }],
@@ -99,11 +99,11 @@ const Mn = te("UserPlus", [
99
99
  * This source code is licensed under the ISC license.
100
100
  * See the LICENSE file in the root directory of this source tree.
101
101
  */
102
- const Jt = te("UserRound", [
102
+ const Zt = te("UserRound", [
103
103
  ["circle", { cx: "12", cy: "8", r: "5", key: "1hypcn" }],
104
104
  ["path", { d: "M20 21a8 8 0 0 0-16 0", key: "rfgkzh" }]
105
105
  ]);
106
- var rt = { exports: {} }, Ye = {};
106
+ var at = { exports: {} }, Je = {};
107
107
  /**
108
108
  * @license React
109
109
  * use-sync-external-store-shim.production.js
@@ -113,11 +113,11 @@ var rt = { exports: {} }, Ye = {};
113
113
  * This source code is licensed under the MIT license found in the
114
114
  * LICENSE file in the root directory of this source tree.
115
115
  */
116
- var Ut;
117
- function On() {
118
- if (Ut) return Ye;
119
- Ut = 1;
120
- var e = Qt;
116
+ var $t;
117
+ function Pn() {
118
+ if ($t) return Je;
119
+ $t = 1;
120
+ var e = Yt;
121
121
  function n(l, u) {
122
122
  return l === u && (l !== 0 || 1 / l === 1 / u) || l !== l && u !== u;
123
123
  }
@@ -152,9 +152,9 @@ function On() {
152
152
  return u();
153
153
  }
154
154
  var g = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? f : p;
155
- return Ye.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : g, Ye;
155
+ return Je.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : g, Je;
156
156
  }
157
- var Je = {};
157
+ var Xe = {};
158
158
  /**
159
159
  * @license React
160
160
  * use-sync-external-store-shim.development.js
@@ -164,9 +164,9 @@ var Je = {};
164
164
  * This source code is licensed under the MIT license found in the
165
165
  * LICENSE file in the root directory of this source tree.
166
166
  */
167
- var Tt;
168
- function _n() {
169
- return Tt || (Tt = 1, process.env.NODE_ENV !== "production" && function() {
167
+ var Bt;
168
+ function Rn() {
169
+ return Bt || (Bt = 1, process.env.NODE_ENV !== "production" && function() {
170
170
  function e(s, x) {
171
171
  return s === x && (s !== 0 || 1 / s === 1 / x) || s !== s && x !== x;
172
172
  }
@@ -213,24 +213,24 @@ function _n() {
213
213
  return x();
214
214
  }
215
215
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
216
- var o = Qt, c = typeof Object.is == "function" ? Object.is : e, m = o.useState, p = o.useEffect, b = o.useLayoutEffect, f = o.useDebugValue, g = !1, l = !1, u = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : n;
217
- Je.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : u, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
218
- }()), Je;
216
+ var o = Yt, c = typeof Object.is == "function" ? Object.is : e, m = o.useState, p = o.useEffect, b = o.useLayoutEffect, f = o.useDebugValue, g = !1, l = !1, u = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : n;
217
+ Xe.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : u, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
218
+ }()), Xe;
219
219
  }
220
- process.env.NODE_ENV === "production" ? rt.exports = On() : rt.exports = _n();
221
- var Pn = rt.exports;
222
- const Oe = ["light", "dark", "system"];
223
- function Rn() {
224
- const { theme: e, setTheme: n } = Br(), a = C(
220
+ process.env.NODE_ENV === "production" ? at.exports = Pn() : at.exports = Rn();
221
+ var Tn = at.exports;
222
+ const Pe = ["light", "dark", "system"];
223
+ function Un() {
224
+ const { theme: e, setTheme: n } = jr(), a = C(
225
225
  (m) => m.actions.setDashboardTheme
226
226
  );
227
227
  function r() {
228
- const m = Oe.includes(e) ? e : "system", p = Oe[(Oe.indexOf(m) + 1) % Oe.length];
228
+ const m = Pe.includes(e) ? e : "system", p = Pe[(Pe.indexOf(m) + 1) % Pe.length];
229
229
  n(p), a(p);
230
230
  }
231
- const o = e === "light" ? Ln : e === "dark" ? In : En, c = e === "light" ? "Theme: light (click for dark)" : e === "dark" ? "Theme: dark (click for system)" : "Theme: system (click for light)";
231
+ const o = e === "light" ? On : e === "dark" ? Ln : An, c = e === "light" ? "Theme: light (click for dark)" : e === "dark" ? "Theme: dark (click for system)" : "Theme: system (click for light)";
232
232
  return /* @__PURE__ */ t(
233
- T,
233
+ U,
234
234
  {
235
235
  type: "button",
236
236
  variant: "ghost",
@@ -243,19 +243,19 @@ function Rn() {
243
243
  }
244
244
  );
245
245
  }
246
- function Un() {
247
- const { displayPreferences: e, shouldShowElement: n } = Gr(), { currentUser: a, userContext: r } = at(), o = j(
248
- () => Vr(a),
246
+ function $n() {
247
+ const { displayPreferences: e, shouldShowElement: n } = Hr(), { currentUser: a, userContext: r } = nt(), o = V(
248
+ () => qr(a),
249
249
  [a]
250
- ), c = j(() => (p) => o && o[p] !== void 0 && o[p] === !1 ? !1 : n(p), [o, n, e]), m = j(
250
+ ), c = V(() => (p) => o && o[p] !== void 0 && o[p] === !1 ? !1 : n(p), [o, n, e]), m = V(
251
251
  () => {
252
252
  var p, b, f, g, l;
253
253
  return {
254
- canEdit: ((p = r == null ? void 0 : r.permissions) == null ? void 0 : p.canEdit) ?? Kr(a),
255
- canUseFilters: ((b = r == null ? void 0 : r.permissions) == null ? void 0 : b.canEdit) ?? zr(a),
256
- canManageDashboards: ((f = r == null ? void 0 : r.permissions) == null ? void 0 : f.canCreateDashboard) ?? qr(a),
257
- canCreateDashboards: ((g = r == null ? void 0 : r.permissions) == null ? void 0 : g.canCreateDashboard) ?? Hr(a),
258
- canAccessVisuals: ((l = r == null ? void 0 : r.permissions) == null ? void 0 : l.canEdit) ?? jr(a)
254
+ canEdit: ((p = r == null ? void 0 : r.permissions) == null ? void 0 : p.canEdit) ?? Yr(a),
255
+ canUseFilters: ((b = r == null ? void 0 : r.permissions) == null ? void 0 : b.canEdit) ?? Wr(a),
256
+ canManageDashboards: ((f = r == null ? void 0 : r.permissions) == null ? void 0 : f.canCreateDashboard) ?? Qr(a),
257
+ canCreateDashboards: ((g = r == null ? void 0 : r.permissions) == null ? void 0 : g.canCreateDashboard) ?? Kr(a),
258
+ canAccessVisuals: ((l = r == null ? void 0 : r.permissions) == null ? void 0 : l.canEdit) ?? zr(a)
259
259
  };
260
260
  },
261
261
  [a, r]
@@ -267,7 +267,7 @@ function Un() {
267
267
  currentUser: a
268
268
  };
269
269
  }
270
- function Tn(e, n = []) {
270
+ function Bn(e, n = []) {
271
271
  let a = [];
272
272
  function r(c, m) {
273
273
  const p = I.createContext(m);
@@ -299,9 +299,9 @@ function Tn(e, n = []) {
299
299
  );
300
300
  };
301
301
  };
302
- return o.scopeName = e, [r, $n(o, ...n)];
302
+ return o.scopeName = e, [r, Fn(o, ...n)];
303
303
  }
304
- function $n(...e) {
304
+ function Fn(...e) {
305
305
  const n = e[0];
306
306
  if (e.length === 1) return n;
307
307
  const a = () => {
@@ -319,7 +319,7 @@ function $n(...e) {
319
319
  };
320
320
  return a.scopeName = n.scopeName, a;
321
321
  }
322
- var Fn = [
322
+ var Gn = [
323
323
  "a",
324
324
  "button",
325
325
  "div",
@@ -337,73 +337,73 @@ var Fn = [
337
337
  "span",
338
338
  "svg",
339
339
  "ul"
340
- ], st = Fn.reduce((e, n) => {
341
- const a = $a(`Primitive.${n}`), r = I.forwardRef((o, c) => {
340
+ ], it = Gn.reduce((e, n) => {
341
+ const a = Va(`Primitive.${n}`), r = I.forwardRef((o, c) => {
342
342
  const { asChild: m, ...p } = o, b = m ? a : n;
343
343
  return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ t(b, { ...p, ref: c });
344
344
  });
345
345
  return r.displayName = `Primitive.${n}`, { ...e, [n]: r };
346
346
  }, {});
347
- function Bn() {
348
- return Pn.useSyncExternalStore(
349
- Gn,
347
+ function Vn() {
348
+ return Tn.useSyncExternalStore(
349
+ jn,
350
350
  () => !0,
351
351
  () => !1
352
352
  );
353
353
  }
354
- function Gn() {
354
+ function jn() {
355
355
  return () => {
356
356
  };
357
357
  }
358
- var it = "Avatar", [Vn] = Tn(it), [jn, Xt] = Vn(it), Zt = I.forwardRef(
358
+ var dt = "Avatar", [Hn] = Bn(dt), [qn, er] = Hn(dt), tr = I.forwardRef(
359
359
  (e, n) => {
360
360
  const { __scopeAvatar: a, ...r } = e, [o, c] = I.useState("idle");
361
361
  return /* @__PURE__ */ t(
362
- jn,
362
+ qn,
363
363
  {
364
364
  scope: a,
365
365
  imageLoadingStatus: o,
366
366
  onImageLoadingStatusChange: c,
367
- children: /* @__PURE__ */ t(st.span, { ...r, ref: n })
367
+ children: /* @__PURE__ */ t(it.span, { ...r, ref: n })
368
368
  }
369
369
  );
370
370
  }
371
371
  );
372
- Zt.displayName = it;
373
- var er = "AvatarImage", tr = I.forwardRef(
372
+ tr.displayName = dt;
373
+ var rr = "AvatarImage", ar = I.forwardRef(
374
374
  (e, n) => {
375
375
  const { __scopeAvatar: a, src: r, onLoadingStatusChange: o = () => {
376
- }, ...c } = e, m = Xt(er, a), p = Hn(r, c), b = Fa((f) => {
376
+ }, ...c } = e, m = er(rr, a), p = zn(r, c), b = ja((f) => {
377
377
  o(f), m.onImageLoadingStatusChange(f);
378
378
  });
379
- return et(() => {
379
+ return tt(() => {
380
380
  p !== "idle" && b(p);
381
- }, [p, b]), p === "loaded" ? /* @__PURE__ */ t(st.img, { ...c, ref: n, src: r }) : null;
381
+ }, [p, b]), p === "loaded" ? /* @__PURE__ */ t(it.img, { ...c, ref: n, src: r }) : null;
382
382
  }
383
383
  );
384
- tr.displayName = er;
385
- var rr = "AvatarFallback", ar = I.forwardRef(
384
+ ar.displayName = rr;
385
+ var nr = "AvatarFallback", or = I.forwardRef(
386
386
  (e, n) => {
387
- const { __scopeAvatar: a, delayMs: r, ...o } = e, c = Xt(rr, a), [m, p] = I.useState(r === void 0);
387
+ const { __scopeAvatar: a, delayMs: r, ...o } = e, c = er(nr, a), [m, p] = I.useState(r === void 0);
388
388
  return I.useEffect(() => {
389
389
  if (r !== void 0) {
390
390
  const b = window.setTimeout(() => p(!0), r);
391
391
  return () => window.clearTimeout(b);
392
392
  }
393
- }, [r]), m && c.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ t(st.span, { ...o, ref: n }) : null;
393
+ }, [r]), m && c.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ t(it.span, { ...o, ref: n }) : null;
394
394
  }
395
395
  );
396
- ar.displayName = rr;
397
- function $t(e, n) {
396
+ or.displayName = nr;
397
+ function Ft(e, n) {
398
398
  return e ? n ? (e.src !== n && (e.src = n), e.complete && e.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
399
399
  }
400
- function Hn(e, { referrerPolicy: n, crossOrigin: a }) {
401
- const r = Bn(), o = I.useRef(null), c = r ? (o.current || (o.current = new window.Image()), o.current) : null, [m, p] = I.useState(
402
- () => $t(c, e)
400
+ function zn(e, { referrerPolicy: n, crossOrigin: a }) {
401
+ const r = Vn(), o = I.useRef(null), c = r ? (o.current || (o.current = new window.Image()), o.current) : null, [m, p] = I.useState(
402
+ () => Ft(c, e)
403
403
  );
404
- return et(() => {
405
- p($t(c, e));
406
- }, [c, e]), et(() => {
404
+ return tt(() => {
405
+ p(Ft(c, e));
406
+ }, [c, e]), tt(() => {
407
407
  const b = (l) => () => {
408
408
  p(l);
409
409
  };
@@ -414,108 +414,108 @@ function Hn(e, { referrerPolicy: n, crossOrigin: a }) {
414
414
  };
415
415
  }, [c, a, n]), m;
416
416
  }
417
- var nr = Zt, or = tr, sr = ar;
418
- const ir = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
419
- nr,
417
+ var sr = tr, ir = ar, dr = or;
418
+ const cr = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
419
+ sr,
420
420
  {
421
421
  ref: a,
422
- className: be(
422
+ className: xe(
423
423
  "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
424
424
  e
425
425
  ),
426
426
  ...n
427
427
  }
428
428
  ));
429
- ir.displayName = nr.displayName;
430
- const qn = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
431
- or,
429
+ cr.displayName = sr.displayName;
430
+ const Kn = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
431
+ ir,
432
432
  {
433
433
  ref: a,
434
- className: be("aspect-square h-full w-full", e),
434
+ className: xe("aspect-square h-full w-full", e),
435
435
  ...n
436
436
  }
437
437
  ));
438
- qn.displayName = or.displayName;
439
- const dr = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
440
- sr,
438
+ Kn.displayName = ir.displayName;
439
+ const lr = I.forwardRef(({ className: e, ...n }, a) => /* @__PURE__ */ t(
440
+ dr,
441
441
  {
442
442
  ref: a,
443
- className: be(
443
+ className: xe(
444
444
  "flex h-full w-full items-center justify-center rounded-full bg-muted",
445
445
  e
446
446
  ),
447
447
  ...n
448
448
  }
449
449
  ));
450
- dr.displayName = sr.displayName;
451
- const zn = async (e, n, a) => {
450
+ lr.displayName = dr.displayName;
451
+ const Qn = async (e, n, a) => {
452
452
  const r = `${e}/management/v1/groups`;
453
- return await Wt(r, n, a);
454
- }, Kn = async (e, n, a, r) => {
453
+ return await Jt(r, n, a);
454
+ }, Wn = async (e, n, a, r) => {
455
455
  const o = `${e}/management/v1/groups/${a}`;
456
- return ot(o, n, "PATCH", r);
457
- }, Qn = async (e, n, a) => {
456
+ return st(o, n, "PATCH", r);
457
+ }, Yn = async (e, n, a) => {
458
458
  const r = `${e}/management/v1/groups/${a}`;
459
- await ot(r, n, "DELETE");
460
- }, Wn = async (e, n, a, r) => {
459
+ await st(r, n, "DELETE");
460
+ }, Jn = async (e, n, a, r) => {
461
461
  const o = `${e}/management/v1/groups/${a}/members`;
462
- return await Wt(o, n, r);
463
- }, Yn = async (e, n, a, r) => {
462
+ return await Jt(o, n, r);
463
+ }, Xn = async (e, n, a, r) => {
464
464
  const o = `${e}/management/v1/groups/${a}/members`;
465
- await ot(o, n, "DELETE", r);
465
+ await st(o, n, "DELETE", r);
466
466
  };
467
- function Jn() {
468
- const { authToken: e, tokenProps: n } = z(), a = ge();
469
- return xe({
470
- mutationFn: (r) => zn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r),
467
+ function Zn() {
468
+ const { authToken: e, tokenProps: n } = K(), a = ve();
469
+ return ye({
470
+ mutationFn: (r) => Qn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r),
471
471
  onSuccess: () => {
472
472
  a.invalidateQueries({ queryKey: ["groups"] }), D.success("Group created successfully");
473
473
  },
474
474
  onError: (r) => {
475
475
  console.error("Failed to create group:", r), D.error("Failed to create group", {
476
- description: ve(r, "Failed to create group")
476
+ description: we(r, "Failed to create group")
477
477
  });
478
478
  }
479
479
  });
480
480
  }
481
- function Xn() {
482
- const { authToken: e, tokenProps: n } = z(), a = ge();
483
- return xe({
481
+ function eo() {
482
+ const { authToken: e, tokenProps: n } = K(), a = ve();
483
+ return ye({
484
484
  mutationFn: ({
485
485
  groupId: r,
486
486
  data: o
487
- }) => Kn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r, o),
487
+ }) => Wn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r, o),
488
488
  onSuccess: (r, o) => {
489
489
  a.invalidateQueries({ queryKey: ["group", o.groupId] }), a.invalidateQueries({ queryKey: ["groups"] }), D.success("Group updated successfully");
490
490
  },
491
491
  onError: (r) => {
492
492
  console.error("Failed to update group:", r), D.error("Failed to update group", {
493
- description: ve(r, "Failed to update group")
493
+ description: we(r, "Failed to update group")
494
494
  });
495
495
  }
496
496
  });
497
497
  }
498
- function Zn() {
499
- const { authToken: e, tokenProps: n } = z(), a = ge();
500
- return xe({
501
- mutationFn: (r) => Qn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r),
498
+ function to() {
499
+ const { authToken: e, tokenProps: n } = K(), a = ve();
500
+ return ye({
501
+ mutationFn: (r) => Yn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r),
502
502
  onSuccess: (r, o) => {
503
503
  a.invalidateQueries({ queryKey: ["groups"] }), a.removeQueries({ queryKey: ["group", o] }), D.success("Group deleted successfully");
504
504
  },
505
505
  onError: (r) => {
506
506
  console.error("Failed to delete group:", r), D.error("Failed to delete group", {
507
- description: ve(r, "Failed to delete group")
507
+ description: we(r, "Failed to delete group")
508
508
  });
509
509
  }
510
510
  });
511
511
  }
512
- function eo() {
513
- const { authToken: e, tokenProps: n } = z(), a = ge();
514
- return xe({
512
+ function ro() {
513
+ const { authToken: e, tokenProps: n } = K(), a = ve();
514
+ return ye({
515
515
  mutationFn: ({
516
516
  groupId: r,
517
517
  data: o
518
- }) => Wn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r, o),
518
+ }) => Jn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r, o),
519
519
  onSuccess: (r, o) => {
520
520
  a.invalidateQueries({ queryKey: ["group", o.groupId] }), a.invalidateQueries({
521
521
  queryKey: ["group-members", o.groupId]
@@ -523,18 +523,18 @@ function eo() {
523
523
  },
524
524
  onError: (r) => {
525
525
  console.error("Failed to add group members:", r), D.error("Failed to add members", {
526
- description: ve(r, "Failed to add members")
526
+ description: we(r, "Failed to add members")
527
527
  });
528
528
  }
529
529
  });
530
530
  }
531
- function to() {
532
- const { authToken: e, tokenProps: n } = z(), a = ge();
533
- return xe({
531
+ function ao() {
532
+ const { authToken: e, tokenProps: n } = K(), a = ve();
533
+ return ye({
534
534
  mutationFn: ({
535
535
  groupId: r,
536
536
  data: o
537
- }) => Yn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r, o),
537
+ }) => Xn(n.apiServiceUrl, (e == null ? void 0 : e.accessToken) || "", r, o),
538
538
  onSuccess: (r, o) => {
539
539
  a.invalidateQueries({ queryKey: ["group", o.groupId] }), a.invalidateQueries({
540
540
  queryKey: ["group-members", o.groupId]
@@ -542,28 +542,28 @@ function to() {
542
542
  },
543
543
  onError: (r) => {
544
544
  console.error("Failed to remove group members:", r), D.error("Failed to remove members", {
545
- description: ve(r, "Failed to remove members")
545
+ description: we(r, "Failed to remove members")
546
546
  });
547
547
  }
548
548
  });
549
549
  }
550
- const ro = [];
551
- function ao({
550
+ const no = [];
551
+ function oo({
552
552
  open: e,
553
553
  onOpenChange: n
554
554
  }) {
555
555
  var E, A, L;
556
- const { tokenProps: a } = z(), { currentUser: r } = at(), o = (r == null ? void 0 : r.type) === "tenant", c = a == null ? void 0 : a.tenantId, {
556
+ const { tokenProps: a } = K(), { currentUser: r } = nt(), o = (r == null ? void 0 : r.type) === "tenant", c = a == null ? void 0 : a.tenantId, {
557
557
  groups: m,
558
558
  isLoading: p,
559
559
  error: b,
560
560
  refetch: f
561
- } = Qr({
561
+ } = Jr({
562
562
  type: o ? "TENANT_GROUP" : "all",
563
563
  tenantId: o ? c : void 0,
564
564
  includeMembers: !1
565
- }), g = b ? cr(b, "Unable to load groups.") : null, [l, u] = S({ kind: "list" }), [s, x] = S(null), v = Zn();
566
- Pe(() => {
565
+ }), g = b ? ur(b, "Unable to load groups.") : null, [l, u] = S({ kind: "list" }), [s, x] = S(null), v = to();
566
+ ge(() => {
567
567
  e || (u({ kind: "list" }), x(null));
568
568
  }, [e]);
569
569
  const w = l.kind === "members" && m.find((N) => N.id === l.groupId) || null, h = async () => {
@@ -573,10 +573,10 @@ function ao({
573
573
  } catch {
574
574
  }
575
575
  };
576
- return /* @__PURE__ */ t(Vt, { open: e, onOpenChange: n, children: /* @__PURE__ */ i(jt, { className: "flex max-h-[640px] w-[720px] max-w-[92vw] flex-col gap-0 overflow-hidden p-0", children: [
576
+ return /* @__PURE__ */ t(Ht, { open: e, onOpenChange: n, children: /* @__PURE__ */ i(qt, { className: "flex max-h-[640px] w-[720px] max-w-[92vw] flex-col gap-0 overflow-hidden p-0", children: [
577
577
  l.kind === "list" ? /* @__PURE__ */ i("div", { className: "shrink-0 border-b border-border px-5 pt-4 pb-3.5", children: [
578
- /* @__PURE__ */ t(Xe, { className: "text-[15px] font-semibold tracking-tight", children: "Group management" }),
579
- /* @__PURE__ */ t(Ze, { className: "mt-1 text-[12px] leading-[1.5] text-muted-foreground", children: "Organize people into groups for shared access." })
578
+ /* @__PURE__ */ t(Ze, { className: "text-[15px] font-semibold tracking-tight", children: "Group management" }),
579
+ /* @__PURE__ */ t(et, { className: "mt-1 text-[12px] leading-[1.5] text-muted-foreground", children: "Organize people into groups for shared access." })
580
580
  ] }) : l.kind === "create" ? /* @__PURE__ */ i("div", { className: "flex h-10 shrink-0 items-center gap-1.5 border-b border-border px-5", children: [
581
581
  /* @__PURE__ */ t(
582
582
  "button",
@@ -585,14 +585,14 @@ function ao({
585
585
  onClick: () => u({ kind: "list" }),
586
586
  "aria-label": "Back",
587
587
  className: "-ml-1 flex h-6 w-6 items-center justify-center rounded-[3px] text-muted-foreground hover:bg-accent hover:text-foreground",
588
- children: /* @__PURE__ */ t(Ht, { className: "h-3.5 w-3.5" })
588
+ children: /* @__PURE__ */ t(zt, { className: "h-3.5 w-3.5" })
589
589
  }
590
590
  ),
591
- /* @__PURE__ */ t(Xe, { className: "truncate text-[13px] font-medium", children: "New group" }),
592
- /* @__PURE__ */ t(Ze, { className: "sr-only", children: "Create a new group to organize members." })
591
+ /* @__PURE__ */ t(Ze, { className: "truncate text-[13px] font-medium", children: "New group" }),
592
+ /* @__PURE__ */ t(et, { className: "sr-only", children: "Create a new group to organize members." })
593
593
  ] }) : null,
594
594
  l.kind === "list" && /* @__PURE__ */ t(
595
- no,
595
+ so,
596
596
  {
597
597
  groups: m,
598
598
  isLoading: p,
@@ -605,7 +605,7 @@ function ao({
605
605
  }
606
606
  ),
607
607
  l.kind === "members" && w && /* @__PURE__ */ t(
608
- io,
608
+ lo,
609
609
  {
610
610
  group: w,
611
611
  isTenantViewer: o,
@@ -620,7 +620,7 @@ function ao({
620
620
  w.id
621
621
  ),
622
622
  l.kind === "create" && /* @__PURE__ */ t(
623
- co,
623
+ uo,
624
624
  {
625
625
  isTenantUser: o,
626
626
  tenantId: c,
@@ -656,7 +656,7 @@ function ao({
656
656
  disabled: v.isPending,
657
657
  className: "inline-flex h-7 items-center gap-1.5 rounded-[5px] bg-rose-600 px-2.5 text-[12px] font-medium text-white hover:bg-rose-700 disabled:opacity-60",
658
658
  children: [
659
- v.isPending ? /* @__PURE__ */ t(_e, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ t(nt, { className: "h-3 w-3" }),
659
+ v.isPending ? /* @__PURE__ */ t(Re, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ t(ot, { className: "h-3 w-3" }),
660
660
  "Delete group"
661
661
  ]
662
662
  }
@@ -665,7 +665,7 @@ function ao({
665
665
  ] })
666
666
  ] }) });
667
667
  }
668
- function no({
668
+ function so({
669
669
  groups: e,
670
670
  isLoading: n,
671
671
  errorMessage: a,
@@ -675,7 +675,7 @@ function no({
675
675
  onCreate: m,
676
676
  onDeleteRequest: p
677
677
  }) {
678
- const [b, f] = S(""), g = j(
678
+ const [b, f] = S(""), g = V(
679
679
  () => e.filter(
680
680
  (l) => !b.trim() || l.name.toLowerCase().includes(b.toLowerCase()) || (l.description || "").toLowerCase().includes(b.toLowerCase())
681
681
  ),
@@ -684,7 +684,7 @@ function no({
684
684
  return /* @__PURE__ */ i("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
685
685
  /* @__PURE__ */ i("div", { className: "flex shrink-0 items-center gap-2 border-b border-border px-5 py-2.5", children: [
686
686
  /* @__PURE__ */ i("div", { className: "flex flex-1 items-center gap-2 rounded-[5px] border border-border bg-background px-2 focus-within:border-foreground/40", children: [
687
- /* @__PURE__ */ t(bn, { className: "h-3 w-3 text-muted-foreground" }),
687
+ /* @__PURE__ */ t(xn, { className: "h-3 w-3 text-muted-foreground" }),
688
688
  /* @__PURE__ */ t(
689
689
  "input",
690
690
  {
@@ -700,7 +700,7 @@ function no({
700
700
  type: "button",
701
701
  onClick: () => f(""),
702
702
  className: "flex h-4 w-4 items-center justify-center rounded-[3px] text-muted-foreground hover:bg-accent hover:text-foreground",
703
- children: /* @__PURE__ */ t(Kt, { className: "h-2.5 w-2.5" })
703
+ children: /* @__PURE__ */ t(Wt, { className: "h-2.5 w-2.5" })
704
704
  }
705
705
  )
706
706
  ] }),
@@ -724,13 +724,13 @@ function no({
724
724
  },
725
725
  l
726
726
  )) }) : a ? /* @__PURE__ */ t(
727
- lr,
727
+ mr,
728
728
  {
729
729
  title: "Can't load groups",
730
730
  message: a,
731
731
  onRetry: r
732
732
  }
733
- ) : g.length === 0 && e.length === 0 ? /* @__PURE__ */ t(so, { onCreate: m }) : g.length === 0 ? /* @__PURE__ */ i("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
733
+ ) : g.length === 0 && e.length === 0 ? /* @__PURE__ */ t(co, { onCreate: m }) : g.length === 0 ? /* @__PURE__ */ i("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
734
734
  /* @__PURE__ */ i("div", { className: "text-[12px] text-foreground", children: [
735
735
  'No groups match "',
736
736
  b,
@@ -740,7 +740,7 @@ function no({
740
740
  ] }) : g.map((l) => {
741
741
  var u;
742
742
  return /* @__PURE__ */ t(
743
- oo,
743
+ io,
744
744
  {
745
745
  group: l,
746
746
  canDelete: ((u = l.permissions) == null ? void 0 : u.canDelete) ?? l.createdBy === o,
@@ -752,7 +752,7 @@ function no({
752
752
  }) })
753
753
  ] });
754
754
  }
755
- function oo({
755
+ function io({
756
756
  group: e,
757
757
  canDelete: n,
758
758
  onClick: a,
@@ -760,7 +760,7 @@ function oo({
760
760
  }) {
761
761
  let o = "";
762
762
  try {
763
- o = Yt(new Date(e.createdAt), "MMM d, yyyy");
763
+ o = Xt(new Date(e.createdAt), "MMM d, yyyy");
764
764
  } catch {
765
765
  o = "";
766
766
  }
@@ -771,12 +771,12 @@ function oo({
771
771
  onClick: a,
772
772
  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",
773
773
  children: [
774
- /* @__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(Jr, { className: "h-3.5 w-3.5" }) }),
774
+ /* @__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(ea, { className: "h-3.5 w-3.5" }) }),
775
775
  /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
776
776
  /* @__PURE__ */ t("div", { className: "truncate text-[13px] font-medium text-foreground", children: e.name }),
777
777
  /* @__PURE__ */ i("div", { className: "mt-0.5 flex items-center gap-2 text-[11px] text-muted-foreground", children: [
778
778
  /* @__PURE__ */ i("span", { className: "inline-flex items-center gap-1", children: [
779
- /* @__PURE__ */ t(Jt, { className: "h-2.5 w-2.5" }),
779
+ /* @__PURE__ */ t(Zt, { className: "h-2.5 w-2.5" }),
780
780
  e.memberCount,
781
781
  " member",
782
782
  e.memberCount === 1 ? "" : "s"
@@ -784,7 +784,7 @@ function oo({
784
784
  o && /* @__PURE__ */ i($, { children: [
785
785
  /* @__PURE__ */ t("span", { className: "text-border", children: "·" }),
786
786
  /* @__PURE__ */ i("span", { className: "inline-flex items-center gap-1", children: [
787
- /* @__PURE__ */ t(zt, { className: "h-2.5 w-2.5" }),
787
+ /* @__PURE__ */ t(Qt, { className: "h-2.5 w-2.5" }),
788
788
  o
789
789
  ] })
790
790
  ] }),
@@ -808,18 +808,18 @@ function oo({
808
808
  },
809
809
  "aria-label": `Delete ${e.name}`,
810
810
  className: "flex h-6 w-6 items-center justify-center rounded-[3px] text-muted-foreground hover:bg-accent hover:text-foreground",
811
- children: /* @__PURE__ */ t(nt, { className: "h-3 w-3" })
811
+ children: /* @__PURE__ */ t(ot, { className: "h-3 w-3" })
812
812
  }
813
813
  ),
814
- /* @__PURE__ */ t(gn, { className: "h-3.5 w-3.5 text-muted-foreground" })
814
+ /* @__PURE__ */ t(vn, { className: "h-3.5 w-3.5 text-muted-foreground" })
815
815
  ] })
816
816
  ]
817
817
  }
818
818
  );
819
819
  }
820
- function so({ onCreate: e }) {
820
+ function co({ onCreate: e }) {
821
821
  return /* @__PURE__ */ i("div", { className: "flex h-full flex-col items-center justify-center gap-2 py-12 text-center", children: [
822
- /* @__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(qt, { className: "h-4 w-4" }) }),
822
+ /* @__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(Kt, { className: "h-4 w-4" }) }),
823
823
  /* @__PURE__ */ t("div", { className: "text-[13px] font-medium text-foreground", children: "No groups yet" }),
824
824
  /* @__PURE__ */ t("div", { className: "max-w-[320px] text-[11.5px] leading-[1.55] text-muted-foreground", children: "Groups let you grant shared access to dashboards. Create one and add members." }),
825
825
  /* @__PURE__ */ i(
@@ -836,7 +836,7 @@ function so({ onCreate: e }) {
836
836
  )
837
837
  ] });
838
838
  }
839
- function io({
839
+ function lo({
840
840
  group: e,
841
841
  isTenantViewer: n,
842
842
  canEdit: a,
@@ -852,20 +852,20 @@ function io({
852
852
  isLoading: g,
853
853
  error: l,
854
854
  refetch: u
855
- } = Wr(e.id), s = (f == null ? void 0 : f.members) ?? ro, x = l ? cr(l, "Unable to load members for this group.") : null, v = e.type === "TENANT_GROUP" ? "tenant" : "organization", { users: w } = Yr({
855
+ } = Xr(e.id), s = (f == null ? void 0 : f.members) ?? no, x = l ? ur(l, "Unable to load members for this group.") : null, v = e.type === "TENANT_GROUP" ? "tenant" : "organization", { users: w } = Zr({
856
856
  type: v,
857
857
  tenantId: e.tenantId || void 0,
858
858
  active: !0,
859
859
  limit: 200
860
- }), h = j(
860
+ }), h = V(
861
861
  () => new Set(s.map((y) => y.userId)),
862
862
  [s]
863
- ), E = eo(), A = to(), L = Xn(), [N, k] = S(!1), [re, ae] = S(e.name), [ye, K] = S(!1), [Q, W] = S(e.description || ""), [Y, we] = S(""), [Ne, ne] = S(!1), oe = j(() => {
864
- const y = Y.trim().toLowerCase();
865
- return w.filter((U) => !h.has(U.id)).filter(
866
- (U) => !y || (U.name || "").toLowerCase().includes(y) || (U.email || "").toLowerCase().includes(y)
863
+ ), E = ro(), A = ao(), L = eo(), [N, k] = S(!1), [re, ae] = S(e.name), [Ne, Q] = S(!1), [W, Y] = S(e.description || ""), [J, Se] = S(""), [ke, ne] = S(!1), oe = V(() => {
864
+ const y = J.trim().toLowerCase();
865
+ return w.filter((R) => !h.has(R.id)).filter(
866
+ (R) => !y || (R.name || "").toLowerCase().includes(y) || (R.email || "").toLowerCase().includes(y)
867
867
  ).slice(0, 50);
868
- }, [w, h, Y]), Se = async () => {
868
+ }, [w, h, J]), se = async () => {
869
869
  const y = re.trim();
870
870
  if (k(!1), y.length >= 3 && y !== e.name)
871
871
  try {
@@ -875,9 +875,9 @@ function io({
875
875
  }), p();
876
876
  } catch {
877
877
  }
878
- }, se = async () => {
879
- const y = Q.trim();
880
- if (K(!1), y !== (e.description || ""))
878
+ }, ie = async () => {
879
+ const y = W.trim();
880
+ if (Q(!1), y !== (e.description || ""))
881
881
  try {
882
882
  await L.mutateAsync({
883
883
  groupId: e.id,
@@ -885,9 +885,9 @@ function io({
885
885
  }), p();
886
886
  } catch {
887
887
  }
888
- }, Ue = async (y) => {
888
+ }, Ce = async (y) => {
889
889
  if (o) {
890
- we(""), ne(!1);
890
+ Se(""), ne(!1);
891
891
  try {
892
892
  await E.mutateAsync({
893
893
  groupId: e.id,
@@ -899,7 +899,7 @@ function io({
899
899
  } catch {
900
900
  }
901
901
  }
902
- }, J = async (y) => {
902
+ }, Ue = async (y) => {
903
903
  if (o)
904
904
  try {
905
905
  await A.mutateAsync({
@@ -909,11 +909,11 @@ function io({
909
909
  } catch {
910
910
  }
911
911
  };
912
- let F = "";
912
+ let j = "";
913
913
  try {
914
- F = Yt(new Date(e.createdAt), "MMM d, yyyy");
914
+ j = Xt(new Date(e.createdAt), "MMM d, yyyy");
915
915
  } catch {
916
- F = "";
916
+ j = "";
917
917
  }
918
918
  return /* @__PURE__ */ i("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
919
919
  /* @__PURE__ */ i("div", { className: "flex h-10 shrink-0 items-center gap-1.5 border-b border-border px-5", children: [
@@ -924,7 +924,7 @@ function io({
924
924
  onClick: c,
925
925
  "aria-label": "Back",
926
926
  className: "-ml-1 flex h-6 w-6 items-center justify-center rounded-[3px] text-muted-foreground hover:bg-accent hover:text-foreground",
927
- children: /* @__PURE__ */ t(Ht, { className: "h-3.5 w-3.5" })
927
+ children: /* @__PURE__ */ t(zt, { className: "h-3.5 w-3.5" })
928
928
  }
929
929
  ),
930
930
  N ? /* @__PURE__ */ t(
@@ -933,9 +933,9 @@ function io({
933
933
  autoFocus: !0,
934
934
  value: re,
935
935
  onChange: (y) => ae(y.target.value),
936
- onBlur: Se,
936
+ onBlur: se,
937
937
  onKeyDown: (y) => {
938
- y.key === "Enter" && Se(), y.key === "Escape" && (ae(e.name), k(!1));
938
+ y.key === "Enter" && se(), y.key === "Escape" && (ae(e.name), k(!1));
939
939
  },
940
940
  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"
941
941
  }
@@ -953,23 +953,23 @@ function io({
953
953
  }
954
954
  ),
955
955
  /* @__PURE__ */ i("span", { className: "ml-1 inline-flex shrink-0 items-center gap-1 text-[10.5px] text-muted-foreground", children: [
956
- /* @__PURE__ */ t(Jt, { className: "h-2.5 w-2.5" }),
956
+ /* @__PURE__ */ t(Zt, { className: "h-2.5 w-2.5" }),
957
957
  s.length,
958
958
  " member",
959
959
  s.length === 1 ? "" : "s"
960
960
  ] })
961
961
  ] }),
962
- /* @__PURE__ */ t("div", { className: "shrink-0 border-b border-border px-5 py-2.5", children: ye ? /* @__PURE__ */ i("div", { children: [
962
+ /* @__PURE__ */ t("div", { className: "shrink-0 border-b border-border px-5 py-2.5", children: Ne ? /* @__PURE__ */ i("div", { children: [
963
963
  /* @__PURE__ */ t(
964
964
  "textarea",
965
965
  {
966
966
  autoFocus: !0,
967
967
  rows: 2,
968
- value: Q,
969
- onChange: (y) => W(y.target.value),
968
+ value: W,
969
+ onChange: (y) => Y(y.target.value),
970
970
  maxLength: 200,
971
971
  onKeyDown: (y) => {
972
- y.key === "Escape" && (W(e.description || ""), K(!1)), y.key === "Enter" && (y.metaKey || y.ctrlKey) && se();
972
+ y.key === "Escape" && (Y(e.description || ""), Q(!1)), y.key === "Enter" && (y.metaKey || y.ctrlKey) && ie();
973
973
  },
974
974
  placeholder: "What is this group for?",
975
975
  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"
@@ -977,7 +977,7 @@ function io({
977
977
  ),
978
978
  /* @__PURE__ */ i("div", { className: "mt-1.5 flex items-center justify-between", children: [
979
979
  /* @__PURE__ */ i("span", { className: "text-[10.5px] text-muted-foreground", children: [
980
- Q.length,
980
+ W.length,
981
981
  "/200 · Esc to cancel · ⌘↩ to save"
982
982
  ] }),
983
983
  /* @__PURE__ */ i("div", { className: "flex items-center gap-1.5", children: [
@@ -986,7 +986,7 @@ function io({
986
986
  {
987
987
  type: "button",
988
988
  onClick: () => {
989
- W(e.description || ""), K(!1);
989
+ Y(e.description || ""), Q(!1);
990
990
  },
991
991
  className: "h-6 rounded-[5px] px-2 text-[11px] font-medium text-foreground/80 hover:bg-accent",
992
992
  children: "Cancel"
@@ -996,7 +996,7 @@ function io({
996
996
  "button",
997
997
  {
998
998
  type: "button",
999
- onClick: se,
999
+ onClick: ie,
1000
1000
  className: "inline-flex h-6 items-center rounded-[5px] bg-foreground px-2 text-[11px] font-medium text-background hover:opacity-90",
1001
1001
  children: "Save"
1002
1002
  }
@@ -1008,7 +1008,7 @@ function io({
1008
1008
  {
1009
1009
  type: "button",
1010
1010
  onClick: () => {
1011
- a && (W(e.description || ""), K(!0));
1011
+ a && (Y(e.description || ""), Q(!0));
1012
1012
  },
1013
1013
  disabled: !a,
1014
1014
  title: a ? "Click to edit description" : void 0,
@@ -1016,22 +1016,22 @@ function io({
1016
1016
  children: [
1017
1017
  e.description ? /* @__PURE__ */ t("p", { className: "text-[12px] leading-[1.55] text-foreground/90", children: e.description }) : /* @__PURE__ */ t("p", { className: "text-[12px] leading-[1.55] text-muted-foreground", children: a ? "Add a description…" : "No description" }),
1018
1018
  /* @__PURE__ */ i("p", { className: "mt-1 text-[10.5px] text-muted-foreground", children: [
1019
- F ? `Created ${F}` : "Recently created",
1019
+ j ? `Created ${j}` : "Recently created",
1020
1020
  a ? " · You can edit this group" : ""
1021
1021
  ] })
1022
1022
  ]
1023
1023
  }
1024
1024
  ) }),
1025
1025
  o && /* @__PURE__ */ t(
1026
- lo,
1026
+ mo,
1027
1027
  {
1028
- query: Y,
1029
- setQuery: we,
1030
- open: Ne,
1028
+ query: J,
1029
+ setQuery: Se,
1030
+ open: ke,
1031
1031
  setOpen: ne,
1032
1032
  candidates: oe,
1033
1033
  showKindChip: !n,
1034
- onAdd: Ue,
1034
+ onAdd: Ce,
1035
1035
  busy: E.isPending
1036
1036
  }
1037
1037
  ),
@@ -1042,7 +1042,7 @@ function io({
1042
1042
  },
1043
1043
  y
1044
1044
  )) }) : x ? /* @__PURE__ */ t(
1045
- lr,
1045
+ mr,
1046
1046
  {
1047
1047
  title: "Can't load members",
1048
1048
  message: x,
@@ -1052,27 +1052,27 @@ function io({
1052
1052
  /* @__PURE__ */ t("div", { className: "text-[12px] text-foreground", children: "No members yet" }),
1053
1053
  /* @__PURE__ */ t("div", { className: "text-[11px] text-muted-foreground", children: o ? "Search above to add people to this group." : "This group does not have any members." })
1054
1054
  ] }) : s.map((y) => {
1055
- var U, H, ie, q, ke, de;
1055
+ var R, H, q, de, z, ce;
1056
1056
  return /* @__PURE__ */ i(
1057
1057
  "div",
1058
1058
  {
1059
1059
  className: "group flex items-center gap-2 border-b border-border/60 px-5 py-2",
1060
1060
  children: [
1061
- /* @__PURE__ */ t(ur, { name: ((U = y.user) == null ? void 0 : U.name) || ((H = y.user) == null ? void 0 : H.email) || "?" }),
1061
+ /* @__PURE__ */ t(hr, { name: ((R = y.user) == null ? void 0 : R.name) || ((H = y.user) == null ? void 0 : H.email) || "?" }),
1062
1062
  /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
1063
- /* @__PURE__ */ t("div", { className: "truncate text-[12.5px] font-medium text-foreground", children: ((ie = y.user) == null ? void 0 : ie.name) || ((q = y.user) == null ? void 0 : q.email) || "Unknown" }),
1064
- ((ke = y.user) == null ? void 0 : ke.email) && y.user.name && /* @__PURE__ */ t("div", { className: "truncate text-[10.5px] text-muted-foreground", children: y.user.email })
1063
+ /* @__PURE__ */ t("div", { className: "truncate text-[12.5px] font-medium text-foreground", children: ((q = y.user) == null ? void 0 : q.name) || ((de = y.user) == null ? void 0 : de.email) || "Unknown" }),
1064
+ ((z = y.user) == null ? void 0 : z.email) && y.user.name && /* @__PURE__ */ t("div", { className: "truncate text-[10.5px] text-muted-foreground", children: y.user.email })
1065
1065
  ] }),
1066
1066
  !n && /* @__PURE__ */ t("span", { className: "text-[10px] uppercase tracking-[0.06em] text-muted-foreground", children: y.userType }),
1067
1067
  /* @__PURE__ */ t(
1068
1068
  "button",
1069
1069
  {
1070
1070
  type: "button",
1071
- onClick: () => J(y.userId),
1071
+ onClick: () => Ue(y.userId),
1072
1072
  disabled: !o || A.isPending,
1073
- "aria-label": `Remove ${((de = y.user) == null ? void 0 : de.name) || "member"}`,
1073
+ "aria-label": `Remove ${((ce = y.user) == null ? void 0 : ce.name) || "member"}`,
1074
1074
  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",
1075
- children: /* @__PURE__ */ t(Kt, { className: "h-3 w-3" })
1075
+ children: /* @__PURE__ */ t(Wt, { className: "h-3 w-3" })
1076
1076
  }
1077
1077
  )
1078
1078
  ]
@@ -1087,20 +1087,20 @@ function io({
1087
1087
  onClick: b,
1088
1088
  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",
1089
1089
  children: [
1090
- /* @__PURE__ */ t(nt, { className: "h-3 w-3" }),
1090
+ /* @__PURE__ */ t(ot, { className: "h-3 w-3" }),
1091
1091
  "Delete group"
1092
1092
  ]
1093
1093
  }
1094
1094
  ) })
1095
1095
  ] });
1096
1096
  }
1097
- function co({
1097
+ function uo({
1098
1098
  isTenantUser: e,
1099
1099
  tenantId: n,
1100
1100
  onCancel: a,
1101
1101
  onCreated: r
1102
1102
  }) {
1103
- const [o, c] = S(""), [m, p] = S(""), [b, f] = S(null), g = Jn(), l = o.trim().length >= 3 && o.trim().length <= 50, u = async () => {
1103
+ const [o, c] = S(""), [m, p] = S(""), [b, f] = S(null), g = Zn(), l = o.trim().length >= 3 && o.trim().length <= 50, u = async () => {
1104
1104
  if (!l) return;
1105
1105
  f(null);
1106
1106
  const s = {
@@ -1118,7 +1118,7 @@ function co({
1118
1118
  };
1119
1119
  return /* @__PURE__ */ i("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
1120
1120
  /* @__PURE__ */ i("div", { className: "flex-1 overflow-y-auto px-5 py-4", children: [
1121
- /* @__PURE__ */ t(Ft, { children: "Name" }),
1121
+ /* @__PURE__ */ t(Gt, { children: "Name" }),
1122
1122
  /* @__PURE__ */ t(
1123
1123
  "input",
1124
1124
  {
@@ -1132,7 +1132,7 @@ function co({
1132
1132
  ),
1133
1133
  /* @__PURE__ */ t("div", { className: "mt-1 text-[10.5px] text-muted-foreground", children: "3–50 characters." }),
1134
1134
  /* @__PURE__ */ i("div", { className: "mt-4", children: [
1135
- /* @__PURE__ */ t(Ft, { children: "Description (optional)" }),
1135
+ /* @__PURE__ */ t(Gt, { children: "Description (optional)" }),
1136
1136
  /* @__PURE__ */ t(
1137
1137
  "textarea",
1138
1138
  {
@@ -1170,7 +1170,7 @@ function co({
1170
1170
  disabled: !l || g.isPending,
1171
1171
  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",
1172
1172
  children: g.isPending ? /* @__PURE__ */ i($, { children: [
1173
- /* @__PURE__ */ t(_e, { className: "h-3 w-3 animate-spin" }),
1173
+ /* @__PURE__ */ t(Re, { className: "h-3 w-3 animate-spin" }),
1174
1174
  "Creating…"
1175
1175
  ] }) : /* @__PURE__ */ i($, { children: [
1176
1176
  /* @__PURE__ */ t(ee, { className: "h-3 w-3" }),
@@ -1181,7 +1181,7 @@ function co({
1181
1181
  ] })
1182
1182
  ] });
1183
1183
  }
1184
- function lo({
1184
+ function mo({
1185
1185
  query: e,
1186
1186
  setQuery: n,
1187
1187
  open: a,
@@ -1191,8 +1191,8 @@ function lo({
1191
1191
  onAdd: m,
1192
1192
  busy: p
1193
1193
  }) {
1194
- const b = Ot(null), f = Ot(null), [g, l] = S(null);
1195
- Ja(() => {
1194
+ const b = Pt(null), f = Pt(null), [g, l] = S(null);
1195
+ tn(() => {
1196
1196
  if (!a) {
1197
1197
  l(null);
1198
1198
  return;
@@ -1211,7 +1211,7 @@ function lo({
1211
1211
  return s(), window.addEventListener("resize", s), window.addEventListener("scroll", s, !0), () => {
1212
1212
  window.removeEventListener("resize", s), window.removeEventListener("scroll", s, !0);
1213
1213
  };
1214
- }, [a, o.length]), Pe(() => {
1214
+ }, [a, o.length]), ge(() => {
1215
1215
  if (!a) return;
1216
1216
  const s = (x) => {
1217
1217
  var w, h;
@@ -1228,7 +1228,7 @@ function lo({
1228
1228
  ref: b,
1229
1229
  className: "flex items-center gap-2 rounded-[5px] border border-border bg-background px-2 focus-within:border-foreground/40",
1230
1230
  children: [
1231
- /* @__PURE__ */ t(Mn, { className: "h-3 w-3 text-muted-foreground" }),
1231
+ /* @__PURE__ */ t(_n, { className: "h-3 w-3 text-muted-foreground" }),
1232
1232
  /* @__PURE__ */ t(
1233
1233
  "input",
1234
1234
  {
@@ -1245,7 +1245,7 @@ function lo({
1245
1245
  ]
1246
1246
  }
1247
1247
  ),
1248
- u && typeof document < "u" && hn(
1248
+ u && typeof document < "u" && fn(
1249
1249
  /* @__PURE__ */ t(
1250
1250
  "div",
1251
1251
  {
@@ -1265,7 +1265,7 @@ function lo({
1265
1265
  onClick: () => m(s),
1266
1266
  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",
1267
1267
  children: [
1268
- /* @__PURE__ */ t(ur, { name: s.name || s.email || "?" }),
1268
+ /* @__PURE__ */ t(hr, { name: s.name || s.email || "?" }),
1269
1269
  /* @__PURE__ */ i("div", { className: "min-w-0 flex-1", children: [
1270
1270
  /* @__PURE__ */ t("div", { className: "truncate text-[12px] font-medium text-foreground", children: s.name || s.email || "Unknown" }),
1271
1271
  s.email && s.name && /* @__PURE__ */ t("div", { className: "truncate text-[10.5px] text-muted-foreground", children: s.email })
@@ -1281,7 +1281,7 @@ function lo({
1281
1281
  )
1282
1282
  ] });
1283
1283
  }
1284
- function cr(e, n) {
1284
+ function ur(e, n) {
1285
1285
  if (!e) return n;
1286
1286
  if (e instanceof Error) {
1287
1287
  const a = e.message || "", r = a.match(/\{[\s\S]*"error"\s*:\s*"([^"]+)"[\s\S]*\}/);
@@ -1289,7 +1289,7 @@ function cr(e, n) {
1289
1289
  }
1290
1290
  return typeof e == "string" ? e : n;
1291
1291
  }
1292
- function lr({
1292
+ function mr({
1293
1293
  title: e,
1294
1294
  message: n,
1295
1295
  onRetry: a
@@ -1308,66 +1308,66 @@ function lr({
1308
1308
  )
1309
1309
  ] });
1310
1310
  }
1311
- function Ft({ children: e }) {
1311
+ function Gt({ children: e }) {
1312
1312
  return /* @__PURE__ */ t("label", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: e });
1313
1313
  }
1314
- function ur({ name: e }) {
1314
+ function hr({ name: e }) {
1315
1315
  const n = e.split(" ").map((a) => a[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
1316
- return /* @__PURE__ */ t(ir, { className: "h-6 w-6 shrink-0", children: /* @__PURE__ */ t(dr, { className: "text-[9px] font-semibold", children: n || "?" }) });
1316
+ return /* @__PURE__ */ t(cr, { className: "h-6 w-6 shrink-0", children: /* @__PURE__ */ t(lr, { className: "text-[9px] font-semibold", children: n || "?" }) });
1317
1317
  }
1318
- const uo = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
1319
- function mo({
1318
+ const ho = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
1319
+ function po({
1320
1320
  open: e,
1321
1321
  onOpenChange: n
1322
1322
  }) {
1323
1323
  const a = C(
1324
1324
  (o) => {
1325
1325
  var c, m;
1326
- return wn({
1326
+ return Sn({
1327
1327
  dashboardDefault: (m = (c = o.dashboard) == null ? void 0 : c.exportDefaults) == null ? void 0 : m.csvEncoding
1328
1328
  });
1329
1329
  }
1330
1330
  ), { setDashboardExportDefaults: r } = C(
1331
1331
  (o) => o.actions
1332
1332
  );
1333
- return /* @__PURE__ */ t(Vt, { open: e, onOpenChange: n, children: /* @__PURE__ */ i(jt, { className: "rounded-control border-border/60 sm:max-w-[440px] sm:rounded-control", children: [
1334
- /* @__PURE__ */ i(Xr, { children: [
1335
- /* @__PURE__ */ t(Xe, { className: "text-[15px]", children: "Download settings" }),
1336
- /* @__PURE__ */ t(Ze, { className: "text-[13px] leading-5", children: "Applies to every CSV downloaded or delivered from this dashboard. People can still change it for a single download." })
1333
+ return /* @__PURE__ */ t(Ht, { open: e, onOpenChange: n, children: /* @__PURE__ */ i(qt, { className: "rounded-control border-border/60 sm:max-w-[440px] sm:rounded-control", children: [
1334
+ /* @__PURE__ */ i(ta, { children: [
1335
+ /* @__PURE__ */ t(Ze, { className: "text-[15px]", children: "Download settings" }),
1336
+ /* @__PURE__ */ t(et, { className: "text-[13px] leading-5", children: "Applies to every CSV downloaded or delivered from this dashboard. People can still change it for a single download." })
1337
1337
  ] }),
1338
1338
  /* @__PURE__ */ i("div", { className: "space-y-2", children: [
1339
- /* @__PURE__ */ t(Ba, { htmlFor: "dashboard-csv-encoding", className: uo, children: "CSV encoding" }),
1339
+ /* @__PURE__ */ t(Ha, { htmlFor: "dashboard-csv-encoding", className: ho, children: "CSV encoding" }),
1340
1340
  /* @__PURE__ */ i(
1341
- Ga,
1341
+ qa,
1342
1342
  {
1343
1343
  value: a,
1344
1344
  onValueChange: (o) => r({ csvEncoding: o }),
1345
1345
  children: [
1346
- /* @__PURE__ */ t(Va, { id: "dashboard-csv-encoding", size: "sm", children: /* @__PURE__ */ t(ja, {}) }),
1347
- /* @__PURE__ */ t(Ha, { children: Zr.map((o) => /* @__PURE__ */ t(qa, { value: o.value, children: o.label }, o.value)) })
1346
+ /* @__PURE__ */ t(za, { id: "dashboard-csv-encoding", size: "sm", children: /* @__PURE__ */ t(Ka, {}) }),
1347
+ /* @__PURE__ */ t(Qa, { children: ra.map((o) => /* @__PURE__ */ t(Wa, { value: o.value, children: o.label }, o.value)) })
1348
1348
  ]
1349
1349
  }
1350
1350
  )
1351
1351
  ] })
1352
1352
  ] }) });
1353
1353
  }
1354
- function pe(e, n, a) {
1354
+ function fe(e, n, a) {
1355
1355
  var c, m;
1356
1356
  const r = (e.controls || []).find(
1357
1357
  (p) => p.id === a
1358
1358
  );
1359
1359
  if (r)
1360
1360
  return r.label;
1361
- const o = (m = (c = Re(e, n)) == null ? void 0 : c.controls) == null ? void 0 : m.find(
1361
+ const o = (m = (c = Te(e, n)) == null ? void 0 : c.controls) == null ? void 0 : m.find(
1362
1362
  (p) => p.id === a
1363
1363
  );
1364
1364
  return (o == null ? void 0 : o.label) || a;
1365
1365
  }
1366
- function fe(e, n) {
1366
+ function be(e, n) {
1367
1367
  var a;
1368
- return ((a = Re(e, n)) == null ? void 0 : a.title) || n;
1368
+ return ((a = Te(e, n)) == null ? void 0 : a.title) || n;
1369
1369
  }
1370
- function ho(e) {
1370
+ function fo(e) {
1371
1371
  const { errors: n, dashboard: a } = e;
1372
1372
  if (!a)
1373
1373
  return n;
@@ -1380,7 +1380,7 @@ function ho(e) {
1380
1380
  const [, g, l] = c, u = `${g}:${l}:missing-metric`;
1381
1381
  r.has(u) || r.set(
1382
1382
  u,
1383
- `"${fe(a, g)}" has an outdated "${pe(
1383
+ `"${be(a, g)}" has an outdated "${fe(
1384
1384
  a,
1385
1385
  g,
1386
1386
  l
@@ -1395,7 +1395,7 @@ function ho(e) {
1395
1395
  const [, g, l] = m, u = `${g}:${l}:missing-group-by`;
1396
1396
  r.has(u) || r.set(
1397
1397
  u,
1398
- `"${fe(a, g)}" has an outdated "${pe(
1398
+ `"${be(a, g)}" has an outdated "${fe(
1399
1399
  a,
1400
1400
  g,
1401
1401
  l
@@ -1410,7 +1410,7 @@ function ho(e) {
1410
1410
  const [, g, l] = p, u = `${g}:${l}:invalid-metric`;
1411
1411
  r.has(u) || r.set(
1412
1412
  u,
1413
- `"${fe(a, g)}" has an invalid "${pe(
1413
+ `"${be(a, g)}" has an invalid "${fe(
1414
1414
  a,
1415
1415
  g,
1416
1416
  l
@@ -1425,7 +1425,7 @@ function ho(e) {
1425
1425
  const [, g, l] = b, u = `${g}:${l}:invalid-group-by`;
1426
1426
  r.has(u) || r.set(
1427
1427
  u,
1428
- `"${fe(a, g)}" has an invalid "${pe(
1428
+ `"${be(a, g)}" has an invalid "${fe(
1429
1429
  a,
1430
1430
  g,
1431
1431
  l
@@ -1440,7 +1440,7 @@ function ho(e) {
1440
1440
  const [, g, l] = f, u = `${g}:${l}:missing-temporal-group-by`;
1441
1441
  r.has(u) || r.set(
1442
1442
  u,
1443
- `"${fe(a, g)}" can no longer use "${pe(
1443
+ `"${be(a, g)}" can no longer use "${fe(
1444
1444
  a,
1445
1445
  g,
1446
1446
  l
@@ -1452,16 +1452,16 @@ function ho(e) {
1452
1452
  }
1453
1453
  return Array.from(r.values());
1454
1454
  }
1455
- function po({
1455
+ function bo({
1456
1456
  visible: e,
1457
1457
  onSelect: n
1458
1458
  }) {
1459
1459
  return e ? /* @__PURE__ */ i(P, { onSelect: n, children: [
1460
- /* @__PURE__ */ t(ea, { className: "h-3.5 w-3.5" }),
1460
+ /* @__PURE__ */ t(aa, { className: "h-3.5 w-3.5" }),
1461
1461
  "Schedule email report"
1462
1462
  ] }) : null;
1463
1463
  }
1464
- function fo({
1464
+ function go({
1465
1465
  scheduleReportVisible: e,
1466
1466
  analyticalBriefingVisible: n,
1467
1467
  onScheduleReport: a,
@@ -1469,7 +1469,7 @@ function fo({
1469
1469
  }) {
1470
1470
  return /* @__PURE__ */ i($, { children: [
1471
1471
  /* @__PURE__ */ t(
1472
- po,
1472
+ bo,
1473
1473
  {
1474
1474
  visible: e,
1475
1475
  onSelect: a
@@ -1481,14 +1481,14 @@ function fo({
1481
1481
  ] }) : null
1482
1482
  ] });
1483
1483
  }
1484
- function bo(e) {
1484
+ function xo(e) {
1485
1485
  var f, g, l;
1486
- const { saved: n, draft: a, usage: r } = e, o = [], c = pn(n);
1486
+ const { saved: n, draft: a, usage: r } = e, o = [], c = bn(n);
1487
1487
  for (const [u, s] of Object.entries(r.inputs))
1488
- !s || !_t(n, u) || _t(a, u) || o.push({
1488
+ !s || !Rt(n, u) || Rt(a, u) || o.push({
1489
1489
  target: "input",
1490
1490
  id: u,
1491
- label: fn(n, c, u),
1491
+ label: gn(n, c, u),
1492
1492
  bookmarks: s,
1493
1493
  remembered: 0
1494
1494
  });
@@ -1503,10 +1503,10 @@ function bo(e) {
1503
1503
  remembered: 0
1504
1504
  });
1505
1505
  }
1506
- const p = Rt(n), b = Rt(a);
1506
+ const p = Ut(n), b = Ut(a);
1507
1507
  for (const [u, s] of Object.entries(r.tables)) {
1508
1508
  if (!p.has(u)) continue;
1509
- const x = Re(n, u), v = ((g = x == null ? void 0 : x.title) == null ? void 0 : g.trim()) || "Untitled table";
1509
+ const x = Te(n, u), v = ((g = x == null ? void 0 : x.title) == null ? void 0 : g.trim()) || "Untitled table";
1510
1510
  if (!b.has(u)) {
1511
1511
  o.push({
1512
1512
  target: "table",
@@ -1517,12 +1517,12 @@ function bo(e) {
1517
1517
  });
1518
1518
  continue;
1519
1519
  }
1520
- const w = x ? Pt(x) : void 0, h = Re(a, u), E = h ? Pt(h) : void 0;
1520
+ const w = x ? Tt(x) : void 0, h = Te(a, u), E = h ? Tt(h) : void 0;
1521
1521
  if (!(!x || !w || !E))
1522
1522
  for (const [A, L] of Object.entries(s.columns)) {
1523
- if (!(L.bookmarks || L.remembered) || xn(A) || !w.has(A) || E.has(A))
1523
+ if (!(L.bookmarks || L.remembered) || yn(A) || !w.has(A) || E.has(A))
1524
1524
  continue;
1525
- const N = vn(x, A), k = ((l = N == null ? void 0 : N.label) == null ? void 0 : l.trim()) || (N == null ? void 0 : N.name);
1525
+ const N = wn(x, A), k = ((l = N == null ? void 0 : N.label) == null ? void 0 : l.trim()) || (N == null ? void 0 : N.name);
1526
1526
  o.push({
1527
1527
  target: "column",
1528
1528
  id: A,
@@ -1535,49 +1535,49 @@ function bo(e) {
1535
1535
  }
1536
1536
  return o;
1537
1537
  }
1538
- const go = "dashboard-bookmark-usage";
1539
- function xo(e) {
1538
+ const vo = "dashboard-bookmark-usage";
1539
+ function yo(e) {
1540
1540
  var b;
1541
- const n = C((f) => f.viewerStateClient), a = (b = e.saved) == null ? void 0 : b.id, o = ta({
1541
+ const n = C((f) => f.viewerStateClient), a = (b = e.saved) == null ? void 0 : b.id, o = na({
1542
1542
  // Keyed by the viewer, never by the client object (TanStack drops functions when hashing).
1543
- queryKey: [go, (n == null ? void 0 : n.viewerKey) ?? null],
1543
+ queryKey: [vo, (n == null ? void 0 : n.viewerKey) ?? null],
1544
1544
  queryFn: () => n.bookmarks.usage(),
1545
1545
  enabled: e.enabled && !!n && !!a,
1546
1546
  staleTime: 5 * 6e4,
1547
1547
  retry: !1
1548
1548
  }).data, { saved: c, draft: m, enabled: p } = e;
1549
- return j(() => !p || !c || !o ? [] : !o.bookmarks && !Object.keys(o.tables).length ? [] : bo({ saved: c, draft: m, usage: o }), [m, p, c, o]);
1549
+ return V(() => !p || !c || !o ? [] : !o.bookmarks && !Object.keys(o.tables).length ? [] : xo({ saved: c, draft: m, usage: o }), [m, p, c, o]);
1550
1550
  }
1551
- function Bt(e, n, a) {
1551
+ function Vt(e, n, a) {
1552
1552
  return `${e} ${e === 1 ? n : a}`;
1553
1553
  }
1554
- function vo(e) {
1554
+ function wo(e) {
1555
1555
  const n = [
1556
- e.bookmarks ? Bt(e.bookmarks, "bookmark", "bookmarks") : null,
1557
- e.remembered ? Bt(e.remembered, "remembered layout", "remembered layouts") : null
1556
+ e.bookmarks ? Vt(e.bookmarks, "bookmark", "bookmarks") : null,
1557
+ e.remembered ? Vt(e.remembered, "remembered layout", "remembered layouts") : null
1558
1558
  ].filter(Boolean).join(", ");
1559
1559
  return e.target === "sheet" ? { name: `${e.label} sheet`, uses: n } : e.target === "table" ? { name: `${e.label} table`, uses: n } : { name: e.label, uses: n };
1560
1560
  }
1561
- function yo({
1561
+ function No({
1562
1562
  saved: e,
1563
1563
  draft: n,
1564
1564
  enabled: a
1565
1565
  }) {
1566
- const r = xo({ saved: e, draft: n, enabled: a });
1567
- return r.length ? /* @__PURE__ */ i(za, { children: [
1568
- /* @__PURE__ */ t(Ka, { asChild: !0, children: /* @__PURE__ */ i(
1569
- T,
1566
+ const r = yo({ saved: e, draft: n, enabled: a });
1567
+ return r.length ? /* @__PURE__ */ i(Ya, { children: [
1568
+ /* @__PURE__ */ t(Ja, { asChild: !0, children: /* @__PURE__ */ i(
1569
+ U,
1570
1570
  {
1571
1571
  variant: "ghost",
1572
1572
  size: "xs",
1573
1573
  className: "gap-1 text-muted-foreground hover:text-foreground",
1574
1574
  children: [
1575
- /* @__PURE__ */ t(ra, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
1575
+ /* @__PURE__ */ t(oa, { className: "h-3.5 w-3.5", "aria-hidden": "true" }),
1576
1576
  "Affects saved views"
1577
1577
  ]
1578
1578
  }
1579
1579
  ) }),
1580
- /* @__PURE__ */ i(Qa, { align: "end", className: "w-[320px] p-3 text-[12px]", children: [
1580
+ /* @__PURE__ */ i(Xa, { align: "end", className: "w-[320px] p-3 text-[12px]", children: [
1581
1581
  /* @__PURE__ */ t("p", { className: "text-foreground", children: "This edit removes parts of the dashboard that viewers saved. Their views still open, with a note about what no longer applies." }),
1582
1582
  /* @__PURE__ */ t(
1583
1583
  "ul",
@@ -1585,7 +1585,7 @@ function yo({
1585
1585
  "aria-label": "Affected saved views",
1586
1586
  className: "mt-2 grid gap-1 border-t border-border/60 pt-2",
1587
1587
  children: r.map((o) => {
1588
- const { name: c, uses: m } = vo(o);
1588
+ const { name: c, uses: m } = wo(o);
1589
1589
  return /* @__PURE__ */ i(
1590
1590
  "li",
1591
1591
  {
@@ -1603,55 +1603,59 @@ function yo({
1603
1603
  ] })
1604
1604
  ] }) : null;
1605
1605
  }
1606
- function Gt(e, n) {
1606
+ function jt(e, n) {
1607
1607
  return {
1608
- dashboard: tt(e),
1609
- semanticExecutionPayload: tt(n)
1608
+ dashboard: rt(e),
1609
+ semanticExecutionPayload: rt(n)
1610
1610
  };
1611
1611
  }
1612
- function Yo() {
1613
- var gt, xt, vt, yt, wt;
1614
- Xa(), Za();
1612
+ function Xo() {
1613
+ var vt, yt, wt, Nt, St;
1615
1614
  const {
1616
1615
  authToken: e,
1617
1616
  tokenProps: n,
1618
1617
  id: a,
1619
1618
  showBriefings: r
1620
- } = z(), o = aa(), { isLocalDev: c } = na(), {
1619
+ } = K(), o = sa(), { isLocalDev: c } = ia(), {
1621
1620
  canEditDashboard: m,
1622
1621
  hasInspectionUser: p,
1623
1622
  inspectionMessage: b,
1624
1623
  isInspectionMode: f,
1625
1624
  isInspectionSurface: g
1626
- } = oa(), { openBrandStudioPreview: l } = sa(), { permissions: u } = Un(), s = ia(), { isLoading: x } = da(), v = C((d) => d.theme), w = C((d) => d.isDownloadingPdf), h = C((d) => d.dashboard), E = C((d) => d.selectedSheetId), A = (gt = h == null ? void 0 : h.sheets) == null ? void 0 : gt.find(
1625
+ } = da(), { openBrandStudioPreview: l } = ca(), { permissions: u } = $n(), s = la(), { isLoading: x } = ua(), v = C((d) => d.theme), w = C((d) => d.isDownloadingPdf), h = C((d) => d.dashboard), E = C((d) => d.selectedSheetId), A = (vt = h == null ? void 0 : h.sheets) == null ? void 0 : vt.find(
1627
1626
  (d) => d.id === E
1628
- ), L = yn(A), N = L ? (xt = A == null ? void 0 : A.document) == null ? void 0 : xt.page : void 0, k = C(
1627
+ ), L = Nn(A), N = L ? (yt = A == null ? void 0 : A.document) == null ? void 0 : yt.page : void 0, k = C(
1629
1628
  (d) => d.isDashboardEditing
1630
- ), { setDashboardTitle: re } = C((d) => d.actions), [ae, ye] = S(!1), [K, Q] = S(!1), [W, Y] = S(!1), [we, Ne] = S(!1), [ne, oe] = S(null), [Se, se] = S(!1), [Ue, J] = S(!1), [F, y] = S(null), [U, H] = S([]), [ie, q] = S(!1), [ke, de] = S(!1), R = C((d) => d.isVisualEditing);
1631
- Nt((d) => d.card);
1632
- const mr = Le(
1629
+ ), { setDashboardTitle: re } = C((d) => d.actions), [ae, Ne] = S(!1), [Q, W] = S(!1), [Y, J] = S(!1), [Se, ke] = S(!1), [ne, oe] = S(null), [se, ie] = S(null), { registerBriefingViewer: Ce } = ma();
1630
+ ge(
1631
+ () => Ce((d) => ie(d)),
1632
+ [Ce]
1633
+ );
1634
+ const [Ue, j] = S(!1), [y, R] = S(!1), [H, q] = S(null), [de, z] = S([]), [ce, De] = S(!1), [pr, ct] = S(!1), T = C((d) => d.isVisualEditing);
1635
+ kt((d) => d.card);
1636
+ const fr = Oe(
1633
1637
  (d) => d.selectedDashboard
1634
- ), hr = Le(
1638
+ ), br = Oe(
1635
1639
  (d) => d.initialDashboard
1636
1640
  );
1637
- Le((d) => d.selectedVisual), C((d) => d.selectedFrameId), Nt((d) => d.frame);
1638
- const dt = C(
1641
+ Oe((d) => d.selectedVisual), C((d) => d.selectedFrameId), kt((d) => d.frame);
1642
+ const lt = C(
1639
1643
  (d) => d.showDashboardJSON
1640
1644
  );
1641
1645
  C((d) => d.onSaveFunction);
1642
- const { setIsDashboardEditing: ct, setShowDashboardJSON: lt } = C(
1646
+ const { setIsDashboardEditing: ut, setShowDashboardJSON: mt } = C(
1643
1647
  (d) => d.actions
1644
- ), { setInitialDashboard: ut, clearSelectedDashboard: Te } = Le(
1648
+ ), { setInitialDashboard: ht, clearSelectedDashboard: $e } = Oe(
1645
1649
  (d) => d.actions
1646
- ), ce = !!n.orgUserId || !!(n.tenantId && n.endUserId && n.endUserEmail), { resources: Ce } = ca(Qe.DASHBOARD), { data: $e } = la(), pr = ((vt = $e == null ? void 0 : $e.preference) == null ? void 0 : vt.defaultDashboardId) || null, { mutate: fr, isPending: br } = ua(), { currentUser: gr } = at(), xr = ma(gr), B = mr || hr, V = ha({
1650
+ ), le = !!n.orgUserId || !!(n.tenantId && n.endUserId && n.endUserEmail), { resources: Ee } = ha(We.DASHBOARD), { data: Be } = pa(), gr = ((wt = Be == null ? void 0 : Be.preference) == null ? void 0 : wt.defaultDashboardId) || null, { mutate: xr, isPending: vr } = fa(), { currentUser: yr } = nt(), wr = ba(yr), B = fr || br, G = ga({
1647
1651
  config: n.config,
1648
- canNavigateDashboardHub: ce,
1649
- canShareDashboard: ((yt = B == null ? void 0 : B.permissions) == null ? void 0 : yt.canShare) === !0,
1650
- canManageGroups: xr
1651
- }), mt = B ? {
1652
+ canNavigateDashboardHub: le,
1653
+ canShareDashboard: ((Nt = B == null ? void 0 : B.permissions) == null ? void 0 : Nt.canShare) === !0,
1654
+ canManageGroups: wr
1655
+ }), pt = B ? {
1652
1656
  id: B.id,
1653
1657
  title: (h == null ? void 0 : h.title) || B.title || "Dashboard"
1654
- } : null, { handleAddNewFrame: vr } = pa(), [Fe, Be] = S(!1), [yr, le] = S(!1), [Ge, De] = S("close"), ue = fa(Qe.DASHBOARD), [M, me] = S(null), wr = async (d, _) => {
1658
+ } : null, { handleAddNewFrame: Nr } = xa(), [Fe, Ge] = S(!1), [Sr, ue] = S(!1), [Ve, Ie] = S("close"), me = va(We.DASHBOARD), [M, he] = S(null), kr = async (d, _) => {
1655
1659
  if (!f) {
1656
1660
  if (!(h != null && h.id)) {
1657
1661
  console.log("No dashboard ID found");
@@ -1661,14 +1665,14 @@ function Yo() {
1661
1665
  dashboardId: h.id,
1662
1666
  newTitle: d,
1663
1667
  previousTitle: _
1664
- }), ue.mutate(
1668
+ }), me.mutate(
1665
1669
  {
1666
1670
  resourceId: h.id,
1667
1671
  data: { title: d }
1668
1672
  },
1669
1673
  {
1670
1674
  onSuccess: () => {
1671
- me(
1675
+ he(
1672
1676
  (O) => (O == null ? void 0 : O.dashboard.id) === h.id ? {
1673
1677
  ...O,
1674
1678
  dashboard: { ...O.dashboard, title: d }
@@ -1684,19 +1688,19 @@ function Yo() {
1684
1688
  );
1685
1689
  }
1686
1690
  };
1687
- Pe(() => {
1688
- if (Ce && Ce.length > 0) {
1691
+ ge(() => {
1692
+ if (Ee && Ee.length > 0) {
1689
1693
  const d = h == null ? void 0 : h.id;
1690
1694
  if (d) {
1691
- const _ = Ce.find(
1695
+ const _ = Ee.find(
1692
1696
  (O) => O.id === d
1693
1697
  );
1694
- _ && ut(_);
1698
+ _ && ht(_);
1695
1699
  }
1696
1700
  }
1697
- }, [Ce, h == null ? void 0 : h.id, ut]);
1698
- const Nr = n.orgUserId || n.tenantId, Ve = j(
1699
- () => wo({
1701
+ }, [Ee, h == null ? void 0 : h.id, ht]);
1702
+ const Cr = n.orgUserId || n.tenantId, je = V(
1703
+ () => So({
1700
1704
  accessToken: e == null ? void 0 : e.accessToken,
1701
1705
  dashboardId: (h == null ? void 0 : h.id) || a || n.dashboard_id,
1702
1706
  selectedSheetId: L ? E : void 0,
@@ -1715,109 +1719,109 @@ function Yo() {
1715
1719
  v,
1716
1720
  n.dashboard_id
1717
1721
  ]
1718
- ), je = k && !R && !f && Nr && m, { setDashboard: He } = C((d) => d.actions), Sr = C(
1722
+ ), He = k && !T && !f && Cr && m, { setDashboard: qe } = C((d) => d.actions), Dr = C(
1719
1723
  (d) => d.semanticExecutionPayload
1720
- ), kr = () => {
1721
- ct(!0);
1722
- }, Ee = () => {
1723
- ct(!1), lt(!1), me(null);
1724
+ ), Er = () => {
1725
+ ut(!0);
1726
+ }, Ae = () => {
1727
+ ut(!1), mt(!1), he(null);
1724
1728
  };
1725
- Pe(() => {
1729
+ ge(() => {
1726
1730
  if (!k) {
1727
- M && me(null);
1731
+ M && he(null);
1728
1732
  return;
1729
1733
  }
1730
1734
  if (M || !h || x)
1731
1735
  return;
1732
- const d = ba(C.getState());
1733
- me(
1734
- Gt(d.dashboard, d.semanticExecutionPayload)
1736
+ const d = ya(C.getState());
1737
+ he(
1738
+ jt(d.dashboard, d.semanticExecutionPayload)
1735
1739
  );
1736
1740
  }, [
1737
1741
  h,
1738
1742
  M,
1739
1743
  k,
1740
1744
  x,
1741
- Sr
1745
+ Dr
1742
1746
  ]);
1743
- const qe = (M == null ? void 0 : M.dashboard) ?? null, { isDirty: ze, isDirtyPending: Cr, resetDirty: he } = Nn(
1747
+ const ze = (M == null ? void 0 : M.dashboard) ?? null, { isDirty: Ke, isDirtyPending: Ir, resetDirty: pe } = kn(
1744
1748
  h,
1745
- qe,
1749
+ ze,
1746
1750
  300,
1747
1751
  1e3,
1748
- Sn
1749
- ), ht = en(
1750
- qe,
1752
+ Cn
1753
+ ), ft = rn(
1754
+ ze,
1751
1755
  f,
1752
1756
  m
1753
- ), pt = ze || Cr, Ie = Fe || ue.isPending, Dr = () => {
1757
+ ), bt = Ke || Ir, Le = Fe || me.isPending, Ar = () => {
1754
1758
  if (f) {
1755
- M && He(M.dashboard, {
1759
+ M && qe(M.dashboard, {
1756
1760
  semanticExecutionPayload: M.semanticExecutionPayload
1757
- }), Ee(), he();
1761
+ }), Ae(), pe();
1758
1762
  return;
1759
1763
  }
1760
- ht() ? (De("close"), le(!0)) : (Ee(), he());
1761
- }, Er = async () => {
1762
- await Ke({
1764
+ ft() ? (Ie("close"), ue(!0)) : (Ae(), pe());
1765
+ }, Lr = async () => {
1766
+ await Qe({
1763
1767
  closeAfterSave: !0,
1764
- navigateHomeAfterSave: Ge === "home"
1768
+ navigateHomeAfterSave: Ve === "home"
1765
1769
  });
1766
- }, Ir = () => {
1767
- const d = Ge === "home" && !!ce;
1768
- M && He(M.dashboard, {
1770
+ }, Mr = () => {
1771
+ const d = Ve === "home" && !!le;
1772
+ M && qe(M.dashboard, {
1769
1773
  semanticExecutionPayload: M.semanticExecutionPayload
1770
- }), Ee(), d && Te(), De("close"), le(!1), he();
1771
- }, Ar = () => {
1772
- M && (He(M.dashboard, {
1774
+ }), Ae(), d && $e(), Ie("close"), ue(!1), pe();
1775
+ }, Or = () => {
1776
+ M && (qe(M.dashboard, {
1773
1777
  semanticExecutionPayload: M.semanticExecutionPayload
1774
- }), he());
1775
- }, Lr = () => {
1776
- if (ce) {
1777
- if (k && ht()) {
1778
- De("home"), le(!0);
1778
+ }), pe());
1779
+ }, _r = () => {
1780
+ if (le) {
1781
+ if (k && ft()) {
1782
+ Ie("home"), ue(!0);
1779
1783
  return;
1780
1784
  }
1781
- Te();
1785
+ $e();
1782
1786
  }
1783
1787
  };
1784
- async function Ke(d) {
1788
+ async function Qe(d) {
1785
1789
  if (f)
1786
1790
  return;
1787
1791
  const _ = C.getState().dashboard;
1788
1792
  if (!_)
1789
1793
  return;
1790
- const O = (d == null ? void 0 : d.closeAfterSave) ?? ie, Z = (d == null ? void 0 : d.navigateHomeAfterSave) ?? !1;
1791
- q(O), O && le(!1);
1792
- const Rr = tt(_);
1793
- J(!0), y(null), H([]), Be(!0);
1794
- const Ur = {
1794
+ const O = (d == null ? void 0 : d.closeAfterSave) ?? ce, Z = (d == null ? void 0 : d.navigateHomeAfterSave) ?? !1;
1795
+ De(O), O && ue(!1);
1796
+ const $r = rt(_);
1797
+ R(!0), q(null), z([]), Ge(!0);
1798
+ const Br = {
1795
1799
  template: _
1796
1800
  };
1797
- ue.mutate(
1801
+ me.mutate(
1798
1802
  {
1799
1803
  resourceId: _.id,
1800
- data: Ur
1804
+ data: Br
1801
1805
  },
1802
1806
  {
1803
1807
  onSuccess: () => {
1804
- Be(!1), D.success("Dashboard saved!"), me(
1805
- Gt(
1806
- Rr,
1808
+ Ge(!1), D.success("Dashboard saved!"), he(
1809
+ jt(
1810
+ $r,
1807
1811
  C.getState().semanticExecutionPayload
1808
1812
  )
1809
- ), J(!1), q(!1), O && (Ee(), he(), Z && ce && Te()), De("close");
1813
+ ), R(!1), De(!1), O && (Ae(), pe(), Z && le && $e()), Ie("close");
1810
1814
  },
1811
- onError: (Tr) => {
1812
- Be(!1), y("Failed to save dashboard. Please try again.");
1813
- const Ae = Tr.details, $r = Array.isArray(
1814
- Ae == null ? void 0 : Ae.errors
1815
- ) ? (Ae.errors || []).filter(
1816
- (Fr) => typeof Fr == "string"
1815
+ onError: (Fr) => {
1816
+ Ge(!1), q("Failed to save dashboard. Please try again.");
1817
+ const Me = Fr.details, Gr = Array.isArray(
1818
+ Me == null ? void 0 : Me.errors
1819
+ ) ? (Me.errors || []).filter(
1820
+ (Vr) => typeof Vr == "string"
1817
1821
  ) : [];
1818
- H(
1819
- ho({
1820
- errors: $r,
1822
+ z(
1823
+ fo({
1824
+ errors: Gr,
1821
1825
  dashboard: _ || void 0
1822
1826
  })
1823
1827
  ), D.error("Failed to save dashboard");
@@ -1825,39 +1829,39 @@ function Yo() {
1825
1829
  }
1826
1830
  );
1827
1831
  }
1828
- const ft = h.title;
1829
- ue.isPending && console.log("Title during update:", {
1830
- title: ft,
1832
+ const gt = h.title;
1833
+ me.isPending && console.log("Title during update:", {
1834
+ title: gt,
1831
1835
  dashboardStateTitle: h.title,
1832
1836
  dashboardId: h == null ? void 0 : h.id
1833
1837
  });
1834
- const Mr = ce && !!(e != null && e.accessToken) && !!(n != null && n.apiServiceUrl), Or = !f && V.showDashboardHub && Mr, _r = !f && s && V.showDashboardHub, G = (h == null ? void 0 : h.id) || null, bt = ga(
1835
- (wt = n.config) == null ? void 0 : wt.showBriefings,
1838
+ const Pr = le && !!(e != null && e.accessToken) && !!(n != null && n.apiServiceUrl), Rr = !f && G.showDashboardHub && Pr, Tr = !f && s && G.showDashboardHub, F = (h == null ? void 0 : h.id) || null, xt = wa(
1839
+ (St = n.config) == null ? void 0 : St.showBriefings,
1836
1840
  r
1837
- ), X = !!G && pr === G, Pr = () => {
1838
- !G || f || fr({
1839
- dashboardId: X ? null : G
1841
+ ), X = !!F && gr === F, Ur = () => {
1842
+ !F || f || xr({
1843
+ dashboardId: X ? null : F
1840
1844
  });
1841
1845
  };
1842
- return !s && !R ? null : /* @__PURE__ */ i(
1846
+ return !s && !T ? null : /* @__PURE__ */ i(
1843
1847
  "div",
1844
1848
  {
1845
1849
  className: "flex min-h-11 shrink-0 items-center justify-between gap-2 overflow-x-auto border-b px-4 py-1.5",
1846
1850
  role: "dashboard-controls",
1847
1851
  children: [
1848
1852
  /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
1849
- _r && !R && /* @__PURE__ */ t(
1850
- ln,
1853
+ Tr && !T && /* @__PURE__ */ t(
1854
+ mn,
1851
1855
  {
1852
1856
  "aria-label": "Dashboard Hub",
1853
1857
  tooltip: "Dashboard Hub",
1854
- onClick: Lr,
1858
+ onClick: _r,
1855
1859
  className: "h-7 w-7 px-0",
1856
1860
  buttonProps: { size: "xs" },
1857
- children: /* @__PURE__ */ t(xa, { className: "h-3.5 w-3.5" })
1861
+ children: /* @__PURE__ */ t(Na, { className: "h-3.5 w-3.5" })
1858
1862
  }
1859
1863
  ),
1860
- !R && s && (x ? /* @__PURE__ */ t(
1864
+ !T && s && (x ? /* @__PURE__ */ t(
1861
1865
  "div",
1862
1866
  {
1863
1867
  className: "h-4 w-28 animate-pulse rounded-md bg-muted/70",
@@ -1867,9 +1871,9 @@ function Yo() {
1867
1871
  }
1868
1872
  ) : /* @__PURE__ */ i($, { children: [
1869
1873
  /* @__PURE__ */ t(
1870
- va,
1874
+ Sa,
1871
1875
  {
1872
- value: ft || "Untitled Dashboard",
1876
+ value: gt || "Untitled Dashboard",
1873
1877
  onSave: (d) => {
1874
1878
  console.log("EditableText onSave called:", {
1875
1879
  newTitle: d,
@@ -1877,19 +1881,19 @@ function Yo() {
1877
1881
  dashboardId: h == null ? void 0 : h.id
1878
1882
  });
1879
1883
  const _ = (h == null ? void 0 : h.title) || "";
1880
- re(d), wr(d, _);
1884
+ re(d), kr(d, _);
1881
1885
  },
1882
- isEditable: ya({
1886
+ isEditable: ka({
1883
1887
  isDashboardEditing: k,
1884
1888
  canEditDashboard: m === !0 && !f
1885
1889
  }),
1886
1890
  displayClassName: "text-[13px] font-medium",
1887
1891
  inputClassName: "text-[13px] font-medium",
1888
1892
  placeholder: "Dashboard Title",
1889
- isPending: ue.isPending
1893
+ isPending: me.isPending
1890
1894
  }
1891
1895
  ),
1892
- V.showDashboardHub && X && /* @__PURE__ */ t(
1896
+ G.showDashboardHub && X && /* @__PURE__ */ t(
1893
1897
  "span",
1894
1898
  {
1895
1899
  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",
@@ -1897,42 +1901,42 @@ function Yo() {
1897
1901
  children: "Default"
1898
1902
  }
1899
1903
  ),
1900
- Or && G && /* @__PURE__ */ t(It, { children: /* @__PURE__ */ i(At, { children: [
1901
- /* @__PURE__ */ t(Lt, { asChild: !0, children: /* @__PURE__ */ t(
1902
- T,
1904
+ Rr && F && /* @__PURE__ */ t(Lt, { children: /* @__PURE__ */ i(Mt, { children: [
1905
+ /* @__PURE__ */ t(Ot, { asChild: !0, children: /* @__PURE__ */ t(
1906
+ U,
1903
1907
  {
1904
1908
  variant: "ghost",
1905
1909
  size: "xs",
1906
- onClick: Pr,
1907
- disabled: br || !(e != null && e.accessToken) || !(n != null && n.apiServiceUrl),
1908
- className: be(
1910
+ onClick: Ur,
1911
+ disabled: vr || !(e != null && e.accessToken) || !(n != null && n.apiServiceUrl),
1912
+ className: xe(
1909
1913
  "w-7 px-0",
1910
1914
  X ? "bg-primary/10 text-primary hover:bg-primary/15 hover:text-primary focus-visible:bg-primary/15" : "text-muted-foreground hover:text-foreground"
1911
1915
  ),
1912
1916
  "aria-pressed": X,
1913
1917
  "aria-label": X ? "Remove as default dashboard" : "Set as default dashboard",
1914
- children: /* @__PURE__ */ t(wa, { className: "h-3.5 w-3.5" })
1918
+ children: /* @__PURE__ */ t(Ca, { className: "h-3.5 w-3.5" })
1915
1919
  }
1916
1920
  ) }),
1917
- /* @__PURE__ */ t(Mt, { children: /* @__PURE__ */ t("p", { children: X ? "Remove as default dashboard" : "Set as default dashboard" }) })
1921
+ /* @__PURE__ */ t(_t, { children: /* @__PURE__ */ t("p", { children: X ? "Remove as default dashboard" : "Set as default dashboard" }) })
1918
1922
  ] }) })
1919
1923
  ] }))
1920
1924
  ] }),
1921
1925
  /* @__PURE__ */ i("div", { className: "flex items-center gap-2", children: [
1922
- R && /* @__PURE__ */ i($, { children: [
1923
- /* @__PURE__ */ t(tn, {}),
1924
- /* @__PURE__ */ t(rn, {})
1926
+ T && /* @__PURE__ */ i($, { children: [
1927
+ /* @__PURE__ */ t(an, {}),
1928
+ /* @__PURE__ */ t(nn, {})
1925
1929
  ] }),
1926
- s && !f && /* @__PURE__ */ t(un, {}),
1927
- !R && k && !f && u.canUseFilters && s && /* @__PURE__ */ t(an, {}),
1928
- k && !R && !f && s && !L && /* @__PURE__ */ i("div", { className: "inline-flex h-7 items-stretch overflow-hidden rounded-control border border-input bg-background", children: [
1930
+ s && !f && /* @__PURE__ */ t(hn, {}),
1931
+ !T && k && !f && u.canUseFilters && s && /* @__PURE__ */ t(on, {}),
1932
+ k && !T && !f && s && !L && /* @__PURE__ */ i("div", { className: "inline-flex h-7 items-stretch overflow-hidden rounded-control border border-input bg-background", children: [
1929
1933
  /* @__PURE__ */ i(
1930
- T,
1934
+ U,
1931
1935
  {
1932
1936
  variant: "ghost",
1933
1937
  size: "xs",
1934
1938
  disabled: !k,
1935
- onClick: () => void vr(),
1939
+ onClick: () => void Nr(),
1936
1940
  className: "h-full rounded-none border-0 shadow-none hover:bg-accent",
1937
1941
  children: [
1938
1942
  /* @__PURE__ */ t(ee, { className: "h-3.5 w-3.5" }),
@@ -1940,24 +1944,24 @@ function Yo() {
1940
1944
  ]
1941
1945
  }
1942
1946
  ),
1943
- /* @__PURE__ */ i(St, { modal: !1, children: [
1944
- /* @__PURE__ */ t(kt, { asChild: !0, children: /* @__PURE__ */ t(
1945
- T,
1947
+ /* @__PURE__ */ i(Ct, { modal: !1, children: [
1948
+ /* @__PURE__ */ t(Dt, { asChild: !0, children: /* @__PURE__ */ t(
1949
+ U,
1946
1950
  {
1947
1951
  variant: "ghost",
1948
1952
  size: "xs",
1949
1953
  className: "h-full w-7 rounded-none border-0 border-l border-border/60 px-0 shadow-none hover:bg-accent",
1950
1954
  "aria-label": "Open visual options",
1951
1955
  disabled: !k,
1952
- children: /* @__PURE__ */ t(Ya, { className: "h-3.5 w-3.5" })
1956
+ children: /* @__PURE__ */ t(en, { className: "h-3.5 w-3.5" })
1953
1957
  }
1954
1958
  ) }),
1955
1959
  /* @__PURE__ */ t(
1956
- Ct,
1960
+ Et,
1957
1961
  {
1958
1962
  align: "end",
1959
1963
  className: "z-[60] w-48 rounded-[6px] border-border/60 p-1 shadow-sm",
1960
- children: /* @__PURE__ */ i(P, { onClick: () => de(!0), children: [
1964
+ children: /* @__PURE__ */ i(P, { onClick: () => ct(!0), children: [
1961
1965
  /* @__PURE__ */ t(ee, { className: "h-3.5 w-3.5" }),
1962
1966
  "From library..."
1963
1967
  ] })
@@ -1965,105 +1969,105 @@ function Yo() {
1965
1969
  )
1966
1970
  ] }),
1967
1971
  /* @__PURE__ */ t(
1968
- nn,
1972
+ sn,
1969
1973
  {
1970
- open: ke,
1971
- onOpenChange: de
1974
+ open: pr,
1975
+ onOpenChange: ct
1972
1976
  }
1973
1977
  )
1974
1978
  ] }),
1975
- !R && !k && (m || f) && (!g || !p || m !== void 0) && s && /* @__PURE__ */ i("div", { className: "inline-flex items-center gap-1", children: [
1976
- /* @__PURE__ */ i(T, { size: "xs", onClick: kr, children: [
1977
- /* @__PURE__ */ t(Na, { className: "h-3.5 w-3.5" }),
1979
+ !T && !k && (m || f) && (!g || !p || m !== void 0) && s && /* @__PURE__ */ i("div", { className: "inline-flex items-center gap-1", children: [
1980
+ /* @__PURE__ */ i(U, { size: "xs", onClick: Er, children: [
1981
+ /* @__PURE__ */ t(Da, { className: "h-3.5 w-3.5" }),
1978
1982
  f ? "Inspect" : "Edit"
1979
1983
  ] }),
1980
- b ? /* @__PURE__ */ t(It, { children: /* @__PURE__ */ i(At, { children: [
1981
- /* @__PURE__ */ t(Lt, { asChild: !0, children: /* @__PURE__ */ t(
1984
+ b ? /* @__PURE__ */ t(Lt, { children: /* @__PURE__ */ i(Mt, { children: [
1985
+ /* @__PURE__ */ t(Ot, { asChild: !0, children: /* @__PURE__ */ t(
1982
1986
  "button",
1983
1987
  {
1984
1988
  type: "button",
1985
1989
  "aria-label": b,
1986
1990
  className: "inline-flex size-6 items-center justify-center rounded-control text-muted-foreground outline-none hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
1987
- children: /* @__PURE__ */ t(Wa, { "aria-hidden": "true", className: "size-3.5" })
1991
+ children: /* @__PURE__ */ t(Za, { "aria-hidden": "true", className: "size-3.5" })
1988
1992
  }
1989
1993
  ) }),
1990
- /* @__PURE__ */ t(Mt, { children: /* @__PURE__ */ t("p", { children: b }) })
1994
+ /* @__PURE__ */ t(_t, { children: /* @__PURE__ */ t("p", { children: b }) })
1991
1995
  ] }) }) : null
1992
1996
  ] }),
1993
- je && s && ze && /* @__PURE__ */ t(
1994
- yo,
1997
+ He && s && Ke && /* @__PURE__ */ t(
1998
+ No,
1995
1999
  {
1996
- saved: qe,
2000
+ saved: ze,
1997
2001
  draft: h,
1998
2002
  enabled: k && !f
1999
2003
  }
2000
2004
  ),
2001
- je && s && ze && /* @__PURE__ */ i(
2002
- T,
2005
+ He && s && Ke && /* @__PURE__ */ i(
2006
+ U,
2003
2007
  {
2004
2008
  variant: "outline",
2005
2009
  size: "xs",
2006
- onClick: Ar,
2007
- disabled: Ie,
2010
+ onClick: Or,
2011
+ disabled: Le,
2008
2012
  children: [
2009
- /* @__PURE__ */ t(Sa, { className: "h-3.5 w-3.5" }),
2013
+ /* @__PURE__ */ t(Ea, { className: "h-3.5 w-3.5" }),
2010
2014
  "Undo"
2011
2015
  ]
2012
2016
  }
2013
2017
  ),
2014
- je && s && /* @__PURE__ */ i(
2015
- T,
2018
+ He && s && /* @__PURE__ */ i(
2019
+ U,
2016
2020
  {
2017
2021
  size: "xs",
2018
- className: be(!pt && "opacity-60"),
2019
- disabled: Ie || !pt,
2020
- onClick: () => Ke(),
2022
+ className: xe(!bt && "opacity-60"),
2023
+ disabled: Le || !bt,
2024
+ onClick: () => Qe(),
2021
2025
  children: [
2022
- Ie ? /* @__PURE__ */ t(_e, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(kn, { className: "h-3.5 w-3.5" }),
2023
- Ie ? "Saving..." : "Save"
2026
+ Le ? /* @__PURE__ */ t(Re, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ t(Dn, { className: "h-3.5 w-3.5" }),
2027
+ Le ? "Saving..." : "Save"
2024
2028
  ]
2025
2029
  }
2026
2030
  ),
2027
- k && !R && s && /* @__PURE__ */ i(T, { variant: "outline", size: "xs", onClick: Dr, children: [
2028
- /* @__PURE__ */ t(ka, { className: "h-3.5 w-3.5" }),
2031
+ k && !T && s && /* @__PURE__ */ i(U, { variant: "outline", size: "xs", onClick: Ar, children: [
2032
+ /* @__PURE__ */ t(Ia, { className: "h-3.5 w-3.5" }),
2029
2033
  "Close"
2030
2034
  ] }),
2031
- !R && s && /* @__PURE__ */ t("div", { className: "ml-2 flex items-center", children: /* @__PURE__ */ t(on, {}) }),
2032
- !R && c && /* @__PURE__ */ t(Rn, {}),
2033
- !R && s && !f && /* @__PURE__ */ i(St, { children: [
2034
- /* @__PURE__ */ t(kt, { asChild: !0, children: /* @__PURE__ */ t(
2035
- T,
2035
+ !T && s && /* @__PURE__ */ t("div", { className: "ml-2 flex items-center", children: /* @__PURE__ */ t(dn, {}) }),
2036
+ !T && c && /* @__PURE__ */ t(Un, {}),
2037
+ !T && s && !f && /* @__PURE__ */ i(Ct, { children: [
2038
+ /* @__PURE__ */ t(Dt, { asChild: !0, children: /* @__PURE__ */ t(
2039
+ U,
2036
2040
  {
2037
2041
  variant: "ghost",
2038
2042
  size: "xs",
2039
2043
  className: "w-7 px-0 text-muted-foreground hover:text-foreground",
2040
2044
  "aria-label": "More dashboard options",
2041
- children: /* @__PURE__ */ t(Ca, { className: "h-3.5 w-3.5" })
2045
+ children: /* @__PURE__ */ t(Aa, { className: "h-3.5 w-3.5" })
2042
2046
  }
2043
2047
  ) }),
2044
2048
  /* @__PURE__ */ i(
2045
- Ct,
2049
+ Et,
2046
2050
  {
2047
2051
  align: "end",
2048
2052
  className: "w-56 rounded-control border border-border/60 p-1 shadow-sm",
2049
2053
  children: [
2050
- /* @__PURE__ */ t(Me, { children: "Reports & briefings" }),
2054
+ /* @__PURE__ */ t(_e, { children: "Reports & briefings" }),
2051
2055
  /* @__PURE__ */ i(
2052
2056
  P,
2053
2057
  {
2054
2058
  disabled: w,
2055
- onSelect: () => se(!0),
2059
+ onSelect: () => j(!0),
2056
2060
  children: [
2057
- /* @__PURE__ */ t(Da, { className: "h-3.5 w-3.5" }),
2061
+ /* @__PURE__ */ t(La, { className: "h-3.5 w-3.5" }),
2058
2062
  "Export"
2059
2063
  ]
2060
2064
  }
2061
2065
  ),
2062
2066
  /* @__PURE__ */ t(
2063
- fo,
2067
+ go,
2064
2068
  {
2065
- scheduleReportVisible: !!(bt && o.surfaceVisible && G && !k),
2066
- analyticalBriefingVisible: !!(bt && o.surfaceVisible && G && !k),
2069
+ scheduleReportVisible: !!(xt && o.surfaceVisible && F && !k),
2070
+ analyticalBriefingVisible: !!(xt && o.surfaceVisible && F && !k),
2067
2071
  onScheduleReport: () => oe("scheduled_report"),
2068
2072
  onCreateAnalyticalBriefing: () => oe("analytical_briefing")
2069
2073
  }
@@ -2071,40 +2075,40 @@ function Yo() {
2071
2075
  k && /* @__PURE__ */ i(
2072
2076
  P,
2073
2077
  {
2074
- onSelect: () => Ne(!0),
2078
+ onSelect: () => ke(!0),
2075
2079
  children: [
2076
- /* @__PURE__ */ t(Ea, { className: "h-3.5 w-3.5" }),
2080
+ /* @__PURE__ */ t(Ma, { className: "h-3.5 w-3.5" }),
2077
2081
  "Download settings"
2078
2082
  ]
2079
2083
  }
2080
2084
  ),
2081
- /* @__PURE__ */ t(We, {}),
2082
- (V.showDashboardSharing || V.showGroupManagement) && /* @__PURE__ */ i($, { children: [
2083
- /* @__PURE__ */ t(Me, { children: "Access" }),
2084
- V.showDashboardSharing && /* @__PURE__ */ i(P, { onSelect: () => ye(!0), children: [
2085
- /* @__PURE__ */ t(Ia, { className: "h-3.5 w-3.5" }),
2085
+ /* @__PURE__ */ t(Ye, {}),
2086
+ (G.showDashboardSharing || G.showGroupManagement) && /* @__PURE__ */ i($, { children: [
2087
+ /* @__PURE__ */ t(_e, { children: "Access" }),
2088
+ G.showDashboardSharing && /* @__PURE__ */ i(P, { onSelect: () => Ne(!0), children: [
2089
+ /* @__PURE__ */ t(Oa, { className: "h-3.5 w-3.5" }),
2086
2090
  "Share"
2087
2091
  ] }),
2088
- V.showGroupManagement && /* @__PURE__ */ i(
2092
+ G.showGroupManagement && /* @__PURE__ */ i(
2089
2093
  P,
2090
2094
  {
2091
- onClick: () => Q(!0),
2095
+ onClick: () => W(!0),
2092
2096
  children: [
2093
- /* @__PURE__ */ t(qt, { className: "h-3.5 w-3.5" }),
2097
+ /* @__PURE__ */ t(Kt, { className: "h-3.5 w-3.5" }),
2094
2098
  "Manage Groups"
2095
2099
  ]
2096
2100
  }
2097
2101
  ),
2098
- /* @__PURE__ */ t(We, {})
2102
+ /* @__PURE__ */ t(Ye, {})
2099
2103
  ] }),
2100
- /* @__PURE__ */ t(Me, { children: "Preferences" }),
2101
- /* @__PURE__ */ i(P, { onClick: () => Y(!0), children: [
2102
- /* @__PURE__ */ t(zt, { className: "h-3.5 w-3.5" }),
2104
+ /* @__PURE__ */ t(_e, { children: "Preferences" }),
2105
+ /* @__PURE__ */ i(P, { onClick: () => J(!0), children: [
2106
+ /* @__PURE__ */ t(Qt, { className: "h-3.5 w-3.5" }),
2103
2107
  "Report preferences"
2104
2108
  ] }),
2105
2109
  c && s && /* @__PURE__ */ i($, { children: [
2106
- /* @__PURE__ */ t(We, {}),
2107
- /* @__PURE__ */ t(Me, { children: "Developer" }),
2110
+ /* @__PURE__ */ t(Ye, {}),
2111
+ /* @__PURE__ */ t(_e, { children: "Developer" }),
2108
2112
  /* @__PURE__ */ i(
2109
2113
  P,
2110
2114
  {
@@ -2115,7 +2119,7 @@ function Yo() {
2115
2119
  ).catch(() => D.error("Unable to copy token")) : D.error("Clipboard not available"));
2116
2120
  },
2117
2121
  children: [
2118
- /* @__PURE__ */ t(Dt, { className: "h-3.5 w-3.5" }),
2122
+ /* @__PURE__ */ t(It, { className: "h-3.5 w-3.5" }),
2119
2123
  "Copy token"
2120
2124
  ]
2121
2125
  }
@@ -2123,16 +2127,16 @@ function Yo() {
2123
2127
  L && /* @__PURE__ */ i(
2124
2128
  P,
2125
2129
  {
2126
- disabled: !Ve,
2130
+ disabled: !je,
2127
2131
  onSelect: () => {
2128
2132
  var d;
2129
- if (!Ve) {
2133
+ if (!je) {
2130
2134
  D.error(
2131
2135
  "Open a document sheet with a token to copy the local PDF URL"
2132
2136
  );
2133
2137
  return;
2134
2138
  }
2135
- (d = navigator == null ? void 0 : navigator.clipboard) != null && d.writeText ? navigator.clipboard.writeText(Ve).then(
2139
+ (d = navigator == null ? void 0 : navigator.clipboard) != null && d.writeText ? navigator.clipboard.writeText(je).then(
2136
2140
  () => D.success(
2137
2141
  "Local document PDF URL copied to clipboard"
2138
2142
  )
@@ -2143,7 +2147,7 @@ function Yo() {
2143
2147
  ) : D.error("Clipboard not available");
2144
2148
  },
2145
2149
  children: [
2146
- /* @__PURE__ */ t(Dt, { className: "h-3.5 w-3.5" }),
2150
+ /* @__PURE__ */ t(It, { className: "h-3.5 w-3.5" }),
2147
2151
  "Copy local document PDF URL"
2148
2152
  ]
2149
2153
  }
@@ -2151,24 +2155,24 @@ function Yo() {
2151
2155
  /* @__PURE__ */ i(
2152
2156
  P,
2153
2157
  {
2154
- onSelect: () => sn(n.apiServiceUrl),
2158
+ onSelect: () => cn(n.apiServiceUrl),
2155
2159
  children: [
2156
- /* @__PURE__ */ t(An, { className: "h-3.5 w-3.5" }),
2160
+ /* @__PURE__ */ t(Mn, { className: "h-3.5 w-3.5" }),
2157
2161
  "Invalidate token"
2158
2162
  ]
2159
2163
  }
2160
2164
  ),
2161
2165
  /* @__PURE__ */ i(P, { onSelect: l, children: [
2162
- /* @__PURE__ */ t(Cn, { className: "h-3.5 w-3.5" }),
2166
+ /* @__PURE__ */ t(En, { className: "h-3.5 w-3.5" }),
2163
2167
  "Brand Studio"
2164
2168
  ] }),
2165
2169
  k && /* @__PURE__ */ i(
2166
2170
  P,
2167
2171
  {
2168
- onSelect: () => lt(!dt),
2172
+ onSelect: () => mt(!lt),
2169
2173
  children: [
2170
- /* @__PURE__ */ t(Dn, { className: "h-3.5 w-3.5" }),
2171
- dt ? "Hide dashboard JSON" : "Show dashboard JSON"
2174
+ /* @__PURE__ */ t(In, { className: "h-3.5 w-3.5" }),
2175
+ lt ? "Hide dashboard JSON" : "Show dashboard JSON"
2172
2176
  ]
2173
2177
  }
2174
2178
  )
@@ -2177,109 +2181,110 @@ function Yo() {
2177
2181
  }
2178
2182
  )
2179
2183
  ] }),
2180
- ae && mt && /* @__PURE__ */ t(
2181
- Aa,
2184
+ ae && pt && /* @__PURE__ */ t(
2185
+ _a,
2182
2186
  {
2183
- resource: mt,
2184
- resourceType: Qe.DASHBOARD,
2185
- onClose: () => ye(!1)
2187
+ resource: pt,
2188
+ resourceType: We.DASHBOARD,
2189
+ onClose: () => Ne(!1)
2186
2190
  }
2187
2191
  ),
2188
- V.showGroupManagement && /* @__PURE__ */ t(
2189
- ao,
2192
+ G.showGroupManagement && /* @__PURE__ */ t(
2193
+ oo,
2190
2194
  {
2191
- open: K,
2192
- onOpenChange: Q
2195
+ open: Q,
2196
+ onOpenChange: W
2193
2197
  }
2194
2198
  ),
2195
2199
  /* @__PURE__ */ t(
2196
- mn,
2200
+ pn,
2197
2201
  {
2198
- open: W,
2199
- onOpenChange: Y
2202
+ open: Y,
2203
+ onOpenChange: J
2200
2204
  }
2201
2205
  ),
2202
2206
  /* @__PURE__ */ t(
2203
- mo,
2207
+ po,
2204
2208
  {
2205
- open: we,
2206
- onOpenChange: Ne
2209
+ open: Se,
2210
+ onOpenChange: ke
2207
2211
  }
2208
2212
  ),
2209
- G && ne ? /* @__PURE__ */ t(
2210
- dn,
2213
+ F && (ne || se) ? /* @__PURE__ */ t(
2214
+ ln,
2211
2215
  {
2212
- dashboardId: G,
2216
+ dashboardId: F,
2213
2217
  dashboardTitle: (h == null ? void 0 : h.title) || (B == null ? void 0 : B.title),
2214
2218
  open: !0,
2215
2219
  onOpenChange: (d) => {
2216
- d || oe(null);
2220
+ d || (oe(null), ie(null));
2217
2221
  },
2218
2222
  hideTrigger: !0,
2219
- workflowIntent: ne
2223
+ workflowIntent: ne ?? void 0,
2224
+ openRun: se ?? void 0
2220
2225
  }
2221
2226
  ) : null,
2222
2227
  s && /* @__PURE__ */ t(
2223
- La,
2228
+ Pa,
2224
2229
  {
2225
- open: Se,
2226
- onOpenChange: se
2230
+ open: Ue,
2231
+ onOpenChange: j
2227
2232
  }
2228
2233
  ),
2229
2234
  /* @__PURE__ */ t(
2230
- Ma,
2235
+ Ra,
2231
2236
  {
2232
- open: Ue,
2237
+ open: y,
2233
2238
  onOpenChange: (d) => {
2234
- !d && Fe && !F || (J(d), d || (y(null), H([]), q(!1)));
2239
+ !d && Fe && !H || (R(d), d || (q(null), z([]), De(!1)));
2235
2240
  },
2236
- children: /* @__PURE__ */ i(Oa, { className: "max-w-sm", children: [
2237
- /* @__PURE__ */ i(_a, { children: [
2238
- /* @__PURE__ */ t(Pa, { children: F ? "Save failed" : "Saving dashboard" }),
2239
- /* @__PURE__ */ t(Ra, { className: "pt-2", children: F ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
2240
- U.length > 0 && /* @__PURE__ */ i("div", { className: "space-y-1 rounded-md border border-destructive/20 bg-destructive/5 p-3 text-left", children: [
2241
+ children: /* @__PURE__ */ i(Ta, { className: "max-w-sm", children: [
2242
+ /* @__PURE__ */ i(Ua, { children: [
2243
+ /* @__PURE__ */ t($a, { children: H ? "Save failed" : "Saving dashboard" }),
2244
+ /* @__PURE__ */ t(Ba, { className: "pt-2", children: H ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
2245
+ de.length > 0 && /* @__PURE__ */ i("div", { className: "space-y-1 rounded-md border border-destructive/20 bg-destructive/5 p-3 text-left", children: [
2241
2246
  /* @__PURE__ */ t("div", { className: "text-sm font-medium text-destructive", children: "What needs attention" }),
2242
- /* @__PURE__ */ t("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children: U.slice(0, 5).map((d) => /* @__PURE__ */ t("li", { children: d }, d)) })
2247
+ /* @__PURE__ */ t("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children: de.slice(0, 5).map((d) => /* @__PURE__ */ t("li", { children: d }, d)) })
2243
2248
  ] })
2244
2249
  ] }),
2245
- /* @__PURE__ */ t(Ua, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: F ? /* @__PURE__ */ i($, { children: [
2250
+ /* @__PURE__ */ t(Fa, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: H ? /* @__PURE__ */ i($, { children: [
2246
2251
  /* @__PURE__ */ t(
2247
- Ta,
2252
+ Ga,
2248
2253
  {
2249
2254
  onClick: () => {
2250
- J(!1), y(null), H([]), q(!1);
2255
+ R(!1), q(null), z([]), De(!1);
2251
2256
  },
2252
2257
  className: "m-0",
2253
2258
  children: "Close"
2254
2259
  }
2255
2260
  ),
2256
2261
  /* @__PURE__ */ t(
2257
- Et,
2262
+ At,
2258
2263
  {
2259
- onClick: () => Ke({
2260
- closeAfterSave: ie,
2261
- navigateHomeAfterSave: Ge === "home"
2264
+ onClick: () => Qe({
2265
+ closeAfterSave: ce,
2266
+ navigateHomeAfterSave: Ve === "home"
2262
2267
  }),
2263
2268
  className: "m-0",
2264
2269
  children: "Retry"
2265
2270
  }
2266
2271
  )
2267
- ] }) : /* @__PURE__ */ i(Et, { disabled: !0, className: "m-0 cursor-default", children: [
2268
- /* @__PURE__ */ t(_e, { className: "mr-2 h-4 w-4 animate-spin" }),
2272
+ ] }) : /* @__PURE__ */ i(At, { disabled: !0, className: "m-0 cursor-default", children: [
2273
+ /* @__PURE__ */ t(Re, { className: "mr-2 h-4 w-4 animate-spin" }),
2269
2274
  "Saving..."
2270
2275
  ] }) })
2271
2276
  ] })
2272
2277
  }
2273
2278
  ),
2274
2279
  /* @__PURE__ */ t(
2275
- cn,
2280
+ un,
2276
2281
  {
2277
- open: yr,
2282
+ open: Sr,
2278
2283
  onOpenChange: (d) => {
2279
- le(d);
2284
+ ue(d);
2280
2285
  },
2281
- onSave: Er,
2282
- onDiscard: Ir,
2286
+ onSave: Lr,
2287
+ onDiscard: Mr,
2283
2288
  isSaving: Fe,
2284
2289
  saveLabel: "Save",
2285
2290
  discardLabel: "Discard changes"
@@ -2290,7 +2295,7 @@ function Yo() {
2290
2295
  }
2291
2296
  );
2292
2297
  }
2293
- function wo({
2298
+ function So({
2294
2299
  accessToken: e,
2295
2300
  dashboardId: n,
2296
2301
  selectedSheetId: a,
@@ -2306,5 +2311,5 @@ function wo({
2306
2311
  return p.searchParams.set("pdfMode", "document"), p.searchParams.set("pageSize", r || "letter"), p.searchParams.set("orientation", o || "portrait"), p.searchParams.set("url", m.toString()), p.toString();
2307
2312
  }
2308
2313
  export {
2309
- Yo as default
2314
+ Xo as default
2310
2315
  };