react-semaphor 0.1.525 → 0.1.527

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 (196) hide show
  1. package/DATA_APP_SDK.md +5 -1
  2. package/dist/analytics-protocol/index.js +1179 -296
  3. package/dist/brand-studio/index.js +31 -31
  4. package/dist/briefings/index.js +50 -49
  5. package/dist/chunks/{calculated-field-identity-Dy_WpDdo.js → calculated-field-identity-DEhjPSr-.js} +77 -76
  6. package/dist/chunks/{card-config-utils-CAyjC5Tp.js → card-config-utils-BlIbwkuD.js} +62 -59
  7. package/dist/chunks/{constants-DeLIHVAW.js → constants-DNWVy8Y3.js} +4 -4
  8. package/dist/chunks/dashboard-JNHR0_cZ.js +14 -0
  9. package/dist/chunks/{dashboard-briefing-launcher-BilVIEyw.js → dashboard-briefing-launcher-D9pFByPh.js} +274 -267
  10. package/dist/chunks/{dashboard-controls-DyLPcvCK.js → dashboard-controls-CJI5ZWMq.js} +740 -692
  11. package/dist/chunks/dashboard-json-DLdrFry-.js +65 -0
  12. package/dist/chunks/{edit-dashboard-visual-DtmKNNdE.js → edit-dashboard-visual-D5LjWle1.js} +6760 -6728
  13. package/dist/chunks/editor-action-buttons-G91NQKxU.js +2070 -0
  14. package/dist/chunks/{field-aggregations-BQjogiI1.js → field-aggregations-DeVQLIsP.js} +19 -19
  15. package/dist/chunks/{field-dependencies-v-lJNzC7.js → field-dependencies-CGYic38w.js} +1 -1
  16. package/dist/chunks/{index-ON7Gpvcv.js → index-BvJOYbNv.js} +760 -750
  17. package/dist/chunks/{matrix-analytical-definition-BimC4XIV.js → matrix-analytical-definition-BJyH5-99.js} +1 -1
  18. package/dist/chunks/{matrix-card-CIlz0Dnp.js → matrix-card-DY45yiUM.js} +7 -6
  19. package/dist/chunks/{matrix-control-sources-B1K7x0SL.js → matrix-control-sources-BypfLZsK.js} +36 -36
  20. package/dist/chunks/{matrix-definition-E5gXXSTZ.js → matrix-definition-Cdn3LoxW.js} +3 -3
  21. package/dist/chunks/{semantic-format-Baqp8kD_.js → matrix-formatter-BoKU3MzZ.js} +655 -511
  22. package/dist/chunks/{matrix-member-presentation-Bw7-JCrr.js → matrix-member-presentation-BBW0n1iY.js} +1 -1
  23. package/dist/chunks/matrix-operation-contract-BV02rLhu.js +809 -0
  24. package/dist/chunks/{metric-comparison-BphoJ9bq.js → metric-comparison-Crljx_XY.js} +15 -10
  25. package/dist/chunks/{numeric-presentation-VhMUHfrJ.js → numeric-presentation-LvnNY5Ma.js} +68 -68
  26. package/dist/chunks/pivot-header-presentation-D5v8uyjj.js +618 -0
  27. package/dist/chunks/{pivot-result-identity-BzUQiCEV.js → pivot-result-identity-CY__BuwI.js} +1 -1
  28. package/dist/chunks/{pivot-result-lifecycle-BFO354lk.js → pivot-result-lifecycle-BWrPhlGT.js} +259 -204
  29. package/dist/chunks/{raw-temporal-7bFbXd2a.js → raw-temporal-CdnA_OXJ.js} +10 -10
  30. package/dist/chunks/{raw-temporal-contract-BQZIJ1fn.js → raw-temporal-contract-Bc9z83t-.js} +1 -1
  31. package/dist/chunks/relative-date-DAF9J7mt.js +456 -0
  32. package/dist/chunks/report-preferences-dialog-D3hxu4sE.js +1231 -0
  33. package/dist/chunks/{report-runtime-context-CxIoGyNM.js → report-runtime-context-CtaGGlit.js} +1 -1
  34. package/dist/chunks/{selection-reducer-CvCBQbl2.js → selection-reducer-C7Um5XN-.js} +3 -3
  35. package/dist/chunks/semantic-format-BjBMOSoo.js +192 -0
  36. package/dist/chunks/{index-DYOaHuLS.js → semaphor-ready-indicator-D46I_4g7.js} +145070 -146854
  37. package/dist/chunks/slider-B6LELqx6.js +876 -0
  38. package/dist/chunks/{source-entity-resolution-Bzefiive.js → source-entity-resolution-Bde29mqE.js} +25 -25
  39. package/dist/chunks/{switch-CWPcwAZ4.js → switch-_7uBAbYx.js} +7950 -8545
  40. package/dist/chunks/{temporal-bucket-PcLFSYWX.js → temporal-bucket-DlFuhCnT.js} +6 -6
  41. package/dist/chunks/{temporal-bucket-contract-DTLDRzgV.js → temporal-bucket-contract-C6lUGPS3.js} +1 -1
  42. package/dist/chunks/temporal-input-presentation-DyMWCZYh.js +195 -0
  43. package/dist/chunks/{token-types-BC6RcUY8.js → token-types-UjyNz95-.js} +1 -1
  44. package/dist/chunks/{validators-CsdOtZI6.js → validators-CQcG0EPN.js} +852 -731
  45. package/dist/chunks/zoned-wall-clock-BkxV9jS2.js +46 -0
  46. package/dist/dashboard/index.js +1 -1
  47. package/dist/dashboard-authoring/index.js +138 -137
  48. package/dist/data-app-sdk/index.js +30 -29
  49. package/dist/data-app-sdk-adapters/index.js +23 -22
  50. package/dist/data-app-sdk-validation/index.js +27 -26
  51. package/dist/format-utils/index.js +247 -329
  52. package/dist/index.js +435 -246
  53. package/dist/report-runtime-context/index.js +2 -2
  54. package/dist/style.css +1 -1
  55. package/dist/surfboard/index.js +4 -5
  56. package/dist/types/briefings/index.d.ts +3 -0
  57. package/dist/types/components/dashboard/dashboard-container.d.ts +1 -1
  58. package/dist/types/components/dashboard/sheet/layout-change-guard.d.ts +1 -1
  59. package/dist/types/components/dashboard/sheet/sheet-layout.d.ts +1 -1
  60. package/dist/types/components/editor/editor-main/text-card.d.ts +1 -1
  61. package/dist/types/components/editor/editor.d.ts +1 -1
  62. package/dist/types/components/explorer/filters/card-date-filter.d.ts +13 -5
  63. package/dist/types/components/explorer/filters/card-date-selection.d.ts +28 -0
  64. package/dist/types/components/providers/semaphor-context-provider.d.ts +1 -1
  65. package/dist/types/components/providers/theme-provider-context.d.ts +1 -1
  66. package/dist/types/components/providers/theme-provider.d.ts +1 -1
  67. package/dist/types/components/shared/unsaved-changes/use-pristine-snapshot-initializer.d.ts +1 -1
  68. package/dist/types/components/sharing-and-management/dashboard-actions-menu.d.ts +1 -1
  69. package/dist/types/components/sharing-and-management/hooks/use-resource-management.d.ts +0 -1
  70. package/dist/types/components/surfboard/dashboard-plus.d.ts +1 -1
  71. package/dist/types/components/surfboard/download-settings-dialog.d.ts +8 -0
  72. package/dist/types/components/surfboard/filter/types.d.ts +8 -29
  73. package/dist/types/components/surfboard/filter/use-dashboard-filter-mapping-popover.d.ts +5 -1
  74. package/dist/types/components/ui-custom/date-range-picker.d.ts +18 -2
  75. package/dist/types/components/ui-custom/date-range-presets.d.ts +8 -21
  76. package/dist/types/components/ui-custom/report-calendar.d.ts +18 -0
  77. package/dist/types/components/visual/aggregated-table/utils/export-utils.d.ts +3 -5
  78. package/dist/types/components/visual/column-display-utils.d.ts +1 -1
  79. package/dist/types/components/visual/data-table/data-table-toolbar.d.ts +1 -1
  80. package/dist/types/components/visual/kpi-visual/kpi-utils.d.ts +1 -1
  81. package/dist/types/components/visual/pivot-table/utils/pivot-table-export-utils.d.ts +3 -1
  82. package/dist/types/components/visual/settings/color-format.d.ts +1 -1
  83. package/dist/types/components/visual/visual-utils.d.ts +1 -1
  84. package/dist/types/index.js +5 -5
  85. package/dist/types/lib/actions/data-point-click-action.d.ts +2 -1
  86. package/dist/types/lib/api/exports-api.d.ts +3 -0
  87. package/dist/types/lib/csv-download.d.ts +9 -0
  88. package/dist/types/lib/csv-encoding-options.d.ts +6 -0
  89. package/dist/types/lib/dashboard/normalize-dashboard-for-dirty-check.d.ts +1 -1
  90. package/dist/types/lib/dashboard-inputs/dashboard-filter-mapping-storage-transition.d.ts +2 -1
  91. package/dist/types/lib/dashboard-navigation/build-carried-click-context.d.ts +0 -1
  92. package/dist/types/lib/document/document-input-runtime.d.ts +2 -1
  93. package/dist/types/lib/export-utils.d.ts +17 -15
  94. package/dist/types/lib/hooks/explorer/use-filter-builder.d.ts +2 -2
  95. package/dist/types/lib/hooks/explorer/use-schemas.d.ts +1 -1
  96. package/dist/types/lib/hooks/use-dashboard.d.ts +2 -2
  97. package/dist/types/lib/hooks/use-relative-date-summarizer.d.ts +7 -0
  98. package/dist/types/lib/interactions/get-click-context-from-chartjs.d.ts +1 -2
  99. package/dist/types/lib/matrix-table/matrix-application-adapter.d.ts +3 -2
  100. package/dist/types/lib/matrix-table/matrix-card-adapter.d.ts +1 -1
  101. package/dist/types/lib/matrix-table/matrix-card-draft.d.ts +1 -1
  102. package/dist/types/lib/matrix-table/matrix-dataset-history.d.ts +47 -0
  103. package/dist/types/lib/matrix-table/matrix-delivery.d.ts +7 -3
  104. package/dist/types/lib/matrix-table/matrix-execution-context.d.ts +2 -0
  105. package/dist/types/lib/matrix-table/matrix-query-transport.d.ts +4 -1
  106. package/dist/types/lib/matrix-table/matrix-runtime-types.d.ts +105 -4
  107. package/dist/types/lib/matrix-table/matrix-runtime.d.ts +43 -2
  108. package/dist/types/lib/matrix-table/use-matrix.d.ts +6 -0
  109. package/dist/types/lib/query-context/build-card-query-context.d.ts +5 -1
  110. package/dist/types/lib/query-context/build-dashboard-card-query-contract.d.ts +0 -1
  111. package/dist/types/lib/query-context/build-global-date-comparison-context.d.ts +1 -2
  112. package/dist/types/lib/query-context/compile-dashboard-card-filters.d.ts +1 -2
  113. package/dist/types/lib/query-context/dashboard-card-query-key.d.ts +10 -0
  114. package/dist/types/lib/query-context/query-auth-scope.d.ts +5 -0
  115. package/dist/types/lib/stores/dashboard-store.d.ts +9 -4
  116. package/dist/types/lib/stores/editor-store.d.ts +1 -2
  117. package/dist/types/lib/stores/table-actions.d.ts +2 -1
  118. package/dist/types/lib/temporal-filter/temporal-filter-utils.d.ts +9 -2
  119. package/dist/types/lib/types/common-types.d.ts +5 -0
  120. package/dist/types/lib/types/explorer-types.d.ts +14 -0
  121. package/dist/types/lib/types/token-types.d.ts +0 -13
  122. package/dist/types/lib/utils/card-definition.d.ts +1 -1
  123. package/dist/types/lib/utils/date-timezone-utils.d.ts +4 -46
  124. package/dist/types/lib/utils/filter-default-value-utils.d.ts +8 -2
  125. package/dist/types/lib/utils/inline-filter-utils.d.ts +3 -2
  126. package/dist/types/lib/utils/relative-date-description.d.ts +38 -0
  127. package/dist/types/lib/utils.d.ts +0 -2
  128. package/dist/types/shared/analytics-protocol/contracts.d.ts +10 -7
  129. package/dist/types/shared/analytics-protocol/index.d.ts +12 -1
  130. package/dist/types/shared/analytics-protocol/matrix-definition-contract.d.ts +20 -20
  131. package/dist/types/shared/analytics-protocol/matrix-operation-contract.d.ts +10 -10
  132. package/dist/types/shared/analytics-protocol/matrix-operation-request.d.ts +8 -8
  133. package/dist/types/shared/analytics-protocol/matrix-window-contract.d.ts +51 -5
  134. package/dist/types/shared/analytics-protocol/metric-comparison.d.ts +9 -3
  135. package/dist/types/shared/analytics-protocol/operation-temporal-state.d.ts +64 -0
  136. package/dist/types/shared/analytics-protocol/relative-date-filter.d.ts +61 -0
  137. package/dist/types/shared/analytics-protocol/relative-date-label.d.ts +20 -0
  138. package/dist/types/shared/analytics-protocol/runtime-schemas.d.ts +0 -2
  139. package/dist/types/shared/analytics-protocol/time-window-schema.d.ts +314 -0
  140. package/dist/types/shared/analytics-protocol/time-window.d.ts +13 -0
  141. package/dist/types/shared/dashboard-authoring/matrix-delivery.d.ts +8 -4
  142. package/dist/types/shared/format-utils/exporters/csv-utils.d.ts +46 -15
  143. package/dist/types/shared/format-utils/exporters/index.d.ts +2 -3
  144. package/dist/types/shared/format-utils/flat-table-export-totals.d.ts +2 -1
  145. package/dist/types/shared/format-utils/matrix-export-presentation.d.ts +2 -2
  146. package/dist/types/shared/format-utils/types/format-types.d.ts +0 -42
  147. package/dist/types/shared/temporal/calendar-periods.d.ts +56 -0
  148. package/dist/types/shared/temporal/index.d.ts +5 -0
  149. package/dist/types/shared/temporal/relative-date.d.ts +21 -0
  150. package/dist/types/shared/temporal/temporal-parity-fixtures.d.ts +73 -0
  151. package/dist/types/shared/temporal/time-window-periods.d.ts +21 -0
  152. package/dist/types/shared/temporal/zoned-wall-clock.d.ts +23 -0
  153. package/package.json +2 -17
  154. package/src/data-app-sdk/README.md +6 -3
  155. package/dist/chunks/dashboard-date-comparison-definition-BqNhECUr.js +0 -183
  156. package/dist/chunks/dashboard-json-QEoU-mx4.js +0 -75
  157. package/dist/chunks/editor-action-buttons-B9VRW3Bh.js +0 -2019
  158. package/dist/chunks/matrix-formatter-WBgtebUT.js +0 -341
  159. package/dist/chunks/matrix-operation-contract-D32U2CSw.js +0 -1802
  160. package/dist/chunks/mouse-pointer-2-BZvGk45-.js +0 -19
  161. package/dist/chunks/pivot-header-presentation-CGtudHo7.js +0 -661
  162. package/dist/chunks/report-preferences-dialog-BLaFmlE2.js +0 -723
  163. package/dist/chunks/temporal-input-presentation-2RJrvmYL.js +0 -222
  164. package/dist/chunks/update-policy-DhAUtiC8.js +0 -913
  165. package/dist/data-app-builder/index.js +0 -3666
  166. package/dist/data-app-builder-browser-runtime/index.js +0 -8
  167. package/dist/data-app-codegen/index.js +0 -22
  168. package/dist/data-app-codegen-node/index.js +0 -1807
  169. package/dist/types/components/data-app-runtime/published-data-app-runtime.d.ts +0 -7
  170. package/dist/types/components/surfboard/json-to-csv.d.ts +0 -7
  171. package/dist/types/components/visual/data-table/utils/export-utils.d.ts +0 -31
  172. package/dist/types/data-app-builder/browser-runtime.d.ts +0 -174
  173. package/dist/types/data-app-builder/constants.d.ts +0 -14
  174. package/dist/types/data-app-builder/data-app-builder.d.ts +0 -14
  175. package/dist/types/data-app-builder/index.d.ts +0 -1
  176. package/dist/types/data-app-builder/lib/api.d.ts +0 -36
  177. package/dist/types/data-app-builder/lib/context-select.d.ts +0 -3
  178. package/dist/types/data-app-builder/lib/diagnostics.d.ts +0 -12
  179. package/dist/types/data-app-builder/lib/file-tree.d.ts +0 -2
  180. package/dist/types/data-app-builder/types.d.ts +0 -558
  181. package/dist/types/data-app-builder-browser-runtime.d.ts +0 -2
  182. package/dist/types/data-app-builder.d.ts +0 -2
  183. package/dist/types/data-app-codegen/generate-contract.d.ts +0 -26
  184. package/dist/types/data-app-codegen/generated-contract-files.d.ts +0 -7
  185. package/dist/types/data-app-codegen/generated-contract-validation.d.ts +0 -13
  186. package/dist/types/data-app-codegen/index.d.ts +0 -6
  187. package/dist/types/data-app-codegen/live-execution.d.ts +0 -42
  188. package/dist/types/data-app-codegen/node.d.ts +0 -2
  189. package/dist/types/data-app-codegen/update-policy.d.ts +0 -25
  190. package/dist/types/data-app-codegen/validation.d.ts +0 -8
  191. package/dist/types/data-app-codegen-node.d.ts +0 -2
  192. package/dist/types/data-app-codegen.d.ts +0 -2
  193. package/dist/types/lib/encrypt-utils.d.ts +0 -9
  194. package/dist/types/shared/analytics-protocol/data-app-codegen-summary.d.ts +0 -418
  195. package/dist/types/shared/format-utils/exporters/pivot-exporter.d.ts +0 -13
  196. package/dist/types/shared/format-utils/exporters/table-exporter.d.ts +0 -10
@@ -1,38 +1,33 @@
1
1
  import { jsx as e, jsxs as s, Fragment as F } from "react/jsx-runtime";
