react-semaphor 0.1.391 → 0.1.393

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 (68) hide show
  1. package/dist/analytics-protocol/index.cjs +1 -1
  2. package/dist/analytics-protocol/index.js +120 -252
  3. package/dist/brand-studio/index.cjs +1 -1
  4. package/dist/brand-studio/index.js +7 -7
  5. package/dist/chunks/analyze-result-contract-C9Gv2_qW.js +1585 -0
  6. package/dist/chunks/analyze-result-contract-Zgg-Bbpj.js +1 -0
  7. package/dist/chunks/{braces--20GzUQh.js → braces-8TRlDwDw.js} +1 -1
  8. package/dist/chunks/{braces-C0Vh_Mft.js → braces-D2tStQjF.js} +1 -1
  9. package/dist/chunks/{calendar-preferences-dialog-B-VsxhsA.js → calendar-preferences-dialog-49fcEPXS.js} +4 -4
  10. package/dist/chunks/{calendar-preferences-dialog-DE67Z3oQ.js → calendar-preferences-dialog-DwLeBLy2.js} +1 -1
  11. package/dist/chunks/dashboard-briefing-launcher-CgkSKkZR.js +80 -0
  12. package/dist/chunks/{dashboard-briefing-launcher-BIj3X7b3.js → dashboard-briefing-launcher-cgPKz1yX.js} +252 -252
  13. package/dist/chunks/dashboard-controls-D12ZSUP_.js +52 -0
  14. package/dist/chunks/{dashboard-controls-BXxucM4f.js → dashboard-controls-VMFm3OP4.js} +87 -87
  15. package/dist/chunks/{dashboard-json-C6oZuipD.js → dashboard-json-C-GG5yC7.js} +4 -4
  16. package/dist/chunks/{dashboard-json-BNwshkK2.js → dashboard-json-CvK0oI24.js} +1 -1
  17. package/dist/chunks/{edit-dashboard-visual-CmfrI_L3.js → edit-dashboard-visual-B5KB7dx4.js} +977 -977
  18. package/dist/chunks/edit-dashboard-visual-ql99faTz.js +178 -0
  19. package/dist/chunks/{index-icb12JV1.js → index-CQmKDEbe.js} +735 -741
  20. package/dist/chunks/{index-4W_ElSBJ.js → index-DXCBPLDu.js} +218 -223
  21. package/dist/chunks/{layout-grid-B7-klXiK.js → layout-grid-C0OI-MRn.js} +1 -1
  22. package/dist/chunks/{layout-grid-DV89AC9_.js → layout-grid-CiubineE.js} +1 -1
  23. package/dist/chunks/{palette-Dj-dgPYh.js → palette-C4KTXOug.js} +1 -1
  24. package/dist/chunks/{palette-5IwhMbSF.js → palette-Cp1hqZtm.js} +1 -1
  25. package/dist/chunks/{save-C5fwVdTF.js → save-C__QggEE.js} +1 -1
  26. package/dist/chunks/{save-16C6YSW2.js → save-DgMfP0j8.js} +1 -1
  27. package/dist/chunks/{search-0LmWwZzW.js → search-BHsQIWBV.js} +17 -7
  28. package/dist/chunks/{search-Dq1Mbb03.js → search-DNCejM7Z.js} +9 -4
  29. package/dist/chunks/source-identity-uMaUe036.js +1 -0
  30. package/dist/chunks/{source-identity-CN4xiyKJ.js → source-identity-y0VSSreA.js} +33 -15
  31. package/dist/chunks/{switch-bdJp0Bkw.js → switch-B79Hn4Qh.js} +27 -32
  32. package/dist/chunks/{switch-DUdaHFZQ.js → switch-BXQAlSuW.js} +637 -647
  33. package/dist/chunks/use-create-flow-overlay-state-7MFN3PWX.js +21 -0
  34. package/dist/chunks/{use-create-flow-overlay-state-YvqCp6Zo.js → use-create-flow-overlay-state-Bw5LRkf9.js} +93 -92
  35. package/dist/chunks/{validators-CHPH6ORs.js → validators-4EGCWWga.js} +1 -1
  36. package/dist/chunks/{validators-lWo8m0Q7.js → validators-CPtkrola.js} +1 -1
  37. package/dist/chunks/{x-B_cx7LwM.js → x-B6ghREd2.js} +10 -5
  38. package/dist/chunks/{x-IdR_js6f.js → x-CXDkqdur.js} +28 -18
  39. package/dist/dashboard/index.cjs +1 -1
  40. package/dist/dashboard/index.js +1 -1
  41. package/dist/dashboard-authoring/index.cjs +1 -1
  42. package/dist/dashboard-authoring/index.js +3 -3
  43. package/dist/data-app-builder/index.cjs +13 -13
  44. package/dist/data-app-builder/index.js +11 -11
  45. package/dist/data-app-sdk/index.cjs +5 -5
  46. package/dist/data-app-sdk/index.js +1589 -1234
  47. package/dist/data-app-sdk-adapters/index.cjs +1 -1
  48. package/dist/data-app-sdk-adapters/index.js +6 -7
  49. package/dist/data-app-sdk-validation/index.cjs +1 -1
  50. package/dist/data-app-sdk-validation/index.js +3 -3
  51. package/dist/index.cjs +1 -1
  52. package/dist/index.js +13 -13
  53. package/dist/surfboard/index.cjs +1 -1
  54. package/dist/surfboard/index.js +2 -2
  55. package/dist/types/analytics-protocol.d.ts +2107 -43
  56. package/dist/types/dashboard-assistant.d.ts +3 -1
  57. package/dist/types/data-app-sdk-adapters.d.ts +1 -1
  58. package/dist/types/data-app-sdk-validation.d.ts +4 -2
  59. package/dist/types/data-app-sdk.d.ts +73 -5
  60. package/package.json +2 -1
  61. package/src/data-app-sdk/README.md +55 -0
  62. package/dist/chunks/analyze-result-contract-CtXfp3nv.js +0 -1
  63. package/dist/chunks/analyze-result-contract-DuhlklhI.js +0 -102
  64. package/dist/chunks/dashboard-briefing-launcher-Czx6BcXW.js +0 -80
  65. package/dist/chunks/dashboard-controls-BP-DcPFs.js +0 -52
  66. package/dist/chunks/edit-dashboard-visual-BAprin3J.js +0 -178
  67. package/dist/chunks/source-identity-C-xaeE_I.js +0 -1
  68. package/dist/chunks/use-create-flow-overlay-state-BIHKf_XK.js +0 -21
