decocms 3.26.1 → 3.26.3

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 (269) hide show
  1. package/dist/client/assets/{AlertCircle-BDfUS-lh.js → AlertCircle-DTxB9pUH.js} +1 -1
  2. package/dist/client/assets/{ArrowUpRight-8daK_Mrm.js → ArrowUpRight-zXKZw2Xb.js} +1 -1
  3. package/dist/client/assets/{Check-C9-fsV6-.js → Check-CTLrORIv.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-B_rVd_l8.js → CheckCircle-BUQijftD.js} +1 -1
  5. package/dist/client/assets/{ChevronDown--2U1gfXf.js → ChevronDown-CE2QQfze.js} +1 -1
  6. package/dist/client/assets/{ChevronLeft-TttN4toV.js → ChevronLeft-Cu7s4gqK.js} +1 -1
  7. package/dist/client/assets/{ChevronRight-BVEygGVH.js → ChevronRight-VGojeAFz.js} +1 -1
  8. package/dist/client/assets/{ChevronUp-C-xaVM7d.js → ChevronUp-4IXM99ti.js} +1 -1
  9. package/dist/client/assets/{Container-Bso4WS0x.js → Container-BoFlhIZL.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-Q3F6UWC_.js → DotsVertical--R-pmXe3.js} +1 -1
  11. package/dist/client/assets/{Eye-CKz6zS_m.js → Eye-pMhw6sUG.js} +1 -1
  12. package/dist/client/assets/{FilterLines-SKQT-eWL.js → FilterLines-Bz8yyibx.js} +1 -1
  13. package/dist/client/assets/{Globe01-iupU5eqh.js → Globe01-Cp3X_WfB.js} +1 -1
  14. package/dist/client/assets/{HardDrive-DpuvbJvr.js → HardDrive-BH54c3De.js} +1 -1
  15. package/dist/client/assets/{Key01-6eW9IRFT.js → Key01-CfBifHqv.js} +1 -1
  16. package/dist/client/assets/{LayoutLeft-BkxKKkMX.js → LayoutLeft-DhbihSgJ.js} +1 -1
  17. package/dist/client/assets/{LinkExternal01-BXhdtlT7.js → LinkExternal01-BGLjTHSM.js} +1 -1
  18. package/dist/client/assets/{Monitor01-DUICZH5i.js → Monitor01-Djh_XBKr.js} +1 -1
  19. package/dist/client/assets/{Palette-CS36Icvl.js → Palette-PH8MXuP9.js} +1 -1
  20. package/dist/client/assets/{Play-CbbqvWPd.js → Play-C4oLlMWL.js} +1 -1
  21. package/dist/client/assets/{Plus-CSNkL1o7.js → Plus-BX4ueqQS.js} +1 -1
  22. package/dist/client/assets/{RefreshCcw01-Dncu-kYd.js → RefreshCcw01-Duj7NlwB.js} +1 -1
  23. package/dist/client/assets/{SearchMd-B-q2EsGW.js → SearchMd-CL91MHi_.js} +1 -1
  24. package/dist/client/assets/{Settings02-CdJ0CKrL.js → Settings02-DWXKmfg4.js} +1 -1
  25. package/dist/client/assets/{Shield01-Crgp73nV.js → Shield01-5PYVS020.js} +1 -1
  26. package/dist/client/assets/{Star01-CN33xE6w.js → Star01-E49TkgRa.js} +1 -1
  27. package/dist/client/assets/{Stars01-BXO9Nc4-.js → Stars01-NNVgYP83.js} +1 -1
  28. package/dist/client/assets/{Stars02-B4CoQ82E.js → Stars02-BVMEIcco.js} +1 -1
  29. package/dist/client/assets/{Sun-CEzPQTAJ.js → Sun-CC_Mb8Zc.js} +1 -1
  30. package/dist/client/assets/{SwitchHorizontal01-BI_yHGXL.js → SwitchHorizontal01-Fq29tGDx.js} +1 -1
  31. package/dist/client/assets/{Tool01-R6WyaXsu.js → Tool01-B2YQjPAa.js} +1 -1
  32. package/dist/client/assets/{Trash01-C3pnsiws.js → Trash01-XqCtMZQT.js} +1 -1
  33. package/dist/client/assets/{Upload01-BHsRhr7X.js → Upload01-CTIKtpO3.js} +1 -1
  34. package/dist/client/assets/{User01-JuGE_kA7.js → User01-Cz-IdAgQ.js} +1 -1
  35. package/dist/client/assets/{Users01-BVUwP6xk.js → Users01-D7P0o8Z_.js} +1 -1
  36. package/dist/client/assets/{Users03-Bek4Ag3W.js → Users03-DUZwXij4.js} +1 -1
  37. package/dist/client/assets/{X-BdwzFded.js → X-8xcHoVBj.js} +1 -1
  38. package/dist/client/assets/{XCircle-D_3MYOn4.js → XCircle-CGgdji5f.js} +1 -1
  39. package/dist/client/assets/{XClose-Da5LgJSi.js → XClose-CxCjUb2p.js} +1 -1
  40. package/dist/client/assets/{Zap-DHBAOmqP.js → Zap-DLFeSSQ0.js} +1 -1
  41. package/dist/client/assets/{ZapSquare-CP91cLS8.js → ZapSquare-C2mTTgos.js} +1 -1
  42. package/dist/client/assets/{ZoomOut-CaG3Pd1Z.js → ZoomOut-CR6ja8eb.js} +1 -1
  43. package/dist/client/assets/{access-gate-AjUY-gkn.js → access-gate-3WvSXWjg.js} +1 -1
  44. package/dist/client/assets/{accordion-JZC0q2Q6.js → accordion-DBEoJ6NR.js} +1 -1
  45. package/dist/client/assets/add-section-modal-B-90MHzy.js +1 -0
  46. package/dist/client/assets/agent-capabilities-CeRZY0ao.js +3 -0
  47. package/dist/client/assets/{agent-icon-DAPplz1A.js → agent-icon-DyzI2_Id.js} +1 -1
  48. package/dist/client/assets/agent-icons-CkjHTgLo.js +4 -0
  49. package/dist/client/assets/{agents-list-Cqp5uusD.js → agents-list-DNeWvyP9.js} +1 -1
  50. package/dist/client/assets/ai-providers-DAK2efaH.js +1 -0
  51. package/dist/client/assets/{alert-C04qeSRO.js → alert-BHgS7nAN.js} +1 -1
  52. package/dist/client/assets/{alert-dialog-Q8M8ngFf.js → alert-dialog-tg3D4mnu.js} +1 -1
  53. package/dist/client/assets/app-editor-WcogQO88.js +1 -0
  54. package/dist/client/assets/{auth-catchall-BbuGVKd9.js → auth-catchall-BOC0nYtA.js} +1 -1
  55. package/dist/client/assets/{auth-split-layout-sY7FyVQz.js → auth-split-layout-VA3PSXMI.js} +1 -1
  56. package/dist/client/assets/{automation-list-row-BRsSmcOA.js → automation-list-row-SEcTO2sW.js} +1 -1
  57. package/dist/client/assets/automation-runs-S95csAA4.js +1 -0
  58. package/dist/client/assets/{automations-zDSrpko2.js → automations-Ce44y56V.js} +1 -1
  59. package/dist/client/assets/{avatar-BqNGZrFg.js → avatar-DK3a4hPp.js} +1 -1
  60. package/dist/client/assets/{badge-BBLSXFe0.js → badge-SRsZ13Ha.js} +1 -1
  61. package/dist/client/assets/brand-context-CHR40nnF.js +1 -0
  62. package/dist/client/assets/buckets-7WU_Biyf.js +1 -0
  63. package/dist/client/assets/{calendar-CfY7gp-n.js → calendar-CC1tf37S.js} +1 -1
  64. package/dist/client/assets/{capability-load-error-CjE005FF.js → capability-load-error-C5tUHDdB.js} +1 -1
  65. package/dist/client/assets/{card-D41ULrnf.js → card-BU_YNBo4.js} +1 -1
  66. package/dist/client/assets/chat-context-Moe82J6D.js +20 -0
  67. package/dist/client/assets/{checkbox-CBmcFqoh.js → checkbox-CGo4P_LC.js} +1 -1
  68. package/dist/client/assets/{cli-auth-success-BcBQhgvD.js → cli-auth-success-D15RP8BC.js} +1 -1
  69. package/dist/client/assets/collection-detail-CiMl4FG7.js +1 -0
  70. package/dist/client/assets/{collection-display-button-BNfKMIgL.js → collection-display-button-M_1xgyCf.js} +1 -1
  71. package/dist/client/assets/{collection-search-CDLcWLfd.js → collection-search-CfzW8Ljz.js} +1 -1
  72. package/dist/client/assets/{collection-table-wrapper-DrTvLn6R.js → collection-table-wrapper-B4EgEmky.js} +1 -1
  73. package/dist/client/assets/{collection-tabs-CbZbTMYY.js → collection-tabs-BxpcEAFc.js} +1 -1
  74. package/dist/client/assets/{collections-BxDJ4z3g.js → collections-BthqN0MR.js} +1 -1
  75. package/dist/client/assets/{command-B8qtKAnE.js → command-D_uV9Uyw.js} +1 -1
  76. package/dist/client/assets/connect-desktop-dialog-BSZmVMpV.js +1 -0
  77. package/dist/client/assets/{connection-card-CSsbMtfE.js → connection-card-CMo6aDgc.js} +1 -1
  78. package/dist/client/assets/connection-detail-Mimew6o2.js +1 -0
  79. package/dist/client/assets/{connection-form-helpers-BonOFyzw.js → connection-form-helpers-D7eAIFli.js} +1 -1
  80. package/dist/client/assets/connections-C3EDxDCA.js +1 -0
  81. package/dist/client/assets/{decopilot-sse-pool-BHhoQKaF.js → decopilot-sse-pool-8oQl4q0c.js} +1 -1
  82. package/dist/client/assets/{dialog-Cwf6uY_y.js → dialog-DSHkVmzb.js} +1 -1
  83. package/dist/client/assets/domain-settings-BOHvvqIE.js +1 -0
  84. package/dist/client/assets/{drawer-CF0b7Dg3.js → drawer-BCmqLnLy.js} +1 -1
  85. package/dist/client/assets/{dropdown-menu-UGlYpK18.js → dropdown-menu-DFCaJxA8.js} +1 -1
  86. package/dist/client/assets/dynamic-plugin-layout-D3tgFtHQ.js +1 -0
  87. package/dist/client/assets/{empty-state-CoXt5rYF.js → empty-state-CVOhfUW7.js} +1 -1
  88. package/dist/client/assets/{empty-state-h_qXtgbw.js → empty-state-DqgO6Psg.js} +1 -1
  89. package/dist/client/assets/{extract-connection-data-BKeaLULt.js → extract-connection-data-B52LuKdR.js} +1 -1
  90. package/dist/client/assets/{features-u4e9ViPZ.js → features-Dsrgvggp.js} +1 -1
  91. package/dist/client/assets/file-explorer-CAiKkVp8.js +2 -0
  92. package/dist/client/assets/{file-type-icon-7TqtrpuQ.js → file-type-icon-ThJaLePn.js} +1 -1
  93. package/dist/client/assets/{files-C9p4yssc.js → files-BwgPol6-.js} +1 -1
  94. package/dist/client/assets/{form-Bbpyf2N_.js → form-DngzP8fb.js} +1 -1
  95. package/dist/client/assets/general-D61AQybp.js +1 -0
  96. package/dist/client/assets/{generate-id-BHe5yw90.js → generate-id-CDzcbt9l.js} +1 -1
  97. package/dist/client/assets/{github-repo-picker-CVG2zsbh.js → github-repo-picker-Dy1vUJSU.js} +1 -1
  98. package/dist/client/assets/{header-tab-button-t5WNjrVG.js → header-tab-button-YP4v_sFN.js} +1 -1
  99. package/dist/client/assets/{hover-card-Azyk5Kxa.js → hover-card-CK_HvQcf.js} +1 -1
  100. package/dist/client/assets/image-field-pfu57PP0.js +1 -0
  101. package/dist/client/assets/{index-CAs8iq4o.js → index-2EH0OR7k.js} +1 -1
  102. package/dist/client/assets/{index-sqqDCA0K.js → index-5lPKE0PI.js} +1 -1
  103. package/dist/client/assets/{index-DJTEqPXf.js → index-BepaMXhR.js} +1 -1
  104. package/dist/client/assets/index-CIBQMZc3.js +310 -0
  105. package/dist/client/assets/index-D7h1Qkk4.js +1 -0
  106. package/dist/client/assets/{index-CiRQNPVt.js → index-DLy_MgNO.js} +3 -3
  107. package/dist/client/assets/{index-Co-NpkaC.js → index-DdnG6T0z.js} +1 -1
  108. package/dist/client/assets/{index-skFG1_ns.js → index-Df6ljz6n.js} +1 -1
  109. package/dist/client/assets/{index-DcI1sEv_.js → index-Dj1voR4t.js} +1 -1
  110. package/dist/client/assets/{index-CwyiLbkO.js → index-DqC0vS4o.js} +1 -1
  111. package/dist/client/assets/index-Dy_atLRy.js +1 -0
  112. package/dist/client/assets/{index-DCeOX6CY.js → index-G1Ev5Inf.js} +1 -1
  113. package/dist/client/assets/{index-DbpajCnQ.js → index-LDNFPs7X.js} +5 -5
  114. package/dist/client/assets/{index-Dci2MWs9.js → index-hMTvGWUn.js} +1 -1
  115. package/dist/client/assets/{index-f0X8ef8k.js → index-hwXZ3lhJ.js} +1 -1
  116. package/dist/client/assets/{index-redirect-D6d28r6b.js → index-redirect-BkbiWtap.js} +1 -1
  117. package/dist/client/assets/{infiniteQueryObserver-BND7fiNU.js → infiniteQueryObserver-CJIUgHAf.js} +1 -1
  118. package/dist/client/assets/{input-D3E6n6la.js → input-CTpSARTD.js} +1 -1
  119. package/dist/client/assets/{integration-icon-vaGvNHHz.js → integration-icon-BpF3qWll.js} +1 -1
  120. package/dist/client/assets/{label-DLUhXNk7.js → label-Dh8yif55.js} +1 -1
  121. package/dist/client/assets/{layout-PdamBSR0.js → layout-D7xM_FMD.js} +1 -1
  122. package/dist/client/assets/{login-CX7WJC_U.js → login-BsYL8EoQ.js} +1 -1
  123. package/dist/client/assets/members-D3KerYs6.js +3 -0
  124. package/dist/client/assets/{monaco-editor-Bgzj9gt4.js → monaco-editor-47G-YgBx.js} +1 -1
  125. package/dist/client/assets/{monitoring-stats-row-DOXVZiRZ.js → monitoring-stats-row-DLPVsavd.js} +1 -1
  126. package/dist/client/assets/{oauth-callback-Cfp_JeoH.js → oauth-callback-DPmGsVIH.js} +1 -1
  127. package/dist/client/assets/{oauth-callback-ai-provider-DOmF-VOd.js → oauth-callback-ai-provider-B2SdgtVf.js} +1 -1
  128. package/dist/client/assets/{onboarding-C4KH1uOA.js → onboarding-CUnTn08b.js} +1 -1
  129. package/dist/client/assets/{org-install-CrBGOT0T.js → org-install-D55Hf-Ci.js} +1 -1
  130. package/dist/client/assets/{org-layout-BCdmD1Ye.js → org-layout-D1CUrdu0.js} +1 -1
  131. package/dist/client/assets/org-plugin-layout-C_lutJvY.js +1 -0
  132. package/dist/client/assets/{page-seo-form-qANN0Bj1.js → page-seo-form-CDMGSBfI.js} +1 -1
  133. package/dist/client/assets/page-seo-sheet-D9mMBTfk.js +1 -0
  134. package/dist/client/assets/pair-C8e4qd_P.js +39 -0
  135. package/dist/client/assets/{plugin-empty-state-CrO1kZyK.js → plugin-empty-state-DOz60yXL.js} +1 -1
  136. package/dist/client/assets/{plugin-header-DTTyXwvF.js → plugin-header-dSexLn5d.js} +1 -1
  137. package/dist/client/assets/plugin-layout-DeJC8Je1.js +1 -0
  138. package/dist/client/assets/{popover-C1MgHMHU.js → popover-BTf4Nz5d.js} +1 -1
  139. package/dist/client/assets/{post-editor-aLUVDKW-.js → post-editor-DqMVZSkF.js} +1 -1
  140. package/dist/client/assets/{primitives-BBsQqWkR.js → primitives-C5R0vRG0.js} +1 -1
  141. package/dist/client/assets/{profile-CjQ0lj2q.js → profile-D24Mm1Bo.js} +1 -1
  142. package/dist/client/assets/project-app-view-Bww_ZnyA.js +1 -0
  143. package/dist/client/assets/record-editor-dyb9Ijad.js +1 -0
  144. package/dist/client/assets/registry-BnciKKiV.js +2 -0
  145. package/dist/client/assets/registry-layout-BTGZh3rH.js +27 -0
  146. package/dist/client/assets/{require-capability-vzDtNqMc.js → require-capability-VkdqqQVh.js} +1 -1
  147. package/dist/client/assets/{required-auth-layout-BE5eceMw.js → required-auth-layout-B_Qr5rQD.js} +1 -1
  148. package/dist/client/assets/{reset-password-8Qbe0fKB.js → reset-password-EasI5IT7.js} +1 -1
  149. package/dist/client/assets/{resizable-CrMJy22o.js → resizable-psD7TWaW.js} +1 -1
  150. package/dist/client/assets/{roles-BRTHcf_Y.js → roles-DcdBU5wW.js} +1 -1
  151. package/dist/client/assets/save-referenced-block-H29Sz2fU.js +1 -0
  152. package/dist/client/assets/{save-status-BZf4M3tc.js → save-status-BBtiR3n4.js} +1 -1
  153. package/dist/client/assets/{schema-form-DNuUk0WJ.js → schema-form-CQrr8C2Q.js} +1 -1
  154. package/dist/client/assets/{scroll-area-verb-Y8E.js → scroll-area-EinmnR6o.js} +1 -1
  155. package/dist/client/assets/{search-input-CZKc9XZR.js → search-input-IQT_u5qN.js} +1 -1
  156. package/dist/client/assets/secrets-CvkPaEJL.js +1 -0
  157. package/dist/client/assets/{sections-editor-CysGozit.js → sections-editor-4lprX9C-.js} +1 -1
  158. package/dist/client/assets/{select-BMX9jvQG.js → select-Dz1PdScB.js} +1 -1
  159. package/dist/client/assets/{select-model-BB2-8k_v.js → select-model-azh5-bst.js} +1 -1
  160. package/dist/client/assets/seo-editor-Bhb2HHgZ.js +1 -0
  161. package/dist/client/assets/{settings-layout-EdgjO8iZ.js → settings-layout-DXfn8mRu.js} +1 -1
  162. package/dist/client/assets/{settings-section-CQW36fJV.js → settings-section-DqhmLe6Q.js} +1 -1
  163. package/dist/client/assets/{sheet-Utq51ofH.js → sheet-CtgWE_6O.js} +1 -1
  164. package/dist/client/assets/{shell-controls-CXM2LvTp.js → shell-controls-D5kseyts.js} +1 -1
  165. package/dist/client/assets/{shell-layout-3b4NfWya.js → shell-layout-CWL5imKS.js} +1 -1
  166. package/dist/client/assets/shell-route-loading-Co6LGu_q.js +1 -0
  167. package/dist/client/assets/{sidebar-BBqRosV0.js → sidebar-DRcLUASh.js} +1 -1
  168. package/dist/client/assets/{skeleton-dQOYuNlQ.js → skeleton-BH3hvPuC.js} +1 -1
  169. package/dist/client/assets/{sortable.esm-D7AgS_lX.js → sortable.esm-Bv55LbH0.js} +1 -1
  170. package/dist/client/assets/{spinner-_hqWpG0c.js → spinner-B_3Siejz.js} +1 -1
  171. package/dist/client/assets/sso-0oMpJ4kh.js +1 -0
  172. package/dist/client/assets/{store-BIRCadh0.js → store-BVB26WGO.js} +1 -1
  173. package/dist/client/assets/store-registry-CO_g7WZl.js +2 -0
  174. package/dist/client/assets/studio-tools-BxKekKsO.js +1 -0
  175. package/dist/client/assets/{switch-CTAzWsjZ.js → switch-DH2AgpKj.js} +1 -1
  176. package/dist/client/assets/{tab-id-C7unjelb.js → tab-id-xylxHxk-.js} +2 -2
  177. package/dist/client/assets/{table-BuLHtfTA.js → table-BF0TGzWk.js} +1 -1
  178. package/dist/client/assets/{tabs-DVd_y6YL.js → tabs-zn3_c2X4.js} +1 -1
  179. package/dist/client/assets/{task-status-5oHTrkjV.js → task-status-CcBiqoc9.js} +1 -1
  180. package/dist/client/assets/{textarea-D1h5iq3D.js → textarea--0YfTbVD.js} +1 -1
  181. package/dist/client/assets/{toggle-group-vA7ktrP-.js → toggle-group-CzCtoT44.js} +1 -1
  182. package/dist/client/assets/{toolbar-D3G0G9U8.js → toolbar-GqBUNMmA.js} +1 -1
  183. package/dist/client/assets/{tools-list-BL4u8QMN.js → tools-list-6mOdBofe.js} +1 -1
  184. package/dist/client/assets/{tooltip-C47QSg8i.js → tooltip-DUvSyhJC.js} +1 -1
  185. package/dist/client/assets/{types-Df_Z2FUK.js → types-DA4RGvyb.js} +1 -1
  186. package/dist/client/assets/use-ai-providers-D2lIJSNP.js +1 -0
  187. package/dist/client/assets/{use-automations-B9mdkXiu.js → use-automations-DBfmwk1I.js} +1 -1
  188. package/dist/client/assets/{use-capability-1uxC8-oZ.js → use-capability-B4Fg7dX0.js} +1 -1
  189. package/dist/client/assets/{use-collections-B1Mg9Y32.js → use-collections-CmHxKkjG.js} +1 -1
  190. package/dist/client/assets/{use-connection-DpxWBF4Y.js → use-connection-DBknh1_S.js} +1 -1
  191. package/dist/client/assets/{use-copy-B_uLjrw6.js → use-copy-Cwl7g8AE.js} +1 -1
  192. package/dist/client/assets/{use-create-virtual-mcp-BBxov1Li.js → use-create-virtual-mcp-C1TsXsHi.js} +1 -1
  193. package/dist/client/assets/{use-debounced-autosave-DDZnxori.js → use-debounced-autosave-Bxr0aFzV.js} +1 -1
  194. package/dist/client/assets/use-delete-connection-R6nqWnGZ.js +1 -0
  195. package/dist/client/assets/use-file-configs-DWXPP8uC.js +1 -0
  196. package/dist/client/assets/{use-infinite-scroll-D8iZFAEQ.js → use-infinite-scroll-SoMG-nf0.js} +1 -1
  197. package/dist/client/assets/{use-list-state-BkETzhj1.js → use-list-state-RN4viRCb.js} +1 -1
  198. package/dist/client/assets/{use-mcp-client-D0A6RZFw.js → use-mcp-client-FbAC4-Un.js} +2 -2
  199. package/dist/client/assets/{use-mcp-prompts-BuV5LRNr.js → use-mcp-prompts-yCzBJuZf.js} +1 -1
  200. package/dist/client/assets/{use-mcp-tools-BTzw-W77.js → use-mcp-tools-CxFt6L0J.js} +1 -1
  201. package/dist/client/assets/{use-members-DDVaE5yQ.js → use-members-B2ko1Eht.js} +1 -1
  202. package/dist/client/assets/{use-navigate-to-agent-Drh7z3D_.js → use-navigate-to-agent-Bg4INoCb.js} +1 -1
  203. package/dist/client/assets/{use-org-auth-client-BlGBETGB.js → use-org-auth-client-D0Et-q9V.js} +1 -1
  204. package/dist/client/assets/{use-org-sso-nq4qWMpD.js → use-org-sso-Ba3MjbPK.js} +1 -1
  205. package/dist/client/assets/{use-organization-roles-i1o2TOl8.js → use-organization-roles-jFwocdK5.js} +1 -1
  206. package/dist/client/assets/{use-organization-settings-PADdytdf.js → use-organization-settings-Bdk0M31t.js} +1 -1
  207. package/dist/client/assets/{use-registry-connections-C0VEE_YX.js → use-registry-connections-DkTd3pip.js} +1 -1
  208. package/dist/client/assets/use-secrets-B3XtAhqh.js +1 -0
  209. package/dist/client/assets/{use-status-sounds-DR8WA3PU.js → use-status-sounds-Bi-eGoxq.js} +1 -1
  210. package/dist/client/assets/{use-view-mode-BpduDYTq.js → use-view-mode-CVu0jG_s.js} +1 -1
  211. package/dist/client/assets/{use-virtual-mcp-DciRKx1X.js → use-virtual-mcp-CL360k9_.js} +1 -1
  212. package/dist/client/assets/useInfiniteQuery-68Zg22Ld.js +1 -0
  213. package/dist/client/assets/{useRouterState-BXwm4DCl.js → useRouterState-CBsQY2cY.js} +1 -1
  214. package/dist/client/assets/useSuspenseInfiniteQuery-C32oPBV5.js +1 -0
  215. package/dist/client/assets/user-ce-n8AzQ.js +1 -0
  216. package/dist/client/assets/{view-mode-toggle-B-ZBNJWV.js → view-mode-toggle-DPvhvCSl.js} +1 -1
  217. package/dist/client/assets/workflow-DEw4Tgx1.js +1 -0
  218. package/dist/client/assets/workflow-detail-DPYK3MGg.js +1 -0
  219. package/dist/client/index.html +1 -1
  220. package/dist/server/cli.js +382 -378
  221. package/dist/server/migrate.js +98 -94
  222. package/dist/server/server.js +244 -244
  223. package/package.json +1 -1
  224. package/dist/client/assets/add-section-modal-B5en9ngD.js +0 -1
  225. package/dist/client/assets/agent-capabilities-gx2lqG9R.js +0 -3
  226. package/dist/client/assets/agent-icons-Dk-aO0GI.js +0 -4
  227. package/dist/client/assets/ai-providers-DLs4iaPF.js +0 -1
  228. package/dist/client/assets/app-editor-CNA09iLR.js +0 -1
  229. package/dist/client/assets/automation-runs-gdpRnoA6.js +0 -1
  230. package/dist/client/assets/brand-context-Be4M-ZZ_.js +0 -1
  231. package/dist/client/assets/buckets-D-k7xX4_.js +0 -1
  232. package/dist/client/assets/chat-context-BFmJRDzy.js +0 -20
  233. package/dist/client/assets/collection-detail-kkp2noDH.js +0 -1
  234. package/dist/client/assets/connect-desktop-dialog-CDUh5Otr.js +0 -1
  235. package/dist/client/assets/connection-detail-E_AC0EPN.js +0 -1
  236. package/dist/client/assets/connections-Ca9YMoFm.js +0 -1
  237. package/dist/client/assets/domain-settings-oLlPZ4Z3.js +0 -1
  238. package/dist/client/assets/dynamic-plugin-layout-V_3blVro.js +0 -1
  239. package/dist/client/assets/file-explorer-BHKOSo2p.js +0 -2
  240. package/dist/client/assets/general-DqO6G3WI.js +0 -1
  241. package/dist/client/assets/image-field-CXkzTwa7.js +0 -1
  242. package/dist/client/assets/index-B_tO_wVS.js +0 -1
  243. package/dist/client/assets/index-Bjie-Vum.js +0 -1
  244. package/dist/client/assets/index-DkWynf6r.js +0 -310
  245. package/dist/client/assets/members-Bw9vSm5N.js +0 -3
  246. package/dist/client/assets/org-plugin-layout-shv3-lWc.js +0 -1
  247. package/dist/client/assets/page-seo-sheet-D4wNk0RY.js +0 -1
  248. package/dist/client/assets/pair-CpEuUIpQ.js +0 -39
  249. package/dist/client/assets/plugin-layout-CXygrV9H.js +0 -1
  250. package/dist/client/assets/project-app-view-Br1j175t.js +0 -1
  251. package/dist/client/assets/record-editor-QHa9iaw5.js +0 -1
  252. package/dist/client/assets/registry-BkLh6mX8.js +0 -2
  253. package/dist/client/assets/registry-layout-CHn-aQtX.js +0 -27
  254. package/dist/client/assets/save-referenced-block-CBTtXYiM.js +0 -1
  255. package/dist/client/assets/secrets-ScbIQJha.js +0 -1
  256. package/dist/client/assets/seo-editor-gLS5nwCw.js +0 -1
  257. package/dist/client/assets/shell-route-loading-DSfyT3dO.js +0 -1
  258. package/dist/client/assets/sso-Cg_UsaPg.js +0 -1
  259. package/dist/client/assets/store-registry-Duulq-Qg.js +0 -2
  260. package/dist/client/assets/unwrap-tool-result-BYXdCQMg.js +0 -1
  261. package/dist/client/assets/use-ai-providers-Bwbur0GT.js +0 -1
  262. package/dist/client/assets/use-delete-connection-eQCNxdaR.js +0 -1
  263. package/dist/client/assets/use-file-configs-o-LP0Blk.js +0 -1
  264. package/dist/client/assets/use-secrets-DZDUsUGC.js +0 -1
  265. package/dist/client/assets/useInfiniteQuery-C1jLiRqA.js +0 -1
  266. package/dist/client/assets/useSuspenseInfiniteQuery-CHLM-3cW.js +0 -1
  267. package/dist/client/assets/user-DaO6RYsc.js +0 -1
  268. package/dist/client/assets/workflow-C3zNP9N8.js +0 -1
  269. package/dist/client/assets/workflow-detail-CFwJ5L9v.js +0 -1
