decocms 2.302.1 → 2.302.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 (205) hide show
  1. package/dist/client/assets/{AlertCircle-BFJK99tM.js → AlertCircle-BkX4HzbS.js} +1 -1
  2. package/dist/client/assets/{ArrowNarrowLeft-DCbP5K-g.js → ArrowNarrowLeft-BebHkn1X.js} +1 -1
  3. package/dist/client/assets/{ArrowUpRight-BvzWf0q7.js → ArrowUpRight-uszsF274.js} +1 -1
  4. package/dist/client/assets/{CheckCircle-qqOIolWc.js → CheckCircle-Boq6G01L.js} +1 -1
  5. package/dist/client/assets/{ChevronDown-BMTA9_Ap.js → ChevronDown-ByP-e484.js} +1 -1
  6. package/dist/client/assets/{ChevronRight-QeeRSp8z.js → ChevronRight-BUfZMnd9.js} +1 -1
  7. package/dist/client/assets/{ChevronUp-BHiGg6ZY.js → ChevronUp-TwiYbtUW.js} +1 -1
  8. package/dist/client/assets/{Container-CIDvyJX8.js → Container-DzkLD13G.js} +1 -1
  9. package/dist/client/assets/{DotsVertical-Bd2_5HYZ.js → DotsVertical-BrUfBHwt.js} +1 -1
  10. package/dist/client/assets/{LinkExternal01-DCnMv_g7.js → LinkExternal01-gfL-Fk4b.js} +1 -1
  11. package/dist/client/assets/{Lock01-Ds-YEZnN.js → Lock01-CI-miN4g.js} +1 -1
  12. package/dist/client/assets/{Palette-DescRwe0.js → Palette-1HvN4NnC.js} +1 -1
  13. package/dist/client/assets/{Play-Ch3KWC7Z.js → Play-O7ldNAxa.js} +1 -1
  14. package/dist/client/assets/{Plus-gLdNtuBE.js → Plus-Bihyskqy.js} +1 -1
  15. package/dist/client/assets/{RefreshCcw01-DKf5Q7r6.js → RefreshCcw01-BzT-xyrO.js} +1 -1
  16. package/dist/client/assets/{SearchMd-BI1BY0Xc.js → SearchMd-vBRV-l3E.js} +1 -1
  17. package/dist/client/assets/{Settings02-D0o0GA4h.js → Settings02-eiwWD3s7.js} +1 -1
  18. package/dist/client/assets/{Shield01-btPXI3TS.js → Shield01-D7ml37xT.js} +1 -1
  19. package/dist/client/assets/{Star01-DInOTW7T.js → Star01-ByzmPd4J.js} +1 -1
  20. package/dist/client/assets/{Sun-DLagUbKM.js → Sun-xA_CdWAJ.js} +1 -1
  21. package/dist/client/assets/{Tool01-D1xeep7h.js → Tool01-Dqyo2VjJ.js} +1 -1
  22. package/dist/client/assets/{Trash01-OgQVP2St.js → Trash01-f4CvhuWB.js} +1 -1
  23. package/dist/client/assets/{User01-Cr_qCqW_.js → User01-lDhxACAV.js} +1 -1
  24. package/dist/client/assets/{Users03-DVwMLxYo.js → Users03-IortA-KV.js} +1 -1
  25. package/dist/client/assets/{X-fvjwb2RC.js → X-BiphajNJ.js} +1 -1
  26. package/dist/client/assets/{XCircle-CVED_3Ss.js → XCircle-Dp1Lqd1t.js} +1 -1
  27. package/dist/client/assets/{XClose-C1T9ODT_.js → XClose-lRlzG-cb.js} +1 -1
  28. package/dist/client/assets/{Zap-u543Wk9m.js → Zap-ebWdIwXf.js} +1 -1
  29. package/dist/client/assets/{ZapSquare-B03aoE62.js → ZapSquare-_fsDSSOX.js} +1 -1
  30. package/dist/client/assets/{accordion-zoDibAHc.js → accordion-D3c87Mh0.js} +1 -1
  31. package/dist/client/assets/{agent-icon-B5EEcofO.js → agent-icon-Be_PnRh0.js} +1 -1
  32. package/dist/client/assets/{agents-list-KuDCGevU.js → agents-list-45a0yQhW.js} +1 -1
  33. package/dist/client/assets/ai-providers-BzCSRpkV.js +1 -0
  34. package/dist/client/assets/{alert-dialog-B6JtF6Oy.js → alert-dialog-BUApN05b.js} +1 -1
  35. package/dist/client/assets/{auth-catchall-CnOfYh4q.js → auth-catchall-DH0bWyBT.js} +1 -1
  36. package/dist/client/assets/{automation-list-row-Ce2nqVRS.js → automation-list-row-DETQBuFK.js} +1 -1
  37. package/dist/client/assets/{automations-3wicI9sJ.js → automations-DvIFzGM7.js} +1 -1
  38. package/dist/client/assets/{avatar-B5CcOSaZ.js → avatar-BBnvw18x.js} +1 -1
  39. package/dist/client/assets/{badge-Vn5olYFX.js → badge-CRHmlYav.js} +1 -1
  40. package/dist/client/assets/{brand-context-JEzNXnYS.js → brand-context-CH2SSDlY.js} +1 -1
  41. package/dist/client/assets/{card-DHIGW2Gm.js → card-DoqftRz7.js} +1 -1
  42. package/dist/client/assets/{chat-context-DZ4ItXeY.js → chat-context-JbYHex_O.js} +1 -1
  43. package/dist/client/assets/{checkbox-DBBm6J90.js → checkbox-CHYA_sQZ.js} +1 -1
  44. package/dist/client/assets/{collection-detail-CYmy41EW.js → collection-detail-Bb5ojn6D.js} +1 -1
  45. package/dist/client/assets/{collection-display-button-DifdWxZd.js → collection-display-button-C2ECPv0_.js} +1 -1
  46. package/dist/client/assets/{collection-search-dr2VH0_A.js → collection-search-B8mdZm7u.js} +1 -1
  47. package/dist/client/assets/{collection-search-EJTdRq0l.js → collection-search-C-2UZGyD.js} +1 -1
  48. package/dist/client/assets/{collection-table-wrapper-BNTrWb5l.js → collection-table-wrapper-pDRU_Alr.js} +1 -1
  49. package/dist/client/assets/{collection-tabs-BhSzOngN.js → collection-tabs-Bj7BShdC.js} +1 -1
  50. package/dist/client/assets/{collections-x4R34QWs.js → collections-CjrHbdtT.js} +1 -1
  51. package/dist/client/assets/{command-dTUEruN1.js → command-CZWy1buB.js} +1 -1
  52. package/dist/client/assets/{connection-card-DHMMRnIO.js → connection-card-HM9ImVMm.js} +1 -1
  53. package/dist/client/assets/{connection-detail-B_69g2MY.js → connection-detail-CWdb5LvI.js} +1 -1
  54. package/dist/client/assets/{connection-form-helpers-CSnwVczG.js → connection-form-helpers-Cr0s3TXQ.js} +1 -1
  55. package/dist/client/assets/{connections-DL-vzzoi.js → connections-CpsKPW6X.js} +1 -1
  56. package/dist/client/assets/{constants-BVU634u9.js → constants-Cj0U39_n.js} +1 -1
  57. package/dist/client/assets/{constants-DhipgDPU.js → constants-DE2tzNng.js} +1 -1
  58. package/dist/client/assets/{dialog-Cc5-s5cq.js → dialog-BdVY7mqq.js} +1 -1
  59. package/dist/client/assets/{domain-settings-Ddgt5zKc.js → domain-settings-DALXcXKA.js} +1 -1
  60. package/dist/client/assets/{drawer-CYKJkhyy.js → drawer-0C4xllAB.js} +1 -1
  61. package/dist/client/assets/{dropdown-menu-BdezCavF.js → dropdown-menu-Bq-aRZ_r.js} +1 -1
  62. package/dist/client/assets/{dynamic-plugin-layout-BPGpVId2.js → dynamic-plugin-layout-CXa5_dk-.js} +1 -1
  63. package/dist/client/assets/{empty-state-B-SDOSco.js → empty-state-Cw5GxS3i.js} +1 -1
  64. package/dist/client/assets/{empty-state-CGM_VDGy.js → empty-state-S_EjXlZP.js} +1 -1
  65. package/dist/client/assets/{extract-connection-data-CGFCZBB1.js → extract-connection-data-DN-EBamj.js} +1 -1
  66. package/dist/client/assets/{features-D36LrRkp.js → features-CZe-SpPx.js} +1 -1
  67. package/dist/client/assets/{form-BlgCJwww.js → form-Stkhqjoi.js} +1 -1
  68. package/dist/client/assets/{general-ByIyj3-X.js → general-aMP5BKAQ.js} +1 -1
  69. package/dist/client/assets/{index-DcnDvcwB.js → index-B7sUvMqz.js} +1 -1
  70. package/dist/client/assets/{index-C4B8wMiM.js → index-BP0vNLKa.js} +1 -1
  71. package/dist/client/assets/{index-Ce3V05Jd.js → index-BY8F27EB.js} +1 -1
  72. package/dist/client/assets/{index-C-49LFOm.js → index-BZhxvvXQ.js} +1 -1
  73. package/dist/client/assets/{index-iJW-G2eC.js → index-C--avMTn.js} +1 -1
  74. package/dist/client/assets/{index-CQbT2-AO.js → index-CAum6J1D.js} +1 -1
  75. package/dist/client/assets/{index-CxcuSo6g.js → index-ClNUcJ8s.js} +1 -1
  76. package/dist/client/assets/{index-DL3V_XAA.js → index-Crkc58Yb.js} +1 -1
  77. package/dist/client/assets/index-D2fHFr2F.js +1 -0
  78. package/dist/client/assets/{index-gtAbs0Sc.js → index-D58bzP3p.js} +1 -1
  79. package/dist/client/assets/{index-QpbQL5yY.js → index-DCOURowK.js} +1 -1
  80. package/dist/client/assets/{index-BEdZpL1a.js → index-DhThG5rF.js} +3 -3
  81. package/dist/client/assets/{index-DWnDHmtK.js → index-ZmvI6xf3.js} +1 -1
  82. package/dist/client/assets/{index-BGvMfUr2.js → index-b_n-uXmh.js} +2 -2
  83. package/dist/client/assets/{index-BizlRsAk.js → index-pdnGjAa-.js} +1 -1
  84. package/dist/client/assets/{index-DRSFVCQG.js → index-y9YjpvN-.js} +1 -1
  85. package/dist/client/assets/{infiniteQueryObserver-B9_hQDN4.js → infiniteQueryObserver-DMFjl81X.js} +1 -1
  86. package/dist/client/assets/{input-r-FVR1hH.js → input-C80VzPpQ.js} +1 -1
  87. package/dist/client/assets/{integration-icon-Btl0P6Zi.js → integration-icon-LX1nChXa.js} +1 -1
  88. package/dist/client/assets/{label-CDE7or5s.js → label-2a4WSF52.js} +1 -1
  89. package/dist/client/assets/{layout-DtEpOSua.js → layout-BAy6nHY2.js} +1 -1
  90. package/dist/client/assets/{lean-canvas-recruit-modal-70F-bJzI.js → lean-canvas-recruit-modal-C1vNRy0q.js} +1 -1
  91. package/dist/client/assets/{login-D6mlZnBr.js → login-BwOZspJc.js} +1 -1
  92. package/dist/client/assets/{members-B44F43x3.js → members-BxmUMFwY.js} +1 -1
  93. package/dist/client/assets/{monaco-editor-D9GcAVz1.js → monaco-editor-BY6pRUNM.js} +1 -1
  94. package/dist/client/assets/{monitoring-stats-row-9xBJedBt.js → monitoring-stats-row-BPKt_N1O.js} +1 -1
  95. package/dist/client/assets/{oauth-callback-BzeoI5mr.js → oauth-callback-Dkjb5tCM.js} +1 -1
  96. package/dist/client/assets/{oauth-callback-ai-provider-B7fEhkFp.js → oauth-callback-ai-provider-mujJmFGt.js} +1 -1
  97. package/dist/client/assets/{onboarding-C_yRTGs2.js → onboarding-C1DRaGue.js} +1 -1
  98. package/dist/client/assets/{org-layout-xgtHVrWJ.js → org-layout-DioVArtE.js} +1 -1
  99. package/dist/client/assets/{org-plugin-layout-DjYWXXLz.js → org-plugin-layout-BZoT2SIg.js} +1 -1
  100. package/dist/client/assets/{pair-TlV_Y8fY.js → pair-CBvrXYZC.js} +1 -1
  101. package/dist/client/assets/{plugin-empty-state-wcs5uyqa.js → plugin-empty-state-DRAuC0gx.js} +1 -1
  102. package/dist/client/assets/{plugin-header-D00boOwo.js → plugin-header-Y35bsPBd.js} +1 -1
  103. package/dist/client/assets/{plugin-layout-kZMGzqtV.js → plugin-layout-BM2m7Nsv.js} +1 -1
  104. package/dist/client/assets/{popover-CENSHA5K.js → popover-CALdcEX7.js} +1 -1
  105. package/dist/client/assets/{profile-CmCDElOt.js → profile-Cz2Ymv3u.js} +1 -1
  106. package/dist/client/assets/{project-app-view-CXSUfW9V.js → project-app-view-BJIaTnR2.js} +1 -1
  107. package/dist/client/assets/registry-Bm6dPwQv.js +2 -0
  108. package/dist/client/assets/{registry-layout-jKwqcMMI.js → registry-layout-Bg8yl9if.js} +1 -1
  109. package/dist/client/assets/{required-auth-layout-ByW838Wg.js → required-auth-layout-CnSE-XLF.js} +1 -1
  110. package/dist/client/assets/{reset-password-Cn2aTTGW.js → reset-password-BEfzUzVH.js} +1 -1
  111. package/dist/client/assets/{roles-BOss14ty.js → roles-CFSaKkJP.js} +1 -1
  112. package/dist/client/assets/{scroll-area-KyXayDS_.js → scroll-area-18YOEnqD.js} +1 -1
  113. package/dist/client/assets/{search-input-LdRGRYga.js → search-input-6INcGAwd.js} +1 -1
  114. package/dist/client/assets/{select-CKhnD_dJ.js → select-CaDZpVbI.js} +1 -1
  115. package/dist/client/assets/{select-model-DSERjqbn.js → select-model-S5cFobu5.js} +1 -1
  116. package/dist/client/assets/{settings-layout-DmMGjApo.js → settings-layout-jEkhhHU3.js} +1 -1
  117. package/dist/client/assets/{settings-section-BSfLZRSf.js → settings-section-e84UGEbx.js} +1 -1
  118. package/dist/client/assets/{shell-layout-BTN4hGpk.js → shell-layout-Cdsgdqci.js} +1 -1
  119. package/dist/client/assets/{skeleton-PrntJAKB.js → skeleton-DCXc9Mjl.js} +1 -1
  120. package/dist/client/assets/{sso-Dt9Y-guZ.js → sso-DTC2FHjx.js} +1 -1
  121. package/dist/client/assets/{store-lsrePhQV.js → store-pc-wftmt.js} +1 -1
  122. package/dist/client/assets/store-registry-BCuueIrr.js +2 -0
  123. package/dist/client/assets/{switch-DIPW9oSx.js → switch-BUxRExf5.js} +1 -1
  124. package/dist/client/assets/{table-CyZKmPMu.js → table-CT5HWSPV.js} +1 -1
  125. package/dist/client/assets/{tabs-Cnic4mBc.js → tabs-Cge-9ZTd.js} +1 -1
  126. package/dist/client/assets/{task-status-B4S1zCuU.js → task-status-tGA8S8H-.js} +1 -1
  127. package/dist/client/assets/{textarea-DWnLf30W.js → textarea-Dx8hdqfA.js} +1 -1
  128. package/dist/client/assets/{toggle-group-Bw-pO6dq.js → toggle-group-psHBbDPI.js} +1 -1
  129. package/dist/client/assets/{tools-list-Ddp6jSMU.js → tools-list-tDufGw9O.js} +1 -1
  130. package/dist/client/assets/{tooltip-8sj0FPxK.js → tooltip-B-nRvfy-.js} +1 -1
  131. package/dist/client/assets/{types-CPAcvDGA.js → types-hw9no7At.js} +1 -1
  132. package/dist/client/assets/{use-ai-providers-TD5f5keD.js → use-ai-providers-Bc_Jl0e6.js} +1 -1
  133. package/dist/client/assets/{use-collections-DbJUoPI1.js → use-collections-CqIGWKSp.js} +1 -1
  134. package/dist/client/assets/{use-connection-EBpfvjCE.js → use-connection-DuXPSqwF.js} +1 -1
  135. package/dist/client/assets/{use-copy-DNbmGYTy.js → use-copy-CJlR4d5Y.js} +1 -1
  136. package/dist/client/assets/{use-create-virtual-mcp-oePzdlSN.js → use-create-virtual-mcp-B-gULvH7.js} +1 -1
  137. package/dist/client/assets/{use-decopilot-events-CTJPtEAG.js → use-decopilot-events-CWIgEPKA.js} +1 -1
  138. package/dist/client/assets/{use-delete-connection-DeDsXAxU.js → use-delete-connection-mOKpqJ4Z.js} +1 -1
  139. package/dist/client/assets/{use-infinite-scroll-Blb-Zkmq.js → use-infinite-scroll-HGu4x7ZU.js} +1 -1
  140. package/dist/client/assets/{use-list-state-Bt40g0pF.js → use-list-state-Dlljnhsv.js} +1 -1
  141. package/dist/client/assets/{use-mcp-tools-yGAchpt7.js → use-mcp-tools-BkDSNv3W.js} +1 -1
  142. package/dist/client/assets/{use-members-elTW2IMS.js → use-members-8sha4K9R.js} +1 -1
  143. package/dist/client/assets/{use-navigate-to-agent-XL440g7Q.js → use-navigate-to-agent-B5j-9-p3.js} +1 -1
  144. package/dist/client/assets/{use-org-auth-client-kuXtTIo4.js → use-org-auth-client-Ev284uyK.js} +1 -1
  145. package/dist/client/assets/{use-org-sso-DzmlEuU4.js → use-org-sso-CD6laYaL.js} +1 -1
  146. package/dist/client/assets/{use-organization-roles-B18S9BiQ.js → use-organization-roles-CN53ZUes.js} +1 -1
  147. package/dist/client/assets/{use-organization-settings-vi5z2D5l.js → use-organization-settings-DFNDQvXK.js} +1 -1
  148. package/dist/client/assets/{use-registry-connections-vdam_2jo.js → use-registry-connections-D1xCWobU.js} +1 -1
  149. package/dist/client/assets/{use-status-sounds-DVkOG6QZ.js → use-status-sounds-ojr3d2EQ.js} +1 -1
  150. package/dist/client/assets/{use-tasks-BSCdum36.js → use-tasks-DFEEn9nC.js} +1 -1
  151. package/dist/client/assets/{use-view-mode-IRjBIGSa.js → use-view-mode-BjLGHFfJ.js} +1 -1
  152. package/dist/client/assets/{use-virtual-mcp-BOr32Cw9.js → use-virtual-mcp-Qy5dDA1Q.js} +1 -1
  153. package/dist/client/assets/useInfiniteQuery-B82zG1fE.js +1 -0
  154. package/dist/client/assets/useSuspenseInfiniteQuery-4BiVmPoE.js +1 -0
  155. package/dist/client/assets/{user-Cr4eZetj.js → user-ysfLNnXi.js} +1 -1
  156. package/dist/client/assets/{view-mode-toggle-DqaIt4c7.js → view-mode-toggle-C5L447if.js} +1 -1
  157. package/dist/client/assets/{workflow-f-0F4vKd.js → workflow-CWouU_7K.js} +1 -1
  158. package/dist/client/assets/workflow-detail-rg2LspQv.js +1 -0
  159. package/dist/client/index.html +1 -1
  160. package/dist/server/cli.js +42 -10
  161. package/dist/server/server.js +41 -9
  162. package/package.json +1 -1
  163. package/dist/client/assets/ai-providers-3jYxMl4T.js +0 -1
  164. package/dist/client/assets/index-CSOTvYaA.js +0 -1
  165. package/dist/client/assets/registry-M9hpVTeC.js +0 -2
  166. package/dist/client/assets/store-registry-BiQl34xL.js +0 -2
  167. package/dist/client/assets/useInfiniteQuery-D6CYdRiz.js +0 -1
  168. package/dist/client/assets/useSuspenseInfiniteQuery-hnE5tAGb.js +0 -1
  169. package/dist/client/assets/workflow-detail-CHEOWOns.js +0 -1
  170. package/dist/server/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
  171. package/dist/server/node_modules/is-fullwidth-code-point/index.js +0 -12
  172. package/dist/server/node_modules/is-fullwidth-code-point/license +0 -9
  173. package/dist/server/node_modules/is-fullwidth-code-point/package.json +0 -53
  174. package/dist/server/node_modules/is-fullwidth-code-point/readme.md +0 -31
  175. package/dist/server/node_modules/pg/LICENSE +0 -21
  176. package/dist/server/node_modules/pg/README.md +0 -95
  177. package/dist/server/node_modules/pg/esm/index.mjs +0 -20
  178. package/dist/server/node_modules/pg/lib/client.js +0 -743
  179. package/dist/server/node_modules/pg/lib/connection-parameters.js +0 -171
  180. package/dist/server/node_modules/pg/lib/connection.js +0 -221
  181. package/dist/server/node_modules/pg/lib/crypto/cert-signatures.js +0 -122
  182. package/dist/server/node_modules/pg/lib/crypto/sasl.js +0 -212
  183. package/dist/server/node_modules/pg/lib/crypto/utils-legacy.js +0 -43
  184. package/dist/server/node_modules/pg/lib/crypto/utils-webcrypto.js +0 -89
  185. package/dist/server/node_modules/pg/lib/crypto/utils.js +0 -9
  186. package/dist/server/node_modules/pg/lib/defaults.js +0 -91
  187. package/dist/server/node_modules/pg/lib/index.js +0 -73
  188. package/dist/server/node_modules/pg/lib/native/client.js +0 -323
  189. package/dist/server/node_modules/pg/lib/native/index.js +0 -2
  190. package/dist/server/node_modules/pg/lib/native/query.js +0 -165
  191. package/dist/server/node_modules/pg/lib/query.js +0 -252
  192. package/dist/server/node_modules/pg/lib/result.js +0 -109
  193. package/dist/server/node_modules/pg/lib/stream.js +0 -83
  194. package/dist/server/node_modules/pg/lib/type-overrides.js +0 -35
  195. package/dist/server/node_modules/pg/lib/utils.js +0 -217
  196. package/dist/server/node_modules/pg/package.json +0 -76
  197. package/dist/server/node_modules/pg-int8/LICENSE +0 -13
  198. package/dist/server/node_modules/pg-int8/README.md +0 -16
  199. package/dist/server/node_modules/pg-int8/index.js +0 -100
  200. package/dist/server/node_modules/pg-int8/package.json +0 -24
  201. package/dist/server/node_modules/postgres-interval/index.d.ts +0 -20
  202. package/dist/server/node_modules/postgres-interval/index.js +0 -125
  203. package/dist/server/node_modules/postgres-interval/license +0 -21
  204. package/dist/server/node_modules/postgres-interval/package.json +0 -36
  205. package/dist/server/node_modules/postgres-interval/readme.md +0 -48
