@decocms/mesh 2.124.0 → 2.125.0

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 (187) hide show
  1. package/dist/client/assets/{AlertCircle-FqZvtfh1.js → AlertCircle-BzYW4X7z.js} +1 -1
  2. package/dist/client/assets/{AlertOctagon-raXiOXHj.js → AlertOctagon-CUysWl_m.js} +1 -1
  3. package/dist/client/assets/{AlertTriangle-Cag6cydu.js → AlertTriangle-DniGvpwb.js} +1 -1
  4. package/dist/client/assets/{ArrowDown-BzwwIvol.js → ArrowDown-B35oswmj.js} +1 -1
  5. package/dist/client/assets/{ArrowLeft-CHSuXHTI.js → ArrowLeft-dS1h2Fqu.js} +1 -1
  6. package/dist/client/assets/{ArrowUp-lkpB-gsw.js → ArrowUp-G8RCE5_O.js} +1 -1
  7. package/dist/client/assets/{Check-BEIYk4IG.js → Check-Bv0pZ3gl.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-BwIxyhQy.js → CheckCircle-lzDHXhkH.js} +1 -1
  9. package/dist/client/assets/{CheckDone01-Duh5ZNi_.js → CheckDone01-BrxNvWbF.js} +1 -1
  10. package/dist/client/assets/{CheckVerified02-DFKFrqtt.js → CheckVerified02-6wwLRSRQ.js} +1 -1
  11. package/dist/client/assets/{ChevronDown-DDsgD0_a.js → ChevronDown-CggIFEVQ.js} +1 -1
  12. package/dist/client/assets/{ChevronRight-dj0VUAfs.js → ChevronRight-DgAfR8pA.js} +1 -1
  13. package/dist/client/assets/{Clock-Dv-gTw8O.js → Clock-IA7N95Qq.js} +1 -1
  14. package/dist/client/assets/{Code01-DbWG3kai.js → Code01-DP2jwP0n.js} +1 -1
  15. package/dist/client/assets/{Container-BY7Dg1ME.js → Container-jfv9L6Hc.js} +1 -1
  16. package/dist/client/assets/{Copy01-BpXeBtQY.js → Copy01-Dq7Edhtu.js} +1 -1
  17. package/dist/client/assets/{Dataflow03-Ce5PVi3u.js → Dataflow03-C6KAN8vb.js} +1 -1
  18. package/dist/client/assets/{DotsHorizontal--qP7BuAi.js → DotsHorizontal-CQ-MbYsC.js} +1 -1
  19. package/dist/client/assets/{DotsVertical-_M8uWFPN.js → DotsVertical-PhooMqUv.js} +1 -1
  20. package/dist/client/assets/{Download01-Cvq7FqwC.js → Download01-CA9RmYjX.js} +1 -1
  21. package/dist/client/assets/{Edit01-BOdZHKPa.js → Edit01-DRruZKzG.js} +1 -1
  22. package/dist/client/assets/{Eye-D_CQVe6k.js → Eye-B9ZDOUkE.js} +1 -1
  23. package/dist/client/assets/{File02-BtCmWw9V.js → File02-B2t2I1sM.js} +1 -1
  24. package/dist/client/assets/{File06-D2nPQ2vd.js → File06-2US99J_V.js} +1 -1
  25. package/dist/client/assets/{FilterLines-CeQtwyiF.js → FilterLines-BFeSNY4D.js} +1 -1
  26. package/dist/client/assets/{Globe01-BUNBHHR9.js → Globe01-Dxe6Kj1c.js} +1 -1
  27. package/dist/client/assets/{Globe02-DXh1wFnz.js → Globe02-BPmEw10H.js} +1 -1
  28. package/dist/client/assets/{Grid01-DDvgvRE8.js → Grid01-CJW4ZLO5.js} +1 -1
  29. package/dist/client/assets/{Hash02-CCi87yL-.js → Hash02-CIZbsu7P.js} +1 -1
  30. package/dist/client/assets/{Home02-WM8fzzhX.js → Home02-Doo3wLuN.js} +1 -1
  31. package/dist/client/assets/{Image01-ToJS21L5.js → Image01-C9h8llDV.js} +1 -1
  32. package/dist/client/assets/{Inbox01-Dl3sNTM-.js → Inbox01-BweXezQd.js} +1 -1
  33. package/dist/client/assets/{InfoCircle-CHNw8w2I.js → InfoCircle-DBbArWGV.js} +1 -1
  34. package/dist/client/assets/{Key01-CBasGMu5.js → Key01-CfL5jY3W.js} +1 -1
  35. package/dist/client/assets/{LinkExternal01-BIouwr8D.js → LinkExternal01-DAvzaXYE.js} +1 -1
  36. package/dist/client/assets/{List-iNTJ6fUY.js → List-sG42OZ_v.js} +1 -1
  37. package/dist/client/assets/{Loading01-BFMhWWtD.js → Loading01-BHMOj-H5.js} +1 -1
  38. package/dist/client/assets/{Lock01-C4Sc75k7.js → Lock01-CQ3bhGvR.js} +1 -1
  39. package/dist/client/assets/{Pin01-BE9Oh0sU.js → Pin01-8MTlfWD2.js} +1 -1
  40. package/dist/client/assets/{Play-gsrF7xxW.js → Play-APj1Lxit.js} +1 -1
  41. package/dist/client/assets/{Plus-Ck954sGm.js → Plus-DNqvDLOK.js} +1 -1
  42. package/dist/client/assets/{RefreshCcw01-zTyzcouM.js → RefreshCcw01-4dzpBOob.js} +1 -1
  43. package/dist/client/assets/{RefreshCw01-DbiZ19Ml.js → RefreshCw01-DHXbMDcX.js} +1 -1
  44. package/dist/client/assets/{Rows03-B0JH9Ohl.js → Rows03-Cdgrgsit.js} +1 -1
  45. package/dist/client/assets/{Save01-CGYgsRh8.js → Save01-D-T2SbCx.js} +1 -1
  46. package/dist/client/assets/{SearchMd-Dvn1Eo76.js → SearchMd-BLcaRHQs.js} +1 -1
  47. package/dist/client/assets/{Settings01-CE-2gHzf.js → Settings01-DKXbh8uh.js} +1 -1
  48. package/dist/client/assets/{Shield01-BB8IGqoD.js → Shield01-B89AcbSX.js} +1 -1
  49. package/dist/client/assets/{Terminal-DQESGxaj.js → Terminal-BblMM2fp.js} +1 -1
  50. package/dist/client/assets/{Trash01-BC7PAlKV.js → Trash01-CkTOgej8.js} +1 -1
  51. package/dist/client/assets/{Upload01-CASznv9t.js → Upload01-gcuuVZ2S.js} +1 -1
  52. package/dist/client/assets/{Users03-DJ0q7ZN3.js → Users03-C1B58zTV.js} +1 -1
  53. package/dist/client/assets/{XCircle-JhpX2IQK.js → XCircle-DneNZUk0.js} +1 -1
  54. package/dist/client/assets/{XClose-Cpw_0BW6.js → XClose-Dgr_gyyv.js} +1 -1
  55. package/dist/client/assets/{agent-connections-preview-Dhs8DGJ9.js → agent-connections-preview-Dq0jl9Fh.js} +1 -1
  56. package/dist/client/assets/{agent-detail-C8HmsASY.js → agent-detail-BNn3Uyo0.js} +1 -1
  57. package/dist/client/assets/{agents-BUO9Of5M.js → agents-BAZxaM_m.js} +1 -1
  58. package/dist/client/assets/alert-dialog-BvNipqK_.js +7 -0
  59. package/dist/client/assets/{auth-catchall-Cts5maQI.js → auth-catchall-BoSUXTLZ.js} +1 -1
  60. package/dist/client/assets/{avatar-BLu12sL5.js → avatar-BNKSN34R.js} +1 -1
  61. package/dist/client/assets/{badge-D4ZHiXFA.js → badge-Do8iK9u9.js} +1 -1
  62. package/dist/client/assets/{binder-BeV9Iq0g.js → binder-BBB8LQyx.js} +1 -1
  63. package/dist/client/assets/{breadcrumb-kQQ-d55s.js → breadcrumb-DeYbtjMk.js} +1 -1
  64. package/dist/client/assets/{button-BxOn_P7A.js → button-D6YZfFzy.js} +1 -1
  65. package/dist/client/assets/{card-DMS-g9Fe.js → card-BNyCnFpQ.js} +1 -1
  66. package/dist/client/assets/{chart-Dm5seKC_.js → chart--8-symKO.js} +1 -1
  67. package/dist/client/assets/{checkbox-QVK1EYTJ.js → checkbox-BZwARXIv.js} +1 -1
  68. package/dist/client/assets/{circle-alert-BGE5uKTO.js → circle-alert-YjViK8VE.js} +1 -1
  69. package/dist/client/assets/{collection-detail-BNuWQnMo.js → collection-detail-LkGK1rw-.js} +1 -1
  70. package/dist/client/assets/{collection-search-WzmN-NEH.js → collection-search-CBYSITVU.js} +1 -1
  71. package/dist/client/assets/{collection-tab-CqF7e-el.js → collection-tab-BrrYAQmN.js} +1 -1
  72. package/dist/client/assets/{collection-table-wrapper-DpYYlIci.js → collection-table-wrapper-fNhnYl-G.js} +1 -1
  73. package/dist/client/assets/{collection-tabs-BzQ9gNkb.js → collection-tabs-D0bfkNrY.js} +1 -1
  74. package/dist/client/assets/{command-pJXSXf5S.js → command-Dt3t7o57.js} +1 -1
  75. package/dist/client/assets/{connect-DpHmbRge.js → connect-DPEGql6L.js} +1 -1
  76. package/dist/client/assets/{connection-card-CRsOF1KU.js → connection-card-Cwh5xUmA.js} +1 -1
  77. package/dist/client/assets/{connection-detail-B1dOB0AI.js → connection-detail-DgHwxZSJ.js} +1 -1
  78. package/dist/client/assets/{connections-EWXE105G.js → connections-D2AuzZXu.js} +1 -1
  79. package/dist/client/assets/{constants-9bKBT988.js → constants-8URKDp4Y.js} +1 -1
  80. package/dist/client/assets/constants-oXq_cTdm.js +1 -0
  81. package/dist/client/assets/{context-LmNUO0nU.js → context-DHicyHl4.js} +9 -9
  82. package/dist/client/assets/{create-organization-dialog-CuKocaBI.js → create-organization-dialog-Cb3EQpzl.js} +1 -1
  83. package/dist/client/assets/{create-project-dialog-heqHF5Xt.js → create-project-dialog-BjqZAjhY.js} +1 -1
  84. package/dist/client/assets/{deco-constants-YxoGHwHI.js → deco-constants-CyaJG-D1.js} +1 -1
  85. package/dist/client/assets/{dialog-8Qx5GCEw.js → dialog-DSPMVHyJ.js} +1 -1
  86. package/dist/client/assets/{dropdown-menu-BbhseL--.js → dropdown-menu-CRT7qGQ9.js} +1 -1
  87. package/dist/client/assets/{dynamic-plugin-layout-Ch1QuglW.js → dynamic-plugin-layout-Dj3hkiA6.js} +1 -1
  88. package/dist/client/assets/{empty-state-CSzTWTZI.js → empty-state-BA6UkF4p.js} +1 -1
  89. package/dist/client/assets/{empty-state-C7VZap1W.js → empty-state-sMx3NP6e.js} +1 -1
  90. package/dist/client/assets/{env-vars-editor-C0KF8UB-.js → env-vars-editor-DuW-Il-b.js} +1 -1
  91. package/dist/client/assets/{error-boundary-BpCU-F5d.js → error-boundary-lFjWy2-n.js} +1 -1
  92. package/dist/client/assets/{extract-connection-data-CLG2vt6G.js → extract-connection-data-B39uuFqG.js} +1 -1
  93. package/dist/client/assets/{file-browser-4BKj7MWu.js → file-browser-BIF8ssgw.js} +2 -2
  94. package/dist/client/assets/{form-Dn5Ilwyi.js → form-BMtUcs2k.js} +1 -1
  95. package/dist/client/assets/{grid-view-aIHLkNPN.js → grid-view-e1dnT7b5.js} +1 -1
  96. package/dist/client/assets/{home-md1YObTz.js → home-1A3rDo1n.js} +1 -1
  97. package/dist/client/assets/index-BMDGI420.css +1 -0
  98. package/dist/client/assets/{index-DlglR7Dv.js → index-B_nMIrSY.js} +1 -1
  99. package/dist/client/assets/{index-DdzAhdkZ.js → index-CCjxSJ1y.js} +1 -1
  100. package/dist/client/assets/{index-Du85XF43.js → index-CjGa0AXv.js} +1 -1
  101. package/dist/client/assets/{index-CWIKLTkS.js → index-DJ_LDW-E.js} +1 -1
  102. package/dist/client/assets/{index-BtVQ48XT.js → index-DmoBx0VC.js} +1 -1
  103. package/dist/client/assets/{index-ow5WSrzH.js → index-DnrfuViL.js} +1 -1
  104. package/dist/client/assets/{index-DQipirM0.js → index-DwBgLSti.js} +3 -3
  105. package/dist/client/assets/{index-CIUI9_Ip.js → index-QQ-XmLlG.js} +51 -51
  106. package/dist/client/assets/{infiniteQueryObserver-45WqMl59.js → infiniteQueryObserver-Yvt0ZTml.js} +1 -1
  107. package/dist/client/assets/{input-D3a40-af.js → input-B7id4I1j.js} +1 -1
  108. package/dist/client/assets/{integration-icon-6FQvxTss.js → integration-icon-qV_BsBQR.js} +1 -1
  109. package/dist/client/assets/{label-_-PuJzKE.js → label-29qY4FPs.js} +1 -1
  110. package/dist/client/assets/{layout-C5y_iFls.js → layout-Ck3H2-cu.js} +1 -1
  111. package/dist/client/assets/{localstorage-keys-Xr0m_-Nl.js → localstorage-keys-Ct4C992S.js} +1 -1
  112. package/dist/client/assets/{login-CGG5vJdW.js → login-DO8QasPa.js} +1 -1
  113. package/dist/client/assets/{markdown-DumqyZQo.js → markdown-jp5pFlBz.js} +1 -1
  114. package/dist/client/assets/{mcp-oauth-ZHptqU19.js → mcp-oauth-Bb9gvF4o.js} +1 -1
  115. package/dist/client/assets/{mcp-server-card-uS3QofMZ.js → mcp-server-card-D_Epc4aH.js} +1 -1
  116. package/dist/client/assets/{mcp-server-detail-BKF_R4E0.js → mcp-server-detail-Dut9IDFd.js} +2 -2
  117. package/dist/client/assets/{members-BRSEA55l.js → members-4s3A4PQH.js} +1 -1
  118. package/dist/client/assets/{monitoring-dashboard-edit-1EYxjqsS.js → monitoring-dashboard-edit-DyFCcJjq.js} +1 -1
  119. package/dist/client/assets/{monitoring-dashboard-view-B9ky_iuo.js → monitoring-dashboard-view-Bc4tCiDF.js} +1 -1
  120. package/dist/client/assets/{monitoring-ChGczzDH.js → monitoring-gEkChCwS.js} +1 -1
  121. package/dist/client/assets/{oauth-callback-DiCjOlTo.js → oauth-callback-tz7MTdrq.js} +1 -1
  122. package/dist/client/assets/page-YrzfNFn-.js +1 -0
  123. package/dist/client/assets/{page-Bd4vke_j.js → page-pkTyp5rB.js} +1 -1
  124. package/dist/client/assets/{plugin-empty-state-3Ic2Cddr.js → plugin-empty-state-YsTdKC2B.js} +1 -1
  125. package/dist/client/assets/{plugin-empty-state-B0aoDY0o.js → plugin-empty-state-dEbxXjO6.js} +1 -1
  126. package/dist/client/assets/{plugin-header-lqwqxxa8.js → plugin-header-Di-tZc0h.js} +1 -1
  127. package/dist/client/assets/{plugin-header-1MpH5dMN.js → plugin-header-Djvd0-eL.js} +1 -1
  128. package/dist/client/assets/{popover-O7pPZSal.js → popover-pjzQQlLd.js} +1 -1
  129. package/dist/client/assets/{project-layout-Dk2D-43Q.js → project-layout-Bp5s1iI1.js} +1 -1
  130. package/dist/client/assets/{projects-list-CApnnFAH.js → projects-list-DcozT0tR.js} +1 -1
  131. package/dist/client/assets/{ranking-layout-CB_f3cVs.js → ranking-layout-D3PvNfv7.js} +1 -1
  132. package/dist/client/assets/{readme-viewer-61IpnmPP.js → readme-viewer-BmO5RwRH.js} +1 -1
  133. package/dist/client/assets/{registry-layout-DGM76yIZ.js → registry-layout-DEN2jHtD.js} +1 -1
  134. package/dist/client/assets/{registry-utils-DSUIffwE.js → registry-utils-DMdc5PTp.js} +1 -1
  135. package/dist/client/assets/{reports-layout-BMSW5Pvz.js → reports-layout-DziFQRp_.js} +1 -1
  136. package/dist/client/assets/{reset-password-R313_uMV.js → reset-password-CrHLBBwi.js} +1 -1
  137. package/dist/client/assets/{resizable-Dz9Hl0cL.js → resizable-jXkpfiVS.js} +1 -1
  138. package/dist/client/assets/{save-actions-De5hNsxX.js → save-actions-BPg_8VMI.js} +1 -1
  139. package/dist/client/assets/{scroll-area-dZhjEr7K.js → scroll-area-CcejXaMp.js} +1 -1
  140. package/dist/client/assets/{select-BSYdCUMN.js → select-CkeKfTEx.js} +1 -1
  141. package/dist/client/assets/shell-layout-C4PQ301W.js +3 -0
  142. package/dist/client/assets/{skeleton-D-Lsp11A.js → skeleton-DNLZ4Kho.js} +1 -1
  143. package/dist/client/assets/{spinner-BL4ZMZYA.js → spinner-DZtD-MX0.js} +1 -1
  144. package/dist/client/assets/{store-invite-B0hYE1ZZ.js → store-invite-B_jz8YSY.js} +1 -1
  145. package/dist/client/assets/{switch-DyckCxcC.js → switch-DFKxfcc5.js} +1 -1
  146. package/dist/client/assets/{table-D0pFXKN4.js → table-Csfk_VXo.js} +1 -1
  147. package/dist/client/assets/{tasks-DPZywEmF.js → tasks-Dv2Dq-cV.js} +1 -1
  148. package/dist/client/assets/{textarea-DX9d61Sr.js → textarea-GWXLFYfv.js} +1 -1
  149. package/dist/client/assets/{time-range-picker-fngIp4Wo.js → time-range-picker-DnUGZRLa.js} +1 -1
  150. package/dist/client/assets/{toggle-group-Z0vsy7J4.js → toggle-group-CojJ3wZ4.js} +1 -1
  151. package/dist/client/assets/{tools-list-B0lut0n1.js → tools-list-BPGP3JUO.js} +1 -1
  152. package/dist/client/assets/{tooltip-B7RjBzxU.js → tooltip-D71dCz4E.js} +1 -1
  153. package/dist/client/assets/{topbar-portal-D44GN90b.js → topbar-portal-BKT0Es8i.js} +1 -1
  154. package/dist/client/assets/typewriter-title-DqLjhGgL.js +16 -0
  155. package/dist/client/assets/{use-binding-oEpPFbv0.js → use-binding-DbH4Xe03.js} +1 -1
  156. package/dist/client/assets/{use-connection-DXequUdB.js → use-connection-BEGrPCmR.js} +1 -1
  157. package/dist/client/assets/{use-copy-h8i-bDIZ.js → use-copy-DsHlaDHD.js} +1 -1
  158. package/dist/client/assets/{use-create-virtual-mcp-DG-_igKD.js → use-create-virtual-mcp-BzTARjrD.js} +1 -1
  159. package/dist/client/assets/{use-deco-chat-open-BAG5m-JA.js → use-deco-chat-open-CxG3qwlT.js} +1 -1
  160. package/dist/client/assets/{use-install-from-registry-BCGIZz8M.js → use-install-from-registry-CSDJ0ZgD.js} +1 -1
  161. package/dist/client/assets/{use-list-state-DjtYoYEW.js → use-list-state-DvpdPuz-.js} +1 -1
  162. package/dist/client/assets/{use-llm-DDqwpIPn.js → use-llm-BbYG_RIr.js} +1 -1
  163. package/dist/client/assets/{use-mcp-prompts-CqOiamVC.js → use-mcp-prompts-qD8uHlkj.js} +1 -1
  164. package/dist/client/assets/{use-mcp-tools-Dt6WorDi.js → use-mcp-tools-BAsmCzEJ.js} +1 -1
  165. package/dist/client/assets/{use-mobile-CYG2M3Mj.js → use-mobile-Bs0AkxK7.js} +1 -1
  166. package/dist/client/assets/{use-organization-settings-Db9DvZjz.js → use-organization-settings-BJ9tNAL9.js} +1 -1
  167. package/dist/client/assets/{use-project-x4-rNIeb.js → use-project-CXHCn5kp.js} +1 -1
  168. package/dist/client/assets/{use-settings-modal-D-E-U1i_.js → use-settings-modal-Dx8IF1Gs.js} +1 -1
  169. package/dist/client/assets/{use-view-mode-C5FzaFBT.js → use-view-mode-DMPiUC22.js} +1 -1
  170. package/dist/client/assets/{use-virtual-mcp-Bq4iD2DN.js → use-virtual-mcp-DBzFAk7J.js} +1 -1
  171. package/dist/client/assets/useInfiniteQuery-DXQ7BtjQ.js +1 -0
  172. package/dist/client/assets/{useMutation-8rEyObWg.js → useMutation-DgG1LVg-.js} +1 -1
  173. package/dist/client/assets/useQuery-CPsXfVfR.js +1 -0
  174. package/dist/client/assets/useSuspenseInfiniteQuery-CuH1Eku2.js +1 -0
  175. package/dist/client/assets/{view-mode-toggle-DumSmhPz.js → view-mode-toggle-2-qyK3LU.js} +1 -1
  176. package/dist/client/assets/{workflow-Nf6onDYr.js → workflow-YppA7Sxi.js} +1 -1
  177. package/dist/client/index.html +2 -2
  178. package/package.json +1 -1
  179. package/dist/client/assets/alert-dialog-K0UnFp_v.js +0 -7
  180. package/dist/client/assets/constants-CS_UcM7e.js +0 -1
  181. package/dist/client/assets/index-BpxApmrT.css +0 -1
  182. package/dist/client/assets/page-BqTRzB6R.js +0 -1
  183. package/dist/client/assets/shell-layout-CGTPLB_Q.js +0 -3
  184. package/dist/client/assets/typewriter-title-CkssIeLy.js +0 -16
  185. package/dist/client/assets/useInfiniteQuery-qwQj5SMK.js +0 -1
  186. package/dist/client/assets/useQuery-CqT-L2b-.js +0 -1
  187. package/dist/client/assets/useSuspenseInfiniteQuery-BKpm_7Fb.js +0 -1