@@ -1,21 +1,21 @@
1
1
  import { jsx as e, jsxs as o, Fragment as R } from "react/jsx-runtime";
2
- import { u as D, B as O, aw as dt, D as Wt, L as jr, _ as Kr, c as he, ax as Qr, ay as Wr, az as rt, aA as fe, aB as ct, aC as Jt, e as Ge, aD as Xt, aE as Jr, F as _t, V as Xr, W as Yr, X as Zr, Z as en, f as tn, i as rn, aF as nn } from "./switch-DUdaHFZQ.js";
3
- import { b6 as an, u as G, b as Yt, b7 as sn, ar as j, c as Zt, d as on, e as nt, f as at, o as dn, b8 as pe, b9 as $e, ba as cn, bb as Rt, bc as er, bd as tr, be as ln, bf as lt, bg as un, bh as mn, bi as pn, bj as hn, bk as fn, bl as gn, aD as ge, bm as be, p as E, bn, bo as rr, aX as ut, bp as xn, bq as vn, br as nr, bs as ar, ay as yn, bt as wn, bu as Nn, bv as Sn, z as Dn, y as Te, K as Cn, A as Ye, bw as kn, bx as En, by as Ln, $ as An, bz as In, I as Ut, bA as Mn, bB as Pn, bC as On, bD as _n, bE as Tt, bF as Ft, bG as $t, bH as T, bI as Rn, bJ as Un, bK as Tn, av as Gt, bL as Fn, bM as $n, bN as Gn, J as Bn, bO as zn, ah as qn, ak as Hn, al as Vn, am as jn, an as Kn, ao as Qn, ap as Wn, aq as Bt, w as st } from "./index-icb12JV1.js";
4
- import { c as Q, X as sr } from "./x-IdR_js6f.js";
5
- import "./analyze-result-contract-DuhlklhI.js";
2
+ import { u as D, B as O, av as dt, A as Wt, L as jr, Z as Kr, c as he, aw as Qr, ax as Wr, ay as rt, az as fe, aA as ct, aB as Jt, e as Ge, aC as Yt, aD as Jr, E as _t, Q as Yr, V as Xr, W as Zr, Y as en, i as tn, aE as rn } from "./switch-BXQAlSuW.js";
3
+ import { b5 as nn, u as G, b as Xt, b6 as an, ar as j, c as Zt, d as sn, e as nt, f as at, o as on, b7 as pe, b8 as $e, b9 as dn, ba as Rt, bb as er, bc as tr, bd as cn, be as lt, bf as ln, bg as un, bh as mn, bi as pn, bj as hn, bk as fn, aC as ge, bl as be, p as E, bm as gn, bn as rr, aW as ut, bo as bn, bp as xn, bq as nr, br as ar, bs as vn, bt as yn, bu as wn, z as Nn, y as Te, K as Sn, A as Xe, bv as Dn, bw as Cn, bx as kn, $ as En, by as Ln, I as Ut, bz as An, bA as In, bB as Mn, bC as Pn, bD as Tt, bE as Ft, bF as $t, bG as T, bH as On, bI as _n, bJ as Rn, av as Gt, bK as Un, bL as Tn, bM as Fn, J as $n, bN as Gn, ah as Bn, ak as zn, al as qn, am as Hn, an as Vn, ao as jn, ap as Kn, aq as Bt, w as st } from "./index-CQmKDEbe.js";
4
+ import { c as Q, X as sr, C as Qn } from "./x-CXDkqdur.js";
5
+ import "./analyze-result-contract-C9Gv2_qW.js";
6
6
  import * as I from "react";
7
- import or, { useState as w, useMemo as K, useEffect as Be, useRef as zt, useLayoutEffect as Jn, useCallback as Xn } from "react";
7
+ import or, { useState as w, useMemo as K, useEffect as Be, useRef as zt, useLayoutEffect as Wn, useCallback as Jn } from "react";
8
8
  import "./index-CJdxSyQq.js";
9
9
  import { createPortal as Yn } from "react-dom";
10
- import { O as Zn, c as ea, u as ta, A as ra, a as na, M as aa, f as sa, V as oa, P as ia, N as da, U as ca } from "./dashboard-briefing-launcher-BIj3X7b3.js";
11
- import { S as la } from "./search-0LmWwZzW.js";
10
+ import { O as Xn, c as Zn, u as ea, A as ta, a as ra, M as na, f as aa, V as sa, P as oa, N as ia, U as da } from "./dashboard-briefing-launcher-cgPKz1yX.js";
11
+ import { S as ca, C as la } from "./search-BHsQIWBV.js";
12
12
  import { d as ir } from "./index-DFOb_6HB.js";
13
- import { C as ua } from "./calendar-preferences-dialog-B-VsxhsA.js";
13
+ import { C as ua } from "./calendar-preferences-dialog-49fcEPXS.js";
14
14
  import { u as ma } from "./use-debounced-dirty-check-BwAbnX_5.js";
15
15
  import { s as Ze } from "./normalize-dashboard-for-dirty-check-5KpZN8xr.js";