@@ -1 +0,0 @@
1
- import{e as k,j as o,p as T,r as N,O as D}from"./index-CiRQNPVt.js";import{u as z,S as E,a as I,b as L}from"./sidebar-BBqRosV0.js";import{T as M,a as O,b as A,u as P}from"./tooltip-C47QSg8i.js";import{S as $,a as W,b as B}from"./shell-route-loading-DSfyT3dO.js";import{u as X,C as H}from"./chat-context-BFmJRDzy.js";import{T as F}from"./tab-id-C7unjelb.js";import{i as q}from"./Monitor01-DUICZH5i.js";import{v as G,C as K}from"./connect-desktop-dialog-CDUh5Otr.js";import{T as Y,a as b}from"./toolbar-D3G0G9U8.js";import{S as U,M as J}from"./shell-controls-CXM2LvTp.js";import"./LayoutLeft-BkxKKkMX.js";import"./sheet-Utq51ofH.js";import"./X-BdwzFded.js";import"./useRouterState-BXwm4DCl.js";import"./ZoomOut-CaG3Pd1Z.js";import"./skeleton-dQOYuNlQ.js";import"./popover-C1MgHMHU.js";import"./drawer-CF0b7Dg3.js";import"./SearchMd-B-q2EsGW.js";import"./Star01-CN33xE6w.js";import"./Plus-CSNkL1o7.js";import"./use-mcp-client-D0A6RZFw.js";import"./use-virtual-mcp-DciRKx1X.js";import"./use-collections-B1Mg9Y32.js";import"./use-create-virtual-mcp-BBxov1Li.js";import"./use-navigate-to-agent-Drh7z3D_.js";import"./github-repo-picker-CVG2zsbh.js";import"./use-connection-DpxWBF4Y.js";import"./dialog-Cwf6uY_y.js";import"./RefreshCcw01-Dncu-kYd.js";import"./collection-search-CDLcWLfd.js";import"./checkbox-CBmcFqoh.js";import"./Check-C9-fsV6-.js";import"./agent-icon-DAPplz1A.js";import"./AlertCircle-BDfUS-lh.js";import"./Tool01-R6WyaXsu.js";import"./SwitchHorizontal01-BI_yHGXL.js";import"./XCircle-D_3MYOn4.js";import"./ArrowUpRight-8daK_Mrm.js";import"./ZapSquare-CP91cLS8.js";import"./Users03-Bek4Ag3W.js";import"./CheckCircle-B_rVd_l8.js";import"./ChevronDown--2U1gfXf.js";import"./ChevronLeft-TttN4toV.js";import"./ChevronRight-BVEygGVH.js";import"./ChevronUp-C-xaVM7d.js";import"./DotsVertical-Q3F6UWC_.js";import"./Container-Bso4WS0x.js";import"./Eye-CKz6zS_m.js";import"./Globe01-iupU5eqh.js";import"./FilterLines-SKQT-eWL.js";import"./Palette-CS36Icvl.js";import"./HardDrive-DpuvbJvr.js";import"./Stars02-B4CoQ82E.js";import"./Key01-6eW9IRFT.js";import"./LinkExternal01-BXhdtlT7.js";import"./Sun-CEzPQTAJ.js";import"./Play-CbbqvWPd.js";import"./Settings02-CdJ0CKrL.js";import"./Shield01-Crgp73nV.js";import"./Stars01-BXO9Nc4-.js";import"./Trash01-C3pnsiws.js";import"./Upload01-BHsRhr7X.js";import"./User01-JuGE_kA7.js";import"./Users01-BVUwP6xk.js";import"./XClose-Da5LgJSi.js";import"./Zap-DHBAOmqP.js";import"./use-mcp-tools-BTzw-W77.js";import"./extract-connection-data-BKeaLULt.js";import"./generate-id-BHe5yw90.js";import"./collections-BxDJ4z3g.js";import"./shell-layout-3b4NfWya.js";import"./avatar-BqNGZrFg.js";import"./required-auth-layout-BE5eceMw.js";import"./use-organization-settings-PADdytdf.js";import"./use-org-sso-nq4qWMpD.js";import"./alert-dialog-Q8M8ngFf.js";import"./form-Bbpyf2N_.js";import"./label-DLUhXNk7.js";import"./input-D3E6n6la.js";import"./spinner-_hqWpG0c.js";import"./index-sqqDCA0K.js";import"./sortable.esm-D7AgS_lX.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CSsbMtfE.js";import"./use-registry-connections-C0VEE_YX.js";import"./useInfiniteQuery-C1jLiRqA.js";import"./infiniteQueryObserver-BND7fiNU.js";import"./card-D41ULrnf.js";import"./integration-icon-vaGvNHHz.js";import"./collection-tabs-CbZbTMYY.js";import"./badge-BBLSXFe0.js";import"./select-BMX9jvQG.js";import"./textarea-D1h5iq3D.js";import"./connection-form-helpers-BonOFyzw.js";import"./use-infinite-scroll-D8iZFAEQ.js";import"./useSuspenseInfiniteQuery-CHLM-3cW.js";import"./use-ai-providers-Bwbur0GT.js";import"./command-B8qtKAnE.js";import"./index-DJTEqPXf.js";import"./use-org-auth-client-BlGBETGB.js";import"./hover-card-Azyk5Kxa.js";import"./task-status-5oHTrkjV.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./decopilot-sse-pool-BHhoQKaF.js";import"./create-sse-subscription-BS5983N4.js";function Q(e){const t=k.c(5),{onPointerDown:r,onDoubleClick:d}=e,{state:f,isMobile:u}=z();if(u||f==="collapsed")return null;let s,n;t[0]===Symbol.for("react.memo_cache_sentinel")?(s={left:"var(--sidebar-width)"},n=o.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-1/2 w-px -translate-x-1/2 bg-transparent transition-colors duration-150 group-hover/resize:bg-border group-active/resize:bg-border"}),t[0]=s,t[1]=n):(s=t[0],n=t[1]);let i;return t[2]!==d||t[3]!==r?(i=o.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize sidebar",title:"Drag to resize, double-click to reset",onPointerDown:r,onDoubleClick:d,className:"group/resize absolute top-0 z-20 h-full w-2 -translate-x-1/2 cursor-col-resize",style:s,children:n}),t[2]=d,t[3]=r,t[4]=i):i=t[4],i}const R=240,V=400,Z="sidebar.width";function _(e){return Math.max(R,Math.min(V,e))}function ee(){const e=k.c(11),[t,r]=T(Z,te),d=N.useRef(null);let f;e[0]!==r||e[1]!==t?(f=a=>{a.preventDefault();const m=a.clientX,p=_(t),c=d.current??(typeof document<"u"?document.querySelector('[data-slot="sidebar-wrapper"]'):null),h=c?Array.from(c.querySelectorAll('[data-slot="sidebar"], [data-slot="sidebar-container"]')):[];for(const x of h)x.style.transition="none";const j=x=>{const g=_(p+(x.clientX-m));c?.style.setProperty("--sidebar-width",`${g}px`)},S=x=>{const g=_(p+(x.clientX-m));r(g);for(const v of h)v.style.transition="";window.removeEventListener("pointermove",j),window.removeEventListener("pointerup",S),document.body.style.userSelect="",document.body.style.cursor=""};document.body.style.userSelect="none",document.body.style.cursor="col-resize",window.addEventListener("pointermove",j),window.addEventListener("pointerup",S)},e[0]=r,e[1]=t,e[2]=f):f=e[2];const u=f;let s;e[3]!==r?(s=()=>{r(R)},e[3]=r,e[4]=s):s=e[4];const n=s;let i;e[5]!==t?(i=_(t),e[5]=t,e[6]=i):i=e[6];let l;return e[7]!==u||e[8]!==n||e[9]!==i?(l={width:i,wrapperRef:d,onStartResize:u,resetWidth:n},e[7]=u,e[8]=n,e[9]=i,e[10]=l):l=e[10],l}function te(e){return typeof e=="number"?_(e):R}function oe(){const e=k.c(22),t=X(),[r,d]=N.useState(!1);let f;if(e[0]!==t.capabilities||e[1]!==t.hostname||e[2]!==t.machineId||e[3]!==t.online){const j=G(t.capabilities);f=t.online?o.jsxs("div",{className:"flex flex-col gap-0.5 text-xs",children:[o.jsx("span",{className:"font-medium",children:t.hostname??t.machineId??"Desktop linked"}),o.jsx("span",{className:"text-muted-foreground",children:j.length>0?`Available: ${j.join(", ")}`:"No CLI agents detected"})]}):o.jsx("span",{className:"text-xs",children:"Desktop disconnected"}),e[0]=t.capabilities,e[1]=t.hostname,e[2]=t.machineId,e[3]=t.online,e[4]=f}else f=e[4];const u=f;let s;e[5]===Symbol.for("react.memo_cache_sentinel")?(s=()=>d(!0),e[5]=s):s=e[5];const n=t.online?"Desktop linked":"Connect your desktop";let i;e[6]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(q,{size:16}),e[6]=i):i=e[6];let l;e[7]!==t.online?(l=t.online&&o.jsx("span",{className:"absolute top-1 right-1 size-2 rounded-full bg-success ring-2 ring-background animate-pulse"}),e[7]=t.online,e[8]=l):l=e[8];let a;e[9]!==n||e[10]!==l?(a=o.jsx(M,{asChild:!0,children:o.jsxs(Y,{onClick:s,"aria-label":n,children:[i,l]})}),e[9]=n,e[10]=l,e[11]=a):a=e[11];let m;e[12]!==u?(m=o.jsx(O,{side:"bottom",children:u}),e[12]=u,e[13]=m):m=e[13];let p;e[14]!==a||e[15]!==m?(p=o.jsxs(A,{children:[a,m]}),e[14]=a,e[15]=m,e[16]=p):p=e[16];let c;e[17]!==r?(c=o.jsx(K,{open:r,onOpenChange:d}),e[17]=r,e[18]=c):c=e[18];let h;return e[19]!==p||e[20]!==c?(h=o.jsxs(o.Fragment,{children:[p,c]}),e[19]=p,e[20]=c,e[21]=h):h=e[21],h}const ie="sidebar.open";function re(){const e=k.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=o.jsx(B,{}),e[0]=t):t=e[0],t}function no(){const e=k.c(26),t=P(),[r,d]=T(ie,!1),{width:f,wrapperRef:u,onStartResize:s,resetWidth:n}=ee();let i,l;e[0]===Symbol.for("react.memo_cache_sentinel")?(i=o.jsx(b.LogoLink,{}),l=o.jsx(U,{}),e[0]=i,e[1]=l):(i=e[0],l=e[1]);let a,m;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsxs(b.LeftColumn,{children:[i,l,o.jsx("span",{className:"hidden md:contents",children:o.jsx(b.Nav,{})}),o.jsx(b.TogglesSlot,{}),o.jsx(oe,{})]}),m=o.jsx(b.CenterSlot,{}),e[2]=a,e[3]=m):(a=e[2],m=e[3]);let p;e[4]===Symbol.for("react.memo_cache_sentinel")?(p=o.jsxs(b.Header,{children:[a,m,o.jsxs(b.RightColumn,{children:[o.jsx("div",{className:"min-w-0 flex-1 overflow-x-auto [scrollbar-width:none] flex justify-end",children:o.jsx(b.TabsSlot,{})}),o.jsx(b.RightSlot,{})]})]}),e[4]=p):p=e[4];const c=`${f}px`;let h;e[5]!==c?(h={"--sidebar-width":c,"--sidebar-width-icon":"3.5rem"},e[5]=c,e[6]=h):h=e[6];const j=h;let S;e[7]!==t||e[8]!==s||e[9]!==n?(S=!t&&o.jsxs(o.Fragment,{children:[o.jsx($,{}),o.jsx(Q,{onPointerDown:s,onDoubleClick:n})]}),e[7]=t,e[8]=s,e[9]=n,e[10]=S):S=e[10];let x;e[11]===Symbol.for("react.memo_cache_sentinel")?(x={background:"transparent",containerType:"inline-size"},e[11]=x):x=e[11];let g;e[12]===Symbol.for("react.memo_cache_sentinel")?(g=o.jsx(E,{className:"flex flex-col",style:x,children:o.jsx("div",{className:"flex flex-col h-full min-h-0",children:o.jsx("div",{className:"relative flex-1 min-h-0 flex flex-row",children:o.jsx(N.Suspense,{fallback:o.jsx(re,{}),children:o.jsx(D,{})})})})}),e[12]=g):g=e[12];let v;e[13]!==j||e[14]!==S||e[15]!==u?(v=o.jsxs(I,{ref:u,className:"flex-1 bg-sidebar relative min-h-0",style:j,children:[S,g]}),e[13]=j,e[14]=S,e[15]=u,e[16]=v):v=e[16];let y;e[17]!==t?(y=t&&o.jsx(J,{renderSidebar:se}),e[17]=t,e[18]=y):y=e[18];let w;e[19]!==v||e[20]!==y?(w=o.jsx(H,{children:o.jsxs("div",{className:"app-shell-root flex flex-col h-dvh overflow-hidden",children:[p,v,y]})}),e[19]=v,e[20]=y,e[21]=w):w=e[21];let C;return e[22]!==d||e[23]!==r||e[24]!==w?(C=o.jsx(F,{children:o.jsx(b.Provider,{children:o.jsx(L,{open:r,onOpenChange:d,children:w})})}),e[22]=d,e[23]=r,e[24]=w,e[25]=C):C=e[25],C}function se(e){const{onClose:t}=e;return o.jsx("div",{className:"flex h-full",children:o.jsx("div",{className:"w-full bg-sidebar flex flex-col overflow-y-auto group/sidebar","data-state":"expanded",children:o.jsx(W,{onClose:t})})})}export{no as default};
@@ -1 +0,0 @@
1
- import{ar as Ye,as as de,at as et,au as tt,av as Ie,G as he,aw as st,ax as it,r as A,ay as nt,az as rt,aA as ot,aB as lt,aC as ve,aD as at,aE as ct,aF as dt,e as T,j as i,q as Z,c as q,l as $e,aG as pe,o as W,K as re,n as oe,a as mt,v as ut,E as ft,b as ht,B as je}from"./index-CiRQNPVt.js";import{u as xe}from"./tooltip-C47QSg8i.js";import{i as pt,u as ee,S as Te,g as xt}from"./use-mcp-client-D0A6RZFw.js";import{a as gt,b as bt,v as yt,u as vt}from"./use-virtual-mcp-DciRKx1X.js";import{i as jt}from"./Check-C9-fsV6-.js";import{Z as wt,A as Y,$ as Nt,u as St,c as _t}from"./agent-icon-DAPplz1A.js";import{s as ge}from"./Plus-CSNkL1o7.js";import{i as Ae}from"./X-BdwzFded.js";import{u as Ct,b as kt,h as Et,C as ie}from"./agent-capabilities-gx2lqG9R.js";import{u as It,c as $t}from"./chat-context-BFmJRDzy.js";import{N as Tt}from"./agent-icons-Dk-aO0GI.js";import{u as Me,a as ne,K as Oe,P as Re,D as ze,c as At,S as Mt,v as Ot,b as Rt,C as zt,s as Pt,d as Dt,e as Ht,f as Lt}from"./sortable.esm-D7AgS_lX.js";import{u as Pe,a as De,o as Ut}from"./use-organization-settings-PADdytdf.js";import{c as be,u as Bt,h as Ft}from"./shell-layout-3b4NfWya.js";import{I as Qt}from"./input-D3E6n6la.js";import{S as Wt}from"./scroll-area-verb-Y8E.js";import{S as qt,c as Kt,d as Gt,a as Vt,b as Zt}from"./sheet-Utq51ofH.js";import{S as H}from"./skeleton-dQOYuNlQ.js";import{t as He}from"./ChevronDown--2U1gfXf.js";import{d as Le}from"./ZoomOut-CaG3Pd1Z.js";import{g as Jt,M as Xt}from"./types-Df_Z2FUK.js";import{I as Yt}from"./integration-icon-vaGvNHHz.js";import{u as es}from"./unwrap-tool-result-BYXdCQMg.js";import{t as Ue,P as ts,e as ss,s as is,g as ns}from"./pair-CpEuUIpQ.js";import{a as rs}from"./XCircle-D_3MYOn4.js";import{g as os}from"./use-mcp-prompts-BuV5LRNr.js";import{u as ls,w as as}from"./tab-id-C7unjelb.js";import{a as cs,d as ds,c as ms,b as us,D as fs}from"./dropdown-menu-UGlYpK18.js";import{s as hs}from"./Trash01-C3pnsiws.js";import{a as ps,u as xs}from"./use-ai-providers-Bwbur0GT.js";import{a as gs}from"./toolbar-D3G0G9U8.js";import"./use-collections-B1Mg9Y32.js";import"./AlertCircle-BDfUS-lh.js";import"./Tool01-R6WyaXsu.js";import"./SwitchHorizontal01-BI_yHGXL.js";import"./RefreshCcw01-Dncu-kYd.js";import"./ArrowUpRight-8daK_Mrm.js";import"./ZapSquare-CP91cLS8.js";import"./Users03-Bek4Ag3W.js";import"./CheckCircle-B_rVd_l8.js";import"./ChevronLeft-TttN4toV.js";import"./ChevronRight-BVEygGVH.js";import"./ChevronUp-C-xaVM7d.js";import"./DotsVertical-Q3F6UWC_.js";import"./Container-Bso4WS0x.js";import"./Eye-CKz6zS_m.js";import"./Globe01-iupU5eqh.js";import"./FilterLines-SKQT-eWL.js";import"./Star01-CN33xE6w.js";import"./Palette-CS36Icvl.js";import"./HardDrive-DpuvbJvr.js";import"./Stars02-B4CoQ82E.js";import"./Key01-6eW9IRFT.js";import"./LayoutLeft-BkxKKkMX.js";import"./LinkExternal01-BXhdtlT7.js";import"./Monitor01-DUICZH5i.js";import"./Sun-CEzPQTAJ.js";import"./Play-CbbqvWPd.js";import"./SearchMd-B-q2EsGW.js";import"./Settings02-CdJ0CKrL.js";import"./Shield01-Crgp73nV.js";import"./Stars01-BXO9Nc4-.js";import"./Upload01-BHsRhr7X.js";import"./User01-JuGE_kA7.js";import"./Users01-BVUwP6xk.js";import"./XClose-Da5LgJSi.js";import"./Zap-DHBAOmqP.js";import"./spinner-_hqWpG0c.js";import"./dialog-Cwf6uY_y.js";import"./drawer-CF0b7Dg3.js";import"./collection-search-CDLcWLfd.js";import"./form-Bbpyf2N_.js";import"./label-DLUhXNk7.js";import"./select-BMX9jvQG.js";import"./tabs-DVd_y6YL.js";import"./toggle-group-vA7ktrP-.js";import"./connect-desktop-dialog-CDUh5Otr.js";import"./popover-C1MgHMHU.js";import"./command-B8qtKAnE.js";import"./index-DJTEqPXf.js";import"./useInfiniteQuery-C1jLiRqA.js";import"./infiniteQueryObserver-BND7fiNU.js";import"./index-Co-NpkaC.js";import"./question-004-sINsf4GQ.js";import"./checkbox-CBmcFqoh.js";import"./ai-providers-logos-DD3qZ33J.js";import"./avatar-BqNGZrFg.js";import"./settings-section-CQW36fJV.js";import"./card-D41ULrnf.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-CSsbMtfE.js";import"./use-registry-connections-C0VEE_YX.js";import"./use-connection-DpxWBF4Y.js";import"./extract-connection-data-BKeaLULt.js";import"./generate-id-BHe5yw90.js";import"./collections-BxDJ4z3g.js";import"./collection-tabs-CbZbTMYY.js";import"./badge-BBLSXFe0.js";import"./textarea-D1h5iq3D.js";import"./connection-form-helpers-BonOFyzw.js";import"./use-infinite-scroll-D8iZFAEQ.js";import"./useSuspenseInfiniteQuery-CHLM-3cW.js";import"./required-auth-layout-BE5eceMw.js";import"./useRouterState-BXwm4DCl.js";import"./use-org-sso-nq4qWMpD.js";import"./format-time-Cy7tTmZp.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./use-copy-B_uLjrw6.js";import"./file-type-icon-7TqtrpuQ.js";import"./content-blocks-o63cs2vh.js";import"./use-navigate-to-agent-Drh7z3D_.js";import"./decopilot-sse-pool-BHhoQKaF.js";import"./create-sse-subscription-BS5983N4.js";function we(t,e){const s=new Set(e);return t.filter(r=>!s.has(r))}function bs(t,e,s){const r=t.slice(0);return r[e]=s,r}var ys=class extends Ye{#n;#e;#r;#i;#t;#s;#o;#l;#a;#c=[];constructor(t,e,s){super(),this.#n=t,this.#i=s,this.#r=[],this.#t=[],this.#e=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#t.forEach(t=>{t.subscribe(e=>{this.#f(t,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#t.forEach(t=>{t.destroy()})}setQueries(t,e){this.#r=t,this.#i=e,de.batch(()=>{const s=this.#t,r=this.#u(this.#r);r.forEach(m=>m.observer.setOptions(m.defaultedQueryOptions));const n=r.map(m=>m.observer),a=n.map(m=>m.getCurrentResult()),o=s.length!==n.length,d=n.some((m,u)=>m!==s[u]),l=o||d,c=l?!0:a.some((m,u)=>{const f=this.#e[u];return!f||!et(m,f)});!l&&!c||(l&&(this.#c=r,this.#t=n),this.#e=a,this.hasListeners()&&(l&&(we(s,n).forEach(m=>{m.destroy()}),we(n,s).forEach(m=>{m.subscribe(u=>{this.#f(m,u)})})),this.#h()))})}getCurrentResult(){return this.#e}getQueries(){return this.#t.map(t=>t.getCurrentQuery())}getObservers(){return this.#t}getOptimisticResult(t,e){const s=this.#u(t),r=s.map(a=>a.observer.getOptimisticResult(a.defaultedQueryOptions)),n=s.map(a=>a.defaultedQueryOptions.queryHash);return[r,a=>this.#m(a??r,e,n),()=>this.#d(r,s)]}#d(t,e){return e.map((s,r)=>{const n=t[r];return s.defaultedQueryOptions.notifyOnChangeProps?n:s.observer.trackResult(n,a=>{e.forEach(o=>{o.observer.trackProp(a)})})})}#m(t,e,s){if(e){const r=this.#a,n=s!==void 0&&r!==void 0&&(r.length!==s.length||s.some((a,o)=>a!==r[o]));return(!this.#s||this.#e!==this.#l||n||e!==this.#o)&&(this.#o=e,this.#l=this.#e,s!==void 0&&(this.#a=s),this.#s=tt(this.#s,e(t))),this.#s}return t}#p(){return this.#i?.combine!==void 0&&this.#t.some((t,e)=>t.options.suspense&&this.#e[e]?.data===void 0)}#u(t){const e=new Map;this.#t.forEach(r=>{const n=r.options.queryHash;if(!n)return;const a=e.get(n);a?a.push(r):e.set(n,[r])});const s=[];return t.forEach(r=>{const n=this.#n.defaultQueryOptions(r),o=e.get(n.queryHash)?.shift()??new Ie(this.#n,n);s.push({defaultedQueryOptions:n,observer:o})}),s}#f(t,e){const s=this.#t.indexOf(t);s!==-1&&(this.#e=bs(this.#e,s,e),this.#h())}#h(){if(this.hasListeners()){const t=this.#d(this.#e,this.#c),e=this.#p(),s=this.#s,r=e?s:this.#m(t,this.#i?.combine);(e||s!==r)&&de.batch(()=>{this.listeners.forEach(n=>{n(this.#e)})})}}};function vs({queries:t,...e},s){const r=he(s),n=st(),a=it(),o=A.useMemo(()=>t.map(h=>{const x=r.defaultQueryOptions(h);return x._optimisticResults=n?"isRestoring":"optimistic",x}),[t,r,n]);o.forEach(h=>{nt(h);const x=r.getQueryCache().get(h.queryHash);rt(h,a,x)}),ot(a);const[d]=A.useState(()=>new ys(r,o,e)),[l,c,m]=d.getOptimisticResult(o,e.combine),u=!n&&e.subscribed!==!1;A.useSyncExternalStore(A.useCallback(h=>u?d.subscribe(de.batchCalls(h)):lt,[d,u]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),A.useEffect(()=>{d.setQueries(o,e)},[o,e,d]);const p=l.some((h,x)=>ve(o[x],h))?l.flatMap((h,x)=>{const b=o[x];if(b&&ve(b,h)){const v=new Ie(r,b);return at(b,v,a)}return[]}):[];if(p.length>0)throw Promise.all(p);const g=l.find((h,x)=>{const b=o[x];return b&&ct({result:h,errorResetBoundary:a,throwOnError:b.throwOnError,query:r.getQueryCache().get(b.queryHash),suspense:b.suspense})});if(g?.error)throw g.error;return c(m())}function js(t,e){return vs({...t,queries:t.queries.map(s=>({...s,suspense:!0,throwOnError:dt,enabled:!0,placeholderData:void 0}))},e)}const te=8;function ws(t){const e=T.c(16),{open:s,onOpenChange:r}=t,[n,a]=A.useState("");let o,d;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx(qt,{children:"Manage home"}),d=i.jsx(Kt,{children:"Add agents to the home board and pin their interactive UIs or prompts."}),e[0]=o,e[1]=d):(o=e[0],d=e[1]);let l;e[2]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(wt,{size:14,className:"absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground pointer-events-none","aria-hidden":!0}),e[2]=l):l=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c=h=>a(h.target.value),e[3]=c):c=e[3];let m;e[4]!==n?(m=i.jsxs(Gt,{className:"px-5 py-4 border-b border-border",children:[o,d,i.jsxs("div",{className:"relative mt-3",children:[l,i.jsx(Qt,{value:n,onChange:c,placeholder:"Search agents…",className:"pl-8 h-8 text-sm"})]})]}),e[4]=n,e[5]=m):m=e[5];let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=i.jsx(Zs,{}),e[6]=u):u=e[6];let f;e[7]!==n?(f=i.jsx(Wt,{className:"flex-1 min-h-0 [&_[data-slot=scroll-area-viewport]>div]:!block",children:i.jsx("div",{className:"p-3 flex flex-col gap-4",children:i.jsx(A.Suspense,{fallback:u,children:i.jsx(Ss,{search:n})})})}),e[7]=n,e[8]=f):f=e[8];let p;e[9]!==m||e[10]!==f?(p=i.jsxs(Vt,{side:"right",className:"w-full sm:max-w-md p-0 flex flex-col",children:[m,f]}),e[9]=m,e[10]=f,e[11]=p):p=e[11];let g;return e[12]!==r||e[13]!==s||e[14]!==p?(g=i.jsx(Zt,{open:s,onOpenChange:r,children:p}),e[12]=r,e[13]=s,e[14]=p,e[15]=g):g=e[15],g}function Ns(t){const e=T.c(32),{org:s}=Z(),r=Pe();let n;e[0]!==r?.ids?(n=r?.ids??[],e[0]=r?.ids,e[1]=n):n=e[1];const a=n,o=De(),d=bt(),l=he();let c;e[2]!==s||e[3]!==l?(c=()=>l.refetchQueries({queryKey:re.homeNextActions(s.slug),type:"active"}),e[2]=s,e[3]=l,e[4]=c):c=e[4];const m=c;let u;e[5]!==a?(u=C=>a.includes(C),e[5]=a,e[6]=u):u=e[6];const f=u;let p;e[7]!==a||e[8]!==t?(p=t?a.filter(C=>t.has(C)).length:a.length,e[7]=a,e[8]=t,e[9]=p):p=e[9];const h=p>=te;let x;e[10]!==h||e[11]!==f||e[12]!==o?(x=C=>f(C)||h?Promise.resolve():o.apply(I=>I.includes(C)?null:[...I,C]),e[10]=h,e[11]=f,e[12]=o,e[13]=x):x=e[13];const b=x;let v;e[14]!==o?(v=C=>o.apply(I=>I.filter(E=>E!==C)),e[14]=o,e[15]=v):v=e[15];const w=v;let y;e[16]!==o?(y=C=>o.apply(()=>C),e[16]=o,e[17]=y):y=e[17];const j=y;let N;e[18]!==d||e[19]!==h||e[20]!==f||e[21]!==m||e[22]!==o?(N=async(C,I)=>{await d.update.mutateAsync({id:C.id,data:{metadata:I}}),!f(C.id)&&!h&&await o.apply(E=>E.includes(C.id)?null:[...E,C.id]),await m()},e[18]=d,e[19]=h,e[20]=f,e[21]=m,e[22]=o,e[23]=N):N=e[23];const S=N;let k;return e[24]!==b||e[25]!==h||e[26]!==a||e[27]!==f||e[28]!==w||e[29]!==j||e[30]!==S?(k={homeIds:a,isOnHome:f,atLimit:h,addAgent:b,removeAgent:w,reorder:j,saveAgentMetadata:S},e[24]=b,e[25]=h,e[26]=a,e[27]=f,e[28]=w,e[29]=j,e[30]=S,e[31]=k):k=e[31],k}function Ss(t){const e=T.c(21),{search:s}=t;let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r={pageSize:1e3},e[0]=r):r=e[0];const n=gt(r);let a;e[1]!==n?(a=new Set(n.map(Is)),e[1]=n,e[2]=a):a=e[2];const o=Ns(a);let d,l,c;if(e[3]!==n||e[4]!==o||e[5]!==s){const h=new Map(n.map(Es));d=s.trim().toLowerCase();const x=v=>!d||v.title?.toLowerCase().includes(d);l=o.homeIds.map(v=>h.get(v)).filter(ks).filter(x);let b;e[9]!==o?(b=v=>!o.isOnHome(v.id),e[9]=o,e[10]=b):b=e[10],c=n.filter(Cs).filter(b).filter(x).sort(_s),e[3]=n,e[4]=o,e[5]=s,e[6]=d,e[7]=l,e[8]=c}else d=e[6],l=e[7],c=e[8];const m=c;let u;e[11]!==o||e[12]!==l?(u=i.jsx($s,{home:o,agents:l}),e[11]=o,e[12]=l,e[13]=u):u=e[13];const f=!!d;let p;e[14]!==m||e[15]!==o||e[16]!==f?(p=i.jsx(Ms,{home:o,agents:m,hasSearch:f}),e[14]=m,e[15]=o,e[16]=f,e[17]=p):p=e[17];let g;return e[18]!==u||e[19]!==p?(g=i.jsxs(i.Fragment,{children:[u,p]}),e[18]=u,e[19]=p,e[20]=g):g=e[20],g}function _s(t,e){return(t.title??"").localeCompare(e.title??"")}function Cs(t){return t.id&&!pt(t.id)}function ks(t){return!!t}function Es(t){return[t.id,t]}function Is(t){return t.id}function Be(t){const e=T.c(7),{title:s,hint:r}=t;let n;e[0]!==s?(n=i.jsx("span",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:s}),e[0]=s,e[1]=n):n=e[1];let a;e[2]!==r?(a=r&&i.jsx("span",{className:"text-xs text-muted-foreground",children:r}),e[2]=r,e[3]=a):a=e[3];let o;return e[4]!==n||e[5]!==a?(o=i.jsxs("div",{className:"flex items-center justify-between px-1",children:[n,a]}),e[4]=n,e[5]=a,e[6]=o):o=e[6],o}function $s(t){const e=T.c(14),{home:s,agents:r}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={activationConstraint:{distance:5}},e[0]=n):n=e[0];let a;e[1]===Symbol.for("react.memo_cache_sentinel")?(a={coordinateGetter:Pt},e[1]=a):a=e[1];const o=Me(ne(Re,n),ne(Oe,a));let d;e[2]!==s?(d=p=>{const{active:g,over:h}=p;if(!h||g.id===h.id)return;const x=s.homeIds,b=x.indexOf(g.id),v=x.indexOf(h.id);b===-1||v===-1||s.reorder(Dt([...x],b,v)).catch(As)},e[2]=s,e[3]=d):d=e[3];const l=d,c=`${s.homeIds.length}/${te}`;let m;e[4]!==c?(m=i.jsx(Be,{title:"On home",hint:c}),e[4]=c,e[5]=m):m=e[5];let u;e[6]!==r||e[7]!==l||e[8]!==s||e[9]!==o?(u=r.length===0?i.jsx("p",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:"No agents on the home yet."}):i.jsx(ze,{sensors:o,collisionDetection:At,onDragEnd:l,children:i.jsx(Mt,{items:r.map(Ts),strategy:Ot,children:i.jsx("div",{className:"flex flex-col gap-1",children:r.map(p=>i.jsx(Rs,{agent:p,home:s},p.id))})})}),e[6]=r,e[7]=l,e[8]=s,e[9]=o,e[10]=u):u=e[10];let f;return e[11]!==m||e[12]!==u?(f=i.jsxs("div",{className:"flex flex-col gap-1.5",children:[m,u]}),e[11]=m,e[12]=u,e[13]=f):f=e[13],f}function Ts(t){return t.id}function As(){return W.error("Couldn't reorder home — please try again.")}function Ms(t){const e=T.c(6),{home:s,agents:r,hasSearch:n}=t,[a,o]=A.useState(20);let d;if(e[0]!==r||e[1]!==n||e[2]!==s||e[3]!==a){const l=r.slice(0,a);let c;e[5]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx(Be,{title:"Add to home"}),e[5]=c):c=e[5],d=i.jsxs("div",{className:"flex flex-col gap-1.5",children:[c,r.length===0?i.jsx("p",{className:"px-3 py-4 text-center text-xs text-muted-foreground",children:n?"No agents match.":"Every agent is on the home."}):i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"flex flex-col gap-1",children:l.map(m=>i.jsx(Ds,{agent:m,home:s},m.id))}),r.length>a&&i.jsxs("button",{type:"button",onClick:()=>o(Os),className:"mt-1 self-center rounded-md px-3 py-1.5 text-xs text-muted-foreground hover:bg-accent/40 hover:text-foreground",children:["Load more (",r.length-a,")"]})]})]}),e[0]=r,e[1]=n,e[2]=s,e[3]=a,e[4]=d}else d=e[4];return d}function Os(t){return t+20}function Fe(t){const e=pe(t.metadata?.ui).filter(a=>!!a.resourceUri).length,s=t.metadata?.ui?.homePrompts,r=Array.isArray(s)?s.length:null,n=[];return e>0&&n.push(`${e} tile${e===1?"":"s"}`),r!==null&&r>0&&n.push(`${r} prompt${r===1?"":"s"}`),r===0&&n.push("prompts off"),n.join(" · ")}function Rs(t){const e=T.c(57),{agent:s,home:r}=t,[n,a]=A.useState(!1);let o;e[0]!==s.id?(o={id:s.id},e[0]=s.id,e[1]=o):o=e[1];const{attributes:d,listeners:l,setNodeRef:c,transform:m,transition:u,isDragging:f}=Rt(o),p=Fe(s)||"Quick access";let g;e[2]!==m?(g=zt.Transform.toString(m),e[2]=m,e[3]=g):g=e[3];const h=f?.5:void 0,x=f?100:void 0;let b;e[4]!==g||e[5]!==h||e[6]!==x||e[7]!==u?(b={transform:g,transition:u,opacity:h,zIndex:x},e[4]=g,e[5]=h,e[6]=x,e[7]=u,e[8]=b):b=e[8];const v=b,w=f&&"shadow-lg";let y;e[9]!==w?(y=q("rounded-lg border border-border bg-card",w),e[9]=w,e[10]=y):y=e[10];const j=`Drag to reorder ${s.title??s.id}`;let N;e[11]===Symbol.for("react.memo_cache_sentinel")?(N=i.jsx(Le,{size:14}),e[11]=N):N=e[11];let S;e[12]!==d||e[13]!==l||e[14]!==j?(S=i.jsx("button",{type:"button",...d,...l,className:"shrink-0 text-muted-foreground hover:text-foreground cursor-grab active:cursor-grabbing outline-none focus-visible:ring-2 focus-visible:ring-ring rounded","aria-label":j,children:N}),e[12]=d,e[13]=l,e[14]=j,e[15]=S):S=e[15];let k;e[16]===Symbol.for("react.memo_cache_sentinel")?(k=()=>a(Ps),e[16]=k):k=e[16];const C=s.title??s.id;let I;e[17]!==s.icon||e[18]!==C?(I=i.jsx(Y,{icon:s.icon,name:C,size:"sm"}),e[17]=s.icon,e[18]=C,e[19]=I):I=e[19];const E=s.title??s.id;let _;e[20]!==E?(_=i.jsx("div",{className:"truncate text-sm font-medium text-foreground",children:E}),e[20]=E,e[21]=_):_=e[21];let $;e[22]!==p?($=i.jsx("div",{className:"truncate text-xs text-muted-foreground",children:p}),e[22]=p,e[23]=$):$=e[23];let O;e[24]!==_||e[25]!==$?(O=i.jsxs("div",{className:"min-w-0 flex-1",children:[_,$]}),e[24]=_,e[25]=$,e[26]=O):O=e[26];const B=n&&"rotate-180";let z;e[27]!==B?(z=q("shrink-0 text-muted-foreground transition-transform",B),e[27]=B,e[28]=z):z=e[28];let P;e[29]!==z?(P=i.jsx(He,{size:16,className:z}),e[29]=z,e[30]=P):P=e[30];let Q;e[31]!==n||e[32]!==I||e[33]!==O||e[34]!==P?(Q=i.jsxs("button",{type:"button",onClick:k,className:"flex min-w-0 flex-1 items-center gap-2.5 text-left outline-none","aria-expanded":n,children:[I,O,P]}),e[31]=n,e[32]=I,e[33]=O,e[34]=P,e[35]=Q):Q=e[35];let M;e[36]!==s.id||e[37]!==r?(M=()=>r.removeAgent(s.id).catch(zs),e[36]=s.id,e[37]=r,e[38]=M):M=e[38];const F=`Remove ${s.title??s.id} from home`;let D;e[39]===Symbol.for("react.memo_cache_sentinel")?(D=i.jsx(Ae,{size:14}),e[39]=D):D=e[39];let R;e[40]!==M||e[41]!==F?(R=i.jsx("button",{type:"button",onClick:M,"aria-label":F,title:"Remove from home",className:"shrink-0 inline-flex size-7 items-center justify-center rounded-md text-muted-foreground hover:bg-destructive/10 hover:text-destructive",children:D}),e[40]=M,e[41]=F,e[42]=R):R=e[42];let L;e[43]!==S||e[44]!==Q||e[45]!==R?(L=i.jsxs("div",{className:"flex items-center gap-1.5 px-2 py-2.5",children:[S,Q,R]}),e[43]=S,e[44]=Q,e[45]=R,e[46]=L):L=e[46];let U;e[47]!==s||e[48]!==n||e[49]!==r?(U=n&&i.jsx(Qe,{agent:s,home:r}),e[47]=s,e[48]=n,e[49]=r,e[50]=U):U=e[50];let G;return e[51]!==c||e[52]!==v||e[53]!==L||e[54]!==U||e[55]!==y?(G=i.jsxs("div",{ref:c,style:v,className:y,children:[L,U]}),e[51]=c,e[52]=v,e[53]=L,e[54]=U,e[55]=y,e[56]=G):G=e[56],G}function zs(){return W.error("Couldn't remove from home — please try again.")}function Ps(t){return!t}function Ds({agent:t,home:e}){const[s,r]=A.useState(!1),[n,a]=A.useState(!1),o=Fe(t),d=async()=>{if(!e.atLimit){a(!0);try{await e.addAgent(t.id)}catch{W.error("Couldn't add to home — please try again.")}finally{a(!1)}}};return i.jsxs("div",{className:"rounded-lg border border-border bg-card",children:[i.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5",children:[i.jsxs("button",{type:"button",onClick:()=>r(l=>!l),className:"flex min-w-0 flex-1 items-center gap-3 text-left outline-none","aria-expanded":s,children:[i.jsx(Y,{icon:t.icon,name:t.title??t.id,size:"sm"}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("div",{className:"truncate text-sm font-medium text-foreground",children:t.title??t.id}),o&&i.jsx("div",{className:"truncate text-xs text-muted-foreground",children:o})]}),i.jsx(He,{size:16,className:q("shrink-0 text-muted-foreground transition-transform",s&&"rotate-180")})]}),i.jsx("button",{type:"button",onClick:d,disabled:n||e.atLimit,"aria-label":"Add to home",title:e.atLimit?`Home is full (${te}) — remove an agent first`:"Add to home",className:"shrink-0 inline-flex size-7 items-center justify-center rounded-md bg-foreground text-background text-xs hover:opacity-90 disabled:opacity-40 disabled:cursor-not-allowed",children:n?i.jsx($e,{size:12,className:"animate-spin"}):i.jsx(ge,{size:14})})]}),s&&i.jsx(Qe,{agent:t,home:e})]})}function Qe(t){const e=T.c(26),{agent:s,home:r}=t;let n,a,o,d,l,c,m;if(e[0]!==s||e[1]!==r){const x=pe(s.metadata?.ui);let b;e[9]!==s.connections?(b=(s.connections??[]).map(Ls).sort(),e[9]=s.connections,e[10]=b):b=e[10];const v=b;a=s.metadata?.ui?.homePrompts,m="border-t border-border px-3 py-2 flex flex-col gap-3",n=Bs,o=s,d=r,l=v,c=new Set(x.map(Hs)),e[0]=s,e[1]=r,e[2]=n,e[3]=a,e[4]=o,e[5]=d,e[6]=l,e[7]=c,e[8]=m}else n=e[2],a=e[3],o=e[4],d=e[5],l=e[6],c=e[7],m=e[8];let u;e[11]!==n||e[12]!==o||e[13]!==d||e[14]!==l||e[15]!==c?(u=i.jsx(n,{agent:o,home:d,connectionIds:l,pinnedResourceUris:c}),e[11]=n,e[12]=o,e[13]=d,e[14]=l,e[15]=c,e[16]=u):u=e[16];let f;e[17]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx(Us,{}),e[17]=f):f=e[17];const p=a??null;let g;e[18]!==s||e[19]!==r||e[20]!==p?(g=i.jsx(A.Suspense,{fallback:f,children:i.jsx(Qs,{agent:s,home:r,curated:p})}),e[18]=s,e[19]=r,e[20]=p,e[21]=g):g=e[21];let h;return e[22]!==m||e[23]!==u||e[24]!==g?(h=i.jsxs("div",{className:m,children:[u,g]}),e[22]=m,e[23]=u,e[24]=g,e[25]=h):h=e[25],h}function Hs(t){return t.resourceUri}function Ls(t){return t.connection_id}function Us(){const t=T.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsxs("div",{className:"flex flex-col gap-2 py-1",children:[i.jsx(H,{className:"h-8 w-full"}),i.jsx(H,{className:"h-8 w-2/3"})]}),t[0]=e):e=t[0],e}function Bs({agent:t,home:e,connectionIds:s,pinnedResourceUris:r}){const{org:n}=Z(),a=ee({connectionId:Te,orgId:n.id,orgSlug:n.slug}),{data:o,isLoading:d}=oe({queryKey:re.projectConnectionDetails(t.id,s),enabled:s.length>0,queryFn:async()=>(await Promise.all(s.map(async c=>{try{const m=await a.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:c}}),{item:u}=es(m),f=(u?.tools??[]).flatMap(p=>{const g=Jt(p._meta);return g?[{name:p.name,description:p.description,resourceUri:g}]:[]});return{id:c,title:u?.title??c,icon:u?.icon??null,uiTools:f}}catch{return{id:c,title:c,icon:null,uiTools:[]}}}))).filter(c=>c.uiTools.length>0)});return s.length===0?null:d?i.jsxs("div",{className:"flex flex-col gap-1 py-0.5",children:[i.jsx(H,{className:"h-7 w-full"}),i.jsx(H,{className:"h-7 w-2/3"})]}):!o||o.length===0?null:i.jsx("div",{className:"flex flex-col gap-0.5",children:o.map(l=>l.uiTools.map(c=>i.jsx(Fs,{agent:t,home:e,connection:l,tool:c,isPinned:r.has(c.resourceUri)},`${l.id}:${c.name}`)))})}function Fs({agent:t,home:e,connection:s,tool:r,isPinned:n}){const[a,o]=A.useState(!1),d=async()=>{if(!n&&!e.isOnHome(t.id)&&e.atLimit){W.error(`Home is full (${te}) — remove an agent first`);return}o(!0);try{const l=pe(t.metadata?.ui),c=n?l.filter(u=>u.resourceUri!==r.resourceUri):[...l,{connectionId:s.id,resourceUri:r.resourceUri}],m={...t.metadata??{},ui:{...t.metadata?.ui??{},homeTile:null,homeTiles:c}};await e.saveAgentMetadata(t,m)}catch(l){console.error("[home-tiles] failed to toggle tile",l),W.error("Couldn't update home — please try again.")}finally{o(!1)}};return i.jsxs("div",{className:"flex items-center gap-2.5 rounded-md px-2 py-1 hover:bg-accent/40",children:[i.jsx(Yt,{icon:s.icon,name:s.title,size:"xs"}),i.jsx("div",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:Ue(r.name)}),i.jsx(We,{isPinned:n,submitting:a,onClick:d,label:n?"Remove from home":"Add to home"})]})}function We(t){const e=T.c(11),{isPinned:s,submitting:r,onClick:n,label:a}=t,o=s?"text-muted-foreground hover:bg-destructive/10 hover:text-destructive":"bg-foreground text-background hover:opacity-90";let d;e[0]!==o?(d=q("inline-flex size-7 shrink-0 items-center justify-center rounded-md text-xs transition-colors disabled:opacity-50 disabled:cursor-progress",o),e[0]=o,e[1]=d):d=e[1];let l;e[2]!==s||e[3]!==r?(l=r?i.jsx($e,{size:12,className:"animate-spin"}):s?i.jsx(Nt,{size:14}):i.jsx(ge,{size:14}),e[2]=s,e[3]=r,e[4]=l):l=e[4];let c;return e[5]!==a||e[6]!==n||e[7]!==r||e[8]!==d||e[9]!==l?(c=i.jsx("button",{type:"button",onClick:n,disabled:r,"aria-label":a,title:a,className:d,children:l}),e[5]=a,e[6]=n,e[7]=r,e[8]=d,e[9]=l,e[10]=c):c=e[10],c}function Qs(t){const e=T.c(32),{agent:s,home:r,curated:n}=t,{org:a}=Z();let o;e[0]!==s.id||e[1]!==a.id||e[2]!==a.slug?(o={connectionId:s.id,orgId:a.id,orgSlug:a.slug},e[0]=s.id,e[1]=a.id,e[2]=a.slug,e[3]=o):o=e[3];const d=ee(o);let l;e[4]!==s.id||e[5]!==a.id?(l=re.agentPrompts(a.id,s.id),e[4]=s.id,e[5]=a.id,e[6]=l):l=e[6];let c;e[7]!==d?(c=async()=>{const{prompts:j}=await d.listPrompts();return j.map(Gs)},e[7]=d,e[8]=c):c=e[8];let m;e[9]!==l||e[10]!==c?(m={queryKey:l,queryFn:c,staleTime:3e4,retry:!1},e[9]=l,e[10]=c,e[11]=m):m=e[11];const{data:u,isLoading:f,error:p}=oe(m),g=be(a.slug);let h,x;if(e[12]!==s.id||e[13]!==u||e[14]!==g.prompts){let j;e[17]!==s.id?(j=S=>S.agentId===s.id&&S.promptName,e[17]=s.id,e[18]=j):j=e[18],h=g.prompts.filter(j).map(Ks);let N;e[19]!==u?(N=u??[],e[19]=u,e[20]=N):N=e[20],x=[...N];for(const S of h)x.some(k=>k.name===S.name)||x.push(S);e[12]=s.id,e[13]=u,e[14]=g.prompts,e[15]=h,e[16]=x}else h=e[15],x=e[16];if(f&&h.length===0){let j;return e[21]===Symbol.for("react.memo_cache_sentinel")?(j=i.jsxs("div",{className:"flex flex-col gap-1",children:[i.jsx(H,{className:"h-7 w-full"}),i.jsx(H,{className:"h-7 w-2/3"})]}),e[21]=j):j=e[21],j}if(p&&h.length===0)return console.error("[home-tiles] listPrompts failed for agent",s.id,p),null;if(x.length===0)return null;let b;e[22]!==n||e[23]!==x?(b=n??x.map(qs),e[22]=n,e[23]=x,e[24]=b):b=e[24];let v;e[25]!==b?(v=new Set(b),e[25]=b,e[26]=v):v=e[26];const w=v;let y;return e[27]!==s||e[28]!==r||e[29]!==x||e[30]!==w?(y=i.jsx("div",{className:"flex flex-col gap-0.5",children:x.map(j=>i.jsx(Vs,{agent:s,home:r,prompt:j,allPromptNames:x.map(Ws),isPinned:w.has(j.name)},j.name))}),e[27]=s,e[28]=r,e[29]=x,e[30]=w,e[31]=y):y=e[31],y}function Ws(t){return t.name}function qs(t){return t.name}function Ks(t){return{name:t.promptName,title:t.title,description:t.description}}function Gs(t){return{name:t.name,title:t.title,description:t.description}}function Vs({agent:t,home:e,prompt:s,allPromptNames:r,isPinned:n}){const[a,o]=A.useState(!1),d=async()=>{if(!n&&!e.isOnHome(t.id)&&e.atLimit){W.error(`Home is full (${te}) — remove an agent first`);return}o(!0);try{const l=t.metadata?.ui?.homePrompts;let c;Array.isArray(l)?c=n?l.filter(u=>u!==s.name):[...l,s.name]:c=n?r.filter(u=>u!==s.name):r;const m={...t.metadata??{},ui:{...t.metadata?.ui??{},homePrompts:c}};await e.saveAgentMetadata(t,m)}catch(l){console.error("[home-tiles] failed to toggle prompt",l),W.error("Couldn't update home — please try again.")}finally{o(!1)}};return i.jsxs("div",{className:"flex items-center gap-2.5 rounded-md px-2 py-1 hover:bg-accent/40",children:[i.jsx("div",{className:"min-w-0 flex-1 truncate text-sm text-foreground",children:s.title??Ue(s.name)}),i.jsx(We,{isPinned:n,submitting:a,onClick:d,label:n?"Remove from home":"Add to home"})]})}function Zs(){const t=T.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"flex flex-col gap-2 p-2",children:Array.from({length:4},Js)}),t[0]=e):e=t[0],e}function Js(t,e){return i.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-border p-2.5",children:[i.jsx(H,{className:"size-8 rounded-md"}),i.jsxs("div",{className:"flex-1 space-y-1.5",children:[i.jsx(H,{className:"h-3 w-1/2"}),i.jsx(H,{className:"h-2.5 w-1/3"})]})]},e)}const X=1,qe=`home-board.layout.v${X}`;function Ke(t){return`home-board.layout.v${X}.${t}`}const Ge={version:X,tiles:{},hidden:[]};function me(t){return!t||t.version!==X?Ge:{version:X,tiles:t.tiles??{},hidden:Array.isArray(t.hidden)?t.hidden:[]}}function Xs(t){return Object.keys(t.tiles).length>0||t.hidden.length>0}function Ys(t){try{const e=localStorage.getItem(Ke(t));return e?me(JSON.parse(e)):void 0}catch{return}}function Ne(t,e){try{localStorage.setItem(Ke(t),JSON.stringify(e))}catch{}}async function Se(t,e){if(!(await fetch(`/api/${t}/kv/${qe}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})).ok)throw new Error("Failed to save board layout")}function ei(t){const e=T.c(24),s=he();let r;e[0]!==t?(r=re.boardLayout(t),e[0]=t,e[1]=r):r=e[1];const n=r;let a;e[2]!==t?(a=Ys(t),e[2]=t,e[3]=a):a=e[3];const o=a;let d;e[4]!==o||e[5]!==t?(d=async()=>{const b=await fetch(`/api/${t}/kv/${qe}`);if(b.status===404)return o&&Xs(o)?(await Se(t,o),o):Ge;if(!b.ok)throw new Error("Failed to load board layout");const v=await b.json(),w=me(v.value);return Ne(t,w),w},e[4]=o,e[5]=t,e[6]=d):d=e[6];let l;e[7]!==o||e[8]!==n||e[9]!==d?(l={queryKey:n,queryFn:d,initialData:o,staleTime:0,refetchOnWindowFocus:!1},e[7]=o,e[8]=n,e[9]=d,e[10]=l):l=e[10];const{data:c,isLoading:m}=oe(l);let u;e[11]!==t?(u={mutationFn:b=>Se(t,b)},e[11]=t,e[12]=u):u=e[12];const f=mt(u);let p;e[13]!==f||e[14]!==t||e[15]!==s||e[16]!==n?(p=b=>{Ne(t,b),s.setQueryData(n,b),f.mutate(b)},e[13]=f,e[14]=t,e[15]=s,e[16]=n,e[17]=p):p=e[17];const g=p;let h;e[18]!==c?(h=me(c),e[18]=c,e[19]=h):h=e[19];let x;return e[20]!==m||e[21]!==g||e[22]!==h?(x={layout:h,isLoading:m,save:g},e[20]=m,e[21]=g,e[22]=h,e[23]=x):x=e[23],x}const Ve=A.createContext(null);function ti(t){const e=T.c(24),{children:s}=t,{org:r}=Z(),n=ei(r.slug),[a,o]=A.useState(!1),[d,l]=A.useState(null);let c;e[0]!==n.layout?(c=()=>{l(n.layout),o(!0)},e[0]=n.layout,e[1]=c):c=e[1];const m=c;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=()=>{l(null),o(!1)},e[2]=u):u=e[2];const f=u;let p;e[3]!==d||e[4]!==n?(p=()=>{d&&n.save(d),l(null),o(!1)},e[3]=d,e[4]=n,e[5]=p):p=e[5];const g=p,h=a&&d!==null,x=h?d:n.layout;let b;e[6]!==d||e[7]!==h||e[8]!==n.layout?(b=h?JSON.stringify(d)!==JSON.stringify(n.layout):!1,e[6]=d,e[7]=h,e[8]=n.layout,e[9]=b):b=e[9];const v=b;let w;e[10]!==a||e[11]!==n?(w=S=>{a?l(S):n.save(S)},e[10]=a,e[11]=n,e[12]=w):w=e[12];const y=w;let j;e[13]!==y||e[14]!==m||e[15]!==v||e[16]!==a||e[17]!==x||e[18]!==g||e[19]!==n.isLoading?(j={isEditMode:a,enter:m,cancel:f,save:g,hasChanges:v,layout:x,isLayoutLoading:n.isLoading,commitLayout:y},e[13]=y,e[14]=m,e[15]=v,e[16]=a,e[17]=x,e[18]=g,e[19]=n.isLoading,e[20]=j):j=e[20];let N;return e[21]!==s||e[22]!==j?(N=i.jsx(Ve.Provider,{value:j,children:s}),e[21]=s,e[22]=j,e[23]=N):N=e[23],N}function Ze(){const t=A.useContext(Ve);if(!t)throw new Error("useHomeEdit must be used within a HomeEditProvider");return t}function si({agentId:t}){const{org:e,locator:s}=Z(),r=ee({connectionId:t,orgId:e.id,orgSlug:e.slug}),{create:n}=ls(),{setTaskId:a}=Bt(),[o,d]=A.useState(null),[l,c]=A.useState(!1),m=A.useRef(!1),u=async(x,b)=>{if(!r){W.error("MCP client not available");return}if(!m.current){m.current=!0,c(!0);try{const v=await os(r,x.name,b),w={type:"doc",content:[{type:"paragraph",content:[ss({id:x.name,name:is(x.name,ns(x._meta)),metadata:v.messages,char:"/",kind:"prompt",args:b}),{type:"text",text:" "}]}]},y=crypto.randomUUID();as(sessionStorage,s,y,{tiptapDoc:w}),await n({id:y,virtual_mcp_id:t}),a(y,t,{autosend:!0})}catch(v){console.error("[start-thread-from-prompt] failed",v),W.error("Failed to start thread. Please try again.")}finally{m.current=!1,c(!1)}}},f=async x=>{if(!m.current){if(x.arguments&&x.arguments.length>0){d(x);return}await u(x)}},p=async x=>{if(!o)return;const b=o;d(null),await u(b,x)};return{start:f,startBlank:async()=>{if(!m.current){m.current=!0,c(!0);try{const x=crypto.randomUUID();await n({id:x,virtual_mcp_id:t}),a(x,t)}catch(x){console.error("[start-thread-from-prompt] startBlank failed",x),W.error("Failed to start thread. Please try again.")}finally{m.current=!1,c(!1)}}},dialog:i.jsx(ts,{prompt:o,setPrompt:x=>d(x),onSubmit:p}),dialogPrompt:o,starting:l}}const K=4,V=100,_e=12,ii=5,ni={w:2,h:2};class ue extends A.Component{state={hasError:!1};static getDerivedStateFromError(e){return{hasError:!0,message:e instanceof Error?e.message:"Unknown error"}}componentDidCatch(e,s){console.error("[home-tiles] tile crashed:",e,s.componentStack)}render(){return this.state.hasError?i.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-4 text-center",children:[i.jsx("span",{className:"flex size-8 items-center justify-center rounded-md bg-destructive/10 text-destructive",children:i.jsx(ut,{size:16})}),i.jsx("p",{className:"text-sm font-medium text-foreground",children:"This tile crashed"}),i.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:this.state.message??"Something went wrong rendering this tile."})]}):this.props.children}}function ri(t){const e=T.c(72),{tiles:s,isEditMode:r,renderTile:n,onMove:a,onResize:o,onRemove:d}=t,l=xe(),c=A.useRef(null),[m,u]=A.useState(null),[f,p]=A.useState(null);let g;e[0]===Symbol.for("react.memo_cache_sentinel")?(g={activationConstraint:{distance:4}},e[0]=g):g=e[0];const h=Me(ne(Re,g),ne(Oe)),x=s.reduce(oi,0),b=r?Math.max(x+2,4):Math.max(x,1);let v;e[1]===Symbol.for("react.memo_cache_sentinel")?(v=()=>{const M=c.current?.getBoundingClientRect();return M?{cellWidth:M.width/K,cellHeight:V}:null},e[1]=v):v=e[1];const w=v;let y;e[2]===Symbol.for("react.memo_cache_sentinel")?(y=M=>{u(String(M.active.id)),p(w())},e[2]=y):y=e[2];const j=y;let N;e[3]!==f||e[4]!==a||e[5]!==s?(N=M=>{const F=String(M.active.id),D=f??w();if(u(null),p(null),!D||D.cellWidth<=0)return;const R=s.find(G=>G.id===F);if(!R)return;const L=Math.round(M.delta.x/D.cellWidth),U=Math.round(M.delta.y/D.cellHeight);L===0&&U===0||a(F,{x:R.x+L,y:R.y+U})},e[3]=f,e[4]=a,e[5]=s,e[6]=N):N=e[6];const S=N;if(l){let M;if(e[7]!==n||e[8]!==s){let D;e[10]!==n?(D=R=>i.jsx("div",{className:"bg-card card-shadow rounded-2xl overflow-hidden",style:{minHeight:V},children:i.jsx(ue,{children:n(R)})},R.id),e[10]=n,e[11]=D):D=e[11],M=s.map(D),e[7]=n,e[8]=s,e[9]=M}else M=e[9];let F;return e[12]!==M?(F=i.jsx("div",{className:"flex flex-col gap-3 px-4 pb-8",children:M}),e[12]=M,e[13]=F):F=e[13],F}let k,C,I,E,_,$,O,B,z;if(e[14]!==m||e[15]!==f||e[16]!==r||e[17]!==S||e[18]!==d||e[19]!==o||e[20]!==n||e[21]!==h||e[22]!==s||e[23]!==b){const M=m?s.find(J=>J.id===m):null;C=ze,B=h,z=j,I=S;const F=b*V,D=r?V*4:V;let R;e[33]!==F||e[34]!==D?(R={height:F,minHeight:D},e[33]=F,e[34]=D,e[35]=R):R=e[35];let L;e[36]!==r||e[37]!==s||e[38]!==b?(L=r&&i.jsx(li,{rows:b,tiles:s}),e[36]=r,e[37]=s,e[38]=b,e[39]=L):L=e[39];let U;if(e[40]!==m||e[41]!==r||e[42]!==d||e[43]!==o||e[44]!==n||e[45]!==s){let J;e[47]!==m||e[48]!==r||e[49]!==d||e[50]!==o||e[51]!==n?(J=se=>i.jsx(ci,{tile:se,isEditMode:r,isDragging:m===se.id,onResize:o,onRemove:d,children:n(se)},se.id),e[47]=m,e[48]=r,e[49]=d,e[50]=o,e[51]=n,e[52]=J):J=e[52],U=s.map(J),e[40]=m,e[41]=r,e[42]=d,e[43]=o,e[44]=n,e[45]=s,e[46]=U}else U=e[46];e[53]!==R||e[54]!==L||e[55]!==U?(E=i.jsxs("div",{ref:c,className:"relative w-full",style:R,children:[L,U]}),e[53]=R,e[54]=L,e[55]=U,e[56]=E):E=e[56],k=Ht,_=null;const G=M&&f?M.w*f.cellWidth-_e:void 0,le=M&&f?M.h*f.cellHeight-_e:void 0;e[57]!==G||e[58]!==le?($={width:G,height:le},e[57]=G,e[58]=le,e[59]=$):$=e[59],O=M&&i.jsx("div",{className:"bg-card card-shadow rounded-2xl shadow-2xl ring-2 ring-primary/40 h-full overflow-hidden opacity-95",children:i.jsx(ue,{children:n(M)})}),e[14]=m,e[15]=f,e[16]=r,e[17]=S,e[18]=d,e[19]=o,e[20]=n,e[21]=h,e[22]=s,e[23]=b,e[24]=k,e[25]=C,e[26]=I,e[27]=E,e[28]=_,e[29]=$,e[30]=O,e[31]=B,e[32]=z}else k=e[24],C=e[25],I=e[26],E=e[27],_=e[28],$=e[29],O=e[30],B=e[31],z=e[32];let P;e[60]!==k||e[61]!==_||e[62]!==$||e[63]!==O?(P=i.jsx(k,{dropAnimation:_,style:$,children:O}),e[60]=k,e[61]=_,e[62]=$,e[63]=O,e[64]=P):P=e[64];let Q;return e[65]!==C||e[66]!==I||e[67]!==E||e[68]!==P||e[69]!==B||e[70]!==z?(Q=i.jsxs(C,{sensors:B,onDragStart:z,onDragEnd:I,children:[E,P]}),e[65]=C,e[66]=I,e[67]=E,e[68]=P,e[69]=B,e[70]=z,e[71]=Q):Q=e[71],Q}function oi(t,e){return Math.max(t,e.y+e.h)}function li(t){const e=T.c(7),{rows:s,tiles:r}=t;let n;e[0]!==r?(n=(l,c)=>r.some(m=>l>=m.x&&l<m.x+m.w&&c>=m.y&&c<m.y+m.h),e[0]=r,e[1]=n):n=e[1];const a=n;let o;if(e[2]!==a||e[3]!==s){o=[];for(let l=0;l<s;l++)for(let c=0;c<K;c++)a(c,l)||o.push({x:c,y:l});e[2]=a,e[3]=s,e[4]=o}else o=e[4];let d;return e[5]!==o?(d=i.jsx("div",{className:"absolute inset-0 pointer-events-none",children:o.map(ai)}),e[5]=o,e[6]=d):d=e[6],d}function ai(t){return i.jsx("div",{className:"absolute p-1",style:{left:`${t.x/K*100}%`,top:t.y*V,width:`${1/K*100}%`,height:V},children:i.jsx("div",{className:"h-full w-full rounded-2xl border border-dashed border-border/60"})},`${t.x}-${t.y}`)}function ci(t){const e=T.c(31),{tile:s,isEditMode:r,isDragging:n,onResize:a,onRemove:o,children:d}=t,l=!r;let c;e[0]!==l||e[1]!==s.id?(c={id:s.id,disabled:l},e[0]=l,e[1]=s.id,e[2]=c):c=e[2];const{setNodeRef:m,attributes:u,listeners:f,isDragging:p}=Lt(c),g=`${s.x/K*100}%`,h=`${s.w/K*100}%`,x=s.y*V,b=s.h*V,v=p||n,w=!v&&"transition-[left,top,width,height,opacity] duration-200 ease-out",y=v&&"opacity-30";let j;e[3]!==w||e[4]!==y?(j=q("absolute p-1 will-change-[left,top,width,height,opacity]",w,y),e[3]=w,e[4]=y,e[5]=j):j=e[5];let N;e[6]!==b||e[7]!==g||e[8]!==x||e[9]!==h?(N={left:g,top:x,width:h,height:b},e[6]=b,e[7]=g,e[8]=x,e[9]=h,e[10]=N):N=e[10];const S=r&&"outline outline-1 outline-transparent hover:outline-primary/40";let k;e[11]!==S?(k=q("relative h-full bg-card card-shadow rounded-2xl overflow-hidden",S),e[11]=S,e[12]=k):k=e[12];let C;e[13]!==u||e[14]!==r||e[15]!==f||e[16]!==o||e[17]!==a||e[18]!==s?(C=r&&i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",...u,...f,className:"absolute top-2 left-2 z-10 flex size-8 items-center justify-center rounded-md bg-background/90 border border-border text-muted-foreground hover:text-foreground hover:bg-muted cursor-grab active:cursor-grabbing","aria-label":"Drag tile",children:i.jsx(Le,{size:16})}),i.jsx("div",{className:"absolute top-2 right-2 z-10 flex items-center gap-1",children:i.jsx(di,{tile:s,onResize:a,onRemove:o})})]}),e[13]=u,e[14]=r,e[15]=f,e[16]=o,e[17]=a,e[18]=s,e[19]=C):C=e[19];let I;e[20]!==d?(I=i.jsx("div",{className:"h-full overflow-hidden",children:i.jsx(ue,{children:d})}),e[20]=d,e[21]=I):I=e[21];let E;e[22]!==I||e[23]!==k||e[24]!==C?(E=i.jsxs("div",{className:k,children:[C,I]}),e[22]=I,e[23]=k,e[24]=C,e[25]=E):E=e[25];let _;return e[26]!==m||e[27]!==E||e[28]!==j||e[29]!==N?(_=i.jsx("div",{ref:m,className:j,style:N,children:E}),e[26]=m,e[27]=E,e[28]=j,e[29]=N,e[30]=_):_=e[30],_}function di(t){const e=T.c(20),{tile:s,onResize:r,onRemove:n}=t,[a,o]=A.useState(!1);let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=i.jsx(cs,{asChild:!0,children:i.jsx("button",{type:"button",className:"flex size-8 items-center justify-center rounded-md bg-background/90 border border-border text-muted-foreground hover:text-foreground hover:bg-muted","aria-label":"Tile options",children:i.jsx(St,{size:16})})}),e[0]=d):d=e[0];let l;e[1]!==r||e[2]!==s.id?(l=x=>{r(s.id,x),o(!1)},e[1]=r,e[2]=s.id,e[3]=l):l=e[3];let c;e[4]!==l||e[5]!==s?(c=i.jsx(mi,{tile:s,onPick:l}),e[4]=l,e[5]=s,e[6]=c):c=e[6];let m;e[7]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(ds,{}),e[7]=m):m=e[7];let u;e[8]!==n||e[9]!==s.id?(u=()=>n(s.id),e[8]=n,e[9]=s.id,e[10]=u):u=e[10];let f;e[11]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx(hs,{size:14,className:"mr-2"}),e[11]=f):f=e[11];let p;e[12]!==u?(p=i.jsxs(ms,{onSelect:u,className:"text-destructive focus:text-destructive",children:[f,"Remove tile"]}),e[12]=u,e[13]=p):p=e[13];let g;e[14]!==c||e[15]!==p?(g=i.jsxs(us,{align:"end",className:"w-auto",children:[c,m,p]}),e[14]=c,e[15]=p,e[16]=g):g=e[16];let h;return e[17]!==a||e[18]!==g?(h=i.jsxs(fs,{open:a,onOpenChange:o,children:[d,g]}),e[17]=a,e[18]=g,e[19]=h):h=e[19],h}function mi(t){const e=T.c(19),{tile:s,onPick:r}=t,n=s.minW??1,a=s.minH??1,[o,d]=A.useState(null);let l;e[0]!==o||e[1]!==s.h||e[2]!==s.w?(l=o??{w:s.w,h:s.h},e[0]=o,e[1]=s.h,e[2]=s.w,e[3]=l):l=e[3];const c=l;let m;e[4]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx("span",{className:"text-xs text-muted-foreground",children:"Size"}),e[4]=m):m=e[4];let u;e[5]!==c.h||e[6]!==c.w?(u=i.jsxs("div",{className:"mb-2 flex items-center justify-between gap-4",children:[m,i.jsxs("span",{className:"text-xs font-medium tabular-nums",children:[c.w," × ",c.h]})]}),e[5]=c.h,e[6]=c.w,e[7]=u):u=e[7];let f,p;e[8]===Symbol.for("react.memo_cache_sentinel")?(f={gridTemplateColumns:`repeat(${K}, 1.25rem)`},p=()=>d(null),e[8]=f,e[9]=p):(f=e[8],p=e[9]);let g;e[10]!==c.h||e[11]!==c.w||e[12]!==a||e[13]!==n||e[14]!==r?(g=i.jsx("div",{className:"grid w-max gap-1",style:f,onPointerLeave:p,children:Array.from({length:ii},(x,b)=>Array.from({length:K},(v,w)=>{const y=w+1,j=b+1,N=y<n||j<a,S=y<=c.w&&j<=c.h;return i.jsx("button",{type:"button",disabled:N,"aria-label":`${y} by ${j}`,onPointerEnter:()=>d({w:y,h:j}),onClick:()=>r({w:y,h:j}),className:q("size-5 rounded-sm border transition-colors",S?"border-primary bg-primary/30":"border-border bg-muted",N?"cursor-not-allowed opacity-40":"cursor-pointer hover:border-primary/60")},`${y}x${j}`)}))}),e[10]=c.h,e[11]=c.w,e[12]=a,e[13]=n,e[14]=r,e[15]=g):g=e[15];let h;return e[16]!==u||e[17]!==g?(h=i.jsxs("div",{className:"px-2 py-1.5",children:[u,g]}),e[16]=u,e[17]=g,e[18]=h):h=e[18],h}function ui(t,e,s){return t.some(r=>e>=r.x&&e<r.x+r.w&&s>=r.y&&s<r.y+r.h)}function fe(t,e,s){for(let r=0;r<100;r++)for(let n=0;n<=K-e;n++){let a=!0;for(let o=0;o<s&&a;o++)for(let d=0;d<e&&a;d++)ui(t,n+d,r+o)&&(a=!1);if(a)return{x:n,y:r}}return{x:0,y:0}}function ae(t,e,s={w:1,h:1}){const r=Math.max(s.w,Math.min(K,t)),n=Math.max(s.h,Math.min(6,e));return{w:r,h:n}}function ce(t,e,s){const r=Math.max(0,Math.min(K-s,t)),n=Math.max(0,e);return{x:r,y:n}}function fi(t,e,s){const r=t.find(l=>l.id===e);if(!r)return t;const n=t.filter(l=>l.id!==e),a=n.find(l=>s.x>=l.x&&s.x<l.x+l.w&&s.y>=l.y&&s.y<l.y+l.h);if(a&&a.w===r.w&&a.h===r.h)return t.map(l=>l.id===e?{...l,x:a.x,y:a.y}:l.id===a.id?{...l,x:r.x,y:r.y}:l);const d=[{...r,x:s.x,y:s.y}];for(const l of n){const c=fe(d,l.w,l.h);d.push({...l,x:c.x,y:c.y})}return d}function hi(t){const e=T.c(35),{layout:s,isLayoutLoading:r,commitLayout:n}=Ze();let a;e[0]!==s.hidden?(a=new Set(s.hidden),e[0]=s.hidden,e[1]=a):a=e[1];const o=a;let d,l;if(e[2]!==t||e[3]!==o||e[4]!==s.tiles){l=[];let v;e[7]!==o?(v=y=>y.pinned||!o.has(y.id),e[7]=o,e[8]=v):v=e[8];const w=t.filter(v);d=new Map;for(const y of t)y.minSize&&d.set(y.id,y.minSize);for(const y of w){const j=s.tiles[y.id];if(!j)continue;const N=d.get(y.id),{w:S,h:k}=ae(j.w,j.h,N),{x:C,y:I}=ce(j.x,j.y,S);l.push({id:y.id,x:C,y:I,w:S,h:k,minW:N?.w,minH:N?.h})}for(const y of w){if(l.some(I=>I.id===y.id))continue;const j=y.defaultSize??ni,N=d.get(y.id),{w:S,h:k}=ae(j.w,j.h,N),C=fe(l,S,k);l.push({id:y.id,x:C.x,y:C.y,w:S,h:k,minW:N?.w,minH:N?.h})}e[2]=t,e[3]=o,e[4]=s.tiles,e[5]=d,e[6]=l}else d=e[5],l=e[6];let c;e[9]!==t?(c=new Set(t.map(pi)),e[9]=t,e[10]=c):c=e[10];const m=c;let u;e[11]!==m||e[12]!==n?(u=(v,w)=>{const y={};for(const j of v)y[j.id]={x:j.x,y:j.y,w:j.w,h:j.h};n({version:X,tiles:y,hidden:w.filter(j=>m.has(j))})},e[11]=m,e[12]=n,e[13]=u):u=e[13];const f=u;let p;e[14]!==l?(p={visible:l},e[14]=l,e[15]=p):p=e[15];let g;e[16]!==f||e[17]!==s||e[18]!==l?(g=(v,w)=>{const y=l.find(S=>S.id===v);if(!y)return;const j=ce(w.x,w.y,y.w);if(j.x===y.x&&j.y===y.y)return;const N=fi(l,v,j);f(N,s.hidden)},e[16]=f,e[17]=s,e[18]=l,e[19]=g):g=e[19];let h;e[20]!==f||e[21]!==s||e[22]!==d||e[23]!==l?(h=(v,w)=>{const y=l.find(E=>E.id===v);if(!y)return;const j=d.get(v),{w:N,h:S}=ae(w.w,w.h,j);if(N===y.w&&S===y.h)return;const k={...y,w:N,h:S,x:ce(y.x,y.y,N).x},C=l.filter(E=>E.id!==v),I=[k];for(const E of C){const _=fe(I,E.w,E.h);I.push({...E,x:_.x,y:_.y})}f(I,s.hidden)},e[20]=f,e[21]=s,e[22]=d,e[23]=l,e[24]=h):h=e[24];let x;e[25]!==f||e[26]!==s||e[27]!==l?(x=v=>{const w=l.filter(y=>y.id!==v);f(w,Array.from(new Set([...s.hidden,v])))},e[25]=f,e[26]=s,e[27]=l,e[28]=x):x=e[28];let b;return e[29]!==r||e[30]!==p||e[31]!==g||e[32]!==h||e[33]!==x?(b={snapshot:p,isLoading:r,moveTile:g,resizeTile:h,hideTile:x},e[29]=r,e[30]=p,e[31]=g,e[32]=h,e[33]=x,e[34]=b):b=e[34],b}function pi(t){return t.id}const xi={w:2,h:4},gi={w:1,h:2},bi={w:1,h:1};function yi(t){return`prompt:${t.agentId}:${t.promptName||"blank"}`}function vi(t){return`tile:${t.agentId}:${t.resourceUri}`}function ji(t){return t.promptName?t.agentName:t.description}function wi(t){return{name:t.promptName,title:t.title,description:t.description,arguments:t.arguments,_meta:t._meta}}function ye(t){const e=T.c(10);let s;e[0]!==t?(s={agentId:t},e[0]=t,e[1]=s):s=e[1];const{start:r,startBlank:n,dialog:a,starting:o}=si(s);let d;e[2]!==r||e[3]!==n?(d=m=>{if(!m.promptName){n();return}r(wi(m))},e[2]=r,e[3]=n,e[4]=d):d=e[4];const l=d;let c;return e[5]!==a||e[6]!==l||e[7]!==n||e[8]!==o?(c={open:l,startBlank:n,dialog:a,starting:o},e[5]=a,e[6]=l,e[7]=n,e[8]=o,e[9]=c):c=e[9],c}function Ni(t){const e=T.c(32),{entry:s,isEditMode:r}=t,{open:n,dialog:a,starting:o}=ye(s.agentId);let d;e[0]!==s||e[1]!==n?(d=()=>n(s),e[0]=s,e[1]=n,e[2]=d):d=e[2];const l=o||r,c=!r&&"cursor-pointer transition-colors hover:bg-accent/40",m=r&&"cursor-default pl-12",u=o&&"opacity-60";let f;e[3]!==c||e[4]!==m||e[5]!==u?(f=q("group/tile relative flex h-full w-full items-center gap-3 px-4 py-3 text-left bg-card",c,m,u),e[3]=c,e[4]=m,e[5]=u,e[6]=f):f=e[6];let p;e[7]!==s.agentIcon||e[8]!==s.agentName?(p=i.jsx(Y,{icon:s.agentIcon,name:s.agentName,size:"sm+"}),e[7]=s.agentIcon,e[8]=s.agentName,e[9]=p):p=e[9];let g;e[10]!==s.title?(g=i.jsx("div",{className:"line-clamp-2 text-sm font-medium text-foreground leading-snug",children:s.title}),e[10]=s.title,e[11]=g):g=e[11];let h;e[12]!==s?(h=ji(s),e[12]=s,e[13]=h):h=e[13];let x;e[14]!==h?(x=i.jsx("div",{className:"truncate text-xs text-muted-foreground mt-0.5",children:h}),e[14]=h,e[15]=x):x=e[15];let b;e[16]!==x||e[17]!==g?(b=i.jsxs("div",{className:"min-w-0 flex-1",children:[g,x]}),e[16]=x,e[17]=g,e[18]=b):b=e[18];let v;e[19]!==r?(v=!r&&i.jsx(rs,{size:16,className:"shrink-0 text-muted-foreground opacity-0 -translate-x-1 transition-all duration-200 group-hover/tile:opacity-100 group-hover/tile:translate-x-0","aria-hidden":!0}),e[19]=r,e[20]=v):v=e[20];let w;e[21]!==o||e[22]!==d||e[23]!==b||e[24]!==v||e[25]!==l||e[26]!==f||e[27]!==p?(w=i.jsxs("button",{type:"button",onClick:d,disabled:l,"aria-busy":o,className:f,children:[p,b,v]}),e[21]=o,e[22]=d,e[23]=b,e[24]=v,e[25]=l,e[26]=f,e[27]=p,e[28]=w):w=e[28];let y;return e[29]!==a||e[30]!==w?(y=i.jsxs(i.Fragment,{children:[w,a]}),e[29]=a,e[30]=w,e[31]=y):y=e[31],y}function Si(){const t=T.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("div",{className:"mt-4 grid w-full grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3",children:Array.from({length:3},_i)}),t[0]=e):e=t[0],e}function _i(t,e){return i.jsxs("div",{className:"flex w-full items-center gap-3 rounded-2xl bg-card card-shadow px-3 py-2.5",children:[i.jsx(H,{className:"size-10 rounded-xl"}),i.jsxs("div",{className:"flex-1 space-y-1.5",children:[i.jsx(H,{className:"h-3 w-2/3"}),i.jsx(H,{className:"h-2.5 w-1/3"})]})]},`chip-skeleton-${e}`)}function Ci(t){const e=T.c(49),{tile:s,prompts:r,isEditMode:n,tileWidth:a}=t,{org:o}=Z(),{open:d,startBlank:l,dialog:c,starting:m}=ye(s.agentId);let u,f,p,g,h;if(e[0]!==n||e[1]!==d||e[2]!==o.id||e[3]!==o.slug||e[4]!==r||e[5]!==l||e[6]!==m||e[7]!==s||e[8]!==a){const v=r.filter(ki);g="flex h-full w-full flex-col gap-3 p-3";let w;e[14]!==l?(w=()=>{l()},e[14]=l,e[15]=w):w=e[15];const y=m||n,j=n&&"pl-10 pr-10";let N;e[16]!==j?(N=q("flex items-center gap-3 rounded-lg text-left outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-progress disabled:opacity-60",j),e[16]=j,e[17]=N):N=e[17];let S;e[18]!==s.agentIcon||e[19]!==s.agentName?(S=i.jsx(Y,{icon:s.agentIcon,name:s.agentName,size:"sm+"}),e[18]=s.agentIcon,e[19]=s.agentName,e[20]=S):S=e[20];let k;e[21]!==s.agentName?(k=i.jsx("div",{className:"truncate text-sm font-medium text-foreground",children:s.agentName}),e[21]=s.agentName,e[22]=k):k=e[22];const C=n?"Drag to rearrange":"Open chat";let I;e[23]!==C?(I=i.jsx("div",{className:"truncate text-xs text-muted-foreground",children:C}),e[23]=C,e[24]=I):I=e[24];let E;e[25]!==k||e[26]!==I?(E=i.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[k,I]}),e[25]=k,e[26]=I,e[27]=E):E=e[27],e[28]!==m||e[29]!==S||e[30]!==E||e[31]!==w||e[32]!==y||e[33]!==N?(h=i.jsxs("button",{type:"button",onClick:w,disabled:y,"aria-busy":m,className:N,children:[S,E]}),e[28]=m,e[29]=S,e[30]=E,e[31]=w,e[32]=y,e[33]=N,e[34]=h):h=e[34],u="flex min-h-0 flex-1 gap-3 overflow-hidden";let _;e[35]===Symbol.for("react.memo_cache_sentinel")?(_=i.jsx(Ii,{}),e[35]=_):_=e[35],e[36]!==o.id||e[37]!==o.slug||e[38]!==s?(f=i.jsx("div",{className:"min-h-0 flex-1 overflow-hidden rounded-lg border border-border",children:i.jsx(A.Suspense,{fallback:_,children:i.jsx(Ei,{tile:s,orgId:o.id,orgSlug:o.slug})})}),e[36]=o.id,e[37]=o.slug,e[38]=s,e[39]=f):f=e[39],p=v.length>0&&!n&&a>=2&&i.jsx("div",{className:"flex w-44 shrink-0 flex-col gap-2 overflow-hidden",children:v.map($=>i.jsx("button",{type:"button",onClick:()=>d($),disabled:m,className:"shrink-0 rounded-lg border border-border bg-background px-2.5 py-2 text-left text-xs leading-snug text-foreground transition-colors hover:bg-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-progress disabled:opacity-60",children:i.jsx("span",{className:"line-clamp-2",children:$.title})},$.promptName))}),e[0]=n,e[1]=d,e[2]=o.id,e[3]=o.slug,e[4]=r,e[5]=l,e[6]=m,e[7]=s,e[8]=a,e[9]=u,e[10]=f,e[11]=p,e[12]=g,e[13]=h}else u=e[9],f=e[10],p=e[11],g=e[12],h=e[13];let x;e[40]!==u||e[41]!==f||e[42]!==p?(x=i.jsxs("div",{className:u,children:[f,p]}),e[40]=u,e[41]=f,e[42]=p,e[43]=x):x=e[43];let b;return e[44]!==c||e[45]!==g||e[46]!==h||e[47]!==x?(b=i.jsxs("div",{className:g,children:[h,x,c]}),e[44]=c,e[45]=g,e[46]=h,e[47]=x,e[48]=b):b=e[48],b}function ki(t){return!!t.promptName}function Ei(t){const e=T.c(12),{tile:s,orgId:r,orgSlug:n}=t;let a;e[0]!==r||e[1]!==n||e[2]!==s.connectionId?(a={connectionId:s.connectionId,orgId:r,orgSlug:n},e[0]=r,e[1]=n,e[2]=s.connectionId,e[3]=a):a=e[3];const o=ee(a),d=s.minHeight??200,l=s.maxHeight??4e3;let c;return e[4]!==o||e[5]!==r||e[6]!==n||e[7]!==d||e[8]!==l||e[9]!==s.connectionId||e[10]!==s.resourceUri?(c=i.jsx(Xt,{resourceURI:s.resourceUri,orgId:r,orgSlug:n,connectionId:s.connectionId,client:o,displayMode:"fullscreen",minHeight:d,maxHeight:l,className:"h-full"}),e[4]=o,e[5]=r,e[6]=n,e[7]=d,e[8]=l,e[9]=s.connectionId,e[10]=s.resourceUri,e[11]=c):c=e[11],c}function Ii(){const t=T.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsxs("div",{className:"flex h-full w-full flex-col gap-2 p-4",children:[i.jsx(H,{className:"h-3 w-2/3"}),i.jsx(H,{className:"h-3 w-1/2"}),i.jsx(H,{className:"mt-1 h-full w-full rounded-md"})]}),t[0]=e):e=t[0],e}function $i(t){const e=T.c(14),{icon:s,name:r}=t;let n;e[0]!==s||e[1]!==r?(n=i.jsx(Y,{icon:s,name:r,size:"sm+"}),e[0]=s,e[1]=r,e[2]=n):n=e[2];let a;e[3]!==r?(a=i.jsx("div",{className:"truncate text-sm font-medium text-foreground",children:r}),e[3]=r,e[4]=a):a=e[4];let o;e[5]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx("div",{className:"truncate text-xs text-muted-foreground",children:"Loading tile…"}),e[5]=o):o=e[5];let d;e[6]!==a?(d=i.jsxs("div",{className:"min-w-0 flex-1",children:[a,o]}),e[6]=a,e[7]=d):d=e[7];let l;e[8]!==n||e[9]!==d?(l=i.jsxs("div",{className:"flex items-center gap-2.5",children:[n,d]}),e[8]=n,e[9]=d,e[10]=l):l=e[10];let c;e[11]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsxs("div",{className:"flex flex-1 flex-col gap-2 pt-1",children:[i.jsx(H,{className:"h-3 w-3/4"}),i.jsx(H,{className:"h-3 w-1/2"}),i.jsx(H,{className:"h-3 w-2/3"})]}),e[11]=c):c=e[11];let m;return e[12]!==l?(m=i.jsxs("div",{className:"flex h-full w-full flex-col gap-3 p-5 opacity-60",children:[l,c]}),e[12]=l,e[13]=m):m=e[13],m}function Ti(t){const e=T.c(33),{tile:s,prompts:r,isEditMode:n}=t,{open:a,startBlank:o,dialog:d,starting:l}=ye(s.agentId);let c,m,u;if(e[0]!==n||e[1]!==a||e[2]!==r||e[3]!==o||e[4]!==l||e[5]!==s.agentIcon||e[6]!==s.agentName){const p=r.filter(Ai);c="flex h-full w-full flex-col gap-3 p-4";let g;e[10]!==o?(g=()=>{o()},e[10]=o,e[11]=g):g=e[11];const h=l||n,x=n&&"pl-10 pr-10";let b;e[12]!==x?(b=q("flex items-center gap-3 rounded-lg text-left outline-none focus-visible:ring-2 focus-visible:ring-ring",x),e[12]=x,e[13]=b):b=e[13];let v;e[14]!==s.agentIcon||e[15]!==s.agentName?(v=i.jsx(Y,{icon:s.agentIcon,name:s.agentName,size:"sm+"}),e[14]=s.agentIcon,e[15]=s.agentName,e[16]=v):v=e[16];let w;e[17]!==s.agentName?(w=i.jsx("div",{className:"truncate text-sm font-medium text-foreground",children:s.agentName}),e[17]=s.agentName,e[18]=w):w=e[18];let y;e[19]===Symbol.for("react.memo_cache_sentinel")?(y=i.jsx("div",{className:"truncate text-xs text-muted-foreground",children:"UI unavailable — open chat"}),e[19]=y):y=e[19];let j;e[20]!==w?(j=i.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[w,y]}),e[20]=w,e[21]=j):j=e[21],e[22]!==j||e[23]!==g||e[24]!==h||e[25]!==b||e[26]!==v?(m=i.jsxs("button",{type:"button",onClick:g,disabled:h,className:b,children:[v,j]}),e[22]=j,e[23]=g,e[24]=h,e[25]=b,e[26]=v,e[27]=m):m=e[27],u=p.length>0&&!n&&i.jsx("div",{className:"grid grid-cols-1 gap-2 overflow-hidden sm:grid-cols-2",children:p.map(N=>i.jsx("button",{type:"button",onClick:()=>!n&&a(N),disabled:l,className:"rounded-lg border border-border bg-background px-2.5 py-2 text-left text-xs leading-snug text-foreground transition-colors hover:bg-accent/40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:cursor-progress disabled:opacity-60",children:i.jsx("span",{className:"line-clamp-2",children:N.title})},N.promptName))}),e[0]=n,e[1]=a,e[2]=r,e[3]=o,e[4]=l,e[5]=s.agentIcon,e[6]=s.agentName,e[7]=c,e[8]=m,e[9]=u}else c=e[7],m=e[8],u=e[9];let f;return e[28]!==d||e[29]!==c||e[30]!==m||e[31]!==u?(f=i.jsxs("div",{className:c,children:[m,u,d]}),e[28]=d,e[29]=c,e[30]=m,e[31]=u,e[32]=f):f=e[32],f}function Ai(t){return!!t.promptName}function Je(t){const e=T.c(36),{isEditMode:s}=t,{org:r}=Z(),{isLoading:n,prompts:a,tiles:o}=be(r.slug),d=Pe()?.ids??[];let l;e[0]!==d?(l=new Set(d),e[0]=d,e[1]=l):l=e[1];const c=l,m=De();let u;e[2]!==o?(u=new Set(o.map(Pi)),e[2]=o,e[3]=u):u=e[3];const f=u;let p;if(e[4]!==a){p=new Map;for(const _ of a){const $=p.get(_.agentId);$?$.push(_):p.set(_.agentId,[_])}e[4]=a,e[5]=p}else p=e[5];let g;if(e[6]!==a||e[7]!==f||e[8]!==o){let _;e[10]!==f?(_=O=>!f.has(O.agentId),e[10]=f,e[11]=_):_=e[11];const $=a.filter(_);g=[...o.map(zi),...$.map(Ri)],e[6]=a,e[7]=f,e[8]=o,e[9]=g}else g=e[9];const h=g;let x;e[12]!==h?(x=new Map(h.map(Oi)),e[12]=h,e[13]=x):x=e[13];const b=x;let v;e[14]!==h||e[15]!==c?(v=h.map(_=>({id:_.id,defaultSize:_.kind==="tile"?xi:bi,minSize:_.kind==="tile"?gi:void 0,pinned:c.has(_.data.agentId)})),e[14]=h,e[15]=c,e[16]=v):v=e[16];const w=hi(v);let y;e[17]!==m?(y=_=>{m.apply($=>$.filter(O=>O!==_)).catch(Mi)},e[17]=m,e[18]=y):y=e[18];const j=y;let N;e[19]!==b||e[20]!==w||e[21]!==c||e[22]!==j?(N=_=>{const $=b.get(_);$&&c.has($.data.agentId)?j($.data.agentId):w.hideTile(_)},e[19]=b,e[20]=w,e[21]=c,e[22]=j,e[23]=N):N=e[23];const S=N;let k;e[24]!==b||e[25]!==s||e[26]!==p?(k=_=>{const $=b.get(_.id);if(!$)return null;if($.kind==="tile"){const O=p.get($.data.agentId)??[];return i.jsx(ft,{fallback:i.jsx(Ti,{tile:$.data,prompts:O,isEditMode:s}),children:i.jsx(A.Suspense,{fallback:i.jsx($i,{icon:$.data.agentIcon,name:$.data.agentName}),children:i.jsx(Ci,{tile:$.data,prompts:O,isEditMode:s,tileWidth:_.w})})})}return i.jsx(Ni,{entry:$.data,isEditMode:s})},e[24]=b,e[25]=s,e[26]=p,e[27]=k):k=e[27];const C=k;if(n||w.isLoading){let _;return e[28]===Symbol.for("react.memo_cache_sentinel")?(_=i.jsx(Si,{}),e[28]=_):_=e[28],_}if(w.snapshot.visible.length===0&&!s)return null;let E;return e[29]!==s||e[30]!==w.moveTile||e[31]!==w.resizeTile||e[32]!==w.snapshot.visible||e[33]!==S||e[34]!==C?(E=i.jsx("div",{className:"mt-4 flex w-full max-w-7xl flex-col gap-4",children:i.jsx(ri,{tiles:w.snapshot.visible,isEditMode:s,renderTile:C,onMove:w.moveTile,onResize:w.resizeTile,onRemove:S})}),e[29]=s,e[30]=w.moveTile,e[31]=w.resizeTile,e[32]=w.snapshot.visible,e[33]=S,e[34]=C,e[35]=E):E=e[35],E}function Mi(){return W.error("Couldn't remove from home — please try again.")}function Oi(t){return[t.id,t]}function Ri(t){return{kind:"prompt",id:yi(t),data:t}}function zi(t){return{kind:"tile",id:vi(t),data:t}}function Pi(t){return t.agentId}function Di(t){const e=T.c(2),{prompts:s,tiles:r}=be(t),n=r.length>0||s.length>0;let a;return e[0]!==n?(a={hasVisibleTiles:n},e[0]=n,e[1]=a):a=e[1],a}const Ce=420,ke=305;function Xe(){const t=T.c(4);let e;t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("img",{src:"/home/bg-top-left.svg",alt:"",className:"absolute top-0 left-0 h-auto select-none opacity-80 dark:hidden",style:{width:Ce}}),t[0]=e):e=t[0];let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx("img",{src:"/home/bg-top-left-dark.svg",alt:"",className:"absolute top-0 left-0 hidden h-auto select-none opacity-80 dark:block",style:{width:Ce}}),t[1]=s):s=t[1];let r;t[2]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("img",{src:"/home/bg-bottom-right.svg",alt:"",className:"absolute bottom-0 right-0 h-auto select-none opacity-80 dark:hidden",style:{width:ke}}),t[2]=r):r=t[2];let n;return t[3]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsxs("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 overflow-hidden",children:[e,s,r,i.jsx("img",{src:"/home/bg-bottom-right-dark.svg",alt:"",className:"absolute bottom-0 right-0 hidden h-auto select-none opacity-80 dark:block",style:{width:ke}})]}),t[3]=n):n=t[3],n}function Ee(){const t=T.c(33),{data:e}=ht.useSession(),{org:s}=Z(),r=xe(),n=It(),{selectedVirtualMcp:a}=$t();let o;t[0]!==s.id?(o=xt(s.id),t[0]=s.id,t[1]=o):o=t[1];const l=a??o;let c;t[2]!==s.slug?(c=Ft(s.slug),t[2]=s.slug,t[3]=c):c=t[3],oe(c);let m;t[4]!==s.id||t[5]!==s.slug?(m={connectionId:Te,orgId:s.id,orgSlug:s.slug},t[4]=s.id,t[5]=s.slug,t[6]=m):m=t[6];const u=ee(m);let f;t[7]!==s.id||t[8]!==u?(f=ps(u,s.id),t[7]=s.id,t[8]=u,t[9]=f):f=t[9];let p;t[10]!==s.id||t[11]!==u?(p=Ut(u,s.id),t[10]=s.id,t[11]=u,t[12]=p):p=t[12];let g;t[13]!==l.id||t[14]!==s.id||t[15]!==u?(g=yt(s.id,l.id,u),t[13]=l.id,t[14]=s.id,t[15]=u,t[16]=g):g=t[16];let h;t[17]!==f||t[18]!==p||t[19]!==g?(h={queries:[f,p,g]},t[17]=f,t[18]=p,t[19]=g,t[20]=h):h=t[20],js(h);const x=xs(),b=vt(l.id),{hasDecoKey:v,isZeroBalance:w,isInitialFreeCredit:y,balanceDollars:j,hasOnlyDecoProvider:N}=Ct(),{hasVisibleTiles:S}=Di(s.slug),k=kt(b?.metadata);if(x.length===0&&!(k&&Et(n))){let P;return t[21]===Symbol.for("react.memo_cache_sentinel")?(P=i.jsx("div",{className:"flex-1 overflow-y-auto",children:i.jsx("div",{className:"min-h-full flex items-center justify-center px-4 py-10",children:i.jsx(Tt,{})})}),t[21]=P):P=t[21],P}let I;t[22]!==e?.user?.name?(I=e?.user?.name?.split(" ")[0]||"there",t[22]=e?.user?.name,t[23]=I):I=t[23];const E=I,_=v&&y&&j!=null,$=v&&w&&N;let O;t[24]!==j||t[25]!==_||t[26]!==$?(O=_?i.jsx(ie.CreditsEyebrow,{balanceDollars:j}):$?i.jsx(ie.NoCreditsEyebrow,{}):null,t[24]=j,t[25]=_,t[26]=$,t[27]=O):O=t[27];const B=O;let z;return t[28]!==B||t[29]!==S||t[30]!==r||t[31]!==E?(z=i.jsx(ti,{children:r?i.jsx(Hi,{eyebrow:B,userName:E}):i.jsx(Li,{eyebrow:B,userName:E,hasVisibleTiles:S})}),t[28]=B,t[29]=S,t[30]=r,t[31]=E,t[32]=z):z=t[32],z}function Hi(t){const e=T.c(12),{eyebrow:s,userName:r}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx(Xe,{}),e[0]=n):n=e[0];let a;e[1]!==s?(a=s&&i.jsx("div",{className:"mb-4",children:s}),e[1]=s,e[2]=a):a=e[2];let o;e[3]!==r?(o=i.jsxs("p",{className:"text-3xl font-medium text-foreground text-center max-w-[280px]",children:["What's on your mind, ",r,"?"]}),e[3]=r,e[4]=o):o=e[4];let d;e[5]!==a||e[6]!==o?(d=i.jsxs("div",{className:"relative flex flex-col items-center justify-center w-full pt-28 pb-8 px-4",children:[a,o]}),e[5]=a,e[6]=o,e[7]=d):d=e[7];let l;e[8]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx("div",{className:"relative w-full flex flex-col gap-4 pb-8 px-4",children:i.jsx(ie.Input,{showConnectionsBanner:!0})}),e[8]=l):l=e[8];let c;e[9]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx("div",{className:"relative w-full px-4 pb-8",children:i.jsx(Je,{isEditMode:!1})}),e[9]=c):c=e[9];let m;return e[10]!==d?(m=i.jsxs("div",{className:"flex-1 relative flex flex-col items-center overflow-y-auto",children:[n,d,l,c]}),e[10]=d,e[11]=m):m=e[11],m}function Li(t){const e=T.c(32),{eyebrow:s,userName:r,hasVisibleTiles:n}=t,{isEditMode:a,enter:o,save:d,cancel:l,hasChanges:c}=Ze(),[m,u]=A.useState(!1);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=()=>u(!0),e[0]=f):f=e[0];let p;e[1]!==l||e[2]!==o||e[3]!==c||e[4]!==a||e[5]!==d?(p=i.jsx(gs.Right,{children:i.jsx(Ui,{isEditMode:a,hasChanges:c,onEnter:o,onSave:d,onCancel:l,onAddTile:f})}),e[1]=l,e[2]=o,e[3]=c,e[4]=a,e[5]=d,e[6]=p):p=e[6];let g;e[7]!==m?(g=i.jsx(ws,{open:m,onOpenChange:u}),e[7]=m,e[8]=g):g=e[8];let h;e[9]===Symbol.for("react.memo_cache_sentinel")?(h=i.jsx(Xe,{}),e[9]=h):h=e[9];const x=n||a?"pt-32":"flex-1 justify-center";let b;e[10]!==x?(b=q("relative flex flex-col items-center px-10 pb-4",x),e[10]=x,e[11]=b):b=e[11];let v;e[12]!==s?(v=s&&i.jsx("div",{className:"mb-4",children:s}),e[12]=s,e[13]=v):v=e[13];let w;e[14]!==r?(w=i.jsxs("p",{className:"text-3xl font-medium text-foreground",children:["What's on your mind, ",r,"?"]}),e[14]=r,e[15]=w):w=e[15];let y;e[16]!==v||e[17]!==w?(y=i.jsxs("div",{className:"text-center mb-10",children:[v,w]}),e[16]=v,e[17]=w,e[18]=y):y=e[18];let j;e[19]===Symbol.for("react.memo_cache_sentinel")?(j=i.jsxs("div",{className:"relative w-full",children:[i.jsx(Bi,{}),i.jsx(ie.Input,{showConnectionsBanner:!0})]}),e[19]=j):j=e[19];let N;e[20]!==y?(N=i.jsxs("div",{className:"flex flex-col items-center w-full max-w-[672px]",children:[y,j]}),e[20]=y,e[21]=N):N=e[21];let S;e[22]!==a?(S=i.jsx("div",{className:"relative w-full mt-10 mx-auto max-w-[1280px] px-2 pb-16",children:i.jsx(Je,{isEditMode:a})}),e[22]=a,e[23]=S):S=e[23];let k;e[24]!==N||e[25]!==S||e[26]!==b?(k=i.jsxs("div",{className:"flex-1 relative flex flex-col min-h-0",children:[h,i.jsx("div",{className:"flex-1 relative flex flex-col overflow-y-auto",children:i.jsxs("div",{className:b,children:[N,S]})})]}),e[24]=N,e[25]=S,e[26]=b,e[27]=k):k=e[27];let C;return e[28]!==k||e[29]!==p||e[30]!==g?(C=i.jsxs(i.Fragment,{children:[p,g,k]}),e[28]=k,e[29]=p,e[30]=g,e[31]=C):C=e[31],C}function Ui(t){const e=T.c(17),{isEditMode:s,hasChanges:r,onEnter:n,onSave:a,onCancel:o,onAddTile:d}=t;if(s){let m;e[0]===Symbol.for("react.memo_cache_sentinel")?(m=i.jsx(ge,{size:14}),e[0]=m):m=e[0];let u;e[1]!==d?(u=i.jsxs("button",{type:"button",onClick:d,className:"flex h-7 items-center gap-1.5 rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",title:"Add a tile from any agent",children:[m,"Add tile"]}),e[1]=d,e[2]=u):u=e[2];let f;e[3]===Symbol.for("react.memo_cache_sentinel")?(f=i.jsx(Ae,{size:14}),e[3]=f):f=e[3];let p;e[4]!==o?(p=i.jsxs(je,{size:"sm",variant:"ghost",onClick:o,className:"gap-1.5 h-7 text-xs",children:[f,"Cancel"]}),e[4]=o,e[5]=p):p=e[5];const g=!r;let h;e[6]===Symbol.for("react.memo_cache_sentinel")?(h=i.jsx(jt,{size:14}),e[6]=h):h=e[6];let x;e[7]!==a||e[8]!==g?(x=i.jsxs(je,{size:"sm",onClick:a,disabled:g,className:"gap-1.5 h-7 text-xs",children:[h,"Save"]}),e[7]=a,e[8]=g,e[9]=x):x=e[9];let b;return e[10]!==u||e[11]!==p||e[12]!==x?(b=i.jsxs(i.Fragment,{children:[u,p,x]}),e[10]=u,e[11]=p,e[12]=x,e[13]=b):b=e[13],b}let l;e[14]===Symbol.for("react.memo_cache_sentinel")?(l=i.jsx(_t,{size:14}),e[14]=l):l=e[14];let c;return e[15]!==n?(c=i.jsxs("button",{type:"button",onClick:n,className:"flex h-7 items-center gap-1.5 rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 hover:bg-sidebar-accent hover:text-sidebar-foreground transition-colors",title:"Customize your home",children:[l,"Customize"]}),e[15]=n,e[16]=c):c=e[16],c}function Bi(){const t=T.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=i.jsx("img",{src:"/home/capybara.png",alt:"","aria-hidden":!0,className:"pointer-events-none absolute -top-16 right-6 z-20 h-20 w-auto select-none"}),t[0]=e):e=t[0],e}function Vr(){const t=T.c(2);if(xe()){let r;return t[0]===Symbol.for("react.memo_cache_sentinel")?(r=i.jsx("div",{className:"flex-1 min-h-0 flex flex-col bg-background overflow-hidden",children:i.jsx(Ee,{})}),t[0]=r):r=t[0],r}let s;return t[1]===Symbol.for("react.memo_cache_sentinel")?(s=i.jsx("div",{className:"flex-1 min-h-0 pb-1 pr-1 pl-0 pt-0",children:i.jsx("div",{className:"h-full p-0.5 pt-0.25",children:i.jsx("div",{className:"flex flex-col h-full bg-background overflow-hidden card-shadow rounded-[0.75rem]",children:i.jsx(Ee,{})})})}),t[1]=s):s=t[1],s}export{Vr as default};