@@ -1 +1 @@
1
- import{c as d,j as c,ag as n,ah as l}from"./index-DQipirM0.js";import{i as m}from"./Check-BEIYk4IG.js";import{c as b}from"./button-BxOn_P7A.js";function f(o){const e=d.c(9);let r,a;e[0]!==o?({className:r,...a}=o,e[0]=o,e[1]=r,e[2]=a):(r=e[1],a=e[2]);let i;e[3]!==r?(i=b("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-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 size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",r),e[3]=r,e[4]=i):i=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(l,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==a||e[7]!==i?(s=c.jsx(n,{"data-slot":"checkbox",className:i,...a,children:t}),e[6]=a,e[7]=i,e[8]=s):s=e[8],s}export{f as C};
1
+ import{c as d,j as c,ag as n,ah as l}from"./index-DwBgLSti.js";import{i as m}from"./Check-Bv0pZ3gl.js";import{c as b}from"./button-D6YZfFzy.js";function f(o){const e=d.c(9);let r,a;e[0]!==o?({className:r,...a}=o,e[0]=o,e[1]=r,e[2]=a):(r=e[1],a=e[2]);let i;e[3]!==r?(i=b("peer border-foreground dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-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 size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",r),e[3]=r,e[4]=i):i=e[4];let t;e[5]===Symbol.for("react.memo_cache_sentinel")?(t=c.jsx(l,{"data-slot":"checkbox-indicator",className:"flex items-center justify-center text-primary-foreground transition-none",children:c.jsx(m,{className:"size-3.5"})}),e[5]=t):t=e[5];let s;return e[6]!==a||e[7]!==i?(s=c.jsx(n,{"data-slot":"checkbox",className:i,...a,children:t}),e[6]=a,e[7]=i,e[8]=s):s=e[8],s}export{f as C};
@@ -1 +1 @@
1
- import{r as c}from"./index-DQipirM0.js";const h=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),y=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,o)=>o?o.toUpperCase():r.toLowerCase()),i=t=>{const e=y(t);return e.charAt(0).toUpperCase()+e.slice(1)},l=(...t)=>t.filter((e,r,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===r).join(" ").trim(),f=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var k={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const w=c.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:s="",children:a,iconNode:p,...n},d)=>c.createElement("svg",{ref:d,...k,width:e,height:e,stroke:t,strokeWidth:o?Number(r)*24/Number(e):r,className:l("lucide",s),...!a&&!f(n)&&{"aria-hidden":"true"},...n},[...p.map(([m,C])=>c.createElement(m,C)),...Array.isArray(a)?a:[a]]));const u=(t,e)=>{const r=c.forwardRef(({className:o,...s},a)=>c.createElement(w,{ref:a,iconNode:e,className:l(`lucide-${h(i(t))}`,`lucide-${t}`,o),...s}));return r.displayName=i(t),r};const g=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],b=u("check",g);const x=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],L=u("circle-alert",x);export{L as C,b as a,u as c};
1
+ import{r as c}from"./index-DwBgLSti.js";const h=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),y=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,r,o)=>o?o.toUpperCase():r.toLowerCase()),i=t=>{const e=y(t);return e.charAt(0).toUpperCase()+e.slice(1)},l=(...t)=>t.filter((e,r,o)=>!!e&&e.trim()!==""&&o.indexOf(e)===r).join(" ").trim(),f=t=>{for(const e in t)if(e.startsWith("aria-")||e==="role"||e==="title")return!0};var k={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const w=c.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:r=2,absoluteStrokeWidth:o,className:s="",children:a,iconNode:p,...n},d)=>c.createElement("svg",{ref:d,...k,width:e,height:e,stroke:t,strokeWidth:o?Number(r)*24/Number(e):r,className:l("lucide",s),...!a&&!f(n)&&{"aria-hidden":"true"},...n},[...p.map(([m,C])=>c.createElement(m,C)),...Array.isArray(a)?a:[a]]));const u=(t,e)=>{const r=c.forwardRef(({className:o,...s},a)=>c.createElement(w,{ref:a,iconNode:e,className:l(`lucide-${h(i(t))}`,`lucide-${t}`,o),...s}));return r.displayName=i(t),r};const g=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],b=u("check",g);const x=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],L=u("circle-alert",x);export{L as C,b as a,u as c};
@@ -1,4 +1,4 @@
1
- import{b3 as te,r as k,o as Zs,s as It,c as C,j as o,bx as Wt,u as G,l as Ys,y as eo,e as pe,a as to,aD as et,O as tt,t as On,bl as q,bP as no,bQ as so,aG as oo,am as Ft,at as de,av as Rn,aH as ro,ap as Ht,aF as io,aI as An,ar as Mn,aO as lo,aP as co,aw as Pn,aQ as ao,bR as Vt,bS as uo,al as fo,bn as mo,ao as po,m as xo,bT as ho,bU as go,bV as Ln}from"./index-DQipirM0.js";import{E as Dn}from"./empty-state-C7VZap1W.js";import{E as zn}from"./error-boundary-BpCU-F5d.js";import{d as Ut,u as Bt,f as ct,h as bo}from"./use-connection-DXequUdB.js";import{u as ne,g as Be,i as jo}from"./constants-9bKBT988.js";import{P as qt}from"./index-ow5WSrzH.js";import{F as _t,a as vo,b as Kt,d as Jt}from"./form-Dn5Ilwyi.js";import{I as Gt}from"./input-D3a40-af.js";import{T as Mt}from"./textarea-DX9d61Sr.js";import{b as Wn,V as Xt,a as he}from"./layout-C5y_iFls.js";import{S as Fn}from"./save-actions-De5hNsxX.js";import{c as M,B as Y}from"./button-BxOn_P7A.js";import{S as Hn,a as Vn,b as Un,c as Bn,d as nt}from"./select-BSYdCUMN.js";import{c as Qt,T as Zt,a as Yt,b as en,i as qn}from"./tooltip-B7RjBzxU.js";import{i as So}from"./AlertCircle-FqZvtfh1.js";import{s as yo}from"./Clock-Dv-gTw8O.js";import{i as wo}from"./Code01-DbWG3kai.js";import{a as No}from"./Copy01-BpXeBtQY.js";import{i as Ue}from"./Loading01-BFMhWWtD.js";import{i as tn}from"./Play-gsrF7xxW.js";import{s as at}from"./XClose-Cpw_0BW6.js";import{B as Kn,a as Jn,b as Pe,d as st,e as ot,c as Gn}from"./breadcrumb-kQQ-d55s.js";import{u as Co,O as ko,M as Io,F as _o,v as Eo}from"./index-DdzAhdkZ.js";import{d as nn,b as sn,a as on}from"./use-mcp-tools-Dt6WorDi.js";import{I as dt}from"./integration-icon-6FQvxTss.js";import{M as Le,n as To,S as $o,a as Oo}from"./scroll-area-dZhjEr7K.js";import{E as rn}from"./empty-state-CSzTWTZI.js";import{n as Ro}from"./Container-BY7Dg1ME.js";import{b as Xn}from"./use-virtual-mcp-Bq4iD2DN.js";import{b as Ao,a as jn,R as Mo}from"./resizable-Dz9Hl0cL.js";import{B as me}from"./badge-D4ZHiXFA.js";import{S as ut}from"./spinner-BL4ZMZYA.js";import{V as Po}from"./view-mode-toggle-DumSmhPz.js";import{N as Lo,S as Do,a as zo,c as Wo,m as Qe,P as Fo,i as Ho,R as Vo,u as Uo,b as Bo,d as vn,E as qo,e as Ko}from"./index-CIUI9_Ip.js";import{a as Jo}from"./use-binding-oEpPFbv0.js";import{b as Go,c as Xo,d as Qo,e as Zo,a as Yo,D as er}from"./dialog-8Qx5GCEw.js";import"./index-CWIKLTkS.js";import{s as Qn}from"./Plus-Ck954sGm.js";import{c as Zn}from"./AlertOctagon-raXiOXHj.js";import{i as ft}from"./Check-BEIYk4IG.js";import{i as tr}from"./DotsHorizontal--qP7BuAi.js";import{a as nr,h as sr,R as or,j as rr,k as Yn}from"./use-deco-chat-open-BAG5m-JA.js";import{D as ir,a as lr,b as cr,c as Sn}from"./dropdown-menu-BbhseL--.js";import{i as ar}from"./ChevronRight-dj0VUAfs.js";import{c as dr}from"./context-LmNUO0nU.js";import"./AlertTriangle-Cag6cydu.js";import"./useMutation-8rEyObWg.js";import"./Pin01-BE9Oh0sU.js";import"./use-organization-settings-Db9DvZjz.js";import"./label-_-PuJzKE.js";import"./index-DlglR7Dv.js";import"./use-mobile-CYG2M3Mj.js";import"./Save01-CGYgsRh8.js";import"./ChevronDown-DDsgD0_a.js";import"./mcp-oauth-ZHptqU19.js";import"./File06-D2nPQ2vd.js";import"./Key01-CBasGMu5.js";import"./constants-CS_UcM7e.js";import"./registry-utils-DSUIffwE.js";import"./extract-connection-data-CLG2vt6G.js";import"./github-icon-Dp3wHhYE.js";import"./generate-id-Dyweu44Y.js";import"./use-install-from-registry-BCGIZz8M.js";import"./circle-alert-BGE5uKTO.js";import"./index-BtVQ48XT.js";import"./useQuery-CqT-L2b-.js";import"./popover-O7pPZSal.js";import"./skeleton-D-Lsp11A.js";import"./localstorage-keys-Xr0m_-Nl.js";import"./use-mcp-prompts-CqOiamVC.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-lkpB-gsw.js";import"./Edit01-BOdZHKPa.js";import"./Users03-DJ0q7ZN3.js";import"./XCircle-JhpX2IQK.js";import"./ArrowLeft-CHSuXHTI.js";import"./use-copy-h8i-bDIZ.js";import"./SearchMd-Dvn1Eo76.js";import"./use-create-virtual-mcp-DG-_igKD.js";import"./deco-constants-YxoGHwHI.js";import"./marked.esm-BaswSlok.js";import"./markdown-DumqyZQo.js";import"./Eye-D_CQVe6k.js";import"./Globe02-DXh1wFnz.js";import"./Trash01-BC7PAlKV.js";import"./binder-BeV9Iq0g.js";import"./decopilot-events-Brt4gAR6.js";import"./use-llm-DDqwpIPn.js";import"./Grid01-DDvgvRE8.js";import"./Image01-ToJS21L5.js";import"./RefreshCcw01-zTyzcouM.js";import"./Settings01-CE-2gHzf.js";import"./useSuspenseInfiniteQuery-BKpm_7Fb.js";import"./infiniteQueryObserver-45WqMl59.js";const es=te("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const ts=te("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const ln=te("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const cn=te("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const ur=te("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const fr=te("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const mr=te("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const ns=te("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const ss=te("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const os=te("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const pr=te("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const rs=te("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const is=te("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]),ls=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M20.5 8v8.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.22 21 17.38 21 15.7 21H8.3c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3.5 18.72 3.5 17.88 3.5 16.2V8m.1-5h16.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C22 3.76 22 4.04 22 4.6v1.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C21.24 8 20.96 8 20.4 8H3.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C2 7.24 2 6.96 2 6.4V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C2.76 3 3.04 3 3.6 3Zm6 8.5h4.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C16 12.26 16 12.54 16 13.1v.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437c-.214.109-.494.109-1.054.109H9.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C8 14.74 8 14.46 8 13.9v-.8c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C8.76 11.5 9.04 11.5 9.6 11.5Z"}));ls.displayName="Box";const cs=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m22.7 11.5-2 2-2-2m2.245 1.5A9 9 0 1 0 19 17.657M12 7v5l3 2"}));cs.displayName="ClockFastForward";const as=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m17 17 5-5-5-5M7 7l-5 5 5 5m7-14-4 18"}));as.displayName="Code02";const Ze=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M6.8 3h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C10 19.48 10 18.92 10 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C8.48 3 7.92 3 6.8 3Zm11 0h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C14 4.52 14 5.08 14 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C15.52 21 16.08 21 17.2 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3Z"}));Ze.displayName="Columns01";const ds=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M4 4v1.4c0 3.36 0 5.04.654 6.324a6 6 0 0 0 2.622 2.622C8.56 15 10.24 15 13.6 15H20m0 0-5-5m5 5-5 5"}));ds.displayName="CornerDownRight";const us=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M21 5c0 1.657-4.03 3-9 3S3 6.657 3 5m18 0c0-1.657-4.03-3-9-3S3 3.343 3 5m18 0v14c0 1.66-4 3-9 3s-9-1.34-9-3V5m18 7c0 1.66-4 3-9 3s-9-1.34-9-3"}));us.displayName="Database01";const fs=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M3 3v10.2c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 18 6.12 18 7.8 18H15m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0ZM3 8h12m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0Z"}));fs.displayName="GitBranch01";const ms=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m13 22-3-3m0 0 3-3m-3 3h5a7 7 0 0 0 3-13.326M6 18.326A7 7 0 0 1 9 5h5m0 0-3-3m3 3-3 3"}));ms.displayName="Repeat03";Zs({title:It().min(1),description:It().nullable(),body:It()});function Et(t){for(const e of t.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function xr(){const t=window.location.pathname.split("/").filter(Boolean),e=t.findIndex(s=>s==="mcps"),n=e>=0?t[e+1]:void 0;return n?decodeURIComponent(n):void 0}function hr(t){const e=C.c(13),{form:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=s):s=e[0];let i;e[1]!==n.control?(i=o.jsxs("div",{className:"flex flex-col gap-4",children:[s,o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsx(_t,{control:n.control,name:"title",render:jr}),o.jsx(_t,{control:n.control,name:"description",render:br})]})]}),e[1]=n.control,e[2]=i):i=e[2];let r,l;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),l=o.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=l):(r=e[3],l=e[4]);let c;e[5]!==n.control?(c=o.jsxs("div",{className:"flex flex-col gap-2",children:[r,l,o.jsx(_t,{control:n.control,name:"body",render:gr})]}),e[5]=n.control,e[6]=c):c=e[6];let a;e[7]!==i||e[8]!==c?(a=o.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[i,c]}),e[7]=i,e[8]=c,e[9]=a):a=e[9];let d;return e[10]!==n||e[11]!==a?(d=o.jsx(vo,{...n,children:a}),e[10]=n,e[11]=a,e[12]=d):d=e[12],d}function gr(t){const{field:e}=t;return o.jsx(Kt,{children:o.jsx(Jt,{children:o.jsx(Mt,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function br(t){const{field:e}=t;return o.jsxs(Kt,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),o.jsx(Jt,{children:o.jsx(Gt,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function jr(t){const{field:e}=t;return o.jsxs(Kt,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),o.jsx(Jt,{children:o.jsx(Gt,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function vr(t){const e=C.c(41),{providerId:n,promptId:s}=t,r=Wt().location.href,{org:l}=G(),c=n||null;let a;e[0]!==l.id||e[1]!==c?(a={connectionId:c,orgId:l.id},e[0]=l.id,e[1]=c,e[2]=a):a=e[2];const d=ne(a),u=Ut(n,"PROMPT",s,d),f=Bt(n,"PROMPT",d),m=f.update.isPending;let h;e[3]!==u?(h=u?{title:u.title,description:u.description??null,body:Et(u)}:void 0,e[3]=u,e[4]=h):h=e[4];let p;e[5]!==h?(p={values:h},e[5]=h,e[6]=p):p=e[6];const x=Ys(p);let g;e[7]!==x||e[8]!==u?(g=()=>{u&&x.reset({title:u.title,description:u.description??null,body:Et(u)})},e[7]=x,e[8]=u,e[9]=g):g=e[9];const b=g;let j;e[10]!==f.update||e[11]!==x||e[12]!==s?(j=x.handleSubmit(async I=>{const A=await f.update.mutateAsync({id:s,data:{title:I.title,description:I.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:I.body}}]}});x.reset({title:A.title,description:A.description??null,body:Et(A)})}),e[10]=f.update,e[11]=x,e[12]=s,e[13]=j):j=e[13];const S=j;if(!u){let I;return e[14]===Symbol.for("react.memo_cache_sentinel")?(I=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(Dn,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[14]=I):I=e[14],I}let y;e[15]!==u.title?(y=o.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:u.title}),e[15]=u.title,e[16]=y):y=e[16];let v;e[17]!==u.description?(v=u.description?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),o.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:u.description})]}):null,e[17]=u.description,e[18]=v):v=e[18];let w;e[19]!==y||e[20]!==v?(w=o.jsx(Wn,{children:o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[y,v]})}),e[19]=y,e[20]=v,e[21]=w):w=e[21];let N;e[22]!==S?(N=()=>{S()},e[22]=S,e[23]=N):N=e[23];let E;e[24]!==x.formState.isDirty||e[25]!==m||e[26]!==b||e[27]!==N?(E=o.jsx(Fn,{onSave:N,onUndo:b,isDirty:x.formState.isDirty,isSaving:m}),e[24]=x.formState.isDirty,e[25]=m,e[26]=b,e[27]=N,e[28]=E):E=e[28];let T;e[29]!==u.title||e[30]!==r?(T=o.jsx(qt,{title:u.title,url:r,icon:"description"}),e[29]=u.title,e[30]=r,e[31]=T):T=e[31];let $;e[32]!==E||e[33]!==T?($=o.jsxs(Xt,{children:[E,T]}),e[32]=E,e[33]=T,e[34]=$):$=e[34];let R;e[35]!==x?(R=o.jsx("div",{className:"h-full",children:o.jsx(hr,{form:x})}),e[35]=x,e[36]=R):R=e[36];let L;return e[37]!==$||e[38]!==R||e[39]!==w?(L=o.jsxs(he,{children:[w,$,R]}),e[37]=$,e[38]=R,e[39]=w,e[40]=L):L=e[40],L}function Sr(t){const e=C.c(4),{itemId:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=xr(),e[0]=s):s=e[0];const i=s;if(!i){let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(Dn,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=l):l=e[1],l}let r;return e[2]!==n?(r=o.jsx(zn,{children:o.jsx(k.Suspense,{fallback:null,children:o.jsx(vr,{providerId:i,promptId:n})})}),e[2]=n,e[3]=r):r=e[3],r}const yr=eo("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/5 text-destructive border-destructive/25 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/10 text-warning-foreground border-warning [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",success:"bg-success/10 text-success-foreground border-success [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function wr(t){const e=C.c(10);let n,s,i;e[0]!==t?({className:n,variant:i,...s}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=i):(n=e[1],s=e[2],i=e[3]);let r;e[4]!==n||e[5]!==i?(r=M(yr({variant:i}),n),e[4]=n,e[5]=i,e[6]=r):r=e[6];let l;return e[7]!==s||e[8]!==r?(l=o.jsx("div",{"data-slot":"alert",role:"alert",className:r,...s}),e[7]=s,e[8]=r,e[9]=l):l=e[9],l}function Nr(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=M("line-clamp-1 min-h-4 font-medium tracking-tight",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==s||e[6]!==i?(r=o.jsx("div",{"data-slot":"alert-title",className:i,...s}),e[5]=s,e[6]=i,e[7]=r):r=e[7],r}function Cr(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=M("text-muted-foreground leading-relaxed",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==s||e[6]!==i?(r=o.jsx("div",{"data-slot":"alert-description",className:i,...s}),e[5]=s,e[6]=i,e[7]=r):r=e[7],r}const yn=t=>t.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function kr(t){const e=C.c(9),{toolName:n,connectionId:s,onBack:i}=t;let r;e[0]!==s?(r={connectionId:s},e[0]=s,e[1]=r):r=e[1];const l=Co(r);if(!l.isAuthenticated){let d;return e[2]!==l.supportsOAuth||e[3]!==i?(d=o.jsx("div",{className:"flex h-full items-center justify-center",children:l.supportsOAuth?o.jsx(ko,{onAuthenticate:()=>i(),buttonText:"Go back to authenticate"}):o.jsx(Io,{hasReadme:!1})}),e[2]=l.supportsOAuth,e[3]=i,e[4]=d):d=e[4],d}const c=`${s}:${n}`;let a;return e[5]!==s||e[6]!==c||e[7]!==n?(a=o.jsx(Ir,{toolName:n,connectionId:s},c),e[5]=s,e[6]=c,e[7]=n,e[8]=a):a=e[8],a}function Ir({toolName:t,connectionId:e}){const s=Wt().location.href,{replayId:i}=to({strict:!1}),r=(()=>{if(!i)return null;const _=`replay-${i}`,O=sessionStorage.getItem(_);if(!O)return null;sessionStorage.removeItem(_);try{return JSON.parse(O)}catch{return null}})(),l=(()=>{if(!r)return null;const _={};for(const[O,P]of Object.entries(r))P!==null&&typeof P=="object"?_[O]=JSON.stringify(P,null,2):_[O]=P;return _})(),[c,a]=k.useState(l??{}),[d,u]=k.useState(r?JSON.stringify(r,null,2):"{}"),[f,m]=k.useState(null),[h,p]=k.useState(null),[x,g]=k.useState(!1),[b,j]=k.useState(null),{org:S}=G(),y=ct(e),v=ne({connectionId:e,orgId:S.id}),w=nn({client:v}),N=w.data?.tools?.find(_=>_.name===t),E=N?.inputSchema?.properties,T=E?Object.keys(E):[],$=T.length>0,R={};if($&&N?.inputSchema?.properties)for(const _ of T)R[_]=N.inputSchema.required?.includes(_)?"":void 0;const L=_=>Object.prototype.hasOwnProperty.call(c,_),I=async()=>{g(!0),p(null),m(null),j(null);const _=performance.now();try{if(!v)throw new Error("MCP client is not available");const O=$?{...R,...c}:(()=>{const H=d.trim();if(!H)return{};const J=JSON.parse(H);if(J&&typeof J=="object")return J;throw new Error("Raw JSON input must be an object.")})();$&&N?.inputSchema?.properties&&Object.entries(N.inputSchema.properties).forEach(([H,J])=>{if((J.type==="object"||J.type==="array")&&typeof O[H]=="string")try{O[H]=JSON.parse(O[H])}catch{}});const P=await v.callTool({name:t,arguments:O}),Q=P.structuredContent??P,Z=performance.now(),F=Math.round(Z-_);m(Q);const K=JSON.stringify(Q),B=new TextEncoder().encode(K).length;j({duration:`${F}ms`,bytes:`${B} bytes`,tokens:`~${Math.ceil(B/4)} tokens`,cost:"$0.0000"})}catch(O){const P=O instanceof Error?O.message:String(O);p(P||"Unknown error occurred");const Q=performance.now();j({duration:`${Math.round(Q-_)}ms`})}finally{g(!1)}},A=(_,O)=>{a(P=>({...P,[_]:O}))},W=()=>{m(null),p(null),j(null)},z=N?.name??yn(t),X=o.jsx(Kn,{children:o.jsxs(Jn,{children:[o.jsx(Pe,{children:o.jsx(st,{asChild:!0,children:o.jsx(et,{to:"/$org/$project/mcps",params:{org:S.slug,project:tt},children:"Connections"})})}),o.jsx(ot,{}),y&&o.jsxs(o.Fragment,{children:[o.jsx(Pe,{children:o.jsx(st,{asChild:!0,children:o.jsx(et,{to:"/$org/$project/mcps/$connectionId",params:{org:S.slug,project:tt,connectionId:e},search:{tab:"tools"},children:y.title})})}),o.jsx(ot,{})]}),o.jsx(Pe,{children:o.jsx(Gn,{children:z})})]})});return o.jsxs(he,{breadcrumb:X,children:[o.jsx(Xt,{children:o.jsx(qt,{title:N?.name??yn(t),url:s,icon:"build"})}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 h-full",children:[o.jsx("div",{className:"flex flex-col border-r border-border overflow-hidden",children:o.jsxs("div",{className:"flex-1 overflow-auto",children:[o.jsx("div",{className:"flex flex-col gap-4 p-6 border-b border-border min-h-28",children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(dt,{icon:y?.icon||null,name:y?.title||t,size:"sm",className:"shadow-sm shrink-0"}),o.jsx("h1",{className:"text-lg font-medium text-foreground leading-none",children:t}),o.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit",children:[w.isSuccess?o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):w.isLoading?o.jsx(Ue,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),o.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:w.isSuccess?"ready":w.isLoading?"connecting":"error"})]})]}),o.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:N?.description||"No description available"})]})}),o.jsxs("div",{className:"flex flex-col p-6 gap-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),N?.inputSchema?.required&&N.inputSchema.required.length>0&&o.jsxs("span",{className:"text-xs text-muted-foreground",children:[o.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),o.jsx("div",{className:"space-y-4",children:$&&N?.inputSchema?.properties?Object.entries(N.inputSchema.properties).map(([_,O])=>o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[_,N.inputSchema?.required?.includes(_)&&o.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),o.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:O.type})]}),O.description&&o.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:O.description}),O.type==="object"||O.type==="array"?o.jsx(Mt,{className:"font-mono text-xs",value:L(_)?c[_]??"":R[_]??"",onChange:P=>A(_,P.target.value),placeholder:`Enter ${_} as JSON...`,rows:3}):O.type==="boolean"?o.jsxs(Hn,{value:L(_)?String(c[_]??""):"",onValueChange:P=>A(_,P==="true"),children:[o.jsx(Vn,{children:o.jsx(Un,{placeholder:"Select true or false..."})}),o.jsxs(Bn,{children:[o.jsx(nt,{value:"true",children:"true"}),o.jsx(nt,{value:"false",children:"false"})]})]}):o.jsx(Gt,{value:L(_)?c[_]??"":R[_]??"",onChange:P=>A(_,P.target.value),placeholder:`Enter ${_}...`})]},_)):N?.inputSchema&&!$?o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),o.jsx(Mt,{className:"font-mono text-xs min-h-[120px]",value:d,onChange:_=>u(_.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):o.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:o.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})})]})]})}),o.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[o.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-t lg:border-t-0 border-b border-border bg-background",children:[o.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),b&&o.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(yo,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(ls,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(us,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&o.jsx("div",{className:"flex items-center gap-1.5",children:o.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]})]}),o.jsx("div",{className:"flex items-center justify-end lg:justify-between px-4 h-14 border-b border-border bg-background",children:o.jsxs("div",{className:"flex items-center gap-2 w-full lg:w-auto",children:[o.jsx(Y,{size:"sm",variant:"default",className:"h-8 gap-2 flex-1 lg:flex-none",onClick:I,disabled:x,children:x?o.jsxs(o.Fragment,{children:[o.jsx(Ue,{size:14,className:"animate-spin"}),"Executing..."]}):o.jsxs(o.Fragment,{children:[o.jsx(tn,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})}),o.jsx(Qt,{children:o.jsxs(Zt,{children:[o.jsx(Yt,{asChild:!0,children:o.jsx(Y,{size:"icon",variant:"outline",className:"h-8 w-8 shrink-0",onClick:W,disabled:!f&&!h,children:o.jsx(at,{size:14})})}),o.jsx(en,{children:o.jsx("p",{children:"Clear results"})})]})})]})}),h&&o.jsx("div",{className:"px-6 py-4 bg-background",children:o.jsx(wr,{variant:"destructive",children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(So,{className:"h-4 w-4"}),o.jsx(Nr,{className:"mb-0",children:"Execution Failed"})]}),o.jsx(Cr,{className:"text-xs text-destructive",children:h})]})})}),o.jsx("div",{className:"relative flex-1 overflow-auto bg-muted/50",children:f?o.jsxs(o.Fragment,{children:[o.jsx(Le,{code:JSON.stringify(f,null,2),language:"json",height:"100%",readOnly:!0}),o.jsx(Y,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(f,null,2)),On.success("Copied to clipboard")},children:o.jsx(No,{className:"h-3.5 w-3.5"})})]}):o.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[o.jsx(wo,{className:"h-12 w-12 mb-3 opacity-40"}),o.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]})]})]})}function _r(t){const e=C.c(7),{itemId:n,onBack:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},e[0]=i):i=e[0];const l=pe(i).connectionId;if(!ct(l)||!l){let u;return e[1]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[o.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[1]=u):u=e[1],u}let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(Ue,{size:32,className:"animate-spin text-muted-foreground"})}),e[2]=a):a=e[2];let d;return e[3]!==l||e[4]!==s||e[5]!==n?(d=o.jsx(k.Suspense,{fallback:a,children:o.jsx(kr,{toolName:n,connectionId:l,onBack:s})}),e[3]=l,e[4]=s,e[5]=n,e[6]=d):d=e[6],d}const wn=t=>{let e;const n=new Set,s=(d,u)=>{const f=typeof d=="function"?d(e):d;if(!Object.is(f,e)){const m=e;e=u??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(h=>h(e,m))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:d=>(n.add(d),()=>n.delete(d))},a=e=t(s,i,c);return c},an=(t=>t?wn(t):wn),Er=t=>t;function Pt(t,e=Er){const n=q.useSyncExternalStore(t.subscribe,q.useCallback(()=>e(t.getState()),[t,e]),q.useCallback(()=>e(t.getInitialState()),[t,e]));return q.useDebugValue(n),n}const Tr=t=>{const e=an(t),n=s=>Pt(e,s);return Object.assign(n,e),n},$r=(t=>Tr);function ps(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const Lt=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return Lt(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return Lt(s)(n)}}}},Or=(t,e)=>(n,s,i)=>{let r={storage:ps(()=>window.localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,d=new Set;let u=r.storage;if(!u)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return u.setItem(r.name,{state:g,version:r.version})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const h=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>h;let p;const x=()=>{var g,b;if(!u)return;const j=++c;l=!1,a.forEach(y=>{var v;return y((v=s())!=null?v:h)});const S=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:h))||void 0;return Lt(u.getItem.bind(u))(r.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==r.version){if(r.migrate){const v=r.migrate(y.state,y.version);return v instanceof Promise?v.then(w=>[!0,w]):[!0,v]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var v;if(j!==c)return;const[w,N]=y;if(p=r.merge(N,(v=s())!=null?v:h),n(p,!0),w)return f()}).then(()=>{j===c&&(S?.(p,void 0),p=s(),l=!0,d.forEach(y=>y(p)))}).catch(y=>{j===c&&S?.(void 0,y)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(u=g.storage)},clearStorage:()=>{u?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>x(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(d.add(g),()=>{d.delete(g)})},r.skipHydration||x(),p||h},xs=Or,{useSyncExternalStoreWithSelector:Rr}=no,Ar=t=>t;function Mr(t,e=Ar,n){const s=Rr(t.subscribe,t.getState,t.getInitialState,e,n);return q.useDebugValue(s),s}const Nn=t=>Symbol.iterator in t,Cn=t=>"entries"in t,kn=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},Pr=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function Lr(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:Nn(t)&&Nn(e)?Cn(t)&&Cn(e)?kn(t,e):Pr(t,e):kn({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Dr(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
1
+ import{b4 as te,r as k,o as Zs,s as It,c as C,j as o,by as Wt,u as G,l as Ys,y as eo,e as pe,a as to,aE as et,O as tt,t as On,bm as q,bQ as no,bR as so,aH as oo,ar as Ft,au as de,aw as Rn,aI as ro,ap as Ht,aG as io,aJ as An,as as Mn,aP as lo,aQ as co,ax as Pn,aR as ao,bS as Vt,bT as uo,al as fo,bo as mo,ao as po,m as xo,bU as ho,bV as go,bW as Ln}from"./index-DwBgLSti.js";import{E as Dn}from"./empty-state-sMx3NP6e.js";import{E as zn}from"./error-boundary-lFjWy2-n.js";import{d as Ut,u as Bt,f as ct,h as bo}from"./use-connection-BEGrPCmR.js";import{u as ne,g as Be,i as jo}from"./constants-8URKDp4Y.js";import{P as qt}from"./index-DnrfuViL.js";import{F as _t,a as vo,b as Kt,d as Jt}from"./form-BMtUcs2k.js";import{I as Gt}from"./input-B7id4I1j.js";import{T as Mt}from"./textarea-GWXLFYfv.js";import{b as Wn,V as Xt,a as he}from"./layout-Ck3H2-cu.js";import{S as Fn}from"./save-actions-BPg_8VMI.js";import{c as M,B as Y}from"./button-D6YZfFzy.js";import{S as Hn,a as Vn,b as Un,c as Bn,d as nt}from"./select-CkeKfTEx.js";import{c as Qt,T as Zt,a as Yt,b as en,i as qn}from"./tooltip-D71dCz4E.js";import{i as So}from"./AlertCircle-BzYW4X7z.js";import{s as yo}from"./Clock-IA7N95Qq.js";import{i as wo}from"./Code01-DP2jwP0n.js";import{a as No}from"./Copy01-Dq7Edhtu.js";import{i as Ue}from"./Loading01-BHMOj-H5.js";import{i as tn}from"./Play-APj1Lxit.js";import{s as at}from"./XClose-Dgr_gyyv.js";import{B as Kn,a as Jn,b as Pe,d as st,e as ot,c as Gn}from"./breadcrumb-DeYbtjMk.js";import{u as Co,O as ko,M as Io,F as _o,v as Eo}from"./index-CCjxSJ1y.js";import{d as nn,b as sn,a as on}from"./use-mcp-tools-BAsmCzEJ.js";import{I as dt}from"./integration-icon-qV_BsBQR.js";import{M as Le,n as To,S as $o,a as Oo}from"./scroll-area-CcejXaMp.js";import{E as rn}from"./empty-state-BA6UkF4p.js";import{n as Ro}from"./Container-jfv9L6Hc.js";import{b as Xn}from"./use-virtual-mcp-DBzFAk7J.js";import{b as Ao,a as jn,R as Mo}from"./resizable-jXkpfiVS.js";import{B as me}from"./badge-Do8iK9u9.js";import{S as ut}from"./spinner-DZtD-MX0.js";import{V as Po}from"./view-mode-toggle-2-qyK3LU.js";import{N as Lo,S as Do,a as zo,c as Wo,m as Qe,P as Fo,i as Ho,R as Vo,u as Uo,b as Bo,d as vn,E as qo,e as Ko}from"./index-QQ-XmLlG.js";import{a as Jo}from"./use-binding-DbH4Xe03.js";import{b as Go,c as Xo,d as Qo,e as Zo,a as Yo,D as er}from"./dialog-DSPMVHyJ.js";import"./index-DJ_LDW-E.js";import{s as Qn}from"./Plus-DNqvDLOK.js";import{c as Zn}from"./AlertOctagon-CUysWl_m.js";import{i as ft}from"./Check-Bv0pZ3gl.js";import{i as tr}from"./DotsHorizontal-CQ-MbYsC.js";import{a as nr,h as sr,R as or,j as rr,k as Yn}from"./use-deco-chat-open-CxG3qwlT.js";import{D as ir,a as lr,b as cr,c as Sn}from"./dropdown-menu-CRT7qGQ9.js";import{i as ar}from"./ChevronRight-DgAfR8pA.js";import{c as dr}from"./context-DHicyHl4.js";import"./AlertTriangle-DniGvpwb.js";import"./useMutation-DgG1LVg-.js";import"./Pin01-8MTlfWD2.js";import"./use-organization-settings-BJ9tNAL9.js";import"./label-29qY4FPs.js";import"./index-B_nMIrSY.js";import"./use-mobile-Bs0AkxK7.js";import"./Save01-D-T2SbCx.js";import"./ChevronDown-CggIFEVQ.js";import"./mcp-oauth-Bb9gvF4o.js";import"./File06-2US99J_V.js";import"./Key01-CfL5jY3W.js";import"./constants-oXq_cTdm.js";import"./registry-utils-DMdc5PTp.js";import"./extract-connection-data-B39uuFqG.js";import"./github-icon-Dp3wHhYE.js";import"./generate-id-Dyweu44Y.js";import"./use-install-from-registry-CSDJ0ZgD.js";import"./circle-alert-YjViK8VE.js";import"./index-DmoBx0VC.js";import"./useQuery-CPsXfVfR.js";import"./popover-pjzQQlLd.js";import"./skeleton-DNLZ4Kho.js";import"./localstorage-keys-Ct4C992S.js";import"./use-mcp-prompts-qD8uHlkj.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-G8RCE5_O.js";import"./Edit01-DRruZKzG.js";import"./Users03-C1B58zTV.js";import"./XCircle-DneNZUk0.js";import"./ArrowLeft-dS1h2Fqu.js";import"./use-copy-DsHlaDHD.js";import"./SearchMd-BLcaRHQs.js";import"./use-create-virtual-mcp-BzTARjrD.js";import"./deco-constants-CyaJG-D1.js";import"./marked.esm-BaswSlok.js";import"./markdown-jp5pFlBz.js";import"./Eye-B9ZDOUkE.js";import"./Globe02-BPmEw10H.js";import"./Trash01-CkTOgej8.js";import"./binder-BBB8LQyx.js";import"./decopilot-events-Brt4gAR6.js";import"./use-llm-BbYG_RIr.js";import"./Grid01-CJW4ZLO5.js";import"./Image01-C9h8llDV.js";import"./RefreshCcw01-4dzpBOob.js";import"./Settings01-DKXbh8uh.js";import"./useSuspenseInfiniteQuery-CuH1Eku2.js";import"./infiniteQueryObserver-Yvt0ZTml.js";const es=te("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const ts=te("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const ln=te("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const cn=te("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const ur=te("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const fr=te("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const mr=te("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const ns=te("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const ss=te("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const os=te("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const pr=te("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const rs=te("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const is=te("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]),ls=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M20.5 8v8.2c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.22 21 17.38 21 15.7 21H8.3c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3.5 18.72 3.5 17.88 3.5 16.2V8m.1-5h16.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C22 3.76 22 4.04 22 4.6v1.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C21.24 8 20.96 8 20.4 8H3.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C2 7.24 2 6.96 2 6.4V4.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C2.76 3 3.04 3 3.6 3Zm6 8.5h4.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C16 12.26 16 12.54 16 13.1v.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437c-.214.109-.494.109-1.054.109H9.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C8 14.74 8 14.46 8 13.9v-.8c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C8.76 11.5 9.04 11.5 9.6 11.5Z"}));ls.displayName="Box";const cs=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m22.7 11.5-2 2-2-2m2.245 1.5A9 9 0 1 0 19 17.657M12 7v5l3 2"}));cs.displayName="ClockFastForward";const as=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m17 17 5-5-5-5M7 7l-5 5 5 5m7-14-4 18"}));as.displayName="Code02";const Ze=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M6.8 3h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C3 4.52 3 5.08 3 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C4.52 21 5.08 21 6.2 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C10 19.48 10 18.92 10 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C8.48 3 7.92 3 6.8 3Zm11 0h-.6c-1.12 0-1.68 0-2.108.218a2 2 0 0 0-.874.874C14 4.52 14 5.08 14 6.2v11.6c0 1.12 0 1.68.218 2.108a2 2 0 0 0 .874.874C15.52 21 16.08 21 17.2 21h.6c1.12 0 1.68 0 2.108-.218a2 2 0 0 0 .874-.874C21 19.48 21 18.92 21 17.8V6.2c0-1.12 0-1.68-.218-2.108a2 2 0 0 0-.874-.874C19.48 3 18.92 3 17.8 3Z"}));Ze.displayName="Columns01";const ds=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M4 4v1.4c0 3.36 0 5.04.654 6.324a6 6 0 0 0 2.622 2.622C8.56 15 10.24 15 13.6 15H20m0 0-5-5m5 5-5 5"}));ds.displayName="CornerDownRight";const us=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M21 5c0 1.657-4.03 3-9 3S3 6.657 3 5m18 0c0-1.657-4.03-3-9-3S3 3.343 3 5m18 0v14c0 1.66-4 3-9 3s-9-1.34-9-3V5m18 7c0 1.66-4 3-9 3s-9-1.34-9-3"}));us.displayName="Database01";const fs=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"M3 3v10.2c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 18 6.12 18 7.8 18H15m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0ZM3 8h12m0 0a3 3 0 1 0 6 0 3 3 0 0 0-6 0Z"}));fs.displayName="GitBranch01";const ms=({size:t=24,color:e="currentColor",...n})=>k.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},k.createElement("path",{d:"m13 22-3-3m0 0 3-3m-3 3h5a7 7 0 0 0 3-13.326M6 18.326A7 7 0 0 1 9 5h5m0 0-3-3m3 3-3 3"}));ms.displayName="Repeat03";Zs({title:It().min(1),description:It().nullable(),body:It()});function Et(t){for(const e of t.messages??[])if(e.role==="user"&&e.content?.type==="text")return e.content.text??"";return""}function xr(){const t=window.location.pathname.split("/").filter(Boolean),e=t.findIndex(s=>s==="mcps"),n=e>=0?t[e+1]:void 0;return n?decodeURIComponent(n):void 0}function hr(t){const e=C.c(13),{form:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=o.jsx("div",{className:"text-sm font-medium text-foreground",children:"Details"}),e[0]=s):s=e[0];let i;e[1]!==n.control?(i=o.jsxs("div",{className:"flex flex-col gap-4",children:[s,o.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[o.jsx(_t,{control:n.control,name:"title",render:jr}),o.jsx(_t,{control:n.control,name:"description",render:br})]})]}),e[1]=n.control,e[2]=i):i=e[2];let r,l;e[3]===Symbol.for("react.memo_cache_sentinel")?(r=o.jsx("div",{className:"text-sm font-medium text-foreground",children:"Message"}),l=o.jsx("div",{className:"text-xs text-muted-foreground",children:"This becomes the user message in the prompt."}),e[3]=r,e[4]=l):(r=e[3],l=e[4]);let c;e[5]!==n.control?(c=o.jsxs("div",{className:"flex flex-col gap-2",children:[r,l,o.jsx(_t,{control:n.control,name:"body",render:gr})]}),e[5]=n.control,e[6]=c):c=e[6];let a;e[7]!==i||e[8]!==c?(a=o.jsxs("div",{className:"h-full py-6 flex flex-col max-w-3xl mx-auto w-full min-w-0 gap-8 overflow-y-auto px-4",children:[i,c]}),e[7]=i,e[8]=c,e[9]=a):a=e[9];let d;return e[10]!==n||e[11]!==a?(d=o.jsx(vo,{...n,children:a}),e[10]=n,e[11]=a,e[12]=d):d=e[12],d}function gr(t){const{field:e}=t;return o.jsx(Kt,{children:o.jsx(Jt,{children:o.jsx(Mt,{...e,value:e.value??"",placeholder:"Write the prompt message…",className:"min-h-[240px] resize-none text-base leading-relaxed font-normal rounded-xl border border-border bg-muted/20 px-4 py-3 shadow-none focus-visible:ring-0"})})})}function br(t){const{field:e}=t;return o.jsxs(Kt,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Description"}),o.jsx(Jt,{children:o.jsx(Gt,{...e,value:e.value??"",placeholder:"Add a description…",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function jr(t){const{field:e}=t;return o.jsxs(Kt,{children:[o.jsx("div",{className:"text-xs text-muted-foreground",children:"Title"}),o.jsx(Jt,{children:o.jsx(Gt,{...e,placeholder:"Untitled prompt",className:"h-9 rounded-lg border border-border bg-muted/20 shadow-none focus-visible:ring-0"})})]})}function vr(t){const e=C.c(41),{providerId:n,promptId:s}=t,r=Wt().location.href,{org:l}=G(),c=n||null;let a;e[0]!==l.id||e[1]!==c?(a={connectionId:c,orgId:l.id},e[0]=l.id,e[1]=c,e[2]=a):a=e[2];const d=ne(a),u=Ut(n,"PROMPT",s,d),f=Bt(n,"PROMPT",d),m=f.update.isPending;let h;e[3]!==u?(h=u?{title:u.title,description:u.description??null,body:Et(u)}:void 0,e[3]=u,e[4]=h):h=e[4];let p;e[5]!==h?(p={values:h},e[5]=h,e[6]=p):p=e[6];const x=Ys(p);let g;e[7]!==x||e[8]!==u?(g=()=>{u&&x.reset({title:u.title,description:u.description??null,body:Et(u)})},e[7]=x,e[8]=u,e[9]=g):g=e[9];const b=g;let j;e[10]!==f.update||e[11]!==x||e[12]!==s?(j=x.handleSubmit(async I=>{const A=await f.update.mutateAsync({id:s,data:{title:I.title,description:I.description,arguments:[],icons:[],messages:[{role:"user",content:{type:"text",text:I.body}}]}});x.reset({title:A.title,description:A.description??null,body:Et(A)})}),e[10]=f.update,e[11]=x,e[12]=s,e[13]=j):j=e[13];const S=j;if(!u){let I;return e[14]===Symbol.for("react.memo_cache_sentinel")?(I=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(Dn,{title:"Prompt not found",description:"This prompt may have been deleted or you may not have access to it."})}),e[14]=I):I=e[14],I}let y;e[15]!==u.title?(y=o.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:u.title}),e[15]=u.title,e[16]=y):y=e[16];let v;e[17]!==u.description?(v=u.description?o.jsxs(o.Fragment,{children:[o.jsx("span",{className:"text-xs text-muted-foreground font-normal",children:"•"}),o.jsx("span",{className:"text-xs text-muted-foreground font-normal truncate min-w-0 max-w-[20ch]",children:u.description})]}):null,e[17]=u.description,e[18]=v):v=e[18];let w;e[19]!==y||e[20]!==v?(w=o.jsx(Wn,{children:o.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[y,v]})}),e[19]=y,e[20]=v,e[21]=w):w=e[21];let N;e[22]!==S?(N=()=>{S()},e[22]=S,e[23]=N):N=e[23];let E;e[24]!==x.formState.isDirty||e[25]!==m||e[26]!==b||e[27]!==N?(E=o.jsx(Fn,{onSave:N,onUndo:b,isDirty:x.formState.isDirty,isSaving:m}),e[24]=x.formState.isDirty,e[25]=m,e[26]=b,e[27]=N,e[28]=E):E=e[28];let T;e[29]!==u.title||e[30]!==r?(T=o.jsx(qt,{title:u.title,url:r,icon:"description"}),e[29]=u.title,e[30]=r,e[31]=T):T=e[31];let $;e[32]!==E||e[33]!==T?($=o.jsxs(Xt,{children:[E,T]}),e[32]=E,e[33]=T,e[34]=$):$=e[34];let R;e[35]!==x?(R=o.jsx("div",{className:"h-full",children:o.jsx(hr,{form:x})}),e[35]=x,e[36]=R):R=e[36];let L;return e[37]!==$||e[38]!==R||e[39]!==w?(L=o.jsxs(he,{children:[w,$,R]}),e[37]=$,e[38]=R,e[39]=w,e[40]=L):L=e[40],L}function Sr(t){const e=C.c(4),{itemId:n}=t;let s;e[0]===Symbol.for("react.memo_cache_sentinel")?(s=xr(),e[0]=s):s=e[0];const i=s;if(!i){let l;return e[1]===Symbol.for("react.memo_cache_sentinel")?(l=o.jsx("div",{className:"flex h-full w-full bg-background",children:o.jsx(Dn,{title:"Prompt not found",description:"Missing connection information in the current route."})}),e[1]=l):l=e[1],l}let r;return e[2]!==n?(r=o.jsx(zn,{children:o.jsx(k.Suspense,{fallback:null,children:o.jsx(vr,{providerId:i,promptId:n})})}),e[2]=n,e[3]=r):r=e[3],r}const yr=eo("relative w-full rounded-lg border px-4 py-3 text-sm flex items-start gap-3 [&>svg]:size-4 [&>svg]:flex-shrink-0 [&>svg]:mt-0.5 [&>svg]:text-current",{variants:{variant:{default:"bg-card text-card-foreground",destructive:"bg-destructive/5 text-destructive border-destructive/25 [&>svg]:text-current *:data-[slot=alert-description]:text-destructive/90",warning:"bg-warning/10 text-warning-foreground border-warning [&>svg]:text-current *:data-[slot=alert-description]:text-warning-foreground/90",success:"bg-success/10 text-success-foreground border-success [&>svg]:text-current *:data-[slot=alert-description]:text-success-foreground/90",info:"bg-card text-card-foreground border-border [&>svg]:text-current *:data-[slot=alert-description]:text-muted-foreground/90"}},defaultVariants:{variant:"default"}});function wr(t){const e=C.c(10);let n,s,i;e[0]!==t?({className:n,variant:i,...s}=t,e[0]=t,e[1]=n,e[2]=s,e[3]=i):(n=e[1],s=e[2],i=e[3]);let r;e[4]!==n||e[5]!==i?(r=M(yr({variant:i}),n),e[4]=n,e[5]=i,e[6]=r):r=e[6];let l;return e[7]!==s||e[8]!==r?(l=o.jsx("div",{"data-slot":"alert",role:"alert",className:r,...s}),e[7]=s,e[8]=r,e[9]=l):l=e[9],l}function Nr(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=M("line-clamp-1 min-h-4 font-medium tracking-tight",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==s||e[6]!==i?(r=o.jsx("div",{"data-slot":"alert-title",className:i,...s}),e[5]=s,e[6]=i,e[7]=r):r=e[7],r}function Cr(t){const e=C.c(8);let n,s;e[0]!==t?({className:n,...s}=t,e[0]=t,e[1]=n,e[2]=s):(n=e[1],s=e[2]);let i;e[3]!==n?(i=M("text-muted-foreground leading-relaxed",n),e[3]=n,e[4]=i):i=e[4];let r;return e[5]!==s||e[6]!==i?(r=o.jsx("div",{"data-slot":"alert-description",className:i,...s}),e[5]=s,e[6]=i,e[7]=r):r=e[7],r}const yn=t=>t.replace(/_/g," ").replace(/\b\w/g,e=>e.toLocaleLowerCase());function kr(t){const e=C.c(9),{toolName:n,connectionId:s,onBack:i}=t;let r;e[0]!==s?(r={connectionId:s},e[0]=s,e[1]=r):r=e[1];const l=Co(r);if(!l.isAuthenticated){let d;return e[2]!==l.supportsOAuth||e[3]!==i?(d=o.jsx("div",{className:"flex h-full items-center justify-center",children:l.supportsOAuth?o.jsx(ko,{onAuthenticate:()=>i(),buttonText:"Go back to authenticate"}):o.jsx(Io,{hasReadme:!1})}),e[2]=l.supportsOAuth,e[3]=i,e[4]=d):d=e[4],d}const c=`${s}:${n}`;let a;return e[5]!==s||e[6]!==c||e[7]!==n?(a=o.jsx(Ir,{toolName:n,connectionId:s},c),e[5]=s,e[6]=c,e[7]=n,e[8]=a):a=e[8],a}function Ir({toolName:t,connectionId:e}){const s=Wt().location.href,{replayId:i}=to({strict:!1}),r=(()=>{if(!i)return null;const _=`replay-${i}`,O=sessionStorage.getItem(_);if(!O)return null;sessionStorage.removeItem(_);try{return JSON.parse(O)}catch{return null}})(),l=(()=>{if(!r)return null;const _={};for(const[O,P]of Object.entries(r))P!==null&&typeof P=="object"?_[O]=JSON.stringify(P,null,2):_[O]=P;return _})(),[c,a]=k.useState(l??{}),[d,u]=k.useState(r?JSON.stringify(r,null,2):"{}"),[f,m]=k.useState(null),[h,p]=k.useState(null),[x,g]=k.useState(!1),[b,j]=k.useState(null),{org:S}=G(),y=ct(e),v=ne({connectionId:e,orgId:S.id}),w=nn({client:v}),N=w.data?.tools?.find(_=>_.name===t),E=N?.inputSchema?.properties,T=E?Object.keys(E):[],$=T.length>0,R={};if($&&N?.inputSchema?.properties)for(const _ of T)R[_]=N.inputSchema.required?.includes(_)?"":void 0;const L=_=>Object.prototype.hasOwnProperty.call(c,_),I=async()=>{g(!0),p(null),m(null),j(null);const _=performance.now();try{if(!v)throw new Error("MCP client is not available");const O=$?{...R,...c}:(()=>{const H=d.trim();if(!H)return{};const J=JSON.parse(H);if(J&&typeof J=="object")return J;throw new Error("Raw JSON input must be an object.")})();$&&N?.inputSchema?.properties&&Object.entries(N.inputSchema.properties).forEach(([H,J])=>{if((J.type==="object"||J.type==="array")&&typeof O[H]=="string")try{O[H]=JSON.parse(O[H])}catch{}});const P=await v.callTool({name:t,arguments:O}),Q=P.structuredContent??P,Z=performance.now(),F=Math.round(Z-_);m(Q);const K=JSON.stringify(Q),B=new TextEncoder().encode(K).length;j({duration:`${F}ms`,bytes:`${B} bytes`,tokens:`~${Math.ceil(B/4)} tokens`,cost:"$0.0000"})}catch(O){const P=O instanceof Error?O.message:String(O);p(P||"Unknown error occurred");const Q=performance.now();j({duration:`${Math.round(Q-_)}ms`})}finally{g(!1)}},A=(_,O)=>{a(P=>({...P,[_]:O}))},W=()=>{m(null),p(null),j(null)},z=N?.name??yn(t),X=o.jsx(Kn,{children:o.jsxs(Jn,{children:[o.jsx(Pe,{children:o.jsx(st,{asChild:!0,children:o.jsx(et,{to:"/$org/$project/mcps",params:{org:S.slug,project:tt},children:"Connections"})})}),o.jsx(ot,{}),y&&o.jsxs(o.Fragment,{children:[o.jsx(Pe,{children:o.jsx(st,{asChild:!0,children:o.jsx(et,{to:"/$org/$project/mcps/$connectionId",params:{org:S.slug,project:tt,connectionId:e},search:{tab:"tools"},children:y.title})})}),o.jsx(ot,{})]}),o.jsx(Pe,{children:o.jsx(Gn,{children:z})})]})});return o.jsxs(he,{breadcrumb:X,children:[o.jsx(Xt,{children:o.jsx(qt,{title:N?.name??yn(t),url:s,icon:"build"})}),o.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 h-full",children:[o.jsx("div",{className:"flex flex-col border-r border-border overflow-hidden",children:o.jsxs("div",{className:"flex-1 overflow-auto",children:[o.jsx("div",{className:"flex flex-col gap-4 p-6 border-b border-border min-h-28",children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center gap-3",children:[o.jsx(dt,{icon:y?.icon||null,name:y?.title||t,size:"sm",className:"shadow-sm shrink-0"}),o.jsx("h1",{className:"text-lg font-medium text-foreground leading-none",children:t}),o.jsxs("div",{className:"flex items-center gap-2 px-2.5 py-1 bg-muted/50 rounded-md h-fit",children:[w.isSuccess?o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-green-500 animate-pulse shrink-0"}):w.isLoading?o.jsx(Ue,{size:10,className:"animate-spin text-yellow-500 shrink-0"}):o.jsx("div",{className:"h-1.5 w-1.5 rounded-full bg-red-500 shrink-0"}),o.jsx("span",{className:"font-mono text-xs capitalize text-muted-foreground leading-none",children:w.isSuccess?"ready":w.isLoading?"connecting":"error"})]})]}),o.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed",children:N?.description||"No description available"})]})}),o.jsxs("div",{className:"flex flex-col p-6 gap-4",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsx("h2",{className:"text-sm font-semibold text-foreground uppercase tracking-wide",children:"Parameters"}),N?.inputSchema?.required&&N.inputSchema.required.length>0&&o.jsxs("span",{className:"text-xs text-muted-foreground",children:[o.jsx("span",{className:"text-red-500",children:"*"})," Required"]})]}),o.jsx("div",{className:"space-y-4",children:$&&N?.inputSchema?.properties?Object.entries(N.inputSchema.properties).map(([_,O])=>o.jsxs("div",{className:"space-y-2",children:[o.jsxs("div",{className:"flex items-center justify-between",children:[o.jsxs("label",{className:"text-sm font-medium leading-none flex items-center gap-1.5",children:[_,N.inputSchema?.required?.includes(_)&&o.jsx("span",{className:"text-red-500 text-xs",children:"*"})]}),o.jsx("span",{className:"text-xs text-muted-foreground font-mono",children:O.type})]}),O.description&&o.jsx("p",{className:"text-xs text-muted-foreground leading-relaxed",children:O.description}),O.type==="object"||O.type==="array"?o.jsx(Mt,{className:"font-mono text-xs",value:L(_)?c[_]??"":R[_]??"",onChange:P=>A(_,P.target.value),placeholder:`Enter ${_} as JSON...`,rows:3}):O.type==="boolean"?o.jsxs(Hn,{value:L(_)?String(c[_]??""):"",onValueChange:P=>A(_,P==="true"),children:[o.jsx(Vn,{children:o.jsx(Un,{placeholder:"Select true or false..."})}),o.jsxs(Bn,{children:[o.jsx(nt,{value:"true",children:"true"}),o.jsx(nt,{value:"false",children:"false"})]})]}):o.jsx(Gt,{value:L(_)?c[_]??"":R[_]??"",onChange:P=>A(_,P.target.value),placeholder:`Enter ${_}...`})]},_)):N?.inputSchema&&!$?o.jsxs("div",{className:"space-y-2",children:[o.jsx("label",{className:"text-sm font-medium",children:"Raw JSON Input"}),o.jsx(Mt,{className:"font-mono text-xs min-h-[120px]",value:d,onChange:_=>u(_.target.value),placeholder:'e.g. { "foo": "bar" }'})]}):o.jsx("div",{className:"flex items-center justify-center p-8 bg-muted/30 rounded-lg border border-dashed border-border",children:o.jsx("p",{className:"text-sm text-muted-foreground",children:"No parameters required"})})})]})]})}),o.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[o.jsxs("div",{className:"flex items-center justify-between px-4 h-14 border-t lg:border-t-0 border-b border-border bg-background",children:[o.jsx("h2",{className:"text-sm font-medium text-foreground uppercase tracking-wide",children:"Result"}),b&&o.jsxs("div",{className:"flex items-center gap-3 text-xs",children:[o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(yo,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:b.duration})]}),b.tokens&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(ls,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:b.tokens})]}),b.bytes&&o.jsxs("div",{className:"flex items-center gap-1.5",children:[o.jsx(us,{className:"h-3 w-3 text-muted-foreground"}),o.jsx("span",{className:"font-mono text-foreground",children:b.bytes})]}),b.cost&&o.jsx("div",{className:"flex items-center gap-1.5",children:o.jsx("span",{className:"font-mono text-foreground",children:b.cost})})]})]}),o.jsx("div",{className:"flex items-center justify-end lg:justify-between px-4 h-14 border-b border-border bg-background",children:o.jsxs("div",{className:"flex items-center gap-2 w-full lg:w-auto",children:[o.jsx(Y,{size:"sm",variant:"default",className:"h-8 gap-2 flex-1 lg:flex-none",onClick:I,disabled:x,children:x?o.jsxs(o.Fragment,{children:[o.jsx(Ue,{size:14,className:"animate-spin"}),"Executing..."]}):o.jsxs(o.Fragment,{children:[o.jsx(tn,{className:"h-3.5 w-3.5 fill-current"}),"Execute Tool"]})}),o.jsx(Qt,{children:o.jsxs(Zt,{children:[o.jsx(Yt,{asChild:!0,children:o.jsx(Y,{size:"icon",variant:"outline",className:"h-8 w-8 shrink-0",onClick:W,disabled:!f&&!h,children:o.jsx(at,{size:14})})}),o.jsx(en,{children:o.jsx("p",{children:"Clear results"})})]})})]})}),h&&o.jsx("div",{className:"px-6 py-4 bg-background",children:o.jsx(wr,{variant:"destructive",children:o.jsxs("div",{className:"flex flex-col gap-2",children:[o.jsxs("div",{className:"flex items-center gap-2",children:[o.jsx(So,{className:"h-4 w-4"}),o.jsx(Nr,{className:"mb-0",children:"Execution Failed"})]}),o.jsx(Cr,{className:"text-xs text-destructive",children:h})]})})}),o.jsx("div",{className:"relative flex-1 overflow-auto bg-muted/50",children:f?o.jsxs(o.Fragment,{children:[o.jsx(Le,{code:JSON.stringify(f,null,2),language:"json",height:"100%",readOnly:!0}),o.jsx(Y,{size:"icon",variant:"ghost",className:"absolute top-4 right-4 h-8 w-8 bg-background/80 hover:bg-background border border-border shadow-sm",onClick:()=>{navigator.clipboard.writeText(JSON.stringify(f,null,2)),On.success("Copied to clipboard")},children:o.jsx(No,{className:"h-3.5 w-3.5"})})]}):o.jsxs("div",{className:"absolute inset-0 flex flex-col items-center justify-center text-muted-foreground",children:[o.jsx(wo,{className:"h-12 w-12 mb-3 opacity-40"}),o.jsx("p",{className:"text-sm",children:"Run the tool to see results"})]})})]})]})]})}function _r(t){const e=C.c(7),{itemId:n,onBack:s}=t;let i;e[0]===Symbol.for("react.memo_cache_sentinel")?(i={strict:!1},e[0]=i):i=e[0];const l=pe(i).connectionId;if(!ct(l)||!l){let u;return e[1]===Symbol.for("react.memo_cache_sentinel")?(u=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[o.jsx("h3",{className:"text-lg font-semibold",children:"Connection not found"}),o.jsx("p",{className:"text-sm text-muted-foreground",children:"This connection may have been deleted or you may not have access."})]})}),e[1]=u):u=e[1],u}let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=o.jsx("div",{className:"flex h-full items-center justify-center",children:o.jsx(Ue,{size:32,className:"animate-spin text-muted-foreground"})}),e[2]=a):a=e[2];let d;return e[3]!==l||e[4]!==s||e[5]!==n?(d=o.jsx(k.Suspense,{fallback:a,children:o.jsx(kr,{toolName:n,connectionId:l,onBack:s})}),e[3]=l,e[4]=s,e[5]=n,e[6]=d):d=e[6],d}const wn=t=>{let e;const n=new Set,s=(d,u)=>{const f=typeof d=="function"?d(e):d;if(!Object.is(f,e)){const m=e;e=u??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(h=>h(e,m))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:d=>(n.add(d),()=>n.delete(d))},a=e=t(s,i,c);return c},an=(t=>t?wn(t):wn),Er=t=>t;function Pt(t,e=Er){const n=q.useSyncExternalStore(t.subscribe,q.useCallback(()=>e(t.getState()),[t,e]),q.useCallback(()=>e(t.getInitialState()),[t,e]));return q.useDebugValue(n),n}const Tr=t=>{const e=an(t),n=s=>Pt(e,s);return Object.assign(n,e),n},$r=(t=>Tr);function ps(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const Lt=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return Lt(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return Lt(s)(n)}}}},Or=(t,e)=>(n,s,i)=>{let r={storage:ps(()=>window.localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,d=new Set;let u=r.storage;if(!u)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return u.setItem(r.name,{state:g,version:r.version})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const h=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>h;let p;const x=()=>{var g,b;if(!u)return;const j=++c;l=!1,a.forEach(y=>{var v;return y((v=s())!=null?v:h)});const S=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:h))||void 0;return Lt(u.getItem.bind(u))(r.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==r.version){if(r.migrate){const v=r.migrate(y.state,y.version);return v instanceof Promise?v.then(w=>[!0,w]):[!0,v]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var v;if(j!==c)return;const[w,N]=y;if(p=r.merge(N,(v=s())!=null?v:h),n(p,!0),w)return f()}).then(()=>{j===c&&(S?.(p,void 0),p=s(),l=!0,d.forEach(y=>y(p)))}).catch(y=>{j===c&&S?.(void 0,y)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(u=g.storage)},clearStorage:()=>{u?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>x(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(d.add(g),()=>{d.delete(g)})},r.skipHydration||x(),p||h},xs=Or,{useSyncExternalStoreWithSelector:Rr}=no,Ar=t=>t;function Mr(t,e=Ar,n){const s=Rr(t.subscribe,t.getState,t.getInitialState,e,n);return q.useDebugValue(s),s}const Nn=t=>Symbol.iterator in t,Cn=t=>"entries"in t,kn=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},Pr=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function Lr(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:Nn(t)&&Nn(e)?Cn(t)&&Cn(e)?kn(t,e):Pr(t,e):kn({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Dr(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
2
2
  ${Object.entries(l).map(([d,u])=>{const f=c.has(d)?"":"?";return`${u.description?` /** ${u.description} */
3
3
  `:""} ${d}${f}: ${n(u)};`}).join(`
4
4
  `)}
@@ -1 +1 @@
1
- import{c as v,j as i}from"./index-DQipirM0.js";import{i as w}from"./Loading01-BFMhWWtD.js";import{i as C}from"./SearchMd-Dvn1Eo76.js";import{I as k}from"./input-D3a40-af.js";import{c as b}from"./button-BxOn_P7A.js";function R(j){const e=v.c(21),{value:m,onChange:d,placeholder:g,onKeyDown:f,className:p,isSearching:u,disabled:n}=j,x=g===void 0?"Search...":g;let t;e[0]!==p?(t=b("shrink-0 w-full border-b border-border h-12",p),e[0]=p,e[1]=t):t=e[1];const h=n?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let r;e[4]!==u?(r=u?i.jsx(w,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):i.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=u,e[5]=r):r=e[5];let o;e[6]!==d?(o=N=>d(N.target.value),e[6]=d,e[7]=o):o=e[7];let l;e[8]!==n||e[9]!==f||e[10]!==x||e[11]!==o||e[12]!==m?(l=i.jsx(k,{value:m,onChange:o,onKeyDown:f,placeholder:x,disabled:n,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"}),e[8]=n,e[9]=f,e[10]=x,e[11]=o,e[12]=m,e[13]=l):l=e[13];let a;e[14]!==s||e[15]!==r||e[16]!==l?(a=i.jsxs("label",{className:s,children:[r,l]}),e[14]=s,e[15]=r,e[16]=l,e[17]=a):a=e[17];let c;return e[18]!==t||e[19]!==a?(c=i.jsx("div",{className:t,children:a}),e[18]=t,e[19]=a,e[20]=c):c=e[20],c}export{R as C};
1
+ import{c as v,j as i}from"./index-DwBgLSti.js";import{i as w}from"./Loading01-BHMOj-H5.js";import{i as C}from"./SearchMd-BLcaRHQs.js";import{I as k}from"./input-B7id4I1j.js";import{c as b}from"./button-D6YZfFzy.js";function R(j){const e=v.c(21),{value:m,onChange:d,placeholder:g,onKeyDown:f,className:p,isSearching:u,disabled:n}=j,x=g===void 0?"Search...":g;let t;e[0]!==p?(t=b("shrink-0 w-full border-b border-border h-12",p),e[0]=p,e[1]=t):t=e[1];const h=n?"cursor-not-allowed opacity-50":"cursor-text";let s;e[2]!==h?(s=b("flex items-center gap-2.5 h-12 px-4",h),e[2]=h,e[3]=s):s=e[3];let r;e[4]!==u?(r=u?i.jsx(w,{size:16,className:"animate-spin text-muted-foreground shrink-0"}):i.jsx(C,{size:16,className:"text-muted-foreground shrink-0"}),e[4]=u,e[5]=r):r=e[5];let o;e[6]!==d?(o=N=>d(N.target.value),e[6]=d,e[7]=o):o=e[7];let l;e[8]!==n||e[9]!==f||e[10]!==x||e[11]!==o||e[12]!==m?(l=i.jsx(k,{value:m,onChange:o,onKeyDown:f,placeholder:x,disabled:n,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"}),e[8]=n,e[9]=f,e[10]=x,e[11]=o,e[12]=m,e[13]=l):l=e[13];let a;e[14]!==s||e[15]!==r||e[16]!==l?(a=i.jsxs("label",{className:s,children:[r,l]}),e[14]=s,e[15]=r,e[16]=l,e[17]=a):a=e[17];let c;return e[18]!==t||e[19]!==a?(c=i.jsx("div",{className:t,children:a}),e[18]=t,e[19]=a,e[20]=c):c=e[20],c}export{R as C};
@@ -1 +1 @@
1
- import{c as Ae,j as t,b as Ye,d as Ze,u as et,r as tt,O as $e,t as st}from"./index-DQipirM0.js";import{g as Oe}from"./generate-id-Dyweu44Y.js";import{a as ot,C as Fe}from"./collection-table-wrapper-DpYYlIci.js";import{C as it}from"./collection-search-WzmN-NEH.js";import{C as nt}from"./card-DMS-g9Fe.js";import{I as ke}from"./integration-icon-6FQvxTss.js";import{D as Ke,a as Ue,b as Le,c as k}from"./dropdown-menu-BbhseL--.js";import{B as Ie}from"./button-BxOn_P7A.js";import{a as Be}from"./Copy01-BpXeBtQY.js";import{i as Re}from"./DotsVertical-_M8uWFPN.js";import{i as Ve}from"./Edit01-BOdZHKPa.js";import{s as Ge}from"./Eye-D_CQVe6k.js";import{s as Je}from"./Trash01-BC7PAlKV.js";import{E as ze}from"./empty-state-CSzTWTZI.js";import{n as Ee}from"./Inbox01-Dl3sNTM-.js";import{U as rt,u as lt}from"./use-list-state-DjtYoYEW.js";import{E as at}from"./empty-state-C7VZap1W.js";import{B as ct}from"./constants-CS_UcM7e.js";import{A as dt,g as pt,c as mt,b as ut,d as ft,e as ht,a as xt,f as gt}from"./alert-dialog-K0UnFp_v.js";import{u as jt,e as Ct}from"./use-connection-DXequUdB.js";import{u as vt}from"./constants-9bKBT988.js";import{s as bt}from"./Plus-Ck954sGm.js";import{V as yt}from"./layout-C5y_iFls.js";function Nt(n,e){const s=n.properties||{};for(const i in s){const l=s[i];if(l&&l.type==="string"&&(l.format==="url"||l.format==="uri")&&e&&typeof e=="object"&&i in e&&e[i])return e[i]}const r=["image","img","avatar","icon","logo","thumbnail","cover"];for(const i of r)if(e&&typeof e=="object"&&i in e&&typeof e[i]=="string")return e[i]}function wt(n){const e=Ae.c(25),{item:s,schema:r,actions:i}=n;let l;e[0]!==s||e[1]!==r?(l=Nt(r,s),e[0]=s,e[1]=r,e[2]=l):l=e[2];const u=l,p=s&&typeof s=="object"&&"description"in s&&typeof s.description=="string"?s.description:void 0;let j;e[3]!==i?(j=i&&Object.keys(i).length>0,e[3]=i,e[4]=j):j=e[4];const o=j;let m;e[5]!==u||e[6]!==s.title?(m=t.jsx(ke,{icon:u,name:s.title,size:"md",className:"shrink-0 shadow-sm"}),e[5]=u,e[6]=s.title,e[7]=m):m=e[7];let f;e[8]!==s.title?(f=t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:s.title}),e[8]=s.title,e[9]=f):f=e[9];const d=p||"No description";let c;e[10]!==d?(c=t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:d}),e[10]=d,e[11]=c):c=e[11];let C;e[12]!==f||e[13]!==c?(C=t.jsxs("div",{className:"flex flex-col gap-0 flex-1",children:[f,c]}),e[12]=f,e[13]=c,e[14]=C):C=e[14];let y;e[15]!==m||e[16]!==C?(y=t.jsxs("div",{className:"flex flex-col gap-4 p-6 flex-1",children:[m,C]}),e[15]=m,e[16]=C,e[17]=y):y=e[17];let a;e[18]!==i||e[19]!==o||e[20]!==s?(a=o&&t.jsx("div",{className:"absolute top-6 right-6 opacity-0 group-hover:opacity-100 transition-opacity",onClick:At,onMouseDown:_t,children:t.jsxs(Ke,{children:[t.jsx(Ue,{asChild:!0,children:t.jsx(Ie,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:Dt,children:t.jsx(Re,{size:20})})}),t.jsxs(Le,{align:"end",onClick:St,children:[i.open&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.open?.(s)},children:[t.jsx(Ge,{size:16}),"Open"]}),i.edit&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.edit?.(s)},children:[t.jsx(Ve,{size:16}),"Edit"]}),i.duplicate&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.duplicate?.(s)},children:[t.jsx(Be,{size:16}),"Duplicate"]}),i.delete&&t.jsxs(k,{variant:"destructive",onClick:h=>{h.stopPropagation(),i.delete?.(s)},children:[t.jsx(Je,{size:16}),"Delete"]})]})]})}),e[18]=i,e[19]=o,e[20]=s,e[21]=a):a=e[21];let S;return e[22]!==y||e[23]!==a?(S=t.jsxs(nt,{className:"cursor-pointer transition-colors h-full flex flex-col group relative",children:[y,a]}),e[22]=y,e[23]=a,e[24]=S):S=e[24],S}function St(n){return n.stopPropagation()}function Dt(n){return n.stopPropagation()}function _t(n){return n.stopPropagation()}function At(n){return n.stopPropagation()}const It=["icon","avatar","logo"],Me=["created_at","created_by","id"];function Pt(n){return Object.keys(n).find(e=>It.includes(e.toLowerCase()))}function We(n,e){return Object.keys(n.properties||{}).filter(s=>["id","created_at","updated_at","created_by","updated_by"].includes(s)?!1:e?e.includes(s):!0).map(s=>({id:s,label:s.charAt(0).toUpperCase()+s.slice(1).replace(/_/g," ")}))}function Tt(n){const e=Ae.c(32),{data:s,schema:r,viewMode:i,onViewModeChange:l,search:u,sortKey:p,sortDirection:j,onSort:o,actions:m,onItemClick:f,headerActions:d,emptyState:c,readOnly:C,columns:y,hideToolbar:a,sortableFields:S}=n,h=l===void 0?Mt:l,x=j===void 0?"asc":j,P=o===void 0?Et:o;let v;e[0]!==m?(v=m===void 0?{}:m,e[0]=m,e[1]=v):v=e[1];const D=v,_=f===void 0?zt:f,z=d===void 0?null:d,b=c===void 0?null:c,T=C===void 0?!1:C,N=y===void 0?void 0:y,F=a===void 0?!1:a,w=S===void 0?void 0:S;let E;e[2]!==N||e[3]!==r||e[4]!==w?(E=N?N.filter(Ot).filter(M=>!w||w.includes(M.id)).map($t):We(r,w),e[2]=N,e[3]=r,e[4]=w,e[5]=E):E=e[5];const $=E;let A;e[6]!==z||e[7]!==F||e[8]!==P||e[9]!==h||e[10]!==x||e[11]!==p||e[12]!==$||e[13]!==i?(A=!F&&t.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:t.jsxs("div",{className:"flex items-center gap-3 h-12 px-4",children:[t.jsx("div",{className:"flex items-center gap-2 flex-1",children:z}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(Fe,{viewMode:i,onViewModeChange:h,sortKey:p,sortDirection:x,onSort:P,sortOptions:$})})]})}),e[6]=z,e[7]=F,e[8]=P,e[9]=h,e[10]=x,e[11]=p,e[12]=$,e[13]=i,e[14]=A):A=e[14];let O;e[15]!==D||e[16]!==N||e[17]!==s||e[18]!==b||e[19]!==_||e[20]!==P||e[21]!==T||e[22]!==r||e[23]!==u||e[24]!==x||e[25]!==p||e[26]!==w||e[27]!==i?(O=i==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:s.length===0?t.jsx("div",{className:"flex items-center justify-center h-full",children:b||t.jsx(ze,{icon:t.jsx(Ee,{size:36,className:"text-muted-foreground"}),title:"No items found",description:u?"Try adjusting your search":"No items to display"})}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:s.map(M=>t.jsx("div",{onClick:()=>_?.(M),className:"cursor-pointer h-full",children:t.jsx(wt,{item:M,schema:r,readOnly:T,actions:D})},M.id))})}):t.jsx(ot,{columns:Kt(N,r,w,D),data:s,sortKey:p,sortDirection:x,onSort:P,onRowClick:_,emptyState:b||t.jsx(ze,{icon:t.jsx(Ee,{size:36,className:"text-muted-foreground"}),title:"No items found",description:u?"Try adjusting your search":"No items to display"})}),e[15]=D,e[16]=N,e[17]=s,e[18]=b,e[19]=_,e[20]=P,e[21]=T,e[22]=r,e[23]=u,e[24]=x,e[25]=p,e[26]=w,e[27]=i,e[28]=O):O=e[28];let I;return e[29]!==A||e[30]!==O?(I=t.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[A,O]}),e[29]=A,e[30]=O,e[31]=I):I=e[31],I}function $t(n){return{id:n.id,label:typeof n.header=="string"?n.header:n.id}}function Ot(n){return n.sortable!==!1}function zt(){}function Et(){}function Mt(){}function Ft(n){return{id:"actions",header:"",render:e=>t.jsxs(Ke,{children:[t.jsx(Ue,{asChild:!0,children:t.jsx(Ie,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:s=>s.stopPropagation(),children:t.jsx(Re,{size:20})})}),t.jsxs(Le,{align:"end",onClick:s=>s.stopPropagation(),children:[n.open&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.open?.(e)},children:[t.jsx(Ge,{size:16}),"Open"]}),n.edit&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.edit?.(e)},children:[t.jsx(Ve,{size:16}),"Edit"]}),n.duplicate&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.duplicate?.(e)},children:[t.jsx(Be,{size:16}),"Duplicate"]}),n.delete&&t.jsxs(k,{variant:"destructive",onClick:s=>{s.stopPropagation(),n.delete?.(e)},children:[t.jsx(Je,{size:16}),"Delete"]})]})]}),cellClassName:"w-[60px]",sortable:!1}}function He(n){const e=n.type;return Array.isArray(e)?e.every(s=>He({type:s})):e==="string"||e==="number"||e==="integer"||e==="boolean"||e==="null"}function kt(n,e){const s=n.properties||{},r=Object.keys(s).filter(o=>{const m=s[o];return m&&He(m)}),i=Pt(s),l=[],u=new Set;i&&r.includes(i)&&(l.push(i),u.add(i));const p=["title","description","updated_at","updated_by"];for(const o of p)r.includes(o)&&!u.has(o)&&(l.push(o),u.add(o));const j=r.filter(o=>!u.has(o)&&!Me.includes(o)).sort((o,m)=>o.localeCompare(m));for(const o of j)l.push(o),u.add(o);for(const o of Me)r.includes(o)&&!u.has(o)&&(l.push(o),u.add(o));return l.map(o=>{const m=s[o],f=e?e.includes(o):!["id"].includes(o);return o===i?{id:o,header:"",render:d=>{const c=d[o];return t.jsx(ke,{icon:c,name:d.title,size:"sm",className:"shrink-0 shadow-sm"})},sortable:!1,cellClassName:"w-16 shrink-0",wrap:!0}:o==="description"?{id:o,header:"Description",render:d=>{const c=d[o];return c==null?"—":t.jsx("span",{className:"block truncate max-w-[50ch]",children:String(c)})},sortable:f,cellClassName:"max-w-[50ch]"}:o==="created_by"||o==="updated_by"?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c?t.jsx(rt,{id:String(c),size:"xs"}):"—"},sortable:f,cellClassName:"max-w-[250px]"}:m?.format==="date-time"||o.endsWith("_at")?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c?t.jsx("span",{className:"block truncate max-w-full",children:new Date(c).toLocaleDateString()}):"—"},sortable:f,cellClassName:"max-w-[200px]"}:{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c==null?"—":t.jsx("span",{className:"block truncate max-w-full",children:String(c)})},sortable:f,cellClassName:"max-w-[200px]"}})}function Kt(n,e,s,r){const i=n||kt(e,s);return i.some(p=>p.id==="actions")?i:Object.keys(r).length>0?[...i,Ft(r)]:i}function ds(n){const e=Ae.c(113),{connectionId:s,org:r,activeCollection:i}=n,l=i.name,u=i.schema??ct,p=i.hasCreateTool,j=i.hasUpdateTool,o=i.hasDeleteTool,m=Ye(),{data:f}=Ze.useSession(),d=f?.user?.id||"unknown",{org:c}=et();let C;e[0]!==s||e[1]!==c.id?(C={connectionId:s,orgId:c.id},e[0]=s,e[1]=c.id,e[2]=C):C=e[2];const y=vt(C),a=jt(s,l,y),S=`${s}-${l}`;let h;e[3]!==r||e[4]!==S?(h={namespace:r,resource:S,defaultSortKey:"updated_at"},e[3]=r,e[4]=S,e[5]=h):h=e[5];const{search:x,searchTerm:P,setSearch:v,viewMode:D,setViewMode:_,sortKey:z,sortDirection:b,handleSort:T}=lt(h);let N;e[6]!==P||e[7]!==b||e[8]!==z?(N={searchTerm:P,sortKey:z,sortDirection:b},e[6]=P,e[7]=b,e[8]=z,e[9]=N):N=e[9];const F=Ct(s,l,y,N),w=!p&&!j&&!o;let E;e[10]!==l||e[11]!==s||e[12]!==m||e[13]!==r?(E=g=>{m({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:r,project:$e,connectionId:s,collectionName:l,itemId:g.id}})},e[10]=l,e[11]=s,e[12]=m,e[13]=r,e[14]=E):E=e[14];const $=E;let A;e[15]!==a.create||e[16]!==d?(A=async g=>{const me=new Date().toISOString();await a.create.mutateAsync({...g,id:Oe("conn"),title:`${g.title} (Copy)`,created_at:me,updated_at:me,created_by:d,updated_by:d})},e[15]=a.create,e[16]=d,e[17]=A):A=e[17];const O=A,[I,M]=tt.useState(null);let oe;e[18]===Symbol.for("react.memo_cache_sentinel")?(oe=g=>{M(g)},e[18]=oe):oe=e[18];const qe=oe;let K;e[19]!==$||e[20]!==j?(K=j&&{edit:$},e[19]=$,e[20]=j,e[21]=K):K=e[21];let U;e[22]!==O||e[23]!==p?(U=p&&{duplicate:O},e[22]=O,e[23]=p,e[24]=U):U=e[24];let L;e[25]!==o?(L=o&&{delete:qe},e[25]=o,e[26]=L):L=e[26];let ie;e[27]!==L||e[28]!==K||e[29]!==U?(ie={...K,...U,...L},e[27]=L,e[28]=K,e[29]=U,e[30]=ie):ie=e[30];const ue=ie;let ne;e[31]!==a.delete||e[32]!==I?(ne=async()=>{I&&(await a.delete.mutateAsync(I.id),M(null))},e[31]=a.delete,e[32]=I,e[33]=ne):ne=e[33];const fe=ne;let re;e[34]!==a.create||e[35]!==l||e[36]!==s||e[37]!==p||e[38]!==m||e[39]!==r||e[40]!==d?(re=async()=>{if(!p){st.error("Create operation is not available for this collection");return}const g=new Date().toISOString(),me={id:Oe("conn"),title:"New Item",description:"A brief description of the item",created_at:g,updated_at:g,created_by:d,updated_by:d};try{const _e=await a.create.mutateAsync(me);m({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:r,project:$e,connectionId:s,collectionName:l,itemId:_e.id}})}catch(_e){console.error("Failed to create item:",_e)}},e[34]=a.create,e[35]=l,e[36]=s,e[37]=p,e[38]=m,e[39]=r,e[40]=d,e[41]=re):re=e[41];const he=re;let le;e[42]!==u?(le=We(u),e[42]=u,e[43]=le):le=e[43];const xe=le,Pe=(F?.length??0)>0,Qe=p&&Pe,Xe=p&&!Pe&&!x;let ae;e[44]!==a.create||e[45]!==he||e[46]!==p?(ae=p?t.jsxs(Ie,{onClick:he,size:"sm",disabled:a.create.isPending,className:"h-7",children:[t.jsx(bt,{className:"mr-2 h-4 w-4"}),a.create.isPending?"Creating...":"Create"]}):null,e[44]=a.create,e[45]=he,e[46]=p,e[47]=ae):ae=e[47];const Te=ae,ge=z;let B;e[48]!==T||e[49]!==_||e[50]!==b||e[51]!==xe||e[52]!==ge||e[53]!==D?(B=t.jsx(Fe,{viewMode:D,onViewModeChange:_,sortKey:ge,sortDirection:b,onSort:T,sortOptions:xe}),e[48]=T,e[49]=_,e[50]=b,e[51]=xe,e[52]=ge,e[53]=D,e[54]=B):B=e[54];const je=Qe&&Te;let R;e[55]!==B||e[56]!==je?(R=t.jsxs(yt,{children:[B,je]}),e[55]=B,e[56]=je,e[57]=R):R=e[57];const Ce=`Search ${l}...`;let V;e[58]!==v?(V=g=>{g.key==="Escape"&&(v(""),g.target.blur())},e[58]=v,e[59]=V):V=e[59];let G;e[60]!==x||e[61]!==v||e[62]!==Ce||e[63]!==V?(G=t.jsx(it,{value:x,onChange:v,placeholder:Ce,onKeyDown:V}),e[60]=x,e[61]=v,e[62]=Ce,e[63]=V,e[64]=G):G=e[64];let J;e[65]!==F?(J=F??[],e[65]=F,e[66]=J):J=e[66];const ve=z;let W;e[67]!==$?(W=g=>$(g),e[67]=$,e[68]=W):W=e[68];const be="No items found",ye=x?"Try adjusting your search terms":"This collection doesn't have any items yet.",Ne=Xe?Te:void 0;let H;e[69]!==be||e[70]!==ye||e[71]!==Ne?(H=t.jsx(at,{image:null,title:be,description:ye,actions:Ne}),e[69]=be,e[70]=ye,e[71]=Ne,e[72]=H):H=e[72];let q;e[73]!==T||e[74]!==w||e[75]!==ue||e[76]!==u||e[77]!==x||e[78]!==v||e[79]!==_||e[80]!==b||e[81]!==J||e[82]!==ve||e[83]!==W||e[84]!==H||e[85]!==D?(q=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Tt,{hideToolbar:!0,data:J,schema:u,viewMode:D,onViewModeChange:_,search:x,onSearchChange:v,sortKey:ve,sortDirection:b,onSort:T,actions:ue,onItemClick:W,readOnly:w,emptyState:H})}),e[73]=T,e[74]=w,e[75]=ue,e[76]=u,e[77]=x,e[78]=v,e[79]=_,e[80]=b,e[81]=J,e[82]=ve,e[83]=W,e[84]=H,e[85]=D,e[86]=q):q=e[86];let Q;e[87]!==G||e[88]!==q?(Q=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[G,q]}),e[87]=G,e[88]=q,e[89]=Q):Q=e[89];const we=!!I;let ce;e[90]===Symbol.for("react.memo_cache_sentinel")?(ce=g=>{g||M(null)},e[90]=ce):ce=e[90];let de;e[91]===Symbol.for("react.memo_cache_sentinel")?(de=t.jsx(mt,{children:"Delete item?"}),e[91]=de):de=e[91];const Se=I?.title;let X;e[92]!==Se?(X=t.jsxs(ut,{children:[de,t.jsxs(ft,{children:['Are you sure you want to delete "',Se,'"? This action cannot be undone.']})]}),e[92]=Se,e[93]=X):X=e[93];let Y;e[94]!==a.delete.isPending?(Y=t.jsx(dt,{disabled:a.delete.isPending,children:"Cancel"}),e[94]=a.delete.isPending,e[95]=Y):Y=e[95];const De=a.delete.isPending?"Deleting...":"Delete";let Z;e[96]!==a.delete.isPending||e[97]!==fe||e[98]!==De?(Z=t.jsx(pt,{onClick:fe,disabled:a.delete.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:De}),e[96]=a.delete.isPending,e[97]=fe,e[98]=De,e[99]=Z):Z=e[99];let ee;e[100]!==Y||e[101]!==Z?(ee=t.jsxs(ht,{children:[Y,Z]}),e[100]=Y,e[101]=Z,e[102]=ee):ee=e[102];let te;e[103]!==X||e[104]!==ee?(te=t.jsxs(xt,{children:[X,ee]}),e[103]=X,e[104]=ee,e[105]=te):te=e[105];let se;e[106]!==we||e[107]!==te?(se=t.jsx(gt,{open:we,onOpenChange:ce,children:te}),e[106]=we,e[107]=te,e[108]=se):se=e[108];let pe;return e[109]!==R||e[110]!==Q||e[111]!==se?(pe=t.jsxs(t.Fragment,{children:[R,Q,se]}),e[109]=R,e[110]=Q,e[111]=se,e[112]=pe):pe=e[112],pe}export{ds as C};
1
+ import{c as Ae,j as t,b as Ye,d as Ze,u as et,r as tt,O as $e,t as st}from"./index-DwBgLSti.js";import{g as Oe}from"./generate-id-Dyweu44Y.js";import{a as ot,C as Fe}from"./collection-table-wrapper-fNhnYl-G.js";import{C as it}from"./collection-search-CBYSITVU.js";import{C as nt}from"./card-BNyCnFpQ.js";import{I as ke}from"./integration-icon-qV_BsBQR.js";import{D as Ke,a as Ue,b as Le,c as k}from"./dropdown-menu-CRT7qGQ9.js";import{B as Ie}from"./button-D6YZfFzy.js";import{a as Be}from"./Copy01-Dq7Edhtu.js";import{i as Re}from"./DotsVertical-PhooMqUv.js";import{i as Ve}from"./Edit01-DRruZKzG.js";import{s as Ge}from"./Eye-B9ZDOUkE.js";import{s as Je}from"./Trash01-CkTOgej8.js";import{E as ze}from"./empty-state-BA6UkF4p.js";import{n as Ee}from"./Inbox01-BweXezQd.js";import{U as rt,u as lt}from"./use-list-state-DvpdPuz-.js";import{E as at}from"./empty-state-sMx3NP6e.js";import{B as ct}from"./constants-oXq_cTdm.js";import{A as dt,g as pt,c as mt,b as ut,d as ft,e as ht,a as xt,f as gt}from"./alert-dialog-BvNipqK_.js";import{u as jt,e as Ct}from"./use-connection-BEGrPCmR.js";import{u as vt}from"./constants-8URKDp4Y.js";import{s as bt}from"./Plus-DNqvDLOK.js";import{V as yt}from"./layout-Ck3H2-cu.js";function Nt(n,e){const s=n.properties||{};for(const i in s){const l=s[i];if(l&&l.type==="string"&&(l.format==="url"||l.format==="uri")&&e&&typeof e=="object"&&i in e&&e[i])return e[i]}const r=["image","img","avatar","icon","logo","thumbnail","cover"];for(const i of r)if(e&&typeof e=="object"&&i in e&&typeof e[i]=="string")return e[i]}function wt(n){const e=Ae.c(25),{item:s,schema:r,actions:i}=n;let l;e[0]!==s||e[1]!==r?(l=Nt(r,s),e[0]=s,e[1]=r,e[2]=l):l=e[2];const u=l,p=s&&typeof s=="object"&&"description"in s&&typeof s.description=="string"?s.description:void 0;let j;e[3]!==i?(j=i&&Object.keys(i).length>0,e[3]=i,e[4]=j):j=e[4];const o=j;let m;e[5]!==u||e[6]!==s.title?(m=t.jsx(ke,{icon:u,name:s.title,size:"md",className:"shrink-0 shadow-sm"}),e[5]=u,e[6]=s.title,e[7]=m):m=e[7];let f;e[8]!==s.title?(f=t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:s.title}),e[8]=s.title,e[9]=f):f=e[9];const d=p||"No description";let c;e[10]!==d?(c=t.jsx("p",{className:"text-base text-muted-foreground line-clamp-2",children:d}),e[10]=d,e[11]=c):c=e[11];let C;e[12]!==f||e[13]!==c?(C=t.jsxs("div",{className:"flex flex-col gap-0 flex-1",children:[f,c]}),e[12]=f,e[13]=c,e[14]=C):C=e[14];let y;e[15]!==m||e[16]!==C?(y=t.jsxs("div",{className:"flex flex-col gap-4 p-6 flex-1",children:[m,C]}),e[15]=m,e[16]=C,e[17]=y):y=e[17];let a;e[18]!==i||e[19]!==o||e[20]!==s?(a=o&&t.jsx("div",{className:"absolute top-6 right-6 opacity-0 group-hover:opacity-100 transition-opacity",onClick:At,onMouseDown:_t,children:t.jsxs(Ke,{children:[t.jsx(Ue,{asChild:!0,children:t.jsx(Ie,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:Dt,children:t.jsx(Re,{size:20})})}),t.jsxs(Le,{align:"end",onClick:St,children:[i.open&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.open?.(s)},children:[t.jsx(Ge,{size:16}),"Open"]}),i.edit&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.edit?.(s)},children:[t.jsx(Ve,{size:16}),"Edit"]}),i.duplicate&&t.jsxs(k,{onClick:h=>{h.stopPropagation(),i.duplicate?.(s)},children:[t.jsx(Be,{size:16}),"Duplicate"]}),i.delete&&t.jsxs(k,{variant:"destructive",onClick:h=>{h.stopPropagation(),i.delete?.(s)},children:[t.jsx(Je,{size:16}),"Delete"]})]})]})}),e[18]=i,e[19]=o,e[20]=s,e[21]=a):a=e[21];let S;return e[22]!==y||e[23]!==a?(S=t.jsxs(nt,{className:"cursor-pointer transition-colors h-full flex flex-col group relative",children:[y,a]}),e[22]=y,e[23]=a,e[24]=S):S=e[24],S}function St(n){return n.stopPropagation()}function Dt(n){return n.stopPropagation()}function _t(n){return n.stopPropagation()}function At(n){return n.stopPropagation()}const It=["icon","avatar","logo"],Me=["created_at","created_by","id"];function Pt(n){return Object.keys(n).find(e=>It.includes(e.toLowerCase()))}function We(n,e){return Object.keys(n.properties||{}).filter(s=>["id","created_at","updated_at","created_by","updated_by"].includes(s)?!1:e?e.includes(s):!0).map(s=>({id:s,label:s.charAt(0).toUpperCase()+s.slice(1).replace(/_/g," ")}))}function Tt(n){const e=Ae.c(32),{data:s,schema:r,viewMode:i,onViewModeChange:l,search:u,sortKey:p,sortDirection:j,onSort:o,actions:m,onItemClick:f,headerActions:d,emptyState:c,readOnly:C,columns:y,hideToolbar:a,sortableFields:S}=n,h=l===void 0?Mt:l,x=j===void 0?"asc":j,P=o===void 0?Et:o;let v;e[0]!==m?(v=m===void 0?{}:m,e[0]=m,e[1]=v):v=e[1];const D=v,_=f===void 0?zt:f,z=d===void 0?null:d,b=c===void 0?null:c,T=C===void 0?!1:C,N=y===void 0?void 0:y,F=a===void 0?!1:a,w=S===void 0?void 0:S;let E;e[2]!==N||e[3]!==r||e[4]!==w?(E=N?N.filter(Ot).filter(M=>!w||w.includes(M.id)).map($t):We(r,w),e[2]=N,e[3]=r,e[4]=w,e[5]=E):E=e[5];const $=E;let A;e[6]!==z||e[7]!==F||e[8]!==P||e[9]!==h||e[10]!==x||e[11]!==p||e[12]!==$||e[13]!==i?(A=!F&&t.jsx("div",{className:"shrink-0 w-full border-b border-border h-12",children:t.jsxs("div",{className:"flex items-center gap-3 h-12 px-4",children:[t.jsx("div",{className:"flex items-center gap-2 flex-1",children:z}),t.jsx("div",{className:"flex items-center gap-2 shrink-0",children:t.jsx(Fe,{viewMode:i,onViewModeChange:h,sortKey:p,sortDirection:x,onSort:P,sortOptions:$})})]})}),e[6]=z,e[7]=F,e[8]=P,e[9]=h,e[10]=x,e[11]=p,e[12]=$,e[13]=i,e[14]=A):A=e[14];let O;e[15]!==D||e[16]!==N||e[17]!==s||e[18]!==b||e[19]!==_||e[20]!==P||e[21]!==T||e[22]!==r||e[23]!==u||e[24]!==x||e[25]!==p||e[26]!==w||e[27]!==i?(O=i==="cards"?t.jsx("div",{className:"flex-1 overflow-auto p-5",children:s.length===0?t.jsx("div",{className:"flex items-center justify-center h-full",children:b||t.jsx(ze,{icon:t.jsx(Ee,{size:36,className:"text-muted-foreground"}),title:"No items found",description:u?"Try adjusting your search":"No items to display"})}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(280px,1fr))] gap-4",children:s.map(M=>t.jsx("div",{onClick:()=>_?.(M),className:"cursor-pointer h-full",children:t.jsx(wt,{item:M,schema:r,readOnly:T,actions:D})},M.id))})}):t.jsx(ot,{columns:Kt(N,r,w,D),data:s,sortKey:p,sortDirection:x,onSort:P,onRowClick:_,emptyState:b||t.jsx(ze,{icon:t.jsx(Ee,{size:36,className:"text-muted-foreground"}),title:"No items found",description:u?"Try adjusting your search":"No items to display"})}),e[15]=D,e[16]=N,e[17]=s,e[18]=b,e[19]=_,e[20]=P,e[21]=T,e[22]=r,e[23]=u,e[24]=x,e[25]=p,e[26]=w,e[27]=i,e[28]=O):O=e[28];let I;return e[29]!==A||e[30]!==O?(I=t.jsxs("div",{className:"h-full flex flex-col overflow-hidden",children:[A,O]}),e[29]=A,e[30]=O,e[31]=I):I=e[31],I}function $t(n){return{id:n.id,label:typeof n.header=="string"?n.header:n.id}}function Ot(n){return n.sortable!==!1}function zt(){}function Et(){}function Mt(){}function Ft(n){return{id:"actions",header:"",render:e=>t.jsxs(Ke,{children:[t.jsx(Ue,{asChild:!0,children:t.jsx(Ie,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",onClick:s=>s.stopPropagation(),children:t.jsx(Re,{size:20})})}),t.jsxs(Le,{align:"end",onClick:s=>s.stopPropagation(),children:[n.open&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.open?.(e)},children:[t.jsx(Ge,{size:16}),"Open"]}),n.edit&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.edit?.(e)},children:[t.jsx(Ve,{size:16}),"Edit"]}),n.duplicate&&t.jsxs(k,{onClick:s=>{s.stopPropagation(),n.duplicate?.(e)},children:[t.jsx(Be,{size:16}),"Duplicate"]}),n.delete&&t.jsxs(k,{variant:"destructive",onClick:s=>{s.stopPropagation(),n.delete?.(e)},children:[t.jsx(Je,{size:16}),"Delete"]})]})]}),cellClassName:"w-[60px]",sortable:!1}}function He(n){const e=n.type;return Array.isArray(e)?e.every(s=>He({type:s})):e==="string"||e==="number"||e==="integer"||e==="boolean"||e==="null"}function kt(n,e){const s=n.properties||{},r=Object.keys(s).filter(o=>{const m=s[o];return m&&He(m)}),i=Pt(s),l=[],u=new Set;i&&r.includes(i)&&(l.push(i),u.add(i));const p=["title","description","updated_at","updated_by"];for(const o of p)r.includes(o)&&!u.has(o)&&(l.push(o),u.add(o));const j=r.filter(o=>!u.has(o)&&!Me.includes(o)).sort((o,m)=>o.localeCompare(m));for(const o of j)l.push(o),u.add(o);for(const o of Me)r.includes(o)&&!u.has(o)&&(l.push(o),u.add(o));return l.map(o=>{const m=s[o],f=e?e.includes(o):!["id"].includes(o);return o===i?{id:o,header:"",render:d=>{const c=d[o];return t.jsx(ke,{icon:c,name:d.title,size:"sm",className:"shrink-0 shadow-sm"})},sortable:!1,cellClassName:"w-16 shrink-0",wrap:!0}:o==="description"?{id:o,header:"Description",render:d=>{const c=d[o];return c==null?"—":t.jsx("span",{className:"block truncate max-w-[50ch]",children:String(c)})},sortable:f,cellClassName:"max-w-[50ch]"}:o==="created_by"||o==="updated_by"?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c?t.jsx(rt,{id:String(c),size:"xs"}):"—"},sortable:f,cellClassName:"max-w-[250px]"}:m?.format==="date-time"||o.endsWith("_at")?{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c?t.jsx("span",{className:"block truncate max-w-full",children:new Date(c).toLocaleDateString()}):"—"},sortable:f,cellClassName:"max-w-[200px]"}:{id:o,header:o.charAt(0).toUpperCase()+o.slice(1).replace(/_/g," "),render:d=>{const c=d[o];return c==null?"—":t.jsx("span",{className:"block truncate max-w-full",children:String(c)})},sortable:f,cellClassName:"max-w-[200px]"}})}function Kt(n,e,s,r){const i=n||kt(e,s);return i.some(p=>p.id==="actions")?i:Object.keys(r).length>0?[...i,Ft(r)]:i}function ds(n){const e=Ae.c(113),{connectionId:s,org:r,activeCollection:i}=n,l=i.name,u=i.schema??ct,p=i.hasCreateTool,j=i.hasUpdateTool,o=i.hasDeleteTool,m=Ye(),{data:f}=Ze.useSession(),d=f?.user?.id||"unknown",{org:c}=et();let C;e[0]!==s||e[1]!==c.id?(C={connectionId:s,orgId:c.id},e[0]=s,e[1]=c.id,e[2]=C):C=e[2];const y=vt(C),a=jt(s,l,y),S=`${s}-${l}`;let h;e[3]!==r||e[4]!==S?(h={namespace:r,resource:S,defaultSortKey:"updated_at"},e[3]=r,e[4]=S,e[5]=h):h=e[5];const{search:x,searchTerm:P,setSearch:v,viewMode:D,setViewMode:_,sortKey:z,sortDirection:b,handleSort:T}=lt(h);let N;e[6]!==P||e[7]!==b||e[8]!==z?(N={searchTerm:P,sortKey:z,sortDirection:b},e[6]=P,e[7]=b,e[8]=z,e[9]=N):N=e[9];const F=Ct(s,l,y,N),w=!p&&!j&&!o;let E;e[10]!==l||e[11]!==s||e[12]!==m||e[13]!==r?(E=g=>{m({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:r,project:$e,connectionId:s,collectionName:l,itemId:g.id}})},e[10]=l,e[11]=s,e[12]=m,e[13]=r,e[14]=E):E=e[14];const $=E;let A;e[15]!==a.create||e[16]!==d?(A=async g=>{const me=new Date().toISOString();await a.create.mutateAsync({...g,id:Oe("conn"),title:`${g.title} (Copy)`,created_at:me,updated_at:me,created_by:d,updated_by:d})},e[15]=a.create,e[16]=d,e[17]=A):A=e[17];const O=A,[I,M]=tt.useState(null);let oe;e[18]===Symbol.for("react.memo_cache_sentinel")?(oe=g=>{M(g)},e[18]=oe):oe=e[18];const qe=oe;let K;e[19]!==$||e[20]!==j?(K=j&&{edit:$},e[19]=$,e[20]=j,e[21]=K):K=e[21];let U;e[22]!==O||e[23]!==p?(U=p&&{duplicate:O},e[22]=O,e[23]=p,e[24]=U):U=e[24];let L;e[25]!==o?(L=o&&{delete:qe},e[25]=o,e[26]=L):L=e[26];let ie;e[27]!==L||e[28]!==K||e[29]!==U?(ie={...K,...U,...L},e[27]=L,e[28]=K,e[29]=U,e[30]=ie):ie=e[30];const ue=ie;let ne;e[31]!==a.delete||e[32]!==I?(ne=async()=>{I&&(await a.delete.mutateAsync(I.id),M(null))},e[31]=a.delete,e[32]=I,e[33]=ne):ne=e[33];const fe=ne;let re;e[34]!==a.create||e[35]!==l||e[36]!==s||e[37]!==p||e[38]!==m||e[39]!==r||e[40]!==d?(re=async()=>{if(!p){st.error("Create operation is not available for this collection");return}const g=new Date().toISOString(),me={id:Oe("conn"),title:"New Item",description:"A brief description of the item",created_at:g,updated_at:g,created_by:d,updated_by:d};try{const _e=await a.create.mutateAsync(me);m({to:"/$org/$project/mcps/$connectionId/$collectionName/$itemId",params:{org:r,project:$e,connectionId:s,collectionName:l,itemId:_e.id}})}catch(_e){console.error("Failed to create item:",_e)}},e[34]=a.create,e[35]=l,e[36]=s,e[37]=p,e[38]=m,e[39]=r,e[40]=d,e[41]=re):re=e[41];const he=re;let le;e[42]!==u?(le=We(u),e[42]=u,e[43]=le):le=e[43];const xe=le,Pe=(F?.length??0)>0,Qe=p&&Pe,Xe=p&&!Pe&&!x;let ae;e[44]!==a.create||e[45]!==he||e[46]!==p?(ae=p?t.jsxs(Ie,{onClick:he,size:"sm",disabled:a.create.isPending,className:"h-7",children:[t.jsx(bt,{className:"mr-2 h-4 w-4"}),a.create.isPending?"Creating...":"Create"]}):null,e[44]=a.create,e[45]=he,e[46]=p,e[47]=ae):ae=e[47];const Te=ae,ge=z;let B;e[48]!==T||e[49]!==_||e[50]!==b||e[51]!==xe||e[52]!==ge||e[53]!==D?(B=t.jsx(Fe,{viewMode:D,onViewModeChange:_,sortKey:ge,sortDirection:b,onSort:T,sortOptions:xe}),e[48]=T,e[49]=_,e[50]=b,e[51]=xe,e[52]=ge,e[53]=D,e[54]=B):B=e[54];const je=Qe&&Te;let R;e[55]!==B||e[56]!==je?(R=t.jsxs(yt,{children:[B,je]}),e[55]=B,e[56]=je,e[57]=R):R=e[57];const Ce=`Search ${l}...`;let V;e[58]!==v?(V=g=>{g.key==="Escape"&&(v(""),g.target.blur())},e[58]=v,e[59]=V):V=e[59];let G;e[60]!==x||e[61]!==v||e[62]!==Ce||e[63]!==V?(G=t.jsx(it,{value:x,onChange:v,placeholder:Ce,onKeyDown:V}),e[60]=x,e[61]=v,e[62]=Ce,e[63]=V,e[64]=G):G=e[64];let J;e[65]!==F?(J=F??[],e[65]=F,e[66]=J):J=e[66];const ve=z;let W;e[67]!==$?(W=g=>$(g),e[67]=$,e[68]=W):W=e[68];const be="No items found",ye=x?"Try adjusting your search terms":"This collection doesn't have any items yet.",Ne=Xe?Te:void 0;let H;e[69]!==be||e[70]!==ye||e[71]!==Ne?(H=t.jsx(at,{image:null,title:be,description:ye,actions:Ne}),e[69]=be,e[70]=ye,e[71]=Ne,e[72]=H):H=e[72];let q;e[73]!==T||e[74]!==w||e[75]!==ue||e[76]!==u||e[77]!==x||e[78]!==v||e[79]!==_||e[80]!==b||e[81]!==J||e[82]!==ve||e[83]!==W||e[84]!==H||e[85]!==D?(q=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Tt,{hideToolbar:!0,data:J,schema:u,viewMode:D,onViewModeChange:_,search:x,onSearchChange:v,sortKey:ve,sortDirection:b,onSort:T,actions:ue,onItemClick:W,readOnly:w,emptyState:H})}),e[73]=T,e[74]=w,e[75]=ue,e[76]=u,e[77]=x,e[78]=v,e[79]=_,e[80]=b,e[81]=J,e[82]=ve,e[83]=W,e[84]=H,e[85]=D,e[86]=q):q=e[86];let Q;e[87]!==G||e[88]!==q?(Q=t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[G,q]}),e[87]=G,e[88]=q,e[89]=Q):Q=e[89];const we=!!I;let ce;e[90]===Symbol.for("react.memo_cache_sentinel")?(ce=g=>{g||M(null)},e[90]=ce):ce=e[90];let de;e[91]===Symbol.for("react.memo_cache_sentinel")?(de=t.jsx(mt,{children:"Delete item?"}),e[91]=de):de=e[91];const Se=I?.title;let X;e[92]!==Se?(X=t.jsxs(ut,{children:[de,t.jsxs(ft,{children:['Are you sure you want to delete "',Se,'"? This action cannot be undone.']})]}),e[92]=Se,e[93]=X):X=e[93];let Y;e[94]!==a.delete.isPending?(Y=t.jsx(dt,{disabled:a.delete.isPending,children:"Cancel"}),e[94]=a.delete.isPending,e[95]=Y):Y=e[95];const De=a.delete.isPending?"Deleting...":"Delete";let Z;e[96]!==a.delete.isPending||e[97]!==fe||e[98]!==De?(Z=t.jsx(pt,{onClick:fe,disabled:a.delete.isPending,className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",children:De}),e[96]=a.delete.isPending,e[97]=fe,e[98]=De,e[99]=Z):Z=e[99];let ee;e[100]!==Y||e[101]!==Z?(ee=t.jsxs(ht,{children:[Y,Z]}),e[100]=Y,e[101]=Z,e[102]=ee):ee=e[102];let te;e[103]!==X||e[104]!==ee?(te=t.jsxs(xt,{children:[X,ee]}),e[103]=X,e[104]=ee,e[105]=te):te=e[105];let se;e[106]!==we||e[107]!==te?(se=t.jsx(gt,{open:we,onOpenChange:ce,children:te}),e[106]=we,e[107]=te,e[108]=se):se=e[108];let pe;return e[109]!==R||e[110]!==Q||e[111]!==se?(pe=t.jsxs(t.Fragment,{children:[R,Q,se]}),e[109]=R,e[110]=Q,e[111]=se,e[112]=pe):pe=e[112],pe}export{ds as C};
@@ -1 +1 @@
1
- import{r as T,c as k,j as t}from"./index-DQipirM0.js";import{c as y,B as V}from"./button-BxOn_P7A.js";import{c as L,a as $,D as B,b as E}from"./dropdown-menu-BbhseL--.js";import{n as z}from"./ArrowDown-BzwwIvol.js";import{i as D}from"./ArrowUp-lkpB-gsw.js";import{i as R}from"./Check-BEIYk4IG.js";import{c as H}from"./Grid01-DDvgvRE8.js";import{i as I}from"./List-iNTJ6fUY.js";import{c as K,T as W,a as _,b as O}from"./tooltip-B7RjBzxU.js";import{V as A}from"./view-mode-toggle-DumSmhPz.js";import{T as P,a as q,b as S,c as F,d as G,e as J}from"./table-D0pFXKN4.js";const M=({size:N=24,color:e="currentColor",...s})=>T.createElement("svg",{viewBox:"0 0 24 24",width:N,height:N,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},T.createElement("path",{d:"M5 21v-7m0-4V3m7 18v-9m0-4V3m7 18v-5m0-4V3M2 14h6m1-6h6m1 8h6"}));M.displayName="Sliders01";function ae(N){const e=k.c(16),{viewMode:s,onViewModeChange:x,sortKey:p,sortDirection:d,onSort:a,sortOptions:i}=N;let l;e[0]!==i?(l=i===void 0?[]:i,e[0]=i,e[1]=l):l=e[1];const m=l;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(K,{children:t.jsxs(W,{children:[t.jsx(_,{asChild:!0,children:t.jsx($,{asChild:!0,children:t.jsx(V,{variant:"outline",size:"icon",className:"size-7 border border-input",children:t.jsx(M,{size:16})})})}),t.jsx(O,{children:"Search filters"})]})}),e[2]=u):u=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c={value:"table",icon:t.jsx(I,{})},e[3]=c):c=e[3];let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=[c,{value:"cards",icon:t.jsx(H,{})}],e[4]=r):r=e[4];let o;e[5]!==x||e[6]!==s?(o=t.jsx("div",{className:"p-2 border-b border-border",children:t.jsx(A,{value:s,onValueChange:x,fullWidth:!0,options:r})}),e[5]=x,e[6]=s,e[7]=o):o=e[7];let f;e[8]!==a||e[9]!==d||e[10]!==p||e[11]!==m?(f=m.length>0&&a&&t.jsxs("div",{className:"p-1 flex flex-col gap-0.5",children:[t.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Sort by"}),m.map(g=>{const b=p===g.id;return t.jsx(L,{onClick:()=>a(g.id),className:y("h-8 px-2 py-0 cursor-pointer",b&&"bg-accent"),children:t.jsxs("div",{className:"flex items-center gap-2 w-full",children:[b&&t.jsx(R,{size:16,className:"text-foreground shrink-0"}),!b&&t.jsx("div",{className:"w-4 shrink-0"}),t.jsx("span",{className:"text-sm text-foreground flex-1",children:g.label}),b&&d&&(d==="asc"?t.jsx(D,{size:16,className:"text-foreground shrink-0"}):t.jsx(z,{size:16,className:"text-foreground shrink-0"}))]})},g.id)})]}),e[8]=a,e[9]=d,e[10]=p,e[11]=m,e[12]=f):f=e[12];let h;return e[13]!==o||e[14]!==f?(h=t.jsxs(B,{children:[u,t.jsxs(E,{align:"end",className:"w-[200px] p-0 gap-0",children:[o,f]})]}),e[13]=o,e[14]=f,e[15]=h):h=e[15],h}function Q(N){const e=k.c(29),{columns:s,data:x,sortKey:p,sortDirection:d,onSort:a,onRowClick:i,rowClassName:l}=N;let m;e[0]!==d?(m=function(n,v){return t.jsx("div",{className:"w-4 flex items-center justify-center",children:v&&d&&(d==="asc"?t.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):t.jsx(z,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=d,e[1]=m):m=e[1];const u=m;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=function(n,v){let C="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return n===v-1&&(C="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),C},e[2]=c):c=e[2];const r=c;let o;if(e[3]!==s||e[4]!==a||e[5]!==u||e[6]!==p){let j;e[8]!==s.length||e[9]!==a||e[10]!==u||e[11]!==p?(j=(n,v)=>{const C=p===n.id;return t.jsx(P,{className:y(r(v,s.length),"group transition-colors select-none",n.sortable&&"hover:bg-accent cursor-pointer",n.rowClassName,n.cellClassName),onClick:n.sortable&&a?()=>a(n.id):void 0,children:t.jsxs("span",{className:"flex items-center gap-1",children:[n.header,n.sortable&&u(n.id,C)]})},n.id)},e[8]=s.length,e[9]=a,e[10]=u,e[11]=p,e[12]=j):j=e[12],o=s.map(j),e[3]=s,e[4]=a,e[5]=u,e[6]=p,e[7]=o}else o=e[7];let f;e[13]!==o?(f=t.jsx(q,{className:"border-b-0",children:t.jsx(S,{className:"h-9 hover:bg-transparent border-b border-border",children:o})}),e[13]=o,e[14]=f):f=e[14];let h;if(e[15]!==s||e[16]!==x||e[17]!==i||e[18]!==l){let j;e[20]!==s||e[21]!==i||e[22]!==l?(j=(n,v)=>{const C=l?.(n);return t.jsx(S,{"data-row-index":v,className:y("group/data-row transition-colors border-b-0 hover:bg-accent/50",i?"cursor-pointer":"",C),onClick:i?()=>i(n):void 0,children:s.map(w=>t.jsx(F,{className:y("px-5 py-4 h-16 align-middle text-sm text-foreground",w.cellClassName,w.wrap?"whitespace-normal wrap-break-word":""),children:t.jsx("div",{className:y(w.wrap?"w-full":"min-w-0 w-full",!w.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:w.render?w.render(n):w.accessor?w.accessor(n):null})},w.id))},v)},e[20]=s,e[21]=i,e[22]=l,e[23]=j):j=e[23],h=x.map(j),e[15]=s,e[16]=x,e[17]=i,e[18]=l,e[19]=h}else h=e[19];let g;e[24]!==h?(g=t.jsx(G,{children:h}),e[24]=h,e[25]=g):g=e[25];let b;return e[26]!==f||e[27]!==g?(b=t.jsxs(J,{className:"w-full border-collapse",children:[f,g]}),e[26]=f,e[27]=g,e[28]=b):b=e[28],b}function le(N){const e=k.c(12),{columns:s,data:x,isLoading:p,sortKey:d,sortDirection:a,onSort:i,onRowClick:l,emptyState:m}=N;if(p===void 0?!1:p){let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"flex items-center justify-center h-full",children:t.jsx("div",{className:"text-muted-foreground",children:"Loading..."})}),e[0]=r):r=e[0],r}if(x.length===0){let r;e[1]!==m?(r=m||t.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No items found"}),e[1]=m,e[2]=r):r=e[2];let o;return e[3]!==r?(o=t.jsx("div",{className:"flex items-center justify-center h-full",children:r}),e[3]=r,e[4]=o):o=e[4],o}let c;return e[5]!==s||e[6]!==x||e[7]!==l||e[8]!==i||e[9]!==a||e[10]!==d?(c=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Q,{columns:s,data:x,sortKey:d,sortDirection:a,onSort:i,onRowClick:l})}),e[5]=s,e[6]=x,e[7]=l,e[8]=i,e[9]=a,e[10]=d,e[11]=c):c=e[11],c}export{ae as C,le as a};
1
+ import{r as T,c as k,j as t}from"./index-DwBgLSti.js";import{c as y,B as V}from"./button-D6YZfFzy.js";import{c as L,a as $,D as B,b as E}from"./dropdown-menu-CRT7qGQ9.js";import{n as z}from"./ArrowDown-B35oswmj.js";import{i as D}from"./ArrowUp-G8RCE5_O.js";import{i as R}from"./Check-Bv0pZ3gl.js";import{c as H}from"./Grid01-CJW4ZLO5.js";import{i as I}from"./List-sG42OZ_v.js";import{c as K,T as W,a as _,b as O}from"./tooltip-D71dCz4E.js";import{V as A}from"./view-mode-toggle-2-qyK3LU.js";import{T as P,a as q,b as S,c as F,d as G,e as J}from"./table-Csfk_VXo.js";const M=({size:N=24,color:e="currentColor",...s})=>T.createElement("svg",{viewBox:"0 0 24 24",width:N,height:N,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},T.createElement("path",{d:"M5 21v-7m0-4V3m7 18v-9m0-4V3m7 18v-5m0-4V3M2 14h6m1-6h6m1 8h6"}));M.displayName="Sliders01";function ae(N){const e=k.c(16),{viewMode:s,onViewModeChange:x,sortKey:p,sortDirection:d,onSort:a,sortOptions:i}=N;let l;e[0]!==i?(l=i===void 0?[]:i,e[0]=i,e[1]=l):l=e[1];const m=l;let u;e[2]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(K,{children:t.jsxs(W,{children:[t.jsx(_,{asChild:!0,children:t.jsx($,{asChild:!0,children:t.jsx(V,{variant:"outline",size:"icon",className:"size-7 border border-input",children:t.jsx(M,{size:16})})})}),t.jsx(O,{children:"Search filters"})]})}),e[2]=u):u=e[2];let c;e[3]===Symbol.for("react.memo_cache_sentinel")?(c={value:"table",icon:t.jsx(I,{})},e[3]=c):c=e[3];let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=[c,{value:"cards",icon:t.jsx(H,{})}],e[4]=r):r=e[4];let o;e[5]!==x||e[6]!==s?(o=t.jsx("div",{className:"p-2 border-b border-border",children:t.jsx(A,{value:s,onValueChange:x,fullWidth:!0,options:r})}),e[5]=x,e[6]=s,e[7]=o):o=e[7];let f;e[8]!==a||e[9]!==d||e[10]!==p||e[11]!==m?(f=m.length>0&&a&&t.jsxs("div",{className:"p-1 flex flex-col gap-0.5",children:[t.jsx("div",{className:"px-2 py-1.5 text-xs font-mono font-normal text-muted-foreground uppercase tracking-wide",children:"Sort by"}),m.map(g=>{const b=p===g.id;return t.jsx(L,{onClick:()=>a(g.id),className:y("h-8 px-2 py-0 cursor-pointer",b&&"bg-accent"),children:t.jsxs("div",{className:"flex items-center gap-2 w-full",children:[b&&t.jsx(R,{size:16,className:"text-foreground shrink-0"}),!b&&t.jsx("div",{className:"w-4 shrink-0"}),t.jsx("span",{className:"text-sm text-foreground flex-1",children:g.label}),b&&d&&(d==="asc"?t.jsx(D,{size:16,className:"text-foreground shrink-0"}):t.jsx(z,{size:16,className:"text-foreground shrink-0"}))]})},g.id)})]}),e[8]=a,e[9]=d,e[10]=p,e[11]=m,e[12]=f):f=e[12];let h;return e[13]!==o||e[14]!==f?(h=t.jsxs(B,{children:[u,t.jsxs(E,{align:"end",className:"w-[200px] p-0 gap-0",children:[o,f]})]}),e[13]=o,e[14]=f,e[15]=h):h=e[15],h}function Q(N){const e=k.c(29),{columns:s,data:x,sortKey:p,sortDirection:d,onSort:a,onRowClick:i,rowClassName:l}=N;let m;e[0]!==d?(m=function(n,v){return t.jsx("div",{className:"w-4 flex items-center justify-center",children:v&&d&&(d==="asc"?t.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):t.jsx(z,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=d,e[1]=m):m=e[1];const u=m;let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=function(n,v){let C="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return n===v-1&&(C="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),C},e[2]=c):c=e[2];const r=c;let o;if(e[3]!==s||e[4]!==a||e[5]!==u||e[6]!==p){let j;e[8]!==s.length||e[9]!==a||e[10]!==u||e[11]!==p?(j=(n,v)=>{const C=p===n.id;return t.jsx(P,{className:y(r(v,s.length),"group transition-colors select-none",n.sortable&&"hover:bg-accent cursor-pointer",n.rowClassName,n.cellClassName),onClick:n.sortable&&a?()=>a(n.id):void 0,children:t.jsxs("span",{className:"flex items-center gap-1",children:[n.header,n.sortable&&u(n.id,C)]})},n.id)},e[8]=s.length,e[9]=a,e[10]=u,e[11]=p,e[12]=j):j=e[12],o=s.map(j),e[3]=s,e[4]=a,e[5]=u,e[6]=p,e[7]=o}else o=e[7];let f;e[13]!==o?(f=t.jsx(q,{className:"border-b-0",children:t.jsx(S,{className:"h-9 hover:bg-transparent border-b border-border",children:o})}),e[13]=o,e[14]=f):f=e[14];let h;if(e[15]!==s||e[16]!==x||e[17]!==i||e[18]!==l){let j;e[20]!==s||e[21]!==i||e[22]!==l?(j=(n,v)=>{const C=l?.(n);return t.jsx(S,{"data-row-index":v,className:y("group/data-row transition-colors border-b-0 hover:bg-accent/50",i?"cursor-pointer":"",C),onClick:i?()=>i(n):void 0,children:s.map(w=>t.jsx(F,{className:y("px-5 py-4 h-16 align-middle text-sm text-foreground",w.cellClassName,w.wrap?"whitespace-normal wrap-break-word":""),children:t.jsx("div",{className:y(w.wrap?"w-full":"min-w-0 w-full",!w.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:w.render?w.render(n):w.accessor?w.accessor(n):null})},w.id))},v)},e[20]=s,e[21]=i,e[22]=l,e[23]=j):j=e[23],h=x.map(j),e[15]=s,e[16]=x,e[17]=i,e[18]=l,e[19]=h}else h=e[19];let g;e[24]!==h?(g=t.jsx(G,{children:h}),e[24]=h,e[25]=g):g=e[25];let b;return e[26]!==f||e[27]!==g?(b=t.jsxs(J,{className:"w-full border-collapse",children:[f,g]}),e[26]=f,e[27]=g,e[28]=b):b=e[28],b}function le(N){const e=k.c(12),{columns:s,data:x,isLoading:p,sortKey:d,sortDirection:a,onSort:i,onRowClick:l,emptyState:m}=N;if(p===void 0?!1:p){let r;return e[0]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("div",{className:"flex items-center justify-center h-full",children:t.jsx("div",{className:"text-muted-foreground",children:"Loading..."})}),e[0]=r):r=e[0],r}if(x.length===0){let r;e[1]!==m?(r=m||t.jsx("div",{className:"text-center py-12 text-muted-foreground",children:"No items found"}),e[1]=m,e[2]=r):r=e[2];let o;return e[3]!==r?(o=t.jsx("div",{className:"flex items-center justify-center h-full",children:r}),e[3]=r,e[4]=o):o=e[4],o}let c;return e[5]!==s||e[6]!==x||e[7]!==l||e[8]!==i||e[9]!==a||e[10]!==d?(c=t.jsx("div",{className:"flex-1 overflow-auto",children:t.jsx(Q,{columns:s,data:x,sortKey:d,sortDirection:a,onSort:i,onRowClick:l})}),e[5]=s,e[6]=x,e[7]=l,e[8]=i,e[9]=a,e[10]=d,e[11]=c):c=e[11],c}export{ae as C,le as a};
@@ -1 +1 @@
1
- import{c as x,j as u}from"./index-DQipirM0.js";import{c as m}from"./button-BxOn_P7A.js";import{B as g}from"./badge-D4ZHiXFA.js";function v(f){const e=x.c(12),{tabs:l,activeTab:n,onTabChange:s,className:a}=f;let t;e[0]!==a?(t=m("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==l){let c;e[6]!==n||e[7]!==s?(c=o=>{const d=n===o.id;return u.jsxs("button",{type:"button",onClick:()=>s(o.id),className:m("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&u.jsx(g,{variant:"secondary",className:m("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=c):c=e[8],r=l.map(c),e[2]=n,e[3]=s,e[4]=l,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=u.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{v as C};
1
+ import{c as x,j as u}from"./index-DwBgLSti.js";import{c as m}from"./button-D6YZfFzy.js";import{B as g}from"./badge-Do8iK9u9.js";function v(f){const e=x.c(12),{tabs:l,activeTab:n,onTabChange:s,className:a}=f;let t;e[0]!==a?(t=m("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==l){let c;e[6]!==n||e[7]!==s?(c=o=>{const d=n===o.id;return u.jsxs("button",{type:"button",onClick:()=>s(o.id),className:m("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&u.jsx(g,{variant:"secondary",className:m("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=c):c=e[8],r=l.map(c),e[2]=n,e[3]=s,e[4]=l,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=u.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{v as C};
@@ -1 +1 @@
1
- import{c as r,u as i,n as u,K as p,d as f,j as n}from"./index-DQipirM0.js";import{_ as m}from"./index-BtVQ48XT.js";import{c as d}from"./button-BxOn_P7A.js";import{i as x}from"./SearchMd-Dvn1Eo76.js";function v(){const a=r.c(4),{locator:e}=i();let t;a[0]!==e?(t=p.members(e),a[0]=e,a[1]=t):t=a[1];let s;return a[2]!==t?(s={queryKey:t,queryFn:g},a[2]=t,a[3]=s):s=a[3],u(s)}function g(){return f.organization.listMembers()}function _(a){const e=r.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=d("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function j(a){const e=r.c(9);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(x,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=d("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let c;return e[6]!==s||e[7]!==l?(c=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=c):c=e[8],c}function C(a){const e=r.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=d("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function w(a){const e=r.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(m.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function $(a){const e=r.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=d("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function k(a){const e=r.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=d("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function E(a){const e=r.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=d("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{$ as C,E as a,k as b,w as c,C as d,_ as e,j as f,v as u};
1
+ import{c as r,u as i,n as u,K as p,d as f,j as n}from"./index-DwBgLSti.js";import{_ as m}from"./index-DmoBx0VC.js";import{c as d}from"./button-D6YZfFzy.js";import{i as x}from"./SearchMd-BLcaRHQs.js";function v(){const a=r.c(4),{locator:e}=i();let t;a[0]!==e?(t=p.members(e),a[0]=e,a[1]=t):t=a[1];let s;return a[2]!==t?(s={queryKey:t,queryFn:g},a[2]=t,a[3]=s):s=a[3],u(s)}function g(){return f.organization.listMembers()}function _(a){const e=r.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=d("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function j(a){const e=r.c(9);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(x,{className:"size-5 shrink-0 text-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=d("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let c;return e[6]!==s||e[7]!==l?(c=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=c):c=e[8],c}function C(a){const e=r.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=d("max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.List,{"data-slot":"command-list",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function w(a){const e=r.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(m.Empty,{"data-slot":"command-empty",className:"py-6 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function $(a){const e=r.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=d("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function k(a){const e=r.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=d("bg-border -mx-1 h-px",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Separator,{"data-slot":"command-separator",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function E(a){const e=r.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=d("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Item,{"data-slot":"command-item",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}export{$ as C,E as a,k as b,w as c,C as d,_ as e,j as f,v as u};
@@ -1 +1 @@
1
- import{c as T,bu as M,j as e,bv as P,m as q,r as R,t as h,e as O}from"./index-DQipirM0.js";import{u as A}from"./useQuery-CqT-L2b-.js";import{u as _}from"./useMutation-8rEyObWg.js";import{B as y}from"./button-BxOn_P7A.js";import{C as N,a as v}from"./card-DMS-g9Fe.js";import{i as L,a as U}from"./mcp-oauth-ZHptqU19.js";import{c as C,C as K,a as k}from"./circle-alert-BGE5uKTO.js";const Q=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],D=C("external-link",Q);const H=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],w=C("loader-circle",H);const J=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],B=C("refresh-cw",J),Y=t=>{const n=T.c(6);let i;n[0]!==t?({...i}=t,n[0]=t,n[1]=i):i=n[1];const{theme:a}=M(),d=a===void 0?"system":a;let r;n[2]===Symbol.for("react.memo_cache_sentinel")?(r={"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},n[2]=r):r=n[2];let m;return n[3]!==i||n[4]!==d?(m=e.jsx(P,{theme:d,className:"toaster group",style:r,...i}),n[3]=i,n[4]=d,n[5]=m):m=n[5],m},b={session:t=>["user-sandbox-session",t]};function V({sessionId:t,onComplete:n,onError:i}){const a=q(),[p,d]=R.useState(null),{data:r,isLoading:m,error:j}=A({queryKey:b.session(t),queryFn:async()=>{const s=await fetch(`/api/user-sandbox/sessions/${t}`);if(!s.ok){const o=await s.json();throw new Error(o.error||"Failed to load session")}return s.json()}}),F=_({mutationFn:async({appName:s,connectionId:o})=>{const l=await fetch(`/api/user-sandbox/sessions/${t}/configure`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({app_name:s,connection_id:o})});if(!l.ok){const u=await l.json();throw new Error(u.error||"Configuration failed")}return l.json()},onSuccess:()=>{a.invalidateQueries({queryKey:b.session(t)})}}),x=_({mutationFn:async()=>{const s=await fetch(`/api/user-sandbox/sessions/${t}/complete`,{method:"POST",headers:{"Content-Type":"application/json"}});if(!s.ok){const o=await s.json();throw new Error(o.error||"Failed to complete")}return s.json()},onSuccess:s=>{s.redirectUrl?window.location.href=s.redirectUrl:(h.success("Setup complete!"),a.invalidateQueries({queryKey:b.session(t)}),n?.({agentId:s.agentId,redirectUrl:s.redirectUrl}))},onError:s=>{const o=s instanceof Error?s:new Error("Failed to complete");h.error(o.message),i?.(o)}}),S=async s=>{d(s.app_name);try{const o=await fetch(`/api/user-sandbox/sessions/${t}/provision`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({app_name:s.app_name})});if(!o.ok){const g=await o.json();throw new Error(g.error||"Failed to provision connection")}const u=(await o.json()).connection_id;if(s.connection_type==="HTTP"||s.connection_type==="SSE"||s.connection_type==="Websocket"){const g=`/mcp/${u}`,z=await L({url:g,token:null});if(!z.isAuthenticated&&z.supportsOAuth){h.info("Opening authentication window...");const c=await U({connectionId:u,clientName:s.title,timeout:3e5});if(c.error)throw new Error(c.error);if(c.tokenInfo){const E=await fetch(`/api/connections/${u}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accessToken:c.tokenInfo.accessToken,refreshToken:c.tokenInfo.refreshToken,expiresIn:c.tokenInfo.expiresIn,scope:c.tokenInfo.scope,clientId:c.tokenInfo.clientId,clientSecret:c.tokenInfo.clientSecret,tokenEndpoint:c.tokenInfo.tokenEndpoint})});if(!E.ok){const $=await E.json().catch(()=>({}));throw new Error($.error||"Failed to save authentication tokens. Please try again.")}}}}await F.mutateAsync({appName:s.app_name,connectionId:u}),h.success(`${s.title} connected successfully`)}catch(o){console.error("Connection error:",o);const l=o instanceof Error?o:new Error("Failed to connect");h.error(l.message),i?.(l)}finally{d(null)}},I=r?.apps.every(s=>s.status.configured),f=r?.session.status==="completed";return m?e.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:e.jsx(w,{className:"size-8 animate-spin text-muted-foreground"})}):j?e.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:e.jsx(N,{className:"max-w-md w-full",children:e.jsx(v,{className:"pt-6",children:e.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[e.jsx("div",{className:"size-12 rounded-full bg-destructive/10 flex items-center justify-center",children:e.jsx(K,{className:"size-6 text-destructive"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Session Error"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:j instanceof Error?j.message:"Failed to load"})]})]})})})}):r?e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(Y,{}),e.jsxs("div",{className:"max-w-lg mx-auto px-4 py-12",children:[e.jsxs("div",{className:"text-center mb-8",children:[r.template.icon&&e.jsx("div",{className:"size-16 mx-auto mb-4 rounded-xl bg-muted flex items-center justify-center overflow-hidden",children:e.jsx("img",{src:r.template.icon,alt:"",className:"size-10 object-contain"})}),e.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:r.template.title}),r.template.description&&e.jsx("p",{className:"text-muted-foreground mt-2",children:r.template.description})]}),f&&e.jsx(N,{className:"mb-6 border-green-500/20 bg-green-500/5",children:e.jsx(v,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"size-10 rounded-full bg-green-500/10 flex items-center justify-center",children:e.jsx(k,{className:"size-5 text-green-500"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"Setup Complete"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Your integrations are ready to use."})]})]})})}),e.jsx("div",{className:"space-y-3",children:r.apps.map(s=>e.jsx(N,{children:e.jsx(v,{className:"py-4",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"size-10 rounded-lg bg-muted flex items-center justify-center shrink-0 overflow-hidden",children:s.icon?e.jsx("img",{src:s.icon,alt:"",className:"size-6 object-contain"}):e.jsx("span",{className:"text-lg",children:"📦"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-medium truncate",children:s.title}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s.status.configured?e.jsxs("span",{className:"text-green-600 dark:text-green-400 flex items-center gap-1",children:[e.jsx(k,{className:"size-3"})," Connected"]}):s.requires_oauth?"Requires authentication":"Ready to connect"})]}),!s.status.configured&&!f&&e.jsx(y,{size:"sm",onClick:()=>S(s),disabled:p!==null||x.isPending,children:p===s.app_name?e.jsxs(e.Fragment,{children:[e.jsx(w,{className:"size-4 mr-2 animate-spin"}),"Connecting..."]}):e.jsxs(e.Fragment,{children:[e.jsx(D,{className:"size-4 mr-2"}),"Connect"]})}),s.status.configured&&!f&&e.jsxs(y,{size:"sm",variant:"outline",onClick:()=>S(s),disabled:p!==null||x.isPending,children:[e.jsx(B,{className:"size-4 mr-2"}),"Reconnect"]}),f&&e.jsx("div",{className:"size-8 rounded-full bg-green-500/10 flex items-center justify-center",children:e.jsx(k,{className:"size-4 text-green-500"})})]})})},s.app_name))}),I&&!f&&e.jsx("div",{className:"mt-6",children:e.jsx(y,{className:"w-full",size:"lg",onClick:()=>x.mutate(),disabled:x.isPending,children:x.isPending?e.jsxs(e.Fragment,{children:[e.jsx(w,{className:"size-4 mr-2 animate-spin"}),"Completing..."]}):"Complete Setup"})}),e.jsx("div",{className:"mt-8 pt-6 border-t text-center",children:e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Session expires:"," ",new Date(r.session.expires_at).toLocaleString()]})})]})]}):null}function oe(){const t=T.c(3);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/connect/$sessionId"},t[0]=n):n=t[0];const{sessionId:i}=O(n);let a;return t[1]!==i?(a=e.jsx(V,{sessionId:i}),t[1]=i,t[2]=a):a=t[2],a}export{oe as default};
1
+ import{c as T,bv as M,j as e,bw as P,m as q,r as R,t as h,e as O}from"./index-DwBgLSti.js";import{u as A}from"./useQuery-CPsXfVfR.js";import{u as _}from"./useMutation-DgG1LVg-.js";import{B as y}from"./button-D6YZfFzy.js";import{C as N,a as v}from"./card-BNyCnFpQ.js";import{i as L,a as U}from"./mcp-oauth-Bb9gvF4o.js";import{c as C,C as K,a as w}from"./circle-alert-YjViK8VE.js";const Q=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],D=C("external-link",Q);const H=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],k=C("loader-circle",H);const J=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],B=C("refresh-cw",J),Y=t=>{const n=T.c(6);let i;n[0]!==t?({...i}=t,n[0]=t,n[1]=i):i=n[1];const{theme:a}=M(),d=a===void 0?"system":a;let r;n[2]===Symbol.for("react.memo_cache_sentinel")?(r={"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)"},n[2]=r):r=n[2];let m;return n[3]!==i||n[4]!==d?(m=e.jsx(P,{theme:d,className:"toaster group",style:r,...i}),n[3]=i,n[4]=d,n[5]=m):m=n[5],m},b={session:t=>["user-sandbox-session",t]};function V({sessionId:t,onComplete:n,onError:i}){const a=q(),[p,d]=R.useState(null),{data:r,isLoading:m,error:j}=A({queryKey:b.session(t),queryFn:async()=>{const s=await fetch(`/api/user-sandbox/sessions/${t}`);if(!s.ok){const o=await s.json();throw new Error(o.error||"Failed to load session")}return s.json()}}),F=_({mutationFn:async({appName:s,connectionId:o})=>{const l=await fetch(`/api/user-sandbox/sessions/${t}/configure`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({app_name:s,connection_id:o})});if(!l.ok){const u=await l.json();throw new Error(u.error||"Configuration failed")}return l.json()},onSuccess:()=>{a.invalidateQueries({queryKey:b.session(t)})}}),x=_({mutationFn:async()=>{const s=await fetch(`/api/user-sandbox/sessions/${t}/complete`,{method:"POST",headers:{"Content-Type":"application/json"}});if(!s.ok){const o=await s.json();throw new Error(o.error||"Failed to complete")}return s.json()},onSuccess:s=>{s.redirectUrl?window.location.href=s.redirectUrl:(h.success("Setup complete!"),a.invalidateQueries({queryKey:b.session(t)}),n?.({agentId:s.agentId,redirectUrl:s.redirectUrl}))},onError:s=>{const o=s instanceof Error?s:new Error("Failed to complete");h.error(o.message),i?.(o)}}),S=async s=>{d(s.app_name);try{const o=await fetch(`/api/user-sandbox/sessions/${t}/provision`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({app_name:s.app_name})});if(!o.ok){const g=await o.json();throw new Error(g.error||"Failed to provision connection")}const u=(await o.json()).connection_id;if(s.connection_type==="HTTP"||s.connection_type==="SSE"||s.connection_type==="Websocket"){const g=`/mcp/${u}`,z=await L({url:g,token:null});if(!z.isAuthenticated&&z.supportsOAuth){h.info("Opening authentication window...");const c=await U({connectionId:u,clientName:s.title,timeout:3e5});if(c.error)throw new Error(c.error);if(c.tokenInfo){const E=await fetch(`/api/connections/${u}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({accessToken:c.tokenInfo.accessToken,refreshToken:c.tokenInfo.refreshToken,expiresIn:c.tokenInfo.expiresIn,scope:c.tokenInfo.scope,clientId:c.tokenInfo.clientId,clientSecret:c.tokenInfo.clientSecret,tokenEndpoint:c.tokenInfo.tokenEndpoint})});if(!E.ok){const $=await E.json().catch(()=>({}));throw new Error($.error||"Failed to save authentication tokens. Please try again.")}}}}await F.mutateAsync({appName:s.app_name,connectionId:u}),h.success(`${s.title} connected successfully`)}catch(o){console.error("Connection error:",o);const l=o instanceof Error?o:new Error("Failed to connect");h.error(l.message),i?.(l)}finally{d(null)}},I=r?.apps.every(s=>s.status.configured),f=r?.session.status==="completed";return m?e.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center",children:e.jsx(k,{className:"size-8 animate-spin text-muted-foreground"})}):j?e.jsx("div",{className:"min-h-screen bg-background flex items-center justify-center p-4",children:e.jsx(N,{className:"max-w-md w-full",children:e.jsx(v,{className:"pt-6",children:e.jsxs("div",{className:"flex flex-col items-center gap-4 text-center",children:[e.jsx("div",{className:"size-12 rounded-full bg-destructive/10 flex items-center justify-center",children:e.jsx(K,{className:"size-6 text-destructive"})}),e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold",children:"Session Error"}),e.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:j instanceof Error?j.message:"Failed to load"})]})]})})})}):r?e.jsxs("div",{className:"min-h-screen bg-background",children:[e.jsx(Y,{}),e.jsxs("div",{className:"max-w-lg mx-auto px-4 py-12",children:[e.jsxs("div",{className:"text-center mb-8",children:[r.template.icon&&e.jsx("div",{className:"size-16 mx-auto mb-4 rounded-xl bg-muted flex items-center justify-center overflow-hidden",children:e.jsx("img",{src:r.template.icon,alt:"",className:"size-10 object-contain"})}),e.jsx("h1",{className:"text-2xl font-semibold tracking-tight",children:r.template.title}),r.template.description&&e.jsx("p",{className:"text-muted-foreground mt-2",children:r.template.description})]}),f&&e.jsx(N,{className:"mb-6 border-green-500/20 bg-green-500/5",children:e.jsx(v,{className:"pt-6",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"size-10 rounded-full bg-green-500/10 flex items-center justify-center",children:e.jsx(w,{className:"size-5 text-green-500"})}),e.jsxs("div",{children:[e.jsx("p",{className:"font-medium",children:"Setup Complete"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Your integrations are ready to use."})]})]})})}),e.jsx("div",{className:"space-y-3",children:r.apps.map(s=>e.jsx(N,{children:e.jsx(v,{className:"py-4",children:e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx("div",{className:"size-10 rounded-lg bg-muted flex items-center justify-center shrink-0 overflow-hidden",children:s.icon?e.jsx("img",{src:s.icon,alt:"",className:"size-6 object-contain"}):e.jsx("span",{className:"text-lg",children:"📦"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-medium truncate",children:s.title}),e.jsx("p",{className:"text-sm text-muted-foreground",children:s.status.configured?e.jsxs("span",{className:"text-green-600 dark:text-green-400 flex items-center gap-1",children:[e.jsx(w,{className:"size-3"})," Connected"]}):s.requires_oauth?"Requires authentication":"Ready to connect"})]}),!s.status.configured&&!f&&e.jsx(y,{size:"sm",onClick:()=>S(s),disabled:p!==null||x.isPending,children:p===s.app_name?e.jsxs(e.Fragment,{children:[e.jsx(k,{className:"size-4 mr-2 animate-spin"}),"Connecting..."]}):e.jsxs(e.Fragment,{children:[e.jsx(D,{className:"size-4 mr-2"}),"Connect"]})}),s.status.configured&&!f&&e.jsxs(y,{size:"sm",variant:"outline",onClick:()=>S(s),disabled:p!==null||x.isPending,children:[e.jsx(B,{className:"size-4 mr-2"}),"Reconnect"]}),f&&e.jsx("div",{className:"size-8 rounded-full bg-green-500/10 flex items-center justify-center",children:e.jsx(w,{className:"size-4 text-green-500"})})]})})},s.app_name))}),I&&!f&&e.jsx("div",{className:"mt-6",children:e.jsx(y,{className:"w-full",size:"lg",onClick:()=>x.mutate(),disabled:x.isPending,children:x.isPending?e.jsxs(e.Fragment,{children:[e.jsx(k,{className:"size-4 mr-2 animate-spin"}),"Completing..."]}):"Complete Setup"})}),e.jsx("div",{className:"mt-8 pt-6 border-t text-center",children:e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Session expires:"," ",new Date(r.session.expires_at).toLocaleString()]})})]})]}):null}function oe(){const t=T.c(3);let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/connect/$sessionId"},t[0]=n):n=t[0];const{sessionId:i}=O(n);let a;return t[1]!==i?(a=e.jsx(V,{sessionId:i}),t[1]=i,t[2]=a):a=t[2],a}export{oe as default};
@@ -1 +1 @@
1
- import{c as $,j as t}from"./index-DQipirM0.js";import{C as q}from"./card-DMS-g9Fe.js";import{c as N}from"./button-BxOn_P7A.js";import{I as B}from"./integration-icon-6FQvxTss.js";function L(g){const e=$.c(46),{connection:s,onClick:C,headerActions:b,body:k,footer:y,className:I,size:A,fallbackIcon:w}=g,E=A===void 0?"md":A,i=E==="sm"?"p-4":"p-6",P=E==="sm"?"text-sm":"text-base",R=E==="sm"?"text-xs":"text-sm",S=C&&"hover:bg-muted/50";let l;e[0]!==I||e[1]!==S?(l=N("cursor-pointer transition-colors group overflow-hidden flex flex-col",S,I),e[0]=I,e[1]=S,e[2]=l):l=e[2];let o;e[3]!==i?(o=N("flex flex-col gap-4",i),e[3]=i,e[4]=o):o=e[4];let n;e[5]!==s.icon||e[6]!==s.title||e[7]!==w?(n=t.jsx(B,{icon:s.icon,name:s.title,size:"md",className:"shrink-0 shadow-sm",fallbackIcon:w}),e[5]=s.icon,e[6]=s.title,e[7]=w,e[8]=n):n=e[8];let c;e[9]!==b?(c=b&&t.jsx("div",{className:N("transition-opacity","opacity-0 group-hover:opacity-100"),onClick:F,children:b}),e[9]=b,e[10]=c):c=e[10];let r;e[11]!==c?(r=t.jsx("div",{className:"relative",children:c}),e[11]=c,e[12]=r):r=e[12];let a;e[13]!==n||e[14]!==r?(a=t.jsxs("div",{className:"flex items-start justify-between",children:[n,r]}),e[13]=n,e[14]=r,e[15]=a):a=e[15];let d;e[16]!==P?(d=N("font-medium text-foreground truncate",P),e[16]=P,e[17]=d):d=e[17];let m;e[18]!==s.title||e[19]!==d?(m=t.jsx("h3",{className:d,children:s.title}),e[18]=s.title,e[19]=d,e[20]=m):m=e[20];let f;e[21]!==R?(f=N("text-muted-foreground line-clamp-2",R),e[21]=R,e[22]=f):f=e[22];const _=s.description||"No description";let x;e[23]!==f||e[24]!==_?(x=t.jsx("p",{className:f,children:_}),e[23]=f,e[24]=_,e[25]=x):x=e[25];let p;e[26]!==m||e[27]!==x?(p=t.jsxs("div",{className:"flex flex-col gap-0",children:[m,x]}),e[26]=m,e[27]=x,e[28]=p):p=e[28];let h;e[29]!==k?(h=k&&t.jsx("div",{children:k}),e[29]=k,e[30]=h):h=e[30];let u;e[31]!==p||e[32]!==h||e[33]!==o||e[34]!==a?(u=t.jsxs("div",{className:o,children:[a,p,h]}),e[31]=p,e[32]=h,e[33]=o,e[34]=a,e[35]=u):u=e[35];let j;e[36]!==y||e[37]!==i?(j=y&&t.jsx("div",{className:"border-t border-border mt-auto",children:t.jsx("div",{className:N("h-14 flex items-center",i),onClick:D,children:y})}),e[36]=y,e[37]=i,e[38]=j):j=e[38];let v;e[39]!==u||e[40]!==j?(v=t.jsxs("div",{className:"flex flex-col flex-1",children:[u,j]}),e[39]=u,e[40]=j,e[41]=v):v=e[41];let z;return e[42]!==C||e[43]!==v||e[44]!==l?(z=t.jsx(q,{className:l,onClick:C,children:v}),e[42]=C,e[43]=v,e[44]=l,e[45]=z):z=e[45],z}function D(g){return g.stopPropagation()}function F(g){return g.stopPropagation()}export{L as C};
1
+ import{c as $,j as t}from"./index-DwBgLSti.js";import{C as q}from"./card-BNyCnFpQ.js";import{c as N}from"./button-D6YZfFzy.js";import{I as B}from"./integration-icon-qV_BsBQR.js";function L(g){const e=$.c(46),{connection:s,onClick:C,headerActions:b,body:k,footer:y,className:I,size:A,fallbackIcon:w}=g,E=A===void 0?"md":A,i=E==="sm"?"p-4":"p-6",P=E==="sm"?"text-sm":"text-base",R=E==="sm"?"text-xs":"text-sm",S=C&&"hover:bg-muted/50";let l;e[0]!==I||e[1]!==S?(l=N("cursor-pointer transition-colors group overflow-hidden flex flex-col",S,I),e[0]=I,e[1]=S,e[2]=l):l=e[2];let o;e[3]!==i?(o=N("flex flex-col gap-4",i),e[3]=i,e[4]=o):o=e[4];let n;e[5]!==s.icon||e[6]!==s.title||e[7]!==w?(n=t.jsx(B,{icon:s.icon,name:s.title,size:"md",className:"shrink-0 shadow-sm",fallbackIcon:w}),e[5]=s.icon,e[6]=s.title,e[7]=w,e[8]=n):n=e[8];let c;e[9]!==b?(c=b&&t.jsx("div",{className:N("transition-opacity","opacity-0 group-hover:opacity-100"),onClick:F,children:b}),e[9]=b,e[10]=c):c=e[10];let r;e[11]!==c?(r=t.jsx("div",{className:"relative",children:c}),e[11]=c,e[12]=r):r=e[12];let a;e[13]!==n||e[14]!==r?(a=t.jsxs("div",{className:"flex items-start justify-between",children:[n,r]}),e[13]=n,e[14]=r,e[15]=a):a=e[15];let d;e[16]!==P?(d=N("font-medium text-foreground truncate",P),e[16]=P,e[17]=d):d=e[17];let m;e[18]!==s.title||e[19]!==d?(m=t.jsx("h3",{className:d,children:s.title}),e[18]=s.title,e[19]=d,e[20]=m):m=e[20];let f;e[21]!==R?(f=N("text-muted-foreground line-clamp-2",R),e[21]=R,e[22]=f):f=e[22];const _=s.description||"No description";let x;e[23]!==f||e[24]!==_?(x=t.jsx("p",{className:f,children:_}),e[23]=f,e[24]=_,e[25]=x):x=e[25];let p;e[26]!==m||e[27]!==x?(p=t.jsxs("div",{className:"flex flex-col gap-0",children:[m,x]}),e[26]=m,e[27]=x,e[28]=p):p=e[28];let h;e[29]!==k?(h=k&&t.jsx("div",{children:k}),e[29]=k,e[30]=h):h=e[30];let u;e[31]!==p||e[32]!==h||e[33]!==o||e[34]!==a?(u=t.jsxs("div",{className:o,children:[a,p,h]}),e[31]=p,e[32]=h,e[33]=o,e[34]=a,e[35]=u):u=e[35];let j;e[36]!==y||e[37]!==i?(j=y&&t.jsx("div",{className:"border-t border-border mt-auto",children:t.jsx("div",{className:N("h-14 flex items-center",i),onClick:D,children:y})}),e[36]=y,e[37]=i,e[38]=j):j=e[38];let v;e[39]!==u||e[40]!==j?(v=t.jsxs("div",{className:"flex flex-col flex-1",children:[u,j]}),e[39]=u,e[40]=j,e[41]=v):v=e[41];let z;return e[42]!==C||e[43]!==v||e[44]!==l?(z=t.jsx(q,{className:l,onClick:C,children:v}),e[42]=C,e[43]=v,e[44]=l,e[45]=z):z=e[45],z}function D(g){return g.stopPropagation()}function F(g){return g.stopPropagation()}export{L as C};