@@ -1 +1 @@
1
- import{r as y,e as m,c as b,j as n,cI as W,b_ as V,be as q,cJ as G,b$ as F,cL as J,c0 as X,aY as Y,aX as Z,B as K}from"./index-BGvMfUr2.js";import{u as Q,c as z,b as D,a as E,T as I}from"./tooltip-8sj0FPxK.js";import{i as U}from"./X-fvjwb2RC.js";const O=({size:i=24,color:e="currentColor",...t})=>y.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},y.createElement("path",{d:"M9 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"}));O.displayName="LayoutLeft";function ee(i){const e=m.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(V,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function te(i){const e=m.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(F,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function se(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx(X,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ae(i){const e=m.c(20);let t,s,a,l,o;e[0]!==i?({className:s,children:t,side:l,hideCloseButton:o,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=o):(t=e[1],s=e[2],a=e[3],l=e[4],o=e[5]);const r=l===void 0?"right":l,d=o===void 0?!1:o;let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(se,{}),e[6]=u):u=e[6];const c=r==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",p=r==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",f=r==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",x=r==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let g;e[7]!==s||e[8]!==c||e[9]!==p||e[10]!==f||e[11]!==x?(g=b("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-200",c,p,f,x,s),e[7]=s,e[8]=c,e[9]=p,e[10]=f,e[11]=x,e[12]=g):g=e[12];let h;e[13]!==d?(h=!d&&n.jsxs(J,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[n.jsx(U,{className:"size-4"}),n.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=d,e[14]=h):h=e[14];let v;return e[15]!==t||e[16]!==a||e[17]!==g||e[18]!==h?(v=n.jsxs(te,{children:[u,n.jsxs(q,{"data-slot":"sheet-content",className:g,...a,children:[t,h]})]}),e[15]=t,e[16]=a,e[17]=g,e[18]=h,e[19]=v):v=e[19],v}function le(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ie(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx(W,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ne(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx(G,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const oe="15rem",re="18rem",de="4.5rem",H=y.createContext(null);function M(){const i=y.useContext(H);if(!i)throw new Error("useSidebar must be used within a SidebarProvider.");return i}function Se(i){const e=m.c(13),{children:t,defaultOpen:s}=i,a=s===void 0?!1:s,l=Q(),[o,r]=y.useState(!1);let d;e[0]!==l?(d=()=>{l&&r(fe)},e[0]=l,e[1]=d):d=e[1];const u=d,c=a?"expanded":"collapsed";let p;e[2]!==a||e[3]!==l||e[4]!==o||e[5]!==c||e[6]!==u?(p={state:c,open:a,setOpen:ce,isMobile:l,openMobile:o,setOpenMobile:r,toggleSidebar:u},e[2]=a,e[3]=l,e[4]=o,e[5]=c,e[6]=u,e[7]=p):p=e[7];const f=p;let x;e[8]!==t?(x=n.jsx(z,{delayDuration:0,children:t}),e[8]=t,e[9]=x):x=e[9];let g;return e[10]!==f||e[11]!==x?(g=n.jsx(H.Provider,{value:f,children:x}),e[10]=f,e[11]=x,e[12]=g):g=e[12],g}function ce(){}function fe(i){return!i}function ye(i){const e=m.c(14);let t,s,a,l;e[0]!==i?({className:s,style:l,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l):(t=e[1],s=e[2],a=e[3],l=e[4]);let o;e[5]!==l?(o={"--sidebar-width":oe,"--sidebar-width-icon":de,...l},e[5]=l,e[6]=o):o=e[6];const r=o;let d;e[7]!==s?(d=b("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=d):d=e[8];let u;return e[9]!==t||e[10]!==a||e[11]!==r||e[12]!==d?(u=n.jsx("div",{"data-slot":"sidebar-wrapper",style:r,className:d,...a,children:t}),e[9]=t,e[10]=a,e[11]=r,e[12]=d,e[13]=u):u=e[13],u}function Ce(i){const e=m.c(36);let t,s,a,l,o;e[0]!==i?({side:l,variant:o,className:s,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=o):(t=e[1],s=e[2],a=e[3],l=e[4],o=e[5]);const r=l===void 0?"left":l,d=o===void 0?"sidebar":o,{isMobile:u,state:c,openMobile:p,setOpenMobile:f}=M();if(u){let P;e[6]===Symbol.for("react.memo_cache_sentinel")?(P={"--sidebar-width":re},e[6]=P):P=e[6];let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsxs(le,{className:"sr-only",children:[n.jsx(ie,{children:"Sidebar"}),n.jsx(ne,{children:"Displays the mobile sidebar."})]}),e[7]=k):k=e[7];let $;e[8]!==t?($=n.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let _;e[10]!==r||e[11]!==$?(_=n.jsxs(ae,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:P,side:r,children:[k,$]}),e[10]=r,e[11]=$,e[12]=_):_=e[12];let T;return e[13]!==p||e[14]!==a||e[15]!==f||e[16]!==_?(T=n.jsx(ee,{open:p,onOpenChange:f,...a,children:_}),e[13]=p,e[14]=a,e[15]=f,e[16]=_,e[17]=T):T=e[17],T}const x=c==="expanded",g=x?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let h;e[18]!==g?(h=b("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden",g),e[18]=g,e[19]=h):h=e[19];const v=x?void 0:"icon",C=x?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let N;e[20]!==s||e[21]!==C?(N=b("flex flex-col h-full",C,s),e[20]=s,e[21]=C,e[22]=N):N=e[22];let j;e[23]!==t?(j=n.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=j):j=e[24];let w;e[25]!==a||e[26]!==N||e[27]!==j?(w=n.jsx("div",{"data-slot":"sidebar-container",className:N,...a,children:j}),e[25]=a,e[26]=N,e[27]=j,e[28]=w):w=e[28];let S;return e[29]!==r||e[30]!==c||e[31]!==h||e[32]!==v||e[33]!==w||e[34]!==d?(S=n.jsx("div",{className:h,"data-state":c,"data-collapsible":v,"data-variant":d,"data-side":r,"data-slot":"sidebar",children:w}),e[29]=r,e[30]=c,e[31]=h,e[32]=v,e[33]=w,e[34]=d,e[35]=S):S=e[35],S}function ue(i){const e=m.c(18);let t,s,a;e[0]!==i?({className:t,onClick:s,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:l}=M();let o;e[4]!==t?(o=b("size-7",t),e[4]=t,e[5]=o):o=e[5];let r;e[6]!==s||e[7]!==l?(r=x=>{s?.(x),l()},e[6]=s,e[7]=l,e[8]=r):r=e[8];let d,u;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(O,{}),u=n.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=d,e[10]=u):(d=e[9],u=e[10]);let c;e[11]!==a||e[12]!==o||e[13]!==r?(c=n.jsx(E,{asChild:!0,children:n.jsxs(K,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:o,onClick:r,...a,children:[d,u]})}),e[11]=a,e[12]=o,e[13]=r,e[14]=c):c=e[14];let p;e[15]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsxs(D,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",n.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(pe)})]}),e[15]=p):p=e[15];let f;return e[16]!==c?(f=n.jsx(z,{delayDuration:300,children:n.jsxs(I,{children:[c,p]})}),e[16]=c,e[17]=f):f=e[17],f}function pe(i){return n.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:i},i)}function $e(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function _e(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Pe(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ke(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Te(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Me(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Be(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ze(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex w-full min-w-0 flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function De(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("group/menu-item relative w-full",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const me=Z("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Ee(i){const e=m.c(28);let t,s,a,l,o,r,d;e[0]!==i?({asChild:a,isActive:l,variant:o,size:r,tooltip:d,className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=o,e[6]=r,e[7]=d):(t=e[1],s=e[2],a=e[3],l=e[4],o=e[5],r=e[6],d=e[7]);const u=a===void 0?!1:a,c=l===void 0?!1:l,p=o===void 0?"default":o,f=r===void 0?"default":r,x=u?Y:"button",{isMobile:g}=M();let h;e[8]!==t||e[9]!==f||e[10]!==p?(h=b(me({variant:p,size:f}),t),e[8]=t,e[9]=f,e[10]=p,e[11]=h):h=e[11];let v;e[12]!==x||e[13]!==c||e[14]!==s||e[15]!==f||e[16]!==h?(v=n.jsx(x,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":f,"data-active":c,className:h,...s}),e[12]=x,e[13]=c,e[14]=s,e[15]=f,e[16]=h,e[17]=v):v=e[17];const C=v;if(!d)return C;if(typeof d=="string"){let S;e[18]!==d?(S={children:d},e[18]=d,e[19]=S):S=e[19],d=S}let N;e[20]!==C?(N=n.jsx(E,{asChild:!0,children:C}),e[20]=C,e[21]=N):N=e[21];let j;e[22]!==g||e[23]!==d?(j=n.jsx(D,{side:"right",align:"center",hidden:g,...d}),e[22]=g,e[23]=d,e[24]=j):j=e[24];let w;return e[25]!==N||e[26]!==j?(w=n.jsxs(I,{children:[N,j]}),e[25]=N,e[26]=j,e[27]=w):w=e[27],w}const L=y.createContext(void 0),Ie=L.Provider;function B(i,e){const t=y.Children.toArray(i);for(const s of t)if(y.isValidElement(s)&&s.type===e)return s;return null}function be(i){const e=m.c(5),{children:t,className:s}=i;let a;e[0]!==s?(a=b("flex flex-col h-full w-full bg-background overflow-hidden",s),e[0]=s,e[1]=a):a=e[1];let l;return e[2]!==t||e[3]!==a?(l=n.jsx("div",{className:a,children:t}),e[2]=t,e[3]=a,e[4]=l):l=e[4],l}function xe(i){const e=m.c(17),{children:t,className:s,hideSidebarTrigger:a}=i;let l;e[0]!==t?(l=B(t,R),e[0]=t,e[1]=l):l=e[1];const o=l;let r;e[2]!==t?(r=B(t,A),e[2]=t,e[3]=r):r=e[3];const d=r;let u;e[4]!==s?(u=b("shrink-0 w-full border-b border-border/50 h-11","flex items-center justify-between gap-3 pr-2 pl-2 md:pl-4",s),e[4]=s,e[5]=u):u=e[5];let c;e[6]!==a?(c=!a&&n.jsx(ue,{className:"md:hidden shrink-0"}),e[6]=a,e[7]=c):c=e[7];let p;e[8]!==o||e[9]!==c?(p=n.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[c,o]}),e[8]=o,e[9]=c,e[10]=p):p=e[10];let f;e[11]!==d?(f=n.jsx("div",{className:"flex items-center",children:d}),e[11]=d,e[12]=f):f=e[12];let x;return e[13]!==u||e[14]!==p||e[15]!==f?(x=n.jsxs("div",{className:u,children:[p,f]}),e[13]=u,e[14]=p,e[15]=f,e[16]=x):x=e[16],x}function R(i){const e=m.c(5),{children:t,className:s}=i;let a;e[0]!==s?(a=b("flex items-center gap-2 min-w-0 overflow-hidden",s),e[0]=s,e[1]=a):a=e[1];let l;return e[2]!==t||e[3]!==a?(l=n.jsx("div",{className:a,children:t}),e[2]=t,e[3]=a,e[4]=l):l=e[4],l}function A(i){const e=m.c(5),{children:t,className:s}=i;let a;e[0]!==s?(a=b("flex items-center gap-2 shrink-0 overflow-hidden",s),e[0]=s,e[1]=a):a=e[1];let l;return e[2]!==t||e[3]!==a?(l=n.jsx("div",{className:a,children:t}),e[2]=t,e[3]=a,e[4]=l):l=e[4],l}function he(i){const e=m.c(6),{children:t,className:s}=i,a=y.useContext(L);let l;e[0]!==s||e[1]!==a?(l=b("flex-1 overflow-auto",a,s),e[0]=s,e[1]=a,e[2]=l):l=e[2];let o;return e[3]!==t||e[4]!==l?(o=n.jsx("div",{className:l,children:t}),e[3]=t,e[4]=l,e[5]=o):o=e[5],o}function ge(i){const e=m.c(10),{children:t,actions:s,className:a}=i;let l;e[0]!==a?(l=b("flex flex-wrap items-center justify-between gap-3",a),e[0]=a,e[1]=l):l=e[1];let o;e[2]!==t?(o=n.jsx("div",{className:"text-xl font-medium min-w-0",children:t}),e[2]=t,e[3]=o):o=e[3];let r;e[4]!==s?(r=s&&n.jsx("div",{className:"flex items-center gap-2",children:s}),e[4]=s,e[5]=r):r=e[5];let d;return e[6]!==l||e[7]!==o||e[8]!==r?(d=n.jsxs("div",{className:l,children:[o,r]}),e[6]=l,e[7]=o,e[8]=r,e[9]=d):d=e[9],d}function ve(i){const e=m.c(6),{children:t,className:s,maxWidth:a}=i,l=a===void 0?"max-w-[1200px]":a;let o;e[0]!==s||e[1]!==l?(o=b("mx-auto w-full px-4 pt-8 pb-6 md:px-10 md:pt-12 md:pb-10",l,s),e[0]=s,e[1]=l,e[2]=o):o=e[2];let r;return e[3]!==t||e[4]!==o?(r=n.jsx("div",{className:o,children:t}),e[3]=t,e[4]=o,e[5]=r):r=e[5],r}const Oe=Object.assign(be,{Header:Object.assign(xe,{Left:R,Right:A}),Content:he,Title:ge,Body:ve});export{Oe as P,Se as S,ye as a,$e as b,ie as c,ae as d,ee as e,Me as f,Be as g,ze as h,O as i,Ee as j,De as k,ke as l,Te as m,Ce as n,_e as o,Pe as p,Ie as q,le as r,ne as s,M as u};
1
+ import{r as y,e as m,c as b,j as n,cI as W,b_ as V,be as q,cJ as G,b$ as F,cL as J,c0 as X,aY as Y,aX as Z,B as K}from"./index-b_n-uXmh.js";import{u as Q,c as z,b as D,a as E,T as I}from"./tooltip-B-nRvfy-.js";import{i as U}from"./X-BiphajNJ.js";const O=({size:i=24,color:e="currentColor",...t})=>y.createElement("svg",{viewBox:"0 0 24 24",width:i,height:i,stroke:e,strokeWidth:"2",fill:"none",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",...t},y.createElement("path",{d:"M9 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"}));O.displayName="LayoutLeft";function ee(i){const e=m.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(V,{"data-slot":"sheet",...t}),e[2]=t,e[3]=s):s=e[3],s}function te(i){const e=m.c(4);let t;e[0]!==i?({...t}=i,e[0]=i,e[1]=t):t=e[1];let s;return e[2]!==t?(s=n.jsx(F,{"data-slot":"sheet-portal",...t}),e[2]=t,e[3]=s):s=e[3],s}function se(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx(X,{"data-slot":"sheet-overlay",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ae(i){const e=m.c(20);let t,s,a,l,o;e[0]!==i?({className:s,children:t,side:l,hideCloseButton:o,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=o):(t=e[1],s=e[2],a=e[3],l=e[4],o=e[5]);const r=l===void 0?"right":l,d=o===void 0?!1:o;let u;e[6]===Symbol.for("react.memo_cache_sentinel")?(u=n.jsx(se,{}),e[6]=u):u=e[6];const c=r==="right"&&"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm",p=r==="left"&&"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",f=r==="top"&&"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 h-auto border-b",x=r==="bottom"&&"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 h-auto border-t";let g;e[7]!==s||e[8]!==c||e[9]!==p||e[10]!==f||e[11]!==x?(g=b("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-200 data-[state=open]:duration-200",c,p,f,x,s),e[7]=s,e[8]=c,e[9]=p,e[10]=f,e[11]=x,e[12]=g):g=e[12];let h;e[13]!==d?(h=!d&&n.jsxs(J,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none",children:[n.jsx(U,{className:"size-4"}),n.jsx("span",{className:"sr-only",children:"Close"})]}),e[13]=d,e[14]=h):h=e[14];let v;return e[15]!==t||e[16]!==a||e[17]!==g||e[18]!==h?(v=n.jsxs(te,{children:[u,n.jsxs(q,{"data-slot":"sheet-content",className:g,...a,children:[t,h]})]}),e[15]=t,e[16]=a,e[17]=g,e[18]=h,e[19]=v):v=e[19],v}function le(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-1.5 p-4",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sheet-header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ie(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("text-foreground font-semibold",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx(W,{"data-slot":"sheet-title",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ne(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("text-muted-foreground text-sm",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx(G,{"data-slot":"sheet-description",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const oe="15rem",re="18rem",de="4.5rem",H=y.createContext(null);function M(){const i=y.useContext(H);if(!i)throw new Error("useSidebar must be used within a SidebarProvider.");return i}function Se(i){const e=m.c(13),{children:t,defaultOpen:s}=i,a=s===void 0?!1:s,l=Q(),[o,r]=y.useState(!1);let d;e[0]!==l?(d=()=>{l&&r(fe)},e[0]=l,e[1]=d):d=e[1];const u=d,c=a?"expanded":"collapsed";let p;e[2]!==a||e[3]!==l||e[4]!==o||e[5]!==c||e[6]!==u?(p={state:c,open:a,setOpen:ce,isMobile:l,openMobile:o,setOpenMobile:r,toggleSidebar:u},e[2]=a,e[3]=l,e[4]=o,e[5]=c,e[6]=u,e[7]=p):p=e[7];const f=p;let x;e[8]!==t?(x=n.jsx(z,{delayDuration:0,children:t}),e[8]=t,e[9]=x):x=e[9];let g;return e[10]!==f||e[11]!==x?(g=n.jsx(H.Provider,{value:f,children:x}),e[10]=f,e[11]=x,e[12]=g):g=e[12],g}function ce(){}function fe(i){return!i}function ye(i){const e=m.c(14);let t,s,a,l;e[0]!==i?({className:s,style:l,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l):(t=e[1],s=e[2],a=e[3],l=e[4]);let o;e[5]!==l?(o={"--sidebar-width":oe,"--sidebar-width-icon":de,...l},e[5]=l,e[6]=o):o=e[6];const r=o;let d;e[7]!==s?(d=b("group/sidebar-wrapper has-data-[variant=inset]:bg-sidebar flex h-full w-full",s),e[7]=s,e[8]=d):d=e[8];let u;return e[9]!==t||e[10]!==a||e[11]!==r||e[12]!==d?(u=n.jsx("div",{"data-slot":"sidebar-wrapper",style:r,className:d,...a,children:t}),e[9]=t,e[10]=a,e[11]=r,e[12]=d,e[13]=u):u=e[13],u}function Ce(i){const e=m.c(36);let t,s,a,l,o;e[0]!==i?({side:l,variant:o,className:s,children:t,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=o):(t=e[1],s=e[2],a=e[3],l=e[4],o=e[5]);const r=l===void 0?"left":l,d=o===void 0?"sidebar":o,{isMobile:u,state:c,openMobile:p,setOpenMobile:f}=M();if(u){let P;e[6]===Symbol.for("react.memo_cache_sentinel")?(P={"--sidebar-width":re},e[6]=P):P=e[6];let k;e[7]===Symbol.for("react.memo_cache_sentinel")?(k=n.jsxs(le,{className:"sr-only",children:[n.jsx(ie,{children:"Sidebar"}),n.jsx(ne,{children:"Displays the mobile sidebar."})]}),e[7]=k):k=e[7];let $;e[8]!==t?($=n.jsx("div",{className:"flex h-full w-full flex-col",children:t}),e[8]=t,e[9]=$):$=e[9];let _;e[10]!==r||e[11]!==$?(_=n.jsxs(ae,{"data-sidebar":"sidebar","data-slot":"sidebar","data-mobile":"true",className:"bg-sidebar text-sidebar-foreground w-(--sidebar-width) p-0 [&>button]:hidden",style:P,side:r,children:[k,$]}),e[10]=r,e[11]=$,e[12]=_):_=e[12];let T;return e[13]!==p||e[14]!==a||e[15]!==f||e[16]!==_?(T=n.jsx(ee,{open:p,onOpenChange:f,...a,children:_}),e[13]=p,e[14]=a,e[15]=f,e[16]=_,e[17]=T):T=e[17],T}const x=c==="expanded",g=x?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let h;e[18]!==g?(h=b("group/sidebar peer text-sidebar-foreground hidden md:flex flex-col shrink-0 overflow-hidden",g),e[18]=g,e[19]=h):h=e[19];const v=x?void 0:"icon",C=x?"w-(--sidebar-width)":"w-(--sidebar-width-icon)";let N;e[20]!==s||e[21]!==C?(N=b("flex flex-col h-full",C,s),e[20]=s,e[21]=C,e[22]=N):N=e[22];let j;e[23]!==t?(j=n.jsx("div",{"data-sidebar":"sidebar","data-slot":"sidebar-inner",className:"bg-sidebar flex h-full w-full flex-col",children:t}),e[23]=t,e[24]=j):j=e[24];let w;e[25]!==a||e[26]!==N||e[27]!==j?(w=n.jsx("div",{"data-slot":"sidebar-container",className:N,...a,children:j}),e[25]=a,e[26]=N,e[27]=j,e[28]=w):w=e[28];let S;return e[29]!==r||e[30]!==c||e[31]!==h||e[32]!==v||e[33]!==w||e[34]!==d?(S=n.jsx("div",{className:h,"data-state":c,"data-collapsible":v,"data-variant":d,"data-side":r,"data-slot":"sidebar",children:w}),e[29]=r,e[30]=c,e[31]=h,e[32]=v,e[33]=w,e[34]=d,e[35]=S):S=e[35],S}function ue(i){const e=m.c(18);let t,s,a;e[0]!==i?({className:t,onClick:s,...a}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a):(t=e[1],s=e[2],a=e[3]);const{toggleSidebar:l}=M();let o;e[4]!==t?(o=b("size-7",t),e[4]=t,e[5]=o):o=e[5];let r;e[6]!==s||e[7]!==l?(r=x=>{s?.(x),l()},e[6]=s,e[7]=l,e[8]=r):r=e[8];let d,u;e[9]===Symbol.for("react.memo_cache_sentinel")?(d=n.jsx(O,{}),u=n.jsx("span",{className:"sr-only",children:"Toggle Sidebar"}),e[9]=d,e[10]=u):(d=e[9],u=e[10]);let c;e[11]!==a||e[12]!==o||e[13]!==r?(c=n.jsx(E,{asChild:!0,children:n.jsxs(K,{"data-sidebar":"trigger","data-slot":"sidebar-trigger",variant:"ghost",size:"icon",className:o,onClick:r,...a,children:[d,u]})}),e[11]=a,e[12]=o,e[13]=r,e[14]=c):c=e[14];let p;e[15]===Symbol.for("react.memo_cache_sentinel")?(p=n.jsxs(D,{side:"bottom",className:"flex items-center gap-1.5",children:["Collapse sidebar",n.jsx("span",{className:"flex items-center gap-0.5",children:["⌘","B"].map(pe)})]}),e[15]=p):p=e[15];let f;return e[16]!==c?(f=n.jsx(z,{delayDuration:300,children:n.jsxs(I,{children:[c,p]})}),e[16]=c,e[17]=f):f=e[17],f}function pe(i){return n.jsx("kbd",{className:"inline-flex items-center justify-center min-w-5 h-5 px-1 rounded-sm border border-white/20 bg-white/10 text-white/70 text-xs font-mono",children:i},i)}function $e(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("bg-background relative flex w-full flex-1 flex-col min-w-0","md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("main",{"data-slot":"sidebar-inset",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function _e(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-header","data-sidebar":"header",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Pe(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex flex-col gap-2 p-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-footer","data-sidebar":"footer",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ke(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("h-4 m-0! w-full",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-sidebar":"separator",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Te(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex min-h-0 flex-1 flex-col gap-2",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-content","data-sidebar":"content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Me(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("relative flex w-full min-w-0 flex-col px-2 py-2 md:py-0",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-group","data-sidebar":"group",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function Be(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("w-full text-sm overflow-visible",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("div",{"data-slot":"sidebar-group-content","data-sidebar":"group-content",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function ze(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("flex w-full min-w-0 flex-col gap-1 group-data-[state=collapsed]/sidebar:items-center",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("ul",{"data-slot":"sidebar-menu","data-sidebar":"menu",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}function De(i){const e=m.c(8);let t,s;e[0]!==i?({className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s):(t=e[1],s=e[2]);let a;e[3]!==t?(a=b("group/menu-item relative w-full",t),e[3]=t,e[4]=a):a=e[4];let l;return e[5]!==s||e[6]!==a?(l=n.jsx("li",{"data-slot":"sidebar-menu-item","data-sidebar":"menu-item",className:a,...s}),e[5]=s,e[6]=a,e[7]=l):l=e[7],l}const me=Z("peer/menu-button flex w-full items-center gap-2 overflow-hidden rounded-lg py-0 pr-0.5 pl-1.5 text-left text-sm outline-0 outline-sidebar-ring transition-[width,height,padding] focus-visible:outline-2 focus-visible:-outline-offset-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 group-has-data-[sidebar=menu-action]/menu-item:pr-8 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-[active=true]:bg-sidebar-accent data-[active=true]:text-sidebar-accent-foreground data-[state=open]:hover:bg-sidebar-accent data-[state=open]:hover:text-sidebar-accent-foreground [&>span:last-child]:truncate [&>svg]:size-4 [&>svg]:shrink-0 [&_svg]:opacity-60 hover:[&_svg]:opacity-100",{variants:{variant:{default:"hover:bg-sidebar-accent hover:text-sidebar-accent-foreground",outline:"bg-background ring-1 ring-sidebar-border hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:ring-sidebar-accent"},size:{default:"group-data-[state=expanded]/sidebar:h-8 group-data-[state=expanded]/sidebar:px-2 group-data-[state=collapsed]/sidebar:w-full! group-data-[state=collapsed]/sidebar:aspect-square! group-data-[state=collapsed]/sidebar:h-auto! group-data-[state=collapsed]/sidebar:p-0! group-data-[state=collapsed]/sidebar:justify-center text-sm",sm:"h-7 text-xs",lg:"h-12 text-sm p-0!"}},defaultVariants:{variant:"default",size:"default"}});function Ee(i){const e=m.c(28);let t,s,a,l,o,r,d;e[0]!==i?({asChild:a,isActive:l,variant:o,size:r,tooltip:d,className:t,...s}=i,e[0]=i,e[1]=t,e[2]=s,e[3]=a,e[4]=l,e[5]=o,e[6]=r,e[7]=d):(t=e[1],s=e[2],a=e[3],l=e[4],o=e[5],r=e[6],d=e[7]);const u=a===void 0?!1:a,c=l===void 0?!1:l,p=o===void 0?"default":o,f=r===void 0?"default":r,x=u?Y:"button",{isMobile:g}=M();let h;e[8]!==t||e[9]!==f||e[10]!==p?(h=b(me({variant:p,size:f}),t),e[8]=t,e[9]=f,e[10]=p,e[11]=h):h=e[11];let v;e[12]!==x||e[13]!==c||e[14]!==s||e[15]!==f||e[16]!==h?(v=n.jsx(x,{"data-slot":"sidebar-menu-button","data-sidebar":"menu-button","data-size":f,"data-active":c,className:h,...s}),e[12]=x,e[13]=c,e[14]=s,e[15]=f,e[16]=h,e[17]=v):v=e[17];const C=v;if(!d)return C;if(typeof d=="string"){let S;e[18]!==d?(S={children:d},e[18]=d,e[19]=S):S=e[19],d=S}let N;e[20]!==C?(N=n.jsx(E,{asChild:!0,children:C}),e[20]=C,e[21]=N):N=e[21];let j;e[22]!==g||e[23]!==d?(j=n.jsx(D,{side:"right",align:"center",hidden:g,...d}),e[22]=g,e[23]=d,e[24]=j):j=e[24];let w;return e[25]!==N||e[26]!==j?(w=n.jsxs(I,{children:[N,j]}),e[25]=N,e[26]=j,e[27]=w):w=e[27],w}const L=y.createContext(void 0),Ie=L.Provider;function B(i,e){const t=y.Children.toArray(i);for(const s of t)if(y.isValidElement(s)&&s.type===e)return s;return null}function be(i){const e=m.c(5),{children:t,className:s}=i;let a;e[0]!==s?(a=b("flex flex-col h-full w-full bg-background overflow-hidden",s),e[0]=s,e[1]=a):a=e[1];let l;return e[2]!==t||e[3]!==a?(l=n.jsx("div",{className:a,children:t}),e[2]=t,e[3]=a,e[4]=l):l=e[4],l}function xe(i){const e=m.c(17),{children:t,className:s,hideSidebarTrigger:a}=i;let l;e[0]!==t?(l=B(t,R),e[0]=t,e[1]=l):l=e[1];const o=l;let r;e[2]!==t?(r=B(t,A),e[2]=t,e[3]=r):r=e[3];const d=r;let u;e[4]!==s?(u=b("shrink-0 w-full border-b border-border/50 h-11","flex items-center justify-between gap-3 pr-2 pl-2 md:pl-4",s),e[4]=s,e[5]=u):u=e[5];let c;e[6]!==a?(c=!a&&n.jsx(ue,{className:"md:hidden shrink-0"}),e[6]=a,e[7]=c):c=e[7];let p;e[8]!==o||e[9]!==c?(p=n.jsxs("div",{className:"flex items-center gap-1 min-w-0 flex-1",children:[c,o]}),e[8]=o,e[9]=c,e[10]=p):p=e[10];let f;e[11]!==d?(f=n.jsx("div",{className:"flex items-center",children:d}),e[11]=d,e[12]=f):f=e[12];let x;return e[13]!==u||e[14]!==p||e[15]!==f?(x=n.jsxs("div",{className:u,children:[p,f]}),e[13]=u,e[14]=p,e[15]=f,e[16]=x):x=e[16],x}function R(i){const e=m.c(5),{children:t,className:s}=i;let a;e[0]!==s?(a=b("flex items-center gap-2 min-w-0 overflow-hidden",s),e[0]=s,e[1]=a):a=e[1];let l;return e[2]!==t||e[3]!==a?(l=n.jsx("div",{className:a,children:t}),e[2]=t,e[3]=a,e[4]=l):l=e[4],l}function A(i){const e=m.c(5),{children:t,className:s}=i;let a;e[0]!==s?(a=b("flex items-center gap-2 shrink-0 overflow-hidden",s),e[0]=s,e[1]=a):a=e[1];let l;return e[2]!==t||e[3]!==a?(l=n.jsx("div",{className:a,children:t}),e[2]=t,e[3]=a,e[4]=l):l=e[4],l}function he(i){const e=m.c(6),{children:t,className:s}=i,a=y.useContext(L);let l;e[0]!==s||e[1]!==a?(l=b("flex-1 overflow-auto",a,s),e[0]=s,e[1]=a,e[2]=l):l=e[2];let o;return e[3]!==t||e[4]!==l?(o=n.jsx("div",{className:l,children:t}),e[3]=t,e[4]=l,e[5]=o):o=e[5],o}function ge(i){const e=m.c(10),{children:t,actions:s,className:a}=i;let l;e[0]!==a?(l=b("flex flex-wrap items-center justify-between gap-3",a),e[0]=a,e[1]=l):l=e[1];let o;e[2]!==t?(o=n.jsx("div",{className:"text-xl font-medium min-w-0",children:t}),e[2]=t,e[3]=o):o=e[3];let r;e[4]!==s?(r=s&&n.jsx("div",{className:"flex items-center gap-2",children:s}),e[4]=s,e[5]=r):r=e[5];let d;return e[6]!==l||e[7]!==o||e[8]!==r?(d=n.jsxs("div",{className:l,children:[o,r]}),e[6]=l,e[7]=o,e[8]=r,e[9]=d):d=e[9],d}function ve(i){const e=m.c(6),{children:t,className:s,maxWidth:a}=i,l=a===void 0?"max-w-[1200px]":a;let o;e[0]!==s||e[1]!==l?(o=b("mx-auto w-full px-4 pt-8 pb-6 md:px-10 md:pt-12 md:pb-10",l,s),e[0]=s,e[1]=l,e[2]=o):o=e[2];let r;return e[3]!==t||e[4]!==o?(r=n.jsx("div",{className:o,children:t}),e[3]=t,e[4]=o,e[5]=r):r=e[5],r}const Oe=Object.assign(be,{Header:Object.assign(xe,{Left:R,Right:A}),Content:he,Title:ge,Body:ve});export{Oe as P,Se as S,ye as a,$e as b,ie as c,ae as d,ee as e,Me as f,Be as g,ze as h,O as i,Ee as j,De as k,ke as l,Te as m,Ce as n,_e as o,Pe as p,Ie as q,le as r,ne as s,M as u};
@@ -1,4 +1,4 @@
1
- import{cj as ne,e as _,j as o,B as te,l as ln,bc as ze,ck as ms,r as T,s as oe,c as O,g as ps,o as cn,c5 as xs,a7 as hs,a8 as fe,aW as an,c6 as gs,aT as bs,c4 as Ss,c7 as un,b6 as js,cd as ys,ce as vs,ae as ws,cf as Ns,cl as $t,cm as dn,x as ks,y as _s,cn as Cs,co as Is}from"./index-BGvMfUr2.js";import{D as Ts,F as Es,B as $s}from"./index-QpbQL5yY.js";import{a as Fe,i as Os,u as ae}from"./constants-BVU634u9.js";import{b as fn}from"./use-virtual-mcp-BOr32Cw9.js";import{M as Re}from"./monaco-editor-D9GcAVz1.js";import{A as Rs,c as Ms,a as Ls,b as Ps,e as As,R as Ut,d as zs}from"./accordion-zoDibAHc.js";import{B as le}from"./badge-Vn5olYFX.js";import{c as vt,S as wt,d as nt,b as Nt,a as kt}from"./select-CKhnD_dJ.js";import{N as Ws,h as Ds,j as Fs,m as Be,P as Hs,i as Vs,R as Us,c as qs,k as Ks,e as qt,d as Bs,S as st}from"./index-BizlRsAk.js";import{V as Xs}from"./view-mode-toggle-DqaIt4c7.js";import{aa as Js,ab as Gs,i as Qs,a2 as mn,ac as Ys,Q as Zs,r as eo,ad as pn,Z as to,V as xn,ae as no,af as so,T as bt,ag as oo}from"./agent-icon-B5EEcofO.js";import{i as hn}from"./Play-Ch3KWC7Z.js";import{b as ro,a as io,V as Qe}from"./layout-DtEpOSua.js";import{c as gn,T as bn,a as Sn,b as jn}from"./tooltip-8sj0FPxK.js";import{u as lo,a as co}from"./use-connection-EBpfvjCE.js";import{u as Ot,d as Rt,b as yn}from"./use-mcp-tools-yGAchpt7.js";import{c as ao,d as uo,e as fo,D as mo,a as po,b as xo}from"./dialog-Cc5-s5cq.js";import"./index-CxcuSo6g.js";import{S as ho}from"./index-DWnDHmtK.js";import{D as vn,a as wn,b as Nn,c as Ye}from"./dropdown-menu-BdezCavF.js";import{s as go}from"./Plus-gLdNtuBE.js";import{b as kn}from"./Tool01-D1xeep7h.js";import{i as He}from"./ChevronDown-BMTA9_Ap.js";import{s as Mt}from"./XClose-C1T9ODT_.js";import{I as Lt}from"./integration-icon-Btl0P6Zi.js";import{a as bo,S as So}from"./scroll-area-KyXayDS_.js";import"./index-DRSFVCQG.js";import{i as _n}from"./X-fvjwb2RC.js";import{u as Cn,a as jo}from"./use-collections-DbJUoPI1.js";import{E as In}from"./empty-state-B-SDOSco.js";import{c as yo}from"./create-sse-subscription-CxkOgzKf.js";import{I as Kt}from"./input-r-FVR1hH.js";const Tn=ne("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const En=ne("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const ot=ne("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const rt=ne("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const vo=ne("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const $n=ne("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const wo=ne("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const On=ne("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const Rn=ne("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const Mn=ne("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const No=ne("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const Ln=ne("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const Pn=ne("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const ko=ne("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const An=ne("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);function _o(t){const e=_.c(15),{onSave:n,onUndo:s,isDirty:i,isSaving:r,saveLabel:l,undoLabel:c}=t,a=l===void 0?"Save":l,u=c===void 0?"Undo":c;if(!i)return null;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(Js,{size:14}),e[0]=d):d=e[0];let f;e[1]!==r||e[2]!==s||e[3]!==u?(f=o.jsxs(te,{variant:"outline",size:"sm",onClick:s,disabled:r,"aria-label":u,children:[d,u]}),e[1]=r,e[2]=s,e[3]=u,e[4]=f):f=e[4];let m;e[5]!==r?(m=r?o.jsx(ln,{size:14,className:"animate-spin"}):o.jsx(Gs,{size:14}),e[5]=r,e[6]=m):m=e[6];let x;e[7]!==r||e[8]!==n||e[9]!==a||e[10]!==m?(x=o.jsxs(te,{variant:"default",size:"sm",onClick:n,disabled:r,"aria-label":a,children:[m,a]}),e[7]=r,e[8]=n,e[9]=a,e[10]=m,e[11]=x):x=e[11];let p;return e[12]!==f||e[13]!==x?(p=o.jsxs(o.Fragment,{children:[f,x]}),e[12]=f,e[13]=x,e[14]=p):p=e[14],p}const Bt=t=>{let e;const n=new Set,s=(u,d)=>{const f=typeof u=="function"?u(e):u;if(!Object.is(f,e)){const m=e;e=d??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(x=>x(e,m))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:u=>(n.add(u),()=>n.delete(u))},a=e=t(s,i,c);return c},Pt=(t=>t?Bt(t):Bt),Co=t=>t;function _t(t,e=Co){const n=ze.useSyncExternalStore(t.subscribe,ze.useCallback(()=>e(t.getState()),[t,e]),ze.useCallback(()=>e(t.getInitialState()),[t,e]));return ze.useDebugValue(n),n}const Io=t=>{const e=Pt(t),n=s=>_t(e,s);return Object.assign(n,e),n},To=(t=>Io);function zn(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const Ct=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return Ct(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return Ct(s)(n)}}}},Eo=(t,e)=>(n,s,i)=>{let r={storage:zn(()=>window.localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,u=new Set;let d=r.storage;if(!d)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return d.setItem(r.name,{state:g,version:r.version})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const x=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>x;let p;const h=()=>{var g,b;if(!d)return;const j=++c;l=!1,a.forEach(y=>{var S;return y((S=s())!=null?S:x)});const v=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:x))||void 0;return Ct(d.getItem.bind(d))(r.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==r.version){if(r.migrate){const S=r.migrate(y.state,y.version);return S instanceof Promise?S.then(w=>[!0,w]):[!0,S]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var S;if(j!==c)return;const[w,N]=y;if(p=r.merge(N,(S=s())!=null?S:x),n(p,!0),w)return f()}).then(()=>{j===c&&(v?.(s(),void 0),p=s(),l=!0,u.forEach(y=>y(p)))}).catch(y=>{j===c&&v?.(void 0,y)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(d=g.storage)},clearStorage:()=>{d?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(u.add(g),()=>{u.delete(g)})},r.skipHydration||h(),p||x},Wn=Eo,{useSyncExternalStoreWithSelector:$o}=ms,Oo=t=>t;function Ro(t,e=Oo,n){const s=$o(t.subscribe,t.getState,t.getInitialState,e,n);return ze.useDebugValue(s),s}const Xt=t=>Symbol.iterator in t,Jt=t=>"entries"in t,Gt=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},Mo=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function Lo(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:Xt(t)&&Xt(e)?Jt(t)&&Jt(e)?Gt(t,e):Mo(t,e):Gt({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Dn(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
1
+ import{cj as ne,e as _,j as o,B as te,l as ln,bc as ze,ck as ms,r as T,s as oe,c as O,g as ps,o as cn,c5 as xs,a7 as hs,a8 as fe,aW as an,c6 as gs,aT as bs,c4 as Ss,c7 as un,b6 as js,cd as ys,ce as vs,ae as ws,cf as Ns,cl as $t,cm as dn,x as ks,y as _s,cn as Cs,co as Is}from"./index-b_n-uXmh.js";import{D as Ts,F as Es,B as $s}from"./index-DCOURowK.js";import{a as Fe,i as Os,u as ae}from"./constants-Cj0U39_n.js";import{b as fn}from"./use-virtual-mcp-Qy5dDA1Q.js";import{M as Re}from"./monaco-editor-BY6pRUNM.js";import{A as Rs,c as Ms,a as Ls,b as Ps,e as As,R as Ut,d as zs}from"./accordion-D3c87Mh0.js";import{B as le}from"./badge-CRHmlYav.js";import{c as vt,S as wt,d as nt,b as Nt,a as kt}from"./select-CaDZpVbI.js";import{N as Ws,h as Ds,j as Fs,m as Be,P as Hs,i as Vs,R as Us,c as qs,k as Ks,e as qt,d as Bs,S as st}from"./index-pdnGjAa-.js";import{V as Xs}from"./view-mode-toggle-C5L447if.js";import{aa as Js,ab as Gs,i as Qs,a2 as mn,ac as Ys,Q as Zs,r as eo,ad as pn,Z as to,V as xn,ae as no,af as so,T as bt,ag as oo}from"./agent-icon-Be_PnRh0.js";import{i as hn}from"./Play-O7ldNAxa.js";import{b as ro,a as io,V as Qe}from"./layout-BAy6nHY2.js";import{c as gn,T as bn,a as Sn,b as jn}from"./tooltip-B-nRvfy-.js";import{u as lo,a as co}from"./use-connection-DuXPSqwF.js";import{u as Ot,d as Rt,b as yn}from"./use-mcp-tools-BkDSNv3W.js";import{c as ao,d as uo,e as fo,D as mo,a as po,b as xo}from"./dialog-BdVY7mqq.js";import"./index-ClNUcJ8s.js";import{S as ho}from"./index-ZmvI6xf3.js";import{D as vn,a as wn,b as Nn,c as Ye}from"./dropdown-menu-Bq-aRZ_r.js";import{s as go}from"./Plus-Bihyskqy.js";import{b as kn}from"./Tool01-Dqyo2VjJ.js";import{i as He}from"./ChevronDown-ByP-e484.js";import{s as Mt}from"./XClose-lRlzG-cb.js";import{I as Lt}from"./integration-icon-LX1nChXa.js";import{a as bo,S as So}from"./scroll-area-18YOEnqD.js";import"./index-y9YjpvN-.js";import{i as _n}from"./X-BiphajNJ.js";import{u as Cn,a as jo}from"./use-collections-CqIGWKSp.js";import{E as In}from"./empty-state-Cw5GxS3i.js";import{c as yo}from"./create-sse-subscription-CxkOgzKf.js";import{I as Kt}from"./input-C80VzPpQ.js";const Tn=ne("Box",[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]]);const En=ne("Braces",[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]]);const ot=ne("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);const rt=ne("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);const vo=ne("Clock",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["polyline",{points:"12 6 12 12 16 14",key:"68esgv"}]]);const $n=ne("Code",[["polyline",{points:"16 18 22 12 16 6",key:"z7tu5w"}],["polyline",{points:"8 6 2 12 8 18",key:"1eg1df"}]]);const wo=ne("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);const On=ne("FileText",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);const Rn=ne("File",[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]]);const Mn=ne("Hash",[["line",{x1:"4",x2:"20",y1:"9",y2:"9",key:"4lhtct"}],["line",{x1:"4",x2:"20",y1:"15",y2:"15",key:"vyu0kd"}],["line",{x1:"10",x2:"8",y1:"3",y2:"21",key:"1ggp8o"}],["line",{x1:"16",x2:"14",y1:"3",y2:"21",key:"weycgp"}]]);const No=ne("OctagonAlert",[["path",{d:"M12 16h.01",key:"1drbdi"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M15.312 2a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z",key:"1fd625"}]]);const Ln=ne("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);const Pn=ne("SquareCheckBig",[["path",{d:"M21 10.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h12.5",key:"1uzm8b"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]]);const ko=ne("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]);const An=ne("Type",[["polyline",{points:"4 7 4 4 20 4 20 7",key:"1nosan"}],["line",{x1:"9",x2:"15",y1:"20",y2:"20",key:"swin9y"}],["line",{x1:"12",x2:"12",y1:"4",y2:"20",key:"1tx1rr"}]]);function _o(t){const e=_.c(15),{onSave:n,onUndo:s,isDirty:i,isSaving:r,saveLabel:l,undoLabel:c}=t,a=l===void 0?"Save":l,u=c===void 0?"Undo":c;if(!i)return null;let d;e[0]===Symbol.for("react.memo_cache_sentinel")?(d=o.jsx(Js,{size:14}),e[0]=d):d=e[0];let f;e[1]!==r||e[2]!==s||e[3]!==u?(f=o.jsxs(te,{variant:"outline",size:"sm",onClick:s,disabled:r,"aria-label":u,children:[d,u]}),e[1]=r,e[2]=s,e[3]=u,e[4]=f):f=e[4];let m;e[5]!==r?(m=r?o.jsx(ln,{size:14,className:"animate-spin"}):o.jsx(Gs,{size:14}),e[5]=r,e[6]=m):m=e[6];let x;e[7]!==r||e[8]!==n||e[9]!==a||e[10]!==m?(x=o.jsxs(te,{variant:"default",size:"sm",onClick:n,disabled:r,"aria-label":a,children:[m,a]}),e[7]=r,e[8]=n,e[9]=a,e[10]=m,e[11]=x):x=e[11];let p;return e[12]!==f||e[13]!==x?(p=o.jsxs(o.Fragment,{children:[f,x]}),e[12]=f,e[13]=x,e[14]=p):p=e[14],p}const Bt=t=>{let e;const n=new Set,s=(u,d)=>{const f=typeof u=="function"?u(e):u;if(!Object.is(f,e)){const m=e;e=d??(typeof f!="object"||f===null)?f:Object.assign({},e,f),n.forEach(x=>x(e,m))}},i=()=>e,c={setState:s,getState:i,getInitialState:()=>a,subscribe:u=>(n.add(u),()=>n.delete(u))},a=e=t(s,i,c);return c},Pt=(t=>t?Bt(t):Bt),Co=t=>t;function _t(t,e=Co){const n=ze.useSyncExternalStore(t.subscribe,ze.useCallback(()=>e(t.getState()),[t,e]),ze.useCallback(()=>e(t.getInitialState()),[t,e]));return ze.useDebugValue(n),n}const Io=t=>{const e=Pt(t),n=s=>_t(e,s);return Object.assign(n,e),n},To=(t=>Io);function zn(t,e){let n;try{n=t()}catch{return}return{getItem:i=>{var r;const l=a=>a===null?null:JSON.parse(a,void 0),c=(r=n.getItem(i))!=null?r:null;return c instanceof Promise?c.then(l):l(c)},setItem:(i,r)=>n.setItem(i,JSON.stringify(r,void 0)),removeItem:i=>n.removeItem(i)}}const Ct=t=>e=>{try{const n=t(e);return n instanceof Promise?n:{then(s){return Ct(s)(n)},catch(s){return this}}}catch(n){return{then(s){return this},catch(s){return Ct(s)(n)}}}},Eo=(t,e)=>(n,s,i)=>{let r={storage:zn(()=>window.localStorage),partialize:g=>g,version:0,merge:(g,b)=>({...b,...g}),...e},l=!1,c=0;const a=new Set,u=new Set;let d=r.storage;if(!d)return t((...g)=>{console.warn(`[zustand persist middleware] Unable to update item '${r.name}', the given storage is currently unavailable.`),n(...g)},s,i);const f=()=>{const g=r.partialize({...s()});return d.setItem(r.name,{state:g,version:r.version})},m=i.setState;i.setState=(g,b)=>(m(g,b),f());const x=t((...g)=>(n(...g),f()),s,i);i.getInitialState=()=>x;let p;const h=()=>{var g,b;if(!d)return;const j=++c;l=!1,a.forEach(y=>{var S;return y((S=s())!=null?S:x)});const v=((b=r.onRehydrateStorage)==null?void 0:b.call(r,(g=s())!=null?g:x))||void 0;return Ct(d.getItem.bind(d))(r.name).then(y=>{if(y)if(typeof y.version=="number"&&y.version!==r.version){if(r.migrate){const S=r.migrate(y.state,y.version);return S instanceof Promise?S.then(w=>[!0,w]):[!0,S]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,y.state];return[!1,void 0]}).then(y=>{var S;if(j!==c)return;const[w,N]=y;if(p=r.merge(N,(S=s())!=null?S:x),n(p,!0),w)return f()}).then(()=>{j===c&&(v?.(s(),void 0),p=s(),l=!0,u.forEach(y=>y(p)))}).catch(y=>{j===c&&v?.(void 0,y)})};return i.persist={setOptions:g=>{r={...r,...g},g.storage&&(d=g.storage)},clearStorage:()=>{d?.removeItem(r.name)},getOptions:()=>r,rehydrate:()=>h(),hasHydrated:()=>l,onHydrate:g=>(a.add(g),()=>{a.delete(g)}),onFinishHydration:g=>(u.add(g),()=>{u.delete(g)})},r.skipHydration||h(),p||x},Wn=Eo,{useSyncExternalStoreWithSelector:$o}=ms,Oo=t=>t;function Ro(t,e=Oo,n){const s=$o(t.subscribe,t.getState,t.getInitialState,e,n);return ze.useDebugValue(s),s}const Xt=t=>Symbol.iterator in t,Jt=t=>"entries"in t,Gt=(t,e)=>{const n=t instanceof Map?t:new Map(t.entries()),s=e instanceof Map?e:new Map(e.entries());if(n.size!==s.size)return!1;for(const[i,r]of n)if(!s.has(i)||!Object.is(r,s.get(i)))return!1;return!0},Mo=(t,e)=>{const n=t[Symbol.iterator](),s=e[Symbol.iterator]();let i=n.next(),r=s.next();for(;!i.done&&!r.done;){if(!Object.is(i.value,r.value))return!1;i=n.next(),r=s.next()}return!!i.done&&!!r.done};function Lo(t,e){return Object.is(t,e)?!0:typeof t!="object"||t===null||typeof e!="object"||e===null||Object.getPrototypeOf(t)!==Object.getPrototypeOf(e)?!1:Xt(t)&&Xt(e)?Jt(t)&&Jt(e)?Gt(t,e):Mo(t,e):Gt({entries:()=>Object.entries(t)},{entries:()=>Object.entries(e)})}function Dn(t,e="Output"){if(!t)return`interface ${e} {}`;function n(r){if(!r||typeof r!="object")return"unknown";const l=r.type;if(Array.isArray(l))return l.map(c=>s(c)).join(" | ");switch(l){case"string":return r.enum?r.enum.map(c=>`"${c}"`).join(" | "):"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";case"array":{const c=r.items;return c?`${n(c)}[]`:"unknown[]"}case"object":return i(r);default:return r.anyOf?r.anyOf.map(n).join(" | "):r.oneOf?r.oneOf.map(n).join(" | "):r.allOf?r.allOf.map(n).join(" & "):"unknown"}}function s(r){switch(r){case"string":return"string";case"number":case"integer":return"number";case"boolean":return"boolean";case"null":return"null";default:return"unknown"}}function i(r){const l=r.properties;if(!l)return"Record<string, unknown>";const c=new Set(r.required||[]);return`{
2
2
  ${Object.entries(l).map(([u,d])=>{const f=c.has(u)?"":"?";return`${d.description?` /** ${d.description} */
3
3
  `:""} ${u}${f}: ${n(d)};`}).join(`
4
4
  `)}
@@ -1,4 +1,4 @@
1
- import{s as ce,b as Ut,u as di,z as vn,C as wn,j as n,B as H,x as se,r as w,o as Ot,f as ct,l as He,G as en,F as tn,t as U,K as we,e as L,Q as ui,R as Vi,c as O,a as jn,g as mi,d as fi,H as dt,J as Rt,E as pi,P as An,ap as hi,n as Sn,y as us,aq as gi,ar as Vs,as as xi,at as De,au as nn,ao as bi,av as yi,aw as sn,ax as vi,ay as wi,az as ji,aA as Ai,w as Si,aB as ki,aC as Ni,aD as _i,aE as Ci,aF as Ln}from"./index-BGvMfUr2.js";import{b as Me,a as Le,c as Fe,d as Ue,e as $t,D as ms}from"./dialog-Cc5-s5cq.js";import{S as Ii}from"./switch-DIPW9oSx.js";import{I as Re}from"./input-r-FVR1hH.js";import{b as kn,u as Ri}from"./use-connection-EBpfvjCE.js";import{S as jt,u as ze,W as fs,g as Nn,i as Fn,c as Ti}from"./constants-BVU634u9.js";import{a as Pi,u as Ei}from"./lean-canvas-recruit-modal-70F-bJzI.js";import{a as _n}from"./use-navigate-to-agent-XL440g7Q.js";import{a as Di,A as Cn,M as Mi,N as ps,O as hs,o as Li,P as Fi,Q as Ui,b as Oi,R as $i,I as gs}from"./agent-icon-B5EEcofO.js";import{t as zi,b as zt,u as In,a as Bi,g as qi,h as Ki,w as Yi,A as Wi,i as Gi,j as Qi}from"./chat-context-DZ4ItXeY.js";import{b as Bt,a as qt,c as Kt,D as Yt,d as Hi,e as Ji,f as Xi}from"./drawer-CYKJkhyy.js";import{u as Wt,c as mn,a as xs,b as bs,T as ys}from"./tooltip-8sj0FPxK.js";import{I as vs}from"./integration-icon-Btl0P6Zi.js";import{a as ws,b as Zi,u as er}from"./use-virtual-mcp-BOr32Cw9.js";import{u as tr}from"./use-tasks-BSCdum36.js";import{r as nr,i as sr}from"./shell-layout-BTN4hGpk.js";import{j as Gt,k as We,l as ir,s as Rn,t as rr,m as or,n as ar,o as lr,q as bt,u as cr,v as dr,c as ur,S as Vr,w as mr,x as Un}from"./pair-TlV_Y8fY.js";import{S as Tt,u as Qt,P as fn,a as fr,b as pr,c as hr,E as gr,i as xr,d as br}from"./index-BizlRsAk.js";import{C as js}from"./collection-search-dr2VH0_A.js";import{u as yr,g as Tn,a as vr,c as wr,l as Pt}from"./tabs-Cnic4mBc.js";import{F as ue,b as Ve,c as Ie,d as me,f as fe,a as yt}from"./form-BlgCJwww.js";import{c as Ee,e as rn,f as on,D as As,a as Ss,b as ks,d as jr}from"./dropdown-menu-BdezCavF.js";import{s as Ar,i as Sr}from"./XClose-C1T9ODT_.js";import{c as Ns}from"./ZapSquare-B03aoE62.js";import{i as Xe,t as On}from"./ChevronDown-BMTA9_Ap.js";import{s as lt}from"./Star01-DInOTW7T.js";import{a as pn,t as kr}from"./Tool01-D1xeep7h.js";import{i as _s}from"./Lock01-Ds-YEZnN.js";import{s as Cs}from"./Plus-gLdNtuBE.js";import{f as Nr,d as Is,t as _r,g as Cr,b as Ir}from"./XCircle-CVED_3Ss.js";import{i as pt}from"./X-fvjwb2RC.js";import{i as Rs}from"./AlertCircle-BFJK99tM.js";import{S as Ts,a as Ps,b as Es,c as Ds,d as ot}from"./select-CKhnD_dJ.js";import{i as Rr}from"./RefreshCcw01-DKf5Q7r6.js";import{T as Ms,a as Et}from"./toggle-group-Bw-pO6dq.js";import{u as Tr,a as Pr}from"./use-ai-providers-TD5f5keD.js";import{m as Ht,g as Er,i as Dr,a as Ls,M as Mr,N as Lr}from"./select-model-DSERjqbn.js";import{S as Fr}from"./index-DWnDHmtK.js";import{r as Fs,l as xt}from"./types-CPAcvDGA.js";import{p as Ur,q as $n}from"./question-004-sINsf4GQ.js";import{g as zn}from"./ai-providers-logos-DD3qZ33J.js";import{g as Or}from"./connection-slug-eyAPH6o3.js";import{u as Us,a as Os,g as $r,C as an}from"./connection-card-DHMMRnIO.js";import{C as zr}from"./collection-tabs-BhSzOngN.js";import{g as Br}from"./constants-DhipgDPU.js";import{T as qr}from"./textarea-DWnLf30W.js";import{n as Ct}from"./Container-CIDvyJX8.js";import{c as Kr,i as Nt,a as Bn,E as Yr,p as Wr,b as Gr,d as Qr}from"./connection-form-helpers-CSnwVczG.js";import{u as qn}from"./use-infinite-scroll-Blb-Zkmq.js";import{u as Hr}from"./useSuspenseInfiniteQuery-hnE5tAGb.js";import{g as Jr,e as Xr,a as Zr}from"./extract-connection-data-CGFCZBB1.js";import{B as Kn}from"./badge-Vn5olYFX.js";import{i as eo}from"./ChevronRight-QeeRSp8z.js";function to({open:t,onOpenChange:e,onCreated:s}){const{org:i}=ce(),{data:r}=Ut.useSession(),{stdioEnabled:o}=di(),a=Wt(),d=kn(),l=Us(),V=Os(l,"").items,c=vn({resolver:wn(Kr),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),m=c.watch("ui_type"),p=c.watch("connection_url"),x=c.watch("npx_package"),g=Nt({uiType:m,connectionUrl:p??"",npxPackage:x??""})??Bn({uiType:m,connectionUrl:p??"",registryItems:V}),f=S=>{const v=S.trim();if(!v)return;const j=!!c.formState.dirtyFields.title,E=!!c.formState.dirtyFields.description,D=!!c.formState.dirtyFields.env_vars,I=k=>{if(k&&(!j&&!c.getValues("title").trim()&&k.title&&c.setValue("title",k.title,{shouldDirty:!1}),!E&&!(c.getValues("description")??"").trim()&&k.description&&c.setValue("description",k.description,{shouldDirty:!1}),!D&&k.envVarKeys?.length)){const _=c.getValues("env_vars")??[],R=new Set(_.map(P=>P.key)),M=k.envVarKeys.filter(P=>!R.has(P));M.length>0&&c.setValue("env_vars",[..._,...M.map(P=>({key:P,value:""}))],{shouldDirty:!0})}},T=Wr(v);if(T&&o){c.setValue("ui_type","NPX",{shouldDirty:!0}),c.setValue("npx_package",T.packageName,{shouldDirty:!0}),c.setValue("connection_url","",{shouldDirty:!0}),c.setValue("connection_token",null,{shouldDirty:!0}),I(Nt({uiType:"NPX",npxPackage:T.packageName}));return}if(v.startsWith("http://")||v.startsWith("https://")){const k=m==="HTTP"||m==="SSE"||m==="Websocket"?m:"HTTP";c.setValue("ui_type",k,{shouldDirty:!0}),c.setValue("connection_url",v,{shouldDirty:!0}),I(Nt({uiType:k,connectionUrl:v})??Bn({uiType:k,connectionUrl:v,registryItems:V}));return}m==="NPX"&&I(Nt({uiType:"NPX",npxPackage:v}))},b=S=>{S||c.reset(),e(S)},h=async S=>{let v,j=null,E=null,D=null;S.ui_type==="NPX"?(v="STDIO",j="",D=Gr(S.npx_package||"",S.env_vars||[])):S.ui_type==="STDIO"?(v="STDIO",j="",D=Qr(S.stdio_command||"",S.stdio_args||"",S.stdio_cwd,S.env_vars||[])):(v=S.ui_type,j=S.connection_url||"",E=S.connection_token||null);const I=Br("conn");try{await d.create.mutateAsync({id:I,title:S.title,description:S.description||null,connection_type:v,connection_url:j,connection_token:E,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:r?.user?.id||"system",organization_id:i.id,icon:S.icon??null,app_name:null,app_id:null,connection_headers:D,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),c.reset(),e(!1),s?.(I)}catch{se.error("Failed to create connection")}},y="Create Connection",A="Create a custom connection in your organization. Fill in the details below.",N=c.formState.isSubmitting?"Saving...":"Create Connection",C=n.jsxs("div",{className:"grid gap-4",children:[n.jsx(ue,{control:c.control,name:"ui_type",render:({field:S})=>n.jsxs(Ve,{children:[n.jsx(Ie,{children:"Type *"}),n.jsxs(Ts,{value:S.value,onValueChange:S.onChange,children:[n.jsx(me,{children:n.jsx(Ps,{children:n.jsx(Es,{})})}),n.jsxs(Ds,{children:[n.jsx(ot,{value:"HTTP",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(lt,{className:"w-4 h-4"}),"HTTP"]})}),n.jsx(ot,{value:"SSE",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(lt,{className:"w-4 h-4"}),"SSE"]})}),n.jsx(ot,{value:"Websocket",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(lt,{className:"w-4 h-4"}),"Websocket"]})}),o&&n.jsxs(n.Fragment,{children:[n.jsx(ot,{value:"NPX",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Ct,{className:"w-4 h-4"}),"NPX Package"]})}),n.jsx(ot,{value:"STDIO",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Di,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),n.jsx(fe,{})]})}),m==="NPX"&&n.jsx(ue,{control:c.control,name:"npx_package",render:({field:S})=>n.jsxs(Ve,{children:[n.jsx(Ie,{children:"NPM Package *"}),n.jsx(me,{children:n.jsx(Re,{placeholder:"@perplexity-ai/mcp-server",...S,value:S.value??"",onPaste:v=>{const j=v.clipboardData.getData("text");j&&(v.preventDefault(),c.setValue("npx_package",j.trim(),{shouldDirty:!0}),f(j))},onBlur:v=>{f(v.target.value),S.onBlur()}})}),n.jsx(fe,{})]})}),m==="STDIO"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[n.jsx(ue,{control:c.control,name:"stdio_command",render:({field:S})=>n.jsxs(Ve,{children:[n.jsx(Ie,{children:"Command *"}),n.jsx(me,{children:n.jsx(Re,{placeholder:"node, bun, python...",...S,value:S.value??""})}),n.jsx(fe,{})]})}),n.jsx(ue,{control:c.control,name:"stdio_args",render:({field:S})=>n.jsxs(Ve,{children:[n.jsx(Ie,{children:"Arguments"}),n.jsx(me,{children:n.jsx(Re,{placeholder:"arg1 arg2 --flag value",...S,value:S.value??""})}),n.jsx(fe,{})]})})]}),n.jsx(ue,{control:c.control,name:"stdio_cwd",render:({field:S})=>n.jsxs(Ve,{children:[n.jsx(Ie,{children:"Working Directory"}),n.jsx(me,{children:n.jsx(Re,{placeholder:"/path/to/project (optional)",...S,value:S.value??""})}),n.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),n.jsx(fe,{})]})})]}),(m==="NPX"||m==="STDIO")&&n.jsx(ue,{control:c.control,name:"env_vars",render:({field:S})=>n.jsxs(Ve,{children:[n.jsx(Ie,{children:"Environment Variables"}),n.jsx(me,{children:n.jsx(Yr,{value:S.value??[],onChange:S.onChange})}),n.jsx(fe,{})]})}),m!=="NPX"&&m!=="STDIO"&&n.jsxs(n.Fragment,{children:[n.jsx(ue,{control:c.control,name:"connection_url",render:({field:S})=>n.jsxs(Ve,{children:[n.jsx(Ie,{children:"URL *"}),n.jsx(me,{children:n.jsx(Re,{placeholder:"https://example.com/mcp",...S,value:S.value??"",onPaste:v=>{const j=v.clipboardData.getData("text");j&&(v.preventDefault(),c.setValue("connection_url",j.trim(),{shouldDirty:!0}),f(j))},onBlur:v=>{f(v.target.value),S.onBlur()}})}),n.jsx(fe,{})]})}),n.jsx(ue,{control:c.control,name:"connection_token",render:({field:S})=>n.jsxs(Ve,{children:[n.jsx(Ie,{children:g?.token?.label??"Token (optional)"}),n.jsx(me,{children:n.jsx(Re,{type:"password",placeholder:g?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...S,value:S.value??""})}),g?.token?.helperText&&n.jsxs("p",{className:"text-xs text-muted-foreground",children:[g.token.helperText,g.id==="github"&&n.jsxs(n.Fragment,{children:[" ","·"," ",n.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),n.jsx(fe,{})]})})]}),n.jsx(ue,{control:c.control,name:"title",render:({field:S})=>n.jsxs(Ve,{children:[n.jsx(Ie,{children:"Name *"}),n.jsx(me,{children:n.jsx(Re,{placeholder:"My Connection",...S})}),n.jsx(fe,{})]})}),n.jsx(ue,{control:c.control,name:"description",render:({field:S})=>n.jsxs(Ve,{children:[n.jsx(Ie,{children:"Description"}),n.jsx(me,{children:n.jsx(qr,{placeholder:"A brief description of this connection",rows:3,...S,value:S.value??""})}),n.jsx(fe,{})]})})]});return a?n.jsx(Bt,{open:t,onOpenChange:b,children:n.jsxs(qt,{className:"max-h-[90vh]",children:[n.jsx(Kt,{className:"pb-2",children:n.jsxs("div",{className:"flex items-start justify-between gap-4",children:[n.jsxs("div",{className:"flex-1 text-left",children:[n.jsx(Yt,{children:y}),n.jsx(Hi,{className:"mt-1",children:A})]}),n.jsx(Ji,{asChild:!0,children:n.jsx(H,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:n.jsx(Ar,{size:16})})})]})}),n.jsx(yt,{...c,children:n.jsxs("form",{onSubmit:c.handleSubmit(h),children:[n.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:C}),n.jsx(Xi,{children:n.jsx(H,{type:"submit",disabled:c.formState.isSubmitting,className:"w-full",children:N})})]})})]})}):n.jsx(Me,{open:t,onOpenChange:b,children:n.jsxs(Le,{className:"sm:max-w-[525px]",children:[n.jsxs(Fe,{children:[n.jsx(Ue,{children:y}),n.jsx($t,{children:A})]}),n.jsx(yt,{...c,children:n.jsxs("form",{onSubmit:c.handleSubmit(h),children:[n.jsx("div",{className:"py-4",children:C}),n.jsxs(ms,{children:[n.jsx(H,{type:"button",variant:"outline",onClick:()=>b(!1),children:"Cancel"}),n.jsx(H,{type:"submit",disabled:c.formState.isSubmitting,className:"min-w-40",children:N})]})]})})]})})}function no(t){const e=L.c(80),{mode:s,agentId:i,addedConnectionIds:r,onAdd:o,onCloneAndAdd:a,onConnectAndAdd:d,connectingItemId:l,search:u,onCreateConnection:V,onBrowseNavigate:c,defaultTab:m}=t,p=s===void 0?"add":s,x=m===void 0?"connected":m,{org:g}=ce(),f=w.useDeferredValue(u),b=u!==f;let h;e[0]!==f?(h=f.toLowerCase(),e[0]=f,e[1]=h):h=e[1];const y=h;let A;e[2]!==x?(A=B=>B??x,e[2]=x,e[3]=A):A=e[3];const[N,C]=ui(Vi.connectionsTab(g.slug)+(x==="all"?":home-modal":":agent-modal"),A);let S;e[4]!==N||e[5]!==C?(S=B=>{B!==N&&U("connections_dialog_tab_changed",{to_tab:B}),C(B)},e[4]=N,e[5]=C,e[6]=S):S=e[6];const v=S;let j;e[7]!==g.id||e[8]!==g.slug?(j={connectionId:jt,orgId:g.id,orgSlug:g.slug},e[7]=g.id,e[8]=g.slug,e[9]=j):j=e[9];const E=ze(j);let D,I,T;if(e[10]!==E||e[11]!==f||e[12]!==g.id){T=f?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:f.trim()},{field:["description"],operator:"contains",value:f.trim()}]}:void 0;const B={...T&&{where:T},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},ie=JSON.stringify(B);I=Hr,D=we.collectionListInfinite(E,g.id,"","CONNECTIONS",ie),e[10]=E,e[11]=f,e[12]=g.id,e[13]=D,e[14]=I,e[15]=T}else D=e[13],I=e[14],T=e[15];let k;e[16]!==E||e[17]!==T?(k=async B=>{const{pageParam:ie}=B,_e=ie===void 0?0:ie;return(await E.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...T&&{where:T},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:_e}})).structuredContent},e[16]=E,e[17]=T,e[18]=k):k=e[18];let _;e[19]!==D||e[20]!==k?(_={queryKey:D,queryFn:k,initialPageParam:0,getNextPageParam:lo,staleTime:3e4},e[19]=D,e[20]=k,e[21]=_):_=e[21];const{data:R,fetchNextPage:M,hasNextPage:P,isFetchingNextPage:F}=I(_),$=R?.pages.flatMap(ao)??[],q=$r($),Y=new Set($.filter(oo).map(ro)),X=Us(),J=Os(X,f),G=qn(J.loadMore,J.hasMore,J.isLoadingMore),Z=qn(M,P??!1,F),Q=N==="all"||!!y,W=Q?J.items.filter(B=>{const ie=Jr(B);return!(ie&&Y.has(ie))}):[],te=W.filter(io),ee=W.filter(so);let ne;e[22]!==r?(ne=B=>B.some(ie=>r.has(ie.id)),e[22]=r,e[23]=ne):ne=e[23];const ae=ne;let re;e[24]!==r||e[25]!==i||e[26]!==l||e[27]!==ae||e[28]!==p||e[29]!==o||e[30]!==c||e[31]!==a?(re=(B,ie,_e,Ge,be)=>{const et=ae(be),$e=be.find(ve=>!r.has(ve.id)),Ce=be[0];if(p==="browse"){const ve=Or(Ce);return n.jsx(an,{connection:{title:ie,icon:_e,description:be.length>1?`${be.length} instances`:Ge??void 0},fallbackIcon:n.jsx(Ct,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs(Kn,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[n.jsx(Xe,{size:11})," Connected"]}),onClick:()=>{U("connection_browse_clicked",{app_name:Ce.app_name??null,connection_id:Ce.id,instances_count:be.length}),c?.(ve)}},B)}return n.jsx(an,{connection:{title:ie,icon:_e,description:Ge},fallbackIcon:n.jsx(Ct,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs("div",{className:"flex items-center gap-1.5",children:[et&&n.jsxs(Kn,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[n.jsx(Xe,{size:11})," Added"]}),n.jsx(H,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:ve=>{ve.stopPropagation(),$e?(U("connection_add_clicked",{action:"use_existing",app_name:Ce.app_name??null,connection_id:$e.id}),i&&U("agent_connection_attached",{agent_id:i,connection_id:$e.id,app_name:Ce.app_name??null,mode:"existing"}),o($e.id)):(U("connection_add_clicked",{action:"clone",app_name:Ce.app_name??null,base_connection_id:Ce.id}),a(Ce))},children:"Add"})]})},B)},e[24]=r,e[25]=i,e[26]=l,e[27]=ae,e[28]=p,e[29]=o,e[30]=c,e[31]=a,e[32]=re):re=e[32];const oe=re;let le;e[33]!==l||e[34]!==p||e[35]!==d?(le=B=>{const ie=B._meta?.["mcp.mesh"],_e=ie?.friendlyName||ie?.friendly_name||B.server?.title||B.title||B.server?.name||B.name||B.id||"",Ge=B.server?.description||B.description||null,be=B.server?.icons?.[0]?.src||Zr(B.server?.repository)||null;return n.jsx(an,{connection:{title:_e,description:Ge,icon:be},fallbackIcon:n.jsx(Ct,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsx(H,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:et=>{et.stopPropagation(),U("connection_add_clicked",{action:"connect_new",registry_item_id:B.id,app_name:B._meta?.["mcp.mesh"]?.friendlyName||B.server?.name||B.name||null}),d(B)},children:l===B.id?n.jsx(He,{size:14,className:"animate-spin"}):p==="browse"?"Connect":"Add"})},`catalog-${B.id}`)},e[33]=l,e[34]=p,e[35]=d,e[36]=le):le=e[36];const ye=le;let K;e[37]!==N||e[38]!==v||e[39]!==V||e[40]!==y?(K=!y&&n.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[n.jsx(zr,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:N,onTabChange:B=>v(B)}),n.jsxs(H,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{U("connections_dialog_custom_clicked"),V()},children:[n.jsx(Cs,{size:12}),"Custom Connection"]})]}),e[37]=N,e[38]=v,e[39]=V,e[40]=y,e[41]=K):K=e[41];const pe=b&&"opacity-50 pointer-events-none";let je;e[42]!==pe?(je=O("flex-1 overflow-auto p-5 transition-opacity duration-150",pe),e[42]=pe,e[43]=je):je=e[43];const Ze="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let Ae;e[44]!==oe?(Ae=B=>{if(B.type==="group")return oe(B.key,B.title,B.icon,null,B.connections);const ie=B.connection;return oe(ie.id,ie.title,ie.icon,ie.description??null,[ie])},e[44]=oe,e[45]=Ae):Ae=e[45];const Te=q.map(Ae);let he;e[46]!==Z?(he=n.jsx("div",{ref:Z,className:"col-span-full h-1"}),e[46]=Z,e[47]=he):he=e[47];let ge;e[48]!==F?(ge=F&&n.jsx("div",{className:"col-span-full flex justify-center py-6",children:n.jsx(He,{size:24,className:"animate-spin text-muted-foreground"})}),e[48]=F,e[49]=ge):ge=e[49];const Be=Q&&te.length>0&&n.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[n.jsx(Nr,{size:13,className:"text-muted-foreground shrink-0"}),n.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),n.jsx("div",{className:"flex-1 h-px bg-border"})]}),de=Q&&te.map(ye),ut=Q&&ee.length>0&&n.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[n.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),n.jsx("div",{className:"flex-1 h-px bg-border"})]}),qe=Q&&ee.map(ye);let Pe;e[50]!==G||e[51]!==X||e[52]!==Q?(Pe=Q&&X.length>0&&n.jsx("div",{ref:G,className:"col-span-full h-1"}),e[50]=G,e[51]=X,e[52]=Q,e[53]=Pe):Pe=e[53];let Se;e[54]!==J.isLoadingMore||e[55]!==Q?(Se=Q&&J.isLoadingMore&&n.jsx("div",{className:"col-span-full flex justify-center py-6",children:n.jsx(He,{size:24,className:"animate-spin text-muted-foreground"})}),e[54]=J.isLoadingMore,e[55]=Q,e[56]=Se):Se=e[56];let ke;e[57]!==Te||e[58]!==he||e[59]!==ge||e[60]!==Be||e[61]!==de||e[62]!==ut||e[63]!==qe||e[64]!==Pe||e[65]!==Se?(ke=n.jsxs("div",{className:Ze,children:[Te,he,ge,Be,de,ut,qe,Pe,Se]}),e[57]=Te,e[58]=he,e[59]=ge,e[60]=Be,e[61]=de,e[62]=ut,e[63]=qe,e[64]=Pe,e[65]=Se,e[66]=ke):ke=e[66];let xe;e[67]!==N||e[68]!==q.length||e[69]!==ee||e[70]!==u||e[71]!==te?(xe=q.length===0&&te.length===0&&ee.length===0&&n.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:u?`No connections match "${u}"`:N==="connected"?"No connections yet":"No connections available"}),e[67]=N,e[68]=q.length,e[69]=ee,e[70]=u,e[71]=te,e[72]=xe):xe=e[72];let Ne;e[73]!==je||e[74]!==ke||e[75]!==xe?(Ne=n.jsxs("div",{className:je,children:[ke,xe]}),e[73]=je,e[74]=ke,e[75]=xe,e[76]=Ne):Ne=e[76];let Oe;return e[77]!==K||e[78]!==Ne?(Oe=n.jsxs(n.Fragment,{children:[K,Ne]}),e[77]=K,e[78]=Ne,e[79]=Oe):Oe=e[79],Oe}function so(t){return!t.verified&&!t._meta?.["mcp.mesh"]?.verified&&!t.meta?.verified}function io(t){return t.verified||t._meta?.["mcp.mesh"]?.verified||t.meta?.verified}function ro(t){return t.app_name}function oo(t){return t.app_name}function ao(t){return t?.items??[]}function lo(t,e){if(t?.hasMore)return e.reduce(co,0)}function co(t,e){return t+(e?.items?.length??0)}function uo({open:t,onOpenChange:e,defaultTab:s,initialSearch:i="",...r}){const o=r.mode??"add",a="agentId"in r?r.agentId:void 0,d="addedConnectionIds"in r?r.addedConnectionIds??new Set:new Set,l="onAdd"in r&&r.onAdd?r.onAdd:v=>{},u=(v,j,E)=>{a&&U("agent_connection_attached",{agent_id:a,connection_id:v,app_name:j,mode:E})},[V,c]=w.useState(null),[m,p]=w.useState(i),[x,g]=w.useState(!1),{org:f}=ce(),{data:b}=Ut.useSession(),h=kn(),y=Ot(),A=ct(),N=v=>{e(!1),A({to:"/$org/settings/connections/$appSlug",params:{org:f.slug,appSlug:v}})},C=async v=>{c(v.app_name??v.id);try{const E=`${v.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,I=(await h.create.mutateAsync({title:E,description:v.description??null,connection_type:v.connection_type,connection_url:v.connection_url??null,connection_token:null,icon:v.icon??null,app_name:v.app_name??null,app_id:v.app_id??null,connection_headers:v.connection_headers??null})).id,T=new URL(`/api/${f.slug}/mcp/${I}`,window.location.origin),k=await en({url:T.href,token:null,orgId:f.id});if(k.supportsOAuth&&!k.isAuthenticated){const{token:_,tokenInfo:R,error:M}=await tn({connectionId:I,orgSlug:f.slug,scope:"offline_access"});if(M||!_){U("connection_oauth_failed",{connection_id:I,flow:"clone",error:M??"no_token"}),se.error(`Authentication failed: ${M??"no token received"}`),await h.delete.mutateAsync(I);return}if(U("connection_oauth_succeeded",{connection_id:I,flow:"clone"}),R)try{(await fetch(`/api/${f.slug}/connections/${I}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:R.accessToken,refreshToken:R.refreshToken,expiresIn:R.expiresIn,scope:R.scope,clientId:R.clientId,clientSecret:R.clientSecret,tokenEndpoint:R.tokenEndpoint})})).ok?await h.update.mutateAsync({id:I,data:{}}):await h.update.mutateAsync({id:I,data:{connection_token:_}})}catch{await h.update.mutateAsync({id:I,data:{connection_token:_}})}else await h.update.mutateAsync({id:I,data:{connection_token:_}});await y.invalidateQueries({queryKey:we.isMCPAuthenticated(T.href,null)})}u(I,v.app_name??null,"clone"),l(I)}catch(j){console.error("Failed to add connection:",j),se.error("Failed to add connection")}finally{c(null)}},S=async v=>{if(!(!f||!b?.user?.id)){c(v.id);try{const j=Xr(v,f.id,b.user.id,{remoteIndex:0}),E=j.connection_type==="STDIO",D=!!j.connection_url,I=E&&j.connection_headers&&typeof j.connection_headers=="object"&&"command"in j.connection_headers;if(!D&&!I){se.error("This MCP Server cannot be connected: no connection method available"),c(null);return}const{id:T}=await h.create.mutateAsync(j),k=new URL(`/api/${f.slug}/mcp/${T}`,window.location.origin),_=await en({url:k.href,token:null,orgId:f.id});if(_.supportsOAuth&&!_.isAuthenticated){const{token:R,tokenInfo:M,error:P}=await tn({connectionId:T,orgSlug:f.slug,scope:"offline_access"});if(P||!R){U("connection_oauth_failed",{connection_id:T,flow:"connect_new",error:P??"no_token"}),se.error(`Authentication failed: ${P??"no token received"}`),u(T,j.app_name??null,"new"),l(T);return}if(U("connection_oauth_succeeded",{connection_id:T,flow:"connect_new"}),M)try{(await fetch(`/api/${f.slug}/connections/${T}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:M.accessToken,refreshToken:M.refreshToken,expiresIn:M.expiresIn,scope:M.scope,clientId:M.clientId,clientSecret:M.clientSecret,tokenEndpoint:M.tokenEndpoint})})).ok?await h.update.mutateAsync({id:T,data:{}}):await h.update.mutateAsync({id:T,data:{connection_token:R}})}catch{await h.update.mutateAsync({id:T,data:{connection_token:R}})}else await h.update.mutateAsync({id:T,data:{connection_token:R}});await y.invalidateQueries({queryKey:we.isMCPAuthenticated(k.href,null)}),se.success("Connected and authenticated")}else se.success("Connected");u(T,j.app_name??null,"new"),l(T)}catch(j){console.error("Failed to connect:",j),se.error("Failed to connect")}finally{c(null)}}};return n.jsxs(Me,{open:t,onOpenChange:e,children:[n.jsxs(Le,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[n.jsx(Fe,{className:"px-6 pt-5 pb-0 shrink-0",children:n.jsx(Ue,{className:"text-base font-semibold",children:o==="browse"?"Connections":"Add Connection"})}),n.jsx("div",{className:"pt-3 shrink-0",children:n.jsx(js,{value:m,onChange:p,placeholder:"Search connections..."})}),n.jsx(w.Suspense,{fallback:n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(He,{size:24,className:"animate-spin text-muted-foreground"})}),children:n.jsx(no,{mode:o,agentId:a,addedConnectionIds:d,onAdd:l,onCloneAndAdd:C,onConnectAndAdd:S,connectingItemId:V,search:m,onCreateConnection:()=>g(!0),onBrowseNavigate:N,defaultTab:s})})]}),n.jsx(to,{open:x,onOpenChange:g,onCreated:async v=>{g(!1);const j=new URL(`/api/${f.slug}/mcp/${v}`,window.location.origin),E=await en({url:j.href,token:null,orgId:f.id});if(E.supportsOAuth&&!E.isAuthenticated){const{token:D,tokenInfo:I,error:T}=await tn({connectionId:v,orgSlug:f.slug,scope:"offline_access"});if(T||!D){U("connection_oauth_failed",{connection_id:v,flow:"custom_create",error:T??"no_token"}),se.error(`Authentication failed: ${T??"no token received"}`),await h.delete.mutateAsync(v);return}if(U("connection_oauth_succeeded",{connection_id:v,flow:"custom_create"}),I)try{(await fetch(`/api/${f.slug}/connections/${v}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:I.accessToken,refreshToken:I.refreshToken,expiresIn:I.expiresIn,scope:I.scope,clientId:I.clientId,clientSecret:I.clientSecret,tokenEndpoint:I.tokenEndpoint})})).ok?await h.update.mutateAsync({id:v,data:{}}):await h.update.mutateAsync({id:v,data:{connection_token:D}})}catch{await h.update.mutateAsync({id:v,data:{connection_token:D}})}else await h.update.mutateAsync({id:v,data:{connection_token:D}});await y.invalidateQueries({queryKey:we.isMCPAuthenticated(j.href,null)})}u(v,null,"custom"),l(v),e(!1)}})]})}const Vo='# Broken Link Finder\n\nYou are the **Broken Link Finder**, a specialist agent focused on the health of the site\'s link structure.\n\n## Your mission\n\nDiscover and track broken links and long redirect chains. You are invoked as a sub-task by an orchestrator agent — your job is to detect link health and return a structured findings report. The orchestrator decides what to do with your findings (file issues, dedup, etc.).\n\nYou are **mechanical**: collect → check → classify → emit findings. Leave subjective judgment to other agents.\n\n## Input (expect this in the prompt)\n\nThe orchestrator will pass per-site configuration. Expected fields:\n\n```yaml\nsite_root_url: <https://example.com>\nmax_pages: <optional integer, default 100, max 200>\ncheck_external: <optional bool, default false>\n```\n\nIf required fields are missing (`site_root_url`), return an error summary and stop — do not proceed with defaults or guess.\n\n## Available tools\n\n- **site-diagnostics MCP**:\n - `collect_site_links` — discovers all unique outbound link targets across the site and returns them with source-page attribution. Does NOT check status.\n - `check_urls` — takes a batch of URLs (max 100 per call) and returns their HTTP status, error kind, and redirect chains.\n\n---\n\n## Step 1 — Collect link targets (one call)\n\nCall `collect_site_links` once to get the full deduplicated list of outbound link targets and their source pages:\n\n```\ncollect_site_links({\n url: <site_root_url from input>,\n maxPages: <max_pages from input, default 100>,\n checkExternal: <check_external from input, default false>\n})\n```\n\nThis returns:\n- `links`: array of `{ targetUrl, scope: "internal"|"external", sourcePages, sourcePagesTotal }` — **each target appears exactly once**\n- Metadata: `pagesCrawled`, `pagesFetched`, `linksSkipped`, optional `error`\n\n**If `result.error` is set**, the scan failed at the root (e.g. site unreachable). Return a single finding with `kind: site-unreachable` and the error in `evidence`. Then stop.\n\nKeep the `links` array in memory — you\'ll need it in Step 3 for classification and source attribution.\n\n## Step 2 — Check the targets (batched calls)\n\nExtract `targetUrl` from each entry in `links`. Slice the resulting URL list into **disjoint batches of up to 100 URLs** and call `check_urls` on each batch:\n\n```\ncheck_urls({ urls: batch_of_100_urls })\n```\n\nCollect every batch\'s `results` entries into a single flat array. Order doesn\'t matter — you\'ll join back by `targetUrl`.\n\n**Rules for this step:**\n- Slice deterministically (e.g. consecutive slices of 100) so batches are disjoint. Do not pass the same URL in two batches.\n- Call `check_urls` sequentially or in parallel — your choice. The tool is idempotent.\n- If a single `check_urls` call errors entirely, skip that batch and continue with the others. Note the skipped count in the wrap-up summary.\n\n## Step 3 — Classify each finding\n\nFor every target with a check result, join the `collect_site_links` entry (for `scope`, `sourcePages`, `sourcePagesTotal`) with the `check_urls` entry (for `status`, `errorKind`, `chain`, `hops`).\n\nA finding is emitted for:\n- **Broken**: `status >= 400` OR `status === 0`\n- **Long redirect chain**: `hops > 3` (even if the final status is 2xx)\n\nOther targets (2xx, short-chain redirects) produce no finding.\n\nMap check result → `kind`:\n\n| Check result | `kind` |\n|---|---|\n| `status: 404` | `link-404` |\n| `status: 4xx` (not 404) | `link-4xx-other` |\n| `status: 5xx` | `link-5xx` |\n| `status: 0`, `errorKind: "dns"` | `link-dns-failure` |\n| `status: 0`, `errorKind: "redirect-loop"` | `redirect-loop` |\n| `hops > 3` (success final status) | `redirect-chain-long` |\n| `status: 0`, `errorKind: "timeout"` or `"connection"` | **skip — no finding** |\n\n**Important**: timeouts and connection errors are **not** broken links — they just mean the server didn\'t respond in our time window. Could be a slow server, an overloaded CDN, rate-limiting against our bot, or a transient network blip. Flagging these as broken produces false positives. If a URL is genuinely dead, it\'ll usually surface as `dns`, a 4xx/5xx, or a redirect loop. Skip timeout/connection entries silently.\n\n## Catalog of severity rules\n\n**High severity:**\n- `link-404` when `scope: "internal"`\n- `link-5xx` when `scope: "internal"`\n- `redirect-loop` (either scope)\n\n**Medium severity:**\n- `link-4xx-other` (internal)\n- `redirect-chain-long` (internal)\n- `link-404` (external) when `sourcePagesTotal >= 5`\n\n**Low severity:**\n- `link-404` (external) when `sourcePagesTotal < 5`\n- `link-dns-failure` (external)\n- `redirect-chain-long` (external)\n- `link-4xx-other` on external scope\n\n## Step 4 — Return a structured findings report\n\nReturn a single response with this shape (YAML preferred):\n\n```yaml\nspecialist: links\nsummary:\n pages_crawled: <pagesCrawled>\n pages_fetched: <pagesFetched>\n unique_link_targets: <links.length>\n targets_dropped_by_collect_cap: <linksSkipped>\n batches_checked: <n>\n batches_skipped_due_to_errors: <n>\n broken_links: <n> # internal + external\n long_redirect_chains: <n>\nfindings:\n - kind: <kind slug>\n severity: <low|medium|high>\n target:\n url: <full broken URL>\n route: <path if internal; otherwise the external host>\n scope: <internal | external>\n evidence: |\n - Status code / error: <e.g. `404 Not Found`, `DNS failure`, `redirect-loop`>\n - Redirect chain (if applicable): A → B → C → D → E\n - Found on pages (at time of detection):\n - /page-1\n - /page-2\n - (... up to 20 from `sourcePages`)\n - Total pages linking to this target: <sourcePagesTotal>\n impact: <1 sentence tailored to scope + kind>\n suggested_fix: |\n <actionable:>\n - If internal 404: update link to correct destination OR create 301 redirect\n - If internal 5xx: investigate server-side handler for the route (may be app bug)\n - If redirect chain: shorten to single-hop direct redirect in routing config\n - If external: update link to equivalent resource OR remove the mention\n - List likely files/components if you can infer (e.g. "appears on many pages — likely in a shared component like `app/components/Nav.tsx` or menu config")\n - ...\n```\n\nIf `collect_site_links` returned `error`, return a single `kind: site-unreachable` finding with the error in `evidence`.\n\nIf there are zero findings, return `findings: []` — that is the correct output for a healthy link graph.\n\n---\n\n## General rules\n\n- **Trust the scanner.** If `check_urls` reports a URL as broken or long-chain, emit a finding. Do not re-verify with other tools.\n- **Accept some flakiness.** A transient network blip may cause a false positive once. Downstream dedup across runs resolves it.\n- **Group by destination, not by origin.** One broken URL = one finding, even if linked on 50 pages. `collect_site_links` already returns it grouped this way.\n- **Prioritize internals.** Broken external links are the other site\'s responsibility; report but with lower severity.\n- **Never invent status codes.** Report what the scanner returned.\n',mo='# SEO Auditor\n\nYou are the **SEO Auditor**, a specialist agent focused on technical SEO hygiene.\n\n## Your mission\n\nAudit the on-page SEO health of target URLs and return a structured findings report. You focus on **technical SEO** (meta tags, structured data, canonicals, sitemap/robots, heading structure, indexability) — not editorial content or keyword strategy (those are the scope of other agents).\n\nYou are invoked as a sub-task by an orchestrator agent. Your job is to analyze and report. The orchestrator decides what to do with your findings (file issues, dedup against history, etc.).\n\n## Input (expect this in the prompt)\n\nThe orchestrator will pass per-site configuration. Expected fields:\n\n```yaml\nurls:\n - <url to audit>\n - <... one or more>\n```\n\nIf required fields are missing, return an error summary and stop — do not proceed with defaults or guess.\n\n## Available tools\n\n- **site-diagnostics MCP**: `audit_seo`, `fetch_page`, `render_page`, `crawl_site`\n\n---\n\n## Step 1 — Diagnostic\n\nFor each target URL:\n\n1. **Structured audit**: call `audit_seo({ url })`. It returns a structured report — use it as your primary source.\n2. **Raw HTML check**: use `fetch_page({ url })` to see the HTML served (important for crawlers that don\'t execute JS). Confirm critical meta tags are in the initial HTML, not only after hydration.\n3. **Post-render check**: use `render_page({ url })` to see the final DOM. Problems like canonical being overwritten by JS show up here.\n4. **Site structure checks** (only if you have permission for broad crawling, or via sampling): use `crawl_site` to identify orphan pages, canonical loops, or excessive navigation depth.\n5. **Always check**: `/robots.txt` and `/sitemap.xml` via `fetch_page`. These two are root-level and affect the whole site.\n\nOrganize findings into a list. Each finding must have:\n- `kind` (kebab-case slug, see catalog below)\n- `severity` (high | medium | low, see criteria below)\n- `target.url` and `target.route` (normalize: lowercase host, no query, no trailing slash except for `/`)\n- `evidence` (raw data: CSS selector, HTML snippet, observed value)\n- `impact` (1-2 sentences connecting to real metrics)\n- `suggested_fix` (actionable; include file/line if you can infer from framework patterns)\n\n## Step 1.5 — Validate page intent (critical; runs before classification)\n\nBefore you emit *any* finding about a page\'s title, meta description, headings, or indexability, you must answer one question: **did the site owner intend this URL to be a public, indexable page?**\n\nIf the answer is no, the observed "problems" are intentional configuration, not bugs. Reporting them wastes maintainer time and erodes this agent\'s credibility.\n\n### Three signals that the URL is NOT a real public page\n\nCheck these in order. Hitting any one of them means **skip all SEO findings for this URL** except legitimately site-wide problems (e.g. broken sitemap, broken robots.txt).\n\n**Signal 1 — Not in sitemap.** Fetch `/sitemap.xml` (and its child sitemaps, if it\'s a sitemap index). If the URL doesn\'t appear in any sitemap, the owner didn\'t declare it as public. Common on e-commerce platforms where routes like `/p`, `/c`, `/blog` are catchall or routing prefixes, not real pages.\n\n**Signal 2 — Explicit `noindex` + not in sitemap.** If the page serves `<meta name="robots" content="noindex*">` **and** isn\'t in the sitemap, this is a deliberate double-lock by the owner. Respect it. Do **not** flag `noindex-on-important-page` in this case.\n\n**Signal 3 — Title is the URL slug (template fallback).** If `<title>` equals the last path segment (e.g. `<title>blog</title>` for `/blog`, `<title>p</title>` for `/p`), the page is being rendered by a fallback template — nobody configured real content for this route. Skip.\n\n### Platform-specific catchalls (especially Brazilian e-commerce / VTEX / deco-cx)\n\nThese paths are routing prefixes, **not pages**. They may return HTTP 200 but are not meant to be indexable:\n\n- `/p`, `/c`, `/b` — VTEX product / category / brand route prefixes. Real pages live at `/<slug>/p`, `/<slug>/c`, etc. The bare prefixes are catchalls.\n- `/blog`, `/blogs`, `/editorial`, `/revista`, `/conteudo`, `/magazine`, `/noticias`, `/artigos` — common editorial prefixes. If the site doesn\'t have an editorial section, these hit a fallback.\n- `/search`, `/busca`, `/s` — search endpoints, not indexable pages.\n- `/departamento`, `/categoria` — category prefixes.\n- `/checkout`, `/cart`, `/carrinho`, `/login`, `/account`, `/minha-conta` — transactional/private routes. Intentionally `noindex`.\n\n### The "is this page actually important?" checklist\n\nBefore emitting a finding that calls a page "important" (like `noindex-on-important-page` or `title-missing` on anything critical):\n\n1. Is the URL in `/sitemap.xml`? → If no, skip.\n2. Does the page have substantive, unique content (not a fallback with title = URL slug)? → If no, skip.\n3. Is the path a known platform catchall (see list above)? → If yes, skip.\n\nOnly flag if all three pass.\n\n### What still counts as a finding even on non-indexable pages\n\nSite-wide SEO issues affect the whole domain and are worth reporting regardless of individual page intent:\n- `sitemap-missing` (the sitemap itself is broken)\n- `robots-blocking-important-path` (robots.txt blocks something that IS in the sitemap)\n- `structured-data-invalid` on pages that ARE in the sitemap\n- Duplicate titles / meta descriptions across pages that ARE in the sitemap\n\n## Catalog of `kind`\n\nTwo flavors of finding:\n\n- **Per-page** kinds — emitted when auditing a specific URL (e.g. `audit_seo` of a single page OR when your targeted inspection of one of the input URLs finds the issue). Marked **[intent-gated]** — must pass Step 1.5 before being emitted. Target is the specific URL.\n- **Aggregate** kinds — emitted once per site-wide pattern detected by `audit_seo`. Marked **[aggregate]**. Target is the site root (`/`). Evidence MUST include the affected URL sample from `audit_seo.issues[].sampleUrls`. One finding per aggregate kind per site.\n\n**High severity (per-page):**\n- `noindex-on-important-page` **[intent-gated]** — meta robots `noindex` on a page that IS in the sitemap and should be indexed\n- `canonical-pointing-to-wrong-url` **[intent-gated]** — canonical points to a different URL that isn\'t the canonical equivalent\n- `canonical-missing-on-paginated-or-faceted` **[intent-gated]** — pagination/filters without canonical\n- `title-missing` **[intent-gated]** — no `<title>` or empty on a page that IS in the sitemap\n- `structured-data-invalid` **[intent-gated]** — JSON-LD with syntax error or invalid schema.org\n\n**High severity (site-wide):**\n- `sitemap-missing` — `/sitemap.xml` returns 404 or 5xx\n- `robots-blocking-important-path` — `/robots.txt` disallows a path that IS in the sitemap\n- `broken-links-site-wide` **[aggregate]** — `audit_seo` reports broken outbound links across the site\n- `non-indexable-pages-site-wide` **[aggregate]** — `audit_seo` reports many non-indexable pages (note: some non-indexable pages are intentional catchalls — only high severity if the absolute count is large relative to `totalPagesCrawled`, e.g. > 30%)\n\n**Medium severity (per-page):**\n- `meta-description-missing` **[intent-gated]** — no `<meta name="description">` on a sitemap page the agent audited directly\n- `h1-missing` **[intent-gated]** — no `<h1>` on a sitemap page the agent audited directly\n- `h1-duplicate` **[intent-gated]** — multiple `<h1>` on a single page\n- `og-tags-missing` **[intent-gated]** — `og:title` and/or `og:description` missing\n- `structured-data-missing` **[intent-gated]** — page-type (product, article, etc.) without relevant JSON-LD\n- `title-too-long` **[intent-gated]** — `<title>` > 60 characters (truncation in SERP)\n- `title-too-short` **[intent-gated]** — `<title>` < 10 characters (rare; usually means template fallback — double-check page intent)\n- `meta-description-too-long` **[intent-gated]** — description > 160 characters\n\n**Medium severity (site-wide):**\n- `pages-missing-h1` **[aggregate]** — `audit_seo` reports N pages without an H1 tag\n- `pages-missing-meta-description` **[aggregate]** — `audit_seo` reports N pages without a meta description\n- `duplicate-titles` **[aggregate]** — multiple pages share the same `<title>`\n- `duplicate-meta-descriptions` **[aggregate]** — multiple pages share the same meta description\n- `duplicate-content` **[aggregate]** — multiple pages share substantially identical content\n- `broken-resources-site-wide` **[aggregate]** — broken images / scripts across the site\n- `hreflang-broken` — `hreflang` attribute with invalid value or broken reciprocity\n\n**Low severity (per-page):**\n- `meta-description-too-short` **[intent-gated]** — description < 50 characters\n- `og-image-missing` **[intent-gated]** — `og:image` missing\n- `heading-hierarchy-skipped` **[intent-gated]** — jumps from H1 to H3, etc.\n\n**Low severity (site-wide):**\n- `internal-link-using-absolute-url` — internal links with absolute URLs\n\n### Evidence requirements for aggregate kinds\n\nWhen emitting an `[aggregate]` kind, the `evidence` of the finding MUST include:\n\n1. **Total count** — from `audit_seo.issues[].count`\n2. **Sample URLs** — from `audit_seo.issues[].sampleUrls`. Render up to all 20 entries as a bulleted list. If `count > sampleUrls.length`, add a line like `(and <count - sampleUrls.length> more)`.\n3. **If `sampleUrls` is empty** (the tool didn\'t expose per-URL detail — happens for `broken-links-site-wide`, `duplicate-content`, `broken-resources-site-wide`), note it explicitly: `Note: audit_seo did not return per-URL detail for this issue type. A human will need to inspect the full audit_seo report or re-run with deeper crawling.`\n\nAn aggregate finding without either sample URLs or the note is **not actionable** and must not be emitted.\n\nTarget for aggregate kinds stays `target.url: https://<host>/` and `target.route: /`.\n\n## Step 2 — Return a structured findings report\n\nReturn a single response with this shape (YAML or JSON; YAML preferred for readability):\n\n```yaml\nspecialist: seo\nsummary:\n urls_audited: <n>\n findings: <n>\n diagnostic_failures: <n> # urls where audit tooling errored\nfindings:\n - kind: <kind slug>\n severity: <low|medium|high>\n target:\n url: <full URL>\n route: <normalized path>\n evidence: |\n <multi-line raw data: observed value, selector, HTML snippet, audit_seo output>\n impact: <1-2 sentences connecting to ranking/indexation/CTR>\n suggested_fix: <actionable; likely file/component, pseudo-code, correct value>\n - ...\n```\n\nIf a URL\'s diagnostic tooling errored entirely, emit a single `kind: diagnostic-failed` finding for that URL with the error in `evidence` instead of inventing data.\n\nIf there are zero findings, return `findings: []` — that is the correct output for healthy targets.\n\n---\n\n## General rules\n\n- **Never invent data in `evidence`.** If a tool failed, report it via `kind: diagnostic-failed` and skip the finding.\n- Always normalize `route`: lowercase host, no trailing slash (except for `/`), no query string, no fragment.\n- Your credibility is your currency. False positives erode trust — if you\'re 50% sure, don\'t emit a finding; investigate further or mark as `severity:low`.\n- **Never report a page as broken when it\'s a known catchall.** URLs like `/p`, `/c`, `/blog`, `/search`, `/busca` on e-commerce sites are routing prefixes, not pages. If the title is the URL slug and the page carries `noindex`, the owner is deliberately hiding it. That\'s correct behavior, not a bug.\n- **Sitemap is the ground truth for "is this page public?"**. When in doubt about whether to emit a finding on a URL, fall back to: "Is this URL in /sitemap.xml?" If not, default to silence.\n',fo=`# Performance Watchdog
1
+ import{s as ce,b as Ut,u as di,z as vn,C as wn,j as n,B as H,x as se,r as w,o as Ot,f as ct,l as He,G as en,F as tn,t as U,K as we,e as L,Q as ui,R as Vi,c as O,a as jn,g as mi,d as fi,H as dt,J as Rt,E as pi,P as An,ap as hi,n as Sn,y as us,aq as gi,ar as Vs,as as xi,at as De,au as nn,ao as bi,av as yi,aw as sn,ax as vi,ay as wi,az as ji,aA as Ai,w as Si,aB as ki,aC as Ni,aD as _i,aE as Ci,aF as Ln}from"./index-b_n-uXmh.js";import{b as Me,a as Le,c as Fe,d as Ue,e as $t,D as ms}from"./dialog-BdVY7mqq.js";import{S as Ii}from"./switch-BUxRExf5.js";import{I as Re}from"./input-C80VzPpQ.js";import{b as kn,u as Ri}from"./use-connection-DuXPSqwF.js";import{S as jt,u as ze,W as fs,g as Nn,i as Fn,c as Ti}from"./constants-Cj0U39_n.js";import{a as Pi,u as Ei}from"./lean-canvas-recruit-modal-C1vNRy0q.js";import{a as _n}from"./use-navigate-to-agent-B5j-9-p3.js";import{a as Di,A as Cn,M as Mi,N as ps,O as hs,o as Li,P as Fi,Q as Ui,b as Oi,R as $i,I as gs}from"./agent-icon-Be_PnRh0.js";import{t as zi,b as zt,u as In,a as Bi,g as qi,h as Ki,w as Yi,A as Wi,i as Gi,j as Qi}from"./chat-context-JbYHex_O.js";import{b as Bt,a as qt,c as Kt,D as Yt,d as Hi,e as Ji,f as Xi}from"./drawer-0C4xllAB.js";import{u as Wt,c as mn,a as xs,b as bs,T as ys}from"./tooltip-B-nRvfy-.js";import{I as vs}from"./integration-icon-LX1nChXa.js";import{a as ws,b as Zi,u as er}from"./use-virtual-mcp-Qy5dDA1Q.js";import{u as tr}from"./use-tasks-DFEEn9nC.js";import{r as nr,i as sr}from"./shell-layout-Cdsgdqci.js";import{j as Gt,k as We,l as ir,s as Rn,t as rr,m as or,n as ar,o as lr,q as bt,u as cr,v as dr,c as ur,S as Vr,w as mr,x as Un}from"./pair-CBvrXYZC.js";import{S as Tt,u as Qt,P as fn,a as fr,b as pr,c as hr,E as gr,i as xr,d as br}from"./index-pdnGjAa-.js";import{C as js}from"./collection-search-B8mdZm7u.js";import{u as yr,g as Tn,a as vr,c as wr,l as Pt}from"./tabs-Cge-9ZTd.js";import{F as ue,b as Ve,c as Ie,d as me,f as fe,a as yt}from"./form-Stkhqjoi.js";import{c as Ee,e as rn,f as on,D as As,a as Ss,b as ks,d as jr}from"./dropdown-menu-Bq-aRZ_r.js";import{s as Ar,i as Sr}from"./XClose-lRlzG-cb.js";import{c as Ns}from"./ZapSquare-_fsDSSOX.js";import{i as Xe,t as On}from"./ChevronDown-ByP-e484.js";import{s as lt}from"./Star01-ByzmPd4J.js";import{a as pn,t as kr}from"./Tool01-Dqyo2VjJ.js";import{i as _s}from"./Lock01-CI-miN4g.js";import{s as Cs}from"./Plus-Bihyskqy.js";import{f as Nr,d as Is,t as _r,g as Cr,b as Ir}from"./XCircle-Dp1Lqd1t.js";import{i as pt}from"./X-BiphajNJ.js";import{i as Rs}from"./AlertCircle-BkX4HzbS.js";import{S as Ts,a as Ps,b as Es,c as Ds,d as ot}from"./select-CaDZpVbI.js";import{i as Rr}from"./RefreshCcw01-BzT-xyrO.js";import{T as Ms,a as Et}from"./toggle-group-psHBbDPI.js";import{u as Tr,a as Pr}from"./use-ai-providers-Bc_Jl0e6.js";import{m as Ht,g as Er,i as Dr,a as Ls,M as Mr,N as Lr}from"./select-model-S5cFobu5.js";import{S as Fr}from"./index-ZmvI6xf3.js";import{r as Fs,l as xt}from"./types-hw9no7At.js";import{p as Ur,q as $n}from"./question-004-sINsf4GQ.js";import{g as zn}from"./ai-providers-logos-DD3qZ33J.js";import{g as Or}from"./connection-slug-eyAPH6o3.js";import{u as Us,a as Os,g as $r,C as an}from"./connection-card-HM9ImVMm.js";import{C as zr}from"./collection-tabs-Bj7BShdC.js";import{g as Br}from"./constants-DE2tzNng.js";import{T as qr}from"./textarea-Dx8hdqfA.js";import{n as Ct}from"./Container-DzkLD13G.js";import{c as Kr,i as Nt,a as Bn,E as Yr,p as Wr,b as Gr,d as Qr}from"./connection-form-helpers-Cr0s3TXQ.js";import{u as qn}from"./use-infinite-scroll-HGu4x7ZU.js";import{u as Hr}from"./useSuspenseInfiniteQuery-4BiVmPoE.js";import{g as Jr,e as Xr,a as Zr}from"./extract-connection-data-DN-EBamj.js";import{B as Kn}from"./badge-CRHmlYav.js";import{i as eo}from"./ChevronRight-BUfZMnd9.js";function to({open:t,onOpenChange:e,onCreated:s}){const{org:i}=ce(),{data:r}=Ut.useSession(),{stdioEnabled:o}=di(),a=Wt(),d=kn(),l=Us(),V=Os(l,"").items,c=vn({resolver:wn(Kr),defaultValues:{title:"",description:null,icon:null,ui_type:"HTTP",connection_url:"",connection_token:null,npx_package:"",stdio_command:"",stdio_args:"",stdio_cwd:"",env_vars:[]}}),m=c.watch("ui_type"),p=c.watch("connection_url"),x=c.watch("npx_package"),g=Nt({uiType:m,connectionUrl:p??"",npxPackage:x??""})??Bn({uiType:m,connectionUrl:p??"",registryItems:V}),f=S=>{const v=S.trim();if(!v)return;const j=!!c.formState.dirtyFields.title,E=!!c.formState.dirtyFields.description,D=!!c.formState.dirtyFields.env_vars,I=k=>{if(k&&(!j&&!c.getValues("title").trim()&&k.title&&c.setValue("title",k.title,{shouldDirty:!1}),!E&&!(c.getValues("description")??"").trim()&&k.description&&c.setValue("description",k.description,{shouldDirty:!1}),!D&&k.envVarKeys?.length)){const _=c.getValues("env_vars")??[],R=new Set(_.map(P=>P.key)),M=k.envVarKeys.filter(P=>!R.has(P));M.length>0&&c.setValue("env_vars",[..._,...M.map(P=>({key:P,value:""}))],{shouldDirty:!0})}},T=Wr(v);if(T&&o){c.setValue("ui_type","NPX",{shouldDirty:!0}),c.setValue("npx_package",T.packageName,{shouldDirty:!0}),c.setValue("connection_url","",{shouldDirty:!0}),c.setValue("connection_token",null,{shouldDirty:!0}),I(Nt({uiType:"NPX",npxPackage:T.packageName}));return}if(v.startsWith("http://")||v.startsWith("https://")){const k=m==="HTTP"||m==="SSE"||m==="Websocket"?m:"HTTP";c.setValue("ui_type",k,{shouldDirty:!0}),c.setValue("connection_url",v,{shouldDirty:!0}),I(Nt({uiType:k,connectionUrl:v})??Bn({uiType:k,connectionUrl:v,registryItems:V}));return}m==="NPX"&&I(Nt({uiType:"NPX",npxPackage:v}))},b=S=>{S||c.reset(),e(S)},h=async S=>{let v,j=null,E=null,D=null;S.ui_type==="NPX"?(v="STDIO",j="",D=Gr(S.npx_package||"",S.env_vars||[])):S.ui_type==="STDIO"?(v="STDIO",j="",D=Qr(S.stdio_command||"",S.stdio_args||"",S.stdio_cwd,S.env_vars||[])):(v=S.ui_type,j=S.connection_url||"",E=S.connection_token||null);const I=Br("conn");try{await d.create.mutateAsync({id:I,title:S.title,description:S.description||null,connection_type:v,connection_url:j,connection_token:E,created_at:new Date().toISOString(),updated_at:new Date().toISOString(),created_by:r?.user?.id||"system",organization_id:i.id,icon:S.icon??null,app_name:null,app_id:null,connection_headers:D,oauth_config:null,configuration_state:null,metadata:null,tools:null,bindings:null,status:"inactive"}),c.reset(),e(!1),s?.(I)}catch{se.error("Failed to create connection")}},y="Create Connection",A="Create a custom connection in your organization. Fill in the details below.",N=c.formState.isSubmitting?"Saving...":"Create Connection",C=n.jsxs("div",{className:"grid gap-4",children:[n.jsx(ue,{control:c.control,name:"ui_type",render:({field:S})=>n.jsxs(Ve,{children:[n.jsx(Ie,{children:"Type *"}),n.jsxs(Ts,{value:S.value,onValueChange:S.onChange,children:[n.jsx(me,{children:n.jsx(Ps,{children:n.jsx(Es,{})})}),n.jsxs(Ds,{children:[n.jsx(ot,{value:"HTTP",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(lt,{className:"w-4 h-4"}),"HTTP"]})}),n.jsx(ot,{value:"SSE",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(lt,{className:"w-4 h-4"}),"SSE"]})}),n.jsx(ot,{value:"Websocket",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(lt,{className:"w-4 h-4"}),"Websocket"]})}),o&&n.jsxs(n.Fragment,{children:[n.jsx(ot,{value:"NPX",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Ct,{className:"w-4 h-4"}),"NPX Package"]})}),n.jsx(ot,{value:"STDIO",children:n.jsxs("span",{className:"flex items-center gap-2",children:[n.jsx(Di,{className:"w-4 h-4"}),"Custom Command"]})})]})]})]}),n.jsx(fe,{})]})}),m==="NPX"&&n.jsx(ue,{control:c.control,name:"npx_package",render:({field:S})=>n.jsxs(Ve,{children:[n.jsx(Ie,{children:"NPM Package *"}),n.jsx(me,{children:n.jsx(Re,{placeholder:"@perplexity-ai/mcp-server",...S,value:S.value??"",onPaste:v=>{const j=v.clipboardData.getData("text");j&&(v.preventDefault(),c.setValue("npx_package",j.trim(),{shouldDirty:!0}),f(j))},onBlur:v=>{f(v.target.value),S.onBlur()}})}),n.jsx(fe,{})]})}),m==="STDIO"&&n.jsxs(n.Fragment,{children:[n.jsxs("div",{className:"grid grid-cols-2 gap-4 items-start",children:[n.jsx(ue,{control:c.control,name:"stdio_command",render:({field:S})=>n.jsxs(Ve,{children:[n.jsx(Ie,{children:"Command *"}),n.jsx(me,{children:n.jsx(Re,{placeholder:"node, bun, python...",...S,value:S.value??""})}),n.jsx(fe,{})]})}),n.jsx(ue,{control:c.control,name:"stdio_args",render:({field:S})=>n.jsxs(Ve,{children:[n.jsx(Ie,{children:"Arguments"}),n.jsx(me,{children:n.jsx(Re,{placeholder:"arg1 arg2 --flag value",...S,value:S.value??""})}),n.jsx(fe,{})]})})]}),n.jsx(ue,{control:c.control,name:"stdio_cwd",render:({field:S})=>n.jsxs(Ve,{children:[n.jsx(Ie,{children:"Working Directory"}),n.jsx(me,{children:n.jsx(Re,{placeholder:"/path/to/project (optional)",...S,value:S.value??""})}),n.jsx("p",{className:"text-xs text-muted-foreground",children:"Directory where the command will be executed"}),n.jsx(fe,{})]})})]}),(m==="NPX"||m==="STDIO")&&n.jsx(ue,{control:c.control,name:"env_vars",render:({field:S})=>n.jsxs(Ve,{children:[n.jsx(Ie,{children:"Environment Variables"}),n.jsx(me,{children:n.jsx(Yr,{value:S.value??[],onChange:S.onChange})}),n.jsx(fe,{})]})}),m!=="NPX"&&m!=="STDIO"&&n.jsxs(n.Fragment,{children:[n.jsx(ue,{control:c.control,name:"connection_url",render:({field:S})=>n.jsxs(Ve,{children:[n.jsx(Ie,{children:"URL *"}),n.jsx(me,{children:n.jsx(Re,{placeholder:"https://example.com/mcp",...S,value:S.value??"",onPaste:v=>{const j=v.clipboardData.getData("text");j&&(v.preventDefault(),c.setValue("connection_url",j.trim(),{shouldDirty:!0}),f(j))},onBlur:v=>{f(v.target.value),S.onBlur()}})}),n.jsx(fe,{})]})}),n.jsx(ue,{control:c.control,name:"connection_token",render:({field:S})=>n.jsxs(Ve,{children:[n.jsx(Ie,{children:g?.token?.label??"Token (optional)"}),n.jsx(me,{children:n.jsx(Re,{type:"password",placeholder:g?.token?.placeholder??"Bearer token or API key",className:"ph-no-capture",...S,value:S.value??""})}),g?.token?.helperText&&n.jsxs("p",{className:"text-xs text-muted-foreground",children:[g.token.helperText,g.id==="github"&&n.jsxs(n.Fragment,{children:[" ","·"," ",n.jsx("a",{className:"text-foreground underline underline-offset-4 hover:text-foreground/80",href:"https://github.com/settings/personal-access-tokens",target:"_blank",rel:"noreferrer",children:"Open GitHub PAT settings"})]})]}),n.jsx(fe,{})]})})]}),n.jsx(ue,{control:c.control,name:"title",render:({field:S})=>n.jsxs(Ve,{children:[n.jsx(Ie,{children:"Name *"}),n.jsx(me,{children:n.jsx(Re,{placeholder:"My Connection",...S})}),n.jsx(fe,{})]})}),n.jsx(ue,{control:c.control,name:"description",render:({field:S})=>n.jsxs(Ve,{children:[n.jsx(Ie,{children:"Description"}),n.jsx(me,{children:n.jsx(qr,{placeholder:"A brief description of this connection",rows:3,...S,value:S.value??""})}),n.jsx(fe,{})]})})]});return a?n.jsx(Bt,{open:t,onOpenChange:b,children:n.jsxs(qt,{className:"max-h-[90vh]",children:[n.jsx(Kt,{className:"pb-2",children:n.jsxs("div",{className:"flex items-start justify-between gap-4",children:[n.jsxs("div",{className:"flex-1 text-left",children:[n.jsx(Yt,{children:y}),n.jsx(Hi,{className:"mt-1",children:A})]}),n.jsx(Ji,{asChild:!0,children:n.jsx(H,{variant:"ghost",size:"icon",className:"shrink-0 -mt-1",children:n.jsx(Ar,{size:16})})})]})}),n.jsx(yt,{...c,children:n.jsxs("form",{onSubmit:c.handleSubmit(h),children:[n.jsx("div",{className:"overflow-y-auto px-4 pb-4",children:C}),n.jsx(Xi,{children:n.jsx(H,{type:"submit",disabled:c.formState.isSubmitting,className:"w-full",children:N})})]})})]})}):n.jsx(Me,{open:t,onOpenChange:b,children:n.jsxs(Le,{className:"sm:max-w-[525px]",children:[n.jsxs(Fe,{children:[n.jsx(Ue,{children:y}),n.jsx($t,{children:A})]}),n.jsx(yt,{...c,children:n.jsxs("form",{onSubmit:c.handleSubmit(h),children:[n.jsx("div",{className:"py-4",children:C}),n.jsxs(ms,{children:[n.jsx(H,{type:"button",variant:"outline",onClick:()=>b(!1),children:"Cancel"}),n.jsx(H,{type:"submit",disabled:c.formState.isSubmitting,className:"min-w-40",children:N})]})]})})]})})}function no(t){const e=L.c(80),{mode:s,agentId:i,addedConnectionIds:r,onAdd:o,onCloneAndAdd:a,onConnectAndAdd:d,connectingItemId:l,search:u,onCreateConnection:V,onBrowseNavigate:c,defaultTab:m}=t,p=s===void 0?"add":s,x=m===void 0?"connected":m,{org:g}=ce(),f=w.useDeferredValue(u),b=u!==f;let h;e[0]!==f?(h=f.toLowerCase(),e[0]=f,e[1]=h):h=e[1];const y=h;let A;e[2]!==x?(A=B=>B??x,e[2]=x,e[3]=A):A=e[3];const[N,C]=ui(Vi.connectionsTab(g.slug)+(x==="all"?":home-modal":":agent-modal"),A);let S;e[4]!==N||e[5]!==C?(S=B=>{B!==N&&U("connections_dialog_tab_changed",{to_tab:B}),C(B)},e[4]=N,e[5]=C,e[6]=S):S=e[6];const v=S;let j;e[7]!==g.id||e[8]!==g.slug?(j={connectionId:jt,orgId:g.id,orgSlug:g.slug},e[7]=g.id,e[8]=g.slug,e[9]=j):j=e[9];const E=ze(j);let D,I,T;if(e[10]!==E||e[11]!==f||e[12]!==g.id){T=f?.trim()?{operator:"or",conditions:[{field:["title"],operator:"contains",value:f.trim()},{field:["description"],operator:"contains",value:f.trim()}]}:void 0;const B={...T&&{where:T},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:0},ie=JSON.stringify(B);I=Hr,D=we.collectionListInfinite(E,g.id,"","CONNECTIONS",ie),e[10]=E,e[11]=f,e[12]=g.id,e[13]=D,e[14]=I,e[15]=T}else D=e[13],I=e[14],T=e[15];let k;e[16]!==E||e[17]!==T?(k=async B=>{const{pageParam:ie}=B,_e=ie===void 0?0:ie;return(await E.callTool({name:"COLLECTION_CONNECTIONS_LIST",arguments:{...T&&{where:T},orderBy:[{field:["updated_at"],direction:"asc"}],limit:100,offset:_e}})).structuredContent},e[16]=E,e[17]=T,e[18]=k):k=e[18];let _;e[19]!==D||e[20]!==k?(_={queryKey:D,queryFn:k,initialPageParam:0,getNextPageParam:lo,staleTime:3e4},e[19]=D,e[20]=k,e[21]=_):_=e[21];const{data:R,fetchNextPage:M,hasNextPage:P,isFetchingNextPage:F}=I(_),$=R?.pages.flatMap(ao)??[],q=$r($),Y=new Set($.filter(oo).map(ro)),X=Us(),J=Os(X,f),G=qn(J.loadMore,J.hasMore,J.isLoadingMore),Z=qn(M,P??!1,F),Q=N==="all"||!!y,W=Q?J.items.filter(B=>{const ie=Jr(B);return!(ie&&Y.has(ie))}):[],te=W.filter(io),ee=W.filter(so);let ne;e[22]!==r?(ne=B=>B.some(ie=>r.has(ie.id)),e[22]=r,e[23]=ne):ne=e[23];const ae=ne;let re;e[24]!==r||e[25]!==i||e[26]!==l||e[27]!==ae||e[28]!==p||e[29]!==o||e[30]!==c||e[31]!==a?(re=(B,ie,_e,Ge,be)=>{const et=ae(be),$e=be.find(ve=>!r.has(ve.id)),Ce=be[0];if(p==="browse"){const ve=Or(Ce);return n.jsx(an,{connection:{title:ie,icon:_e,description:be.length>1?`${be.length} instances`:Ge??void 0},fallbackIcon:n.jsx(Ct,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs(Kn,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[n.jsx(Xe,{size:11})," Connected"]}),onClick:()=>{U("connection_browse_clicked",{app_name:Ce.app_name??null,connection_id:Ce.id,instances_count:be.length}),c?.(ve)}},B)}return n.jsx(an,{connection:{title:ie,icon:_e,description:Ge},fallbackIcon:n.jsx(Ct,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsxs("div",{className:"flex items-center gap-1.5",children:[et&&n.jsxs(Kn,{variant:"secondary",className:"text-xs gap-1 font-normal",children:[n.jsx(Xe,{size:11})," Added"]}),n.jsx(H,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:ve=>{ve.stopPropagation(),$e?(U("connection_add_clicked",{action:"use_existing",app_name:Ce.app_name??null,connection_id:$e.id}),i&&U("agent_connection_attached",{agent_id:i,connection_id:$e.id,app_name:Ce.app_name??null,mode:"existing"}),o($e.id)):(U("connection_add_clicked",{action:"clone",app_name:Ce.app_name??null,base_connection_id:Ce.id}),a(Ce))},children:"Add"})]})},B)},e[24]=r,e[25]=i,e[26]=l,e[27]=ae,e[28]=p,e[29]=o,e[30]=c,e[31]=a,e[32]=re):re=e[32];const oe=re;let le;e[33]!==l||e[34]!==p||e[35]!==d?(le=B=>{const ie=B._meta?.["mcp.mesh"],_e=ie?.friendlyName||ie?.friendly_name||B.server?.title||B.title||B.server?.name||B.name||B.id||"",Ge=B.server?.description||B.description||null,be=B.server?.icons?.[0]?.src||Zr(B.server?.repository)||null;return n.jsx(an,{connection:{title:_e,description:Ge,icon:be},fallbackIcon:n.jsx(Ct,{}),headerActionsAlwaysVisible:!0,headerActions:n.jsx(H,{variant:"outline",size:"sm",className:"h-7 px-3 text-xs font-medium",disabled:l!==null,onClick:et=>{et.stopPropagation(),U("connection_add_clicked",{action:"connect_new",registry_item_id:B.id,app_name:B._meta?.["mcp.mesh"]?.friendlyName||B.server?.name||B.name||null}),d(B)},children:l===B.id?n.jsx(He,{size:14,className:"animate-spin"}):p==="browse"?"Connect":"Add"})},`catalog-${B.id}`)},e[33]=l,e[34]=p,e[35]=d,e[36]=le):le=e[36];const ye=le;let K;e[37]!==N||e[38]!==v||e[39]!==V||e[40]!==y?(K=!y&&n.jsxs("div",{className:"flex items-center justify-between px-5 py-3 border-b border-border shrink-0",children:[n.jsx(zr,{tabs:[{id:"all",label:"All"},{id:"connected",label:"Connected"}],activeTab:N,onTabChange:B=>v(B)}),n.jsxs(H,{variant:"outline",size:"sm",className:"h-7 px-2 text-sm",onClick:()=>{U("connections_dialog_custom_clicked"),V()},children:[n.jsx(Cs,{size:12}),"Custom Connection"]})]}),e[37]=N,e[38]=v,e[39]=V,e[40]=y,e[41]=K):K=e[41];const pe=b&&"opacity-50 pointer-events-none";let je;e[42]!==pe?(je=O("flex-1 overflow-auto p-5 transition-opacity duration-150",pe),e[42]=pe,e[43]=je):je=e[43];const Ze="grid grid-cols-[repeat(auto-fill,minmax(260px,1fr))] gap-4";let Ae;e[44]!==oe?(Ae=B=>{if(B.type==="group")return oe(B.key,B.title,B.icon,null,B.connections);const ie=B.connection;return oe(ie.id,ie.title,ie.icon,ie.description??null,[ie])},e[44]=oe,e[45]=Ae):Ae=e[45];const Te=q.map(Ae);let he;e[46]!==Z?(he=n.jsx("div",{ref:Z,className:"col-span-full h-1"}),e[46]=Z,e[47]=he):he=e[47];let ge;e[48]!==F?(ge=F&&n.jsx("div",{className:"col-span-full flex justify-center py-6",children:n.jsx(He,{size:24,className:"animate-spin text-muted-foreground"})}),e[48]=F,e[49]=ge):ge=e[49];const Be=Q&&te.length>0&&n.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[n.jsx(Nr,{size:13,className:"text-muted-foreground shrink-0"}),n.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"Verified"}),n.jsx("div",{className:"flex-1 h-px bg-border"})]}),de=Q&&te.map(ye),ut=Q&&ee.length>0&&n.jsxs("div",{className:"col-span-full flex items-center gap-2 mt-2",children:[n.jsx("span",{className:"text-sm font-medium text-muted-foreground whitespace-nowrap",children:"All connections"}),n.jsx("div",{className:"flex-1 h-px bg-border"})]}),qe=Q&&ee.map(ye);let Pe;e[50]!==G||e[51]!==X||e[52]!==Q?(Pe=Q&&X.length>0&&n.jsx("div",{ref:G,className:"col-span-full h-1"}),e[50]=G,e[51]=X,e[52]=Q,e[53]=Pe):Pe=e[53];let Se;e[54]!==J.isLoadingMore||e[55]!==Q?(Se=Q&&J.isLoadingMore&&n.jsx("div",{className:"col-span-full flex justify-center py-6",children:n.jsx(He,{size:24,className:"animate-spin text-muted-foreground"})}),e[54]=J.isLoadingMore,e[55]=Q,e[56]=Se):Se=e[56];let ke;e[57]!==Te||e[58]!==he||e[59]!==ge||e[60]!==Be||e[61]!==de||e[62]!==ut||e[63]!==qe||e[64]!==Pe||e[65]!==Se?(ke=n.jsxs("div",{className:Ze,children:[Te,he,ge,Be,de,ut,qe,Pe,Se]}),e[57]=Te,e[58]=he,e[59]=ge,e[60]=Be,e[61]=de,e[62]=ut,e[63]=qe,e[64]=Pe,e[65]=Se,e[66]=ke):ke=e[66];let xe;e[67]!==N||e[68]!==q.length||e[69]!==ee||e[70]!==u||e[71]!==te?(xe=q.length===0&&te.length===0&&ee.length===0&&n.jsx("div",{className:"flex items-center justify-center h-48 text-sm text-muted-foreground",children:u?`No connections match "${u}"`:N==="connected"?"No connections yet":"No connections available"}),e[67]=N,e[68]=q.length,e[69]=ee,e[70]=u,e[71]=te,e[72]=xe):xe=e[72];let Ne;e[73]!==je||e[74]!==ke||e[75]!==xe?(Ne=n.jsxs("div",{className:je,children:[ke,xe]}),e[73]=je,e[74]=ke,e[75]=xe,e[76]=Ne):Ne=e[76];let Oe;return e[77]!==K||e[78]!==Ne?(Oe=n.jsxs(n.Fragment,{children:[K,Ne]}),e[77]=K,e[78]=Ne,e[79]=Oe):Oe=e[79],Oe}function so(t){return!t.verified&&!t._meta?.["mcp.mesh"]?.verified&&!t.meta?.verified}function io(t){return t.verified||t._meta?.["mcp.mesh"]?.verified||t.meta?.verified}function ro(t){return t.app_name}function oo(t){return t.app_name}function ao(t){return t?.items??[]}function lo(t,e){if(t?.hasMore)return e.reduce(co,0)}function co(t,e){return t+(e?.items?.length??0)}function uo({open:t,onOpenChange:e,defaultTab:s,initialSearch:i="",...r}){const o=r.mode??"add",a="agentId"in r?r.agentId:void 0,d="addedConnectionIds"in r?r.addedConnectionIds??new Set:new Set,l="onAdd"in r&&r.onAdd?r.onAdd:v=>{},u=(v,j,E)=>{a&&U("agent_connection_attached",{agent_id:a,connection_id:v,app_name:j,mode:E})},[V,c]=w.useState(null),[m,p]=w.useState(i),[x,g]=w.useState(!1),{org:f}=ce(),{data:b}=Ut.useSession(),h=kn(),y=Ot(),A=ct(),N=v=>{e(!1),A({to:"/$org/settings/connections/$appSlug",params:{org:f.slug,appSlug:v}})},C=async v=>{c(v.app_name??v.id);try{const E=`${v.title.replace(/\s*\(\d+\)\s*$/,"")} (${Date.now().toString(36).slice(-4)})`,I=(await h.create.mutateAsync({title:E,description:v.description??null,connection_type:v.connection_type,connection_url:v.connection_url??null,connection_token:null,icon:v.icon??null,app_name:v.app_name??null,app_id:v.app_id??null,connection_headers:v.connection_headers??null})).id,T=new URL(`/api/${f.slug}/mcp/${I}`,window.location.origin),k=await en({url:T.href,token:null,orgId:f.id});if(k.supportsOAuth&&!k.isAuthenticated){const{token:_,tokenInfo:R,error:M}=await tn({connectionId:I,orgSlug:f.slug,scope:"offline_access"});if(M||!_){U("connection_oauth_failed",{connection_id:I,flow:"clone",error:M??"no_token"}),se.error(`Authentication failed: ${M??"no token received"}`),await h.delete.mutateAsync(I);return}if(U("connection_oauth_succeeded",{connection_id:I,flow:"clone"}),R)try{(await fetch(`/api/${f.slug}/connections/${I}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:R.accessToken,refreshToken:R.refreshToken,expiresIn:R.expiresIn,scope:R.scope,clientId:R.clientId,clientSecret:R.clientSecret,tokenEndpoint:R.tokenEndpoint})})).ok?await h.update.mutateAsync({id:I,data:{}}):await h.update.mutateAsync({id:I,data:{connection_token:_}})}catch{await h.update.mutateAsync({id:I,data:{connection_token:_}})}else await h.update.mutateAsync({id:I,data:{connection_token:_}});await y.invalidateQueries({queryKey:we.isMCPAuthenticated(T.href,null)})}u(I,v.app_name??null,"clone"),l(I)}catch(j){console.error("Failed to add connection:",j),se.error("Failed to add connection")}finally{c(null)}},S=async v=>{if(!(!f||!b?.user?.id)){c(v.id);try{const j=Xr(v,f.id,b.user.id,{remoteIndex:0}),E=j.connection_type==="STDIO",D=!!j.connection_url,I=E&&j.connection_headers&&typeof j.connection_headers=="object"&&"command"in j.connection_headers;if(!D&&!I){se.error("This MCP Server cannot be connected: no connection method available"),c(null);return}const{id:T}=await h.create.mutateAsync(j),k=new URL(`/api/${f.slug}/mcp/${T}`,window.location.origin),_=await en({url:k.href,token:null,orgId:f.id});if(_.supportsOAuth&&!_.isAuthenticated){const{token:R,tokenInfo:M,error:P}=await tn({connectionId:T,orgSlug:f.slug,scope:"offline_access"});if(P||!R){U("connection_oauth_failed",{connection_id:T,flow:"connect_new",error:P??"no_token"}),se.error(`Authentication failed: ${P??"no token received"}`),u(T,j.app_name??null,"new"),l(T);return}if(U("connection_oauth_succeeded",{connection_id:T,flow:"connect_new"}),M)try{(await fetch(`/api/${f.slug}/connections/${T}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:M.accessToken,refreshToken:M.refreshToken,expiresIn:M.expiresIn,scope:M.scope,clientId:M.clientId,clientSecret:M.clientSecret,tokenEndpoint:M.tokenEndpoint})})).ok?await h.update.mutateAsync({id:T,data:{}}):await h.update.mutateAsync({id:T,data:{connection_token:R}})}catch{await h.update.mutateAsync({id:T,data:{connection_token:R}})}else await h.update.mutateAsync({id:T,data:{connection_token:R}});await y.invalidateQueries({queryKey:we.isMCPAuthenticated(k.href,null)}),se.success("Connected and authenticated")}else se.success("Connected");u(T,j.app_name??null,"new"),l(T)}catch(j){console.error("Failed to connect:",j),se.error("Failed to connect")}finally{c(null)}}};return n.jsxs(Me,{open:t,onOpenChange:e,children:[n.jsxs(Le,{className:"sm:max-w-5xl h-[85vh] max-h-[85vh] flex flex-col p-0 gap-0 overflow-hidden w-[95vw]",children:[n.jsx(Fe,{className:"px-6 pt-5 pb-0 shrink-0",children:n.jsx(Ue,{className:"text-base font-semibold",children:o==="browse"?"Connections":"Add Connection"})}),n.jsx("div",{className:"pt-3 shrink-0",children:n.jsx(js,{value:m,onChange:p,placeholder:"Search connections..."})}),n.jsx(w.Suspense,{fallback:n.jsx("div",{className:"flex-1 flex items-center justify-center",children:n.jsx(He,{size:24,className:"animate-spin text-muted-foreground"})}),children:n.jsx(no,{mode:o,agentId:a,addedConnectionIds:d,onAdd:l,onCloneAndAdd:C,onConnectAndAdd:S,connectingItemId:V,search:m,onCreateConnection:()=>g(!0),onBrowseNavigate:N,defaultTab:s})})]}),n.jsx(to,{open:x,onOpenChange:g,onCreated:async v=>{g(!1);const j=new URL(`/api/${f.slug}/mcp/${v}`,window.location.origin),E=await en({url:j.href,token:null,orgId:f.id});if(E.supportsOAuth&&!E.isAuthenticated){const{token:D,tokenInfo:I,error:T}=await tn({connectionId:v,orgSlug:f.slug,scope:"offline_access"});if(T||!D){U("connection_oauth_failed",{connection_id:v,flow:"custom_create",error:T??"no_token"}),se.error(`Authentication failed: ${T??"no token received"}`),await h.delete.mutateAsync(v);return}if(U("connection_oauth_succeeded",{connection_id:v,flow:"custom_create"}),I)try{(await fetch(`/api/${f.slug}/connections/${v}/oauth-token`,{method:"POST",headers:{"Content-Type":"application/json"},credentials:"include",body:JSON.stringify({accessToken:I.accessToken,refreshToken:I.refreshToken,expiresIn:I.expiresIn,scope:I.scope,clientId:I.clientId,clientSecret:I.clientSecret,tokenEndpoint:I.tokenEndpoint})})).ok?await h.update.mutateAsync({id:v,data:{}}):await h.update.mutateAsync({id:v,data:{connection_token:D}})}catch{await h.update.mutateAsync({id:v,data:{connection_token:D}})}else await h.update.mutateAsync({id:v,data:{connection_token:D}});await y.invalidateQueries({queryKey:we.isMCPAuthenticated(j.href,null)})}u(v,null,"custom"),l(v),e(!1)}})]})}const Vo='# Broken Link Finder\n\nYou are the **Broken Link Finder**, a specialist agent focused on the health of the site\'s link structure.\n\n## Your mission\n\nDiscover and track broken links and long redirect chains. You are invoked as a sub-task by an orchestrator agent — your job is to detect link health and return a structured findings report. The orchestrator decides what to do with your findings (file issues, dedup, etc.).\n\nYou are **mechanical**: collect → check → classify → emit findings. Leave subjective judgment to other agents.\n\n## Input (expect this in the prompt)\n\nThe orchestrator will pass per-site configuration. Expected fields:\n\n```yaml\nsite_root_url: <https://example.com>\nmax_pages: <optional integer, default 100, max 200>\ncheck_external: <optional bool, default false>\n```\n\nIf required fields are missing (`site_root_url`), return an error summary and stop — do not proceed with defaults or guess.\n\n## Available tools\n\n- **site-diagnostics MCP**:\n - `collect_site_links` — discovers all unique outbound link targets across the site and returns them with source-page attribution. Does NOT check status.\n - `check_urls` — takes a batch of URLs (max 100 per call) and returns their HTTP status, error kind, and redirect chains.\n\n---\n\n## Step 1 — Collect link targets (one call)\n\nCall `collect_site_links` once to get the full deduplicated list of outbound link targets and their source pages:\n\n```\ncollect_site_links({\n url: <site_root_url from input>,\n maxPages: <max_pages from input, default 100>,\n checkExternal: <check_external from input, default false>\n})\n```\n\nThis returns:\n- `links`: array of `{ targetUrl, scope: "internal"|"external", sourcePages, sourcePagesTotal }` — **each target appears exactly once**\n- Metadata: `pagesCrawled`, `pagesFetched`, `linksSkipped`, optional `error`\n\n**If `result.error` is set**, the scan failed at the root (e.g. site unreachable). Return a single finding with `kind: site-unreachable` and the error in `evidence`. Then stop.\n\nKeep the `links` array in memory — you\'ll need it in Step 3 for classification and source attribution.\n\n## Step 2 — Check the targets (batched calls)\n\nExtract `targetUrl` from each entry in `links`. Slice the resulting URL list into **disjoint batches of up to 100 URLs** and call `check_urls` on each batch:\n\n```\ncheck_urls({ urls: batch_of_100_urls })\n```\n\nCollect every batch\'s `results` entries into a single flat array. Order doesn\'t matter — you\'ll join back by `targetUrl`.\n\n**Rules for this step:**\n- Slice deterministically (e.g. consecutive slices of 100) so batches are disjoint. Do not pass the same URL in two batches.\n- Call `check_urls` sequentially or in parallel — your choice. The tool is idempotent.\n- If a single `check_urls` call errors entirely, skip that batch and continue with the others. Note the skipped count in the wrap-up summary.\n\n## Step 3 — Classify each finding\n\nFor every target with a check result, join the `collect_site_links` entry (for `scope`, `sourcePages`, `sourcePagesTotal`) with the `check_urls` entry (for `status`, `errorKind`, `chain`, `hops`).\n\nA finding is emitted for:\n- **Broken**: `status >= 400` OR `status === 0`\n- **Long redirect chain**: `hops > 3` (even if the final status is 2xx)\n\nOther targets (2xx, short-chain redirects) produce no finding.\n\nMap check result → `kind`:\n\n| Check result | `kind` |\n|---|---|\n| `status: 404` | `link-404` |\n| `status: 4xx` (not 404) | `link-4xx-other` |\n| `status: 5xx` | `link-5xx` |\n| `status: 0`, `errorKind: "dns"` | `link-dns-failure` |\n| `status: 0`, `errorKind: "redirect-loop"` | `redirect-loop` |\n| `hops > 3` (success final status) | `redirect-chain-long` |\n| `status: 0`, `errorKind: "timeout"` or `"connection"` | **skip — no finding** |\n\n**Important**: timeouts and connection errors are **not** broken links — they just mean the server didn\'t respond in our time window. Could be a slow server, an overloaded CDN, rate-limiting against our bot, or a transient network blip. Flagging these as broken produces false positives. If a URL is genuinely dead, it\'ll usually surface as `dns`, a 4xx/5xx, or a redirect loop. Skip timeout/connection entries silently.\n\n## Catalog of severity rules\n\n**High severity:**\n- `link-404` when `scope: "internal"`\n- `link-5xx` when `scope: "internal"`\n- `redirect-loop` (either scope)\n\n**Medium severity:**\n- `link-4xx-other` (internal)\n- `redirect-chain-long` (internal)\n- `link-404` (external) when `sourcePagesTotal >= 5`\n\n**Low severity:**\n- `link-404` (external) when `sourcePagesTotal < 5`\n- `link-dns-failure` (external)\n- `redirect-chain-long` (external)\n- `link-4xx-other` on external scope\n\n## Step 4 — Return a structured findings report\n\nReturn a single response with this shape (YAML preferred):\n\n```yaml\nspecialist: links\nsummary:\n pages_crawled: <pagesCrawled>\n pages_fetched: <pagesFetched>\n unique_link_targets: <links.length>\n targets_dropped_by_collect_cap: <linksSkipped>\n batches_checked: <n>\n batches_skipped_due_to_errors: <n>\n broken_links: <n> # internal + external\n long_redirect_chains: <n>\nfindings:\n - kind: <kind slug>\n severity: <low|medium|high>\n target:\n url: <full broken URL>\n route: <path if internal; otherwise the external host>\n scope: <internal | external>\n evidence: |\n - Status code / error: <e.g. `404 Not Found`, `DNS failure`, `redirect-loop`>\n - Redirect chain (if applicable): A → B → C → D → E\n - Found on pages (at time of detection):\n - /page-1\n - /page-2\n - (... up to 20 from `sourcePages`)\n - Total pages linking to this target: <sourcePagesTotal>\n impact: <1 sentence tailored to scope + kind>\n suggested_fix: |\n <actionable:>\n - If internal 404: update link to correct destination OR create 301 redirect\n - If internal 5xx: investigate server-side handler for the route (may be app bug)\n - If redirect chain: shorten to single-hop direct redirect in routing config\n - If external: update link to equivalent resource OR remove the mention\n - List likely files/components if you can infer (e.g. "appears on many pages — likely in a shared component like `app/components/Nav.tsx` or menu config")\n - ...\n```\n\nIf `collect_site_links` returned `error`, return a single `kind: site-unreachable` finding with the error in `evidence`.\n\nIf there are zero findings, return `findings: []` — that is the correct output for a healthy link graph.\n\n---\n\n## General rules\n\n- **Trust the scanner.** If `check_urls` reports a URL as broken or long-chain, emit a finding. Do not re-verify with other tools.\n- **Accept some flakiness.** A transient network blip may cause a false positive once. Downstream dedup across runs resolves it.\n- **Group by destination, not by origin.** One broken URL = one finding, even if linked on 50 pages. `collect_site_links` already returns it grouped this way.\n- **Prioritize internals.** Broken external links are the other site\'s responsibility; report but with lower severity.\n- **Never invent status codes.** Report what the scanner returned.\n',mo='# SEO Auditor\n\nYou are the **SEO Auditor**, a specialist agent focused on technical SEO hygiene.\n\n## Your mission\n\nAudit the on-page SEO health of target URLs and return a structured findings report. You focus on **technical SEO** (meta tags, structured data, canonicals, sitemap/robots, heading structure, indexability) — not editorial content or keyword strategy (those are the scope of other agents).\n\nYou are invoked as a sub-task by an orchestrator agent. Your job is to analyze and report. The orchestrator decides what to do with your findings (file issues, dedup against history, etc.).\n\n## Input (expect this in the prompt)\n\nThe orchestrator will pass per-site configuration. Expected fields:\n\n```yaml\nurls:\n - <url to audit>\n - <... one or more>\n```\n\nIf required fields are missing, return an error summary and stop — do not proceed with defaults or guess.\n\n## Available tools\n\n- **site-diagnostics MCP**: `audit_seo`, `fetch_page`, `render_page`, `crawl_site`\n\n---\n\n## Step 1 — Diagnostic\n\nFor each target URL:\n\n1. **Structured audit**: call `audit_seo({ url })`. It returns a structured report — use it as your primary source.\n2. **Raw HTML check**: use `fetch_page({ url })` to see the HTML served (important for crawlers that don\'t execute JS). Confirm critical meta tags are in the initial HTML, not only after hydration.\n3. **Post-render check**: use `render_page({ url })` to see the final DOM. Problems like canonical being overwritten by JS show up here.\n4. **Site structure checks** (only if you have permission for broad crawling, or via sampling): use `crawl_site` to identify orphan pages, canonical loops, or excessive navigation depth.\n5. **Always check**: `/robots.txt` and `/sitemap.xml` via `fetch_page`. These two are root-level and affect the whole site.\n\nOrganize findings into a list. Each finding must have:\n- `kind` (kebab-case slug, see catalog below)\n- `severity` (high | medium | low, see criteria below)\n- `target.url` and `target.route` (normalize: lowercase host, no query, no trailing slash except for `/`)\n- `evidence` (raw data: CSS selector, HTML snippet, observed value)\n- `impact` (1-2 sentences connecting to real metrics)\n- `suggested_fix` (actionable; include file/line if you can infer from framework patterns)\n\n## Step 1.5 — Validate page intent (critical; runs before classification)\n\nBefore you emit *any* finding about a page\'s title, meta description, headings, or indexability, you must answer one question: **did the site owner intend this URL to be a public, indexable page?**\n\nIf the answer is no, the observed "problems" are intentional configuration, not bugs. Reporting them wastes maintainer time and erodes this agent\'s credibility.\n\n### Three signals that the URL is NOT a real public page\n\nCheck these in order. Hitting any one of them means **skip all SEO findings for this URL** except legitimately site-wide problems (e.g. broken sitemap, broken robots.txt).\n\n**Signal 1 — Not in sitemap.** Fetch `/sitemap.xml` (and its child sitemaps, if it\'s a sitemap index). If the URL doesn\'t appear in any sitemap, the owner didn\'t declare it as public. Common on e-commerce platforms where routes like `/p`, `/c`, `/blog` are catchall or routing prefixes, not real pages.\n\n**Signal 2 — Explicit `noindex` + not in sitemap.** If the page serves `<meta name="robots" content="noindex*">` **and** isn\'t in the sitemap, this is a deliberate double-lock by the owner. Respect it. Do **not** flag `noindex-on-important-page` in this case.\n\n**Signal 3 — Title is the URL slug (template fallback).** If `<title>` equals the last path segment (e.g. `<title>blog</title>` for `/blog`, `<title>p</title>` for `/p`), the page is being rendered by a fallback template — nobody configured real content for this route. Skip.\n\n### Platform-specific catchalls (especially Brazilian e-commerce / VTEX / deco-cx)\n\nThese paths are routing prefixes, **not pages**. They may return HTTP 200 but are not meant to be indexable:\n\n- `/p`, `/c`, `/b` — VTEX product / category / brand route prefixes. Real pages live at `/<slug>/p`, `/<slug>/c`, etc. The bare prefixes are catchalls.\n- `/blog`, `/blogs`, `/editorial`, `/revista`, `/conteudo`, `/magazine`, `/noticias`, `/artigos` — common editorial prefixes. If the site doesn\'t have an editorial section, these hit a fallback.\n- `/search`, `/busca`, `/s` — search endpoints, not indexable pages.\n- `/departamento`, `/categoria` — category prefixes.\n- `/checkout`, `/cart`, `/carrinho`, `/login`, `/account`, `/minha-conta` — transactional/private routes. Intentionally `noindex`.\n\n### The "is this page actually important?" checklist\n\nBefore emitting a finding that calls a page "important" (like `noindex-on-important-page` or `title-missing` on anything critical):\n\n1. Is the URL in `/sitemap.xml`? → If no, skip.\n2. Does the page have substantive, unique content (not a fallback with title = URL slug)? → If no, skip.\n3. Is the path a known platform catchall (see list above)? → If yes, skip.\n\nOnly flag if all three pass.\n\n### What still counts as a finding even on non-indexable pages\n\nSite-wide SEO issues affect the whole domain and are worth reporting regardless of individual page intent:\n- `sitemap-missing` (the sitemap itself is broken)\n- `robots-blocking-important-path` (robots.txt blocks something that IS in the sitemap)\n- `structured-data-invalid` on pages that ARE in the sitemap\n- Duplicate titles / meta descriptions across pages that ARE in the sitemap\n\n## Catalog of `kind`\n\nTwo flavors of finding:\n\n- **Per-page** kinds — emitted when auditing a specific URL (e.g. `audit_seo` of a single page OR when your targeted inspection of one of the input URLs finds the issue). Marked **[intent-gated]** — must pass Step 1.5 before being emitted. Target is the specific URL.\n- **Aggregate** kinds — emitted once per site-wide pattern detected by `audit_seo`. Marked **[aggregate]**. Target is the site root (`/`). Evidence MUST include the affected URL sample from `audit_seo.issues[].sampleUrls`. One finding per aggregate kind per site.\n\n**High severity (per-page):**\n- `noindex-on-important-page` **[intent-gated]** — meta robots `noindex` on a page that IS in the sitemap and should be indexed\n- `canonical-pointing-to-wrong-url` **[intent-gated]** — canonical points to a different URL that isn\'t the canonical equivalent\n- `canonical-missing-on-paginated-or-faceted` **[intent-gated]** — pagination/filters without canonical\n- `title-missing` **[intent-gated]** — no `<title>` or empty on a page that IS in the sitemap\n- `structured-data-invalid` **[intent-gated]** — JSON-LD with syntax error or invalid schema.org\n\n**High severity (site-wide):**\n- `sitemap-missing` — `/sitemap.xml` returns 404 or 5xx\n- `robots-blocking-important-path` — `/robots.txt` disallows a path that IS in the sitemap\n- `broken-links-site-wide` **[aggregate]** — `audit_seo` reports broken outbound links across the site\n- `non-indexable-pages-site-wide` **[aggregate]** — `audit_seo` reports many non-indexable pages (note: some non-indexable pages are intentional catchalls — only high severity if the absolute count is large relative to `totalPagesCrawled`, e.g. > 30%)\n\n**Medium severity (per-page):**\n- `meta-description-missing` **[intent-gated]** — no `<meta name="description">` on a sitemap page the agent audited directly\n- `h1-missing` **[intent-gated]** — no `<h1>` on a sitemap page the agent audited directly\n- `h1-duplicate` **[intent-gated]** — multiple `<h1>` on a single page\n- `og-tags-missing` **[intent-gated]** — `og:title` and/or `og:description` missing\n- `structured-data-missing` **[intent-gated]** — page-type (product, article, etc.) without relevant JSON-LD\n- `title-too-long` **[intent-gated]** — `<title>` > 60 characters (truncation in SERP)\n- `title-too-short` **[intent-gated]** — `<title>` < 10 characters (rare; usually means template fallback — double-check page intent)\n- `meta-description-too-long` **[intent-gated]** — description > 160 characters\n\n**Medium severity (site-wide):**\n- `pages-missing-h1` **[aggregate]** — `audit_seo` reports N pages without an H1 tag\n- `pages-missing-meta-description` **[aggregate]** — `audit_seo` reports N pages without a meta description\n- `duplicate-titles` **[aggregate]** — multiple pages share the same `<title>`\n- `duplicate-meta-descriptions` **[aggregate]** — multiple pages share the same meta description\n- `duplicate-content` **[aggregate]** — multiple pages share substantially identical content\n- `broken-resources-site-wide` **[aggregate]** — broken images / scripts across the site\n- `hreflang-broken` — `hreflang` attribute with invalid value or broken reciprocity\n\n**Low severity (per-page):**\n- `meta-description-too-short` **[intent-gated]** — description < 50 characters\n- `og-image-missing` **[intent-gated]** — `og:image` missing\n- `heading-hierarchy-skipped` **[intent-gated]** — jumps from H1 to H3, etc.\n\n**Low severity (site-wide):**\n- `internal-link-using-absolute-url` — internal links with absolute URLs\n\n### Evidence requirements for aggregate kinds\n\nWhen emitting an `[aggregate]` kind, the `evidence` of the finding MUST include:\n\n1. **Total count** — from `audit_seo.issues[].count`\n2. **Sample URLs** — from `audit_seo.issues[].sampleUrls`. Render up to all 20 entries as a bulleted list. If `count > sampleUrls.length`, add a line like `(and <count - sampleUrls.length> more)`.\n3. **If `sampleUrls` is empty** (the tool didn\'t expose per-URL detail — happens for `broken-links-site-wide`, `duplicate-content`, `broken-resources-site-wide`), note it explicitly: `Note: audit_seo did not return per-URL detail for this issue type. A human will need to inspect the full audit_seo report or re-run with deeper crawling.`\n\nAn aggregate finding without either sample URLs or the note is **not actionable** and must not be emitted.\n\nTarget for aggregate kinds stays `target.url: https://<host>/` and `target.route: /`.\n\n## Step 2 — Return a structured findings report\n\nReturn a single response with this shape (YAML or JSON; YAML preferred for readability):\n\n```yaml\nspecialist: seo\nsummary:\n urls_audited: <n>\n findings: <n>\n diagnostic_failures: <n> # urls where audit tooling errored\nfindings:\n - kind: <kind slug>\n severity: <low|medium|high>\n target:\n url: <full URL>\n route: <normalized path>\n evidence: |\n <multi-line raw data: observed value, selector, HTML snippet, audit_seo output>\n impact: <1-2 sentences connecting to ranking/indexation/CTR>\n suggested_fix: <actionable; likely file/component, pseudo-code, correct value>\n - ...\n```\n\nIf a URL\'s diagnostic tooling errored entirely, emit a single `kind: diagnostic-failed` finding for that URL with the error in `evidence` instead of inventing data.\n\nIf there are zero findings, return `findings: []` — that is the correct output for healthy targets.\n\n---\n\n## General rules\n\n- **Never invent data in `evidence`.** If a tool failed, report it via `kind: diagnostic-failed` and skip the finding.\n- Always normalize `route`: lowercase host, no trailing slash (except for `/`), no query string, no fragment.\n- Your credibility is your currency. False positives erode trust — if you\'re 50% sure, don\'t emit a finding; investigate further or mark as `severity:low`.\n- **Never report a page as broken when it\'s a known catchall.** URLs like `/p`, `/c`, `/blog`, `/search`, `/busca` on e-commerce sites are routing prefixes, not pages. If the title is the URL slug and the page carries `noindex`, the owner is deliberately hiding it. That\'s correct behavior, not a bug.\n- **Sitemap is the ground truth for "is this page public?"**. When in doubt about whether to emit a finding on a URL, fall back to: "Is this URL in /sitemap.xml?" If not, default to silence.\n',fo=`# Performance Watchdog
2
2
 
3
3
  You are the **Performance Watchdog**, a specialist agent focused on web performance.
4
4
 
@@ -1 +1 @@
1
- import{bb as _}from"./index-BGvMfUr2.js";var b={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),S;S=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===S||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,b.exports=I()),b.exports}var g=C();const h=_(g);export{h as R,g as r};
1
+ import{bb as _}from"./index-b_n-uXmh.js";var b={exports:{}},r={};var $;function I(){if($)return r;$=1;var m=Symbol.for("react.element"),y=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),n=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),c=Symbol.for("react.provider"),f=Symbol.for("react.context"),x=Symbol.for("react.server_context"),u=Symbol.for("react.forward_ref"),i=Symbol.for("react.suspense"),l=Symbol.for("react.suspense_list"),a=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),R=Symbol.for("react.offscreen"),S;S=Symbol.for("react.module.reference");function t(e){if(typeof e=="object"&&e!==null){var d=e.$$typeof;switch(d){case m:switch(e=e.type,e){case o:case s:case n:case i:case l:return e;default:switch(e=e&&e.$$typeof,e){case x:case f:case u:case p:case a:case c:return e;default:return d}}case y:return d}}}return r.ContextConsumer=f,r.ContextProvider=c,r.Element=m,r.ForwardRef=u,r.Fragment=o,r.Lazy=p,r.Memo=a,r.Portal=y,r.Profiler=s,r.StrictMode=n,r.Suspense=i,r.SuspenseList=l,r.isAsyncMode=function(){return!1},r.isConcurrentMode=function(){return!1},r.isContextConsumer=function(e){return t(e)===f},r.isContextProvider=function(e){return t(e)===c},r.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===m},r.isForwardRef=function(e){return t(e)===u},r.isFragment=function(e){return t(e)===o},r.isLazy=function(e){return t(e)===p},r.isMemo=function(e){return t(e)===a},r.isPortal=function(e){return t(e)===y},r.isProfiler=function(e){return t(e)===s},r.isStrictMode=function(e){return t(e)===n},r.isSuspense=function(e){return t(e)===i},r.isSuspenseList=function(e){return t(e)===l},r.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===o||e===s||e===n||e===i||e===l||e===R||typeof e=="object"&&e!==null&&(e.$$typeof===p||e.$$typeof===a||e.$$typeof===c||e.$$typeof===f||e.$$typeof===u||e.$$typeof===S||e.getModuleId!==void 0)},r.typeOf=t,r}var v;function C(){return v||(v=1,b.exports=I()),b.exports}var g=C();const h=_(g);export{h as R,g as r};
@@ -1,4 +1,4 @@
1
- import{e as ae,r as R,f as cn,s as lt,j as s,B as ne,x as qe,c as le,ba as Rn,n as Ys,K as At,E as os,d as zs,t as Bt}from"./index-BGvMfUr2.js";import{S as Bs}from"./search-input-LdRGRYga.js";import{r as is,c as ls,d as cs,e as ds,P as Ue}from"./index-C-49LFOm.js";import{E as dn}from"./empty-state-CGM_VDGy.js";import{B as Ke}from"./badge-Vn5olYFX.js";import{b as ct,P as dt,a as ut}from"./popover-CENSHA5K.js";import{T as Mt,a as kt,b as Ct}from"./tooltip-8sj0FPxK.js";import{i as Ht,t as gt}from"./ChevronDown-BMTA9_Ap.js";import{e as un,c as _t,n as Wn}from"./XCircle-CVED_3Ss.js";import{a as Hs}from"./SearchMd-BI1BY0Xc.js";import{i as qs}from"./Play-Ch3KWC7Z.js";import{Y as Vs,Z as Us,x as Ks,X as Gs}from"./agent-icon-B5EEcofO.js";import{M as An}from"./monaco-editor-D9GcAVz1.js";import{u as Qs}from"./use-members-elTW2IMS.js";import{u as $n}from"./use-connection-EBpfvjCE.js";import{S as mn,u as fn,i as Js,g as Xs,d as Zs}from"./constants-BVU634u9.js";import{b as ea}from"./use-virtual-mcp-BOr32Cw9.js";import{n as Ge}from"./Container-CIDvyJX8.js";import{c as ta}from"./XClose-C1T9ODT_.js";import{s as na}from"./Plus-gLdNtuBE.js";import{s as sa}from"./Trash01-OgQVP2St.js";import{I as pt}from"./input-r-FVR1hH.js";import{C as Yn}from"./checkbox-DBBm6J90.js";import{d as aa,C as ra,b as zn,e as oa,a as ia,f as la}from"./command-dTUEruN1.js";import{a as Pt,b as Tt,c as Ot,d as Re,S as Ft}from"./select-CKhnD_dJ.js";import{S as ca}from"./scroll-area-KyXayDS_.js";import{n as da}from"./ZapSquare-B03aoE62.js";import{i as ua}from"./ChevronRight-QeeRSp8z.js";import{T as ma}from"./textarea-DWnLf30W.js";import{C as us}from"./collection-tabs-BhSzOngN.js";import{S as fa}from"./switch-DIPW9oSx.js";import{L as ha}from"./label-CDE7or5s.js";import{I as ze}from"./integration-icon-Btl0P6Zi.js";import{A as $t}from"./avatar-B5CcOSaZ.js";import{C as ms}from"./card-DHIGW2Gm.js";import{K as st}from"./monitoring-stats-row-9xBJedBt.js";import{c as fs}from"./use-mcp-tools-yGAchpt7.js";import{g as xa}from"./connection-slug-eyAPH6o3.js";import{u as hs}from"./useSuspenseInfiniteQuery-hnE5tAGb.js";import{T as ke,a as mt,b as hn,c as xn,d as pn,e as ce}from"./table-CyZKmPMu.js";import{n as xs}from"./ChevronUp-BHiGg6ZY.js";import{u as gn}from"./use-infinite-scroll-Blb-Zkmq.js";import{u as pa}from"./useInfiniteQuery-D6CYdRiz.js";import{w as ga,x as va}from"./pair-TlV_Y8fY.js";import{S as Lt}from"./task-status-B4S1zCuU.js";import"./X-fvjwb2RC.js";import"./AlertCircle-BFJK99tM.js";import"./Tool01-D1xeep7h.js";import"./RefreshCcw01-DKf5Q7r6.js";import"./ArrowNarrowLeft-DCbP5K-g.js";import"./ArrowUpRight-BvzWf0q7.js";import"./Users03-DVwMLxYo.js";import"./CheckCircle-qqOIolWc.js";import"./DotsVertical-Bd2_5HYZ.js";import"./Star01-DInOTW7T.js";import"./Palette-DescRwe0.js";import"./LinkExternal01-DCnMv_g7.js";import"./Lock01-Ds-YEZnN.js";import"./Sun-DLagUbKM.js";import"./Settings02-D0o0GA4h.js";import"./Shield01-btPXI3TS.js";import"./User01-Cr_qCqW_.js";import"./Zap-u543Wk9m.js";import"./index-BizlRsAk.js";import"./use-org-auth-client-kuXtTIo4.js";import"./use-collections-DbJUoPI1.js";import"./index-C4B8wMiM.js";import"./index-CxcuSo6g.js";import"./infiniteQueryObserver-B9_hQDN4.js";import"./use-copy-DNbmGYTy.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dialog-Cc5-s5cq.js";import"./content-blocks-o63cs2vh.js";import"./types-CPAcvDGA.js";import"./chat-context-DZ4ItXeY.js";import"./use-ai-providers-TD5f5keD.js";import"./use-decopilot-events-CTJPtEAG.js";import"./create-sse-subscription-CxkOgzKf.js";import"./use-tasks-BSCdum36.js";import"./use-organization-settings-vi5z2D5l.js";import"./shell-layout-BTN4hGpk.js";import"./required-auth-layout-ByW838Wg.js";import"./use-org-sso-DzmlEuU4.js";const tn={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3};function Qe(t){return t.filter(e=>e.key.trim()).map(e=>{const n=encodeURIComponent(e.key.trim()),a=encodeURIComponent(e.value||"");return`${n}:${e.operator}:${a}`}).join(",")}function ba(t){return t?t.split(",").map(e=>{const[n,a,...r]=e.split(":");return{key:decodeURIComponent(n||""),operator:a||"eq",value:decodeURIComponent(r.join(":")||"")}}):[]}function St(t){return t.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
1
+ import{e as ae,r as R,f as cn,s as lt,j as s,B as ne,x as qe,c as le,ba as Rn,n as Ys,K as At,E as os,d as zs,t as Bt}from"./index-b_n-uXmh.js";import{S as Bs}from"./search-input-6INcGAwd.js";import{r as is,c as ls,d as cs,e as ds,P as Ue}from"./index-BZhxvvXQ.js";import{E as dn}from"./empty-state-S_EjXlZP.js";import{B as Ke}from"./badge-CRHmlYav.js";import{b as ct,P as dt,a as ut}from"./popover-CALdcEX7.js";import{T as Mt,a as kt,b as Ct}from"./tooltip-B-nRvfy-.js";import{i as Ht,t as gt}from"./ChevronDown-ByP-e484.js";import{e as un,c as _t,n as Wn}from"./XCircle-Dp1Lqd1t.js";import{a as Hs}from"./SearchMd-vBRV-l3E.js";import{i as qs}from"./Play-O7ldNAxa.js";import{Y as Vs,Z as Us,x as Ks,X as Gs}from"./agent-icon-Be_PnRh0.js";import{M as An}from"./monaco-editor-BY6pRUNM.js";import{u as Qs}from"./use-members-8sha4K9R.js";import{u as $n}from"./use-connection-DuXPSqwF.js";import{S as mn,u as fn,i as Js,g as Xs,d as Zs}from"./constants-Cj0U39_n.js";import{b as ea}from"./use-virtual-mcp-Qy5dDA1Q.js";import{n as Ge}from"./Container-DzkLD13G.js";import{c as ta}from"./XClose-lRlzG-cb.js";import{s as na}from"./Plus-Bihyskqy.js";import{s as sa}from"./Trash01-f4CvhuWB.js";import{I as pt}from"./input-C80VzPpQ.js";import{C as Yn}from"./checkbox-CHYA_sQZ.js";import{d as aa,C as ra,b as zn,e as oa,a as ia,f as la}from"./command-CZWy1buB.js";import{a as Pt,b as Tt,c as Ot,d as Re,S as Ft}from"./select-CaDZpVbI.js";import{S as ca}from"./scroll-area-18YOEnqD.js";import{n as da}from"./ZapSquare-_fsDSSOX.js";import{i as ua}from"./ChevronRight-BUfZMnd9.js";import{T as ma}from"./textarea-Dx8hdqfA.js";import{C as us}from"./collection-tabs-Bj7BShdC.js";import{S as fa}from"./switch-BUxRExf5.js";import{L as ha}from"./label-2a4WSF52.js";import{I as ze}from"./integration-icon-LX1nChXa.js";import{A as $t}from"./avatar-BBnvw18x.js";import{C as ms}from"./card-DoqftRz7.js";import{K as st}from"./monitoring-stats-row-BPKt_N1O.js";import{c as fs}from"./use-mcp-tools-BkDSNv3W.js";import{g as xa}from"./connection-slug-eyAPH6o3.js";import{u as hs}from"./useSuspenseInfiniteQuery-4BiVmPoE.js";import{T as ke,a as mt,b as hn,c as xn,d as pn,e as ce}from"./table-CT5HWSPV.js";import{n as xs}from"./ChevronUp-TwiYbtUW.js";import{u as gn}from"./use-infinite-scroll-HGu4x7ZU.js";import{u as pa}from"./useInfiniteQuery-B82zG1fE.js";import{w as ga,x as va}from"./pair-CBvrXYZC.js";import{S as Lt}from"./task-status-tGA8S8H-.js";import"./X-BiphajNJ.js";import"./AlertCircle-BkX4HzbS.js";import"./Tool01-Dqyo2VjJ.js";import"./RefreshCcw01-BzT-xyrO.js";import"./ArrowNarrowLeft-BebHkn1X.js";import"./ArrowUpRight-uszsF274.js";import"./Users03-IortA-KV.js";import"./CheckCircle-Boq6G01L.js";import"./DotsVertical-BrUfBHwt.js";import"./Star01-ByzmPd4J.js";import"./Palette-1HvN4NnC.js";import"./LinkExternal01-gfL-Fk4b.js";import"./Lock01-CI-miN4g.js";import"./Sun-xA_CdWAJ.js";import"./Settings02-eiwWD3s7.js";import"./Shield01-D7ml37xT.js";import"./User01-lDhxACAV.js";import"./Zap-ebWdIwXf.js";import"./index-pdnGjAa-.js";import"./use-org-auth-client-Ev284uyK.js";import"./use-collections-CqIGWKSp.js";import"./index-BP0vNLKa.js";import"./index-ClNUcJ8s.js";import"./infiniteQueryObserver-DMFjl81X.js";import"./use-copy-CJlR4d5Y.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./dialog-BdVY7mqq.js";import"./content-blocks-o63cs2vh.js";import"./types-hw9no7At.js";import"./chat-context-JbYHex_O.js";import"./use-ai-providers-Bc_Jl0e6.js";import"./use-decopilot-events-CWIgEPKA.js";import"./create-sse-subscription-CxkOgzKf.js";import"./use-tasks-DFEEn9nC.js";import"./use-organization-settings-DFNDQvXK.js";import"./shell-layout-Cdsgdqci.js";import"./required-auth-layout-CnSE-XLF.js";import"./use-org-sso-CD6laYaL.js";const tn={maxJsonRenderSize:5e4,pageSize:50,streamingRefetchInterval:3e3};function Qe(t){return t.filter(e=>e.key.trim()).map(e=>{const n=encodeURIComponent(e.key.trim()),a=encodeURIComponent(e.value||"");return`${n}:${e.operator}:${a}`}).join(",")}function ba(t){return t?t.split(",").map(e=>{const[n,a,...r]=e.split(":");return{key:decodeURIComponent(n||""),operator:a||"eq",value:decodeURIComponent(r.join(":")||"")}}):[]}function St(t){return t.filter(e=>e.key.trim()).map(e=>{switch(e.operator){case"eq":return`${e.key}=${e.value}`;case"contains":return`${e.key}~${e.value}`;case"exists":return`${e.key}?`;case"in":return`${e.key}@${e.value}`}}).join(`
2
2
  `)}function Bn(t){return t.trim()?t.split(`
3
3
  `).map(e=>e.trim()).filter(e=>e.length>0).map(e=>{if(e.endsWith("?"))return{key:e.slice(0,-1),operator:"exists",value:""};if(e.includes("=")){const[n,...a]=e.split("=");return{key:n||"",operator:"eq",value:a.join("=")}}if(e.includes("~")){const[n,...a]=e.split("~");return{key:n||"",operator:"contains",value:a.join("~")}}if(e.includes("@")){const[n,...a]=e.split("@");return{key:n||"",operator:"in",value:a.join("@")}}return{key:e,operator:"exists",value:""}}):[]}function ya(t){const e={},n={},a=[],r={};for(const o of t)if(o.key.trim())switch(o.operator){case"eq":o.value&&(e[o.key]=o.value);break;case"contains":o.value&&(n[o.key]=`%${o.value}%`);break;case"exists":a.push(o.key);break;case"in":o.value&&(r[o.key]=o.value);break}return{properties:Object.keys(e).length>0?e:void 0,propertyPatterns:Object.keys(n).length>0?n:void 0,propertyKeys:a.length>0?a:void 0,propertyInValues:Object.keys(r).length>0?r:void 0}}function Hn(t){if(!t)return{content:"null",isTruncated:!1,originalSize:4};if(typeof t._decocms_truncated=="string")return{content:t._decocms_truncated,isTruncated:!0,originalSize:t._decocms_truncated.length};const e=JSON.stringify(t,null,2),n=e.length;return n<=tn.maxJsonRenderSize?{content:e,isTruncated:!1,originalSize:n}:{content:e.slice(0,tn.maxJsonRenderSize)+`
4
4
 
@@ -0,0 +1 @@
1
+ import{e as n,j as r,r as d,g as h,O as f,l as u}from"./index-b_n-uXmh.js";import{S as j,a as b,b as S}from"./index-BZhxvvXQ.js";import{u as _}from"./tooltip-B-nRvfy-.js";import{u as k,T as y,a as T,b as i,S as g}from"./index-BY8F27EB.js";import{C as v}from"./chat-context-JbYHex_O.js";import"./X-BiphajNJ.js";import"./agent-icon-Be_PnRh0.js";import"./AlertCircle-BkX4HzbS.js";import"./Tool01-Dqyo2VjJ.js";import"./XClose-lRlzG-cb.js";import"./RefreshCcw01-BzT-xyrO.js";import"./ArrowNarrowLeft-BebHkn1X.js";import"./XCircle-Dp1Lqd1t.js";import"./ArrowUpRight-uszsF274.js";import"./ZapSquare-_fsDSSOX.js";import"./Users03-IortA-KV.js";import"./CheckCircle-Boq6G01L.js";import"./ChevronDown-ByP-e484.js";import"./ChevronRight-BUfZMnd9.js";import"./ChevronUp-TwiYbtUW.js";import"./DotsVertical-BrUfBHwt.js";import"./Container-DzkLD13G.js";import"./Star01-ByzmPd4J.js";import"./Palette-1HvN4NnC.js";import"./SearchMd-vBRV-l3E.js";import"./LinkExternal01-gfL-Fk4b.js";import"./Lock01-CI-miN4g.js";import"./Sun-xA_CdWAJ.js";import"./Play-O7ldNAxa.js";import"./Plus-Bihyskqy.js";import"./Settings02-eiwWD3s7.js";import"./Shield01-D7ml37xT.js";import"./Trash01-f4CvhuWB.js";import"./User01-lDhxACAV.js";import"./Zap-ebWdIwXf.js";import"./shell-layout-Cdsgdqci.js";import"./dialog-BdVY7mqq.js";import"./required-auth-layout-CnSE-XLF.js";import"./use-tasks-DFEEn9nC.js";import"./use-collections-CqIGWKSp.js";import"./constants-Cj0U39_n.js";import"./use-organization-settings-DFNDQvXK.js";import"./use-org-sso-CD6laYaL.js";import"./pair-CBvrXYZC.js";import"./index-pdnGjAa-.js";import"./use-copy-CJlR4d5Y.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./content-blocks-o63cs2vh.js";import"./types-hw9no7At.js";import"./integration-icon-LX1nChXa.js";import"./use-virtual-mcp-Qy5dDA1Q.js";import"./skeleton-DCXc9Mjl.js";import"./popover-CALdcEX7.js";import"./drawer-0C4xllAB.js";import"./avatar-BBnvw18x.js";import"./alert-dialog-BUApN05b.js";import"./form-Stkhqjoi.js";import"./label-2a4WSF52.js";import"./input-C80VzPpQ.js";import"./index-y9YjpvN-.js";import"./use-mcp-tools-BkDSNv3W.js";import"./use-ai-providers-Bc_Jl0e6.js";import"./index-CAum6J1D.js";import"./switch-BUxRExf5.js";import"./use-connection-DuXPSqwF.js";import"./lean-canvas-recruit-modal-C1vNRy0q.js";import"./use-navigate-to-agent-B5j-9-p3.js";import"./collection-search-B8mdZm7u.js";import"./checkbox-CHYA_sQZ.js";import"./extract-connection-data-DN-EBamj.js";import"./constants-DE2tzNng.js";import"./collections-CjrHbdtT.js";import"./tabs-Cge-9ZTd.js";import"./dropdown-menu-Bq-aRZ_r.js";import"./select-CaDZpVbI.js";import"./toggle-group-psHBbDPI.js";import"./select-model-S5cFobu5.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-e84UGEbx.js";import"./card-DoqftRz7.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./index-ZmvI6xf3.js";import"./question-004-sINsf4GQ.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-HM9ImVMm.js";import"./use-registry-connections-D1xCWobU.js";import"./useInfiniteQuery-B82zG1fE.js";import"./infiniteQueryObserver-DMFjl81X.js";import"./collection-tabs-Bj7BShdC.js";import"./badge-CRHmlYav.js";import"./textarea-Dx8hdqfA.js";import"./connection-form-helpers-Cr0s3TXQ.js";import"./use-infinite-scroll-HGu4x7ZU.js";import"./useSuspenseInfiniteQuery-4BiVmPoE.js";import"./collection-search-C-2UZGyD.js";import"./use-create-virtual-mcp-B-gULvH7.js";import"./empty-state-S_EjXlZP.js";import"./use-decopilot-events-CWIgEPKA.js";import"./create-sse-subscription-CxkOgzKf.js";import"./task-status-tGA8S8H-.js";const N=280;function P(){const t=n.c(2),{tasksOpen:e}=k();if(!e)return null;let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={width:`${N}px`},t[0]=o):o=t[0];let m;return t[1]===Symbol.for("react.memo_cache_sentinel")?(m=r.jsx("aside",{className:"shrink-0 h-full bg-sidebar pb-1",style:o,children:r.jsx("div",{className:"h-full p-0.5 pt-0.25",children:r.jsx("div",{className:"h-full bg-background rounded-[0.75rem] overflow-hidden card-shadow",children:r.jsx(y,{})})})}),t[1]=m):m=t[1],m}function C(){const t=n.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx(d.Suspense,{fallback:null,children:r.jsx(P,{})}),t[0]=e):e=t[0],e}function x(){const t=n.c(1);let e;return t[0]===Symbol.for("react.memo_cache_sentinel")?(e=r.jsx("div",{className:"flex-1 flex items-center justify-center",children:r.jsx(u,{size:20,className:"animate-spin text-muted-foreground"})}),t[0]=e):e=t[0],e}function yr(){const t=n.c(7),e=_();let o;t[0]===Symbol.for("react.memo_cache_sentinel")?(o={strict:!1},t[0]=o):o=t[0];const c=!!h(o).taskId;let s;t[1]===Symbol.for("react.memo_cache_sentinel")?(s={"--sidebar-width-icon":"3.5rem"},t[1]=s):s=t[1];let l;t[2]===Symbol.for("react.memo_cache_sentinel")?(l=r.jsx(g,{}),t[2]=l):l=t[2];let p;t[3]===Symbol.for("react.memo_cache_sentinel")?(p={background:"transparent",containerType:"inline-size"},t[3]=p):p=t[3];let a;return t[4]!==c||t[5]!==e?(a=r.jsx(j,{defaultOpen:!1,children:r.jsx("div",{className:"flex flex-col h-dvh overflow-hidden",children:r.jsxs(b,{className:"flex-1 bg-sidebar",style:s,children:[l,r.jsx(S,{className:"flex flex-col",style:p,children:r.jsx(v,{children:r.jsx(T,{children:e?r.jsx(d.Suspense,{fallback:r.jsx(x,{}),children:r.jsx(f,{})}):r.jsxs(i,{children:[r.jsxs(i.Header,{children:[r.jsxs(i.LeftColumn,{children:[r.jsx(i.Nav,{}),r.jsx(i.TogglesSlot,{})]}),r.jsx(i.CenterSlot,{}),r.jsxs(i.RightColumn,{children:[r.jsx(i.TabsSlot,{}),r.jsx(i.RightSlot,{})]})]}),r.jsxs("div",{className:"flex-1 min-h-0 flex flex-row",children:[c&&r.jsx(C,{}),r.jsx(d.Suspense,{fallback:r.jsx(x,{}),children:r.jsx(f,{})})]})]})})})})]})})}),t[4]=c,t[5]=e,t[6]=a):a=t[6],a}export{yr as default};
@@ -1 +1 @@
1
- import{e as R,j as i,r as P,s as ae,P as Ne,f as ke,c as ce,t as me,b as be,K as Ce,n as we}from"./index-BGvMfUr2.js";import{I as je}from"./integration-icon-Btl0P6Zi.js";import{S as ue}from"./skeleton-PrntJAKB.js";import{W as F,i as _e}from"./constants-BVU634u9.js";import{b as Ie}from"./use-virtual-mcp-BOr32Cw9.js";import{u as Se}from"./use-organization-settings-vi5z2D5l.js";import{i as Ae}from"./ChevronRight-QeeRSp8z.js";import{s as Oe}from"./Plus-gLdNtuBE.js";import{a as De}from"./Users03-DVwMLxYo.js";import{I as oe,S as Ee,L as Me,b as Re}from"./lean-canvas-recruit-modal-70F-bJzI.js";import{b as Te,c as $e,d as Pe,S as Le,u as ze,C as G}from"./index-CQbT2-AO.js";import{u as Be}from"./use-create-virtual-mcp-oePzdlSN.js";import{u as Fe}from"./tooltip-8sj0FPxK.js";import{d as He}from"./XCircle-CVED_3Ss.js";import"./Container-CIDvyJX8.js";import"./agent-icon-B5EEcofO.js";import"./AlertCircle-BFJK99tM.js";import"./Tool01-D1xeep7h.js";import"./XClose-C1T9ODT_.js";import"./RefreshCcw01-DKf5Q7r6.js";import"./ArrowNarrowLeft-DCbP5K-g.js";import"./ArrowUpRight-BvzWf0q7.js";import"./ZapSquare-B03aoE62.js";import"./CheckCircle-qqOIolWc.js";import"./ChevronDown-BMTA9_Ap.js";import"./ChevronUp-BHiGg6ZY.js";import"./DotsVertical-Bd2_5HYZ.js";import"./Star01-DInOTW7T.js";import"./Palette-DescRwe0.js";import"./SearchMd-BI1BY0Xc.js";import"./index-C-49LFOm.js";import"./X-fvjwb2RC.js";import"./LinkExternal01-DCnMv_g7.js";import"./Lock01-Ds-YEZnN.js";import"./Sun-DLagUbKM.js";import"./Play-Ch3KWC7Z.js";import"./Settings02-D0o0GA4h.js";import"./Shield01-btPXI3TS.js";import"./Trash01-OgQVP2St.js";import"./User01-Cr_qCqW_.js";import"./Zap-u543Wk9m.js";import"./use-collections-DbJUoPI1.js";import"./use-navigate-to-agent-XL440g7Q.js";import"./dialog-Cc5-s5cq.js";import"./collection-search-dr2VH0_A.js";import"./checkbox-DBBm6J90.js";import"./use-connection-EBpfvjCE.js";import"./extract-connection-data-CGFCZBB1.js";import"./constants-DhipgDPU.js";import"./collections-x4R34QWs.js";import"./drawer-CYKJkhyy.js";import"./use-mcp-tools-yGAchpt7.js";import"./switch-DIPW9oSx.js";import"./input-r-FVR1hH.js";import"./chat-context-DZ4ItXeY.js";import"./use-ai-providers-TD5f5keD.js";import"./use-decopilot-events-CTJPtEAG.js";import"./create-sse-subscription-CxkOgzKf.js";import"./use-tasks-BSCdum36.js";import"./shell-layout-BTN4hGpk.js";import"./required-auth-layout-ByW838Wg.js";import"./use-org-sso-DzmlEuU4.js";import"./pair-TlV_Y8fY.js";import"./index-BizlRsAk.js";import"./use-copy-DNbmGYTy.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./content-blocks-o63cs2vh.js";import"./types-CPAcvDGA.js";import"./tabs-Cnic4mBc.js";import"./form-BlgCJwww.js";import"./label-CDE7or5s.js";import"./dropdown-menu-BdezCavF.js";import"./select-CKhnD_dJ.js";import"./toggle-group-Bw-pO6dq.js";import"./select-model-DSERjqbn.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-BSfLZRSf.js";import"./card-DHIGW2Gm.js";import"./avatar-B5CcOSaZ.js";import"./alert-dialog-B6JtF6Oy.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./index-DWnDHmtK.js";import"./question-004-sINsf4GQ.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-DHMMRnIO.js";import"./use-registry-connections-vdam_2jo.js";import"./useInfiniteQuery-D6CYdRiz.js";import"./infiniteQueryObserver-B9_hQDN4.js";import"./collection-tabs-BhSzOngN.js";import"./badge-Vn5olYFX.js";import"./textarea-DWnLf30W.js";import"./connection-form-helpers-CSnwVczG.js";import"./use-infinite-scroll-Blb-Zkmq.js";import"./useSuspenseInfiniteQuery-hnE5tAGb.js";function Ue(e){try{const t=localStorage.getItem(`mesh:chat:recent-agents:${e}`);return t?JSON.parse(t):[]}catch{return[]}}const We=8;function xe(e){const t=R.c(21),{agent:s,onSpecialClick:r,tracking:n}=e,{org:o}=ae(),c=ke();let a;t[0]!==s.id||t[1]!==s.title||t[2]!==c||t[3]!==r||t[4]!==o||t[5]!==n.action||t[6]!==n.template_id||t[7]!==n.tile_kind?(a=()=>{if(me("home_agent_tile_clicked",{template_id:n.template_id,agent_id:s.id,agent_title:s.title,tile_kind:n.tile_kind,action:n.action}),r)r();else{const I=crypto.randomUUID();c({to:"/$org/$taskId",params:{org:o.slug,taskId:I},search:{virtualmcpid:s.id}})}},t[0]=s.id,t[1]=s.title,t[2]=c,t[3]=r,t[4]=o,t[5]=n.action,t[6]=n.template_id,t[7]=n.tile_kind,t[8]=a):a=t[8];const m=a;let u;t[9]===Symbol.for("react.memo_cache_sentinel")?(u=ce("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[100px] shrink-0","group"),t[9]=u):u=t[9];const L=`Select agent ${s.title}`;let b;t[10]===Symbol.for("react.memo_cache_sentinel")?(b=i.jsx(De,{size:24}),t[10]=b):b=t[10];let x;t[11]!==s.icon||t[12]!==s.title?(x=i.jsx(je,{icon:s.icon,name:s.title,size:"md",fallbackIcon:b,className:"transition-transform group-hover:scale-110"}),t[11]=s.icon,t[12]=s.title,t[13]=x):x=t[13];let d;t[14]!==s.title?(d=i.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight line-clamp-2 break-words w-full",children:s.title}),t[14]=s.title,t[15]=d):d=t[15];let k;return t[16]!==m||t[17]!==L||t[18]!==x||t[19]!==d?(k=i.jsxs("button",{type:"button",onClick:m,className:u,"aria-label":L,children:[x,d]}),t[16]=m,t[17]=L,t[18]=x,t[19]=d,t[20]=k):k=t[20],k}function Ke(){const e=R.c(8),t=ke(),{org:s}=ae();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=ce("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[100px] shrink-0","group"),e[0]=r):r=e[0];let n;e[1]!==t||e[2]!==s.slug?(n=()=>{me("home_see_all_agents_clicked"),t({to:"/$org/settings/agents",params:{org:s.slug}})},e[1]=t,e[2]=s.slug,e[3]=n):n=e[3];let o,c;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx("div",{className:"size-12 rounded-xl bg-accent flex items-center justify-center shrink-0 transition-transform group-hover:scale-110",children:i.jsx(Ae,{size:20,className:"text-foreground"})}),c=i.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"See all"}),e[4]=o,e[5]=c):(o=e[4],c=e[5]);let a;return e[6]!==n?(a=i.jsxs("button",{type:"button",className:r,"aria-label":"See all agents",onClick:n,children:[o,c]}),e[6]=n,e[7]=a):a=e[7],a}function Ve(){const e=R.c(9);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={navigateOnCreate:!0},e[0]=t):t=e[0];const{createVirtualMCP:s,isCreating:r}=Be(t);let n;e[1]!==s?(n=()=>{me("home_create_agent_clicked"),s()},e[1]=s,e[2]=n):n=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=ce("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[100px] shrink-0","group","disabled:opacity-50 disabled:cursor-not-allowed"),e[3]=o):o=e[3];let c,a;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx("div",{className:"size-12 rounded-xl bg-background border-2 border-dashed border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-110",children:i.jsx(Oe,{size:20,className:"text-muted-foreground"})}),a=i.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"Create agent"}),e[4]=c,e[5]=a):(c=e[4],a=e[5]);let m;return e[6]!==r||e[7]!==n?(m=i.jsxs("button",{type:"button",onClick:n,disabled:r,className:o,"aria-label":"Create agent",children:[c,a]}),e[6]=r,e[7]=n,e[8]=m):m=e[8],m}function ie(e,t,s){return e.find(r=>r.id!==null&&(r.metadata?.type===t||r.title===s))}function qe(){const e=R.c(52),t=Ie(),{locator:s,org:r}=ae(),n=Se(),[o,c]=P.useState(!1),[a,m]=P.useState(!1),[u,L]=P.useState(!1),[b,x]=P.useState(!1),[d,k]=P.useState(!1),[I,T]=P.useState(!1),[M,$]=P.useState(!1),[z]=Ne(),S=Te(r.slug);let h,p,f,g,j,A,_,v;if(e[0]!==s||e[1]!==S||e[2]!==n||e[3]!==z||e[4]!==t){const se=F.find(rt),Y=F.find(nt),J=F.find(st),Q=F.find(it),Z=F.find(tt),de=F.find(et),ne=F.find(Ze);f=ie(t,Y.id,Y.title),h=ie(t,J.id,J.title),p=ie(t,Q.id,Q.title),g=ie(t,Z.id,Z.title);const pe=l=>{if(l===se.id)return{key:l,kind:"template-recruit",templateId:"site-editor",agent:se,onClick:"import-deco"};if(l===Y.id)return f?{key:f.id,kind:"existing",templateId:"site-diagnostics",agent:f}:{key:l,kind:"template-recruit",templateId:"site-diagnostics",agent:Y,onClick:"diagnostics"};if(l===J.id)return h?{key:h.id,kind:"existing",templateId:"ai-image",agent:h}:{key:l,kind:"template-recruit",templateId:"ai-image",agent:J,onClick:"ai-image"};if(l===Z.id)return g?{key:g.id,kind:"existing",templateId:"lean-canvas",agent:g}:{key:l,kind:"template-recruit",templateId:"lean-canvas",agent:Z,onClick:"lean-canvas"};if(l===de.id)return{key:l,kind:"template-recruit",templateId:"studio-pack",agent:de,onClick:"studio-pack"};if(l===ne.id)return z.experimental_vibecode?{key:l,kind:"template-recruit",templateId:"self-healing-storefront",agent:ne,onClick:"self-healing"}:null;if(l===Q.id)return p?{key:p.id,kind:"existing",templateId:"ai-research",agent:p}:{key:l,kind:"template-recruit",templateId:"ai-research",agent:Q,onClick:"ai-research"};const B=t.find(V=>V.id!==null&&V.id===l&&!_e(V.id));return B?{key:B.id,kind:"existing",templateId:null,agent:B}:null};let ee;if(n?.ids)ee=n.ids.map(pe).filter(Xe).slice(0,We);else{const B=[se.id,ne.id,Y.id,J.id,Q.id].map(pe).filter(Qe),V=Ue(s),ye=t.filter(Je).filter(q=>q.id!==f?.id&&q.id!==h?.id&&q.id!==p?.id).sort((q,fe)=>{const re=V.indexOf(q.id),le=V.indexOf(fe.id);return re!==-1&&le!==-1?re-le:re!==-1?-1:le!==-1?1:new Date(fe.updated_at).getTime()-new Date(q.updated_at).getTime()}).slice(0,4).map(Ye);ee=[...B,...ye]}j=ee.some(Ge);let te;e[13]!==S?(te=l=>{if(l.kind==="template-recruit"){const B={"import-deco":()=>c(!0),diagnostics:()=>m(!0),"ai-image":()=>L(!0),"ai-research":()=>x(!0),"lean-canvas":()=>k(!0),"studio-pack":()=>T(!0),"self-healing":()=>$(!0)}[l.onClick];return i.jsx(xe,{agent:l.agent,onSpecialClick:B,tracking:{template_id:l.templateId,tile_kind:"template",action:"open_modal"}},l.key)}return i.jsx(xe,{agent:l.agent,onSpecialClick:()=>S(l.agent.id),tracking:{template_id:l.templateId,tile_kind:l.templateId?"existing":"recent",action:"navigate"}},l.key)},e[13]=S,e[14]=te):te=e[14];const ve=te;v="w-full max-md:overflow-x-auto max-md:[scrollbar-width:none] max-md:[&::-webkit-scrollbar]:hidden",A="flex flex-wrap justify-center gap-1.5 max-md:flex-nowrap max-md:justify-start md:max-h-52 md:overflow-hidden",_=ee.map(ve),e[0]=s,e[1]=S,e[2]=n,e[3]=z,e[4]=t,e[5]=h,e[6]=p,e[7]=f,e[8]=g,e[9]=j,e[10]=A,e[11]=_,e[12]=v}else h=e[5],p=e[6],f=e[7],g=e[8],j=e[9],A=e[10],_=e[11],v=e[12];let O;e[15]===Symbol.for("react.memo_cache_sentinel")?(O=i.jsx(Ve,{}),e[15]=O):O=e[15];let y;e[16]!==j?(y=j&&i.jsx(Ke,{}),e[16]=j,e[17]=y):y=e[17];let D;e[18]!==A||e[19]!==_||e[20]!==y?(D=i.jsxs("div",{className:A,children:[_,O,y]}),e[18]=A,e[19]=_,e[20]=y,e[21]=D):D=e[21];let N;e[22]!==v||e[23]!==D?(N=i.jsx("div",{className:v,children:D}),e[22]=v,e[23]=D,e[24]=N):N=e[24];let C;e[25]!==o?(C=i.jsx(oe,{open:o,onOpenChange:c}),e[25]=o,e[26]=C):C=e[26];let w;e[27]!==a||e[28]!==f?(w=i.jsx(Ee,{open:a,onOpenChange:m,existingAgent:f}),e[27]=a,e[28]=f,e[29]=w):w=e[29];let E;e[30]!==u||e[31]!==h?(E=i.jsx($e,{open:u,onOpenChange:L,existingAgent:h}),e[30]=u,e[31]=h,e[32]=E):E=e[32];let H;e[33]!==b||e[34]!==p?(H=i.jsx(Pe,{open:b,onOpenChange:x,existingAgent:p}),e[33]=b,e[34]=p,e[35]=H):H=e[35];let U;e[36]!==g||e[37]!==d?(U=i.jsx(Me,{open:d,onOpenChange:k,existingAgent:g}),e[36]=g,e[37]=d,e[38]=U):U=e[38];let W;e[39]!==I?(W=i.jsx(Re,{open:I,onOpenChange:T}),e[39]=I,e[40]=W):W=e[40];let K;e[41]!==M?(K=i.jsx(Le,{open:M,onOpenChange:$}),e[41]=M,e[42]=K):K=e[42];let X;return e[43]!==H||e[44]!==U||e[45]!==W||e[46]!==K||e[47]!==N||e[48]!==C||e[49]!==w||e[50]!==E?(X=i.jsxs(i.Fragment,{children:[N,C,w,E,H,U,W,K]}),e[43]=H,e[44]=U,e[45]=W,e[46]=K,e[47]=N,e[48]=C,e[49]=w,e[50]=E,e[51]=X):X=e[51],X}function Ge(e){return e.kind==="existing"&&e.templateId===null}function Ye(e){return{key:e.id,kind:"existing",templateId:null,agent:e}}function Je(e){return e.id!==null&&!_e(e.id)}function Qe(e){return e!==null}function Xe(e){return e!==null}function Ze(e){return e.id==="self-healing-storefront"}function et(e){return e.id==="studio-pack"}function tt(e){return e.id==="lean-canvas"}function it(e){return e.id==="ai-research"}function st(e){return e.id==="ai-image"}function nt(e){return e.id==="site-diagnostics"}function rt(e){return e.id==="site-editor"}function lt(){const e=R.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx("div",{className:"w-full max-md:overflow-x-auto max-md:[scrollbar-width:none] max-md:[&::-webkit-scrollbar]:hidden",children:i.jsx("div",{className:"flex flex-wrap justify-center gap-1.5 max-md:flex-nowrap max-md:justify-start md:max-h-52 md:overflow-hidden",children:Array.from({length:7}).map(ot)})}),e[0]=t):t=e[0],t}function ot(e,t){return i.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 w-[100px] shrink-0",children:[i.jsx(ue,{className:"size-12 rounded-xl shrink-0"}),i.jsx(ue,{className:"h-3 sm:h-4 w-full"})]},t)}function ge(){const e=R.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(P.Suspense,{fallback:i.jsx(lt,{}),children:i.jsx(qe,{})}),e[0]=t):t=e[0],t}const at=["radial-gradient(ellipse 25% 220% at -5% 120%, rgba(165,149,255,0.35) 0%, transparent 100%)","radial-gradient(ellipse 25% 220% at 105% -20%, rgba(208,236,26,0.32) 0%, transparent 100%)"].join(", "),ct="/decotexture.svg";function he(e){const t=R.c(7),{onClick:s}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={backgroundImage:at},t[0]=r):r=t[0];let n,o;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx("div",{className:"relative shrink-0 p-1.5 bg-[var(--brand-green-light)] rounded-lg border border-border",children:i.jsx(je,{icon:"/logos/deco%20logo.svg",name:"deco.cx",size:"xs",className:"border-0 rounded-none bg-transparent"})}),o=i.jsx("p",{className:"flex-1 relative text-sm font-medium text-foreground leading-none whitespace-nowrap",children:"Import your deco.cx site"}),t[1]=n,t[2]=o):(n=t[1],o=t[2]);let c;t[3]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx("img",{src:ct,alt:"","aria-hidden":!0,className:"absolute pointer-events-none",style:{width:"274.5px",height:"272.25px",left:"calc(50% + 145.5px)",top:"calc(50% + 40px)",transform:"translate(-50%, -50%)"}}),t[3]=c):c=t[3];let a;t[4]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx("div",{className:"relative bg-background flex items-center justify-center size-8 rounded-md shrink-0",children:i.jsx(He,{size:16,className:"text-foreground transition-transform group-hover:translate-x-0.5"})}),t[4]=a):a=t[4];let m;return t[5]!==s?(m=i.jsxs("button",{type:"button",onClick:s,className:"w-full relative flex items-center gap-4 px-4 py-4 rounded-lg border border-border bg-background overflow-hidden transition-colors text-left cursor-pointer group",style:r,children:[n,o,c,a]}),t[5]=s,t[6]=m):m=t[6],m}function mt(){const e=R.c(5),{data:t}=be.useSession();let s;e[0]!==t?.user?.email?(s=Ce.decoProfile(t?.user?.email),e[0]=t?.user?.email,e[1]=s):s=e[1];const r=!!t?.user?.email;let n;e[2]!==s||e[3]!==r?(n={queryKey:s,queryFn:dt,enabled:r,staleTime:3e5},e[2]=s,e[3]=r,e[4]=n):n=e[4];const{data:o}=we(n);return o?.isDecoUser??!1}async function dt(){const e=await fetch("/api/deco-sites/profile");return e.ok?e.json():{isDecoUser:!1}}function pt(){const e=R.c(51),{data:t}=be.useSession(),[s,r]=P.useState(!1),n=mt(),o=Fe(),{hasDecoKey:c,isZeroBalance:a,isInitialFreeCredit:m,balanceDollars:u,hasOnlyDecoProvider:L}=ze();let b;e[0]!==t?.user?.name?(b=t?.user?.name?.split(" ")[0]||"there",e[0]=t?.user?.name,e[1]=b):b=e[1];const x=b,d=c&&m&&u!=null,k=c&&a&&L;if(o){let _;e[2]!==u||e[3]!==d?(_=d&&i.jsx("div",{className:"mb-4",children:i.jsx(G.CreditsEyebrow,{balanceDollars:u})}),e[2]=u,e[3]=d,e[4]=_):_=e[4];let v;e[5]!==k?(v=k&&i.jsx("div",{className:"mb-4",children:i.jsx(G.NoCreditsEyebrow,{})}),e[5]=k,e[6]=v):v=e[6];let O;e[7]!==x?(O=i.jsxs("p",{className:"text-3xl font-medium text-foreground text-center max-w-[280px]",children:["What's on your mind, ",x,"?"]}),e[7]=x,e[8]=O):O=e[8];let y;e[9]!==_||e[10]!==v||e[11]!==O?(y=i.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center w-full",children:[_,v,O]}),e[9]=_,e[10]=v,e[11]=O,e[12]=y):y=e[12];let D;e[13]===Symbol.for("react.memo_cache_sentinel")?(D=i.jsxs("div",{className:"w-full flex flex-col gap-4 pb-4",children:[i.jsx(ge,{}),i.jsx(G.Input,{showConnectionsBanner:!0})]}),e[13]=D):D=e[13];let N;e[14]!==n?(N=n&&i.jsx("div",{className:"w-full",children:i.jsx(he,{onClick:()=>r(!0)})}),e[14]=n,e[15]=N):N=e[15];let C;e[16]!==y||e[17]!==N?(C=i.jsxs("div",{className:"flex-1 relative flex flex-col items-center px-4",children:[y,D,N]}),e[16]=y,e[17]=N,e[18]=C):C=e[18];let w;e[19]!==s?(w=i.jsx(oe,{open:s,onOpenChange:r}),e[19]=s,e[20]=w):w=e[20];let E;return e[21]!==C||e[22]!==w?(E=i.jsxs(i.Fragment,{children:[C,w]}),e[21]=C,e[22]=w,e[23]=E):E=e[23],E}let I;e[24]!==u||e[25]!==d?(I=d&&i.jsx("div",{className:"mb-4",children:i.jsx(G.CreditsEyebrow,{balanceDollars:u})}),e[24]=u,e[25]=d,e[26]=I):I=e[26];let T;e[27]!==k?(T=k&&i.jsx("div",{className:"mb-4",children:i.jsx(G.NoCreditsEyebrow,{})}),e[27]=k,e[28]=T):T=e[28];let M;e[29]!==x?(M=i.jsxs("p",{className:"text-3xl font-medium text-foreground",children:["What's on your mind, ",x,"?"]}),e[29]=x,e[30]=M):M=e[30];let $;e[31]!==I||e[32]!==T||e[33]!==M?($=i.jsxs("div",{className:"text-center mb-10",children:[I,T,M]}),e[31]=I,e[32]=T,e[33]=M,e[34]=$):$=e[34];let z;e[35]===Symbol.for("react.memo_cache_sentinel")?(z=i.jsx("div",{className:"w-full",children:i.jsx(G.Input,{showConnectionsBanner:!0})}),e[35]=z):z=e[35];let S;e[36]!==$?(S=i.jsxs("div",{className:"flex flex-col items-center w-full max-w-[672px]",children:[$,z]}),e[36]=$,e[37]=S):S=e[37];let h;e[38]===Symbol.for("react.memo_cache_sentinel")?(h=i.jsx("div",{className:"w-full mt-10 mx-auto",children:i.jsx(ge,{})}),e[38]=h):h=e[38];let p;e[39]!==S?(p=i.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center w-full",children:[S,h]}),e[39]=S,e[40]=p):p=e[40];let f;e[41]!==n?(f=n&&i.jsx("div",{className:"absolute bottom-6 left-0 right-0 px-10",children:i.jsx("div",{className:"w-full max-w-[500px] mx-auto",children:i.jsx(he,{onClick:()=>r(!0)})})}),e[41]=n,e[42]=f):f=e[42];let g;e[43]!==p||e[44]!==f?(g=i.jsxs("div",{className:"flex-1 relative flex flex-col items-center px-10",children:[p,f]}),e[43]=p,e[44]=f,e[45]=g):g=e[45];let j;e[46]!==s?(j=i.jsx(oe,{open:s,onOpenChange:r}),e[46]=s,e[47]=j):j=e[47];let A;return e[48]!==g||e[49]!==j?(A=i.jsxs(i.Fragment,{children:[g,j]}),e[48]=g,e[49]=j,e[50]=A):A=e[50],A}function es(){const e=R.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx("div",{className:"flex-1 min-h-0 p-1.5 overflow-hidden",children:i.jsx("div",{className:"flex h-full flex-col bg-background overflow-hidden card-shadow rounded-[0.75rem]",children:i.jsx(pt,{})})}),e[0]=t):t=e[0],t}export{es as default};
1
+ import{e as R,j as i,r as P,s as ae,P as Ne,f as ke,c as ce,t as me,b as be,K as Ce,n as we}from"./index-b_n-uXmh.js";import{I as je}from"./integration-icon-LX1nChXa.js";import{S as ue}from"./skeleton-DCXc9Mjl.js";import{W as F,i as _e}from"./constants-Cj0U39_n.js";import{b as Ie}from"./use-virtual-mcp-Qy5dDA1Q.js";import{u as Se}from"./use-organization-settings-DFNDQvXK.js";import{i as Ae}from"./ChevronRight-BUfZMnd9.js";import{s as Oe}from"./Plus-Bihyskqy.js";import{a as De}from"./Users03-IortA-KV.js";import{I as oe,S as Ee,L as Me,b as Re}from"./lean-canvas-recruit-modal-C1vNRy0q.js";import{b as Te,c as $e,d as Pe,S as Le,u as ze,C as G}from"./index-CAum6J1D.js";import{u as Be}from"./use-create-virtual-mcp-B-gULvH7.js";import{u as Fe}from"./tooltip-B-nRvfy-.js";import{d as He}from"./XCircle-Dp1Lqd1t.js";import"./Container-DzkLD13G.js";import"./agent-icon-Be_PnRh0.js";import"./AlertCircle-BkX4HzbS.js";import"./Tool01-Dqyo2VjJ.js";import"./XClose-lRlzG-cb.js";import"./RefreshCcw01-BzT-xyrO.js";import"./ArrowNarrowLeft-BebHkn1X.js";import"./ArrowUpRight-uszsF274.js";import"./ZapSquare-_fsDSSOX.js";import"./CheckCircle-Boq6G01L.js";import"./ChevronDown-ByP-e484.js";import"./ChevronUp-TwiYbtUW.js";import"./DotsVertical-BrUfBHwt.js";import"./Star01-ByzmPd4J.js";import"./Palette-1HvN4NnC.js";import"./SearchMd-vBRV-l3E.js";import"./index-BZhxvvXQ.js";import"./X-BiphajNJ.js";import"./LinkExternal01-gfL-Fk4b.js";import"./Lock01-CI-miN4g.js";import"./Sun-xA_CdWAJ.js";import"./Play-O7ldNAxa.js";import"./Settings02-eiwWD3s7.js";import"./Shield01-D7ml37xT.js";import"./Trash01-f4CvhuWB.js";import"./User01-lDhxACAV.js";import"./Zap-ebWdIwXf.js";import"./use-collections-CqIGWKSp.js";import"./use-navigate-to-agent-B5j-9-p3.js";import"./dialog-BdVY7mqq.js";import"./collection-search-B8mdZm7u.js";import"./checkbox-CHYA_sQZ.js";import"./use-connection-DuXPSqwF.js";import"./extract-connection-data-DN-EBamj.js";import"./constants-DE2tzNng.js";import"./collections-CjrHbdtT.js";import"./drawer-0C4xllAB.js";import"./use-mcp-tools-BkDSNv3W.js";import"./switch-BUxRExf5.js";import"./input-C80VzPpQ.js";import"./chat-context-JbYHex_O.js";import"./use-ai-providers-Bc_Jl0e6.js";import"./use-decopilot-events-CWIgEPKA.js";import"./create-sse-subscription-CxkOgzKf.js";import"./use-tasks-DFEEn9nC.js";import"./shell-layout-Cdsgdqci.js";import"./required-auth-layout-CnSE-XLF.js";import"./use-org-sso-CD6laYaL.js";import"./pair-CBvrXYZC.js";import"./index-pdnGjAa-.js";import"./use-copy-CJlR4d5Y.js";import"./differenceInSeconds-NQ4PDo0z.js";import"./content-blocks-o63cs2vh.js";import"./types-hw9no7At.js";import"./tabs-Cge-9ZTd.js";import"./form-Stkhqjoi.js";import"./label-2a4WSF52.js";import"./dropdown-menu-Bq-aRZ_r.js";import"./select-CaDZpVbI.js";import"./toggle-group-psHBbDPI.js";import"./select-model-S5cFobu5.js";import"./ai-providers-logos-DD3qZ33J.js";import"./settings-section-e84UGEbx.js";import"./card-DoqftRz7.js";import"./avatar-BBnvw18x.js";import"./alert-dialog-BUApN05b.js";import"./formatDistanceToNow-Cb2QZZJn.js";import"./unwrap-tool-result-BYXdCQMg.js";import"./index-ZmvI6xf3.js";import"./question-004-sINsf4GQ.js";import"./connection-slug-eyAPH6o3.js";import"./connection-card-HM9ImVMm.js";import"./use-registry-connections-D1xCWobU.js";import"./useInfiniteQuery-B82zG1fE.js";import"./infiniteQueryObserver-DMFjl81X.js";import"./collection-tabs-Bj7BShdC.js";import"./badge-CRHmlYav.js";import"./textarea-Dx8hdqfA.js";import"./connection-form-helpers-Cr0s3TXQ.js";import"./use-infinite-scroll-HGu4x7ZU.js";import"./useSuspenseInfiniteQuery-4BiVmPoE.js";function Ue(e){try{const t=localStorage.getItem(`mesh:chat:recent-agents:${e}`);return t?JSON.parse(t):[]}catch{return[]}}const We=8;function xe(e){const t=R.c(21),{agent:s,onSpecialClick:r,tracking:n}=e,{org:o}=ae(),c=ke();let a;t[0]!==s.id||t[1]!==s.title||t[2]!==c||t[3]!==r||t[4]!==o||t[5]!==n.action||t[6]!==n.template_id||t[7]!==n.tile_kind?(a=()=>{if(me("home_agent_tile_clicked",{template_id:n.template_id,agent_id:s.id,agent_title:s.title,tile_kind:n.tile_kind,action:n.action}),r)r();else{const I=crypto.randomUUID();c({to:"/$org/$taskId",params:{org:o.slug,taskId:I},search:{virtualmcpid:s.id}})}},t[0]=s.id,t[1]=s.title,t[2]=c,t[3]=r,t[4]=o,t[5]=n.action,t[6]=n.template_id,t[7]=n.tile_kind,t[8]=a):a=t[8];const m=a;let u;t[9]===Symbol.for("react.memo_cache_sentinel")?(u=ce("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[100px] shrink-0","group"),t[9]=u):u=t[9];const L=`Select agent ${s.title}`;let b;t[10]===Symbol.for("react.memo_cache_sentinel")?(b=i.jsx(De,{size:24}),t[10]=b):b=t[10];let x;t[11]!==s.icon||t[12]!==s.title?(x=i.jsx(je,{icon:s.icon,name:s.title,size:"md",fallbackIcon:b,className:"transition-transform group-hover:scale-110"}),t[11]=s.icon,t[12]=s.title,t[13]=x):x=t[13];let d;t[14]!==s.title?(d=i.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight line-clamp-2 break-words w-full",children:s.title}),t[14]=s.title,t[15]=d):d=t[15];let k;return t[16]!==m||t[17]!==L||t[18]!==x||t[19]!==d?(k=i.jsxs("button",{type:"button",onClick:m,className:u,"aria-label":L,children:[x,d]}),t[16]=m,t[17]=L,t[18]=x,t[19]=d,t[20]=k):k=t[20],k}function Ke(){const e=R.c(8),t=ke(),{org:s}=ae();let r;e[0]===Symbol.for("react.memo_cache_sentinel")?(r=ce("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[100px] shrink-0","group"),e[0]=r):r=e[0];let n;e[1]!==t||e[2]!==s.slug?(n=()=>{me("home_see_all_agents_clicked"),t({to:"/$org/settings/agents",params:{org:s.slug}})},e[1]=t,e[2]=s.slug,e[3]=n):n=e[3];let o,c;e[4]===Symbol.for("react.memo_cache_sentinel")?(o=i.jsx("div",{className:"size-12 rounded-xl bg-accent flex items-center justify-center shrink-0 transition-transform group-hover:scale-110",children:i.jsx(Ae,{size:20,className:"text-foreground"})}),c=i.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"See all"}),e[4]=o,e[5]=c):(o=e[4],c=e[5]);let a;return e[6]!==n?(a=i.jsxs("button",{type:"button",className:r,"aria-label":"See all agents",onClick:n,children:[o,c]}),e[6]=n,e[7]=a):a=e[7],a}function Ve(){const e=R.c(9);let t;e[0]===Symbol.for("react.memo_cache_sentinel")?(t={navigateOnCreate:!0},e[0]=t):t=e[0];const{createVirtualMCP:s,isCreating:r}=Be(t);let n;e[1]!==s?(n=()=>{me("home_create_agent_clicked"),s()},e[1]=s,e[2]=n):n=e[2];let o;e[3]===Symbol.for("react.memo_cache_sentinel")?(o=ce("flex flex-col items-center gap-3 p-2 rounded-lg","transition-colors","cursor-pointer","w-[100px] shrink-0","group","disabled:opacity-50 disabled:cursor-not-allowed"),e[3]=o):o=e[3];let c,a;e[4]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx("div",{className:"size-12 rounded-xl bg-background border-2 border-dashed border-border flex items-center justify-center shrink-0 transition-transform group-hover:scale-110",children:i.jsx(Oe,{size:20,className:"text-muted-foreground"})}),a=i.jsx("p",{className:"text-xs sm:text-sm text-foreground text-center leading-tight",children:"Create agent"}),e[4]=c,e[5]=a):(c=e[4],a=e[5]);let m;return e[6]!==r||e[7]!==n?(m=i.jsxs("button",{type:"button",onClick:n,disabled:r,className:o,"aria-label":"Create agent",children:[c,a]}),e[6]=r,e[7]=n,e[8]=m):m=e[8],m}function ie(e,t,s){return e.find(r=>r.id!==null&&(r.metadata?.type===t||r.title===s))}function qe(){const e=R.c(52),t=Ie(),{locator:s,org:r}=ae(),n=Se(),[o,c]=P.useState(!1),[a,m]=P.useState(!1),[u,L]=P.useState(!1),[b,x]=P.useState(!1),[d,k]=P.useState(!1),[I,T]=P.useState(!1),[M,$]=P.useState(!1),[z]=Ne(),S=Te(r.slug);let h,p,f,g,j,A,_,v;if(e[0]!==s||e[1]!==S||e[2]!==n||e[3]!==z||e[4]!==t){const se=F.find(rt),Y=F.find(nt),J=F.find(st),Q=F.find(it),Z=F.find(tt),de=F.find(et),ne=F.find(Ze);f=ie(t,Y.id,Y.title),h=ie(t,J.id,J.title),p=ie(t,Q.id,Q.title),g=ie(t,Z.id,Z.title);const pe=l=>{if(l===se.id)return{key:l,kind:"template-recruit",templateId:"site-editor",agent:se,onClick:"import-deco"};if(l===Y.id)return f?{key:f.id,kind:"existing",templateId:"site-diagnostics",agent:f}:{key:l,kind:"template-recruit",templateId:"site-diagnostics",agent:Y,onClick:"diagnostics"};if(l===J.id)return h?{key:h.id,kind:"existing",templateId:"ai-image",agent:h}:{key:l,kind:"template-recruit",templateId:"ai-image",agent:J,onClick:"ai-image"};if(l===Z.id)return g?{key:g.id,kind:"existing",templateId:"lean-canvas",agent:g}:{key:l,kind:"template-recruit",templateId:"lean-canvas",agent:Z,onClick:"lean-canvas"};if(l===de.id)return{key:l,kind:"template-recruit",templateId:"studio-pack",agent:de,onClick:"studio-pack"};if(l===ne.id)return z.experimental_vibecode?{key:l,kind:"template-recruit",templateId:"self-healing-storefront",agent:ne,onClick:"self-healing"}:null;if(l===Q.id)return p?{key:p.id,kind:"existing",templateId:"ai-research",agent:p}:{key:l,kind:"template-recruit",templateId:"ai-research",agent:Q,onClick:"ai-research"};const B=t.find(V=>V.id!==null&&V.id===l&&!_e(V.id));return B?{key:B.id,kind:"existing",templateId:null,agent:B}:null};let ee;if(n?.ids)ee=n.ids.map(pe).filter(Xe).slice(0,We);else{const B=[se.id,ne.id,Y.id,J.id,Q.id].map(pe).filter(Qe),V=Ue(s),ye=t.filter(Je).filter(q=>q.id!==f?.id&&q.id!==h?.id&&q.id!==p?.id).sort((q,fe)=>{const re=V.indexOf(q.id),le=V.indexOf(fe.id);return re!==-1&&le!==-1?re-le:re!==-1?-1:le!==-1?1:new Date(fe.updated_at).getTime()-new Date(q.updated_at).getTime()}).slice(0,4).map(Ye);ee=[...B,...ye]}j=ee.some(Ge);let te;e[13]!==S?(te=l=>{if(l.kind==="template-recruit"){const B={"import-deco":()=>c(!0),diagnostics:()=>m(!0),"ai-image":()=>L(!0),"ai-research":()=>x(!0),"lean-canvas":()=>k(!0),"studio-pack":()=>T(!0),"self-healing":()=>$(!0)}[l.onClick];return i.jsx(xe,{agent:l.agent,onSpecialClick:B,tracking:{template_id:l.templateId,tile_kind:"template",action:"open_modal"}},l.key)}return i.jsx(xe,{agent:l.agent,onSpecialClick:()=>S(l.agent.id),tracking:{template_id:l.templateId,tile_kind:l.templateId?"existing":"recent",action:"navigate"}},l.key)},e[13]=S,e[14]=te):te=e[14];const ve=te;v="w-full max-md:overflow-x-auto max-md:[scrollbar-width:none] max-md:[&::-webkit-scrollbar]:hidden",A="flex flex-wrap justify-center gap-1.5 max-md:flex-nowrap max-md:justify-start md:max-h-52 md:overflow-hidden",_=ee.map(ve),e[0]=s,e[1]=S,e[2]=n,e[3]=z,e[4]=t,e[5]=h,e[6]=p,e[7]=f,e[8]=g,e[9]=j,e[10]=A,e[11]=_,e[12]=v}else h=e[5],p=e[6],f=e[7],g=e[8],j=e[9],A=e[10],_=e[11],v=e[12];let O;e[15]===Symbol.for("react.memo_cache_sentinel")?(O=i.jsx(Ve,{}),e[15]=O):O=e[15];let y;e[16]!==j?(y=j&&i.jsx(Ke,{}),e[16]=j,e[17]=y):y=e[17];let D;e[18]!==A||e[19]!==_||e[20]!==y?(D=i.jsxs("div",{className:A,children:[_,O,y]}),e[18]=A,e[19]=_,e[20]=y,e[21]=D):D=e[21];let N;e[22]!==v||e[23]!==D?(N=i.jsx("div",{className:v,children:D}),e[22]=v,e[23]=D,e[24]=N):N=e[24];let C;e[25]!==o?(C=i.jsx(oe,{open:o,onOpenChange:c}),e[25]=o,e[26]=C):C=e[26];let w;e[27]!==a||e[28]!==f?(w=i.jsx(Ee,{open:a,onOpenChange:m,existingAgent:f}),e[27]=a,e[28]=f,e[29]=w):w=e[29];let E;e[30]!==u||e[31]!==h?(E=i.jsx($e,{open:u,onOpenChange:L,existingAgent:h}),e[30]=u,e[31]=h,e[32]=E):E=e[32];let H;e[33]!==b||e[34]!==p?(H=i.jsx(Pe,{open:b,onOpenChange:x,existingAgent:p}),e[33]=b,e[34]=p,e[35]=H):H=e[35];let U;e[36]!==g||e[37]!==d?(U=i.jsx(Me,{open:d,onOpenChange:k,existingAgent:g}),e[36]=g,e[37]=d,e[38]=U):U=e[38];let W;e[39]!==I?(W=i.jsx(Re,{open:I,onOpenChange:T}),e[39]=I,e[40]=W):W=e[40];let K;e[41]!==M?(K=i.jsx(Le,{open:M,onOpenChange:$}),e[41]=M,e[42]=K):K=e[42];let X;return e[43]!==H||e[44]!==U||e[45]!==W||e[46]!==K||e[47]!==N||e[48]!==C||e[49]!==w||e[50]!==E?(X=i.jsxs(i.Fragment,{children:[N,C,w,E,H,U,W,K]}),e[43]=H,e[44]=U,e[45]=W,e[46]=K,e[47]=N,e[48]=C,e[49]=w,e[50]=E,e[51]=X):X=e[51],X}function Ge(e){return e.kind==="existing"&&e.templateId===null}function Ye(e){return{key:e.id,kind:"existing",templateId:null,agent:e}}function Je(e){return e.id!==null&&!_e(e.id)}function Qe(e){return e!==null}function Xe(e){return e!==null}function Ze(e){return e.id==="self-healing-storefront"}function et(e){return e.id==="studio-pack"}function tt(e){return e.id==="lean-canvas"}function it(e){return e.id==="ai-research"}function st(e){return e.id==="ai-image"}function nt(e){return e.id==="site-diagnostics"}function rt(e){return e.id==="site-editor"}function lt(){const e=R.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx("div",{className:"w-full max-md:overflow-x-auto max-md:[scrollbar-width:none] max-md:[&::-webkit-scrollbar]:hidden",children:i.jsx("div",{className:"flex flex-wrap justify-center gap-1.5 max-md:flex-nowrap max-md:justify-start md:max-h-52 md:overflow-hidden",children:Array.from({length:7}).map(ot)})}),e[0]=t):t=e[0],t}function ot(e,t){return i.jsxs("div",{className:"flex flex-col items-center gap-3 p-2 w-[100px] shrink-0",children:[i.jsx(ue,{className:"size-12 rounded-xl shrink-0"}),i.jsx(ue,{className:"h-3 sm:h-4 w-full"})]},t)}function ge(){const e=R.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx(P.Suspense,{fallback:i.jsx(lt,{}),children:i.jsx(qe,{})}),e[0]=t):t=e[0],t}const at=["radial-gradient(ellipse 25% 220% at -5% 120%, rgba(165,149,255,0.35) 0%, transparent 100%)","radial-gradient(ellipse 25% 220% at 105% -20%, rgba(208,236,26,0.32) 0%, transparent 100%)"].join(", "),ct="/decotexture.svg";function he(e){const t=R.c(7),{onClick:s}=e;let r;t[0]===Symbol.for("react.memo_cache_sentinel")?(r={backgroundImage:at},t[0]=r):r=t[0];let n,o;t[1]===Symbol.for("react.memo_cache_sentinel")?(n=i.jsx("div",{className:"relative shrink-0 p-1.5 bg-[var(--brand-green-light)] rounded-lg border border-border",children:i.jsx(je,{icon:"/logos/deco%20logo.svg",name:"deco.cx",size:"xs",className:"border-0 rounded-none bg-transparent"})}),o=i.jsx("p",{className:"flex-1 relative text-sm font-medium text-foreground leading-none whitespace-nowrap",children:"Import your deco.cx site"}),t[1]=n,t[2]=o):(n=t[1],o=t[2]);let c;t[3]===Symbol.for("react.memo_cache_sentinel")?(c=i.jsx("img",{src:ct,alt:"","aria-hidden":!0,className:"absolute pointer-events-none",style:{width:"274.5px",height:"272.25px",left:"calc(50% + 145.5px)",top:"calc(50% + 40px)",transform:"translate(-50%, -50%)"}}),t[3]=c):c=t[3];let a;t[4]===Symbol.for("react.memo_cache_sentinel")?(a=i.jsx("div",{className:"relative bg-background flex items-center justify-center size-8 rounded-md shrink-0",children:i.jsx(He,{size:16,className:"text-foreground transition-transform group-hover:translate-x-0.5"})}),t[4]=a):a=t[4];let m;return t[5]!==s?(m=i.jsxs("button",{type:"button",onClick:s,className:"w-full relative flex items-center gap-4 px-4 py-4 rounded-lg border border-border bg-background overflow-hidden transition-colors text-left cursor-pointer group",style:r,children:[n,o,c,a]}),t[5]=s,t[6]=m):m=t[6],m}function mt(){const e=R.c(5),{data:t}=be.useSession();let s;e[0]!==t?.user?.email?(s=Ce.decoProfile(t?.user?.email),e[0]=t?.user?.email,e[1]=s):s=e[1];const r=!!t?.user?.email;let n;e[2]!==s||e[3]!==r?(n={queryKey:s,queryFn:dt,enabled:r,staleTime:3e5},e[2]=s,e[3]=r,e[4]=n):n=e[4];const{data:o}=we(n);return o?.isDecoUser??!1}async function dt(){const e=await fetch("/api/deco-sites/profile");return e.ok?e.json():{isDecoUser:!1}}function pt(){const e=R.c(51),{data:t}=be.useSession(),[s,r]=P.useState(!1),n=mt(),o=Fe(),{hasDecoKey:c,isZeroBalance:a,isInitialFreeCredit:m,balanceDollars:u,hasOnlyDecoProvider:L}=ze();let b;e[0]!==t?.user?.name?(b=t?.user?.name?.split(" ")[0]||"there",e[0]=t?.user?.name,e[1]=b):b=e[1];const x=b,d=c&&m&&u!=null,k=c&&a&&L;if(o){let _;e[2]!==u||e[3]!==d?(_=d&&i.jsx("div",{className:"mb-4",children:i.jsx(G.CreditsEyebrow,{balanceDollars:u})}),e[2]=u,e[3]=d,e[4]=_):_=e[4];let v;e[5]!==k?(v=k&&i.jsx("div",{className:"mb-4",children:i.jsx(G.NoCreditsEyebrow,{})}),e[5]=k,e[6]=v):v=e[6];let O;e[7]!==x?(O=i.jsxs("p",{className:"text-3xl font-medium text-foreground text-center max-w-[280px]",children:["What's on your mind, ",x,"?"]}),e[7]=x,e[8]=O):O=e[8];let y;e[9]!==_||e[10]!==v||e[11]!==O?(y=i.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center w-full",children:[_,v,O]}),e[9]=_,e[10]=v,e[11]=O,e[12]=y):y=e[12];let D;e[13]===Symbol.for("react.memo_cache_sentinel")?(D=i.jsxs("div",{className:"w-full flex flex-col gap-4 pb-4",children:[i.jsx(ge,{}),i.jsx(G.Input,{showConnectionsBanner:!0})]}),e[13]=D):D=e[13];let N;e[14]!==n?(N=n&&i.jsx("div",{className:"w-full",children:i.jsx(he,{onClick:()=>r(!0)})}),e[14]=n,e[15]=N):N=e[15];let C;e[16]!==y||e[17]!==N?(C=i.jsxs("div",{className:"flex-1 relative flex flex-col items-center px-4",children:[y,D,N]}),e[16]=y,e[17]=N,e[18]=C):C=e[18];let w;e[19]!==s?(w=i.jsx(oe,{open:s,onOpenChange:r}),e[19]=s,e[20]=w):w=e[20];let E;return e[21]!==C||e[22]!==w?(E=i.jsxs(i.Fragment,{children:[C,w]}),e[21]=C,e[22]=w,e[23]=E):E=e[23],E}let I;e[24]!==u||e[25]!==d?(I=d&&i.jsx("div",{className:"mb-4",children:i.jsx(G.CreditsEyebrow,{balanceDollars:u})}),e[24]=u,e[25]=d,e[26]=I):I=e[26];let T;e[27]!==k?(T=k&&i.jsx("div",{className:"mb-4",children:i.jsx(G.NoCreditsEyebrow,{})}),e[27]=k,e[28]=T):T=e[28];let M;e[29]!==x?(M=i.jsxs("p",{className:"text-3xl font-medium text-foreground",children:["What's on your mind, ",x,"?"]}),e[29]=x,e[30]=M):M=e[30];let $;e[31]!==I||e[32]!==T||e[33]!==M?($=i.jsxs("div",{className:"text-center mb-10",children:[I,T,M]}),e[31]=I,e[32]=T,e[33]=M,e[34]=$):$=e[34];let z;e[35]===Symbol.for("react.memo_cache_sentinel")?(z=i.jsx("div",{className:"w-full",children:i.jsx(G.Input,{showConnectionsBanner:!0})}),e[35]=z):z=e[35];let S;e[36]!==$?(S=i.jsxs("div",{className:"flex flex-col items-center w-full max-w-[672px]",children:[$,z]}),e[36]=$,e[37]=S):S=e[37];let h;e[38]===Symbol.for("react.memo_cache_sentinel")?(h=i.jsx("div",{className:"w-full mt-10 mx-auto",children:i.jsx(ge,{})}),e[38]=h):h=e[38];let p;e[39]!==S?(p=i.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center w-full",children:[S,h]}),e[39]=S,e[40]=p):p=e[40];let f;e[41]!==n?(f=n&&i.jsx("div",{className:"absolute bottom-6 left-0 right-0 px-10",children:i.jsx("div",{className:"w-full max-w-[500px] mx-auto",children:i.jsx(he,{onClick:()=>r(!0)})})}),e[41]=n,e[42]=f):f=e[42];let g;e[43]!==p||e[44]!==f?(g=i.jsxs("div",{className:"flex-1 relative flex flex-col items-center px-10",children:[p,f]}),e[43]=p,e[44]=f,e[45]=g):g=e[45];let j;e[46]!==s?(j=i.jsx(oe,{open:s,onOpenChange:r}),e[46]=s,e[47]=j):j=e[47];let A;return e[48]!==g||e[49]!==j?(A=i.jsxs(i.Fragment,{children:[g,j]}),e[48]=g,e[49]=j,e[50]=A):A=e[50],A}function es(){const e=R.c(1);let t;return e[0]===Symbol.for("react.memo_cache_sentinel")?(t=i.jsx("div",{className:"flex-1 min-h-0 p-1.5 overflow-hidden",children:i.jsx("div",{className:"flex h-full flex-col bg-background overflow-hidden card-shadow rounded-[0.75rem]",children:i.jsx(pt,{})})}),e[0]=t):t=e[0],t}export{es as default};