decocms 4.372.1 → 4.372.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (369) hide show
  1. package/dist/client/assets/{AlertCircle-DbwtWnTP.js → AlertCircle-CMjsP_Tk.js} +1 -1
  2. package/dist/client/assets/{AreaChart-tdrxZdfF.js → AreaChart-Bh_grNQZ.js} +1 -1
  3. package/dist/client/assets/{ArrowLeft-CyH6aWpS.js → ArrowLeft-CjYy5Nhj.js} +1 -1
  4. package/dist/client/assets/{ArrowRight-Bv0iX4wy.js → ArrowRight-CLncCNat.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-Scf6R8DX.js → ArrowUp-Cii1LHW7.js} +1 -1
  6. package/dist/client/assets/{CartesianChart-D1MxLL7k.js → CartesianChart-CD-5y_pX.js} +1 -1
  7. package/dist/client/assets/{Check-BZE0WrNL.js → Check-B3RSsr_D.js} +1 -1
  8. package/dist/client/assets/{CheckCircle-BKb1RVrA.js → CheckCircle-DHXQFnpK.js} +1 -1
  9. package/dist/client/assets/{ChevronRight-DNrwFBnC.js → ChevronRight-USKkhEpL.js} +1 -1
  10. package/dist/client/assets/{ChevronSelectorVertical-oXn0cTzk.js → ChevronSelectorVertical-DpRb2z1l.js} +1 -1
  11. package/dist/client/assets/{ChevronUp-D5_IWEtB.js → ChevronUp-DiYhGG4T.js} +1 -1
  12. package/dist/client/assets/{Copy01-DTHuBaTA.js → Copy01-nMxlBfeT.js} +1 -1
  13. package/dist/client/assets/{CreditCard01-CwX6pA0M.js → CreditCard01-CWXVH3ZM.js} +1 -1
  14. package/dist/client/assets/{Database01-RGlwXHSd.js → Database01-C0YJpjc3.js} +1 -1
  15. package/dist/client/assets/{DotsVertical-DE9eZKrJ.js → DotsVertical-CsjwfYzf.js} +1 -1
  16. package/dist/client/assets/{Download01-qX3hmvr5.js → Download01-BRrSA3Yx.js} +1 -1
  17. package/dist/client/assets/{ErrorBarContext-9sp0Dc4M.js → ErrorBarContext-fXvhmekg.js} +1 -1
  18. package/dist/client/assets/{Eye-DXUjft5i.js → Eye-Dyg2WPG4.js} +1 -1
  19. package/dist/client/assets/{File02-g-xJPix_.js → File02-BvR-HYxK.js} +1 -1
  20. package/dist/client/assets/{GitBranch01-ddoPQdPH.js → GitBranch01-rWb2SJK9.js} +1 -1
  21. package/dist/client/assets/{Globe01-DIy8wXF6.js → Globe01-D6FaaFR2.js} +1 -1
  22. package/dist/client/assets/{HardDrive-DU_z1AQw.js → HardDrive-DNTPLPT4.js} +1 -1
  23. package/dist/client/assets/{Image01-DfaxHjlV.js → Image01-CxnjAzbb.js} +1 -1
  24. package/dist/client/assets/{Key01-mqjfsZRe.js → Key01-CIXwHMRo.js} +1 -1
  25. package/dist/client/assets/{Line-D02_6GXf.js → Line-YO4Ozgbt.js} +1 -1
  26. package/dist/client/assets/{Link01-C656VtHx.js → Link01-C0FvgZZB.js} +1 -1
  27. package/dist/client/assets/{LinkExternal01-BkRUjBAn.js → LinkExternal01-AWlhN5o7.js} +1 -1
  28. package/dist/client/assets/{MessageCircle01-CgotMmLL.js → MessageCircle01-DBcg2aiD.js} +1 -1
  29. package/dist/client/assets/{Monitor01-CQ6Zk1oP.js → Monitor01-Ccs1gh2Z.js} +1 -1
  30. package/dist/client/assets/{Package-t6euxYcP.js → Package-nTbucmaQ.js} +1 -1
  31. package/dist/client/assets/{Palette-oECS8j3l.js → Palette-DSdn1Xis.js} +1 -1
  32. package/dist/client/assets/{Play-DQgzDnaW.js → Play-lMuWOObF.js} +1 -1
  33. package/dist/client/assets/{Plus-D2HOi_DD.js → Plus-CVauOqLT.js} +1 -1
  34. package/dist/client/assets/{Printer-BpZBiqyG.js → Printer-CvyxF9Jo.js} +1 -1
  35. package/dist/client/assets/{SearchLg-DbX4T5E-.js → SearchLg-BrrPVuXr.js} +1 -1
  36. package/dist/client/assets/{SearchMd-FDCJM3CR.js → SearchMd-C45D2PMI.js} +1 -1
  37. package/dist/client/assets/{Sector-BW9tyobX.js → Sector-9mXbxJ9i.js} +1 -1
  38. package/dist/client/assets/{Settings02-CFcKewXh.js → Settings02-Cyf85ea0.js} +1 -1
  39. package/dist/client/assets/{Share07-CxuHcmnM.js → Share07-wC47qn2E.js} +1 -1
  40. package/dist/client/assets/{Shield01-HrKG6yUn.js → Shield01-CqB4I7qm.js} +1 -1
  41. package/dist/client/assets/{Stars01-B_nM3FYf.js → Stars01-oAh9h5b5.js} +1 -1
  42. package/dist/client/assets/{Sun-SBoG-e9B.js → Sun-0Ied-kyZ.js} +1 -1
  43. package/dist/client/assets/{SwitchHorizontal01-hHr6GOmU.js → SwitchHorizontal01-DpXsFGyJ.js} +1 -1
  44. package/dist/client/assets/{Tool01-DHi_Z7zo.js → Tool01-DouqPjim.js} +1 -1
  45. package/dist/client/assets/{Tool02-JY0gm8cg.js → Tool02-CATStXCy.js} +1 -1
  46. package/dist/client/assets/{Trash01-C6bziN5X.js → Trash01-nl-t4IoV.js} +1 -1
  47. package/dist/client/assets/{TrendUp01-Bkdgpfn7.js → TrendUp01-BFAEMx9E.js} +1 -1
  48. package/dist/client/assets/{Upload01-DC2spim9.js → Upload01-B4Fqdkae.js} +1 -1
  49. package/dist/client/assets/{User01-BbOpA84p.js → User01-ClMaVCaJ.js} +1 -1
  50. package/dist/client/assets/{UserSquare-qgzToKNd.js → UserSquare-B2lKdt4w.js} +1 -1
  51. package/dist/client/assets/{Users01-BOsDT0Jv.js → Users01-BFhxJVhO.js} +1 -1
  52. package/dist/client/assets/{Users03-BP-0DNhp.js → Users03-Y0Jco4zL.js} +1 -1
  53. package/dist/client/assets/{X-Bzh3NI3m.js → X-CFCE4a-Q.js} +1 -1
  54. package/dist/client/assets/{XCircle-CuK2q_XU.js → XCircle-CleKT0Id.js} +1 -1
  55. package/dist/client/assets/{XClose-Cvyz3reC.js → XClose-BgzK-Dwz.js} +1 -1
  56. package/dist/client/assets/{Zap-DXNovEva.js → Zap-B6zkqKWB.js} +1 -1
  57. package/dist/client/assets/{ZoomOut-BRjMa-04.js → ZoomOut-BPxprY2s.js} +1 -1
  58. package/dist/client/assets/{access-gate-NMf18NsK.js → access-gate-Ds4n25mC.js} +1 -1
  59. package/dist/client/assets/{add-connection-dialog-GfufFuLz.js → add-connection-dialog-DZjTm9W3.js} +1 -1
  60. package/dist/client/assets/{agent-analytics-DKvARLL3.js → agent-analytics-DmvdLg8B.js} +1 -1
  61. package/dist/client/assets/agent-app-BvmFdS4C.js +1 -0
  62. package/dist/client/assets/{agent-assets-DePuap3v.js → agent-assets-czUGY90q.js} +1 -1
  63. package/dist/client/assets/{agent-automation-NvLs9ax2.js → agent-automation-C5Kr5Oj3.js} +1 -1
  64. package/dist/client/assets/{agent-automations-BV3f-ekl.js → agent-automations-D-3-Opoc.js} +1 -1
  65. package/dist/client/assets/{agent-connect-sources-DtqgR_Ib.js → agent-connect-sources-CjhmYssY.js} +1 -1
  66. package/dist/client/assets/agent-deck-BC5MWVm-.js +1 -0
  67. package/dist/client/assets/{agent-e2e-CHL03ziT.js → agent-e2e-DkL4Ltr6.js} +1 -1
  68. package/dist/client/assets/{agent-experiments-CWfra8gc.js → agent-experiments--rXT-2aB.js} +1 -1
  69. package/dist/client/assets/agent-file-C3XkHLMm.js +1 -0
  70. package/dist/client/assets/{agent-git-CU-dqFim.js → agent-git-D4IYczGa.js} +1 -1
  71. package/dist/client/assets/{agent-hosting-x-9xTx9o.js → agent-hosting-DaIfm8Hu.js} +1 -1
  72. package/dist/client/assets/{agent-icon-BD4DM2Lv.js → agent-icon-CczrFEe7.js} +1 -1
  73. package/dist/client/assets/agent-library-file-Dji653pU.js +1 -0
  74. package/dist/client/assets/{agent-monitor-CpVDwlgY.js → agent-monitor-C-HIyaF_.js} +1 -1
  75. package/dist/client/assets/{agent-overview-SQDEg6Zv.js → agent-overview-cm15sxNU.js} +1 -1
  76. package/dist/client/assets/agent-settings-XmhY1FOi.js +1 -0
  77. package/dist/client/assets/{agent-site-editor-BXrb3i4T.js → agent-site-editor-DJSdtoNU.js} +1 -1
  78. package/dist/client/assets/agent-site-editor-code-_Tz57RqE.js +2 -0
  79. package/dist/client/assets/{agent-site-editor-content-C3uy2bqp.js → agent-site-editor-content-DOAcxz0t.js} +2 -2
  80. package/dist/client/assets/{agent-site-editor-preview-BB-KqzfI.js → agent-site-editor-preview-mg5Q6hoW.js} +3 -3
  81. package/dist/client/assets/agent-view-ClMILC98.js +1 -0
  82. package/dist/client/assets/{agent-view-guard-q_9RifUL.js → agent-view-guard-DHJpzCVR.js} +1 -1
  83. package/dist/client/assets/{agents-list-BCgsEzHh.js → agents-list-rKFF5b3o.js} +1 -1
  84. package/dist/client/assets/{ai-providers-DGgtE9F7.js → ai-providers-jxGd6MbV.js} +1 -1
  85. package/dist/client/assets/{alert-Cnsh1M35.js → alert-U2IStW1f.js} +1 -1
  86. package/dist/client/assets/{alert-dialog-Bi9Cy1y8.js → alert-dialog-BI-B_8hq.js} +1 -1
  87. package/dist/client/assets/{api-keys-BlYGdiam.js → api-keys-AIfL76r6.js} +1 -1
  88. package/dist/client/assets/api-keys-B6ry5Bc6.js +1 -0
  89. package/dist/client/assets/app-editor-BZKFeBmU.js +1 -0
  90. package/dist/client/assets/{asset-utils-syVIRo9d.js → asset-utils-DhbLEVKo.js} +1 -1
  91. package/dist/client/assets/{auth-D-2jYpOE.js → auth-DhzAq_9m.js} +1 -1
  92. package/dist/client/assets/{auth-catchall-C3GEml6h.js → auth-catchall-Dar7OygY.js} +1 -1
  93. package/dist/client/assets/{auth-entry-CJhH7CHs.js → auth-entry-CwWjlqGu.js} +1 -1
  94. package/dist/client/assets/{auth-split-layout-B3xBkE6i.js → auth-split-layout-DLFqjvPt.js} +1 -1
  95. package/dist/client/assets/{authenticate-and-persist-oauth-2yRhuiER.js → authenticate-and-persist-oauth-DkJ4g-X5.js} +1 -1
  96. package/dist/client/assets/{automation-list-row-DVPV4sOa.js → automation-list-row-Btr-Kty6.js} +1 -1
  97. package/dist/client/assets/{automation-runs-DnDgp3GT.js → automation-runs-CnOOOwZJ.js} +1 -1
  98. package/dist/client/assets/automations-CtLmB1Eo.js +1 -0
  99. package/dist/client/assets/{autosend-D-BN-cv5.js → autosend-BberXmli.js} +1 -1
  100. package/dist/client/assets/{avatar-Duu5Gg02.js → avatar-C9HiP4eS.js} +1 -1
  101. package/dist/client/assets/{badge-BNBGXxmC.js → badge-Bu51Hlti.js} +1 -1
  102. package/dist/client/assets/{block-document-BT-7XjFG.js → block-document-BLCekKXO.js} +1 -1
  103. package/dist/client/assets/{blocks-preview-workspace-context-BvM2Da4n.js → blocks-preview-workspace-context-Bwmvvd4S.js} +1 -1
  104. package/dist/client/assets/{breadcrumb-sWWxibcS.js → breadcrumb-Dhdru7Jh.js} +1 -1
  105. package/dist/client/assets/{buckets-Biauz5yB.js → buckets-BndbOAGO.js} +1 -1
  106. package/dist/client/assets/{build-improve-prompt-doc-RalyChXZ.js → build-improve-prompt-doc-Cedp3vV1.js} +1 -1
  107. package/dist/client/assets/{bulk-category-panel-CODUgRdO.js → bulk-category-panel-D3c_qJDk.js} +1 -1
  108. package/dist/client/assets/{calendar-Dyov14Y_.js → calendar-DIQx67oO.js} +1 -1
  109. package/dist/client/assets/{capability-load-error-L3ivCxmO.js → capability-load-error-CJMvYDf4.js} +1 -1
  110. package/dist/client/assets/{cards-ojW-Mo-n.js → cards-BVw8sRdW.js} +1 -1
  111. package/dist/client/assets/category-editor-C7sRrVfl.js +1 -0
  112. package/dist/client/assets/{chart-Con9xnVz.js → chart-8nXuVw9P.js} +1 -1
  113. package/dist/client/assets/{chat-context-BBVkwd3p.js → chat-context-tZCX_cqt.js} +1 -1
  114. package/dist/client/assets/{chat-draft-bAtYgASI.js → chat-draft-BCeqPSxA.js} +1 -1
  115. package/dist/client/assets/{checkbox-Dkejdmst.js → checkbox-jLf7fBuW.js} +1 -1
  116. package/dist/client/assets/{choose-editor-BKF6XAA7.js → choose-editor-Cbu3-nVC.js} +1 -1
  117. package/dist/client/assets/{cli-auth-success-BUl2RZMr.js → cli-auth-success-D39z_FO3.js} +1 -1
  118. package/dist/client/assets/{client-icons-DLMNndDc.js → client-icons-DpcP1bht.js} +1 -1
  119. package/dist/client/assets/{collapsible-n44mVpiB.js → collapsible-CTgXdVQa.js} +1 -1
  120. package/dist/client/assets/{collection-detail-B7MXGdLU.js → collection-detail-BF7WM7Gn.js} +1 -1
  121. package/dist/client/assets/{collection-display-button-C3iXY6zC.js → collection-display-button-C-4xB6xx.js} +1 -1
  122. package/dist/client/assets/{collection-search-CeA9TK20.js → collection-search-J9Bt25gS.js} +1 -1
  123. package/dist/client/assets/{collection-table-wrapper-SWoJua5h.js → collection-table-wrapper-DBeauaNS.js} +1 -1
  124. package/dist/client/assets/{collection-tabs-3kW0qDG6.js → collection-tabs-CrXIJeNf.js} +1 -1
  125. package/dist/client/assets/{combobox-Px3Uvt7K.js → combobox-BHrqHmge.js} +1 -1
  126. package/dist/client/assets/{command-D2fiEFer.js → command-B-XD29Nx.js} +1 -1
  127. package/dist/client/assets/{command-palette-store-LVCQ6fRv.js → command-palette-store-DK-56E2K.js} +1 -1
  128. package/dist/client/assets/{companion-mcps-section-BcoKVpmX.js → companion-mcps-section-xmRpNJBK.js} +1 -1
  129. package/dist/client/assets/{connect-DlipH902.js → connect-D4qCE3TM.js} +1 -1
  130. package/dist/client/assets/{connect-layout-BQblJmFQ.js → connect-layout-DGO84ImO.js} +1 -1
  131. package/dist/client/assets/{connection-BfiO32wM.js → connection-DD0omVHZ.js} +1 -1
  132. package/dist/client/assets/{connection-card-83VJQMov.js → connection-card-fcMCwbTh.js} +1 -1
  133. package/dist/client/assets/{connection-detail-j_CvFKhd.js → connection-detail-DS015J4e.js} +1 -1
  134. package/dist/client/assets/{connection-form-helpers-Ms_1nBbP.js → connection-form-helpers-CHlcdgAK.js} +1 -1
  135. package/dist/client/assets/{connections-CERSp27f.js → connections-C98FMYyY.js} +1 -1
  136. package/dist/client/assets/{create-organization-dialog-D0myNU26.js → create-organization-dialog-1mI4Ad1B.js} +1 -1
  137. package/dist/client/assets/{decofile-api-BVqR93jw.js → decofile-api-BNWbEMR6.js} +1 -1
  138. package/dist/client/assets/{decopilot-72HlEf1U.js → decopilot-BvepxP_-.js} +1 -1
  139. package/dist/client/assets/{dialog-DbzCN1O8.js → dialog-llvhXw2o.js} +1 -1
  140. package/dist/client/assets/{discover-D5kdY2vL.js → discover-DNPHmIfF.js} +1 -1
  141. package/dist/client/assets/{domain-settings-uVxQd7aQ.js → domain-settings-CXxEmIjB.js} +1 -1
  142. package/dist/client/assets/{download-app-dialog-Bsig7tOs.js → download-app-dialog-D_4eQbbs.js} +1 -1
  143. package/dist/client/assets/{drawer-CBdcJytm.js → drawer-BIjkXMV3.js} +1 -1
  144. package/dist/client/assets/{dropdown-menu-Dd8nakK9.js → dropdown-menu-C5iafa8S.js} +1 -1
  145. package/dist/client/assets/{editor-CpBx0ZCm.js → editor-D4Ls62vg.js} +1 -1
  146. package/dist/client/assets/{empty-state-ClEXvr10.js → empty-state-BdiOfgle.js} +1 -1
  147. package/dist/client/assets/{empty-state-BIcQyeij.js → empty-state-CyICQznD.js} +1 -1
  148. package/dist/client/assets/{extract-connection-data-CM8c_Wvw.js → extract-connection-data-Dbm_cKaX.js} +1 -1
  149. package/dist/client/assets/{feature-gate-BURkiaEd.js → feature-gate-Bp7Cydio.js} +1 -1
  150. package/dist/client/assets/{feature-paywall-BOwjYKin.js → feature-paywall-DEy2mpV2.js} +1 -1
  151. package/dist/client/assets/{file-explorer-BgbzlNyO.js → file-explorer-Bs7B2-rr.js} +1 -1
  152. package/dist/client/assets/{file-preview-BOFvyeTK.js → file-preview-CARebwHJ.js} +1 -1
  153. package/dist/client/assets/{file-share-button-Doj91OJi.js → file-share-button-Dk1ugrdV.js} +1 -1
  154. package/dist/client/assets/{file-type-icon-C37FwvPU.js → file-type-icon-C9Qn36v4.js} +1 -1
  155. package/dist/client/assets/{folder-icon-Dox5xEXV.js → folder-icon-BLBZBD_a.js} +1 -1
  156. package/dist/client/assets/{form-B7dtslOD.js → form-CSXgIHLz.js} +1 -1
  157. package/dist/client/assets/{gateway-client-CFIpVRaR.js → gateway-client-BuiOykcN.js} +1 -1
  158. package/dist/client/assets/{general-BcnikUr3.js → general-BYFfG0fF.js} +1 -1
  159. package/dist/client/assets/{github-icon-BcrkxW36.js → github-icon-huXDOAgf.js} +1 -1
  160. package/dist/client/assets/{home-MrzklFP0.js → home-DTaaCW3K.js} +1 -1
  161. package/dist/client/assets/{hooks-D09Ti1PG.js → hooks-BoX5BC-f.js} +1 -1
  162. package/dist/client/assets/{hooks-CkL4R3Tj.js → hooks-DZOMRp7D.js} +1 -1
  163. package/dist/client/assets/{index-D-XXgZ8p.js → index-2eKztu7k.js} +1 -1
  164. package/dist/client/assets/{index-KOGfrBZR.js → index-2gtoysbs.js} +1 -1
  165. package/dist/client/assets/{index-Cyoz5tz5.js → index-BD213WLU.js} +1 -1
  166. package/dist/client/assets/{index-DZOe0ODJ.js → index-BH7uCYoT.js} +1 -1
  167. package/dist/client/assets/{index-D68Q2TT2.js → index-BWpNlf6e.js} +1 -1
  168. package/dist/client/assets/{index-CULK6hDm.js → index-Bb-Re5q8.js} +1 -1
  169. package/dist/client/assets/{index-G9Ugx8pT.js → index-CSd_k8Np.js} +1 -1
  170. package/dist/client/assets/{index-NrvdR10n.js → index-CiMUXLco.js} +1 -1
  171. package/dist/client/assets/{index-C9w15wdL.js → index-D4RUT3q0.js} +1 -1
  172. package/dist/client/assets/{index-B46P4HkV.js → index-DWw5wi2G.js} +1 -1
  173. package/dist/client/assets/{index-BFjKFLU3.js → index-D_X-LIyA.js} +1 -1
  174. package/dist/client/assets/{index-z4bKt11m.js → index-Dc7hzqoi.js} +2 -2
  175. package/dist/client/assets/{index-CuiP-22D.js → index-DiULBiX9.js} +1 -1
  176. package/dist/client/assets/{index-DLxUQ-f9.js → index-DqT4mG5l.js} +1 -1
  177. package/dist/client/assets/{index-redirect-AuU1lkcv.js → index-redirect-BQTLrDGT.js} +1 -1
  178. package/dist/client/assets/{index-BwuwoN1w.js → index-tj4CWdxr.js} +1 -1
  179. package/dist/client/assets/{infiniteQueryObserver-BjcfJE2O.js → infiniteQueryObserver-CjWlcBHD.js} +1 -1
  180. package/dist/client/assets/{infra-billing-Blv1R6xm.js → infra-billing-D6jrbNxA.js} +1 -1
  181. package/dist/client/assets/{input-C7XH8Uj_.js → input-DXlaTX4w.js} +1 -1
  182. package/dist/client/assets/{input-I71U33T1.js → input-D_FfvHr0.js} +1 -1
  183. package/dist/client/assets/{input-CSQboV8k.js → input-uIV5S_EX.js} +1 -1
  184. package/dist/client/assets/{integration-icon-DOHTaQ6D.js → integration-icon-BeEdjsn9.js} +1 -1
  185. package/dist/client/assets/{label-8juC5J-g.js → label-BMxIRiEr.js} +1 -1
  186. package/dist/client/assets/{last-preview-page-C8M_ayBL.js → last-preview-page-B_H0ubHa.js} +1 -1
  187. package/dist/client/assets/{layout-fdXIUmGR.js → layout-Dli4i2a0.js} +1 -1
  188. package/dist/client/assets/{legacy-agents-deep-CIQ2cOBs.js → legacy-agents-deep-CoiLV3QJ.js} +1 -1
  189. package/dist/client/assets/{legacy-main-redirect-DdrzU7Xj.js → legacy-main-redirect-BZ4nzqkQ.js} +1 -1
  190. package/dist/client/assets/{library-DyrbEVfm.js → library-Dste3SFA.js} +1 -1
  191. package/dist/client/assets/{login-BhC3su0G.js → login-C4Dx9xMO.js} +1 -1
  192. package/dist/client/assets/{markdown-BhLIBmBv.js → markdown-DGWjAeXL.js} +1 -1
  193. package/dist/client/assets/{mcp-app-renderer-DjwQ0S-h.js → mcp-app-renderer-BTjC7Gse.js} +1 -1
  194. package/dist/client/assets/{mcp-oauth-DiqQlKOx.js → mcp-oauth-C4khbNJJ.js} +1 -1
  195. package/dist/client/assets/{members-PF8wxsqA.js → members-CRtKrUle.js} +1 -1
  196. package/dist/client/assets/{message-templates-BvR8vQvs.js → message-templates-B8kOo0Kk.js} +1 -1
  197. package/dist/client/assets/{mini-report-page-D2etEugE.js → mini-report-page-Ci4cxCz8.js} +1 -1
  198. package/dist/client/assets/{mock-board-jCiKK3gA.js → mock-board-DRa60E6i.js} +3 -3
  199. package/dist/client/assets/{monaco-editor-BHu8MLvz.js → monaco-editor-CMRYkmyb.js} +1 -1
  200. package/dist/client/assets/{monitoring-stats-row-2QEp_Jld.js → monitoring-stats-row-PncjnNwy.js} +1 -1
  201. package/dist/client/assets/{multi-select-DcF09HV8.js → multi-select-DzAZ8Rb8.js} +1 -1
  202. package/dist/client/assets/{mustache-DtVu96DY.js → mustache-CPZS2ebG.js} +1 -1
  203. package/dist/client/assets/{oauth-callback-CwSlt3mo.js → oauth-callback-CETK2WZB.js} +1 -1
  204. package/dist/client/assets/{oauth-callback-ai-provider-Co0a0HMU.js → oauth-callback-ai-provider-DqbbngEF.js} +1 -1
  205. package/dist/client/assets/{onboarding-D-ej0NPt.js → onboarding-B5zAGi2B.js} +1 -1
  206. package/dist/client/assets/{optimistic-project-sidebar-views-yjPJnhEG.js → optimistic-project-sidebar-views-CrZ9OeIk.js} +1 -1
  207. package/dist/client/assets/{org-file-open-context-BgiBbqKQ.js → org-file-open-context-BCUpiY_R.js} +1 -1
  208. package/dist/client/assets/{organization-choice-loyQwhEZ.js → organization-choice-BNulT5zU.js} +1 -1
  209. package/dist/client/assets/{orgs-DkENMfud.js → orgs-B1TBklWZ.js} +1 -1
  210. package/dist/client/assets/{page-seo-form-BBCLz5m0.js → page-seo-form-BrHgBXF1.js} +1 -1
  211. package/dist/client/assets/{pair-B2TMNGEX.js → pair-B46EBBjF.js} +1 -1
  212. package/dist/client/assets/{plan-ladder-C80Qcxkm.js → plan-ladder-B2pv9Y73.js} +1 -1
  213. package/dist/client/assets/{popover-CsEsUqbZ.js → popover-yk_ePqAA.js} +1 -1
  214. package/dist/client/assets/{post-calendar-gswoVxcp.js → post-calendar-Bx8YiCbs.js} +1 -1
  215. package/dist/client/assets/{post-editor-5tYPjO0c.js → post-editor-B1fD7o8C.js} +1 -1
  216. package/dist/client/assets/{preview-content-D5E6-qEP.js → preview-content-CfbsbElk.js} +1 -1
  217. package/dist/client/assets/{preview-dialog-D1qWdONG.js → preview-dialog-CA2C3DS4.js} +1 -1
  218. package/dist/client/assets/{primitives-Dy5hA1_y.js → primitives-JiGRyPkw.js} +1 -1
  219. package/dist/client/assets/{profile-9GEyG1R7.js → profile-CDR0JVtv.js} +1 -1
  220. package/dist/client/assets/{project-app-view-CsjjG0iu.js → project-app-view-8VWdrWMf.js} +1 -1
  221. package/dist/client/assets/{project-feed-CEhr0jA4.js → project-feed-ChJRKxhk.js} +1 -1
  222. package/dist/client/assets/{project-icon-Cw3la58q.js → project-icon-MWmzrrm8.js} +1 -1
  223. package/dist/client/assets/project-reports-D31utlHg.js +1 -0
  224. package/dist/client/assets/project-tasks-D2AAgqxo.js +1 -0
  225. package/dist/client/assets/{prompts-DQaXCBzS.js → prompts-4lILOzK9.js} +1 -1
  226. package/dist/client/assets/record-editor-DPAL8Tq5.js +1 -0
  227. package/dist/client/assets/{redirect-editor-B2uGI7FY.js → redirect-editor-EPs_GX-_.js} +1 -1
  228. package/dist/client/assets/registry-Dw8UrRRZ.js +2 -0
  229. package/dist/client/assets/{registry-layout-tJiz4Tt0.js → registry-layout-CC2lewiS.js} +1 -1
  230. package/dist/client/assets/{reports-DvgXBdzM.js → reports-BpxYdv2_.js} +1 -1
  231. package/dist/client/assets/reports-Ch9UvBcS.js +1 -0
  232. package/dist/client/assets/{reports-onboarding-BLUSVbkd.js → reports-onboarding-Dhm8IBuD.js} +1 -1
  233. package/dist/client/assets/{reports-tab-DSknxHUH.js → reports-tab-BJWrZp37.js} +2 -2
  234. package/dist/client/assets/{repositories-cOMgIGPf.js → repositories-CMIGVJwC.js} +1 -1
  235. package/dist/client/assets/{repository-import-picker-C0YugeGx.js → repository-import-picker-DhVniDI2.js} +1 -1
  236. package/dist/client/assets/{repository-picker-BaqWNwxf.js → repository-picker-BkoSI-jm.js} +1 -1
  237. package/dist/client/assets/{require-capability-CjU7EXPP.js → require-capability-CmtOZnXt.js} +1 -1
  238. package/dist/client/assets/{required-auth-layout-WkX8CtfT.js → required-auth-layout-RoMNnMPO.js} +1 -1
  239. package/dist/client/assets/{reset-password-FnA2kczZ.js → reset-password-BeUL8IgX.js} +1 -1
  240. package/dist/client/assets/{resizable-7umHaFcH.js → resizable-Bt7dvMCc.js} +1 -1
  241. package/dist/client/assets/{review-settings-BHAkNdHq.js → review-settings-Cx_Yzx40.js} +1 -1
  242. package/dist/client/assets/{rich-text-link-control-DgGIjR0I.js → rich-text-link-control-CHsxXHIo.js} +1 -1
  243. package/dist/client/assets/{roles-iNTzpIoS.js → roles-BNleKwt9.js} +1 -1
  244. package/dist/client/assets/{route-BdFq2Icl.js → route-CHqG9ihd.js} +1 -1
  245. package/dist/client/assets/{route-DQ3O_pQ7.js → route-DqJoK5dW.js} +1 -1
  246. package/dist/client/assets/{route-D2mgsDfh.js → route-x8jgkj5T.js} +1 -1
  247. package/dist/client/assets/{runnable-block-editor-CCXhy-vO.js → runnable-block-editor-xmOnaiFL.js} +1 -1
  248. package/dist/client/assets/{sandbox-lifecycle-context-DL9kkwoa.js → sandbox-lifecycle-context-C7VKOJoV.js} +1 -1
  249. package/dist/client/assets/{schema-D0xfowSf.js → schema-1zAO-l7e.js} +1 -1
  250. package/dist/client/assets/{scroll-area-BqCCUXvj.js → scroll-area-C-wtbVS1.js} +1 -1
  251. package/dist/client/assets/{search-input-DpLbMQRj.js → search-input-Pobww52G.js} +1 -1
  252. package/dist/client/assets/{secrets-B9E8fieV.js → secrets-BF5nuoR4.js} +1 -1
  253. package/dist/client/assets/{sections-editor-D24EQfD8.js → sections-editor-B1LpXw4X.js} +1 -1
  254. package/dist/client/assets/{select-cIekAVlM.js → select-BkKPcZFe.js} +1 -1
  255. package/dist/client/assets/{select-model-DcwphIdD.js → select-model-DPv-zVVj.js} +1 -1
  256. package/dist/client/assets/{seo-editor-BRYLT6tF.js → seo-editor-9G7mQFJ5.js} +1 -1
  257. package/dist/client/assets/{settings-tab-DKZf7OJg.js → settings-tab-D1V5Uszb.js} +1 -1
  258. package/dist/client/assets/{sheet-DhNzwMUj.js → sheet-i72Qx7sL.js} +1 -1
  259. package/dist/client/assets/{shell-layout-DMJSwXH6.js → shell-layout-Ce0aCJuX.js} +1 -1
  260. package/dist/client/assets/{sidebar-BCim0GYP.js → sidebar-C5KRz1Pj.js} +1 -1
  261. package/dist/client/assets/{skill-preview-eH_MzYft.js → skill-preview-gfYVdSdM.js} +1 -1
  262. package/dist/client/assets/{skills-BtiwGp2Q.js → skills-CgTiBPyO.js} +1 -1
  263. package/dist/client/assets/{sso-BOpSC7cb.js → sso-BK-aRT5P.js} +1 -1
  264. package/dist/client/assets/{store-DmrioYP8.js → store-Nm6KtwbD.js} +1 -1
  265. package/dist/client/assets/store-registry-Cs6bPPkP.js +2 -0
  266. package/dist/client/assets/{switch-9PLadaw_.js → switch-BQFtt3BH.js} +1 -1
  267. package/dist/client/assets/{synced-repos-gfJnKqre.js → synced-repos-B1z4DDCt.js} +1 -1
  268. package/dist/client/assets/{table-B6mPp07a.js → table-6I6YKvFY.js} +1 -1
  269. package/dist/client/assets/{tabs-Co2GUrNY.js → tabs-CLziM0Ww.js} +1 -1
  270. package/dist/client/assets/{task-board-lQZGfEfb.js → task-board-DrUf5p-Z.js} +1 -1
  271. package/dist/client/assets/{task-route-Btltx00G.js → task-route-BCTCy27Q.js} +1 -1
  272. package/dist/client/assets/{task-status-CLlOhQGx.js → task-status-DhCT2ly_.js} +1 -1
  273. package/dist/client/assets/{taskboard-analytics-CCRKXVH2.js → taskboard-analytics-Cf1r1f7I.js} +1 -1
  274. package/dist/client/assets/tasks-BNvHI7hJ.js +1 -0
  275. package/dist/client/assets/{tasks-D_kcQmbi.js → tasks-Drgd6az8.js} +1 -1
  276. package/dist/client/assets/{textarea-BEOceSll.js → textarea-BU6xemAP.js} +1 -1
  277. package/dist/client/assets/{thread-intent-9fI0jPLV.js → thread-intent-F-sZEflj.js} +1 -1
  278. package/dist/client/assets/{thread-route-B1EuqJlg.js → thread-route-BBf64Mwk.js} +1 -1
  279. package/dist/client/assets/{thread-route-DG6kj-ho.js → thread-route-BSYRqZDg.js} +1 -1
  280. package/dist/client/assets/{thread-sheet-body-CbIiPC8V.js → thread-sheet-body-B4OUWlMn.js} +1 -1
  281. package/dist/client/assets/{toggle-group-Ck5f9XVv.js → toggle-group-BiU_UDOq.js} +1 -1
  282. package/dist/client/assets/{toolbar-icon-button-8ctMGgIP.js → toolbar-icon-button-PuQFE8Y9.js} +1 -1
  283. package/dist/client/assets/{tooltip-BuKeolDX.js → tooltip-DV2xHesQ.js} +1 -1
  284. package/dist/client/assets/{track-B7aLvyYR.js → track-ZuOMvhd2.js} +1 -1
  285. package/dist/client/assets/{types-Bh4jNqv3.js → types-27TVsPN_.js} +1 -1
  286. package/dist/client/assets/{usage-stats-waRf4dtg.js → usage-stats-vMRDbAUM.js} +1 -1
  287. package/dist/client/assets/{use-ai-providers-B0bxSHYG.js → use-ai-providers-BnF5Rw_n.js} +1 -1
  288. package/dist/client/assets/{use-automations-BdS9yl-d.js → use-automations-Bo0S3g8m.js} +1 -1
  289. package/dist/client/assets/{use-autosave-CfERN5UF.js → use-autosave-DOzyZumC.js} +1 -1
  290. package/dist/client/assets/{use-connect-companion-_GDNSGRN.js → use-connect-companion-CClQCUMS.js} +1 -1
  291. package/dist/client/assets/{use-connection-CPQUKm0a.js → use-connection-Ba04fHwa.js} +1 -1
  292. package/dist/client/assets/{use-copy-DUiBegp6.js → use-copy-C_ctOeuP.js} +1 -1
  293. package/dist/client/assets/{use-create-virtual-mcp-BRT9hKZ3.js → use-create-virtual-mcp-D1w9d4ex.js} +1 -1
  294. package/dist/client/assets/{use-date-fns-locale-PFUAQIxr.js → use-date-fns-locale-onM9TTf8.js} +1 -1
  295. package/dist/client/assets/{use-debounced-autosave-CyDohN_c.js → use-debounced-autosave-DqyNKPJM.js} +1 -1
  296. package/dist/client/assets/{use-debounced-value-DeY1TNRX.js → use-debounced-value-B9nG3bW5.js} +1 -1
  297. package/dist/client/assets/{use-deco-credits-Du6WCMYS.js → use-deco-credits-BGBshlLi.js} +1 -1
  298. package/dist/client/assets/{use-decopilot-events-_O_0AHeH.js → use-decopilot-events-BpuQrfKN.js} +1 -1
  299. package/dist/client/assets/{use-delete-connection-kqt66yqS.js → use-delete-connection-Cns6x8UC.js} +1 -1
  300. package/dist/client/assets/{use-deployment-admin-MznxNIiy.js → use-deployment-admin-BVfgEagI.js} +1 -1
  301. package/dist/client/assets/{use-entitlements-BWaaNeuI.js → use-entitlements-Dl7pAsQ5.js} +1 -1
  302. package/dist/client/assets/{use-fast-preview-draft-url-BrZtKg6o.js → use-fast-preview-draft-url-mcfOeAAq.js} +1 -1
  303. package/dist/client/assets/{use-file-configs-sqbLS09v.js → use-file-configs-DYGSdjth.js} +1 -1
  304. package/dist/client/assets/{use-infinite-scroll-RrOnf-fI.js → use-infinite-scroll-PhBGPm8H.js} +1 -1
  305. package/dist/client/assets/{use-join-requests-BZzsbvb0.js → use-join-requests-DjeVFQr9.js} +1 -1
  306. package/dist/client/assets/{use-main-panel-tabs-CyT7yQAB.js → use-main-panel-tabs-sSRGo66A.js} +1 -1
  307. package/dist/client/assets/{use-mcp-auth-status-DvQCYJw0.js → use-mcp-auth-status-I377R0Kg.js} +1 -1
  308. package/dist/client/assets/{use-mcp-client-B1u2B39v.js → use-mcp-client-e_hCatGm.js} +1 -1
  309. package/dist/client/assets/{use-mcp-prompts-DxT8Kz-M.js → use-mcp-prompts-DJRXjL4_.js} +1 -1
  310. package/dist/client/assets/{use-mcp-tools-Ch_j97A3.js → use-mcp-tools-g86k4oib.js} +1 -1
  311. package/dist/client/assets/{use-members-H3oi0qPu.js → use-members-DPYHJDe2.js} +1 -1
  312. package/dist/client/assets/{use-mobile-CV7f0Wqe.js → use-mobile-hIijCK0k.js} +1 -1
  313. package/dist/client/assets/{use-navigate-to-agent-BMSyO1iB.js → use-navigate-to-agent-C8pu0B4z.js} +1 -1
  314. package/dist/client/assets/{use-open-billing-url-BGn9Wkis.js → use-open-billing-url-Df7K1DCF.js} +1 -1
  315. package/dist/client/assets/{use-org-auth-client-ZxEGrzhh.js → use-org-auth-client-DbPU3bA-.js} +1 -1
  316. package/dist/client/assets/{use-org-fs-D6lKuMAi.js → use-org-fs-Du-ErRPs.js} +1 -1
  317. package/dist/client/assets/{use-org-notice-C5thI8aD.js → use-org-notice-CyiiFkRG.js} +1 -1
  318. package/dist/client/assets/{use-org-sso-vHIufIoJ.js → use-org-sso-BvfIL0yq.js} +1 -1
  319. package/dist/client/assets/{use-organization-roles-DmWmnvDm.js → use-organization-roles-FAEtbpE5.js} +1 -1
  320. package/dist/client/assets/{use-organization-settings-C-XY0Wze.js → use-organization-settings-CKbX2SdA.js} +1 -1
  321. package/dist/client/assets/{use-panel-navigate-BG4d0Vrr.js → use-panel-navigate-WrD0KEYx.js} +1 -1
  322. package/dist/client/assets/{use-project-native-view-presence-0NQTfFQT.js → use-project-native-view-presence-DWzPH-Sc.js} +1 -1
  323. package/dist/client/assets/{use-project-scope-DRope0ob.js → use-project-scope-DU0-JxYr.js} +1 -1
  324. package/dist/client/assets/{use-registry-connections-D_a0MIjQ.js → use-registry-connections-SLFMHpqj.js} +1 -1
  325. package/dist/client/assets/{use-releases-BPrtCiPS.js → use-releases-CFNTwgY3.js} +1 -1
  326. package/dist/client/assets/{use-reports-diagnostic-BtS3SpeX.js → use-reports-diagnostic-8BvW2in8.js} +1 -1
  327. package/dist/client/assets/{use-route-default-main-DBXt2fvS.js → use-route-default-main-Djaj_cL9.js} +1 -1
  328. package/dist/client/assets/{use-secrets-C5iKdreo.js → use-secrets-DVry--sz.js} +1 -1
  329. package/dist/client/assets/{use-section-preview-base-Dwn5dF7B.js → use-section-preview-base-BOFovHh4.js} +1 -1
  330. package/dist/client/assets/{use-session-runtime-DU2zS-3V.js → use-session-runtime-BR1aW1y5.js} +1 -1
  331. package/dist/client/assets/{use-tags-BvskEBAC.js → use-tags-CZXCbbwL.js} +1 -1
  332. package/dist/client/assets/{use-task-board-analytics-DjIJHPkR.js → use-task-board-analytics-Ci1AhxvH.js} +1 -1
  333. package/dist/client/assets/{use-task-metadata-9gheSHac.js → use-task-metadata-Dt9l5S_a.js} +1 -1
  334. package/dist/client/assets/{use-thread-outputs-DAcljy5D.js → use-thread-outputs-Dq-RN0P_.js} +1 -1
  335. package/dist/client/assets/{use-view-mode-CTt0Tykp.js → use-view-mode-B0LeaJg7.js} +1 -1
  336. package/dist/client/assets/{use-virtual-mcp-Bq1RMGPF.js → use-virtual-mcp-DkK7ErtB.js} +1 -1
  337. package/dist/client/assets/useInfiniteQuery-CspLjV7h.js +1 -0
  338. package/dist/client/assets/{useQueries-DMqJmHGu.js → useQueries-C-SV8tD7.js} +1 -1
  339. package/dist/client/assets/useSuspenseInfiniteQuery-BiQYAhJn.js +1 -0
  340. package/dist/client/assets/{users-B0Y-7Aab.js → users-BiOPZ43X.js} +1 -1
  341. package/dist/client/assets/{utils-CU3t1jst.js → utils-DsvmRe8M.js} +1 -1
  342. package/dist/client/assets/{variant-calendar-Bp201sXA.js → variant-calendar-DImnsJnP.js} +1 -1
  343. package/dist/client/assets/{variant-matcher-override-DUPu0vkW.js → variant-matcher-override-BFQoXu82.js} +1 -1
  344. package/dist/client/assets/{view-mode-toggle-DaZN0qXY.js → view-mode-toggle-DvGhnpsV.js} +1 -1
  345. package/dist/client/assets/{virtual-mcp-BYPZngzy.js → virtual-mcp-ldxphi5G.js} +1 -1
  346. package/dist/client/index.html +1 -1
  347. package/dist/server/cli.js +651 -651
  348. package/dist/server/server.js +434 -434
  349. package/package.json +1 -1
  350. package/dist/client/assets/agent-app-CQgi_fkJ.js +0 -1
  351. package/dist/client/assets/agent-deck-Dx12NQ18.js +0 -1
  352. package/dist/client/assets/agent-file-B5qivcOi.js +0 -1
  353. package/dist/client/assets/agent-library-file-OKK2mnnF.js +0 -1
  354. package/dist/client/assets/agent-settings-BraxsXkL.js +0 -1
  355. package/dist/client/assets/agent-site-editor-code-03I9o24S.js +0 -2
  356. package/dist/client/assets/agent-view-74_Cuyp8.js +0 -1
  357. package/dist/client/assets/api-keys-ClN6LoeU.js +0 -1
  358. package/dist/client/assets/app-editor-CaCDGdiz.js +0 -1
  359. package/dist/client/assets/automations-XsBsFuGM.js +0 -1
  360. package/dist/client/assets/category-editor-CFCxetoB.js +0 -1
  361. package/dist/client/assets/project-reports-D83XbTn5.js +0 -1
  362. package/dist/client/assets/project-tasks-IrwgrDaD.js +0 -1
  363. package/dist/client/assets/record-editor-C02fIlfV.js +0 -1
  364. package/dist/client/assets/registry-CORfkc_Z.js +0 -2
  365. package/dist/client/assets/reports-X2I2m9Nu.js +0 -1
  366. package/dist/client/assets/store-registry-B398fyC0.js +0 -2
  367. package/dist/client/assets/tasks-BqLnbtfB.js +0 -1
  368. package/dist/client/assets/useInfiniteQuery-C6OBOha-.js +0 -1
  369. package/dist/client/assets/useSuspenseInfiniteQuery-XFcbI_PD.js +0 -1
