@arbidocs/blocks 0.4.143 → 0.4.144

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 (130) hide show
  1. package/dist/agents/index.cjs +264 -264
  2. package/dist/agents/index.js +7 -7
  3. package/dist/{chunk-IJST4EBM.js → chunk-2FJMTZNJ.js} +8 -8
  4. package/dist/{chunk-IJST4EBM.js.map → chunk-2FJMTZNJ.js.map} +1 -1
  5. package/dist/{chunk-FJETR2AS.js → chunk-33ZOUJXA.js} +4 -4
  6. package/dist/{chunk-FJETR2AS.js.map → chunk-33ZOUJXA.js.map} +1 -1
  7. package/dist/{chunk-IXWJGOM2.js → chunk-3RJN2VTL.js} +3 -3
  8. package/dist/{chunk-IXWJGOM2.js.map → chunk-3RJN2VTL.js.map} +1 -1
  9. package/dist/{chunk-YKQ2DPIP.js → chunk-444XKG46.js} +3 -3
  10. package/dist/{chunk-YKQ2DPIP.js.map → chunk-444XKG46.js.map} +1 -1
  11. package/dist/{chunk-XVUOMWMD.cjs → chunk-5FTIHRZH.cjs} +4 -4
  12. package/dist/{chunk-XVUOMWMD.cjs.map → chunk-5FTIHRZH.cjs.map} +1 -1
  13. package/dist/{chunk-ECW2R2KF.cjs → chunk-65THHQVB.cjs} +27 -27
  14. package/dist/{chunk-ECW2R2KF.cjs.map → chunk-65THHQVB.cjs.map} +1 -1
  15. package/dist/{chunk-Y4ATWQGV.js → chunk-7NGAWGA3.js} +3 -3
  16. package/dist/{chunk-Y4ATWQGV.js.map → chunk-7NGAWGA3.js.map} +1 -1
  17. package/dist/{chunk-T5B7FM7S.js → chunk-A6J2IBUG.js} +4 -4
  18. package/dist/{chunk-T5B7FM7S.js.map → chunk-A6J2IBUG.js.map} +1 -1
  19. package/dist/{chunk-RB7GX2VT.cjs → chunk-ABUO6PIQ.cjs} +12 -12
  20. package/dist/{chunk-RB7GX2VT.cjs.map → chunk-ABUO6PIQ.cjs.map} +1 -1
  21. package/dist/{chunk-NRFAWUVD.js → chunk-BPBSSMRB.js} +3 -3
  22. package/dist/{chunk-NRFAWUVD.js.map → chunk-BPBSSMRB.js.map} +1 -1
  23. package/dist/{chunk-HAOKT4LC.cjs → chunk-BUWBXJ2N.cjs} +5 -5
  24. package/dist/{chunk-HAOKT4LC.cjs.map → chunk-BUWBXJ2N.cjs.map} +1 -1
  25. package/dist/{chunk-KPZZ5FHE.cjs → chunk-C4WSHRR6.cjs} +12 -32
  26. package/dist/chunk-C4WSHRR6.cjs.map +1 -0
  27. package/dist/{chunk-J5CWKFSC.js → chunk-CYNF5PZI.js} +3 -3
  28. package/dist/{chunk-J5CWKFSC.js.map → chunk-CYNF5PZI.js.map} +1 -1
  29. package/dist/{chunk-VTTZZ4FN.js → chunk-DLBUFHLY.js} +74 -4
  30. package/dist/chunk-DLBUFHLY.js.map +1 -0
  31. package/dist/{chunk-YSHIC4NJ.cjs → chunk-HEMU73OP.cjs} +4 -4
  32. package/dist/{chunk-YSHIC4NJ.cjs.map → chunk-HEMU73OP.cjs.map} +1 -1
  33. package/dist/{chunk-UTTTJSQU.cjs → chunk-HFGXA5CL.cjs} +4 -4
  34. package/dist/{chunk-UTTTJSQU.cjs.map → chunk-HFGXA5CL.cjs.map} +1 -1
  35. package/dist/{chunk-H4D7WKDY.js → chunk-I7WG3JRD.js} +3 -3
  36. package/dist/{chunk-H4D7WKDY.js.map → chunk-I7WG3JRD.js.map} +1 -1
  37. package/dist/{chunk-SZOFGU7W.js → chunk-LYUO3E6V.js} +3 -3
  38. package/dist/{chunk-SZOFGU7W.js.map → chunk-LYUO3E6V.js.map} +1 -1
  39. package/dist/{chunk-TC3RQNEX.cjs → chunk-MJCCBMM5.cjs} +80 -6
  40. package/dist/chunk-MJCCBMM5.cjs.map +1 -0
  41. package/dist/{chunk-LPYEUD2D.cjs → chunk-O2ODDTMA.cjs} +9 -9
  42. package/dist/{chunk-LPYEUD2D.cjs.map → chunk-O2ODDTMA.cjs.map} +1 -1
  43. package/dist/{chunk-5YHEHEJT.js → chunk-ON3TKY5Y.js} +4 -242
  44. package/dist/chunk-ON3TKY5Y.js.map +1 -0
  45. package/dist/{chunk-U73KPFYH.cjs → chunk-QIMVTGKS.cjs} +2 -255
  46. package/dist/chunk-QIMVTGKS.cjs.map +1 -0
  47. package/dist/{chunk-DTROMMDX.cjs → chunk-R26BK7YL.cjs} +4 -4
  48. package/dist/{chunk-DTROMMDX.cjs.map → chunk-R26BK7YL.cjs.map} +1 -1
  49. package/dist/{chunk-U6YVZDOV.cjs → chunk-RA3ZJ45L.cjs} +13 -13
  50. package/dist/{chunk-U6YVZDOV.cjs.map → chunk-RA3ZJ45L.cjs.map} +1 -1
  51. package/dist/{chunk-EF4ZLKRM.js → chunk-RI6DZA5X.js} +3 -3
  52. package/dist/{chunk-EF4ZLKRM.js.map → chunk-RI6DZA5X.js.map} +1 -1
  53. package/dist/{chunk-KMZWKSKO.cjs → chunk-TP6PLDNM.cjs} +8 -8
  54. package/dist/{chunk-KMZWKSKO.cjs.map → chunk-TP6PLDNM.cjs.map} +1 -1
  55. package/dist/{chunk-EYKISBDO.cjs → chunk-WS5EX7DN.cjs} +5 -5
  56. package/dist/{chunk-EYKISBDO.cjs.map → chunk-WS5EX7DN.cjs.map} +1 -1
  57. package/dist/{chunk-C44TDH54.js → chunk-X3TGXEFS.js} +6 -6
  58. package/dist/{chunk-C44TDH54.js.map → chunk-X3TGXEFS.js.map} +1 -1
  59. package/dist/{chunk-O2GW5IY6.cjs → chunk-XGZX22ET.cjs} +38 -38
  60. package/dist/{chunk-O2GW5IY6.cjs.map → chunk-XGZX22ET.cjs.map} +1 -1
  61. package/dist/{chunk-OVR3XMYL.js → chunk-Y3KA6X7B.js} +4 -4
  62. package/dist/{chunk-OVR3XMYL.js.map → chunk-Y3KA6X7B.js.map} +1 -1
  63. package/dist/{chunk-COCGRJLA.cjs → chunk-YFY3TQ6Q.cjs} +7 -7
  64. package/dist/{chunk-COCGRJLA.cjs.map → chunk-YFY3TQ6Q.cjs.map} +1 -1
  65. package/dist/{chunk-TBEVGWY3.js → chunk-YNIBUKV5.js} +14 -32
  66. package/dist/chunk-YNIBUKV5.js.map +1 -0
  67. package/dist/citations/index.cjs +12 -12
  68. package/dist/citations/index.js +3 -3
  69. package/dist/connect/docx.cjs +10 -10
  70. package/dist/connect/docx.js +7 -7
  71. package/dist/connect/index.cjs +322 -709
  72. package/dist/connect/index.cjs.map +1 -1
  73. package/dist/connect/index.d.ts +0 -1
  74. package/dist/connect/index.js +214 -588
  75. package/dist/connect/index.js.map +1 -1
  76. package/dist/connection/ConnectedSettings.d.ts +2 -3
  77. package/dist/facts/index.cjs +3 -3
  78. package/dist/facts/index.js +2 -2
  79. package/dist/files/index.cjs +3 -3
  80. package/dist/files/index.js +2 -2
  81. package/dist/home/index.cjs +20 -20
  82. package/dist/home/index.js +4 -4
  83. package/dist/index.cjs +440 -449
  84. package/dist/index.cjs.map +1 -1
  85. package/dist/index.d.ts +0 -1
  86. package/dist/index.js +16 -17
  87. package/dist/index.js.map +1 -1
  88. package/dist/provider/BlocksProvider.d.ts +1 -5
  89. package/dist/retrieval/index.cjs +4 -4
  90. package/dist/retrieval/index.js +2 -2
  91. package/dist/settings/ServerConnectionControls.d.ts +0 -16
  92. package/dist/settings/index.cjs +241 -178
  93. package/dist/settings/index.cjs.map +1 -1
  94. package/dist/settings/index.d.ts +1 -3
  95. package/dist/settings/index.js +198 -86
  96. package/dist/settings/index.js.map +1 -1
  97. package/dist/shell/index.cjs +44 -44
  98. package/dist/shell/index.js +3 -3
  99. package/dist/site/index.cjs +73 -74
  100. package/dist/site/index.js +2 -3
  101. package/dist/studio/index.cjs +74 -75
  102. package/dist/studio/index.cjs.map +1 -1
  103. package/dist/studio/index.js +5 -6
  104. package/dist/studio/index.js.map +1 -1
  105. package/dist/workflow-canvas/index.cjs +21 -21
  106. package/dist/workflow-canvas/index.js +7 -7
  107. package/dist/workspaces/index.cjs +3 -3
  108. package/dist/workspaces/index.js +2 -2
  109. package/node_modules/@arbidocs/coedit/package.json +1 -1
  110. package/package.json +4 -4
  111. package/dist/chunk-5YHEHEJT.js.map +0 -1
  112. package/dist/chunk-KPZZ5FHE.cjs.map +0 -1
  113. package/dist/chunk-NHZK64TQ.js +0 -75
  114. package/dist/chunk-NHZK64TQ.js.map +0 -1
  115. package/dist/chunk-NWNVWO6L.cjs +0 -80
  116. package/dist/chunk-NWNVWO6L.cjs.map +0 -1
  117. package/dist/chunk-TBEVGWY3.js.map +0 -1
  118. package/dist/chunk-TC3RQNEX.cjs.map +0 -1
  119. package/dist/chunk-U73KPFYH.cjs.map +0 -1
  120. package/dist/chunk-VTTZZ4FN.js.map +0 -1
  121. package/dist/connection/settings-page/ConnectedAccountSettings.d.ts +0 -35
  122. package/dist/connection/settings-page/ConnectedMailSettings.d.ts +0 -13
  123. package/dist/connection/settings-page/ConnectedPremiumModels.d.ts +0 -1
  124. package/dist/connection/settings-page/ConnectedPrivacySettings.d.ts +0 -12
  125. package/dist/connection/settings-page/ConnectedSettingsPage.d.ts +0 -29
  126. package/dist/connection/settings-page/SessionStatusIcon.d.ts +0 -7
  127. package/dist/connection/settings-page/index.d.ts +0 -6
  128. package/dist/provider/settings-section.d.ts +0 -9
  129. package/dist/settings/AppearanceSettings.d.ts +0 -18
  130. package/dist/settings/SettingsPage.d.ts +0 -31
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
  'use strict';
3
3
 
4
- var chunkU73KPFYH_cjs = require('../chunk-U73KPFYH.cjs');
4
+ var chunkQIMVTGKS_cjs = require('../chunk-QIMVTGKS.cjs');
5
5
  var chunkODRHHWHY_cjs = require('../chunk-ODRHHWHY.cjs');
6
- var chunkU6YVZDOV_cjs = require('../chunk-U6YVZDOV.cjs');
6
+ var chunkRA3ZJ45L_cjs = require('../chunk-RA3ZJ45L.cjs');
7
7
  var chunkJZNXRMLH_cjs = require('../chunk-JZNXRMLH.cjs');
8
8
  var chunkGFNELPDP_cjs = require('../chunk-GFNELPDP.cjs');
9
9
  var chunkJH6JTI76_cjs = require('../chunk-JH6JTI76.cjs');
@@ -11,21 +11,21 @@ require('../chunk-464YPRAE.cjs');
11
11
  require('../chunk-V5OAXIBN.cjs');
12
12
  require('../chunk-5FYU7ZIU.cjs');
13
13
  var chunkO4YPVYPO_cjs = require('../chunk-O4YPVYPO.cjs');
14
- var chunkHAOKT4LC_cjs = require('../chunk-HAOKT4LC.cjs');
14
+ var chunkBUWBXJ2N_cjs = require('../chunk-BUWBXJ2N.cjs');
15
15
  var chunkV46W7YLI_cjs = require('../chunk-V46W7YLI.cjs');
16
16
  var chunkO6IEZDRC_cjs = require('../chunk-O6IEZDRC.cjs');
17
17
  require('../chunk-LJJJ6CYH.cjs');
18
18
  var chunkI2QSDQQV_cjs = require('../chunk-I2QSDQQV.cjs');
19
19
  require('../chunk-RC25WMVB.cjs');
20
- var chunkRB7GX2VT_cjs = require('../chunk-RB7GX2VT.cjs');
20
+ var chunkABUO6PIQ_cjs = require('../chunk-ABUO6PIQ.cjs');
21
21
  var chunkRFIBUWLF_cjs = require('../chunk-RFIBUWLF.cjs');
