decocms 4.513.8 → 4.514.1

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 (525) hide show
  1. package/dist/client/assets/{ActiveShapeUtils-uKFYSg4Y.js → ActiveShapeUtils-VLdZwTWH.js} +1 -1
  2. package/dist/client/assets/{AlertCircle-Q16nTVAa.js → AlertCircle-Chv0zwfM.js} +1 -1
  3. package/dist/client/assets/{AreaChart-k5WqYBKX.js → AreaChart-xRBpMPmy.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-C_dTX_8N.js → ArrowLeft-P5MTc2kM.js} +1 -1
  5. package/dist/client/assets/{ArrowUp--4P0C-xl.js → ArrowUp-B9orjFiD.js} +1 -1
  6. package/dist/client/assets/{BarChart-VS3Ye-qY.js → BarChart-BLqplpUZ.js} +1 -1
  7. package/dist/client/assets/{Building02-Gub-pr-8.js → Building02-Bhj7SR-R.js} +1 -1
  8. package/dist/client/assets/{CartesianChart-BvH4QiKh.js → CartesianChart-BjPyBEv_.js} +1 -1
  9. package/dist/client/assets/{CategoricalChart-CTrV8dYV.js → CategoricalChart-sikMJnQl.js} +1 -1
  10. package/dist/client/assets/{CheckCircle-CQxu_pm9.js → CheckCircle-BOOTvtN7.js} +1 -1
  11. package/dist/client/assets/{ChevronSelectorVertical-GBLm8Zpl.js → ChevronSelectorVertical-CKvNz838.js} +1 -1
  12. package/dist/client/assets/{ChevronUp-DK-Gvyk8.js → ChevronUp-UOllpHWY.js} +1 -1
  13. package/dist/client/assets/{Copy01-EWitDFCf.js → Copy01-CsZzLh_E.js} +1 -1
  14. package/dist/client/assets/{CreditCard01-wx_z4Iiz.js → CreditCard01-Bji4icQZ.js} +1 -1
  15. package/dist/client/assets/{DotsVertical-DIT5hu2b.js → DotsVertical-BaN_NJ8K.js} +1 -1
  16. package/dist/client/assets/{ErrorBarContext-C56oRnGq.js → ErrorBarContext-D_W32jld.js} +1 -1
  17. package/dist/client/assets/{Globe04-B45_cBRN.js → Globe04-BOt08kHg.js} +1 -1
  18. package/dist/client/assets/{Image01-BfGAREA7.js → Image01-Ffg_Ow_R.js} +1 -1
  19. package/dist/client/assets/{Key01-BV7tzZs6.js → Key01-BVuT8y7b.js} +1 -1
  20. package/dist/client/assets/{Link01-9civFIb9.js → Link01-Du3sgYhY.js} +1 -1
  21. package/dist/client/assets/{LinkBroken01-DmmKNgpp.js → LinkBroken01-D3nON0AT.js} +1 -1
  22. package/dist/client/assets/Minus-qI5XA_m8.js +1 -0
  23. package/dist/client/assets/{Monitor01-BoSs_8gg.js → Monitor01-DPFmNrHU.js} +1 -1
  24. package/dist/client/assets/{Play-CleWZLOG.js → Play-CKRH5LhK.js} +1 -1
  25. package/dist/client/assets/{Plus-DQf-jm_3.js → Plus-Dr-ysAIN.js} +1 -1
  26. package/dist/client/assets/{ReferenceLine-DtJF7ODu.js → ReferenceLine-DTjjPG4Y.js} +1 -1
  27. package/dist/client/assets/{SearchMd-D0zp0uee.js → SearchMd-D_t1juud.js} +1 -1
  28. package/dist/client/assets/{Sector-CWBWrJZQ.js → Sector-B0wid3BW.js} +1 -1
  29. package/dist/client/assets/{ShoppingBag01-B7gta_qY.js → ShoppingBag01-CVVvTwrH.js} +1 -1
  30. package/dist/client/assets/{Sun-BfjJa3ru.js → Sun-Cgn1IQVJ.js} +1 -1
  31. package/dist/client/assets/{SwitchHorizontal01-BJyDDPw9.js → SwitchHorizontal01-CEx9qTgC.js} +1 -1
  32. package/dist/client/assets/Tool01-Dys7Z5ab.js +1 -0
  33. package/dist/client/assets/{Trash01-Dlk_Sh-H.js → Trash01--FklAmhG.js} +1 -1
  34. package/dist/client/assets/{Upload01-DlF9Jqso.js → Upload01-BeT7SqGm.js} +1 -1
  35. package/dist/client/assets/{User01-BcekHhAV.js → User01-C3IPjJ5l.js} +1 -1
  36. package/dist/client/assets/{UserSquare-cdWcOBLL.js → UserSquare-CaU54i61.js} +1 -1
  37. package/dist/client/assets/{Users01-BIP-PxGt.js → Users01-BZXT5qAC.js} +1 -1
  38. package/dist/client/assets/{XClose-L_GNViCD.js → XClose-Cjrx49Z1.js} +1 -1
  39. package/dist/client/assets/{ZoomOut-B3s5275g.js → ZoomOut-Bi4ExiY7.js} +1 -1
  40. package/dist/client/assets/{access-gate-CsHtyNGi.js → access-gate-DMrwc1hr.js} +1 -1
  41. package/dist/client/assets/active-indicator-CCMhAsc_.js +1 -0
  42. package/dist/client/assets/add-connection-dialog-CtRrIzJJ.js +1 -0
  43. package/dist/client/assets/agent-analytics-Bnwy_Gqw.js +2 -0
  44. package/dist/client/assets/agent-app-ZIqUjeyR.js +1 -0
  45. package/dist/client/assets/agent-assets-DwMNxzbi.js +1 -0
  46. package/dist/client/assets/agent-automation-02Z5hyQu.js +20 -0
  47. package/dist/client/assets/agent-automations-CFPQlvb2.js +1 -0
  48. package/dist/client/assets/agent-connect-sources-Iuxi1z0Z.js +1 -0
  49. package/dist/client/assets/agent-deck-BbRRpKSj.js +1 -0
  50. package/dist/client/assets/agent-e2e-CF9xjkgd.js +1 -0
  51. package/dist/client/assets/agent-experiments-CFFDp5bP.js +1 -0
  52. package/dist/client/assets/agent-file-BMs4cJrj.js +1 -0
  53. package/dist/client/assets/agent-hosting-BkhWgDEP.js +1 -0
  54. package/dist/client/assets/agent-icon-sWZwj0Es.js +1 -0
  55. package/dist/client/assets/agent-library-B-Wls_Sg.js +1 -0
  56. package/dist/client/assets/agent-library-file-wqWJ8B3w.js +1 -0
  57. package/dist/client/assets/agent-monitor-5rJ2SPuO.js +1 -0
  58. package/dist/client/assets/agent-overview-c6SNk0le.js +1 -0
  59. package/dist/client/assets/agent-releases-D570Q4Mh.js +2 -0
  60. package/dist/client/assets/agent-settings-B8J4yqzP.js +1 -0
  61. package/dist/client/assets/agent-site-editor-code-KKCPuRYa.js +2 -0
  62. package/dist/client/assets/agent-site-editor-content-lFAgfEzB.js +1 -0
  63. package/dist/client/assets/agent-site-editor-preview-BtpIiq0Q.js +1 -0
  64. package/dist/client/assets/{agent-site-editor-DMCFUFgp.js → agent-site-editor-uS5XJ69l.js} +17 -17
  65. package/dist/client/assets/agent-view-DV9c8H6A.js +1 -0
  66. package/dist/client/assets/{agent-view-guard-AH_0N8JG.js → agent-view-guard-D6Xp5buw.js} +1 -1
  67. package/dist/client/assets/agents-list-DOombnHa.js +1 -0
  68. package/dist/client/assets/ai-providers-tmz_JP24.js +6 -0
  69. package/dist/client/assets/alert-VfejUnRf.js +1 -0
  70. package/dist/client/assets/alert-dialog-XdiY2J_y.js +7 -0
  71. package/dist/client/assets/analytics-sections-ji2C2qln.js +1 -0
  72. package/dist/client/assets/api-keys-DGmfxaaK.js +1 -0
  73. package/dist/client/assets/api-keys-wu5nx6nR.js +1 -0
  74. package/dist/client/assets/app-editor-Cu9bylSk.js +1 -0
  75. package/dist/client/assets/{asset-utils-Duz2qYol.js → asset-utils-CKM5FMXp.js} +1 -1
  76. package/dist/client/assets/{auth-BVkTFTOt.js → auth-CR47t1GM.js} +1 -1
  77. package/dist/client/assets/{auth-catchall-lx3pSppE.js → auth-catchall-B1w-i5RZ.js} +1 -1
  78. package/dist/client/assets/auth-entry-oRjY0cnq.js +1 -0
  79. package/dist/client/assets/{auth-split-layout-CFlGWfV0.js → auth-split-layout-CiycErWO.js} +1 -1
  80. package/dist/client/assets/{authenticate-and-persist-oauth-POYqGagt.js → authenticate-and-persist-oauth-D5GDklWs.js} +1 -1
  81. package/dist/client/assets/automation-list-row-CCxYnaw4.js +1 -0
  82. package/dist/client/assets/automation-runs-CbO3I7fA.js +1 -0
  83. package/dist/client/assets/automations-DFS7mz__.js +1 -0
  84. package/dist/client/assets/{autosend-CL2OZPvg.js → autosend-DnRIvL7O.js} +1 -1
  85. package/dist/client/assets/avatar-x6P8tYtf.js +1 -0
  86. package/dist/client/assets/badge-0pHsypn4.js +1 -0
  87. package/dist/client/assets/block-document-D_lHlXH9.js +3 -0
  88. package/dist/client/assets/{blocks-preview-workspace-context-DcqAhd0P.js → blocks-preview-workspace-context--l_lynd7.js} +1 -1
  89. package/dist/client/assets/blocks-tab-states-llhicB0-.js +20 -0
  90. package/dist/client/assets/blog-schema-XUQos-wQ.js +1 -0
  91. package/dist/client/assets/buckets-FE463cqq.js +1 -0
  92. package/dist/client/assets/{build-improve-prompt-doc-BJrt-jCW.js → build-improve-prompt-doc-R7g2gEoJ.js} +1 -1
  93. package/dist/client/assets/{calendar-sxNtZ9wG.js → calendar-Dt43s5dd.js} +1 -1
  94. package/dist/client/assets/{capability-load-error-CB4I7CRT.js → capability-load-error-BwHvNdC3.js} +1 -1
  95. package/dist/client/assets/category-editor-ChXNS4Vx.js +1 -0
  96. package/dist/client/assets/{chart-NRF3lK-V.js → chart-BtbkFiWd.js} +1 -1
  97. package/dist/client/assets/{chat-context-Dv2E4fnf.js → chat-context-DHXBy843.js} +6 -6
  98. package/dist/client/assets/{chat-draft-X1dGJc2x.js → chat-draft-DZ2UGoju.js} +1 -1
  99. package/dist/client/assets/checkbox-J7NM8Nxa.js +1 -0
  100. package/dist/client/assets/choose-editor-sfJnCc8D.js +1 -0
  101. package/dist/client/assets/{cli-auth-success-aITDjw-8.js → cli-auth-success-C3tfQ2C3.js} +1 -1
  102. package/dist/client/assets/{client-icons-DRk6JWY6.js → client-icons-Cv4YCEZF.js} +1 -1
  103. package/dist/client/assets/cms-settings-editor-DfS-CnoD.js +1 -0
  104. package/dist/client/assets/{collapsible-DHXUZre4.js → collapsible-C5IcK6_6.js} +1 -1
  105. package/dist/client/assets/collection-detail-CE3RN1bQ.js +1 -0
  106. package/dist/client/assets/collection-display-button-XyzcBi3s.js +1 -0
  107. package/dist/client/assets/{collection-search-Dcze6ySb.js → collection-search-EaUyhqe3.js} +1 -1
  108. package/dist/client/assets/collection-table-wrapper-AoIZEo7k.js +1 -0
  109. package/dist/client/assets/collection-tabs-CvrE77Fy.js +1 -0
  110. package/dist/client/assets/{column-rules-C_Hndp-C.js → column-rules-Uuv3kpod.js} +1 -1
  111. package/dist/client/assets/combobox-GJu0SOmd.js +1 -0
  112. package/dist/client/assets/{coming-soon-page-DsS1SnMg.js → coming-soon-page-C252kDGK.js} +1 -1
  113. package/dist/client/assets/command-CxL64Rh6.js +1 -0
  114. package/dist/client/assets/companion-mcps-section-dLU7TCqp.js +1 -0
  115. package/dist/client/assets/config-MIIbcSQe.js +1 -0
  116. package/dist/client/assets/connect-CPLWL7jD.js +9 -0
  117. package/dist/client/assets/connect-layout-DKbxeOaE.js +1 -0
  118. package/dist/client/assets/{connection-CEK3iDim.js → connection-Dwyi3srb.js} +1 -1
  119. package/dist/client/assets/{connection-card-Zhg6xn7V.js → connection-card-Fd6iPvoW.js} +1 -1
  120. package/dist/client/assets/connection-detail-2wc1W9tk.js +1 -0
  121. package/dist/client/assets/connection-form-helpers-Be0GZ2Fr.js +1 -0
  122. package/dist/client/assets/connections-CXtzZLwk.js +1 -0
  123. package/dist/client/assets/content-tab-C6Yd-gaA.js +22 -0
  124. package/dist/client/assets/context-CTmvExSC.js +1 -0
  125. package/dist/client/assets/{context-menu-BFA8rRfY.js → context-menu-Sl80TmNB.js} +1 -1
  126. package/dist/client/assets/context-shell-Luc3_ZNi.js +197 -0
  127. package/dist/client/assets/{core.esm-BO316fgf.js → core.esm-3Ntqpx6o.js} +2 -2
  128. package/dist/client/assets/{create-organization-dialog-Cb6YY9K7.js → create-organization-dialog-Y8ioappi.js} +1 -1
  129. package/dist/client/assets/{daily-pulse-C0-1QTxZ.js → daily-pulse-BokyOzAt.js} +1 -1
  130. package/dist/client/assets/discover-NdJwdhLd.js +1 -0
  131. package/dist/client/assets/{domain-settings-B_QSN-on.js → domain-settings-DjKwxNmK.js} +1 -1
  132. package/dist/client/assets/{drawer-DL0G-oy-.js → drawer-2qaZT3bV.js} +1 -1
  133. package/dist/client/assets/{editor-B62-XQRE.js → editor-D4klHvzy.js} +1 -1
  134. package/dist/client/assets/editor-classes-BBdx-JSY.js +1 -0
  135. package/dist/client/assets/{empty-state-JTI0oLk7.js → empty-state-CLeOp2iF.js} +1 -1
  136. package/dist/client/assets/empty-state-kKu94zqY.js +1 -0
  137. package/dist/client/assets/{extract-connection-data-BlmKelwb.js → extract-connection-data-BRxw-vDj.js} +1 -1
  138. package/dist/client/assets/{feature-gate-DQ2MNs-B.js → feature-gate-DtQbinUr.js} +1 -1
  139. package/dist/client/assets/{feature-paywall-BSXK-EmV.js → feature-paywall-BvbLf2vN.js} +1 -1
  140. package/dist/client/assets/file-explorer-CRhBeOh6.js +2 -0
  141. package/dist/client/assets/file-preview-sewMgnQS.js +1 -0
  142. package/dist/client/assets/file-share-button-CvBuOPBB.js +3 -0
  143. package/dist/client/assets/{file-type-icon-HF5UcaS2.js → file-type-icon-L81OHsVz.js} +1 -1
  144. package/dist/client/assets/folder-icon-yKBQ26US.js +2 -0
  145. package/dist/client/assets/{form-DNjk4sZI.js → form-oexeEAr5.js} +1 -1
  146. package/dist/client/assets/general-DjPGqCh1.js +1 -0
  147. package/dist/client/assets/home-x3m8wBSJ.js +1 -0
  148. package/dist/client/assets/{hosted-publish-feedback-DtU7FOId.js → hosted-publish-feedback-GSHWRd1_.js} +1 -1
  149. package/dist/client/assets/{icon-button-WP5IJTs8.js → icon-button-DfIZISrS.js} +1 -1
  150. package/dist/client/assets/{index-B9qNCJbx.js → index-5UrkGUsp.js} +1 -1
  151. package/dist/client/assets/index-B-ZICxtp.js +1 -0
  152. package/dist/client/assets/{index-BaQyqQF-.js → index-B50XV3gp.js} +1 -1
  153. package/dist/client/assets/{index-CVLOGr5B.js → index-BAK2VowX.js} +1 -1
  154. package/dist/client/assets/index-BNHeiq0Q.js +1 -0
  155. package/dist/client/assets/index-C0_wKyXa.js +4 -0
  156. package/dist/client/assets/index-CWfwo1z9.css +1 -0
  157. package/dist/client/assets/{index-D6gxSs-5.js → index-CYAP4xje.js} +1 -1
  158. package/dist/client/assets/index-CiDUJoU5.js +4 -0
  159. package/dist/client/assets/{index-DCOsLpC6.js → index-Cyd8Z3z7.js} +23 -23
  160. package/dist/client/assets/{index-DtysKpnb.js → index-DlkvGq_Y.js} +1 -1
  161. package/dist/client/assets/index-DlxFtSYK.js +2 -0
  162. package/dist/client/assets/{index-a-46Uqqs.js → index-DpopmD-d.js} +1 -1
  163. package/dist/client/assets/{index-DEQvnIsm.js → index-DwUSgMrk.js} +38 -38
  164. package/dist/client/assets/{index-C13QaLdF.js → index-no3MX84i.js} +2 -2
  165. package/dist/client/assets/index-rABmEORU.js +5 -0
  166. package/dist/client/assets/{index-redirect-dS_ROPu1.js → index-redirect-B1_VIFp-.js} +1 -1
  167. package/dist/client/assets/{infiniteQueryObserver-BnP8vr6V.js → infiniteQueryObserver-fD19WDlu.js} +1 -1
  168. package/dist/client/assets/infra-billing-DeTird2m.js +1 -0
  169. package/dist/client/assets/input-BcdjLg5X.js +17 -0
  170. package/dist/client/assets/input-YsL3Z14x.js +1 -0
  171. package/dist/client/assets/{integration-icon-Bysyldtc.js → integration-icon-CGlpUTQF.js} +1 -1
  172. package/dist/client/assets/{jira-icon-DJANnyLA.js → jira-icon-DpMHb8bf.js} +1 -1
  173. package/dist/client/assets/{label-Cf2Qy475.js → label-9iahSV8V.js} +1 -1
  174. package/dist/client/assets/{layout-CQ47j80U.js → layout-4cUTvlr5.js} +1 -1
  175. package/dist/client/assets/{legacy-agents-deep-BdSVZFZL.js → legacy-agents-deep-CE1ZIf89.js} +1 -1
  176. package/dist/client/assets/{legacy-main-redirect-BaYQkGoI.js → legacy-main-redirect-BOOZ04G2.js} +1 -1
  177. package/dist/client/assets/library-BzLsSIpk.js +1 -0
  178. package/dist/client/assets/{location-BjlyegC2.js → location-V0VwTJTt.js} +1 -1
  179. package/dist/client/assets/{login-BCT_8F_z.js → login-Di_zn9Rr.js} +1 -1
  180. package/dist/client/assets/{markdown-DgDY2QmE.js → markdown-DQgkOB--.js} +3 -3
  181. package/dist/client/assets/{mcp-app-renderer-pDbHkuXF.js → mcp-app-renderer-E0Rb-X88.js} +2 -2
  182. package/dist/client/assets/{mcp-oauth-C_-ZUSLH.js → mcp-oauth-Bvn81zXq.js} +1 -1
  183. package/dist/client/assets/{mcp-oauth-aX1L4mRw.js → mcp-oauth-DQ15yEaL.js} +1 -1
  184. package/dist/client/assets/members-4brJt64W.js +1 -0
  185. package/dist/client/assets/{memory-CWT1ZdIC.js → memory-C7XTx0yg.js} +2 -2
  186. package/dist/client/assets/mini-report-page-Dd9QKBqa.js +1 -0
  187. package/dist/client/assets/mock-board-Ds2_Ixhv.js +81 -0
  188. package/dist/client/assets/{monaco-editor-DDuHJmyY.js → monaco-editor-pm8M8s-N.js} +2 -2
  189. package/dist/client/assets/monitoring-GFsyOhLD.js +1 -0
  190. package/dist/client/assets/monitoring-stats-row-DSg2pS6E.js +1 -0
  191. package/dist/client/assets/multi-select-uR1MVHE3.js +1 -0
  192. package/dist/client/assets/{mustache-DrIjKpei.js → mustache-Kcmg3c_A.js} +1 -1
  193. package/dist/client/assets/{new-project-dialog-DKeFr4C7.js → new-project-dialog-zI2HVFQT.js} +1 -1
  194. package/dist/client/assets/{oauth-callback-B1G7saOE.js → oauth-callback-B-8An67A.js} +1 -1
  195. package/dist/client/assets/{oauth-callback-ai-provider-mNgeHhki.js → oauth-callback-ai-provider-C2GrwmUm.js} +1 -1
  196. package/dist/client/assets/onboarding-C5CJ17Jm.js +1 -0
  197. package/dist/client/assets/openai-conversation-B8Y0DM4W.js +3 -0
  198. package/dist/client/assets/{optimistic-project-sidebar-views-BaDUYmKF.js → optimistic-project-sidebar-views-DbcREcFy.js} +1 -1
  199. package/dist/client/assets/{order-monitor-day-C_yvKTz5.js → order-monitor-day-CkXiopdS.js} +1 -1
  200. package/dist/client/assets/organization-choice-BsHIbX2m.js +1 -0
  201. package/dist/client/assets/{orgs-BEJlYBbK.js → orgs-CYS6Kjbu.js} +1 -1
  202. package/dist/client/assets/{page-seo-form-N1KKSZaU.js → page-seo-form-DiFnoI3j.js} +1 -1
  203. package/dist/client/assets/pair-BVAQv2mv.js +48 -0
  204. package/dist/client/assets/plan-CFOdn8Gq.js +1 -0
  205. package/dist/client/assets/{plan-ladder-CFysCUYy.js → plan-ladder-hFJpqSg5.js} +1 -1
  206. package/dist/client/assets/popover-kKTDdvYS.js +1 -0
  207. package/dist/client/assets/post-calendar-fLDkPFOG.js +1 -0
  208. package/dist/client/assets/post-editor-kAgu7v4k.js +2 -0
  209. package/dist/client/assets/{preview-content-UW33EMCo.js → preview-content-BmpJoYAF.js} +1 -1
  210. package/dist/client/assets/{preview-dialog-DWW9xaMT.js → preview-dialog-1doPIjMd.js} +1 -1
  211. package/dist/client/assets/{preview-panel-C2ZH3x01.js → preview-panel-CD98bDar.js} +1 -1
  212. package/dist/client/assets/preview-tab-CNqKfb-E.js +551 -0
  213. package/dist/client/assets/product-picker-dialog-D5ZR-4jN.js +1 -0
  214. package/dist/client/assets/profile-Bx09OmQG.js +1 -0
  215. package/dist/client/assets/project-app-view-i9ZXlEA5.js +1 -0
  216. package/dist/client/assets/project-apps-DjY-pfpC.js +1 -0
  217. package/dist/client/assets/project-feed-AQtypsNP.js +1 -0
  218. package/dist/client/assets/project-icon-DzYy4wKu.js +1 -0
  219. package/dist/client/assets/project-reports-CkkyEEQq.js +1 -0
  220. package/dist/client/assets/project-tasks-C6uZ3VD_.js +1 -0
  221. package/dist/client/assets/projects-Bl4qWgcF.js +1 -0
  222. package/dist/client/assets/{projects-empty-state-SWDBQkN4.js → projects-empty-state-VSVQUIX3.js} +1 -1
  223. package/dist/client/assets/{prompts-oa8BoX1i.js → prompts-XJP0lHjx.js} +1 -1
  224. package/dist/client/assets/record-editor-DQnsC6va.js +1 -0
  225. package/dist/client/assets/redirect-editor-zBgb8pHu.js +1 -0
  226. package/dist/client/assets/{reports-BsyMPz_z.js → reports-BE9tpjsQ.js} +2 -2
  227. package/dist/client/assets/reports-BkHs6ceB.js +1 -0
  228. package/dist/client/assets/reports-onboarding-djvrypII.js +1 -0
  229. package/dist/client/assets/reports-tab-DTd-sN5F.js +2 -0
  230. package/dist/client/assets/repositories-jscn92Gx.js +1 -0
  231. package/dist/client/assets/repositories-lD386pbK.js +1 -0
  232. package/dist/client/assets/{repository-binding-DpSh0bkT.js → repository-binding-Ctv5jACU.js} +1 -1
  233. package/dist/client/assets/{repository-import-picker-CmGbASze.js → repository-import-picker-DXFAIhGC.js} +1 -1
  234. package/dist/client/assets/{repository-picker-C86kcY-U.js → repository-picker-C-87Ak81.js} +1 -1
  235. package/dist/client/assets/{require-capability-D4dR1lZc.js → require-capability-BOhrH32F.js} +1 -1
  236. package/dist/client/assets/{required-auth-layout-RW5dOh2c.js → required-auth-layout-BOZelCHP.js} +1 -1
  237. package/dist/client/assets/{reset-password-lP2OGZgV.js → reset-password-D_RSIa3W.js} +1 -1
  238. package/dist/client/assets/{resizable-DueLEUEm.js → resizable-CcGplCtq.js} +1 -1
  239. package/dist/client/assets/{resolve-tab-icon-B66mDW53.js → resolve-tab-icon-Dy1gZT8r.js} +1 -1
  240. package/dist/client/assets/review-settings-DJRBjChO.js +1 -0
  241. package/dist/client/assets/roles-IPKUXurs.js +1 -0
  242. package/dist/client/assets/route-CEyEwTNJ.js +1 -0
  243. package/dist/client/assets/route-DYdh0lyb.js +1 -0
  244. package/dist/client/assets/route-DkxQ33qF.js +1 -0
  245. package/dist/client/assets/{sandbox-lifecycle-context-BIf8-4ZY.js → sandbox-lifecycle-context-B_iyl6NM.js} +1 -1
  246. package/dist/client/assets/{schema-BzqS-kNt.js → schema-C9VtMeBM.js} +1 -1
  247. package/dist/client/assets/{schema-Bcb37BRV.js → schema-CIU-vy-M.js} +1 -1
  248. package/dist/client/assets/{scroll-area-CIRLWlOA.js → scroll-area-BgPjdFUv.js} +1 -1
  249. package/dist/client/assets/search-input-6roNTbiB.js +1 -0
  250. package/dist/client/assets/search-toggle-6uVgZqDd.js +1 -0
  251. package/dist/client/assets/{secret-ciphertext-6VBjcV3b.js → secret-ciphertext-DFilJK15.js} +1 -1
  252. package/dist/client/assets/{secret-picker-NhuvO0ke.js → secret-picker-DRod6Suz.js} +1 -1
  253. package/dist/client/assets/secrets-wckAePsp.js +1 -0
  254. package/dist/client/assets/sections-editor-DvRXHJYg.js +4 -0
  255. package/dist/client/assets/{sections-DzoS45qS.js → sections-ogB-svMV.js} +1 -1
  256. package/dist/client/assets/select-DSSug2fd.js +1 -0
  257. package/dist/client/assets/select-model-qiewDWcs.js +1 -0
  258. package/dist/client/assets/seo-editor-BTHpHgYq.js +1 -0
  259. package/dist/client/assets/{separator-5oK4b-Mi.js → separator-RD1Gkb6T.js} +1 -1
  260. package/dist/client/assets/settings-tab-_PnJc2CP.js +1 -0
  261. package/dist/client/assets/sheet-B-tTREXV.js +1 -0
  262. package/dist/client/assets/shell-layout-CCN75UAi.js +1 -0
  263. package/dist/client/assets/site-editor-59L0Aud8.js +1 -0
  264. package/dist/client/assets/{site-editor-toast-CmNIWnCw.js → site-editor-toast-CWvkPJE7.js} +1 -1
  265. package/dist/client/assets/skills-BTCtj4sL.js +1 -0
  266. package/dist/client/assets/slider-axq58KTi.js +1 -0
  267. package/dist/client/assets/{sortable.esm-BuCSUlOk.js → sortable.esm-DUpSK4fM.js} +1 -1
  268. package/dist/client/assets/{sso-DX8PZk1N.js → sso-DIJKG0Gf.js} +1 -1
  269. package/dist/client/assets/{suggestion-DRP05M3-.js → suggestion-Be-l0Vt9.js} +2 -2
  270. package/dist/client/assets/switch-CPLmKtep.js +1 -0
  271. package/dist/client/assets/{symbol-C1zrmwNF.js → symbol-Bevi1KjX.js} +1 -1
  272. package/dist/client/assets/synced-repos-CDGSA9__.js +1 -0
  273. package/dist/client/assets/{tab-icon-glyph-D6mZxF_9.js → tab-icon-glyph-DYfErhsy.js} +1 -1
  274. package/dist/client/assets/{table-CltsOK_0.js → table-B1WNxn6C.js} +1 -1
  275. package/dist/client/assets/tabs-CBoEFGVa.js +1 -0
  276. package/dist/client/assets/task-assignee-avatar-DNUvYoRs.js +1 -0
  277. package/dist/client/assets/{task-board-DUTGhEiC.js → task-board-CDUMGTb-.js} +1 -1
  278. package/dist/client/assets/{task-route-BpmTIbg4.js → task-route-BpUah0sB.js} +1 -1
  279. package/dist/client/assets/{task-status-C72thlpO.js → task-status-Bxq1hmIf.js} +1 -1
  280. package/dist/client/assets/taskboard-analytics-DiMdGRcj.js +1 -0
  281. package/dist/client/assets/tasks-C43XRe6P.js +4 -0
  282. package/dist/client/assets/tasks-D3vb1Iwc.js +1 -0
  283. package/dist/client/assets/textarea-CQ_TkrdE.js +1 -0
  284. package/dist/client/assets/thread-analytics-D_JGJCHX.js +1 -0
  285. package/dist/client/assets/{thread-intent-8kpZLcDE.js → thread-intent-DYNUY6FR.js} +1 -1
  286. package/dist/client/assets/{thread-route-DTbE-Col.js → thread-route-Cr8HKNDQ.js} +1 -1
  287. package/dist/client/assets/thread-route-xZCxiRJg.js +1 -0
  288. package/dist/client/assets/thread-sheet-body-CRJYPU36.js +1 -0
  289. package/dist/client/assets/{time-range-picker-BJ8aJbM7.js → time-range-picker-CsKO958P.js} +1 -1
  290. package/dist/client/assets/toggle-group-CaNHwi3W.js +1 -0
  291. package/dist/client/assets/{tool-namespace-CTeV292R.js → tool-namespace-D8-HQWQE.js} +1 -1
  292. package/dist/client/assets/{toolbar-icon-button-BypH-a8F.js → toolbar-icon-button-pGWMZONn.js} +1 -1
  293. package/dist/client/assets/{tooltip-B6NbTX5P.js → tooltip-7xQKXZXx.js} +1 -1
  294. package/dist/client/assets/{tooltipContext-DNlXAkZZ.js → tooltipContext-BM_DUTQp.js} +1 -1
  295. package/dist/client/assets/{track-B0UUbkCz.js → track-5WqIg6Tn.js} +1 -1
  296. package/dist/client/assets/{types-m1Dsi5sG.js → types-DmsgcF8m.js} +6 -6
  297. package/dist/client/assets/{url-slug-CYvqbzge.js → url-slug-CMhgSj9A.js} +1 -1
  298. package/dist/client/assets/{usage-stats-BH4bqLoE.js → usage-stats-BKxLD2_l.js} +2 -2
  299. package/dist/client/assets/{use-ai-providers-W2Q5vYCk.js → use-ai-providers-Dp4Hkjtx.js} +1 -1
  300. package/dist/client/assets/{use-automations-Q-O37R-p.js → use-automations-J0jLeJwk.js} +1 -1
  301. package/dist/client/assets/{use-autosave-BWJWTtk0.js → use-autosave-DmDY7YGA.js} +1 -1
  302. package/dist/client/assets/{use-chat-layout-state-C-XHZ0Dd.js → use-chat-layout-state-DeeoSPAs.js} +1 -1
  303. package/dist/client/assets/{use-clock-tick-xpCK7CUB.js → use-clock-tick-C6h2MMIi.js} +1 -1
  304. package/dist/client/assets/use-connect-companion-hQGadPnV.js +1 -0
  305. package/dist/client/assets/{use-connection-Cqf7M1G6.js → use-connection-mXOC3Xuo.js} +1 -1
  306. package/dist/client/assets/{use-content-sync-D6XyiV7H.js → use-content-sync-mkwV3WFd.js} +1 -1
  307. package/dist/client/assets/{use-copy-Dkgb0DtI.js → use-copy-D9a2GtFe.js} +1 -1
  308. package/dist/client/assets/{use-create-virtual-mcp-BZx-8s-I.js → use-create-virtual-mcp-DtlfKOSb.js} +1 -1
  309. package/dist/client/assets/{use-date-fns-locale-B1aPt2Gv.js → use-date-fns-locale-Dv1VJI3I.js} +1 -1
  310. package/dist/client/assets/{use-debounced-autosave-Qji0VG0D.js → use-debounced-autosave-BZlwz5E9.js} +1 -1
  311. package/dist/client/assets/{use-debounced-value-vhgvmVq4.js → use-debounced-value-DJVnkGFg.js} +1 -1
  312. package/dist/client/assets/{use-deco-credits-k0aTLB-T.js → use-deco-credits-BCAKdpOu.js} +1 -1
  313. package/dist/client/assets/{use-decopilot-events-Czwn8ZVj.js → use-decopilot-events-DYkAp_m7.js} +1 -1
  314. package/dist/client/assets/use-delete-connection-C00H7ulN.js +1 -0
  315. package/dist/client/assets/{use-deployment-admin-BrGfiqwj.js → use-deployment-admin-ByxIcPI9.js} +1 -1
  316. package/dist/client/assets/{use-fast-preview-draft-url-oDwhtnfP.js → use-fast-preview-draft-url-apL5qVv1.js} +1 -1
  317. package/dist/client/assets/{use-file-configs-BIHMmAjW.js → use-file-configs-DJCoczIU.js} +1 -1
  318. package/dist/client/assets/{use-inbox-feed-SkFacTLx.js → use-inbox-feed-CgTcDvrj.js} +1 -1
  319. package/dist/client/assets/{use-infinite-scroll-B9sczgXI.js → use-infinite-scroll-AsnNIlBn.js} +1 -1
  320. package/dist/client/assets/{use-join-requests-DALj-BO-.js → use-join-requests-BJCQZeJg.js} +1 -1
  321. package/dist/client/assets/{use-main-panel-tabs-Cv3Ydqwx.js → use-main-panel-tabs-CwksoiNK.js} +1 -1
  322. package/dist/client/assets/{use-main-schema-v8-Jzc_7tOC.js → use-main-schema-v8-Cys0il1A.js} +1 -1
  323. package/dist/client/assets/{use-mcp-auth-status-BKawZyTw.js → use-mcp-auth-status-mE5X1aBV.js} +1 -1
  324. package/dist/client/assets/use-mcp-client-CvE7itXw.js +10 -0
  325. package/dist/client/assets/{use-mcp-prompts-D1rnFTSb.js → use-mcp-prompts-B71f8Oap.js} +1 -1
  326. package/dist/client/assets/{use-mcp-tools-CPGj7A6a.js → use-mcp-tools-DT06t5rX.js} +1 -1
  327. package/dist/client/assets/{use-members-D-L919KG.js → use-members-CAjyx4dy.js} +1 -1
  328. package/dist/client/assets/{use-mobile-CSFJ-mhK.js → use-mobile-D6Ou0NEP.js} +1 -1
  329. package/dist/client/assets/{use-navigate-to-agent-B-QlLf3R.js → use-navigate-to-agent-DqPVTZYN.js} +1 -1
  330. package/dist/client/assets/{use-open-billing-url-DWsw6Alp.js → use-open-billing-url-NfOqGe8U.js} +1 -1
  331. package/dist/client/assets/{use-org-auth-client-Co_fa5Pp.js → use-org-auth-client-D54JUqPS.js} +1 -1
  332. package/dist/client/assets/{use-org-fs-CAwgni1d.js → use-org-fs-CnHNkGa0.js} +1 -1
  333. package/dist/client/assets/{use-org-repo-syncs-Cxt6puu1.js → use-org-repo-syncs-B-iMqLC4.js} +1 -1
  334. package/dist/client/assets/{use-org-sso-BhMczCH6.js → use-org-sso-CWjER8s_.js} +1 -1
  335. package/dist/client/assets/{use-organization-roles-DZJHfOlV.js → use-organization-roles-BaFyhF9z.js} +1 -1
  336. package/dist/client/assets/{use-organization-settings-BtOReG0H.js → use-organization-settings-B4xXaxr4.js} +1 -1
  337. package/dist/client/assets/use-panel-navigate-CwRBX20z.js +1 -0
  338. package/dist/client/assets/{use-project-native-view-presence-D4pR1T7b.js → use-project-native-view-presence-fFpbo52Y.js} +1 -1
  339. package/dist/client/assets/{use-project-scope-Dn4doId4.js → use-project-scope-CwXHOags.js} +1 -1
  340. package/dist/client/assets/use-recent-apps-Bm3Mq1hd.js +1 -0
  341. package/dist/client/assets/{use-releases-DoIKvYCz.js → use-releases-COy4R50l.js} +1 -1
  342. package/dist/client/assets/{use-reports-diagnostic-COAemppC.js → use-reports-diagnostic-Bf7x0h8K.js} +1 -1
  343. package/dist/client/assets/{use-secrets-CA-kSu-4.js → use-secrets-Db7kDjN7.js} +1 -1
  344. package/dist/client/assets/use-section-preview-base-yuSGDzoI.js +1 -0
  345. package/dist/client/assets/use-sidebar-collapsed-2XEtdu2i.js +1 -0
  346. package/dist/client/assets/{use-tags-CUZ9CIka.js → use-tags-BPUktrrg.js} +1 -1
  347. package/dist/client/assets/{use-task-board-analytics-34pQYq8w.js → use-task-board-analytics-Dt--SO4K.js} +1 -1
  348. package/dist/client/assets/{use-task-board-events-CmYlpSMI.js → use-task-board-events-DHmzNQpi.js} +1 -1
  349. package/dist/client/assets/{use-task-board-item-prs-Cu4afbvW.js → use-task-board-item-prs-DpiWhUD6.js} +1 -1
  350. package/dist/client/assets/{use-task-metadata-C0A64pXU.js → use-task-metadata-DJlGx95B.js} +1 -1
  351. package/dist/client/assets/{use-thread-analytics-DXbq3gl0.js → use-thread-analytics-RjdStU-G.js} +1 -1
  352. package/dist/client/assets/{use-thread-outputs-BUN4R0HD.js → use-thread-outputs-hOt5_FqT.js} +1 -1
  353. package/dist/client/assets/useInfiniteQuery-DLjfiCcz.js +1 -0
  354. package/dist/client/assets/{useQueries-DNx9dZks.js → useQueries-CTk9HeNu.js} +1 -1
  355. package/dist/client/assets/useSuspenseInfiniteQuery-DJIJLbRA.js +1 -0
  356. package/dist/client/assets/users-DSisYmgQ.js +1 -0
  357. package/dist/client/assets/{utils-D-52h1Lf.js → utils-BtlQk18r.js} +1 -1
  358. package/dist/client/assets/variant-calendar-DM6JVe9j.js +1 -0
  359. package/dist/client/assets/{variant-draft-pointer-BY7yWri4.js → variant-draft-pointer-DGsbM6lw.js} +1 -1
  360. package/dist/client/assets/{virtual-mcp-CPoLjKOt.js → virtual-mcp-C-TlHAqf.js} +1 -1
  361. package/dist/client/assets/{watch-sse-pool-C7xRCtu5.js → watch-sse-pool-wUe9D5Rq.js} +1 -1
  362. package/dist/client/index.html +2 -2
  363. package/dist/server/server.js +484 -484
  364. package/package.json +1 -1
  365. package/dist/client/assets/Tool01-Bp-TbrXi.js +0 -1
  366. package/dist/client/assets/add-connection-dialog-DwDvS8Uw.js +0 -1
  367. package/dist/client/assets/agent-analytics-bhSR3DTp.js +0 -2
  368. package/dist/client/assets/agent-app-D3AENVQT.js +0 -1
  369. package/dist/client/assets/agent-assets-BwCvdqkQ.js +0 -1
  370. package/dist/client/assets/agent-automation-BB_6G_CX.js +0 -20
  371. package/dist/client/assets/agent-automations-1AEGAcHU.js +0 -1
  372. package/dist/client/assets/agent-connect-sources-Dh_ELrva.js +0 -1
  373. package/dist/client/assets/agent-deck-Cd8T_xPW.js +0 -1
  374. package/dist/client/assets/agent-e2e-Bz8yllNo.js +0 -1
  375. package/dist/client/assets/agent-experiments-BmvDtQNl.js +0 -1
  376. package/dist/client/assets/agent-file-BoVEwoJD.js +0 -1
  377. package/dist/client/assets/agent-hosting-DtDQtjNQ.js +0 -1
  378. package/dist/client/assets/agent-icon-D6wS7rd0.js +0 -1
  379. package/dist/client/assets/agent-library-BeoJetpR.js +0 -1
  380. package/dist/client/assets/agent-library-file-DCYJT22p.js +0 -1
  381. package/dist/client/assets/agent-monitor-DduGwwal.js +0 -1
  382. package/dist/client/assets/agent-overview-Bj_gDP1X.js +0 -1
  383. package/dist/client/assets/agent-releases-CAjd1_1N.js +0 -2
  384. package/dist/client/assets/agent-settings-CnK9fsFs.js +0 -1
  385. package/dist/client/assets/agent-site-editor-code-C20F9ay-.js +0 -2
  386. package/dist/client/assets/agent-site-editor-content-ChnnFjhK.js +0 -1
  387. package/dist/client/assets/agent-site-editor-preview-BxDD-Aar.js +0 -1
  388. package/dist/client/assets/agent-view-3YMZSj3x.js +0 -1
  389. package/dist/client/assets/agents-list-ZmW8mXyl.js +0 -1
  390. package/dist/client/assets/ai-providers-CJqDCuAR.js +0 -6
  391. package/dist/client/assets/alert-PPdejvI2.js +0 -1
  392. package/dist/client/assets/alert-dialog-ygFmYcOa.js +0 -7
  393. package/dist/client/assets/analytics-sections-CveDF2n6.js +0 -1
  394. package/dist/client/assets/api-keys-BRV_KE0D.js +0 -1
  395. package/dist/client/assets/api-keys-CbBz_rxa.js +0 -1
  396. package/dist/client/assets/app-editor-Cio5Pq66.js +0 -1
  397. package/dist/client/assets/auth-entry-Dz_b1brR.js +0 -1
  398. package/dist/client/assets/automation-list-row-C69hu-tr.js +0 -1
  399. package/dist/client/assets/automation-runs-CefmsDTb.js +0 -1
  400. package/dist/client/assets/automations-C6R9dV-_.js +0 -1
  401. package/dist/client/assets/avatar-LfY3dprD.js +0 -1
  402. package/dist/client/assets/badge-CyDHDRPg.js +0 -1
  403. package/dist/client/assets/block-document-Di6OpT4O.js +0 -3
  404. package/dist/client/assets/blocks-tab-states-BjRnBrj4.js +0 -20
  405. package/dist/client/assets/blog-schema-C2heOfy2.js +0 -1
  406. package/dist/client/assets/board-analytics-fCGfPXJ7.js +0 -1
  407. package/dist/client/assets/buckets-j1BXX0Sb.js +0 -1
  408. package/dist/client/assets/category-editor-D_K2FWTB.js +0 -1
  409. package/dist/client/assets/checkbox-CaUezNgL.js +0 -1
  410. package/dist/client/assets/choose-editor-CDMfdVL-.js +0 -1
  411. package/dist/client/assets/cms-settings-editor-C_3APl39.js +0 -1
  412. package/dist/client/assets/collection-detail-BXabjop0.js +0 -1
  413. package/dist/client/assets/collection-display-button-Cdfgosxf.js +0 -1
  414. package/dist/client/assets/collection-table-wrapper-CWGTaBjx.js +0 -1
  415. package/dist/client/assets/collection-tabs-yg6VVFu9.js +0 -1
  416. package/dist/client/assets/combobox-B5xPQiKP.js +0 -1
  417. package/dist/client/assets/command-KXg0ZuU-.js +0 -1
  418. package/dist/client/assets/companion-mcps-section-Da_S5Z-R.js +0 -1
  419. package/dist/client/assets/config-UdFHLZs6.js +0 -1
  420. package/dist/client/assets/connect-CsG4Vqc-.js +0 -9
  421. package/dist/client/assets/connect-layout-DE_So4kH.js +0 -1
  422. package/dist/client/assets/connection-detail-lT3XwVgT.js +0 -1
  423. package/dist/client/assets/connection-form-helpers-DAFP702a.js +0 -1
  424. package/dist/client/assets/connections-Chwm450B.js +0 -1
  425. package/dist/client/assets/content-tab-DYpKep2J.js +0 -22
  426. package/dist/client/assets/context-Bfj5rpO_.js +0 -1
  427. package/dist/client/assets/context-shell-CUCiFtf6.js +0 -30
  428. package/dist/client/assets/discover-BqgmKYIf.js +0 -1
  429. package/dist/client/assets/editor-classes-BAKuqcj0.js +0 -1
  430. package/dist/client/assets/empty-state-lzzC-d42.js +0 -1
  431. package/dist/client/assets/file-explorer-CcePNy3q.js +0 -2
  432. package/dist/client/assets/file-preview-DFkUyLsr.js +0 -1
  433. package/dist/client/assets/file-share-button-CQ2Uf2PU.js +0 -3
  434. package/dist/client/assets/flat-project-B3HLdqxT.js +0 -1
  435. package/dist/client/assets/folder-icon-DaIPH_Nm.js +0 -2
  436. package/dist/client/assets/general-D2dbnN_J.js +0 -1
  437. package/dist/client/assets/get-initials-D-f_fDFw.js +0 -1
  438. package/dist/client/assets/home-CvMudobI.js +0 -1
  439. package/dist/client/assets/index-BdR6LNyh.js +0 -1
  440. package/dist/client/assets/index-ChfkzyhC.js +0 -81
  441. package/dist/client/assets/index-DAYXa7zL.js +0 -2
  442. package/dist/client/assets/index-DZLfyA8t.js +0 -4
  443. package/dist/client/assets/index-JvhyBpMR.js +0 -4
  444. package/dist/client/assets/index-mh7U_AKI.js +0 -1
  445. package/dist/client/assets/index-pFm7t22i.css +0 -1
  446. package/dist/client/assets/index-wkvFsHpn.js +0 -5
  447. package/dist/client/assets/infra-billing-BeLfFWAD.js +0 -1
  448. package/dist/client/assets/input-Brhdhig1.js +0 -17
  449. package/dist/client/assets/input-Bu2Qzwzh.js +0 -1
  450. package/dist/client/assets/library-DTps1LzJ.js +0 -1
  451. package/dist/client/assets/library-tab-C2aU1qmT.js +0 -168
  452. package/dist/client/assets/members-DNkbLBWU.js +0 -1
  453. package/dist/client/assets/mini-report-page-aWQFmVFz.js +0 -1
  454. package/dist/client/assets/mock-board-DWNU2n2-.js +0 -1
  455. package/dist/client/assets/monitoring-Cvbt9Za_.js +0 -1
  456. package/dist/client/assets/monitoring-stats-row-DyiPtUKv.js +0 -1
  457. package/dist/client/assets/multi-select-CfDYfsZ-.js +0 -1
  458. package/dist/client/assets/onboarding-kCa3Jkpy.js +0 -1
  459. package/dist/client/assets/openai-conversation-CLgg2Qod.js +0 -3
  460. package/dist/client/assets/organization-choice-BpI-_S8p.js +0 -1
  461. package/dist/client/assets/pair-ByV0vAAs.js +0 -48
  462. package/dist/client/assets/plan-BtuC_TCe.js +0 -1
  463. package/dist/client/assets/popover-CjfUWaC0.js +0 -1
  464. package/dist/client/assets/post-calendar-Bk6dx49G.js +0 -1
  465. package/dist/client/assets/post-editor-BUlsS3rc.js +0 -2
  466. package/dist/client/assets/preview-tab-DsWFy6nY.js +0 -551
  467. package/dist/client/assets/product-picker-dialog-ERcYwJUp.js +0 -1
  468. package/dist/client/assets/profile-BxA_I2_7.js +0 -1
  469. package/dist/client/assets/project-app-view-D-3K5nUJ.js +0 -1
  470. package/dist/client/assets/project-apps-D50B5nYg.js +0 -1
  471. package/dist/client/assets/project-feed-zQus1O7R.js +0 -1
  472. package/dist/client/assets/project-icon-ChTT5o1a.js +0 -1
  473. package/dist/client/assets/project-reports-B3JoeeH6.js +0 -1
  474. package/dist/client/assets/project-tasks-UglBCJxC.js +0 -1
  475. package/dist/client/assets/projects-CKCvSpxg.js +0 -1
  476. package/dist/client/assets/record-editor-C4fMBCCz.js +0 -1
  477. package/dist/client/assets/redirect-editor-vQorNOA7.js +0 -1
  478. package/dist/client/assets/reports-BTilnVW5.js +0 -1
  479. package/dist/client/assets/reports-onboarding-PNNHl11L.js +0 -1
  480. package/dist/client/assets/reports-tab-DA_8UL9O.js +0 -2
  481. package/dist/client/assets/repositories-BNK48Uq5.js +0 -1
  482. package/dist/client/assets/repositories-BpTNBXai.js +0 -1
  483. package/dist/client/assets/review-settings-JhWFefH3.js +0 -1
  484. package/dist/client/assets/roles-CT2aKtzc.js +0 -1
  485. package/dist/client/assets/route-C6Ybfjjx.js +0 -1
  486. package/dist/client/assets/route-CQTsC5_0.js +0 -1
  487. package/dist/client/assets/route-K-xr6t6Y.js +0 -1
  488. package/dist/client/assets/search-input-Br9i_Ft5.js +0 -1
  489. package/dist/client/assets/search-toggle-Dj92h38-.js +0 -1
  490. package/dist/client/assets/secrets-D4GRsD5W.js +0 -1
  491. package/dist/client/assets/sections-editor-C_iMM594.js +0 -4
  492. package/dist/client/assets/select-ChqJI0MI.js +0 -1
  493. package/dist/client/assets/select-model-CzvrFpf6.js +0 -1
  494. package/dist/client/assets/seo-editor-DUiWy8Gm.js +0 -1
  495. package/dist/client/assets/settings-tab-C1pr-l9r.js +0 -1
  496. package/dist/client/assets/sheet-CzJFx6b-.js +0 -1
  497. package/dist/client/assets/shell-layout-DKGS0yWx.js +0 -1
  498. package/dist/client/assets/site-editor-Bl1xnqtg.js +0 -1
  499. package/dist/client/assets/skills-DEb_PUzK.js +0 -1
  500. package/dist/client/assets/slider-BBmtNfbs.js +0 -1
  501. package/dist/client/assets/switch-CJc_fIEE.js +0 -1
  502. package/dist/client/assets/synced-repos-GT8waIWj.js +0 -1
  503. package/dist/client/assets/tabs-D0oiuUhC.js +0 -1
  504. package/dist/client/assets/task-assignee-avatar-BfUNDI59.js +0 -1
  505. package/dist/client/assets/taskboard-analytics-DG4Zz1H_.js +0 -1
  506. package/dist/client/assets/tasks-Cf4EZXG5.js +0 -4
  507. package/dist/client/assets/tasks-D-91kNhg.js +0 -1
  508. package/dist/client/assets/textarea-CWgoXXnV.js +0 -1
  509. package/dist/client/assets/thread-analytics-BjWUFe-q.js +0 -1
  510. package/dist/client/assets/thread-route-B_SMytnm.js +0 -1
  511. package/dist/client/assets/thread-sheet-body-OnJZloqZ.js +0 -1
  512. package/dist/client/assets/toggle-group-BWQRN38D.js +0 -1
  513. package/dist/client/assets/use-connect-companion-DJ8vj1p7.js +0 -1
  514. package/dist/client/assets/use-delete-connection-DbRA1FXb.js +0 -1
  515. package/dist/client/assets/use-ensure-project-folder-BvOs3JKp.js +0 -1
  516. package/dist/client/assets/use-mcp-client-CAdgJ_QT.js +0 -10
  517. package/dist/client/assets/use-panel-navigate-BwwjvhNB.js +0 -1
  518. package/dist/client/assets/use-recent-apps-B_BFFpi_.js +0 -1
  519. package/dist/client/assets/use-section-preview-base-DAksxTnD.js +0 -1
  520. package/dist/client/assets/use-sidebar-collapsed-Dv10z2iu.js +0 -1
  521. package/dist/client/assets/useInfiniteQuery-Bo5dbMM_.js +0 -1
  522. package/dist/client/assets/useSuspenseInfiniteQuery-CcFcpWuM.js +0 -1
  523. package/dist/client/assets/users-DWxowv8y.js +0 -1
  524. package/dist/client/assets/variant-calendar-BQESjgmt.js +0 -1
  525. package/dist/client/assets/view-mode-toggle-Bgum-rnB.js +0 -1
