decocms 3.74.0 → 3.74.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/dist/client/assets/{AlertCircle-Ccspj6_x.js → AlertCircle-CqOVaXci.js} +1 -1
  2. package/dist/client/assets/{ArrowRight-DjM-WAe8.js → ArrowRight-CTyWXakV.js} +1 -1
  3. package/dist/client/assets/{ArrowUpRight-tJm1fmd7.js → ArrowUpRight-xZqz95CV.js} +1 -1
  4. package/dist/client/assets/{Check-D3J8f8u-.js → Check-CBlc59JS.js} +1 -1
  5. package/dist/client/assets/{CheckCircle-2NPq-6dO.js → CheckCircle-CY28HM-W.js} +1 -1
  6. package/dist/client/assets/{ChevronDown-Dilz0yBl.js → ChevronDown-2DYEh3oE.js} +1 -1
  7. package/dist/client/assets/{ChevronLeft-CJ5DBM3M.js → ChevronLeft-B75Dfp8F.js} +1 -1
  8. package/dist/client/assets/{ChevronRight-KEtpzT4P.js → ChevronRight-ax97YKuz.js} +1 -1
  9. package/dist/client/assets/{ChevronUp-B5x1falF.js → ChevronUp-g-p4yrQF.js} +1 -1
  10. package/dist/client/assets/{DotsVertical-BM5d8Pc7.js → DotsVertical-DRQxhuxE.js} +1 -1
  11. package/dist/client/assets/{Eye-hHNCwVZ1.js → Eye-Bxan3Sqa.js} +1 -1
  12. package/dist/client/assets/{FilterLines-DfVdVEBp.js → FilterLines-DglSMqXL.js} +1 -1
  13. package/dist/client/assets/{Globe01-DD8UM4Hn.js → Globe01-C4v1tUFc.js} +1 -1
  14. package/dist/client/assets/{Globe04-CHjKQaGv.js → Globe04-uuqaZSXc.js} +1 -1
  15. package/dist/client/assets/{HardDrive-ClhqImrT.js → HardDrive-BNcT29uK.js} +1 -1
  16. package/dist/client/assets/{Key01-BYHEvjL0.js → Key01-dy7oLiQz.js} +1 -1
  17. package/dist/client/assets/{LayoutLeft-BNwcfVCc.js → LayoutLeft-C7Cwg5dB.js} +1 -1
  18. package/dist/client/assets/{LinkExternal01-BqsD3A6i.js → LinkExternal01-Bxjblrw6.js} +1 -1
  19. package/dist/client/assets/{Monitor01-BqllG5YD.js → Monitor01-gDDtOZYE.js} +1 -1
  20. package/dist/client/assets/{Palette-CdtyN2t7.js → Palette-CmP2nXkm.js} +1 -1
  21. package/dist/client/assets/{Play-DpX5JUyA.js → Play-DR1SFBmJ.js} +1 -1
  22. package/dist/client/assets/{Plus-BaLwS14l.js → Plus-41YUU3X4.js} +1 -1
  23. package/dist/client/assets/{SearchMd-CJ_dFCp5.js → SearchMd-kFyk-Zpn.js} +1 -1
  24. package/dist/client/assets/{Settings02-Cg6Yp6Ig.js → Settings02-BQvb6NDs.js} +1 -1
  25. package/dist/client/assets/{Shield01-DYwaNnY3.js → Shield01-CwXJTWO7.js} +1 -1
  26. package/dist/client/assets/{Star01-D42mJCl7.js → Star01-DmOmdDYT.js} +1 -1
  27. package/dist/client/assets/{Stars01-CrB442jN.js → Stars01-DY8Z1eLP.js} +1 -1
  28. package/dist/client/assets/{Stars02-C2akJW-A.js → Stars02-RZSAG7rn.js} +1 -1
  29. package/dist/client/assets/{Sun-CgYYfF85.js → Sun-DqCoPTzZ.js} +1 -1
  30. package/dist/client/assets/{SwitchHorizontal01-y3DhestF.js → SwitchHorizontal01-B6awNCuJ.js} +1 -1
  31. package/dist/client/assets/{Tool01-CI_6KMgQ.js → Tool01-YzuqPBZS.js} +1 -1
  32. package/dist/client/assets/{Trash01-Cd_0JhhN.js → Trash01-xhyzjxAl.js} +1 -1
  33. package/dist/client/assets/{Upload01-ijsbLMSK.js → Upload01-Dz2Fe5CV.js} +1 -1
  34. package/dist/client/assets/{User01-BI5RuTWy.js → User01-pnGUlp6P.js} +1 -1
  35. package/dist/client/assets/{Users01-LhAUtJ2l.js → Users01-D6UupxJE.js} +1 -1
  36. package/dist/client/assets/{Users03-CJf6bBEA.js → Users03-DJchxrNl.js} +1 -1
  37. package/dist/client/assets/{X-BmA2kYv-.js → X-RMAI-CnD.js} +1 -1
  38. package/dist/client/assets/{XCircle-CSVmVGl-.js → XCircle-C_zOOXjw.js} +1 -1
  39. package/dist/client/assets/{XClose-BGGuhSdx.js → XClose-CL72OyYw.js} +1 -1
  40. package/dist/client/assets/{Zap-C5OGTH44.js → Zap-T1H5BLPl.js} +1 -1
  41. package/dist/client/assets/{ZapSquare-Bh6-lHaM.js → ZapSquare-DI8RUlXz.js} +1 -1
  42. package/dist/client/assets/{ZoomOut-xDQo2yr7.js → ZoomOut-BSvbLjMK.js} +1 -1
  43. package/dist/client/assets/{access-gate-C-eMG1Ta.js → access-gate-DstBDFIb.js} +1 -1
  44. package/dist/client/assets/{add-section-modal-DNNafM9O.js → add-section-modal-DBrqHaz_.js} +1 -1
  45. package/dist/client/assets/{agent-icon-Bcqwo2Wq.js → agent-icon-DTdfxhoG.js} +1 -1
  46. package/dist/client/assets/{agents-list-obMS8uxZ.js → agents-list-D0eHoQaW.js} +1 -1
  47. package/dist/client/assets/{ai-providers-apfL_rjp.js → ai-providers-c7kYb7as.js} +1 -1
  48. package/dist/client/assets/{alert-dialog-BZRM5ze7.js → alert-dialog-DN5_Bt7m.js} +1 -1
  49. package/dist/client/assets/{alert-B1Ln6zZV.js → alert-waKnXqGk.js} +1 -1
  50. package/dist/client/assets/{app-editor-C0jI2dDZ.js → app-editor-CjIo2G2v.js} +1 -1
  51. package/dist/client/assets/{auth-rl3GT7t8.js → auth-D-vZuhvw.js} +1 -1
  52. package/dist/client/assets/{auth-catchall-s-1qzuNO.js → auth-catchall-CSqcjejU.js} +1 -1
  53. package/dist/client/assets/{auth-entry-CW5gsTiA.js → auth-entry-DQ7yt2AO.js} +1 -1
  54. package/dist/client/assets/{auth-split-layout-BC0lphRW.js → auth-split-layout-B5a3UwoJ.js} +1 -1
  55. package/dist/client/assets/{automation-list-row-DefMjeyu.js → automation-list-row-D-BX02uH.js} +1 -1
  56. package/dist/client/assets/{automation-runs-C-Da4MEd.js → automation-runs-B1BUJ0hr.js} +1 -1
  57. package/dist/client/assets/{automations-CbOSvhEe.js → automations-BNbMRDB2.js} +1 -1
  58. package/dist/client/assets/{avatar-CXZnLPEU.js → avatar-BSTZ3pLJ.js} +1 -1
  59. package/dist/client/assets/{badge-DSiiJMKS.js → badge-C-FrgWTB.js} +1 -1
  60. package/dist/client/assets/{block-document-DR_-i1iv.js → block-document-tkHTmk1o.js} +1 -1
  61. package/dist/client/assets/{brand-context-D385RFi4.js → brand-context-DTdKKUc_.js} +1 -1
  62. package/dist/client/assets/{buckets-CfLzGo42.js → buckets-Buf4MXLa.js} +1 -1
  63. package/dist/client/assets/{calendar-CdvLiXTi.js → calendar-0PXqzC_Y.js} +1 -1
  64. package/dist/client/assets/{capability-load-error-Cc0Imt5p.js → capability-load-error-aingpVqh.js} +1 -1
  65. package/dist/client/assets/{card-DSDTRgoU.js → card-DWaNR_SK.js} +1 -1
  66. package/dist/client/assets/category-editor-Dp8tqW7w.js +1 -0
  67. package/dist/client/assets/{chat-context-DnaexSAo.js → chat-context-Bdh5JOoc.js} +1 -1
  68. package/dist/client/assets/{checkbox-CL_5fiO_.js → checkbox-DATFo6mV.js} +1 -1
  69. package/dist/client/assets/{cli-auth-success-DV-qTae_.js → cli-auth-success-Q9j8LqnR.js} +1 -1
  70. package/dist/client/assets/{collection-detail-CtoW7iVa.js → collection-detail--PV4VgNS.js} +1 -1
  71. package/dist/client/assets/{collection-display-button-Boq8hl8Q.js → collection-display-button-D2Dz4UQ9.js} +1 -1
  72. package/dist/client/assets/{collection-search-2g11_WBH.js → collection-search-B3PCp0sJ.js} +1 -1
  73. package/dist/client/assets/{collection-tabs-CDMyDuFK.js → collection-tabs-B5bp1dvV.js} +1 -1
  74. package/dist/client/assets/{command-Bw_f0kDn.js → command-BKUAhUTA.js} +1 -1
  75. package/dist/client/assets/{commerce-onboarding-LL_9usA-.js → commerce-onboarding-DQThXa88.js} +1 -1
  76. package/dist/client/assets/{connect-desktop-dialog-Dybq2Hx1.js → connect-desktop-dialog-ueZU4yr9.js} +1 -1
  77. package/dist/client/assets/{connection-card-DA1t_KQo.js → connection-card-D6eF5jM2.js} +1 -1
  78. package/dist/client/assets/{connection-detail-C3h6Iqqu.js → connection-detail-YrkoweOb.js} +1 -1
  79. package/dist/client/assets/{connection-form-helpers-BqK6S8Yx.js → connection-form-helpers-yM5F39cE.js} +1 -1
  80. package/dist/client/assets/{connections-BdIG1myf.js → connections-Co0mzlVI.js} +1 -1
  81. package/dist/client/assets/{context-menu-KaWlIbj1.js → context-menu-rnym8CLu.js} +1 -1
  82. package/dist/client/assets/{decopilot-fUgUe2Eh.js → decopilot-CR1kdCz1.js} +1 -1
  83. package/dist/client/assets/{decopilot-sse-pool-Dl1x5tdf.js → decopilot-sse-pool-CznG8mAO.js} +1 -1
  84. package/dist/client/assets/{dialog-CQ6B0IwC.js → dialog-D5b28yFH.js} +1 -1
  85. package/dist/client/assets/{domain-settings-BvzKBAZm.js → domain-settings-0tGbevEe.js} +1 -1
  86. package/dist/client/assets/{drawer-mbT59SGx.js → drawer-ColE1TJK.js} +1 -1
  87. package/dist/client/assets/{dropdown-menu-bs6nmOyP.js → dropdown-menu-DYoIlQSg.js} +1 -1
  88. package/dist/client/assets/{empty-state-crYivviN.js → empty-state-DHarvDyS.js} +1 -1
  89. package/dist/client/assets/{extract-connection-data-D-Y4GRfE.js → extract-connection-data-uuFWP3hz.js} +1 -1
  90. package/dist/client/assets/{file-explorer-iYX8uF4-.js → file-explorer-B808VENL.js} +1 -1
  91. package/dist/client/assets/{file-type-icon-D0ASmNXK.js → file-type-icon-DEvi9B1o.js} +1 -1
  92. package/dist/client/assets/{files-ENTpyfhv.js → files-CWeUPbcm.js} +1 -1
  93. package/dist/client/assets/{form-O9DEtf_L.js → form-BKLsYVOj.js} +1 -1
  94. package/dist/client/assets/{general-BJWZpnpu.js → general-Drmz-YIR.js} +1 -1
  95. package/dist/client/assets/{github-repo-picker-CHTvfJAD.js → github-repo-picker-D5sPE9uB.js} +1 -1
  96. package/dist/client/assets/{hooks-CSfRJCjt.js → hooks-Bb_hjVv2.js} +1 -1
  97. package/dist/client/assets/{image-field-BdcHkDRx.js → image-field-1axHkRyS.js} +1 -1
  98. package/dist/client/assets/{import-from-deco-dialog-Bz8FE0_9.js → import-from-deco-dialog-C8-Pf8Mw.js} +1 -1
  99. package/dist/client/assets/{index-7a12TwCl.js → index-BJGyjJJt.js} +1 -1
  100. package/dist/client/assets/{index-B_6khNsr.js → index-BolisCRq.js} +1 -1
  101. package/dist/client/assets/{index-DHLJyA5u.js → index-CUKe_k5H.js} +1 -1
  102. package/dist/client/assets/{index-DvTimAjS.js → index-CXYNhsAc.js} +4 -4
  103. package/dist/client/assets/{index-B4I34F6K.js → index-CjzKLlWA.js} +1 -1
  104. package/dist/client/assets/{index-BRnQ22g3.js → index-D972QGLJ.js} +1 -1
  105. package/dist/client/assets/{index-D0U_smqt.js → index-D9IK491L.js} +3 -3
  106. package/dist/client/assets/{index-BFeGPSf0.js → index-DCgPZCHy.js} +1 -1
  107. package/dist/client/assets/{index-C9uGIJ2-.js → index-DTxciPdS.js} +1 -1
  108. package/dist/client/assets/{index-BsWl8UuV.js → index-DjKTb3Jx.js} +1 -1
  109. package/dist/client/assets/{index-BK1jVztm.js → index-Dmymcqqe.js} +1 -1
  110. package/dist/client/assets/{index-BPuJ390n.js → index-DuzF9uKh.js} +1 -1
  111. package/dist/client/assets/{index-CGoh8mx2.js → index-dhnE5w8d.js} +1 -1
  112. package/dist/client/assets/{index-D_UY8Zf9.js → index-nU2ktNYZ.js} +1 -1
  113. package/dist/client/assets/{index-redirect-CPy0Z1T_.js → index-redirect-CbKHrvpG.js} +1 -1
  114. package/dist/client/assets/{input-Ccm3ShdT.js → input-B9q8KV4F.js} +1 -1
  115. package/dist/client/assets/{integration-icon-BjRqMG3n.js → integration-icon-BVY3nW43.js} +1 -1
  116. package/dist/client/assets/{label-KRKjsQLR.js → label-x3YhPSqt.js} +1 -1
  117. package/dist/client/assets/{login-B5WUG2bv.js → login-DJq6zJkS.js} +1 -1
  118. package/dist/client/assets/{mcp-oauth-Ccqa98JF.js → mcp-oauth-HIYUmIS7.js} +1 -1
  119. package/dist/client/assets/{members-BwXKPt6c.js → members-CEIQEz29.js} +1 -1
  120. package/dist/client/assets/{monaco-editor-DztiaMte.js → monaco-editor-DQsadrcR.js} +1 -1
  121. package/dist/client/assets/{monitoring-stats-row-DY_Jk7Qu.js → monitoring-stats-row-XQSX37Es.js} +1 -1
  122. package/dist/client/assets/{oauth-callback-B5Sy5Cax.js → oauth-callback-BHYoQdej.js} +1 -1
  123. package/dist/client/assets/{oauth-callback-ai-provider-DFLSFrMH.js → oauth-callback-ai-provider-BQxMDjkd.js} +1 -1
  124. package/dist/client/assets/{onboarding-tnqH6jke.js → onboarding-YBSFHrWd.js} +1 -1
  125. package/dist/client/assets/{org-install-CMfEhUPU.js → org-install-BYuosPdC.js} +1 -1
  126. package/dist/client/assets/{org-layout-DWTGapvu.js → org-layout-MRzgibsh.js} +1 -1
  127. package/dist/client/assets/{organization-choice-BhcilQzG.js → organization-choice-CapZcYtV.js} +1 -1
  128. package/dist/client/assets/{page-seo-form-CworrxTj.js → page-seo-form-CqZfv8X_.js} +1 -1
  129. package/dist/client/assets/page-seo-sheet-DtnjMpuE.js +1 -0
  130. package/dist/client/assets/{popover-CQIMDVug.js → popover-BzQ5wL7A.js} +1 -1
  131. package/dist/client/assets/{post-editor-BgM1RATm.js → post-editor-CTE-wZis.js} +1 -1
  132. package/dist/client/assets/{preview-dialog-CJENsRWm.js → preview-dialog-BueN40wX.js} +1 -1
  133. package/dist/client/assets/{primitives-qIzOEfAk.js → primitives-CKy26jWq.js} +1 -1
  134. package/dist/client/assets/{profile-B0-E7bKd.js → profile-DChufnnG.js} +1 -1
  135. package/dist/client/assets/project-app-view-CkSSi0TS.js +1 -0
  136. package/dist/client/assets/record-editor-CbsS0IVi.js +1 -0
  137. package/dist/client/assets/registry-DK3Q5gX_.js +2 -0
  138. package/dist/client/assets/{registry-layout-Cy0i7eVL.js → registry-layout-CodfYx2r.js} +1 -1
  139. package/dist/client/assets/{require-capability-D9TOSbgf.js → require-capability-DwLm9QUw.js} +1 -1
  140. package/dist/client/assets/{required-auth-layout-D9FVCOQl.js → required-auth-layout-CyLg9iYq.js} +1 -1
  141. package/dist/client/assets/{reset-password-m90-iQba.js → reset-password-DMNx-Vj9.js} +1 -1
  142. package/dist/client/assets/{roles-m5faIEUW.js → roles-CJZwr85B.js} +1 -1
  143. package/dist/client/assets/save-referenced-block-BuKB-TPt.js +1 -0
  144. package/dist/client/assets/{save-status-Dr27404A.js → save-status-Odb6tzfv.js} +1 -1
  145. package/dist/client/assets/{schema-form-Bpex2GV2.js → schema-form-CJ9tFDNN.js} +1 -1
  146. package/dist/client/assets/{scroll-area-DbztbmuO.js → scroll-area-CijwgfU1.js} +1 -1
  147. package/dist/client/assets/{search-input-C742tJr8.js → search-input-BSp_OQdj.js} +1 -1
  148. package/dist/client/assets/{secrets-DbY4hLUu.js → secrets-BbqOZ3Gn.js} +1 -1
  149. package/dist/client/assets/sections-editor-CyLQRlzi.js +2 -0
  150. package/dist/client/assets/{select-COSJe-70.js → select-BTavF8g-.js} +1 -1
  151. package/dist/client/assets/{select-model-Cv_gN_vr.js → select-model-CYUBV6FP.js} +1 -1
  152. package/dist/client/assets/{seo-editor-ynZ80zTU.js → seo-editor-DsbALoze.js} +1 -1
  153. package/dist/client/assets/{settings-layout-D5cpx9f5.js → settings-layout-kO_j7afz.js} +1 -1
  154. package/dist/client/assets/{settings-section-C-zTpCRT.js → settings-section-nTIyismy.js} +1 -1
  155. package/dist/client/assets/{sheet-CuyenB5M.js → sheet-Be7nx13S.js} +1 -1
  156. package/dist/client/assets/{shell-controls-fwD6Be98.js → shell-controls-BdoUGZ5s.js} +1 -1
  157. package/dist/client/assets/{shell-layout-BhblvLd4.js → shell-layout-Ceh14jWF.js} +1 -1
  158. package/dist/client/assets/{shell-route-loading-ClsKn-Oj.js → shell-route-loading-COgnRrgS.js} +1 -1
  159. package/dist/client/assets/{sidebar-BYFEz6-7.js → sidebar-aqkJk02H.js} +1 -1
  160. package/dist/client/assets/{skeleton-DHas8e4O.js → skeleton-BZA1ydJ5.js} +1 -1
  161. package/dist/client/assets/{sortable.esm-CtBH0PGw.js → sortable.esm-3Eb-EVuH.js} +1 -1
  162. package/dist/client/assets/{sso-BFO9vLZv.js → sso-T9-I0dOY.js} +1 -1
  163. package/dist/client/assets/{store-C9F0E0yc.js → store-hSXqoJiA.js} +1 -1
  164. package/dist/client/assets/store-registry-CO5po8Ys.js +2 -0
  165. package/dist/client/assets/{studio-tools-DO12gBMa.js → studio-tools-BThbo34U.js} +1 -1
  166. package/dist/client/assets/{switch-By8vCxNg.js → switch-ChNCbD78.js} +1 -1
  167. package/dist/client/assets/{table-BgkbBxMz.js → table-DyhJ_N7y.js} +1 -1
  168. package/dist/client/assets/{tabs-DPoZSyfS.js → tabs-CEcgElcv.js} +1 -1
  169. package/dist/client/assets/{task-status-D9k3BLzM.js → task-status-BrIZavAZ.js} +1 -1
  170. package/dist/client/assets/{textarea-DQwh6y_K.js → textarea-CnG5GolZ.js} +1 -1
  171. package/dist/client/assets/{toggle-group-CW5GRzAp.js → toggle-group-88j9eFgy.js} +1 -1
  172. package/dist/client/assets/{toolbar-1QmqWl6-.js → toolbar-tWfkybln.js} +1 -1
  173. package/dist/client/assets/{tooltip-DO1R3Vmb.js → tooltip-DVqOmAgj.js} +1 -1
  174. package/dist/client/assets/{types-pBNKtzBp.js → types-Azj4SL2T.js} +1 -1
  175. package/dist/client/assets/{use-ai-providers-qobt2OiH.js → use-ai-providers-D3K1IBXP.js} +1 -1
  176. package/dist/client/assets/{use-automations-BwoNV2me.js → use-automations-CJcYBYig.js} +1 -1
  177. package/dist/client/assets/{use-capability-C09ZF9_G.js → use-capability-t8jcbJQc.js} +1 -1
  178. package/dist/client/assets/{use-clock-tick-_1lW4UqP.js → use-clock-tick-GkLlDe0y.js} +1 -1
  179. package/dist/client/assets/{use-collections-DRgt6Bb8.js → use-collections-Bau2O-hk.js} +1 -1
  180. package/dist/client/assets/{use-connection-XfA-QrSw.js → use-connection-nkWhshyI.js} +1 -1
  181. package/dist/client/assets/{use-copy-DyplBFAe.js → use-copy-BQ6cLTdv.js} +1 -1
  182. package/dist/client/assets/{use-create-virtual-mcp-BJFWHgGz.js → use-create-virtual-mcp-YKgnWL2r.js} +1 -1
  183. package/dist/client/assets/{use-debounced-autosave-DqciCJ__.js → use-debounced-autosave-BwtEh4oP.js} +1 -1
  184. package/dist/client/assets/{use-deco-credits-CyoNix9p.js → use-deco-credits-DlEQB-Si.js} +1 -1
  185. package/dist/client/assets/{use-delete-connection-CweyK7E_.js → use-delete-connection-BJMhiTgm.js} +1 -1
  186. package/dist/client/assets/{use-file-configs-OLHA7dwa.js → use-file-configs-JZp3bWtX.js} +1 -1
  187. package/dist/client/assets/{use-infinite-scroll-BbUZw7ju.js → use-infinite-scroll-DwZozWFz.js} +1 -1
  188. package/dist/client/assets/{use-join-requests-CHh2Zrhx.js → use-join-requests-8ZuovDfH.js} +1 -1
  189. package/dist/client/assets/{use-mcp-client-DilmxmKU.js → use-mcp-client-RiDQVGqe.js} +1 -1
  190. package/dist/client/assets/{use-mcp-prompts-D2ueJ3CD.js → use-mcp-prompts-_xCjRWbU.js} +1 -1
  191. package/dist/client/assets/{use-mcp-tools-uucJgbkt.js → use-mcp-tools-DdnF4WnM.js} +1 -1
  192. package/dist/client/assets/{use-members-Y5iRty7v.js → use-members-CL8wIDhY.js} +1 -1
  193. package/dist/client/assets/{use-navigate-to-agent-HvaD8xDj.js → use-navigate-to-agent-Dxf_z3z_.js} +1 -1
  194. package/dist/client/assets/{use-org-auth-client-Dl_7zTlg.js → use-org-auth-client-BB07oHZb.js} +1 -1
  195. package/dist/client/assets/{use-org-sso-9Z0u5sV3.js → use-org-sso-BlwxfZ0b.js} +1 -1
  196. package/dist/client/assets/{use-organization-roles-C8kGFpoE.js → use-organization-roles-DiyfHPtd.js} +1 -1
  197. package/dist/client/assets/{use-organization-settings-B5vS3xHV.js → use-organization-settings-DKT8xIyC.js} +1 -1
  198. package/dist/client/assets/{use-registry-connections-DhFpf503.js → use-registry-connections-DCqUfQJj.js} +1 -1
  199. package/dist/client/assets/{use-secrets-DtlQfYRK.js → use-secrets-CPbnjha6.js} +1 -1
  200. package/dist/client/assets/{use-status-sounds-BSqGti4P.js → use-status-sounds-BUy3GUGM.js} +1 -1
  201. package/dist/client/assets/{use-view-mode-Cc4A86jX.js → use-view-mode-WOpiEgc-.js} +1 -1
  202. package/dist/client/assets/{use-virtual-mcp-cixi9WNo.js → use-virtual-mcp-DY0FqgMd.js} +1 -1
  203. package/dist/client/assets/useInfiniteQuery-GAIa3lI8.js +1 -0
  204. package/dist/client/assets/useSuspenseInfiniteQuery-CB85USQy.js +1 -0
  205. package/dist/client/assets/{variant-calendar-BtDF6xbX.js → variant-calendar-f-5HkKFU.js} +1 -1
  206. package/dist/client/assets/{view-mode-toggle-BNmCyKXO.js → view-mode-toggle-DIP0BMUY.js} +1 -1
  207. package/dist/client/index.html +1 -1
  208. package/dist/server/cli.js +1 -1
  209. package/package.json +1 -1
  210. package/dist/client/assets/category-editor-sMElZzN1.js +0 -1
  211. package/dist/client/assets/page-seo-sheet-CU9OHYe8.js +0 -1
  212. package/dist/client/assets/project-app-view-CMI1MfV-.js +0 -1
  213. package/dist/client/assets/record-editor-DGdCVdoZ.js +0 -1
  214. package/dist/client/assets/registry-D-K5v381.js +0 -2
  215. package/dist/client/assets/save-referenced-block-CtS93Zrw.js +0 -1
  216. package/dist/client/assets/sections-editor-DJuNcR6f.js +0 -2
  217. package/dist/client/assets/store-registry-D8kCyVob.js +0 -2
  218. package/dist/client/assets/useInfiniteQuery-C4arjVN1.js +0 -1
  219. package/dist/client/assets/useSuspenseInfiniteQuery-DTlBviqw.js +0 -1