16
- import { S as qt } from "./save-16C6YSW2.js";
17
- import { P as pa } from "./palette-5IwhMbSF.js";
18
- import { B as ha } from "./braces--20GzUQh.js";
16
+ import { S as qt } from "./save-DgMfP0j8.js";
17
+ import { P as pa } from "./palette-Cp1hqZtm.js";
18
+ import { B as ha } from "./braces-8TRlDwDw.js";
19
19
  /**
20
20
  * @license lucide-react v0.453.0 - ISC
21
21
  *
@@ -223,7 +223,7 @@ process.env.NODE_ENV === "production" ? ot.exports = wa() : ot.exports = Na();
223
223
  var Sa = ot.exports;
224
224
  const Fe = ["light", "dark", "system"];
225
225
  function Da() {
226
- const { theme: t, setTheme: a } = an(), n = D(
226
+ const { theme: t, setTheme: a } = nn(), n = D(
227
227
  (f) => f.actions.setDashboardTheme
228
228
  );
229
229
  function r() {
@@ -297,13 +297,13 @@ function La({
297
297
  );
298
298
  S && (c([...f || [], S]), b(S.id), i(!1)), p(!1);
299
299
  }
300
- return /* @__PURE__ */ o(Yt, { open: g, onOpenChange: i, children: [
301
- m ? null : /* @__PURE__ */ e(sn, { asChild: !0, children: /* @__PURE__ */ o(O, { variant: "secondary", size: "xs", children: [
300
+ return /* @__PURE__ */ o(Xt, { open: g, onOpenChange: i, children: [
301
+ m ? null : /* @__PURE__ */ e(an, { asChild: !0, children: /* @__PURE__ */ o(O, { variant: "secondary", size: "xs", children: [
302
302
  /* @__PURE__ */ e(j, { className: "h-3.5 w-3.5" }),
303
303
  "Lens"
304
304
  ] }) }),
305
305
  /* @__PURE__ */ o(Zt, { className: "rounded-control border-border/60 sm:max-w-[420px] sm:rounded-control", children: [
306
- /* @__PURE__ */ o(on, { children: [
306
+ /* @__PURE__ */ o(sn, { children: [
307
307
  /* @__PURE__ */ e(nt, { className: "text-[15px]", children: "Create lens" }),
308
308
  /* @__PURE__ */ e(at, { className: "text-[13px] leading-5", children: "Lenses are private by default and are only visible to you." })
309
309
  ] }),
@@ -321,7 +321,7 @@ function La({
321
321
  ),
322
322
  s && /* @__PURE__ */ e("p", { className: "text-[12px] text-destructive", children: "A lens with this name already exists. Pick a different one." })
323
323
  ] }),
324
- /* @__PURE__ */ o(dn, { children: [
324
+ /* @__PURE__ */ o(on, { children: [
325
325
  /* @__PURE__ */ e(O, { variant: "outline", size: "xs", onClick: () => i(!1), children: "Cancel" }),
326
326
  /* @__PURE__ */ e(
327
327
  O,
@@ -377,7 +377,7 @@ function Aa({ includeLabel: t = !1 } = {}) {
377
377
  /* @__PURE__ */ e($e, {})
378
378
  ] }) : null,
379
379
  /* @__PURE__ */ o(
380
- cn,
380
+ dn,
381
381
  {
382
382
  value: n,
383
383
  onValueChange: c,
@@ -428,18 +428,18 @@ function Aa({ includeLabel: t = !1 } = {}) {
428
428
  ] });
429
429
  }
430
430
  function Ia() {
431
- const { displayPreferences: t, shouldShowElement: a } = ln(), { currentUser: n, userContext: r } = lt(), s = K(
432
- () => un(n),
431
+ const { displayPreferences: t, shouldShowElement: a } = cn(), { currentUser: n, userContext: r } = lt(), s = K(
432
+ () => ln(n),
433
433
  [n]
434
434
  ), u = K(() => (c) => s && s[c] !== void 0 && s[c] === !1 ? !1 : a(c), [s, a, t]), f = K(
435
435
  () => {
436
436
  var c, b, x, p, l;
437
437
  return {
438
- canEdit: ((c = r == null ? void 0 : r.permissions) == null ? void 0 : c.canEdit) ?? gn(n),
439
- canUseFilters: ((b = r == null ? void 0 : r.permissions) == null ? void 0 : b.canEdit) ?? fn(n),
440
- canManageDashboards: ((x = r == null ? void 0 : r.permissions) == null ? void 0 : x.canCreateDashboard) ?? hn(n),
441
- canCreateDashboards: ((p = r == null ? void 0 : r.permissions) == null ? void 0 : p.canCreateDashboard) ?? pn(n),
442
- canAccessVisuals: ((l = r == null ? void 0 : r.permissions) == null ? void 0 : l.canEdit) ?? mn(n)
438
+ canEdit: ((c = r == null ? void 0 : r.permissions) == null ? void 0 : c.canEdit) ?? fn(n),
439
+ canUseFilters: ((b = r == null ? void 0 : r.permissions) == null ? void 0 : b.canEdit) ?? hn(n),
440
+ canManageDashboards: ((x = r == null ? void 0 : r.permissions) == null ? void 0 : x.canCreateDashboard) ?? pn(n),
441
+ canCreateDashboards: ((p = r == null ? void 0 : r.permissions) == null ? void 0 : p.canCreateDashboard) ?? mn(n),
442
+ canAccessVisuals: ((l = r == null ? void 0 : r.permissions) == null ? void 0 : l.canEdit) ?? un(n)
443
443
  };
444
444
  },
445
445
  [n, r]
@@ -732,7 +732,7 @@ function Wa() {
732
732
  });
733
733
  }
734
734
  const Ja = [];
735
- function Xa({
735
+ function Ya({
736
736
  open: t,
737
737
  onOpenChange: a
738
738
  }) {
@@ -742,7 +742,7 @@ function Xa({
742
742
  isLoading: c,
743
743
  error: b,
744
744
  refetch: x
745
- } = bn({
745
+ } = gn({
746
746
  type: s ? "TENANT_GROUP" : "all",
747
747
  tenantId: s ? u : void 0,
748
748
  includeMembers: !1
@@ -757,7 +757,7 @@ function Xa({
757
757
  } catch {
758
758
  }
759
759
  };
760
- return /* @__PURE__ */ e(Yt, { open: t, onOpenChange: a, children: /* @__PURE__ */ o(Zt, { className: "flex max-h-[640px] w-[720px] max-w-[92vw] flex-col gap-0 overflow-hidden p-0", children: [
760
+ return /* @__PURE__ */ e(Xt, { open: t, onOpenChange: a, children: /* @__PURE__ */ o(Zt, { className: "flex max-h-[640px] w-[720px] max-w-[92vw] flex-col gap-0 overflow-hidden p-0", children: [
761
761
  l.kind === "list" ? /* @__PURE__ */ o("div", { className: "shrink-0 border-b border-border px-5 pt-4 pb-3.5", children: [
762
762
  /* @__PURE__ */ e(nt, { className: "text-[15px] font-semibold tracking-tight", children: "Group management" }),
763
763
  /* @__PURE__ */ e(at, { className: "mt-1 text-[12px] leading-[1.5] text-muted-foreground", children: "Organize people into groups for shared access." })
@@ -776,7 +776,7 @@ function Xa({
776
776
  /* @__PURE__ */ e(at, { className: "sr-only", children: "Create a new group to organize members." })
777
777
  ] }) : null,
778
778
  l.kind === "list" && /* @__PURE__ */ e(
779
- Ya,
779
+ Xa,
780
780
  {
781
781
  groups: f,
782
782
  isLoading: c,
@@ -849,7 +849,7 @@ function Xa({
849
849
  ] })
850
850
  ] }) });
851
851
  }
852
- function Ya({
852
+ function Xa({
853
853
  groups: t,
854
854
  isLoading: a,
855
855
  errorMessage: n,
@@ -868,7 +868,7 @@ function Ya({
868
868
  return /* @__PURE__ */ o("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
869
869
  /* @__PURE__ */ o("div", { className: "flex shrink-0 items-center gap-2 border-b border-border px-5 py-2.5", children: [
870
870
  /* @__PURE__ */ o("div", { className: "flex flex-1 items-center gap-2 rounded-[5px] border border-border bg-background px-2 focus-within:border-foreground/40", children: [
871
- /* @__PURE__ */ e(la, { className: "h-3 w-3 text-muted-foreground" }),
871
+ /* @__PURE__ */ e(ca, { className: "h-3 w-3 text-muted-foreground" }),
872
872
  /* @__PURE__ */ e(
873
873
  "input",
874
874
  {
@@ -955,7 +955,7 @@ function Za({
955
955
  onClick: n,
956
956
  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",
957
957
  children: [
958
- /* @__PURE__ */ e("div", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-[4px] border border-border bg-background text-muted-foreground", children: /* @__PURE__ */ e(Zn, { className: "h-3.5 w-3.5" }) }),
958
+ /* @__PURE__ */ e("div", { className: "flex h-7 w-7 shrink-0 items-center justify-center rounded-[4px] border border-border bg-background text-muted-foreground", children: /* @__PURE__ */ e(Xn, { className: "h-3.5 w-3.5" }) }),
959
959
  /* @__PURE__ */ o("div", { className: "min-w-0 flex-1", children: [
960
960
  /* @__PURE__ */ e("div", { className: "truncate text-[13px] font-medium text-foreground", children: t.name }),
961
961
  /* @__PURE__ */ o("div", { className: "mt-0.5 flex items-center gap-2 text-[11px] text-muted-foreground", children: [
@@ -995,7 +995,7 @@ function Za({
995
995
  children: /* @__PURE__ */ e(ut, { className: "h-3 w-3" })
996
996
  }
997
997
  ),
998
- /* @__PURE__ */ e(yn, { className: "h-3.5 w-3.5 text-muted-foreground" })
998
+ /* @__PURE__ */ e(la, { className: "h-3.5 w-3.5 text-muted-foreground" })
999
999
  ] })
1000
1000
  ]
1001
1001
  }
@@ -1036,7 +1036,7 @@ function ts({
1036
1036
  isLoading: p,
1037
1037
  error: l,
1038
1038
  refetch: h
1039
- } = xn(t.id), m = (x == null ? void 0 : x.members) ?? Ja, g = l ? yr(l, "Unable to load members for this group.") : null, i = t.type === "TENANT_GROUP" ? "tenant" : "organization", { users: y } = vn({
1039
+ } = bn(t.id), m = (x == null ? void 0 : x.members) ?? Ja, g = l ? yr(l, "Unable to load members for this group.") : null, i = t.type === "TENANT_GROUP" ? "tenant" : "organization", { users: y } = xn({
1040
1040
  type: i,
1041
1041
  tenantId: t.tenantId || void 0,
1042
1042
  active: !0,
@@ -1044,7 +1044,7 @@ function ts({
1044
1044
  }), N = K(
1045
1045
  () => new Set(m.map((v) => v.userId)),
1046
1046
  [m]
1047
- ), C = Qa(), L = Wa(), k = ja(), [S, re] = w(!1), [W, ne] = w(t.name), [xe, J] = w(!1), [X, Y] = w(t.description || ""), [Z, ve] = w(""), [ye, we] = w(!1), Ne = K(() => {
1047
+ ), C = Qa(), L = Wa(), k = ja(), [S, re] = w(!1), [W, ne] = w(t.name), [xe, J] = w(!1), [Y, X] = w(t.description || ""), [Z, ve] = w(""), [ye, we] = w(!1), Ne = K(() => {
1048
1048
  const v = Z.trim().toLowerCase();
1049
1049
  return y.filter((U) => !N.has(U.id)).filter(
1050
1050
  (U) => !v || (U.name || "").toLowerCase().includes(v) || (U.email || "").toLowerCase().includes(v)
@@ -1060,7 +1060,7 @@ function ts({
1060
1060
  } catch {
1061
1061
  }
1062
1062
  }, B = async () => {
1063
- const v = X.trim();
1063
+ const v = Y.trim();
1064
1064
  if (J(!1), v !== (t.description || ""))
1065
1065
  try {
1066
1066
  await k.mutateAsync({
@@ -1149,11 +1149,11 @@ function ts({
1149
1149
  {
1150
1150
  autoFocus: !0,
1151
1151
  rows: 2,
1152
- value: X,
1153
- onChange: (v) => Y(v.target.value),
1152
+ value: Y,
1153
+ onChange: (v) => X(v.target.value),
1154
1154
  maxLength: 200,
1155
1155
  onKeyDown: (v) => {
1156
- v.key === "Escape" && (Y(t.description || ""), J(!1)), v.key === "Enter" && (v.metaKey || v.ctrlKey) && B();
1156
+ v.key === "Escape" && (X(t.description || ""), J(!1)), v.key === "Enter" && (v.metaKey || v.ctrlKey) && B();
1157
1157
  },
1158
1158
  placeholder: "What is this group for?",
1159
1159
  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"
@@ -1161,7 +1161,7 @@ function ts({
1161
1161
  ),
1162
1162
  /* @__PURE__ */ o("div", { className: "mt-1.5 flex items-center justify-between", children: [
1163
1163
  /* @__PURE__ */ o("span", { className: "text-[10.5px] text-muted-foreground", children: [
1164
- X.length,
1164
+ Y.length,
1165
1165
  "/200 · Esc to cancel · ⌘↩ to save"
1166
1166
  ] }),
1167
1167
  /* @__PURE__ */ o("div", { className: "flex items-center gap-1.5", children: [
@@ -1170,7 +1170,7 @@ function ts({
1170
1170
  {
1171
1171
  type: "button",
1172
1172
  onClick: () => {
1173
- Y(t.description || ""), J(!1);
1173
+ X(t.description || ""), J(!1);
1174
1174
  },
1175
1175
  className: "h-6 rounded-[5px] px-2 text-[11px] font-medium text-foreground/80 hover:bg-accent",
1176
1176
  children: "Cancel"
@@ -1192,7 +1192,7 @@ function ts({
1192
1192
  {
1193
1193
  type: "button",
1194
1194
  onClick: () => {
1195
- n && (Y(t.description || ""), J(!0));
1195
+ n && (X(t.description || ""), J(!0));
1196
1196
  },
1197
1197
  disabled: !n,
1198
1198
  title: n ? "Click to edit description" : void 0,
@@ -1376,7 +1376,7 @@ function ns({
1376
1376
  busy: c
1377
1377
  }) {
1378
1378
  const b = zt(null), x = zt(null), [p, l] = w(null);
1379
- Jn(() => {
1379
+ Wn(() => {
1380
1380
  if (!n) {
1381
1381
  l(null);
1382
1382
  return;
@@ -1506,14 +1506,14 @@ function ue(t, a, n) {
1506
1506
  );
1507
1507
  if (r)
1508
1508
  return r.label;
1509
- const s = (f = (u = Xt(t, a)) == null ? void 0 : u.controls) == null ? void 0 : f.find(
1509
+ const s = (f = (u = Yt(t, a)) == null ? void 0 : u.controls) == null ? void 0 : f.find(
1510
1510
  (c) => c.id === n
1511
1511
  );
1512
1512
  return (s == null ? void 0 : s.label) || n;
1513
1513
  }
1514
1514
  function me(t, a) {
1515
1515
  var n;
1516
- return ((n = Xt(t, a)) == null ? void 0 : n.title) || a;
1516
+ return ((n = Yt(t, a)) == null ? void 0 : n.title) || a;
1517
1517
  }
1518
1518
  function as(t) {
1519
1519
  const { errors: a, dashboard: n } = t;
@@ -1611,19 +1611,19 @@ function Qt(t, a) {
1611
1611
  }
1612
1612
  function Ds() {
1613
1613
  var kt, Et, Lt, At, It, Mt, Pt;
1614
- ea(), ta();
1614
+ Zn(), ea();
1615
1615
  const {
1616
1616
  authToken: t,
1617
1617
  tokenProps: a,
1618
1618
  id: n,
1619
1619
  showBriefings: r
1620
- } = G(), { isLocalDev: s } = wn(), { openBrandStudioPreview: u } = Nn(), { permissions: f } = Ia(), c = Sn(), { isLoading: b } = Dn(), x = D((d) => d.theme), p = D((d) => d.isDownloadingPdf), l = D(
1620
+ } = G(), { isLocalDev: s } = vn(), { openBrandStudioPreview: u } = yn(), { permissions: f } = Ia(), c = wn(), { isLoading: b } = Nn(), x = D((d) => d.theme), p = D((d) => d.isDownloadingPdf), l = D(
1621
1621
  (d) => d.dashboardAssistantDraftScopeKey
1622
1622
  ), h = D((d) => d.lenses), m = D((d) => d.selectedLensId), g = h == null ? void 0 : h.find((d) => d.id === m), i = D((d) => d.dashboard), y = D((d) => d.selectedSheetId), N = (kt = i == null ? void 0 : i.sheets) == null ? void 0 : kt.find(
1623
1623
  (d) => d.id === y
1624
1624
  ), C = Jr(N), L = C ? (Et = N == null ? void 0 : N.document) == null ? void 0 : Et.page : void 0, k = D(
1625
1625
  (d) => d.isDashboardEditing
1626
- ), { setDashboardTitle: S } = D((d) => d.actions), [re, W] = w(!1), [ne, xe] = w(!1), [J, X] = w(!1), [Y, Z] = w(!1), [ve, ye] = w(!1), [we, Ne] = w(!1), [Se, B] = w(!1), [ee, te] = w(null), [z, v] = w([]), [U, q] = w(!1), [De, ae] = w(!1), Ce = D((d) => d.filterValues), A = D((d) => d.isVisualEditing);
1626
+ ), { setDashboardTitle: S } = D((d) => d.actions), [re, W] = w(!1), [ne, xe] = w(!1), [J, Y] = w(!1), [X, Z] = w(!1), [ve, ye] = w(!1), [we, Ne] = w(!1), [Se, B] = w(!1), [ee, te] = w(null), [z, v] = w([]), [U, q] = w(!1), [De, ae] = w(!1), Ce = D((d) => d.filterValues), A = D((d) => d.isVisualEditing);
1627
1627
  _t((d) => d.card);
1628
1628
  const se = Te(
1629
1629
  (d) => d.selectedDashboard
@@ -1638,10 +1638,10 @@ function Ds() {
1638
1638
  setShowDashboardJSON: gt
1639
1639
  } = D((d) => d.actions), { setInitialDashboard: bt, clearSelectedDashboard: qe } = Te(
1640
1640
  (d) => d.actions
1641
- ), oe = !!a.orgUserId || !!(a.tenantId && a.endUserId && a.endUserEmail), { resources: Le } = Cn(Ye.DASHBOARD), { data: He } = kn(), Sr = ((It = He == null ? void 0 : He.preference) == null ? void 0 : It.defaultDashboardId) || null, { mutate: Dr, isPending: Cr } = En(), { currentUser: kr } = lt(), Er = Ln(kr), F = se || ke, xt = F ? {
1641
+ ), oe = !!a.orgUserId || !!(a.tenantId && a.endUserId && a.endUserEmail), { resources: Le } = Sn(Xe.DASHBOARD), { data: He } = Dn(), Sr = ((It = He == null ? void 0 : He.preference) == null ? void 0 : It.defaultDashboardId) || null, { mutate: Dr, isPending: Cr } = Cn(), { currentUser: kr } = lt(), Er = kn(kr), F = se || ke, xt = F ? {
1642
1642
  id: F.id,
1643
1643
  title: (i == null ? void 0 : i.title) || F.title || "Dashboard"
1644
- } : null, { handleAddNewFrame: Lr } = An(), [Ve, je] = w(!1), [Ar, ie] = w(!1), [Ke, Ae] = w("close"), de = In(Ye.DASHBOARD), [_, Ie] = w(null), Ir = async (d, M) => {
1644
+ } : null, { handleAddNewFrame: Lr } = En(), [Ve, je] = w(!1), [Ar, ie] = w(!1), [Ke, Ae] = w("close"), de = Ln(Xe.DASHBOARD), [_, Ie] = w(null), Ir = async (d, M) => {
1645
1645
  if (!(i != null && i.id)) {
1646
1646
  console.log("No dashboard ID found");
1647
1647
  return;
@@ -1727,7 +1727,7 @@ function Ds() {
1727
1727
  300,
1728
1728
  1e3,
1729
1729
  Ze
1730
- ), St = Xn(() => Me ? Ze(i) !== Ze(Me) : !1, [i, Me]), Dt = Nt || Pr, Oe = Ve || de.isPending, Or = () => {
1730
+ ), St = Jn(() => Me ? Ze(i) !== Ze(Me) : !1, [i, Me]), Dt = Nt || Pr, Oe = Ve || de.isPending, Or = () => {
1731
1731
  St() ? (Ae("close"), ie(!0)) : (We(), Pe());
1732
1732
  }, _r = async () => {
1733
1733
  await Je({
@@ -1773,10 +1773,10 @@ function Ds() {
1773
1773
  var _e, Re, Ot;
1774
1774
  const V = (P == null ? void 0 : P.id) || ((_e = P == null ? void 0 : P.dashboard) == null ? void 0 : _e.id) || ((Re = P == null ? void 0 : P.resource) == null ? void 0 : Re.id) || ((Ot = P == null ? void 0 : P.template) == null ? void 0 : Ot.id) || null;
1775
1775
  if (!M.id && V) {
1776
- const Xe = nn.getState(), Ue = Xe.pendingDashboardDraftMigration;
1777
- (Ue == null ? void 0 : Ue.scopeKey) === l ? Xe.actions.setPendingDashboardDraftMigrationExpectedDashboardId(
1776
+ const Ye = rn.getState(), Ue = Ye.pendingDashboardDraftMigration;
1777
+ (Ue == null ? void 0 : Ue.scopeKey) === l ? Ye.actions.setPendingDashboardDraftMigrationExpectedDashboardId(
1778
1778
  V
1779
- ) : Ue && Xe.actions.clearPendingDashboardDraftMigration();
1779
+ ) : Ue && Ye.actions.clearPendingDashboardDraftMigration();
1780
1780
  }
1781
1781
  je(!1), E.success("Dashboard saved!"), Ie(
1782
1782
  Qt(
@@ -1863,7 +1863,7 @@ function Ds() {
1863
1863
  }
1864
1864
  ) : /* @__PURE__ */ o(R, { children: [
1865
1865
  /* @__PURE__ */ e(
1866
- Mn,
1866
+ An,
1867
1867
  {
1868
1868
  value: Ct || "Untitled Dashboard",
1869
1869
  onSave: (d) => {
@@ -1890,7 +1890,7 @@ function Ds() {
1890
1890
  children: "Default"
1891
1891
  }
1892
1892
  ),
1893
- $r && H && /* @__PURE__ */ e(Xr, { children: /* @__PURE__ */ o(Yr, { children: [
1893
+ $r && H && /* @__PURE__ */ e(Yr, { children: /* @__PURE__ */ o(Xr, { children: [
1894
1894
  /* @__PURE__ */ e(Zr, { asChild: !0, children: /* @__PURE__ */ e(
1895
1895
  O,
1896
1896
  {
@@ -1900,7 +1900,7 @@ function Ds() {
1900
1900
  disabled: Cr || !(t != null && t.accessToken) || !(a != null && a.apiServiceUrl),
1901
1901
  className: "w-7 px-0 text-muted-foreground hover:text-foreground",
1902
1902
  "aria-label": le ? "Clear default dashboard" : "Set as default dashboard",
1903
- children: le ? /* @__PURE__ */ e(Pn, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ e(On, { className: "h-3.5 w-3.5" })
1903
+ children: le ? /* @__PURE__ */ e(In, { className: "h-3.5 w-3.5" }) : /* @__PURE__ */ e(Mn, { className: "h-3.5 w-3.5" })
1904
1904
  }
1905
1905
  ) }),
1906
1906
  /* @__PURE__ */ e(en, { children: /* @__PURE__ */ e("p", { children: le ? "Clear default" : "Set as default" }) })
@@ -1909,8 +1909,8 @@ function Ds() {
1909
1909
  ] }),
1910
1910
  /* @__PURE__ */ o("div", { className: "flex items-center gap-2", children: [
1911
1911
  A && /* @__PURE__ */ o(R, { children: [
1912
- /* @__PURE__ */ e(ra, {}),
1913
- /* @__PURE__ */ e(na, {})
1912
+ /* @__PURE__ */ e(ta, {}),
1913
+ /* @__PURE__ */ e(ra, {})
1914
1914
  ] }),
1915
1915
  !A && c && ((Pt = F == null ? void 0 : F.permissions) == null ? void 0 : Pt.canShare) && /* @__PURE__ */ o(
1916
1916
  O,
@@ -1919,19 +1919,19 @@ function Ds() {
1919
1919
  size: "xs",
1920
1920
  onClick: () => xe(!0),
1921
1921
  children: [
1922
- /* @__PURE__ */ e(_n, { className: "h-3.5 w-3.5" }),
1922
+ /* @__PURE__ */ e(Pn, { className: "h-3.5 w-3.5" }),
1923
1923
  "Share"
1924
1924
  ]
1925
1925
  }
1926
1926
  ),
1927
1927
  !A && !k && c && H && Br && /* @__PURE__ */ e(
1928
- aa,
1928
+ na,
1929
1929
  {
1930
1930
  dashboardId: H,
1931
1931
  dashboardTitle: (i == null ? void 0 : i.title) || (F == null ? void 0 : F.title)
1932
1932
  }
1933
1933
  ),
1934
- !A && k && f.canUseFilters && c && /* @__PURE__ */ e(sa, {}),
1934
+ !A && k && f.canUseFilters && c && /* @__PURE__ */ e(aa, {}),
1935
1935
  k && !A && ce && g && s && c && /* @__PURE__ */ o(
1936
1936
  O,
1937
1937
  {
@@ -1969,7 +1969,7 @@ function Ds() {
1969
1969
  className: "h-full w-7 rounded-none border-0 border-l border-border/60 px-0 shadow-none hover:bg-accent",
1970
1970
  "aria-label": "Open visual options",
1971
1971
  disabled: !k,
1972
- children: /* @__PURE__ */ e(tn, { className: "h-3.5 w-3.5" })
1972
+ children: /* @__PURE__ */ e(Qn, { className: "h-3.5 w-3.5" })
1973
1973
  }
1974
1974
  ) }),
1975
1975
  /* @__PURE__ */ e(
@@ -1985,7 +1985,7 @@ function Ds() {
1985
1985
  )
1986
1986
  ] }),
1987
1987
  /* @__PURE__ */ e(
1988
- oa,
1988
+ sa,
1989
1989
  {
1990
1990
  open: De,
1991
1991
  onOpenChange: ae
@@ -1993,7 +1993,7 @@ function Ds() {
1993
1993
  )
1994
1994
  ] }),
1995
1995
  !A && !k && Ee && c && /* @__PURE__ */ o(O, { size: "xs", onClick: Mr, children: [
1996
- /* @__PURE__ */ e(Rn, { className: "h-3.5 w-3.5" }),
1996
+ /* @__PURE__ */ e(On, { className: "h-3.5 w-3.5" }),
1997
1997
  "Edit"
1998
1998
  ] }),
1999
1999
  vt && c && Nt && /* @__PURE__ */ o(
@@ -2004,7 +2004,7 @@ function Ds() {
2004
2004
  onClick: Ur,
2005
2005
  disabled: Oe,
2006
2006
  children: [
2007
- /* @__PURE__ */ e(ia, { className: "h-3.5 w-3.5" }),
2007
+ /* @__PURE__ */ e(oa, { className: "h-3.5 w-3.5" }),
2008
2008
  "Undo"
2009
2009
  ]
2010
2010
  }
@@ -2026,7 +2026,7 @@ function Ds() {
2026
2026
  /* @__PURE__ */ e(tr, { className: "h-3.5 w-3.5" }),
2027
2027
  "Close"
2028
2028
  ] }),
2029
- !A && c && /* @__PURE__ */ e("div", { className: "ml-2", children: /* @__PURE__ */ e(da, {}) }),
2029
+ !A && c && /* @__PURE__ */ e("div", { className: "ml-2", children: /* @__PURE__ */ e(ia, {}) }),
2030
2030
  !A && s && /* @__PURE__ */ e(Da, {}),
2031
2031
  !A && c && /* @__PURE__ */ o(Tt, { children: [
2032
2032
  /* @__PURE__ */ e(Ft, { asChild: !0, children: /* @__PURE__ */ e(
@@ -2039,7 +2039,7 @@ function Ds() {
2039
2039
  variant: "ghost",
2040
2040
  "aria-label": "More dashboard options"
2041
2041
  },
2042
- children: /* @__PURE__ */ e(Un, { className: "h-3.5 w-3.5" })
2042
+ children: /* @__PURE__ */ e(_n, { className: "h-3.5 w-3.5" })
2043
2043
  }
2044
2044
  ) }),
2045
2045
  /* @__PURE__ */ o(
@@ -2055,7 +2055,7 @@ function Ds() {
2055
2055
  disabled: p,
2056
2056
  onSelect: () => Ne(!0),
2057
2057
  children: [
2058
- /* @__PURE__ */ e(Tn, { className: "h-3.5 w-3.5" }),
2058
+ /* @__PURE__ */ e(Rn, { className: "h-3.5 w-3.5" }),
2059
2059
  "Export"
2060
2060
  ]
2061
2061
  }
@@ -2066,7 +2066,7 @@ function Ds() {
2066
2066
  /* @__PURE__ */ o(
2067
2067
  T,
2068
2068
  {
2069
- onClick: () => X(!0),
2069
+ onClick: () => Y(!0),
2070
2070
  children: [
2071
2071
  /* @__PURE__ */ e(nr, { className: "h-3.5 w-3.5" }),
2072
2072
  "Manage Groups"
@@ -2129,7 +2129,7 @@ function Ds() {
2129
2129
  /* @__PURE__ */ o(
2130
2130
  T,
2131
2131
  {
2132
- onSelect: () => rn(a.apiServiceUrl),
2132
+ onSelect: () => tn(a.apiServiceUrl),
2133
2133
  children: [
2134
2134
  /* @__PURE__ */ e(xa, { className: "h-3.5 w-3.5" }),
2135
2135
  "Invalidate token"
@@ -2154,12 +2154,12 @@ function Ds() {
2154
2154
  /* @__PURE__ */ e(j, { className: "h-3.5 w-3.5" }),
2155
2155
  "Add lens"
2156
2156
  ] }),
2157
- ce && /* @__PURE__ */ o(Fn, { children: [
2158
- /* @__PURE__ */ o($n, { children: [
2157
+ ce && /* @__PURE__ */ o(Un, { children: [
2158
+ /* @__PURE__ */ o(Tn, { children: [
2159
2159
  /* @__PURE__ */ e(fa, { className: "h-3.5 w-3.5" }),
2160
2160
  "Lenses"
2161
2161
  ] }),
2162
- /* @__PURE__ */ e(Gn, { className: "w-60", children: /* @__PURE__ */ e(Aa, {}) })
2162
+ /* @__PURE__ */ e(Fn, { className: "w-60", children: /* @__PURE__ */ e(Aa, {}) })
2163
2163
  ] })
2164
2164
  ] })
2165
2165
  ]
@@ -2167,54 +2167,54 @@ function Ds() {
2167
2167
  )
2168
2168
  ] }),
2169
2169
  ne && xt && /* @__PURE__ */ e(
2170
- Bn,
2170
+ $n,
2171
2171
  {
2172
2172
  resource: xt,
2173
- resourceType: Ye.DASHBOARD,
2173
+ resourceType: Xe.DASHBOARD,
2174
2174
  onClose: () => xe(!1)
2175
2175
  }
2176
2176
  ),
2177
2177
  /* @__PURE__ */ e(
2178
- Xa,
2178
+ Ya,
2179
2179
  {
2180
2180
  open: J,
2181
- onOpenChange: X
2181
+ onOpenChange: Y
2182
2182
  }
2183
2183
  ),
2184
2184
  /* @__PURE__ */ e(
2185
2185
  ua,
2186
2186
  {
2187
- open: Y,
2187
+ open: X,
2188
2188
  onOpenChange: Z
2189
2189
  }
2190
2190
  ),
2191
2191
  s && ce && c && /* @__PURE__ */ e(La, { open: ve, onOpenChange: ye }),
2192
2192
  c && /* @__PURE__ */ e(
2193
- zn,
2193
+ Gn,
2194
2194
  {
2195
2195
  open: we,
2196
2196
  onOpenChange: Ne
2197
2197
  }
2198
2198
  ),
2199
2199
  /* @__PURE__ */ e(
2200
- qn,
2200
+ Bn,
2201
2201
  {
2202
2202
  open: Se,
2203
2203
  onOpenChange: (d) => {
2204
2204
  !d && Ve && !ee || (B(d), d || (te(null), v([]), q(!1)));
2205
2205
  },
2206
- children: /* @__PURE__ */ o(Hn, { className: "max-w-sm", children: [
2207
- /* @__PURE__ */ o(Vn, { children: [
2208
- /* @__PURE__ */ e(jn, { children: ee ? "Save failed" : "Saving dashboard" }),
2209
- /* @__PURE__ */ e(Kn, { className: "pt-2", children: ee ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
2206
+ children: /* @__PURE__ */ o(zn, { className: "max-w-sm", children: [
2207
+ /* @__PURE__ */ o(qn, { children: [
2208
+ /* @__PURE__ */ e(Hn, { children: ee ? "Save failed" : "Saving dashboard" }),
2209
+ /* @__PURE__ */ e(Vn, { className: "pt-2", children: ee ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
2210
2210
  z.length > 0 && /* @__PURE__ */ o("div", { className: "space-y-1 rounded-md border border-destructive/20 bg-destructive/5 p-3 text-left", children: [
2211
2211
  /* @__PURE__ */ e("div", { className: "text-sm font-medium text-destructive", children: "What needs attention" }),
2212
2212
  /* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children: z.slice(0, 5).map((d) => /* @__PURE__ */ e("li", { children: d }, d)) })
2213
2213
  ] })
2214
2214
  ] }),
2215
- /* @__PURE__ */ e(Qn, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: ee ? /* @__PURE__ */ o(R, { children: [
2215
+ /* @__PURE__ */ e(jn, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: ee ? /* @__PURE__ */ o(R, { children: [
2216
2216
  /* @__PURE__ */ e(
2217
- Wn,
2217
+ Kn,
2218
2218
  {
2219
2219
  onClick: () => {
2220
2220
  B(!1), te(null), v([]), q(!1);
@@ -2242,7 +2242,7 @@ function Ds() {
2242
2242
  }
2243
2243
  ),
2244
2244
  /* @__PURE__ */ e(
2245
- ca,
2245
+ da,
2246
2246
  {
2247
2247
  open: Ar,
2248
2248
  onOpenChange: (d) => {
@@ -1,9 +1,9 @@
1
1
  import { jsxs as d, jsx as t } from "react/jsx-runtime";
2
2
  import { useMemo as m, useState as f, useRef as b, useEffect as p } from "react";
3
- import { X as S } from "./x-IdR_js6f.js";
4
- import { u as o, c as N, B as D, C as J } from "./switch-DUdaHFZQ.js";
5
- import "./analyze-result-contract-DuhlklhI.js";
6
- import "./index-icb12JV1.js";
3
+ import { X as S } from "./x-CXDkqdur.js";
4
+ import { u as o, c as N, B as D, C as J } from "./switch-BXQAlSuW.js";
5
+ import "./analyze-result-contract-C9Gv2_qW.js";
6
+ import "./index-CQmKDEbe.js";
7
7
  import "./index-CJdxSyQq.js";
8
8
  import "react-dom";
9
9
  function j() {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),o=require("react"),b=require("./x-B_cx7LwM.js"),s=require("./switch-bdJp0Bkw.js");require("./analyze-result-contract-CtXfp3nv.js");require("./index-4W_ElSBJ.js");require("./index-DRlMUglg.js");require("react-dom");function S(){const t=s.useDashboardStore(e=>e.dashboard),c=s.useDashboardStore(e=>e.actions.setDashboard),u=s.useDashboardStore(e=>e.showDashboardJSON),h=s.useDashboardStore(e=>e.actions.setShowDashboardJSON),r=o.useMemo(()=>t?JSON.stringify(t,null,2):"",[t]),[l,i]=o.useState(r),n=o.useRef(r);return o.useEffect(()=>{r!==n.current&&(i(r),n.current=r)},[r]),a.jsxs("div",{className:s.cn("relative p-2",{hidden:!u}),children:[a.jsxs(s.Button,{variant:"secondary",size:"sm",className:"absolute right-2 top-2 z-10 h-8",onClick:()=>h(!1),children:[a.jsx(b.X,{className:"mr-2 h-4 w-4"}),"Close"]}),a.jsx("div",{className:"h-[550px] overflow-hidden",children:a.jsx(s.CodeEditor,{value:l,onValueChange:e=>{i(e);try{const d=JSON.parse(e);n.current=JSON.stringify(d,null,2),c(d)}catch{}},language:"json"})})]})}exports.default=S;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),o=require("react"),b=require("./x-B6ghREd2.js"),s=require("./switch-B79Hn4Qh.js");require("./analyze-result-contract-Zgg-Bbpj.js");require("./index-DXCBPLDu.js");require("./index-DRlMUglg.js");require("react-dom");function S(){const t=s.useDashboardStore(e=>e.dashboard),c=s.useDashboardStore(e=>e.actions.setDashboard),u=s.useDashboardStore(e=>e.showDashboardJSON),h=s.useDashboardStore(e=>e.actions.setShowDashboardJSON),r=o.useMemo(()=>t?JSON.stringify(t,null,2):"",[t]),[l,i]=o.useState(r),n=o.useRef(r);return o.useEffect(()=>{r!==n.current&&(i(r),n.current=r)},[r]),a.jsxs("div",{className:s.cn("relative p-2",{hidden:!u}),children:[a.jsxs(s.Button,{variant:"secondary",size:"sm",className:"absolute right-2 top-2 z-10 h-8",onClick:()=>h(!1),children:[a.jsx(b.X,{className:"mr-2 h-4 w-4"}),"Close"]}),a.jsx("div",{className:"h-[550px] overflow-hidden",children:a.jsx(s.CodeEditor,{value:l,onValueChange:e=>{i(e);try{const d=JSON.parse(e);n.current=JSON.stringify(d,null,2),c(d)}catch{}},language:"json"})})]})}exports.default=S;