22
- var chunkLPYEUD2D_cjs = require('../chunk-LPYEUD2D.cjs');
23
- require('../chunk-EYKISBDO.cjs');
24
- require('../chunk-AHDJXIUB.cjs');
22
+ var chunkO2ODDTMA_cjs = require('../chunk-O2ODDTMA.cjs');
23
+ require('../chunk-WS5EX7DN.cjs');
25
24
  var chunkRQ2Y7USX_cjs = require('../chunk-RQ2Y7USX.cjs');
25
+ require('../chunk-AHDJXIUB.cjs');
26
26
  require('../chunk-ZW6FPIFC.cjs');
27
27
  require('../chunk-DETZZBG2.cjs');
28
- require('../chunk-DTROMMDX.cjs');
28
+ require('../chunk-R26BK7YL.cjs');
29
29
  var chunkV4ISCZJ7_cjs = require('../chunk-V4ISCZJ7.cjs');
30
30
  var chunk2EI7NCUA_cjs = require('../chunk-2EI7NCUA.cjs');
31
31
  var chunkC2CWWEHO_cjs = require('../chunk-C2CWWEHO.cjs');
@@ -45,8 +45,8 @@ require('../chunk-32HW2Q33.cjs');
45
45
  require('../chunk-FX3K6LNZ.cjs');
46
46
  require('../chunk-PPCATBOY.cjs');
47
47
  require('../chunk-MHVNT4J3.cjs');
48
- var chunkXVUOMWMD_cjs = require('../chunk-XVUOMWMD.cjs');
49
- var chunkKPZZ5FHE_cjs = require('../chunk-KPZZ5FHE.cjs');
48
+ var chunk5FTIHRZH_cjs = require('../chunk-5FTIHRZH.cjs');
49
+ var chunkC4WSHRR6_cjs = require('../chunk-C4WSHRR6.cjs');
50
50
  var chunkULWRNGGE_cjs = require('../chunk-ULWRNGGE.cjs');
51
51
  var chunkKDG6FER6_cjs = require('../chunk-KDG6FER6.cjs');
52
52
  require('../chunk-DES3K4SD.cjs');
