@xopcai/xopc 0.0.353 → 0.0.355

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 (268) hide show
  1. package/dist/browser-ext/manifest.json +1 -1
  2. package/dist/extensions/telegram/xopc.extension.json +1 -1
  3. package/dist/gateway/static/root/assets/activity-YogQEteU.js +1 -0
  4. package/dist/gateway/static/root/assets/activity-store-X7CG9pzB.js +1 -0
  5. package/dist/gateway/static/root/assets/{agent-avatar-dicebear-BVIuZcCP.js → agent-avatar-dicebear-DiEBNuSv.js} +1 -1
  6. package/dist/gateway/static/root/assets/agent-defaults-settings-panel-DpBmB3QX.js +1 -0
  7. package/dist/gateway/static/root/assets/agent-plugin-dialog-DlojWUY_.js +1 -0
  8. package/dist/gateway/static/root/assets/agents-CeSCdUHP.js +66 -0
  9. package/dist/gateway/static/root/assets/app-chrome-BeB4KgOf.js +1 -0
  10. package/dist/gateway/static/root/assets/app-management-settings-panel-MkSa6isi.js +1 -0
  11. package/dist/gateway/static/root/assets/appearance-settings-B7hCkaT_.js +1 -0
  12. package/dist/gateway/static/root/assets/apps-page-D_CduJuC.js +1 -0
  13. package/dist/gateway/static/root/assets/{archive-plugin-BZXXJvpX.js → archive-plugin-QfOaQPL_.js} +1 -1
  14. package/dist/gateway/static/root/assets/{automations-page-C7VKkDb5.js → automations-page-uEnQawd7.js} +1 -1
  15. package/dist/gateway/static/root/assets/automations-workspace-pdiSK3Qk.js +7 -0
  16. package/dist/gateway/static/root/assets/{binary-plugins-DoT3g5SP.js → binary-plugins-BF2lVwR9.js} +1 -1
  17. package/dist/gateway/static/root/assets/{block-editor-sqqrCafh.js → block-editor-r4mKGacz.js} +39 -39
  18. package/dist/gateway/static/root/assets/bot-DjLkhyZL.js +1 -0
  19. package/dist/gateway/static/root/assets/{browser-automation-inputs-CZOKsAaa.js → browser-automation-inputs-FW3bYZ-z.js} +1 -1
  20. package/dist/gateway/static/root/assets/{browser-automations-page-TEeTmkGP.js → browser-automations-page-Blrxyy_h.js} +2 -2
  21. package/dist/gateway/static/root/assets/browser-settings-page-DGuwrO7j.js +3 -0
  22. package/dist/gateway/static/root/assets/{capabilities-BOrLei_L.js → capabilities-BCF_160Z.js} +1 -1
  23. package/dist/gateway/static/root/assets/capabilities-CF4-mrIa.js +1 -0
  24. package/dist/gateway/static/root/assets/capabilities-page-DUIA2K--.js +2 -0
  25. package/dist/gateway/static/root/assets/capabilities-settings-panel-CwPNQsJS.js +8 -0
  26. package/dist/gateway/static/root/assets/capability-header-actions-CyvI2F5x.js +1 -0
  27. package/dist/gateway/static/root/assets/channels-DBxDJV8I.js +1 -0
  28. package/dist/gateway/static/root/assets/{chat-terminal-dock-Q99iKyiO.js → chat-terminal-dock-YdxhecE7.js} +2 -2
  29. package/dist/gateway/static/root/assets/chevron-right-BweFrslA.js +1 -0
  30. package/dist/gateway/static/root/assets/circle-alert-BEjgurr2.js +1 -0
  31. package/dist/gateway/static/root/assets/circle-dashed-8qMD7gHf.js +1 -0
  32. package/dist/gateway/static/root/assets/circle-dot-BAseJTrF.js +1 -0
  33. package/dist/gateway/static/root/assets/circle-pause-CN9jYH2s.js +1 -0
  34. package/dist/gateway/static/root/assets/clock-3-DnrAnuyZ.js +1 -0
  35. package/dist/gateway/static/root/assets/cloud-C4-yfnnk.js +1 -0
  36. package/dist/gateway/static/root/assets/computer-settings-page-BuCrA8yD.js +1 -0
  37. package/dist/gateway/static/root/assets/connector-service-page-BiB2GYkp.js +1 -0
  38. package/dist/gateway/static/root/assets/connectors-page-nQAgZk-5.js +2 -0
  39. package/dist/gateway/static/root/assets/copy-text-row-BHDs3cBa.js +1 -0
  40. package/dist/gateway/static/root/assets/date-picker-BJtADyRQ.js +1 -0
  41. package/dist/gateway/static/root/assets/{dependency-picker-BjH8XrKb.js → dependency-picker-D-Ko0G40.js} +1 -1
  42. package/dist/gateway/static/root/assets/{desktop-pet-DyGxNAVW.js → desktop-pet-CVPWcWwC.js} +1 -1
  43. package/dist/gateway/static/root/assets/desktop-pet-settings-BcN_I-7y.js +1 -0
  44. package/dist/gateway/static/root/assets/device-pairing-wizard-CoKKoUlt.js +1 -0
  45. package/dist/gateway/static/root/assets/directory-picker-path-field-m0CubGEP.js +1 -0
  46. package/dist/gateway/static/root/assets/dist-3h6cXXhT.js +1 -0
  47. package/dist/gateway/static/root/assets/dist-Che_jiQF.js +1 -0
  48. package/dist/gateway/static/root/assets/extension-debug-page-BrGWLJg9.js +1 -0
  49. package/dist/gateway/static/root/assets/extension-page-Dd88ynHj.js +1 -0
  50. package/dist/gateway/static/root/assets/extension-provider-CUpbXB2k.js +1 -0
  51. package/dist/gateway/static/root/assets/extension-settings-page-Dq1MXh6D.js +1 -0
  52. package/dist/gateway/static/root/assets/form-field-width-DJw_jULe.js +1 -0
  53. package/dist/gateway/static/root/assets/gateway-settings-C_bTRQeE.js +1 -0
  54. package/dist/gateway/static/root/assets/git-branch-Dh9uxTot.js +1 -0
  55. package/dist/gateway/static/root/assets/home-page-xbqSikkK.js +1 -0
  56. package/dist/gateway/static/root/assets/imports-page-Cd4tcbLU.js +1 -0
  57. package/dist/gateway/static/root/assets/index-BuzC93X-.css +1 -0
  58. package/dist/gateway/static/root/assets/index-CYeGnj-L.js +106 -0
  59. package/dist/gateway/static/root/assets/index.module-Cd9ENXfk.js +1 -0
  60. package/dist/gateway/static/root/assets/interaction-BdhHBbYa.js +1 -0
  61. package/dist/gateway/static/root/assets/is-masked-secret-DOkL5b_X.js +1 -0
  62. package/dist/gateway/static/root/assets/{keyboard-shortcuts-settings-CoYdyBRh.js → keyboard-shortcuts-settings-CmalfzgQ.js} +1 -1
  63. package/dist/gateway/static/root/assets/local-app-workbench-page-BquHHLj6.js +1 -0
  64. package/dist/gateway/static/root/assets/{local-apps-page-CeBhXeoX.js → local-apps-page-RPLHMvYs.js} +1 -1
  65. package/dist/gateway/static/root/assets/logs-page-7NMGltSw.js +2 -0
  66. package/dist/gateway/static/root/assets/management-settings-zwFewbhp.js +1 -0
  67. package/dist/gateway/static/root/assets/markdown-view-7tzqIp_G.js +201 -0
  68. package/dist/gateway/static/root/assets/{media-plugins-C9ya5rUH.js → media-plugins-cjgrKnne.js} +1 -1
  69. package/dist/gateway/static/root/assets/message-square-fVE7Ghj1.js +1 -0
  70. package/dist/gateway/static/root/assets/mic-CuUb7zc-.js +1 -0
  71. package/dist/gateway/static/root/assets/model-display-name-DXhO9rcM.js +1 -0
  72. package/dist/gateway/static/root/assets/models-hub-cache-HGrORbzR.js +1 -0
  73. package/dist/gateway/static/root/assets/note-detail-panel-CwMg9cvF.js +5 -0
  74. package/dist/gateway/static/root/assets/notes-api-J0yhflxC.js +1 -0
  75. package/dist/gateway/static/root/assets/notes-page-CWJwrvo7.js +8 -0
  76. package/dist/gateway/static/root/assets/oauth-api-CYe61zfD.js +1 -0
  77. package/dist/gateway/static/root/assets/page-context-capture-button-DqmAq4Ov.js +1 -0
  78. package/dist/gateway/static/root/assets/page-tabs-D2xpUV26.js +1 -0
  79. package/dist/gateway/static/root/assets/pause-DuPxgSxk.js +1 -0
  80. package/dist/gateway/static/root/assets/personal-page-Bbgx_dgV.js +1 -0
  81. package/dist/gateway/static/root/assets/play-kxZvpBg8.js +1 -0
  82. package/dist/gateway/static/root/assets/popover-select-DcsFzD_i.js +1 -0
  83. package/dist/gateway/static/root/assets/preview-open-alternatives-Dvey7GwU.js +1 -0
  84. package/dist/gateway/static/root/assets/{product-open-page-DUPsiVP9.js → product-open-page-SsG2sljT.js} +1 -1
  85. package/dist/gateway/static/root/assets/project-detail-page-wp5cFhM7.js +1 -0
  86. package/dist/gateway/static/root/assets/projects-page-Brfi519S.js +1 -0
  87. package/dist/gateway/static/root/assets/remote-access-hub-BdtF8Cvk.js +1 -0
  88. package/dist/gateway/static/root/assets/rotate-ccw-JM1TBLpp.js +1 -0
  89. package/dist/gateway/static/root/assets/{runtime-tools-settings-panel-C25xEYTK.js → runtime-tools-settings-panel-CT6HKczq.js} +2 -2
  90. package/dist/gateway/static/root/assets/scenes-page-BmlI42OR.js +2 -0
  91. package/dist/gateway/static/root/assets/schema-form-DEcsbgne.js +1 -0
  92. package/dist/gateway/static/root/assets/secret-input-DPl3VYM8.js +1 -0
  93. package/dist/gateway/static/root/assets/send-session-input-C7Nqy0sK.js +1 -0
  94. package/dist/gateway/static/root/assets/sessions-page-C_G8fZwV.js +1 -0
  95. package/dist/gateway/static/root/assets/settings-2-D-csvaET.js +1 -0
  96. package/dist/gateway/static/root/assets/settings-advanced-gate-CDxdzwDs.js +1 -0
  97. package/dist/gateway/static/root/assets/settings-form-draft-Dy10ldo8.js +1 -0
  98. package/dist/gateway/static/root/assets/settings-form-section-exRhP9xn.js +1 -0
  99. package/dist/gateway/static/root/assets/{settings-page-DqCJHcdG.js → settings-page-P50kLPUz.js} +1 -1
  100. package/dist/gateway/static/root/assets/setup-status-panel-DtnwH0wN.js +1 -0
  101. package/dist/gateway/static/root/assets/share-link-dialog-COlX10Dc.js +1 -0
  102. package/dist/gateway/static/root/assets/share-preview-page-NtRLUieq.js +2 -0
  103. package/dist/gateway/static/root/assets/shares-api-DICV5EKH.js +1 -0
  104. package/dist/gateway/static/root/assets/shares-settings-7Ak_MsJg.js +1 -0
  105. package/dist/gateway/static/root/assets/skill-api-CcdHQhxd.js +1 -0
  106. package/dist/gateway/static/root/assets/skill-api-utils-C7V4JVXM.js +1 -0
  107. package/dist/gateway/static/root/assets/skill-reload-api-CWH3Fmx4.js +1 -0
  108. package/dist/gateway/static/root/assets/skill-wire-pattern-BPpeIcCi.js +1 -0
  109. package/dist/gateway/static/root/assets/skills-page-ChjXDxdX.js +2 -0
  110. package/dist/gateway/static/root/assets/sparkles-DHlfQFAF.js +1 -0
  111. package/dist/gateway/static/root/assets/system-settings-panel-DAR0w3Xi.js +1 -0
  112. package/dist/gateway/static/root/assets/task-detail-page-DEx0kXDV.js +1 -0
  113. package/dist/gateway/static/root/assets/tasks-Buv1mgPF.js +1 -0
  114. package/dist/gateway/static/root/assets/theme-store-BKgBPLH4.js +1 -0
  115. package/dist/gateway/static/root/assets/tunnel-api-CBy97LfF.js +1 -0
  116. package/dist/gateway/static/root/assets/usage-page-BdX6VPQC.js +1 -0
  117. package/dist/gateway/static/root/assets/use-async-resource-GrnWNwMZ.js +1 -0
  118. package/dist/gateway/static/root/assets/use-autosave-Cn6hqqyM.js +1 -0
  119. package/dist/gateway/static/root/assets/use-composer-attachments-DL61XeSu.js +2 -0
  120. package/dist/gateway/static/root/assets/use-file-preview-expanded-Cl9mU32w.js +2 -0
  121. package/dist/gateway/static/root/assets/user-model-page-CRxiQnWG.js +2 -0
  122. package/dist/gateway/static/root/assets/voice-api-key-field-Bw05QB_V.js +1 -0
  123. package/dist/gateway/static/root/assets/{work-discovery-overlay-BnfD6w0k.js → work-discovery-overlay-DvwmD9Ma.js} +1 -1
  124. package/dist/gateway/static/root/assets/{workflow-run-setup-panel-DSy57rBr.js → workflow-run-setup-panel-BQ3fmhM-.js} +2 -2
  125. package/dist/gateway/static/root/assets/workflows-page-Bl8rd4fM.js +6 -0
  126. package/dist/gateway/static/root/assets/workspace-api-BbBT75Kg.js +2 -0
  127. package/dist/gateway/static/root/index.html +61 -19
  128. package/dist/package.js +1 -1
  129. package/dist/packages/gateway-contract/src/tasks.js +19 -2
  130. package/dist/src/agent/agent-manager.js +4 -4
  131. package/dist/src/agent/embedded/run-for-session.d.ts +1 -0
  132. package/dist/src/agent/embedded/run-for-session.js +2 -1
  133. package/dist/src/agent/embedded/run-turn.js +30 -2
  134. package/dist/src/agent/embedded/types.d.ts +1 -0
  135. package/dist/src/agent/prompt/sections/messaging-runtime.js +2 -1
  136. package/dist/src/agent/service/direct-turn-helpers.d.ts +1 -0
  137. package/dist/src/agent/service/direct-turn-helpers.js +1 -0
  138. package/dist/src/agent/service/process-direct-streaming.js +1 -0
  139. package/dist/src/agent/service.js +4 -1
  140. package/dist/src/agent/session/session-config-service.js +27 -1
  141. package/dist/src/agent/session/session-hydrator.js +1 -1
  142. package/dist/src/agent/tools/factory.js +21 -14
  143. package/dist/src/agent/tools/personal-preference-tool.d.ts +10 -0
  144. package/dist/src/agent/tools/personal-preference-tool.js +44 -0
  145. package/dist/src/agent/tools/personal-task-tool.d.ts +29 -0
  146. package/dist/src/agent/tools/personal-task-tool.js +184 -0
  147. package/dist/src/agent/tools/xopc-use-tool.js +3 -2
  148. package/dist/src/agent-catalog/service.d.ts +1 -1
  149. package/dist/src/agent-catalog/service.js +2 -1
  150. package/dist/src/agent-config/index.js +2 -2
  151. package/dist/src/agent-config/schema.d.ts +153 -1
  152. package/dist/src/agent-config/schema.js +42 -3
  153. package/dist/src/chat-commands/builtins/thinking.js +12 -2
  154. package/dist/src/chat-commands/context.js +7 -1
  155. package/dist/src/cli/commands/auth.js +1 -1
  156. package/dist/src/cli/commands/doctor/checks/database-schema.js +1 -1
  157. package/dist/src/cli/commands/models.js +2 -2
  158. package/dist/src/cli/commands/onboard/model.js +1 -1
  159. package/dist/src/cli/commands/providers.js +1 -1
  160. package/dist/src/gateway/hono/lib/config-payload.d.ts +1 -0
  161. package/dist/src/gateway/hono/routes/lazy-bundles.js +8 -0
  162. package/dist/src/gateway/hono/routes/models.js +1 -1
  163. package/dist/src/gateway/hono/routes/personal-agent.d.ts +3 -0
  164. package/dist/src/gateway/hono/routes/personal-agent.js +122 -0
  165. package/dist/src/gateway/hono/routes/session-input-handler.js +1 -1
  166. package/dist/src/gateway/hono/routes/sessions.js +5 -0
  167. package/dist/src/gateway/hono/routes/side-chats.js +1 -1
  168. package/dist/src/gateway/hono/routes/tasks.js +64 -1
  169. package/dist/src/gateway/hono/routes/voice.js +8 -0
  170. package/dist/src/gateway/service/agent-runner.js +41 -0
  171. package/dist/src/gateway/service/run-gateway-agent.js +2 -1
  172. package/dist/src/gateway/service/session-command-service.js +7 -1
  173. package/dist/src/gateway/service/sessions-api.js +11 -1
  174. package/dist/src/gateway/service.js +10 -10
  175. package/dist/src/gateway/session-reset-service.js +5 -0
  176. package/dist/src/gateway/xopc-cloud-capability-setup.d.ts +9 -0
  177. package/dist/src/gateway/xopc-cloud-capability-setup.js +42 -2
  178. package/dist/src/home-intelligence/host.js +2 -2
  179. package/dist/src/personal-agent/policy.d.ts +1 -0
  180. package/dist/src/personal-agent/policy.js +13 -0
  181. package/dist/src/personal-agent/repository.d.ts +25 -0
  182. package/dist/src/personal-agent/repository.js +68 -0
  183. package/dist/src/personal-agent/service.d.ts +49 -0
  184. package/dist/src/personal-agent/service.js +234 -0
  185. package/dist/src/session/resolve-session.js +4 -2
  186. package/dist/src/storage/sqlite/migrations/229_task_criterion_reviews.sql +12 -0
  187. package/dist/src/storage/sqlite/migrations/runner.d.ts +1 -1
  188. package/dist/src/storage/sqlite/migrations/runner.js +3 -3
  189. package/dist/src/storage/sqlite/schema.js +1 -1
  190. package/dist/src/storage/sqlite/schema.sql +13 -0
  191. package/dist/src/storage/sqlite/session-repository.js +6 -2
  192. package/dist/src/storage/sqlite/transcript-repository.js +2 -1
  193. package/dist/src/tasks/capabilities/read.js +3 -0
  194. package/dist/src/tasks/task-application-service.js +6 -1
  195. package/dist/src/tasks/task-criterion-review-repository.d.ts +22 -0
  196. package/dist/src/tasks/task-criterion-review-repository.js +74 -0
  197. package/dist/src/tasks/task-main-update-decision-service.js +6 -0
  198. package/dist/src/tasks/task-main-update-delivery.js +5 -2
  199. package/dist/src/tasks/task-origin-repository.d.ts +4 -1
  200. package/dist/src/tasks/task-origin-repository.js +3 -3
  201. package/dist/src/tasks/task-run-coordinator.d.ts +1 -0
  202. package/dist/src/tasks/task-run-coordinator.js +13 -7
  203. package/dist/src/tasks/task-run-dispatcher.d.ts +1 -1
  204. package/dist/src/tasks/task-run-dispatcher.js +6 -4
  205. package/package.json +4 -4
  206. package/dist/gateway/static/root/assets/agent-defaults-settings-panel-CcTnphqy.js +0 -1
  207. package/dist/gateway/static/root/assets/agent-plugin-dialog-CdCzMPhC.js +0 -1
  208. package/dist/gateway/static/root/assets/agents-BiNKpndr.js +0 -66
  209. package/dist/gateway/static/root/assets/app-management-settings-panel-BvGDN5J6.js +0 -1
  210. package/dist/gateway/static/root/assets/appearance-settings-BhQYkuQj.js +0 -1
  211. package/dist/gateway/static/root/assets/apps-page-BQZJuM-C.js +0 -1
  212. package/dist/gateway/static/root/assets/automations-workspace-y4qcvlg8.js +0 -7
  213. package/dist/gateway/static/root/assets/browser-settings-page--N4P7V0l.js +0 -3
  214. package/dist/gateway/static/root/assets/capabilities-page-F7OAv-iz.js +0 -2
  215. package/dist/gateway/static/root/assets/capabilities-settings-panel-CaiIo1S1.js +0 -8
  216. package/dist/gateway/static/root/assets/capability-header-actions-CR_O9_Vr.js +0 -1
  217. package/dist/gateway/static/root/assets/channels-Bb-8c4wl.js +0 -1
  218. package/dist/gateway/static/root/assets/computer-settings-page-QuXZBfky.js +0 -1
  219. package/dist/gateway/static/root/assets/connector-service-page-BIqzVqCO.js +0 -1
  220. package/dist/gateway/static/root/assets/connectors-page-CZ24DSBJ.js +0 -2
  221. package/dist/gateway/static/root/assets/date-picker-Ck-FmYEL.js +0 -1
  222. package/dist/gateway/static/root/assets/desktop-pet-settings-C1rKgB-S.js +0 -1
  223. package/dist/gateway/static/root/assets/device-pairing-wizard-UrPcOU6Q.js +0 -1
  224. package/dist/gateway/static/root/assets/directory-picker-path-field-BYxUgMZb.js +0 -1
  225. package/dist/gateway/static/root/assets/dist-CKkafhaS.js +0 -1
  226. package/dist/gateway/static/root/assets/dist-io9jFpN72.js +0 -1
  227. package/dist/gateway/static/root/assets/extension-debug-page-CGL0jpQA.js +0 -1
  228. package/dist/gateway/static/root/assets/extension-page-DPWf-tYg.js +0 -1
  229. package/dist/gateway/static/root/assets/extension-settings-page-DZWBY39d.js +0 -1
  230. package/dist/gateway/static/root/assets/gateway-settings-D5w5aYXK.js +0 -1
  231. package/dist/gateway/static/root/assets/home-page-DPQwxBGy.js +0 -1
  232. package/dist/gateway/static/root/assets/imports-page-CnRWDtGz.js +0 -1
  233. package/dist/gateway/static/root/assets/index-B-w6Rk9Z.css +0 -1
  234. package/dist/gateway/static/root/assets/index-DU5Eb1V8.js +0 -106
  235. package/dist/gateway/static/root/assets/local-app-workbench-page-hjFeYlIq.js +0 -1
  236. package/dist/gateway/static/root/assets/logs-page-CzpZDjkA.js +0 -2
  237. package/dist/gateway/static/root/assets/management-settings-Beu_R_Rc.js +0 -1
  238. package/dist/gateway/static/root/assets/markdown-view-BlzX7Ze5.js +0 -201
  239. package/dist/gateway/static/root/assets/note-detail-panel-D8bpTGwP.js +0 -5
  240. package/dist/gateway/static/root/assets/notes-page-OmgXowUG.js +0 -8
  241. package/dist/gateway/static/root/assets/page-context-capture-button-BjjjuLkz.js +0 -1
  242. package/dist/gateway/static/root/assets/page-tabs-_DiuzxyD.js +0 -1
  243. package/dist/gateway/static/root/assets/popover-select-0p9PIHRy.js +0 -1
  244. package/dist/gateway/static/root/assets/preview-open-alternatives-BKvUadws.js +0 -1
  245. package/dist/gateway/static/root/assets/project-detail-page-CWlCg2x5.js +0 -1
  246. package/dist/gateway/static/root/assets/projects-page-NbVNo0tP.js +0 -1
  247. package/dist/gateway/static/root/assets/remote-access-hub-CD8HrqGC.js +0 -1
  248. package/dist/gateway/static/root/assets/scenes-page-DbWaemwR.js +0 -2
  249. package/dist/gateway/static/root/assets/schema-form-_3LQ4hyB.js +0 -1
  250. package/dist/gateway/static/root/assets/sessions-page-B7ZUdXlb.js +0 -1
  251. package/dist/gateway/static/root/assets/settings-advanced-gate-CpKzZMft.js +0 -1
  252. package/dist/gateway/static/root/assets/settings-form-section-DS80hVSY.js +0 -1
  253. package/dist/gateway/static/root/assets/setup-status-panel-De-kC3yJ.js +0 -1
  254. package/dist/gateway/static/root/assets/share-preview-page-T-0g_rwr.js +0 -2
  255. package/dist/gateway/static/root/assets/shares-settings-Dz33T3du.js +0 -1
  256. package/dist/gateway/static/root/assets/skill-api-Cx6GGpSY.js +0 -1
  257. package/dist/gateway/static/root/assets/skill-reload-api-DyJ-Duem.js +0 -1
  258. package/dist/gateway/static/root/assets/skills-page-B2iyN-kP.js +0 -2
  259. package/dist/gateway/static/root/assets/system-settings-panel-By3SZQR_.js +0 -1
  260. package/dist/gateway/static/root/assets/task-detail-page-4yHUTs4_.js +0 -1
  261. package/dist/gateway/static/root/assets/tasks-BH8_WMUF.js +0 -1
  262. package/dist/gateway/static/root/assets/tunnel-api-BoH0LBkw.js +0 -1
  263. package/dist/gateway/static/root/assets/usage-page-dKU5X9zT.js +0 -1
  264. package/dist/gateway/static/root/assets/use-autosave-YKCwQvqT.js +0 -1
  265. package/dist/gateway/static/root/assets/user-model-page-Uht32LPP.js +0 -2
  266. package/dist/gateway/static/root/assets/voice-api-key-field-DiqHIA8l.js +0 -1
  267. package/dist/gateway/static/root/assets/workflows-page-Cq3vRUbc.js +0 -6
  268. /package/dist/gateway/static/root/assets/{dist-CI_fqRk-2.js → dist-CI_fqRk-.js} +0 -0
