@arbidocs/blocks 0.4.145 → 0.4.147

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 (100) hide show
  1. package/dist/agents/index.cjs +266 -266
  2. package/dist/agents/index.js +9 -9
  3. package/dist/chat/index.cjs +1 -1
  4. package/dist/chat/index.js +1 -1
  5. package/dist/{chunk-ULPFRK3J.cjs → chunk-AINU3EJ6.cjs} +8 -8
  6. package/dist/{chunk-ULPFRK3J.cjs.map → chunk-AINU3EJ6.cjs.map} +1 -1
  7. package/dist/{chunk-KPO67GBR.cjs → chunk-AO7SK6WP.cjs} +32 -32
  8. package/dist/{chunk-KPO67GBR.cjs.map → chunk-AO7SK6WP.cjs.map} +1 -1
  9. package/dist/{chunk-NGDXDHLG.js → chunk-DAHCRVPM.js} +3 -3
  10. package/dist/{chunk-NGDXDHLG.js.map → chunk-DAHCRVPM.js.map} +1 -1
  11. package/dist/{chunk-FUTMU4FR.js → chunk-DGV7HQA7.js} +6 -179
  12. package/dist/chunk-DGV7HQA7.js.map +1 -0
  13. package/dist/chunk-EV7W64B6.js +134 -0
  14. package/dist/chunk-EV7W64B6.js.map +1 -0
  15. package/dist/{chunk-O6IEZDRC.cjs → chunk-GRGS5M6O.cjs} +181 -3
  16. package/dist/chunk-GRGS5M6O.cjs.map +1 -0
  17. package/dist/{chunk-J4M37SXY.js → chunk-H74HEPKT.js} +190 -7
  18. package/dist/chunk-H74HEPKT.js.map +1 -0
  19. package/dist/{chunk-NSNHRZBH.cjs → chunk-IL3WB3YX.cjs} +3 -3
  20. package/dist/{chunk-NSNHRZBH.cjs.map → chunk-IL3WB3YX.cjs.map} +1 -1
  21. package/dist/{chunk-34GDGE77.cjs → chunk-LTU35TQN.cjs} +192 -6
  22. package/dist/chunk-LTU35TQN.cjs.map +1 -0
  23. package/dist/{chunk-VVZ34A2P.js → chunk-LZRMXJIE.js} +3 -3
  24. package/dist/{chunk-VVZ34A2P.js.map → chunk-LZRMXJIE.js.map} +1 -1
  25. package/dist/{chunk-OPTBQSCV.cjs → chunk-MFY2ZNP6.cjs} +2 -181
  26. package/dist/{chunk-FUTMU4FR.js.map → chunk-MFY2ZNP6.cjs.map} +1 -1
  27. package/dist/{chunk-6HCJ3ZEU.js → chunk-R6VCPDPF.js} +178 -6
  28. package/dist/chunk-R6VCPDPF.js.map +1 -0
  29. package/dist/chunk-RXK3XP62.cjs +144 -0
  30. package/dist/chunk-RXK3XP62.cjs.map +1 -0
  31. package/dist/{chunk-KTSF4HFC.js → chunk-SUUPR735.js} +6 -6
  32. package/dist/{chunk-KTSF4HFC.js.map → chunk-SUUPR735.js.map} +1 -1
  33. package/dist/{chunk-WO7QAVTL.cjs → chunk-T5I4NRFP.cjs} +9 -9
  34. package/dist/{chunk-WO7QAVTL.cjs.map → chunk-T5I4NRFP.cjs.map} +1 -1
  35. package/dist/chunk-U37AYUPI.cjs +5371 -0
  36. package/dist/chunk-U37AYUPI.cjs.map +1 -0
  37. package/dist/{chunk-QOL3M4FJ.js → chunk-VUR63NMQ.js} +8 -8
  38. package/dist/{chunk-QOL3M4FJ.js.map → chunk-VUR63NMQ.js.map} +1 -1
  39. package/dist/chunk-WIZ7Z7FN.js +5179 -0
  40. package/dist/chunk-WIZ7Z7FN.js.map +1 -0
  41. package/dist/collaboration/index.cjs +81 -81
  42. package/dist/collaboration/index.js +3 -3
  43. package/dist/connect/docx.cjs +9 -9
  44. package/dist/connect/docx.js +6 -6
  45. package/dist/connect/index.cjs +1395 -132
  46. package/dist/connect/index.cjs.map +1 -1
  47. package/dist/connect/index.d.ts +2 -0
  48. package/dist/connect/index.js +1278 -24
  49. package/dist/connect/index.js.map +1 -1
  50. package/dist/connection/ConnectedNotificationRelevance.d.ts +4 -1
  51. package/dist/connection/connectors/ConnectedAppsSettings.d.ts +24 -0
  52. package/dist/connection/connectors/ConnectedDriveSyncDialog.d.ts +12 -0
  53. package/dist/connection/connectors/ConnectedMailboxSyncDialog.d.ts +12 -0
  54. package/dist/connection/connectors/index.d.ts +4 -0
  55. package/dist/connection/connectors/sync-labels.d.ts +21 -0
  56. package/dist/connection/settings-page/ConnectedSettingsPage.d.ts +4 -0
  57. package/dist/connection/settings-page/index.d.ts +1 -1
  58. package/dist/connection/workspace-settings/ConnectedWorkspaceSettings.d.ts +53 -0
  59. package/dist/connection/workspace-settings/index.d.ts +2 -0
  60. package/dist/connection/workspace-settings/useConnectedWorkspaceSettings.d.ts +85 -0
  61. package/dist/document-tools/index.cjs +1 -1
  62. package/dist/document-tools/index.js +1 -1
  63. package/dist/facts/index.cjs +1 -1
  64. package/dist/facts/index.js +1 -1
  65. package/dist/files/index.cjs +3 -3
  66. package/dist/files/index.js +3 -3
  67. package/dist/index.cjs +445 -618
  68. package/dist/index.cjs.map +1 -1
  69. package/dist/index.js +23 -205
  70. package/dist/index.js.map +1 -1
  71. package/dist/settings/PlanBadge.d.ts +1 -1
  72. package/dist/settings/index.cjs +551 -3716
  73. package/dist/settings/index.cjs.map +1 -1
  74. package/dist/settings/index.js +8 -3525
  75. package/dist/settings/index.js.map +1 -1
  76. package/dist/shell/index.cjs +1 -1
  77. package/dist/shell/index.js +1 -1
  78. package/dist/site/index.cjs +10 -10
  79. package/dist/site/index.js +2 -2
  80. package/dist/studio/index.cjs +3 -3
  81. package/dist/studio/index.js +3 -3
  82. package/dist/workflow-canvas/index.cjs +22 -22
  83. package/dist/workflow-canvas/index.js +9 -9
  84. package/dist/workspaces/CommonWorkspaceToggle.d.ts +15 -0
  85. package/dist/workspaces/index.cjs +38 -107
  86. package/dist/workspaces/index.cjs.map +1 -1
  87. package/dist/workspaces/index.d.ts +1 -0
  88. package/dist/workspaces/index.js +5 -102
  89. package/dist/workspaces/index.js.map +1 -1
  90. package/node_modules/@arbidocs/coedit/package.json +1 -1
  91. package/package.json +4 -4
  92. package/dist/chunk-34GDGE77.cjs.map +0 -1
  93. package/dist/chunk-5YHEHEJT.js +0 -1667
  94. package/dist/chunk-5YHEHEJT.js.map +0 -1
  95. package/dist/chunk-6HCJ3ZEU.js.map +0 -1
  96. package/dist/chunk-J4M37SXY.js.map +0 -1
  97. package/dist/chunk-O6IEZDRC.cjs.map +0 -1
  98. package/dist/chunk-OPTBQSCV.cjs.map +0 -1
  99. package/dist/chunk-U73KPFYH.cjs +0 -1717
  100. package/dist/chunk-U73KPFYH.cjs.map +0 -1
@@ -1,34 +1,40 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunkO4YPVYPO_cjs = require('../chunk-O4YPVYPO.cjs');
5
- var chunkU73KPFYH_cjs = require('../chunk-U73KPFYH.cjs');
4
+ var chunkRXK3XP62_cjs = require('../chunk-RXK3XP62.cjs');
5
+ var chunkU37AYUPI_cjs = require('../chunk-U37AYUPI.cjs');
6
6
  var chunkODRHHWHY_cjs = require('../chunk-ODRHHWHY.cjs');
7
- var chunkULPFRK3J_cjs = require('../chunk-ULPFRK3J.cjs');
7
+ var chunkAINU3EJ6_cjs = require('../chunk-AINU3EJ6.cjs');
8
8
  var chunkGAYMJWTC_cjs = require('../chunk-GAYMJWTC.cjs');
9
9
  var chunkGFNELPDP_cjs = require('../chunk-GFNELPDP.cjs');
10
10
  var chunkJH6JTI76_cjs = require('../chunk-JH6JTI76.cjs');
11
11
  require('../chunk-464YPRAE.cjs');
12
12
  require('../chunk-V5OAXIBN.cjs');
13
13
  require('../chunk-5FYU7ZIU.cjs');
14
- var chunk34GDGE77_cjs = require('../chunk-34GDGE77.cjs');
14
+ var chunkO4YPVYPO_cjs = require('../chunk-O4YPVYPO.cjs');
15
+ require('../chunk-223D4727.cjs');
16
+ var chunkLTU35TQN_cjs = require('../chunk-LTU35TQN.cjs');
17
+ var chunkXAJIKT6Y_cjs = require('../chunk-XAJIKT6Y.cjs');
18
+ require('../chunk-QZTNTP75.cjs');
15
19
  var chunkV46W7YLI_cjs = require('../chunk-V46W7YLI.cjs');
16
- var chunkO6IEZDRC_cjs = require('../chunk-O6IEZDRC.cjs');
20
+ require('../chunk-NWNVWO6L.cjs');
21
+ var chunkGRGS5M6O_cjs = require('../chunk-GRGS5M6O.cjs');
17
22
  require('../chunk-LJJJ6CYH.cjs');
18
23
  var chunkI2QSDQQV_cjs = require('../chunk-I2QSDQQV.cjs');
19
24
  require('../chunk-RC25WMVB.cjs');
20
- var chunkWO7QAVTL_cjs = require('../chunk-WO7QAVTL.cjs');
21
- require('../chunk-DETZZBG2.cjs');
25
+ var chunkT5I4NRFP_cjs = require('../chunk-T5I4NRFP.cjs');
22
26
  var chunkRFIBUWLF_cjs = require('../chunk-RFIBUWLF.cjs');
23
- var chunkNSNHRZBH_cjs = require('../chunk-NSNHRZBH.cjs');
27
+ var chunkIL3WB3YX_cjs = require('../chunk-IL3WB3YX.cjs');
28
+ require('../chunk-EYKISBDO.cjs');
24
29
  var chunkRQ2Y7USX_cjs = require('../chunk-RQ2Y7USX.cjs');
25
30
  require('../chunk-AHDJXIUB.cjs');
26
31
  require('../chunk-ZW6FPIFC.cjs');
32
+ require('../chunk-DETZZBG2.cjs');
33
+ require('../chunk-DVUZTGVL.cjs');
34
+ require('../chunk-DTROMMDX.cjs');
27
35
  var chunkV4ISCZJ7_cjs = require('../chunk-V4ISCZJ7.cjs');
28
36
  var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
29
37
  var chunkC2CWWEHO_cjs = require('../chunk-C2CWWEHO.cjs');
30
- require('../chunk-EYKISBDO.cjs');
31
- require('../chunk-DTROMMDX.cjs');
32
38
  var chunkQVBZESYQ_cjs = require('../chunk-QVBZESYQ.cjs');
33
39
  require('../chunk-ADOKTJHV.cjs');
34
40
  var chunk6YTHQ73P_cjs = require('../chunk-6YTHQ73P.cjs');
@@ -40,8 +46,8 @@ require('../chunk-B6MVQCXW.cjs');
40
46
  var chunkJKB7WT7L_cjs = require('../chunk-JKB7WT7L.cjs');
41
47
  var chunkJSTKEZBS_cjs = require('../chunk-JSTKEZBS.cjs');
42
48
  require('../chunk-76L6LOP3.cjs');
43
- require('../chunk-32HW2Q33.cjs');
44
49
  require('../chunk-7UTB4PHM.cjs');
50
+ require('../chunk-32HW2Q33.cjs');
45
51
  require('../chunk-FX3K6LNZ.cjs');
46
52
  require('../chunk-PPCATBOY.cjs');
47
53
  require('../chunk-MHVNT4J3.cjs');