2
- import { u as C, B as V, az as Tr, aA as Fr, aB as Xe, c as xe, a4 as D, aC as ve, aD as tt, aE as qt, L as Re, aF as zt, aG as $r, D as Ct, Q as kt, V as Et, W as At, Y as It, X as Br, i as Gr, aH as Hr } from "./switch-CWPcwAZ4.js";
3
- import { by as Vr, bz as qr, bA as rt, bB as zr, bC as jr, bD as Kr, bE as Qr, bF as Wr, bG as Jr, az as W, b8 as ye, bH as we, bI as Yr, aG as Xr, aH as Zr, aJ as Mt, aK as Lt, bJ as jt, bm as at, aY as ae, bK as ea, bL as ta, bM as Kt, bN as ra, bO as Qt, bP as U, bQ as aa, ap as na, bR as oa, bS as sa, bT as ia, bU as da, m as ca, u as Pe, s as la, n as Qe, bV as ua, bW as ma, bX as ha, bY as pa, L as fa, bZ as ba, b_ as ga, I as Pt, b$ as xa, c0 as va, c1 as ya, c2 as wa, c3 as Na, c4 as _t, c5 as Ot, c6 as Rt, c7 as Sa, c8 as Da, c9 as Ca, ca as ka, cb as _e, cc as Ea, cd as We, b0 as Ut, r as Aa, ce as Ia, aO as Ma, aR as La, aS as Pa, aT as _a, aU as Oa, aV as Ra, aW as Ua, aX as Tt } from "./index-DYOaHuLS.js";
4
- import { c as ne, X as Wt, C as Ta } from "./x-CXDkqdur.js";
5
- import "./card-config-utils-CAyjC5Tp.js";
6
- import "./validators-CsdOtZI6.js";
7
- import "./matrix-operation-contract-D32U2CSw.js";
8
- import "../value-format-preferences/index.js";
9
- import * as k from "react";
10
- import Jt, { useMemo as Q, useState as N, useEffect as Ue, useRef as Ft, useLayoutEffect as Fa } from "react";
11
- import "./appearance-context-DEYtWinQ.js";
12
- import "./index-CLIro-EG.js";
13
- import "./field-aggregations-BQjogiI1.js";
2
+ import { u as C, B as H, aO as Gr, aP as Vr, aQ as Ze, c as be, aj as D, aR as xe, aS as nt, aT as zt, L as Re, m as Hr, s as qr, t as jr, v as zr, w as Kr, x as Qr, aU as Kt, ah as Wr, a2 as At, n as Mt, o as Lt, p as Pt, q as Ot, I as Jr, D as Yr, aV as Xr } from "./switch-_7uBAbYx.js";
3
+ import { bq as Zr, br as ea, bs as ot, bt as ta, bu as ra, bv as aa, bw as na, bx as oa, by as sa, aB as J, az as ve, bz as ye, bA as ia, aY as Qt, aZ as Wt, a$ as et, b0 as tt, bB as Jt, bd as st, bm as re, bC as da, bD as ca, bE as Yt, bF as la, bG as Xt, a_ as ua, bH as ma, bI as U, bJ as ha, an as pa, aN as fa, bK as ga, bL as ba, bM as xa, l as va, u as Pe, r as ya, m as We, bN as wa, bO as Na, bP as Sa, bQ as Da, K as Ca, bR as ka, bS as Ea, I as _t, bT as Ia, aP as Aa, bU as Ma, bV as La, bW as Pa, bX as Rt, bY as Ut, bZ as Tt, b_ as Oa, b$ as _a, c0 as Ra, c1 as Ua, c2 as Oe, c3 as Ta, c4 as Fa, c5 as Je, c6 as Ft, q as $a, c7 as Ba, c8 as Ga, c9 as Va, ca as Ha, cb as qa, cc as ja, cd as za, ce as Ka, cf as $t } from "./semaphor-ready-indicator-D46I_4g7.js";
4
+ import { c as ae, X as Zt, C as Qa } from "./x-CXDkqdur.js";
5
+ import * as E from "react";
6
+ import er, { useMemo as W, useState as N, useEffect as Ue, useRef as Bt, useLayoutEffect as Wa } from "react";
7
+ import { d as Ja, c as Ya, u as Xa, A as Za, a as en, g as tn, V as rn, N as an, h as nn, U as on } from "./dashboard-briefing-launcher-D9pFByPh.js";
8
+ import "./card-config-utils-BlIbwkuD.js";
9
+ import { createPortal as sn } from "react-dom";
10
+ import "./validators-CQcG0EPN.js";
11
+ import "./matrix-operation-contract-BV02rLhu.js";
14
12
  import "zod";
15
- import "./matrix-continuation-C4sRcjZU.js";
16
- import "./color-CJvdlFM_.js";
17
- import { createPortal as $a } from "react-dom";
18
- import "./index-ON7Gpvcv.js";
19
- import { d as Ba, c as Ga, u as Ha, A as Va, a as qa, g as za, V as ja, N as Ka, h as Qa, U as Wa } from "./dashboard-briefing-launcher-BilVIEyw.js";
20
- import { S as Ja, C as Ya } from "./selection-reducer-CvCBQbl2.js";
21
- import { d as Yt } from "./semantic-format-Baqp8kD_.js";
22
- import { c as Ze } from "./calculated-field-identity-Dy_WpDdo.js";
23
- import { R as Xa } from "./report-preferences-dialog-BLaFmlE2.js";
24
- import { u as Za } from "./use-debounced-dirty-check-BwAbnX_5.js";
25
- import { s as en } from "./normalize-dashboard-for-dirty-check-Bk3VYv_q.js";
26
- import { S as tn } from "./save-DgMfP0j8.js";
27
- import { P as rn } from "./palette-Cp1hqZtm.js";
28
- import { B as an } from "./braces-8TRlDwDw.js";
13
+ import "../value-format-preferences/index.js";
14
+ import { S as dn, C as cn } from "./selection-reducer-C7Um5XN-.js";
15
+ import { k as tr } from "./matrix-formatter-BoKU3MzZ.js";
16
+ import { K as rt } from "./calculated-field-identity-DEhjPSr-.js";
17
+ import { R as ln } from "./report-preferences-dialog-D3hxu4sE.js";
18
+ import { r as un } from "./pivot-result-lifecycle-BWrPhlGT.js";
19
+ import { u as mn } from "./use-debounced-dirty-check-BwAbnX_5.js";
20
+ import { s as hn } from "./normalize-dashboard-for-dirty-check-Bk3VYv_q.js";
21
+ import { S as pn } from "./save-DgMfP0j8.js";
22
+ import { P as fn } from "./palette-Cp1hqZtm.js";
23
+ import { B as gn } from "./braces-8TRlDwDw.js";
29
24
  /**
30
25
  * @license lucide-react v0.453.0 - ISC
31
26
  *
32
27
  * This source code is licensed under the ISC license.
33
28
  * See the LICENSE file in the root directory of this source tree.
34
29
  */