@@ -1 +1 @@
1
- import{c as k,j as r,l as C,b as S}from"./index-z4bKt11m.js";import{T as R,a as H,b as T,c as I,d as W,e as z}from"./table-B6mPp07a.js";import{i as D,n as E}from"./ArrowUp-Scf6R8DX.js";function K(y){const e=k.c(29),{columns:n,data:f,sortKey:u,sortDirection:x,onSort:c,onRowClick:a,rowClassName:d}=y;let p;e[0]!==x?(p=function(s,h){return r.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&x&&(x==="asc"?r.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):r.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=x,e[1]=p):p=e[1];const b=p;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=function(s,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return s===h-1&&(N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),N},e[2]=o):o=e[2];const g=o;let t;if(e[3]!==n||e[4]!==c||e[5]!==b||e[6]!==u){let i;e[8]!==n.length||e[9]!==c||e[10]!==b||e[11]!==u?(i=(s,h)=>{const N=u===s.id;return r.jsx(R,{className:C(g(h,n.length),"group transition-colors select-none",s.sortable&&"hover:bg-accent cursor-pointer",s.rowClassName,s.cellClassName),onClick:s.sortable&&c?()=>c(s.id):void 0,children:r.jsxs("span",{className:"flex items-center gap-1",children:[s.header,s.sortable&&b(s.id,N)]})},s.id)},e[8]=n.length,e[9]=c,e[10]=b,e[11]=u,e[12]=i):i=e[12],t=n.map(i),e[3]=n,e[4]=c,e[5]=b,e[6]=u,e[7]=t}else t=e[7];let l;e[13]!==t?(l=r.jsx(H,{className:"border-b-0",children:r.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:t})}),e[13]=t,e[14]=l):l=e[14];let j;if(e[15]!==n||e[16]!==f||e[17]!==a||e[18]!==d){let i;e[20]!==n||e[21]!==a||e[22]!==d?(i=(s,h)=>{const N=d?.(s);return r.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",a?"cursor-pointer":"",N),onClick:a?()=>a(s):void 0,children:n.map(m=>r.jsx(I,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:r.jsx("div",{className:C(m.wrap?"w-full":"min-w-0 w-full",!m.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:m.render?m.render(s):m.accessor?m.accessor(s):null})},m.id))},h)},e[20]=n,e[21]=a,e[22]=d,e[23]=i):i=e[23],j=f.map(i),e[15]=n,e[16]=f,e[17]=a,e[18]=d,e[19]=j}else j=e[19];let w;e[24]!==j?(w=r.jsx(W,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==l||e[27]!==w?(v=r.jsxs(z,{className:"w-full border-collapse",children:[l,w]}),e[26]=l,e[27]=w,e[28]=v):v=e[28],v}function B(y){const e=k.c(16),{columns:n,data:f,isLoading:u,sortKey:x,sortDirection:c,onSort:a,onRowClick:d,emptyState:p}=y,b=u===void 0?!1:u,o=S();if(b){let t;e[0]!==o?(t=o("collections.collectionTableWrapper.loading"),e[0]=o,e[1]=t):t=e[1];let l;return e[2]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsx("div",{className:"text-muted-foreground",children:t})}),e[2]=t,e[3]=l):l=e[3],l}if(f.length===0){let t;e[4]!==p||e[5]!==o?(t=p||r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:o("collections.collectionTableWrapper.noItemsFound")}),e[4]=p,e[5]=o,e[6]=t):t=e[6];let l;return e[7]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:t}),e[7]=t,e[8]=l):l=e[8],l}let g;return e[9]!==n||e[10]!==f||e[11]!==d||e[12]!==a||e[13]!==c||e[14]!==x?(g=r.jsx("div",{className:"flex-1",children:r.jsx(K,{columns:n,data:f,sortKey:x,sortDirection:c,onSort:a,onRowClick:d})}),e[9]=n,e[10]=f,e[11]=d,e[12]=a,e[13]=c,e[14]=x,e[15]=g):g=e[15],g}export{B as C};
1
+ import{c as k,j as r,l as C,b as S}from"./index-Dc7hzqoi.js";import{T as R,a as H,b as T,c as I,d as W,e as z}from"./table-6I6YKvFY.js";import{i as D,n as E}from"./ArrowUp-Cii1LHW7.js";function K(y){const e=k.c(29),{columns:n,data:f,sortKey:u,sortDirection:x,onSort:c,onRowClick:a,rowClassName:d}=y;let p;e[0]!==x?(p=function(s,h){return r.jsx("div",{className:"w-4 flex items-center justify-center",children:h&&x&&(x==="asc"?r.jsx(D,{size:16,className:"text-muted-foreground transition-colors"}):r.jsx(E,{size:16,className:"text-muted-foreground transition-colors"}))})},e[0]=x,e[1]=p):p=e[1];const b=p;let o;e[2]===Symbol.for("react.memo_cache_sentinel")?(o=function(s,h){let N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider";return s===h-1&&(N="px-4 py-2 text-left font-mono font-normal text-muted-foreground text-[11px] h-9 uppercase tracking-wider w-8"),N},e[2]=o):o=e[2];const g=o;let t;if(e[3]!==n||e[4]!==c||e[5]!==b||e[6]!==u){let i;e[8]!==n.length||e[9]!==c||e[10]!==b||e[11]!==u?(i=(s,h)=>{const N=u===s.id;return r.jsx(R,{className:C(g(h,n.length),"group transition-colors select-none",s.sortable&&"hover:bg-accent cursor-pointer",s.rowClassName,s.cellClassName),onClick:s.sortable&&c?()=>c(s.id):void 0,children:r.jsxs("span",{className:"flex items-center gap-1",children:[s.header,s.sortable&&b(s.id,N)]})},s.id)},e[8]=n.length,e[9]=c,e[10]=b,e[11]=u,e[12]=i):i=e[12],t=n.map(i),e[3]=n,e[4]=c,e[5]=b,e[6]=u,e[7]=t}else t=e[7];let l;e[13]!==t?(l=r.jsx(H,{className:"border-b-0",children:r.jsx(T,{className:"h-9 hover:bg-transparent border-b border-border",children:t})}),e[13]=t,e[14]=l):l=e[14];let j;if(e[15]!==n||e[16]!==f||e[17]!==a||e[18]!==d){let i;e[20]!==n||e[21]!==a||e[22]!==d?(i=(s,h)=>{const N=d?.(s);return r.jsx(T,{"data-row-index":h,className:C("group/data-row transition-colors border-b-0 hover:bg-accent/50",a?"cursor-pointer":"",N),onClick:a?()=>a(s):void 0,children:n.map(m=>r.jsx(I,{className:C("px-5 py-4 h-16 align-middle text-sm text-foreground",m.cellClassName,m.wrap?"whitespace-normal wrap-break-word":""),children:r.jsx("div",{className:C(m.wrap?"w-full":"min-w-0 w-full",!m.wrap&&"truncate overflow-hidden whitespace-nowrap"),children:m.render?m.render(s):m.accessor?m.accessor(s):null})},m.id))},h)},e[20]=n,e[21]=a,e[22]=d,e[23]=i):i=e[23],j=f.map(i),e[15]=n,e[16]=f,e[17]=a,e[18]=d,e[19]=j}else j=e[19];let w;e[24]!==j?(w=r.jsx(W,{children:j}),e[24]=j,e[25]=w):w=e[25];let v;return e[26]!==l||e[27]!==w?(v=r.jsxs(z,{className:"w-full border-collapse",children:[l,w]}),e[26]=l,e[27]=w,e[28]=v):v=e[28],v}function B(y){const e=k.c(16),{columns:n,data:f,isLoading:u,sortKey:x,sortDirection:c,onSort:a,onRowClick:d,emptyState:p}=y,b=u===void 0?!1:u,o=S();if(b){let t;e[0]!==o?(t=o("collections.collectionTableWrapper.loading"),e[0]=o,e[1]=t):t=e[1];let l;return e[2]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:r.jsx("div",{className:"text-muted-foreground",children:t})}),e[2]=t,e[3]=l):l=e[3],l}if(f.length===0){let t;e[4]!==p||e[5]!==o?(t=p||r.jsx("div",{className:"text-center py-12 text-muted-foreground",children:o("collections.collectionTableWrapper.noItemsFound")}),e[4]=p,e[5]=o,e[6]=t):t=e[6];let l;return e[7]!==t?(l=r.jsx("div",{className:"flex items-center justify-center h-full",children:t}),e[7]=t,e[8]=l):l=e[8],l}let g;return e[9]!==n||e[10]!==f||e[11]!==d||e[12]!==a||e[13]!==c||e[14]!==x?(g=r.jsx("div",{className:"flex-1",children:r.jsx(K,{columns:n,data:f,sortKey:x,sortDirection:c,onSort:a,onRowClick:d})}),e[9]=n,e[10]=f,e[11]=d,e[12]=a,e[13]=c,e[14]=x,e[15]=g):g=e[15],g}export{B as C};
@@ -1 +1 @@
1
- import{c as f,l as u,j as m}from"./index-z4bKt11m.js";import{B as g}from"./badge-BNBGXxmC.js";function h(x){const e=f.c(12),{tabs:c,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==c){let l;e[6]!==n||e[7]!==s?(l=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=l):l=e[8],r=c.map(l),e[2]=n,e[3]=s,e[4]=c,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{h as C};
1
+ import{c as f,l as u,j as m}from"./index-Dc7hzqoi.js";import{B as g}from"./badge-Bu51Hlti.js";function h(x){const e=f.c(12),{tabs:c,activeTab:n,onTabChange:s,className:a}=x;let t;e[0]!==a?(t=u("flex items-center gap-2 overflow-x-auto no-scrollbar",a),e[0]=a,e[1]=t):t=e[1];let r;if(e[2]!==n||e[3]!==s||e[4]!==c){let l;e[6]!==n||e[7]!==s?(l=o=>{const d=n===o.id;return m.jsxs("button",{type:"button",onClick:()=>s(o.id),className:u("h-7 px-2 text-sm rounded-lg border border-input transition-colors inline-flex gap-1.5 items-center",d&&"bg-accent border-border text-foreground",!d&&"bg-transparent text-muted-foreground hover:border-border hover:bg-accent/50 hover:text-foreground"),children:[o.label,o.count!==void 0&&m.jsx(g,{variant:"secondary",className:u("h-5 min-w-5 px-1 rounded-full text-[10px] font-mono inline-flex items-center justify-center",d?"bg-background text-foreground":"bg-muted-foreground/10 text-muted-foreground"),children:o.count})]},o.id)},e[6]=n,e[7]=s,e[8]=l):l=e[8],r=c.map(l),e[2]=n,e[3]=s,e[4]=c,e[5]=r}else r=e[5];let i;return e[9]!==t||e[10]!==r?(i=m.jsx("div",{className:t,children:r}),e[9]=t,e[10]=r,e[11]=i):i=e[11],i}export{h as C};
@@ -1 +1 @@
1
- import{c as D,r as H,j as s,l as b,B as J}from"./index-z4bKt11m.js";import{i as K}from"./Check-BZE0WrNL.js";import{i as Q}from"./ChevronSelectorVertical-oXn0cTzk.js";import{e as U,C as V,b as W,a as X,c as Y,d as Z}from"./command-D2fiEFer.js";import{a as _,P as ee,b as se}from"./popover-CsEsUqbZ.js";function ie(k){const e=D.c(41),{options:v,value:t,onChange:x,placeholder:B,triggerClassName:M,contentClassName:y,width:R,renderTrigger:$,renderItem:o,emptyMessage:F,searchPlaceholder:G,filter:N}=k,q=B===void 0?"Select...":B,z=R===void 0?"w-[200px]":R,w=F===void 0?"No results found.":F,P=G===void 0?"Search...":G;let j;e[0]!==t?(j=u=>u.value===t,e[0]=t,e[1]=j):j=e[1];const S=v.find(j),[E,l]=H.useState(!1),T=ee,I=_,A=!0,O=$?s.jsx("div",{className:b("cursor-pointer",M),children:$(S)}):s.jsxs(J,{variant:"outline",role:"combobox",className:b("justify-between",z,M),children:[S?S.label:q,s.jsx(Q,{className:"opacity-50"})]});let r;e[2]!==I||e[3]!==O?(r=s.jsx(I,{asChild:A,children:O}),e[2]=I,e[3]=O,e[4]=r):r=e[4];let i;e[5]!==y?(i=b("p-0",y),e[5]=y,e[6]=i):i=e[6];let C;e[7]===Symbol.for("react.memo_cache_sentinel")?(C={width:"var(--radix-popover-trigger-width)"},e[7]=C):C=e[7];let c;e[8]!==P?(c=s.jsx(U,{placeholder:P,className:"h-9"}),e[8]=P,e[9]=c):c=e[9];let n;e[10]!==w?(n=s.jsx(V,{children:w}),e[10]=w,e[11]=n):n=e[11];let m;if(e[12]!==x||e[13]!==v||e[14]!==o||e[15]!==l||e[16]!==t){let u;e[18]!==x||e[19]!==o||e[20]!==l||e[21]!==t?(u=a=>{const L=t===a.value;return s.jsx(W,{value:a.label,onSelect:()=>{x(a.value===t?"":a.value),l(!1)},children:o?o(a,L):s.jsxs(s.Fragment,{children:[a.label,s.jsx(K,{className:b("ml-auto",L?"opacity-100":"opacity-0")})]})},a.value)},e[18]=x,e[19]=o,e[20]=l,e[21]=t,e[22]=u):u=e[22],m=v.map(u),e[12]=x,e[13]=v,e[14]=o,e[15]=l,e[16]=t,e[17]=m}else m=e[17];let d;e[23]!==m?(d=s.jsx(X,{children:m}),e[23]=m,e[24]=d):d=e[24];let p;e[25]!==n||e[26]!==d?(p=s.jsxs(Y,{children:[n,d]}),e[25]=n,e[26]=d,e[27]=p):p=e[27];let h;e[28]!==N||e[29]!==c||e[30]!==p?(h=s.jsxs(Z,{filter:N,children:[c,p]}),e[28]=N,e[29]=c,e[30]=p,e[31]=h):h=e[31];let f;e[32]!==h||e[33]!==i?(f=s.jsx(se,{className:i,style:C,children:h}),e[32]=h,e[33]=i,e[34]=f):f=e[34];let g;return e[35]!==T||e[36]!==E||e[37]!==l||e[38]!==f||e[39]!==r?(g=s.jsxs(T,{open:E,onOpenChange:l,children:[r,f]}),e[35]=T,e[36]=E,e[37]=l,e[38]=f,e[39]=r,e[40]=g):g=e[40],g}export{ie as C};
1
+ import{c as D,r as H,j as s,l as b,B as J}from"./index-Dc7hzqoi.js";import{i as K}from"./Check-B3RSsr_D.js";import{i as Q}from"./ChevronSelectorVertical-DpRb2z1l.js";import{e as U,C as V,b as W,a as X,c as Y,d as Z}from"./command-B-XD29Nx.js";import{a as _,P as ee,b as se}from"./popover-yk_ePqAA.js";function ie(k){const e=D.c(41),{options:v,value:t,onChange:x,placeholder:B,triggerClassName:M,contentClassName:y,width:R,renderTrigger:$,renderItem:o,emptyMessage:F,searchPlaceholder:G,filter:N}=k,q=B===void 0?"Select...":B,z=R===void 0?"w-[200px]":R,w=F===void 0?"No results found.":F,P=G===void 0?"Search...":G;let j;e[0]!==t?(j=u=>u.value===t,e[0]=t,e[1]=j):j=e[1];const S=v.find(j),[E,l]=H.useState(!1),T=ee,I=_,A=!0,O=$?s.jsx("div",{className:b("cursor-pointer",M),children:$(S)}):s.jsxs(J,{variant:"outline",role:"combobox",className:b("justify-between",z,M),children:[S?S.label:q,s.jsx(Q,{className:"opacity-50"})]});let r;e[2]!==I||e[3]!==O?(r=s.jsx(I,{asChild:A,children:O}),e[2]=I,e[3]=O,e[4]=r):r=e[4];let i;e[5]!==y?(i=b("p-0",y),e[5]=y,e[6]=i):i=e[6];let C;e[7]===Symbol.for("react.memo_cache_sentinel")?(C={width:"var(--radix-popover-trigger-width)"},e[7]=C):C=e[7];let c;e[8]!==P?(c=s.jsx(U,{placeholder:P,className:"h-9"}),e[8]=P,e[9]=c):c=e[9];let n;e[10]!==w?(n=s.jsx(V,{children:w}),e[10]=w,e[11]=n):n=e[11];let m;if(e[12]!==x||e[13]!==v||e[14]!==o||e[15]!==l||e[16]!==t){let u;e[18]!==x||e[19]!==o||e[20]!==l||e[21]!==t?(u=a=>{const L=t===a.value;return s.jsx(W,{value:a.label,onSelect:()=>{x(a.value===t?"":a.value),l(!1)},children:o?o(a,L):s.jsxs(s.Fragment,{children:[a.label,s.jsx(K,{className:b("ml-auto",L?"opacity-100":"opacity-0")})]})},a.value)},e[18]=x,e[19]=o,e[20]=l,e[21]=t,e[22]=u):u=e[22],m=v.map(u),e[12]=x,e[13]=v,e[14]=o,e[15]=l,e[16]=t,e[17]=m}else m=e[17];let d;e[23]!==m?(d=s.jsx(X,{children:m}),e[23]=m,e[24]=d):d=e[24];let p;e[25]!==n||e[26]!==d?(p=s.jsxs(Y,{children:[n,d]}),e[25]=n,e[26]=d,e[27]=p):p=e[27];let h;e[28]!==N||e[29]!==c||e[30]!==p?(h=s.jsxs(Z,{filter:N,children:[c,p]}),e[28]=N,e[29]=c,e[30]=p,e[31]=h):h=e[31];let f;e[32]!==h||e[33]!==i?(f=s.jsx(se,{className:i,style:C,children:h}),e[32]=h,e[33]=i,e[34]=f):f=e[34];let g;return e[35]!==T||e[36]!==E||e[37]!==l||e[38]!==f||e[39]!==r?(g=s.jsxs(T,{open:E,onOpenChange:l,children:[r,f]}),e[35]=T,e[36]=E,e[37]=l,e[38]=f,e[39]=r,e[40]=g):g=e[40],g}export{ie as C};
@@ -1 +1 @@
1
- import{c as d,l as i,j as n}from"./index-z4bKt11m.js";import{_ as m}from"./index-Cyoz5tz5.js";import{D as j,d as b,h as w,c as y,b as C}from"./dialog-DbzCN1O8.js";import{i as D}from"./SearchMd-FDCJM3CR.js";function $(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function G(a){const e=d.c(28);let t,s,o,l,r,h,_;e[0]!==a?({title:h,description:_,children:t,className:s,filter:o,shouldFilter:r,...l}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r,e[6]=h,e[7]=_):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5],h=e[6],_=e[7]);const k=h===void 0?"Command Palette":h,N=_===void 0?"Search for a command to run...":_;let c;e[8]!==k?(c=n.jsx(b,{children:k}),e[8]=k,e[9]=c):c=e[9];let p;e[10]!==N?(p=n.jsx(w,{children:N}),e[10]=N,e[11]=p):p=e[11];let u;e[12]!==c||e[13]!==p?(u=n.jsxs(y,{className:"sr-only",children:[c,p]}),e[12]=c,e[13]=p,e[14]=u):u=e[14];let f;e[15]!==s?(f=i("overflow-hidden p-0",s),e[15]=s,e[16]=f):f=e[16];let x;e[17]!==t||e[18]!==o||e[19]!==r?(x=n.jsx($,{filter:o,shouldFilter:r,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg:not([class*='size-'])]:h-5 [&_[cmdk-item]_svg:not([class*='size-'])]:w-5",children:t}),e[17]=t,e[18]=o,e[19]=r,e[20]=x):x=e[20];let g;e[21]!==f||e[22]!==x?(g=n.jsx(C,{className:f,closeButtonClassName:"hidden",children:x}),e[21]=f,e[22]=x,e[23]=g):g=e[23];let v;return e[24]!==l||e[25]!==u||e[26]!==g?(v=n.jsxs(j,{...l,children:[u,g]}),e[24]=l,e[25]=u,e[26]=g,e[27]=v):v=e[27],v}function L(a){const e=d.c(9);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(D,{className:"size-4 shrink-0 text-muted-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let r;return e[6]!==s||e[7]!==l?(r=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=r):r=e[8],r}function R(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("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 B(a){const e=d.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(m.Empty,{"data-slot":"command-empty",className:"text-muted-foreground px-4 py-4 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function F(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function H(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("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 P(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer 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{B as C,F as a,P as b,R as c,$ as d,L as e,G as f,H as g};
1
+ import{c as d,l as i,j as n}from"./index-Dc7hzqoi.js";import{_ as m}from"./index-BD213WLU.js";import{D as j,d as b,h as w,c as y,b as C}from"./dialog-llvhXw2o.js";import{i as D}from"./SearchMd-C45D2PMI.js";function $(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m,{"data-slot":"command",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function G(a){const e=d.c(28);let t,s,o,l,r,h,_;e[0]!==a?({title:h,description:_,children:t,className:s,filter:o,shouldFilter:r,...l}=a,e[0]=a,e[1]=t,e[2]=s,e[3]=o,e[4]=l,e[5]=r,e[6]=h,e[7]=_):(t=e[1],s=e[2],o=e[3],l=e[4],r=e[5],h=e[6],_=e[7]);const k=h===void 0?"Command Palette":h,N=_===void 0?"Search for a command to run...":_;let c;e[8]!==k?(c=n.jsx(b,{children:k}),e[8]=k,e[9]=c):c=e[9];let p;e[10]!==N?(p=n.jsx(w,{children:N}),e[10]=N,e[11]=p):p=e[11];let u;e[12]!==c||e[13]!==p?(u=n.jsxs(y,{className:"sr-only",children:[c,p]}),e[12]=c,e[13]=p,e[14]=u):u=e[14];let f;e[15]!==s?(f=i("overflow-hidden p-0",s),e[15]=s,e[16]=f):f=e[16];let x;e[17]!==t||e[18]!==o||e[19]!==r?(x=n.jsx($,{filter:o,shouldFilter:r,className:"[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg:not([class*='size-'])]:h-5 [&_[cmdk-item]_svg:not([class*='size-'])]:w-5",children:t}),e[17]=t,e[18]=o,e[19]=r,e[20]=x):x=e[20];let g;e[21]!==f||e[22]!==x?(g=n.jsx(C,{className:f,closeButtonClassName:"hidden",children:x}),e[21]=f,e[22]=x,e[23]=g):g=e[23];let v;return e[24]!==l||e[25]!==u||e[26]!==g?(v=n.jsxs(j,{...l,children:[u,g]}),e[24]=l,e[25]=u,e[26]=g,e[27]=v):v=e[27],v}function L(a){const e=d.c(9);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=n.jsx(D,{className:"size-4 shrink-0 text-muted-foreground"}),e[3]=o):o=e[3];let l;e[4]!==t?(l=i("placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-sm outline-hidden disabled:cursor-not-allowed disabled:opacity-50",t),e[4]=t,e[5]=l):l=e[5];let r;return e[6]!==s||e[7]!==l?(r=n.jsxs("div",{"data-slot":"command-input-wrapper",className:"flex h-10 items-center gap-2 border-b px-3",children:[o,n.jsx(m.Input,{"data-slot":"command-input",className:l,...s})]}),e[6]=s,e[7]=l,e[8]=r):r=e[8],r}function R(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("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 B(a){const e=d.c(4);let t;e[0]!==a?({...t}=a,e[0]=a,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(m.Empty,{"data-slot":"command-empty",className:"text-muted-foreground px-4 py-4 text-center text-sm",...t}),e[2]=t,e[3]=s):s=e[3],s}function F(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("text-foreground [&_[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium",t),e[3]=t,e[4]=o):o=e[4];let l;return e[5]!==s||e[6]!==o?(l=n.jsx(m.Group,{"data-slot":"command-group",className:o,...s}),e[5]=s,e[6]=o,e[7]=l):l=e[7],l}function H(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("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 P(a){const e=d.c(8);let t,s;e[0]!==a?({className:t,...s}=a,e[0]=a,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let o;e[3]!==t?(o=i("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-pointer 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{B as C,F as a,P as b,R as c,$ as d,L as e,G as f,H as g};
@@ -1 +1 @@
1
- import{c as r,r as c}from"./index-z4bKt11m.js";import{S as l}from"./hooks-CkL4R3Tj.js";const i=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),s=i?"⌘":"Ctrl",e={commandPalette:{keys:[s,"K"],description:"Command palette"},keyboardShortcuts:{keys:["?"],description:"Keyboard shortcuts"},back:{keys:[s,"["],description:"Back to previous"},focusChatInput:{keys:[s,"L"],description:"Focus chat input"},saveAndFormat:{keys:[s,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[s,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[s,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",s,"S"],description:"New task"},toggleDaemon:{keys:[s,"D"],description:"Toggle daemon logs"}},u=[{label:"General",shortcuts:[e.commandPalette,e.keyboardShortcuts,e.back,e.newTask,e.toggleDaemon]},{label:"Editor",shortcuts:[e.saveAndFormat]},{label:"Chat",shortcuts:[e.focusChatInput,e.togglePlanMode,e.sendMessage,e.newLine]},{label:"Questions",shortcuts:[e.selectOption]},{label:"Monitoring",shortcuts:[e.applyFilter]}];function m(t){return i?t.metaKey:t.ctrlKey}function f(t){if(!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const o=t.tagName;return o==="INPUT"||o==="TEXTAREA"||o==="SELECT"}const n=new l(!1);function y(){n.set(!0)}function g(){n.set(!1)}function k(){const t=r.c(2),o=c.useSyncExternalStore(n.subscribe,n.get);let a;return t[0]!==o?(a=[o,n.set],t[0]=o,t[1]=a):a=t[1],a}export{e as K,u as S,f as a,g as c,m as i,y as o,k as u};
1
+ import{c as r,r as c}from"./index-Dc7hzqoi.js";import{S as l}from"./hooks-DZOMRp7D.js";const i=typeof navigator<"u"&&/Mac|iPhone|iPad/.test(navigator.platform),s=i?"⌘":"Ctrl",e={commandPalette:{keys:[s,"K"],description:"Command palette"},keyboardShortcuts:{keys:["?"],description:"Keyboard shortcuts"},back:{keys:[s,"["],description:"Back to previous"},focusChatInput:{keys:[s,"L"],description:"Focus chat input"},saveAndFormat:{keys:[s,"S"],description:"Save & format"},sendMessage:{keys:["Enter"],description:"Send message"},newLine:{keys:["Shift","Enter"],description:"New line"},selectOption:{keys:["1-9"],description:"Select option"},applyFilter:{keys:[s,"Enter"],description:"Apply filter"},togglePlanMode:{keys:[s,"Shift","L"],description:"Toggle plan mode"},newTask:{keys:["Shift",s,"S"],description:"New task"},toggleDaemon:{keys:[s,"D"],description:"Toggle daemon logs"}},u=[{label:"General",shortcuts:[e.commandPalette,e.keyboardShortcuts,e.back,e.newTask,e.toggleDaemon]},{label:"Editor",shortcuts:[e.saveAndFormat]},{label:"Chat",shortcuts:[e.focusChatInput,e.togglePlanMode,e.sendMessage,e.newLine]},{label:"Questions",shortcuts:[e.selectOption]},{label:"Monitoring",shortcuts:[e.applyFilter]}];function m(t){return i?t.metaKey:t.ctrlKey}function f(t){if(!(t instanceof HTMLElement))return!1;if(t.isContentEditable)return!0;const o=t.tagName;return o==="INPUT"||o==="TEXTAREA"||o==="SELECT"}const n=new l(!1);function y(){n.set(!0)}function g(){n.set(!1)}function k(){const t=r.c(2),o=c.useSyncExternalStore(n.subscribe,n.get);let a;return t[0]!==o?(a=[o,n.set],t[0]=o,t[1]=a):a=t[1],a}export{e as K,u as S,f as a,g as c,m as i,y as o,k as u};
@@ -1 +1 @@
1
- import{c as _,r as U,l as Q,j as s,Q as Y,E as Z,b as z,a as ee,x as te,B as ne}from"./index-z4bKt11m.js";import{n as se}from"./site-url-en5df9c-.js";import{u as oe}from"./use-mcp-client-B1u2B39v.js";import{u as re,a as le,C as ie,b as ae}from"./use-connect-companion-_GDNSGRN.js";function ce(t){const e=_.c(14),{children:n,className:o,wrapperClassName:r}=t,[d,c]=U.useState(!0);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=u=>{if(!u)return;const y=()=>{const j=u.scrollHeight-u.scrollTop-u.clientHeight<8;c(j)};y(),u.addEventListener("scroll",y,{passive:!0});const b=new ResizeObserver(y);b.observe(u);for(const j of Array.from(u.children))b.observe(j);return()=>{u.removeEventListener("scroll",y),b.disconnect()}},e[0]=f):f=e[0];const p=f;let l;e[1]!==r?(l=Q("relative",r),e[1]=r,e[2]=l):l=e[2];let i;e[3]!==n||e[4]!==o?(i=s.jsx("div",{ref:p,className:o,children:n}),e[3]=n,e[4]=o,e[5]=i):i=e[5];const a=d?"opacity-0":"opacity-100";let x;e[6]!==a?(x=Q("pointer-events-none absolute inset-x-0 -bottom-px h-[72px]","bg-gradient-to-t from-sidebar from-[6px] to-transparent","backdrop-blur-[1px] [mask-image:linear-gradient(to_top,black_6px,transparent)]","transition-opacity duration-200",a),e[6]=a,e[7]=x):x=e[7];let m;e[8]!==x?(m=s.jsx("div",{"aria-hidden":!0,className:x}),e[8]=x,e[9]=m):m=e[9];let g;return e[10]!==l||e[11]!==i||e[12]!==m?(g=s.jsxs("div",{className:l,children:[i,m]}),e[10]=l,e[11]=i,e[12]=m,e[13]=g):g=e[13],g}const H="flex min-h-0 flex-1 flex-col gap-6 md:grid md:flex-none md:gap-6";function q(){const t=_.c(4),e=z();let n;t[0]!==e?(n=e("routes.reportsOnboarding.companionSection.title"),t[0]=e,t[1]=n):n=t[1];let o;return t[2]!==n?(o=s.jsx("h1",{className:"text-lg font-medium leading-6 text-foreground lg:text-xl lg:leading-7",children:n}),t[2]=n,t[3]=o):o=t[3],o}function de(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex flex-col gap-4",children:[0,1,2,3].map(me)}),t[0]=e):e=t[0],e}function me(t){return s.jsx(ae,{},t)}function fe(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:H,children:[s.jsx(q,{}),s.jsx(de,{})]}),t[0]=e):e=t[0],e}function ue(t){const e=_.c(18),{onRetry:n}=t,o=z();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(q,{}),e[0]=r):r=e[0];let d;e[1]!==o?(d=o("routes.reportsOnboarding.companionSection.loadError"),e[1]=o,e[2]=d):d=e[2];let c;e[3]!==d?(c=s.jsx("p",{className:"text-sm text-foreground",children:d}),e[3]=d,e[4]=c):c=e[4];let f;e[5]!==o?(f=o("routes.reportsOnboarding.companionSection.loadErrorDescription"),e[5]=o,e[6]=f):f=e[6];let p;e[7]!==f?(p=s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:f}),e[7]=f,e[8]=p):p=e[8];let l;e[9]!==o?(l=o("routes.reportsOnboarding.companionSection.retry"),e[9]=o,e[10]=l):l=e[10];let i;e[11]!==n||e[12]!==l?(i=s.jsx(ne,{type:"button",variant:"outline",size:"sm",className:"mt-3",onClick:n,children:l}),e[11]=n,e[12]=l,e[13]=i):i=e[13];let a;return e[14]!==c||e[15]!==p||e[16]!==i?(a=s.jsxs("div",{className:H,children:[r,s.jsxs("div",{role:"alert",className:"rounded-2xl border border-border bg-card p-4",children:[c,p,i]})]}),e[14]=c,e[15]=p,e[16]=i,e[17]=a):a=e[17],a}function ve(t){const e=_.c(2);let n;return e[0]!==t?(n=s.jsx(Y,{children:o=>{const{reset:r}=o;return s.jsx(Z,{fallback:d=>{const{resetError:c}=d;return s.jsx(ue,{onRetry:()=>{r(),c()}})},children:s.jsx(U.Suspense,{fallback:s.jsx(fe,{}),children:s.jsx(pe,{...t})})})}}),e[0]=t,e[1]=n):n=e[1],n}function pe(t){const e=_.c(60),{org:n,cdConnectionId:o,siteUrl:r,onReadinessChange:d}=t,c=z(),{data:f}=ee.useSession(),p=f?.user?.id??"";let l;if(e[0]!==r){const $=r?se(r):null;if($?.ok)try{l=new URL($.value).hostname}catch{l=void 0}e[0]=r,e[1]=l}else l=e[1];let i;e[2]!==n.id||e[3]!==n.slug?(i={connectionId:te,orgId:n.id,orgSlug:n.slug},e[2]=n.id,e[3]=n.slug,e[4]=i):i=e[4];const a=oe(i);let x;e[5]!==o||e[6]!==n||e[7]!==a||e[8]!==r?(x={selfClient:a,org:n,cdConnectionId:o,siteUrl:r},e[5]=o,e[6]=n,e[7]=a,e[8]=r,e[9]=x):x=e[9];const{cards:m,saStatusUnavailable:g}=re(x);let u;e[10]!==o||e[11]!==n||e[12]!==a||e[13]!==l||e[14]!==r||e[15]!==p?(u={selfClient:a,org:n,userId:p,cdConnectionId:o,domain:l,siteUrl:r},e[10]=o,e[11]=n,e[12]=a,e[13]=l,e[14]=r,e[15]=p,e[16]=u):u=e[16];const{connect:y,connectingFieldKey:b,disconnect:j,disconnectingFieldKey:L,error:N}=le(u),[F,D]=U.useState(null),P=he;let E,R,C,k,K,O,I,w,S,v;if(e[17]!==F||e[18]!==m||e[19]!==y||e[20]!==N||e[21]!==b||e[22]!==j||e[23]!==L||e[24]!==d||e[25]!==n||e[26]!==g||e[27]!==a||e[28]!==r||e[29]!==c){k=Symbol.for("react.early_return_sentinel");e:{const $=m.filter(ge),G=m.filter(xe),J=g||($.length>0?$.every(P):m.length===0||m.some(P));if(d?.(J),m.length===0){k=null;break e}const V=b!==null||L!==null,W=h=>{const X=async()=>{await y(h)&&D(h.fieldKey)};return s.jsx(ie,{card:h,connecting:b===h.fieldKey,disconnecting:L===h.fieldKey,disabled:V&&b!==h.fieldKey&&L!==h.fieldKey,org:n,selfClient:a,siteUrl:r,autoOpenConfigFieldKey:F,onAutoOpenConfigHandled:()=>D(T=>T===h.fieldKey?null:T),onConnect:()=>{X()},onDisconnect:()=>{j(h)}},h.fieldKey)};R=H,e[40]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(q,{}),e[40]=C):C=e[40],E=ce,I="flex min-h-0 flex-1 flex-col md:block",w="-mx-1 min-h-0 flex-1 overflow-y-auto px-1 md:max-h-[min(60vh,calc(100dvh-330px))] md:flex-none",e[41]!==N?(S=N&&s.jsx("p",{role:"alert",className:"mb-3 text-sm text-destructive",children:N}),e[41]=N,e[42]=S):S=e[42],e[43]!==g||e[44]!==c?(v=g&&s.jsx("p",{role:"status",className:"mb-3 rounded-lg border border-warning/40 bg-warning/10 p-3 text-sm text-foreground",children:c("routes.reportsOnboarding.companionSection.statusUnavailable")}),e[43]=g,e[44]=c,e[45]=v):v=e[45],K="flex flex-col gap-4 pt-3",O=[...$,...G].map(W)}e[17]=F,e[18]=m,e[19]=y,e[20]=N,e[21]=b,e[22]=j,e[23]=L,e[24]=d,e[25]=n,e[26]=g,e[27]=a,e[28]=r,e[29]=c,e[30]=E,e[31]=R,e[32]=C,e[33]=k,e[34]=K,e[35]=O,e[36]=I,e[37]=w,e[38]=S,e[39]=v}else E=e[30],R=e[31],C=e[32],k=e[33],K=e[34],O=e[35],I=e[36],w=e[37],S=e[38],v=e[39];if(k!==Symbol.for("react.early_return_sentinel"))return k;let A;e[46]!==K||e[47]!==O?(A=s.jsx("div",{className:K,children:O}),e[46]=K,e[47]=O,e[48]=A):A=e[48];let B;e[49]!==E||e[50]!==A||e[51]!==I||e[52]!==w||e[53]!==S||e[54]!==v?(B=s.jsxs(E,{wrapperClassName:I,className:w,children:[S,v,A]}),e[49]=E,e[50]=A,e[51]=I,e[52]=w,e[53]=S,e[54]=v,e[55]=B):B=e[55];let M;return e[56]!==R||e[57]!==C||e[58]!==B?(M=s.jsxs("div",{className:R,children:[C,B]}),e[56]=R,e[57]=C,e[58]=B,e[59]=M):M=e[59],M}function xe(t){return!t.required}function ge(t){return t.required}function he(t){return t.satisfied&&t.configured}export{fe as C,ce as S,ve as a};
1
+ import{c as _,r as U,l as Q,j as s,Q as Y,E as Z,b as z,a as ee,x as te,B as ne}from"./index-Dc7hzqoi.js";import{n as se}from"./site-url-en5df9c-.js";import{u as oe}from"./use-mcp-client-e_hCatGm.js";import{u as re,a as le,C as ie,b as ae}from"./use-connect-companion-CClQCUMS.js";function ce(t){const e=_.c(14),{children:n,className:o,wrapperClassName:r}=t,[d,c]=U.useState(!0);let f;e[0]===Symbol.for("react.memo_cache_sentinel")?(f=u=>{if(!u)return;const y=()=>{const j=u.scrollHeight-u.scrollTop-u.clientHeight<8;c(j)};y(),u.addEventListener("scroll",y,{passive:!0});const b=new ResizeObserver(y);b.observe(u);for(const j of Array.from(u.children))b.observe(j);return()=>{u.removeEventListener("scroll",y),b.disconnect()}},e[0]=f):f=e[0];const p=f;let l;e[1]!==r?(l=Q("relative",r),e[1]=r,e[2]=l):l=e[2];let i;e[3]!==n||e[4]!==o?(i=s.jsx("div",{ref:p,className:o,children:n}),e[3]=n,e[4]=o,e[5]=i):i=e[5];const a=d?"opacity-0":"opacity-100";let x;e[6]!==a?(x=Q("pointer-events-none absolute inset-x-0 -bottom-px h-[72px]","bg-gradient-to-t from-sidebar from-[6px] to-transparent","backdrop-blur-[1px] [mask-image:linear-gradient(to_top,black_6px,transparent)]","transition-opacity duration-200",a),e[6]=a,e[7]=x):x=e[7];let m;e[8]!==x?(m=s.jsx("div",{"aria-hidden":!0,className:x}),e[8]=x,e[9]=m):m=e[9];let g;return e[10]!==l||e[11]!==i||e[12]!==m?(g=s.jsxs("div",{className:l,children:[i,m]}),e[10]=l,e[11]=i,e[12]=m,e[13]=g):g=e[13],g}const H="flex min-h-0 flex-1 flex-col gap-6 md:grid md:flex-none md:gap-6";function q(){const t=_.c(4),e=z();let n;t[0]!==e?(n=e("routes.reportsOnboarding.companionSection.title"),t[0]=e,t[1]=n):n=t[1];let o;return t[2]!==n?(o=s.jsx("h1",{className:"text-lg font-medium leading-6 text-foreground lg:text-xl lg:leading-7",children:n}),t[2]=n,t[3]=o):o=t[3],o}function de(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsx("div",{className:"flex flex-col gap-4",children:[0,1,2,3].map(me)}),t[0]=e):e=t[0],e}function me(t){return s.jsx(ae,{},t)}function fe(){const t=_.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:H,children:[s.jsx(q,{}),s.jsx(de,{})]}),t[0]=e):e=t[0],e}function ue(t){const e=_.c(18),{onRetry:n}=t,o=z();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsx(q,{}),e[0]=r):r=e[0];let d;e[1]!==o?(d=o("routes.reportsOnboarding.companionSection.loadError"),e[1]=o,e[2]=d):d=e[2];let c;e[3]!==d?(c=s.jsx("p",{className:"text-sm text-foreground",children:d}),e[3]=d,e[4]=c):c=e[4];let f;e[5]!==o?(f=o("routes.reportsOnboarding.companionSection.loadErrorDescription"),e[5]=o,e[6]=f):f=e[6];let p;e[7]!==f?(p=s.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:f}),e[7]=f,e[8]=p):p=e[8];let l;e[9]!==o?(l=o("routes.reportsOnboarding.companionSection.retry"),e[9]=o,e[10]=l):l=e[10];let i;e[11]!==n||e[12]!==l?(i=s.jsx(ne,{type:"button",variant:"outline",size:"sm",className:"mt-3",onClick:n,children:l}),e[11]=n,e[12]=l,e[13]=i):i=e[13];let a;return e[14]!==c||e[15]!==p||e[16]!==i?(a=s.jsxs("div",{className:H,children:[r,s.jsxs("div",{role:"alert",className:"rounded-2xl border border-border bg-card p-4",children:[c,p,i]})]}),e[14]=c,e[15]=p,e[16]=i,e[17]=a):a=e[17],a}function ve(t){const e=_.c(2);let n;return e[0]!==t?(n=s.jsx(Y,{children:o=>{const{reset:r}=o;return s.jsx(Z,{fallback:d=>{const{resetError:c}=d;return s.jsx(ue,{onRetry:()=>{r(),c()}})},children:s.jsx(U.Suspense,{fallback:s.jsx(fe,{}),children:s.jsx(pe,{...t})})})}}),e[0]=t,e[1]=n):n=e[1],n}function pe(t){const e=_.c(60),{org:n,cdConnectionId:o,siteUrl:r,onReadinessChange:d}=t,c=z(),{data:f}=ee.useSession(),p=f?.user?.id??"";let l;if(e[0]!==r){const $=r?se(r):null;if($?.ok)try{l=new URL($.value).hostname}catch{l=void 0}e[0]=r,e[1]=l}else l=e[1];let i;e[2]!==n.id||e[3]!==n.slug?(i={connectionId:te,orgId:n.id,orgSlug:n.slug},e[2]=n.id,e[3]=n.slug,e[4]=i):i=e[4];const a=oe(i);let x;e[5]!==o||e[6]!==n||e[7]!==a||e[8]!==r?(x={selfClient:a,org:n,cdConnectionId:o,siteUrl:r},e[5]=o,e[6]=n,e[7]=a,e[8]=r,e[9]=x):x=e[9];const{cards:m,saStatusUnavailable:g}=re(x);let u;e[10]!==o||e[11]!==n||e[12]!==a||e[13]!==l||e[14]!==r||e[15]!==p?(u={selfClient:a,org:n,userId:p,cdConnectionId:o,domain:l,siteUrl:r},e[10]=o,e[11]=n,e[12]=a,e[13]=l,e[14]=r,e[15]=p,e[16]=u):u=e[16];const{connect:y,connectingFieldKey:b,disconnect:j,disconnectingFieldKey:L,error:N}=le(u),[F,D]=U.useState(null),P=he;let E,R,C,k,K,O,I,w,S,v;if(e[17]!==F||e[18]!==m||e[19]!==y||e[20]!==N||e[21]!==b||e[22]!==j||e[23]!==L||e[24]!==d||e[25]!==n||e[26]!==g||e[27]!==a||e[28]!==r||e[29]!==c){k=Symbol.for("react.early_return_sentinel");e:{const $=m.filter(ge),G=m.filter(xe),J=g||($.length>0?$.every(P):m.length===0||m.some(P));if(d?.(J),m.length===0){k=null;break e}const V=b!==null||L!==null,W=h=>{const X=async()=>{await y(h)&&D(h.fieldKey)};return s.jsx(ie,{card:h,connecting:b===h.fieldKey,disconnecting:L===h.fieldKey,disabled:V&&b!==h.fieldKey&&L!==h.fieldKey,org:n,selfClient:a,siteUrl:r,autoOpenConfigFieldKey:F,onAutoOpenConfigHandled:()=>D(T=>T===h.fieldKey?null:T),onConnect:()=>{X()},onDisconnect:()=>{j(h)}},h.fieldKey)};R=H,e[40]===Symbol.for("react.memo_cache_sentinel")?(C=s.jsx(q,{}),e[40]=C):C=e[40],E=ce,I="flex min-h-0 flex-1 flex-col md:block",w="-mx-1 min-h-0 flex-1 overflow-y-auto px-1 md:max-h-[min(60vh,calc(100dvh-330px))] md:flex-none",e[41]!==N?(S=N&&s.jsx("p",{role:"alert",className:"mb-3 text-sm text-destructive",children:N}),e[41]=N,e[42]=S):S=e[42],e[43]!==g||e[44]!==c?(v=g&&s.jsx("p",{role:"status",className:"mb-3 rounded-lg border border-warning/40 bg-warning/10 p-3 text-sm text-foreground",children:c("routes.reportsOnboarding.companionSection.statusUnavailable")}),e[43]=g,e[44]=c,e[45]=v):v=e[45],K="flex flex-col gap-4 pt-3",O=[...$,...G].map(W)}e[17]=F,e[18]=m,e[19]=y,e[20]=N,e[21]=b,e[22]=j,e[23]=L,e[24]=d,e[25]=n,e[26]=g,e[27]=a,e[28]=r,e[29]=c,e[30]=E,e[31]=R,e[32]=C,e[33]=k,e[34]=K,e[35]=O,e[36]=I,e[37]=w,e[38]=S,e[39]=v}else E=e[30],R=e[31],C=e[32],k=e[33],K=e[34],O=e[35],I=e[36],w=e[37],S=e[38],v=e[39];if(k!==Symbol.for("react.early_return_sentinel"))return k;let A;e[46]!==K||e[47]!==O?(A=s.jsx("div",{className:K,children:O}),e[46]=K,e[47]=O,e[48]=A):A=e[48];let B;e[49]!==E||e[50]!==A||e[51]!==I||e[52]!==w||e[53]!==S||e[54]!==v?(B=s.jsxs(E,{wrapperClassName:I,className:w,children:[S,v,A]}),e[49]=E,e[50]=A,e[51]=I,e[52]=w,e[53]=S,e[54]=v,e[55]=B):B=e[55];let M;return e[56]!==R||e[57]!==C||e[58]!==B?(M=s.jsxs("div",{className:R,children:[C,B]}),e[56]=R,e[57]=C,e[58]=B,e[59]=M):M=e[59],M}function xe(t){return!t.required}function ge(t){return t.required}function he(t){return t.satisfied&&t.configured}export{fe as C,ce as S,ve as a};
@@ -1,4 +1,4 @@
1
- import{c as _,b as D,r as G,l as ee,j as s,fi as te,M as se,ao as ne,F as ie,B as U,t as J,eC as oe,dN as le}from"./index-z4bKt11m.js";import{a as ae,A as re}from"./alert-Cnsh1M35.js";import{a as ce,b as de,c as V,d as ue,S as me}from"./select-cIekAVlM.js";import{T as fe,c as pe,a as xe,b as ge}from"./tabs-Co2GUrNY.js";import{u as X}from"./use-copy-DUiBegp6.js";import{i as Y}from"./Check-BZE0WrNL.js";import{i as he}from"./ChevronRight-DNrwFBnC.js";import{a as Q}from"./Copy01-DTHuBaTA.js";import{i as ye}from"./Key01-mqjfsZRe.js";import{i as Ce}from"./Link01-C656VtHx.js";import{C as je,a as be,b as ve}from"./client-icons-DLMNndDc.js";import{u as we,a as Ne,A as $e}from"./api-keys-BlYGdiam.js";import{R as ke}from"./require-capability-CjU7EXPP.js";import"./index-B46P4HkV.js";import"./ChevronUp-D5_IWEtB.js";import"./AlertCircle-DbwtWnTP.js";import"./Plus-D2HOi_DD.js";import"./Trash01-C6bziN5X.js";import"./alert-dialog-Bi9Cy1y8.js";import"./dialog-DbzCN1O8.js";import"./X-Bzh3NI3m.js";import"./input-C7XH8Uj_.js";import"./label-8juC5J-g.js";import"./use-mcp-client-B1u2B39v.js";import"./auth-D-2jYpOE.js";import"./access-gate-NMf18NsK.js";import"./capability-load-error-L3ivCxmO.js";function Se(){return(typeof window>"u"?"":window.location.hostname||"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"studio"}function Ke(t){return`${typeof window>"u"?"http://localhost:3000":window.location.origin}/api/${t}/mcp/self`}function _e({client:t,mode:e,url:r,apiKey:c}){const i=c??"<paste-your-api-key>",a=Se();if(t==="claude-code")return e==="oauth"?{language:"bash",code:`claude mcp add --transport http --scope user ${a} ${r}`}:{language:"bash",code:`claude mcp add --transport http --scope user ${a} ${r} \\
1
+ import{c as _,b as D,r as G,l as ee,j as s,fi as te,M as se,ao as ne,F as ie,B as U,t as J,eC as oe,dN as le}from"./index-Dc7hzqoi.js";import{a as ae,A as re}from"./alert-U2IStW1f.js";import{a as ce,b as de,c as V,d as ue,S as me}from"./select-BkKPcZFe.js";import{T as fe,c as pe,a as xe,b as ge}from"./tabs-CLziM0Ww.js";import{u as X}from"./use-copy-C_ctOeuP.js";import{i as Y}from"./Check-B3RSsr_D.js";import{i as he}from"./ChevronRight-USKkhEpL.js";import{a as Q}from"./Copy01-nMxlBfeT.js";import{i as ye}from"./Key01-CIXwHMRo.js";import{i as Ce}from"./Link01-C0FvgZZB.js";import{C as je,a as be,b as ve}from"./client-icons-DpcP1bht.js";import{u as we,a as Ne,A as $e}from"./api-keys-AIfL76r6.js";import{R as ke}from"./require-capability-CmtOZnXt.js";import"./index-DWw5wi2G.js";import"./ChevronUp-DiYhGG4T.js";import"./AlertCircle-CMjsP_Tk.js";import"./Plus-CVauOqLT.js";import"./Trash01-nl-t4IoV.js";import"./alert-dialog-BI-B_8hq.js";import"./dialog-llvhXw2o.js";import"./X-CFCE4a-Q.js";import"./input-DXlaTX4w.js";import"./label-BMxIRiEr.js";import"./use-mcp-client-e_hCatGm.js";import"./auth-DhzAq_9m.js";import"./access-gate-Ds4n25mC.js";import"./capability-load-error-CJMvYDf4.js";function Se(){return(typeof window>"u"?"":window.location.hostname||"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"")||"studio"}function Ke(t){return`${typeof window>"u"?"http://localhost:3000":window.location.origin}/api/${t}/mcp/self`}function _e({client:t,mode:e,url:r,apiKey:c}){const i=c??"<paste-your-api-key>",a=Se();if(t==="claude-code")return e==="oauth"?{language:"bash",code:`claude mcp add --transport http --scope user ${a} ${r}`}:{language:"bash",code:`claude mcp add --transport http --scope user ${a} ${r} \\
2
2
  --header "Authorization: Bearer ${i}"`};if(t==="cursor"){const n={url:r};return e==="api-key"&&(n.headers={Authorization:`Bearer ${i}`}),{language:"json",pathHint:"~/.cursor/mcp.json",code:JSON.stringify({mcpServers:{[a]:n}},null,2)}}if(t==="codex"){const n=[`[mcp_servers.${a}]`,`url = "${r}"`];return e==="api-key"&&n.push(`http_headers = { "Authorization" = "Bearer ${i}" }`),{language:"toml",pathHint:"~/.codex/config.toml",code:n.join(`
3
3
  `)}}return e==="oauth"?{language:"text",code:`${r}
4
4
 
@@ -1 +1 @@
1
- import{c as v,b as N,j as s,D as w,B as k}from"./index-z4bKt11m.js";import{i as y}from"./ChevronRight-DNrwFBnC.js";import{i as z}from"./X-Bzh3NI3m.js";import{ao as _,af as C}from"./agent-icon-BD4DM2Lv.js";const S="https://decoims.com/image?src=decocms%2F06b54678-5335-4671-b63a-e13d9e541155%2Fagataesteves.png&quality=original&fit=cover&width=160&height=160";function $(){const t=v.c(13),e=N();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("img",{src:"/logos/summit/monte-carlo.svg",alt:"Monte Carlo",className:"h-14 w-[112px] shrink-0 self-start object-contain object-left brightness-0 invert"}),t[0]=l):l=t[0];let n;t[1]!==e?(n=e("routes.reportsOnboarding.connectModal.quote"),t[1]=e,t[2]=n):n=t[2];let o;t[3]!==n?(o=s.jsxs("blockquote",{className:"text-lg font-medium leading-[1.45] lg:text-xl",children:["“",n,"”"]}),t[3]=n,t[4]=o):o=t[4];let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("img",{src:S,alt:"",className:"size-10 shrink-0 rounded-full object-cover",loading:"lazy"}),t[5]=a):a=t[5];let r;t[6]!==e?(r=e("routes.reportsOnboarding.connectModal.quoteAuthor"),t[6]=e,t[7]=r):r=t[7];let i;t[8]!==r?(i=s.jsxs("figcaption",{className:"flex items-center gap-2.5",children:[a,s.jsx("span",{className:"text-base font-medium",children:r})]}),t[8]=r,t[9]=i):i=t[9];let c;return t[10]!==o||t[11]!==i?(c=s.jsxs("div",{className:"relative flex flex-col gap-8 text-white",children:[l,o,i]}),t[10]=o,t[11]=i,t[12]=c):c=t[12],c}function M(){const t=v.c(19),e=N();let l;t[0]!==e?(l=e("routes.reportsOnboarding.connectModal.trustRevoke"),t[0]=e,t[1]=l):l=t[1];let n;t[2]!==l?(n={Icon:_,label:l},t[2]=l,t[3]=n):n=t[3];let o;t[4]!==e?(o=e("routes.reportsOnboarding.connectModal.trustEncrypted"),t[4]=e,t[5]=o):o=t[5];let a;t[6]!==o?(a={Icon:w,label:o},t[6]=o,t[7]=a):a=t[7];let r;t[8]!==e?(r=e("routes.reportsOnboarding.connectModal.trustNeverSold"),t[8]=e,t[9]=r):r=t[9];let i;t[10]!==r?(i={Icon:C,label:r},t[10]=r,t[11]=i):i=t[11];let c;t[12]!==n||t[13]!==a||t[14]!==i?(c=[n,a,i],t[12]=n,t[13]=a,t[14]=i,t[15]=c):c=t[15];const m=c;let f;t[16]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"h-px w-full bg-white/15"}),t[16]=f):f=t[16];let d;return t[17]!==m?(d=s.jsxs("div",{className:"relative flex flex-col gap-2.5 text-white",children:[f,s.jsx("ul",{className:"mt-1 flex flex-col gap-2.5",children:m.map(q)})]}),t[17]=m,t[18]=d):d=t[18],d}function q(t){const{Icon:e,label:l}=t;return s.jsxs("li",{className:"flex items-center gap-2.5 text-[13px] leading-tight text-white/70",children:[s.jsx(e,{className:"size-4 shrink-0 opacity-85"}),l]},l)}function I(t){const e=v.c(22),{siteHost:l,footer:n,onClose:o,children:a}=t,r=N(),i=l?`https://www.google.com/s2/favicons?domain=${l}&sz=128`:null;let c;e[0]!==o||e[1]!==r?(c=o&&s.jsx("button",{type:"button",onClick:o,"aria-label":r("routes.reportsOnboarding.connectModal.close"),className:"absolute right-3 top-3 z-10 flex size-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-black/10 hover:text-foreground lg:text-white/80 lg:hover:bg-white/15 lg:hover:text-white",children:s.jsx(z,{size:18})}),e[0]=o,e[1]=r,e[2]=c):c=e[2];let m,f;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"size-7 shrink-0 dark:hidden"}),f=s.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"hidden size-7 shrink-0 dark:block"}),e[3]=m,e[4]=f):(m=e[3],f=e[4]);let d;e[5]!==i||e[6]!==l?(d=l&&s.jsxs(s.Fragment,{children:[s.jsx(y,{size:16,className:"shrink-0 text-foreground/25"}),i&&s.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center overflow-hidden rounded bg-white",children:s.jsx("img",{src:i,alt:"",className:"size-full"})}),s.jsx("span",{className:"truncate text-[15px] leading-tight text-muted-foreground",children:l})]}),e[5]=i,e[6]=l,e[7]=d):d=e[7];let x;e[8]!==d?(x=s.jsxs("div",{className:"flex items-center gap-2",children:[m,f,d]}),e[8]=d,e[9]=x):x=e[9];let g;e[10]!==n?(g=s.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:n}),e[10]=n,e[11]=g):g=e[11];let h;e[12]!==a||e[13]!==x||e[14]!==g?(h=s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 bg-background p-6 lg:p-8",children:[x,a,g]}),e[12]=a,e[13]=x,e[14]=g,e[15]=h):h=e[15];let u,b;e[16]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("img",{src:"https://decoims.com/image?src=decocms%2F8191643a-1947-4c30-afb4-36b8073c90fb%2Fbg-quote.png&quality=original&fit=cover&width=880",alt:"",className:"absolute inset-0 size-full object-cover"}),b=s.jsx("div",{className:"absolute inset-0 bg-black/20"}),e[16]=u,e[17]=b):(u=e[16],b=e[17]);let p;e[18]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs("aside",{className:"relative hidden shrink-0 overflow-hidden lg:flex lg:w-[440px] lg:flex-col lg:p-14",children:[u,b,s.jsxs("div",{className:"relative z-10 flex h-full flex-col",children:[s.jsx("div",{className:"flex-1"}),s.jsx($,{}),s.jsx("div",{className:"flex-1"}),s.jsx(M,{})]})]}),e[18]=p):p=e[18];let j;return e[19]!==c||e[20]!==h?(j=s.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col lg:flex-row",children:[c,h,p]}),e[19]=c,e[20]=h,e[21]=j):j=e[21],j}function B(t){const e=v.c(5),{ready:l,pending:n,label:o,onClick:a,children:r}=t,i=n||!l,c=l&&!n?r:null;let m;return e[0]!==o||e[1]!==a||e[2]!==i||e[3]!==c?(m=s.jsxs(k,{type:"button",size:"lg",className:"h-auto min-h-12 w-full whitespace-normal rounded-lg py-3 text-center text-base font-medium leading-tight",onClick:a,disabled:i,children:[o,c]}),e[0]=o,e[1]=a,e[2]=i,e[3]=c,e[4]=m):m=e[4],m}export{I as C,B as a};
1
+ import{c as v,b as N,j as s,D as w,B as k}from"./index-Dc7hzqoi.js";import{i as y}from"./ChevronRight-USKkhEpL.js";import{i as z}from"./X-CFCE4a-Q.js";import{ao as _,af as C}from"./agent-icon-CczrFEe7.js";const S="https://decoims.com/image?src=decocms%2F06b54678-5335-4671-b63a-e13d9e541155%2Fagataesteves.png&quality=original&fit=cover&width=160&height=160";function $(){const t=v.c(13),e=N();let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsx("img",{src:"/logos/summit/monte-carlo.svg",alt:"Monte Carlo",className:"h-14 w-[112px] shrink-0 self-start object-contain object-left brightness-0 invert"}),t[0]=l):l=t[0];let n;t[1]!==e?(n=e("routes.reportsOnboarding.connectModal.quote"),t[1]=e,t[2]=n):n=t[2];let o;t[3]!==n?(o=s.jsxs("blockquote",{className:"text-lg font-medium leading-[1.45] lg:text-xl",children:["“",n,"”"]}),t[3]=n,t[4]=o):o=t[4];let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("img",{src:S,alt:"",className:"size-10 shrink-0 rounded-full object-cover",loading:"lazy"}),t[5]=a):a=t[5];let r;t[6]!==e?(r=e("routes.reportsOnboarding.connectModal.quoteAuthor"),t[6]=e,t[7]=r):r=t[7];let i;t[8]!==r?(i=s.jsxs("figcaption",{className:"flex items-center gap-2.5",children:[a,s.jsx("span",{className:"text-base font-medium",children:r})]}),t[8]=r,t[9]=i):i=t[9];let c;return t[10]!==o||t[11]!==i?(c=s.jsxs("div",{className:"relative flex flex-col gap-8 text-white",children:[l,o,i]}),t[10]=o,t[11]=i,t[12]=c):c=t[12],c}function M(){const t=v.c(19),e=N();let l;t[0]!==e?(l=e("routes.reportsOnboarding.connectModal.trustRevoke"),t[0]=e,t[1]=l):l=t[1];let n;t[2]!==l?(n={Icon:_,label:l},t[2]=l,t[3]=n):n=t[3];let o;t[4]!==e?(o=e("routes.reportsOnboarding.connectModal.trustEncrypted"),t[4]=e,t[5]=o):o=t[5];let a;t[6]!==o?(a={Icon:w,label:o},t[6]=o,t[7]=a):a=t[7];let r;t[8]!==e?(r=e("routes.reportsOnboarding.connectModal.trustNeverSold"),t[8]=e,t[9]=r):r=t[9];let i;t[10]!==r?(i={Icon:C,label:r},t[10]=r,t[11]=i):i=t[11];let c;t[12]!==n||t[13]!==a||t[14]!==i?(c=[n,a,i],t[12]=n,t[13]=a,t[14]=i,t[15]=c):c=t[15];const m=c;let f;t[16]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("div",{className:"h-px w-full bg-white/15"}),t[16]=f):f=t[16];let d;return t[17]!==m?(d=s.jsxs("div",{className:"relative flex flex-col gap-2.5 text-white",children:[f,s.jsx("ul",{className:"mt-1 flex flex-col gap-2.5",children:m.map(q)})]}),t[17]=m,t[18]=d):d=t[18],d}function q(t){const{Icon:e,label:l}=t;return s.jsxs("li",{className:"flex items-center gap-2.5 text-[13px] leading-tight text-white/70",children:[s.jsx(e,{className:"size-4 shrink-0 opacity-85"}),l]},l)}function I(t){const e=v.c(22),{siteHost:l,footer:n,onClose:o,children:a}=t,r=N(),i=l?`https://www.google.com/s2/favicons?domain=${l}&sz=128`:null;let c;e[0]!==o||e[1]!==r?(c=o&&s.jsx("button",{type:"button",onClick:o,"aria-label":r("routes.reportsOnboarding.connectModal.close"),className:"absolute right-3 top-3 z-10 flex size-9 items-center justify-center rounded-lg text-muted-foreground transition-colors hover:bg-black/10 hover:text-foreground lg:text-white/80 lg:hover:bg-white/15 lg:hover:text-white",children:s.jsx(z,{size:18})}),e[0]=o,e[1]=r,e[2]=c):c=e[2];let m,f;e[3]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"size-7 shrink-0 dark:hidden"}),f=s.jsx("img",{src:"/logos/deco logo negative.svg",alt:"Deco",className:"hidden size-7 shrink-0 dark:block"}),e[3]=m,e[4]=f):(m=e[3],f=e[4]);let d;e[5]!==i||e[6]!==l?(d=l&&s.jsxs(s.Fragment,{children:[s.jsx(y,{size:16,className:"shrink-0 text-foreground/25"}),i&&s.jsx("span",{className:"flex size-4 shrink-0 items-center justify-center overflow-hidden rounded bg-white",children:s.jsx("img",{src:i,alt:"",className:"size-full"})}),s.jsx("span",{className:"truncate text-[15px] leading-tight text-muted-foreground",children:l})]}),e[5]=i,e[6]=l,e[7]=d):d=e[7];let x;e[8]!==d?(x=s.jsxs("div",{className:"flex items-center gap-2",children:[m,f,d]}),e[8]=d,e[9]=x):x=e[9];let g;e[10]!==n?(g=s.jsx("div",{className:"flex shrink-0 flex-col gap-3",children:n}),e[10]=n,e[11]=g):g=e[11];let h;e[12]!==a||e[13]!==x||e[14]!==g?(h=s.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-8 bg-background p-6 lg:p-8",children:[x,a,g]}),e[12]=a,e[13]=x,e[14]=g,e[15]=h):h=e[15];let u,b;e[16]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx("img",{src:"https://decoims.com/image?src=decocms%2F8191643a-1947-4c30-afb4-36b8073c90fb%2Fbg-quote.png&quality=original&fit=cover&width=880",alt:"",className:"absolute inset-0 size-full object-cover"}),b=s.jsx("div",{className:"absolute inset-0 bg-black/20"}),e[16]=u,e[17]=b):(u=e[16],b=e[17]);let p;e[18]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsxs("aside",{className:"relative hidden shrink-0 overflow-hidden lg:flex lg:w-[440px] lg:flex-col lg:p-14",children:[u,b,s.jsxs("div",{className:"relative z-10 flex h-full flex-col",children:[s.jsx("div",{className:"flex-1"}),s.jsx($,{}),s.jsx("div",{className:"flex-1"}),s.jsx(M,{})]})]}),e[18]=p):p=e[18];let j;return e[19]!==c||e[20]!==h?(j=s.jsxs("div",{className:"relative flex min-h-0 flex-1 flex-col lg:flex-row",children:[c,h,p]}),e[19]=c,e[20]=h,e[21]=j):j=e[21],j}function B(t){const e=v.c(5),{ready:l,pending:n,label:o,onClick:a,children:r}=t,i=n||!l,c=l&&!n?r:null;let m;return e[0]!==o||e[1]!==a||e[2]!==i||e[3]!==c?(m=s.jsxs(k,{type:"button",size:"lg",className:"h-auto min-h-12 w-full whitespace-normal rounded-lg py-3 text-center text-base font-medium leading-tight",onClick:a,disabled:i,children:[o,c]}),e[0]=o,e[1]=a,e[2]=i,e[3]=c,e[4]=m):m=e[4],m}export{I as C,B as a};
@@ -1 +1 @@
1
- import{aa as o,bs as a,bq as n,ab as e,br as i,bt as r,cy as b,dq as p,ct as m}from"./index-z4bKt11m.js";const h=o({authorizationEndpoint:e().url(),tokenEndpoint:e().url(),introspectionEndpoint:e().url().optional(),clientId:e(),clientSecret:e().optional(),scopes:n(e()),grantType:a(["authorization_code","client_credentials"])}),s=o({type:b("object"),properties:i(e(),r()).optional(),required:n(e()).optional()}).catchall(r()),_=p.extend({inputSchema:s,outputSchema:s.optional()}),f=o({headers:i(e(),e()).optional()}),g=o({command:e().describe("Command to run (e.g., 'npx', 'node')"),args:n(e()).optional().describe("Command arguments"),cwd:e().optional().describe("Working directory"),envVars:i(e(),e()).optional().describe("Environment variables (encrypted in storage)")}),d=256*1024;function l(t){return i(e(),r()).nullable().refine(c=>c===null||JSON.stringify(c).length<=d,{message:`${t} must serialize to at most ${d} bytes`})}const u=o({id:e().describe("Unique identifier for the connection"),title:e().describe("Human-readable name for the connection"),created_at:e().describe("When the connection was created"),updated_at:e().describe("When the connection was last updated"),created_by:e().describe("User ID who created the connection"),updated_by:e().optional().describe("User ID who last updated the connection"),organization_id:e().describe("Organization ID this connection belongs to"),description:e().nullable().describe("Description of the connection"),icon:e().nullable().describe("Icon URL for the connection"),app_name:e().nullable().describe("Associated app name"),app_id:e().nullable().describe("Associated app ID"),slug:e().nullable().optional().describe("URL-safe slug derived from app_name, connection_url, or title"),connection_type:a(["HTTP","SSE","Websocket","STDIO","VIRTUAL"]).describe("Type of connection"),connection_url:e().nullable().describe("URL for HTTP/SSE/WebSocket connections. virtual://$id for VIRTUAL. Null for STDIO."),connection_token:e().nullable().describe("Authentication token (for HTTP connections)"),connection_headers:m([g,f]).nullable().describe("Connection parameters. HTTP: { headers }. STDIO: { command, args, cwd, envVars }"),oauth_config:h.nullable().describe("OAuth configuration"),configuration_state:l("configuration_state").describe("Configuration state (decrypted)"),configuration_scopes:n(e()).nullable().optional().describe("Configuration scopes"),metadata:l("metadata").describe("Additional metadata (includes repository info)"),tools:n(_).nullable().describe("Discovered tools from MCP"),bindings:n(e()).nullable().describe("Detected bindings"),status:a(["active","inactive","error"]).describe("Current status")});u.omit({created_at:!0,updated_at:!0,created_by:!0,updated_by:!0,organization_id:!0,tools:!0,bindings:!0,status:!0}).partial({id:!0,description:!0,icon:!0,app_name:!0,app_id:!0,connection_url:!0,connection_token:!0,connection_headers:!0,oauth_config:!0,configuration_state:!0,configuration_scopes:!0,metadata:!0}).extend({icon:e().nullish()});u.partial();function T(t){return t!=null&&"command"in t}function y(t){return!t||!t.startsWith("virtual://")?null:t.replace("virtual://","")}export{h as O,T as i,y as p};
1
+ import{aa as o,bs as a,bq as n,ab as e,br as i,bt as r,cy as b,dq as p,ct as m}from"./index-Dc7hzqoi.js";const h=o({authorizationEndpoint:e().url(),tokenEndpoint:e().url(),introspectionEndpoint:e().url().optional(),clientId:e(),clientSecret:e().optional(),scopes:n(e()),grantType:a(["authorization_code","client_credentials"])}),s=o({type:b("object"),properties:i(e(),r()).optional(),required:n(e()).optional()}).catchall(r()),_=p.extend({inputSchema:s,outputSchema:s.optional()}),f=o({headers:i(e(),e()).optional()}),g=o({command:e().describe("Command to run (e.g., 'npx', 'node')"),args:n(e()).optional().describe("Command arguments"),cwd:e().optional().describe("Working directory"),envVars:i(e(),e()).optional().describe("Environment variables (encrypted in storage)")}),d=256*1024;function l(t){return i(e(),r()).nullable().refine(c=>c===null||JSON.stringify(c).length<=d,{message:`${t} must serialize to at most ${d} bytes`})}const u=o({id:e().describe("Unique identifier for the connection"),title:e().describe("Human-readable name for the connection"),created_at:e().describe("When the connection was created"),updated_at:e().describe("When the connection was last updated"),created_by:e().describe("User ID who created the connection"),updated_by:e().optional().describe("User ID who last updated the connection"),organization_id:e().describe("Organization ID this connection belongs to"),description:e().nullable().describe("Description of the connection"),icon:e().nullable().describe("Icon URL for the connection"),app_name:e().nullable().describe("Associated app name"),app_id:e().nullable().describe("Associated app ID"),slug:e().nullable().optional().describe("URL-safe slug derived from app_name, connection_url, or title"),connection_type:a(["HTTP","SSE","Websocket","STDIO","VIRTUAL"]).describe("Type of connection"),connection_url:e().nullable().describe("URL for HTTP/SSE/WebSocket connections. virtual://$id for VIRTUAL. Null for STDIO."),connection_token:e().nullable().describe("Authentication token (for HTTP connections)"),connection_headers:m([g,f]).nullable().describe("Connection parameters. HTTP: { headers }. STDIO: { command, args, cwd, envVars }"),oauth_config:h.nullable().describe("OAuth configuration"),configuration_state:l("configuration_state").describe("Configuration state (decrypted)"),configuration_scopes:n(e()).nullable().optional().describe("Configuration scopes"),metadata:l("metadata").describe("Additional metadata (includes repository info)"),tools:n(_).nullable().describe("Discovered tools from MCP"),bindings:n(e()).nullable().describe("Detected bindings"),status:a(["active","inactive","error"]).describe("Current status")});u.omit({created_at:!0,updated_at:!0,created_by:!0,updated_by:!0,organization_id:!0,tools:!0,bindings:!0,status:!0}).partial({id:!0,description:!0,icon:!0,app_name:!0,app_id:!0,connection_url:!0,connection_token:!0,connection_headers:!0,oauth_config:!0,configuration_state:!0,configuration_scopes:!0,metadata:!0}).extend({icon:e().nullish()});u.partial();function T(t){return t!=null&&"command"in t}function y(t){return!t||!t.startsWith("virtual://")?null:t.replace("virtual://","")}export{h as O,T as i,y as p};
@@ -1 +1 @@
1
- import{c as $,M as K,x as k,a0 as F,K as H,b as q,l as A,j as x,eC as G}from"./index-z4bKt11m.js";import{u as U}from"./use-registry-connections-D_a0MIjQ.js";import{e as V}from"./use-organization-settings-C-XY0Wze.js";import{u as X}from"./useInfiniteQuery-C6OBOha-.js";import{c as Y}from"./use-mcp-client-B1u2B39v.js";import{i as z,f as B}from"./extract-connection-data-CM8c_Wvw.js";import{r as W,R as Z}from"./retry-i8LvYSZg.js";import{g as S}from"./connection-slug-CITJ0kGN.js";import{I as J}from"./integration-icon-DOHTaQ6D.js";function ge(){const s=$.c(6),e=U(),t=V(),o=K().project.enabledPlugins??[];let n;if(s[0]!==o||s[1]!==t||s[2]!==e){let a;s[4]!==t?(a=r=>t(r.id),s[4]=t,s[5]=a):a=s[5],n=e.filter(a).map(O),o.includes("private-registry")&&t(k)&&n.push({id:k,title:"Private Registry",icon:null}),s[0]=o,s[1]=t,s[2]=e,s[3]=n}else n=s[3];return n}function O(s){return{id:s.id,title:s.title,icon:s.icon}}const ee=24,L=3;function Q(s){return s.id.includes("community-registry")}function te(s){const e=s?.trim().split(/\s+/).filter(Boolean)??[];if(e.length===0)return;const t=[["title"],["description"],["name"],["server","title"]];return{operator:"or",conditions:e.flatMap(o=>t.map(n=>({field:n,operator:"contains",value:o})))}}function D(s,e,t,o,n){const a=s.map(l=>l.id).sort().join(","),r=te(n),{data:p,fetchNextPage:f,hasNextPage:d,isFetchingNextPage:g,isLoading:N}=X({queryKey:H.storeDiscovery(e,`${a}:${n??""}`),queryFn:async({pageParam:l})=>{const c=l??{};return await Promise.all(s.map(async i=>{const y=c[i.id];if(y==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const C=z(i.id,e);try{return await W(async()=>{let u=null;try{u=await Y({connectionId:i.id,orgId:e,orgSlug:t});const h={limit:ee};y&&(h.cursor=y),r&&(h.where=r);const b=await u.callTool({name:C,arguments:h}),v=b.structuredContent??b,P=v.nextCursor||v.cursor||void 0,M=B(v?[v]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:M,nextCursor:P}}finally{await u?.close().catch(()=>{})}},{maxAttempts:L,minTimeout:0,maxTimeout:1e3,jitter:0})}catch(u){return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${L} attempts:`,u instanceof Z?u.cause:u),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}}))},initialPageParam:{},getNextPageParam:l=>{const c={};let m=!1;for(const i of l)i.registryId&&(i.nextCursor?(c[i.registryId]=i.nextCursor,m=!0):c[i.registryId]="EXHAUSTED");return m?c:void 0},staleTime:3600*1e3,placeholderData:F,retry:!1,enabled:s.length>0}),I=[];if(p?.pages)for(const l of p.pages)for(const c of l)for(const m of c.items)I.push({...m,_sourceName:m._sourceName??c.registryTitle,_sourceIcon:m._sourceIcon??c.registryIcon,_registryId:m._registryId??c.registryId});return{items:I,hasMore:d??!1,isLoadingMore:g,isInitialLoading:N,fetchNextPage:()=>{d&&!g&&f()}}}function ye(s,e){const t=$.c(16),{org:o}=K();let n;t[0]!==s?(n=s.filter(ie),t[0]=s,t[1]=n):n=t[1];const a=n;let r;t[2]!==s?(r=s.filter(se),t[2]=s,t[3]=r):r=t[3];const p=r,f=D(a,o.id,o.slug,!0,e),d=D(p,o.id,o.slug,!0,e);let g;if(t[4]!==d.items||t[5]!==f.items){const y=new Set;g=[];const C=[...f.items,...d.items];for(const u of C){const h=`${u._registryId}:${u.id}`;y.has(h)||(y.add(h),g.push(u))}t[4]=d.items,t[5]=f.items,t[6]=g}else g=t[6];const N=f.isInitialLoading||d.isInitialLoading,I=f.isLoadingMore||d.isLoadingMore,l=f.hasMore||d.hasMore;let c;t[7]!==d||t[8]!==f?(c=()=>{f.hasMore&&f.fetchNextPage(),d.hasMore&&d.fetchNextPage()},t[7]=d,t[8]=f,t[9]=c):c=t[9];const m=c;let i;return t[10]!==l||t[11]!==N||t[12]!==I||t[13]!==g||t[14]!==m?(i={items:g,hasMore:l,isLoadingMore:I,isInitialLoading:N,loadMore:m},t[10]=l,t[11]=N,t[12]=I,t[13]=g,t[14]=m,t[15]=i):i=t[15],i}function se(s){return Q(s)}function ie(s){return!Q(s)}function he(s){const e=new Map;for(const n of s){const a=S(n),r=e.get(a);r?r.push(n):e.set(a,[n])}const t=[],o=new Set;for(const n of s){const a=S(n);if(o.has(a))continue;o.add(a);const r=e.get(a),p=r[0];r.length===1?t.push({type:"single",connection:p}):t.push({type:"group",key:a,icon:p.icon,title:p.app_name?p.title.replace(/\s*\(\d+\)\s*$/,""):p.title,connections:r})}return t}function xe(s){const e=$.c(43),{connection:t,onClick:o,headerActions:n,headerActionsAlwaysVisible:a,footer:r,className:p,fallbackIcon:f,selected:d}=s,g=a===void 0?!1:a,N=q(),I=o&&"cursor-pointer hover:bg-muted/50";let l;e[0]!==p||e[1]!==I?(l=A("transition-colors group overflow-hidden flex flex-col h-full",I,p),e[0]=p,e[1]=I,e[2]=l):l=e[2];const c=o?"button":void 0,m=o?0:void 0,i=o&&d!==void 0?d:void 0;let y;e[3]!==o?(y=o?E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),o())}:void 0,e[3]=o,e[4]=y):y=e[4];let C;e[5]!==t.icon||e[6]!==t.title||e[7]!==f?(C=x.jsx(J,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:f}),e[5]=t.icon,e[6]=t.title,e[7]=f,e[8]=C):C=e[8];let u;e[9]!==n||e[10]!==g?(u=n&&x.jsx("div",{className:A("transition-opacity",!g&&"sm:opacity-0 sm:group-hover:opacity-100 sm:group-focus-within:opacity-100"),onClick:ne,children:n}),e[9]=n,e[10]=g,e[11]=u):u=e[11];let h;e[12]!==u?(h=x.jsx("div",{className:"relative",children:u}),e[12]=u,e[13]=h):h=e[13];let b;e[14]!==h||e[15]!==C?(b=x.jsxs("div",{className:"flex items-start justify-between",children:[C,h]}),e[14]=h,e[15]=C,e[16]=b):b=e[16];let v;e[17]!==t.title?(v=x.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[17]=t.title,e[18]=v):v=e[18];let P;e[19]!==t.description||e[20]!==N?(P=t.description||N("connections.connectionCard.noDescription"),e[19]=t.description,e[20]=N,e[21]=P):P=e[21];let M;e[22]!==P?(M=x.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:P}),e[22]=P,e[23]=M):M=e[23];let R;e[24]!==v||e[25]!==M?(R=x.jsxs("div",{className:"flex flex-col gap-1",children:[v,M]}),e[24]=v,e[25]=M,e[26]=R):R=e[26];let j;e[27]!==b||e[28]!==R?(j=x.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[b,R]}),e[27]=b,e[28]=R,e[29]=j):j=e[29];let w;e[30]!==r?(w=r&&x.jsx("div",{className:"border-t border-border mt-auto",children:x.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:oe,children:r})}),e[30]=r,e[31]=w):w=e[31];let T;e[32]!==j||e[33]!==w?(T=x.jsxs("div",{className:"flex flex-col flex-1",children:[j,w]}),e[32]=j,e[33]=w,e[34]=T):T=e[34];let _;return e[35]!==o||e[36]!==T||e[37]!==l||e[38]!==c||e[39]!==m||e[40]!==i||e[41]!==y?(_=x.jsx(G,{className:l,onClick:o,role:c,tabIndex:m,"aria-pressed":i,onKeyDown:y,children:T}),e[35]=o,e[36]=T,e[37]=l,e[38]=c,e[39]=m,e[40]=i,e[41]=y,e[42]=_):_=e[42],_}function oe(s){return s.stopPropagation()}function ne(s){return s.stopPropagation()}export{xe as C,ye as a,he as g,ge as u};
1
+ import{c as $,M as K,x as k,a0 as F,K as H,b as q,l as A,j as x,eC as G}from"./index-Dc7hzqoi.js";import{u as U}from"./use-registry-connections-SLFMHpqj.js";import{e as V}from"./use-organization-settings-CKbX2SdA.js";import{u as X}from"./useInfiniteQuery-CspLjV7h.js";import{c as Y}from"./use-mcp-client-e_hCatGm.js";import{i as z,f as B}from"./extract-connection-data-Dbm_cKaX.js";import{r as W,R as Z}from"./retry-i8LvYSZg.js";import{g as S}from"./connection-slug-CITJ0kGN.js";import{I as J}from"./integration-icon-BeEdjsn9.js";function ge(){const s=$.c(6),e=U(),t=V(),o=K().project.enabledPlugins??[];let n;if(s[0]!==o||s[1]!==t||s[2]!==e){let a;s[4]!==t?(a=r=>t(r.id),s[4]=t,s[5]=a):a=s[5],n=e.filter(a).map(O),o.includes("private-registry")&&t(k)&&n.push({id:k,title:"Private Registry",icon:null}),s[0]=o,s[1]=t,s[2]=e,s[3]=n}else n=s[3];return n}function O(s){return{id:s.id,title:s.title,icon:s.icon}}const ee=24,L=3;function Q(s){return s.id.includes("community-registry")}function te(s){const e=s?.trim().split(/\s+/).filter(Boolean)??[];if(e.length===0)return;const t=[["title"],["description"],["name"],["server","title"]];return{operator:"or",conditions:e.flatMap(o=>t.map(n=>({field:n,operator:"contains",value:o})))}}function D(s,e,t,o,n){const a=s.map(l=>l.id).sort().join(","),r=te(n),{data:p,fetchNextPage:f,hasNextPage:d,isFetchingNextPage:g,isLoading:N}=X({queryKey:H.storeDiscovery(e,`${a}:${n??""}`),queryFn:async({pageParam:l})=>{const c=l??{};return await Promise.all(s.map(async i=>{const y=c[i.id];if(y==="EXHAUSTED")return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]};const C=z(i.id,e);try{return await W(async()=>{let u=null;try{u=await Y({connectionId:i.id,orgId:e,orgSlug:t});const h={limit:ee};y&&(h.cursor=y),r&&(h.where=r);const b=await u.callTool({name:C,arguments:h}),v=b.structuredContent??b,P=v.nextCursor||v.cursor||void 0,M=B(v?[v]:[]);return{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:M,nextCursor:P}}finally{await u?.close().catch(()=>{})}},{maxAttempts:L,minTimeout:0,maxTimeout:1e3,jitter:0})}catch(u){return console.warn(`[useMergedStoreDiscovery] Registry "${i.title}" (${i.id}) failed after ${L} attempts:`,u instanceof Z?u.cause:u),{registryId:i.id,registryTitle:i.title,registryIcon:i.icon,items:[]}}}))},initialPageParam:{},getNextPageParam:l=>{const c={};let m=!1;for(const i of l)i.registryId&&(i.nextCursor?(c[i.registryId]=i.nextCursor,m=!0):c[i.registryId]="EXHAUSTED");return m?c:void 0},staleTime:3600*1e3,placeholderData:F,retry:!1,enabled:s.length>0}),I=[];if(p?.pages)for(const l of p.pages)for(const c of l)for(const m of c.items)I.push({...m,_sourceName:m._sourceName??c.registryTitle,_sourceIcon:m._sourceIcon??c.registryIcon,_registryId:m._registryId??c.registryId});return{items:I,hasMore:d??!1,isLoadingMore:g,isInitialLoading:N,fetchNextPage:()=>{d&&!g&&f()}}}function ye(s,e){const t=$.c(16),{org:o}=K();let n;t[0]!==s?(n=s.filter(ie),t[0]=s,t[1]=n):n=t[1];const a=n;let r;t[2]!==s?(r=s.filter(se),t[2]=s,t[3]=r):r=t[3];const p=r,f=D(a,o.id,o.slug,!0,e),d=D(p,o.id,o.slug,!0,e);let g;if(t[4]!==d.items||t[5]!==f.items){const y=new Set;g=[];const C=[...f.items,...d.items];for(const u of C){const h=`${u._registryId}:${u.id}`;y.has(h)||(y.add(h),g.push(u))}t[4]=d.items,t[5]=f.items,t[6]=g}else g=t[6];const N=f.isInitialLoading||d.isInitialLoading,I=f.isLoadingMore||d.isLoadingMore,l=f.hasMore||d.hasMore;let c;t[7]!==d||t[8]!==f?(c=()=>{f.hasMore&&f.fetchNextPage(),d.hasMore&&d.fetchNextPage()},t[7]=d,t[8]=f,t[9]=c):c=t[9];const m=c;let i;return t[10]!==l||t[11]!==N||t[12]!==I||t[13]!==g||t[14]!==m?(i={items:g,hasMore:l,isLoadingMore:I,isInitialLoading:N,loadMore:m},t[10]=l,t[11]=N,t[12]=I,t[13]=g,t[14]=m,t[15]=i):i=t[15],i}function se(s){return Q(s)}function ie(s){return!Q(s)}function he(s){const e=new Map;for(const n of s){const a=S(n),r=e.get(a);r?r.push(n):e.set(a,[n])}const t=[],o=new Set;for(const n of s){const a=S(n);if(o.has(a))continue;o.add(a);const r=e.get(a),p=r[0];r.length===1?t.push({type:"single",connection:p}):t.push({type:"group",key:a,icon:p.icon,title:p.app_name?p.title.replace(/\s*\(\d+\)\s*$/,""):p.title,connections:r})}return t}function xe(s){const e=$.c(43),{connection:t,onClick:o,headerActions:n,headerActionsAlwaysVisible:a,footer:r,className:p,fallbackIcon:f,selected:d}=s,g=a===void 0?!1:a,N=q(),I=o&&"cursor-pointer hover:bg-muted/50";let l;e[0]!==p||e[1]!==I?(l=A("transition-colors group overflow-hidden flex flex-col h-full",I,p),e[0]=p,e[1]=I,e[2]=l):l=e[2];const c=o?"button":void 0,m=o?0:void 0,i=o&&d!==void 0?d:void 0;let y;e[3]!==o?(y=o?E=>{E.target===E.currentTarget&&(E.key==="Enter"||E.key===" ")&&(E.preventDefault(),o())}:void 0,e[3]=o,e[4]=y):y=e[4];let C;e[5]!==t.icon||e[6]!==t.title||e[7]!==f?(C=x.jsx(J,{icon:t.icon,name:t.title,size:"sm",className:"shrink-0 shadow-sm",fallbackIcon:f}),e[5]=t.icon,e[6]=t.title,e[7]=f,e[8]=C):C=e[8];let u;e[9]!==n||e[10]!==g?(u=n&&x.jsx("div",{className:A("transition-opacity",!g&&"sm:opacity-0 sm:group-hover:opacity-100 sm:group-focus-within:opacity-100"),onClick:ne,children:n}),e[9]=n,e[10]=g,e[11]=u):u=e[11];let h;e[12]!==u?(h=x.jsx("div",{className:"relative",children:u}),e[12]=u,e[13]=h):h=e[13];let b;e[14]!==h||e[15]!==C?(b=x.jsxs("div",{className:"flex items-start justify-between",children:[C,h]}),e[14]=h,e[15]=C,e[16]=b):b=e[16];let v;e[17]!==t.title?(v=x.jsx("h3",{className:"text-sm font-medium text-foreground truncate",children:t.title}),e[17]=t.title,e[18]=v):v=e[18];let P;e[19]!==t.description||e[20]!==N?(P=t.description||N("connections.connectionCard.noDescription"),e[19]=t.description,e[20]=N,e[21]=P):P=e[21];let M;e[22]!==P?(M=x.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:P}),e[22]=P,e[23]=M):M=e[23];let R;e[24]!==v||e[25]!==M?(R=x.jsxs("div",{className:"flex flex-col gap-1",children:[v,M]}),e[24]=v,e[25]=M,e[26]=R):R=e[26];let j;e[27]!==b||e[28]!==R?(j=x.jsxs("div",{className:"flex flex-col gap-3 p-4.5",children:[b,R]}),e[27]=b,e[28]=R,e[29]=j):j=e[29];let w;e[30]!==r?(w=r&&x.jsx("div",{className:"border-t border-border mt-auto",children:x.jsx("div",{className:"h-14 flex items-center p-4.5",onClick:oe,children:r})}),e[30]=r,e[31]=w):w=e[31];let T;e[32]!==j||e[33]!==w?(T=x.jsxs("div",{className:"flex flex-col flex-1",children:[j,w]}),e[32]=j,e[33]=w,e[34]=T):T=e[34];let _;return e[35]!==o||e[36]!==T||e[37]!==l||e[38]!==c||e[39]!==m||e[40]!==i||e[41]!==y?(_=x.jsx(G,{className:l,onClick:o,role:c,tabIndex:m,"aria-pressed":i,onKeyDown:y,children:T}),e[35]=o,e[36]=T,e[37]=l,e[38]=c,e[39]=m,e[40]=i,e[41]=y,e[42]=_):_=e[42],_}function oe(s){return s.stopPropagation()}function ne(s){return s.stopPropagation()}export{xe as C,ye as a,he as g,ge as u};
@@ -1 +1 @@
1
- import{aa as ve,br as $e,bt as Oe,ab as me,bq as Me,c as U,b as L,j as t,h as Ne,B as q,r as Z,l as Se,M as se,_ as ze,z as ue,K as te,d as ne,eC as Ee,eW as xe,H as Re,E as Ue,f as Fe,f4 as Ve,n as Le,ad as Be,ac as qe,t as Y}from"./index-z4bKt11m.js";import{g as Ge}from"./extract-connection-data-CM8c_Wvw.js";import{E as ye}from"./empty-state-BIcQyeij.js";import{E as He,c as Ke,r as Qe,b as We,d as Xe}from"./connection-form-helpers-Ms_1nBbP.js";import{c as Je,S as Ye,D as Ze}from"./index-NrvdR10n.js";import{u as Ce,T as et}from"./use-mcp-auth-status-DvQCYJw0.js";import{a as tt}from"./use-members-H3oi0qPu.js";import{A as st}from"./avatar-Duu5Gg02.js";import{a as _e,b as we,u as nt}from"./use-connection-CPQUKm0a.js";import{u as Ie}from"./use-mcp-client-B1u2B39v.js";import{u as it}from"./use-mcp-tools-Ch_j97A3.js";import{a as ot}from"./use-mcp-prompts-DxT8Kz-M.js";import{i as at,a as rt}from"./mcp-oauth-DiqQlKOx.js";import{I as re}from"./integration-icon-DOHTaQ6D.js";import{s as lt}from"./Plus-D2HOi_DD.js";import{aZ as ct,af as dt,J as mt,ba as ut,h as ie}from"./agent-icon-BD4DM2Lv.js";import{a as ke,s as xt}from"./Settings02-CFcKewXh.js";import{s as ce}from"./Trash01-C6bziN5X.js";import{b as pt,a as ft,c as ht,S as gt,d as jt}from"./sheet-DhNzwMUj.js";import{F as K,b as Q,c as W,d as B,f as X,e as bt,a as vt}from"./form-B7dtslOD.js";import{I as J}from"./input-C7XH8Uj_.js";import{u as Nt,D as St}from"./use-delete-connection-kqt66yqS.js";import{c as yt,B as Ct,a as _t,C as wt}from"./monitoring-stats-row-2QEp_Jld.js";import{b as It,c as kt,d as Tt}from"./chart-Con9xnVz.js";import{b as At}from"./use-virtual-mcp-Bq1RMGPF.js";import{i as Te}from"./ChevronRight-DNrwFBnC.js";import{b as Ae}from"./Users03-BP-0DNhp.js";import{T as oe,a as Dt,c as ae,b as Pt}from"./tabs-Co2GUrNY.js";import{g as De}from"./connection-slug-CITJ0kGN.js";import{c as $t}from"./Tool01-DHi_Z7zo.js";import{g as de}from"./types-Bh4jNqv3.js";import{M as Ot}from"./mcp-app-renderer-DjwQ0S-h.js";import{C as Mt}from"./collection-search-CeA9TK20.js";import{B as zt}from"./badge-BNBGXxmC.js";import{c as Et,D as Rt,b as Ut,a as pe}from"./dropdown-menu-Dd8nakK9.js";import{S as fe,b as he,a as ge,d as je,c as H}from"./select-cIekAVlM.js";import{i as Ft}from"./CheckCircle-BKb1RVrA.js";import{t as Vt}from"./ChevronUp-D5_IWEtB.js";import{n as Lt}from"./Tool02-JY0gm8cg.js";import{a as Bt}from"./UserSquare-qgzToKNd.js";import{s as qt}from"./XClose-Cvyz3reC.js";import{p as Gt,i as Ht}from"./connection-BfiO32wM.js";import"./metadata-dUsYcpuu.js";import"./github-D4UJ99TO.js";import"./sidebar-BCim0GYP.js";import"./Printer-BpZBiqyG.js";import"./use-mobile-CV7f0Wqe.js";import"./tooltip-BuKeolDX.js";import"./index-B46P4HkV.js";import"./index-G9Ugx8pT.js";import"./Key01-mqjfsZRe.js";import"./auth-D-2jYpOE.js";import"./use-registry-connections-D_a0MIjQ.js";import"./use-organization-settings-C-XY0Wze.js";import"./schema-D0xfowSf.js";import"./task-board-lQZGfEfb.js";import"./index-D68Q2TT2.js";import"./index-KOGfrBZR.js";import"./index-BwuwoN1w.js";import"./index-Cyoz5tz5.js";import"./popover-CsEsUqbZ.js";import"./Check-BZE0WrNL.js";import"./SearchMd-FDCJM3CR.js";import"./use-create-virtual-mcp-BRT9hKZ3.js";import"./use-navigate-to-agent-BMSyO1iB.js";import"./hooks-CkL4R3Tj.js";import"./backoff-8mStPHYB.js";import"./thread-intent-9fI0jPLV.js";import"./slugify-CEUa2lfQ.js";import"./github-repo-BknN0SVI.js";import"./Eye-DXUjft5i.js";import"./use-org-auth-client-ZxEGrzhh.js";import"./User01-BbOpA84p.js";import"./AlertCircle-DbwtWnTP.js";import"./ArrowUp-Scf6R8DX.js";import"./ArrowLeft-CyH6aWpS.js";import"./ArrowRight-Bv0iX4wy.js";import"./TrendUp01-Bkdgpfn7.js";import"./ZoomOut-BRjMa-04.js";import"./ChevronSelectorVertical-oXn0cTzk.js";import"./DotsVertical-DE9eZKrJ.js";import"./Copy01-DTHuBaTA.js";import"./CreditCard01-CwX6pA0M.js";import"./Database01-RGlwXHSd.js";import"./MessageCircle01-CgotMmLL.js";import"./Download01-qX3hmvr5.js";import"./File02-g-xJPix_.js";import"./Share07-CxuHcmnM.js";import"./GitBranch01-ddoPQdPH.js";import"./Globe01-DIy8wXF6.js";import"./SwitchHorizontal01-hHr6GOmU.js";import"./HardDrive-DU_z1AQw.js";import"./Image01-DfaxHjlV.js";import"./Link01-C656VtHx.js";import"./LinkExternal01-BkRUjBAn.js";import"./Monitor01-CQ6Zk1oP.js";import"./Sun-SBoG-e9B.js";import"./Package-t6euxYcP.js";import"./Palette-oECS8j3l.js";import"./Play-DQgzDnaW.js";import"./SearchLg-DbX4T5E-.js";import"./Shield01-HrKG6yUn.js";import"./Stars01-B_nM3FYf.js";import"./Upload01-DC2spim9.js";import"./Users01-BOsDT0Jv.js";import"./XCircle-CuK2q_XU.js";import"./X-Bzh3NI3m.js";import"./Zap-DXNovEva.js";import"./label-8juC5J-g.js";import"./alert-dialog-Bi9Cy1y8.js";import"./CartesianChart-D1MxLL7k.js";import"./AreaChart-tdrxZdfF.js";import"./ErrorBarContext-9sp0Dc4M.js";import"./Sector-BW9tyobX.js";const Kt=ve({scopes:Me(me()).describe("List of scopes available"),stateSchema:$e(me(),Oe()).describe("JSON Schema (draft-07) defining the state structure")}),Qt=[{name:"MCP_CONFIGURATION",inputSchema:ve({}),outputSchema:Kt}];function Wt(s){const e=U.c(61),{instance:n,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:r}=s,a=L();let d;e[0]!==n.id?(d={connectionId:n.id},e[0]=n.id,e[1]=d):d=e[1];const p=Ce(d),l=!(n.connection_type==="VIRTUAL")&&p.supportsOAuth&&!p.isAuthenticated,f=n.status!=="active",u=l||f?"border-destructive/50 bg-destructive/5":"border-transparent";let h;e[2]!==u?(h=Se("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",u),e[2]=u,e[3]=h):h=e[3];let g;e[4]!==n.icon||e[5]!==n.title?(g=t.jsx(re,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[4]=n.icon,e[5]=n.title,e[6]=g):g=e[6];let j;e[7]!==n.title?(j=t.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[7]=n.title,e[8]=j):j=e[8];let S;e[9]!==n.status||e[10]!==f||e[11]!==l||e[12]!==a?(S=l?t.jsx("span",{className:"text-xs text-destructive font-medium",children:a("details.connectionInstancesPanel.needsAuthorization")}):f?t.jsx("span",{className:"text-xs text-destructive font-medium",children:n.status==="error"?a("details.connectionInstancesPanel.disabledError"):a("details.connectionInstancesPanel.disabled")}):null,e[9]=n.status,e[10]=f,e[11]=l,e[12]=a,e[13]=S):S=e[13];let v;e[14]!==j||e[15]!==S?(v=t.jsxs("div",{className:"flex-1 min-w-0",children:[j,S]}),e[14]=j,e[15]=S,e[16]=v):v=e[16];let y;e[17]!==n||e[18]!==l||e[19]!==o||e[20]!==a?(y=l&&t.jsx(q,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>o(n),children:a("details.connectionInstancesPanel.authorize")}),e[17]=n,e[18]=l,e[19]=o,e[20]=a,e[21]=y):y=e[21];let D;e[22]!==n||e[23]!==f||e[24]!==r||e[25]!==a?(D=f?t.jsxs(q,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>r(n,"active"),children:[t.jsx(ct,{size:13}),a("details.connectionInstancesPanel.enable")]}):t.jsx(q,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>r(n,"inactive"),title:a("details.connectionInstancesPanel.disable"),"aria-label":a("details.connectionInstancesPanel.disable"),children:t.jsx(dt,{size:13})}),e[22]=n,e[23]=f,e[24]=r,e[25]=a,e[26]=D):D=e[26];let P;e[27]!==n||e[28]!==c?(P=()=>c(n),e[27]=n,e[28]=c,e[29]=P):P=e[29];let _;e[30]!==a?(_=a("details.connectionInstancesPanel.configure"),e[30]=a,e[31]=_):_=e[31];let M;e[32]!==a?(M=a("details.connectionInstancesPanel.configure"),e[32]=a,e[33]=M):M=e[33];let T;e[34]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(ke,{size:13}),e[34]=T):T=e[34];let $;e[35]!==P||e[36]!==_||e[37]!==M?($=t.jsx(q,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:P,title:_,"aria-label":M,children:T}),e[35]=P,e[36]=_,e[37]=M,e[38]=$):$=e[38];let k;e[39]!==n||e[40]!==i?(k=()=>i(n),e[39]=n,e[40]=i,e[41]=k):k=e[41];let N;e[42]!==a?(N=a("details.connectionInstancesPanel.delete"),e[42]=a,e[43]=N):N=e[43];let b;e[44]!==a?(b=a("details.connectionInstancesPanel.delete"),e[44]=a,e[45]=b):b=e[45];let E;e[46]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(ce,{size:13}),e[46]=E):E=e[46];let z;e[47]!==k||e[48]!==N||e[49]!==b?(z=t.jsx(q,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:k,title:N,"aria-label":b,children:E}),e[47]=k,e[48]=N,e[49]=b,e[50]=z):z=e[50];let I;e[51]!==$||e[52]!==z||e[53]!==y||e[54]!==D?(I=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[y,D,$,z]}),e[51]=$,e[52]=z,e[53]=y,e[54]=D,e[55]=I):I=e[55];let A;return e[56]!==I||e[57]!==h||e[58]!==g||e[59]!==v?(A=t.jsxs("div",{className:h,children:[g,v,I]}),e[56]=I,e[57]=h,e[58]=g,e[59]=v,e[60]=A):A=e[60],A}function Xt(s){const e=U.c(21),{instance:n,onConfigure:c}=s,o=L();let i;e[0]!==n.icon||e[1]!==n.title?(i=t.jsx(re,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[0]=n.icon,e[1]=n.title,e[2]=i):i=e[2];let r;e[3]!==n.title?(r=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium truncate",children:n.title})}),e[3]=n.title,e[4]=r):r=e[4];let a;e[5]!==n||e[6]!==c?(a=()=>c(n),e[5]=n,e[6]=c,e[7]=a):a=e[7];let d;e[8]!==o?(d=o("details.connectionInstancesPanel.configure"),e[8]=o,e[9]=d):d=e[9];let p;e[10]!==o?(p=o("details.connectionInstancesPanel.configure"),e[10]=o,e[11]=p):p=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(ke,{size:13}),e[12]=m):m=e[12];let l;e[13]!==a||e[14]!==d||e[15]!==p?(l=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(q,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:a,title:d,"aria-label":p,children:m})}),e[13]=a,e[14]=d,e[15]=p,e[16]=l):l=e[16];let f;return e[17]!==i||e[18]!==r||e[19]!==l?(f=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[i,r,l]}),e[17]=i,e[18]=r,e[19]=l,e[20]=f):f=e[20],f}function Jt(s){const e=U.c(33),{instances:n,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:r,onAdd:a,isAdding:d}=s,p=L();if(n.length===0)return null;let m;e[0]!==n.length||e[1]!==p?(m=n.length===1?p("details.connectionInstancesPanel.instance"):p("details.connectionInstancesPanel.instances"),e[0]=n.length,e[1]=p,e[2]=m):m=e[2];let l;e[3]!==m?(l=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:m}),e[3]=m,e[4]=l):l=e[4];let f;e[5]!==d?(f=d?t.jsx(Ne,{className:"size-[13px]"}):t.jsx(lt,{size:13}),e[5]=d,e[6]=f):f=e[6];let u;e[7]!==p?(u=p("details.connectionInstancesPanel.addInstance"),e[7]=p,e[8]=u):u=e[8];let h;e[9]!==d||e[10]!==a||e[11]!==f||e[12]!==u?(h=t.jsxs(q,{variant:"default",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:a,disabled:d,children:[f,u]}),e[9]=d,e[10]=a,e[11]=f,e[12]=u,e[13]=h):h=e[13];let g;e[14]!==l||e[15]!==h?(g=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[l,h]}),e[14]=l,e[15]=h,e[16]=g):g=e[16];let j;if(e[17]!==n||e[18]!==o||e[19]!==c||e[20]!==i||e[21]!==r){let y;e[23]!==o||e[24]!==c||e[25]!==i||e[26]!==r?(y=D=>t.jsx(Z.Suspense,{fallback:t.jsx(Xt,{instance:D,onConfigure:c}),children:t.jsx(Wt,{instance:D,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:r})},D.id),e[23]=o,e[24]=c,e[25]=i,e[26]=r,e[27]=y):y=e[27],j=n.map(y),e[17]=n,e[18]=o,e[19]=c,e[20]=i,e[21]=r,e[22]=j}else j=e[22];let S;e[28]!==j?(S=t.jsx("div",{className:"p-2 flex flex-col gap-1",children:j}),e[28]=j,e[29]=S):S=e[29];let v;return e[30]!==g||e[31]!==S?(v=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[g,S]}),e[30]=g,e[31]=S,e[32]=v):v=e[32],v}function Yt(s,e=3){const n=new Map;for(const c of s){if(!c.isError)continue;const o=(c.errorMessage??"").trim()||"Unknown error";n.set(o,(n.get(o)??0)+1)}return[...n.entries()].map(([c,o])=>({message:c,count:o})).sort((c,o)=>o.count-c.count).slice(0,e)}const Zt=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function es(s){const e=new Date,n=new Date(e);return s==="7d"?n.setDate(n.getDate()-7):s==="14d"?n.setDate(n.getDate()-14):n.setDate(n.getDate()-30),{startDate:n,endDate:e}}const ts={calls:{label:"Tool calls"},errors:{label:"Errors"}};function ss(s){const e=U.c(4),{connectionId:n,orgId:c,timeframe:o}=s,i=L(),r=ze(),a=es(o),{data:d}=ue({queryKey:te.connectionActivity(n,o,c),queryFn:async()=>await r.call("MONITORING_LOGS_LIST",{startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}),staleTime:3e5}),{data:p}=ue({queryKey:te.connectionActivityErrors(n,o,c),queryFn:async()=>await r.call("MONITORING_LOGS_LIST",{startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:n,isError:!0,limit:1,offset:0}),staleTime:3e5}),m=yt(d?.logs??[],a,void 0,d?.total,p?.total),l=m.data,f=m.totalCalls>0,u=Yt(d?.logs??[]),h=m.totalCalls>0?Math.round(m.totalErrors/m.totalCalls*100):0;let g;e[0]!==i?(g=i("details.connectionActivity.toolCalls"),e[0]=i,e[1]=g):g=e[1];let j;return e[2]!==g?(j=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:g}),e[2]=g,e[3]=j):j=e[3],t.jsxs("div",{children:[t.jsxs("div",{className:"flex gap-6 px-5 pb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:m.totalCalls.toLocaleString()}),j]}),m.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:m.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.errors")})]}),m.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(m.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.avgLatency")})]})]}),f?t.jsxs("div",{children:[t.jsx(It,{config:ts,className:"h-16 w-full",children:t.jsxs(Ct,{data:l,barCategoryGap:"4%",children:[t.jsx(kt,{content:t.jsx(Tt,{labelFormatter:os}),cursor:{fill:"var(--muted)"}}),t.jsx(_t,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:l.map(is)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-[10px] text-muted-foreground",children:l[0]?.label}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:l[l.length-1]?.label})]})]}):t.jsx("div",{className:"h-20 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-muted-foreground/60",children:i("details.connectionActivity.noActivityInThisPeriod")})}),u.length>0&&t.jsxs("div",{className:"px-5 py-4 border-t border-border",children:[t.jsxs("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:[i("details.connectionActivity.topErrors"),h>0?` · ${i("details.connectionActivity.errorRatePercentage",{errorRate:h.toString()})}`:""]}),t.jsx("ul",{className:"space-y-1.5",children:u.map(ns)})]})]})}function ns(s){return t.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[t.jsxs("span",{className:"tabular-nums text-destructive font-medium shrink-0",children:[s.count.toLocaleString(),"×"]}),t.jsx("span",{className:"text-muted-foreground truncate",title:s.message,children:s.message})]},s.message)}function is(s,e){return t.jsx(wt,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function os(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function as(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{children:[t.jsx("div",{className:"flex gap-6 px-5 pb-4",children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("div",{className:"h-7 w-16 rounded-md bg-muted animate-pulse"}),t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})]})}),t.jsx("div",{className:"h-20 w-full rounded-md bg-muted animate-pulse"})]}),s[0]=e):e=s[0],e}function rs(s){const e=U.c(22),{connectionId:n}=s,c=L(),[o,i]=Z.useState("14d"),{org:r}=se();let a;e[0]!==c?(a=c("details.connectionActivity.activity"),e[0]=c,e[1]=a):a=e[1];let d;e[2]!==a?(d=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:a})}),e[2]=a,e[3]=d):d=e[3];let p;e[4]!==c?(p=c("details.connectionActivity.timeframe"),e[4]=c,e[5]=p):p=e[5];let m;e[6]!==o?(m=Zt.map(j=>t.jsx("button",{type:"button","aria-pressed":o===j.value,onClick:()=>i(j.value),className:Se("px-2.5 py-1 text-xs font-medium rounded-md transition-colors",o===j.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:j.label},j.value)),e[6]=o,e[7]=m):m=e[7];let l;e[8]!==p||e[9]!==m?(l=t.jsx("div",{role:"group","aria-label":p,className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:m}),e[8]=p,e[9]=m,e[10]=l):l=e[10];let f;e[11]!==d||e[12]!==l?(f=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[d,l]}),e[11]=d,e[12]=l,e[13]=f):f=e[13];let u;e[14]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(as,{}),e[14]=u):u=e[14];let h;e[15]!==n||e[16]!==r.id||e[17]!==o?(h=t.jsx(Z.Suspense,{fallback:u,children:t.jsx(ss,{connectionId:n,orgId:r.id,timeframe:o})}),e[15]=n,e[16]=r.id,e[17]=o,e[18]=h):h=e[18];let g;return e[19]!==f||e[20]!==h?(g=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[f,h]}),e[19]=f,e[20]=h,e[21]=g):g=e[21],g}function ls(s){const e=U.c(15),{virtualMcp:n,org:c}=s,o=ne();let i;e[0]!==o||e[1]!==c||e[2]!==n.id?(i=()=>{const l=crypto.randomUUID();o({to:"/$org/projects/$agentId",params:{org:c,agentId:n.id},search:{thread:l}})},e[0]=o,e[1]=c,e[2]=n.id,e[3]=i):i=e[3];let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Ae,{size:16}),e[4]=r):r=e[4];let a;e[5]!==n.icon||e[6]!==n.title?(a=t.jsx(re,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:r}),e[5]=n.icon,e[6]=n.title,e[7]=a):a=e[7];let d;e[8]!==n.title?(d=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=d):d=e[9];let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(Te,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[10]=p):p=e[10];let m;return e[11]!==i||e[12]!==a||e[13]!==d?(m=t.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-3 rounded-lg hover:bg-muted/50 transition-colors group text-left w-full",children:[a,d,p]}),e[11]=i,e[12]=a,e[13]=d,e[14]=m):m=e[14],m}function cs(s){const e=U.c(7),{virtualMcps:n,org:c}=s;let o;if(e[0]!==c||e[1]!==n){let r;e[3]!==c?(r=a=>t.jsx(ls,{virtualMcp:a,org:c},a.id),e[3]=c,e[4]=r):r=e[4],o=n.map(r),e[0]=c,e[1]=n,e[2]=o}else o=e[2];let i;return e[5]!==o?(i=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:o})}),e[5]=o,e[6]=i):i=e[6],i}function ds(s){const e=U.c(13),{connection:n}=s,c=L(),{org:o}=se();let i;e[0]!==n.id?(i={filters:[{column:"connection_id",value:n.id}]},e[0]=n.id,e[1]=i):i=e[1];const r=At(i);if(!(r.length>0)){let f;return e[2]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(t.Fragment,{}),e[2]=f):f=e[2],f}let d;e[3]!==c?(d=c("details.connectionAgentsPanel.usedByAgents"),e[3]=c,e[4]=d):d=e[4];let p;e[5]!==d?(p=t.jsx("div",{className:"px-5 py-4 border-b border-border",children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:d})}),e[5]=d,e[6]=p):p=e[6];let m;e[7]!==o.slug||e[8]!==r?(m=t.jsx("div",{className:"px-5 py-4",children:t.jsx(cs,{virtualMcps:r,org:o.slug})}),e[7]=o.slug,e[8]=r,e[9]=m):m=e[9];let l;return e[10]!==p||e[11]!==m?(l=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[p,m]}),e[10]=p,e[11]=m,e[12]=l):l=e[12],l}function ms(s){const e=U.c(35),{tools:n,connectionId:c,org:o}=s,i=L(),r=ne(),{org:a}=se();let d;e[0]!==c||e[1]!==a.id||e[2]!==a.slug?(d={connectionId:c,orgId:a.id,orgSlug:a.slug},e[0]=c,e[1]=a.id,e[2]=a.slug,e[3]=d):d=e[3];const p=Ie(d),m=_e(c);let l;e[4]!==m||e[5]!==c?(l=m?De(m):c,e[4]=m,e[5]=c,e[6]=l):l=e[6];const f=l,[u,h]=Z.useState("");let g,j,S,v;if(e[7]!==f||e[8]!==p||e[9]!==r||e[10]!==o||e[11]!==u||e[12]!==i||e[13]!==n){const P=(n??[]).filter(us),_=u.toLowerCase().trim(),M=_?P.filter(b=>b.name.toLowerCase().includes(_)||b.description&&b.description.toLowerCase().includes(_)):P;let T;e[18]!==f||e[19]!==r||e[20]!==o?(T=b=>{r({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:o,appSlug:f,collectionName:"tools",itemId:encodeURIComponent(b.name)}})},e[18]=f,e[19]=r,e[20]=o,e[21]=T):T=e[21];const $=T;S="flex flex-col h-full overflow-hidden";let k;e[22]!==i?(k=i("details.connectionUiTab.searchAppsPlaceholder"),e[22]=i,e[23]=k):k=e[23];let N;e[24]===Symbol.for("react.memo_cache_sentinel")?(N=b=>{b.key==="Escape"&&(h(""),b.target.blur())},e[24]=N):N=e[24],e[25]!==u||e[26]!==k?(v=t.jsx(Mt,{value:u,onChange:h,placeholder:k,onKeyDown:N}),e[25]=u,e[26]=k,e[27]=v):v=e[27],g="flex-1 overflow-auto p-5",j=M.length===0?t.jsx(ye,{image:null,title:i(u?"details.connectionUiTab.noAppsFound":"details.connectionUiTab.noAppsAvailable"),description:i(u?"details.connectionUiTab.adjustSearchTerms":"details.connectionUiTab.noInteractiveUis")}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:M.map(b=>{const E=de(b._meta);return t.jsxs(Ee,{className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>$(b),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(Ot,{resourceURI:E,toolInfo:{tool:b},displayMode:"inline",minHeight:200,maxHeight:200,client:p})}),t.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:b.annotations?.title??b.name}),t.jsx(et,{annotations:b.annotations,_meta:b._meta})]}),b.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:b.description})]})]},b.name)})}),e[7]=f,e[8]=p,e[9]=r,e[10]=o,e[11]=u,e[12]=i,e[13]=n,e[14]=g,e[15]=j,e[16]=S,e[17]=v}else g=e[14],j=e[15],S=e[16],v=e[17];let y;e[28]!==g||e[29]!==j?(y=t.jsx("div",{className:g,children:j}),e[28]=g,e[29]=j,e[30]=y):y=e[30];let D;return e[31]!==S||e[32]!==v||e[33]!==y?(D=t.jsxs("div",{className:S,children:[v,y]}),e[31]=S,e[32]=v,e[33]=y,e[34]=D):D=e[34],D}function us(s){return!!de(s._meta)}function Pe(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=r=>r.charAt(0).toUpperCase()+r.slice(1),c=new Set(["list","create","get","update","delete","fetch","search","run","trigger","review","send","check"]),o=e.map(n),i=e[e.length-1];return o.length>=2&&i&&c.has(i)?[o.pop(),...o].join(" "):o.join(" ")}function le(s){const e=U.c(5),{label:n}=s,c=L();let o;e[0]!==n||e[1]!==c?(o=c("details.connectionCapabilities.noItemsAvailable",{item:n}),e[0]=n,e[1]=c,e[2]=o):o=e[2];let i;return e[3]!==o?(i=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:o})}),e[3]=o,e[4]=i):i=e[4],i}function xs(s){const e=U.c(72),{tools:n,prompts:c,resources:o,connectionId:i,org:r}=s;let a;e[0]!==c?(a=c===void 0?[]:c,e[0]=c,e[1]=a):a=e[1];const d=a;let p;e[2]!==o?(p=o===void 0?[]:o,e[2]=o,e[3]=p):p=e[3];const m=p,l=L(),f=ne(),u=_e(i??"");let h;e[4]!==u||e[5]!==i?(h=u?De(u):i,e[4]=u,e[5]=i,e[6]=h):h=e[6];const g=h;let j;e[7]!==g||e[8]!==i||e[9]!==f||e[10]!==r?(j=function(F){!i||!r||f({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:r,appSlug:g,collectionName:"tools",itemId:encodeURIComponent(F)}})},e[7]=g,e[8]=i,e[9]=f,e[10]=r,e[11]=j):j=e[11];const S=j;let v;e[12]!==i||e[13]!==r||e[14]!==n?(v=i&&r&&n.some(hs),e[12]=i,e[13]=r,e[14]=n,e[15]=v):v=e[15];const y=v;if(n.length+d.length+m.length===0){let C;e[16]!==l?(C=l("details.connectionCapabilities.capabilities"),e[16]=l,e[17]=C):C=e[17];let F;e[18]!==C?(F=t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:C}),e[18]=C,e[19]=F):F=e[19];let G;e[20]!==l?(G=l("details.connectionCapabilities.noCapabilitiesDiscovered"),e[20]=l,e[21]=G):G=e[21];let V;e[22]!==G?(V=t.jsx("p",{className:"text-sm text-muted-foreground",children:G}),e[22]=G,e[23]=V):V=e[23];let ee;return e[24]!==V||e[25]!==F?(ee=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[F,V]}),e[24]=V,e[25]=F,e[26]=ee):ee=e[26],ee}let P;e[27]!==l||e[28]!==n.length?(P=l("details.connectionCapabilities.toolsTab",{count:n.length}),e[27]=l,e[28]=n.length,e[29]=P):P=e[29];let _;e[30]!==P?(_=t.jsx(oe,{value:"tools",variant:"underline",children:P}),e[30]=P,e[31]=_):_=e[31];let M;e[32]!==y||e[33]!==l?(M=y&&t.jsx(oe,{value:"apps",variant:"underline",children:l("details.connectionCapabilities.uiTab")}),e[32]=y,e[33]=l,e[34]=M):M=e[34];let T;e[35]!==l?(T=l("details.connectionCapabilities.promptsTab"),e[35]=l,e[36]=T):T=e[36];let $;e[37]!==T?($=t.jsx(oe,{value:"prompts",variant:"underline",children:T}),e[37]=T,e[38]=$):$=e[38];let k;e[39]!==l?(k=l("details.connectionCapabilities.resourcesTab"),e[39]=l,e[40]=k):k=e[40];let N;e[41]!==k?(N=t.jsx(oe,{value:"resources",variant:"underline",children:k}),e[41]=k,e[42]=N):N=e[42];let b;e[43]!==M||e[44]!==$||e[45]!==N||e[46]!==_?(b=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs(Dt,{variant:"underline",className:"gap-1",children:[_,M,$,N]})}),e[43]=M,e[44]=$,e[45]=N,e[46]=_,e[47]=b):b=e[47];let E;e[48]!==S||e[49]!==n?(E=n.length>0?n.map(C=>t.jsxs("button",{type:"button",className:"w-full flex items-start gap-3 px-5 py-3 text-left hover:bg-muted/40 transition-colors cursor-pointer",onClick:()=>S(C.name),children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx($t,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Pe(C.name)}),C.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:C.description})]}),t.jsx(Te,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},C.name)):t.jsx(le,{label:"tools"}),e[48]=S,e[49]=n,e[50]=E):E=e[50];let z;e[51]!==E?(z=t.jsx(ae,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:E})}),e[51]=E,e[52]=z):z=e[52];let I;e[53]!==i||e[54]!==y||e[55]!==r||e[56]!==n?(I=y&&t.jsx(ae,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(ms,{tools:n,connectionId:i,org:r})}),e[53]=i,e[54]=y,e[55]=r,e[56]=n,e[57]=I):I=e[57];let A;e[58]!==d?(A=d.length>0?d.map(fs):t.jsx(le,{label:"prompts"}),e[58]=d,e[59]=A):A=e[59];let R;e[60]!==A?(R=t.jsx(ae,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:A})}),e[60]=A,e[61]=R):R=e[61];let x;e[62]!==m?(x=m.length>0?m.map(ps):t.jsx(le,{label:"resources"}),e[62]=m,e[63]=x):x=e[63];let w;e[64]!==x?(w=t.jsx(ae,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:x})}),e[64]=x,e[65]=w):w=e[65];let O;return e[66]!==b||e[67]!==z||e[68]!==I||e[69]!==R||e[70]!==w?(O=t.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:t.jsxs(Pt,{defaultValue:"tools",variant:"underline",children:[b,z,I,R,w]})}),e[66]=b,e[67]=z,e[68]=I,e[69]=R,e[70]=w,e[71]=O):O=e[71],O}function ps(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(ut,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:s.name}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description}),s.uri&&t.jsx("div",{className:"text-xs text-muted-foreground/60 font-mono mt-0.5 truncate",children:s.uri})]})]},s.uri??s.name)}function fs(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(mt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Pe(s.name)}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description})]})]},s.name)}function hs(s){return de(s._meta)}function gs(s){const e=U.c(13),{connection:n,displayTitle:c}=s,o=c??n.title;let i;e[0]!==n.icon||e[1]!==o?(i=t.jsx(re,{icon:n.icon,name:o,size:"xl",className:"shrink-0"}),e[0]=n.icon,e[1]=o,e[2]=i):i=e[2];let r;e[3]!==o?(r=t.jsx("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:t.jsx("h1",{className:"text-lg md:text-xl font-semibold tracking-tight text-foreground leading-none",children:o})}),e[3]=o,e[4]=r):r=e[4];let a;e[5]!==n.description?(a=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-2",children:n.description}),e[5]=n.description,e[6]=a):a=e[6];let d;e[7]!==r||e[8]!==a?(d=t.jsxs("div",{className:"flex-1 min-w-0",children:[r,a]}),e[7]=r,e[8]=a,e[9]=d):d=e[9];let p;return e[10]!==i||e[11]!==d?(p=t.jsxs("div",{className:"flex items-center gap-4 md:gap-6 py-5 md:py-7 px-4 md:px-8 bg-background border-b border-border shrink-0",children:[i,d]}),e[10]=i,e[11]=d,e[12]=p):p=e[12],p}function js({form:s,connection:e,hasOAuthToken:n,onReauthenticate:c,onRemoveOAuth:o}){const i=L(),r=xe({control:s.control,name:"ui_type"}),a=xe({control:s.control,name:"connection_url"}),{stdioEnabled:d}=Re(),p=(()=>{if(typeof a!="string"||!a)return!1;try{const u=new URL(a);return u.hostname==="api.githubcopilot.com"&&u.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),m=d||e.connection_type==="STDIO",l=e.connection_type==="VIRTUAL",f=l?Gt(e.connection_url):null;return l?t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.type")}),t.jsxs("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:[t.jsx(Ae,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:i("details.connectionSidebar.virtualMcp")})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.virtualMcpDescription")})]}),f&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.virtualMcpId")}),t.jsx("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:t.jsx("code",{className:"text-sm text-muted-foreground",children:f})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(K,{control:s.control,name:"ui_type",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.connection")}),r!=="NPX"&&r!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(fe,{value:u.value,onValueChange:u.onChange,children:[t.jsx(B,{children:t.jsxs(he,{className:"h-full! w-auto min-w-[90px] border-0 rounded-none bg-muted/50 focus:ring-0 focus:ring-offset-0",children:[t.jsx(ie,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(ge,{})]})}),t.jsxs(je,{children:[t.jsx(H,{value:"HTTP",children:i("details.connectionSidebar.http")}),t.jsx(H,{value:"SSE",children:i("details.connectionSidebar.sse")}),t.jsx(H,{value:"Websocket",children:i("details.connectionSidebar.websocket")}),m&&t.jsxs(t.Fragment,{children:[t.jsx(H,{value:"NPX",children:i("details.connectionSidebar.npxPackage")}),t.jsx(H,{value:"STDIO",children:i("details.connectionSidebar.customCommand")})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(K,{control:s.control,name:"connection_url",render:({field:h})=>t.jsx(Q,{className:"flex-1 min-w-0",children:t.jsx(B,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.urlPlaceholder"),...h,value:h.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(fe,{value:u.value,onValueChange:u.onChange,children:[t.jsx(B,{children:t.jsx(he,{className:"h-10",children:t.jsx(ge,{})})}),t.jsxs(je,{children:[t.jsx(H,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ie,{className:"w-4 h-4"}),i("details.connectionSidebar.http")]})}),t.jsx(H,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ie,{className:"w-4 h-4"}),i("details.connectionSidebar.sse")]})}),t.jsx(H,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ie,{className:"w-4 h-4"}),i("details.connectionSidebar.websocket")]})}),m&&t.jsxs(t.Fragment,{children:[t.jsx(H,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Lt,{className:"w-4 h-4"}),i("details.connectionSidebar.npxPackage")]})}),t.jsx(H,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Bt,{className:"w-4 h-4"}),i("details.connectionSidebar.customCommand")]})})]})]})]}),t.jsx(X,{})]})}),r==="NPX"&&t.jsx(K,{control:s.control,name:"npx_package",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.npmPackage")}),t.jsx(B,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.npmPackagePlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})}),r==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(K,{control:s.control,name:"stdio_command",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.command")}),t.jsx(B,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.commandPlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})}),t.jsx(K,{control:s.control,name:"stdio_args",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.arguments")}),t.jsx(B,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.argumentsPlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.spaceSeparatedArguments")}),t.jsx(X,{})]})})]}),t.jsx(K,{control:s.control,name:"stdio_cwd",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.workingDirectory")}),t.jsx(B,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.workingDirectoryPlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})})]}),(r==="NPX"||r==="STDIO")&&t.jsx(K,{control:s.control,name:"env_vars",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.environmentVariables")}),t.jsx(B,{children:t.jsx(He,{value:u.value??[],onChange:u.onChange})}),t.jsx(X,{})]})}),r!=="NPX"&&r!=="STDIO"&&t.jsx(K,{control:s.control,name:"connection_token",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i(p?"details.connectionSidebar.githubPersonalAccessToken":"details.connectionSidebar.token")}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(Et,{children:[t.jsx(Rt,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(zt,{variant:"success",className:"gap-1.5",children:[t.jsx(Ft,{size:12}),i("details.connectionSidebar.authenticatedViaOAuth"),t.jsx(Vt,{size:12})]})})}),t.jsxs(Ut,{align:"start",children:[t.jsxs(pe,{onClick:c,children:[t.jsx(xt,{size:16}),i("details.connectionSidebar.reauthenticate")]}),t.jsxs(pe,{variant:"destructive",onClick:o,children:[t.jsx(ce,{size:16}),i("details.connectionSidebar.removeOAuth")]})]})]})}):e.connection_token&&u.value===null?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-10 px-3 flex items-center rounded-lg border border-border bg-muted/50 text-muted-foreground font-mono text-sm",children:"••••••••••••••••"}),t.jsx("button",{type:"button",onClick:()=>u.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity",title:i("details.connectionSidebar.clearAndReplaceToken"),"aria-label":i("details.connectionSidebar.clearAndReplaceToken"),children:t.jsx(qt,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(B,{children:t.jsx(J,{type:"password",placeholder:i(p?"details.connectionSidebar.pasteYourGitHubPat":"details.connectionSidebar.enterAccessToken"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),p&&t.jsxs(bt,{children:[i("details.connectionSidebar.createAPatAt")," ",t.jsx("a",{href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"github.com/settings/personal-access-tokens"})]})]}),t.jsx(X,{})]})})]})}function bs(s){return s.command==="npx"}function vs(s){return s.args?.find(e=>!e.startsWith("-"))??""}function Ns(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function be(s,e){const n={title:s.title,description:s.description??"",icon:s.icon??null,configuration_state:s.configuration_state??{},configuration_scopes:s.configuration_scopes||[]};if(s.connection_type==="STDIO"&&Ht(s.connection_headers)){const c=s.connection_headers,o=Qe(c.envVars);if(bs(c)){const r=vs(c);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:r,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:o}}const i=Ns(c);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:i.command,stdio_args:i.args,stdio_cwd:i.cwd,env_vars:o}}return{...n,ui_type:s.connection_type,connection_url:s.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}function Ss(s){let e,n=null,c=null,o=null;return s.ui_type==="NPX"?(e="STDIO",n="",o=We(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",o=Xe(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",c=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...c&&{connection_token:c},...o&&{connection_headers:o},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function ys({connection:s,connectionId:e,org:n,isUpdating:c,tools:o,prompts:i,resources:r,siblings:a}){const d=L(),p=ne({from:"/$org/settings/connections/$appSlug"}),m=Le(),l=we(),{org:f}=se(),u=Nt({onSuccess:()=>{a.length<=1&&p({to:"/$org/settings/connections",params:{org:n}})}}),[h,g]=Z.useState(null),[j,S]=Z.useState(!1),v=Ce({connectionId:e}),{data:y}=tt(),D=y?.data?.members??[],P=h??s,_=D.find(x=>x.userId===P.created_by),T=s?.connection_type==="VIRTUAL"||v.isAuthenticated,$={...s,tools:o},k=Je($,Qt),N=Be({resolver:qe(Ke),values:be(h??s)}),b=N.formState.isDirty,E=async()=>{if(!await N.trigger())return;const w=N.getValues(),O=Ss(w),C=h?.id??e;await l.update.mutateAsync({id:C,data:O}),N.reset(w)},z=()=>{N.reset(be(h??s))},I=async x=>{const w=s.configuration_scopes?.length?s.configuration_scopes.join(" "):void 0,{token:O,tokenInfo:C,error:F}=await rt({connectionId:x,orgSlug:f.slug,...w?{scope:w}:{}});if(F||!O){Y.error(d("details.connection.authFailed",{error:F??""}));return}if(C)try{const V=await fetch(`/api/${f.slug}/connections/${x}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:C.accessToken,refreshToken:C.refreshToken,expiresIn:C.expiresIn,scope:C.scope,clientId:C.clientId,clientSecret:C.clientSecret,tokenEndpoint:C.tokenEndpoint})});if(!V.ok)console.error("Failed to save OAuth token:",await V.text()),await l.update.mutateAsync({id:x,data:{connection_token:O}});else try{await l.update.mutateAsync({id:x,data:{}})}catch(ee){console.warn("Failed to refresh connection tools after OAuth:",ee)}}catch(V){console.error("Error saving OAuth token:",V),await l.update.mutateAsync({id:x,data:{connection_token:O}})}else await l.update.mutateAsync({id:x,data:{connection_token:O}});const G=new URL(`/api/${f.slug}/mcp/${x}`,window.location.origin);await m.invalidateQueries({queryKey:te.isMCPAuthenticated(G.href,null)}),await m.invalidateQueries({queryKey:te.mcpClientPrefix()}),Y.success(d("details.connection.authSuccess"))},A=()=>I(s.id),R=async()=>{try{const x=await fetch(`/api/${f.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!x.ok){const O=await x.text();Y.error(d("details.connection.failedRemoveOAuth",{error:O}));return}const w=new URL(`/api/${f.slug}/mcp/${s.id}`,window.location.origin);await m.invalidateQueries({queryKey:te.isMCPAuthenticated(w.href,null)}),Y.success(d("details.connection.oauthRemoved"))}catch(x){console.error("Error removing OAuth token:",x),Y.error(d("details.connection.failedRemoveOAuthError"))}};return t.jsxs(t.Fragment,{children:[t.jsx(St,{...u}),t.jsx(pt,{open:h!==null,onOpenChange:x=>{x||g(null)},children:t.jsxs(ft,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(ht,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(gt,{className:"text-base",children:h?.title??s.title}),t.jsx(jt,{className:"text-xs",children:d("details.connection.settingsDescription")}),_&&t.jsxs("div",{className:"flex items-center gap-1.5 pt-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:d("details.connection.connectedBy")}),t.jsx(st,{url:_.user?.image??void 0,fallback:_.user?.name??_.user?.email??"?",size:"3xs",shape:"circle"}),t.jsx("span",{className:"text-xs font-medium text-foreground",children:_.user?.name||_.user?.email})]})]}),t.jsxs(vt,{...N,children:[t.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 md:px-6 md:py-5 flex flex-col gap-4 md:gap-6",children:[t.jsxs("div",{className:"flex flex-col gap-3 md:gap-4",children:[t.jsx(K,{control:N.control,name:"title",render:({field:x})=>t.jsxs(Q,{children:[t.jsx(W,{children:d("details.connection.nameLabel")}),t.jsx(B,{children:t.jsx(J,{...x})}),t.jsx(X,{})]})}),t.jsx(K,{control:N.control,name:"description",render:({field:x})=>t.jsxs(Q,{children:[t.jsx(W,{children:d("details.connection.descriptionLabel")}),t.jsx(B,{children:t.jsx(J,{...x,value:x.value||""})}),t.jsx(X,{})]})})]}),t.jsx(js,{form:N,connection:h??s,hasOAuthToken:v.hasOAuthToken,onReauthenticate:A,onRemoveOAuth:R}),t.jsx(Ye,{connection:h??s,form:N,hasMcpBinding:k,isMCPAuthenticated:T,supportsOAuth:v.supportsOAuth,isServerError:v.isServerError,onAuthenticate:A,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(q,{onClick:E,disabled:!b||c,className:"flex-1",children:d(c?"details.connection.savingButton":"details.connection.saveButton")}),b&&t.jsx(q,{variant:"outline",onClick:z,children:d("details.connection.undoButton")}),t.jsxs(q,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive hover:border-destructive",onClick:()=>{const x=h??s;g(null),u.requestDelete(x)},children:[t.jsx(ce,{size:15}),d("details.connection.deleteButton")]})]})]},h?.id??s.id)]})}),t.jsx(Ze,{hideTopbar:!0,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(gs,{connection:s,displayTitle:(()=>{const x=a[0]??s;return x.app_name?x.title.replace(/\s*\(\d+\)\s*$/,""):x.title})()}),t.jsx("div",{className:"flex-1 overflow-auto @container",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-2 gap-5 p-6",children:[t.jsx(rs,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(Jt,{instances:a,onConfigure:x=>g(x),onAuthenticate:x=>I(x.id),onDelete:x=>u.requestDelete(x),onToggleStatus:async(x,w)=>{try{await l.update.mutateAsync({id:x.id,data:{status:w}}),Y.success(d(w==="active"?"details.connection.connectionEnabled":"details.connection.connectionDisabled"))}catch{Y.error(d("details.connection.failedUpdateConnection"))}},isAdding:j,onAdd:async()=>{S(!0);try{const x=a[0]??s,w=x.title.replace(/\s*\(\d+\)\s*$/,""),O=a.length+1,C=`${w} (${O})`,F=Ge("conn");await l.create.mutateAsync({id:F,title:C,description:x.description??null,connection_type:x.connection_type,connection_url:x.connection_url??null,connection_token:null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:x.created_by,organization_id:x.organization_id,icon:x.icon??null,app_name:x.app_name??null,app_id:x.app_id??null,connection_headers:x.connection_headers??null,oauth_config:null,configuration_state:x.configuration_state??null,metadata:null,tools:null,bindings:null,status:"inactive"});const G=new URL(`/api/${f.slug}/mcp/${F}`,window.location.origin),V=await at({url:G.href,token:null,orgId:f.id});V.supportsOAuth&&!V.isAuthenticated&&await I(F)}finally{S(!1)}}}),t.jsx(ds,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(xs,{tools:o,prompts:i,resources:r,connectionId:e,org:n})})]})})]})})]})}function Cs(){const s=U.c(52),e=L();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/$org/settings/connections/$appSlug"},s[0]=n):n=s[0];const c=ne(n);let o;s[1]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug"},s[1]=o):o=s[1];const{appSlug:i,org:r}=Fe(o),{org:a}=se(),d=we();let p;s[2]!==i?(p={slug:i},s[2]=i,s[3]=p):p=s[3];const m=nt(p),l=m[0]??null,f=l?.id??"",u=f||null;let h;s[4]!==a.id||s[5]!==a.slug||s[6]!==u?(h={connectionId:u,orgId:a.id,orgSlug:a.slug},s[4]=a.id,s[5]=a.slug,s[6]=u,s[7]=h):h=s[7];const g=Ie(h);let j;s[8]!==g?(j={client:g},s[8]=g,s[9]=j):j=s[9];const{data:S}=it(j);let v;if(s[10]!==l?.tools||s[11]!==f||s[12]!==m||s[13]!==S){const I=S?S.tools.map(As):(l?.tools??[]).map(Ts);e:{if(m.length<=1){v=I;break e}const A=new Set,R=[],x=Is;for(const w of m){const O=w.id===f?I:x(w.tools);for(const C of O)A.has(C.name)||(A.add(C.name),R.push(C))}v=R.length>0?R:I}s[10]=l?.tools,s[11]=f,s[12]=m,s[13]=S,s[14]=v}else v=s[14];const y=v;let D;s[15]!==g?(D={client:g},s[15]=g,s[16]=D):D=s[16];const{data:P}=ot(D);let _;s[17]!==g?(_={client:g},s[17]=g,s[18]=_):_=s[18];const{data:M}=Ve(_);let T;s[19]!==P?.prompts?(T=P?.prompts??[],s[19]=P?.prompts,s[20]=T):T=s[20];let $;s[21]!==T?($=T.map(ws),s[21]=T,s[22]=$):$=s[22];const k=$;let N;s[23]!==M?.resources?(N=M?.resources??[],s[23]=M?.resources,s[24]=N):N=s[24];let b;s[25]!==N?(b=N.map(_s),s[25]=N,s[26]=b):b=s[26];const E=b;if(!l){let I;s[27]!==e?(I=e("details.connection.notFoundTitle"),s[27]=e,s[28]=I):I=s[28];let A;s[29]!==e?(A=e("details.connection.notFoundDescription"),s[29]=e,s[30]=A):A=s[30];let R;s[31]!==c||s[32]!==r?(R=()=>c({to:"/$org/settings/connections",params:{org:r}}),s[31]=c,s[32]=r,s[33]=R):R=s[33];let x;s[34]!==e?(x=e("details.connection.backButton"),s[34]=e,s[35]=x):x=s[35];let w;s[36]!==R||s[37]!==x?(w=t.jsx(q,{variant:"outline",onClick:R,children:x}),s[36]=R,s[37]=x,s[38]=w):w=s[38];let O;return s[39]!==I||s[40]!==A||s[41]!==w?(O=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(ye,{title:I,description:A,actions:w})}),s[39]=I,s[40]=A,s[41]=w,s[42]=O):O=s[42],O}let z;return s[43]!==d.update.isPending||s[44]!==y||s[45]!==l||s[46]!==f||s[47]!==r||s[48]!==k||s[49]!==E||s[50]!==m?(z=t.jsx(ys,{org:r,connection:l,connectionId:f,isUpdating:d.update.isPending,tools:y,prompts:k,resources:E,siblings:m}),s[43]=d.update.isPending,s[44]=y,s[45]=l,s[46]=f,s[47]=r,s[48]=k,s[49]=E,s[50]=m,s[51]=z):z=s[51],z}function _s(s){return{name:s.name,description:s.description,uri:s.uri}}function ws(s){return{name:s.name,description:s.description}}function Is(s){return(s??[]).map(ks)}function ks(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ts(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function As(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ds(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ue,{children:t.jsx(Z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(Ne,{className:"size-8 text-muted-foreground"})}),children:t.jsx(Cs,{})})}),s[0]=e):e=s[0],e}function Ui(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ds,{}),s[0]=e):e=s[0],e}export{Ui as default};
1
+ import{aa as ve,br as $e,bt as Oe,ab as me,bq as Me,c as U,b as L,j as t,h as Ne,B as q,r as Z,l as Se,M as se,_ as ze,z as ue,K as te,d as ne,eC as Ee,eW as xe,H as Re,E as Ue,f as Fe,f4 as Ve,n as Le,ad as Be,ac as qe,t as Y}from"./index-Dc7hzqoi.js";import{g as Ge}from"./extract-connection-data-Dbm_cKaX.js";import{E as ye}from"./empty-state-CyICQznD.js";import{E as He,c as Ke,r as Qe,b as We,d as Xe}from"./connection-form-helpers-CHlcdgAK.js";import{c as Je,S as Ye,D as Ze}from"./index-CiMUXLco.js";import{u as Ce,T as et}from"./use-mcp-auth-status-I377R0Kg.js";import{a as tt}from"./use-members-DPYHJDe2.js";import{A as st}from"./avatar-C9HiP4eS.js";import{a as _e,b as we,u as nt}from"./use-connection-Ba04fHwa.js";import{u as Ie}from"./use-mcp-client-e_hCatGm.js";import{u as it}from"./use-mcp-tools-g86k4oib.js";import{a as ot}from"./use-mcp-prompts-DJRXjL4_.js";import{i as at,a as rt}from"./mcp-oauth-C4khbNJJ.js";import{I as re}from"./integration-icon-BeEdjsn9.js";import{s as lt}from"./Plus-CVauOqLT.js";import{aZ as ct,af as dt,J as mt,ba as ut,h as ie}from"./agent-icon-CczrFEe7.js";import{a as ke,s as xt}from"./Settings02-Cyf85ea0.js";import{s as ce}from"./Trash01-nl-t4IoV.js";import{b as pt,a as ft,c as ht,S as gt,d as jt}from"./sheet-i72Qx7sL.js";import{F as K,b as Q,c as W,d as B,f as X,e as bt,a as vt}from"./form-CSXgIHLz.js";import{I as J}from"./input-DXlaTX4w.js";import{u as Nt,D as St}from"./use-delete-connection-Cns6x8UC.js";import{c as yt,B as Ct,a as _t,C as wt}from"./monitoring-stats-row-PncjnNwy.js";import{b as It,c as kt,d as Tt}from"./chart-8nXuVw9P.js";import{b as At}from"./use-virtual-mcp-DkK7ErtB.js";import{i as Te}from"./ChevronRight-USKkhEpL.js";import{b as Ae}from"./Users03-Y0Jco4zL.js";import{T as oe,a as Dt,c as ae,b as Pt}from"./tabs-CLziM0Ww.js";import{g as De}from"./connection-slug-CITJ0kGN.js";import{c as $t}from"./Tool01-DouqPjim.js";import{g as de}from"./types-27TVsPN_.js";import{M as Ot}from"./mcp-app-renderer-BTjC7Gse.js";import{C as Mt}from"./collection-search-J9Bt25gS.js";import{B as zt}from"./badge-Bu51Hlti.js";import{c as Et,D as Rt,b as Ut,a as pe}from"./dropdown-menu-C5iafa8S.js";import{S as fe,b as he,a as ge,d as je,c as H}from"./select-BkKPcZFe.js";import{i as Ft}from"./CheckCircle-DHXQFnpK.js";import{t as Vt}from"./ChevronUp-DiYhGG4T.js";import{n as Lt}from"./Tool02-CATStXCy.js";import{a as Bt}from"./UserSquare-B2lKdt4w.js";import{s as qt}from"./XClose-BgzK-Dwz.js";import{p as Gt,i as Ht}from"./connection-DD0omVHZ.js";import"./metadata-dUsYcpuu.js";import"./github-D4UJ99TO.js";import"./sidebar-C5KRz1Pj.js";import"./Printer-CvyxF9Jo.js";import"./use-mobile-hIijCK0k.js";import"./tooltip-DV2xHesQ.js";import"./index-DWw5wi2G.js";import"./index-CSd_k8Np.js";import"./Key01-CIXwHMRo.js";import"./auth-DhzAq_9m.js";import"./use-registry-connections-SLFMHpqj.js";import"./use-organization-settings-CKbX2SdA.js";import"./schema-1zAO-l7e.js";import"./task-board-DrUf5p-Z.js";import"./index-BWpNlf6e.js";import"./index-2gtoysbs.js";import"./index-tj4CWdxr.js";import"./index-BD213WLU.js";import"./popover-yk_ePqAA.js";import"./Check-B3RSsr_D.js";import"./SearchMd-C45D2PMI.js";import"./use-create-virtual-mcp-D1w9d4ex.js";import"./use-navigate-to-agent-C8pu0B4z.js";import"./hooks-DZOMRp7D.js";import"./backoff-8mStPHYB.js";import"./thread-intent-F-sZEflj.js";import"./slugify-CEUa2lfQ.js";import"./github-repo-BknN0SVI.js";import"./Eye-Dyg2WPG4.js";import"./use-org-auth-client-DbPU3bA-.js";import"./User01-ClMaVCaJ.js";import"./AlertCircle-CMjsP_Tk.js";import"./ArrowUp-Cii1LHW7.js";import"./ArrowLeft-CjYy5Nhj.js";import"./ArrowRight-CLncCNat.js";import"./TrendUp01-BFAEMx9E.js";import"./ZoomOut-BPxprY2s.js";import"./ChevronSelectorVertical-DpRb2z1l.js";import"./DotsVertical-CsjwfYzf.js";import"./Copy01-nMxlBfeT.js";import"./CreditCard01-CWXVH3ZM.js";import"./Database01-C0YJpjc3.js";import"./MessageCircle01-DBcg2aiD.js";import"./Download01-BRrSA3Yx.js";import"./File02-BvR-HYxK.js";import"./Share07-wC47qn2E.js";import"./GitBranch01-rWb2SJK9.js";import"./Globe01-D6FaaFR2.js";import"./SwitchHorizontal01-DpXsFGyJ.js";import"./HardDrive-DNTPLPT4.js";import"./Image01-CxnjAzbb.js";import"./Link01-C0FvgZZB.js";import"./LinkExternal01-AWlhN5o7.js";import"./Monitor01-Ccs1gh2Z.js";import"./Sun-0Ied-kyZ.js";import"./Package-nTbucmaQ.js";import"./Palette-DSdn1Xis.js";import"./Play-lMuWOObF.js";import"./SearchLg-BrrPVuXr.js";import"./Shield01-CqB4I7qm.js";import"./Stars01-oAh9h5b5.js";import"./Upload01-B4Fqdkae.js";import"./Users01-BFhxJVhO.js";import"./XCircle-CleKT0Id.js";import"./X-CFCE4a-Q.js";import"./Zap-B6zkqKWB.js";import"./label-BMxIRiEr.js";import"./alert-dialog-BI-B_8hq.js";import"./CartesianChart-CD-5y_pX.js";import"./AreaChart-Bh_grNQZ.js";import"./ErrorBarContext-fXvhmekg.js";import"./Sector-9mXbxJ9i.js";const Kt=ve({scopes:Me(me()).describe("List of scopes available"),stateSchema:$e(me(),Oe()).describe("JSON Schema (draft-07) defining the state structure")}),Qt=[{name:"MCP_CONFIGURATION",inputSchema:ve({}),outputSchema:Kt}];function Wt(s){const e=U.c(61),{instance:n,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:r}=s,a=L();let d;e[0]!==n.id?(d={connectionId:n.id},e[0]=n.id,e[1]=d):d=e[1];const p=Ce(d),l=!(n.connection_type==="VIRTUAL")&&p.supportsOAuth&&!p.isAuthenticated,f=n.status!=="active",u=l||f?"border-destructive/50 bg-destructive/5":"border-transparent";let h;e[2]!==u?(h=Se("flex items-center gap-3 rounded-lg border px-4 py-2.5 transition-colors",u),e[2]=u,e[3]=h):h=e[3];let g;e[4]!==n.icon||e[5]!==n.title?(g=t.jsx(re,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[4]=n.icon,e[5]=n.title,e[6]=g):g=e[6];let j;e[7]!==n.title?(j=t.jsx("p",{className:"text-sm font-medium truncate",children:n.title}),e[7]=n.title,e[8]=j):j=e[8];let S;e[9]!==n.status||e[10]!==f||e[11]!==l||e[12]!==a?(S=l?t.jsx("span",{className:"text-xs text-destructive font-medium",children:a("details.connectionInstancesPanel.needsAuthorization")}):f?t.jsx("span",{className:"text-xs text-destructive font-medium",children:n.status==="error"?a("details.connectionInstancesPanel.disabledError"):a("details.connectionInstancesPanel.disabled")}):null,e[9]=n.status,e[10]=f,e[11]=l,e[12]=a,e[13]=S):S=e[13];let v;e[14]!==j||e[15]!==S?(v=t.jsxs("div",{className:"flex-1 min-w-0",children:[j,S]}),e[14]=j,e[15]=S,e[16]=v):v=e[16];let y;e[17]!==n||e[18]!==l||e[19]!==o||e[20]!==a?(y=l&&t.jsx(q,{variant:"outline",size:"sm",className:"h-7 text-xs",onClick:()=>o(n),children:a("details.connectionInstancesPanel.authorize")}),e[17]=n,e[18]=l,e[19]=o,e[20]=a,e[21]=y):y=e[21];let D;e[22]!==n||e[23]!==f||e[24]!==r||e[25]!==a?(D=f?t.jsxs(q,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>r(n,"active"),children:[t.jsx(ct,{size:13}),a("details.connectionInstancesPanel.enable")]}):t.jsx(q,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground",onClick:()=>r(n,"inactive"),title:a("details.connectionInstancesPanel.disable"),"aria-label":a("details.connectionInstancesPanel.disable"),children:t.jsx(dt,{size:13})}),e[22]=n,e[23]=f,e[24]=r,e[25]=a,e[26]=D):D=e[26];let P;e[27]!==n||e[28]!==c?(P=()=>c(n),e[27]=n,e[28]=c,e[29]=P):P=e[29];let _;e[30]!==a?(_=a("details.connectionInstancesPanel.configure"),e[30]=a,e[31]=_):_=e[31];let M;e[32]!==a?(M=a("details.connectionInstancesPanel.configure"),e[32]=a,e[33]=M):M=e[33];let T;e[34]===Symbol.for("react.memo_cache_sentinel")?(T=t.jsx(ke,{size:13}),e[34]=T):T=e[34];let $;e[35]!==P||e[36]!==_||e[37]!==M?($=t.jsx(q,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:P,title:_,"aria-label":M,children:T}),e[35]=P,e[36]=_,e[37]=M,e[38]=$):$=e[38];let k;e[39]!==n||e[40]!==i?(k=()=>i(n),e[39]=n,e[40]=i,e[41]=k):k=e[41];let N;e[42]!==a?(N=a("details.connectionInstancesPanel.delete"),e[42]=a,e[43]=N):N=e[43];let b;e[44]!==a?(b=a("details.connectionInstancesPanel.delete"),e[44]=a,e[45]=b):b=e[45];let E;e[46]===Symbol.for("react.memo_cache_sentinel")?(E=t.jsx(ce,{size:13}),e[46]=E):E=e[46];let z;e[47]!==k||e[48]!==N||e[49]!==b?(z=t.jsx(q,{variant:"ghost",size:"icon",className:"h-7 w-7 text-muted-foreground hover:text-destructive",onClick:k,title:N,"aria-label":b,children:E}),e[47]=k,e[48]=N,e[49]=b,e[50]=z):z=e[50];let I;e[51]!==$||e[52]!==z||e[53]!==y||e[54]!==D?(I=t.jsxs("div",{className:"flex items-center gap-1 shrink-0",children:[y,D,$,z]}),e[51]=$,e[52]=z,e[53]=y,e[54]=D,e[55]=I):I=e[55];let A;return e[56]!==I||e[57]!==h||e[58]!==g||e[59]!==v?(A=t.jsxs("div",{className:h,children:[g,v,I]}),e[56]=I,e[57]=h,e[58]=g,e[59]=v,e[60]=A):A=e[60],A}function Xt(s){const e=U.c(21),{instance:n,onConfigure:c}=s,o=L();let i;e[0]!==n.icon||e[1]!==n.title?(i=t.jsx(re,{icon:n.icon,name:n.title,size:"xs",className:"shrink-0"}),e[0]=n.icon,e[1]=n.title,e[2]=i):i=e[2];let r;e[3]!==n.title?(r=t.jsx("div",{className:"flex-1 min-w-0",children:t.jsx("p",{className:"text-sm font-medium truncate",children:n.title})}),e[3]=n.title,e[4]=r):r=e[4];let a;e[5]!==n||e[6]!==c?(a=()=>c(n),e[5]=n,e[6]=c,e[7]=a):a=e[7];let d;e[8]!==o?(d=o("details.connectionInstancesPanel.configure"),e[8]=o,e[9]=d):d=e[9];let p;e[10]!==o?(p=o("details.connectionInstancesPanel.configure"),e[10]=o,e[11]=p):p=e[11];let m;e[12]===Symbol.for("react.memo_cache_sentinel")?(m=t.jsx(ke,{size:13}),e[12]=m):m=e[12];let l;e[13]!==a||e[14]!==d||e[15]!==p?(l=t.jsx("div",{className:"flex items-center gap-1 shrink-0",children:t.jsx(q,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:a,title:d,"aria-label":p,children:m})}),e[13]=a,e[14]=d,e[15]=p,e[16]=l):l=e[16];let f;return e[17]!==i||e[18]!==r||e[19]!==l?(f=t.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-transparent px-4 py-2.5 transition-colors",children:[i,r,l]}),e[17]=i,e[18]=r,e[19]=l,e[20]=f):f=e[20],f}function Jt(s){const e=U.c(33),{instances:n,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:r,onAdd:a,isAdding:d}=s,p=L();if(n.length===0)return null;let m;e[0]!==n.length||e[1]!==p?(m=n.length===1?p("details.connectionInstancesPanel.instance"):p("details.connectionInstancesPanel.instances"),e[0]=n.length,e[1]=p,e[2]=m):m=e[2];let l;e[3]!==m?(l=t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:m}),e[3]=m,e[4]=l):l=e[4];let f;e[5]!==d?(f=d?t.jsx(Ne,{className:"size-[13px]"}):t.jsx(lt,{size:13}),e[5]=d,e[6]=f):f=e[6];let u;e[7]!==p?(u=p("details.connectionInstancesPanel.addInstance"),e[7]=p,e[8]=u):u=e[8];let h;e[9]!==d||e[10]!==a||e[11]!==f||e[12]!==u?(h=t.jsxs(q,{variant:"default",size:"sm",className:"h-7 gap-1.5 text-xs",onClick:a,disabled:d,children:[f,u]}),e[9]=d,e[10]=a,e[11]=f,e[12]=u,e[13]=h):h=e[13];let g;e[14]!==l||e[15]!==h?(g=t.jsxs("div",{className:"px-5 py-4 border-b border-border flex items-center justify-between",children:[l,h]}),e[14]=l,e[15]=h,e[16]=g):g=e[16];let j;if(e[17]!==n||e[18]!==o||e[19]!==c||e[20]!==i||e[21]!==r){let y;e[23]!==o||e[24]!==c||e[25]!==i||e[26]!==r?(y=D=>t.jsx(Z.Suspense,{fallback:t.jsx(Xt,{instance:D,onConfigure:c}),children:t.jsx(Wt,{instance:D,onConfigure:c,onAuthenticate:o,onDelete:i,onToggleStatus:r})},D.id),e[23]=o,e[24]=c,e[25]=i,e[26]=r,e[27]=y):y=e[27],j=n.map(y),e[17]=n,e[18]=o,e[19]=c,e[20]=i,e[21]=r,e[22]=j}else j=e[22];let S;e[28]!==j?(S=t.jsx("div",{className:"p-2 flex flex-col gap-1",children:j}),e[28]=j,e[29]=S):S=e[29];let v;return e[30]!==g||e[31]!==S?(v=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[g,S]}),e[30]=g,e[31]=S,e[32]=v):v=e[32],v}function Yt(s,e=3){const n=new Map;for(const c of s){if(!c.isError)continue;const o=(c.errorMessage??"").trim()||"Unknown error";n.set(o,(n.get(o)??0)+1)}return[...n.entries()].map(([c,o])=>({message:c,count:o})).sort((c,o)=>o.count-c.count).slice(0,e)}const Zt=[{value:"7d",label:"7d"},{value:"14d",label:"14d"},{value:"30d",label:"30d"}];function es(s){const e=new Date,n=new Date(e);return s==="7d"?n.setDate(n.getDate()-7):s==="14d"?n.setDate(n.getDate()-14):n.setDate(n.getDate()-30),{startDate:n,endDate:e}}const ts={calls:{label:"Tool calls"},errors:{label:"Errors"}};function ss(s){const e=U.c(4),{connectionId:n,orgId:c,timeframe:o}=s,i=L(),r=ze(),a=es(o),{data:d}=ue({queryKey:te.connectionActivity(n,o,c),queryFn:async()=>await r.call("MONITORING_LOGS_LIST",{startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:n,limit:2e3,offset:0}),staleTime:3e5}),{data:p}=ue({queryKey:te.connectionActivityErrors(n,o,c),queryFn:async()=>await r.call("MONITORING_LOGS_LIST",{startDate:a.startDate.toISOString(),endDate:a.endDate.toISOString(),connectionId:n,isError:!0,limit:1,offset:0}),staleTime:3e5}),m=yt(d?.logs??[],a,void 0,d?.total,p?.total),l=m.data,f=m.totalCalls>0,u=Yt(d?.logs??[]),h=m.totalCalls>0?Math.round(m.totalErrors/m.totalCalls*100):0;let g;e[0]!==i?(g=i("details.connectionActivity.toolCalls"),e[0]=i,e[1]=g):g=e[1];let j;return e[2]!==g?(j=t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:g}),e[2]=g,e[3]=j):j=e[3],t.jsxs("div",{children:[t.jsxs("div",{className:"flex gap-6 px-5 pb-4",children:[t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:m.totalCalls.toLocaleString()}),j]}),m.totalErrors>0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-2xl font-semibold text-destructive tabular-nums",children:m.totalErrors.toLocaleString()}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.errors")})]}),m.avgDurationMs>0&&t.jsxs("div",{children:[t.jsxs("p",{className:"text-2xl font-semibold text-foreground tabular-nums",children:[Math.round(m.avgDurationMs),"ms"]}),t.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:i("details.connectionActivity.avgLatency")})]})]}),f?t.jsxs("div",{children:[t.jsx(It,{config:ts,className:"h-16 w-full",children:t.jsxs(Ct,{data:l,barCategoryGap:"4%",children:[t.jsx(kt,{content:t.jsx(Tt,{labelFormatter:os}),cursor:{fill:"var(--muted)"}}),t.jsx(_t,{dataKey:"calls",radius:[2,2,0,0],minPointSize:1,children:l.map(is)})]})}),t.jsxs("div",{className:"flex justify-between px-3 mt-1 pb-3",children:[t.jsx("span",{className:"text-[10px] text-muted-foreground",children:l[0]?.label}),t.jsx("span",{className:"text-[10px] text-muted-foreground",children:l[l.length-1]?.label})]})]}):t.jsx("div",{className:"h-20 flex items-center justify-center",children:t.jsx("p",{className:"text-sm text-muted-foreground/60",children:i("details.connectionActivity.noActivityInThisPeriod")})}),u.length>0&&t.jsxs("div",{className:"px-5 py-4 border-t border-border",children:[t.jsxs("p",{className:"text-xs font-medium text-muted-foreground mb-2",children:[i("details.connectionActivity.topErrors"),h>0?` · ${i("details.connectionActivity.errorRatePercentage",{errorRate:h.toString()})}`:""]}),t.jsx("ul",{className:"space-y-1.5",children:u.map(ns)})]})]})}function ns(s){return t.jsxs("li",{className:"flex items-start gap-2 text-xs",children:[t.jsxs("span",{className:"tabular-nums text-destructive font-medium shrink-0",children:[s.count.toLocaleString(),"×"]}),t.jsx("span",{className:"text-muted-foreground truncate",title:s.message,children:s.message})]},s.message)}function is(s,e){return t.jsx(wt,{fill:s.errorRate>50?"var(--destructive)":"var(--chart-1)",fillOpacity:s.calls===0?.2:s.errorRate>50?.7:.85},`cell-${e}`)}function os(s,e){const n=Array.isArray(e)?e[0]:void 0;return n&&typeof n=="object"&&"payload"in n?n.payload?.label??"":""}function as(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{children:[t.jsx("div",{className:"flex gap-6 px-5 pb-4",children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[t.jsx("div",{className:"h-7 w-16 rounded-md bg-muted animate-pulse"}),t.jsx("div",{className:"h-3 w-14 rounded bg-muted animate-pulse"})]})}),t.jsx("div",{className:"h-20 w-full rounded-md bg-muted animate-pulse"})]}),s[0]=e):e=s[0],e}function rs(s){const e=U.c(22),{connectionId:n}=s,c=L(),[o,i]=Z.useState("14d"),{org:r}=se();let a;e[0]!==c?(a=c("details.connectionActivity.activity"),e[0]=c,e[1]=a):a=e[1];let d;e[2]!==a?(d=t.jsx("div",{children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:a})}),e[2]=a,e[3]=d):d=e[3];let p;e[4]!==c?(p=c("details.connectionActivity.timeframe"),e[4]=c,e[5]=p):p=e[5];let m;e[6]!==o?(m=Zt.map(j=>t.jsx("button",{type:"button","aria-pressed":o===j.value,onClick:()=>i(j.value),className:Se("px-2.5 py-1 text-xs font-medium rounded-md transition-colors",o===j.value?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground"),children:j.label},j.value)),e[6]=o,e[7]=m):m=e[7];let l;e[8]!==p||e[9]!==m?(l=t.jsx("div",{role:"group","aria-label":p,className:"flex items-center gap-0.5 bg-muted rounded-lg p-0.5",children:m}),e[8]=p,e[9]=m,e[10]=l):l=e[10];let f;e[11]!==d||e[12]!==l?(f=t.jsxs("div",{className:"px-5 py-4 flex items-center justify-between",children:[d,l]}),e[11]=d,e[12]=l,e[13]=f):f=e[13];let u;e[14]===Symbol.for("react.memo_cache_sentinel")?(u=t.jsx(as,{}),e[14]=u):u=e[14];let h;e[15]!==n||e[16]!==r.id||e[17]!==o?(h=t.jsx(Z.Suspense,{fallback:u,children:t.jsx(ss,{connectionId:n,orgId:r.id,timeframe:o})}),e[15]=n,e[16]=r.id,e[17]=o,e[18]=h):h=e[18];let g;return e[19]!==f||e[20]!==h?(g=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[f,h]}),e[19]=f,e[20]=h,e[21]=g):g=e[21],g}function ls(s){const e=U.c(15),{virtualMcp:n,org:c}=s,o=ne();let i;e[0]!==o||e[1]!==c||e[2]!==n.id?(i=()=>{const l=crypto.randomUUID();o({to:"/$org/projects/$agentId",params:{org:c,agentId:n.id},search:{thread:l}})},e[0]=o,e[1]=c,e[2]=n.id,e[3]=i):i=e[3];let r;e[4]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx(Ae,{size:16}),e[4]=r):r=e[4];let a;e[5]!==n.icon||e[6]!==n.title?(a=t.jsx(re,{icon:n.icon,name:n.title,size:"xs",fallbackIcon:r}),e[5]=n.icon,e[6]=n.title,e[7]=a):a=e[7];let d;e[8]!==n.title?(d=t.jsx("span",{className:"flex-1 text-sm font-medium text-foreground truncate",children:n.title}),e[8]=n.title,e[9]=d):d=e[9];let p;e[10]===Symbol.for("react.memo_cache_sentinel")?(p=t.jsx(Te,{size:16,className:"text-muted-foreground group-hover:text-foreground transition-colors shrink-0"}),e[10]=p):p=e[10];let m;return e[11]!==i||e[12]!==a||e[13]!==d?(m=t.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-3 rounded-lg hover:bg-muted/50 transition-colors group text-left w-full",children:[a,d,p]}),e[11]=i,e[12]=a,e[13]=d,e[14]=m):m=e[14],m}function cs(s){const e=U.c(7),{virtualMcps:n,org:c}=s;let o;if(e[0]!==c||e[1]!==n){let r;e[3]!==c?(r=a=>t.jsx(ls,{virtualMcp:a,org:c},a.id),e[3]=c,e[4]=r):r=e[4],o=n.map(r),e[0]=c,e[1]=n,e[2]=o}else o=e[2];let i;return e[5]!==o?(i=t.jsx("div",{className:"flex flex-col gap-3",children:t.jsx("div",{className:"flex flex-col gap-2",children:o})}),e[5]=o,e[6]=i):i=e[6],i}function ds(s){const e=U.c(13),{connection:n}=s,c=L(),{org:o}=se();let i;e[0]!==n.id?(i={filters:[{column:"connection_id",value:n.id}]},e[0]=n.id,e[1]=i):i=e[1];const r=At(i);if(!(r.length>0)){let f;return e[2]===Symbol.for("react.memo_cache_sentinel")?(f=t.jsx(t.Fragment,{}),e[2]=f):f=e[2],f}let d;e[3]!==c?(d=c("details.connectionAgentsPanel.usedByAgents"),e[3]=c,e[4]=d):d=e[4];let p;e[5]!==d?(p=t.jsx("div",{className:"px-5 py-4 border-b border-border",children:t.jsx("h3",{className:"text-sm font-semibold text-foreground",children:d})}),e[5]=d,e[6]=p):p=e[6];let m;e[7]!==o.slug||e[8]!==r?(m=t.jsx("div",{className:"px-5 py-4",children:t.jsx(cs,{virtualMcps:r,org:o.slug})}),e[7]=o.slug,e[8]=r,e[9]=m):m=e[9];let l;return e[10]!==p||e[11]!==m?(l=t.jsxs("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:[p,m]}),e[10]=p,e[11]=m,e[12]=l):l=e[12],l}function ms(s){const e=U.c(35),{tools:n,connectionId:c,org:o}=s,i=L(),r=ne(),{org:a}=se();let d;e[0]!==c||e[1]!==a.id||e[2]!==a.slug?(d={connectionId:c,orgId:a.id,orgSlug:a.slug},e[0]=c,e[1]=a.id,e[2]=a.slug,e[3]=d):d=e[3];const p=Ie(d),m=_e(c);let l;e[4]!==m||e[5]!==c?(l=m?De(m):c,e[4]=m,e[5]=c,e[6]=l):l=e[6];const f=l,[u,h]=Z.useState("");let g,j,S,v;if(e[7]!==f||e[8]!==p||e[9]!==r||e[10]!==o||e[11]!==u||e[12]!==i||e[13]!==n){const P=(n??[]).filter(us),_=u.toLowerCase().trim(),M=_?P.filter(b=>b.name.toLowerCase().includes(_)||b.description&&b.description.toLowerCase().includes(_)):P;let T;e[18]!==f||e[19]!==r||e[20]!==o?(T=b=>{r({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:o,appSlug:f,collectionName:"tools",itemId:encodeURIComponent(b.name)}})},e[18]=f,e[19]=r,e[20]=o,e[21]=T):T=e[21];const $=T;S="flex flex-col h-full overflow-hidden";let k;e[22]!==i?(k=i("details.connectionUiTab.searchAppsPlaceholder"),e[22]=i,e[23]=k):k=e[23];let N;e[24]===Symbol.for("react.memo_cache_sentinel")?(N=b=>{b.key==="Escape"&&(h(""),b.target.blur())},e[24]=N):N=e[24],e[25]!==u||e[26]!==k?(v=t.jsx(Mt,{value:u,onChange:h,placeholder:k,onKeyDown:N}),e[25]=u,e[26]=k,e[27]=v):v=e[27],g="flex-1 overflow-auto p-5",j=M.length===0?t.jsx(ye,{image:null,title:i(u?"details.connectionUiTab.noAppsFound":"details.connectionUiTab.noAppsAvailable"),description:i(u?"details.connectionUiTab.adjustSearchTerms":"details.connectionUiTab.noInteractiveUis")}):t.jsx("div",{className:"grid grid-cols-[repeat(auto-fill,minmax(320px,1fr))] gap-4",children:M.map(b=>{const E=de(b._meta);return t.jsxs(Ee,{className:"cursor-pointer transition-colors overflow-hidden gap-0",onClick:()=>$(b),children:[t.jsx("div",{className:"h-[200px] overflow-hidden border-b border-border",children:t.jsx(Ot,{resourceURI:E,toolInfo:{tool:b},displayMode:"inline",minHeight:200,maxHeight:200,client:p})}),t.jsxs("div",{className:"flex flex-col gap-2 p-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsx("h3",{className:"text-base font-medium text-foreground truncate",children:b.annotations?.title??b.name}),t.jsx(et,{annotations:b.annotations,_meta:b._meta})]}),b.description&&t.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2",children:b.description})]})]},b.name)})}),e[7]=f,e[8]=p,e[9]=r,e[10]=o,e[11]=u,e[12]=i,e[13]=n,e[14]=g,e[15]=j,e[16]=S,e[17]=v}else g=e[14],j=e[15],S=e[16],v=e[17];let y;e[28]!==g||e[29]!==j?(y=t.jsx("div",{className:g,children:j}),e[28]=g,e[29]=j,e[30]=y):y=e[30];let D;return e[31]!==S||e[32]!==v||e[33]!==y?(D=t.jsxs("div",{className:S,children:[v,y]}),e[31]=S,e[32]=v,e[33]=y,e[34]=D):D=e[34],D}function us(s){return!!de(s._meta)}function Pe(s){const e=s.replace(/[._]/g," ").trim().split(/\s+/),n=r=>r.charAt(0).toUpperCase()+r.slice(1),c=new Set(["list","create","get","update","delete","fetch","search","run","trigger","review","send","check"]),o=e.map(n),i=e[e.length-1];return o.length>=2&&i&&c.has(i)?[o.pop(),...o].join(" "):o.join(" ")}function le(s){const e=U.c(5),{label:n}=s,c=L();let o;e[0]!==n||e[1]!==c?(o=c("details.connectionCapabilities.noItemsAvailable",{item:n}),e[0]=n,e[1]=c,e[2]=o):o=e[2];let i;return e[3]!==o?(i=t.jsx("div",{className:"px-5 py-8 text-center",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:o})}),e[3]=o,e[4]=i):i=e[4],i}function xs(s){const e=U.c(72),{tools:n,prompts:c,resources:o,connectionId:i,org:r}=s;let a;e[0]!==c?(a=c===void 0?[]:c,e[0]=c,e[1]=a):a=e[1];const d=a;let p;e[2]!==o?(p=o===void 0?[]:o,e[2]=o,e[3]=p):p=e[3];const m=p,l=L(),f=ne(),u=_e(i??"");let h;e[4]!==u||e[5]!==i?(h=u?De(u):i,e[4]=u,e[5]=i,e[6]=h):h=e[6];const g=h;let j;e[7]!==g||e[8]!==i||e[9]!==f||e[10]!==r?(j=function(F){!i||!r||f({to:"/$org/settings/connections/$appSlug/$collectionName/$itemId",params:{org:r,appSlug:g,collectionName:"tools",itemId:encodeURIComponent(F)}})},e[7]=g,e[8]=i,e[9]=f,e[10]=r,e[11]=j):j=e[11];const S=j;let v;e[12]!==i||e[13]!==r||e[14]!==n?(v=i&&r&&n.some(hs),e[12]=i,e[13]=r,e[14]=n,e[15]=v):v=e[15];const y=v;if(n.length+d.length+m.length===0){let C;e[16]!==l?(C=l("details.connectionCapabilities.capabilities"),e[16]=l,e[17]=C):C=e[17];let F;e[18]!==C?(F=t.jsx("h3",{className:"text-sm font-semibold text-foreground mb-1",children:C}),e[18]=C,e[19]=F):F=e[19];let G;e[20]!==l?(G=l("details.connectionCapabilities.noCapabilitiesDiscovered"),e[20]=l,e[21]=G):G=e[21];let V;e[22]!==G?(V=t.jsx("p",{className:"text-sm text-muted-foreground",children:G}),e[22]=G,e[23]=V):V=e[23];let ee;return e[24]!==V||e[25]!==F?(ee=t.jsxs("div",{className:"rounded-xl border border-border bg-card p-5",children:[F,V]}),e[24]=V,e[25]=F,e[26]=ee):ee=e[26],ee}let P;e[27]!==l||e[28]!==n.length?(P=l("details.connectionCapabilities.toolsTab",{count:n.length}),e[27]=l,e[28]=n.length,e[29]=P):P=e[29];let _;e[30]!==P?(_=t.jsx(oe,{value:"tools",variant:"underline",children:P}),e[30]=P,e[31]=_):_=e[31];let M;e[32]!==y||e[33]!==l?(M=y&&t.jsx(oe,{value:"apps",variant:"underline",children:l("details.connectionCapabilities.uiTab")}),e[32]=y,e[33]=l,e[34]=M):M=e[34];let T;e[35]!==l?(T=l("details.connectionCapabilities.promptsTab"),e[35]=l,e[36]=T):T=e[36];let $;e[37]!==T?($=t.jsx(oe,{value:"prompts",variant:"underline",children:T}),e[37]=T,e[38]=$):$=e[38];let k;e[39]!==l?(k=l("details.connectionCapabilities.resourcesTab"),e[39]=l,e[40]=k):k=e[40];let N;e[41]!==k?(N=t.jsx(oe,{value:"resources",variant:"underline",children:k}),e[41]=k,e[42]=N):N=e[42];let b;e[43]!==M||e[44]!==$||e[45]!==N||e[46]!==_?(b=t.jsx("div",{className:"px-5 flex items-center justify-between border-b border-border",children:t.jsxs(Dt,{variant:"underline",className:"gap-1",children:[_,M,$,N]})}),e[43]=M,e[44]=$,e[45]=N,e[46]=_,e[47]=b):b=e[47];let E;e[48]!==S||e[49]!==n?(E=n.length>0?n.map(C=>t.jsxs("button",{type:"button",className:"w-full flex items-start gap-3 px-5 py-3 text-left hover:bg-muted/40 transition-colors cursor-pointer",onClick:()=>S(C.name),children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx($t,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Pe(C.name)}),C.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:C.description})]}),t.jsx(Te,{size:16,className:"text-muted-foreground shrink-0 mt-0.5"})]},C.name)):t.jsx(le,{label:"tools"}),e[48]=S,e[49]=n,e[50]=E):E=e[50];let z;e[51]!==E?(z=t.jsx(ae,{value:"tools",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:E})}),e[51]=E,e[52]=z):z=e[52];let I;e[53]!==i||e[54]!==y||e[55]!==r||e[56]!==n?(I=y&&t.jsx(ae,{value:"apps",className:"h-auto min-h-[200px]",children:t.jsx(ms,{tools:n,connectionId:i,org:r})}),e[53]=i,e[54]=y,e[55]=r,e[56]=n,e[57]=I):I=e[57];let A;e[58]!==d?(A=d.length>0?d.map(fs):t.jsx(le,{label:"prompts"}),e[58]=d,e[59]=A):A=e[59];let R;e[60]!==A?(R=t.jsx(ae,{value:"prompts",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:A})}),e[60]=A,e[61]=R):R=e[61];let x;e[62]!==m?(x=m.length>0?m.map(ps):t.jsx(le,{label:"resources"}),e[62]=m,e[63]=x):x=e[63];let w;e[64]!==x?(w=t.jsx(ae,{value:"resources",className:"h-auto",children:t.jsx("div",{className:"divide-y divide-border",children:x})}),e[64]=x,e[65]=w):w=e[65];let O;return e[66]!==b||e[67]!==z||e[68]!==I||e[69]!==R||e[70]!==w?(O=t.jsx("div",{className:"rounded-xl border border-border bg-card overflow-hidden",children:t.jsxs(Pt,{defaultValue:"tools",variant:"underline",children:[b,z,I,R,w]})}),e[66]=b,e[67]=z,e[68]=I,e[69]=R,e[70]=w,e[71]=O):O=e[71],O}function ps(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(ut,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:s.name}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description}),s.uri&&t.jsx("div",{className:"text-xs text-muted-foreground/60 font-mono mt-0.5 truncate",children:s.uri})]})]},s.uri??s.name)}function fs(s){return t.jsxs("div",{className:"flex items-start gap-3 px-5 py-3",children:[t.jsx("div",{className:"mt-0.5 shrink-0 size-7 rounded-md bg-muted flex items-center justify-center",children:t.jsx(mt,{size:13,className:"text-muted-foreground"})}),t.jsxs("div",{className:"flex-1 min-w-0",children:[t.jsx("div",{className:"text-sm font-medium text-foreground",children:Pe(s.name)}),s.description&&t.jsx("div",{className:"text-xs text-muted-foreground mt-0.5 leading-relaxed line-clamp-2",children:s.description})]})]},s.name)}function hs(s){return de(s._meta)}function gs(s){const e=U.c(13),{connection:n,displayTitle:c}=s,o=c??n.title;let i;e[0]!==n.icon||e[1]!==o?(i=t.jsx(re,{icon:n.icon,name:o,size:"xl",className:"shrink-0"}),e[0]=n.icon,e[1]=o,e[2]=i):i=e[2];let r;e[3]!==o?(r=t.jsx("div",{className:"flex flex-wrap items-center gap-2 mb-2",children:t.jsx("h1",{className:"text-lg md:text-xl font-semibold tracking-tight text-foreground leading-none",children:o})}),e[3]=o,e[4]=r):r=e[4];let a;e[5]!==n.description?(a=n.description&&t.jsx("p",{className:"text-sm text-muted-foreground leading-relaxed line-clamp-2",children:n.description}),e[5]=n.description,e[6]=a):a=e[6];let d;e[7]!==r||e[8]!==a?(d=t.jsxs("div",{className:"flex-1 min-w-0",children:[r,a]}),e[7]=r,e[8]=a,e[9]=d):d=e[9];let p;return e[10]!==i||e[11]!==d?(p=t.jsxs("div",{className:"flex items-center gap-4 md:gap-6 py-5 md:py-7 px-4 md:px-8 bg-background border-b border-border shrink-0",children:[i,d]}),e[10]=i,e[11]=d,e[12]=p):p=e[12],p}function js({form:s,connection:e,hasOAuthToken:n,onReauthenticate:c,onRemoveOAuth:o}){const i=L(),r=xe({control:s.control,name:"ui_type"}),a=xe({control:s.control,name:"connection_url"}),{stdioEnabled:d}=Re(),p=(()=>{if(typeof a!="string"||!a)return!1;try{const u=new URL(a);return u.hostname==="api.githubcopilot.com"&&u.pathname.replace(/\/+$/,"")==="/mcp"}catch{return!1}})(),m=d||e.connection_type==="STDIO",l=e.connection_type==="VIRTUAL",f=l?Gt(e.connection_url):null;return l?t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsxs("div",{className:"flex flex-col gap-3",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.type")}),t.jsxs("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:[t.jsx(Ae,{className:"w-4 h-4 text-muted-foreground"}),t.jsx("span",{className:"text-sm",children:i("details.connectionSidebar.virtualMcp")})]}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.virtualMcpDescription")})]}),f&&t.jsxs("div",{className:"flex flex-col gap-2",children:[t.jsx("span",{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.virtualMcpId")}),t.jsx("div",{className:"flex items-center gap-2 h-10 px-3 border border-border rounded-lg bg-muted/50",children:t.jsx("code",{className:"text-sm text-muted-foreground",children:f})})]})]}):t.jsxs("div",{className:"flex flex-col gap-4",children:[t.jsx(K,{control:s.control,name:"ui_type",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.connection")}),r!=="NPX"&&r!=="STDIO"?t.jsxs("div",{className:"flex items-stretch rounded-lg border border-border overflow-hidden",children:[t.jsxs(fe,{value:u.value,onValueChange:u.onChange,children:[t.jsx(B,{children:t.jsxs(he,{className:"h-full! w-auto min-w-[90px] border-0 rounded-none bg-muted/50 focus:ring-0 focus:ring-offset-0",children:[t.jsx(ie,{className:"w-4 h-4 text-muted-foreground shrink-0"}),t.jsx(ge,{})]})}),t.jsxs(je,{children:[t.jsx(H,{value:"HTTP",children:i("details.connectionSidebar.http")}),t.jsx(H,{value:"SSE",children:i("details.connectionSidebar.sse")}),t.jsx(H,{value:"Websocket",children:i("details.connectionSidebar.websocket")}),m&&t.jsxs(t.Fragment,{children:[t.jsx(H,{value:"NPX",children:i("details.connectionSidebar.npxPackage")}),t.jsx(H,{value:"STDIO",children:i("details.connectionSidebar.customCommand")})]})]})]}),t.jsx("div",{className:"w-px bg-border"}),t.jsx(K,{control:s.control,name:"connection_url",render:({field:h})=>t.jsx(Q,{className:"flex-1 min-w-0",children:t.jsx(B,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.urlPlaceholder"),...h,value:h.value??"",className:"h-10 border-0 rounded-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent"})})})})]}):t.jsxs(fe,{value:u.value,onValueChange:u.onChange,children:[t.jsx(B,{children:t.jsx(he,{className:"h-10",children:t.jsx(ge,{})})}),t.jsxs(je,{children:[t.jsx(H,{value:"HTTP",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ie,{className:"w-4 h-4"}),i("details.connectionSidebar.http")]})}),t.jsx(H,{value:"SSE",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ie,{className:"w-4 h-4"}),i("details.connectionSidebar.sse")]})}),t.jsx(H,{value:"Websocket",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(ie,{className:"w-4 h-4"}),i("details.connectionSidebar.websocket")]})}),m&&t.jsxs(t.Fragment,{children:[t.jsx(H,{value:"NPX",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Lt,{className:"w-4 h-4"}),i("details.connectionSidebar.npxPackage")]})}),t.jsx(H,{value:"STDIO",children:t.jsxs("span",{className:"flex items-center gap-2",children:[t.jsx(Bt,{className:"w-4 h-4"}),i("details.connectionSidebar.customCommand")]})})]})]})]}),t.jsx(X,{})]})}),r==="NPX"&&t.jsx(K,{control:s.control,name:"npx_package",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.npmPackage")}),t.jsx(B,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.npmPackagePlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})}),r==="STDIO"&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsx(K,{control:s.control,name:"stdio_command",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.command")}),t.jsx(B,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.commandPlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})}),t.jsx(K,{control:s.control,name:"stdio_args",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.arguments")}),t.jsx(B,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.argumentsPlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx("p",{className:"text-xs text-muted-foreground",children:i("details.connectionSidebar.spaceSeparatedArguments")}),t.jsx(X,{})]})})]}),t.jsx(K,{control:s.control,name:"stdio_cwd",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.workingDirectory")}),t.jsx(B,{children:t.jsx(J,{placeholder:i("details.connectionSidebar.workingDirectoryPlaceholder"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),t.jsx(X,{})]})})]}),(r==="NPX"||r==="STDIO")&&t.jsx(K,{control:s.control,name:"env_vars",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i("details.connectionSidebar.environmentVariables")}),t.jsx(B,{children:t.jsx(He,{value:u.value??[],onChange:u.onChange})}),t.jsx(X,{})]})}),r!=="NPX"&&r!=="STDIO"&&t.jsx(K,{control:s.control,name:"connection_token",render:({field:u})=>t.jsxs(Q,{className:"flex flex-col gap-3",children:[t.jsx(W,{className:"text-xs text-muted-foreground font-medium",children:i(p?"details.connectionSidebar.githubPersonalAccessToken":"details.connectionSidebar.token")}),n?t.jsx("div",{className:"flex items-center gap-2",children:t.jsxs(Et,{children:[t.jsx(Rt,{asChild:!0,children:t.jsx("button",{type:"button",className:"inline-flex items-center gap-1.5 cursor-pointer",children:t.jsxs(zt,{variant:"success",className:"gap-1.5",children:[t.jsx(Ft,{size:12}),i("details.connectionSidebar.authenticatedViaOAuth"),t.jsx(Vt,{size:12})]})})}),t.jsxs(Ut,{align:"start",children:[t.jsxs(pe,{onClick:c,children:[t.jsx(xt,{size:16}),i("details.connectionSidebar.reauthenticate")]}),t.jsxs(pe,{variant:"destructive",onClick:o,children:[t.jsx(ce,{size:16}),i("details.connectionSidebar.removeOAuth")]})]})]})}):e.connection_token&&u.value===null?t.jsxs("div",{className:"relative group",children:[t.jsx("div",{className:"h-10 px-3 flex items-center rounded-lg border border-border bg-muted/50 text-muted-foreground font-mono text-sm",children:"••••••••••••••••"}),t.jsx("button",{type:"button",onClick:()=>u.onChange(""),className:"absolute right-2 top-1/2 -translate-y-1/2 p-1 rounded hover:bg-muted opacity-0 group-hover:opacity-100 transition-opacity",title:i("details.connectionSidebar.clearAndReplaceToken"),"aria-label":i("details.connectionSidebar.clearAndReplaceToken"),children:t.jsx(qt,{size:14,className:"text-muted-foreground"})})]}):t.jsxs(t.Fragment,{children:[t.jsx(B,{children:t.jsx(J,{type:"password",placeholder:i(p?"details.connectionSidebar.pasteYourGitHubPat":"details.connectionSidebar.enterAccessToken"),...u,value:u.value||"",className:"h-10 rounded-lg"})}),p&&t.jsxs(bt,{children:[i("details.connectionSidebar.createAPatAt")," ",t.jsx("a",{href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noopener noreferrer",className:"underline",children:"github.com/settings/personal-access-tokens"})]})]}),t.jsx(X,{})]})})]})}function bs(s){return s.command==="npx"}function vs(s){return s.args?.find(e=>!e.startsWith("-"))??""}function Ns(s){return{command:s.command,args:s.args?.join(" ")??"",cwd:s.cwd??""}}function be(s,e){const n={title:s.title,description:s.description??"",icon:s.icon??null,configuration_state:s.configuration_state??{},configuration_scopes:s.configuration_scopes||[]};if(s.connection_type==="STDIO"&&Ht(s.connection_headers)){const c=s.connection_headers,o=Qe(c.envVars);if(bs(c)){const r=vs(c);return{...n,ui_type:"NPX",connection_url:"",connection_token:null,npx_package:r,stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:o}}const i=Ns(c);return{...n,ui_type:"STDIO",connection_url:"",connection_token:null,npx_package:"",stdio_command:i.command,stdio_args:i.args,stdio_cwd:i.cwd,env_vars:o}}return{...n,ui_type:s.connection_type,connection_url:s.connection_url??"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}function Ss(s){let e,n=null,c=null,o=null;return s.ui_type==="NPX"?(e="STDIO",n="",o=We(s.npx_package||"",s.env_vars||[])):s.ui_type==="STDIO"?(e="STDIO",n="",o=Xe(s.stdio_command||"",s.stdio_args||"",s.stdio_cwd,s.env_vars||[])):(e=s.ui_type,n=s.connection_url||"",c=s.connection_token||null),{title:s.title,description:s.description||null,icon:s.icon??null,connection_type:e,connection_url:n,...c&&{connection_token:c},...o&&{connection_headers:o},configuration_state:s.configuration_state??null,configuration_scopes:s.configuration_scopes??null}}function ys({connection:s,connectionId:e,org:n,isUpdating:c,tools:o,prompts:i,resources:r,siblings:a}){const d=L(),p=ne({from:"/$org/settings/connections/$appSlug"}),m=Le(),l=we(),{org:f}=se(),u=Nt({onSuccess:()=>{a.length<=1&&p({to:"/$org/settings/connections",params:{org:n}})}}),[h,g]=Z.useState(null),[j,S]=Z.useState(!1),v=Ce({connectionId:e}),{data:y}=tt(),D=y?.data?.members??[],P=h??s,_=D.find(x=>x.userId===P.created_by),T=s?.connection_type==="VIRTUAL"||v.isAuthenticated,$={...s,tools:o},k=Je($,Qt),N=Be({resolver:qe(Ke),values:be(h??s)}),b=N.formState.isDirty,E=async()=>{if(!await N.trigger())return;const w=N.getValues(),O=Ss(w),C=h?.id??e;await l.update.mutateAsync({id:C,data:O}),N.reset(w)},z=()=>{N.reset(be(h??s))},I=async x=>{const w=s.configuration_scopes?.length?s.configuration_scopes.join(" "):void 0,{token:O,tokenInfo:C,error:F}=await rt({connectionId:x,orgSlug:f.slug,...w?{scope:w}:{}});if(F||!O){Y.error(d("details.connection.authFailed",{error:F??""}));return}if(C)try{const V=await fetch(`/api/${f.slug}/connections/${x}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:C.accessToken,refreshToken:C.refreshToken,expiresIn:C.expiresIn,scope:C.scope,clientId:C.clientId,clientSecret:C.clientSecret,tokenEndpoint:C.tokenEndpoint})});if(!V.ok)console.error("Failed to save OAuth token:",await V.text()),await l.update.mutateAsync({id:x,data:{connection_token:O}});else try{await l.update.mutateAsync({id:x,data:{}})}catch(ee){console.warn("Failed to refresh connection tools after OAuth:",ee)}}catch(V){console.error("Error saving OAuth token:",V),await l.update.mutateAsync({id:x,data:{connection_token:O}})}else await l.update.mutateAsync({id:x,data:{connection_token:O}});const G=new URL(`/api/${f.slug}/mcp/${x}`,window.location.origin);await m.invalidateQueries({queryKey:te.isMCPAuthenticated(G.href,null)}),await m.invalidateQueries({queryKey:te.mcpClientPrefix()}),Y.success(d("details.connection.authSuccess"))},A=()=>I(s.id),R=async()=>{try{const x=await fetch(`/api/${f.slug}/connections/${s.id}/oauth-token`,{method:"DELETE",credentials:"include"});if(!x.ok){const O=await x.text();Y.error(d("details.connection.failedRemoveOAuth",{error:O}));return}const w=new URL(`/api/${f.slug}/mcp/${s.id}`,window.location.origin);await m.invalidateQueries({queryKey:te.isMCPAuthenticated(w.href,null)}),Y.success(d("details.connection.oauthRemoved"))}catch(x){console.error("Error removing OAuth token:",x),Y.error(d("details.connection.failedRemoveOAuthError"))}};return t.jsxs(t.Fragment,{children:[t.jsx(St,{...u}),t.jsx(pt,{open:h!==null,onOpenChange:x=>{x||g(null)},children:t.jsxs(ft,{side:"right",className:"sm:max-w-[520px] p-0 flex flex-col gap-0 overflow-hidden",children:[t.jsxs(ht,{className:"px-4 py-3 md:px-6 md:py-4 border-b border-border shrink-0",children:[t.jsx(gt,{className:"text-base",children:h?.title??s.title}),t.jsx(jt,{className:"text-xs",children:d("details.connection.settingsDescription")}),_&&t.jsxs("div",{className:"flex items-center gap-1.5 pt-1",children:[t.jsx("span",{className:"text-xs text-muted-foreground",children:d("details.connection.connectedBy")}),t.jsx(st,{url:_.user?.image??void 0,fallback:_.user?.name??_.user?.email??"?",size:"3xs",shape:"circle"}),t.jsx("span",{className:"text-xs font-medium text-foreground",children:_.user?.name||_.user?.email})]})]}),t.jsxs(vt,{...N,children:[t.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 md:px-6 md:py-5 flex flex-col gap-4 md:gap-6",children:[t.jsxs("div",{className:"flex flex-col gap-3 md:gap-4",children:[t.jsx(K,{control:N.control,name:"title",render:({field:x})=>t.jsxs(Q,{children:[t.jsx(W,{children:d("details.connection.nameLabel")}),t.jsx(B,{children:t.jsx(J,{...x})}),t.jsx(X,{})]})}),t.jsx(K,{control:N.control,name:"description",render:({field:x})=>t.jsxs(Q,{children:[t.jsx(W,{children:d("details.connection.descriptionLabel")}),t.jsx(B,{children:t.jsx(J,{...x,value:x.value||""})}),t.jsx(X,{})]})})]}),t.jsx(js,{form:N,connection:h??s,hasOAuthToken:v.hasOAuthToken,onReauthenticate:A,onRemoveOAuth:R}),t.jsx(Ye,{connection:h??s,form:N,hasMcpBinding:k,isMCPAuthenticated:T,supportsOAuth:v.supportsOAuth,isServerError:v.isServerError,onAuthenticate:A,onViewReadme:void 0})]}),t.jsxs("div",{className:"px-6 py-4 border-t border-border flex gap-2 shrink-0",children:[t.jsx(q,{onClick:E,disabled:!b||c,className:"flex-1",children:d(c?"details.connection.savingButton":"details.connection.saveButton")}),b&&t.jsx(q,{variant:"outline",onClick:z,children:d("details.connection.undoButton")}),t.jsxs(q,{variant:"outline",className:"gap-2 text-muted-foreground hover:text-destructive hover:border-destructive",onClick:()=>{const x=h??s;g(null),u.requestDelete(x)},children:[t.jsx(ce,{size:15}),d("details.connection.deleteButton")]})]})]},h?.id??s.id)]})}),t.jsx(Ze,{hideTopbar:!0,children:t.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[t.jsx(gs,{connection:s,displayTitle:(()=>{const x=a[0]??s;return x.app_name?x.title.replace(/\s*\(\d+\)\s*$/,""):x.title})()}),t.jsx("div",{className:"flex-1 overflow-auto @container",children:t.jsxs("div",{className:"grid grid-cols-1 @3xl:grid-cols-2 gap-5 p-6",children:[t.jsx(rs,{connectionId:e}),t.jsxs("div",{className:"flex flex-col gap-5",children:[t.jsx(Jt,{instances:a,onConfigure:x=>g(x),onAuthenticate:x=>I(x.id),onDelete:x=>u.requestDelete(x),onToggleStatus:async(x,w)=>{try{await l.update.mutateAsync({id:x.id,data:{status:w}}),Y.success(d(w==="active"?"details.connection.connectionEnabled":"details.connection.connectionDisabled"))}catch{Y.error(d("details.connection.failedUpdateConnection"))}},isAdding:j,onAdd:async()=>{S(!0);try{const x=a[0]??s,w=x.title.replace(/\s*\(\d+\)\s*$/,""),O=a.length+1,C=`${w} (${O})`,F=Ge("conn");await l.create.mutateAsync({id:F,title:C,description:x.description??null,connection_type:x.connection_type,connection_url:x.connection_url??null,connection_token:null,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:x.created_by,organization_id:x.organization_id,icon:x.icon??null,app_name:x.app_name??null,app_id:x.app_id??null,connection_headers:x.connection_headers??null,oauth_config:null,configuration_state:x.configuration_state??null,metadata:null,tools:null,bindings:null,status:"inactive"});const G=new URL(`/api/${f.slug}/mcp/${F}`,window.location.origin),V=await at({url:G.href,token:null,orgId:f.id});V.supportsOAuth&&!V.isAuthenticated&&await I(F)}finally{S(!1)}}}),t.jsx(ds,{connection:s})]}),t.jsx("div",{className:"@3xl:col-span-2",children:t.jsx(xs,{tools:o,prompts:i,resources:r,connectionId:e,org:n})})]})})]})})]})}function Cs(){const s=U.c(52),e=L();let n;s[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/$org/settings/connections/$appSlug"},s[0]=n):n=s[0];const c=ne(n);let o;s[1]===Symbol.for("react.memo_cache_sentinel")?(o={from:"/shell/$org/settings/connections/$appSlug"},s[1]=o):o=s[1];const{appSlug:i,org:r}=Fe(o),{org:a}=se(),d=we();let p;s[2]!==i?(p={slug:i},s[2]=i,s[3]=p):p=s[3];const m=nt(p),l=m[0]??null,f=l?.id??"",u=f||null;let h;s[4]!==a.id||s[5]!==a.slug||s[6]!==u?(h={connectionId:u,orgId:a.id,orgSlug:a.slug},s[4]=a.id,s[5]=a.slug,s[6]=u,s[7]=h):h=s[7];const g=Ie(h);let j;s[8]!==g?(j={client:g},s[8]=g,s[9]=j):j=s[9];const{data:S}=it(j);let v;if(s[10]!==l?.tools||s[11]!==f||s[12]!==m||s[13]!==S){const I=S?S.tools.map(As):(l?.tools??[]).map(Ts);e:{if(m.length<=1){v=I;break e}const A=new Set,R=[],x=Is;for(const w of m){const O=w.id===f?I:x(w.tools);for(const C of O)A.has(C.name)||(A.add(C.name),R.push(C))}v=R.length>0?R:I}s[10]=l?.tools,s[11]=f,s[12]=m,s[13]=S,s[14]=v}else v=s[14];const y=v;let D;s[15]!==g?(D={client:g},s[15]=g,s[16]=D):D=s[16];const{data:P}=ot(D);let _;s[17]!==g?(_={client:g},s[17]=g,s[18]=_):_=s[18];const{data:M}=Ve(_);let T;s[19]!==P?.prompts?(T=P?.prompts??[],s[19]=P?.prompts,s[20]=T):T=s[20];let $;s[21]!==T?($=T.map(ws),s[21]=T,s[22]=$):$=s[22];const k=$;let N;s[23]!==M?.resources?(N=M?.resources??[],s[23]=M?.resources,s[24]=N):N=s[24];let b;s[25]!==N?(b=N.map(_s),s[25]=N,s[26]=b):b=s[26];const E=b;if(!l){let I;s[27]!==e?(I=e("details.connection.notFoundTitle"),s[27]=e,s[28]=I):I=s[28];let A;s[29]!==e?(A=e("details.connection.notFoundDescription"),s[29]=e,s[30]=A):A=s[30];let R;s[31]!==c||s[32]!==r?(R=()=>c({to:"/$org/settings/connections",params:{org:r}}),s[31]=c,s[32]=r,s[33]=R):R=s[33];let x;s[34]!==e?(x=e("details.connection.backButton"),s[34]=e,s[35]=x):x=s[35];let w;s[36]!==R||s[37]!==x?(w=t.jsx(q,{variant:"outline",onClick:R,children:x}),s[36]=R,s[37]=x,s[38]=w):w=s[38];let O;return s[39]!==I||s[40]!==A||s[41]!==w?(O=t.jsx("div",{className:"flex h-full w-full bg-background",children:t.jsx(ye,{title:I,description:A,actions:w})}),s[39]=I,s[40]=A,s[41]=w,s[42]=O):O=s[42],O}let z;return s[43]!==d.update.isPending||s[44]!==y||s[45]!==l||s[46]!==f||s[47]!==r||s[48]!==k||s[49]!==E||s[50]!==m?(z=t.jsx(ys,{org:r,connection:l,connectionId:f,isUpdating:d.update.isPending,tools:y,prompts:k,resources:E,siblings:m}),s[43]=d.update.isPending,s[44]=y,s[45]=l,s[46]=f,s[47]=r,s[48]=k,s[49]=E,s[50]=m,s[51]=z):z=s[51],z}function _s(s){return{name:s.name,description:s.description,uri:s.uri}}function ws(s){return{name:s.name,description:s.description}}function Is(s){return(s??[]).map(ks)}function ks(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema??{},outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ts(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function As(s){return{name:s.name,description:s.description,inputSchema:s.inputSchema,outputSchema:s.outputSchema,annotations:s.annotations,_meta:s._meta}}function Ds(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ue,{children:t.jsx(Z.Suspense,{fallback:t.jsx("div",{className:"flex h-full items-center justify-center bg-background",children:t.jsx(Ne,{className:"size-8 text-muted-foreground"})}),children:t.jsx(Cs,{})})}),s[0]=e):e=s[0],e}function Ui(){const s=U.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsx(Ds,{}),s[0]=e):e=s[0],e}export{Ui as default};
@@ -1 +1 @@
1
- import{aa as R,br as A,bt as I,ab as o,bq as j,bs as z,c as L,j as u,B as C}from"./index-z4bKt11m.js";import{I as H}from"./input-C7XH8Uj_.js";import{s as W}from"./Plus-D2HOi_DD.js";import{s as q}from"./Trash01-C6bziN5X.js";const K=R({key:o().min(1,"Key is required"),value:o()}),M=R({title:o().min(1,"Name is required"),description:o().nullable().optional(),icon:o().nullable().optional(),ui_type:z(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:o().optional(),connection_token:o().nullable().optional(),npx_package:o().optional(),stdio_command:o().optional(),stdio_args:o().optional(),stdio_cwd:o().optional(),env_vars:j(K).optional(),configuration_scopes:j(o()).nullable().optional(),configuration_state:A(o(),I()).nullable().optional()}).refine(n=>n.ui_type==="NPX"?!!n.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(n=>n.ui_type==="STDIO"?!!n.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(n=>n.ui_type==="HTTP"||n.ui_type==="SSE"||n.ui_type==="Websocket"?!!n.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]}).refine(n=>(n.ui_type==="HTTP"||n.ui_type==="SSE"||n.ui_type==="Websocket")&&n.connection_url?.trim()?o().url().safeParse(n.connection_url.trim()).success:!0,{message:"Enter a valid URL",path:["connection_url"]});function U(n){const e=n.toLowerCase();return!!(["secret","password","passwd","credential","private","token","bearer","jwt","refresh","session","api_key","apikey","auth_key","access_key","secret_key","private_key","service_key","encryption_key","signing_key","license_key","auth","oauth","client_secret","app_secret","webhook","signing","signature","database_url","db_url","mongo_uri","redis_url","postgres_url","mysql_url","connection_string","dsn","service_role","anon_key","supabase_key","openai","anthropic","stripe","twilio","sendgrid","resend","firebase","sentry","datadog","newrelic","new_relic","pplx","replicate","pinecone","cohere","hugging","hf_token","gh_token","npm_token","certificate","cert","ssl","tls","encryption","salt","hash","hmac","personal_access","github_pat","gitlab_pat","bitbucket_pat"].some(s=>e.includes(s))||["sk_","rk_","whsec_","pk_live","sk_live"].some(s=>e.startsWith(s))||["_key","_secret","_token","_password","_auth","_pat"].some(s=>e.endsWith(s)))}function X(n){const e=L.c(34),{value:t,onChange:r,keyPlaceholder:a,valuePlaceholder:s,className:v}=n,m=a===void 0?"VARIABLE_NAME":a,h=s===void 0?"value...":s;let b;e[0]!==r||e[1]!==t?(b=()=>{r([...t,{key:"",value:""}])},e[0]=r,e[1]=t,e[2]=b):b=e[2];const N=b;let x;e[3]!==r||e[4]!==t?(x=l=>{r(t.filter((p,i)=>i!==l))},e[3]=r,e[4]=t,e[5]=x):x=e[5];const y=x;let P;e[6]!==r||e[7]!==t?(P=(l,p)=>{const i=[...t],c=i[l];c&&(i[l]={key:p,value:c.value},r(i))},e[6]=r,e[7]=t,e[8]=P):P=e[8];const g=P;let T;e[9]!==r||e[10]!==t?(T=(l,p)=>{const i=[...t],c=i[l];c&&(i[l]={key:c.key,value:p},r(i))},e[9]=r,e[10]=t,e[11]=T):T=e[11];const k=T;let f;if(e[12]!==g||e[13]!==y||e[14]!==k||e[15]!==m||e[16]!==t||e[17]!==h){let l;e[19]!==g||e[20]!==y||e[21]!==k||e[22]!==m||e[23]!==h?(l=(p,i)=>u.jsxs("div",{className:"flex gap-2 items-center",children:[u.jsx(H,{placeholder:m,value:p.key,onChange:c=>g(i,c.target.value),className:"h-10 rounded-lg flex-1 font-mono text-sm"}),u.jsx(H,{type:U(p.key)?"password":"text",placeholder:h,value:p.value,onChange:c=>k(i,c.target.value),className:"h-10 rounded-lg flex-1"}),u.jsx(C,{type:"button",variant:"ghost",size:"icon",className:"h-10 w-10 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>y(i),children:u.jsx(q,{size:16})})]},i),e[19]=g,e[20]=y,e[21]=k,e[22]=m,e[23]=h,e[24]=l):l=e[24],f=t.map(l),e[12]=g,e[13]=y,e[14]=k,e[15]=m,e[16]=t,e[17]=h,e[18]=f}else f=e[18];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=u.jsx(W,{size:16,className:"mr-1"}),e[25]=w):w=e[25];let d;e[26]!==N?(d=u.jsxs(C,{type:"button",variant:"outline",size:"sm",className:"w-full h-9 text-muted-foreground",onClick:N,children:[w,"Add Environment Variable"]}),e[26]=N,e[27]=d):d=e[27];let _;e[28]!==f||e[29]!==d?(_=u.jsxs("div",{className:"flex flex-col gap-2",children:[f,d]}),e[28]=f,e[29]=d,e[30]=_):_=e[30];let E;return e[31]!==v||e[32]!==_?(E=u.jsx("div",{className:v,children:_}),e[31]=v,e[32]=_,e[33]=E):E=e[33],E}function V(n){const e={};for(const{key:t,value:r}of n)t.trim()&&(e[t.trim()]=r);return e}function D(n){return n?Object.entries(n).map(([e,t])=>({key:e,value:t})):[]}function S(n){const e=n.trim();if(!e)return"";try{const t=new URL(e),r=t.pathname.length>1?t.pathname.replace(/\/+$/,""):t.pathname;return`${t.origin}${r}`}catch{return e.replace(/\/+$/,"")}}function F(n){const e=n.trim().split(/\s+/).filter(Boolean);if(e.length<2)return null;const t=e[0]?.toLowerCase();if(t!=="npx"&&t!=="bunx")return null;const a=e.slice(1).find(s=>!s.startsWith("-"));return a?{packageName:a}:null}function Y(n){const{uiType:e}=n,t=S(n.connectionUrl??"");if((e==="HTTP"||e==="SSE"||e==="Websocket")&&t===S("https://api.githubcopilot.com/mcp/"))return{id:"github",title:"GitHub",description:"GitHub Copilot MCP",token:{label:"GitHub PAT",placeholder:"github_pat_…",helperText:"Paste a GitHub Personal Access Token (PAT)"}};const r=(n.npxPackage??"").trim();return e==="NPX"&&r==="@perplexity-ai/mcp-server"?{id:"perplexity",title:"Perplexity",description:"Perplexity MCP Server",envVarKeys:["PERPLEXITY_API_KEY"]}:null}function J(n){if(n.registryItems.length===0||n.uiType!=="HTTP"&&n.uiType!=="SSE"&&n.uiType!=="Websocket")return null;const e=S(n.connectionUrl??"");if(!e)return null;const t=n.registryItems.find(s=>(s.server?.remotes??[]).some(m=>S(m.url??"")===e));if(!t)return null;const r=t.title||t.name||t.server?.title||t.server?.name||"",a=t.server?.description||t.description||t.summary||null;return r?{id:"registry",title:r,description:a}:null}function Q(n,e){const t={command:"npx",args:["-y",n]},r=V(e);return Object.keys(r).length>0&&(t.envVars=r),t}function Z(n,e,t,r){const a={command:n};e.trim()&&(a.args=e.trim().split(/\s+/)),t?.trim()&&(a.cwd=t.trim());const s=V(r);return Object.keys(s).length>0&&(a.envVars=s),a}export{X as E,J as a,Q as b,M as c,Z as d,Y as i,F as p,D as r};
1
+ import{aa as R,br as A,bt as I,ab as o,bq as j,bs as z,c as L,j as u,B as C}from"./index-Dc7hzqoi.js";import{I as H}from"./input-DXlaTX4w.js";import{s as W}from"./Plus-CVauOqLT.js";import{s as q}from"./Trash01-nl-t4IoV.js";const K=R({key:o().min(1,"Key is required"),value:o()}),M=R({title:o().min(1,"Name is required"),description:o().nullable().optional(),icon:o().nullable().optional(),ui_type:z(["HTTP","SSE","Websocket","NPX","STDIO"]),connection_url:o().optional(),connection_token:o().nullable().optional(),npx_package:o().optional(),stdio_command:o().optional(),stdio_args:o().optional(),stdio_cwd:o().optional(),env_vars:j(K).optional(),configuration_scopes:j(o()).nullable().optional(),configuration_state:A(o(),I()).nullable().optional()}).refine(n=>n.ui_type==="NPX"?!!n.npx_package?.trim():!0,{message:"NPM package is required",path:["npx_package"]}).refine(n=>n.ui_type==="STDIO"?!!n.stdio_command?.trim():!0,{message:"Command is required",path:["stdio_command"]}).refine(n=>n.ui_type==="HTTP"||n.ui_type==="SSE"||n.ui_type==="Websocket"?!!n.connection_url?.trim():!0,{message:"URL is required",path:["connection_url"]}).refine(n=>(n.ui_type==="HTTP"||n.ui_type==="SSE"||n.ui_type==="Websocket")&&n.connection_url?.trim()?o().url().safeParse(n.connection_url.trim()).success:!0,{message:"Enter a valid URL",path:["connection_url"]});function U(n){const e=n.toLowerCase();return!!(["secret","password","passwd","credential","private","token","bearer","jwt","refresh","session","api_key","apikey","auth_key","access_key","secret_key","private_key","service_key","encryption_key","signing_key","license_key","auth","oauth","client_secret","app_secret","webhook","signing","signature","database_url","db_url","mongo_uri","redis_url","postgres_url","mysql_url","connection_string","dsn","service_role","anon_key","supabase_key","openai","anthropic","stripe","twilio","sendgrid","resend","firebase","sentry","datadog","newrelic","new_relic","pplx","replicate","pinecone","cohere","hugging","hf_token","gh_token","npm_token","certificate","cert","ssl","tls","encryption","salt","hash","hmac","personal_access","github_pat","gitlab_pat","bitbucket_pat"].some(s=>e.includes(s))||["sk_","rk_","whsec_","pk_live","sk_live"].some(s=>e.startsWith(s))||["_key","_secret","_token","_password","_auth","_pat"].some(s=>e.endsWith(s)))}function X(n){const e=L.c(34),{value:t,onChange:r,keyPlaceholder:a,valuePlaceholder:s,className:v}=n,m=a===void 0?"VARIABLE_NAME":a,h=s===void 0?"value...":s;let b;e[0]!==r||e[1]!==t?(b=()=>{r([...t,{key:"",value:""}])},e[0]=r,e[1]=t,e[2]=b):b=e[2];const N=b;let x;e[3]!==r||e[4]!==t?(x=l=>{r(t.filter((p,i)=>i!==l))},e[3]=r,e[4]=t,e[5]=x):x=e[5];const y=x;let P;e[6]!==r||e[7]!==t?(P=(l,p)=>{const i=[...t],c=i[l];c&&(i[l]={key:p,value:c.value},r(i))},e[6]=r,e[7]=t,e[8]=P):P=e[8];const g=P;let T;e[9]!==r||e[10]!==t?(T=(l,p)=>{const i=[...t],c=i[l];c&&(i[l]={key:c.key,value:p},r(i))},e[9]=r,e[10]=t,e[11]=T):T=e[11];const k=T;let f;if(e[12]!==g||e[13]!==y||e[14]!==k||e[15]!==m||e[16]!==t||e[17]!==h){let l;e[19]!==g||e[20]!==y||e[21]!==k||e[22]!==m||e[23]!==h?(l=(p,i)=>u.jsxs("div",{className:"flex gap-2 items-center",children:[u.jsx(H,{placeholder:m,value:p.key,onChange:c=>g(i,c.target.value),className:"h-10 rounded-lg flex-1 font-mono text-sm"}),u.jsx(H,{type:U(p.key)?"password":"text",placeholder:h,value:p.value,onChange:c=>k(i,c.target.value),className:"h-10 rounded-lg flex-1"}),u.jsx(C,{type:"button",variant:"ghost",size:"icon",className:"h-10 w-10 shrink-0 text-muted-foreground hover:text-destructive",onClick:()=>y(i),children:u.jsx(q,{size:16})})]},i),e[19]=g,e[20]=y,e[21]=k,e[22]=m,e[23]=h,e[24]=l):l=e[24],f=t.map(l),e[12]=g,e[13]=y,e[14]=k,e[15]=m,e[16]=t,e[17]=h,e[18]=f}else f=e[18];let w;e[25]===Symbol.for("react.memo_cache_sentinel")?(w=u.jsx(W,{size:16,className:"mr-1"}),e[25]=w):w=e[25];let d;e[26]!==N?(d=u.jsxs(C,{type:"button",variant:"outline",size:"sm",className:"w-full h-9 text-muted-foreground",onClick:N,children:[w,"Add Environment Variable"]}),e[26]=N,e[27]=d):d=e[27];let _;e[28]!==f||e[29]!==d?(_=u.jsxs("div",{className:"flex flex-col gap-2",children:[f,d]}),e[28]=f,e[29]=d,e[30]=_):_=e[30];let E;return e[31]!==v||e[32]!==_?(E=u.jsx("div",{className:v,children:_}),e[31]=v,e[32]=_,e[33]=E):E=e[33],E}function V(n){const e={};for(const{key:t,value:r}of n)t.trim()&&(e[t.trim()]=r);return e}function D(n){return n?Object.entries(n).map(([e,t])=>({key:e,value:t})):[]}function S(n){const e=n.trim();if(!e)return"";try{const t=new URL(e),r=t.pathname.length>1?t.pathname.replace(/\/+$/,""):t.pathname;return`${t.origin}${r}`}catch{return e.replace(/\/+$/,"")}}function F(n){const e=n.trim().split(/\s+/).filter(Boolean);if(e.length<2)return null;const t=e[0]?.toLowerCase();if(t!=="npx"&&t!=="bunx")return null;const a=e.slice(1).find(s=>!s.startsWith("-"));return a?{packageName:a}:null}function Y(n){const{uiType:e}=n,t=S(n.connectionUrl??"");if((e==="HTTP"||e==="SSE"||e==="Websocket")&&t===S("https://api.githubcopilot.com/mcp/"))return{id:"github",title:"GitHub",description:"GitHub Copilot MCP",token:{label:"GitHub PAT",placeholder:"github_pat_…",helperText:"Paste a GitHub Personal Access Token (PAT)"}};const r=(n.npxPackage??"").trim();return e==="NPX"&&r==="@perplexity-ai/mcp-server"?{id:"perplexity",title:"Perplexity",description:"Perplexity MCP Server",envVarKeys:["PERPLEXITY_API_KEY"]}:null}function J(n){if(n.registryItems.length===0||n.uiType!=="HTTP"&&n.uiType!=="SSE"&&n.uiType!=="Websocket")return null;const e=S(n.connectionUrl??"");if(!e)return null;const t=n.registryItems.find(s=>(s.server?.remotes??[]).some(m=>S(m.url??"")===e));if(!t)return null;const r=t.title||t.name||t.server?.title||t.server?.name||"",a=t.server?.description||t.description||t.summary||null;return r?{id:"registry",title:r,description:a}:null}function Q(n,e){const t={command:"npx",args:["-y",n]},r=V(e);return Object.keys(r).length>0&&(t.envVars=r),t}function Z(n,e,t,r){const a={command:n};e.trim()&&(a.args=e.trim().split(/\s+/)),t?.trim()&&(a.cwd=t.trim());const s=V(r);return Object.keys(s).length>0&&(a.envVars=s),a}export{X as E,J as a,Q as b,M as c,Z as d,Y as i,F as p,D as r};