@@ -140,7 +146,7 @@ function ConnectedWorkspaceActivity({
140
146
  [feed.data]
141
147
  );
142
148
  return /* @__PURE__ */ jsxRuntime.jsx(
143
- chunk34GDGE77_cjs.WorkspaceActivityList,
149
+ chunkLTU35TQN_cjs.WorkspaceActivityList,
144
150
  {
145
151
  ...listProps,
146
152
  items,
@@ -568,7 +574,7 @@ function NotificationCenter({
568
574
  }
569
575
  ];
570
576
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-col h-full bg-background", "data-testid": "notifications-page", children: [
571
- /* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.DraggableHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(
577
+ /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.DraggableHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(
572
578
  chunk7RGLTF76_cjs.TabHeader,
573
579
  {
574
580
  tabs,
@@ -806,14 +812,19 @@ function ConnectedWorkspaceNotificationMenu({
806
812
  workspaceId: workspaceProp,
807
813
  ...menuProps
808
814
  }) {
809
- const { workspaceId: selected, status } = chunkGFNELPDP_cjs.useConnection();
815
+ const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
816
+ const { workspaceId: selected, live } = chunkGFNELPDP_cjs.useConnectedWorkspace();
810
817
  const workspaceId = workspaceProp ?? selected;
811
- const { level, setLevel, isLoading, isSaving } = react$1.useWorkspaceNotificationLevel(workspaceId, {
812
- enabled: status === "authenticated"
813
- });
818
+ const { level, setLevel, isLoading, isSaving, error } = react$1.useWorkspaceNotificationLevel(
819
+ workspaceId,
820
+ { enabled: live }
821
+ );
822
+ react.useEffect(() => {
823
+ if (error) notify("Could not save the workspace notification setting", "error");
824
+ }, [error, notify]);
814
825
  if (!workspaceId) return null;
815
826
  return /* @__PURE__ */ jsxRuntime.jsx(
816
- chunk34GDGE77_cjs.WorkspaceNotificationMenu,
827
+ chunkLTU35TQN_cjs.WorkspaceNotificationMenu,
817
828
  {
818
829
  ...menuProps,
819
830
  level,
@@ -827,12 +838,12 @@ function ConnectedThreadFollow({
827
838
  as = "button",
828
839
  ...props
829
840
  }) {
830
- const { status } = chunkGFNELPDP_cjs.useConnection();
841
+ const { live } = chunkGFNELPDP_cjs.useConnectedWorkspace();
831
842
  const { following, setFollowing, isLoading, isSaving } = react$1.useFollowThread(conversationId, {
832
- enabled: status === "authenticated"
843
+ enabled: live
833
844
  });
834
845
  if (!conversationId) return null;
835
- const Control = as === "menu-item" ? chunk34GDGE77_cjs.ThreadFollowMenuItem : chunk34GDGE77_cjs.ThreadFollowButton;
846
+ const Control = as === "menu-item" ? chunkLTU35TQN_cjs.ThreadFollowMenuItem : chunkLTU35TQN_cjs.ThreadFollowButton;
836
847
  return /* @__PURE__ */ jsxRuntime.jsx(
837
848
  Control,
838
849
  {
@@ -905,7 +916,7 @@ function ConnectedSkillUpload({ onDone, labels, className }) {
905
916
  onChange: (e) => {
906
917
  const file = e.target.files?.[0];
907
918
  e.target.value = "";
908
- if (file) void add(() => chunkWO7QAVTL_cjs.importSkillFile(file));
919
+ if (file) void add(() => chunkT5I4NRFP_cjs.importSkillFile(file));
909
920
  }
910
921
  }
911
922
  ),
@@ -930,7 +941,7 @@ function ConnectedSkillUpload({ onDone, labels, className }) {
930
941
  className: "space-y-2",
931
942
  onSubmit: (e) => {
932
943
  e.preventDefault();
933
- if (url.trim()) void add(() => chunkWO7QAVTL_cjs.importSkillFromUrl(url));
944
+ if (url.trim()) void add(() => chunkT5I4NRFP_cjs.importSkillFromUrl(url));
934
945
  },
935
946
  children: [
936
947
  /* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: "skills-add-url", children: l.fromLink }),
@@ -994,9 +1005,9 @@ function ConnectedSkillsLibrary({
994
1005
  const [type, setType] = react.useState("all");
995
1006
  const [view, setView] = react.useState("gallery");
996
1007
  const [isBusy, setIsBusy] = react.useState(false);
997
- const all = react.useMemo(() => chunkWO7QAVTL_cjs.buildLibrarySkills(builtins, listings ?? []), [builtins, listings]);
1008
+ const all = react.useMemo(() => chunkT5I4NRFP_cjs.buildLibrarySkills(builtins, listings ?? []), [builtins, listings]);
998
1009
  const shown = react.useMemo(
999
- () => chunkWO7QAVTL_cjs.filterLibrarySkills(all, { query, source, type }),
1010
+ () => chunkT5I4NRFP_cjs.filterLibrarySkills(all, { query, source, type }),
1000
1011
  [all, query, source, type]
1001
1012
  );
1002
1013
  const current = all.find((s) => s.slug === selected) ?? null;
@@ -1007,21 +1018,21 @@ function ConnectedSkillsLibrary({
1007
1018
  const count = (s) => all.filter((x) => x.source === s).length;
1008
1019
  const sourceOptions = [
1009
1020
  { id: "all", label: "All", count: all.length },
1010
- { id: "builtin", label: chunkWO7QAVTL_cjs.SKILL_SOURCE_LABELS.builtin, count: count("builtin") },
1011
- { id: "mine", label: chunkWO7QAVTL_cjs.SKILL_SOURCE_LABELS.mine, count: count("mine") },
1012
- { id: "shared", label: chunkWO7QAVTL_cjs.SKILL_SOURCE_LABELS.shared, count: count("shared") }
1021
+ { id: "builtin", label: chunkT5I4NRFP_cjs.SKILL_SOURCE_LABELS.builtin, count: count("builtin") },
1022
+ { id: "mine", label: chunkT5I4NRFP_cjs.SKILL_SOURCE_LABELS.mine, count: count("mine") },
1023
+ { id: "shared", label: chunkT5I4NRFP_cjs.SKILL_SOURCE_LABELS.shared, count: count("shared") }
1013
1024
  ];
1014
1025
  const types = [...new Set(all.map((s) => s.type))];
1015
1026
  const typeOptions = [
1016
1027
  { id: "all", label: "Any kind" },
1017
- ...types.map((t) => ({ id: t, label: chunkWO7QAVTL_cjs.SKILL_TYPE_LABELS[t] ?? t }))
1028
+ ...types.map((t) => ({ id: t, label: chunkT5I4NRFP_cjs.SKILL_TYPE_LABELS[t] ?? t }))
1018
1029
  ];
1019
1030
  const pick = (slug) => {
1020
1031
  setSelected(slug);
1021
1032
  setMode("detail");
1022
1033
  };
1023
1034
  const markdownOf = async (skill) => {
1024
- if (!skill.docExtId) return chunkWO7QAVTL_cjs.workflowToSkillMarkdown(skill.workflow);
1035
+ if (!skill.docExtId) return chunkT5I4NRFP_cjs.workflowToSkillMarkdown(skill.workflow);
1025
1036
  const response = await arbi.documents.download(skill.docExtId);
1026
1037
  if (!response.ok) throw new Error(`Could not read the skill (${response.status})`);
1027
1038
  return response.text();
@@ -1029,7 +1040,7 @@ function ConnectedSkillsLibrary({
1029
1040
  const saveAs = (slug, markdown, shared = false) => upload.mutateAsync([
1030
1041
  {
1031
1042
  folder: `${SKILL_FOLDER}${slug}`,
1032
- fileName: chunkWO7QAVTL_cjs.SKILL_MAIN_FILENAME,
1043
+ fileName: chunkT5I4NRFP_cjs.SKILL_MAIN_FILENAME,
1033
1044
  content: new Blob([markdown], { type: "text/markdown" }),
1034
1045
  shared
1035
1046
  }
@@ -1092,7 +1103,7 @@ function ConnectedSkillsLibrary({
1092
1103
  try {
1093
1104
  documentTools.downloadBlob(
1094
1105
  new Blob([await markdownOf(skill)], { type: "text/markdown" }),
1095
- chunkWO7QAVTL_cjs.SKILL_MAIN_FILENAME
1106
+ chunkT5I4NRFP_cjs.SKILL_MAIN_FILENAME
1096
1107
  );
1097
1108
  } catch (error) {
1098
1109
  notify(errorText(error, "Could not export the skill"), "error");
@@ -1133,10 +1144,10 @@ function ConnectedSkillsLibrary({
1133
1144
  }
1134
1145
  )
1135
1146
  ] }),
1136
- /* @__PURE__ */ jsxRuntime.jsx(chunkWO7QAVTL_cjs.SkillViewToggle, { value: view, onChange: setView })
1147
+ /* @__PURE__ */ jsxRuntime.jsx(chunkT5I4NRFP_cjs.SkillViewToggle, { value: view, onChange: setView })
1137
1148
  ] }),
1138
1149
  /* @__PURE__ */ jsxRuntime.jsx(
1139
- chunkWO7QAVTL_cjs.SkillFilterChips,
1150
+ chunkT5I4NRFP_cjs.SkillFilterChips,
1140
1151
  {
1141
1152
  label: "Show",
1142
1153
  value: source,
@@ -1145,7 +1156,7 @@ function ConnectedSkillsLibrary({
1145
1156
  }
1146
1157
  ),
1147
1158
  types.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(
1148
- chunkWO7QAVTL_cjs.SkillFilterChips,
1159
+ chunkT5I4NRFP_cjs.SkillFilterChips,
1149
1160
  {
1150
1161
  label: "Kind",
1151
1162
  value: type,
@@ -1192,12 +1203,12 @@ function ConnectedSkillsLibrary({
1192
1203
  view === "gallery" ? "grid grid-cols-[repeat(auto-fill,minmax(9.5rem,1fr))]" : "flex flex-col"
1193
1204
  ),
1194
1205
  children: shown.map((skill) => /* @__PURE__ */ jsxRuntime.jsx(
1195
- chunkWO7QAVTL_cjs.SkillTile,
1206
+ chunkT5I4NRFP_cjs.SkillTile,
1196
1207
  {
1197
1208
  name: skill.title,
1198
1209
  testId: `skill-tile-${skill.slug}`,
1199
1210
  description: skill.description,
1200
- sourceLabel: skill.isShared ? `${chunkWO7QAVTL_cjs.SKILL_SOURCE_LABELS.mine}, shared` : chunkWO7QAVTL_cjs.SKILL_SOURCE_LABELS[skill.source],
1211
+ sourceLabel: skill.isShared ? `${chunkT5I4NRFP_cjs.SKILL_SOURCE_LABELS.mine}, shared` : chunkT5I4NRFP_cjs.SKILL_SOURCE_LABELS[skill.source],
1201
1212
  type: skill.type,
1202
1213
  icon,
1203
1214
  layout: view,
@@ -1232,7 +1243,7 @@ function ConnectedSkillsLibrary({
1232
1243
  }
1233
1244
  ),
1234
1245
  mode === "new" && /* @__PURE__ */ jsxRuntime.jsx(
1235
- chunkWO7QAVTL_cjs.SkillGenerateForm,
1246
+ chunkT5I4NRFP_cjs.SkillGenerateForm,
1236
1247
  {
1237
1248
  icon,
1238
1249
  onGenerate: (desc) => {
@@ -1259,11 +1270,11 @@ function ConnectedSkillsLibrary({
1259
1270
  ),
1260
1271
  mode === "add" && /* @__PURE__ */ jsxRuntime.jsx(ConnectedSkillUpload, { onDone: done }),
1261
1272
  mode === "detail" && current && /* @__PURE__ */ jsxRuntime.jsx(
1262
- chunkWO7QAVTL_cjs.SkillLibraryDetail,
1273
+ chunkT5I4NRFP_cjs.SkillLibraryDetail,
1263
1274
  {
1264
1275
  skill: current,
1265
1276
  icon,
1266
- instructions: current.docExtId ? currentText ? chunkWO7QAVTL_cjs.parseSkillFrontmatter(currentText, chunkWO7QAVTL_cjs.SKILL_MAIN_FILENAME).content : "" : current.workflow.run.kind === "prompt" ? current.workflow.run.promptTemplate : "",
1277
+ instructions: current.docExtId ? currentText ? chunkT5I4NRFP_cjs.parseSkillFrontmatter(currentText, chunkT5I4NRFP_cjs.SKILL_MAIN_FILENAME).content : "" : current.workflow.run.kind === "prompt" ? current.workflow.run.promptTemplate : "",
1267
1278
  isLoading: !!current.docExtId && textLoading,
1268
1279
  actions: {
1269
1280
  onRun: () => onRun(current.slug),
@@ -1298,7 +1309,7 @@ function SkillEditor({
1298
1309
  const [seeded, setSeeded] = react.useState(!isEditing);
1299
1310
  const [nameError, setNameError] = react.useState(null);
1300
1311
  if (isEditing && !seeded && text !== void 0) {
1301
- const parsed = chunkWO7QAVTL_cjs.parseSkillFrontmatter(text, chunkWO7QAVTL_cjs.SKILL_MAIN_FILENAME);
1312
+ const parsed = chunkT5I4NRFP_cjs.parseSkillFrontmatter(text, chunkT5I4NRFP_cjs.SKILL_MAIN_FILENAME);
1302
1313
  setDescription(parsed.description ?? "");
1303
1314
  setBody(parsed.content ?? "");
1304
1315
  setSeeded(true);
@@ -1312,15 +1323,15 @@ function SkillEditor({
1312
1323
  notify("Add a short description.", "error");
1313
1324
  return;
1314
1325
  }
1315
- const slug = chunkWO7QAVTL_cjs.skillSlug(name);
1326
+ const slug = chunkT5I4NRFP_cjs.skillSlug(name);
1316
1327
  try {
1317
- await onSave(slug, chunkWO7QAVTL_cjs.serializeSkill({ name: slug, description, body }), isEditing);
1328
+ await onSave(slug, chunkT5I4NRFP_cjs.serializeSkill({ name: slug, description, body }), isEditing);
1318
1329
  } catch (err) {
1319
1330
  notify(errorText(err, "Could not save the skill"), "error");
1320
1331
  }
1321
1332
  };
1322
1333
  return /* @__PURE__ */ jsxRuntime.jsx(
1323
- chunkWO7QAVTL_cjs.SkillEditForm,
1334
+ chunkT5I4NRFP_cjs.SkillEditForm,
1324
1335
  {
1325
1336
  name,
1326
1337
  onNameChange: setName,
@@ -1356,9 +1367,9 @@ function ConnectedAgentCreator({
1356
1367
  agent,
1357
1368
  initialName,
1358
1369
  onSaved,
1359
- capabilities = chunkWO7QAVTL_cjs.DEFAULT_AGENT_CAPABILITIES,
1360
- templates = chunkWO7QAVTL_cjs.DEFAULT_AGENT_TEMPLATES,
1361
- types = chunkWO7QAVTL_cjs.DEFAULT_AGENT_TYPES,
1370
+ capabilities = chunkT5I4NRFP_cjs.DEFAULT_AGENT_CAPABILITIES,
1371
+ templates = chunkT5I4NRFP_cjs.DEFAULT_AGENT_TEMPLATES,
1372
+ types = chunkT5I4NRFP_cjs.DEFAULT_AGENT_TYPES,
1362
1373
  canRevokeWorkspaces = false,
1363
1374
  labels
1364
1375
  }) {
@@ -1400,7 +1411,7 @@ function ConnectedAgentCreator({
1400
1411
  const initialValues = react.useMemo(
1401
1412
  () => ({
1402
1413
  name: agent?.given_name ?? initialName ?? "",
1403
- persona: isEdit ? chunkWO7QAVTL_cjs.stripPersonaPreamble(String(agents.PERSONA ?? "")) : "",
1414
+ persona: isEdit ? chunkT5I4NRFP_cjs.stripPersonaPreamble(String(agents.PERSONA ?? "")) : "",
1404
1415
  modelName: String(agents.AGENT_MODEL_NAME ?? ""),
1405
1416
  capabilities: Object.fromEntries(capabilities.map(({ key }) => [key, Boolean(agents[key])])),
1406
1417
  type: "builtin",
@@ -1419,7 +1430,7 @@ function ConnectedAgentCreator({
1419
1430
  try {
1420
1431
  let agentExtId = agent?.external_id ?? early?.id ?? "";
1421
1432
  if (!agentExtId) {
1422
- if (!chunkWO7QAVTL_cjs.isValidAgentName(values.name)) {
1433
+ if (!chunkT5I4NRFP_cjs.isValidAgentName(values.name)) {
1423
1434
  notify("Give the agent a name first.", "error");
1424
1435
  return;
1425
1436
  }
@@ -1455,7 +1466,7 @@ function ConnectedAgentCreator({
1455
1466
  title: `agent-${name}`,
1456
1467
  sections: {
1457
1468
  Agents: {
1458
- PERSONA: chunkWO7QAVTL_cjs.composePersona(name, values.persona),
1469
+ PERSONA: chunkT5I4NRFP_cjs.composePersona(name, values.persona),
1459
1470
  ...values.modelName ? { AGENT_MODEL_NAME: values.modelName } : {},
1460
1471
  ...Object.fromEntries(capabilities.map(({ key }) => [key, !!values.capabilities[key]])),
1461
1472
  ENABLED_SKILLS: values.capabilities.SKILLS_ENABLED && skills.length ? skills : null,
@@ -1478,7 +1489,7 @@ function ConnectedAgentCreator({
1478
1489
  };
1479
1490
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1480
1491
  /* @__PURE__ */ jsxRuntime.jsx(
1481
- chunkWO7QAVTL_cjs.AgentCreator,
1492
+ chunkT5I4NRFP_cjs.AgentCreator,
1482
1493
  {
1483
1494
  open: ready,
1484
1495
  onOpenChange,
@@ -1494,11 +1505,11 @@ function ConnectedAgentCreator({
1494
1505
  ) : void 0,
1495
1506
  revokingWorkspaceId: revokeAccess.isPending ? revokeAccess.variables?.workspaceId : void 0,
1496
1507
  avatar: (values) => /* @__PURE__ */ jsxRuntime.jsx(
1497
- chunkWO7QAVTL_cjs.AgentAvatarField,
1508
+ chunkT5I4NRFP_cjs.AgentAvatarField,
1498
1509
  {
1499
1510
  picture,
1500
1511
  isBusy: avatarBusy,
1501
- canGenerate: isEdit || chunkWO7QAVTL_cjs.isValidAgentName(values.name),
1512
+ canGenerate: isEdit || chunkT5I4NRFP_cjs.isValidAgentName(values.name),
1502
1513
  onGenerate: () => handleGenerateAvatar(values)
1503
1514
  }
1504
1515
  ),
@@ -1550,7 +1561,7 @@ function ConnectedAgentCreator({
1550
1561
  /* @__PURE__ */ jsxRuntime.jsx(ui.DialogTitle, { children: "Connect your agent" }),
1551
1562
  /* @__PURE__ */ jsxRuntime.jsx(ui.DialogDescription, { children: "This key is shown once. Run the script on the machine that will host the agent." })
1552
1563
  ] }),
1553
- connect && /* @__PURE__ */ jsxRuntime.jsx(chunkWO7QAVTL_cjs.AgentConnectInstructions, { email: connect.email, signingKey: connect.signingKey })
1564
+ connect && /* @__PURE__ */ jsxRuntime.jsx(chunkT5I4NRFP_cjs.AgentConnectInstructions, { email: connect.email, signingKey: connect.signingKey })
1554
1565
  ]
1555
1566
  }
1556
1567
  ) })
@@ -1587,7 +1598,7 @@ function ConnectedWorkflowHistory({
1587
1598
  const { openConversation } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
1588
1599
  const { data: runs = [], isLoading } = react$1.useWorkflowRuns(workflow?.external_id);
1589
1600
  return /* @__PURE__ */ jsxRuntime.jsx(
1590
- chunkWO7QAVTL_cjs.TaskRunsDialog,
1601
+ chunkT5I4NRFP_cjs.TaskRunsDialog,
1591
1602
  {
1592
1603
  inline,
1593
1604
  hideHeader,
@@ -1623,14 +1634,14 @@ function ConnectedTaskActivityDialog({
1623
1634
  const activity = react$1.useConversationActivity(conversationId, { live });
1624
1635
  const { data: agents = [] } = react$1.useAgents();
1625
1636
  const { userId } = chunkGFNELPDP_cjs.useConnectedWorkspace();
1626
- const { members } = chunkULPFRK3J_cjs.useConnectedWorkspaceRole();
1637
+ const { members } = chunkAINU3EJ6_cjs.useConnectedWorkspaceRole();
1627
1638
  const renderPerson = react.useCallback(
1628
1639
  (id) => {
1629
1640
  const isMe = !!id && id === userId;
1630
1641
  const member = members.find((m) => m.user.external_id === id)?.user;
1631
1642
  const name = member && [member.given_name, member.family_name].filter(Boolean).join(" ") || member?.email;
1632
1643
  const person = { id, label: isMe ? "You" : name || "Someone", isMe };
1633
- return renderTaskPerson ? renderTaskPerson(person) : /* @__PURE__ */ jsxRuntime.jsx(chunkNSNHRZBH_cjs.PersonPill, { person });
1644
+ return renderTaskPerson ? renderTaskPerson(person) : /* @__PURE__ */ jsxRuntime.jsx(chunkIL3WB3YX_cjs.PersonPill, { person });
1634
1645
  },
1635
1646
  [renderTaskPerson, userId, members]
1636
1647
  );
@@ -1639,7 +1650,7 @@ function ConnectedTaskActivityDialog({
1639
1650
  [agents]
1640
1651
  );
1641
1652
  return /* @__PURE__ */ jsxRuntime.jsx(
1642
- chunkWO7QAVTL_cjs.TaskActivityDialog,
1653
+ chunkT5I4NRFP_cjs.TaskActivityDialog,
1643
1654
  {
1644
1655
  open: true,
1645
1656
  onOpenChange: (open) => !open && onClose(),
@@ -1785,7 +1796,7 @@ function useWorkflowThread(workflow, options = {}) {
1785
1796
  );
1786
1797
  const conversation = conversations.data?.find((c) => c.external_id === threadId);
1787
1798
  const steps = react.useMemo(
1788
- () => chunkJSTKEZBS_cjs.workflowSteps(workflow).length > 0 ? chunkJSTKEZBS_cjs.workflowSteps(workflow) : chunkWO7QAVTL_cjs.fromPlanSteps(conversation?.plan?.steps ?? []),
1799
+ () => chunkJSTKEZBS_cjs.workflowSteps(workflow).length > 0 ? chunkJSTKEZBS_cjs.workflowSteps(workflow) : chunkT5I4NRFP_cjs.fromPlanSteps(conversation?.plan?.steps ?? []),
1789
1800
  [workflow, conversation?.plan?.steps]
1790
1801
  );
1791
1802
  const activity = react$1.useConversationActivity(threadId, { live: !!threadId });
@@ -1845,7 +1856,7 @@ function useWorkflowThread(workflow, options = {}) {
1845
1856
  criteria: [],
1846
1857
  max_passes: 3,
1847
1858
  documents: [],
1848
- steps: chunkWO7QAVTL_cjs.toPlanSteps(workflow, {
1859
+ steps: chunkT5I4NRFP_cjs.toPlanSteps(workflow, {
1849
1860
  inputs: values,
1850
1861
  resolveWorkflow: options.resolveWorkflow,
1851
1862
  compose: options.compose
@@ -1932,7 +1943,7 @@ function useWorkflowThread(workflow, options = {}) {
1932
1943
  const anyRunning = Object.values(states).some((s) => s.status === "running");
1933
1944
  const needsStart = !threadId || idle && !anyRunning;
1934
1945
  const runError = idle ? conversation?.last_error ?? null : null;
1935
- const view = chunkWO7QAVTL_cjs.useWorkflowView({
1946
+ const view = chunkT5I4NRFP_cjs.useWorkflowView({
1936
1947
  steps,
1937
1948
  states,
1938
1949
  inputs,
@@ -2100,7 +2111,7 @@ function WorkflowWordDialog({
2100
2111
  title: title ?? labels.wordTitle,
2101
2112
  size: "xl",
2102
2113
  testId: "workflow-word-dialog",
2103
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { className: "h-[70dvh] p-0", children: /* @__PURE__ */ jsxRuntime.jsx(chunkULPFRK3J_cjs.ConnectedNativeDocxEditor, { documentId: id, title: title ?? labels.wordTitle }) })
2114
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { className: "h-[70dvh] p-0", children: /* @__PURE__ */ jsxRuntime.jsx(chunkAINU3EJ6_cjs.ConnectedNativeDocxEditor, { documentId: id, title: title ?? labels.wordTitle }) })
2104
2115
  }
2105
2116
  );
2106
2117
  }
@@ -2409,7 +2420,7 @@ function ConnectedWorkflowRunner({
2409
2420
  );
2410
2421
  };
2411
2422
  const runner = (compact) => /* @__PURE__ */ jsxRuntime.jsx(
2412
- chunkWO7QAVTL_cjs.WorkflowRunner,
2423
+ chunkT5I4NRFP_cjs.WorkflowRunner,
2413
2424
  {
2414
2425
  people,
2415
2426
  ...runnerProps,
@@ -2455,7 +2466,7 @@ function ConnectedWorkflowRunner({
2455
2466
  ) }),
2456
2467
  inThread && conversationId ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2457
2468
  /* @__PURE__ */ jsxRuntime.jsx(
2458
- chunkWO7QAVTL_cjs.WorkflowStepBar,
2469
+ chunkT5I4NRFP_cjs.WorkflowStepBar,
2459
2470
  {
2460
2471
  run: view,
2461
2472
  levels: chunkJSTKEZBS_cjs.stepLevels(view.steps),
@@ -2656,7 +2667,7 @@ function ConnectedTagTable({
2656
2667
  const fail = (e) => setError(e instanceof Error ? e.message : String(e));
2657
2668
  const snapshot = (data) => {
2658
2669
  const title = exportTitle ?? KIND_TITLES[kind];
2659
- const bytes = chunk34GDGE77_cjs.tagTableDocx(data, {
2670
+ const bytes = chunkLTU35TQN_cjs.tagTableDocx(data, {
2660
2671
  title,
2661
2672
  nameOf: (id) => people.find((p) => p.value === id)?.label
2662
2673
  });
@@ -2666,7 +2677,7 @@ function ConnectedTagTable({
2666
2677
  };
2667
2678
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
2668
2679
  /* @__PURE__ */ jsxRuntime.jsx(
2669
- chunk34GDGE77_cjs.TagTable,
2680
+ chunkLTU35TQN_cjs.TagTable,
2670
2681
  {
2671
2682
  ...props,
2672
2683
  table,
@@ -2813,13 +2824,13 @@ function ConnectedProfileCard({
2813
2824
  }
2814
2825
  });
2815
2826
  const display = profile?.fullName || "Unnamed";
2816
- return /* @__PURE__ */ jsxRuntime.jsxs(chunkU73KPFYH_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserCircle, {}), title, children: [
2827
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunkU37AYUPI_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserCircle, {}), title, children: [
2817
2828
  /* @__PURE__ */ jsxRuntime.jsx(
2818
- chunkU73KPFYH_cjs.ProfileCard,
2829
+ chunkU37AYUPI_cjs.ProfileCard,
2819
2830
  {
2820
2831
  avatar: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2821
2832
  /* @__PURE__ */ jsxRuntime.jsx(
2822
- chunkU73KPFYH_cjs.AvatarPicker,
2833
+ chunkU37AYUPI_cjs.AvatarPicker,
2823
2834
  {
2824
2835
  pictureUrl: profile?.picture,
2825
2836
  initials: chunkKDG6FER6_cjs.initials(display),
@@ -2866,9 +2877,9 @@ function ConnectedIdentityVerification({
2866
2877
  onNameAccepted: () => notify("Name updated to match your ID", "success")
2867
2878
  });
2868
2879
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2869
- /* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.IdentityVerificationCard, { flow, labels, onManageBilling }),
2880
+ /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.IdentityVerificationCard, { flow, labels, onManageBilling }),
2870
2881
  /* @__PURE__ */ jsxRuntime.jsx(
2871
- chunkU73KPFYH_cjs.IdentityVerificationDialog,
2882
+ chunkU37AYUPI_cjs.IdentityVerificationDialog,
2872
2883
  {
2873
2884
  flow,
2874
2885
  accountName: profile?.fullName ?? "",
@@ -2881,7 +2892,7 @@ function ConnectedIdentityVerification({
2881
2892
  function ConnectedRequireVerified({ children, labels }) {
2882
2893
  const { data: profile } = react$1.useProfile();
2883
2894
  const flow = react$1.useIdentityVerification();
2884
- return /* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.RequireVerified, { flow, accountName: profile?.fullName ?? "", labels, children });
2895
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.RequireVerified, { flow, accountName: profile?.fullName ?? "", labels, children });
2885
2896
  }
2886
2897
  function defaultUnmetPasswordRequirement(password) {
2887
2898
  if (password.length < 8) return "Minimum 8 characters";
@@ -2914,7 +2925,7 @@ function ConnectedPasswordChangeDialog({
2914
2925
  onRecoveryComplete
2915
2926
  });
2916
2927
  return /* @__PURE__ */ jsxRuntime.jsx(
2917
- chunkU73KPFYH_cjs.PasswordChangeDialog,
2928
+ chunkU37AYUPI_cjs.PasswordChangeDialog,
2918
2929
  {
2919
2930
  open,
2920
2931
  onClose: form.onCancel,
@@ -2940,10 +2951,10 @@ function ConnectedSecuritySection({
2940
2951
  children
2941
2952
  }) {
2942
2953
  const [open, setOpen] = react.useState(false);
2943
- return /* @__PURE__ */ jsxRuntime.jsxs(chunkU73KPFYH_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.KeyRound, {}), title: "Security", children: [
2944
- /* @__PURE__ */ jsxRuntime.jsxs(chunkU73KPFYH_cjs.SettingsCard, { padding: "sm", children: [
2954
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunkU37AYUPI_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.KeyRound, {}), title: "Security", children: [
2955
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkU37AYUPI_cjs.SettingsCard, { padding: "sm", children: [
2945
2956
  /* @__PURE__ */ jsxRuntime.jsx(
2946
- chunkU73KPFYH_cjs.SettingsActionRow,
2957
+ chunkU37AYUPI_cjs.SettingsActionRow,
2947
2958
  {
2948
2959
  title: "Change password",
2949
2960
  description: "Used to sign in and to unlock your account key. Changing it keeps everything readable and re-encrypts nothing.",
@@ -2964,23 +2975,23 @@ function ConnectedSecuritySection({
2964
2975
  ] });
2965
2976
  }
2966
2977
  function ConnectedNotificationPreferences({
2967
- categories = chunkU73KPFYH_cjs.EMAIL_NOTIFICATION_CATEGORIES,
2978
+ categories = chunkU37AYUPI_cjs.EMAIL_NOTIFICATION_CATEGORIES,
2968
2979
  title = "Notifications"
2969
2980
  }) {
2970
2981
  const keys = react.useMemo(
2971
- () => categories === chunkU73KPFYH_cjs.EMAIL_NOTIFICATION_CATEGORIES ? chunkU73KPFYH_cjs.EMAIL_NOTIFICATION_KEYS : categories.map((c) => c.key),
2982
+ () => categories === chunkU37AYUPI_cjs.EMAIL_NOTIFICATION_CATEGORIES ? chunkU37AYUPI_cjs.EMAIL_NOTIFICATION_KEYS : categories.map((c) => c.key),
2972
2983
  [categories]
2973
2984
  );
2974
2985
  const prefs = react$1.useNotificationPreferences(keys);
2975
- return /* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.SettingsSection, { title, children: /* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.SettingsCard, { className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx(
2976
- chunkU73KPFYH_cjs.NotificationCategoryList,
2986
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.SettingsSection, { title, children: /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.SettingsCard, { className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx(
2987
+ chunkU37AYUPI_cjs.NotificationCategoryList,
2977
2988
  {
2978
2989
  masterId: "emailNotifications",
2979
2990
  masterTitle: "Email Notifications",
2980
2991
  masterDescription: "Email me about activity when I\u2019m away",
2981
2992
  masterChecked: prefs.masterChecked,
2982
2993
  onMasterChange: prefs.setAll,
2983
- categories: chunkU73KPFYH_cjs.toNotificationCategories(prefs.checked, categories),
2994
+ categories: chunkU37AYUPI_cjs.toNotificationCategories(prefs.checked, categories),
2984
2995
  onCategoryChange: prefs.setCategory
2985
2996
  }
2986
2997
  ) }) });
@@ -2993,14 +3004,14 @@ function ConnectedSessionsRow({
2993
3004
  const sessions = react$1.useSessions({ enabled: open });
2994
3005
  const currentSessionId = react$1.useCurrentSessionId();
2995
3006
  const terminate = react$1.useTerminateSession();
2996
- const views = chunkU73KPFYH_cjs.toActiveSessionViews(sessions.data ?? [], {
3007
+ const views = chunkU37AYUPI_cjs.toActiveSessionViews(sessions.data ?? [], {
2997
3008
  currentSessionId,
2998
3009
  terminatingId: terminate.isPending ? terminate.variables : null,
2999
3010
  renderIcon: renderSessionIcon
3000
3011
  });
3001
3012
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3002
3013
  /* @__PURE__ */ jsxRuntime.jsx(
3003
- chunkU73KPFYH_cjs.SettingsRow,
3014
+ chunkU37AYUPI_cjs.SettingsRow,
3004
3015
  {
3005
3016
  label: "Active sessions",
3006
3017
  description: "Devices and agents currently signed in to your account.",
@@ -3022,7 +3033,7 @@ function ConnectedSessionsRow({
3022
3033
  }
3023
3034
  ),
3024
3035
  /* @__PURE__ */ jsxRuntime.jsx(
3025
- chunkU73KPFYH_cjs.ActiveSessionsDialog,
3036
+ chunkU37AYUPI_cjs.ActiveSessionsDialog,
3026
3037
  {
3027
3038
  open,
3028
3039
  onOpenChange: setOpen,
@@ -3064,7 +3075,7 @@ function ConnectedLogoutDialog({
3064
3075
  signOut.mutate({ everywhere, reason: "manual" });
3065
3076
  };
3066
3077
  return /* @__PURE__ */ jsxRuntime.jsx(
3067
- chunkU73KPFYH_cjs.LogoutDialog,
3078
+ chunkU37AYUPI_cjs.LogoutDialog,
3068
3079
  {
3069
3080
  open,
3070
3081
  onClose,
@@ -3072,7 +3083,7 @@ function ConnectedLogoutDialog({
3072
3083
  onLogoutAll: () => void run(true),
3073
3084
  canLogoutAll,
3074
3085
  isOnline,
3075
- sessions: chunkU73KPFYH_cjs.toLogoutSessionViews(sessions.data ?? []),
3086
+ sessions: chunkU37AYUPI_cjs.toLogoutSessionViews(sessions.data ?? []),
3076
3087
  renderSessionIcon
3077
3088
  }
3078
3089
  );
@@ -3094,7 +3105,7 @@ function ConnectedDangerZone({ renderSubscriptionLink }) {
3094
3105
  });
3095
3106
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3096
3107
  /* @__PURE__ */ jsxRuntime.jsx(
3097
- chunkU73KPFYH_cjs.SettingsDangerZone,
3108
+ chunkU37AYUPI_cjs.SettingsDangerZone,
3098
3109
  {
3099
3110
  isOpen: zoneOpen,
3100
3111
  onToggle: () => setZoneOpen((o) => !o),
@@ -3114,12 +3125,12 @@ function ConnectedDangerZone({ renderSubscriptionLink }) {
3114
3125
  }
3115
3126
  ),
3116
3127
  /* @__PURE__ */ jsxRuntime.jsx(
3117
- chunkU73KPFYH_cjs.DeleteAccountDialog,
3128
+ chunkU37AYUPI_cjs.DeleteAccountDialog,
3118
3129
  {
3119
3130
  open: dialogOpen,
3120
3131
  onClose: flow.onClose,
3121
3132
  step: flow.step,
3122
- blockers: chunkU73KPFYH_cjs.toDeleteBlockerViews(flow.blockers, renderSubscriptionLink),
3133
+ blockers: chunkU37AYUPI_cjs.toDeleteBlockerViews(flow.blockers, renderSubscriptionLink),
3123
3134
  onContinue: flow.onContinue,
3124
3135
  onBack: flow.onBack,
3125
3136
  userEmail,
@@ -3134,7 +3145,7 @@ function ConnectedDangerZone({ renderSubscriptionLink }) {
3134
3145
  function ServerConnectionRow({ onRefresh, ...status }) {
3135
3146
  const { runtimeConfig } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
3136
3147
  const [isRefreshing, setIsRefreshing] = react.useState(false);
3137
- const view = chunkU73KPFYH_cjs.serverConnectionView(status, runtimeConfig.deploymentDomain || "server");
3148
+ const view = chunkU37AYUPI_cjs.serverConnectionView(status, runtimeConfig.deploymentDomain || "server");
3138
3149
  const refresh = async () => {
3139
3150
  setIsRefreshing(true);
3140
3151
  try {
@@ -3143,8 +3154,8 @@ function ServerConnectionRow({ onRefresh, ...status }) {
3143
3154
  setIsRefreshing(false);
3144
3155
  }
3145
3156
  };
3146
- return /* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.SettingsRow, { label: "Server connection", description: view.description, children: /* @__PURE__ */ jsxRuntime.jsx(
3147
- chunkU73KPFYH_cjs.ServerConnectionButton,
3157
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.SettingsRow, { label: "Server connection", description: view.description, children: /* @__PURE__ */ jsxRuntime.jsx(
3158
+ chunkU37AYUPI_cjs.ServerConnectionButton,
3148
3159
  {
3149
3160
  state: view.state,
3150
3161
  label: view.label,
@@ -3166,7 +3177,7 @@ function ConnectedAccountSettings({
3166
3177
  renderSubscriptionLink
3167
3178
  }) {
3168
3179
  const [logoutOpen, setLogoutOpen] = react.useState(false);
3169
- return /* @__PURE__ */ jsxRuntime.jsxs(chunkU73KPFYH_cjs.SettingsPanel, { className: "max-w-2xl", children: [
3180
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunkU37AYUPI_cjs.SettingsPanel, { className: "max-w-2xl", children: [
3170
3181
  /* @__PURE__ */ jsxRuntime.jsx(ConnectedProfileCard, { avatarClassName, children: /* @__PURE__ */ jsxRuntime.jsx(
3171
3182
  ConnectedIdentityVerification,
3172
3183
  {
@@ -3176,10 +3187,10 @@ function ConnectedAccountSettings({
3176
3187
  ) }),
3177
3188
  afterProfile,
3178
3189
  /* @__PURE__ */ jsxRuntime.jsx(ConnectedSecuritySection, { getUnmetRequirement: getUnmetPasswordRequirement, children: securityRows }),
3179
- /* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wifi, {}), title: "Session", children: /* @__PURE__ */ jsxRuntime.jsxs(chunkU73KPFYH_cjs.SettingsCard, { children: [
3190
+ /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Wifi, {}), title: "Session", children: /* @__PURE__ */ jsxRuntime.jsxs(chunkU37AYUPI_cjs.SettingsCard, { children: [
3180
3191
  connection && /* @__PURE__ */ jsxRuntime.jsx(ServerConnectionRow, { ...connection }),
3181
3192
  /* @__PURE__ */ jsxRuntime.jsx(ConnectedSessionsRow, { renderSessionIcon }),
3182
- /* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.SettingsRow, { label: "Logout", description: "Sign out of your account on this device.", children: /* @__PURE__ */ jsxRuntime.jsxs(
3193
+ /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.SettingsRow, { label: "Logout", description: "Sign out of your account on this device.", children: /* @__PURE__ */ jsxRuntime.jsxs(
3183
3194
  ui.Button,
3184
3195
  {
3185
3196
  type: "button",
@@ -3461,10 +3472,10 @@ function ConnectedPrivacySettings({
3461
3472
  const update = react$1.useUpdateUserSettings();
3462
3473
  const hideOnlineStatus = settings?.hide_online_status ?? false;
3463
3474
  const dismissedTips = settings?.dismissed_tips ?? [];
3464
- return /* @__PURE__ */ jsxRuntime.jsxs(chunkU73KPFYH_cjs.SettingsPanel, { className: "max-w-2xl", children: [
3465
- /* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.SettingsSection, { title: "Privacy and tips", children: /* @__PURE__ */ jsxRuntime.jsxs(chunkU73KPFYH_cjs.SettingsCard, { children: [
3475
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunkU37AYUPI_cjs.SettingsPanel, { className: "max-w-2xl", children: [
3476
+ /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.SettingsSection, { title: "Privacy and tips", children: /* @__PURE__ */ jsxRuntime.jsxs(chunkU37AYUPI_cjs.SettingsCard, { children: [
3466
3477
  /* @__PURE__ */ jsxRuntime.jsx(
3467
- chunkU73KPFYH_cjs.SettingsRow,
3478
+ chunkU37AYUPI_cjs.SettingsRow,
3468
3479
  {
3469
3480
  label: "Show Online Status",
3470
3481
  labelFor: "showOnlineStatus",
@@ -3482,7 +3493,7 @@ function ConnectedPrivacySettings({
3482
3493
  ),
3483
3494
  rows,
3484
3495
  showTipsReset && /* @__PURE__ */ jsxRuntime.jsx(
3485
- chunkU73KPFYH_cjs.SettingsRow,
3496
+ chunkU37AYUPI_cjs.SettingsRow,
3486
3497
  {
3487
3498
  label: "Hidden tips",
3488
3499
  description: "Restore any Smart Tips you\u2019ve hidden with \u201Cdon\u2019t show again\u201D.",
@@ -3546,13 +3557,13 @@ var COLUMNS = [
3546
3557
  flex: 1,
3547
3558
  minWidth: 120,
3548
3559
  cellRenderer: (params) => isStandard(params.data) ? /* @__PURE__ */ jsxRuntime.jsx(
3549
- chunkU73KPFYH_cjs.ModelProviderLabel,
3560
+ chunkU37AYUPI_cjs.ModelProviderLabel,
3550
3561
  {
3551
3562
  logo: /* @__PURE__ */ jsxRuntime.jsx("img", { src: "/favicon.svg", alt: "ARBI", className: "size-3.5 flex-shrink-0 rounded-sm" }),
3552
3563
  children: "ARBI CITY"
3553
3564
  }
3554
3565
  ) : /* @__PURE__ */ jsxRuntime.jsx(
3555
- chunkU73KPFYH_cjs.ModelProviderLabel,
3566
+ chunkU37AYUPI_cjs.ModelProviderLabel,
3556
3567
  {
3557
3568
  logo: /* @__PURE__ */ jsxRuntime.jsx(react$1.ProviderIcon, { modelName: params.data?.model_name, provider: params.value, size: 14 }),
3558
3569
  children: PROVIDER_NAMES[params.value ?? ""] || params.value || "\u2014"
@@ -3628,8 +3639,8 @@ function ConnectedPremiumModels() {
3628
3639
  [save]
3629
3640
  );
3630
3641
  if (premiumModels.length === 0) return null;
3631
- return /* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.SettingsPanel, { className: "max-w-2xl space-y-4", children: /* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.SettingsSection, { title: "Premium models", children: /* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.SettingsCard, { className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx(
3632
- chunkU73KPFYH_cjs.PremiumModelsFrame,
3642
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.SettingsPanel, { className: "max-w-2xl space-y-4", children: /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.SettingsSection, { title: "Premium models", children: /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.SettingsCard, { className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx(
3643
+ chunkU37AYUPI_cjs.PremiumModelsFrame,
3633
3644
  {
3634
3645
  enabled: premiumModel !== "",
3635
3646
  onEnabledChange: (enabled) => {
@@ -3653,11 +3664,269 @@ function ConnectedPremiumModels() {
3653
3664
  }
3654
3665
  ) }) }) });
3655
3666
  }
3667
+ var FAMILY_PRESENTATION = {
3668
+ microsoft: {
3669
+ name: "Microsoft",
3670
+ description: "One Microsoft connection covers both Outlook (email) and OneDrive (files) \u2014 import documents from either into a workspace.",
3671
+ descriptionWithSharePoint: "One Microsoft connection covers Outlook (email), OneDrive and SharePoint (files) \u2014 import documents from any of them into a workspace."
3672
+ },
3673
+ gmail: {
3674
+ name: "Google",
3675
+ description: "One Google connection covers both Gmail (email) and Google Drive (files) \u2014 import documents from either into a workspace."
3676
+ }
3677
+ };
3678
+ var EMAIL_AND_DRIVE_SUBTITLE = [
3679
+ "Connect Microsoft or Google once \u2014 a single connection lets you import documents",
3680
+ "from both their email (Outlook / Gmail) and their cloud storage (OneDrive / Google Drive)",
3681
+ "into a workspace."
3682
+ ].join(" ");
3683
+ function toConnectionCardView(catalog, userConnector, options) {
3684
+ const isConnected = !!userConnector;
3685
+ const presentation = FAMILY_PRESENTATION[catalog.vendor_key];
3686
+ const description = (options.sharePointVisible ? presentation?.descriptionWithSharePoint : void 0) ?? presentation?.description ?? catalog.description;
3687
+ return {
3688
+ id: catalog.vendor_key,
3689
+ title: presentation?.name ?? catalog.display_name,
3690
+ description: description ?? void 0,
3691
+ iconUrl: catalog.icon_url,
3692
+ iconAlt: catalog.display_name,
3693
+ status: isConnected ? "connected" : catalog.requires_per_user_auth ? "available" : "organisation",
3694
+ justConnected: options.justConnected,
3695
+ identity: userConnector?.vendor_user_identity,
3696
+ warning: isConnected && userConnector?.token_scheme === "env" ? "Reconnect to upgrade security \u2014 your access token isn't yet bound to your session." : void 0,
3697
+ note: !catalog.requires_per_user_auth && !isConnected ? "Enabled for your organisation \u2014 no personal login required" : void 0,
3698
+ // Mailbox connectors show a read-only notice when native mail writes are disabled; sync is
3699
+ // configured per-workspace from the Add-files flow, not on this tab.
3700
+ showReadOnlyNotice: react$1.isMailboxSyncVendor(catalog.vendor_key) && !options.mailWriteEnabled,
3701
+ isDisconnecting: options.isDisconnecting
3702
+ };
3703
+ }
3704
+ function ConnectedAppsSettings({
3705
+ justConnectedVendor = null,
3706
+ onJustConnectedSeen
3707
+ }) {
3708
+ const arbi = react$1.useArbi();
3709
+ const { notify, navigate } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
3710
+ const { data: mailPolicy } = react$1.useMailPolicy();
3711
+ const isVendorVisible = react$1.useConnectorVendorVisibility();
3712
+ react.useEffect(() => {
3713
+ if (!justConnectedVendor || !onJustConnectedSeen) return;
3714
+ const timer = setTimeout(onJustConnectedSeen, 4e3);
3715
+ return () => clearTimeout(timer);
3716
+ }, [justConnectedVendor, onJustConnectedSeen]);
3717
+ react.useEffect(() => {
3718
+ if (!justConnectedVendor) return;
3719
+ void arbi.connectors.bridgeTokens({ vendor: justConnectedVendor });
3720
+ }, [justConnectedVendor, arbi]);
3721
+ const {
3722
+ data: catalog = [],
3723
+ isLoading: catalogLoading,
3724
+ error: catalogError
3725
+ } = react$1.useConnectorCatalog();
3726
+ const { data: myConnectors = [], isLoading: myLoading } = react$1.useMyConnectors();
3727
+ const disconnect = react$1.useDisconnectConnector();
3728
+ const {
3729
+ data: slackConnection,
3730
+ isLoading: slackLoading,
3731
+ isPending: slackStatusPendingQuery,
3732
+ isFetching: slackStatusFetching,
3733
+ isError: slackStatusError,
3734
+ refetch: refetchSlackConnection
3735
+ } = react$1.useSlackConnection();
3736
+ const slackStatusPending = slackStatusPendingQuery || slackStatusFetching || justConnectedVendor === "slack" && !slackConnection?.connected && !slackStatusError;
3737
+ const disconnectSlack = react$1.useDisconnectSlack();
3738
+ const { data: agents = [] } = react$1.useAgents();
3739
+ const [slackAgentId, setSlackAgentId] = react.useState("");
3740
+ const { data: slackAgentWorkspaces = [], isLoading: slackAgentWorkspacesLoading } = react$1.useAgentWorkspaces(slackAgentId, { enabled: Boolean(slackAgentId) });
3741
+ const [slackAuthorizing, setSlackAuthorizing] = react.useState(false);
3742
+ const [slackAgentEditorOpen, setSlackAgentEditorOpen] = react.useState(false);
3743
+ const isLoading = catalogLoading || myLoading;
3744
+ const connectedByVendor = Object.fromEntries(myConnectors.map((uc) => [uc.vendor_key, uc]));
3745
+ const handleConnect = async (vendorKey) => {
3746
+ navigate(await arbi.connectors.authorize(vendorKey));
3747
+ };
3748
+ const handleSlackConnect = async () => {
3749
+ if (!slackAgentId) return;
3750
+ setSlackAuthorizing(true);
3751
+ try {
3752
+ navigate(await arbi.connectors.slack.authorize(slackAgentId));
3753
+ } catch (error) {
3754
+ notify(
3755
+ error instanceof Error ? error.message : "Could not start Slack authorization",
3756
+ "error"
3757
+ );
3758
+ setSlackAuthorizing(false);
3759
+ }
3760
+ };
3761
+ const handleDisconnect = (vendorKey) => {
3762
+ disconnect.mutate({ vendorKey });
3763
+ if (vendorKey === "microsoft") {
3764
+ for (const spVendor of react$1.SHAREPOINT_VENDORS) {
3765
+ if (connectedByVendor[spVendor]) {
3766
+ disconnect.mutate({ vendorKey: spVendor });
3767
+ }
3768
+ }
3769
+ }
3770
+ };
3771
+ if (isLoading) {
3772
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.ConnectionsLoading, { message: "Loading connected apps\u2026" });
3773
+ }
3774
+ if (catalogError) {
3775
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.ConnectionsError, { message: "Failed to load connector catalog. Please refresh and try again." });
3776
+ }
3777
+ const visibleCatalog = catalog.filter((c) => isVendorVisible(c.vendor_key));
3778
+ const sharePointVisible = isVendorVisible("microsoft_sharepoint");
3779
+ const emailCatalog = visibleCatalog.filter((c) => react$1.isMailboxSyncVendor(c.vendor_key));
3780
+ const mcpCatalog = visibleCatalog.filter(
3781
+ (c) => !react$1.isMailboxSyncVendor(c.vendor_key) && !react$1.isSharePointVendor(c.vendor_key)
3782
+ );
3783
+ const renderCard = (entry) => /* @__PURE__ */ jsxRuntime.jsx(
3784
+ chunkU37AYUPI_cjs.ConnectionCard,
3785
+ {
3786
+ connection: toConnectionCardView(entry, connectedByVendor[entry.vendor_key], {
3787
+ isDisconnecting: disconnect.isPending && disconnect.variables?.vendorKey === entry.vendor_key,
3788
+ sharePointVisible,
3789
+ mailWriteEnabled: mailPolicy?.enabled_providers.includes(entry.vendor_key) ?? false,
3790
+ // A `?connected=microsoft_sharepoint` return has no card of its own — alias
3791
+ // it to the Microsoft family card so its "Just connected" badge still lights.
3792
+ justConnected: justConnectedVendor === entry.vendor_key || entry.vendor_key === "microsoft" && react$1.isSharePointVendor(justConnectedVendor ?? "")
3793
+ }),
3794
+ onConnect: handleConnect,
3795
+ onDisconnect: handleDisconnect
3796
+ },
3797
+ entry.vendor_key
3798
+ );
3799
+ const renderGroup = (title, subtitle, icon2, entries) => {
3800
+ if (entries.length === 0) return null;
3801
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.SettingsSection, { icon: icon2, title, children: /* @__PURE__ */ jsxRuntime.jsxs(chunkU37AYUPI_cjs.SettingsCard, { className: "space-y-3", children: [
3802
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: subtitle }),
3803
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2", children: entries.map(renderCard) })
3804
+ ] }) });
3805
+ };
3806
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunkU37AYUPI_cjs.SettingsPanel, { className: "max-w-2xl", children: [
3807
+ /* @__PURE__ */ jsxRuntime.jsxs("section", { className: "rounded-xl border border-border bg-card px-5 py-4", children: [
3808
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex items-start gap-4", children: [
3809
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-0.5 flex h-10 w-10 shrink-0 items-center justify-center rounded-lg border border-border bg-background text-muted-foreground", children: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Mail, { className: "h-5 w-5" }) }),
3810
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "min-w-0 flex-1", children: [
3811
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "font-heading text-sm font-semibold text-foreground", children: "Slack" }),
3812
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-0.5 text-sm text-muted-foreground", children: "Connect Slack to an existing ARBI agent. The agent uses its configured default workspace." }),
3813
+ slackConnection?.connected && /* @__PURE__ */ jsxRuntime.jsxs("p", { className: "mt-1 text-xs text-muted-foreground", children: [
3814
+ "Connected to ",
3815
+ slackConnection.agent_name
3816
+ ] })
3817
+ ] }),
3818
+ slackConnection?.connected ? /* @__PURE__ */ jsxRuntime.jsxs(
3819
+ ui.Button,
3820
+ {
3821
+ variant: "outline",
3822
+ size: "sm",
3823
+ onClick: () => disconnectSlack.mutate(),
3824
+ disabled: disconnectSlack.isPending,
3825
+ className: "text-destructive hover:bg-destructive/10 hover:text-destructive",
3826
+ children: [
3827
+ disconnectSlack.isPending ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "mr-1.5 h-3.5 w-3.5 animate-spin" }) : null,
3828
+ "Disconnect"
3829
+ ]
3830
+ }
3831
+ ) : slackStatusPending ? /* @__PURE__ */ jsxRuntime.jsxs(ui.Badge, { variant: "outline", className: "gap-1.5 text-muted-foreground", children: [
3832
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "h-3 w-3 animate-spin" }),
3833
+ "Pending"
3834
+ ] }) : slackStatusError ? /* @__PURE__ */ jsxRuntime.jsx(ui.Button, { variant: "outline", size: "sm", onClick: () => void refetchSlackConnection(), children: "Retry status check" }) : slackConnection?.configured ? /* @__PURE__ */ jsxRuntime.jsx(ui.Badge, { variant: "outline", className: "text-muted-foreground", children: "Not connected" }) : /* @__PURE__ */ jsxRuntime.jsx(ui.Badge, { variant: "outline", className: "text-muted-foreground", children: "Unavailable" })
3835
+ ] }),
3836
+ !slackConnection?.connected && !slackStatusPending && /* @__PURE__ */ jsxRuntime.jsxs(
3837
+ "div",
3838
+ {
3839
+ className: "mt-4 flex flex-wrap items-end gap-3 border-t border-border/60 pt-4",
3840
+ "data-testid": "slack-agent-setup",
3841
+ children: [
3842
+ /* @__PURE__ */ jsxRuntime.jsxs("label", { className: "min-w-56 flex-1 space-y-1.5", children: [
3843
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-sm font-medium", children: "ARBI agent" }),
3844
+ /* @__PURE__ */ jsxRuntime.jsxs(
3845
+ "select",
3846
+ {
3847
+ className: "h-10 w-full rounded-md border border-input bg-background px-3 text-sm pointer-coarse:h-11",
3848
+ value: slackAgentId,
3849
+ onChange: (event) => setSlackAgentId(event.target.value),
3850
+ children: [
3851
+ /* @__PURE__ */ jsxRuntime.jsx("option", { value: "", children: "Choose an agent" }),
3852
+ agents.map((agent) => /* @__PURE__ */ jsxRuntime.jsx("option", { value: agent.external_id, children: agent.given_name || agent.email }, agent.external_id))
3853
+ ]
3854
+ }
3855
+ )
3856
+ ] }),
3857
+ /* @__PURE__ */ jsxRuntime.jsx(
3858
+ ui.Button,
3859
+ {
3860
+ variant: "outline",
3861
+ size: "sm",
3862
+ onClick: () => setSlackAgentEditorOpen(true),
3863
+ disabled: slackLoading || slackAuthorizing,
3864
+ children: "Create Slack agent"
3865
+ }
3866
+ ),
3867
+ /* @__PURE__ */ jsxRuntime.jsxs(
3868
+ ui.Button,
3869
+ {
3870
+ size: "sm",
3871
+ onClick: () => void handleSlackConnect(),
3872
+ disabled: !slackConnection?.configured || !slackAgentId || slackLoading || slackAuthorizing,
3873
+ children: [
3874
+ slackAuthorizing ? /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Loader2, { className: "mr-1.5 h-3.5 w-3.5 animate-spin" }) : /* @__PURE__ */ jsxRuntime.jsx(lucideReact.ExternalLink, { className: "mr-1.5 h-3.5 w-3.5" }),
3875
+ slackAuthorizing ? "Starting Slack authorization\u2026" : "Connect to Slack"
3876
+ ]
3877
+ }
3878
+ ),
3879
+ slackAgentId && /* @__PURE__ */ jsxRuntime.jsxs(
3880
+ "div",
3881
+ {
3882
+ className: "w-full rounded-md bg-muted/40 px-3 py-2 text-xs",
3883
+ "data-testid": "slack-agent-workspaces",
3884
+ children: [
3885
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "font-medium text-foreground", children: "Agent workspace access" }),
3886
+ slackAgentWorkspacesLoading ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-muted-foreground", children: "Loading access\u2026" }) : slackAgentWorkspaces.length ? /* @__PURE__ */ jsxRuntime.jsx("ul", { className: "mt-1 space-y-1", children: slackAgentWorkspaces.map((workspace) => /* @__PURE__ */ jsxRuntime.jsxs("li", { className: "flex flex-wrap gap-x-2", children: [
3887
+ /* @__PURE__ */ jsxRuntime.jsx("span", { children: workspace.name }),
3888
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: workspace.role }),
3889
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-muted-foreground", children: workspace.permanent ? "Standing access" : "Temporary access" }),
3890
+ workspace.is_default && /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-medium", children: "Slack default" })
3891
+ ] }, workspace.workspace_ext_id)) }) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "mt-1 text-muted-foreground", children: "No workspace access. Share a workspace with this agent in that workspace\u2019s Members settings." })
3892
+ ]
3893
+ }
3894
+ ),
3895
+ slackStatusError ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "w-full text-xs text-muted-foreground", children: "ARBI could not check Slack availability. Retry the status check above before connecting." }) : !slackConnection?.configured ? /* @__PURE__ */ jsxRuntime.jsx("p", { className: "w-full text-xs text-muted-foreground", children: "Slack is unavailable because this ARBI deployment has not configured its Slack app credentials. You can still create an agent and set its workspace access; an administrator must configure Slack before connecting." }) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "w-full text-xs text-muted-foreground", children: "Slack DMs wake this agent and receive replies there. It uses the marked default workspace; standing access is required." })
3896
+ ]
3897
+ }
3898
+ ),
3899
+ /* @__PURE__ */ jsxRuntime.jsx(
3900
+ ConnectedAgentCreator,
3901
+ {
3902
+ open: slackAgentEditorOpen,
3903
+ onOpenChange: setSlackAgentEditorOpen,
3904
+ initialName: "SlackAssistant",
3905
+ onSaved: (agentExtId) => {
3906
+ setSlackAgentId(agentExtId);
3907
+ setSlackAgentEditorOpen(false);
3908
+ }
3909
+ }
3910
+ )
3911
+ ] }),
3912
+ catalog.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.SettingsCard, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.ConnectionsEmpty, { message: "No connectors available yet." }) }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3913
+ renderGroup("Email & Drive", EMAIL_AND_DRIVE_SUBTITLE, /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Mail, {}), emailCatalog),
3914
+ renderGroup(
3915
+ "Apps & Integrations (MCP)",
3916
+ "Connect your legal tools so the ARBI agent can search them live during a conversation.",
3917
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PlugZap, {}),
3918
+ mcpCatalog
3919
+ )
3920
+ ] }),
3921
+ /* @__PURE__ */ jsxRuntime.jsx("p", { className: "px-1 text-xs text-muted-foreground", children: "ARBI requests only the minimum permissions needed. Your credentials are encrypted and never shared. You can disconnect at any time." })
3922
+ ] });
3923
+ }
3656
3924
  var SETTINGS_SECTION_IDS = {
3657
3925
  account: "account",
3658
3926
  mail: "mail",
3659
3927
  privacy: "privacy",
3660
- chat: "chat"
3928
+ chat: "chat",
3929
+ connectedApps: "connected-apps"
3661
3930
  };
3662
3931
  function accountSettingsSection(props) {
3663
3932
  return {
@@ -3691,6 +3960,14 @@ function chatSettingsSection() {
3691
3960
  render: () => /* @__PURE__ */ jsxRuntime.jsx(ConnectedPremiumModels, {})
3692
3961
  };
3693
3962
  }
3963
+ function connectedAppsSettingsSection(props) {
3964
+ return {
3965
+ id: SETTINGS_SECTION_IDS.connectedApps,
3966
+ label: "Connected Apps",
3967
+ icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.PlugZap, { className: "w-6 h-6" }),
3968
+ render: () => /* @__PURE__ */ jsxRuntime.jsx(ConnectedAppsSettings, { ...props })
3969
+ };
3970
+ }
3694
3971
  var DEFAULT_SETTINGS_SECTIONS = [
3695
3972
  accountSettingsSection(),
3696
3973
  privacySettingsSection(),
@@ -3709,7 +3986,7 @@ function ConnectedSettingsPage({
3709
3986
  }, [requested]);
3710
3987
  const controlled = section !== void 0;
3711
3988
  return /* @__PURE__ */ jsxRuntime.jsx(
3712
- chunkU73KPFYH_cjs.SettingsPage,
3989
+ chunkU37AYUPI_cjs.SettingsPage,
3713
3990
  {
3714
3991
  ...page,
3715
3992
  sections,
@@ -3721,6 +3998,983 @@ function ConnectedSettingsPage({
3721
3998
  }
3722
3999
  );
3723
4000
  }
4001
+ function errorDetail(err) {
4002
+ const e = err;
4003
+ const detail = e?.detail ?? e?.apiError?.detail ?? e?.response?.data?.detail ?? e?.error?.detail;
4004
+ if (typeof detail === "string" && detail) return detail;
4005
+ const message = detail?.message;
4006
+ return typeof message === "string" && message ? message : void 0;
4007
+ }
4008
+ function errorStatus(err) {
4009
+ const e = err;
4010
+ return e?.status ?? e?.response?.status;
4011
+ }
4012
+ var workspaceWord = () => ui.getEntityLabel("WORKSPACE").toLowerCase();
4013
+ var inviteMessage = (emails) => `${emails.length === 1 ? `${emails[0]} isn't on the platform yet.` : `These users aren't on the platform yet:
4014
+ ${emails.join("\n")}`}
4015
+
4016
+ Invite them by email? Once they sign up, they'll usually get access to this ${workspaceWord()} automatically \u2014 if not, they can request it themselves.`;
4017
+ function useConnectedWorkspaceSettings(workspaceId, { onLeft } = {}) {
4018
+ const { notify, confirm } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
4019
+ const { workspaceId: openWorkspaceId, userId } = chunkGFNELPDP_cjs.useConnectedWorkspace();
4020
+ const { data: workspaces } = react$1.useWorkspaces();
4021
+ const workspace = workspaces?.find((w) => w.external_id === workspaceId);
4022
+ const update = react$1.useUpdateWorkspace();
4023
+ const add = react$1.useAddWorkspaceMembers();
4024
+ const remove = react$1.useRemoveWorkspaceMembers();
4025
+ const members = workspace?.users ?? [];
4026
+ const role = members.find((m) => m.user.external_id === userId)?.role ?? null;
4027
+ const isOwner = role === "owner";
4028
+ const isMember = role !== null;
4029
+ const stillOpen = () => {
4030
+ if (!workspace) return false;
4031
+ if (openWorkspaceId === workspace.external_id) return true;
4032
+ notify(
4033
+ `Not saved: you switched to another ${workspaceWord()} first. Open "${workspace.name}" and try again.`,
4034
+ "warning"
4035
+ );
4036
+ return false;
4037
+ };
4038
+ const updateIdentity = async (data) => {
4039
+ if (!workspace || !stillOpen()) return;
4040
+ const changed = [
4041
+ ...data.name !== workspace.name ? ["name"] : [],
4042
+ ...data.description !== (workspace.description || "") ? ["description"] : []
4043
+ ];
4044
+ try {
4045
+ await update.mutateAsync({ name: data.name, description: data.description });
4046
+ if (changed.length > 0) {
4047
+ notify(`${ui.getEntityLabel("WORKSPACE")} ${changed.join(", ")} updated`, "success");
4048
+ }
4049
+ } catch (err) {
4050
+ notify(err instanceof Error ? err.message : "Failed to update workspace", "error");
4051
+ throw err;
4052
+ }
4053
+ };
4054
+ const setPublic = async (isPublic) => {
4055
+ if (!workspace || !stillOpen()) return;
4056
+ await update.mutateAsync({ is_public: isPublic });
4057
+ notify(`Workspace is now ${isPublic ? "common" : "members-only"}`, "success");
4058
+ };
4059
+ const invite = async (emails, memberRole) => {
4060
+ try {
4061
+ await add.mutateAsync({ emails, role: memberRole, confirmInvite: true });
4062
+ notify(
4063
+ emails.length === 1 ? `Invitation sent to ${emails[0]}` : `Invitations sent to ${emails.length} users`,
4064
+ "success"
4065
+ );
4066
+ } catch (err) {
4067
+ const detail = errorDetail(err);
4068
+ notify(
4069
+ detail ? `Couldn't send the invitation: ${detail}` : "Failed to send the invitation.",
4070
+ "error"
4071
+ );
4072
+ }
4073
+ };
4074
+ const share = async (emails, memberRole = "collaborator") => {
4075
+ if (!workspace) return "error";
4076
+ const current = new Set(members.map((m) => m.user.email.toLowerCase()));
4077
+ try {
4078
+ const added = new Set(
4079
+ (await add.mutateAsync({ emails, role: memberRole }) ?? []).map(
4080
+ (m) => m.user.email.toLowerCase()
4081
+ )
4082
+ );
4083
+ const failed = emails.filter((email) => !added.has(email.toLowerCase()));
4084
+ if (failed.length === 0) return "added";
4085
+ const already = failed.filter((email) => current.has(email.toLowerCase()));
4086
+ const unknown = failed.filter((email) => !current.has(email.toLowerCase()));
4087
+ if (added.size > 0) {
4088
+ notify(`Added ${added.size} ${added.size === 1 ? "member" : "members"}`, "success");
4089
+ }
4090
+ if (already.length > 0) {
4091
+ notify(
4092
+ already.length === 1 ? `${already[0]} is already a member` : `${already.length} users are already members`,
4093
+ "info"
4094
+ );
4095
+ }
4096
+ if (unknown.length > 0 && await confirm({
4097
+ message: inviteMessage(unknown),
4098
+ title: "Invite by email?",
4099
+ kind: "yesno"
4100
+ })) {
4101
+ await invite(unknown, memberRole);
4102
+ return added.size > 0 ? "partial" : "invited";
4103
+ }
4104
+ return added.size > 0 ? "partial" : "already_member";
4105
+ } catch (err) {
4106
+ const status = errorStatus(err);
4107
+ const detail = errorDetail(err) || "Failed to add member to workspace";
4108
+ const lower = detail.toLowerCase();
4109
+ if (lower.includes("already has access")) return "already_member";
4110
+ const notRegistered = status === 404 || lower.includes("not found") || lower.includes("no user") || lower.includes("does not exist") || lower.includes("user not registered");
4111
+ if (notRegistered) {
4112
+ if (await confirm({
4113
+ message: inviteMessage(emails),
4114
+ title: "Invite by email?",
4115
+ kind: "yesno"
4116
+ })) {
4117
+ await invite(emails, memberRole);
4118
+ return "invited";
4119
+ }
4120
+ return "cancelled";
4121
+ }
4122
+ const quota = status === 402 || lower.includes("limit reached") || lower.includes("quota") || lower.includes("upgrade");
4123
+ if (!quota) notify(detail, "error");
4124
+ return "error";
4125
+ }
4126
+ };
4127
+ const removeMember = async (userExtId, email, name) => {
4128
+ if (!workspace || !isOwner) return;
4129
+ const ok = await confirm({
4130
+ message: `Remove ${name} (${email}) from the "${workspace.name}" ${ui.getEntityLabel("WORKSPACE")}?
4131
+
4132
+ Note that ${ui.getEntityLabel("WORKSPACEUSER", "PLURAL").toLowerCase()} may have saved private content in the workspace that you cannot see. If you remove them from the ${workspaceWord()} they will immediately lose access to any content in the ${workspaceWord()}.`,
4133
+ title: `Remove ${ui.getEntityLabel("WORKSPACEUSER")}`
4134
+ });
4135
+ if (!ok) return;
4136
+ try {
4137
+ await remove.mutateAsync([userExtId]);
4138
+ notify(`Successfully removed ${name} from workspace`, "success");
4139
+ } catch {
4140
+ notify(`Failed to remove ${name} from workspace`, "error");
4141
+ }
4142
+ };
4143
+ const leave = async () => {
4144
+ if (!workspace || !userId || isOwner) return;
4145
+ const name = workspace.name;
4146
+ const ok = await confirm({
4147
+ message: `Are you sure you want to leave the "${name}" ${ui.getEntityLabel("WORKSPACE")}?
4148
+
4149
+ You will lose access to all content in this ${workspaceWord()}.`,
4150
+ title: "Leave Workspace"
4151
+ });
4152
+ if (!ok) return;
4153
+ try {
4154
+ await remove.mutateAsync([userId]);
4155
+ onLeft?.();
4156
+ notify(`Successfully left ${name}`, "success");
4157
+ } catch {
4158
+ notify("Failed to leave workspace", "error");
4159
+ }
4160
+ };
4161
+ return {
4162
+ workspace,
4163
+ members,
4164
+ role,
4165
+ isOwner,
4166
+ isMember,
4167
+ updateIdentity,
4168
+ setPublic,
4169
+ share,
4170
+ removeMember,
4171
+ leave,
4172
+ isSharing: add.isPending,
4173
+ isRemoving: remove.isPending
4174
+ };
4175
+ }
4176
+ var isAgentMember = (member) => member.user.external_id.startsWith("agt-");
4177
+ var memberName = (member) => member.user.family_name ? `${member.user.given_name} ${member.user.family_name}` : member.user.given_name;
4178
+ function ConnectedWorkspaceSettings({
4179
+ workspaceId,
4180
+ project,
4181
+ projectLine,
4182
+ membersTable,
4183
+ shareDialog,
4184
+ children,
4185
+ onExport,
4186
+ onOpenActivity,
4187
+ onLeft,
4188
+ testId = "workspace-settings-page"
4189
+ }) {
4190
+ const settings = useConnectedWorkspaceSettings(workspaceId, { onLeft });
4191
+ const { workspace, members, isOwner, isMember } = settings;
4192
+ const { data: userSettings } = react$1.useUserSettings();
4193
+ const isDeveloper = userSettings?.developer === true;
4194
+ const showAgents = userSettings?.show_agent_sessions ?? false;
4195
+ const visibleMembers = react.useMemo(
4196
+ () => showAgents ? members : members.filter((m) => !isAgentMember(m)),
4197
+ [members, showAgents]
4198
+ );
4199
+ const [membersExpanded, setMembersExpanded] = react.useState(false);
4200
+ const [shareOpen, setShareOpen] = react.useState(false);
4201
+ if (!workspace) {
4202
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkRXK3XP62_cjs.PageLoading, { children: /* @__PURE__ */ jsxRuntime.jsx(chunkLTU35TQN_cjs.LoadingIndicator, { message: "Loading workspace..." }) });
4203
+ }
4204
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4205
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkRXK3XP62_cjs.WorkspacePageFrame, { testId, children: [
4206
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkRXK3XP62_cjs.WorkspaceIdentityPanel, { children: [
4207
+ /* @__PURE__ */ jsxRuntime.jsx(
4208
+ chunkLTU35TQN_cjs.EntityIdentityBar,
4209
+ {
4210
+ testId: "workspace-identity-bar",
4211
+ canEdit: isOwner,
4212
+ actions: isMember ? /* @__PURE__ */ jsxRuntime.jsx(
4213
+ ConnectedWorkspaceNotificationMenu,
4214
+ {
4215
+ workspaceId: workspace.external_id,
4216
+ onOpenActivity,
4217
+ testId: "workspace-home-notification-menu"
4218
+ }
4219
+ ) : void 0,
4220
+ fields: [
4221
+ {
4222
+ label: "Name",
4223
+ value: workspace.name,
4224
+ placeholder: "Untitled",
4225
+ maxLength: chunkLTU35TQN_cjs.IDENTITY_NAME_MAX_LENGTH,
4226
+ valueClassName: "truncate text-base font-semibold",
4227
+ testId: "workspace-home-title",
4228
+ hideLabel: true,
4229
+ leading: /* @__PURE__ */ jsxRuntime.jsx(
4230
+ chunkV46W7YLI_cjs.WorkspaceIdentity,
4231
+ {
4232
+ workspace: {
4233
+ ...react$1.toShellWorkspace(workspace),
4234
+ projectLine: projectLine?.(workspace)
4235
+ },
4236
+ expanded: false
4237
+ }
4238
+ ),
4239
+ trailing: project && /* @__PURE__ */ jsxRuntime.jsx(
4240
+ chunkRXK3XP62_cjs.WorkspaceProjectSlot,
4241
+ {
4242
+ testId: "workspace-home-project",
4243
+ caption: `${ui.getEntityLabel("PROJECT")}:`,
4244
+ children: project({ workspace, isOwner })
4245
+ }
4246
+ ),
4247
+ // Both fields go up together: the endpoint takes the pair.
4248
+ onSave: (name) => settings.updateIdentity({ name, description: workspace.description ?? "" })
4249
+ },
4250
+ {
4251
+ label: "Description",
4252
+ value: workspace.description ?? "",
4253
+ placeholder: "No description",
4254
+ multiline: true,
4255
+ valueClassName: "line-clamp-2 text-sm text-muted-foreground",
4256
+ testId: "workspace-home-description",
4257
+ hideLabel: true,
4258
+ trailing: /* @__PURE__ */ jsxRuntime.jsx(
4259
+ chunkRXK3XP62_cjs.WorkspaceAudienceLine,
4260
+ {
4261
+ visibility: {
4262
+ testId: "workspace-home-visibility",
4263
+ caption: "Visibility:",
4264
+ toggle: isOwner && isDeveloper ? /* @__PURE__ */ jsxRuntime.jsx(
4265
+ chunkRXK3XP62_cjs.CommonWorkspaceToggle,
4266
+ {
4267
+ isCommon: workspace.is_public ?? false,
4268
+ onToggle: (value) => void settings.setPublic(value),
4269
+ "data-testid": "workspace-visibility-toggle"
4270
+ }
4271
+ ) : void 0,
4272
+ stateText: workspace.is_public ? "Common \u2014 everyone on this deployment" : "Members only",
4273
+ stateHelp: workspace.is_public ? "Everyone on this deployment can see its files, not only its members." : "Only members of this workspace can see its files."
4274
+ },
4275
+ members: /* @__PURE__ */ jsxRuntime.jsx(
4276
+ chunkXAJIKT6Y_cjs.MemberAvatarStack,
4277
+ {
4278
+ members: visibleMembers.map((m) => ({
4279
+ name: memberName(m),
4280
+ picture: m.user.picture
4281
+ })),
4282
+ total: visibleMembers.length,
4283
+ expanded: membersExpanded,
4284
+ onClick: () => setMembersExpanded((open) => !open),
4285
+ testId: "workspace-home-members-toggle"
4286
+ }
4287
+ ),
4288
+ share: isOwner && shareDialog ? {
4289
+ label: "Share",
4290
+ onClick: () => setShareOpen(true),
4291
+ testId: "workspace-quick-add-member"
4292
+ } : void 0
4293
+ }
4294
+ ),
4295
+ onSave: (description) => settings.updateIdentity({ name: workspace.name, description })
4296
+ }
4297
+ ]
4298
+ }
4299
+ ),
4300
+ isMember && membersTable && /* @__PURE__ */ jsxRuntime.jsx(
4301
+ chunkRXK3XP62_cjs.ExpandableSection,
4302
+ {
4303
+ expanded: membersExpanded,
4304
+ testId: "workspace-settings-members-section",
4305
+ children: membersTable({
4306
+ workspace,
4307
+ members: visibleMembers,
4308
+ onRemove: settings.removeMember,
4309
+ isRemoving: settings.isRemoving
4310
+ })
4311
+ }
4312
+ )
4313
+ ] }),
4314
+ children,
4315
+ isMember && onExport && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "flex justify-end px-4 pb-4", children: /* @__PURE__ */ jsxRuntime.jsxs(
4316
+ ui.Button,
4317
+ {
4318
+ variant: "outline",
4319
+ size: "sm",
4320
+ onClick: onExport,
4321
+ "data-testid": "workspace-transfer-button",
4322
+ children: [
4323
+ /* @__PURE__ */ jsxRuntime.jsx(lucideReact.FolderInput, { className: "size-4" }),
4324
+ "Export, copy or move\u2026"
4325
+ ]
4326
+ }
4327
+ ) }),
4328
+ !isOwner && /* @__PURE__ */ jsxRuntime.jsx(
4329
+ chunkRXK3XP62_cjs.LeaveFooter,
4330
+ {
4331
+ testId: "workspace-settings-footer",
4332
+ leave: {
4333
+ testId: "workspace-leave-button",
4334
+ label: settings.isRemoving ? "Leaving\u2026" : `Leave ${ui.getEntityLabel("WORKSPACE").toLowerCase()}`,
4335
+ disabled: settings.isRemoving,
4336
+ onClick: () => void settings.leave()
4337
+ }
4338
+ }
4339
+ )
4340
+ ] }),
4341
+ isOwner && shareDialog?.({
4342
+ open: shareOpen,
4343
+ onOpenChange: setShareOpen,
4344
+ workspace,
4345
+ members: visibleMembers,
4346
+ onShare: settings.share,
4347
+ isSharing: settings.isSharing
4348
+ })
4349
+ ] });
4350
+ }
4351
+
4352
+ // src/connection/connectors/sync-labels.ts
4353
+ var BACKFILL_OPTIONS = [
4354
+ { value: "1", label: "Last 1 day" },
4355
+ { value: "7", label: "Last 7 days" },
4356
+ { value: "30", label: "Last 30 days" },
4357
+ { value: "90", label: "Last 90 days" },
4358
+ { value: "365", label: "Last year" }
4359
+ ];
4360
+ function formatLastSync(iso) {
4361
+ const date = new Date(iso);
4362
+ if (Number.isNaN(date.getTime())) return iso;
4363
+ const diffMs = Date.now() - date.getTime();
4364
+ const diffMin = Math.round(diffMs / 6e4);
4365
+ if (diffMin < 1) return "just now";
4366
+ if (diffMin < 60) return `${diffMin}m ago`;
4367
+ const diffHr = Math.round(diffMin / 60);
4368
+ if (diffHr < 24) return `${diffHr}h ago`;
4369
+ const diffDay = Math.round(diffHr / 24);
4370
+ if (diffDay < 30) return `${diffDay}d ago`;
4371
+ return date.toLocaleDateString();
4372
+ }
4373
+ function windowLabel(days) {
4374
+ return BACKFILL_OPTIONS.find((o) => o.value === String(days))?.label ?? `Last ${days} days`;
4375
+ }
4376
+ function ConnectedMailboxSyncDialog({
4377
+ catalog,
4378
+ userConnector,
4379
+ open,
4380
+ onOpenChange,
4381
+ lockedWorkspaceExtId,
4382
+ onEnabled
4383
+ }) {
4384
+ const enableSync = react$1.useEnableMailboxSync();
4385
+ const disconnect = react$1.useDisconnectConnector();
4386
+ const arbi = react$1.useArbi();
4387
+ const { notify, navigate } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
4388
+ const reconnect = async () => {
4389
+ try {
4390
+ await disconnect.mutateAsync({ vendorKey: catalog.vendor_key });
4391
+ } catch {
4392
+ }
4393
+ try {
4394
+ navigate(await arbi.connectors.authorize(catalog.vendor_key, react$1.connectorReturnTo()));
4395
+ } catch {
4396
+ notify("Could not start reconnection. Please try again.", "error");
4397
+ }
4398
+ };
4399
+ const { data: workspaces = [] } = react$1.useWorkspaces({ enabled: open && !lockedWorkspaceExtId });
4400
+ const memberWorkspaces = workspaces.filter((w) => w.is_member);
4401
+ const [tokensBridged, setTokensBridged] = react.useState(false);
4402
+ react.useEffect(() => {
4403
+ if (!open) {
4404
+ setTokensBridged(false);
4405
+ return;
4406
+ }
4407
+ if (!userConnector?.is_connected) {
4408
+ setTokensBridged(true);
4409
+ return;
4410
+ }
4411
+ let cancelled = false;
4412
+ void arbi.connectors.bridgeTokens({ vendor: catalog.vendor_key }).finally(() => {
4413
+ if (!cancelled) setTokensBridged(true);
4414
+ });
4415
+ return () => {
4416
+ cancelled = true;
4417
+ };
4418
+ }, [open, arbi, userConnector?.is_connected, catalog.vendor_key]);
4419
+ const [workspaceExtId, setWorkspaceExtId] = react.useState("");
4420
+ const [backfill, setBackfill] = react.useState("1");
4421
+ const [backfillSince, setBackfillSince] = react.useState("");
4422
+ const [selectedFolders, setSelectedFolders] = react.useState([]);
4423
+ const [skipDuplicates, setSkipDuplicates] = react.useState(true);
4424
+ const [autoRename, setAutoRename] = react.useState(false);
4425
+ const [shared, setShared] = react.useState(false);
4426
+ const [autoSync, setAutoSync] = react.useState(false);
4427
+ react.useEffect(() => {
4428
+ if (!open) return;
4429
+ const target = lockedWorkspaceExtId ?? userConnector?.sync_workspace_ext_id ?? "";
4430
+ const workspaceSync = lockedWorkspaceExtId ? userConnector?.syncs?.find((s) => s.workspace_ext_id === lockedWorkspaceExtId) : void 0;
4431
+ setWorkspaceExtId(target);
4432
+ const since = workspaceSync?.backfill_since ?? userConnector?.backfill_since ?? null;
4433
+ if (since) {
4434
+ setBackfill("custom");
4435
+ setBackfillSince(since.slice(0, 10));
4436
+ } else {
4437
+ setBackfill(String(workspaceSync?.backfill_window ?? userConnector?.backfill_window ?? 1));
4438
+ setBackfillSince("");
4439
+ }
4440
+ setSelectedFolders(workspaceSync?.folders ?? userConnector?.sync_folders ?? []);
4441
+ setSkipDuplicates(workspaceSync?.skip_duplicates ?? userConnector?.skip_duplicates ?? true);
4442
+ setAutoRename(workspaceSync?.auto_rename ?? userConnector?.auto_rename ?? false);
4443
+ setShared(workspaceSync?.shared ?? userConnector?.shared ?? false);
4444
+ setAutoSync(workspaceSync?.auto_sync ?? userConnector?.auto_sync ?? false);
4445
+ }, [open, lockedWorkspaceExtId, userConnector]);
4446
+ const {
4447
+ data: folders = [],
4448
+ isLoading: foldersQueryLoading,
4449
+ error: foldersError
4450
+ } = react$1.useMailboxFolders(catalog.vendor_key, open && tokensBridged);
4451
+ const foldersLoading = !tokensBridged || foldersQueryLoading;
4452
+ const folderTree = chunkGRGS5M6O_cjs.buildMailFolderTree(folders);
4453
+ const [expandAllNonce, setExpandAllNonce] = react.useState(0);
4454
+ const [collapseAllNonce, setCollapseAllNonce] = react.useState(0);
4455
+ const selectAllIds = folderTree.flatMap(
4456
+ (n) => n.folder ? [n.folder.id] : n.children.flatMap((c) => c.folder ? [c.folder.id] : [])
4457
+ );
4458
+ const allSelected = selectAllIds.length > 0 && selectAllIds.every((id) => selectedFolders.includes(id));
4459
+ const toggleAllFolders = () => setSelectedFolders(allSelected ? [] : selectAllIds);
4460
+ const isCustomBackfill = backfill === "custom";
4461
+ const customDateMissing = isCustomBackfill && !backfillSince;
4462
+ const handleEnableSubmit = () => {
4463
+ if (!workspaceExtId || selectedFolders.length === 0 || customDateMissing) return;
4464
+ enableSync.mutate(
4465
+ {
4466
+ vendorKey: catalog.vendor_key,
4467
+ workspaceExtId,
4468
+ // A fixed date overrides the rolling window server-side; keep a sane
4469
+ // window value for backward compatibility.
4470
+ backfillWindow: isCustomBackfill ? 90 : Number(backfill),
4471
+ backfillSince: isCustomBackfill ? (/* @__PURE__ */ new Date(`${backfillSince}T00:00:00Z`)).toISOString() : null,
4472
+ folders: selectedFolders,
4473
+ skipDuplicates,
4474
+ autoRename,
4475
+ shared,
4476
+ autoSync
4477
+ },
4478
+ {
4479
+ onSuccess: () => {
4480
+ notify("Email settings saved", "success");
4481
+ onOpenChange(false);
4482
+ onEnabled?.(workspaceExtId);
4483
+ },
4484
+ onError: (err) => {
4485
+ let msg = "Could not enable email sync. Please try again.";
4486
+ const status = react$1.connectorErrorStatus(err);
4487
+ if (status !== void 0) {
4488
+ if (status === 403) {
4489
+ msg = "You are not a member of the selected workspace.";
4490
+ } else if (status === 404) {
4491
+ msg = "This connector is not available for email sync.";
4492
+ }
4493
+ }
4494
+ notify(msg, "error");
4495
+ }
4496
+ }
4497
+ );
4498
+ };
4499
+ const mailboxName = catalog.vendor_key === "gmail" ? "Gmail" : catalog.vendor_key === "microsoft" ? "Outlook" : catalog.display_name;
4500
+ return /* @__PURE__ */ jsxRuntime.jsxs(
4501
+ chunkULWRNGGE_cjs.ModalScaffold,
4502
+ {
4503
+ open,
4504
+ onOpenChange,
4505
+ title: `${mailboxName} Import Settings`,
4506
+ description: `Import emails from ${catalog.display_name} into a workspace so the ARBI agent can search them. This is read-only \u2014 ARBI imports a copy and never modifies or deletes anything in your mailbox.`,
4507
+ showDescription: true,
4508
+ className: "w-[92vw] sm:max-w-lg",
4509
+ children: [
4510
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkU37AYUPI_cjs.SyncDialogBody, { children: [
4511
+ !lockedWorkspaceExtId && /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.SyncField, { label: "Target workspace", htmlFor: "sync-workspace", children: /* @__PURE__ */ jsxRuntime.jsx(
4512
+ chunkU37AYUPI_cjs.SyncSelect,
4513
+ {
4514
+ id: "sync-workspace",
4515
+ value: workspaceExtId,
4516
+ onValueChange: setWorkspaceExtId,
4517
+ placeholder: "Select a workspace",
4518
+ options: memberWorkspaces.map((w) => ({ value: w.external_id, label: w.name }))
4519
+ }
4520
+ ) }),
4521
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkU37AYUPI_cjs.SyncField, { label: "Backfill window", htmlFor: "sync-backfill", children: [
4522
+ /* @__PURE__ */ jsxRuntime.jsx(
4523
+ chunkU37AYUPI_cjs.SyncSelect,
4524
+ {
4525
+ id: "sync-backfill",
4526
+ value: backfill,
4527
+ onValueChange: setBackfill,
4528
+ options: [...BACKFILL_OPTIONS, { value: "custom", label: "Custom date\u2026" }]
4529
+ }
4530
+ ),
4531
+ isCustomBackfill && /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-1", children: [
4532
+ /* @__PURE__ */ jsxRuntime.jsx(
4533
+ ui.Input,
4534
+ {
4535
+ type: "date",
4536
+ value: backfillSince,
4537
+ max: (/* @__PURE__ */ new Date()).toISOString().slice(0, 10),
4538
+ onChange: (e) => setBackfillSince(e.target.value),
4539
+ "data-testid": "backfill-since-date",
4540
+ "aria-label": "Import emails since date"
4541
+ }
4542
+ ),
4543
+ /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.SyncSmallNote, { children: "Emails are always imported from this date onward \u2014 the start point never moves." })
4544
+ ] })
4545
+ ] }),
4546
+ /* @__PURE__ */ jsxRuntime.jsx(
4547
+ chunkU37AYUPI_cjs.SyncField,
4548
+ {
4549
+ label: `Folders to import${selectedFolders.length > 0 ? ` (${selectedFolders.length})` : ""}`,
4550
+ hint: "Select at least one folder to import.",
4551
+ actions: folders.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(chunkU37AYUPI_cjs.SyncLinkRow, { children: [
4552
+ /* @__PURE__ */ jsxRuntime.jsx(
4553
+ chunkU37AYUPI_cjs.SyncLinkButton,
4554
+ {
4555
+ onClick: () => setExpandAllNonce((n) => n + 1),
4556
+ testId: "mail-folders-expand-all",
4557
+ children: "Expand all"
4558
+ }
4559
+ ),
4560
+ /* @__PURE__ */ jsxRuntime.jsx(
4561
+ chunkU37AYUPI_cjs.SyncLinkButton,
4562
+ {
4563
+ onClick: () => setCollapseAllNonce((n) => n + 1),
4564
+ testId: "mail-folders-collapse-all",
4565
+ children: "Collapse all"
4566
+ }
4567
+ ),
4568
+ /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.SyncLinkButton, { onClick: toggleAllFolders, children: allSelected ? "Clear all" : "Select all" })
4569
+ ] }),
4570
+ children: foldersLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.SyncLoading, { children: "Loading folders\u2026" }) : foldersError ? (
4571
+ // A failed fetch is not an empty mailbox: it hides auth/scope errors (e.g. a Gmail
4572
+ // account needing reconnect).
4573
+ /* @__PURE__ */ jsxRuntime.jsx(
4574
+ chunkU37AYUPI_cjs.SyncReconnectNotice,
4575
+ {
4576
+ message: `Couldn\u2019t load folders from ${catalog.display_name}. Reconnect the account and try again.`,
4577
+ onReconnect: () => void reconnect(),
4578
+ isPending: disconnect.isPending,
4579
+ testId: "folders-reconnect"
4580
+ }
4581
+ )
4582
+ ) : folders.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.SyncNote, { children: "No folders found." }) : /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.SyncTreeFrame, { children: /* @__PURE__ */ jsxRuntime.jsx(
4583
+ chunkGRGS5M6O_cjs.MailFolderTree,
4584
+ {
4585
+ nodes: folderTree,
4586
+ selected: selectedFolders,
4587
+ onChange: setSelectedFolders,
4588
+ expandAllNonce,
4589
+ collapseAllNonce
4590
+ }
4591
+ ) })
4592
+ }
4593
+ ),
4594
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkU37AYUPI_cjs.SyncOptions, { children: [
4595
+ /* @__PURE__ */ jsxRuntime.jsx(
4596
+ chunkU37AYUPI_cjs.SyncOptionToggle,
4597
+ {
4598
+ checked: skipDuplicates,
4599
+ onCheckedChange: setSkipDuplicates,
4600
+ title: "Skip duplicates",
4601
+ description: "Skip files identical to ones already in the workspace.",
4602
+ testId: "mailbox-sync-skip-duplicates"
4603
+ }
4604
+ ),
4605
+ /* @__PURE__ */ jsxRuntime.jsx(
4606
+ chunkU37AYUPI_cjs.SyncOptionToggle,
4607
+ {
4608
+ checked: autoRename,
4609
+ onCheckedChange: setAutoRename,
4610
+ title: "Auto-rename",
4611
+ description: "Generate a descriptive title with AI instead of using the sender and subject.",
4612
+ testId: "mailbox-sync-auto-rename"
4613
+ }
4614
+ ),
4615
+ /* @__PURE__ */ jsxRuntime.jsx(
4616
+ chunkU37AYUPI_cjs.SyncOptionToggle,
4617
+ {
4618
+ checked: shared,
4619
+ onCheckedChange: setShared,
4620
+ title: "Share with the workspace",
4621
+ description: shared ? "Imported documents are visible to everyone in the workspace." : "Imported documents stay private to you.",
4622
+ testId: "mailbox-sync-shared"
4623
+ }
4624
+ ),
4625
+ /* @__PURE__ */ jsxRuntime.jsx(
4626
+ chunkU37AYUPI_cjs.SyncOptionToggle,
4627
+ {
4628
+ checked: autoSync,
4629
+ onCheckedChange: setAutoSync,
4630
+ title: "Sync automatically",
4631
+ description: "Check for new email when you sign in, instead of only when you click Sync now. Requires you to be signed in \u2014 nothing syncs while you are away.",
4632
+ testId: "mailbox-sync-auto-sync"
4633
+ }
4634
+ )
4635
+ ] })
4636
+ ] }),
4637
+ /* @__PURE__ */ jsxRuntime.jsx(
4638
+ chunkU37AYUPI_cjs.SyncDialogFooter,
4639
+ {
4640
+ onCancel: () => onOpenChange(false),
4641
+ onSave: handleEnableSubmit,
4642
+ saveDisabled: !workspaceExtId || selectedFolders.length === 0 || customDateMissing,
4643
+ isSaving: enableSync.isPending
4644
+ }
4645
+ )
4646
+ ]
4647
+ }
4648
+ );
4649
+ }
4650
+ var DRIVE_PRODUCT_NAMES = {
4651
+ gmail: "Google Drive",
4652
+ microsoft_sharepoint: "SharePoint",
4653
+ box: "Box",
4654
+ dropbox: "Dropbox",
4655
+ onenote: "OneNote",
4656
+ clio: "Clio"
4657
+ };
4658
+ function DriveFolderNode({
4659
+ vendorKey,
4660
+ folder,
4661
+ depth,
4662
+ selected,
4663
+ onToggle,
4664
+ enabled,
4665
+ ancestorSelected,
4666
+ expandAllNonce,
4667
+ collapseAllNonce
4668
+ }) {
4669
+ const isSelected = ancestorSelected || selected.includes(folder.id);
4670
+ const [expanded, setExpanded] = react.useState(() => selected.includes(folder.id) || expandAllNonce > 0);
4671
+ const appliedNonce = react.useRef(expandAllNonce);
4672
+ react.useEffect(() => {
4673
+ if (expandAllNonce > appliedNonce.current) {
4674
+ appliedNonce.current = expandAllNonce;
4675
+ setExpanded(true);
4676
+ }
4677
+ }, [expandAllNonce]);
4678
+ const appliedCollapseNonce = react.useRef(collapseAllNonce);
4679
+ react.useEffect(() => {
4680
+ if (collapseAllNonce > appliedCollapseNonce.current) {
4681
+ appliedCollapseNonce.current = collapseAllNonce;
4682
+ setExpanded(false);
4683
+ }
4684
+ }, [collapseAllNonce]);
4685
+ const { data: children = [], isLoading } = react$1.useDriveFolderChildren(
4686
+ vendorKey,
4687
+ folder.id,
4688
+ enabled && expanded
4689
+ );
4690
+ const isSelectable = folder.selectable !== false;
4691
+ const { data: docCount, isLoading: countLoading } = react$1.useDriveFolderDocCount(
4692
+ vendorKey,
4693
+ folder.id,
4694
+ enabled && isSelectable
4695
+ // ← disabled for site: nodes
4696
+ );
4697
+ const mightHaveChildren = docCount == null || docCount > 0;
4698
+ const orderedChildren = [...children].sort((a, b) => a.name.localeCompare(b.name));
4699
+ return /* @__PURE__ */ jsxRuntime.jsx(
4700
+ chunkU37AYUPI_cjs.SyncFolderRow,
4701
+ {
4702
+ id: folder.id,
4703
+ name: folder.name,
4704
+ depth,
4705
+ hasChildren: mightHaveChildren,
4706
+ isExpanded: expanded,
4707
+ onToggleExpanded: () => setExpanded((e) => !e),
4708
+ isSelectable,
4709
+ checked: isSelected,
4710
+ disabled: ancestorSelected,
4711
+ onCheckedChange: () => onToggle(folder.id),
4712
+ count: typeof docCount === "number" ? docCount : void 0,
4713
+ isCountLoading: isSelectable && countLoading,
4714
+ children: isLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.SyncFolderStatus, { depth, kind: "loading" }) : orderedChildren.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.SyncFolderStatus, { depth, kind: "empty" }) : orderedChildren.map((child) => /* @__PURE__ */ jsxRuntime.jsx(
4715
+ DriveFolderNode,
4716
+ {
4717
+ vendorKey,
4718
+ folder: child,
4719
+ depth: depth + 1,
4720
+ selected,
4721
+ onToggle,
4722
+ enabled,
4723
+ ancestorSelected: isSelected,
4724
+ expandAllNonce,
4725
+ collapseAllNonce
4726
+ },
4727
+ child.id
4728
+ ))
4729
+ }
4730
+ );
4731
+ }
4732
+ function ConnectedDriveSyncDialog({
4733
+ catalog,
4734
+ userConnector,
4735
+ open,
4736
+ onOpenChange,
4737
+ lockedWorkspaceExtId,
4738
+ onEnabled
4739
+ }) {
4740
+ const enableSync = react$1.useEnableDriveSync();
4741
+ const disconnect = react$1.useDisconnectConnector();
4742
+ const arbi = react$1.useArbi();
4743
+ const { notify, navigate } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
4744
+ const reconnect = async () => {
4745
+ try {
4746
+ await disconnect.mutateAsync({ vendorKey: catalog.vendor_key });
4747
+ } catch {
4748
+ }
4749
+ try {
4750
+ navigate(await arbi.connectors.authorize(catalog.vendor_key, react$1.connectorReturnTo()));
4751
+ } catch {
4752
+ notify("Could not start reconnection. Please try again.", "error");
4753
+ }
4754
+ };
4755
+ const { data: workspaces = [] } = react$1.useWorkspaces({ enabled: open && !lockedWorkspaceExtId });
4756
+ const memberWorkspaces = workspaces.filter((w) => w.is_member);
4757
+ const [tokensBridged, setTokensBridged] = react.useState(false);
4758
+ react.useEffect(() => {
4759
+ if (!open) {
4760
+ setTokensBridged(false);
4761
+ return;
4762
+ }
4763
+ if (!userConnector?.is_connected) {
4764
+ setTokensBridged(true);
4765
+ return;
4766
+ }
4767
+ let cancelled = false;
4768
+ void arbi.connectors.bridgeTokens({ vendor: catalog.vendor_key }).finally(() => {
4769
+ if (!cancelled) setTokensBridged(true);
4770
+ });
4771
+ return () => {
4772
+ cancelled = true;
4773
+ };
4774
+ }, [open, arbi, userConnector?.is_connected, catalog.vendor_key]);
4775
+ const [workspaceExtId, setWorkspaceExtId] = react.useState("");
4776
+ const [selectedFolders, setSelectedFolders] = react.useState([]);
4777
+ const [skipDuplicates, setSkipDuplicates] = react.useState(false);
4778
+ const [autoRename, setAutoRename] = react.useState(false);
4779
+ const [shared, setShared] = react.useState(false);
4780
+ const [autoSync, setAutoSync] = react.useState(false);
4781
+ react.useEffect(() => {
4782
+ if (!open) return;
4783
+ const target = lockedWorkspaceExtId ?? userConnector?.drive_sync_workspace_ext_id ?? "";
4784
+ setWorkspaceExtId(target);
4785
+ setSelectedFolders(userConnector?.drive_sync_folders ?? []);
4786
+ setSkipDuplicates(userConnector?.drive_skip_duplicates ?? false);
4787
+ setAutoRename(userConnector?.drive_auto_rename ?? false);
4788
+ setShared(userConnector?.drive_shared ?? false);
4789
+ setAutoSync(userConnector?.drive_auto_sync ?? false);
4790
+ setExpandAllNonce(0);
4791
+ setCollapseAllNonce(0);
4792
+ }, [open, lockedWorkspaceExtId, userConnector]);
4793
+ const [expandAllNonce, setExpandAllNonce] = react.useState(0);
4794
+ const [collapseAllNonce, setCollapseAllNonce] = react.useState(0);
4795
+ const treeEnabled = open && tokensBridged;
4796
+ const {
4797
+ data: folders = [],
4798
+ isLoading: foldersQueryLoading,
4799
+ error: foldersError
4800
+ } = react$1.useDriveFolderChildren(catalog.vendor_key, "root", treeEnabled);
4801
+ const foldersLoading = !tokensBridged || foldersQueryLoading;
4802
+ const needsReconnect = react$1.connectorErrorStatus(foldersError) === 409;
4803
+ const toggleFolder = (id) => setSelectedFolders((prev) => prev.includes(id) ? prev.filter((f) => f !== id) : [...prev, id]);
4804
+ const orderedFolders = [...folders].sort(
4805
+ (a, b) => a.name.localeCompare(b.name)
4806
+ );
4807
+ const handleEnableSubmit = () => {
4808
+ if (!workspaceExtId || selectedFolders.length === 0) return;
4809
+ const foldersToSubmit = selectedFolders.filter((id) => !id.startsWith("site:"));
4810
+ if (foldersToSubmit.length === 0) return;
4811
+ enableSync.mutate(
4812
+ {
4813
+ vendorKey: catalog.vendor_key,
4814
+ workspaceExtId,
4815
+ folders: foldersToSubmit,
4816
+ skipDuplicates,
4817
+ autoRename,
4818
+ shared,
4819
+ autoSync
4820
+ },
4821
+ {
4822
+ onSuccess: () => {
4823
+ notify(`${productName} settings saved`, "success");
4824
+ onOpenChange(false);
4825
+ onEnabled?.(workspaceExtId);
4826
+ },
4827
+ onError: (err) => {
4828
+ let msg = `Could not enable ${productName} sync. Please try again.`;
4829
+ const status = react$1.connectorErrorStatus(err);
4830
+ if (status !== void 0) {
4831
+ if (status === 403) {
4832
+ msg = "You are not a member of the selected workspace.";
4833
+ } else if (status === 409) {
4834
+ msg = `Reconnect needed \u2014 re-authorize your account to enable ${productName}.`;
4835
+ } else if (status === 404) {
4836
+ msg = `This connector is not available for ${productName} sync.`;
4837
+ }
4838
+ }
4839
+ notify(msg, "error");
4840
+ }
4841
+ }
4842
+ );
4843
+ };
4844
+ const productName = DRIVE_PRODUCT_NAMES[catalog.vendor_key] ?? "OneDrive";
4845
+ const reconnectButtonProps = {
4846
+ onReconnect: () => void reconnect(),
4847
+ isPending: disconnect.isPending,
4848
+ testId: "drive-folders-reconnect"
4849
+ };
4850
+ return /* @__PURE__ */ jsxRuntime.jsxs(
4851
+ chunkULWRNGGE_cjs.ModalScaffold,
4852
+ {
4853
+ open,
4854
+ onOpenChange,
4855
+ title: `${productName} Import Settings`,
4856
+ description: `Import documents from ${productName} into a workspace so the ARBI agent can search them. This is read-only \u2014 ARBI imports a copy and never modifies or deletes anything in your ${productName}.`,
4857
+ showDescription: true,
4858
+ className: "w-[92vw] sm:max-w-lg",
4859
+ children: [
4860
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkU37AYUPI_cjs.SyncDialogBody, { children: [
4861
+ !lockedWorkspaceExtId && /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.SyncField, { label: "Target workspace", htmlFor: "drive-sync-workspace", children: /* @__PURE__ */ jsxRuntime.jsx(
4862
+ chunkU37AYUPI_cjs.SyncSelect,
4863
+ {
4864
+ id: "drive-sync-workspace",
4865
+ value: workspaceExtId,
4866
+ onValueChange: setWorkspaceExtId,
4867
+ placeholder: "Select a workspace",
4868
+ options: memberWorkspaces.map((w) => ({ value: w.external_id, label: w.name }))
4869
+ }
4870
+ ) }),
4871
+ /* @__PURE__ */ jsxRuntime.jsx(
4872
+ chunkU37AYUPI_cjs.SyncField,
4873
+ {
4874
+ label: `Folders to import${selectedFolders.length > 0 ? ` (${selectedFolders.length})` : ""}`,
4875
+ hint: "Select at least one folder. Importing a folder includes everything inside it.",
4876
+ actions: orderedFolders.length > 0 && /* @__PURE__ */ jsxRuntime.jsxs(chunkU37AYUPI_cjs.SyncLinkRow, { children: [
4877
+ /* @__PURE__ */ jsxRuntime.jsx(
4878
+ chunkU37AYUPI_cjs.SyncLinkButton,
4879
+ {
4880
+ onClick: () => setExpandAllNonce((n) => n + 1),
4881
+ testId: "drive-folders-expand-all",
4882
+ children: "Expand all"
4883
+ }
4884
+ ),
4885
+ /* @__PURE__ */ jsxRuntime.jsx(
4886
+ chunkU37AYUPI_cjs.SyncLinkButton,
4887
+ {
4888
+ onClick: () => setCollapseAllNonce((n) => n + 1),
4889
+ testId: "drive-folders-collapse-all",
4890
+ children: "Collapse all"
4891
+ }
4892
+ )
4893
+ ] }),
4894
+ children: foldersLoading ? /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.SyncLoading, { children: "Loading folders\u2026" }) : needsReconnect ? /* @__PURE__ */ jsxRuntime.jsx(
4895
+ chunkU37AYUPI_cjs.SyncReconnectNotice,
4896
+ {
4897
+ ...reconnectButtonProps,
4898
+ message: `Reconnect ${catalog.display_name} to enable ${productName} \u2014 your account needs to grant file access.`
4899
+ }
4900
+ ) : foldersError ? /* @__PURE__ */ jsxRuntime.jsx(
4901
+ chunkU37AYUPI_cjs.SyncReconnectNotice,
4902
+ {
4903
+ ...reconnectButtonProps,
4904
+ message: `Couldn\u2019t load folders from ${productName}. Reconnect the account and try again.`
4905
+ }
4906
+ ) : orderedFolders.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.SyncNote, { children: "No folders found." }) : /* @__PURE__ */ jsxRuntime.jsx(chunkU37AYUPI_cjs.SyncTreeFrame, { children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-0.5", "data-testid": "drive-folder-tree", children: orderedFolders.map((f) => /* @__PURE__ */ jsxRuntime.jsx(
4907
+ DriveFolderNode,
4908
+ {
4909
+ vendorKey: catalog.vendor_key,
4910
+ folder: f,
4911
+ depth: 0,
4912
+ selected: selectedFolders,
4913
+ onToggle: toggleFolder,
4914
+ enabled: treeEnabled,
4915
+ ancestorSelected: false,
4916
+ expandAllNonce,
4917
+ collapseAllNonce
4918
+ },
4919
+ f.id
4920
+ )) }) })
4921
+ }
4922
+ ),
4923
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkU37AYUPI_cjs.SyncOptions, { children: [
4924
+ /* @__PURE__ */ jsxRuntime.jsx(
4925
+ chunkU37AYUPI_cjs.SyncOptionToggle,
4926
+ {
4927
+ checked: skipDuplicates,
4928
+ onCheckedChange: setSkipDuplicates,
4929
+ title: "Skip duplicates",
4930
+ description: "Skip files identical to ones already in the workspace."
4931
+ }
4932
+ ),
4933
+ /* @__PURE__ */ jsxRuntime.jsx(
4934
+ chunkU37AYUPI_cjs.SyncOptionToggle,
4935
+ {
4936
+ checked: autoRename,
4937
+ onCheckedChange: setAutoRename,
4938
+ title: "Auto-rename",
4939
+ description: "Generate a descriptive title with AI instead of using the filename."
4940
+ }
4941
+ ),
4942
+ /* @__PURE__ */ jsxRuntime.jsx(
4943
+ chunkU37AYUPI_cjs.SyncOptionToggle,
4944
+ {
4945
+ checked: shared,
4946
+ onCheckedChange: setShared,
4947
+ title: "Share with the workspace",
4948
+ description: shared ? "Imported documents are visible to everyone in the workspace." : "Imported documents stay private to you."
4949
+ }
4950
+ ),
4951
+ /* @__PURE__ */ jsxRuntime.jsx(
4952
+ chunkU37AYUPI_cjs.SyncOptionToggle,
4953
+ {
4954
+ checked: autoSync,
4955
+ onCheckedChange: setAutoSync,
4956
+ title: "Sync automatically",
4957
+ description: "Check for new files when you sign in, instead of only when you click Sync now. Requires you to be signed in \u2014 nothing syncs while you are away.",
4958
+ testId: "drive-sync-auto-sync"
4959
+ }
4960
+ )
4961
+ ] })
4962
+ ] }),
4963
+ /* @__PURE__ */ jsxRuntime.jsx(
4964
+ chunkU37AYUPI_cjs.SyncDialogFooter,
4965
+ {
4966
+ onCancel: () => onOpenChange(false),
4967
+ onSave: handleEnableSubmit,
4968
+ saveDisabled: !workspaceExtId || selectedFolders.length === 0,
4969
+ isSaving: enableSync.isPending,
4970
+ cancelButton: { testId: "drive-sync-cancel" },
4971
+ saveButton: { testId: "drive-sync-save" }
4972
+ }
4973
+ )
4974
+ ]
4975
+ }
4976
+ );
4977
+ }
3724
4978
  function useConnectedDocxNotifications(onOpen) {
3725
4979
  const arbi = react$1.useArbi();
3726
4980
  const { status, user, apiUrl } = chunkGFNELPDP_cjs.useConnection();
@@ -4002,7 +5256,7 @@ function useWordBody({
4002
5256
  }
4003
5257
  var MailBodyEditor = react.lazy(
4004
5258
  () => import('../MailBodyEditor-D7MGJMLH.cjs').catch(() => ({
4005
- default: chunkO6IEZDRC_cjs.PlainMailBodyEditor
5259
+ default: chunkGRGS5M6O_cjs.PlainMailBodyEditor
4006
5260
  }))
4007
5261
  );
4008
5262
  var NativeDocxEditor = react.lazy(
@@ -4094,9 +5348,9 @@ function MailComposerForm({
4094
5348
  }, [drafts, draftId, subject]);
4095
5349
  const body = () => ({
4096
5350
  ...initial,
4097
- to: chunkO6IEZDRC_cjs.parseMailRecipients(to),
4098
- cc: chunkO6IEZDRC_cjs.parseMailRecipients(cc),
4099
- bcc: chunkO6IEZDRC_cjs.parseMailRecipients(bcc),
5351
+ to: chunkGRGS5M6O_cjs.parseMailRecipients(to),
5352
+ cc: chunkGRGS5M6O_cjs.parseMailRecipients(cc),
5353
+ bcc: chunkGRGS5M6O_cjs.parseMailRecipients(bcc),
4100
5354
  subject,
4101
5355
  text,
4102
5356
  html,
@@ -4552,7 +5806,7 @@ function MailComposerForm({
4552
5806
  }
4553
5807
  ),
4554
5808
  documents && /* @__PURE__ */ jsxRuntime.jsx(
4555
- chunkO6IEZDRC_cjs.MailDocumentPicker,
5809
+ chunkGRGS5M6O_cjs.MailDocumentPicker,
4556
5810
  {
4557
5811
  documents: documents.documents,
4558
5812
  disabled: locked,
@@ -4671,7 +5925,7 @@ function ConnectedMailComposer({
4671
5925
  openId,
4672
5926
  async (from, id) => {
4673
5927
  const message = await client.getMessage(from, id);
4674
- return chunkO6IEZDRC_cjs.draftMailCompose(
5928
+ return chunkGRGS5M6O_cjs.draftMailCompose(
4675
5929
  message,
4676
5930
  await hydrateMailAttachments(client, from, message.id, message.attachments, {
4677
5931
  isOnline,
@@ -4685,11 +5939,11 @@ function ConnectedMailComposer({
4685
5939
  const start = react.useMemo(() => {
4686
5940
  if (replyTo)
4687
5941
  return original.data && account ? {
4688
- ...chunkO6IEZDRC_cjs.replyMailCompose(original.data, { account, folderRole: "inbox" }),
5942
+ ...chunkGRGS5M6O_cjs.replyMailCompose(original.data, { account, folderRole: "inbox" }),
4689
5943
  text: "",
4690
5944
  html: ""
4691
5945
  } : void 0;
4692
- return reloaded ? draft.data : initial ?? (openId ? draft.data : chunkO6IEZDRC_cjs.emptyMailCompose());
5946
+ return reloaded ? draft.data : initial ?? (openId ? draft.data : chunkGRGS5M6O_cjs.emptyMailCompose());
4693
5947
  }, [replyTo, original.data, account, reloaded, initial, openId, draft.data]);
4694
5948
  if (!start)
4695
5949
  return draft.error ?? original.error ? /* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", className: "p-4 text-sm text-destructive", children: (draft.error ?? original.error)?.message }) : /* @__PURE__ */ jsxRuntime.jsx("p", { className: "p-4 text-sm text-muted-foreground", children: "Loading draft\u2026" });
@@ -4995,7 +6249,7 @@ function ConnectedMailbox({
4995
6249
  const message = detail.data;
4996
6250
  react.useEffect(() => {
4997
6251
  if (!composeAttachments?.length) return;
4998
- openCompose({ ...chunkO6IEZDRC_cjs.emptyMailCompose(), attachments: composeAttachments });
6252
+ openCompose({ ...chunkGRGS5M6O_cjs.emptyMailCompose(), attachments: composeAttachments });
4999
6253
  onComposeOpened?.();
5000
6254
  }, [composeAttachments]);
5001
6255
  react.useEffect(() => {
@@ -5123,7 +6377,7 @@ function ConnectedMailbox({
5123
6377
  const editDraft = async () => {
5124
6378
  if (!message) return;
5125
6379
  try {
5126
- openCompose(chunkO6IEZDRC_cjs.draftMailCompose(message, await hydrate(message.attachments)));
6380
+ openCompose(chunkGRGS5M6O_cjs.draftMailCompose(message, await hydrate(message.attachments)));
5127
6381
  } catch (e) {
5128
6382
  setActionError(e instanceof Error ? e.message : "Could not load draft attachments");
5129
6383
  }
@@ -5132,7 +6386,7 @@ function ConnectedMailbox({
5132
6386
  if (!message || !account) return;
5133
6387
  try {
5134
6388
  const attachments = forward ? await hydrate(message.attachments) : [];
5135
- openCompose(chunkO6IEZDRC_cjs.replyMailCompose(message, { account, folderRole, forward, all, attachments }));
6389
+ openCompose(chunkGRGS5M6O_cjs.replyMailCompose(message, { account, folderRole, forward, all, attachments }));
5136
6390
  } catch (e) {
5137
6391
  setActionError(e instanceof Error ? e.message : "Could not prepare forwarded attachments");
5138
6392
  }
@@ -5252,7 +6506,7 @@ function ConnectedMailbox({
5252
6506
  {
5253
6507
  size: "sm",
5254
6508
  disabled: !ready || !!compose,
5255
- onClick: () => openCompose(chunkO6IEZDRC_cjs.emptyMailCompose()),
6509
+ onClick: () => openCompose(chunkGRGS5M6O_cjs.emptyMailCompose()),
5256
6510
  children: [
5257
6511
  /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Plus, { className: "mr-1.5 size-4" }),
5258
6512
  "Email"
@@ -5331,7 +6585,7 @@ function ConnectedMailbox({
5331
6585
  onEdit: (value) => openCompose({ ...value })
5332
6586
  }),
5333
6587
  /* @__PURE__ */ jsxRuntime.jsx("div", { className: deviceFolder ? "hidden" : "min-h-0 flex-1", children: /* @__PURE__ */ jsxRuntime.jsx(
5334
- chunkO6IEZDRC_cjs.MailGrid,
6588
+ chunkGRGS5M6O_cjs.MailGrid,
5335
6589
  {
5336
6590
  messages: filteredMessages,
5337
6591
  loading: list.isPending && list.fetchStatus !== "idle",
@@ -5394,7 +6648,7 @@ function ConnectedMailbox({
5394
6648
  },
5395
6649
  `${account?.id}-${composeSession}`
5396
6650
  ) : message && selected ? /* @__PURE__ */ jsxRuntime.jsx(
5397
- chunkO6IEZDRC_cjs.MailMessageView,
6651
+ chunkGRGS5M6O_cjs.MailMessageView,
5398
6652
  {
5399
6653
  account,
5400
6654
  message,
@@ -5531,7 +6785,7 @@ function ConnectedMailMessage({
5531
6785
  const attachments = forward ? await hydrateMailAttachments(client, account, message.id, message.attachments, {
5532
6786
  isOnline
5533
6787
  }) : [];
5534
- onCompose(chunkO6IEZDRC_cjs.replyMailCompose(message, { account, folderRole, forward, all, attachments }));
6788
+ onCompose(chunkGRGS5M6O_cjs.replyMailCompose(message, { account, folderRole, forward, all, attachments }));
5535
6789
  } catch (e) {
5536
6790
  setError(e instanceof Error ? e.message : "Could not prepare forwarded attachments");
5537
6791
  }
@@ -5539,7 +6793,7 @@ function ConnectedMailMessage({
5539
6793
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex h-full min-h-0 flex-col", children: [
5540
6794
  error && /* @__PURE__ */ jsxRuntime.jsx("p", { role: "alert", className: "px-4 pt-3 text-sm text-destructive", children: error }),
5541
6795
  /* @__PURE__ */ jsxRuntime.jsx(
5542
- chunkO6IEZDRC_cjs.MailMessageView,
6796
+ chunkGRGS5M6O_cjs.MailMessageView,
5543
6797
  {
5544
6798
  account,
5545
6799
  message,
@@ -5550,7 +6804,7 @@ function ConnectedMailMessage({
5550
6804
  onBack: onClose,
5551
6805
  onEditDraft: () => void hydrateMailAttachments(client, account, message.id, message.attachments, {
5552
6806
  isOnline
5553
- }).then((attachments) => onCompose(chunkO6IEZDRC_cjs.draftMailCompose(message, attachments))).catch((e) => setError(e.message)),
6807
+ }).then((attachments) => onCompose(chunkGRGS5M6O_cjs.draftMailCompose(message, attachments))).catch((e) => setError(e.message)),
5554
6808
  onReply: (forward, all) => void reply(forward, all),
5555
6809
  onReplyWithArbi: onReplyWithArbi && account.provider === "native" ? () => onReplyWithArbi(message, account) : void 0,
5556
6810
  onUpdate: (body) => void update(body),
@@ -9301,43 +10555,43 @@ Object.defineProperty(exports, "useWorkspaceDocs", {
9301
10555
  });
9302
10556
  Object.defineProperty(exports, "ConnectedWorkflowDocumentsField", {
9303
10557
  enumerable: true,
9304
- get: function () { return chunkULPFRK3J_cjs.ConnectedWorkflowDocumentsField; }
10558
+ get: function () { return chunkAINU3EJ6_cjs.ConnectedWorkflowDocumentsField; }
9305
10559
  });
9306
10560
  Object.defineProperty(exports, "ConnectedWorkflowLauncher", {
9307
10561
  enumerable: true,
9308
- get: function () { return chunkULPFRK3J_cjs.ConnectedWorkflowLauncher; }
10562
+ get: function () { return chunkAINU3EJ6_cjs.ConnectedWorkflowLauncher; }
9309
10563
  });
9310
10564
  Object.defineProperty(exports, "ConnectedWorkflowsTable", {
9311
10565
  enumerable: true,
9312
- get: function () { return chunkULPFRK3J_cjs.ConnectedWorkflowsTable; }
10566
+ get: function () { return chunkAINU3EJ6_cjs.ConnectedWorkflowsTable; }
9313
10567
  });
9314
10568
  Object.defineProperty(exports, "DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS", {
9315
10569
  enumerable: true,
9316
- get: function () { return chunkULPFRK3J_cjs.DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS; }
10570
+ get: function () { return chunkAINU3EJ6_cjs.DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS; }
9317
10571
  });
9318
10572
  Object.defineProperty(exports, "NativeDocxSupportProvider", {
9319
10573
  enumerable: true,
9320
- get: function () { return chunkULPFRK3J_cjs.NativeDocxSupportProvider; }
10574
+ get: function () { return chunkAINU3EJ6_cjs.NativeDocxSupportProvider; }
9321
10575
  });
9322
10576
  Object.defineProperty(exports, "toWorkflowFieldDocument", {
9323
10577
  enumerable: true,
9324
- get: function () { return chunkULPFRK3J_cjs.toWorkflowFieldDocument; }
10578
+ get: function () { return chunkAINU3EJ6_cjs.toWorkflowFieldDocument; }
9325
10579
  });
9326
10580
  Object.defineProperty(exports, "useConnectedAgentOptions", {
9327
10581
  enumerable: true,
9328
- get: function () { return chunkULPFRK3J_cjs.useConnectedAgentOptions; }
10582
+ get: function () { return chunkAINU3EJ6_cjs.useConnectedAgentOptions; }
9329
10583
  });
9330
10584
  Object.defineProperty(exports, "useConnectedWorkflowScopeSource", {
9331
10585
  enumerable: true,
9332
- get: function () { return chunkULPFRK3J_cjs.useConnectedWorkflowScopeSource; }
10586
+ get: function () { return chunkAINU3EJ6_cjs.useConnectedWorkflowScopeSource; }
9333
10587
  });
9334
10588
  Object.defineProperty(exports, "useConnectedWorkspaceRole", {
9335
10589
  enumerable: true,
9336
- get: function () { return chunkULPFRK3J_cjs.useConnectedWorkspaceRole; }
10590
+ get: function () { return chunkAINU3EJ6_cjs.useConnectedWorkspaceRole; }
9337
10591
  });
9338
10592
  Object.defineProperty(exports, "useNativeDocxSupport", {
9339
10593
  enumerable: true,
9340
- get: function () { return chunkULPFRK3J_cjs.useNativeDocxSupport; }
10594
+ get: function () { return chunkAINU3EJ6_cjs.useNativeDocxSupport; }
9341
10595
  });
9342
10596
  Object.defineProperty(exports, "ConnectedWorkspaceDataProvider", {
9343
10597
  enumerable: true,
@@ -9376,11 +10630,14 @@ Object.defineProperty(exports, "useConnection", {
9376
10630
  get: function () { return chunkGFNELPDP_cjs.useConnection; }
9377
10631
  });
9378
10632
  exports.ArbiAppProvider = ArbiAppProvider;
10633
+ exports.BACKFILL_OPTIONS = BACKFILL_OPTIONS;
9379
10634
  exports.ConnectedAccountSettings = ConnectedAccountSettings;
9380
10635
  exports.ConnectedAgentChatPanel = ConnectedAgentChatPanel;
9381
10636
  exports.ConnectedAgentCreator = ConnectedAgentCreator;
10637
+ exports.ConnectedAppsSettings = ConnectedAppsSettings;
9382
10638
  exports.ConnectedCalendar = ConnectedCalendar;
9383
10639
  exports.ConnectedDangerZone = ConnectedDangerZone;
10640
+ exports.ConnectedDriveSyncDialog = ConnectedDriveSyncDialog;
9384
10641
  exports.ConnectedIdentityVerification = ConnectedIdentityVerification;
9385
10642
  exports.ConnectedLogoutDialog = ConnectedLogoutDialog;
9386
10643
  exports.ConnectedMailAccounts = ConnectedMailAccounts;
@@ -9390,6 +10647,7 @@ exports.ConnectedMailMessage = ConnectedMailMessage;
9390
10647
  exports.ConnectedMailSettings = ConnectedMailSettings;
9391
10648
  exports.ConnectedMailSetup = ConnectedMailSetup;
9392
10649
  exports.ConnectedMailbox = ConnectedMailbox;
10650
+ exports.ConnectedMailboxSyncDialog = ConnectedMailboxSyncDialog;
9393
10651
  exports.ConnectedNotificationCenter = ConnectedNotificationCenter;
9394
10652
  exports.ConnectedNotificationPreferences = ConnectedNotificationPreferences;
9395
10653
  exports.ConnectedPasswordChangeDialog = ConnectedPasswordChangeDialog;
@@ -9412,6 +10670,7 @@ exports.ConnectedWorkflowHistory = ConnectedWorkflowHistory;
9412
10670
  exports.ConnectedWorkflowRunner = ConnectedWorkflowRunner;
9413
10671
  exports.ConnectedWorkspaceActivity = ConnectedWorkspaceActivity;
9414
10672
  exports.ConnectedWorkspaceNotificationMenu = ConnectedWorkspaceNotificationMenu;
10673
+ exports.ConnectedWorkspaceSettings = ConnectedWorkspaceSettings;
9415
10674
  exports.DEFAULT_CONNECTED_SKILL_UPLOAD_LABELS = DEFAULT_CONNECTED_SKILL_UPLOAD_LABELS;
9416
10675
  exports.DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS = DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS;
9417
10676
  exports.DEFAULT_SETTINGS_SECTIONS = DEFAULT_SETTINGS_SECTIONS;
@@ -9425,9 +10684,11 @@ exports.accountSettingsSection = accountSettingsSection;
9425
10684
  exports.bookingCancelLink = bookingCancelLink;
9426
10685
  exports.buildNotificationCenterItems = buildNotificationCenterItems;
9427
10686
  exports.chatSettingsSection = chatSettingsSection;
10687
+ exports.connectedAppsSettingsSection = connectedAppsSettingsSection;
9428
10688
  exports.countNotificationTypes = countNotificationTypes;
9429
10689
  exports.defaultUnmetPasswordRequirement = defaultUnmetPasswordRequirement;
9430
10690
  exports.filterNotificationCenterItems = filterNotificationCenterItems;
10691
+ exports.formatLastSync = formatLastSync;
9431
10692
  exports.mailSettingsSection = mailSettingsSection;
9432
10693
  exports.openMeetingLink = openMeetingLink;
9433
10694
  exports.privacySettingsSection = privacySettingsSection;
@@ -9439,6 +10700,8 @@ exports.useCalendarViewStore = useCalendarViewStore;
9439
10700
  exports.useConnectedDocxNotifications = useConnectedDocxNotifications;
9440
10701
  exports.useConnectedShellWorkspaces = useConnectedShellWorkspaces;
9441
10702
  exports.useConnectedWorkNotifications = useConnectedWorkNotifications;
10703
+ exports.useConnectedWorkspaceSettings = useConnectedWorkspaceSettings;
10704
+ exports.windowLabel = windowLabel;
9442
10705
  exports.workflowRunView = workflowRunView;
9443
10706
  //# sourceMappingURL=index.cjs.map
9444
10707
  //# sourceMappingURL=index.cjs.map