35
- const nn = ne("Monitor", [
30
+ const bn = ae("Monitor", [
36
31
  ["rect", { width: "20", height: "14", x: "2", y: "3", rx: "2", key: "48i651" }],
37
32
  ["line", { x1: "8", x2: "16", y1: "21", y2: "21", key: "1svkeh" }],
38
33
  ["line", { x1: "12", x2: "12", y1: "17", y2: "21", key: "vw1qmm" }]
@@ -43,7 +38,7 @@ const nn = ne("Monitor", [
43
38
  * This source code is licensed under the ISC license.
44
39
  * See the LICENSE file in the root directory of this source tree.
45
40
  */
46
- const on = ne("Moon", [
41
+ const xn = ae("Moon", [
47
42
  ["path", { d: "M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z", key: "a7tn18" }]
48
43
  ]);
49
44
  /**
@@ -52,7 +47,7 @@ const on = ne("Moon", [
52
47
  * This source code is licensed under the ISC license.
53
48
  * See the LICENSE file in the root directory of this source tree.
54
49
  */
55
- const sn = ne("ShieldX", [
50
+ const vn = ae("ShieldX", [
56
51
  [
57
52
  "path",
58
53
  {
@@ -69,7 +64,7 @@ const sn = ne("ShieldX", [
69
64
  * This source code is licensed under the ISC license.
70
65
  * See the LICENSE file in the root directory of this source tree.
71
66
  */
72
- const dn = ne("Sun", [
67
+ const yn = ae("Sun", [
73
68
  ["circle", { cx: "12", cy: "12", r: "4", key: "4exip2" }],
74
69
  ["path", { d: "M12 2v2", key: "tus03m" }],
75
70
  ["path", { d: "M12 20v2", key: "1lh1kg" }],
@@ -86,7 +81,7 @@ const dn = ne("Sun", [
86
81
  * This source code is licensed under the ISC license.
87
82
  * See the LICENSE file in the root directory of this source tree.
88
83
  */
89
- const cn = ne("UserPlus", [
84
+ const wn = ae("UserPlus", [
90
85
  ["path", { d: "M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2", key: "1yyitq" }],
91
86
  ["circle", { cx: "9", cy: "7", r: "4", key: "nufk8" }],
92
87
  ["line", { x1: "19", x2: "19", y1: "8", y2: "14", key: "1bvyxn" }],
@@ -98,11 +93,11 @@ const cn = ne("UserPlus", [
98
93
  * This source code is licensed under the ISC license.
99
94
  * See the LICENSE file in the root directory of this source tree.
100
95
  */
101
- const Xt = ne("UserRound", [
96
+ const rr = ae("UserRound", [
102
97
  ["circle", { cx: "12", cy: "8", r: "5", key: "1hypcn" }],
103
98
  ["path", { d: "M20 21a8 8 0 0 0-16 0", key: "rfgkzh" }]
104
99
  ]);
105
- var et = { exports: {} }, Je = {};
100
+ var at = { exports: {} }, Ye = {};
106
101
  /**
107
102
  * @license React
108
103
  * use-sync-external-store-shim.production.js
@@ -112,32 +107,32 @@ var et = { exports: {} }, Je = {};
112
107
  * This source code is licensed under the MIT license found in the
113
108
  * LICENSE file in the root directory of this source tree.
114
109
  */
115
- var $t;
116
- function ln() {
117
- if ($t) return Je;
118
- $t = 1;
119
- var t = Jt;
110
+ var Gt;
111
+ function Nn() {
112
+ if (Gt) return Ye;
113
+ Gt = 1;
114
+ var t = er;
120
115
  function n(c, h) {
121
116
  return c === h && (c !== 0 || 1 / c === 1 / h) || c !== c && h !== h;
122
117
  }
123
- var a = typeof Object.is == "function" ? Object.is : n, r = t.useState, o = t.useEffect, l = t.useLayoutEffect, m = t.useDebugValue;
124
- function u(c, h) {
125
- var i = h(), x = r({ inst: { value: i, getSnapshot: h } }), v = x[0].inst, w = x[1];
118
+ var a = typeof Object.is == "function" ? Object.is : n, r = t.useState, o = t.useEffect, l = t.useLayoutEffect, u = t.useDebugValue;
119
+ function m(c, h) {
120
+ var i = h(), x = r({ inst: { value: i, getSnapshot: h } }), y = x[0].inst, w = x[1];
126
121
  return l(
127
122
  function() {
128
- v.value = i, v.getSnapshot = h, g(v) && w({ inst: v });
123
+ y.value = i, y.getSnapshot = h, b(y) && w({ inst: y });
129
124
  },
130
125
  [c, i, h]
131
126
  ), o(
132
127
  function() {
133
- return g(v) && w({ inst: v }), c(function() {
134
- g(v) && w({ inst: v });
128
+ return b(y) && w({ inst: y }), c(function() {
129
+ b(y) && w({ inst: y });
135
130
  });
136
131
  },
137
132
  [c]
138
- ), m(i), i;
133
+ ), u(i), i;
139
134
  }
140
- function g(c) {
135
+ function b(c) {
141
136
  var h = c.getSnapshot;
142
137
  c = c.value;
143
138
  try {
@@ -150,10 +145,10 @@ function ln() {
150
145
  function f(c, h) {
151
146
  return h();
152
147
  }
153
- var b = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? f : u;
154
- return Je.useSyncExternalStore = t.useSyncExternalStore !== void 0 ? t.useSyncExternalStore : b, Je;
148
+ var g = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? f : m;
149
+ return Ye.useSyncExternalStore = t.useSyncExternalStore !== void 0 ? t.useSyncExternalStore : g, Ye;
155
150
  }
156
- var Ye = {};
151
+ var Xe = {};
157
152
  /**
158
153
  * @license React
159
154
  * use-sync-external-store-shim.development.js
@@ -163,47 +158,47 @@ var Ye = {};
163
158
  * This source code is licensed under the MIT license found in the
164
159
  * LICENSE file in the root directory of this source tree.
165
160
  */
166
- var Bt;
167
- function un() {
168
- return Bt || (Bt = 1, process.env.NODE_ENV !== "production" && function() {
161
+ var Vt;
162
+ function Sn() {
163
+ return Vt || (Vt = 1, process.env.NODE_ENV !== "production" && function() {
169
164
  function t(i, x) {
170
165
  return i === x && (i !== 0 || 1 / i === 1 / x) || i !== i && x !== x;
171
166
  }
172
167
  function n(i, x) {
173
- b || o.startTransition === void 0 || (b = !0, console.error(
168
+ g || o.startTransition === void 0 || (g = !0, console.error(
174
169
  "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
175
170
  ));
176
- var v = x();
171
+ var y = x();
177
172
  if (!c) {
178
173
  var w = x();
179
- l(v, w) || (console.error(
174
+ l(y, w) || (console.error(
180
175
  "The result of getSnapshot should be cached to avoid an infinite loop"
181
176
  ), c = !0);
182
177
  }
183
- w = m({
184
- inst: { value: v, getSnapshot: x }
178
+ w = u({
179
+ inst: { value: y, getSnapshot: x }
185
180
  });
186
181
  var S = w[0].inst, p = w[1];
187
- return g(
182
+ return b(
188
183
  function() {
189
- S.value = v, S.getSnapshot = x, a(S) && p({ inst: S });
184
+ S.value = y, S.getSnapshot = x, a(S) && p({ inst: S });
190
185
  },
191
- [i, v, x]
192
- ), u(
186
+ [i, y, x]
187
+ ), m(
193
188
  function() {
194
189
  return a(S) && p({ inst: S }), i(function() {
195
190
  a(S) && p({ inst: S });
196
191
  });
197
192
  },
198
193
  [i]
199
- ), f(v), v;
194
+ ), f(y), y;
200
195
  }
201
196
  function a(i) {
202
197
  var x = i.getSnapshot;
203
198
  i = i.value;
204
199
  try {
205
- var v = x();
206
- return !l(i, v);
200
+ var y = x();
201
+ return !l(i, y);
207
202
  } catch {
208
203
  return !0;
209
204
  }
@@ -212,24 +207,24 @@ function un() {
212
207
  return x();
213
208
  }
214
209
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
215
- var o = Jt, l = typeof Object.is == "function" ? Object.is : t, m = o.useState, u = o.useEffect, g = o.useLayoutEffect, f = o.useDebugValue, b = !1, c = !1, h = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : n;
216
- Ye.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : h, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
217
- }()), Ye;
210
+ var o = er, l = typeof Object.is == "function" ? Object.is : t, u = o.useState, m = o.useEffect, b = o.useLayoutEffect, f = o.useDebugValue, g = !1, c = !1, h = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : n;
211
+ Xe.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : h, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
212
+ }()), Xe;
218
213
  }
219
- process.env.NODE_ENV === "production" ? et.exports = ln() : et.exports = un();
220
- var mn = et.exports;
221
- const Oe = ["light", "dark", "system"];
222
- function hn() {
223
- const { theme: t, setTheme: n } = Vr(), a = C(
224
- (m) => m.actions.setDashboardTheme
214
+ process.env.NODE_ENV === "production" ? at.exports = Nn() : at.exports = Sn();
215
+ var Dn = at.exports;
216
+ const _e = ["light", "dark", "system"];
217
+ function Cn() {
218
+ const { theme: t, setTheme: n } = Zr(), a = C(
219
+ (u) => u.actions.setDashboardTheme
225
220
  );
226
221
  function r() {
227
- const m = Oe.includes(t) ? t : "system", u = Oe[(Oe.indexOf(m) + 1) % Oe.length];
228
- n(u), a(u);
222
+ const u = _e.includes(t) ? t : "system", m = _e[(_e.indexOf(u) + 1) % _e.length];
223
+ n(m), a(m);
229
224
  }
230
- const o = t === "light" ? dn : t === "dark" ? on : nn, l = t === "light" ? "Theme: light (click for dark)" : t === "dark" ? "Theme: dark (click for system)" : "Theme: system (click for light)";
225
+ const o = t === "light" ? yn : t === "dark" ? xn : bn, l = t === "light" ? "Theme: light (click for dark)" : t === "dark" ? "Theme: dark (click for system)" : "Theme: system (click for light)";
231
226
  return /* @__PURE__ */ e(
232
- V,
227
+ H,
233
228
  {
234
229
  type: "button",
235
230
  variant: "ghost",
@@ -242,19 +237,19 @@ function hn() {
242
237
  }
243
238
  );
244
239
  }
245
- function pn() {
246
- const { displayPreferences: t, shouldShowElement: n } = qr(), { currentUser: a, userContext: r } = rt(), o = Q(
247
- () => zr(a),
240
+ function kn() {
241
+ const { displayPreferences: t, shouldShowElement: n } = ea(), { currentUser: a, userContext: r } = ot(), o = W(
242
+ () => ta(a),
248
243
  [a]
249
- ), l = Q(() => (u) => o && o[u] !== void 0 && o[u] === !1 ? !1 : n(u), [o, n, t]), m = Q(
244
+ ), l = W(() => (m) => o && o[m] !== void 0 && o[m] === !1 ? !1 : n(m), [o, n, t]), u = W(
250
245
  () => {
251
- var u, g, f, b, c;
246
+ var m, b, f, g, c;
252
247
  return {
253
- canEdit: ((u = r == null ? void 0 : r.permissions) == null ? void 0 : u.canEdit) ?? Jr(a),
254
- canUseFilters: ((g = r == null ? void 0 : r.permissions) == null ? void 0 : g.canEdit) ?? Wr(a),
255
- canManageDashboards: ((f = r == null ? void 0 : r.permissions) == null ? void 0 : f.canCreateDashboard) ?? Qr(a),
256
- canCreateDashboards: ((b = r == null ? void 0 : r.permissions) == null ? void 0 : b.canCreateDashboard) ?? Kr(a),
257
- canAccessVisuals: ((c = r == null ? void 0 : r.permissions) == null ? void 0 : c.canEdit) ?? jr(a)
248
+ canEdit: ((m = r == null ? void 0 : r.permissions) == null ? void 0 : m.canEdit) ?? sa(a),
249
+ canUseFilters: ((b = r == null ? void 0 : r.permissions) == null ? void 0 : b.canEdit) ?? oa(a),
250
+ canManageDashboards: ((f = r == null ? void 0 : r.permissions) == null ? void 0 : f.canCreateDashboard) ?? na(a),
251
+ canCreateDashboards: ((g = r == null ? void 0 : r.permissions) == null ? void 0 : g.canCreateDashboard) ?? aa(a),
252
+ canAccessVisuals: ((c = r == null ? void 0 : r.permissions) == null ? void 0 : c.canEdit) ?? ra(a)
258
253
  };
259
254
  },
260
255
  [a, r]
@@ -262,45 +257,45 @@ function pn() {
262
257
  return {
263
258
  displayPreferences: t,
264
259
  shouldShowElement: l,
265
- permissions: m,
260
+ permissions: u,
266
261
  currentUser: a
267
262
  };
268
263
  }
269
- function fn(t, n = []) {
264
+ function En(t, n = []) {
270
265
  let a = [];
271
- function r(l, m) {
272
- const u = k.createContext(m);
273
- u.displayName = l + "Context";
274
- const g = a.length;
275
- a = [...a, m];
266
+ function r(l, u) {
267
+ const m = E.createContext(u);
268
+ m.displayName = l + "Context";
269
+ const b = a.length;
270
+ a = [...a, u];
276
271
  const f = (c) => {
277
272
  var S;
278
- const { scope: h, children: i, ...x } = c, v = ((S = h == null ? void 0 : h[t]) == null ? void 0 : S[g]) || u, w = k.useMemo(() => x, Object.values(x));
279
- return /* @__PURE__ */ e(v.Provider, { value: w, children: i });
273
+ const { scope: h, children: i, ...x } = c, y = ((S = h == null ? void 0 : h[t]) == null ? void 0 : S[b]) || m, w = E.useMemo(() => x, Object.values(x));
274
+ return /* @__PURE__ */ e(y.Provider, { value: w, children: i });
280
275
  };
281
276
  f.displayName = l + "Provider";
282
- function b(c, h) {
283
- var v;
284
- const i = ((v = h == null ? void 0 : h[t]) == null ? void 0 : v[g]) || u, x = k.useContext(i);
277
+ function g(c, h) {
278
+ var y;
279
+ const i = ((y = h == null ? void 0 : h[t]) == null ? void 0 : y[b]) || m, x = E.useContext(i);
285
280
  if (x) return x;
286
- if (m !== void 0) return m;
281
+ if (u !== void 0) return u;
287
282
  throw new Error(`\`${c}\` must be used within \`${l}\``);
288
283
  }
289
- return [f, b];
284
+ return [f, g];
290
285
  }
291
286
  const o = () => {
292
- const l = a.map((m) => k.createContext(m));
293
- return function(u) {
294
- const g = (u == null ? void 0 : u[t]) || l;
295
- return k.useMemo(
296
- () => ({ [`__scope${t}`]: { ...u, [t]: g } }),
297
- [u, g]
287
+ const l = a.map((u) => E.createContext(u));
288
+ return function(m) {
289
+ const b = (m == null ? void 0 : m[t]) || l;
290
+ return E.useMemo(
291
+ () => ({ [`__scope${t}`]: { ...m, [t]: b } }),
292
+ [m, b]
298
293
  );
299
294
  };
300
295
  };
301
- return o.scopeName = t, [r, bn(o, ...n)];
296
+ return o.scopeName = t, [r, In(o, ...n)];
302
297
  }
303
- function bn(...t) {
298
+ function In(...t) {
304
299
  const n = t[0];
305
300
  if (t.length === 1) return n;
306
301
  const a = () => {
@@ -309,16 +304,16 @@ function bn(...t) {
309
304
  scopeName: o.scopeName
310
305
  }));
311
306
  return function(l) {
312
- const m = r.reduce((u, { useScope: g, scopeName: f }) => {
313
- const c = g(l)[`__scope${f}`];
314
- return { ...u, ...c };
307
+ const u = r.reduce((m, { useScope: b, scopeName: f }) => {
308
+ const c = b(l)[`__scope${f}`];
309
+ return { ...m, ...c };
315
310
  }, {});
316
- return k.useMemo(() => ({ [`__scope${n.scopeName}`]: m }), [m]);
311
+ return E.useMemo(() => ({ [`__scope${n.scopeName}`]: u }), [u]);
317
312
  };
318
313
  };
319
314
  return a.scopeName = n.scopeName, a;
320
315
  }
321
- var gn = [
316
+ var An = [
322
317
  "a",
323
318
  "button",
324
319
  "div",
@@ -336,185 +331,185 @@ var gn = [
336
331
  "span",
337
332
  "svg",
338
333
  "ul"
339
- ], nt = gn.reduce((t, n) => {
340
- const a = Tr(`Primitive.${n}`), r = k.forwardRef((o, l) => {
341
- const { asChild: m, ...u } = o, g = m ? a : n;
342
- return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ e(g, { ...u, ref: l });
334
+ ], it = An.reduce((t, n) => {
335
+ const a = Gr(`Primitive.${n}`), r = E.forwardRef((o, l) => {
336
+ const { asChild: u, ...m } = o, b = u ? a : n;
337
+ return typeof window < "u" && (window[Symbol.for("radix-ui")] = !0), /* @__PURE__ */ e(b, { ...m, ref: l });
343
338
  });
344
339
  return r.displayName = `Primitive.${n}`, { ...t, [n]: r };
345
340
  }, {});
346
- function xn() {
347
- return mn.useSyncExternalStore(
348
- vn,
341
+ function Mn() {
342
+ return Dn.useSyncExternalStore(
343
+ Ln,
349
344
  () => !0,
350
345
  () => !1
351
346
  );
352
347
  }
353
- function vn() {
348
+ function Ln() {
354
349
  return () => {
355
350
  };
356
351
  }
357
- var ot = "Avatar", [yn] = fn(ot), [wn, Zt] = yn(ot), er = k.forwardRef(
352
+ var dt = "Avatar", [Pn] = En(dt), [On, ar] = Pn(dt), nr = E.forwardRef(
358
353
  (t, n) => {
359
- const { __scopeAvatar: a, ...r } = t, [o, l] = k.useState("idle");
354
+ const { __scopeAvatar: a, ...r } = t, [o, l] = E.useState("idle");
360
355
  return /* @__PURE__ */ e(
361
- wn,
356
+ On,
362
357
  {
363
358
  scope: a,
364
359
  imageLoadingStatus: o,
365
360
  onImageLoadingStatusChange: l,
366
- children: /* @__PURE__ */ e(nt.span, { ...r, ref: n })
361
+ children: /* @__PURE__ */ e(it.span, { ...r, ref: n })
367
362
  }
368
363
  );
369
364
  }
370
365
  );
371
- er.displayName = ot;
372
- var tr = "AvatarImage", rr = k.forwardRef(
366
+ nr.displayName = dt;
367
+ var or = "AvatarImage", sr = E.forwardRef(
373
368
  (t, n) => {
374
369
  const { __scopeAvatar: a, src: r, onLoadingStatusChange: o = () => {
375
- }, ...l } = t, m = Zt(tr, a), u = Nn(r, l), g = Fr((f) => {
376
- o(f), m.onImageLoadingStatusChange(f);
370
+ }, ...l } = t, u = ar(or, a), m = _n(r, l), b = Vr((f) => {
371
+ o(f), u.onImageLoadingStatusChange(f);
377
372
  });
378
- return Xe(() => {
379
- u !== "idle" && g(u);
380
- }, [u, g]), u === "loaded" ? /* @__PURE__ */ e(nt.img, { ...l, ref: n, src: r }) : null;
373
+ return Ze(() => {
374
+ m !== "idle" && b(m);
375
+ }, [m, b]), m === "loaded" ? /* @__PURE__ */ e(it.img, { ...l, ref: n, src: r }) : null;
381
376
  }
382
377
  );
383
- rr.displayName = tr;
384
- var ar = "AvatarFallback", nr = k.forwardRef(
378
+ sr.displayName = or;
379
+ var ir = "AvatarFallback", dr = E.forwardRef(
385
380
  (t, n) => {
386
- const { __scopeAvatar: a, delayMs: r, ...o } = t, l = Zt(ar, a), [m, u] = k.useState(r === void 0);
387
- return k.useEffect(() => {
381
+ const { __scopeAvatar: a, delayMs: r, ...o } = t, l = ar(ir, a), [u, m] = E.useState(r === void 0);
382
+ return E.useEffect(() => {
388
383
  if (r !== void 0) {
389
- const g = window.setTimeout(() => u(!0), r);
390
- return () => window.clearTimeout(g);
384
+ const b = window.setTimeout(() => m(!0), r);
385
+ return () => window.clearTimeout(b);
391
386
  }
392
- }, [r]), m && l.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(nt.span, { ...o, ref: n }) : null;
387
+ }, [r]), u && l.imageLoadingStatus !== "loaded" ? /* @__PURE__ */ e(it.span, { ...o, ref: n }) : null;
393
388
  }
394
389
  );
395
- nr.displayName = ar;
396
- function Gt(t, n) {
390
+ dr.displayName = ir;
391
+ function Ht(t, n) {
397
392
  return t ? n ? (t.src !== n && (t.src = n), t.complete && t.naturalWidth > 0 ? "loaded" : "loading") : "error" : "idle";
398
393
  }
399
- function Nn(t, { referrerPolicy: n, crossOrigin: a }) {
400
- const r = xn(), o = k.useRef(null), l = r ? (o.current || (o.current = new window.Image()), o.current) : null, [m, u] = k.useState(
401
- () => Gt(l, t)
394
+ function _n(t, { referrerPolicy: n, crossOrigin: a }) {
395
+ const r = Mn(), o = E.useRef(null), l = r ? (o.current || (o.current = new window.Image()), o.current) : null, [u, m] = E.useState(
396
+ () => Ht(l, t)
402
397
  );
403
- return Xe(() => {
404
- u(Gt(l, t));
405
- }, [l, t]), Xe(() => {
406
- const g = (c) => () => {
407
- u(c);
398
+ return Ze(() => {
399
+ m(Ht(l, t));
400
+ }, [l, t]), Ze(() => {
401
+ const b = (c) => () => {
402
+ m(c);
408
403
  };
409
404
  if (!l) return;
410
- const f = g("loaded"), b = g("error");
411
- return l.addEventListener("load", f), l.addEventListener("error", b), n && (l.referrerPolicy = n), typeof a == "string" && (l.crossOrigin = a), () => {
412
- l.removeEventListener("load", f), l.removeEventListener("error", b);
405
+ const f = b("loaded"), g = b("error");
406
+ return l.addEventListener("load", f), l.addEventListener("error", g), n && (l.referrerPolicy = n), typeof a == "string" && (l.crossOrigin = a), () => {
407
+ l.removeEventListener("load", f), l.removeEventListener("error", g);
413
408
  };
414
- }, [l, a, n]), m;
409
+ }, [l, a, n]), u;
415
410
  }
416
- var or = er, sr = rr, ir = nr;
417
- const dr = k.forwardRef(({ className: t, ...n }, a) => /* @__PURE__ */ e(
418
- or,
411
+ var cr = nr, lr = sr, ur = dr;
412
+ const mr = E.forwardRef(({ className: t, ...n }, a) => /* @__PURE__ */ e(
413
+ cr,
419
414
  {
420
415
  ref: a,
421
- className: xe(
416
+ className: be(
422
417
  "relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",
423
418
  t
424
419
  ),
425
420
  ...n
426
421
  }
427
422
  ));
428
- dr.displayName = or.displayName;
429
- const Sn = k.forwardRef(({ className: t, ...n }, a) => /* @__PURE__ */ e(
430
- sr,
423
+ mr.displayName = cr.displayName;
424
+ const Rn = E.forwardRef(({ className: t, ...n }, a) => /* @__PURE__ */ e(
425
+ lr,
431
426
  {
432
427
  ref: a,
433
- className: xe("aspect-square h-full w-full", t),
428
+ className: be("aspect-square h-full w-full", t),
434
429
  ...n
435
430
  }
436
431
  ));
437
- Sn.displayName = sr.displayName;
438
- const cr = k.forwardRef(({ className: t, ...n }, a) => /* @__PURE__ */ e(
439
- ir,
432
+ Rn.displayName = lr.displayName;
433
+ const hr = E.forwardRef(({ className: t, ...n }, a) => /* @__PURE__ */ e(
434
+ ur,
440
435
  {
441
436
  ref: a,
442
- className: xe(
437
+ className: be(
443
438
  "flex h-full w-full items-center justify-center rounded-full bg-muted",
444
439
  t
445
440
  ),
446
441
  ...n
447
442
  }
448
443
  ));
449
- cr.displayName = ir.displayName;
450
- const Dn = async (t, n, a) => {
444
+ hr.displayName = ur.displayName;
445
+ const Un = async (t, n, a) => {
451
446
  const r = `${t}/management/v1/groups`;
452
- return await qt(r, n, a);
453
- }, Cn = async (t, n, a, r) => {
447
+ return await zt(r, n, a);
448
+ }, Tn = async (t, n, a, r) => {
454
449
  const o = `${t}/management/v1/groups/${a}`;
455
- return tt(o, n, "PATCH", r);
456
- }, kn = async (t, n, a) => {
450
+ return nt(o, n, "PATCH", r);
451
+ }, Fn = async (t, n, a) => {
457
452
  const r = `${t}/management/v1/groups/${a}`;
458
- await tt(r, n, "DELETE");
459
- }, En = async (t, n, a, r) => {
453
+ await nt(r, n, "DELETE");
454
+ }, $n = async (t, n, a, r) => {
460
455
  const o = `${t}/management/v1/groups/${a}/members`;
461
- return await qt(o, n, r);
462
- }, An = async (t, n, a, r) => {
456
+ return await zt(o, n, r);
457
+ }, Bn = async (t, n, a, r) => {
463
458
  const o = `${t}/management/v1/groups/${a}/members`;
464
- await tt(o, n, "DELETE", r);
459
+ await nt(o, n, "DELETE", r);
465
460
  };
466
- function In() {
467
- const { authToken: t, tokenProps: n } = W(), a = ye();
468
- return we({
469
- mutationFn: (r) => Dn(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", r),
461
+ function Gn() {
462
+ const { authToken: t, tokenProps: n } = J(), a = ve();
463
+ return ye({
464
+ mutationFn: (r) => Un(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", r),
470
465
  onSuccess: () => {
471
466
  a.invalidateQueries({ queryKey: ["groups"] }), D.success("Group created successfully");
472
467
  },
473
468
  onError: (r) => {
474
469
  console.error("Failed to create group:", r), D.error("Failed to create group", {
475
- description: ve(r, "Failed to create group")
470
+ description: xe(r, "Failed to create group")
476
471
  });
477
472
  }
478
473
  });
479
474
  }
480
- function Mn() {
481
- const { authToken: t, tokenProps: n } = W(), a = ye();
482
- return we({
475
+ function Vn() {
476
+ const { authToken: t, tokenProps: n } = J(), a = ve();
477
+ return ye({
483
478
  mutationFn: ({
484
479
  groupId: r,
485
480
  data: o
486
- }) => Cn(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", r, o),
481
+ }) => Tn(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", r, o),
487
482
  onSuccess: (r, o) => {
488
483
  a.invalidateQueries({ queryKey: ["group", o.groupId] }), a.invalidateQueries({ queryKey: ["groups"] }), D.success("Group updated successfully");
489
484
  },
490
485
  onError: (r) => {
491
486
  console.error("Failed to update group:", r), D.error("Failed to update group", {
492
- description: ve(r, "Failed to update group")
487
+ description: xe(r, "Failed to update group")
493
488
  });
494
489
  }
495
490
  });
496
491
  }
497
- function Ln() {
498
- const { authToken: t, tokenProps: n } = W(), a = ye();
499
- return we({
500
- mutationFn: (r) => kn(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", r),
492
+ function Hn() {
493
+ const { authToken: t, tokenProps: n } = J(), a = ve();
494
+ return ye({
495
+ mutationFn: (r) => Fn(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", r),
501
496
  onSuccess: (r, o) => {
502
497
  a.invalidateQueries({ queryKey: ["groups"] }), a.removeQueries({ queryKey: ["group", o] }), D.success("Group deleted successfully");
503
498
  },
504
499
  onError: (r) => {
505
500
  console.error("Failed to delete group:", r), D.error("Failed to delete group", {
506
- description: ve(r, "Failed to delete group")
501
+ description: xe(r, "Failed to delete group")
507
502
  });
508
503
  }
509
504
  });
510
505
  }
511
- function Pn() {
512
- const { authToken: t, tokenProps: n } = W(), a = ye();
513
- return we({
506
+ function qn() {
507
+ const { authToken: t, tokenProps: n } = J(), a = ve();
508
+ return ye({
514
509
  mutationFn: ({
515
510
  groupId: r,
516
511
  data: o
517
- }) => En(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", r, o),
512
+ }) => $n(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", r, o),
518
513
  onSuccess: (r, o) => {
519
514
  a.invalidateQueries({ queryKey: ["group", o.groupId] }), a.invalidateQueries({
520
515
  queryKey: ["group-members", o.groupId]
@@ -522,18 +517,18 @@ function Pn() {
522
517
  },
523
518
  onError: (r) => {
524
519
  console.error("Failed to add group members:", r), D.error("Failed to add members", {
525
- description: ve(r, "Failed to add members")
520
+ description: xe(r, "Failed to add members")
526
521
  });
527
522
  }
528
523
  });
529
524
  }
530
- function _n() {
531
- const { authToken: t, tokenProps: n } = W(), a = ye();
532
- return we({
525
+ function jn() {
526
+ const { authToken: t, tokenProps: n } = J(), a = ve();
527
+ return ye({
533
528
  mutationFn: ({
534
529
  groupId: r,
535
530
  data: o
536
- }) => An(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", r, o),
531
+ }) => Bn(n.apiServiceUrl, (t == null ? void 0 : t.accessToken) || "", r, o),
537
532
  onSuccess: (r, o) => {
538
533
  a.invalidateQueries({ queryKey: ["group", o.groupId] }), a.invalidateQueries({
539
534
  queryKey: ["group-members", o.groupId]
@@ -541,41 +536,41 @@ function _n() {
541
536
  },
542
537
  onError: (r) => {
543
538
  console.error("Failed to remove group members:", r), D.error("Failed to remove members", {
544
- description: ve(r, "Failed to remove members")
539
+ description: xe(r, "Failed to remove members")
545
540
  });
546
541
  }
547
542
  });
548
543
  }
549
- const On = [];
550
- function Rn({
544
+ const zn = [];
545
+ function Kn({
551
546
  open: t,
552
547
  onOpenChange: n
553
548
  }) {
554
549
  var p, $, T;
555
- const { tokenProps: a } = W(), { currentUser: r } = rt(), o = (r == null ? void 0 : r.type) === "tenant", l = a == null ? void 0 : a.tenantId, {
556
- groups: m,
557
- isLoading: u,
558
- error: g,
550
+ const { tokenProps: a } = J(), { currentUser: r } = ot(), o = (r == null ? void 0 : r.type) === "tenant", l = a == null ? void 0 : a.tenantId, {
551
+ groups: u,
552
+ isLoading: m,
553
+ error: b,
559
554
  refetch: f
560
- } = Yr({
555
+ } = ia({
561
556
  type: o ? "TENANT_GROUP" : "all",
562
557
  tenantId: o ? l : void 0,
563
558
  includeMembers: !1
564
- }), b = g ? lr(g, "Unable to load groups.") : null, [c, h] = N({ kind: "list" }), [i, x] = N(null), v = Ln();
559
+ }), g = b ? pr(b, "Unable to load groups.") : null, [c, h] = N({ kind: "list" }), [i, x] = N(null), y = Hn();
565
560
  Ue(() => {
566
561
  t || (h({ kind: "list" }), x(null));
567
562
  }, [t]);
568
- const w = c.kind === "members" && m.find((M) => M.id === c.groupId) || null, S = async () => {
563
+ const w = c.kind === "members" && u.find((A) => A.id === c.groupId) || null, S = async () => {
569
564
  if (i)
570
565
  try {
571
- await v.mutateAsync(i.id), x(null), h({ kind: "list" }), f();
566
+ await y.mutateAsync(i.id), x(null), h({ kind: "list" }), f();
572
567
  } catch {
573
568
  }
574
569
  };
575
- return /* @__PURE__ */ e(Xr, { open: t, onOpenChange: n, children: /* @__PURE__ */ s(Zr, { className: "flex max-h-[640px] w-[720px] max-w-[92vw] flex-col gap-0 overflow-hidden p-0", children: [
570
+ return /* @__PURE__ */ e(Qt, { open: t, onOpenChange: n, children: /* @__PURE__ */ s(Wt, { className: "flex max-h-[640px] w-[720px] max-w-[92vw] flex-col gap-0 overflow-hidden p-0", children: [
576
571
  c.kind === "list" ? /* @__PURE__ */ s("div", { className: "shrink-0 border-b border-border px-5 pt-4 pb-3.5", children: [
577
- /* @__PURE__ */ e(Mt, { className: "text-[15px] font-semibold tracking-tight", children: "Group management" }),
578
- /* @__PURE__ */ e(Lt, { className: "mt-1 text-[12px] leading-[1.5] text-muted-foreground", children: "Organize people into groups for shared access." })
572
+ /* @__PURE__ */ e(et, { className: "text-[15px] font-semibold tracking-tight", children: "Group management" }),
573
+ /* @__PURE__ */ e(tt, { className: "mt-1 text-[12px] leading-[1.5] text-muted-foreground", children: "Organize people into groups for shared access." })
579
574
  ] }) : c.kind === "create" ? /* @__PURE__ */ s("div", { className: "flex h-10 shrink-0 items-center gap-1.5 border-b border-border px-5", children: [
580
575
  /* @__PURE__ */ e(
581
576
  "button",
@@ -584,27 +579,27 @@ function Rn({
584
579
  onClick: () => h({ kind: "list" }),
585
580
  "aria-label": "Back",
586
581
  className: "-ml-1 flex h-6 w-6 items-center justify-center rounded-[3px] text-muted-foreground hover:bg-accent hover:text-foreground",
587
- children: /* @__PURE__ */ e(jt, { className: "h-3.5 w-3.5" })
582
+ children: /* @__PURE__ */ e(Jt, { className: "h-3.5 w-3.5" })
588
583
  }
589
584
  ),
590
- /* @__PURE__ */ e(Mt, { className: "truncate text-[13px] font-medium", children: "New group" }),
591
- /* @__PURE__ */ e(Lt, { className: "sr-only", children: "Create a new group to organize members." })
585
+ /* @__PURE__ */ e(et, { className: "truncate text-[13px] font-medium", children: "New group" }),
586
+ /* @__PURE__ */ e(tt, { className: "sr-only", children: "Create a new group to organize members." })
592
587
  ] }) : null,
593
588
  c.kind === "list" && /* @__PURE__ */ e(
594
- Un,
589
+ Qn,
595
590
  {
596
- groups: m,
597
- isLoading: u,
598
- errorMessage: b,
591
+ groups: u,
592
+ isLoading: m,
593
+ errorMessage: g,
599
594
  onRetry: () => f(),
600
595
  currentUserId: r == null ? void 0 : r.id,
601
- onOpenGroup: (M) => h({ kind: "members", groupId: M }),
596
+ onOpenGroup: (A) => h({ kind: "members", groupId: A }),
602
597
  onCreate: () => h({ kind: "create" }),
603
- onDeleteRequest: (M) => x(M)
598
+ onDeleteRequest: (A) => x(A)
604
599
  }
605
600
  ),
606
601
  c.kind === "members" && w && /* @__PURE__ */ e(
607
- $n,
602
+ Yn,
608
603
  {
609
604
  group: w,
610
605
  isTenantViewer: o,
@@ -619,13 +614,13 @@ function Rn({
619
614
  w.id
620
615
  ),
621
616
  c.kind === "create" && /* @__PURE__ */ e(
622
- Bn,
617
+ Xn,
623
618
  {
624
619
  isTenantUser: o,
625
620
  tenantId: l,
626
621
  onCancel: () => h({ kind: "list" }),
627
- onCreated: (M) => {
628
- f(), h({ kind: "members", groupId: M });
622
+ onCreated: (A) => {
623
+ f(), h({ kind: "members", groupId: A });
629
624
  }
630
625
  }
631
626
  ),
@@ -642,7 +637,7 @@ function Rn({
642
637
  {
643
638
  type: "button",
644
639
  onClick: () => x(null),
645
- disabled: v.isPending,
640
+ disabled: y.isPending,
646
641
  className: "h-7 rounded-[5px] px-2.5 text-[12px] font-medium text-foreground/80 hover:bg-background",
647
642
  children: "Cancel"
648
643
  }
@@ -652,10 +647,10 @@ function Rn({
652
647
  {
653
648
  type: "button",
654
649
  onClick: S,
655
- disabled: v.isPending,
650
+ disabled: y.isPending,
656
651
  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",
657
652
  children: [
658
- v.isPending ? /* @__PURE__ */ e(Re, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ e(at, { className: "h-3 w-3" }),
653
+ y.isPending ? /* @__PURE__ */ e(Re, { className: "h-3 w-3 animate-spin" }) : /* @__PURE__ */ e(st, { className: "h-3 w-3" }),
659
654
  "Delete group"
660
655
  ]
661
656
  }
@@ -664,42 +659,42 @@ function Rn({
664
659
  ] })
665
660
  ] }) });
666
661
  }
667
- function Un({
662
+ function Qn({
668
663
  groups: t,
669
664
  isLoading: n,
670
665
  errorMessage: a,
671
666
  onRetry: r,
672
667
  currentUserId: o,
673
668
  onOpenGroup: l,
674
- onCreate: m,
675
- onDeleteRequest: u
669
+ onCreate: u,
670
+ onDeleteRequest: m
676
671
  }) {
677
- const [g, f] = N(""), b = Q(
672
+ const [b, f] = N(""), g = W(
678
673
  () => t.filter(
679
- (c) => !g.trim() || c.name.toLowerCase().includes(g.toLowerCase()) || (c.description || "").toLowerCase().includes(g.toLowerCase())
674
+ (c) => !b.trim() || c.name.toLowerCase().includes(b.toLowerCase()) || (c.description || "").toLowerCase().includes(b.toLowerCase())
680
675
  ),
681
- [t, g]
676
+ [t, b]
682
677
  );
683
678
  return /* @__PURE__ */ s("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
684
679
  /* @__PURE__ */ s("div", { className: "flex shrink-0 items-center gap-2 border-b border-border px-5 py-2.5", children: [
685
680
  /* @__PURE__ */ s("div", { className: "flex flex-1 items-center gap-2 rounded-[5px] border border-border bg-background px-2 focus-within:border-foreground/40", children: [
686
- /* @__PURE__ */ e(Ja, { className: "h-3 w-3 text-muted-foreground" }),
681
+ /* @__PURE__ */ e(dn, { className: "h-3 w-3 text-muted-foreground" }),
687
682
  /* @__PURE__ */ e(
688
683
  "input",
689
684
  {
690
- value: g,
685
+ value: b,
691
686
  onChange: (c) => f(c.target.value),
692
687
  placeholder: "Search groups…",
693
688
  className: "h-7 flex-1 bg-transparent text-[12px] text-foreground placeholder:text-muted-foreground focus:outline-none"
694
689
  }
695
690
  ),
696
- g && /* @__PURE__ */ e(
691
+ b && /* @__PURE__ */ e(
697
692
  "button",
698
693
  {
699
694
  type: "button",
700
695
  onClick: () => f(""),
701
696
  className: "flex h-4 w-4 items-center justify-center rounded-[3px] text-muted-foreground hover:bg-accent hover:text-foreground",
702
- children: /* @__PURE__ */ e(Wt, { className: "h-2.5 w-2.5" })
697
+ children: /* @__PURE__ */ e(Zt, { className: "h-2.5 w-2.5" })
703
698
  }
704
699
  )
705
700
  ] }),
@@ -707,10 +702,10 @@ function Un({
707
702
  "button",
708
703
  {
709
704
  type: "button",
710
- onClick: m,
705
+ onClick: u,
711
706
  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",
712
707
  children: [
713
- /* @__PURE__ */ e(ae, { className: "h-3 w-3" }),
708
+ /* @__PURE__ */ e(re, { className: "h-3 w-3" }),
714
709
  "New group"
715
710
  ]
716
711
  }
@@ -723,35 +718,35 @@ function Un({
723
718
  },
724
719
  c
725
720
  )) }) : a ? /* @__PURE__ */ e(
726
- ur,
721
+ fr,
727
722
  {
728
723
  title: "Can't load groups",
729
724
  message: a,
730
725
  onRetry: r
731
726
  }
732
- ) : b.length === 0 && t.length === 0 ? /* @__PURE__ */ e(Fn, { onCreate: m }) : b.length === 0 ? /* @__PURE__ */ s("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
727
+ ) : g.length === 0 && t.length === 0 ? /* @__PURE__ */ e(Jn, { onCreate: u }) : g.length === 0 ? /* @__PURE__ */ s("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
733
728
  /* @__PURE__ */ s("div", { className: "text-[12px] text-foreground", children: [
734
729
  'No groups match "',
735
- g,
730
+ b,
736
731
  '"'
737
732
  ] }),
738
733
  /* @__PURE__ */ e("div", { className: "text-[11px] text-muted-foreground", children: "Try a different search." })
739
- ] }) : b.map((c) => {
734
+ ] }) : g.map((c) => {
740
735
  var h;
741
736
  return /* @__PURE__ */ e(
742
- Tn,
737
+ Wn,
743
738
  {
744
739
  group: c,
745
740
  canDelete: ((h = c.permissions) == null ? void 0 : h.canDelete) ?? c.createdBy === o,
746
741
  onClick: () => l(c.id),
747
- onDelete: () => u(c)
742
+ onDelete: () => m(c)
748
743
  },
749
744
  c.id
750
745
  );
751
746
  }) })
752
747
  ] });
753
748
  }
754
- function Tn({
749
+ function Wn({
755
750
  group: t,
756
751
  canDelete: n,
757
752
  onClick: a,
@@ -759,7 +754,7 @@ function Tn({
759
754
  }) {
760
755
  let o = "";
761
756
  try {
762
- o = Yt(new Date(t.createdAt), "MMM d, yyyy");
757
+ o = tr(new Date(t.createdAt), "MMM d, yyyy");
763
758
  } catch {
764
759
  o = "";
765
760
  }
@@ -770,12 +765,12 @@ function Tn({
770
765
  onClick: a,
771
766
  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",
772
767
  children: [
773
- /* @__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(ra, { className: "h-3.5 w-3.5" }) }),
768
+ /* @__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(la, { className: "h-3.5 w-3.5" }) }),
774
769
  /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
775
770
  /* @__PURE__ */ e("div", { className: "truncate text-[13px] font-medium text-foreground", children: t.name }),
776
771
  /* @__PURE__ */ s("div", { className: "mt-0.5 flex items-center gap-2 text-[11px] text-muted-foreground", children: [
777
772
  /* @__PURE__ */ s("span", { className: "inline-flex items-center gap-1", children: [
778
- /* @__PURE__ */ e(Xt, { className: "h-2.5 w-2.5" }),
773
+ /* @__PURE__ */ e(rr, { className: "h-2.5 w-2.5" }),
779
774
  t.memberCount,
780
775
  " member",
781
776
  t.memberCount === 1 ? "" : "s"
@@ -783,7 +778,7 @@ function Tn({
783
778
  o && /* @__PURE__ */ s(F, { children: [
784
779
  /* @__PURE__ */ e("span", { className: "text-border", children: "·" }),
785
780
  /* @__PURE__ */ s("span", { className: "inline-flex items-center gap-1", children: [
786
- /* @__PURE__ */ e(Qt, { className: "h-2.5 w-2.5" }),
781
+ /* @__PURE__ */ e(Xt, { className: "h-2.5 w-2.5" }),
787
782
  o
788
783
  ] })
789
784
  ] }),
@@ -807,18 +802,18 @@ function Tn({
807
802
  },
808
803
  "aria-label": `Delete ${t.name}`,
809
804
  className: "flex h-6 w-6 items-center justify-center rounded-[3px] text-muted-foreground hover:bg-accent hover:text-foreground",
810
- children: /* @__PURE__ */ e(at, { className: "h-3 w-3" })
805
+ children: /* @__PURE__ */ e(st, { className: "h-3 w-3" })
811
806
  }
812
807
  ),
813
- /* @__PURE__ */ e(Ya, { className: "h-3.5 w-3.5 text-muted-foreground" })
808
+ /* @__PURE__ */ e(cn, { className: "h-3.5 w-3.5 text-muted-foreground" })
814
809
  ] })
815
810
  ]
816
811
  }
817
812
  );
818
813
  }
819
- function Fn({ onCreate: t }) {
814
+ function Jn({ onCreate: t }) {
820
815
  return /* @__PURE__ */ s("div", { className: "flex h-full flex-col items-center justify-center gap-2 py-12 text-center", children: [
821
- /* @__PURE__ */ e("div", { className: "flex h-9 w-9 items-center justify-center rounded-full border border-border bg-muted/40 text-muted-foreground", children: /* @__PURE__ */ e(Kt, { className: "h-4 w-4" }) }),
816
+ /* @__PURE__ */ e("div", { className: "flex h-9 w-9 items-center justify-center rounded-full border border-border bg-muted/40 text-muted-foreground", children: /* @__PURE__ */ e(Yt, { className: "h-4 w-4" }) }),
822
817
  /* @__PURE__ */ e("div", { className: "text-[13px] font-medium text-foreground", children: "No groups yet" }),
823
818
  /* @__PURE__ */ e("div", { className: "max-w-[320px] text-[11.5px] leading-[1.55] text-muted-foreground", children: "Groups let you grant shared access to dashboards. Create one and add members." }),
824
819
  /* @__PURE__ */ s(
@@ -828,89 +823,89 @@ function Fn({ onCreate: t }) {
828
823
  onClick: t,
829
824
  className: "mt-1 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",
830
825
  children: [
831
- /* @__PURE__ */ e(ae, { className: "h-3 w-3" }),
826
+ /* @__PURE__ */ e(re, { className: "h-3 w-3" }),
832
827
  "New group"
833
828
  ]
834
829
  }
835
830
  )
836
831
  ] });
837
832
  }
838
- function $n({
833
+ function Yn({
839
834
  group: t,
840
835
  isTenantViewer: n,
841
836
  canEdit: a,
842
837
  canDelete: r,
843
838
  canManageMembers: o,
844
839
  onBack: l,
845
- onMembersChanged: m,
846
- onUpdated: u,
847
- onRequestDelete: g
840
+ onMembersChanged: u,
841
+ onUpdated: m,
842
+ onRequestDelete: b
848
843
  }) {
849
844
  const {
850
845
  data: f,
851
- isLoading: b,
846
+ isLoading: g,
852
847
  error: c,
853
848
  refetch: h
854
- } = ea(t.id), i = (f == null ? void 0 : f.members) ?? On, x = c ? lr(c, "Unable to load members for this group.") : null, v = t.type === "TENANT_GROUP" ? "tenant" : "organization", { users: w } = ta({
855
- type: v,
849
+ } = da(t.id), i = (f == null ? void 0 : f.members) ?? zn, x = c ? pr(c, "Unable to load members for this group.") : null, y = t.type === "TENANT_GROUP" ? "tenant" : "organization", { users: w } = ca({
850
+ type: y,
856
851
  tenantId: t.tenantId || void 0,
857
852
  active: !0,
858
853
  limit: 200
859
- }), S = Q(
860
- () => new Set(i.map((y) => y.userId)),
854
+ }), S = W(
855
+ () => new Set(i.map((v) => v.userId)),
861
856
  [i]
862
- ), p = Pn(), $ = _n(), T = Mn(), [M, A] = N(!1), [E, J] = N(t.name), [Te, q] = N(!1), [oe, z] = N(t.description || ""), [se, ie] = N(""), [Ne, Y] = N(!1), Fe = Q(() => {
863
- const y = se.trim().toLowerCase();
857
+ ), p = qn(), $ = jn(), T = Vn(), [A, I] = N(!1), [k, Y] = N(t.name), [Te, q] = N(!1), [ne, j] = N(t.description || ""), [oe, se] = N(""), [Fe, ie] = N(!1), we = W(() => {
858
+ const v = oe.trim().toLowerCase();
864
859
  return w.filter((R) => !S.has(R.id)).filter(
865
- (R) => !y || (R.name || "").toLowerCase().includes(y) || (R.email || "").toLowerCase().includes(y)
860
+ (R) => !v || (R.name || "").toLowerCase().includes(v) || (R.email || "").toLowerCase().includes(v)
866
861
  ).slice(0, 50);
867
- }, [w, S, se]), de = async () => {
868
- const y = E.trim();
869
- if (A(!1), y.length >= 3 && y !== t.name)
862
+ }, [w, S, oe]), X = async () => {
863
+ const v = k.trim();
864
+ if (I(!1), v.length >= 3 && v !== t.name)
870
865
  try {
871
866
  await T.mutateAsync({
872
867
  groupId: t.id,
873
- data: { name: y }
874
- }), u();
868
+ data: { name: v }
869
+ }), m();
875
870
  } catch {
876
871
  }
877
- }, Se = async () => {
878
- const y = oe.trim();
879
- if (q(!1), y !== (t.description || ""))
872
+ }, Ne = async () => {
873
+ const v = ne.trim();
874
+ if (q(!1), v !== (t.description || ""))
880
875
  try {
881
876
  await T.mutateAsync({
882
877
  groupId: t.id,
883
- data: { description: y }
884
- }), u();
878
+ data: { description: v }
879
+ }), m();
885
880
  } catch {
886
881
  }
887
- }, X = async (y) => {
882
+ }, Se = async (v) => {
888
883
  if (o) {
889
- ie(""), Y(!1);
884
+ se(""), ie(!1);
890
885
  try {
891
886
  await p.mutateAsync({
892
887
  groupId: t.id,
893
888
  data: {
894
- userIds: [y.id],
895
- userType: v === "tenant" ? "tenant" : "org"
889
+ userIds: [v.id],
890
+ userType: y === "tenant" ? "tenant" : "org"
896
891
  }
897
- }), h(), m();
892
+ }), h(), u();
898
893
  } catch {
899
894
  }
900
895
  }
901
- }, Z = async (y) => {
896
+ }, $e = async (v) => {
902
897
  if (o)
903
898
  try {
904
899
  await $.mutateAsync({
905
900
  groupId: t.id,
906
- data: { userIds: [y] }
907
- }), h(), m();
901
+ data: { userIds: [v] }
902
+ }), h(), u();
908
903
  } catch {
909
904
  }
910
905
  };
911
906
  let B = "";
912
907
  try {
913
- B = Yt(new Date(t.createdAt), "MMM d, yyyy");
908
+ B = tr(new Date(t.createdAt), "MMM d, yyyy");
914
909
  } catch {
915
910
  B = "";
916
911
  }
@@ -923,18 +918,18 @@ function $n({
923
918
  onClick: l,
924
919
  "aria-label": "Back",
925
920
  className: "-ml-1 flex h-6 w-6 items-center justify-center rounded-[3px] text-muted-foreground hover:bg-accent hover:text-foreground",
926
- children: /* @__PURE__ */ e(jt, { className: "h-3.5 w-3.5" })
921
+ children: /* @__PURE__ */ e(Jt, { className: "h-3.5 w-3.5" })
927
922
  }
928
923
  ),
929
- M ? /* @__PURE__ */ e(
924
+ A ? /* @__PURE__ */ e(
930
925
  "input",
931
926
  {
932
927
  autoFocus: !0,
933
- value: E,
934
- onChange: (y) => J(y.target.value),
935
- onBlur: de,
936
- onKeyDown: (y) => {
937
- y.key === "Enter" && de(), y.key === "Escape" && (J(t.name), A(!1));
928
+ value: k,
929
+ onChange: (v) => Y(v.target.value),
930
+ onBlur: X,
931
+ onKeyDown: (v) => {
932
+ v.key === "Enter" && X(), v.key === "Escape" && (Y(t.name), I(!1));
938
933
  },
939
934
  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"
940
935
  }
@@ -943,7 +938,7 @@ function $n({
943
938
  {
944
939
  type: "button",
945
940
  onClick: () => {
946
- a && (J(t.name), A(!0));
941
+ a && (Y(t.name), I(!0));
947
942
  },
948
943
  title: a ? "Click to rename" : t.name,
949
944
  disabled: !a,
@@ -952,7 +947,7 @@ function $n({
952
947
  }
953
948
  ),
954
949
  /* @__PURE__ */ s("span", { className: "ml-1 inline-flex shrink-0 items-center gap-1 text-[10.5px] text-muted-foreground", children: [
955
- /* @__PURE__ */ e(Xt, { className: "h-2.5 w-2.5" }),
950
+ /* @__PURE__ */ e(rr, { className: "h-2.5 w-2.5" }),
956
951
  i.length,
957
952
  " member",
958
953
  i.length === 1 ? "" : "s"
@@ -964,11 +959,11 @@ function $n({
964
959
  {
965
960
  autoFocus: !0,
966
961
  rows: 2,
967
- value: oe,
968
- onChange: (y) => z(y.target.value),
962
+ value: ne,
963
+ onChange: (v) => j(v.target.value),
969
964
  maxLength: 200,
970
- onKeyDown: (y) => {
971
- y.key === "Escape" && (z(t.description || ""), q(!1)), y.key === "Enter" && (y.metaKey || y.ctrlKey) && Se();
965
+ onKeyDown: (v) => {
966
+ v.key === "Escape" && (j(t.description || ""), q(!1)), v.key === "Enter" && (v.metaKey || v.ctrlKey) && Ne();
972
967
  },
973
968
  placeholder: "What is this group for?",
974
969
  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"
@@ -976,7 +971,7 @@ function $n({
976
971
  ),
977
972
  /* @__PURE__ */ s("div", { className: "mt-1.5 flex items-center justify-between", children: [
978
973
  /* @__PURE__ */ s("span", { className: "text-[10.5px] text-muted-foreground", children: [
979
- oe.length,
974
+ ne.length,
980
975
  "/200 · Esc to cancel · ⌘↩ to save"
981
976
  ] }),
982
977
  /* @__PURE__ */ s("div", { className: "flex items-center gap-1.5", children: [
@@ -985,7 +980,7 @@ function $n({
985
980
  {
986
981
  type: "button",
987
982
  onClick: () => {
988
- z(t.description || ""), q(!1);
983
+ j(t.description || ""), q(!1);
989
984
  },
990
985
  className: "h-6 rounded-[5px] px-2 text-[11px] font-medium text-foreground/80 hover:bg-accent",
991
986
  children: "Cancel"
@@ -995,7 +990,7 @@ function $n({
995
990
  "button",
996
991
  {
997
992
  type: "button",
998
- onClick: Se,
993
+ onClick: Ne,
999
994
  className: "inline-flex h-6 items-center rounded-[5px] bg-foreground px-2 text-[11px] font-medium text-background hover:opacity-90",
1000
995
  children: "Save"
1001
996
  }
@@ -1007,7 +1002,7 @@ function $n({
1007
1002
  {
1008
1003
  type: "button",
1009
1004
  onClick: () => {
1010
- a && (z(t.description || ""), q(!0));
1005
+ a && (j(t.description || ""), q(!0));
1011
1006
  },
1012
1007
  disabled: !a,
1013
1008
  title: a ? "Click to edit description" : void 0,
@@ -1022,26 +1017,26 @@ function $n({
1022
1017
  }
1023
1018
  ) }),
1024
1019
  o && /* @__PURE__ */ e(
1025
- Gn,
1020
+ Zn,
1026
1021
  {
1027
- query: se,
1028
- setQuery: ie,
1029
- open: Ne,
1030
- setOpen: Y,
1031
- candidates: Fe,
1022
+ query: oe,
1023
+ setQuery: se,
1024
+ open: Fe,
1025
+ setOpen: ie,
1026
+ candidates: we,
1032
1027
  showKindChip: !n,
1033
- onAdd: X,
1028
+ onAdd: Se,
1034
1029
  busy: p.isPending
1035
1030
  }
1036
1031
  ),
1037
- /* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto", children: b ? /* @__PURE__ */ e("div", { className: "space-y-px p-3", children: [1, 2, 3].map((y) => /* @__PURE__ */ e(
1032
+ /* @__PURE__ */ e("div", { className: "flex-1 overflow-y-auto", children: g ? /* @__PURE__ */ e("div", { className: "space-y-px p-3", children: [1, 2, 3].map((v) => /* @__PURE__ */ e(
1038
1033
  "div",
1039
1034
  {
1040
1035
  className: "h-10 animate-pulse rounded-[4px] bg-muted/60"
1041
1036
  },
1042
- y
1037
+ v
1043
1038
  )) }) : x ? /* @__PURE__ */ e(
1044
- ur,
1039
+ fr,
1045
1040
  {
1046
1041
  title: "Can't load members",
1047
1042
  message: x,
@@ -1050,74 +1045,74 @@ function $n({
1050
1045
  ) : i.length === 0 ? /* @__PURE__ */ s("div", { className: "flex h-full flex-col items-center justify-center gap-1 py-10 text-center", children: [
1051
1046
  /* @__PURE__ */ e("div", { className: "text-[12px] text-foreground", children: "No members yet" }),
1052
1047
  /* @__PURE__ */ e("div", { className: "text-[11px] text-muted-foreground", children: o ? "Search above to add people to this group." : "This group does not have any members." })
1053
- ] }) : i.map((y) => {
1054
- var R, ce, j, De, le, I;
1048
+ ] }) : i.map((v) => {
1049
+ var R, de, z, ce, K, De;
1055
1050
  return /* @__PURE__ */ s(
1056
1051
  "div",
1057
1052
  {
1058
1053
  className: "group flex items-center gap-2 border-b border-border/60 px-5 py-2",
1059
1054
  children: [
1060
- /* @__PURE__ */ e(mr, { name: ((R = y.user) == null ? void 0 : R.name) || ((ce = y.user) == null ? void 0 : ce.email) || "?" }),
1055
+ /* @__PURE__ */ e(gr, { name: ((R = v.user) == null ? void 0 : R.name) || ((de = v.user) == null ? void 0 : de.email) || "?" }),
1061
1056
  /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
1062
- /* @__PURE__ */ e("div", { className: "truncate text-[12.5px] font-medium text-foreground", children: ((j = y.user) == null ? void 0 : j.name) || ((De = y.user) == null ? void 0 : De.email) || "Unknown" }),
1063
- ((le = y.user) == null ? void 0 : le.email) && y.user.name && /* @__PURE__ */ e("div", { className: "truncate text-[10.5px] text-muted-foreground", children: y.user.email })
1057
+ /* @__PURE__ */ e("div", { className: "truncate text-[12.5px] font-medium text-foreground", children: ((z = v.user) == null ? void 0 : z.name) || ((ce = v.user) == null ? void 0 : ce.email) || "Unknown" }),
1058
+ ((K = v.user) == null ? void 0 : K.email) && v.user.name && /* @__PURE__ */ e("div", { className: "truncate text-[10.5px] text-muted-foreground", children: v.user.email })
1064
1059
  ] }),
1065
- !n && /* @__PURE__ */ e("span", { className: "text-[10px] uppercase tracking-[0.06em] text-muted-foreground", children: y.userType }),
1060
+ !n && /* @__PURE__ */ e("span", { className: "text-[10px] uppercase tracking-[0.06em] text-muted-foreground", children: v.userType }),
1066
1061
  /* @__PURE__ */ e(
1067
1062
  "button",
1068
1063
  {
1069
1064
  type: "button",
1070
- onClick: () => Z(y.userId),
1065
+ onClick: () => $e(v.userId),
1071
1066
  disabled: !o || $.isPending,
1072
- "aria-label": `Remove ${((I = y.user) == null ? void 0 : I.name) || "member"}`,
1067
+ "aria-label": `Remove ${((De = v.user) == null ? void 0 : De.name) || "member"}`,
1073
1068
  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",
1074
- children: /* @__PURE__ */ e(Wt, { className: "h-3 w-3" })
1069
+ children: /* @__PURE__ */ e(Zt, { className: "h-3 w-3" })
1075
1070
  }
1076
1071
  )
1077
1072
  ]
1078
1073
  },
1079
- y.id
1074
+ v.id
1080
1075
  );
1081
1076
  }) }),
1082
1077
  r && /* @__PURE__ */ e("div", { className: "flex shrink-0 items-center justify-end gap-1.5 border-t border-border bg-muted/30 px-5 py-2.5", children: /* @__PURE__ */ s(
1083
1078
  "button",
1084
1079
  {
1085
1080
  type: "button",
1086
- onClick: g,
1081
+ onClick: b,
1087
1082
  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",
1088
1083
  children: [
1089
- /* @__PURE__ */ e(at, { className: "h-3 w-3" }),
1084
+ /* @__PURE__ */ e(st, { className: "h-3 w-3" }),
1090
1085
  "Delete group"
1091
1086
  ]
1092
1087
  }
1093
1088
  ) })
1094
1089
  ] });
1095
1090
  }
1096
- function Bn({
1091
+ function Xn({
1097
1092
  isTenantUser: t,
1098
1093
  tenantId: n,
1099
1094
  onCancel: a,
1100
1095
  onCreated: r
1101
1096
  }) {
1102
- const [o, l] = N(""), [m, u] = N(""), [g, f] = N(null), b = In(), c = o.trim().length >= 3 && o.trim().length <= 50, h = async () => {
1097
+ const [o, l] = N(""), [u, m] = N(""), [b, f] = N(null), g = Gn(), c = o.trim().length >= 3 && o.trim().length <= 50, h = async () => {
1103
1098
  if (!c) return;
1104
1099
  f(null);
1105
1100
  const i = {
1106
1101
  name: o.trim(),
1107
- description: m.trim() || void 0,
1102
+ description: u.trim() || void 0,
1108
1103
  type: t ? "TENANT_GROUP" : "ORG_GROUP",
1109
1104
  ...t && n ? { tenantId: n } : {}
1110
1105
  };
1111
1106
  try {
1112
- const x = await b.mutateAsync(i), v = x == null ? void 0 : x.id;
1113
- v ? r(v) : a();
1107
+ const x = await g.mutateAsync(i), y = x == null ? void 0 : x.id;
1108
+ y ? r(y) : a();
1114
1109
  } catch (x) {
1115
1110
  f(x instanceof Error ? x.message : "Failed to create group");
1116
1111
  }
1117
1112
  };
1118
1113
  return /* @__PURE__ */ s("div", { className: "flex flex-1 flex-col overflow-hidden", children: [
1119
1114
  /* @__PURE__ */ s("div", { className: "flex-1 overflow-y-auto px-5 py-4", children: [
1120
- /* @__PURE__ */ e(Ht, { children: "Name" }),
1115
+ /* @__PURE__ */ e(qt, { children: "Name" }),
1121
1116
  /* @__PURE__ */ e(
1122
1117
  "input",
1123
1118
  {
@@ -1131,24 +1126,24 @@ function Bn({
1131
1126
  ),
1132
1127
  /* @__PURE__ */ e("div", { className: "mt-1 text-[10.5px] text-muted-foreground", children: "3–50 characters." }),
1133
1128
  /* @__PURE__ */ s("div", { className: "mt-4", children: [
1134
- /* @__PURE__ */ e(Ht, { children: "Description (optional)" }),
1129
+ /* @__PURE__ */ e(qt, { children: "Description (optional)" }),
1135
1130
  /* @__PURE__ */ e(
1136
1131
  "textarea",
1137
1132
  {
1138
1133
  rows: 2,
1139
- value: m,
1140
- onChange: (i) => u(i.target.value),
1134
+ value: u,
1135
+ onChange: (i) => m(i.target.value),
1141
1136
  maxLength: 200,
1142
1137
  placeholder: "What is this group for?",
1143
1138
  className: "mt-1 block w-full resize-none rounded-[5px] border border-border bg-background px-2 py-1.5 text-[12px] text-foreground placeholder:text-muted-foreground focus:border-foreground/40 focus:outline-none"
1144
1139
  }
1145
1140
  ),
1146
1141
  /* @__PURE__ */ s("div", { className: "mt-1 flex justify-end text-[10.5px] text-muted-foreground", children: [
1147
- m.length,
1142
+ u.length,
1148
1143
  "/200"
1149
1144
  ] })
1150
1145
  ] }),
1151
- g && /* @__PURE__ */ e("div", { className: "mt-3 rounded-[5px] border border-rose-200 bg-rose-50 px-2 py-1.5 text-[11.5px] text-rose-700 dark:border-rose-900/60 dark:bg-rose-950/30 dark:text-rose-300", children: g })
1146
+ b && /* @__PURE__ */ e("div", { className: "mt-3 rounded-[5px] border border-rose-200 bg-rose-50 px-2 py-1.5 text-[11.5px] text-rose-700 dark:border-rose-900/60 dark:bg-rose-950/30 dark:text-rose-300", children: b })
1152
1147
  ] }),
1153
1148
  /* @__PURE__ */ s("div", { className: "flex shrink-0 items-center justify-end gap-1.5 border-t border-border bg-muted/30 px-5 py-2.5", children: [
1154
1149
  /* @__PURE__ */ e(
@@ -1156,7 +1151,7 @@ function Bn({
1156
1151
  {
1157
1152
  type: "button",
1158
1153
  onClick: a,
1159
- disabled: b.isPending,
1154
+ disabled: g.isPending,
1160
1155
  className: "h-7 rounded-[5px] px-2.5 text-[12px] font-medium text-foreground/80 hover:bg-accent",
1161
1156
  children: "Cancel"
1162
1157
  }
@@ -1166,13 +1161,13 @@ function Bn({
1166
1161
  {
1167
1162
  type: "button",
1168
1163
  onClick: h,
1169
- disabled: !c || b.isPending,
1164
+ disabled: !c || g.isPending,
1170
1165
  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",
1171
- children: b.isPending ? /* @__PURE__ */ s(F, { children: [
1166
+ children: g.isPending ? /* @__PURE__ */ s(F, { children: [
1172
1167
  /* @__PURE__ */ e(Re, { className: "h-3 w-3 animate-spin" }),
1173
1168
  "Creating…"
1174
1169
  ] }) : /* @__PURE__ */ s(F, { children: [
1175
- /* @__PURE__ */ e(ae, { className: "h-3 w-3" }),
1170
+ /* @__PURE__ */ e(re, { className: "h-3 w-3" }),
1176
1171
  "Create group"
1177
1172
  ] })
1178
1173
  }
@@ -1180,30 +1175,30 @@ function Bn({
1180
1175
  ] })
1181
1176
  ] });
1182
1177
  }
1183
- function Gn({
1178
+ function Zn({
1184
1179
  query: t,
1185
1180
  setQuery: n,
1186
1181
  open: a,
1187
1182
  setOpen: r,
1188
1183
  candidates: o,
1189
1184
  showKindChip: l,
1190
- onAdd: m,
1191
- busy: u
1185
+ onAdd: u,
1186
+ busy: m
1192
1187
  }) {
1193
- const g = Ft(null), f = Ft(null), [b, c] = N(null);
1194
- Fa(() => {
1188
+ const b = Bt(null), f = Bt(null), [g, c] = N(null);
1189
+ Wa(() => {
1195
1190
  if (!a) {
1196
1191
  c(null);
1197
1192
  return;
1198
1193
  }
1199
1194
  const i = () => {
1200
- const x = g.current;
1195
+ const x = b.current;
1201
1196
  if (!x) return;
1202
- const v = x.getBoundingClientRect(), w = 240, p = window.innerHeight - v.bottom < w + 16 && v.top > w;
1197
+ const y = x.getBoundingClientRect(), w = 240, p = window.innerHeight - y.bottom < w + 16 && y.top > w;
1203
1198
  c({
1204
- left: v.left,
1205
- top: p ? v.top - 6 : v.bottom + 6,
1206
- width: v.width,
1199
+ left: y.left,
1200
+ top: p ? y.top - 6 : y.bottom + 6,
1201
+ width: y.width,
1207
1202
  above: p
1208
1203
  });
1209
1204
  };
@@ -1214,20 +1209,20 @@ function Gn({
1214
1209
  if (!a) return;
1215
1210
  const i = (x) => {
1216
1211
  var w, S;
1217
- const v = x.target;
1218
- (w = g.current) != null && w.contains(v) || (S = f.current) != null && S.contains(v) || r(!1);
1212
+ const y = x.target;
1213
+ (w = b.current) != null && w.contains(y) || (S = f.current) != null && S.contains(y) || r(!1);
1219
1214
  };
1220
1215
  return document.addEventListener("mousedown", i), () => document.removeEventListener("mousedown", i);
1221
1216
  }, [a, r]);
1222
- const h = a && o.length > 0 && b;
1217
+ const h = a && o.length > 0 && g;
1223
1218
  return /* @__PURE__ */ s("div", { className: "shrink-0 border-b border-border px-5 py-2.5", children: [
1224
1219
  /* @__PURE__ */ s(
1225
1220
  "div",
1226
1221
  {
1227
- ref: g,
1222
+ ref: b,
1228
1223
  className: "flex items-center gap-2 rounded-[5px] border border-border bg-background px-2 focus-within:border-foreground/40",
1229
1224
  children: [
1230
- /* @__PURE__ */ e(cn, { className: "h-3 w-3 text-muted-foreground" }),
1225
+ /* @__PURE__ */ e(wn, { className: "h-3 w-3 text-muted-foreground" }),
1231
1226
  /* @__PURE__ */ e(
1232
1227
  "input",
1233
1228
  {
@@ -1237,34 +1232,34 @@ function Gn({
1237
1232
  },
1238
1233
  onFocus: () => r(!0),
1239
1234
  placeholder: "Add a member by name or email…",
1240
- disabled: u,
1235
+ disabled: m,
1241
1236
  className: "h-7 flex-1 bg-transparent text-[12px] text-foreground placeholder:text-muted-foreground focus:outline-none disabled:cursor-not-allowed"
1242
1237
  }
1243
1238
  )
1244
1239
  ]
1245
1240
  }
1246
1241
  ),
1247
- h && typeof document < "u" && $a(
1242
+ h && typeof document < "u" && sn(
1248
1243
  /* @__PURE__ */ e(
1249
1244
  "div",
1250
1245
  {
1251
1246
  ref: f,
1252
1247
  style: {
1253
1248
  position: "fixed",
1254
- left: b.left,
1255
- top: b.top,
1256
- width: b.width,
1257
- transform: b.above ? "translateY(-100%)" : void 0
1249
+ left: g.left,
1250
+ top: g.top,
1251
+ width: g.width,
1252
+ transform: g.above ? "translateY(-100%)" : void 0
1258
1253
  },
1259
1254
  className: "z-[60] max-h-[240px] overflow-y-auto rounded-[5px] border border-border bg-background shadow-[0_8px_24px_-12px_rgba(0,0,0,0.18)]",
1260
1255
  children: o.map((i) => /* @__PURE__ */ s(
1261
1256
  "button",
1262
1257
  {
1263
1258
  type: "button",
1264
- onClick: () => m(i),
1259
+ onClick: () => u(i),
1265
1260
  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",
1266
1261
  children: [
1267
- /* @__PURE__ */ e(mr, { name: i.name || i.email || "?" }),
1262
+ /* @__PURE__ */ e(gr, { name: i.name || i.email || "?" }),
1268
1263
  /* @__PURE__ */ s("div", { className: "min-w-0 flex-1", children: [
1269
1264
  /* @__PURE__ */ e("div", { className: "truncate text-[12px] font-medium text-foreground", children: i.name || i.email || "Unknown" }),
1270
1265
  i.email && i.name && /* @__PURE__ */ e("div", { className: "truncate text-[10.5px] text-muted-foreground", children: i.email })
@@ -1280,7 +1275,7 @@ function Gn({
1280
1275
  )
1281
1276
  ] });
1282
1277
  }
1283
- function lr(t, n) {
1278
+ function pr(t, n) {
1284
1279
  if (!t) return n;
1285
1280
  if (t instanceof Error) {
1286
1281
  const a = t.message || "", r = a.match(/\{[\s\S]*"error"\s*:\s*"([^"]+)"[\s\S]*\}/);
@@ -1288,7 +1283,7 @@ function lr(t, n) {
1288
1283
  }
1289
1284
  return typeof t == "string" ? t : n;
1290
1285
  }
1291
- function ur({
1286
+ function fr({
1292
1287
  title: t,
1293
1288
  message: n,
1294
1289
  onRetry: a
@@ -1307,30 +1302,66 @@ function ur({
1307
1302
  )
1308
1303
  ] });
1309
1304
  }
1310
- function Ht({ children: t }) {
1305
+ function qt({ children: t }) {
1311
1306
  return /* @__PURE__ */ e("label", { className: "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground", children: t });
1312
1307
  }
1313
- function mr({ name: t }) {
1308
+ function gr({ name: t }) {
1314
1309
  const n = t.split(" ").map((a) => a[0]).filter(Boolean).slice(0, 2).join("").toUpperCase();
1315
- return /* @__PURE__ */ e(dr, { className: "h-6 w-6 shrink-0", children: /* @__PURE__ */ e(cr, { className: "text-[9px] font-semibold", children: n || "?" }) });
1310
+ return /* @__PURE__ */ e(mr, { className: "h-6 w-6 shrink-0", children: /* @__PURE__ */ e(hr, { className: "text-[9px] font-semibold", children: n || "?" }) });
1311
+ }
1312
+ const eo = "text-[10px] font-medium uppercase tracking-[0.08em] text-muted-foreground";
1313
+ function to({
1314
+ open: t,
1315
+ onOpenChange: n
1316
+ }) {
1317
+ const a = C(
1318
+ (o) => {
1319
+ var l, u;
1320
+ return un({
1321
+ dashboardDefault: (u = (l = o.dashboard) == null ? void 0 : l.exportDefaults) == null ? void 0 : u.csvEncoding
1322
+ });
1323
+ }
1324
+ ), { setDashboardExportDefaults: r } = C(
1325
+ (o) => o.actions
1326
+ );
1327
+ return /* @__PURE__ */ e(Qt, { open: t, onOpenChange: n, children: /* @__PURE__ */ s(Wt, { className: "rounded-control border-border/60 sm:max-w-[440px] sm:rounded-control", children: [
1328
+ /* @__PURE__ */ s(ua, { children: [
1329
+ /* @__PURE__ */ e(et, { className: "text-[15px]", children: "Download settings" }),
1330
+ /* @__PURE__ */ e(tt, { 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." })
1331
+ ] }),
1332
+ /* @__PURE__ */ s("div", { className: "space-y-2", children: [
1333
+ /* @__PURE__ */ e(Hr, { htmlFor: "dashboard-csv-encoding", className: eo, children: "CSV encoding" }),
1334
+ /* @__PURE__ */ s(
1335
+ qr,
1336
+ {
1337
+ value: a,
1338
+ onValueChange: (o) => r({ csvEncoding: o }),
1339
+ children: [
1340
+ /* @__PURE__ */ e(jr, { id: "dashboard-csv-encoding", size: "sm", children: /* @__PURE__ */ e(zr, {}) }),
1341
+ /* @__PURE__ */ e(Kr, { children: ma.map((o) => /* @__PURE__ */ e(Qr, { value: o.value, children: o.label }, o.value)) })
1342
+ ]
1343
+ }
1344
+ )
1345
+ ] })
1346
+ ] }) });
1316
1347
  }
1317
- function be(t, n, a) {
1318
- var l, m;
1348
+ function fe(t, n, a) {
1349
+ var l, u;
1319
1350
  const r = (t.controls || []).find(
1320
- (u) => u.id === a
1351
+ (m) => m.id === a
1321
1352
  );
1322
1353
  if (r)
1323
1354
  return r.label;
1324
- const o = (m = (l = zt(t, n)) == null ? void 0 : l.controls) == null ? void 0 : m.find(
1325
- (u) => u.id === a
1355
+ const o = (u = (l = Kt(t, n)) == null ? void 0 : l.controls) == null ? void 0 : u.find(
1356
+ (m) => m.id === a
1326
1357
  );
1327
1358
  return (o == null ? void 0 : o.label) || a;
1328
1359
  }
1329
1360
  function ge(t, n) {
1330
1361
  var a;
1331
- return ((a = zt(t, n)) == null ? void 0 : a.title) || n;
1362
+ return ((a = Kt(t, n)) == null ? void 0 : a.title) || n;
1332
1363
  }
1333
- function Hn(t) {
1364
+ function ro(t) {
1334
1365
  const { errors: n, dashboard: a } = t;
1335
1366
  if (!a)
1336
1367
  return n;
@@ -1340,57 +1371,57 @@ function Hn(t) {
1340
1371
  /^Card '(.+)' binding for control '(.+)' maps to missing metric '(.+)'\.$/
1341
1372
  );
1342
1373
  if (l) {
1343
- const [, b, c] = l, h = `${b}:${c}:missing-metric`;
1374
+ const [, g, c] = l, h = `${g}:${c}:missing-metric`;
1344
1375
  r.has(h) || r.set(
1345
1376
  h,
1346
- `"${ge(a, b)}" has an outdated "${be(
1377
+ `"${ge(a, g)}" has an outdated "${fe(
1347
1378
  a,
1348
- b,
1379
+ g,
1349
1380
  c
1350
1381
  )}" mapping. Some choices still point to metrics that are no longer available on this card. Open the card controls and choose replacements.`
1351
1382
  );
1352
1383
  continue;
1353
1384
  }
1354
- const m = o.match(
1385
+ const u = o.match(
1355
1386
  /^Card '(.+)' binding for control '(.+)' maps to missing group-by field '(.+)'\.$/
1356
1387
  );
1357
- if (m) {
1358
- const [, b, c] = m, h = `${b}:${c}:missing-group-by`;
1388
+ if (u) {
1389
+ const [, g, c] = u, h = `${g}:${c}:missing-group-by`;
1359
1390
  r.has(h) || r.set(
1360
1391
  h,
1361
- `"${ge(a, b)}" has an outdated "${be(
1392
+ `"${ge(a, g)}" has an outdated "${fe(
1362
1393
  a,
1363
- b,
1394
+ g,
1364
1395
  c
1365
1396
  )}" mapping. Some choices still point to fields that are no longer available on this card. Open the card controls and choose replacements.`
1366
1397
  );
1367
1398
  continue;
1368
1399
  }
1369
- const u = o.match(
1400
+ const m = o.match(
1370
1401
  /^Card '(.+)' binding for control '(.+)' maps to an invalid metric target\.$/
1371
1402
  );
1372
- if (u) {
1373
- const [, b, c] = u, h = `${b}:${c}:invalid-metric`;
1403
+ if (m) {
1404
+ const [, g, c] = m, h = `${g}:${c}:invalid-metric`;
1374
1405
  r.has(h) || r.set(
1375
1406
  h,
1376
- `"${ge(a, b)}" has an invalid "${be(
1407
+ `"${ge(a, g)}" has an invalid "${fe(
1377
1408
  a,
1378
- b,
1409
+ g,
1379
1410
  c
1380
1411
  )}" metric mapping. Open the card controls and choose a valid metric for each option.`
1381
1412
  );
1382
1413
  continue;
1383
1414
  }
1384
- const g = o.match(
1415
+ const b = o.match(
1385
1416
  /^Card '(.+)' binding for control '(.+)' maps to an invalid group-by target\.$/
1386
1417
  );
1387
- if (g) {
1388
- const [, b, c] = g, h = `${b}:${c}:invalid-group-by`;
1418
+ if (b) {
1419
+ const [, g, c] = b, h = `${g}:${c}:invalid-group-by`;
1389
1420
  r.has(h) || r.set(
1390
1421
  h,
1391
- `"${ge(a, b)}" has an invalid "${be(
1422
+ `"${ge(a, g)}" has an invalid "${fe(
1392
1423
  a,
1393
- b,
1424
+ g,
1394
1425
  c
1395
1426
  )}" field mapping. Open the card controls and choose a valid field for each option.`
1396
1427
  );
@@ -1400,12 +1431,12 @@ function Hn(t) {
1400
1431
  /^Card '(.+)' binding for control '(.+)' requires at least one temporal group-by field\.$/
1401
1432
  );
1402
1433
  if (f) {
1403
- const [, b, c] = f, h = `${b}:${c}:missing-temporal-group-by`;
1434
+ const [, g, c] = f, h = `${g}:${c}:missing-temporal-group-by`;
1404
1435
  r.has(h) || r.set(
1405
1436
  h,
1406
- `"${ge(a, b)}" can no longer use "${be(
1437
+ `"${ge(a, g)}" can no longer use "${fe(
1407
1438
  a,
1408
- b,
1439
+ g,
1409
1440
  c
1410
1441
  )}" for time grain because the card does not currently group by a date field.`
1411
1442
  );
@@ -1415,16 +1446,16 @@ function Hn(t) {
1415
1446
  }
1416
1447
  return Array.from(r.values());
1417
1448
  }
1418
- function Vn({
1449
+ function ao({
1419
1450
  visible: t,
1420
1451
  onSelect: n
1421
1452
  }) {
1422
1453
  return t ? /* @__PURE__ */ s(U, { onSelect: n, children: [
1423
- /* @__PURE__ */ e(aa, { className: "h-3.5 w-3.5" }),
1454
+ /* @__PURE__ */ e(ha, { className: "h-3.5 w-3.5" }),
1424
1455
  "Schedule email report"
1425
1456
  ] }) : null;
1426
1457
  }
1427
- function qn({
1458
+ function no({
1428
1459
  scheduleReportVisible: t,
1429
1460
  analyticalBriefingVisible: n,
1430
1461
  onScheduleReport: a,
@@ -1432,69 +1463,69 @@ function qn({
1432
1463
  }) {
1433
1464
  return /* @__PURE__ */ s(F, { children: [
1434
1465
  /* @__PURE__ */ e(
1435
- Vn,
1466
+ ao,
1436
1467
  {
1437
1468
  visible: t,
1438
1469
  onSelect: a
1439
1470
  }
1440
1471
  ),
1441
1472
  n ? /* @__PURE__ */ s(U, { onSelect: r, children: [
1442
- /* @__PURE__ */ e(ae, { className: "h-3.5 w-3.5" }),
1473
+ /* @__PURE__ */ e(re, { className: "h-3.5 w-3.5" }),
1443
1474
  "Create analytical briefing"
1444
1475
  ] }) : null
1445
1476
  ] });
1446
1477
  }
1447
- function Vt(t, n) {
1478
+ function jt(t, n) {
1448
1479
  return {
1449
- dashboard: Ze(t),
1450
- semanticExecutionPayload: Ze(n)
1480
+ dashboard: rt(t),
1481
+ semanticExecutionPayload: rt(n)
1451
1482
  };
1452
1483
  }
1453
- function yo() {
1454
- var vt, yt, wt, Nt, St;
1455
- Ba(), Ga();
1484
+ function Ao() {
1485
+ var St, Dt, Ct, kt, Et;
1486
+ Ja(), Ya();
1456
1487
  const {
1457
1488
  authToken: t,
1458
1489
  tokenProps: n,
1459
1490
  id: a,
1460
1491
  showBriefings: r
1461
- } = W(), o = na(), { isLocalDev: l } = oa(), {
1462
- canEditDashboard: m,
1463
- hasInspectionUser: u,
1464
- inspectionMessage: g,
1492
+ } = J(), o = pa(), { isLocalDev: l } = fa(), {
1493
+ canEditDashboard: u,
1494
+ hasInspectionUser: m,
1495
+ inspectionMessage: b,
1465
1496
  isInspectionMode: f,
1466
- isInspectionSurface: b
1467
- } = sa(), { openBrandStudioPreview: c } = ia(), { permissions: h } = pn(), i = da(), { isLoading: x } = ca(), v = C((d) => d.theme), w = C((d) => d.isDownloadingPdf), S = C(
1497
+ isInspectionSurface: g
1498
+ } = ga(), { openBrandStudioPreview: c } = ba(), { permissions: h } = kn(), i = xa(), { isLoading: x } = va(), y = C((d) => d.theme), w = C((d) => d.isDownloadingPdf), S = C(
1468
1499
  (d) => d.dashboardAssistantDraftScopeKey
1469
- ), p = C((d) => d.dashboard), $ = C((d) => d.selectedSheetId), T = (vt = p == null ? void 0 : p.sheets) == null ? void 0 : vt.find(
1500
+ ), p = C((d) => d.dashboard), $ = C((d) => d.selectedSheetId), T = (St = p == null ? void 0 : p.sheets) == null ? void 0 : St.find(
1470
1501
  (d) => d.id === $
1471
- ), M = $r(T), A = M ? (yt = T == null ? void 0 : T.document) == null ? void 0 : yt.page : void 0, E = C(
1502
+ ), A = Wr(T), I = A ? (Dt = T == null ? void 0 : T.document) == null ? void 0 : Dt.page : void 0, k = C(
1472
1503
  (d) => d.isDashboardEditing
1473
- ), { setDashboardTitle: J } = C((d) => d.actions), [Te, q] = N(!1), [oe, z] = N(!1), [se, ie] = N(!1), [Ne, Y] = N(null), [Fe, de] = N(!1), [Se, X] = N(!1), [Z, B] = N(null), [y, R] = N([]), [ce, j] = N(!1), [De, le] = N(!1), I = C((d) => d.isVisualEditing);
1474
- Ct((d) => d.card);
1475
- const hr = Pe(
1504
+ ), { setDashboardTitle: Y } = C((d) => d.actions), [Te, q] = N(!1), [ne, j] = N(!1), [oe, se] = N(!1), [Fe, ie] = N(!1), [we, X] = N(null), [Ne, Se] = N(!1), [$e, B] = N(!1), [v, R] = N(null), [de, z] = N([]), [ce, K] = N(!1), [De, ct] = N(!1), _ = C((d) => d.isVisualEditing);
1505
+ At((d) => d.card);
1506
+ const br = Pe(
1476
1507
  (d) => d.selectedDashboard
1477
- ), pr = Pe(
1508
+ ), xr = Pe(
1478
1509
  (d) => d.initialDashboard
1479
1510
  );
1480
- Pe((d) => d.selectedVisual), C((d) => d.selectedFrameId), Ct((d) => d.frame);
1481
- const st = C(
1511
+ Pe((d) => d.selectedVisual), C((d) => d.selectedFrameId), At((d) => d.frame);
1512
+ const lt = C(
1482
1513
  (d) => d.showDashboardJSON
1483
1514
  );
1484
1515
  C((d) => d.onSaveFunction);
1485
- const { setIsDashboardEditing: it, setShowDashboardJSON: dt } = C(
1516
+ const { setIsDashboardEditing: ut, setShowDashboardJSON: mt } = C(
1486
1517
  (d) => d.actions
1487
- ), { setInitialDashboard: ct, clearSelectedDashboard: $e } = Pe(
1518
+ ), { setInitialDashboard: ht, clearSelectedDashboard: Be } = Pe(
1488
1519
  (d) => d.actions
1489
- ), ue = !!n.orgUserId || !!(n.tenantId && n.endUserId && n.endUserEmail), { resources: Ce } = la(Qe.DASHBOARD), { data: Be } = ua(), fr = ((wt = Be == null ? void 0 : Be.preference) == null ? void 0 : wt.defaultDashboardId) || null, { mutate: br, isPending: gr } = ma(), { currentUser: xr } = rt(), vr = ha(xr), G = hr || pr, ee = pa({
1520
+ ), le = !!n.orgUserId || !!(n.tenantId && n.endUserId && n.endUserEmail), { resources: Ce } = ya(We.DASHBOARD), { data: Ge } = wa(), vr = ((Ct = Ge == null ? void 0 : Ge.preference) == null ? void 0 : Ct.defaultDashboardId) || null, { mutate: yr, isPending: wr } = Na(), { currentUser: Nr } = ot(), Sr = Sa(Nr), G = br || xr, Z = Da({
1490
1521
  config: n.config,
1491
- canNavigateDashboardHub: ue,
1492
- canShareDashboard: ((Nt = G == null ? void 0 : G.permissions) == null ? void 0 : Nt.canShare) === !0,
1493
- canManageGroups: vr
1494
- }), lt = G ? {
1522
+ canNavigateDashboardHub: le,
1523
+ canShareDashboard: ((kt = G == null ? void 0 : G.permissions) == null ? void 0 : kt.canShare) === !0,
1524
+ canManageGroups: Sr
1525
+ }), pt = G ? {
1495
1526
  id: G.id,
1496
1527
  title: (p == null ? void 0 : p.title) || G.title || "Dashboard"
1497
- } : null, { handleAddNewFrame: yr } = fa(), [Ge, He] = N(!1), [wr, me] = N(!1), [Ve, ke] = N("close"), he = ba(Qe.DASHBOARD), [L, pe] = N(null), Nr = async (d, P) => {
1528
+ } : null, { handleAddNewFrame: Dr } = Ca(), [Ve, He] = N(!1), [Cr, ue] = N(!1), [qe, ke] = N("close"), me = ka(We.DASHBOARD), [M, he] = N(null), kr = async (d, L) => {
1498
1529
  if (!f) {
1499
1530
  if (!(p != null && p.id)) {
1500
1531
  console.log("No dashboard ID found");
@@ -1503,25 +1534,25 @@ function yo() {
1503
1534
  console.log("Updating dashboard title:", {
1504
1535
  dashboardId: p.id,
1505
1536
  newTitle: d,
1506
- previousTitle: P
1507
- }), he.mutate(
1537
+ previousTitle: L
1538
+ }), me.mutate(
1508
1539
  {
1509
1540
  resourceId: p.id,
1510
1541
  data: { title: d }
1511
1542
  },
1512
1543
  {
1513
1544
  onSuccess: () => {
1514
- pe(
1515
- (_) => (_ == null ? void 0 : _.dashboard.id) === p.id ? {
1516
- ..._,
1517
- dashboard: { ..._.dashboard, title: d }
1518
- } : _
1545
+ he(
1546
+ (P) => (P == null ? void 0 : P.dashboard.id) === p.id ? {
1547
+ ...P,
1548
+ dashboard: { ...P.dashboard, title: d }
1549
+ } : P
1519
1550
  ), D.success("Dashboard title updated");
1520
1551
  },
1521
- onError: (_) => {
1522
- console.error("Failed to update dashboard title:", _), D.error("Failed to update dashboard title");
1523
- const re = C.getState().dashboard;
1524
- (re == null ? void 0 : re.id) === p.id && re.title === d && J(P);
1552
+ onError: (P) => {
1553
+ console.error("Failed to update dashboard title:", P), D.error("Failed to update dashboard title");
1554
+ const te = C.getState().dashboard;
1555
+ (te == null ? void 0 : te.id) === p.id && te.title === d && Y(L);
1525
1556
  }
1526
1557
  }
1527
1558
  );
@@ -1531,184 +1562,184 @@ function yo() {
1531
1562
  if (Ce && Ce.length > 0) {
1532
1563
  const d = p == null ? void 0 : p.id;
1533
1564
  if (d) {
1534
- const P = Ce.find(
1535
- (_) => _.id === d
1565
+ const L = Ce.find(
1566
+ (P) => P.id === d
1536
1567
  );
1537
- P && ct(P);
1568
+ L && ht(L);
1538
1569
  }
1539
1570
  }
1540
- }, [Ce, p == null ? void 0 : p.id, ct]);
1541
- const Sr = n.orgUserId || n.tenantId, qe = Q(
1542
- () => zn({
1571
+ }, [Ce, p == null ? void 0 : p.id, ht]);
1572
+ const Er = n.orgUserId || n.tenantId, je = W(
1573
+ () => oo({
1543
1574
  accessToken: t == null ? void 0 : t.accessToken,
1544
1575
  dashboardId: (p == null ? void 0 : p.id) || a || n.dashboard_id,
1545
- selectedSheetId: M ? $ : void 0,
1546
- pageSize: A == null ? void 0 : A.size,
1547
- orientation: A == null ? void 0 : A.orientation,
1548
- theme: v
1576
+ selectedSheetId: A ? $ : void 0,
1577
+ pageSize: I == null ? void 0 : I.size,
1578
+ orientation: I == null ? void 0 : I.orientation,
1579
+ theme: y
1549
1580
  }),
1550
1581
  [
1551
1582
  t == null ? void 0 : t.accessToken,
1552
1583
  a,
1553
1584
  p == null ? void 0 : p.id,
1554
- M,
1555
- A == null ? void 0 : A.orientation,
1556
- A == null ? void 0 : A.size,
1585
+ A,
1586
+ I == null ? void 0 : I.orientation,
1587
+ I == null ? void 0 : I.size,
1557
1588
  $,
1558
- v,
1589
+ y,
1559
1590
  n.dashboard_id
1560
1591
  ]
1561
- ), ut = E && !I && !f && Sr && m, { setDashboard: ze } = C((d) => d.actions), mt = C(
1592
+ ), ft = k && !_ && !f && Er && u, { setDashboard: ze } = C((d) => d.actions), gt = C(
1562
1593
  (d) => d.semanticExecutionPayload
1563
- ), Dr = () => {
1564
- it(!0);
1594
+ ), Ir = () => {
1595
+ ut(!0);
1565
1596
  }, Ee = () => {
1566
- it(!1), dt(!1), pe(null);
1597
+ ut(!1), mt(!1), he(null);
1567
1598
  };
1568
1599
  Ue(() => {
1569
- if (!E) {
1570
- L && pe(null);
1600
+ if (!k) {
1601
+ M && he(null);
1571
1602
  return;
1572
1603
  }
1573
- L || !p || x || pe(
1574
- Vt(
1604
+ M || !p || x || he(
1605
+ jt(
1575
1606
  p,
1576
- mt
1607
+ gt
1577
1608
  )
1578
1609
  );
1579
1610
  }, [
1580
1611
  p,
1581
- L,
1582
- E,
1612
+ M,
1613
+ k,
1583
1614
  x,
1584
- mt
1615
+ gt
1585
1616
  ]);
1586
- const ht = (L == null ? void 0 : L.dashboard) ?? null, { isDirty: pt, isDirtyPending: Cr, resetDirty: fe } = Za(
1617
+ const bt = (M == null ? void 0 : M.dashboard) ?? null, { isDirty: xt, isDirtyPending: Ar, resetDirty: pe } = mn(
1587
1618
  p,
1588
- ht,
1619
+ bt,
1589
1620
  300,
1590
1621
  1e3,
1591
- en
1592
- ), ft = Ha(
1593
- ht,
1622
+ hn
1623
+ ), vt = Xa(
1624
+ bt,
1594
1625
  f,
1595
- m
1596
- ), bt = pt || Cr, Ae = Ge || he.isPending, kr = () => {
1626
+ u
1627
+ ), yt = xt || Ar, Ie = Ve || me.isPending, Mr = () => {
1597
1628
  if (f) {
1598
- L && ze(L.dashboard, {
1599
- semanticExecutionPayload: L.semanticExecutionPayload
1600
- }), Ee(), fe();
1629
+ M && ze(M.dashboard, {
1630
+ semanticExecutionPayload: M.semanticExecutionPayload
1631
+ }), Ee(), pe();
1601
1632
  return;
1602
1633
  }
1603
- ft() ? (ke("close"), me(!0)) : (Ee(), fe());
1604
- }, Er = async () => {
1605
- await je({
1634
+ vt() ? (ke("close"), ue(!0)) : (Ee(), pe());
1635
+ }, Lr = async () => {
1636
+ await Ke({
1606
1637
  closeAfterSave: !0,
1607
- navigateHomeAfterSave: Ve === "home"
1638
+ navigateHomeAfterSave: qe === "home"
1608
1639
  });
1609
- }, Ar = () => {
1610
- const d = Ve === "home" && !!ue;
1611
- L && ze(L.dashboard, {
1612
- semanticExecutionPayload: L.semanticExecutionPayload
1613
- }), Ee(), d && $e(), ke("close"), me(!1), fe();
1614
- }, Ir = () => {
1615
- L && (ze(L.dashboard, {
1616
- semanticExecutionPayload: L.semanticExecutionPayload
1617
- }), fe());
1618
- }, Mr = () => {
1619
- if (ue) {
1620
- if (E && ft()) {
1621
- ke("home"), me(!0);
1640
+ }, Pr = () => {
1641
+ const d = qe === "home" && !!le;
1642
+ M && ze(M.dashboard, {
1643
+ semanticExecutionPayload: M.semanticExecutionPayload
1644
+ }), Ee(), d && Be(), ke("close"), ue(!1), pe();
1645
+ }, Or = () => {
1646
+ M && (ze(M.dashboard, {
1647
+ semanticExecutionPayload: M.semanticExecutionPayload
1648
+ }), pe());
1649
+ }, _r = () => {
1650
+ if (le) {
1651
+ if (k && vt()) {
1652
+ ke("home"), ue(!0);
1622
1653
  return;
1623
1654
  }
1624
- $e();
1655
+ Be();
1625
1656
  }
1626
1657
  };
1627
- async function je(d) {
1658
+ async function Ke(d) {
1628
1659
  if (f)
1629
1660
  return;
1630
- const P = C.getState().dashboard;
1631
- if (!P)
1661
+ const L = C.getState().dashboard;
1662
+ if (!L)
1632
1663
  return;
1633
- const _ = (d == null ? void 0 : d.closeAfterSave) ?? ce, re = (d == null ? void 0 : d.navigateHomeAfterSave) ?? !1;
1634
- j(_), _ && me(!1);
1635
- const Rr = Ze(P);
1636
- X(!0), B(null), R([]), He(!0);
1637
- const Ur = {
1638
- template: P
1664
+ const P = (d == null ? void 0 : d.closeAfterSave) ?? ce, te = (d == null ? void 0 : d.navigateHomeAfterSave) ?? !1;
1665
+ K(P), P && ue(!1);
1666
+ const $r = rt(L);
1667
+ B(!0), R(null), z([]), He(!0);
1668
+ const Br = {
1669
+ template: L
1639
1670
  };
1640
- he.mutate(
1671
+ me.mutate(
1641
1672
  {
1642
- resourceId: P.id,
1643
- data: Ur
1673
+ resourceId: L.id,
1674
+ data: Br
1644
1675
  },
1645
1676
  {
1646
1677
  onSuccess: (O) => {
1647
- var Ie, Me, Dt;
1648
- const K = (O == null ? void 0 : O.id) || ((Ie = O == null ? void 0 : O.dashboard) == null ? void 0 : Ie.id) || ((Me = O == null ? void 0 : O.resource) == null ? void 0 : Me.id) || ((Dt = O == null ? void 0 : O.template) == null ? void 0 : Dt.id) || null;
1649
- if (!P.id && K) {
1650
- const Ke = Hr.getState(), Le = Ke.pendingDashboardDraftMigration;
1651
- (Le == null ? void 0 : Le.scopeKey) === S ? Ke.actions.setPendingDashboardDraftMigrationExpectedDashboardId(
1652
- K
1653
- ) : Le && Ke.actions.clearPendingDashboardDraftMigration();
1678
+ var Ae, Me, It;
1679
+ const Q = (O == null ? void 0 : O.id) || ((Ae = O == null ? void 0 : O.dashboard) == null ? void 0 : Ae.id) || ((Me = O == null ? void 0 : O.resource) == null ? void 0 : Me.id) || ((It = O == null ? void 0 : O.template) == null ? void 0 : It.id) || null;
1680
+ if (!L.id && Q) {
1681
+ const Qe = Xr.getState(), Le = Qe.pendingDashboardDraftMigration;
1682
+ (Le == null ? void 0 : Le.scopeKey) === S ? Qe.actions.setPendingDashboardDraftMigrationExpectedDashboardId(
1683
+ Q
1684
+ ) : Le && Qe.actions.clearPendingDashboardDraftMigration();
1654
1685
  }
1655
- He(!1), D.success("Dashboard saved!"), pe(
1656
- Vt(
1657
- Rr,
1686
+ He(!1), D.success("Dashboard saved!"), he(
1687
+ jt(
1688
+ $r,
1658
1689
  C.getState().semanticExecutionPayload
1659
1690
  )
1660
- ), X(!1), j(!1), _ && (Ee(), fe(), re && ue && $e()), ke("close");
1691
+ ), B(!1), K(!1), P && (Ee(), pe(), te && le && Be()), ke("close");
1661
1692
  },
1662
1693
  onError: (O) => {
1663
- He(!1), B("Failed to save dashboard. Please try again.");
1664
- const K = O.details, Ie = Array.isArray(
1665
- K == null ? void 0 : K.errors
1666
- ) ? (K.errors || []).filter(
1694
+ He(!1), R("Failed to save dashboard. Please try again.");
1695
+ const Q = O.details, Ae = Array.isArray(
1696
+ Q == null ? void 0 : Q.errors
1697
+ ) ? (Q.errors || []).filter(
1667
1698
  (Me) => typeof Me == "string"
1668
1699
  ) : [];
1669
- R(
1670
- Hn({
1671
- errors: Ie,
1672
- dashboard: P || void 0
1700
+ z(
1701
+ ro({
1702
+ errors: Ae,
1703
+ dashboard: L || void 0
1673
1704
  })
1674
1705
  ), D.error("Failed to save dashboard");
1675
1706
  }
1676
1707
  }
1677
1708
  );
1678
1709
  }
1679
- const gt = p.title;
1680
- he.isPending && console.log("Title during update:", {
1681
- title: gt,
1710
+ const wt = p.title;
1711
+ me.isPending && console.log("Title during update:", {
1712
+ title: wt,
1682
1713
  dashboardStateTitle: p.title,
1683
1714
  dashboardId: p == null ? void 0 : p.id
1684
1715
  });
1685
- const Lr = ue && !!(t != null && t.accessToken) && !!(n != null && n.apiServiceUrl), Pr = !f && ee.showDashboardHub && Lr, _r = !f && i && ee.showDashboardHub, H = (p == null ? void 0 : p.id) || null, xt = ga(
1686
- (St = n.config) == null ? void 0 : St.showBriefings,
1716
+ const Rr = le && !!(t != null && t.accessToken) && !!(n != null && n.apiServiceUrl), Ur = !f && Z.showDashboardHub && Rr, Tr = !f && i && Z.showDashboardHub, V = (p == null ? void 0 : p.id) || null, Nt = Ea(
1717
+ (Et = n.config) == null ? void 0 : Et.showBriefings,
1687
1718
  r
1688
- ), te = !!H && fr === H, Or = () => {
1689
- !H || f || br({
1690
- dashboardId: te ? null : H
1719
+ ), ee = !!V && vr === V, Fr = () => {
1720
+ !V || f || yr({
1721
+ dashboardId: ee ? null : V
1691
1722
  });
1692
1723
  };
1693
- return !i && !I ? null : /* @__PURE__ */ s(
1724
+ return !i && !_ ? null : /* @__PURE__ */ s(
1694
1725
  "div",
1695
1726
  {
1696
1727
  className: "flex min-h-11 shrink-0 items-center justify-between gap-2 overflow-x-auto border-b px-4 py-1.5",
1697
1728
  role: "dashboard-controls",
1698
1729
  children: [
1699
1730
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
1700
- _r && !I && /* @__PURE__ */ e(
1701
- Pt,
1731
+ Tr && !_ && /* @__PURE__ */ e(
1732
+ _t,
1702
1733
  {
1703
1734
  "aria-label": "Dashboard Hub",
1704
1735
  tooltip: "Dashboard Hub",
1705
- onClick: Mr,
1736
+ onClick: _r,
1706
1737
  className: "h-7 w-7 px-0",
1707
1738
  buttonProps: { size: "xs" },
1708
- children: /* @__PURE__ */ e(xa, { className: "h-3.5 w-3.5" })
1739
+ children: /* @__PURE__ */ e(Ia, { className: "h-3.5 w-3.5" })
1709
1740
  }
1710
1741
  ),
1711
- !I && i && (x ? /* @__PURE__ */ e(
1742
+ !_ && i && (x ? /* @__PURE__ */ e(
1712
1743
  "div",
1713
1744
  {
1714
1745
  className: "h-4 w-28 animate-pulse rounded-md bg-muted/70",
@@ -1718,29 +1749,29 @@ function yo() {
1718
1749
  }
1719
1750
  ) : /* @__PURE__ */ s(F, { children: [
1720
1751
  /* @__PURE__ */ e(
1721
- va,
1752
+ Aa,
1722
1753
  {
1723
- value: gt || "Untitled Dashboard",
1754
+ value: wt || "Untitled Dashboard",
1724
1755
  onSave: (d) => {
1725
1756
  console.log("EditableText onSave called:", {
1726
1757
  newTitle: d,
1727
- canEditDashboard: m,
1758
+ canEditDashboard: u,
1728
1759
  dashboardId: p == null ? void 0 : p.id
1729
1760
  });
1730
- const P = (p == null ? void 0 : p.title) || "";
1731
- J(d), Nr(d, P);
1761
+ const L = (p == null ? void 0 : p.title) || "";
1762
+ Y(d), kr(d, L);
1732
1763
  },
1733
- isEditable: ya({
1734
- isDashboardEditing: E,
1735
- canEditDashboard: m === !0 && !f
1764
+ isEditable: Ma({
1765
+ isDashboardEditing: k,
1766
+ canEditDashboard: u === !0 && !f
1736
1767
  }),
1737
1768
  displayClassName: "text-[13px] font-medium",
1738
1769
  inputClassName: "text-[13px] font-medium",
1739
1770
  placeholder: "Dashboard Title",
1740
- isPending: he.isPending
1771
+ isPending: me.isPending
1741
1772
  }
1742
1773
  ),
1743
- ee.showDashboardHub && te && /* @__PURE__ */ e(
1774
+ Z.showDashboardHub && ee && /* @__PURE__ */ e(
1744
1775
  "span",
1745
1776
  {
1746
1777
  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",
@@ -1748,145 +1779,145 @@ function yo() {
1748
1779
  children: "Default"
1749
1780
  }
1750
1781
  ),
1751
- Pr && H && /* @__PURE__ */ e(kt, { children: /* @__PURE__ */ s(Et, { children: [
1752
- /* @__PURE__ */ e(At, { asChild: !0, children: /* @__PURE__ */ e(
1753
- V,
1782
+ Ur && V && /* @__PURE__ */ e(Mt, { children: /* @__PURE__ */ s(Lt, { children: [
1783
+ /* @__PURE__ */ e(Pt, { asChild: !0, children: /* @__PURE__ */ e(
1784
+ H,
1754
1785
  {
1755
1786
  variant: "ghost",
1756
1787
  size: "xs",
1757
- onClick: Or,
1758
- disabled: gr || !(t != null && t.accessToken) || !(n != null && n.apiServiceUrl),
1759
- className: xe(
1788
+ onClick: Fr,
1789
+ disabled: wr || !(t != null && t.accessToken) || !(n != null && n.apiServiceUrl),
1790
+ className: be(
1760
1791
  "w-7 px-0",
1761
- te ? "bg-primary/10 text-primary hover:bg-primary/15 hover:text-primary focus-visible:bg-primary/15" : "text-muted-foreground hover:text-foreground"
1792
+ ee ? "bg-primary/10 text-primary hover:bg-primary/15 hover:text-primary focus-visible:bg-primary/15" : "text-muted-foreground hover:text-foreground"
1762
1793
  ),
1763
- "aria-pressed": te,
1764
- "aria-label": te ? "Remove as default dashboard" : "Set as default dashboard",
1765
- children: /* @__PURE__ */ e(wa, { className: "h-3.5 w-3.5" })
1794
+ "aria-pressed": ee,
1795
+ "aria-label": ee ? "Remove as default dashboard" : "Set as default dashboard",
1796
+ children: /* @__PURE__ */ e(La, { className: "h-3.5 w-3.5" })
1766
1797
  }
1767
1798
  ) }),
1768
- /* @__PURE__ */ e(It, { children: /* @__PURE__ */ e("p", { children: te ? "Remove as default dashboard" : "Set as default dashboard" }) })
1799
+ /* @__PURE__ */ e(Ot, { children: /* @__PURE__ */ e("p", { children: ee ? "Remove as default dashboard" : "Set as default dashboard" }) })
1769
1800
  ] }) })
1770
1801
  ] }))
1771
1802
  ] }),
1772
1803
  /* @__PURE__ */ s("div", { className: "flex items-center gap-2", children: [
1773
- I && /* @__PURE__ */ s(F, { children: [
1774
- /* @__PURE__ */ e(Va, {}),
1775
- /* @__PURE__ */ e(qa, {})
1804
+ _ && /* @__PURE__ */ s(F, { children: [
1805
+ /* @__PURE__ */ e(Za, {}),
1806
+ /* @__PURE__ */ e(en, {})
1776
1807
  ] }),
1777
- !I && i && !f && ee.showDashboardSharing && /* @__PURE__ */ s(
1778
- V,
1808
+ !_ && i && !f && Z.showDashboardSharing && /* @__PURE__ */ s(
1809
+ H,
1779
1810
  {
1780
1811
  variant: "outline",
1781
1812
  size: "xs",
1782
1813
  onClick: () => q(!0),
1783
1814
  children: [
1784
- /* @__PURE__ */ e(Na, { className: "h-3.5 w-3.5" }),
1815
+ /* @__PURE__ */ e(Pa, { className: "h-3.5 w-3.5" }),
1785
1816
  "Share"
1786
1817
  ]
1787
1818
  }
1788
1819
  ),
1789
- !I && E && !f && h.canUseFilters && i && /* @__PURE__ */ e(za, {}),
1790
- E && !I && !f && i && !M && /* @__PURE__ */ s("div", { className: "inline-flex h-7 items-stretch overflow-hidden rounded-control border border-input bg-background", children: [
1820
+ !_ && k && !f && h.canUseFilters && i && /* @__PURE__ */ e(tn, {}),
1821
+ k && !_ && !f && i && !A && /* @__PURE__ */ s("div", { className: "inline-flex h-7 items-stretch overflow-hidden rounded-control border border-input bg-background", children: [
1791
1822
  /* @__PURE__ */ s(
1792
- V,
1823
+ H,
1793
1824
  {
1794
1825
  variant: "ghost",
1795
1826
  size: "xs",
1796
- disabled: !E,
1797
- onClick: () => void yr(),
1827
+ disabled: !k,
1828
+ onClick: () => void Dr(),
1798
1829
  className: "h-full rounded-none border-0 shadow-none hover:bg-accent",
1799
1830
  children: [
1800
- /* @__PURE__ */ e(ae, { className: "h-3.5 w-3.5" }),
1831
+ /* @__PURE__ */ e(re, { className: "h-3.5 w-3.5" }),
1801
1832
  "Visual"
1802
1833
  ]
1803
1834
  }
1804
1835
  ),
1805
- /* @__PURE__ */ s(_t, { modal: !1, children: [
1806
- /* @__PURE__ */ e(Ot, { asChild: !0, children: /* @__PURE__ */ e(
1807
- V,
1836
+ /* @__PURE__ */ s(Rt, { modal: !1, children: [
1837
+ /* @__PURE__ */ e(Ut, { asChild: !0, children: /* @__PURE__ */ e(
1838
+ H,
1808
1839
  {
1809
1840
  variant: "ghost",
1810
1841
  size: "xs",
1811
1842
  className: "h-full w-7 rounded-none border-0 border-l border-border/60 px-0 shadow-none hover:bg-accent",
1812
1843
  "aria-label": "Open visual options",
1813
- disabled: !E,
1814
- children: /* @__PURE__ */ e(Ta, { className: "h-3.5 w-3.5" })
1844
+ disabled: !k,
1845
+ children: /* @__PURE__ */ e(Qa, { className: "h-3.5 w-3.5" })
1815
1846
  }
1816
1847
  ) }),
1817
1848
  /* @__PURE__ */ e(
1818
- Rt,
1849
+ Tt,
1819
1850
  {
1820
1851
  align: "end",
1821
1852
  className: "z-[60] w-48 rounded-[6px] border-border/60 p-1 shadow-sm",
1822
- children: /* @__PURE__ */ s(U, { onClick: () => le(!0), children: [
1823
- /* @__PURE__ */ e(ae, { className: "h-3.5 w-3.5" }),
1853
+ children: /* @__PURE__ */ s(U, { onClick: () => ct(!0), children: [
1854
+ /* @__PURE__ */ e(re, { className: "h-3.5 w-3.5" }),
1824
1855
  "From library..."
1825
1856
  ] })
1826
1857
  }
1827
1858
  )
1828
1859
  ] }),
1829
1860
  /* @__PURE__ */ e(
1830
- ja,
1861
+ rn,
1831
1862
  {
1832
1863
  open: De,
1833
- onOpenChange: le
1864
+ onOpenChange: ct
1834
1865
  }
1835
1866
  )
1836
1867
  ] }),
1837
- !I && !E && (m || f) && (!b || !u || m !== void 0) && i && /* @__PURE__ */ s("div", { className: "inline-flex items-center gap-1", children: [
1838
- /* @__PURE__ */ s(V, { size: "xs", onClick: Dr, children: [
1839
- /* @__PURE__ */ e(Sa, { className: "h-3.5 w-3.5" }),
1868
+ !_ && !k && (u || f) && (!g || !m || u !== void 0) && i && /* @__PURE__ */ s("div", { className: "inline-flex items-center gap-1", children: [
1869
+ /* @__PURE__ */ s(H, { size: "xs", onClick: Ir, children: [
1870
+ /* @__PURE__ */ e(Oa, { className: "h-3.5 w-3.5" }),
1840
1871
  f ? "Inspect" : "Edit"
1841
1872
  ] }),
1842
- g ? /* @__PURE__ */ e(kt, { children: /* @__PURE__ */ s(Et, { children: [
1843
- /* @__PURE__ */ e(At, { asChild: !0, children: /* @__PURE__ */ e(
1873
+ b ? /* @__PURE__ */ e(Mt, { children: /* @__PURE__ */ s(Lt, { children: [
1874
+ /* @__PURE__ */ e(Pt, { asChild: !0, children: /* @__PURE__ */ e(
1844
1875
  "button",
1845
1876
  {
1846
1877
  type: "button",
1847
- "aria-label": g,
1878
+ "aria-label": b,
1848
1879
  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",
1849
- children: /* @__PURE__ */ e(Br, { "aria-hidden": "true", className: "size-3.5" })
1880
+ children: /* @__PURE__ */ e(Jr, { "aria-hidden": "true", className: "size-3.5" })
1850
1881
  }
1851
1882
  ) }),
1852
- /* @__PURE__ */ e(It, { children: /* @__PURE__ */ e("p", { children: g }) })
1883
+ /* @__PURE__ */ e(Ot, { children: /* @__PURE__ */ e("p", { children: b }) })
1853
1884
  ] }) }) : null
1854
1885
  ] }),
1855
- ut && i && pt && /* @__PURE__ */ s(
1856
- V,
1886
+ ft && i && xt && /* @__PURE__ */ s(
1887
+ H,
1857
1888
  {
1858
1889
  variant: "outline",
1859
1890
  size: "xs",
1860
- onClick: Ir,
1861
- disabled: Ae,
1891
+ onClick: Or,
1892
+ disabled: Ie,
1862
1893
  children: [
1863
- /* @__PURE__ */ e(Da, { className: "h-3.5 w-3.5" }),
1894
+ /* @__PURE__ */ e(_a, { className: "h-3.5 w-3.5" }),
1864
1895
  "Undo"
1865
1896
  ]
1866
1897
  }
1867
1898
  ),
1868
- ut && i && /* @__PURE__ */ s(
1869
- V,
1899
+ ft && i && /* @__PURE__ */ s(
1900
+ H,
1870
1901
  {
1871
1902
  size: "xs",
1872
- className: xe(!bt && "opacity-60"),
1873
- disabled: Ae || !bt,
1874
- onClick: () => je(),
1903
+ className: be(!yt && "opacity-60"),
1904
+ disabled: Ie || !yt,
1905
+ onClick: () => Ke(),
1875
1906
  children: [
1876
- Ae ? /* @__PURE__ */ e(Re, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e(tn, { className: "h-3.5 w-3.5" }),
1877
- Ae ? "Saving..." : "Save"
1907
+ Ie ? /* @__PURE__ */ e(Re, { className: "h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ e(pn, { className: "h-3.5 w-3.5" }),
1908
+ Ie ? "Saving..." : "Save"
1878
1909
  ]
1879
1910
  }
1880
1911
  ),
1881
- E && !I && i && /* @__PURE__ */ s(V, { variant: "outline", size: "xs", onClick: kr, children: [
1882
- /* @__PURE__ */ e(Ca, { className: "h-3.5 w-3.5" }),
1912
+ k && !_ && i && /* @__PURE__ */ s(H, { variant: "outline", size: "xs", onClick: Mr, children: [
1913
+ /* @__PURE__ */ e(Ra, { className: "h-3.5 w-3.5" }),
1883
1914
  "Close"
1884
1915
  ] }),
1885
- !I && i && /* @__PURE__ */ e("div", { className: "ml-2 flex items-center", children: /* @__PURE__ */ e(Ka, {}) }),
1886
- !I && l && /* @__PURE__ */ e(hn, {}),
1887
- !I && i && !f && /* @__PURE__ */ s(_t, { children: [
1888
- /* @__PURE__ */ e(Ot, { asChild: !0, children: /* @__PURE__ */ e(
1889
- Pt,
1916
+ !_ && i && /* @__PURE__ */ e("div", { className: "ml-2 flex items-center", children: /* @__PURE__ */ e(an, {}) }),
1917
+ !_ && l && /* @__PURE__ */ e(Cn, {}),
1918
+ !_ && i && !f && /* @__PURE__ */ s(Rt, { children: [
1919
+ /* @__PURE__ */ e(Ut, { asChild: !0, children: /* @__PURE__ */ e(
1920
+ _t,
1890
1921
  {
1891
1922
  tooltip: "More Options",
1892
1923
  className: "w-7 px-0 text-muted-foreground hover:text-foreground",
@@ -1895,59 +1926,69 @@ function yo() {
1895
1926
  variant: "ghost",
1896
1927
  "aria-label": "More dashboard options"
1897
1928
  },
1898
- children: /* @__PURE__ */ e(ka, { className: "h-3.5 w-3.5" })
1929
+ children: /* @__PURE__ */ e(Ua, { className: "h-3.5 w-3.5" })
1899
1930
  }
1900
1931
  ) }),
1901
1932
  /* @__PURE__ */ s(
1902
- Rt,
1933
+ Tt,
1903
1934
  {
1904
1935
  align: "end",
1905
1936
  className: "w-56 rounded-control border border-border/60 p-1 shadow-sm",
1906
1937
  children: [
1907
- /* @__PURE__ */ e(_e, { children: "Reports & briefings" }),
1938
+ /* @__PURE__ */ e(Oe, { children: "Reports & briefings" }),
1908
1939
  /* @__PURE__ */ s(
1909
1940
  U,
1910
1941
  {
1911
1942
  disabled: w,
1912
- onSelect: () => de(!0),
1943
+ onSelect: () => Se(!0),
1913
1944
  children: [
1914
- /* @__PURE__ */ e(Ea, { className: "h-3.5 w-3.5" }),
1945
+ /* @__PURE__ */ e(Ta, { className: "h-3.5 w-3.5" }),
1915
1946
  "Export"
1916
1947
  ]
1917
1948
  }
1918
1949
  ),
1919
1950
  /* @__PURE__ */ e(
1920
- qn,
1951
+ no,
1921
1952
  {
1922
- scheduleReportVisible: !!(xt && o.surfaceVisible && H && !E),
1923
- analyticalBriefingVisible: !!(xt && o.surfaceVisible && H && !E),
1924
- onScheduleReport: () => Y("scheduled_report"),
1925
- onCreateAnalyticalBriefing: () => Y("analytical_briefing")
1953
+ scheduleReportVisible: !!(Nt && o.surfaceVisible && V && !k),
1954
+ analyticalBriefingVisible: !!(Nt && o.surfaceVisible && V && !k),
1955
+ onScheduleReport: () => X("scheduled_report"),
1956
+ onCreateAnalyticalBriefing: () => X("analytical_briefing")
1926
1957
  }
1927
1958
  ),
1928
- /* @__PURE__ */ e(We, {}),
1929
- ee.showGroupManagement && /* @__PURE__ */ s(F, { children: [
1930
- /* @__PURE__ */ e(_e, { children: "Access" }),
1959
+ k && /* @__PURE__ */ s(
1960
+ U,
1961
+ {
1962
+ onSelect: () => ie(!0),
1963
+ children: [
1964
+ /* @__PURE__ */ e(Fa, { className: "h-3.5 w-3.5" }),
1965
+ "Download settings"
1966
+ ]
1967
+ }
1968
+ ),
1969
+ /* @__PURE__ */ e(Je, {}),
1970
+ Z.showGroupManagement && /* @__PURE__ */ s(F, { children: [
1971
+ /* @__PURE__ */ e(Oe, { children: "Access" }),
1931
1972
  /* @__PURE__ */ s(
1932
1973
  U,
1933
1974
  {
1934
- onClick: () => z(!0),
1975
+ onClick: () => j(!0),
1935
1976
  children: [
1936
- /* @__PURE__ */ e(Kt, { className: "h-3.5 w-3.5" }),
1977
+ /* @__PURE__ */ e(Yt, { className: "h-3.5 w-3.5" }),
1937
1978
  "Manage Groups"
1938
1979
  ]
1939
1980
  }
1940
1981
  ),
1941
- /* @__PURE__ */ e(We, {})
1982
+ /* @__PURE__ */ e(Je, {})
1942
1983
  ] }),
1943
- /* @__PURE__ */ e(_e, { children: "Preferences" }),
1944
- /* @__PURE__ */ s(U, { onClick: () => ie(!0), children: [
1945
- /* @__PURE__ */ e(Qt, { className: "h-3.5 w-3.5" }),
1984
+ /* @__PURE__ */ e(Oe, { children: "Preferences" }),
1985
+ /* @__PURE__ */ s(U, { onClick: () => se(!0), children: [
1986
+ /* @__PURE__ */ e(Xt, { className: "h-3.5 w-3.5" }),
1946
1987
  "Report preferences"
1947
1988
  ] }),
1948
1989
  l && i && /* @__PURE__ */ s(F, { children: [
1949
- /* @__PURE__ */ e(We, {}),
1950
- /* @__PURE__ */ e(_e, { children: "Developer" }),
1990
+ /* @__PURE__ */ e(Je, {}),
1991
+ /* @__PURE__ */ e(Oe, { children: "Developer" }),
1951
1992
  /* @__PURE__ */ s(
1952
1993
  U,
1953
1994
  {
@@ -1958,24 +1999,24 @@ function yo() {
1958
1999
  ).catch(() => D.error("Unable to copy token")) : D.error("Clipboard not available"));
1959
2000
  },
1960
2001
  children: [
1961
- /* @__PURE__ */ e(Ut, { className: "h-3.5 w-3.5" }),
2002
+ /* @__PURE__ */ e(Ft, { className: "h-3.5 w-3.5" }),
1962
2003
  "Copy token"
1963
2004
  ]
1964
2005
  }
1965
2006
  ),
1966
- M && /* @__PURE__ */ s(
2007
+ A && /* @__PURE__ */ s(
1967
2008
  U,
1968
2009
  {
1969
- disabled: !qe,
2010
+ disabled: !je,
1970
2011
  onSelect: () => {
1971
2012
  var d;
1972
- if (!qe) {
2013
+ if (!je) {
1973
2014
  D.error(
1974
2015
  "Open a document sheet with a token to copy the local PDF URL"
1975
2016
  );
1976
2017
  return;
1977
2018
  }
1978
- (d = navigator == null ? void 0 : navigator.clipboard) != null && d.writeText ? navigator.clipboard.writeText(qe).then(
2019
+ (d = navigator == null ? void 0 : navigator.clipboard) != null && d.writeText ? navigator.clipboard.writeText(je).then(
1979
2020
  () => D.success(
1980
2021
  "Local document PDF URL copied to clipboard"
1981
2022
  )
@@ -1986,7 +2027,7 @@ function yo() {
1986
2027
  ) : D.error("Clipboard not available");
1987
2028
  },
1988
2029
  children: [
1989
- /* @__PURE__ */ e(Ut, { className: "h-3.5 w-3.5" }),
2030
+ /* @__PURE__ */ e(Ft, { className: "h-3.5 w-3.5" }),
1990
2031
  "Copy local document PDF URL"
1991
2032
  ]
1992
2033
  }
@@ -1994,24 +2035,24 @@ function yo() {
1994
2035
  /* @__PURE__ */ s(
1995
2036
  U,
1996
2037
  {
1997
- onSelect: () => Gr(n.apiServiceUrl),
2038
+ onSelect: () => Yr(n.apiServiceUrl),
1998
2039
  children: [
1999
- /* @__PURE__ */ e(sn, { className: "h-3.5 w-3.5" }),
2040
+ /* @__PURE__ */ e(vn, { className: "h-3.5 w-3.5" }),
2000
2041
  "Invalidate token"
2001
2042
  ]
2002
2043
  }
2003
2044
  ),
2004
2045
  /* @__PURE__ */ s(U, { onSelect: c, children: [
2005
- /* @__PURE__ */ e(rn, { className: "h-3.5 w-3.5" }),
2046
+ /* @__PURE__ */ e(fn, { className: "h-3.5 w-3.5" }),
2006
2047
  "Brand Studio"
2007
2048
  ] }),
2008
- E && /* @__PURE__ */ s(
2049
+ k && /* @__PURE__ */ s(
2009
2050
  U,
2010
2051
  {
2011
- onSelect: () => dt(!st),
2052
+ onSelect: () => mt(!lt),
2012
2053
  children: [
2013
- /* @__PURE__ */ e(an, { className: "h-3.5 w-3.5" }),
2014
- st ? "Hide dashboard JSON" : "Show dashboard JSON"
2054
+ /* @__PURE__ */ e(gn, { className: "h-3.5 w-3.5" }),
2055
+ lt ? "Hide dashboard JSON" : "Show dashboard JSON"
2015
2056
  ]
2016
2057
  }
2017
2058
  )
@@ -2020,87 +2061,94 @@ function yo() {
2020
2061
  }
2021
2062
  )
2022
2063
  ] }),
2023
- Te && lt && /* @__PURE__ */ e(
2024
- Aa,
2064
+ Te && pt && /* @__PURE__ */ e(
2065
+ $a,
2025
2066
  {
2026
- resource: lt,
2027
- resourceType: Qe.DASHBOARD,
2067
+ resource: pt,
2068
+ resourceType: We.DASHBOARD,
2028
2069
  onClose: () => q(!1)
2029
2070
  }
2030
2071
  ),
2031
- ee.showGroupManagement && /* @__PURE__ */ e(
2032
- Rn,
2072
+ Z.showGroupManagement && /* @__PURE__ */ e(
2073
+ Kn,
2074
+ {
2075
+ open: ne,
2076
+ onOpenChange: j
2077
+ }
2078
+ ),
2079
+ /* @__PURE__ */ e(
2080
+ ln,
2033
2081
  {
2034
2082
  open: oe,
2035
- onOpenChange: z
2083
+ onOpenChange: se
2036
2084
  }
2037
2085
  ),
2038
2086
  /* @__PURE__ */ e(
2039
- Xa,
2087
+ to,
2040
2088
  {
2041
- open: se,
2089
+ open: Fe,
2042
2090
  onOpenChange: ie
2043
2091
  }
2044
2092
  ),
2045
- H && Ne ? /* @__PURE__ */ e(
2046
- Qa,
2093
+ V && we ? /* @__PURE__ */ e(
2094
+ nn,
2047
2095
  {
2048
- dashboardId: H,
2096
+ dashboardId: V,
2049
2097
  dashboardTitle: (p == null ? void 0 : p.title) || (G == null ? void 0 : G.title),
2050
2098
  open: !0,
2051
2099
  onOpenChange: (d) => {
2052
- d || Y(null);
2100
+ d || X(null);
2053
2101
  },
2054
2102
  hideTrigger: !0,
2055
- workflowIntent: Ne
2103
+ workflowIntent: we
2056
2104
  }
2057
2105
  ) : null,
2058
2106
  i && /* @__PURE__ */ e(
2059
- Ia,
2107
+ Ba,
2060
2108
  {
2061
- open: Fe,
2062
- onOpenChange: de
2109
+ open: Ne,
2110
+ onOpenChange: Se
2063
2111
  }
2064
2112
  ),
2065
2113
  /* @__PURE__ */ e(
2066
- Ma,
2114
+ Ga,
2067
2115
  {
2068
- open: Se,
2116
+ open: $e,
2069
2117
  onOpenChange: (d) => {
2070
- !d && Ge && !Z || (X(d), d || (B(null), R([]), j(!1)));
2118
+ !d && Ve && !v || (B(d), d || (R(null), z([]), K(!1)));
2071
2119
  },
2072
- children: /* @__PURE__ */ s(La, { className: "max-w-sm", children: [
2073
- /* @__PURE__ */ s(Pa, { children: [
2074
- /* @__PURE__ */ e(_a, { children: Z ? "Save failed" : "Saving dashboard" }),
2075
- /* @__PURE__ */ e(Oa, { className: "pt-2", children: Z ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
2076
- y.length > 0 && /* @__PURE__ */ s("div", { className: "space-y-1 rounded-md border border-destructive/20 bg-destructive/5 p-3 text-left", children: [
2120
+ children: /* @__PURE__ */ s(Va, { className: "max-w-sm", children: [
2121
+ /* @__PURE__ */ s(Ha, { children: [
2122
+ /* @__PURE__ */ e(qa, { children: v ? "Save failed" : "Saving dashboard" }),
2123
+ /* @__PURE__ */ e(ja, { className: "pt-2", children: v ? "We could not save the dashboard. Please try again." : "Please wait while we save your changes." }),
2124
+ de.length > 0 && /* @__PURE__ */ s("div", { className: "space-y-1 rounded-md border border-destructive/20 bg-destructive/5 p-3 text-left", children: [
2077
2125
  /* @__PURE__ */ e("div", { className: "text-sm font-medium text-destructive", children: "What needs attention" }),
2078
- /* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children: y.slice(0, 5).map((d) => /* @__PURE__ */ e("li", { children: d }, d)) })
2126
+ /* @__PURE__ */ e("ul", { className: "list-disc space-y-1 pl-4 text-xs text-muted-foreground", children: de.slice(0, 5).map((d) => /* @__PURE__ */ e("li", { children: d }, d)) })
2079
2127
  ] })
2080
2128
  ] }),
2081
- /* @__PURE__ */ e(Ra, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: Z ? /* @__PURE__ */ s(F, { children: [
2129
+ /* @__PURE__ */ e(za, { className: "flex-col gap-2 sm:flex-row sm:justify-end", children: v ? /* @__PURE__ */ s(F, { children: [
2082
2130
  /* @__PURE__ */ e(
2083
- Ua,
2131
+ Ka,
2084
2132
  {
2085
2133
  onClick: () => {
2086
- X(!1), B(null), R([]), j(!1);
2134
+ B(!1), R(null), z([]), K(!1);
2087
2135
  },
2088
2136
  className: "m-0",
2089
2137
  children: "Close"
2090
2138
  }
2091
2139
  ),
2092
2140
  /* @__PURE__ */ e(
2093
- Tt,
2141
+ $t,
2094
2142
  {
2095
- onClick: () => je({
2143
+ onClick: () => Ke({
2096
2144
  closeAfterSave: ce,
2097
- navigateHomeAfterSave: Ve === "home"
2145
+ navigateHomeAfterSave: qe === "home"
2098
2146
  }),
2099
2147
  className: "m-0",
2100
2148
  children: "Retry"
2101
2149
  }
2102
2150
  )
2103
- ] }) : /* @__PURE__ */ s(Tt, { disabled: !0, className: "m-0 cursor-default", children: [
2151
+ ] }) : /* @__PURE__ */ s($t, { disabled: !0, className: "m-0 cursor-default", children: [
2104
2152
  /* @__PURE__ */ e(Re, { className: "mr-2 h-4 w-4 animate-spin" }),
2105
2153
  "Saving..."
2106
2154
  ] }) })
@@ -2108,15 +2156,15 @@ function yo() {
2108
2156
  }
2109
2157
  ),
2110
2158
  /* @__PURE__ */ e(
2111
- Wa,
2159
+ on,
2112
2160
  {
2113
- open: wr,
2161
+ open: Cr,
2114
2162
  onOpenChange: (d) => {
2115
- me(d);
2163
+ ue(d);
2116
2164
  },
2117
- onSave: Er,
2118
- onDiscard: Ar,
2119
- isSaving: Ge,
2165
+ onSave: Lr,
2166
+ onDiscard: Pr,
2167
+ isSaving: Ve,
2120
2168
  saveLabel: "Save",
2121
2169
  discardLabel: "Discard changes"
2122
2170
  }
@@ -2126,7 +2174,7 @@ function yo() {
2126
2174
  }
2127
2175
  );
2128
2176
  }
2129
- function zn({
2177
+ function oo({
2130
2178
  accessToken: t,
2131
2179
  dashboardId: n,
2132
2180
  selectedSheetId: a,
@@ -2136,11 +2184,11 @@ function zn({
2136
2184
  }) {
2137
2185
  if (!t || !a)
2138
2186
  return null;
2139
- const m = new URL("http://localhost:5173/print-document");
2140
- m.searchParams.set("token", t), n && m.searchParams.set("dashboardId", n), m.searchParams.set("selectedSheetId", a), l && m.searchParams.set("theme", l);
2141
- const u = new URL("http://127.0.0.1:3002/");
2142
- return u.searchParams.set("pdfMode", "document"), u.searchParams.set("pageSize", r || "letter"), u.searchParams.set("orientation", o || "portrait"), u.searchParams.set("url", m.toString()), u.toString();
2187
+ const u = new URL("http://localhost:5173/print-document");
2188
+ u.searchParams.set("token", t), n && u.searchParams.set("dashboardId", n), u.searchParams.set("selectedSheetId", a), l && u.searchParams.set("theme", l);
2189
+ const m = new URL("http://127.0.0.1:3002/");
2190
+ return m.searchParams.set("pdfMode", "document"), m.searchParams.set("pageSize", r || "letter"), m.searchParams.set("orientation", o || "portrait"), m.searchParams.set("url", u.toString()), m.toString();
2143
2191
  }
2144
2192
  export {
2145
- yo as default
2193
+ Ao as default
2146
2194
  };