@decocms/mesh 2.132.0 → 2.133.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (219) hide show
  1. package/dist/client/assets/{AlertCircle-Dvy3oHwl.js → AlertCircle-DtdVhcv9.js} +1 -1
  2. package/dist/client/assets/{AlignLeft-C1Pd8crU.js → AlignLeft-CRHzRLnb.js} +1 -1
  3. package/dist/client/assets/{ArrowDown-B0XF9QfR.js → ArrowDown-CD9f6dVF.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-Ddv8Es1G.js → ArrowLeft-Dse_UWo5.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-CjPyEOxC.js → ArrowUp-C5pU0t20.js} +1 -1
  6. package/dist/client/assets/{Check-BGWNBpXb.js → Check-llxZXJNk.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-CDdaecse.js → CheckCircle-naMxBwcc.js} +1 -1
  8. package/dist/client/assets/{CheckDone01-DgNkGXSd.js → CheckDone01-DArNoCeR.js} +1 -1
  9. package/dist/client/assets/{CheckVerified02-yC2IepeU.js → CheckVerified02-B5N8FkZi.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-CxLgy5uI.js → ChevronDown-BPvdqfh0.js} +1 -1
  11. package/dist/client/assets/ChevronLeft-BmfUl3Br.js +1 -0
  12. package/dist/client/assets/{ChevronRight-B-dZm0Fo.js → ChevronRight-bI92hTEK.js} +1 -1
  13. package/dist/client/assets/{Clock-DjTfMWYb.js → Clock-DCqyBdVg.js} +1 -1
  14. package/dist/client/assets/{Code01-C4dpeKsY.js → Code01-Cw3aSJX_.js} +1 -1
  15. package/dist/client/assets/{Container-CH2V2ATa.js → Container-BcN3rU1W.js} +1 -1
  16. package/dist/client/assets/{Copy01-Ba42JLNP.js → Copy01-DOsfcAr7.js} +1 -1
  17. package/dist/client/assets/{Dataflow03-Dbafm5jn.js → Dataflow03-BzHLq4N3.js} +1 -1
  18. package/dist/client/assets/{DotsHorizontal-DF0XToJT.js → DotsHorizontal-jg8p8szZ.js} +1 -1
  19. package/dist/client/assets/{DotsVertical-D-x0DTAA.js → DotsVertical-D7GBR06C.js} +1 -1
  20. package/dist/client/assets/{Download01-x2RmdAQh.js → Download01-Dqv2OtJR.js} +1 -1
  21. package/dist/client/assets/{Edit01-NXKv8M2Y.js → Edit01-PGiGF51x.js} +1 -1
  22. package/dist/client/assets/{Eye-Da9OHWjs.js → Eye-BHQjRrk8.js} +1 -1
  23. package/dist/client/assets/{File02-BBbAYdh-.js → File02-8H6UbpEV.js} +1 -1
  24. package/dist/client/assets/{File06-CZSeKcKm.js → File06-C1Sd5E1A.js} +1 -1
  25. package/dist/client/assets/{FilterLines-CR4t6v_B.js → FilterLines-C4D0sIiB.js} +1 -1
  26. package/dist/client/assets/{Globe01-sstJp1qH.js → Globe01-DvHitX1A.js} +1 -1
  27. package/dist/client/assets/{Globe02-DED7nhMo.js → Globe02-8eZbLs7z.js} +1 -1
  28. package/dist/client/assets/{Grid01-C85povgK.js → Grid01-CfCG1RrY.js} +1 -1
  29. package/dist/client/assets/{Hash02-B-r__uQj.js → Hash02-B4zt7eqf.js} +1 -1
  30. package/dist/client/assets/{Home02-P9zxIWnB.js → Home02-BgWCBPhH.js} +1 -1
  31. package/dist/client/assets/{Image01-CyQ-9pmM.js → Image01-B8svV61f.js} +1 -1
  32. package/dist/client/assets/{Inbox01-DUxLR6jm.js → Inbox01-DktY8c3P.js} +1 -1
  33. package/dist/client/assets/{InfoCircle-ORvzz6Jj.js → InfoCircle-DDBpFLdR.js} +1 -1
  34. package/dist/client/assets/{Key01-B3LfJVTz.js → Key01-eAlJ77G3.js} +1 -1
  35. package/dist/client/assets/{LayersTwo01-D0hB1mlt.js → LayersTwo01-Cre7WmYe.js} +1 -1
  36. package/dist/client/assets/{LayoutLeft-CIizJ9p-.js → LayoutLeft-BdPuu6bH.js} +1 -1
  37. package/dist/client/assets/{LinkExternal01-zIQsCZyp.js → LinkExternal01-1-7TA6Ra.js} +1 -1
  38. package/dist/client/assets/{List-Dy03iFlP.js → List-uQZNVPQ-.js} +1 -1
  39. package/dist/client/assets/{Loading01-DvHkBn5K.js → Loading01-DUUFtL7S.js} +1 -1
  40. package/dist/client/assets/{Lock01-b36hjLYg.js → Lock01-BqRcOfbm.js} +1 -1
  41. package/dist/client/assets/{Play-B4gSKcOc.js → Play-DTlFqxwD.js} +1 -1
  42. package/dist/client/assets/{Plus-C48LE9QF.js → Plus-2wrCLrAD.js} +1 -1
  43. package/dist/client/assets/{RefreshCcw01-B_P3Otqi.js → RefreshCcw01-CmQ_Zyfb.js} +1 -1
  44. package/dist/client/assets/{Rows03-RYFV31vk.js → Rows03-CeP6X8F6.js} +1 -1
  45. package/dist/client/assets/{Save01-C9eXS7Z1.js → Save01-Cq59fc-a.js} +1 -1
  46. package/dist/client/assets/{SearchMd-Bec1mZCp.js → SearchMd-DOdaT51-.js} +1 -1
  47. package/dist/client/assets/{Settings01-CGjDKLLq.js → Settings01-jEDDrq49.js} +1 -1
  48. package/dist/client/assets/{Shield01-QPvxKI9B.js → Shield01-_lpY_BlD.js} +1 -1
  49. package/dist/client/assets/{Terminal-Dg9FTns0.js → Terminal-CZIzfu4H.js} +1 -1
  50. package/dist/client/assets/{Trash01-DfwWsbuW.js → Trash01-DJpn1VG4.js} +1 -1
  51. package/dist/client/assets/{Upload01-CBnp-ZgO.js → Upload01-c6QpJwvP.js} +1 -1
  52. package/dist/client/assets/{Users03-zNQ-U5kI.js → Users03--eiqKjb_.js} +1 -1
  53. package/dist/client/assets/{X-BaOBrQh9.js → X-BGHsyt4s.js} +1 -1
  54. package/dist/client/assets/{XCircle-CGBoiIiF.js → XCircle-BJSW1V34.js} +1 -1
  55. package/dist/client/assets/{XClose-D5oa0b17.js → XClose-CYrOe1GU.js} +1 -1
  56. package/dist/client/assets/{Zap-B8kjj6jV.js → Zap-Div5wKlF.js} +1 -1
  57. package/dist/client/assets/{agent-connections-preview-CpRlCZek.js → agent-connections-preview-B33aUr8j.js} +1 -1
  58. package/dist/client/assets/agent-detail-B1r6DbgP.js +2 -0
  59. package/dist/client/assets/agents--1wlh1On.js +1 -0
  60. package/dist/client/assets/{alert-dialog-CHhoNaC0.js → alert-dialog-WtbKGn3h.js} +1 -1
  61. package/dist/client/assets/{auth-catchall-Bks-N8b9.js → auth-catchall-C-FIrDOU.js} +1 -1
  62. package/dist/client/assets/{avatar-DX9xarA9.js → avatar-C0Za2Leb.js} +1 -1
  63. package/dist/client/assets/{badge-CMOYVtO8.js → badge-zns1OAW0.js} +1 -1
  64. package/dist/client/assets/{binder-CN-yhtfQ.js → binder-C2Kwp5aI.js} +1 -1
  65. package/dist/client/assets/{breadcrumb-CtNnsyqL.js → breadcrumb-BF7wgZMj.js} +1 -1
  66. package/dist/client/assets/{card-BECXECFc.js → card-yVoc5Dl_.js} +1 -1
  67. package/dist/client/assets/{chart-CA07zGfe.js → chart-C09J-0j8.js} +1 -1
  68. package/dist/client/assets/{checkbox-Bs5NWE_x.js → checkbox-C_yzLnRo.js} +1 -1
  69. package/dist/client/assets/{circle-alert-CEhC-Q81.js → circle-alert-DEWKfuYJ.js} +1 -1
  70. package/dist/client/assets/collapsible-e1478K7w.js +23 -0
  71. package/dist/client/assets/{collection-detail-CNXxywSm.js → collection-detail-12bPsl9i.js} +3 -3
  72. package/dist/client/assets/{collection-search-aEfiIRVT.js → collection-search-g7bCyEl4.js} +1 -1
  73. package/dist/client/assets/collection-tab-hxaftEha.js +1 -0
  74. package/dist/client/assets/{collection-table-wrapper-hM0ppyEG.js → collection-table-wrapper-Bx_0GgHe.js} +1 -1
  75. package/dist/client/assets/{collection-tabs-Dc6gZtTz.js → collection-tabs-CGvjmn7e.js} +1 -1
  76. package/dist/client/assets/{command-DI3JwfrE.js → command-DvXRXkaf.js} +1 -1
  77. package/dist/client/assets/{connect-C0SuJwzK.js → connect-BHcfLUsx.js} +1 -1
  78. package/dist/client/assets/{connection-card-CzCUOjTN.js → connection-card-Of-LfoL9.js} +1 -1
  79. package/dist/client/assets/connection-detail-Bfp_CthH.js +1 -0
  80. package/dist/client/assets/connections-CMRFgF2z.js +1 -0
  81. package/dist/client/assets/constants-BMZNxJu4.js +1 -0
  82. package/dist/client/assets/{constants-0JLhMmM7.js → constants-DLWxw8L_.js} +1 -1
  83. package/dist/client/assets/{create-organization-dialog-BRKsH8XB.js → create-organization-dialog-DHmNDQVx.js} +1 -1
  84. package/dist/client/assets/{create-project-dialog-BUAUU3kY.js → create-project-dialog-BURFxz7l.js} +1 -1
  85. package/dist/client/assets/{danger--r_qw5of.js → danger-D0vNOgTj.js} +1 -1
  86. package/dist/client/assets/{danger-zone-fH4LWpAE.js → danger-zone-Dhz8OLxh.js} +1 -1
  87. package/dist/client/assets/decopilot-events-C1i2IOcF.js +1 -0
  88. package/dist/client/assets/{dependencies-CfLZZ12D.js → dependencies-DQgcVkpb.js} +1 -1
  89. package/dist/client/assets/{dialog-CzmRWg_H.js → dialog-B8ODwZHJ.js} +1 -1
  90. package/dist/client/assets/{dropdown-menu-bZQdGgsX.js → dropdown-menu-Bv0kDZGf.js} +1 -1
  91. package/dist/client/assets/{dynamic-plugin-layout-B44KCK2N.js → dynamic-plugin-layout-CfJ2iWdk.js} +1 -1
  92. package/dist/client/assets/editable-task-title-BECK0S9m.js +16 -0
  93. package/dist/client/assets/{empty-state-BuKC-FeY.js → empty-state-CS91-o6R.js} +1 -1
  94. package/dist/client/assets/{env-vars-editor-BUYd05S1.js → env-vars-editor-BoUKrNdn.js} +1 -1
  95. package/dist/client/assets/{extract-connection-data-CDK2P3aY.js → extract-connection-data-DPrPXrw7.js} +1 -1
  96. package/dist/client/assets/{file-browser-B8HL2Mki.js → file-browser-Dyg6fn_p.js} +2 -2
  97. package/dist/client/assets/{form-EW4LFI0z.js → form-Bqy3P0kv.js} +1 -1
  98. package/dist/client/assets/{general-B-SJAejg.js → general-CcOfiluy.js} +1 -1
  99. package/dist/client/assets/{grid-view-B2G72x7D.js → grid-view-uc2-Xd10.js} +1 -1
  100. package/dist/client/assets/{home-C_Jstend.js → home-DYjBdnSm.js} +1 -1
  101. package/dist/client/assets/{index-RIE02s6T.js → index-1pfseT2B.js} +1 -1
  102. package/dist/client/assets/{index-BeKO7nFo.js → index-5XdaBbnC.js} +1 -1
  103. package/dist/client/assets/{index-hfshaOuF.js → index-B1uFfuid.js} +1 -1
  104. package/dist/client/assets/{index-gksA6r5d.js → index-BLvVZqmB.js} +1 -1
  105. package/dist/client/assets/{index-kE57LLiG.js → index-Br7gqIns.js} +22 -22
  106. package/dist/client/assets/{index-Cp50RRud.js → index-CLZkaGlC.js} +1 -1
  107. package/dist/client/assets/index-CUEtQJPr.css +1 -0
  108. package/dist/client/assets/index-CjU9lWJN.js +1 -0
  109. package/dist/client/assets/{index-CzFqQvXW.js → index-DVHuYwO5.js} +4 -4
  110. package/dist/client/assets/{index-V5ecgDUm.js → index-tDb6lai2.js} +1 -1
  111. package/dist/client/assets/{infiniteQueryObserver-B0QSZ6Wg.js → infiniteQueryObserver-BU31NXJd.js} +1 -1
  112. package/dist/client/assets/{input-Rcf9et7W.js → input-CImrwNsE.js} +1 -1
  113. package/dist/client/assets/{integration-icon-Cr629JYK.js → integration-icon-CqdgwTQM.js} +1 -1
  114. package/dist/client/assets/{label-DdGHGWov.js → label-BEcdY3zl.js} +1 -1
  115. package/dist/client/assets/{layout-CUeJn5m4.js → layout-Cegg55DQ.js} +1 -1
  116. package/dist/client/assets/{layout-DvurrRZC.js → layout-D1FJR7dQ.js} +1 -1
  117. package/dist/client/assets/localstorage-keys-B3yhvN27.js +1 -0
  118. package/dist/client/assets/{login-C70j40x2.js → login-gpMZSjc_.js} +1 -1
  119. package/dist/client/assets/{markdown-BsZjpnFH.js → markdown-DigmZCi5.js} +1 -1
  120. package/dist/client/assets/{mcp-app-renderer-aRjr0jcc.js → mcp-app-renderer-elbh_bK3.js} +1 -1
  121. package/dist/client/assets/{mcp-oauth-Dk3osgIf.js → mcp-oauth-BJK3oSr3.js} +1 -1
  122. package/dist/client/assets/{mcp-server-card-znSfWcaP.js → mcp-server-card-B_3KckAV.js} +1 -1
  123. package/dist/client/assets/{mcp-server-detail-Csm9j29j.js → mcp-server-detail-BGmK7vBO.js} +2 -2
  124. package/dist/client/assets/{members-WbcVb7yX.js → members-DkvmaHrL.js} +1 -1
  125. package/dist/client/assets/{monitoring-dashboard-edit-ChxkdsCv.js → monitoring-dashboard-edit-Dq449CGn.js} +1 -1
  126. package/dist/client/assets/{monitoring-dashboard-view-CL8P3Zx7.js → monitoring-dashboard-view-KyEbCseW.js} +2 -2
  127. package/dist/client/assets/{monitoring-Dth-Uzfq.js → monitoring-mMb4oyh8.js} +2 -2
  128. package/dist/client/assets/{oauth-callback-CXzK_RYv.js → oauth-callback-BWIw_10O.js} +1 -1
  129. package/dist/client/assets/page-LuWQuTOB.js +1 -0
  130. package/dist/client/assets/{page-CCrDZNhS.js → page-MLghIZgZ.js} +1 -1
  131. package/dist/client/assets/{plugin-empty-state-D7gmiZlA.js → plugin-empty-state-BYi0xCDZ.js} +1 -1
  132. package/dist/client/assets/{plugin-empty-state-BIuYztei.js → plugin-empty-state-CfkX75Qn.js} +1 -1
  133. package/dist/client/assets/{plugin-header-BLBENlfU.js → plugin-header-Bpxodj_N.js} +1 -1
  134. package/dist/client/assets/{plugin-header-CmlDS_hv.js → plugin-header-C8NyMNoe.js} +1 -1
  135. package/dist/client/assets/plugins-VAc5tGcP.js +1 -0
  136. package/dist/client/assets/{popover-C5F2AcFP.js → popover-R_PT2IPW.js} +1 -1
  137. package/dist/client/assets/{project-app-view-NryMJvXO.js → project-app-view-Bai-Qf0R.js} +1 -1
  138. package/dist/client/assets/project-layout-daZ99y7q.js +1 -0
  139. package/dist/client/assets/{project-plugins-QbLHCPXi.js → project-plugins-D9btRO1g.js} +1 -1
  140. package/dist/client/assets/{projects-list-B_wyuNYf.js → projects-list-DLyGtlCx.js} +1 -1
  141. package/dist/client/assets/{ranking-layout-CVBOyQIw.js → ranking-layout-Difw19Tu.js} +1 -1
  142. package/dist/client/assets/{readme-viewer-BmxWIpiS.js → readme-viewer-DMIs62Jq.js} +1 -1
  143. package/dist/client/assets/{registry-layout-DHUM9TZu.js → registry-layout-DUQv-gnE.js} +1 -1
  144. package/dist/client/assets/{registry-utils-DRX9Fl5Z.js → registry-utils-BL3Z-ZuV.js} +1 -1
  145. package/dist/client/assets/{reports-layout-GUNpInzx.js → reports-layout-DOweGRAi.js} +1 -1
  146. package/dist/client/assets/{reset-password-C_jAWNzd.js → reset-password-gTGJs4eA.js} +1 -1
  147. package/dist/client/assets/{resizable-CmbMtBt6.js → resizable-C-gCkuLt.js} +1 -1
  148. package/dist/client/assets/{save-actions-CH-zbfme.js → save-actions-CdZGxDIR.js} +1 -1
  149. package/dist/client/assets/{scroll-area-B5BKtcc-.js → scroll-area-DsCd8vj6.js} +1 -1
  150. package/dist/client/assets/{select-CSl7KVC3.js → select-CZ5oa2ZG.js} +1 -1
  151. package/dist/client/assets/shell-layout-D95AudRc.js +3 -0
  152. package/dist/client/assets/{sidebar-settings-98pHpdNk.js → sidebar-settings-DoYo5_2f.js} +1 -1
  153. package/dist/client/assets/{skeleton-BGGjmBE-.js → skeleton-DIOpAjh1.js} +1 -1
  154. package/dist/client/assets/{spinner-BubUCjpb.js → spinner-B-yGP95y.js} +1 -1
  155. package/dist/client/assets/{store-invite-BidZUMAQ.js → store-invite-COyr13nI.js} +1 -1
  156. package/dist/client/assets/{switch-D_s2nP_j.js → switch-C_rwAMG7.js} +1 -1
  157. package/dist/client/assets/{table-C7IfzCau.js → table-BwN-DdG1.js} +1 -1
  158. package/dist/client/assets/tabs-CTOkjsDF.js +1 -0
  159. package/dist/client/assets/tasks-CxbK_rAM.js +1 -0
  160. package/dist/client/assets/tasks-panel-CI07RnJW.js +1 -0
  161. package/dist/client/assets/{textarea-CumbsokS.js → textarea-BOlS_fKd.js} +1 -1
  162. package/dist/client/assets/{time-range-picker-Brh1Ym1N.js → time-range-picker-DWAp9G7R.js} +4 -4
  163. package/dist/client/assets/{toggle-group-DaSKpJH5.js → toggle-group-CRwxfPk7.js} +1 -1
  164. package/dist/client/assets/{tools-list-BvNNjQQL.js → tools-list-CQrrEoBF.js} +1 -1
  165. package/dist/client/assets/{tooltip-BGn6dJhi.js → tooltip-BsUirxUt.js} +1 -1
  166. package/dist/client/assets/{topbar-portal-mNbAP1zZ.js → topbar-portal-Cy4hr4gX.js} +1 -1
  167. package/dist/client/assets/{types-CnosXlf3.js → types-gEqZqH3b.js} +1 -1
  168. package/dist/client/assets/{use-binding-Ctbwf5zu.js → use-binding-Dx_NAnJa.js} +1 -1
  169. package/dist/client/assets/{use-connection-CmCfM9T5.js → use-connection-CwB1S0Lk.js} +1 -1
  170. package/dist/client/assets/{use-copy-Dn5NzC6Z.js → use-copy-uCRP4yn6.js} +1 -1
  171. package/dist/client/assets/{use-create-virtual-mcp-b6Af6scy.js → use-create-virtual-mcp-Bm7L9HAR.js} +1 -1
  172. package/dist/client/assets/{use-install-from-registry-D4coW5d-.js → use-install-from-registry-CMYlie1K.js} +1 -1
  173. package/dist/client/assets/use-list-state-EN77XpOY.js +1 -0
  174. package/dist/client/assets/{use-llm-CPv795TN.js → use-llm-C5Q0H0cZ.js} +1 -1
  175. package/dist/client/assets/{use-mcp-resources--6yZ25c2.js → use-mcp-resources-kkSzYGiM.js} +1 -1
  176. package/dist/client/assets/{use-mcp-tools-BTHDM3P3.js → use-mcp-tools-CT-LTM8z.js} +1 -1
  177. package/dist/client/assets/{use-members-Dzw-FOpA.js → use-members-CYCHCBAZ.js} +1 -1
  178. package/dist/client/assets/{use-mobile-DIBT-lEk.js → use-mobile-Bot_hVI8.js} +1 -1
  179. package/dist/client/assets/{use-project-Bd8syAM2.js → use-project-C5wS8512.js} +1 -1
  180. package/dist/client/assets/{use-settings-modal-D-rqbyuf.js → use-settings-modal-TyiexX8v.js} +1 -1
  181. package/dist/client/assets/{use-view-mode-k6uWDVq8.js → use-view-mode-CS5zZIj8.js} +1 -1
  182. package/dist/client/assets/{use-virtual-mcp-CaM9kbfY.js → use-virtual-mcp-CGnbrFrJ.js} +1 -1
  183. package/dist/client/assets/useInfiniteQuery-CutnJ4kj.js +1 -0
  184. package/dist/client/assets/{useMutation-DsQcwaJP.js → useMutation-BskhtN65.js} +1 -1
  185. package/dist/client/assets/useQuery-CxvwMb--.js +1 -0
  186. package/dist/client/assets/useSuspenseInfiniteQuery-DrLfXfJc.js +1 -0
  187. package/dist/client/assets/user-BRVh4xuS.js +1 -0
  188. package/dist/client/assets/workflow-D7s-e1ZH.js +1 -0
  189. package/dist/client/index.html +2 -2
  190. package/dist/server/cli.js +2 -1
  191. package/dist/server/server.js +2 -1
  192. package/package.json +1 -1
  193. package/dist/client/assets/AlertOctagon-Y8Xx5Uc4.js +0 -1
  194. package/dist/client/assets/agent-detail-ge8lRsMy.js +0 -2
  195. package/dist/client/assets/agents-CYp6eaDL.js +0 -1
  196. package/dist/client/assets/collapsible-KhZqz8s6.js +0 -1
  197. package/dist/client/assets/collection-tab-ByOYG4eu.js +0 -1
  198. package/dist/client/assets/connection-detail-FUvYBL_f.js +0 -1
  199. package/dist/client/assets/connections-CZWiV45b.js +0 -1
  200. package/dist/client/assets/constants-BnCnMsvC.js +0 -1
  201. package/dist/client/assets/context-CnW_lI9R.js +0 -23
  202. package/dist/client/assets/decopilot-events-Brt4gAR6.js +0 -1
  203. package/dist/client/assets/editable-thread-title-BT5MJN2M.js +0 -16
  204. package/dist/client/assets/index-Bl1kPuE1.css +0 -1
  205. package/dist/client/assets/index-CLgM5v39.js +0 -1
  206. package/dist/client/assets/localstorage-keys-DtK7peUq.js +0 -1
  207. package/dist/client/assets/page-JQWUx5cS.js +0 -1
  208. package/dist/client/assets/plugins-kPtsND7u.js +0 -1
  209. package/dist/client/assets/project-layout-CDz2d0hE.js +0 -1
  210. package/dist/client/assets/shell-layout-DH6hyOML.js +0 -3
  211. package/dist/client/assets/tabs-BzChyqs4.js +0 -1
  212. package/dist/client/assets/tasks-fA5J94Ed.js +0 -1
  213. package/dist/client/assets/use-list-state-pp-Ywt5d.js +0 -1
  214. package/dist/client/assets/use-mcp-prompts-Bvv0Gku4.js +0 -1
  215. package/dist/client/assets/use-preferences-fTjyFgCz.js +0 -1
  216. package/dist/client/assets/useInfiniteQuery-BRjF-D1B.js +0 -1
  217. package/dist/client/assets/useQuery-BE7O7fKt.js +0 -1
  218. package/dist/client/assets/useSuspenseInfiniteQuery-BSW1dpRq.js +0 -1
  219. package/dist/client/assets/workflow-BfURwr1_.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as S,c as X,u as he,m as Qe,c0 as tt,j as s,B as F,v as ne,t as Z,cg as dn}from"./index-CzFqQvXW.js";import{i as ft}from"./CheckCircle-CDdaecse.js";import{n as mn}from"./Container-CH2V2ATa.js";import{t as un}from"./Settings01-CGjDKLLq.js";import{u as Ze}from"./useQuery-BE7O7fKt.js";import{u as $e}from"./useMutation-DsQcwaJP.js";import{a as ve,u as be,j as js}from"./constants-0JLhMmM7.js";import{u as bs}from"./useInfiniteQuery-BRjF-D1B.js";import{B as G}from"./badge-CMOYVtO8.js";import{I as je}from"./input-Rcf9et7W.js";import{a as Dt,c as Je,D as $t,b as Lt,h as ls,i as as,g as xn}from"./dropdown-menu-bZQdGgsX.js";import{e as vs,a as ys,b as At,T as Oe,d as Ns,c as Ue}from"./table-C7IfzCau.js";import{a as os,T as hn}from"./toggle-group-DaSKpJH5.js";import{u as pn}from"./use-view-mode-k6uWDVq8.js";import{i as Xt}from"./DotsVertical-D-x0DTAA.js";import{i as fn}from"./FilterLines-CR4t6v_B.js";import{i as ws}from"./Globe01-sstJp1qH.js";import{i as ut}from"./Loading01-DvHkBn5K.js";import{i as Cs}from"./SearchMd-Bec1mZCp.js";import{b as zt,c as Ot,d as Ut,e as qt,a as Ft,D as Bt}from"./dialog-CzmRWg_H.js";import{i as vt}from"./AlertCircle-Dvy3oHwl.js";import{n as gn}from"./Download01-x2RmdAQh.js";import{i as cs}from"./Upload01-CBnp-ZgO.js";import{c as yt,b as Nt,d as wt,A as Ct,h as _t,e as kt,a as St,f as Rt}from"./alert-dialog-CHhoNaC0.js";import{C as me}from"./card-BECXECFc.js";import{s as It}from"./Trash01-DfwWsbuW.js";import{L as le}from"./label-DdGHGWov.js";import{n as jn,S as _s,a as ks,b as Ss,c as Rs,d as Et}from"./select-CSl7KVC3.js";import{S as bt}from"./switch-D_s2nP_j.js";import{T as Gt}from"./textarea-CumbsokS.js";import{i as bn}from"./ArrowLeft-Ddv8Es1G.js";import{i as vn,u as Ht,t as yn}from"./use-copy-Dn5NzC6Z.js";import{s as es}from"./RefreshCcw01-B_P3Otqi.js";import{i as Nn}from"./X-BaOBrQh9.js";import{t as Ts}from"./ChevronDown-CxLgy5uI.js";import{C as wn}from"./checkbox-Bs5NWE_x.js";import{s as Is}from"./Eye-Da9OHWjs.js";import{n as Cn}from"./LinkExternal01-zIQsCZyp.js";import{i as _n}from"./XCircle-CGBoiIiF.js";import{h as Ms,e as Ps}from"./use-connection-CmCfM9T5.js";import{a as kn,b as Sn,P as Rn}from"./popover-C5F2AcFP.js";import{i as Wt}from"./Check-BGWNBpXb.js";import{a as Jt}from"./Copy01-Ba42JLNP.js";import{i as Tn,a as In}from"./Save01-C9eXS7Z1.js";import{i as Mn}from"./Key01-B3LfJVTz.js";import{s as Pn}from"./Plus-C48LE9QF.js";import{a as En,b as Dn,T as $n}from"./tooltip-BGn6dJhi.js";import{a as Ln,i as An}from"./mcp-oauth-Dk3osgIf.js";import{i as zn}from"./Play-B4gSKcOc.js";import"./infiniteQueryObserver-B0QSZ6Wg.js";import"./ChevronRight-B-dZm0Fo.js";import"./use-mobile-DIBT-lEk.js";import"./index-gksA6r5d.js";const Es=({size:t=24,color:e="currentColor",...n})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},S.createElement("path",{d:"M10.743 5.092C11.149 5.032 11.569 5 12 5c5.105 0 8.455 4.505 9.58 6.287.137.215.205.323.243.49a1.16 1.16 0 0 1 0 .447c-.038.166-.107.274-.244.492-.3.474-.757 1.141-1.363 1.865M6.724 6.715c-2.162 1.467-3.63 3.504-4.303 4.57-.137.217-.205.325-.243.492a1.173 1.173 0 0 0 0 .446c.038.167.106.274.242.49C3.546 14.495 6.895 19 12 19c2.059 0 3.832-.732 5.289-1.723M3 3l18 18M9.88 9.879a3 3 0 1 0 4.243 4.243"}));Es.displayName="EyeOff";const Ds=({size:t=24,color:e="currentColor",...n})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},S.createElement("path",{d:"M12.5 3H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21H17c.93 0 1.395 0 1.776-.102a3 3 0 0 0 2.122-2.122C21 18.395 21 17.93 21 17m-2-9V2m-3 3h6M10.5 8.5a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm4.49 3.418-8.459 7.69c-.476.433-.714.649-.735.836a.5.5 0 0 0 .167.431C6.105 21 6.426 21 7.07 21h9.387c1.44 0 2.159 0 2.724-.242a3 3 0 0 0 1.578-1.578c.242-.565.242-1.285.242-2.724 0-.484 0-.726-.053-.952a2.001 2.001 0 0 0-.374-.778c-.143-.182-.332-.333-.71-.636l-2.797-2.237c-.379-.303-.568-.454-.776-.508a1 1 0 0 0-.557.018c-.205.066-.384.23-.743.555Z"}));Ds.displayName="ImagePlus";const $s=({size:t=24,color:e="currentColor",...n})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},S.createElement("path",{d:"m12.708 18.364-1.415 1.414a5 5 0 1 1-7.07-7.07l1.413-1.415m12.728 1.414 1.415-1.414a5 5 0 0 0-7.071-7.071l-1.415 1.414M8.5 15.5l7-7"}));$s.displayName="Link01";const Ls=({size:t=24,color:e="currentColor",...n})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},S.createElement("path",{d:"M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"}),S.createElement("path",{d:"M8 9.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C8.76 8 9.04 8 9.6 8h4.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C16 8.76 16 9.04 16 9.6v4.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C15.24 16 14.96 16 14.4 16H9.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C8 15.24 8 14.96 8 14.4V9.6Z"}));Ls.displayName="StopSquare";const ts=({size:t=24,color:e="currentColor",...n})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},S.createElement("path",{d:"m6 6 4.5 4.5M6 6H3L2 3l1-1 3 1v3Zm13.259-3.259-2.628 2.628c-.396.396-.594.594-.668.822a1 1 0 0 0 0 .618c.074.228.272.426.668.822l.238.238c.396.396.594.594.822.668a1 1 0 0 0 .618 0c.228-.074.426-.272.822-.668L21.59 5.41a5.5 5.5 0 0 1-6.16 7.485c-.485-.096-.729-.144-.876-.13a.836.836 0 0 0-.373.114c-.13.07-.261.201-.523.463L6.5 20.5a2.121 2.121 0 0 1-3-3l7.157-7.157c.262-.262.393-.393.463-.524a.836.836 0 0 0 .113-.372c.015-.148-.033-.39-.129-.877a5.5 5.5 0 0 1 8.155-5.83ZM12 15l5.5 5.5a2.121 2.121 0 0 0 3-3l-4.525-4.525a5.475 5.475 0 0 1-.934-.17c-.39-.107-.816-.03-1.101.255L12 15Z"}));ts.displayName="Tool02";const H={all:["private-registry"],items:()=>[...H.all,"items"],itemsList:(t,e,n,r)=>[...H.items(),"list",{search:t,tags:e,categories:n,limit:r}],item:t=>[...H.items(),"item",t],filters:()=>[...H.all,"filters"],registryConfig:()=>[...H.all,"registry-config"],registryConfigByPlugin:(t,e)=>[...H.registryConfig(),t,e],publishRequests:()=>[...H.all,"publish-requests"],publishRequestsByOrg:t=>[...H.publishRequests(),"org",t],publishRequestsList:(t,e,n)=>[...H.publishRequests(),"list",{status:t??"all",sortBy:e??"created_at",sortDirection:n??"desc"}],publishRequestsListByOrg:(t,e,n,r)=>[...H.publishRequestsByOrg(t),"list",{status:e??"all",sortBy:n??"created_at",sortDirection:r??"desc"}],publishRequestsCount:()=>[...H.publishRequests(),"count"],publishRequestsCountByOrg:t=>[...H.publishRequestsByOrg(t),"count"],publishApiKeys:()=>[...H.all,"publish-api-keys"],monitor:()=>[...H.all,"monitor"],monitorRuns:()=>[...H.monitor(),"runs"],monitorRunsList:t=>[...H.monitorRuns(),"list",{status:t??"all"}],monitorRun:t=>[...H.monitorRuns(),"run",t??"none"],monitorResults:()=>[...H.monitor(),"results"],monitorResultsList:(t,e)=>[...H.monitorResults(),"list",{runId:t??"none",status:e??"all"}],monitorConnections:()=>[...H.monitor(),"connections"],monitorConnectionAuthProbe:t=>[...H.monitorConnections(),"auth-probe",t]};async function qe(t,e,n){const r=await t.callTool({name:e,arguments:n});if(!r||typeof r!="object")throw new Error(`Invalid tool response for ${e}`);if(r.isError){const o=r.content?.find(l=>l.type==="text")?.text??`Tool ${e} returned an error`;throw new Error(o)}return r.structuredContent??r}function On(){const t=X.c(9),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async c=>qe(o,"REGISTRY_MONITOR_RUN_START",{config:c}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await Promise.all([e.invalidateQueries({queryKey:H.monitorRuns()}),e.invalidateQueries({queryKey:H.monitorResults()})])},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],$e(i)}function Un(){const t=X.c(9),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async c=>qe(o,"REGISTRY_MONITOR_RUN_CANCEL",{runId:c}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async(c,m)=>{await Promise.all([e.invalidateQueries({queryKey:H.monitorRuns()}),e.invalidateQueries({queryKey:H.monitorRun(m)})])},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],$e(i)}function Qt(t){const e=X.c(10),{org:n}=he();let r;e[0]!==n.id?(r={connectionId:ve,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=be(r);let l;e[2]!==t?(l=H.monitorRunsList(t),e[2]=t,e[3]=l):l=e[3];let a;e[4]!==o||e[5]!==t?(a=async()=>qe(o,"REGISTRY_MONITOR_RUN_LIST",{status:t,limit:100}),e[4]=o,e[5]=t,e[6]=a):a=e[6];let i;return e[7]!==l||e[8]!==a?(i={queryKey:l,queryFn:a,staleTime:5e3},e[7]=l,e[8]=a,e[9]=i):i=e[9],Ze(i)}function ss(t){const e=X.c(11),{org:n}=he();let r;e[0]!==n.id?(r={connectionId:ve,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=be(r);let l;e[2]!==t?(l=H.monitorRun(t),e[2]=t,e[3]=l):l=e[3];let a;e[4]!==o||e[5]!==t?(a=async()=>qe(o,"REGISTRY_MONITOR_RUN_GET",{runId:t}),e[4]=o,e[5]=t,e[6]=a):a=e[6];const i=!!t;let c;return e[7]!==l||e[8]!==a||e[9]!==i?(c={queryKey:l,queryFn:a,enabled:i,refetchInterval:qn},e[7]=l,e[8]=a,e[9]=i,e[10]=c):c=e[10],Ze(c)}function qn(t){return t.state.data?.run?.status==="running"?5e3:!1}function Mt(t,e,n){const r=X.c(14),{org:o}=he();let l;r[0]!==o.id?(l={connectionId:ve,orgId:o.id},r[0]=o.id,r[1]=l):l=r[1];const a=be(l);let i;r[2]!==t||r[3]!==e?(i=H.monitorResultsList(t,e),r[2]=t,r[3]=e,r[4]=i):i=r[4];let c;r[5]!==a||r[6]!==t||r[7]!==e?(c=async()=>qe(a,"REGISTRY_MONITOR_RESULT_LIST",{runId:t,status:e,limit:200,offset:0}),r[5]=a,r[6]=t,r[7]=e,r[8]=c):c=r[8];const m=!!t,u=n==="running"?2500:!1;let x;return r[9]!==i||r[10]!==c||r[11]!==m||r[12]!==u?(x={queryKey:i,queryFn:c,enabled:m,staleTime:5e3,refetchInterval:u},r[9]=i,r[10]=c,r[11]=m,r[12]=u,r[13]=x):x=r[13],Ze(x)}function As(){const t=X.c(5),{org:e}=he();let n;t[0]!==e.id?(n={connectionId:ve,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const r=be(n);let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=H.monitorConnections(),t[2]=o):o=t[2];let l;return t[3]!==r?(l={queryKey:o,queryFn:async()=>qe(r,"REGISTRY_MONITOR_CONNECTION_LIST",{}),staleTime:1e4},t[3]=r,t[4]=l):l=t[4],Ze(l)}function Fn(){const t=X.c(9),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async()=>qe(o,"REGISTRY_MONITOR_CONNECTION_SYNC",{}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:H.monitorConnections()})},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],$e(i)}function Bn(){const t=X.c(9),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async c=>{const{connectionId:m,authStatus:u}=c;return qe(o,"REGISTRY_MONITOR_CONNECTION_UPDATE_AUTH",{connectionId:m,authStatus:u})},t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:H.monitorConnections()})},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],$e(i)}const ds={monitorMode:"health_check",onFailure:"none",schedule:"manual",cronExpression:"",scheduleEventId:"",perMcpTimeoutMs:3e4,perToolTimeoutMs:1e4,maxAgentSteps:15,testPublicOnly:!1,testPrivateOnly:!1,includePendingRequests:!1,agentContext:"",llmConnectionId:"",llmModelId:""};function zs(){const t=X.c(33),{org:e,project:n}=he();let r;t[0]!==e.id?(r={connectionId:ve,orgId:e.id},t[0]=e.id,t[1]=r):r=t[1];const o=be(r),l=Qe();let a;t[2]!==n.id?(a=H.registryConfigByPlugin(n.id??"",tt),t[2]=n.id,t[3]=a):a=t[3];let i;t[4]!==o||t[5]!==n.id?(i=async()=>qe(o,"PROJECT_PLUGIN_CONFIG_GET",{projectId:n.id,pluginId:tt}),t[4]=o,t[5]=n.id,t[6]=i):i=t[6];const c=!!n.id;let m;t[7]!==a||t[8]!==i||t[9]!==c?(m={queryKey:a,queryFn:i,enabled:c},t[7]=a,t[8]=i,t[9]=c,t[10]=m):m=t[10];const u=Ze(m),x=u.data?.config?.settings,p=x&&typeof x=="object"?x.testConfig:void 0,d=typeof(x?x.monitorMode??x.testMode:void 0)=="string";let b;t[11]!==p?(b=p??{},t[11]=p,t[12]=b):b=t[12];let j;t[13]!==d||t[14]!==x||t[15]!==p?(j=d&&!p?x:{},t[13]=d,t[14]=x,t[15]=p,t[16]=j):j=t[16];let _;t[17]!==b||t[18]!==j?(_={...ds,...b,...j},t[17]=b,t[18]=j,t[19]=_):_=t[19];const k=_;let y;t[20]!==o||t[21]!==n.id?(y=async R=>{const N=(await qe(o,"PROJECT_PLUGIN_CONFIG_GET",{projectId:n.id,pluginId:tt}))?.config?.settings??{};return qe(o,"PROJECT_PLUGIN_CONFIG_UPDATE",{projectId:n.id,pluginId:tt,settings:{...N,testConfig:{...ds,...N.testConfig??{},...R}}})},t[20]=o,t[21]=n.id,t[22]=y):y=t[22];let g;t[23]!==n.id||t[24]!==l?(g=async()=>{await l.invalidateQueries({queryKey:H.registryConfigByPlugin(n.id??"",tt)})},t[23]=n.id,t[24]=l,t[25]=g):g=t[25];let I;t[26]!==y||t[27]!==g?(I={mutationFn:y,onSuccess:g},t[26]=y,t[27]=g,t[28]=I):I=t[28];const f=$e(I);let w;return t[29]!==u.isLoading||t[30]!==f||t[31]!==k?(w={settings:k,isLoading:u.isLoading,saveMutation:f},t[29]=u.isLoading,t[30]=f,t[31]=k,t[32]=w):w=t[32],w}function Gn(){const t=X.c(9),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async c=>qe(o,"REGISTRY_MONITOR_SCHEDULE_SET",c),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:H.registryConfig()})},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],$e(i)}function Qn(){const t=X.c(9),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async c=>qe(o,"REGISTRY_MONITOR_SCHEDULE_CANCEL",{scheduleEventId:c}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:H.registryConfig()})},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],$e(i)}function Kn(){const t=X.c(3),e=Qt("completed"),n=e.data?.items?.[0]?.id,r=e.data?.items?.[0]?.status,o=Mt(n,"failed",r),l=o.data?.items?.length??0,a=e.isLoading||o.isLoading;let i;return t[0]!==l||t[1]!==a?(i={brokenCount:l,isLoading:a},t[0]=l,t[1]=a,t[2]=i):i=t[2],i}const Os=24;function Vn(t){return t.trim()}async function Le(t,e,n){const r=await t.callTool({name:e,arguments:n});if(!r||typeof r!="object")throw new Error(`Invalid tool response for ${e}`);if(r.isError){const o=r.content?.find(l=>l.type==="text")?.text??`Tool ${e} returned an error`;throw new Error(o)}return r.structuredContent??r}function Us(t){const e=X.c(19),{org:n}=he();let r;e[0]!==n.id?(r={connectionId:ve,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=be(r);let l,a,i,c;e[2]!==t.categories||e[3]!==t.limit||e[4]!==t.search||e[5]!==t.tags?(a=Vn(t.search),l=t.limit??Os,c=bs,i=H.itemsList(a,t.tags,t.categories,l),e[2]=t.categories,e[3]=t.limit,e[4]=t.search,e[5]=t.tags,e[6]=l,e[7]=a,e[8]=i,e[9]=c):(l=e[6],a=e[7],i=e[8],c=e[9]);let m;e[10]!==o||e[11]!==l||e[12]!==t.categories||e[13]!==t.tags||e[14]!==a?(m=async x=>{const{pageParam:p}=x,h=a.length>0?{operator:"or",conditions:[{field:["title"],operator:"contains",value:a},{field:["description"],operator:"contains",value:a},{field:["id"],operator:"contains",value:a},{field:["server","name"],operator:"contains",value:a}]}:void 0;return Le(o,"REGISTRY_ITEM_LIST",{cursor:p,limit:l,tags:t.tags.length?t.tags:void 0,categories:t.categories.length?t.categories:void 0,where:h})},e[10]=o,e[11]=l,e[12]=t.categories,e[13]=t.tags,e[14]=a,e[15]=m):m=e[15];let u;return e[16]!==i||e[17]!==m?(u={queryKey:i,queryFn:m,initialPageParam:void 0,getNextPageParam:Yn,staleTime:3e4},e[16]=i,e[17]=m,e[18]=u):u=e[18],c(u)}function Yn(t){return t.nextCursor}function Hn(){const t=X.c(8),{org:e}=he();let n;t[0]!==e.id?(n={connectionId:ve,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const r=be(n);let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=H.filters(),t[2]=o):o=t[2];let l;t[3]!==r?(l=async()=>Le(r,"REGISTRY_ITEM_FILTERS",{}),t[3]=r,t[4]=l):l=t[4];let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a={tags:[],categories:[]},t[5]=a):a=t[5];let i;return t[6]!==l?(i={queryKey:o,queryFn:l,placeholderData:a,staleTime:6e4},t[6]=l,t[7]=i):i=t[7],Ze(i)}function ns(){const t=X.c(29),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==e?(l=async()=>{await Promise.all([e.invalidateQueries({queryKey:H.items()}),e.invalidateQueries({queryKey:H.filters()})])},t[2]=e,t[3]=l):l=t[3];const a=l;let i;t[4]!==o?(i=async g=>(await Le(o,"REGISTRY_ITEM_CREATE",{data:g})).item,t[4]=o,t[5]=i):i=t[5];let c;t[6]!==a||t[7]!==i?(c={mutationFn:i,onSuccess:a},t[6]=a,t[7]=i,t[8]=c):c=t[8];const m=$e(c);let u;t[9]!==o?(u=async g=>{const{id:I,data:f}=g;return(await Le(o,"REGISTRY_ITEM_UPDATE",{id:I,data:f})).item},t[9]=o,t[10]=u):u=t[10];let x;t[11]!==a||t[12]!==u?(x={mutationFn:u,onSuccess:a},t[11]=a,t[12]=u,t[13]=x):x=t[13];const p=$e(x);let h;t[14]!==o?(h=async g=>(await Le(o,"REGISTRY_ITEM_DELETE",{id:g})).item,t[14]=o,t[15]=h):h=t[15];let d;t[16]!==a||t[17]!==h?(d={mutationFn:h,onSuccess:a},t[16]=a,t[17]=h,t[18]=d):d=t[18];const b=$e(d);let j;t[19]!==o?(j=async g=>Le(o,"REGISTRY_ITEM_BULK_CREATE",{items:g}),t[19]=o,t[20]=j):j=t[20];let _;t[21]!==a||t[22]!==j?(_={mutationFn:j,onSuccess:a},t[21]=a,t[22]=j,t[23]=_):_=t[23];const k=$e(_);let y;return t[24]!==k||t[25]!==m||t[26]!==b||t[27]!==p?(y={createMutation:m,updateMutation:p,deleteMutation:b,bulkCreateMutation:k},t[24]=k,t[25]=m,t[26]=b,t[27]=p,t[28]=y):y=t[28],y}function Kt(t){const e=X.c(37),{org:n,project:r}=he();let o;e[0]!==n.id?(o={connectionId:ve,orgId:n.id},e[0]=n.id,e[1]=o):o=e[1];const l=be(o),a=Qe();let i;e[2]!==t||e[3]!==r.id?(i=H.registryConfigByPlugin(r.id??"",t),e[2]=t,e[3]=r.id,e[4]=i):i=e[4];let c;e[5]!==l||e[6]!==t||e[7]!==r.id?(c=async()=>Le(l,"PROJECT_PLUGIN_CONFIG_GET",{projectId:r.id,pluginId:t}),e[5]=l,e[6]=t,e[7]=r.id,e[8]=c):c=e[8];const m=!!r.id;let u;e[9]!==i||e[10]!==c||e[11]!==m?(u={queryKey:i,queryFn:c,enabled:m,staleTime:6e4},e[9]=i,e[10]=c,e[11]=m,e[12]=u):u=e[12];const x=Ze(u);let p;e[13]!==l||e[14]!==t||e[15]!==r.id?(p=async $=>{const M=(await Le(l,"PROJECT_PLUGIN_CONFIG_GET",{projectId:r.id,pluginId:t}))?.config?.settings??{};return Le(l,"PROJECT_PLUGIN_CONFIG_UPDATE",{projectId:r.id,pluginId:t,settings:{...M,...$}})},e[13]=l,e[14]=t,e[15]=r.id,e[16]=p):p=e[16];let h;e[17]!==t||e[18]!==r.id||e[19]!==a?(h=async()=>{await a.invalidateQueries({queryKey:H.registryConfigByPlugin(r.id??"",t)})},e[17]=t,e[18]=r.id,e[19]=a,e[20]=h):h=e[20];let d;e[21]!==p||e[22]!==h?(d={mutationFn:p,onSuccess:h},e[21]=p,e[22]=h,e[23]=d):d=e[23];const b=$e(d),j=x.data?.config?.settings?.registryName??"Private Registry",_=x.data?.config?.settings?.registryIcon??"",k=x.data?.config?.settings?.llmConnectionId??"",y=x.data?.config?.settings?.llmModelId??"",g=x.data?.config?.settings?.acceptPublishRequests??!1,I=x.data?.config?.settings?.requireApiToken??!1,f=x.data?.config?.settings?.storePrivateOnly??!1,w=x.data?.config?.settings?.rateLimitEnabled??!0,P=x.data?.config?.settings?.rateLimitWindow==="minute"?"minute":"hour",N=x.data?.config?.settings?.rateLimitMax,T=typeof N=="number"&&N>=1?Math.floor(N):100;let v;return e[24]!==g||e[25]!==x.isLoading||e[26]!==w||e[27]!==T||e[28]!==P||e[29]!==_||e[30]!==k||e[31]!==y||e[32]!==j||e[33]!==I||e[34]!==b||e[35]!==f?(v={registryName:j,registryIcon:_,registryLLMConnectionId:k,registryLLMModelId:y,acceptPublishRequests:g,requireApiToken:I,storePrivateOnly:f,rateLimitEnabled:w,rateLimitWindow:P,rateLimitMax:T,isLoadingConfig:x.isLoading,saveRegistryConfigMutation:b},e[24]=g,e[25]=x.isLoading,e[26]=w,e[27]=T,e[28]=P,e[29]=_,e[30]=k,e[31]=y,e[32]=j,e[33]=I,e[34]=b,e[35]=f,e[36]=v):v=e[36],v}function Wn(t){const e=X.c(15),{org:n}=he();let r;e[0]!==n.id?(r={connectionId:ve,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=be(r);let l;e[2]!==n.id||e[3]!==t.sortBy||e[4]!==t.sortDirection||e[5]!==t.status?(l=H.publishRequestsListByOrg(n.id,t.status,t.sortBy,t.sortDirection),e[2]=n.id,e[3]=t.sortBy,e[4]=t.sortDirection,e[5]=t.status,e[6]=l):l=e[6];let a;e[7]!==o||e[8]!==t.sortBy||e[9]!==t.sortDirection||e[10]!==t.status?(a=async c=>{const{pageParam:m}=c;return Le(o,"REGISTRY_PUBLISH_REQUEST_LIST",{status:t.status,sortBy:t.sortBy,sortDirection:t.sortDirection,limit:Os,offset:m})},e[7]=o,e[8]=t.sortBy,e[9]=t.sortDirection,e[10]=t.status,e[11]=a):a=e[11];let i;return e[12]!==l||e[13]!==a?(i={queryKey:l,queryFn:a,initialPageParam:0,getNextPageParam:Jn,staleTime:3e4,refetchOnMount:!0},e[12]=l,e[13]=a,e[14]=i):i=e[14],bs(i)}function Jn(t,e){const n=e.reduce(Zn,0);return n<t.totalCount?n:void 0}function Zn(t,e){return t+e.items.length}function Xn(){const t=X.c(9),{org:e}=he();let n;t[0]!==e.id?(n={connectionId:ve,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const r=be(n);let o;t[2]!==e.id?(o=H.publishRequestsCountByOrg(e.id),t[2]=e.id,t[3]=o):o=t[3];let l;t[4]!==r?(l=async()=>Le(r,"REGISTRY_PUBLISH_REQUEST_COUNT",{}),t[4]=r,t[5]=l):l=t[5];let a;return t[6]!==o||t[7]!==l?(a={queryKey:o,queryFn:l,staleTime:3e4},t[6]=o,t[7]=l,t[8]=a):a=t[8],Ze(a)}function er(){const t=X.c(17),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==e?(l=async()=>{await Promise.all([e.invalidateQueries({queryKey:H.publishRequests()})])},t[2]=e,t[3]=l):l=t[3];const a=l;let i;t[4]!==o?(i=async d=>Le(o,"REGISTRY_PUBLISH_REQUEST_REVIEW",d),t[4]=o,t[5]=i):i=t[5];let c;t[6]!==a||t[7]!==i?(c={mutationFn:i,onSuccess:a},t[6]=a,t[7]=i,t[8]=c):c=t[8];const m=$e(c);let u;t[9]!==o?(u=async d=>Le(o,"REGISTRY_PUBLISH_REQUEST_DELETE",{id:d}),t[9]=o,t[10]=u):u=t[10];let x;t[11]!==a||t[12]!==u?(x={mutationFn:u,onSuccess:a},t[11]=a,t[12]=u,t[13]=x):x=t[13];const p=$e(x);let h;return t[14]!==p||t[15]!==m?(h={reviewMutation:m,deleteMutation:p},t[14]=p,t[15]=m,t[16]=h):h=t[16],h}function tr(){const t=X.c(5),{org:e}=he();let n;t[0]!==e.id?(n={connectionId:ve,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const r=be(n);let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=H.publishApiKeys(),t[2]=o):o=t[2];let l;return t[3]!==r?(l={queryKey:o,queryFn:async()=>Le(r,"REGISTRY_PUBLISH_API_KEY_LIST",{}),staleTime:3e4},t[3]=r,t[4]=l):l=t[4],Ze(l)}function sr(){const t=X.c(19),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async d=>Le(o,"REGISTRY_PUBLISH_API_KEY_GENERATE",{name:d}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:H.publishApiKeys()})},t[4]=e,t[5]=a):a=t[5];let i;t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8];const c=$e(i);let m;t[9]!==o?(m=async d=>Le(o,"REGISTRY_PUBLISH_API_KEY_REVOKE",{keyId:d}),t[9]=o,t[10]=m):m=t[10];let u;t[11]!==e?(u=async()=>{await e.invalidateQueries({queryKey:H.publishApiKeys()})},t[11]=e,t[12]=u):u=t[12];let x;t[13]!==m||t[14]!==u?(x={mutationFn:m,onSuccess:u},t[13]=m,t[14]=u,t[15]=x):x=t[15];const p=$e(x);let h;return t[16]!==c||t[17]!==p?(h={generateMutation:c,revokeMutation:p},t[16]=c,t[17]=p,t[18]=h):h=t[18],h}function ms(t){return t?t.split(/[;|]/).map(e=>e.trim()).filter(Boolean):[]}function us(t){const e=[];let n="",r=!1;for(let o=0;o<t.length;o+=1){const l=t[o],a=t[o+1];if(l==='"'){r&&a==='"'?(n+='"',o+=1):r=!r;continue}if(l===","&&!r){e.push(n.trim()),n="";continue}n+=l}return e.push(n.trim()),e}const nr=["id","title"],rr=["id","title","description","remote_url","remote_type","tags","categories","is_public"];function ir(t){const e=t.split(/\r?\n/).map(m=>m.trim()).filter(Boolean);if(e.length<2)return{items:[],warnings:[{line:0,message:"CSV must have a header row and at least one data row"}],skipped:0};const n=us(e[0]??""),r=new Map,o=[];n.forEach((m,u)=>{const x=m.toLowerCase().trim();x&&r.set(x,u)});for(const m of nr)r.has(m)||o.push({line:1,message:`Missing required column: "${m}"`});for(const m of n){const u=m.toLowerCase().trim();u&&!rr.includes(u)&&o.push({line:1,message:`Unknown column "${m}" will be ignored`})}if(!r.has("id")||!r.has("title"))return{items:[],warnings:o,skipped:0};const l=(m,u)=>{const x=r.get(u);return typeof x=="number"?m[x]??"":""},a=[],i=new Set;let c=0;for(let m=1;m<e.length;m+=1){const u=us(e[m]??""),x=l(u,"id").trim(),p=l(u,"title").trim();if(!x){o.push({line:m+1,message:"Missing id — row skipped"}),c+=1;continue}if(!p){o.push({line:m+1,message:`Missing title for id="${x}" — row skipped`}),c+=1;continue}if(i.has(x)){o.push({line:m+1,message:`Duplicate id="${x}" — row skipped`}),c+=1;continue}i.add(x);const h=l(u,"description").trim(),d=l(u,"remote_url").trim(),j=l(u,"remote_type").trim().toLowerCase()==="sse"?"sse":"http",_=ms(l(u,"tags")),k=ms(l(u,"categories")),y=l(u,"is_public").trim().toLowerCase(),g=y==="true"||y==="1"||y==="yes";a.push({id:x,title:p,description:h||null,is_public:g,_meta:{"mcp.mesh":{..._.length>0?{tags:_}:{},...k.length>0?{categories:k}:{}}},server:{name:x,title:p,description:h||void 0,remotes:d?[{type:j,url:d}]:[]}})}return{items:a,warnings:o,skipped:c}}const lr=`id,title,description,remote_url,remote_type,tags,categories,is_public
1
+ import{r as S,c as X,u as he,n as Qe,c0 as tt,j as s,B as F,v as ne,t as Z,cg as dn}from"./index-DVHuYwO5.js";import{i as ft}from"./CheckCircle-naMxBwcc.js";import{n as mn}from"./Container-BcN3rU1W.js";import{t as un}from"./Settings01-jEDDrq49.js";import{u as Ze}from"./useQuery-CxvwMb--.js";import{u as $e}from"./useMutation-BskhtN65.js";import{a as ve,u as be,j as js}from"./constants-DLWxw8L_.js";import{u as bs}from"./useInfiniteQuery-CutnJ4kj.js";import{B as G}from"./badge-zns1OAW0.js";import{I as je}from"./input-CImrwNsE.js";import{a as Dt,c as Je,D as $t,b as Lt,h as ls,i as as,g as xn}from"./dropdown-menu-Bv0kDZGf.js";import{e as vs,a as ys,b as At,T as Oe,d as Ns,c as Ue}from"./table-BwN-DdG1.js";import{a as os,T as hn}from"./toggle-group-CRwxfPk7.js";import{u as pn}from"./use-view-mode-CS5zZIj8.js";import{i as Xt}from"./DotsVertical-D7GBR06C.js";import{i as fn}from"./FilterLines-C4D0sIiB.js";import{i as ws}from"./Globe01-DvHitX1A.js";import{i as ut}from"./Loading01-DUUFtL7S.js";import{i as Cs}from"./SearchMd-DOdaT51-.js";import{b as zt,c as Ot,d as Ut,e as qt,a as Ft,D as Bt}from"./dialog-B8ODwZHJ.js";import{i as vt}from"./AlertCircle-DtdVhcv9.js";import{n as gn}from"./Download01-Dqv2OtJR.js";import{i as cs}from"./Upload01-c6QpJwvP.js";import{c as yt,b as Nt,d as wt,A as Ct,h as _t,e as kt,a as St,f as Rt}from"./alert-dialog-WtbKGn3h.js";import{C as me}from"./card-yVoc5Dl_.js";import{s as It}from"./Trash01-DJpn1VG4.js";import{L as le}from"./label-BEcdY3zl.js";import{n as jn,S as _s,a as ks,b as Ss,c as Rs,d as Et}from"./select-CZ5oa2ZG.js";import{S as bt}from"./switch-C_rwAMG7.js";import{T as Gt}from"./textarea-BOlS_fKd.js";import{i as bn}from"./ArrowLeft-Dse_UWo5.js";import{i as vn,u as Ht,t as yn}from"./use-copy-uCRP4yn6.js";import{s as es}from"./RefreshCcw01-CmQ_Zyfb.js";import{i as Nn}from"./X-BGHsyt4s.js";import{t as Ts}from"./ChevronDown-BPvdqfh0.js";import{C as wn}from"./checkbox-C_yzLnRo.js";import{s as Is}from"./Eye-BHQjRrk8.js";import{n as Cn}from"./LinkExternal01-1-7TA6Ra.js";import{i as _n}from"./XCircle-BJSW1V34.js";import{h as Ms,e as Ps}from"./use-connection-CwB1S0Lk.js";import{a as kn,b as Sn,P as Rn}from"./popover-R_PT2IPW.js";import{i as Wt}from"./Check-llxZXJNk.js";import{a as Jt}from"./Copy01-DOsfcAr7.js";import{i as Tn,a as In}from"./Save01-Cq59fc-a.js";import{i as Mn}from"./Key01-eAlJ77G3.js";import{s as Pn}from"./Plus-2wrCLrAD.js";import{a as En,b as Dn,T as $n}from"./tooltip-BsUirxUt.js";import{a as Ln,i as An}from"./mcp-oauth-BJK3oSr3.js";import{i as zn}from"./Play-DTlFqxwD.js";import"./infiniteQueryObserver-BU31NXJd.js";import"./ChevronRight-bI92hTEK.js";import"./use-mobile-Bot_hVI8.js";import"./index-BLvVZqmB.js";const Es=({size:t=24,color:e="currentColor",...n})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},S.createElement("path",{d:"M10.743 5.092C11.149 5.032 11.569 5 12 5c5.105 0 8.455 4.505 9.58 6.287.137.215.205.323.243.49a1.16 1.16 0 0 1 0 .447c-.038.166-.107.274-.244.492-.3.474-.757 1.141-1.363 1.865M6.724 6.715c-2.162 1.467-3.63 3.504-4.303 4.57-.137.217-.205.325-.243.492a1.173 1.173 0 0 0 0 .446c.038.167.106.274.242.49C3.546 14.495 6.895 19 12 19c2.059 0 3.832-.732 5.289-1.723M3 3l18 18M9.88 9.879a3 3 0 1 0 4.243 4.243"}));Es.displayName="EyeOff";const Ds=({size:t=24,color:e="currentColor",...n})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},S.createElement("path",{d:"M12.5 3H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 5.28 3 6.12 3 7.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 21 6.12 21 7.8 21H17c.93 0 1.395 0 1.776-.102a3 3 0 0 0 2.122-2.122C21 18.395 21 17.93 21 17m-2-9V2m-3 3h6M10.5 8.5a2 2 0 1 1-4 0 2 2 0 0 1 4 0Zm4.49 3.418-8.459 7.69c-.476.433-.714.649-.735.836a.5.5 0 0 0 .167.431C6.105 21 6.426 21 7.07 21h9.387c1.44 0 2.159 0 2.724-.242a3 3 0 0 0 1.578-1.578c.242-.565.242-1.285.242-2.724 0-.484 0-.726-.053-.952a2.001 2.001 0 0 0-.374-.778c-.143-.182-.332-.333-.71-.636l-2.797-2.237c-.379-.303-.568-.454-.776-.508a1 1 0 0 0-.557.018c-.205.066-.384.23-.743.555Z"}));Ds.displayName="ImagePlus";const $s=({size:t=24,color:e="currentColor",...n})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},S.createElement("path",{d:"m12.708 18.364-1.415 1.414a5 5 0 1 1-7.07-7.07l1.413-1.415m12.728 1.414 1.415-1.414a5 5 0 0 0-7.071-7.071l-1.415 1.414M8.5 15.5l7-7"}));$s.displayName="Link01";const Ls=({size:t=24,color:e="currentColor",...n})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},S.createElement("path",{d:"M3 7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8Z"}),S.createElement("path",{d:"M8 9.6c0-.56 0-.84.109-1.054a1 1 0 0 1 .437-.437C8.76 8 9.04 8 9.6 8h4.8c.56 0 .84 0 1.054.109a1 1 0 0 1 .437.437C16 8.76 16 9.04 16 9.6v4.8c0 .56 0 .84-.109 1.054a1 1 0 0 1-.437.437C15.24 16 14.96 16 14.4 16H9.6c-.56 0-.84 0-1.054-.109a1 1 0 0 1-.437-.437C8 15.24 8 14.96 8 14.4V9.6Z"}));Ls.displayName="StopSquare";const ts=({size:t=24,color:e="currentColor",...n})=>S.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...n},S.createElement("path",{d:"m6 6 4.5 4.5M6 6H3L2 3l1-1 3 1v3Zm13.259-3.259-2.628 2.628c-.396.396-.594.594-.668.822a1 1 0 0 0 0 .618c.074.228.272.426.668.822l.238.238c.396.396.594.594.822.668a1 1 0 0 0 .618 0c.228-.074.426-.272.822-.668L21.59 5.41a5.5 5.5 0 0 1-6.16 7.485c-.485-.096-.729-.144-.876-.13a.836.836 0 0 0-.373.114c-.13.07-.261.201-.523.463L6.5 20.5a2.121 2.121 0 0 1-3-3l7.157-7.157c.262-.262.393-.393.463-.524a.836.836 0 0 0 .113-.372c.015-.148-.033-.39-.129-.877a5.5 5.5 0 0 1 8.155-5.83ZM12 15l5.5 5.5a2.121 2.121 0 0 0 3-3l-4.525-4.525a5.475 5.475 0 0 1-.934-.17c-.39-.107-.816-.03-1.101.255L12 15Z"}));ts.displayName="Tool02";const H={all:["private-registry"],items:()=>[...H.all,"items"],itemsList:(t,e,n,r)=>[...H.items(),"list",{search:t,tags:e,categories:n,limit:r}],item:t=>[...H.items(),"item",t],filters:()=>[...H.all,"filters"],registryConfig:()=>[...H.all,"registry-config"],registryConfigByPlugin:(t,e)=>[...H.registryConfig(),t,e],publishRequests:()=>[...H.all,"publish-requests"],publishRequestsByOrg:t=>[...H.publishRequests(),"org",t],publishRequestsList:(t,e,n)=>[...H.publishRequests(),"list",{status:t??"all",sortBy:e??"created_at",sortDirection:n??"desc"}],publishRequestsListByOrg:(t,e,n,r)=>[...H.publishRequestsByOrg(t),"list",{status:e??"all",sortBy:n??"created_at",sortDirection:r??"desc"}],publishRequestsCount:()=>[...H.publishRequests(),"count"],publishRequestsCountByOrg:t=>[...H.publishRequestsByOrg(t),"count"],publishApiKeys:()=>[...H.all,"publish-api-keys"],monitor:()=>[...H.all,"monitor"],monitorRuns:()=>[...H.monitor(),"runs"],monitorRunsList:t=>[...H.monitorRuns(),"list",{status:t??"all"}],monitorRun:t=>[...H.monitorRuns(),"run",t??"none"],monitorResults:()=>[...H.monitor(),"results"],monitorResultsList:(t,e)=>[...H.monitorResults(),"list",{runId:t??"none",status:e??"all"}],monitorConnections:()=>[...H.monitor(),"connections"],monitorConnectionAuthProbe:t=>[...H.monitorConnections(),"auth-probe",t]};async function qe(t,e,n){const r=await t.callTool({name:e,arguments:n});if(!r||typeof r!="object")throw new Error(`Invalid tool response for ${e}`);if(r.isError){const o=r.content?.find(l=>l.type==="text")?.text??`Tool ${e} returned an error`;throw new Error(o)}return r.structuredContent??r}function On(){const t=X.c(9),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async c=>qe(o,"REGISTRY_MONITOR_RUN_START",{config:c}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await Promise.all([e.invalidateQueries({queryKey:H.monitorRuns()}),e.invalidateQueries({queryKey:H.monitorResults()})])},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],$e(i)}function Un(){const t=X.c(9),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async c=>qe(o,"REGISTRY_MONITOR_RUN_CANCEL",{runId:c}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async(c,m)=>{await Promise.all([e.invalidateQueries({queryKey:H.monitorRuns()}),e.invalidateQueries({queryKey:H.monitorRun(m)})])},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],$e(i)}function Qt(t){const e=X.c(10),{org:n}=he();let r;e[0]!==n.id?(r={connectionId:ve,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=be(r);let l;e[2]!==t?(l=H.monitorRunsList(t),e[2]=t,e[3]=l):l=e[3];let a;e[4]!==o||e[5]!==t?(a=async()=>qe(o,"REGISTRY_MONITOR_RUN_LIST",{status:t,limit:100}),e[4]=o,e[5]=t,e[6]=a):a=e[6];let i;return e[7]!==l||e[8]!==a?(i={queryKey:l,queryFn:a,staleTime:5e3},e[7]=l,e[8]=a,e[9]=i):i=e[9],Ze(i)}function ss(t){const e=X.c(11),{org:n}=he();let r;e[0]!==n.id?(r={connectionId:ve,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=be(r);let l;e[2]!==t?(l=H.monitorRun(t),e[2]=t,e[3]=l):l=e[3];let a;e[4]!==o||e[5]!==t?(a=async()=>qe(o,"REGISTRY_MONITOR_RUN_GET",{runId:t}),e[4]=o,e[5]=t,e[6]=a):a=e[6];const i=!!t;let c;return e[7]!==l||e[8]!==a||e[9]!==i?(c={queryKey:l,queryFn:a,enabled:i,refetchInterval:qn},e[7]=l,e[8]=a,e[9]=i,e[10]=c):c=e[10],Ze(c)}function qn(t){return t.state.data?.run?.status==="running"?5e3:!1}function Mt(t,e,n){const r=X.c(14),{org:o}=he();let l;r[0]!==o.id?(l={connectionId:ve,orgId:o.id},r[0]=o.id,r[1]=l):l=r[1];const a=be(l);let i;r[2]!==t||r[3]!==e?(i=H.monitorResultsList(t,e),r[2]=t,r[3]=e,r[4]=i):i=r[4];let c;r[5]!==a||r[6]!==t||r[7]!==e?(c=async()=>qe(a,"REGISTRY_MONITOR_RESULT_LIST",{runId:t,status:e,limit:200,offset:0}),r[5]=a,r[6]=t,r[7]=e,r[8]=c):c=r[8];const m=!!t,u=n==="running"?2500:!1;let x;return r[9]!==i||r[10]!==c||r[11]!==m||r[12]!==u?(x={queryKey:i,queryFn:c,enabled:m,staleTime:5e3,refetchInterval:u},r[9]=i,r[10]=c,r[11]=m,r[12]=u,r[13]=x):x=r[13],Ze(x)}function As(){const t=X.c(5),{org:e}=he();let n;t[0]!==e.id?(n={connectionId:ve,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const r=be(n);let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=H.monitorConnections(),t[2]=o):o=t[2];let l;return t[3]!==r?(l={queryKey:o,queryFn:async()=>qe(r,"REGISTRY_MONITOR_CONNECTION_LIST",{}),staleTime:1e4},t[3]=r,t[4]=l):l=t[4],Ze(l)}function Fn(){const t=X.c(9),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async()=>qe(o,"REGISTRY_MONITOR_CONNECTION_SYNC",{}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:H.monitorConnections()})},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],$e(i)}function Bn(){const t=X.c(9),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async c=>{const{connectionId:m,authStatus:u}=c;return qe(o,"REGISTRY_MONITOR_CONNECTION_UPDATE_AUTH",{connectionId:m,authStatus:u})},t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:H.monitorConnections()})},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],$e(i)}const ds={monitorMode:"health_check",onFailure:"none",schedule:"manual",cronExpression:"",scheduleEventId:"",perMcpTimeoutMs:3e4,perToolTimeoutMs:1e4,maxAgentSteps:15,testPublicOnly:!1,testPrivateOnly:!1,includePendingRequests:!1,agentContext:"",llmConnectionId:"",llmModelId:""};function zs(){const t=X.c(33),{org:e,project:n}=he();let r;t[0]!==e.id?(r={connectionId:ve,orgId:e.id},t[0]=e.id,t[1]=r):r=t[1];const o=be(r),l=Qe();let a;t[2]!==n.id?(a=H.registryConfigByPlugin(n.id??"",tt),t[2]=n.id,t[3]=a):a=t[3];let i;t[4]!==o||t[5]!==n.id?(i=async()=>qe(o,"PROJECT_PLUGIN_CONFIG_GET",{projectId:n.id,pluginId:tt}),t[4]=o,t[5]=n.id,t[6]=i):i=t[6];const c=!!n.id;let m;t[7]!==a||t[8]!==i||t[9]!==c?(m={queryKey:a,queryFn:i,enabled:c},t[7]=a,t[8]=i,t[9]=c,t[10]=m):m=t[10];const u=Ze(m),x=u.data?.config?.settings,p=x&&typeof x=="object"?x.testConfig:void 0,d=typeof(x?x.monitorMode??x.testMode:void 0)=="string";let b;t[11]!==p?(b=p??{},t[11]=p,t[12]=b):b=t[12];let j;t[13]!==d||t[14]!==x||t[15]!==p?(j=d&&!p?x:{},t[13]=d,t[14]=x,t[15]=p,t[16]=j):j=t[16];let _;t[17]!==b||t[18]!==j?(_={...ds,...b,...j},t[17]=b,t[18]=j,t[19]=_):_=t[19];const k=_;let y;t[20]!==o||t[21]!==n.id?(y=async R=>{const N=(await qe(o,"PROJECT_PLUGIN_CONFIG_GET",{projectId:n.id,pluginId:tt}))?.config?.settings??{};return qe(o,"PROJECT_PLUGIN_CONFIG_UPDATE",{projectId:n.id,pluginId:tt,settings:{...N,testConfig:{...ds,...N.testConfig??{},...R}}})},t[20]=o,t[21]=n.id,t[22]=y):y=t[22];let g;t[23]!==n.id||t[24]!==l?(g=async()=>{await l.invalidateQueries({queryKey:H.registryConfigByPlugin(n.id??"",tt)})},t[23]=n.id,t[24]=l,t[25]=g):g=t[25];let I;t[26]!==y||t[27]!==g?(I={mutationFn:y,onSuccess:g},t[26]=y,t[27]=g,t[28]=I):I=t[28];const f=$e(I);let w;return t[29]!==u.isLoading||t[30]!==f||t[31]!==k?(w={settings:k,isLoading:u.isLoading,saveMutation:f},t[29]=u.isLoading,t[30]=f,t[31]=k,t[32]=w):w=t[32],w}function Gn(){const t=X.c(9),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async c=>qe(o,"REGISTRY_MONITOR_SCHEDULE_SET",c),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:H.registryConfig()})},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],$e(i)}function Qn(){const t=X.c(9),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async c=>qe(o,"REGISTRY_MONITOR_SCHEDULE_CANCEL",{scheduleEventId:c}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:H.registryConfig()})},t[4]=e,t[5]=a):a=t[5];let i;return t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8],$e(i)}function Kn(){const t=X.c(3),e=Qt("completed"),n=e.data?.items?.[0]?.id,r=e.data?.items?.[0]?.status,o=Mt(n,"failed",r),l=o.data?.items?.length??0,a=e.isLoading||o.isLoading;let i;return t[0]!==l||t[1]!==a?(i={brokenCount:l,isLoading:a},t[0]=l,t[1]=a,t[2]=i):i=t[2],i}const Os=24;function Vn(t){return t.trim()}async function Le(t,e,n){const r=await t.callTool({name:e,arguments:n});if(!r||typeof r!="object")throw new Error(`Invalid tool response for ${e}`);if(r.isError){const o=r.content?.find(l=>l.type==="text")?.text??`Tool ${e} returned an error`;throw new Error(o)}return r.structuredContent??r}function Us(t){const e=X.c(19),{org:n}=he();let r;e[0]!==n.id?(r={connectionId:ve,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=be(r);let l,a,i,c;e[2]!==t.categories||e[3]!==t.limit||e[4]!==t.search||e[5]!==t.tags?(a=Vn(t.search),l=t.limit??Os,c=bs,i=H.itemsList(a,t.tags,t.categories,l),e[2]=t.categories,e[3]=t.limit,e[4]=t.search,e[5]=t.tags,e[6]=l,e[7]=a,e[8]=i,e[9]=c):(l=e[6],a=e[7],i=e[8],c=e[9]);let m;e[10]!==o||e[11]!==l||e[12]!==t.categories||e[13]!==t.tags||e[14]!==a?(m=async x=>{const{pageParam:p}=x,h=a.length>0?{operator:"or",conditions:[{field:["title"],operator:"contains",value:a},{field:["description"],operator:"contains",value:a},{field:["id"],operator:"contains",value:a},{field:["server","name"],operator:"contains",value:a}]}:void 0;return Le(o,"REGISTRY_ITEM_LIST",{cursor:p,limit:l,tags:t.tags.length?t.tags:void 0,categories:t.categories.length?t.categories:void 0,where:h})},e[10]=o,e[11]=l,e[12]=t.categories,e[13]=t.tags,e[14]=a,e[15]=m):m=e[15];let u;return e[16]!==i||e[17]!==m?(u={queryKey:i,queryFn:m,initialPageParam:void 0,getNextPageParam:Yn,staleTime:3e4},e[16]=i,e[17]=m,e[18]=u):u=e[18],c(u)}function Yn(t){return t.nextCursor}function Hn(){const t=X.c(8),{org:e}=he();let n;t[0]!==e.id?(n={connectionId:ve,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const r=be(n);let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=H.filters(),t[2]=o):o=t[2];let l;t[3]!==r?(l=async()=>Le(r,"REGISTRY_ITEM_FILTERS",{}),t[3]=r,t[4]=l):l=t[4];let a;t[5]===Symbol.for("react.memo_cache_sentinel")?(a={tags:[],categories:[]},t[5]=a):a=t[5];let i;return t[6]!==l?(i={queryKey:o,queryFn:l,placeholderData:a,staleTime:6e4},t[6]=l,t[7]=i):i=t[7],Ze(i)}function ns(){const t=X.c(29),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==e?(l=async()=>{await Promise.all([e.invalidateQueries({queryKey:H.items()}),e.invalidateQueries({queryKey:H.filters()})])},t[2]=e,t[3]=l):l=t[3];const a=l;let i;t[4]!==o?(i=async g=>(await Le(o,"REGISTRY_ITEM_CREATE",{data:g})).item,t[4]=o,t[5]=i):i=t[5];let c;t[6]!==a||t[7]!==i?(c={mutationFn:i,onSuccess:a},t[6]=a,t[7]=i,t[8]=c):c=t[8];const m=$e(c);let u;t[9]!==o?(u=async g=>{const{id:I,data:f}=g;return(await Le(o,"REGISTRY_ITEM_UPDATE",{id:I,data:f})).item},t[9]=o,t[10]=u):u=t[10];let x;t[11]!==a||t[12]!==u?(x={mutationFn:u,onSuccess:a},t[11]=a,t[12]=u,t[13]=x):x=t[13];const p=$e(x);let h;t[14]!==o?(h=async g=>(await Le(o,"REGISTRY_ITEM_DELETE",{id:g})).item,t[14]=o,t[15]=h):h=t[15];let d;t[16]!==a||t[17]!==h?(d={mutationFn:h,onSuccess:a},t[16]=a,t[17]=h,t[18]=d):d=t[18];const b=$e(d);let j;t[19]!==o?(j=async g=>Le(o,"REGISTRY_ITEM_BULK_CREATE",{items:g}),t[19]=o,t[20]=j):j=t[20];let _;t[21]!==a||t[22]!==j?(_={mutationFn:j,onSuccess:a},t[21]=a,t[22]=j,t[23]=_):_=t[23];const k=$e(_);let y;return t[24]!==k||t[25]!==m||t[26]!==b||t[27]!==p?(y={createMutation:m,updateMutation:p,deleteMutation:b,bulkCreateMutation:k},t[24]=k,t[25]=m,t[26]=b,t[27]=p,t[28]=y):y=t[28],y}function Kt(t){const e=X.c(37),{org:n,project:r}=he();let o;e[0]!==n.id?(o={connectionId:ve,orgId:n.id},e[0]=n.id,e[1]=o):o=e[1];const l=be(o),a=Qe();let i;e[2]!==t||e[3]!==r.id?(i=H.registryConfigByPlugin(r.id??"",t),e[2]=t,e[3]=r.id,e[4]=i):i=e[4];let c;e[5]!==l||e[6]!==t||e[7]!==r.id?(c=async()=>Le(l,"PROJECT_PLUGIN_CONFIG_GET",{projectId:r.id,pluginId:t}),e[5]=l,e[6]=t,e[7]=r.id,e[8]=c):c=e[8];const m=!!r.id;let u;e[9]!==i||e[10]!==c||e[11]!==m?(u={queryKey:i,queryFn:c,enabled:m,staleTime:6e4},e[9]=i,e[10]=c,e[11]=m,e[12]=u):u=e[12];const x=Ze(u);let p;e[13]!==l||e[14]!==t||e[15]!==r.id?(p=async $=>{const M=(await Le(l,"PROJECT_PLUGIN_CONFIG_GET",{projectId:r.id,pluginId:t}))?.config?.settings??{};return Le(l,"PROJECT_PLUGIN_CONFIG_UPDATE",{projectId:r.id,pluginId:t,settings:{...M,...$}})},e[13]=l,e[14]=t,e[15]=r.id,e[16]=p):p=e[16];let h;e[17]!==t||e[18]!==r.id||e[19]!==a?(h=async()=>{await a.invalidateQueries({queryKey:H.registryConfigByPlugin(r.id??"",t)})},e[17]=t,e[18]=r.id,e[19]=a,e[20]=h):h=e[20];let d;e[21]!==p||e[22]!==h?(d={mutationFn:p,onSuccess:h},e[21]=p,e[22]=h,e[23]=d):d=e[23];const b=$e(d),j=x.data?.config?.settings?.registryName??"Private Registry",_=x.data?.config?.settings?.registryIcon??"",k=x.data?.config?.settings?.llmConnectionId??"",y=x.data?.config?.settings?.llmModelId??"",g=x.data?.config?.settings?.acceptPublishRequests??!1,I=x.data?.config?.settings?.requireApiToken??!1,f=x.data?.config?.settings?.storePrivateOnly??!1,w=x.data?.config?.settings?.rateLimitEnabled??!0,P=x.data?.config?.settings?.rateLimitWindow==="minute"?"minute":"hour",N=x.data?.config?.settings?.rateLimitMax,T=typeof N=="number"&&N>=1?Math.floor(N):100;let v;return e[24]!==g||e[25]!==x.isLoading||e[26]!==w||e[27]!==T||e[28]!==P||e[29]!==_||e[30]!==k||e[31]!==y||e[32]!==j||e[33]!==I||e[34]!==b||e[35]!==f?(v={registryName:j,registryIcon:_,registryLLMConnectionId:k,registryLLMModelId:y,acceptPublishRequests:g,requireApiToken:I,storePrivateOnly:f,rateLimitEnabled:w,rateLimitWindow:P,rateLimitMax:T,isLoadingConfig:x.isLoading,saveRegistryConfigMutation:b},e[24]=g,e[25]=x.isLoading,e[26]=w,e[27]=T,e[28]=P,e[29]=_,e[30]=k,e[31]=y,e[32]=j,e[33]=I,e[34]=b,e[35]=f,e[36]=v):v=e[36],v}function Wn(t){const e=X.c(15),{org:n}=he();let r;e[0]!==n.id?(r={connectionId:ve,orgId:n.id},e[0]=n.id,e[1]=r):r=e[1];const o=be(r);let l;e[2]!==n.id||e[3]!==t.sortBy||e[4]!==t.sortDirection||e[5]!==t.status?(l=H.publishRequestsListByOrg(n.id,t.status,t.sortBy,t.sortDirection),e[2]=n.id,e[3]=t.sortBy,e[4]=t.sortDirection,e[5]=t.status,e[6]=l):l=e[6];let a;e[7]!==o||e[8]!==t.sortBy||e[9]!==t.sortDirection||e[10]!==t.status?(a=async c=>{const{pageParam:m}=c;return Le(o,"REGISTRY_PUBLISH_REQUEST_LIST",{status:t.status,sortBy:t.sortBy,sortDirection:t.sortDirection,limit:Os,offset:m})},e[7]=o,e[8]=t.sortBy,e[9]=t.sortDirection,e[10]=t.status,e[11]=a):a=e[11];let i;return e[12]!==l||e[13]!==a?(i={queryKey:l,queryFn:a,initialPageParam:0,getNextPageParam:Jn,staleTime:3e4,refetchOnMount:!0},e[12]=l,e[13]=a,e[14]=i):i=e[14],bs(i)}function Jn(t,e){const n=e.reduce(Zn,0);return n<t.totalCount?n:void 0}function Zn(t,e){return t+e.items.length}function Xn(){const t=X.c(9),{org:e}=he();let n;t[0]!==e.id?(n={connectionId:ve,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const r=be(n);let o;t[2]!==e.id?(o=H.publishRequestsCountByOrg(e.id),t[2]=e.id,t[3]=o):o=t[3];let l;t[4]!==r?(l=async()=>Le(r,"REGISTRY_PUBLISH_REQUEST_COUNT",{}),t[4]=r,t[5]=l):l=t[5];let a;return t[6]!==o||t[7]!==l?(a={queryKey:o,queryFn:l,staleTime:3e4},t[6]=o,t[7]=l,t[8]=a):a=t[8],Ze(a)}function er(){const t=X.c(17),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==e?(l=async()=>{await Promise.all([e.invalidateQueries({queryKey:H.publishRequests()})])},t[2]=e,t[3]=l):l=t[3];const a=l;let i;t[4]!==o?(i=async d=>Le(o,"REGISTRY_PUBLISH_REQUEST_REVIEW",d),t[4]=o,t[5]=i):i=t[5];let c;t[6]!==a||t[7]!==i?(c={mutationFn:i,onSuccess:a},t[6]=a,t[7]=i,t[8]=c):c=t[8];const m=$e(c);let u;t[9]!==o?(u=async d=>Le(o,"REGISTRY_PUBLISH_REQUEST_DELETE",{id:d}),t[9]=o,t[10]=u):u=t[10];let x;t[11]!==a||t[12]!==u?(x={mutationFn:u,onSuccess:a},t[11]=a,t[12]=u,t[13]=x):x=t[13];const p=$e(x);let h;return t[14]!==p||t[15]!==m?(h={reviewMutation:m,deleteMutation:p},t[14]=p,t[15]=m,t[16]=h):h=t[16],h}function tr(){const t=X.c(5),{org:e}=he();let n;t[0]!==e.id?(n={connectionId:ve,orgId:e.id},t[0]=e.id,t[1]=n):n=t[1];const r=be(n);let o;t[2]===Symbol.for("react.memo_cache_sentinel")?(o=H.publishApiKeys(),t[2]=o):o=t[2];let l;return t[3]!==r?(l={queryKey:o,queryFn:async()=>Le(r,"REGISTRY_PUBLISH_API_KEY_LIST",{}),staleTime:3e4},t[3]=r,t[4]=l):l=t[4],Ze(l)}function sr(){const t=X.c(19),e=Qe(),{org:n}=he();let r;t[0]!==n.id?(r={connectionId:ve,orgId:n.id},t[0]=n.id,t[1]=r):r=t[1];const o=be(r);let l;t[2]!==o?(l=async d=>Le(o,"REGISTRY_PUBLISH_API_KEY_GENERATE",{name:d}),t[2]=o,t[3]=l):l=t[3];let a;t[4]!==e?(a=async()=>{await e.invalidateQueries({queryKey:H.publishApiKeys()})},t[4]=e,t[5]=a):a=t[5];let i;t[6]!==l||t[7]!==a?(i={mutationFn:l,onSuccess:a},t[6]=l,t[7]=a,t[8]=i):i=t[8];const c=$e(i);let m;t[9]!==o?(m=async d=>Le(o,"REGISTRY_PUBLISH_API_KEY_REVOKE",{keyId:d}),t[9]=o,t[10]=m):m=t[10];let u;t[11]!==e?(u=async()=>{await e.invalidateQueries({queryKey:H.publishApiKeys()})},t[11]=e,t[12]=u):u=t[12];let x;t[13]!==m||t[14]!==u?(x={mutationFn:m,onSuccess:u},t[13]=m,t[14]=u,t[15]=x):x=t[15];const p=$e(x);let h;return t[16]!==c||t[17]!==p?(h={generateMutation:c,revokeMutation:p},t[16]=c,t[17]=p,t[18]=h):h=t[18],h}function ms(t){return t?t.split(/[;|]/).map(e=>e.trim()).filter(Boolean):[]}function us(t){const e=[];let n="",r=!1;for(let o=0;o<t.length;o+=1){const l=t[o],a=t[o+1];if(l==='"'){r&&a==='"'?(n+='"',o+=1):r=!r;continue}if(l===","&&!r){e.push(n.trim()),n="";continue}n+=l}return e.push(n.trim()),e}const nr=["id","title"],rr=["id","title","description","remote_url","remote_type","tags","categories","is_public"];function ir(t){const e=t.split(/\r?\n/).map(m=>m.trim()).filter(Boolean);if(e.length<2)return{items:[],warnings:[{line:0,message:"CSV must have a header row and at least one data row"}],skipped:0};const n=us(e[0]??""),r=new Map,o=[];n.forEach((m,u)=>{const x=m.toLowerCase().trim();x&&r.set(x,u)});for(const m of nr)r.has(m)||o.push({line:1,message:`Missing required column: "${m}"`});for(const m of n){const u=m.toLowerCase().trim();u&&!rr.includes(u)&&o.push({line:1,message:`Unknown column "${m}" will be ignored`})}if(!r.has("id")||!r.has("title"))return{items:[],warnings:o,skipped:0};const l=(m,u)=>{const x=r.get(u);return typeof x=="number"?m[x]??"":""},a=[],i=new Set;let c=0;for(let m=1;m<e.length;m+=1){const u=us(e[m]??""),x=l(u,"id").trim(),p=l(u,"title").trim();if(!x){o.push({line:m+1,message:"Missing id — row skipped"}),c+=1;continue}if(!p){o.push({line:m+1,message:`Missing title for id="${x}" — row skipped`}),c+=1;continue}if(i.has(x)){o.push({line:m+1,message:`Duplicate id="${x}" — row skipped`}),c+=1;continue}i.add(x);const h=l(u,"description").trim(),d=l(u,"remote_url").trim(),j=l(u,"remote_type").trim().toLowerCase()==="sse"?"sse":"http",_=ms(l(u,"tags")),k=ms(l(u,"categories")),y=l(u,"is_public").trim().toLowerCase(),g=y==="true"||y==="1"||y==="yes";a.push({id:x,title:p,description:h||null,is_public:g,_meta:{"mcp.mesh":{..._.length>0?{tags:_}:{},...k.length>0?{categories:k}:{}}},server:{name:x,title:p,description:h||void 0,remotes:d?[{type:j,url:d}]:[]}})}return{items:a,warnings:o,skipped:c}}const lr=`id,title,description,remote_url,remote_type,tags,categories,is_public
2
2
  my-mcp-server,My MCP Server,A useful MCP server,https://example.com/mcp,http,ai|tools,productivity,true
3
3
  another-server,Another Server,Another useful server,https://example2.com/mcp,http,data|analytics,data-processing,false`;function ar(){const t=new Blob([lr],{type:"text/csv;charset=utf-8"}),e=URL.createObjectURL(t),n=document.createElement("a");n.href=e,n.download="registry-import-template.csv",n.click(),URL.revokeObjectURL(e)}function or(t){const e=X.c(63),{open:n,onOpenChange:r,isImporting:o,onImport:l}=t,a=o===void 0?!1:o,[i,c]=S.useState(null),[m,u]=S.useState(null),[x,p]=S.useState(null),h=S.useRef(null);let d;e[0]!==r?(d=V=>{r(V),V||(c(null),u(null),p(null),h.current&&(h.current.value=""))},e[0]=r,e[1]=d):d=e[1];const b=d;let j;e[2]===Symbol.for("react.memo_cache_sentinel")?(j=async V=>{if(!V)return;p(V.name),u(null);const ce=await V.text();c(ir(ce))},e[2]=j):j=e[2];const _=j;let k;e[3]!==l||e[4]!==i?(k=async()=>{if(!i?.items.length)return;const V=await l(i.items);u(V)},e[3]=l,e[4]=i,e[5]=k):k=e[5];const y=k;let g;e[6]!==i?.items?(g=i?.items??[],e[6]=i?.items,e[7]=g):g=e[7];const I=g;let f;e[8]!==i?.warnings?(f=i?.warnings??[],e[8]=i?.warnings,e[9]=f):f=e[9];const w=f;let R;e[10]!==w?(R=w.some(ur),e[10]=w,e[11]=R):R=e[11];const P=R,N=m!==null;let T;e[12]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsxs(zt,{children:[s.jsx(Ot,{children:"Import MCP Servers from CSV"}),s.jsx(Ut,{children:"Upload a CSV file to bulk-import MCP servers into the registry."})]}),e[12]=T):T=e[12];let v;e[13]===Symbol.for("react.memo_cache_sentinel")?(v=()=>h.current?.click(),e[13]=v):v=e[13];let $;e[14]===Symbol.for("react.memo_cache_sentinel")?($=s.jsx(cs,{size:14}),e[14]=$):$=e[14];const D=x?"Change file":"Choose CSV file";let M;e[15]!==a||e[16]!==D?(M=s.jsxs(F,{variant:"outline",size:"sm",className:"gap-1.5",onClick:v,disabled:a,children:[$,D]}),e[15]=a,e[16]=D,e[17]=M):M=e[17];let E;e[18]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("input",{ref:h,type:"file",accept:".csv,text/csv",className:"hidden",onChange:V=>_(V.target.files?.[0]??null)}),e[18]=E):E=e[18];let L;e[19]!==x?(L=x&&s.jsx("span",{className:"text-sm text-muted-foreground truncate",children:x}),e[19]=x,e[20]=L):L=e[20];let q;e[21]===Symbol.for("react.memo_cache_sentinel")?(q=s.jsx("div",{className:"flex-1"}),e[21]=q):q=e[21];let z;e[22]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsxs(F,{variant:"ghost",size:"sm",className:"gap-1.5 text-xs text-muted-foreground",onClick:ar,children:[s.jsx(gn,{size:14}),"Download template"]}),e[22]=z):z=e[22];let O;e[23]!==M||e[24]!==L?(O=s.jsxs("div",{className:"flex items-center gap-3",children:[M,E,L,q,z]}),e[23]=M,e[24]=L,e[25]=O):O=e[25];let B;e[26]!==w?(B=w.length>0&&s.jsx("div",{className:"rounded-lg border border-yellow-200 bg-yellow-50 dark:border-yellow-900 dark:bg-yellow-950/30 p-3 grid gap-1",children:w.map(mr)}),e[26]=w,e[27]=B):B=e[27];let Q;e[28]!==I||e[29]!==i?(Q=I.length>0&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsx("span",{className:"text-sm font-medium",children:"Preview"}),s.jsxs(G,{variant:"secondary",children:[I.length," items"]}),i?.skipped?s.jsxs(G,{variant:"outline",className:"text-yellow-600",children:[i.skipped," skipped"]}):null]}),s.jsx("div",{className:"border rounded-lg overflow-hidden",children:s.jsx("div",{className:"max-h-[300px] overflow-y-auto",children:s.jsxs(vs,{children:[s.jsx(ys,{children:s.jsxs(At,{children:[s.jsx(Oe,{className:"w-[140px]",children:"ID"}),s.jsx(Oe,{children:"Title"}),s.jsx(Oe,{children:"Remote URL"}),s.jsx(Oe,{className:"w-[80px] text-center",children:"Public"}),s.jsx(Oe,{children:"Tags"})]})}),s.jsx(Ns,{children:I.map(dr)})]})})})]}),e[28]=I,e[29]=i,e[30]=Q):Q=e[30];let te;e[31]!==m?(te=m&&s.jsxs("div",{className:"rounded-lg border p-3 grid gap-1.5",children:[s.jsxs("div",{className:"flex items-center gap-2 text-sm font-medium",children:[s.jsx(ft,{size:16,className:"text-emerald-600"}),"Imported ",m.created," item(s) successfully"]}),m.errors.length>0&&s.jsx("div",{className:"grid gap-1 mt-1",children:m.errors.map(cr)})]}),e[31]=m,e[32]=te):te=e[32];let se;e[33]!==N||e[34]!==i?(se=!i&&!N&&s.jsxs("div",{className:"flex flex-col items-center justify-center py-8 text-center",children:[s.jsx(cs,{size:32,className:"text-muted-foreground/40 mb-3"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Choose a CSV file or download the template to get started."}),s.jsxs("p",{className:"text-xs text-muted-foreground/70 mt-1",children:["Required columns: ",s.jsx("code",{children:"id"}),", ",s.jsx("code",{children:"title"}),". Optional:"," ",s.jsx("code",{children:"description"}),", ",s.jsx("code",{children:"remote_url"}),","," ",s.jsx("code",{children:"remote_type"}),", ",s.jsx("code",{children:"tags"}),","," ",s.jsx("code",{children:"categories"}),", ",s.jsx("code",{children:"is_public"}),"."]}),s.jsxs("p",{className:"text-xs text-muted-foreground/70 mt-1",children:["Use ",s.jsx("code",{children:"|"})," or ",s.jsx("code",{children:";"})," to separate multiple tags/categories within a cell."]})]}),e[33]=N,e[34]=i,e[35]=se):se=e[35];let re;e[36]!==O||e[37]!==B||e[38]!==Q||e[39]!==te||e[40]!==se?(re=s.jsxs("div",{className:"flex-1 overflow-y-auto grid gap-4 pr-1",children:[O,B,Q,te,se]}),e[36]=O,e[37]=B,e[38]=Q,e[39]=te,e[40]=se,e[41]=re):re=e[41];let ie;e[42]!==b?(ie=()=>b(!1),e[42]=b,e[43]=ie):ie=e[43];const ae=N?"Done":"Cancel";let oe;e[44]!==ie||e[45]!==ae?(oe=s.jsx(F,{variant:"outline",onClick:ie,children:ae}),e[44]=ie,e[45]=ae,e[46]=oe):oe=e[46];let pe;e[47]!==y||e[48]!==P||e[49]!==N||e[50]!==a||e[51]!==I.length?(pe=!N&&s.jsx(F,{onClick:y,disabled:a||I.length===0||P,children:a?"Importing...":`Import ${I.length} item(s)`}),e[47]=y,e[48]=P,e[49]=N,e[50]=a,e[51]=I.length,e[52]=pe):pe=e[52];let ue;e[53]!==oe||e[54]!==pe?(ue=s.jsxs(qt,{className:"gap-2 sm:gap-0",children:[oe,pe]}),e[53]=oe,e[54]=pe,e[55]=ue):ue=e[55];let C;e[56]!==re||e[57]!==ue?(C=s.jsxs(Ft,{className:"sm:max-w-3xl max-h-[85vh] flex flex-col",children:[T,re,ue]}),e[56]=re,e[57]=ue,e[58]=C):C=e[58];let K;return e[59]!==b||e[60]!==n||e[61]!==C?(K=s.jsx(Bt,{open:n,onOpenChange:b,children:C}),e[59]=b,e[60]=n,e[61]=C,e[62]=K):K=e[62],K}function cr(t){return s.jsxs("p",{className:"text-xs text-destructive flex items-start gap-1.5",children:[s.jsx(vt,{size:12,className:"shrink-0 mt-0.5"}),s.jsxs("span",{children:[s.jsx("span",{className:"font-mono",children:t.id}),": ",t.error]})]},t.id)}function dr(t){return s.jsxs(At,{children:[s.jsx(Ue,{className:"font-mono text-xs",children:t.id}),s.jsx(Ue,{className:"text-sm",children:t.title}),s.jsx(Ue,{className:"text-xs text-muted-foreground max-w-[200px] truncate",children:t.server.remotes?.[0]?.url??s.jsx("span",{className:"italic",children:"none"})}),s.jsx(Ue,{className:"text-center",children:t.is_public?s.jsx(G,{variant:"secondary",className:"text-[10px] bg-emerald-100 text-emerald-700 dark:bg-emerald-950 dark:text-emerald-400",children:"Yes"}):s.jsx("span",{className:"text-xs text-muted-foreground",children:"No"})}),s.jsx(Ue,{className:"text-xs text-muted-foreground",children:(t._meta?.["mcp.mesh"]?.tags??[]).join(", ")||"-"})]},t.id)}function mr(t,e){return s.jsxs("p",{className:"text-xs text-yellow-700 dark:text-yellow-400 flex items-start gap-1.5",children:[s.jsx(vt,{size:12,className:"shrink-0 mt-0.5"}),s.jsxs("span",{children:[t.line>0&&s.jsxs("span",{className:"font-mono text-[10px] mr-1",children:["Line ",t.line,":"]}),t.message]})]},`${t.line}-${e}`)}function ur(t){return t.message.startsWith("Missing required column:")}function xr(t){const e=X.c(19),{open:n,onOpenChange:r,title:o,isDeleting:l,onConfirm:a}=t,i=l===void 0?!1:l;let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(yt,{children:"Delete registry item?"}),e[0]=c):c=e[0];let m;e[1]!==o?(m=s.jsxs(Nt,{children:[c,s.jsxs(wt,{children:["This action cannot be undone. Item ",s.jsx("strong",{children:o})," will be permanently removed from this private registry."]})]}),e[1]=o,e[2]=m):m=e[2];let u;e[3]!==i?(u=s.jsx(Ct,{disabled:i,children:"Cancel"}),e[3]=i,e[4]=u):u=e[4];const x=i?"Deleting...":"Delete";let p;e[5]!==i||e[6]!==a||e[7]!==x?(p=s.jsx(_t,{disabled:i,onClick:a,children:x}),e[5]=i,e[6]=a,e[7]=x,e[8]=p):p=e[8];let h;e[9]!==u||e[10]!==p?(h=s.jsxs(kt,{children:[u,p]}),e[9]=u,e[10]=p,e[11]=h):h=e[11];let d;e[12]!==m||e[13]!==h?(d=s.jsxs(St,{children:[m,h]}),e[12]=m,e[13]=h,e[14]=d):d=e[14];let b;return e[15]!==r||e[16]!==n||e[17]!==d?(b=s.jsx(Rt,{open:n,onOpenChange:r,children:d}),e[15]=r,e[16]=n,e[17]=d,e[18]=b):b=e[18],b}function hr(t){const[e]=t.id.split("/");return e??"provider"}function pr(t){return t._meta?.["mcp.mesh"]?.tags??[]}function fr(t){return t._meta?.["mcp.mesh"]?.categories??[]}function gr(t){return t.server?.icons?.[0]?.src??null}function jr(t){const e=X.c(56),{item:n,onEdit:r,onDelete:o}=t;let l;e[0]!==n?(l=gr(n),e[0]=n,e[1]=l):l=e[1];const a=l;let i;e[2]!==n?(i=[...pr(n),...fr(n)],e[2]=n,e[3]=i):i=e[3];const c=i;let m;e[4]!==c?(m=c.slice(0,3),e[4]=c,e[5]=m):m=e[5];const u=m,x=Math.max(0,c.length-u.length);let p;e[6]!==a||e[7]!==n.title?(p=s.jsx("div",{className:"size-10 rounded-lg border border-border bg-muted/20 overflow-hidden shrink-0 flex items-center justify-center",children:a?s.jsx("img",{src:a,alt:n.title,className:"h-full w-full object-cover",loading:"lazy"}):s.jsx("span",{className:"text-xs font-semibold text-muted-foreground",children:n.title.charAt(0).toUpperCase()})}),e[6]=a,e[7]=n.title,e[8]=p):p=e[8];let h;e[9]!==n.title?(h=s.jsx("p",{className:"font-medium truncate",children:n.title}),e[9]=n.title,e[10]=h):h=e[10];let d;e[11]!==n?(d=hr(n),e[11]=n,e[12]=d):d=e[12];let b;e[13]!==d?(b=s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:d}),e[13]=d,e[14]=b):b=e[14];let j;e[15]!==n.is_public?(j=n.is_public?s.jsxs(G,{variant:"default",className:"gap-1",children:[s.jsx(ws,{size:10}),"Public"]}):s.jsx(G,{variant:"secondary",children:"Private"}),e[15]=n.is_public,e[16]=j):j=e[16];let _;e[17]!==b||e[18]!==j?(_=s.jsxs("div",{className:"flex items-center gap-2",children:[b,j]}),e[17]=b,e[18]=j,e[19]=_):_=e[19];let k;e[20]!==h||e[21]!==_?(k=s.jsxs("div",{className:"min-w-0 flex-1",children:[h,_]}),e[20]=h,e[21]=_,e[22]=k):k=e[22];let y;e[23]!==k||e[24]!==p?(y=s.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[p,k]}),e[23]=k,e[24]=p,e[25]=y):y=e[25];let g;e[26]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(Dt,{asChild:!0,children:s.jsx(F,{variant:"ghost",size:"sm",className:"h-8 w-8 p-0",children:s.jsx(Xt,{size:18})})}),e[26]=g):g=e[26];let I;e[27]!==n||e[28]!==r?(I=s.jsx(Je,{onClick:()=>r(n),children:"Edit"}),e[27]=n,e[28]=r,e[29]=I):I=e[29];let f;e[30]!==n||e[31]!==o?(f=()=>o(n),e[30]=n,e[31]=o,e[32]=f):f=e[32];let w;e[33]===Symbol.for("react.memo_cache_sentinel")?(w=s.jsx(It,{size:14}),e[33]=w):w=e[33];let R;e[34]!==f?(R=s.jsxs(Je,{variant:"destructive",onClick:f,children:[w,"Delete"]}),e[34]=f,e[35]=R):R=e[35];let P;e[36]!==I||e[37]!==R?(P=s.jsxs($t,{children:[g,s.jsxs(Lt,{align:"end",children:[I,R]})]}),e[36]=I,e[37]=R,e[38]=P):P=e[38];let N;e[39]!==y||e[40]!==P?(N=s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[y,P]}),e[39]=y,e[40]=P,e[41]=N):N=e[41];const T=n._meta?.["mcp.mesh"]?.short_description||n.description||n.server.description||"No description provided.";let v;e[42]!==T?(v=s.jsx("p",{className:"text-sm text-muted-foreground line-clamp-2 min-h-10",children:T}),e[42]=T,e[43]=v):v=e[43];let $;e[44]!==n.id||e[45]!==u?($=u.map(L=>s.jsx(G,{variant:"secondary",children:L},`${n.id}-badge-${L}`)),e[44]=n.id,e[45]=u,e[46]=$):$=e[46];let D;e[47]!==x?(D=x>0&&s.jsxs(G,{variant:"outline",children:["+",x]}),e[47]=x,e[48]=D):D=e[48];let M;e[49]!==$||e[50]!==D?(M=s.jsxs("div",{className:"flex flex-wrap gap-1",children:[$,D]}),e[49]=$,e[50]=D,e[51]=M):M=e[51];let E;return e[52]!==N||e[53]!==v||e[54]!==M?(E=s.jsxs(me,{className:"p-4 gap-4 transition-colors hover:bg-muted/50",children:[N,v,M]}),e[52]=N,e[53]=v,e[54]=M,e[55]=E):E=e[55],E}function qs(t){const e=X.c(27),{value:n,onChange:r,onFileUpload:o,error:l,isUploading:a}=t,i=a===void 0?!1:a,[c,m]=S.useState(!1),[u,x]=S.useState(!1),p=S.useRef(null);let h;e[0]!==i?(h=T=>{T.preventDefault(),i||m(!0)},e[0]=i,e[1]=h):h=e[1];const d=h;let b;e[2]===Symbol.for("react.memo_cache_sentinel")?(b=T=>{T.preventDefault(),m(!1)},e[2]=b):b=e[2];const j=b;let _;e[3]!==i||e[4]!==o?(_=async T=>{if(T.preventDefault(),m(!1),i)return;const v=T.dataTransfer.files[0];v&&await o(v)},e[3]=i,e[4]=o,e[5]=_):_=e[5];const k=_;let y;e[6]!==i||e[7]!==o?(y=async T=>{const v=T.target.files?.[0];v&&!i&&await o(v),T.target.value=""},e[6]=i,e[7]=o,e[8]=y):y=e[8];const g=y,I=n.length>0;let f;e[9]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(le,{children:"Image"}),e[9]=f):f=e[9];let w;e[10]!==d||e[11]!==k||e[12]!==I||e[13]!==c||e[14]!==i||e[15]!==r||e[16]!==u||e[17]!==n?(w=I?s.jsx("div",{className:"relative group min-h-[180px] rounded-xl border border-border overflow-hidden bg-muted/10",children:s.jsxs("div",{className:"flex items-center gap-3 p-3 h-full",children:[s.jsx("div",{className:"size-20 rounded-lg border border-border bg-muted/20 overflow-hidden shrink-0",children:s.jsx("img",{src:n,alt:"Preview",className:"w-full h-full object-cover"})}),s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:n}),s.jsxs("div",{className:"flex items-center gap-2 mt-2",children:[s.jsxs(F,{type:"button",variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5",onClick:()=>p.current?.click(),disabled:i,children:[s.jsx(es,{className:"size-3"}),"Change"]}),s.jsxs(F,{type:"button",variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5 text-destructive hover:text-destructive",onClick:()=>{r(""),x(!1)},disabled:i,children:[s.jsx(It,{className:"size-3"}),"Remove"]})]})]})]})}):i?s.jsxs("div",{className:"relative min-h-[180px] rounded-xl border border-border bg-muted/10 flex flex-col items-center justify-center gap-3",children:[s.jsx(ut,{className:"size-8 animate-spin text-muted-foreground"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Uploading image..."})]}):s.jsxs("div",{className:ne("relative min-h-[180px] rounded-xl border-2 border-dashed transition-colors cursor-pointer flex flex-col",c?"border-primary bg-primary/5":"border-border hover:border-muted-foreground/40 hover:bg-muted/30"),onDragOver:d,onDragLeave:j,onDrop:k,onClick:()=>p.current?.click(),children:[s.jsxs("div",{className:"flex flex-col items-center justify-center gap-2 py-6 px-4 flex-1",children:[s.jsx("div",{className:ne("size-10 rounded-lg flex items-center justify-center transition-colors",c?"bg-primary/10 text-primary":"bg-muted/50 text-muted-foreground"),children:s.jsx(Ds,{size:20})}),s.jsxs("div",{className:"text-center",children:[s.jsx("p",{className:"text-sm font-medium text-foreground",children:c?"Drop image here":"Click or drag to upload"}),s.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:"PNG, JPG, SVG up to 2MB"})]})]}),u?s.jsx("div",{className:"border-t border-border px-3 py-2",onClick:br,children:s.jsx(je,{placeholder:"https://example.com/logo.png",value:n,className:"text-xs h-8",onChange:T=>r(T.target.value)})}):s.jsx("div",{className:"border-t border-border px-4 py-2",children:s.jsxs("button",{type:"button",className:"flex items-center gap-1.5 text-xs text-muted-foreground hover:text-foreground transition-colors w-full justify-center",onClick:T=>{T.stopPropagation(),x(!0)},children:[s.jsx($s,{className:"size-3"}),"Or paste an image URL"]})})]}),e[10]=d,e[11]=k,e[12]=I,e[13]=c,e[14]=i,e[15]=r,e[16]=u,e[17]=n,e[18]=w):w=e[18];let R;e[19]!==g?(R=s.jsx("input",{ref:p,type:"file",accept:"image/*",className:"hidden",onChange:g}),e[19]=g,e[20]=R):R=e[20];let P;e[21]!==l?(P=l&&s.jsx("p",{className:"text-xs text-destructive",children:l}),e[21]=l,e[22]=P):P=e[22];let N;return e[23]!==w||e[24]!==R||e[25]!==P?(N=s.jsxs("div",{className:"grid gap-1.5",children:[f,w,R,P]}),e[23]=w,e[24]=R,e[25]=P,e[26]=N):N=e[26],N}function br(t){return t.stopPropagation()}function Fs(){const[t,e]=S.useState("idle"),[n,r]=S.useState(null),{org:o}=he(),l=be({connectionId:ve,orgId:o.id});return{discover:async(c,m)=>{if(!c)return null;e("loading"),r(null);try{const u=await l.callTool({name:"REGISTRY_DISCOVER_TOOLS",arguments:{url:c,type:m==="sse"?"sse":"http"}}),x=u.structuredContent??u;if(u.isError){const p=u.content?.find(h=>h.type==="text")?.text??"Tool returned an error";return r(p),e("error"),null}return x.error?vr(x.error)?(r(x.error),e("auth_required"),null):(r(x.error),e("error"),null):!x.tools||x.tools.length===0?(r("No tools found on this MCP server."),e("error"),null):(e("success"),x.tools)}catch(u){const x=u instanceof Error?u.message:String(u);return r(x||"Could not discover tools."),e("error"),null}},discoverStatus:t,discoverError:n,resetDiscover:()=>{e("idle"),r(null)}}}function vr(t){const e=t.toLowerCase();return e.includes("authentication")||e.includes("unauthorized")||e.includes("credentials")}function yr(t){const e=X.c(54),{tools:n,onChange:r,remoteUrl:o,remoteType:l,externalDiscoverStatus:a,externalDiscoverError:i}=t,[c,m]=S.useState(n.length>0),{discover:u,discoverStatus:x,discoverError:p,resetDiscover:h}=Fs(),d=a??x,b=i??p;let j;e[0]!==u||e[1]!==r||e[2]!==l||e[3]!==o?(j=async()=>{if(!o)return;const z=await u(o,l??"http");z&&(r(z),m(!0))},e[0]=u,e[1]=r,e[2]=l,e[3]=o,e[4]=j):j=e[4];const _=j;let k;e[5]!==r||e[6]!==h?(k=()=>{r([]),h()},e[5]=r,e[6]=h,e[7]=k):k=e[7];const y=k;let g;e[8]!==c?(g=()=>m(!c),e[8]=c,e[9]=g):g=e[9];let I,f;e[10]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(ts,{size:14,className:"text-muted-foreground"}),f=s.jsx("span",{children:"Tools"}),e[10]=I,e[11]=f):(I=e[10],f=e[11]);let w;e[12]!==n.length?(w=n.length>0&&s.jsx(G,{variant:"secondary",className:"text-xs px-1.5 py-0",children:n.length}),e[12]=n.length,e[13]=w):w=e[13];let R;e[14]!==c?(R=c?s.jsx(jn,{size:14,className:"text-muted-foreground"}):s.jsx(Ts,{size:14,className:"text-muted-foreground"}),e[14]=c,e[15]=R):R=e[15];let P;e[16]!==g||e[17]!==w||e[18]!==R?(P=s.jsxs("button",{type:"button",className:"flex items-center gap-2 text-sm font-medium cursor-pointer",onClick:g,children:[I,f,w,R]}),e[16]=g,e[17]=w,e[18]=R,e[19]=P):P=e[19];let N;e[20]!==y||e[21]!==n.length?(N=n.length>0&&s.jsxs(F,{type:"button",variant:"ghost",size:"sm",className:"h-7 text-xs gap-1.5 text-muted-foreground",onClick:y,children:[s.jsx(It,{size:12}),"Clear"]}),e[20]=y,e[21]=n.length,e[22]=N):N=e[22];let T;e[23]!==d||e[24]!==_||e[25]!==o||e[26]!==n.length?(T=o&&s.jsxs(F,{type:"button",variant:"outline",size:"sm",className:"h-7 text-xs gap-1.5 border-green-500/30 text-green-600 dark:text-green-400 shadow-[0_0_8px_rgba(34,197,94,0.3)] hover:shadow-[0_0_14px_rgba(34,197,94,0.5)] hover:border-green-500/50 transition-all",onClick:_,disabled:d==="loading",children:[d==="loading"?s.jsx(ut,{size:12,className:"animate-spin"}):s.jsx(es,{size:12}),d==="loading"?"Discovering...":n.length>0?"Refresh":"Auto-discover"]}),e[23]=d,e[24]=_,e[25]=o,e[26]=n.length,e[27]=T):T=e[27];let v;e[28]!==T||e[29]!==N?(v=s.jsxs("div",{className:"flex items-center gap-2",children:[N,T]}),e[28]=T,e[29]=N,e[30]=v):v=e[30];let $;e[31]!==v||e[32]!==P?($=s.jsxs("div",{className:"flex items-center justify-between",children:[P,v]}),e[31]=v,e[32]=P,e[33]=$):$=e[33];let D;e[34]!==d||e[35]!==n.length?(D=d==="success"&&s.jsxs("div",{className:"flex items-center gap-2 text-xs text-green-600 dark:text-green-400 bg-green-50 dark:bg-green-950/30 rounded-lg px-3 py-2",children:[s.jsx(ft,{size:14,className:"shrink-0"}),s.jsxs("span",{children:["Discovered ",n.length," tool",n.length!==1?"s":""," ","successfully."]})]}),e[34]=d,e[35]=n.length,e[36]=D):D=e[36];let M;e[37]!==b||e[38]!==d?(M=d==="error"&&b&&s.jsxs("div",{className:"flex items-center gap-2 text-xs text-destructive bg-destructive/10 rounded-lg px-3 py-2",children:[s.jsx(vt,{size:14,className:"shrink-0"}),s.jsx("span",{children:b})]}),e[37]=b,e[38]=d,e[39]=M):M=e[39];let E;e[40]!==c||e[41]!==n?(E=c&&n.length>0&&s.jsx("div",{className:"rounded-xl border border-border divide-y divide-border overflow-hidden max-h-48 overflow-y-auto",children:n.map(Nr)}),e[40]=c,e[41]=n,e[42]=E):E=e[42];let L;e[43]!==d||e[44]!==c||e[45]!==o||e[46]!==n.length?(L=c&&n.length===0&&d==="idle"&&s.jsx("p",{className:"text-xs text-muted-foreground px-1",children:o?'Click "Auto-discover" to load tools from the MCP server.':"Add a Remote URL first, then tools can be auto-discovered."}),e[43]=d,e[44]=c,e[45]=o,e[46]=n.length,e[47]=L):L=e[47];let q;return e[48]!==$||e[49]!==D||e[50]!==M||e[51]!==E||e[52]!==L?(q=s.jsxs("div",{className:"space-y-3",children:[$,D,M,E,L]}),e[48]=$,e[49]=D,e[50]=M,e[51]=E,e[52]=L,e[53]=q):q=e[53],q}function Nr(t){return s.jsx("div",{className:"flex items-center gap-3 px-3 py-2",children:s.jsxs("div",{className:"flex-1 min-w-0",children:[s.jsx("p",{className:"text-sm font-mono truncate",children:t.name}),t.description&&s.jsx("p",{className:"text-xs text-muted-foreground truncate",children:t.description})]})},t.name)}function Bs(t){const{org:e}=he(),[n,r]=S.useState(!1),l=typeof window<"u"&&window.location.hostname==="localhost"?`${e.id}_dev-assets`:null,a=be({connectionId:l??"noop",orgId:e.id});return{uploadImage:async(c,m)=>{if(!l)return Z.error("Image upload requires an object-storage connection. Configure one in plugin settings."),null;if(!c.type.startsWith("image/"))return Z.error("Only image files are supported"),null;if(c.size>5*1024*1024)return Z.error("Image size must be less than 5MB"),null;r(!0);try{const u=await a.callTool({name:"PUT_PRESIGNED_URL",arguments:{key:m,contentType:c.type}}),x=u.structuredContent?.url||u.url;if(!x)throw new Error("Failed to get presigned URL");const p=await fetch(x,{method:"PUT",body:c,headers:{"Content-Type":c.type}});if(!p.ok)throw new Error(`Upload failed: ${p.statusText}`);const h=await a.callTool({name:"GET_PRESIGNED_URL",arguments:{key:m,expiresIn:31536e3}}),d=h.structuredContent?.url||h.url;if(!d)throw new Error("Failed to get public URL");return d}catch(u){return console.error("Image upload failed:",u),Z.error(u instanceof Error?u.message:"Failed to upload image. Please try again."),null}finally{r(!1)}},isUploading:n}}function wr(){const{org:t}=he(),[e,n]=S.useState(null),r=S.useRef(0),o=be({connectionId:ve,orgId:t.id});return{generate:async a=>{r.current+=1,n(a.type);try{const i=await o.callTool({name:"REGISTRY_AI_GENERATE",arguments:a});if(i.isError){const c=i.content?.find(m=>m.type==="text")?.text??"Failed to generate content";throw new Error(c)}return i.structuredContent??i}finally{r.current-=1,r.current===0&&n(null)}},loadingType:e,isGenerating:e!==null}}const Cr=new Set(["http","sse","stdio"]),_r=/^[a-z0-9]+(?:[/-][a-z0-9._-]+)*$/,xs=["internal","automation","support","sales","ops","ai"],Gs=["productivity","communication","customer-support","development","data","operations"],kr=["Essentials","Details","Advanced"],ht="h-7 text-xs border-green-500/30 text-green-600 dark:text-green-400 shadow-[0_0_8px_rgba(34,197,94,0.3)] hover:shadow-[0_0_14px_rgba(34,197,94,0.5)] hover:border-green-500/50 transition-all";function hs(t){return t.replace(/^https?:\/\//i,"").trim()}function pt(t){const e=t.trim();return e?/^https?:\/\//i.test(e)?e:`https://${e}`:""}function ot(t){return t.trim().toLowerCase()}function Tt(t){return Array.from(new Set(t.map(ot).filter(e=>e.length>0)))}function mt(t){return t.trim().toLowerCase().replace(/\s+/g,"-").replace(/[^a-z0-9._-]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}function Sr(t){const e=X.c(4),{current:n}=t;let r;e[0]!==n?(r=kr.map((l,a)=>{const i=a+1,c=i===n,m=i<n;return s.jsxs("div",{className:"flex items-center gap-1.5",children:[a>0&&s.jsx("div",{className:ne("w-4 h-px",m?"bg-primary":"bg-border")}),s.jsxs("div",{className:ne("flex items-center gap-1.5 px-2 py-0.5 rounded-full text-xs transition-colors",c?"bg-primary/10 text-primary font-medium":m?"text-primary":"text-muted-foreground"),children:[s.jsx("span",{className:ne("size-5 rounded-full inline-flex items-center justify-center text-[10px] font-semibold shrink-0",c?"bg-primary text-primary-foreground":m?"bg-primary/20 text-primary":"bg-muted text-muted-foreground"),children:i}),s.jsx("span",{className:"hidden sm:inline",children:l})]})]},l)}),e[0]=n,e[1]=r):r=e[1];let o;return e[2]!==r?(o=s.jsx("div",{className:"flex items-center gap-1.5",children:r}),e[2]=r,e[3]=o):o=e[3],o}function Rr(t){const e=X.c(28),{id:n,label:r,values:o,availableOptions:l,placeholder:a,onChange:i}=t,[c,m]=S.useState(""),[u,x]=S.useState(!1);let p,h,d,b,j;if(e[0]!==l||e[1]!==n||e[2]!==c||e[3]!==u||e[4]!==r||e[5]!==i||e[6]!==a||e[7]!==o){const y=Tt(l),g=Tt(o),I=new Set(g),f=ot(c),w=y.filter(M=>!I.has(M)).filter(M=>f?M.includes(f):!0).slice(0,8),R=M=>{const E=ot(M);!E||I.has(E)||i([...g,E])},P=M=>{i(g.filter(E=>E!==M))},N=()=>{const M=c.split(/[,\n;]/).map(ot).filter(Boolean);if(M.length===0)return;const E=[...g];for(const L of M)E.includes(L)||E.push(L);i(E),m("")},T=f;b="grid gap-2",e[13]!==n||e[14]!==r?(j=s.jsx(le,{htmlFor:n,children:r}),e[13]=n,e[14]=r,e[15]=j):j=e[15],p="relative";let v;e[16]!==n?(v=()=>{const M=document.getElementById(n);M instanceof HTMLInputElement&&M.focus()},e[16]=n,e[17]=v):v=e[17];let $;e[18]===Symbol.for("react.memo_cache_sentinel")?($=()=>x(!0),e[18]=$):$=e[18];let D;e[19]===Symbol.for("react.memo_cache_sentinel")?(D=M=>m(M.target.value),e[19]=D):D=e[19],h=s.jsx("div",{className:"min-h-9 w-full rounded-xl border border-input bg-background px-2.5 py-1.5 text-sm focus-within:border-ring focus-within:ring-ring/50 focus-within:ring-[3px]",onClick:v,children:s.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[g.map(M=>s.jsxs(G,{variant:"secondary",className:"gap-1",children:[M,s.jsx("button",{type:"button",onClick:E=>{E.preventDefault(),E.stopPropagation(),P(M)},children:s.jsx(Nn,{size:12})})]},`${n}-${M}`)),s.jsx("input",{id:n,className:"flex-1 min-w-[120px] bg-transparent outline-none border-none text-sm",placeholder:g.length?"":a,value:c,onFocus:$,onBlur:()=>{x(!1),N()},onChange:D,onKeyDown:M=>{if(M.key==="Enter"||M.key===","){M.preventDefault(),N();return}M.key==="Backspace"&&!c&&g.length&&P(g[g.length-1]??"")}})]})}),d=u&&s.jsx("div",{className:"absolute z-50 mt-1 w-full rounded-xl border border-border bg-background shadow-lg max-h-56 overflow-y-auto",children:w.length>0?w.map(M=>s.jsx("button",{type:"button",className:"w-full text-left px-2.5 py-1.5 text-sm hover:bg-muted",onMouseDown:Ir,onClick:()=>{R(M),m("")},children:M},`${n}-suggestion-${M}`)):T?s.jsxs("button",{type:"button",className:"w-full text-left px-2.5 py-1.5 text-sm hover:bg-muted",onMouseDown:Tr,onClick:()=>{R(T),m("")},children:['Create "',T,'"']}):s.jsx("div",{className:"px-2.5 py-1.5 text-sm text-muted-foreground",children:"Type to search or create."})}),e[0]=l,e[1]=n,e[2]=c,e[3]=u,e[4]=r,e[5]=i,e[6]=a,e[7]=o,e[8]=p,e[9]=h,e[10]=d,e[11]=b,e[12]=j}else p=e[8],h=e[9],d=e[10],b=e[11],j=e[12];let _;e[20]!==p||e[21]!==h||e[22]!==d?(_=s.jsxs("div",{className:p,children:[h,d]}),e[20]=p,e[21]=h,e[22]=d,e[23]=_):_=e[23];let k;return e[24]!==b||e[25]!==j||e[26]!==_?(k=s.jsxs("div",{className:b,children:[j,_]}),e[24]=b,e[25]=j,e[26]=_,e[27]=k):k=e[27],k}function Tr(t){return t.preventDefault()}function Ir(t){return t.preventDefault()}function Mr({id:t,value:e,availableOptions:n,onChange:r}){const[o,l]=S.useState(e),[a,i]=S.useState(!1),c=S.useRef(e);c.current!==e&&(c.current=e,l(e));const m=Tt([...Gs,...n,e]).filter(Boolean),u=ot(o),x=m.filter(h=>u?h.includes(u):!0).slice(0,8),p=h=>{const d=ot(h);r(d),l(d),i(!1)};return s.jsxs("div",{className:"grid gap-2",children:[s.jsx(le,{htmlFor:t,children:"Category"}),s.jsxs("div",{className:"relative",children:[s.jsx(je,{id:t,className:"h-9 text-sm",placeholder:"Select or create category",value:o,onFocus:()=>{l(e),i(!0)},onBlur:()=>{p(o)},onChange:h=>l(h.target.value),onKeyDown:h=>{h.key==="Enter"&&(h.preventDefault(),p(o))}}),e&&s.jsx("button",{type:"button",className:"absolute right-2 top-1/2 -translate-y-1/2 text-xs text-muted-foreground hover:text-foreground",onMouseDown:h=>h.preventDefault(),onClick:()=>{r(""),l("")},children:"clear"}),a&&s.jsx("div",{className:"absolute z-50 mt-1 w-full rounded-xl border border-border bg-background shadow-lg max-h-56 overflow-y-auto",children:x.length>0?x.map(h=>s.jsx("button",{type:"button",className:"w-full text-left px-2.5 py-1.5 text-sm hover:bg-muted",onMouseDown:d=>d.preventDefault(),onClick:()=>p(h),children:h},`${t}-${h}`)):u?s.jsxs("button",{type:"button",className:"w-full text-left px-2.5 py-1.5 text-sm hover:bg-muted",onMouseDown:h=>h.preventDefault(),onClick:()=>p(u),children:['Create "',u,'"']}):s.jsx("div",{className:"px-2.5 py-1.5 text-sm text-muted-foreground",children:"Type to search or create."})})]})]})}function Pr({open:t,onOpenChange:e,item:n,draft:r,availableTags:o=[],availableCategories:l=[],defaultLLMConnectionId:a="",defaultLLMModelId:i="",isSubmitting:c=!1,onSubmit:m}){const{org:u}=he(),{uploadImage:x,isUploading:p}=Bs(),{generate:h,loadingType:d}=wr(),{discover:b,discoverStatus:j,discoverError:_,resetDiscover:k}=Fs(),y=!!n,g=r?._meta?.["mcp.mesh"],I=n?.title??r?.title??"",f=n?.id?.split("/")[0]??r?.id?.split("/")[0]??"",w=n?.description??r?.description??"",R=n?._meta?.["mcp.mesh"]?.short_description??g?.short_description??"",P=n?._meta?.["mcp.mesh"]?.owner??g?.owner??"",N=n?.server?.repository?.url??r?.server?.repository?.url??"",T=n?._meta?.["mcp.mesh"]?.readme??g?.readme??"",v=n?._meta?.["mcp.mesh"]?.readme_url??g?.readme_url??"",$=hs(n?.server?.remotes?.[0]?.url??r?.server?.remotes?.[0]?.url??""),D=n?.server?.remotes?.[0]?.type??r?.server?.remotes?.[0]?.type??"http",M=n?._meta?.["mcp.mesh"]?.tags??g?.tags??[],E=n?._meta?.["mcp.mesh"]?.categories?.[0]??g?.categories?.[0]??"",L=n?.server?.icons?.[0]?.src??r?.server?.icons?.[0]?.src??"",q=n?._meta?.["mcp.mesh"]?.tools??g?.tools??[],z=n?.is_public??r?.is_public??!1,[O,B]=S.useState(1),[Q,te]=S.useState(I),[se,re]=S.useState(f),[ie,ae]=S.useState(w),[oe,pe]=S.useState(R),[ue,C]=S.useState(P),[K,V]=S.useState(N),[ce,fe]=S.useState(T),[we,Ce]=S.useState(v),[J,_e]=S.useState(T?"content":"link"),[xe,ke]=S.useState($),[ee,ge]=S.useState(D),[Re,ye]=S.useState(M),[Me,Ee]=S.useState(E),[Se,ze]=S.useState(L),[Ne,Fe]=S.useState(q),[Be,Xe]=S.useState(z),[A,de]=S.useState({}),Te=!!(a&&i),De=()=>{B(1),te(I),re(f),ae(w),pe(R),C(P),V(N),fe(T),Ce(v),_e(T?"content":"link"),ke($),ge(D),ye(M),Ee(E),ze(L),Fe(q),Xe(z),de({}),k(),Ge.current="",Pe.current&&(clearTimeout(Pe.current),Pe.current=null)},st=async U=>{if(!U)return;const Y=y?n?.id:`${se}/${Q}`.toLowerCase(),Ae=mt(Y||"temp"),Ye=U.name.split(".").pop()||"png",He=`registry/${u.id}/${Ae}/icon.${Ye}`,dt=await x(U,He);dt?(ze(dt),de(We=>({...We,imageUrl:void 0}))):de(We=>({...We,imageUrl:"Failed to upload image. Please try again."}))},Pe=S.useRef(null),Ge=S.useRef(""),nt=S.useRef(ee);nt.current=ee;const ct=U=>{!U&&Pe.current&&(clearTimeout(Pe.current),Pe.current=null),e(U),U||De()},rt=async()=>{const U=pt(xe);if(!U)return;Ge.current=U;const Y=await b(U,nt.current);Y&&Fe(Y)},it=U=>{Pe.current&&clearTimeout(Pe.current);const Y=pt(U);!Y||Y===Ge.current||U.includes(".")&&(Pe.current=setTimeout(async()=>{Ge.current=Y;const Ae=await b(Y,nt.current);Ae&&Fe(Ae)},800))},Ke=()=>Te?{llmConnectionId:a,modelId:i}:null,Ve=()=>({name:Q.trim(),provider:se.trim(),url:pt(xe),owner:ue.trim(),repositoryUrl:K.trim(),description:ie.trim(),shortDescription:oe.trim(),tags:Re,categories:Me?[Me]:[],availableTags:[...xs,...o],availableCategories:[...Gs,...l],tools:Ne}),lt=async()=>{const U=Ke();if(!U)return;const Y=await h({...U,type:"description",context:Ve()});Y.result&&ae(Y.result.slice(0,1500))},at=async()=>{const U=Ke();if(!U)return;const Y=await h({...U,type:"short_description",context:Ve()});Y.result&&pe(Y.result.slice(0,160))},W=async()=>{const U=Ke();if(!U)return;const Y=await h({...U,type:"tags",context:Ve()});Y.items?.length&&ye(Tt(Y.items))},Ie=async()=>{const U=Ke();if(!U)return;const Y=await h({...U,type:"categories",context:Ve()});Y.items?.[0]&&Ee(ot(Y.items[0]))},xt=async()=>{const U=Ke();if(!U)return;const Y=await h({...U,type:"readme",context:Ve()});Y.result&&(fe(Y.result.slice(0,5e4)),_e("content"))},rs=U=>{const Y={};if(U===1){const Ae=mt(se),Ye=mt(Q),He=`${Ae}/${Ye}`;Q.trim()||(Y.title="Name is required."),y||(Ae?Ye?_r.test(He)||(Y.provider="Use lowercase letters/numbers and separators '/' or '-'."):Y.title="Name must contain valid characters.":Y.provider="Provider is required.");const dt=pt(xe),We=ee.trim().toLowerCase();if(We!=="stdio"&&dt)try{const gt=new URL(dt);["http:","https:"].includes(gt.protocol)||(Y.remoteUrl="Remote URL must be http(s).")}catch{Y.remoteUrl="Remote URL is invalid."}if(We&&!Cr.has(We)&&(Y.remoteType="Remote type must be: http, sse or stdio."),Se.trim()&&!Se.trim().startsWith("data:image/"))try{const Vt=new URL(Se.trim());["http:","https:"].includes(Vt.protocol)||(Y.imageUrl="Image URL must be http(s).")}catch{Y.imageUrl="Image URL is invalid."}}if(U===2&&(ie.length>1500&&(Y.description="Description must be 1500 characters or less."),oe.trim().length>160&&(Y.shortDescription="Short description must be 160 characters or less.")),U===3){const Ae=we.trim();if(Ae)try{const He=new URL(Ae);["http:","https:"].includes(He.protocol)||(Y.readmeUrl="README URL must be http(s).")}catch{Y.readmeUrl="README URL is invalid."}ce.trim().length>5e4&&(Y.readme="README must be 50 000 characters or less.");const Ye=K.trim();if(Ye)try{const He=new URL(Ye);["http:","https:"].includes(He.protocol)||(Y.repositoryUrl="Repository URL must be http(s).")}catch{Y.repositoryUrl="Repository URL is invalid."}}return de(Y),Object.values(Y).every(Ae=>Ae===void 0)},Ws=()=>{rs(O)&&O<3&&B(O+1)},Js=()=>{O>1&&B(O-1)},Zs=async()=>{if(!rs(3))return;const U=Q.trim(),Y=mt(se),Ae=mt(U),Ye=`${Y}/${Ae}`,He=pt(xe),dt=ee.trim().toLowerCase(),We=Se.trim(),gt=K.trim(),Vt=oe.trim(),sn=ce.trim(),nn=we.trim(),rn=Tt(Re),ln=Me?[ot(Me)]:[],an=n?n.server?.name??n.id:"",on=(y?an:Ye).trim(),Yt=ie.trim(),cn=ue.trim(),is={title:U,description:Yt.length>0?Yt:null,is_public:Be,_meta:{"mcp.mesh":{tags:rn,categories:ln,short_description:Vt||null,owner:cn||null,readme:sn||null,readme_url:nn||null,...Ne.length>0?{tools:Ne}:{}}},server:{name:on,title:U,description:Yt||void 0,icons:We?[{src:We}]:[],repository:gt?{url:gt}:void 0,remotes:He?[{type:dt||"http",url:He}]:[]}};if(y&&n){await m({id:n.id,data:is}),e(!1);return}await m({id:Ye,...is}),e(!1),De()},Xs=s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{className:"row-span-2 grid gap-3 content-start",children:[s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(le,{htmlFor:"registry-item-provider",children:"Provider"}),s.jsx(je,{id:"registry-item-provider",className:"h-9 text-sm",placeholder:"acme",value:se,onChange:U=>re(U.target.value),disabled:y}),!y&&s.jsxs("p",{className:"text-xs text-muted-foreground",children:["Item ID:"," ",s.jsx("span",{className:"font-mono",children:`${mt(se)||"provider"}/${mt(Q)||"name"}`})]}),A.provider&&s.jsx("p",{className:"text-xs text-destructive",children:A.provider})]}),s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(le,{htmlFor:"registry-item-title",children:"Name"}),s.jsx(je,{id:"registry-item-title",className:"h-9 text-sm",placeholder:"Internal MCP",value:Q,onChange:U=>te(U.target.value)}),A.title&&s.jsx("p",{className:"text-xs text-destructive",children:A.title})]})]}),s.jsx("div",{className:"row-span-2 content-start",children:s.jsx(qs,{value:Se,onChange:U=>{ze(U),de(Y=>({...Y,imageUrl:void 0}))},onFileUpload:st,error:A.imageUrl,isUploading:p})}),s.jsxs("div",{className:"col-span-2 grid gap-1.5",children:[s.jsx(le,{htmlFor:"registry-remote-url",children:"Remote URL"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("div",{className:"flex-1 flex items-center rounded-xl border border-input px-3",children:[s.jsx("span",{className:"text-xs font-semibold text-muted-foreground mr-1",children:"https://"}),s.jsx("input",{id:"registry-remote-url",className:"flex-1 h-9 bg-transparent outline-none text-sm",placeholder:"example.com/mcp",value:xe,onChange:U=>{const Y=hs(U.target.value);ke(Y),it(Y)}})]}),s.jsxs(_s,{value:ee,onValueChange:ge,children:[s.jsx(ks,{id:"registry-remote-type",className:"w-[90px] h-9 shrink-0",children:s.jsx(Ss,{placeholder:"Type"})}),s.jsxs(Rs,{children:[s.jsx(Et,{value:"http",children:"http"}),s.jsx(Et,{value:"sse",children:"sse"}),s.jsx(Et,{value:"stdio",children:"stdio"})]})]})]}),A.remoteUrl&&s.jsx("p",{className:"text-xs text-destructive",children:A.remoteUrl}),A.remoteType&&s.jsx("p",{className:"text-xs text-destructive",children:A.remoteType})]}),xe.trim()&&s.jsxs("div",{className:"col-span-2 space-y-2",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs(F,{type:"button",variant:"outline",size:"sm",className:ne(ht,"gap-1.5"),onClick:rt,disabled:j==="loading",children:[j==="loading"?s.jsx(ut,{size:12,className:"animate-spin"}):s.jsx(es,{size:12}),j==="loading"?"Discovering tools...":Ne.length>0?"Re-discover tools":"Discover tools from URL"]}),Ne.length>0&&j!=="loading"&&s.jsxs("span",{className:"text-xs text-muted-foreground",children:[Ne.length," tool",Ne.length!==1?"s":""," loaded"]})]}),j==="success"&&Ne.length>0&&s.jsxs("div",{className:"rounded-lg border border-green-500/20 bg-green-50 dark:bg-green-950/20 px-3 py-2 space-y-1.5",children:[s.jsxs("div",{className:"flex items-center gap-2 text-xs text-green-600 dark:text-green-400",children:[s.jsx(ft,{size:14,className:"shrink-0"}),s.jsxs("span",{className:"font-medium",children:[Ne.length," tool",Ne.length!==1?"s":""," discovered"]})]}),s.jsxs("div",{className:"flex flex-wrap gap-1",children:[Ne.slice(0,8).map(U=>s.jsx(G,{variant:"secondary",className:"text-[10px] px-1.5 py-0 font-mono",children:U.name},U.name)),Ne.length>8&&s.jsxs("span",{className:"text-[10px] text-muted-foreground self-center",children:["+",Ne.length-8," more"]})]}),s.jsx("p",{className:"text-[10px] text-muted-foreground",children:"These tools will enrich AI-generated descriptions, tags and categories in the next step."})]}),j==="auth_required"&&_&&s.jsxs("div",{className:"flex items-center gap-2 text-xs text-amber-600 dark:text-amber-400 bg-amber-50 dark:bg-amber-950/20 border border-amber-500/20 rounded-lg px-3 py-2",children:[s.jsx(vt,{size:14,className:"shrink-0"}),s.jsx("span",{children:"This server requires authentication. The connection is valid but tools cannot be listed without credentials."})]}),j==="error"&&_&&s.jsxs("div",{className:"flex items-center gap-2 text-xs text-destructive bg-destructive/10 rounded-lg px-3 py-2",children:[s.jsx(vt,{size:14,className:"shrink-0"}),s.jsx("span",{children:_})]})]})]}),en=s.jsxs("div",{className:"grid gap-3",children:[s.jsxs("div",{className:"grid gap-1.5",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(le,{htmlFor:"registry-item-short-description",children:"Short Description"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"text-xs text-muted-foreground",children:[oe.length,"/160"]}),Te&&s.jsx(F,{type:"button",variant:"outline",size:"sm",className:ht,disabled:d==="short_description",onClick:at,children:d==="short_description"?"Generating...":"AI Generate"})]})]}),s.jsx(je,{id:"registry-item-short-description",className:"h-9 text-sm",placeholder:"Short summary for the store card",value:oe,maxLength:160,onChange:U=>pe(U.target.value)}),A.shortDescription&&s.jsx("p",{className:"text-xs text-destructive",children:A.shortDescription})]}),s.jsxs("div",{className:"grid gap-1.5",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(le,{htmlFor:"registry-item-description",children:"Description"}),s.jsxs("div",{className:"flex items-center gap-2",children:[s.jsxs("span",{className:"text-xs text-muted-foreground",children:[ie.length,"/1500"]}),Te&&s.jsx(F,{type:"button",variant:"outline",size:"sm",className:ht,disabled:d==="description",onClick:lt,children:d==="description"?"Generating...":"AI Generate"})]})]}),s.jsx(Gt,{id:"registry-item-description",className:"text-sm max-h-28 overflow-y-auto resize-none",placeholder:"Brief description of this MCP server",rows:2,value:ie,onChange:U=>ae(U.target.value)}),A.description&&s.jsx("p",{className:"text-xs text-destructive",children:A.description})]}),s.jsx("div",{className:"border-t border-border"}),s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{className:"grid content-start gap-2",children:[s.jsx(Mr,{id:"registry-category",value:Me,availableOptions:l,onChange:Ee}),Te&&s.jsx(F,{type:"button",variant:"outline",size:"sm",className:ne(ht,"justify-self-start"),disabled:d==="categories",onClick:Ie,children:d==="categories"?"Suggesting...":"AI Suggest"})]}),s.jsxs("div",{className:"grid content-start gap-2",children:[s.jsx(Rr,{id:"registry-tags",label:"Tags",values:Re,availableOptions:[...xs,...o],placeholder:"Type and press Enter or comma",onChange:ye}),Te&&s.jsx(F,{type:"button",variant:"outline",size:"sm",className:ne(ht,"justify-self-start"),disabled:d==="tags",onClick:W,children:d==="tags"?"Suggesting...":"AI Suggest"})]})]}),s.jsxs("div",{className:"flex items-center justify-between rounded-xl border border-border px-4 py-3",children:[s.jsxs("div",{className:"grid gap-0.5",children:[s.jsx(le,{htmlFor:"registry-is-public",className:"text-sm",children:"Public"}),s.jsx("p",{className:"text-xs text-muted-foreground",children:"Make this MCP visible in the public store URL."})]}),s.jsx(bt,{id:"registry-is-public",checked:Be,onCheckedChange:Xe})]})]}),tn=s.jsxs("div",{className:"grid gap-3",children:[s.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(le,{htmlFor:"registry-item-owner",children:"Owner (optional)"}),s.jsx(je,{id:"registry-item-owner",className:"h-9 text-sm",placeholder:"Team, company, or responsible person",value:ue,onChange:U=>C(U.target.value)})]}),s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(le,{htmlFor:"registry-item-repository-url",children:"Repository URL (optional)"}),s.jsx(je,{id:"registry-item-repository-url",className:"h-9 text-sm",placeholder:"https://github.com/org/repo",value:K,onChange:U=>V(U.target.value)}),A.repositoryUrl&&s.jsx("p",{className:"text-xs text-destructive",children:A.repositoryUrl})]})]}),s.jsxs("div",{className:"rounded-xl border border-border p-4 space-y-3",children:[s.jsxs("div",{className:"flex items-center justify-between",children:[s.jsx(le,{children:"README"}),s.jsxs("span",{className:"text-xs text-muted-foreground",children:[ce.length,"/50000"]})]}),s.jsx("div",{className:"inline-flex rounded-lg border border-border p-0.5",children:(Te?["link","content","generate"]:["link","content"]).map(U=>s.jsx("button",{type:"button",className:ne("px-2.5 py-1 text-xs rounded-md",J===U?"bg-primary text-primary-foreground":"text-muted-foreground"),onClick:()=>_e(U),children:U==="link"?"Link":U==="content"?"Content":"Generate"},U))}),J==="link"&&s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(je,{className:"h-9 text-sm",placeholder:"https://raw.githubusercontent.com/org/repo/main/README.md",value:we,onChange:U=>Ce(U.target.value)}),A.readmeUrl&&s.jsx("p",{className:"text-xs text-destructive",children:A.readmeUrl})]}),J==="content"&&s.jsxs("div",{className:"grid gap-1.5",children:[s.jsx(Gt,{className:"text-sm max-h-48 overflow-y-auto resize-none",placeholder:`# README
4
4
 
@@ -1 +1 @@
1
- import"./index-CzFqQvXW.js";import{c as s}from"./constants-0JLhMmM7.js";function m(t){if(!t)return"";const r=t.find(n=>n.name==="COLLECTION_REGISTRY_APP_LIST");if(r)return r.name;const e=t.find(n=>n.name==="REGISTRY_ITEM_LIST");if(e)return e.name;const i=t.find(n=>n.name.startsWith("COLLECTION_REGISTRY_APP_")&&n.name.endsWith("_LIST"));return i?i.name:""}function o(t){if(!t)return"";const r=t.find(n=>n.name==="COLLECTION_REGISTRY_APP_FILTERS");if(r)return r.name;const e=t.find(n=>n.name==="REGISTRY_ITEM_FILTERS");if(e)return e.name;const i=t.find(n=>n.name.startsWith("COLLECTION_REGISTRY_APP_")&&n.name.endsWith("_FILTERS"));return i?i.name:""}function I(t,r){if(!t)return"";const e=t.find(f=>f.name===`COLLECTION_REGISTRY_APP${r}`);if(e)return e.name;const i={_GET:"REGISTRY_ITEM_GET",_VERSIONS:"REGISTRY_ITEM_VERSIONS",_SEARCH:"REGISTRY_ITEM_SEARCH"},n=t.find(f=>f.name===i[r]);if(n)return n.name;const a=t.find(f=>f.name.startsWith("COLLECTION_REGISTRY_APP_")&&f.name.endsWith(r));return a?a.name:""}function R(t){if(!t)return[];const r=[];for(const e of t){let i=[];if(Array.isArray(e))i=e;else if(typeof e=="object"&&e!==null){const n=Object.keys(e).find(a=>Array.isArray(e[a]));n&&(i=e[n])}r.push(...i)}return r}const c={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function E(t){return t?c[t]??t.toUpperCase():null}function _(t){return t?t.match(/schemas\/([\d-]+)/)?.[1]??null:null}function S(t){if(!t)return[];if(Array.isArray(t))return t;if(typeof t=="object"&&t!==null){const r=Object.keys(t).find(e=>Array.isArray(t[e]));if(r)return t[r]}return[]}async function d(t,r,e,i){const n=await s({connectionId:t,orgId:r});try{const a=await n.callTool({name:e,arguments:i});return a.structuredContent??a}finally{await n.close().catch(console.error)}}export{R as a,o as b,d as c,I as d,S as e,m as f,E as g,_ as h};
1
+ import"./index-DVHuYwO5.js";import{c as s}from"./constants-DLWxw8L_.js";function m(t){if(!t)return"";const r=t.find(n=>n.name==="COLLECTION_REGISTRY_APP_LIST");if(r)return r.name;const e=t.find(n=>n.name==="REGISTRY_ITEM_LIST");if(e)return e.name;const i=t.find(n=>n.name.startsWith("COLLECTION_REGISTRY_APP_")&&n.name.endsWith("_LIST"));return i?i.name:""}function o(t){if(!t)return"";const r=t.find(n=>n.name==="COLLECTION_REGISTRY_APP_FILTERS");if(r)return r.name;const e=t.find(n=>n.name==="REGISTRY_ITEM_FILTERS");if(e)return e.name;const i=t.find(n=>n.name.startsWith("COLLECTION_REGISTRY_APP_")&&n.name.endsWith("_FILTERS"));return i?i.name:""}function I(t,r){if(!t)return"";const e=t.find(f=>f.name===`COLLECTION_REGISTRY_APP${r}`);if(e)return e.name;const i={_GET:"REGISTRY_ITEM_GET",_VERSIONS:"REGISTRY_ITEM_VERSIONS",_SEARCH:"REGISTRY_ITEM_SEARCH"},n=t.find(f=>f.name===i[r]);if(n)return n.name;const a=t.find(f=>f.name.startsWith("COLLECTION_REGISTRY_APP_")&&f.name.endsWith(r));return a?a.name:""}function R(t){if(!t)return[];const r=[];for(const e of t){let i=[];if(Array.isArray(e))i=e;else if(typeof e=="object"&&e!==null){const n=Object.keys(e).find(a=>Array.isArray(e[a]));n&&(i=e[n])}r.push(...i)}return r}const c={"streamable-http":"HTTP",http:"HTTP",sse:"SSE",stdio:"STDIO",websocket:"Websocket"};function E(t){return t?c[t]??t.toUpperCase():null}function _(t){return t?t.match(/schemas\/([\d-]+)/)?.[1]??null:null}function S(t){if(!t)return[];if(Array.isArray(t))return t;if(typeof t=="object"&&t!==null){const r=Object.keys(t).find(e=>Array.isArray(t[e]));if(r)return t[r]}return[]}async function d(t,r,e,i){const n=await s({connectionId:t,orgId:r});try{const a=await n.callTool({name:e,arguments:i});return a.structuredContent??a}finally{await n.close().catch(console.error)}}export{R as a,o as b,d as c,I as d,S as e,m as f,E as g,_ as h};
@@ -1,3 +1,3 @@
1
- import{r as J,c as I,j as s,c2 as oe,v as H,m as Re,B as pe,c3 as Fe,t as fe,u as Be,a as Ue,b as qe,c4 as Ge}from"./index-CzFqQvXW.js";import{c as Ve}from"./binder-CN-yhtfQ.js";import{u as ye}from"./useQuery-BE7O7fKt.js";import{h as He}from"./use-connection-CmCfM9T5.js";import{a as Ke,u as Qe,j as We}from"./constants-0JLhMmM7.js";import{u as xe,P as Je}from"./topbar-portal-mNbAP1zZ.js";import{i as ce}from"./Loading01-DvHkBn5K.js";import{t as Ye}from"./Settings01-CGjDKLLq.js";import{i as Ze}from"./Check-BGWNBpXb.js";import{t as Pe}from"./ChevronDown-CxLgy5uI.js";import{i as Ne}from"./AlertCircle-Dvy3oHwl.js";import{i as _e}from"./ArrowLeft-Ddv8Es1G.js";import{n as de}from"./CheckDone01-DgNkGXSd.js";import{s as Ie}from"./Clock-DjTfMWYb.js";import{a as Xe}from"./Copy01-Ba42JLNP.js";import{n as Ee}from"./Inbox01-DUxLR6jm.js";import{i as et}from"./CheckCircle-CDdaecse.js";import{i as tt}from"./InfoCircle-ORvzz6Jj.js";import{i as st}from"./XCircle-CGBoiIiF.js";import{u as Me}from"./useMutation-DsQcwaJP.js";import{T as se,b as ne,c as le,a as ge,d as je,e as be}from"./table-C7IfzCau.js";import{M as lt}from"./markdown-BsZjpnFH.js";import{n as nt}from"./ArrowDown-B0XF9QfR.js";import{i as it}from"./ArrowUp-CjPyEOxC.js";import{i as ot}from"./CheckVerified02-yC2IepeU.js";import{i as Se}from"./ChevronRight-B-dZm0Fo.js";import{i as rt}from"./File02-BBbAYdh-.js";import{s as at}from"./Hash02-B-r__uQj.js";import{s as ve,i as ct}from"./Rows03-RYFV31vk.js";import{B as dt}from"./badge-CMOYVtO8.js";import{b as mt,c as ut,d as ft,a as xt,C as pt}from"./card-BECXECFc.js";import{c as $e,d as me,a as Ce,b as we,S as ke}from"./select-CSl7KVC3.js";import"./index-gksA6r5d.js";const Ae=({size:t=24,color:e="currentColor",...l})=>J.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...l},J.createElement("path",{d:"M12 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));Ae.displayName="Columns02";const re={reportsList:(t,e,l)=>["reports","list",t,{category:e,status:l}],report:(t,e)=>["reports","detail",t,e],pluginConfig:(t,e)=>["project-plugin-config",t,e]};function ht(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[s.jsx(oe,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No report source connected"}),s.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect an MCP server that provides reports to view automated insights, performance audits, security scans, and more."})]}),t[0]=e):e=t[0],e}function gt(t){const e=I.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:a}=t,[i,r]=J.useState(!1),o=J.useRef(null);let d;if(e[0]!==l||e[1]!==n){let m;e[3]!==n?(m=S=>S.id===n,e[3]=n,e[4]=m):m=e[4],d=l.find(m),e[0]=l,e[1]=n,e[2]=d}else d=e[2];const c=d;let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=m=>{o.current?.contains(m.relatedTarget)||r(!1)},e[5]=u):u=e[5];const f=u;if(l.length===1){let m;e[6]!==c?(m=c?.icon?s.jsx("img",{src:c.icon,alt:"",className:"size-4 rounded"}):s.jsx(oe,{size:16}),e[6]=c,e[7]=m):m=e[7];const S=c?.title||"Reports";let _;e[8]!==S?(_=s.jsx("span",{children:S}),e[8]=S,e[9]=_):_=e[9];let $;return e[10]!==m||e[11]!==_?($=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[m,_]}),e[10]=m,e[11]=_,e[12]=$):$=e[12],$}let p;e[13]!==i?(p=()=>r(!i),e[13]=i,e[14]=p):p=e[14];let x;e[15]!==c?(x=c?.icon?s.jsx("img",{src:c.icon,alt:"",className:"size-4 rounded"}):s.jsx(oe,{size:16}),e[15]=c,e[16]=x):x=e[16];const h=c?.title||"Select source";let g;e[17]!==h?(g=s.jsx("span",{children:h}),e[17]=h,e[18]=g):g=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Pe,{size:14}),e[19]=b):b=e[19];let N;e[20]!==p||e[21]!==x||e[22]!==g?(N=s.jsxs("button",{type:"button",onClick:p,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[x,g,b]}),e[20]=p,e[21]=x,e[22]=g,e[23]=N):N=e[23];let y;e[24]!==l||e[25]!==i||e[26]!==a||e[27]!==n?(y=i&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(m=>s.jsxs("button",{type:"button",onClick:()=>{a(m.id),r(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[m.icon?s.jsx("img",{src:m.icon,alt:"",className:"size-4 rounded"}):s.jsx(oe,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:m.title}),m.id===n&&s.jsx(Ze,{size:14,className:"text-primary"})]},m.id))}),e[24]=l,e[25]=i,e[26]=a,e[27]=n,e[28]=y):y=e[28];let v;return e[29]!==N||e[30]!==y?(v=s.jsxs("div",{className:"relative",ref:o,onBlur:f,children:[N,y]}),e[29]=N,e[30]=y,e[31]=v):v=e[31],v}function jt(t){const e=I.c(2);let l;return e[0]!==t?(l=s.jsx(gt,{...t}),e[0]=t,e[1]=l):l=e[1],l}const ue={passing:{label:"Passing",color:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400 border-emerald-500/25",icon:et},warning:{label:"Warning",color:"bg-amber-500/15 text-amber-700 dark:text-amber-400 border-amber-500/25",icon:Ne},failing:{label:"Failing",color:"bg-red-500/15 text-red-700 dark:text-red-400 border-red-500/25",icon:st},info:{label:"Info",color:"bg-blue-500/15 text-blue-700 dark:text-blue-400 border-blue-500/25",icon:tt}};function De(t){const e=I.c(10),{status:l,size:n}=t,a=n===void 0?"default":n,i=ue[l]??ue.info,r=i.icon,o=a==="sm",d=o?"px-2 py-0.5":"px-2.5 py-1";let c;e[0]!==i.color||e[1]!==d?(c=H("inline-flex items-center gap-1 rounded-full border text-xs font-medium",d,i.color),e[0]=i.color,e[1]=d,e[2]=c):c=e[2];const u=o?12:14;let f;e[3]!==r||e[4]!==u?(f=s.jsx(r,{size:u}),e[3]=r,e[4]=u,e[5]=f):f=e[5];let p;return e[6]!==i.label||e[7]!==c||e[8]!==f?(p=s.jsxs("span",{className:c,children:[f,i.label]}),e[6]=i.label,e[7]=c,e[8]=f,e[9]=p):p=e[9],p}function ze(t){const e=I.c(11),{connectionId:l,toolCaller:n}=xe();let a;e[0]!==l||e[1]!==t?.category||e[2]!==t?.status?(a=re.reportsList(l,t?.category,t?.status),e[0]=l,e[1]=t?.category,e[2]=t?.status,e[3]=a):a=e[3];let i;e[4]!==t?.category||e[5]!==t?.status||e[6]!==n?(i=async()=>await n("REPORTS_LIST",{category:t?.category,status:t?.status}),e[4]=t?.category,e[5]=t?.status,e[6]=n,e[7]=i):i=e[7];let r;return e[8]!==a||e[9]!==i?(r={queryKey:a,queryFn:i,staleTime:6e4},e[8]=a,e[9]=i,e[10]=r):r=e[10],ye(r)}function bt(t){const e=I.c(10),{connectionId:l,toolCaller:n}=xe();let a;e[0]!==l||e[1]!==t?(a=re.report(l,t),e[0]=l,e[1]=t,e[2]=a):a=e[2];let i;e[3]!==t||e[4]!==n?(i=async()=>await n("REPORTS_GET",{id:t}),e[3]=t,e[4]=n,e[5]=i):i=e[5];const r=!!t;let o;return e[6]!==a||e[7]!==i||e[8]!==r?(o={queryKey:a,queryFn:i,enabled:r,staleTime:6e4},e[6]=a,e[7]=i,e[8]=r,e[9]=o):o=e[9],ye(o)}const yt={passing:"bg-emerald-500",warning:"bg-amber-500",failing:"bg-red-500",info:"bg-blue-500"},Te=["#A595FF","#FFC116","#DE3A6E"];function ae(t){const e=I.c(7),{icon:l,title:n}=t;let a;e[0]!==l?(a=s.jsx(l,{size:16,className:"opacity-75 shrink-0 text-foreground"}),e[0]=l,e[1]=a):a=e[1];let i;e[2]!==n?(i=s.jsx("span",{className:"text-base text-foreground opacity-75",children:n}),e[2]=n,e[3]=i):i=e[3];let r;return e[4]!==a||e[5]!==i?(r=s.jsxs("div",{className:"flex gap-2 items-center",children:[a,i]}),e[4]=a,e[5]=i,e[6]=r):r=e[6],r}function Nt(t){const e=I.c(2),{content:l}=t;let n;return e[0]!==l?(n=s.jsx(lt,{children:l}),e[0]=l,e[1]=n):n=e[1],n}function vt(t){const e=I.c(15),{metric:l}=t;let n;e[0]!==l.unit?(n=l.unit&&s.jsx("span",{className:"text-base text-muted-foreground ml-1",children:l.unit}),e[0]=l.unit,e[1]=n):n=e[1];let a;e[2]!==l.value||e[3]!==n?(a=s.jsxs("div",{className:"text-2xl leading-8 text-foreground font-normal tabular-nums",children:[l.value,n]}),e[2]=l.value,e[3]=n,e[4]=a):a=e[4];let i;e[5]!==l.status?(i=l.status&&s.jsx("span",{className:H("inline-block size-2 rounded-full shrink-0",yt[l.status])}),e[5]=l.status,e[6]=i):i=e[6];let r;e[7]!==l.label?(r=s.jsx("span",{className:"text-sm text-foreground",children:l.label}),e[7]=l.label,e[8]=r):r=e[8];let o;e[9]!==i||e[10]!==r?(o=s.jsxs("div",{className:"flex gap-1.5 items-center",children:[i,r]}),e[9]=i,e[10]=r,e[11]=o):o=e[11];let d;return e[12]!==a||e[13]!==o?(d=s.jsxs("div",{className:"flex flex-col gap-3 items-start justify-end border border-border rounded-lg p-5 flex-1",children:[a,o]}),e[12]=a,e[13]=o,e[14]=d):d=e[14],d}function Le(t){const e=I.c(12),{title:l,items:n,stacked:a}=t,i=a===void 0?!1:a;let r;e[0]!==l?(r=l&&s.jsx(ae,{icon:ve,title:l}),e[0]=l,e[1]=r):r=e[1];const o=i?"flex-col items-stretch":"items-stretch";let d;e[2]!==o?(d=H("flex gap-4",o),e[2]=o,e[3]=d):d=e[3];let c;e[4]!==n?(c=n.map(_t),e[4]=n,e[5]=c):c=e[5];let u;e[6]!==d||e[7]!==c?(u=s.jsx("div",{className:d,children:c}),e[6]=d,e[7]=c,e[8]=u):u=e[8];let f;return e[9]!==r||e[10]!==u?(f=s.jsxs("div",{className:"space-y-4",children:[r,u]}),e[9]=r,e[10]=u,e[11]=f):f=e[11],f}function _t(t,e){return s.jsx(vt,{metric:t},`${t.label}-${e}`)}function St(t){const e=I.c(16),{title:l,columns:n,rows:a}=t;let i;e[0]!==l?(i=l&&s.jsx(ae,{icon:ve,title:l}),e[0]=l,e[1]=i):i=e[1];let r;e[2]!==n?(r=n.map(wt),e[2]=n,e[3]=r):r=e[3];let o;e[4]!==r?(o=s.jsx(ge,{children:s.jsx(ne,{children:r})}),e[4]=r,e[5]=o):o=e[5];let d;e[6]!==a?(d=a.map($t),e[6]=a,e[7]=d):d=e[7];let c;e[8]!==d?(c=s.jsx(je,{children:d}),e[8]=d,e[9]=c):c=e[9];let u;e[10]!==o||e[11]!==c?(u=s.jsx("div",{className:"rounded-lg border overflow-hidden",children:s.jsxs(be,{children:[o,c]})}),e[10]=o,e[11]=c,e[12]=u):u=e[12];let f;return e[13]!==i||e[14]!==u?(f=s.jsxs("div",{className:"space-y-4",children:[i,u]}),e[13]=i,e[14]=u,e[15]=f):f=e[15],f}function $t(t,e){return s.jsx(ne,{children:t.map(Ct)},e)}function Ct(t,e){return s.jsx(le,{className:"text-sm",children:t??s.jsx("span",{className:"text-muted-foreground",children:"—"})},e)}function wt(t){return s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:t},t)}function Oe(t){const e=I.c(11),{title:l,items:n}=t;let a;e[0]!==l?(a=l&&s.jsx(ae,{icon:ot,title:l}),e[0]=l,e[1]=a):a=e[1];let i;if(e[2]!==n){let d;e[4]!==n.length?(d=(c,u)=>s.jsxs("div",{className:"flex gap-4 items-stretch",children:[s.jsxs("div",{className:"flex flex-col items-center justify-center w-4 shrink-0",children:[s.jsx("div",{className:"h-full w-px bg-border"}),s.jsx("div",{className:"w-2 h-4 rounded-full flex",style:{backgroundColor:Te[u%Te.length]}}),s.jsx("div",{className:H("h-full w-px bg-border",u===n.length-1&&"invisible")})]}),s.jsxs("div",{className:"flex flex-col gap-2 items-start py-3 pb-4 min-w-0",children:[s.jsx("span",{className:"text-sm font-medium text-foreground leading-none",children:c.label}),c.description&&s.jsx("p",{className:"text-sm text-foreground opacity-80 leading-5",children:c.description})]})]},`${c.label}-${u}`),e[4]=n.length,e[5]=d):d=e[5],i=n.map(d),e[2]=n,e[3]=i}else i=e[3];let r;e[6]!==i?(r=s.jsx("div",{className:"flex flex-col",children:i}),e[6]=i,e[7]=r):r=e[7];let o;return e[8]!==a||e[9]!==r?(o=s.jsxs("div",{className:"space-y-4",children:[a,r]}),e[8]=a,e[9]=r,e[10]=o):o=e[10],o}function kt(t){const e=I.c(3),{content:l}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ae,{icon:rt,title:"Notas"}),e[0]=n):n=e[0];let a;return e[1]!==l?(a=s.jsxs("div",{className:"space-y-4",children:[n,s.jsx("p",{className:"text-sm text-foreground opacity-80 leading-5",children:l})]}),e[1]=l,e[2]=a):a=e[2],a}function zt(t){const e=I.c(11),{delta:l}=t;if(l===0){let c;return e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("span",{className:"inline-flex items-center justify-center",children:s.jsx(ct,{size:16,className:"text-muted-foreground"})}),e[0]=c):c=e[0],c}const n=l>0,a=n?"text-emerald-600":"text-destructive";let i;e[1]!==a?(i=H("inline-flex items-center gap-0.5 text-sm font-medium",a),e[1]=a,e[2]=i):i=e[2];let r;e[3]!==n?(r=n?s.jsx(it,{size:16}):s.jsx(nt,{size:16}),e[3]=n,e[4]=r):r=e[4];let o;e[5]!==l?(o=Math.abs(l),e[5]=l,e[6]=o):o=e[6];let d;return e[7]!==i||e[8]!==r||e[9]!==o?(d=s.jsxs("span",{className:i,children:[r,o]}),e[7]=i,e[8]=r,e[9]=o,e[10]=d):d=e[10],d}function Tt(t){if(t.length===0)return[];const e=[...t];for(let l=e.length-1;l>0;l--){const n=Math.max(0,Math.min(e.length-1,l+(l%3===0?-2:l%2===0?1:-1)));[e[l],e[n]]=[e[n],e[l]]}return e.map((l,n)=>({...l,position:n+1,delta:0,reference_position:void 0}))}function he(t){const e=I.c(14),{rows:l,label:n}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={},e[0]=a):a=e[0];const[i,r]=J.useState(a);let o;e[1]!==n?(o=n&&s.jsx("span",{className:"text-xs font-mono uppercase text-muted-foreground opacity-60 tracking-wide px-1",children:n}),e[1]=n,e[2]=o):o=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(ge,{className:"sticky top-0 bg-background z-10",children:s.jsxs(ne,{children:[s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground w-[60px]",children:"#"}),s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground w-[60px]",children:"DELTA"}),s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:"PRODUTO"}),s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:"SCORE"}),s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:"GRADE"}),s.jsx(se,{className:"w-10"})]})}),e[3]=d):d=e[3];let c;if(e[4]!==i||e[5]!==l){let p;e[7]!==i?(p=(x,h)=>{const g=i[h]??!1,b=x.note&&typeof x.note=="object"?x.note:null,N=typeof x.note=="string"?!!x.note:b!==null&&Object.keys(b).length>0,y=x.reference_position!==void 0?x.reference_position-x.position:x.delta??0;return s.jsxs(J.Fragment,{children:[s.jsxs(ne,{children:[s.jsx(le,{children:s.jsxs("div",{className:"flex items-center gap-1 opacity-50",children:[s.jsx(at,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium text-muted-foreground tabular-nums",children:x.position})]})}),s.jsx(le,{children:s.jsx(zt,{delta:y})}),s.jsx(le,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[x.image&&s.jsx("img",{src:x.image,alt:"",className:"h-12 w-8 object-cover rounded-sm shrink-0 bg-muted"}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:x.label})]})}),x.values.map(It),s.jsx(le,{children:N?s.jsx("button",{type:"button",onClick:()=>r(v=>({...v,[h]:!v[h]})),className:"flex items-center justify-center size-6 text-muted-foreground hover:text-foreground transition-colors",children:g?s.jsx(Pe,{size:16}):s.jsx(Se,{size:16})}):s.jsx(Se,{size:16,className:"text-muted-foreground opacity-30"})})]}),N&&g&&s.jsx(ne,{className:"bg-muted/25",children:s.jsx(le,{colSpan:6,children:typeof x.note=="string"?s.jsxs("div",{className:"pl-8 pb-2 flex flex-col gap-1.5",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase opacity-50 tracking-wide",children:"MUDANÇA"}),s.jsx("p",{className:"text-sm text-foreground opacity-80 leading-5",children:x.note})]}):s.jsx("div",{className:"py-2 px-4",children:s.jsxs(be,{children:[s.jsx(ge,{children:s.jsx(ne,{children:Object.keys(b??{}).map(Pt)})}),s.jsx(je,{children:s.jsx(ne,{children:Object.values(b??{}).map(Rt)})})]})})})},`note-${h}`)]},h)},e[7]=i,e[8]=p):p=e[8],c=l.map(p),e[4]=i,e[5]=l,e[6]=c}else c=e[6];let u;e[9]!==c?(u=s.jsx("div",{className:"border border-border rounded-lg overflow-auto max-h-[520px]",children:s.jsxs(be,{children:[d,s.jsx(je,{children:c})]})}),e[9]=c,e[10]=u):u=e[10];let f;return e[11]!==o||e[12]!==u?(f=s.jsxs("div",{className:"flex flex-col gap-2 min-w-0 flex-1",children:[o,u]}),e[11]=o,e[12]=u,e[13]=f):f=e[13],f}function Rt(t,e){return s.jsx(le,{className:"text-sm tabular-nums",children:t??"—"},e)}function Pt(t){return s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:t},t)}function It(t,e){const n=e===1&&typeof t=="string"&&t.endsWith("%")?`${parseFloat(t)-10}%`:t;return s.jsx(le,{className:"text-sm tabular-nums",children:n},e)}function Et(t){const e=I.c(20),{title:l,rows:n}=t,[a,i]=J.useState(!1);let r;e[0]!==n?(r=Tt(n),e[0]=n,e[1]=r):r=e[1];const o=r;let d;e[2]!==l?(d=l&&s.jsx(ae,{icon:ve,title:l}),e[2]=l,e[3]=d):d=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=()=>i(Mt),e[4]=c):c=e[4];const u=a?"bg-primary text-primary-foreground border-primary":"bg-transparent text-muted-foreground border-border hover:text-foreground hover:border-foreground/30";let f;e[5]!==u?(f=H("inline-flex items-center gap-1.5 text-xs font-medium px-2.5 py-1.5 rounded-md border transition-colors",u),e[5]=u,e[6]=f):f=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Ae,{size:14}),e[7]=p):p=e[7];let x;e[8]!==f?(x=s.jsxs("button",{type:"button",onClick:c,className:f,children:[p,"Comparar ordenação anterior"]}),e[8]=f,e[9]=x):x=e[9];let h;e[10]!==d||e[11]!==x?(h=s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[d,x]}),e[10]=d,e[11]=x,e[12]=h):h=e[12];let g;e[13]!==o||e[14]!==n||e[15]!==a?(g=a?s.jsxs("div",{className:"flex gap-4 items-start",children:[s.jsx(he,{rows:n,label:"Ordenação Proposta"}),s.jsx(he,{rows:o,label:"Ordenação Atual"})]}):s.jsx(he,{rows:n}),e[13]=o,e[14]=n,e[15]=a,e[16]=g):g=e[16];let b;return e[17]!==h||e[18]!==g?(b=s.jsxs("div",{className:"space-y-4",children:[h,g]}),e[17]=h,e[18]=g,e[19]=b):b=e[19],b}function Mt(t){return!t}function At(t){const e=I.c(17),{section:l}=t;switch(l.type){case"markdown":{let n;return e[0]!==l.content?(n=s.jsx(Nt,{content:l.content}),e[0]=l.content,e[1]=n):n=e[1],n}case"metrics":{let n;return e[2]!==l.items||e[3]!==l.title?(n=s.jsx(Le,{title:l.title,items:l.items}),e[2]=l.items,e[3]=l.title,e[4]=n):n=e[4],n}case"table":{let n;return e[5]!==l.columns||e[6]!==l.rows||e[7]!==l.title?(n=s.jsx(St,{title:l.title,columns:l.columns,rows:l.rows}),e[5]=l.columns,e[6]=l.rows,e[7]=l.title,e[8]=n):n=e[8],n}case"criteria":{let n;return e[9]!==l.items||e[10]!==l.title?(n=s.jsx(Oe,{title:l.title,items:l.items}),e[9]=l.items,e[10]=l.title,e[11]=n):n=e[11],n}case"note":{let n;return e[12]!==l.content?(n=s.jsx(kt,{content:l.content}),e[12]=l.content,e[13]=n):n=e[13],n}case"ranked-list":{let n;return e[14]!==l.rows||e[15]!==l.title?(n=s.jsx(Et,{title:l.title,rows:l.rows}),e[14]=l.rows,e[15]=l.title,e[16]=n):n=e[16],n}default:return null}}function Dt(t){return new Date(t).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}function Lt(t){const e=[];e.push(`# ${t.title}`),e.push(""),e.push(`> ${t.summary}`),e.push("");const l=[`**Status:** ${t.status}`,`**Category:** ${t.category}`];t.source&&l.push(`**Source:** ${t.source}`),l.push(`**Updated:** ${t.updatedAt}`),t.tags?.length&&l.push(`**Tags:** ${t.tags.join(", ")}`),e.push(l.join(`
1
+ import{r as J,c as I,j as s,c2 as oe,v as H,n as Re,B as pe,c3 as Fe,t as fe,u as Be,a as Ue,b as qe,c4 as Ge}from"./index-DVHuYwO5.js";import{c as Ve}from"./binder-C2Kwp5aI.js";import{u as ye}from"./useQuery-CxvwMb--.js";import{h as He}from"./use-connection-CwB1S0Lk.js";import{a as Ke,u as Qe,j as We}from"./constants-DLWxw8L_.js";import{u as xe,P as Je}from"./topbar-portal-Cy4hr4gX.js";import{i as ce}from"./Loading01-DUUFtL7S.js";import{t as Ye}from"./Settings01-jEDDrq49.js";import{i as Ze}from"./Check-llxZXJNk.js";import{t as Pe}from"./ChevronDown-BPvdqfh0.js";import{i as Ne}from"./AlertCircle-DtdVhcv9.js";import{i as _e}from"./ArrowLeft-Dse_UWo5.js";import{n as de}from"./CheckDone01-DArNoCeR.js";import{s as Ie}from"./Clock-DCqyBdVg.js";import{a as Xe}from"./Copy01-DOsfcAr7.js";import{n as Ee}from"./Inbox01-DktY8c3P.js";import{i as et}from"./CheckCircle-naMxBwcc.js";import{i as tt}from"./InfoCircle-DDBpFLdR.js";import{i as st}from"./XCircle-BJSW1V34.js";import{u as Me}from"./useMutation-BskhtN65.js";import{T as se,b as ne,c as le,a as ge,d as je,e as be}from"./table-BwN-DdG1.js";import{M as lt}from"./markdown-DigmZCi5.js";import{n as nt}from"./ArrowDown-CD9f6dVF.js";import{i as it}from"./ArrowUp-C5pU0t20.js";import{i as ot}from"./CheckVerified02-B5N8FkZi.js";import{i as Se}from"./ChevronRight-bI92hTEK.js";import{i as rt}from"./File02-8H6UbpEV.js";import{s as at}from"./Hash02-B4zt7eqf.js";import{s as ve,i as ct}from"./Rows03-CeP6X8F6.js";import{B as dt}from"./badge-zns1OAW0.js";import{b as mt,c as ut,d as ft,a as xt,C as pt}from"./card-yVoc5Dl_.js";import{c as $e,d as me,a as Ce,b as we,S as ke}from"./select-CZ5oa2ZG.js";import"./index-BLvVZqmB.js";const Ae=({size:t=24,color:e="currentColor",...l})=>J.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...l},J.createElement("path",{d:"M12 3v18M7.8 3h8.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C21 5.28 21 6.12 21 7.8v8.4c0 1.68 0 2.52-.327 3.162a3 3 0 0 1-1.311 1.311C18.72 21 17.88 21 16.2 21H7.8c-1.68 0-2.52 0-3.162-.327a3 3 0 0 1-1.311-1.311C3 18.72 3 17.88 3 16.2V7.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C5.28 3 6.12 3 7.8 3Z"}));Ae.displayName="Columns02";const re={reportsList:(t,e,l)=>["reports","list",t,{category:e,status:l}],report:(t,e)=>["reports","detail",t,e],pluginConfig:(t,e)=>["project-plugin-config",t,e]};function ht(){const t=I.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[s.jsx(oe,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No report source connected"}),s.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect an MCP server that provides reports to view automated insights, performance audits, security scans, and more."})]}),t[0]=e):e=t[0],e}function gt(t){const e=I.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:a}=t,[i,r]=J.useState(!1),o=J.useRef(null);let d;if(e[0]!==l||e[1]!==n){let m;e[3]!==n?(m=S=>S.id===n,e[3]=n,e[4]=m):m=e[4],d=l.find(m),e[0]=l,e[1]=n,e[2]=d}else d=e[2];const c=d;let u;e[5]===Symbol.for("react.memo_cache_sentinel")?(u=m=>{o.current?.contains(m.relatedTarget)||r(!1)},e[5]=u):u=e[5];const f=u;if(l.length===1){let m;e[6]!==c?(m=c?.icon?s.jsx("img",{src:c.icon,alt:"",className:"size-4 rounded"}):s.jsx(oe,{size:16}),e[6]=c,e[7]=m):m=e[7];const S=c?.title||"Reports";let _;e[8]!==S?(_=s.jsx("span",{children:S}),e[8]=S,e[9]=_):_=e[9];let $;return e[10]!==m||e[11]!==_?($=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[m,_]}),e[10]=m,e[11]=_,e[12]=$):$=e[12],$}let p;e[13]!==i?(p=()=>r(!i),e[13]=i,e[14]=p):p=e[14];let x;e[15]!==c?(x=c?.icon?s.jsx("img",{src:c.icon,alt:"",className:"size-4 rounded"}):s.jsx(oe,{size:16}),e[15]=c,e[16]=x):x=e[16];const h=c?.title||"Select source";let g;e[17]!==h?(g=s.jsx("span",{children:h}),e[17]=h,e[18]=g):g=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Pe,{size:14}),e[19]=b):b=e[19];let N;e[20]!==p||e[21]!==x||e[22]!==g?(N=s.jsxs("button",{type:"button",onClick:p,className:"inline-flex items-center gap-2 px-3 py-1.5 text-sm font-medium rounded-md border border-border bg-background hover:bg-accent transition-colors",children:[x,g,b]}),e[20]=p,e[21]=x,e[22]=g,e[23]=N):N=e[23];let y;e[24]!==l||e[25]!==i||e[26]!==a||e[27]!==n?(y=i&&s.jsx("div",{className:"absolute left-0 top-full mt-1 z-50 min-w-48 rounded-md border border-border bg-popover p-1 shadow-md",children:l.map(m=>s.jsxs("button",{type:"button",onClick:()=>{a(m.id),r(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[m.icon?s.jsx("img",{src:m.icon,alt:"",className:"size-4 rounded"}):s.jsx(oe,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:m.title}),m.id===n&&s.jsx(Ze,{size:14,className:"text-primary"})]},m.id))}),e[24]=l,e[25]=i,e[26]=a,e[27]=n,e[28]=y):y=e[28];let v;return e[29]!==N||e[30]!==y?(v=s.jsxs("div",{className:"relative",ref:o,onBlur:f,children:[N,y]}),e[29]=N,e[30]=y,e[31]=v):v=e[31],v}function jt(t){const e=I.c(2);let l;return e[0]!==t?(l=s.jsx(gt,{...t}),e[0]=t,e[1]=l):l=e[1],l}const ue={passing:{label:"Passing",color:"bg-emerald-500/15 text-emerald-700 dark:text-emerald-400 border-emerald-500/25",icon:et},warning:{label:"Warning",color:"bg-amber-500/15 text-amber-700 dark:text-amber-400 border-amber-500/25",icon:Ne},failing:{label:"Failing",color:"bg-red-500/15 text-red-700 dark:text-red-400 border-red-500/25",icon:st},info:{label:"Info",color:"bg-blue-500/15 text-blue-700 dark:text-blue-400 border-blue-500/25",icon:tt}};function De(t){const e=I.c(10),{status:l,size:n}=t,a=n===void 0?"default":n,i=ue[l]??ue.info,r=i.icon,o=a==="sm",d=o?"px-2 py-0.5":"px-2.5 py-1";let c;e[0]!==i.color||e[1]!==d?(c=H("inline-flex items-center gap-1 rounded-full border text-xs font-medium",d,i.color),e[0]=i.color,e[1]=d,e[2]=c):c=e[2];const u=o?12:14;let f;e[3]!==r||e[4]!==u?(f=s.jsx(r,{size:u}),e[3]=r,e[4]=u,e[5]=f):f=e[5];let p;return e[6]!==i.label||e[7]!==c||e[8]!==f?(p=s.jsxs("span",{className:c,children:[f,i.label]}),e[6]=i.label,e[7]=c,e[8]=f,e[9]=p):p=e[9],p}function ze(t){const e=I.c(11),{connectionId:l,toolCaller:n}=xe();let a;e[0]!==l||e[1]!==t?.category||e[2]!==t?.status?(a=re.reportsList(l,t?.category,t?.status),e[0]=l,e[1]=t?.category,e[2]=t?.status,e[3]=a):a=e[3];let i;e[4]!==t?.category||e[5]!==t?.status||e[6]!==n?(i=async()=>await n("REPORTS_LIST",{category:t?.category,status:t?.status}),e[4]=t?.category,e[5]=t?.status,e[6]=n,e[7]=i):i=e[7];let r;return e[8]!==a||e[9]!==i?(r={queryKey:a,queryFn:i,staleTime:6e4},e[8]=a,e[9]=i,e[10]=r):r=e[10],ye(r)}function bt(t){const e=I.c(10),{connectionId:l,toolCaller:n}=xe();let a;e[0]!==l||e[1]!==t?(a=re.report(l,t),e[0]=l,e[1]=t,e[2]=a):a=e[2];let i;e[3]!==t||e[4]!==n?(i=async()=>await n("REPORTS_GET",{id:t}),e[3]=t,e[4]=n,e[5]=i):i=e[5];const r=!!t;let o;return e[6]!==a||e[7]!==i||e[8]!==r?(o={queryKey:a,queryFn:i,enabled:r,staleTime:6e4},e[6]=a,e[7]=i,e[8]=r,e[9]=o):o=e[9],ye(o)}const yt={passing:"bg-emerald-500",warning:"bg-amber-500",failing:"bg-red-500",info:"bg-blue-500"},Te=["#A595FF","#FFC116","#DE3A6E"];function ae(t){const e=I.c(7),{icon:l,title:n}=t;let a;e[0]!==l?(a=s.jsx(l,{size:16,className:"opacity-75 shrink-0 text-foreground"}),e[0]=l,e[1]=a):a=e[1];let i;e[2]!==n?(i=s.jsx("span",{className:"text-base text-foreground opacity-75",children:n}),e[2]=n,e[3]=i):i=e[3];let r;return e[4]!==a||e[5]!==i?(r=s.jsxs("div",{className:"flex gap-2 items-center",children:[a,i]}),e[4]=a,e[5]=i,e[6]=r):r=e[6],r}function Nt(t){const e=I.c(2),{content:l}=t;let n;return e[0]!==l?(n=s.jsx(lt,{children:l}),e[0]=l,e[1]=n):n=e[1],n}function vt(t){const e=I.c(15),{metric:l}=t;let n;e[0]!==l.unit?(n=l.unit&&s.jsx("span",{className:"text-base text-muted-foreground ml-1",children:l.unit}),e[0]=l.unit,e[1]=n):n=e[1];let a;e[2]!==l.value||e[3]!==n?(a=s.jsxs("div",{className:"text-2xl leading-8 text-foreground font-normal tabular-nums",children:[l.value,n]}),e[2]=l.value,e[3]=n,e[4]=a):a=e[4];let i;e[5]!==l.status?(i=l.status&&s.jsx("span",{className:H("inline-block size-2 rounded-full shrink-0",yt[l.status])}),e[5]=l.status,e[6]=i):i=e[6];let r;e[7]!==l.label?(r=s.jsx("span",{className:"text-sm text-foreground",children:l.label}),e[7]=l.label,e[8]=r):r=e[8];let o;e[9]!==i||e[10]!==r?(o=s.jsxs("div",{className:"flex gap-1.5 items-center",children:[i,r]}),e[9]=i,e[10]=r,e[11]=o):o=e[11];let d;return e[12]!==a||e[13]!==o?(d=s.jsxs("div",{className:"flex flex-col gap-3 items-start justify-end border border-border rounded-lg p-5 flex-1",children:[a,o]}),e[12]=a,e[13]=o,e[14]=d):d=e[14],d}function Le(t){const e=I.c(12),{title:l,items:n,stacked:a}=t,i=a===void 0?!1:a;let r;e[0]!==l?(r=l&&s.jsx(ae,{icon:ve,title:l}),e[0]=l,e[1]=r):r=e[1];const o=i?"flex-col items-stretch":"items-stretch";let d;e[2]!==o?(d=H("flex gap-4",o),e[2]=o,e[3]=d):d=e[3];let c;e[4]!==n?(c=n.map(_t),e[4]=n,e[5]=c):c=e[5];let u;e[6]!==d||e[7]!==c?(u=s.jsx("div",{className:d,children:c}),e[6]=d,e[7]=c,e[8]=u):u=e[8];let f;return e[9]!==r||e[10]!==u?(f=s.jsxs("div",{className:"space-y-4",children:[r,u]}),e[9]=r,e[10]=u,e[11]=f):f=e[11],f}function _t(t,e){return s.jsx(vt,{metric:t},`${t.label}-${e}`)}function St(t){const e=I.c(16),{title:l,columns:n,rows:a}=t;let i;e[0]!==l?(i=l&&s.jsx(ae,{icon:ve,title:l}),e[0]=l,e[1]=i):i=e[1];let r;e[2]!==n?(r=n.map(wt),e[2]=n,e[3]=r):r=e[3];let o;e[4]!==r?(o=s.jsx(ge,{children:s.jsx(ne,{children:r})}),e[4]=r,e[5]=o):o=e[5];let d;e[6]!==a?(d=a.map($t),e[6]=a,e[7]=d):d=e[7];let c;e[8]!==d?(c=s.jsx(je,{children:d}),e[8]=d,e[9]=c):c=e[9];let u;e[10]!==o||e[11]!==c?(u=s.jsx("div",{className:"rounded-lg border overflow-hidden",children:s.jsxs(be,{children:[o,c]})}),e[10]=o,e[11]=c,e[12]=u):u=e[12];let f;return e[13]!==i||e[14]!==u?(f=s.jsxs("div",{className:"space-y-4",children:[i,u]}),e[13]=i,e[14]=u,e[15]=f):f=e[15],f}function $t(t,e){return s.jsx(ne,{children:t.map(Ct)},e)}function Ct(t,e){return s.jsx(le,{className:"text-sm",children:t??s.jsx("span",{className:"text-muted-foreground",children:"—"})},e)}function wt(t){return s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:t},t)}function Oe(t){const e=I.c(11),{title:l,items:n}=t;let a;e[0]!==l?(a=l&&s.jsx(ae,{icon:ot,title:l}),e[0]=l,e[1]=a):a=e[1];let i;if(e[2]!==n){let d;e[4]!==n.length?(d=(c,u)=>s.jsxs("div",{className:"flex gap-4 items-stretch",children:[s.jsxs("div",{className:"flex flex-col items-center justify-center w-4 shrink-0",children:[s.jsx("div",{className:"h-full w-px bg-border"}),s.jsx("div",{className:"w-2 h-4 rounded-full flex",style:{backgroundColor:Te[u%Te.length]}}),s.jsx("div",{className:H("h-full w-px bg-border",u===n.length-1&&"invisible")})]}),s.jsxs("div",{className:"flex flex-col gap-2 items-start py-3 pb-4 min-w-0",children:[s.jsx("span",{className:"text-sm font-medium text-foreground leading-none",children:c.label}),c.description&&s.jsx("p",{className:"text-sm text-foreground opacity-80 leading-5",children:c.description})]})]},`${c.label}-${u}`),e[4]=n.length,e[5]=d):d=e[5],i=n.map(d),e[2]=n,e[3]=i}else i=e[3];let r;e[6]!==i?(r=s.jsx("div",{className:"flex flex-col",children:i}),e[6]=i,e[7]=r):r=e[7];let o;return e[8]!==a||e[9]!==r?(o=s.jsxs("div",{className:"space-y-4",children:[a,r]}),e[8]=a,e[9]=r,e[10]=o):o=e[10],o}function kt(t){const e=I.c(3),{content:l}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx(ae,{icon:rt,title:"Notas"}),e[0]=n):n=e[0];let a;return e[1]!==l?(a=s.jsxs("div",{className:"space-y-4",children:[n,s.jsx("p",{className:"text-sm text-foreground opacity-80 leading-5",children:l})]}),e[1]=l,e[2]=a):a=e[2],a}function zt(t){const e=I.c(11),{delta:l}=t;if(l===0){let c;return e[0]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("span",{className:"inline-flex items-center justify-center",children:s.jsx(ct,{size:16,className:"text-muted-foreground"})}),e[0]=c):c=e[0],c}const n=l>0,a=n?"text-emerald-600":"text-destructive";let i;e[1]!==a?(i=H("inline-flex items-center gap-0.5 text-sm font-medium",a),e[1]=a,e[2]=i):i=e[2];let r;e[3]!==n?(r=n?s.jsx(it,{size:16}):s.jsx(nt,{size:16}),e[3]=n,e[4]=r):r=e[4];let o;e[5]!==l?(o=Math.abs(l),e[5]=l,e[6]=o):o=e[6];let d;return e[7]!==i||e[8]!==r||e[9]!==o?(d=s.jsxs("span",{className:i,children:[r,o]}),e[7]=i,e[8]=r,e[9]=o,e[10]=d):d=e[10],d}function Tt(t){if(t.length===0)return[];const e=[...t];for(let l=e.length-1;l>0;l--){const n=Math.max(0,Math.min(e.length-1,l+(l%3===0?-2:l%2===0?1:-1)));[e[l],e[n]]=[e[n],e[l]]}return e.map((l,n)=>({...l,position:n+1,delta:0,reference_position:void 0}))}function he(t){const e=I.c(14),{rows:l,label:n}=t;let a;e[0]===Symbol.for("react.memo_cache_sentinel")?(a={},e[0]=a):a=e[0];const[i,r]=J.useState(a);let o;e[1]!==n?(o=n&&s.jsx("span",{className:"text-xs font-mono uppercase text-muted-foreground opacity-60 tracking-wide px-1",children:n}),e[1]=n,e[2]=o):o=e[2];let d;e[3]===Symbol.for("react.memo_cache_sentinel")?(d=s.jsx(ge,{className:"sticky top-0 bg-background z-10",children:s.jsxs(ne,{children:[s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground w-[60px]",children:"#"}),s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground w-[60px]",children:"DELTA"}),s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:"PRODUTO"}),s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:"SCORE"}),s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:"GRADE"}),s.jsx(se,{className:"w-10"})]})}),e[3]=d):d=e[3];let c;if(e[4]!==i||e[5]!==l){let p;e[7]!==i?(p=(x,h)=>{const g=i[h]??!1,b=x.note&&typeof x.note=="object"?x.note:null,N=typeof x.note=="string"?!!x.note:b!==null&&Object.keys(b).length>0,y=x.reference_position!==void 0?x.reference_position-x.position:x.delta??0;return s.jsxs(J.Fragment,{children:[s.jsxs(ne,{children:[s.jsx(le,{children:s.jsxs("div",{className:"flex items-center gap-1 opacity-50",children:[s.jsx(at,{size:16,className:"text-muted-foreground"}),s.jsx("span",{className:"text-sm font-medium text-muted-foreground tabular-nums",children:x.position})]})}),s.jsx(le,{children:s.jsx(zt,{delta:y})}),s.jsx(le,{children:s.jsxs("div",{className:"flex items-center gap-1",children:[x.image&&s.jsx("img",{src:x.image,alt:"",className:"h-12 w-8 object-cover rounded-sm shrink-0 bg-muted"}),s.jsx("span",{className:"text-sm font-medium text-foreground truncate",children:x.label})]})}),x.values.map(It),s.jsx(le,{children:N?s.jsx("button",{type:"button",onClick:()=>r(v=>({...v,[h]:!v[h]})),className:"flex items-center justify-center size-6 text-muted-foreground hover:text-foreground transition-colors",children:g?s.jsx(Pe,{size:16}):s.jsx(Se,{size:16})}):s.jsx(Se,{size:16,className:"text-muted-foreground opacity-30"})})]}),N&&g&&s.jsx(ne,{className:"bg-muted/25",children:s.jsx(le,{colSpan:6,children:typeof x.note=="string"?s.jsxs("div",{className:"pl-8 pb-2 flex flex-col gap-1.5",children:[s.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase opacity-50 tracking-wide",children:"MUDANÇA"}),s.jsx("p",{className:"text-sm text-foreground opacity-80 leading-5",children:x.note})]}):s.jsx("div",{className:"py-2 px-4",children:s.jsxs(be,{children:[s.jsx(ge,{children:s.jsx(ne,{children:Object.keys(b??{}).map(Pt)})}),s.jsx(je,{children:s.jsx(ne,{children:Object.values(b??{}).map(Rt)})})]})})})},`note-${h}`)]},h)},e[7]=i,e[8]=p):p=e[8],c=l.map(p),e[4]=i,e[5]=l,e[6]=c}else c=e[6];let u;e[9]!==c?(u=s.jsx("div",{className:"border border-border rounded-lg overflow-auto max-h-[520px]",children:s.jsxs(be,{children:[d,s.jsx(je,{children:c})]})}),e[9]=c,e[10]=u):u=e[10];let f;return e[11]!==o||e[12]!==u?(f=s.jsxs("div",{className:"flex flex-col gap-2 min-w-0 flex-1",children:[o,u]}),e[11]=o,e[12]=u,e[13]=f):f=e[13],f}function Rt(t,e){return s.jsx(le,{className:"text-sm tabular-nums",children:t??"—"},e)}function Pt(t){return s.jsx(se,{className:"font-mono text-xs uppercase text-muted-foreground",children:t},t)}function It(t,e){const n=e===1&&typeof t=="string"&&t.endsWith("%")?`${parseFloat(t)-10}%`:t;return s.jsx(le,{className:"text-sm tabular-nums",children:n},e)}function Et(t){const e=I.c(20),{title:l,rows:n}=t,[a,i]=J.useState(!1);let r;e[0]!==n?(r=Tt(n),e[0]=n,e[1]=r):r=e[1];const o=r;let d;e[2]!==l?(d=l&&s.jsx(ae,{icon:ve,title:l}),e[2]=l,e[3]=d):d=e[3];let c;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=()=>i(Mt),e[4]=c):c=e[4];const u=a?"bg-primary text-primary-foreground border-primary":"bg-transparent text-muted-foreground border-border hover:text-foreground hover:border-foreground/30";let f;e[5]!==u?(f=H("inline-flex items-center gap-1.5 text-xs font-medium px-2.5 py-1.5 rounded-md border transition-colors",u),e[5]=u,e[6]=f):f=e[6];let p;e[7]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(Ae,{size:14}),e[7]=p):p=e[7];let x;e[8]!==f?(x=s.jsxs("button",{type:"button",onClick:c,className:f,children:[p,"Comparar ordenação anterior"]}),e[8]=f,e[9]=x):x=e[9];let h;e[10]!==d||e[11]!==x?(h=s.jsxs("div",{className:"flex items-center justify-between gap-4",children:[d,x]}),e[10]=d,e[11]=x,e[12]=h):h=e[12];let g;e[13]!==o||e[14]!==n||e[15]!==a?(g=a?s.jsxs("div",{className:"flex gap-4 items-start",children:[s.jsx(he,{rows:n,label:"Ordenação Proposta"}),s.jsx(he,{rows:o,label:"Ordenação Atual"})]}):s.jsx(he,{rows:n}),e[13]=o,e[14]=n,e[15]=a,e[16]=g):g=e[16];let b;return e[17]!==h||e[18]!==g?(b=s.jsxs("div",{className:"space-y-4",children:[h,g]}),e[17]=h,e[18]=g,e[19]=b):b=e[19],b}function Mt(t){return!t}function At(t){const e=I.c(17),{section:l}=t;switch(l.type){case"markdown":{let n;return e[0]!==l.content?(n=s.jsx(Nt,{content:l.content}),e[0]=l.content,e[1]=n):n=e[1],n}case"metrics":{let n;return e[2]!==l.items||e[3]!==l.title?(n=s.jsx(Le,{title:l.title,items:l.items}),e[2]=l.items,e[3]=l.title,e[4]=n):n=e[4],n}case"table":{let n;return e[5]!==l.columns||e[6]!==l.rows||e[7]!==l.title?(n=s.jsx(St,{title:l.title,columns:l.columns,rows:l.rows}),e[5]=l.columns,e[6]=l.rows,e[7]=l.title,e[8]=n):n=e[8],n}case"criteria":{let n;return e[9]!==l.items||e[10]!==l.title?(n=s.jsx(Oe,{title:l.title,items:l.items}),e[9]=l.items,e[10]=l.title,e[11]=n):n=e[11],n}case"note":{let n;return e[12]!==l.content?(n=s.jsx(kt,{content:l.content}),e[12]=l.content,e[13]=n):n=e[13],n}case"ranked-list":{let n;return e[14]!==l.rows||e[15]!==l.title?(n=s.jsx(Et,{title:l.title,rows:l.rows}),e[14]=l.rows,e[15]=l.title,e[16]=n):n=e[16],n}default:return null}}function Dt(t){return new Date(t).toLocaleString(void 0,{dateStyle:"medium",timeStyle:"short"})}function Lt(t){const e=[];e.push(`# ${t.title}`),e.push(""),e.push(`> ${t.summary}`),e.push("");const l=[`**Status:** ${t.status}`,`**Category:** ${t.category}`];t.source&&l.push(`**Source:** ${t.source}`),l.push(`**Updated:** ${t.updatedAt}`),t.tags?.length&&l.push(`**Tags:** ${t.tags.join(", ")}`),e.push(l.join(`
2
2
  `)),e.push("");for(const n of t.sections)switch(n.type){case"markdown":e.push(n.content),e.push("");break;case"metrics":{n.title&&(e.push(`## ${n.title}`),e.push(""));const a=["Metric","Value","Previous","Status"],i=n.items.some(r=>r.unit);e.push(`| ${a.join(" | ")} |`),e.push(`| ${a.map(()=>"---").join(" | ")} |`);for(const r of n.items){const o=r.unit==="%"&&typeof r.value=="number"?r.value-10:r.value,d=r.unit==="%"&&typeof r.previousValue=="number"?r.previousValue-10:r.previousValue,c=i&&r.unit?`${o} ${r.unit}`:`${o}`,u=d!=null?i&&r.unit?`${d} ${r.unit}`:`${d}`:"—",f=r.status??"—";e.push(`| ${r.label} | ${c} | ${u} | ${f} |`)}e.push("");break}case"table":{n.title&&(e.push(`## ${n.title}`),e.push("")),e.push(`| ${n.columns.join(" | ")} |`),e.push(`| ${n.columns.map(()=>"---").join(" | ")} |`);for(const a of n.rows)e.push(`| ${a.map(i=>i==null?"—":`${i}`).join(" | ")} |`);e.push("");break}case"criteria":{n.title&&(e.push(`## ${n.title}`),e.push(""));for(const a of n.items){const i=a.description?`: ${a.description}`:"";e.push(`- **${a.label}**${i}`)}e.push("");break}case"note":{e.push(`> ${n.content}`),e.push("");break}case"ranked-list":{n.title&&(e.push(`## ${n.title}`),e.push(""));const a=["#","Item"];e.push(`| ${a.join(" | ")} |`),e.push(`| ${a.map(()=>"---").join(" | ")} |`);for(const i of n.rows){const r=i.reference_position!==void 0?i.reference_position-i.position:i.delta??0,o=r!==0?` (${r>0?"+":""}${r})`:"",d=`${i.position}${o}`,c=i.values.map(u=>`${u}`).join(" | ");e.push(`| ${d} | ${i.label} | ${c} |`)}e.push("");break}}return e.join(`
3
3
  `).trim()}function Ot(t){const e=I.c(86),{reportId:l,onBack:n}=t,{connectionId:a,toolCaller:i}=xe(),r=Re(),{data:o,isLoading:d,error:c}=bt(l),u=o?.lifecycleStatus==="dismissed";let f;e[0]!==u||e[1]!==l||e[2]!==i?(f=async()=>i("REPORTS_UPDATE_STATUS",{reportId:l,lifecycleStatus:u?"read":"dismissed"}),e[0]=u,e[1]=l,e[2]=i,e[3]=f):f=e[3];let p;e[4]!==a||e[5]!==u||e[6]!==n||e[7]!==r?(p=()=>{fe.success(u?"Report restored to inbox":"Report marked as done"),r.invalidateQueries({queryKey:re.reportsList(a)}),n()},e[4]=a,e[5]=u,e[6]=n,e[7]=r,e[8]=p):p=e[8];let x;e[9]!==f||e[10]!==p?(x={mutationFn:f,onSuccess:p,onError:Ut},e[9]=f,e[10]=p,e[11]=x):x=e[11];const h=Me(x);if(d){let L;return e[12]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(ce,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading report..."})]}),e[12]=L):L=e[12],L}if(c||!o){let L;e[13]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(Ne,{size:48,className:"text-destructive mb-4"}),e[13]=L):L=e[13];const Q=c?"Error loading report":"Report not found";let U;e[14]!==Q?(U=s.jsx("h3",{className:"text-lg font-medium mb-2",children:Q}),e[14]=Q,e[15]=U):U=e[15];const W=c?.message??"The requested report could not be found.";let X;e[16]!==W?(X=s.jsx("p",{className:"text-muted-foreground text-center mb-4",children:W}),e[16]=W,e[17]=X):X=e[17];let ee;e[18]===Symbol.for("react.memo_cache_sentinel")?(ee=s.jsx(_e,{size:14,className:"mr-1"}),e[18]=ee):ee=e[18];let q;e[19]!==n?(q=s.jsxs(pe,{variant:"outline",onClick:n,children:[ee,"Back to reports"]}),e[19]=n,e[20]=q):q=e[20];let Y;return e[21]!==q||e[22]!==U||e[23]!==X?(Y=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[L,U,X,q]}),e[21]=q,e[22]=U,e[23]=X,e[24]=Y):Y=e[24],Y}let g;e[25]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(_e,{size:14}),e[25]=g):g=e[25];let b;e[26]!==n?(b=s.jsxs("button",{type:"button",onClick:n,className:"inline-flex items-center gap-1 text-sm text-muted-foreground hover:text-foreground transition-colors",children:[g,"Reports"]}),e[26]=n,e[27]=b):b=e[27];let N;e[28]!==o?(N=()=>{const L=Lt(o);navigator.clipboard.writeText(L).then(Bt)},e[28]=o,e[29]=N):N=e[29];let y;e[30]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(Xe,{size:14}),e[30]=y):y=e[30];let v;e[31]!==N?(v=s.jsxs(pe,{variant:"outline",size:"sm",className:"gap-1.5",onClick:N,children:[y,"Copy as Markdown"]}),e[31]=N,e[32]=v):v=e[32];let m;e[33]!==h?(m=()=>h.mutate(),e[33]=h,e[34]=m):m=e[34];let S;e[35]!==u||e[36]!==h.isPending?(S=h.isPending?s.jsx(ce,{size:14,className:"animate-spin"}):u?s.jsx(Ee,{size:14}):s.jsx(de,{size:14}),e[35]=u,e[36]=h.isPending,e[37]=S):S=e[37];const _=u?"Move to inbox":"Mark as done";let $;e[38]!==h.isPending||e[39]!==S||e[40]!==_||e[41]!==m?($=s.jsxs(pe,{variant:"outline",size:"sm",className:"gap-1.5",onClick:m,disabled:h.isPending,children:[S,_]}),e[38]=h.isPending,e[39]=S,e[40]=_,e[41]=m,e[42]=$):$=e[42];let C;e[43]!==$||e[44]!==v?(C=s.jsxs("div",{className:"flex items-center gap-2",children:[v,$]}),e[43]=$,e[44]=v,e[45]=C):C=e[45];let z;e[46]!==C||e[47]!==b?(z=s.jsxs("div",{className:"flex items-center justify-between",children:[b,C]}),e[46]=C,e[47]=b,e[48]=z):z=e[48];let w;e[49]!==o.title?(w=s.jsx("h1",{className:"text-xl font-semibold leading-tight",children:o.title}),e[49]=o.title,e[50]=w):w=e[50];let T;e[51]!==o.summary?(T=s.jsx("p",{className:"text-sm text-muted-foreground",children:o.summary}),e[51]=o.summary,e[52]=T):T=e[52];let E;e[53]!==w||e[54]!==T?(E=s.jsxs("div",{className:"space-y-1 min-w-0",children:[w,T]}),e[53]=w,e[54]=T,e[55]=E):E=e[55];let M;e[56]!==o.status?(M=s.jsx(De,{status:o.status}),e[56]=o.status,e[57]=M):M=e[57];let R;e[58]!==E||e[59]!==M?(R=s.jsxs("div",{className:"flex items-start justify-between gap-4",children:[E,M]}),e[58]=E,e[59]=M,e[60]=R):R=e[60];let k;e[61]!==o.category?(k=s.jsx("span",{className:"capitalize",children:o.category}),e[61]=o.category,e[62]=k):k=e[62];let P;e[63]!==o.source?(P=o.source&&s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"text-border",children:"|"}),s.jsx("span",{children:o.source})]}),e[63]=o.source,e[64]=P):P=e[64];let A;e[65]===Symbol.for("react.memo_cache_sentinel")?(A=s.jsx("span",{className:"text-border",children:"|"}),e[65]=A):A=e[65];let O;e[66]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(Ie,{size:12}),e[66]=O):O=e[66];let D;e[67]!==o.updatedAt?(D=Dt(o.updatedAt),e[67]=o.updatedAt,e[68]=D):D=e[68];let j;e[69]!==D?(j=s.jsxs("span",{className:"inline-flex items-center gap-1",children:[O,D]}),e[69]=D,e[70]=j):j=e[70];let F;e[71]!==k||e[72]!==P||e[73]!==j?(F=s.jsxs("div",{className:"flex items-center gap-4 text-xs text-muted-foreground",children:[k,P,A,j]}),e[71]=k,e[72]=P,e[73]=j,e[74]=F):F=e[74];let K;e[75]!==z||e[76]!==R||e[77]!==F?(K=s.jsxs("div",{className:"border-b border-border px-6 py-4 space-y-3",children:[z,R,F]}),e[75]=z,e[76]=R,e[77]=F,e[78]=K):K=e[78];let B;e[79]!==o.sections?(B=Fe(o.sections??[]).map(Ft),e[79]=o.sections,e[80]=B):B=e[80];let G;e[81]!==B?(G=s.jsx("div",{className:"flex-1 px-6 py-6 space-y-8",children:B}),e[81]=B,e[82]=G):G=e[82];let Z;return e[83]!==K||e[84]!==G?(Z=s.jsxs("div",{className:"flex flex-col h-full overflow-y-auto pb-6",children:[K,G]}),e[83]=K,e[84]=G,e[85]=Z):Z=e[85],Z}function Ft(t){return t.type==="side-by-side"?s.jsxs("div",{className:"flex gap-6 items-start w-full",children:[s.jsx("div",{className:"w-full",children:s.jsx(Oe,{title:t.left.title,items:t.left.items})}),s.jsx("div",{className:"w-full",children:s.jsx(Le,{title:t.right.title,items:t.right.items,stacked:!0})})]},`${t.leftIdx}-${t.rightIdx}`):s.jsx(At,{section:t.section},t.idx)}function Bt(){fe.success("Copied report as Markdown")}function Ut(t){fe.error(`Failed to update report: ${t.message}`)}function qt(t){const e=Date.now()-new Date(t).getTime(),l=Math.floor(e/6e4);if(l<1)return"just now";if(l<60)return`${l}m ago`;const n=Math.floor(l/60);if(n<24)return`${n}h ago`;const a=Math.floor(n/24);return a<30?`${a}d ago`:new Date(t).toLocaleDateString()}function Gt(t){const e=I.c(57),{report:l,isDoneTab:n,onSelect:a,onDismiss:i}=t,r=!l.lifecycleStatus||l.lifecycleStatus==="unread",o=n?"opacity-60":"hover:shadow-md";let d;e[0]!==o?(d=H("group relative cursor-pointer transition-shadow",o),e[0]=o,e[1]=d):d=e[1];let c;e[2]!==a||e[3]!==l.id?(c=()=>a(l.id),e[2]=a,e[3]=l.id,e[4]=c):c=e[4];let u;e[5]!==r?(u=r&&s.jsx("div",{className:"absolute left-0 top-0 bottom-0 w-1 rounded-l-xl bg-primary"}),e[5]=r,e[6]=u):u=e[6];const f=r&&"font-bold";let p;e[7]!==f?(p=H("text-sm leading-snug line-clamp-2",f),e[7]=f,e[8]=p):p=e[8];let x;e[9]!==l.title||e[10]!==p?(x=s.jsx(mt,{className:p,children:l.title}),e[9]=l.title,e[10]=p,e[11]=x):x=e[11];let h;e[12]!==l.status?(h=s.jsx(De,{status:l.status,size:"sm"}),e[12]=l.status,e[13]=h):h=e[13];const g=n?"Restore to inbox":"Mark as done",b=n?"text-muted-foreground hover:text-foreground hover:bg-accent":"text-muted-foreground/0 group-hover:text-muted-foreground hover:!text-emerald-600 hover:bg-emerald-500/10";let N;e[14]!==b?(N=H("rounded-md p-1 transition-colors",b),e[14]=b,e[15]=N):N=e[15];let y;e[16]!==n||e[17]!==i||e[18]!==l.id?(y=A=>{A.stopPropagation(),i(l.id,!n)},e[16]=n,e[17]=i,e[18]=l.id,e[19]=y):y=e[19];let v;e[20]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(de,{size:14}),e[20]=v):v=e[20];let m;e[21]!==N||e[22]!==y||e[23]!==g?(m=s.jsx("button",{type:"button",title:g,className:N,onClick:y,children:v}),e[21]=N,e[22]=y,e[23]=g,e[24]=m):m=e[24];let S;e[25]!==m||e[26]!==h?(S=s.jsxs("div",{className:"flex items-center gap-1.5 shrink-0",children:[h,m]}),e[25]=m,e[26]=h,e[27]=S):S=e[27];let _;e[28]!==S||e[29]!==x?(_=s.jsxs("div",{className:"flex items-start justify-between gap-3",children:[x,S]}),e[28]=S,e[29]=x,e[30]=_):_=e[30];let $;e[31]!==l.summary?($=s.jsx(ut,{className:"mt-1 line-clamp-2 text-xs",children:l.summary}),e[31]=l.summary,e[32]=$):$=e[32];let C;e[33]!==_||e[34]!==$?(C=s.jsxs(ft,{className:"pb-2 pt-5 px-5",children:[_,$]}),e[33]=_,e[34]=$,e[35]=C):C=e[35];let z;e[36]!==l.category?(z=s.jsx("span",{className:"inline-flex items-center gap-1 capitalize",children:l.category}),e[36]=l.category,e[37]=z):z=e[37];let w;e[38]!==l.source?(w=l.source&&s.jsx("span",{className:"inline-flex items-center gap-1 text-muted-foreground/70",children:l.source}),e[38]=l.source,e[39]=w):w=e[39];let T;e[40]!==z||e[41]!==w?(T=s.jsxs("div",{className:"flex items-center gap-3",children:[z,w]}),e[40]=z,e[41]=w,e[42]=T):T=e[42];let E;e[43]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(Ie,{size:12}),e[43]=E):E=e[43];let M;e[44]!==l.updatedAt?(M=qt(l.updatedAt),e[44]=l.updatedAt,e[45]=M):M=e[45];let R;e[46]!==M?(R=s.jsx("div",{className:"flex items-center gap-3",children:s.jsxs("span",{className:"inline-flex items-center gap-1",children:[E,M]})}),e[46]=M,e[47]=R):R=e[47];let k;e[48]!==T||e[49]!==R?(k=s.jsx(xt,{className:"px-5 pb-5",children:s.jsxs("div",{className:"flex items-center justify-between text-xs text-muted-foreground",children:[T,R]})}),e[48]=T,e[49]=R,e[50]=k):k=e[50];let P;return e[51]!==C||e[52]!==d||e[53]!==k||e[54]!==c||e[55]!==u?(P=s.jsxs(pt,{className:d,onClick:c,children:[u,C,k]}),e[51]=C,e[52]=d,e[53]=k,e[54]=c,e[55]=u,e[56]=P):P=e[56],P}function Vt(t){const e=I.c(24),{category:l,status:n,categories:a,onCategoryChange:i,onStatusChange:r}=t,o=l??"__all__";let d;e[0]!==i?(d=_=>i(_==="__all__"?void 0:_),e[0]=i,e[1]=d):d=e[1];let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx(Ce,{size:"sm",children:s.jsx(we,{placeholder:"All categories"})}),e[2]=c):c=e[2];let u;e[3]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(me,{value:"__all__",children:"All categories"}),e[3]=u):u=e[3];let f;e[4]!==a?(f=a.map(Kt),e[4]=a,e[5]=f):f=e[5];let p;e[6]!==f?(p=s.jsxs($e,{children:[u,f]}),e[6]=f,e[7]=p):p=e[7];let x;e[8]!==o||e[9]!==d||e[10]!==p?(x=s.jsxs(ke,{value:o,onValueChange:d,children:[c,p]}),e[8]=o,e[9]=d,e[10]=p,e[11]=x):x=e[11];const h=n??"__all__";let g;e[12]!==r?(g=_=>r(_==="__all__"?void 0:_),e[12]=r,e[13]=g):g=e[13];let b;e[14]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(Ce,{size:"sm",children:s.jsx(we,{placeholder:"All statuses"})}),e[14]=b):b=e[14];let N,y;e[15]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx(me,{value:"__all__",children:"All statuses"}),y=Object.keys(ue),e[15]=N,e[16]=y):(N=e[15],y=e[16]);let v;e[17]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsxs($e,{children:[N,y.map(Ht)]}),e[17]=v):v=e[17];let m;e[18]!==h||e[19]!==g?(m=s.jsxs(ke,{value:h,onValueChange:g,children:[b,v]}),e[18]=h,e[19]=g,e[20]=m):m=e[20];let S;return e[21]!==m||e[22]!==x?(S=s.jsxs("div",{className:"flex items-center gap-2",children:[x,m]}),e[21]=m,e[22]=x,e[23]=S):S=e[23],S}function Ht(t){return s.jsx(me,{value:t,children:ue[t].label},t)}function Kt(t){return s.jsx(me,{value:t,children:s.jsx("span",{className:"capitalize",children:t})},t)}function Qt(t){const e=I.c(51),{onSelectReport:l}=t,[n,a]=J.useState("inbox"),[i,r]=J.useState(),[o,d]=J.useState(),{connectionId:c,toolCaller:u}=xe(),f=Re();let p;e[0]!==i||e[1]!==o?(p={category:i,status:o},e[0]=i,e[1]=o,e[2]=p):p=e[2];const{data:x,isLoading:h,error:g}=ze(p),b=x?.reports??[],N=b.filter(Xt),y=b.filter(Zt),v=n==="inbox"?N:y,m=N.filter(Yt).length,{data:S}=ze();let _;e[3]!==S?.reports?(_=[...new Set((S?.reports??[]).map(Jt))].sort(),e[3]=S?.reports,e[4]=_):_=e[4];const $=_;let C;e[5]!==u?(C=async V=>{const{reportId:te,lifecycleStatus:ie}=V;return u("REPORTS_UPDATE_STATUS",{reportId:te,lifecycleStatus:ie})},e[5]=u,e[6]=C):C=e[6];let z;e[7]!==c||e[8]!==f?(z=()=>{f.invalidateQueries({queryKey:re.reportsList(c)})},e[7]=c,e[8]=f,e[9]=z):z=e[9];let w;e[10]!==C||e[11]!==z?(w={mutationFn:C,onSuccess:z,onError:Wt},e[10]=C,e[11]=z,e[12]=w):w=e[12];const T=Me(w);let E;e[13]!==T?(E=(V,te)=>{T.mutate({reportId:V,lifecycleStatus:te?"dismissed":"read"})},e[13]=T,e[14]=E):E=e[14];const M=E;if(g){let V,te;e[15]===Symbol.for("react.memo_cache_sentinel")?(V=s.jsx(Ne,{size:48,className:"text-destructive mb-4"}),te=s.jsx("h3",{className:"text-lg font-medium mb-2",children:"Error loading reports"}),e[15]=V,e[16]=te):(V=e[15],te=e[16]);let ie;return e[17]!==g.message?(ie=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[V,te,s.jsx("p",{className:"text-muted-foreground text-center",children:g.message})]}),e[17]=g.message,e[18]=ie):ie=e[18],ie}const R="flex flex-col h-full";let k;e[19]===Symbol.for("react.memo_cache_sentinel")?(k=()=>a("inbox"),e[19]=k):k=e[19];const P=n==="inbox"?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground hover:bg-accent/50";let A;e[20]!==P?(A=H("inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-colors",P),e[20]=P,e[21]=A):A=e[21];let O;e[22]===Symbol.for("react.memo_cache_sentinel")?(O=s.jsx(Ee,{size:14}),e[22]=O):O=e[22];let D;e[23]!==h||e[24]!==m?(D=!h&&m>0&&s.jsx(dt,{variant:"default",className:"text-[10px] px-1.5 py-0 h-4",children:m}),e[23]=h,e[24]=m,e[25]=D):D=e[25];let j;e[26]!==A||e[27]!==D?(j=s.jsxs("button",{type:"button",onClick:k,className:A,children:[O,"Inbox",D]}),e[26]=A,e[27]=D,e[28]=j):j=e[28];let F;e[29]===Symbol.for("react.memo_cache_sentinel")?(F=()=>a("done"),e[29]=F):F=e[29];const K=n==="done"?"bg-accent text-foreground":"text-muted-foreground hover:text-foreground hover:bg-accent/50";let B;e[30]!==K?(B=H("inline-flex items-center gap-1.5 px-3 py-1.5 rounded-md text-sm font-medium transition-colors",K),e[30]=K,e[31]=B):B=e[31];let G;e[32]===Symbol.for("react.memo_cache_sentinel")?(G=s.jsx(de,{size:14}),e[32]=G):G=e[32];const Z=!h&&y.length>0&&s.jsx("span",{className:"text-xs text-muted-foreground",children:y.length});let L;e[33]!==B||e[34]!==Z?(L=s.jsxs("button",{type:"button",onClick:F,className:B,children:[G,"Done",Z]}),e[33]=B,e[34]=Z,e[35]=L):L=e[35];let Q;e[36]!==j||e[37]!==L?(Q=s.jsxs("div",{className:"flex items-center gap-1",children:[j,L]}),e[36]=j,e[37]=L,e[38]=Q):Q=e[38];let U;e[39]!==$||e[40]!==i||e[41]!==o?(U=s.jsx(Vt,{category:i,status:o,categories:$,onCategoryChange:r,onStatusChange:d}),e[39]=$,e[40]=i,e[41]=o,e[42]=U):U=e[42];let W;e[43]!==Q||e[44]!==U?(W=s.jsxs("div",{className:"flex items-center justify-between px-6 py-3 border-b border-border",children:[Q,U]}),e[43]=Q,e[44]=U,e[45]=W):W=e[45];const X="flex-1 overflow-y-auto p-6",ee=h?s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(ce,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading reports..."})]}):v.length===0?s.jsx("div",{className:"flex flex-col items-center justify-center h-full text-center",children:n==="done"?s.jsxs(s.Fragment,{children:[s.jsx(de,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No dismissed reports"}),s.jsx("p",{className:"text-muted-foreground max-w-sm",children:"Reports you mark as done will appear here."})]}):s.jsxs(s.Fragment,{children:[s.jsx(oe,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:i||o?"No reports match filters":"Inbox is empty"}),s.jsx("p",{className:"text-muted-foreground max-w-sm",children:i||o?"Try adjusting your filters.":"Reports will appear here once the connected MCP server provides them."})]})}):s.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 xl:grid-cols-3 gap-4",children:v.map(V=>s.jsx(Gt,{report:V,isDoneTab:n==="done",onSelect:l,onDismiss:M},V.id))});let q;e[46]!==ee?(q=s.jsx("div",{className:X,children:ee}),e[46]=ee,e[47]=q):q=e[47];let Y;return e[48]!==W||e[49]!==q?(Y=s.jsxs("div",{className:R,children:[W,q]}),e[48]=W,e[49]=q,e[50]=Y):Y=e[50],Y}function Wt(t){fe.error(`Failed to update report: ${t.message}`)}function Jt(t){return t.category}function Yt(t){return!t.lifecycleStatus||t.lifecycleStatus==="unread"}function Zt(t){return t.lifecycleStatus==="dismissed"}function Xt(t){return t.lifecycleStatus!=="dismissed"}function es(t){return t?t.filter(e=>Ve(e,Ge)):[]}function As(){const t=I.c(58),{org:e,project:l}=Be();let n;t[0]===Symbol.for("react.memo_cache_sentinel")?(n={strict:!1},t[0]=n):n=t[0];const a=Ue(n),i=qe(),r=He(),o=a.reportId??null;let d;t[1]!==i?(d=j=>{i({search:j?{reportId:j}:{},replace:!0})},t[1]=i,t[2]=d):d=t[2];const c=d;let u;t[3]!==e.id?(u={connectionId:Ke,orgId:e.id},t[3]=e.id,t[4]=u):u=t[4];const f=Qe(u);let p;t[5]!==l.id?(p=re.pluginConfig(l.id??"","reports"),t[5]=l.id,t[6]=p):p=t[6];let x;t[7]!==l.id||t[8]!==f?(x=async()=>{const j=await f.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:l.id,pluginId:"reports"}});return j.structuredContent??j},t[7]=l.id,t[8]=f,t[9]=x):x=t[9];const h=!!l.id;let g;t[10]!==p||t[11]!==x||t[12]!==h?(g={queryKey:p,queryFn:x,enabled:h},t[10]=p,t[11]=x,t[12]=h,t[13]=g):g=t[13];const{data:b,isLoading:N}=ye(g);let y,v;if(t[14]!==r||t[15]!==b?.config?.connectionId){v=es(r);const j=b?.config?.connectionId;y=j?v.find(F=>F.id===j):null,t[14]=r,t[15]=b?.config?.connectionId,t[16]=y,t[17]=v}else y=t[16],v=t[17];const m=y,S=m?.id;let _;t[18]!==e.id||t[19]!==S?(_={connectionId:S,orgId:e.id},t[18]=e.id,t[19]=S,t[20]=_):_=t[20];const $=We(_);let C;t[21]!==e.id||t[22]!==e.name||t[23]!==e.slug?(C={id:e.id,slug:e.slug,name:e.name},t[21]=e.id,t[22]=e.name,t[23]=e.slug,t[24]=C):C=t[24];const z=C;if(N){let j;return t[25]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(ce,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading..."})]}),t[25]=j):j=t[25],j}if(v.length===0){let j;return t[26]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(ht,{}),t[26]=j):j=t[26],j}if(!m){let j;return t[27]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx("div",{className:"h-full flex flex-col items-center justify-center gap-4 p-8",children:s.jsxs("div",{className:"flex flex-col items-center gap-2 text-center max-w-md",children:[s.jsx(Ye,{size:48,className:"text-muted-foreground mb-2"}),s.jsx("h2",{className:"text-lg font-semibold",children:"Plugin Not Configured"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"This plugin requires a connection to be configured. Go to project settings to select which integration to use."})]})}),t[27]=j):j=t[27],j}let w;t[28]!==m.app_id||t[29]!==m.app_name||t[30]!==m.description||t[31]!==m.icon||t[32]!==m.id||t[33]!==m.metadata||t[34]!==m.title||t[35]!==m.tools?(w={id:m.id,title:m.title,icon:m.icon,description:m.description,app_name:m.app_name,app_id:m.app_id,tools:m.tools,metadata:m.metadata},t[28]=m.app_id,t[29]=m.app_name,t[30]=m.description,t[31]=m.icon,t[32]=m.id,t[33]=m.metadata,t[34]=m.title,t[35]=m.tools,t[36]=w):w=t[36];let T;t[37]!==$?(T=(j,F)=>$?$.callTool({name:j,arguments:F}).then(ss):Promise.reject(new Error("MCP client is not available")),t[37]=$,t[38]=T):T=t[38];const E=T;let M;t[39]!==m.id||t[40]!==z||t[41]!==w||t[42]!==E?(M={connectionId:m.id,connection:w,toolCaller:E,org:z,session:null},t[39]=m.id,t[40]=z,t[41]=w,t[42]=E,t[43]=M):M=t[43];const R=M;let k;t[44]!==R.connection?(k=[R.connection],t[44]=R.connection,t[45]=k):k=t[45];let P;t[46]!==m.id||t[47]!==k?(P=s.jsx("div",{className:"flex items-center px-6 py-3 border-b border-border",children:s.jsx(jt,{connections:k,selectedConnectionId:m.id,onConnectionChange:ts})}),t[46]=m.id,t[47]=k,t[48]=P):P=t[48];let A;t[49]!==o||t[50]!==c?(A=s.jsx("div",{className:"flex-1 overflow-hidden",children:o?s.jsx(Ot,{reportId:o,onBack:()=>c(null)}):s.jsx(Qt,{onSelectReport:c})}),t[49]=o,t[50]=c,t[51]=A):A=t[51];let O;t[52]!==P||t[53]!==A?(O=s.jsxs("div",{className:"flex flex-col h-full overflow-hidden",children:[P,A]}),t[52]=P,t[53]=A,t[54]=O):O=t[54];let D;return t[55]!==R||t[56]!==O?(D=s.jsx(Je,{value:R,children:O}),t[55]=R,t[56]=O,t[57]=D):D=t[57],D}function ts(){}function ss(t){return t.structuredContent??t}export{As as default};
@@ -1 +1 @@
1
- import{c as q,a as Y,b as A,r as B,j as s,B as z,d as G}from"./index-CzFqQvXW.js";import{u as K}from"./useMutation-DsQcwaJP.js";import{I as L}from"./input-Rcf9et7W.js";function J(){const e=q.c(45);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/reset-password"},e[0]=n):n=e[0];const{token:r,error:h}=Y(n),a=A(),[o,D]=B.useState(""),[l,M]=B.useState(""),[t,T]=B.useState(!1),i=h==="INVALID_TOKEN";let j;e[1]===Symbol.for("react.memo_cache_sentinel")?(j={mutationFn:O,onSuccess:()=>{T(!0)}},e[1]=j):j=e[1];const w=K(j),v=o===l,c=o.length>=8&&l.length>=8&&v,d=w.isPending,N=w.error;let y;e[2]!==c||e[3]!==o||e[4]!==w||e[5]!==r?(y=b=>{b.preventDefault(),!(!r||!c)&&w.mutate({newPassword:o,token:r})},e[2]=c,e[3]=o,e[4]=w,e[5]=r,e[6]=y):y=e[6];const F=y;let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle, var(--primary-foreground) 1px, transparent 1px)",backgroundSize:"16px 16px",opacity:.15}}),e[7]=k):k=e[7];let S,_,P,C;e[8]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),_=s.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),P=s.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),C=s.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),e[8]=S,e[9]=_,e[10]=P,e[11]=C):(S=e[8],_=e[9],P=e[10],C=e[11]);let E;e[12]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("div",{className:"flex justify-center",children:s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12"})}),e[12]=E):E=e[12];const I=t?"Password reset successful":"Set a new password";let m;e[13]!==I?(m=s.jsx("div",{className:"text-center space-y-1",children:s.jsx("p",{className:"text-sm text-foreground/70",children:I})}),e[13]=I,e[14]=m):m=e[14];let u;e[15]!==i||e[16]!==a||e[17]!==t||e[18]!==r?(u=(i||!r&&!t)&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:"This reset link is invalid or has expired."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Back to login"})]}),e[15]=i,e[16]=a,e[17]=t,e[18]=r,e[19]=u):u=e[19];let x;e[20]!==N?(x=N&&s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:N.message||"Failed to reset password. Please try again."}),e[20]=N,e[21]=x):x=e[21];let f;e[22]!==a||e[23]!==t?(f=t&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400 text-center",children:"Your password has been reset. You can now sign in with your new password."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Go to login"})]}),e[22]=a,e[23]=t,e[24]=f):f=e[24];let g;e[25]!==c||e[26]!==l||e[27]!==F||e[28]!==i||e[29]!==d||e[30]!==o||e[31]!==v||e[32]!==t||e[33]!==r?(g=r&&!i&&!t&&s.jsxs("form",{onSubmit:F,className:"grid gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"New password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:o,onChange:b=>D(b.target.value),required:!0,minLength:8,disabled:d})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Confirm password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:l,onChange:b=>M(b.target.value),required:!0,minLength:8,disabled:d}),l&&!v&&s.jsx("p",{className:"text-xs text-destructive mt-1.5",children:"Passwords do not match"})]}),s.jsx(z,{type:"submit",disabled:d||!c,className:"w-full font-semibold",size:"lg",children:d?"Resetting...":"Reset password"})]}),e[25]=c,e[26]=l,e[27]=F,e[28]=i,e[29]=d,e[30]=o,e[31]=v,e[32]=t,e[33]=r,e[34]=g):g=e[34];let p;e[35]!==a||e[36]!==t?(p=!t&&s.jsx("div",{className:"text-center",children:s.jsx(z,{type:"button",variant:"link",onClick:()=>a({to:"/login"}),className:"text-sm text-muted-foreground hover:text-foreground",children:"Back to sign in"})}),e[35]=a,e[36]=t,e[37]=p):p=e[37];let R;return e[38]!==m||e[39]!==u||e[40]!==x||e[41]!==f||e[42]!==g||e[43]!==p?(R=s.jsxs("main",{className:"relative flex min-h-screen items-center justify-center bg-gradient-to-br from-primary to-primary/75 p-4",children:[k,s.jsxs("div",{className:"relative z-10",children:[S,_,P,C,s.jsxs("div",{className:"mx-auto w-full min-w-[400px] max-w-md grid gap-6 bg-card p-10 border border-primary-foreground/20",children:[E,m,u,x,f,g,p]})]})]}),e[38]=m,e[39]=u,e[40]=x,e[41]=f,e[42]=g,e[43]=p,e[44]=R):R=e[44],R}async function O(e){const{newPassword:n,token:r}=e,h=await G.resetPassword({newPassword:n,token:r});if(h.error)throw new Error(h.error.message||"Failed to reset password");return h}export{J as default};
1
+ import{c as q,a as Y,b as A,r as B,j as s,B as z,d as G}from"./index-DVHuYwO5.js";import{u as K}from"./useMutation-BskhtN65.js";import{I as L}from"./input-CImrwNsE.js";function J(){const e=q.c(45);let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"/reset-password"},e[0]=n):n=e[0];const{token:r,error:h}=Y(n),a=A(),[o,D]=B.useState(""),[l,M]=B.useState(""),[t,T]=B.useState(!1),i=h==="INVALID_TOKEN";let j;e[1]===Symbol.for("react.memo_cache_sentinel")?(j={mutationFn:O,onSuccess:()=>{T(!0)}},e[1]=j):j=e[1];const w=K(j),v=o===l,c=o.length>=8&&l.length>=8&&v,d=w.isPending,N=w.error;let y;e[2]!==c||e[3]!==o||e[4]!==w||e[5]!==r?(y=b=>{b.preventDefault(),!(!r||!c)&&w.mutate({newPassword:o,token:r})},e[2]=c,e[3]=o,e[4]=w,e[5]=r,e[6]=y):y=e[6];const F=y;let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=s.jsx("div",{className:"absolute inset-0",style:{backgroundImage:"radial-gradient(circle, var(--primary-foreground) 1px, transparent 1px)",backgroundSize:"16px 16px",opacity:.15}}),e[7]=k):k=e[7];let S,_,P,C;e[8]===Symbol.for("react.memo_cache_sentinel")?(S=s.jsx("div",{className:"absolute top-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),_=s.jsx("div",{className:"absolute bottom-0 left-1/2 -translate-x-1/2 w-screen h-px bg-primary-foreground/15"}),P=s.jsx("div",{className:"absolute left-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),C=s.jsx("div",{className:"absolute right-0 top-1/2 -translate-y-1/2 w-px h-screen bg-primary-foreground/15"}),e[8]=S,e[9]=_,e[10]=P,e[11]=C):(S=e[8],_=e[9],P=e[10],C=e[11]);let E;e[12]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx("div",{className:"flex justify-center",children:s.jsx("img",{src:"/logos/deco logo.svg",alt:"Deco",className:"h-12 w-12"})}),e[12]=E):E=e[12];const I=t?"Password reset successful":"Set a new password";let m;e[13]!==I?(m=s.jsx("div",{className:"text-center space-y-1",children:s.jsx("p",{className:"text-sm text-foreground/70",children:I})}),e[13]=I,e[14]=m):m=e[14];let u;e[15]!==i||e[16]!==a||e[17]!==t||e[18]!==r?(u=(i||!r&&!t)&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:"This reset link is invalid or has expired."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Back to login"})]}),e[15]=i,e[16]=a,e[17]=t,e[18]=r,e[19]=u):u=e[19];let x;e[20]!==N?(x=N&&s.jsx("div",{className:"rounded-xl bg-destructive/10 p-3 text-sm text-destructive text-center",children:N.message||"Failed to reset password. Please try again."}),e[20]=N,e[21]=x):x=e[21];let f;e[22]!==a||e[23]!==t?(f=t&&s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"rounded-xl bg-emerald-500/10 p-3 text-sm text-emerald-600 dark:text-emerald-400 text-center",children:"Your password has been reset. You can now sign in with your new password."}),s.jsx(z,{onClick:()=>a({to:"/login"}),className:"w-full font-semibold",size:"lg",children:"Go to login"})]}),e[22]=a,e[23]=t,e[24]=f):f=e[24];let g;e[25]!==c||e[26]!==l||e[27]!==F||e[28]!==i||e[29]!==d||e[30]!==o||e[31]!==v||e[32]!==t||e[33]!==r?(g=r&&!i&&!t&&s.jsxs("form",{onSubmit:F,className:"grid gap-4",children:[s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"New password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:o,onChange:b=>D(b.target.value),required:!0,minLength:8,disabled:d})]}),s.jsxs("div",{children:[s.jsx("label",{className:"block text-sm font-medium text-foreground mb-2",children:"Confirm password"}),s.jsx(L,{type:"password",placeholder:"••••••••",value:l,onChange:b=>M(b.target.value),required:!0,minLength:8,disabled:d}),l&&!v&&s.jsx("p",{className:"text-xs text-destructive mt-1.5",children:"Passwords do not match"})]}),s.jsx(z,{type:"submit",disabled:d||!c,className:"w-full font-semibold",size:"lg",children:d?"Resetting...":"Reset password"})]}),e[25]=c,e[26]=l,e[27]=F,e[28]=i,e[29]=d,e[30]=o,e[31]=v,e[32]=t,e[33]=r,e[34]=g):g=e[34];let p;e[35]!==a||e[36]!==t?(p=!t&&s.jsx("div",{className:"text-center",children:s.jsx(z,{type:"button",variant:"link",onClick:()=>a({to:"/login"}),className:"text-sm text-muted-foreground hover:text-foreground",children:"Back to sign in"})}),e[35]=a,e[36]=t,e[37]=p):p=e[37];let R;return e[38]!==m||e[39]!==u||e[40]!==x||e[41]!==f||e[42]!==g||e[43]!==p?(R=s.jsxs("main",{className:"relative flex min-h-screen items-center justify-center bg-gradient-to-br from-primary to-primary/75 p-4",children:[k,s.jsxs("div",{className:"relative z-10",children:[S,_,P,C,s.jsxs("div",{className:"mx-auto w-full min-w-[400px] max-w-md grid gap-6 bg-card p-10 border border-primary-foreground/20",children:[E,m,u,x,f,g,p]})]})]}),e[38]=m,e[39]=u,e[40]=x,e[41]=f,e[42]=g,e[43]=p,e[44]=R):R=e[44],R}async function O(e){const{newPassword:n,token:r}=e,h=await G.resetPassword({newPassword:n,token:r});if(h.error)throw new Error(h.error.message||"Failed to reset password");return h}export{J as default};