@@ -140,7 +140,7 @@ function ConnectedWorkspaceActivity({
140
140
  [feed.data]
141
141
  );
142
142
  return /* @__PURE__ */ jsxRuntime.jsx(
143
- chunkHAOKT4LC_cjs.WorkspaceActivityList,
143
+ chunkBUWBXJ2N_cjs.WorkspaceActivityList,
144
144
  {
145
145
  ...listProps,
146
146
  items,
@@ -568,7 +568,7 @@ function NotificationCenter({
568
568
  }
569
569
  ];
570
570
  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(
571
+ /* @__PURE__ */ jsxRuntime.jsx(chunkQIMVTGKS_cjs.DraggableHeader, { children: /* @__PURE__ */ jsxRuntime.jsx(
572
572
  chunk7RGLTF76_cjs.TabHeader,
573
573
  {
574
574
  tabs,
@@ -813,7 +813,7 @@ function ConnectedWorkspaceNotificationMenu({
813
813
  });
814
814
  if (!workspaceId) return null;
815
815
  return /* @__PURE__ */ jsxRuntime.jsx(
816
- chunkHAOKT4LC_cjs.WorkspaceNotificationMenu,
816
+ chunkBUWBXJ2N_cjs.WorkspaceNotificationMenu,
817
817
  {
818
818
  ...menuProps,
819
819
  level,
@@ -832,7 +832,7 @@ function ConnectedThreadFollow({
832
832
  enabled: status === "authenticated"
833
833
  });
834
834
  if (!conversationId) return null;
835
- const Control = as === "menu-item" ? chunkHAOKT4LC_cjs.ThreadFollowMenuItem : chunkHAOKT4LC_cjs.ThreadFollowButton;
835
+ const Control = as === "menu-item" ? chunkBUWBXJ2N_cjs.ThreadFollowMenuItem : chunkBUWBXJ2N_cjs.ThreadFollowButton;
836
836
  return /* @__PURE__ */ jsxRuntime.jsx(
837
837
  Control,
838
838
  {
@@ -857,7 +857,7 @@ var DEFAULT_CONNECTED_SKILL_UPLOAD_LABELS = {
857
857
  };
858
858
  function ConnectedSkillUpload({ onDone, labels, className }) {
859
859
  const l = { ...DEFAULT_CONNECTED_SKILL_UPLOAD_LABELS, ...labels };
860
- const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
860
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
861
861
  const upload = react$1.useUploadSkillFiles();
862
862
  const fileRef = react.useRef(null);
863
863
  const [url, setUrl] = react.useState("");
@@ -905,7 +905,7 @@ function ConnectedSkillUpload({ onDone, labels, className }) {
905
905
  onChange: (e) => {
906
906
  const file = e.target.files?.[0];
907
907
  e.target.value = "";
908
- if (file) void add(() => chunkRB7GX2VT_cjs.importSkillFile(file));
908
+ if (file) void add(() => chunkABUO6PIQ_cjs.importSkillFile(file));
909
909
  }
910
910
  }
911
911
  ),
@@ -930,7 +930,7 @@ function ConnectedSkillUpload({ onDone, labels, className }) {
930
930
  className: "space-y-2",
931
931
  onSubmit: (e) => {
932
932
  e.preventDefault();
933
- if (url.trim()) void add(() => chunkRB7GX2VT_cjs.importSkillFromUrl(url));
933
+ if (url.trim()) void add(() => chunkABUO6PIQ_cjs.importSkillFromUrl(url));
934
934
  },
935
935
  children: [
936
936
  /* @__PURE__ */ jsxRuntime.jsx(ui.Label, { htmlFor: "skills-add-url", children: l.fromLink }),
@@ -982,7 +982,7 @@ function ConnectedSkillsLibrary({
982
982
  renderEditor
983
983
  }) {
984
984
  const arbi = react$1.useArbi();
985
- const { confirm, notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
985
+ const { confirm, notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
986
986
  const { data: listings } = react$1.useSkills();
987
987
  const upload = react$1.useUploadSkillFiles();
988
988
  const setVisibility = react$1.useSetSkillVisibility();
@@ -994,9 +994,9 @@ function ConnectedSkillsLibrary({
994
994
  const [type, setType] = react.useState("all");
995
995
  const [view, setView] = react.useState("gallery");
996
996
  const [isBusy, setIsBusy] = react.useState(false);
997
- const all = react.useMemo(() => chunkRB7GX2VT_cjs.buildLibrarySkills(builtins, listings ?? []), [builtins, listings]);
997
+ const all = react.useMemo(() => chunkABUO6PIQ_cjs.buildLibrarySkills(builtins, listings ?? []), [builtins, listings]);
998
998
  const shown = react.useMemo(
999
- () => chunkRB7GX2VT_cjs.filterLibrarySkills(all, { query, source, type }),
999
+ () => chunkABUO6PIQ_cjs.filterLibrarySkills(all, { query, source, type }),
1000
1000
  [all, query, source, type]
1001
1001
  );
1002
1002
  const current = all.find((s) => s.slug === selected) ?? null;
@@ -1007,21 +1007,21 @@ function ConnectedSkillsLibrary({
1007
1007
  const count = (s) => all.filter((x) => x.source === s).length;
1008
1008
  const sourceOptions = [
1009
1009
  { id: "all", label: "All", count: all.length },
1010
- { id: "builtin", label: chunkRB7GX2VT_cjs.SKILL_SOURCE_LABELS.builtin, count: count("builtin") },
1011
- { id: "mine", label: chunkRB7GX2VT_cjs.SKILL_SOURCE_LABELS.mine, count: count("mine") },
1012
- { id: "shared", label: chunkRB7GX2VT_cjs.SKILL_SOURCE_LABELS.shared, count: count("shared") }
1010
+ { id: "builtin", label: chunkABUO6PIQ_cjs.SKILL_SOURCE_LABELS.builtin, count: count("builtin") },
1011
+ { id: "mine", label: chunkABUO6PIQ_cjs.SKILL_SOURCE_LABELS.mine, count: count("mine") },
1012
+ { id: "shared", label: chunkABUO6PIQ_cjs.SKILL_SOURCE_LABELS.shared, count: count("shared") }
1013
1013
  ];
1014
1014
  const types = [...new Set(all.map((s) => s.type))];
1015
1015
  const typeOptions = [
1016
1016
  { id: "all", label: "Any kind" },
1017
- ...types.map((t) => ({ id: t, label: chunkRB7GX2VT_cjs.SKILL_TYPE_LABELS[t] ?? t }))
1017
+ ...types.map((t) => ({ id: t, label: chunkABUO6PIQ_cjs.SKILL_TYPE_LABELS[t] ?? t }))
1018
1018
  ];
1019
1019
  const pick = (slug) => {
1020
1020
  setSelected(slug);
1021
1021
  setMode("detail");
1022
1022
  };
1023
1023
  const markdownOf = async (skill) => {
1024
- if (!skill.docExtId) return chunkRB7GX2VT_cjs.workflowToSkillMarkdown(skill.workflow);
1024
+ if (!skill.docExtId) return chunkABUO6PIQ_cjs.workflowToSkillMarkdown(skill.workflow);
1025
1025
  const response = await arbi.documents.download(skill.docExtId);
1026
1026
  if (!response.ok) throw new Error(`Could not read the skill (${response.status})`);
1027
1027
  return response.text();
@@ -1029,7 +1029,7 @@ function ConnectedSkillsLibrary({
1029
1029
  const saveAs = (slug, markdown, shared = false) => upload.mutateAsync([
1030
1030
  {
1031
1031
  folder: `${SKILL_FOLDER}${slug}`,
1032
- fileName: chunkRB7GX2VT_cjs.SKILL_MAIN_FILENAME,
1032
+ fileName: chunkABUO6PIQ_cjs.SKILL_MAIN_FILENAME,
1033
1033
  content: new Blob([markdown], { type: "text/markdown" }),
1034
1034
  shared
1035
1035
  }
@@ -1092,7 +1092,7 @@ function ConnectedSkillsLibrary({
1092
1092
  try {
1093
1093
  documentTools.downloadBlob(
1094
1094
  new Blob([await markdownOf(skill)], { type: "text/markdown" }),
1095
- chunkRB7GX2VT_cjs.SKILL_MAIN_FILENAME
1095
+ chunkABUO6PIQ_cjs.SKILL_MAIN_FILENAME
1096
1096
  );
1097
1097
  } catch (error) {
1098
1098
  notify(errorText(error, "Could not export the skill"), "error");
@@ -1133,10 +1133,10 @@ function ConnectedSkillsLibrary({
1133
1133
  }
1134
1134
  )
1135
1135
  ] }),
1136
- /* @__PURE__ */ jsxRuntime.jsx(chunkRB7GX2VT_cjs.SkillViewToggle, { value: view, onChange: setView })
1136
+ /* @__PURE__ */ jsxRuntime.jsx(chunkABUO6PIQ_cjs.SkillViewToggle, { value: view, onChange: setView })
1137
1137
  ] }),
1138
1138
  /* @__PURE__ */ jsxRuntime.jsx(
1139
- chunkRB7GX2VT_cjs.SkillFilterChips,
1139
+ chunkABUO6PIQ_cjs.SkillFilterChips,
1140
1140
  {
1141
1141
  label: "Show",
1142
1142
  value: source,
@@ -1145,7 +1145,7 @@ function ConnectedSkillsLibrary({
1145
1145
  }
1146
1146
  ),
1147
1147
  types.length > 1 && /* @__PURE__ */ jsxRuntime.jsx(
1148
- chunkRB7GX2VT_cjs.SkillFilterChips,
1148
+ chunkABUO6PIQ_cjs.SkillFilterChips,
1149
1149
  {
1150
1150
  label: "Kind",
1151
1151
  value: type,
@@ -1192,12 +1192,12 @@ function ConnectedSkillsLibrary({
1192
1192
  view === "gallery" ? "grid grid-cols-[repeat(auto-fill,minmax(9.5rem,1fr))]" : "flex flex-col"
1193
1193
  ),
1194
1194
  children: shown.map((skill) => /* @__PURE__ */ jsxRuntime.jsx(
1195
- chunkRB7GX2VT_cjs.SkillTile,
1195
+ chunkABUO6PIQ_cjs.SkillTile,
1196
1196
  {
1197
1197
  name: skill.title,
1198
1198
  testId: `skill-tile-${skill.slug}`,
1199
1199
  description: skill.description,
1200
- sourceLabel: skill.isShared ? `${chunkRB7GX2VT_cjs.SKILL_SOURCE_LABELS.mine}, shared` : chunkRB7GX2VT_cjs.SKILL_SOURCE_LABELS[skill.source],
1200
+ sourceLabel: skill.isShared ? `${chunkABUO6PIQ_cjs.SKILL_SOURCE_LABELS.mine}, shared` : chunkABUO6PIQ_cjs.SKILL_SOURCE_LABELS[skill.source],
1201
1201
  type: skill.type,
1202
1202
  icon,
1203
1203
  layout: view,
@@ -1232,7 +1232,7 @@ function ConnectedSkillsLibrary({
1232
1232
  }
1233
1233
  ),
1234
1234
  mode === "new" && /* @__PURE__ */ jsxRuntime.jsx(
1235
- chunkRB7GX2VT_cjs.SkillGenerateForm,
1235
+ chunkABUO6PIQ_cjs.SkillGenerateForm,
1236
1236
  {
1237
1237
  icon,
1238
1238
  onGenerate: (desc) => {
@@ -1259,11 +1259,11 @@ function ConnectedSkillsLibrary({
1259
1259
  ),
1260
1260
  mode === "add" && /* @__PURE__ */ jsxRuntime.jsx(ConnectedSkillUpload, { onDone: done }),
1261
1261
  mode === "detail" && current && /* @__PURE__ */ jsxRuntime.jsx(
1262
- chunkRB7GX2VT_cjs.SkillLibraryDetail,
1262
+ chunkABUO6PIQ_cjs.SkillLibraryDetail,
1263
1263
  {
1264
1264
  skill: current,
1265
1265
  icon,
1266
- instructions: current.docExtId ? currentText ? chunkRB7GX2VT_cjs.parseSkillFrontmatter(currentText, chunkRB7GX2VT_cjs.SKILL_MAIN_FILENAME).content : "" : current.workflow.run.kind === "prompt" ? current.workflow.run.promptTemplate : "",
1266
+ instructions: current.docExtId ? currentText ? chunkABUO6PIQ_cjs.parseSkillFrontmatter(currentText, chunkABUO6PIQ_cjs.SKILL_MAIN_FILENAME).content : "" : current.workflow.run.kind === "prompt" ? current.workflow.run.promptTemplate : "",
1267
1267
  isLoading: !!current.docExtId && textLoading,
1268
1268
  actions: {
1269
1269
  onRun: () => onRun(current.slug),
@@ -1290,7 +1290,7 @@ function SkillEditor({
1290
1290
  onCancel,
1291
1291
  isSaving
1292
1292
  }) {
1293
- const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
1293
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
1294
1294
  const isEditing = !!skill;
1295
1295
  const [name, setName] = react.useState(skill?.slug ?? "");
1296
1296
  const [description, setDescription] = react.useState("");
@@ -1298,7 +1298,7 @@ function SkillEditor({
1298
1298
  const [seeded, setSeeded] = react.useState(!isEditing);
1299
1299
  const [nameError, setNameError] = react.useState(null);
1300
1300
  if (isEditing && !seeded && text !== void 0) {
1301
- const parsed = chunkRB7GX2VT_cjs.parseSkillFrontmatter(text, chunkRB7GX2VT_cjs.SKILL_MAIN_FILENAME);
1301
+ const parsed = chunkABUO6PIQ_cjs.parseSkillFrontmatter(text, chunkABUO6PIQ_cjs.SKILL_MAIN_FILENAME);
1302
1302
  setDescription(parsed.description ?? "");
1303
1303
  setBody(parsed.content ?? "");
1304
1304
  setSeeded(true);
@@ -1312,15 +1312,15 @@ function SkillEditor({
1312
1312
  notify("Add a short description.", "error");
1313
1313
  return;
1314
1314
  }
1315
- const slug = chunkRB7GX2VT_cjs.skillSlug(name);
1315
+ const slug = chunkABUO6PIQ_cjs.skillSlug(name);
1316
1316
  try {
1317
- await onSave(slug, chunkRB7GX2VT_cjs.serializeSkill({ name: slug, description, body }), isEditing);
1317
+ await onSave(slug, chunkABUO6PIQ_cjs.serializeSkill({ name: slug, description, body }), isEditing);
1318
1318
  } catch (err) {
1319
1319
  notify(errorText(err, "Could not save the skill"), "error");
1320
1320
  }
1321
1321
  };
1322
1322
  return /* @__PURE__ */ jsxRuntime.jsx(
1323
- chunkRB7GX2VT_cjs.SkillEditForm,
1323
+ chunkABUO6PIQ_cjs.SkillEditForm,
1324
1324
  {
1325
1325
  name,
1326
1326
  onNameChange: setName,
@@ -1356,13 +1356,13 @@ function ConnectedAgentCreator({
1356
1356
  agent,
1357
1357
  initialName,
1358
1358
  onSaved,
1359
- capabilities = chunkRB7GX2VT_cjs.DEFAULT_AGENT_CAPABILITIES,
1360
- templates = chunkRB7GX2VT_cjs.DEFAULT_AGENT_TEMPLATES,
1361
- types = chunkRB7GX2VT_cjs.DEFAULT_AGENT_TYPES,
1359
+ capabilities = chunkABUO6PIQ_cjs.DEFAULT_AGENT_CAPABILITIES,
1360
+ templates = chunkABUO6PIQ_cjs.DEFAULT_AGENT_TEMPLATES,
1361
+ types = chunkABUO6PIQ_cjs.DEFAULT_AGENT_TYPES,
1362
1362
  canRevokeWorkspaces = false,
1363
1363
  labels
1364
1364
  }) {
1365
- const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
1365
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
1366
1366
  const isEdit = !!agent;
1367
1367
  const [saving, setSaving] = react.useState(false);
1368
1368
  const [skills, setSkills] = react.useState([]);
@@ -1400,7 +1400,7 @@ function ConnectedAgentCreator({
1400
1400
  const initialValues = react.useMemo(
1401
1401
  () => ({
1402
1402
  name: agent?.given_name ?? initialName ?? "",
1403
- persona: isEdit ? chunkRB7GX2VT_cjs.stripPersonaPreamble(String(agents.PERSONA ?? "")) : "",
1403
+ persona: isEdit ? chunkABUO6PIQ_cjs.stripPersonaPreamble(String(agents.PERSONA ?? "")) : "",
1404
1404
  modelName: String(agents.AGENT_MODEL_NAME ?? ""),
1405
1405
  capabilities: Object.fromEntries(capabilities.map(({ key }) => [key, Boolean(agents[key])])),
1406
1406
  type: "builtin",
@@ -1419,7 +1419,7 @@ function ConnectedAgentCreator({
1419
1419
  try {
1420
1420
  let agentExtId = agent?.external_id ?? early?.id ?? "";
1421
1421
  if (!agentExtId) {
1422
- if (!chunkRB7GX2VT_cjs.isValidAgentName(values.name)) {
1422
+ if (!chunkABUO6PIQ_cjs.isValidAgentName(values.name)) {
1423
1423
  notify("Give the agent a name first.", "error");
1424
1424
  return;
1425
1425
  }
@@ -1455,7 +1455,7 @@ function ConnectedAgentCreator({
1455
1455
  title: `agent-${name}`,
1456
1456
  sections: {
1457
1457
  Agents: {
1458
- PERSONA: chunkRB7GX2VT_cjs.composePersona(name, values.persona),
1458
+ PERSONA: chunkABUO6PIQ_cjs.composePersona(name, values.persona),
1459
1459
  ...values.modelName ? { AGENT_MODEL_NAME: values.modelName } : {},
1460
1460
  ...Object.fromEntries(capabilities.map(({ key }) => [key, !!values.capabilities[key]])),
1461
1461
  ENABLED_SKILLS: values.capabilities.SKILLS_ENABLED && skills.length ? skills : null,
@@ -1478,7 +1478,7 @@ function ConnectedAgentCreator({
1478
1478
  };
1479
1479
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
1480
1480
  /* @__PURE__ */ jsxRuntime.jsx(
1481
- chunkRB7GX2VT_cjs.AgentCreator,
1481
+ chunkABUO6PIQ_cjs.AgentCreator,
1482
1482
  {
1483
1483
  open: ready,
1484
1484
  onOpenChange,
@@ -1494,11 +1494,11 @@ function ConnectedAgentCreator({
1494
1494
  ) : void 0,
1495
1495
  revokingWorkspaceId: revokeAccess.isPending ? revokeAccess.variables?.workspaceId : void 0,
1496
1496
  avatar: (values) => /* @__PURE__ */ jsxRuntime.jsx(
1497
- chunkRB7GX2VT_cjs.AgentAvatarField,
1497
+ chunkABUO6PIQ_cjs.AgentAvatarField,
1498
1498
  {
1499
1499
  picture,
1500
1500
  isBusy: avatarBusy,
1501
- canGenerate: isEdit || chunkRB7GX2VT_cjs.isValidAgentName(values.name),
1501
+ canGenerate: isEdit || chunkABUO6PIQ_cjs.isValidAgentName(values.name),
1502
1502
  onGenerate: () => handleGenerateAvatar(values)
1503
1503
  }
1504
1504
  ),
@@ -1550,7 +1550,7 @@ function ConnectedAgentCreator({
1550
1550
  /* @__PURE__ */ jsxRuntime.jsx(ui.DialogTitle, { children: "Connect your agent" }),
1551
1551
  /* @__PURE__ */ jsxRuntime.jsx(ui.DialogDescription, { children: "This key is shown once. Run the script on the machine that will host the agent." })
1552
1552
  ] }),
1553
- connect && /* @__PURE__ */ jsxRuntime.jsx(chunkRB7GX2VT_cjs.AgentConnectInstructions, { email: connect.email, signingKey: connect.signingKey })
1553
+ connect && /* @__PURE__ */ jsxRuntime.jsx(chunkABUO6PIQ_cjs.AgentConnectInstructions, { email: connect.email, signingKey: connect.signingKey })
1554
1554
  ]
1555
1555
  }
1556
1556
  ) })
@@ -1584,10 +1584,10 @@ function ConnectedWorkflowHistory({
1584
1584
  renderErrorReport,
1585
1585
  labels
1586
1586
  }) {
1587
- const { openConversation } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
1587
+ const { openConversation } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
1588
1588
  const { data: runs = [], isLoading } = react$1.useWorkflowRuns(workflow?.external_id);
1589
1589
  return /* @__PURE__ */ jsxRuntime.jsx(
1590
- chunkRB7GX2VT_cjs.TaskRunsDialog,
1590
+ chunkABUO6PIQ_cjs.TaskRunsDialog,
1591
1591
  {
1592
1592
  inline,
1593
1593
  hideHeader,
@@ -1623,14 +1623,14 @@ function ConnectedTaskActivityDialog({
1623
1623
  const activity = react$1.useConversationActivity(conversationId, { live });
1624
1624
  const { data: agents = [] } = react$1.useAgents();
1625
1625
  const { userId } = chunkGFNELPDP_cjs.useConnectedWorkspace();
1626
- const { members } = chunkU6YVZDOV_cjs.useConnectedWorkspaceRole();
1626
+ const { members } = chunkRA3ZJ45L_cjs.useConnectedWorkspaceRole();
1627
1627
  const renderPerson = react.useCallback(
1628
1628
  (id) => {
1629
1629
  const isMe = !!id && id === userId;
1630
1630
  const member = members.find((m) => m.user.external_id === id)?.user;
1631
1631
  const name = member && [member.given_name, member.family_name].filter(Boolean).join(" ") || member?.email;
1632
1632
  const person = { id, label: isMe ? "You" : name || "Someone", isMe };
1633
- return renderTaskPerson ? renderTaskPerson(person) : /* @__PURE__ */ jsxRuntime.jsx(chunkLPYEUD2D_cjs.PersonPill, { person });
1633
+ return renderTaskPerson ? renderTaskPerson(person) : /* @__PURE__ */ jsxRuntime.jsx(chunkO2ODDTMA_cjs.PersonPill, { person });
1634
1634
  },
1635
1635
  [renderTaskPerson, userId, members]
1636
1636
  );
@@ -1639,7 +1639,7 @@ function ConnectedTaskActivityDialog({
1639
1639
  [agents]
1640
1640
  );
1641
1641
  return /* @__PURE__ */ jsxRuntime.jsx(
1642
- chunkRB7GX2VT_cjs.TaskActivityDialog,
1642
+ chunkABUO6PIQ_cjs.TaskActivityDialog,
1643
1643
  {
1644
1644
  open: true,
1645
1645
  onOpenChange: (open) => !open && onClose(),
@@ -1785,7 +1785,7 @@ function useWorkflowThread(workflow, options = {}) {
1785
1785
  );
1786
1786
  const conversation = conversations.data?.find((c) => c.external_id === threadId);
1787
1787
  const steps = react.useMemo(
1788
- () => chunkJSTKEZBS_cjs.workflowSteps(workflow).length > 0 ? chunkJSTKEZBS_cjs.workflowSteps(workflow) : chunkRB7GX2VT_cjs.fromPlanSteps(conversation?.plan?.steps ?? []),
1788
+ () => chunkJSTKEZBS_cjs.workflowSteps(workflow).length > 0 ? chunkJSTKEZBS_cjs.workflowSteps(workflow) : chunkABUO6PIQ_cjs.fromPlanSteps(conversation?.plan?.steps ?? []),
1789
1789
  [workflow, conversation?.plan?.steps]
1790
1790
  );
1791
1791
  const activity = react$1.useConversationActivity(threadId, { live: !!threadId });
@@ -1845,7 +1845,7 @@ function useWorkflowThread(workflow, options = {}) {
1845
1845
  criteria: [],
1846
1846
  max_passes: 3,
1847
1847
  documents: [],
1848
- steps: chunkRB7GX2VT_cjs.toPlanSteps(workflow, {
1848
+ steps: chunkABUO6PIQ_cjs.toPlanSteps(workflow, {
1849
1849
  inputs: values,
1850
1850
  resolveWorkflow: options.resolveWorkflow,
1851
1851
  compose: options.compose
@@ -1932,7 +1932,7 @@ function useWorkflowThread(workflow, options = {}) {
1932
1932
  const anyRunning = Object.values(states).some((s) => s.status === "running");
1933
1933
  const needsStart = !threadId || idle && !anyRunning;
1934
1934
  const runError = idle ? conversation?.last_error ?? null : null;
1935
- const view = chunkRB7GX2VT_cjs.useWorkflowView({
1935
+ const view = chunkABUO6PIQ_cjs.useWorkflowView({
1936
1936
  steps,
1937
1937
  states,
1938
1938
  inputs,
@@ -2100,7 +2100,7 @@ function WorkflowWordDialog({
2100
2100
  title: title ?? labels.wordTitle,
2101
2101
  size: "xl",
2102
2102
  testId: "workflow-word-dialog",
2103
- children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { className: "h-[70dvh] p-0", children: /* @__PURE__ */ jsxRuntime.jsx(chunkU6YVZDOV_cjs.ConnectedNativeDocxEditor, { documentId: id, title: title ?? labels.wordTitle }) })
2103
+ children: /* @__PURE__ */ jsxRuntime.jsx(chunkULWRNGGE_cjs.ModalScaffold.Body, { className: "h-[70dvh] p-0", children: /* @__PURE__ */ jsxRuntime.jsx(chunkRA3ZJ45L_cjs.ConnectedNativeDocxEditor, { documentId: id, title: title ?? labels.wordTitle }) })
2104
2104
  }
2105
2105
  );
2106
2106
  }
@@ -2409,7 +2409,7 @@ function ConnectedWorkflowRunner({
2409
2409
  );
2410
2410
  };
2411
2411
  const runner = (compact) => /* @__PURE__ */ jsxRuntime.jsx(
2412
- chunkRB7GX2VT_cjs.WorkflowRunner,
2412
+ chunkABUO6PIQ_cjs.WorkflowRunner,
2413
2413
  {
2414
2414
  people,
2415
2415
  ...runnerProps,
@@ -2455,7 +2455,7 @@ function ConnectedWorkflowRunner({
2455
2455
  ) }),
2456
2456
  inThread && conversationId ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2457
2457
  /* @__PURE__ */ jsxRuntime.jsx(
2458
- chunkRB7GX2VT_cjs.WorkflowStepBar,
2458
+ chunkABUO6PIQ_cjs.WorkflowStepBar,
2459
2459
  {
2460
2460
  run: view,
2461
2461
  levels: chunkJSTKEZBS_cjs.stepLevels(view.steps),
@@ -2656,7 +2656,7 @@ function ConnectedTagTable({
2656
2656
  const fail = (e) => setError(e instanceof Error ? e.message : String(e));
2657
2657
  const snapshot = (data) => {
2658
2658
  const title = exportTitle ?? KIND_TITLES[kind];
2659
- const bytes = chunkHAOKT4LC_cjs.tagTableDocx(data, {
2659
+ const bytes = chunkBUWBXJ2N_cjs.tagTableDocx(data, {
2660
2660
  title,
2661
2661
  nameOf: (id) => people.find((p) => p.value === id)?.label
2662
2662
  });
@@ -2666,7 +2666,7 @@ function ConnectedTagTable({
2666
2666
  };
2667
2667
  return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "space-y-2", children: [
2668
2668
  /* @__PURE__ */ jsxRuntime.jsx(
2669
- chunkHAOKT4LC_cjs.TagTable,
2669
+ chunkBUWBXJ2N_cjs.TagTable,
2670
2670
  {
2671
2671
  ...props,
2672
2672
  table,
@@ -2743,11 +2743,6 @@ function useConnectedShellWorkspaces(options = {}) {
2743
2743
  select: (workspace) => setWorkspace(workspace.id)
2744
2744
  });
2745
2745
  }
2746
- function SessionStatusIcon({ status, className }) {
2747
- if (status === "agent") return /* @__PURE__ */ jsxRuntime.jsx(react$1.ArbiBotHeadIcon, { className: className ?? "w-4 h-4" });
2748
- return /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Monitor, { className: className ?? "w-4 h-4 text-muted-foreground" });
2749
- }
2750
- var renderSessionStatusIcon = (status) => /* @__PURE__ */ jsxRuntime.jsx(SessionStatusIcon, { status });
2751
2746
  function errorText2(error, fallback) {
2752
2747
  const body = error?.apiError;
2753
2748
  return typeof body?.detail === "string" ? body.detail : fallback;
@@ -2762,7 +2757,7 @@ function ConnectedProfileCard({
2762
2757
  avatarClassName = "bg-primary text-primary-foreground",
2763
2758
  children
2764
2759
  }) {
2765
- const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
2760
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
2766
2761
  const { data: profile } = react$1.useProfile();
2767
2762
  const updateProfile = react$1.useUpdateProfile();
2768
2763
  const requestEmailChange = react$1.useRequestEmailChange();
@@ -2813,13 +2808,13 @@ function ConnectedProfileCard({
2813
2808
  }
2814
2809
  });
2815
2810
  const display = profile?.fullName || "Unnamed";
2816
- return /* @__PURE__ */ jsxRuntime.jsxs(chunkU73KPFYH_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserCircle, {}), title, children: [
2811
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunkQIMVTGKS_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.UserCircle, {}), title, children: [
2817
2812
  /* @__PURE__ */ jsxRuntime.jsx(
2818
- chunkU73KPFYH_cjs.ProfileCard,
2813
+ chunkQIMVTGKS_cjs.ProfileCard,
2819
2814
  {
2820
2815
  avatar: /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2821
2816
  /* @__PURE__ */ jsxRuntime.jsx(
2822
- chunkU73KPFYH_cjs.AvatarPicker,
2817
+ chunkQIMVTGKS_cjs.AvatarPicker,
2823
2818
  {
2824
2819
  pictureUrl: profile?.picture,
2825
2820
  initials: chunkKDG6FER6_cjs.initials(display),
@@ -2858,7 +2853,7 @@ function ConnectedIdentityVerification({
2858
2853
  onManageBilling,
2859
2854
  formatPrice
2860
2855
  }) {
2861
- const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
2856
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
2862
2857
  const { data: profile } = react$1.useProfile();
2863
2858
  const flow = react$1.useIdentityVerification({
2864
2859
  formatPrice,
@@ -2866,9 +2861,9 @@ function ConnectedIdentityVerification({
2866
2861
  onNameAccepted: () => notify("Name updated to match your ID", "success")
2867
2862
  });
2868
2863
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2869
- /* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.IdentityVerificationCard, { flow, labels, onManageBilling }),
2864
+ /* @__PURE__ */ jsxRuntime.jsx(chunkQIMVTGKS_cjs.IdentityVerificationCard, { flow, labels, onManageBilling }),
2870
2865
  /* @__PURE__ */ jsxRuntime.jsx(
2871
- chunkU73KPFYH_cjs.IdentityVerificationDialog,
2866
+ chunkQIMVTGKS_cjs.IdentityVerificationDialog,
2872
2867
  {
2873
2868
  flow,
2874
2869
  accountName: profile?.fullName ?? "",
@@ -2881,7 +2876,7 @@ function ConnectedIdentityVerification({
2881
2876
  function ConnectedRequireVerified({ children, labels }) {
2882
2877
  const { data: profile } = react$1.useProfile();
2883
2878
  const flow = react$1.useIdentityVerification();
2884
- return /* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.RequireVerified, { flow, accountName: profile?.fullName ?? "", labels, children });
2879
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkQIMVTGKS_cjs.RequireVerified, { flow, accountName: profile?.fullName ?? "", labels, children });
2885
2880
  }
2886
2881
  function defaultUnmetPasswordRequirement(password) {
2887
2882
  if (password.length < 8) return "Minimum 8 characters";
@@ -2898,7 +2893,7 @@ function ConnectedPasswordChangeDialog({
2898
2893
  recoveryMode = false,
2899
2894
  onRecoveryComplete
2900
2895
  }) {
2901
- const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
2896
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
2902
2897
  const change = react$1.usePasswordChange();
2903
2898
  const form = react$1.usePasswordChangeForm({
2904
2899
  recoveryMode,
@@ -2914,7 +2909,7 @@ function ConnectedPasswordChangeDialog({
2914
2909
  onRecoveryComplete
2915
2910
  });
2916
2911
  return /* @__PURE__ */ jsxRuntime.jsx(
2917
- chunkU73KPFYH_cjs.PasswordChangeDialog,
2912
+ chunkQIMVTGKS_cjs.PasswordChangeDialog,
2918
2913
  {
2919
2914
  open,
2920
2915
  onClose: form.onCancel,
@@ -2940,10 +2935,10 @@ function ConnectedSecuritySection({
2940
2935
  children
2941
2936
  }) {
2942
2937
  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: [
2938
+ return /* @__PURE__ */ jsxRuntime.jsxs(chunkQIMVTGKS_cjs.SettingsSection, { icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.KeyRound, {}), title: "Security", children: [
2939
+ /* @__PURE__ */ jsxRuntime.jsxs(chunkQIMVTGKS_cjs.SettingsCard, { padding: "sm", children: [
2945
2940
  /* @__PURE__ */ jsxRuntime.jsx(
2946
- chunkU73KPFYH_cjs.SettingsActionRow,
2941
+ chunkQIMVTGKS_cjs.SettingsActionRow,
2947
2942
  {
2948
2943
  title: "Change password",
2949
2944
  description: "Used to sign in and to unlock your account key. Changing it keeps everything readable and re-encrypts nothing.",
@@ -2964,43 +2959,41 @@ function ConnectedSecuritySection({
2964
2959
  ] });
2965
2960
  }
2966
2961
  function ConnectedNotificationPreferences({
2967
- categories = chunkU73KPFYH_cjs.EMAIL_NOTIFICATION_CATEGORIES,
2962
+ categories = chunkQIMVTGKS_cjs.EMAIL_NOTIFICATION_CATEGORIES,
2968
2963
  title = "Notifications"
2969
2964
  }) {
2970
2965
  const keys = react.useMemo(
2971
- () => categories === chunkU73KPFYH_cjs.EMAIL_NOTIFICATION_CATEGORIES ? chunkU73KPFYH_cjs.EMAIL_NOTIFICATION_KEYS : categories.map((c) => c.key),
2966
+ () => categories === chunkQIMVTGKS_cjs.EMAIL_NOTIFICATION_CATEGORIES ? chunkQIMVTGKS_cjs.EMAIL_NOTIFICATION_KEYS : categories.map((c) => c.key),
2972
2967
  [categories]
2973
2968
  );
2974
2969
  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,
2970
+ return /* @__PURE__ */ jsxRuntime.jsx(chunkQIMVTGKS_cjs.SettingsSection, { title, children: /* @__PURE__ */ jsxRuntime.jsx(chunkQIMVTGKS_cjs.SettingsCard, { className: "space-y-0", children: /* @__PURE__ */ jsxRuntime.jsx(
2971
+ chunkQIMVTGKS_cjs.NotificationCategoryList,
2977
2972
  {
2978
2973
  masterId: "emailNotifications",
2979
2974
  masterTitle: "Email Notifications",
2980
2975
  masterDescription: "Email me about activity when I\u2019m away",
2981
2976
  masterChecked: prefs.masterChecked,
2982
2977
  onMasterChange: prefs.setAll,
2983
- categories: chunkU73KPFYH_cjs.toNotificationCategories(prefs.checked, categories),
2978
+ categories: chunkQIMVTGKS_cjs.toNotificationCategories(prefs.checked, categories),
2984
2979
  onCategoryChange: prefs.setCategory
2985
2980
  }
2986
2981
  ) }) });
2987
2982
  }
2988
- function ConnectedSessionsRow({
2989
- renderSessionIcon = renderSessionStatusIcon
2990
- }) {
2991
- const { notify, confirm } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
2983
+ function ConnectedSessionsRow({ renderSessionIcon }) {
2984
+ const { notify, confirm } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
2992
2985
  const [open, setOpen] = react.useState(false);
2993
2986
  const sessions = react$1.useSessions({ enabled: open });
2994
2987
  const currentSessionId = react$1.useCurrentSessionId();
2995
2988
  const terminate = react$1.useTerminateSession();
2996
- const views = chunkU73KPFYH_cjs.toActiveSessionViews(sessions.data ?? [], {
2989
+ const views = chunkQIMVTGKS_cjs.toActiveSessionViews(sessions.data ?? [], {
2997
2990
  currentSessionId,
2998
2991
  terminatingId: terminate.isPending ? terminate.variables : null,
2999
2992
  renderIcon: renderSessionIcon
3000
2993
  });
3001
2994
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3002
2995
  /* @__PURE__ */ jsxRuntime.jsx(
3003
- chunkU73KPFYH_cjs.SettingsRow,
2996
+ chunkQIMVTGKS_cjs.SettingsRow,
3004
2997
  {
3005
2998
  label: "Active sessions",
3006
2999
  description: "Devices and agents currently signed in to your account.",
@@ -3022,7 +3015,7 @@ function ConnectedSessionsRow({
3022
3015
  }
3023
3016
  ),
3024
3017
  /* @__PURE__ */ jsxRuntime.jsx(
3025
- chunkU73KPFYH_cjs.ActiveSessionsDialog,
3018
+ chunkQIMVTGKS_cjs.ActiveSessionsDialog,
3026
3019
  {
3027
3020
  open,
3028
3021
  onOpenChange: setOpen,
@@ -3053,7 +3046,7 @@ function ConnectedLogoutDialog({
3053
3046
  onClose,
3054
3047
  canLogoutAll = true,
3055
3048
  confirmSignOut,
3056
- renderSessionIcon = renderSessionStatusIcon
3049
+ renderSessionIcon
3057
3050
  }) {
3058
3051
  const sessions = react$1.useSessions({ enabled: open });
3059
3052
  const signOut = react$1.useSignOut();
@@ -3064,7 +3057,7 @@ function ConnectedLogoutDialog({
3064
3057
  signOut.mutate({ everywhere, reason: "manual" });
3065
3058
  };
3066
3059
  return /* @__PURE__ */ jsxRuntime.jsx(
3067
- chunkU73KPFYH_cjs.LogoutDialog,
3060
+ chunkQIMVTGKS_cjs.LogoutDialog,
3068
3061
  {
3069
3062
  open,
3070
3063
  onClose,
@@ -3072,13 +3065,13 @@ function ConnectedLogoutDialog({
3072
3065
  onLogoutAll: () => void run(true),
3073
3066
  canLogoutAll,
3074
3067
  isOnline,
3075
- sessions: chunkU73KPFYH_cjs.toLogoutSessionViews(sessions.data ?? []),
3068
+ sessions: chunkQIMVTGKS_cjs.toLogoutSessionViews(sessions.data ?? []),
3076
3069
  renderSessionIcon
3077
3070
  }
3078
3071
  );
3079
3072
  }
3080
3073
  function ConnectedDangerZone({ renderSubscriptionLink }) {
3081
- const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
3074
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
3082
3075
  const [zoneOpen, setZoneOpen] = react.useState(false);
3083
3076
  const [dialogOpen, setDialogOpen] = react.useState(false);
3084
3077
  const { data: profile } = react$1.useProfile();
@@ -3094,7 +3087,7 @@ function ConnectedDangerZone({ renderSubscriptionLink }) {
3094
3087
  });
3095
3088
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
3096
3089
  /* @__PURE__ */ jsxRuntime.jsx(
3097
- chunkU73KPFYH_cjs.SettingsDangerZone,
3090
+ chunkQIMVTGKS_cjs.SettingsDangerZone,
3098
3091
  {
3099
3092
  isOpen: zoneOpen,
3100
3093
  onToggle: () => setZoneOpen((o) => !o),
@@ -3114,12 +3107,12 @@ function ConnectedDangerZone({ renderSubscriptionLink }) {
3114
3107
  }
3115
3108
  ),
3116
3109
  /* @__PURE__ */ jsxRuntime.jsx(
3117
- chunkU73KPFYH_cjs.DeleteAccountDialog,
3110
+ chunkQIMVTGKS_cjs.DeleteAccountDialog,
3118
3111
  {
3119
3112
  open: dialogOpen,
3120
3113
  onClose: flow.onClose,
3121
3114
  step: flow.step,
3122
- blockers: chunkU73KPFYH_cjs.toDeleteBlockerViews(flow.blockers, renderSubscriptionLink),
3115
+ blockers: chunkQIMVTGKS_cjs.toDeleteBlockerViews(flow.blockers, renderSubscriptionLink),
3123
3116
  onContinue: flow.onContinue,
3124
3117
  onBack: flow.onBack,
3125
3118
  userEmail,
@@ -3131,80 +3124,211 @@ function ConnectedDangerZone({ renderSubscriptionLink }) {
3131
3124
  )
3132
3125
  ] });
3133
3126
  }
3134
- function ServerConnectionRow({ onRefresh, ...status }) {
3135
- const { runtimeConfig } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
3136
- const [isRefreshing, setIsRefreshing] = react.useState(false);
3137
- const view = chunkU73KPFYH_cjs.serverConnectionView(status, runtimeConfig.deploymentDomain || "server");
3138
- const refresh = async () => {
3139
- setIsRefreshing(true);
3127
+ function useConnectedDocxNotifications(onOpen) {
3128
+ const arbi = react$1.useArbi();
3129
+ const { status, user, apiUrl } = chunkGFNELPDP_cjs.useConnection();
3130
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
3131
+ const queries = reactQuery.useQueryClient();
3132
+ const source = `docx-mentions:${apiUrl}:${user?.externalId || ""}`;
3133
+ const queryKey = ["docx-mentions", apiUrl, user?.externalId];
3134
+ const { data = [] } = reactQuery.useQuery({
3135
+ queryKey,
3136
+ queryFn: () => arbi.notifications.list({ type: "docx_mention" }),
3137
+ enabled: status === "authenticated",
3138
+ refetchInterval: 3e4
3139
+ });
3140
+ react$1.useArbiWebSocket((message) => {
3141
+ if (message.type === "docx_mention") void queries.invalidateQueries({ queryKey });
3142
+ });
3143
+ react.useEffect(() => {
3144
+ const items = [];
3145
+ if (status === "authenticated")
3146
+ for (const note of data) {
3147
+ if (note.recipient.external_id !== user?.externalId || !note.workspace_ext_id) continue;
3148
+ try {
3149
+ const target = JSON.parse(note.content || "{}");
3150
+ if (!target.document_id?.startsWith("doc-") || !target.comment_id) continue;
3151
+ const documentId = target.document_id, commentId = target.comment_id, workspaceId = note.workspace_ext_id;
3152
+ items.push({
3153
+ id: `docx:${note.external_id}`,
3154
+ title: "Mentioned you in a document comment",
3155
+ description: [note.sender.given_name, note.sender.family_name].filter(Boolean).join(" "),
3156
+ variant: "info",
3157
+ ts: Date.parse(note.created_at),
3158
+ read: note.read,
3159
+ source,
3160
+ onSelect: () => {
3161
+ void Promise.resolve(onOpen({ documentId, commentId, workspaceId })).catch(
3162
+ (error) => notify(
3163
+ error instanceof Error ? error.message : "Could not open the document.",
3164
+ "error"
3165
+ )
3166
+ );
3167
+ }
3168
+ });
3169
+ } catch {
3170
+ }
3171
+ }
3172
+ shell.useNotify.getState().syncSource(source, items);
3173
+ return () => shell.useNotify.getState().syncSource(source, []);
3174
+ }, [data, status, user?.externalId, source, onOpen, notify]);
3175
+ const markRead = async (ids) => {
3140
3176
  try {
3141
- await onRefresh();
3142
- } finally {
3143
- setIsRefreshing(false);
3177
+ await arbi.notifications.markRead(ids);
3178
+ await queries.invalidateQueries({ queryKey });
3179
+ } catch {
3180
+ notify("Could not mark document mentions read.", "error");
3144
3181
  }
3145
3182
  };
3146
- return /* @__PURE__ */ jsxRuntime.jsx(chunkU73KPFYH_cjs.SettingsRow, { label: "Server connection", description: view.description, children: /* @__PURE__ */ jsxRuntime.jsx(
3147
- chunkU73KPFYH_cjs.ServerConnectionButton,
3148
- {
3149
- state: view.state,
3150
- label: view.label,
3151
- isRefreshing,
3152
- onRefresh: () => void refresh()
3183
+ return {
3184
+ onMarkRead: (id) => {
3185
+ if (id.startsWith("docx:")) void markRead([id.slice(5)]);
3186
+ },
3187
+ onMarkAllRead: () => {
3188
+ void markRead(
3189
+ data.filter((note) => !note.read && note.recipient.external_id === user?.externalId).map((note) => note.external_id)
3190
+ );
3153
3191
  }
3154
- ) });
3192
+ };
3155
3193
  }
3156
- function ConnectedAccountSettings({
3157
- avatarClassName,
3158
- onManageBilling,
3159
- formatIdentityPrice,
3160
- afterProfile,
3161
- getUnmetPasswordRequirement,
3162
- securityRows,
3163
- connection,
3164
- onLogout,
3165
- renderSessionIcon,
3166
- renderSubscriptionLink
3167
- }) {
3168
- const [logoutOpen, setLogoutOpen] = react.useState(false);
3169
- return /* @__PURE__ */ jsxRuntime.jsxs(chunkU73KPFYH_cjs.SettingsPanel, { className: "max-w-2xl", children: [
3170
- /* @__PURE__ */ jsxRuntime.jsx(ConnectedProfileCard, { avatarClassName, children: /* @__PURE__ */ jsxRuntime.jsx(
3171
- ConnectedIdentityVerification,
3172
- {
3173
- onManageBilling,
3174
- formatPrice: formatIdentityPrice
3194
+ function useConnectedWorkNotifications(onOpen) {
3195
+ const { status, user, apiUrl } = chunkGFNELPDP_cjs.useConnection();
3196
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
3197
+ const source = `work-notifications:${apiUrl}:${user?.externalId || ""}`;
3198
+ const { data = [], markRead: persistRead } = react$1.useWorkNotifications({
3199
+ apiUrl,
3200
+ userId: user?.externalId,
3201
+ enabled: status === "authenticated"
3202
+ });
3203
+ react.useEffect(() => {
3204
+ const items = [];
3205
+ if (status === "authenticated")
3206
+ for (const note of data) {
3207
+ if (note.recipient.external_id !== user?.externalId) continue;
3208
+ const mapped = mapWorkNotification(note);
3209
+ if (!mapped) continue;
3210
+ items.push({
3211
+ id: `work:${note.external_id}`,
3212
+ title: mapped.title,
3213
+ variant: note.type === "workflow_failed" ? "error" : note.type === "conversation_done" ? "success" : "info",
3214
+ ts: Date.parse(note.created_at),
3215
+ read: note.read,
3216
+ source,
3217
+ onSelect: () => {
3218
+ void Promise.resolve().then(() => onOpen(mapped.target)).catch(
3219
+ (error) => notify(
3220
+ error instanceof Error ? error.message : "Could not open this notification.",
3221
+ "error"
3222
+ )
3223
+ );
3224
+ }
3225
+ });
3175
3226
  }
3176
- ) }),
3177
- afterProfile,
3178
- /* @__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: [
3180
- connection && /* @__PURE__ */ jsxRuntime.jsx(ServerConnectionRow, { ...connection }),
3181
- /* @__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(
3183
- ui.Button,
3184
- {
3185
- type: "button",
3186
- variant: "secondary",
3187
- size: "sm",
3188
- onClick: onLogout ?? (() => setLogoutOpen(true)),
3189
- className: "flex items-center gap-2",
3190
- "data-testid": "logout-button",
3191
- children: [
3192
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.LogOut, { className: "w-4 h-4" }),
3193
- "Logout"
3194
- ]
3227
+ shell.useNotify.getState().syncSource(source, items);
3228
+ return () => shell.useNotify.getState().syncSource(source, []);
3229
+ }, [data, status, user?.externalId, source, onOpen, notify]);
3230
+ const markRead = async (ids) => {
3231
+ if (!ids.length) return;
3232
+ try {
3233
+ await persistRead(ids);
3234
+ } catch {
3235
+ notify("Could not mark work notifications read.", "error");
3236
+ }
3237
+ };
3238
+ return {
3239
+ onMarkRead: (id) => {
3240
+ if (data.some(
3241
+ (note) => `work:${note.external_id}` === id && note.recipient.external_id === user?.externalId && mapWorkNotification(note)
3242
+ ))
3243
+ void markRead([id.slice(5)]);
3244
+ },
3245
+ onMarkAllRead: () => {
3246
+ void markRead(
3247
+ data.filter(
3248
+ (note) => !note.read && note.recipient.external_id === user?.externalId && mapWorkNotification(note)
3249
+ ).map((note) => note.external_id)
3250
+ );
3251
+ }
3252
+ };
3253
+ }
3254
+ function mapWorkNotification(note) {
3255
+ const sender = [note.sender.given_name, note.sender.family_name].filter(Boolean).join(" ") || note.sender.email;
3256
+ if (note.type === "workflow_failed") {
3257
+ try {
3258
+ const payload = JSON.parse(note.content || "{}");
3259
+ if (!payload.workflow_ext_id?.match(/^wfl-[a-zA-Z0-9]+$/)) return null;
3260
+ if (note.workspace_ext_id?.match(/^wrk-[a-zA-Z0-9]+$/) && note.conversation_ext_id?.match(/^con-[a-zA-Z0-9]+$/)) {
3261
+ return {
3262
+ title: "A workflow failed to run",
3263
+ target: {
3264
+ kind: "conversation",
3265
+ workspaceId: note.workspace_ext_id,
3266
+ conversationId: note.conversation_ext_id
3267
+ }
3268
+ };
3269
+ }
3270
+ return {
3271
+ title: "A workflow failed to run",
3272
+ target: {
3273
+ kind: "workflow",
3274
+ workflowId: payload.workflow_ext_id,
3275
+ workspaceId: note.workspace_ext_id || void 0
3195
3276
  }
3196
- ) })
3197
- ] }) }),
3198
- /* @__PURE__ */ jsxRuntime.jsx(ConnectedDangerZone, { renderSubscriptionLink }),
3199
- !onLogout && /* @__PURE__ */ jsxRuntime.jsx(
3200
- ConnectedLogoutDialog,
3201
- {
3202
- open: logoutOpen,
3203
- onClose: () => setLogoutOpen(false),
3204
- renderSessionIcon
3277
+ };
3278
+ } catch {
3279
+ return null;
3280
+ }
3281
+ }
3282
+ if (note.type === "mail_draft_ready") {
3283
+ const draftId = react$1.mailDraftIdFromContent(note.content);
3284
+ if (!draftId) return null;
3285
+ return {
3286
+ title: `${sender} left a draft email for you to review`,
3287
+ target: { kind: "mail_draft", draftId, mailbox: "native" }
3288
+ };
3289
+ }
3290
+ const titles = {
3291
+ mention: `${sender} mentioned you in a conversation`,
3292
+ workspace_access_request: `${sender} needs workspace access to run a thread`,
3293
+ conversation_ready: note.sender.external_id === note.recipient.external_id ? "Your thread is ready" : `${sender}\u2019s thread is ready`,
3294
+ conversation_done: `${sender} marked a thread done`
3295
+ };
3296
+ const title = titles[note.type];
3297
+ if (!title || !note.workspace_ext_id || !note.conversation_ext_id?.match(/^con-[a-zA-Z0-9]+$/))
3298
+ return null;
3299
+ return {
3300
+ title,
3301
+ target: {
3302
+ kind: "conversation",
3303
+ workspaceId: note.workspace_ext_id,
3304
+ conversationId: note.conversation_ext_id,
3305
+ ...note.message_ext_id ? { messageId: note.message_ext_id } : {}
3306
+ }
3307
+ };
3308
+ }
3309
+ function attachmentPath(accountId, messageId, attachmentId) {
3310
+ return `${react$1.accountPath(accountId)}/messages/${encodeURIComponent(messageId)}/attachments/${encodeURIComponent(attachmentId)}`;
3311
+ }
3312
+ function saveFile(blob, name) {
3313
+ const url = URL.createObjectURL(blob);
3314
+ const link = document.createElement("a");
3315
+ link.href = url;
3316
+ link.download = name;
3317
+ link.click();
3318
+ setTimeout(() => URL.revokeObjectURL(url), 1e3);
3319
+ }
3320
+ function hydrateMailAttachments(client$1, account, messageId, attachments, { isOnline, offline }) {
3321
+ return Promise.all(
3322
+ attachments.map(async (a) => {
3323
+ if (a.content_base64 != null) return a;
3324
+ if (!isOnline) {
3325
+ const file = await offline?.loadAttachment(account.id, messageId, a);
3326
+ return file ? { ...a, content_base64: client.bytesToBase64(new Uint8Array(await file.arrayBuffer())) } : { ...a, content_base64: null };
3205
3327
  }
3206
- )
3207
- ] });
3328
+ const response = await client$1.fetch(attachmentPath(account.id, messageId, a.id));
3329
+ return react$1.fileAttachment(new File([await response.blob()], a.name, { type: a.content_type }));
3330
+ })
3331
+ );
3208
3332
  }
3209
3333
  function ConnectedMailAccounts({
3210
3334
  policy,
@@ -3429,504 +3553,6 @@ function ConnectedMailAccounts({
3429
3553
  }
3430
3554
  );
3431
3555
  }
3432
- var noop = () => {
3433
- };
3434
- function ConnectedMailSettings({ oauthReturnPath, settings }) {
3435
- const { data: policy } = react$1.useMailPolicy();
3436
- const accounts = react$1.useMailAccounts({ enabled: !!policy?.enabled });
3437
- const { data: profile } = react$1.useProfile();
3438
- if (accounts.isError) {
3439
- return /* @__PURE__ */ jsxRuntime.jsx("p", { className: "text-sm text-muted-foreground", children: accounts.error.message });
3440
- }
3441
- if (!policy || !accounts.isSuccess) return /* @__PURE__ */ jsxRuntime.jsx("p", { children: "Loading mail accounts\u2026" });
3442
- return /* @__PURE__ */ jsxRuntime.jsx(
3443
- ConnectedMailAccounts,
3444
- {
3445
- embedded: true,
3446
- policy,
3447
- accounts: accounts.data,
3448
- user: profile && { given_name: profile.givenName, family_name: profile.familyName },
3449
- oauthReturnPath,
3450
- settings,
3451
- onClose: noop
3452
- },
3453
- profile ? "named" : "unnamed"
3454
- );
3455
- }
3456
- function ConnectedPrivacySettings({
3457
- rows,
3458
- showTipsReset = false
3459
- }) {
3460
- const { data: settings } = react$1.useUserSettings();
3461
- const update = react$1.useUpdateUserSettings();
3462
- const hideOnlineStatus = settings?.hide_online_status ?? false;
3463
- 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: [
3466
- /* @__PURE__ */ jsxRuntime.jsx(
3467
- chunkU73KPFYH_cjs.SettingsRow,
3468
- {
3469
- label: "Show Online Status",
3470
- labelFor: "showOnlineStatus",
3471
- description: "When on, other users can see when you're online",
3472
- children: /* @__PURE__ */ jsxRuntime.jsx(
3473
- ui.Switch,
3474
- {
3475
- id: "showOnlineStatus",
3476
- checked: !hideOnlineStatus,
3477
- onCheckedChange: (value) => update.mutate({ hide_online_status: !value }),
3478
- "data-testid": "toggle-show-online-status"
3479
- }
3480
- )
3481
- }
3482
- ),
3483
- rows,
3484
- showTipsReset && /* @__PURE__ */ jsxRuntime.jsx(
3485
- chunkU73KPFYH_cjs.SettingsRow,
3486
- {
3487
- label: "Hidden tips",
3488
- description: "Restore any Smart Tips you\u2019ve hidden with \u201Cdon\u2019t show again\u201D.",
3489
- children: /* @__PURE__ */ jsxRuntime.jsxs(
3490
- ui.Button,
3491
- {
3492
- type: "button",
3493
- variant: "outline",
3494
- size: "sm",
3495
- onClick: () => update.mutate({ dismissed_tips: [] }),
3496
- disabled: dismissedTips.length === 0,
3497
- className: "gap-1.5",
3498
- "data-testid": "reset-tips-button",
3499
- children: [
3500
- /* @__PURE__ */ jsxRuntime.jsx(lucideReact.RotateCcw, { className: "h-4 w-4" }),
3501
- "Reset tips"
3502
- ]
3503
- }
3504
- )
3505
- }
3506
- )
3507
- ] }) }),
3508
- /* @__PURE__ */ jsxRuntime.jsx(ConnectedNotificationPreferences, {})
3509
- ] });
3510
- }
3511
- var PROVIDER_NAMES = {
3512
- openai: "OpenAI",
3513
- fireworks_ai: "Fireworks AI",
3514
- "vertex_ai-language-models": "Google",
3515
- vertex_ai: "Google",
3516
- gemini: "Google",
3517
- anthropic: "Anthropic"
3518
- };
3519
- var isStandard = (model) => !!model?.tags?.includes("Standard");
3520
- function PremiumCostHeader() {
3521
- return /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex items-center gap-0.5", children: "\xA3/MT in-out" });
3522
- }
3523
- function cheapest(models) {
3524
- return [...models].sort((a, b) => {
3525
- const ao = a.output_cost_per_token;
3526
- const bo = b.output_cost_per_token;
3527
- if (ao == null && bo == null) return 0;
3528
- if (ao == null) return 1;
3529
- if (bo == null) return -1;
3530
- return ao - bo;
3531
- })[0];
3532
- }
3533
- var COLUMNS = [
3534
- {
3535
- colId: "model_name",
3536
- headerName: "Model",
3537
- field: "model_name",
3538
- flex: 2,
3539
- minWidth: 130,
3540
- tooltipField: "model_name"
3541
- },
3542
- {
3543
- colId: "provider",
3544
- headerName: "Provider",
3545
- field: "provider",
3546
- flex: 1,
3547
- minWidth: 120,
3548
- cellRenderer: (params) => isStandard(params.data) ? /* @__PURE__ */ jsxRuntime.jsx(
3549
- chunkU73KPFYH_cjs.ModelProviderLabel,
3550
- {
3551
- logo: /* @__PURE__ */ jsxRuntime.jsx("img", { src: "/favicon.svg", alt: "ARBI", className: "size-3.5 flex-shrink-0 rounded-sm" }),
3552
- children: "ARBI CITY"
3553
- }
3554
- ) : /* @__PURE__ */ jsxRuntime.jsx(
3555
- chunkU73KPFYH_cjs.ModelProviderLabel,
3556
- {
3557
- logo: /* @__PURE__ */ jsxRuntime.jsx(react$1.ProviderIcon, { modelName: params.data?.model_name, provider: params.value, size: 14 }),
3558
- children: PROVIDER_NAMES[params.value ?? ""] || params.value || "\u2014"
3559
- }
3560
- )
3561
- },
3562
- {
3563
- // Input and output cost in one column so the table fits the panel; sorted by output cost.
3564
- colId: "cost",
3565
- headerName: "Cost / MTok",
3566
- headerComponentParams: { innerHeaderComponent: PremiumCostHeader },
3567
- headerTooltip: "\xA3 per million tokens \u2014 input then output",
3568
- field: "output_cost_per_token",
3569
- flex: 1,
3570
- minWidth: 120,
3571
- type: "rightAligned",
3572
- cellRenderer: (params) => /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "tabular-nums", children: [
3573
- react$1.formatGbpPerMillionTokens(params.data?.input_cost_per_token) ?? "\xA30",
3574
- "-",
3575
- react$1.formatGbpPerMillionTokens(params.data?.output_cost_per_token) ?? "\xA30"
3576
- ] })
3577
- }
3578
- ];
3579
- function ConnectedPremiumModels() {
3580
- const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
3581
- const { data: settings } = react$1.useUserSettings();
3582
- const update = react$1.useUpdateUserSettings();
3583
- const { data: available } = react$1.useAvailableModels();
3584
- const isDeveloper = settings?.developer === true;
3585
- const premiumModel = settings?.premium_model;
3586
- const premiumModels = react.useMemo(
3587
- () => (available?.models ?? []).filter(
3588
- (m) => m.tags?.includes("Premium") && (isDeveloper || !m.model_name.includes("@"))
3589
- ),
3590
- [available, isDeveloper]
3591
- );
3592
- const rows = react.useMemo(() => {
3593
- const standards = (available?.models ?? []).filter(isStandard);
3594
- if (standards.length === 0) return premiumModels;
3595
- const reference = {
3596
- ...standards[0],
3597
- model_name: `Standard (${standards.map((m) => m.model_name).join(", ")})`
3598
- };
3599
- return [reference, ...premiumModels];
3600
- }, [available, premiumModels]);
3601
- const current = premiumModel ?? available?.premium_default ?? "";
3602
- const save = react.useCallback(
3603
- (model) => update.mutate(
3604
- { premium_model: model },
3605
- {
3606
- onError: (err) => notify(`Failed to update Premium setting: ${String(err)}`, "error")
3607
- }
3608
- ),
3609
- [update, notify]
3610
- );
3611
- const currentRef = react.useRef(current);
3612
- currentRef.current = current;
3613
- const [selected, setSelected] = react.useState([]);
3614
- react.useEffect(() => {
3615
- const match = premiumModels.filter((m) => m.model_name === current);
3616
- setSelected(
3617
- (prev) => prev.length === match.length && prev[0]?.model_name === match[0]?.model_name ? prev : match
3618
- );
3619
- }, [current, premiumModels]);
3620
- const onSelectionChange = react.useCallback(
3621
- (items) => {
3622
- const picked = items.filter((m) => !isStandard(m));
3623
- const next = picked[0]?.model_name;
3624
- if (!next || next === currentRef.current) return;
3625
- setSelected(picked);
3626
- save(next);
3627
- },
3628
- [save]
3629
- );
3630
- 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,
3633
- {
3634
- enabled: premiumModel !== "",
3635
- onEnabledChange: (enabled) => {
3636
- const target = enabled ? cheapest(premiumModels)?.model_name : "";
3637
- if (target !== void 0) save(target);
3638
- },
3639
- children: /* @__PURE__ */ jsxRuntime.jsx(
3640
- chunkC2CWWEHO_cjs.GridView,
3641
- {
3642
- items: rows,
3643
- columnDefs: COLUMNS,
3644
- getItemId: (m) => m.model_name,
3645
- selection: { mode: "single", selected, onSelectionChange },
3646
- gridOptions: {
3647
- rowClassRules: { "opacity-60 italic": (p) => isStandard(p.data) }
3648
- },
3649
- height: Math.min(rows.length * 40 + 48, 320),
3650
- testId: "premium-model-grid"
3651
- }
3652
- )
3653
- }
3654
- ) }) }) });
3655
- }
3656
- var SETTINGS_SECTION_IDS = {
3657
- account: "account",
3658
- mail: "mail",
3659
- privacy: "privacy",
3660
- chat: "chat"
3661
- };
3662
- function accountSettingsSection(props) {
3663
- return {
3664
- id: SETTINGS_SECTION_IDS.account,
3665
- label: "Account",
3666
- icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.User, { className: "w-6 h-6" }),
3667
- render: () => /* @__PURE__ */ jsxRuntime.jsx(ConnectedAccountSettings, { ...props })
3668
- };
3669
- }
3670
- function mailSettingsSection(props) {
3671
- return {
3672
- id: SETTINGS_SECTION_IDS.mail,
3673
- label: "Mail",
3674
- icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.Mail, { className: "w-6 h-6" }),
3675
- render: () => /* @__PURE__ */ jsxRuntime.jsx(ConnectedMailSettings, { ...props })
3676
- };
3677
- }
3678
- function privacySettingsSection(props) {
3679
- return {
3680
- id: SETTINGS_SECTION_IDS.privacy,
3681
- label: "Privacy",
3682
- icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.HatGlasses, { className: "w-6 h-6" }),
3683
- render: () => /* @__PURE__ */ jsxRuntime.jsx(ConnectedPrivacySettings, { ...props })
3684
- };
3685
- }
3686
- function chatSettingsSection() {
3687
- return {
3688
- id: SETTINGS_SECTION_IDS.chat,
3689
- label: "Chat",
3690
- icon: /* @__PURE__ */ jsxRuntime.jsx(lucideReact.MessageSquare, { className: "w-6 h-6" }),
3691
- render: () => /* @__PURE__ */ jsxRuntime.jsx(ConnectedPremiumModels, {})
3692
- };
3693
- }
3694
- var DEFAULT_SETTINGS_SECTIONS = [
3695
- accountSettingsSection(),
3696
- privacySettingsSection(),
3697
- chatSettingsSection()
3698
- ];
3699
- function ConnectedSettingsPage({
3700
- sections = DEFAULT_SETTINGS_SECTIONS,
3701
- section,
3702
- onSectionChange,
3703
- ...page
3704
- }) {
3705
- const requested = chunkKPZZ5FHE_cjs.useRequestedSettingsSection();
3706
- const [local, setLocal] = react.useState(requested?.section);
3707
- react.useEffect(() => {
3708
- if (requested) setLocal(requested.section);
3709
- }, [requested]);
3710
- const controlled = section !== void 0;
3711
- return /* @__PURE__ */ jsxRuntime.jsx(
3712
- chunkU73KPFYH_cjs.SettingsPage,
3713
- {
3714
- ...page,
3715
- sections,
3716
- activeSectionId: controlled ? section : local,
3717
- onSectionChange: (id) => {
3718
- if (!controlled) setLocal(id);
3719
- onSectionChange?.(id);
3720
- }
3721
- }
3722
- );
3723
- }
3724
- function useConnectedDocxNotifications(onOpen) {
3725
- const arbi = react$1.useArbi();
3726
- const { status, user, apiUrl } = chunkGFNELPDP_cjs.useConnection();
3727
- const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
3728
- const queries = reactQuery.useQueryClient();
3729
- const source = `docx-mentions:${apiUrl}:${user?.externalId || ""}`;
3730
- const queryKey = ["docx-mentions", apiUrl, user?.externalId];
3731
- const { data = [] } = reactQuery.useQuery({
3732
- queryKey,
3733
- queryFn: () => arbi.notifications.list({ type: "docx_mention" }),
3734
- enabled: status === "authenticated",
3735
- refetchInterval: 3e4
3736
- });
3737
- react$1.useArbiWebSocket((message) => {
3738
- if (message.type === "docx_mention") void queries.invalidateQueries({ queryKey });
3739
- });
3740
- react.useEffect(() => {
3741
- const items = [];
3742
- if (status === "authenticated")
3743
- for (const note of data) {
3744
- if (note.recipient.external_id !== user?.externalId || !note.workspace_ext_id) continue;
3745
- try {
3746
- const target = JSON.parse(note.content || "{}");
3747
- if (!target.document_id?.startsWith("doc-") || !target.comment_id) continue;
3748
- const documentId = target.document_id, commentId = target.comment_id, workspaceId = note.workspace_ext_id;
3749
- items.push({
3750
- id: `docx:${note.external_id}`,
3751
- title: "Mentioned you in a document comment",
3752
- description: [note.sender.given_name, note.sender.family_name].filter(Boolean).join(" "),
3753
- variant: "info",
3754
- ts: Date.parse(note.created_at),
3755
- read: note.read,
3756
- source,
3757
- onSelect: () => {
3758
- void Promise.resolve(onOpen({ documentId, commentId, workspaceId })).catch(
3759
- (error) => notify(
3760
- error instanceof Error ? error.message : "Could not open the document.",
3761
- "error"
3762
- )
3763
- );
3764
- }
3765
- });
3766
- } catch {
3767
- }
3768
- }
3769
- shell.useNotify.getState().syncSource(source, items);
3770
- return () => shell.useNotify.getState().syncSource(source, []);
3771
- }, [data, status, user?.externalId, source, onOpen, notify]);
3772
- const markRead = async (ids) => {
3773
- try {
3774
- await arbi.notifications.markRead(ids);
3775
- await queries.invalidateQueries({ queryKey });
3776
- } catch {
3777
- notify("Could not mark document mentions read.", "error");
3778
- }
3779
- };
3780
- return {
3781
- onMarkRead: (id) => {
3782
- if (id.startsWith("docx:")) void markRead([id.slice(5)]);
3783
- },
3784
- onMarkAllRead: () => {
3785
- void markRead(
3786
- data.filter((note) => !note.read && note.recipient.external_id === user?.externalId).map((note) => note.external_id)
3787
- );
3788
- }
3789
- };
3790
- }
3791
- function useConnectedWorkNotifications(onOpen) {
3792
- const { status, user, apiUrl } = chunkGFNELPDP_cjs.useConnection();
3793
- const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
3794
- const source = `work-notifications:${apiUrl}:${user?.externalId || ""}`;
3795
- const { data = [], markRead: persistRead } = react$1.useWorkNotifications({
3796
- apiUrl,
3797
- userId: user?.externalId,
3798
- enabled: status === "authenticated"
3799
- });
3800
- react.useEffect(() => {
3801
- const items = [];
3802
- if (status === "authenticated")
3803
- for (const note of data) {
3804
- if (note.recipient.external_id !== user?.externalId) continue;
3805
- const mapped = mapWorkNotification(note);
3806
- if (!mapped) continue;
3807
- items.push({
3808
- id: `work:${note.external_id}`,
3809
- title: mapped.title,
3810
- variant: note.type === "workflow_failed" ? "error" : note.type === "conversation_done" ? "success" : "info",
3811
- ts: Date.parse(note.created_at),
3812
- read: note.read,
3813
- source,
3814
- onSelect: () => {
3815
- void Promise.resolve().then(() => onOpen(mapped.target)).catch(
3816
- (error) => notify(
3817
- error instanceof Error ? error.message : "Could not open this notification.",
3818
- "error"
3819
- )
3820
- );
3821
- }
3822
- });
3823
- }
3824
- shell.useNotify.getState().syncSource(source, items);
3825
- return () => shell.useNotify.getState().syncSource(source, []);
3826
- }, [data, status, user?.externalId, source, onOpen, notify]);
3827
- const markRead = async (ids) => {
3828
- if (!ids.length) return;
3829
- try {
3830
- await persistRead(ids);
3831
- } catch {
3832
- notify("Could not mark work notifications read.", "error");
3833
- }
3834
- };
3835
- return {
3836
- onMarkRead: (id) => {
3837
- if (data.some(
3838
- (note) => `work:${note.external_id}` === id && note.recipient.external_id === user?.externalId && mapWorkNotification(note)
3839
- ))
3840
- void markRead([id.slice(5)]);
3841
- },
3842
- onMarkAllRead: () => {
3843
- void markRead(
3844
- data.filter(
3845
- (note) => !note.read && note.recipient.external_id === user?.externalId && mapWorkNotification(note)
3846
- ).map((note) => note.external_id)
3847
- );
3848
- }
3849
- };
3850
- }
3851
- function mapWorkNotification(note) {
3852
- const sender = [note.sender.given_name, note.sender.family_name].filter(Boolean).join(" ") || note.sender.email;
3853
- if (note.type === "workflow_failed") {
3854
- try {
3855
- const payload = JSON.parse(note.content || "{}");
3856
- if (!payload.workflow_ext_id?.match(/^wfl-[a-zA-Z0-9]+$/)) return null;
3857
- if (note.workspace_ext_id?.match(/^wrk-[a-zA-Z0-9]+$/) && note.conversation_ext_id?.match(/^con-[a-zA-Z0-9]+$/)) {
3858
- return {
3859
- title: "A workflow failed to run",
3860
- target: {
3861
- kind: "conversation",
3862
- workspaceId: note.workspace_ext_id,
3863
- conversationId: note.conversation_ext_id
3864
- }
3865
- };
3866
- }
3867
- return {
3868
- title: "A workflow failed to run",
3869
- target: {
3870
- kind: "workflow",
3871
- workflowId: payload.workflow_ext_id,
3872
- workspaceId: note.workspace_ext_id || void 0
3873
- }
3874
- };
3875
- } catch {
3876
- return null;
3877
- }
3878
- }
3879
- if (note.type === "mail_draft_ready") {
3880
- const draftId = react$1.mailDraftIdFromContent(note.content);
3881
- if (!draftId) return null;
3882
- return {
3883
- title: `${sender} left a draft email for you to review`,
3884
- target: { kind: "mail_draft", draftId, mailbox: "native" }
3885
- };
3886
- }
3887
- const titles = {
3888
- mention: `${sender} mentioned you in a conversation`,
3889
- workspace_access_request: `${sender} needs workspace access to run a thread`,
3890
- conversation_ready: note.sender.external_id === note.recipient.external_id ? "Your thread is ready" : `${sender}\u2019s thread is ready`,
3891
- conversation_done: `${sender} marked a thread done`
3892
- };
3893
- const title = titles[note.type];
3894
- if (!title || !note.workspace_ext_id || !note.conversation_ext_id?.match(/^con-[a-zA-Z0-9]+$/))
3895
- return null;
3896
- return {
3897
- title,
3898
- target: {
3899
- kind: "conversation",
3900
- workspaceId: note.workspace_ext_id,
3901
- conversationId: note.conversation_ext_id,
3902
- ...note.message_ext_id ? { messageId: note.message_ext_id } : {}
3903
- }
3904
- };
3905
- }
3906
- function attachmentPath(accountId, messageId, attachmentId) {
3907
- return `${react$1.accountPath(accountId)}/messages/${encodeURIComponent(messageId)}/attachments/${encodeURIComponent(attachmentId)}`;
3908
- }
3909
- function saveFile(blob, name) {
3910
- const url = URL.createObjectURL(blob);
3911
- const link = document.createElement("a");
3912
- link.href = url;
3913
- link.download = name;
3914
- link.click();
3915
- setTimeout(() => URL.revokeObjectURL(url), 1e3);
3916
- }
3917
- function hydrateMailAttachments(client$1, account, messageId, attachments, { isOnline, offline }) {
3918
- return Promise.all(
3919
- attachments.map(async (a) => {
3920
- if (a.content_base64 != null) return a;
3921
- if (!isOnline) {
3922
- const file = await offline?.loadAttachment(account.id, messageId, a);
3923
- return file ? { ...a, content_base64: client.bytesToBase64(new Uint8Array(await file.arrayBuffer())) } : { ...a, content_base64: null };
3924
- }
3925
- const response = await client$1.fetch(attachmentPath(account.id, messageId, a.id));
3926
- return react$1.fileAttachment(new File([await response.blob()], a.name, { type: a.content_type }));
3927
- })
3928
- );
3929
- }
3930
3556
  var sessionRooms = /* @__PURE__ */ new Map();
3931
3557
  function useWordBody({
3932
3558
  word,
@@ -4046,7 +3672,7 @@ function MailComposerForm({
4046
3672
  headerSlot
4047
3673
  }) {
4048
3674
  const { client } = react$1.useMailClient();
4049
- const { notify, confirm } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
3675
+ const { notify, confirm } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
4050
3676
  const [to, setTo] = react.useState(initial.to.map((r) => r.email).join("; "));
4051
3677
  const [cc, setCc] = react.useState(initial.cc.map((r) => r.email).join("; "));
4052
3678
  const [showCc, setShowCc] = react.useState(initial.cc.length > 0);
@@ -4894,7 +4520,7 @@ function ConnectedMailbox({
4894
4520
  onGridStateChange,
4895
4521
  initialMessageId = null
4896
4522
  }) {
4897
- const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
4523
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
4898
4524
  const cache = react$1.useMailCache();
4899
4525
  const { client } = react$1.useMailClient();
4900
4526
  const [savingToWorkspace, setSavingToWorkspace] = react.useState(false);
@@ -5569,7 +5195,7 @@ function SubscribeDialog({
5569
5195
  timeZone,
5570
5196
  onClose
5571
5197
  }) {
5572
- const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
5198
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
5573
5199
  const subscribe = react$1.useSubscribeCalendar();
5574
5200
  const [url, setUrl] = react.useState("");
5575
5201
  const [name, setName] = react.useState("");
@@ -5664,7 +5290,7 @@ function SubscribeDialog({
5664
5290
  }
5665
5291
  function HolidaysDialog({ open, onClose }) {
5666
5292
  const { data: countries = [], isLoading } = react$1.useHolidayCountries(open);
5667
- const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
5293
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
5668
5294
  const add = react$1.useAddHolidayCalendar();
5669
5295
  const [country, setCountry] = react.useState("");
5670
5296
  const [subdivision, setSubdivision] = react.useState("");
@@ -5787,7 +5413,7 @@ function StatusBadge({ account }) {
5787
5413
  );
5788
5414
  }
5789
5415
  function AccountRow({ account }) {
5790
- const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
5416
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
5791
5417
  const startOAuth = react$1.useStartCalendarAccountOAuth();
5792
5418
  const sync = react$1.useSyncCalendarAccount();
5793
5419
  const update = react$1.useUpdateCalendarAccount();
@@ -5905,7 +5531,7 @@ function AccountRow({ account }) {
5905
5531
  );
5906
5532
  }
5907
5533
  function CalDavForm({ onDone }) {
5908
- const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
5534
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
5909
5535
  const { data: profiles = [] } = react$1.useCalDavProfiles();
5910
5536
  const connect = react$1.useConnectCalDavAccount();
5911
5537
  const [profileId, setProfileId] = react.useState("");
@@ -6021,7 +5647,7 @@ function CalDavForm({ onDone }) {
6021
5647
  );
6022
5648
  }
6023
5649
  function CalendarAccountsPanel({ className }) {
6024
- const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
5650
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
6025
5651
  const { connectors } = react$1.useCalendarSupport();
6026
5652
  const startOAuth = react$1.useStartCalendarAccountOAuth();
6027
5653
  const { data: accounts = [], isLoading, error } = react$1.useCalendarAccounts();
@@ -6108,7 +5734,7 @@ function CalendarAccountsPanel({ className }) {
6108
5734
 
6109
5735
  // src/connection/calendar/copy.ts
6110
5736
  function useCalendarCopy() {
6111
- const copy = chunkXVUOMWMD_cjs.useCopyText({ copyFailed: "Could not copy. Select the text and copy it manually." });
5737
+ const copy = chunk5FTIHRZH_cjs.useCopyText({ copyFailed: "Could not copy. Select the text and copy it manually." });
6112
5738
  return (value, what = "Copied") => copy(value, `${what} to clipboard`);
6113
5739
  }
6114
5740
  function CopyField({ label, value, mono = true, testId, className }) {
@@ -6157,7 +5783,7 @@ function calendarNames(ids, calendars) {
6157
5783
  return names.length ? names.join(", ") : `${ids.length} calendar${ids.length === 1 ? "" : "s"}`;
6158
5784
  }
6159
5785
  function RevokeButton({ row }) {
6160
- const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
5786
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
6161
5787
  const revoke = react$1.useRevokeAppPassword();
6162
5788
  const [confirming, setConfirming] = react.useState(false);
6163
5789
  if (!confirming)
@@ -6476,7 +6102,7 @@ function summarizeWeekly(page) {
6476
6102
  return days.map((d) => chunk6YTHQ73P_cjs.WEEKDAY_NAMES[d]?.slice(0, 3)).join(", ");
6477
6103
  }
6478
6104
  function BookingPageForm({ page, defaultTimeZone, onDone }) {
6479
- const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
6105
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
6480
6106
  const copyText = useCalendarCopy();
6481
6107
  const [form, setForm] = react.useState(
6482
6108
  () => page ? chunk6YTHQ73P_cjs.bookingToForm(page) : chunk6YTHQ73P_cjs.emptyBookingForm(defaultTimeZone)
@@ -6659,7 +6285,7 @@ function BookingPageForm({ page, defaultTimeZone, onDone }) {
6659
6285
  );
6660
6286
  }
6661
6287
  function BookingPagesPanel({ defaultTimeZone, className }) {
6662
- const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
6288
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
6663
6289
  const copyText = useCalendarCopy();
6664
6290
  const { data: pages = [], isLoading, error } = react$1.useBookingPages();
6665
6291
  const { data: settings } = react$1.useCalendarSettings(!defaultTimeZone);
@@ -6769,7 +6395,7 @@ function BookingPagesPanel({ defaultTimeZone, className }) {
6769
6395
  }
6770
6396
  var selectClass5 = "h-9 w-full rounded-md border border-input bg-background px-2 text-sm text-foreground shadow-sm";
6771
6397
  function CreateRoomForm({ zone, onDone }) {
6772
- const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
6398
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
6773
6399
  const create2 = react$1.useCreateRoom();
6774
6400
  const [name, setName] = react.useState("");
6775
6401
  const [type, setType] = react.useState("room");
@@ -7099,7 +6725,7 @@ function CalendarSettingsDialog({
7099
6725
  initialTab = "general",
7100
6726
  onClose
7101
6727
  }) {
7102
- const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
6728
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
7103
6729
  const save = react$1.useSaveCalendarSettings();
7104
6730
  const [value, setValue] = react.useState(() => chunk6YTHQ73P_cjs.toSettingsValue(settings));
7105
6731
  const [tab, setTab] = react.useState(initialTab);
@@ -7172,7 +6798,7 @@ function EventScheduling({
7172
6798
  workingStartHour = 7
7173
6799
  }) {
7174
6800
  const [open, setOpen] = react.useState(false);
7175
- const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
6801
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
7176
6802
  const arbi = react$1.useArbi();
7177
6803
  const me = arbi.isLoggedIn ? arbi.user.identity()?.email ?? null : null;
7178
6804
  const allDay = chunk6YTHQ73P_cjs.isAllDayDraft(draft);
@@ -7413,7 +7039,7 @@ function proposed(inv, zone) {
7413
7039
  return `${chunkBIXHB4LV_cjs.formatInZone(su, zone, { weekday: "short", day: "numeric", month: "short", hour: "numeric", minute: "2-digit" })} \u2013 ${chunkBIXHB4LV_cjs.formatInZone(eu, zone, { hour: "numeric", minute: "2-digit" })}`;
7414
7040
  }
7415
7041
  function InvitationsPanel({ timeZone, onOpenEvent }) {
7416
- const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
7042
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
7417
7043
  const { data: items = [], refetch } = react$1.useCalendarInvitations();
7418
7044
  const respond = react$1.useRespondToEvent();
7419
7045
  const decide = react$1.useDecideCounter();
@@ -7600,7 +7226,7 @@ function PublishCalendarDialog({
7600
7226
  onClose,
7601
7227
  onConnectAccount
7602
7228
  }) {
7603
- const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
7229
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
7604
7230
  const { data: accounts = [], isLoading } = react$1.useCalendarAccounts(!!calendarId);
7605
7231
  const publish = react$1.usePublishCalendar();
7606
7232
  const [accountId, setAccountId] = react.useState("");
@@ -7677,7 +7303,7 @@ function ShareCalendarDialog({
7677
7303
  calendarName,
7678
7304
  onClose
7679
7305
  }) {
7680
- const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
7306
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
7681
7307
  const { data: shares = [], isLoading } = react$1.useCalendarShares(calendarId);
7682
7308
  const share = react$1.useShareCalendar();
7683
7309
  const unshare = react$1.useUnshareCalendar();
@@ -7981,7 +7607,7 @@ function ConnectedCalendar({
7981
7607
  onOpenOverlay,
7982
7608
  syncAccountsOnOpen = true
7983
7609
  } = {}) {
7984
- const { confirm, notify, openConversation } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
7610
+ const { confirm, notify, openConversation } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
7985
7611
  const arbi = react$1.useArbi();
7986
7612
  const fetchEvent = react$1.useFetchCalendarEvent();
7987
7613
  const notifyError = (prefix, err) => notify(`${prefix}: ${errorText3(err)}`, "error");
@@ -8734,7 +8360,7 @@ function ConnectedMailInviteCard({
8734
8360
  isOnline,
8735
8361
  onOpenEvent
8736
8362
  }) {
8737
- const { notify } = chunkKPZZ5FHE_cjs.useBlocksEnvironment();
8363
+ const { notify } = chunkC4WSHRR6_cjs.useBlocksEnvironment();
8738
8364
  const part = attachments.find(chunk6YTHQ73P_cjs.isCalendarAttachment);
8739
8365
  const { data: settings } = react$1.useCalendarSettings(!!part);
8740
8366
  const zone = chunkBIXHB4LV_cjs.safeZone(settings?.time_zone, chunkBIXHB4LV_cjs.detectTimeZone());
@@ -8865,7 +8491,7 @@ function Shell({ children, wide = false }) {
8865
8491
  ) });
8866
8492
  }
8867
8493
  function CancelView({ slug, token }) {
8868
- const { apiBaseUrl } = chunkKPZZ5FHE_cjs.useBlocksEnvironment().runtimeConfig;
8494
+ const { apiBaseUrl } = chunkC4WSHRR6_cjs.useBlocksEnvironment().runtimeConfig;
8869
8495
  const [state, setState] = react.useState("idle");
8870
8496
  const [error, setError] = react.useState(null);
8871
8497
  return /* @__PURE__ */ jsxRuntime.jsx(Shell, { children: /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "grid gap-4", "data-testid": "book-cancel", children: [
@@ -8943,7 +8569,7 @@ function Confirmation({
8943
8569
  ] }) });
8944
8570
  }
8945
8571
  function ConnectedPublicBooking({ slug, cancelToken }) {
8946
- const { apiBaseUrl } = chunkKPZZ5FHE_cjs.useBlocksEnvironment().runtimeConfig;
8572
+ const { apiBaseUrl } = chunkC4WSHRR6_cjs.useBlocksEnvironment().runtimeConfig;
8947
8573
  const [zone, setZone] = react.useState(chunkBIXHB4LV_cjs.detectTimeZone);
8948
8574
  const [duration, setDuration] = react.useState(void 0);
8949
8575
  const [offset, setOffset] = react.useState(0);
@@ -9301,43 +8927,43 @@ Object.defineProperty(exports, "useWorkspaceDocs", {
9301
8927
  });
9302
8928
  Object.defineProperty(exports, "ConnectedWorkflowDocumentsField", {
9303
8929
  enumerable: true,
9304
- get: function () { return chunkU6YVZDOV_cjs.ConnectedWorkflowDocumentsField; }
8930
+ get: function () { return chunkRA3ZJ45L_cjs.ConnectedWorkflowDocumentsField; }
9305
8931
  });
9306
8932
  Object.defineProperty(exports, "ConnectedWorkflowLauncher", {
9307
8933
  enumerable: true,
9308
- get: function () { return chunkU6YVZDOV_cjs.ConnectedWorkflowLauncher; }
8934
+ get: function () { return chunkRA3ZJ45L_cjs.ConnectedWorkflowLauncher; }
9309
8935
  });
9310
8936
  Object.defineProperty(exports, "ConnectedWorkflowsTable", {
9311
8937
  enumerable: true,
9312
- get: function () { return chunkU6YVZDOV_cjs.ConnectedWorkflowsTable; }
8938
+ get: function () { return chunkRA3ZJ45L_cjs.ConnectedWorkflowsTable; }
9313
8939
  });
9314
8940
  Object.defineProperty(exports, "DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS", {
9315
8941
  enumerable: true,
9316
- get: function () { return chunkU6YVZDOV_cjs.DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS; }
8942
+ get: function () { return chunkRA3ZJ45L_cjs.DEFAULT_CONNECTED_WORKFLOWS_TABLE_LABELS; }
9317
8943
  });
9318
8944
  Object.defineProperty(exports, "NativeDocxSupportProvider", {
9319
8945
  enumerable: true,
9320
- get: function () { return chunkU6YVZDOV_cjs.NativeDocxSupportProvider; }
8946
+ get: function () { return chunkRA3ZJ45L_cjs.NativeDocxSupportProvider; }
9321
8947
  });
9322
8948
  Object.defineProperty(exports, "toWorkflowFieldDocument", {
9323
8949
  enumerable: true,
9324
- get: function () { return chunkU6YVZDOV_cjs.toWorkflowFieldDocument; }
8950
+ get: function () { return chunkRA3ZJ45L_cjs.toWorkflowFieldDocument; }
9325
8951
  });
9326
8952
  Object.defineProperty(exports, "useConnectedAgentOptions", {
9327
8953
  enumerable: true,
9328
- get: function () { return chunkU6YVZDOV_cjs.useConnectedAgentOptions; }
8954
+ get: function () { return chunkRA3ZJ45L_cjs.useConnectedAgentOptions; }
9329
8955
  });
9330
8956
  Object.defineProperty(exports, "useConnectedWorkflowScopeSource", {
9331
8957
  enumerable: true,
9332
- get: function () { return chunkU6YVZDOV_cjs.useConnectedWorkflowScopeSource; }
8958
+ get: function () { return chunkRA3ZJ45L_cjs.useConnectedWorkflowScopeSource; }
9333
8959
  });
9334
8960
  Object.defineProperty(exports, "useConnectedWorkspaceRole", {
9335
8961
  enumerable: true,
9336
- get: function () { return chunkU6YVZDOV_cjs.useConnectedWorkspaceRole; }
8962
+ get: function () { return chunkRA3ZJ45L_cjs.useConnectedWorkspaceRole; }
9337
8963
  });
9338
8964
  Object.defineProperty(exports, "useNativeDocxSupport", {
9339
8965
  enumerable: true,
9340
- get: function () { return chunkU6YVZDOV_cjs.useNativeDocxSupport; }
8966
+ get: function () { return chunkRA3ZJ45L_cjs.useNativeDocxSupport; }
9341
8967
  });
9342
8968
  Object.defineProperty(exports, "ConnectedWorkspaceDataProvider", {
9343
8969
  enumerable: true,
@@ -9376,7 +9002,6 @@ Object.defineProperty(exports, "useConnection", {
9376
9002
  get: function () { return chunkGFNELPDP_cjs.useConnection; }
9377
9003
  });
9378
9004
  exports.ArbiAppProvider = ArbiAppProvider;
9379
- exports.ConnectedAccountSettings = ConnectedAccountSettings;
9380
9005
  exports.ConnectedAgentChatPanel = ConnectedAgentChatPanel;
9381
9006
  exports.ConnectedAgentCreator = ConnectedAgentCreator;
9382
9007
  exports.ConnectedCalendar = ConnectedCalendar;
@@ -9387,20 +9012,16 @@ exports.ConnectedMailAccounts = ConnectedMailAccounts;
9387
9012
  exports.ConnectedMailComposer = ConnectedMailComposer;
9388
9013
  exports.ConnectedMailInviteCard = ConnectedMailInviteCard;
9389
9014
  exports.ConnectedMailMessage = ConnectedMailMessage;
9390
- exports.ConnectedMailSettings = ConnectedMailSettings;
9391
9015
  exports.ConnectedMailSetup = ConnectedMailSetup;
9392
9016
  exports.ConnectedMailbox = ConnectedMailbox;
9393
9017
  exports.ConnectedNotificationCenter = ConnectedNotificationCenter;
9394
9018
  exports.ConnectedNotificationPreferences = ConnectedNotificationPreferences;
9395
9019
  exports.ConnectedPasswordChangeDialog = ConnectedPasswordChangeDialog;
9396
- exports.ConnectedPremiumModels = ConnectedPremiumModels;
9397
- exports.ConnectedPrivacySettings = ConnectedPrivacySettings;
9398
9020
  exports.ConnectedProfileCard = ConnectedProfileCard;
9399
9021
  exports.ConnectedPublicBooking = ConnectedPublicBooking;
9400
9022
  exports.ConnectedRequireVerified = ConnectedRequireVerified;
9401
9023
  exports.ConnectedSecuritySection = ConnectedSecuritySection;
9402
9024
  exports.ConnectedSessionsRow = ConnectedSessionsRow;
9403
- exports.ConnectedSettingsPage = ConnectedSettingsPage;
9404
9025
  exports.ConnectedSkillUpload = ConnectedSkillUpload;
9405
9026
  exports.ConnectedSkillsLibrary = ConnectedSkillsLibrary;
9406
9027
  exports.ConnectedTagTable = ConnectedTagTable;
@@ -9414,24 +9035,16 @@ exports.ConnectedWorkspaceActivity = ConnectedWorkspaceActivity;
9414
9035
  exports.ConnectedWorkspaceNotificationMenu = ConnectedWorkspaceNotificationMenu;
9415
9036
  exports.DEFAULT_CONNECTED_SKILL_UPLOAD_LABELS = DEFAULT_CONNECTED_SKILL_UPLOAD_LABELS;
9416
9037
  exports.DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS = DEFAULT_CONNECTED_WORKFLOW_RUNNER_LABELS;
9417
- exports.DEFAULT_SETTINGS_SECTIONS = DEFAULT_SETTINGS_SECTIONS;
9418
9038
  exports.NotificationCenter = NotificationCenter;
9419
9039
  exports.NotificationEvent = NotificationEvent;
9420
- exports.SETTINGS_SECTION_IDS = SETTINGS_SECTION_IDS;
9421
- exports.SessionStatusIcon = SessionStatusIcon;
9422
9040
  exports.StreamedArtifact = StreamedArtifact;
9423
9041
  exports.WorkflowRunThread = WorkflowRunThread;
9424
- exports.accountSettingsSection = accountSettingsSection;
9425
9042
  exports.bookingCancelLink = bookingCancelLink;
9426
9043
  exports.buildNotificationCenterItems = buildNotificationCenterItems;
9427
- exports.chatSettingsSection = chatSettingsSection;
9428
9044
  exports.countNotificationTypes = countNotificationTypes;
9429
9045
  exports.defaultUnmetPasswordRequirement = defaultUnmetPasswordRequirement;
9430
9046
  exports.filterNotificationCenterItems = filterNotificationCenterItems;
9431
- exports.mailSettingsSection = mailSettingsSection;
9432
9047
  exports.openMeetingLink = openMeetingLink;
9433
- exports.privacySettingsSection = privacySettingsSection;
9434
- exports.renderSessionStatusIcon = renderSessionStatusIcon;
9435
9048
  exports.requestCalendarComposer = requestCalendarComposer;
9436
9049
  exports.requestCalendarEvent = requestCalendarEvent;
9437
9050
  exports.resolveMailbox = resolveMailbox;