@@ -1,3 +0,0 @@
1
- import{f as J,g as B}from"./input-Brhdhig1.js";import{aF as A,aG as _,d1 as C,aY as U,bV as W}from"./index-DEQvnIsm.js";import"./usage-stats-BH4bqLoE.js";import"./tool-namespace-CTeV292R.js";import"./form-DNjk4sZI.js";import"./label-Cf2Qy475.js";import"./utils-CVEq3hMx.js";import"./markdown-DgDY2QmE.js";import"./use-copy-Dkgb0DtI.js";import"./Copy01-EWitDFCf.js";import"./ZoomOut-B3s5275g.js";import"./location-BjlyegC2.js";import"./use-mobile-CSFJ-mhK.js";import"./use-panel-navigate-BwwjvhNB.js";import"./thread-route-DTbE-Col.js";import"./use-project-scope-Dn4doId4.js";import"./repository-binding-DpSh0bkT.js";import"./use-mcp-client-CAdgJ_QT.js";import"./auth-BVkTFTOt.js";import"./tooltip-B6NbTX5P.js";import"./index-BaQyqQF-.js";import"./agent-icon-D6wS7rd0.js";import"./AlertCircle-Q16nTVAa.js";import"./Tool01-Bp-TbrXi.js";import"./ArrowUp--4P0C-xl.js";import"./ArrowLeft-C_dTX_8N.js";import"./LinkBroken01-DmmKNgpp.js";import"./ShoppingBag01-B7gta_qY.js";import"./Building02-Gub-pr-8.js";import"./CheckCircle-CQxu_pm9.js";import"./ChevronUp-DK-Gvyk8.js";import"./ChevronSelectorVertical-GBLm8Zpl.js";import"./UserSquare-cdWcOBLL.js";import"./CreditCard01-wx_z4Iiz.js";import"./DotsVertical-DIT5hu2b.js";import"./Image01-BfGAREA7.js";import"./Globe04-B45_cBRN.js";import"./SwitchHorizontal01-BJyDDPw9.js";import"./Key01-BV7tzZs6.js";import"./Link01-9civFIb9.js";import"./Monitor01-BoSs_8gg.js";import"./Sun-BfjJa3ru.js";import"./Play-CleWZLOG.js";import"./Plus-DQf-jm_3.js";import"./SearchMd-D0zp0uee.js";import"./Trash01-Dlk_Sh-H.js";import"./Upload01-DlF9Jqso.js";import"./User01-BcekHhAV.js";import"./Users01-BIP-PxGt.js";import"./XClose-L_GNViCD.js";import"./format-time-Cq80KKvY.js";import"./differenceInSeconds-C3x8sHUj.js";import"./use-decopilot-events-Czwn8ZVj.js";import"./thread-intent-8kpZLcDE.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-C7xRCtu5.js";import"./task-board-DUTGhEiC.js";import"./schema-BzqS-kNt.js";import"./slugify-CEUa2lfQ.js";import"./chat-context-Dv2E4fnf.js";import"./autosend-CL2OZPvg.js";import"./use-ai-providers-W2Q5vYCk.js";import"./use-organization-settings-BtOReG0H.js";import"./icon-button-WP5IJTs8.js";import"./file-type-icon-HF5UcaS2.js";import"./shell-layout-DKGS0yWx.js";import"./avatar-LfY3dprD.js";import"./use-clock-tick-xpCK7CUB.js";import"./command-KXg0ZuU-.js";import"./index-B9qNCJbx.js";import"./integration-icon-Bysyldtc.js";import"./project-icon-ChTT5o1a.js";import"./new-project-dialog-DKeFr4C7.js";import"./repository-import-picker-CmGbASze.js";import"./use-navigate-to-agent-B-QlLf3R.js";import"./repository-picker-C86kcY-U.js";import"./useInfiniteQuery-Bo5dbMM_.js";import"./infiniteQueryObserver-BnP8vr6V.js";import"./collection-search-Dcze6ySb.js";import"./use-debounced-value-vhgvmVq4.js";import"./required-auth-layout-RW5dOh2c.js";import"./use-org-sso-BhMczCH6.js";import"./chat-draft-X1dGJc2x.js";import"./select-ChqJI0MI.js";import"./index-BdQq_4o_.js";import"./tabs-D0oiuUhC.js";import"./use-deco-credits-k0aTLB-T.js";import"./toggle-group-BWQRN38D.js";import"./use-open-billing-url-DWsw6Alp.js";import"./index-DZLfyA8t.js";import"./checkbox-CaUezNgL.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-CjfUWaC0.js";import"./drawer-DL0G-oy-.js";import"./input-Bu2Qzwzh.js";import"./suggestion-DRP05M3-.js";import"./use-mcp-prompts-D1rnFTSb.js";import"./use-org-fs-CAwgni1d.js";import"./question-004-sINsf4GQ.js";import"./use-members-D-L919KG.js";import"./use-org-auth-client-Co_fa5Pp.js";import"./feature-paywall-BSXK-EmV.js";import"./plan-ladder-CFysCUYy.js";import"./add-connection-dialog-DwDvS8Uw.js";import"./extract-connection-data-BlmKelwb.js";import"./metadata-D72DunRR.js";import"./connection-CEK3iDim.js";import"./url-slug-CYvqbzge.js";import"./connection-card-Zhg6xn7V.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-CWgoXXnV.js";import"./use-connection-Cqf7M1G6.js";import"./schema-Bcb37BRV.js";import"./connection-form-helpers-DAFP702a.js";import"./authenticate-and-persist-oauth-POYqGagt.js";import"./mcp-oauth-C_-ZUSLH.js";import"./mcp-oauth-aX1L4mRw.js";import"./collection-tabs-yg6VVFu9.js";import"./badge-CyDHDRPg.js";import"./use-infinite-scroll-B9sczgXI.js";import"./useSuspenseInfiniteQuery-CcFcpWuM.js";import"./use-task-board-events-CmYlpSMI.js";import"./use-chat-layout-state-C-XHZ0Dd.js";class X{constructor(t,n=4e3){this.onDisconnect=t,this.graceMs=n}onDisconnect;graceMs;timer;report(t){if(t==="connected"){clearTimeout(this.timer),this.timer=void 0;return}if(t==="failed"||t==="closed"){clearTimeout(this.timer),this.timer=void 0,this.onDisconnect();return}t==="disconnected"&&!this.timer&&(this.timer=setTimeout(this.onDisconnect,this.graceMs))}dispose(){clearTimeout(this.timer),this.timer=void 0}}const F=A({type:W(["session.input_transcript.delta","session.output_transcript.delta"]),event_id:_(),delta:_(),start_ms:U().nonnegative(),end_ms:U().nonnegative()}),H=A({type:C("session.delegation.created"),offset_ms:U().nonnegative(),delegation:A({id:_(),target:C("client")})});class Y{constructor(t,n){this.send=t,this.callbacks=n}send;callbacks;closed=!1;fragments=[];seen=new Set;delegated=new Set;consumed=new Set;pending=new Map;contexts=new Map;awaitingContext=new Map;receive(t,n=Date.now()){if(this.closed)return;const r=F.safeParse(t);if(r.success){const e=r.data;if(this.seen.has(e.event_id))return;this.seen.add(e.event_id);const s=e.type==="session.input_transcript.delta"?"user":"agent";if(this.fragments.push({role:s,text:e.delta,start:e.start_ms,end:e.end_ms,arrivedAt:n,id:e.event_id}),this.fragments.sort((o,i)=>o.start-i.start),this.fragments.length>4e3){this.callbacks.onError();return}this.callbacks.onMessage({role:s,message:e.delta,event_id:e.event_id});return}const a=H.safeParse(t);if(a.success){const{id:e}=a.data.delegation;if(this.delegated.has(e)||this.pending.has(e))return;if(this.delegated.size+this.pending.size>=40){this.callbacks.onError();return}this.pending.set(e,{offset:a.data.offset_ms,receivedAt:n});return}const m=A({type:C("session.thinking.appended"),client_event_id:_()}).safeParse(t);if(m.success){const e=m.data.client_event_id,s=this.awaitingContext.get(e);this.awaitingContext.delete(e),s&&(s.remaining.delete(e),s.remaining.size===0&&this.send({type:"session.commentary.append",event_id:crypto.randomUUID(),delegation_id:s.delegationId??null,content:"Studio has supplied the complete background result as context for this request. Briefly explain that result, including any failure or required approval. Acceptance or task creation alone does not mean the work completed."}));return}const p=A({type:_()}).safeParse(t);p.success&&p.data.type==="error"&&this.callbacks.onError()}tick(t=Date.now()){if(!this.closed)for(const[n,r]of this.pending){const a=this.fragments.filter(o=>o.start<r.offset),m=a.reduce((o,i)=>i.role==="user"?Math.max(o,i.arrivedAt):o,r.receivedAt);if(t-m<500)continue;const p=a.filter(o=>o.role==="user"&&!this.consumed.has(o.id));if(!p.length&&t-r.receivedAt<3e3)continue;if(this.pending.delete(n),this.delegated.add(n),!p.length){this.publishUpdate({delivery:"announce",delegationId:n,text:"No new transcribed request is available. No work was started. Ask the user to repeat the request."});continue}const e=p.map(o=>o.text).join("").trim(),s=[];for(const o of a){if(p.includes(o))continue;const i=s.at(-1);i?.role===o.role?i.text+=o.text:s.push({role:o.role,text:o.text})}if(e.length>J){this.publishUpdate({delivery:"announce",delegationId:n,text:"The spoken request is too long. No work was started. Ask the user to shorten it or continue in text."});continue}for(const o of p)this.consumed.add(o.id);this.callbacks.onDelegate({request:e,delegationId:n,transcript:B(s.map(({role:o,text:i})=>({role:o,text:i.trim()})).filter(({text:o})=>o))}).then(o=>{this.closed||this.publishUpdate({delivery:o.status==="rejected"?"announce":"context",delegationId:n,text:JSON.stringify(o)})}).catch(()=>{this.publishUpdate({delivery:"announce",delegationId:n,text:"Studio could not accept this request. Do not claim work started."})})}}publishUpdate(t){if(this.closed)return;if(t.contextId){if(this.contexts.get(t.contextId)===t.text)return;this.contexts.set(t.contextId,t.text)}const r=(t.contextId?`Updated ${t.contextId} data, superseding earlier values:
2
- `:`Studio result data:
3
- `)+t.text,a=new TextEncoder,m=t.delivery==="announce"&&a.encode(r).length>480,p={remaining:new Set,delegationId:t.delegationId};let e="",s=0;const o=()=>{if(!e)return;const i=crypto.randomUUID();m&&(p.remaining.add(i),this.awaitingContext.set(i,p)),this.send({type:t.delivery==="announce"&&!m?"session.commentary.append":"session.thinking.append",event_id:i,delegation_id:t.delegationId??null,content:e}),e="",s=0};for(const i of r){const v=a.encode(i).length;s+v>480&&o(),e+=i,s+=v}o()}close(){this.closed=!0,this.pending.clear(),this.awaitingContext.clear()}}async function uo(E,t,n){n.throwIfAborted();const r=new RTCPeerConnection,a=r.createDataChannel("oai-events"),m=document.createElement("audio");m.autoplay=!0;let p,e,s,o,i=!1,v=!1,h,O,L=0,P=0,g,w,y=!1;const I=Promise.withResolvers(),x=Promise.withResolvers();x.promise.catch(()=>{});const b=new Y(d=>{!i&&a.readyState==="open"&&a.send(JSON.stringify(d))},t),q=new X(()=>{i||t.onDisconnect()}),M=async()=>{if(!i){i=!0,q.dispose(),b.close(),clearInterval(O),n.removeEventListener("abort",T),a.close(),r.close();for(const d of p?.getTracks()??[])d.stop();m.pause(),m.srcObject=null,e&&e.state!=="closed"&&await e.close().catch(()=>{})}},T=()=>{M()};n.addEventListener("abort",T,{once:!0});const u=AbortSignal.any([n,AbortSignal.timeout(3e4)]),j=x.promise,z=()=>x.reject(u.reason);u.addEventListener("abort",z,{once:!0}),j.catch(()=>{}),a.onmessage=({data:d})=>{if(!(i||typeof d!="string"))try{const l=JSON.parse(d);typeof l=="object"&&l!==null&&"type"in l&&(l.type==="session.started"&&(v=!0,x.resolve()),l.type==="session.closed"&&(I.resolve(),h||t.onDisconnect())),h||b.receive(l)}catch{t.onError()}},a.onclose=()=>{x.reject(new Error("Voice connection closed")),I.resolve(),!i&&!h&&t.onDisconnect()},r.onconnectionstatechange=()=>{i||q.report(r.connectionState)},r.ontrack=({streams:d,track:l})=>{if(i)return;const D=d[0]??new MediaStream([l]);m.srcObject=D,e??=new AudioContext,s=e.createAnalyser(),s.fftSize=256,o=new Uint8Array(s.fftSize),e.createMediaStreamSource(D).connect(s),e.resume().catch(()=>t.onError()),m.play().catch(()=>t.onError())};function N(){if(!s||!o||i)return 0;s.getByteTimeDomainData(o);let d=0;for(const l of o)d+=((l-128)/128)**2;return Math.min(1,Math.sqrt(d/o.length)*4)}try{const d=navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}).then(c=>{if(i||u.aborted){for(const f of c.getTracks())f.stop();throw new DOMException("Voice connection cancelled","AbortError")}return p=c,c}),l=await Promise.race([d,new Promise((c,f)=>u.addEventListener("abort",()=>f(u.reason),{once:!0}))]);e??=new AudioContext,g=e.createAnalyser(),g.fftSize=256,w=new Uint8Array(g.fftSize),e.createMediaStreamSource(l).connect(g),await e.resume();for(const c of l.getAudioTracks())r.addTrack(c,l);const D=await r.createOffer();await r.setLocalDescription(D),u.throwIfAborted(),r.iceGatheringState!=="complete"&&await new Promise((c,f)=>{const S=()=>{r.iceGatheringState==="complete"&&(G(),c())},k=()=>{G(),f(u.reason)},G=()=>{r.removeEventListener("icegatheringstatechange",S),u.removeEventListener("abort",k)};r.addEventListener("icegatheringstatechange",S),u.addEventListener("abort",k,{once:!0}),S(),u.aborted&&k()});const V=r.localDescription?.sdp;if(!V)throw new Error("Missing voice offer");const R=await E(V,u);return await r.setRemoteDescription({type:"answer",sdp:R.sdp}),await j,n.throwIfAborted(),u.removeEventListener("abort",z),n.removeEventListener("abort",T),t.onConnect(),O=setInterval(()=>{if(i||h)return;if(b.tick(),g&&w&&!y){g.getByteTimeDomainData(w);const f=w.reduce((S,k)=>S+((k-128)/128)**2,0)/w.length;Math.sqrt(f)>.025&&(P=Date.now())}t.onUserSpeaking(!y&&Date.now()-P<400),N()>.02&&(L=Date.now()),t.onModeChange({mode:Date.now()-L<400?"speaking":"listening"})},100),{endSession:()=>(h??=(async()=>{b.close();for(const c of p?.getTracks()??[])c.stop();if(m.pause(),v&&a.readyState==="open"){a.send(JSON.stringify({type:"session.close"}));let c;await Promise.race([I.promise,new Promise(f=>{c=setTimeout(f,3e3)})]),clearTimeout(c)}await M()})(),h),publishUpdate:c=>b.publishUpdate(c),setMicMuted:c=>{y=c;for(const f of p?.getAudioTracks()??[])f.enabled=!y;y&&t.onUserSpeaking(!1)},getOutputVolume:N}}catch(d){throw await M(),d}}export{uo as startOpenAIConversation};
@@ -1 +0,0 @@
1
- import{c as G,r as H,e as A,j as s,B as L,h as B}from"./index-DEQvnIsm.js";import{A as I}from"./avatar-LfY3dprD.js";import{s as K}from"./Plus-DQf-jm_3.js";async function T(i,e,p){const o=await fetch(i,{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({organizationSlug:e})}),l=await o.json();if(!o.ok||!l.success)throw new Error(l.error||p);return l}function Z(i){const e=G.c(45),{organizations:p,domain:o,requestedSlugs:l,onRequestedSlug:C,onSelected:h,onJoined:c,onRequestCompleted:M,selectLabel:O,onCreateNew:S,createNewLabel:P}=i,j=O===void 0?"Select":O,_=P===void 0?"Create new organization":P;let N;e[0]===Symbol.for("react.memo_cache_sentinel")?(N=new Set,e[0]=N):N=e[0];const[J,U]=H.useState(N);let v;e[1]!==C?(v=r=>{U(t=>new Set(t).add(r)),C?.(r)},e[1]=C,e[2]=v):v=e[2];const E=v;let z;e[3]!==c?(z={mutationFn:V,onSuccess:r=>{const{organization:t,slug:x}=r;c?.(t,x)}},e[3]=c,e[4]=z):z=e[4];const n=A(z);let R;e[5]!==E||e[6]!==c||e[7]!==M?(R={mutationFn:Q,onSuccess:r=>{const{organization:t,slug:x,alreadyMember:F}=r;if(F&&x){c?.(t,x);return}E(t.slug),M?.(t)}},e[5]=E,e[6]=c,e[7]=M,e[8]=R):R=e[8];const a=A(R);let u;e[9]!==l?(u=l??[],e[9]=l,e[10]=u):u=e[10];let y;e[11]!==J||e[12]!==u?(y=new Set([...u,...J]),e[11]=J,e[12]=u,e[13]=y):y=e[13];const b=y,q=n.variables?.slug??null,w=a.variables?.slug??null;let d;e[14]!==_||e[15]!==S?(d=S&&s.jsxs("button",{type:"button",onClick:S,className:"rounded-xl border border-dashed border-border p-4 flex items-center justify-center gap-2 text-sm font-medium text-muted-foreground hover:text-foreground hover:border-foreground/40 transition-colors",children:[s.jsx(K,{size:16}),_]}),e[14]=_,e[15]=S,e[16]=d):d=e[16];let m;if(e[17]!==o||e[18]!==b||e[19]!==n||e[20]!==h||e[21]!==p||e[22]!==q||e[23]!==w||e[24]!==a||e[25]!==j){let r;e[27]!==o||e[28]!==b||e[29]!==n||e[30]!==h||e[31]!==q||e[32]!==w||e[33]!==a||e[34]!==j?(r=t=>{const x=n.isPending&&q===t.slug,F=a.isPending&&w===t.slug,$=b.has(t.slug),D=t.logo??(o?`https://www.google.com/s2/favicons?domain=${o}&sz=128`:null);return s.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4 flex items-center gap-4",children:[s.jsx(I,{url:D??void 0,fallback:t.name.charAt(0).toUpperCase(),shape:"square",size:"base",className:"h-10 w-10 shrink-0"}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-medium truncate",children:t.name}),o&&s.jsxs("p",{className:"text-xs text-muted-foreground truncate",children:["@",o]})]}),t.joinMode==="auto"?s.jsx(L,{size:"default",onClick:()=>n.mutate(t),disabled:n.isPending,children:x?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(B,{className:"size-3.5"})," Joining..."]}):"Join"}):t.joinMode==="request"?$?s.jsx("span",{className:"text-xs text-muted-foreground shrink-0",children:"Request sent"}):s.jsx(L,{size:"default",variant:"outline",onClick:()=>a.mutate(t),disabled:a.isPending,children:F?s.jsxs("span",{className:"flex items-center gap-2",children:[s.jsx(B,{className:"size-3.5"})," Requesting..."]}):"Request to join"}):s.jsx(L,{size:"default",onClick:()=>h?.(t),children:j})]},t.id)},e[27]=o,e[28]=b,e[29]=n,e[30]=h,e[31]=q,e[32]=w,e[33]=a,e[34]=j,e[35]=r):r=e[35],m=p.map(r),e[17]=o,e[18]=b,e[19]=n,e[20]=h,e[21]=p,e[22]=q,e[23]=w,e[24]=a,e[25]=j,e[26]=m}else m=e[26];let g;e[36]!==n.error?(g=n.error&&s.jsx("p",{className:"text-xs text-destructive",role:"alert",children:n.error instanceof Error?n.error.message:"Failed to join organization"}),e[36]=n.error,e[37]=g):g=e[37];let f;e[38]!==a.error?(f=a.error&&s.jsx("p",{className:"text-xs text-destructive",role:"alert",children:a.error instanceof Error?a.error.message:"Failed to request access"}),e[38]=a.error,e[39]=f):f=e[39];let k;return e[40]!==m||e[41]!==g||e[42]!==f||e[43]!==d?(k=s.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[d,m,g,f]}),e[40]=m,e[41]=g,e[42]=f,e[43]=d,e[44]=k):k=e[44],k}async function Q(i){const e=await T("/api/auth/custom/domain-request-join",i.slug,"Failed to request access");return{organization:i,slug:e.slug,alreadyMember:e.alreadyMember}}async function V(i){const e=await T("/api/auth/custom/domain-join",i.slug,"Failed to join organization");return{organization:i,slug:e.slug??i.slug}}export{Z as O};
@@ -1,48 +0,0 @@
1
- import{c as M,r as z,j as l,b as H,av as Ze,l as V,af as ct,a2 as me,o as Yt,an as Zt,e as es,K as xe,t as Re,m as ut,ak as ts,H as ss,h as ns,B as Ue,aW as dt,aj as as,aF as ls,ek as os,el as ft,a5 as rs,z as is,x as He,d as qe,em as et,dT as cs,en as us}from"./index-DEQvnIsm.js";import{aQ as ds,h as fs,aI as ms,Y as ps,a as tt,aA as gs,k as xs,a8 as hs,aR as bs,aS as mt,aT as ys,u as ze,aM as js,aL as vs,aU as pt,A as gt,aV as de,f as Ss,b as Ns,K as ks}from"./agent-icon-D6wS7rd0.js";import{t as Te,e as ws,b as _s}from"./Tool01-Bp-TbrXi.js";import{i as xt}from"./LinkBroken01-DmmKNgpp.js";import{a as Ts}from"./Copy01-EWitDFCf.js";import{c as be,t as We,d as st}from"./format-time-Cq80KKvY.js";import{b as Cs,C as Is,a as $s}from"./collapsible-DHXUZre4.js";import{u as Ms}from"./use-copy-Dkgb0DtI.js";import{h as ht,i as As,d as Ce,c as Ps,P as Ls,u as Es,j as Rs,F as zs,s as Fs,b as Ds,k as Os}from"./usage-stats-BH4bqLoE.js";import{q as Bs,u as Us,v as Hs,x as qs}from"./thread-intent-8kpZLcDE.js";import{f as ye,B as Ws,u as je,E as Gs,b as Ks,F as bt,G as Vs,H as Ie,I as Js,J as Qs}from"./chat-context-Dv2E4fnf.js";import{u as Ge}from"./use-clock-tick-xpCK7CUB.js";import{c as Xs}from"./content-blocks-o63cs2vh.js";import{M as Ys}from"./mcp-app-renderer-pDbHkuXF.js";import{g as yt}from"./types-m1Dsi5sG.js";import{o as Zs}from"./omit-sandbox-map-jj4lCB2U.js";import{T as jt,a as vt,c as St}from"./tooltip-B6NbTX5P.js";import{c as en,u as tn,a as sn}from"./use-mcp-client-CAdgJ_QT.js";import{a as Nt,g as kt,s as wt}from"./tool-namespace-CTeV292R.js";import{t as nn,g as pe,u as Ke}from"./utils-CVEq3hMx.js";import{i as _t}from"./AlertCircle-Q16nTVAa.js";import{s as an,a as Ne}from"./Image01-BfGAREA7.js";import{s as ln}from"./XClose-L_GNViCD.js";import{n as Fe}from"./ShoppingBag01-B7gta_qY.js";import{i as on}from"./SearchMd-D0zp0uee.js";import{a as rn,e as cn}from"./shell-layout-DKGS0yWx.js";import{a as Ve}from"./use-panel-navigate-BwwjvhNB.js";import{c as Tt}from"./use-decopilot-events-Czwn8ZVj.js";import{I as un,M as Ct}from"./markdown-DgDY2QmE.js";import{c as dn,S as fn,a as mn,b as pn}from"./sheet-CzJFx6b-.js";import{I as ve}from"./integration-icon-Bysyldtc.js";import{a as It}from"./use-connection-Cqf7M1G6.js";import{u as $t}from"./use-navigate-to-agent-B-QlLf3R.js";import{i as ke}from"./Link01-9civFIb9.js";import{s as gn}from"./UserSquare-cdWcOBLL.js";import{g as xn}from"./use-mcp-prompts-D1rnFTSb.js";import{t as hn}from"./ChevronUp-DK-Gvyk8.js";import{i as bn}from"./Monitor01-BoSs_8gg.js";import{a as yn}from"./use-thread-outputs-BUN4R0HD.js";import{n as jn}from"./ZoomOut-B3s5275g.js";import{F as vn}from"./file-type-icon-HF5UcaS2.js";const Mt=[{delay:0},{delay:100},{delay:200},{delay:100},{delay:200},{delay:200},{delay:300},{delay:300},{delay:400}];function Sn(){const s=M.c(5),[e]=z.useState(Nn);let t;s[0]===Symbol.for("react.memo_cache_sentinel")?(t={gridTemplateColumns:"repeat(3, 3px)",gap:"1.5px",width:"fit-content"},s[0]=t):t=s[0];let n;s[1]!==e?(n=Mt.map((o,c)=>{const{delay:i}=o;return l.jsx("div",{className:"rounded-[1px]",style:{width:3,height:3,"--cell-color":e[c],animation:"grid-ripple 1s ease infinite",animationDelay:`${i}ms`}},c)}),s[1]=e,s[2]=n):n=s[2];let a;return s[3]!==n?(a=l.jsx("div",{className:"grid",style:t,children:n}),s[3]=n,s[4]=a):a=s[4],a}function Nn(){const s=`var(--chart-${Math.ceil(Math.random()*5)})`;return Mt.map(()=>Math.random()<.6?"color-mix(in srgb, var(--muted-foreground) 25%, transparent)":s)}const kn={damping:.7,stiffness:.05,mass:1.25},wn=70,_n=1e3/60,Tn=350;let $e=!1;globalThis.document?.addEventListener("mousedown",()=>{$e=!0});globalThis.document?.addEventListener("mouseup",()=>{$e=!1});globalThis.document?.addEventListener("click",()=>{$e=!1});const Cn=(s={})=>{const[e,t]=z.useState(!1),[n,a]=z.useState(s.initial!==!1),[o,c]=z.useState(!1),i=z.useRef(null);i.current=s;const u=z.useCallback(()=>{if(!$e)return!1;const b=window.getSelection();if(!b||!b.rangeCount)return!1;const k=b.getRangeAt(0);return k.commonAncestorContainer.contains(h.current)||h.current?.contains(k.commonAncestorContainer)},[]),r=z.useCallback(b=>{d.isAtBottom=b,a(b)},[]),f=z.useCallback(b=>{d.escapedFromLock=b,t(b)},[]),d=z.useMemo(()=>{let b;return{escapedFromLock:e,isAtBottom:n,resizeDifference:0,accumulated:0,velocity:0,listeners:new Set,get scrollTop(){return h.current?.scrollTop??0},set scrollTop(k){if(h.current){const{scrollBehavior:j}=getComputedStyle(h.current);j!=="auto"&&(h.current.style.scrollBehavior="auto"),h.current.scrollTop=k,d.ignoreScrollToTop=h.current.scrollTop,j!=="auto"&&(h.current.style.scrollBehavior=j)}},get targetScrollTop(){return!h.current||!y.current?0:h.current.scrollHeight-1-h.current.clientHeight},get calculatedTargetScrollTop(){if(!h.current||!y.current)return 0;const{targetScrollTop:k}=this;if(!s.targetScrollTop)return k;if(b?.targetScrollTop===k)return b.calculatedScrollTop;const j=Math.max(Math.min(s.targetScrollTop(k,{scrollElement:h.current,contentElement:y.current}),k),0);return b={targetScrollTop:k,calculatedScrollTop:j},requestAnimationFrame(()=>{b=void 0}),j},get scrollDifference(){return this.calculatedTargetScrollTop-this.scrollTop},get isNearBottom(){return this.scrollDifference<=wn}}},[]),m=z.useCallback((b={})=>{typeof b=="string"&&(b={animation:b}),b.preserveScrollPosition||r(!0);const k=Date.now()+(Number(b.wait)||0),j=Pe(i.current,b.animation),{ignoreEscapes:w=!1}=b;let S,N=d.calculatedTargetScrollTop;b.duration instanceof Promise?b.duration.finally(()=>{S=Date.now()}):S=k+(b.duration??0);const v=async()=>{const _=new Promise(requestAnimationFrame).then(()=>{if(!d.isAtBottom)return d.animation=void 0,!1;const{scrollTop:T}=d,A=performance.now(),P=(A-(d.lastTick??A))/_n;if(d.animation||(d.animation={behavior:j,promise:_,ignoreEscapes:w}),d.animation.behavior===j&&(d.lastTick=A),u()||k>Date.now())return v();if(T<Math.min(N,d.calculatedTargetScrollTop)){if(d.animation?.behavior===j){if(j==="instant")return d.scrollTop=d.calculatedTargetScrollTop,v();d.velocity=(j.damping*d.velocity+j.stiffness*d.scrollDifference)/j.mass,d.accumulated+=d.velocity*P,d.scrollTop+=d.accumulated,d.scrollTop!==T&&(d.accumulated=0)}return v()}return S>Date.now()?(N=d.calculatedTargetScrollTop,v()):(d.animation=void 0,d.scrollTop<d.calculatedTargetScrollTop?m({animation:Pe(i.current,i.current.resize),ignoreEscapes:w,duration:Math.max(0,S-Date.now())||void 0}):d.isAtBottom)});return _.then(T=>(requestAnimationFrame(()=>{d.animation||(d.lastTick=void 0,d.velocity=0)}),T))};return b.wait!==!0&&(d.animation=void 0),d.animation?.behavior===j?d.animation.promise:v()},[r,u,d]),p=z.useCallback(()=>{f(!0),r(!1)},[f,r]),g=z.useCallback(({target:b})=>{if(b!==h.current)return;const{scrollTop:k,ignoreScrollToTop:j}=d;let{lastScrollTop:w=k}=d;d.lastScrollTop=k,d.ignoreScrollToTop=void 0,j&&j>k&&(w=j),c(d.isNearBottom),setTimeout(()=>{if(d.resizeDifference||k===j)return;if(u()){f(!0),r(!1);return}const S=k>w,N=k<w;if(d.animation?.ignoreEscapes){d.scrollTop=w;return}N&&(f(!0),r(!1)),S&&f(!1),!d.escapedFromLock&&d.isNearBottom&&r(!0)},1)},[f,r,u,d]),x=z.useCallback(({target:b,deltaY:k})=>{let j=b;for(;!["scroll","auto"].includes(getComputedStyle(j).overflow);){if(!j.parentElement)return;j=j.parentElement}j===h.current&&k<0&&h.current.scrollHeight>h.current.clientHeight&&!d.animation?.ignoreEscapes&&(f(!0),r(!1))},[f,r,d]),h=nt(b=>{h.current?.removeEventListener("scroll",g),h.current?.removeEventListener("wheel",x),b?.addEventListener("scroll",g,{passive:!0}),b?.addEventListener("wheel",x,{passive:!0})},[]),y=nt(b=>{if(d.resizeObserver?.disconnect(),d.resizeObserver=void 0,!b)return;let k;d.resizeObserver=new ResizeObserver(([j])=>{const{height:w}=j.contentRect,S=w-(k??w);if(d.resizeDifference=S,d.scrollTop>d.targetScrollTop&&(d.scrollTop=d.targetScrollTop),c(d.isNearBottom),S>=0){const N=Pe(i.current,k?i.current.resize:i.current.initial);m({animation:N,wait:!0,preserveScrollPosition:!0,duration:N==="instant"?void 0:Tn})}else d.isNearBottom&&(f(!1),r(!0));k=w,requestAnimationFrame(()=>{setTimeout(()=>{d.resizeDifference===S&&(d.resizeDifference=0)},1)})}),d.resizeObserver?.observe(b)},[]);return{contentRef:y,scrollRef:h,scrollToBottom:m,stopScroll:p,isAtBottom:n||o,isNearBottom:o,escapedFromLock:e,state:d}};function nt(s,e){const t=z.useCallback(n=>(t.current=n,s(n)),e);return t}const Ae=new Map;function Pe(...s){const e={...kn};let t=!1;for(const a of s){if(a==="instant"){t=!0;continue}typeof a=="object"&&(t=!1,e.damping=a.damping??e.damping,e.stiffness=a.stiffness??e.stiffness,e.mass=a.mass??e.mass)}const n=JSON.stringify(e);return Ae.has(n)||Ae.set(n,Object.freeze(e)),t?"instant":Ae.get(n)}function Y({icon:s,title:e,usage:t,summary:n,state:a,detail:o,detailVariant:c="code",forceOpen:i,variant:u="default",trailing:r,iconDestructive:f,alwaysChevron:d,defaultOpen:m,children:p}){const g=H(),[x,h]=z.useState(m??!1),{handleCopy:y,copied:b}=Ms(),k=a==="loading",j=a==="error",S=!!(o&&o.trim())||!!p,N=u==="subtask",v=(i??!1)||x,_=Cn({initial:k?"instant":!1}),T=l.jsxs(Cs,{open:v,onOpenChange:i?void 0:h,className:"min-w-0",children:[l.jsxs(Is,{disabled:!S,className:V("group/tool flex items-center gap-2 w-full py-2.5 text-left transition-colors",S&&"[@media(hover:hover)]:hover:bg-accent/30",!S&&"cursor-default",k&&"shimmer"),"aria-disabled":!S,children:[l.jsx("div",{className:"relative shrink-0 size-4 flex items-center justify-center",children:d?l.jsx(Ze,{className:V("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")}):l.jsxs(l.Fragment,{children:[l.jsx("div",{className:V("absolute inset-0 flex items-center justify-center [&>svg]:size-4 transition-opacity duration-150",f?"[&>svg]:text-destructive/70":j?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75",S&&(v?"opacity-0":"[@media(hover:hover)]:group-hover/tool:opacity-0")),children:s}),S&&l.jsx("div",{className:V("absolute inset-0 flex items-center justify-center transition-opacity duration-150",v?"opacity-100":"opacity-0 [@media(hover:hover)]:group-hover/tool:opacity-100"),children:l.jsx(Ze,{className:V("size-4 text-foreground/60 transition-transform duration-200 ease-in-out",v&&"rotate-90")})})]})}),l.jsx("span",{className:V("shrink-0 text-[14px] font-normal",j?"text-warning/80":"text-foreground"),children:e}),n?l.jsx("span",{className:"min-w-0 flex-1 truncate",children:l.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:n})}):l.jsx("div",{className:"flex-1"}),r&&l.jsx("div",{className:"shrink-0 flex items-center gap-1 [&_svg]:size-3.5 [&_svg]:text-muted-foreground/50",children:r}),l.jsx(ht,{usage:t})]}),S&&l.jsx($s,{className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden",children:p||(c==="prose"?l.jsx("div",{className:"mt-1 mb-1",children:l.jsx("div",{ref:_.scrollRef,className:"max-h-[150px] overflow-y-auto rounded-md bg-muted/30 px-3 py-2",children:l.jsx("p",{ref:_.contentRef,className:"text-xs text-muted-foreground/70 whitespace-pre-wrap leading-relaxed wrap-break-word",children:o})})}):l.jsx("div",{className:"ml-[20px] pl-3 border-l border-border/30 mt-0.5 pb-1",children:l.jsx("div",{ref:_.scrollRef,className:"flex flex-col max-h-48 overflow-y-auto",children:l.jsxs("div",{ref:_.contentRef,className:"flex items-start justify-between gap-2",children:[l.jsx("div",{className:"flex-1 min-w-0 overflow-hidden",children:l.jsx("pre",{className:"text-xs font-mono text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:o})}),l.jsx("button",{type:"button",onClick:()=>y(o),className:"shrink-0 p-1.5 rounded-lg text-muted-foreground/50 [@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent/50 transition-colors active:scale-[0.97]","aria-label":g("common.copy"),children:b?l.jsx(ct,{className:"size-3.5"}):l.jsx(Ts,{className:"size-3.5"})})]})})}))})]});return N?l.jsx("div",{className:"pl-4 border-l border-border/40 ml-1.5",children:T}):T}function fe(s){const e=M.c(4),{latency:t}=s;if(t==null||t<=0)return null;let n;e[0]!==t?(n=be(t),e[0]=t,e[1]=n):n=e[1];let a;return e[2]!==n?(a=l.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground",children:n}),e[2]=n,e[3]=a):a=e[3],a}const At=4;function Pt(s){const e=M.c(8),{count:t,noun:n,onClick:a}=s,o=H();let c;e[0]!==t||e[1]!==n||e[2]!==o?(c=o("common.seeAll",{count:t,noun:n}),e[0]=t,e[1]=n,e[2]=o,e[3]=c):c=e[3];let i;e[4]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(xt,{className:"size-4 transition-transform group-hover:translate-x-0.5","aria-hidden":"true"}),e[4]=i):i=e[4];let u;return e[5]!==a||e[6]!==c?(u=l.jsxs("button",{type:"button",onClick:a,className:"group flex w-full items-center justify-center gap-1.5 rounded-lg border border-border bg-card px-3 py-2.5 text-sm text-muted-foreground transition-colors hover:bg-muted hover:text-foreground cursor-pointer",children:[c,i]}),e[5]=a,e[6]=c,e[7]=u):u=e[7],u}function Lt(s){const e=M.c(12),{message:t,className:n}=s,a=t.created_at??t.metadata?.created_at??null;let o,c,i,u;if(e[0]!==n||e[1]!==a){u=Symbol.for("react.early_return_sentinel");e:{const f=We(a);if(f===null){u=null;break e}const d=new Date(f);o=d.toLocaleString(),e[6]!==n?(c=V("text-[11px] text-muted-foreground/60 select-none",n),e[6]=n,e[7]=c):c=e[7],i=d.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}e[0]=n,e[1]=a,e[2]=o,e[3]=c,e[4]=i,e[5]=u}else o=e[2],c=e[3],i=e[4],u=e[5];if(u!==Symbol.for("react.early_return_sentinel"))return u;let r;return e[8]!==o||e[9]!==c||e[10]!==i?(r=l.jsx("span",{title:o,className:c,children:i}),e[8]=o,e[9]=c,e[10]=i,e[11]=r):r=e[11],r}function De(s){const e=M.c(9),{since:t}=s;let n;e[0]!==t?(n=()=>st(t,Date.now()),e[0]=t,e[1]=n):n=e[1];const[a,o]=z.useState(n);let c,i;e[2]!==t?(c=()=>{const d=setInterval(()=>o(st(t,Date.now())),100);return()=>clearInterval(d)},i=[t],e[2]=t,e[3]=c,e[4]=i):(c=e[3],i=e[4]),z.useEffect(c,i);const u=a/1e3;let r;e[5]!==u?(r=be(u),e[5]=u,e[6]=r):r=e[6];let f;return e[7]!==r?(f=l.jsx("span",{className:"tabular-nums text-sm font-mono text-muted-foreground/50",children:r}),e[7]=r,e[8]=f):f=e[8],f}function In(s){return{planning:{icon:l.jsx(fs,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.planningLabel"),detail:s("chat.thinkingIndicator.planningDetail")},thinking:{icon:l.jsx(Te,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),label:s("chat.thinkingIndicator.thinkingLabel"),detail:s("chat.thinkingIndicator.thinkingDetail")}}}const $n=1200;function Oe(s){const e=M.c(8),{icon:t,title:n,summary:a,detail:o,state:c,detailVariant:i,trailing:u}=s,r=i===void 0?"prose":i;let f;return e[0]!==o||e[1]!==r||e[2]!==t||e[3]!==c||e[4]!==a||e[5]!==n||e[6]!==u?(f=l.jsx(Y,{icon:t,title:n,summary:a,detail:o,state:c,detailVariant:r,trailing:u}),e[0]=o,e[1]=r,e[2]=t,e[3]=c,e[4]=a,e[5]=n,e[6]=u,e[7]=f):f=e[7],f}function Mn(s){const e=M.c(22),{startedAt:t}=s,n=H(),a=ye()?.runStatusStage??null,[o,c]=z.useState("planning");let i,u;if(e[0]!==a?(i=()=>{if(a!==null)return;const x=setTimeout(()=>{c("thinking")},$n);return()=>{clearTimeout(x)}},u=[a],e[0]=a,e[1]=i,e[2]=u):(i=e[1],u=e[2]),z.useEffect(i,u),a!==null){let x;e[3]!==a||e[4]!==n?(x=Bs(n,a),e[3]=a,e[4]=n,e[5]=x):x=e[5];const h=x;let y;e[6]===Symbol.for("react.memo_cache_sentinel")?(y=l.jsx(Te,{className:"size-4"}),e[6]=y):y=e[6];const b=`${h.label}...`;let k;e[7]!==t?(k=t!==null&&l.jsx(De,{since:t}),e[7]=t,e[8]=k):k=e[8];let j;return e[9]!==h.detail||e[10]!==b||e[11]!==k?(j=l.jsx(Oe,{icon:y,title:b,summary:h.detail,state:"loading",trailing:k}),e[9]=h.detail,e[10]=b,e[11]=k,e[12]=j):j=e[12],j}let r;e[13]!==n?(r=In(n),e[13]=n,e[14]=r):r=e[14];const d=r[o],m=`${d.label}...`;let p;e[15]!==t?(p=t!==null&&l.jsx(De,{since:t}),e[15]=t,e[16]=p):p=e[16];let g;return e[17]!==d.detail||e[18]!==d.icon||e[19]!==m||e[20]!==p?(g=l.jsx(Oe,{icon:d.icon,title:m,summary:d.detail,state:"loading",trailing:p}),e[17]=d.detail,e[18]=d.icon,e[19]=m,e[20]=p,e[21]=g):g=e[21],g}function An(s){const e=M.c(3),{startedAt:t}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=l.jsx(Sn,{}),e[0]=n):n=e[0];let a;return e[1]!==t?(a=l.jsxs("div",{className:"flex items-center gap-2.5 mt-1 pb-1 text-muted-foreground/40 select-none",children:[n,l.jsx(De,{since:t})]}),e[1]=t,e[2]=a):a=e[2],a}const Pn=2e4;function Ln(s){const e=M.c(9),{startedAt:t}=s,n=H(),a=Ge(1e3),o=ye(),i=(t!==null?a-t:0)>=Pn;let u;e[0]!==t?(u=l.jsx(Mn,{startedAt:t}),e[0]=t,e[1]=u):u=e[1];let r;e[2]!==i||e[3]!==o||e[4]!==n?(r=i&&o?.stop&&l.jsxs("div",{className:"flex items-center gap-2 pb-1 text-[13px] text-muted-foreground/60",children:[l.jsx("span",{children:n("chat.thinkingIndicator.takingLonger")}),l.jsx("button",{type:"button",onClick:()=>o.stop(),className:"text-muted-foreground hover:text-foreground underline underline-offset-2",children:n("chat.thinkingIndicator.cancel")})]}),e[2]=i,e[3]=o,e[4]=n,e[5]=r):r=e[5];let f;return e[6]!==u||e[7]!==r?(f=l.jsxs("div",{className:"flex flex-col gap-0.5",children:[u,r]}),e[6]=u,e[7]=r,e[8]=f):f=e[8],f}function En(s){const e=M.c(24),{duration:t,parts:n,isStreaming:a}=s,o=H();let c;e[0]!==n?(c=n.every(Fn),e[0]=n,e[1]=c):c=e[1];const i=c;let u;e[2]!==t||e[3]!==o?(u=t&&t/1e3>1?o("chat.thinkingIndicator.thoughtFor",{duration:be(t/1e3)}):o("chat.thinkingIndicator.thought"),e[2]=t,e[3]=o,e[4]=u):u=e[4];const r=u;let f;if(e[5]!==i||e[6]!==a||e[7]!==n){const k=n.map(zn).join(`
2
- `).trim().split(`
3
- `).filter(Boolean),j=a?k[k.length-1]??"":k[0]??"";f=!i&&j?j.length>100?j.slice(0,100)+"…":j:void 0,e[5]=i,e[6]=a,e[7]=n,e[8]=f}else f=e[8];const d=f;let m;if(e[9]!==i||e[10]!==n){const b=n.map(Rn).join(`
4
-
5
- `);m=!i&&b.trim()?b:null,e[9]=i,e[10]=n,e[11]=m}else m=e[11];const p=m;let g;e[12]!==a?(g=a?l.jsx(Te,{className:"size-4"}):l.jsx(ds,{className:"size-4"}),e[12]=a,e[13]=g):g=e[13];let x;e[14]!==a||e[15]!==o||e[16]!==r?(x=a?o("chat.thinkingIndicator.thinking"):r,e[14]=a,e[15]=o,e[16]=r,e[17]=x):x=e[17];const h=a?"loading":"idle";let y;return e[18]!==p||e[19]!==d||e[20]!==g||e[21]!==x||e[22]!==h?(y=l.jsx(Oe,{icon:g,title:x,summary:d,detail:p,state:h,detailVariant:"prose"}),e[18]=p,e[19]=d,e[20]=g,e[21]=x,e[22]=h,e[23]=y):y=e[23],y}function Rn(s){return s.text??""}function zn(s){return s.text??""}function Fn(s){return s.text?.includes("REDACTED")}function Dn(s){const e=M.c(24),{org:t}=me(),n=Yt(),a=Us(),o=Zt();let c;e[0]!==o||e[1]!==s?(c=async x=>{if(!s)throw new Error("useTaskExpandedTools: no task in context");const y=(await o.call("COLLECTION_THREADS_GET",{id:s})).item?.metadata??{},k=(y.expanded_tools??[]).filter(w=>w.toolName!==x.toolName);k.push({...x,expandedAt:new Date().toISOString()});const j={...Zs(y),expanded_tools:k};return await o.call("COLLECTION_THREADS_UPDATE",{id:s,data:{metadata:j}}),k},e[0]=o,e[1]=s,e[2]=c):c=e[2];let i,u,r;e[3]!==t||e[4]!==n||e[5]!==s?(i=async x=>{const h=xe.ensureTask(t.id,s??"");await n.cancelQueries({queryKey:h});const y=n.getQueryData(h),k=(y?.metadata?.expanded_tools??[]).filter(j=>j.toolName!==x.toolName);return k.push({...x,expandedAt:new Date().toISOString()}),n.setQueryData(h,j=>j&&{...j,metadata:{...j.metadata??{},expanded_tools:k}}),{previous:y}},u=()=>{n.invalidateQueries({queryKey:xe.ensureTask(t.id,s??"")})},r=(x,h,y)=>{const b=xe.ensureTask(t.id,s??"");y?.previous===void 0?n.removeQueries({queryKey:b,exact:!0}):n.setQueryData(b,y.previous),Re.error(x instanceof Error?x.message:"Failed to expand tool")},e[3]=t,e[4]=n,e[5]=s,e[6]=i,e[7]=u,e[8]=r):(i=e[6],u=e[7],r=e[8]);let f;e[9]!==c||e[10]!==i||e[11]!==u||e[12]!==r?(f={mutationFn:c,onMutate:i,onSuccess:u,onError:r},e[9]=c,e[10]=i,e[11]=u,e[12]=r,e[13]=f):f=e[13];const d=es(f);let m;e[14]!==a||e[15]!==d||e[16]!==t||e[17]!==n||e[18]!==s?(m=x=>{if(!s||!a)return;const h=xe.ensureTask(t.id,s),y=n.getQueryData(h),k=(y?.metadata?.expanded_tools??[]).filter(w=>w.toolName!==x.toolName);k.push({...x,expandedAt:new Date().toISOString()});const j={...y?.metadata??{},expanded_tools:k};n.setQueryData(h,w=>w&&{...w,metadata:j}),a.patchThread({id:s,metadata:j}),d.mutate(x)},e[14]=a,e[15]=d,e[16]=t,e[17]=n,e[18]=s,e[19]=m):m=e[19];const p=m;let g;return e[20]!==p||e[21]!==d.isPending||e[22]!==d.mutate?(g={addOrReplace:d.mutate,addOrReplaceEager:p,isPending:d.isPending},e[20]=p,e[21]=d.isPending,e[22]=d.mutate,e[23]=g):g=e[23],g}function On(s){if(s<1024)return`${s} B`;if(s<1024*1024){const t=s/1024;return t<10?`${t.toFixed(1)} KB`:`${Math.round(t)} KB`}const e=s/(1024*1024);return e<10?`${e.toFixed(1)} MB`:`${Math.round(e)} MB`}function Bn(s,e,t,n){const{data:a,isLoading:o}=ut({queryKey:xe.toolDefinitionLookup(e,t,s),queryFn:async()=>{if(!s||!e)return null;const c=await en({connectionId:e,orgId:t,orgSlug:n});try{const{tools:i}=await c.listTools(),u=Nt(s);return i.find(r=>r.name===u)??null}finally{await c.close().catch(()=>{})}},enabled:!!s&&!!e,staleTime:6e4,gcTime:3e5,retry:!1});return{toolDef:a??void 0,isLoading:o}}const Un={read:{icon:tt,labelKey:"chat.generic.tool.read"},write:{icon:_s,labelKey:"chat.generic.tool.write"},edit:{icon:hs,labelKey:"chat.generic.tool.edit"},grep:{icon:on,labelKey:"chat.generic.tool.grep"},glob:{icon:xs,labelKey:"chat.generic.tool.glob"},bash:{icon:gs,labelKey:"chat.generic.tool.bash"},read_tool_output:{icon:tt,labelKey:"chat.generic.tool.readToolOutput"},read_resource:{icon:ps,labelKey:"chat.generic.tool.readResource"},read_prompt:{icon:Fe,labelKey:"chat.generic.tool.readPrompt"},skill:{icon:Fe,labelKey:"chat.generic.tool.skill"},enable_tool:{icon:ws,labelKey:"chat.generic.tool.enableTool"},open_in_agent:{icon:ts,labelKey:"chat.generic.tool.openInAgent"},sandbox:{icon:ms,labelKey:"chat.generic.tool.sandbox"}},Et="studio:bash-sleep-start:v1",Hn=200;function qn(s,e,t,n=Hn){const a=s.filter(([o])=>o!==e);for(a.push([e,t]);a.length>n;)a.shift();return a}function Wn(){try{const s=sessionStorage.getItem(Et);if(!s)return[];const e=JSON.parse(s);return Array.isArray(e)?e.filter(t=>Array.isArray(t)&&t.length===2&&typeof t[0]=="string"&&Number.isFinite(t[1])):[]}catch{return[]}}function Gn(s){try{const e=Wn(),t=e.find(([a])=>a===s);if(t)return t[1];const n=Date.now();return sessionStorage.setItem(Et,JSON.stringify(qn(e,s,n))),n}catch{return Date.now()}}function Rt(s,e){const t=M.c(2);let n;t[0]!==s?(n=()=>Gn(s),t[0]=s,t[1]=n):n=t[1];const a=z.useState(n)[0];return e??a}function zt(s){const e=Math.ceil(s/1e3);if(e<60)return`${e}s`;const t=Math.floor(e/60),n=e%60;return n?`${t}m ${n}s`:`${t}m`}function Kn(s){const e=M.c(5),{toolCallId:t,durationMs:n,anchorMs:a}=s,o=H(),c=Ge(1e3),u=Rt(t,a)+n-c;let r;e[0]!==u||e[1]!==o?(r=u>0?o("chat.generic.waitingFor",{duration:zt(u)}):o("chat.generic.wrappingUp"),e[0]=u,e[1]=o,e[2]=r):r=e[2];let f;return e[3]!==r?(f=l.jsx("span",{className:"tabular-nums",children:r}),e[3]=r,e[4]=f):f=e[4],f}const Vn=1e4;function Jn(s){const e=M.c(7),{toolCallId:t,anchorMs:n}=s,a=H(),o=Ge(1e3),c=Rt(t,n),i=o-c;if(i<Vn){let f;return e[0]!==a?(f=a("chat.generic.preparing"),e[0]=a,e[1]=f):f=e[1],f}let u;e[2]!==i||e[3]!==a?(u=a("chat.generic.runningFor",{elapsed:zt(i)}),e[2]=i,e[3]=a,e[4]=u):u=e[4];let r;return e[5]!==u?(r=l.jsx("span",{className:"tabular-nums",children:u}),e[5]=u,e[6]=r):r=e[6],r}const Qn={s:1e3,m:6e4,h:36e5,d:864e5};function Xn(s){const e=/(?:^|[\s;&|(])sleep((?:\s+[\d.]+[smhd]?)+)/g;let t=0,n=!1;for(const a of s.matchAll(e))for(const o of a[1].trim().split(/\s+/)){const c=/^([\d.]+)([smhd]?)$/.exec(o);if(!c)continue;const i=Number.parseFloat(c[1]);Number.isFinite(i)&&(t+=i*(Qn[c[2]||"s"]??1e3),n=!0)}return n?t:null}function Me(s,e="An unknown error occurred"){return"errorText"in s&&typeof s.errorText=="string"?s.errorText:e}function ge(s){if(s==null)return"";try{return JSON.stringify(s)}catch{return"[Non-serializable value]"}}function _e(s){const e=ge(s);if(e===""||e==="[Non-serializable value]")return e;try{return JSON.stringify(JSON.parse(e),null,2)}catch{return e}}const Yn=s=>s.type==="dynamic-tool"||s.type.startsWith("tool-");function Zn(s){if(!s||typeof s!="object")return null;const e=s;if(!Array.isArray(e.parts))return null;const t=[];for(const n of e.parts)if(n.type==="text"&&typeof n.text=="string")t.push(n.text);else if(n.type==="reasoning")t.push(`## Reasoning
6
- ${n.text}`);else if(n.type==="source-url")t.push(`## Source URL
7
- ${n.url}`);else if(n.type==="source-document")t.push(`## Source Document
8
- ${n.title}`);else if(n.type==="file")t.push(`## File
9
- ${n.filename??n.url}`);else if(n.type!=="step-start"){if(Yn(n)){const a=n.type.startsWith("tool-")?n.type.slice(5):n.toolName;if(n.state==="input-streaming")t.push(`## ${a}
10
- Input streaming...`);else if(n.state==="input-available"){const o=ge(n.input).slice(0,20);t.push(`## ${a}
11
- ### Input
12
- ${o||"[No input]"}...`)}else if(n.state==="approval-requested")t.push(`## ${a}
13
- Approval requested...`);else if(n.state==="approval-responded")t.push(`## ${a}
14
- Approval responded...`);else if(n.state==="output-available"){const o=ge(n.input).slice(0,40),c=ge(n.output).slice(0,40);t.push(n.output!=null?`## ${a}
15
- Input: ${o||"[No input]"}...
16
- Output: ${c||"[No output]"}...`:`## ${a}
17
- Input: ${o||"[No input]"}...
18
- Output: Tool responded with no output`)}else if(n.state==="output-error"){const o=ge(n.input).slice(0,40);t.push(n.errorText?`## ${a}
19
- Input: ${o||"[No input]"}...
20
- Error: ${n.errorText}`:`## ${a}
21
- Input: ${o||"[No input]"}...
22
- Error: Tool responded with an error`)}else if(n.state==="output-denied"){const o=ge(n.input).slice(0,40);t.push(`## ${a}
23
- Input: ${o||"[No input]"}...
24
- Output: Tool execution was denied`)}}}return t.length>0?t.join(`
25
-
26
- `):null}function at(s){const e=s&&typeof s=="object"&&"created_at"in s?s.created_at:void 0;return typeof e=="string"||e instanceof Date?We(e):null}function ea(s){const e=s&&typeof s=="object"&&"timeout"in s?s.timeout:void 0;return Math.min(typeof e=="number"?e:3e4,12e4)}function we(s){const e=M.c(7),{icon:t,label:n}=s;let a;e[0]!==t?(a=l.jsx(jt,{asChild:!0,children:l.jsx("span",{className:"flex items-center",children:t})}),e[0]=t,e[1]=a):a=e[1];let o;e[2]!==n?(o=l.jsx(vt,{side:"top",children:n}),e[2]=n,e[3]=o):o=e[3];let c;return e[4]!==a||e[5]!==o?(c=l.jsxs(St,{children:[a,o]}),e[4]=a,e[5]=o,e[6]=c):c=e[6],c}function ta(s){const e=M.c(19),{annotations:t,toolMeta:n}=s,a=H();let o;e[0]!==n?(o=yt(n),e[0]=n,e[1]=o):o=e[1];const c=!!o;if(!t&&!c)return null;let i;e[2]!==c||e[3]!==a?(i=c&&l.jsx(we,{icon:l.jsx(mt,{}),label:a("chat.generic.annotation.interactive")}),e[2]=c,e[3]=a,e[4]=i):i=e[4];let u;e[5]!==t?.readOnlyHint||e[6]!==a?(u=t?.readOnlyHint&&l.jsx(we,{icon:l.jsx(an,{}),label:a("chat.generic.annotation.readOnly")}),e[5]=t?.readOnlyHint,e[6]=a,e[7]=u):u=e[7];let r;e[8]!==t?.destructiveHint||e[9]!==a?(r=t?.destructiveHint&&l.jsx(we,{icon:l.jsx(_t,{}),label:a("chat.generic.annotation.destructive")}),e[8]=t?.destructiveHint,e[9]=a,e[10]=r):r=e[10];let f;e[11]!==t?.openWorldHint||e[12]!==a?(f=t?.openWorldHint&&l.jsx(we,{icon:l.jsx(ze,{}),label:a("chat.generic.annotation.openWorld")}),e[11]=t?.openWorldHint,e[12]=a,e[13]=f):f=e[13];let d;return e[14]!==i||e[15]!==u||e[16]!==r||e[17]!==f?(d=l.jsxs(l.Fragment,{children:[i,u,r,f]}),e[14]=i,e[15]=u,e[16]=r,e[17]=f,e[18]=d):d=e[18],d}function sa(s){return s<1?`${Math.round(s*1e3)}ms`:s<10?`${s.toFixed(1)}s`:`${Math.round(s)}s`}function na(s){const e=M.c(13),{latency:t,outputBytes:n}=s,a=typeof t=="number"&&t>0,o=typeof n=="number"&&n>=0;if(!a&&!o)return null;let c;e[0]!==a||e[1]!==t?(c=a&&l.jsx("span",{children:sa(t)}),e[0]=a,e[1]=t,e[2]=c):c=e[2];let i;e[3]!==o||e[4]!==a?(i=a&&o&&l.jsx("span",{className:"text-muted-foreground/30",children:"·"}),e[3]=o,e[4]=a,e[5]=i):i=e[5];let u;e[6]!==o||e[7]!==n?(u=o&&l.jsx("span",{children:On(n)}),e[6]=o,e[7]=n,e[8]=u):u=e[8];let r;return e[9]!==c||e[10]!==i||e[11]!==u?(r=l.jsxs("span",{className:"inline-flex items-center gap-1.5 text-[11px] font-mono tabular-nums text-muted-foreground/60 px-1 leading-none",children:[c,i,u]}),e[9]=c,e[10]=i,e[11]=u,e[12]=r):r=e[12],r}function aa(s,e,t,n){switch(s){case"input-streaming":case"input-available":return n?n("chat.generic.preparing"):"Preparing...";case"approval-requested":return n?n("chat.generic.waitingForApproval"):"Waiting for your approval";case"output-denied":return n?n("chat.generic.cancelled"):"Cancelled";case"output-error":return t??(n?n("chat.generic.failed"):"Failed");case"output-available":{if(e==null)return n?n("chat.generic.done"):"Done";if(typeof e=="string"){const a=e.trim();return a.length>100?a.slice(0,100)+"…":a}if(typeof e=="object"){for(const a of Object.keys(e)){const o=e[a];if(typeof o=="string"&&o.trim()){const c=o.trim();return c.length>100?c.slice(0,100)+"…":c}}return""}return String(e).slice(0,100)}default:return""}}function lt(s){const e=M.c(76),{part:t,annotations:n,latency:a,outputBytes:o,isLastMessage:c,toolMeta:i}=s,u=H(),r="toolName"in t&&typeof t.toolName=="string"?t.toolName:t.type==="dynamic-tool"?u("chat.generic.dynamicTool"):t.type.replace("tool-","")||"Tool",f=Nt(r),d=ye(),m=Ws(),{org:p}=me(),{openSidePanel:g}=rn(),x=je()?.taskId??null,{addOrReplaceEager:h}=Dn(x),{openPanel:y}=Ve(),b=i&&typeof i=="object"&&i!==null&&"connectionId"in i&&i.connectionId!=null&&i.connectionId!==""?String(i.connectionId):m?.selectedVirtualMcp?.id??null,{toolDef:k}=Bn(b?r:null,b,p.id,p.slug),j=k?._meta??i,w=kt(j),S=wt(f,w),N=Un[S],v=k?.title??(N?.labelKey?u(N.labelKey):void 0)??nn(S);let _;e[0]!==j?(_=yt(j),e[0]=j,e[1]=_):_=e[1];const T=_,A=!!T&&t.state==="output-available",P=b?`${b}:${r}`:null,E=!!n?.destructiveHint,L=A&&!!b&&!E&&!!x;let I;e[2]!==h||e[3]!==b||e[4]!==y||e[5]!==t||e[6]!==r?(I=()=>{if(!b)return;const J="input"in t&&t.input&&typeof t.input=="object"?t.input:{};h({toolName:r,appId:b,args:J}),y(as(b,r))},e[2]=h,e[3]=b,e[4]=y,e[5]=t,e[6]=r,e[7]=I):I=e[7];const $=I;let C;e[8]!==L||e[9]!==$?(C=J=>J==="fullscreen"&&L?($(),"fullscreen"):"inline",e[8]=L,e[9]=$,e[10]=C):C=e[10];const R=C;let D;e[11]!==d||e[12]!==g?(D=J=>{const te=Xs(J.content);te.content.length>0&&(g(),d?.sendMessage(te))},e[11]=d,e[12]=g,e[13]=D):D=e[13];const B=D,U=t.state==="approval-requested"&&c===!1,W=t.state==="output-denied"||U,K=t.state==="output-available"&&typeof t.output=="object"&&t.output!=null&&"isError"in t.output&&t.output.isError===!0;let X;e[14]!==t.state?(X=pe(t.state),e[14]=t.state,e[15]=X):X=e[15];const Z=X,G=U||Z==="approval"?"idle":K?"error":Z;let Q,ne;if(e[16]!==G||e[17]!==K||e[18]!==U||e[19]!==t||e[20]!==u||e[21]!==S){Q=t.state==="output-error"?Me(t):void 0;const J=S==="bash"&&G==="loading"&&t.input&&typeof t.input=="object"&&typeof t.input.command=="string"?t.input.command:null;let te;e[24]!==J?(te=J!==null?Xn(J):null,e[24]=J,e[25]=te):te=e[25];const se=te;let Se;e[26]!==t.input||e[27]!==se?(Se=se!==null?Math.min(se,ea(t.input)):null,e[26]=t.input,e[27]=se,e[28]=Se):Se=e[28];const Xe=Se,Ye="toolCallId"in t?t.toolCallId:"";ne=Xe!==null?l.jsx(Kn,{toolCallId:Ye,durationMs:Xe,anchorMs:at(t)}):G==="loading"?l.jsx(Jn,{toolCallId:Ye,anchorMs:at(t)}):U?u("chat.generic.cancelled"):K?u("chat.generic.failed"):aa(t.state,t.output,Q,u),e[16]=G,e[17]=K,e[18]=U,e[19]=t,e[20]=u,e[21]=S,e[22]=Q,e[23]=ne}else Q=e[22],ne=e[23];const oe=ne;let ee="";t.input!==void 0&&(ee=`# Input
27
- `+_e(t.input)),t.state==="output-error"?(ee&&(ee=ee+`
28
-
29
- `),ee=ee+(`# Error
30
- `+(Q??""))):t.output!==void 0&&!A&&(ee&&(ee=ee+`
31
-
32
- `),ee=ee+(`# Output
33
- `+_e(t.output)));let re;e:{if(W){let se;e[29]===Symbol.for("react.memo_cache_sentinel")?(se=l.jsx(ln,{}),e[29]=se):se=e[29],re=se;break e}if(A){let se;e[30]===Symbol.for("react.memo_cache_sentinel")?(se=l.jsx(mt,{className:"size-4 text-muted-foreground"}),e[30]=se):se=e[30],re=se;break e}const J=N?.icon;if(J){let se;e[31]!==J?(se=l.jsx(J,{className:"size-4 text-muted-foreground"}),e[31]=J,e[32]=se):se=e[32],re=se;break e}let te;e[33]===Symbol.for("react.memo_cache_sentinel")?(te=l.jsx(ys,{className:"size-4 text-muted-foreground"}),e[33]=te):te=e[33],re=te}let F;e[34]!==n||e[35]!==i?(F=l.jsx(ta,{annotations:n,toolMeta:i}),e[34]=n,e[35]=i,e[36]=F):F=e[36];let O;e[37]!==a||e[38]!==o?(O=l.jsx(na,{latency:a,outputBytes:o}),e[37]=a,e[38]=o,e[39]=O):O=e[39];let q;e[40]!==F||e[41]!==O?(q=l.jsxs(l.Fragment,{children:[F,O]}),e[40]=F,e[41]=O,e[42]=q):q=e[42];const ae=ee||null;let le;e[43]!==G||e[44]!==v||e[45]!==W||e[46]!==oe||e[47]!==q||e[48]!==ae||e[49]!==re?(le=l.jsx(Y,{icon:re,iconDestructive:W,trailing:q,title:v,summary:oe,state:G,detail:ae}),e[43]=G,e[44]=v,e[45]=W,e[46]=oe,e[47]=q,e[48]=ae,e[49]=re,e[50]=le):le=e[50];let ue;e[51]!==L||e[52]!==$||e[53]!==u?(ue=L&&l.jsx("div",{className:"flex justify-end mt-1.5 mb-1",children:l.jsxs("button",{type:"button",onClick:$,className:"flex items-center gap-1.5 px-2 py-1 text-xs text-muted-foreground rounded-lg [@media(hover:hover)]:hover:bg-accent/50 [@media(hover:hover)]:hover:text-foreground transition-colors",children:[l.jsx(bs,{className:"size-3.5"}),u("chat.generic.openInPanel")]})}),e[51]=L,e[52]=$,e[53]=u,e[54]=ue):ue=e[54];let ie;e[55]!==L||e[56]!==m||e[57]!==b||e[58]!==v||e[59]!==B||e[60]!==R||e[61]!==A||e[62]!==j||e[63]!==p.id||e[64]!==p.slug||e[65]!==t.input||e[66]!==t.output||e[67]!==P||e[68]!==u||e[69]!==S||e[70]!==T?(ie=A&&T&&b&&p?.id&&l.jsx(l.Fragment,{children:l.jsx(ss,{fallback:J=>{const{resetError:te}=J;return l.jsxs("div",{className:"mt-2 flex items-center gap-2 px-3 py-2.5 border border-dashed border-destructive/30 bg-destructive/5 rounded-lg",children:[l.jsx(_t,{size:16,className:"shrink-0 text-destructive"}),l.jsx("span",{className:"flex-1 text-xs text-destructive font-medium",children:u("chat.generic.failedToLoad",{toolName:v})}),l.jsxs(Ue,{size:"sm",variant:"outline",className:"h-7 text-xs gap-1.5 shrink-0",onClick:te,children:[l.jsx(dt,{className:"size-3.5"}),u("chat.generic.retry")]})]})},children:l.jsx(z.Suspense,{fallback:l.jsx("div",{className:"mt-2 flex items-center justify-center h-12 border border-border/75 rounded-lg overflow-hidden p-3",children:l.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[l.jsx(ns,{className:"size-4"}),l.jsx("span",{className:"text-sm",children:u("chat.generic.loadingApp")})]})}),children:l.jsx(ra,{uiResourceUri:T,connectionId:b,orgId:p.id,orgSlug:p.slug,toolName:S,toolInput:t.input,toolResult:t.output,toolMeta:j,onMessage:B,onUpdateModelContext:P&&m?J=>m.setAppContext(P,J):void 0,onTeardown:P&&m?()=>m.clearAppContext(P):void 0,onRequestDisplayMode:L?R:void 0})})})}),e[55]=L,e[56]=m,e[57]=b,e[58]=v,e[59]=B,e[60]=R,e[61]=A,e[62]=j,e[63]=p.id,e[64]=p.slug,e[65]=t.input,e[66]=t.output,e[67]=P,e[68]=u,e[69]=S,e[70]=T,e[71]=ie):ie=e[71];let ce;return e[72]!==le||e[73]!==ue||e[74]!==ie?(ce=l.jsxs("div",{children:[le,ue,ie]}),e[72]=le,e[73]=ue,e[74]=ie,e[75]=ce):ce=e[75],ce}function Ft(s){return typeof s=="object"&&s!=null&&"type"in s&&s.type==="mcpToolCall"}function la(s){if(s!=null)return Ft(s)?s.arguments??void 0:s}function oa(s){if(s==null)return;if(Ft(s)&&s.result!=null)return s.result;if(typeof s=="object"&&"content"in s&&Array.isArray(s.content)){const t=s.content;if(t.length>0&&typeof t[0]=="object"&&t[0]!=null&&"type"in t[0])return s}const e=typeof s=="string"?s:JSON.stringify(s);return{structuredContent:typeof s=="object"&&!Array.isArray(s)?s:void 0,content:[{type:"text",text:e}]}}function ra(s){const e=M.c(27),{uiResourceUri:t,connectionId:n,orgId:a,orgSlug:o,toolName:c,toolInput:i,toolResult:u,toolMeta:r,onMessage:f,onUpdateModelContext:d,onTeardown:m,onRequestDisplayMode:p}=s;let g;e[0]!==n||e[1]!==a||e[2]!==o?(g={connectionId:n,orgId:a,orgSlug:o},e[0]=n,e[1]=a,e[2]=o,e[3]=g):g=e[3];const x=tn(g);let h;e[4]===Symbol.for("react.memo_cache_sentinel")?(h={type:"object"},e[4]=h):h=e[4];let y;e[5]!==r?(y=r!=null&&{_meta:r},e[5]=r,e[6]=y):y=e[6];let b;e[7]!==y||e[8]!==c?(b={name:c,inputSchema:h,...y},e[7]=y,e[8]=c,e[9]=b):b=e[9];const k=b;let j;e[10]!==k?(j={tool:k},e[10]=k,e[11]=j):j=e[11];let w;e[12]!==i?(w=la(i),e[12]=i,e[13]=w):w=e[13];let S;e[14]!==u?(S=oa(u),e[14]=u,e[15]=S):S=e[15];let N;return e[16]!==x||e[17]!==f||e[18]!==p||e[19]!==m||e[20]!==d||e[21]!==a||e[22]!==j||e[23]!==w||e[24]!==S||e[25]!==t?(N=l.jsx("div",{className:"mt-2 border border-border/75 rounded-lg overflow-hidden p-3",children:l.jsx(Ys,{resourceURI:t,orgId:a,toolInfo:j,toolInput:w,toolResult:S,client:x,onMessage:f,onUpdateModelContext:d,onTeardown:m,onRequestDisplayMode:p})}),e[16]=x,e[17]=f,e[18]=p,e[19]=m,e[20]=d,e[21]=a,e[22]=j,e[23]=w,e[24]=S,e[25]=t,e[26]=N):N=e[26],N}const ot="studio-storage://",rt="mesh-storage://";function Je(s){return s.startsWith(ot)?s.slice(ot.length):s.startsWith(rt)?s.slice(rt.length):null}function Dt(s,e){const t=Je(s);return t!==null?`/api/${e}/files/${t}`:s}function Ot(s){const e=M.c(7),{srcs:t,alt:n}=s;let a;if(e[0]!==n||e[1]!==t){let c;e[3]!==n?(c=i=>l.jsx(un,{src:i,alt:n,children:l.jsx("img",{src:i,alt:n,className:"max-w-sm max-h-80 object-contain rounded-lg border border-border hover:border-foreground/20 transition-colors"})},i),e[3]=n,e[4]=c):c=e[4],a=t.map(c),e[0]=n,e[1]=t,e[2]=a}else a=e[2];let o;return e[5]!==a?(o=l.jsx("div",{className:"flex flex-wrap gap-2",children:a}),e[5]=a,e[6]=o):o=e[6],o}const ia=ls({image_url:os({protocol:/^https$/})});function ca(s){if(typeof s!="string")return null;try{const e=ia.safeParse(JSON.parse(s.split(`
34
- `,1)[0]??""));return e.success?e.data.image_url:null}catch{return null}}function ua(s){return Array.isArray(s?.images)?s.images:void 0}function da(s){if(!s?.usage)return null;const e=s.usage.inputTokens??0,t=s.usage.outputTokens??0,n=e+t;return n?{inputTokens:e,outputTokens:t,reasoningTokens:0,totalTokens:n,cost:0,cacheReadTokens:0,cacheWriteTokens:0}:null}function fa(s){const e=M.c(14),{uri:t,orgSlug:n}=s,a=H();let o;e[0]!==n||e[1]!==t?(o=Dt(t,n),e[0]=n,e[1]=t,e[2]=o):o=e[2];const c=o;let i;e[3]!==a||e[4]!==t?(i=Je(t)!==null?t.slice(t.lastIndexOf("/")+1):a("chat.generateImage.reference"),e[3]=a,e[4]=t,e[5]=i):i=e[5];const u=i;let r;e[6]!==u?(r=l.jsx(jt,{asChild:!0,children:l.jsx("span",{className:"inline-flex items-center gap-1 px-1 py-0.5 rounded bg-muted text-muted-foreground text-xs cursor-default select-none",children:u})}),e[6]=u,e[7]=r):r=e[7];let f;e[8]!==u||e[9]!==c?(f=l.jsx(vt,{side:"top",className:"max-w-sm p-1.5",children:l.jsx("img",{src:c,alt:u,className:"max-w-full max-h-64 object-contain rounded"})}),e[8]=u,e[9]=c,e[10]=f):f=e[10];let d;return e[11]!==r||e[12]!==f?(d=l.jsxs(St,{children:[r,f]}),e[11]=r,e[12]=f,e[13]=d):d=e[13],d}function ma(s){const e=M.c(64),{part:t,latency:n}=s,a=H(),o=ft();let c;e[0]!==t.state?(c=pe(t.state),e[0]=t.state,e[1]=c):c=e[1];const i=c,u=t.input,r=t.output,f=ua(r);let d;e[2]!==r?(d=da(r),e[2]=r,e[3]=d):d=e[3];const m=d,g=Tt()?r?.model:void 0,x=Array.isArray(u?.referenceImages)?u.referenceImages.filter(pa):void 0;let h;e[4]!==n?(h=n!=null&&n>0?l.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground/60",children:be(n)}):null,e[4]=n,e[5]=h):h=e[5];const y=h;if(i==="loading"){let I;e[6]===Symbol.for("react.memo_cache_sentinel")?(I=l.jsx(Ne,{size:14}),e[6]=I):I=e[6];let $;e[7]!==a?($=a("chat.generateImage.generatingImage"),e[7]=a,e[8]=$):$=e[8];let C;e[9]!==u?(C=u?.prompt?`"${u.prompt.slice(0,80)}…"`:void 0,e[9]=u,e[10]=C):C=e[10];let R;return e[11]!==$||e[12]!==C?(R=l.jsx(Y,{icon:I,title:$,summary:C,state:"loading"}),e[11]=$,e[12]=C,e[13]=R):R=e[13],R}if(r?.background){let I;e[14]===Symbol.for("react.memo_cache_sentinel")?(I=l.jsx(Ne,{size:14}),e[14]=I):I=e[14];let $;e[15]!==a?($=a("chat.generateImage.imageQueuedGeneratingInBackground"),e[15]=a,e[16]=$):$=e[16];let C;e[17]!==u?(C=u?.prompt?`"${u.prompt.slice(0,80)}…"`:void 0,e[17]=u,e[18]=C):C=e[18];let R;return e[19]!==$||e[20]!==C?(R=l.jsx(Y,{icon:I,title:$,summary:C,state:"idle"}),e[19]=$,e[20]=C,e[21]=R):R=e[21],R}if(i==="error"||!f||f.length===0){let I;e[22]!==t||e[23]!==i?(I=i==="error"?Me(t):void 0,e[22]=t,e[23]=i,e[24]=I):I=e[24];const $=I;let C="";u!==void 0&&(C=`# Input
35
- `+_e(u)),$?(C&&(C=C+`
36
-
37
- `),C=C+(`# Error
38
- `+$)):r!==void 0&&(C&&(C=C+`
39
-
40
- `),C=C+(`# Output
41
- `+_e(r)));let R;e[25]===Symbol.for("react.memo_cache_sentinel")?(R=l.jsx(Ne,{size:14}),e[25]=R):R=e[25];let D;e[26]!==a?(D=a("chat.generateImage.imageGeneration"),e[26]=a,e[27]=D):D=e[27];let B;e[28]!==i||e[29]!==a?(B=a(i==="error"?"chat.generateImage.failed":"chat.generateImage.noImagesGenerated"),e[28]=i,e[29]=a,e[30]=B):B=e[30];const U=i==="error"?"error":"idle",W=C||null;let K;return e[31]!==y||e[32]!==D||e[33]!==B||e[34]!==U||e[35]!==W||e[36]!==m?(K=l.jsx(Y,{icon:R,title:D,summary:B,state:U,usage:m,trailing:y,detail:W}),e[31]=y,e[32]=D,e[33]=B,e[34]=U,e[35]=W,e[36]=m,e[37]=K):K=e[37],K}const b="flex flex-col gap-2";let k;e[38]===Symbol.for("react.memo_cache_sentinel")?(k=l.jsx(Ne,{size:14,className:"text-special"}),e[38]=k):k=e[38];let j;e[39]!==a?(j=a("chat.generateImage.generatedImage"),e[39]=a,e[40]=j):j=e[40];let w;e[41]!==u?(w=u?.prompt&&l.jsx("p",{className:"text-xs text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:u.prompt}),e[41]=u,e[42]=w):w=e[42];const S=x&&x.length>0&&l.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[l.jsx("span",{className:"text-[11px] text-muted-foreground/50",children:a("chat.generateImage.references")}),x.map((I,$)=>{const C=I.uri??I.url;return l.jsx(fa,{uri:C,orgSlug:o.slug},$)})]});let N;e[43]!==w||e[44]!==S?(N=l.jsxs("div",{className:"flex flex-col gap-1 pb-2 pl-6",children:[w,S]}),e[43]=w,e[44]=S,e[45]=N):N=e[45];let v;e[46]!==y||e[47]!==g||e[48]!==j||e[49]!==N||e[50]!==m?(v=l.jsx(Y,{icon:k,title:j,summary:g,state:"idle",usage:m,trailing:y,children:N}),e[46]=y,e[47]=g,e[48]=j,e[49]=N,e[50]=m,e[51]=v):v=e[51];const _=Ot;let T;e[52]!==o?(T=I=>{const $=I.uri??I.url;return $?[Dt($,o.slug)]:[]},e[52]=o,e[53]=T):T=e[53];const A=f.flatMap(T);let P;e[54]!==u?.prompt||e[55]!==a?(P=u?.prompt??a("chat.generateImage.generatedImageAlt"),e[54]=u?.prompt,e[55]=a,e[56]=P):P=e[56];let E;e[57]!==_||e[58]!==A||e[59]!==P?(E=l.jsx(_,{srcs:A,alt:P}),e[57]=_,e[58]=A,e[59]=P,e[60]=E):E=e[60];let L;return e[61]!==v||e[62]!==E?(L=l.jsxs("div",{className:b,children:[v,E]}),e[61]=v,e[62]=E,e[63]=L):L=e[63],L}function pa(s){return s.uri??s.url}function ga(s,e){const t=Je(s);return t!==null?`/api/${e}/files/${t}`:s}function xa(s){if(!s?.usage)return null;const e=s.usage.inputTokens??0,t=s.usage.outputTokens??0,n=e+t;if(!n)return null;const a={providerMetadata:s.usage.providerMetadata};return{inputTokens:e,outputTokens:t,reasoningTokens:0,totalTokens:n,cost:Gs(a),cacheReadTokens:0,cacheWriteTokens:0}}function ha(s){try{return new URL(s).hostname.replace(/^www\./,"")}catch{return s}}function ba(s){try{return`${new URL(s).origin}/favicon.ico`}catch{return""}}function ya(s){const e=M.c(16),{citation:t,index:n}=s;let a;e[0]!==t.url?(a=ha(t.url),e[0]=t.url,e[1]=a):a=e[1];const o=a;let c;e[2]!==t.url?(c=ba(t.url),e[2]=t.url,e[3]=c):c=e[3];const i=c,u=t.title||o;let r;e[4]!==i?(r=l.jsx("img",{src:i,alt:"",className:"size-3.5 rounded-sm shrink-0",onError:ja}),e[4]=i,e[5]=r):r=e[5];let f;e[6]!==u?(f=l.jsx("span",{className:"truncate max-w-[180px]",children:u}),e[6]=u,e[7]=f):f=e[7];const d=n+1;let m;e[8]!==d?(m=l.jsxs("span",{className:"text-[10px] text-muted-foreground/50 tabular-nums shrink-0",children:["[",d,"]"]}),e[8]=d,e[9]=m):m=e[9];let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p=l.jsx(rs,{size:10,className:"shrink-0 opacity-0 group-hover/src:opacity-100 transition-opacity"}),e[10]=p):p=e[10];let g;return e[11]!==t.url||e[12]!==r||e[13]!==f||e[14]!==m?(g=l.jsxs("a",{href:t.url,target:"_blank",rel:"noopener noreferrer",className:"group/src inline-flex items-center gap-1.5 rounded-md border border-border/50 bg-muted/30 px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-muted/60 hover:border-border hover:text-foreground",children:[r,f,m,p]}),e[11]=t.url,e[12]=r,e[13]=f,e[14]=m,e[15]=g):g=e[15],g}function ja(s){s.target.style.display="none"}function va(s,e){return s.replace(/\[(\d+)\]/g,(t,n)=>{const a=parseInt(n,10)-1,o=e[a];return o?`[\\[${n}\\]](${o.url})`:t})}const Le=5;function Sa(s){const e=M.c(13),{citations:t}=s,n=H(),[a,o]=z.useState(!1),c=t.length>Le;let i;e[0]!==t||e[1]!==a?(i=a?t:t.slice(0,Le),e[0]=t,e[1]=a,e[2]=i):i=e[2];const u=i;let r;e[3]!==u?(r=u.map(ka),e[3]=u,e[4]=r):r=e[4];let f;e[5]!==t.length||e[6]!==a||e[7]!==c||e[8]!==n?(f=c&&l.jsx("button",{type:"button",onClick:()=>o(Na),className:"inline-flex items-center rounded-lg border border-border/50 bg-muted/30 px-2 py-1 text-xs text-muted-foreground transition-colors hover:bg-muted/60 hover:border-border hover:text-foreground",children:a?n("chat.webSearch.showLess"):n("chat.webSearch.showMore",{count:t.length-Le})}),e[5]=t.length,e[6]=a,e[7]=c,e[8]=n,e[9]=f):f=e[9];let d;return e[10]!==r||e[11]!==f?(d=l.jsxs("div",{className:"flex flex-wrap gap-1.5",children:[r,f]}),e[10]=r,e[11]=f,e[12]=d):d=e[12],d}function Na(s){return!s}function ka(s,e){return l.jsx(ya,{citation:s,index:e},s.url)}function wa(s){const e=M.c(61),{part:t,latency:n,streamingText:a}=s,o=H(),c=ft();let i;e[0]!==t.state?(i=pe(t.state),e[0]=t.state,e[1]=i):i=e[1];const u=i,r=t.input,f=t.output;let d,m,p;e[2]!==c||e[3]!==f?(d=f?.uri?ga(f.uri,c.slug):void 0,p=ut,m=xe.webSearchBlob(d??""),e[2]=c,e[3]=f,e[4]=d,e[5]=m,e[6]=p):(d=e[4],m=e[5],p=e[6]);let g;e[7]!==d?(g=async()=>{const X=await fetch(d);if(!X.ok)throw new Error(`Failed to fetch: ${X.status}`);return X.text()},e[7]=d,e[8]=g):g=e[8];const x=!!d;let h;e[9]!==m||e[10]!==g||e[11]!==x?(h={queryKey:m,queryFn:g,enabled:x,staleTime:1/0},e[9]=m,e[10]=g,e[11]=x,e[12]=h):h=e[12];const{data:y}=p(h),b=u==="loading",k=u!=="loading"&&u!=="error",j=Tt(),w=f?.citations;let S;e[13]!==f?(S=xa(f),e[13]=f,e[14]=S):S=e[14];const N=S,v=f?.content??y??a;let _;e[15]!==w||e[16]!==v?(_=v&&w?.length?va(v,w):v,e[15]=w,e[16]=v,e[17]=_):_=e[17];const T=_;let A;e[18]!==n?(A=n!=null&&n>0?l.jsx("span",{className:"text-[11px] font-mono tabular-nums text-muted-foreground/60",children:be(n)}):null,e[18]=n,e[19]=A):A=e[19];const P=A;if(u==="error"){let X;e[20]===Symbol.for("react.memo_cache_sentinel")?(X=l.jsx(ze,{size:14}),e[20]=X):X=e[20];let Z;e[21]!==o?(Z=o("chat.webSearch.title"),e[21]=o,e[22]=Z):Z=e[22];let G;e[23]!==o?(G=o("chat.webSearch.failed"),e[23]=o,e[24]=G):G=e[24];let Q;return e[25]!==P||e[26]!==Z||e[27]!==G||e[28]!==N?(Q=l.jsx(Y,{icon:X,title:Z,summary:G,state:"error",usage:N,trailing:P}),e[25]=P,e[26]=Z,e[27]=G,e[28]=N,e[29]=Q):Q=e[29],Q}const E=b?"animate-pulse":"text-blue-500";let L;e[30]!==E?(L=V(E),e[30]=E,e[31]=L):L=e[31];let I;e[32]!==L?(I=l.jsx(ze,{size:14,className:L}),e[32]=L,e[33]=I):I=e[33];let $;e[34]!==b||e[35]!==o?($=o(b?"chat.webSearch.researching":"chat.webSearch.title"),e[34]=b,e[35]=o,e[36]=$):$=e[36];let C;e[37]!==r||e[38]!==k||e[39]!==f?.model||e[40]!==j?(C=k?(j?f?.model:void 0)??r?.query?.slice(0,60):r?.query?`"${r.query.slice(0,80)}"`:void 0,e[37]=r,e[38]=k,e[39]=f?.model,e[40]=j,e[41]=C):C=e[41];const R=b?"loading":"idle";let D;e[42]!==r?(D=r?.query&&l.jsx("p",{className:"text-xs text-muted-foreground/70 whitespace-pre-wrap wrap-break-word",children:r.query}),e[42]=r,e[43]=D):D=e[43];let B;e[44]!==T||e[45]!==t.toolCallId?(B=T?l.jsx("div",{className:"max-h-96 overflow-y-auto overflow-x-hidden rounded-lg border border-border/40 bg-muted/20 px-4 py-3 min-w-0",children:l.jsx("div",{className:"prose prose-sm prose-neutral dark:prose-invert max-w-none text-[13px] leading-relaxed break-words",children:l.jsx(Ct,{id:t.toolCallId,text:T})})}):l.jsx("div",{className:"rounded-lg border border-border/40 bg-muted/20 px-4 py-3",children:l.jsxs("div",{className:"space-y-2 animate-pulse",children:[l.jsx("div",{className:"h-3 rounded bg-muted-foreground/10 w-3/4"}),l.jsx("div",{className:"h-3 rounded bg-muted-foreground/10 w-1/2"})]})}),e[44]=T,e[45]=t.toolCallId,e[46]=B):B=e[46];let U;e[47]!==w?(U=w&&w.length>0&&l.jsx(Sa,{citations:w}),e[47]=w,e[48]=U):U=e[48];let W;e[49]!==D||e[50]!==B||e[51]!==U?(W=l.jsxs("div",{className:"pl-6 pb-3 flex flex-col gap-1 min-w-0",children:[D,B,U]}),e[49]=D,e[50]=B,e[51]=U,e[52]=W):W=e[52];let K;return e[53]!==P||e[54]!==I||e[55]!==$||e[56]!==C||e[57]!==R||e[58]!==W||e[59]!==N?(K=l.jsx(Y,{icon:I,title:$,summary:C,state:R,usage:N,trailing:P,defaultOpen:!0,children:W}),e[53]=P,e[54]=I,e[55]=$,e[56]=C,e[57]=R,e[58]=W,e[59]=N,e[60]=K):K=e[60],K}function _a(s){const e=M.c(16),{part:t}=s,n=H();if(!t.state.startsWith("output-"))return null;let a;e[0]!==t.input?.prompt||e[1]!==n?(a=t.input?.prompt?.trim()||n("chat.userAskQuestion.question"),e[0]=t.input?.prompt,e[1]=n,e[2]=a):a=e[2];const o=a,c=t.state==="output-error"||t.state==="output-denied",i=t.state==="output-denied";let u;e[3]!==i||e[4]!==t||e[5]!==n?(u=i?n("chat.userAskQuestion.skippedAnswer"):t.state==="output-error"?Me(t)??n("chat.subtask.errorLabel"):t.output?.response??"",e[3]=i,e[4]=t,e[5]=n,e[6]=u):u=e[6];const r=u;let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx(js,{className:"size-4 text-muted-foreground/50 shrink-0 mt-0.5"}),e[7]=f):f=e[7];let d;e[8]!==o?(d=l.jsxs("div",{className:"flex items-start gap-2",children:[f,l.jsx("span",{className:"text-[14px] text-muted-foreground leading-snug",children:o})]}),e[8]=o,e[9]=d):d=e[9];let m;e[10]!==r||e[11]!==c?(m=r&&l.jsx("div",{className:"ml-6 pl-2 border-l border-border/50",children:l.jsx("span",{className:V("text-[14px] leading-snug",c?"text-muted-foreground/50 italic":"text-foreground/70"),children:r})}),e[10]=r,e[11]=c,e[12]=m):m=e[12];let p;return e[13]!==d||e[14]!==m?(p=l.jsxs("div",{className:"my-1.5 flex flex-col gap-1",children:[d,m]}),e[13]=d,e[14]=m,e[15]=p):p=e[15],p}function Ta(s){const e=M.c(14),{part:t}=s,n=H();if(!t.state.startsWith("output-")||As(t))return null;const a=t.output?.accepted===!0;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=l.jsx(vs,{className:"size-4 text-muted-foreground/50 shrink-0 mt-0.5"}),e[0]=o):o=e[0];const c=t.input?.title;let i;e[1]!==c?(i=l.jsx("span",{className:"text-[14px] leading-snug text-muted-foreground",children:c}),e[1]=c,e[2]=i):i=e[2];const u=a?"text-foreground/70":"text-muted-foreground/50 italic";let r;e[3]!==u?(r=V("text-[14px] leading-snug shrink-0",u),e[3]=u,e[4]=r):r=e[4];let f;e[5]!==a||e[6]!==n?(f=n(a?"chat.suggestTask.accepted":"chat.suggestTask.declined"),e[5]=a,e[6]=n,e[7]=f):f=e[7];let d;e[8]!==r||e[9]!==f?(d=l.jsx("span",{className:r,children:f}),e[8]=r,e[9]=f,e[10]=d):d=e[10];let m;return e[11]!==i||e[12]!==d?(m=l.jsxs("div",{className:"my-1.5 flex items-start gap-2",children:[o,i,d]}),e[11]=i,e[12]=d,e[13]=m):m=e[13],m}const Bt=z.createContext(new Map);function bo(s){const e=M.c(5),{messages:t,children:n}=s;let a;if(e[0]!==t){a=new Map;for(const c of t){const i=c.metadata?.subtaskJobId;if(!i)continue;const u=a.get(i);u?u.push(c):a.set(i,[c])}e[0]=t,e[1]=a}else a=e[1];let o;return e[2]!==a||e[3]!==n?(o=l.jsx(Bt.Provider,{value:a,children:n}),e[2]=a,e[3]=n,e[4]=o):o=e[4],o}function Ca(s){const e=M.c(3),t=z.useContext(Bt);let n;return e[0]!==s||e[1]!==t?(n=s?t.get(s)??[]:[],e[0]=s,e[1]=t,e[2]=n):n=e[2],n}function Ia(s){return new ReadableStream({async start(e){const t=s.getReader(),n=new TextDecoder;let a="";try{for(;;){const{done:o,value:c}=await t.read();if(o)break;a+=n.decode(c,{stream:!0});let i;for(;(i=a.indexOf(`
42
-
43
- `))!==-1;){const u=a.slice(0,i);a=a.slice(i+2);const r=u.split(`
44
- `).filter(f=>f.startsWith("data:")).map(f=>f.slice(5).trim()).join(`
45
- `);if(r)try{e.enqueue(JSON.parse(r))}catch{}}}}finally{t.releaseLock(),e.close()}}})}function $a(s){const{orgSlug:e,threadId:t,jobId:n,enabled:a}=s,[o,c]=z.useState([]),[i,u]=z.useState(!1);return z.useEffect(()=>{if(!a||!n||!t)return;const r=new AbortController;return c([]),u(!0),(async()=>{try{const f=await fetch(`/api/${encodeURIComponent(e)}/decopilot/threads/${encodeURIComponent(t)}/jobs/${encodeURIComponent(n)}/stream`,{headers:{accept:"text/event-stream"},credentials:"include",signal:r.signal});if(!f.ok||!f.body)return;for await(const d of Hs({stream:qs(Ia(f.body),void 0)})){if(r.signal.aborted)return;c([d])}}catch{}finally{r.signal.aborted||u(!1)}})(),()=>r.abort()},[a,n,t,e]),{messages:o,streaming:i}}function Ma(s,e){if(s&&typeof s=="object"&&!Array.isArray(s)){const t=s;if(typeof t.text=="string"||typeof t.error=="string"||typeof t.finishReason=="string"){if(typeof t.error=="string"&&t.error.length>0)return e("chat.subtask.failedWithError",{error:t.error});const a=typeof t.text=="string"?t.text.trim():"",o=t.finishReason==="length";return a?(o?`${e("chat.subtask.stepLimitPartial")}
46
-
47
- `:"")+a:e(o?"chat.subtask.stepLimitNoOutput":"chat.subtask.completedNoOutput")}}return Zn(s)}function Ut(s){return!!s&&typeof s=="object"&&s.background===!0}function Ht({part:s,subtaskMeta:e},t){const n=s.state==="input-streaming"||s.state==="input-available",a=s.state==="output-available"&&s.preliminary===!0,o=s.state==="output-available"&&!s.preliminary,c=s.state==="output-error",i=pe(s.state,"preliminary"in s?s.preliminary:!1),u=i==="approval"?"idle":i,r=t(n?"chat.subtask.startingEllipsis":a?"chat.subtask.runningEllipsis":o?"chat.subtask.completedTitle":c?"chat.subtask.failedTitle":"chat.subtask.subtaskNoun"),f=s.input?.prompt??"",d=s.state==="approval-requested"?t("chat.subtask.awaitingApproval"):f.length>120?f.slice(0,120)+"…":f;return{fallbackTitle:r,summary:d,usage:e?.usage,state:u}}function qt(s){return s.state==="input-available"?!0:s.state==="output-available"?"preliminary"in s&&s.preliminary===!0:!1}function Wt(s){const e=M.c(4),t=je()?.taskId??null,{org:n}=me();if(!t)return null;let a;return e[0]!==n||e[1]!==t||e[2]!==s?(a=async()=>{if(t===null)return;const o=await fetch(`/api/${encodeURIComponent(n.slug)}/decopilot/flip/${encodeURIComponent(t)}`,{method:"POST",credentials:"include",headers:{"content-type":"application/json"},body:JSON.stringify({toolCallId:s})});if(!o.ok)throw new Error(`flip failed: ${o.status}`)},e[0]=n,e[1]=t,e[2]=s,e[3]=a):a=e[3],a}function Aa(s){const e=M.c(10),{onFlip:t}=s,n=H(),[a,o]=z.useState(!1);let c;e[0]!==t?(c=async f=>{f.stopPropagation(),o(!0);try{await t()}catch{o(!1)}},e[0]=t,e[1]=c):c=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=V("shrink-0 text-[12px] text-muted-foreground/70 px-2 py-1 rounded-lg transition-colors","[@media(hover:hover)]:hover:text-foreground [@media(hover:hover)]:hover:bg-accent/40","disabled:opacity-50"),e[2]=i):i=e[2];let u;e[3]!==a||e[4]!==n?(u=n(a?"chat.subtask.flipping":"chat.subtask.flipToBackground"),e[3]=a,e[4]=n,e[5]=u):u=e[5];let r;return e[6]!==a||e[7]!==c||e[8]!==u?(r=l.jsx("button",{type:"button",disabled:a,onClick:c,className:i,children:u}),e[6]=a,e[7]=c,e[8]=u,e[9]=r):r=e[9],r}function Qe(s){const e=M.c(54),{icon:t,title:n,summary:a,state:o,usage:c,latency:i,onOpenChange:u,onFlip:r,children:f}=s,[d,m]=z.useState(!1);let p;e[0]!==u?(p=K=>{m(K),u?.(K)},e[0]=u,e[1]=p):p=e[1];const g=p,x=o==="loading",h=o==="error";let y;e[2]!==g?(y=()=>g(!0),e[2]=g,e[3]=y):y=e[3];const b=x&&"shimmer";let k;e[4]!==b?(k=V("group/tool flex items-center gap-2 flex-1 min-w-0 py-2.5 text-left rounded-lg transition-colors","[@media(hover:hover)]:hover:bg-accent/30",b),e[4]=b,e[5]=k):k=e[5];const j=h?"[&>svg]:text-warning/70":"[&>svg]:text-muted-foreground/75";let w;e[6]!==j?(w=V("relative shrink-0 size-4 flex items-center justify-center [&>svg]:size-4",j),e[6]=j,e[7]=w):w=e[7];let S;e[8]!==t||e[9]!==w?(S=l.jsx("div",{className:w,children:t}),e[8]=t,e[9]=w,e[10]=S):S=e[10];const N=h?"text-warning/80":"text-foreground";let v;e[11]!==N?(v=V("shrink-0 text-[14px] font-normal",N),e[11]=N,e[12]=v):v=e[12];let _;e[13]!==v||e[14]!==n?(_=l.jsx("span",{className:v,children:n}),e[13]=v,e[14]=n,e[15]=_):_=e[15];let T;e[16]!==a?(T=a?l.jsx("span",{className:"min-w-0 flex-1 truncate",children:l.jsx("span",{className:"text-[12px] text-muted-foreground/60 bg-muted/50 rounded-[3px] px-1 py-px leading-none",children:a})}):l.jsx("div",{className:"flex-1"}),e[16]=a,e[17]=T):T=e[17];let A;e[18]===Symbol.for("react.memo_cache_sentinel")?(A=l.jsx(is,{className:"size-3.5 shrink-0 text-muted-foreground/40 opacity-0 transition-opacity [@media(hover:hover)]:group-hover/tool:opacity-100"}),e[18]=A):A=e[18];let P;e[19]!==i?(P=l.jsx(fe,{latency:i}),e[19]=i,e[20]=P):P=e[20];let E;e[21]!==c?(E=l.jsx(ht,{usage:c}),e[21]=c,e[22]=E):E=e[22];let L;e[23]!==_||e[24]!==T||e[25]!==P||e[26]!==E||e[27]!==y||e[28]!==k||e[29]!==S?(L=l.jsxs("button",{type:"button",onClick:y,className:k,children:[S,_,T,A,P,E]}),e[23]=_,e[24]=T,e[25]=P,e[26]=E,e[27]=y,e[28]=k,e[29]=S,e[30]=L):L=e[30];let I;e[31]!==x||e[32]!==r?(I=r&&x?l.jsx(Aa,{onFlip:r}):null,e[31]=x,e[32]=r,e[33]=I):I=e[33];let $;e[34]!==L||e[35]!==I?($=l.jsxs("div",{className:"flex items-center gap-1 w-full",children:[L,I]}),e[34]=L,e[35]=I,e[36]=$):$=e[36];let C;e[37]!==t?(C=l.jsx("span",{className:"flex items-center [&>svg]:size-4 [&>svg]:text-muted-foreground/75",children:t}),e[37]=t,e[38]=C):C=e[38];let R;e[39]!==C||e[40]!==n?(R=l.jsx(dn,{className:"px-4 py-3 border-b border-border shrink-0",children:l.jsxs(fn,{className:"flex items-center gap-2 text-sm font-medium",children:[C,n]})}),e[39]=C,e[40]=n,e[41]=R):R=e[41];let D;e[42]!==f?(D=l.jsx("div",{className:"flex-1 min-h-0 overflow-y-auto px-4 py-4",children:f}),e[42]=f,e[43]=D):D=e[43];let B;e[44]!==R||e[45]!==D?(B=l.jsxs(mn,{side:"right",className:"w-full sm:max-w-2xl flex flex-col p-0 gap-0",children:[R,D]}),e[44]=R,e[45]=D,e[46]=B):B=e[46];let U;e[47]!==d||e[48]!==g||e[49]!==B?(U=l.jsx(pn,{open:d,onOpenChange:g,children:B}),e[47]=d,e[48]=g,e[49]=B,e[50]=U):U=e[50];let W;return e[51]!==$||e[52]!==U?(W=l.jsxs(l.Fragment,{children:[$,U]}),e[51]=$,e[52]=U,e[53]=W):W=e[53],W}function Gt(s){const e=M.c(22),{part:t}=s,n=H(),a=t.state==="output-error";let o;e[0]!==t.input?.prompt||e[1]!==n?(o=t.input?.prompt??n("chat.subtask.noPromptProvided"),e[0]=t.input?.prompt,e[1]=n,e[2]=o):o=e[2];const c=o;let i;if(e[3]!==a||e[4]!==t||e[5]!==c||e[6]!==n){const u=a?Me(t):Ma(t.output,n)??"";let r;e[8]!==n?(r=n("chat.subtask.taskLabel"),e[8]=n,e[9]=r):r=e[9];let f;e[10]!==r?(f=l.jsx("h3",{className:"text-xs font-medium text-muted-foreground/70 mb-1.5",children:r}),e[10]=r,e[11]=f):f=e[11];let d;e[12]!==c?(d=l.jsx("p",{className:"text-[13px] text-foreground/90 whitespace-pre-wrap wrap-break-word",children:c}),e[12]=c,e[13]=d):d=e[13];let m;e[14]!==f||e[15]!==d?(m=l.jsxs("section",{children:[f,d]}),e[14]=f,e[15]=d,e[16]=m):m=e[16];let p;e[17]!==a||e[18]!==n?(p=n(a?"chat.subtask.errorLabel":"chat.subtask.resultLabel"),e[17]=a,e[18]=n,e[19]=p):p=e[19];let g;e[20]!==p?(g=l.jsx("h3",{className:"text-xs font-medium text-muted-foreground/70 mb-1.5",children:p}),e[20]=p,e[21]=g):g=e[21],i=l.jsxs("div",{className:"flex flex-col gap-4",children:[m,l.jsxs("section",{children:[g,u.trim()?l.jsx(Ct,{id:`${t.toolCallId}-result`,text:u}):l.jsx("p",{className:"text-[13px] text-muted-foreground/60 italic",children:n("chat.subtask.running")})]})]}),e[3]=a,e[4]=t,e[5]=c,e[6]=n,e[7]=i}else i=e[7];return i}const Ee=600;function Pa(s){const e=M.c(12),{part:t}=s,n=t.type??"";let a;e[0]!==t.toolName||e[1]!==n?(a=n==="dynamic-tool"?t.toolName??"tool":n.slice(5),e[0]=t.toolName,e[1]=n,e[2]=a):a=e[2];const o=a;let c;if(e[3]!==t.input){const m=t.input!=null?JSON.stringify(t.input):"";c=m.length>80?`${m.slice(0,80)}…`:m||void 0,e[3]=t.input,e[4]=c}else c=e[4];const i=c;let u;if(e[5]!==t.input){const m=t.input!=null?JSON.stringify(t.input,null,2):null;u=m&&m.length>Ee?`${m.slice(0,Ee)}
48
- … (${m.length-Ee} more characters)`:m,e[5]=t.input,e[6]=u}else u=e[6];const r=u;let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx(pt,{}),e[7]=f):f=e[7];let d;return e[8]!==r||e[9]!==o||e[10]!==i?(d=l.jsx(Y,{icon:f,title:o,summary:i,state:"idle",detail:r,detailVariant:"code"}),e[8]=r,e[9]=o,e[10]=i,e[11]=d):d=e[11],d}function La(s){const e=M.c(19),{jobId:t,prompt:n,items:a,streaming:o}=s,c=H();let i;e[0]!==c?(i=c("chat.subtask.taskLabel"),e[0]=c,e[1]=i):i=e[1];let u;e[2]!==i?(u=l.jsx("h3",{className:"text-xs font-medium text-muted-foreground/70 mb-1.5",children:i}),e[2]=i,e[3]=u):u=e[3];let r;e[4]!==n?(r=l.jsx("p",{className:"text-[13px] text-foreground/90 whitespace-pre-wrap wrap-break-word",children:n}),e[4]=n,e[5]=r):r=e[5];let f;e[6]!==u||e[7]!==r?(f=l.jsxs("section",{children:[u,r]}),e[6]=u,e[7]=r,e[8]=f):f=e[8];let d;e[9]!==a||e[10]!==t||e[11]!==o||e[12]!==c?(d=a.length===0?l.jsx("p",{className:"text-[13px] text-muted-foreground/60 italic py-1",children:c("chat.subtask.runningInBackground")}):a.map((g,x)=>{const h=g,y=h.type??"";return y==="text"?h.text?.trim()?l.jsx(Ce,{id:`${t}-sub-${x}`,part:g,animate:o},`${t}-sub-${x}`):null:y==="dynamic-tool"||y.startsWith("tool-")&&y!=="tool-todo_write"&&y!=="tool-update_interests"?l.jsx(Pa,{part:h},`${t}-sub-${x}`):null}),e[9]=a,e[10]=t,e[11]=o,e[12]=c,e[13]=d):d=e[13];let m;e[14]!==d?(m=l.jsx("section",{className:"flex flex-col gap-3 sm:gap-2",children:d}),e[14]=d,e[15]=m):m=e[15];let p;return e[16]!==f||e[17]!==m?(p=l.jsxs("div",{className:"flex flex-col gap-4",children:[f,m]}),e[16]=f,e[17]=m,e[18]=p):p=e[18],p}function Kt(s){const e=M.c(32),{part:t}=s,n=H(),a=t.output?.jobId,o=je()?.taskId??null,{org:c}=me(),[i,u]=z.useState(!1),r=Ca(a),f=o??"",d=i&&!!o;let m;e[0]!==a||e[1]!==c.slug||e[2]!==f||e[3]!==d?(m={orgSlug:c.slug,threadId:f,jobId:a,enabled:d},e[0]=a,e[1]=c.slug,e[2]=f,e[3]=d,e[4]=m):m=e[4];const p=$a(m);let g;e[5]!==p.messages?(g=p.messages.flatMap(Ra),e[5]=p.messages,e[6]=g):g=e[6];const x=g;let h;e[7]!==r?(h=r.flatMap(Ea),e[7]=r,e[8]=h):h=e[8];const y=h,b=x.length>0?x:y;let k;e[9]!==t.input?.prompt||e[10]!==n?(k=t.input?.prompt??n("chat.subtask.noPromptProvided"),e[9]=t.input?.prompt,e[10]=n,e[11]=k):k=e[11];const j=k;let w;e[12]!==j?(w=j.length>120?`${j.slice(0,120)}…`:j,e[12]=j,e[13]=w):w=e[13];const S=w,N=r.length===0;let v;e[14]!==n?(v=n("chat.subtask.subtaskNoun"),e[14]=n,e[15]=v):v=e[15];let _;e[16]===Symbol.for("react.memo_cache_sentinel")?(_=l.jsx(He,{}),e[16]=_):_=e[16];let T;e[17]!==v?(T=l.jsx(ve,{icon:void 0,name:v,size:"2xs",className:"rounded-xs",fallbackIcon:_}),e[17]=v,e[18]=T):T=e[18];let A;e[19]!==n?(A=n("chat.subtask.subtaskNoun"),e[19]=n,e[20]=A):A=e[20];const P=N?"loading":"idle",E=p.streaming||N;let L;e[21]!==b||e[22]!==a||e[23]!==j||e[24]!==E?(L=l.jsx(La,{jobId:a,prompt:j,items:b,streaming:E}),e[21]=b,e[22]=a,e[23]=j,e[24]=E,e[25]=L):L=e[25];let I;return e[26]!==S||e[27]!==T||e[28]!==A||e[29]!==P||e[30]!==L?(I=l.jsx(Qe,{icon:T,title:A,summary:S,state:P,onOpenChange:u,children:L}),e[26]=S,e[27]=T,e[28]=A,e[29]=P,e[30]=L,e[31]=I):I=e[31],I}function Ea(s){return s.parts??[]}function Ra(s){return s.parts??[]}function za(s){const e=M.c(24),t=H(),n=Wt(s.part.toolCallId);if(Ut(s.part.output)){let x;return e[0]!==s?(x=l.jsx(Kt,{...s}),e[0]=s,e[1]=x):x=e[1],x}let a;e[2]!==s||e[3]!==t?(a=Ht(s,t),e[2]=s,e[3]=t,e[4]=a):a=e[4];const{fallbackTitle:o,summary:c,usage:i,state:u}=a;let r;e[5]!==t?(r=t("chat.subtask.subtaskNoun"),e[5]=t,e[6]=r):r=e[6];let f;e[7]===Symbol.for("react.memo_cache_sentinel")?(f=l.jsx(He,{}),e[7]=f):f=e[7];let d;e[8]!==r?(d=l.jsx(ve,{icon:void 0,name:r,size:"2xs",className:"rounded-xs",fallbackIcon:f}),e[8]=r,e[9]=d):d=e[9];let m;e[10]!==n||e[11]!==s.part?(m=n&&qt(s.part)?n:void 0,e[10]=n,e[11]=s.part,e[12]=m):m=e[12];let p;e[13]!==s.part?(p=l.jsx(Gt,{part:s.part}),e[13]=s.part,e[14]=p):p=e[14];let g;return e[15]!==o||e[16]!==s.latency||e[17]!==u||e[18]!==c||e[19]!==d||e[20]!==m||e[21]!==p||e[22]!==i?(g=l.jsx(Qe,{icon:d,title:o,summary:c,state:u,usage:i,latency:s.latency,onFlip:m,children:p}),e[15]=o,e[16]=s.latency,e[17]=u,e[18]=c,e[19]=d,e[20]=m,e[21]=p,e[22]=i,e[23]=g):g=e[23],g}function Fa(s){const e=M.c(26),t=H(),n=It(s.part.input?.agent_id),a=Wt(s.part.toolCallId);if(Ut(s.part.output)){let b;return e[0]!==s?(b=l.jsx(Kt,{...s}),e[0]=s,e[1]=b):b=e[1],b}let o;e[2]!==s||e[3]!==t?(o=Ht(s,t),e[2]=s,e[3]=t,e[4]=o):o=e[4];const{fallbackTitle:c,summary:i,usage:u,state:r}=o,f=n?.icon;let d;e[5]!==t||e[6]!==n?.title?(d=n?.title??t("chat.subtask.subtaskNoun"),e[5]=t,e[6]=n?.title,e[7]=d):d=e[7];let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=l.jsx(He,{}),e[8]=m):m=e[8];let p;e[9]!==f||e[10]!==d?(p=l.jsx(ve,{icon:f,name:d,size:"2xs",className:"rounded-xs",fallbackIcon:m}),e[9]=f,e[10]=d,e[11]=p):p=e[11];const g=n?.title??c;let x;e[12]!==a||e[13]!==s.part?(x=a&&qt(s.part)?a:void 0,e[12]=a,e[13]=s.part,e[14]=x):x=e[14];let h;e[15]!==s.part?(h=l.jsx(Gt,{part:s.part}),e[15]=s.part,e[16]=h):h=e[16];let y;return e[17]!==s.latency||e[18]!==r||e[19]!==i||e[20]!==p||e[21]!==g||e[22]!==x||e[23]!==h||e[24]!==u?(y=l.jsx(Qe,{icon:p,title:g,summary:i,state:r,usage:u,latency:s.latency,onFlip:x,children:h}),e[17]=s.latency,e[18]=r,e[19]=i,e[20]=p,e[21]=g,e[22]=x,e[23]=h,e[24]=u,e[25]=y):y=e[25],y}function Da(s){const e=M.c(28),{part:t}=s,n=H();if(!t.state.startsWith("output-"))return null;const a=t.input?.plan??"",c=t.output?.approved===!0;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=l.jsx(Fe,{className:"size-4 text-special shrink-0"}),e[0]=i):i=e[0];let u;e[1]!==n?(u=n("chat.proposePlan.implementationPlan"),e[1]=n,e[2]=u):u=e[2];let r;e[3]!==u?(r=l.jsx("span",{className:"text-[14px] font-medium text-foreground/80",children:u}),e[3]=u,e[4]=r):r=e[4];let f;e[5]!==c||e[6]!==n?(f=c&&l.jsxs("span",{className:"flex items-center gap-1 text-xs text-success bg-success/10 px-1.5 py-0.5 rounded-md",children:[l.jsx(ct,{size:12}),n("chat.proposePlan.approved")]}),e[5]=c,e[6]=n,e[7]=f):f=e[7];let d;e[8]!==c||e[9]!==t.state||e[10]!==n?(d=!c&&t.state==="output-available"&&l.jsx("span",{className:"text-xs text-muted-foreground/70 italic",children:n("chat.proposePlan.rejected")}),e[8]=c,e[9]=t.state,e[10]=n,e[11]=d):d=e[11];let m;e[12]!==r||e[13]!==f||e[14]!==d?(m=l.jsxs("div",{className:"flex items-center gap-2",children:[i,r,f,d]}),e[12]=r,e[13]=f,e[14]=d,e[15]=m):m=e[15];let p;e[16]!==n?(p=n("chat.proposePlan.viewPlan"),e[16]=n,e[17]=p):p=e[17];let g;e[18]!==p?(g=l.jsx("summary",{className:"text-xs text-muted-foreground cursor-pointer hover:text-foreground transition-colors",children:p}),e[18]=p,e[19]=g):g=e[19];let x;e[20]!==a?(x=l.jsx("div",{className:"mt-1 pl-2 border-l-2 border-special/30 prose prose-sm max-w-none text-sm",children:l.jsx(Ce,{id:"plan-content",part:{type:"text",text:a}})}),e[20]=a,e[21]=x):x=e[21];let h;e[22]!==g||e[23]!==x?(h=l.jsxs("details",{className:"ml-6",children:[g,x]}),e[22]=g,e[23]=x,e[24]=h):h=e[24];let y;return e[25]!==h||e[26]!==m?(y=l.jsxs("div",{className:"my-1.5 flex flex-col gap-1",children:[m,h]}),e[25]=h,e[26]=m,e[27]=y):y=e[27],y}function Be(s){const e=M.c(4),{connection_id:t,iconSize:n}=s,a=n===void 0?"xs":n,o=It(t);if(!o)return null;let c;return e[0]!==o.icon||e[1]!==o.title||e[2]!==a?(c=l.jsx("div",{className:"shrink-0 bg-background ring-1 ring-background rounded-lg",children:l.jsx(ve,{icon:o.icon,name:o.title,size:a})}),e[0]=o.icon,e[1]=o.title,e[2]=a,e[3]=c):c=e[3],c}Be.Fallback=function({iconSize:e="xs"}){const t=e==="sm"?"size-6":"size-5";return l.jsx("div",{className:"shrink-0 bg-background ring-1 ring-background rounded-lg",children:l.jsx("div",{className:V(t,"rounded bg-muted animate-pulse")})})};function he(s){const e=M.c(18),{connectionIds:t,maxVisibleIcons:n,iconSize:a,className:o}=s,c=n===void 0?2:n,i=a===void 0?"xs":a;if(t.length===0)return null;let u,r,f;if(e[0]!==o||e[1]!==t||e[2]!==i||e[3]!==c){const p=t.slice(0,c);u=t.length-c,e[7]!==o?(r=V("flex items-center justify-end -space-x-2",o),e[7]=o,e[8]=r):r=e[8];let g;e[9]!==i?(g=x=>l.jsx(z.Suspense,{fallback:l.jsx(Be.Fallback,{iconSize:i}),children:l.jsx(Be,{connection_id:x,iconSize:i})},x),e[9]=i,e[10]=g):g=e[10],f=p.map(g),e[0]=o,e[1]=t,e[2]=i,e[3]=c,e[4]=u,e[5]=r,e[6]=f}else u=e[4],r=e[5],f=e[6];let d;e[11]!==i||e[12]!==u?(d=u>0&&l.jsx("div",{className:V("shrink-0 bg-background ring-1 ring-background border border-border rounded-lg flex items-center justify-center",i==="sm"?"size-8":"size-6"),children:l.jsxs("span",{className:V(i==="sm"?"text-sm":"text-xs","font-medium text-muted-foreground"),"aria-label":`and ${u} more`,children:["+",u]})}),e[11]=i,e[12]=u,e[13]=d):d=e[13];let m;return e[14]!==r||e[15]!==f||e[16]!==d?(m=l.jsxs("div",{className:r,children:[f,d]}),e[14]=r,e[15]=f,e[16]=d,e[17]=m):m=e[17],m}he.Fallback=function({maxVisibleIcons:e=2,totalCount:t,iconSize:n="xs"}){const a=n==="sm"?"size-6":"size-5",o=n==="sm"?"size-8":"size-6",c=t!==void 0&&t>e;return l.jsxs("div",{className:"flex items-center -space-x-2",children:[Array.from({length:e}).map((i,u)=>l.jsx("div",{className:"shrink-0 bg-background ring-1 ring-background rounded-lg",children:l.jsx("div",{className:V(a,"rounded bg-muted animate-pulse")})},u)),c&&l.jsx("div",{className:V("shrink-0 bg-background ring-1 ring-background border border-border rounded-lg flex items-center justify-center",o),children:l.jsx("div",{className:V(n==="sm"?"h-3.5 w-5":"h-3 w-4","rounded bg-muted animate-pulse")})})]})};const Oa="This document certifies that the bearer agent has been granted authorized access to the tools and capabilities described herein. The agent is permitted to operate within the scope defined by its instructions and shall act in accordance with the constraints set forth by the issuing organization. This credential remains valid for the duration of the agent's active status. Unauthorized modification of this agent's permissions or scope is prohibited. The issuing authority reserves the right to revoke access at any time. All actions performed by this agent are subject to audit and review by the organization administrator. ",it=typeof window<"u"&&typeof window.matchMedia=="function"?window.matchMedia("(prefers-reduced-motion: reduce)"):null;function Ba(s){const e=M.c(105),{part:t,latency:n}=s,a=H(),o=$t(),c=pe(t.state),i=z.useRef(null),u=z.useRef(null),r=z.useRef(null),f=z.useRef(null),d=z.useRef(null);let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=()=>{it?.matches||(d.current=i.current?.getBoundingClientRect()??null,i.current&&(i.current.style.willChange="transform"))},e[0]=m):m=e[0];const p=m;let g;e[1]===Symbol.for("react.memo_cache_sentinel")?(g=F=>{if(it?.matches)return;const O=d.current,q=i.current;if(!O||!q)return;const ae=(F.clientX-O.left)/O.width*100,le=(F.clientY-O.top)/O.height*100;q.style.transform=`perspective(800px) rotateY(${(ae-50)*.05}deg) rotateX(${(le-50)*-.05}deg)`,u.current&&(u.current.style.opacity="1",u.current.style.transform=`translate(${(ae-50)*.15}px, ${(le-50)*.15}px)`),r.current&&(r.current.style.opacity="0.45"),f.current&&(f.current.style.opacity="0.45")},e[1]=g):g=e[1];const x=g;let h;e[2]===Symbol.for("react.memo_cache_sentinel")?(h=()=>{const F=i.current;F&&(F.style.transform="none",F.style.willChange="auto"),u.current&&(u.current.style.opacity="0.4",u.current.style.transform="translate(0, 0)"),r.current&&(r.current.style.opacity="0.3"),f.current&&(f.current.style.opacity="0.3"),d.current=null},e[2]=h):h=e[2];const y=h;if(c==="loading"){let F;e[3]===Symbol.for("react.memo_cache_sentinel")?(F=l.jsx(de,{className:"animate-pulse"}),e[3]=F):F=e[3];let O;e[4]!==a?(O=a("chat.agentCreate.creating"),e[4]=a,e[5]=O):O=e[5];let q;return e[6]!==O?(q=l.jsx(Y,{icon:F,title:O,state:"loading",defaultOpen:!0}),e[6]=O,e[7]=q):q=e[7],q}if(c==="approval"){let F;e[8]===Symbol.for("react.memo_cache_sentinel")?(F=l.jsx(de,{}),e[8]=F):F=e[8];let O;e[9]!==a?(O=a("chat.agentCreate.createAgent"),e[9]=a,e[10]=O):O=e[10];let q;return e[11]!==O?(q=l.jsx(Y,{icon:F,title:O,state:"idle"}),e[11]=O,e[12]=q):q=e[12],q}if(c==="error"){let F;e[13]===Symbol.for("react.memo_cache_sentinel")?(F=l.jsx(de,{}),e[13]=F):F=e[13];let O;e[14]!==t.state||e[15]!==a?(O=t.state==="output-denied"?a("chat.agentCreate.cancelled"):a("chat.agentCreate.couldntCreate"),e[14]=t.state,e[15]=a,e[16]=O):O=e[16];let q;e[17]!==n?(q=l.jsx(fe,{latency:n}),e[17]=n,e[18]=q):q=e[18];let ae;return e[19]!==O||e[20]!==q?(ae=l.jsx(Y,{icon:F,title:O,state:"error",trailing:q}),e[19]=O,e[20]=q,e[21]=ae):ae=e[21],ae}let b,k,j,w,S,N,v,_,T,A,P,E,L,I,$,C,R,D,B,U,W,K,X;if(e[22]!==n||e[23]!==o||e[24]!==t.output||e[25]!==a){R=Symbol.for("react.early_return_sentinel");e:{const F=Ke(t.output)?.item;if(!F?.id||!F?.title){let ie;e[49]===Symbol.for("react.memo_cache_sentinel")?(ie=l.jsx(de,{}),e[49]=ie):ie=e[49];let ce;e[50]!==a?(ce=a("chat.agentCreate.created"),e[50]=a,e[51]=ce):ce=e[51];let J;e[52]!==n?(J=l.jsx(fe,{latency:n}),e[52]=n,e[53]=J):J=e[53];let te;e[54]!==ce||e[55]!==J?(te=l.jsx(Y,{icon:ie,title:ce,state:"idle",trailing:J}),e[54]=ce,e[55]=J,e[56]=te):te=e[56],R=te;break e}const O=(F.connections??[]).map(Ua);let q;e[57]===Symbol.for("react.memo_cache_sentinel")?(q=l.jsx(de,{className:"text-success"}),e[57]=q):q=e[57];let ae;e[58]!==n?(ae=l.jsx(fe,{latency:n}),e[58]=n,e[59]=ae):ae=e[59],C=l.jsx(Y,{icon:q,title:a("chat.agentCreate.agentCreated",{name:F.title}),state:"idle",trailing:ae}),$="mt-2 overflow-hidden rounded-xl border-[0.5px] border-border bg-card p-2.5",j=i,w="relative overflow-hidden rounded-lg bg-accent/25 p-2",e[60]===Symbol.for("react.memo_cache_sentinel")?(S={transition:"transform 0.3s ease-out"},e[60]=S):S=e[60],N=p,v=x,_=y,e[61]===Symbol.for("react.memo_cache_sentinel")?(T=l.jsx("div",{ref:u,className:"pointer-events-none absolute inset-[-20%] z-[1] select-none rounded-lg",style:{background:"linear-gradient(135deg, hsla(280, 60%, 80%, 0.35) 0%, transparent 35%), linear-gradient(315deg, hsla(190, 70%, 80%, 0.35) 0%, transparent 35%), linear-gradient(225deg, hsla(140, 55%, 80%, 0.3) 0%, transparent 30%), linear-gradient(45deg, hsla(320, 55%, 82%, 0.3) 0%, transparent 30%)",opacity:.4,transition:"opacity 0.3s ease, transform 0.3s ease-out"},"aria-hidden":"true"}),e[61]=T):T=e[61];let le;e[62]===Symbol.for("react.memo_cache_sentinel")?(le={textAlign:"justify",wordBreak:"break-all"},e[62]=le):le=e[62],e[63]===Symbol.for("react.memo_cache_sentinel")?(A=l.jsx("p",{className:"pointer-events-none absolute inset-0 z-[1] select-none overflow-hidden text-[6px] font-light leading-[1.5] tracking-[0.06px] text-background opacity-50 mix-blend-overlay",style:le,"aria-hidden":"true",children:Oa.repeat(6)}),P=l.jsx("img",{src:"/stamp.svg",alt:"",className:"pointer-events-none absolute -right-10 -top-10 size-[140px] opacity-50 select-none","aria-hidden":"true"}),e[63]=A,e[64]=P):(A=e[63],P=e[64]),e[65]===Symbol.for("react.memo_cache_sentinel")?(E=l.jsx("img",{ref:r,src:"/left-guilloche.png",alt:"",className:"pointer-events-none absolute inset-y-0 left-0 h-full w-auto select-none z-[1] mix-blend-overlay",style:{opacity:.3,transition:"opacity 0.3s ease"},"aria-hidden":"true"}),e[65]=E):E=e[65],e[66]===Symbol.for("react.memo_cache_sentinel")?(L=l.jsx("img",{ref:f,src:"/right-guilloche.png",alt:"",className:"pointer-events-none absolute inset-y-0 right-0 h-full w-auto select-none z-[1] mix-blend-overlay",style:{opacity:.3,transition:"opacity 0.3s ease"},"aria-hidden":"true"}),e[66]=L):L=e[66],I=l.jsxs("div",{className:"relative",children:[l.jsxs("div",{className:"flex items-center gap-2.5 p-2",children:[l.jsx(gt,{icon:F.icon,name:F.title,size:"md"}),l.jsx("div",{className:"flex-1 min-w-0",children:l.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:F.title})})]}),F.description&&l.jsx("div",{className:"px-2 pt-1 pr-16",children:l.jsx("p",{className:"text-sm leading-snug text-muted-foreground line-clamp-2",children:F.description})})]}),X="relative z-[3] flex items-center gap-2.5 px-2 pt-6 pb-1";const ue=O.length>0&&l.jsx(z.Suspense,{fallback:l.jsx(he.Fallback,{iconSize:"xs",maxVisibleIcons:3,totalCount:O.length}),children:l.jsx(he,{connectionIds:O,iconSize:"xs",maxVisibleIcons:3,className:"flex items-center justify-start -space-x-1"})});e[67]!==ue?(k=l.jsx("div",{className:"flex-1 min-w-0",children:ue}),e[67]=ue,e[68]=k):k=e[68],K="flex items-center gap-2 shrink-0",b=Ue,D="sm",B="h-7",U=()=>o(F.id),W=a("chat.agentCreate.seeAgentLabel",{name:F.title})}e[22]=n,e[23]=o,e[24]=t.output,e[25]=a,e[26]=b,e[27]=k,e[28]=j,e[29]=w,e[30]=S,e[31]=N,e[32]=v,e[33]=_,e[34]=T,e[35]=A,e[36]=P,e[37]=E,e[38]=L,e[39]=I,e[40]=$,e[41]=C,e[42]=R,e[43]=D,e[44]=B,e[45]=U,e[46]=W,e[47]=K,e[48]=X}else b=e[26],k=e[27],j=e[28],w=e[29],S=e[30],N=e[31],v=e[32],_=e[33],T=e[34],A=e[35],P=e[36],E=e[37],L=e[38],I=e[39],$=e[40],C=e[41],R=e[42],D=e[43],B=e[44],U=e[45],W=e[46],K=e[47],X=e[48];if(R!==Symbol.for("react.early_return_sentinel"))return R;let Z;e[69]!==a?(Z=a("chat.agentCreate.seeAgent"),e[69]=a,e[70]=Z):Z=e[70];let G;e[71]!==b||e[72]!==Z||e[73]!==D||e[74]!==B||e[75]!==U||e[76]!==W?(G=l.jsx(b,{size:D,className:B,onClick:U,"aria-label":W,children:Z}),e[71]=b,e[72]=Z,e[73]=D,e[74]=B,e[75]=U,e[76]=W,e[77]=G):G=e[77];let Q;e[78]!==G||e[79]!==K?(Q=l.jsx("div",{className:K,children:G}),e[78]=G,e[79]=K,e[80]=Q):Q=e[80];let ne;e[81]!==k||e[82]!==Q||e[83]!==X?(ne=l.jsxs("div",{className:X,children:[k,Q]}),e[81]=k,e[82]=Q,e[83]=X,e[84]=ne):ne=e[84];let oe;e[85]!==j||e[86]!==w||e[87]!==S||e[88]!==N||e[89]!==v||e[90]!==_||e[91]!==T||e[92]!==A||e[93]!==P||e[94]!==E||e[95]!==L||e[96]!==I||e[97]!==ne?(oe=l.jsxs("div",{ref:j,className:w,style:S,onMouseEnter:N,onMouseMove:v,onMouseLeave:_,children:[T,A,P,E,L,I,ne]}),e[85]=j,e[86]=w,e[87]=S,e[88]=N,e[89]=v,e[90]=_,e[91]=T,e[92]=A,e[93]=P,e[94]=E,e[95]=L,e[96]=I,e[97]=ne,e[98]=oe):oe=e[98];let ee;e[99]!==$||e[100]!==oe?(ee=l.jsx("div",{className:$,children:oe}),e[99]=$,e[100]=oe,e[101]=ee):ee=e[101];let re;return e[102]!==C||e[103]!==ee?(re=l.jsxs(l.Fragment,{children:[C,ee]}),e[102]=C,e[103]=ee,e[104]=re):re=e[104],re}function Ua(s){return s.connection_id}function Ha(s){const e=M.c(24),{agent:t}=s,n=$t();if(!t.id)return null;let a;e[0]!==t.connections?(a=t.connections??[],e[0]=t.connections,e[1]=a):a=e[1];let o;e[2]!==a?(o=a.map(qa),e[2]=a,e[3]=o):o=e[3];const c=o;let i;e[4]!==t.id||e[5]!==n?(i=()=>n(t.id),e[4]=t.id,e[5]=n,e[6]=i):i=e[6];let u;e[7]!==t.icon||e[8]!==t.title?(u=l.jsx(gt,{icon:t.icon,name:t.title,size:"sm"}),e[7]=t.icon,e[8]=t.title,e[9]=u):u=e[9];let r;e[10]!==t.title?(r=l.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:t.title}),e[10]=t.title,e[11]=r):r=e[11];let f;e[12]!==t.description?(f=t.description&&l.jsx("span",{className:"truncate text-xs text-muted-foreground",children:t.description}),e[12]=t.description,e[13]=f):f=e[13];let d;e[14]!==r||e[15]!==f?(d=l.jsxs("div",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[r,f]}),e[14]=r,e[15]=f,e[16]=d):d=e[16];let m;e[17]!==c?(m=c.length>0&&l.jsx(z.Suspense,{fallback:l.jsx(he.Fallback,{iconSize:"xs",maxVisibleIcons:3,totalCount:c.length}),children:l.jsx(he,{connectionIds:c,iconSize:"xs",maxVisibleIcons:3})}),e[17]=c,e[18]=m):m=e[18];let p;return e[19]!==i||e[20]!==u||e[21]!==d||e[22]!==m?(p=l.jsxs("button",{type:"button",onClick:i,className:"group flex w-full items-center gap-3 rounded-lg border border-border bg-card px-3 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer",children:[u,d,m]}),e[19]=i,e[20]=u,e[21]=d,e[22]=m,e[23]=p):p=e[23],p}function qa(s){return s.connection_id}function Wa(s){const e=M.c(59),{part:t,latency:n}=s,a=H(),o=qe(),{org:c}=me();let i;e[0]!==t.state?(i=pe(t.state),e[0]=t.state,e[1]=i):i=e[1];const u=i;let r,f,d,m,p,g;if(e[2]!==n||e[3]!==t.output||e[4]!==t.state||e[5]!==u||e[6]!==a){g=Symbol.for("react.early_return_sentinel");e:{const b=Ke(t.output);if(f=Array.isArray(b?.items)?b.items:[],u==="loading"){let S;e[13]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(de,{className:"animate-pulse"}),e[13]=S):S=e[13];let N;e[14]!==a?(N=a("chat.agentList.loading"),e[14]=a,e[15]=N):N=e[15];let v;e[16]!==N?(v=l.jsx(Y,{icon:S,title:N,state:"loading"}),e[16]=N,e[17]=v):v=e[17],g=v;break e}if(u==="approval"){let S;e[18]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(de,{}),e[18]=S):S=e[18];let N;e[19]!==a?(N=a("chat.agentList.listAgents"),e[19]=a,e[20]=N):N=e[20];let v;e[21]!==N?(v=l.jsx(Y,{icon:S,title:N,state:"idle"}),e[21]=N,e[22]=v):v=e[22],g=v;break e}if(u==="error"){let S;e[23]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(de,{}),e[23]=S):S=e[23];let N;e[24]!==t.state||e[25]!==a?(N=t.state==="output-denied"?a("chat.agentList.unavailable"):a("chat.agentList.couldntLoad"),e[24]=t.state,e[25]=a,e[26]=N):N=e[26];let v;e[27]!==n?(v=l.jsx(fe,{latency:n}),e[27]=n,e[28]=v):v=e[28];let _;e[29]!==N||e[30]!==v?(_=l.jsx(Y,{icon:S,title:N,state:"error",trailing:v}),e[29]=N,e[30]=v,e[31]=_):_=e[31],g=_;break e}if(f.length===0){let S;e[32]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(de,{}),e[32]=S):S=e[32];let N;e[33]!==a?(N=a("chat.agentList.noAgents"),e[33]=a,e[34]=N):N=e[34];let v;e[35]!==a?(v=a("chat.agentList.noAgentsDesc"),e[35]=a,e[36]=v):v=e[36];let _;e[37]!==n?(_=l.jsx(fe,{latency:n}),e[37]=n,e[38]=_):_=e[38];let T;e[39]!==N||e[40]!==v||e[41]!==_?(T=l.jsx(Y,{icon:S,title:N,summary:v,state:"idle",trailing:_}),e[39]=N,e[40]=v,e[41]=_,e[42]=T):T=e[42],g=T;break e}const k=f.slice(0,At);r=f.length-k.length;let j;e[43]===Symbol.for("react.memo_cache_sentinel")?(j=l.jsx(de,{className:"text-success"}),e[43]=j):j=e[43];let w;e[44]!==n?(w=l.jsx(fe,{latency:n}),e[44]=n,e[45]=w):w=e[45],p=l.jsx(Y,{icon:j,title:f.length===1?a("chat.agentList.oneAgent"):a("chat.agentList.multiAgents",{count:f.length}),state:"idle",trailing:w}),d="mt-2 flex flex-col gap-1.5",m=k.map(Ga)}e[2]=n,e[3]=t.output,e[4]=t.state,e[5]=u,e[6]=a,e[7]=r,e[8]=f,e[9]=d,e[10]=m,e[11]=p,e[12]=g}else r=e[7],f=e[8],d=e[9],m=e[10],p=e[11],g=e[12];if(g!==Symbol.for("react.early_return_sentinel"))return g;let x;e[46]!==r||e[47]!==f||e[48]!==o||e[49]!==c||e[50]!==a?(x=r>0&&l.jsx(Pt,{count:f.length,noun:a("chat.agentList.agentsNoun"),onClick:()=>o({to:"/$org/settings/projects",params:{org:c.slug}})}),e[46]=r,e[47]=f,e[48]=o,e[49]=c,e[50]=a,e[51]=x):x=e[51];let h;e[52]!==d||e[53]!==m||e[54]!==x?(h=l.jsxs("div",{className:d,children:[m,x]}),e[52]=d,e[53]=m,e[54]=x,e[55]=h):h=e[55];let y;return e[56]!==p||e[57]!==h?(y=l.jsxs(l.Fragment,{children:[p,h]}),e[56]=p,e[57]=h,e[58]=y):y=e[58],y}function Ga(s){return l.jsx(Ha,{agent:s},s.id)}const Ka={active:"bg-success",inactive:"bg-muted-foreground",error:"bg-destructive"};function Va(s){const e=M.c(27),{connection:t}=s,n=qe(),{org:a}=me(),o=t.slug,c=t.description||t.app_name,i=!o||void 0;let u;e[0]!==n||e[1]!==a||e[2]!==o?(u=()=>o&&n({to:"/$org/settings/connections/$appSlug",params:{org:a.slug,appSlug:o}}),e[0]=n,e[1]=a,e[2]=o,e[3]=u):u=e[3];let r;e[4]!==t.icon||e[5]!==t.title?(r=l.jsx(ve,{icon:t.icon,name:t.title,size:"sm"}),e[4]=t.icon,e[5]=t.title,e[6]=r):r=e[6];let f;e[7]!==t.title?(f=l.jsx("span",{className:"truncate text-sm font-medium text-foreground",children:t.title}),e[7]=t.title,e[8]=f):f=e[8];let d;e[9]!==c?(d=c&&l.jsx("span",{className:"truncate text-xs text-muted-foreground",children:c}),e[9]=c,e[10]=d):d=e[10];let m;e[11]!==f||e[12]!==d?(m=l.jsxs("div",{className:"flex min-w-0 flex-1 flex-col leading-tight",children:[f,d]}),e[11]=f,e[12]=d,e[13]=m):m=e[13];const p=Ka[t.status]??"bg-muted-foreground";let g;e[14]!==p?(g=V("size-2 shrink-0 rounded-full",p),e[14]=p,e[15]=g):g=e[15];let x;e[16]!==g?(x=l.jsx("span",{className:g,"aria-hidden":"true"}),e[16]=g,e[17]=x):x=e[17];let h;e[18]!==t.status?(h=l.jsx("span",{className:"sr-only",children:t.status}),e[18]=t.status,e[19]=h):h=e[19];let y;return e[20]!==i||e[21]!==h||e[22]!==u||e[23]!==r||e[24]!==m||e[25]!==x?(y=l.jsxs("button",{type:"button","aria-disabled":i,onClick:u,className:"group flex w-full items-center gap-3 rounded-lg border border-border bg-card px-3 py-2.5 text-left transition-colors hover:bg-muted cursor-pointer aria-disabled:cursor-default aria-disabled:hover:bg-card",children:[r,m,x,h]}),e[20]=i,e[21]=h,e[22]=u,e[23]=r,e[24]=m,e[25]=x,e[26]=y):y=e[26],y}function Ja(s){const e=M.c(54),{part:t,latency:n}=s,a=H(),o=qe(),{org:c}=me();let i;e[0]!==t.state?(i=pe(t.state),e[0]=t.state,e[1]=i):i=e[1];const u=i;let r,f,d,m,p,g;if(e[2]!==n||e[3]!==t.output||e[4]!==t.state||e[5]!==u||e[6]!==a){g=Symbol.for("react.early_return_sentinel");e:{const b=Ke(t.output);if(f=(Array.isArray(b?.items)?b.items:[]).filter(Xa),u==="loading"||u==="approval"){let S;e[13]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(ke,{className:"animate-pulse"}),e[13]=S):S=e[13];let N;e[14]!==a?(N=a("chat.connectionList.loadingTitle"),e[14]=a,e[15]=N):N=e[15];let v;e[16]!==N?(v=l.jsx(Y,{icon:S,title:N,state:"loading"}),e[16]=N,e[17]=v):v=e[17],g=v;break e}if(u==="error"){let S;e[18]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(ke,{}),e[18]=S):S=e[18];let N;e[19]!==t.state||e[20]!==a?(N=t.state==="output-denied"?a("chat.connectionList.unavailableTitle"):a("chat.connectionList.errorTitle"),e[19]=t.state,e[20]=a,e[21]=N):N=e[21];let v;e[22]!==n?(v=l.jsx(fe,{latency:n}),e[22]=n,e[23]=v):v=e[23];let _;e[24]!==N||e[25]!==v?(_=l.jsx(Y,{icon:S,title:N,state:"error",trailing:v}),e[24]=N,e[25]=v,e[26]=_):_=e[26],g=_;break e}if(f.length===0){let S;e[27]===Symbol.for("react.memo_cache_sentinel")?(S=l.jsx(ke,{}),e[27]=S):S=e[27];let N;e[28]!==a?(N=a("chat.connectionList.emptyTitle"),e[28]=a,e[29]=N):N=e[29];let v;e[30]!==a?(v=a("chat.connectionList.emptySummary"),e[30]=a,e[31]=v):v=e[31];let _;e[32]!==n?(_=l.jsx(fe,{latency:n}),e[32]=n,e[33]=_):_=e[33];let T;e[34]!==N||e[35]!==v||e[36]!==_?(T=l.jsx(Y,{icon:S,title:N,summary:v,state:"idle",trailing:_}),e[34]=N,e[35]=v,e[36]=_,e[37]=T):T=e[37],g=T;break e}const k=f.slice(0,At);r=f.length-k.length;let j;e[38]===Symbol.for("react.memo_cache_sentinel")?(j=l.jsx(ke,{className:"text-success"}),e[38]=j):j=e[38];let w;e[39]!==n?(w=l.jsx(fe,{latency:n}),e[39]=n,e[40]=w):w=e[40],p=l.jsx(Y,{icon:j,title:f.length===1?a("chat.connectionList.singleConnection"):a("chat.connectionList.multipleConnections",{count:f.length}),state:"idle",trailing:w}),d="mt-2 flex flex-col gap-1.5",m=k.map(Qa)}e[2]=n,e[3]=t.output,e[4]=t.state,e[5]=u,e[6]=a,e[7]=r,e[8]=f,e[9]=d,e[10]=m,e[11]=p,e[12]=g}else r=e[7],f=e[8],d=e[9],m=e[10],p=e[11],g=e[12];if(g!==Symbol.for("react.early_return_sentinel"))return g;let x;e[41]!==r||e[42]!==f||e[43]!==o||e[44]!==c||e[45]!==a?(x=r>0&&l.jsx(Pt,{count:f.length,noun:a("chat.connectionList.connectionNoun"),onClick:()=>o({to:"/$org/settings/connections",params:{org:c.slug}})}),e[41]=r,e[42]=f,e[43]=o,e[44]=c,e[45]=a,e[46]=x):x=e[46];let h;e[47]!==d||e[48]!==m||e[49]!==x?(h=l.jsxs("div",{className:d,children:[m,x]}),e[47]=d,e[48]=m,e[49]=x,e[50]=h):h=e[50];let y;return e[51]!==p||e[52]!==h?(y=l.jsxs(l.Fragment,{children:[p,h]}),e[51]=p,e[52]=h,e[53]=y):y=e[53],y}function Qa(s){return l.jsx(Va,{connection:s},s.id)}function Xa(s){return s.connection_type!=="VIRTUAL"}function Ya(){const s=M.c(46),e=H(),t=je(),{sendMessage:n,isStreaming:a,messages:o}=Ks(),{org:c}=me(),i=t?.virtualMcpId,{prompts:u}=cn(c.slug),r=i??null;let f;s[0]!==c.id||s[1]!==c.slug||s[2]!==r?(f={connectionId:r,orgId:c.id,orgSlug:c.slug},s[0]=c.id,s[1]=c.slug,s[2]=r,s[3]=f):f=s[3];let d;s[4]!==i?(d=!!i&&et(i),s[4]=i,s[5]=d):d=s[5];let m;s[6]!==d?(m={enabled:d},s[6]=d,s[7]=m):m=s[7];const p=sn(f,m),[g,x]=z.useState(null);if(!i||a||!et(i)||!o.some(Za))return null;let y;if(s[8]!==u||s[9]!==i){let C;s[11]!==i?(C=R=>R.agentId===i&&R.promptName,s[11]=i,s[12]=C):C=s[12],y=u.find(C),s[8]=u,s[9]=i,s[10]=y}else y=s[10];const b=y;if(!b)return null;let k;s[13]!==p||s[14]!==n||s[15]!==e?(k=async(C,R)=>{if(!p){Re.error(e("chat.nextActionChip.mcpClientNotAvailable"));return}try{const D=await xn(p,C.name,R);await n({type:"doc",content:[{type:"paragraph",content:[Ps({id:C.name,name:wt(C.name,kt(C._meta)),metadata:D.messages,char:"/",kind:"prompt",args:R}),{type:"text",text:" "}]}]})}catch(D){console.error("[next-action-chip] failed",D),Re.error(e("chat.nextActionChip.failedLoadPrompt"))}},s[13]=p,s[14]=n,s[15]=e,s[16]=k):k=s[16];const j=k;let w;s[17]!==b._meta||s[18]!==b.arguments||s[19]!==b.description||s[20]!==b.promptName||s[21]!==b.title||s[22]!==j?(w=()=>{const C={name:b.promptName,title:b.title,description:b.description,arguments:b.arguments,_meta:b._meta};if(C.arguments&&C.arguments.length>0){x(C);return}j(C)},s[17]=b._meta,s[18]=b.arguments,s[19]=b.description,s[20]=b.promptName,s[21]=b.title,s[22]=j,s[23]=w):w=s[23];const S=w;let N;s[24]===Symbol.for("react.memo_cache_sentinel")?(N=l.jsx(gn,{size:12,className:"shrink-0 text-special"}),s[24]=N):N=s[24];let v;s[25]!==e?(v=e("chat.nextActionChip.next"),s[25]=e,s[26]=v):v=s[26];let _;s[27]!==v?(_=l.jsx("span",{className:"font-medium text-foreground/80",children:v}),s[27]=v,s[28]=_):_=s[28];let T;s[29]!==b.title?(T=l.jsx("span",{className:"truncate",children:b.title}),s[29]=b.title,s[30]=T):T=s[30];let A;s[31]===Symbol.for("react.memo_cache_sentinel")?(A=l.jsx(xt,{size:12,className:"shrink-0 transition-transform duration-150 group-hover:translate-x-0.5"}),s[31]=A):A=s[31];let P;s[32]!==S||s[33]!==T||s[34]!==_?(P=l.jsxs("button",{type:"button",onClick:S,className:"group mt-3 flex items-center gap-2 self-start rounded-lg border border-border bg-background px-3 py-1.5 text-xs text-muted-foreground transition-colors hover:border-border hover:bg-accent/40 hover:text-foreground",children:[N,_,T,A]}),s[32]=S,s[33]=T,s[34]=_,s[35]=P):P=s[35];let E;s[36]===Symbol.for("react.memo_cache_sentinel")?(E=C=>x(C),s[36]=E):E=s[36];let L;s[37]!==g||s[38]!==j?(L=async C=>{const R=g;x(null),R&&await j(R,C)},s[37]=g,s[38]=j,s[39]=L):L=s[39];let I;s[40]!==g||s[41]!==L?(I=l.jsx(Ls,{prompt:g,setPrompt:E,onSubmit:L}),s[40]=g,s[41]=L,s[42]=I):I=s[42];let $;return s[43]!==P||s[44]!==I?($=l.jsxs(l.Fragment,{children:[P,I]}),s[43]=P,s[44]=I,s[45]=$):$=s[45],$}function Za(s){return s.role==="user"||s.parts.some(el)}function el(s){return s.type==="tool-user_ask"&&s.state==="output-available"}function tl(s){const e=M.c(25),{event:t}=s,n=H(),[a,o]=z.useState(!1);let c;e[0]!==t.data?(c=JSON.stringify(t.data,null,2),e[0]=t.data,e[1]=c):c=e[1];const i=c;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=()=>o(sl),e[2]=u):u=e[2];let r;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=l.jsx(Ss,{className:"size-4 shrink-0 text-muted-foreground"}),e[3]=r):r=e[3];let f;e[4]!==n?(f=n("chat.triggerEventPart.triggeredByEvent"),e[4]=n,e[5]=f):f=e[5];let d;e[6]!==f?(d=l.jsx("span",{className:"font-medium",children:f}),e[6]=f,e[7]=d):d=e[7];let m;e[8]!==t.type?(m=l.jsx("span",{className:"min-w-0 truncate text-muted-foreground",children:t.type}),e[8]=t.type,e[9]=m):m=e[9];const p=a&&"rotate-180";let g;e[10]!==p?(g=V("ml-auto size-4 shrink-0 text-muted-foreground transition-transform",p),e[10]=p,e[11]=g):g=e[11];let x;e[12]!==g?(x=l.jsx(hn,{className:g}),e[12]=g,e[13]=x):x=e[13];let h;e[14]!==d||e[15]!==m||e[16]!==x?(h=l.jsxs("button",{type:"button",onClick:u,className:"flex w-full items-center gap-2 px-3 py-2 text-sm cursor-pointer",children:[r,d,m,x]}),e[14]=d,e[15]=m,e[16]=x,e[17]=h):h=e[17];let y;e[18]!==t.source||e[19]!==a||e[20]!==i?(y=a&&l.jsxs("div",{className:"border-t border-border/60 px-3 py-2",children:[l.jsx("div",{className:"mb-2 text-xs text-muted-foreground",children:t.source}),l.jsx("pre",{className:"overflow-auto whitespace-pre-wrap break-words text-xs text-foreground",children:i})]}),e[18]=t.source,e[19]=a,e[20]=i,e[21]=y):y=e[21];let b;return e[22]!==h||e[23]!==y?(b=l.jsxs("div",{className:"rounded-lg border border-border/60 bg-background overflow-hidden text-left",children:[h,y]}),e[22]=h,e[23]=y,e[24]=b):b=e[24],b}function sl(s){return!s}const nl=[Fs.configure({heading:!1,blockquote:!1,codeBlock:!1,horizontalRule:!1}),Rs,zs];function al(s){const e=M.c(5),{tiptapDoc:t}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={attributes:{class:"prose prose-sm max-w-none focus:outline-none"}},e[0]=n):n=e[0];let a;e[1]!==t?(a={extensions:nl,content:t,editable:!1,editorProps:n},e[1]=t,e[2]=a):a=e[2];const o=Es(a);if(!o)return null;let c;return e[3]!==o?(c=l.jsx(Ds,{editor:o,className:"[&_.ProseMirror]:outline-none [&_.ProseMirror]:cursor-text"}),e[3]=o,e[4]=c):c=e[4],c}function Vt(s){const e=M.c(38),{message:t,className:n,onScrollToPair:a}=s,{id:o,parts:c,metadata:i}=t,[u,r]=z.useState(!1),[f,d]=z.useState(!1),m=z.useRef(!1);let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p=I=>{I&&!m.current&&(m.current=!0,d(I.scrollHeight>I.clientHeight))},e[0]=p):p=e[0];const g=p;if(!c||c.length===0)return null;let x;e[1]!==a?(x=()=>{r(!0),a?.()},e[1]=a,e[2]=x):x=e[2];const h=x,y=i?.tiptapDoc;let b;e[3]!==n?(b=V("message-block w-full min-w-0 relative flex items-start gap-4 px-2.5 text-foreground flex-row-reverse",n),e[3]=n,e[4]=b):b=e[4];let k,j;e[5]===Symbol.for("react.memo_cache_sentinel")?(k=()=>r(!0),j=()=>r(!1),e[5]=k,e[6]=j):(k=e[5],j=e[6]);let w;e[7]===Symbol.for("react.memo_cache_sentinel")?(w=l.jsx("div",{className:"absolute inset-0 bg-muted/75 rounded-lg pointer-events-none"}),e[7]=w):w=e[7];let S;e[8]!==u||e[9]!==f?(S=V("z-10 px-4 py-2 flex-1 transition-[max-height,opacity] duration-300 ease-out",u?"max-h-[50vh] overflow-auto opacity-100":V("max-h-[84px] overflow-hidden opacity-99",f&&"mask-b-from-1%")),e[8]=u,e[9]=f,e[10]=S):S=e[10];let N;if(e[11]!==o||e[12]!==c){let I;e[14]!==o?(I=($,C)=>$.type==="data-trigger-event"?l.jsx(tl,{event:$.data},`${o}-${C}`):null,e[14]=o,e[15]=I):I=e[15],N=c.map(I),e[11]=o,e[12]=c,e[13]=N}else N=e[13];let v;e[16]!==y||e[17]!==o||e[18]!==i||e[19]!==c?(v=y?l.jsx(al,{tiptapDoc:i.tiptapDoc}):c.map((I,$)=>I.type==="text"?c[$-1]?.type==="data-trigger-event"?null:l.jsx(Ce,{id:o,part:I},`${o}-${$}`):null),e[16]=y,e[17]=o,e[18]=i,e[19]=c,e[20]=v):v=e[20];let _;e[21]!==N||e[22]!==v?(_=l.jsxs("div",{className:"flex flex-col gap-2",children:[N,v]}),e[21]=N,e[22]=v,e[23]=_):_=e[23];let T;e[24]!==_||e[25]!==S?(T=l.jsx("div",{ref:g,className:S,children:_}),e[24]=_,e[25]=S,e[26]=T):T=e[26];let A;e[27]!==h||e[28]!==T?(A=l.jsxs("div",{tabIndex:0,onClick:h,onFocus:k,onBlur:j,className:"w-full border border-border/60 min-w-0 shadow-xs rounded-lg text-[14px] wrap-break-word overflow-wrap-anywhere bg-background cursor-pointer transition-colors relative flex outline-none",children:[w,T]}),e[27]=h,e[28]=T,e[29]=A):A=e[29];let P;e[30]!==t?(P=l.jsx(Lt,{message:t,className:"mt-1 mr-1 self-end"}),e[30]=t,e[31]=P):P=e[31];let E;e[32]!==A||e[33]!==P?(E=l.jsxs("div",{className:"w-full min-w-0 flex flex-col",children:[A,P]}),e[32]=A,e[33]=P,e[34]=E):E=e[34];let L;return e[35]!==E||e[36]!==b?(L=l.jsx(l.Fragment,{children:l.jsx("div",{className:b,children:E})}),e[35]=E,e[36]=b,e[37]=L):L=e[37],L}function Jt(s){const e=M.c(10),{message:t,pending:n}=s,a=H();let o;e[0]!==n||e[1]!==a?(o=a(n?"chat.liveMessage.pending":"chat.liveMessage.readByAgent"),e[0]=n,e[1]=a,e[2]=o):o=e[2];let c;e[3]!==o?(c=l.jsx("span",{className:"self-end px-3 text-xs text-muted-foreground",children:o}),e[3]=o,e[4]=c):c=e[4];let i;e[5]!==t?(i=l.jsx(Vt,{message:t}),e[5]=t,e[6]=i):i=e[6];let u;return e[7]!==c||e[8]!==i?(u=l.jsxs("div",{className:"flex flex-col gap-1 py-1",children:[c,i]}),e[7]=c,e[8]=i,e[9]=u):u=e[9],u}function ll(s){const e=M.c(5),{part:t}=s,{read:n}=bt();let a;if(e[0]!==t||e[1]!==n){const i=Vs(t);a=i?n.get(i):void 0,e[0]=t,e[1]=n,e[2]=a}else a=e[2];const o=a;if(!o)return null;let c;return e[3]!==o?(c=l.jsx(Jt,{message:o,pending:!1}),e[3]=o,e[4]=c):c=e[4],c}function ol(s){const e=new Map;for(let t=s.length-1;t>=0;t--){const n=s[t]?.parts;if(n)for(const a of n){const o=a;if(o.type!=="data-deck-updated")continue;const c=o.data;if(!c?.path)continue;const i=`deck:${c.path}`;e.has(i)||e.set(i,{tabId:cs(c.path),label:c.name||c.path,kind:c.kind==="page"?"page":"deck"})}}return Array.from(e.values())}function rl(){const s=M.c(9),e=H(),{openPanel:t}=Ve(),n=ye()?.messages??[],a=ol(n);if(a.length===0)return null;const o=a.some(cl),c=a.some(il),i=e(o?c?"chat.threadHtmlPreviews.slidesAndPages":"chat.threadHtmlPreviews.slides":"chat.threadHtmlPreviews.pages"),u="flex flex-col gap-1.5 py-2";let r;s[0]!==i?(r=l.jsx("div",{className:"text-[12px] text-muted-foreground/70 uppercase tracking-wide",children:i}),s[0]=i,s[1]=r):r=s[1];const f="flex flex-wrap gap-2";let d;s[2]!==t?(d=x=>l.jsxs("button",{type:"button",onClick:()=>t(x.tabId),className:"inline-flex items-center gap-2 px-3 py-1.5 rounded-lg border border-border bg-muted/30 hover:bg-muted/60 text-[13px] transition-colors",children:[x.kind==="deck"?l.jsx(bn,{className:"size-3.5 shrink-0 text-muted-foreground"}):l.jsx(Ns,{className:"size-3.5 shrink-0 text-muted-foreground"}),l.jsx("span",{className:"font-medium text-foreground",children:x.label})]},x.tabId),s[2]=t,s[3]=d):d=s[3];const m=a.map(d);let p;s[4]!==m?(p=l.jsx("div",{className:f,children:m}),s[4]=m,s[5]=p):p=s[5];let g;return s[6]!==r||s[7]!==p?(g=l.jsxs("div",{className:u,children:[r,p]}),s[6]=r,s[7]=p,s[8]=g):g=s[8],g}function il(s){return s.kind==="page"}function cl(s){return s.kind==="deck"}function ul(s){const e=M.c(29),{file:t}=s,n=H(),{openPanel:a}=Ve();let o;e[0]!==t.key||e[1]!==a?(o=()=>a(us(t.key)),e[0]=t.key,e[1]=a,e[2]=o):o=e[2];const c=o;let i;e[3]!==t.filename?(i=l.jsx(vn,{filename:t.filename,className:"h-5 w-4 shrink-0"}),e[3]=t.filename,e[4]=i):i=e[4];let u;e[5]!==t.filename||e[6]!==c?(u=l.jsx("button",{type:"button",onClick:c,className:"min-w-0 flex-1 truncate text-left text-[13px] font-medium text-foreground hover:underline",title:t.filename,children:t.filename}),e[5]=t.filename,e[6]=c,e[7]=u):u=e[7];const r=t.downloadUrl,f=t.filename;let d;e[8]!==n?(d=n("chat.outputFileRow.download"),e[8]=n,e[9]=d):d=e[9];let m;e[10]!==t.filename||e[11]!==n?(m=n("chat.outputFileRow.downloadFile",{filename:t.filename}),e[10]=t.filename,e[11]=n,e[12]=m):m=e[12];let p;e[13]===Symbol.for("react.memo_cache_sentinel")?(p=l.jsx(jn,{className:"size-3.5"}),e[13]=p):p=e[13];let g;e[14]!==t.downloadUrl||e[15]!==t.filename||e[16]!==d||e[17]!==m?(g=l.jsx("a",{href:r,download:f,className:"hidden shrink-0 text-muted-foreground hover:text-foreground group-hover:block group-focus-within:block",title:d,"aria-label":m,children:p}),e[14]=t.downloadUrl,e[15]=t.filename,e[16]=d,e[17]=m,e[18]=g):g=e[18];let x;e[19]!==n?(x=n("chat.outputFileRow.open"),e[19]=n,e[20]=x):x=e[20];let h;e[21]!==c||e[22]!==x?(h=l.jsx(Ue,{variant:"outline",size:"sm",className:"h-7 shrink-0 px-2.5 text-xs",onClick:c,children:x}),e[21]=c,e[22]=x,e[23]=h):h=e[23];let y;return e[24]!==h||e[25]!==i||e[26]!==u||e[27]!==g?(y=l.jsxs("div",{className:"group flex items-center gap-2 rounded-lg border border-border bg-background px-3 py-2",children:[i,u,g,h]}),e[24]=h,e[25]=i,e[26]=u,e[27]=g,e[28]=y):y=e[28],y}function dl(s){return s.split("/").pop()??s}const fl=/(^|\/)output\//;function ml(s){const e=new Set;for(const t of s.parts??[]){const n=t;if(n.state==="output-available"&&n.type==="tool-write"){const a=n.input?.path;a&&fl.test(a)&&e.add(dl(a))}}return e}function pl(s){const e=M.c(4),{threadId:t,message:n}=s,a=ml(n),o=a.size>0;let c;e[0]!==o?(c={enabled:o},e[0]=o,e[1]=c):c=e[1];const{data:i}=yn(t,c);if(a.size===0)return null;const u=(i??[]).filter(m=>a.has(m.filename));if(u.length===0)return null;const r="flex flex-col gap-1.5 py-2",f=u.map(gl);let d;return e[2]!==f?(d=l.jsx("div",{className:r,children:f}),e[2]=f,e[3]=d):d=e[3],d}function gl(s){return l.jsx(ul,{file:s},s.key)}function xl(s){return s.type==="reasoning"}function hl(s){const e=[],t=new Set,n=new Map,a=new Map,o=new Map;if(s){let i=null;for(let u=0;u<s.parts.length;u++){const r=s.parts[u];if(xl(r)){i||(i={parts:[],startIndex:u},e.push(i)),i.parts.push(r),t.add(u);continue}if(i=null,r.type==="data-tool-metadata"&&"id"in r&&"data"in r){const f=r.data,d={};f.annotations&&(d.annotations=f.annotations),typeof f.latencyMs=="number"&&Number.isFinite(f.latencyMs)&&(d.latencySeconds=f.latencyMs/1e3),typeof f.outputBytes=="number"&&Number.isFinite(f.outputBytes)&&f.outputBytes>=0&&(d.outputBytes=f.outputBytes),f._meta&&typeof f._meta=="object"&&(d._meta=f._meta),n.set(r.id,d);continue}if(r.type==="data-tool-subtask-metadata"&&"id"in r){a.set(r.id,r.data);continue}if(r.type==="data-web-search"&&"id"in r&&"data"in r){const f=r.id,d=r.data;o.set(f,d.text??"");continue}}}const c=[];if(s)for(let i=0;i<s.parts.length;i++){const u=s.parts[i];if(u.type!=="step-start"){if(t.has(i)){const r=e.find(f=>f.startIndex===i);r&&c.push({kind:"reasoning-group",group:r});continue}u.type.startsWith("data-")&&u.type!==Ie||c.push({kind:"part",index:i})}}return{reasoningGroups:e,renderOrder:c,dataParts:{toolMetadata:n,toolSubtaskMetadata:a,webSearchStreaming:o}}}const bl=3;function yl(s,e){let t=-1;for(let o=s.length-1;o>=0;o--){const c=s[o];if(c.kind==="part"&&e[c.index]?.type==="text"){t=o;break}}if(t===-1)return{collapsed:[],tail:s};const n=s.findLastIndex(o=>o.kind==="part"&&e[o.index]?.type===Ie),a=n!==-1&&n<t?n:t;return{collapsed:s.slice(0,a),tail:s.slice(a)}}function Qt(s,e){return s.kind==="part"&&e[s.index]?.type!==Ie}function jl(s,e){let t=0,n=0;for(const a of s)if(a.kind==="reasoning-group")n++;else{const o=e[a.index]?.type;o==="text"?n++:(o==="dynamic-tool"||o?.startsWith("tool-"))&&o!=="tool-todo_write"&&o!=="tool-update_interests"&&t++}return{toolCalls:t,messages:n}}function vl(s){const e=M.c(10),{toolCalls:t,messages:n}=s,a=H();let o;e[0]!==n||e[1]!==a||e[2]!==t?(o=t>0&&l.jsxs(l.Fragment,{children:[l.jsx(pt,{className:"size-3.5 shrink-0"}),l.jsxs("span",{children:[a("chat.assistant.toolCallPlural",{count:t}),n>0?",":""]})]}),e[0]=n,e[1]=a,e[2]=t,e[3]=o):o=e[3];let c;e[4]!==n||e[5]!==a?(c=n>0&&l.jsxs(l.Fragment,{children:[l.jsx(ks,{className:"size-3.5 shrink-0"}),l.jsx("span",{children:a("chat.assistant.messagePlural",{count:n})})]}),e[4]=n,e[5]=a,e[6]=c):c=e[6];let i;return e[7]!==o||e[8]!==c?(i=l.jsxs("span",{className:"flex items-center gap-1.5 text-muted-foreground",children:[o,c]}),e[7]=o,e[8]=c,e[9]=i):i=e[9],i}function Sl(s){const e=M.c(28),{items:t,message:n,reasoningGroups:a,isReasoningActive:o,totalDuration:c,dataParts:i,isLoading:u,isLast:r}=s;let f;e[0]!==t||e[1]!==n.parts?(f=jl(t,n.parts),e[0]=t,e[1]=n.parts,e[2]=f):f=e[2];const{toolCalls:d,messages:m}=f;if(d===0&&m===0)return null;let p;e[3]!==m||e[4]!==d?(p=l.jsx(vl,{toolCalls:d,messages:m}),e[3]=m,e[4]=d,e[5]=p):p=e[5];let g;if(e[6]!==i||e[7]!==r||e[8]!==u||e[9]!==o||e[10]!==t||e[11]!==n||e[12]!==a||e[13]!==c){let y;e[15]!==i||e[16]!==r||e[17]!==u||e[18]!==o||e[19]!==n||e[20]!==a||e[21]!==c?(y=(b,k)=>Xt({item:b,renderIndex:k,message:n,reasoningGroups:a,isReasoningActive:o,totalDuration:c,dataParts:i,isLoading:u,isLast:r,isLastVisiblePart:!1}),e[15]=i,e[16]=r,e[17]=u,e[18]=o,e[19]=n,e[20]=a,e[21]=c,e[22]=y):y=e[22],g=t.map(y),e[6]=i,e[7]=r,e[8]=u,e[9]=o,e[10]=t,e[11]=n,e[12]=a,e[13]=c,e[14]=g}else g=e[14];let x;e[23]!==g?(x=l.jsx("div",{className:"flex flex-col gap-3 sm:gap-2 pt-1",children:g}),e[23]=g,e[24]=x):x=e[24];let h;return e[25]!==p||e[26]!==x?(h=l.jsx(Y,{icon:null,alwaysChevron:!0,title:p,state:"idle",children:x}),e[25]=p,e[26]=x,e[27]=h):h=e[27],h}function Xt({item:s,renderIndex:e,message:t,reasoningGroups:n,isReasoningActive:a,totalDuration:o,dataParts:c,isLoading:i,isLast:u,isLastVisiblePart:r,renderOrder:f}){if(s.kind==="reasoning-group"){const{group:g}=s,x=g===n[n.length-1],h=a&&x;if(!g.parts.some(k=>k.text?.trim())&&!h)return null;const b=n.length===1?o:null;return l.jsx(En,{duration:b,parts:g.parts,isStreaming:h},`${t.id}-reasoning-${g.startIndex}`)}const d=t.parts[s.index],m=r||(f?f.findLastIndex(g=>Qt(g,t.parts))===e:!1),p=m?Js(Qs(),t.metadata?.usage):null;return l.jsx(Nl,{part:d,id:t.id,usageStats:m&&l.jsx(Os,{usage:p,duration:o}),dataParts:c,isLoading:i,isLastMessage:u},`${t.id}-${s.index}`)}function Nl(s){const e=M.c(114),{part:t,id:n,usageStats:a,dataParts:o,isLoading:c,isLastMessage:i}=s;let u;e[0]!==o.toolMetadata?(u=m=>o.toolMetadata.get(m),e[0]=o.toolMetadata,e[1]=u):u=e[1];const r=u;let f;e[2]!==o.toolSubtaskMetadata?(f=m=>o.toolSubtaskMetadata.get(m),e[2]=o.toolSubtaskMetadata,e[3]=f):f=e[3];const d=f;switch(t.type){case"dynamic-tool":{let m;e[4]!==r||e[5]!==t.toolCallId?(m=r(t.toolCallId)?.annotations,e[4]=r,e[5]=t.toolCallId,e[6]=m):m=e[6];let p;e[7]!==r||e[8]!==t.toolCallId?(p=r(t.toolCallId)?.latencySeconds,e[7]=r,e[8]=t.toolCallId,e[9]=p):p=e[9];let g;e[10]!==r||e[11]!==t.toolCallId?(g=r(t.toolCallId)?.outputBytes,e[10]=r,e[11]=t.toolCallId,e[12]=g):g=e[12];let x;e[13]!==r||e[14]!==t.toolCallId?(x=r(t.toolCallId)?._meta,e[13]=r,e[14]=t.toolCallId,e[15]=x):x=e[15];let h;return e[16]!==i||e[17]!==t||e[18]!==m||e[19]!==p||e[20]!==g||e[21]!==x?(h=l.jsx(lt,{part:t,annotations:m,latency:p,outputBytes:g,isLastMessage:i,toolMeta:x}),e[16]=i,e[17]=t,e[18]=m,e[19]=p,e[20]=g,e[21]=x,e[22]=h):h=e[22],h}case"tool-todo_write":return null;case"tool-update_interests":return null;case"tool-user_ask":{let m;e[23]!==r||e[24]!==t.toolCallId?(m=r(t.toolCallId)?.latencySeconds,e[23]=r,e[24]=t.toolCallId,e[25]=m):m=e[25];let p;return e[26]!==t||e[27]!==m?(p=l.jsx(_a,{part:t,latency:m}),e[26]=t,e[27]=m,e[28]=p):p=e[28],p}case"tool-suggest_task":{let m;return e[29]!==t?(m=l.jsx(Ta,{part:t}),e[29]=t,e[30]=m):m=e[30],m}case"tool-propose_plan":{let m;return e[31]!==t?(m=l.jsx(Da,{part:t}),e[31]=t,e[32]=m):m=e[32],m}case"tool-generate_image":{let m;e[33]!==r||e[34]!==t.toolCallId?(m=r(t.toolCallId)?.latencySeconds,e[33]=r,e[34]=t.toolCallId,e[35]=m):m=e[35];let p;return e[36]!==t||e[37]!==m?(p=l.jsx(ma,{part:t,latency:m}),e[36]=t,e[37]=m,e[38]=p):p=e[38],p}case"tool-web_search":case"tool-deep_research":{let m;e[39]!==r||e[40]!==t.toolCallId?(m=r(t.toolCallId)?.latencySeconds,e[39]=r,e[40]=t.toolCallId,e[41]=m):m=e[41];let p;e[42]!==o.webSearchStreaming||e[43]!==t.toolCallId?(p=o.webSearchStreaming.get(t.toolCallId),e[42]=o.webSearchStreaming,e[43]=t.toolCallId,e[44]=p):p=e[44];let g;return e[45]!==t||e[46]!==m||e[47]!==p?(g=l.jsx(wa,{part:t,latency:m,streamingText:p}),e[45]=t,e[46]=m,e[47]=p,e[48]=g):g=e[48],g}case"tool-subtask":{let m;e[49]!==d||e[50]!==t.toolCallId?(m=d(t.toolCallId),e[49]=d,e[50]=t.toolCallId,e[51]=m):m=e[51];let p;e[52]!==r||e[53]!==t.toolCallId?(p=r(t.toolCallId)?.annotations,e[52]=r,e[53]=t.toolCallId,e[54]=p):p=e[54];let g;e[55]!==r||e[56]!==t.toolCallId?(g=r(t.toolCallId)?.latencySeconds,e[55]=r,e[56]=t.toolCallId,e[57]=g):g=e[57];let x;e[58]!==t||e[59]!==m||e[60]!==p||e[61]!==g?(x={part:t,subtaskMeta:m,annotations:p,latency:g},e[58]=t,e[59]=m,e[60]=p,e[61]=g,e[62]=x):x=e[62];const h=x;let y;return e[63]!==h?(y=l.jsx(z.Suspense,{fallback:l.jsx(za,{...h}),children:l.jsx(Fa,{...h})}),e[63]=h,e[64]=y):y=e[64],y}case"text":{const m=!!a&&!c,p=c&&i;let g;return e[65]!==n||e[66]!==t||e[67]!==m||e[68]!==p||e[69]!==a?(g=l.jsx(Ce,{id:n,part:t,extraActions:a,copyable:!0,alwaysShowActions:m,animate:p}),e[65]=n,e[66]=t,e[67]=m,e[68]=p,e[69]=a,e[70]=g):g=e[70],g}case"reasoning":return null;case"step-start":case"file":case"source-url":case"source-document":return null;case"data-tool-metadata":case"data-tool-subtask-metadata":case"data-generate-image":case"data-web-search":return null;default:{const m=t;if(m.type==="tool-COLLECTION_VIRTUAL_MCP_CREATE"){let p;e[71]!==m.toolCallId||e[72]!==r?(p=r(m.toolCallId)?.latencySeconds,e[71]=m.toolCallId,e[72]=r,e[73]=p):p=e[73];let g;return e[74]!==m||e[75]!==p?(g=l.jsx(Ba,{part:m,latency:p}),e[74]=m,e[75]=p,e[76]=g):g=e[76],g}if(m.type==="tool-COLLECTION_VIRTUAL_MCP_LIST"){let p;e[77]!==m.toolCallId||e[78]!==r?(p=r(m.toolCallId)?.latencySeconds,e[77]=m.toolCallId,e[78]=r,e[79]=p):p=e[79];let g;return e[80]!==m||e[81]!==p?(g=l.jsx(Wa,{part:m,latency:p}),e[80]=m,e[81]=p,e[82]=g):g=e[82],g}if(m.type==="tool-COLLECTION_CONNECTIONS_LIST"){let p;e[83]!==m.toolCallId||e[84]!==r?(p=r(m.toolCallId)?.latencySeconds,e[83]=m.toolCallId,e[84]=r,e[85]=p):p=e[85];let g;return e[86]!==m||e[87]!==p?(g=l.jsx(Ja,{part:m,latency:p}),e[86]=m,e[87]=p,e[88]=g):g=e[88],g}if(m.type.startsWith("tool-")){const p=m;let g;e[89]!==o.toolMetadata||e[90]!==p.toolCallId?(g=o.toolMetadata.get(p.toolCallId),e[89]=o.toolMetadata,e[90]=p.toolCallId,e[91]=g):g=e[91];const x=g;let h;e[92]!==m.type||e[93]!==p.output?(h=m.type.endsWith("__get_screenshot")?ca(p.output):null,e[92]=m.type,e[93]=p.output,e[94]=h):h=e[94];const y=h,b=x?.annotations,k=x?.latencySeconds,j=x?.outputBytes,w=x?._meta;let S;e[95]!==m||e[96]!==i||e[97]!==b||e[98]!==k||e[99]!==j||e[100]!==w?(S=l.jsx(lt,{part:m,annotations:b,latency:k,outputBytes:j,isLastMessage:i,toolMeta:w}),e[95]=m,e[96]=i,e[97]=b,e[98]=k,e[99]=j,e[100]=w,e[101]=S):S=e[101];const N=S;if(!y)return N;let v;e[102]!==y?(v=[y],e[102]=y,e[103]=v):v=e[103];let _;e[104]!==p.type?(_=p.type.slice(5),e[104]=p.type,e[105]=_):_=e[105];let T;e[106]!==v||e[107]!==_?(T=l.jsx(Ot,{srcs:v,alt:_}),e[106]=v,e[107]=_,e[108]=T):T=e[108];let A;return e[109]!==N||e[110]!==T?(A=l.jsxs("div",{className:"flex flex-col gap-2",children:[N,T]}),e[109]=N,e[110]=T,e[111]=A):A=e[111],A}if(t.type===Ie){let p;return e[112]!==t?(p=l.jsx(ll,{part:t}),e[112]=t,e[113]=p):p=e[113],p}return m.type.startsWith("data-")||console.warn(`[chat] unknown message part type: ${m.type}`),null}}}function kl(s){const e=M.c(3),{pending:t,children:n}=s;if(!t||t.length===0)return n;let a;return e[0]!==n||e[1]!==t?(a=l.jsxs("div",{className:"flex flex-col gap-3 sm:gap-2",children:[n,t]}),e[0]=n,e[1]=t,e[2]=a):a=e[2],a}function wl(s){const e=M.c(9),{isRunInProgress:t}=s,n=H();if(t){let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=l.jsx(Te,{className:"text-muted-foreground shrink-0 animate-pulse",size:14}),e[0]=c):c=e[0];let i;e[1]!==n?(i=n("chat.assistant.resumingTask"),e[1]=n,e[2]=i):i=e[2];let u;return e[3]!==i?(u=l.jsx("div",{className:"flex items-center gap-1.5 py-2 opacity-60",children:l.jsxs("span",{className:"flex items-center gap-1.5",children:[c,l.jsx("span",{className:"text-[14px] text-muted-foreground shimmer",children:i})]})}),e[3]=i,e[4]=u):u=e[4],u}let a;e[5]!==n?(a=n("chat.assistant.noResponseGenerated"),e[5]=n,e[6]=a):a=e[6];let o;return e[7]!==a?(o=l.jsx("div",{className:"text-[14px] text-muted-foreground/60 py-2",children:a}),e[7]=a,e[8]=o):o=e[8],o}function _l(s){const e=M.c(7),{className:t,children:n}=s;let a;e[0]!==t?(a=V("w-full min-w-0 group relative flex items-start gap-4 px-4 z-20 text-foreground flex-row",t),e[0]=t,e[1]=a):a=e[1];let o;e[2]!==n?(o=l.jsx("div",{className:"flex flex-col min-w-0 w-full items-start",children:l.jsx("div",{className:"w-full min-w-0 not-only:rounded-2xl text-[14px] wrap-break-word overflow-wrap-anywhere bg-transparent",children:n})}),e[2]=n,e[3]=o):o=e[3];let c;return e[4]!==a||e[5]!==o?(c=l.jsx("div",{className:a,children:o}),e[4]=a,e[5]=o,e[6]=c):c=e[6],c}function Tl(s){const e=M.c(16),{message:t,turnStartedAt:n,status:a,className:o,isLast:c}=s,i=c===void 0?!1:c,u=H(),{isRunInProgress:r}=ye()??{},f=r===void 0?!1:r,d=je()?.taskId??null,m=a==="streaming",g=m||a==="submitted";let x;e[0]!==n?(x=We(n),e[0]=n,e[1]=x):x=e[1];const h=x;let y;e[2]!==g?(y=()=>g?Date.now():null,e[2]=g,e[3]=y):y=e[3];const[b,k]=z.useState(y),[j,w]=z.useState(g);j!==g&&(w(g),k(()=>g?Date.now():null));const S=h??b,{reasoningGroups:N,renderOrder:v,dataParts:_}=hl(t),T=t!==null&&v.length>0,A=t&&t.parts.length>0?t.parts[t.parts.length-1]:null,P=m&&A?.type==="reasoning";let E;if(e[4]!==t){const G=t?.metadata?.reasoning_start_at?new Date(t.metadata.reasoning_start_at):null,Q=t?.metadata?.reasoning_end_at?new Date(t.metadata.reasoning_end_at):new Date;E=G!==null?Q.getTime()-G.getTime():null,e[4]=t,e[5]=E}else E=e[5];const L=E;let I;e[6]!==i||e[7]!==t?(I=!i||!t||!t.parts.some(Il),e[6]=i,e[7]=t,e[8]=I):I=e[8];const $=I,C=!g&&T&&$&&(()=>{let G=0;for(const Q of v)if(Q.kind==="part"){const ne=t.parts[Q.index]?.type;(ne==="dynamic-tool"||ne?.startsWith("tool-"))&&G++}return G>=bl})(),{collapsed:R,tail:D}=C?yl(v,t.parts):{collapsed:[],tail:v},{pending:B}=bt();let U;e[9]!==i||e[10]!==B?(U=i?B.map(Cl):null,e[9]=i,e[10]=B,e[11]=U):U=e[11];const W=U,K=_l,X=T?l.jsxs("div",{className:"flex flex-col gap-3 sm:gap-2",children:[t.metadata?.resumedFromBackground&&l.jsxs("div",{className:"flex items-center gap-1.5 text-[12px] text-muted-foreground/60 select-none",children:[l.jsx(dt,{className:"size-3 shrink-0"}),l.jsx("span",{children:u("chat.assistant.resumedBackgroundTask")})]}),R.length>0&&l.jsx(Sl,{items:R,message:t,reasoningGroups:N,isReasoningActive:P,totalDuration:L,dataParts:_,isLoading:g,isLast:i}),D.map((G,Q)=>{const ne=R.length+Q,oe=D.findLastIndex(ee=>Qt(ee,t.parts))===Q;return Xt({item:G,renderIndex:ne,message:t,reasoningGroups:N,isReasoningActive:P,totalDuration:L,dataParts:_,isLoading:g,isLast:i,isLastVisiblePart:oe,renderOrder:v})}),d&&l.jsx(pl,{threadId:d,message:t}),W,i&&g&&S!==null&&l.jsx(An,{startedAt:S}),i&&!g&&d&&l.jsxs(l.Fragment,{children:[l.jsx(rl,{}),$&&l.jsx(Ya,{})]}),!g&&l.jsx(Lt,{message:t})]}):l.jsx(kl,{pending:W,children:g?l.jsx(Ln,{startedAt:S}):l.jsx(wl,{isRunInProgress:i&&f})});let Z;return e[12]!==K||e[13]!==o||e[14]!==X?(Z=l.jsx(K,{className:o,children:X}),e[12]=K,e[13]=o,e[14]=X,e[15]=Z):Z=e[15],Z}function Cl(s){return l.jsx(Jt,{message:s,pending:!0},s.id)}function Il(s){const e=s.type;if(e!=="dynamic-tool"&&!e?.startsWith("tool-"))return!1;const t=s.state;return t==="input-streaming"||t==="input-available"||t==="approval-requested"}function yo(s){const e=[],t=s.filter(n=>n.role!=="system"&&!n.metadata?.internal&&!n.metadata?.subtaskJobId);for(let n=0;n<t.length;n++){const a=t[n];if(a)if(a.role==="user"){const o=t[n+1];o&&o.role==="assistant"?(e.push({user:a,assistant:o}),n++):e.push({user:a,assistant:null})}else a.role==="assistant"&&e.push({user:null,assistant:a})}return e}function jo(s){const e=M.c(19),{pair:t,isLastPair:n,status:a}=s,o=z.useRef(null),c=z.useRef(!1);let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{o.current&&o.current.scrollIntoView({behavior:"smooth",block:"start"})},e[0]=i):i=e[0];const u=i;let r;e[1]!==n||e[2]!==t.assistant?.metadata?.resumedFromBackground||e[3]!==a?(r=y=>{if(o.current=y,!n||!y||c.current||(c.current=!0,t.assistant?.metadata?.resumedFromBackground))return;if(a==="submitted"||a==="streaming"){y.scrollIntoView({behavior:"smooth",block:"start"});return}const b=y.closest("[data-chat-scroller]");b?b.scrollTop=b.scrollHeight:y.scrollIntoView({behavior:"instant",block:"start"})},e[1]=n,e[2]=t.assistant?.metadata?.resumedFromBackground,e[3]=a,e[4]=r):r=e[4];const f=r,d=!t.user&&"pt-8 sm:pt-6";let m;e[5]!==d?(m=V("flex flex-col pb-2 sm:pb-2",d),e[5]=d,e[6]=m):m=e[6];let p;e[7]!==t.user?(p=t.user&&l.jsxs(l.Fragment,{children:[l.jsx("div",{className:"sticky top-0 z-50 w-full h-4 bg-background"}),l.jsx("div",{className:"sticky mb-8 sm:mb-6 top-4 z-50",children:l.jsx(Vt,{message:t.user,onScrollToPair:u})})]}),e[7]=t.user,e[8]=p):p=e[8];const g=t.user?.created_at??null;let x;e[9]!==n||e[10]!==t.assistant||e[11]!==a||e[12]!==g?(x=l.jsx(Tl,{message:t.assistant,turnStartedAt:g,status:a,isLast:n}),e[9]=n,e[10]=t.assistant,e[11]=a,e[12]=g,e[13]=x):x=e[13];let h;return e[14]!==f||e[15]!==m||e[16]!==p||e[17]!==x?(h=l.jsxs("div",{ref:f,className:m,children:[p,x]}),e[14]=f,e[15]=m,e[16]=p,e[17]=x,e[18]=h):h=e[18],h}export{Sn as G,jo as M,ul as O,bo as S,Cn as a,On as f,yo as u};
@@ -1 +0,0 @@
1
- import{c as m,j as r}from"./index-DEQvnIsm.js";import{C as i}from"./index-mh7U_AKI.js";import{C as p}from"./coming-soon-page-DsS1SnMg.js";import"./use-mobile-CSFJ-mhK.js";import"./use-sidebar-collapsed-Dv10z2iu.js";import"./use-chat-layout-state-C-XHZ0Dd.js";import"./thread-route-DTbE-Col.js";import"./use-panel-navigate-BwwjvhNB.js";import"./use-project-scope-Dn4doId4.js";import"./repository-binding-DpSh0bkT.js";import"./use-mcp-client-CAdgJ_QT.js";import"./auth-BVkTFTOt.js";import"./thread-intent-8kpZLcDE.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-C7xRCtu5.js";import"./task-board-DUTGhEiC.js";import"./schema-BzqS-kNt.js";import"./slugify-CEUa2lfQ.js";import"./agent-icon-D6wS7rd0.js";import"./AlertCircle-Q16nTVAa.js";import"./Tool01-Bp-TbrXi.js";import"./ArrowUp--4P0C-xl.js";import"./ArrowLeft-C_dTX_8N.js";import"./LinkBroken01-DmmKNgpp.js";import"./ShoppingBag01-B7gta_qY.js";import"./ZoomOut-B3s5275g.js";import"./Building02-Gub-pr-8.js";import"./CheckCircle-CQxu_pm9.js";import"./ChevronUp-DK-Gvyk8.js";import"./ChevronSelectorVertical-GBLm8Zpl.js";import"./UserSquare-cdWcOBLL.js";import"./Copy01-EWitDFCf.js";import"./CreditCard01-wx_z4Iiz.js";import"./DotsVertical-DIT5hu2b.js";import"./Image01-BfGAREA7.js";import"./Globe04-B45_cBRN.js";import"./SwitchHorizontal01-BJyDDPw9.js";import"./Key01-BV7tzZs6.js";import"./Link01-9civFIb9.js";import"./Monitor01-BoSs_8gg.js";import"./Sun-BfjJa3ru.js";import"./Play-CleWZLOG.js";import"./Plus-DQf-jm_3.js";import"./SearchMd-D0zp0uee.js";import"./Trash01-Dlk_Sh-H.js";import"./Upload01-DlF9Jqso.js";import"./User01-BcekHhAV.js";import"./Users01-BIP-PxGt.js";import"./XClose-L_GNViCD.js";import"./tooltip-B6NbTX5P.js";import"./index-BaQyqQF-.js";import"./toolbar-icon-button-BypH-a8F.js";import"./shell-layout-DKGS0yWx.js";import"./avatar-LfY3dprD.js";import"./use-clock-tick-xpCK7CUB.js";import"./command-KXg0ZuU-.js";import"./index-B9qNCJbx.js";import"./integration-icon-Bysyldtc.js";import"./project-icon-ChTT5o1a.js";import"./new-project-dialog-DKeFr4C7.js";import"./label-Cf2Qy475.js";import"./repository-import-picker-CmGbASze.js";import"./use-navigate-to-agent-B-QlLf3R.js";import"./repository-picker-C86kcY-U.js";import"./useInfiniteQuery-Bo5dbMM_.js";import"./infiniteQueryObserver-BnP8vr6V.js";import"./collection-search-Dcze6ySb.js";import"./use-debounced-value-vhgvmVq4.js";import"./use-organization-settings-BtOReG0H.js";import"./required-auth-layout-RW5dOh2c.js";import"./autosend-CL2OZPvg.js";import"./use-org-sso-BhMczCH6.js";import"./sheet-CzJFx6b-.js";import"./resizable-DueLEUEm.js";import"./badge-CyDHDRPg.js";function $o(){const t=m.c(1);let o;return t[0]===Symbol.for("react.memo_cache_sentinel")?(o=r.jsx(i.Content,{children:r.jsx(p,{kind:"plan"})}),t[0]=o):o=t[0],o}export{$o as default};
@@ -1 +0,0 @@
1
- import{r as i,bA as A,j as c,bC as O,bD as h,bB as _,bx as L,by as z,bz as G,bG as j,bP as H,dn as w,bK as K,bM as B,bQ as Q,bL as U,bN as V,bO as W,bR as Z,bS as q,bF as J,c as C,l as X}from"./index-DEQvnIsm.js";var m="Popover",[E]=H(m,[j]),x=j(),[Y,v]=E(m),N=t=>{const{__scopePopover:e,children:o,open:r,defaultOpen:n,onOpenChange:s,modal:a=!1}=t,p=x(e),d=i.useRef(null),[l,u]=i.useState(!1),[f,P]=L({prop:r,defaultProp:n??!1,onChange:s,caller:m});return c.jsx(z,{...p,children:c.jsx(Y,{scope:e,contentId:G(),triggerRef:d,open:f,onOpenChange:P,onOpenToggle:i.useCallback(()=>P(R=>!R),[P]),hasCustomAnchor:l,onCustomAnchorAdd:i.useCallback(()=>u(!0),[]),onCustomAnchorRemove:i.useCallback(()=>u(!1),[]),modal:a,children:o})})};N.displayName=m;var F="PopoverAnchor",S=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(F,o),s=x(o),{onCustomAnchorAdd:a,onCustomAnchorRemove:p}=n;return i.useEffect(()=>(a(),()=>p()),[a,p]),c.jsx(_,{...s,...r,ref:e})});S.displayName=F;var y="PopoverTrigger",D=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(y,o),s=x(o),a=A(e,n.triggerRef),p=c.jsx(O.button,{type:"button","aria-haspopup":"dialog","aria-expanded":n.open,"aria-controls":n.contentId,"data-state":$(n.open),...r,ref:a,onClick:h(t.onClick,n.onOpenToggle)});return n.hasCustomAnchor?p:c.jsx(_,{asChild:!0,...s,children:p})});D.displayName=y;var b="PopoverPortal",[ee,oe]=E(b,{forceMount:void 0}),M=t=>{const{__scopePopover:e,forceMount:o,children:r,container:n}=t,s=v(b,e);return c.jsx(ee,{scope:e,forceMount:o,children:c.jsx(w,{present:o||s.open,children:c.jsx(J,{asChild:!0,container:n,children:r})})})};M.displayName=b;var g="PopoverContent",T=i.forwardRef((t,e)=>{const o=oe(g,t.__scopePopover),{forceMount:r=o.forceMount,...n}=t,s=v(g,t.__scopePopover);return c.jsx(w,{present:r||s.open,children:s.modal?c.jsx(re,{...n,ref:e}):c.jsx(ne,{...n,ref:e})})});T.displayName=g;var te=Q("PopoverContent.RemoveScroll"),re=i.forwardRef((t,e)=>{const o=v(g,t.__scopePopover),r=i.useRef(null),n=A(e,r),s=i.useRef(!1);return i.useEffect(()=>{const a=r.current;if(a)return K(a)},[]),c.jsx(B,{as:te,allowPinchZoom:!0,children:c.jsx(k,{...t,ref:n,trapFocus:o.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:h(t.onCloseAutoFocus,a=>{a.preventDefault(),s.current||o.triggerRef.current?.focus()}),onPointerDownOutside:h(t.onPointerDownOutside,a=>{const p=a.detail.originalEvent,d=p.button===0&&p.ctrlKey===!0,l=p.button===2||d;s.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:h(t.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1})})})}),ne=i.forwardRef((t,e)=>{const o=v(g,t.__scopePopover),r=i.useRef(!1),n=i.useRef(!1);return c.jsx(k,{...t,ref:e,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{t.onCloseAutoFocus?.(s),s.defaultPrevented||(r.current||o.triggerRef.current?.focus(),s.preventDefault()),r.current=!1,n.current=!1},onInteractOutside:s=>{t.onInteractOutside?.(s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(n.current=!0));const a=s.target;o.triggerRef.current?.contains(a)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&n.current&&s.preventDefault()}})}),k=i.forwardRef((t,e)=>{const{__scopePopover:o,trapFocus:r,onOpenAutoFocus:n,onCloseAutoFocus:s,disableOutsidePointerEvents:a,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:l,onInteractOutside:u,...f}=t,P=v(g,o),R=x(o);return U(),c.jsx(V,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:n,onUnmountAutoFocus:s,children:c.jsx(W,{asChild:!0,disableOutsidePointerEvents:a,onInteractOutside:u,onEscapeKeyDown:p,onPointerDownOutside:d,onFocusOutside:l,onDismiss:()=>P.onOpenChange(!1),children:c.jsx(Z,{"data-state":$(P.open),role:"dialog",id:P.contentId,...R,...f,ref:e,style:{...f.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),I="PopoverClose",se=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=v(I,o);return c.jsx(O.button,{type:"button",...r,ref:e,onClick:h(t.onClick,()=>n.onOpenChange(!1))})});se.displayName=I;var ae="PopoverArrow",ce=i.forwardRef((t,e)=>{const{__scopePopover:o,...r}=t,n=x(o);return c.jsx(q,{...n,...r,ref:e})});ce.displayName=ae;function $(t){return t?"open":"closed"}var ie=N,pe=S,le=D,ue=M,de=T;function ve(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(ie,{"data-slot":"popover",...o}),e[2]=o,e[3]=r):r=e[3],r}function Pe(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(le,{"data-slot":"popover-trigger",...o}),e[2]=o,e[3]=r):r=e[3],r}function ge(t){const e=C.c(16);let o,r,n,s,a;e[0]!==t?({className:o,align:s,sideOffset:a,container:r,...n}=t,e[0]=t,e[1]=o,e[2]=r,e[3]=n,e[4]=s,e[5]=a):(o=e[1],r=e[2],n=e[3],s=e[4],a=e[5]);const p=s===void 0?"center":s,d=a===void 0?4:a;let l;e[6]!==o?(l=X("notranslate bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 origin-(--radix-popover-content-transform-origin) rounded-[var(--studio-surface-radius,var(--radius-lg))] overflow-hidden border p-4 shadow-md outline-hidden",o),e[6]=o,e[7]=l):l=e[7];let u;e[8]!==p||e[9]!==n||e[10]!==d||e[11]!==l?(u=c.jsx(de,{"data-slot":"popover-content",align:p,sideOffset:d,translate:"no",className:l,...n}),e[8]=p,e[9]=n,e[10]=d,e[11]=l,e[12]=u):u=e[12];let f;return e[13]!==r||e[14]!==u?(f=c.jsx(ue,{container:r,children:u}),e[13]=r,e[14]=u,e[15]=f):f=e[15],f}function he(t){const e=C.c(4);let o;e[0]!==t?({...o}=t,e[0]=t,e[1]=o):o=e[1];let r;return e[2]!==o?(r=c.jsx(pe,{"data-slot":"popover-anchor",...o}),e[2]=o,e[3]=r):r=e[3],r}export{ve as P,Pe as a,ge as b,he as c};
@@ -1 +0,0 @@
1
- import{c as it,b as pt,r as lt,F as jt,j as e,l as et,B as tt,av as Nt}from"./index-DEQvnIsm.js";import{a4 as Ct,G as Dt}from"./agent-icon-D6wS7rd0.js";import{s as kt}from"./Plus-DQf-jm_3.js";import{S as St}from"./scroll-area-CIRLWlOA.js";import{aJ as wt,l as zt,aE as Tt,aF as Et,aK as Pt,aD as ct,aH as dt}from"./content-tab-DYpKep2J.js";import"./AlertCircle-Q16nTVAa.js";import"./Tool01-Bp-TbrXi.js";import"./ArrowUp--4P0C-xl.js";import"./ArrowLeft-C_dTX_8N.js";import"./LinkBroken01-DmmKNgpp.js";import"./ShoppingBag01-B7gta_qY.js";import"./ZoomOut-B3s5275g.js";import"./Building02-Gub-pr-8.js";import"./CheckCircle-CQxu_pm9.js";import"./ChevronUp-DK-Gvyk8.js";import"./ChevronSelectorVertical-GBLm8Zpl.js";import"./UserSquare-cdWcOBLL.js";import"./Copy01-EWitDFCf.js";import"./CreditCard01-wx_z4Iiz.js";import"./DotsVertical-DIT5hu2b.js";import"./Image01-BfGAREA7.js";import"./Globe04-B45_cBRN.js";import"./SwitchHorizontal01-BJyDDPw9.js";import"./Key01-BV7tzZs6.js";import"./Link01-9civFIb9.js";import"./Monitor01-BoSs_8gg.js";import"./Sun-BfjJa3ru.js";import"./Play-CleWZLOG.js";import"./SearchMd-D0zp0uee.js";import"./Trash01-Dlk_Sh-H.js";import"./Upload01-DlF9Jqso.js";import"./User01-BcekHhAV.js";import"./Users01-BIP-PxGt.js";import"./XClose-L_GNViCD.js";import"./index-BdQq_4o_.js";import"./use-organization-settings-BtOReG0H.js";import"./schema-BzqS-kNt.js";import"./task-board-DUTGhEiC.js";import"./chat-context-Dv2E4fnf.js";import"./use-panel-navigate-BwwjvhNB.js";import"./thread-route-DTbE-Col.js";import"./use-project-scope-Dn4doId4.js";import"./repository-binding-DpSh0bkT.js";import"./use-mcp-client-CAdgJ_QT.js";import"./auth-BVkTFTOt.js";import"./autosend-CL2OZPvg.js";import"./thread-intent-8kpZLcDE.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-C7xRCtu5.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-Czwn8ZVj.js";import"./use-ai-providers-W2Q5vYCk.js";import"./location-BjlyegC2.js";import"./alert-dialog-ygFmYcOa.js";import"./tooltip-B6NbTX5P.js";import"./index-BaQyqQF-.js";import"./site-editor-toast-CmNIWnCw.js";import"./input-Brhdhig1.js";import"./usage-stats-BH4bqLoE.js";import"./tool-namespace-CTeV292R.js";import"./form-DNjk4sZI.js";import"./label-Cf2Qy475.js";import"./utils-CVEq3hMx.js";import"./markdown-DgDY2QmE.js";import"./use-copy-Dkgb0DtI.js";import"./use-mobile-CSFJ-mhK.js";import"./format-time-Cq80KKvY.js";import"./differenceInSeconds-C3x8sHUj.js";import"./icon-button-WP5IJTs8.js";import"./file-type-icon-HF5UcaS2.js";import"./shell-layout-DKGS0yWx.js";import"./avatar-LfY3dprD.js";import"./use-clock-tick-xpCK7CUB.js";import"./command-KXg0ZuU-.js";import"./index-B9qNCJbx.js";import"./integration-icon-Bysyldtc.js";import"./project-icon-ChTT5o1a.js";import"./new-project-dialog-DKeFr4C7.js";import"./repository-import-picker-CmGbASze.js";import"./use-navigate-to-agent-B-QlLf3R.js";import"./repository-picker-C86kcY-U.js";import"./useInfiniteQuery-Bo5dbMM_.js";import"./infiniteQueryObserver-BnP8vr6V.js";import"./collection-search-Dcze6ySb.js";import"./use-debounced-value-vhgvmVq4.js";import"./required-auth-layout-RW5dOh2c.js";import"./use-org-sso-BhMczCH6.js";import"./chat-draft-X1dGJc2x.js";import"./select-ChqJI0MI.js";import"./tabs-D0oiuUhC.js";import"./use-deco-credits-k0aTLB-T.js";import"./toggle-group-BWQRN38D.js";import"./use-open-billing-url-DWsw6Alp.js";import"./index-DZLfyA8t.js";import"./checkbox-CaUezNgL.js";import"./ai-providers-logos-DD3qZ33J.js";import"./popover-CjfUWaC0.js";import"./drawer-DL0G-oy-.js";import"./input-Bu2Qzwzh.js";import"./suggestion-DRP05M3-.js";import"./use-mcp-prompts-D1rnFTSb.js";import"./use-org-fs-CAwgni1d.js";import"./question-004-sINsf4GQ.js";import"./use-members-D-L919KG.js";import"./use-org-auth-client-Co_fa5Pp.js";import"./feature-paywall-BSXK-EmV.js";import"./plan-ladder-CFysCUYy.js";import"./add-connection-dialog-DwDvS8Uw.js";import"./extract-connection-data-BlmKelwb.js";import"./metadata-D72DunRR.js";import"./connection-CEK3iDim.js";import"./url-slug-CYvqbzge.js";import"./connection-card-Zhg6xn7V.js";import"./connection-slug-CITJ0kGN.js";import"./textarea-CWgoXXnV.js";import"./use-connection-Cqf7M1G6.js";import"./schema-Bcb37BRV.js";import"./connection-form-helpers-DAFP702a.js";import"./authenticate-and-persist-oauth-POYqGagt.js";import"./mcp-oauth-C_-ZUSLH.js";import"./mcp-oauth-aX1L4mRw.js";import"./collection-tabs-yg6VVFu9.js";import"./badge-CyDHDRPg.js";import"./use-infinite-scroll-B9sczgXI.js";import"./useSuspenseInfiniteQuery-CcFcpWuM.js";import"./use-task-board-events-CmYlpSMI.js";import"./use-chat-layout-state-C-XHZ0Dd.js";import"./use-main-schema-v8-Jzc_7tOC.js";import"./sandbox-url-D3mC8qhT.js";import"./utils-D-52h1Lf.js";import"./index-DAYXa7zL.js";import"./pair-ByV0vAAs.js";import"./collapsible-DHXUZre4.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-pDbHkuXF.js";import"./types-m1Dsi5sG.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-CzJFx6b-.js";import"./use-thread-outputs-BUN4R0HD.js";import"./sandbox-git-api-CRxdlhrN.js";import"./blocks-tab-states-BjRnBrj4.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./secret-ciphertext-6VBjcV3b.js";import"./alert-PPdejvI2.js";import"./switch-CJc_fIEE.js";import"./monaco-editor-DDuHJmyY.js";import"./editor-B62-XQRE.js";import"./calendar-sxNtZ9wG.js";import"./editor-classes-BAKuqcj0.js";import"./core.esm-BO316fgf.js";import"./sortable.esm-BuCSUlOk.js";import"./view-mode-toggle-Bgum-rnB.js";import"./combobox-B5xPQiKP.js";import"./search-input-Br9i_Ft5.js";import"./use-file-configs-BIHMmAjW.js";import"./asset-utils-Duz2qYol.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./empty-state-JTI0oLk7.js";import"./mustache-DrIjKpei.js";import"./use-content-sync-D6XyiV7H.js";import"./sandbox-lifecycle-context-BIf8-4ZY.js";import"./empty-state-lzzC-d42.js";const ft="border-success/30 bg-success/10 text-success hover:bg-success/20",xt="border-dashed border-border bg-muted text-muted-foreground hover:bg-accent hover:text-accent-foreground";function Uo(h){const t=it.c(83),{decofile:b,selectedKey:d,onSelect:o,onCreate:m,onReschedule:i,isCreating:D}=h,s=D===void 0?!1:D,r=pt(),[j,N]=lt.useState(null),[rt]=jt(),[n,f]=lt.useState(Ht),p=rt.language;let C;t[0]!==n||t[1]!==p?(C=new Intl.DateTimeFormat(p,{month:"long",year:"numeric"}).format(n),t[0]=n,t[1]=p,t[2]=C):C=t[2];const v=C;let x,u,a,c,y,k,S,w,z,T;if(t[3]!==n||t[4]!==b||t[5]!==j||t[6]!==s||t[7]!==p||t[8]!==v||t[9]!==m||t[10]!==i||t[11]!==o||t[12]!==d||t[13]!==r){const ut=new Intl.DateTimeFormat(p,{weekday:"short"}),gt=new Intl.DateTimeFormat(p,{dateStyle:"long"}),{byDay:ht,undated:ot}=wt(zt(b)),st=Tt(n),bt=Et(new Date);u="flex h-full w-full flex-col";let q;t[24]===Symbol.for("react.memo_cache_sentinel")?(q=()=>f(ct(new Date)),t[24]=q):q=t[24];let H;t[25]!==r?(H=r("sandbox.postCalendar.today"),t[25]=r,t[26]=H):H=t[26];let I;t[27]!==H?(I=e.jsx(tt,{variant:"outline",size:"sm",onClick:q,children:H}),t[27]=H,t[28]=I):I=t[28];let Q;t[29]===Symbol.for("react.memo_cache_sentinel")?(Q=()=>f(Mt),t[29]=Q):Q=t[29];let F;t[30]!==r?(F=r("sandbox.postCalendar.previous"),t[30]=r,t[31]=F):F=t[31];let V;t[32]===Symbol.for("react.memo_cache_sentinel")?(V=e.jsx(Dt,{size:16}),t[32]=V):V=t[32];let U;t[33]!==F?(U=e.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:Q,"aria-label":F,children:V}),t[33]=F,t[34]=U):U=t[34];let X;t[35]===Symbol.for("react.memo_cache_sentinel")?(X=()=>f(Lt),t[35]=X):X=t[35];let _;t[36]!==r?(_=r("sandbox.postCalendar.next"),t[36]=r,t[37]=_):_=t[37];let Y;t[38]===Symbol.for("react.memo_cache_sentinel")?(Y=e.jsx(Nt,{size:16}),t[38]=Y):Y=t[38];let $;t[39]!==_?($=e.jsx(tt,{variant:"ghost",size:"icon",className:"size-8",onClick:X,"aria-label":_,children:Y}),t[39]=_,t[40]=$):$=t[40];let O;t[41]!==v?(O=e.jsx("h2",{className:"ml-2 text-base font-semibold capitalize",children:v}),t[41]=v,t[42]=O):O=t[42];let B;t[43]!==r?(B=r("sandbox.postCalendar.legendScheduled"),t[43]=r,t[44]=B):B=t[44];let K;t[45]!==B?(K=e.jsx(mt,{className:ft,label:B}),t[45]=B,t[46]=K):K=t[46];let R;t[47]!==r?(R=r("sandbox.postCalendar.legendUnscheduled"),t[47]=r,t[48]=R):R=t[48];let A;t[49]!==R?(A=e.jsx(mt,{className:xt,label:R}),t[49]=R,t[50]=A):A=t[50];let W;t[51]!==K||t[52]!==A?(W=e.jsxs("div",{className:"ml-auto flex items-center gap-4",children:[K,A]}),t[51]=K,t[52]=A,t[53]=W):W=t[53],t[54]!==I||t[55]!==U||t[56]!==$||t[57]!==O||t[58]!==W?(a=e.jsxs("div",{className:"flex items-center gap-2 px-4 h-12 border-b shrink-0",children:[I,U,$,O,W]}),t[54]=I,t[55]=U,t[56]=$,t[57]=O,t[58]=W,t[59]=a):a=t[59],T="relative flex-1 min-h-0",x=St,z="h-full",S="flex min-w-[880px] gap-4 p-4";let G;t[60]!==r?(G=r("sandbox.postCalendar.unscheduledHint"),t[60]=r,t[61]=G):G=t[61];let Z;t[62]!==G?(Z=e.jsx("p",{className:"mt-3 text-xs text-muted-foreground",children:G}),t[62]=G,t[63]=Z):Z=t[63],w=e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("div",{className:"grid grid-cols-7 mb-2",children:st[0]?.map(l=>e.jsx("div",{className:"px-2 text-[11px] uppercase tracking-wider text-muted-foreground",children:ut.format(l)},l.getDay()))}),e.jsx("div",{className:"grid grid-cols-7 gap-px overflow-hidden rounded-lg border bg-border",children:st.flat().map(l=>{const vt=l.getMonth()===n.getMonth(),yt=ht.get(Pt(l))??[];return e.jsxs("div",{onDragOver:g=>{j&&(g.preventDefault(),g.dataTransfer.dropEffect="move")},onDrop:g=>{g.preventDefault();const at=g.dataTransfer.getData("text/plain");N(null),at&&i(at,l)},className:et("group/day min-h-28 space-y-1 p-2 transition-colors",vt?"bg-background":"bg-muted/40",j&&"hover:bg-accent"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:et("grid size-6 place-items-center rounded-full text-xs",l.getTime()===bt.getTime()?"bg-primary font-semibold text-primary-foreground":"text-muted-foreground"),children:l.getDate()}),e.jsx(tt,{variant:"ghost",size:"icon",className:"size-6 opacity-0 transition-opacity group-hover/day:opacity-100 focus-visible:opacity-100",disabled:s,onClick:()=>m(l),"aria-label":r("sandbox.postCalendar.schedulePostOn",{date:gt.format(l)}),children:e.jsx(kt,{size:14})})]}),yt.map(g=>e.jsx(nt,{entry:g,active:g.post.key===d,draggable:g.scheduled,onSelect:o,onDragStateChange:N},g.post.key))]},l.getTime())})}),Z]}),c="w-[220px] shrink-0 space-y-2 self-start rounded-lg border border-dashed p-3",y=e.jsx("p",{className:"px-1 text-[11px] font-medium uppercase tracking-wider text-muted-foreground",children:r("sandbox.postCalendar.undatedLabel",{count:ot.length})}),k=ot.length===0?e.jsxs("div",{className:"flex flex-col items-center gap-2 px-2 py-8 text-center",children:[e.jsx(Ct,{size:20,className:"text-muted-foreground/60","aria-hidden":!0}),e.jsx("p",{className:"text-xs text-muted-foreground",children:r("sandbox.postCalendar.undatedEmpty")})]}):ot.map(l=>e.jsx(nt,{entry:l,active:l.post.key===d,draggable:!1,onSelect:o,onDragStateChange:N},l.post.key)),t[3]=n,t[4]=b,t[5]=j,t[6]=s,t[7]=p,t[8]=v,t[9]=m,t[10]=i,t[11]=o,t[12]=d,t[13]=r,t[14]=x,t[15]=u,t[16]=a,t[17]=c,t[18]=y,t[19]=k,t[20]=S,t[21]=w,t[22]=z,t[23]=T}else x=t[14],u=t[15],a=t[16],c=t[17],y=t[18],k=t[19],S=t[20],w=t[21],z=t[22],T=t[23];let E;t[64]!==c||t[65]!==y||t[66]!==k?(E=e.jsxs("div",{className:c,children:[y,k]}),t[64]=c,t[65]=y,t[66]=k,t[67]=E):E=t[67];let P;t[68]!==E||t[69]!==S||t[70]!==w?(P=e.jsxs("div",{className:S,children:[w,E]}),t[68]=E,t[69]=S,t[70]=w,t[71]=P):P=t[71];let L;t[72]!==x||t[73]!==P||t[74]!==z?(L=e.jsx(x,{className:z,children:P}),t[72]=x,t[73]=P,t[74]=z,t[75]=L):L=t[75];let M;t[76]!==L||t[77]!==T?(M=e.jsx("div",{className:T,children:L}),t[76]=L,t[77]=T,t[78]=M):M=t[78];let J;return t[79]!==u||t[80]!==a||t[81]!==M?(J=e.jsxs("div",{className:u,children:[a,M]}),t[79]=u,t[80]=a,t[81]=M,t[82]=J):J=t[82],J}function Lt(h){return dt(h,1)}function Mt(h){return dt(h,-1)}function Ht(){return ct(new Date)}function mt(h){const t=it.c(7),{className:b,label:d}=h;let o;t[0]!==b?(o=et("size-3 rounded-sm border",b),t[0]=b,t[1]=o):o=t[1];let m;t[2]!==o?(m=e.jsx("span",{className:o}),t[2]=o,t[3]=m):m=t[3];let i;return t[4]!==d||t[5]!==m?(i=e.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-muted-foreground",children:[m,d]}),t[4]=d,t[5]=m,t[6]=i):i=t[6],i}function nt(h){const t=it.c(23),{entry:b,active:d,draggable:o,onSelect:m,onDragStateChange:i}=h,D=pt(),{post:s,scheduled:r}=b,j=r?"sandbox.postCalendar.legendScheduled":"sandbox.postCalendar.legendUnscheduled";let N;t[0]!==D||t[1]!==j?(N=D(j),t[0]=D,t[1]=j,t[2]=N):N=t[2];const rt=N;let n;t[3]!==i||t[4]!==s.key?(n=y=>{y.dataTransfer.setData("text/plain",s.key),y.dataTransfer.effectAllowed="move",i(s.key)},t[3]=i,t[4]=s.key,t[5]=n):n=t[5];let f;t[6]!==i?(f=()=>i(null),t[6]=i,t[7]=f):f=t[7];let p;t[8]!==m||t[9]!==s.key?(p=()=>m(s.key),t[8]=m,t[9]=s.key,t[10]=p):p=t[10];const C=`${s.title} · ${rt}`,v=r?ft:xt,x=o&&"cursor-grab active:cursor-grabbing",u=d&&"ring-2 ring-primary";let a;t[11]!==v||t[12]!==x||t[13]!==u?(a=et("w-full truncate rounded-lg border px-2 py-1 text-left text-xs font-medium transition-colors",v,x,u),t[11]=v,t[12]=x,t[13]=u,t[14]=a):a=t[14];let c;return t[15]!==o||t[16]!==s.title||t[17]!==a||t[18]!==n||t[19]!==f||t[20]!==p||t[21]!==C?(c=e.jsx("button",{type:"button",draggable:o,onDragStart:n,onDragEnd:f,onClick:p,title:C,className:a,children:s.title}),t[15]=o,t[16]=s.title,t[17]=a,t[18]=n,t[19]=f,t[20]=p,t[21]=C,t[22]=c):c=t[22],c}export{Uo as PostCalendar};
@@ -1,2 +0,0 @@
1
- import{b as Z,an as st,r as Q,j as t,B as Te,D as ot,q as it,s as lt,v as at,aM as nt,af as rt,l as Ye,w as ct,t as De,a5 as dt,h as pt,c as Be,I as we}from"./index-DEQvnIsm.js";import{u as mt}from"./chat-context-Dv2E4fnf.js";import{i as $e}from"./AlertCircle-Q16nTVAa.js";import{ab as ut,ax as xt,au as ft,E as gt}from"./agent-icon-D6wS7rd0.js";import{e as ht}from"./UserSquare-cdWcOBLL.js";import{s as bt}from"./Trash01-Dlk_Sh-H.js";import{s as jt}from"./XClose-L_GNViCD.js";import{f as vt,e as yt,b as St,A as Et,a as kt,d as Nt,c as Ct,g as Pt}from"./alert-dialog-ygFmYcOa.js";import{L as J}from"./label-Cf2Qy475.js";import{M as Tt}from"./multi-select-CfDYfsZ-.js";import{b as Dt,a as Lt,T as He,c as Me}from"./tabs-D0oiuUhC.js";import{S as wt}from"./switch-CJc_fIEE.js";import{T as Ke}from"./textarea-CWgoXXnV.js";import{u as Bt,K as At,a as Ft,U as Ie,V as zt,W as It}from"./blocks-tab-states-BjRnBrj4.js";import{f as $t,a as Rt,b as Ot,c as Ue,B as qt,R as _t}from"./block-document-Di6OpT4O.js";import{b as Vt,C as Ht,K as Mt}from"./blog-schema-C2heOfy2.js";import{c as Ut,l as Gt,u as Wt,g as Yt,d as Kt,s as Qt,h as Jt,e as I,f as Xt,m as Zt,i as Ge,j as es,p as Qe,k as ts,o as Je,R as ss,q as os,t as is,v as ls,A as as,P as ns,w as rs}from"./content-tab-DYpKep2J.js";import{c as Re,T as Oe,a as qe}from"./tooltip-B6NbTX5P.js";import{i as cs}from"./Link01-9civFIb9.js";import{u as ds}from"./use-ai-providers-W2Q5vYCk.js";import{u as ps}from"./mustache-DrIjKpei.js";import{a as ms}from"./use-fast-preview-draft-url-oDwhtnfP.js";import{u as us}from"./use-autosave-BWJWTtk0.js";import"./use-panel-navigate-BwwjvhNB.js";import"./thread-route-DTbE-Col.js";import"./use-project-scope-Dn4doId4.js";import"./repository-binding-DpSh0bkT.js";import"./use-mcp-client-CAdgJ_QT.js";import"./auth-BVkTFTOt.js";import"./autosend-CL2OZPvg.js";import"./thread-intent-8kpZLcDE.js";import"./delay-CnY5UFtP.js";import"./backoff-CrEUbyZT.js";import"./watch-sse-pool-C7xRCtu5.js";import"./task-board-DUTGhEiC.js";import"./schema-BzqS-kNt.js";import"./slugify-CEUa2lfQ.js";import"./use-decopilot-events-Czwn8ZVj.js";import"./location-BjlyegC2.js";import"./use-organization-settings-BtOReG0H.js";import"./Tool01-Bp-TbrXi.js";import"./ArrowUp--4P0C-xl.js";import"./ArrowLeft-C_dTX_8N.js";import"./LinkBroken01-DmmKNgpp.js";import"./ShoppingBag01-B7gta_qY.js";import"./ZoomOut-B3s5275g.js";import"./Building02-Gub-pr-8.js";import"./CheckCircle-CQxu_pm9.js";import"./ChevronUp-DK-Gvyk8.js";import"./ChevronSelectorVertical-GBLm8Zpl.js";import"./Copy01-EWitDFCf.js";import"./CreditCard01-wx_z4Iiz.js";import"./DotsVertical-DIT5hu2b.js";import"./Image01-BfGAREA7.js";import"./Globe04-B45_cBRN.js";import"./SwitchHorizontal01-BJyDDPw9.js";import"./Key01-BV7tzZs6.js";import"./Monitor01-BoSs_8gg.js";import"./Sun-BfjJa3ru.js";import"./Play-CleWZLOG.js";import"./Plus-DQf-jm_3.js";import"./SearchMd-D0zp0uee.js";import"./Upload01-DlF9Jqso.js";import"./User01-BcekHhAV.js";import"./Users01-BIP-PxGt.js";import"./badge-CyDHDRPg.js";import"./checkbox-CaUezNgL.js";import"./command-KXg0ZuU-.js";import"./index-B9qNCJbx.js";import"./popover-CjfUWaC0.js";import"./site-editor-toast-CmNIWnCw.js";import"./input-Brhdhig1.js";import"./usage-stats-BH4bqLoE.js";import"./tool-namespace-CTeV292R.js";import"./form-DNjk4sZI.js";import"./utils-CVEq3hMx.js";import"./markdown-DgDY2QmE.js";import"./use-copy-Dkgb0DtI.js";import"./use-mobile-CSFJ-mhK.js";import"./format-time-Cq80KKvY.js";import"./differenceInSeconds-C3x8sHUj.js";import"./icon-button-WP5IJTs8.js";import"./file-type-icon-HF5UcaS2.js";import"./shell-layout-DKGS0yWx.js";import"./avatar-LfY3dprD.js";import"./use-clock-tick-xpCK7CUB.js";import"./integration-icon-Bysyldtc.js";import"./project-icon-ChTT5o1a.js";import"./new-project-dialog-DKeFr4C7.js";import"./repository-import-picker-CmGbASze.js";import"./use-navigate-to-agent-B-QlLf3R.js";import"./repository-picker-C86kcY-U.js";import"./useInfiniteQuery-Bo5dbMM_.js";import"./infiniteQueryObserver-BnP8vr6V.js";import"./collection-search-Dcze6ySb.js";import"./use-debounced-value-vhgvmVq4.js";import"./required-auth-layout-RW5dOh2c.js";import"./use-org-sso-BhMczCH6.js";import"./chat-draft-X1dGJc2x.js";import"./select-ChqJI0MI.js";import"./index-BdQq_4o_.js";import"./index-BaQyqQF-.js";import"./use-deco-credits-k0aTLB-T.js";import"./toggle-group-BWQRN38D.js";import"./use-open-billing-url-DWsw6Alp.js";import"./index-DZLfyA8t.js";import"./ai-providers-logos-DD3qZ33J.js";import"./drawer-DL0G-oy-.js";import"./input-Bu2Qzwzh.js";import"./suggestion-DRP05M3-.js";import"./use-mcp-prompts-D1rnFTSb.js";import"./use-org-fs-CAwgni1d.js";import"./question-004-sINsf4GQ.js";import"./use-members-D-L919KG.js";import"./use-org-auth-client-Co_fa5Pp.js";import"./feature-paywall-BSXK-EmV.js";import"./plan-ladder-CFysCUYy.js";import"./add-connection-dialog-DwDvS8Uw.js";import"./extract-connection-data-BlmKelwb.js";import"./metadata-D72DunRR.js";import"./connection-CEK3iDim.js";import"./url-slug-CYvqbzge.js";import"./connection-card-Zhg6xn7V.js";import"./connection-slug-CITJ0kGN.js";import"./use-connection-Cqf7M1G6.js";import"./schema-Bcb37BRV.js";import"./connection-form-helpers-DAFP702a.js";import"./authenticate-and-persist-oauth-POYqGagt.js";import"./mcp-oauth-C_-ZUSLH.js";import"./mcp-oauth-aX1L4mRw.js";import"./collection-tabs-yg6VVFu9.js";import"./use-infinite-scroll-B9sczgXI.js";import"./useSuspenseInfiniteQuery-CcFcpWuM.js";import"./use-task-board-events-CmYlpSMI.js";import"./use-chat-layout-state-C-XHZ0Dd.js";import"./use-main-schema-v8-Jzc_7tOC.js";import"./sandbox-url-D3mC8qhT.js";import"./utils-D-52h1Lf.js";import"./index-DAYXa7zL.js";import"./pair-ByV0vAAs.js";import"./collapsible-DHXUZre4.js";import"./content-blocks-o63cs2vh.js";import"./mcp-app-renderer-pDbHkuXF.js";import"./types-m1Dsi5sG.js";import"./omit-sandbox-map-jj4lCB2U.js";import"./sheet-CzJFx6b-.js";import"./use-thread-outputs-BUN4R0HD.js";import"./sandbox-git-api-CRxdlhrN.js";import"./sandbox-start-errors-BK_aDCyt.js";import"./secret-ciphertext-6VBjcV3b.js";import"./alert-PPdejvI2.js";import"./scroll-area-CIRLWlOA.js";import"./monaco-editor-DDuHJmyY.js";import"./editor-B62-XQRE.js";import"./calendar-sxNtZ9wG.js";import"./editor-classes-BAKuqcj0.js";import"./core.esm-BO316fgf.js";import"./sortable.esm-BuCSUlOk.js";import"./view-mode-toggle-Bgum-rnB.js";import"./combobox-B5xPQiKP.js";import"./search-input-Br9i_Ft5.js";import"./use-file-configs-BIHMmAjW.js";import"./asset-utils-Duz2qYol.js";import"./match-site-slug-config-D3fUJ6vX.js";import"./empty-state-JTI0oLk7.js";import"./section-preview-url-7zfngvgW.js";import"./product-picker-dialog-ERcYwJUp.js";import"./index-D6gxSs-5.js";import"./use-content-sync-D6XyiV7H.js";import"./sandbox-lifecycle-context-BIf8-4ZY.js";import"./empty-state-lzzC-d42.js";const Le=r=>typeof r=="string"?r:"",xs={"&nbsp;":" ","&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&apos;":"'","&#39;":"'"};function Xe(r){const e=[];let o=0,n=!1;for(;o<r.length;){if(r[o]==="<"){const m=r.indexOf(">",o);o=m<0?r.length:m+1;continue}let s=r[o]??"",c=o+1;if(r[o]==="&"){const m=r.indexOf(";",o);if(m>=0&&m-o<=10){const i=xs[r.slice(o,m+1).toLowerCase()];i!==void 0&&(s=i,c=m+1)}}const a=o;if(o=c,/\s/.test(s)){if(n){const m=e[e.length-1];m&&(m.end=c);continue}e.push({ch:" ",start:a,end:c}),n=!0}else e.push({ch:s,start:a,end:c}),n=!1}return{text:e.map(s=>s.ch).join(""),chars:e}}function fs(r){return Xe(r).text.trim()}function gs(r){const e=[];for(const o of r)switch(Ut(Le(o.__resolveType))){case"Paragraph":e.push(fs(Le(o.html)));break;case"Heading":e.push(Le(o.text));break;case"Quote":e.push(Le(o.quote));break;case"List":e.push(Le(o.items));break}return e.filter(Boolean).join(`
2
- `)}function hs(r){return r.replace(/&/g,"&amp;").replace(/"/g,"&quot;")}function bs(r,e){const o=r.slice(0,e);return o.lastIndexOf("<a")>o.lastIndexOf("</a")}function js(r,e,o){const n=e.trim();if(!n||!o)return{blocks:r,applied:!1};for(let s=0;s<r.length;s++){const c=r[s];if(!c||typeof c.html!="string")continue;const a=c.html,{text:m,chars:i}=Xe(a);let d=m.indexOf(n);for(;d>=0;){const f=i[d],u=i[d+n.length-1];if(f&&u){const l=f.start,j=u.end,p=a.slice(l,j);if(!p.includes("<")&&!bs(a,l)){const g=a.slice(0,l)+`<a href="${hs(o)}">${p}</a>`+a.slice(j),x=r.slice();return x[s]={...c,html:g},{blocks:x,applied:!0}}}d=m.indexOf(n,d+1)}}return{blocks:r,applied:!1}}function vs(r,e){let o=r,n=0;for(const s of e){const c=js(o,s.quote,s.href);c.applied&&(o=c.blocks,n++)}return{blocks:o,applied:n}}function ys({virtualMcpId:r,decofile:e,sections:o,currentKey:n,hasAi:s,onApply:c}){const a=Z(),m=st(),[i,d]=Q.useState(!1),[f,u]=Q.useState(!1),[l,j]=Q.useState([]),[p,g]=Q.useState(new Set),x=$t(e),y=Gt(e).filter(h=>h.key!==n&&h.slug),T=async()=>{u(!0);try{const h=gs(o),E=await m.call("BLOG_SITE_GROUND",{virtualMcpId:r,purpose:"link"}).catch(N=>{console.warn("[linkSuggest] grounding failed",N)}),k=await m.call("BLOG_LINK_SUGGEST",{virtualMcpId:r,body:h,posts:y.map(N=>({title:N.title,slug:N.slug})),grounding:E?{report:E.report,outcome:E.outcome}:void 0}),P=[],L=new Set;for(const N of k.suggestions){const C=y.find($=>$.slug===N.slug);if(!C||!x)continue;const G=Rt(x,{category:C.categorySlugs[0]??"",slug:C.slug});if(!G||!h.includes(N.quote))continue;const B=`${N.quote}→${C.slug}`;L.has(B)||(L.add(B),P.push({quote:N.quote,href:G,title:C.title}))}j(P),g(new Set(P.map((N,C)=>C))),d(!0),P.length===0&&De.info(a("sandbox.linkSuggest.none"))}catch(h){De.error(h instanceof Error?h.message:a("sandbox.linkSuggest.failed"))}finally{u(!1)}},D=h=>g(E=>{const k=new Set(E);return k.has(h)?k.delete(h):k.add(h),k}),b=()=>{const h=l.filter((P,L)=>p.has(L)).map(P=>({quote:P.quote,href:P.href})),{blocks:E,applied:k}=vs(o,h);c(E),d(!1),De.success(a("sandbox.linkSuggest.applied",{count:String(k)}))};return t.jsxs(t.Fragment,{children:[t.jsxs(Te,{type:"button",variant:"outline",size:"sm",disabled:f||!s||y.length===0,title:s?y.length===0?a("sandbox.linkSuggest.noCandidates"):a("sandbox.linkSuggest.hint"):a("sandbox.autonomous.noAiProvider"),onClick:()=>{T()},children:[f?t.jsx(ut,{size:14,className:"animate-spin"}):t.jsx(cs,{size:14}),a("sandbox.linkSuggest.button")]}),t.jsx(ot,{open:i,onOpenChange:d,children:t.jsxs(it,{className:"max-h-[85vh] sm:max-w-lg",children:[t.jsxs(lt,{children:[t.jsx(at,{children:a("sandbox.linkSuggest.title")}),t.jsx(nt,{children:a("sandbox.linkSuggest.description")})]}),l.length===0?t.jsx("p",{className:"py-6 text-center text-sm text-muted-foreground",children:a("sandbox.linkSuggest.none")}):t.jsx("ul",{className:"max-h-[50vh] space-y-1 overflow-y-auto",children:l.map((h,E)=>{const k=p.has(E);return t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>D(E),"aria-pressed":k,className:"flex w-full items-start gap-2.5 rounded-lg border p-2.5 text-left transition-colors hover:bg-muted/50",children:[t.jsx("span",{className:Ye("mt-0.5 flex h-4 w-4 shrink-0 items-center justify-center rounded border",k?"border-primary bg-primary text-primary-foreground":"border-input"),children:k&&t.jsx(rt,{size:11})}),t.jsxs("span",{className:"min-w-0 flex-1 text-sm",children:[t.jsxs("span",{className:"font-medium",children:["“",h.quote,"”"]}),t.jsxs("span",{className:"text-muted-foreground",children:[" → ",h.title]})]})]})},`${h.quote}-${h.href}`)})}),t.jsx(ct,{children:t.jsx(Te,{type:"button",disabled:p.size===0,onClick:b,children:a("sandbox.linkSuggest.apply",{count:String(p.size)})})})]})})]})}function Ss(r){return Array.isArray(r)?r.map(e=>({key:I(e?.key),value:I(e?.value)})):[]}function ql({orgSlug:r,virtualMcpId:e,branch:o,blockKey:n,block:s,decofile:c,meta:a,previewBaseUrl:m,move:i,onClose:d,expanded:f,onToggleExpand:u}){const l=Z(),j=mt()?.taskId??null,p=Bt({orgSlug:r,virtualMcpId:e,branch:o}),g=ps({orgSlug:r,virtualMcpId:e,branch:o}),x=ds().length>0,y=Wt(),T=ms({orgSlug:r,virtualMcpId:e,branch:o}),D=Yt(s,"posts"),[b,h,E,k]=us(D,v=>{p.mutate({blockKey:n,data:Kt(n,Qt(v))})},{isSaving:p.isPending}),[P,L]=Q.useState(n);P!==n&&(L(n),E(D));const N=v=>{E(b),i.apply(n,v,b)},C=(v,A)=>h({...b,[v]:A}),G=Vt("posts",a,Mt),B=Ft((v,A)=>p.mutate({blockKey:v,data:A})),[$,R]=Q.useState(0),F=Ot({decofile:c,post:b,previewBaseUrl:m,draftPointer:T}),O=Jt(c,"posts",n,I(b.title)),q=Xt(b),[_,V]=Q.useState(!1),H=async()=>{E(b);try{await g.mutateAsync({blockKey:n}),De.success(l("sandbox.postEditor.deletePostSuccess",{title:I(b.title)})),V(!1),d?.()}catch(v){De.error(v instanceof Error?v.message:l("sandbox.postEditor.deletePostFailed"))}},w=Zt(b),M=w.length>0,U=w.length===1?l("sandbox.postEditor.missingFieldSingular",{fields:Ge(w,l)}):l("sandbox.postEditor.missingFieldPlural",{fields:Ge(w,l)});return t.jsxs("div",{className:"relative flex h-full flex-col",children:[t.jsx("div",{className:"absolute inset-x-0 top-0 z-10 bg-background/80 backdrop-blur-sm",children:t.jsxs("div",{className:"mx-auto flex max-w-4xl items-center justify-between gap-2 px-8 py-3",children:[t.jsxs("div",{className:"flex items-center gap-3",children:[t.jsx(At,{isPending:p.isPending||k,isError:p.isError}),M&&t.jsxs(Re,{children:[t.jsx(Oe,{asChild:!0,children:t.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-medium text-destructive",children:[t.jsx($e,{size:14}),w.length," ",w.length===1?l("sandbox.postEditor.issueSingular"):l("sandbox.postEditor.issuePlural")]})}),t.jsx(qe,{side:"bottom",children:U})]})]}),(u||d)&&t.jsxs("div",{className:"-mr-2 flex items-center gap-0.5",children:[u&&t.jsx(Te,{type:"button",variant:"ghost",size:"sm",className:"px-2 text-muted-foreground",onClick:u,title:l(f?"sandbox.postBoard.collapse":"sandbox.postBoard.expand"),children:f?t.jsx(xt,{size:16}):t.jsx(ft,{size:16})}),d&&t.jsx(Te,{type:"button",variant:"ghost",size:"sm",className:"px-2 text-muted-foreground",onClick:d,title:l("sandbox.postBoard.close"),children:t.jsx(jt,{size:16})})]})]})}),t.jsx("div",{className:"min-w-0 flex-1 overflow-y-auto",children:t.jsxs("div",{className:"mx-auto max-w-4xl px-8 pb-6 pt-14",children:[t.jsx(es,{value:I(b.title),onChange:v=>C("title",v),placeholder:l("sandbox.postEditor.postTitlePlaceholder"),className:"py-1 text-4xl font-bold text-foreground"}),O&&t.jsxs("p",{className:"mt-2 flex items-start gap-1.5 text-xs text-warning",children:[t.jsx($e,{size:14,className:"mt-px shrink-0"}),l("sandbox.postEditor.duplicateTitleWarning")]}),t.jsxs(Dt,{defaultValue:"content",className:"mt-6 gap-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-3",children:[t.jsxs(Lt,{children:[t.jsxs(He,{value:"content",children:[t.jsx(ht,{}),l("sandbox.postEditor.contentTab")]}),t.jsxs(He,{value:"settings",children:[t.jsx(gt,{}),l("sandbox.postEditor.settingsTab")]})]}),t.jsxs("div",{className:"flex shrink-0 items-center gap-3",children:[q&&t.jsxs(Re,{children:[t.jsx(Oe,{asChild:!0,children:t.jsx(Te,{type:"button",variant:"ghost",size:"sm",className:"px-2 text-muted-foreground hover:text-destructive","aria-label":l("sandbox.postEditor.deletePost"),onClick:()=>V(!0),children:t.jsx(bt,{size:14})})}),t.jsx(qe,{side:"bottom",children:l("sandbox.postEditor.deletePost")})]}),y&&t.jsx(ys,{decofile:c,virtualMcpId:e,sections:Ue(b.sections),currentKey:n,hasAi:x,onApply:v=>{C("sections",v),R(A=>A+1)}}),t.jsxs(Te,{type:"button",variant:"outline",size:"sm",disabled:!F,title:l(F?"sandbox.postEditor.previewTooltip":"sandbox.postEditor.previewRequiresSlugAndCategory"),onClick:()=>{F&&window.open(F,"_blank","noopener,noreferrer")},children:[t.jsx(dt,{size:14}),l("sandbox.postEditor.seePreview")]})]})]}),t.jsx(Me,{value:"content",children:t.jsx("div",{className:"rounded-xl border bg-card p-8 shadow-sm",children:t.jsx(qt,{value:Ue(b.sections),onChange:v=>C("sections",v),meta:a,decofile:c,sandboxRef:{orgSlug:r,virtualMcpId:e,branch:o,threadId:j},previewBaseUrl:m,onSaveReferencedBlock:B,emptyMessage:l("sandbox.postEditor.noContentYet")},$)})}),t.jsx(Me,{value:"settings",children:t.jsxs("div",{className:"rounded-xl border bg-card p-6 shadow-sm",children:[t.jsx(ks,{post:b,decofile:c,onChange:C,blockKey:n,move:i,onMoveStatus:N}),t.jsx(Ht,{schema:G,value:b,onChange:h,basePath:"post",meta:a,decofile:c,sandbox:{orgSlug:r,virtualMcpId:e,branch:o,threadId:j},onSaveReferencedBlock:B})]})})]})]})}),t.jsx(vt,{open:_,onOpenChange:v=>{!v&&!g.isPending&&V(!1)},children:t.jsxs(yt,{children:[t.jsxs(St,{children:[t.jsx(Et,{children:l("sandbox.postEditor.deletePostConfirmTitle")}),t.jsx(kt,{children:l("sandbox.postEditor.deletePostConfirmBody",{title:I(b.title)||l("sandbox.postBoard.untitled")})})]}),t.jsxs(Nt,{children:[t.jsx(Ct,{disabled:g.isPending,children:l("sandbox.postEditor.deletePostCancel")}),t.jsx(Pt,{onClick:v=>{v.preventDefault(),H()},disabled:g.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:g.isPending?t.jsxs(t.Fragment,{children:[t.jsx(pt,{className:"size-3.5"}),l("sandbox.postEditor.deletingPost")]}):l("sandbox.postEditor.deletePost")})]})]})})]})}function Es(r){const e=Be.c(15),{blockKey:o,post:n,move:s,onMoveStatus:c}=r,a=Z();let m;e[0]!==n?(m=Qe(n),e[0]=n,e[1]=m):m=e[1];const i=m;let d,f;if(e[2]!==o||e[3]!==i||e[4]!==s||e[5]!==c||e[6]!==n||e[7]!==a){let l;e[10]!==i?(l=p=>p!=="generating"||i==="generating",e[10]=i,e[11]=l):l=e[11];const j=ns.filter(l);d="flex flex-wrap gap-1.5",f=j.map(p=>{const g=p===i,x=g?null:s.refuse(o,p,n);return t.jsxs(Re,{children:[t.jsx(Oe,{asChild:!0,children:t.jsx("span",{children:t.jsx("button",{type:"button",disabled:!!x,"aria-pressed":g,onClick:()=>c(p),className:Ye("rounded-md border px-2.5 py-1 text-xs font-medium transition-colors",g?"border-primary bg-primary text-primary-foreground":"cursor-pointer bg-card hover:bg-muted",x&&"cursor-not-allowed opacity-50"),children:a(rs[p])})})}),x&&t.jsx(qe,{side:"bottom",children:s.reasonText(x)})]},p)}),e[2]=o,e[3]=i,e[4]=s,e[5]=c,e[6]=n,e[7]=a,e[8]=d,e[9]=f}else d=e[8],f=e[9];let u;return e[12]!==d||e[13]!==f?(u=t.jsx("div",{className:d,children:f}),e[12]=d,e[13]=f,e[14]=u):u=e[14],u}function ks(r){const e=Be.c(166),{post:o,decofile:n,onChange:s,blockKey:c,move:a,onMoveStatus:m}=r,i=Z();let d;e[0]!==o?(d=Qe(o),e[0]=o,e[1]=d):d=e[1];const u=d==="scheduled";let l;e[2]!==o.slug?(l=I(o.slug),e[2]=o.slug,e[3]=l):l=e[3];const j=l,[p,g]=Q.useState(j),[x,y]=Q.useState(null),[T,D]=Q.useState(j);T!==j&&(D(j),g(j));let b;e[4]!==c||e[5]!==j||e[6]!==n||e[7]!==s||e[8]!==p||e[9]!==i?(b=()=>{const S=os(p);if(g(S),S===j)return;if(!S){y(null),s("slug","");return}const _e=Je(n,"posts").filter(tt=>tt.key!==c).map(Ps).filter(Boolean);if(!_e.includes(S)){y(null),s("slug",S);return}const ze=is(S,_e),Ve=i("sandbox.postEditor.slugDeduped",{slug:ze});g(ze),y(Ve),De.info(Ve),s("slug",ze)},e[4]=c,e[5]=j,e[6]=n,e[7]=s,e[8]=p,e[9]=i,e[10]=b):b=e[10];const h=b;let E;e[11]!==i?(E=i("sandbox.postEditor.statusLabel"),e[11]=i,e[12]=E):E=e[12];let k;e[13]!==E?(k=t.jsx(J,{children:E}),e[13]=E,e[14]=k):k=e[14];let P;e[15]!==c||e[16]!==a||e[17]!==m||e[18]!==o?(P=t.jsx(Es,{blockKey:c,post:o,move:a,onMoveStatus:m}),e[15]=c,e[16]=a,e[17]=m,e[18]=o,e[19]=P):P=e[19];let L;e[20]!==k||e[21]!==P?(L=t.jsxs("div",{className:"space-y-2",children:[k,P]}),e[20]=k,e[21]=P,e[22]=L):L=e[22];let N;e[23]!==u||e[24]!==s||e[25]!==o.scheduledDatetime||e[26]!==i?(N=u&&t.jsx(Ie,{schema:{type:"string",format:"date-time",title:i("sandbox.postEditor.scheduledDatetimeLabel"),description:i("sandbox.postEditor.scheduledDatetimeDescription")},value:I(o.scheduledDatetime),onChange:S=>s("scheduledDatetime",S),path:"post-scheduled-datetime",label:i("sandbox.postEditor.scheduledDatetimeLabel")}),e[23]=u,e[24]=s,e[25]=o.scheduledDatetime,e[26]=i,e[27]=N):N=e[27];let C;e[28]!==L||e[29]!==N?(C=t.jsxs("div",{className:"space-y-4 border-b pb-4",children:[L,N]}),e[28]=L,e[29]=N,e[30]=C):C=e[30];let G;e[31]!==i?(G=i("sandbox.postEditor.excerptLabel"),e[31]=i,e[32]=G):G=e[32];let B;e[33]!==G?(B=t.jsx(J,{htmlFor:"post-excerpt",children:G}),e[33]=G,e[34]=B):B=e[34];let $;e[35]!==o.excerpt?($=I(o.excerpt),e[35]=o.excerpt,e[36]=$):$=e[36];let R;e[37]!==s?(R=S=>s("excerpt",S.target.value),e[37]=s,e[38]=R):R=e[38];let F;e[39]!==$||e[40]!==R?(F=t.jsx(Ke,{id:"post-excerpt",value:$,onChange:R,rows:2}),e[39]=$,e[40]=R,e[41]=F):F=e[41];let O;e[42]!==B||e[43]!==F?(O=t.jsxs("div",{className:"space-y-2",children:[B,F]}),e[42]=B,e[43]=F,e[44]=O):O=e[44];let q;e[45]!==i?(q=i("sandbox.postEditor.slugLabel"),e[45]=i,e[46]=q):q=e[46];let _;e[47]!==q?(_=t.jsx(J,{htmlFor:"post-slug",children:q}),e[47]=q,e[48]=_):_=e[48];let V;e[49]===Symbol.for("react.memo_cache_sentinel")?(V=S=>{y(null),g(ls(S.target.value))},e[49]=V):V=e[49];let H;e[50]!==i?(H=i("sandbox.postEditor.slugPlaceholder"),e[50]=i,e[51]=H):H=e[51];let w;e[52]!==h||e[53]!==p||e[54]!==H?(w=t.jsx(we,{id:"post-slug",value:p,onChange:V,onBlur:h,placeholder:H,maxLength:80,className:"h-10"}),e[52]=h,e[53]=p,e[54]=H,e[55]=w):w=e[55];let M;e[56]!==x?(M=x&&t.jsxs("p",{className:"flex items-start gap-1.5 text-xs text-warning",children:[t.jsx($e,{size:14,className:"mt-px shrink-0"}),x]}),e[56]=x,e[57]=M):M=e[57];let U;e[58]!==_||e[59]!==w||e[60]!==M?(U=t.jsxs("div",{className:"space-y-2",children:[_,w,M]}),e[58]=_,e[59]=w,e[60]=M,e[61]=U):U=e[61];let v;e[62]!==i?(v=i("sandbox.postEditor.dateLabel"),e[62]=i,e[63]=v):v=e[63];let A;e[64]!==v?(A={type:"string",format:"date",title:v},e[64]=v,e[65]=A):A=e[65];let W;e[66]!==o.date?(W=I(o.date),e[66]=o.date,e[67]=W):W=e[67];let Y;e[68]!==s?(Y=S=>s("date",S),e[68]=s,e[69]=Y):Y=e[69];let K;e[70]!==i?(K=i("sandbox.postEditor.dateLabel"),e[70]=i,e[71]=K):K=e[71];let z;e[72]!==A||e[73]!==W||e[74]!==Y||e[75]!==K?(z=t.jsx(Ie,{schema:A,value:W,onChange:Y,path:"post-date",label:K}),e[72]=A,e[73]=W,e[74]=Y,e[75]=K,e[76]=z):z=e[76];let X;e[77]!==i?(X=i("sandbox.postEditor.readTimeLabel"),e[77]=i,e[78]=X):X=e[78];let ee;e[79]!==X?(ee={type:"integer",title:X},e[79]=X,e[80]=ee):ee=e[80];const Fe=typeof o.readTime=="number"?o.readTime:void 0;let te;e[81]!==s?(te=S=>s("readTime",S),e[81]=s,e[82]=te):te=e[82];let se;e[83]!==i?(se=i("sandbox.postEditor.readTimeLabel"),e[83]=i,e[84]=se):se=e[84];let oe;e[85]!==ee||e[86]!==Fe||e[87]!==te||e[88]!==se?(oe=t.jsx(zt,{schema:ee,value:Fe,onChange:te,path:"post-read-time",label:se}),e[85]=ee,e[86]=Fe,e[87]=te,e[88]=se,e[89]=oe):oe=e[89];let ie;e[90]!==U||e[91]!==z||e[92]!==oe?(ie=t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[U,z,oe]}),e[90]=U,e[91]=z,e[92]=oe,e[93]=ie):ie=e[93];const Ze=o.image,et=o.mobileImage;let le,ae;e[94]!==s?(le=S=>s("image",S),ae=S=>s("mobileImage",S),e[94]=s,e[95]=le,e[96]=ae):(le=e[95],ae=e[96]);let ne;e[97]!==o.alt?(ne=I(o.alt),e[97]=o.alt,e[98]=ne):ne=e[98];let re;e[99]!==i?(re=i("sandbox.postEditor.coverImageLabel"),e[99]=i,e[100]=re):re=e[100];let ce;e[101]!==o.image||e[102]!==o.mobileImage||e[103]!==le||e[104]!==ae||e[105]!==ne||e[106]!==re?(ce=t.jsx(_t,{value:Ze,mobileValue:et,onChange:le,onMobileChange:ae,alt:ne,label:re}),e[101]=o.image,e[102]=o.mobileImage,e[103]=le,e[104]=ae,e[105]=ne,e[106]=re,e[107]=ce):ce=e[107];let de;e[108]!==i?(de=i("sandbox.postEditor.coverAltLabel"),e[108]=i,e[109]=de):de=e[109];let pe;e[110]!==i?(pe=i("sandbox.postEditor.coverAltDescription"),e[110]=i,e[111]=pe):pe=e[111];let me;e[112]!==de||e[113]!==pe?(me={type:"string",title:de,description:pe},e[112]=de,e[113]=pe,e[114]=me):me=e[114];let ue;e[115]!==o.alt?(ue=I(o.alt),e[115]=o.alt,e[116]=ue):ue=e[116];let xe;e[117]!==s?(xe=S=>s("alt",S),e[117]=s,e[118]=xe):xe=e[118];let fe;e[119]!==i?(fe=i("sandbox.postEditor.coverAltLabel"),e[119]=i,e[120]=fe):fe=e[120];let ge;e[121]!==me||e[122]!==ue||e[123]!==xe||e[124]!==fe?(ge=t.jsx(Ie,{schema:me,value:ue,onChange:xe,path:"post-alt",label:fe}),e[121]=me,e[122]=ue,e[123]=xe,e[124]=fe,e[125]=ge):ge=e[125];let he;e[126]!==ce||e[127]!==ge?(he=t.jsxs("div",{className:"space-y-2",children:[ce,ge]}),e[126]=ce,e[127]=ge,e[128]=he):he=e[128];let be;e[129]!==i?(be=i("sandbox.postEditor.authorsLabel"),e[129]=i,e[130]=be):be=e[130];let je;e[131]!==s?(je=S=>s("authors",S),e[131]=s,e[132]=je):je=e[132];let ve;e[133]!==n||e[134]!==o.authors||e[135]!==be||e[136]!==je?(ve=t.jsx(We,{label:be,decofile:n,kind:"authors",valueField:"email",toRef:Cs,selected:o.authors,onChange:je}),e[133]=n,e[134]=o.authors,e[135]=be,e[136]=je,e[137]=ve):ve=e[137];let ye;e[138]!==i?(ye=i("sandbox.postEditor.categoriesLabel"),e[138]=i,e[139]=ye):ye=e[139];let Se;e[140]!==s?(Se=S=>s("categories",S),e[140]=s,e[141]=Se):Se=e[141];let Ee;e[142]!==n||e[143]!==o.categories||e[144]!==ye||e[145]!==Se?(Ee=t.jsx(We,{label:ye,decofile:n,kind:"categories",valueField:"slug",toRef:Ns,selected:o.categories,onChange:Se}),e[142]=n,e[143]=o.categories,e[144]=ye,e[145]=Se,e[146]=Ee):Ee=e[146];let ke;e[147]!==s?(ke=S=>s("extraProps",S),e[147]=s,e[148]=ke):ke=e[148];let Ne;e[149]!==o.extraProps||e[150]!==ke?(Ne=t.jsx(Ds,{value:o.extraProps,onChange:ke}),e[149]=o.extraProps,e[150]=ke,e[151]=Ne):Ne=e[151];let Ce;e[152]!==s?(Ce=S=>s("seo",S),e[152]=s,e[153]=Ce):Ce=e[153];let Pe;e[154]!==o.seo||e[155]!==Ce?(Pe=t.jsx(Ts,{value:o.seo,onChange:Ce}),e[154]=o.seo,e[155]=Ce,e[156]=Pe):Pe=e[156];let Ae;return e[157]!==O||e[158]!==ie||e[159]!==he||e[160]!==ve||e[161]!==Ee||e[162]!==Ne||e[163]!==Pe||e[164]!==C?(Ae=t.jsxs("div",{className:"space-y-5",children:[C,O,ie,he,ve,Ee,Ne,Pe]}),e[157]=O,e[158]=ie,e[159]=he,e[160]=ve,e[161]=Ee,e[162]=Ne,e[163]=Pe,e[164]=C,e[165]=Ae):Ae=e[165],Ae}function Ns(r){return{name:I(r.name),slug:I(r.slug)}}function Cs(r){return{...r}}function Ps(r){return I(r.payload.slug)}function Ts(r){const e=Be.c(93),{value:o,onChange:n}=r,s=Z();let c;e[0]!==o?(c=o&&typeof o=="object"&&!Array.isArray(o)?o:{},e[0]=o,e[1]=c):c=e[1];const a=c;let m;e[2]!==n||e[3]!==a?(m=(z,X)=>n({...a,[z]:X}),e[2]=n,e[3]=a,e[4]=m):m=e[4];const i=m;let d;e[5]!==s?(d=s("sandbox.postEditor.seoSectionLabel"),e[5]=s,e[6]=d):d=e[6];let f;e[7]!==d?(f=t.jsx("p",{className:"text-sm font-medium",children:d}),e[7]=d,e[8]=f):f=e[8];let u;e[9]!==s?(u=s("sandbox.postEditor.seoSectionHint"),e[9]=s,e[10]=u):u=e[10];let l;e[11]!==u?(l=t.jsx("p",{className:"text-xs text-muted-foreground",children:u}),e[11]=u,e[12]=l):l=e[12];let j;e[13]!==f||e[14]!==l?(j=t.jsxs("div",{className:"space-y-1",children:[f,l]}),e[13]=f,e[14]=l,e[15]=j):j=e[15];let p;e[16]!==s?(p=s("sandbox.postEditor.seoTitleLabel"),e[16]=s,e[17]=p):p=e[17];let g;e[18]!==p?(g=t.jsx(J,{htmlFor:"post-seo-title",children:p}),e[18]=p,e[19]=g):g=e[19];let x;e[20]!==a.title?(x=I(a.title),e[20]=a.title,e[21]=x):x=e[21];let y;e[22]!==i?(y=z=>i("title",z.target.value),e[22]=i,e[23]=y):y=e[23];let T;e[24]!==x||e[25]!==y?(T=t.jsx(we,{id:"post-seo-title",value:x,onChange:y,className:"h-10"}),e[24]=x,e[25]=y,e[26]=T):T=e[26];let D;e[27]!==T||e[28]!==g?(D=t.jsxs("div",{className:"space-y-2",children:[g,T]}),e[27]=T,e[28]=g,e[29]=D):D=e[29];let b;e[30]!==s?(b=s("sandbox.postEditor.seoDescriptionLabel"),e[30]=s,e[31]=b):b=e[31];let h;e[32]!==b?(h=t.jsx(J,{htmlFor:"post-seo-description",children:b}),e[32]=b,e[33]=h):h=e[33];let E;e[34]!==a.description?(E=I(a.description),e[34]=a.description,e[35]=E):E=e[35];let k;e[36]!==i?(k=z=>i("description",z.target.value),e[36]=i,e[37]=k):k=e[37];let P;e[38]!==E||e[39]!==k?(P=t.jsx(Ke,{id:"post-seo-description",value:E,onChange:k,rows:2}),e[38]=E,e[39]=k,e[40]=P):P=e[40];let L;e[41]!==h||e[42]!==P?(L=t.jsxs("div",{className:"space-y-2",children:[h,P]}),e[41]=h,e[42]=P,e[43]=L):L=e[43];let N;e[44]!==s?(N=s("sandbox.postEditor.seoImageLabel"),e[44]=s,e[45]=N):N=e[45];let C;e[46]!==N?(C={type:"string",format:"image-uri",title:N},e[46]=N,e[47]=C):C=e[47];const G=a.image;let B;e[48]!==i?(B=z=>i("image",z),e[48]=i,e[49]=B):B=e[49];let $;e[50]!==s?($=s("sandbox.postEditor.seoImageLabel"),e[50]=s,e[51]=$):$=e[51];let R;e[52]!==a.image||e[53]!==C||e[54]!==B||e[55]!==$?(R=t.jsx(It,{schema:C,value:G,onChange:B,path:"post-seo-image",label:$}),e[52]=a.image,e[53]=C,e[54]=B,e[55]=$,e[56]=R):R=e[56];let F;e[57]!==s?(F=s("sandbox.postEditor.seoCanonicalLabel"),e[57]=s,e[58]=F):F=e[58];let O;e[59]!==F?(O=t.jsx(J,{htmlFor:"post-seo-canonical",children:F}),e[59]=F,e[60]=O):O=e[60];let q;e[61]!==a.canonical?(q=I(a.canonical),e[61]=a.canonical,e[62]=q):q=e[62];let _;e[63]!==i?(_=z=>i("canonical",z.target.value),e[63]=i,e[64]=_):_=e[64];let V;e[65]!==s?(V=s("sandbox.postEditor.seoCanonicalPlaceholder"),e[65]=s,e[66]=V):V=e[66];let H;e[67]!==q||e[68]!==_||e[69]!==V?(H=t.jsx(we,{id:"post-seo-canonical",value:q,onChange:_,placeholder:V,className:"h-10"}),e[67]=q,e[68]=_,e[69]=V,e[70]=H):H=e[70];let w;e[71]!==O||e[72]!==H?(w=t.jsxs("div",{className:"space-y-2",children:[O,H]}),e[71]=O,e[72]=H,e[73]=w):w=e[73];let M;e[74]!==s?(M=s("sandbox.postEditor.seoNoIndexingLabel"),e[74]=s,e[75]=M):M=e[75];let U;e[76]!==M?(U=t.jsx(J,{htmlFor:"post-seo-no-indexing",children:M}),e[76]=M,e[77]=U):U=e[77];const v=a.noIndexing===!0;let A;e[78]!==i?(A=z=>i("noIndexing",z),e[78]=i,e[79]=A):A=e[79];let W;e[80]!==v||e[81]!==A?(W=t.jsx(wt,{id:"post-seo-no-indexing",checked:v,onCheckedChange:A}),e[80]=v,e[81]=A,e[82]=W):W=e[82];let Y;e[83]!==U||e[84]!==W?(Y=t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[U,W]}),e[83]=U,e[84]=W,e[85]=Y):Y=e[85];let K;return e[86]!==D||e[87]!==L||e[88]!==R||e[89]!==w||e[90]!==Y||e[91]!==j?(K=t.jsxs("div",{className:"space-y-5 border-t pt-5",children:[j,D,L,R,w,Y]}),e[86]=D,e[87]=L,e[88]=R,e[89]=w,e[90]=Y,e[91]=j,e[92]=K):K=e[92],K}function Ds(r){const e=Be.c(24),{value:o,onChange:n}=r,s=Z();let c,a,m,i;if(e[0]!==n||e[1]!==s||e[2]!==o){c=Ss(o);const j=(g,x)=>n(c.map((y,T)=>T===g?{...y,...x}:y));a="space-y-2";let p;e[7]!==s?(p=s("sandbox.postEditor.extraPropsLabel"),e[7]=s,e[8]=p):p=e[8],e[9]!==p?(m=t.jsx(J,{children:p}),e[9]=p,e[10]=m):m=e[10],i=c.length>0&&t.jsx("ul",{className:"space-y-2",children:c.map((g,x)=>t.jsxs("li",{className:"group/item flex items-center gap-2",children:[t.jsx(we,{value:g.key,onChange:y=>j(x,{key:y.target.value}),placeholder:s("sandbox.postEditor.keyPlaceholder"),className:"h-9 flex-1"}),t.jsx(we,{value:g.value,onChange:y=>j(x,{value:y.target.value}),placeholder:s("sandbox.postEditor.valuePlaceholder"),className:"h-9 flex-1"}),t.jsx(ss,{label:s("sandbox.postEditor.removePropLabel"),onClick:()=>n(c.filter((y,T)=>T!==x))})]},x))}),e[0]=n,e[1]=s,e[2]=o,e[3]=c,e[4]=a,e[5]=m,e[6]=i}else c=e[3],a=e[4],m=e[5],i=e[6];let d;e[11]!==s?(d=s("sandbox.postEditor.addPropLabel"),e[11]=s,e[12]=d):d=e[12];let f;e[13]!==c||e[14]!==n?(f=()=>n([...c,{key:"",value:""}]),e[13]=c,e[14]=n,e[15]=f):f=e[15];let u;e[16]!==d||e[17]!==f?(u=t.jsx(as,{label:d,onClick:f}),e[16]=d,e[17]=f,e[18]=u):u=e[18];let l;return e[19]!==a||e[20]!==m||e[21]!==i||e[22]!==u?(l=t.jsxs("div",{className:a,children:[m,i,u]}),e[19]=a,e[20]=m,e[21]=i,e[22]=u,e[23]=l):l=e[23],l}function We(r){const e=Be.c(24),{label:o,decofile:n,kind:s,valueField:c,toRef:a,selected:m,onChange:i}=r,d=Z();let f;e[0]!==n||e[1]!==s||e[2]!==m||e[3]!==a||e[4]!==c?(f=ts({records:Je(n,s),selected:m,valueField:c,toRef:a}),e[0]=n,e[1]=s,e[2]=m,e[3]=a,e[4]=c,e[5]=f):f=e[5];const{options:u,selectedValues:l,refsForValues:j}=f;let p;e[6]!==s||e[7]!==d?(p=d(s==="authors"?"sandbox.postEditor.noAuthorsYet":"sandbox.postEditor.noCategoriesYet"),e[6]=s,e[7]=d,e[8]=p):p=e[8];const g=p;let x;e[9]!==s||e[10]!==d?(x=d(s==="authors"?"sandbox.postEditor.selectAuthorsPlaceholder":"sandbox.postEditor.selectCategoriesPlaceholder"),e[9]=s,e[10]=d,e[11]=x):x=e[11];const y=x;let T;e[12]!==o?(T=t.jsx(J,{children:o}),e[12]=o,e[13]=T):T=e[13];let D;e[14]!==g||e[15]!==i||e[16]!==u||e[17]!==j||e[18]!==y||e[19]!==l?(D=u.length===0?t.jsx("p",{className:"text-xs text-muted-foreground",children:g}):t.jsx(Tt,{options:u,defaultValue:l,onValueChange:h=>i(j(h)),placeholder:y,maxCount:4}),e[14]=g,e[15]=i,e[16]=u,e[17]=j,e[18]=y,e[19]=l,e[20]=D):D=e[20];let b;return e[21]!==T||e[22]!==D?(b=t.jsxs("div",{className:"space-y-2",children:[T,D]}),e[21]=T,e[22]=D,e[23]=b):b=e[23],b}export{ql as PostEditor};