@@ -1,2 +1,2 @@
1
1
  const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/attachment-preview-renderer-wzIchDSv.js","assets/preload-helper-zJ_50EbN.js","assets/pdf-runtime-DU_sMPjG.js"])))=>i.map(i=>d[i]);
2
- import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{t as i}from"./preload-helper-zJ_50EbN.js";import{t as a}from"./messages-DPw2X06D.js";import{a as o,t as s}from"./attachment-utils-core-BIOUBrpT.js";import{t as c}from"./preview-open-alternatives-BKvUadws.js";import{t as l}from"./use-blob-object-url-D4BFuzZB.js";var u=e(t(),1),d=n();function f(e){let t=e.trim(),n=t.match(/^<pptx\s+filename="([^"]*)">\s*/),r=t;n&&(r=t.slice(n[0].length),r=r.replace(/\s*<\/pptx>\s*$/u,``).trim());let i=[],a=/<slide number="(\d+)">([\s\S]*?)<\/slide>/gu,o;for(;(o=a.exec(r))!==null;){let e=Number.parseInt(o[1],10),t=o[2].trim();i.push({slideNumber:e,text:t})}let s=[],c=/<!--([\s\S]*?)-->/gu,l;for(;(l=c.exec(r))!==null;)s.push(l[1].trim());return i.length===0?{ok:!1,raw:e}:{ok:!0,slides:i,notes:s}}var p=r();function m(e){let t=(0,d.c)(13),{text:n,slideLabel:r,emptySlideLabel:i}=e,a;t[0]===n?a=t[1]:(a=f(n),t[0]=n,t[1]=a);let o=a;if(!o.ok){let e;return t[2]===o.raw?e=t[3]:(e=(0,p.jsx)(`pre`,{className:`whitespace-pre-wrap break-words font-mono text-xs leading-relaxed text-fg`,children:o.raw}),t[2]=o.raw,t[3]=e),e}let s;if(t[4]!==i||t[5]!==o.notes||t[6]!==o.slides||t[7]!==r){let e=[];if(o.notes.length>0){let n;t[9]===o.notes?n=t[10]:(n=o.notes.map(h),t[9]=o.notes,t[10]=n);let r;t[11]===n?r=t[12]:(r=(0,p.jsx)(`div`,{className:`mb-2 border-b border-edge-subtle pb-2 dark:border-edge`,role:`status`,children:n},`notes`),t[11]=n,t[12]=r),e.push(r)}for(let t of o.slides)e.push((0,p.jsxs)(`section`,{className:`rounded-lg border border-edge-subtle bg-surface-panel p-3 dark:border-edge`,children:[(0,p.jsx)(`h3`,{className:`mb-2 text-sm font-semibold text-fg`,children:r(t.slideNumber)}),(0,p.jsx)(`div`,{className:`whitespace-pre-wrap text-sm leading-relaxed text-fg`,children:t.text.length>0?t.text:i})]},t.slideNumber));s=(0,p.jsx)(`div`,{className:`flex flex-col gap-3`,children:e}),t[4]=i,t[5]=o.notes,t[6]=o.slides,t[7]=r,t[8]=s}else s=t[8];return s}function h(e){return(0,p.jsx)(`p`,{className:`text-xs text-fg-muted`,children:e},e)}function g(e,t){return t===`pdf`?a(e).chat.attachmentPreviewPdfRendering:e===`zh`?t===`excel`?`正在加载电子表格…`:`正在加载文档…`:t===`excel`?`Loading spreadsheet...`:`Loading document...`}function _(e,t){e.innerHTML=``;let n=document.createElement(`p`);n.className=`p-4 text-sm text-fg-muted`,n.textContent=t,e.appendChild(n)}function v({language:e,buffer:t,kind:n,fileKey:r,containerEl:o,onPdfPageCount:s}){let[c,l]=(0,u.useState)(null),[d,f]=(0,u.useState)(!1);return(0,u.useLayoutEffect)(()=>{if(l(null),f(!1),!t||!n||!o||!r)return;let c=!1,u,d=document.createElement(`div`);d.className=`flex min-h-0 flex-1 flex-col overflow-auto`,o.replaceChildren(d),_(d,g(e,n));let p=e=>{c?e():u=e};return(async()=>{try{let r=await i(()=>import(`./attachment-preview-renderer-wzIchDSv.js`),__vite__mapDeps([0,1,2]));if(c)return;let o=a(e).chat;if(n===`pdf`){let{cleanup:e}=await r.renderPdfInContainer(d,t,{loadingText:o.attachmentPreviewPdfRendering,loadMoreHint:o.attachmentPreviewPdfLoadMore,onPageCount:e=>{c||s?.(e)}});p(e)}else if(n===`excel`){let{cleanup:e,truncated:n}=await r.renderExcelInContainer(d,t,{truncationNotice:o.attachmentPreviewExcelTruncated.replaceAll(`{rows}`,`500`).replaceAll(`{cols}`,`64`)});p(e),c||f(n)}else if(n===`docx`){let{cleanup:e}=await r.renderDocxInContainer(d,t);p(e)}}catch(e){c||l(e instanceof Error?e.message:String(e))}})(),()=>{c=!0,u?.(),d.remove()}},[t,n,o,r,e,s]),{error:c,excelTruncated:d}}function y(e){let t=(0,d.c)(12),{props:n,message:r}=e,i;t[0]===n.language?i=t[1]:(i=a(n.language),t[0]=n.language,t[1]=i);let o=i,s=n.descriptor.context===`workspace`,l=!!n.actions.onOpenWithSystemApp&&(n.actions.canOpenWithSystemApp??!0)&&s,u=s?o.workspace.openSystemApp:void 0,f=s?o.workspace.chooseApp:void 0,m;return t[2]!==o.chat.attachmentPreviewDownloadFull||t[3]!==r||t[4]!==n.actions.canChooseOpenWithApp||t[5]!==n.actions.onChooseOpenWithApp||t[6]!==n.actions.onDownload||t[7]!==n.actions.onOpenWithSystemApp||t[8]!==l||t[9]!==u||t[10]!==f?(m=(0,p.jsx)(c,{message:r,downloadLabel:o.chat.attachmentPreviewDownloadFull,onDownload:n.actions.onDownload,openSystemLabel:u,onOpenWithSystemApp:n.actions.onOpenWithSystemApp,canOpenWithSystemApp:l,chooseAppLabel:f,onChooseOpenWithApp:n.actions.onChooseOpenWithApp,canChooseOpenWithApp:n.actions.canChooseOpenWithApp}),t[2]=o.chat.attachmentPreviewDownloadFull,t[3]=r,t[4]=n.actions.canChooseOpenWithApp,t[5]=n.actions.onChooseOpenWithApp,t[6]=n.actions.onDownload,t[7]=n.actions.onOpenWithSystemApp,t[8]=l,t[9]=u,t[10]=f,t[11]=m):m=t[11],m}function b(e){let t=a(e.language);return e.descriptor.context===`workspace`?t.workspace.openElsewhereHint:t.chat.attachmentPreviewOpenElsewhereHint}function x(e){let t=(0,d.c)(24),n;bb0:{if(!e.binaryBuffer){n=null;break bb0}let r;if(t[0]!==e.binaryBuffer||t[1]!==e.descriptor.fileName||t[2]!==e.descriptor.mimeType){let n=o(e.descriptor.fileName)??e.descriptor.mimeType??`image/png`;r=new Blob([e.binaryBuffer],{type:n}),t[0]=e.binaryBuffer,t[1]=e.descriptor.fileName,t[2]=e.descriptor.mimeType,t[3]=r}else r=t[3];n=r}let r=l(n),i;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(i={x:0,y:0},t[4]=i):i=t[4];let[a,s]=(0,u.useState)(i),c=(0,u.useRef)(null),f=(0,u.useRef)(null),m=e.controls?.zoom??1,h=e.controls?.rotation??0,g;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{s({x:0,y:0})},t[5]=g):g=t[5];let _;if(t[6]!==e.descriptor.id||t[7]!==h?(_=[e.descriptor.id,h],t[6]=e.descriptor.id,t[7]=h,t[8]=_):_=t[8],(0,u.useEffect)(g,_),!r)return null;let v;t[9]!==a.x||t[10]!==a.y?(v=e=>{e.button===0&&(c.current={pointerId:e.pointerId,x:e.clientX,y:e.clientY,ox:a.x,oy:a.y},e.currentTarget.setPointerCapture(e.pointerId))},t[9]=a.x,t[10]=a.y,t[11]=v):v=t[11];let y,b,x;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>{let t=c.current;!t||t.pointerId!==e.pointerId||s({x:t.ox+e.clientX-t.x,y:t.oy+e.clientY-t.y})},b=e=>{c.current?.pointerId===e.pointerId&&(c.current=null)},x=e=>{c.current?.pointerId===e.pointerId&&(c.current=null)},t[12]=y,t[13]=b,t[14]=x):(y=t[12],b=t[13],x=t[14]);let S=`translate(${a.x}px, ${a.y}px) scale(${m}) rotate(${h}deg)`,C=m>1?`grab`:`default`,w;t[15]!==S||t[16]!==C?(w={transform:S,cursor:C},t[15]=S,t[16]=C,t[17]=w):w=t[17];let T;t[18]!==r||t[19]!==w?(T=(0,p.jsx)(`img`,{src:r,alt:``,draggable:!1,className:`max-h-full max-w-full select-none object-contain transition-transform duration-100`,style:w}),t[18]=r,t[19]=w,t[20]=T):T=t[20];let E;return t[21]!==T||t[22]!==v?(E=(0,p.jsx)(`div`,{ref:f,className:`flex min-h-0 flex-1 touch-none items-center justify-center overflow-hidden bg-surface-base px-3 py-4 dark:bg-surface-hover/20`,onPointerDown:v,onPointerMove:y,onPointerUp:b,onPointerCancel:x,children:T}),t[21]=T,t[22]=v,t[23]=E):E=t[23],E}function S(e){let t=(0,d.c)(2),n;return t[0]===e?n=t[1]:(n=(0,p.jsx)(T,{...e,kind:`pdf`}),t[0]=e,t[1]=n),n}function C(e){let t=(0,d.c)(2),n;return t[0]===e?n=t[1]:(n=(0,p.jsx)(T,{...e,kind:`docx`}),t[0]=e,t[1]=n),n}function w(e){let t=(0,d.c)(2),n;return t[0]===e?n=t[1]:(n=(0,p.jsx)(T,{...e,kind:`excel`}),t[0]=e,t[1]=n),n}function T(e){let t=(0,d.c)(22),n=(0,u.useRef)(null),[r,i]=(0,u.useState)(null),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=e=>{n.current=e,i(e)},t[0]=o):o=t[0];let s=o,c=e.kind===`pdf`?e.controls?.setPageCount:void 0,l;t[1]!==r||t[2]!==e.binaryBuffer||t[3]!==e.descriptor.id||t[4]!==e.kind||t[5]!==e.language||t[6]!==c?(l={language:e.language,buffer:e.binaryBuffer,kind:e.kind,fileKey:e.descriptor.id,containerEl:r,onPdfPageCount:c},t[1]=r,t[2]=e.binaryBuffer,t[3]=e.descriptor.id,t[4]=e.kind,t[5]=e.language,t[6]=c,t[7]=l):l=t[7];let{error:f,excelTruncated:m}=v(l),h=a(e.language),g=e.kind===`pdf`?e.controls?.zoom??1:1,_=e.kind===`pdf`?e.controls?.rotation??0:0,x=e.kind===`pdf`?e.controls?.page??1:1,S,C;t[8]!==e.kind||t[9]!==_||t[10]!==g?(S=()=>{e.kind!==`pdf`||!n.current||(n.current.style.setProperty(`--xopc-preview-pdf-zoom`,String(g)),n.current.style.setProperty(`--xopc-preview-pdf-rotation`,`${_}deg`),n.current.querySelectorAll(`[data-pdf-page]`).forEach(e=>{let t=e.dataset.pdfBaseHeight??(e.offsetHeight>0?String(e.offsetHeight):void 0);t&&(e.dataset.pdfBaseHeight=t,e.style.height=`${Number(t)*g}px`),e.style.transformOrigin=`top center`,e.style.transform=`scale(${g}) rotate(${_}deg)`,e.style.marginBottom=g===1?``:`${Math.max(16,24*g)}px`}))},C=[e.kind,_,g],t[8]=e.kind,t[9]=_,t[10]=g,t[11]=S,t[12]=C):(S=t[11],C=t[12]),(0,u.useEffect)(S,C);let w,T;t[13]!==x||t[14]!==e.kind?(w=()=>{e.kind!==`pdf`||!n.current||n.current.querySelector(`[data-pdf-page="${x}"]`)?.scrollIntoView({block:`start`})},T=[x,e.kind],t[13]=x,t[14]=e.kind,t[15]=w,t[16]=T):(w=t[15],T=t[16]),(0,u.useEffect)(w,T);let E=f?(0,p.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3 overflow-auto p-4`,children:[(0,p.jsx)(y,{props:e,message:b(e)}),(0,p.jsx)(`p`,{role:`alert`,className:`text-sm text-red-600 dark:text-red-400`,children:f})]}):e.kind===`excel`&&m?(0,p.jsx)(y,{props:e,message:h.chat.attachmentPreviewExcelTruncated.replaceAll(`{rows}`,`500`).replaceAll(`{cols}`,`64`)}):null,D=`${f?`hidden`:`flex`} docx-preview-host min-h-0 flex-1 flex-col overflow-auto rounded-lg border border-edge-subtle bg-surface-panel p-2 dark:border-edge`,O;t[17]===D?O=t[18]:(O=(0,p.jsx)(`div`,{ref:s,className:D}),t[17]=D,t[18]=O);let k;return t[19]!==O||t[20]!==E?(k=(0,p.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-2 overflow-hidden`,children:[E,O]}),t[19]=O,t[20]=E,t[21]=k):k=t[21],k}function E(e){let t=(0,d.c)(23),n;t[0]===e.language?n=t[1]:(n=a(e.language),t[0]=e.language,t[1]=n);let r=n,i=e.extractedText||r.chat.attachmentPreviewNoText,o=!!e.extractedTextTruncated||i.length>3e5,c;t[2]===i?c=t[3]:(c=i.length>3e5?i.slice(0,s):i,t[2]=i,t[3]=c);let l=c,u;t[4]!==r.chat.attachmentPreviewOpenElsewhereTruncated||t[5]!==e||t[6]!==o?(u=o?(0,p.jsx)(y,{props:e,message:r.chat.attachmentPreviewOpenElsewhereTruncated}):null,t[4]=r.chat.attachmentPreviewOpenElsewhereTruncated,t[5]=e,t[6]=o,t[7]=u):u=t[7];let f;t[8]!==r.chat.attachmentPreviewPptxTruncated||t[9]!==o?(f=o?(0,p.jsx)(`p`,{className:`mb-2 border-b border-edge-subtle pb-2 text-xs text-fg-muted dark:border-edge`,children:r.chat.attachmentPreviewPptxTruncated}):null,t[8]=r.chat.attachmentPreviewPptxTruncated,t[9]=o,t[10]=f):f=t[10];let h;t[11]===r.chat.attachmentPreviewPptxSlide?h=t[12]:(h=e=>r.chat.attachmentPreviewPptxSlide.replaceAll(`{n}`,String(e)),t[11]=r.chat.attachmentPreviewPptxSlide,t[12]=h);let g;t[13]!==r.chat.attachmentPreviewPptxEmptySlide||t[14]!==h||t[15]!==l?(g=(0,p.jsx)(m,{text:l,slideLabel:h,emptySlideLabel:r.chat.attachmentPreviewPptxEmptySlide}),t[13]=r.chat.attachmentPreviewPptxEmptySlide,t[14]=h,t[15]=l,t[16]=g):g=t[16];let _;t[17]!==f||t[18]!==g?(_=(0,p.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-auto p-2`,children:[f,g]}),t[17]=f,t[18]=g,t[19]=_):_=t[19];let v;return t[20]!==u||t[21]!==_?(v=(0,p.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-2 overflow-hidden px-2 pb-2 pt-1 sm:px-4`,children:[u,_]}),t[20]=u,t[21]=_,t[22]=v):v=t[22],v}export{C as DocxPreviewPluginView,x as InteractiveImagePreview,S as PdfPreviewPluginView,E as PptxPreviewPluginView,w as SpreadsheetPreviewPluginView};
2
+ import{i as e}from"./rolldown-runtime-aKtaBQYM.js";import{a as t,n,t as r}from"./vendor-react-BOUWij0V.js";import{t as i}from"./preload-helper-zJ_50EbN.js";import{t as a}from"./messages-DPw2X06D.js";import{a as o,t as s}from"./attachment-utils-core-BIOUBrpT.js";import{t as c}from"./preview-open-alternatives-Dvey7GwU.js";import{t as l}from"./use-blob-object-url-D4BFuzZB.js";var u=e(t(),1),d=n();function f(e){let t=e.trim(),n=t.match(/^<pptx\s+filename="([^"]*)">\s*/),r=t;n&&(r=t.slice(n[0].length),r=r.replace(/\s*<\/pptx>\s*$/u,``).trim());let i=[],a=/<slide number="(\d+)">([\s\S]*?)<\/slide>/gu,o;for(;(o=a.exec(r))!==null;){let e=Number.parseInt(o[1],10),t=o[2].trim();i.push({slideNumber:e,text:t})}let s=[],c=/<!--([\s\S]*?)-->/gu,l;for(;(l=c.exec(r))!==null;)s.push(l[1].trim());return i.length===0?{ok:!1,raw:e}:{ok:!0,slides:i,notes:s}}var p=r();function m(e){let t=(0,d.c)(13),{text:n,slideLabel:r,emptySlideLabel:i}=e,a;t[0]===n?a=t[1]:(a=f(n),t[0]=n,t[1]=a);let o=a;if(!o.ok){let e;return t[2]===o.raw?e=t[3]:(e=(0,p.jsx)(`pre`,{className:`whitespace-pre-wrap break-words font-mono text-xs leading-relaxed text-fg`,children:o.raw}),t[2]=o.raw,t[3]=e),e}let s;if(t[4]!==i||t[5]!==o.notes||t[6]!==o.slides||t[7]!==r){let e=[];if(o.notes.length>0){let n;t[9]===o.notes?n=t[10]:(n=o.notes.map(h),t[9]=o.notes,t[10]=n);let r;t[11]===n?r=t[12]:(r=(0,p.jsx)(`div`,{className:`mb-2 border-b border-edge-subtle pb-2 dark:border-edge`,role:`status`,children:n},`notes`),t[11]=n,t[12]=r),e.push(r)}for(let t of o.slides)e.push((0,p.jsxs)(`section`,{className:`rounded-lg border border-edge-subtle bg-surface-panel p-3 dark:border-edge`,children:[(0,p.jsx)(`h3`,{className:`mb-2 text-sm font-semibold text-fg`,children:r(t.slideNumber)}),(0,p.jsx)(`div`,{className:`whitespace-pre-wrap text-sm leading-relaxed text-fg`,children:t.text.length>0?t.text:i})]},t.slideNumber));s=(0,p.jsx)(`div`,{className:`flex flex-col gap-3`,children:e}),t[4]=i,t[5]=o.notes,t[6]=o.slides,t[7]=r,t[8]=s}else s=t[8];return s}function h(e){return(0,p.jsx)(`p`,{className:`text-xs text-fg-muted`,children:e},e)}function g(e,t){return t===`pdf`?a(e).chat.attachmentPreviewPdfRendering:e===`zh`?t===`excel`?`正在加载电子表格…`:`正在加载文档…`:t===`excel`?`Loading spreadsheet...`:`Loading document...`}function _(e,t){e.innerHTML=``;let n=document.createElement(`p`);n.className=`p-4 text-sm text-fg-muted`,n.textContent=t,e.appendChild(n)}function v({language:e,buffer:t,kind:n,fileKey:r,containerEl:o,onPdfPageCount:s}){let[c,l]=(0,u.useState)(null),[d,f]=(0,u.useState)(!1);return(0,u.useLayoutEffect)(()=>{if(l(null),f(!1),!t||!n||!o||!r)return;let c=!1,u,d=document.createElement(`div`);d.className=`flex min-h-0 flex-1 flex-col overflow-auto`,o.replaceChildren(d),_(d,g(e,n));let p=e=>{c?e():u=e};return(async()=>{try{let r=await i(()=>import(`./attachment-preview-renderer-wzIchDSv.js`),__vite__mapDeps([0,1,2]));if(c)return;let o=a(e).chat;if(n===`pdf`){let{cleanup:e}=await r.renderPdfInContainer(d,t,{loadingText:o.attachmentPreviewPdfRendering,loadMoreHint:o.attachmentPreviewPdfLoadMore,onPageCount:e=>{c||s?.(e)}});p(e)}else if(n===`excel`){let{cleanup:e,truncated:n}=await r.renderExcelInContainer(d,t,{truncationNotice:o.attachmentPreviewExcelTruncated.replaceAll(`{rows}`,`500`).replaceAll(`{cols}`,`64`)});p(e),c||f(n)}else if(n===`docx`){let{cleanup:e}=await r.renderDocxInContainer(d,t);p(e)}}catch(e){c||l(e instanceof Error?e.message:String(e))}})(),()=>{c=!0,u?.(),d.remove()}},[t,n,o,r,e,s]),{error:c,excelTruncated:d}}function y(e){let t=(0,d.c)(12),{props:n,message:r}=e,i;t[0]===n.language?i=t[1]:(i=a(n.language),t[0]=n.language,t[1]=i);let o=i,s=n.descriptor.context===`workspace`,l=!!n.actions.onOpenWithSystemApp&&(n.actions.canOpenWithSystemApp??!0)&&s,u=s?o.workspace.openSystemApp:void 0,f=s?o.workspace.chooseApp:void 0,m;return t[2]!==o.chat.attachmentPreviewDownloadFull||t[3]!==r||t[4]!==n.actions.canChooseOpenWithApp||t[5]!==n.actions.onChooseOpenWithApp||t[6]!==n.actions.onDownload||t[7]!==n.actions.onOpenWithSystemApp||t[8]!==l||t[9]!==u||t[10]!==f?(m=(0,p.jsx)(c,{message:r,downloadLabel:o.chat.attachmentPreviewDownloadFull,onDownload:n.actions.onDownload,openSystemLabel:u,onOpenWithSystemApp:n.actions.onOpenWithSystemApp,canOpenWithSystemApp:l,chooseAppLabel:f,onChooseOpenWithApp:n.actions.onChooseOpenWithApp,canChooseOpenWithApp:n.actions.canChooseOpenWithApp}),t[2]=o.chat.attachmentPreviewDownloadFull,t[3]=r,t[4]=n.actions.canChooseOpenWithApp,t[5]=n.actions.onChooseOpenWithApp,t[6]=n.actions.onDownload,t[7]=n.actions.onOpenWithSystemApp,t[8]=l,t[9]=u,t[10]=f,t[11]=m):m=t[11],m}function b(e){let t=a(e.language);return e.descriptor.context===`workspace`?t.workspace.openElsewhereHint:t.chat.attachmentPreviewOpenElsewhereHint}function x(e){let t=(0,d.c)(24),n;bb0:{if(!e.binaryBuffer){n=null;break bb0}let r;if(t[0]!==e.binaryBuffer||t[1]!==e.descriptor.fileName||t[2]!==e.descriptor.mimeType){let n=o(e.descriptor.fileName)??e.descriptor.mimeType??`image/png`;r=new Blob([e.binaryBuffer],{type:n}),t[0]=e.binaryBuffer,t[1]=e.descriptor.fileName,t[2]=e.descriptor.mimeType,t[3]=r}else r=t[3];n=r}let r=l(n),i;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(i={x:0,y:0},t[4]=i):i=t[4];let[a,s]=(0,u.useState)(i),c=(0,u.useRef)(null),f=(0,u.useRef)(null),m=e.controls?.zoom??1,h=e.controls?.rotation??0,g;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(g=()=>{s({x:0,y:0})},t[5]=g):g=t[5];let _;if(t[6]!==e.descriptor.id||t[7]!==h?(_=[e.descriptor.id,h],t[6]=e.descriptor.id,t[7]=h,t[8]=_):_=t[8],(0,u.useEffect)(g,_),!r)return null;let v;t[9]!==a.x||t[10]!==a.y?(v=e=>{e.button===0&&(c.current={pointerId:e.pointerId,x:e.clientX,y:e.clientY,ox:a.x,oy:a.y},e.currentTarget.setPointerCapture(e.pointerId))},t[9]=a.x,t[10]=a.y,t[11]=v):v=t[11];let y,b,x;t[12]===Symbol.for(`react.memo_cache_sentinel`)?(y=e=>{let t=c.current;!t||t.pointerId!==e.pointerId||s({x:t.ox+e.clientX-t.x,y:t.oy+e.clientY-t.y})},b=e=>{c.current?.pointerId===e.pointerId&&(c.current=null)},x=e=>{c.current?.pointerId===e.pointerId&&(c.current=null)},t[12]=y,t[13]=b,t[14]=x):(y=t[12],b=t[13],x=t[14]);let S=`translate(${a.x}px, ${a.y}px) scale(${m}) rotate(${h}deg)`,C=m>1?`grab`:`default`,w;t[15]!==S||t[16]!==C?(w={transform:S,cursor:C},t[15]=S,t[16]=C,t[17]=w):w=t[17];let T;t[18]!==r||t[19]!==w?(T=(0,p.jsx)(`img`,{src:r,alt:``,draggable:!1,className:`max-h-full max-w-full select-none object-contain transition-transform duration-100`,style:w}),t[18]=r,t[19]=w,t[20]=T):T=t[20];let E;return t[21]!==T||t[22]!==v?(E=(0,p.jsx)(`div`,{ref:f,className:`flex min-h-0 flex-1 touch-none items-center justify-center overflow-hidden bg-surface-base px-3 py-4 dark:bg-surface-hover/20`,onPointerDown:v,onPointerMove:y,onPointerUp:b,onPointerCancel:x,children:T}),t[21]=T,t[22]=v,t[23]=E):E=t[23],E}function S(e){let t=(0,d.c)(2),n;return t[0]===e?n=t[1]:(n=(0,p.jsx)(T,{...e,kind:`pdf`}),t[0]=e,t[1]=n),n}function C(e){let t=(0,d.c)(2),n;return t[0]===e?n=t[1]:(n=(0,p.jsx)(T,{...e,kind:`docx`}),t[0]=e,t[1]=n),n}function w(e){let t=(0,d.c)(2),n;return t[0]===e?n=t[1]:(n=(0,p.jsx)(T,{...e,kind:`excel`}),t[0]=e,t[1]=n),n}function T(e){let t=(0,d.c)(22),n=(0,u.useRef)(null),[r,i]=(0,u.useState)(null),o;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(o=e=>{n.current=e,i(e)},t[0]=o):o=t[0];let s=o,c=e.kind===`pdf`?e.controls?.setPageCount:void 0,l;t[1]!==r||t[2]!==e.binaryBuffer||t[3]!==e.descriptor.id||t[4]!==e.kind||t[5]!==e.language||t[6]!==c?(l={language:e.language,buffer:e.binaryBuffer,kind:e.kind,fileKey:e.descriptor.id,containerEl:r,onPdfPageCount:c},t[1]=r,t[2]=e.binaryBuffer,t[3]=e.descriptor.id,t[4]=e.kind,t[5]=e.language,t[6]=c,t[7]=l):l=t[7];let{error:f,excelTruncated:m}=v(l),h=a(e.language),g=e.kind===`pdf`?e.controls?.zoom??1:1,_=e.kind===`pdf`?e.controls?.rotation??0:0,x=e.kind===`pdf`?e.controls?.page??1:1,S,C;t[8]!==e.kind||t[9]!==_||t[10]!==g?(S=()=>{e.kind!==`pdf`||!n.current||(n.current.style.setProperty(`--xopc-preview-pdf-zoom`,String(g)),n.current.style.setProperty(`--xopc-preview-pdf-rotation`,`${_}deg`),n.current.querySelectorAll(`[data-pdf-page]`).forEach(e=>{let t=e.dataset.pdfBaseHeight??(e.offsetHeight>0?String(e.offsetHeight):void 0);t&&(e.dataset.pdfBaseHeight=t,e.style.height=`${Number(t)*g}px`),e.style.transformOrigin=`top center`,e.style.transform=`scale(${g}) rotate(${_}deg)`,e.style.marginBottom=g===1?``:`${Math.max(16,24*g)}px`}))},C=[e.kind,_,g],t[8]=e.kind,t[9]=_,t[10]=g,t[11]=S,t[12]=C):(S=t[11],C=t[12]),(0,u.useEffect)(S,C);let w,T;t[13]!==x||t[14]!==e.kind?(w=()=>{e.kind!==`pdf`||!n.current||n.current.querySelector(`[data-pdf-page="${x}"]`)?.scrollIntoView({block:`start`})},T=[x,e.kind],t[13]=x,t[14]=e.kind,t[15]=w,t[16]=T):(w=t[15],T=t[16]),(0,u.useEffect)(w,T);let E=f?(0,p.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3 overflow-auto p-4`,children:[(0,p.jsx)(y,{props:e,message:b(e)}),(0,p.jsx)(`p`,{role:`alert`,className:`text-sm text-red-600 dark:text-red-400`,children:f})]}):e.kind===`excel`&&m?(0,p.jsx)(y,{props:e,message:h.chat.attachmentPreviewExcelTruncated.replaceAll(`{rows}`,`500`).replaceAll(`{cols}`,`64`)}):null,D=`${f?`hidden`:`flex`} docx-preview-host min-h-0 flex-1 flex-col overflow-auto rounded-lg border border-edge-subtle bg-surface-panel p-2 dark:border-edge`,O;t[17]===D?O=t[18]:(O=(0,p.jsx)(`div`,{ref:s,className:D}),t[17]=D,t[18]=O);let k;return t[19]!==O||t[20]!==E?(k=(0,p.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-2 overflow-hidden`,children:[E,O]}),t[19]=O,t[20]=E,t[21]=k):k=t[21],k}function E(e){let t=(0,d.c)(23),n;t[0]===e.language?n=t[1]:(n=a(e.language),t[0]=e.language,t[1]=n);let r=n,i=e.extractedText||r.chat.attachmentPreviewNoText,o=!!e.extractedTextTruncated||i.length>3e5,c;t[2]===i?c=t[3]:(c=i.length>3e5?i.slice(0,s):i,t[2]=i,t[3]=c);let l=c,u;t[4]!==r.chat.attachmentPreviewOpenElsewhereTruncated||t[5]!==e||t[6]!==o?(u=o?(0,p.jsx)(y,{props:e,message:r.chat.attachmentPreviewOpenElsewhereTruncated}):null,t[4]=r.chat.attachmentPreviewOpenElsewhereTruncated,t[5]=e,t[6]=o,t[7]=u):u=t[7];let f;t[8]!==r.chat.attachmentPreviewPptxTruncated||t[9]!==o?(f=o?(0,p.jsx)(`p`,{className:`mb-2 border-b border-edge-subtle pb-2 text-xs text-fg-muted dark:border-edge`,children:r.chat.attachmentPreviewPptxTruncated}):null,t[8]=r.chat.attachmentPreviewPptxTruncated,t[9]=o,t[10]=f):f=t[10];let h;t[11]===r.chat.attachmentPreviewPptxSlide?h=t[12]:(h=e=>r.chat.attachmentPreviewPptxSlide.replaceAll(`{n}`,String(e)),t[11]=r.chat.attachmentPreviewPptxSlide,t[12]=h);let g;t[13]!==r.chat.attachmentPreviewPptxEmptySlide||t[14]!==h||t[15]!==l?(g=(0,p.jsx)(m,{text:l,slideLabel:h,emptySlideLabel:r.chat.attachmentPreviewPptxEmptySlide}),t[13]=r.chat.attachmentPreviewPptxEmptySlide,t[14]=h,t[15]=l,t[16]=g):g=t[16];let _;t[17]!==f||t[18]!==g?(_=(0,p.jsxs)(`div`,{className:`min-h-0 flex-1 overflow-auto p-2`,children:[f,g]}),t[17]=f,t[18]=g,t[19]=_):_=t[19];let v;return t[20]!==u||t[21]!==_?(v=(0,p.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-2 overflow-hidden px-2 pb-2 pt-1 sm:px-4`,children:[u,_]}),t[20]=u,t[21]=_,t[22]=v):v=t[22],v}export{C as DocxPreviewPluginView,x as InteractiveImagePreview,S as PdfPreviewPluginView,E as PptxPreviewPluginView,w as SpreadsheetPreviewPluginView};