decocms 2.158.0 → 2.158.2

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 (201) hide show
  1. package/dist/client/assets/{AlertCircle-DsQlVvig.js → AlertCircle-BVzUbFpn.js} +1 -1
  2. package/dist/client/assets/{AlignLeft-Cvo6EEA1.js → AlignLeft-C6EBYnL8.js} +1 -1
  3. package/dist/client/assets/{ArrowDown-KTP4HONB.js → ArrowDown-BbVCdIIL.js} +1 -1
  4. package/dist/client/assets/{ArrowLeft-CR3SWku2.js → ArrowLeft-G2GpUvfS.js} +1 -1
  5. package/dist/client/assets/{ArrowUp-BfaawFDM.js → ArrowUp-JndBjwJL.js} +1 -1
  6. package/dist/client/assets/{Check-OSWZCZf9.js → Check-q1dqks2U.js} +1 -1
  7. package/dist/client/assets/{CheckCircle-B2wkNkz_.js → CheckCircle-DAQqu9C_.js} +1 -1
  8. package/dist/client/assets/{CheckDone01-j6DaSyTU.js → CheckDone01-B7ahPP7j.js} +1 -1
  9. package/dist/client/assets/{CheckVerified02-D6qy17me.js → CheckVerified02-CZ912ESL.js} +1 -1
  10. package/dist/client/assets/{ChevronDown-BR4cCk-W.js → ChevronDown-cViiGxn9.js} +1 -1
  11. package/dist/client/assets/{ChevronLeft-D4Ua6sXw.js → ChevronLeft-Cl-I3Mb5.js} +1 -1
  12. package/dist/client/assets/{ChevronRight-ByOuE_Vi.js → ChevronRight-D7UsQHH3.js} +1 -1
  13. package/dist/client/assets/{Clock-BEpmd0mM.js → Clock-uUYVZnmE.js} +1 -1
  14. package/dist/client/assets/{Code01-BsBlwdG0.js → Code01-EB8m5diA.js} +1 -1
  15. package/dist/client/assets/{Container-BVSlDn4p.js → Container-BnukWtxV.js} +1 -1
  16. package/dist/client/assets/{Copy01-B595Thpy.js → Copy01-DIuxFCYv.js} +1 -1
  17. package/dist/client/assets/{Dataflow03-DW4Gd5sB.js → Dataflow03-CSrRmRdp.js} +1 -1
  18. package/dist/client/assets/{DotsHorizontal-0eyRqScK.js → DotsHorizontal-C5wq0CTn.js} +1 -1
  19. package/dist/client/assets/{DotsVertical-Cshw63SI.js → DotsVertical-DxhWxx-U.js} +1 -1
  20. package/dist/client/assets/{Download01-DFmX-SGA.js → Download01-RW_lAP8U.js} +1 -1
  21. package/dist/client/assets/{Edit01-BzJXGmI-.js → Edit01-C0vDTgcf.js} +1 -1
  22. package/dist/client/assets/{Edit05-BKDqgNc4.js → Edit05-BbXNdh53.js} +1 -1
  23. package/dist/client/assets/{Eye-CHYeRDXI.js → Eye-BY6V0QO1.js} +1 -1
  24. package/dist/client/assets/{File02-ZK3-99s4.js → File02-mE2VQadh.js} +1 -1
  25. package/dist/client/assets/{File06-B7IZdrgj.js → File06-BAK1qMG7.js} +1 -1
  26. package/dist/client/assets/{FilterLines-pJtef_Pv.js → FilterLines-D7KpfRSU.js} +1 -1
  27. package/dist/client/assets/{Globe01-p5f8j_mm.js → Globe01-yz8Ugxya.js} +1 -1
  28. package/dist/client/assets/{Globe02-D7s1ULQJ.js → Globe02-7C9FcKVE.js} +1 -1
  29. package/dist/client/assets/{Grid01-DIGu5eh8.js → Grid01-BOCowW7O.js} +1 -1
  30. package/dist/client/assets/{Hash02-CkWXLlvG.js → Hash02-B4FAvj_q.js} +1 -1
  31. package/dist/client/assets/{Home02-DiSPSdMx.js → Home02-DVchDjYK.js} +1 -1
  32. package/dist/client/assets/{Image01-4wUrHqw6.js → Image01-CQ8GcYUR.js} +1 -1
  33. package/dist/client/assets/{Inbox01-csEiEq63.js → Inbox01-DI6dcB2-.js} +1 -1
  34. package/dist/client/assets/{InfoCircle-s0XyUQYC.js → InfoCircle-BLcCSQhh.js} +1 -1
  35. package/dist/client/assets/{Key01-BP2mhRrj.js → Key01-DZIfBgYr.js} +1 -1
  36. package/dist/client/assets/{LayersTwo01-C4CgBsBK.js → LayersTwo01-D5xVmKNM.js} +1 -1
  37. package/dist/client/assets/{LayoutLeft-DzzE993C.js → LayoutLeft-BPUqmi0D.js} +1 -1
  38. package/dist/client/assets/{Link01-CHaReCKl.js → Link01-BSeN3LgC.js} +1 -1
  39. package/dist/client/assets/{LinkExternal01-Cj5yLC8K.js → LinkExternal01-Rv_hEkme.js} +1 -1
  40. package/dist/client/assets/{List-BnvhY7Nh.js → List-Bf-7f4Yc.js} +1 -1
  41. package/dist/client/assets/{Loading01-aMp99RZI.js → Loading01-1unV3no7.js} +1 -1
  42. package/dist/client/assets/{Lock01-STjQUMU6.js → Lock01-XSJRlK5x.js} +1 -1
  43. package/dist/client/assets/{Play-Dr8AlTmi.js → Play-Bae0FSDA.js} +1 -1
  44. package/dist/client/assets/{Plus-Dp8Rr75G.js → Plus-DRukDy12.js} +1 -1
  45. package/dist/client/assets/{RefreshCcw01-DDGad8lb.js → RefreshCcw01-D1XgqmbV.js} +1 -1
  46. package/dist/client/assets/{Save01-36pjbcKA.js → Save01-Ba2I-ry6.js} +1 -1
  47. package/dist/client/assets/{SearchMd-r7i5BQk7.js → SearchMd-DQrPJQV9.js} +1 -1
  48. package/dist/client/assets/{Settings01-DKTz1YSf.js → Settings01-C-jo0YyN.js} +1 -1
  49. package/dist/client/assets/{Shield01-J7QygUij.js → Shield01-D-svmdvB.js} +1 -1
  50. package/dist/client/assets/{Terminal-CtjH6zFY.js → Terminal-D0OfGCn6.js} +1 -1
  51. package/dist/client/assets/{Trash01-DJTe1fKw.js → Trash01-DO5SV3mV.js} +1 -1
  52. package/dist/client/assets/{Upload01-BEhQSPeB.js → Upload01-2a8eC1w5.js} +1 -1
  53. package/dist/client/assets/{Users03-CG_islph.js → Users03-D0FREVnP.js} +1 -1
  54. package/dist/client/assets/{X-DjDetE_c.js → X-CK2TCShL.js} +1 -1
  55. package/dist/client/assets/{XCircle-CSLSI6pa.js → XCircle-0CM-aUam.js} +1 -1
  56. package/dist/client/assets/{XClose-dSJ6zVxj.js → XClose-C1VIP6EM.js} +1 -1
  57. package/dist/client/assets/{Zap-BdJ17pmL.js → Zap-DmFOqnT1.js} +1 -1
  58. package/dist/client/assets/{agent-connections-preview-DB81vdUX.js → agent-connections-preview-BAdFzhUY.js} +1 -1
  59. package/dist/client/assets/{agent-detail-BAru2zv4.js → agent-detail-BlWN1elN.js} +1 -1
  60. package/dist/client/assets/{agents-DTLxCfRX.js → agents-DTTSh7i4.js} +1 -1
  61. package/dist/client/assets/{alert-dialog-Bbrwo05x.js → alert-dialog-BpAl1CV2.js} +1 -1
  62. package/dist/client/assets/{auth-catchall-BETKUynS.js → auth-catchall-CdYMLH0m.js} +1 -1
  63. package/dist/client/assets/{avatar-D94UEcg7.js → avatar-R3EZmhcg.js} +1 -1
  64. package/dist/client/assets/{badge-DxYG_XB9.js → badge-Bgf3f5yM.js} +1 -1
  65. package/dist/client/assets/{binder-wDmRPNL2.js → binder-D6CqvsA8.js} +1 -1
  66. package/dist/client/assets/{breadcrumb-BrsAPde7.js → breadcrumb-HFSeCoIU.js} +1 -1
  67. package/dist/client/assets/{card-CkYe6Ikt.js → card-CeKLZLLA.js} +1 -1
  68. package/dist/client/assets/{chart-DnUFHI2d.js → chart-6PxHbkHq.js} +1 -1
  69. package/dist/client/assets/{checkbox-DhgSL5Cz.js → checkbox-DiriJ1bL.js} +1 -1
  70. package/dist/client/assets/{circle-alert-CgP-qNn-.js → circle-alert-CunKhYPu.js} +1 -1
  71. package/dist/client/assets/{collapsible-DYgsVB3N.js → collapsible-viU10JM0.js} +1 -1
  72. package/dist/client/assets/{collection-detail-D5XIUYKg.js → collection-detail-DeNYFvSk.js} +1 -1
  73. package/dist/client/assets/{collection-display-button-DEx37m4V.js → collection-display-button-DEqK6xTT.js} +1 -1
  74. package/dist/client/assets/{collection-search-DXvW2iQG.js → collection-search-Cg477-ZE.js} +1 -1
  75. package/dist/client/assets/{collection-tab-CNXNROrc.js → collection-tab-_QON2VMK.js} +1 -1
  76. package/dist/client/assets/{collection-table-wrapper-xKuLiuQ5.js → collection-table-wrapper-BFNUM8s8.js} +1 -1
  77. package/dist/client/assets/{collection-tabs-BEqvkJum.js → collection-tabs-BQNMu9-v.js} +1 -1
  78. package/dist/client/assets/{command-wAVHsF2T.js → command-Du1jchMC.js} +1 -1
  79. package/dist/client/assets/{connect-yoERnUTv.js → connect-B6BALd_j.js} +1 -1
  80. package/dist/client/assets/{connection-card--y0YdfEA.js → connection-card-AwrPPwJU.js} +1 -1
  81. package/dist/client/assets/{connection-detail-1Ku6b0Wl.js → connection-detail-BgxEpm2N.js} +1 -1
  82. package/dist/client/assets/{connection-status-Cq0AmCwK.js → connection-status-B2kwe82w.js} +1 -1
  83. package/dist/client/assets/{connections-Cih6wM0L.js → connections-sNaEyT2l.js} +1 -1
  84. package/dist/client/assets/constants-BJwM9pw-.js +1 -0
  85. package/dist/client/assets/{constants-_xTq0aTt.js → constants-DMTOffGt.js} +1 -1
  86. package/dist/client/assets/{context-Bk-UzwLO.js → context-Cx8RVNtA.js} +1 -1
  87. package/dist/client/assets/{create-organization-dialog-D50lIYTQ.js → create-organization-dialog-D402PfvW.js} +1 -1
  88. package/dist/client/assets/{create-project-dialog-B3BGNP1R.js → create-project-dialog-Caslq4es.js} +1 -1
  89. package/dist/client/assets/{danger-DuT5kBaU.js → danger-CU9K1Lxe.js} +1 -1
  90. package/dist/client/assets/{danger-zone-Cjq5A9rY.js → danger-zone-M1bpTpYc.js} +1 -1
  91. package/dist/client/assets/{decopilot-events-BrbCILIn.js → decopilot-events-DWI9oooP.js} +1 -1
  92. package/dist/client/assets/{dependencies-BXhkBUyi.js → dependencies-BoutRVFB.js} +1 -1
  93. package/dist/client/assets/{dialog-B-Kp8Cuq.js → dialog-CcebbiBo.js} +1 -1
  94. package/dist/client/assets/{dropdown-menu-DjhC4m2a.js → dropdown-menu-CXrh9ioK.js} +1 -1
  95. package/dist/client/assets/{dynamic-plugin-layout-DRpqAaco.js → dynamic-plugin-layout-D2OWQZ3_.js} +1 -1
  96. package/dist/client/assets/{editable-task-title-CWlhOc5Q.js → editable-task-title-COV97EVU.js} +1 -1
  97. package/dist/client/assets/{empty-state-680W7nUY.js → empty-state-DsHolTNX.js} +1 -1
  98. package/dist/client/assets/{env-vars-editor-BRxwCr-L.js → env-vars-editor-BrHnxudF.js} +1 -1
  99. package/dist/client/assets/{extract-connection-data-DUglufvW.js → extract-connection-data-BEvScFbw.js} +1 -1
  100. package/dist/client/assets/{file-browser-BLB4FkOU.js → file-browser-CuyBxdvO.js} +2 -2
  101. package/dist/client/assets/{form-DK8WrQI3.js → form-CHPvar9M.js} +1 -1
  102. package/dist/client/assets/{general-DonW35nE.js → general-Cbq5hDRf.js} +1 -1
  103. package/dist/client/assets/{grid-view-CqJSMZVQ.js → grid-view-CaeVfax4.js} +1 -1
  104. package/dist/client/assets/{home-DIVCSvrl.js → home-onyTH5vb.js} +1 -1
  105. package/dist/client/assets/{icon-picker-DvkCVh_W.js → icon-picker-5u9dfSxr.js} +1 -1
  106. package/dist/client/assets/{index-D9XxJ5Op.js → index-BLT0BC6X.js} +1 -1
  107. package/dist/client/assets/{index-DA_JOtb0.js → index-BgG2zeek.js} +1 -1
  108. package/dist/client/assets/{index-SKwvOtlz.js → index-CcYCRia5.js} +1 -1
  109. package/dist/client/assets/{index-C8u6axf-.js → index-CrHCQ8Nf.js} +1 -1
  110. package/dist/client/assets/{index-BmSASrPR.js → index-CyPfQaAG.js} +1 -1
  111. package/dist/client/assets/{index-B84Dx7nI.js → index-D4JwUMfo.js} +3 -3
  112. package/dist/client/assets/{index-BGwf3l_M.js → index-DMdX3d7M.js} +1 -1
  113. package/dist/client/assets/{index-BPI27S5s.js → index-DSWhMirv.js} +1 -1
  114. package/dist/client/assets/{index-CmH5OQnm.js → index-DbJ64cDo.js} +1 -1
  115. package/dist/client/assets/{infiniteQueryObserver-DenS4T97.js → infiniteQueryObserver-DAdEAsRM.js} +1 -1
  116. package/dist/client/assets/{input-NIbTU7RU.js → input-BRH9Cf1s.js} +1 -1
  117. package/dist/client/assets/{integration-icon-DNJkhUIt.js → integration-icon-D2pk71z8.js} +1 -1
  118. package/dist/client/assets/{label-B6R7vHKQ.js → label-BhB8mtiL.js} +1 -1
  119. package/dist/client/assets/{layout-CECSvrhq.js → layout-CR4iGa7x.js} +1 -1
  120. package/dist/client/assets/{layout-CMdmqG4j.js → layout-DUbXIf2V.js} +1 -1
  121. package/dist/client/assets/{localstorage-keys-BckSA5cs.js → localstorage-keys-xw4Txgji.js} +1 -1
  122. package/dist/client/assets/{login-BfEg3qXN.js → login-DpLcnK8m.js} +1 -1
  123. package/dist/client/assets/{markdown-Cqv1T19z.js → markdown-Bew8FtWp.js} +1 -1
  124. package/dist/client/assets/{mcp-app-renderer-gG-wM7zZ.js → mcp-app-renderer-DXWDRIz1.js} +1 -1
  125. package/dist/client/assets/{mcp-server-card-M7WdUx8I.js → mcp-server-card-CGJI-JTC.js} +1 -1
  126. package/dist/client/assets/{mcp-server-detail-D73ue2Yz.js → mcp-server-detail-Du7Mkxw8.js} +2 -2
  127. package/dist/client/assets/{members-Buq9RcXv.js → members-aFtvvF7x.js} +1 -1
  128. package/dist/client/assets/{monaco-editor-BXv0Xqkq.js → monaco-editor-Bu_nzanD.js} +1 -1
  129. package/dist/client/assets/{monitoring-CEhjsxOM.js → monitoring-DUPAD86y.js} +1 -1
  130. package/dist/client/assets/{monitoring-dashboard-edit-BntH-KiR.js → monitoring-dashboard-edit-jvf2tclW.js} +1 -1
  131. package/dist/client/assets/{monitoring-dashboard-view-Bw3iwoxc.js → monitoring-dashboard-view-Cq38oJdA.js} +1 -1
  132. package/dist/client/assets/{oauth-callback-D455SJn4.js → oauth-callback-D6_W5G9Z.js} +1 -1
  133. package/dist/client/assets/{page-DrITT5mj.js → page-BS9YQYaQ.js} +1 -1
  134. package/dist/client/assets/{page-C-6ciKw-.js → page-MwTkffcW.js} +1 -1
  135. package/dist/client/assets/{plugin-empty-state-BLzOpmuv.js → plugin-empty-state-CX1Iswsk.js} +1 -1
  136. package/dist/client/assets/{plugin-empty-state-D73E0OXs.js → plugin-empty-state-K_WMVH5N.js} +1 -1
  137. package/dist/client/assets/{plugin-header-_N_-KJkN.js → plugin-header-BnUtjbuj.js} +1 -1
  138. package/dist/client/assets/{plugin-header-DkXBoQof.js → plugin-header-wHkJw6Ps.js} +1 -1
  139. package/dist/client/assets/plugins-B8bz_CxQ.js +1 -0
  140. package/dist/client/assets/{popover-D7xgfP4W.js → popover-BUt6i0bO.js} +1 -1
  141. package/dist/client/assets/{project-app-view-DWi5m8l8.js → project-app-view-Ddnzem3H.js} +1 -1
  142. package/dist/client/assets/{project-layout-CWEThOiP.js → project-layout-DWDar7ZB.js} +1 -1
  143. package/dist/client/assets/{project-plugins-BKPLJXFp.js → project-plugins-WC8H-cAg.js} +1 -1
  144. package/dist/client/assets/{projects-list-Y8k15POh.js → projects-list-C3_Rk2DF.js} +1 -1
  145. package/dist/client/assets/{readme-viewer-WWU4z7Xg.js → readme-viewer-Cl0fEGPs.js} +1 -1
  146. package/dist/client/assets/{registry-layout-D_LH6ewr.js → registry-layout-qsGwGj-s.js} +1 -1
  147. package/dist/client/assets/{registry-utils-CMqg9IHN.js → registry-utils-C_DP4Ynk.js} +1 -1
  148. package/dist/client/assets/{reports-layout-B3u5OkMC.js → reports-layout-G7dKXuEU.js} +1 -1
  149. package/dist/client/assets/{reset-password-Cm7BWULq.js → reset-password-CvmEg3aM.js} +1 -1
  150. package/dist/client/assets/{resizable-pH8vbRAI.js → resizable-D6AZXb64.js} +1 -1
  151. package/dist/client/assets/{save-actions-CTDUNaiW.js → save-actions-BdSxTuVy.js} +1 -1
  152. package/dist/client/assets/{scroll-area-DOWQyO2m.js → scroll-area-njeV-KTe.js} +1 -1
  153. package/dist/client/assets/{select-1y3LRFgk.js → select-DwZBzl3A.js} +1 -1
  154. package/dist/client/assets/{shell-layout-B6SbKq-6.js → shell-layout-DEmQ57ZH.js} +2 -2
  155. package/dist/client/assets/{sidebar-settings-BZx3Z8UA.js → sidebar-settings-CdNudIJY.js} +1 -1
  156. package/dist/client/assets/{skeleton-CMw17Qjd.js → skeleton-CbT1YKhD.js} +1 -1
  157. package/dist/client/assets/{spinner-DiXeE5Xk.js → spinner-DwdOzJhG.js} +1 -1
  158. package/dist/client/assets/{store-invite-BdRmGVAy.js → store-invite-DiA-EMIw.js} +1 -1
  159. package/dist/client/assets/{switch-BA80KxP2.js → switch-DZkrSmgJ.js} +1 -1
  160. package/dist/client/assets/{table-vuF1fVQ6.js → table-gCgflBYD.js} +1 -1
  161. package/dist/client/assets/{tabs-D3RTRDyW.js → tabs-D9mKN69N.js} +1 -1
  162. package/dist/client/assets/tasks-Ehdu-4cK.js +1 -0
  163. package/dist/client/assets/{tasks-panel-D3YXt5j8.js → tasks-panel-F1KlPjDk.js} +1 -1
  164. package/dist/client/assets/{textarea-BW2ziFqJ.js → textarea-Bdphv-Mj.js} +1 -1
  165. package/dist/client/assets/{time-range-picker-CZg_Yx1g.js → time-range-picker-CBcFD3JT.js} +1 -1
  166. package/dist/client/assets/{toggle-group-DO86EMeS.js → toggle-group-DbiUjc4d.js} +1 -1
  167. package/dist/client/assets/{tools-list-BzLGkrz5.js → tools-list-xYMva9v3.js} +1 -1
  168. package/dist/client/assets/{tooltip-CHJhCJL3.js → tooltip-BcimsULQ.js} +1 -1
  169. package/dist/client/assets/{topbar-portal-BomQ7YMR.js → topbar-portal-DecQv7ul.js} +1 -1
  170. package/dist/client/assets/{types-DibruoFW.js → types-DVrpg4Au.js} +1 -1
  171. package/dist/client/assets/{use-binding-Bdb-0lwc.js → use-binding-CZG6TNcT.js} +1 -1
  172. package/dist/client/assets/{use-collections-BoFyuDa6.js → use-collections-Bs1uQVQJ.js} +1 -1
  173. package/dist/client/assets/{use-connection-DSPQNIQD.js → use-connection-96ulKDkp.js} +1 -1
  174. package/dist/client/assets/{use-copy-Ba97e-kV.js → use-copy-CqEqSzSC.js} +1 -1
  175. package/dist/client/assets/{use-create-virtual-mcp-Cf71AE6l.js → use-create-virtual-mcp-LFxhmGpw.js} +1 -1
  176. package/dist/client/assets/{use-install-from-registry-B6NE77_0.js → use-install-from-registry-B8bxY6WO.js} +1 -1
  177. package/dist/client/assets/{use-list-state-kborONTL.js → use-list-state-C-V7Oz_V.js} +1 -1
  178. package/dist/client/assets/{use-llm-CKGJlXuC.js → use-llm-CmHgTlzz.js} +1 -1
  179. package/dist/client/assets/{use-mcp-prompts-C___IsDE.js → use-mcp-prompts-DDRMLpw3.js} +1 -1
  180. package/dist/client/assets/{use-mcp-tools-K2l5CqFr.js → use-mcp-tools-BvNLaNQe.js} +1 -1
  181. package/dist/client/assets/{use-members-DajocvHM.js → use-members-DrMgxhod.js} +1 -1
  182. package/dist/client/assets/{use-mobile-DznYZ63b.js → use-mobile-DoL_dqtN.js} +1 -1
  183. package/dist/client/assets/{use-preferences-BfaOwWT4.js → use-preferences-BrXnvkz-.js} +1 -1
  184. package/dist/client/assets/{use-project-DZlIfmd3.js → use-project-BFzyu71z.js} +1 -1
  185. package/dist/client/assets/{use-settings-modal-C2h2dbTq.js → use-settings-modal-BIGLZUPG.js} +1 -1
  186. package/dist/client/assets/{use-view-mode-3gfyljcZ.js → use-view-mode-BArlOdRG.js} +1 -1
  187. package/dist/client/assets/{use-virtual-mcp-5EdNqvyH.js → use-virtual-mcp-B9smgfPR.js} +1 -1
  188. package/dist/client/assets/useInfiniteQuery-BgV83YrM.js +1 -0
  189. package/dist/client/assets/{useMutation-Be5QSQym.js → useMutation-D-zwC1-P.js} +1 -1
  190. package/dist/client/assets/useQuery-D0xC6l4K.js +1 -0
  191. package/dist/client/assets/useSuspenseInfiniteQuery-8i63vxYn.js +1 -0
  192. package/dist/client/assets/{user-CY9QFLJr.js → user-BoAAEh6g.js} +1 -1
  193. package/dist/client/assets/{workflow-Db4yuI9S.js → workflow-DBN2RqP8.js} +1 -1
  194. package/dist/client/index.html +1 -1
  195. package/package.json +1 -1
  196. package/dist/client/assets/constants-BBAQxhFl.js +0 -1
  197. package/dist/client/assets/plugins-D4w2xHCL.js +0 -1
  198. package/dist/client/assets/tasks-C_CW4iPq.js +0 -1
  199. package/dist/client/assets/useInfiniteQuery-CFRJ66U9.js +0 -1
  200. package/dist/client/assets/useQuery-CIRdCYZz.js +0 -1
  201. package/dist/client/assets/useSuspenseInfiniteQuery-CQgxvKZn.js +0 -1
