@decocms/mesh 2.139.3 → 2.139.4

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 (203) hide show
  1. package/dist/client/assets/{AlertCircle-M_vDM06X.js → AlertCircle-B-qrtAf7.js} +1 -1
  2. package/dist/client/assets/{AlignLeft-BPVTL7Lg.js → AlignLeft-D93Obywx.js} +1 -1
  3. package/dist/client/assets/{ArrowDown-C0AHT6Se.js → ArrowDown-Brxajv-A.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-uXw4hDrl.js → ArrowLeft-ChnnVeV0.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-D3L33LOK.js → ArrowUp-D5ZC-G9T.js} +1 -1
  6. package/dist/client/assets/{Check-DhJrraz0.js → Check-xOBqZzmv.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-CHWgGReR.js → CheckCircle-t4fWflCL.js} +1 -1
  8. package/dist/client/assets/{CheckDone01-t8ZCK-7w.js → CheckDone01-CtIvl6NR.js} +1 -1
  9. package/dist/client/assets/{CheckVerified02-BkcCiKst.js → CheckVerified02-CEWZcD4z.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-DF3whIkz.js → ChevronDown-cFwq8_1y.js} +1 -1
  11. package/dist/client/assets/{ChevronLeft-wqObUnTJ.js → ChevronLeft-BDb5Vgx_.js} +1 -1
  12. package/dist/client/assets/{ChevronRight-TdWXpEIC.js → ChevronRight-zkVqPrw5.js} +1 -1
  13. package/dist/client/assets/{Clock-BtVgm0vZ.js → Clock-C8sBJSRB.js} +1 -1
  14. package/dist/client/assets/{Code01-DpgekTbT.js → Code01-Be1Un4zy.js} +1 -1
  15. package/dist/client/assets/{Container-C5O_vd5l.js → Container-BzuFyXB-.js} +1 -1
  16. package/dist/client/assets/{Copy01-DdgoiM5k.js → Copy01-D46xqpGe.js} +1 -1
  17. package/dist/client/assets/{Dataflow03-NGApWH5q.js → Dataflow03-C_auGuZw.js} +1 -1
  18. package/dist/client/assets/{DotsHorizontal-BdcComsR.js → DotsHorizontal-BzL1ksOS.js} +1 -1
  19. package/dist/client/assets/{DotsVertical-DngStBCK.js → DotsVertical-BWpyls9E.js} +1 -1
  20. package/dist/client/assets/{Download01-m8eiGYWG.js → Download01-DXQ7eLHV.js} +1 -1
  21. package/dist/client/assets/{Edit01-aQW4vCf2.js → Edit01-C-LkGhJt.js} +1 -1
  22. package/dist/client/assets/{Edit05-eAle7eYX.js → Edit05-B4gumSwA.js} +1 -1
  23. package/dist/client/assets/{Eye-D7EUKcSA.js → Eye-S2bOaZIy.js} +1 -1
  24. package/dist/client/assets/{File02-BgWATqR8.js → File02-v1x_k3KU.js} +1 -1
  25. package/dist/client/assets/{File06-CGYk4Mh5.js → File06-CjPbqhL6.js} +1 -1
  26. package/dist/client/assets/{FilterLines-BJ0Gbspi.js → FilterLines-DkQNMule.js} +1 -1
  27. package/dist/client/assets/{Globe01-Dl836bGy.js → Globe01-O7yat0_O.js} +1 -1
  28. package/dist/client/assets/{Globe02-Cwg0aLD6.js → Globe02-ChkOndGF.js} +1 -1
  29. package/dist/client/assets/{Grid01-BWhQjjDh.js → Grid01-H33eVxTX.js} +1 -1
  30. package/dist/client/assets/{Hash02-CcdmiUse.js → Hash02-BQbZm01-.js} +1 -1
  31. package/dist/client/assets/{Home02-ChdqVBjn.js → Home02-PdwInqFp.js} +1 -1
  32. package/dist/client/assets/{Image01-BLdmiwkG.js → Image01-CcXuD64C.js} +1 -1
  33. package/dist/client/assets/{Inbox01-CGne0tMp.js → Inbox01-CPxBPhel.js} +1 -1
  34. package/dist/client/assets/{InfoCircle-C7xGlw8n.js → InfoCircle-DK-HgSib.js} +1 -1
  35. package/dist/client/assets/{Key01-KqOK513j.js → Key01-HU-4mHLo.js} +1 -1
  36. package/dist/client/assets/{LayersTwo01-C9Qwrse5.js → LayersTwo01-RwSQ1J1I.js} +1 -1
  37. package/dist/client/assets/{LayoutLeft-Dtb_1Jp2.js → LayoutLeft-CbZOAm5Z.js} +1 -1
  38. package/dist/client/assets/{Link01-DdTCH4v9.js → Link01-DP82_UiC.js} +1 -1
  39. package/dist/client/assets/{LinkExternal01-CcLhJWrG.js → LinkExternal01-xPEp6WiT.js} +1 -1
  40. package/dist/client/assets/{List-CqTZ79z9.js → List-DIViT3Rd.js} +1 -1
  41. package/dist/client/assets/{Loading01-f9s2h1wv.js → Loading01-e5vrz4Tg.js} +1 -1
  42. package/dist/client/assets/{Lock01-B-0IEcXK.js → Lock01-CFsYgwl6.js} +1 -1
  43. package/dist/client/assets/{Play-BoKAVToz.js → Play-UpsQgFLL.js} +1 -1
  44. package/dist/client/assets/{Plus-BXkHOQsb.js → Plus-CAkBZRVl.js} +1 -1
  45. package/dist/client/assets/{RefreshCcw01-p39bp66R.js → RefreshCcw01-CsIOFnxl.js} +1 -1
  46. package/dist/client/assets/{Save01-DxAaB8Dn.js → Save01-C8SmHjV2.js} +1 -1
  47. package/dist/client/assets/{SearchMd-195kdrrc.js → SearchMd-3uDmzuN-.js} +1 -1
  48. package/dist/client/assets/{Settings01-CO9ZR5u9.js → Settings01-de0ujEEu.js} +1 -1
  49. package/dist/client/assets/{Shield01-CitF2_Bx.js → Shield01-Cd56MItL.js} +1 -1
  50. package/dist/client/assets/{Terminal-BI8lk715.js → Terminal-D4rOkPT8.js} +1 -1
  51. package/dist/client/assets/{Trash01-BPU7sU05.js → Trash01-GIxw_9KX.js} +1 -1
  52. package/dist/client/assets/{Upload01-CvIv0y_p.js → Upload01-DvU8XgOn.js} +1 -1
  53. package/dist/client/assets/{Users03-DVX3bbcm.js → Users03-Ci_Q0Bm5.js} +1 -1
  54. package/dist/client/assets/{X-DO1ZPMDK.js → X-D43RBdCi.js} +1 -1
  55. package/dist/client/assets/{XCircle-YMmdzMOW.js → XCircle-BT7T8C4l.js} +1 -1
  56. package/dist/client/assets/{XClose-BKL3EMXH.js → XClose-CPAcIRmr.js} +1 -1
  57. package/dist/client/assets/{Zap-DRU6cySW.js → Zap-AMjggLw-.js} +1 -1
  58. package/dist/client/assets/{agent-connections-preview-v1h44iHE.js → agent-connections-preview-ChIn79lc.js} +1 -1
  59. package/dist/client/assets/{agent-detail-B4KXmiS-.js → agent-detail-Fjm0OMqB.js} +1 -1
  60. package/dist/client/assets/{agents-DUYxE1v-.js → agents-CsJ8bLN2.js} +1 -1
  61. package/dist/client/assets/{alert-dialog-NBgR76Yp.js → alert-dialog-BF806470.js} +1 -1
  62. package/dist/client/assets/{auth-catchall-BkY6XTqn.js → auth-catchall-BDFjm7S-.js} +1 -1
  63. package/dist/client/assets/{avatar-CSPJYHbS.js → avatar-JlaJAGyz.js} +1 -1
  64. package/dist/client/assets/{badge-KDRqEGRi.js → badge-DuzneqaM.js} +1 -1
  65. package/dist/client/assets/{binder-DlLVJxi6.js → binder-CSUd_3kq.js} +1 -1
  66. package/dist/client/assets/{breadcrumb-Djkz23vb.js → breadcrumb-oXffKFw_.js} +1 -1
  67. package/dist/client/assets/{card-D-rpkLYG.js → card-B9F3gzU1.js} +1 -1
  68. package/dist/client/assets/{chart-BKDAOT1r.js → chart-CI8PXMri.js} +1 -1
  69. package/dist/client/assets/{checkbox-DY4RVI9F.js → checkbox-DzpFguCb.js} +1 -1
  70. package/dist/client/assets/{circle-alert-Bbr8JHad.js → circle-alert-BEV9hKq0.js} +1 -1
  71. package/dist/client/assets/{collapsible-D8z9g1MN.js → collapsible-65I6Ioz9.js} +1 -1
  72. package/dist/client/assets/{collection-detail-DxQo_ZG8.js → collection-detail-DnRXu6MS.js} +1 -1
  73. package/dist/client/assets/{collection-display-button-095BNnmg.js → collection-display-button-ByS_K4lH.js} +1 -1
  74. package/dist/client/assets/{collection-search-CRbc4DEy.js → collection-search-mO1HMauC.js} +1 -1
  75. package/dist/client/assets/{collection-tab-BaVME9h1.js → collection-tab-CkV__WhE.js} +1 -1
  76. package/dist/client/assets/{collection-table-wrapper-DqKxtjgj.js → collection-table-wrapper-CKemfX3q.js} +1 -1
  77. package/dist/client/assets/{collection-tabs-DvbR35T7.js → collection-tabs-Bx4HaaQG.js} +1 -1
  78. package/dist/client/assets/{command-Deql40ij.js → command-IGPGgPev.js} +1 -1
  79. package/dist/client/assets/{connect-CFEdZ_yc.js → connect-BRw7VxSz.js} +1 -1
  80. package/dist/client/assets/{connection-card-D3LRvC6Z.js → connection-card-CqqNv-1c.js} +1 -1
  81. package/dist/client/assets/{connection-detail-AatE-8EW.js → connection-detail-Do2QWhRf.js} +1 -1
  82. package/dist/client/assets/{connection-status-tnMJ5LrM.js → connection-status-DspYTx4l.js} +1 -1
  83. package/dist/client/assets/{connections-CrRorVhD.js → connections-oTwxAoKQ.js} +1 -1
  84. package/dist/client/assets/{constants-P4PVvchD.js → constants-Bi0KgUSI.js} +1 -1
  85. package/dist/client/assets/constants-C5K20DFA.js +1 -0
  86. package/dist/client/assets/{create-organization-dialog-DeHgw2r6.js → create-organization-dialog-B5UUWfs1.js} +1 -1
  87. package/dist/client/assets/{create-project-dialog-BR1WnOn3.js → create-project-dialog-B2mUe54b.js} +1 -1
  88. package/dist/client/assets/{danger-BcasZcHx.js → danger-DCm_AnTP.js} +1 -1
  89. package/dist/client/assets/{danger-zone-lGF1n9Js.js → danger-zone-DS8Xvo50.js} +1 -1
  90. package/dist/client/assets/{decopilot-events-BKM3OJ_e.js → decopilot-events-tuPofCi7.js} +1 -1
  91. package/dist/client/assets/{dependencies-C1lxz-K7.js → dependencies-Bn8l9gYN.js} +1 -1
  92. package/dist/client/assets/{dialog-CgD1R6sd.js → dialog-qBZn-zYi.js} +1 -1
  93. package/dist/client/assets/{dropdown-menu-fntgBKzW.js → dropdown-menu-DzUfzpVE.js} +1 -1
  94. package/dist/client/assets/{dynamic-plugin-layout-ZebFN00-.js → dynamic-plugin-layout-C7QgAOIC.js} +1 -1
  95. package/dist/client/assets/{editable-task-title-DPHjdMNk.js → editable-task-title-D48vrJtg.js} +1 -1
  96. package/dist/client/assets/{empty-state-BgUzJrfv.js → empty-state-lIvnej4y.js} +1 -1
  97. package/dist/client/assets/{env-vars-editor-h4ys9I0Q.js → env-vars-editor-CeqquBJY.js} +1 -1
  98. package/dist/client/assets/{extract-connection-data-DMHxmYCR.js → extract-connection-data-CuU1tc3b.js} +1 -1
  99. package/dist/client/assets/{file-browser-tpKJqOem.js → file-browser-Ni3oYaWz.js} +2 -2
  100. package/dist/client/assets/{form-CdDRR2LD.js → form-CvuQGiSW.js} +1 -1
  101. package/dist/client/assets/{general-BcfZa0RV.js → general-9N19ol48.js} +1 -1
  102. package/dist/client/assets/{grid-view-sFCv8Uqb.js → grid-view-nGNsPql9.js} +1 -1
  103. package/dist/client/assets/{home-DLSfiDzf.js → home-QZEMZFSO.js} +1 -1
  104. package/dist/client/assets/{icon-picker-Cnfw2xPr.js → icon-picker-CvTqhz-n.js} +1 -1
  105. package/dist/client/assets/{index-03O1pmQL.js → index-580YwBrh.js} +1 -1
  106. package/dist/client/assets/{index-jcoT9kFz.js → index-9XMeAvuz.js} +1 -1
  107. package/dist/client/assets/{index-eiswKdro.js → index-B2bsc0yn.js} +1 -1
  108. package/dist/client/assets/{index-CRZHS1YQ.js → index-B3tSRm_S.js} +1 -1
  109. package/dist/client/assets/{index-ClqqZs3X.js → index-BrwvwF2e.js} +1 -1
  110. package/dist/client/assets/{index-DwOzHQTE.js → index-C3HPQ2Xr.js} +1 -1
  111. package/dist/client/assets/{index-DMRPqDGw.js → index-DNc2lZPL.js} +1 -1
  112. package/dist/client/assets/{index-CS60M-lN.js → index-DlVoIZWW.js} +46 -46
  113. package/dist/client/assets/{index-D-htvwK7.js → index-zTmRWZBl.js} +3 -3
  114. package/dist/client/assets/{infiniteQueryObserver-DuuHSt2c.js → infiniteQueryObserver-CzeIHV7S.js} +1 -1
  115. package/dist/client/assets/{input-BSTFqIOK.js → input-yDn0CDzQ.js} +1 -1
  116. package/dist/client/assets/{integration-icon-Dhxeif96.js → integration-icon-BKuXjqdm.js} +1 -1
  117. package/dist/client/assets/{label-LNmGa3p2.js → label-D93HnDXr.js} +1 -1
  118. package/dist/client/assets/{layout-o3US39xJ.js → layout-7Qb5YRAm.js} +1 -1
  119. package/dist/client/assets/{layout-Cr68mJKX.js → layout-CrCZjoK5.js} +1 -1
  120. package/dist/client/assets/{localstorage-keys-CnuA12nM.js → localstorage-keys-DyhMCgsK.js} +1 -1
  121. package/dist/client/assets/{login-Dtyhtjmx.js → login-BqsIHX7V.js} +1 -1
  122. package/dist/client/assets/{markdown-7_Q9oy6X.js → markdown-Biu_K3T4.js} +1 -1
  123. package/dist/client/assets/{mcp-app-renderer-DTCug0hq.js → mcp-app-renderer-C2Ylvbme.js} +1 -1
  124. package/dist/client/assets/{mcp-oauth-DIzWYxTe.js → mcp-oauth-Bjgs9JoZ.js} +1 -1
  125. package/dist/client/assets/{mcp-server-card-CWrVyxhZ.js → mcp-server-card-Cup_00LD.js} +1 -1
  126. package/dist/client/assets/{mcp-server-detail-BCWsEtk3.js → mcp-server-detail--Jr_gAUp.js} +2 -2
  127. package/dist/client/assets/{members-BNvy-9dg.js → members-uqs0bICl.js} +1 -1
  128. package/dist/client/assets/{monaco-editor-D3oYOUgK.js → monaco-editor-DxLnMtPf.js} +1 -1
  129. package/dist/client/assets/{monitoring-O-i3Zgvs.js → monitoring-BVpuqZj3.js} +1 -1
  130. package/dist/client/assets/{monitoring-dashboard-edit-DICpgu4d.js → monitoring-dashboard-edit-DboSkF1Z.js} +1 -1
  131. package/dist/client/assets/{monitoring-dashboard-view-CESwm42A.js → monitoring-dashboard-view-Sh6DZnJz.js} +1 -1
  132. package/dist/client/assets/{oauth-callback-DpqL6SB9.js → oauth-callback-C_W-tYN-.js} +1 -1
  133. package/dist/client/assets/{page-CXJk9Ut5.js → page-Bes2KnC1.js} +1 -1
  134. package/dist/client/assets/{page-B5VsNKJS.js → page-_IMVPTag.js} +1 -1
  135. package/dist/client/assets/{plugin-empty-state-C6dQF47Z.js → plugin-empty-state-9L7esDde.js} +1 -1
  136. package/dist/client/assets/{plugin-empty-state-C-A808mR.js → plugin-empty-state-DiQvKRhi.js} +1 -1
  137. package/dist/client/assets/{plugin-header-C0Yd_CZi.js → plugin-header--u34B63W.js} +1 -1
  138. package/dist/client/assets/{plugin-header-D0x1sxLc.js → plugin-header-BQ0StX2h.js} +1 -1
  139. package/dist/client/assets/plugins-CVY3rx6b.js +1 -0
  140. package/dist/client/assets/{popover-DXIC1-bw.js → popover-BD-c_pAA.js} +1 -1
  141. package/dist/client/assets/{project-app-view-xR_h2zD7.js → project-app-view-DIraT3UL.js} +1 -1
  142. package/dist/client/assets/{project-layout-H5_8u4_Q.js → project-layout-D1HtBF_a.js} +1 -1
  143. package/dist/client/assets/{project-plugins-CjYskV4q.js → project-plugins-Bf4ZMkbc.js} +1 -1
  144. package/dist/client/assets/{projects-list-BGFm_ckP.js → projects-list-Bfhn5AOu.js} +1 -1
  145. package/dist/client/assets/{readme-viewer-B4AR77I_.js → readme-viewer-Bz6eCbMV.js} +1 -1
  146. package/dist/client/assets/{registry-layout-CbovzAcU.js → registry-layout-DJa_ec1i.js} +1 -1
  147. package/dist/client/assets/{registry-utils-CdFhHdcR.js → registry-utils-BAmZqs68.js} +1 -1
  148. package/dist/client/assets/{reports-layout-DZZ6JpS5.js → reports-layout-D5Z2DXwV.js} +1 -1
  149. package/dist/client/assets/{reset-password-YnbsVy6R.js → reset-password-Dl47mf_w.js} +1 -1
  150. package/dist/client/assets/{resizable-DhZ4OF4a.js → resizable-D-Qy_gIf.js} +1 -1
  151. package/dist/client/assets/{save-actions-D9BU7-6K.js → save-actions-C1NjZgvb.js} +1 -1
  152. package/dist/client/assets/{scroll-area-DgGHH6RH.js → scroll-area-fWogdApD.js} +1 -1
  153. package/dist/client/assets/{select-CrOlaxCO.js → select-45R_TReG.js} +1 -1
  154. package/dist/client/assets/{shell-layout-DPeqU-6v.js → shell-layout-CA8fD8RA.js} +2 -2
  155. package/dist/client/assets/{sidebar-settings-Auqs2XAg.js → sidebar-settings--2xwv6Nu.js} +1 -1
  156. package/dist/client/assets/{skeleton-DML2aQA-.js → skeleton-B23sd6oG.js} +1 -1
  157. package/dist/client/assets/{spinner-cdL_Fmz-.js → spinner-DrSoNW9Q.js} +1 -1
  158. package/dist/client/assets/{store-invite-DmN5PmIw.js → store-invite-DJFtuLEP.js} +1 -1
  159. package/dist/client/assets/{switch-CAg0B_Rv.js → switch-DbnN_OzY.js} +1 -1
  160. package/dist/client/assets/{table-Bn8GUsEe.js → table-JhNW7SQy.js} +1 -1
  161. package/dist/client/assets/{tabs-C7dg0Vvg.js → tabs-fxZVpBgm.js} +1 -1
  162. package/dist/client/assets/tasks-9SndjM2b.js +1 -0
  163. package/dist/client/assets/{tasks-panel-Bw2bEANh.js → tasks-panel-CL4KTePe.js} +1 -1
  164. package/dist/client/assets/{textarea-BcqBCUUu.js → textarea-DdFrppMC.js} +1 -1
  165. package/dist/client/assets/{time-range-picker-CoqzHvv0.js → time-range-picker-cwer29Fw.js} +1 -1
  166. package/dist/client/assets/{toggle-group-D0qkbRCN.js → toggle-group-DN2MnVNp.js} +1 -1
  167. package/dist/client/assets/{tools-list-BkL1UdvP.js → tools-list-DIjrxN4B.js} +1 -1
  168. package/dist/client/assets/{tooltip-BtnNkpKs.js → tooltip-c2IY6Q1h.js} +1 -1
  169. package/dist/client/assets/{topbar-portal-jOMGe5hi.js → topbar-portal-B1jaxoch.js} +1 -1
  170. package/dist/client/assets/{types-BLisMR9q.js → types-D02NXJjh.js} +1 -1
  171. package/dist/client/assets/{use-binding-BTY1B5EO.js → use-binding-CczCr_I6.js} +1 -1
  172. package/dist/client/assets/{use-collections-S_4aLkkK.js → use-collections-BM5qbXh2.js} +1 -1
  173. package/dist/client/assets/{use-connection-CIMDlS0p.js → use-connection-D_z7DIgr.js} +1 -1
  174. package/dist/client/assets/{use-copy-X88seI8c.js → use-copy-CedSm4V4.js} +1 -1
  175. package/dist/client/assets/{use-create-virtual-mcp-Crgs_7Nu.js → use-create-virtual-mcp-DN0LN6Ks.js} +1 -1
  176. package/dist/client/assets/{use-install-from-registry-B9tJfMj0.js → use-install-from-registry-DJsrJBCB.js} +1 -1
  177. package/dist/client/assets/{use-list-state-BSenVV3C.js → use-list-state-DiVFU-Ch.js} +1 -1
  178. package/dist/client/assets/{use-llm-DNHK5zRW.js → use-llm-Cgu6F_JM.js} +1 -1
  179. package/dist/client/assets/{use-mcp-resources-DdAbAYhl.js → use-mcp-resources-F-AJdNv-.js} +1 -1
  180. package/dist/client/assets/{use-mcp-tools-9xAyOALf.js → use-mcp-tools-CXYzi3AR.js} +1 -1
  181. package/dist/client/assets/{use-members-Cm-k0g9m.js → use-members-DgdmWVSo.js} +1 -1
  182. package/dist/client/assets/{use-mobile-qpUl5FeD.js → use-mobile-Y1Ty5Ao9.js} +1 -1
  183. package/dist/client/assets/{use-project-DfoyehRx.js → use-project-Bp8E6yw9.js} +1 -1
  184. package/dist/client/assets/{use-settings-modal-DdyHyLPW.js → use-settings-modal-BMI_o1Ch.js} +1 -1
  185. package/dist/client/assets/{use-view-mode-JyUdxjkA.js → use-view-mode-D1a8tpCU.js} +1 -1
  186. package/dist/client/assets/{use-virtual-mcp-qK-NM0rh.js → use-virtual-mcp-BwZwR42s.js} +1 -1
  187. package/dist/client/assets/useInfiniteQuery-MM2sZURp.js +1 -0
  188. package/dist/client/assets/{useMutation-D9A8H6Gw.js → useMutation-DxToDvqg.js} +1 -1
  189. package/dist/client/assets/useQuery-C_yP5u2a.js +1 -0
  190. package/dist/client/assets/useSuspenseInfiniteQuery-rRWDLVCQ.js +1 -0
  191. package/dist/client/assets/{user-DOfZcM2J.js → user-Cjj1cELF.js} +1 -1
  192. package/dist/client/assets/{workflow-CCx8GI9K.js → workflow-DF5-JJx7.js} +1 -1
  193. package/dist/client/index.html +1 -1
  194. package/dist/server/cli.js +3 -3
  195. package/dist/server/migrate.js +1 -1
  196. package/dist/server/server.js +3 -3
  197. package/package.json +1 -1
  198. package/dist/client/assets/constants-B8it1peu.js +0 -1
  199. package/dist/client/assets/plugins-BODrRYA2.js +0 -1
  200. package/dist/client/assets/tasks-BlpbiwmW.js +0 -1
  201. package/dist/client/assets/useInfiniteQuery-BspPd2u8.js +0 -1
  202. package/dist/client/assets/useQuery-D9zfpIOd.js +0 -1
  203. package/dist/client/assets/useSuspenseInfiniteQuery-BqnGzNK9.js +0 -1
