@decocms/mesh 2.141.0 → 2.142.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 (202) hide show
  1. package/dist/client/assets/{AlertCircle-CeyEXSoj.js → AlertCircle-Zx531KAn.js} +1 -1
  2. package/dist/client/assets/{AlignLeft-CrcoQJqu.js → AlignLeft-CGBbKVHK.js} +1 -1
  3. package/dist/client/assets/{ArrowDown-D730s0Gv.js → ArrowDown-BX-IIy5w.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-CLP9Pek3.js → ArrowLeft-D4dc0UBb.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-Dq6OU0Wi.js → ArrowUp-dcB4aDLZ.js} +1 -1
  6. package/dist/client/assets/{Check-Bra2mpbB.js → Check-DXoRcZpn.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-BPfWQi5L.js → CheckCircle-BP8hgPfe.js} +1 -1
  8. package/dist/client/assets/{CheckDone01-CXZx9paJ.js → CheckDone01-ca6APAHc.js} +1 -1
  9. package/dist/client/assets/{CheckVerified02-DNjRDns-.js → CheckVerified02-C_Ewexdw.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-DaSct-5t.js → ChevronDown-D04Buvau.js} +1 -1
  11. package/dist/client/assets/{ChevronLeft-DgayRUs6.js → ChevronLeft-C8cqrSli.js} +1 -1
  12. package/dist/client/assets/{ChevronRight-CIJzl8ei.js → ChevronRight-CkAAxLvD.js} +1 -1
  13. package/dist/client/assets/{Clock-C-pPW7F3.js → Clock-DwwOuQI4.js} +1 -1
  14. package/dist/client/assets/{Code01-Dr2rEb4l.js → Code01-BLJKgev-.js} +1 -1
  15. package/dist/client/assets/{Container-BQAhl1Ij.js → Container-CSl1es2V.js} +1 -1
  16. package/dist/client/assets/{Copy01-wvio6GZB.js → Copy01-B4eRdmVC.js} +1 -1
  17. package/dist/client/assets/{Dataflow03-DTe8Fji9.js → Dataflow03-SiitV-oV.js} +1 -1
  18. package/dist/client/assets/{DotsHorizontal-dwN0TeON.js → DotsHorizontal-DzRIJPXY.js} +1 -1
  19. package/dist/client/assets/{DotsVertical-COjc-1zo.js → DotsVertical-B6bpYQLL.js} +1 -1
  20. package/dist/client/assets/{Download01-Cgcu3XsW.js → Download01-DDnPOFFT.js} +1 -1
  21. package/dist/client/assets/{Edit01-9TEaueyu.js → Edit01-CoWrVJPj.js} +1 -1
  22. package/dist/client/assets/{Edit05-Aay9qpeK.js → Edit05-BUQBpzoO.js} +1 -1
  23. package/dist/client/assets/{Eye-BvUkkA1x.js → Eye-DNSEDYe8.js} +1 -1
  24. package/dist/client/assets/{File02-_Z_LhG0B.js → File02-BXS3LEA8.js} +1 -1
  25. package/dist/client/assets/{File06-8djhGUgF.js → File06-h52WT7aG.js} +1 -1
  26. package/dist/client/assets/{FilterLines-BpgGX9yW.js → FilterLines-CsjQLyQm.js} +1 -1
  27. package/dist/client/assets/{Globe01-cdbxnKif.js → Globe01-CSEqx1SJ.js} +1 -1
  28. package/dist/client/assets/{Globe02-BNWDh1xg.js → Globe02-YyAAQROb.js} +1 -1
  29. package/dist/client/assets/{Grid01-BTxljTvU.js → Grid01-Ju9gLjOW.js} +1 -1
  30. package/dist/client/assets/{Hash02-GCSnB6Ea.js → Hash02-TG1GIkeV.js} +1 -1
  31. package/dist/client/assets/{Home02-BNGdtTCt.js → Home02-TzIRlDMK.js} +1 -1
  32. package/dist/client/assets/{Image01-D6NJnYhS.js → Image01-PGP5Jz22.js} +1 -1
  33. package/dist/client/assets/{Inbox01-C5ZLulCH.js → Inbox01-CjHNjCjB.js} +1 -1
  34. package/dist/client/assets/{InfoCircle-WfpfNr5k.js → InfoCircle-CVW6wgFf.js} +1 -1
  35. package/dist/client/assets/{Key01-DCAZcJB7.js → Key01-9PzzeBlc.js} +1 -1
  36. package/dist/client/assets/{LayersTwo01-DfZQJvAF.js → LayersTwo01-XOG8qRvr.js} +1 -1
  37. package/dist/client/assets/{LayoutLeft-BbQAgJQI.js → LayoutLeft-BcthWHLG.js} +1 -1
  38. package/dist/client/assets/{Link01-6A-UyGFE.js → Link01-2BHrruNj.js} +1 -1
  39. package/dist/client/assets/{LinkExternal01-CcNqfW_-.js → LinkExternal01-CxAidvQ-.js} +1 -1
  40. package/dist/client/assets/{List-DYrVMPII.js → List-Bj4VjFJ6.js} +1 -1
  41. package/dist/client/assets/{Loading01-BI2pQIQK.js → Loading01-DF5pxnn8.js} +1 -1
  42. package/dist/client/assets/{Lock01-iA8k6E0L.js → Lock01-CPqKu_Mb.js} +1 -1
  43. package/dist/client/assets/{Play-DYKv-3LY.js → Play-CUMfSU-t.js} +1 -1
  44. package/dist/client/assets/{Plus-D8K5219B.js → Plus-CEtl-Eq7.js} +1 -1
  45. package/dist/client/assets/{RefreshCcw01-B2GUxp8e.js → RefreshCcw01-Bcbx9L0j.js} +1 -1
  46. package/dist/client/assets/{Save01-CD75pRkt.js → Save01-BtoFb1Cg.js} +1 -1
  47. package/dist/client/assets/{SearchMd-ChZ8IPer.js → SearchMd-u1QGwQkU.js} +1 -1
  48. package/dist/client/assets/{Settings01-D9LfVzNX.js → Settings01-C1oZxROY.js} +1 -1
  49. package/dist/client/assets/{Shield01-CcJa1Vfw.js → Shield01-DoZAYqqP.js} +1 -1
  50. package/dist/client/assets/{Terminal-BmCZxpDC.js → Terminal-DobKmqGm.js} +1 -1
  51. package/dist/client/assets/{Trash01-BUR32hk8.js → Trash01-c47UOodj.js} +1 -1
  52. package/dist/client/assets/{Upload01-CAAshTy5.js → Upload01-C3K15n1N.js} +1 -1
  53. package/dist/client/assets/{Users03-t-Eb-Q_F.js → Users03-Z0r1cCGf.js} +1 -1
  54. package/dist/client/assets/{X-BQQzz9s2.js → X-CT_P09q2.js} +1 -1
  55. package/dist/client/assets/{XCircle-Cap9XfpO.js → XCircle-BNAlXeL2.js} +1 -1
  56. package/dist/client/assets/{XClose-Dj2rcAfJ.js → XClose-BIpOBHWg.js} +1 -1
  57. package/dist/client/assets/{Zap-CUDe-Alo.js → Zap-BYVebEYM.js} +1 -1
  58. package/dist/client/assets/{agent-connections-preview-3Zz2CLn-.js → agent-connections-preview-B76ZYrs2.js} +1 -1
  59. package/dist/client/assets/{agent-detail-DV-MsiIN.js → agent-detail-ean34cyZ.js} +1 -1
  60. package/dist/client/assets/{agents-hw52w_aJ.js → agents-avEyjtsq.js} +1 -1
  61. package/dist/client/assets/{alert-dialog-B7Vj8wIN.js → alert-dialog-DXvhyacf.js} +1 -1
  62. package/dist/client/assets/{auth-catchall-CVH3rpJ8.js → auth-catchall-FvylLzD9.js} +1 -1
  63. package/dist/client/assets/{avatar-BjR7vcEh.js → avatar-DGDgNwX-.js} +1 -1
  64. package/dist/client/assets/{badge-BvxQUv5d.js → badge-DtcA_2rB.js} +1 -1
  65. package/dist/client/assets/{binder-D8_pfz0c.js → binder-CaZ6b20X.js} +1 -1
  66. package/dist/client/assets/{breadcrumb-CujpR_MZ.js → breadcrumb-DPLSdTx1.js} +1 -1
  67. package/dist/client/assets/{card-BnvIiB1g.js → card-Bz05CYUR.js} +1 -1
  68. package/dist/client/assets/{chart-CJtIITmU.js → chart-DYrz9LTc.js} +1 -1
  69. package/dist/client/assets/{checkbox-CfbjtS8Q.js → checkbox-JiwlvimE.js} +1 -1
  70. package/dist/client/assets/{circle-alert-92VS9QNj.js → circle-alert-CtnOwoV2.js} +1 -1
  71. package/dist/client/assets/{collapsible-rlPjAYfz.js → collapsible-Dz6kdDQx.js} +1 -1
  72. package/dist/client/assets/{collection-detail-DTIsN11e.js → collection-detail-CBGjxXPP.js} +1 -1
  73. package/dist/client/assets/{collection-display-button-DonrYXGs.js → collection-display-button-CXc-TgEJ.js} +1 -1
  74. package/dist/client/assets/{collection-search-BRnhIyqo.js → collection-search-Dl5JvsI0.js} +1 -1
  75. package/dist/client/assets/{collection-tab-sxOyMOJ1.js → collection-tab-BlE4CTwD.js} +1 -1
  76. package/dist/client/assets/{collection-table-wrapper-C9H2IYz6.js → collection-table-wrapper-eN4uWzLn.js} +1 -1
  77. package/dist/client/assets/{collection-tabs-BLzjBVUw.js → collection-tabs-CK4RWFd-.js} +1 -1
  78. package/dist/client/assets/{command-CyzcC-hg.js → command-BzF9LDzy.js} +1 -1
  79. package/dist/client/assets/{connect-DJVdJQyo.js → connect-B1CrEofK.js} +1 -1
  80. package/dist/client/assets/{connection-card-Z0jbSyHU.js → connection-card-CC22E-3G.js} +1 -1
  81. package/dist/client/assets/{connection-detail-cQXLAHkT.js → connection-detail-B-ICGeJ4.js} +1 -1
  82. package/dist/client/assets/{connection-status-BlekJeQH.js → connection-status-B1K3m1_w.js} +1 -1
  83. package/dist/client/assets/{connections-DcUAbwbI.js → connections-BuggzhbD.js} +1 -1
  84. package/dist/client/assets/{constants-Dm_YJHHh.js → constants-CRvMLa9p.js} +1 -1
  85. package/dist/client/assets/constants-I25hmjxi.js +1 -0
  86. package/dist/client/assets/{create-organization-dialog-CtlEPJzP.js → create-organization-dialog-DIZjTiis.js} +1 -1
  87. package/dist/client/assets/{create-project-dialog-BxzjYULd.js → create-project-dialog-Dut0dyR9.js} +1 -1
  88. package/dist/client/assets/{danger-CCLfXgtM.js → danger-Dare7pC6.js} +1 -1
  89. package/dist/client/assets/{danger-zone-DRhmEbL7.js → danger-zone-_BODcOmd.js} +1 -1
  90. package/dist/client/assets/{decopilot-events-ppuEAQXv.js → decopilot-events-bTg09qGr.js} +1 -1
  91. package/dist/client/assets/{dependencies-C7S5Q2d8.js → dependencies-BT9TgTWZ.js} +1 -1
  92. package/dist/client/assets/{dialog-V5-7uM9k.js → dialog-DSCIUn11.js} +1 -1
  93. package/dist/client/assets/{dropdown-menu-DhJeGl-I.js → dropdown-menu-DMgECNP1.js} +1 -1
  94. package/dist/client/assets/{dynamic-plugin-layout-CWhhphkI.js → dynamic-plugin-layout-CXCsSgRX.js} +1 -1
  95. package/dist/client/assets/{editable-task-title-Dyz3EXnS.js → editable-task-title-DKlfwqLm.js} +1 -1
  96. package/dist/client/assets/{empty-state-DCJLh0XB.js → empty-state-C64F3xDv.js} +1 -1
  97. package/dist/client/assets/{env-vars-editor-C56Egqy3.js → env-vars-editor-ClFO22Eh.js} +1 -1
  98. package/dist/client/assets/{extract-connection-data-Cb5Cn1YK.js → extract-connection-data-CrY_sL6W.js} +1 -1
  99. package/dist/client/assets/{file-browser-B-J9CyYH.js → file-browser-DSHBHgjG.js} +2 -2
  100. package/dist/client/assets/{form-BBAUUGww.js → form-CVLoDgzL.js} +1 -1
  101. package/dist/client/assets/{general-CiL7f9UQ.js → general-CYKgldaV.js} +1 -1
  102. package/dist/client/assets/{grid-view-Dixskjfv.js → grid-view-DvrbtUer.js} +1 -1
  103. package/dist/client/assets/{home-T185-fO8.js → home-BuzXHaZj.js} +1 -1
  104. package/dist/client/assets/{icon-picker-D7lX1VYO.js → icon-picker-5LH0UiWF.js} +1 -1
  105. package/dist/client/assets/{index-B9cZ8O6i.js → index-6Z25-w5a.js} +1 -1
  106. package/dist/client/assets/{index-CVG_d4yA.js → index-A_CnuSis.js} +1 -1
  107. package/dist/client/assets/{index-D18UlrU_.js → index-B7Bu7nQ7.js} +1 -1
  108. package/dist/client/assets/{index-DF_qvYHR.js → index-BCf_VMXY.js} +1 -1
  109. package/dist/client/assets/{index-BXzn0fV_.js → index-Cg5VAr11.js} +1 -1
  110. package/dist/client/assets/{index-DY_8JcsL.js → index-Co1xrsbj.js} +1 -1
  111. package/dist/client/assets/{index-vkhk47fC.js → index-CoyJj2VR.js} +1 -1
  112. package/dist/client/assets/{index-pgKDpBki.js → index-KAycGEnT.js} +3 -3
  113. package/dist/client/assets/{index-BsKpFK6R.js → index-jBnBTTB0.js} +1 -1
  114. package/dist/client/assets/{infiniteQueryObserver-CQfzmS7X.js → infiniteQueryObserver-DctmDFEe.js} +1 -1
  115. package/dist/client/assets/{input-BJSjp7-P.js → input-s8rw5Kfa.js} +1 -1
  116. package/dist/client/assets/{integration-icon-Bh8tJtce.js → integration-icon-BAlg7muO.js} +1 -1
  117. package/dist/client/assets/{label-vf98zSbN.js → label-lqq4AMOf.js} +1 -1
  118. package/dist/client/assets/{layout-YIwjbnTp.js → layout-BdJDt40T.js} +1 -1
  119. package/dist/client/assets/{layout-C5jONK7z.js → layout-CaxeqVAE.js} +1 -1
  120. package/dist/client/assets/{localstorage-keys-DBdiYnka.js → localstorage-keys-DK1Id_ip.js} +1 -1
  121. package/dist/client/assets/{login-BgRo2XAR.js → login--Bk_liKs.js} +1 -1
  122. package/dist/client/assets/{markdown-Br_cwNit.js → markdown-HCjujTl2.js} +1 -1
  123. package/dist/client/assets/{mcp-app-renderer-CUDmsxDc.js → mcp-app-renderer-Bconp3w4.js} +1 -1
  124. package/dist/client/assets/{mcp-oauth-D2_g2iQ3.js → mcp-oauth-DcSxwlYK.js} +1 -1
  125. package/dist/client/assets/{mcp-server-card-BIb-sr8t.js → mcp-server-card-B0UwO4c6.js} +1 -1
  126. package/dist/client/assets/{mcp-server-detail-umJmA6Hf.js → mcp-server-detail-zb689o0t.js} +2 -2
  127. package/dist/client/assets/{members-B8ytQqBf.js → members-A9Co33Fe.js} +1 -1
  128. package/dist/client/assets/{monaco-editor-cmFLTFFa.js → monaco-editor-BGkR3-IA.js} +1 -1
  129. package/dist/client/assets/{monitoring-Y4RhEfJi.js → monitoring-DtdfvOM5.js} +1 -1
  130. package/dist/client/assets/{monitoring-dashboard-edit-B1b_izuH.js → monitoring-dashboard-edit-GWWMfh0m.js} +1 -1
  131. package/dist/client/assets/{monitoring-dashboard-view-D91GHQli.js → monitoring-dashboard-view-Cm896dO-.js} +1 -1
  132. package/dist/client/assets/{oauth-callback-CkMlDc9V.js → oauth-callback-BSGOfJmL.js} +1 -1
  133. package/dist/client/assets/{page-BQN594H_.js → page-BjfHsKND.js} +1 -1
  134. package/dist/client/assets/{page-jQQCdu0_.js → page-PU0vqAHP.js} +1 -1
  135. package/dist/client/assets/{plugin-empty-state-CvKe2eFG.js → plugin-empty-state-BdIJtKhO.js} +1 -1
  136. package/dist/client/assets/{plugin-empty-state-8glCRu7k.js → plugin-empty-state-CNAE295F.js} +1 -1
  137. package/dist/client/assets/{plugin-header-BINlxFpc.js → plugin-header-BO6BGJC7.js} +1 -1
  138. package/dist/client/assets/{plugin-header-BBvns4oF.js → plugin-header-C3hBljo3.js} +1 -1
  139. package/dist/client/assets/plugins-BttmmeIz.js +1 -0
  140. package/dist/client/assets/{popover-CKnAPgyb.js → popover-DSO1tjgf.js} +1 -1
  141. package/dist/client/assets/{project-app-view-DK8fUX-l.js → project-app-view-DEVHaVoM.js} +1 -1
  142. package/dist/client/assets/{project-layout-BALZLj4X.js → project-layout-BZqAcTC3.js} +1 -1
  143. package/dist/client/assets/{project-plugins-Bj1bV66o.js → project-plugins-DkIXV878.js} +1 -1
  144. package/dist/client/assets/{projects-list-Df4ohsie.js → projects-list-DD9bayAR.js} +1 -1
  145. package/dist/client/assets/{readme-viewer-BRRJxput.js → readme-viewer-DEgSduvy.js} +1 -1
  146. package/dist/client/assets/{registry-layout-DsOQKg7X.js → registry-layout-BbOZb50w.js} +1 -1
  147. package/dist/client/assets/{registry-utils-bSQASXXu.js → registry-utils-BJRD11-o.js} +1 -1
  148. package/dist/client/assets/{reports-layout-VIixnRRq.js → reports-layout-0fvVXIA9.js} +1 -1
  149. package/dist/client/assets/{reset-password-9_dzcPjp.js → reset-password-BBFIx6IU.js} +1 -1
  150. package/dist/client/assets/{resizable-ClRo9tEF.js → resizable-FDnvuXI8.js} +1 -1
  151. package/dist/client/assets/{save-actions-Bid6YjFg.js → save-actions-BrexEzhw.js} +1 -1
  152. package/dist/client/assets/{scroll-area-C7Jh7ETR.js → scroll-area-BoIKmmj_.js} +1 -1
  153. package/dist/client/assets/{select-MKaUo6o5.js → select-XWfX294J.js} +1 -1
  154. package/dist/client/assets/{shell-layout-DrPAQ5jV.js → shell-layout-CfqRN6gC.js} +2 -2
  155. package/dist/client/assets/{sidebar-settings-4HQ0h8G6.js → sidebar-settings-CYnkTQwX.js} +1 -1
  156. package/dist/client/assets/{skeleton-YJfePU6v.js → skeleton-l9u4bmPQ.js} +1 -1
  157. package/dist/client/assets/{spinner-_SEN9vi4.js → spinner-CQhhuHCn.js} +1 -1
  158. package/dist/client/assets/{store-invite-Di8JOemb.js → store-invite-QKjyJOdx.js} +1 -1
  159. package/dist/client/assets/{switch-DhN0oNOe.js → switch-BTH5DtNC.js} +1 -1
  160. package/dist/client/assets/{table-C5_4tjrD.js → table-CObvzzoK.js} +1 -1
  161. package/dist/client/assets/{tabs-DW6Vwt7O.js → tabs-B62zcrrU.js} +1 -1
  162. package/dist/client/assets/tasks-DBMv6koR.js +1 -0
  163. package/dist/client/assets/{tasks-panel-ORUfjwGu.js → tasks-panel-jUSk_q_P.js} +1 -1
  164. package/dist/client/assets/{textarea-BvpI-WDT.js → textarea-CKFVaVym.js} +1 -1
  165. package/dist/client/assets/{time-range-picker-Bd4ADfiZ.js → time-range-picker-C2BX3Ytm.js} +1 -1
  166. package/dist/client/assets/{toggle-group-JxDUkkEj.js → toggle-group-BWymC1w6.js} +1 -1
  167. package/dist/client/assets/{tools-list-BQpfUfWd.js → tools-list-CBKDjlC9.js} +1 -1
  168. package/dist/client/assets/{tooltip-DH8hxvf2.js → tooltip-BD36KVkP.js} +1 -1
  169. package/dist/client/assets/{topbar-portal-Djvgwkqc.js → topbar-portal-CyJ7_aXv.js} +1 -1
  170. package/dist/client/assets/{types-Dr4up3fI.js → types-CgRNzZIg.js} +1 -1
  171. package/dist/client/assets/{use-binding-PixlLrYo.js → use-binding-eAl0-ngZ.js} +1 -1
  172. package/dist/client/assets/{use-collections-xijD0anf.js → use-collections-ROKIiOzV.js} +1 -1
  173. package/dist/client/assets/{use-connection-DKYOa494.js → use-connection-DWTVYLGI.js} +1 -1
  174. package/dist/client/assets/{use-copy-MZ1Maw_m.js → use-copy-Cxp-hpbY.js} +1 -1
  175. package/dist/client/assets/{use-create-virtual-mcp-BphKQ0RK.js → use-create-virtual-mcp-CWXwWPev.js} +1 -1
  176. package/dist/client/assets/{use-install-from-registry-BFX_cpLN.js → use-install-from-registry-CzqEIQq2.js} +1 -1
  177. package/dist/client/assets/{use-list-state-BtIJ-ja-.js → use-list-state-cW6KZE3t.js} +1 -1
  178. package/dist/client/assets/{use-llm-CEKPubl8.js → use-llm-D0wV35M9.js} +1 -1
  179. package/dist/client/assets/{use-mcp-resources-MxJcH4JX.js → use-mcp-resources-BTKxmEpv.js} +1 -1
  180. package/dist/client/assets/{use-mcp-tools-yCWWKbHl.js → use-mcp-tools-DkmUq8XI.js} +1 -1
  181. package/dist/client/assets/{use-members-AoYrzLX-.js → use-members-Bksy3767.js} +1 -1
  182. package/dist/client/assets/{use-mobile-ByMXtX6G.js → use-mobile-C7Xn-ZVB.js} +1 -1
  183. package/dist/client/assets/{use-project-DKVek4SF.js → use-project-BZjOe5ok.js} +1 -1
  184. package/dist/client/assets/{use-settings-modal-Dv44bpGw.js → use-settings-modal-BpLqrFwi.js} +1 -1
  185. package/dist/client/assets/{use-view-mode-xttGyEwW.js → use-view-mode-DxCF7P6S.js} +1 -1
  186. package/dist/client/assets/{use-virtual-mcp-CxEMO48x.js → use-virtual-mcp-DrNWNgvb.js} +1 -1
  187. package/dist/client/assets/useInfiniteQuery-Clfr9I7T.js +1 -0
  188. package/dist/client/assets/{useMutation-B1zBeDkg.js → useMutation-Ctk5b8uR.js} +1 -1
  189. package/dist/client/assets/useQuery-DCrAUBx5.js +1 -0
  190. package/dist/client/assets/useSuspenseInfiniteQuery-CG43fx0v.js +1 -0
  191. package/dist/client/assets/{user-CAFKngPC.js → user-BU3jjBpz.js} +1 -1
  192. package/dist/client/assets/{workflow-HCVF9XrN.js → workflow-BNkb2XNC.js} +1 -1
  193. package/dist/client/index.html +1 -1
  194. package/dist/server/cli.js +307 -307
  195. package/dist/server/server.js +275 -275
  196. package/package.json +1 -1
  197. package/dist/client/assets/constants-5ioK-fWT.js +0 -1
  198. package/dist/client/assets/plugins-BCUVhdgb.js +0 -1
  199. package/dist/client/assets/tasks-CGmW35Jv.js +0 -1
  200. package/dist/client/assets/useInfiniteQuery-Bdn29uSf.js +0 -1
  201. package/dist/client/assets/useQuery-D2_PHjUY.js +0 -1
  202. package/dist/client/assets/useSuspenseInfiniteQuery-CquX6rh3.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as m,c4 as We,bG as sn,ce as on,c as Q,v as Ne,j as n,E as Wt,u as Ze,n as ln,b as qt,m as cn,K as nt,B as ge,t as Ot,O as aa,a as un}from"./index-pgKDpBki.js";import{E as Vt,C as dn}from"./collection-search-BRnhIyqo.js";import{P as pe}from"./index-CVG_d4yA.js";import{B as mn,a as fn,b as pn,c as vn}from"./breadcrumb-CujpR_MZ.js";import{E as hn,d as gn,e as tr,b as xn,M as yn,T as bn,p as Qe,s as ze,a as rr}from"./time-range-picker-Bd4ADfiZ.js";import{I as st}from"./integration-icon-Bh8tJtce.js";import{B as it}from"./badge-BvxQUv5d.js";import{t as At}from"./ChevronDown-DaSct-5t.js";import{i as jn}from"./ChevronRight-CIJzl8ei.js";import{c as me,b as Et,d as Pn,e as Nn,a as wn,T as he}from"./table-C5_4tjrD.js";import{ar as On,as as Je,a2 as Ae,i as He,at as na,r as qe,V as ht,au as sa,X as gt,av as V,Y as H,aw as Ke,ax as ot,ay as lt,az as ke,aA as ar,O as Ee,a3 as Sn,a8 as Ht,aB as In,aC as kn,aD as Cn,aE as An,_ as Fe,a5 as Tt,w as En,l as ue,m as Ie,aF as Tn,p as we,v as Oe,z as Gt,x as Mn,y as ct,B as ia,D as xt,c as yt,R as oa,S as la,C as ca,F as bt,G as ua,H as da,K as ma,L as Dn,I as fa,d as Ge,M as _n,N as Ln,Z as jt,P as pa,Q as $n,T as Pt,U as nr,a0 as va,a1 as ha,k as ga,a4 as Bn,aG as Rn,ac as zn,n as Kn,q as Te,t as Me,aH as xa,aI as Fn,aJ as Wn,A as sr,aK as qn,aL as ir,E as Vn,aM as Hn,aN as ya,aO as Gn,aP as ba,aQ as Un,aR as Zn,aS as or,aT as Yn,$ as Xn,al as ja,am as Pa,ap as Na,aq as Qn,an as wa,ao as Jn}from"./chart-CJtIITmU.js";import{u as Ut,a as Zt,W as es}from"./constants-Dm_YJHHh.js";import{i as ts}from"./DotsVertical-COjc-1zo.js";import{i as rs}from"./Edit05-Aay9qpeK.js";import{s as Oa}from"./Plus-D8K5219B.js";import{s as Sa}from"./Trash01-BUR32hk8.js";import{C as as}from"./connection-card-Z0jbSyHU.js";import{D as ns,a as ss,b as is,c as lr}from"./dropdown-menu-DhJeGl-I.js";import{f as os,a as ls,b as cs,c as us,d as ds,e as ms,A as fs,h as ps}from"./alert-dialog-B7Vj8wIN.js";import{u as vs}from"./use-members-AoYrzLX-.js";import{u as hs}from"./useSuspenseInfiniteQuery-CquX6rh3.js";import{b as Ia}from"./use-connection-DKYOa494.js";import{b as gs}from"./use-virtual-mcp-CxEMO48x.js";import{i as xs}from"./Code01-Dr2rEb4l.js";import{n as Mt}from"./Container-BQAhl1Ij.js";import{i as ys}from"./FilterLines-BpgGX9yW.js";import{c as bs}from"./Grid01-BTxljTvU.js";import{I as St}from"./input-BJSjp7-P.js";import{C as cr}from"./checkbox-CfbjtS8Q.js";import{c as js,d as Ps,e as ur,a as Ns,C as ws,b as Os}from"./command-CyzcC-hg.js";import{b as ka,P as Ca,a as Aa}from"./popover-CKnAPgyb.js";import{S as dr,a as mr,b as fr,c as pr,d as et}from"./select-MKaUo6o5.js";import{T as Ss}from"./textarea-BvpI-WDT.js";import{T as Is,a as ks,b as Cs}from"./tooltip-DH8hxvf2.js";import{C as As}from"./collection-tabs-BLzjBVUw.js";import{S as Es}from"./switch-DhN0oNOe.js";import{L as Ts}from"./label-vf98zSbN.js";import{u as Ms}from"./use-mcp-tools-yCWWKbHl.js";import"./Loading01-BI2pQIQK.js";import"./SearchMd-ChZ8IPer.js";import"./localstorage-keys-DBdiYnka.js";import"./useQuery-D2_PHjUY.js";import"./useMutation-B1zBeDkg.js";import"./Check-Bra2mpbB.js";import"./Copy01-wvio6GZB.js";import"./Download01-Cgcu3XsW.js";import"./Key01-DCAZcJB7.js";import"./Play-DYKv-3LY.js";import"./monaco-editor-cmFLTFFa.js";import"./spinner-_SEN9vi4.js";import"./scroll-area-C7Jh7ETR.js";import"./Clock-C-pPW7F3.js";import"./ChevronLeft-DgayRUs6.js";import"./index-DY_8JcsL.js";import"./card-BnvIiB1g.js";import"./infiniteQueryObserver-CQfzmS7X.js";import"./use-collections-xijD0anf.js";import"./index-B9cZ8O6i.js";import"./index-D18UlrU_.js";const Dt=({size:t=24,color:e="currentColor",...r})=>m.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},m.createElement("path",{d:"M21 21H6.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C3 19.48 3 18.92 3 17.8V3m4 7.5v7m4.5-12v12m4.5-7v7m4.5-12v12"}));Dt.displayName="BarChart07";const Ea=({size:t=24,color:e="currentColor",...r})=>m.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},m.createElement("path",{d:"M9.5 15V9m5 6V9m7.5 3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Ea.displayName="PauseCircle";const Ta=({size:t=24,color:e="currentColor",...r})=>m.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},m.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}),m.createElement("path",{d:"M9.5 8.965c0-.477 0-.716.1-.849a.5.5 0 0 1 .364-.199c.166-.012.367.117.769.375l4.72 3.035c.349.224.523.336.583.478a.5.5 0 0 1 0 .39c-.06.142-.234.254-.583.478l-4.72 3.035c-.402.258-.603.387-.769.375a.5.5 0 0 1-.364-.2c-.1-.132-.1-.371-.1-.848v-6.07Z"}));Ta.displayName="PlayCircle";const Ma=Math.cos,ut=Math.sin,de=Math.sqrt,dt=Math.PI,Nt=2*dt,Yt={draw(t,e){const r=de(e/dt);t.moveTo(r,0),t.arc(0,0,r,0,Nt)}},Ds={draw(t,e){const r=de(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},Da=de(1/3),_s=Da*2,Ls={draw(t,e){const r=de(e/_s),a=r*Da;t.moveTo(0,-r),t.lineTo(a,0),t.lineTo(0,r),t.lineTo(-a,0),t.closePath()}},$s={draw(t,e){const r=de(e),a=-r/2;t.rect(a,a,r,r)}},Bs=.8908130915292852,_a=ut(dt/10)/ut(7*dt/10),Rs=ut(Nt/10)*_a,zs=-Ma(Nt/10)*_a,Ks={draw(t,e){const r=de(e*Bs),a=Rs*r,i=zs*r;t.moveTo(0,-r),t.lineTo(a,i);for(let s=1;s<5;++s){const o=Nt*s/5,l=Ma(o),c=ut(o);t.lineTo(c*r,-l*r),t.lineTo(l*a-c*i,c*a+l*i)}t.closePath()}},It=de(3),Fs={draw(t,e){const r=-de(e/(It*3));t.moveTo(0,r*2),t.lineTo(-It*r,-r),t.lineTo(It*r,-r),t.closePath()}},ne=-.5,se=de(3)/2,_t=1/de(12),Ws=(_t/2+1)*3,qs={draw(t,e){const r=de(e/Ws),a=r/2,i=r*_t,s=a,o=r*_t+r,l=-s,c=o;t.moveTo(a,i),t.lineTo(s,o),t.lineTo(l,c),t.lineTo(ne*a-se*i,se*a+ne*i),t.lineTo(ne*s-se*o,se*s+ne*o),t.lineTo(ne*l-se*c,se*l+ne*c),t.lineTo(ne*a+se*i,ne*i-se*a),t.lineTo(ne*s+se*o,ne*o-se*s),t.lineTo(ne*l+se*c,ne*c-se*l),t.closePath()}};function Vs(t,e){let r=null,a=On(i);t=typeof t=="function"?t:Je(t||Yt),e=typeof e=="function"?e:Je(e===void 0?64:+e);function i(){let s;if(r||(r=s=a()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),s)return r=null,s+""||null}return i.type=function(s){return arguments.length?(t=typeof s=="function"?s:Je(s),i):t},i.size=function(s){return arguments.length?(e=typeof s=="function"?s:Je(+s),i):e},i.context=function(s){return arguments.length?(r=s??null,i):r},i}var Hs=["type","size","sizeType"];function Lt(){return Lt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Lt.apply(null,arguments)}function vr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,a)}return r}function hr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?vr(Object(r),!0).forEach(function(a){Gs(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vr(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Gs(t,e,r){return(e=Us(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Us(t){var e=Zs(t,"string");return typeof e=="symbol"?e:e+""}function Zs(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ys(t,e){if(t==null)return{};var r,a,i=Xs(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(a=0;a<s.length;a++)r=s[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function Xs(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var La={symbolCircle:Yt,symbolCross:Ds,symbolDiamond:Ls,symbolSquare:$s,symbolStar:Ks,symbolTriangle:Fs,symbolWye:qs},Qs=Math.PI/180,Js=t=>{var e="symbol".concat(na(t));return La[e]||Yt},ei=(t,e,r)=>{if(e==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*Qs;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.tan(a)**2)}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},ti=(t,e)=>{La["symbol".concat(na(t))]=e},$a=t=>{var{type:e="circle",size:r=64,sizeType:a="area"}=t,i=Ys(t,Hs),s=hr(hr({},i),{},{type:e,size:r,sizeType:a}),o="circle";typeof e=="string"&&(o=e);var l=()=>{var f=Js(o),g=Vs().type(f).size(ei(r,a,o)),y=g();if(y!==null)return y},{className:c,cx:u,cy:d}=s,v=Ae(s);return He(u)&&He(d)&&He(r)?m.createElement("path",Lt({},v,{className:We("recharts-symbols",c),transform:"translate(".concat(u,", ").concat(d,")"),d:l()})):null};$a.registerSymbol=ti;var ri=["radius"],ai=["radius"],gr,xr,yr,br,jr,Pr,Nr,wr,Or,Sr;function Ir(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,a)}return r}function kr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ir(Object(r),!0).forEach(function(a){ni(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ir(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function ni(t,e,r){return(e=si(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function si(t){var e=ii(t,"string");return typeof e=="symbol"?e:e+""}function ii(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function mt(){return mt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},mt.apply(null,arguments)}function Cr(t,e){if(t==null)return{};var r,a,i=oi(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(a=0;a<s.length;a++)r=s[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function oi(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function fe(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var Ar=(t,e,r,a,i)=>{var s=Ke(r),o=Ke(a),l=Math.min(Math.abs(s)/2,Math.abs(o)/2),c=o>=0?1:-1,u=s>=0?1:-1,d=o>=0&&s>=0||o<0&&s<0?1:0,v;if(l>0&&Array.isArray(i)){for(var f=[0,0,0,0],g=0,y=4;g<y;g++){var x,b=(x=i[g])!==null&&x!==void 0?x:0;f[g]=b>l?l:b}v=V(gr||(gr=fe(["M",",",""])),t,e+c*f[0]),f[0]>0&&(v+=V(xr||(xr=fe(["A ",",",",0,0,",",",",",""])),f[0],f[0],d,t+u*f[0],e)),v+=V(yr||(yr=fe(["L ",",",""])),t+r-u*f[1],e),f[1]>0&&(v+=V(br||(br=fe(["A ",",",",0,0,",`,
1
+ import{r as m,c4 as We,bG as sn,ce as on,c as Q,v as Ne,j as n,E as Wt,u as Ze,n as ln,b as qt,m as cn,K as nt,B as ge,t as Ot,O as aa,a as un}from"./index-KAycGEnT.js";import{E as Vt,C as dn}from"./collection-search-Dl5JvsI0.js";import{P as pe}from"./index-A_CnuSis.js";import{B as mn,a as fn,b as pn,c as vn}from"./breadcrumb-DPLSdTx1.js";import{E as hn,d as gn,e as tr,b as xn,M as yn,T as bn,p as Qe,s as ze,a as rr}from"./time-range-picker-C2BX3Ytm.js";import{I as st}from"./integration-icon-BAlg7muO.js";import{B as it}from"./badge-DtcA_2rB.js";import{t as At}from"./ChevronDown-D04Buvau.js";import{i as jn}from"./ChevronRight-CkAAxLvD.js";import{c as me,b as Et,d as Pn,e as Nn,a as wn,T as he}from"./table-CObvzzoK.js";import{ar as On,as as Je,a2 as Ae,i as He,at as na,r as qe,V as ht,au as sa,X as gt,av as V,Y as H,aw as Ke,ax as ot,ay as lt,az as ke,aA as ar,O as Ee,a3 as Sn,a8 as Ht,aB as In,aC as kn,aD as Cn,aE as An,_ as Fe,a5 as Tt,w as En,l as ue,m as Ie,aF as Tn,p as we,v as Oe,z as Gt,x as Mn,y as ct,B as ia,D as xt,c as yt,R as oa,S as la,C as ca,F as bt,G as ua,H as da,K as ma,L as Dn,I as fa,d as Ge,M as _n,N as Ln,Z as jt,P as pa,Q as $n,T as Pt,U as nr,a0 as va,a1 as ha,k as ga,a4 as Bn,aG as Rn,ac as zn,n as Kn,q as Te,t as Me,aH as xa,aI as Fn,aJ as Wn,A as sr,aK as qn,aL as ir,E as Vn,aM as Hn,aN as ya,aO as Gn,aP as ba,aQ as Un,aR as Zn,aS as or,aT as Yn,$ as Xn,al as ja,am as Pa,ap as Na,aq as Qn,an as wa,ao as Jn}from"./chart-DYrz9LTc.js";import{u as Ut,a as Zt,W as es}from"./constants-CRvMLa9p.js";import{i as ts}from"./DotsVertical-B6bpYQLL.js";import{i as rs}from"./Edit05-BUQBpzoO.js";import{s as Oa}from"./Plus-CEtl-Eq7.js";import{s as Sa}from"./Trash01-c47UOodj.js";import{C as as}from"./connection-card-CC22E-3G.js";import{D as ns,a as ss,b as is,c as lr}from"./dropdown-menu-DMgECNP1.js";import{f as os,a as ls,b as cs,c as us,d as ds,e as ms,A as fs,h as ps}from"./alert-dialog-DXvhyacf.js";import{u as vs}from"./use-members-Bksy3767.js";import{u as hs}from"./useSuspenseInfiniteQuery-CG43fx0v.js";import{b as Ia}from"./use-connection-DWTVYLGI.js";import{b as gs}from"./use-virtual-mcp-DrNWNgvb.js";import{i as xs}from"./Code01-BLJKgev-.js";import{n as Mt}from"./Container-CSl1es2V.js";import{i as ys}from"./FilterLines-CsjQLyQm.js";import{c as bs}from"./Grid01-Ju9gLjOW.js";import{I as St}from"./input-s8rw5Kfa.js";import{C as cr}from"./checkbox-JiwlvimE.js";import{c as js,d as Ps,e as ur,a as Ns,C as ws,b as Os}from"./command-BzF9LDzy.js";import{b as ka,P as Ca,a as Aa}from"./popover-DSO1tjgf.js";import{S as dr,a as mr,b as fr,c as pr,d as et}from"./select-XWfX294J.js";import{T as Ss}from"./textarea-CKFVaVym.js";import{T as Is,a as ks,b as Cs}from"./tooltip-BD36KVkP.js";import{C as As}from"./collection-tabs-CK4RWFd-.js";import{S as Es}from"./switch-BTH5DtNC.js";import{L as Ts}from"./label-lqq4AMOf.js";import{u as Ms}from"./use-mcp-tools-DkmUq8XI.js";import"./Loading01-DF5pxnn8.js";import"./SearchMd-u1QGwQkU.js";import"./localstorage-keys-DK1Id_ip.js";import"./useQuery-DCrAUBx5.js";import"./useMutation-Ctk5b8uR.js";import"./Check-DXoRcZpn.js";import"./Copy01-B4eRdmVC.js";import"./Download01-DDnPOFFT.js";import"./Key01-9PzzeBlc.js";import"./Play-CUMfSU-t.js";import"./monaco-editor-BGkR3-IA.js";import"./spinner-CQhhuHCn.js";import"./scroll-area-BoIKmmj_.js";import"./Clock-DwwOuQI4.js";import"./ChevronLeft-C8cqrSli.js";import"./index-Co1xrsbj.js";import"./card-Bz05CYUR.js";import"./infiniteQueryObserver-DctmDFEe.js";import"./use-collections-ROKIiOzV.js";import"./index-6Z25-w5a.js";import"./index-B7Bu7nQ7.js";const Dt=({size:t=24,color:e="currentColor",...r})=>m.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},m.createElement("path",{d:"M21 21H6.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C3 19.48 3 18.92 3 17.8V3m4 7.5v7m4.5-12v12m4.5-7v7m4.5-12v12"}));Dt.displayName="BarChart07";const Ea=({size:t=24,color:e="currentColor",...r})=>m.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},m.createElement("path",{d:"M9.5 15V9m5 6V9m7.5 3c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10Z"}));Ea.displayName="PauseCircle";const Ta=({size:t=24,color:e="currentColor",...r})=>m.createElement("svg",{viewBox:"0 0 24 24",width:t,height:t,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},m.createElement("path",{d:"M12 22c5.523 0 10-4.477 10-10S17.523 2 12 2 2 6.477 2 12s4.477 10 10 10Z"}),m.createElement("path",{d:"M9.5 8.965c0-.477 0-.716.1-.849a.5.5 0 0 1 .364-.199c.166-.012.367.117.769.375l4.72 3.035c.349.224.523.336.583.478a.5.5 0 0 1 0 .39c-.06.142-.234.254-.583.478l-4.72 3.035c-.402.258-.603.387-.769.375a.5.5 0 0 1-.364-.2c-.1-.132-.1-.371-.1-.848v-6.07Z"}));Ta.displayName="PlayCircle";const Ma=Math.cos,ut=Math.sin,de=Math.sqrt,dt=Math.PI,Nt=2*dt,Yt={draw(t,e){const r=de(e/dt);t.moveTo(r,0),t.arc(0,0,r,0,Nt)}},Ds={draw(t,e){const r=de(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},Da=de(1/3),_s=Da*2,Ls={draw(t,e){const r=de(e/_s),a=r*Da;t.moveTo(0,-r),t.lineTo(a,0),t.lineTo(0,r),t.lineTo(-a,0),t.closePath()}},$s={draw(t,e){const r=de(e),a=-r/2;t.rect(a,a,r,r)}},Bs=.8908130915292852,_a=ut(dt/10)/ut(7*dt/10),Rs=ut(Nt/10)*_a,zs=-Ma(Nt/10)*_a,Ks={draw(t,e){const r=de(e*Bs),a=Rs*r,i=zs*r;t.moveTo(0,-r),t.lineTo(a,i);for(let s=1;s<5;++s){const o=Nt*s/5,l=Ma(o),c=ut(o);t.lineTo(c*r,-l*r),t.lineTo(l*a-c*i,c*a+l*i)}t.closePath()}},It=de(3),Fs={draw(t,e){const r=-de(e/(It*3));t.moveTo(0,r*2),t.lineTo(-It*r,-r),t.lineTo(It*r,-r),t.closePath()}},ne=-.5,se=de(3)/2,_t=1/de(12),Ws=(_t/2+1)*3,qs={draw(t,e){const r=de(e/Ws),a=r/2,i=r*_t,s=a,o=r*_t+r,l=-s,c=o;t.moveTo(a,i),t.lineTo(s,o),t.lineTo(l,c),t.lineTo(ne*a-se*i,se*a+ne*i),t.lineTo(ne*s-se*o,se*s+ne*o),t.lineTo(ne*l-se*c,se*l+ne*c),t.lineTo(ne*a+se*i,ne*i-se*a),t.lineTo(ne*s+se*o,ne*o-se*s),t.lineTo(ne*l+se*c,ne*c-se*l),t.closePath()}};function Vs(t,e){let r=null,a=On(i);t=typeof t=="function"?t:Je(t||Yt),e=typeof e=="function"?e:Je(e===void 0?64:+e);function i(){let s;if(r||(r=s=a()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),s)return r=null,s+""||null}return i.type=function(s){return arguments.length?(t=typeof s=="function"?s:Je(s),i):t},i.size=function(s){return arguments.length?(e=typeof s=="function"?s:Je(+s),i):e},i.context=function(s){return arguments.length?(r=s??null,i):r},i}var Hs=["type","size","sizeType"];function Lt(){return Lt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},Lt.apply(null,arguments)}function vr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,a)}return r}function hr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?vr(Object(r),!0).forEach(function(a){Gs(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vr(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Gs(t,e,r){return(e=Us(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Us(t){var e=Zs(t,"string");return typeof e=="symbol"?e:e+""}function Zs(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ys(t,e){if(t==null)return{};var r,a,i=Xs(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(a=0;a<s.length;a++)r=s[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function Xs(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}var La={symbolCircle:Yt,symbolCross:Ds,symbolDiamond:Ls,symbolSquare:$s,symbolStar:Ks,symbolTriangle:Fs,symbolWye:qs},Qs=Math.PI/180,Js=t=>{var e="symbol".concat(na(t));return La[e]||Yt},ei=(t,e,r)=>{if(e==="area")return t;switch(r){case"cross":return 5*t*t/9;case"diamond":return .5*t*t/Math.sqrt(3);case"square":return t*t;case"star":{var a=18*Qs;return 1.25*t*t*(Math.tan(a)-Math.tan(a*2)*Math.tan(a)**2)}case"triangle":return Math.sqrt(3)*t*t/4;case"wye":return(21-10*Math.sqrt(3))*t*t/8;default:return Math.PI*t*t/4}},ti=(t,e)=>{La["symbol".concat(na(t))]=e},$a=t=>{var{type:e="circle",size:r=64,sizeType:a="area"}=t,i=Ys(t,Hs),s=hr(hr({},i),{},{type:e,size:r,sizeType:a}),o="circle";typeof e=="string"&&(o=e);var l=()=>{var f=Js(o),g=Vs().type(f).size(ei(r,a,o)),y=g();if(y!==null)return y},{className:c,cx:u,cy:d}=s,v=Ae(s);return He(u)&&He(d)&&He(r)?m.createElement("path",Lt({},v,{className:We("recharts-symbols",c),transform:"translate(".concat(u,", ").concat(d,")"),d:l()})):null};$a.registerSymbol=ti;var ri=["radius"],ai=["radius"],gr,xr,yr,br,jr,Pr,Nr,wr,Or,Sr;function Ir(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);e&&(a=a.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,a)}return r}function kr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ir(Object(r),!0).forEach(function(a){ni(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ir(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function ni(t,e,r){return(e=si(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function si(t){var e=ii(t,"string");return typeof e=="symbol"?e:e+""}function ii(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function mt(){return mt=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var a in r)({}).hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},mt.apply(null,arguments)}function Cr(t,e){if(t==null)return{};var r,a,i=oi(t,e);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);for(a=0;a<s.length;a++)r=s[a],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(i[r]=t[r])}return i}function oi(t,e){if(t==null)return{};var r={};for(var a in t)if({}.hasOwnProperty.call(t,a)){if(e.indexOf(a)!==-1)continue;r[a]=t[a]}return r}function fe(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var Ar=(t,e,r,a,i)=>{var s=Ke(r),o=Ke(a),l=Math.min(Math.abs(s)/2,Math.abs(o)/2),c=o>=0?1:-1,u=s>=0?1:-1,d=o>=0&&s>=0||o<0&&s<0?1:0,v;if(l>0&&Array.isArray(i)){for(var f=[0,0,0,0],g=0,y=4;g<y;g++){var x,b=(x=i[g])!==null&&x!==void 0?x:0;f[g]=b>l?l:b}v=V(gr||(gr=fe(["M",",",""])),t,e+c*f[0]),f[0]>0&&(v+=V(xr||(xr=fe(["A ",",",",0,0,",",",",",""])),f[0],f[0],d,t+u*f[0],e)),v+=V(yr||(yr=fe(["L ",",",""])),t+r-u*f[1],e),f[1]>0&&(v+=V(br||(br=fe(["A ",",",",0,0,",`,
2
2
  `,",",""])),f[1],f[1],d,t+r,e+c*f[1])),v+=V(jr||(jr=fe(["L ",",",""])),t+r,e+a-c*f[2]),f[2]>0&&(v+=V(Pr||(Pr=fe(["A ",",",",0,0,",`,
3
3
  `,",",""])),f[2],f[2],d,t+r-u*f[2],e+a)),v+=V(Nr||(Nr=fe(["L ",",",""])),t+u*f[3],e+a),f[3]>0&&(v+=V(wr||(wr=fe(["A ",",",",0,0,",`,
4
4
  `,",",""])),f[3],f[3],d,t,e+a-c*f[3])),v+="Z"}else if(l>0&&i===+i&&i>0){var h=Math.min(l,i);v=V(Or||(Or=fe(["M ",",",`
@@ -1 +1 @@
1
- import{r as C,c as we,e as Be,j as t,a2 as Fe,E as Te,u as Ee,n as Me,m as Re,K as ve,aF as ze,B as re,t as pe}from"./index-pgKDpBki.js";import{b as Oe}from"./use-connection-DKYOa494.js";import{u as $e,a as Ae}from"./constants-Dm_YJHHh.js";import{I as le}from"./input-BJSjp7-P.js";import{I as ke}from"./integration-icon-Bh8tJtce.js";import{C as We}from"./checkbox-CfbjtS8Q.js";import{a as Le,b as Ve,P as Ue}from"./popover-CKnAPgyb.js";import{i as Ge}from"./AlignLeft-CrcoQJqu.js";import{t as Ie}from"./ChevronDown-DaSct-5t.js";import{S as je,a as be,b as ye,c as Ne,d as w,n as Ke}from"./select-MKaUo6o5.js";import{s as qe}from"./Hash02-GCSnB6Ea.js";import{i as He}from"./Play-DYKv-3LY.js";import{s as Qe}from"./Plus-D8K5219B.js";import{s as Je}from"./Trash01-BUR32hk8.js";import{T as Ye,a as Se}from"./toggle-group-JxDUkkEj.js";import{a as Ze,V as Xe}from"./layout-YIwjbnTp.js";import{S as et}from"./save-actions-Bid6YjFg.js";import{B as tt,a as st,b as Pe,d as rt,e as lt,c as at}from"./breadcrumb-CujpR_MZ.js";import"./use-collections-xijD0anf.js";import"./useMutation-B1zBeDkg.js";import"./Container-BQAhl1Ij.js";import"./Check-Bra2mpbB.js";import"./index-D18UlrU_.js";import"./index-CVG_d4yA.js";import"./localstorage-keys-DBdiYnka.js";import"./useQuery-D2_PHjUY.js";import"./tooltip-DH8hxvf2.js";import"./Save01-CD75pRkt.js";import"./Loading01-BI2pQIQK.js";import"./ChevronRight-CIJzl8ei.js";const _e=({size:l=24,color:e="currentColor",...s})=>C.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},C.createElement("path",{d:"M8 15v2m4-6v6m4-10v10m-8.2 4h8.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 18.72 21 17.88 21 16.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C18.72 3 17.88 3 16.2 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 21Z"}));_e.displayName="BarChartSquare02";function De(l){return{id:l.id,name:l.name,type:l.type,sourcePath:l.source.path,sourceFrom:l.source.from,aggregationFn:l.aggregation.fn,groupBy:l.aggregation.groupBy||"",interval:l.aggregation.interval||""}}function it(l){return{id:l.id,name:l.name,type:l.type,source:{path:l.sourcePath,from:l.sourceFrom},aggregation:{fn:l.aggregationFn,groupBy:l.type==="table"&&l.groupBy?l.groupBy:void 0,interval:l.type==="timeseries"&&l.interval?l.interval:void 0}}}const Ce={id:crypto.randomUUID(),name:"",type:"metric",sourcePath:"$.usage.total_tokens",sourceFrom:"output",aggregationFn:"sum",groupBy:"",interval:""};function nt(l){const e=we.c(36),{result:s,widget:o}=l;if(s.error){let i;return e[0]!==s.error?(i=t.jsx("div",{className:"text-sm text-destructive bg-destructive/10 rounded p-3",children:s.error}),e[0]=s.error,e[1]=i):i=e[1],i}if(o.type==="metric"){const i=s.value??0;let d;e[2]!==i?(d=i>=1e6?`${(i/1e6).toFixed(2)}M`:i>=1e3?`${(i/1e3).toFixed(2)}K`:typeof i=="number"?i.toFixed(2):String(i),e[2]=i,e[3]=d):d=e[3];const c=d;let m;e[4]!==c?(m=t.jsx("div",{className:"text-3xl font-bold tabular-nums",children:c}),e[4]=c,e[5]=m):m=e[5];const x=s.matchedRecords??0;let h;e[6]!==x?(h=t.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[x," records matched"]}),e[6]=x,e[7]=h):h=e[7];let f;return e[8]!==m||e[9]!==h?(f=t.jsxs("div",{className:"text-center py-4",children:[m,h]}),e[8]=m,e[9]=h,e[10]=f):f=e[10],f}if(o.type==="table"&&s.groups){let i;e[11]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("thead",{className:"bg-muted/50 sticky top-0",children:t.jsxs("tr",{children:[t.jsx("th",{className:"text-left px-3 py-1.5 text-xs font-medium",children:"Key"}),t.jsx("th",{className:"text-right px-3 py-1.5 text-xs font-medium",children:"Value"})]})}),e[11]=i):i=e[11];let d;e[12]!==s.groups?(d=s.groups.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:2,className:"px-3 py-4 text-center text-muted-foreground text-xs",children:"No data"})}):s.groups.slice(0,10).map(ct),e[12]=s.groups,e[13]=d):d=e[13];let c;e[14]!==d?(c=t.jsxs("table",{className:"w-full text-sm",children:[i,t.jsx("tbody",{children:d})]}),e[14]=d,e[15]=c):c=e[15];let m;e[16]!==s.groups.length?(m=s.groups.length>10&&t.jsxs("div",{className:"text-xs text-muted-foreground text-center py-2",children:["+",s.groups.length-10," more rows"]}),e[16]=s.groups.length,e[17]=m):m=e[17];let x;return e[18]!==c||e[19]!==m?(x=t.jsxs("div",{className:"max-h-[200px] overflow-auto",children:[c,m]}),e[18]=c,e[19]=m,e[20]=x):x=e[20],x}if(o.type==="timeseries"&&s.timeseries){let i;e[21]!==s.timeseries?(i=Math.max(...s.timeseries.map(ot),1),e[21]=s.timeseries,e[22]=i):i=e[22];const d=i;let c;if(e[23]!==d||e[24]!==s.timeseries){let f;e[26]!==d?(f=(u,N)=>t.jsx("div",{className:"flex-1 bg-primary/80 rounded-t",style:{height:`${u.value/d*100}%`,minHeight:u.value>0?"2px":"0px"},title:`${new Date(u.timestamp).toLocaleString()}: ${u.value}`},N),e[26]=d,e[27]=f):f=e[27],c=s.timeseries.slice(-24).map(f),e[23]=d,e[24]=s.timeseries,e[25]=c}else c=e[25];let m;e[28]!==c?(m=t.jsx("div",{className:"flex items-end gap-0.5 h-[80px]",children:c}),e[28]=c,e[29]=m):m=e[29];let x;e[30]!==s.timeseries.length?(x=t.jsxs("div",{className:"text-xs text-muted-foreground text-center mt-2",children:[s.timeseries.length," data points"]}),e[30]=s.timeseries.length,e[31]=x):x=e[31];let h;return e[32]!==m||e[33]!==x?(h=t.jsxs("div",{className:"py-2",children:[m,x]}),e[32]=m,e[33]=x,e[34]=h):h=e[34],h}let j;return e[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"text-sm text-muted-foreground text-center py-4",children:"No preview data"}),e[35]=j):j=e[35],j}function ot(l){return l.value}function ct(l,e){return t.jsxs("tr",{className:"border-t",children:[t.jsx("td",{className:"px-3 py-1.5 font-mono text-xs",children:l.key}),t.jsx("td",{className:"px-3 py-1.5 text-right tabular-nums text-xs",children:l.value.toLocaleString()})]},e)}function mt(l){const e=we.c(113),{widget:s,onChange:o,onRemove:j,canRemove:i,onMoveUp:d,onMoveDown:c,canMoveUp:m,canMoveDown:x,onPreview:h,previewResult:f,isPreviewing:u}=l,N=!m;let z;e[0]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(Ke,{size:14}),e[0]=z):z=e[0];let D;e[1]!==d||e[2]!==N?(D=t.jsx(re,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:d,disabled:N,children:z}),e[1]=d,e[2]=N,e[3]=D):D=e[3];const ae=!x;let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Ie,{size:14}),e[4]=g):g=e[4];let p;e[5]!==c||e[6]!==ae?(p=t.jsx(re,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:c,disabled:ae,children:g}),e[5]=c,e[6]=ae,e[7]=p):p=e[7];let k;e[8]!==D||e[9]!==p?(k=t.jsxs("div",{className:"flex items-center gap-0.5",children:[D,p]}),e[8]=D,e[9]=p,e[10]=k):k=e[10];let S;e[11]!==s.type?(S=t.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:s.type}),e[11]=s.type,e[12]=S):S=e[12];let F;e[13]!==s.name?(F=s.name&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-muted-foreground",children:"·"}),t.jsx("span",{className:"text-sm font-medium",children:s.name})]}),e[13]=s.name,e[14]=F):F=e[14];let _;e[15]!==k||e[16]!==S||e[17]!==F?(_=t.jsxs("div",{className:"flex items-center gap-2",children:[k,S,F]}),e[15]=k,e[16]=S,e[17]=F,e[18]=_):_=e[18];let P;e[19]!==u?(P=u?t.jsx(Fe,{size:14,className:"animate-spin"}):t.jsx(He,{size:14}),e[19]=u,e[20]=P):P=e[20];let B;e[21]!==u||e[22]!==h||e[23]!==P?(B=t.jsx(re,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:h,disabled:u,children:P}),e[21]=u,e[22]=h,e[23]=P,e[24]=B):B=e[24];const O=!i,ie=i?"visible":"hidden";let T;e[25]!==ie?(T={visibility:ie},e[25]=ie,e[26]=T):T=e[26];let $;e[27]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(Je,{size:14}),e[27]=$):$=e[27];let E;e[28]!==j||e[29]!==O||e[30]!==T?(E=t.jsx(re,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:j,disabled:O,style:T,children:$}),e[28]=j,e[29]=O,e[30]=T,e[31]=E):E=e[31];let M;e[32]!==B||e[33]!==E?(M=t.jsxs("div",{className:"flex items-center gap-1",children:[B,E]}),e[32]=B,e[33]=E,e[34]=M):M=e[34];let R;e[35]!==_||e[36]!==M?(R=t.jsxs("div",{className:"flex items-center justify-between px-4 h-11 border-b bg-muted/30",children:[_,M]}),e[35]=_,e[36]=M,e[37]=R):R=e[37];let r;e[38]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Widget Name"}),e[38]=r):r=e[38];let a;e[39]!==o||e[40]!==s?(a=b=>o({...s,name:b.target.value}),e[39]=o,e[40]=s,e[41]=a):a=e[41];let n;e[42]!==a||e[43]!==s.name?(n=t.jsxs("div",{children:[r,t.jsx(le,{placeholder:"e.g., Total Tokens",value:s.name,onChange:a})]}),e[42]=a,e[43]=s.name,e[44]=n):n=e[44];let v;e[45]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Type"}),e[45]=v):v=e[45];let y;e[46]!==o||e[47]!==s?(y=b=>{b&&o({...s,type:b,groupBy:b==="table"?s.groupBy:"",interval:b==="timeseries"?s.interval||"1h":""})},e[46]=o,e[47]=s,e[48]=y):y=e[48];let I;e[49]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(Se,{value:"metric",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Metric",children:t.jsx(qe,{size:14})}),e[49]=I):I=e[49];let A;e[50]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Se,{value:"timeseries",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Timeseries",children:t.jsx(_e,{size:14})}),e[50]=A):A=e[50];let ne;e[51]===Symbol.for("react.memo_cache_sentinel")?(ne=t.jsx(Se,{value:"table",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Table",children:t.jsx(Ge,{size:14})}),e[51]=ne):ne=e[51];let W;e[52]!==y||e[53]!==s.type?(W=t.jsxs("div",{children:[v,t.jsxs(Ye,{type:"single",variant:"outline",size:"sm",value:s.type,onValueChange:y,className:"w-full h-10",children:[I,A,ne]})]}),e[52]=y,e[53]=s.type,e[54]=W):W=e[54];let L;e[55]!==n||e[56]!==W?(L=t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n,W]}),e[55]=n,e[56]=W,e[57]=L):L=e[57];let oe;e[58]===Symbol.for("react.memo_cache_sentinel")?(oe=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"JSONPath Expression"}),e[58]=oe):oe=e[58];let V;e[59]!==o||e[60]!==s?(V=b=>o({...s,sourcePath:b.target.value}),e[59]=o,e[60]=s,e[61]=V):V=e[61];let U;e[62]!==V||e[63]!==s.sourcePath?(U=t.jsx(le,{placeholder:"$.usage.total_tokens",value:s.sourcePath,onChange:V,className:"font-mono text-sm"}),e[62]=V,e[63]=s.sourcePath,e[64]=U):U=e[64];let G;e[65]!==s.sourceFrom?(G=t.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Path to extract from tool call ",s.sourceFrom]}),e[65]=s.sourceFrom,e[66]=G):G=e[66];let K;e[67]!==U||e[68]!==G?(K=t.jsxs("div",{children:[oe,U,G]}),e[67]=U,e[68]=G,e[69]=K):K=e[69];let ce;e[70]===Symbol.for("react.memo_cache_sentinel")?(ce=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Extract From"}),e[70]=ce):ce=e[70];let q;e[71]!==o||e[72]!==s?(q=b=>o({...s,sourceFrom:b}),e[71]=o,e[72]=s,e[73]=q):q=e[73];let me;e[74]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(be,{children:t.jsx(ye,{})}),e[74]=me):me=e[74];let de;e[75]===Symbol.for("react.memo_cache_sentinel")?(de=t.jsxs(Ne,{children:[t.jsx(w,{value:"output",children:"Output"}),t.jsx(w,{value:"input",children:"Input"})]}),e[75]=de):de=e[75];let H;e[76]!==q||e[77]!==s.sourceFrom?(H=t.jsxs("div",{children:[ce,t.jsxs(je,{value:s.sourceFrom,onValueChange:q,children:[me,de]})]}),e[76]=q,e[77]=s.sourceFrom,e[78]=H):H=e[78];let ue;e[79]===Symbol.for("react.memo_cache_sentinel")?(ue=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Aggregation"}),e[79]=ue):ue=e[79];let Q;e[80]!==o||e[81]!==s?(Q=b=>o({...s,aggregationFn:b}),e[80]=o,e[81]=s,e[82]=Q):Q=e[82];let xe;e[83]===Symbol.for("react.memo_cache_sentinel")?(xe=t.jsx(be,{children:t.jsx(ye,{})}),e[83]=xe):xe=e[83];let he;e[84]===Symbol.for("react.memo_cache_sentinel")?(he=t.jsxs(Ne,{children:[t.jsx(w,{value:"sum",children:"Sum"}),t.jsx(w,{value:"avg",children:"Average"}),t.jsx(w,{value:"min",children:"Minimum"}),t.jsx(w,{value:"max",children:"Maximum"}),t.jsx(w,{value:"count",children:"Count"}),t.jsx(w,{value:"last",children:"Last"})]}),e[84]=he):he=e[84];let J;e[85]!==Q||e[86]!==s.aggregationFn?(J=t.jsxs("div",{children:[ue,t.jsxs(je,{value:s.aggregationFn,onValueChange:Q,children:[xe,he]})]}),e[85]=Q,e[86]=s.aggregationFn,e[87]=J):J=e[87];let Y;e[88]!==H||e[89]!==J?(Y=t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[H,J]}),e[88]=H,e[89]=J,e[90]=Y):Y=e[90];let Z;e[91]!==o||e[92]!==s?(Z=s.type==="table"&&t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Group By (JSONPath)"}),t.jsx(le,{placeholder:"$.model",value:s.groupBy,onChange:b=>o({...s,groupBy:b.target.value}),className:"font-mono text-sm"})]}),e[91]=o,e[92]=s,e[93]=Z):Z=e[93];let X;e[94]!==o||e[95]!==s?(X=s.type==="timeseries"&&t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Time Interval"}),t.jsxs(je,{value:s.interval||"1h",onValueChange:b=>o({...s,interval:b}),children:[t.jsx(be,{children:t.jsx(ye,{})}),t.jsxs(Ne,{children:[t.jsx(w,{value:"15m",children:"15 minutes"}),t.jsx(w,{value:"1h",children:"1 hour"}),t.jsx(w,{value:"1d",children:"1 day"})]})]})]}),e[94]=o,e[95]=s,e[96]=X):X=e[96];let ee;e[97]!==L||e[98]!==K||e[99]!==Y||e[100]!==Z||e[101]!==X?(ee=t.jsxs("div",{className:"space-y-4",children:[L,K,Y,Z,X]}),e[97]=L,e[98]=K,e[99]=Y,e[100]=Z,e[101]=X,e[102]=ee):ee=e[102];let fe;e[103]===Symbol.for("react.memo_cache_sentinel")?(fe=t.jsx("div",{className:"px-3 py-2 border-b text-xs font-medium text-muted-foreground",children:"Preview (last 24h)"}),e[103]=fe):fe=e[103];let te;e[104]!==f||e[105]!==s?(te=t.jsxs("div",{className:"border rounded-lg bg-muted/20 flex flex-col",children:[fe,t.jsx("div",{className:"p-3 flex-1 flex items-center justify-center",children:f?t.jsx(nt,{result:f,widget:s}):t.jsx("div",{className:"text-sm text-muted-foreground text-center",children:'Click "Preview" to test your aggregation'})})]}),e[104]=f,e[105]=s,e[106]=te):te=e[106];let se;e[107]!==ee||e[108]!==te?(se=t.jsx("div",{className:"p-4",children:t.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[ee,te]})}),e[107]=ee,e[108]=te,e[109]=se):se=e[109];let ge;return e[110]!==R||e[111]!==se?(ge=t.jsxs("div",{className:"border rounded-lg bg-card overflow-hidden",children:[R,se]}),e[110]=R,e[111]=se,e[112]=ge):ge=e[112],ge}function dt({dashboardId:l}){const{org:e,project:s,locator:o}=Ee(),j=Me(),i=$e({connectionId:Ae,orgId:e.id}),d=Oe(),{data:c}=Re({queryKey:ve.monitoringDashboardDetails(o,l),queryFn:async()=>{if(!i)throw new Error("MCP client not available");const r=await i.callTool({name:"MONITORING_DASHBOARD_GET",arguments:{id:l}});return r.structuredContent??r}}),[m,x]=C.useState(c?.name??""),[h,f]=C.useState(c?.description??""),[u,N]=C.useState(c?.widgets?.map(De)??[{...Ce}]),[z,D]=C.useState(!1),[ae,g]=C.useState(!1),[p,k]=C.useState(c?.filters?.connectionIds??[]),[S,F]=C.useState(c?.filters?.toolNames?.[0]??""),[_,P]=C.useState({}),[B,O]=C.useState(new Set),ie=()=>{N([...u,{...Ce,id:crypto.randomUUID()}]),g(!0)},T=r=>{N(u.filter((a,n)=>n!==r)),g(!0)},$=(r,a)=>{const n=[...u];n[r]=a,N(n),g(!0),P(v=>{const y={...v};return delete y[a.id],y})},E=async r=>{if(i){O(a=>new Set(a).add(r.id));try{const a=new Date,n=new Date(a.getTime()-1440*60*1e3),v={};p.length>0&&(v.connectionIds=p),S.trim()&&(v.toolNames=[S.trim()]);const I=(await i.callTool({name:"MONITORING_WIDGET_PREVIEW",arguments:{widget:{type:r.type,source:{path:r.sourcePath,from:r.sourceFrom},aggregation:{fn:r.aggregationFn,groupBy:r.type==="table"&&r.groupBy?r.groupBy:void 0,interval:r.type==="timeseries"&&r.interval?r.interval:void 0},filter:Object.keys(v).length>0?v:void 0},timeRange:{startDate:n.toISOString(),endDate:a.toISOString()}}})).structuredContent;P(A=>({...A,[r.id]:{value:I?.value,groups:I?.groups,timeseries:I?.timeseries,matchedRecords:I?.matchedRecords??0}}))}catch(a){console.error("Preview failed:",a),P(n=>({...n,[r.id]:{error:"Preview failed. Check your JSONPath expression."}}))}finally{O(a=>{const n=new Set(a);return n.delete(r.id),n})}}},M=async()=>{if(i){if(!m.trim()){pe.error("Please enter a dashboard name");return}if(u.some(r=>!r.name.trim())){pe.error("Please enter a name for all widgets");return}D(!0);try{const r={};p.length>0&&(r.connectionIds=p),S.trim()&&(r.toolNames=[S.trim()]),await i.callTool({name:"MONITORING_DASHBOARD_UPDATE",arguments:{id:l,name:m.trim(),description:h.trim()||null,filters:Object.keys(r).length>0?r:null,widgets:u.map(it)}}),pe.success("Dashboard saved"),g(!1),j.invalidateQueries({queryKey:ve.monitoringDashboards(o)}),j.invalidateQueries({queryKey:ve.monitoringDashboardDetails(o,l)})}catch(r){pe.error("Failed to save dashboard"),console.error(r)}finally{D(!1)}}};if(!c)return t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Dashboard not found"});const R=t.jsx(tt,{children:t.jsxs(st,{children:[t.jsx(Pe,{children:t.jsx(rt,{asChild:!0,children:t.jsx(ze,{to:"/$org/$project/monitoring",params:{org:e.slug,project:s.slug},search:{tab:"dashboards"},children:"Monitoring"})})}),t.jsx(lt,{}),t.jsx(Pe,{children:t.jsxs(at,{children:["Edit ",c.name]})})]})});return t.jsxs(Ze,{breadcrumb:R,children:[t.jsx(Xe,{children:t.jsx(et,{onSave:M,onUndo:()=>{x(c?.name??""),f(c?.description??""),N(c?.widgets?.map(De)??[{...Ce}]),k(c?.filters?.connectionIds??[]),F(c?.filters?.toolNames?.[0]??""),g(!1)},isDirty:ae,isSaving:z})}),t.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:t.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Dashboard Name"}),t.jsx(le,{placeholder:"e.g., LLM Usage Overview",value:m,onChange:r=>{x(r.target.value),g(!0)}})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Description"}),t.jsx(le,{placeholder:"What does this dashboard show?",value:h,onChange:r=>{f(r.target.value),g(!0)}})]})]}),t.jsxs("div",{className:"border rounded-lg p-4 bg-muted/30",children:[t.jsxs("h2",{className:"text-sm font-medium mb-3",children:["Dashboard Filters",t.jsx("span",{className:"text-muted-foreground font-normal ml-2",children:"(applied to all widgets)"})]}),t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Servers"}),t.jsxs(Le,{children:[t.jsx(Ve,{asChild:!0,children:t.jsxs(re,{variant:"outline",className:"w-full justify-between font-normal",children:[t.jsx("span",{className:"flex items-center gap-2 truncate",children:p.length===0?t.jsx("span",{className:"text-muted-foreground",children:"All servers"}):t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"flex items-center -space-x-1",children:p.slice(0,3).map(r=>{const a=(d??[]).find(n=>n.id===r);return a?t.jsx(ke,{icon:a.icon,name:a.title||a.id,size:"xs"},r):null})}),t.jsxs("span",{children:[p.length," server",p.length!==1?"s":""]})]})}),t.jsx(Ie,{size:14,className:"text-muted-foreground shrink-0"})]})}),t.jsxs(Ue,{align:"start",className:"w-72 p-1",children:[t.jsx("div",{className:"max-h-[240px] overflow-y-auto",children:(d??[]).map(r=>{const a=p.includes(r.id);return t.jsxs("button",{type:"button",className:"flex items-center gap-3 w-full rounded-md px-2 py-2 text-sm hover:bg-muted transition-colors",onClick:()=>{k(n=>a?n.filter(v=>v!==r.id):[...n,r.id]),g(!0)},children:[t.jsx(We,{checked:a}),t.jsx(ke,{icon:r.icon,name:r.title||r.id,size:"xs"}),t.jsx("span",{className:"truncate",children:r.title||r.id})]},r.id)})}),p.length>0&&t.jsx("div",{className:"border-t p-1",children:t.jsx("button",{type:"button",className:"w-full text-xs text-muted-foreground hover:text-foreground py-1.5 transition-colors",onClick:()=>{k([]),g(!0)},children:"Clear selection"})})]})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Tool Name Filter"}),t.jsx(le,{placeholder:"e.g., openai_chat",value:S,onChange:r=>{F(r.target.value),g(!0)},className:"font-mono text-sm"}),t.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Filter to specific tool names (partial match)"})]})]})]}),t.jsxs("div",{className:"mt-12",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h2",{className:"text-lg font-medium",children:"Widgets"}),t.jsxs(re,{variant:"outline",size:"sm",onClick:ie,children:[t.jsx(Qe,{size:14,className:"mr-1.5"}),"Add Widget"]})]}),t.jsx("div",{className:"space-y-4",children:u.map((r,a)=>t.jsx(mt,{widget:r,onChange:n=>$(a,n),onRemove:()=>T(a),canRemove:u.length>1,onMoveUp:()=>{const n=[...u],v=n[a-1],y=n[a];n[a-1]=y,n[a]=v,N(n),g(!0)},onMoveDown:()=>{const n=[...u],v=n[a],y=n[a+1];n[a]=y,n[a+1]=v,N(n),g(!0)},canMoveUp:a>0,canMoveDown:a<u.length-1,onPreview:()=>E(r),previewResult:_[r.id]??null,isPreviewing:B.has(r.id)},r.id))})]})]})})]})}function Lt(){const l=we.c(5);let e;l[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},l[0]=e):e=l[0];const{dashboardId:s}=Be(e);let o;l[1]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Failed to load dashboard editor"}),l[1]=o):o=l[1];let j;l[2]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Fe,{size:24,className:"animate-spin text-muted-foreground"})}),l[2]=j):j=l[2];let i;return l[3]!==s?(i=t.jsx(Te,{fallback:o,children:t.jsx(C.Suspense,{fallback:j,children:t.jsx(dt,{dashboardId:s})})}),l[3]=s,l[4]=i):i=l[4],i}export{Lt as default};
1
+ import{r as C,c as we,e as Be,j as t,a2 as Fe,E as Te,u as Ee,n as Me,m as Re,K as ve,aF as ze,B as re,t as pe}from"./index-KAycGEnT.js";import{b as Oe}from"./use-connection-DWTVYLGI.js";import{u as $e,a as Ae}from"./constants-CRvMLa9p.js";import{I as le}from"./input-s8rw5Kfa.js";import{I as ke}from"./integration-icon-BAlg7muO.js";import{C as We}from"./checkbox-JiwlvimE.js";import{a as Le,b as Ve,P as Ue}from"./popover-DSO1tjgf.js";import{i as Ge}from"./AlignLeft-CGBbKVHK.js";import{t as Ie}from"./ChevronDown-D04Buvau.js";import{S as je,a as be,b as ye,c as Ne,d as w,n as Ke}from"./select-XWfX294J.js";import{s as qe}from"./Hash02-TG1GIkeV.js";import{i as He}from"./Play-CUMfSU-t.js";import{s as Qe}from"./Plus-CEtl-Eq7.js";import{s as Je}from"./Trash01-c47UOodj.js";import{T as Ye,a as Se}from"./toggle-group-BWymC1w6.js";import{a as Ze,V as Xe}from"./layout-BdJDt40T.js";import{S as et}from"./save-actions-BrexEzhw.js";import{B as tt,a as st,b as Pe,d as rt,e as lt,c as at}from"./breadcrumb-DPLSdTx1.js";import"./use-collections-ROKIiOzV.js";import"./useMutation-Ctk5b8uR.js";import"./Container-CSl1es2V.js";import"./Check-DXoRcZpn.js";import"./index-B7Bu7nQ7.js";import"./index-A_CnuSis.js";import"./localstorage-keys-DK1Id_ip.js";import"./useQuery-DCrAUBx5.js";import"./tooltip-BD36KVkP.js";import"./Save01-BtoFb1Cg.js";import"./Loading01-DF5pxnn8.js";import"./ChevronRight-CkAAxLvD.js";const _e=({size:l=24,color:e="currentColor",...s})=>C.createElement("svg",{viewBox:"0 0 24 24",width:l,height:l,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...s},C.createElement("path",{d:"M8 15v2m4-6v6m4-10v10m-8.2 4h8.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 18.72 21 17.88 21 16.2V7.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C18.72 3 17.88 3 16.2 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 21Z"}));_e.displayName="BarChartSquare02";function De(l){return{id:l.id,name:l.name,type:l.type,sourcePath:l.source.path,sourceFrom:l.source.from,aggregationFn:l.aggregation.fn,groupBy:l.aggregation.groupBy||"",interval:l.aggregation.interval||""}}function it(l){return{id:l.id,name:l.name,type:l.type,source:{path:l.sourcePath,from:l.sourceFrom},aggregation:{fn:l.aggregationFn,groupBy:l.type==="table"&&l.groupBy?l.groupBy:void 0,interval:l.type==="timeseries"&&l.interval?l.interval:void 0}}}const Ce={id:crypto.randomUUID(),name:"",type:"metric",sourcePath:"$.usage.total_tokens",sourceFrom:"output",aggregationFn:"sum",groupBy:"",interval:""};function nt(l){const e=we.c(36),{result:s,widget:o}=l;if(s.error){let i;return e[0]!==s.error?(i=t.jsx("div",{className:"text-sm text-destructive bg-destructive/10 rounded p-3",children:s.error}),e[0]=s.error,e[1]=i):i=e[1],i}if(o.type==="metric"){const i=s.value??0;let d;e[2]!==i?(d=i>=1e6?`${(i/1e6).toFixed(2)}M`:i>=1e3?`${(i/1e3).toFixed(2)}K`:typeof i=="number"?i.toFixed(2):String(i),e[2]=i,e[3]=d):d=e[3];const c=d;let m;e[4]!==c?(m=t.jsx("div",{className:"text-3xl font-bold tabular-nums",children:c}),e[4]=c,e[5]=m):m=e[5];const x=s.matchedRecords??0;let h;e[6]!==x?(h=t.jsxs("div",{className:"text-xs text-muted-foreground mt-1",children:[x," records matched"]}),e[6]=x,e[7]=h):h=e[7];let f;return e[8]!==m||e[9]!==h?(f=t.jsxs("div",{className:"text-center py-4",children:[m,h]}),e[8]=m,e[9]=h,e[10]=f):f=e[10],f}if(o.type==="table"&&s.groups){let i;e[11]===Symbol.for("react.memo_cache_sentinel")?(i=t.jsx("thead",{className:"bg-muted/50 sticky top-0",children:t.jsxs("tr",{children:[t.jsx("th",{className:"text-left px-3 py-1.5 text-xs font-medium",children:"Key"}),t.jsx("th",{className:"text-right px-3 py-1.5 text-xs font-medium",children:"Value"})]})}),e[11]=i):i=e[11];let d;e[12]!==s.groups?(d=s.groups.length===0?t.jsx("tr",{children:t.jsx("td",{colSpan:2,className:"px-3 py-4 text-center text-muted-foreground text-xs",children:"No data"})}):s.groups.slice(0,10).map(ct),e[12]=s.groups,e[13]=d):d=e[13];let c;e[14]!==d?(c=t.jsxs("table",{className:"w-full text-sm",children:[i,t.jsx("tbody",{children:d})]}),e[14]=d,e[15]=c):c=e[15];let m;e[16]!==s.groups.length?(m=s.groups.length>10&&t.jsxs("div",{className:"text-xs text-muted-foreground text-center py-2",children:["+",s.groups.length-10," more rows"]}),e[16]=s.groups.length,e[17]=m):m=e[17];let x;return e[18]!==c||e[19]!==m?(x=t.jsxs("div",{className:"max-h-[200px] overflow-auto",children:[c,m]}),e[18]=c,e[19]=m,e[20]=x):x=e[20],x}if(o.type==="timeseries"&&s.timeseries){let i;e[21]!==s.timeseries?(i=Math.max(...s.timeseries.map(ot),1),e[21]=s.timeseries,e[22]=i):i=e[22];const d=i;let c;if(e[23]!==d||e[24]!==s.timeseries){let f;e[26]!==d?(f=(u,N)=>t.jsx("div",{className:"flex-1 bg-primary/80 rounded-t",style:{height:`${u.value/d*100}%`,minHeight:u.value>0?"2px":"0px"},title:`${new Date(u.timestamp).toLocaleString()}: ${u.value}`},N),e[26]=d,e[27]=f):f=e[27],c=s.timeseries.slice(-24).map(f),e[23]=d,e[24]=s.timeseries,e[25]=c}else c=e[25];let m;e[28]!==c?(m=t.jsx("div",{className:"flex items-end gap-0.5 h-[80px]",children:c}),e[28]=c,e[29]=m):m=e[29];let x;e[30]!==s.timeseries.length?(x=t.jsxs("div",{className:"text-xs text-muted-foreground text-center mt-2",children:[s.timeseries.length," data points"]}),e[30]=s.timeseries.length,e[31]=x):x=e[31];let h;return e[32]!==m||e[33]!==x?(h=t.jsxs("div",{className:"py-2",children:[m,x]}),e[32]=m,e[33]=x,e[34]=h):h=e[34],h}let j;return e[35]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"text-sm text-muted-foreground text-center py-4",children:"No preview data"}),e[35]=j):j=e[35],j}function ot(l){return l.value}function ct(l,e){return t.jsxs("tr",{className:"border-t",children:[t.jsx("td",{className:"px-3 py-1.5 font-mono text-xs",children:l.key}),t.jsx("td",{className:"px-3 py-1.5 text-right tabular-nums text-xs",children:l.value.toLocaleString()})]},e)}function mt(l){const e=we.c(113),{widget:s,onChange:o,onRemove:j,canRemove:i,onMoveUp:d,onMoveDown:c,canMoveUp:m,canMoveDown:x,onPreview:h,previewResult:f,isPreviewing:u}=l,N=!m;let z;e[0]===Symbol.for("react.memo_cache_sentinel")?(z=t.jsx(Ke,{size:14}),e[0]=z):z=e[0];let D;e[1]!==d||e[2]!==N?(D=t.jsx(re,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:d,disabled:N,children:z}),e[1]=d,e[2]=N,e[3]=D):D=e[3];const ae=!x;let g;e[4]===Symbol.for("react.memo_cache_sentinel")?(g=t.jsx(Ie,{size:14}),e[4]=g):g=e[4];let p;e[5]!==c||e[6]!==ae?(p=t.jsx(re,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:c,disabled:ae,children:g}),e[5]=c,e[6]=ae,e[7]=p):p=e[7];let k;e[8]!==D||e[9]!==p?(k=t.jsxs("div",{className:"flex items-center gap-0.5",children:[D,p]}),e[8]=D,e[9]=p,e[10]=k):k=e[10];let S;e[11]!==s.type?(S=t.jsx("span",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wide",children:s.type}),e[11]=s.type,e[12]=S):S=e[12];let F;e[13]!==s.name?(F=s.name&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"text-muted-foreground",children:"·"}),t.jsx("span",{className:"text-sm font-medium",children:s.name})]}),e[13]=s.name,e[14]=F):F=e[14];let _;e[15]!==k||e[16]!==S||e[17]!==F?(_=t.jsxs("div",{className:"flex items-center gap-2",children:[k,S,F]}),e[15]=k,e[16]=S,e[17]=F,e[18]=_):_=e[18];let P;e[19]!==u?(P=u?t.jsx(Fe,{size:14,className:"animate-spin"}):t.jsx(He,{size:14}),e[19]=u,e[20]=P):P=e[20];let B;e[21]!==u||e[22]!==h||e[23]!==P?(B=t.jsx(re,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:h,disabled:u,children:P}),e[21]=u,e[22]=h,e[23]=P,e[24]=B):B=e[24];const O=!i,ie=i?"visible":"hidden";let T;e[25]!==ie?(T={visibility:ie},e[25]=ie,e[26]=T):T=e[26];let $;e[27]===Symbol.for("react.memo_cache_sentinel")?($=t.jsx(Je,{size:14}),e[27]=$):$=e[27];let E;e[28]!==j||e[29]!==O||e[30]!==T?(E=t.jsx(re,{variant:"ghost",size:"icon",className:"h-7 w-7",onClick:j,disabled:O,style:T,children:$}),e[28]=j,e[29]=O,e[30]=T,e[31]=E):E=e[31];let M;e[32]!==B||e[33]!==E?(M=t.jsxs("div",{className:"flex items-center gap-1",children:[B,E]}),e[32]=B,e[33]=E,e[34]=M):M=e[34];let R;e[35]!==_||e[36]!==M?(R=t.jsxs("div",{className:"flex items-center justify-between px-4 h-11 border-b bg-muted/30",children:[_,M]}),e[35]=_,e[36]=M,e[37]=R):R=e[37];let r;e[38]===Symbol.for("react.memo_cache_sentinel")?(r=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Widget Name"}),e[38]=r):r=e[38];let a;e[39]!==o||e[40]!==s?(a=b=>o({...s,name:b.target.value}),e[39]=o,e[40]=s,e[41]=a):a=e[41];let n;e[42]!==a||e[43]!==s.name?(n=t.jsxs("div",{children:[r,t.jsx(le,{placeholder:"e.g., Total Tokens",value:s.name,onChange:a})]}),e[42]=a,e[43]=s.name,e[44]=n):n=e[44];let v;e[45]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Type"}),e[45]=v):v=e[45];let y;e[46]!==o||e[47]!==s?(y=b=>{b&&o({...s,type:b,groupBy:b==="table"?s.groupBy:"",interval:b==="timeseries"?s.interval||"1h":""})},e[46]=o,e[47]=s,e[48]=y):y=e[48];let I;e[49]===Symbol.for("react.memo_cache_sentinel")?(I=t.jsx(Se,{value:"metric",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Metric",children:t.jsx(qe,{size:14})}),e[49]=I):I=e[49];let A;e[50]===Symbol.for("react.memo_cache_sentinel")?(A=t.jsx(Se,{value:"timeseries",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Timeseries",children:t.jsx(_e,{size:14})}),e[50]=A):A=e[50];let ne;e[51]===Symbol.for("react.memo_cache_sentinel")?(ne=t.jsx(Se,{value:"table",className:"flex-1 h-full data-[state=on]:!bg-accent/70","aria-label":"Table",children:t.jsx(Ge,{size:14})}),e[51]=ne):ne=e[51];let W;e[52]!==y||e[53]!==s.type?(W=t.jsxs("div",{children:[v,t.jsxs(Ye,{type:"single",variant:"outline",size:"sm",value:s.type,onValueChange:y,className:"w-full h-10",children:[I,A,ne]})]}),e[52]=y,e[53]=s.type,e[54]=W):W=e[54];let L;e[55]!==n||e[56]!==W?(L=t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[n,W]}),e[55]=n,e[56]=W,e[57]=L):L=e[57];let oe;e[58]===Symbol.for("react.memo_cache_sentinel")?(oe=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"JSONPath Expression"}),e[58]=oe):oe=e[58];let V;e[59]!==o||e[60]!==s?(V=b=>o({...s,sourcePath:b.target.value}),e[59]=o,e[60]=s,e[61]=V):V=e[61];let U;e[62]!==V||e[63]!==s.sourcePath?(U=t.jsx(le,{placeholder:"$.usage.total_tokens",value:s.sourcePath,onChange:V,className:"font-mono text-sm"}),e[62]=V,e[63]=s.sourcePath,e[64]=U):U=e[64];let G;e[65]!==s.sourceFrom?(G=t.jsxs("p",{className:"text-xs text-muted-foreground mt-1",children:["Path to extract from tool call ",s.sourceFrom]}),e[65]=s.sourceFrom,e[66]=G):G=e[66];let K;e[67]!==U||e[68]!==G?(K=t.jsxs("div",{children:[oe,U,G]}),e[67]=U,e[68]=G,e[69]=K):K=e[69];let ce;e[70]===Symbol.for("react.memo_cache_sentinel")?(ce=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Extract From"}),e[70]=ce):ce=e[70];let q;e[71]!==o||e[72]!==s?(q=b=>o({...s,sourceFrom:b}),e[71]=o,e[72]=s,e[73]=q):q=e[73];let me;e[74]===Symbol.for("react.memo_cache_sentinel")?(me=t.jsx(be,{children:t.jsx(ye,{})}),e[74]=me):me=e[74];let de;e[75]===Symbol.for("react.memo_cache_sentinel")?(de=t.jsxs(Ne,{children:[t.jsx(w,{value:"output",children:"Output"}),t.jsx(w,{value:"input",children:"Input"})]}),e[75]=de):de=e[75];let H;e[76]!==q||e[77]!==s.sourceFrom?(H=t.jsxs("div",{children:[ce,t.jsxs(je,{value:s.sourceFrom,onValueChange:q,children:[me,de]})]}),e[76]=q,e[77]=s.sourceFrom,e[78]=H):H=e[78];let ue;e[79]===Symbol.for("react.memo_cache_sentinel")?(ue=t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Aggregation"}),e[79]=ue):ue=e[79];let Q;e[80]!==o||e[81]!==s?(Q=b=>o({...s,aggregationFn:b}),e[80]=o,e[81]=s,e[82]=Q):Q=e[82];let xe;e[83]===Symbol.for("react.memo_cache_sentinel")?(xe=t.jsx(be,{children:t.jsx(ye,{})}),e[83]=xe):xe=e[83];let he;e[84]===Symbol.for("react.memo_cache_sentinel")?(he=t.jsxs(Ne,{children:[t.jsx(w,{value:"sum",children:"Sum"}),t.jsx(w,{value:"avg",children:"Average"}),t.jsx(w,{value:"min",children:"Minimum"}),t.jsx(w,{value:"max",children:"Maximum"}),t.jsx(w,{value:"count",children:"Count"}),t.jsx(w,{value:"last",children:"Last"})]}),e[84]=he):he=e[84];let J;e[85]!==Q||e[86]!==s.aggregationFn?(J=t.jsxs("div",{children:[ue,t.jsxs(je,{value:s.aggregationFn,onValueChange:Q,children:[xe,he]})]}),e[85]=Q,e[86]=s.aggregationFn,e[87]=J):J=e[87];let Y;e[88]!==H||e[89]!==J?(Y=t.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[H,J]}),e[88]=H,e[89]=J,e[90]=Y):Y=e[90];let Z;e[91]!==o||e[92]!==s?(Z=s.type==="table"&&t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Group By (JSONPath)"}),t.jsx(le,{placeholder:"$.model",value:s.groupBy,onChange:b=>o({...s,groupBy:b.target.value}),className:"font-mono text-sm"})]}),e[91]=o,e[92]=s,e[93]=Z):Z=e[93];let X;e[94]!==o||e[95]!==s?(X=s.type==="timeseries"&&t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Time Interval"}),t.jsxs(je,{value:s.interval||"1h",onValueChange:b=>o({...s,interval:b}),children:[t.jsx(be,{children:t.jsx(ye,{})}),t.jsxs(Ne,{children:[t.jsx(w,{value:"15m",children:"15 minutes"}),t.jsx(w,{value:"1h",children:"1 hour"}),t.jsx(w,{value:"1d",children:"1 day"})]})]})]}),e[94]=o,e[95]=s,e[96]=X):X=e[96];let ee;e[97]!==L||e[98]!==K||e[99]!==Y||e[100]!==Z||e[101]!==X?(ee=t.jsxs("div",{className:"space-y-4",children:[L,K,Y,Z,X]}),e[97]=L,e[98]=K,e[99]=Y,e[100]=Z,e[101]=X,e[102]=ee):ee=e[102];let fe;e[103]===Symbol.for("react.memo_cache_sentinel")?(fe=t.jsx("div",{className:"px-3 py-2 border-b text-xs font-medium text-muted-foreground",children:"Preview (last 24h)"}),e[103]=fe):fe=e[103];let te;e[104]!==f||e[105]!==s?(te=t.jsxs("div",{className:"border rounded-lg bg-muted/20 flex flex-col",children:[fe,t.jsx("div",{className:"p-3 flex-1 flex items-center justify-center",children:f?t.jsx(nt,{result:f,widget:s}):t.jsx("div",{className:"text-sm text-muted-foreground text-center",children:'Click "Preview" to test your aggregation'})})]}),e[104]=f,e[105]=s,e[106]=te):te=e[106];let se;e[107]!==ee||e[108]!==te?(se=t.jsx("div",{className:"p-4",children:t.jsxs("div",{className:"grid grid-cols-2 gap-6",children:[ee,te]})}),e[107]=ee,e[108]=te,e[109]=se):se=e[109];let ge;return e[110]!==R||e[111]!==se?(ge=t.jsxs("div",{className:"border rounded-lg bg-card overflow-hidden",children:[R,se]}),e[110]=R,e[111]=se,e[112]=ge):ge=e[112],ge}function dt({dashboardId:l}){const{org:e,project:s,locator:o}=Ee(),j=Me(),i=$e({connectionId:Ae,orgId:e.id}),d=Oe(),{data:c}=Re({queryKey:ve.monitoringDashboardDetails(o,l),queryFn:async()=>{if(!i)throw new Error("MCP client not available");const r=await i.callTool({name:"MONITORING_DASHBOARD_GET",arguments:{id:l}});return r.structuredContent??r}}),[m,x]=C.useState(c?.name??""),[h,f]=C.useState(c?.description??""),[u,N]=C.useState(c?.widgets?.map(De)??[{...Ce}]),[z,D]=C.useState(!1),[ae,g]=C.useState(!1),[p,k]=C.useState(c?.filters?.connectionIds??[]),[S,F]=C.useState(c?.filters?.toolNames?.[0]??""),[_,P]=C.useState({}),[B,O]=C.useState(new Set),ie=()=>{N([...u,{...Ce,id:crypto.randomUUID()}]),g(!0)},T=r=>{N(u.filter((a,n)=>n!==r)),g(!0)},$=(r,a)=>{const n=[...u];n[r]=a,N(n),g(!0),P(v=>{const y={...v};return delete y[a.id],y})},E=async r=>{if(i){O(a=>new Set(a).add(r.id));try{const a=new Date,n=new Date(a.getTime()-1440*60*1e3),v={};p.length>0&&(v.connectionIds=p),S.trim()&&(v.toolNames=[S.trim()]);const I=(await i.callTool({name:"MONITORING_WIDGET_PREVIEW",arguments:{widget:{type:r.type,source:{path:r.sourcePath,from:r.sourceFrom},aggregation:{fn:r.aggregationFn,groupBy:r.type==="table"&&r.groupBy?r.groupBy:void 0,interval:r.type==="timeseries"&&r.interval?r.interval:void 0},filter:Object.keys(v).length>0?v:void 0},timeRange:{startDate:n.toISOString(),endDate:a.toISOString()}}})).structuredContent;P(A=>({...A,[r.id]:{value:I?.value,groups:I?.groups,timeseries:I?.timeseries,matchedRecords:I?.matchedRecords??0}}))}catch(a){console.error("Preview failed:",a),P(n=>({...n,[r.id]:{error:"Preview failed. Check your JSONPath expression."}}))}finally{O(a=>{const n=new Set(a);return n.delete(r.id),n})}}},M=async()=>{if(i){if(!m.trim()){pe.error("Please enter a dashboard name");return}if(u.some(r=>!r.name.trim())){pe.error("Please enter a name for all widgets");return}D(!0);try{const r={};p.length>0&&(r.connectionIds=p),S.trim()&&(r.toolNames=[S.trim()]),await i.callTool({name:"MONITORING_DASHBOARD_UPDATE",arguments:{id:l,name:m.trim(),description:h.trim()||null,filters:Object.keys(r).length>0?r:null,widgets:u.map(it)}}),pe.success("Dashboard saved"),g(!1),j.invalidateQueries({queryKey:ve.monitoringDashboards(o)}),j.invalidateQueries({queryKey:ve.monitoringDashboardDetails(o,l)})}catch(r){pe.error("Failed to save dashboard"),console.error(r)}finally{D(!1)}}};if(!c)return t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Dashboard not found"});const R=t.jsx(tt,{children:t.jsxs(st,{children:[t.jsx(Pe,{children:t.jsx(rt,{asChild:!0,children:t.jsx(ze,{to:"/$org/$project/monitoring",params:{org:e.slug,project:s.slug},search:{tab:"dashboards"},children:"Monitoring"})})}),t.jsx(lt,{}),t.jsx(Pe,{children:t.jsxs(at,{children:["Edit ",c.name]})})]})});return t.jsxs(Ze,{breadcrumb:R,children:[t.jsx(Xe,{children:t.jsx(et,{onSave:M,onUndo:()=>{x(c?.name??""),f(c?.description??""),N(c?.widgets?.map(De)??[{...Ce}]),k(c?.filters?.connectionIds??[]),F(c?.filters?.toolNames?.[0]??""),g(!1)},isDirty:ae,isSaving:z})}),t.jsx("div",{className:"flex-1 overflow-y-auto p-6",children:t.jsxs("div",{className:"max-w-4xl mx-auto space-y-6",children:[t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Dashboard Name"}),t.jsx(le,{placeholder:"e.g., LLM Usage Overview",value:m,onChange:r=>{x(r.target.value),g(!0)}})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Description"}),t.jsx(le,{placeholder:"What does this dashboard show?",value:h,onChange:r=>{f(r.target.value),g(!0)}})]})]}),t.jsxs("div",{className:"border rounded-lg p-4 bg-muted/30",children:[t.jsxs("h2",{className:"text-sm font-medium mb-3",children:["Dashboard Filters",t.jsx("span",{className:"text-muted-foreground font-normal ml-2",children:"(applied to all widgets)"})]}),t.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Servers"}),t.jsxs(Le,{children:[t.jsx(Ve,{asChild:!0,children:t.jsxs(re,{variant:"outline",className:"w-full justify-between font-normal",children:[t.jsx("span",{className:"flex items-center gap-2 truncate",children:p.length===0?t.jsx("span",{className:"text-muted-foreground",children:"All servers"}):t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"flex items-center -space-x-1",children:p.slice(0,3).map(r=>{const a=(d??[]).find(n=>n.id===r);return a?t.jsx(ke,{icon:a.icon,name:a.title||a.id,size:"xs"},r):null})}),t.jsxs("span",{children:[p.length," server",p.length!==1?"s":""]})]})}),t.jsx(Ie,{size:14,className:"text-muted-foreground shrink-0"})]})}),t.jsxs(Ue,{align:"start",className:"w-72 p-1",children:[t.jsx("div",{className:"max-h-[240px] overflow-y-auto",children:(d??[]).map(r=>{const a=p.includes(r.id);return t.jsxs("button",{type:"button",className:"flex items-center gap-3 w-full rounded-md px-2 py-2 text-sm hover:bg-muted transition-colors",onClick:()=>{k(n=>a?n.filter(v=>v!==r.id):[...n,r.id]),g(!0)},children:[t.jsx(We,{checked:a}),t.jsx(ke,{icon:r.icon,name:r.title||r.id,size:"xs"}),t.jsx("span",{className:"truncate",children:r.title||r.id})]},r.id)})}),p.length>0&&t.jsx("div",{className:"border-t p-1",children:t.jsx("button",{type:"button",className:"w-full text-xs text-muted-foreground hover:text-foreground py-1.5 transition-colors",onClick:()=>{k([]),g(!0)},children:"Clear selection"})})]})]})]}),t.jsxs("div",{children:[t.jsx("label",{className:"text-sm font-medium block mb-1.5",children:"Tool Name Filter"}),t.jsx(le,{placeholder:"e.g., openai_chat",value:S,onChange:r=>{F(r.target.value),g(!0)},className:"font-mono text-sm"}),t.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Filter to specific tool names (partial match)"})]})]})]}),t.jsxs("div",{className:"mt-12",children:[t.jsxs("div",{className:"flex items-center justify-between mb-4",children:[t.jsx("h2",{className:"text-lg font-medium",children:"Widgets"}),t.jsxs(re,{variant:"outline",size:"sm",onClick:ie,children:[t.jsx(Qe,{size:14,className:"mr-1.5"}),"Add Widget"]})]}),t.jsx("div",{className:"space-y-4",children:u.map((r,a)=>t.jsx(mt,{widget:r,onChange:n=>$(a,n),onRemove:()=>T(a),canRemove:u.length>1,onMoveUp:()=>{const n=[...u],v=n[a-1],y=n[a];n[a-1]=y,n[a]=v,N(n),g(!0)},onMoveDown:()=>{const n=[...u],v=n[a],y=n[a+1];n[a]=y,n[a+1]=v,N(n),g(!0)},canMoveUp:a>0,canMoveDown:a<u.length-1,onPreview:()=>E(r),previewResult:_[r.id]??null,isPreviewing:B.has(r.id)},r.id))})]})]})})]})}function Lt(){const l=we.c(5);let e;l[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},l[0]=e):e=l[0];const{dashboardId:s}=Be(e);let o;l[1]===Symbol.for("react.memo_cache_sentinel")?(o=t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Failed to load dashboard editor"}),l[1]=o):o=l[1];let j;l[2]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(Fe,{size:24,className:"animate-spin text-muted-foreground"})}),l[2]=j):j=l[2];let i;return l[3]!==s?(i=t.jsx(Te,{fallback:o,children:t.jsx(C.Suspense,{fallback:j,children:t.jsx(dt,{dashboardId:s})})}),l[3]=s,l[4]=i):i=l[4],i}export{Lt as default};
@@ -1,4 +1,4 @@
1
- import{r as F,j as t,B as R,c as D,n as xe,a2 as re,E as ge,u as fe,m as ne,K as oe,aF as pe,e as he,b as je}from"./index-pgKDpBki.js";import{a as be,u as ye}from"./constants-Dm_YJHHh.js";import{p as ee,a as ce,s as ve,b as Ne,e as me,T as we}from"./time-range-picker-Bd4ADfiZ.js";import{i as ke}from"./Edit05-Aay9qpeK.js";import{V as Se,a as Ce}from"./layout-YIwjbnTp.js";import{b as de,c as Fe,d as $e,e as Re,B as De,a as Te}from"./breadcrumb-CujpR_MZ.js";import{B as _e}from"./badge-BvxQUv5d.js";import{I as ue}from"./input-BJSjp7-P.js";import{a as Pe,b as Ie,P as Me}from"./popover-CKnAPgyb.js";import{S as ze,a as Be,b as Ee,c as Oe,d as Ae}from"./select-MKaUo6o5.js";import{T as Ke}from"./textarea-BvpI-WDT.js";import{T as Le,a as Ve,b as qe}from"./tooltip-DH8hxvf2.js";import{i as Qe}from"./Code01-Dr2rEb4l.js";import{i as We}from"./FilterLines-BpgGX9yW.js";import{c as Ge}from"./Grid01-BTxljTvU.js";import{s as He}from"./Plus-D8K5219B.js";import{s as Ye}from"./Trash01-BUR32hk8.js";import{s as Ue}from"./XClose-Dj2rcAfJ.js";import"./Check-Bra2mpbB.js";import"./Copy01-wvio6GZB.js";import"./Download01-Cgcu3XsW.js";import"./Key01-DCAZcJB7.js";import"./Play-DYKv-3LY.js";import"./monaco-editor-cmFLTFFa.js";import"./spinner-_SEN9vi4.js";import"./scroll-area-C7Jh7ETR.js";import"./ChevronDown-DaSct-5t.js";import"./Clock-C-pPW7F3.js";import"./ChevronLeft-DgayRUs6.js";import"./ChevronRight-CIJzl8ei.js";import"./index-CVG_d4yA.js";import"./localstorage-keys-DBdiYnka.js";import"./useQuery-D2_PHjUY.js";import"./useMutation-B1zBeDkg.js";import"./index-D18UlrU_.js";const Je=[{value:"eq",label:"equals"},{value:"contains",label:"contains"},{value:"in",label:"in (list)"},{value:"exists",label:"exists"}];function Xe({value:s,onChange:e}){const[r,i]=F.useState(!1),[l,n]=F.useState("raw"),[c,o]=F.useState(s),[m,d]=F.useState(ee(s)),g=F.useRef(s);g.current!==s&&(g.current=s,o(s),d(ee(s)));const f=()=>{e(c.filter(a=>a.key.trim()))},p=()=>{const a=ce(m);o(a),e(a)},j=()=>{if(l==="raw"){const a=ce(m);o(a),n("form")}else d(ee(c)),n("raw")},v=(a,x)=>{const u=[...c],h=u[a];h&&(u[a]={key:x.key??h.key,operator:x.operator??h.operator,value:x.value??h.value},o(u))},b=()=>{o([...c,{key:"",operator:"eq",value:""}])},w=a=>{const x=c.filter((u,h)=>h!==a);o(x),d(ee(x)),e(x.filter(u=>u.key.trim()))},y=()=>{o([]),d(""),e([]),i(!1)},k=s.filter(a=>a.key.trim()).length;return t.jsxs("div",{className:"flex items-center gap-1.5",children:[s.filter(a=>a.key.trim()).map((a,x)=>{const u=a.operator==="exists"?`${a.key}?`:a.operator==="contains"?`${a.key}~${a.value}`:a.operator==="in"?`${a.key}@${a.value}`:`${a.key}=${a.value}`;return t.jsxs(_e,{variant:"secondary",className:"gap-1 pl-2 pr-1 h-7 text-xs font-mono font-normal cursor-default",children:[u,t.jsx("button",{type:"button",className:"ml-0.5 rounded-full p-0.5 hover:bg-muted-foreground/20 transition-colors",onClick:()=>{const h=s.filter((C,$)=>$!==x);e(h)},children:t.jsx(Ue,{size:12})})]},`${a.key}-${x}`)}),t.jsxs(Pe,{open:r,onOpenChange:i,children:[t.jsx(Ie,{asChild:!0,children:t.jsxs(R,{variant:"outline",size:"sm",className:"h-7 px-2 gap-1.5",children:[t.jsx(We,{className:"h-3.5 w-3.5 text-muted-foreground"}),k===0?t.jsx("span",{className:"text-sm",children:"Filter"}):t.jsx("span",{className:"text-sm",children:k})]})}),t.jsxs(Me,{className:"w-[380px] p-4",align:"end",sideOffset:4,children:[t.jsxs("div",{className:"flex items-center justify-between mb-3",children:[t.jsx("h4",{className:"text-sm font-medium",children:"Property Filters"}),t.jsxs(Le,{children:[t.jsx(Ve,{asChild:!0,children:t.jsx(R,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:j,children:l==="raw"?t.jsx(Ge,{size:14}):t.jsx(Qe,{size:14})})}),t.jsx(qe,{children:l==="raw"?"Switch to form view":"Switch to raw text"})]})]}),l==="raw"?t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(Ke,{placeholder:`Paste property filters here:
1
+ import{r as F,j as t,B as R,c as D,n as xe,a2 as re,E as ge,u as fe,m as ne,K as oe,aF as pe,e as he,b as je}from"./index-KAycGEnT.js";import{a as be,u as ye}from"./constants-CRvMLa9p.js";import{p as ee,a as ce,s as ve,b as Ne,e as me,T as we}from"./time-range-picker-C2BX3Ytm.js";import{i as ke}from"./Edit05-BUQBpzoO.js";import{V as Se,a as Ce}from"./layout-BdJDt40T.js";import{b as de,c as Fe,d as $e,e as Re,B as De,a as Te}from"./breadcrumb-DPLSdTx1.js";import{B as _e}from"./badge-DtcA_2rB.js";import{I as ue}from"./input-s8rw5Kfa.js";import{a as Pe,b as Ie,P as Me}from"./popover-DSO1tjgf.js";import{S as ze,a as Be,b as Ee,c as Oe,d as Ae}from"./select-XWfX294J.js";import{T as Ke}from"./textarea-CKFVaVym.js";import{T as Le,a as Ve,b as qe}from"./tooltip-BD36KVkP.js";import{i as Qe}from"./Code01-BLJKgev-.js";import{i as We}from"./FilterLines-CsjQLyQm.js";import{c as Ge}from"./Grid01-Ju9gLjOW.js";import{s as He}from"./Plus-CEtl-Eq7.js";import{s as Ye}from"./Trash01-c47UOodj.js";import{s as Ue}from"./XClose-BIpOBHWg.js";import"./Check-DXoRcZpn.js";import"./Copy01-B4eRdmVC.js";import"./Download01-DDnPOFFT.js";import"./Key01-9PzzeBlc.js";import"./Play-CUMfSU-t.js";import"./monaco-editor-BGkR3-IA.js";import"./spinner-CQhhuHCn.js";import"./scroll-area-BoIKmmj_.js";import"./ChevronDown-D04Buvau.js";import"./Clock-DwwOuQI4.js";import"./ChevronLeft-C8cqrSli.js";import"./ChevronRight-CkAAxLvD.js";import"./index-A_CnuSis.js";import"./localstorage-keys-DK1Id_ip.js";import"./useQuery-DCrAUBx5.js";import"./useMutation-Ctk5b8uR.js";import"./index-B7Bu7nQ7.js";const Je=[{value:"eq",label:"equals"},{value:"contains",label:"contains"},{value:"in",label:"in (list)"},{value:"exists",label:"exists"}];function Xe({value:s,onChange:e}){const[r,i]=F.useState(!1),[l,n]=F.useState("raw"),[c,o]=F.useState(s),[m,d]=F.useState(ee(s)),g=F.useRef(s);g.current!==s&&(g.current=s,o(s),d(ee(s)));const f=()=>{e(c.filter(a=>a.key.trim()))},p=()=>{const a=ce(m);o(a),e(a)},j=()=>{if(l==="raw"){const a=ce(m);o(a),n("form")}else d(ee(c)),n("raw")},v=(a,x)=>{const u=[...c],h=u[a];h&&(u[a]={key:x.key??h.key,operator:x.operator??h.operator,value:x.value??h.value},o(u))},b=()=>{o([...c,{key:"",operator:"eq",value:""}])},w=a=>{const x=c.filter((u,h)=>h!==a);o(x),d(ee(x)),e(x.filter(u=>u.key.trim()))},y=()=>{o([]),d(""),e([]),i(!1)},k=s.filter(a=>a.key.trim()).length;return t.jsxs("div",{className:"flex items-center gap-1.5",children:[s.filter(a=>a.key.trim()).map((a,x)=>{const u=a.operator==="exists"?`${a.key}?`:a.operator==="contains"?`${a.key}~${a.value}`:a.operator==="in"?`${a.key}@${a.value}`:`${a.key}=${a.value}`;return t.jsxs(_e,{variant:"secondary",className:"gap-1 pl-2 pr-1 h-7 text-xs font-mono font-normal cursor-default",children:[u,t.jsx("button",{type:"button",className:"ml-0.5 rounded-full p-0.5 hover:bg-muted-foreground/20 transition-colors",onClick:()=>{const h=s.filter((C,$)=>$!==x);e(h)},children:t.jsx(Ue,{size:12})})]},`${a.key}-${x}`)}),t.jsxs(Pe,{open:r,onOpenChange:i,children:[t.jsx(Ie,{asChild:!0,children:t.jsxs(R,{variant:"outline",size:"sm",className:"h-7 px-2 gap-1.5",children:[t.jsx(We,{className:"h-3.5 w-3.5 text-muted-foreground"}),k===0?t.jsx("span",{className:"text-sm",children:"Filter"}):t.jsx("span",{className:"text-sm",children:k})]})}),t.jsxs(Me,{className:"w-[380px] p-4",align:"end",sideOffset:4,children:[t.jsxs("div",{className:"flex items-center justify-between mb-3",children:[t.jsx("h4",{className:"text-sm font-medium",children:"Property Filters"}),t.jsxs(Le,{children:[t.jsx(Ve,{asChild:!0,children:t.jsx(R,{variant:"ghost",size:"icon",className:"h-6 w-6",onClick:j,children:l==="raw"?t.jsx(Ge,{size:14}):t.jsx(Qe,{size:14})})}),t.jsx(qe,{children:l==="raw"?"Switch to form view":"Switch to raw text"})]})]}),l==="raw"?t.jsxs("div",{className:"space-y-1.5",children:[t.jsx(Ke,{placeholder:`Paste property filters here:
2
2
  thread_id=abc123
3
3
  user~test
4
4
  debug?`,value:m,onChange:a=>d(a.target.value),onBlur:p,onKeyDown:a=>{a.key==="Enter"&&a.metaKey&&p()},className:"font-mono text-sm min-h-[80px] resize-none"}),t.jsxs("p",{className:"text-xs text-muted-foreground",children:["One per line:"," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key=value"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key~contains"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key@in_list"})," ",t.jsx("code",{className:"bg-muted px-1 rounded",children:"key?"})]})]}):t.jsxs("div",{className:"space-y-3",children:[c.map((a,x)=>t.jsxs("div",{className:"p-2.5 rounded-md border border-border bg-muted/30 space-y-2",children:[t.jsxs("div",{className:"flex items-center justify-between",children:[t.jsxs("span",{className:"text-xs text-muted-foreground",children:["Filter ",x+1]}),t.jsx(R,{variant:"ghost",size:"icon",className:"h-6 w-6 text-muted-foreground hover:text-destructive",onClick:()=>w(x),children:t.jsx(Ye,{size:12})})]}),t.jsxs("div",{className:"flex gap-2",children:[t.jsx(ue,{placeholder:"Key (e.g., thread_id)",value:a.key,onChange:u=>v(x,{key:u.target.value}),onBlur:f,onKeyDown:u=>{u.key==="Enter"&&f()},className:"flex-1 font-mono text-sm"}),t.jsxs(ze,{value:a.operator,onValueChange:u=>{const h=[...c],C=h[x];C&&(h[x]={...C,operator:u,value:u==="exists"?"":C.value},o(h),e(h.filter($=>$.key.trim())))},children:[t.jsx(Be,{className:"w-28",children:t.jsx(Ee,{})}),t.jsx(Oe,{children:Je.map(u=>t.jsx(Ae,{value:u.value,children:u.label},u.value))})]})]}),a.operator!=="exists"&&t.jsx(ue,{placeholder:"Value",value:a.value,onChange:u=>v(x,{value:u.target.value}),onBlur:f,onKeyDown:u=>{u.key==="Enter"&&f()},className:"w-full font-mono text-sm"})]},x)),t.jsxs(R,{variant:"outline",size:"sm",className:"w-full",onClick:b,children:[t.jsx(He,{size:14,className:"mr-1.5"}),"Add filter"]})]}),k>0&&t.jsx(R,{variant:"ghost",size:"sm",className:"w-full mt-3 text-muted-foreground",onClick:y,children:"Clear all filters"})]})]})]})}function G(s,e){return e||Number.isInteger(s)?s>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(1)}K`:s.toLocaleString():s>=1e6?`${(s/1e6).toFixed(2)}M`:s>=1e3?`${(s/1e3).toFixed(2)}K`:s.toFixed(2)}function ae(s){return{sum:"Total",avg:"Average",min:"Minimum",max:"Maximum",count:"Count",last:"Latest"}[s]??s}function le(s){const e=D.c(7),{name:r,subtitle:i}=s;let l;e[0]!==r?(l=t.jsx("div",{className:"text-sm font-medium text-foreground",children:r}),e[0]=r,e[1]=l):l=e[1];let n;e[2]!==i?(n=t.jsx("div",{className:"text-xs text-muted-foreground",children:i}),e[2]=i,e[3]=n):n=e[3];let c;return e[4]!==l||e[5]!==n?(c=t.jsxs("div",{className:"px-4 py-3",children:[l,n]}),e[4]=l,e[5]=n,e[6]=c):c=e[6],c}function Ze(s){const e=D.c(13),{widget:r,result:i}=s,l=i?.value??0,n=r.aggregation.fn==="count",c=r.name;let o;e[0]!==r.aggregation.fn?(o=ae(r.aggregation.fn),e[0]=r.aggregation.fn,e[1]=o):o=e[1];let m;e[2]!==o||e[3]!==r.name?(m=t.jsx(le,{name:c,subtitle:o}),e[2]=o,e[3]=r.name,e[4]=m):m=e[4];let d;e[5]!==n||e[6]!==l?(d=G(l,n),e[5]=n,e[6]=l,e[7]=d):d=e[7];let g;e[8]!==d?(g=t.jsx("div",{className:"px-4 pb-4 mt-auto",children:t.jsx("div",{className:"text-4xl font-bold tabular-nums",children:d})}),e[8]=d,e[9]=g):g=e[9];let f;return e[10]!==m||e[11]!==g?(f=t.jsxs("div",{className:"border rounded-lg bg-card flex flex-col h-full",children:[m,g]}),e[10]=m,e[11]=g,e[12]=f):f=e[12],f}function et(s){const e=D.c(15),{widget:r,result:i}=s;let l,n;e[0]!==i?.groups?(l=i?.groups??[],n=Math.max(...l.map(tt),1),e[0]=i?.groups,e[1]=l,e[2]=n):(l=e[1],n=e[2]);const c=n;let o;e[3]!==r.aggregation.fn||e[4]!==r.aggregation.groupBy?(o=r.aggregation.groupBy?`Grouped by ${r.aggregation.groupBy}`:ae(r.aggregation.fn),e[3]=r.aggregation.fn,e[4]=r.aggregation.groupBy,e[5]=o):o=e[5];let m;e[6]!==o||e[7]!==r.name?(m=t.jsx(le,{name:r.name,subtitle:o}),e[6]=o,e[7]=r.name,e[8]=m):m=e[8];let d;e[9]!==l||e[10]!==c?(d=t.jsx("div",{className:"max-h-[300px] overflow-auto",children:l.length===0?t.jsx("div",{className:"px-4 py-8 text-center text-sm text-muted-foreground",children:"No data available for this query"}):t.jsx("div",{className:"divide-y",children:l.map(f=>t.jsxs("div",{className:"flex items-center gap-3 px-4 py-2",children:[t.jsx("span",{className:"text-sm truncate flex-1 min-w-0",children:f.key||"(empty)"}),t.jsxs("div",{className:"flex items-center gap-2 shrink-0 w-32",children:[t.jsx("div",{className:"flex-1 h-1.5 bg-muted rounded-full overflow-hidden",children:t.jsx("div",{className:"h-full bg-primary rounded-full",style:{width:`${f.value/c*100}%`}})}),t.jsx("span",{className:"text-xs tabular-nums text-muted-foreground w-10 text-right",children:G(f.value,!0)})]})]},f.key))})}),e[9]=l,e[10]=c,e[11]=d):d=e[11];let g;return e[12]!==m||e[13]!==d?(g=t.jsxs("div",{className:"border rounded-lg bg-card overflow-hidden flex flex-col h-full",children:[m,d]}),e[12]=m,e[13]=d,e[14]=g):g=e[14],g}function tt(s){return s.value}function st(s){const e=D.c(37),{widget:r,result:i}=s;let l,n,c,o,m,d,g,f,p;if(e[0]!==i?.timeseries||e[1]!==r.aggregation.fn||e[2]!==r.aggregation.interval||e[3]!==r.name){p=i?.timeseries??[],n=Math.max(...p.map(at),1);const a=p.reduce(rt,0);l=r.aggregation.fn==="count",f="border rounded-lg bg-card overflow-hidden flex flex-col h-full",d="flex items-start justify-between pr-4";const x=r.name;let u;e[13]!==r.aggregation.fn?(u=ae(r.aggregation.fn),e[13]=r.aggregation.fn,e[14]=u):u=e[14];const h=`${u} per ${r.aggregation.interval}`;e[15]!==h||e[16]!==r.name?(g=t.jsx(le,{name:x,subtitle:h}),e[15]=h,e[16]=r.name,e[17]=g):g=e[17],m="text-right pt-3",c="text-lg font-semibold tabular-nums leading-tight",o=G(a,l),e[0]=i?.timeseries,e[1]=r.aggregation.fn,e[2]=r.aggregation.interval,e[3]=r.name,e[4]=l,e[5]=n,e[6]=c,e[7]=o,e[8]=m,e[9]=d,e[10]=g,e[11]=f,e[12]=p}else l=e[4],n=e[5],c=e[6],o=e[7],m=e[8],d=e[9],g=e[10],f=e[11],p=e[12];let j;e[18]!==c||e[19]!==o?(j=t.jsx("div",{className:c,children:o}),e[18]=c,e[19]=o,e[20]=j):j=e[20];let v;e[21]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"text-xs text-muted-foreground",children:"total"}),e[21]=v):v=e[21];let b;e[22]!==m||e[23]!==j?(b=t.jsxs("div",{className:m,children:[j,v]}),e[22]=m,e[23]=j,e[24]=b):b=e[24];let w;e[25]!==d||e[26]!==g||e[27]!==b?(w=t.jsxs("div",{className:d,children:[g,b]}),e[25]=d,e[26]=g,e[27]=b,e[28]=w):w=e[28];let y;e[29]!==l||e[30]!==n||e[31]!==p?(y=t.jsx("div",{className:"px-4 pb-3 flex-1 flex flex-col min-h-0",children:p.length===0?t.jsx("div",{className:"flex-1 flex items-center justify-center text-sm text-muted-foreground",children:"No data available"}):t.jsxs("div",{className:"flex-1 flex flex-col",children:[t.jsx("div",{className:"text-[10px] text-muted-foreground mb-1 tabular-nums",children:G(n,l)}),t.jsx("div",{className:"flex items-end gap-[2px] flex-1",children:p.map((a,x)=>t.jsx("div",{className:"group relative flex-1 bg-primary/70 rounded-t transition-all hover:bg-primary cursor-default",style:{height:`${a.value/n*100}%`,minHeight:a.value>0?"3px":"0px"},children:t.jsx("div",{className:"absolute bottom-full left-1/2 -translate-x-1/2 mb-1.5 hidden group-hover:block z-10 pointer-events-none",children:t.jsx("div",{className:"bg-foreground text-background text-[10px] px-1.5 py-0.5 rounded whitespace-nowrap tabular-nums",children:G(a.value,l)})})},x))}),t.jsx("div",{className:"flex justify-between text-[10px] text-muted-foreground mt-1.5 tabular-nums",children:p.length>0&&(()=>{const a=new Date(p[0].timestamp),x=new Date(p[p.length-1].timestamp),C=x.getTime()-a.getTime()>864e5?{month:"short",day:"numeric"}:{hour:"2-digit",minute:"2-digit"};return t.jsxs(t.Fragment,{children:[t.jsx("span",{children:a.toLocaleString([],C)}),t.jsx("span",{children:x.toLocaleString([],C)})]})})()})]})}),e[29]=l,e[30]=n,e[31]=p,e[32]=y):y=e[32];let k;return e[33]!==w||e[34]!==y||e[35]!==f?(k=t.jsxs("div",{className:f,children:[w,y]}),e[33]=w,e[34]=y,e[35]=f,e[36]=k):k=e[36],k}function rt(s,e){return s+e.value}function at(s){return s.value}function lt(s){const e=D.c(81),{dashboardId:r,timeRange:i,propertyFilters:l,onEdit:n,onRefresh:c,onTimeRangeChange:o,onPropertyFiltersChange:m}=s,{org:d,project:g,locator:f}=fe();let p;e[0]!==d.id?(p={connectionId:be,orgId:d.id},e[0]=d.id,e[1]=p):p=e[1];const j=ye(p);let v;e[2]!==r||e[3]!==f?(v=oe.monitoringDashboardDetails(f,r),e[2]=r,e[3]=f,e[4]=v):v=e[4];let b;e[5]!==j||e[6]!==r?(b=async()=>{if(!j)throw new Error("MCP client not available");const N=await j.callTool({name:"MONITORING_DASHBOARD_GET",arguments:{id:r}});return N.structuredContent??N},e[5]=j,e[6]=r,e[7]=b):b=e[7];let w;e[8]!==v||e[9]!==b?(w={queryKey:v,queryFn:b},e[8]=v,e[9]=b,e[10]=w):w=e[10];const{data:y}=ne(w);let k,a,x;if(e[11]!==r||e[12]!==f||e[13]!==l||e[14]!==i.from||e[15]!==i.to){const N=l.filter(ot),S=ve(N);k=N.length>0?Ne(N):void 0,x=ne,a=oe.monitoringDashboardQuery(f,r,i.from,i.to,S||void 0),e[11]=r,e[12]=f,e[13]=l,e[14]=i.from,e[15]=i.to,e[16]=k,e[17]=a,e[18]=x}else k=e[16],a=e[17],x=e[18];let u;e[19]!==k||e[20]!==j||e[21]!==r||e[22]!==i.from||e[23]!==i.to?(u=async()=>{if(!j)throw new Error("MCP client not available");const N=me(i.from),S=me(i.to),W=N.date||new Date(Date.now()-864e5),se=S.date||new Date,ie=await j.callTool({name:"MONITORING_DASHBOARD_QUERY",arguments:{dashboardId:r,timeRange:{startDate:W.toISOString(),endDate:se.toISOString()},...k?{propertyFilters:k}:{}}});return ie.structuredContent??ie},e[19]=k,e[20]=j,e[21]=r,e[22]=i.from,e[23]=i.to,e[24]=u):u=e[24];let h;e[25]!==a||e[26]!==u?(h={queryKey:a,queryFn:u,refetchInterval:3e4},e[25]=a,e[26]=u,e[27]=h):h=e[27];const{data:C,isRefetching:$}=x(h);if(!y){let N;return e[28]===Symbol.for("react.memo_cache_sentinel")?(N=t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Dashboard not found"}),e[28]=N):N=e[28],N}let H;e[29]!==C?.results?(H=new Map(C?.results?.map(nt)??[]),e[29]=C?.results,e[30]=H):H=e[30];const Q=H;let T;e[31]!==d.slug||e[32]!==g.slug?(T={org:d.slug,project:g.slug},e[31]=d.slug,e[32]=g.slug,e[33]=T):T=e[33];let Y;e[34]===Symbol.for("react.memo_cache_sentinel")?(Y={tab:"dashboards"},e[34]=Y):Y=e[34];let _;e[35]!==T?(_=t.jsx(de,{children:t.jsx($e,{asChild:!0,children:t.jsx(pe,{to:"/$org/$project/monitoring",params:T,search:Y,children:"Monitoring"})})}),e[35]=T,e[36]=_):_=e[36];let U;e[37]===Symbol.for("react.memo_cache_sentinel")?(U=t.jsx(Re,{}),e[37]=U):U=e[37];let P;e[38]!==y.name?(P=t.jsx(de,{children:t.jsx(Fe,{children:y.name})}),e[38]=y.name,e[39]=P):P=e[39];let J;e[40]!==_||e[41]!==P?(J=t.jsx(De,{children:t.jsxs(Te,{children:[_,U,P]})}),e[40]=_,e[41]=P,e[42]=J):J=e[42];const te=J;let I;e[43]!==n?(I=n&&t.jsx(R,{variant:"outline",size:"icon",className:"h-7 w-7",onClick:n,children:t.jsx(ke,{size:14})}),e[43]=n,e[44]=I):I=e[44];let X;e[45]===Symbol.for("react.memo_cache_sentinel")?(X=t.jsx(re,{size:14}),e[45]=X):X=e[45];let M;e[46]!==c?(M=t.jsx(R,{variant:"outline",size:"icon",className:"h-7 w-7",onClick:c,children:X}),e[46]=c,e[47]=M):M=e[47];let z;e[48]!==m||e[49]!==l?(z=t.jsx(Xe,{value:l,onChange:m}),e[48]=m,e[49]=l,e[50]=z):z=e[50];let B;e[51]!==i.from||e[52]!==i.to?(B={from:i.from,to:i.to},e[51]=i.from,e[52]=i.to,e[53]=B):B=e[53];let E;e[54]!==o||e[55]!==B?(E=t.jsx(we,{value:B,onChange:o,className:"min-w-0"}),e[54]=o,e[55]=B,e[56]=E):E=e[56];let O;e[57]!==I||e[58]!==M||e[59]!==z||e[60]!==E?(O=t.jsxs(Se,{children:[I,M,z,E]}),e[57]=I,e[58]=M,e[59]=z,e[60]=E,e[61]=O):O=e[61];let A;e[62]!==y.description?(A=y.description&&t.jsx("div",{className:"mb-6",children:t.jsx("p",{className:"text-sm text-muted-foreground",children:y.description})}),e[62]=y.description,e[63]=A):A=e[63];let K;if(e[64]!==y.widgets||e[65]!==Q){let N;e[67]!==Q?(N=S=>{const W=Q.get(S.id),se=S.type==="metric"?"":"col-span-2";return t.jsxs("div",{className:se,children:[S.type==="metric"&&t.jsx(Ze,{widget:S,result:W}),S.type==="table"&&t.jsx(et,{widget:S,result:W}),S.type==="timeseries"&&t.jsx(st,{widget:S,result:W})]},S.id)},e[67]=Q,e[68]=N):N=e[68],K=y.widgets.map(N),e[64]=y.widgets,e[65]=Q,e[66]=K}else K=e[66];let L;e[69]!==K?(L=t.jsx("div",{className:"grid grid-cols-5 gap-4",ref:it,children:K}),e[69]=K,e[70]=L):L=e[70];let V;e[71]!==$?(V=$&&t.jsxs("div",{className:"fixed bottom-4 right-4 bg-background border rounded-lg px-3 py-2 shadow-lg flex items-center gap-2 text-sm",children:[t.jsx(re,{size:14,className:"animate-spin"}),"Refreshing..."]}),e[71]=$,e[72]=V):V=e[72];let q;e[73]!==A||e[74]!==L||e[75]!==V?(q=t.jsxs("div",{className:"flex-1 flex flex-col overflow-auto p-5",children:[A,L,V]}),e[73]=A,e[74]=L,e[75]=V,e[76]=q):q=e[76];let Z;return e[77]!==te||e[78]!==O||e[79]!==q?(Z=t.jsxs(Ce,{breadcrumb:te,children:[O,q]}),e[77]=te,e[78]=O,e[79]=q,e[80]=Z):Z=e[80],Z}function it(s){if(!s)return;const e=()=>{const i=(s.clientWidth-64)/5;s.style.gridAutoRows=`${i}px`};e(),new ResizeObserver(e).observe(s)}function nt(s){return[s.widgetId,s]}function ot(s){return s.key.trim()}function ct(s){const e=D.c(13),{dashboardId:r,onEdit:i}=s,l=xe();let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n={from:"now-24h",to:"now"},e[0]=n):n=e[0];const[c,o]=F.useState(n);let m;e[1]===Symbol.for("react.memo_cache_sentinel")?(m=[],e[1]=m):m=e[1];const[d,g]=F.useState(m);let f;e[2]!==r||e[3]!==l?(f=()=>{l.invalidateQueries({predicate:w=>w.queryKey[0]==="monitoringDashboardQuery"&&w.queryKey[2]===r})},e[2]=r,e[3]=l,e[4]=f):f=e[4];const p=f;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t.jsx("div",{className:"flex-1 flex items-center justify-center text-muted-foreground",children:"Failed to load dashboard"}),e[5]=j):j=e[5];let v;e[6]===Symbol.for("react.memo_cache_sentinel")?(v=t.jsx("div",{className:"flex-1 flex items-center justify-center",children:t.jsx(re,{size:24,className:"animate-spin text-muted-foreground"})}),e[6]=v):v=e[6];let b;return e[7]!==r||e[8]!==p||e[9]!==i||e[10]!==d||e[11]!==c?(b=t.jsx(ge,{fallback:j,children:t.jsx(F.Suspense,{fallback:v,children:t.jsx(lt,{dashboardId:r,timeRange:c,propertyFilters:d,onEdit:i,onRefresh:p,onTimeRangeChange:o,onPropertyFiltersChange:g})})}),e[7]=r,e[8]=p,e[9]=i,e[10]=d,e[11]=c,e[12]=b):b=e[12],b}function Qt(){const s=D.c(9);let e;s[0]===Symbol.for("react.memo_cache_sentinel")?(e={strict:!1},s[0]=e):e=s[0];const{dashboardId:r}=he(e),{org:i,project:l}=fe(),n=je();let c;s[1]!==r||s[2]!==n||s[3]!==i.slug||s[4]!==l.slug?(c=()=>{n({to:"/$org/$project/monitoring/dashboards/$dashboardId/edit",params:{org:i.slug,project:l.slug,dashboardId:r}})},s[1]=r,s[2]=n,s[3]=i.slug,s[4]=l.slug,s[5]=c):c=s[5];const o=c;let m;return s[6]!==r||s[7]!==o?(m=t.jsx(ct,{dashboardId:r,onEdit:o}),s[6]=r,s[7]=o,s[8]=m):m=s[8],m}export{Qt as default};
@@ -1 +1 @@
1
- import{r as i,j as e}from"./index-pgKDpBki.js";import{i as n}from"./Loading01-BI2pQIQK.js";import{h as l}from"./mcp-oauth-D2_g2iQ3.js";function h(){const[s,c]=i.useState(null),[r,a]=i.useState(!1);return i.useEffect(()=>{(async()=>{try{const t=await l();if(!t.success){c(t.error||"MCP authentication failed"),setTimeout(()=>{window.close()},3e3);return}a(!0),setTimeout(()=>{window.close()},1500)}catch(t){c(t instanceof Error?t.message:String(t)),setTimeout(()=>{window.close()},3e3)}})()},[]),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[r&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),!r&&!s&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(n,{size:32,className:"animate-spin text-primary"})}),s&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s?"Authentication Failed":r?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:s}),e.jsxs("p",{className:"mt-2",children:[e.jsx("br",{}),"This window will close automatically."]})]}):r?e.jsxs("p",{children:["Authentication complete.",e.jsx("br",{}),"This window will close automatically."]}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{h as default};
1
+ import{r as i,j as e}from"./index-KAycGEnT.js";import{i as n}from"./Loading01-DF5pxnn8.js";import{h as l}from"./mcp-oauth-DcSxwlYK.js";function h(){const[s,c]=i.useState(null),[r,a]=i.useState(!1);return i.useEffect(()=>{(async()=>{try{const t=await l();if(!t.success){c(t.error||"MCP authentication failed"),setTimeout(()=>{window.close()},3e3);return}a(!0),setTimeout(()=>{window.close()},1500)}catch(t){c(t instanceof Error?t.message:String(t)),setTimeout(()=>{window.close()},3e3)}})()},[]),e.jsx("div",{className:"min-h-screen flex items-center justify-center p-8 bg-background",children:e.jsxs("div",{className:"w-full max-w-md flex flex-col items-center justify-center gap-8",children:[r&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),!r&&!s&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(n,{size:32,className:"animate-spin text-primary"})}),s&&e.jsx("img",{src:"/empty-state-error.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),e.jsxs("div",{className:"flex flex-col items-center gap-2 text-center",children:[e.jsx("h2",{className:"text-lg font-medium text-foreground",children:s?"Authentication Failed":r?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:s?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:s}),e.jsxs("p",{className:"mt-2",children:[e.jsx("br",{}),"This window will close automatically."]})]}):r?e.jsxs("p",{children:["Authentication complete.",e.jsx("br",{}),"This window will close automatically."]}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{h as default};
@@ -1 +1 @@
1
- import{r as j,c as b,j as s,v as D,E as ee,u as te,d as se,B as ie}from"./index-pgKDpBki.js";import{V as le,C as h}from"./index-vkhk47fC.js";import{E as re,C as Z}from"./editable-task-title-Dyz3EXnS.js";import{a as G}from"./tasks-panel-ORUfjwGu.js";import{u as U,a as oe}from"./collapsible-rlPjAYfz.js";import{I as J}from"./integration-icon-Bh8tJtce.js";import{b as ne,P as ae,a as ce}from"./popover-CKnAPgyb.js";import{S as q}from"./skeleton-YJfePU6v.js";import{i as me,d as de}from"./constants-Dm_YJHHh.js";import{b as fe}from"./use-virtual-mcp-CxEMO48x.js";import{i as ue}from"./ChevronRight-CIJzl8ei.js";import{t as Q}from"./Users03-t-Eb-Q_F.js";import{P as $}from"./index-CVG_d4yA.js";import{R,a as F,b as K}from"./resizable-ClRo9tEF.js";import"./spinner-_SEN9vi4.js";import"./tooltip-DH8hxvf2.js";import"./index-D18UlrU_.js";import"./decopilot-events-ppuEAQXv.js";import"./useQuery-D2_PHjUY.js";import"./dialog-V5-7uM9k.js";import"./X-BQQzz9s2.js";import"./form-BBAUUGww.js";import"./label-vf98zSbN.js";import"./input-BJSjp7-P.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-Dq6OU0Wi.js";import"./ChevronDown-DaSct-5t.js";import"./Edit01-9TEaueyu.js";import"./XCircle-Cap9XfpO.js";import"./AlertCircle-CeyEXSoj.js";import"./select-MKaUo6o5.js";import"./Check-Bra2mpbB.js";import"./tabs-DW6Vwt7O.js";import"./localstorage-keys-DBdiYnka.js";import"./useMutation-B1zBeDkg.js";import"./ArrowLeft-CLP9Pek3.js";import"./use-copy-MZ1Maw_m.js";import"./badge-BvxQUv5d.js";import"./Code01-Dr2rEb4l.js";import"./SearchMd-ChZ8IPer.js";import"./use-create-virtual-mcp-BphKQ0RK.js";import"./use-mcp-resources-MxJcH4JX.js";import"./Copy01-wvio6GZB.js";import"./marked.esm-BaswSlok.js";import"./markdown-Br_cwNit.js";import"./mcp-app-renderer-CUDmsxDc.js";import"./types-Dr4up3fI.js";import"./Eye-BvUkkA1x.js";import"./Globe02-BNWDh1xg.js";import"./LayersTwo01-DfZQJvAF.js";import"./XClose-Dj2rcAfJ.js";import"./collection-search-BRnhIyqo.js";import"./Loading01-BI2pQIQK.js";import"./use-connection-DKYOa494.js";import"./use-collections-xijD0anf.js";import"./generate-id-Dyweu44Y.js";import"./Clock-C-pPW7F3.js";import"./Trash01-BUR32hk8.js";import"./CheckCircle-BPfWQi5L.js";import"./ChevronLeft-DgayRUs6.js";import"./user-CAFKngPC.js";import"./avatar-BjR7vcEh.js";import"./format-time-CMKyl-GC.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./Plus-D8K5219B.js";import"./use-llm-CEKPubl8.js";import"./use-binding-PixlLrYo.js";import"./binder-D8_pfz0c.js";import"./checkbox-CfbjtS8Q.js";import"./AlignLeft-CrcoQJqu.js";import"./Image01-D6NJnYhS.js";import"./RefreshCcw01-B2GUxp8e.js";import"./Settings01-D9LfVzNX.js";import"./useSuspenseInfiniteQuery-CquX6rh3.js";import"./infiniteQueryObserver-CQfzmS7X.js";import"./Container-BQAhl1Ij.js";const X=({size:e=24,color:t="currentColor",...i})=>j.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},j.createElement("path",{d:"M15 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"}));X.displayName="LayoutRight";const Y=({size:e=24,color:t="currentColor",...i})=>j.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},j.createElement("path",{d:"m10 15-3.075 3.114c-.43.434-.644.651-.828.666a.5.5 0 0 1-.421-.172c-.12-.14-.12-.446-.12-1.056v-1.56c0-.548-.449-.944-.99-1.024v0a3 3 0 0 1-2.534-2.533C2 12.219 2 11.96 2 11.445V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C4.28 2 5.12 2 6.8 2h7.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C19 4.28 19 5.12 19 6.8V11m0 11-2.176-1.513c-.306-.213-.46-.32-.626-.395a2.002 2.002 0 0 0-.462-.145c-.18-.033-.367-.033-.74-.033H13.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C10 18.394 10 17.834 10 16.714V14.2c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C11.52 11 12.08 11 13.2 11h5.6c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874C22 12.52 22 13.08 22 14.2v2.714c0 .932 0 1.398-.152 1.766a2 2 0 0 1-1.083 1.082c-.367.152-.833.152-1.765.152V22Z"}));Y.displayName="MessageChatSquare";function pe(e){const t=b.c(15),{agent:i}=e,{setVirtualMcpId:p}=U();let c;t[0]!==i.id||t[1]!==p?(c=()=>{p(i.id)},t[0]=i.id,t[1]=p,t[2]=c):c=t[2];const r=c;let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=D("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[3]=m):m=t[3];const f=`Select agent ${i.title}`;let o;t[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Q,{size:20}),t[4]=o):o=t[4];let n;t[5]!==i.icon||t[6]!==i.title?(n=s.jsx(J,{icon:i.icon,name:i.title,fallbackIcon:o}),t[5]=i.icon,t[6]=i.title,t[7]=n):n=t[7];let l;t[8]!==i.title?(l=s.jsx("p",{className:"text-sm text-foreground text-center leading-tight line-clamp-2",children:i.title}),t[8]=i.title,t[9]=l):l=t[9];let a;return t[10]!==r||t[11]!==f||t[12]!==n||t[13]!==l?(a=s.jsxs("button",{type:"button",onClick:r,className:m,"aria-label":f,children:[n,l]}),t[10]=r,t[11]=f,t[12]=n,t[13]=l,t[14]=a):a=t[14],a}function xe(e){const t=b.c(14),{virtualMcps:i,selectedVirtualMcpId:p,onVirtualMcpChange:c}=e,[r,m]=j.useState(!1),f=j.useRef(null);let o,n;t[0]!==r?(o=()=>{r&&setTimeout(()=>{f.current?.focus()},0)},n=[r],t[0]=r,t[1]=o,t[2]=n):(o=t[1],n=t[2]),j.useEffect(o,n);let l;t[3]!==c?(l=N=>{c(N),m(!1)},t[3]=c,t[4]=l):l=t[4];const a=l;let d;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=D("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[5]=d):d=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(ne,{asChild:!0,children:s.jsxs("button",{type:"button",className:d,"aria-label":"See all agents",children:[s.jsx("div",{className:"size-12 rounded-lg bg-accent flex items-center justify-center shrink-0",children:s.jsx(ue,{size:24,className:"text-foreground"})}),s.jsx("p",{className:"text-sm text-foreground text-center leading-tight",children:"See all"})]})}),t[6]=u):u=t[6];let x;t[7]!==a||t[8]!==p||t[9]!==i?(x=s.jsx(ae,{className:"w-[550px] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,children:s.jsx(le,{virtualMcps:i,selectedVirtualMcpId:p,onVirtualMcpChange:a,searchInputRef:f})}),t[7]=a,t[8]=p,t[9]=i,t[10]=x):x=t[10];let A;return t[11]!==r||t[12]!==x?(A=s.jsxs(ce,{open:r,onOpenChange:m,children:[u,x]}),t[11]=r,t[12]=x,t[13]=A):A=t[13],A}function he(){const e=b.c(20),t=fe(),{selectedVirtualMcp:i,setVirtualMcpId:p}=U();let c,r,m,f,o,n;if(e[0]!==t){o=Symbol.for("react.early_return_sentinel");e:{const x=t.filter(be).slice(0,6);if(x.length===0){o=null;break e}n=t.map(ge),m="w-full max-w-[800px]",e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("h2",{className:"text-sm font-medium text-muted-foreground mb-4",children:"Recently used agents"}),e[7]=f):f=e[7],c="grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",r=x.map(je)}e[0]=t,e[1]=c,e[2]=r,e[3]=m,e[4]=f,e[5]=o,e[6]=n}else c=e[1],r=e[2],m=e[3],f=e[4],o=e[5],n=e[6];if(o!==Symbol.for("react.early_return_sentinel"))return o;const l=i?.id??null;let a;e[8]!==p||e[9]!==l||e[10]!==n?(a=s.jsx(xe,{virtualMcps:n,selectedVirtualMcpId:l,onVirtualMcpChange:p}),e[8]=p,e[9]=l,e[10]=n,e[11]=a):a=e[11];let d;e[12]!==c||e[13]!==r||e[14]!==a?(d=s.jsxs("div",{className:c,children:[r,a]}),e[12]=c,e[13]=r,e[14]=a,e[15]=d):d=e[15];let u;return e[16]!==m||e[17]!==f||e[18]!==d?(u=s.jsxs("div",{className:m,children:[f,d]}),e[16]=m,e[17]=f,e[18]=d,e[19]=u):u=e[19],u}function je(e){return s.jsx(pe,{agent:e},e.id??"default")}function ge(e){return{id:e.id,title:e.title,description:e.description,icon:e.icon}}function be(e){return e.id!==null&&!me(e.id)}function Ne(){const e=b.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(q,{className:"h-5 w-40 mb-4"}),e[0]=t):t=e[0];let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"w-full max-w-[800px]",children:[t,s.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",children:Array.from({length:7}).map(Ce)})]}),e[1]=i):i=e[1],i}function Ce(e,t){return s.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 self-stretch",children:[s.jsx(q,{className:"size-6 rounded-md shrink-0"}),s.jsx(q,{className:"h-4 w-full"})]},t)}function ve(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(j.Suspense,{fallback:s.jsx(Ne,{}),children:s.jsx(he,{})}),e[0]=t):t=e[0],t}function Se(){const e=b.c(50),{org:t}=te(),{data:i}=se.useSession(),{modelsConnections:p,isChatEmpty:c,activeTaskId:r,tasks:m,selectedVirtualMcp:f}=oe();let o;if(e[0]!==r||e[1]!==m){let g;e[3]!==r?(g=P=>P.id===r,e[3]=r,e[4]=g):g=e[4],o=m.find(g),e[0]=r,e[1]=m,e[2]=o}else o=e[2];const n=o,[l,a]=j.useState(!1);let d;e[5]!==i?.user?.name?(d=i?.user?.name?.split(" ")[0]||"there",e[5]=i?.user?.name,e[6]=d):d=e[6];const u=d;let x;e[7]!==t.id?(x=de(t.id),e[7]=t.id,e[8]=x):x=e[8];const N=f??x;if(p.length===0){let g,P;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(R,{defaultSize:20,minSize:10,id:"tasks",order:1,children:s.jsx(G,{})}),P=s.jsx(F,{className:"bg-border/30"}),e[9]=g,e[10]=P):(g=e[9],P=e[10]);const W=l?50:80;let V;e[11]!==t?(V=s.jsx("div",{className:"flex flex-col h-full bg-background items-center justify-center",children:s.jsx(h.NoLlmBindingEmptyState,{org:t})}),e[11]=t,e[12]=V):V=e[12];let E;e[13]!==W||e[14]!==V?(E=s.jsx(R,{defaultSize:W,minSize:30,id:"main",order:2,children:V}),e[13]=W,e[14]=V,e[15]=E):E=e[15];let I;e[16]!==l?(I=l&&s.jsxs(s.Fragment,{children:[s.jsx(F,{className:"bg-border/30"}),s.jsx(R,{defaultSize:30,minSize:15,id:"context",order:3,children:s.jsx(Z,{onClose:()=>a(!1)})})]}),e[16]=l,e[17]=I):I=e[17];let B;return e[18]!==E||e[19]!==I?(B=s.jsxs(K,{direction:"horizontal",className:"size-full",children:[g,P,E,I]}),e[18]=E,e[19]=I,e[20]=B):B=e[20],B}let H,L;e[21]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(R,{defaultSize:20,minSize:10,id:"tasks",order:1,children:s.jsx(G,{})}),L=s.jsx(F,{className:"bg-border/30"}),e[21]=H,e[22]=L):(H=e[21],L=e[22]);const O=l?50:80;let C;e[23]!==n?(C=n?.title&&s.jsx(re,{taskId:n.id,text:n.title,className:"text-sm font-medium text-foreground"}),e[23]=n,e[24]=C):C=e[24];let v;e[25]!==C?(v=s.jsx($.Header.Left,{className:"gap-2",children:C}),e[25]=C,e[26]=v):v=e[26];let S;e[27]!==c||e[28]!==l?(S=!c&&s.jsx("button",{type:"button",onClick:()=>a(ye),className:D("flex size-7 items-center justify-center rounded-md border border-input hover:bg-accent transition-colors",l&&"bg-accent"),title:"Toggle context panel",children:s.jsx(X,{size:14,className:"text-muted-foreground"})}),e[27]=c,e[28]=l,e[29]=S):S=e[29];let y;e[30]!==S?(y=s.jsx($.Header.Right,{className:"gap-1",children:S}),e[30]=S,e[31]=y):y=e[31];let k;e[32]!==v||e[33]!==y?(k=s.jsxs($.Header,{className:"flex-none z-10 bg-background",children:[v,y]}),e[32]=v,e[33]=y,e[34]=k):k=e[34];let _;e[35]!==N||e[36]!==c||e[37]!==u?(_=c?s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center px-10 pb-32 pt-10",children:[s.jsxs("div",{className:"flex flex-col items-center w-full max-w-[600px]",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx(J,{icon:N.icon,name:N.title,size:"md",fallbackIcon:s.jsx(Q,{size:20}),className:"size-12 rounded-xl border border-stone-200/60 shadow-sm aspect-square transition-opacity duration-200"})}),s.jsx("div",{className:"text-center mb-8",children:s.jsxs("p",{className:"text-xl font-medium text-foreground",children:["What's on your mind, ",u,"?"]})}),s.jsx("div",{className:"w-full",children:s.jsx(h.Input,{})}),s.jsx(h.IceBreakers,{className:"w-full"})]}),s.jsx("div",{className:"flex flex-col items-center w-full mt-4",children:s.jsx(ve,{})})]}):s.jsxs(s.Fragment,{children:[s.jsx(h.Main,{children:s.jsx(h.Messages,{})}),s.jsx(h.Footer,{children:s.jsx(h.Input,{onOpenContextPanel:()=>a(!0)})})]}),e[35]=N,e[36]=c,e[37]=u,e[38]=_):_=e[38];let z;e[39]!==k||e[40]!==_?(z=s.jsxs(h,{className:"h-full bg-background",children:[k,_]}),e[39]=k,e[40]=_,e[41]=z):z=e[41];let w;e[42]!==z||e[43]!==O?(w=s.jsx(R,{defaultSize:O,minSize:30,id:"main",order:2,children:z}),e[42]=z,e[43]=O,e[44]=w):w=e[44];let M;e[45]!==l?(M=l&&s.jsxs(s.Fragment,{children:[s.jsx(F,{className:"bg-border/30"}),s.jsx(R,{defaultSize:30,minSize:15,id:"context",order:3,children:s.jsx(Z,{onClose:()=>a(!1)})})]}),e[45]=l,e[46]=M):M=e[46];let T;return e[47]!==w||e[48]!==M?(T=s.jsxs(K,{direction:"horizontal",className:"size-full",children:[H,L,w,M]}),e[47]=w,e[48]=M,e[49]=T):T=e[49],T}function ye(e){return!e}function ke(e){const t=b.c(14),{error:i,onRetry:p}=e,c=i?.message?.includes("401")||i?.message?.toLowerCase().includes("unauthorized");let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs($.Header,{className:"flex-none",children:[s.jsx($.Header.Left,{className:"gap-2"}),s.jsx($.Header.Right,{className:"gap-1"})]}),t[0]=r):r=t[0];let m;t[1]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full mx-auto w-fit",children:s.jsx(Y,{className:"h-6 w-6 text-destructive"})}),t[1]=m):m=t[1];const f=c?"Unable to load models":"Something went wrong";let o;t[2]!==f?(o=s.jsx("h3",{className:"text-lg font-medium",children:f}),t[2]=f,t[3]=o):o=t[3];const n=c?"There was an authentication error while loading the models. This might be due to an expired session or invalid API key.":i?.message||"An unexpected error occurred";let l;t[4]!==n?(l=s.jsx("p",{className:"text-sm text-muted-foreground",children:n}),t[4]=n,t[5]=l):l=t[5];let a;t[6]!==o||t[7]!==l?(a=s.jsxs("div",{className:"space-y-2",children:[o,l]}),t[6]=o,t[7]=l,t[8]=a):a=t[8];let d;t[9]!==p?(d=s.jsx(ie,{variant:"outline",onClick:p,children:"Try again"}),t[9]=p,t[10]=d):d=t[10];let u;return t[11]!==a||t[12]!==d?(u=s.jsxs(h,{children:[r,s.jsx("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center",children:s.jsxs("div",{className:"max-w-sm space-y-4",children:[m,a,d]})})]}),t[11]=a,t[12]=d,t[13]=u):u=t[13],u}function Ut(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ee,{fallback:_e,children:s.jsx(j.Suspense,{fallback:s.jsx(h.Skeleton,{}),children:s.jsx(Se,{})})}),e[0]=t):t=e[0],t}function _e(e){const{error:t,resetError:i}=e;return s.jsx(ke,{error:t,onRetry:i})}export{Ut as default};
1
+ import{r as j,c as b,j as s,v as D,E as ee,u as te,d as se,B as ie}from"./index-KAycGEnT.js";import{V as le,C as h}from"./index-CoyJj2VR.js";import{E as re,C as Z}from"./editable-task-title-DKlfwqLm.js";import{a as G}from"./tasks-panel-jUSk_q_P.js";import{u as U,a as oe}from"./collapsible-Dz6kdDQx.js";import{I as J}from"./integration-icon-BAlg7muO.js";import{b as ne,P as ae,a as ce}from"./popover-DSO1tjgf.js";import{S as q}from"./skeleton-l9u4bmPQ.js";import{i as me,d as de}from"./constants-CRvMLa9p.js";import{b as fe}from"./use-virtual-mcp-DrNWNgvb.js";import{i as ue}from"./ChevronRight-CkAAxLvD.js";import{t as Q}from"./Users03-Z0r1cCGf.js";import{P as $}from"./index-A_CnuSis.js";import{R,a as F,b as K}from"./resizable-FDnvuXI8.js";import"./spinner-CQhhuHCn.js";import"./tooltip-BD36KVkP.js";import"./index-B7Bu7nQ7.js";import"./decopilot-events-bTg09qGr.js";import"./useQuery-DCrAUBx5.js";import"./dialog-DSCIUn11.js";import"./X-CT_P09q2.js";import"./form-CVLoDgzL.js";import"./label-lqq4AMOf.js";import"./input-s8rw5Kfa.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-dcB4aDLZ.js";import"./ChevronDown-D04Buvau.js";import"./Edit01-CoWrVJPj.js";import"./XCircle-BNAlXeL2.js";import"./AlertCircle-Zx531KAn.js";import"./select-XWfX294J.js";import"./Check-DXoRcZpn.js";import"./tabs-B62zcrrU.js";import"./localstorage-keys-DK1Id_ip.js";import"./useMutation-Ctk5b8uR.js";import"./ArrowLeft-D4dc0UBb.js";import"./use-copy-Cxp-hpbY.js";import"./badge-DtcA_2rB.js";import"./Code01-BLJKgev-.js";import"./SearchMd-u1QGwQkU.js";import"./use-create-virtual-mcp-CWXwWPev.js";import"./use-mcp-resources-BTKxmEpv.js";import"./Copy01-B4eRdmVC.js";import"./marked.esm-BaswSlok.js";import"./markdown-HCjujTl2.js";import"./mcp-app-renderer-Bconp3w4.js";import"./types-CgRNzZIg.js";import"./Eye-DNSEDYe8.js";import"./Globe02-YyAAQROb.js";import"./LayersTwo01-XOG8qRvr.js";import"./XClose-BIpOBHWg.js";import"./collection-search-Dl5JvsI0.js";import"./Loading01-DF5pxnn8.js";import"./use-connection-DWTVYLGI.js";import"./use-collections-ROKIiOzV.js";import"./generate-id-Dyweu44Y.js";import"./Clock-DwwOuQI4.js";import"./Trash01-c47UOodj.js";import"./CheckCircle-BP8hgPfe.js";import"./ChevronLeft-C8cqrSli.js";import"./user-BU3jjBpz.js";import"./avatar-DGDgNwX-.js";import"./format-time-CMKyl-GC.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./Plus-CEtl-Eq7.js";import"./use-llm-D0wV35M9.js";import"./use-binding-eAl0-ngZ.js";import"./binder-CaZ6b20X.js";import"./checkbox-JiwlvimE.js";import"./AlignLeft-CGBbKVHK.js";import"./Image01-PGP5Jz22.js";import"./RefreshCcw01-Bcbx9L0j.js";import"./Settings01-C1oZxROY.js";import"./useSuspenseInfiniteQuery-CG43fx0v.js";import"./infiniteQueryObserver-DctmDFEe.js";import"./Container-CSl1es2V.js";const X=({size:e=24,color:t="currentColor",...i})=>j.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},j.createElement("path",{d:"M15 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"}));X.displayName="LayoutRight";const Y=({size:e=24,color:t="currentColor",...i})=>j.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...i},j.createElement("path",{d:"m10 15-3.075 3.114c-.43.434-.644.651-.828.666a.5.5 0 0 1-.421-.172c-.12-.14-.12-.446-.12-1.056v-1.56c0-.548-.449-.944-.99-1.024v0a3 3 0 0 1-2.534-2.533C2 12.219 2 11.96 2 11.445V6.8c0-1.68 0-2.52.327-3.162a3 3 0 0 1 1.311-1.311C4.28 2 5.12 2 6.8 2h7.4c1.68 0 2.52 0 3.162.327a3 3 0 0 1 1.311 1.311C19 4.28 19 5.12 19 6.8V11m0 11-2.176-1.513c-.306-.213-.46-.32-.626-.395a2.002 2.002 0 0 0-.462-.145c-.18-.033-.367-.033-.74-.033H13.2c-1.12 0-1.68 0-2.108-.218a2 2 0 0 1-.874-.874C10 18.394 10 17.834 10 16.714V14.2c0-1.12 0-1.68.218-2.108a2 2 0 0 1 .874-.874C11.52 11 12.08 11 13.2 11h5.6c1.12 0 1.68 0 2.108.218a2 2 0 0 1 .874.874C22 12.52 22 13.08 22 14.2v2.714c0 .932 0 1.398-.152 1.766a2 2 0 0 1-1.083 1.082c-.367.152-.833.152-1.765.152V22Z"}));Y.displayName="MessageChatSquare";function pe(e){const t=b.c(15),{agent:i}=e,{setVirtualMcpId:p}=U();let c;t[0]!==i.id||t[1]!==p?(c=()=>{p(i.id)},t[0]=i.id,t[1]=p,t[2]=c):c=t[2];const r=c;let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=D("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[3]=m):m=t[3];const f=`Select agent ${i.title}`;let o;t[4]===Symbol.for("react.memo_cache_sentinel")?(o=s.jsx(Q,{size:20}),t[4]=o):o=t[4];let n;t[5]!==i.icon||t[6]!==i.title?(n=s.jsx(J,{icon:i.icon,name:i.title,fallbackIcon:o}),t[5]=i.icon,t[6]=i.title,t[7]=n):n=t[7];let l;t[8]!==i.title?(l=s.jsx("p",{className:"text-sm text-foreground text-center leading-tight line-clamp-2",children:i.title}),t[8]=i.title,t[9]=l):l=t[9];let a;return t[10]!==r||t[11]!==f||t[12]!==n||t[13]!==l?(a=s.jsxs("button",{type:"button",onClick:r,className:m,"aria-label":f,children:[n,l]}),t[10]=r,t[11]=f,t[12]=n,t[13]=l,t[14]=a):a=t[14],a}function xe(e){const t=b.c(14),{virtualMcps:i,selectedVirtualMcpId:p,onVirtualMcpChange:c}=e,[r,m]=j.useState(!1),f=j.useRef(null);let o,n;t[0]!==r?(o=()=>{r&&setTimeout(()=>{f.current?.focus()},0)},n=[r],t[0]=r,t[1]=o,t[2]=n):(o=t[1],n=t[2]),j.useEffect(o,n);let l;t[3]!==c?(l=N=>{c(N),m(!1)},t[3]=c,t[4]=l):l=t[4];const a=l;let d;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=D("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors hover:bg-accent/30","cursor-pointer","self-stretch"),t[5]=d):d=t[5];let u;t[6]===Symbol.for("react.memo_cache_sentinel")?(u=s.jsx(ne,{asChild:!0,children:s.jsxs("button",{type:"button",className:d,"aria-label":"See all agents",children:[s.jsx("div",{className:"size-12 rounded-lg bg-accent flex items-center justify-center shrink-0",children:s.jsx(ue,{size:24,className:"text-foreground"})}),s.jsx("p",{className:"text-sm text-foreground text-center leading-tight",children:"See all"})]})}),t[6]=u):u=t[6];let x;t[7]!==a||t[8]!==p||t[9]!==i?(x=s.jsx(ae,{className:"w-[550px] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,children:s.jsx(le,{virtualMcps:i,selectedVirtualMcpId:p,onVirtualMcpChange:a,searchInputRef:f})}),t[7]=a,t[8]=p,t[9]=i,t[10]=x):x=t[10];let A;return t[11]!==r||t[12]!==x?(A=s.jsxs(ce,{open:r,onOpenChange:m,children:[u,x]}),t[11]=r,t[12]=x,t[13]=A):A=t[13],A}function he(){const e=b.c(20),t=fe(),{selectedVirtualMcp:i,setVirtualMcpId:p}=U();let c,r,m,f,o,n;if(e[0]!==t){o=Symbol.for("react.early_return_sentinel");e:{const x=t.filter(be).slice(0,6);if(x.length===0){o=null;break e}n=t.map(ge),m="w-full max-w-[800px]",e[7]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx("h2",{className:"text-sm font-medium text-muted-foreground mb-4",children:"Recently used agents"}),e[7]=f):f=e[7],c="grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",r=x.map(je)}e[0]=t,e[1]=c,e[2]=r,e[3]=m,e[4]=f,e[5]=o,e[6]=n}else c=e[1],r=e[2],m=e[3],f=e[4],o=e[5],n=e[6];if(o!==Symbol.for("react.early_return_sentinel"))return o;const l=i?.id??null;let a;e[8]!==p||e[9]!==l||e[10]!==n?(a=s.jsx(xe,{virtualMcps:n,selectedVirtualMcpId:l,onVirtualMcpChange:p}),e[8]=p,e[9]=l,e[10]=n,e[11]=a):a=e[11];let d;e[12]!==c||e[13]!==r||e[14]!==a?(d=s.jsxs("div",{className:c,children:[r,a]}),e[12]=c,e[13]=r,e[14]=a,e[15]=d):d=e[15];let u;return e[16]!==m||e[17]!==f||e[18]!==d?(u=s.jsxs("div",{className:m,children:[f,d]}),e[16]=m,e[17]=f,e[18]=d,e[19]=u):u=e[19],u}function je(e){return s.jsx(pe,{agent:e},e.id??"default")}function ge(e){return{id:e.id,title:e.title,description:e.description,icon:e.icon}}function be(e){return e.id!==null&&!me(e.id)}function Ne(){const e=b.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(q,{className:"h-5 w-40 mb-4"}),e[0]=t):t=e[0];let i;return e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsxs("div",{className:"w-full max-w-[800px]",children:[t,s.jsx("div",{className:"grid grid-cols-3 sm:grid-cols-4 md:grid-cols-7 gap-2",children:Array.from({length:7}).map(Ce)})]}),e[1]=i):i=e[1],i}function Ce(e,t){return s.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 self-stretch",children:[s.jsx(q,{className:"size-6 rounded-md shrink-0"}),s.jsx(q,{className:"h-4 w-full"})]},t)}function ve(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(j.Suspense,{fallback:s.jsx(Ne,{}),children:s.jsx(he,{})}),e[0]=t):t=e[0],t}function Se(){const e=b.c(50),{org:t}=te(),{data:i}=se.useSession(),{modelsConnections:p,isChatEmpty:c,activeTaskId:r,tasks:m,selectedVirtualMcp:f}=oe();let o;if(e[0]!==r||e[1]!==m){let g;e[3]!==r?(g=P=>P.id===r,e[3]=r,e[4]=g):g=e[4],o=m.find(g),e[0]=r,e[1]=m,e[2]=o}else o=e[2];const n=o,[l,a]=j.useState(!1);let d;e[5]!==i?.user?.name?(d=i?.user?.name?.split(" ")[0]||"there",e[5]=i?.user?.name,e[6]=d):d=e[6];const u=d;let x;e[7]!==t.id?(x=de(t.id),e[7]=t.id,e[8]=x):x=e[8];const N=f??x;if(p.length===0){let g,P;e[9]===Symbol.for("react.memo_cache_sentinel")?(g=s.jsx(R,{defaultSize:20,minSize:10,id:"tasks",order:1,children:s.jsx(G,{})}),P=s.jsx(F,{className:"bg-border/30"}),e[9]=g,e[10]=P):(g=e[9],P=e[10]);const W=l?50:80;let V;e[11]!==t?(V=s.jsx("div",{className:"flex flex-col h-full bg-background items-center justify-center",children:s.jsx(h.NoLlmBindingEmptyState,{org:t})}),e[11]=t,e[12]=V):V=e[12];let E;e[13]!==W||e[14]!==V?(E=s.jsx(R,{defaultSize:W,minSize:30,id:"main",order:2,children:V}),e[13]=W,e[14]=V,e[15]=E):E=e[15];let I;e[16]!==l?(I=l&&s.jsxs(s.Fragment,{children:[s.jsx(F,{className:"bg-border/30"}),s.jsx(R,{defaultSize:30,minSize:15,id:"context",order:3,children:s.jsx(Z,{onClose:()=>a(!1)})})]}),e[16]=l,e[17]=I):I=e[17];let B;return e[18]!==E||e[19]!==I?(B=s.jsxs(K,{direction:"horizontal",className:"size-full",children:[g,P,E,I]}),e[18]=E,e[19]=I,e[20]=B):B=e[20],B}let H,L;e[21]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(R,{defaultSize:20,minSize:10,id:"tasks",order:1,children:s.jsx(G,{})}),L=s.jsx(F,{className:"bg-border/30"}),e[21]=H,e[22]=L):(H=e[21],L=e[22]);const O=l?50:80;let C;e[23]!==n?(C=n?.title&&s.jsx(re,{taskId:n.id,text:n.title,className:"text-sm font-medium text-foreground"}),e[23]=n,e[24]=C):C=e[24];let v;e[25]!==C?(v=s.jsx($.Header.Left,{className:"gap-2",children:C}),e[25]=C,e[26]=v):v=e[26];let S;e[27]!==c||e[28]!==l?(S=!c&&s.jsx("button",{type:"button",onClick:()=>a(ye),className:D("flex size-7 items-center justify-center rounded-md border border-input hover:bg-accent transition-colors",l&&"bg-accent"),title:"Toggle context panel",children:s.jsx(X,{size:14,className:"text-muted-foreground"})}),e[27]=c,e[28]=l,e[29]=S):S=e[29];let y;e[30]!==S?(y=s.jsx($.Header.Right,{className:"gap-1",children:S}),e[30]=S,e[31]=y):y=e[31];let k;e[32]!==v||e[33]!==y?(k=s.jsxs($.Header,{className:"flex-none z-10 bg-background",children:[v,y]}),e[32]=v,e[33]=y,e[34]=k):k=e[34];let _;e[35]!==N||e[36]!==c||e[37]!==u?(_=c?s.jsxs("div",{className:"flex-1 min-h-0 flex flex-col items-center justify-center px-10 pb-32 pt-10",children:[s.jsxs("div",{className:"flex flex-col items-center w-full max-w-[600px]",children:[s.jsx("div",{className:"flex justify-center mb-4",children:s.jsx(J,{icon:N.icon,name:N.title,size:"md",fallbackIcon:s.jsx(Q,{size:20}),className:"size-12 rounded-xl border border-stone-200/60 shadow-sm aspect-square transition-opacity duration-200"})}),s.jsx("div",{className:"text-center mb-8",children:s.jsxs("p",{className:"text-xl font-medium text-foreground",children:["What's on your mind, ",u,"?"]})}),s.jsx("div",{className:"w-full",children:s.jsx(h.Input,{})}),s.jsx(h.IceBreakers,{className:"w-full"})]}),s.jsx("div",{className:"flex flex-col items-center w-full mt-4",children:s.jsx(ve,{})})]}):s.jsxs(s.Fragment,{children:[s.jsx(h.Main,{children:s.jsx(h.Messages,{})}),s.jsx(h.Footer,{children:s.jsx(h.Input,{onOpenContextPanel:()=>a(!0)})})]}),e[35]=N,e[36]=c,e[37]=u,e[38]=_):_=e[38];let z;e[39]!==k||e[40]!==_?(z=s.jsxs(h,{className:"h-full bg-background",children:[k,_]}),e[39]=k,e[40]=_,e[41]=z):z=e[41];let w;e[42]!==z||e[43]!==O?(w=s.jsx(R,{defaultSize:O,minSize:30,id:"main",order:2,children:z}),e[42]=z,e[43]=O,e[44]=w):w=e[44];let M;e[45]!==l?(M=l&&s.jsxs(s.Fragment,{children:[s.jsx(F,{className:"bg-border/30"}),s.jsx(R,{defaultSize:30,minSize:15,id:"context",order:3,children:s.jsx(Z,{onClose:()=>a(!1)})})]}),e[45]=l,e[46]=M):M=e[46];let T;return e[47]!==w||e[48]!==M?(T=s.jsxs(K,{direction:"horizontal",className:"size-full",children:[H,L,w,M]}),e[47]=w,e[48]=M,e[49]=T):T=e[49],T}function ye(e){return!e}function ke(e){const t=b.c(14),{error:i,onRetry:p}=e,c=i?.message?.includes("401")||i?.message?.toLowerCase().includes("unauthorized");let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r=s.jsxs($.Header,{className:"flex-none",children:[s.jsx($.Header.Left,{className:"gap-2"}),s.jsx($.Header.Right,{className:"gap-1"})]}),t[0]=r):r=t[0];let m;t[1]===Symbol.for("react.memo_cache_sentinel")?(m=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full mx-auto w-fit",children:s.jsx(Y,{className:"h-6 w-6 text-destructive"})}),t[1]=m):m=t[1];const f=c?"Unable to load models":"Something went wrong";let o;t[2]!==f?(o=s.jsx("h3",{className:"text-lg font-medium",children:f}),t[2]=f,t[3]=o):o=t[3];const n=c?"There was an authentication error while loading the models. This might be due to an expired session or invalid API key.":i?.message||"An unexpected error occurred";let l;t[4]!==n?(l=s.jsx("p",{className:"text-sm text-muted-foreground",children:n}),t[4]=n,t[5]=l):l=t[5];let a;t[6]!==o||t[7]!==l?(a=s.jsxs("div",{className:"space-y-2",children:[o,l]}),t[6]=o,t[7]=l,t[8]=a):a=t[8];let d;t[9]!==p?(d=s.jsx(ie,{variant:"outline",onClick:p,children:"Try again"}),t[9]=p,t[10]=d):d=t[10];let u;return t[11]!==a||t[12]!==d?(u=s.jsxs(h,{children:[r,s.jsx("div",{className:"flex-1 flex flex-col items-center justify-center p-6 text-center",children:s.jsxs("div",{className:"max-w-sm space-y-4",children:[m,a,d]})})]}),t[11]=a,t[12]=d,t[13]=u):u=t[13],u}function Ut(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(ee,{fallback:_e,children:s.jsx(j.Suspense,{fallback:s.jsx(h.Skeleton,{}),children:s.jsx(Se,{})})}),e[0]=t):t=e[0],t}function _e(e){const{error:t,resetError:i}=e;return s.jsx(ke,{error:t,onRetry:i})}export{Ut as default};
@@ -1 +1 @@
1
- import{c as Y,r as U,u as ne,K as oe,b_ as Re,j as s,v as ae,B as X,b as me,a1 as ue,a2 as fe,O as xe,d as Pe,aE as $e,b$ as ie,E as ke,aG as ze}from"./index-pgKDpBki.js";import{P as se}from"./index-CVG_d4yA.js";import{B as Le,a as Fe,b as Ee,c as Oe}from"./breadcrumb-CujpR_MZ.js";import{i as ge}from"./FilterLines-BpgGX9yW.js";import{n as pe}from"./Inbox01-C5ZLulCH.js";import{i as le}from"./Loading01-BI2pQIQK.js";import{i as he}from"./SearchMd-ChZ8IPer.js";import{u as je}from"./useQuery-D2_PHjUY.js";import{u as _e}from"./useInfiniteQuery-Bdn29uSf.js";import{a as Ke,f as Ae,b as Me}from"./registry-utils-bSQASXXu.js";import{u as ye,W as Be,a as De,f as Ge,b as We}from"./constants-Dm_YJHHh.js";import{u as Ve,a as ve,b as qe}from"./use-connection-DKYOa494.js";import{s as Ue}from"./slugify-CEUa2lfQ.js";import{C as He,E as Je}from"./collection-search-BRnhIyqo.js";import{M as ce}from"./mcp-server-card-BIb-sr8t.js";import{I as Qe}from"./input-BJSjp7-P.js";import{a as be,b as Ne,P as Ce}from"./popover-CKnAPgyb.js";import{i as Se}from"./Check-Bra2mpbB.js";import{t as we}from"./ChevronDown-DaSct-5t.js";import{s as re}from"./XClose-Dj2rcAfJ.js";import{s as Ye}from"./Plus-D8K5219B.js";import{u as Ze}from"./use-binding-PixlLrYo.js";import{L as Xe,u as et}from"./localstorage-keys-DBdiYnka.js";import"./tooltip-DH8hxvf2.js";import"./index-D18UlrU_.js";import"./ChevronRight-CIJzl8ei.js";import"./infiniteQueryObserver-CQfzmS7X.js";import"./use-collections-xijD0anf.js";import"./useMutation-B1zBeDkg.js";import"./CheckVerified02-DNjRDns-.js";import"./Globe02-BNWDh1xg.js";import"./Lock01-iA8k6E0L.js";import"./Terminal-BmCZxpDC.js";import"./card-BnvIiB1g.js";import"./integration-icon-Bh8tJtce.js";import"./Container-BQAhl1Ij.js";import"./github-icon-Dp3wHhYE.js";import"./binder-D8_pfz0c.js";function tt(t,e){const r=Y.c(4),[l,m]=U.useState(t),n=U.useRef(null),i=U.useRef(!0);let d,a;return r[0]!==e||r[1]!==t?(d=()=>{if(i.current){i.current=!1;return}return n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{m(t)},e),()=>{n.current&&clearTimeout(n.current)}},a=[t,e],r[0]=e,r[1]=t,r[2]=d,r[3]=a):(d=r[2],a=r[3]),U.useEffect(d,a),l}function st(t){const e=Y.c(14),r=U.useRef(null),l=`scroll-position:${t}`,m=U.useRef(null);let n;e[0]!==l?(n=()=>{r.current&&sessionStorage.setItem(l,String(r.current.scrollTop))},e[0]=l,e[1]=n):n=e[1];const i=n;let d;e[2]!==l?(d=()=>{if(m.current===l)return;const f=sessionStorage.getItem(l);if(f&&r.current){const k=Number.parseInt(f,10);r.current.scrollTop=k}m.current=l},e[2]=l,e[3]=d):d=e[3];const a=d;let u;e[4]!==a||e[5]!==l?(u=()=>{m.current!==l&&a()},e[4]=a,e[5]=l,e[6]=u):u=e[6];const I=u;let o;e[7]!==a||e[8]!==l?(o=f=>{r.current=f,f&&m.current!==l&&requestAnimationFrame(()=>{a()})},e[7]=a,e[8]=l,e[9]=o):o=e[9];const p=o;let c;return e[10]!==I||e[11]!==i||e[12]!==p?(c={scrollRef:p,saveScrollPosition:i,handleScroll:I},e[10]=I,e[11]=i,e[12]=p,e[13]=c):c=e[13],c}const rt=24;function lt(t){const e=Y.c(54),{registryId:r,listToolName:l,filtersToolName:m,search:n}=t,{org:i}=ne();let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=[],e[0]=d):d=e[0];const[a,u]=U.useState(d);let I;e[1]===Symbol.for("react.memo_cache_sentinel")?(I=[],e[1]=I):I=e[1];const[o,p]=U.useState(I),c=r||null;let f;e[2]!==i.id||e[3]!==c?(f={connectionId:c,orgId:i.id},e[2]=i.id,e[3]=c,e[4]=f):f=e[4];const k=ye(f),T=!!m;let C;e[5]!==m||e[6]!==r?(C=oe.toolCall(r,m||"no-filters","{}"),e[5]=m,e[6]=r,e[7]=C):C=e[7];let h;e[8]!==k||e[9]!==m?(h=async()=>{if(!m)return{tags:[],categories:[]};const K=await k.callTool({name:m,arguments:{}});return K.structuredContent??K},e[8]=k,e[9]=m,e[10]=h):h=e[10];let F;e[11]!==C||e[12]!==h?(F={queryKey:C,queryFn:h,staleTime:36e5,retry:2},e[11]=C,e[12]=h,e[13]=F):F=e[13];const{data:S}=je(F);let j,b,$;if(e[14]!==l||e[15]!==r||e[16]!==n||e[17]!==o||e[18]!==a){const K=n?.trim()?{operator:"or",conditions:[{field:["name"],operator:"contains",value:n},{field:["title"],operator:"contains",value:n},{field:["description"],operator:"contains",value:n}]}:void 0;j={limit:rt,...a.length>0&&{tags:a},...o.length>0&&{categories:o},...K&&{where:K}},$=_e,b=oe.toolCall(r,l,JSON.stringify(j)),e[14]=l,e[15]=r,e[16]=n,e[17]=o,e[18]=a,e[19]=j,e[20]=b,e[21]=$}else j=e[19],b=e[20],$=e[21];let R;e[22]!==k||e[23]!==j||e[24]!==l?(R=async K=>{const{pageParam:Z}=K,ee=Z?{...j,cursor:Z}:j,v=await k.callTool({name:l,arguments:ee});return v.structuredContent??v},e[22]=k,e[23]=j,e[24]=l,e[25]=R):R=e[25];let P;e[26]!==R||e[27]!==b?(P={queryKey:b,queryFn:R,initialPageParam:void 0,getNextPageParam:nt,staleTime:36e5,placeholderData:Re,retry:2},e[26]=R,e[27]=b,e[28]=P):P=e[28];const{data:N,fetchNextPage:w,hasNextPage:g,isFetchingNextPage:x,isFetching:y,isLoading:z,error:L}=$(P);let _;e:{if(!N?.pages||N.pages.length===0){_=null;break e}const K=N.pages[0];if(typeof K=="object"&&K!==null&&"totalCount"in K&&typeof K.totalCount=="number"){_=K.totalCount;break e}_=null}const A=_,O=N?.pages;let W;e[29]!==O?(W=Ke(O),e[29]=O,e[30]=W):W=e[30];const J=W;let B;e[31]!==n||e[32]!==o.length||e[33]!==a.length?(B=a.length>0||o.length>0||!!n?.trim(),e[31]=n,e[32]=o.length,e[33]=a.length,e[34]=B):B=e[34];const V=B,q=y&&!x&&!z&&V;let D;e[35]!==w||e[36]!==g||e[37]!==x?(D=()=>{g&&!x&&w()},e[35]=w,e[36]=g,e[37]=x,e[38]=D):D=e[38];const H=D,E=g??!1,M=T?S?.tags:void 0,G=T?S?.categories:void 0;let Q;return e[39]!==V||e[40]!==y||e[41]!==x||e[42]!==q||e[43]!==z||e[44]!==J||e[45]!==L||e[46]!==H||e[47]!==o||e[48]!==a||e[49]!==E||e[50]!==M||e[51]!==G||e[52]!==A?(Q={items:J,totalCount:A,hasMore:E,isLoadingMore:x,isFiltering:q,isInitialLoading:z,isFetching:y,error:L,loadMore:H,availableTags:M,availableCategories:G,selectedTags:a,selectedCategories:o,setSelectedTags:u,setSelectedCategories:p,hasActiveFilters:V},e[39]=V,e[40]=y,e[41]=x,e[42]=q,e[43]=z,e[44]=J,e[45]=L,e[46]=H,e[47]=o,e[48]=a,e[49]=E,e[50]=M,e[51]=G,e[52]=A,e[53]=Q):Q=e[53],Q}function nt(t){if(typeof t=="object"&&t!==null){const e=t.nextCursor||t.cursor;if(e)return e}}function it(t,e){return[...t].sort((r,l)=>l.count-r.count).slice(0,e)}function de(t){const e=Y.c(52),{label:r,items:l,selectedItems:m,onToggle:n,onClear:i}=t,[d,a]=U.useState(""),[u,I]=U.useState(!1);let o,p,c,f,k,T,C,h,F,S,j;if(e[0]!==l||e[1]!==r||e[2]!==n||e[3]!==u||e[4]!==d||e[5]!==m){const w=[...d?l.filter(O=>O.value.toLowerCase().includes(d.toLowerCase())):l].sort(ot);c=m.length,p=be,F=u,S=I;let g;e[17]!==r?(g=s.jsx("span",{children:r}),e[17]=r,e[18]=g):g=e[18];let x;e[19]!==c?(x=c>0&&s.jsx("span",{className:"ml-1 rounded-full bg-primary text-primary-foreground px-1.5 py-0.5 text-[10px] font-medium",children:c}),e[19]=c,e[20]=x):x=e[20];let y;e[21]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(we,{size:14,className:"opacity-50"}),e[21]=y):y=e[21],e[22]!==x||e[23]!==g?(j=s.jsx(Ne,{asChild:!0,children:s.jsxs(X,{variant:"outline",size:"sm",className:"h-7 px-3 gap-1.5 text-xs font-normal flex-1",children:[g,x,y]})}),e[22]=x,e[23]=g,e[24]=j):j=e[24],o=Ce,T="w-64 p-0",C="start";let z;e[25]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(he,{size:16,className:"text-muted-foreground shrink-0"}),e[25]=z):z=e[25];let L;e[26]!==r?(L=r.toLowerCase(),e[26]=r,e[27]=L):L=e[27];const _=`Search ${L}...`;let A;e[28]===Symbol.for("react.memo_cache_sentinel")?(A=O=>a(O.target.value),e[28]=A):A=e[28],e[29]!==d||e[30]!==_?(h=s.jsx("div",{className:"shrink-0 w-full border-b border-border h-10",children:s.jsxs("label",{className:"flex items-center gap-2.5 h-10 px-4 cursor-text",children:[z,s.jsx(Qe,{type:"text",placeholder:_,value:d,onChange:A,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]})}),e[29]=d,e[30]=_,e[31]=h):h=e[31],f="max-h-64 overflow-y-auto p-1 flex flex-col gap-1",k=w.length===0?s.jsx("div",{className:"px-2 py-4 text-sm text-muted-foreground text-center",children:"No results found"}):w.map(O=>{const W=m.includes(O.value);return s.jsxs("button",{onClick:()=>n(O.value),className:ae("w-full flex items-center justify-between px-2 py-1.5 text-sm rounded cursor-pointer transition-colors",W?"bg-accent/50 text-foreground":"hover:bg-muted text-foreground"),children:[s.jsxs("span",{className:"truncate flex items-center gap-2",children:[W&&s.jsx(Se,{size:16,className:"text-muted-foreground shrink-0"}),O.value]}),s.jsx("span",{className:"text-xs text-muted-foreground ml-2 shrink-0",children:O.count})]},O.value)}),e[0]=l,e[1]=r,e[2]=n,e[3]=u,e[4]=d,e[5]=m,e[6]=o,e[7]=p,e[8]=c,e[9]=f,e[10]=k,e[11]=T,e[12]=C,e[13]=h,e[14]=F,e[15]=S,e[16]=j}else o=e[6],p=e[7],c=e[8],f=e[9],k=e[10],T=e[11],C=e[12],h=e[13],F=e[14],S=e[15],j=e[16];let b;e[32]!==f||e[33]!==k?(b=s.jsx("div",{className:f,children:k}),e[32]=f,e[33]=k,e[34]=b):b=e[34];let $;e[35]!==r||e[36]!==i||e[37]!==c?($=c>0&&s.jsx("div",{className:"p-2 border-t border-border",children:s.jsxs(X,{variant:"ghost",size:"sm",onClick:i,className:"w-full text-xs text-muted-foreground hover:text-foreground",children:["Clear ",r.toLowerCase()]})}),e[35]=r,e[36]=i,e[37]=c,e[38]=$):$=e[38];let R;e[39]!==o||e[40]!==$||e[41]!==T||e[42]!==C||e[43]!==h||e[44]!==b?(R=s.jsxs(o,{className:T,align:C,children:[h,b,$]}),e[39]=o,e[40]=$,e[41]=T,e[42]=C,e[43]=h,e[44]=b,e[45]=R):R=e[45];let P;return e[46]!==p||e[47]!==R||e[48]!==F||e[49]!==S||e[50]!==j?(P=s.jsxs(p,{open:F,onOpenChange:S,children:[j,R]}),e[46]=p,e[47]=R,e[48]=F,e[49]=S,e[50]=j,e[51]=P):P=e[51],P}function ot(t,e){return e.count-t.count}function at(t){const e=Y.c(67),{availableTags:r,availableCategories:l,selectedTags:m,selectedCategories:n,onTagChange:i,onCategoryChange:d}=t,a=r&&r.length>0||l&&l.length>0,u=m.length>0||n.length>0;if(!a)return null;let I;e[0]!==i||e[1]!==m?(I=g=>{m.includes(g)?i(m.filter(x=>x!==g)):i([...m,g])},e[0]=i,e[1]=m,e[2]=I):I=e[2];const o=I;let p;e[3]!==d||e[4]!==n?(p=g=>{n.includes(g)?d(n.filter(x=>x!==g)):d([...n,g])},e[3]=d,e[4]=n,e[5]=p):p=e[5];const c=p;let f;e[6]!==d||e[7]!==i?(f=()=>{i([]),d([])},e[6]=d,e[7]=i,e[8]=f):f=e[8];const k=f;let T,C,h,F,S,j,b;if(e[9]!==l||e[10]!==r||e[11]!==d||e[12]!==i||e[13]!==n||e[14]!==m||e[15]!==c||e[16]!==o){const g=l?it(l,6):[];T=n,C=m,b=new Set(g.map(ct)),S="flex items-center border-b border-border";let x;e[24]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"flex items-center gap-2 text-muted-foreground",children:s.jsx(ge,{size:16})}),e[24]=x):x=e[24];let y;e[25]!==l||e[26]!==d||e[27]!==n||e[28]!==c?(y=l&&l.length>0&&s.jsx(de,{label:"Categories",items:l,selectedItems:n,onToggle:c,onClear:()=>d([])}),e[25]=l,e[26]=d,e[27]=n,e[28]=c,e[29]=y):y=e[29];let z;e[30]!==r||e[31]!==i||e[32]!==m||e[33]!==o?(z=r&&r.length>0&&s.jsx(de,{label:"Tags",items:r,selectedItems:m,onToggle:o,onClear:()=>i([])}),e[30]=r,e[31]=i,e[32]=m,e[33]=o,e[34]=z):z=e[34],e[35]!==z||e[36]!==y?(j=s.jsxs("div",{className:"flex items-center gap-3 flex-wrap px-5 py-3 border-r border-border",children:[x,y,z]}),e[35]=z,e[36]=y,e[37]=j):j=e[37],h="flex items-center gap-3 flex-wrap px-5 py-3";let L;e[38]!==n||e[39]!==c?(L=_=>{const A=n.includes(_.value);return s.jsxs("div",{onClick:()=>c(_.value),className:ae("inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer",A?"bg-primary text-primary-foreground hover:bg-primary/80":"bg-muted hover:bg-accent text-muted-foreground"),children:[s.jsx("span",{children:_.value}),A&&s.jsx("span",{onClick:O=>{O.stopPropagation(),c(_.value)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},_.value)},e[38]=n,e[39]=c,e[40]=L):L=e[40],F=g.map(L),e[9]=l,e[10]=r,e[11]=d,e[12]=i,e[13]=n,e[14]=m,e[15]=c,e[16]=o,e[17]=T,e[18]=C,e[19]=h,e[20]=F,e[21]=S,e[22]=j,e[23]=b}else T=e[17],C=e[18],h=e[19],F=e[20],S=e[21],j=e[22],b=e[23];let $;if(e[41]!==T||e[42]!==c||e[43]!==b){let g;e[45]!==b?(g=y=>!b.has(y),e[45]=b,e[46]=g):g=e[46];let x;e[47]!==c?(x=y=>s.jsxs("div",{onClick:()=>c(y),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[s.jsx("span",{children:y}),s.jsx("span",{onClick:z=>{z.stopPropagation(),c(y)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},`cat-${y}`),e[47]=c,e[48]=x):x=e[48],$=T.filter(g).map(x),e[41]=T,e[42]=c,e[43]=b,e[44]=$}else $=e[44];let R;if(e[49]!==C||e[50]!==o){let g;e[52]!==o?(g=x=>s.jsxs("div",{onClick:()=>o(x),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[s.jsx("span",{children:x}),s.jsx("span",{onClick:y=>{y.stopPropagation(),o(x)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},`tag-${x}`),e[52]=o,e[53]=g):g=e[53],R=C.map(g),e[49]=C,e[50]=o,e[51]=R}else R=e[51];let P;e[54]!==k||e[55]!==u?(P=u&&s.jsxs(X,{variant:"ghost",size:"sm",onClick:k,className:"h-7 text-xs text-muted-foreground hover:text-foreground gap-1 px-2",children:[s.jsx(re,{size:14}),"Clear all"]}),e[54]=k,e[55]=u,e[56]=P):P=e[56];let N;e[57]!==P||e[58]!==h||e[59]!==F||e[60]!==$||e[61]!==R?(N=s.jsxs("div",{className:h,children:[F,$,R,P]}),e[57]=P,e[58]=h,e[59]=F,e[60]=$,e[61]=R,e[62]=N):N=e[62];let w;return e[63]!==N||e[64]!==S||e[65]!==j?(w=s.jsxs("div",{className:S,children:[j,N]}),e[63]=N,e[64]=S,e[65]=j,e[66]=w):w=e[66],w}function ct(t){return t.value}function dt(t,e){if(!e)return t;const r=e.toLowerCase();return t.filter(l=>(l.name||l.title||"").toLowerCase().includes(r)||(l.description||l.server?.description||"").toLowerCase().includes(r))}function mt(t){return t.verified===!0||t._meta?.["mcp.mesh"]?.verified===!0}function ut(t){const e=Y.c(55),{registryId:r,listToolName:l,filtersToolName:m,storePrivateOnly:n}=t,[i,d]=U.useState(""),a=tt(i,300),u=me(),{org:I}=ne(),{scrollRef:o,saveScrollPosition:p,handleScroll:c}=st(`store-discovery:${r}`);let f;e[0]!==a||e[1]!==m||e[2]!==l||e[3]!==r?(f={registryId:r,listToolName:l,filtersToolName:m,search:a},e[0]=a,e[1]=m,e[2]=l,e[3]=r,e[4]=f):f=e[4];const{items:k,hasMore:T,isLoadingMore:C,isInitialLoading:h,isFetching:F,error:S,loadMore:j,availableTags:b,availableCategories:$,selectedTags:R,selectedCategories:P,setSelectedTags:N,setSelectedCategories:w,hasActiveFilters:g}=lt(f);let x,y,z,L;if(e[5]!==a||e[6]!==F||e[7]!==h||e[8]!==k||e[9]!==i||e[10]!==n){const E=i?dt(k,i):k;L=n?E.filter(xt):E,x=(i!==a||F)&&!h&&!!i,z=L.filter(mt),y=L.filter(M=>!z.find(G=>G.id===M.id)),e[5]=a,e[6]=F,e[7]=h,e[8]=k,e[9]=i,e[10]=n,e[11]=x,e[12]=y,e[13]=z,e[14]=L}else x=e[11],y=e[12],z=e[13],L=e[14];const _=y;let A;e[15]!==u||e[16]!==I.slug||e[17]!==r||e[18]!==p?(A=E=>{p();const M=Ue(E.name||E.title||E.server?.title||""),G=typeof E.id=="string"&&E.id.includes("/"),Q=typeof E.server?.name=="string"&&E.server.name.includes("/"),K=G&&!Q?E.id:E.server?.name||E.id||"";u({to:"/$org/$project/store/$appName",params:{org:I.slug,project:xe,appName:M},search:{registryId:r,serverName:K}})},e[15]=u,e[16]=I.slug,e[17]=r,e[18]=p,e[19]=A):A=e[19];const O=A;let W;e[20]!==c||e[21]!==T||e[22]!==C||e[23]!==j?(W=E=>{if(c(),!T||C)return;const M=E.currentTarget;M.scrollHeight-M.scrollTop-M.clientHeight<200&&j()},e[20]=c,e[21]=T,e[22]=C,e[23]=j,e[24]=W):W=e[24];const J=W;let B;e[25]!==x||e[26]!==i?(B=s.jsx(He,{value:i,onChange:d,placeholder:"Search for an MCP Server...",isSearching:x}),e[25]=x,e[26]=i,e[27]=B):B=e[27];let V;e[28]!==$||e[29]!==b||e[30]!==P||e[31]!==R||e[32]!==w||e[33]!==N?(V=s.jsx(at,{availableTags:b,availableCategories:$,selectedTags:R,selectedCategories:P,onTagChange:N,onCategoryChange:w}),e[28]=$,e[29]=b,e[30]=P,e[31]=R,e[32]=w,e[33]=N,e[34]=V):V=e[34];let q;e[35]!==_||e[36]!==S||e[37]!==O||e[38]!==g||e[39]!==T||e[40]!==h||e[41]!==C||e[42]!==x||e[43]!==i||e[44]!==z||e[45]!==L?(q=s.jsx("div",{className:"p-5",children:s.jsx("div",{children:S&&!h?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center space-y-4",children:[s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:s.jsx(ue,{className:"size-8 text-destructive"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Registry unavailable"}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"Could not load items from this registry. It may be temporarily offline."}),S.message&&s.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:S.message})]}),s.jsxs(X,{variant:"outline",size:"sm",onClick:ft,children:[s.jsx(fe,{className:"size-4"}),"Try again"]})]}):h?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading items..."})]}):L.length===0&&!g?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(pe,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No items available"}),s.jsx("p",{className:"text-muted-foreground",children:"This store doesn't have any available items yet."})]}):L.length===0&&g&&!i?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(ge,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No matching items"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your filters to find more results."})]}):i&&L.length===0&&!x?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(he,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No results found"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your search terms."})]}):s.jsxs("div",{className:"flex flex-col gap-8",children:[x&&L.length===0&&s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Searching..."})]}),z.length>0&&s.jsx(ce,{items:z,title:"Verified",onItemClick:O}),_.length>0&&s.jsx(ce,{items:_,title:z.length>0?"All":"",onItemClick:O}),T&&C&&s.jsx("div",{className:"flex justify-center py-8",children:s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(le,{size:20,className:"animate-spin"}),s.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[35]=_,e[36]=S,e[37]=O,e[38]=g,e[39]=T,e[40]=h,e[41]=C,e[42]=x,e[43]=i,e[44]=z,e[45]=L,e[46]=q):q=e[46];let D;e[47]!==J||e[48]!==o||e[49]!==q?(D=s.jsx("div",{ref:o,className:"flex-1 overflow-y-auto",onScroll:J,children:q}),e[47]=J,e[48]=o,e[49]=q,e[50]=D):D=e[50];let H;return e[51]!==B||e[52]!==V||e[53]!==D?(H=s.jsxs("div",{className:"flex flex-col h-full",children:[B,V,D]}),e[51]=B,e[52]=V,e[53]=D,e[54]=H):H=e[54],H}function ft(){return window.location.reload()}function xt(t){return t.is_public!==!0}function gt(t){const e=Y.c(11),{registryId:r,storePrivateOnly:l}=t,m=Ve(r),n=m?.tools;let i;e[0]!==n?(i=Ae(n),e[0]=n,e[1]=i):i=e[1];const d=i;if(!d){let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"bg-muted p-3 rounded-full",children:s.jsx(pe,{className:"size-8 text-muted-foreground"})}),e[2]=c):c=e[2];let f;return e[3]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-12 text-center space-y-4",children:[c,s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Registry not available"}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"This registry does not support listing store items, or the connection is not responding."})]})]}),e[3]=f):f=e[3],f}const a=m?.tools;let u;e[4]!==a?(u=Me(a),e[4]=a,e[5]=u):u=e[5];const o=u||void 0;let p;return e[6]!==d||e[7]!==r||e[8]!==l||e[9]!==o?(p=s.jsx(ut,{registryId:r,listToolName:d,filtersToolName:o,storePrivateOnly:l}),e[6]=d,e[7]=r,e[8]=l,e[9]=o,e[10]=p):p=e[10],p}function pt(t){const e=Y.c(43),{registries:r,value:l,onValueChange:m,onAddWellKnown:n,wellKnownRegistries:i,placeholder:d}=t,a=d===void 0?"Select a registry...":d,[u,I]=U.useState(!1);let o,p,c,f,k,T,C,h;if(e[0]!==u||e[1]!==a||e[2]!==r||e[3]!==l){let N;e[12]!==l?(N=g=>g.id===l,e[12]=l,e[13]=N):N=e[13];const w=r.find(N);p=be,C=u,h=I,o=Ne,T=!0,c="button",e[14]===Symbol.for("react.memo_cache_sentinel")?(f=ae("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] h-7 min-w-[160px]"),e[14]=f):f=e[14],k=w?s.jsxs("span",{className:"flex items-center gap-2",children:[w.icon?s.jsx("img",{src:w.icon,alt:w.name,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:w.name.slice(0,1).toUpperCase()}),s.jsx("span",{children:w.name})]}):s.jsx("span",{className:"text-muted-foreground",children:a}),e[0]=u,e[1]=a,e[2]=r,e[3]=l,e[4]=o,e[5]=p,e[6]=c,e[7]=f,e[8]=k,e[9]=T,e[10]=C,e[11]=h}else o=e[4],p=e[5],c=e[6],f=e[7],k=e[8],T=e[9],C=e[10],h=e[11];let F;e[15]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(we,{className:"size-4 opacity-50"}),e[15]=F):F=e[15];let S;e[16]!==c||e[17]!==f||e[18]!==k?(S=s.jsxs("button",{type:c,className:f,children:[k,F]}),e[16]=c,e[17]=f,e[18]=k,e[19]=S):S=e[19];let j;e[20]!==o||e[21]!==T||e[22]!==S?(j=s.jsx(o,{asChild:T,children:S}),e[20]=o,e[21]=T,e[22]=S,e[23]=j):j=e[23];let b;if(e[24]!==m||e[25]!==r||e[26]!==l){let N;e[28]!==m||e[29]!==l?(N=w=>s.jsxs("button",{type:"button",onClick:()=>{m(w.id??w.name),I(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[w.icon?s.jsx("img",{src:w.icon,alt:w.name,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:w.name.slice(0,1).toUpperCase()}),s.jsx("span",{children:w.name})]}),l===(w.id??w.name)&&s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:s.jsx(Se,{className:"size-4"})})]},w.id??w.name),e[28]=m,e[29]=l,e[30]=N):N=e[30],b=r.map(N),e[24]=m,e[25]=r,e[26]=l,e[27]=b}else b=e[27];let $;e[31]!==n||e[32]!==i?($=i.length>0&&s.jsxs("div",{className:"border-t border-border pt-1 mt-1",children:[s.jsx("p",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Other known registries"}),i.map(N=>s.jsxs("button",{type:"button",onClick:()=>{n(N),I(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[N.icon?s.jsx("img",{src:N.icon,alt:N.title,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:N.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"flex-1",children:N.title})]}),s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center text-muted-foreground",children:s.jsx(Ye,{size:16})})]},N.id??N.title))]}),e[31]=n,e[32]=i,e[33]=$):$=e[33];let R;e[34]!==b||e[35]!==$?(R=s.jsxs(Ce,{align:"end",className:"w-auto min-w-[200px] p-1",children:[b,$]}),e[34]=b,e[35]=$,e[36]=R):R=e[36];let P;return e[37]!==p||e[38]!==j||e[39]!==R||e[40]!==C||e[41]!==h?(P=s.jsxs(p,{open:C,onOpenChange:h,children:[j,R]}),e[37]=p,e[38]=j,e[39]=R,e[40]=C,e[41]=h,e[42]=P):P=e[42],P}function ht({registries:t,onConnected:e}){const r=ve(),{org:{slug:l}}=ne(),{data:m}=Pe.useSession(),n=me(),[i,d]=U.useState(!1),a=t[0],u=async()=>{if(!(!a||!m?.user?.id)){d(!0);try{const o=await r.create.mutateAsync(a);e?.(o.id)}finally{d(!1)}}},I=()=>{n({to:"/$org/$project/mcps",params:{org:l,project:xe},search:{action:"create"}})};return s.jsx(Je,{image:s.jsx("img",{src:"/store-empty-state.svg",alt:"No store connected",width:336,height:320,className:"max-w-full h-auto"}),title:"Connect to registry",description:"Connect to discover and use Connections from the community.",actions:s.jsxs(s.Fragment,{children:[s.jsxs(X,{variant:"outline",onClick:u,disabled:i||!a,children:[a?.icon&&s.jsx("img",{src:a.icon,alt:"",className:"size-4"}),i?"Installing...":"Install Registry"]}),s.jsx(X,{variant:"outline",onClick:I,children:"Custom Connection"})]})})}function jt(t){const e=Y.c(15),{error:r,onRetry:l,registryName:m}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:s.jsx(ue,{className:"h-6 w-6 text-destructive"})}),e[0]=n):n=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("h3",{className:"text-lg font-medium",children:"Unable to load store"}),e[1]=i):i=e[1];let d;e[2]!==m?(d=s.jsxs("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:["The ",s.jsx("strong",{children:m})," registry is currently unreachable. This may be a temporary issue — try again in a moment."]}),e[2]=m,e[3]=d):d=e[3];let a;e[4]!==r?(a=r?.message&&s.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:r.message}),e[4]=r,e[5]=a):a=e[5];let u;e[6]!==d||e[7]!==a?(u=s.jsxs("div",{className:"space-y-2",children:[i,d,a]}),e[6]=d,e[7]=a,e[8]=u):u=e[8];let I;e[9]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(fe,{className:"size-4"}),e[9]=I):I=e[9];let o;e[10]!==l?(o=s.jsxs(X,{variant:"outline",size:"sm",onClick:l,children:[I,"Try again"]}),e[10]=l,e[11]=o):o=e[11];let p;return e[12]!==u||e[13]!==o?(p=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[n,u,o]}),e[12]=u,e[13]=o,e[14]=p):p=e[14],p}function ns(){const t=Y.c(53),{org:e,project:r}=ne(),l=qe(),m=ve(),n=$e(),i=n.location.pathname.includes("/store/")&&n.location.pathname.split("/").length>3,d=Ze(l);let a;t[0]!==e.id?(a=Be.SELF(e.id),t[0]=e.id,t[1]=a):a=t[1];const u=a,I=r.enabledPlugins,o=I==null||I.includes(ie);let p;t[2]!==u?(p=(v,te)=>v.id===u?1:te.id===u?-1:0,t[2]=u,t[3]=p):p=t[3];const c=d.filter(v=>v.id!==u?!0:o).sort(p);let f;t[4]!==u?(f=v=>v.id===u,t[4]=u,t[5]=f):f=t[5];const k=c.some(f);let T;t[6]!==e.id?(T={connectionId:De,orgId:e.id},t[6]=e.id,t[7]=T):T=t[7];const C=ye(T);let h;t[8]!==r.id||t[9]!==C?(h=async()=>{const v=await C.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:r.id,pluginId:ie}});return v.structuredContent??v},t[8]=r.id,t[9]=C,t[10]=h):h=t[10];const{data:F}=je({queryKey:oe.projectPluginConfig(r.id??"",ie),queryFn:h,enabled:k&&!!r.id,staleTime:6e4}),S=F?.config?.settings;let j;t[11]!==S||t[12]!==u?(j=v=>v.id===u&&S?{id:v.id,name:S.registryName||v.title,icon:S.registryIcon||v.icon||void 0}:{id:v.id,name:v.title,icon:v.icon||void 0},t[11]=S,t[12]=u,t[13]=j):j=t[13];const b=c.map(j);let $;t[14]!==e.slug?($=Xe.selectedRegistry(e.slug),t[14]=e.slug,t[15]=$):$=t[15];const[R,P]=et($,vt);let N;t[16]!==R?(N=v=>v.id===R,t[16]=R,t[17]=N):N=t[17];const w=c.find(N);let g;t[18]!==u?(g=v=>v.id!==u,t[18]=u,t[19]=g):g=t[19];const x=c.find(g),y=w?.id||x?.id||c[0]?.id||"",z=y===u&&S?.storePrivateOnly===!0;let L;t[20]!==e.id?(L=Ge(e.id),t[20]=e.id,t[21]=L):L=t[21];let _;t[22]!==L?(_=[L],t[22]=L,t[23]=_):_=t[23];const A=_;let O;t[24]===Symbol.for("react.memo_cache_sentinel")?(O=[We()],t[24]=O):O=t[24];const W=O;let J;t[25]!==m.create||t[26]!==P?(J=async v=>{const te=await m.create.mutateAsync(v);P(te.id)},t[25]=m.create,t[26]=P,t[27]=J):J=t[27];const B=J,V=new Set(c.map(yt)),q=A.filter(v=>v.id&&!V.has(v.id)),D=W.filter(v=>v.id&&!V.has(v.id));if(i){let v;return t[28]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(ze,{}),t[28]=v):v=t[28],v}let H;t[29]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(se.Header.Left,{children:s.jsx(Le,{children:s.jsx(Fe,{children:s.jsx(Ee,{children:s.jsx(Oe,{children:"Store"})})})})}),t[29]=H):H=t[29];let E;t[30]!==B?(E=async v=>B(v),t[30]=B,t[31]=E):E=t[31];let M;t[32]!==q||t[33]!==y||t[34]!==b||t[35]!==P||t[36]!==E?(M=s.jsxs(se.Header,{children:[H,s.jsx(se.Header.Right,{children:s.jsx(pt,{wellKnownRegistries:q,registries:b,value:y,onValueChange:P,onAddWellKnown:E,placeholder:"Select store..."})})]}),t[32]=q,t[33]=y,t[34]=b,t[35]=P,t[36]=E,t[37]=M):M=t[37];let G;t[38]!==y||t[39]!==b?(G=v=>{const{error:te,resetError:Ie}=v;return s.jsx(jt,{error:te,onRetry:Ie,registryName:b.find(Te=>Te.id===y)?.name??"registry"})},t[38]=y,t[39]=b,t[40]=G):G=t[40];let Q;t[41]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading store items..."})]}),t[41]=Q):Q=t[41];let K;t[42]!==D||t[43]!==y||t[44]!==P||t[45]!==z?(K=s.jsx(U.Suspense,{fallback:Q,children:y?s.jsx(gt,{registryId:y,storePrivateOnly:z}):s.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:s.jsx(ht,{registries:D,onConnected:v=>{P(v)}})})}),t[42]=D,t[43]=y,t[44]=P,t[45]=z,t[46]=K):K=t[46];let Z;t[47]!==G||t[48]!==K?(Z=s.jsx(se.Content,{children:s.jsx(ke,{fallback:G,children:K})}),t[47]=G,t[48]=K,t[49]=Z):Z=t[49];let ee;return t[50]!==M||t[51]!==Z?(ee=s.jsxs(se,{children:[M,Z]}),t[50]=M,t[51]=Z,t[52]=ee):ee=t[52],ee}function yt(t){return t.id}function vt(t){return t??""}export{ns as default};
1
+ import{c as Y,r as U,u as ne,K as oe,b_ as Re,j as s,v as ae,B as X,b as me,a1 as ue,a2 as fe,O as xe,d as Pe,aE as $e,b$ as ie,E as ke,aG as ze}from"./index-KAycGEnT.js";import{P as se}from"./index-A_CnuSis.js";import{B as Le,a as Fe,b as Ee,c as Oe}from"./breadcrumb-DPLSdTx1.js";import{i as ge}from"./FilterLines-CsjQLyQm.js";import{n as pe}from"./Inbox01-CjHNjCjB.js";import{i as le}from"./Loading01-DF5pxnn8.js";import{i as he}from"./SearchMd-u1QGwQkU.js";import{u as je}from"./useQuery-DCrAUBx5.js";import{u as _e}from"./useInfiniteQuery-Clfr9I7T.js";import{a as Ke,f as Ae,b as Me}from"./registry-utils-BJRD11-o.js";import{u as ye,W as Be,a as De,f as Ge,b as We}from"./constants-CRvMLa9p.js";import{u as Ve,a as ve,b as qe}from"./use-connection-DWTVYLGI.js";import{s as Ue}from"./slugify-CEUa2lfQ.js";import{C as He,E as Je}from"./collection-search-Dl5JvsI0.js";import{M as ce}from"./mcp-server-card-B0UwO4c6.js";import{I as Qe}from"./input-s8rw5Kfa.js";import{a as be,b as Ne,P as Ce}from"./popover-DSO1tjgf.js";import{i as Se}from"./Check-DXoRcZpn.js";import{t as we}from"./ChevronDown-D04Buvau.js";import{s as re}from"./XClose-BIpOBHWg.js";import{s as Ye}from"./Plus-CEtl-Eq7.js";import{u as Ze}from"./use-binding-eAl0-ngZ.js";import{L as Xe,u as et}from"./localstorage-keys-DK1Id_ip.js";import"./tooltip-BD36KVkP.js";import"./index-B7Bu7nQ7.js";import"./ChevronRight-CkAAxLvD.js";import"./infiniteQueryObserver-DctmDFEe.js";import"./use-collections-ROKIiOzV.js";import"./useMutation-Ctk5b8uR.js";import"./CheckVerified02-C_Ewexdw.js";import"./Globe02-YyAAQROb.js";import"./Lock01-CPqKu_Mb.js";import"./Terminal-DobKmqGm.js";import"./card-Bz05CYUR.js";import"./integration-icon-BAlg7muO.js";import"./Container-CSl1es2V.js";import"./github-icon-Dp3wHhYE.js";import"./binder-CaZ6b20X.js";function tt(t,e){const r=Y.c(4),[l,m]=U.useState(t),n=U.useRef(null),i=U.useRef(!0);let d,a;return r[0]!==e||r[1]!==t?(d=()=>{if(i.current){i.current=!1;return}return n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{m(t)},e),()=>{n.current&&clearTimeout(n.current)}},a=[t,e],r[0]=e,r[1]=t,r[2]=d,r[3]=a):(d=r[2],a=r[3]),U.useEffect(d,a),l}function st(t){const e=Y.c(14),r=U.useRef(null),l=`scroll-position:${t}`,m=U.useRef(null);let n;e[0]!==l?(n=()=>{r.current&&sessionStorage.setItem(l,String(r.current.scrollTop))},e[0]=l,e[1]=n):n=e[1];const i=n;let d;e[2]!==l?(d=()=>{if(m.current===l)return;const f=sessionStorage.getItem(l);if(f&&r.current){const k=Number.parseInt(f,10);r.current.scrollTop=k}m.current=l},e[2]=l,e[3]=d):d=e[3];const a=d;let u;e[4]!==a||e[5]!==l?(u=()=>{m.current!==l&&a()},e[4]=a,e[5]=l,e[6]=u):u=e[6];const I=u;let o;e[7]!==a||e[8]!==l?(o=f=>{r.current=f,f&&m.current!==l&&requestAnimationFrame(()=>{a()})},e[7]=a,e[8]=l,e[9]=o):o=e[9];const p=o;let c;return e[10]!==I||e[11]!==i||e[12]!==p?(c={scrollRef:p,saveScrollPosition:i,handleScroll:I},e[10]=I,e[11]=i,e[12]=p,e[13]=c):c=e[13],c}const rt=24;function lt(t){const e=Y.c(54),{registryId:r,listToolName:l,filtersToolName:m,search:n}=t,{org:i}=ne();let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=[],e[0]=d):d=e[0];const[a,u]=U.useState(d);let I;e[1]===Symbol.for("react.memo_cache_sentinel")?(I=[],e[1]=I):I=e[1];const[o,p]=U.useState(I),c=r||null;let f;e[2]!==i.id||e[3]!==c?(f={connectionId:c,orgId:i.id},e[2]=i.id,e[3]=c,e[4]=f):f=e[4];const k=ye(f),T=!!m;let C;e[5]!==m||e[6]!==r?(C=oe.toolCall(r,m||"no-filters","{}"),e[5]=m,e[6]=r,e[7]=C):C=e[7];let h;e[8]!==k||e[9]!==m?(h=async()=>{if(!m)return{tags:[],categories:[]};const K=await k.callTool({name:m,arguments:{}});return K.structuredContent??K},e[8]=k,e[9]=m,e[10]=h):h=e[10];let F;e[11]!==C||e[12]!==h?(F={queryKey:C,queryFn:h,staleTime:36e5,retry:2},e[11]=C,e[12]=h,e[13]=F):F=e[13];const{data:S}=je(F);let j,b,$;if(e[14]!==l||e[15]!==r||e[16]!==n||e[17]!==o||e[18]!==a){const K=n?.trim()?{operator:"or",conditions:[{field:["name"],operator:"contains",value:n},{field:["title"],operator:"contains",value:n},{field:["description"],operator:"contains",value:n}]}:void 0;j={limit:rt,...a.length>0&&{tags:a},...o.length>0&&{categories:o},...K&&{where:K}},$=_e,b=oe.toolCall(r,l,JSON.stringify(j)),e[14]=l,e[15]=r,e[16]=n,e[17]=o,e[18]=a,e[19]=j,e[20]=b,e[21]=$}else j=e[19],b=e[20],$=e[21];let R;e[22]!==k||e[23]!==j||e[24]!==l?(R=async K=>{const{pageParam:Z}=K,ee=Z?{...j,cursor:Z}:j,v=await k.callTool({name:l,arguments:ee});return v.structuredContent??v},e[22]=k,e[23]=j,e[24]=l,e[25]=R):R=e[25];let P;e[26]!==R||e[27]!==b?(P={queryKey:b,queryFn:R,initialPageParam:void 0,getNextPageParam:nt,staleTime:36e5,placeholderData:Re,retry:2},e[26]=R,e[27]=b,e[28]=P):P=e[28];const{data:N,fetchNextPage:w,hasNextPage:g,isFetchingNextPage:x,isFetching:y,isLoading:z,error:L}=$(P);let _;e:{if(!N?.pages||N.pages.length===0){_=null;break e}const K=N.pages[0];if(typeof K=="object"&&K!==null&&"totalCount"in K&&typeof K.totalCount=="number"){_=K.totalCount;break e}_=null}const A=_,O=N?.pages;let W;e[29]!==O?(W=Ke(O),e[29]=O,e[30]=W):W=e[30];const J=W;let B;e[31]!==n||e[32]!==o.length||e[33]!==a.length?(B=a.length>0||o.length>0||!!n?.trim(),e[31]=n,e[32]=o.length,e[33]=a.length,e[34]=B):B=e[34];const V=B,q=y&&!x&&!z&&V;let D;e[35]!==w||e[36]!==g||e[37]!==x?(D=()=>{g&&!x&&w()},e[35]=w,e[36]=g,e[37]=x,e[38]=D):D=e[38];const H=D,E=g??!1,M=T?S?.tags:void 0,G=T?S?.categories:void 0;let Q;return e[39]!==V||e[40]!==y||e[41]!==x||e[42]!==q||e[43]!==z||e[44]!==J||e[45]!==L||e[46]!==H||e[47]!==o||e[48]!==a||e[49]!==E||e[50]!==M||e[51]!==G||e[52]!==A?(Q={items:J,totalCount:A,hasMore:E,isLoadingMore:x,isFiltering:q,isInitialLoading:z,isFetching:y,error:L,loadMore:H,availableTags:M,availableCategories:G,selectedTags:a,selectedCategories:o,setSelectedTags:u,setSelectedCategories:p,hasActiveFilters:V},e[39]=V,e[40]=y,e[41]=x,e[42]=q,e[43]=z,e[44]=J,e[45]=L,e[46]=H,e[47]=o,e[48]=a,e[49]=E,e[50]=M,e[51]=G,e[52]=A,e[53]=Q):Q=e[53],Q}function nt(t){if(typeof t=="object"&&t!==null){const e=t.nextCursor||t.cursor;if(e)return e}}function it(t,e){return[...t].sort((r,l)=>l.count-r.count).slice(0,e)}function de(t){const e=Y.c(52),{label:r,items:l,selectedItems:m,onToggle:n,onClear:i}=t,[d,a]=U.useState(""),[u,I]=U.useState(!1);let o,p,c,f,k,T,C,h,F,S,j;if(e[0]!==l||e[1]!==r||e[2]!==n||e[3]!==u||e[4]!==d||e[5]!==m){const w=[...d?l.filter(O=>O.value.toLowerCase().includes(d.toLowerCase())):l].sort(ot);c=m.length,p=be,F=u,S=I;let g;e[17]!==r?(g=s.jsx("span",{children:r}),e[17]=r,e[18]=g):g=e[18];let x;e[19]!==c?(x=c>0&&s.jsx("span",{className:"ml-1 rounded-full bg-primary text-primary-foreground px-1.5 py-0.5 text-[10px] font-medium",children:c}),e[19]=c,e[20]=x):x=e[20];let y;e[21]===Symbol.for("react.memo_cache_sentinel")?(y=s.jsx(we,{size:14,className:"opacity-50"}),e[21]=y):y=e[21],e[22]!==x||e[23]!==g?(j=s.jsx(Ne,{asChild:!0,children:s.jsxs(X,{variant:"outline",size:"sm",className:"h-7 px-3 gap-1.5 text-xs font-normal flex-1",children:[g,x,y]})}),e[22]=x,e[23]=g,e[24]=j):j=e[24],o=Ce,T="w-64 p-0",C="start";let z;e[25]===Symbol.for("react.memo_cache_sentinel")?(z=s.jsx(he,{size:16,className:"text-muted-foreground shrink-0"}),e[25]=z):z=e[25];let L;e[26]!==r?(L=r.toLowerCase(),e[26]=r,e[27]=L):L=e[27];const _=`Search ${L}...`;let A;e[28]===Symbol.for("react.memo_cache_sentinel")?(A=O=>a(O.target.value),e[28]=A):A=e[28],e[29]!==d||e[30]!==_?(h=s.jsx("div",{className:"shrink-0 w-full border-b border-border h-10",children:s.jsxs("label",{className:"flex items-center gap-2.5 h-10 px-4 cursor-text",children:[z,s.jsx(Qe,{type:"text",placeholder:_,value:d,onChange:A,className:"flex-1 border-0 shadow-none focus-visible:ring-0 px-0 h-full text-sm placeholder:text-muted-foreground/50 bg-transparent"})]})}),e[29]=d,e[30]=_,e[31]=h):h=e[31],f="max-h-64 overflow-y-auto p-1 flex flex-col gap-1",k=w.length===0?s.jsx("div",{className:"px-2 py-4 text-sm text-muted-foreground text-center",children:"No results found"}):w.map(O=>{const W=m.includes(O.value);return s.jsxs("button",{onClick:()=>n(O.value),className:ae("w-full flex items-center justify-between px-2 py-1.5 text-sm rounded cursor-pointer transition-colors",W?"bg-accent/50 text-foreground":"hover:bg-muted text-foreground"),children:[s.jsxs("span",{className:"truncate flex items-center gap-2",children:[W&&s.jsx(Se,{size:16,className:"text-muted-foreground shrink-0"}),O.value]}),s.jsx("span",{className:"text-xs text-muted-foreground ml-2 shrink-0",children:O.count})]},O.value)}),e[0]=l,e[1]=r,e[2]=n,e[3]=u,e[4]=d,e[5]=m,e[6]=o,e[7]=p,e[8]=c,e[9]=f,e[10]=k,e[11]=T,e[12]=C,e[13]=h,e[14]=F,e[15]=S,e[16]=j}else o=e[6],p=e[7],c=e[8],f=e[9],k=e[10],T=e[11],C=e[12],h=e[13],F=e[14],S=e[15],j=e[16];let b;e[32]!==f||e[33]!==k?(b=s.jsx("div",{className:f,children:k}),e[32]=f,e[33]=k,e[34]=b):b=e[34];let $;e[35]!==r||e[36]!==i||e[37]!==c?($=c>0&&s.jsx("div",{className:"p-2 border-t border-border",children:s.jsxs(X,{variant:"ghost",size:"sm",onClick:i,className:"w-full text-xs text-muted-foreground hover:text-foreground",children:["Clear ",r.toLowerCase()]})}),e[35]=r,e[36]=i,e[37]=c,e[38]=$):$=e[38];let R;e[39]!==o||e[40]!==$||e[41]!==T||e[42]!==C||e[43]!==h||e[44]!==b?(R=s.jsxs(o,{className:T,align:C,children:[h,b,$]}),e[39]=o,e[40]=$,e[41]=T,e[42]=C,e[43]=h,e[44]=b,e[45]=R):R=e[45];let P;return e[46]!==p||e[47]!==R||e[48]!==F||e[49]!==S||e[50]!==j?(P=s.jsxs(p,{open:F,onOpenChange:S,children:[j,R]}),e[46]=p,e[47]=R,e[48]=F,e[49]=S,e[50]=j,e[51]=P):P=e[51],P}function ot(t,e){return e.count-t.count}function at(t){const e=Y.c(67),{availableTags:r,availableCategories:l,selectedTags:m,selectedCategories:n,onTagChange:i,onCategoryChange:d}=t,a=r&&r.length>0||l&&l.length>0,u=m.length>0||n.length>0;if(!a)return null;let I;e[0]!==i||e[1]!==m?(I=g=>{m.includes(g)?i(m.filter(x=>x!==g)):i([...m,g])},e[0]=i,e[1]=m,e[2]=I):I=e[2];const o=I;let p;e[3]!==d||e[4]!==n?(p=g=>{n.includes(g)?d(n.filter(x=>x!==g)):d([...n,g])},e[3]=d,e[4]=n,e[5]=p):p=e[5];const c=p;let f;e[6]!==d||e[7]!==i?(f=()=>{i([]),d([])},e[6]=d,e[7]=i,e[8]=f):f=e[8];const k=f;let T,C,h,F,S,j,b;if(e[9]!==l||e[10]!==r||e[11]!==d||e[12]!==i||e[13]!==n||e[14]!==m||e[15]!==c||e[16]!==o){const g=l?it(l,6):[];T=n,C=m,b=new Set(g.map(ct)),S="flex items-center border-b border-border";let x;e[24]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsx("div",{className:"flex items-center gap-2 text-muted-foreground",children:s.jsx(ge,{size:16})}),e[24]=x):x=e[24];let y;e[25]!==l||e[26]!==d||e[27]!==n||e[28]!==c?(y=l&&l.length>0&&s.jsx(de,{label:"Categories",items:l,selectedItems:n,onToggle:c,onClear:()=>d([])}),e[25]=l,e[26]=d,e[27]=n,e[28]=c,e[29]=y):y=e[29];let z;e[30]!==r||e[31]!==i||e[32]!==m||e[33]!==o?(z=r&&r.length>0&&s.jsx(de,{label:"Tags",items:r,selectedItems:m,onToggle:o,onClear:()=>i([])}),e[30]=r,e[31]=i,e[32]=m,e[33]=o,e[34]=z):z=e[34],e[35]!==z||e[36]!==y?(j=s.jsxs("div",{className:"flex items-center gap-3 flex-wrap px-5 py-3 border-r border-border",children:[x,y,z]}),e[35]=z,e[36]=y,e[37]=j):j=e[37],h="flex items-center gap-3 flex-wrap px-5 py-3";let L;e[38]!==n||e[39]!==c?(L=_=>{const A=n.includes(_.value);return s.jsxs("div",{onClick:()=>c(_.value),className:ae("inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer",A?"bg-primary text-primary-foreground hover:bg-primary/80":"bg-muted hover:bg-accent text-muted-foreground"),children:[s.jsx("span",{children:_.value}),A&&s.jsx("span",{onClick:O=>{O.stopPropagation(),c(_.value)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},_.value)},e[38]=n,e[39]=c,e[40]=L):L=e[40],F=g.map(L),e[9]=l,e[10]=r,e[11]=d,e[12]=i,e[13]=n,e[14]=m,e[15]=c,e[16]=o,e[17]=T,e[18]=C,e[19]=h,e[20]=F,e[21]=S,e[22]=j,e[23]=b}else T=e[17],C=e[18],h=e[19],F=e[20],S=e[21],j=e[22],b=e[23];let $;if(e[41]!==T||e[42]!==c||e[43]!==b){let g;e[45]!==b?(g=y=>!b.has(y),e[45]=b,e[46]=g):g=e[46];let x;e[47]!==c?(x=y=>s.jsxs("div",{onClick:()=>c(y),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[s.jsx("span",{children:y}),s.jsx("span",{onClick:z=>{z.stopPropagation(),c(y)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},`cat-${y}`),e[47]=c,e[48]=x):x=e[48],$=T.filter(g).map(x),e[41]=T,e[42]=c,e[43]=b,e[44]=$}else $=e[44];let R;if(e[49]!==C||e[50]!==o){let g;e[52]!==o?(g=x=>s.jsxs("div",{onClick:()=>o(x),className:"inline-flex items-center gap-1 text-xs px-2.5 py-1 rounded-full transition-colors cursor-pointer bg-primary text-primary-foreground hover:bg-accent/50",children:[s.jsx("span",{children:x}),s.jsx("span",{onClick:y=>{y.stopPropagation(),o(x)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},`tag-${x}`),e[52]=o,e[53]=g):g=e[53],R=C.map(g),e[49]=C,e[50]=o,e[51]=R}else R=e[51];let P;e[54]!==k||e[55]!==u?(P=u&&s.jsxs(X,{variant:"ghost",size:"sm",onClick:k,className:"h-7 text-xs text-muted-foreground hover:text-foreground gap-1 px-2",children:[s.jsx(re,{size:14}),"Clear all"]}),e[54]=k,e[55]=u,e[56]=P):P=e[56];let N;e[57]!==P||e[58]!==h||e[59]!==F||e[60]!==$||e[61]!==R?(N=s.jsxs("div",{className:h,children:[F,$,R,P]}),e[57]=P,e[58]=h,e[59]=F,e[60]=$,e[61]=R,e[62]=N):N=e[62];let w;return e[63]!==N||e[64]!==S||e[65]!==j?(w=s.jsxs("div",{className:S,children:[j,N]}),e[63]=N,e[64]=S,e[65]=j,e[66]=w):w=e[66],w}function ct(t){return t.value}function dt(t,e){if(!e)return t;const r=e.toLowerCase();return t.filter(l=>(l.name||l.title||"").toLowerCase().includes(r)||(l.description||l.server?.description||"").toLowerCase().includes(r))}function mt(t){return t.verified===!0||t._meta?.["mcp.mesh"]?.verified===!0}function ut(t){const e=Y.c(55),{registryId:r,listToolName:l,filtersToolName:m,storePrivateOnly:n}=t,[i,d]=U.useState(""),a=tt(i,300),u=me(),{org:I}=ne(),{scrollRef:o,saveScrollPosition:p,handleScroll:c}=st(`store-discovery:${r}`);let f;e[0]!==a||e[1]!==m||e[2]!==l||e[3]!==r?(f={registryId:r,listToolName:l,filtersToolName:m,search:a},e[0]=a,e[1]=m,e[2]=l,e[3]=r,e[4]=f):f=e[4];const{items:k,hasMore:T,isLoadingMore:C,isInitialLoading:h,isFetching:F,error:S,loadMore:j,availableTags:b,availableCategories:$,selectedTags:R,selectedCategories:P,setSelectedTags:N,setSelectedCategories:w,hasActiveFilters:g}=lt(f);let x,y,z,L;if(e[5]!==a||e[6]!==F||e[7]!==h||e[8]!==k||e[9]!==i||e[10]!==n){const E=i?dt(k,i):k;L=n?E.filter(xt):E,x=(i!==a||F)&&!h&&!!i,z=L.filter(mt),y=L.filter(M=>!z.find(G=>G.id===M.id)),e[5]=a,e[6]=F,e[7]=h,e[8]=k,e[9]=i,e[10]=n,e[11]=x,e[12]=y,e[13]=z,e[14]=L}else x=e[11],y=e[12],z=e[13],L=e[14];const _=y;let A;e[15]!==u||e[16]!==I.slug||e[17]!==r||e[18]!==p?(A=E=>{p();const M=Ue(E.name||E.title||E.server?.title||""),G=typeof E.id=="string"&&E.id.includes("/"),Q=typeof E.server?.name=="string"&&E.server.name.includes("/"),K=G&&!Q?E.id:E.server?.name||E.id||"";u({to:"/$org/$project/store/$appName",params:{org:I.slug,project:xe,appName:M},search:{registryId:r,serverName:K}})},e[15]=u,e[16]=I.slug,e[17]=r,e[18]=p,e[19]=A):A=e[19];const O=A;let W;e[20]!==c||e[21]!==T||e[22]!==C||e[23]!==j?(W=E=>{if(c(),!T||C)return;const M=E.currentTarget;M.scrollHeight-M.scrollTop-M.clientHeight<200&&j()},e[20]=c,e[21]=T,e[22]=C,e[23]=j,e[24]=W):W=e[24];const J=W;let B;e[25]!==x||e[26]!==i?(B=s.jsx(He,{value:i,onChange:d,placeholder:"Search for an MCP Server...",isSearching:x}),e[25]=x,e[26]=i,e[27]=B):B=e[27];let V;e[28]!==$||e[29]!==b||e[30]!==P||e[31]!==R||e[32]!==w||e[33]!==N?(V=s.jsx(at,{availableTags:b,availableCategories:$,selectedTags:R,selectedCategories:P,onTagChange:N,onCategoryChange:w}),e[28]=$,e[29]=b,e[30]=P,e[31]=R,e[32]=w,e[33]=N,e[34]=V):V=e[34];let q;e[35]!==_||e[36]!==S||e[37]!==O||e[38]!==g||e[39]!==T||e[40]!==h||e[41]!==C||e[42]!==x||e[43]!==i||e[44]!==z||e[45]!==L?(q=s.jsx("div",{className:"p-5",children:s.jsx("div",{children:S&&!h?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center space-y-4",children:[s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:s.jsx(ue,{className:"size-8 text-destructive"})}),s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Registry unavailable"}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"Could not load items from this registry. It may be temporarily offline."}),S.message&&s.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:S.message})]}),s.jsxs(X,{variant:"outline",size:"sm",onClick:ft,children:[s.jsx(fe,{className:"size-4"}),"Try again"]})]}):h?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading items..."})]}):L.length===0&&!g?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(pe,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No items available"}),s.jsx("p",{className:"text-muted-foreground",children:"This store doesn't have any available items yet."})]}):L.length===0&&g&&!i?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(ge,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No matching items"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your filters to find more results."})]}):i&&L.length===0&&!x?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(he,{size:48,className:"text-muted-foreground mb-4"}),s.jsx("h3",{className:"text-lg font-medium mb-2",children:"No results found"}),s.jsx("p",{className:"text-muted-foreground",children:"Try adjusting your search terms."})]}):s.jsxs("div",{className:"flex flex-col gap-8",children:[x&&L.length===0&&s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Searching..."})]}),z.length>0&&s.jsx(ce,{items:z,title:"Verified",onItemClick:O}),_.length>0&&s.jsx(ce,{items:_,title:z.length>0?"All":"",onItemClick:O}),T&&C&&s.jsx("div",{className:"flex justify-center py-8",children:s.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[s.jsx(le,{size:20,className:"animate-spin"}),s.jsx("span",{className:"text-sm",children:"Loading more items..."})]})})]})})}),e[35]=_,e[36]=S,e[37]=O,e[38]=g,e[39]=T,e[40]=h,e[41]=C,e[42]=x,e[43]=i,e[44]=z,e[45]=L,e[46]=q):q=e[46];let D;e[47]!==J||e[48]!==o||e[49]!==q?(D=s.jsx("div",{ref:o,className:"flex-1 overflow-y-auto",onScroll:J,children:q}),e[47]=J,e[48]=o,e[49]=q,e[50]=D):D=e[50];let H;return e[51]!==B||e[52]!==V||e[53]!==D?(H=s.jsxs("div",{className:"flex flex-col h-full",children:[B,V,D]}),e[51]=B,e[52]=V,e[53]=D,e[54]=H):H=e[54],H}function ft(){return window.location.reload()}function xt(t){return t.is_public!==!0}function gt(t){const e=Y.c(11),{registryId:r,storePrivateOnly:l}=t,m=Ve(r),n=m?.tools;let i;e[0]!==n?(i=Ae(n),e[0]=n,e[1]=i):i=e[1];const d=i;if(!d){let c;e[2]===Symbol.for("react.memo_cache_sentinel")?(c=s.jsx("div",{className:"bg-muted p-3 rounded-full",children:s.jsx(pe,{className:"size-8 text-muted-foreground"})}),e[2]=c):c=e[2];let f;return e[3]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-12 text-center space-y-4",children:[c,s.jsxs("div",{className:"space-y-2",children:[s.jsx("h3",{className:"text-lg font-medium",children:"Registry not available"}),s.jsx("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:"This registry does not support listing store items, or the connection is not responding."})]})]}),e[3]=f):f=e[3],f}const a=m?.tools;let u;e[4]!==a?(u=Me(a),e[4]=a,e[5]=u):u=e[5];const o=u||void 0;let p;return e[6]!==d||e[7]!==r||e[8]!==l||e[9]!==o?(p=s.jsx(ut,{registryId:r,listToolName:d,filtersToolName:o,storePrivateOnly:l}),e[6]=d,e[7]=r,e[8]=l,e[9]=o,e[10]=p):p=e[10],p}function pt(t){const e=Y.c(43),{registries:r,value:l,onValueChange:m,onAddWellKnown:n,wellKnownRegistries:i,placeholder:d}=t,a=d===void 0?"Select a registry...":d,[u,I]=U.useState(!1);let o,p,c,f,k,T,C,h;if(e[0]!==u||e[1]!==a||e[2]!==r||e[3]!==l){let N;e[12]!==l?(N=g=>g.id===l,e[12]=l,e[13]=N):N=e[13];const w=r.find(N);p=be,C=u,h=I,o=Ne,T=!0,c="button",e[14]===Symbol.for("react.memo_cache_sentinel")?(f=ae("border-input data-[placeholder]:text-muted-foreground [&_svg:not([class*='text-'])]:text-muted-foreground focus-visible:border-ring focus-visible:ring-ring/50 hover:bg-accent hover:text-accent-foreground dark:hover:bg-input/50 flex w-fit items-center justify-between gap-2 rounded-lg border bg-transparent px-3 py-2 text-sm whitespace-nowrap transition-[color,box-shadow] outline-none focus-visible:ring-[3px] h-7 min-w-[160px]"),e[14]=f):f=e[14],k=w?s.jsxs("span",{className:"flex items-center gap-2",children:[w.icon?s.jsx("img",{src:w.icon,alt:w.name,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:w.name.slice(0,1).toUpperCase()}),s.jsx("span",{children:w.name})]}):s.jsx("span",{className:"text-muted-foreground",children:a}),e[0]=u,e[1]=a,e[2]=r,e[3]=l,e[4]=o,e[5]=p,e[6]=c,e[7]=f,e[8]=k,e[9]=T,e[10]=C,e[11]=h}else o=e[4],p=e[5],c=e[6],f=e[7],k=e[8],T=e[9],C=e[10],h=e[11];let F;e[15]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(we,{className:"size-4 opacity-50"}),e[15]=F):F=e[15];let S;e[16]!==c||e[17]!==f||e[18]!==k?(S=s.jsxs("button",{type:c,className:f,children:[k,F]}),e[16]=c,e[17]=f,e[18]=k,e[19]=S):S=e[19];let j;e[20]!==o||e[21]!==T||e[22]!==S?(j=s.jsx(o,{asChild:T,children:S}),e[20]=o,e[21]=T,e[22]=S,e[23]=j):j=e[23];let b;if(e[24]!==m||e[25]!==r||e[26]!==l){let N;e[28]!==m||e[29]!==l?(N=w=>s.jsxs("button",{type:"button",onClick:()=>{m(w.id??w.name),I(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[w.icon?s.jsx("img",{src:w.icon,alt:w.name,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded from-primary/20 to-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:w.name.slice(0,1).toUpperCase()}),s.jsx("span",{children:w.name})]}),l===(w.id??w.name)&&s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center",children:s.jsx(Se,{className:"size-4"})})]},w.id??w.name),e[28]=m,e[29]=l,e[30]=N):N=e[30],b=r.map(N),e[24]=m,e[25]=r,e[26]=l,e[27]=b}else b=e[27];let $;e[31]!==n||e[32]!==i?($=i.length>0&&s.jsxs("div",{className:"border-t border-border pt-1 mt-1",children:[s.jsx("p",{className:"px-2 py-1.5 text-xs font-medium text-muted-foreground",children:"Other known registries"}),i.map(N=>s.jsxs("button",{type:"button",onClick:()=>{n(N),I(!1)},className:"relative flex w-full cursor-pointer items-center gap-2 rounded-lg py-1.5 pr-8 pl-2 text-sm outline-hidden select-none hover:bg-accent hover:text-accent-foreground",children:[s.jsxs("div",{className:"flex items-center gap-2",children:[N.icon?s.jsx("img",{src:N.icon,alt:N.title,className:"w-4 h-4 rounded"}):s.jsx("span",{className:"w-4 h-4 rounded bg-primary/10 flex items-center justify-center text-xs font-semibold text-primary",children:N.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"flex-1",children:N.title})]}),s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center text-muted-foreground",children:s.jsx(Ye,{size:16})})]},N.id??N.title))]}),e[31]=n,e[32]=i,e[33]=$):$=e[33];let R;e[34]!==b||e[35]!==$?(R=s.jsxs(Ce,{align:"end",className:"w-auto min-w-[200px] p-1",children:[b,$]}),e[34]=b,e[35]=$,e[36]=R):R=e[36];let P;return e[37]!==p||e[38]!==j||e[39]!==R||e[40]!==C||e[41]!==h?(P=s.jsxs(p,{open:C,onOpenChange:h,children:[j,R]}),e[37]=p,e[38]=j,e[39]=R,e[40]=C,e[41]=h,e[42]=P):P=e[42],P}function ht({registries:t,onConnected:e}){const r=ve(),{org:{slug:l}}=ne(),{data:m}=Pe.useSession(),n=me(),[i,d]=U.useState(!1),a=t[0],u=async()=>{if(!(!a||!m?.user?.id)){d(!0);try{const o=await r.create.mutateAsync(a);e?.(o.id)}finally{d(!1)}}},I=()=>{n({to:"/$org/$project/mcps",params:{org:l,project:xe},search:{action:"create"}})};return s.jsx(Je,{image:s.jsx("img",{src:"/store-empty-state.svg",alt:"No store connected",width:336,height:320,className:"max-w-full h-auto"}),title:"Connect to registry",description:"Connect to discover and use Connections from the community.",actions:s.jsxs(s.Fragment,{children:[s.jsxs(X,{variant:"outline",onClick:u,disabled:i||!a,children:[a?.icon&&s.jsx("img",{src:a.icon,alt:"",className:"size-4"}),i?"Installing...":"Install Registry"]}),s.jsx(X,{variant:"outline",onClick:I,children:"Custom Connection"})]})})}function jt(t){const e=Y.c(15),{error:r,onRetry:l,registryName:m}=t;let n;e[0]===Symbol.for("react.memo_cache_sentinel")?(n=s.jsx("div",{className:"bg-destructive/10 p-3 rounded-full",children:s.jsx(ue,{className:"h-6 w-6 text-destructive"})}),e[0]=n):n=e[0];let i;e[1]===Symbol.for("react.memo_cache_sentinel")?(i=s.jsx("h3",{className:"text-lg font-medium",children:"Unable to load store"}),e[1]=i):i=e[1];let d;e[2]!==m?(d=s.jsxs("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:["The ",s.jsx("strong",{children:m})," registry is currently unreachable. This may be a temporary issue — try again in a moment."]}),e[2]=m,e[3]=d):d=e[3];let a;e[4]!==r?(a=r?.message&&s.jsx("p",{className:"text-xs text-muted-foreground/60 font-mono max-w-md mx-auto truncate",children:r.message}),e[4]=r,e[5]=a):a=e[5];let u;e[6]!==d||e[7]!==a?(u=s.jsxs("div",{className:"space-y-2",children:[i,d,a]}),e[6]=d,e[7]=a,e[8]=u):u=e[8];let I;e[9]===Symbol.for("react.memo_cache_sentinel")?(I=s.jsx(fe,{className:"size-4"}),e[9]=I):I=e[9];let o;e[10]!==l?(o=s.jsxs(X,{variant:"outline",size:"sm",onClick:l,children:[I,"Try again"]}),e[10]=l,e[11]=o):o=e[11];let p;return e[12]!==u||e[13]!==o?(p=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-6 text-center space-y-4",children:[n,u,o]}),e[12]=u,e[13]=o,e[14]=p):p=e[14],p}function ns(){const t=Y.c(53),{org:e,project:r}=ne(),l=qe(),m=ve(),n=$e(),i=n.location.pathname.includes("/store/")&&n.location.pathname.split("/").length>3,d=Ze(l);let a;t[0]!==e.id?(a=Be.SELF(e.id),t[0]=e.id,t[1]=a):a=t[1];const u=a,I=r.enabledPlugins,o=I==null||I.includes(ie);let p;t[2]!==u?(p=(v,te)=>v.id===u?1:te.id===u?-1:0,t[2]=u,t[3]=p):p=t[3];const c=d.filter(v=>v.id!==u?!0:o).sort(p);let f;t[4]!==u?(f=v=>v.id===u,t[4]=u,t[5]=f):f=t[5];const k=c.some(f);let T;t[6]!==e.id?(T={connectionId:De,orgId:e.id},t[6]=e.id,t[7]=T):T=t[7];const C=ye(T);let h;t[8]!==r.id||t[9]!==C?(h=async()=>{const v=await C.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:r.id,pluginId:ie}});return v.structuredContent??v},t[8]=r.id,t[9]=C,t[10]=h):h=t[10];const{data:F}=je({queryKey:oe.projectPluginConfig(r.id??"",ie),queryFn:h,enabled:k&&!!r.id,staleTime:6e4}),S=F?.config?.settings;let j;t[11]!==S||t[12]!==u?(j=v=>v.id===u&&S?{id:v.id,name:S.registryName||v.title,icon:S.registryIcon||v.icon||void 0}:{id:v.id,name:v.title,icon:v.icon||void 0},t[11]=S,t[12]=u,t[13]=j):j=t[13];const b=c.map(j);let $;t[14]!==e.slug?($=Xe.selectedRegistry(e.slug),t[14]=e.slug,t[15]=$):$=t[15];const[R,P]=et($,vt);let N;t[16]!==R?(N=v=>v.id===R,t[16]=R,t[17]=N):N=t[17];const w=c.find(N);let g;t[18]!==u?(g=v=>v.id!==u,t[18]=u,t[19]=g):g=t[19];const x=c.find(g),y=w?.id||x?.id||c[0]?.id||"",z=y===u&&S?.storePrivateOnly===!0;let L;t[20]!==e.id?(L=Ge(e.id),t[20]=e.id,t[21]=L):L=t[21];let _;t[22]!==L?(_=[L],t[22]=L,t[23]=_):_=t[23];const A=_;let O;t[24]===Symbol.for("react.memo_cache_sentinel")?(O=[We()],t[24]=O):O=t[24];const W=O;let J;t[25]!==m.create||t[26]!==P?(J=async v=>{const te=await m.create.mutateAsync(v);P(te.id)},t[25]=m.create,t[26]=P,t[27]=J):J=t[27];const B=J,V=new Set(c.map(yt)),q=A.filter(v=>v.id&&!V.has(v.id)),D=W.filter(v=>v.id&&!V.has(v.id));if(i){let v;return t[28]===Symbol.for("react.memo_cache_sentinel")?(v=s.jsx(ze,{}),t[28]=v):v=t[28],v}let H;t[29]===Symbol.for("react.memo_cache_sentinel")?(H=s.jsx(se.Header.Left,{children:s.jsx(Le,{children:s.jsx(Fe,{children:s.jsx(Ee,{children:s.jsx(Oe,{children:"Store"})})})})}),t[29]=H):H=t[29];let E;t[30]!==B?(E=async v=>B(v),t[30]=B,t[31]=E):E=t[31];let M;t[32]!==q||t[33]!==y||t[34]!==b||t[35]!==P||t[36]!==E?(M=s.jsxs(se.Header,{children:[H,s.jsx(se.Header.Right,{children:s.jsx(pt,{wellKnownRegistries:q,registries:b,value:y,onValueChange:P,onAddWellKnown:E,placeholder:"Select store..."})})]}),t[32]=q,t[33]=y,t[34]=b,t[35]=P,t[36]=E,t[37]=M):M=t[37];let G;t[38]!==y||t[39]!==b?(G=v=>{const{error:te,resetError:Ie}=v;return s.jsx(jt,{error:te,onRetry:Ie,registryName:b.find(Te=>Te.id===y)?.name??"registry"})},t[38]=y,t[39]=b,t[40]=G):G=t[40];let Q;t[41]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full",children:[s.jsx(le,{size:32,className:"animate-spin text-muted-foreground mb-4"}),s.jsx("p",{className:"text-sm text-muted-foreground",children:"Loading store items..."})]}),t[41]=Q):Q=t[41];let K;t[42]!==D||t[43]!==y||t[44]!==P||t[45]!==z?(K=s.jsx(U.Suspense,{fallback:Q,children:y?s.jsx(gt,{registryId:y,storePrivateOnly:z}):s.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:s.jsx(ht,{registries:D,onConnected:v=>{P(v)}})})}),t[42]=D,t[43]=y,t[44]=P,t[45]=z,t[46]=K):K=t[46];let Z;t[47]!==G||t[48]!==K?(Z=s.jsx(se.Content,{children:s.jsx(ke,{fallback:G,children:K})}),t[47]=G,t[48]=K,t[49]=Z):Z=t[49];let ee;return t[50]!==M||t[51]!==Z?(ee=s.jsxs(se,{children:[M,Z]}),t[50]=M,t[51]=Z,t[52]=ee):ee=t[52],ee}function yt(t){return t.id}function vt(t){return t??""}export{ns as default};
@@ -1 +1 @@
1
- import{c as a,j as t,aD as n}from"./index-pgKDpBki.js";function c(){const s=a.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(n,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No storage connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect an S3-compatible storage service to browse and manage files."})]}),s[0]=e):e=s[0],e}export{c as default};
1
+ import{c as a,j as t,aD as n}from"./index-KAycGEnT.js";function c(){const s=a.c(1);let e;return s[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(n,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No storage connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect an S3-compatible storage service to browse and manage files."})]}),s[0]=e):e=s[0],e}export{c as default};
@@ -1 +1 @@
1
- import{c as s,j as t}from"./index-pgKDpBki.js";import{e as r}from"./Dataflow03-DTe8Fji9.js";function a(){const o=s.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(r,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No workflows connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect a workflow provider to create and manage automated workflows with multiple steps and integrations."})]}),o[0]=e):e=o[0],e}export{a as default};
1
+ import{c as s,j as t}from"./index-KAycGEnT.js";import{e as r}from"./Dataflow03-SiitV-oV.js";function a(){const o=s.c(1);let e;return o[0]===Symbol.for("react.memo_cache_sentinel")?(e=t.jsxs("div",{className:"flex flex-col items-center justify-center h-full p-8",children:[t.jsx(r,{size:48,className:"text-muted-foreground mb-4"}),t.jsx("h3",{className:"text-lg font-medium mb-2",children:"No workflows connected"}),t.jsx("p",{className:"text-muted-foreground text-center max-w-md",children:"Connect a workflow provider to create and manage automated workflows with multiple steps and integrations."})]}),o[0]=e):e=o[0],e}export{a as default};
@@ -1 +1 @@
1
- import{c as w,j as s,r as S,aD as y}from"./index-pgKDpBki.js";import{i as _}from"./Check-Bra2mpbB.js";import{t as k}from"./ChevronDown-DaSct-5t.js";function E(x){const e=w.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:N}=x,[r,z]=S.useState(!1),C=S.useRef(null);let p;if(e[0]!==l||e[1]!==n){let t;e[3]!==n?(t=u=>u.id===n,e[3]=n,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=n,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const R=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Storage";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==r?(o=()=>z(!r),e[13]=r,e[14]=o):o=e[14];let a;e[15]!==i?(a=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=a):a=e[16];const v=i?.title||"Select storage";let c;e[17]!==v?(c=s.jsx("span",{children:v}),e[17]=v,e[18]=c):c=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(k,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==a||e[22]!==c?(d=s.jsxs("button",{type:"button",onClick:o,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:[a,c,b]}),e[20]=o,e[21]=a,e[22]=c,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==r||e[26]!==N||e[27]!==n?(m=r&&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(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===n&&s.jsx(_,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=r,e[26]=N,e[27]=n,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:R,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function O(x){const e=w.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{O as default};
1
+ import{c as w,j as s,r as S,aD as y}from"./index-KAycGEnT.js";import{i as _}from"./Check-DXoRcZpn.js";import{t as k}from"./ChevronDown-D04Buvau.js";function E(x){const e=w.c(32),{connections:l,selectedConnectionId:n,onConnectionChange:N}=x,[r,z]=S.useState(!1),C=S.useRef(null);let p;if(e[0]!==l||e[1]!==n){let t;e[3]!==n?(t=u=>u.id===n,e[3]=n,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=n,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const R=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Storage";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==r?(o=()=>z(!r),e[13]=r,e[14]=o):o=e[14];let a;e[15]!==i?(a=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=a):a=e[16];const v=i?.title||"Select storage";let c;e[17]!==v?(c=s.jsx("span",{children:v}),e[17]=v,e[18]=c):c=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(k,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==a||e[22]!==c?(d=s.jsxs("button",{type:"button",onClick:o,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:[a,c,b]}),e[20]=o,e[21]=a,e[22]=c,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==r||e[26]!==N||e[27]!==n?(m=r&&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(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===n&&s.jsx(_,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=r,e[26]=N,e[27]=n,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:R,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function O(x){const e=w.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{O as default};
@@ -1 +1 @@
1
- import{c as S,j as s,r as w}from"./index-pgKDpBki.js";import{i as R}from"./Check-Bra2mpbB.js";import{t as _}from"./ChevronDown-DaSct-5t.js";import{e as y}from"./Dataflow03-DTe8Fji9.js";function E(x){const e=S.c(32),{connections:l,selectedConnectionId:r,onConnectionChange:N}=x,[n,z]=w.useState(!1),C=w.useRef(null);let p;if(e[0]!==l||e[1]!==r){let t;e[3]!==r?(t=u=>u.id===r,e[3]=r,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=r,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const k=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Workflows";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==n?(o=()=>z(!n),e[13]=n,e[14]=o):o=e[14];let c;e[15]!==i?(c=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=c):c=e[16];const v=i?.title||"Select provider";let a;e[17]!==v?(a=s.jsx("span",{children:v}),e[17]=v,e[18]=a):a=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(_,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==c||e[22]!==a?(d=s.jsxs("button",{type:"button",onClick:o,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:[c,a,b]}),e[20]=o,e[21]=c,e[22]=a,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==n||e[26]!==N||e[27]!==r?(m=n&&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(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===r&&s.jsx(R,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=n,e[26]=N,e[27]=r,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:k,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function H(x){const e=S.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{H as default};
1
+ import{c as S,j as s,r as w}from"./index-KAycGEnT.js";import{i as R}from"./Check-DXoRcZpn.js";import{t as _}from"./ChevronDown-D04Buvau.js";import{e as y}from"./Dataflow03-SiitV-oV.js";function E(x){const e=S.c(32),{connections:l,selectedConnectionId:r,onConnectionChange:N}=x,[n,z]=w.useState(!1),C=w.useRef(null);let p;if(e[0]!==l||e[1]!==r){let t;e[3]!==r?(t=u=>u.id===r,e[3]=r,e[4]=t):t=e[4],p=l.find(t),e[0]=l,e[1]=r,e[2]=p}else p=e[2];const i=p;let j;e[5]===Symbol.for("react.memo_cache_sentinel")?(j=t=>{C.current?.contains(t.relatedTarget)||z(!1)},e[5]=j):j=e[5];const k=j;if(l.length===1){let t;e[6]!==i?(t=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[6]=i,e[7]=t):t=e[7];const u=i?.title||"Workflows";let f;e[8]!==u?(f=s.jsx("span",{children:u}),e[8]=u,e[9]=f):f=e[9];let h;return e[10]!==t||e[11]!==f?(h=s.jsxs("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[t,f]}),e[10]=t,e[11]=f,e[12]=h):h=e[12],h}let o;e[13]!==n?(o=()=>z(!n),e[13]=n,e[14]=o):o=e[14];let c;e[15]!==i?(c=i?.icon?s.jsx("img",{src:i.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),e[15]=i,e[16]=c):c=e[16];const v=i?.title||"Select provider";let a;e[17]!==v?(a=s.jsx("span",{children:v}),e[17]=v,e[18]=a):a=e[18];let b;e[19]===Symbol.for("react.memo_cache_sentinel")?(b=s.jsx(_,{size:14}),e[19]=b):b=e[19];let d;e[20]!==o||e[21]!==c||e[22]!==a?(d=s.jsxs("button",{type:"button",onClick:o,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:[c,a,b]}),e[20]=o,e[21]=c,e[22]=a,e[23]=d):d=e[23];let m;e[24]!==l||e[25]!==n||e[26]!==N||e[27]!==r?(m=n&&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(t=>s.jsxs("button",{type:"button",onClick:()=>{N(t.id),z(!1)},className:"flex items-center gap-2 w-full px-2 py-1.5 text-sm rounded-sm hover:bg-accent transition-colors",children:[t.icon?s.jsx("img",{src:t.icon,alt:"",className:"size-4 rounded"}):s.jsx(y,{size:16}),s.jsx("span",{className:"flex-1 text-left",children:t.title}),t.id===r&&s.jsx(R,{size:14,className:"text-primary"})]},t.id))}),e[24]=l,e[25]=n,e[26]=N,e[27]=r,e[28]=m):m=e[28];let g;return e[29]!==d||e[30]!==m?(g=s.jsxs("div",{className:"relative",ref:C,onBlur:k,children:[d,m]}),e[29]=d,e[30]=m,e[31]=g):g=e[31],g}function H(x){const e=S.c(2);let l;return e[0]!==x?(l=s.jsx(E,{...x}),e[0]=x,e[1]=l):l=e[1],l}export{H as default};
@@ -0,0 +1 @@
1
+ import{c as r,j as i}from"./index-KAycGEnT.js";import{P as m}from"./project-plugins-DkIXV878.js";import"./useQuery-DCrAUBx5.js";import"./useMutation-Ctk5b8uR.js";import"./constants-CRvMLa9p.js";import"./switch-BTH5DtNC.js";import"./label-lqq4AMOf.js";import"./Container-CSl1es2V.js";import"./use-connection-DWTVYLGI.js";import"./use-collections-ROKIiOzV.js";import"./use-binding-eAl0-ngZ.js";import"./binder-CaZ6b20X.js";import"./use-install-from-registry-CzqEIQq2.js";import"./extract-connection-data-CrY_sL6W.js";import"./constants-I25hmjxi.js";import"./github-icon-Dp3wHhYE.js";import"./registry-utils-BJRD11-o.js";import"./generate-id-Dyweu44Y.js";import"./Loading01-DF5pxnn8.js";import"./Plus-CEtl-Eq7.js";import"./select-XWfX294J.js";import"./index-B7Bu7nQ7.js";import"./Check-DXoRcZpn.js";import"./ChevronDown-D04Buvau.js";function v(){const o=r.c(1);let t;return o[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(m,{}),o[0]=t):t=o[0],t}export{v as default};