@@ -1 +1 @@
1
- import{c as y,j as t,B as F,i as X,x as Ge,y as se,a2 as Pe,r as T,s as ie,C as Qe,l as V,be as Ye,u as Xe,w as G,t as Ze,e as ae,b0 as ke}from"./index-D0U_smqt.js";import{E as Ae}from"./empty-state-crYivviN.js";import{u as et,a as Ee}from"./use-collections-DRgt6Bb8.js";import{u as ce}from"./use-mcp-client-DilmxmKU.js";import{F as ne,a as tt,b as de,d as me}from"./form-O9DEtf_L.js";import{I as ue}from"./input-Ccm3ShdT.js";import{T as re}from"./textarea-DQwh6y_K.js";import{a as st,b as nt,V as xe,O as ot,M as lt}from"./index-7a12TwCl.js";import{a9 as rt,x as it,_ as at,aa as ct,W as dt,ab as mt,M as be}from"./agent-icon-Bcqwo2Wq.js";import{g as ut,M as xt,a as Ne}from"./types-pBNKtzBp.js";import{A as pt,a as ft,b as ht}from"./alert-B1Ln6zZV.js";import{d as ve,b as Se,c as ye,S as we,a as oe}from"./select-COSJe-70.js";import{c as gt,b as Ce,T as Ie,a as $e}from"./tooltip-DO1R3Vmb.js";import{i as jt}from"./AlertCircle-Ccspj6_x.js";import{s as bt}from"./Stars02-C2akJW-A.js";import{a as Nt}from"./Eye-hHNCwVZ1.js";import{i as vt}from"./Play-DpX5JUyA.js";import{i as St}from"./ChevronRight-KEtpzT4P.js";import{g as yt}from"./connection-slug-eyAPH6o3.js";import{u as wt,T as Ct}from"./index-D_UY8Zf9.js";import{a as Oe,u as Re}from"./use-connection-XfA-QrSw.js";import{a as It}from"./use-mcp-tools-uucJgbkt.js";import{c as $t}from"./content-blocks-o63cs2vh.js";import{I as Te}from"./integration-icon-BjRqMG3n.js";import{f as Tt,h as Pt}from"./chat-context-DnaexSAo.js";import{b as kt}from"./shell-layout-BhblvLd4.js";import{M as At}from"./monaco-editor-DztiaMte.js";import{n as Et}from"./XCircle-CSVmVGl-.js";import"./auth-rl3GT7t8.js";import"./label-KRKjsQLR.js";import"./index-BFeGPSf0.js";import"./sidebar-BYFEz6-7.js";import"./LayoutLeft-BNwcfVCc.js";import"./sheet-CuyenB5M.js";import"./X-BmA2kYv-.js";import"./ZoomOut-xDQo2yr7.js";import"./Key01-BYHEvjL0.js";import"./extract-connection-data-D-Y4GRfE.js";import"./use-registry-connections-DhFpf503.js";import"./use-organization-settings-B5vS3xHV.js";import"./studio-tools-DO12gBMa.js";import"./Plus-BaLwS14l.js";import"./index-BPuJ390n.js";import"./index-BRnQ22g3.js";import"./popover-CQIMDVug.js";import"./use-virtual-mcp-cixi9WNo.js";import"./Check-D3J8f8u-.js";import"./SearchMd-CJ_dFCp5.js";import"./Users03-CJf6bBEA.js";import"./use-create-virtual-mcp-BJFWHgGz.js";import"./use-navigate-to-agent-HvaD8xDj.js";import"./Tool01-CI_6KMgQ.js";import"./SwitchHorizontal01-y3DhestF.js";import"./Settings02-Cg6Yp6Ig.js";import"./ArrowRight-DjM-WAe8.js";import"./ArrowUpRight-tJm1fmd7.js";import"./ZapSquare-Bh6-lHaM.js";import"./CheckCircle-2NPq-6dO.js";import"./ChevronDown-Dilz0yBl.js";import"./ChevronLeft-CJ5DBM3M.js";import"./ChevronUp-B5x1falF.js";import"./DotsVertical-BM5d8Pc7.js";import"./Globe01-DD8UM4Hn.js";import"./FilterLines-DfVdVEBp.js";import"./Star01-D42mJCl7.js";import"./Globe04-CHjKQaGv.js";import"./HardDrive-ClhqImrT.js";import"./LinkExternal01-BqsD3A6i.js";import"./Monitor01-BqllG5YD.js";import"./Sun-CgYYfF85.js";import"./Palette-CdtyN2t7.js";import"./Shield01-DYwaNnY3.js";import"./Stars01-CrB442jN.js";import"./Trash01-Cd_0JhhN.js";import"./Upload01-ijsbLMSK.js";import"./User01-BI5RuTWy.js";import"./Users01-LhAUtJ2l.js";import"./XClose-BGGuhSdx.js";import"./Zap-C5OGTH44.js";import"./mcp-oauth-Ccqa98JF.js";import"./badge-DSiiJMKS.js";import"./hooks-CSfRJCjt.js";import"./decopilot-sse-pool-Dl1x5tdf.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-qobt2OiH.js";import"./tab-id-BptcWVWa.js";import"./avatar-CXZnLPEU.js";import"./dialog-CQ6B0IwC.js";import"./required-auth-layout-D9FVCOQl.js";import"./use-org-sso-9Z0u5sV3.js";import"./index-BsWl8UuV.js";function Ot(s){const e=y.c(15),{onSave:o,onUndo:n,isDirty:l,isSaving:r,saveLabel:a,undoLabel:c}=s,i=a===void 0?"Save":a,u=c===void 0?"Undo":c;if(!l)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(rt,{size:14}),e[0]=x):x=e[0];let m;e[1]!==r||e[2]!==n||e[3]!==u?(m=t.jsxs(F,{variant:"outline",size:"sm",onClick:n,disabled:r,"aria-label":u,children:[x,u]}),e[1]=r,e[2]=n,e[3]=u,e[4]=m):m=e[4];let p;e[5]!==r?(p=r?t.jsx(X,{size:14,className:"animate-spin"}):t.jsx(it,{size:14}),e[5]=r,e[6]=p):p=e[6];let f;e[7]!==r||e[8]!==o||e[9]!==i||e[10]!==p?(f=t.jsxs(F,{variant:"default",size:"sm",onClick:o,disabled:r,"aria-label":i,children:[p,i]}),e[7]=r,e[8]=o,e[9]=i,e[10]=p,e[11]=f):f=e[11];let g;return e[12]!==m||e[13]!==f?(g=t.jsxs(t.Fragment,{children:[m,f]}),e[12]=m,e[13]=f,e[14]=g):g=e[14],g}Ge({title:se().min(1),description:se().nullable(),body:se()});function le(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Rt(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(n=>n==="mcps"),o=e>=0?s[e+1]:void 0;return o?decodeURIComponent(o):void 0}function _t(s){const e=y.c(13),{form:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=n):n=e[0];let l;e[1]!==o.control?(l=t.jsxs("div",{className:"flex flex-col gap-4",children:[n,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(ne,{control:o.control,name:"title",render:zt}),t.jsx(ne,{control:o.control,name:"description",render:Dt})]})]}),e[1]=o.control,e[2]=l):l=e[2];let r,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),a=t.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=a):(r=e[3],a=e[4]);let c;e[5]!==o.control?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[r,a,t.jsx(ne,{control:o.control,name:"body",render:Mt})]}),e[5]=o.control,e[6]=c):c=e[6];let i;e[7]!==l||e[8]!==c?(i=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[l,c]}),e[7]=l,e[8]=c,e[9]=i):i=e[9];let u;return e[10]!==o||e[11]!==i?(u=t.jsx(tt,{...o,children:i}),e[10]=o,e[11]=i,e[12]=u):u=e[12],u}function Mt(s){const{field:e}=s;return t.jsx(de,{children:t.jsx(me,{children:t.jsx(re,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function Dt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(me,{children:t.jsx(ue,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function zt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),t.jsx(me,{children:t.jsx(ue,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Lt(s){const e=y.c(36),{providerId:o,promptId:n}=s,{org:l}=ie(),r=o||null;let a;e[0]!==l.id||e[1]!==l.slug||e[2]!==r?(a={connectionId:r,orgId:l.id,orgSlug:l.slug},e[0]=l.id,e[1]=l.slug,e[2]=r,e[3]=a):a=e[3];const c=ce(a),i=et(o,"PROMPT",n,c),u=Ee(o,"PROMPT",c),x=u.update.isPending;let m;e[4]!==i?(m=i?{title:i.title,description:i.description??null,body:le(i)}:void 0,e[4]=i,e[5]=m):m=e[5];let p;e[6]!==m?(p={values:m},e[6]=m,e[7]=p):p=e[7];const f=Qe(p);let g;e[8]!==f||e[9]!==i?(g=()=>{i&&f.reset({title:i.title,description:i.description??null,body:le(i)})},e[8]=f,e[9]=i,e[10]=g):g=e[10];const S=g;let I;e[11]!==u.update||e[12]!==f||e[13]!==n?(I=f.handleSubmit(async N=>{const E=await u.update.mutateAsync({id:n,data:{title:N.title,description:N.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:N.body}}]}});f.reset({title:E.title,description:E.description??null,body:le(E)})}),e[11]=u.update,e[12]=f,e[13]=n,e[14]=I):I=e[14];const R=I;if(!i){let N;return e[15]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ae,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[15]=N):N=e[15],N}let $;e[16]!==i.title?($=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[16]=i.title,e[17]=$):$=e[17];let A;e[18]!==i.description?(A=i.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:i.description})]}):null,e[18]=i.description,e[19]=A):A=e[19];let P;e[20]!==$||e[21]!==A?(P=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[$,A]})}),e[20]=$,e[21]=A,e[22]=P):P=e[22];let b;e[23]!==R?(b=()=>{R()},e[23]=R,e[24]=b):b=e[24];let w;e[25]!==f.formState.isDirty||e[26]!==x||e[27]!==S||e[28]!==b?(w=t.jsx(st,{children:t.jsx(Ot,{onSave:b,onUndo:S,isDirty:f.formState.isDirty,isSaving:x})}),e[25]=f.formState.isDirty,e[26]=x,e[27]=S,e[28]=b,e[29]=w):w=e[29];let C;e[30]!==f?(C=t.jsx("div",{className:"h-full",children:t.jsx(_t,{form:f})}),e[30]=f,e[31]=C):C=e[31];let k;return e[32]!==w||e[33]!==C||e[34]!==P?(k=t.jsxs(xe,{children:[P,w,C]}),e[32]=w,e[33]=C,e[34]=P,e[35]=k):k=e[35],k}function Ut(s){const e=y.c(4),{itemId:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Rt(),e[0]=n):n=e[0];const l=n;if(!l){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ae,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=a):a=e[1],a}let r;return e[2]!==o?(r=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:null,children:t.jsx(Lt,{providerId:l,promptId:o})})}),e[2]=o,e[3]=r):r=e[3],r}function _e(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("min-w-0 overflow-hidden",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Me(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("ol",{"data-slot":"breadcrumb-list",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function q(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("inline-flex items-center gap-1.5 min-w-0",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("li",{"data-slot":"breadcrumb-item",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Q(s){const e=y.c(10);let o,n,l;e[0]!==s?({asChild:o,className:n,...l}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=l):(o=e[1],n=e[2],l=e[3]);const r=o?Ye:"a";let a;e[4]!==n?(a=V("hover:text-foreground transition-colors truncate",n),e[4]=n,e[5]=a):a=e[5];let c;return e[6]!==r||e[7]!==l||e[8]!==a?(c=t.jsx(r,{"data-slot":"breadcrumb-link",className:a,...l}),e[6]=r,e[7]=l,e[8]=a,e[9]=c):c=e[9],c}function De(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("text-foreground font-medium truncate",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Y(s){const e=y.c(12);let o,n,l;e[0]!==s?({children:o,className:n,...l}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=l):(o=e[1],n=e[2],l=e[3]);let r;e[4]!==n?(r=V("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",n),e[4]=n,e[5]=r):r=e[5];let a;e[6]!==o?(a=o??t.jsx(St,{}),e[6]=o,e[7]=a):a=e[7];let c;return e[8]!==l||e[9]!==r||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:r,...l,children:a}),e[8]=l,e[9]=r,e[10]=a,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ft(s){const e=y.c(11),{toolName:o,connectionId:n,siblings:l,onSelectInstance:r,onBack:a}=s;let c;e[0]!==n?(c={connectionId:n},e[0]=n,e[1]=c):c=e[1];const i=wt(c);if(!i.isAuthenticated){let m;return e[2]!==i.supportsOAuth||e[3]!==a?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:i.supportsOAuth?t.jsx(ot,{onAuthenticate:()=>a(),buttonText:"Go back to authenticate"}):t.jsx(lt,{hasReadme:!1})}),e[2]=i.supportsOAuth,e[3]=a,e[4]=m):m=e[4],m}const u=`${n}:${o}`;let x;return e[5]!==n||e[6]!==r||e[7]!==l||e[8]!==u||e[9]!==o?(x=t.jsx(Vt,{toolName:o,connectionId:n,siblings:l,onSelectInstance:r},u),e[5]=n,e[6]=r,e[7]=l,e[8]=u,e[9]=o,e[10]=x):x=e[10],x}function Vt({toolName:s,connectionId:e,siblings:o,onSelectInstance:n}){const{replayId:l}=Xe({strict:!1}),r=(()=>{if(!l)return null;const d=`replay-${l}`,h=sessionStorage.getItem(d);if(!h)return null;sessionStorage.removeItem(d);try{return JSON.parse(h)}catch{return null}})(),a=(()=>{if(!r)return null;const d={};for(const[h,v]of Object.entries(r))v!==null&&typeof v=="object"?d[h]=JSON.stringify(v,null,2):d[h]=v;return d})(),[c,i]=T.useState(a??{}),[u,x]=T.useState(r?JSON.stringify(r,null,2):"{}"),[m,p]=T.useState(null),[f,g]=T.useState(null),[S,I]=T.useState(null),[R,$]=T.useState(null),[A,P]=T.useState(!1),[b,w]=T.useState(null),{org:C}=ie(),k=Oe(e),N=Tt(),E=Pt(),{setChatOpen:U}=kt(),z=`${e}:${s}`,_=ce({connectionId:e,orgId:C.id,orgSlug:C.slug}),L=It({client:_}),j=L.data?.tools?.find(d=>d.name===s),O=ut(j?._meta),J=d=>{if(!N)return;const h=$t(d.content);h.content.length>0&&(U(!0),N.sendMessage({tiptapDoc:h}))},[M,Z]=T.useState("json"),[ze,Le]=T.useState(!1);O&&!ze&&(Z("ui"),Le(!0));const pe=j?.inputSchema?.properties,fe=pe?Object.keys(pe):[],H=fe.length>0,W={};if(H&&j?.inputSchema?.properties)for(const d of fe)W[d]=j.inputSchema.required?.includes(d)?"":void 0;const ee=d=>Object.prototype.hasOwnProperty.call(c,d),Ue=async()=>{P(!0),$(null),p(null),g(null),I(null),w(null);const d=performance.now();try{if(!_)throw new Error("MCP client is not available");const h=H?{...W,...c}:(()=>{const D=u.trim();if(!D)return{};const B=JSON.parse(D);if(B&&typeof B=="object")return B;throw new Error("Raw JSON input must be an object.")})();H&&j?.inputSchema?.properties&&Object.entries(j.inputSchema.properties).forEach(([D,B])=>{if((B.type==="object"||B.type==="array")&&typeof h[D]=="string")try{h[D]=JSON.parse(h[D])}catch{}else if((B.type==="number"||B.type==="integer")&&typeof h[D]=="string"&&h[D]!==""){const je=Number(h[D]);Number.isNaN(je)||(h[D]=je)}});const v=await _.callTool({name:s,arguments:h}),K=v.structuredContent??v,He=performance.now(),We=Math.round(He-d);p(K),g(v),I(h);const Ke=JSON.stringify(K),ge=new TextEncoder().encode(Ke).length;w({duration:`${We}ms`,bytes:`${ge} bytes`,tokens:`~${Math.ceil(ge/4)} tokens`,cost:"$0.0000"})}catch(h){const v=h instanceof Error?h.message:String(h);$(v||"Unknown error occurred");const K=performance.now();w({duration:`${Math.round(K-d)}ms`})}finally{P(!1)}},te=(d,h)=>{i(v=>({...v,[d]:h}))},Be=()=>{p(null),g(null),I(null),$(null),w(null)},Fe=j?.name??Bt(s),Ve=t.jsx(_e,{children:t.jsxs(Me,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:C.slug},children:"Connections"})})}),t.jsx(Y,{}),k&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:C.slug,appSlug:yt(k)},search:{tab:"tools"},children:k.title})})}),t.jsx(Y,{})]}),t.jsx(q,{children:t.jsx(De,{children:Fe})})]})}),he=o.length>1&&t.jsxs(ve,{value:e,onValueChange:n,children:[t.jsx(Se,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ye,{})}),t.jsx(we,{children:o.map(d=>t.jsx(oe,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Te,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),Je=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),j?.inputSchema?.required&&j.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:H&&j?.inputSchema?.properties?Object.entries(j.inputSchema.properties).map(([d,h])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[d,j.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:h.type})]}),h.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:h.description}),h.type==="object"||h.type==="array"?t.jsx(re,{className:"font-mono text-xs",value:ee(d)?c[d]??"":W[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d} as JSON...`,rows:3}):h.type==="boolean"?t.jsxs(ve,{value:ee(d)?String(c[d]??""):"",onValueChange:v=>te(d,v==="true"),children:[t.jsx(Se,{children:t.jsx(ye,{placeholder:"Select true or false..."})}),t.jsxs(we,{children:[t.jsx(oe,{value:"true",children:"true"}),t.jsx(oe,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:ee(d)?c[d]??"":W[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d}...`})]},d)):j?.inputSchema&&!H?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(re,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:d=>x(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:A?t.jsxs(F,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Be,children:[t.jsx(at,{className:"h-3.5 w-3.5"}),"Cancel"]}):t.jsxs(F,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ue,children:[t.jsx(vt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})})]}),qe=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(bt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ct,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(dt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),O&&t.jsx(gt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Z("ui"),children:t.jsx(mt,{size:14})})}),t.jsx($e,{children:"Interactive view"})]}),t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Z("json"),children:t.jsx(be,{size:14})})}),t.jsx($e,{children:"JSON view"})]})]})})]})]}),R&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(pt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(jt,{className:"h-4 w-4"}),t.jsx(ft,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(ht,{className:"text-xs text-destructive",children:R})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:O&&M==="ui"&&_?t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:t.jsx(xt,{resourceURI:O,toolInfo:j?{tool:j}:void 0,toolInput:S??void 0,toolResult:f??void 0,displayMode:"fullscreen",minHeight:Ne.view.minHeight,maxHeight:Ne.view.maxHeight,client:_,onMessage:J,onUpdateModelContext:d=>E?.setAppContext(z,d),onTeardown:()=>E?.clearAppContext(z),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx(At,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(F,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m,null,2)),Ze.success("Copied to clipboard")},children:t.jsx(Nt,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(be,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]});return t.jsx(xe,{breadcrumb:Ve,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(Te,{icon:k?.icon||null,name:k?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[L.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):L.isLoading?t.jsx(X,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:L.isSuccess?"ready":L.isLoading?"connecting":"error"})]}),t.jsx(Ct,{annotations:j?.annotations,_meta:j?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:he})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:j?.description||"No description available"})]}),o.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:"Instance"}),he]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Je}),qe]})})]})})}function Jt(s){const e=y.c(10),{itemId:o,siblings:n,onBack:l}=s,[r,a]=T.useState(n[0]?.id??"");let c;e[0]!==r||e[1]!==n?(c=n.find(p=>p.id===r)?.id??n[0]?.id??"",e[0]=r,e[1]=n,e[2]=c):c=e[2];const i=c;if(!Oe(i||void 0)||!i){let p;return e[3]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[3]=p):p=e[3],p}let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(X,{size:32,className:"animate-spin text-muted-foreground"})}),e[4]=x):x=e[4];let m;return e[5]!==i||e[6]!==l||e[7]!==n||e[8]!==o?(m=t.jsx(T.Suspense,{fallback:x,children:t.jsx(Ft,{toolName:o,connectionId:i,siblings:n,onSelectInstance:a,onBack:l})}),e[5]=i,e[6]=l,e[7]=n,e[8]=o,e[9]=m):m=e[9],m}function qt(s){const e=y.c(21),{icon:o,illustration:n,title:l,description:r,buttonProps:a,buttonComponent:c,className:i,children:u}=s;let x;e[0]!==i?(x=V("flex flex-col items-center justify-center py-16 text-center",i),e[0]=i,e[1]=x):x=e[1];let m;e[2]!==o||e[3]!==n?(m=n?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:n}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=n,e[4]=m):m=e[4];let p;e[5]!==l?(p=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:l}),e[5]=l,e[6]=p):p=e[6];let f;e[7]!==r?(f=r&&t.jsx("div",{className:"text-sm text-muted-foreground",children:r}),e[7]=r,e[8]=f):f=e[8];let g;e[9]!==p||e[10]!==f?(g=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[p,f]}),e[9]=p,e[10]=f,e[11]=g):g=e[11];let S;e[12]!==c||e[13]!==a?(S=(c??a)&&t.jsx("div",{className:"mt-4",children:c??(a&&t.jsx(F,{size:"sm",className:V(a?.className),...a}))}),e[12]=c,e[13]=a,e[14]=S):S=e[14];let I;return e[15]!==u||e[16]!==x||e[17]!==m||e[18]!==g||e[19]!==S?(I=t.jsxs("div",{className:x,children:[m,g,S,u]}),e[15]=u,e[16]=x,e[17]=m,e[18]=g,e[19]=S,e[20]=I):I=e[20],I}const Ht={prompt:Ut};function Wt(){const s=y.c(9),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),l=decodeURIComponent(n.itemId);let r;s[1]!==n.appSlug?(r={slug:n.appSlug},s[1]=n.appSlug,s[2]=r):r=s[2];const a=Re(r);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const i=c,u=Kt;let x;return s[5]!==i||s[6]!==l||s[7]!==a?(x=t.jsx(Jt,{itemId:l,siblings:a,onBack:i,onUpdate:u}),s[5]=i,s[6]=l,s[7]=a,s[8]=x):x=s[8],x}async function Kt(s){return Promise.resolve()}function Gt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const s=y.c(41),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),l=decodeURIComponent(n.collectionName),r=decodeURIComponent(n.itemId);let a;s[1]!==e.history?(a=()=>{e.history.back()},s[1]=e.history,s[2]=a):a=s[2];const c=a,{org:i}=ie();let u;s[3]!==n.appSlug?(u={slug:n.appSlug},s[3]=n.appSlug,s[4]=u):u=s[4];const m=Re(u)[0]??null,p=m?.id??"",f=p||"no-connection",g=p??null;let S;s[5]!==i.id||s[6]!==i.slug||s[7]!==g?(S={connectionId:g,orgId:i.id,orgSlug:i.slug},s[5]=i.id,s[6]=i.slug,s[7]=g,s[8]=S):S=s[8];const I=ce(S),R=Ee(f,l,I);let $;s[9]!==R||s[10]!==r?($=async M=>{r&&await R.update.mutateAsync({id:r,data:M})},s[9]=R,s[10]=r,s[11]=$):$=s[11];const A=$;let P;s[12]!==l?(P=l?.toLowerCase(),s[12]=l,s[13]=P):P=s[13];const b=P,w=b&&Ht[b];let C;s[14]!==l?(C=Gt(l),s[14]=l,s[15]=C):C=s[15];const k=C;let N;s[16]!==i.slug?(N=t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:i.slug},children:"Connections"})})}),s[16]=i.slug,s[17]=N):N=s[17];let E;s[18]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(Y,{}),s[18]=E):E=s[18];let U;s[19]!==l||s[20]!==m||s[21]!==i.slug||s[22]!==n.appSlug?(U=m&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:n.appSlug},search:{tab:l},children:m.title})})}),t.jsx(Y,{})]}),s[19]=l,s[20]=m,s[21]=i.slug,s[22]=n.appSlug,s[23]=U):U=s[23];let z;s[24]!==k?(z=t.jsx(q,{children:t.jsx(De,{children:k})}),s[24]=k,s[25]=z):z=s[25];let _;s[26]!==U||s[27]!==z||s[28]!==N?(_=t.jsx(_e,{children:t.jsxs(Me,{children:[N,E,U,z]})}),s[26]=U,s[27]=z,s[28]=N,s[29]=_):_=s[29];const L=_;if(w){let M;return s[30]!==w||s[31]!==c||s[32]!==A||s[33]!==r?(M=t.jsx(w,{itemId:r,onBack:c,onUpdate:A}),s[30]=w,s[31]=c,s[32]=A,s[33]=r,s[34]=M):M=s[34],M}let j;s[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(Et,{size:36,className:"text-muted-foreground"}),s[35]=j):j=s[35];let O;s[36]!==c?(O=t.jsx(qt,{icon:j,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:c,children:"Go back"}}),s[36]=c,s[37]=O):O=s[37];let J;return s[38]!==L||s[39]!==O?(J=t.jsx(xe,{breadcrumb:L,children:O}),s[38]=L,s[39]=O,s[40]=J):J=s[40],J}function Yt(){const s=y.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const o=ae(e);if(decodeURIComponent(o.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Wt,{}),s[1]=a):a=s[1],a}let r;return s[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Qt,{}),s[2]=r):r=s[2],r}function Dn(){const s=y.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(X,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Yt,{})})}),s[0]=e):e=s[0],e}export{Dn as default};
1
+ import{c as y,j as t,B as F,i as X,x as Ge,y as se,a2 as Pe,r as T,s as ie,C as Qe,l as V,be as Ye,u as Xe,w as G,t as Ze,e as ae,b0 as ke}from"./index-D9IK491L.js";import{E as Ae}from"./empty-state-DHarvDyS.js";import{u as et,a as Ee}from"./use-collections-Bau2O-hk.js";import{u as ce}from"./use-mcp-client-RiDQVGqe.js";import{F as ne,a as tt,b as de,d as me}from"./form-BKLsYVOj.js";import{I as ue}from"./input-B9q8KV4F.js";import{T as re}from"./textarea-CnG5GolZ.js";import{a as st,b as nt,V as xe,O as ot,M as lt}from"./index-BJGyjJJt.js";import{a9 as rt,x as it,_ as at,aa as ct,W as dt,ab as mt,M as be}from"./agent-icon-DTdfxhoG.js";import{g as ut,M as xt,a as Ne}from"./types-Azj4SL2T.js";import{A as pt,a as ft,b as ht}from"./alert-waKnXqGk.js";import{d as ve,b as Se,c as ye,S as we,a as oe}from"./select-BTavF8g-.js";import{c as gt,b as Ce,T as Ie,a as $e}from"./tooltip-DVqOmAgj.js";import{i as jt}from"./AlertCircle-CqOVaXci.js";import{s as bt}from"./Stars02-RZSAG7rn.js";import{a as Nt}from"./Eye-Bxan3Sqa.js";import{i as vt}from"./Play-DR1SFBmJ.js";import{i as St}from"./ChevronRight-ax97YKuz.js";import{g as yt}from"./connection-slug-eyAPH6o3.js";import{u as wt,T as Ct}from"./index-nU2ktNYZ.js";import{a as Oe,u as Re}from"./use-connection-nkWhshyI.js";import{a as It}from"./use-mcp-tools-DdnF4WnM.js";import{c as $t}from"./content-blocks-o63cs2vh.js";import{I as Te}from"./integration-icon-BVY3nW43.js";import{f as Tt,h as Pt}from"./chat-context-Bdh5JOoc.js";import{b as kt}from"./shell-layout-Ceh14jWF.js";import{M as At}from"./monaco-editor-DQsadrcR.js";import{n as Et}from"./XCircle-C_zOOXjw.js";import"./auth-D-vZuhvw.js";import"./label-x3YhPSqt.js";import"./index-DCgPZCHy.js";import"./sidebar-aqkJk02H.js";import"./LayoutLeft-C7Cwg5dB.js";import"./sheet-Be7nx13S.js";import"./X-RMAI-CnD.js";import"./ZoomOut-BSvbLjMK.js";import"./Key01-dy7oLiQz.js";import"./extract-connection-data-uuFWP3hz.js";import"./use-registry-connections-DCqUfQJj.js";import"./use-organization-settings-DKT8xIyC.js";import"./studio-tools-BThbo34U.js";import"./Plus-41YUU3X4.js";import"./index-DuzF9uKh.js";import"./index-D972QGLJ.js";import"./popover-BzQ5wL7A.js";import"./use-virtual-mcp-DY0FqgMd.js";import"./Check-CBlc59JS.js";import"./SearchMd-kFyk-Zpn.js";import"./Users03-DJchxrNl.js";import"./use-create-virtual-mcp-YKgnWL2r.js";import"./use-navigate-to-agent-Dxf_z3z_.js";import"./Tool01-YzuqPBZS.js";import"./SwitchHorizontal01-B6awNCuJ.js";import"./Settings02-BQvb6NDs.js";import"./ArrowRight-CTyWXakV.js";import"./ArrowUpRight-xZqz95CV.js";import"./ZapSquare-DI8RUlXz.js";import"./CheckCircle-CY28HM-W.js";import"./ChevronDown-2DYEh3oE.js";import"./ChevronLeft-B75Dfp8F.js";import"./ChevronUp-g-p4yrQF.js";import"./DotsVertical-DRQxhuxE.js";import"./Globe01-C4v1tUFc.js";import"./FilterLines-DglSMqXL.js";import"./Star01-DmOmdDYT.js";import"./Globe04-uuqaZSXc.js";import"./HardDrive-BNcT29uK.js";import"./LinkExternal01-Bxjblrw6.js";import"./Monitor01-gDDtOZYE.js";import"./Sun-DqCoPTzZ.js";import"./Palette-CmP2nXkm.js";import"./Shield01-CwXJTWO7.js";import"./Stars01-DY8Z1eLP.js";import"./Trash01-xhyzjxAl.js";import"./Upload01-Dz2Fe5CV.js";import"./User01-pnGUlp6P.js";import"./Users01-D6UupxJE.js";import"./XClose-CL72OyYw.js";import"./Zap-T1H5BLPl.js";import"./mcp-oauth-HIYUmIS7.js";import"./badge-C-FrgWTB.js";import"./hooks-Bb_hjVv2.js";import"./decopilot-sse-pool-CznG8mAO.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./use-ai-providers-D3K1IBXP.js";import"./tab-id-BptcWVWa.js";import"./avatar-BSTZ3pLJ.js";import"./dialog-D5b28yFH.js";import"./required-auth-layout-CyLg9iYq.js";import"./use-org-sso-BlwxfZ0b.js";import"./index-DjKTb3Jx.js";function Ot(s){const e=y.c(15),{onSave:o,onUndo:n,isDirty:l,isSaving:r,saveLabel:a,undoLabel:c}=s,i=a===void 0?"Save":a,u=c===void 0?"Undo":c;if(!l)return null;let x;e[0]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx(rt,{size:14}),e[0]=x):x=e[0];let m;e[1]!==r||e[2]!==n||e[3]!==u?(m=t.jsxs(F,{variant:"outline",size:"sm",onClick:n,disabled:r,"aria-label":u,children:[x,u]}),e[1]=r,e[2]=n,e[3]=u,e[4]=m):m=e[4];let p;e[5]!==r?(p=r?t.jsx(X,{size:14,className:"animate-spin"}):t.jsx(it,{size:14}),e[5]=r,e[6]=p):p=e[6];let f;e[7]!==r||e[8]!==o||e[9]!==i||e[10]!==p?(f=t.jsxs(F,{variant:"default",size:"sm",onClick:o,disabled:r,"aria-label":i,children:[p,i]}),e[7]=r,e[8]=o,e[9]=i,e[10]=p,e[11]=f):f=e[11];let g;return e[12]!==m||e[13]!==f?(g=t.jsxs(t.Fragment,{children:[m,f]}),e[12]=m,e[13]=f,e[14]=g):g=e[14],g}Ge({title:se().min(1),description:se().nullable(),body:se()});function le(s){for(const e of s.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function Rt(){const s=window.location.pathname.split("/").filter(Boolean),e=s.findIndex(n=>n==="mcps"),o=e>=0?s[e+1]:void 0;return o?decodeURIComponent(o):void 0}function _t(s){const e=y.c(13),{form:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=n):n=e[0];let l;e[1]!==o.control?(l=t.jsxs("div",{className:"flex flex-col gap-4",children:[n,t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[t.jsx(ne,{control:o.control,name:"title",render:zt}),t.jsx(ne,{control:o.control,name:"description",render:Dt})]})]}),e[1]=o.control,e[2]=l):l=e[2];let r,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),a=t.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=a):(r=e[3],a=e[4]);let c;e[5]!==o.control?(c=t.jsxs("div",{className:"flex flex-col gap-2",children:[r,a,t.jsx(ne,{control:o.control,name:"body",render:Mt})]}),e[5]=o.control,e[6]=c):c=e[6];let i;e[7]!==l||e[8]!==c?(i=t.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[l,c]}),e[7]=l,e[8]=c,e[9]=i):i=e[9];let u;return e[10]!==o||e[11]!==i?(u=t.jsx(tt,{...o,children:i}),e[10]=o,e[11]=i,e[12]=u):u=e[12],u}function Mt(s){const{field:e}=s;return t.jsx(de,{children:t.jsx(me,{children:t.jsx(re,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function Dt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),t.jsx(me,{children:t.jsx(ue,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function zt(s){const{field:e}=s;return t.jsxs(de,{children:[t.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),t.jsx(me,{children:t.jsx(ue,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function Lt(s){const e=y.c(36),{providerId:o,promptId:n}=s,{org:l}=ie(),r=o||null;let a;e[0]!==l.id||e[1]!==l.slug||e[2]!==r?(a={connectionId:r,orgId:l.id,orgSlug:l.slug},e[0]=l.id,e[1]=l.slug,e[2]=r,e[3]=a):a=e[3];const c=ce(a),i=et(o,"PROMPT",n,c),u=Ee(o,"PROMPT",c),x=u.update.isPending;let m;e[4]!==i?(m=i?{title:i.title,description:i.description??null,body:le(i)}:void 0,e[4]=i,e[5]=m):m=e[5];let p;e[6]!==m?(p={values:m},e[6]=m,e[7]=p):p=e[7];const f=Qe(p);let g;e[8]!==f||e[9]!==i?(g=()=>{i&&f.reset({title:i.title,description:i.description??null,body:le(i)})},e[8]=f,e[9]=i,e[10]=g):g=e[10];const S=g;let I;e[11]!==u.update||e[12]!==f||e[13]!==n?(I=f.handleSubmit(async N=>{const E=await u.update.mutateAsync({id:n,data:{title:N.title,description:N.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:N.body}}]}});f.reset({title:E.title,description:E.description??null,body:le(E)})}),e[11]=u.update,e[12]=f,e[13]=n,e[14]=I):I=e[14];const R=I;if(!i){let N;return e[15]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ae,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[15]=N):N=e[15],N}let $;e[16]!==i.title?($=t.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:i.title}),e[16]=i.title,e[17]=$):$=e[17];let A;e[18]!==i.description?(A=i.description?t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),t.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:i.description})]}):null,e[18]=i.description,e[19]=A):A=e[19];let P;e[20]!==$||e[21]!==A?(P=t.jsx(nt,{children:t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[$,A]})}),e[20]=$,e[21]=A,e[22]=P):P=e[22];let b;e[23]!==R?(b=()=>{R()},e[23]=R,e[24]=b):b=e[24];let w;e[25]!==f.formState.isDirty||e[26]!==x||e[27]!==S||e[28]!==b?(w=t.jsx(st,{children:t.jsx(Ot,{onSave:b,onUndo:S,isDirty:f.formState.isDirty,isSaving:x})}),e[25]=f.formState.isDirty,e[26]=x,e[27]=S,e[28]=b,e[29]=w):w=e[29];let C;e[30]!==f?(C=t.jsx("div",{className:"h-full",children:t.jsx(_t,{form:f})}),e[30]=f,e[31]=C):C=e[31];let k;return e[32]!==w||e[33]!==C||e[34]!==P?(k=t.jsxs(xe,{children:[P,w,C]}),e[32]=w,e[33]=C,e[34]=P,e[35]=k):k=e[35],k}function Ut(s){const e=y.c(4),{itemId:o}=s;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=Rt(),e[0]=n):n=e[0];const l=n;if(!l){let a;return e[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(Ae,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=a):a=e[1],a}let r;return e[2]!==o?(r=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:null,children:t.jsx(Lt,{providerId:l,promptId:o})})}),e[2]=o,e[3]=r):r=e[3],r}function _e(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("min-w-0 overflow-hidden",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Me(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("ol",{"data-slot":"breadcrumb-list",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function q(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("inline-flex items-center gap-1.5 min-w-0",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("li",{"data-slot":"breadcrumb-item",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Q(s){const e=y.c(10);let o,n,l;e[0]!==s?({asChild:o,className:n,...l}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=l):(o=e[1],n=e[2],l=e[3]);const r=o?Ye:"a";let a;e[4]!==n?(a=V("hover:text-foreground transition-colors truncate",n),e[4]=n,e[5]=a):a=e[5];let c;return e[6]!==r||e[7]!==l||e[8]!==a?(c=t.jsx(r,{"data-slot":"breadcrumb-link",className:a,...l}),e[6]=r,e[7]=l,e[8]=a,e[9]=c):c=e[9],c}function De(s){const e=y.c(8);let o,n;e[0]!==s?({className:o,...n}=s,e[0]=s,e[1]=o,e[2]=n):(o=e[1],n=e[2]);let l;e[3]!==o?(l=V("text-foreground font-medium truncate",o),e[3]=o,e[4]=l):l=e[4];let r;return e[5]!==n||e[6]!==l?(r=t.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:l,...n}),e[5]=n,e[6]=l,e[7]=r):r=e[7],r}function Y(s){const e=y.c(12);let o,n,l;e[0]!==s?({children:o,className:n,...l}=s,e[0]=s,e[1]=o,e[2]=n,e[3]=l):(o=e[1],n=e[2],l=e[3]);let r;e[4]!==n?(r=V("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",n),e[4]=n,e[5]=r):r=e[5];let a;e[6]!==o?(a=o??t.jsx(St,{}),e[6]=o,e[7]=a):a=e[7];let c;return e[8]!==l||e[9]!==r||e[10]!==a?(c=t.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:r,...l,children:a}),e[8]=l,e[9]=r,e[10]=a,e[11]=c):c=e[11],c}const Bt=s=>s.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function Ft(s){const e=y.c(11),{toolName:o,connectionId:n,siblings:l,onSelectInstance:r,onBack:a}=s;let c;e[0]!==n?(c={connectionId:n},e[0]=n,e[1]=c):c=e[1];const i=wt(c);if(!i.isAuthenticated){let m;return e[2]!==i.supportsOAuth||e[3]!==a?(m=t.jsx("div",{className:"flex h-full items-center justify-center",children:i.supportsOAuth?t.jsx(ot,{onAuthenticate:()=>a(),buttonText:"Go back to authenticate"}):t.jsx(lt,{hasReadme:!1})}),e[2]=i.supportsOAuth,e[3]=a,e[4]=m):m=e[4],m}const u=`${n}:${o}`;let x;return e[5]!==n||e[6]!==r||e[7]!==l||e[8]!==u||e[9]!==o?(x=t.jsx(Vt,{toolName:o,connectionId:n,siblings:l,onSelectInstance:r},u),e[5]=n,e[6]=r,e[7]=l,e[8]=u,e[9]=o,e[10]=x):x=e[10],x}function Vt({toolName:s,connectionId:e,siblings:o,onSelectInstance:n}){const{replayId:l}=Xe({strict:!1}),r=(()=>{if(!l)return null;const d=`replay-${l}`,h=sessionStorage.getItem(d);if(!h)return null;sessionStorage.removeItem(d);try{return JSON.parse(h)}catch{return null}})(),a=(()=>{if(!r)return null;const d={};for(const[h,v]of Object.entries(r))v!==null&&typeof v=="object"?d[h]=JSON.stringify(v,null,2):d[h]=v;return d})(),[c,i]=T.useState(a??{}),[u,x]=T.useState(r?JSON.stringify(r,null,2):"{}"),[m,p]=T.useState(null),[f,g]=T.useState(null),[S,I]=T.useState(null),[R,$]=T.useState(null),[A,P]=T.useState(!1),[b,w]=T.useState(null),{org:C}=ie(),k=Oe(e),N=Tt(),E=Pt(),{setChatOpen:U}=kt(),z=`${e}:${s}`,_=ce({connectionId:e,orgId:C.id,orgSlug:C.slug}),L=It({client:_}),j=L.data?.tools?.find(d=>d.name===s),O=ut(j?._meta),J=d=>{if(!N)return;const h=$t(d.content);h.content.length>0&&(U(!0),N.sendMessage({tiptapDoc:h}))},[M,Z]=T.useState("json"),[ze,Le]=T.useState(!1);O&&!ze&&(Z("ui"),Le(!0));const pe=j?.inputSchema?.properties,fe=pe?Object.keys(pe):[],H=fe.length>0,W={};if(H&&j?.inputSchema?.properties)for(const d of fe)W[d]=j.inputSchema.required?.includes(d)?"":void 0;const ee=d=>Object.prototype.hasOwnProperty.call(c,d),Ue=async()=>{P(!0),$(null),p(null),g(null),I(null),w(null);const d=performance.now();try{if(!_)throw new Error("MCP client is not available");const h=H?{...W,...c}:(()=>{const D=u.trim();if(!D)return{};const B=JSON.parse(D);if(B&&typeof B=="object")return B;throw new Error("Raw JSON input must be an object.")})();H&&j?.inputSchema?.properties&&Object.entries(j.inputSchema.properties).forEach(([D,B])=>{if((B.type==="object"||B.type==="array")&&typeof h[D]=="string")try{h[D]=JSON.parse(h[D])}catch{}else if((B.type==="number"||B.type==="integer")&&typeof h[D]=="string"&&h[D]!==""){const je=Number(h[D]);Number.isNaN(je)||(h[D]=je)}});const v=await _.callTool({name:s,arguments:h}),K=v.structuredContent??v,He=performance.now(),We=Math.round(He-d);p(K),g(v),I(h);const Ke=JSON.stringify(K),ge=new TextEncoder().encode(Ke).length;w({duration:`${We}ms`,bytes:`${ge} bytes`,tokens:`~${Math.ceil(ge/4)} tokens`,cost:"$0.0000"})}catch(h){const v=h instanceof Error?h.message:String(h);$(v||"Unknown error occurred");const K=performance.now();w({duration:`${Math.round(K-d)}ms`})}finally{P(!1)}},te=(d,h)=>{i(v=>({...v,[d]:h}))},Be=()=>{p(null),g(null),I(null),$(null),w(null)},Fe=j?.name??Bt(s),Ve=t.jsx(_e,{children:t.jsxs(Me,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:C.slug},children:"Connections"})})}),t.jsx(Y,{}),k&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:C.slug,appSlug:yt(k)},search:{tab:"tools"},children:k.title})})}),t.jsx(Y,{})]}),t.jsx(q,{children:t.jsx(De,{children:Fe})})]})}),he=o.length>1&&t.jsxs(ve,{value:e,onValueChange:n,children:[t.jsx(Se,{className:"h-8 w-auto min-w-[200px]",children:t.jsx(ye,{})}),t.jsx(we,{children:o.map(d=>t.jsx(oe,{value:d.id,children:t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(Te,{icon:d.icon,name:d.title,size:"xs",className:"shrink-0"}),d.title]})},d.id))})]}),Je=t.jsxs("div",{className:"flex flex-col p-6 gap-4 overflow-auto",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),j?.inputSchema?.required&&j.inputSchema.required.length>0&&t.jsxs("span",{className:"text-xs text-muted-foreground",children:[t.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),t.jsx("div",{className:"space-y-4",children:H&&j?.inputSchema?.properties?Object.entries(j.inputSchema.properties).map(([d,h])=>t.jsxs("div",{className:"space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[d,j.inputSchema?.required?.includes(d)&&t.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),t.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:h.type})]}),h.description&&t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:h.description}),h.type==="object"||h.type==="array"?t.jsx(re,{className:"font-mono text-xs",value:ee(d)?c[d]??"":W[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d} as JSON...`,rows:3}):h.type==="boolean"?t.jsxs(ve,{value:ee(d)?String(c[d]??""):"",onValueChange:v=>te(d,v==="true"),children:[t.jsx(Se,{children:t.jsx(ye,{placeholder:"Select true or false..."})}),t.jsxs(we,{children:[t.jsx(oe,{value:"true",children:"true"}),t.jsx(oe,{value:"false",children:"false"})]})]}):t.jsx(ue,{value:ee(d)?c[d]??"":W[d]??"",onChange:v=>te(d,v.target.value),placeholder:`Enter ${d}...`})]},d)):j?.inputSchema&&!H?t.jsxs("div",{className:"space-y-2",children:[t.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),t.jsx(re,{className:"font-mono text-xs min-h-[120px]",value:u,onChange:d=>x(d.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):t.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})}),t.jsx("div",{className:"flex items-center gap-2 pt-2",children:A?t.jsxs(F,{size:"sm",variant:"destructive",className:"h-8 gap-2",onClick:Be,children:[t.jsx(at,{className:"h-3.5 w-3.5"}),"Cancel"]}):t.jsxs(F,{size:"sm",variant:"default",className:"h-8 gap-2",onClick:Ue,children:[t.jsx(vt,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})})]}),qe=t.jsxs("div",{className:"flex flex-col @3xl:h-full @3xl:overflow-hidden",children:[t.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-b border-border bg-background",children:[t.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),t.jsxs("div",{className:"flex items-center gap-3",children:[b&&t.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(bt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(ct,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&t.jsxs("div",{className:"flex items-center gap-1.5",children:[t.jsx(dt,{className:"h-3 w-3 text-muted-foreground"}),t.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&t.jsx("div",{className:"flex items-center gap-1.5",children:t.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]}),O&&t.jsx(gt,{children:t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="ui"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Z("ui"),children:t.jsx(mt,{size:14})})}),t.jsx($e,{children:"Interactive view"})]}),t.jsxs(Ce,{children:[t.jsx(Ie,{asChild:!0,children:t.jsx(F,{size:"icon",variant:M==="json"?"secondary":"ghost",className:"h-8 w-8",onClick:()=>Z("json"),children:t.jsx(be,{size:14})})}),t.jsx($e,{children:"JSON view"})]})]})})]})]}),R&&t.jsx("div",{className:"px-6 py-4 bg-background",children:t.jsx(pt,{variant:"destructive",children:t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(jt,{className:"h-4 w-4"}),t.jsx(ft,{className:"mb-0",children:"Execution Failed"})]}),t.jsx(ht,{className:"text-xs text-destructive",children:R})]})})}),t.jsx("div",{className:"relative flex-1 min-h-[400px] @3xl:min-h-0 @3xl:overflow-auto bg-muted/50",children:O&&M==="ui"&&_?t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex items-center justify-center h-48",children:t.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[t.jsx("div",{className:"size-4 border-2 border-current border-t-transparent rounded-full animate-spin"}),t.jsx("span",{className:"text-sm",children:"Loading app..."})]})}),children:t.jsx(xt,{resourceURI:O,toolInfo:j?{tool:j}:void 0,toolInput:S??void 0,toolResult:f??void 0,displayMode:"fullscreen",minHeight:Ne.view.minHeight,maxHeight:Ne.view.maxHeight,client:_,onMessage:J,onUpdateModelContext:d=>E?.setAppContext(z,d),onTeardown:()=>E?.clearAppContext(z),className:"h-full"})}):m?t.jsxs(t.Fragment,{children:[t.jsx(At,{code:JSON.stringify(m,null,2),language:"json",height:"100%",readOnly:!0}),t.jsx(F,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m,null,2)),Ze.success("Copied to clipboard")},children:t.jsx(Nt,{className:"h-3.5 w-3.5"})})]}):t.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[t.jsx(be,{className:"h-12 w-12 mb-3 opacity-40"}),t.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]});return t.jsx(xe,{breadcrumb:Ve,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden @container",children:[t.jsxs("div",{className:"flex flex-col gap-3 py-7 px-8 bg-background border-b border-border shrink-0",children:[t.jsxs("div",{className:"flex items-center gap-4",children:[t.jsx(Te,{icon:k?.icon||null,name:k?.title||s,size:"xl",className:"shrink-0"}),t.jsx("h1",{className:"text-xl font-semibold tracking-tight text-foreground leading-none truncate",children:s}),t.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit shrink-0",children:[L.isSuccess?t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):L.isLoading?t.jsx(X,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):t.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),t.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:L.isSuccess?"ready":L.isLoading?"connecting":"error"})]}),t.jsx(Ct,{annotations:j?.annotations,_meta:j?._meta}),t.jsx("div",{className:"hidden @3xl:flex items-center ml-auto shrink-0",children:he})]}),t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:j?.description||"No description available"})]}),o.length>1&&t.jsxs("div",{className:"flex @3xl:hidden items-center gap-3 px-8 py-3 border-b border-border",children:[t.jsx("span",{className:"text-xs font-medium text-muted-foreground shrink-0",children:"Instance"}),he]}),t.jsx("div",{className:"flex-1 overflow-auto @3xl:overflow-hidden",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-[minmax(0,2fr)_minmax(0,5fr)] @3xl:h-full @3xl:grid-rows-1",children:[t.jsx("div",{className:"@3xl:border-r border-border @3xl:overflow-auto",children:Je}),qe]})})]})})}function Jt(s){const e=y.c(10),{itemId:o,siblings:n,onBack:l}=s,[r,a]=T.useState(n[0]?.id??"");let c;e[0]!==r||e[1]!==n?(c=n.find(p=>p.id===r)?.id??n[0]?.id??"",e[0]=r,e[1]=n,e[2]=c):c=e[2];const i=c;if(!Oe(i||void 0)||!i){let p;return e[3]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[t.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),t.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[3]=p):p=e[3],p}let x;e[4]===Symbol.for("react.memo_cache_sentinel")?(x=t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(X,{size:32,className:"animate-spin text-muted-foreground"})}),e[4]=x):x=e[4];let m;return e[5]!==i||e[6]!==l||e[7]!==n||e[8]!==o?(m=t.jsx(T.Suspense,{fallback:x,children:t.jsx(Ft,{toolName:o,connectionId:i,siblings:n,onSelectInstance:a,onBack:l})}),e[5]=i,e[6]=l,e[7]=n,e[8]=o,e[9]=m):m=e[9],m}function qt(s){const e=y.c(21),{icon:o,illustration:n,title:l,description:r,buttonProps:a,buttonComponent:c,className:i,children:u}=s;let x;e[0]!==i?(x=V("flex flex-col items-center justify-center py-16 text-center",i),e[0]=i,e[1]=x):x=e[1];let m;e[2]!==o||e[3]!==n?(m=n?t.jsx("div",{className:"mb-4 text-muted-foreground/50",children:n}):o?t.jsx("div",{className:"mb-4 flex h-12 w-12 items-center justify-center rounded-xl bg-muted/50 text-muted-foreground",children:o}):null,e[2]=o,e[3]=n,e[4]=m):m=e[4];let p;e[5]!==l?(p=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:l}),e[5]=l,e[6]=p):p=e[6];let f;e[7]!==r?(f=r&&t.jsx("div",{className:"text-sm text-muted-foreground",children:r}),e[7]=r,e[8]=f):f=e[8];let g;e[9]!==p||e[10]!==f?(g=t.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-sm",children:[p,f]}),e[9]=p,e[10]=f,e[11]=g):g=e[11];let S;e[12]!==c||e[13]!==a?(S=(c??a)&&t.jsx("div",{className:"mt-4",children:c??(a&&t.jsx(F,{size:"sm",className:V(a?.className),...a}))}),e[12]=c,e[13]=a,e[14]=S):S=e[14];let I;return e[15]!==u||e[16]!==x||e[17]!==m||e[18]!==g||e[19]!==S?(I=t.jsxs("div",{className:x,children:[m,g,S,u]}),e[15]=u,e[16]=x,e[17]=m,e[18]=g,e[19]=S,e[20]=I):I=e[20],I}const Ht={prompt:Ut};function Wt(){const s=y.c(9),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),l=decodeURIComponent(n.itemId);let r;s[1]!==n.appSlug?(r={slug:n.appSlug},s[1]=n.appSlug,s[2]=r):r=s[2];const a=Re(r);let c;s[3]!==e.history?(c=()=>{e.history.back()},s[3]=e.history,s[4]=c):c=s[4];const i=c,u=Kt;let x;return s[5]!==i||s[6]!==l||s[7]!==a?(x=t.jsx(Jt,{itemId:l,siblings:a,onBack:i,onUpdate:u}),s[5]=i,s[6]=l,s[7]=a,s[8]=x):x=s[8],x}async function Kt(s){return Promise.resolve()}function Gt(s){return s.toLowerCase().split("_").map(e=>e.charAt(0).toUpperCase()+e.slice(1)).join(" ")}function Qt(){const s=y.c(41),e=ke();let o;s[0]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=o):o=s[0];const n=ae(o),l=decodeURIComponent(n.collectionName),r=decodeURIComponent(n.itemId);let a;s[1]!==e.history?(a=()=>{e.history.back()},s[1]=e.history,s[2]=a):a=s[2];const c=a,{org:i}=ie();let u;s[3]!==n.appSlug?(u={slug:n.appSlug},s[3]=n.appSlug,s[4]=u):u=s[4];const m=Re(u)[0]??null,p=m?.id??"",f=p||"no-connection",g=p??null;let S;s[5]!==i.id||s[6]!==i.slug||s[7]!==g?(S={connectionId:g,orgId:i.id,orgSlug:i.slug},s[5]=i.id,s[6]=i.slug,s[7]=g,s[8]=S):S=s[8];const I=ce(S),R=Ee(f,l,I);let $;s[9]!==R||s[10]!==r?($=async M=>{r&&await R.update.mutateAsync({id:r,data:M})},s[9]=R,s[10]=r,s[11]=$):$=s[11];const A=$;let P;s[12]!==l?(P=l?.toLowerCase(),s[12]=l,s[13]=P):P=s[13];const b=P,w=b&&Ht[b];let C;s[14]!==l?(C=Gt(l),s[14]=l,s[15]=C):C=s[15];const k=C;let N;s[16]!==i.slug?(N=t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections",params:{org:i.slug},children:"Connections"})})}),s[16]=i.slug,s[17]=N):N=s[17];let E;s[18]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(Y,{}),s[18]=E):E=s[18];let U;s[19]!==l||s[20]!==m||s[21]!==i.slug||s[22]!==n.appSlug?(U=m&&t.jsxs(t.Fragment,{children:[t.jsx(q,{children:t.jsx(Q,{asChild:!0,children:t.jsx(G,{to:"/$org/settings/connections/$appSlug",params:{org:i.slug,appSlug:n.appSlug},search:{tab:l},children:m.title})})}),t.jsx(Y,{})]}),s[19]=l,s[20]=m,s[21]=i.slug,s[22]=n.appSlug,s[23]=U):U=s[23];let z;s[24]!==k?(z=t.jsx(q,{children:t.jsx(De,{children:k})}),s[24]=k,s[25]=z):z=s[25];let _;s[26]!==U||s[27]!==z||s[28]!==N?(_=t.jsx(_e,{children:t.jsxs(Me,{children:[N,E,U,z]})}),s[26]=U,s[27]=z,s[28]=N,s[29]=_):_=s[29];const L=_;if(w){let M;return s[30]!==w||s[31]!==c||s[32]!==A||s[33]!==r?(M=t.jsx(w,{itemId:r,onBack:c,onUpdate:A}),s[30]=w,s[31]=c,s[32]=A,s[33]=r,s[34]=M):M=s[34],M}let j;s[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx(Et,{size:36,className:"text-muted-foreground"}),s[35]=j):j=s[35];let O;s[36]!==c?(O=t.jsx(qt,{icon:j,title:"No component defined",description:"No component for this collection was defined",buttonProps:{onClick:c,children:"Go back"}}),s[36]=c,s[37]=O):O=s[37];let J;return s[38]!==L||s[39]!==O?(J=t.jsx(xe,{breadcrumb:L,children:O}),s[38]=L,s[39]=O,s[40]=J):J=s[40],J}function Yt(){const s=y.c(3);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/shell/$org/settings/connections/$appSlug/$collectionName/$itemId"},s[0]=e):e=s[0];const o=ae(e);if(decodeURIComponent(o.collectionName)==="tools"){let a;return s[1]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Wt,{}),s[1]=a):a=s[1],a}let r;return s[2]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Qt,{}),s[2]=r):r=s[2],r}function Dn(){const s=y.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Pe,{children:t.jsx(T.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center",children:t.jsx(X,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(Yt,{})})}),s[0]=e):e=s[0],e}export{Dn as default};
@@ -1 +1 @@
1
- import{c as B,j as s,l as M,B as V}from"./index-D0U_smqt.js";import{c as z,a as _,b as $,D as E}from"./dropdown-menu-bs6nmOyP.js";import{i as L,n as O,b as R,d as A,c as F}from"./SwitchHorizontal01-y3DhestF.js";import{i as S}from"./Check-D3J8f8u-.js";import{T as I,a as K,c as P,b as W}from"./tooltip-DO1R3Vmb.js";import{V as q}from"./view-mode-toggle-BNmCyKXO.js";import{B as G}from"./badge-DSiiJMKS.js";function te(t){const e=B.c(31),{viewMode:r,onViewModeChange:m,sortKey:T,sortDirection:p,onSort:f,sortOptions:u,filters:h}=t;let g;e[0]!==u?(g=u===void 0?[]:u,e[0]=u,e[1]=g):g=e[1];const j=g;let b;e[2]!==h?(b=h===void 0?[]:h,e[2]=h,e[3]=b):b=e[3];const l=b;let v;e[4]!==l?(v=l.filter(J),e[4]=l,e[5]=v):v=e[5];const N=v.length;let w;e[6]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(R,{size:16}),e[6]=w):w=e[6];let i;e[7]!==N?(i=N>0&&s.jsx(G,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:N}),e[7]=N,e[8]=i):i=e[8];let o;e[9]!==i?(o=s.jsx(I,{asChild:!0,children:s.jsx(_,{asChild:!0,children:s.jsxs(V,{variant:"outline",size:"icon",className:"relative",children:[w,i]})})}),e[9]=i,e[10]=o):o=e[10];let C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(K,{children:"Display & filters"}),e[11]=C):C=e[11];let n;e[12]!==o?(n=s.jsx(P,{children:s.jsxs(W,{children:[o,C]})}),e[12]=o,e[13]=n):n=e[13];let a;e[14]!==m||e[15]!==r?(a=m&&r&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(q,{value:r,onValueChange:m,fullWidth:!0,options:[{value:"table",icon:s.jsx(A,{})},{value:"cards",icon:s.jsx(F,{})}]})}),e[14]=m,e[15]=r,e[16]=a):a=e[16];let c;e[17]!==f||e[18]!==p||e[19]!==T||e[20]!==j?(c=j.length>0&&f&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Sort by"}),j.map(y=>{const D=T===y.id;return s.jsx(z,{onClick:()=>f(y.id),className:M("h-8 px-2 py-0 cursor-pointer",D&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[D&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!D&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:y.label}),D&&p&&(p==="asc"?s.jsx(L,{size:16,className:"text-foreground shrink-0"}):s.jsx(O,{size:16,className:"text-foreground shrink-0"}))]})},y.id)})]}),e[17]=f,e[18]=p,e[19]=T,e[20]=j,e[21]=c):c=e[21];let d;e[22]!==l?(d=l.map(H),e[22]=l,e[23]=d):d=e[23];let x;e[24]!==a||e[25]!==c||e[26]!==d?(x=s.jsxs($,{align:"end",className:"w-[200px] p-0 gap-0",children:[a,c,d]}),e[24]=a,e[25]=c,e[26]=d,e[27]=x):x=e[27];let k;return e[28]!==n||e[29]!==x?(k=s.jsxs(E,{children:[n,x]}),e[28]=n,e[29]=x,e[30]=k):k=e[30],k}function H(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const r=t.value===e.id;return s.jsx(z,{onClick:()=>t.onChange(e.id),className:M("h-8 px-2 py-0 cursor-pointer",r&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[r&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!r&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function J(t){return t.value!=="ALL"}export{te as C};
1
+ import{c as B,j as s,l as M,B as V}from"./index-D9IK491L.js";import{c as z,a as _,b as $,D as E}from"./dropdown-menu-DYoIlQSg.js";import{i as L,n as O,b as R,d as A,c as F}from"./SwitchHorizontal01-B6awNCuJ.js";import{i as S}from"./Check-CBlc59JS.js";import{T as I,a as K,c as P,b as W}from"./tooltip-DVqOmAgj.js";import{V as q}from"./view-mode-toggle-DIP0BMUY.js";import{B as G}from"./badge-C-FrgWTB.js";function te(t){const e=B.c(31),{viewMode:r,onViewModeChange:m,sortKey:T,sortDirection:p,onSort:f,sortOptions:u,filters:h}=t;let g;e[0]!==u?(g=u===void 0?[]:u,e[0]=u,e[1]=g):g=e[1];const j=g;let b;e[2]!==h?(b=h===void 0?[]:h,e[2]=h,e[3]=b):b=e[3];const l=b;let v;e[4]!==l?(v=l.filter(J),e[4]=l,e[5]=v):v=e[5];const N=v.length;let w;e[6]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(R,{size:16}),e[6]=w):w=e[6];let i;e[7]!==N?(i=N>0&&s.jsx(G,{variant:"default",className:"absolute -top-1.5 -right-1.5 h-4 min-w-4 px-1 text-[10px] leading-none",children:N}),e[7]=N,e[8]=i):i=e[8];let o;e[9]!==i?(o=s.jsx(I,{asChild:!0,children:s.jsx(_,{asChild:!0,children:s.jsxs(V,{variant:"outline",size:"icon",className:"relative",children:[w,i]})})}),e[9]=i,e[10]=o):o=e[10];let C;e[11]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(K,{children:"Display & filters"}),e[11]=C):C=e[11];let n;e[12]!==o?(n=s.jsx(P,{children:s.jsxs(W,{children:[o,C]})}),e[12]=o,e[13]=n):n=e[13];let a;e[14]!==m||e[15]!==r?(a=m&&r&&s.jsx("div",{className:"p-2 border-b border-border",children:s.jsx(q,{value:r,onValueChange:m,fullWidth:!0,options:[{value:"table",icon:s.jsx(A,{})},{value:"cards",icon:s.jsx(F,{})}]})}),e[14]=m,e[15]=r,e[16]=a):a=e[16];let c;e[17]!==f||e[18]!==p||e[19]!==T||e[20]!==j?(c=j.length>0&&f&&s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Sort by"}),j.map(y=>{const D=T===y.id;return s.jsx(z,{onClick:()=>f(y.id),className:M("h-8 px-2 py-0 cursor-pointer",D&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[D&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!D&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:y.label}),D&&p&&(p==="asc"?s.jsx(L,{size:16,className:"text-foreground shrink-0"}):s.jsx(O,{size:16,className:"text-foreground shrink-0"}))]})},y.id)})]}),e[17]=f,e[18]=p,e[19]=T,e[20]=j,e[21]=c):c=e[21];let d;e[22]!==l?(d=l.map(H),e[22]=l,e[23]=d):d=e[23];let x;e[24]!==a||e[25]!==c||e[26]!==d?(x=s.jsxs($,{align:"end",className:"w-[200px] p-0 gap-0",children:[a,c,d]}),e[24]=a,e[25]=c,e[26]=d,e[27]=x):x=e[27];let k;return e[28]!==n||e[29]!==x?(k=s.jsxs(E,{children:[n,x]}),e[28]=n,e[29]=x,e[30]=k):k=e[30],k}function H(t){return s.jsxs("div",{className:"p-1 flex flex-col gap-0.5 border-b border-border last:border-b-0",children:[s.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:t.label}),t.options.map(e=>{const r=t.value===e.id;return s.jsx(z,{onClick:()=>t.onChange(e.id),className:M("h-8 px-2 py-0 cursor-pointer",r&&"bg-accent"),children:s.jsxs("div",{className:"flex items-center gap-2 w-full",children:[r&&s.jsx(S,{size:16,className:"text-foreground shrink-0"}),!r&&s.jsx("div",{className:"w-4 shrink-0"}),s.jsx("span",{className:"text-sm text-foreground flex-1",children:e.label})]})},e.id)})]},t.label)}function J(t){return t.value!=="ALL"}export{te as C};
@@ -1 +1 @@
1
- import{c as v,l as b,j as a,i as w}from"./index-D0U_smqt.js";import{i as C}from"./SearchMd-CJ_dFCp5.js";function S(j){const e=v.c(21),{value:d,onChange:m,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,p=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const h=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?a.jsx(w,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):a.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==m?(r=N=>m(N.target.value),e[6]=m,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==d?(o=a.jsx("input",{type:"text",value:d,onChange:r,onKeyDown:x,placeholder:p,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=p,e[11]=r,e[12]=d,e[13]=o):o=e[13];let n;e[14]!==s||e[15]!==l||e[16]!==o?(n=a.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=n):n=e[17];let c;return e[18]!==t||e[19]!==n?(c=a.jsx("div",{className:t,children:n}),e[18]=t,e[19]=n,e[20]=c):c=e[20],c}export{S as C};
1
+ import{c as v,l as b,j as a,i as w}from"./index-D9IK491L.js";import{i as C}from"./SearchMd-kFyk-Zpn.js";function S(j){const e=v.c(21),{value:d,onChange:m,placeholder:g,onKeyDown:x,className:u,isSearching:f,disabled:i}=j,p=g===void 0?"Search...":g;let t;e[0]!==u?(t=b("shrink-0 w-full border-b border-border h-12",u),e[0]=u,e[1]=t):t=e[1];const h=i?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let l;e[4]!==f?(l=f?a.jsx(w,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):a.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=f,e[5]=l):l=e[5];let r;e[6]!==m?(r=N=>m(N.target.value),e[6]=m,e[7]=r):r=e[7];let o;e[8]!==i||e[9]!==x||e[10]!==p||e[11]!==r||e[12]!==d?(o=a.jsx("input",{type:"text",value:d,onChange:r,onKeyDown:x,placeholder:p,disabled:i,className:"flex-1 min-w-0 bg-transparent text-sm text-foreground placeholder:text-muted-foreground/50 outline-none"}),e[8]=i,e[9]=x,e[10]=p,e[11]=r,e[12]=d,e[13]=o):o=e[13];let n;e[14]!==s||e[15]!==l||e[16]!==o?(n=a.jsxs("label",{className:s,children:[l,o]}),e[14]=s,e[15]=l,e[16]=o,e[17]=n):n=e[17];let c;return e[18]!==t||e[19]!==n?(c=a.jsx("div",{className:t,children:n}),e[18]=t,e[19]=n,e[20]=c):c=e[20],c}export{S as C};
@@ -1 +1 @@
1
- import{c as f,l as u,j as m}from"./index-D0U_smqt.js";import{B as g}from"./badge-DSiiJMKS.js";function h(x){const e=f.c(12),{tabs:c,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==c){let l;e[6]!==n||e[7]!==s?(l=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=l):l=e[8],r=c.map(l),e[2]=n,e[3]=s,e[4]=c,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{h as C};
1
+ import{c as f,l as u,j as m}from"./index-D9IK491L.js";import{B as g}from"./badge-C-FrgWTB.js";function h(x){const e=f.c(12),{tabs:c,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==c){let l;e[6]!==n||e[7]!==s?(l=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=l):l=e[8],r=c.map(l),e[2]=n,e[3]=s,e[4]=c,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{h as C};
@@ -1 +1 @@
1
- import{c as d,l as i,j as n}from"./index-D0U_smqt.js";import{_ as m}from"./index-BRnQ22g3.js";import{d as k,a as N,b as j,D as b,c as w}from"./dialog-CQ6B0IwC.js";import{i as y}from"./SearchMd-CJ_dFCp5.js";function C(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function S(a){const e=d.c(24);let t,s,o,l,r;e[0]!==a?({title:l,description:r,children:t,className:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5]);const _=l===void 0?"Command Palette":l,v=r===void 0?"Search for a command to run...":r;let c;e[6]!==_?(c=n.jsx(N,{children:_}),e[6]=_,e[7]=c):c=e[7];let p;e[8]!==v?(p=n.jsx(j,{children:v}),e[8]=v,e[9]=p):p=e[9];let u;e[10]!==c||e[11]!==p?(u=n.jsxs(b,{className:"sr-only",children:[c,p]}),e[10]=c,e[11]=p,e[12]=u):u=e[12];let f;e[13]!==s?(f=i("overflow-hidden p-0",s),e[13]=s,e[14]=f):f=e[14];let x;e[15]!==t?(x=n.jsx(C,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:t}),e[15]=t,e[16]=x):x=e[16];let g;e[17]!==f||e[18]!==x?(g=n.jsx(w,{className:f,closeButtonClassName:"hidden",children:x}),e[17]=f,e[18]=x,e[19]=g):g=e[19];let h;return e[20]!==o||e[21]!==u||e[22]!==g?(h=n.jsxs(k,{...o,children:[u,g]}),e[20]=o,e[21]=u,e[22]=g,e[23]=h):h=e[23],h}function z(a){const e=d.c(9);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(y,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let r;return e[6]!==s||e[7]!==l?(r=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=r):r=e[8],r}function G(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function L(a){const e=d.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(m.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function H(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{L as C,H as a,z as b,G as c,C as d,R as e,B as f,S as g};
1
+ import{c as d,l as i,j as n}from"./index-D9IK491L.js";import{_ as m}from"./index-D972QGLJ.js";import{d as k,a as N,b as j,D as b,c as w}from"./dialog-D5b28yFH.js";import{i as y}from"./SearchMd-kFyk-Zpn.js";function C(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function S(a){const e=d.c(24);let t,s,o,l,r;e[0]!==a?({title:l,description:r,children:t,className:s,...o}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5]);const _=l===void 0?"Command Palette":l,v=r===void 0?"Search for a command to run...":r;let c;e[6]!==_?(c=n.jsx(N,{children:_}),e[6]=_,e[7]=c):c=e[7];let p;e[8]!==v?(p=n.jsx(j,{children:v}),e[8]=v,e[9]=p):p=e[9];let u;e[10]!==c||e[11]!==p?(u=n.jsxs(b,{className:"sr-only",children:[c,p]}),e[10]=c,e[11]=p,e[12]=u):u=e[12];let f;e[13]!==s?(f=i("overflow-hidden p-0",s),e[13]=s,e[14]=f):f=e[14];let x;e[15]!==t?(x=n.jsx(C,{className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:t}),e[15]=t,e[16]=x):x=e[16];let g;e[17]!==f||e[18]!==x?(g=n.jsx(w,{className:f,closeButtonClassName:"hidden",children:x}),e[17]=f,e[18]=x,e[19]=g):g=e[19];let h;return e[20]!==o||e[21]!==u||e[22]!==g?(h=n.jsxs(k,{...o,children:[u,g]}),e[20]=o,e[21]=u,e[22]=g,e[23]=h):h=e[23],h}function z(a){const e=d.c(9);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(y,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let r;return e[6]!==s||e[7]!==l?(r=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=r):r=e[8],r}function G(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function L(a){const e=d.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(m.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function R(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function B(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function H(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{L as C,H as a,z as b,G as c,C as d,R as e,B as f,S as g};
@@ -1 +1 @@
1
- import{c as E,j as t,u as Re,a as Ee,b as ye,m as Ne,r as L,d as Ce,i as be,n as _e,K as pe,k as he,B as le,L as ze}from"./index-D0U_smqt.js";import{A as Te}from"./auth-entry-CW5gsTiA.js";import{A}from"./auth-split-layout-BC0lphRW.js";import{O as xe}from"./organization-choice-BhcilQzG.js";import{f as Oe}from"./tab-id-BptcWVWa.js";import{I as we}from"./input-Ccm3ShdT.js";import{S as Ie,u as Pe,W as Ue,g as Le,C as Ae}from"./use-mcp-client-DilmxmKU.js";import{i as ve}from"./ArrowRight-DjM-WAe8.js";import{i as $e}from"./Check-D3J8f8u-.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./avatar-CXZnLPEU.js";import"./User01-BI5RuTWy.js";import"./auth-rl3GT7t8.js";const ke=/^[a-zA-Z][a-zA-Z\d+.-]*:/,Me=/^[a-zA-Z][a-zA-Z\d+.-]*:\/\//,De=/^[^\s/:?#]+\.[^\s/:?#]+:\d+(?:[/?#]|$)/,He=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i;function je(l){const e=l.trim();if(!e)return{ok:!1,error:"Enter a website URL."};const i=ke.test(e),s=Me.test(e),a=De.test(e);if(i&&!s&&!a)return{ok:!1,error:"Use an HTTP or HTTPS website URL."};const c=s?e:`https://${e}`;let n;try{n=new URL(c)}catch{return{ok:!1,error:"Enter a valid website URL."}}if(n.protocol!=="http:"&&n.protocol!=="https:")return{ok:!1,error:"Use an HTTP or HTTPS website URL."};const o=n.hostname.split(".");return o.length<2||o.some(m=>!m||!He.test(m))?{ok:!1,error:"Enter a valid website URL."}:(n.protocol="https:",{ok:!0,value:n.origin})}function mt(){const l=E.c(1);let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(We,{}),l[0]=e):e=l[0],e}function We(){const l=E.c(6);let e;l[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/commerce-onboarding"},l[0]=e):e=l[0];const i=Re(e),{org:s,siteUrl:a}=i,{data:c,isPending:n}=Ee.useSession();if(n){let m;return l[1]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(A,{children:t.jsx(Y,{label:"Preparing commerce onboarding..."})}),l[1]=m):m=l[1],m}if(!c){const m=typeof window>"u"?"/commerce-onboarding":`${window.location.pathname}${window.location.search}`;let g;return l[2]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(A,{children:t.jsx(Te,{callbackUrl:m,allowAutoLogin:!1})}),l[2]=g):g=l[2],g}let o;return l[3]!==s||l[4]!==a?(o=t.jsx(Fe,{requestedOrgSlug:s,siteUrl:a}),l[3]=s,l[4]=a,l[5]=o):o=l[5],o}function Fe(l){const e=E.c(40),{requestedOrgSlug:i,siteUrl:s}=l,a=ye(),c=Ne(),[n,o]=L.useState(null),[m,g]=L.useState(null),h=c.data?.map(Ve)??[];let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p={mutationFn:qe,retry:!1,onSuccess:r=>{g(r)}},e[0]=p):p=e[0];const f=Ce(p);if(c.isPending){let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(A,{children:t.jsx(Y,{label:"Preparing commerce onboarding..."})}),e[1]=r):r=e[1],r}if(c.error){let r;return e[2]!==c?(r=t.jsx(re,{title:"We could not load your organizations",description:"Retry to continue commerce setup from this page.",actionLabel:"Retry",onRetry:()=>c.refetch()}),e[2]=c,e[3]=r):r=e[3],r}const S=i?h.find(r=>r.slug===i):null;if(S){let r;return e[4]!==S||e[5]!==s?(r=t.jsx(ne,{org:S,initialSiteUrl:s}),e[4]=S,e[5]=s,e[6]=r):r=e[6],r}if(i){let r;return e[7]!==c?(r=t.jsx(re,{title:"Organization not found",description:"We could not find that organization for your account.",actionLabel:"Retry",onRetry:()=>c.refetch()}),e[7]=c,e[8]=r):r=e[8],r}if(n){let r;return e[9]!==n||e[10]!==s?(r=t.jsx(ne,{org:n,initialSiteUrl:s}),e[9]=n,e[10]=s,e[11]=r):r=e[11],r}if(h.length===1&&h[0]){let r;return e[12]!==h[0]||e[13]!==s?(r=t.jsx(ne,{org:h[0],initialSiteUrl:s}),e[12]=h[0],e[13]=s,e[14]=r):r=e[14],r}if(h.length>1){let r;e[15]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(U,{title:"Choose an organization",description:"Select where commerce diagnostics should continue."}),e[15]=r):r=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=v=>o(v),e[16]=x):x=e[16];let b;return e[17]!==h?(b=t.jsx(A,{children:t.jsxs("div",{className:"grid gap-10",children:[r,t.jsx(xe,{organizations:h,selectLabel:"Continue",onSelected:x})]})}),e[17]=h,e[18]=b):b=e[18],b}if(!m){let r;e[19]!==f?(r=()=>{f.reset(),f.mutate()},e[19]=f,e[20]=r):r=e[20];let x;return e[21]!==f||e[22]!==r?(x=t.jsx(Ye,{mutation:f,onRetry:r}),e[21]=f,e[22]=r,e[23]=x):x=e[23],x}const d=m;if(d?.success&&(d.status==="created"||d.status==="joined"||d.status==="already_has_organization")&&d.organization){let r;return e[24]!==d.organization||e[25]!==s?(r=t.jsx(ne,{org:d.organization,initialSiteUrl:s}),e[24]=d.organization,e[25]=s,e[26]=r):r=e[26],r}if(d?.status==="ambiguous"&&d.organizations&&d.organizations.length>0){let r;e[27]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(U,{title:"Choose an organization",description:"Your email can access more than one organization. Choose where commerce setup should continue."}),e[27]=r):r=e[27];const x=d.domain??void 0;let b;e[28]!==a||e[29]!==s?(b=($,z)=>{_e(),o({...$,slug:z}),a({to:"/commerce-onboarding",search:{org:z,siteUrl:s}})},e[28]=a,e[29]=s,e[30]=b):b=e[30];let v;return e[31]!==d.organizations||e[32]!==x||e[33]!==b?(v=t.jsx(A,{children:t.jsxs("div",{className:"grid gap-10",children:[r,t.jsx(xe,{organizations:d.organizations,domain:x,onJoined:b})]})}),e[31]=d.organizations,e[32]=x,e[33]=b,e[34]=v):v=e[34],v}const C=d?.error??"We could not determine a commerce organization for this account.";let N;e[35]!==f?(N=()=>{g(null),f.reset()},e[35]=f,e[36]=N):N=e[36];let w;return e[37]!==C||e[38]!==N?(w=t.jsx(re,{title:"Commerce onboarding needs support",description:C,actionLabel:"Try again",onRetry:N}),e[37]=C,e[38]=N,e[39]=w):w=e[39],w}async function qe(){const e=await(await fetch("/api/auth/custom/ensure-organization",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}})).json();return e.success&&(e.status==="created"||e.status==="joined"||e.status==="already_has_organization")&&e.organization&&_e(),e}function Ve(l){return{id:l.id,name:l.name,slug:l.slug,logo:l.logo??null}}function Ye(l){const e=E.c(7),{mutation:i,onRetry:s}=l,a=L.useRef(!1);let c;e[0]!==i?(c=g=>{!g||a.current||(a.current=!0,i.mutate())},e[0]=i,e[1]=c):c=e[1];const n=c;if(i.error){let g;return e[2]!==s?(g=t.jsx(re,{title:"Commerce onboarding is unavailable",description:"We could not prepare an organization for commerce setup. Retry from this page or contact support.",actionLabel:"Retry",onRetry:s}),e[2]=s,e[3]=g):g=e[3],g}let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Y,{label:"Preparing your commerce workspace..."}),e[4]=o):o=e[4];let m;return e[5]!==n?(m=t.jsx(A,{children:t.jsx("div",{ref:n,children:o})}),e[5]=n,e[6]=m):m=e[6],m}function U(l){const e=E.c(9),{title:i,description:s}=l;let a,c;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),c=t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"}),e[0]=a,e[1]=c):(a=e[0],c=e[1]);let n;e[2]!==i?(n=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:i}),e[2]=i,e[3]=n):n=e[3];let o;e[4]!==s?(o=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:s}),e[4]=s,e[5]=o):o=e[5];let m;return e[6]!==n||e[7]!==o?(m=t.jsxs("div",{className:"grid gap-10",children:[a,c,t.jsxs("div",{className:"space-y-2",children:[n,o]})]}),e[6]=n,e[7]=o,e[8]=m):m=e[8],m}function Y(l){const e=E.c(3),{label:i}=l;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(be,{size:14,className:"animate-spin text-muted-foreground"}),e[0]=s):s=e[0];let a;return e[1]!==i?(a=t.jsxs("div",{className:"flex items-center gap-2 py-4",role:"status","aria-live":"polite",children:[s,t.jsx("span",{className:"text-sm text-muted-foreground",children:i})]}),e[1]=i,e[2]=a):a=e[2],a}function re(l){const e=E.c(9),{title:i,description:s,actionLabel:a,onRetry:c}=l;let n;e[0]!==s||e[1]!==i?(n=t.jsx(U,{title:i,description:s}),e[0]=s,e[1]=i,e[2]=n):n=e[2];let o;e[3]!==a||e[4]!==c?(o=t.jsx(le,{type:"button",size:"xl",className:"w-full",onClick:c,children:a}),e[3]=a,e[4]=c,e[5]=o):o=e[5];let m;return e[6]!==n||e[7]!==o?(m=t.jsx(A,{children:t.jsxs("div",{className:"grid gap-10",children:[n,o]})}),e[6]=n,e[7]=o,e[8]=m):m=e[8],m}function Ke(l){return l.content?.find(e=>e.text)?.text??"Commerce Discovery setup failed."}function fe(l){const e=l;if(e.isError)throw new Error(Ke(e));return e.structuredContent??l}function ne(l){const e=E.c(5),{org:i,initialSiteUrl:s}=l;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Y,{label:"Connecting workspace..."}),e[0]=a):a=e[0];const c=`${i.id}:${s??""}`;let n;return e[1]!==s||e[2]!==i||e[3]!==c?(n=t.jsx(A,{children:t.jsx(L.Suspense,{fallback:a,children:t.jsx(Qe,{org:i,initialSiteUrl:s},c)})}),e[1]=s,e[2]=i,e[3]=c,e[4]=n):n=e[4],n}function Qe(l){const e=E.c(100),{org:i,initialSiteUrl:s}=l,a=ye();let c;e[0]!==i.id||e[1]!==i.slug?(c={connectionId:Ie,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=c):c=e[2];const n=Pe(c),[o,m]=L.useState(s??""),[g,h]=L.useState(null),[p,f]=L.useState(null),S=L.useRef(!1),d=Ue.COMMERCE_DISCOVERY(i.id),C=Le(i.id),N=pe.commerceDiscoveryConnection(i.id,d);let w;e[3]!==d||e[4]!==n?(w=async()=>{const u=await n.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:d}});return fe(u)},e[3]=d,e[4]=n,e[5]=w):w=e[5];let r;e[6]!==N||e[7]!==w?(r={queryKey:N,queryFn:w,retry:!1},e[6]=N,e[7]=w,e[8]=r):r=e[8];const x=he(r),b=pe.commerceDiscoveryVirtualMcp(i.id,C);let v;e[9]!==n||e[10]!==C?(v=async()=>{const u=await n.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:C}});return fe(u)},e[9]=n,e[10]=C,e[11]=v):v=e[11];let $;e[12]!==b||e[13]!==v?($={queryKey:b,queryFn:v,retry:!1},e[12]=b,e[13]=v,e[14]=$):$=e[14];const z=he($);let k;e[15]!==n?(k=async u=>{const j=await n.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:u}});return fe(j)},e[15]=n,e[16]=k):k=e[16];let M;e[17]!==x||e[18]!==z?(M=u=>{h(u),f(null),x.refetch(),z.refetch()},e[17]=x,e[18]=z,e[19]=M):M=e[19];let K;e[20]===Symbol.for("react.memo_cache_sentinel")?(K=u=>{f(u instanceof Error?u.message:"Commerce Discovery setup failed.")},e[20]=K):K=e[20];let Q;e[21]!==k||e[22]!==M?(Q={mutationFn:k,retry:!1,onSuccess:M,onError:K},e[21]=k,e[22]=M,e[23]=Q):Q=e[23];const T=Ce(Q),B=x.isPending||z.isPending,ae=x.error??z.error,Z=!!x.data?.item&&!!z.data?.item;let G;e[24]!==T?(G=u=>{const j=je(u);if(!j.ok){f(j.error);return}f(null),T.mutate(j.value)},e[24]=T,e[25]=G):G=e[25];const D=G;let J;e[26]!==s||e[27]!==D||e[28]!==B||e[29]!==Z?(J=u=>{!u||S.current||B||Z||!s||(S.current=!0,D(s))},e[26]=s,e[27]=D,e[28]=B,e[29]=Z,e[30]=J):J=e[30];const ce=J;let X;e[31]!==D||e[32]!==o?(X=u=>{u.preventDefault(),D(o)},e[31]=D,e[32]=o,e[33]=X):X=e[33];const I=X;let ee;e[34]!==d||e[35]!==g?.reportApp||e[36]!==C?(ee=g?.reportApp??{connectionId:d,virtualMcpId:C,toolName:Ae},e[34]=d,e[35]=g?.reportApp,e[36]=C,e[37]=ee):ee=e[37];const O=ee;let te;e[38]!==a||e[39]!==i.slug||e[40]!==O.connectionId||e[41]!==O.toolName||e[42]!==O.virtualMcpId?(te=()=>{localStorage.setItem(ze.sidebarOpen(),JSON.stringify(!1)),a({to:"/$org/$taskId",params:{org:i.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:O.virtualMcpId,main:Oe(O.connectionId,O.toolName),chat:0}})},e[38]=a,e[39]=i.slug,e[40]=O.connectionId,e[41]=O.toolName,e[42]=O.virtualMcpId,e[43]=te):te=e[43];const me=te;if(B){const u=`Commerce setup will continue for ${i.name}.`;let j;e[44]!==u?(j=t.jsx(U,{title:"Commerce diagnostics",description:u}),e[44]=u,e[45]=j):j=e[45];let _;e[46]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(Y,{label:"Checking Commerce Discovery setup..."}),e[46]=_):_=e[46];let y;return e[47]!==j?(y=t.jsxs("div",{className:"grid gap-10",children:[j,_]}),e[47]=j,e[48]=y):y=e[48],y}if(ae){const u=ae instanceof Error?ae.message:"We could not check Commerce Discovery setup.",j=`Commerce setup will continue for ${i.name}.`;let _;e[49]!==j?(_=t.jsx(U,{title:"Commerce diagnostics",description:j}),e[49]=j,e[50]=_):_=e[50];let y;e[51]!==u?(y=t.jsx(oe,{message:u}),e[51]=u,e[52]=y):y=e[52];let R;e[53]!==x||e[54]!==z?(R=t.jsx(le,{type:"button",size:"xl",className:"w-full",onClick:()=>{x.refetch(),z.refetch()},children:"Retry"}),e[53]=x,e[54]=z,e[55]=R):R=e[55];let P;return e[56]!==_||e[57]!==y||e[58]!==R?(P=t.jsxs("div",{className:"grid gap-10",children:[_,y,R]}),e[56]=_,e[57]=y,e[58]=R,e[59]=P):P=e[59],P}if(Z){let u;return e[60]!==me||e[61]!==i||e[62]!==O?(u=t.jsx(Be,{org:i,reportApp:O,onOpenReport:me}),e[60]=me,e[61]=i,e[62]=O,e[63]=u):u=e[63],u}if(s){let u;e[64]!==s?(u=je(s),e[64]=s,e[65]=u):u=e[65];const j=u;if(!j.ok){const de=`Commerce setup will continue for ${i.name}.`;let F;e[66]!==de?(F=t.jsx(U,{title:"Commerce diagnostics",description:de}),e[66]=de,e[67]=F):F=e[67];let q;e[68]!==j.error?(q=t.jsx(oe,{message:j.error}),e[68]=j.error,e[69]=q):q=e[69];let V;e[70]!==I||e[71]!==p||e[72]!==T.isPending||e[73]!==o?(V=t.jsx(ge,{siteUrl:o,error:p,isSubmitting:T.isPending,onSiteUrlChange:m,onSubmit:I}),e[70]=I,e[71]=p,e[72]=T.isPending,e[73]=o,e[74]=V):V=e[74];let ie;return e[75]!==F||e[76]!==q||e[77]!==V?(ie=t.jsxs("div",{className:"grid gap-10",children:[F,q,V]}),e[75]=F,e[76]=q,e[77]=V,e[78]=ie):ie=e[78],ie}const _=`Commerce Discovery is being prepared for ${j.value}.`;let y;e[79]!==_?(y=t.jsx(U,{title:"Commerce diagnostics",description:_}),e[79]=_,e[80]=y):y=e[80];let R;e[81]!==I||e[82]!==p||e[83]!==T||e[84]!==o?(R=p?t.jsxs(t.Fragment,{children:[t.jsx(oe,{message:p}),t.jsx(ge,{siteUrl:o,error:null,isSubmitting:T.isPending,onSiteUrlChange:m,onSubmit:I})]}):t.jsx(Y,{label:"Setting up Commerce Discovery..."}),e[81]=I,e[82]=p,e[83]=T,e[84]=o,e[85]=R):R=e[85];let P;return e[86]!==y||e[87]!==R||e[88]!==ce?(P=t.jsxs("div",{ref:ce,className:"grid gap-10",children:[y,R]}),e[86]=y,e[87]=R,e[88]=ce,e[89]=P):P=e[89],P}const ue=`Commerce setup will continue for ${i.name}.`;let H;e[90]!==ue?(H=t.jsx(U,{title:"Commerce diagnostics",description:ue}),e[90]=ue,e[91]=H):H=e[91];let W;e[92]!==I||e[93]!==p||e[94]!==T.isPending||e[95]!==o?(W=t.jsx(ge,{siteUrl:o,error:p,isSubmitting:T.isPending,onSiteUrlChange:m,onSubmit:I}),e[92]=I,e[93]=p,e[94]=T.isPending,e[95]=o,e[96]=W):W=e[96];let se;return e[97]!==H||e[98]!==W?(se=t.jsxs("div",{className:"grid gap-10",children:[H,W]}),e[97]=H,e[98]=W,e[99]=se):se=e[99],se}function ge(l){const e=E.c(22),{siteUrl:i,error:s,isSubmitting:a,onSiteUrlChange:c,onSubmit:n}=l;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("label",{className:"text-sm font-medium",htmlFor:"commerce-site-url",children:"Website URL"}),e[0]=o):o=e[0];let m;e[1]!==c?(m=N=>c(N.target.value),e[1]=c,e[2]=m):m=e[2];const g=!!s;let h;e[3]!==a||e[4]!==i||e[5]!==m||e[6]!==g?(h=t.jsx(we,{id:"commerce-site-url",type:"text",inputMode:"url",value:i,onChange:m,placeholder:"https://example.com","aria-invalid":g,disabled:a}),e[3]=a,e[4]=i,e[5]=m,e[6]=g,e[7]=h):h=e[7];let p;e[8]!==s?(p=s?t.jsx(oe,{message:s}):null,e[8]=s,e[9]=p):p=e[9];let f;e[10]!==h||e[11]!==p?(f=t.jsxs("div",{className:"grid gap-2",children:[o,h,p]}),e[10]=h,e[11]=p,e[12]=f):f=e[12];let S;e[13]!==a?(S=a?t.jsxs(t.Fragment,{children:[t.jsx(be,{size:14,className:"animate-spin"}),"Setting up"]}):t.jsxs(t.Fragment,{children:["Continue",t.jsx(ve,{size:16})]}),e[13]=a,e[14]=S):S=e[14];let d;e[15]!==a||e[16]!==S?(d=t.jsx(le,{type:"submit",size:"xl",className:"w-full",disabled:a,children:S}),e[15]=a,e[16]=S,e[17]=d):d=e[17];let C;return e[18]!==n||e[19]!==f||e[20]!==d?(C=t.jsxs("form",{className:"grid gap-4",onSubmit:n,children:[f,d]}),e[18]=n,e[19]=f,e[20]=d,e[21]=C):C=e[21],C}function Be(l){const e=E.c(12),{org:i,reportApp:s,onOpenReport:a}=l,c=`Commerce Discovery is connected for ${i.name}.`;let n;e[0]!==c?(n=t.jsx(U,{title:"Commerce Discovery",description:c}),e[0]=c,e[1]=n):n=e[1];let o,m;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Se,{title:"Commerce Discovery MCP",description:"Report generation and commerce diagnostics are connected."}),m=t.jsx(Se,{title:"Commerce Discovery agent",description:"The report workspace is ready for this organization."}),e[2]=o,e[3]=m):(o=e[2],m=e[3]);let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsxs("div",{className:"grid gap-3",children:[o,m,t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4",children:[t.jsx("p",{className:"text-sm font-medium",children:"Companion MCPs"}),t.jsx("p",{className:"mt-1 text-sm text-muted-foreground leading-5",children:"Commerce Discovery requires platform integrations such as VTEX. These companion MCP requirements will be available soon."})]})]}),e[4]=g):g=e[4];const h=!s.virtualMcpId;let p;e[5]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(ve,{size:16}),e[5]=p):p=e[5];let f;e[6]!==a||e[7]!==h?(f=t.jsxs(le,{type:"button",size:"xl",className:"w-full",onClick:a,disabled:h,children:["See full report",p]}),e[6]=a,e[7]=h,e[8]=f):f=e[8];let S;return e[9]!==n||e[10]!==f?(S=t.jsxs("div",{className:"grid gap-10",children:[n,g,f]}),e[9]=n,e[10]=f,e[11]=S):S=e[11],S}function Se(l){const e=E.c(8),{title:i,description:s}=l;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("span",{className:"mt-0.5 inline-flex size-5 shrink-0 items-center justify-center rounded-full bg-success text-success-foreground",children:t.jsx($e,{size:12})}),e[0]=a):a=e[0];let c;e[1]!==i?(c=t.jsx("p",{className:"text-sm font-medium",children:i}),e[1]=i,e[2]=c):c=e[2];let n;e[3]!==s?(n=t.jsx("p",{className:"mt-1 text-sm text-muted-foreground leading-5",children:s}),e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==c||e[6]!==n?(o=t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4 flex gap-3",children:[a,t.jsxs("div",{className:"min-w-0",children:[c,n]})]}),e[5]=c,e[6]=n,e[7]=o):o=e[7],o}function oe(l){const e=E.c(2),{message:i}=l;let s;return e[0]!==i?(s=t.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:i}),e[0]=i,e[1]=s):s=e[1],s}export{mt as default};
1
+ import{c as E,j as t,u as Re,a as Ee,b as ye,m as Ne,r as L,d as Ce,i as be,n as _e,K as pe,k as he,B as le,L as ze}from"./index-D9IK491L.js";import{A as Te}from"./auth-entry-DQ7yt2AO.js";import{A}from"./auth-split-layout-B5a3UwoJ.js";import{O as xe}from"./organization-choice-CapZcYtV.js";import{f as Oe}from"./tab-id-BptcWVWa.js";import{I as we}from"./input-B9q8KV4F.js";import{S as Ie,u as Pe,W as Ue,g as Le,C as Ae}from"./use-mcp-client-RiDQVGqe.js";import{i as ve}from"./ArrowRight-CTyWXakV.js";import{i as $e}from"./Check-CBlc59JS.js";import"./backoff-CrEUbyZT.js";import"./delay-CnY5UFtP.js";import"./avatar-BSTZ3pLJ.js";import"./User01-pnGUlp6P.js";import"./auth-D-vZuhvw.js";const ke=/^[a-zA-Z][a-zA-Z\d+.-]*:/,Me=/^[a-zA-Z][a-zA-Z\d+.-]*:\/\//,De=/^[^\s/:?#]+\.[^\s/:?#]+:\d+(?:[/?#]|$)/,He=/^[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i;function je(l){const e=l.trim();if(!e)return{ok:!1,error:"Enter a website URL."};const i=ke.test(e),s=Me.test(e),a=De.test(e);if(i&&!s&&!a)return{ok:!1,error:"Use an HTTP or HTTPS website URL."};const c=s?e:`https://${e}`;let n;try{n=new URL(c)}catch{return{ok:!1,error:"Enter a valid website URL."}}if(n.protocol!=="http:"&&n.protocol!=="https:")return{ok:!1,error:"Use an HTTP or HTTPS website URL."};const o=n.hostname.split(".");return o.length<2||o.some(m=>!m||!He.test(m))?{ok:!1,error:"Enter a valid website URL."}:(n.protocol="https:",{ok:!0,value:n.origin})}function mt(){const l=E.c(1);let e;return l[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(We,{}),l[0]=e):e=l[0],e}function We(){const l=E.c(6);let e;l[0]===Symbol.for("react.memo_cache_sentinel")?(e={from:"/commerce-onboarding"},l[0]=e):e=l[0];const i=Re(e),{org:s,siteUrl:a}=i,{data:c,isPending:n}=Ee.useSession();if(n){let m;return l[1]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(A,{children:t.jsx(Y,{label:"Preparing commerce onboarding..."})}),l[1]=m):m=l[1],m}if(!c){const m=typeof window>"u"?"/commerce-onboarding":`${window.location.pathname}${window.location.search}`;let g;return l[2]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(A,{children:t.jsx(Te,{callbackUrl:m,allowAutoLogin:!1})}),l[2]=g):g=l[2],g}let o;return l[3]!==s||l[4]!==a?(o=t.jsx(Fe,{requestedOrgSlug:s,siteUrl:a}),l[3]=s,l[4]=a,l[5]=o):o=l[5],o}function Fe(l){const e=E.c(40),{requestedOrgSlug:i,siteUrl:s}=l,a=ye(),c=Ne(),[n,o]=L.useState(null),[m,g]=L.useState(null),h=c.data?.map(Ve)??[];let p;e[0]===Symbol.for("react.memo_cache_sentinel")?(p={mutationFn:qe,retry:!1,onSuccess:r=>{g(r)}},e[0]=p):p=e[0];const f=Ce(p);if(c.isPending){let r;return e[1]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(A,{children:t.jsx(Y,{label:"Preparing commerce onboarding..."})}),e[1]=r):r=e[1],r}if(c.error){let r;return e[2]!==c?(r=t.jsx(re,{title:"We could not load your organizations",description:"Retry to continue commerce setup from this page.",actionLabel:"Retry",onRetry:()=>c.refetch()}),e[2]=c,e[3]=r):r=e[3],r}const S=i?h.find(r=>r.slug===i):null;if(S){let r;return e[4]!==S||e[5]!==s?(r=t.jsx(ne,{org:S,initialSiteUrl:s}),e[4]=S,e[5]=s,e[6]=r):r=e[6],r}if(i){let r;return e[7]!==c?(r=t.jsx(re,{title:"Organization not found",description:"We could not find that organization for your account.",actionLabel:"Retry",onRetry:()=>c.refetch()}),e[7]=c,e[8]=r):r=e[8],r}if(n){let r;return e[9]!==n||e[10]!==s?(r=t.jsx(ne,{org:n,initialSiteUrl:s}),e[9]=n,e[10]=s,e[11]=r):r=e[11],r}if(h.length===1&&h[0]){let r;return e[12]!==h[0]||e[13]!==s?(r=t.jsx(ne,{org:h[0],initialSiteUrl:s}),e[12]=h[0],e[13]=s,e[14]=r):r=e[14],r}if(h.length>1){let r;e[15]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(U,{title:"Choose an organization",description:"Select where commerce diagnostics should continue."}),e[15]=r):r=e[15];let x;e[16]===Symbol.for("react.memo_cache_sentinel")?(x=v=>o(v),e[16]=x):x=e[16];let b;return e[17]!==h?(b=t.jsx(A,{children:t.jsxs("div",{className:"grid gap-10",children:[r,t.jsx(xe,{organizations:h,selectLabel:"Continue",onSelected:x})]})}),e[17]=h,e[18]=b):b=e[18],b}if(!m){let r;e[19]!==f?(r=()=>{f.reset(),f.mutate()},e[19]=f,e[20]=r):r=e[20];let x;return e[21]!==f||e[22]!==r?(x=t.jsx(Ye,{mutation:f,onRetry:r}),e[21]=f,e[22]=r,e[23]=x):x=e[23],x}const d=m;if(d?.success&&(d.status==="created"||d.status==="joined"||d.status==="already_has_organization")&&d.organization){let r;return e[24]!==d.organization||e[25]!==s?(r=t.jsx(ne,{org:d.organization,initialSiteUrl:s}),e[24]=d.organization,e[25]=s,e[26]=r):r=e[26],r}if(d?.status==="ambiguous"&&d.organizations&&d.organizations.length>0){let r;e[27]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(U,{title:"Choose an organization",description:"Your email can access more than one organization. Choose where commerce setup should continue."}),e[27]=r):r=e[27];const x=d.domain??void 0;let b;e[28]!==a||e[29]!==s?(b=($,z)=>{_e(),o({...$,slug:z}),a({to:"/commerce-onboarding",search:{org:z,siteUrl:s}})},e[28]=a,e[29]=s,e[30]=b):b=e[30];let v;return e[31]!==d.organizations||e[32]!==x||e[33]!==b?(v=t.jsx(A,{children:t.jsxs("div",{className:"grid gap-10",children:[r,t.jsx(xe,{organizations:d.organizations,domain:x,onJoined:b})]})}),e[31]=d.organizations,e[32]=x,e[33]=b,e[34]=v):v=e[34],v}const C=d?.error??"We could not determine a commerce organization for this account.";let N;e[35]!==f?(N=()=>{g(null),f.reset()},e[35]=f,e[36]=N):N=e[36];let w;return e[37]!==C||e[38]!==N?(w=t.jsx(re,{title:"Commerce onboarding needs support",description:C,actionLabel:"Try again",onRetry:N}),e[37]=C,e[38]=N,e[39]=w):w=e[39],w}async function qe(){const e=await(await fetch("/api/auth/custom/ensure-organization",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"}})).json();return e.success&&(e.status==="created"||e.status==="joined"||e.status==="already_has_organization")&&e.organization&&_e(),e}function Ve(l){return{id:l.id,name:l.name,slug:l.slug,logo:l.logo??null}}function Ye(l){const e=E.c(7),{mutation:i,onRetry:s}=l,a=L.useRef(!1);let c;e[0]!==i?(c=g=>{!g||a.current||(a.current=!0,i.mutate())},e[0]=i,e[1]=c):c=e[1];const n=c;if(i.error){let g;return e[2]!==s?(g=t.jsx(re,{title:"Commerce onboarding is unavailable",description:"We could not prepare an organization for commerce setup. Retry from this page or contact support.",actionLabel:"Retry",onRetry:s}),e[2]=s,e[3]=g):g=e[3],g}let o;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Y,{label:"Preparing your commerce workspace..."}),e[4]=o):o=e[4];let m;return e[5]!==n?(m=t.jsx(A,{children:t.jsx("div",{ref:n,children:o})}),e[5]=n,e[6]=m):m=e[6],m}function U(l){const e=E.c(9),{title:i,description:s}=l;let a,c;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12 dark:hidden"}),c=t.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"h-12 w-12 hidden dark:block"}),e[0]=a,e[1]=c):(a=e[0],c=e[1]);let n;e[2]!==i?(n=t.jsx("h1",{className:"text-2xl font-medium leading-8",children:i}),e[2]=i,e[3]=n):n=e[3];let o;e[4]!==s?(o=t.jsx("p",{className:"text-base text-muted-foreground leading-6",children:s}),e[4]=s,e[5]=o):o=e[5];let m;return e[6]!==n||e[7]!==o?(m=t.jsxs("div",{className:"grid gap-10",children:[a,c,t.jsxs("div",{className:"space-y-2",children:[n,o]})]}),e[6]=n,e[7]=o,e[8]=m):m=e[8],m}function Y(l){const e=E.c(3),{label:i}=l;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=t.jsx(be,{size:14,className:"animate-spin text-muted-foreground"}),e[0]=s):s=e[0];let a;return e[1]!==i?(a=t.jsxs("div",{className:"flex items-center gap-2 py-4",role:"status","aria-live":"polite",children:[s,t.jsx("span",{className:"text-sm text-muted-foreground",children:i})]}),e[1]=i,e[2]=a):a=e[2],a}function re(l){const e=E.c(9),{title:i,description:s,actionLabel:a,onRetry:c}=l;let n;e[0]!==s||e[1]!==i?(n=t.jsx(U,{title:i,description:s}),e[0]=s,e[1]=i,e[2]=n):n=e[2];let o;e[3]!==a||e[4]!==c?(o=t.jsx(le,{type:"button",size:"xl",className:"w-full",onClick:c,children:a}),e[3]=a,e[4]=c,e[5]=o):o=e[5];let m;return e[6]!==n||e[7]!==o?(m=t.jsx(A,{children:t.jsxs("div",{className:"grid gap-10",children:[n,o]})}),e[6]=n,e[7]=o,e[8]=m):m=e[8],m}function Ke(l){return l.content?.find(e=>e.text)?.text??"Commerce Discovery setup failed."}function fe(l){const e=l;if(e.isError)throw new Error(Ke(e));return e.structuredContent??l}function ne(l){const e=E.c(5),{org:i,initialSiteUrl:s}=l;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx(Y,{label:"Connecting workspace..."}),e[0]=a):a=e[0];const c=`${i.id}:${s??""}`;let n;return e[1]!==s||e[2]!==i||e[3]!==c?(n=t.jsx(A,{children:t.jsx(L.Suspense,{fallback:a,children:t.jsx(Qe,{org:i,initialSiteUrl:s},c)})}),e[1]=s,e[2]=i,e[3]=c,e[4]=n):n=e[4],n}function Qe(l){const e=E.c(100),{org:i,initialSiteUrl:s}=l,a=ye();let c;e[0]!==i.id||e[1]!==i.slug?(c={connectionId:Ie,orgId:i.id,orgSlug:i.slug},e[0]=i.id,e[1]=i.slug,e[2]=c):c=e[2];const n=Pe(c),[o,m]=L.useState(s??""),[g,h]=L.useState(null),[p,f]=L.useState(null),S=L.useRef(!1),d=Ue.COMMERCE_DISCOVERY(i.id),C=Le(i.id),N=pe.commerceDiscoveryConnection(i.id,d);let w;e[3]!==d||e[4]!==n?(w=async()=>{const u=await n.callTool({name:"COLLECTION_CONNECTIONS_GET",arguments:{id:d}});return fe(u)},e[3]=d,e[4]=n,e[5]=w):w=e[5];let r;e[6]!==N||e[7]!==w?(r={queryKey:N,queryFn:w,retry:!1},e[6]=N,e[7]=w,e[8]=r):r=e[8];const x=he(r),b=pe.commerceDiscoveryVirtualMcp(i.id,C);let v;e[9]!==n||e[10]!==C?(v=async()=>{const u=await n.callTool({name:"COLLECTION_VIRTUAL_MCP_GET",arguments:{id:C}});return fe(u)},e[9]=n,e[10]=C,e[11]=v):v=e[11];let $;e[12]!==b||e[13]!==v?($={queryKey:b,queryFn:v,retry:!1},e[12]=b,e[13]=v,e[14]=$):$=e[14];const z=he($);let k;e[15]!==n?(k=async u=>{const j=await n.callTool({name:"COMMERCE_DISCOVERY_SETUP",arguments:{siteUrl:u}});return fe(j)},e[15]=n,e[16]=k):k=e[16];let M;e[17]!==x||e[18]!==z?(M=u=>{h(u),f(null),x.refetch(),z.refetch()},e[17]=x,e[18]=z,e[19]=M):M=e[19];let K;e[20]===Symbol.for("react.memo_cache_sentinel")?(K=u=>{f(u instanceof Error?u.message:"Commerce Discovery setup failed.")},e[20]=K):K=e[20];let Q;e[21]!==k||e[22]!==M?(Q={mutationFn:k,retry:!1,onSuccess:M,onError:K},e[21]=k,e[22]=M,e[23]=Q):Q=e[23];const T=Ce(Q),B=x.isPending||z.isPending,ae=x.error??z.error,Z=!!x.data?.item&&!!z.data?.item;let G;e[24]!==T?(G=u=>{const j=je(u);if(!j.ok){f(j.error);return}f(null),T.mutate(j.value)},e[24]=T,e[25]=G):G=e[25];const D=G;let J;e[26]!==s||e[27]!==D||e[28]!==B||e[29]!==Z?(J=u=>{!u||S.current||B||Z||!s||(S.current=!0,D(s))},e[26]=s,e[27]=D,e[28]=B,e[29]=Z,e[30]=J):J=e[30];const ce=J;let X;e[31]!==D||e[32]!==o?(X=u=>{u.preventDefault(),D(o)},e[31]=D,e[32]=o,e[33]=X):X=e[33];const I=X;let ee;e[34]!==d||e[35]!==g?.reportApp||e[36]!==C?(ee=g?.reportApp??{connectionId:d,virtualMcpId:C,toolName:Ae},e[34]=d,e[35]=g?.reportApp,e[36]=C,e[37]=ee):ee=e[37];const O=ee;let te;e[38]!==a||e[39]!==i.slug||e[40]!==O.connectionId||e[41]!==O.toolName||e[42]!==O.virtualMcpId?(te=()=>{localStorage.setItem(ze.sidebarOpen(),JSON.stringify(!1)),a({to:"/$org/$taskId",params:{org:i.slug,taskId:crypto.randomUUID()},search:{virtualmcpid:O.virtualMcpId,main:Oe(O.connectionId,O.toolName),chat:0}})},e[38]=a,e[39]=i.slug,e[40]=O.connectionId,e[41]=O.toolName,e[42]=O.virtualMcpId,e[43]=te):te=e[43];const me=te;if(B){const u=`Commerce setup will continue for ${i.name}.`;let j;e[44]!==u?(j=t.jsx(U,{title:"Commerce diagnostics",description:u}),e[44]=u,e[45]=j):j=e[45];let _;e[46]===Symbol.for("react.memo_cache_sentinel")?(_=t.jsx(Y,{label:"Checking Commerce Discovery setup..."}),e[46]=_):_=e[46];let y;return e[47]!==j?(y=t.jsxs("div",{className:"grid gap-10",children:[j,_]}),e[47]=j,e[48]=y):y=e[48],y}if(ae){const u=ae instanceof Error?ae.message:"We could not check Commerce Discovery setup.",j=`Commerce setup will continue for ${i.name}.`;let _;e[49]!==j?(_=t.jsx(U,{title:"Commerce diagnostics",description:j}),e[49]=j,e[50]=_):_=e[50];let y;e[51]!==u?(y=t.jsx(oe,{message:u}),e[51]=u,e[52]=y):y=e[52];let R;e[53]!==x||e[54]!==z?(R=t.jsx(le,{type:"button",size:"xl",className:"w-full",onClick:()=>{x.refetch(),z.refetch()},children:"Retry"}),e[53]=x,e[54]=z,e[55]=R):R=e[55];let P;return e[56]!==_||e[57]!==y||e[58]!==R?(P=t.jsxs("div",{className:"grid gap-10",children:[_,y,R]}),e[56]=_,e[57]=y,e[58]=R,e[59]=P):P=e[59],P}if(Z){let u;return e[60]!==me||e[61]!==i||e[62]!==O?(u=t.jsx(Be,{org:i,reportApp:O,onOpenReport:me}),e[60]=me,e[61]=i,e[62]=O,e[63]=u):u=e[63],u}if(s){let u;e[64]!==s?(u=je(s),e[64]=s,e[65]=u):u=e[65];const j=u;if(!j.ok){const de=`Commerce setup will continue for ${i.name}.`;let F;e[66]!==de?(F=t.jsx(U,{title:"Commerce diagnostics",description:de}),e[66]=de,e[67]=F):F=e[67];let q;e[68]!==j.error?(q=t.jsx(oe,{message:j.error}),e[68]=j.error,e[69]=q):q=e[69];let V;e[70]!==I||e[71]!==p||e[72]!==T.isPending||e[73]!==o?(V=t.jsx(ge,{siteUrl:o,error:p,isSubmitting:T.isPending,onSiteUrlChange:m,onSubmit:I}),e[70]=I,e[71]=p,e[72]=T.isPending,e[73]=o,e[74]=V):V=e[74];let ie;return e[75]!==F||e[76]!==q||e[77]!==V?(ie=t.jsxs("div",{className:"grid gap-10",children:[F,q,V]}),e[75]=F,e[76]=q,e[77]=V,e[78]=ie):ie=e[78],ie}const _=`Commerce Discovery is being prepared for ${j.value}.`;let y;e[79]!==_?(y=t.jsx(U,{title:"Commerce diagnostics",description:_}),e[79]=_,e[80]=y):y=e[80];let R;e[81]!==I||e[82]!==p||e[83]!==T||e[84]!==o?(R=p?t.jsxs(t.Fragment,{children:[t.jsx(oe,{message:p}),t.jsx(ge,{siteUrl:o,error:null,isSubmitting:T.isPending,onSiteUrlChange:m,onSubmit:I})]}):t.jsx(Y,{label:"Setting up Commerce Discovery..."}),e[81]=I,e[82]=p,e[83]=T,e[84]=o,e[85]=R):R=e[85];let P;return e[86]!==y||e[87]!==R||e[88]!==ce?(P=t.jsxs("div",{ref:ce,className:"grid gap-10",children:[y,R]}),e[86]=y,e[87]=R,e[88]=ce,e[89]=P):P=e[89],P}const ue=`Commerce setup will continue for ${i.name}.`;let H;e[90]!==ue?(H=t.jsx(U,{title:"Commerce diagnostics",description:ue}),e[90]=ue,e[91]=H):H=e[91];let W;e[92]!==I||e[93]!==p||e[94]!==T.isPending||e[95]!==o?(W=t.jsx(ge,{siteUrl:o,error:p,isSubmitting:T.isPending,onSiteUrlChange:m,onSubmit:I}),e[92]=I,e[93]=p,e[94]=T.isPending,e[95]=o,e[96]=W):W=e[96];let se;return e[97]!==H||e[98]!==W?(se=t.jsxs("div",{className:"grid gap-10",children:[H,W]}),e[97]=H,e[98]=W,e[99]=se):se=e[99],se}function ge(l){const e=E.c(22),{siteUrl:i,error:s,isSubmitting:a,onSiteUrlChange:c,onSubmit:n}=l;let o;e[0]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("label",{className:"text-sm font-medium",htmlFor:"commerce-site-url",children:"Website URL"}),e[0]=o):o=e[0];let m;e[1]!==c?(m=N=>c(N.target.value),e[1]=c,e[2]=m):m=e[2];const g=!!s;let h;e[3]!==a||e[4]!==i||e[5]!==m||e[6]!==g?(h=t.jsx(we,{id:"commerce-site-url",type:"text",inputMode:"url",value:i,onChange:m,placeholder:"https://example.com","aria-invalid":g,disabled:a}),e[3]=a,e[4]=i,e[5]=m,e[6]=g,e[7]=h):h=e[7];let p;e[8]!==s?(p=s?t.jsx(oe,{message:s}):null,e[8]=s,e[9]=p):p=e[9];let f;e[10]!==h||e[11]!==p?(f=t.jsxs("div",{className:"grid gap-2",children:[o,h,p]}),e[10]=h,e[11]=p,e[12]=f):f=e[12];let S;e[13]!==a?(S=a?t.jsxs(t.Fragment,{children:[t.jsx(be,{size:14,className:"animate-spin"}),"Setting up"]}):t.jsxs(t.Fragment,{children:["Continue",t.jsx(ve,{size:16})]}),e[13]=a,e[14]=S):S=e[14];let d;e[15]!==a||e[16]!==S?(d=t.jsx(le,{type:"submit",size:"xl",className:"w-full",disabled:a,children:S}),e[15]=a,e[16]=S,e[17]=d):d=e[17];let C;return e[18]!==n||e[19]!==f||e[20]!==d?(C=t.jsxs("form",{className:"grid gap-4",onSubmit:n,children:[f,d]}),e[18]=n,e[19]=f,e[20]=d,e[21]=C):C=e[21],C}function Be(l){const e=E.c(12),{org:i,reportApp:s,onOpenReport:a}=l,c=`Commerce Discovery is connected for ${i.name}.`;let n;e[0]!==c?(n=t.jsx(U,{title:"Commerce Discovery",description:c}),e[0]=c,e[1]=n):n=e[1];let o,m;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx(Se,{title:"Commerce Discovery MCP",description:"Report generation and commerce diagnostics are connected."}),m=t.jsx(Se,{title:"Commerce Discovery agent",description:"The report workspace is ready for this organization."}),e[2]=o,e[3]=m):(o=e[2],m=e[3]);let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsxs("div",{className:"grid gap-3",children:[o,m,t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4",children:[t.jsx("p",{className:"text-sm font-medium",children:"Companion MCPs"}),t.jsx("p",{className:"mt-1 text-sm text-muted-foreground leading-5",children:"Commerce Discovery requires platform integrations such as VTEX. These companion MCP requirements will be available soon."})]})]}),e[4]=g):g=e[4];const h=!s.virtualMcpId;let p;e[5]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(ve,{size:16}),e[5]=p):p=e[5];let f;e[6]!==a||e[7]!==h?(f=t.jsxs(le,{type:"button",size:"xl",className:"w-full",onClick:a,disabled:h,children:["See full report",p]}),e[6]=a,e[7]=h,e[8]=f):f=e[8];let S;return e[9]!==n||e[10]!==f?(S=t.jsxs("div",{className:"grid gap-10",children:[n,g,f]}),e[9]=n,e[10]=f,e[11]=S):S=e[11],S}function Se(l){const e=E.c(8),{title:i,description:s}=l;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=t.jsx("span",{className:"mt-0.5 inline-flex size-5 shrink-0 items-center justify-center rounded-full bg-success text-success-foreground",children:t.jsx($e,{size:12})}),e[0]=a):a=e[0];let c;e[1]!==i?(c=t.jsx("p",{className:"text-sm font-medium",children:i}),e[1]=i,e[2]=c):c=e[2];let n;e[3]!==s?(n=t.jsx("p",{className:"mt-1 text-sm text-muted-foreground leading-5",children:s}),e[3]=s,e[4]=n):n=e[4];let o;return e[5]!==c||e[6]!==n?(o=t.jsxs("div",{className:"rounded-xl card-shadow bg-background dark:bg-input/30 p-4 flex gap-3",children:[a,t.jsxs("div",{className:"min-w-0",children:[c,n]})]}),e[5]=c,e[6]=n,e[7]=o):o=e[7],o}function oe(l){const e=E.c(2),{message:i}=l;let s;return e[0]!==i?(s=t.jsx("p",{className:"text-sm leading-5 text-destructive",role:"alert",children:i}),e[0]=i,e[1]=s):s=e[1],s}export{mt as default};
@@ -1 +1 @@
1
- import{c as b,s as k,K as w,k as z,j as s,r as M,B as T,l as v}from"./index-D0U_smqt.js";import{a as I,b as S,D,c as E,d as R}from"./dialog-CQ6B0IwC.js";import{S as _}from"./chat-context-DnaexSAo.js";import{i as $}from"./Check-D3J8f8u-.js";import{a as A}from"./Eye-hHNCwVZ1.js";import{u as B}from"./studio-tools-DO12gBMa.js";const L={online:!1,capabilities:[],ready:!1};function F(){const i=b.c(7),{org:e}=k(),l=B();let o;i[0]!==e.id?(o=w.currentLink(e.id),i[0]=e.id,i[1]=o):o=i[1];let t;i[2]!==l?(t=async()=>{const f=await l.call("LINK_CURRENT_GET",{});return f?{...f,ready:!0}:{...L,ready:!0}},i[2]=l,i[3]=t):t=i[3];let n;i[4]!==o||i[5]!==t?(n={queryKey:o,queryFn:t,staleTime:4e3,refetchInterval:5e3,refetchOnWindowFocus:!0},i[4]=o,i[5]=t,i[6]=n):n=i[6];const{data:p}=z(n);return p??L}function K(i){const e=b.c(3),{size:l}=i,o=l===void 0?16:l;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("path",{d:"M13 12L18.5 5M7.63965 3L12.5 12L13.6865 3M4.48381 6.71679L11.9872 12M3 12L11.9872 12.473M12.2244 13.177L7 20M4.84194 16.8682L11.2824 12.9758M11.5 21L12.665 13.177M21 14L13.1846 12.668M21 10.5788L13 12.3223M16.779 19.646L12.8876 13.3772M19.3566 18.207L13.313 12.9893"}),e[0]=t):t=e[0];let n;return e[1]!==o?(n=s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:o,height:o,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:t}),e[1]=o,e[2]=n):n=e[2],n}function O(i){const e=b.c(3),{size:l}=i,o=l===void 0?16:l;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("path",{clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),e[0]=t):t=e[0];let n;return e[1]!==o?(n=s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:o,height:o,fill:"currentColor",fillRule:"evenodd","aria-hidden":"true",children:t}),e[1]=o,e[2]=n):n=e[2],n}const y="bunx decocms@latest link",N=[{capability:"claude-code",label:"Claude Code",description:"Runs through the Claude Code CLI",icon:s.jsx(K,{size:18})},{capability:"codex",label:"Codex",description:"Runs through the Codex CLI",icon:s.jsx(O,{size:18})}];function Q(i){return N.filter(e=>i.includes(e.capability)).map(e=>e.label)}function U(i){const e=b.c(21),{open:l,onOpenChange:o}=i,t=F(),[n,p]=M.useState(!1),f=t.hostname??t.machineId??"Your desktop",j=t.online?`Connected to ${f}`:"Connect your desktop";let a;e[0]!==j?(a=s.jsx(I,{children:j}),e[0]=j,e[1]=a):a=e[1];const C=t.online?"This machine provides the following local agents.":"Run this command in your desktop terminal. The dialog will close once your desktop is online.";let r;e[2]!==C?(r=s.jsx(S,{children:C}),e[2]=C,e[3]=r):r=e[3];let c;e[4]!==a||e[5]!==r?(c=s.jsxs(D,{children:[a,r]}),e[4]=a,e[5]=r,e[6]=c):c=e[6];let d;e[7]!==n||e[8]!==t.online?(d=!t.online&&s.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 font-mono text-sm",children:[s.jsx("span",{className:"flex-1",children:y}),s.jsx(T,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>{navigator.clipboard.writeText(y),p(!0),setTimeout(()=>p(!1),1500)},children:n?s.jsx($,{size:14}):s.jsx(A,{size:14})})]}),e[7]=n,e[8]=t.online,e[9]=d):d=e[9];let u;e[10]!==t.capabilities||e[11]!==t.online?(u=t.online?s.jsx("div",{className:"flex flex-col gap-3 text-sm",children:s.jsx("div",{className:"flex flex-col gap-2",children:N.map(x=>{const g=t.capabilities.includes(x.capability);return s.jsxs("div",{className:v("flex items-center gap-3 rounded-md border px-3 py-2",g?"border-border bg-background text-foreground":"border-border/60 bg-muted/40 text-muted-foreground"),children:[s.jsx("div",{className:v("flex size-6 items-center justify-center",g?"text-foreground":"text-muted-foreground"),children:x.icon}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"font-medium",children:x.label}),s.jsx("p",{className:"text-xs text-muted-foreground",children:g?x.description:"Not detected"})]}),s.jsx("span",{className:v("size-2 rounded-full",g?"bg-success":"bg-muted-foreground/30")})]},x.capability)})})}):s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(_,{size:"sm"}),"Waiting for desktop…"]}),e[10]=t.capabilities,e[11]=t.online,e[12]=u):u=e[12];let m;e[13]!==c||e[14]!==d||e[15]!==u?(m=s.jsxs(E,{className:"sm:max-w-md",children:[c,d,u]}),e[13]=c,e[14]=d,e[15]=u,e[16]=m):m=e[16];let h;return e[17]!==o||e[18]!==l||e[19]!==m?(h=s.jsx(R,{open:l,onOpenChange:o,children:m}),e[17]=o,e[18]=l,e[19]=m,e[20]=h):h=e[20],h}export{U as C,K as a,O as b,F as u,Q as v};
1
+ import{c as b,s as k,K as w,k as z,j as s,r as M,B as T,l as v}from"./index-D9IK491L.js";import{a as I,b as S,D,c as E,d as R}from"./dialog-D5b28yFH.js";import{S as _}from"./chat-context-Bdh5JOoc.js";import{i as $}from"./Check-CBlc59JS.js";import{a as A}from"./Eye-Bxan3Sqa.js";import{u as B}from"./studio-tools-BThbo34U.js";const L={online:!1,capabilities:[],ready:!1};function F(){const i=b.c(7),{org:e}=k(),l=B();let o;i[0]!==e.id?(o=w.currentLink(e.id),i[0]=e.id,i[1]=o):o=i[1];let t;i[2]!==l?(t=async()=>{const f=await l.call("LINK_CURRENT_GET",{});return f?{...f,ready:!0}:{...L,ready:!0}},i[2]=l,i[3]=t):t=i[3];let n;i[4]!==o||i[5]!==t?(n={queryKey:o,queryFn:t,staleTime:4e3,refetchInterval:5e3,refetchOnWindowFocus:!0},i[4]=o,i[5]=t,i[6]=n):n=i[6];const{data:p}=z(n);return p??L}function K(i){const e=b.c(3),{size:l}=i,o=l===void 0?16:l;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("path",{d:"M13 12L18.5 5M7.63965 3L12.5 12L13.6865 3M4.48381 6.71679L11.9872 12M3 12L11.9872 12.473M12.2244 13.177L7 20M4.84194 16.8682L11.2824 12.9758M11.5 21L12.665 13.177M21 14L13.1846 12.668M21 10.5788L13 12.3223M16.779 19.646L12.8876 13.3772M19.3566 18.207L13.313 12.9893"}),e[0]=t):t=e[0];let n;return e[1]!==o?(n=s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:o,height:o,fill:"none",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:t}),e[1]=o,e[2]=n):n=e[2],n}function O(i){const e=b.c(3),{size:l}=i,o=l===void 0?16:l;let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx("path",{clipRule:"evenodd",d:"M8.086.457a6.105 6.105 0 013.046-.415c1.333.153 2.521.72 3.564 1.7a.117.117 0 00.107.029c1.408-.346 2.762-.224 4.061.366l.063.03.154.076c1.357.703 2.33 1.77 2.918 3.198.278.679.418 1.388.421 2.126a5.655 5.655 0 01-.18 1.631.167.167 0 00.04.155 5.982 5.982 0 011.578 2.891c.385 1.901-.01 3.615-1.183 5.14l-.182.22a6.063 6.063 0 01-2.934 1.851.162.162 0 00-.108.102c-.255.736-.511 1.364-.987 1.992-1.199 1.582-2.962 2.462-4.948 2.451-1.583-.008-2.986-.587-4.21-1.736a.145.145 0 00-.14-.032c-.518.167-1.04.191-1.604.185a5.924 5.924 0 01-2.595-.622 6.058 6.058 0 01-2.146-1.781c-.203-.269-.404-.522-.551-.821a7.74 7.74 0 01-.495-1.283 6.11 6.11 0 01-.017-3.064.166.166 0 00.008-.074.115.115 0 00-.037-.064 5.958 5.958 0 01-1.38-2.202 5.196 5.196 0 01-.333-1.589 6.915 6.915 0 01.188-2.132c.45-1.484 1.309-2.648 2.577-3.493.282-.188.55-.334.802-.438.286-.12.573-.22.861-.304a.129.129 0 00.087-.087A6.016 6.016 0 015.635 2.31C6.315 1.464 7.132.846 8.086.457zm-.804 7.85a.848.848 0 00-1.473.842l1.694 2.965-1.688 2.848a.849.849 0 001.46.864l1.94-3.272a.849.849 0 00.007-.854l-1.94-3.393zm5.446 6.24a.849.849 0 000 1.695h4.848a.849.849 0 000-1.696h-4.848z"}),e[0]=t):t=e[0];let n;return e[1]!==o?(n=s.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",width:o,height:o,fill:"currentColor",fillRule:"evenodd","aria-hidden":"true",children:t}),e[1]=o,e[2]=n):n=e[2],n}const y="bunx decocms@latest link",N=[{capability:"claude-code",label:"Claude Code",description:"Runs through the Claude Code CLI",icon:s.jsx(K,{size:18})},{capability:"codex",label:"Codex",description:"Runs through the Codex CLI",icon:s.jsx(O,{size:18})}];function Q(i){return N.filter(e=>i.includes(e.capability)).map(e=>e.label)}function U(i){const e=b.c(21),{open:l,onOpenChange:o}=i,t=F(),[n,p]=M.useState(!1),f=t.hostname??t.machineId??"Your desktop",j=t.online?`Connected to ${f}`:"Connect your desktop";let a;e[0]!==j?(a=s.jsx(I,{children:j}),e[0]=j,e[1]=a):a=e[1];const C=t.online?"This machine provides the following local agents.":"Run this command in your desktop terminal. The dialog will close once your desktop is online.";let r;e[2]!==C?(r=s.jsx(S,{children:C}),e[2]=C,e[3]=r):r=e[3];let c;e[4]!==a||e[5]!==r?(c=s.jsxs(D,{children:[a,r]}),e[4]=a,e[5]=r,e[6]=c):c=e[6];let d;e[7]!==n||e[8]!==t.online?(d=!t.online&&s.jsxs("div",{className:"flex items-center gap-2 rounded-md bg-muted px-3 py-2 font-mono text-sm",children:[s.jsx("span",{className:"flex-1",children:y}),s.jsx(T,{type:"button",variant:"ghost",size:"icon-sm",onClick:()=>{navigator.clipboard.writeText(y),p(!0),setTimeout(()=>p(!1),1500)},children:n?s.jsx($,{size:14}):s.jsx(A,{size:14})})]}),e[7]=n,e[8]=t.online,e[9]=d):d=e[9];let u;e[10]!==t.capabilities||e[11]!==t.online?(u=t.online?s.jsx("div",{className:"flex flex-col gap-3 text-sm",children:s.jsx("div",{className:"flex flex-col gap-2",children:N.map(x=>{const g=t.capabilities.includes(x.capability);return s.jsxs("div",{className:v("flex items-center gap-3 rounded-md border px-3 py-2",g?"border-border bg-background text-foreground":"border-border/60 bg-muted/40 text-muted-foreground"),children:[s.jsx("div",{className:v("flex size-6 items-center justify-center",g?"text-foreground":"text-muted-foreground"),children:x.icon}),s.jsxs("div",{className:"min-w-0 flex-1",children:[s.jsx("p",{className:"font-medium",children:x.label}),s.jsx("p",{className:"text-xs text-muted-foreground",children:g?x.description:"Not detected"})]}),s.jsx("span",{className:v("size-2 rounded-full",g?"bg-success":"bg-muted-foreground/30")})]},x.capability)})})}):s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[s.jsx(_,{size:"sm"}),"Waiting for desktop…"]}),e[10]=t.capabilities,e[11]=t.online,e[12]=u):u=e[12];let m;e[13]!==c||e[14]!==d||e[15]!==u?(m=s.jsxs(E,{className:"sm:max-w-md",children:[c,d,u]}),e[13]=c,e[14]=d,e[15]=u,e[16]=m):m=e[16];let h;return e[17]!==o||e[18]!==l||e[19]!==m?(h=s.jsx(R,{open:l,onOpenChange:o,children:m}),e[17]=o,e[18]=l,e[19]=m,e[20]=h):h=e[20],h}export{U as C,K as a,O as b,F as u,Q as v};
@@ -1 +1 @@
1
- import{g as _}from"./connection-slug-eyAPH6o3.js";import{c as R,s as T,a$ as k,K as D,l as E,j as x}from"./index-D0U_smqt.js";import{u as K}from"./use-registry-connections-DhFpf503.js";import{b as Q}from"./use-organization-settings-B5vS3xHV.js";import{S as w,e as F}from"./use-mcp-client-DilmxmKU.js";import{u as H}from"./useInfiniteQuery-C4arjVN1.js";import{i as q,f as G}from"./extract-connection-data-D-Y4GRfE.js";import{C as U}from"./card-DSDTRgoU.js";import{I as V}from"./integration-icon-BjRqMG3n.js";function ae(s){const e=new Map;for(const o of s){const l=_(o),r=e.get(l);r?r.push(o):e.set(l,[o])}const t=[],u=new Set;for(const o of s){const l=_(o);if(u.has(l))continue;u.add(l);const r=e.get(l),m=r[0];r.length===1?t.push({type:"single",connection:m}):t.push({type:"group",key:l,icon:m.icon,title:m.app_name?m.title.replace(/\s*\(\d+\)\s*$/,""):m.title,connections:r})}return t}function ce(){const s=R.c(6),e=K(),t=Q(),u=T().project.enabledPlugins??[];let o;if(s[0]!==u||s[1]!==t||s[2]!==e){let l;s[4]!==t?(l=r=>t(r.id),s[4]=t,s[5]=l):l=s[5],o=e.filter(l).map(X),u.includes("private-registry")&&t(w)&&o.push({id:w,title:"Private Registry",icon:null}),s[0]=u,s[1]=t,s[2]=e,s[3]=o}else o=s[3];return o}function X(s){return{id:s.id,title:s.title,icon:s.icon}}const Y=24,$=3;function A(s){return s.id.includes("community-registry")}function z(s){const e=s?.trim();if(e)return{operator:"or",conditions:[{field:["title"],operator:"contains",value:e},{field:["description"],operator:"contains",value:e},{field:["name"],operator:"contains",value:e},{field:["server","title"],operator:"contains",value:e}]}}function S(s,e,t,u,o){const l=s.map(c=>c.id).sort().join(","),r=z(o),{data:m,fetchNextPage:d,hasNextPage:f,isFetchingNextPage:p,isLoading:P}=H({queryKey:D.storeDiscovery(e,`${l}:${o??""}`),queryFn:async({pageParam:c})=>{const n=c??{};return await Promise.all(s.map(async i=>{const y=n[i.id];if(y==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const j=q(i.id,e);let h;for(let v=0;v<$;v++){let C=null;try{C=await F({connectionId:i.id,orgId:e,orgSlug:t});const I={limit:Y};y&&(I.cursor=y),r&&(I.where=r);const b=await C.callTool({name:j,arguments:I}),N=b.structuredContent??b,M=N.nextCursor||N.cursor||void 0,L=G(N?[N]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:L,nextCursor:M}}catch(I){h=I}finally{await C?.close().catch(()=>{})}}return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${$} attempts:`,h),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}))},initialPageParam:{},getNextPageParam:c=>{const n={};let a=!1;for(const i of c)i.registryId&&(i.nextCursor?(n[i.registryId]=i.nextCursor,a=!0):n[i.registryId]="EXHAUSTED");return a?n:void 0},staleTime:3600*1e3,placeholderData:k,retry:!1,enabled:s.length>0}),g=[];if(m?.pages)for(const c of m.pages)for(const n of c)for(const a of n.items)g.push({...a,_sourceName:a._sourceName??n.registryTitle,_sourceIcon:a._sourceIcon??n.registryIcon,_registryId:a._registryId??n.registryId});return{items:g,hasMore:f??!1,isLoadingMore:p,isInitialLoading:P,fetchNextPage:()=>{f&&!p&&d()}}}function ue(s,e){const t=R.c(16),{org:u}=T();let o;t[0]!==s?(o=s.filter(Z),t[0]=s,t[1]=o):o=t[1];const l=o;let r;t[2]!==s?(r=s.filter(W),t[2]=s,t[3]=r):r=t[3];const m=r,d=S(l,u.id,u.slug,!0,e),f=S(m,u.id,u.slug,!0,e);let p;if(t[4]!==f.items||t[5]!==d.items){const y=new Set;p=[];const j=[...d.items,...f.items];for(const h of j){const v=`${h._registryId}:${h.id}`;y.has(v)||(y.add(v),p.push(h))}t[4]=f.items,t[5]=d.items,t[6]=p}else p=t[6];const P=d.isInitialLoading||f.isInitialLoading,g=d.isLoadingMore||f.isLoadingMore,c=d.hasMore||f.hasMore;let n;t[7]!==f||t[8]!==d?(n=()=>{d.hasMore&&d.fetchNextPage(),f.hasMore&&f.fetchNextPage()},t[7]=f,t[8]=d,t[9]=n):n=t[9];const a=n;let i;return t[10]!==c||t[11]!==P||t[12]!==g||t[13]!==p||t[14]!==a?(i={items:p,hasMore:c,isLoadingMore:g,isInitialLoading:P,loadMore:a},t[10]=c,t[11]=P,t[12]=g,t[13]=p,t[14]=a,t[15]=i):i=t[15],i}function W(s){return A(s)}function Z(s){return!A(s)}function fe(s){const e=R.c(37),{connection:t,onClick:u,headerActions:o,headerActionsAlwaysVisible:l,body:r,footer:m,className:d,fallbackIcon:f}=s,p=l===void 0?!1:l,P=u&&"hover:bg-muted/50";let g;e[0]!==d||e[1]!==P?(g=E("cursor-pointer transition-colors group overflow-hidden flex flex-col h-full",P,d),e[0]=d,e[1]=P,e[2]=g):g=e[2];let c;e[3]!==t.icon||e[4]!==t.title||e[5]!==f?(c=x.jsx(V,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:f}),e[3]=t.icon,e[4]=t.title,e[5]=f,e[6]=c):c=e[6];let n;e[7]!==o||e[8]!==p?(n=o&&x.jsx("div",{className:E("transition-opacity",!p&&"sm:opacity-0 sm:group-hover:opacity-100"),onClick:J,children:o}),e[7]=o,e[8]=p,e[9]=n):n=e[9];let a;e[10]!==n?(a=x.jsx("div",{className:"relative",children:n}),e[10]=n,e[11]=a):a=e[11];let i;e[12]!==c||e[13]!==a?(i=x.jsxs("div",{className:"flex items-start justify-between",children:[c,a]}),e[12]=c,e[13]=a,e[14]=i):i=e[14];let y;e[15]!==t.title?(y=x.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[15]=t.title,e[16]=y):y=e[16];const j=t.description||"No description";let h;e[17]!==j?(h=x.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:j}),e[17]=j,e[18]=h):h=e[18];let v;e[19]!==h||e[20]!==y?(v=x.jsxs("div",{className:"flex flex-col gap-1",children:[y,h]}),e[19]=h,e[20]=y,e[21]=v):v=e[21];let C;e[22]!==r?(C=r&&x.jsx("div",{children:r}),e[22]=r,e[23]=C):C=e[23];let I;e[24]!==v||e[25]!==C||e[26]!==i?(I=x.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[i,v,C]}),e[24]=v,e[25]=C,e[26]=i,e[27]=I):I=e[27];let b;e[28]!==m?(b=m&&x.jsx("div",{className:"border-t border-border mt-auto",children:x.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:B,children:m})}),e[28]=m,e[29]=b):b=e[29];let N;e[30]!==I||e[31]!==b?(N=x.jsxs("div",{className:"flex flex-col flex-1",children:[I,b]}),e[30]=I,e[31]=b,e[32]=N):N=e[32];let M;return e[33]!==u||e[34]!==N||e[35]!==g?(M=x.jsx(U,{className:g,onClick:u,children:N}),e[33]=u,e[34]=N,e[35]=g,e[36]=M):M=e[36],M}function B(s){return s.stopPropagation()}function J(s){return s.stopPropagation()}export{fe as C,ue as a,ae as g,ce as u};
1
+ import{g as _}from"./connection-slug-eyAPH6o3.js";import{c as R,s as T,a$ as k,K as D,l as E,j as x}from"./index-D9IK491L.js";import{u as K}from"./use-registry-connections-DCqUfQJj.js";import{b as Q}from"./use-organization-settings-DKT8xIyC.js";import{S as w,e as F}from"./use-mcp-client-RiDQVGqe.js";import{u as H}from"./useInfiniteQuery-GAIa3lI8.js";import{i as q,f as G}from"./extract-connection-data-uuFWP3hz.js";import{C as U}from"./card-DWaNR_SK.js";import{I as V}from"./integration-icon-BVY3nW43.js";function ae(s){const e=new Map;for(const o of s){const l=_(o),r=e.get(l);r?r.push(o):e.set(l,[o])}const t=[],u=new Set;for(const o of s){const l=_(o);if(u.has(l))continue;u.add(l);const r=e.get(l),m=r[0];r.length===1?t.push({type:"single",connection:m}):t.push({type:"group",key:l,icon:m.icon,title:m.app_name?m.title.replace(/\s*\(\d+\)\s*$/,""):m.title,connections:r})}return t}function ce(){const s=R.c(6),e=K(),t=Q(),u=T().project.enabledPlugins??[];let o;if(s[0]!==u||s[1]!==t||s[2]!==e){let l;s[4]!==t?(l=r=>t(r.id),s[4]=t,s[5]=l):l=s[5],o=e.filter(l).map(X),u.includes("private-registry")&&t(w)&&o.push({id:w,title:"Private Registry",icon:null}),s[0]=u,s[1]=t,s[2]=e,s[3]=o}else o=s[3];return o}function X(s){return{id:s.id,title:s.title,icon:s.icon}}const Y=24,$=3;function A(s){return s.id.includes("community-registry")}function z(s){const e=s?.trim();if(e)return{operator:"or",conditions:[{field:["title"],operator:"contains",value:e},{field:["description"],operator:"contains",value:e},{field:["name"],operator:"contains",value:e},{field:["server","title"],operator:"contains",value:e}]}}function S(s,e,t,u,o){const l=s.map(c=>c.id).sort().join(","),r=z(o),{data:m,fetchNextPage:d,hasNextPage:f,isFetchingNextPage:p,isLoading:P}=H({queryKey:D.storeDiscovery(e,`${l}:${o??""}`),queryFn:async({pageParam:c})=>{const n=c??{};return await Promise.all(s.map(async i=>{const y=n[i.id];if(y==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const j=q(i.id,e);let h;for(let v=0;v<$;v++){let C=null;try{C=await F({connectionId:i.id,orgId:e,orgSlug:t});const I={limit:Y};y&&(I.cursor=y),r&&(I.where=r);const b=await C.callTool({name:j,arguments:I}),N=b.structuredContent??b,M=N.nextCursor||N.cursor||void 0,L=G(N?[N]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:L,nextCursor:M}}catch(I){h=I}finally{await C?.close().catch(()=>{})}}return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${$} attempts:`,h),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}))},initialPageParam:{},getNextPageParam:c=>{const n={};let a=!1;for(const i of c)i.registryId&&(i.nextCursor?(n[i.registryId]=i.nextCursor,a=!0):n[i.registryId]="EXHAUSTED");return a?n:void 0},staleTime:3600*1e3,placeholderData:k,retry:!1,enabled:s.length>0}),g=[];if(m?.pages)for(const c of m.pages)for(const n of c)for(const a of n.items)g.push({...a,_sourceName:a._sourceName??n.registryTitle,_sourceIcon:a._sourceIcon??n.registryIcon,_registryId:a._registryId??n.registryId});return{items:g,hasMore:f??!1,isLoadingMore:p,isInitialLoading:P,fetchNextPage:()=>{f&&!p&&d()}}}function ue(s,e){const t=R.c(16),{org:u}=T();let o;t[0]!==s?(o=s.filter(Z),t[0]=s,t[1]=o):o=t[1];const l=o;let r;t[2]!==s?(r=s.filter(W),t[2]=s,t[3]=r):r=t[3];const m=r,d=S(l,u.id,u.slug,!0,e),f=S(m,u.id,u.slug,!0,e);let p;if(t[4]!==f.items||t[5]!==d.items){const y=new Set;p=[];const j=[...d.items,...f.items];for(const h of j){const v=`${h._registryId}:${h.id}`;y.has(v)||(y.add(v),p.push(h))}t[4]=f.items,t[5]=d.items,t[6]=p}else p=t[6];const P=d.isInitialLoading||f.isInitialLoading,g=d.isLoadingMore||f.isLoadingMore,c=d.hasMore||f.hasMore;let n;t[7]!==f||t[8]!==d?(n=()=>{d.hasMore&&d.fetchNextPage(),f.hasMore&&f.fetchNextPage()},t[7]=f,t[8]=d,t[9]=n):n=t[9];const a=n;let i;return t[10]!==c||t[11]!==P||t[12]!==g||t[13]!==p||t[14]!==a?(i={items:p,hasMore:c,isLoadingMore:g,isInitialLoading:P,loadMore:a},t[10]=c,t[11]=P,t[12]=g,t[13]=p,t[14]=a,t[15]=i):i=t[15],i}function W(s){return A(s)}function Z(s){return!A(s)}function fe(s){const e=R.c(37),{connection:t,onClick:u,headerActions:o,headerActionsAlwaysVisible:l,body:r,footer:m,className:d,fallbackIcon:f}=s,p=l===void 0?!1:l,P=u&&"hover:bg-muted/50";let g;e[0]!==d||e[1]!==P?(g=E("cursor-pointer transition-colors group overflow-hidden flex flex-col h-full",P,d),e[0]=d,e[1]=P,e[2]=g):g=e[2];let c;e[3]!==t.icon||e[4]!==t.title||e[5]!==f?(c=x.jsx(V,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:f}),e[3]=t.icon,e[4]=t.title,e[5]=f,e[6]=c):c=e[6];let n;e[7]!==o||e[8]!==p?(n=o&&x.jsx("div",{className:E("transition-opacity",!p&&"sm:opacity-0 sm:group-hover:opacity-100"),onClick:J,children:o}),e[7]=o,e[8]=p,e[9]=n):n=e[9];let a;e[10]!==n?(a=x.jsx("div",{className:"relative",children:n}),e[10]=n,e[11]=a):a=e[11];let i;e[12]!==c||e[13]!==a?(i=x.jsxs("div",{className:"flex items-start justify-between",children:[c,a]}),e[12]=c,e[13]=a,e[14]=i):i=e[14];let y;e[15]!==t.title?(y=x.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[15]=t.title,e[16]=y):y=e[16];const j=t.description||"No description";let h;e[17]!==j?(h=x.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:j}),e[17]=j,e[18]=h):h=e[18];let v;e[19]!==h||e[20]!==y?(v=x.jsxs("div",{className:"flex flex-col gap-1",children:[y,h]}),e[19]=h,e[20]=y,e[21]=v):v=e[21];let C;e[22]!==r?(C=r&&x.jsx("div",{children:r}),e[22]=r,e[23]=C):C=e[23];let I;e[24]!==v||e[25]!==C||e[26]!==i?(I=x.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[i,v,C]}),e[24]=v,e[25]=C,e[26]=i,e[27]=I):I=e[27];let b;e[28]!==m?(b=m&&x.jsx("div",{className:"border-t border-border mt-auto",children:x.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:B,children:m})}),e[28]=m,e[29]=b):b=e[29];let N;e[30]!==I||e[31]!==b?(N=x.jsxs("div",{className:"flex flex-col flex-1",children:[I,b]}),e[30]=I,e[31]=b,e[32]=N):N=e[32];let M;return e[33]!==u||e[34]!==N||e[35]!==g?(M=x.jsx(U,{className:g,onClick:u,children:N}),e[33]=u,e[34]=N,e[35]=g,e[36]=M):M=e[36],M}function B(s){return s.stopPropagation()}function J(s){return s.stopPropagation()}export{fe as C,ue as a,ae as g,ce as u};