@@ -1,2 +1,2 @@
1
- import{r as _,c as k,j as t,E as fe,B as Z,v as ae,a1 as qe,u as de,V as Qe,s as Xe,t as ce,b as et,e as tt,O as Ge,l as st,k as lt,aF as ot,x as Me}from"./index-D-htvwK7.js";import{b as Ae,i as nt,c as it,u as rt,C as at,d as ct}from"./collapsible-D8z9g1MN.js";import{C as dt,E as mt}from"./collection-search-CRbc4DEy.js";import{I as ut}from"./icon-picker-Cnfw2xPr.js";import{I as Oe}from"./integration-icon-Dhxeif96.js";import{u as ft}from"./index-DwOzHQTE.js";import{B as $e}from"./badge-KDRqEGRi.js";import{I as Ve}from"./input-BSTFqIOK.js";import{S as pt}from"./switch-CAg0B_Rv.js";import{T as xt}from"./textarea-BcqBCUUu.js";import{a as pe,c as ve,T as xe,b as he}from"./tooltip-BtnNkpKs.js";import{b as ht,u as gt}from"./use-connection-CIMDlS0p.js";import{u as jt,a as bt}from"./use-virtual-mcp-qK-NM0rh.js";import{i as He}from"./ChevronRight-TdWXpEIC.js";import{n as Nt}from"./select-CrOlaxCO.js";import{i as De}from"./File02-BgWATqR8.js";import{i as Le}from"./Loading01-f9s2h1wv.js";import{i as vt}from"./Play-BoKAVToz.js";import{s as Be}from"./Plus-BXkHOQsb.js";import{t as yt}from"./Users03-DVX3bbcm.js";import{B as Ct,a as _t,b as Fe,d as St,e as Tt,c as kt}from"./breadcrumb-Djkz23vb.js";import{a as wt,V as Et}from"./layout-Cr68mJKX.js";import{S as It}from"./save-actions-D9BU7-6K.js";import{a as At}from"./tools-list-BkL1UdvP.js";import{C as ze}from"./checkbox-DY4RVI9F.js";import{e as Ot,a as Ue,D as Ke,b as $t,c as Dt}from"./dialog-CgD1R6sd.js";import{T as ye,a as Lt,b as Ce,c as zt}from"./tabs-C7dg0Vvg.js";import{u as ge,a as Rt}from"./constants-P4PVvchD.js";import{c as Pt}from"./use-mcp-tools-9xAyOALf.js";import{a as Mt}from"./use-mcp-resources-DdAbAYhl.js";import{u as Vt}from"./decopilot-events-BKM3OJ_e.js";import{s as We}from"./slugify-CEUa2lfQ.js";import{I as Bt,R as Ft,a as Gt}from"./index-ClqqZs3X.js";import{i as je}from"./Check-DhJrraz0.js";import{i as Ht}from"./Code01-DpgekTbT.js";import{a as Re}from"./Copy01-DdgoiM5k.js";import{i as _e}from"./InfoCircle-C7xGlw8n.js";import{i as Ut}from"./Key01-KqOK513j.js";import{A as Kt}from"./agent-connections-preview-v1h44iHE.js";import"./use-llm-DNHK5zRW.js";import"./use-collections-S_4aLkkK.js";import"./useMutation-D9A8H6Gw.js";import"./use-binding-BTY1B5EO.js";import"./binder-DlLVJxi6.js";import"./useQuery-D9zfpIOd.js";import"./localstorage-keys-CnuA12nM.js";import"./skeleton-DML2aQA-.js";import"./AlignLeft-BPVTL7Lg.js";import"./ArrowLeft-uXw4hDrl.js";import"./ChevronDown-DF3whIkz.js";import"./Image01-BLdmiwkG.js";import"./RefreshCcw01-p39bp66R.js";import"./SearchMd-195kdrrc.js";import"./Settings01-CO9ZR5u9.js";import"./useSuspenseInfiniteQuery-BqnGzNK9.js";import"./infiniteQueryObserver-DuuHSt2c.js";import"./popover-DXIC1-bw.js";import"./scroll-area-DgGHH6RH.js";import"./Container-C5O_vd5l.js";import"./Edit05-eAle7eYX.js";import"./Link01-DdTCH4v9.js";import"./XClose-BKL3EMXH.js";import"./index-DMRPqDGw.js";import"./Save01-DxAaB8Dn.js";import"./collection-display-button-095BNnmg.js";import"./dropdown-menu-fntgBKzW.js";import"./ArrowDown-C0AHT6Se.js";import"./ArrowUp-D3L33LOK.js";import"./Grid01-BWhQjjDh.js";import"./List-CqTZ79z9.js";import"./collection-table-wrapper-DqKxtjgj.js";import"./table-Bn8GUsEe.js";import"./card-D-rpkLYG.js";import"./types-BLisMR9q.js";import"./Eye-D7EUKcSA.js";import"./Globe02-Cwg0aLD6.js";import"./LayersTwo01-C9Qwrse5.js";import"./X-DO1ZPMDK.js";const Ye=({size:o=24,color:e="currentColor",...s})=>_.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},_.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}));Ye.displayName="Circle";const be=({size:o=24,color:e="currentColor",...s})=>_.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},_.createElement("path",{d:"m9.75 20.75 1.473.818c.284.158.425.237.576.268.133.027.27.027.402 0 .15-.031.292-.11.576-.268l1.473-.818m-9-2.5-1.427-.793c-.3-.166-.45-.25-.558-.368a1 1 0 0 1-.215-.364C3 16.573 3 16.401 3 16.06V14.5m0-5V7.942c0-.343 0-.514.05-.667a1 1 0 0 1 .215-.364c.109-.119.258-.202.558-.368L5.25 5.75m4.5-2.5 1.473-.818c.284-.158.425-.237.576-.267a1 1 0 0 1 .402 0c.15.03.292.11.576.267l1.473.818m4.5 2.5 1.427.793c.3.166.45.25.558.368a1 1 0 0 1 .215.364c.05.153.05.324.05.667V9.5m0 5v1.559c0 .342 0 .514-.05.666a.999.999 0 0 1-.215.364c-.109.119-.258.202-.558.368l-1.427.793m-9-7.5L12 12m0 0 2.25-1.25M12 12v2.5M3 7l2.25 1.25m13.5 0L21 7m-9 12.5V22"}));be.displayName="CubeOutline";const Je=({size:o=24,color:e="currentColor",...s})=>_.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},_.createElement("path",{d:"m12 5.5-4.638 6.747c-.28.406-.42.609-.41.778a.5.5 0 0 0 .195.373c.135.102.38.102.874.102H12v5l4.638-6.747c.28-.406.42-.609.41-.778a.5.5 0 0 0-.195-.373c-.135-.102-.38-.102-.874-.102H12v-5Z"}),_.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}));Je.displayName="ZapCircle";function Se(o){return o===null?"all":o?.length??0}function Wt(o,e){const s=o[e];if(!s)return"";const n=[];return s.tools===null?n.push("all tools"):s.tools&&s.tools.length>0&&n.push(`${s.tools.length} tools`),s.resources===null?n.push("all resources"):s.resources&&s.resources.length>0&&n.push(`${s.resources.length} resources`),s.prompts===null?n.push("all prompts"):s.prompts&&s.prompts.length>0&&n.push(`${s.prompts.length} prompts`),n.join(", ")}function Yt(o,e){const s=o[e];return s?!((s.tools===void 0||s.tools!==null&&s.tools.length===0)&&(s.resources===void 0||s.resources!==null&&s.resources.length===0)&&(s.prompts===void 0||s.prompts!==null&&s.prompts.length===0)):!1}const Jt={tools:null,resources:null,prompts:null};function Te(){const o=k.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex items-center justify-center h-32",children:t.jsx(Le,{className:"animate-spin text-muted-foreground",size:24})}),o[0]=e):e=o[0],e}function ke(o){return({error:e})=>e?.message?.includes("Method not found")||e?.code===-32601?t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:o})}):t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(qe,{className:"h-6 w-6 text-destructive"})}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:e?.message?e.message.length>200?`${e.message.slice(0,200)}...`:e.message:"An unexpected error occurred"})]})]})}function Zt(o){const e=k.c(23),{item:s,isSelected:n,onToggle:l,disabled:i}=o,d=i?"cursor-not-allowed opacity-50":"cursor-pointer",a=n?"bg-accent/25":"hover:bg-muted/50";let r;e[0]!==d||e[1]!==a?(r=ae("flex items-start gap-3 p-4 rounded-lg transition-colors",d,a),e[0]=d,e[1]=a,e[2]=r):r=e[2];let c;e[3]!==s.name?(c=t.jsx("p",{className:"text-sm font-medium leading-none truncate",children:s.name}),e[3]=s.name,e[4]=c):c=e[4];let x;e[5]!==s.tags?(x=s.tags&&t.jsx("span",{className:"shrink-0",children:s.tags}),e[5]=s.tags,e[6]=x):x=e[6];let g;e[7]!==c||e[8]!==x?(g=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[c,x]}),e[7]=c,e[8]=x,e[9]=g):g=e[9];let p;e[10]!==s.description?(p=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:s.description}),e[10]=s.description,e[11]=p):p=e[11];let h;e[12]!==g||e[13]!==p?(h=t.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[g,p]}),e[12]=g,e[13]=p,e[14]=h):h=e[14];let u;e[15]!==i||e[16]!==n||e[17]!==l?(u=t.jsx(ze,{checked:n,onCheckedChange:l,disabled:i,className:"mt-0.5"}),e[15]=i,e[16]=n,e[17]=l,e[18]=u):u=e[18];let f;return e[19]!==r||e[20]!==h||e[21]!==u?(f=t.jsxs("label",{className:r,children:[h,u]}),e[19]=r,e[20]=h,e[21]=u,e[22]=f):f=e[22],f}function Pe(o){const e=k.c(32),{items:s,selections:n,onToggle:l,onToggleAll:i,emptyMessage:d,disabled:a}=o;let r,c,x,g,p;if(e[0]!==a||e[1]!==d||e[2]!==s||e[3]!==l||e[4]!==i||e[5]!==n){p=Symbol.for("react.early_return_sentinel");e:{const f=s.map(qt);if(s.length===0){let y;e[11]!==d?(y=t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:d})}),e[11]=d,e[12]=y):y=e[12],p=y;break e}x="flex flex-col h-full";const b=a?"cursor-not-allowed opacity-50":"cursor-pointer";let m;e[13]!==b?(m=ae("flex items-start gap-3 p-4",b),e[13]=b,e[14]=m):m=e[14];let j;e[15]!==s.length?(j=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsxs("span",{className:"text-sm font-medium",children:["Select All (",s.length,")"]})}),e[15]=s.length,e[16]=j):j=e[16];const v=n===null;let C;e[17]!==a||e[18]!==i||e[19]!==v?(C=t.jsx(ze,{checked:v,onCheckedChange:i,disabled:a,className:"mt-0.5"}),e[17]=a,e[18]=i,e[19]=v,e[20]=C):C=e[20],e[21]!==C||e[22]!==m||e[23]!==j?(g=t.jsx("div",{className:"px-4 border-b border-border shrink-0",children:t.jsxs("label",{className:m,children:[j,C]})}),e[21]=C,e[22]=m,e[23]=j,e[24]=g):g=e[24],r="flex-1 overflow-auto px-4 py-3 space-y-1",c=s.map(y=>t.jsx(Zt,{item:y,isSelected:n===null||n?.includes(y.id),onToggle:()=>l(y.id,f),disabled:a},y.id))}e[0]=a,e[1]=d,e[2]=s,e[3]=l,e[4]=i,e[5]=n,e[6]=r,e[7]=c,e[8]=x,e[9]=g,e[10]=p}else r=e[6],c=e[7],x=e[8],g=e[9],p=e[10];if(p!==Symbol.for("react.early_return_sentinel"))return p;let h;e[25]!==r||e[26]!==c?(h=t.jsx("div",{className:r,children:c}),e[25]=r,e[26]=c,e[27]=h):h=e[27];let u;return e[28]!==x||e[29]!==g||e[30]!==h?(u=t.jsxs("div",{className:x,children:[g,h]}),e[28]=x,e[29]=g,e[30]=h,e[31]=u):u=e[31],u}function qt(o){return o.id}function Qt(o){const e=k.c(13),{connectionId:s,selections:n,onToggle:l,onToggleAll:i,disabled:d}=o,{org:a}=de();let r;e[0]!==s||e[1]!==a.id?(r={connectionId:s,orgId:a.id},e[0]=s,e[1]=a.id,e[2]=r):r=e[2];const c=ge(r);let x;e[3]!==c?(x={client:c},e[3]=c,e[4]=x):x=e[4];const{data:g}=Pt(x);let p;e[5]!==g.tools?(p=g.tools.map(Xt),e[5]=g.tools,e[6]=p):p=e[6];const h=p;let u;return e[7]!==d||e[8]!==h||e[9]!==l||e[10]!==i||e[11]!==n?(u=t.jsx(Pe,{items:h,selections:n,onToggle:l,onToggleAll:i,emptyMessage:"No tools available",disabled:d}),e[7]=d,e[8]=h,e[9]=l,e[10]=i,e[11]=n,e[12]=u):u=e[12],u}function Xt(o){return{id:o.name,name:o.name,description:o.description,tags:t.jsx(At,{annotations:o.annotations,_meta:o._meta})}}function es(o){const e=k.c(13),{connectionId:s,selections:n,onToggle:l,onToggleAll:i,disabled:d}=o,{org:a}=de();let r;e[0]!==s||e[1]!==a.id?(r={connectionId:s,orgId:a.id},e[0]=s,e[1]=a.id,e[2]=r):r=e[2];const c=ge(r);let x;e[3]!==c?(x={client:c},e[3]=c,e[4]=x):x=e[4];const{data:g}=Mt(x);let p;e[5]!==g.resources?(p=g.resources.map(ts),e[5]=g.resources,e[6]=p):p=e[6];const h=p;let u;return e[7]!==d||e[8]!==h||e[9]!==l||e[10]!==i||e[11]!==n?(u=t.jsx(Pe,{items:h,selections:n,onToggle:l,onToggleAll:i,emptyMessage:"No resources available",disabled:d}),e[7]=d,e[8]=h,e[9]=l,e[10]=i,e[11]=n,e[12]=u):u=e[12],u}function ts(o){return{id:o.name||o.uri,name:o.name||o.uri,description:o.description}}function ss(o){const e=k.c(13),{connectionId:s,selections:n,onToggle:l,onToggleAll:i,disabled:d}=o,{org:a}=de();let r;e[0]!==s||e[1]!==a.id?(r={connectionId:s,orgId:a.id},e[0]=s,e[1]=a.id,e[2]=r):r=e[2];const c=ge(r);let x;e[3]!==c?(x={client:c},e[3]=c,e[4]=x):x=e[4];const{data:g}=Vt(x);let p;e[5]!==g.prompts?(p=g.prompts.map(ls),e[5]=g.prompts,e[6]=p):p=e[6];const h=p;let u;return e[7]!==d||e[8]!==h||e[9]!==l||e[10]!==i||e[11]!==n?(u=t.jsx(Pe,{items:h,selections:n,onToggle:l,onToggleAll:i,emptyMessage:"No prompts available",disabled:d}),e[7]=d,e[8]=h,e[9]=l,e[10]=i,e[11]=n,e[12]=u):u=e[12],u}function ls(o){return{id:o.name,name:o.name,description:o.description}}function os(o){const e=k.c(24),{connection:s,isSelected:n,hasSelections:l,summary:i,onClick:d,onToggleAll:a,disabled:r}=o,c=r?"cursor-not-allowed opacity-50":"cursor-pointer",x=n?"bg-accent":"hover:bg-muted/50";let g;e[0]!==c||e[1]!==x?(g=ae("flex items-center gap-2 p-2 h-12 rounded-lg transition-colors",c,x),e[0]=c,e[1]=x,e[2]=g):g=e[2];const p=r?void 0:d;let h;e[3]!==s.icon||e[4]!==s.title?(h=t.jsx(Oe,{icon:s.icon,name:s.title,size:"xs",className:"shrink-0"}),e[3]=s.icon,e[4]=s.title,e[5]=h):h=e[5];let u;e[6]!==s.title?(u=t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.title}),e[6]=s.title,e[7]=u):u=e[7];let f;e[8]!==l||e[9]!==i?(f=l&&i&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:i}),e[8]=l,e[9]=i,e[10]=f):f=e[10];let b;e[11]!==u||e[12]!==f?(b=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[u,f]}),e[11]=u,e[12]=f,e[13]=b):b=e[13];let m;e[14]!==r||e[15]!==l||e[16]!==a?(m=t.jsx(ze,{checked:l,onCheckedChange:a,onClick:ns,disabled:r,className:"shrink-0"}),e[14]=r,e[15]=l,e[16]=a,e[17]=m):m=e[17];let j;return e[18]!==g||e[19]!==p||e[20]!==h||e[21]!==b||e[22]!==m?(j=t.jsxs("div",{className:g,onClick:p,children:[h,b,m]}),e[18]=g,e[19]=p,e[20]=h,e[21]=b,e[22]=m,e[23]=j):j=e[23],j}function ns(o){return o.stopPropagation()}function is(o){const e=k.c(22),{allConnections:s,searchTerm:n,selectedId:l,hasSelections:i,getSelectionSummary:d,onConnectionClick:a,onToggleAll:r,disabled:c}=o;let x;e[0]!==s||e[1]!==n?(x=n?s.filter(u=>u.title.toLowerCase().includes(n.toLowerCase())||u.description?.toLowerCase().includes(n.toLowerCase())):s,e[0]=s,e[1]=n,e[2]=x):x=e[2];const g=x;if(g.length===0){const u=n?"No connections found":"No connections available";let f;return e[3]!==u?(f=t.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4",children:u}),e[3]=u,e[4]=f):f=e[4],f}let p;if(e[5]!==c||e[6]!==g||e[7]!==d||e[8]!==i||e[9]!==a||e[10]!==r||e[11]!==l){let u;e[13]!==c||e[14]!==d||e[15]!==i||e[16]!==a||e[17]!==r||e[18]!==l?(u=f=>t.jsx(os,{connection:f,isSelected:l===f.id,hasSelections:i(f.id),summary:d(f.id),onClick:()=>a(f.id),onToggleAll:()=>r(f.id),disabled:c},f.id),e[13]=c,e[14]=d,e[15]=i,e[16]=a,e[17]=r,e[18]=l,e[19]=u):u=e[19],p=g.map(u),e[5]=c,e[6]=g,e[7]=d,e[8]=i,e[9]=a,e[10]=r,e[11]=l,e[12]=p}else p=e[12];let h;return e[20]!==p?(h=t.jsx("div",{className:"flex flex-col gap-0.5",children:p}),e[20]=p,e[21]=h):h=e[21],h}function rs(o){const e=k.c(75),{currentConnection:s,activeTab:n,selectedId:l,formData:i,toggleTool:d,toggleResource:a,togglePrompt:r,toggleAllTools:c,toggleAllResources:x,toggleAllPrompts:g,onTabChange:p}=o;let h;e[0]!==s.icon||e[1]!==s.title?(h=t.jsx(Oe,{icon:s.icon,name:s.title,size:"md",className:"shrink-0"}),e[0]=s.icon,e[1]=s.title,e[2]=h):h=e[2];let u;e[3]!==s.title?(u=t.jsx("h2",{className:"text-lg font-semibold truncate",children:s.title}),e[3]=s.title,e[4]=u):u=e[4];let f;e[5]!==s.description?(f=s.description&&t.jsx("p",{className:"text-sm text-muted-foreground truncate",children:s.description}),e[5]=s.description,e[6]=f):f=e[6];let b;e[7]!==u||e[8]!==f?(b=t.jsxs("div",{className:"flex-1 min-w-0",children:[u,f]}),e[7]=u,e[8]=f,e[9]=b):b=e[9];let m;e[10]!==h||e[11]!==b?(m=t.jsx("div",{className:"p-6 border-b border-border shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[h,b]})}),e[10]=h,e[11]=b,e[12]=m):m=e[12];let j;e[13]!==p?(j=M=>p(M),e[13]=p,e[14]=j):j=e[14];let v;e[15]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsxs(ye,{value:"tools",variant:"underline",className:"gap-2",children:[t.jsx(Ae,{size:16}),"Tools"]}),e[15]=v):v=e[15];let C;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsxs(ye,{value:"resources",variant:"underline",className:"gap-2",children:[t.jsx(be,{size:16}),"Resources"]}),e[16]=C):C=e[16];let y;e[17]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsxs(Lt,{variant:"underline",className:"shrink-0 px-6",children:[v,C,t.jsxs(ye,{value:"prompts",variant:"underline",className:"gap-2",children:[t.jsx(De,{size:16}),"Prompts"]})]}),e[17]=y):y=e[17];let V;e[18]===Symbol.for("react.memo_cache_sentinel")?(V=ke("Tools not supported by this server"),e[18]=V):V=e[18];let R;e[19]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx(Te,{}),e[19]=R):R=e[19];let T;e[20]!==i||e[21]!==l?(T=i[l]?i[l].tools:[],e[20]=i,e[21]=l,e[22]=T):T=e[22];let O;e[23]!==l||e[24]!==d?(O=(M,J)=>d(l,M,J),e[23]=l,e[24]=d,e[25]=O):O=e[25];let S;e[26]!==l||e[27]!==c?(S=()=>c(l),e[26]=l,e[27]=c,e[28]=S):S=e[28];let w;e[29]!==l||e[30]!==T||e[31]!==O||e[32]!==S?(w=t.jsx(Ce,{value:"tools",className:"flex-1 overflow-hidden mt-0",children:t.jsx(fe,{fallback:V,children:t.jsx(_.Suspense,{fallback:R,children:t.jsx(Qt,{connectionId:l,selections:T,onToggle:O,onToggleAll:S})})})}),e[29]=l,e[30]=T,e[31]=O,e[32]=S,e[33]=w):w=e[33];let z;e[34]===Symbol.for("react.memo_cache_sentinel")?(z=ke("Resources not supported by this server"),e[34]=z):z=e[34];let $;e[35]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(Te,{}),e[35]=$):$=e[35];let I;e[36]!==i||e[37]!==l?(I=i[l]?i[l].resources:[],e[36]=i,e[37]=l,e[38]=I):I=e[38];let D;e[39]!==l||e[40]!==a?(D=(M,J)=>a(l,M,J),e[39]=l,e[40]=a,e[41]=D):D=e[41];let A;e[42]!==l||e[43]!==x?(A=()=>x(l),e[42]=l,e[43]=x,e[44]=A):A=e[44];let E;e[45]!==l||e[46]!==I||e[47]!==D||e[48]!==A?(E=t.jsx(Ce,{value:"resources",className:"flex-1 overflow-hidden mt-0",children:t.jsx(fe,{fallback:z,children:t.jsx(_.Suspense,{fallback:$,children:t.jsx(es,{connectionId:l,selections:I,onToggle:D,onToggleAll:A})})})}),e[45]=l,e[46]=I,e[47]=D,e[48]=A,e[49]=E):E=e[49];let B;e[50]===Symbol.for("react.memo_cache_sentinel")?(B=ke("Prompts not supported by this server"),e[50]=B):B=e[50];let P;e[51]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(Te,{}),e[51]=P):P=e[51];let K;e[52]!==i||e[53]!==l?(K=i[l]?i[l].prompts:[],e[52]=i,e[53]=l,e[54]=K):K=e[54];let H;e[55]!==l||e[56]!==r?(H=(M,J)=>r(l,M,J),e[55]=l,e[56]=r,e[57]=H):H=e[57];let W;e[58]!==l||e[59]!==g?(W=()=>g(l),e[58]=l,e[59]=g,e[60]=W):W=e[60];let U;e[61]!==l||e[62]!==K||e[63]!==H||e[64]!==W?(U=t.jsx(Ce,{value:"prompts",className:"flex-1 overflow-hidden mt-0",children:t.jsx(fe,{fallback:B,children:t.jsx(_.Suspense,{fallback:P,children:t.jsx(ss,{connectionId:l,selections:K,onToggle:H,onToggleAll:W})})})}),e[61]=l,e[62]=K,e[63]=H,e[64]=W,e[65]=U):U=e[65];let Y;e[66]!==n||e[67]!==w||e[68]!==E||e[69]!==U||e[70]!==j?(Y=t.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:t.jsxs(zt,{value:n,onValueChange:j,variant:"underline",className:"flex-1 flex flex-col overflow-hidden",children:[y,w,E,U]})}),e[66]=n,e[67]=w,e[68]=E,e[69]=U,e[70]=j,e[71]=Y):Y=e[71];let q;return e[72]!==Y||e[73]!==m?(q=t.jsxs(t.Fragment,{children:[m,Y]}),e[72]=Y,e[73]=m,e[74]=q):q=e[74],q}function as(o){const e={};for(const s of o)e[s.connection_id]={tools:s.selected_tools,resources:s.selected_resources??null,prompts:s.selected_prompts??null};return e}function we(o){return Object.entries(o).map(([e,s])=>({connection_id:e,selected_tools:s.tools,selected_resources:s.resources,selected_prompts:s.prompts}))}function cs(o,e){switch(e.type){case"SET_SEARCH_TERM":return{...o,searchTerm:e.payload};case"SET_SELECTED":return{...o,selectedId:e.payload};case"SET_ACTIVE_TAB":return{...o,activeTab:e.payload};case"RESET":return{searchTerm:"",selectedId:e.payload.selectedId??e.payload.firstConnectionId??null,activeTab:"tools"};case"SELECT_CONNECTION":return{...o,selectedId:e.payload,activeTab:"tools"};default:return o}}const ds=(o,e)=>o.find(s=>s.id===e)??o[0];function ms(o){const e=k.c(77),{open:s,onOpenChange:n,selectedId:l,form:i,connections:d}=o;let a;e[0]!==l?(a={activeTab:"tools",searchTerm:"",selectedId:l},e[0]=l,e[1]=a):a=e[1];const[r,c]=_.useReducer(cs,a),x=_.useDeferredValue(r.searchTerm);let g;e[2]!==x?(g={searchTerm:x},e[2]=x,e[3]=g):g=e[3];const p=ht(g);let h;e[4]!==d?(h=d??[],e[4]=d,e[5]=h):h=e[5];let u;e[6]!==h?(u=as(h),e[6]=h,e[7]=u):u=e[7];const f=u;let b;e[8]!==p||e[9]!==r.selectedId?(b=ds(p,r.selectedId),e[8]=p,e[9]=r.selectedId,e[10]=b):b=e[10];const m=b,j=m?.id??null;let v;e[11]!==f?(v=N=>Yt(f,N),e[11]=f,e[12]=v):v=e[12];const C=v;let y;e[13]!==f?(y=N=>Wt(f,N),e[13]=f,e[14]=y):y=e[14];const V=y;let R;e[15]!==i||e[16]!==f?(R=(N,L,F,Q)=>{const ie=f[N]?.[L];let G;ie===null?G=Q.filter(Ne=>Ne!==F):ie?.includes(F)?G=ie.filter(Ne=>Ne!==F):(G=[...ie??[],F],G.length===Q.length&&(G=null));const re={...f};re[N]?re[N]={...re[N]}:re[N]={tools:null,resources:null,prompts:null},re[N][L]=G,i.setValue("connections",we(re),{shouldDirty:!0,shouldTouch:!0})},e[15]=i,e[16]=f,e[17]=R):R=e[17];const T=R;let O;e[18]!==i||e[19]!==f?(O=(N,L)=>{const ie=f[N]?.[L]===null?[]:null,G={...f};G[N]?G[N]={...G[N]}:G[N]={tools:null,resources:null,prompts:null},G[N][L]=ie,i.setValue("connections",we(G),{shouldDirty:!0,shouldTouch:!0})},e[18]=i,e[19]=f,e[20]=O):O=e[20];const S=O;let w;e[21]!==T?(w=(N,L,F)=>T(N,"tools",L,F),e[21]=T,e[22]=w):w=e[22];const z=w;let $;e[23]!==T?($=(N,L,F)=>T(N,"resources",L,F),e[23]=T,e[24]=$):$=e[24];const I=$;let D;e[25]!==T?(D=(N,L,F)=>T(N,"prompts",L,F),e[25]=T,e[26]=D):D=e[26];const A=D;let E;e[27]!==S?(E=N=>S(N,"tools"),e[27]=S,e[28]=E):E=e[28];const B=E;let P;e[29]!==S?(P=N=>S(N,"resources"),e[29]=S,e[30]=P):P=e[30];const K=P;let H;e[31]!==S?(H=N=>S(N,"prompts"),e[31]=S,e[32]=H):H=e[32];const W=H;let U;e[33]!==i||e[34]!==f?(U=N=>{const L=f[N],F=L&&L.tools===null&&L.resources===null&&L.prompts===null,Q={...f};F?delete Q[N]:Q[N]=Jt,i.setValue("connections",we(Q),{shouldDirty:!0,shouldTouch:!0})},e[33]=i,e[34]=f,e[35]=U):U=e[35];const Y=U;let q;e[36]!==p||e[37]!==n||e[38]!==l?(q=N=>{N&&c({type:"RESET",payload:{selectedId:l,firstConnectionId:p[0]?.id??null}}),n(N)},e[36]=p,e[37]=n,e[38]=l,e[39]=q):q=e[39];const M=q;let J;e[40]===Symbol.for("react.memo_cache_sentinel")?(J=N=>{c({type:"SELECT_CONNECTION",payload:N})},e[40]=J):J=e[40];const Ze=J;let me;e[41]===Symbol.for("react.memo_cache_sentinel")?(me=N=>c({type:"SET_SEARCH_TERM",payload:N}),e[41]=me):me=e[41];let X;e[42]!==r.searchTerm?(X=t.jsx(dt,{value:r.searchTerm,onChange:me,placeholder:"Search connections..."}),e[42]=r.searchTerm,e[43]=X):X=e[43];let ee;e[44]!==p||e[45]!==r.searchTerm||e[46]!==j||e[47]!==V||e[48]!==C||e[49]!==Y?(ee=t.jsx("div",{className:"flex-1 overflow-auto p-2",children:t.jsx(is,{allConnections:p,searchTerm:r.searchTerm,selectedId:j,hasSelections:C,getSelectionSummary:V,onConnectionClick:Ze,onToggleAll:Y})}),e[44]=p,e[45]=r.searchTerm,e[46]=j,e[47]=V,e[48]=C,e[49]=Y,e[50]=ee):ee=e[50];let te;e[51]!==X||e[52]!==ee?(te=t.jsxs("div",{className:"w-full sm:w-72 sm:border-r border-b sm:border-b-0 border-border flex flex-col bg-background sm:h-full max-h-[40vh] sm:max-h-full",children:[X,ee]}),e[51]=X,e[52]=ee,e[53]=te):te=e[53];let se;e[54]!==m||e[55]!==r.activeTab||e[56]!==j||e[57]!==f||e[58]!==W||e[59]!==K||e[60]!==B||e[61]!==A||e[62]!==I||e[63]!==z?(se=t.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:m&&j?t.jsx(rs,{currentConnection:m,activeTab:r.activeTab,selectedId:j,formData:f,toggleTool:z,toggleResource:I,togglePrompt:A,toggleAllTools:B,toggleAllResources:K,toggleAllPrompts:W,onTabChange:N=>c({type:"SET_ACTIVE_TAB",payload:N})},j):t.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:"Select a connection to view its tools, resources, and prompts"})}),e[54]=m,e[55]=r.activeTab,e[56]=j,e[57]=f,e[58]=W,e[59]=K,e[60]=B,e[61]=A,e[62]=I,e[63]=z,e[64]=se):se=e[64];let le;e[65]!==te||e[66]!==se?(le=t.jsxs("div",{className:"flex-1 flex overflow-hidden min-h-0 flex-col sm:flex-row",children:[te,se]}),e[65]=te,e[66]=se,e[67]=le):le=e[67];let oe;e[68]!==M?(oe=t.jsx(Ot,{className:"px-6 py-4 border-t border-border shrink-0",children:t.jsx(Z,{variant:"outline",onClick:()=>M(!1),children:"Done"})}),e[68]=M,e[69]=oe):oe=e[69];let ne;e[70]!==le||e[71]!==oe?(ne=t.jsxs(Ue,{className:"sm:max-w-5xl h-[80vh] max-h-[80vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[le,oe]}),e[70]=le,e[71]=oe,e[72]=ne):ne=e[72];let ue;return e[73]!==M||e[74]!==s||e[75]!==ne?(ue=t.jsx(Ke,{open:s,onOpenChange:M,children:ne}),e[73]=M,e[74]=s,e[75]=ne,e[76]=ue):ue=e[76],ue}const us=Qe.pick({title:!0,description:!0,icon:!0,status:!0,metadata:!0,connections:!0}).extend({title:Xe().min(1,"Name is required").max(255)});function fs(o){const e=k.c(8);let s,n;e[0]!==o?({className:s,...n}=o,e[0]=o,e[1]=s,e[2]=n):(s=e[1],n=e[2]);let l;e[3]!==s?(l=ae("grid gap-3",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==n||e[6]!==l?(i=t.jsx(Ft,{"data-slot":"radio-group",className:l,...n}),e[5]=n,e[6]=l,e[7]=i):i=e[7],i}function Ee(o){const e=k.c(9);let s,n;e[0]!==o?({className:s,...n}=o,e[0]=o,e[1]=s,e[2]=n):(s=e[1],n=e[2]);let l;e[3]!==s?(l=ae("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",s),e[3]=s,e[4]=l):l=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Gt,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:t.jsx(Ye,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})}),e[5]=i):i=e[5];let d;return e[6]!==n||e[7]!==l?(d=t.jsx(Bt,{"data-slot":"radio-group-item",className:l,...n,children:i}),e[6]=n,e[7]=l,e[8]=d):d=e[8],d}function ps(o){const s=new TextEncoder().encode(o),n=Array.from(s,l=>String.fromCharCode(l)).join("");return btoa(n)}function xs(o){const e=k.c(10),{url:s}=o,[n,l]=_.useState(!1);let i;e[0]!==s?(i=async()=>{await navigator.clipboard.writeText(s),l(!0),ce.success("Agent URL copied to clipboard"),setTimeout(()=>l(!1),2e3)},e[0]=s,e[1]=i):i=e[1];const d=i;let a;e[2]!==n?(a=n?t.jsx(je,{size:20,className:"text-green-600"}):t.jsx(Re,{size:20}),e[2]=n,e[3]=a):a=e[3];const r=n?"Copied!":"Copy URL";let c;e[4]!==r?(c=t.jsx("span",{className:"text-xs font-medium",children:r}),e[4]=r,e[5]=c):c=e[5];let x;return e[6]!==d||e[7]!==a||e[8]!==c?(x=t.jsxs(Z,{type:"button",variant:"outline",onClick:d,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[a,c]}),e[6]=d,e[7]=a,e[8]=c,e[9]=x):x=e[9],x}function hs(o){const e=k.c(7),{url:s,serverName:n}=o;let l;e[0]!==n||e[1]!==s?(l=()=>{const c=We(n),g=ps(JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Cursor"}},null,2)),p=`cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(c)}&config=${encodeURIComponent(g)}`;window.open(p,"_blank"),ce.success("Opening Cursor...")},e[0]=n,e[1]=s,e[2]=l):l=e[2];const i=l;let d,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("img",{src:"/logos/cursor.svg",alt:"Cursor",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(11%) sepia(8%) saturate(785%) hue-rotate(1deg) brightness(95%) contrast(89%)"}}),a=t.jsx("span",{className:"text-xs font-medium",children:"Install on Cursor"}),e[3]=d,e[4]=a):(d=e[3],a=e[4]);let r;return e[5]!==i?(r=t.jsxs(Z,{type:"button",variant:"outline",onClick:i,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[d,a]}),e[5]=i,e[6]=r):r=e[6],r}function gs(o){const e=k.c(11),{url:s,serverName:n}=o,[l,i]=_.useState(!1);let d;e[0]!==n||e[1]!==s?(d=async()=>{const p=We(n),u=JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Claude Code"}},null,2),f=`claude mcp add-json "${p}" '${u.replace(/'/g,"'\\''")}'`;await navigator.clipboard.writeText(f),i(!0),ce.success("Claude Code command copied to clipboard"),setTimeout(()=>i(!1),2e3)},e[0]=n,e[1]=s,e[2]=d):d=e[2];const a=d;let r;e[3]!==l?(r=l?t.jsx(je,{size:20,className:"text-green-600"}):t.jsx("img",{src:"/logos/Claude Code.svg",alt:"Claude Code",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(55%) sepia(31%) saturate(1264%) hue-rotate(331deg) brightness(92%) contrast(86%)"}}),e[3]=l,e[4]=r):r=e[4];const c=l?"Copied!":"Install on Claude";let x;e[5]!==c?(x=t.jsx("span",{className:"text-xs font-medium",children:c}),e[5]=c,e[6]=x):x=e[6];let g;return e[7]!==a||e[8]!==r||e[9]!==x?(g=t.jsxs(Z,{type:"button",variant:"outline",onClick:a,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[r,x]}),e[7]=a,e[8]=r,e[9]=x,e[10]=g):g=e[10],g}function js({virtualMcp:o}){const{org:e}=de(),s=ge({connectionId:Rt,orgId:e.id}),[n,l]=_.useState(null),[i,d]=_.useState(!1),[a,r]=_.useState(!1),c=o.id,x=o.title||`agent-${c.slice(0,8)}`,g=n?`bunx @decocms/typegen@latest --mcp ${c} --key ${n} --output client.ts`:`bunx @decocms/typegen@latest --mcp ${c} --key <api-key> --output client.ts`,p=async()=>{d(!0);try{const f=(await s.callTool({name:"API_KEY_CREATE",arguments:{name:`typegen-${x}`,permissions:{[c]:["*"]}}})).structuredContent?.key;if(!f)throw new Error("No key in response");l(f)}catch{ce.error("Failed to generate API key")}finally{d(!1)}},h=async()=>{await navigator.clipboard.writeText(g),r(!0),ce.success("Command copied to clipboard"),setTimeout(()=>r(!1),2e3)};return t.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[t.jsxs("div",{className:"flex items-start justify-between gap-3",children:[t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("h4",{className:"text-sm font-medium text-foreground",children:"Generate typed client"}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Introspects this agent and writes a typed"," ",t.jsx("code",{className:"font-mono",children:"client.ts"})," you can import directly."]})]}),!n&&t.jsxs(Z,{type:"button",variant:"outline",size:"sm",className:"shrink-0 gap-1.5",onClick:p,disabled:i,children:[i?t.jsx(Le,{size:14,className:"animate-spin"}):t.jsx(Ut,{size:14}),t.jsx("span",{children:i?"Generating…":"Generate API key"})]})]}),n&&t.jsx("p",{className:"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-700",children:"Store this key securely — it won't be shown again."}),t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Generate client"}),t.jsx("div",{className:"rounded-md border border-input bg-muted/50 px-3 py-2.5",children:t.jsxs("div",{className:"flex items-start gap-2",children:[t.jsx("code",{className:"min-w-0 flex-1 break-all font-mono text-xs text-muted-foreground",children:g}),t.jsx(Z,{type:"button",variant:"ghost",size:"icon",className:"size-6 shrink-0",onClick:h,children:a?t.jsx(je,{size:12,className:"text-green-600"}):t.jsx(Re,{size:12})})]})}),t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Runtime variables"}),t.jsx(bs,{apiKey:n})]})}function bs(o){const e=k.c(19),{apiKey:s}=o,[n,l]=_.useState(!1),i=window.location.origin,d=s?`MESH_API_KEY=${s}`:"MESH_API_KEY=<api-key>",a=`MESH_BASE_URL=${i}`,r=`${d}
1
+ import{r as _,c as k,j as t,E as fe,B as Z,v as ae,a1 as qe,u as de,V as Qe,s as Xe,t as ce,b as et,e as tt,O as Ge,l as st,k as lt,aF as ot,x as Me}from"./index-zTmRWZBl.js";import{b as Ae,i as nt,c as it,u as rt,C as at,d as ct}from"./collapsible-65I6Ioz9.js";import{C as dt,E as mt}from"./collection-search-mO1HMauC.js";import{I as ut}from"./icon-picker-CvTqhz-n.js";import{I as Oe}from"./integration-icon-BKuXjqdm.js";import{u as ft}from"./index-C3HPQ2Xr.js";import{B as $e}from"./badge-DuzneqaM.js";import{I as Ve}from"./input-yDn0CDzQ.js";import{S as pt}from"./switch-DbnN_OzY.js";import{T as xt}from"./textarea-DdFrppMC.js";import{a as pe,c as ve,T as xe,b as he}from"./tooltip-c2IY6Q1h.js";import{b as ht,u as gt}from"./use-connection-D_z7DIgr.js";import{u as jt,a as bt}from"./use-virtual-mcp-BwZwR42s.js";import{i as He}from"./ChevronRight-zkVqPrw5.js";import{n as Nt}from"./select-45R_TReG.js";import{i as De}from"./File02-v1x_k3KU.js";import{i as Le}from"./Loading01-e5vrz4Tg.js";import{i as vt}from"./Play-UpsQgFLL.js";import{s as Be}from"./Plus-CAkBZRVl.js";import{t as yt}from"./Users03-Ci_Q0Bm5.js";import{B as Ct,a as _t,b as Fe,d as St,e as Tt,c as kt}from"./breadcrumb-oXffKFw_.js";import{a as wt,V as Et}from"./layout-CrCZjoK5.js";import{S as It}from"./save-actions-C1NjZgvb.js";import{a as At}from"./tools-list-DIjrxN4B.js";import{C as ze}from"./checkbox-DzpFguCb.js";import{e as Ot,a as Ue,D as Ke,b as $t,c as Dt}from"./dialog-qBZn-zYi.js";import{T as ye,a as Lt,b as Ce,c as zt}from"./tabs-fxZVpBgm.js";import{u as ge,a as Rt}from"./constants-Bi0KgUSI.js";import{c as Pt}from"./use-mcp-tools-CXYzi3AR.js";import{a as Mt}from"./use-mcp-resources-F-AJdNv-.js";import{u as Vt}from"./decopilot-events-tuPofCi7.js";import{s as We}from"./slugify-CEUa2lfQ.js";import{I as Bt,R as Ft,a as Gt}from"./index-BrwvwF2e.js";import{i as je}from"./Check-xOBqZzmv.js";import{i as Ht}from"./Code01-Be1Un4zy.js";import{a as Re}from"./Copy01-D46xqpGe.js";import{i as _e}from"./InfoCircle-DK-HgSib.js";import{i as Ut}from"./Key01-HU-4mHLo.js";import{A as Kt}from"./agent-connections-preview-ChIn79lc.js";import"./use-llm-Cgu6F_JM.js";import"./use-collections-BM5qbXh2.js";import"./useMutation-DxToDvqg.js";import"./use-binding-CczCr_I6.js";import"./binder-CSUd_3kq.js";import"./useQuery-C_yP5u2a.js";import"./localstorage-keys-DyhMCgsK.js";import"./skeleton-B23sd6oG.js";import"./AlignLeft-D93Obywx.js";import"./ArrowLeft-ChnnVeV0.js";import"./ChevronDown-cFwq8_1y.js";import"./Image01-CcXuD64C.js";import"./RefreshCcw01-CsIOFnxl.js";import"./SearchMd-3uDmzuN-.js";import"./Settings01-de0ujEEu.js";import"./useSuspenseInfiniteQuery-rRWDLVCQ.js";import"./infiniteQueryObserver-CzeIHV7S.js";import"./popover-BD-c_pAA.js";import"./scroll-area-fWogdApD.js";import"./Container-BzuFyXB-.js";import"./Edit05-B4gumSwA.js";import"./Link01-DP82_UiC.js";import"./XClose-CPAcIRmr.js";import"./index-DNc2lZPL.js";import"./Save01-C8SmHjV2.js";import"./collection-display-button-ByS_K4lH.js";import"./dropdown-menu-DzUfzpVE.js";import"./ArrowDown-Brxajv-A.js";import"./ArrowUp-D5ZC-G9T.js";import"./Grid01-H33eVxTX.js";import"./List-DIViT3Rd.js";import"./collection-table-wrapper-CKemfX3q.js";import"./table-JhNW7SQy.js";import"./card-B9F3gzU1.js";import"./types-D02NXJjh.js";import"./Eye-S2bOaZIy.js";import"./Globe02-ChkOndGF.js";import"./LayersTwo01-RwSQ1J1I.js";import"./X-D43RBdCi.js";const Ye=({size:o=24,color:e="currentColor",...s})=>_.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},_.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}));Ye.displayName="Circle";const be=({size:o=24,color:e="currentColor",...s})=>_.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},_.createElement("path",{d:"m9.75 20.75 1.473.818c.284.158.425.237.576.268.133.027.27.027.402 0 .15-.031.292-.11.576-.268l1.473-.818m-9-2.5-1.427-.793c-.3-.166-.45-.25-.558-.368a1 1 0 0 1-.215-.364C3 16.573 3 16.401 3 16.06V14.5m0-5V7.942c0-.343 0-.514.05-.667a1 1 0 0 1 .215-.364c.109-.119.258-.202.558-.368L5.25 5.75m4.5-2.5 1.473-.818c.284-.158.425-.237.576-.267a1 1 0 0 1 .402 0c.15.03.292.11.576.267l1.473.818m4.5 2.5 1.427.793c.3.166.45.25.558.368a1 1 0 0 1 .215.364c.05.153.05.324.05.667V9.5m0 5v1.559c0 .342 0 .514-.05.666a.999.999 0 0 1-.215.364c-.109.119-.258.202-.558.368l-1.427.793m-9-7.5L12 12m0 0 2.25-1.25M12 12v2.5M3 7l2.25 1.25m13.5 0L21 7m-9 12.5V22"}));be.displayName="CubeOutline";const Je=({size:o=24,color:e="currentColor",...s})=>_.createElement("svg",{viewBox:"0 0 24 24",width:o,height:o,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},_.createElement("path",{d:"m12 5.5-4.638 6.747c-.28.406-.42.609-.41.778a.5.5 0 0 0 .195.373c.135.102.38.102.874.102H12v5l4.638-6.747c.28-.406.42-.609.41-.778a.5.5 0 0 0-.195-.373c-.135-.102-.38-.102-.874-.102H12v-5Z"}),_.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}));Je.displayName="ZapCircle";function Se(o){return o===null?"all":o?.length??0}function Wt(o,e){const s=o[e];if(!s)return"";const n=[];return s.tools===null?n.push("all tools"):s.tools&&s.tools.length>0&&n.push(`${s.tools.length} tools`),s.resources===null?n.push("all resources"):s.resources&&s.resources.length>0&&n.push(`${s.resources.length} resources`),s.prompts===null?n.push("all prompts"):s.prompts&&s.prompts.length>0&&n.push(`${s.prompts.length} prompts`),n.join(", ")}function Yt(o,e){const s=o[e];return s?!((s.tools===void 0||s.tools!==null&&s.tools.length===0)&&(s.resources===void 0||s.resources!==null&&s.resources.length===0)&&(s.prompts===void 0||s.prompts!==null&&s.prompts.length===0)):!1}const Jt={tools:null,resources:null,prompts:null};function Te(){const o=k.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx("div",{className:"flex items-center justify-center h-32",children:t.jsx(Le,{className:"animate-spin text-muted-foreground",size:24})}),o[0]=e):e=o[0],e}function ke(o){return({error:e})=>e?.message?.includes("Method not found")||e?.code===-32601?t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:o})}):t.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[t.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:t.jsx(qe,{className:"h-6 w-6 text-destructive"})}),t.jsxs("div",{className:"space-y-2",children:[t.jsx("h3",{className:"text-lg font-medium",children:"Something went wrong"}),t.jsx("p",{className:"text-sm text-muted-foreground max-w-xs mx-auto",children:e?.message?e.message.length>200?`${e.message.slice(0,200)}...`:e.message:"An unexpected error occurred"})]})]})}function Zt(o){const e=k.c(23),{item:s,isSelected:n,onToggle:l,disabled:i}=o,d=i?"cursor-not-allowed opacity-50":"cursor-pointer",a=n?"bg-accent/25":"hover:bg-muted/50";let r;e[0]!==d||e[1]!==a?(r=ae("flex items-start gap-3 p-4 rounded-lg transition-colors",d,a),e[0]=d,e[1]=a,e[2]=r):r=e[2];let c;e[3]!==s.name?(c=t.jsx("p",{className:"text-sm font-medium leading-none truncate",children:s.name}),e[3]=s.name,e[4]=c):c=e[4];let x;e[5]!==s.tags?(x=s.tags&&t.jsx("span",{className:"shrink-0",children:s.tags}),e[5]=s.tags,e[6]=x):x=e[6];let g;e[7]!==c||e[8]!==x?(g=t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[c,x]}),e[7]=c,e[8]=x,e[9]=g):g=e[9];let p;e[10]!==s.description?(p=s.description&&t.jsx("p",{className:"text-xs text-muted-foreground line-clamp-2",children:s.description}),e[10]=s.description,e[11]=p):p=e[11];let h;e[12]!==g||e[13]!==p?(h=t.jsxs("div",{className:"flex-1 min-w-0 space-y-2",children:[g,p]}),e[12]=g,e[13]=p,e[14]=h):h=e[14];let u;e[15]!==i||e[16]!==n||e[17]!==l?(u=t.jsx(ze,{checked:n,onCheckedChange:l,disabled:i,className:"mt-0.5"}),e[15]=i,e[16]=n,e[17]=l,e[18]=u):u=e[18];let f;return e[19]!==r||e[20]!==h||e[21]!==u?(f=t.jsxs("label",{className:r,children:[h,u]}),e[19]=r,e[20]=h,e[21]=u,e[22]=f):f=e[22],f}function Pe(o){const e=k.c(32),{items:s,selections:n,onToggle:l,onToggleAll:i,emptyMessage:d,disabled:a}=o;let r,c,x,g,p;if(e[0]!==a||e[1]!==d||e[2]!==s||e[3]!==l||e[4]!==i||e[5]!==n){p=Symbol.for("react.early_return_sentinel");e:{const f=s.map(qt);if(s.length===0){let y;e[11]!==d?(y=t.jsx("div",{className:"flex-1 overflow-auto px-4 py-3 space-y-1",children:t.jsx("div",{className:"flex items-center justify-center h-32 text-sm text-muted-foreground",children:d})}),e[11]=d,e[12]=y):y=e[12],p=y;break e}x="flex flex-col h-full";const b=a?"cursor-not-allowed opacity-50":"cursor-pointer";let m;e[13]!==b?(m=ae("flex items-start gap-3 p-4",b),e[13]=b,e[14]=m):m=e[14];let j;e[15]!==s.length?(j=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsxs("span",{className:"text-sm font-medium",children:["Select All (",s.length,")"]})}),e[15]=s.length,e[16]=j):j=e[16];const v=n===null;let C;e[17]!==a||e[18]!==i||e[19]!==v?(C=t.jsx(ze,{checked:v,onCheckedChange:i,disabled:a,className:"mt-0.5"}),e[17]=a,e[18]=i,e[19]=v,e[20]=C):C=e[20],e[21]!==C||e[22]!==m||e[23]!==j?(g=t.jsx("div",{className:"px-4 border-b border-border shrink-0",children:t.jsxs("label",{className:m,children:[j,C]})}),e[21]=C,e[22]=m,e[23]=j,e[24]=g):g=e[24],r="flex-1 overflow-auto px-4 py-3 space-y-1",c=s.map(y=>t.jsx(Zt,{item:y,isSelected:n===null||n?.includes(y.id),onToggle:()=>l(y.id,f),disabled:a},y.id))}e[0]=a,e[1]=d,e[2]=s,e[3]=l,e[4]=i,e[5]=n,e[6]=r,e[7]=c,e[8]=x,e[9]=g,e[10]=p}else r=e[6],c=e[7],x=e[8],g=e[9],p=e[10];if(p!==Symbol.for("react.early_return_sentinel"))return p;let h;e[25]!==r||e[26]!==c?(h=t.jsx("div",{className:r,children:c}),e[25]=r,e[26]=c,e[27]=h):h=e[27];let u;return e[28]!==x||e[29]!==g||e[30]!==h?(u=t.jsxs("div",{className:x,children:[g,h]}),e[28]=x,e[29]=g,e[30]=h,e[31]=u):u=e[31],u}function qt(o){return o.id}function Qt(o){const e=k.c(13),{connectionId:s,selections:n,onToggle:l,onToggleAll:i,disabled:d}=o,{org:a}=de();let r;e[0]!==s||e[1]!==a.id?(r={connectionId:s,orgId:a.id},e[0]=s,e[1]=a.id,e[2]=r):r=e[2];const c=ge(r);let x;e[3]!==c?(x={client:c},e[3]=c,e[4]=x):x=e[4];const{data:g}=Pt(x);let p;e[5]!==g.tools?(p=g.tools.map(Xt),e[5]=g.tools,e[6]=p):p=e[6];const h=p;let u;return e[7]!==d||e[8]!==h||e[9]!==l||e[10]!==i||e[11]!==n?(u=t.jsx(Pe,{items:h,selections:n,onToggle:l,onToggleAll:i,emptyMessage:"No tools available",disabled:d}),e[7]=d,e[8]=h,e[9]=l,e[10]=i,e[11]=n,e[12]=u):u=e[12],u}function Xt(o){return{id:o.name,name:o.name,description:o.description,tags:t.jsx(At,{annotations:o.annotations,_meta:o._meta})}}function es(o){const e=k.c(13),{connectionId:s,selections:n,onToggle:l,onToggleAll:i,disabled:d}=o,{org:a}=de();let r;e[0]!==s||e[1]!==a.id?(r={connectionId:s,orgId:a.id},e[0]=s,e[1]=a.id,e[2]=r):r=e[2];const c=ge(r);let x;e[3]!==c?(x={client:c},e[3]=c,e[4]=x):x=e[4];const{data:g}=Mt(x);let p;e[5]!==g.resources?(p=g.resources.map(ts),e[5]=g.resources,e[6]=p):p=e[6];const h=p;let u;return e[7]!==d||e[8]!==h||e[9]!==l||e[10]!==i||e[11]!==n?(u=t.jsx(Pe,{items:h,selections:n,onToggle:l,onToggleAll:i,emptyMessage:"No resources available",disabled:d}),e[7]=d,e[8]=h,e[9]=l,e[10]=i,e[11]=n,e[12]=u):u=e[12],u}function ts(o){return{id:o.name||o.uri,name:o.name||o.uri,description:o.description}}function ss(o){const e=k.c(13),{connectionId:s,selections:n,onToggle:l,onToggleAll:i,disabled:d}=o,{org:a}=de();let r;e[0]!==s||e[1]!==a.id?(r={connectionId:s,orgId:a.id},e[0]=s,e[1]=a.id,e[2]=r):r=e[2];const c=ge(r);let x;e[3]!==c?(x={client:c},e[3]=c,e[4]=x):x=e[4];const{data:g}=Vt(x);let p;e[5]!==g.prompts?(p=g.prompts.map(ls),e[5]=g.prompts,e[6]=p):p=e[6];const h=p;let u;return e[7]!==d||e[8]!==h||e[9]!==l||e[10]!==i||e[11]!==n?(u=t.jsx(Pe,{items:h,selections:n,onToggle:l,onToggleAll:i,emptyMessage:"No prompts available",disabled:d}),e[7]=d,e[8]=h,e[9]=l,e[10]=i,e[11]=n,e[12]=u):u=e[12],u}function ls(o){return{id:o.name,name:o.name,description:o.description}}function os(o){const e=k.c(24),{connection:s,isSelected:n,hasSelections:l,summary:i,onClick:d,onToggleAll:a,disabled:r}=o,c=r?"cursor-not-allowed opacity-50":"cursor-pointer",x=n?"bg-accent":"hover:bg-muted/50";let g;e[0]!==c||e[1]!==x?(g=ae("flex items-center gap-2 p-2 h-12 rounded-lg transition-colors",c,x),e[0]=c,e[1]=x,e[2]=g):g=e[2];const p=r?void 0:d;let h;e[3]!==s.icon||e[4]!==s.title?(h=t.jsx(Oe,{icon:s.icon,name:s.title,size:"xs",className:"shrink-0"}),e[3]=s.icon,e[4]=s.title,e[5]=h):h=e[5];let u;e[6]!==s.title?(u=t.jsx("p",{className:"text-sm font-medium text-foreground truncate",children:s.title}),e[6]=s.title,e[7]=u):u=e[7];let f;e[8]!==l||e[9]!==i?(f=l&&i&&t.jsx("p",{className:"text-xs text-muted-foreground truncate",children:i}),e[8]=l,e[9]=i,e[10]=f):f=e[10];let b;e[11]!==u||e[12]!==f?(b=t.jsxs("div",{className:"flex-1 min-w-0 flex flex-col justify-center",children:[u,f]}),e[11]=u,e[12]=f,e[13]=b):b=e[13];let m;e[14]!==r||e[15]!==l||e[16]!==a?(m=t.jsx(ze,{checked:l,onCheckedChange:a,onClick:ns,disabled:r,className:"shrink-0"}),e[14]=r,e[15]=l,e[16]=a,e[17]=m):m=e[17];let j;return e[18]!==g||e[19]!==p||e[20]!==h||e[21]!==b||e[22]!==m?(j=t.jsxs("div",{className:g,onClick:p,children:[h,b,m]}),e[18]=g,e[19]=p,e[20]=h,e[21]=b,e[22]=m,e[23]=j):j=e[23],j}function ns(o){return o.stopPropagation()}function is(o){const e=k.c(22),{allConnections:s,searchTerm:n,selectedId:l,hasSelections:i,getSelectionSummary:d,onConnectionClick:a,onToggleAll:r,disabled:c}=o;let x;e[0]!==s||e[1]!==n?(x=n?s.filter(u=>u.title.toLowerCase().includes(n.toLowerCase())||u.description?.toLowerCase().includes(n.toLowerCase())):s,e[0]=s,e[1]=n,e[2]=x):x=e[2];const g=x;if(g.length===0){const u=n?"No connections found":"No connections available";let f;return e[3]!==u?(f=t.jsx("div",{className:"flex items-center justify-center h-full text-sm text-muted-foreground p-4",children:u}),e[3]=u,e[4]=f):f=e[4],f}let p;if(e[5]!==c||e[6]!==g||e[7]!==d||e[8]!==i||e[9]!==a||e[10]!==r||e[11]!==l){let u;e[13]!==c||e[14]!==d||e[15]!==i||e[16]!==a||e[17]!==r||e[18]!==l?(u=f=>t.jsx(os,{connection:f,isSelected:l===f.id,hasSelections:i(f.id),summary:d(f.id),onClick:()=>a(f.id),onToggleAll:()=>r(f.id),disabled:c},f.id),e[13]=c,e[14]=d,e[15]=i,e[16]=a,e[17]=r,e[18]=l,e[19]=u):u=e[19],p=g.map(u),e[5]=c,e[6]=g,e[7]=d,e[8]=i,e[9]=a,e[10]=r,e[11]=l,e[12]=p}else p=e[12];let h;return e[20]!==p?(h=t.jsx("div",{className:"flex flex-col gap-0.5",children:p}),e[20]=p,e[21]=h):h=e[21],h}function rs(o){const e=k.c(75),{currentConnection:s,activeTab:n,selectedId:l,formData:i,toggleTool:d,toggleResource:a,togglePrompt:r,toggleAllTools:c,toggleAllResources:x,toggleAllPrompts:g,onTabChange:p}=o;let h;e[0]!==s.icon||e[1]!==s.title?(h=t.jsx(Oe,{icon:s.icon,name:s.title,size:"md",className:"shrink-0"}),e[0]=s.icon,e[1]=s.title,e[2]=h):h=e[2];let u;e[3]!==s.title?(u=t.jsx("h2",{className:"text-lg font-semibold truncate",children:s.title}),e[3]=s.title,e[4]=u):u=e[4];let f;e[5]!==s.description?(f=s.description&&t.jsx("p",{className:"text-sm text-muted-foreground truncate",children:s.description}),e[5]=s.description,e[6]=f):f=e[6];let b;e[7]!==u||e[8]!==f?(b=t.jsxs("div",{className:"flex-1 min-w-0",children:[u,f]}),e[7]=u,e[8]=f,e[9]=b):b=e[9];let m;e[10]!==h||e[11]!==b?(m=t.jsx("div",{className:"p-6 border-b border-border shrink-0",children:t.jsxs("div",{className:"flex items-center gap-3",children:[h,b]})}),e[10]=h,e[11]=b,e[12]=m):m=e[12];let j;e[13]!==p?(j=M=>p(M),e[13]=p,e[14]=j):j=e[14];let v;e[15]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsxs(ye,{value:"tools",variant:"underline",className:"gap-2",children:[t.jsx(Ae,{size:16}),"Tools"]}),e[15]=v):v=e[15];let C;e[16]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsxs(ye,{value:"resources",variant:"underline",className:"gap-2",children:[t.jsx(be,{size:16}),"Resources"]}),e[16]=C):C=e[16];let y;e[17]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsxs(Lt,{variant:"underline",className:"shrink-0 px-6",children:[v,C,t.jsxs(ye,{value:"prompts",variant:"underline",className:"gap-2",children:[t.jsx(De,{size:16}),"Prompts"]})]}),e[17]=y):y=e[17];let V;e[18]===Symbol.for("react.memo_cache_sentinel")?(V=ke("Tools not supported by this server"),e[18]=V):V=e[18];let R;e[19]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx(Te,{}),e[19]=R):R=e[19];let T;e[20]!==i||e[21]!==l?(T=i[l]?i[l].tools:[],e[20]=i,e[21]=l,e[22]=T):T=e[22];let O;e[23]!==l||e[24]!==d?(O=(M,J)=>d(l,M,J),e[23]=l,e[24]=d,e[25]=O):O=e[25];let S;e[26]!==l||e[27]!==c?(S=()=>c(l),e[26]=l,e[27]=c,e[28]=S):S=e[28];let w;e[29]!==l||e[30]!==T||e[31]!==O||e[32]!==S?(w=t.jsx(Ce,{value:"tools",className:"flex-1 overflow-hidden mt-0",children:t.jsx(fe,{fallback:V,children:t.jsx(_.Suspense,{fallback:R,children:t.jsx(Qt,{connectionId:l,selections:T,onToggle:O,onToggleAll:S})})})}),e[29]=l,e[30]=T,e[31]=O,e[32]=S,e[33]=w):w=e[33];let z;e[34]===Symbol.for("react.memo_cache_sentinel")?(z=ke("Resources not supported by this server"),e[34]=z):z=e[34];let $;e[35]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(Te,{}),e[35]=$):$=e[35];let I;e[36]!==i||e[37]!==l?(I=i[l]?i[l].resources:[],e[36]=i,e[37]=l,e[38]=I):I=e[38];let D;e[39]!==l||e[40]!==a?(D=(M,J)=>a(l,M,J),e[39]=l,e[40]=a,e[41]=D):D=e[41];let A;e[42]!==l||e[43]!==x?(A=()=>x(l),e[42]=l,e[43]=x,e[44]=A):A=e[44];let E;e[45]!==l||e[46]!==I||e[47]!==D||e[48]!==A?(E=t.jsx(Ce,{value:"resources",className:"flex-1 overflow-hidden mt-0",children:t.jsx(fe,{fallback:z,children:t.jsx(_.Suspense,{fallback:$,children:t.jsx(es,{connectionId:l,selections:I,onToggle:D,onToggleAll:A})})})}),e[45]=l,e[46]=I,e[47]=D,e[48]=A,e[49]=E):E=e[49];let B;e[50]===Symbol.for("react.memo_cache_sentinel")?(B=ke("Prompts not supported by this server"),e[50]=B):B=e[50];let P;e[51]===Symbol.for("react.memo_cache_sentinel")?(P=t.jsx(Te,{}),e[51]=P):P=e[51];let K;e[52]!==i||e[53]!==l?(K=i[l]?i[l].prompts:[],e[52]=i,e[53]=l,e[54]=K):K=e[54];let H;e[55]!==l||e[56]!==r?(H=(M,J)=>r(l,M,J),e[55]=l,e[56]=r,e[57]=H):H=e[57];let W;e[58]!==l||e[59]!==g?(W=()=>g(l),e[58]=l,e[59]=g,e[60]=W):W=e[60];let U;e[61]!==l||e[62]!==K||e[63]!==H||e[64]!==W?(U=t.jsx(Ce,{value:"prompts",className:"flex-1 overflow-hidden mt-0",children:t.jsx(fe,{fallback:B,children:t.jsx(_.Suspense,{fallback:P,children:t.jsx(ss,{connectionId:l,selections:K,onToggle:H,onToggleAll:W})})})}),e[61]=l,e[62]=K,e[63]=H,e[64]=W,e[65]=U):U=e[65];let Y;e[66]!==n||e[67]!==w||e[68]!==E||e[69]!==U||e[70]!==j?(Y=t.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:t.jsxs(zt,{value:n,onValueChange:j,variant:"underline",className:"flex-1 flex flex-col overflow-hidden",children:[y,w,E,U]})}),e[66]=n,e[67]=w,e[68]=E,e[69]=U,e[70]=j,e[71]=Y):Y=e[71];let q;return e[72]!==Y||e[73]!==m?(q=t.jsxs(t.Fragment,{children:[m,Y]}),e[72]=Y,e[73]=m,e[74]=q):q=e[74],q}function as(o){const e={};for(const s of o)e[s.connection_id]={tools:s.selected_tools,resources:s.selected_resources??null,prompts:s.selected_prompts??null};return e}function we(o){return Object.entries(o).map(([e,s])=>({connection_id:e,selected_tools:s.tools,selected_resources:s.resources,selected_prompts:s.prompts}))}function cs(o,e){switch(e.type){case"SET_SEARCH_TERM":return{...o,searchTerm:e.payload};case"SET_SELECTED":return{...o,selectedId:e.payload};case"SET_ACTIVE_TAB":return{...o,activeTab:e.payload};case"RESET":return{searchTerm:"",selectedId:e.payload.selectedId??e.payload.firstConnectionId??null,activeTab:"tools"};case"SELECT_CONNECTION":return{...o,selectedId:e.payload,activeTab:"tools"};default:return o}}const ds=(o,e)=>o.find(s=>s.id===e)??o[0];function ms(o){const e=k.c(77),{open:s,onOpenChange:n,selectedId:l,form:i,connections:d}=o;let a;e[0]!==l?(a={activeTab:"tools",searchTerm:"",selectedId:l},e[0]=l,e[1]=a):a=e[1];const[r,c]=_.useReducer(cs,a),x=_.useDeferredValue(r.searchTerm);let g;e[2]!==x?(g={searchTerm:x},e[2]=x,e[3]=g):g=e[3];const p=ht(g);let h;e[4]!==d?(h=d??[],e[4]=d,e[5]=h):h=e[5];let u;e[6]!==h?(u=as(h),e[6]=h,e[7]=u):u=e[7];const f=u;let b;e[8]!==p||e[9]!==r.selectedId?(b=ds(p,r.selectedId),e[8]=p,e[9]=r.selectedId,e[10]=b):b=e[10];const m=b,j=m?.id??null;let v;e[11]!==f?(v=N=>Yt(f,N),e[11]=f,e[12]=v):v=e[12];const C=v;let y;e[13]!==f?(y=N=>Wt(f,N),e[13]=f,e[14]=y):y=e[14];const V=y;let R;e[15]!==i||e[16]!==f?(R=(N,L,F,Q)=>{const ie=f[N]?.[L];let G;ie===null?G=Q.filter(Ne=>Ne!==F):ie?.includes(F)?G=ie.filter(Ne=>Ne!==F):(G=[...ie??[],F],G.length===Q.length&&(G=null));const re={...f};re[N]?re[N]={...re[N]}:re[N]={tools:null,resources:null,prompts:null},re[N][L]=G,i.setValue("connections",we(re),{shouldDirty:!0,shouldTouch:!0})},e[15]=i,e[16]=f,e[17]=R):R=e[17];const T=R;let O;e[18]!==i||e[19]!==f?(O=(N,L)=>{const ie=f[N]?.[L]===null?[]:null,G={...f};G[N]?G[N]={...G[N]}:G[N]={tools:null,resources:null,prompts:null},G[N][L]=ie,i.setValue("connections",we(G),{shouldDirty:!0,shouldTouch:!0})},e[18]=i,e[19]=f,e[20]=O):O=e[20];const S=O;let w;e[21]!==T?(w=(N,L,F)=>T(N,"tools",L,F),e[21]=T,e[22]=w):w=e[22];const z=w;let $;e[23]!==T?($=(N,L,F)=>T(N,"resources",L,F),e[23]=T,e[24]=$):$=e[24];const I=$;let D;e[25]!==T?(D=(N,L,F)=>T(N,"prompts",L,F),e[25]=T,e[26]=D):D=e[26];const A=D;let E;e[27]!==S?(E=N=>S(N,"tools"),e[27]=S,e[28]=E):E=e[28];const B=E;let P;e[29]!==S?(P=N=>S(N,"resources"),e[29]=S,e[30]=P):P=e[30];const K=P;let H;e[31]!==S?(H=N=>S(N,"prompts"),e[31]=S,e[32]=H):H=e[32];const W=H;let U;e[33]!==i||e[34]!==f?(U=N=>{const L=f[N],F=L&&L.tools===null&&L.resources===null&&L.prompts===null,Q={...f};F?delete Q[N]:Q[N]=Jt,i.setValue("connections",we(Q),{shouldDirty:!0,shouldTouch:!0})},e[33]=i,e[34]=f,e[35]=U):U=e[35];const Y=U;let q;e[36]!==p||e[37]!==n||e[38]!==l?(q=N=>{N&&c({type:"RESET",payload:{selectedId:l,firstConnectionId:p[0]?.id??null}}),n(N)},e[36]=p,e[37]=n,e[38]=l,e[39]=q):q=e[39];const M=q;let J;e[40]===Symbol.for("react.memo_cache_sentinel")?(J=N=>{c({type:"SELECT_CONNECTION",payload:N})},e[40]=J):J=e[40];const Ze=J;let me;e[41]===Symbol.for("react.memo_cache_sentinel")?(me=N=>c({type:"SET_SEARCH_TERM",payload:N}),e[41]=me):me=e[41];let X;e[42]!==r.searchTerm?(X=t.jsx(dt,{value:r.searchTerm,onChange:me,placeholder:"Search connections..."}),e[42]=r.searchTerm,e[43]=X):X=e[43];let ee;e[44]!==p||e[45]!==r.searchTerm||e[46]!==j||e[47]!==V||e[48]!==C||e[49]!==Y?(ee=t.jsx("div",{className:"flex-1 overflow-auto p-2",children:t.jsx(is,{allConnections:p,searchTerm:r.searchTerm,selectedId:j,hasSelections:C,getSelectionSummary:V,onConnectionClick:Ze,onToggleAll:Y})}),e[44]=p,e[45]=r.searchTerm,e[46]=j,e[47]=V,e[48]=C,e[49]=Y,e[50]=ee):ee=e[50];let te;e[51]!==X||e[52]!==ee?(te=t.jsxs("div",{className:"w-full sm:w-72 sm:border-r border-b sm:border-b-0 border-border flex flex-col bg-background sm:h-full max-h-[40vh] sm:max-h-full",children:[X,ee]}),e[51]=X,e[52]=ee,e[53]=te):te=e[53];let se;e[54]!==m||e[55]!==r.activeTab||e[56]!==j||e[57]!==f||e[58]!==W||e[59]!==K||e[60]!==B||e[61]!==A||e[62]!==I||e[63]!==z?(se=t.jsx("div",{className:"flex-1 flex flex-col overflow-hidden",children:m&&j?t.jsx(rs,{currentConnection:m,activeTab:r.activeTab,selectedId:j,formData:f,toggleTool:z,toggleResource:I,togglePrompt:A,toggleAllTools:B,toggleAllResources:K,toggleAllPrompts:W,onTabChange:N=>c({type:"SET_ACTIVE_TAB",payload:N})},j):t.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:"Select a connection to view its tools, resources, and prompts"})}),e[54]=m,e[55]=r.activeTab,e[56]=j,e[57]=f,e[58]=W,e[59]=K,e[60]=B,e[61]=A,e[62]=I,e[63]=z,e[64]=se):se=e[64];let le;e[65]!==te||e[66]!==se?(le=t.jsxs("div",{className:"flex-1 flex overflow-hidden min-h-0 flex-col sm:flex-row",children:[te,se]}),e[65]=te,e[66]=se,e[67]=le):le=e[67];let oe;e[68]!==M?(oe=t.jsx(Ot,{className:"px-6 py-4 border-t border-border shrink-0",children:t.jsx(Z,{variant:"outline",onClick:()=>M(!1),children:"Done"})}),e[68]=M,e[69]=oe):oe=e[69];let ne;e[70]!==le||e[71]!==oe?(ne=t.jsxs(Ue,{className:"sm:max-w-5xl h-[80vh] max-h-[80vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[le,oe]}),e[70]=le,e[71]=oe,e[72]=ne):ne=e[72];let ue;return e[73]!==M||e[74]!==s||e[75]!==ne?(ue=t.jsx(Ke,{open:s,onOpenChange:M,children:ne}),e[73]=M,e[74]=s,e[75]=ne,e[76]=ue):ue=e[76],ue}const us=Qe.pick({title:!0,description:!0,icon:!0,status:!0,metadata:!0,connections:!0}).extend({title:Xe().min(1,"Name is required").max(255)});function fs(o){const e=k.c(8);let s,n;e[0]!==o?({className:s,...n}=o,e[0]=o,e[1]=s,e[2]=n):(s=e[1],n=e[2]);let l;e[3]!==s?(l=ae("grid gap-3",s),e[3]=s,e[4]=l):l=e[4];let i;return e[5]!==n||e[6]!==l?(i=t.jsx(Ft,{"data-slot":"radio-group",className:l,...n}),e[5]=n,e[6]=l,e[7]=i):i=e[7],i}function Ee(o){const e=k.c(9);let s,n;e[0]!==o?({className:s,...n}=o,e[0]=o,e[1]=s,e[2]=n):(s=e[1],n=e[2]);let l;e[3]!==s?(l=ae("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",s),e[3]=s,e[4]=l):l=e[4];let i;e[5]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(Gt,{"data-slot":"radio-group-indicator",className:"relative flex items-center justify-center",children:t.jsx(Ye,{className:"fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2"})}),e[5]=i):i=e[5];let d;return e[6]!==n||e[7]!==l?(d=t.jsx(Bt,{"data-slot":"radio-group-item",className:l,...n,children:i}),e[6]=n,e[7]=l,e[8]=d):d=e[8],d}function ps(o){const s=new TextEncoder().encode(o),n=Array.from(s,l=>String.fromCharCode(l)).join("");return btoa(n)}function xs(o){const e=k.c(10),{url:s}=o,[n,l]=_.useState(!1);let i;e[0]!==s?(i=async()=>{await navigator.clipboard.writeText(s),l(!0),ce.success("Agent URL copied to clipboard"),setTimeout(()=>l(!1),2e3)},e[0]=s,e[1]=i):i=e[1];const d=i;let a;e[2]!==n?(a=n?t.jsx(je,{size:20,className:"text-green-600"}):t.jsx(Re,{size:20}),e[2]=n,e[3]=a):a=e[3];const r=n?"Copied!":"Copy URL";let c;e[4]!==r?(c=t.jsx("span",{className:"text-xs font-medium",children:r}),e[4]=r,e[5]=c):c=e[5];let x;return e[6]!==d||e[7]!==a||e[8]!==c?(x=t.jsxs(Z,{type:"button",variant:"outline",onClick:d,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[a,c]}),e[6]=d,e[7]=a,e[8]=c,e[9]=x):x=e[9],x}function hs(o){const e=k.c(7),{url:s,serverName:n}=o;let l;e[0]!==n||e[1]!==s?(l=()=>{const c=We(n),g=ps(JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Cursor"}},null,2)),p=`cursor://anysphere.cursor-deeplink/mcp/install?name=${encodeURIComponent(c)}&config=${encodeURIComponent(g)}`;window.open(p,"_blank"),ce.success("Opening Cursor...")},e[0]=n,e[1]=s,e[2]=l):l=e[2];const i=l;let d,a;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=t.jsx("img",{src:"/logos/cursor.svg",alt:"Cursor",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(11%) sepia(8%) saturate(785%) hue-rotate(1deg) brightness(95%) contrast(89%)"}}),a=t.jsx("span",{className:"text-xs font-medium",children:"Install on Cursor"}),e[3]=d,e[4]=a):(d=e[3],a=e[4]);let r;return e[5]!==i?(r=t.jsxs(Z,{type:"button",variant:"outline",onClick:i,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[d,a]}),e[5]=i,e[6]=r):r=e[6],r}function gs(o){const e=k.c(11),{url:s,serverName:n}=o,[l,i]=_.useState(!1);let d;e[0]!==n||e[1]!==s?(d=async()=>{const p=We(n),u=JSON.stringify({type:"http",url:s,headers:{"x-mesh-client":"Claude Code"}},null,2),f=`claude mcp add-json "${p}" '${u.replace(/'/g,"'\\''")}'`;await navigator.clipboard.writeText(f),i(!0),ce.success("Claude Code command copied to clipboard"),setTimeout(()=>i(!1),2e3)},e[0]=n,e[1]=s,e[2]=d):d=e[2];const a=d;let r;e[3]!==l?(r=l?t.jsx(je,{size:20,className:"text-green-600"}):t.jsx("img",{src:"/logos/Claude Code.svg",alt:"Claude Code",className:"h-5 w-5",style:{filter:"brightness(0) saturate(100%) invert(55%) sepia(31%) saturate(1264%) hue-rotate(331deg) brightness(92%) contrast(86%)"}}),e[3]=l,e[4]=r):r=e[4];const c=l?"Copied!":"Install on Claude";let x;e[5]!==c?(x=t.jsx("span",{className:"text-xs font-medium",children:c}),e[5]=c,e[6]=x):x=e[6];let g;return e[7]!==a||e[8]!==r||e[9]!==x?(g=t.jsxs(Z,{type:"button",variant:"outline",onClick:a,className:"h-auto py-3 px-4 flex flex-col items-center gap-2",children:[r,x]}),e[7]=a,e[8]=r,e[9]=x,e[10]=g):g=e[10],g}function js({virtualMcp:o}){const{org:e}=de(),s=ge({connectionId:Rt,orgId:e.id}),[n,l]=_.useState(null),[i,d]=_.useState(!1),[a,r]=_.useState(!1),c=o.id,x=o.title||`agent-${c.slice(0,8)}`,g=n?`bunx @decocms/typegen@latest --mcp ${c} --key ${n} --output client.ts`:`bunx @decocms/typegen@latest --mcp ${c} --key <api-key> --output client.ts`,p=async()=>{d(!0);try{const f=(await s.callTool({name:"API_KEY_CREATE",arguments:{name:`typegen-${x}`,permissions:{[c]:["*"]}}})).structuredContent?.key;if(!f)throw new Error("No key in response");l(f)}catch{ce.error("Failed to generate API key")}finally{d(!1)}},h=async()=>{await navigator.clipboard.writeText(g),r(!0),ce.success("Command copied to clipboard"),setTimeout(()=>r(!1),2e3)};return t.jsxs("div",{className:"flex min-w-0 flex-col gap-3",children:[t.jsxs("div",{className:"flex items-start justify-between gap-3",children:[t.jsxs("div",{className:"flex flex-col gap-0.5",children:[t.jsx("h4",{className:"text-sm font-medium text-foreground",children:"Generate typed client"}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["Introspects this agent and writes a typed"," ",t.jsx("code",{className:"font-mono",children:"client.ts"})," you can import directly."]})]}),!n&&t.jsxs(Z,{type:"button",variant:"outline",size:"sm",className:"shrink-0 gap-1.5",onClick:p,disabled:i,children:[i?t.jsx(Le,{size:14,className:"animate-spin"}):t.jsx(Ut,{size:14}),t.jsx("span",{children:i?"Generating…":"Generate API key"})]})]}),n&&t.jsx("p",{className:"rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-700",children:"Store this key securely — it won't be shown again."}),t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Generate client"}),t.jsx("div",{className:"rounded-md border border-input bg-muted/50 px-3 py-2.5",children:t.jsxs("div",{className:"flex items-start gap-2",children:[t.jsx("code",{className:"min-w-0 flex-1 break-all font-mono text-xs text-muted-foreground",children:g}),t.jsx(Z,{type:"button",variant:"ghost",size:"icon",className:"size-6 shrink-0",onClick:h,children:a?t.jsx(je,{size:12,className:"text-green-600"}):t.jsx(Re,{size:12})})]})}),t.jsx("p",{className:"text-xs font-medium text-muted-foreground",children:"Runtime variables"}),t.jsx(bs,{apiKey:n})]})}function bs(o){const e=k.c(19),{apiKey:s}=o,[n,l]=_.useState(!1),i=window.location.origin,d=s?`MESH_API_KEY=${s}`:"MESH_API_KEY=<api-key>",a=`MESH_BASE_URL=${i}`,r=`${d}
2
2
  ${a}`;let c;e[0]!==r?(c=async()=>{await navigator.clipboard.writeText(r),l(!0),setTimeout(()=>l(!1),2e3)},e[0]=r,e[1]=c):c=e[1];const x=c,g=!s;let p;e[2]!==g?(p=ae({"opacity-50":g}),e[2]=g,e[3]=p):p=e[3];let h;e[4]!==d||e[5]!==p?(h=t.jsx("span",{className:p,children:d}),e[4]=d,e[5]=p,e[6]=h):h=e[6];let u,f;e[7]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("br",{}),f=t.jsx("span",{children:a}),e[7]=u,e[8]=f):(u=e[7],f=e[8]);let b;e[9]!==h?(b=t.jsxs("code",{className:"min-w-0 flex-1 font-mono text-xs text-muted-foreground",children:[h,u,f]}),e[9]=h,e[10]=b):b=e[10];let m;e[11]!==n?(m=n?t.jsx(je,{size:12,className:"text-green-600"}):t.jsx(Re,{size:12}),e[11]=n,e[12]=m):m=e[12];let j;e[13]!==x||e[14]!==m?(j=t.jsx(Z,{type:"button",variant:"ghost",size:"icon",className:"size-6 shrink-0",onClick:x,children:m}),e[13]=x,e[14]=m,e[15]=j):j=e[15];let v;return e[16]!==b||e[17]!==j?(v=t.jsx("div",{className:"rounded-md border border-input bg-muted/50 px-3 py-2.5",children:t.jsxs("div",{className:"flex items-start gap-2",children:[b,j]})}),e[16]=b,e[17]=j,e[18]=v):v=e[18],v}function Ns(o){const e=k.c(3),{virtualMcp:s}=o;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx("div",{className:"h-20 animate-pulse rounded-md bg-muted"}),e[0]=n):n=e[0];let l;return e[1]!==s?(l=t.jsx(_.Suspense,{fallback:n,children:t.jsx(js,{virtualMcp:s})}),e[1]=s,e[2]=l):l=e[2],l}function vs(o){const e=k.c(44),{open:s,onOpenChange:n,virtualMcp:l}=o,[i,d]=_.useState("code_execution");let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a=P=>{(P==="passthrough"||P==="smart_tool_selection"||P==="code_execution")&&d(P)},e[0]=a):a=e[0];const r=a;let c;e[1]!==i||e[2]!==l.id?(c=new URL(`/mcp/virtual-mcp/${l.id}`,window.location.origin),c.searchParams.set("mode",i),e[1]=i,e[2]=l.id,e[3]=c):c=e[3];let x;e[4]!==l.id||e[5]!==l.title?(x=l.title||`agent-${l.id?.slice(0,8)??"default"}`,e[4]=l.id,e[5]=l.title,e[6]=x):x=e[6];const g=x;let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx($t,{children:t.jsx(Dt,{children:"Connect"})}),e[7]=p):p=e[7];let h;e[8]===Symbol.for("react.memo_cache_sentinel")?(h=t.jsx("div",{children:t.jsx("h4",{className:"text-sm font-medium text-foreground mt-1",children:"How should this agent work?"})}),e[8]=h):h=e[8];let u;e[9]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(nt,{className:"size-5 text-muted-foreground"})}),e[9]=u):u=e[9];let f;e[10]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Direct access"}),e[10]=f):f=e[10];let b;e[11]===Symbol.for("react.memo_cache_sentinel")?(b=t.jsx(pe,{asChild:!0,children:t.jsx(_e,{className:"size-3.5 text-muted-foreground"})}),e[11]=b):b=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsxs("label",{htmlFor:"mode-passthrough",className:"flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[u,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[f,t.jsx(ve,{children:t.jsxs(xe,{children:[b,t.jsx(he,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"All tools are exposed directly via tools/list. Best for small tool surfaces with deterministic behavior."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Best for small teams or when you need predictable behavior"})]}),t.jsx(Ee,{id:"mode-passthrough",value:"passthrough"})]}),e[12]=m):m=e[12];let j;e[13]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(it,{className:"size-5 text-muted-foreground"})}),e[13]=j):j=e[13];let v;e[14]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Smart discovery"}),e[14]=v):v=e[14];let C;e[15]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(pe,{asChild:!0,children:t.jsx(_e,{className:"size-3.5 text-muted-foreground"})}),e[15]=C):C=e[15];let y;e[16]===Symbol.for("react.memo_cache_sentinel")?(y=t.jsxs("label",{htmlFor:"mode-smart",className:"flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[j,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[v,t.jsx(ve,{children:t.jsxs(xe,{children:[C,t.jsx(he,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"Uses meta-tools (GATEWAY_SEARCH_TOOLS, GATEWAY_DESCRIBE_TOOLS, GATEWAY_CALL_TOOL) to keep the tool list small and request details on demand."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Ideal for large teams with many tools - AI finds what it needs"})]}),t.jsx(Ee,{id:"mode-smart",value:"smart_tool_selection"})]}),e[16]=y):y=e[16];let V;e[17]===Symbol.for("react.memo_cache_sentinel")?(V=t.jsx("div",{className:"p-1.5 shrink-0",children:t.jsx(Ht,{className:"size-5 text-muted-foreground"})}),e[17]=V):V=e[17];let R;e[18]===Symbol.for("react.memo_cache_sentinel")?(R=t.jsx("span",{className:"text-sm font-medium text-foreground",children:"Smart execution"}),e[18]=R):R=e[18];let T;e[19]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(pe,{asChild:!0,children:t.jsx(_e,{className:"size-3.5 text-muted-foreground"})}),e[19]=T):T=e[19];let O;e[20]===Symbol.for("react.memo_cache_sentinel")?(O=t.jsxs("label",{htmlFor:"mode-code",className:"relative flex items-center gap-3 px-3 py-5 rounded-lg border border-border hover:border-ring/50 cursor-pointer transition-colors has-checked:border-ring has-checked:bg-accent/5",children:[V,t.jsxs("div",{className:"flex-1 flex flex-col gap-1.5",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[R,t.jsx(ve,{children:t.jsxs(xe,{children:[T,t.jsx(he,{className:"max-w-xs",children:t.jsx("p",{className:"text-xs",children:"Exposes meta-tools for discovery + sandboxed execution (GATEWAY_RUN_CODE). Reduces overhead on large surfaces by shifting work into a controlled runtime."})})]})})]}),t.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:"Maximum flexibility - AI can write code to orchestrate tools"})]}),t.jsx(Ee,{id:"mode-code",value:"code_execution"}),t.jsx($e,{variant:"outline",className:"absolute -top-2.5 left-1/2 -translate-x-1/2 bg-background z-10",children:"Recommended"})]}),e[20]=O):O=e[20];let S;e[21]!==i?(S=t.jsxs("div",{className:"flex flex-col gap-3",children:[h,t.jsxs(fs,{value:i,onValueChange:r,className:"flex flex-col gap-4.5",children:[m,y,O]})]}),e[21]=i,e[22]=S):S=e[22];let w;e[23]!==c.href?(w=t.jsx(xs,{url:c.href}),e[23]=c.href,e[24]=w):w=e[24];let z,$;e[25]!==g||e[26]!==c.href?(z=t.jsx(hs,{url:c.href,serverName:g}),$=t.jsx(gs,{url:c.href,serverName:g}),e[25]=g,e[26]=c.href,e[27]=z,e[28]=$):(z=e[27],$=e[28]);let I;e[29]!==w||e[30]!==z||e[31]!==$?(I=t.jsx("div",{className:"flex flex-col gap-3 pt-2",children:t.jsxs("div",{className:"grid grid-cols-3 gap-2",children:[w,z,$]})}),e[29]=w,e[30]=z,e[31]=$,e[32]=I):I=e[32];let D;e[33]===Symbol.for("react.memo_cache_sentinel")?(D=t.jsx("div",{className:"border-t border-border"}),e[33]=D):D=e[33];let A;e[34]!==l?(A=t.jsx(Ns,{virtualMcp:l}),e[34]=l,e[35]=A):A=e[35];let E;e[36]!==S||e[37]!==I||e[38]!==A?(E=t.jsxs(Ue,{className:"max-h-[80vh] overflow-y-auto sm:max-w-2xl",children:[p,t.jsxs("div",{className:"flex flex-col gap-6",children:[S,I,D,A]})]}),e[36]=S,e[37]=I,e[38]=A,e[39]=E):E=e[39];let B;return e[40]!==n||e[41]!==s||e[42]!==E?(B=t.jsx(Ke,{open:s,onOpenChange:n,children:E}),e[40]=n,e[41]=s,e[42]=E,e[43]=B):B=e[43],B}function ys(o,e){switch(e.type){case"SET_SHARE_DIALOG_OPEN":return{...o,shareDialogOpen:e.payload};case"SET_CONNECTION_DIALOG_OPEN":return{...o,connectionDialogOpen:e.payload};case"SET_EDITING_CONNECTION_ID":return{...o,editingConnectionId:e.payload};case"SET_SKILLS_OPEN":return{...o,skillsOpen:e.payload};default:return o}}function Ie(o){const e=k.c(27),{connection_id:s,selected_tools:n,selected_resources:l,selected_prompts:i,onClick:d}=o,a=gt(s);if(!a)return null;let r;e[0]!==n?(r=Se(n),e[0]=n,e[1]=r):r=e[1];const c=r;let x;e[2]!==l?(x=Se(l),e[2]=l,e[3]=x):x=e[3];const g=x;let p;e[4]!==i?(p=Se(i),e[4]=i,e[5]=p):p=e[5];const h=p;let u;e[6]!==a.icon||e[7]!==a.title?(u=t.jsx(Oe,{icon:a.icon,name:a.title,size:"xs"}),e[6]=a.icon,e[7]=a.title,e[8]=u):u=e[8];let f;e[9]!==a.title?(f=t.jsx("p",{className:"flex-1 text-sm font-normal text-foreground truncate",children:a.title}),e[9]=a.title,e[10]=f):f=e[10];let b;e[11]!==c?(b=c!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:c==="all"?"all":c}),t.jsx(Ae,{size:12})]}),e[11]=c,e[12]=b):b=e[12];let m;e[13]!==g?(m=g!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:g==="all"?"all":g}),t.jsx(be,{size:12})]}),e[13]=g,e[14]=m):m=e[14];let j;e[15]!==h?(j=h!==0&&t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("span",{children:h==="all"?"all":h}),t.jsx(De,{size:12})]}),e[15]=h,e[16]=j):j=e[16];let v;e[17]!==b||e[18]!==m||e[19]!==j?(v=t.jsxs($e,{variant:"secondary",className:"bg-muted h-5 gap-2 px-1.5 py-1 flex items-center",children:[b,m,j]}),e[17]=b,e[18]=m,e[19]=j,e[20]=v):v=e[20];let C;e[21]===Symbol.for("react.memo_cache_sentinel")?(C=t.jsx(He,{size:16,className:"text-muted-foreground shrink-0"}),e[21]=C):C=e[21];let y;return e[22]!==d||e[23]!==u||e[24]!==f||e[25]!==v?(y=t.jsxs("div",{onClick:d,className:"w-full h-12 flex items-center gap-2 px-3 rounded-lg border border-border hover:bg-accent/50 transition-colors cursor-pointer",children:[u,f,v,C]}),e[22]=d,e[23]=u,e[24]=f,e[25]=v,e[26]=y):y=e[26],y}Ie.Fallback=function(){return t.jsxs("div",{className:"w-full h-12 flex items-center gap-2 px-3 rounded-lg border border-border",children:[t.jsx("div",{className:"size-5 rounded bg-muted animate-pulse shrink-0"}),t.jsx("div",{className:"flex-1 h-4 rounded bg-muted animate-pulse"}),t.jsxs($e,{variant:"secondary",className:"bg-muted h-5 gap-2 px-1.5 py-1 flex items-center",children:[t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("div",{className:"w-3 h-3 rounded bg-muted-foreground/20 animate-pulse"}),t.jsx(Ae,{size:12})]}),t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("div",{className:"w-3 h-3 rounded bg-muted-foreground/20 animate-pulse"}),t.jsx(be,{size:12})]}),t.jsxs("div",{className:"flex items-center gap-0.5 text-xs text-muted-foreground",children:[t.jsx("div",{className:"w-3 h-3 rounded bg-muted-foreground/20 animate-pulse"}),t.jsx(De,{size:12})]})]}),t.jsx(He,{size:16,className:"text-muted-foreground shrink-0"})]})};function Cs({virtualMcp:o}){const{org:e}=de(),s=bt(),n=st({resolver:lt(us),defaultValues:o}),l=n.watch("connections"),[i,d]=_.useReducer(ys,{shareDialogOpen:!1,connectionDialogOpen:!1,editingConnectionId:null,skillsOpen:!1}),[,a]=ft(),{setVirtualMcpId:r}=rt();_.useEffect(()=>{a(!0),r(o.id)},[o.id]);const c=()=>{r(o.id),a(!0)},x=n.formState.isDirty,g=async()=>{const m=n.getValues(),j=await s.update.mutateAsync({id:o.id,data:m});n.reset(j)},p=()=>{n.reset(o)},h=()=>{d({type:"SET_EDITING_CONNECTION_ID",payload:null}),d({type:"SET_CONNECTION_DIALOG_OPEN",payload:!0})},u=m=>{d({type:"SET_EDITING_CONNECTION_ID",payload:m}),d({type:"SET_CONNECTION_DIALOG_OPEN",payload:!0})},f=s.update.isPending,b=t.jsx(Ct,{children:t.jsxs(_t,{children:[t.jsx(Fe,{children:t.jsx(St,{asChild:!0,children:t.jsx(ot,{to:"/$org/$project/agents",params:{org:e.slug,project:Ge},children:"Agents"})})}),t.jsx(Tt,{}),t.jsx(Fe,{children:t.jsx(kt,{children:o.title})})]})});return t.jsxs(wt,{breadcrumb:b,children:[t.jsxs(Et,{children:[t.jsx(It,{onSave:g,onUndo:p,isDirty:x,isSaving:f}),t.jsxs(xe,{delayDuration:0,children:[t.jsx(pe,{asChild:!0,children:t.jsx("span",{className:"inline-block",children:t.jsxs(Z,{variant:"outline",size:"sm",className:"h-7 gap-1.5 px-2 border border-input",onClick:c,"aria-label":"Test Agent",children:[t.jsx(vt,{size:14}),"Test Agent"]})})}),t.jsx(he,{side:"bottom",children:"Test this agent in chat"})]}),t.jsxs(Z,{variant:"outline",size:"sm",className:"h-7 gap-1.5 px-2 border border-input",onClick:()=>d({type:"SET_SHARE_DIALOG_OPEN",payload:!0}),children:[t.jsx(Je,{size:14}),"Connect"]})]}),t.jsx("div",{className:"flex h-full w-full bg-background overflow-auto",children:t.jsxs("div",{className:"flex flex-col w-full",children:[t.jsxs("div",{className:"flex items-start justify-between gap-4 p-6 shrink-0",children:[t.jsxs("div",{className:"flex items-start gap-4 flex-1 min-w-0",children:[t.jsx(Me,{control:n.control,name:"icon",render:({field:m})=>t.jsx(ut,{value:m.value,onChange:m.onChange,name:n.watch("title")||"Agent",size:"lg",className:"shrink-0 shadow-sm",fallbackIcon:t.jsx(yt,{})})}),t.jsxs("div",{className:"flex flex-col flex-1 min-w-0",children:[t.jsx(Ve,{...n.register("title"),className:"h-auto py-0.5 text-lg! font-medium leading-7 px-1 -mx-1 border-transparent hover:bg-input/25 focus:border-input bg-transparent transition-all",placeholder:"Agent Name"}),t.jsx(Ve,{...n.register("description"),className:"h-auto py-0.5 text-base text-muted-foreground leading-6 px-1 -mx-1 border-transparent hover:bg-input/25 focus:border-input bg-transparent transition-all",placeholder:"Add a description..."})]})]}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(pt,{checked:n.watch("status")==="active",onCheckedChange:m=>n.setValue("status",m?"active":"inactive",{shouldDirty:!0})})})]}),t.jsxs(at,{open:i.skillsOpen,onOpenChange:m=>d({type:"SET_SKILLS_OPEN",payload:m}),className:"border-t border-border shrink-0 max-h-[400px] overflow-hidden flex flex-col",children:[l.length===0?t.jsxs("button",{type:"button",onClick:h,className:"w-full flex items-center justify-between px-6 py-4 hover:bg-muted/50 transition-colors cursor-pointer",children:[t.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Skills"}),t.jsxs("div",{className:"h-7 px-2 inline-flex items-center justify-center gap-1 rounded-md text-sm text-muted-foreground",children:[t.jsx(Be,{size:14}),"Add"]})]}):t.jsx(ct,{asChild:!0,children:t.jsxs("button",{type:"button",className:"w-full flex items-center justify-between px-6 py-4 hover:bg-muted/50 transition-colors cursor-pointer",children:[t.jsx("p",{className:"text-sm font-medium text-muted-foreground",children:"Skills"}),t.jsxs("div",{className:"flex items-center",children:[t.jsx("div",{className:"ease-(--ease-out-expo)",style:{width:i.skillsOpen?0:"auto",marginRight:i.skillsOpen?0:4,opacity:i.skillsOpen?0:1,pointerEvents:i.skillsOpen?"none":"auto",transitionProperty:"all",transitionDuration:i.skillsOpen?"0ms":"200ms"},children:t.jsx(Kt,{connectionIds:l.map(m=>m.connection_id),maxVisibleIcons:2})}),t.jsxs("div",{role:"button",tabIndex:0,className:"h-7 inline-flex items-center justify-center rounded-md text-sm text-muted-foreground overflow-hidden transition-all duration-200 ease-(--ease-out-expo) hover:bg-accent hover:text-accent-foreground",style:{width:i.skillsOpen?"auto":28,paddingLeft:i.skillsOpen?8:0,paddingRight:i.skillsOpen?8:0,gap:i.skillsOpen?4:0},onPointerDown:m=>{m.stopPropagation()},onClick:m=>{m.stopPropagation(),m.preventDefault(),h()},onKeyDown:m=>{(m.key==="Enter"||m.key===" ")&&(m.stopPropagation(),m.preventDefault(),h())},children:[t.jsx(Be,{size:14,className:"shrink-0"}),t.jsx("span",{className:"overflow-hidden whitespace-nowrap transition-all duration-200 ease-(--ease-out-expo)",style:{width:i.skillsOpen?"auto":0,opacity:i.skillsOpen?1:0},children:"Add"})]}),t.jsx("div",{className:"h-7 inline-flex items-center justify-center overflow-hidden transition-all duration-200 ease-(--ease-out-expo)",style:{width:i.skillsOpen?28:0,opacity:i.skillsOpen?1:0},children:t.jsx(Nt,{size:16,className:"shrink-0"})})]})]})}),t.jsx("div",{className:"grid overflow-hidden transition-[grid-template-rows] duration-200 ease-(--ease-out-expo)",style:{gridTemplateRows:i.skillsOpen?"1fr":"0fr"},children:t.jsx("div",{className:"min-h-0 overflow-hidden",children:t.jsx("div",{className:"overflow-y-auto max-h-[300px] mask-[linear-gradient(to_bottom,black_calc(100%-40px),transparent_100%)]",children:t.jsx("div",{className:"flex flex-col gap-2 px-6 pb-4 pt-2",children:l.map(m=>t.jsx(_.Suspense,{fallback:t.jsx(Ie.Fallback,{}),children:t.jsx(Ie,{connection_id:m.connection_id,selected_tools:m.selected_tools,selected_resources:m.selected_resources,selected_prompts:m.selected_prompts,onClick:()=>u(m.connection_id)})},m.connection_id))})})})})]}),t.jsxs("div",{className:"flex flex-col flex-1 p-6 border-t border-border overflow-auto",children:[t.jsx("p",{className:"text-sm font-medium text-muted-foreground mb-2",children:"Instructions"}),t.jsx(Me,{name:"metadata.instructions",control:n.control,render:({field:m})=>t.jsx(xt,{...m,value:m.value??"",placeholder:"Write instructions here...",className:"min-h-[200px] resize-none text-sm placeholder:text-muted-foreground/50 leading-relaxed border-0 rounded-none shadow-none px-0 focus-visible:ring-0 focus-visible:ring-offset-0 focus:border-0 bg-transparent"})})]})]})}),t.jsx(ms,{open:i.connectionDialogOpen,onOpenChange:m=>d({type:"SET_CONNECTION_DIALOG_OPEN",payload:m}),selectedId:i.editingConnectionId,form:n,connections:l}),t.jsx(vs,{open:i.shareDialogOpen,onOpenChange:m=>d({type:"SET_SHARE_DIALOG_OPEN",payload:m}),virtualMcp:o})]})}function _s(){const o=k.c(6),e=et();let s;o[0]===Symbol.for("react.memo_cache_sentinel")?(s={from:"/shell/$org/$project/agents/$agentId"},o[0]=s):s=o[0];const n=tt(s),{org:l,agentId:i}=n,d=jt(i);if(!d){let r;return o[1]!==e||o[2]!==l?(r=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(mt,{title:"Agent not found",description:"This Agent may have been deleted or you may not have access.",actions:t.jsx(Z,{variant:"outline",onClick:()=>e({to:"/$org/$project/agents",params:{org:l,project:Ge}}),children:"Back to agents"})})}),o[1]=e,o[2]=l,o[3]=r):r=o[3],r}let a;return o[4]!==d?(a=t.jsx(Cs,{virtualMcp:d}),o[4]=d,o[5]=a):a=o[5],a}function Jl(){const o=k.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(fe,{children:t.jsx(_.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(Le,{size:32,className:"animate-spin text-muted-foreground"})}),children:t.jsx(_s,{})})}),o[0]=e):e=o[0],e}export{Jl as default};
@@ -1 +1 @@
1
- import{c as we,j as s,E as vt,r as J,u as Nt,b as Ct,B as Q,v as X,t as yt,O as wt}from"./index-D-htvwK7.js";import{C as St}from"./collection-display-button-095BNnmg.js";import{C as kt,E as Ze}from"./collection-search-CRbc4DEy.js";import{P as ve}from"./index-DwOzHQTE.js";import{B as _t,a as Dt,b as zt,c as At}from"./breadcrumb-Djkz23vb.js";import{C as xt}from"./connection-card-D3LRvC6Z.js";import{C as He,i as Mt}from"./connection-status-tnMJ5LrM.js";import{I as Ge}from"./integration-icon-Dhxeif96.js";import{u as Tt}from"./use-list-state-BSenVV3C.js";import{u as $t}from"./use-create-virtual-mcp-Crgs_7Nu.js";import{i as Ne}from"./constants-P4PVvchD.js";import{b as Pt,a as It}from"./use-virtual-mcp-qK-NM0rh.js";import{c as at,b as rt,d as ot,A as ct,e as dt,h as mt,a as ft,f as ut}from"./alert-dialog-NBgR76Yp.js";import{B as et}from"./badge-KDRqEGRi.js";import{C as Ue}from"./checkbox-DY4RVI9F.js";import{c as Ot,d as Bt,b as Lt,a as Rt,D as Et}from"./dialog-CgD1R6sd.js";import{T as Kt,a as Vt,b as Ve,c as se,d as Gt,e as Ut}from"./table-Bn8GUsEe.js";import{D as tt,a as st,b as nt,c as je}from"./dropdown-menu-fntgBKzW.js";import{n as Ft}from"./ArrowDown-C0AHT6Se.js";import{i as Ht}from"./ArrowUp-D3L33LOK.js";import{t as qt}from"./ChevronDown-DF3whIkz.js";import{i as it}from"./DotsVertical-DngStBCK.js";import{s as lt}from"./Eye-D7EUKcSA.js";import{i as Jt}from"./Loading01-f9s2h1wv.js";import{s as Fe}from"./Trash01-BPU7sU05.js";import{t as Y}from"./Users03-DVX3bbcm.js";import{s as gt}from"./XClose-BKL3EMXH.js";import{U as Ce}from"./user-DOfZcM2J.js";import{A as ht}from"./agent-connections-preview-v1h44iHE.js";import{f as ye}from"./format-time-CMKyl-GC.js";import"./Check-DhJrraz0.js";import"./Grid01-BWhQjjDh.js";import"./List-CqTZ79z9.js";import"./tooltip-BtnNkpKs.js";import"./index-DMRPqDGw.js";import"./SearchMd-195kdrrc.js";import"./input-BSTFqIOK.js";import"./localstorage-keys-CnuA12nM.js";import"./useQuery-D9zfpIOd.js";import"./useMutation-D9A8H6Gw.js";import"./ChevronRight-TdWXpEIC.js";import"./card-D-rpkLYG.js";import"./AlertCircle-M_vDM06X.js";import"./CheckCircle-CHWgGReR.js";import"./Container-C5O_vd5l.js";import"./use-view-mode-JyUdxjkA.js";import"./use-mobile-qpUl5FeD.js";import"./use-collections-S_4aLkkK.js";import"./X-DO1ZPMDK.js";import"./avatar-CSPJYHbS.js";import"./use-connection-CIMDlS0p.js";import"./differenceInSeconds-NQ4PDo0z.js";function pt(t){return t.title.trim().replace(/\s+\(\d+\)$/,"")}function Qt(t){const e=new Map;for(const i of t){const a=pt(i),l=e.get(a);l?l.push(i):e.set(a,[i])}const n=[],d=new Set;for(const i of t){const a=pt(i);if(d.has(a))continue;d.add(a);const l=e.get(a),x=l[0];l.length===1?n.push({type:"single",agent:x}):n.push({type:"group",key:a,icon:x.icon,title:x.title.replace(/\s*\(\d+\)\s*$/,""),agents:l})}return n}function jt(t){const e=new Set,n=[];for(const d of t)d.created_by&&!e.has(d.created_by)&&(e.add(d.created_by),n.push(d.created_by));return n}function Wt(t,e){switch(e.type){case"delete":return{mode:"deleting",virtualMcp:e.virtualMcp};case"close":return{mode:"idle"}}}function Xt(t){const e=we.c(107),{group:n,onNavigate:d,onDelete:i,selectionMode:a,selectedIds:l,onToggleSelect:x}=t,[N,g]=J.useState(!1);let w;if(e[0]!==n.agents||e[1]!==l){let y;e[3]!==l?(y=_=>l.has(_.id),e[3]=l,e[4]=y):y=e[4],w=n.agents.every(y),e[0]=n.agents,e[1]=l,e[2]=w}else w=e[2];const m=w;let D;if(e[5]!==n.agents||e[6]!==l){let y;e[8]!==l?(y=_=>l.has(_.id),e[8]=l,e[9]=y):y=e[9],D=n.agents.some(y),e[5]=n.agents,e[6]=l,e[7]=D}else D=e[7];const o=D;let O,S,c,C,z,P,k,I,A,f,j;if(e[10]!==m||e[11]!==n.agents||e[12]!==n.icon||e[13]!==n.title||e[14]!==x||e[15]!==l||e[16]!==a||e[17]!==o){const y=jt(n.agents),_=n.agents.reduce(ts,n.agents[0]),W=_.updated_at??_.created_at;O=xt;const Z=`${n.agents.length} instances`;e[29]!==n.icon||e[30]!==n.title||e[31]!==Z?(A={title:n.title,icon:n.icon,description:Z},e[29]=n.icon,e[30]=n.title,e[31]=Z,e[32]=A):A=e[32],e[33]!==m||e[34]!==n.agents||e[35]!==x||e[36]!==l||e[37]!==a?(f=()=>a?(()=>{for(const R of n.agents)m?l.has(R.id)&&x(R.id):l.has(R.id)||x(R.id)})():g(!0),e[33]=m,e[34]=n.agents,e[35]=x,e[36]=l,e[37]=a,e[38]=f):f=e[38];const H=a&&m&&"ring-2 ring-primary",ee=a&&o&&!m&&"ring-1 ring-primary/50";e[39]!==H||e[40]!==ee?(j=X(H,ee),e[39]=H,e[40]=ee,e[41]=j):j=e[41],e[42]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Y,{}),e[42]=S):S=e[42],e[43]!==m||e[44]!==n.agents||e[45]!==x||e[46]!==l||e[47]!==a||e[48]!==o?(c=a?s.jsx(Ue,{checked:m?!0:o?"indeterminate":!1,onCheckedChange:()=>{for(const R of n.agents)m?l.has(R.id)&&x(R.id):l.has(R.id)||x(R.id)}}):s.jsxs(et,{variant:"secondary",className:"text-xs tabular-nums",children:["x",n.agents.length]}),e[43]=m,e[44]=n.agents,e[45]=x,e[46]=l,e[47]=a,e[48]=o,e[49]=c):c=e[49];let q;e[50]!==n.agents?(q=n.agents.slice(0,6).map(es),e[50]=n.agents,e[51]=q):q=e[51],e[52]!==q?(C=s.jsx("div",{className:"flex items-center gap-1",children:q}),e[52]=q,e[53]=C):C=e[53],k="flex items-center justify-between text-xs text-muted-foreground w-full min-w-0";const te=y.map(R=>s.jsx(Ce,{id:R,size:"3xs",avatarOnly:y.length>1},R));e[54]!==te?(I=s.jsx("div",{className:"flex items-center -space-x-1.5",children:te}),e[54]=te,e[55]=I):I=e[55],z="shrink-0 ml-2",P=W?ye(new Date(W)):"—",e[10]=m,e[11]=n.agents,e[12]=n.icon,e[13]=n.title,e[14]=x,e[15]=l,e[16]=a,e[17]=o,e[18]=O,e[19]=S,e[20]=c,e[21]=C,e[22]=z,e[23]=P,e[24]=k,e[25]=I,e[26]=A,e[27]=f,e[28]=j}else O=e[18],S=e[19],c=e[20],C=e[21],z=e[22],P=e[23],k=e[24],I=e[25],A=e[26],f=e[27],j=e[28];let p;e[56]!==z||e[57]!==P?(p=s.jsx("span",{className:z,children:P}),e[56]=z,e[57]=P,e[58]=p):p=e[58];let M;e[59]!==p||e[60]!==k||e[61]!==I?(M=s.jsxs("div",{className:k,children:[I,p]}),e[59]=p,e[60]=k,e[61]=I,e[62]=M):M=e[62];let T;e[63]!==O||e[64]!==S||e[65]!==c||e[66]!==C||e[67]!==M||e[68]!==A||e[69]!==f||e[70]!==j?(T=s.jsx(O,{connection:A,onClick:f,className:j,fallbackIcon:S,headerActions:c,body:C,footer:M}),e[63]=O,e[64]=S,e[65]=c,e[66]=C,e[67]=M,e[68]=A,e[69]=f,e[70]=j,e[71]=T):T=e[71];let B;e[72]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(Y,{}),e[72]=B):B=e[72];let $;e[73]!==n.icon||e[74]!==n.title?($=s.jsx(Ge,{icon:n.icon,name:n.title,size:"md",className:"shrink-0 shadow-sm",fallbackIcon:B}),e[73]=n.icon,e[74]=n.title,e[75]=$):$=e[75];let L;e[76]!==n.agents.length?(L=s.jsxs(et,{variant:"secondary",className:"ml-2 text-xs tabular-nums",children:["x",n.agents.length]}),e[76]=n.agents.length,e[77]=L):L=e[77];let r;e[78]!==n.title||e[79]!==L?(r=s.jsxs(Ot,{children:[n.title,L]}),e[78]=n.title,e[79]=L,e[80]=r):r=e[80];let u;e[81]!==n.agents.length?(u=s.jsxs(Bt,{children:[n.agents.length," instances"]}),e[81]=n.agents.length,e[82]=u):u=e[82];let b;e[83]!==r||e[84]!==u?(b=s.jsxs("div",{children:[r,u]}),e[83]=r,e[84]=u,e[85]=b):b=e[85];let K;e[86]!==$||e[87]!==b?(K=s.jsx(Lt,{className:"px-6 pt-6 pb-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[$,b]})}),e[86]=$,e[87]=b,e[88]=K):K=e[88];let V;if(e[89]!==n.agents||e[90]!==i||e[91]!==d){let y;e[93]!==i||e[94]!==d?(y=_=>s.jsxs("div",{className:"flex items-center gap-3 px-6 py-3 hover:bg-muted/30 cursor-pointer transition-colors",onClick:()=>{g(!1),d(_.id)},children:[s.jsx(Ge,{icon:_.icon,name:_.title,size:"sm",className:"shrink-0",fallbackIcon:s.jsx(Y,{})}),s.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:_.title}),s.jsx(He,{status:_.status})]}),s.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground shrink-0",children:[s.jsx(Ce,{id:_.created_by,size:"3xs"}),s.jsx("span",{children:_.created_at?ye(new Date(_.created_at)):"—"})]}),s.jsxs(tt,{children:[s.jsx(st,{asChild:!0,children:s.jsx(Q,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:Zt,children:s.jsx(it,{size:16})})}),s.jsxs(nt,{align:"end",onClick:Yt,children:[s.jsxs(je,{onClick:()=>{g(!1),d(_.id)},children:[s.jsx(lt,{size:16}),"Open"]}),!Ne(_.id)&&s.jsxs(je,{variant:"destructive",onClick:()=>i(_),children:[s.jsx(Fe,{size:16}),"Delete"]})]})]})]},_.id),e[93]=i,e[94]=d,e[95]=y):y=e[95],V=n.agents.map(y),e[89]=n.agents,e[90]=i,e[91]=d,e[92]=V}else V=e[92];let G;e[96]!==V?(G=s.jsx("div",{className:"divide-y max-h-80 overflow-auto",children:V}),e[96]=V,e[97]=G):G=e[97];let E;e[98]!==K||e[99]!==G?(E=s.jsxs(Rt,{className:"sm:max-w-lg p-0 gap-0",children:[K,G]}),e[98]=K,e[99]=G,e[100]=E):E=e[100];let U;e[101]!==N||e[102]!==E?(U=s.jsx(Et,{open:N,onOpenChange:g,children:E}),e[101]=N,e[102]=E,e[103]=U):U=e[103];let F;return e[104]!==T||e[105]!==U?(F=s.jsxs(s.Fragment,{children:[T,U]}),e[104]=T,e[105]=U,e[106]=F):F=e[106],F}function Yt(t){return t.stopPropagation()}function Zt(t){return t.stopPropagation()}function es(t){return s.jsx(He,{status:t.status},t.id)}function ts(t,e){const n=e.updated_at??e.created_at,d=t.updated_at??t.created_at;return n?d?new Date(n)>new Date(d)?e:t:e:t}function ss(t){const e=we.c(21),{count:n,total:d,onSelectAll:i,onDeselectAll:a,onDelete:l,onCancel:x}=t;if(n===0)return null;let N;e[0]!==n?(N=s.jsxs("span",{className:"text-sm font-medium tabular-nums",children:[n," selected"]}),e[0]=n,e[1]=N):N=e[1];let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("div",{className:"h-4 w-px bg-border"}),e[2]=g):g=e[2];let w;e[3]!==n||e[4]!==a||e[5]!==i||e[6]!==d?(w=n<d?s.jsxs(Q,{variant:"ghost",size:"sm",onClick:i,children:["Select all (",d,")"]}):s.jsx(Q,{variant:"ghost",size:"sm",onClick:a,children:"Clear selection"}),e[3]=n,e[4]=a,e[5]=i,e[6]=d,e[7]=w):w=e[7];let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"h-4 w-px bg-border"}),e[8]=m):m=e[8];let D;e[9]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Fe,{size:14}),e[9]=D):D=e[9];let o;e[10]!==l?(o=s.jsxs(Q,{variant:"ghost",size:"sm",className:"text-destructive hover:text-destructive",onClick:l,children:[D,"Delete"]}),e[10]=l,e[11]=o):o=e[11];let O;e[12]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx("div",{className:"h-4 w-px bg-border"}),e[12]=O):O=e[12];let S;e[13]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(gt,{size:14}),e[13]=S):S=e[13];let c;e[14]!==x?(c=s.jsxs(Q,{variant:"ghost",size:"sm",onClick:x,children:[S,"Cancel"]}),e[14]=x,e[15]=c):c=e[15];let C;return e[16]!==N||e[17]!==w||e[18]!==o||e[19]!==c?(C=s.jsxs("div",{className:"fixed bottom-4 left-1/2 z-50 -translate-x-1/2 flex items-center gap-3 rounded-xl border border-border bg-background/95 backdrop-blur px-4 py-2.5 shadow-lg",children:[N,g,w,m,o,O,c]}),e[16]=N,e[17]=w,e[18]=o,e[19]=c,e[20]=C):C=e[20],C}function ns(t){const e=we.c(37),{columns:n,grouped:d,sortKey:i,sortDirection:a,onSort:l,onRowClick:x,selectionMode:N,selectedIds:g,onToggleSelect:w,emptyState:m}=t;let D;e[0]===Symbol.for("react.memo_cache_sentinel")?(D=new Set,e[0]=D):D=e[0];const[o,O]=J.useState(D);let S;e[1]===Symbol.for("react.memo_cache_sentinel")?(S=f=>{O(j=>{const p=new Set(j);return p.has(f)?p.delete(f):p.add(f),p})},e[1]=S):S=e[1];const c=S;if(d.length===0&&m){let f;return e[2]!==m?(f=s.jsx("div",{className:"flex items-center justify-center h-full",children:m}),e[2]=m,e[3]=f):f=e[3],f}const C=n.length;let z;if(e[4]!==C||e[5]!==n||e[6]!==l||e[7]!==a||e[8]!==i){let f;e[10]!==C||e[11]!==l||e[12]!==a||e[13]!==i?(f=(j,p)=>{const M=i===j.id,T=p===C-1;return s.jsx(Kt,{className:X("px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider",T&&"w-8","group transition-colors select-none",j.sortable&&"hover:bg-accent cursor-pointer",j.cellClassName),onClick:j.sortable&&l?()=>l(j.id):void 0,children:s.jsxs("span",{className:"flex items-center gap-1",children:[j.header,j.sortable&&s.jsx("span",{className:"w-4 flex items-center justify-center",children:M&&a&&(a==="asc"?s.jsx(Ht,{size:16,className:"text-muted-foreground"}):s.jsx(Ft,{size:16,className:"text-muted-foreground"}))})]})},j.id)},e[10]=C,e[11]=l,e[12]=a,e[13]=i,e[14]=f):f=e[14],z=n.map(f),e[4]=C,e[5]=n,e[6]=l,e[7]=a,e[8]=i,e[9]=z}else z=e[9];let P;e[15]!==z?(P=s.jsx(Vt,{className:"border-b-0",children:s.jsx(Ve,{className:"h-9 hover:bg-transparent border-b border-border",children:z})}),e[15]=z,e[16]=P):P=e[16];let k;if(e[17]!==n||e[18]!==o||e[19]!==d||e[20]!==x||e[21]!==w||e[22]!==g||e[23]!==N){let f;e[25]!==n||e[26]!==o||e[27]!==x||e[28]!==w||e[29]!==g||e[30]!==N?(f=j=>{if(j.type==="single"){const r=j.agent;return s.jsx(Ve,{className:X("group/data-row transition-colors border-b-0 hover:bg-accent/50 cursor-pointer",N&&g.has(r.id)&&"bg-primary/5"),onClick:()=>x(r),children:n.map(u=>s.jsx(se,{className:X("px-5 py-4 h-16 align-middle text-sm text-foreground",u.cellClassName),children:s.jsx("div",{className:"min-w-0 w-full truncate overflow-hidden whitespace-nowrap",children:u.render?u.render(r):null})},u.id))},r.id)}const p=j,M=o.has(p.key),T=p.agents.every(r=>g.has(r.id)),B=p.agents.some(r=>g.has(r.id)),$=jt(p.agents),L=p.agents.reduce(ls,p.agents[0]);return s.jsxs(J.Fragment,{children:[s.jsx(Ve,{className:"border-b-0 hover:bg-accent/50 cursor-pointer transition-colors",onClick:()=>c(p.key),children:n.map(r=>{const u=X("px-5 py-3 h-14 align-middle text-sm",r.cellClassName);if(r.id==="select")return s.jsx(se,{className:u,children:s.jsx(Ue,{checked:T?!0:B?"indeterminate":!1,onCheckedChange:()=>{for(const b of p.agents)T?g.has(b.id)&&w(b.id):g.has(b.id)||w(b.id)},onClick:is})},r.id);if(r.id==="title")return s.jsx(se,{className:u,children:s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx(Ge,{icon:p.icon,name:p.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:s.jsx(Y,{size:16})}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:p.title}),s.jsxs(et,{variant:"secondary",className:"text-xs tabular-nums",children:["x",p.agents.length]})]})},r.id);if(r.id==="updated_by")return s.jsx(se,{className:u,children:s.jsx("div",{className:"flex items-center -space-x-1.5",children:$.map(b=>s.jsx(Ce,{id:b,size:"3xs",avatarOnly:$.length>1},b))})},r.id);if(r.id==="updated_at"){const b=L.updated_at??L.created_at;return s.jsx(se,{className:u,children:s.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:b?ye(new Date(b)):"—"})},r.id)}return r.id==="actions"?s.jsx(se,{className:u,children:s.jsx(qt,{size:16,className:X("text-muted-foreground transition-transform",M&&"rotate-180")})},r.id):s.jsx(se,{className:u},r.id)})}),M&&p.agents.map(r=>s.jsx(Ve,{className:X("group/data-row transition-colors border-b-0 hover:bg-accent/50 cursor-pointer bg-muted/20",N&&g.has(r.id)&&"bg-primary/5"),onClick:()=>x(r),children:n.map(u=>s.jsx(se,{className:X("px-5 py-3 h-14 align-middle text-sm text-foreground",u.cellClassName,u.id==="title"&&"pl-12"),children:s.jsx("div",{className:"min-w-0 w-full truncate overflow-hidden whitespace-nowrap",children:u.render?u.render(r):null})},u.id))},r.id))]},p.key)},e[25]=n,e[26]=o,e[27]=x,e[28]=w,e[29]=g,e[30]=N,e[31]=f):f=e[31],k=d.map(f),e[17]=n,e[18]=o,e[19]=d,e[20]=x,e[21]=w,e[22]=g,e[23]=N,e[24]=k}else k=e[24];let I;e[32]!==k?(I=s.jsx(Gt,{children:k}),e[32]=k,e[33]=I):I=e[33];let A;return e[34]!==P||e[35]!==I?(A=s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsxs(Ut,{className:"w-full border-collapse",children:[P,I]})}),e[34]=P,e[35]=I,e[36]=A):A=e[36],A}function is(t){return t.stopPropagation()}function ls(t,e){const n=e.updated_at??e.created_at,d=t.updated_at??t.created_at;return n?d?new Date(n)>new Date(d)?e:t:e:t}function as(){const t=we.c(138),{org:e}=Nt(),n=Ct();let d;t[0]!==e.slug?(d={namespace:e.slug,resource:"agents"},t[0]=e.slug,t[1]=d):d=t[1];const i=Tt(d),a=Pt(i);let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l={navigateOnCreate:!0},t[2]=l):l=t[2];const{createVirtualMCP:x,isCreating:N}=$t(l),g=It();let w;t[3]===Symbol.for("react.memo_cache_sentinel")?(w={mode:"idle"},t[3]=w):w=t[3];const[m,D]=J.useReducer(Wt,w),[o,O]=J.useState(!1);let S;t[4]===Symbol.for("react.memo_cache_sentinel")?(S=new Set,t[4]=S):S=t[4];const[c,C]=J.useState(S),[z,P]=J.useState(!1),[k,I]=J.useState("ALL");let A;t[5]===Symbol.for("react.memo_cache_sentinel")?(A=E=>{C(U=>{const F=new Set(U);return F.has(E)?F.delete(E):F.add(E),F})},t[5]=A):A=t[5];const f=A;let j;t[6]===Symbol.for("react.memo_cache_sentinel")?(j=()=>{O(!1),C(new Set)},t[6]=j):j=t[6];const p=j;let M,T,B,$,L,r,u,b;if(t[7]!==g||t[8]!==z||t[9]!==x||t[10]!==m.mode||t[11]!==m.virtualMcp||t[12]!==N||t[13]!==i||t[14]!==n||t[15]!==e.slug||t[16]!==c||t[17]!==o||t[18]!==k||t[19]!==a){let E;t[28]!==k?(E=h=>!(k!=="ALL"&&h.status!==k),t[28]=k,t[29]=E):E=t[29],B=a.filter(E);const U=Qt(B),F=a.length;let y;t[30]!==a?(y=a.filter(Ns),t[30]=a,t[31]=y):y=t[31];const _=y.length;let W;t[32]!==a?(W=a.filter(vs),t[32]=a,t[33]=W):W=t[33];let Z;t[34]!==y.length||t[35]!==W.length||t[36]!==a.length?(Z={total:F,active:_,inactive:W.length},t[34]=y.length,t[35]=W.length,t[36]=a.length,t[37]=Z):Z=t[37];const H=Z;let ee;t[38]!==g||t[39]!==m.mode||t[40]!==m.virtualMcp?(ee=async()=>{if(m.mode!=="deleting")return;const h=m.virtualMcp.id;if(D({type:"close"}),!(!h||Ne(h)))try{await g.delete.mutateAsync(h)}catch{}},t[38]=g,t[39]=m.mode,t[40]=m.virtualMcp,t[41]=ee):ee=t[41];const q=ee;let te;t[42]!==g||t[43]!==c?(te=async()=>{P(!1);let h=0;for(const v of c)if(!Ne(v))try{await g.delete.mutateAsync(v),h++}catch{}yt.success(`Deleted ${h} agent${h!==1?"s":""}`),p()},t[42]=g,t[43]=c,t[44]=te):te=t[44];const R=te;let Se;t[45]!==n||t[46]!==e.slug||t[47]!==o?(Se=h=>{if(o){f(h);return}n({to:"/$org/$project/agents/$agentId",params:{org:e.slug,project:wt,agentId:h}})},t[45]=n,t[46]=e.slug,t[47]=o,t[48]=Se):Se=t[48];const ne=Se;let ie;t[49]!==c||t[50]!==o?(ie=o?[{id:"select",header:"",render:h=>s.jsx(Ue,{checked:c.has(h.id),onCheckedChange:()=>f(h.id),onClick:bs}),cellClassName:"w-10 shrink-0"}]:[],t[49]=c,t[50]=o,t[51]=ie):ie=t[51];let ke,_e,De,ze,Ae,Me;t[52]===Symbol.for("react.memo_cache_sentinel")?(ke={id:"title",header:"Name",render:js,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},_e={id:"description",header:"Description",render:gs,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},De={id:"connections",header:"Connections",render:ps,cellClassName:"w-28 shrink-0"},ze={id:"status",header:"Status",render:hs,cellClassName:"w-24 shrink-0"},Ae={id:"updated_by",header:"Updated by",render:us,cellClassName:"w-32 shrink-0",sortable:!0},Me={id:"updated_at",header:"Updated",render:fs,cellClassName:"max-w-24 w-24 shrink-0",sortable:!0},t[52]=ke,t[53]=_e,t[54]=De,t[55]=ze,t[56]=Ae,t[57]=Me):(ke=t[52],_e=t[53],De=t[54],ze=t[55],Ae=t[56],Me=t[57]);let le;t[58]!==ne?(le={id:"actions",header:"",render:h=>s.jsxs(tt,{children:[s.jsx(st,{asChild:!0,children:s.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:ms,children:s.jsx(it,{size:20})})}),s.jsxs(nt,{align:"end",onClick:ds,children:[s.jsxs(je,{onClick:v=>{v.stopPropagation(),ne(h.id)},children:[s.jsx(lt,{size:16}),"Open"]}),!Ne(h.id)&&s.jsxs(je,{variant:"destructive",onClick:v=>{v.stopPropagation(),D({type:"delete",virtualMcp:h})},children:[s.jsx(Fe,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"},t[58]=ne,t[59]=le):le=t[59];let Te;t[60]!==ie||t[61]!==le?(Te=[...ie,ke,_e,De,ze,Ae,Me,le],t[60]=ie,t[61]=le,t[62]=Te):Te=t[62];const bt=Te;let $e;t[63]!==x||t[64]!==N||t[65]!==o?($e=s.jsx("div",{className:"flex items-center gap-2",children:o?s.jsxs(Q,{variant:"ghost",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",onClick:p,children:[s.jsx(gt,{size:14}),"Cancel"]}):s.jsxs(s.Fragment,{children:[s.jsxs(Q,{variant:"outline",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",onClick:()=>O(!0),children:[s.jsx(Mt,{size:14}),"Select"]}),s.jsx(Q,{onClick:x,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:N,children:N?"Creating...":"Create Agent"})]})}),t[63]=x,t[64]=N,t[65]=o,t[66]=$e):$e=t[66];const qe=$e;T=ve;const Je=m.mode==="deleting";let Pe;t[67]===Symbol.for("react.memo_cache_sentinel")?(Pe=h=>!h&&D({type:"close"}),t[67]=Pe):Pe=t[67];let Ie;t[68]===Symbol.for("react.memo_cache_sentinel")?(Ie=s.jsx(at,{children:"Delete Agent?"}),t[68]=Ie):Ie=t[68];const Qe=m.mode==="deleting"&&m.virtualMcp.title;let ae;t[69]!==Qe?(ae=s.jsxs(rt,{children:[Ie,s.jsxs(ot,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:Qe}),"."]})]}),t[69]=Qe,t[70]=ae):ae=t[70];let Oe;t[71]===Symbol.for("react.memo_cache_sentinel")?(Oe=s.jsx(ct,{children:"Cancel"}),t[71]=Oe):Oe=t[71];let re;t[72]!==q?(re=s.jsxs(dt,{children:[Oe,s.jsx(mt,{onClick:q,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[72]=q,t[73]=re):re=t[73];let oe;t[74]!==ae||t[75]!==re?(oe=s.jsxs(ft,{children:[ae,re]}),t[74]=ae,t[75]=re,t[76]=oe):oe=t[76],t[77]!==Je||t[78]!==oe?(r=s.jsx(ut,{open:Je,onOpenChange:Pe,children:oe}),t[77]=Je,t[78]=oe,t[79]=r):r=t[79];const We=c.size!==1?"s":"";let ce;t[80]!==c.size||t[81]!==We?(ce=s.jsxs(at,{children:["Delete ",c.size," agent",We,"?"]}),t[80]=c.size,t[81]=We,t[82]=ce):ce=t[82];let Be;t[83]===Symbol.for("react.memo_cache_sentinel")?(Be=s.jsx(ot,{children:"This action cannot be undone. This will permanently delete the selected agents."}),t[83]=Be):Be=t[83];let de;t[84]!==ce?(de=s.jsxs(rt,{children:[ce,Be]}),t[84]=ce,t[85]=de):de=t[85];let Le;t[86]===Symbol.for("react.memo_cache_sentinel")?(Le=s.jsx(ct,{children:"Cancel"}),t[86]=Le):Le=t[86];let me;t[87]!==R?(me=s.jsxs(dt,{children:[Le,s.jsx(mt,{onClick:R,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[87]=R,t[88]=me):me=t[88];let fe;t[89]!==de||t[90]!==me?(fe=s.jsxs(ft,{children:[de,me]}),t[89]=de,t[90]=me,t[91]=fe):fe=t[91],t[92]!==z||t[93]!==fe?(u=s.jsx(ut,{open:z,onOpenChange:P,children:fe}),t[92]=z,t[93]=fe,t[94]=u):u=t[94];const Xe=H.active>0&&` · ${H.active} active`,Ye=H.inactive>0&&` · ${H.inactive} inactive`;let ue;t[95]!==H.total||t[96]!==Xe||t[97]!==Ye?(ue=s.jsx(ve.Header.Left,{children:s.jsx(_t,{children:s.jsx(Dt,{children:s.jsx(zt,{children:s.jsxs(At,{className:"flex items-center gap-2",children:["Agents",s.jsxs("span",{className:"text-xs font-normal text-muted-foreground tabular-nums",children:[H.total," total",Xe,Ye]})]})})})})}),t[95]=H.total,t[96]=Xe,t[97]=Ye,t[98]=ue):ue=t[98];let Re;t[99]===Symbol.for("react.memo_cache_sentinel")?(Re=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"updated_by",label:"Updated by"},{id:"updated_at",label:"Updated"}],t[99]=Re):Re=t[99];let Ee,Ke;t[100]===Symbol.for("react.memo_cache_sentinel")?(Ee=h=>I(h||"ALL"),Ke=[{id:"ALL",label:"All"},{id:"active",label:"Active"},{id:"inactive",label:"Inactive"}],t[100]=Ee,t[101]=Ke):(Ee=t[100],Ke=t[101]);let he;t[102]!==k?(he=[{label:"Status",value:k,onChange:Ee,options:Ke}],t[102]=k,t[103]=he):he=t[103];let pe;t[104]!==i.handleSort||t[105]!==i.setViewMode||t[106]!==i.sortDirection||t[107]!==i.sortKey||t[108]!==i.viewMode||t[109]!==he?(pe=s.jsx(St,{viewMode:i.viewMode,onViewModeChange:i.setViewMode,sortKey:i.sortKey,sortDirection:i.sortDirection,onSort:i.handleSort,sortOptions:Re,filters:he}),t[104]=i.handleSort,t[105]=i.setViewMode,t[106]=i.sortDirection,t[107]=i.sortKey,t[108]=i.viewMode,t[109]=he,t[110]=pe):pe=t[110];let xe;t[111]!==qe||t[112]!==pe?(xe=s.jsxs(ve.Header.Right,{children:[pe,qe]}),t[111]=qe,t[112]=pe,t[113]=xe):xe=t[113],t[114]!==ue||t[115]!==xe?(b=s.jsxs(ve.Header,{children:[ue,xe]}),t[114]=ue,t[115]=xe,t[116]=b):b=t[116];let ge;t[117]!==i?(ge=h=>{h.key==="Escape"&&(i.setSearch(""),h.target.blur())},t[117]=i,t[118]=ge):ge=t[118],t[119]!==i.search||t[120]!==i.setSearch||t[121]!==ge?($=s.jsx("div",{className:"flex items-center gap-3 px-5 pb-0",children:s.jsx("div",{className:"flex-1",children:s.jsx(kt,{value:i.search,onChange:i.setSearch,placeholder:"Search for an agent...",onKeyDown:ge})})}),t[119]=i.search,t[120]=i.setSearch,t[121]=ge,t[122]=$):$=t[122],M=ve.Content,L=i.viewMode==="cards"?s.jsx("div",{className:"flex-1 overflow-auto p-5",children:B.length===0?s.jsx(Ze,{image:s.jsx(Y,{size:36,className:"text-muted-foreground"}),title:i.search?"No agents found":"No agents yet",description:i.search?`No agents match "${i.search}"`:"Create an agent to aggregate tools from multiple Connections."}):s.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:U.map(h=>{if(h.type==="group")return s.jsx(Xt,{group:h,onNavigate:ne,onDelete:be=>D({type:"delete",virtualMcp:be}),selectionMode:o,selectedIds:c,onToggleSelect:f},h.key);const v=h.agent;return s.jsxs("div",{className:"relative",children:[o&&s.jsx("div",{className:"absolute top-3 left-3 z-10",children:s.jsx(Ue,{checked:c.has(v.id),onCheckedChange:()=>f(v.id)})}),s.jsx(xt,{connection:{id:v.id??"",title:v.title,description:v.description,icon:v.icon,status:v.status},fallbackIcon:s.jsx(Y,{}),onClick:()=>ne(v.id),className:X(o&&c.has(v.id)&&"ring-2 ring-primary"),body:s.jsx(He,{status:v.status}),footer:s.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground w-full min-w-0",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Ce,{id:v.updated_by??v.created_by,size:"3xs"})}),s.jsx("span",{className:"shrink-0 ml-2",children:v.updated_at?ye(new Date(v.updated_at)):"—"})]}),headerActions:o?void 0:s.jsxs(tt,{children:[s.jsx(st,{asChild:!0,children:s.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:cs,children:s.jsx(it,{size:20})})}),s.jsxs(nt,{align:"end",onClick:os,children:[s.jsxs(je,{onClick:be=>{be.stopPropagation(),ne(v.id)},children:[s.jsx(lt,{size:16}),"Open"]}),!Ne(v.id)&&s.jsxs(je,{variant:"destructive",onClick:be=>{be.stopPropagation(),D({type:"delete",virtualMcp:v})},children:[s.jsx(Fe,{size:16}),"Delete"]})]})]})})]},v.id)})})}):s.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:s.jsx("div",{className:"flex-1 overflow-auto min-w-0",children:s.jsx("div",{className:"min-w-[1000px]",children:s.jsx(ns,{columns:bt,grouped:U,sortKey:i.sortKey,sortDirection:i.sortDirection,onSort:i.handleSort,onRowClick:h=>ne(h.id),selectionMode:o,selectedIds:c,onToggleSelect:f,emptyState:i.search?s.jsx(Ze,{image:s.jsx(Y,{size:36,className:"text-muted-foreground"}),title:"No agents found",description:`No agents match "${i.search}"`}):s.jsx(Ze,{image:s.jsx(Y,{size:36,className:"text-muted-foreground"}),title:"No agents yet",description:"Create an agent to aggregate tools from multiple Connections."})})})})}),t[7]=g,t[8]=z,t[9]=x,t[10]=m.mode,t[11]=m.virtualMcp,t[12]=N,t[13]=i,t[14]=n,t[15]=e.slug,t[16]=c,t[17]=o,t[18]=k,t[19]=a,t[20]=M,t[21]=T,t[22]=B,t[23]=$,t[24]=L,t[25]=r,t[26]=u,t[27]=b}else M=t[20],T=t[21],B=t[22],$=t[23],L=t[24],r=t[25],u=t[26],b=t[27];let K;t[123]!==M||t[124]!==L?(K=s.jsx(M,{children:L}),t[123]=M,t[124]=L,t[125]=K):K=t[125];let V;t[126]!==B||t[127]!==c.size||t[128]!==o?(V=o&&s.jsx(ss,{count:c.size,total:B.length,onSelectAll:()=>C(new Set(B.map(rs))),onDeselectAll:()=>C(new Set),onDelete:()=>P(!0),onCancel:p}),t[126]=B,t[127]=c.size,t[128]=o,t[129]=V):V=t[129];let G;return t[130]!==T||t[131]!==$||t[132]!==K||t[133]!==V||t[134]!==r||t[135]!==u||t[136]!==b?(G=s.jsxs(T,{children:[r,u,b,$,K,V]}),t[130]=T,t[131]=$,t[132]=K,t[133]=V,t[134]=r,t[135]=u,t[136]=b,t[137]=G):G=t[137],G}function rs(t){return t.id}function os(t){return t.stopPropagation()}function cs(t){return t.stopPropagation()}function ds(t){return t.stopPropagation()}function ms(t){return t.stopPropagation()}function fs(t){return s.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:t.updated_at?ye(new Date(t.updated_at)):"—"})}function us(t){return s.jsx(Ce,{id:t.updated_by??t.created_by,size:"3xs"})}function hs(t){return s.jsx(He,{status:t.status})}function ps(t){return s.jsx(J.Suspense,{fallback:s.jsx(ht.Fallback,{}),children:s.jsx(ht,{connectionIds:t.connections.map(xs),maxVisibleIcons:2})})}function xs(t){return t.connection_id}function gs(t){return s.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:t.description||"—"})}function js(t){return s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx(Ge,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:s.jsx(Y,{size:16})}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:t.title})]})}function bs(t){return t.stopPropagation()}function vs(t){return t.status==="inactive"}function Ns(t){return t.status==="active"}function Nn(){const t=we.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(vt,{children:s.jsx(J.Suspense,{fallback:s.jsx("div",{className:"flex h-full items-center justify-center",children:s.jsx(Jt,{size:32,className:"animate-spin text-muted-foreground"})}),children:s.jsx(as,{})})}),t[0]=e):e=t[0],e}export{Nn as default};
1
+ import{c as we,j as s,E as vt,r as J,u as Nt,b as Ct,B as Q,v as X,t as yt,O as wt}from"./index-zTmRWZBl.js";import{C as St}from"./collection-display-button-ByS_K4lH.js";import{C as kt,E as Ze}from"./collection-search-mO1HMauC.js";import{P as ve}from"./index-C3HPQ2Xr.js";import{B as _t,a as Dt,b as zt,c as At}from"./breadcrumb-oXffKFw_.js";import{C as xt}from"./connection-card-CqqNv-1c.js";import{C as He,i as Mt}from"./connection-status-DspYTx4l.js";import{I as Ge}from"./integration-icon-BKuXjqdm.js";import{u as Tt}from"./use-list-state-DiVFU-Ch.js";import{u as $t}from"./use-create-virtual-mcp-DN0LN6Ks.js";import{i as Ne}from"./constants-Bi0KgUSI.js";import{b as Pt,a as It}from"./use-virtual-mcp-BwZwR42s.js";import{c as at,b as rt,d as ot,A as ct,e as dt,h as mt,a as ft,f as ut}from"./alert-dialog-BF806470.js";import{B as et}from"./badge-DuzneqaM.js";import{C as Ue}from"./checkbox-DzpFguCb.js";import{c as Ot,d as Bt,b as Lt,a as Rt,D as Et}from"./dialog-qBZn-zYi.js";import{T as Kt,a as Vt,b as Ve,c as se,d as Gt,e as Ut}from"./table-JhNW7SQy.js";import{D as tt,a as st,b as nt,c as je}from"./dropdown-menu-DzUfzpVE.js";import{n as Ft}from"./ArrowDown-Brxajv-A.js";import{i as Ht}from"./ArrowUp-D5ZC-G9T.js";import{t as qt}from"./ChevronDown-cFwq8_1y.js";import{i as it}from"./DotsVertical-BWpyls9E.js";import{s as lt}from"./Eye-S2bOaZIy.js";import{i as Jt}from"./Loading01-e5vrz4Tg.js";import{s as Fe}from"./Trash01-GIxw_9KX.js";import{t as Y}from"./Users03-Ci_Q0Bm5.js";import{s as gt}from"./XClose-CPAcIRmr.js";import{U as Ce}from"./user-Cjj1cELF.js";import{A as ht}from"./agent-connections-preview-ChIn79lc.js";import{f as ye}from"./format-time-CMKyl-GC.js";import"./Check-xOBqZzmv.js";import"./Grid01-H33eVxTX.js";import"./List-DIViT3Rd.js";import"./tooltip-c2IY6Q1h.js";import"./index-DNc2lZPL.js";import"./SearchMd-3uDmzuN-.js";import"./input-yDn0CDzQ.js";import"./localstorage-keys-DyhMCgsK.js";import"./useQuery-C_yP5u2a.js";import"./useMutation-DxToDvqg.js";import"./ChevronRight-zkVqPrw5.js";import"./card-B9F3gzU1.js";import"./AlertCircle-B-qrtAf7.js";import"./CheckCircle-t4fWflCL.js";import"./Container-BzuFyXB-.js";import"./use-view-mode-D1a8tpCU.js";import"./use-mobile-Y1Ty5Ao9.js";import"./use-collections-BM5qbXh2.js";import"./X-D43RBdCi.js";import"./avatar-JlaJAGyz.js";import"./use-connection-D_z7DIgr.js";import"./differenceInSeconds-NQ4PDo0z.js";function pt(t){return t.title.trim().replace(/\s+\(\d+\)$/,"")}function Qt(t){const e=new Map;for(const i of t){const a=pt(i),l=e.get(a);l?l.push(i):e.set(a,[i])}const n=[],d=new Set;for(const i of t){const a=pt(i);if(d.has(a))continue;d.add(a);const l=e.get(a),x=l[0];l.length===1?n.push({type:"single",agent:x}):n.push({type:"group",key:a,icon:x.icon,title:x.title.replace(/\s*\(\d+\)\s*$/,""),agents:l})}return n}function jt(t){const e=new Set,n=[];for(const d of t)d.created_by&&!e.has(d.created_by)&&(e.add(d.created_by),n.push(d.created_by));return n}function Wt(t,e){switch(e.type){case"delete":return{mode:"deleting",virtualMcp:e.virtualMcp};case"close":return{mode:"idle"}}}function Xt(t){const e=we.c(107),{group:n,onNavigate:d,onDelete:i,selectionMode:a,selectedIds:l,onToggleSelect:x}=t,[N,g]=J.useState(!1);let w;if(e[0]!==n.agents||e[1]!==l){let y;e[3]!==l?(y=_=>l.has(_.id),e[3]=l,e[4]=y):y=e[4],w=n.agents.every(y),e[0]=n.agents,e[1]=l,e[2]=w}else w=e[2];const m=w;let D;if(e[5]!==n.agents||e[6]!==l){let y;e[8]!==l?(y=_=>l.has(_.id),e[8]=l,e[9]=y):y=e[9],D=n.agents.some(y),e[5]=n.agents,e[6]=l,e[7]=D}else D=e[7];const o=D;let O,S,c,C,z,P,k,I,A,f,j;if(e[10]!==m||e[11]!==n.agents||e[12]!==n.icon||e[13]!==n.title||e[14]!==x||e[15]!==l||e[16]!==a||e[17]!==o){const y=jt(n.agents),_=n.agents.reduce(ts,n.agents[0]),W=_.updated_at??_.created_at;O=xt;const Z=`${n.agents.length} instances`;e[29]!==n.icon||e[30]!==n.title||e[31]!==Z?(A={title:n.title,icon:n.icon,description:Z},e[29]=n.icon,e[30]=n.title,e[31]=Z,e[32]=A):A=e[32],e[33]!==m||e[34]!==n.agents||e[35]!==x||e[36]!==l||e[37]!==a?(f=()=>a?(()=>{for(const R of n.agents)m?l.has(R.id)&&x(R.id):l.has(R.id)||x(R.id)})():g(!0),e[33]=m,e[34]=n.agents,e[35]=x,e[36]=l,e[37]=a,e[38]=f):f=e[38];const H=a&&m&&"ring-2 ring-primary",ee=a&&o&&!m&&"ring-1 ring-primary/50";e[39]!==H||e[40]!==ee?(j=X(H,ee),e[39]=H,e[40]=ee,e[41]=j):j=e[41],e[42]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(Y,{}),e[42]=S):S=e[42],e[43]!==m||e[44]!==n.agents||e[45]!==x||e[46]!==l||e[47]!==a||e[48]!==o?(c=a?s.jsx(Ue,{checked:m?!0:o?"indeterminate":!1,onCheckedChange:()=>{for(const R of n.agents)m?l.has(R.id)&&x(R.id):l.has(R.id)||x(R.id)}}):s.jsxs(et,{variant:"secondary",className:"text-xs tabular-nums",children:["x",n.agents.length]}),e[43]=m,e[44]=n.agents,e[45]=x,e[46]=l,e[47]=a,e[48]=o,e[49]=c):c=e[49];let q;e[50]!==n.agents?(q=n.agents.slice(0,6).map(es),e[50]=n.agents,e[51]=q):q=e[51],e[52]!==q?(C=s.jsx("div",{className:"flex items-center gap-1",children:q}),e[52]=q,e[53]=C):C=e[53],k="flex items-center justify-between text-xs text-muted-foreground w-full min-w-0";const te=y.map(R=>s.jsx(Ce,{id:R,size:"3xs",avatarOnly:y.length>1},R));e[54]!==te?(I=s.jsx("div",{className:"flex items-center -space-x-1.5",children:te}),e[54]=te,e[55]=I):I=e[55],z="shrink-0 ml-2",P=W?ye(new Date(W)):"—",e[10]=m,e[11]=n.agents,e[12]=n.icon,e[13]=n.title,e[14]=x,e[15]=l,e[16]=a,e[17]=o,e[18]=O,e[19]=S,e[20]=c,e[21]=C,e[22]=z,e[23]=P,e[24]=k,e[25]=I,e[26]=A,e[27]=f,e[28]=j}else O=e[18],S=e[19],c=e[20],C=e[21],z=e[22],P=e[23],k=e[24],I=e[25],A=e[26],f=e[27],j=e[28];let p;e[56]!==z||e[57]!==P?(p=s.jsx("span",{className:z,children:P}),e[56]=z,e[57]=P,e[58]=p):p=e[58];let M;e[59]!==p||e[60]!==k||e[61]!==I?(M=s.jsxs("div",{className:k,children:[I,p]}),e[59]=p,e[60]=k,e[61]=I,e[62]=M):M=e[62];let T;e[63]!==O||e[64]!==S||e[65]!==c||e[66]!==C||e[67]!==M||e[68]!==A||e[69]!==f||e[70]!==j?(T=s.jsx(O,{connection:A,onClick:f,className:j,fallbackIcon:S,headerActions:c,body:C,footer:M}),e[63]=O,e[64]=S,e[65]=c,e[66]=C,e[67]=M,e[68]=A,e[69]=f,e[70]=j,e[71]=T):T=e[71];let B;e[72]===Symbol.for("react.memo_cache_sentinel")?(B=s.jsx(Y,{}),e[72]=B):B=e[72];let $;e[73]!==n.icon||e[74]!==n.title?($=s.jsx(Ge,{icon:n.icon,name:n.title,size:"md",className:"shrink-0 shadow-sm",fallbackIcon:B}),e[73]=n.icon,e[74]=n.title,e[75]=$):$=e[75];let L;e[76]!==n.agents.length?(L=s.jsxs(et,{variant:"secondary",className:"ml-2 text-xs tabular-nums",children:["x",n.agents.length]}),e[76]=n.agents.length,e[77]=L):L=e[77];let r;e[78]!==n.title||e[79]!==L?(r=s.jsxs(Ot,{children:[n.title,L]}),e[78]=n.title,e[79]=L,e[80]=r):r=e[80];let u;e[81]!==n.agents.length?(u=s.jsxs(Bt,{children:[n.agents.length," instances"]}),e[81]=n.agents.length,e[82]=u):u=e[82];let b;e[83]!==r||e[84]!==u?(b=s.jsxs("div",{children:[r,u]}),e[83]=r,e[84]=u,e[85]=b):b=e[85];let K;e[86]!==$||e[87]!==b?(K=s.jsx(Lt,{className:"px-6 pt-6 pb-4",children:s.jsxs("div",{className:"flex items-center gap-3",children:[$,b]})}),e[86]=$,e[87]=b,e[88]=K):K=e[88];let V;if(e[89]!==n.agents||e[90]!==i||e[91]!==d){let y;e[93]!==i||e[94]!==d?(y=_=>s.jsxs("div",{className:"flex items-center gap-3 px-6 py-3 hover:bg-muted/30 cursor-pointer transition-colors",onClick:()=>{g(!1),d(_.id)},children:[s.jsx(Ge,{icon:_.icon,name:_.title,size:"sm",className:"shrink-0",fallbackIcon:s.jsx(Y,{})}),s.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:_.title}),s.jsx(He,{status:_.status})]}),s.jsxs("div",{className:"flex items-center gap-3 text-xs text-muted-foreground shrink-0",children:[s.jsx(Ce,{id:_.created_by,size:"3xs"}),s.jsx("span",{children:_.created_at?ye(new Date(_.created_at)):"—"})]}),s.jsxs(tt,{children:[s.jsx(st,{asChild:!0,children:s.jsx(Q,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:Zt,children:s.jsx(it,{size:16})})}),s.jsxs(nt,{align:"end",onClick:Yt,children:[s.jsxs(je,{onClick:()=>{g(!1),d(_.id)},children:[s.jsx(lt,{size:16}),"Open"]}),!Ne(_.id)&&s.jsxs(je,{variant:"destructive",onClick:()=>i(_),children:[s.jsx(Fe,{size:16}),"Delete"]})]})]})]},_.id),e[93]=i,e[94]=d,e[95]=y):y=e[95],V=n.agents.map(y),e[89]=n.agents,e[90]=i,e[91]=d,e[92]=V}else V=e[92];let G;e[96]!==V?(G=s.jsx("div",{className:"divide-y max-h-80 overflow-auto",children:V}),e[96]=V,e[97]=G):G=e[97];let E;e[98]!==K||e[99]!==G?(E=s.jsxs(Rt,{className:"sm:max-w-lg p-0 gap-0",children:[K,G]}),e[98]=K,e[99]=G,e[100]=E):E=e[100];let U;e[101]!==N||e[102]!==E?(U=s.jsx(Et,{open:N,onOpenChange:g,children:E}),e[101]=N,e[102]=E,e[103]=U):U=e[103];let F;return e[104]!==T||e[105]!==U?(F=s.jsxs(s.Fragment,{children:[T,U]}),e[104]=T,e[105]=U,e[106]=F):F=e[106],F}function Yt(t){return t.stopPropagation()}function Zt(t){return t.stopPropagation()}function es(t){return s.jsx(He,{status:t.status},t.id)}function ts(t,e){const n=e.updated_at??e.created_at,d=t.updated_at??t.created_at;return n?d?new Date(n)>new Date(d)?e:t:e:t}function ss(t){const e=we.c(21),{count:n,total:d,onSelectAll:i,onDeselectAll:a,onDelete:l,onCancel:x}=t;if(n===0)return null;let N;e[0]!==n?(N=s.jsxs("span",{className:"text-sm font-medium tabular-nums",children:[n," selected"]}),e[0]=n,e[1]=N):N=e[1];let g;e[2]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx("div",{className:"h-4 w-px bg-border"}),e[2]=g):g=e[2];let w;e[3]!==n||e[4]!==a||e[5]!==i||e[6]!==d?(w=n<d?s.jsxs(Q,{variant:"ghost",size:"sm",onClick:i,children:["Select all (",d,")"]}):s.jsx(Q,{variant:"ghost",size:"sm",onClick:a,children:"Clear selection"}),e[3]=n,e[4]=a,e[5]=i,e[6]=d,e[7]=w):w=e[7];let m;e[8]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"h-4 w-px bg-border"}),e[8]=m):m=e[8];let D;e[9]===Symbol.for("react.memo_cache_sentinel")?(D=s.jsx(Fe,{size:14}),e[9]=D):D=e[9];let o;e[10]!==l?(o=s.jsxs(Q,{variant:"ghost",size:"sm",className:"text-destructive hover:text-destructive",onClick:l,children:[D,"Delete"]}),e[10]=l,e[11]=o):o=e[11];let O;e[12]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx("div",{className:"h-4 w-px bg-border"}),e[12]=O):O=e[12];let S;e[13]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx(gt,{size:14}),e[13]=S):S=e[13];let c;e[14]!==x?(c=s.jsxs(Q,{variant:"ghost",size:"sm",onClick:x,children:[S,"Cancel"]}),e[14]=x,e[15]=c):c=e[15];let C;return e[16]!==N||e[17]!==w||e[18]!==o||e[19]!==c?(C=s.jsxs("div",{className:"fixed bottom-4 left-1/2 z-50 -translate-x-1/2 flex items-center gap-3 rounded-xl border border-border bg-background/95 backdrop-blur px-4 py-2.5 shadow-lg",children:[N,g,w,m,o,O,c]}),e[16]=N,e[17]=w,e[18]=o,e[19]=c,e[20]=C):C=e[20],C}function ns(t){const e=we.c(37),{columns:n,grouped:d,sortKey:i,sortDirection:a,onSort:l,onRowClick:x,selectionMode:N,selectedIds:g,onToggleSelect:w,emptyState:m}=t;let D;e[0]===Symbol.for("react.memo_cache_sentinel")?(D=new Set,e[0]=D):D=e[0];const[o,O]=J.useState(D);let S;e[1]===Symbol.for("react.memo_cache_sentinel")?(S=f=>{O(j=>{const p=new Set(j);return p.has(f)?p.delete(f):p.add(f),p})},e[1]=S):S=e[1];const c=S;if(d.length===0&&m){let f;return e[2]!==m?(f=s.jsx("div",{className:"flex items-center justify-center h-full",children:m}),e[2]=m,e[3]=f):f=e[3],f}const C=n.length;let z;if(e[4]!==C||e[5]!==n||e[6]!==l||e[7]!==a||e[8]!==i){let f;e[10]!==C||e[11]!==l||e[12]!==a||e[13]!==i?(f=(j,p)=>{const M=i===j.id,T=p===C-1;return s.jsx(Kt,{className:X("px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider",T&&"w-8","group transition-colors select-none",j.sortable&&"hover:bg-accent cursor-pointer",j.cellClassName),onClick:j.sortable&&l?()=>l(j.id):void 0,children:s.jsxs("span",{className:"flex items-center gap-1",children:[j.header,j.sortable&&s.jsx("span",{className:"w-4 flex items-center justify-center",children:M&&a&&(a==="asc"?s.jsx(Ht,{size:16,className:"text-muted-foreground"}):s.jsx(Ft,{size:16,className:"text-muted-foreground"}))})]})},j.id)},e[10]=C,e[11]=l,e[12]=a,e[13]=i,e[14]=f):f=e[14],z=n.map(f),e[4]=C,e[5]=n,e[6]=l,e[7]=a,e[8]=i,e[9]=z}else z=e[9];let P;e[15]!==z?(P=s.jsx(Vt,{className:"border-b-0",children:s.jsx(Ve,{className:"h-9 hover:bg-transparent border-b border-border",children:z})}),e[15]=z,e[16]=P):P=e[16];let k;if(e[17]!==n||e[18]!==o||e[19]!==d||e[20]!==x||e[21]!==w||e[22]!==g||e[23]!==N){let f;e[25]!==n||e[26]!==o||e[27]!==x||e[28]!==w||e[29]!==g||e[30]!==N?(f=j=>{if(j.type==="single"){const r=j.agent;return s.jsx(Ve,{className:X("group/data-row transition-colors border-b-0 hover:bg-accent/50 cursor-pointer",N&&g.has(r.id)&&"bg-primary/5"),onClick:()=>x(r),children:n.map(u=>s.jsx(se,{className:X("px-5 py-4 h-16 align-middle text-sm text-foreground",u.cellClassName),children:s.jsx("div",{className:"min-w-0 w-full truncate overflow-hidden whitespace-nowrap",children:u.render?u.render(r):null})},u.id))},r.id)}const p=j,M=o.has(p.key),T=p.agents.every(r=>g.has(r.id)),B=p.agents.some(r=>g.has(r.id)),$=jt(p.agents),L=p.agents.reduce(ls,p.agents[0]);return s.jsxs(J.Fragment,{children:[s.jsx(Ve,{className:"border-b-0 hover:bg-accent/50 cursor-pointer transition-colors",onClick:()=>c(p.key),children:n.map(r=>{const u=X("px-5 py-3 h-14 align-middle text-sm",r.cellClassName);if(r.id==="select")return s.jsx(se,{className:u,children:s.jsx(Ue,{checked:T?!0:B?"indeterminate":!1,onCheckedChange:()=>{for(const b of p.agents)T?g.has(b.id)&&w(b.id):g.has(b.id)||w(b.id)},onClick:is})},r.id);if(r.id==="title")return s.jsx(se,{className:u,children:s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx(Ge,{icon:p.icon,name:p.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:s.jsx(Y,{size:16})}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:p.title}),s.jsxs(et,{variant:"secondary",className:"text-xs tabular-nums",children:["x",p.agents.length]})]})},r.id);if(r.id==="updated_by")return s.jsx(se,{className:u,children:s.jsx("div",{className:"flex items-center -space-x-1.5",children:$.map(b=>s.jsx(Ce,{id:b,size:"3xs",avatarOnly:$.length>1},b))})},r.id);if(r.id==="updated_at"){const b=L.updated_at??L.created_at;return s.jsx(se,{className:u,children:s.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:b?ye(new Date(b)):"—"})},r.id)}return r.id==="actions"?s.jsx(se,{className:u,children:s.jsx(qt,{size:16,className:X("text-muted-foreground transition-transform",M&&"rotate-180")})},r.id):s.jsx(se,{className:u},r.id)})}),M&&p.agents.map(r=>s.jsx(Ve,{className:X("group/data-row transition-colors border-b-0 hover:bg-accent/50 cursor-pointer bg-muted/20",N&&g.has(r.id)&&"bg-primary/5"),onClick:()=>x(r),children:n.map(u=>s.jsx(se,{className:X("px-5 py-3 h-14 align-middle text-sm text-foreground",u.cellClassName,u.id==="title"&&"pl-12"),children:s.jsx("div",{className:"min-w-0 w-full truncate overflow-hidden whitespace-nowrap",children:u.render?u.render(r):null})},u.id))},r.id))]},p.key)},e[25]=n,e[26]=o,e[27]=x,e[28]=w,e[29]=g,e[30]=N,e[31]=f):f=e[31],k=d.map(f),e[17]=n,e[18]=o,e[19]=d,e[20]=x,e[21]=w,e[22]=g,e[23]=N,e[24]=k}else k=e[24];let I;e[32]!==k?(I=s.jsx(Gt,{children:k}),e[32]=k,e[33]=I):I=e[33];let A;return e[34]!==P||e[35]!==I?(A=s.jsx("div",{className:"flex-1 overflow-auto",children:s.jsxs(Ut,{className:"w-full border-collapse",children:[P,I]})}),e[34]=P,e[35]=I,e[36]=A):A=e[36],A}function is(t){return t.stopPropagation()}function ls(t,e){const n=e.updated_at??e.created_at,d=t.updated_at??t.created_at;return n?d?new Date(n)>new Date(d)?e:t:e:t}function as(){const t=we.c(138),{org:e}=Nt(),n=Ct();let d;t[0]!==e.slug?(d={namespace:e.slug,resource:"agents"},t[0]=e.slug,t[1]=d):d=t[1];const i=Tt(d),a=Pt(i);let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l={navigateOnCreate:!0},t[2]=l):l=t[2];const{createVirtualMCP:x,isCreating:N}=$t(l),g=It();let w;t[3]===Symbol.for("react.memo_cache_sentinel")?(w={mode:"idle"},t[3]=w):w=t[3];const[m,D]=J.useReducer(Wt,w),[o,O]=J.useState(!1);let S;t[4]===Symbol.for("react.memo_cache_sentinel")?(S=new Set,t[4]=S):S=t[4];const[c,C]=J.useState(S),[z,P]=J.useState(!1),[k,I]=J.useState("ALL");let A;t[5]===Symbol.for("react.memo_cache_sentinel")?(A=E=>{C(U=>{const F=new Set(U);return F.has(E)?F.delete(E):F.add(E),F})},t[5]=A):A=t[5];const f=A;let j;t[6]===Symbol.for("react.memo_cache_sentinel")?(j=()=>{O(!1),C(new Set)},t[6]=j):j=t[6];const p=j;let M,T,B,$,L,r,u,b;if(t[7]!==g||t[8]!==z||t[9]!==x||t[10]!==m.mode||t[11]!==m.virtualMcp||t[12]!==N||t[13]!==i||t[14]!==n||t[15]!==e.slug||t[16]!==c||t[17]!==o||t[18]!==k||t[19]!==a){let E;t[28]!==k?(E=h=>!(k!=="ALL"&&h.status!==k),t[28]=k,t[29]=E):E=t[29],B=a.filter(E);const U=Qt(B),F=a.length;let y;t[30]!==a?(y=a.filter(Ns),t[30]=a,t[31]=y):y=t[31];const _=y.length;let W;t[32]!==a?(W=a.filter(vs),t[32]=a,t[33]=W):W=t[33];let Z;t[34]!==y.length||t[35]!==W.length||t[36]!==a.length?(Z={total:F,active:_,inactive:W.length},t[34]=y.length,t[35]=W.length,t[36]=a.length,t[37]=Z):Z=t[37];const H=Z;let ee;t[38]!==g||t[39]!==m.mode||t[40]!==m.virtualMcp?(ee=async()=>{if(m.mode!=="deleting")return;const h=m.virtualMcp.id;if(D({type:"close"}),!(!h||Ne(h)))try{await g.delete.mutateAsync(h)}catch{}},t[38]=g,t[39]=m.mode,t[40]=m.virtualMcp,t[41]=ee):ee=t[41];const q=ee;let te;t[42]!==g||t[43]!==c?(te=async()=>{P(!1);let h=0;for(const v of c)if(!Ne(v))try{await g.delete.mutateAsync(v),h++}catch{}yt.success(`Deleted ${h} agent${h!==1?"s":""}`),p()},t[42]=g,t[43]=c,t[44]=te):te=t[44];const R=te;let Se;t[45]!==n||t[46]!==e.slug||t[47]!==o?(Se=h=>{if(o){f(h);return}n({to:"/$org/$project/agents/$agentId",params:{org:e.slug,project:wt,agentId:h}})},t[45]=n,t[46]=e.slug,t[47]=o,t[48]=Se):Se=t[48];const ne=Se;let ie;t[49]!==c||t[50]!==o?(ie=o?[{id:"select",header:"",render:h=>s.jsx(Ue,{checked:c.has(h.id),onCheckedChange:()=>f(h.id),onClick:bs}),cellClassName:"w-10 shrink-0"}]:[],t[49]=c,t[50]=o,t[51]=ie):ie=t[51];let ke,_e,De,ze,Ae,Me;t[52]===Symbol.for("react.memo_cache_sentinel")?(ke={id:"title",header:"Name",render:js,cellClassName:"w-48 min-w-0 shrink-0",sortable:!0},_e={id:"description",header:"Description",render:gs,cellClassName:"flex-1 min-w-0",wrap:!0,sortable:!0},De={id:"connections",header:"Connections",render:ps,cellClassName:"w-28 shrink-0"},ze={id:"status",header:"Status",render:hs,cellClassName:"w-24 shrink-0"},Ae={id:"updated_by",header:"Updated by",render:us,cellClassName:"w-32 shrink-0",sortable:!0},Me={id:"updated_at",header:"Updated",render:fs,cellClassName:"max-w-24 w-24 shrink-0",sortable:!0},t[52]=ke,t[53]=_e,t[54]=De,t[55]=ze,t[56]=Ae,t[57]=Me):(ke=t[52],_e=t[53],De=t[54],ze=t[55],Ae=t[56],Me=t[57]);let le;t[58]!==ne?(le={id:"actions",header:"",render:h=>s.jsxs(tt,{children:[s.jsx(st,{asChild:!0,children:s.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:ms,children:s.jsx(it,{size:20})})}),s.jsxs(nt,{align:"end",onClick:ds,children:[s.jsxs(je,{onClick:v=>{v.stopPropagation(),ne(h.id)},children:[s.jsx(lt,{size:16}),"Open"]}),!Ne(h.id)&&s.jsxs(je,{variant:"destructive",onClick:v=>{v.stopPropagation(),D({type:"delete",virtualMcp:h})},children:[s.jsx(Fe,{size:16}),"Delete"]})]})]}),cellClassName:"w-12 shrink-0"},t[58]=ne,t[59]=le):le=t[59];let Te;t[60]!==ie||t[61]!==le?(Te=[...ie,ke,_e,De,ze,Ae,Me,le],t[60]=ie,t[61]=le,t[62]=Te):Te=t[62];const bt=Te;let $e;t[63]!==x||t[64]!==N||t[65]!==o?($e=s.jsx("div",{className:"flex items-center gap-2",children:o?s.jsxs(Q,{variant:"ghost",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",onClick:p,children:[s.jsx(gt,{size:14}),"Cancel"]}):s.jsxs(s.Fragment,{children:[s.jsxs(Q,{variant:"outline",size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",onClick:()=>O(!0),children:[s.jsx(Mt,{size:14}),"Select"]}),s.jsx(Q,{onClick:x,size:"sm",className:"h-7 px-3 rounded-lg text-sm font-medium",disabled:N,children:N?"Creating...":"Create Agent"})]})}),t[63]=x,t[64]=N,t[65]=o,t[66]=$e):$e=t[66];const qe=$e;T=ve;const Je=m.mode==="deleting";let Pe;t[67]===Symbol.for("react.memo_cache_sentinel")?(Pe=h=>!h&&D({type:"close"}),t[67]=Pe):Pe=t[67];let Ie;t[68]===Symbol.for("react.memo_cache_sentinel")?(Ie=s.jsx(at,{children:"Delete Agent?"}),t[68]=Ie):Ie=t[68];const Qe=m.mode==="deleting"&&m.virtualMcp.title;let ae;t[69]!==Qe?(ae=s.jsxs(rt,{children:[Ie,s.jsxs(ot,{children:["This action cannot be undone. This will permanently delete"," ",s.jsx("span",{className:"font-medium text-foreground",children:Qe}),"."]})]}),t[69]=Qe,t[70]=ae):ae=t[70];let Oe;t[71]===Symbol.for("react.memo_cache_sentinel")?(Oe=s.jsx(ct,{children:"Cancel"}),t[71]=Oe):Oe=t[71];let re;t[72]!==q?(re=s.jsxs(dt,{children:[Oe,s.jsx(mt,{onClick:q,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[72]=q,t[73]=re):re=t[73];let oe;t[74]!==ae||t[75]!==re?(oe=s.jsxs(ft,{children:[ae,re]}),t[74]=ae,t[75]=re,t[76]=oe):oe=t[76],t[77]!==Je||t[78]!==oe?(r=s.jsx(ut,{open:Je,onOpenChange:Pe,children:oe}),t[77]=Je,t[78]=oe,t[79]=r):r=t[79];const We=c.size!==1?"s":"";let ce;t[80]!==c.size||t[81]!==We?(ce=s.jsxs(at,{children:["Delete ",c.size," agent",We,"?"]}),t[80]=c.size,t[81]=We,t[82]=ce):ce=t[82];let Be;t[83]===Symbol.for("react.memo_cache_sentinel")?(Be=s.jsx(ot,{children:"This action cannot be undone. This will permanently delete the selected agents."}),t[83]=Be):Be=t[83];let de;t[84]!==ce?(de=s.jsxs(rt,{children:[ce,Be]}),t[84]=ce,t[85]=de):de=t[85];let Le;t[86]===Symbol.for("react.memo_cache_sentinel")?(Le=s.jsx(ct,{children:"Cancel"}),t[86]=Le):Le=t[86];let me;t[87]!==R?(me=s.jsxs(dt,{children:[Le,s.jsx(mt,{onClick:R,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:"Delete"})]}),t[87]=R,t[88]=me):me=t[88];let fe;t[89]!==de||t[90]!==me?(fe=s.jsxs(ft,{children:[de,me]}),t[89]=de,t[90]=me,t[91]=fe):fe=t[91],t[92]!==z||t[93]!==fe?(u=s.jsx(ut,{open:z,onOpenChange:P,children:fe}),t[92]=z,t[93]=fe,t[94]=u):u=t[94];const Xe=H.active>0&&` · ${H.active} active`,Ye=H.inactive>0&&` · ${H.inactive} inactive`;let ue;t[95]!==H.total||t[96]!==Xe||t[97]!==Ye?(ue=s.jsx(ve.Header.Left,{children:s.jsx(_t,{children:s.jsx(Dt,{children:s.jsx(zt,{children:s.jsxs(At,{className:"flex items-center gap-2",children:["Agents",s.jsxs("span",{className:"text-xs font-normal text-muted-foreground tabular-nums",children:[H.total," total",Xe,Ye]})]})})})})}),t[95]=H.total,t[96]=Xe,t[97]=Ye,t[98]=ue):ue=t[98];let Re;t[99]===Symbol.for("react.memo_cache_sentinel")?(Re=[{id:"title",label:"Name"},{id:"description",label:"Description"},{id:"updated_by",label:"Updated by"},{id:"updated_at",label:"Updated"}],t[99]=Re):Re=t[99];let Ee,Ke;t[100]===Symbol.for("react.memo_cache_sentinel")?(Ee=h=>I(h||"ALL"),Ke=[{id:"ALL",label:"All"},{id:"active",label:"Active"},{id:"inactive",label:"Inactive"}],t[100]=Ee,t[101]=Ke):(Ee=t[100],Ke=t[101]);let he;t[102]!==k?(he=[{label:"Status",value:k,onChange:Ee,options:Ke}],t[102]=k,t[103]=he):he=t[103];let pe;t[104]!==i.handleSort||t[105]!==i.setViewMode||t[106]!==i.sortDirection||t[107]!==i.sortKey||t[108]!==i.viewMode||t[109]!==he?(pe=s.jsx(St,{viewMode:i.viewMode,onViewModeChange:i.setViewMode,sortKey:i.sortKey,sortDirection:i.sortDirection,onSort:i.handleSort,sortOptions:Re,filters:he}),t[104]=i.handleSort,t[105]=i.setViewMode,t[106]=i.sortDirection,t[107]=i.sortKey,t[108]=i.viewMode,t[109]=he,t[110]=pe):pe=t[110];let xe;t[111]!==qe||t[112]!==pe?(xe=s.jsxs(ve.Header.Right,{children:[pe,qe]}),t[111]=qe,t[112]=pe,t[113]=xe):xe=t[113],t[114]!==ue||t[115]!==xe?(b=s.jsxs(ve.Header,{children:[ue,xe]}),t[114]=ue,t[115]=xe,t[116]=b):b=t[116];let ge;t[117]!==i?(ge=h=>{h.key==="Escape"&&(i.setSearch(""),h.target.blur())},t[117]=i,t[118]=ge):ge=t[118],t[119]!==i.search||t[120]!==i.setSearch||t[121]!==ge?($=s.jsx("div",{className:"flex items-center gap-3 px-5 pb-0",children:s.jsx("div",{className:"flex-1",children:s.jsx(kt,{value:i.search,onChange:i.setSearch,placeholder:"Search for an agent...",onKeyDown:ge})})}),t[119]=i.search,t[120]=i.setSearch,t[121]=ge,t[122]=$):$=t[122],M=ve.Content,L=i.viewMode==="cards"?s.jsx("div",{className:"flex-1 overflow-auto p-5",children:B.length===0?s.jsx(Ze,{image:s.jsx(Y,{size:36,className:"text-muted-foreground"}),title:i.search?"No agents found":"No agents yet",description:i.search?`No agents match "${i.search}"`:"Create an agent to aggregate tools from multiple Connections."}):s.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:U.map(h=>{if(h.type==="group")return s.jsx(Xt,{group:h,onNavigate:ne,onDelete:be=>D({type:"delete",virtualMcp:be}),selectionMode:o,selectedIds:c,onToggleSelect:f},h.key);const v=h.agent;return s.jsxs("div",{className:"relative",children:[o&&s.jsx("div",{className:"absolute top-3 left-3 z-10",children:s.jsx(Ue,{checked:c.has(v.id),onCheckedChange:()=>f(v.id)})}),s.jsx(xt,{connection:{id:v.id??"",title:v.title,description:v.description,icon:v.icon,status:v.status},fallbackIcon:s.jsx(Y,{}),onClick:()=>ne(v.id),className:X(o&&c.has(v.id)&&"ring-2 ring-primary"),body:s.jsx(He,{status:v.status}),footer:s.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground w-full min-w-0",children:[s.jsx("div",{className:"flex-1 min-w-0",children:s.jsx(Ce,{id:v.updated_by??v.created_by,size:"3xs"})}),s.jsx("span",{className:"shrink-0 ml-2",children:v.updated_at?ye(new Date(v.updated_at)):"—"})]}),headerActions:o?void 0:s.jsxs(tt,{children:[s.jsx(st,{asChild:!0,children:s.jsx(Q,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:cs,children:s.jsx(it,{size:20})})}),s.jsxs(nt,{align:"end",onClick:os,children:[s.jsxs(je,{onClick:be=>{be.stopPropagation(),ne(v.id)},children:[s.jsx(lt,{size:16}),"Open"]}),!Ne(v.id)&&s.jsxs(je,{variant:"destructive",onClick:be=>{be.stopPropagation(),D({type:"delete",virtualMcp:v})},children:[s.jsx(Fe,{size:16}),"Delete"]})]})]})})]},v.id)})})}):s.jsx("div",{className:"h-full flex flex-col overflow-hidden",children:s.jsx("div",{className:"flex-1 overflow-auto min-w-0",children:s.jsx("div",{className:"min-w-[1000px]",children:s.jsx(ns,{columns:bt,grouped:U,sortKey:i.sortKey,sortDirection:i.sortDirection,onSort:i.handleSort,onRowClick:h=>ne(h.id),selectionMode:o,selectedIds:c,onToggleSelect:f,emptyState:i.search?s.jsx(Ze,{image:s.jsx(Y,{size:36,className:"text-muted-foreground"}),title:"No agents found",description:`No agents match "${i.search}"`}):s.jsx(Ze,{image:s.jsx(Y,{size:36,className:"text-muted-foreground"}),title:"No agents yet",description:"Create an agent to aggregate tools from multiple Connections."})})})})}),t[7]=g,t[8]=z,t[9]=x,t[10]=m.mode,t[11]=m.virtualMcp,t[12]=N,t[13]=i,t[14]=n,t[15]=e.slug,t[16]=c,t[17]=o,t[18]=k,t[19]=a,t[20]=M,t[21]=T,t[22]=B,t[23]=$,t[24]=L,t[25]=r,t[26]=u,t[27]=b}else M=t[20],T=t[21],B=t[22],$=t[23],L=t[24],r=t[25],u=t[26],b=t[27];let K;t[123]!==M||t[124]!==L?(K=s.jsx(M,{children:L}),t[123]=M,t[124]=L,t[125]=K):K=t[125];let V;t[126]!==B||t[127]!==c.size||t[128]!==o?(V=o&&s.jsx(ss,{count:c.size,total:B.length,onSelectAll:()=>C(new Set(B.map(rs))),onDeselectAll:()=>C(new Set),onDelete:()=>P(!0),onCancel:p}),t[126]=B,t[127]=c.size,t[128]=o,t[129]=V):V=t[129];let G;return t[130]!==T||t[131]!==$||t[132]!==K||t[133]!==V||t[134]!==r||t[135]!==u||t[136]!==b?(G=s.jsxs(T,{children:[r,u,b,$,K,V]}),t[130]=T,t[131]=$,t[132]=K,t[133]=V,t[134]=r,t[135]=u,t[136]=b,t[137]=G):G=t[137],G}function rs(t){return t.id}function os(t){return t.stopPropagation()}function cs(t){return t.stopPropagation()}function ds(t){return t.stopPropagation()}function ms(t){return t.stopPropagation()}function fs(t){return s.jsx("span",{className:"text-xs text-muted-foreground whitespace-nowrap",children:t.updated_at?ye(new Date(t.updated_at)):"—"})}function us(t){return s.jsx(Ce,{id:t.updated_by??t.created_by,size:"3xs"})}function hs(t){return s.jsx(He,{status:t.status})}function ps(t){return s.jsx(J.Suspense,{fallback:s.jsx(ht.Fallback,{}),children:s.jsx(ht,{connectionIds:t.connections.map(xs),maxVisibleIcons:2})})}function xs(t){return t.connection_id}function gs(t){return s.jsx("span",{className:"text-sm text-foreground line-clamp-2",children:t.description||"—"})}function js(t){return s.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[s.jsx(Ge,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:s.jsx(Y,{size:16})}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:t.title})]})}function bs(t){return t.stopPropagation()}function vs(t){return t.status==="inactive"}function Ns(t){return t.status==="active"}function Nn(){const t=we.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx(vt,{children:s.jsx(J.Suspense,{fallback:s.jsx("div",{className:"flex h-full items-center justify-center",children:s.jsx(Jt,{size:32,className:"animate-spin text-muted-foreground"})}),children:s.jsx(as,{})})}),t[0]=e):e=t[0],e}export{Nn as default};
@@ -1,4 +1,4 @@
1
- import{j as r,ab as w,r as n,M as m,b6 as O,ac as M,T as I,ad as z,ae as F,ah as A,b7 as v,af as L,a$ as G,X as k,ai as H,ag as V,c as i,v as p,b8 as D}from"./index-D-htvwK7.js";var x="AlertDialog",[W]=k(x,[v]),d=v(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(w,{...a,...t,modal:!0})};N.displayName=x;var Y="AlertDialogTrigger",y=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(H,{...o,...a,ref:e})});y.displayName=Y;var q="AlertDialogPortal",j=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(L,{...a,...t})};j.displayName=q;var B="AlertDialogOverlay",_=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(V,{...o,...a,ref:e})});_.displayName=B;var g="AlertDialogContent",[X,J]=W(g),K=G("AlertDialogContent"),b=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,s=d(t),c=n.useRef(null),P=m(e,c),u=n.useRef(null);return r.jsx(O,{contentName:g,titleName:h,docsSlug:"alert-dialog",children:r.jsx(X,{scope:t,cancelRef:u,children:r.jsxs(M,{role:"alertdialog",...s,...o,ref:P,onOpenAutoFocus:I(o.onOpenAutoFocus,f=>{f.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:f=>f.preventDefault(),onInteractOutside:f=>f.preventDefault(),children:[r.jsx(K,{children:a}),r.jsx(U,{contentRef:c})]})})})});b.displayName=g;var h="AlertDialogTitle",$=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(z,{...o,...a,ref:e})});$.displayName=h;var E="AlertDialogDescription",R=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(F,{...o,...a,ref:e})});R.displayName=E;var Q="AlertDialogAction",C=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(A,{...o,...a,ref:e})});C.displayName=Q;var S="AlertDialogCancel",T=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=J(S,t),s=d(t),c=m(e,o);return r.jsx(A,{...s,...a,ref:c})});T.displayName=S;var U=({contentRef:l})=>{const e=`\`${g}\` requires a description for the component to be accessible for screen reader users.
1
+ import{j as r,ab as w,r as n,M as m,b6 as O,ac as M,T as I,ad as z,ae as F,ah as A,b7 as v,af as L,a$ as G,X as k,ai as H,ag as V,c as i,v as p,b8 as D}from"./index-zTmRWZBl.js";var x="AlertDialog",[W]=k(x,[v]),d=v(),N=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(w,{...a,...t,modal:!0})};N.displayName=x;var Y="AlertDialogTrigger",y=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(H,{...o,...a,ref:e})});y.displayName=Y;var q="AlertDialogPortal",j=l=>{const{__scopeAlertDialog:e,...t}=l,a=d(e);return r.jsx(L,{...a,...t})};j.displayName=q;var B="AlertDialogOverlay",_=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(V,{...o,...a,ref:e})});_.displayName=B;var g="AlertDialogContent",[X,J]=W(g),K=G("AlertDialogContent"),b=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,children:a,...o}=l,s=d(t),c=n.useRef(null),P=m(e,c),u=n.useRef(null);return r.jsx(O,{contentName:g,titleName:h,docsSlug:"alert-dialog",children:r.jsx(X,{scope:t,cancelRef:u,children:r.jsxs(M,{role:"alertdialog",...s,...o,ref:P,onOpenAutoFocus:I(o.onOpenAutoFocus,f=>{f.preventDefault(),u.current?.focus({preventScroll:!0})}),onPointerDownOutside:f=>f.preventDefault(),onInteractOutside:f=>f.preventDefault(),children:[r.jsx(K,{children:a}),r.jsx(U,{contentRef:c})]})})})});b.displayName=g;var h="AlertDialogTitle",$=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(z,{...o,...a,ref:e})});$.displayName=h;var E="AlertDialogDescription",R=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(F,{...o,...a,ref:e})});R.displayName=E;var Q="AlertDialogAction",C=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,o=d(t);return r.jsx(A,{...o,...a,ref:e})});C.displayName=Q;var S="AlertDialogCancel",T=n.forwardRef((l,e)=>{const{__scopeAlertDialog:t,...a}=l,{cancelRef:o}=J(S,t),s=d(t),c=m(e,o);return r.jsx(A,{...s,...a,ref:c})});T.displayName=S;var U=({contentRef:l})=>{const e=`\`${g}\` requires a description for the component to be accessible for screen reader users.
2
2
 
3
3
  You can add a description to the \`${g}\` by passing a \`${E}\` component as a child, which also benefits sighted users by adding visible context to the dialog.
4
4
 
@@ -1 +1 @@
1
- import{c as l,e as m,j as t,A as f,S as h,f as x,g as r,h as p,N as u}from"./index-D-htvwK7.js";function d(){const e=l.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(u,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function g(){const e=l.c(6);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=m(a);if(n==="accept-invitation"){let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(f,{children:t.jsx(h,{})}),e[1]=c):c=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(x,{children:t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:"accept-invitation"})})}),e[2]=i):i=e[2];let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs(t.Fragment,{children:[c,i,t.jsx(p,{children:t.jsx(d,{})})]}),e[3]=o):o=e[3],o}let s;return e[4]!==n?(s=t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:n})}),e[4]=n,e[5]=s):s=e[5],s}export{g as default};
1
+ import{c as l,e as m,j as t,A as f,S as h,f as x,g as r,h as p,N as u}from"./index-zTmRWZBl.js";function d(){const e=l.c(1),a=window.location.pathname+window.location.search;let n;return e[0]===Symbol.for("react.memo_cache_sentinel")?(n=t.jsx(u,{to:"/login",search:{next:a},replace:!0}),e[0]=n):n=e[0],n}function g(){const e=l.c(6);let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={from:"/auth/$pathname"},e[0]=a):a=e[0];const{pathname:n}=m(a);if(n==="accept-invitation"){let c;e[1]===Symbol.for("react.memo_cache_sentinel")?(c=t.jsx(f,{children:t.jsx(h,{})}),e[1]=c):c=e[1];let i;e[2]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx(x,{children:t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:"accept-invitation"})})}),e[2]=i):i=e[2];let o;return e[3]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsxs(t.Fragment,{children:[c,i,t.jsx(p,{children:t.jsx(d,{})})]}),e[3]=o):o=e[3],o}let s;return e[4]!==n?(s=t.jsx("main",{className:"container mx-auto flex grow flex-col items-center justify-center gap-3 self-center p-4 md:p-6",children:t.jsx(r,{pathname:n})}),e[4]=n,e[5]=s):s=e[5],s}export{g as default};
@@ -1 +1 @@
1
- import{r as R,c as j,j as i,v as m,G as I,aL as M,aM as U,aN as $}from"./index-D-htvwK7.js";const V=({size:a=24,color:e="currentColor",...s})=>R.createElement("svg",{viewBox:"0 0 24 24",width:a,height:a,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},R.createElement("path",{d:"M20 21c0-1.396 0-2.093-.172-2.661a4 4 0 0 0-2.667-2.667c-.568-.172-1.265-.172-2.661-.172h-5c-1.396 0-2.093 0-2.661.172a4 4 0 0 0-2.667 2.667C4 18.907 4 19.604 4 21M16.5 7.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));V.displayName="User01";function O(a){const e=j.c(8);let s,t;e[0]!==a?({className:s,...t}=a,e[0]=a,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==t||e[6]!==o?(r=i.jsx($,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=r):r=e[7],r}function T(a){const e=j.c(8);let s,t;e[0]!==a?({className:s,...t}=a,e[0]=a,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==t||e[6]!==o?(r=i.jsx(M,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=r):r=e[7],r}function W(a){const e=j.c(8);let s,t;e[0]!==a?({className:s,...t}=a,e[0]=a,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==t||e[6]!==o?(r=i.jsx(U,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=r):r=e[7],r}const S=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],_="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function B(a){let e=0;for(let t=0;t<a.length;t++)e=a.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%S.length;return S[s]}const L=I("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),D=I("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),G=a=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[a]||e.base};function Z(a){const e=j.c(35);let s,t,o,r,n,d,g,l;e[0]!==a?({url:l,fallback:t,shape:r,size:n,objectFit:d,className:s,muted:g,...o}=a,e[0]=a,e[1]=s,e[2]=t,e[3]=o,e[4]=r,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],r=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=r===void 0?"square":r,h=n===void 0?"base":n,u=d===void 0?"cover":d,k=g===void 0?!1:g,[f,x]=R.useState(!1);let F;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],F=c;break e}F=t}const C=F;let z;e:{if(k){z=_;break e}if(typeof t=="string"){let c;e[11]!==t?(c=B(t),e[11]=t,e[12]=c):c=e[12],z=c;break e}z=S[0]}const y=z;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const E=q;let w;e[18]!==s||e[19]!==b||e[20]!==h?(w=m(L({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==y||e[23]!==C||e[24]!==E||e[25]!==f||e[26]!==p||e[27]!==u||e[28]!==h||e[29]!==l?(v=p&&E?i.jsx("div",{className:m("flex items-center justify-center w-full h-full",y),children:i.jsx(V,{size:G(h)})}):i.jsxs(i.Fragment,{children:[l&&!f&&i.jsx(T,{src:l,loading:"lazy",alt:"Avatar",className:m(D({objectFit:u})),onError:()=>x(!0)}),(!l||f)&&i.jsx(W,{className:m(y,"rounded-none"),children:C})]}),e[22]=y,e[23]=C,e[24]=E,e[25]=f,e[26]=p,e[27]=u,e[28]=h,e[29]=l,e[30]=v):v=e[30];let A;return e[31]!==o||e[32]!==v||e[33]!==w?(A=i.jsx(O,{className:w,...o,children:v}),e[31]=o,e[32]=v,e[33]=w,e[34]=A):A=e[34],A}function H(a){const e=j.c(18);let s,t,o,r,n,d,g,l;e[0]!==a?({shape:r,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=a,e[0]=a,e[1]=s,e[2]=t,e[3]=o,e[4]=r,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],r=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=r===void 0?"square":r,h=n===void 0?"base":n,u=d===void 0?"cover":d,k=g===void 0?!1:g,f=h??"base";let x;return e[9]!==s||e[10]!==t||e[11]!==k||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==f||e[16]!==l?(x=i.jsx(Z,{shape:b,url:l,fallback:t,size:f,objectFit:u,className:s,muted:k,...o}),e[9]=s,e[10]=t,e[11]=k,e[12]=u,e[13]=o,e[14]=b,e[15]=f,e[16]=l,e[17]=x):x=e[17],x}H.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:m(L({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{H as A};
1
+ import{r as R,c as j,j as i,v as m,G as I,aL as M,aM as U,aN as $}from"./index-zTmRWZBl.js";const V=({size:a=24,color:e="currentColor",...s})=>R.createElement("svg",{viewBox:"0 0 24 24",width:a,height:a,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},R.createElement("path",{d:"M20 21c0-1.396 0-2.093-.172-2.661a4 4 0 0 0-2.667-2.667c-.568-.172-1.265-.172-2.661-.172h-5c-1.396 0-2.093 0-2.661.172a4 4 0 0 0-2.667 2.667C4 18.907 4 19.604 4 21M16.5 7.5a4.5 4.5 0 1 1-9 0 4.5 4.5 0 0 1 9 0Z"}));V.displayName="User01";function O(a){const e=j.c(8);let s,t;e[0]!==a?({className:s,...t}=a,e[0]=a,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("relative flex size-8 shrink-0 overflow-hidden rounded-full",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==t||e[6]!==o?(r=i.jsx($,{"data-slot":"avatar",className:o,...t}),e[5]=t,e[6]=o,e[7]=r):r=e[7],r}function T(a){const e=j.c(8);let s,t;e[0]!==a?({className:s,...t}=a,e[0]=a,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("aspect-square size-full",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==t||e[6]!==o?(r=i.jsx(M,{"data-slot":"avatar-image",className:o,...t}),e[5]=t,e[6]=o,e[7]=r):r=e[7],r}function W(a){const e=j.c(8);let s,t;e[0]!==a?({className:s,...t}=a,e[0]=a,e[1]=s,e[2]=t):(s=e[1],t=e[2]);let o;e[3]!==s?(o=m("bg-muted flex size-full items-center justify-center rounded-full",s),e[3]=s,e[4]=o):o=e[4];let r;return e[5]!==t||e[6]!==o?(r=i.jsx(U,{"data-slot":"avatar-fallback",className:o,...t}),e[5]=t,e[6]=o,e[7]=r):r=e[7],r}const S=["drop-shadow-lg bg-gradient-to-br from-red-100 to-red-300 text-red-800 shadow-lg shadow-red-300/40 ring-1 ring-red-300/30","drop-shadow-lg bg-gradient-to-br from-lime-100 to-lime-300 text-lime-800 shadow-lg shadow-lime-300/40 ring-1 ring-lime-300/30","drop-shadow-lg bg-gradient-to-br from-emerald-100 to-emerald-300 text-emerald-800 shadow-lg shadow-emerald-300/40 ring-1 ring-emerald-300/30","drop-shadow-lg bg-gradient-to-br from-orange-100 to-orange-300 text-orange-800 shadow-lg shadow-orange-300/40 ring-1 ring-orange-300/30","drop-shadow-lg bg-gradient-to-br from-amber-100 to-amber-300 text-amber-800 shadow-lg shadow-amber-300/40 ring-1 ring-amber-300/30","drop-shadow-lg bg-gradient-to-br from-yellow-100 to-yellow-300 text-yellow-800 shadow-lg shadow-yellow-300/40 ring-1 ring-yellow-300/30","drop-shadow-lg bg-gradient-to-br from-green-100 to-green-300 text-green-800 shadow-lg shadow-green-300/40 ring-1 ring-green-300/30","drop-shadow-lg bg-gradient-to-br from-teal-100 to-teal-300 text-teal-800 shadow-lg shadow-teal-300/40 ring-1 ring-teal-300/30","drop-shadow-lg bg-gradient-to-br from-cyan-100 to-cyan-300 text-cyan-800 shadow-lg shadow-cyan-300/40 ring-1 ring-cyan-300/30","drop-shadow-lg bg-gradient-to-br from-sky-100 to-sky-300 text-sky-800 shadow-lg shadow-sky-300/40 ring-1 ring-sky-300/30","drop-shadow-lg bg-gradient-to-br from-blue-100 to-blue-300 text-blue-800 shadow-lg shadow-blue-300/40 ring-1 ring-blue-300/30","drop-shadow-lg bg-gradient-to-br from-indigo-100 to-indigo-300 text-indigo-800 shadow-lg shadow-indigo-300/40 ring-1 ring-indigo-300/30","drop-shadow-lg bg-gradient-to-br from-violet-100 to-violet-300 text-violet-800 shadow-lg shadow-violet-300/40 ring-1 ring-violet-300/30","drop-shadow-lg bg-gradient-to-br from-purple-100 to-purple-300 text-purple-800 shadow-lg shadow-purple-300/40 ring-1 ring-purple-300/30","drop-shadow-lg bg-gradient-to-br from-fuchsia-100 to-fuchsia-300 text-fuchsia-800 shadow-lg shadow-fuchsia-300/40 ring-1 ring-fuchsia-300/30","drop-shadow-lg bg-gradient-to-br from-pink-100 to-pink-300 text-pink-800 shadow-lg shadow-pink-300/40 ring-1 ring-pink-300/30","drop-shadow-lg bg-gradient-to-br from-rose-100 to-rose-300 text-rose-800 shadow-lg shadow-rose-300/40 ring-1 ring-rose-300/30"],_="drop-shadow-lg text-muted-foreground bg-muted shadow-lg";function B(a){let e=0;for(let t=0;t<a.length;t++)e=a.charCodeAt(t)+((e<<5)-e);const s=Math.abs(e)%S.length;return S[s]}const L=I("border border-border",{variants:{shape:{circle:"rounded-full",square:""},size:{"3xs":"w-3 h-3 text-[7px] font-semibold","2xs":"w-4 h-4 text-[9px] font-semibold",xs:"w-6 h-6 text-sm font-semibold",sm:"w-8 h-8 text-lg font-semibold",base:"w-10 h-10 text-2xl font-semibold",lg:"w-12 h-12 text-3xl font-semibold",xl:"w-16 h-16 text-4xl font-semibold","2xl":"w-20 h-20 text-5xl font-semibold","3xl":"w-32 h-32 text-7xl font-semibold"}},compoundVariants:[{shape:"square",size:"xs",class:"rounded-lg"},{shape:"square",size:"sm",class:"rounded-xl"},{shape:"square",size:"base",class:"rounded-xl"},{shape:"square",size:"lg",class:"rounded-xl"},{shape:"square",size:"xl",class:"rounded-2xl"},{shape:"square",size:"2xl",class:"rounded-3xl"},{shape:"square",size:"3xl",class:"rounded-[40px]"}],defaultVariants:{shape:"square",size:"base"}}),D=I("",{variants:{objectFit:{contain:"object-contain",cover:"object-cover"}},defaultVariants:{objectFit:"cover"}}),G=a=>{const e={"3xs":8,"2xs":8,xs:12,sm:16,base:24,lg:28,xl:36,"2xl":48,"3xl":80};return e[a]||e.base};function Z(a){const e=j.c(35);let s,t,o,r,n,d,g,l;e[0]!==a?({url:l,fallback:t,shape:r,size:n,objectFit:d,className:s,muted:g,...o}=a,e[0]=a,e[1]=s,e[2]=t,e[3]=o,e[4]=r,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],r=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=r===void 0?"square":r,h=n===void 0?"base":n,u=d===void 0?"cover":d,k=g===void 0?!1:g,[f,x]=R.useState(!1);let F;e:{if(typeof t=="string"){let c;e[9]!==t?(c=t.trim().slice(0,2).toUpperCase(),e[9]=t,e[10]=c):c=e[10],F=c;break e}F=t}const C=F;let z;e:{if(k){z=_;break e}if(typeof t=="string"){let c;e[11]!==t?(c=B(t),e[11]=t,e[12]=c):c=e[12],z=c;break e}z=S[0]}const y=z;let N;e[13]!==l?(N=l?.startsWith("icon://"),e[13]=l,e[14]=N):N=e[14];const p=N;let q;e[15]!==p||e[16]!==l?(q=p?l?.replace("icon://",""):void 0,e[15]=p,e[16]=l,e[17]=q):q=e[17];const E=q;let w;e[18]!==s||e[19]!==b||e[20]!==h?(w=m(L({shape:b,size:h}),s),e[18]=s,e[19]=b,e[20]=h,e[21]=w):w=e[21];let v;e[22]!==y||e[23]!==C||e[24]!==E||e[25]!==f||e[26]!==p||e[27]!==u||e[28]!==h||e[29]!==l?(v=p&&E?i.jsx("div",{className:m("flex items-center justify-center w-full h-full",y),children:i.jsx(V,{size:G(h)})}):i.jsxs(i.Fragment,{children:[l&&!f&&i.jsx(T,{src:l,loading:"lazy",alt:"Avatar",className:m(D({objectFit:u})),onError:()=>x(!0)}),(!l||f)&&i.jsx(W,{className:m(y,"rounded-none"),children:C})]}),e[22]=y,e[23]=C,e[24]=E,e[25]=f,e[26]=p,e[27]=u,e[28]=h,e[29]=l,e[30]=v):v=e[30];let A;return e[31]!==o||e[32]!==v||e[33]!==w?(A=i.jsx(O,{className:w,...o,children:v}),e[31]=o,e[32]=v,e[33]=w,e[34]=A):A=e[34],A}function H(a){const e=j.c(18);let s,t,o,r,n,d,g,l;e[0]!==a?({shape:r,size:n,url:l,fallback:t,objectFit:d,className:s,muted:g,...o}=a,e[0]=a,e[1]=s,e[2]=t,e[3]=o,e[4]=r,e[5]=n,e[6]=d,e[7]=g,e[8]=l):(s=e[1],t=e[2],o=e[3],r=e[4],n=e[5],d=e[6],g=e[7],l=e[8]);const b=r===void 0?"square":r,h=n===void 0?"base":n,u=d===void 0?"cover":d,k=g===void 0?!1:g,f=h??"base";let x;return e[9]!==s||e[10]!==t||e[11]!==k||e[12]!==u||e[13]!==o||e[14]!==b||e[15]!==f||e[16]!==l?(x=i.jsx(Z,{shape:b,url:l,fallback:t,size:f,objectFit:u,className:s,muted:k,...o}),e[9]=s,e[10]=t,e[11]=k,e[12]=u,e[13]=o,e[14]=b,e[15]=f,e[16]=l,e[17]=x):x=e[17],x}H.Skeleton=function({shape:e="square",size:s="base",className:t}){return i.jsx("div",{className:m(L({shape:e,size:s}),"bg-muted animate-pulse",t)})};export{H as A};
@@ -1 +1 @@
1
- import{c as d,v as u,j as l,y as v,G as g}from"./index-D-htvwK7.js";const b=g("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function x(o){const e=d.c(12);let r,s,a,t;e[0]!==o?({className:r,variant:t,asChild:a,...s}=o,e[0]=o,e[1]=r,e[2]=s,e[3]=a,e[4]=t):(r=e[1],s=e[2],a=e[3],t=e[4]);const c=(a===void 0?!1:a)?v:"span";let i;e[5]!==r||e[6]!==t?(i=u(b({variant:t}),r),e[5]=r,e[6]=t,e[7]=i):i=e[7];let n;return e[8]!==c||e[9]!==s||e[10]!==i?(n=l.jsx(c,{"data-slot":"badge",className:i,...s}),e[8]=c,e[9]=s,e[10]=i,e[11]=n):n=e[11],n}export{x as B};
1
+ import{c as d,v as u,j as l,y as v,G as g}from"./index-zTmRWZBl.js";const b=g("inline-flex items-center justify-center rounded-full border px-2 py-0.5 text-xs font-medium w-fit whitespace-nowrap shrink-0 [&>svg]:size-3 gap-1 [&>svg]:pointer-events-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive transition-[color,box-shadow] overflow-hidden",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground [a&]:hover:bg-primary/90",secondary:"border-transparent bg-secondary text-secondary-foreground [a&]:hover:bg-secondary/90",destructive:"border-transparent bg-destructive text-white [a&]:hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",success:"border-transparent bg-success text-success-foreground [a&]:hover:bg-success/90 focus-visible:ring-success/20 dark:focus-visible:ring-success/40",outline:"text-foreground [a&]:hover:bg-accent [a&]:hover:text-accent-foreground"}},defaultVariants:{variant:"default"}});function x(o){const e=d.c(12);let r,s,a,t;e[0]!==o?({className:r,variant:t,asChild:a,...s}=o,e[0]=o,e[1]=r,e[2]=s,e[3]=a,e[4]=t):(r=e[1],s=e[2],a=e[3],t=e[4]);const c=(a===void 0?!1:a)?v:"span";let i;e[5]!==r||e[6]!==t?(i=u(b({variant:t}),r),e[5]=r,e[6]=t,e[7]=i):i=e[7];let n;return e[8]!==c||e[9]!==s||e[10]!==i?(n=l.jsx(c,{"data-slot":"badge",className:i,...s}),e[8]=c,e[9]=s,e[10]=i,e[11]=n):n=e[11],n}export{x as B};
@@ -1 +1 @@
1
- import"./index-D-htvwK7.js";function a(o){return{isImplementedBy:c=>{for(const e of o){const r=typeof e.name=="string"?new RegExp(`^${e.name}$`):e.name,t=c.find(i=>r.test(i.name));if(!(!t&&e.opt)&&!t)return!1}return!0}}}function s(o,c){const e=o.tools;if(!e||e.length===0)return!1;const r=e.map(n=>({name:n.name,inputSchema:n.inputSchema})),t=c.map(n=>({name:n.name,inputSchema:n.inputSchema,opt:n.opt}));return a(t).isImplementedBy(r)}export{a,s as c};
1
+ import"./index-zTmRWZBl.js";function a(o){return{isImplementedBy:c=>{for(const e of o){const r=typeof e.name=="string"?new RegExp(`^${e.name}$`):e.name,t=c.find(i=>r.test(i.name));if(!(!t&&e.opt)&&!t)return!1}return!0}}}function s(o,c){const e=o.tools;if(!e||e.length===0)return!1;const r=e.map(n=>({name:n.name,inputSchema:n.inputSchema})),t=c.map(n=>({name:n.name,inputSchema:n.inputSchema,opt:n.opt}));return a(t).isImplementedBy(r)}export{a,s as c};
@@ -1 +1 @@
1
- import{c,v as m,j as o,y as u}from"./index-D-htvwK7.js";import{i as d}from"./ChevronRight-TdWXpEIC.js";function b(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("min-w-0 overflow-hidden",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=o.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function x(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=o.jsx("ol",{"data-slot":"breadcrumb-list",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function N(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("inline-flex items-center gap-1.5 min-w-0",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=o.jsx("li",{"data-slot":"breadcrumb-item",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function g(r){const e=c.c(10);let a,t,s;e[0]!==r?({asChild:a,className:t,...s}=r,e[0]=r,e[1]=a,e[2]=t,e[3]=s):(a=e[1],t=e[2],s=e[3]);const l=a?u:"a";let i;e[4]!==t?(i=m("hover:text-foreground transition-colors truncate",t),e[4]=t,e[5]=i):i=e[5];let n;return e[6]!==l||e[7]!==s||e[8]!==i?(n=o.jsx(l,{"data-slot":"breadcrumb-link",className:i,...s}),e[6]=l,e[7]=s,e[8]=i,e[9]=n):n=e[9],n}function j(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("text-foreground font-medium truncate",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=o.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function h(r){const e=c.c(12);let a,t,s;e[0]!==r?({children:a,className:t,...s}=r,e[0]=r,e[1]=a,e[2]=t,e[3]=s):(a=e[1],t=e[2],s=e[3]);let l;e[4]!==t?(l=m("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",t),e[4]=t,e[5]=l):l=e[5];let i;e[6]!==a?(i=a??o.jsx(d,{}),e[6]=a,e[7]=i):i=e[7];let n;return e[8]!==s||e[9]!==l||e[10]!==i?(n=o.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:l,...s,children:i}),e[8]=s,e[9]=l,e[10]=i,e[11]=n):n=e[11],n}export{b as B,x as a,N as b,j as c,g as d,h as e};
1
+ import{c,v as m,j as o,y as u}from"./index-zTmRWZBl.js";import{i as d}from"./ChevronRight-zkVqPrw5.js";function b(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("min-w-0 overflow-hidden",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=o.jsx("nav",{"aria-label":"breadcrumb","data-slot":"breadcrumb",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function x(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("flex items-center gap-1.5 text-sm sm:gap-2 overflow-hidden",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=o.jsx("ol",{"data-slot":"breadcrumb-list",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function N(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("inline-flex items-center gap-1.5 min-w-0",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=o.jsx("li",{"data-slot":"breadcrumb-item",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function g(r){const e=c.c(10);let a,t,s;e[0]!==r?({asChild:a,className:t,...s}=r,e[0]=r,e[1]=a,e[2]=t,e[3]=s):(a=e[1],t=e[2],s=e[3]);const l=a?u:"a";let i;e[4]!==t?(i=m("hover:text-foreground transition-colors truncate",t),e[4]=t,e[5]=i):i=e[5];let n;return e[6]!==l||e[7]!==s||e[8]!==i?(n=o.jsx(l,{"data-slot":"breadcrumb-link",className:i,...s}),e[6]=l,e[7]=s,e[8]=i,e[9]=n):n=e[9],n}function j(r){const e=c.c(8);let a,t;e[0]!==r?({className:a,...t}=r,e[0]=r,e[1]=a,e[2]=t):(a=e[1],t=e[2]);let s;e[3]!==a?(s=m("text-foreground font-medium truncate",a),e[3]=a,e[4]=s):s=e[4];let l;return e[5]!==t||e[6]!==s?(l=o.jsx("span",{"data-slot":"breadcrumb-page",role:"link","aria-disabled":"true","aria-current":"page",className:s,...t}),e[5]=t,e[6]=s,e[7]=l):l=e[7],l}function h(r){const e=c.c(12);let a,t,s;e[0]!==r?({children:a,className:t,...s}=r,e[0]=r,e[1]=a,e[2]=t,e[3]=s):(a=e[1],t=e[2],s=e[3]);let l;e[4]!==t?(l=m("[&>svg]:size-3.5 text-muted-foreground opacity-50 list-none shrink-0",t),e[4]=t,e[5]=l):l=e[5];let i;e[6]!==a?(i=a??o.jsx(d,{}),e[6]=a,e[7]=i):i=e[7];let n;return e[8]!==s||e[9]!==l||e[10]!==i?(n=o.jsx("li",{"data-slot":"breadcrumb-separator",role:"presentation","aria-hidden":"true",className:l,...s,children:i}),e[8]=s,e[9]=l,e[10]=i,e[11]=n):n=e[11],n}export{b as B,x as a,N as b,j as c,g as d,h as e};
@@ -1 +1 @@
1
- import{c as o,v as d,j as c}from"./index-D-htvwK7.js";function n(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=d("bg-card text-card-foreground hover:bg-accent/50 flex flex-col gap-6 rounded-xl border border-border/75 shadow-xs",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function f(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=d("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto]",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function p(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=d("leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function u(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=d("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function m(r){const e=o.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let s;return e[2]!==t?(s=c.jsx("div",{"data-slot":"card-content",...t}),e[2]=t,e[3]=s):s=e[3],s}export{n as C,m as a,p as b,u as c,f as d};
1
+ import{c as o,v as d,j as c}from"./index-zTmRWZBl.js";function n(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=d("bg-card text-card-foreground hover:bg-accent/50 flex flex-col gap-6 rounded-xl border border-border/75 shadow-xs",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function f(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=d("@container/card-header grid auto-rows-min grid-rows-[auto_auto] items-start gap-1.5 px-6 has-data-[slot=card-action]:grid-cols-[1fr_auto]",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function p(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=d("leading-none font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function u(r){const e=o.c(8);let t,s;e[0]!==r?({className:t,...s}=r,e[0]=r,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=d("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=c.jsx("div",{"data-slot":"card-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function m(r){const e=o.c(4);let t;e[0]!==r?({...t}=r,e[0]=r,e[1]=t):t=e[1];let s;return e[2]!==t?(s=c.jsx("div",{"data-slot":"card-content",...t}),e[2]=t,e[3]=s):s=e[3],s}export{n as C,m as a,p as b,u as c,f as d};