@@ -1,4 +1,4 @@
1
- import{r as a,bH as N,j as T,c as Me,bZ as te}from"./index-B84Dx7nI.js";import{S as me}from"./spinner-DiXeE5Xk.js";const Pe=({size:e=24,color:t="currentColor",...r})=>a.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},a.createElement("path",{d:"M21 10H3m13-8v4M8 2v4m-.2 16h8.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 19.72 21 18.88 21 17.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C18.72 4 17.88 4 16.2 4H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 6.28 3 7.12 3 8.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 22 6.12 22 7.8 22Z"}));Pe.displayName="Calendar";function ue(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Re(e){if(Array.isArray(e))return e}function Se(e,t,r){return(t=Ve(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,u,l=[],c=!0,g=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(O){g=!0,o=O}finally{try{if(!c&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(g)throw o}}return l}}function Ce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
1
+ import{r as a,bH as N,j as T,c as Me,bZ as te}from"./index-D4JwUMfo.js";import{S as me}from"./spinner-DwdOzJhG.js";const Pe=({size:e=24,color:t="currentColor",...r})=>a.createElement("svg",{viewBox:"0 0 24 24",width:e,height:e,stroke:t,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...r},a.createElement("path",{d:"M21 10H3m13-8v4M8 2v4m-.2 16h8.4c1.68 0 2.52 0 3.162-.327a3 3 0 0 0 1.311-1.311C21 19.72 21 18.88 21 17.2V8.8c0-1.68 0-2.52-.327-3.162a3 3 0 0 0-1.311-1.311C18.72 4 17.88 4 16.2 4H7.8c-1.68 0-2.52 0-3.162.327a3 3 0 0 0-1.311 1.311C3 6.28 3 7.12 3 8.8v8.4c0 1.68 0 2.52.327 3.162a3 3 0 0 0 1.311 1.311C5.28 22 6.12 22 7.8 22Z"}));Pe.displayName="Calendar";function ue(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function Re(e){if(Array.isArray(e))return e}function Se(e,t,r){return(t=Ve(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xe(e,t){var r=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(r!=null){var n,o,i,u,l=[],c=!0,g=!1;try{if(i=(r=r.call(e)).next,t!==0)for(;!(c=(n=i.call(r)).done)&&(l.push(n.value),l.length!==t);c=!0);}catch(O){g=!0,o=O}finally{try{if(!c&&r.return!=null&&(u=r.return(),Object(u)!==u))return}finally{if(g)throw o}}return l}}function Ce(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
2
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ce(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function se(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ce(Object(r),!0).forEach(function(n){Se(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ce(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Te(e,t){if(e==null)return{};var r,n,o=_e(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(n=0;n<i.length;n++)r=i[n],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(o[r]=e[r])}return o}function _e(e,t){if(e==null)return{};var r={};for(var n in e)if({}.hasOwnProperty.call(e,n)){if(t.indexOf(n)!==-1)continue;r[n]=e[n]}return r}function Ie(e,t){return Re(e)||xe(e,t)||Ae(e,t)||Ce()}function Le(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Ve(e){var t=Le(e,"string");return typeof t=="symbol"?t:t+""}function Ae(e,t){if(e){if(typeof e=="string")return ue(e,t);var r={}.toString.call(e).slice(8,-1);return r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set"?Array.from(e):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ue(e,t):void 0}}function $e(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function le(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),r.push.apply(r,n)}return r}function fe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?le(Object(r),!0).forEach(function(n){$e(e,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):le(Object(r)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(r,n))})}return e}function Ne(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(n){return t.reduceRight(function(o,i){return i(o)},n)}}function k(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];return t.apply(r,[].concat(o,l))}}}function Q(e){return{}.toString.call(e).includes("Object")}function De(e){return!Object.keys(e).length}function W(e){return typeof e=="function"}function ze(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function ke(e,t){return Q(t)||C("changeType"),Object.keys(t).some(function(r){return!ze(e,r)})&&C("changeField"),t}function Ke(e){W(e)||C("selectorType")}function We(e){W(e)||Q(e)||C("handlerType"),Q(e)&&Object.values(e).some(function(t){return!W(t)})&&C("handlersType")}function qe(e){e||C("initialIsRequired"),Q(e)||C("initialType"),De(e)&&C("initialContent")}function Fe(e,t){throw new Error(e[t]||e.default)}var He={initialIsRequired:"initial state is required",initialType:"initial state should be an object",initialContent:"initial state shouldn't be an empty object",handlerType:"handler should be an object or a function",handlersType:"all handlers should be a functions",selectorType:"selector should be a function",changeType:"provided value of changes should be an object",changeField:'it seams you want to change a field in the state which is not specified in the "initial" state',default:"an unknown error accured in `state-local` package"},C=k(Fe)(He),U={changes:ke,selector:Ke,handler:We,initial:qe};function Ue(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};U.initial(e),U.handler(t);var r={current:e},n=k(Qe)(r,t),o=k(Je)(r),i=k(U.changes)(e),u=k(Be)(r);function l(){var g=arguments.length>0&&arguments[0]!==void 0?arguments[0]:function(O){return O};return U.selector(g),g(r.current)}function c(g){Ne(n,o,i,u)(g)}return[l,c]}function Be(e,t){return W(t)?t(e.current):t}function Je(e,t){return e.current=fe(fe({},e.current),t),t}function Qe(e,t,r){return W(t)?t(e.current):Object.keys(r).forEach(function(n){var o;return(o=t[n])===null||o===void 0?void 0:o.call(t,e.current[n])}),r}var Ze={create:Ue},Ge={paths:{vs:"https://cdn.jsdelivr.net/npm/monaco-editor@0.55.1/min/vs"}};function Ye(e){return function t(){for(var r=this,n=arguments.length,o=new Array(n),i=0;i<n;i++)o[i]=arguments[i];return o.length>=e.length?e.apply(this,o):function(){for(var u=arguments.length,l=new Array(u),c=0;c<u;c++)l[c]=arguments[c];return t.apply(r,[].concat(o,l))}}}function Xe(e){return{}.toString.call(e).includes("Object")}function et(e){return e||de("configIsRequired"),Xe(e)||de("configType"),e.urls?(tt(),{paths:{vs:e.urls.monacoBase}}):e}function tt(){console.warn(he.deprecation)}function rt(e,t){throw new Error(e[t]||e.default)}var he={configIsRequired:"the configuration object is required",configType:"the configuration object should be an object",default:"an unknown error accured in `@monaco-editor/loader` package",deprecation:`Deprecation warning!
3
3
  You are using deprecated way of configuration.
4
4
 
@@ -1,4 +1,4 @@
1
- import{r as m,c6 as Fe,bI as vn,cg as hn,c as ae,z as we,j as n,E as qt,u as Ye,w as xn,e as Vt,v as gn,K as it,B as ye,x as It,O as na,d as bn}from"./index-B84Dx7nI.js";import{E as Ht,C as yn}from"./collection-search-DXvW2iQG.js";import{P as be}from"./index-CmH5OQnm.js";import{B as sa,a as ia,b as oa,c as la}from"./breadcrumb-BrsAPde7.js";import{E as jn,d as wn,e as rr,b as Nn,M as Pn,T as On,p as et,s as Re,a as ar}from"./time-range-picker-CZg_Yx1g.js";import{I as ot}from"./integration-icon-DNJkhUIt.js";import{B as lt}from"./badge-DxYG_XB9.js";import{t as Tt}from"./ChevronDown-BR4cCk-W.js";import{i as Sn}from"./ChevronRight-ByOuE_Vi.js";import{c as he,b as Ge,d as ca,e as da,a as ua,T as Q}from"./table-vuF1fVQ6.js";import{ar as In,as as tt,a2 as Ce,i as He,at as ma,r as We,V as gt,au as fa,X as bt,av as V,Y as H,aw as ze,ax as ct,ay as dt,az as Ie,aA as nr,O as Ae,a3 as kn,a8 as Gt,aB as Cn,aC as An,aD as En,aE as Tn,_ as Ke,a5 as Mt,w as Mn,l as fe,m as Se,aF as Dn,p as Ne,v as Pe,z as Ut,x as _n,y as ut,B as pa,D as yt,c as jt,R as va,S as ha,C as xa,F as wt,G as ga,H as ba,K as ya,L as Ln,I as ja,d as Ue,M as $n,N as Bn,Z as Nt,P as wa,Q as Rn,T as Pt,U as sr,a0 as Na,a1 as Pa,k as Oa,a4 as zn,aG as Kn,ac as Fn,n as Wn,q as Ee,t as Te,aH as Sa,aI as qn,aJ as Vn,A as ir,aK as Hn,aL as or,E as Gn,aM as Un,aN as Ia,aO as Zn,aP as ka,aQ as Yn,aR as Xn,aS as lr,aT as Qn,$ as Jn,al as Ca,am as Aa,ap as Ea,aq as es,an as Ta,ao as ts}from"./chart-DnUFHI2d.js";import{u as Zt,a as Yt,W as rs}from"./constants-_xTq0aTt.js";import{i as as}from"./DotsVertical-Cshw63SI.js";import{i as ns}from"./Edit05-BKDqgNc4.js";import{s as Ma}from"./Plus-Dp8Rr75G.js";import{s as Da}from"./Trash01-DJTe1fKw.js";import{C as ss}from"./connection-card--y0YdfEA.js";import{D as is,a as os,b as ls,c as cr}from"./dropdown-menu-DjhC4m2a.js";import{f as cs,a as ds,b as us,c as ms,d as fs,e as ps,A as vs,h as hs}from"./alert-dialog-Bbrwo05x.js";import{u as xs}from"./use-members-DajocvHM.js";import{u as gs}from"./useSuspenseInfiniteQuery-CQgxvKZn.js";import{b as _a}from"./use-connection-DSPQNIQD.js";import{b as bs}from"./use-virtual-mcp-5EdNqvyH.js";import{i as ys}from"./Code01-BsBlwdG0.js";import{n as Dt}from"./Container-BVSlDn4p.js";import{i as js}from"./FilterLines-pJtef_Pv.js";import{c as ws}from"./Grid01-DIGu5eh8.js";import{I as kt}from"./input-NIbTU7RU.js";import{C as dr}from"./checkbox-DhgSL5Cz.js";import{c as Ns,d as Ps,e as ur,a as Os,C as Ss,b as Is}from"./command-wAVHsF2T.js";import{b as La,P as $a,a as Ba}from"./popover-D7xgfP4W.js";import{S as mr,a as fr,b as pr,c as vr,d as rt}from"./select-1y3LRFgk.js";import{T as ks}from"./textarea-BW2ziFqJ.js";import{T as Cs,a as As,b as Es}from"./tooltip-CHJhCJL3.js";import{C as Ra}from"./collection-tabs-BEqvkJum.js";import{S as Ts}from"./switch-BA80KxP2.js";import{L as Ms}from"./label-B6R7vHKQ.js";import{u as Ds}from"./use-mcp-tools-K2l5CqFr.js";import"./Loading01-aMp99RZI.js";import"./SearchMd-r7i5BQk7.js";import"./localstorage-keys-BckSA5cs.js";import"./useQuery-CIRdCYZz.js";import"./useMutation-Be5QSQym.js";import"./Check-OSWZCZf9.js";import"./Copy01-B595Thpy.js";import"./Download01-DFmX-SGA.js";import"./Key01-BP2mhRrj.js";import"./Play-Dr8AlTmi.js";import"./monaco-editor-BXv0Xqkq.js";import"./spinner-DiXeE5Xk.js";import"./scroll-area-DOWQyO2m.js";import"./Clock-BEpmd0mM.js";import"./ChevronLeft-D4Ua6sXw.js";import"./index-DA_JOtb0.js";import"./card-CkYe6Ikt.js";import"./infiniteQueryObserver-DenS4T97.js";import"./use-collections-BoFyuDa6.js";import"./index-BGwf3l_M.js";import"./index-C8u6axf-.js";const _t=({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"}));_t.displayName="BarChart07";const za=({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"}));za.displayName="PauseCircle";const Ka=({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"}));Ka.displayName="PlayCircle";const Fa=Math.cos,mt=Math.sin,pe=Math.sqrt,ft=Math.PI,Ot=2*ft,Xt={draw(t,e){const r=pe(e/ft);t.moveTo(r,0),t.arc(0,0,r,0,Ot)}},_s={draw(t,e){const r=pe(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()}},Wa=pe(1/3),Ls=Wa*2,$s={draw(t,e){const r=pe(e/Ls),a=r*Wa;t.moveTo(0,-r),t.lineTo(a,0),t.lineTo(0,r),t.lineTo(-a,0),t.closePath()}},Bs={draw(t,e){const r=pe(e),a=-r/2;t.rect(a,a,r,r)}},Rs=.8908130915292852,qa=mt(ft/10)/mt(7*ft/10),zs=mt(Ot/10)*qa,Ks=-Fa(Ot/10)*qa,Fs={draw(t,e){const r=pe(e*Rs),a=zs*r,i=Ks*r;t.moveTo(0,-r),t.lineTo(a,i);for(let s=1;s<5;++s){const o=Ot*s/5,l=Fa(o),c=mt(o);t.lineTo(c*r,-l*r),t.lineTo(l*a-c*i,c*a+l*i)}t.closePath()}},Ct=pe(3),Ws={draw(t,e){const r=-pe(e/(Ct*3));t.moveTo(0,r*2),t.lineTo(-Ct*r,-r),t.lineTo(Ct*r,-r),t.closePath()}},ce=-.5,de=pe(3)/2,Lt=1/pe(12),qs=(Lt/2+1)*3,Vs={draw(t,e){const r=pe(e/qs),a=r/2,i=r*Lt,s=a,o=r*Lt+r,l=-s,c=o;t.moveTo(a,i),t.lineTo(s,o),t.lineTo(l,c),t.lineTo(ce*a-de*i,de*a+ce*i),t.lineTo(ce*s-de*o,de*s+ce*o),t.lineTo(ce*l-de*c,de*l+ce*c),t.lineTo(ce*a+de*i,ce*i-de*a),t.lineTo(ce*s+de*o,ce*o-de*s),t.lineTo(ce*l+de*c,ce*c-de*l),t.closePath()}};function Hs(t,e){let r=null,a=In(i);t=typeof t=="function"?t:tt(t||Xt),e=typeof e=="function"?e:tt(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:tt(s),i):t},i.size=function(s){return arguments.length?(e=typeof s=="function"?s:tt(+s),i):e},i.context=function(s){return arguments.length?(r=s??null,i):r},i}var Gs=["type","size","sizeType"];function $t(){return $t=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},$t.apply(null,arguments)}function hr(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 xr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?hr(Object(r),!0).forEach(function(a){Us(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):hr(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Us(t,e,r){return(e=Zs(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zs(t){var e=Ys(t,"string");return typeof e=="symbol"?e:e+""}function Ys(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 Xs(t,e){if(t==null)return{};var r,a,i=Qs(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 Qs(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 Va={symbolCircle:Xt,symbolCross:_s,symbolDiamond:$s,symbolSquare:Bs,symbolStar:Fs,symbolTriangle:Ws,symbolWye:Vs},Js=Math.PI/180,ei=t=>{var e="symbol".concat(ma(t));return Va[e]||Xt},ti=(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*Js;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}},ri=(t,e)=>{Va["symbol".concat(ma(t))]=e},Ha=t=>{var{type:e="circle",size:r=64,sizeType:a="area"}=t,i=Xs(t,Gs),s=xr(xr({},i),{},{type:e,size:r,sizeType:a}),o="circle";typeof e=="string"&&(o=e);var l=()=>{var f=ei(o),x=Hs().type(f).size(ti(r,a,o)),y=x();if(y!==null)return y},{className:c,cx:d,cy:u}=s,v=Ce(s);return He(d)&&He(u)&&He(r)?m.createElement("path",$t({},v,{className:Fe("recharts-symbols",c),transform:"translate(".concat(d,", ").concat(u,")"),d:l()})):null};Ha.registerSymbol=ri;var ai=["radius"],ni=["radius"],gr,br,yr,jr,wr,Nr,Pr,Or,Sr,Ir;function kr(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 Cr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?kr(Object(r),!0).forEach(function(a){si(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):kr(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function si(t,e,r){return(e=ii(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ii(t){var e=oi(t,"string");return typeof e=="symbol"?e:e+""}function oi(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 pt(){return pt=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},pt.apply(null,arguments)}function Ar(t,e){if(t==null)return{};var r,a,i=li(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 li(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 xe(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var Er=(t,e,r,a,i)=>{var s=ze(r),o=ze(a),l=Math.min(Math.abs(s)/2,Math.abs(o)/2),c=o>=0?1:-1,d=s>=0?1:-1,u=o>=0&&s>=0||o<0&&s<0?1:0,v;if(l>0&&Array.isArray(i)){for(var f=[0,0,0,0],x=0,y=4;x<y;x++){var g,b=(g=i[x])!==null&&g!==void 0?g:0;f[x]=b>l?l:b}v=V(gr||(gr=xe(["M",",",""])),t,e+c*f[0]),f[0]>0&&(v+=V(br||(br=xe(["A ",",",",0,0,",",",",",""])),f[0],f[0],u,t+d*f[0],e)),v+=V(yr||(yr=xe(["L ",",",""])),t+r-d*f[1],e),f[1]>0&&(v+=V(jr||(jr=xe(["A ",",",",0,0,",`,
1
+ import{r as m,c6 as Fe,bI as vn,cg as hn,c as ae,z as we,j as n,E as qt,u as Ye,w as xn,e as Vt,v as gn,K as it,B as ye,x as It,O as na,d as bn}from"./index-D4JwUMfo.js";import{E as Ht,C as yn}from"./collection-search-Cg477-ZE.js";import{P as be}from"./index-DbJ64cDo.js";import{B as sa,a as ia,b as oa,c as la}from"./breadcrumb-HFSeCoIU.js";import{E as jn,d as wn,e as rr,b as Nn,M as Pn,T as On,p as et,s as Re,a as ar}from"./time-range-picker-CBcFD3JT.js";import{I as ot}from"./integration-icon-D2pk71z8.js";import{B as lt}from"./badge-Bgf3f5yM.js";import{t as Tt}from"./ChevronDown-cViiGxn9.js";import{i as Sn}from"./ChevronRight-D7UsQHH3.js";import{c as he,b as Ge,d as ca,e as da,a as ua,T as Q}from"./table-gCgflBYD.js";import{ar as In,as as tt,a2 as Ce,i as He,at as ma,r as We,V as gt,au as fa,X as bt,av as V,Y as H,aw as ze,ax as ct,ay as dt,az as Ie,aA as nr,O as Ae,a3 as kn,a8 as Gt,aB as Cn,aC as An,aD as En,aE as Tn,_ as Ke,a5 as Mt,w as Mn,l as fe,m as Se,aF as Dn,p as Ne,v as Pe,z as Ut,x as _n,y as ut,B as pa,D as yt,c as jt,R as va,S as ha,C as xa,F as wt,G as ga,H as ba,K as ya,L as Ln,I as ja,d as Ue,M as $n,N as Bn,Z as Nt,P as wa,Q as Rn,T as Pt,U as sr,a0 as Na,a1 as Pa,k as Oa,a4 as zn,aG as Kn,ac as Fn,n as Wn,q as Ee,t as Te,aH as Sa,aI as qn,aJ as Vn,A as ir,aK as Hn,aL as or,E as Gn,aM as Un,aN as Ia,aO as Zn,aP as ka,aQ as Yn,aR as Xn,aS as lr,aT as Qn,$ as Jn,al as Ca,am as Aa,ap as Ea,aq as es,an as Ta,ao as ts}from"./chart-6PxHbkHq.js";import{u as Zt,a as Yt,W as rs}from"./constants-DMTOffGt.js";import{i as as}from"./DotsVertical-DxhWxx-U.js";import{i as ns}from"./Edit05-BbXNdh53.js";import{s as Ma}from"./Plus-DRukDy12.js";import{s as Da}from"./Trash01-DO5SV3mV.js";import{C as ss}from"./connection-card-AwrPPwJU.js";import{D as is,a as os,b as ls,c as cr}from"./dropdown-menu-CXrh9ioK.js";import{f as cs,a as ds,b as us,c as ms,d as fs,e as ps,A as vs,h as hs}from"./alert-dialog-BpAl1CV2.js";import{u as xs}from"./use-members-DrMgxhod.js";import{u as gs}from"./useSuspenseInfiniteQuery-8i63vxYn.js";import{b as _a}from"./use-connection-96ulKDkp.js";import{b as bs}from"./use-virtual-mcp-B9smgfPR.js";import{i as ys}from"./Code01-EB8m5diA.js";import{n as Dt}from"./Container-BnukWtxV.js";import{i as js}from"./FilterLines-D7KpfRSU.js";import{c as ws}from"./Grid01-BOCowW7O.js";import{I as kt}from"./input-BRH9Cf1s.js";import{C as dr}from"./checkbox-DiriJ1bL.js";import{c as Ns,d as Ps,e as ur,a as Os,C as Ss,b as Is}from"./command-Du1jchMC.js";import{b as La,P as $a,a as Ba}from"./popover-BUt6i0bO.js";import{S as mr,a as fr,b as pr,c as vr,d as rt}from"./select-DwZBzl3A.js";import{T as ks}from"./textarea-Bdphv-Mj.js";import{T as Cs,a as As,b as Es}from"./tooltip-BcimsULQ.js";import{C as Ra}from"./collection-tabs-BQNMu9-v.js";import{S as Ts}from"./switch-DZkrSmgJ.js";import{L as Ms}from"./label-BhB8mtiL.js";import{u as Ds}from"./use-mcp-tools-BvNLaNQe.js";import"./Loading01-1unV3no7.js";import"./SearchMd-DQrPJQV9.js";import"./localstorage-keys-xw4Txgji.js";import"./useQuery-D0xC6l4K.js";import"./useMutation-D-zwC1-P.js";import"./Check-q1dqks2U.js";import"./Copy01-DIuxFCYv.js";import"./Download01-RW_lAP8U.js";import"./Key01-DZIfBgYr.js";import"./Play-Bae0FSDA.js";import"./monaco-editor-Bu_nzanD.js";import"./spinner-DwdOzJhG.js";import"./scroll-area-njeV-KTe.js";import"./Clock-uUYVZnmE.js";import"./ChevronLeft-Cl-I3Mb5.js";import"./index-BgG2zeek.js";import"./card-CeKLZLLA.js";import"./infiniteQueryObserver-DAdEAsRM.js";import"./use-collections-Bs1uQVQJ.js";import"./index-DMdX3d7M.js";import"./index-CrHCQ8Nf.js";const _t=({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"}));_t.displayName="BarChart07";const za=({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"}));za.displayName="PauseCircle";const Ka=({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"}));Ka.displayName="PlayCircle";const Fa=Math.cos,mt=Math.sin,pe=Math.sqrt,ft=Math.PI,Ot=2*ft,Xt={draw(t,e){const r=pe(e/ft);t.moveTo(r,0),t.arc(0,0,r,0,Ot)}},_s={draw(t,e){const r=pe(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()}},Wa=pe(1/3),Ls=Wa*2,$s={draw(t,e){const r=pe(e/Ls),a=r*Wa;t.moveTo(0,-r),t.lineTo(a,0),t.lineTo(0,r),t.lineTo(-a,0),t.closePath()}},Bs={draw(t,e){const r=pe(e),a=-r/2;t.rect(a,a,r,r)}},Rs=.8908130915292852,qa=mt(ft/10)/mt(7*ft/10),zs=mt(Ot/10)*qa,Ks=-Fa(Ot/10)*qa,Fs={draw(t,e){const r=pe(e*Rs),a=zs*r,i=Ks*r;t.moveTo(0,-r),t.lineTo(a,i);for(let s=1;s<5;++s){const o=Ot*s/5,l=Fa(o),c=mt(o);t.lineTo(c*r,-l*r),t.lineTo(l*a-c*i,c*a+l*i)}t.closePath()}},Ct=pe(3),Ws={draw(t,e){const r=-pe(e/(Ct*3));t.moveTo(0,r*2),t.lineTo(-Ct*r,-r),t.lineTo(Ct*r,-r),t.closePath()}},ce=-.5,de=pe(3)/2,Lt=1/pe(12),qs=(Lt/2+1)*3,Vs={draw(t,e){const r=pe(e/qs),a=r/2,i=r*Lt,s=a,o=r*Lt+r,l=-s,c=o;t.moveTo(a,i),t.lineTo(s,o),t.lineTo(l,c),t.lineTo(ce*a-de*i,de*a+ce*i),t.lineTo(ce*s-de*o,de*s+ce*o),t.lineTo(ce*l-de*c,de*l+ce*c),t.lineTo(ce*a+de*i,ce*i-de*a),t.lineTo(ce*s+de*o,ce*o-de*s),t.lineTo(ce*l+de*c,ce*c-de*l),t.closePath()}};function Hs(t,e){let r=null,a=In(i);t=typeof t=="function"?t:tt(t||Xt),e=typeof e=="function"?e:tt(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:tt(s),i):t},i.size=function(s){return arguments.length?(e=typeof s=="function"?s:tt(+s),i):e},i.context=function(s){return arguments.length?(r=s??null,i):r},i}var Gs=["type","size","sizeType"];function $t(){return $t=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},$t.apply(null,arguments)}function hr(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 xr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?hr(Object(r),!0).forEach(function(a){Us(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):hr(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function Us(t,e,r){return(e=Zs(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zs(t){var e=Ys(t,"string");return typeof e=="symbol"?e:e+""}function Ys(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 Xs(t,e){if(t==null)return{};var r,a,i=Qs(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 Qs(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 Va={symbolCircle:Xt,symbolCross:_s,symbolDiamond:$s,symbolSquare:Bs,symbolStar:Fs,symbolTriangle:Ws,symbolWye:Vs},Js=Math.PI/180,ei=t=>{var e="symbol".concat(ma(t));return Va[e]||Xt},ti=(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*Js;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}},ri=(t,e)=>{Va["symbol".concat(ma(t))]=e},Ha=t=>{var{type:e="circle",size:r=64,sizeType:a="area"}=t,i=Xs(t,Gs),s=xr(xr({},i),{},{type:e,size:r,sizeType:a}),o="circle";typeof e=="string"&&(o=e);var l=()=>{var f=ei(o),x=Hs().type(f).size(ti(r,a,o)),y=x();if(y!==null)return y},{className:c,cx:d,cy:u}=s,v=Ce(s);return He(d)&&He(u)&&He(r)?m.createElement("path",$t({},v,{className:Fe("recharts-symbols",c),transform:"translate(".concat(d,", ").concat(u,")"),d:l()})):null};Ha.registerSymbol=ri;var ai=["radius"],ni=["radius"],gr,br,yr,jr,wr,Nr,Pr,Or,Sr,Ir;function kr(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 Cr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?kr(Object(r),!0).forEach(function(a){si(t,a,r[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):kr(Object(r)).forEach(function(a){Object.defineProperty(t,a,Object.getOwnPropertyDescriptor(r,a))})}return t}function si(t,e,r){return(e=ii(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ii(t){var e=oi(t,"string");return typeof e=="symbol"?e:e+""}function oi(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 pt(){return pt=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},pt.apply(null,arguments)}function Ar(t,e){if(t==null)return{};var r,a,i=li(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 li(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 xe(t,e){return e||(e=t.slice(0)),Object.freeze(Object.defineProperties(t,{raw:{value:Object.freeze(e)}}))}var Er=(t,e,r,a,i)=>{var s=ze(r),o=ze(a),l=Math.min(Math.abs(s)/2,Math.abs(o)/2),c=o>=0?1:-1,d=s>=0?1:-1,u=o>=0&&s>=0||o<0&&s<0?1:0,v;if(l>0&&Array.isArray(i)){for(var f=[0,0,0,0],x=0,y=4;x<y;x++){var g,b=(g=i[x])!==null&&g!==void 0?g:0;f[x]=b>l?l:b}v=V(gr||(gr=xe(["M",",",""])),t,e+c*f[0]),f[0]>0&&(v+=V(br||(br=xe(["A ",",",",0,0,",",",",",""])),f[0],f[0],u,t+d*f[0],e)),v+=V(yr||(yr=xe(["L ",",",""])),t+r-d*f[1],e),f[1]>0&&(v+=V(jr||(jr=xe(["A ",",",",0,0,",`,
2
2
  `,",",""])),f[1],f[1],u,t+r,e+c*f[1])),v+=V(wr||(wr=xe(["L ",",",""])),t+r,e+a-c*f[2]),f[2]>0&&(v+=V(Nr||(Nr=xe(["A ",",",",0,0,",`,
3
3
  `,",",""])),f[2],f[2],u,t+r-d*f[2],e+a)),v+=V(Pr||(Pr=xe(["L ",",",""])),t+d*f[3],e+a),f[3]>0&&(v+=V(Or||(Or=xe(["A ",",",",0,0,",`,
4
4
  `,",",""])),f[3],f[3],u,t,e+a-c*f[3])),v+="Z"}else if(l>0&&i===+i&&i>0){var h=Math.min(l,i);v=V(Sr||(Sr=xe(["M ",",",`
@@ -1 +1 @@
1
- import{r as C,c as we,g as Be,j as t,a4 as Fe,E as Te,u as Ee,w as Me,v as Re,K as ve,at as ze,B as re,x as pe}from"./index-B84Dx7nI.js";import{b as Oe}from"./use-connection-DSPQNIQD.js";import{u as $e,a as Ae}from"./constants-_xTq0aTt.js";import{I as le}from"./input-NIbTU7RU.js";import{I as ke}from"./integration-icon-DNJkhUIt.js";import{C as We}from"./checkbox-DhgSL5Cz.js";import{a as Le,b as Ve,P as Ue}from"./popover-D7xgfP4W.js";import{i as Ge}from"./AlignLeft-Cvo6EEA1.js";import{t as Ie}from"./ChevronDown-BR4cCk-W.js";import{S as je,a as be,b as ye,c as Ne,d as w,n as Ke}from"./select-1y3LRFgk.js";import{s as qe}from"./Hash02-CkWXLlvG.js";import{i as He}from"./Play-Dr8AlTmi.js";import{s as Qe}from"./Plus-Dp8Rr75G.js";import{s as Je}from"./Trash01-DJTe1fKw.js";import{T as Ye,a as Se}from"./toggle-group-DO86EMeS.js";import{a as Ze,V as Xe}from"./layout-CMdmqG4j.js";import{S as et}from"./save-actions-CTDUNaiW.js";import{B as tt,a as st,b as Pe,d as rt,e as lt,c as at}from"./breadcrumb-BrsAPde7.js";import"./use-collections-BoFyuDa6.js";import"./useMutation-Be5QSQym.js";import"./Container-BVSlDn4p.js";import"./Check-OSWZCZf9.js";import"./index-C8u6axf-.js";import"./index-CmH5OQnm.js";import"./localstorage-keys-BckSA5cs.js";import"./useQuery-CIRdCYZz.js";import"./tooltip-CHJhCJL3.js";import"./Save01-36pjbcKA.js";import"./Loading01-aMp99RZI.js";import"./ChevronRight-ByOuE_Vi.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,g as Be,j as t,a4 as Fe,E as Te,u as Ee,w as Me,v as Re,K as ve,at as ze,B as re,x as pe}from"./index-D4JwUMfo.js";import{b as Oe}from"./use-connection-96ulKDkp.js";import{u as $e,a as Ae}from"./constants-DMTOffGt.js";import{I as le}from"./input-BRH9Cf1s.js";import{I as ke}from"./integration-icon-D2pk71z8.js";import{C as We}from"./checkbox-DiriJ1bL.js";import{a as Le,b as Ve,P as Ue}from"./popover-BUt6i0bO.js";import{i as Ge}from"./AlignLeft-C6EBYnL8.js";import{t as Ie}from"./ChevronDown-cViiGxn9.js";import{S as je,a as be,b as ye,c as Ne,d as w,n as Ke}from"./select-DwZBzl3A.js";import{s as qe}from"./Hash02-B4FAvj_q.js";import{i as He}from"./Play-Bae0FSDA.js";import{s as Qe}from"./Plus-DRukDy12.js";import{s as Je}from"./Trash01-DO5SV3mV.js";import{T as Ye,a as Se}from"./toggle-group-DbiUjc4d.js";import{a as Ze,V as Xe}from"./layout-DUbXIf2V.js";import{S as et}from"./save-actions-BdSxTuVy.js";import{B as tt,a as st,b as Pe,d as rt,e as lt,c as at}from"./breadcrumb-HFSeCoIU.js";import"./use-collections-Bs1uQVQJ.js";import"./useMutation-D-zwC1-P.js";import"./Container-BnukWtxV.js";import"./Check-q1dqks2U.js";import"./index-CrHCQ8Nf.js";import"./index-DbJ64cDo.js";import"./localstorage-keys-xw4Txgji.js";import"./useQuery-D0xC6l4K.js";import"./tooltip-BcimsULQ.js";import"./Save01-Ba2I-ry6.js";import"./Loading01-1unV3no7.js";import"./ChevronRight-D7UsQHH3.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 $,j as t,B as R,c as D,w as xe,a4 as re,E as ge,u as fe,v as ne,K as oe,at as pe,g as he,e as je}from"./index-B84Dx7nI.js";import{a as be,u as ye}from"./constants-_xTq0aTt.js";import{p as ee,a as ce,s as ve,b as Ne,e as me,T as we}from"./time-range-picker-CZg_Yx1g.js";import{i as ke}from"./Edit05-BKDqgNc4.js";import{V as Se,a as Ce}from"./layout-CMdmqG4j.js";import{b as de,c as $e,d as Fe,e as Re,B as De,a as Te}from"./breadcrumb-BrsAPde7.js";import{B as _e}from"./badge-DxYG_XB9.js";import{I as ue}from"./input-NIbTU7RU.js";import{a as Pe,b as Ie,P as Me}from"./popover-D7xgfP4W.js";import{S as ze,a as Be,b as Ee,c as Oe,d as Ae}from"./select-1y3LRFgk.js";import{T as Ke}from"./textarea-BW2ziFqJ.js";import{T as Le,a as Ve,b as qe}from"./tooltip-CHJhCJL3.js";import{i as Qe}from"./Code01-BsBlwdG0.js";import{i as We}from"./FilterLines-pJtef_Pv.js";import{c as Ge}from"./Grid01-DIGu5eh8.js";import{s as He}from"./Plus-Dp8Rr75G.js";import{s as Ye}from"./Trash01-DJTe1fKw.js";import{s as Ue}from"./XClose-dSJ6zVxj.js";import"./Check-OSWZCZf9.js";import"./Copy01-B595Thpy.js";import"./Download01-DFmX-SGA.js";import"./Key01-BP2mhRrj.js";import"./Play-Dr8AlTmi.js";import"./monaco-editor-BXv0Xqkq.js";import"./spinner-DiXeE5Xk.js";import"./scroll-area-DOWQyO2m.js";import"./ChevronDown-BR4cCk-W.js";import"./Clock-BEpmd0mM.js";import"./ChevronLeft-D4Ua6sXw.js";import"./ChevronRight-ByOuE_Vi.js";import"./index-CmH5OQnm.js";import"./localstorage-keys-BckSA5cs.js";import"./useQuery-CIRdCYZz.js";import"./useMutation-Be5QSQym.js";import"./index-C8u6axf-.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]=$.useState(!1),[l,n]=$.useState("raw"),[c,o]=$.useState(s),[m,d]=$.useState(ee(s)),g=$.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,F)=>F!==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 $,j as t,B as R,c as D,w as xe,a4 as re,E as ge,u as fe,v as ne,K as oe,at as pe,g as he,e as je}from"./index-D4JwUMfo.js";import{a as be,u as ye}from"./constants-DMTOffGt.js";import{p as ee,a as ce,s as ve,b as Ne,e as me,T as we}from"./time-range-picker-CBcFD3JT.js";import{i as ke}from"./Edit05-BbXNdh53.js";import{V as Se,a as Ce}from"./layout-DUbXIf2V.js";import{b as de,c as $e,d as Fe,e as Re,B as De,a as Te}from"./breadcrumb-HFSeCoIU.js";import{B as _e}from"./badge-Bgf3f5yM.js";import{I as ue}from"./input-BRH9Cf1s.js";import{a as Pe,b as Ie,P as Me}from"./popover-BUt6i0bO.js";import{S as ze,a as Be,b as Ee,c as Oe,d as Ae}from"./select-DwZBzl3A.js";import{T as Ke}from"./textarea-Bdphv-Mj.js";import{T as Le,a as Ve,b as qe}from"./tooltip-BcimsULQ.js";import{i as Qe}from"./Code01-EB8m5diA.js";import{i as We}from"./FilterLines-D7KpfRSU.js";import{c as Ge}from"./Grid01-BOCowW7O.js";import{s as He}from"./Plus-DRukDy12.js";import{s as Ye}from"./Trash01-DO5SV3mV.js";import{s as Ue}from"./XClose-C1VIP6EM.js";import"./Check-q1dqks2U.js";import"./Copy01-DIuxFCYv.js";import"./Download01-RW_lAP8U.js";import"./Key01-DZIfBgYr.js";import"./Play-Bae0FSDA.js";import"./monaco-editor-Bu_nzanD.js";import"./spinner-DwdOzJhG.js";import"./scroll-area-njeV-KTe.js";import"./ChevronDown-cViiGxn9.js";import"./Clock-uUYVZnmE.js";import"./ChevronLeft-Cl-I3Mb5.js";import"./ChevronRight-D7UsQHH3.js";import"./index-DbJ64cDo.js";import"./localstorage-keys-xw4Txgji.js";import"./useQuery-D0xC6l4K.js";import"./useMutation-D-zwC1-P.js";import"./index-CrHCQ8Nf.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]=$.useState(!1),[l,n]=$.useState("raw"),[c,o]=$.useState(s),[m,d]=$.useState(ee(s)),g=$.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,F)=>F!==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(F=>F.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:F}=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(Fe,{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($e,{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]!==F?(V=F&&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]=F,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]=$.useState(n);let m;e[1]===Symbol.for("react.memo_cache_sentinel")?(m=[],e[1]=m):m=e[1];const[d,g]=$.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($.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,j as e,h as n}from"./index-B84Dx7nI.js";import{i as l}from"./Loading01-aMp99RZI.js";function d(){const[t,c]=r.useState(null),[i,a]=r.useState(!1);return r.useEffect(()=>{(async()=>{try{const s=await n();if(!s.success){c(s.error||"MCP authentication failed"),setTimeout(()=>{window.close()},3e3);return}a(!0),setTimeout(()=>{window.close()},1500)}catch(s){c(s instanceof Error?s.message:String(s)),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:[i&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),!i&&!t&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(l,{size:32,className:"animate-spin text-primary"})}),t&&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:t?"Authentication Failed":i?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:t?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:t}),e.jsxs("p",{className:"mt-2",children:[e.jsx("br",{}),"This window will close automatically."]})]}):i?e.jsxs("p",{children:["Authentication complete.",e.jsx("br",{}),"This window will close automatically."]}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{d as default};
1
+ import{r,j as e,h as n}from"./index-D4JwUMfo.js";import{i as l}from"./Loading01-1unV3no7.js";function d(){const[t,c]=r.useState(null),[i,a]=r.useState(!1);return r.useEffect(()=>{(async()=>{try{const s=await n();if(!s.success){c(s.error||"MCP authentication failed"),setTimeout(()=>{window.close()},3e3);return}a(!0),setTimeout(()=>{window.close()},1500)}catch(s){c(s instanceof Error?s.message:String(s)),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:[i&&e.jsx("img",{src:"/empty-state-success.svg",alt:"",width:220,height:200,"aria-hidden":"true"}),!i&&!t&&e.jsx("div",{className:"flex items-center justify-center py-4",children:e.jsx(l,{size:32,className:"animate-spin text-primary"})}),t&&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:t?"Authentication Failed":i?"Authentication Successful":"Authentication in progress..."}),e.jsx("div",{className:"text-sm text-muted-foreground",children:t?e.jsxs(e.Fragment,{children:[e.jsx("p",{className:"mb-2",children:"An error occurred during authentication:"}),e.jsx("p",{className:"text-destructive",children:t}),e.jsxs("p",{className:"mt-2",children:[e.jsx("br",{}),"This window will close automatically."]})]}):i?e.jsxs("p",{children:["Authentication complete.",e.jsx("br",{}),"This window will close automatically."]}):e.jsx("p",{children:"Processing authentication..."})})]})]})})}export{d as default};
@@ -1 +1 @@
1
- import{c as X,r as H,u as ne,K as me,c0 as ke,j as s,z as de,B as te,e as xe,a3 as ge,a4 as pe,O as he,f as ze,as as $e,c1 as ae,E as Le,au as Fe}from"./index-B84Dx7nI.js";import{P as se}from"./index-CmH5OQnm.js";import{B as Ee,a as Oe,b as _e,c as Ke}from"./breadcrumb-BrsAPde7.js";import{i as je}from"./FilterLines-pJtef_Pv.js";import{n as ye}from"./Inbox01-csEiEq63.js";import{i as le}from"./Loading01-aMp99RZI.js";import{i as ve}from"./SearchMd-r7i5BQk7.js";import{u as be}from"./useQuery-CIRdCYZz.js";import{u as Ae}from"./useInfiniteQuery-CFRJ66U9.js";import{a as Me,f as Be,b as De}from"./registry-utils-CMqg9IHN.js";import{u as Ne,W as Ge,a as We,f as Ve,b as qe}from"./constants-_xTq0aTt.js";import{u as Ue,a as Ce,b as He}from"./use-connection-DSPQNIQD.js";import{s as Je}from"./slugify-CEUa2lfQ.js";import{C as Qe,E as Ye}from"./collection-search-DXvW2iQG.js";import{M as ce}from"./mcp-server-card-M7WdUx8I.js";import{I as Ze}from"./input-NIbTU7RU.js";import{a as Se,b as we,P as Ie}from"./popover-D7xgfP4W.js";import{i as Te}from"./Check-OSWZCZf9.js";import{t as Re}from"./ChevronDown-BR4cCk-W.js";import{s as re}from"./XClose-dSJ6zVxj.js";import{s as Xe}from"./Plus-Dp8Rr75G.js";import{u as et}from"./use-binding-Bdb-0lwc.js";import{L as tt,u as st}from"./localstorage-keys-BckSA5cs.js";import"./tooltip-CHJhCJL3.js";import"./index-C8u6axf-.js";import"./ChevronRight-ByOuE_Vi.js";import"./infiniteQueryObserver-DenS4T97.js";import"./use-collections-BoFyuDa6.js";import"./useMutation-Be5QSQym.js";import"./CheckVerified02-D6qy17me.js";import"./Globe02-D7s1ULQJ.js";import"./Lock01-STjQUMU6.js";import"./Terminal-CtjH6zFY.js";import"./card-CkYe6Ikt.js";import"./integration-icon-DNJkhUIt.js";import"./Container-BVSlDn4p.js";import"./github-icon-Dp3wHhYE.js";import"./binder-wDmRPNL2.js";function rt(t,e){const r=X.c(4),[l,d]=H.useState(t),n=H.useRef(null),i=H.useRef(!0);let c,m;return r[0]!==e||r[1]!==t?(c=()=>{if(i.current){i.current=!1;return}return n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{d(t)},e),()=>{n.current&&clearTimeout(n.current)}},m=[t,e],r[0]=e,r[1]=t,r[2]=c,r[3]=m):(c=r[2],m=r[3]),H.useEffect(c,m),l}function lt(t){const e=X.c(14),r=H.useRef(null),l=`scroll-position:${t}`,d=H.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 c;e[2]!==l?(c=()=>{if(d.current===l)return;const x=sessionStorage.getItem(l);if(x&&r.current){const $=Number.parseInt(x,10);r.current.scrollTop=$}d.current=l},e[2]=l,e[3]=c):c=e[3];const m=c;let u;e[4]!==m||e[5]!==l?(u=()=>{d.current!==l&&m()},e[4]=m,e[5]=l,e[6]=u):u=e[6];const T=u;let o;e[7]!==m||e[8]!==l?(o=x=>{r.current=x,x&&d.current!==l&&requestAnimationFrame(()=>{m()})},e[7]=m,e[8]=l,e[9]=o):o=e[9];const p=o;let a;return e[10]!==T||e[11]!==i||e[12]!==p?(a={scrollRef:p,saveScrollPosition:i,handleScroll:T},e[10]=T,e[11]=i,e[12]=p,e[13]=a):a=e[13],a}const nt=24;function it(t){const e=X.c(54),{registryId:r,listToolName:l,filtersToolName:d,search:n}=t,{org:i}=ne();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=[],e[0]=c):c=e[0];const[m,u]=H.useState(c);let T;e[1]===Symbol.for("react.memo_cache_sentinel")?(T=[],e[1]=T):T=e[1];const[o,p]=H.useState(T),a=r||null;let x;e[2]!==i.id||e[3]!==a?(x={connectionId:a,orgId:i.id},e[2]=i.id,e[3]=a,e[4]=x):x=e[4];const $=Ne(x),R=!!d;let C;e[5]!==d||e[6]!==r?(C=me.toolCall(r,d||"no-filters","{}"),e[5]=d,e[6]=r,e[7]=C):C=e[7];let y;e[8]!==$||e[9]!==d?(y=async()=>{if(!d)return{tags:[],categories:[]};const O=await $.callTool({name:d,arguments:{}});return O.structuredContent??O},e[8]=$,e[9]=d,e[10]=y):y=e[10];let L;e[11]!==C||e[12]!==y?(L={queryKey:C,queryFn:y,staleTime:36e5,retry:2},e[11]=C,e[12]=y,e[13]=L):L=e[13];const{data:S}=be(L);let h,v,z;if(e[14]!==l||e[15]!==r||e[16]!==n||e[17]!==o||e[18]!==m){const O=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;h={limit:nt,...m.length>0&&{tags:m},...o.length>0&&{categories:o},...O&&{where:O}},z=Ae,v=me.toolCall(r,l,JSON.stringify(h)),e[14]=l,e[15]=r,e[16]=n,e[17]=o,e[18]=m,e[19]=h,e[20]=v,e[21]=z}else h=e[19],v=e[20],z=e[21];let P;e[22]!==$||e[23]!==h||e[24]!==l?(P=async O=>{const{pageParam:U}=O,K=U?{...h,cursor:U}:h,f=await $.callTool({name:l,arguments:K});return f.structuredContent??f},e[22]=$,e[23]=h,e[24]=l,e[25]=P):P=e[25];let k;e[26]!==P||e[27]!==v?(k={queryKey:v,queryFn:P,initialPageParam:void 0,getNextPageParam:ot,staleTime:36e5,placeholderData:ke,retry:2},e[26]=P,e[27]=v,e[28]=k):k=e[28];const{data:b,fetchNextPage:w,hasNextPage:g,isFetchingNextPage:N,isFetching:j,isLoading:F,error:I}=z(k);let E;e:{if(!b?.pages||b.pages.length===0){E=null;break e}const O=b.pages[0];if(typeof O=="object"&&O!==null&&"totalCount"in O&&typeof O.totalCount=="number"){E=O.totalCount;break e}E=null}const A=E,_=b?.pages;let G;e[29]!==_?(G=Me(_),e[29]=_,e[30]=G):G=e[30];const W=G;let J;e[31]!==n||e[32]!==o.length||e[33]!==m.length?(J=m.length>0||o.length>0||!!n?.trim(),e[31]=n,e[32]=o.length,e[33]=m.length,e[34]=J):J=e[34];const Y=J,Z=j&&!N&&!F&&Y;let V;e[35]!==w||e[36]!==g||e[37]!==N?(V=()=>{g&&!N&&w()},e[35]=w,e[36]=g,e[37]=N,e[38]=V):V=e[38];const Q=V,q=g??!1,M=R?S?.tags:void 0,B=R?S?.categories:void 0;let D;return e[39]!==Y||e[40]!==j||e[41]!==N||e[42]!==Z||e[43]!==F||e[44]!==W||e[45]!==I||e[46]!==Q||e[47]!==o||e[48]!==m||e[49]!==q||e[50]!==M||e[51]!==B||e[52]!==A?(D={items:W,totalCount:A,hasMore:q,isLoadingMore:N,isFiltering:Z,isInitialLoading:F,isFetching:j,error:I,loadMore:Q,availableTags:M,availableCategories:B,selectedTags:m,selectedCategories:o,setSelectedTags:u,setSelectedCategories:p,hasActiveFilters:Y},e[39]=Y,e[40]=j,e[41]=N,e[42]=Z,e[43]=F,e[44]=W,e[45]=I,e[46]=Q,e[47]=o,e[48]=m,e[49]=q,e[50]=M,e[51]=B,e[52]=A,e[53]=D):D=e[53],D}function ot(t){if(typeof t=="object"&&t!==null){const e=t.nextCursor||t.cursor;if(e)return e}}function at(t,e){return[...t].sort((r,l)=>l.count-r.count).slice(0,e)}function fe(t){const e=X.c(52),{label:r,items:l,selectedItems:d,onToggle:n,onClear:i}=t,[c,m]=H.useState(""),[u,T]=H.useState(!1);let o,p,a,x,$,R,C,y,L,S,h;if(e[0]!==l||e[1]!==r||e[2]!==n||e[3]!==u||e[4]!==c||e[5]!==d){const w=[...c?l.filter(_=>_.value.toLowerCase().includes(c.toLowerCase())):l].sort(ct);a=d.length,p=Se,L=u,S=T;let g;e[17]!==r?(g=s.jsx("span",{children:r}),e[17]=r,e[18]=g):g=e[18];let N;e[19]!==a?(N=a>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:a}),e[19]=a,e[20]=N):N=e[20];let j;e[21]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Re,{size:14,className:"opacity-50"}),e[21]=j):j=e[21],e[22]!==N||e[23]!==g?(h=s.jsx(we,{asChild:!0,children:s.jsxs(te,{variant:"outline",size:"sm",className:"h-7 px-3 gap-1.5 text-xs font-normal flex-1",children:[g,N,j]})}),e[22]=N,e[23]=g,e[24]=h):h=e[24],o=Ie,R="w-64 p-0",C="start";let F;e[25]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(ve,{size:16,className:"text-muted-foreground shrink-0"}),e[25]=F):F=e[25];let I;e[26]!==r?(I=r.toLowerCase(),e[26]=r,e[27]=I):I=e[27];const E=`Search ${I}...`;let A;e[28]===Symbol.for("react.memo_cache_sentinel")?(A=_=>m(_.target.value),e[28]=A):A=e[28],e[29]!==c||e[30]!==E?(y=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:[F,s.jsx(Ze,{type:"text",placeholder:E,value:c,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]=c,e[30]=E,e[31]=y):y=e[31],x="max-h-64 overflow-y-auto p-1 flex flex-col gap-1",$=w.length===0?s.jsx("div",{className:"px-2 py-4 text-sm text-muted-foreground text-center",children:"No results found"}):w.map(_=>{const G=d.includes(_.value);return s.jsxs("button",{onClick:()=>n(_.value),className:de("w-full flex items-center justify-between px-2 py-1.5 text-sm rounded cursor-pointer transition-colors",G?"bg-accent/50 text-foreground":"hover:bg-muted text-foreground"),children:[s.jsxs("span",{className:"truncate flex items-center gap-2",children:[G&&s.jsx(Te,{size:16,className:"text-muted-foreground shrink-0"}),_.value]}),s.jsx("span",{className:"text-xs text-muted-foreground ml-2 shrink-0",children:_.count})]},_.value)}),e[0]=l,e[1]=r,e[2]=n,e[3]=u,e[4]=c,e[5]=d,e[6]=o,e[7]=p,e[8]=a,e[9]=x,e[10]=$,e[11]=R,e[12]=C,e[13]=y,e[14]=L,e[15]=S,e[16]=h}else o=e[6],p=e[7],a=e[8],x=e[9],$=e[10],R=e[11],C=e[12],y=e[13],L=e[14],S=e[15],h=e[16];let v;e[32]!==x||e[33]!==$?(v=s.jsx("div",{className:x,children:$}),e[32]=x,e[33]=$,e[34]=v):v=e[34];let z;e[35]!==r||e[36]!==i||e[37]!==a?(z=a>0&&s.jsx("div",{className:"p-2 border-t border-border",children:s.jsxs(te,{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]=a,e[38]=z):z=e[38];let P;e[39]!==o||e[40]!==z||e[41]!==R||e[42]!==C||e[43]!==y||e[44]!==v?(P=s.jsxs(o,{className:R,align:C,children:[y,v,z]}),e[39]=o,e[40]=z,e[41]=R,e[42]=C,e[43]=y,e[44]=v,e[45]=P):P=e[45];let k;return e[46]!==p||e[47]!==P||e[48]!==L||e[49]!==S||e[50]!==h?(k=s.jsxs(p,{open:L,onOpenChange:S,children:[h,P]}),e[46]=p,e[47]=P,e[48]=L,e[49]=S,e[50]=h,e[51]=k):k=e[51],k}function ct(t,e){return e.count-t.count}function mt(t){const e=X.c(67),{availableTags:r,availableCategories:l,selectedTags:d,selectedCategories:n,onTagChange:i,onCategoryChange:c}=t,m=r&&r.length>0||l&&l.length>0,u=d.length>0||n.length>0;if(!m)return null;let T;e[0]!==i||e[1]!==d?(T=g=>{d.includes(g)?i(d.filter(N=>N!==g)):i([...d,g])},e[0]=i,e[1]=d,e[2]=T):T=e[2];const o=T;let p;e[3]!==c||e[4]!==n?(p=g=>{n.includes(g)?c(n.filter(N=>N!==g)):c([...n,g])},e[3]=c,e[4]=n,e[5]=p):p=e[5];const a=p;let x;e[6]!==c||e[7]!==i?(x=()=>{i([]),c([])},e[6]=c,e[7]=i,e[8]=x):x=e[8];const $=x;let R,C,y,L,S,h,v;if(e[9]!==l||e[10]!==r||e[11]!==c||e[12]!==i||e[13]!==n||e[14]!==d||e[15]!==a||e[16]!==o){const g=l?at(l,6):[];R=n,C=d,v=new Set(g.map(dt)),S="flex items-center border-b border-border";let N;e[24]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx("div",{className:"flex items-center gap-2 text-muted-foreground",children:s.jsx(je,{size:16})}),e[24]=N):N=e[24];let j;e[25]!==l||e[26]!==c||e[27]!==n||e[28]!==a?(j=l&&l.length>0&&s.jsx(fe,{label:"Categories",items:l,selectedItems:n,onToggle:a,onClear:()=>c([])}),e[25]=l,e[26]=c,e[27]=n,e[28]=a,e[29]=j):j=e[29];let F;e[30]!==r||e[31]!==i||e[32]!==d||e[33]!==o?(F=r&&r.length>0&&s.jsx(fe,{label:"Tags",items:r,selectedItems:d,onToggle:o,onClear:()=>i([])}),e[30]=r,e[31]=i,e[32]=d,e[33]=o,e[34]=F):F=e[34],e[35]!==F||e[36]!==j?(h=s.jsxs("div",{className:"flex items-center gap-3 flex-wrap px-5 py-3 border-r border-border",children:[N,j,F]}),e[35]=F,e[36]=j,e[37]=h):h=e[37],y="flex items-center gap-3 flex-wrap px-5 py-3";let I;e[38]!==n||e[39]!==a?(I=E=>{const A=n.includes(E.value);return s.jsxs("div",{onClick:()=>a(E.value),className:de("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:E.value}),A&&s.jsx("span",{onClick:_=>{_.stopPropagation(),a(E.value)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},E.value)},e[38]=n,e[39]=a,e[40]=I):I=e[40],L=g.map(I),e[9]=l,e[10]=r,e[11]=c,e[12]=i,e[13]=n,e[14]=d,e[15]=a,e[16]=o,e[17]=R,e[18]=C,e[19]=y,e[20]=L,e[21]=S,e[22]=h,e[23]=v}else R=e[17],C=e[18],y=e[19],L=e[20],S=e[21],h=e[22],v=e[23];let z;if(e[41]!==R||e[42]!==a||e[43]!==v){let g;e[45]!==v?(g=j=>!v.has(j),e[45]=v,e[46]=g):g=e[46];let N;e[47]!==a?(N=j=>s.jsxs("div",{onClick:()=>a(j),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:j}),s.jsx("span",{onClick:F=>{F.stopPropagation(),a(j)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},`cat-${j}`),e[47]=a,e[48]=N):N=e[48],z=R.filter(g).map(N),e[41]=R,e[42]=a,e[43]=v,e[44]=z}else z=e[44];let P;if(e[49]!==C||e[50]!==o){let g;e[52]!==o?(g=N=>s.jsxs("div",{onClick:()=>o(N),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:N}),s.jsx("span",{onClick:j=>{j.stopPropagation(),o(N)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},`tag-${N}`),e[52]=o,e[53]=g):g=e[53],P=C.map(g),e[49]=C,e[50]=o,e[51]=P}else P=e[51];let k;e[54]!==$||e[55]!==u?(k=u&&s.jsxs(te,{variant:"ghost",size:"sm",onClick:$,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]=$,e[55]=u,e[56]=k):k=e[56];let b;e[57]!==k||e[58]!==y||e[59]!==L||e[60]!==z||e[61]!==P?(b=s.jsxs("div",{className:y,children:[L,z,P,k]}),e[57]=k,e[58]=y,e[59]=L,e[60]=z,e[61]=P,e[62]=b):b=e[62];let w;return e[63]!==b||e[64]!==S||e[65]!==h?(w=s.jsxs("div",{className:S,children:[h,b]}),e[63]=b,e[64]=S,e[65]=h,e[66]=w):w=e[66],w}function dt(t){return t.value}function ut(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 Pe(t){return t.verified===!0||t._meta?.["mcp.mesh"]?.verified===!0}function ue(t){return t._meta?.["mcp.mesh"]?.official===!0}function ft(t){const e=X.c(58),{registryId:r,listToolName:l,filtersToolName:d,storePrivateOnly:n}=t,[i,c]=H.useState(""),m=rt(i,300),u=xe(),{org:T}=ne(),{scrollRef:o,saveScrollPosition:p,handleScroll:a}=lt(`store-discovery:${r}`);let x;e[0]!==m||e[1]!==d||e[2]!==l||e[3]!==r?(x={registryId:r,listToolName:l,filtersToolName:d,search:m},e[0]=m,e[1]=d,e[2]=l,e[3]=r,e[4]=x):x=e[4];const{items:$,hasMore:R,isLoadingMore:C,isInitialLoading:y,isFetching:L,error:S,loadMore:h,availableTags:v,availableCategories:z,selectedTags:P,selectedCategories:k,setSelectedTags:b,setSelectedCategories:w,hasActiveFilters:g}=it(x);let N;e[5]!==$||e[6]!==i?(N=i?ut($,i):$,e[5]=$,e[6]=i,e[7]=N):N=e[7];const j=N;let F;e[8]!==j||e[9]!==n?(F=n?j.filter(ht):j,e[8]=j,e[9]=n,e[10]=F):F=e[10];const I=F,E=(i!==m||L)&&!y&&!!i;let A;e[11]!==I?(A=I.filter(ue),e[11]=I,e[12]=A):A=e[12];const _=A;let G;e[13]!==I?(G=I.filter(pt),e[13]=I,e[14]=G):G=e[14];const W=G;let J;e[15]!==I?(J=I.filter(gt),e[15]=I,e[16]=J):J=e[16];const Y=J;let Z;e[17]!==u||e[18]!==T.slug||e[19]!==r||e[20]!==p?(Z=K=>{p();const f=Je(K.name||K.title||K.server?.title||""),ee=typeof K.id=="string"&&K.id.includes("/"),ie=typeof K.server?.name=="string"&&K.server.name.includes("/"),oe=ee&&!ie?K.id:K.server?.name||K.id||"";u({to:"/$org/$project/store/$appName",params:{org:T.slug,project:he,appName:f},search:{registryId:r,serverName:oe}})},e[17]=u,e[18]=T.slug,e[19]=r,e[20]=p,e[21]=Z):Z=e[21];const V=Z;let Q;e[22]!==a||e[23]!==R||e[24]!==C||e[25]!==h?(Q=K=>{if(a(),!R||C)return;const f=K.currentTarget;f.scrollHeight-f.scrollTop-f.clientHeight<200&&h()},e[22]=a,e[23]=R,e[24]=C,e[25]=h,e[26]=Q):Q=e[26];const q=Q;let M;e[27]!==E||e[28]!==i?(M=s.jsx(Qe,{value:i,onChange:c,placeholder:"Search for an MCP Server...",isSearching:E}),e[27]=E,e[28]=i,e[29]=M):M=e[29];let B;e[30]!==z||e[31]!==v||e[32]!==k||e[33]!==P||e[34]!==w||e[35]!==b?(B=s.jsx(mt,{availableTags:v,availableCategories:z,selectedTags:P,selectedCategories:k,onTagChange:b,onCategoryChange:w}),e[30]=z,e[31]=v,e[32]=k,e[33]=P,e[34]=w,e[35]=b,e[36]=B):B=e[36];let D;e[37]!==Y||e[38]!==S||e[39]!==V||e[40]!==g||e[41]!==R||e[42]!==y||e[43]!==C||e[44]!==E||e[45]!==_||e[46]!==i||e[47]!==W||e[48]!==I.length?(D=s.jsx("div",{className:"p-5",children:s.jsx("div",{children:S&&!y?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(ge,{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(te,{variant:"outline",size:"sm",onClick:xt,children:[s.jsx(pe,{className:"size-4"}),"Try again"]})]}):y?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..."})]}):I.length===0&&!g?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(ye,{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."})]}):I.length===0&&g&&!i?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(je,{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&&I.length===0&&!E?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(ve,{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:[E&&I.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..."})]}),_.length>0&&s.jsx(ce,{items:_,title:"Official",onItemClick:V}),W.length>0&&s.jsx(ce,{items:W,title:"Verified",onItemClick:V}),Y.length>0&&s.jsx(ce,{items:Y,title:_.length>0||W.length>0?"All":"",onItemClick:V}),R&&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[37]=Y,e[38]=S,e[39]=V,e[40]=g,e[41]=R,e[42]=y,e[43]=C,e[44]=E,e[45]=_,e[46]=i,e[47]=W,e[48]=I.length,e[49]=D):D=e[49];let O;e[50]!==q||e[51]!==o||e[52]!==D?(O=s.jsx("div",{ref:o,className:"flex-1 overflow-y-auto",onScroll:q,children:D}),e[50]=q,e[51]=o,e[52]=D,e[53]=O):O=e[53];let U;return e[54]!==B||e[55]!==O||e[56]!==M?(U=s.jsxs("div",{className:"flex flex-col h-full",children:[M,B,O]}),e[54]=B,e[55]=O,e[56]=M,e[57]=U):U=e[57],U}function xt(){return window.location.reload()}function gt(t){return!Pe(t)&&!ue(t)}function pt(t){return Pe(t)&&!ue(t)}function ht(t){return t.is_public!==!0}function jt(t){const e=X.c(11),{registryId:r,storePrivateOnly:l}=t,d=Ue(r),n=d?.tools;let i;e[0]!==n?(i=Be(n),e[0]=n,e[1]=i):i=e[1];const c=i;if(!c){let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"bg-muted p-3 rounded-full",children:s.jsx(ye,{className:"size-8 text-muted-foreground"})}),e[2]=a):a=e[2];let x;return e[3]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-12 text-center space-y-4",children:[a,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]=x):x=e[3],x}const m=d?.tools;let u;e[4]!==m?(u=De(m),e[4]=m,e[5]=u):u=e[5];const o=u||void 0;let p;return e[6]!==c||e[7]!==r||e[8]!==l||e[9]!==o?(p=s.jsx(ft,{registryId:r,listToolName:c,filtersToolName:o,storePrivateOnly:l}),e[6]=c,e[7]=r,e[8]=l,e[9]=o,e[10]=p):p=e[10],p}function yt(t){const e=X.c(43),{registries:r,value:l,onValueChange:d,onAddWellKnown:n,wellKnownRegistries:i,placeholder:c}=t,m=c===void 0?"Select a registry...":c,[u,T]=H.useState(!1);let o,p,a,x,$,R,C,y;if(e[0]!==u||e[1]!==m||e[2]!==r||e[3]!==l){let b;e[12]!==l?(b=g=>g.id===l,e[12]=l,e[13]=b):b=e[13];const w=r.find(b);p=Se,C=u,y=T,o=we,R=!0,a="button",e[14]===Symbol.for("react.memo_cache_sentinel")?(x=de("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]=x):x=e[14],$=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:m}),e[0]=u,e[1]=m,e[2]=r,e[3]=l,e[4]=o,e[5]=p,e[6]=a,e[7]=x,e[8]=$,e[9]=R,e[10]=C,e[11]=y}else o=e[4],p=e[5],a=e[6],x=e[7],$=e[8],R=e[9],C=e[10],y=e[11];let L;e[15]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(Re,{className:"size-4 opacity-50"}),e[15]=L):L=e[15];let S;e[16]!==a||e[17]!==x||e[18]!==$?(S=s.jsxs("button",{type:a,className:x,children:[$,L]}),e[16]=a,e[17]=x,e[18]=$,e[19]=S):S=e[19];let h;e[20]!==o||e[21]!==R||e[22]!==S?(h=s.jsx(o,{asChild:R,children:S}),e[20]=o,e[21]=R,e[22]=S,e[23]=h):h=e[23];let v;if(e[24]!==d||e[25]!==r||e[26]!==l){let b;e[28]!==d||e[29]!==l?(b=w=>s.jsxs("button",{type:"button",onClick:()=>{d(w.id??w.name),T(!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(Te,{className:"size-4"})})]},w.id??w.name),e[28]=d,e[29]=l,e[30]=b):b=e[30],v=r.map(b),e[24]=d,e[25]=r,e[26]=l,e[27]=v}else v=e[27];let z;e[31]!==n||e[32]!==i?(z=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(b=>s.jsxs("button",{type:"button",onClick:()=>{n(b),T(!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:[b.icon?s.jsx("img",{src:b.icon,alt:b.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:b.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"flex-1",children:b.title})]}),s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center text-muted-foreground",children:s.jsx(Xe,{size:16})})]},b.id??b.title))]}),e[31]=n,e[32]=i,e[33]=z):z=e[33];let P;e[34]!==v||e[35]!==z?(P=s.jsxs(Ie,{align:"end",className:"w-auto min-w-[200px] p-1",children:[v,z]}),e[34]=v,e[35]=z,e[36]=P):P=e[36];let k;return e[37]!==p||e[38]!==h||e[39]!==P||e[40]!==C||e[41]!==y?(k=s.jsxs(p,{open:C,onOpenChange:y,children:[h,P]}),e[37]=p,e[38]=h,e[39]=P,e[40]=C,e[41]=y,e[42]=k):k=e[42],k}function vt({registries:t,onConnected:e}){const r=Ce(),{org:{slug:l}}=ne(),{data:d}=ze.useSession(),n=xe(),[i,c]=H.useState(!1),m=t[0],u=async()=>{if(!(!m||!d?.user?.id)){c(!0);try{const o=await r.create.mutateAsync(m);e?.(o.id)}finally{c(!1)}}},T=()=>{n({to:"/$org/$project/mcps",params:{org:l,project:he},search:{action:"create"}})};return s.jsx(Ye,{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(te,{variant:"outline",onClick:u,disabled:i||!m,children:[m?.icon&&s.jsx("img",{src:m.icon,alt:"",className:"size-4"}),i?"Installing...":"Install Registry"]}),s.jsx(te,{variant:"outline",onClick:T,children:"Custom Connection"})]})})}function bt(t){const e=X.c(15),{error:r,onRetry:l,registryName:d}=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(ge,{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 c;e[2]!==d?(c=s.jsxs("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:["The ",s.jsx("strong",{children:d})," registry is currently unreachable. This may be a temporary issue — try again in a moment."]}),e[2]=d,e[3]=c):c=e[3];let m;e[4]!==r?(m=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]=m):m=e[5];let u;e[6]!==c||e[7]!==m?(u=s.jsxs("div",{className:"space-y-2",children:[i,c,m]}),e[6]=c,e[7]=m,e[8]=u):u=e[8];let T;e[9]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(pe,{className:"size-4"}),e[9]=T):T=e[9];let o;e[10]!==l?(o=s.jsxs(te,{variant:"outline",size:"sm",onClick:l,children:[T,"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 as(){const t=X.c(53),{org:e,project:r}=ne(),l=He(),d=Ce(),n=$e(),i=n.location.pathname.includes("/store/")&&n.location.pathname.split("/").length>3,c=et(l);let m;t[0]!==e.id?(m=Ge.SELF(e.id),t[0]=e.id,t[1]=m):m=t[1];const u=m,T=r.enabledPlugins,o=T==null||T.includes(ae);let p;t[2]!==u?(p=(f,ee)=>f.id===u?1:ee.id===u?-1:0,t[2]=u,t[3]=p):p=t[3];const a=c.filter(f=>f.id!==u?!0:o).sort(p);let x;t[4]!==u?(x=f=>f.id===u,t[4]=u,t[5]=x):x=t[5];const $=a.some(x);let R;t[6]!==e.id?(R={connectionId:We,orgId:e.id},t[6]=e.id,t[7]=R):R=t[7];const C=Ne(R);let y;t[8]!==r.id||t[9]!==C?(y=async()=>{const f=await C.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:r.id,pluginId:ae}});return f.structuredContent??f},t[8]=r.id,t[9]=C,t[10]=y):y=t[10];const{data:L}=be({queryKey:me.projectPluginConfig(r.id??"",ae),queryFn:y,enabled:$&&!!r.id,staleTime:6e4}),S=L?.config?.settings;let h;t[11]!==S||t[12]!==u?(h=f=>f.id===u&&S?{id:f.id,name:S.registryName||f.title,icon:S.registryIcon||f.icon||void 0}:{id:f.id,name:f.title,icon:f.icon||void 0},t[11]=S,t[12]=u,t[13]=h):h=t[13];const v=a.map(h);let z;t[14]!==e.slug?(z=tt.selectedRegistry(e.slug),t[14]=e.slug,t[15]=z):z=t[15];const[P,k]=st(z,Ct);let b;t[16]!==P?(b=f=>f.id===P,t[16]=P,t[17]=b):b=t[17];const w=a.find(b);let g;t[18]!==u?(g=f=>f.id!==u,t[18]=u,t[19]=g):g=t[19];const N=a.find(g),j=w?.id||N?.id||a[0]?.id||"",F=j===u&&S?.storePrivateOnly===!0;let I;t[20]!==e.id?(I=Ve(e.id),t[20]=e.id,t[21]=I):I=t[21];let E;t[22]!==I?(E=[I],t[22]=I,t[23]=E):E=t[23];const A=E;let _;t[24]===Symbol.for("react.memo_cache_sentinel")?(_=[qe()],t[24]=_):_=t[24];const G=_;let W;t[25]!==d.create||t[26]!==k?(W=async f=>{const ee=await d.create.mutateAsync(f);k(ee.id)},t[25]=d.create,t[26]=k,t[27]=W):W=t[27];const J=W,Y=new Set(a.map(Nt)),Z=A.filter(f=>f.id&&!Y.has(f.id)),V=G.filter(f=>f.id&&!Y.has(f.id));if(i){let f;return t[28]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Fe,{}),t[28]=f):f=t[28],f}let Q;t[29]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(se.Header.Left,{children:s.jsx(Ee,{children:s.jsx(Oe,{children:s.jsx(_e,{children:s.jsx(Ke,{children:"Store"})})})})}),t[29]=Q):Q=t[29];let q;t[30]!==J?(q=async f=>J(f),t[30]=J,t[31]=q):q=t[31];let M;t[32]!==Z||t[33]!==j||t[34]!==v||t[35]!==k||t[36]!==q?(M=s.jsxs(se.Header,{children:[Q,s.jsx(se.Header.Right,{children:s.jsx(yt,{wellKnownRegistries:Z,registries:v,value:j,onValueChange:k,onAddWellKnown:q,placeholder:"Select store..."})})]}),t[32]=Z,t[33]=j,t[34]=v,t[35]=k,t[36]=q,t[37]=M):M=t[37];let B;t[38]!==j||t[39]!==v?(B=f=>{const{error:ee,resetError:ie}=f;return s.jsx(bt,{error:ee,onRetry:ie,registryName:v.find(oe=>oe.id===j)?.name??"registry"})},t[38]=j,t[39]=v,t[40]=B):B=t[40];let D;t[41]===Symbol.for("react.memo_cache_sentinel")?(D=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]=D):D=t[41];let O;t[42]!==V||t[43]!==j||t[44]!==k||t[45]!==F?(O=s.jsx(H.Suspense,{fallback:D,children:j?s.jsx(jt,{registryId:j,storePrivateOnly:F}):s.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:s.jsx(vt,{registries:V,onConnected:f=>{k(f)}})})}),t[42]=V,t[43]=j,t[44]=k,t[45]=F,t[46]=O):O=t[46];let U;t[47]!==B||t[48]!==O?(U=s.jsx(se.Content,{children:s.jsx(Le,{fallback:B,children:O})}),t[47]=B,t[48]=O,t[49]=U):U=t[49];let K;return t[50]!==M||t[51]!==U?(K=s.jsxs(se,{children:[M,U]}),t[50]=M,t[51]=U,t[52]=K):K=t[52],K}function Nt(t){return t.id}function Ct(t){return t??""}export{as as default};
1
+ import{c as X,r as H,u as ne,K as me,c0 as ke,j as s,z as de,B as te,e as xe,a3 as ge,a4 as pe,O as he,f as ze,as as $e,c1 as ae,E as Le,au as Fe}from"./index-D4JwUMfo.js";import{P as se}from"./index-DbJ64cDo.js";import{B as Ee,a as Oe,b as _e,c as Ke}from"./breadcrumb-HFSeCoIU.js";import{i as je}from"./FilterLines-D7KpfRSU.js";import{n as ye}from"./Inbox01-DI6dcB2-.js";import{i as le}from"./Loading01-1unV3no7.js";import{i as ve}from"./SearchMd-DQrPJQV9.js";import{u as be}from"./useQuery-D0xC6l4K.js";import{u as Ae}from"./useInfiniteQuery-BgV83YrM.js";import{a as Me,f as Be,b as De}from"./registry-utils-C_DP4Ynk.js";import{u as Ne,W as Ge,a as We,f as Ve,b as qe}from"./constants-DMTOffGt.js";import{u as Ue,a as Ce,b as He}from"./use-connection-96ulKDkp.js";import{s as Je}from"./slugify-CEUa2lfQ.js";import{C as Qe,E as Ye}from"./collection-search-Cg477-ZE.js";import{M as ce}from"./mcp-server-card-CGJI-JTC.js";import{I as Ze}from"./input-BRH9Cf1s.js";import{a as Se,b as we,P as Ie}from"./popover-BUt6i0bO.js";import{i as Te}from"./Check-q1dqks2U.js";import{t as Re}from"./ChevronDown-cViiGxn9.js";import{s as re}from"./XClose-C1VIP6EM.js";import{s as Xe}from"./Plus-DRukDy12.js";import{u as et}from"./use-binding-CZG6TNcT.js";import{L as tt,u as st}from"./localstorage-keys-xw4Txgji.js";import"./tooltip-BcimsULQ.js";import"./index-CrHCQ8Nf.js";import"./ChevronRight-D7UsQHH3.js";import"./infiniteQueryObserver-DAdEAsRM.js";import"./use-collections-Bs1uQVQJ.js";import"./useMutation-D-zwC1-P.js";import"./CheckVerified02-CZ912ESL.js";import"./Globe02-7C9FcKVE.js";import"./Lock01-XSJRlK5x.js";import"./Terminal-D0OfGCn6.js";import"./card-CeKLZLLA.js";import"./integration-icon-D2pk71z8.js";import"./Container-BnukWtxV.js";import"./github-icon-Dp3wHhYE.js";import"./binder-D6CqvsA8.js";function rt(t,e){const r=X.c(4),[l,d]=H.useState(t),n=H.useRef(null),i=H.useRef(!0);let c,m;return r[0]!==e||r[1]!==t?(c=()=>{if(i.current){i.current=!1;return}return n.current&&clearTimeout(n.current),n.current=setTimeout(()=>{d(t)},e),()=>{n.current&&clearTimeout(n.current)}},m=[t,e],r[0]=e,r[1]=t,r[2]=c,r[3]=m):(c=r[2],m=r[3]),H.useEffect(c,m),l}function lt(t){const e=X.c(14),r=H.useRef(null),l=`scroll-position:${t}`,d=H.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 c;e[2]!==l?(c=()=>{if(d.current===l)return;const x=sessionStorage.getItem(l);if(x&&r.current){const $=Number.parseInt(x,10);r.current.scrollTop=$}d.current=l},e[2]=l,e[3]=c):c=e[3];const m=c;let u;e[4]!==m||e[5]!==l?(u=()=>{d.current!==l&&m()},e[4]=m,e[5]=l,e[6]=u):u=e[6];const T=u;let o;e[7]!==m||e[8]!==l?(o=x=>{r.current=x,x&&d.current!==l&&requestAnimationFrame(()=>{m()})},e[7]=m,e[8]=l,e[9]=o):o=e[9];const p=o;let a;return e[10]!==T||e[11]!==i||e[12]!==p?(a={scrollRef:p,saveScrollPosition:i,handleScroll:T},e[10]=T,e[11]=i,e[12]=p,e[13]=a):a=e[13],a}const nt=24;function it(t){const e=X.c(54),{registryId:r,listToolName:l,filtersToolName:d,search:n}=t,{org:i}=ne();let c;e[0]===Symbol.for("react.memo_cache_sentinel")?(c=[],e[0]=c):c=e[0];const[m,u]=H.useState(c);let T;e[1]===Symbol.for("react.memo_cache_sentinel")?(T=[],e[1]=T):T=e[1];const[o,p]=H.useState(T),a=r||null;let x;e[2]!==i.id||e[3]!==a?(x={connectionId:a,orgId:i.id},e[2]=i.id,e[3]=a,e[4]=x):x=e[4];const $=Ne(x),R=!!d;let C;e[5]!==d||e[6]!==r?(C=me.toolCall(r,d||"no-filters","{}"),e[5]=d,e[6]=r,e[7]=C):C=e[7];let y;e[8]!==$||e[9]!==d?(y=async()=>{if(!d)return{tags:[],categories:[]};const O=await $.callTool({name:d,arguments:{}});return O.structuredContent??O},e[8]=$,e[9]=d,e[10]=y):y=e[10];let L;e[11]!==C||e[12]!==y?(L={queryKey:C,queryFn:y,staleTime:36e5,retry:2},e[11]=C,e[12]=y,e[13]=L):L=e[13];const{data:S}=be(L);let h,v,z;if(e[14]!==l||e[15]!==r||e[16]!==n||e[17]!==o||e[18]!==m){const O=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;h={limit:nt,...m.length>0&&{tags:m},...o.length>0&&{categories:o},...O&&{where:O}},z=Ae,v=me.toolCall(r,l,JSON.stringify(h)),e[14]=l,e[15]=r,e[16]=n,e[17]=o,e[18]=m,e[19]=h,e[20]=v,e[21]=z}else h=e[19],v=e[20],z=e[21];let P;e[22]!==$||e[23]!==h||e[24]!==l?(P=async O=>{const{pageParam:U}=O,K=U?{...h,cursor:U}:h,f=await $.callTool({name:l,arguments:K});return f.structuredContent??f},e[22]=$,e[23]=h,e[24]=l,e[25]=P):P=e[25];let k;e[26]!==P||e[27]!==v?(k={queryKey:v,queryFn:P,initialPageParam:void 0,getNextPageParam:ot,staleTime:36e5,placeholderData:ke,retry:2},e[26]=P,e[27]=v,e[28]=k):k=e[28];const{data:b,fetchNextPage:w,hasNextPage:g,isFetchingNextPage:N,isFetching:j,isLoading:F,error:I}=z(k);let E;e:{if(!b?.pages||b.pages.length===0){E=null;break e}const O=b.pages[0];if(typeof O=="object"&&O!==null&&"totalCount"in O&&typeof O.totalCount=="number"){E=O.totalCount;break e}E=null}const A=E,_=b?.pages;let G;e[29]!==_?(G=Me(_),e[29]=_,e[30]=G):G=e[30];const W=G;let J;e[31]!==n||e[32]!==o.length||e[33]!==m.length?(J=m.length>0||o.length>0||!!n?.trim(),e[31]=n,e[32]=o.length,e[33]=m.length,e[34]=J):J=e[34];const Y=J,Z=j&&!N&&!F&&Y;let V;e[35]!==w||e[36]!==g||e[37]!==N?(V=()=>{g&&!N&&w()},e[35]=w,e[36]=g,e[37]=N,e[38]=V):V=e[38];const Q=V,q=g??!1,M=R?S?.tags:void 0,B=R?S?.categories:void 0;let D;return e[39]!==Y||e[40]!==j||e[41]!==N||e[42]!==Z||e[43]!==F||e[44]!==W||e[45]!==I||e[46]!==Q||e[47]!==o||e[48]!==m||e[49]!==q||e[50]!==M||e[51]!==B||e[52]!==A?(D={items:W,totalCount:A,hasMore:q,isLoadingMore:N,isFiltering:Z,isInitialLoading:F,isFetching:j,error:I,loadMore:Q,availableTags:M,availableCategories:B,selectedTags:m,selectedCategories:o,setSelectedTags:u,setSelectedCategories:p,hasActiveFilters:Y},e[39]=Y,e[40]=j,e[41]=N,e[42]=Z,e[43]=F,e[44]=W,e[45]=I,e[46]=Q,e[47]=o,e[48]=m,e[49]=q,e[50]=M,e[51]=B,e[52]=A,e[53]=D):D=e[53],D}function ot(t){if(typeof t=="object"&&t!==null){const e=t.nextCursor||t.cursor;if(e)return e}}function at(t,e){return[...t].sort((r,l)=>l.count-r.count).slice(0,e)}function fe(t){const e=X.c(52),{label:r,items:l,selectedItems:d,onToggle:n,onClear:i}=t,[c,m]=H.useState(""),[u,T]=H.useState(!1);let o,p,a,x,$,R,C,y,L,S,h;if(e[0]!==l||e[1]!==r||e[2]!==n||e[3]!==u||e[4]!==c||e[5]!==d){const w=[...c?l.filter(_=>_.value.toLowerCase().includes(c.toLowerCase())):l].sort(ct);a=d.length,p=Se,L=u,S=T;let g;e[17]!==r?(g=s.jsx("span",{children:r}),e[17]=r,e[18]=g):g=e[18];let N;e[19]!==a?(N=a>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:a}),e[19]=a,e[20]=N):N=e[20];let j;e[21]===Symbol.for("react.memo_cache_sentinel")?(j=s.jsx(Re,{size:14,className:"opacity-50"}),e[21]=j):j=e[21],e[22]!==N||e[23]!==g?(h=s.jsx(we,{asChild:!0,children:s.jsxs(te,{variant:"outline",size:"sm",className:"h-7 px-3 gap-1.5 text-xs font-normal flex-1",children:[g,N,j]})}),e[22]=N,e[23]=g,e[24]=h):h=e[24],o=Ie,R="w-64 p-0",C="start";let F;e[25]===Symbol.for("react.memo_cache_sentinel")?(F=s.jsx(ve,{size:16,className:"text-muted-foreground shrink-0"}),e[25]=F):F=e[25];let I;e[26]!==r?(I=r.toLowerCase(),e[26]=r,e[27]=I):I=e[27];const E=`Search ${I}...`;let A;e[28]===Symbol.for("react.memo_cache_sentinel")?(A=_=>m(_.target.value),e[28]=A):A=e[28],e[29]!==c||e[30]!==E?(y=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:[F,s.jsx(Ze,{type:"text",placeholder:E,value:c,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]=c,e[30]=E,e[31]=y):y=e[31],x="max-h-64 overflow-y-auto p-1 flex flex-col gap-1",$=w.length===0?s.jsx("div",{className:"px-2 py-4 text-sm text-muted-foreground text-center",children:"No results found"}):w.map(_=>{const G=d.includes(_.value);return s.jsxs("button",{onClick:()=>n(_.value),className:de("w-full flex items-center justify-between px-2 py-1.5 text-sm rounded cursor-pointer transition-colors",G?"bg-accent/50 text-foreground":"hover:bg-muted text-foreground"),children:[s.jsxs("span",{className:"truncate flex items-center gap-2",children:[G&&s.jsx(Te,{size:16,className:"text-muted-foreground shrink-0"}),_.value]}),s.jsx("span",{className:"text-xs text-muted-foreground ml-2 shrink-0",children:_.count})]},_.value)}),e[0]=l,e[1]=r,e[2]=n,e[3]=u,e[4]=c,e[5]=d,e[6]=o,e[7]=p,e[8]=a,e[9]=x,e[10]=$,e[11]=R,e[12]=C,e[13]=y,e[14]=L,e[15]=S,e[16]=h}else o=e[6],p=e[7],a=e[8],x=e[9],$=e[10],R=e[11],C=e[12],y=e[13],L=e[14],S=e[15],h=e[16];let v;e[32]!==x||e[33]!==$?(v=s.jsx("div",{className:x,children:$}),e[32]=x,e[33]=$,e[34]=v):v=e[34];let z;e[35]!==r||e[36]!==i||e[37]!==a?(z=a>0&&s.jsx("div",{className:"p-2 border-t border-border",children:s.jsxs(te,{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]=a,e[38]=z):z=e[38];let P;e[39]!==o||e[40]!==z||e[41]!==R||e[42]!==C||e[43]!==y||e[44]!==v?(P=s.jsxs(o,{className:R,align:C,children:[y,v,z]}),e[39]=o,e[40]=z,e[41]=R,e[42]=C,e[43]=y,e[44]=v,e[45]=P):P=e[45];let k;return e[46]!==p||e[47]!==P||e[48]!==L||e[49]!==S||e[50]!==h?(k=s.jsxs(p,{open:L,onOpenChange:S,children:[h,P]}),e[46]=p,e[47]=P,e[48]=L,e[49]=S,e[50]=h,e[51]=k):k=e[51],k}function ct(t,e){return e.count-t.count}function mt(t){const e=X.c(67),{availableTags:r,availableCategories:l,selectedTags:d,selectedCategories:n,onTagChange:i,onCategoryChange:c}=t,m=r&&r.length>0||l&&l.length>0,u=d.length>0||n.length>0;if(!m)return null;let T;e[0]!==i||e[1]!==d?(T=g=>{d.includes(g)?i(d.filter(N=>N!==g)):i([...d,g])},e[0]=i,e[1]=d,e[2]=T):T=e[2];const o=T;let p;e[3]!==c||e[4]!==n?(p=g=>{n.includes(g)?c(n.filter(N=>N!==g)):c([...n,g])},e[3]=c,e[4]=n,e[5]=p):p=e[5];const a=p;let x;e[6]!==c||e[7]!==i?(x=()=>{i([]),c([])},e[6]=c,e[7]=i,e[8]=x):x=e[8];const $=x;let R,C,y,L,S,h,v;if(e[9]!==l||e[10]!==r||e[11]!==c||e[12]!==i||e[13]!==n||e[14]!==d||e[15]!==a||e[16]!==o){const g=l?at(l,6):[];R=n,C=d,v=new Set(g.map(dt)),S="flex items-center border-b border-border";let N;e[24]===Symbol.for("react.memo_cache_sentinel")?(N=s.jsx("div",{className:"flex items-center gap-2 text-muted-foreground",children:s.jsx(je,{size:16})}),e[24]=N):N=e[24];let j;e[25]!==l||e[26]!==c||e[27]!==n||e[28]!==a?(j=l&&l.length>0&&s.jsx(fe,{label:"Categories",items:l,selectedItems:n,onToggle:a,onClear:()=>c([])}),e[25]=l,e[26]=c,e[27]=n,e[28]=a,e[29]=j):j=e[29];let F;e[30]!==r||e[31]!==i||e[32]!==d||e[33]!==o?(F=r&&r.length>0&&s.jsx(fe,{label:"Tags",items:r,selectedItems:d,onToggle:o,onClear:()=>i([])}),e[30]=r,e[31]=i,e[32]=d,e[33]=o,e[34]=F):F=e[34],e[35]!==F||e[36]!==j?(h=s.jsxs("div",{className:"flex items-center gap-3 flex-wrap px-5 py-3 border-r border-border",children:[N,j,F]}),e[35]=F,e[36]=j,e[37]=h):h=e[37],y="flex items-center gap-3 flex-wrap px-5 py-3";let I;e[38]!==n||e[39]!==a?(I=E=>{const A=n.includes(E.value);return s.jsxs("div",{onClick:()=>a(E.value),className:de("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:E.value}),A&&s.jsx("span",{onClick:_=>{_.stopPropagation(),a(E.value)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},E.value)},e[38]=n,e[39]=a,e[40]=I):I=e[40],L=g.map(I),e[9]=l,e[10]=r,e[11]=c,e[12]=i,e[13]=n,e[14]=d,e[15]=a,e[16]=o,e[17]=R,e[18]=C,e[19]=y,e[20]=L,e[21]=S,e[22]=h,e[23]=v}else R=e[17],C=e[18],y=e[19],L=e[20],S=e[21],h=e[22],v=e[23];let z;if(e[41]!==R||e[42]!==a||e[43]!==v){let g;e[45]!==v?(g=j=>!v.has(j),e[45]=v,e[46]=g):g=e[46];let N;e[47]!==a?(N=j=>s.jsxs("div",{onClick:()=>a(j),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:j}),s.jsx("span",{onClick:F=>{F.stopPropagation(),a(j)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},`cat-${j}`),e[47]=a,e[48]=N):N=e[48],z=R.filter(g).map(N),e[41]=R,e[42]=a,e[43]=v,e[44]=z}else z=e[44];let P;if(e[49]!==C||e[50]!==o){let g;e[52]!==o?(g=N=>s.jsxs("div",{onClick:()=>o(N),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:N}),s.jsx("span",{onClick:j=>{j.stopPropagation(),o(N)},className:"hover:bg-primary/20 rounded-full p-0.5 -mr-1 cursor-pointer flex items-center",children:s.jsx(re,{size:12})})]},`tag-${N}`),e[52]=o,e[53]=g):g=e[53],P=C.map(g),e[49]=C,e[50]=o,e[51]=P}else P=e[51];let k;e[54]!==$||e[55]!==u?(k=u&&s.jsxs(te,{variant:"ghost",size:"sm",onClick:$,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]=$,e[55]=u,e[56]=k):k=e[56];let b;e[57]!==k||e[58]!==y||e[59]!==L||e[60]!==z||e[61]!==P?(b=s.jsxs("div",{className:y,children:[L,z,P,k]}),e[57]=k,e[58]=y,e[59]=L,e[60]=z,e[61]=P,e[62]=b):b=e[62];let w;return e[63]!==b||e[64]!==S||e[65]!==h?(w=s.jsxs("div",{className:S,children:[h,b]}),e[63]=b,e[64]=S,e[65]=h,e[66]=w):w=e[66],w}function dt(t){return t.value}function ut(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 Pe(t){return t.verified===!0||t._meta?.["mcp.mesh"]?.verified===!0}function ue(t){return t._meta?.["mcp.mesh"]?.official===!0}function ft(t){const e=X.c(58),{registryId:r,listToolName:l,filtersToolName:d,storePrivateOnly:n}=t,[i,c]=H.useState(""),m=rt(i,300),u=xe(),{org:T}=ne(),{scrollRef:o,saveScrollPosition:p,handleScroll:a}=lt(`store-discovery:${r}`);let x;e[0]!==m||e[1]!==d||e[2]!==l||e[3]!==r?(x={registryId:r,listToolName:l,filtersToolName:d,search:m},e[0]=m,e[1]=d,e[2]=l,e[3]=r,e[4]=x):x=e[4];const{items:$,hasMore:R,isLoadingMore:C,isInitialLoading:y,isFetching:L,error:S,loadMore:h,availableTags:v,availableCategories:z,selectedTags:P,selectedCategories:k,setSelectedTags:b,setSelectedCategories:w,hasActiveFilters:g}=it(x);let N;e[5]!==$||e[6]!==i?(N=i?ut($,i):$,e[5]=$,e[6]=i,e[7]=N):N=e[7];const j=N;let F;e[8]!==j||e[9]!==n?(F=n?j.filter(ht):j,e[8]=j,e[9]=n,e[10]=F):F=e[10];const I=F,E=(i!==m||L)&&!y&&!!i;let A;e[11]!==I?(A=I.filter(ue),e[11]=I,e[12]=A):A=e[12];const _=A;let G;e[13]!==I?(G=I.filter(pt),e[13]=I,e[14]=G):G=e[14];const W=G;let J;e[15]!==I?(J=I.filter(gt),e[15]=I,e[16]=J):J=e[16];const Y=J;let Z;e[17]!==u||e[18]!==T.slug||e[19]!==r||e[20]!==p?(Z=K=>{p();const f=Je(K.name||K.title||K.server?.title||""),ee=typeof K.id=="string"&&K.id.includes("/"),ie=typeof K.server?.name=="string"&&K.server.name.includes("/"),oe=ee&&!ie?K.id:K.server?.name||K.id||"";u({to:"/$org/$project/store/$appName",params:{org:T.slug,project:he,appName:f},search:{registryId:r,serverName:oe}})},e[17]=u,e[18]=T.slug,e[19]=r,e[20]=p,e[21]=Z):Z=e[21];const V=Z;let Q;e[22]!==a||e[23]!==R||e[24]!==C||e[25]!==h?(Q=K=>{if(a(),!R||C)return;const f=K.currentTarget;f.scrollHeight-f.scrollTop-f.clientHeight<200&&h()},e[22]=a,e[23]=R,e[24]=C,e[25]=h,e[26]=Q):Q=e[26];const q=Q;let M;e[27]!==E||e[28]!==i?(M=s.jsx(Qe,{value:i,onChange:c,placeholder:"Search for an MCP Server...",isSearching:E}),e[27]=E,e[28]=i,e[29]=M):M=e[29];let B;e[30]!==z||e[31]!==v||e[32]!==k||e[33]!==P||e[34]!==w||e[35]!==b?(B=s.jsx(mt,{availableTags:v,availableCategories:z,selectedTags:P,selectedCategories:k,onTagChange:b,onCategoryChange:w}),e[30]=z,e[31]=v,e[32]=k,e[33]=P,e[34]=w,e[35]=b,e[36]=B):B=e[36];let D;e[37]!==Y||e[38]!==S||e[39]!==V||e[40]!==g||e[41]!==R||e[42]!==y||e[43]!==C||e[44]!==E||e[45]!==_||e[46]!==i||e[47]!==W||e[48]!==I.length?(D=s.jsx("div",{className:"p-5",children:s.jsx("div",{children:S&&!y?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(ge,{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(te,{variant:"outline",size:"sm",onClick:xt,children:[s.jsx(pe,{className:"size-4"}),"Try again"]})]}):y?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..."})]}):I.length===0&&!g?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(ye,{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."})]}):I.length===0&&g&&!i?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(je,{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&&I.length===0&&!E?s.jsxs("div",{className:"flex flex-col items-center justify-center py-12 text-center",children:[s.jsx(ve,{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:[E&&I.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..."})]}),_.length>0&&s.jsx(ce,{items:_,title:"Official",onItemClick:V}),W.length>0&&s.jsx(ce,{items:W,title:"Verified",onItemClick:V}),Y.length>0&&s.jsx(ce,{items:Y,title:_.length>0||W.length>0?"All":"",onItemClick:V}),R&&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[37]=Y,e[38]=S,e[39]=V,e[40]=g,e[41]=R,e[42]=y,e[43]=C,e[44]=E,e[45]=_,e[46]=i,e[47]=W,e[48]=I.length,e[49]=D):D=e[49];let O;e[50]!==q||e[51]!==o||e[52]!==D?(O=s.jsx("div",{ref:o,className:"flex-1 overflow-y-auto",onScroll:q,children:D}),e[50]=q,e[51]=o,e[52]=D,e[53]=O):O=e[53];let U;return e[54]!==B||e[55]!==O||e[56]!==M?(U=s.jsxs("div",{className:"flex flex-col h-full",children:[M,B,O]}),e[54]=B,e[55]=O,e[56]=M,e[57]=U):U=e[57],U}function xt(){return window.location.reload()}function gt(t){return!Pe(t)&&!ue(t)}function pt(t){return Pe(t)&&!ue(t)}function ht(t){return t.is_public!==!0}function jt(t){const e=X.c(11),{registryId:r,storePrivateOnly:l}=t,d=Ue(r),n=d?.tools;let i;e[0]!==n?(i=Be(n),e[0]=n,e[1]=i):i=e[1];const c=i;if(!c){let a;e[2]===Symbol.for("react.memo_cache_sentinel")?(a=s.jsx("div",{className:"bg-muted p-3 rounded-full",children:s.jsx(ye,{className:"size-8 text-muted-foreground"})}),e[2]=a):a=e[2];let x;return e[3]===Symbol.for("react.memo_cache_sentinel")?(x=s.jsxs("div",{className:"flex flex-col items-center justify-center h-full py-12 text-center space-y-4",children:[a,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]=x):x=e[3],x}const m=d?.tools;let u;e[4]!==m?(u=De(m),e[4]=m,e[5]=u):u=e[5];const o=u||void 0;let p;return e[6]!==c||e[7]!==r||e[8]!==l||e[9]!==o?(p=s.jsx(ft,{registryId:r,listToolName:c,filtersToolName:o,storePrivateOnly:l}),e[6]=c,e[7]=r,e[8]=l,e[9]=o,e[10]=p):p=e[10],p}function yt(t){const e=X.c(43),{registries:r,value:l,onValueChange:d,onAddWellKnown:n,wellKnownRegistries:i,placeholder:c}=t,m=c===void 0?"Select a registry...":c,[u,T]=H.useState(!1);let o,p,a,x,$,R,C,y;if(e[0]!==u||e[1]!==m||e[2]!==r||e[3]!==l){let b;e[12]!==l?(b=g=>g.id===l,e[12]=l,e[13]=b):b=e[13];const w=r.find(b);p=Se,C=u,y=T,o=we,R=!0,a="button",e[14]===Symbol.for("react.memo_cache_sentinel")?(x=de("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]=x):x=e[14],$=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:m}),e[0]=u,e[1]=m,e[2]=r,e[3]=l,e[4]=o,e[5]=p,e[6]=a,e[7]=x,e[8]=$,e[9]=R,e[10]=C,e[11]=y}else o=e[4],p=e[5],a=e[6],x=e[7],$=e[8],R=e[9],C=e[10],y=e[11];let L;e[15]===Symbol.for("react.memo_cache_sentinel")?(L=s.jsx(Re,{className:"size-4 opacity-50"}),e[15]=L):L=e[15];let S;e[16]!==a||e[17]!==x||e[18]!==$?(S=s.jsxs("button",{type:a,className:x,children:[$,L]}),e[16]=a,e[17]=x,e[18]=$,e[19]=S):S=e[19];let h;e[20]!==o||e[21]!==R||e[22]!==S?(h=s.jsx(o,{asChild:R,children:S}),e[20]=o,e[21]=R,e[22]=S,e[23]=h):h=e[23];let v;if(e[24]!==d||e[25]!==r||e[26]!==l){let b;e[28]!==d||e[29]!==l?(b=w=>s.jsxs("button",{type:"button",onClick:()=>{d(w.id??w.name),T(!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(Te,{className:"size-4"})})]},w.id??w.name),e[28]=d,e[29]=l,e[30]=b):b=e[30],v=r.map(b),e[24]=d,e[25]=r,e[26]=l,e[27]=v}else v=e[27];let z;e[31]!==n||e[32]!==i?(z=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(b=>s.jsxs("button",{type:"button",onClick:()=>{n(b),T(!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:[b.icon?s.jsx("img",{src:b.icon,alt:b.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:b.title.slice(0,1).toUpperCase()}),s.jsx("span",{className:"flex-1",children:b.title})]}),s.jsx("span",{className:"absolute right-2 flex size-3.5 items-center justify-center text-muted-foreground",children:s.jsx(Xe,{size:16})})]},b.id??b.title))]}),e[31]=n,e[32]=i,e[33]=z):z=e[33];let P;e[34]!==v||e[35]!==z?(P=s.jsxs(Ie,{align:"end",className:"w-auto min-w-[200px] p-1",children:[v,z]}),e[34]=v,e[35]=z,e[36]=P):P=e[36];let k;return e[37]!==p||e[38]!==h||e[39]!==P||e[40]!==C||e[41]!==y?(k=s.jsxs(p,{open:C,onOpenChange:y,children:[h,P]}),e[37]=p,e[38]=h,e[39]=P,e[40]=C,e[41]=y,e[42]=k):k=e[42],k}function vt({registries:t,onConnected:e}){const r=Ce(),{org:{slug:l}}=ne(),{data:d}=ze.useSession(),n=xe(),[i,c]=H.useState(!1),m=t[0],u=async()=>{if(!(!m||!d?.user?.id)){c(!0);try{const o=await r.create.mutateAsync(m);e?.(o.id)}finally{c(!1)}}},T=()=>{n({to:"/$org/$project/mcps",params:{org:l,project:he},search:{action:"create"}})};return s.jsx(Ye,{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(te,{variant:"outline",onClick:u,disabled:i||!m,children:[m?.icon&&s.jsx("img",{src:m.icon,alt:"",className:"size-4"}),i?"Installing...":"Install Registry"]}),s.jsx(te,{variant:"outline",onClick:T,children:"Custom Connection"})]})})}function bt(t){const e=X.c(15),{error:r,onRetry:l,registryName:d}=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(ge,{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 c;e[2]!==d?(c=s.jsxs("p",{className:"text-sm text-muted-foreground max-w-sm mx-auto",children:["The ",s.jsx("strong",{children:d})," registry is currently unreachable. This may be a temporary issue — try again in a moment."]}),e[2]=d,e[3]=c):c=e[3];let m;e[4]!==r?(m=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]=m):m=e[5];let u;e[6]!==c||e[7]!==m?(u=s.jsxs("div",{className:"space-y-2",children:[i,c,m]}),e[6]=c,e[7]=m,e[8]=u):u=e[8];let T;e[9]===Symbol.for("react.memo_cache_sentinel")?(T=s.jsx(pe,{className:"size-4"}),e[9]=T):T=e[9];let o;e[10]!==l?(o=s.jsxs(te,{variant:"outline",size:"sm",onClick:l,children:[T,"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 as(){const t=X.c(53),{org:e,project:r}=ne(),l=He(),d=Ce(),n=$e(),i=n.location.pathname.includes("/store/")&&n.location.pathname.split("/").length>3,c=et(l);let m;t[0]!==e.id?(m=Ge.SELF(e.id),t[0]=e.id,t[1]=m):m=t[1];const u=m,T=r.enabledPlugins,o=T==null||T.includes(ae);let p;t[2]!==u?(p=(f,ee)=>f.id===u?1:ee.id===u?-1:0,t[2]=u,t[3]=p):p=t[3];const a=c.filter(f=>f.id!==u?!0:o).sort(p);let x;t[4]!==u?(x=f=>f.id===u,t[4]=u,t[5]=x):x=t[5];const $=a.some(x);let R;t[6]!==e.id?(R={connectionId:We,orgId:e.id},t[6]=e.id,t[7]=R):R=t[7];const C=Ne(R);let y;t[8]!==r.id||t[9]!==C?(y=async()=>{const f=await C.callTool({name:"PROJECT_PLUGIN_CONFIG_GET",arguments:{projectId:r.id,pluginId:ae}});return f.structuredContent??f},t[8]=r.id,t[9]=C,t[10]=y):y=t[10];const{data:L}=be({queryKey:me.projectPluginConfig(r.id??"",ae),queryFn:y,enabled:$&&!!r.id,staleTime:6e4}),S=L?.config?.settings;let h;t[11]!==S||t[12]!==u?(h=f=>f.id===u&&S?{id:f.id,name:S.registryName||f.title,icon:S.registryIcon||f.icon||void 0}:{id:f.id,name:f.title,icon:f.icon||void 0},t[11]=S,t[12]=u,t[13]=h):h=t[13];const v=a.map(h);let z;t[14]!==e.slug?(z=tt.selectedRegistry(e.slug),t[14]=e.slug,t[15]=z):z=t[15];const[P,k]=st(z,Ct);let b;t[16]!==P?(b=f=>f.id===P,t[16]=P,t[17]=b):b=t[17];const w=a.find(b);let g;t[18]!==u?(g=f=>f.id!==u,t[18]=u,t[19]=g):g=t[19];const N=a.find(g),j=w?.id||N?.id||a[0]?.id||"",F=j===u&&S?.storePrivateOnly===!0;let I;t[20]!==e.id?(I=Ve(e.id),t[20]=e.id,t[21]=I):I=t[21];let E;t[22]!==I?(E=[I],t[22]=I,t[23]=E):E=t[23];const A=E;let _;t[24]===Symbol.for("react.memo_cache_sentinel")?(_=[qe()],t[24]=_):_=t[24];const G=_;let W;t[25]!==d.create||t[26]!==k?(W=async f=>{const ee=await d.create.mutateAsync(f);k(ee.id)},t[25]=d.create,t[26]=k,t[27]=W):W=t[27];const J=W,Y=new Set(a.map(Nt)),Z=A.filter(f=>f.id&&!Y.has(f.id)),V=G.filter(f=>f.id&&!Y.has(f.id));if(i){let f;return t[28]===Symbol.for("react.memo_cache_sentinel")?(f=s.jsx(Fe,{}),t[28]=f):f=t[28],f}let Q;t[29]===Symbol.for("react.memo_cache_sentinel")?(Q=s.jsx(se.Header.Left,{children:s.jsx(Ee,{children:s.jsx(Oe,{children:s.jsx(_e,{children:s.jsx(Ke,{children:"Store"})})})})}),t[29]=Q):Q=t[29];let q;t[30]!==J?(q=async f=>J(f),t[30]=J,t[31]=q):q=t[31];let M;t[32]!==Z||t[33]!==j||t[34]!==v||t[35]!==k||t[36]!==q?(M=s.jsxs(se.Header,{children:[Q,s.jsx(se.Header.Right,{children:s.jsx(yt,{wellKnownRegistries:Z,registries:v,value:j,onValueChange:k,onAddWellKnown:q,placeholder:"Select store..."})})]}),t[32]=Z,t[33]=j,t[34]=v,t[35]=k,t[36]=q,t[37]=M):M=t[37];let B;t[38]!==j||t[39]!==v?(B=f=>{const{error:ee,resetError:ie}=f;return s.jsx(bt,{error:ee,onRetry:ie,registryName:v.find(oe=>oe.id===j)?.name??"registry"})},t[38]=j,t[39]=v,t[40]=B):B=t[40];let D;t[41]===Symbol.for("react.memo_cache_sentinel")?(D=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]=D):D=t[41];let O;t[42]!==V||t[43]!==j||t[44]!==k||t[45]!==F?(O=s.jsx(H.Suspense,{fallback:D,children:j?s.jsx(jt,{registryId:j,storePrivateOnly:F}):s.jsx("div",{className:"flex flex-col items-center justify-center h-full",children:s.jsx(vt,{registries:V,onConnected:f=>{k(f)}})})}),t[42]=V,t[43]=j,t[44]=k,t[45]=F,t[46]=O):O=t[46];let U;t[47]!==B||t[48]!==O?(U=s.jsx(se.Content,{children:s.jsx(Le,{fallback:B,children:O})}),t[47]=B,t[48]=O,t[49]=U):U=t[49];let K;return t[50]!==M||t[51]!==U?(K=s.jsxs(se,{children:[M,U]}),t[50]=M,t[51]=U,t[52]=K):K=t[52],K}function Nt(t){return t.id}function Ct(t){return t??""}export{as as default};
@@ -1 +1 @@
1
- import{r as g,c as b,j as s,z as L,E as Z,u as G,f as K,B as U}from"./index-B84Dx7nI.js";import{V as J,C as h}from"./index-SKwvOtlz.js";import{E as Q,C as X}from"./editable-task-title-CWlhOc5Q.js";import{a as Y}from"./tasks-panel-D3YXt5j8.js";import{u as B,a as ee}from"./context-Bk-UzwLO.js";import{I as O}from"./integration-icon-DNJkhUIt.js";import{b as te,P as se,a as ie}from"./popover-D7xgfP4W.js";import{S as H}from"./skeleton-CMw17Qjd.js";import{i as re,d as le}from"./constants-_xTq0aTt.js";import{b as oe}from"./use-virtual-mcp-5EdNqvyH.js";import{i as ne}from"./ChevronRight-ByOuE_Vi.js";import{t as F}from"./Users03-CG_islph.js";import{P}from"./index-CmH5OQnm.js";import{R as A,a as T,b as ae}from"./resizable-pH8vbRAI.js";import"./spinner-DiXeE5Xk.js";import"./tooltip-CHJhCJL3.js";import"./index-C8u6axf-.js";import"./use-mcp-prompts-C___IsDE.js";import"./useQuery-CIRdCYZz.js";import"./dialog-B-Kp8Cuq.js";import"./X-DjDetE_c.js";import"./form-DK8WrQI3.js";import"./label-B6R7vHKQ.js";import"./input-NIbTU7RU.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-BfaawFDM.js";import"./ChevronDown-BR4cCk-W.js";import"./Edit01-BzJXGmI-.js";import"./Lock01-STjQUMU6.js";import"./XCircle-CSLSI6pa.js";import"./AlertCircle-DsQlVvig.js";import"./select-1y3LRFgk.js";import"./Check-OSWZCZf9.js";import"./use-preferences-BfaOwWT4.js";import"./localstorage-keys-BckSA5cs.js";import"./useMutation-Be5QSQym.js";import"./ArrowLeft-CR3SWku2.js";import"./use-copy-Ba97e-kV.js";import"./tabs-D3RTRDyW.js";import"./badge-DxYG_XB9.js";import"./collapsible-DYgsVB3N.js";import"./Code01-BsBlwdG0.js";import"./SearchMd-r7i5BQk7.js";import"./use-create-virtual-mcp-Cf71AE6l.js";import"./decopilot-events-BrbCILIn.js";import"./Copy01-B595Thpy.js";import"./marked.esm-BaswSlok.js";import"./markdown-Cqv1T19z.js";import"./mcp-app-renderer-gG-wM7zZ.js";import"./types-DibruoFW.js";import"./Eye-CHYeRDXI.js";import"./Globe02-D7s1ULQJ.js";import"./LayersTwo01-C4CgBsBK.js";import"./XClose-dSJ6zVxj.js";import"./collection-search-DXvW2iQG.js";import"./Loading01-aMp99RZI.js";import"./use-connection-DSPQNIQD.js";import"./use-collections-BoFyuDa6.js";import"./generate-id-Dyweu44Y.js";import"./Clock-BEpmd0mM.js";import"./Trash01-DJTe1fKw.js";import"./CheckCircle-B2wkNkz_.js";import"./ChevronLeft-D4Ua6sXw.js";import"./user-CY9QFLJr.js";import"./avatar-D94UEcg7.js";import"./format-time-CMKyl-GC.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./Plus-Dp8Rr75G.js";import"./dropdown-menu-DjhC4m2a.js";import"./use-llm-CKGJlXuC.js";import"./use-binding-Bdb-0lwc.js";import"./binder-wDmRPNL2.js";import"./checkbox-DhgSL5Cz.js";import"./AlignLeft-Cvo6EEA1.js";import"./Image01-4wUrHqw6.js";import"./RefreshCcw01-DDGad8lb.js";import"./Settings01-DKTz1YSf.js";import"./useSuspenseInfiniteQuery-CQgxvKZn.js";import"./infiniteQueryObserver-DenS4T97.js";import"./Container-BVSlDn4p.js";const W=({size:e=24,color:t="currentColor",...i})=>g.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},g.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"}));W.displayName="LayoutRight";const q=({size:e=24,color:t="currentColor",...i})=>g.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},g.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"}));q.displayName="MessageChatSquare";function ce(e){const t=b.c(15),{agent:i}=e,{setVirtualMcpId:u}=B();let c;t[0]!==i.id||t[1]!==u?(c=()=>{u(i.id)},t[0]=i.id,t[1]=u,t[2]=c):c=t[2];const l=c;let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=L("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(F,{size:20}),t[4]=o):o=t[4];let n;t[5]!==i.icon||t[6]!==i.title?(n=s.jsx(O,{icon:i.icon,name:i.title,fallbackIcon:o}),t[5]=i.icon,t[6]=i.title,t[7]=n):n=t[7];let r;t[8]!==i.title?(r=s.jsx("p",{className:"text-sm text-foreground text-center leading-tight line-clamp-2",children:i.title}),t[8]=i.title,t[9]=r):r=t[9];let a;return t[10]!==l||t[11]!==f||t[12]!==n||t[13]!==r?(a=s.jsxs("button",{type:"button",onClick:l,className:m,"aria-label":f,children:[n,r]}),t[10]=l,t[11]=f,t[12]=n,t[13]=r,t[14]=a):a=t[14],a}function me(e){const t=b.c(14),{virtualMcps:i,selectedVirtualMcpId:u,onVirtualMcpChange:c}=e,[l,m]=g.useState(!1),f=g.useRef(null);let o,n;t[0]!==l?(o=()=>{l&&setTimeout(()=>{f.current?.focus()},0)},n=[l],t[0]=l,t[1]=o,t[2]=n):(o=t[1],n=t[2]),g.useEffect(o,n);let r;t[3]!==c?(r=N=>{c(N),m(!1)},t[3]=c,t[4]=r):r=t[4];const a=r;let d;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=L("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 p;t[6]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(te,{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(ne,{size:24,className:"text-foreground"})}),s.jsx("p",{className:"text-sm text-foreground text-center leading-tight",children:"See all"})]})}),t[6]=p):p=t[6];let x;t[7]!==a||t[8]!==u||t[9]!==i?(x=s.jsx(se,{className:"w-[550px] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,children:s.jsx(J,{virtualMcps:i,selectedVirtualMcpId:u,onVirtualMcpChange:a,searchInputRef:f})}),t[7]=a,t[8]=u,t[9]=i,t[10]=x):x=t[10];let V;return t[11]!==l||t[12]!==x?(V=s.jsxs(ie,{open:l,onOpenChange:m,children:[p,x]}),t[11]=l,t[12]=x,t[13]=V):V=t[13],V}function de(){const e=b.c(20),t=oe(),{selectedVirtualMcp:i,setVirtualMcpId:u}=B();let c,l,m,f,o,n;if(e[0]!==t){o=Symbol.for("react.early_return_sentinel");e:{const x=t.filter(ue).slice(0,6);if(x.length===0){o=null;break e}n=t.map(pe),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",l=x.map(fe)}e[0]=t,e[1]=c,e[2]=l,e[3]=m,e[4]=f,e[5]=o,e[6]=n}else c=e[1],l=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 r=i?.id??null;let a;e[8]!==u||e[9]!==r||e[10]!==n?(a=s.jsx(me,{virtualMcps:n,selectedVirtualMcpId:r,onVirtualMcpChange:u}),e[8]=u,e[9]=r,e[10]=n,e[11]=a):a=e[11];let d;e[12]!==c||e[13]!==l||e[14]!==a?(d=s.jsxs("div",{className:c,children:[l,a]}),e[12]=c,e[13]=l,e[14]=a,e[15]=d):d=e[15];let p;return e[16]!==m||e[17]!==f||e[18]!==d?(p=s.jsxs("div",{className:m,children:[f,d]}),e[16]=m,e[17]=f,e[18]=d,e[19]=p):p=e[19],p}function fe(e){return s.jsx(ce,{agent:e},e.id??"default")}function pe(e){return{id:e.id,title:e.title,description:e.description,icon:e.icon}}function ue(e){return e.id!==null&&!re(e.id)}function xe(){const e=b.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(H,{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(he)})]}),e[1]=i):i=e[1],i}function he(e,t){return s.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 self-stretch",children:[s.jsx(H,{className:"size-6 rounded-md shrink-0"}),s.jsx(H,{className:"h-4 w-full"})]},t)}function ge(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(g.Suspense,{fallback:s.jsx(xe,{}),children:s.jsx(de,{})}),e[0]=t):t=e[0],t}function je(){const e=b.c(40),{org:t}=G(),{data:i}=K.useSession(),{modelsConnections:u,isChatEmpty:c,activeTaskId:l,tasks:m,selectedVirtualMcp:f}=ee();let o;if(e[0]!==l||e[1]!==m){let j;e[3]!==l?(j=D=>D.id===l,e[3]=l,e[4]=j):j=e[4],o=m.find(j),e[0]=l,e[1]=m,e[2]=o}else o=e[2];const n=o,[r,a]=g.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 p=d;let x;e[7]!==t.id?(x=le(t.id),e[7]=t.id,e[8]=x):x=e[8];const N=f??x;if(u.length===0){let j;return e[9]!==t?(j=s.jsx("div",{className:"flex flex-col h-full bg-background items-center justify-center",children:s.jsx(h.NoLlmBindingEmptyState,{org:t})}),e[9]=t,e[10]=j):j=e[10],j}let E,I;e[11]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(A,{defaultSize:20,minSize:10,id:"tasks",order:1,children:s.jsx(Y,{})}),I=s.jsx(T,{className:"bg-border/30"}),e[11]=E,e[12]=I):(E=e[11],I=e[12]);const $=r?50:80;let C;e[13]!==n?(C=n?.title&&s.jsx(Q,{taskId:n.id,text:n.title,className:"text-sm font-medium text-foreground"}),e[13]=n,e[14]=C):C=e[14];let v;e[15]!==C?(v=s.jsx(P.Header.Left,{className:"gap-2",children:C}),e[15]=C,e[16]=v):v=e[16];let y;e[17]!==c||e[18]!==r?(y=!c&&s.jsx("button",{type:"button",onClick:()=>a(be),className:L("flex size-7 items-center justify-center rounded-md border border-input hover:bg-accent transition-colors",r&&"bg-accent"),title:"Toggle context panel",children:s.jsx(W,{size:14,className:"text-muted-foreground"})}),e[17]=c,e[18]=r,e[19]=y):y=e[19];let S;e[20]!==y?(S=s.jsx(P.Header.Right,{className:"gap-1",children:y}),e[20]=y,e[21]=S):S=e[21];let k;e[22]!==v||e[23]!==S?(k=s.jsxs(P.Header,{className:"flex-none z-10 bg-background",children:[v,S]}),e[22]=v,e[23]=S,e[24]=k):k=e[24];let _;e[25]!==N||e[26]!==c||e[27]!==p?(_=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(O,{icon:N.icon,name:N.title,size:"md",fallbackIcon:s.jsx(F,{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, ",p,"?"]})}),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(ge,{})})]}):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[25]=N,e[26]=c,e[27]=p,e[28]=_):_=e[28];let w;e[29]!==k||e[30]!==_?(w=s.jsxs(h,{className:"h-full bg-background",children:[k,_]}),e[29]=k,e[30]=_,e[31]=w):w=e[31];let z;e[32]!==w||e[33]!==$?(z=s.jsx(A,{defaultSize:$,minSize:30,id:"main",order:2,children:w}),e[32]=w,e[33]=$,e[34]=z):z=e[34];let M;e[35]!==r?(M=r&&s.jsxs(s.Fragment,{children:[s.jsx(T,{className:"bg-border/30"}),s.jsx(A,{defaultSize:30,minSize:15,id:"context",order:3,children:s.jsx(X,{onClose:()=>a(!1)})})]}),e[35]=r,e[36]=M):M=e[36];let R;return e[37]!==z||e[38]!==M?(R=s.jsxs(ae,{direction:"horizontal",className:"size-full",children:[E,I,z,M]}),e[37]=z,e[38]=M,e[39]=R):R=e[39],R}function be(e){return!e}function Ne(e){const t=b.c(14),{error:i,onRetry:u}=e,c=i?.message?.includes("401")||i?.message?.toLowerCase().includes("unauthorized");let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs(P.Header,{className:"flex-none",children:[s.jsx(P.Header.Left,{className:"gap-2"}),s.jsx(P.Header.Right,{className:"gap-1"})]}),t[0]=l):l=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(q,{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 r;t[4]!==n?(r=s.jsx("p",{className:"text-sm text-muted-foreground",children:n}),t[4]=n,t[5]=r):r=t[5];let a;t[6]!==o||t[7]!==r?(a=s.jsxs("div",{className:"space-y-2",children:[o,r]}),t[6]=o,t[7]=r,t[8]=a):a=t[8];let d;t[9]!==u?(d=s.jsx(U,{variant:"outline",onClick:u,children:"Try again"}),t[9]=u,t[10]=d):d=t[10];let p;return t[11]!==a||t[12]!==d?(p=s.jsxs(h,{children:[l,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]=p):p=t[13],p}function Kt(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Z,{fallback:Ce,children:s.jsx(g.Suspense,{fallback:s.jsx(h.Skeleton,{}),children:s.jsx(je,{})})}),e[0]=t):t=e[0],t}function Ce(e){const{error:t,resetError:i}=e;return s.jsx(Ne,{error:t,onRetry:i})}export{Kt as default};
1
+ import{r as g,c as b,j as s,z as L,E as Z,u as G,f as K,B as U}from"./index-D4JwUMfo.js";import{V as J,C as h}from"./index-CcYCRia5.js";import{E as Q,C as X}from"./editable-task-title-COV97EVU.js";import{a as Y}from"./tasks-panel-F1KlPjDk.js";import{u as B,a as ee}from"./context-Cx8RVNtA.js";import{I as O}from"./integration-icon-D2pk71z8.js";import{b as te,P as se,a as ie}from"./popover-BUt6i0bO.js";import{S as H}from"./skeleton-CbT1YKhD.js";import{i as re,d as le}from"./constants-DMTOffGt.js";import{b as oe}from"./use-virtual-mcp-B9smgfPR.js";import{i as ne}from"./ChevronRight-D7UsQHH3.js";import{t as F}from"./Users03-D0FREVnP.js";import{P}from"./index-DbJ64cDo.js";import{R as A,a as T,b as ae}from"./resizable-D6AZXb64.js";import"./spinner-DwdOzJhG.js";import"./tooltip-BcimsULQ.js";import"./index-CrHCQ8Nf.js";import"./use-mcp-prompts-DDRMLpw3.js";import"./useQuery-D0xC6l4K.js";import"./dialog-CcebbiBo.js";import"./X-CK2TCShL.js";import"./form-CHPvar9M.js";import"./label-BhB8mtiL.js";import"./input-BRH9Cf1s.js";import"./usage-B8eRkRZY.js";import"./ArrowUp-JndBjwJL.js";import"./ChevronDown-cViiGxn9.js";import"./Edit01-C0vDTgcf.js";import"./Lock01-XSJRlK5x.js";import"./XCircle-0CM-aUam.js";import"./AlertCircle-BVzUbFpn.js";import"./select-DwZBzl3A.js";import"./Check-q1dqks2U.js";import"./use-preferences-BrXnvkz-.js";import"./localstorage-keys-xw4Txgji.js";import"./useMutation-D-zwC1-P.js";import"./ArrowLeft-G2GpUvfS.js";import"./use-copy-CqEqSzSC.js";import"./tabs-D9mKN69N.js";import"./badge-Bgf3f5yM.js";import"./collapsible-viU10JM0.js";import"./Code01-EB8m5diA.js";import"./SearchMd-DQrPJQV9.js";import"./use-create-virtual-mcp-LFxhmGpw.js";import"./decopilot-events-DWI9oooP.js";import"./Copy01-DIuxFCYv.js";import"./marked.esm-BaswSlok.js";import"./markdown-Bew8FtWp.js";import"./mcp-app-renderer-DXWDRIz1.js";import"./types-DVrpg4Au.js";import"./Eye-BY6V0QO1.js";import"./Globe02-7C9FcKVE.js";import"./LayersTwo01-D5xVmKNM.js";import"./XClose-C1VIP6EM.js";import"./collection-search-Cg477-ZE.js";import"./Loading01-1unV3no7.js";import"./use-connection-96ulKDkp.js";import"./use-collections-Bs1uQVQJ.js";import"./generate-id-Dyweu44Y.js";import"./Clock-uUYVZnmE.js";import"./Trash01-DO5SV3mV.js";import"./CheckCircle-DAQqu9C_.js";import"./ChevronLeft-Cl-I3Mb5.js";import"./user-BoAAEh6g.js";import"./avatar-R3EZmhcg.js";import"./format-time-CMKyl-GC.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./Plus-DRukDy12.js";import"./dropdown-menu-CXrh9ioK.js";import"./use-llm-CmHgTlzz.js";import"./use-binding-CZG6TNcT.js";import"./binder-D6CqvsA8.js";import"./checkbox-DiriJ1bL.js";import"./AlignLeft-C6EBYnL8.js";import"./Image01-CQ8GcYUR.js";import"./RefreshCcw01-D1XgqmbV.js";import"./Settings01-C-jo0YyN.js";import"./useSuspenseInfiniteQuery-8i63vxYn.js";import"./infiniteQueryObserver-DAdEAsRM.js";import"./Container-BnukWtxV.js";const W=({size:e=24,color:t="currentColor",...i})=>g.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},g.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"}));W.displayName="LayoutRight";const q=({size:e=24,color:t="currentColor",...i})=>g.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},g.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"}));q.displayName="MessageChatSquare";function ce(e){const t=b.c(15),{agent:i}=e,{setVirtualMcpId:u}=B();let c;t[0]!==i.id||t[1]!==u?(c=()=>{u(i.id)},t[0]=i.id,t[1]=u,t[2]=c):c=t[2];const l=c;let m;t[3]===Symbol.for("react.memo_cache_sentinel")?(m=L("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(F,{size:20}),t[4]=o):o=t[4];let n;t[5]!==i.icon||t[6]!==i.title?(n=s.jsx(O,{icon:i.icon,name:i.title,fallbackIcon:o}),t[5]=i.icon,t[6]=i.title,t[7]=n):n=t[7];let r;t[8]!==i.title?(r=s.jsx("p",{className:"text-sm text-foreground text-center leading-tight line-clamp-2",children:i.title}),t[8]=i.title,t[9]=r):r=t[9];let a;return t[10]!==l||t[11]!==f||t[12]!==n||t[13]!==r?(a=s.jsxs("button",{type:"button",onClick:l,className:m,"aria-label":f,children:[n,r]}),t[10]=l,t[11]=f,t[12]=n,t[13]=r,t[14]=a):a=t[14],a}function me(e){const t=b.c(14),{virtualMcps:i,selectedVirtualMcpId:u,onVirtualMcpChange:c}=e,[l,m]=g.useState(!1),f=g.useRef(null);let o,n;t[0]!==l?(o=()=>{l&&setTimeout(()=>{f.current?.focus()},0)},n=[l],t[0]=l,t[1]=o,t[2]=n):(o=t[1],n=t[2]),g.useEffect(o,n);let r;t[3]!==c?(r=N=>{c(N),m(!1)},t[3]=c,t[4]=r):r=t[4];const a=r;let d;t[5]===Symbol.for("react.memo_cache_sentinel")?(d=L("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 p;t[6]===Symbol.for("react.memo_cache_sentinel")?(p=s.jsx(te,{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(ne,{size:24,className:"text-foreground"})}),s.jsx("p",{className:"text-sm text-foreground text-center leading-tight",children:"See all"})]})}),t[6]=p):p=t[6];let x;t[7]!==a||t[8]!==u||t[9]!==i?(x=s.jsx(se,{className:"w-[550px] p-0 overflow-hidden",align:"start",side:"top",sideOffset:8,children:s.jsx(J,{virtualMcps:i,selectedVirtualMcpId:u,onVirtualMcpChange:a,searchInputRef:f})}),t[7]=a,t[8]=u,t[9]=i,t[10]=x):x=t[10];let V;return t[11]!==l||t[12]!==x?(V=s.jsxs(ie,{open:l,onOpenChange:m,children:[p,x]}),t[11]=l,t[12]=x,t[13]=V):V=t[13],V}function de(){const e=b.c(20),t=oe(),{selectedVirtualMcp:i,setVirtualMcpId:u}=B();let c,l,m,f,o,n;if(e[0]!==t){o=Symbol.for("react.early_return_sentinel");e:{const x=t.filter(ue).slice(0,6);if(x.length===0){o=null;break e}n=t.map(pe),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",l=x.map(fe)}e[0]=t,e[1]=c,e[2]=l,e[3]=m,e[4]=f,e[5]=o,e[6]=n}else c=e[1],l=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 r=i?.id??null;let a;e[8]!==u||e[9]!==r||e[10]!==n?(a=s.jsx(me,{virtualMcps:n,selectedVirtualMcpId:r,onVirtualMcpChange:u}),e[8]=u,e[9]=r,e[10]=n,e[11]=a):a=e[11];let d;e[12]!==c||e[13]!==l||e[14]!==a?(d=s.jsxs("div",{className:c,children:[l,a]}),e[12]=c,e[13]=l,e[14]=a,e[15]=d):d=e[15];let p;return e[16]!==m||e[17]!==f||e[18]!==d?(p=s.jsxs("div",{className:m,children:[f,d]}),e[16]=m,e[17]=f,e[18]=d,e[19]=p):p=e[19],p}function fe(e){return s.jsx(ce,{agent:e},e.id??"default")}function pe(e){return{id:e.id,title:e.title,description:e.description,icon:e.icon}}function ue(e){return e.id!==null&&!re(e.id)}function xe(){const e=b.c(2);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(H,{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(he)})]}),e[1]=i):i=e[1],i}function he(e,t){return s.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 self-stretch",children:[s.jsx(H,{className:"size-6 rounded-md shrink-0"}),s.jsx(H,{className:"h-4 w-full"})]},t)}function ge(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(g.Suspense,{fallback:s.jsx(xe,{}),children:s.jsx(de,{})}),e[0]=t):t=e[0],t}function je(){const e=b.c(40),{org:t}=G(),{data:i}=K.useSession(),{modelsConnections:u,isChatEmpty:c,activeTaskId:l,tasks:m,selectedVirtualMcp:f}=ee();let o;if(e[0]!==l||e[1]!==m){let j;e[3]!==l?(j=D=>D.id===l,e[3]=l,e[4]=j):j=e[4],o=m.find(j),e[0]=l,e[1]=m,e[2]=o}else o=e[2];const n=o,[r,a]=g.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 p=d;let x;e[7]!==t.id?(x=le(t.id),e[7]=t.id,e[8]=x):x=e[8];const N=f??x;if(u.length===0){let j;return e[9]!==t?(j=s.jsx("div",{className:"flex flex-col h-full bg-background items-center justify-center",children:s.jsx(h.NoLlmBindingEmptyState,{org:t})}),e[9]=t,e[10]=j):j=e[10],j}let E,I;e[11]===Symbol.for("react.memo_cache_sentinel")?(E=s.jsx(A,{defaultSize:20,minSize:10,id:"tasks",order:1,children:s.jsx(Y,{})}),I=s.jsx(T,{className:"bg-border/30"}),e[11]=E,e[12]=I):(E=e[11],I=e[12]);const $=r?50:80;let C;e[13]!==n?(C=n?.title&&s.jsx(Q,{taskId:n.id,text:n.title,className:"text-sm font-medium text-foreground"}),e[13]=n,e[14]=C):C=e[14];let v;e[15]!==C?(v=s.jsx(P.Header.Left,{className:"gap-2",children:C}),e[15]=C,e[16]=v):v=e[16];let y;e[17]!==c||e[18]!==r?(y=!c&&s.jsx("button",{type:"button",onClick:()=>a(be),className:L("flex size-7 items-center justify-center rounded-md border border-input hover:bg-accent transition-colors",r&&"bg-accent"),title:"Toggle context panel",children:s.jsx(W,{size:14,className:"text-muted-foreground"})}),e[17]=c,e[18]=r,e[19]=y):y=e[19];let S;e[20]!==y?(S=s.jsx(P.Header.Right,{className:"gap-1",children:y}),e[20]=y,e[21]=S):S=e[21];let k;e[22]!==v||e[23]!==S?(k=s.jsxs(P.Header,{className:"flex-none z-10 bg-background",children:[v,S]}),e[22]=v,e[23]=S,e[24]=k):k=e[24];let _;e[25]!==N||e[26]!==c||e[27]!==p?(_=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(O,{icon:N.icon,name:N.title,size:"md",fallbackIcon:s.jsx(F,{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, ",p,"?"]})}),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(ge,{})})]}):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[25]=N,e[26]=c,e[27]=p,e[28]=_):_=e[28];let w;e[29]!==k||e[30]!==_?(w=s.jsxs(h,{className:"h-full bg-background",children:[k,_]}),e[29]=k,e[30]=_,e[31]=w):w=e[31];let z;e[32]!==w||e[33]!==$?(z=s.jsx(A,{defaultSize:$,minSize:30,id:"main",order:2,children:w}),e[32]=w,e[33]=$,e[34]=z):z=e[34];let M;e[35]!==r?(M=r&&s.jsxs(s.Fragment,{children:[s.jsx(T,{className:"bg-border/30"}),s.jsx(A,{defaultSize:30,minSize:15,id:"context",order:3,children:s.jsx(X,{onClose:()=>a(!1)})})]}),e[35]=r,e[36]=M):M=e[36];let R;return e[37]!==z||e[38]!==M?(R=s.jsxs(ae,{direction:"horizontal",className:"size-full",children:[E,I,z,M]}),e[37]=z,e[38]=M,e[39]=R):R=e[39],R}function be(e){return!e}function Ne(e){const t=b.c(14),{error:i,onRetry:u}=e,c=i?.message?.includes("401")||i?.message?.toLowerCase().includes("unauthorized");let l;t[0]===Symbol.for("react.memo_cache_sentinel")?(l=s.jsxs(P.Header,{className:"flex-none",children:[s.jsx(P.Header.Left,{className:"gap-2"}),s.jsx(P.Header.Right,{className:"gap-1"})]}),t[0]=l):l=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(q,{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 r;t[4]!==n?(r=s.jsx("p",{className:"text-sm text-muted-foreground",children:n}),t[4]=n,t[5]=r):r=t[5];let a;t[6]!==o||t[7]!==r?(a=s.jsxs("div",{className:"space-y-2",children:[o,r]}),t[6]=o,t[7]=r,t[8]=a):a=t[8];let d;t[9]!==u?(d=s.jsx(U,{variant:"outline",onClick:u,children:"Try again"}),t[9]=u,t[10]=d):d=t[10];let p;return t[11]!==a||t[12]!==d?(p=s.jsxs(h,{children:[l,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]=p):p=t[13],p}function Kt(){const e=b.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=s.jsx(Z,{fallback:Ce,children:s.jsx(g.Suspense,{fallback:s.jsx(h.Skeleton,{}),children:s.jsx(je,{})})}),e[0]=t):t=e[0],t}function Ce(e){const{error:t,resetError:i}=e;return s.jsx(Ne,{error:t,onRetry:i})}export{Kt as default};
@@ -1 +1 @@
1
- import{c as s,j as t}from"./index-B84Dx7nI.js";import{e as r}from"./Dataflow03-DW4Gd5sB.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-D4JwUMfo.js";import{e as r}from"./Dataflow03-CSrRmRdp.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 a,j as t,ar as n}from"./index-B84Dx7nI.js";function r(){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{r as default};
1
+ import{c as a,j as t,ar as n}from"./index-D4JwUMfo.js";function r(){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{r as default};
@@ -1 +1 @@
1
- import{c as w,j as s,r as S,ar as y}from"./index-B84Dx7nI.js";import{i as _}from"./Check-OSWZCZf9.js";import{t as k}from"./ChevronDown-BR4cCk-W.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,ar as y}from"./index-D4JwUMfo.js";import{i as _}from"./Check-q1dqks2U.js";import{t as k}from"./ChevronDown-cViiGxn9.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};